@launchdarkly/observability 1.1.10 → 1.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -275,7 +275,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
275
275
  }
276
276
  }
277
277
  ${ia}
278
- `,Cp=(e,t,n,r)=>e();function xp(e,t=Cp){return{PushPayload(n,r){return t(i=>e.request(Ep,n,I(I({},r),i)),"PushPayload","mutation",n)},PushSessionEvents(n,r){return t(i=>e.request(bp,n,I(I({},r),i)),"PushSessionEvents","mutation",n)},identifySession(n,r){return t(i=>e.request(Tp,n,I(I({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return t(i=>e.request(Sp,n,I(I({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return t(i=>e.request(wp,n,I(I({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return t(i=>e.request(Op,n,I(I({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return t(i=>e.request(Lp,n,I(I({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return t(i=>e.request(Ap,n,I(I({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return t(i=>e.request(Rp,n,I(I({},r),i)),"GetSamplingConfig","query",n)}}}function Pp(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}function Np(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let n=e.localName;if(!n)break;n=n.toLowerCase();let r=e.parentElement,i=[];if(r.children&&r.children.length>0)for(let o=0;o<r.children.length;o++){let a=r.children[o];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===n&&i.push(a)}i.length>1&&(n+=":eq("+i.indexOf(e)+")"),t=n+(t?">"+t:""),e=r}return t}function Pr(e){return Object.prototype.toString.call(e)==="[object Object]"}function oa(e,t){if(t===0)return!0;const n=Object.keys(e);for(const r of n)if(Pr(e[r])&&oa(e[r],t-1))return!0;return!1}function Nr(e,t){const n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);const r=[],i=[];return JSON.stringify(e,function(u,c){if(r.length>0){const s=r.indexOf(this);~s?r.splice(s+1):r.push(this),~s?i.splice(s,1/0,u):i.push(u),~r.indexOf(c)&&(r[0]===c?c="[Circular ~]":c="[Circular ~."+i.slice(0,r.indexOf(c)).join(".")+"]")}else r.push(c);if(c==null)return c;if(o(c))return a(c);if(c instanceof Event){const s={};for(const l in c){const p=c[l];Array.isArray(p)?s[l]=Np(p.length?p[0]:null):s[l]=p}return s}else{if(c instanceof Node)return c instanceof HTMLElement?c?c.outerHTML:"":c.nodeName;if(c instanceof Error)return c.name+": "+c.message}return c});function o(u){return Pr(u)&&Object.keys(u).length>n.numOfKeysLimit||typeof u=="function"?!0:u instanceof Event&&u.isTrusted===!1?Object.keys(u).length===1:!!(Pr(u)&&oa(u,n.depthOfLimit))}function a(u){let c=u.toString();return n.stringLengthLimit&&c.length>n.stringLengthLimit&&(c=`${c.slice(0,n.stringLengthLimit)}...`),c}}function Ip(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}const Ir="exception.message",kp="exception.stacktrace",kr="exception.type",aa="http.response.status_code",Mp="server.address",Dp="service.name",Up="service.version",jp="telemetry.sdk.name",Bp="telemetry.sdk.version",wt="url.full",bn="url.path",$p="url.query",Fp="user_agent.original",Mr=15*60*1e3;/*! js-cookie v3.0.5 | MIT */function Tn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Vp={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Dr(e,t){function n(i,o,a){if(typeof document<"u"){a=Tn({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var c in a)a[c]&&(u+="; "+c,a[c]!==!0&&(u+="="+a[c].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+u}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],a={},u=0;u<o.length;u++){var c=o[u].split("="),s=c.slice(1).join("=");try{var l=decodeURIComponent(c[0]);if(a[l]=e.read(s,l),i===l)break}catch{}}return i?a[i]:a}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",Tn({},o,{expires:-1}))},withAttributes:function(i){return Dr(this.converter,Tn({},this.attributes,i))},withConverter:function(i){return Dr(Tn({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Sn=Dr(Vp,{path:"/"});let Ur="localStorage",jr=!0;class Gp{constructor(){Re(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(t){var n;return(n=Object.keys(this.storage)[t])!=null?n:null}getItem(t){var n;return(n=this.storage[t])!=null?n:""}setItem(t,n){this.storage[t]=n}removeItem(t){delete this.storage[t]}}let Hp=class{getItem(t){var n;return(n=Sn.get(t))!=null?n:""}setItem(t,n){if(!jr)return;const r=new Date;r.setTime(r.getTime()+Mr),Sn.set(t,n,{expires:r})}removeItem(t){jr&&Sn.remove(t)}keys(){var t;return Object.keys((t=Sn.get())!=null?t:{})}};const ae=new Gp,se=new Hp,wn=()=>{let e=null;if(typeof window>"u")return ae;try{switch(Ur){case"localStorage":e=window.localStorage;break;case"sessionStorage":e=window.sessionStorage;break}e||(kt("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${Ur}; using global storage`),e=ae)}catch(t){kt("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",t),e=ae}return e},qp=e=>{Ur=e},sa=e=>{jr=e},Br=e=>{try{return wn().getItem(e)}catch(t){return kt("storage","getItem","debug",`failed to get item ${e}; using global storage`,t),ae.getItem(e)}},ua=(e,t)=>{se.setItem(e,t);try{return wn().setItem(e,t)}catch(n){return kt("storage","setItem","debug",`failed to set item ${e}; using global storage`,n),ae.setItem(e,t)}},ca=e=>{se.removeItem(e);try{return wn().removeItem(e)}catch(t){return kt("storage","removeItem","debug",`failed to remove item ${e}; using global storage`,t),ae.removeItem(e)}};var ue=(e=>(e.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",e.SESSION_ID="sessionID",e.SESSION_DATA="sessionData",e.USER_IDENTIFIER="highlightIdentifier",e.USER_OBJECT="highlightUserObject",e))(ue||{});const On=e=>`${ue.SESSION_DATA}_${e}`,Ot=()=>{var e;return typeof globalThis<"u"&&(e=globalThis.persistentSessionSecureID)!=null&&e.length?globalThis.persistentSessionSecureID:la()},zp=e=>{typeof globalThis<"u"&&e!=null&&e.length&&(globalThis.persistentSessionSecureID=e)},la=()=>{var e;return(e=Br(ue.SESSION_ID))!=null?e:""},pa=e=>{ua(ue.SESSION_ID,e)},Xp=e=>{const t=On(e);return JSON.parse(Br(t)||"{}")},Kp=e=>{e||(e=la());let t=Xp(e);if(t&&t.lastPushTime&&Date.now()-t.lastPushTime<Mr)return t;ca(On(e))},fa=function(e){if(!(e!=null&&e.sessionSecureID))return;const t=e.sessionSecureID;zp(t);const n=On(t);ua(n,JSON.stringify(e)),Yp(n)},Wp=function(){const e=se.getItem(ue.SESSION_ID);pa(e);const t=On(e),n=se.getItem(t);try{fa(JSON.parse(n))}catch{}};function Yp(e){var t;const n=`${ue.SESSION_DATA}_`,r=new Set,i=wn();for(let o=i.length-1;o>=0;o--){const a=i.key(o);a&&a.startsWith(n)&&a!==e&&r.add(a)}for(const o of se.keys())o.startsWith(n)&&o!==e&&r.add(o);for(const o of r){let a=!0;try{const u=Br(o)||se.getItem(o)||"{}",c=JSON.parse(u),s=(t=c.lastPushTime)!=null?t:c.sessionStartTime;a=s===void 0||Date.now()-s>=Mr}catch{}a&&(kt("highlightSession","pruneSessionData","debug",`removing session data for stale key ${o}`),ca(o))}}var ha=(e=>(e.BillingQuotaExceeded="BillingQuotaExceeded",e))(ha||{});const $r=3,Fr=1e3,Vr=500,Jp=[ha.BillingQuotaExceeded.toString()],Qp=e=>{var t;return((t=e.response.errors)==null?void 0:t.find(n=>Jp.includes(n.message)))===void 0},Zp=()=>{const e=(t,n,r,i,o=0)=>ne(void 0,null,function*(){try{return yield t()}catch(a){if(a instanceof ta&&!Qp(a))throw a;if(o<$r)return yield new Promise(u=>setTimeout(u,Fr+Vr*Math.pow(2,o))),yield e(t,n,r,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),a}});return e},J="feature_flag",da="launchdarkly",tf="evaluation",ef=`${J}.set.id`,nf=`${J}.key`,rf=`${J}.contextKeys`,of=`${J}.context.id`,af=`${J}.result.value`,sf=`${J}.provider.name`,va={kind:`${J}.result.reason.kind`,errorKind:`${J}.result.reason.errorKind`,ruleIndex:`${J}.result.reason.ruleIndex`,ruleId:`${J}.result.reason.ruleId`,prerequisiteKey:`${J}.result.reason.prerequisiteKey`,inExperiment:`${J}.result.reason.inExperiment`,bigSegmentsStatus:`${J}.result.reason.bigSegmentsStatus`},uf=`${J}.result.variationIndex`,cf=`${da}.application.id`,lf=`${da}.application.version`,pf="context",ff=`${pf}.contextKeys`,hf="$ld:telemetry:session:init",ya="$ld:telemetry:track",df="launchdarkly.track",vf="page_view",yf="document_load",gf="result.status";function ga(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}function ma(e){return e.kind==="multi"}function Gr(e){return ma(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${ga(e[t].key)}`).join(":"):"kind"in e&&e.kind==="user"?e.key:"kind"in e?`${e.kind}:${ga(e.key)}`:e.key}function _a(e){return ma(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>({[t]:e[t].key})).reduce((t,n)=>I(I({},t),n),{}):"kind"in e?{[e.kind]:e.key}:{user:e.key}}let mf=class{constructor(t,n){Re(this,"client"),Re(this,"metadata"),this.client=t,this.metadata=n}getHooks(t){return[]}init(t){this.client.track(hf,{sessionID:t})}recordGauge(t,n){}identify(t,n,r={},i){}error(t,n){}track(t,n){const r=n.event;this.client.track(r?`${ya}:${r}`:ya,cn(I({},n),{sessionID:t}))}},_f=class extends ko{constructor(t,n){super(),Re(this,"client"),this.client=new mf(t,n)}getHooks(t){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(n,r,i)=>(this.load(this.client),r)}]}init(t){return this._bufferCall("init",[t])}recordGauge(t,n){return this._bufferCall("recordGauge",[t,n])}identify(t,n,r={},i){return this._bufferCall("identify",[t,n,r,i])}error(t,n){return this._bufferCall("error",[t,n])}track(t,n){return this._bufferCall("track",[t,n])}};const Ef=e=>{e(window.location.href);const t=history.pushState;history.pushState=(o=>function(){var a=o.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),a})(history.pushState);const n=history.replaceState;history.replaceState=(o=>function(){var a=o.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),a})(history.replaceState);const r=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",r);const i=function(){e(window.location.href)};return window.addEventListener("locationchange",i),()=>{window.removeEventListener("popstate",r),window.removeEventListener("locationchange",i),history.pushState=t,history.replaceState=n}},bf="10.3.1",Tf={version:bf},Sf=Tf.version;function wf(e){if(e.id.length)return`#${e.id}`;if(e.classList.length){let t=[];for(const n of e.classList)t.push(`.${n}`);return`${e.nodeName.toLowerCase()}${t.join(",")}`}return e.nodeName.toLowerCase()}const Of=e=>{let t;const n=()=>{clearTimeout(t),t=setTimeout(()=>{var r,i;e({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(r=window.screen.orientation)==null?void 0:r.angle)!=null?i:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)};var Ea={exports:{}};/**
278
+ `,Cp=(e,t,n,r)=>e();function xp(e,t=Cp){return{PushPayload(n,r){return t(i=>e.request(Ep,n,I(I({},r),i)),"PushPayload","mutation",n)},PushSessionEvents(n,r){return t(i=>e.request(bp,n,I(I({},r),i)),"PushSessionEvents","mutation",n)},identifySession(n,r){return t(i=>e.request(Tp,n,I(I({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return t(i=>e.request(Sp,n,I(I({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return t(i=>e.request(wp,n,I(I({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return t(i=>e.request(Op,n,I(I({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return t(i=>e.request(Lp,n,I(I({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return t(i=>e.request(Ap,n,I(I({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return t(i=>e.request(Rp,n,I(I({},r),i)),"GetSamplingConfig","query",n)}}}function Pp(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}function Np(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let n=e.localName;if(!n)break;n=n.toLowerCase();let r=e.parentElement,i=[];if(r.children&&r.children.length>0)for(let o=0;o<r.children.length;o++){let a=r.children[o];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===n&&i.push(a)}i.length>1&&(n+=":eq("+i.indexOf(e)+")"),t=n+(t?">"+t:""),e=r}return t}function Pr(e){return Object.prototype.toString.call(e)==="[object Object]"}function oa(e,t){if(t===0)return!0;const n=Object.keys(e);for(const r of n)if(Pr(e[r])&&oa(e[r],t-1))return!0;return!1}function Nr(e,t){const n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);const r=[],i=[];return JSON.stringify(e,function(u,c){if(r.length>0){const s=r.indexOf(this);~s?r.splice(s+1):r.push(this),~s?i.splice(s,1/0,u):i.push(u),~r.indexOf(c)&&(r[0]===c?c="[Circular ~]":c="[Circular ~."+i.slice(0,r.indexOf(c)).join(".")+"]")}else r.push(c);if(c==null)return c;if(o(c))return a(c);if(c instanceof Event){const s={};for(const l in c){const p=c[l];Array.isArray(p)?s[l]=Np(p.length?p[0]:null):s[l]=p}return s}else{if(c instanceof Node)return c instanceof HTMLElement?c?c.outerHTML:"":c.nodeName;if(c instanceof Error)return c.name+": "+c.message}return c});function o(u){return Pr(u)&&Object.keys(u).length>n.numOfKeysLimit||typeof u=="function"?!0:u instanceof Event&&u.isTrusted===!1?Object.keys(u).length===1:!!(Pr(u)&&oa(u,n.depthOfLimit))}function a(u){let c=u.toString();return n.stringLengthLimit&&c.length>n.stringLengthLimit&&(c=`${c.slice(0,n.stringLengthLimit)}...`),c}}function Ip(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}const Ir="exception.message",kp="exception.stacktrace",kr="exception.type",aa="http.response.status_code",Mp="server.address",Dp="service.name",Up="service.version",jp="telemetry.sdk.name",Bp="telemetry.sdk.version",wt="url.full",bn="url.path",$p="url.query",Fp="user_agent.original",Mr=15*60*1e3;/*! js-cookie v3.0.5 | MIT */function Tn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Vp={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Dr(e,t){function n(i,o,a){if(typeof document<"u"){a=Tn({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var c in a)a[c]&&(u+="; "+c,a[c]!==!0&&(u+="="+a[c].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+u}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],a={},u=0;u<o.length;u++){var c=o[u].split("="),s=c.slice(1).join("=");try{var l=decodeURIComponent(c[0]);if(a[l]=e.read(s,l),i===l)break}catch{}}return i?a[i]:a}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",Tn({},o,{expires:-1}))},withAttributes:function(i){return Dr(this.converter,Tn({},this.attributes,i))},withConverter:function(i){return Dr(Tn({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Sn=Dr(Vp,{path:"/"});let Ur="localStorage",jr=!0;class Gp{constructor(){Re(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(t){var n;return(n=Object.keys(this.storage)[t])!=null?n:null}getItem(t){var n;return(n=this.storage[t])!=null?n:""}setItem(t,n){this.storage[t]=n}removeItem(t){delete this.storage[t]}}let Hp=class{getItem(t){var n;return(n=Sn.get(t))!=null?n:""}setItem(t,n){if(!jr)return;const r=new Date;r.setTime(r.getTime()+Mr),Sn.set(t,n,{expires:r})}removeItem(t){jr&&Sn.remove(t)}keys(){var t;return Object.keys((t=Sn.get())!=null?t:{})}};const ae=new Gp,se=new Hp,wn=()=>{let e=null;if(typeof window>"u")return ae;try{switch(Ur){case"localStorage":e=window.localStorage;break;case"sessionStorage":e=window.sessionStorage;break}e||(kt("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${Ur}; using global storage`),e=ae)}catch(t){kt("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",t),e=ae}return e},qp=e=>{Ur=e},sa=e=>{jr=e},Br=e=>{try{return wn().getItem(e)}catch(t){return kt("storage","getItem","debug",`failed to get item ${e}; using global storage`,t),ae.getItem(e)}},ua=(e,t)=>{se.setItem(e,t);try{return wn().setItem(e,t)}catch(n){return kt("storage","setItem","debug",`failed to set item ${e}; using global storage`,n),ae.setItem(e,t)}},ca=e=>{se.removeItem(e);try{return wn().removeItem(e)}catch(t){return kt("storage","removeItem","debug",`failed to remove item ${e}; using global storage`,t),ae.removeItem(e)}};var ue=(e=>(e.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",e.SESSION_ID="sessionID",e.SESSION_DATA="sessionData",e.USER_IDENTIFIER="highlightIdentifier",e.USER_OBJECT="highlightUserObject",e))(ue||{});const On=e=>`${ue.SESSION_DATA}_${e}`,Ot=()=>{var e;return typeof globalThis<"u"&&(e=globalThis.persistentSessionSecureID)!=null&&e.length?globalThis.persistentSessionSecureID:la()},zp=e=>{typeof globalThis<"u"&&e!=null&&e.length&&(globalThis.persistentSessionSecureID=e)},la=()=>{var e;return(e=Br(ue.SESSION_ID))!=null?e:""},pa=e=>{ua(ue.SESSION_ID,e)},Xp=e=>{const t=On(e);return JSON.parse(Br(t)||"{}")},Kp=e=>{e||(e=la());let t=Xp(e);if(t&&t.lastPushTime&&Date.now()-t.lastPushTime<Mr)return t;ca(On(e))},fa=function(e){if(!(e!=null&&e.sessionSecureID))return;const t=e.sessionSecureID;zp(t);const n=On(t);ua(n,JSON.stringify(e)),Yp(n)},Wp=function(){const e=se.getItem(ue.SESSION_ID);pa(e);const t=On(e),n=se.getItem(t);try{fa(JSON.parse(n))}catch{}};function Yp(e){var t;const n=`${ue.SESSION_DATA}_`,r=new Set,i=wn();for(let o=i.length-1;o>=0;o--){const a=i.key(o);a&&a.startsWith(n)&&a!==e&&r.add(a)}for(const o of se.keys())o.startsWith(n)&&o!==e&&r.add(o);for(const o of r){let a=!0;try{const u=Br(o)||se.getItem(o)||"{}",c=JSON.parse(u),s=(t=c.lastPushTime)!=null?t:c.sessionStartTime;a=s===void 0||Date.now()-s>=Mr}catch{}a&&(kt("highlightSession","pruneSessionData","debug",`removing session data for stale key ${o}`),ca(o))}}var ha=(e=>(e.BillingQuotaExceeded="BillingQuotaExceeded",e))(ha||{});const $r=3,Fr=1e3,Vr=500,Jp=[ha.BillingQuotaExceeded.toString()],Qp=e=>{var t;return((t=e.response.errors)==null?void 0:t.find(n=>Jp.includes(n.message)))===void 0},Zp=()=>{const e=(t,n,r,i,o=0)=>ne(void 0,null,function*(){try{return yield t()}catch(a){if(a instanceof ta&&!Qp(a))throw a;if(o<$r)return yield new Promise(u=>setTimeout(u,Fr+Vr*Math.pow(2,o))),yield e(t,n,r,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),a}});return e},J="feature_flag",da="launchdarkly",tf="evaluation",ef=`${J}.set.id`,nf=`${J}.key`,rf=`${J}.contextKeys`,of=`${J}.context.id`,af=`${J}.result.value`,sf=`${J}.provider.name`,va={kind:`${J}.result.reason.kind`,errorKind:`${J}.result.reason.errorKind`,ruleIndex:`${J}.result.reason.ruleIndex`,ruleId:`${J}.result.reason.ruleId`,prerequisiteKey:`${J}.result.reason.prerequisiteKey`,inExperiment:`${J}.result.reason.inExperiment`,bigSegmentsStatus:`${J}.result.reason.bigSegmentsStatus`},uf=`${J}.result.variationIndex`,cf=`${da}.application.id`,lf=`${da}.application.version`,pf="context",ff=`${pf}.contextKeys`,hf="$ld:telemetry:session:init",ya="$ld:telemetry:track",df="launchdarkly.track",vf="page_view",yf="document_load",gf="result.status";function ga(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}function ma(e){return e.kind==="multi"}function Gr(e){return ma(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${ga(e[t].key)}`).join(":"):"kind"in e&&e.kind==="user"?e.key:"kind"in e?`${e.kind}:${ga(e.key)}`:e.key}function _a(e){return ma(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>({[t]:e[t].key})).reduce((t,n)=>I(I({},t),n),{}):"kind"in e?{[e.kind]:e.key}:{user:e.key}}let mf=class{constructor(t,n){Re(this,"client"),Re(this,"metadata"),this.client=t,this.metadata=n}getHooks(t){return[]}init(t){this.client.track(hf,{sessionID:t})}recordGauge(t,n){}identify(t,n,r={},i){}error(t,n){}track(t,n){const r=n.event;this.client.track(r?`${ya}:${r}`:ya,cn(I({},n),{sessionID:t}))}},_f=class extends ko{constructor(t,n){super(),Re(this,"client"),this.client=new mf(t,n)}getHooks(t){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(n,r,i)=>(this.load(this.client),r)}]}init(t){return this._bufferCall("init",[t])}recordGauge(t,n){return this._bufferCall("recordGauge",[t,n])}identify(t,n,r={},i){return this._bufferCall("identify",[t,n,r,i])}error(t,n){return this._bufferCall("error",[t,n])}track(t,n){return this._bufferCall("track",[t,n])}};const Ef=e=>{e(window.location.href);const t=history.pushState;history.pushState=(o=>function(){var a=o.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),a})(history.pushState);const n=history.replaceState;history.replaceState=(o=>function(){var a=o.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),a})(history.replaceState);const r=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",r);const i=function(){e(window.location.href)};return window.addEventListener("locationchange",i),()=>{window.removeEventListener("popstate",r),window.removeEventListener("locationchange",i),history.pushState=t,history.replaceState=n}},bf="10.4.0",Tf={version:bf},Sf=Tf.version;function wf(e){if(e.id.length)return`#${e.id}`;if(e.classList.length){let t=[];for(const n of e.classList)t.push(`.${n}`);return`${e.nodeName.toLowerCase()}${t.join(",")}`}return e.nodeName.toLowerCase()}const Of=e=>{let t;const n=()=>{clearTimeout(t),t=setTimeout(()=>{var r,i;e({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(r=window.screen.orientation)==null?void 0:r.angle)!=null?i:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)};var Ea={exports:{}};/**
279
279
  * @preserve
280
280
  * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
281
281
  *
@@ -293,18 +293,18 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
293
293
  `).length?this.parseOpera9(a):a.stack?this.parseOpera11(a):this.parseOpera10(a)},parseOpera9:function(a){for(var u=/Line (\d+).*script (?:in )?(\S+)/i,c=a.message.split(`
294
294
  `),s=[],l=2,p=c.length;l<p;l+=2){var f=u.exec(c[l]);f&&s.push(new n({fileName:f[2],lineNumber:f[1],source:c[l]}))}return s},parseOpera10:function(a){for(var u=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,c=a.stacktrace.split(`
295
295
  `),s=[],l=0,p=c.length;l<p;l+=2){var f=u.exec(c[l]);f&&s.push(new n({functionName:f[3]||void 0,fileName:f[2],lineNumber:f[1],source:c[l]}))}return s},parseOpera11:function(a){var u=a.stack.split(`
296
- `).filter(function(c){return!!c.match(r)&&!c.match(/^Error created at/)},this);return u.map(function(c){var s=c.split("@"),l=this.extractLocation(s.pop()),p=s.shift()||"",f=p.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,v;p.match(/\(([^)]*)\)/)&&(v=p.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var y=v===void 0||v==="[arguments not available]"?void 0:v.split(",");return new n({functionName:f,args:y,fileName:l[0],lineNumber:l[1],columnNumber:l[2],source:c})},this)}}})})(La);var Bf=La.exports;const Ca=vn(Bf);function An(e){try{return Ca.parse(e)}catch(t){try{return Ca.parse(new Error)}catch(n){return console.warn("Highlight Warning: failed to parse error",{originalError:t,secondaryError:n}),[]}}}function $f(e,t){const n=t.logger;let r;r=window[n];const i=[];if(t.level.includes("error")&&window){const a=u=>{const{message:c,error:s}=u;let l=[];s&&(l=An(s));const p=[Nr(c,t.stringifyOptions)];e({type:"Error",trace:l,time:Date.now(),value:p})};window.addEventListener("error",a),i.push(()=>{window&&window.removeEventListener("error",a)})}for(const a of t.level)i.push(o(r,a));return()=>{i.forEach(a=>a())};function o(a,u){return a[u]?Pp(a,u,c=>(...s)=>{c.apply(this,s);try{e(Ff(u,t,...s))}catch(l){c("highlight logger error:",l,...s)}}):()=>{}}}function Ff(e,t,...n){const r=An(new Error),i=t.serializeConsoleAttributes?n.map(o=>typeof o=="object"?Nr(o,t.stringifyOptions):o):n.filter(o=>typeof o!="object").map(o=>`${o}`);return{type:e,trace:r,value:i,attributes:Nr(n.filter(o=>typeof o=="object").reduce((o,a)=>R(R({},o),a),{}),t.stringifyOptions),time:Date.now()}}const Vf={start:0,end:3},Gf={start:4,end:5},zr={start:6,end:7},Xr={start:8,end:8},Hf={start:9,end:9},qf={start:10,end:15};function zf(){if(crypto&&crypto.getRandomValues){const t=new Uint8Array(16);return crypto.getRandomValues(t),[...t.values()]}const e=[];for(let t=0;t<16;t+=1)e.push(Math.floor(Math.random()*256));return e}function le(e,t){let n="";for(let r=t.start;r<=t.end;r+=1)n+=e[r].toString(16).padStart(2,"0");return n}function Xf(e){return e[Xr.start]=(e[Xr.start]|128)&191,e[zr.start]=e[zr.start]&15|64,`${le(e,Vf)}-${le(e,Gf)}-${le(e,zr)}-${le(e,Xr)}${le(e,Hf)}-${le(e,qf)}`}function Kf(){const e=zf();return Xf(e)}function Kr(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Kf()}function Wr(e,t,n,r){var i,o,a,u;let c=r??t,s=An(c),l={};t instanceof Error&&(t=t.message,t.cause&&(l={"exception.cause":t.cause}));const p=Yf(s);e({error:c,event:gn(t),type:"window.onerror",url:window.location.href,source:n??"",lineNumber:(i=p[0])!=null&&i.lineNumber?(o=p[0])==null?void 0:o.lineNumber:0,columnNumber:(a=p[0])!=null&&a.columnNumber?(u=p[0])==null?void 0:u.columnNumber:0,stackTrace:p,timestamp:new Date().toISOString(),payload:l?gn(l):void 0,id:Kr()})}const Wf=(e,{enablePromisePatch:t})=>{if(typeof window>"u")return()=>{};const n=window.onerror=(a,u,c,s,l)=>{Wr(e,a,u,l)},r=window.onunhandledrejection=a=>{if(a.reason){const u=a.promise;u.getStack?Wr(e,a.reason,a.type,u.getStack()):Wr(e,a.reason,a.type)}},i=window.Promise,o=class extends i{constructor(a){super(a),C(this,"promiseCreationError"),this.promiseCreationError=new Error}getStack(){return this.promiseCreationError}static shouldPatch(){const a=typeof window.Zone>"u";return t&&a}};return o.shouldPatch()&&(window.Promise=o),()=>{window.Promise=i,window.onunhandledrejection=r,window.onerror=n}},Yf=e=>{var t,n;if(e.length===0)return e;const r=e[0];return(t=r.fileName)!=null&&t.includes("highlight.run")||(n=r.fileName)!=null&&n.includes("highlight.io")||r.functionName==="new highlightPromise"?e.slice(1):e},Jf=['["\\"Script error.\\""]','"Script error."','["\\"Load failed.\\""]','"Load failed."','["\\"Network request failed.\\""]','"Network request failed."','["\\"Document is not focused.\\""]','"Document is not focused."','["\\"Failed to fetch\\""]','"Failed to fetch"','[{"isTrusted":true}]','{"isTrusted":true}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],Qf=["websocket error",'\\"ResizeObserver loop'];var Zf=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Ut="1.9.0",xa=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function th(e){var t=new Set([e]),n=new Set,r=e.match(xa);if(!r)return function(){return!1};var i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(u){return u===e};function o(u){return n.add(u),!1}function a(u){return t.add(u),!0}return function(u){if(t.has(u))return!0;if(n.has(u))return!1;var c=u.match(xa);if(!c)return o(u);var s={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return s.prerelease!=null||i.major!==s.major?o(u):i.major===0?i.minor===s.minor&&i.patch<=s.patch?a(u):o(u):i.minor<=s.minor?a(u):o(u)}}var eh=th(Ut),nh=Ut.split(".")[0],Ne=Symbol.for("opentelemetry.js.api."+nh),Ie=Zf;function ke(e,t,n,r){var i;r===void 0&&(r=!1);var o=Ie[Ne]=(i=Ie[Ne])!==null&&i!==void 0?i:{version:Ut};if(!r&&o[e]){var a=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return n.error(a.stack||a.message),!1}if(o.version!==Ut){var a=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+e+" does not match previously registered API v"+Ut);return n.error(a.stack||a.message),!1}return o[e]=t,n.debug("@opentelemetry/api: Registered a global for "+e+" v"+Ut+"."),!0}function jt(e){var t,n,r=(t=Ie[Ne])===null||t===void 0?void 0:t.version;if(!(!r||!eh(r)))return(n=Ie[Ne])===null||n===void 0?void 0:n[e]}function Me(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+Ut+".");var n=Ie[Ne];n&&delete n[e]}var rh=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},ih=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},oh=function(){function e(t){this._namespace=t.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return De("debug",this._namespace,t)},e.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return De("error",this._namespace,t)},e.prototype.info=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return De("info",this._namespace,t)},e.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return De("warn",this._namespace,t)},e.prototype.verbose=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return De("verbose",this._namespace,t)},e}();function De(e,t,n){var r=jt("diag");if(r)return n.unshift(t),r[e].apply(r,ih([],rh(n),!1))}var D;(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(D||(D={}));function ah(e,t){e<D.NONE?e=D.NONE:e>D.ALL&&(e=D.ALL),t=t||{};function n(r,i){var o=t[r];return typeof o=="function"&&e>=i?o.bind(t):function(){}}return{error:n("error",D.ERROR),warn:n("warn",D.WARN),info:n("info",D.INFO),debug:n("debug",D.DEBUG),verbose:n("verbose",D.VERBOSE)}}var sh=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},uh=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},ch="diag",pt=function(){function e(){function t(i){return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=jt("diag");if(u)return u[i].apply(u,uh([],sh(o),!1))}}var n=this,r=function(i,o){var a,u,c;if(o===void 0&&(o={logLevel:D.INFO}),i===n){var s=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((a=s.stack)!==null&&a!==void 0?a:s.message),!1}typeof o=="number"&&(o={logLevel:o});var l=jt("diag"),p=ah((u=o.logLevel)!==null&&u!==void 0?u:D.INFO,i);if(l&&!o.suppressOverrideMessage){var f=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";l.warn("Current logger will be overwritten from "+f),p.warn("Current logger will overwrite one already registered from "+f)}return ke("diag",p,n,!0)};n.setLogger=r,n.disable=function(){Me(ch,n)},n.createComponentLogger=function(i){return new oh(i)},n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}(),lh=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},ph=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},fh=function(){function e(t){this._entries=t?new Map(t):new Map}return e.prototype.getEntry=function(t){var n=this._entries.get(t);if(n)return Object.assign({},n)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(t){var n=lh(t,2),r=n[0],i=n[1];return[r,i]})},e.prototype.setEntry=function(t,n){var r=new e(this._entries);return r._entries.set(t,n),r},e.prototype.removeEntry=function(t){var n=new e(this._entries);return n._entries.delete(t),n},e.prototype.removeEntries=function(){for(var t,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=new e(this._entries);try{for(var a=ph(r),u=a.next();!u.done;u=a.next()){var c=u.value;o._entries.delete(c)}}catch(s){t={error:s}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o},e.prototype.clear=function(){return new e},e}(),hh=Symbol("BaggageEntryMetadata"),dh=pt.instance();function vh(e){return e===void 0&&(e={}),new fh(new Map(Object.entries(e)))}function Pa(e){return typeof e!="string"&&(dh.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:hh,toString:function(){return e}}}function Rn(e){return Symbol.for(e)}var yh=function(){function e(t){var n=this;n._currentContext=t?new Map(t):new Map,n.getValue=function(r){return n._currentContext.get(r)},n.setValue=function(r,i){var o=new e(n._currentContext);return o._currentContext.set(r,i),o},n.deleteValue=function(r){var i=new e(n._currentContext);return i._currentContext.delete(r),i}}return e}(),Bt=new yh,$t=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),gh=function(){function e(){}return e.prototype.createGauge=function(t,n){return Lh},e.prototype.createHistogram=function(t,n){return Ah},e.prototype.createCounter=function(t,n){return Oh},e.prototype.createUpDownCounter=function(t,n){return Rh},e.prototype.createObservableGauge=function(t,n){return xh},e.prototype.createObservableCounter=function(t,n){return Ch},e.prototype.createObservableUpDownCounter=function(t,n){return Ph},e.prototype.addBatchObservableCallback=function(t,n){},e.prototype.removeBatchObservableCallback=function(t){},e}(),Cn=function(){function e(){}return e}(),mh=function(e){$t(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(n,r){},t}(Cn),_h=function(e){$t(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(n,r){},t}(Cn),Eh=function(e){$t(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(n,r){},t}(Cn),bh=function(e){$t(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(n,r){},t}(Cn),Yr=function(){function e(){}return e.prototype.addCallback=function(t){},e.prototype.removeCallback=function(t){},e}(),Th=function(e){$t(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Yr),Sh=function(e){$t(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Yr),wh=function(e){$t(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Yr),Na=new gh,Oh=new mh,Lh=new Eh,Ah=new bh,Rh=new _h,Ch=new Th,xh=new Sh,Ph=new wh;function Nh(){return Na}var Lt;(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(Lt||(Lt={}));var Ih={get:function(e,t){if(e!=null)return e[t]},keys:function(e){return e==null?[]:Object.keys(e)}},kh={set:function(e,t,n){e!=null&&(e[t]=n)}},Mh=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Dh=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Uh=function(){function e(){}return e.prototype.active=function(){return Bt},e.prototype.with=function(t,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];return n.call.apply(n,Dh([r],Mh(i),!1))},e.prototype.bind=function(t,n){return n},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}(),jh=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Bh=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Jr="context",$h=new Uh,xn=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(t){return ke(Jr,t,pt.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(t,n,r){for(var i,o=[],a=3;a<arguments.length;a++)o[a-3]=arguments[a];return(i=this._getContextManager()).with.apply(i,Bh([t,n,r],jh(o),!1))},e.prototype.bind=function(t,n){return this._getContextManager().bind(t,n)},e.prototype._getContextManager=function(){return jt(Jr)||$h},e.prototype.disable=function(){this._getContextManager().disable(),Me(Jr,pt.instance())},e}(),ft;(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(ft||(ft={}));var Ia="0000000000000000",ka="00000000000000000000000000000000",Ma={traceId:ka,spanId:Ia,traceFlags:ft.NONE},Ue=function(){function e(t){t===void 0&&(t=Ma),this._spanContext=t}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,n){return this},e.prototype.setAttributes=function(t){return this},e.prototype.addEvent=function(t,n){return this},e.prototype.addLink=function(t){return this},e.prototype.addLinks=function(t){return this},e.prototype.setStatus=function(t){return this},e.prototype.updateName=function(t){return this},e.prototype.end=function(t){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(t,n){},e}(),Qr=Rn("OpenTelemetry Context Key SPAN");function Zr(e){return e.getValue(Qr)||void 0}function Fh(){return Zr(xn.getInstance().active())}function ti(e,t){return e.setValue(Qr,t)}function Vh(e){return e.deleteValue(Qr)}function Gh(e,t){return ti(e,new Ue(t))}function Da(e){var t;return(t=Zr(e))===null||t===void 0?void 0:t.spanContext()}var Hh=/^([0-9a-f]{32})$/i,qh=/^[0-9a-f]{16}$/i;function Ua(e){return Hh.test(e)&&e!==ka}function zh(e){return qh.test(e)&&e!==Ia}function je(e){return Ua(e.traceId)&&zh(e.spanId)}function Xh(e){return new Ue(e)}var ei=xn.getInstance(),ja=function(){function e(){}return e.prototype.startSpan=function(t,n,r){r===void 0&&(r=ei.active());var i=!!(n!=null&&n.root);if(i)return new Ue;var o=r&&Da(r);return Kh(o)&&je(o)?new Ue(o):new Ue},e.prototype.startActiveSpan=function(t,n,r,i){var o,a,u;if(!(arguments.length<2)){arguments.length===2?u=n:arguments.length===3?(o=n,u=r):(o=n,a=r,u=i);var c=a??ei.active(),s=this.startSpan(t,o,c),l=ti(c,s);return ei.with(l,u,void 0,s)}},e}();function Kh(e){return typeof e=="object"&&typeof e.spanId=="string"&&typeof e.traceId=="string"&&typeof e.traceFlags=="number"}var Wh=new ja,Yh=function(){function e(t,n,r,i){this._provider=t,this.name=n,this.version=r,this.options=i}return e.prototype.startSpan=function(t,n,r){return this._getTracer().startSpan(t,n,r)},e.prototype.startActiveSpan=function(t,n,r,i){var o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):Wh},e}(),Jh=function(){function e(){}return e.prototype.getTracer=function(t,n,r){return new ja},e}(),Qh=new Jh,Ba=function(){function e(){}return e.prototype.getTracer=function(t,n,r){var i;return(i=this.getDelegateTracer(t,n,r))!==null&&i!==void 0?i:new Yh(this,t,n,r)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Qh},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateTracer=function(t,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(t,n,r)},e}(),Pn;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Pn||(Pn={}));var Be;(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(Be||(Be={}));var Nn;(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(Nn||(Nn={}));var P=xn.getInstance(),b=pt.instance(),Zh=function(){function e(){}return e.prototype.getMeter=function(t,n,r){return Na},e}(),td=new Zh,ni="metrics",ed=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(t){return ke(ni,t,pt.instance())},e.prototype.getMeterProvider=function(){return jt(ni)||td},e.prototype.getMeter=function(t,n,r){return this.getMeterProvider().getMeter(t,n,r)},e.prototype.disable=function(){Me(ni,pt.instance())},e}(),pe=ed.getInstance(),nd=function(){function e(){}return e.prototype.inject=function(t,n){},e.prototype.extract=function(t,n){return t},e.prototype.fields=function(){return[]},e}(),ri=Rn("OpenTelemetry Baggage Key");function $a(e){return e.getValue(ri)||void 0}function rd(){return $a(xn.getInstance().active())}function id(e,t){return e.setValue(ri,t)}function od(e){return e.deleteValue(ri)}var ii="propagation",ad=new nd,sd=function(){function e(){this.createBaggage=vh,this.getBaggage=$a,this.getActiveBaggage=rd,this.setBaggage=id,this.deleteBaggage=od}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(t){return ke(ii,t,pt.instance())},e.prototype.inject=function(t,n,r){return r===void 0&&(r=kh),this._getGlobalPropagator().inject(t,n,r)},e.prototype.extract=function(t,n,r){return r===void 0&&(r=Ih),this._getGlobalPropagator().extract(t,n,r)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){Me(ii,pt.instance())},e.prototype._getGlobalPropagator=function(){return jt(ii)||ad},e}(),Z=sd.getInstance(),oi="trace",ud=function(){function e(){this._proxyTracerProvider=new Ba,this.wrapSpanContext=Xh,this.isSpanContextValid=je,this.deleteSpan=Vh,this.getSpan=Zr,this.getActiveSpan=Fh,this.getSpanContext=Da,this.setSpan=ti,this.setSpanContext=Gh}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(t){var n=ke(oi,this._proxyTracerProvider,pt.instance());return n&&this._proxyTracerProvider.setDelegate(t),n},e.prototype.getTracerProvider=function(){return jt(oi)||this._proxyTracerProvider},e.prototype.getTracer=function(t,n){return this.getTracerProvider().getTracer(t,n)},e.prototype.disable=function(){Me(oi,pt.instance()),this._proxyTracerProvider=new Ba},e}(),k=ud.getInstance(),Fa=Rn("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function cd(e){return e.setValue(Fa,!0)}function Va(e){return e.getValue(Fa)===!0}var ld="=",ai=";",si=",",ui="baggage",pd=180,fd=4096,hd=8192,dd=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function vd(e){return e.reduce(function(t,n){var r=""+t+(t!==""?si:"")+n;return r.length>hd?t:r},"")}function yd(e){return e.getAllEntries().map(function(t){var n=dd(t,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=ai+i.metadata.toString()),o})}function gd(e){var t=e.split(ai);if(!(t.length<=0)){var n=t.shift();if(n){var r=n.indexOf(ld);if(!(r<=0)){var i=decodeURIComponent(n.substring(0,r).trim()),o=decodeURIComponent(n.substring(r+1).trim()),a;return t.length>0&&(a=Pa(t.join(ai))),{key:i,value:o,metadata:a}}}}}var md=function(){function e(){}return e.prototype.inject=function(t,n,r){var i=Z.getBaggage(t);if(!(!i||Va(t))){var o=yd(i).filter(function(u){return u.length<=fd}).slice(0,pd),a=vd(o);a.length>0&&r.set(n,ui,a)}},e.prototype.extract=function(t,n,r){var i=r.get(n,ui),o=Array.isArray(i)?i.join(si):i;if(!o)return t;var a={};if(o.length===0)return t;var u=o.split(si);return u.forEach(function(c){var s=gd(c);if(s){var l={value:s.value};s.metadata&&(l.metadata=s.metadata),a[s.key]=l}}),Object.entries(a).length===0?t:Z.setBaggage(t,Z.createBaggage(a))},e.prototype.fields=function(){return[ui]},e}();function _d(){return function(e){b.error(Ed(e))}}function Ed(e){return typeof e=="string"?e:JSON.stringify(bd(e))}function bd(e){for(var t={},n=e;n!==null;)Object.getOwnPropertyNames(n).forEach(function(r){if(!t[r]){var i=n[r];i&&(t[r]=String(i))}}),n=Object.getPrototypeOf(n);return t}var Td=_d();function Ga(e){try{Td(e)}catch{}}var ci;(function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"})(ci||(ci={}));var Sd=",",wd=["OTEL_SDK_DISABLED"];function Od(e){return wd.indexOf(e)>-1}var Ld=["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"];function Ad(e){return Ld.indexOf(e)>-1}var Rd=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function Cd(e){return Rd.indexOf(e)>-1}var li=1/0,pi=128,xd=128,Pd=128,Ha={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:D.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:li,OTEL_ATTRIBUTE_COUNT_LIMIT:pi,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:li,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:pi,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:li,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:pi,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:xd,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Pd,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ci.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",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function Nd(e,t,n){if(typeof n[e]<"u"){var r=String(n[e]);t[e]=r.toLowerCase()==="true"}}function Id(e,t,n,r,i){if(r===void 0&&(r=-1/0),i===void 0&&(i=1/0),typeof n[e]<"u"){var o=Number(n[e]);isNaN(o)||(o<r?t[e]=r:o>i?t[e]=i:t[e]=o)}}function kd(e,t,n,r){r===void 0&&(r=Sd);var i=n[e];typeof i=="string"&&(t[e]=i.split(r).map(function(o){return o.trim()}))}var Md={ALL:D.ALL,VERBOSE:D.VERBOSE,DEBUG:D.DEBUG,INFO:D.INFO,WARN:D.WARN,ERROR:D.ERROR,NONE:D.NONE};function Dd(e,t,n){var r=n[e];if(typeof r=="string"){var i=Md[r.toUpperCase()];i!=null&&(t[e]=i)}}function Ud(e){var t={};for(var n in Ha){var r=n;switch(r){case"OTEL_LOG_LEVEL":Dd(r,t,e);break;default:if(Od(r))Nd(r,t,e);else if(Ad(r))Id(r,t,e);else if(Cd(r))kd(r,t,e);else{var i=e[r];typeof i<"u"&&i!==null&&(t[r]=String(i))}}}return t}var jd=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function Bd(){var e=Ud(jd);return Object.assign({},Ha,e)}function qa(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function fi(e){for(var t=new Uint8Array(e.length/2),n=0,r=0;r<e.length;r+=2){var i=qa(e.charCodeAt(r)),o=qa(e.charCodeAt(r+1));t[n++]=i<<4|o}return t}var hi=performance,$d="1.30.1",Fd="process.runtime.name",Vd="telemetry.sdk.name",Gd="telemetry.sdk.language",Hd="telemetry.sdk.version",qd=Fd,zd=Vd,Xd=Gd,Kd=Hd,Wd="webjs",Yd=Wd,fe,di=(fe={},fe[zd]="opentelemetry",fe[qd]="browser",fe[Xd]=Yd,fe[Kd]=$d,fe),Jd=9,Qd=6,Zd=Math.pow(10,Qd),vi=Math.pow(10,Jd);function $e(e){var t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*Zd);return[n,r]}function tv(){var e=hi.timeOrigin;if(typeof e!="number"){var t=hi;e=t.timing&&t.timing.fetchStart}return e}function ev(e){var t=$e(tv()),n=$e(hi.now());return rv(t,n)}function nv(e){return e[0]*vi+e[1]}function In(e){return e[0]*1e6+e[1]/1e3}function rv(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=vi&&(n[1]-=vi,n[0]+=1),n}var B;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(B||(B={}));var iv=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ov=function(){function e(t){t===void 0&&(t={});var n;this._propagators=(n=t.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,i){return r.concat(i)},[])))}return e.prototype.inject=function(t,n,r){var i,o;try{for(var a=iv(this._propagators),u=a.next();!u.done;u=a.next()){var c=u.value;try{c.inject(t,n,r)}catch(s){b.warn("Failed to inject with "+c.constructor.name+". Err: "+s.message)}}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}},e.prototype.extract=function(t,n,r){return this._propagators.reduce(function(i,o){try{return o.extract(i,n,r)}catch(a){b.warn("Failed to extract with "+o.constructor.name+". Err: "+a.message)}return i},t)},e.prototype.fields=function(){return this._fields.slice()},e}(),yi="[_0-9a-z-*/]",av="[a-z]"+yi+"{0,255}",sv="[a-z0-9]"+yi+"{0,240}@[a-z]"+yi+"{0,13}",uv=new RegExp("^(?:"+av+"|"+sv+")$"),cv=/^[ -~]{0,255}[!-~]$/,lv=/,|=/;function pv(e){return uv.test(e)}function fv(e){return cv.test(e)&&!lv.test(e)}var za=32,hv=512,Xa=",",Ka="=",dv=function(){function e(t){this._internalState=new Map,t&&this._parse(t)}return e.prototype.set=function(t,n){var r=this._clone();return r._internalState.has(t)&&r._internalState.delete(t),r._internalState.set(t,n),r},e.prototype.unset=function(t){var n=this._clone();return n._internalState.delete(t),n},e.prototype.get=function(t){return this._internalState.get(t)},e.prototype.serialize=function(){var t=this;return this._keys().reduce(function(n,r){return n.push(r+Ka+t.get(r)),n},[]).join(Xa)},e.prototype._parse=function(t){t.length>hv||(this._internalState=t.split(Xa).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(Ka);if(o!==-1){var a=i.slice(0,o),u=i.slice(o+1,r.length);pv(a)&&fv(u)&&n.set(a,u)}return n},new Map),this._internalState.size>za&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,za))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),gi="traceparent",mi="tracestate",vv="00",yv="(?!ff)[\\da-f]{2}",gv="(?![0]{32})[\\da-f]{32}",mv="(?![0]{16})[\\da-f]{16}",_v="[\\da-f]{2}",Ev=new RegExp("^\\s?("+yv+")-("+gv+")-("+mv+")-("+_v+")(-.*)?\\s?$");function bv(e){var t=Ev.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var Tv=function(){function e(){}return e.prototype.inject=function(t,n,r){var i=k.getSpanContext(t);if(!(!i||Va(t)||!je(i))){var o=vv+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||ft.NONE).toString(16);r.set(n,gi,o),i.traceState&&r.set(n,mi,i.traceState.serialize())}},e.prototype.extract=function(t,n,r){var i=r.get(n,gi);if(!i)return t;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return t;var a=bv(o);if(!a)return t;a.isRemote=!0;var u=r.get(n,mi);if(u){var c=Array.isArray(u)?u.join(","):u;a.traceState=new dv(typeof c=="string"?c:void 0)}return k.setSpanContext(t,a)},e.prototype.fields=function(){return[gi,mi]},e}(),Sv="[object Object]",wv="[object Null]",Ov="[object Undefined]",Lv=Function.prototype,Wa=Lv.toString,Av=Wa.call(Object),Rv=Cv(Object.getPrototypeOf,Object),Ya=Object.prototype,Ja=Ya.hasOwnProperty,Ft=Symbol?Symbol.toStringTag:void 0,Qa=Ya.toString;function Cv(e,t){return function(n){return e(t(n))}}function Za(e){if(!xv(e)||Pv(e)!==Sv)return!1;var t=Rv(e);if(t===null)return!0;var n=Ja.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Wa.call(n)===Av}function xv(e){return e!=null&&typeof e=="object"}function Pv(e){return e==null?e===void 0?Ov:wv:Ft&&Ft in Object(e)?Nv(e):Iv(e)}function Nv(e){var t=Ja.call(e,Ft),n=e[Ft],r=!1;try{e[Ft]=void 0,r=!0}catch{}var i=Qa.call(e);return r&&(t?e[Ft]=n:delete e[Ft]),i}function Iv(e){return Qa.call(e)}var kv=20;function Mv(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e.shift(),r=new WeakMap;e.length>0;)n=ts(n,e.shift(),0,r);return n}function _i(e){return kn(e)?e.slice():e}function ts(e,t,n,r){n===void 0&&(n=0);var i;if(!(n>kv)){if(n++,Mn(e)||Mn(t)||ns(t))i=_i(t);else if(kn(e)){if(i=e.slice(),kn(t))for(var o=0,a=t.length;o<a;o++)i.push(_i(t[o]));else if(Fe(t))for(var u=Object.keys(t),o=0,a=u.length;o<a;o++){var c=u[o];i[c]=_i(t[c])}}else if(Fe(e))if(Fe(t)){if(!Dv(e,t))return t;i=Object.assign({},e);for(var u=Object.keys(t),o=0,a=u.length;o<a;o++){var c=u[o],s=t[c];if(Mn(s))typeof s>"u"?delete i[c]:i[c]=s;else{var l=i[c],p=s;if(es(e,c,r)||es(t,c,r))delete i[c];else{if(Fe(l)&&Fe(p)){var f=r.get(l)||[],v=r.get(p)||[];f.push({obj:e,key:c}),v.push({obj:t,key:c}),r.set(l,f),r.set(p,v)}i[c]=ts(i[c],s,n,r)}}}}else i=t;return i}}function es(e,t,n){for(var r=n.get(e[t])||[],i=0,o=r.length;i<o;i++){var a=r[i];if(a.key===t&&a.obj===e)return!0}return!1}function kn(e){return Array.isArray(e)}function ns(e){return typeof e=="function"}function Fe(e){return!Mn(e)&&!kn(e)&&!ns(e)&&typeof e=="object"}function Mn(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function Dv(e,t){return!(!Za(e)||!Za(t))}function Uv(e,t){return new Promise(function(n){P.with(cd(P.active()),function(){e.export(t,function(r){n(r)})})})}var jv={_export:Uv},rs=function(){function e(){}return e.prototype.emit=function(t){},e}(),Bv=new rs,$v=function(){function e(){}return e.prototype.getLogger=function(t,n,r){return new rs},e}(),is=new $v,Fv=function(){function e(t,n,r,i){this._provider=t,this.name=n,this.version=r,this.options=i}return e.prototype.emit=function(t){this._getLogger().emit(t)},e.prototype._getLogger=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):Bv},e}(),os=function(){function e(){}return e.prototype.getLogger=function(t,n,r){var i;return(i=this.getDelegateLogger(t,n,r))!==null&&i!==void 0?i:new Fv(this,t,n,r)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:is},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateLogger=function(t,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(t,n,r)},e}(),Vv=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Dn=Symbol.for("io.opentelemetry.js.api.logs"),Ve=Vv;function Gv(e,t,n){return function(r){return r===e?t:n}}var as=1,Hv=function(){function e(){this._proxyLoggerProvider=new os}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(t){return Ve[Dn]?this.getLoggerProvider():(Ve[Dn]=Gv(as,t,is),this._proxyLoggerProvider.setDelegate(t),t)},e.prototype.getLoggerProvider=function(){var t,n;return(n=(t=Ve[Dn])===null||t===void 0?void 0:t.call(Ve,as))!==null&&n!==void 0?n:this._proxyLoggerProvider},e.prototype.getLogger=function(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)},e.prototype.disable=function(){delete Ve[Dn],this._proxyLoggerProvider=new os},e}(),ss=Hv.getInstance();function qv(e,t,n,r){for(var i=0,o=e.length;i<o;i++){var a=e[i];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}function zv(e){e.forEach(function(t){return t.disable()})}function Xv(e){var t,n,r=e.tracerProvider||k.getTracerProvider(),i=e.meterProvider||pe.getMeterProvider(),o=e.loggerProvider||ss.getLoggerProvider(),a=(n=(t=e.instrumentations)===null||t===void 0?void 0:t.flat())!==null&&n!==void 0?n:[];return qv(a,r,i,o),function(){zv(a)}}function Ei(e){return typeof e=="function"}var tt=console.error.bind(console);function Ge(e,t,n){var r=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}function He(e){e&&e.logger&&(Ei(e.logger)?tt=e.logger:tt("new logger isn't a function, not replacing"))}function us(e,t,n){if(!e||!e[t]){tt("no original function "+t+" to wrap");return}if(!n){tt("no wrapper function"),tt(new Error().stack);return}if(!Ei(e[t])||!Ei(n)){tt("original object and wrapper must be functions");return}var r=e[t],i=n(r,t);return Ge(i,"__original",r),Ge(i,"__unwrap",function(){e[t]===i&&Ge(e,t,r)}),Ge(i,"__wrapped",!0),Ge(e,t,i),i}function Kv(e,t,n){if(e)Array.isArray(e)||(e=[e]);else{tt("must provide one or more modules to patch"),tt(new Error().stack);return}if(!(t&&Array.isArray(t))){tt("must provide one or more functions to wrap on modules");return}e.forEach(function(r){t.forEach(function(i){us(r,i,n)})})}function cs(e,t){if(!e||!e[t]){tt("no function to unwrap."),tt(new Error().stack);return}if(!e[t].__unwrap)tt("no original to unwrap to -- has "+t+" already been unwrapped?");else return e[t].__unwrap()}function Wv(e,t){if(e)Array.isArray(e)||(e=[e]);else{tt("must provide one or more modules to patch"),tt(new Error().stack);return}if(!(t&&Array.isArray(t))){tt("must provide one or more functions to unwrap on modules");return}e.forEach(function(n){t.forEach(function(r){cs(n,r)})})}He.wrap=us,He.massWrap=Kv,He.unwrap=cs,He.massUnwrap=Wv;var K=He,bi=function(){return bi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},bi.apply(this,arguments)},Yv=function(){function e(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this._config={},this._wrap=K.wrap,this._unwrap=K.unwrap,this._massWrap=K.massWrap,this._massUnwrap=K.massUnwrap,this.setConfig(r),this._diag=b.createComponentLogger({namespace:t}),this._tracer=k.getTracer(t,n),this._meter=pe.getMeter(t,n),this._logger=ss.getLogger(t,n),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var t,n=(t=this.init())!==null&&t!==void 0?t:[];return Array.isArray(n)?n:[n]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(t){this._config=bi({enabled:!0},t)},e.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(t,n,r,i){if(t)try{t(r,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},e}(),Jv=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ls=function(e){Jv(t,e);function t(n,r,i){var o=e.call(this,n,r,i)||this;return o._config.enabled&&o.enable(),o}return t}(Yv);function et(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}var Un=performance,Qv="traceparent",ps=Rn("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Zv(e){return e.setValue(ps,!0)}function Ti(e){return e.getValue(ps)===!0}var ty="=",Si=";",wi=",",Oi="baggage",ey=180,ny=4096,ry=8192,iy=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function oy(e){return e.reduce(function(t,n){var r=""+t+(t!==""?wi:"")+n;return r.length>ry?t:r},"")}function ay(e){return e.getAllEntries().map(function(t){var n=iy(t,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=Si+i.metadata.toString()),o})}function sy(e){var t=e.split(Si);if(!(t.length<=0)){var n=t.shift();if(n){var r=n.indexOf(ty);if(!(r<=0)){var i=decodeURIComponent(n.substring(0,r).trim()),o=decodeURIComponent(n.substring(r+1).trim()),a;return t.length>0&&(a=Pa(t.join(Si))),{key:i,value:o,metadata:a}}}}}var uy=function(){function e(){}return e.prototype.inject=function(t,n,r){var i=Z.getBaggage(t);if(!(!i||Ti(t))){var o=ay(i).filter(function(u){return u.length<=ny}).slice(0,ey),a=oy(o);a.length>0&&r.set(n,Oi,a)}},e.prototype.extract=function(t,n,r){var i=r.get(n,Oi),o=Array.isArray(i)?i.join(wi):i;if(!o)return t;var a={};if(o.length===0)return t;var u=o.split(wi);return u.forEach(function(c){var s=sy(c);if(s){var l={value:s.value};s.metadata&&(l.metadata=s.metadata),a[s.key]=l}}),Object.entries(a).length===0?t:Z.setBaggage(t,Z.createBaggage(a))},e.prototype.fields=function(){return[Oi]},e}(),fs=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},cy=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function jn(e){var t,n,r={};if(typeof e!="object"||e==null)return r;try{for(var i=fs(Object.entries(e)),o=i.next();!o.done;o=i.next()){var a=cy(o.value,2),u=a[0],c=a[1];if(!ly(u)){b.warn("Invalid attribute key: "+u);continue}if(!hs(c)){b.warn("Invalid attribute value set for key: "+u);continue}Array.isArray(c)?r[u]=c.slice():r[u]=c}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function ly(e){return typeof e=="string"&&e.length>0}function hs(e){return e==null?!0:Array.isArray(e)?py(e):ds(e)}function py(e){var t,n,r;try{for(var i=fs(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(a!=null){if(!r){if(ds(a)){r=typeof a;continue}return!1}if(typeof a!==r)return!1}}}catch(u){t={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return!0}function ds(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}function fy(){return function(e){b.error(hy(e))}}function hy(e){return typeof e=="string"?e:JSON.stringify(dy(e))}function dy(e){for(var t={},n=e;n!==null;)Object.getOwnPropertyNames(n).forEach(function(r){if(!t[r]){var i=n[r];i&&(t[r]=String(i))}}),n=Object.getPrototypeOf(n);return t}var vy=fy();function he(e){try{vy(e)}catch{}}var ht;(function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"})(ht||(ht={}));var yy=",",gy=["OTEL_SDK_DISABLED"];function my(e){return gy.indexOf(e)>-1}var _y=["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"];function Ey(e){return _y.indexOf(e)>-1}var by=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function Ty(e){return by.indexOf(e)>-1}var Bn=1/0,$n=128,Sy=128,wy=128,vs={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:D.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:Bn,OTEL_ATTRIBUTE_COUNT_LIMIT:$n,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Bn,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:$n,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Bn,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:$n,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:Sy,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:wy,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ht.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",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function Oy(e,t,n){if(typeof n[e]<"u"){var r=String(n[e]);t[e]=r.toLowerCase()==="true"}}function Ly(e,t,n,r,i){if(r===void 0&&(r=-1/0),i===void 0&&(i=1/0),typeof n[e]<"u"){var o=Number(n[e]);isNaN(o)||(o<r?t[e]=r:o>i?t[e]=i:t[e]=o)}}function Ay(e,t,n,r){r===void 0&&(r=yy);var i=n[e];typeof i=="string"&&(t[e]=i.split(r).map(function(o){return o.trim()}))}var Ry={ALL:D.ALL,VERBOSE:D.VERBOSE,DEBUG:D.DEBUG,INFO:D.INFO,WARN:D.WARN,ERROR:D.ERROR,NONE:D.NONE};function Cy(e,t,n){var r=n[e];if(typeof r=="string"){var i=Ry[r.toUpperCase()];i!=null&&(t[e]=i)}}function ys(e){var t={};for(var n in vs){var r=n;switch(r){case"OTEL_LOG_LEVEL":Cy(r,t,e);break;default:if(my(r))Oy(r,t,e);else if(Ey(r))Ly(r,t,e);else if(Ty(r))Ay(r,t,e);else{var i=e[r];typeof i<"u"&&i!==null&&(t[r]=String(i))}}}return t}var gs=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function qe(){var e=ys(gs);return Object.assign({},vs,e)}function xy(){return ys(gs)}var de=performance,Py="1.30.1",Ny="exception.type",Iy="exception.message",ky="exception.stacktrace",My="http.response_content_length",Dy="http.response_content_length_uncompressed",Li=Ny,Ai=Iy,Uy=ky,jy=My,By=Dy,$y="process.runtime.name",Fy="service.name",Vy="telemetry.sdk.name",Gy="telemetry.sdk.language",Hy="telemetry.sdk.version",qy=$y,zy=Fy,Ri=Vy,Ci=Gy,xi=Hy,Xy="webjs",Ky=Xy,ve,Pi=(ve={},ve[Ri]="opentelemetry",ve[qy]="browser",ve[Ci]=Ky,ve[xi]=Py,ve),Wy=9,Yy=6,Jy=Math.pow(10,Yy),Fn=Math.pow(10,Wy);function At(e){var t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*Jy);return[n,r]}function Ni(){var e=de.timeOrigin;if(typeof e!="number"){var t=de;e=t.timing&&t.timing.fetchStart}return e}function ms(e){var t=At(Ni()),n=At(typeof e=="number"?e:de.now());return Es(t,n)}function ze(e){if(Ii(e))return e;if(typeof e=="number")return e<Ni()?ms(e):At(e);if(e instanceof Date)return At(e.getTime());throw TypeError("Invalid input type")}function Qy(e,t){var n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=Fn),[n,r]}function Rt(e){return e[0]*Fn+e[1]}function Ii(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}function _s(e){return Ii(e)||typeof e=="number"||e instanceof Date}function Es(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=Fn&&(n[1]-=Fn,n[0]+=1),n}var ki;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(ki||(ki={}));var Zy=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},tg=function(){function e(t){t===void 0&&(t={});var n;this._propagators=(n=t.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,i){return r.concat(i)},[])))}return e.prototype.inject=function(t,n,r){var i,o;try{for(var a=Zy(this._propagators),u=a.next();!u.done;u=a.next()){var c=u.value;try{c.inject(t,n,r)}catch(s){b.warn("Failed to inject with "+c.constructor.name+". Err: "+s.message)}}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}},e.prototype.extract=function(t,n,r){return this._propagators.reduce(function(i,o){try{return o.extract(i,n,r)}catch(a){b.warn("Failed to extract with "+o.constructor.name+". Err: "+a.message)}return i},t)},e.prototype.fields=function(){return this._fields.slice()},e}(),Mi="[_0-9a-z-*/]",eg="[a-z]"+Mi+"{0,255}",ng="[a-z0-9]"+Mi+"{0,240}@[a-z]"+Mi+"{0,13}",rg=new RegExp("^(?:"+eg+"|"+ng+")$"),ig=/^[ -~]{0,255}[!-~]$/,og=/,|=/;function ag(e){return rg.test(e)}function sg(e){return ig.test(e)&&!og.test(e)}var bs=32,ug=512,Ts=",",Ss="=",cg=function(){function e(t){this._internalState=new Map,t&&this._parse(t)}return e.prototype.set=function(t,n){var r=this._clone();return r._internalState.has(t)&&r._internalState.delete(t),r._internalState.set(t,n),r},e.prototype.unset=function(t){var n=this._clone();return n._internalState.delete(t),n},e.prototype.get=function(t){return this._internalState.get(t)},e.prototype.serialize=function(){var t=this;return this._keys().reduce(function(n,r){return n.push(r+Ss+t.get(r)),n},[]).join(Ts)},e.prototype._parse=function(t){t.length>ug||(this._internalState=t.split(Ts).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(Ss);if(o!==-1){var a=i.slice(0,o),u=i.slice(o+1,r.length);ag(a)&&sg(u)&&n.set(a,u)}return n},new Map),this._internalState.size>bs&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,bs))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),Di="traceparent",Ui="tracestate",lg="00",pg="(?!ff)[\\da-f]{2}",fg="(?![0]{32})[\\da-f]{32}",hg="(?![0]{16})[\\da-f]{16}",dg="[\\da-f]{2}",vg=new RegExp("^\\s?("+pg+")-("+fg+")-("+hg+")-("+dg+")(-.*)?\\s?$");function yg(e){var t=vg.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var gg=function(){function e(){}return e.prototype.inject=function(t,n,r){var i=k.getSpanContext(t);if(!(!i||Ti(t)||!je(i))){var o=lg+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||ft.NONE).toString(16);r.set(n,Di,o),i.traceState&&r.set(n,Ui,i.traceState.serialize())}},e.prototype.extract=function(t,n,r){var i=r.get(n,Di);if(!i)return t;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return t;var a=yg(o);if(!a)return t;a.isRemote=!0;var u=r.get(n,Ui);if(u){var c=Array.isArray(u)?u.join(","):u;a.traceState=new cg(typeof c=="string"?c:void 0)}return k.setSpanContext(t,a)},e.prototype.fields=function(){return[Di,Ui]},e}(),mg="[object Object]",_g="[object Null]",Eg="[object Undefined]",bg=Function.prototype,ws=bg.toString,Tg=ws.call(Object),Sg=wg(Object.getPrototypeOf,Object),Os=Object.prototype,Ls=Os.hasOwnProperty,Vt=Symbol?Symbol.toStringTag:void 0,As=Os.toString;function wg(e,t){return function(n){return e(t(n))}}function Rs(e){if(!Og(e)||Lg(e)!==mg)return!1;var t=Sg(e);if(t===null)return!0;var n=Ls.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ws.call(n)===Tg}function Og(e){return e!=null&&typeof e=="object"}function Lg(e){return e==null?e===void 0?Eg:_g:Vt&&Vt in Object(e)?Ag(e):Rg(e)}function Ag(e){var t=Ls.call(e,Vt),n=e[Vt],r=!1;try{e[Vt]=void 0,r=!0}catch{}var i=As.call(e);return r&&(t?e[Vt]=n:delete e[Vt]),i}function Rg(e){return As.call(e)}var Cg=20;function xg(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e.shift(),r=new WeakMap;e.length>0;)n=Cs(n,e.shift(),0,r);return n}function ji(e){return Vn(e)?e.slice():e}function Cs(e,t,n,r){n===void 0&&(n=0);var i;if(!(n>Cg)){if(n++,Gn(e)||Gn(t)||Ps(t))i=ji(t);else if(Vn(e)){if(i=e.slice(),Vn(t))for(var o=0,a=t.length;o<a;o++)i.push(ji(t[o]));else if(Xe(t))for(var u=Object.keys(t),o=0,a=u.length;o<a;o++){var c=u[o];i[c]=ji(t[c])}}else if(Xe(e))if(Xe(t)){if(!Pg(e,t))return t;i=Object.assign({},e);for(var u=Object.keys(t),o=0,a=u.length;o<a;o++){var c=u[o],s=t[c];if(Gn(s))typeof s>"u"?delete i[c]:i[c]=s;else{var l=i[c],p=s;if(xs(e,c,r)||xs(t,c,r))delete i[c];else{if(Xe(l)&&Xe(p)){var f=r.get(l)||[],v=r.get(p)||[];f.push({obj:e,key:c}),v.push({obj:t,key:c}),r.set(l,f),r.set(p,v)}i[c]=Cs(i[c],s,n,r)}}}}else i=t;return i}}function xs(e,t,n){for(var r=n.get(e[t])||[],i=0,o=r.length;i<o;i++){var a=r[i];if(a.key===t&&a.obj===e)return!0}return!1}function Vn(e){return Array.isArray(e)}function Ps(e){return typeof e=="function"}function Xe(e){return!Gn(e)&&!Vn(e)&&!Ps(e)&&typeof e=="object"}function Gn(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function Pg(e,t){return!(!Rs(e)||!Rs(t))}function Ng(e,t){return typeof t=="string"?e===t:!!e.match(t)}var Ig=function(){function e(){var t=this;this._promise=new Promise(function(n,r){t._resolve=n,t._reject=r})}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(t){this._resolve(t)},e.prototype.reject=function(t){this._reject(t)},e}(),kg=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Mg=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Dg=function(){function e(t,n){this._callback=t,this._that=n,this._isCalled=!1,this._deferred=new Ig}return Object.defineProperty(e.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),e.prototype.call=function(){for(var t,n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((t=this._callback).call.apply(t,Mg([this._that],kg(r),!1))).then(function(o){return n._deferred.resolve(o)},function(o){return n._deferred.reject(o)})}catch(o){this._deferred.reject(o)}}return this._deferred.promise},e}(),Ug="exception",Bi=function(){return Bi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Bi.apply(this,arguments)},jg=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ns=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Bg=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},$g=function(){function e(t,n,r,i,o,a,u,c,s,l){u===void 0&&(u=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:Nn.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=r,this._spanContext=i,this.parentSpanId=a,this.kind=o,this.links=u;var p=Date.now();this._performanceStartTime=de.now(),this._performanceOffset=p-(this._performanceStartTime+Ni()),this._startTimeProvided=c!=null,this.startTime=this._getTime(c??p),this.resource=t.resource,this.instrumentationLibrary=t.instrumentationLibrary,this._spanLimits=t.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,l!=null&&this.setAttributes(l),this._spanProcessor=t.getActiveSpanProcessor(),this._spanProcessor.onStart(this,n)}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,n){return n==null||this._isSpanEnded()?this:t.length===0?(b.warn("Invalid attribute key: "+t),this):hs(n)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?(this._droppedAttributesCount++,this):(this.attributes[t]=this._truncateToSize(n),this):(b.warn("Invalid attribute value set for key: "+t),this)},e.prototype.setAttributes=function(t){var n,r;try{for(var i=jg(Object.entries(t)),o=i.next();!o.done;o=i.next()){var a=Ns(o.value,2),u=a[0],c=a[1];this.setAttribute(u,c)}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return this},e.prototype.addEvent=function(t,n,r){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return b.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&b.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),_s(n)&&(_s(r)||(r=n),n=void 0);var i=jn(n);return this.events.push({name:t,attributes:i,time:this._getTime(r),droppedAttributesCount:0}),this},e.prototype.addLink=function(t){return this.links.push(t),this},e.prototype.addLinks=function(t){var n;return(n=this.links).push.apply(n,Bg([],Ns(t),!1)),this},e.prototype.setStatus=function(t){return this._isSpanEnded()?this:(this.status=Bi({},t),this.status.message!=null&&typeof t.message!="string"&&(b.warn("Dropping invalid status.message of type '"+typeof t.message+"', expected 'string'"),delete this.status.message),this)},e.prototype.updateName=function(t){return this._isSpanEnded()?this:(this.name=t,this)},e.prototype.end=function(t){if(this._isSpanEnded()){b.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once.");return}this._ended=!0,this.endTime=this._getTime(t),this._duration=Qy(this.startTime,this.endTime),this._duration[0]<0&&(b.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&b.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},e.prototype._getTime=function(t){if(typeof t=="number"&&t<=de.now())return ms(t+this._performanceOffset);if(typeof t=="number")return At(t);if(t instanceof Date)return At(t.getTime());if(Ii(t))return t;if(this._startTimeProvided)return At(Date.now());var n=de.now()-this._performanceStartTime;return Es(this.startTime,At(n))},e.prototype.isRecording=function(){return this._ended===!1},e.prototype.recordException=function(t,n){var r={};typeof t=="string"?r[Ai]=t:t&&(t.code?r[Li]=t.code.toString():t.name&&(r[Li]=t.name),t.message&&(r[Ai]=t.message),t.stack&&(r[Uy]=t.stack)),r[Li]||r[Ai]?this.addEvent(Ug,r,n):b.warn("Failed to record an exception "+t)},Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),e.prototype._isSpanEnded=function(){return this._ended&&b.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},e.prototype._truncateToLimitUtil=function(t,n){return t.length<=n?t:t.substring(0,n)},e.prototype._truncateToSize=function(t){var n=this,r=this._attributeValueLengthLimit;return r<=0?(b.warn("Attribute value limit must be positive, got "+r),t):typeof t=="string"?this._truncateToLimitUtil(t,r):Array.isArray(t)?t.map(function(i){return typeof i=="string"?n._truncateToLimitUtil(i,r):i}):t},e}(),ye;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ye||(ye={}));var Hn=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:ye.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),ge=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:ye.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),$i=function(){function e(t){var n,r,i,o;this._root=t.root,this._root||(he(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new ge),this._remoteParentSampled=(n=t.remoteParentSampled)!==null&&n!==void 0?n:new ge,this._remoteParentNotSampled=(r=t.remoteParentNotSampled)!==null&&r!==void 0?r:new Hn,this._localParentSampled=(i=t.localParentSampled)!==null&&i!==void 0?i:new ge,this._localParentNotSampled=(o=t.localParentNotSampled)!==null&&o!==void 0?o:new Hn}return e.prototype.shouldSample=function(t,n,r,i,o,a){var u=k.getSpanContext(t);return!u||!je(u)?this._root.shouldSample(t,n,r,i,o,a):u.isRemote?u.traceFlags&ft.SAMPLED?this._remoteParentSampled.shouldSample(t,n,r,i,o,a):this._remoteParentNotSampled.shouldSample(t,n,r,i,o,a):u.traceFlags&ft.SAMPLED?this._localParentSampled.shouldSample(t,n,r,i,o,a):this._localParentNotSampled.shouldSample(t,n,r,i,o,a)},e.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()+"}"},e}(),Is=function(){function e(t){t===void 0&&(t=0),this._ratio=t,this._ratio=this._normalize(t),this._upperBound=Math.floor(this._ratio*4294967295)}return e.prototype.shouldSample=function(t,n){return{decision:Ua(n)&&this._accumulate(n)<this._upperBound?ye.RECORD_AND_SAMPLED:ye.NOT_RECORD}},e.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},e.prototype._normalize=function(t){return typeof t!="number"||isNaN(t)?0:t>=1?1:t<=0?0:t},e.prototype._accumulate=function(t){for(var n=0,r=0;r<t.length/8;r++){var i=r*8,o=parseInt(t.slice(i,i+8),16);n=(n^o)>>>0}return n},e}(),Fg=ht.AlwaysOn,me=1;function ks(){var e=qe();return{sampler:Ms(e),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:e.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:e.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:e.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:e.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:e.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:e.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:e.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:e.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function Ms(e){switch(e===void 0&&(e=qe()),e.OTEL_TRACES_SAMPLER){case ht.AlwaysOn:return new ge;case ht.AlwaysOff:return new Hn;case ht.ParentBasedAlwaysOn:return new $i({root:new ge});case ht.ParentBasedAlwaysOff:return new $i({root:new Hn});case ht.TraceIdRatio:return new Is(Ds(e));case ht.ParentBasedTraceIdRatio:return new $i({root:new Is(Ds(e))});default:return b.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Fg+'".'),new ge}}function Ds(e){if(e.OTEL_TRACES_SAMPLER_ARG===void 0||e.OTEL_TRACES_SAMPLER_ARG==="")return b.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+me+"."),me;var t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(b.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+me+"."),me):t<0||t>1?(b.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+me+"."),me):t}function Vg(e){var t={sampler:Ms()},n=ks(),r=Object.assign({},n,t,e);return r.generalLimits=Object.assign({},n.generalLimits,e.generalLimits||{}),r.spanLimits=Object.assign({},n.spanLimits,e.spanLimits||{}),r}function Gg(e){var t,n,r,i,o,a,u,c,s,l,p,f,v=Object.assign({},e.spanLimits),y=xy();return v.attributeCountLimit=(a=(o=(i=(n=(t=e.spanLimits)===null||t===void 0?void 0:t.attributeCountLimit)!==null&&n!==void 0?n:(r=e.generalLimits)===null||r===void 0?void 0:r.attributeCountLimit)!==null&&i!==void 0?i:y.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:y.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&a!==void 0?a:$n,v.attributeValueLengthLimit=(f=(p=(l=(c=(u=e.spanLimits)===null||u===void 0?void 0:u.attributeValueLengthLimit)!==null&&c!==void 0?c:(s=e.generalLimits)===null||s===void 0?void 0:s.attributeValueLengthLimit)!==null&&l!==void 0?l:y.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:y.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&f!==void 0?f:Bn,Object.assign({},e,{spanLimits:v})}var Hg=function(){function e(t,n){this._exporter=t,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var r=qe();this._maxExportBatchSize=typeof n?.maxExportBatchSize=="number"?n.maxExportBatchSize:r.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof n?.maxQueueSize=="number"?n.maxQueueSize:r.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof n?.scheduledDelayMillis=="number"?n.scheduledDelayMillis:r.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof n?.exportTimeoutMillis=="number"?n.exportTimeoutMillis:r.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new Dg(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(b.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},e.prototype.onStart=function(t,n){},e.prototype.onEnd=function(t){this._shutdownOnce.isCalled||(t.spanContext().traceFlags&ft.SAMPLED)!==0&&this._addToBuffer(t)},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){var t=this;return Promise.resolve().then(function(){return t.onShutdown()}).then(function(){return t._flushAll()}).then(function(){return t._exporter.shutdown()})},e.prototype._addToBuffer=function(t){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&b.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(b.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(t),this._maybeStartTimer()},e.prototype._flushAll=function(){var t=this;return new Promise(function(n,r){for(var i=[],o=Math.ceil(t._finishedSpans.length/t._maxExportBatchSize),a=0,u=o;a<u;a++)i.push(t._flushOneBatch());Promise.all(i).then(function(){n()}).catch(r)})},e.prototype._flushOneBatch=function(){var t=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(n,r){var i=setTimeout(function(){r(new Error("Timeout"))},t._exportTimeoutMillis);P.with(Zv(P.active()),function(){var o;t._finishedSpans.length<=t._maxExportBatchSize?(o=t._finishedSpans,t._finishedSpans=[]):o=t._finishedSpans.splice(0,t._maxExportBatchSize);for(var a=function(){return t._exporter.export(o,function(p){var f;clearTimeout(i),p.code===ki.SUCCESS?n():r((f=p.error)!==null&&f!==void 0?f:new Error("BatchSpanProcessor: span export failed"))})},u=null,c=0,s=o.length;c<s;c++){var l=o[c];l.resource.asyncAttributesPending&&l.resource.waitForAsyncAttributes&&(u!=null||(u=[]),u.push(l.resource.waitForAsyncAttributes()))}u===null?a():Promise.all(u).then(a,function(p){he(p),r(p)})})})},e.prototype._maybeStartTimer=function(){var t=this;if(!this._isExporting){var n=function(){t._isExporting=!0,t._flushOneBatch().finally(function(){t._isExporting=!1,t._finishedSpans.length>0&&(t._clearTimer(),t._maybeStartTimer())}).catch(function(r){t._isExporting=!1,he(r)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return n();this._timer===void 0&&(this._timer=setTimeout(function(){return n()},this._scheduledDelayMillis))}},e.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},e}(),qg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Us=function(e){qg(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.onInit(r),i}return t.prototype.onInit=function(n){var r=this;n?.disableAutoFlushOnDocumentHide!==!0&&typeof document<"u"&&(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&r.forceFlush().catch(function(i){he(i)})},this._pageHideListener=function(){r.forceFlush().catch(function(i){he(i)})},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},t.prototype.onShutdown=function(){typeof document<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},t}(Hg),zg=8,Xg=16,Kg=function(){function e(){this.generateTraceId=js(Xg),this.generateSpanId=js(zg)}return e}(),qn=Array(32);function js(e){return function(){for(var t=0;t<e*2;t++)qn[t]=Math.floor(Math.random()*16)+48,qn[t]>=58&&(qn[t]+=39);return String.fromCharCode.apply(null,qn.slice(0,e*2))}}var Wg=function(){function e(t,n,r){this._tracerProvider=r;var i=Vg(n);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=n.idGenerator||new Kg,this.resource=r.resource,this.instrumentationLibrary=t}return e.prototype.startSpan=function(t,n,r){var i,o,a;n===void 0&&(n={}),r===void 0&&(r=P.active()),n.root&&(r=k.deleteSpan(r));var u=k.getSpan(r);if(Ti(r)){b.debug("Instrumentation suppressed, returning Noop Span");var c=k.wrapSpanContext(Ma);return c}var s=u?.spanContext(),l=this._idGenerator.generateSpanId(),p,f,v;!s||!k.isSpanContextValid(s)?p=this._idGenerator.generateTraceId():(p=s.traceId,f=s.traceState,v=s.spanId);var y=(i=n.kind)!==null&&i!==void 0?i:Be.INTERNAL,g=((o=n.links)!==null&&o!==void 0?o:[]).map(function(nt){return{context:nt.context,attributes:jn(nt.attributes)}}),m=jn(n.attributes),E=this._sampler.shouldSample(r,p,t,y,m,g);f=(a=E.traceState)!==null&&a!==void 0?a:f;var S=E.decision===Pn.RECORD_AND_SAMPLED?ft.SAMPLED:ft.NONE,N={traceId:p,spanId:l,traceFlags:S,traceState:f};if(E.decision===Pn.NOT_RECORD){b.debug("Recording is off, propagating context in a non-recording span");var c=k.wrapSpanContext(N);return c}var j=jn(Object.assign(m,E.attributes)),$=new $g(this,r,t,N,y,v,g,n.startTime,void 0,j);return $},e.prototype.startActiveSpan=function(t,n,r,i){var o,a,u;if(!(arguments.length<2)){arguments.length===2?u=n:arguments.length===3?(o=n,u=r):(o=n,a=r,u=i);var c=a??P.active(),s=this.startSpan(t,o,c),l=k.setSpan(c,s);return P.with(l,u,void 0,s)}},e.prototype.getGeneralLimits=function(){return this._generalLimits},e.prototype.getSpanLimits=function(){return this._spanLimits},e.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},e}();function Yg(){return"unknown_service"}var Ct=function(){return Ct=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ct.apply(this,arguments)},Jg=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},Qg=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Zg=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Bs=function(){function e(t,n){var r=this,i;this._attributes=t,this.asyncAttributesPending=n!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=n?.then(function(o){return r._attributes=Object.assign({},r._attributes,o),r.asyncAttributesPending=!1,o},function(o){return b.debug("a resource's async attributes promise rejected: %s",o),r.asyncAttributesPending=!1,{}})}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e((t={},t[zy]=Yg(),t[Ci]=Pi[Ci],t[Ri]=Pi[Ri],t[xi]=Pi[xi],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&b.error("Accessing resource attributes before async attributes settled"),(t=this._attributes)!==null&&t!==void 0?t:{}},enumerable:!1,configurable:!0}),e.prototype.waitForAsyncAttributes=function(){return Jg(this,void 0,void 0,function(){return Qg(this,function(t){switch(t.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},e.prototype.merge=function(t){var n=this,r;if(!t)return this;var i=Ct(Ct({},this._syncAttributes),(r=t._syncAttributes)!==null&&r!==void 0?r:t.attributes);if(!this._asyncAttributesPromise&&!t._asyncAttributesPromise)return new e(i);var o=Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then(function(a){var u,c=Zg(a,2),s=c[0],l=c[1];return Ct(Ct(Ct(Ct({},n._syncAttributes),s),(u=t._syncAttributes)!==null&&u!==void 0?u:t.attributes),l)});return new e(i,o)},e.EMPTY=new e({}),e}(),zn=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},$s=function(){function e(t){this._spanProcessors=t}return e.prototype.forceFlush=function(){var t,n,r=[];try{for(var i=zn(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;r.push(a.forceFlush())}}catch(u){t={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return new Promise(function(u){Promise.all(r).then(function(){u()}).catch(function(c){he(c||new Error("MultiSpanProcessor: forceFlush failed")),u()})})},e.prototype.onStart=function(t,n){var r,i;try{for(var o=zn(this._spanProcessors),a=o.next();!a.done;a=o.next()){var u=a.value;u.onStart(t,n)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},e.prototype.onEnd=function(t){var n,r;try{for(var i=zn(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;a.onEnd(t)}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype.shutdown=function(){var t,n,r=[];try{for(var i=zn(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;r.push(a.shutdown())}}catch(u){t={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return new Promise(function(u,c){Promise.all(r).then(function(){u()},c)})},e}(),tm=function(){function e(){}return e.prototype.onStart=function(t,n){},e.prototype.onEnd=function(t){},e.prototype.shutdown=function(){return Promise.resolve()},e.prototype.forceFlush=function(){return Promise.resolve()},e}(),em=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},nm=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Gt;(function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"})(Gt||(Gt={}));var rm=function(){function e(t){t===void 0&&(t={});var n,r;this._registeredSpanProcessors=[],this._tracers=new Map;var i=xg({},ks(),Gg(t));if(this.resource=(n=i.resource)!==null&&n!==void 0?n:Bs.empty(),i.mergeResourceWithDefaults&&(this.resource=Bs.default().merge(this.resource)),this._config=Object.assign({},i,{resource:this.resource}),!((r=t.spanProcessors)===null||r===void 0)&&r.length)this._registeredSpanProcessors=nm([],em(t.spanProcessors),!1),this.activeSpanProcessor=new $s(this._registeredSpanProcessors);else{var o=this._buildExporterFromEnv();if(o!==void 0){var a=new Us(o);this.activeSpanProcessor=a}else this.activeSpanProcessor=new tm}}return e.prototype.getTracer=function(t,n,r){var i=t+"@"+(n||"")+":"+(r?.schemaUrl||"");return this._tracers.has(i)||this._tracers.set(i,new Wg({name:t,version:n,schemaUrl:r?.schemaUrl},this._config,this)),this._tracers.get(i)},e.prototype.addSpanProcessor=function(t){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(n){return b.error("Error while trying to shutdown current span processor",n)}),this._registeredSpanProcessors.push(t),this.activeSpanProcessor=new $s(this._registeredSpanProcessors)},e.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},e.prototype.register=function(t){t===void 0&&(t={}),k.setGlobalTracerProvider(this),t.propagator===void 0&&(t.propagator=this._buildPropagatorFromEnv()),t.contextManager&&P.setGlobalContextManager(t.contextManager),t.propagator&&Z.setGlobalPropagator(t.propagator)},e.prototype.forceFlush=function(){var t=this._config.forceFlushTimeoutMillis,n=this._registeredSpanProcessors.map(function(r){return new Promise(function(i){var o,a=setTimeout(function(){i(new Error("Span processor did not completed within timeout period of "+t+" ms")),o=Gt.timeout},t);r.forceFlush().then(function(){clearTimeout(a),o!==Gt.timeout&&(o=Gt.resolved,i(o))}).catch(function(u){clearTimeout(a),o=Gt.error,i(u)})})});return new Promise(function(r,i){Promise.all(n).then(function(o){var a=o.filter(function(u){return u!==Gt.resolved});a.length>0?i(a):r()}).catch(function(o){return i([o])})})},e.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},e.prototype._getPropagator=function(t){var n;return(n=this.constructor._registeredPropagators.get(t))===null||n===void 0?void 0:n()},e.prototype._getSpanExporter=function(t){var n;return(n=this.constructor._registeredExporters.get(t))===null||n===void 0?void 0:n()},e.prototype._buildPropagatorFromEnv=function(){var t=this,n=Array.from(new Set(qe().OTEL_PROPAGATORS)),r=n.map(function(o){var a=t._getPropagator(o);return a||b.warn('Propagator "'+o+'" requested through environment variable is unavailable.'),a}),i=r.reduce(function(o,a){return a&&o.push(a),o},[]);if(i.length!==0)return n.length===1?i[0]:new tg({propagators:i})},e.prototype._buildExporterFromEnv=function(){var t=qe().OTEL_TRACES_EXPORTER;if(!(t==="none"||t==="")){var n=this._getSpanExporter(t);return n||b.error('Exporter "'+t+'" requested through environment variable is unavailable.'),n}},e._registeredPropagators=new Map([["tracecontext",function(){return new gg}],["baggage",function(){return new uy}]]),e._registeredExporters=new Map,e}(),im=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},om=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Fs=function(){function e(){this._enabled=!1,this._currentContext=Bt}return e.prototype._bindFunction=function(t,n){t===void 0&&(t=Bt);var r=this,i=function(){for(var o=this,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return r.with(t,function(){return n.apply(o,a)})};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:n.length}),i},e.prototype.active=function(){return this._currentContext},e.prototype.bind=function(t,n){return t===void 0&&(t=this.active()),typeof n=="function"?this._bindFunction(t,n):n},e.prototype.disable=function(){return this._currentContext=Bt,this._enabled=!1,this},e.prototype.enable=function(){return this._enabled?this:(this._enabled=!0,this._currentContext=Bt,this)},e.prototype.with=function(t,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var a=this._currentContext;this._currentContext=t||Bt;try{return n.call.apply(n,om([r],im(i),!1))}finally{this._currentContext=a}},e}(),am=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),sm=function(e){am(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,n)||this;if(n.contextManager)throw"contextManager should be defined in register method not in constructor";if(n.propagator)throw"propagator should be defined in register method not in constructor";return r}return t.prototype.register=function(n){n===void 0&&(n={}),n.contextManager===void 0&&(n.contextManager=new Fs),n.contextManager&&n.contextManager.enable(),e.prototype.register.call(this,n)},t}(rm),O;(function(e){e.CONNECT_END="connectEnd",e.CONNECT_START="connectStart",e.DECODED_BODY_SIZE="decodedBodySize",e.DOM_COMPLETE="domComplete",e.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",e.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",e.DOM_INTERACTIVE="domInteractive",e.DOMAIN_LOOKUP_END="domainLookupEnd",e.DOMAIN_LOOKUP_START="domainLookupStart",e.ENCODED_BODY_SIZE="encodedBodySize",e.FETCH_START="fetchStart",e.LOAD_EVENT_END="loadEventEnd",e.LOAD_EVENT_START="loadEventStart",e.NAVIGATION_START="navigationStart",e.REDIRECT_END="redirectEnd",e.REDIRECT_START="redirectStart",e.REQUEST_START="requestStart",e.RESPONSE_END="responseEnd",e.RESPONSE_START="responseStart",e.SECURE_CONNECTION_START="secureConnectionStart",e.UNLOAD_EVENT_END="unloadEventEnd",e.UNLOAD_EVENT_START="unloadEventStart"})(O||(O={}));var Fi;function um(){return Fi||(Fi=document.createElement("a")),Fi}function xt(e,t){return t in e}function q(e,t,n,r){var i=void 0,o=void 0;xt(n,t)&&typeof n[t]=="number"&&(i=n[t]);var a=O.FETCH_START;if(xt(n,a)&&typeof n[a]=="number"&&(o=n[a]),i!==void 0&&o!==void 0&&i>=o)return e.addEvent(t,i),e}function _e(e,t,n){n===void 0&&(n=!1),n||(q(e,O.FETCH_START,t),q(e,O.DOMAIN_LOOKUP_START,t),q(e,O.DOMAIN_LOOKUP_END,t),q(e,O.CONNECT_START,t),xt(t,"name")&&t.name.startsWith("https:")&&q(e,O.SECURE_CONNECTION_START,t),q(e,O.CONNECT_END,t),q(e,O.REQUEST_START,t),q(e,O.RESPONSE_START,t),q(e,O.RESPONSE_END,t));var r=t[O.ENCODED_BODY_SIZE];r!==void 0&&e.setAttribute(jy,r);var i=t[O.DECODED_BODY_SIZE];i!==void 0&&r!==i&&e.setAttribute(By,i)}function cm(e){return e.slice().sort(function(t,n){var r=t[O.FETCH_START],i=n[O.FETCH_START];return r>i?1:r<i?-1:0})}function Vs(){return typeof location<"u"?location.origin:void 0}function Gs(e,t,n,r,i,o){i===void 0&&(i=new WeakSet);var a=mt(e);e=a.toString();var u=pm(e,t,n,r,i,o);if(u.length===0)return{mainRequest:void 0};if(u.length===1)return{mainRequest:u[0]};var c=cm(u);if(a.origin!==Vs()&&c.length>1){var s=c[0],l=lm(c,s[O.RESPONSE_END],n),p=s[O.RESPONSE_END],f=l[O.FETCH_START];return f<p&&(l=s,s=void 0),{corsPreFlightRequest:s,mainRequest:l}}else return{mainRequest:u[0]}}function lm(e,t,n){for(var r=Rt(n),i=Rt(ze(t)),o=e[1],a,u=e.length,c=1;c<u;c++){var s=e[c],l=Rt(ze(s[O.FETCH_START])),p=Rt(ze(s[O.RESPONSE_END])),f=r-p;l>=i&&(!a||f<a)&&(a=f,o=s)}return o}function pm(e,t,n,r,i,o){var a=Rt(t),u=Rt(n),c=r.filter(function(s){var l=Rt(ze(s[O.FETCH_START])),p=Rt(ze(s[O.RESPONSE_END]));return s.initiatorType.toLowerCase()===(o||"xmlhttprequest")&&s.name===e&&l>=a&&p<=u});return c.length>0&&(c=c.filter(function(s){return!i.has(s)})),c}function mt(e){if(typeof URL=="function")return new URL(e,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);var t=um();return t.href=e,t}function Hs(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return"/";var n=hm(e,t);if(t&&n.indexOf("@id")>0)return n;var r="";return e.parentNode&&(r+=Hs(e.parentNode,!1)),r+=n,r}function fm(e){if(!e.parentNode)return 0;var t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);var n=Array.from(e.parentNode.childNodes);return n=n.filter(function(r){var i=r.localName;return t.indexOf(r.nodeType)>=0&&i===e.localName}),n.length>=1?n.indexOf(e)+1:0}function hm(e,t){var n=e.nodeType,r=fm(e),i="";if(n===Node.ELEMENT_NODE){var o=e.getAttribute("id");if(t&&o)return'//*[@id="'+o+'"]';i=e.localName}else if(n===Node.TEXT_NODE||n===Node.CDATA_SECTION_NODE)i="text()";else if(n===Node.COMMENT_NODE)i="comment()";else return"";return i&&r>1?"/"+i+"["+r+"]":"/"+i}function qs(e,t){var n=t||[];(typeof n=="string"||n instanceof RegExp)&&(n=[n]);var r=mt(e);return r.origin===Vs()?!0:n.some(function(i){return Ng(e,i)})}var zs=function(){function e(){}return e.prototype.emit=function(t){},e}(),dm=new zs,vm=function(){function e(){}return e.prototype.getLogger=function(t,n,r){return new zs},e}(),Xs=new vm,ym=function(){function e(t,n,r,i){this._provider=t,this.name=n,this.version=r,this.options=i}return e.prototype.emit=function(t){this._getLogger().emit(t)},e.prototype._getLogger=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):dm},e}(),Ks=function(){function e(){}return e.prototype.getLogger=function(t,n,r){var i;return(i=this.getDelegateLogger(t,n,r))!==null&&i!==void 0?i:new ym(this,t,n,r)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Xs},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateLogger=function(t,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(t,n,r)},e}(),gm=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Xn=Symbol.for("io.opentelemetry.js.api.logs"),Ke=gm;function mm(e,t,n){return function(r){return r===e?t:n}}var Ws=1,_m=function(){function e(){this._proxyLoggerProvider=new Ks}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(t){return Ke[Xn]?this.getLoggerProvider():(Ke[Xn]=mm(Ws,t,Xs),this._proxyLoggerProvider.setDelegate(t),t)},e.prototype.getLoggerProvider=function(){var t,n;return(n=(t=Ke[Xn])===null||t===void 0?void 0:t.call(Ke,Ws))!==null&&n!==void 0?n:this._proxyLoggerProvider},e.prototype.getLogger=function(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)},e.prototype.disable=function(){delete Ke[Xn],this._proxyLoggerProvider=new Ks},e}(),Em=_m.getInstance(),Vi=function(){return Vi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Vi.apply(this,arguments)},bm=function(){function e(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this._config={},this._wrap=K.wrap,this._unwrap=K.unwrap,this._massWrap=K.massWrap,this._massUnwrap=K.massUnwrap,this.setConfig(r),this._diag=b.createComponentLogger({namespace:t}),this._tracer=k.getTracer(t,n),this._meter=pe.getMeter(t,n),this._logger=Em.getLogger(t,n),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var t,n=(t=this.init())!==null&&t!==void 0?t:[];return Array.isArray(n)?n:[n]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(t){this._config=Vi({enabled:!0},t)},e.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(t,n,r,i){if(t)try{t(r,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},e}(),Tm=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sm=function(e){Tm(t,e);function t(n,r,i){var o=e.call(this,n,r,i)||this;return o._config.enabled&&o.enable(),o}return t}(bm);function Ys(e,t,n){var r,i;try{i=e()}catch(o){r=o}finally{return t(r,i),i}}var We;(function(e){e.DOCUMENT_LOAD="documentLoad",e.DOCUMENT_FETCH="documentFetch",e.RESOURCE_FETCH="resourceFetch"})(We||(We={}));var wm="0.44.0",Om="@opentelemetry/instrumentation-document-load";const Lm="http.url",Am="http.user_agent",Ee=Lm,Rm=Am;var Kn;(function(e){e.FIRST_PAINT="firstPaint",e.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(Kn||(Kn={}));var Cm=function(){var e,t,n={},r=(t=(e=Un).getEntriesByType)===null||t===void 0?void 0:t.call(e,"navigation")[0];if(r){var i=Object.values(O);i.forEach(function(u){if(xt(r,u)){var c=r[u];typeof c=="number"&&(n[u]=c)}})}else{var o=Un,a=o.timing;if(a){var i=Object.values(O);i.forEach(function(c){if(xt(a,c)){var s=a[c];typeof s=="number"&&(n[c]=s)}})}}return n},Js={"first-paint":Kn.FIRST_PAINT,"first-contentful-paint":Kn.FIRST_CONTENTFUL_PAINT},xm=function(e){var t,n,r=(n=(t=Un).getEntriesByType)===null||n===void 0?void 0:n.call(t,"paint");r&&r.forEach(function(i){var o=i.name,a=i.startTime;xt(Js,o)&&e.addEvent(Js[o],a)})},Pm=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nm=function(e){Pm(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,Om,wm,n)||this;return r.component="document-load",r.version="1",r.moduleName=r.component,r}return t.prototype.init=function(){},t.prototype._onDocumentLoaded=function(){var n=this;window.setTimeout(function(){n._collectPerformance()})},t.prototype._addResourcesSpans=function(n){var r=this,i,o,a=(o=(i=Un).getEntriesByType)===null||o===void 0?void 0:o.call(i,"resource");a&&a.forEach(function(u){r._initResourceSpan(u,n)})},t.prototype._collectPerformance=function(){var n=this,r=Array.from(document.getElementsByTagName("meta")).find(function(a){return a.getAttribute("name")===Qv}),i=Cm(),o=r&&r.content||"";P.with(Z.extract(Bt,{traceparent:o}),function(){var a,u=n._startSpan(We.DOCUMENT_LOAD,O.FETCH_START,i);u&&(P.with(k.setSpan(P.active(),u),function(){var c=n._startSpan(We.DOCUMENT_FETCH,O.FETCH_START,i);c&&(c.setAttribute(Ee,location.href),P.with(k.setSpan(P.active(),c),function(){var s;n.getConfig().ignoreNetworkEvents||_e(c,i),n._addCustomAttributesOnSpan(c,(s=n.getConfig().applyCustomAttributesOnSpan)===null||s===void 0?void 0:s.documentFetch),n._endSpan(c,O.RESPONSE_END,i)}))}),u.setAttribute(Ee,location.href),u.setAttribute(Rm,navigator.userAgent),n._addResourcesSpans(u),n.getConfig().ignoreNetworkEvents||(q(u,O.FETCH_START,i),q(u,O.UNLOAD_EVENT_START,i),q(u,O.UNLOAD_EVENT_END,i),q(u,O.DOM_INTERACTIVE,i),q(u,O.DOM_CONTENT_LOADED_EVENT_START,i),q(u,O.DOM_CONTENT_LOADED_EVENT_END,i),q(u,O.DOM_COMPLETE,i),q(u,O.LOAD_EVENT_START,i),q(u,O.LOAD_EVENT_END,i)),n.getConfig().ignorePerformancePaintEvents||xm(u),n._addCustomAttributesOnSpan(u,(a=n.getConfig().applyCustomAttributesOnSpan)===null||a===void 0?void 0:a.documentLoad),n._endSpan(u,O.LOAD_EVENT_END,i))})},t.prototype._endSpan=function(n,r,i){n&&(xt(i,r)?n.end(i[r]):n.end())},t.prototype._initResourceSpan=function(n,r){var i,o=this._startSpan(We.RESOURCE_FETCH,O.FETCH_START,n,r);o&&(o.setAttribute(Ee,n.name),this.getConfig().ignoreNetworkEvents||_e(o,n),this._addCustomAttributesOnResourceSpan(o,n,(i=this.getConfig().applyCustomAttributesOnSpan)===null||i===void 0?void 0:i.resourceFetch),this._endSpan(o,O.RESPONSE_END,n))},t.prototype._startSpan=function(n,r,i,o){if(xt(i,r)&&typeof i[r]=="number"){var a=this.tracer.startSpan(n,{startTime:i[r]},o?k.setSpan(P.active(),o):void 0);return a}},t.prototype._waitForPageLoad=function(){window.document.readyState==="complete"?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded))},t.prototype._addCustomAttributesOnSpan=function(n,r){var i=this;r&&Ys(function(){return r(n)},function(o){o&&i._diag.error("addCustomAttributesOnSpan",o)})},t.prototype._addCustomAttributesOnResourceSpan=function(n,r,i){var o=this;i&&Ys(function(){return i(n,r)},function(a){a&&o._diag.error("addCustomAttributesOnResourceSpan",a)})},t.prototype.enable=function(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()},t.prototype.disable=function(){window.removeEventListener("load",this._onDocumentLoaded)},t}(Sm),Qs=function(){function e(){}return e.prototype.emit=function(t){},e}(),Im=new Qs,km=function(){function e(){}return e.prototype.getLogger=function(t,n,r){return new Qs},e}(),Zs=new km,Mm=function(){function e(t,n,r,i){this._provider=t,this.name=n,this.version=r,this.options=i}return e.prototype.emit=function(t){this._getLogger().emit(t)},e.prototype._getLogger=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):Im},e}(),tu=function(){function e(){}return e.prototype.getLogger=function(t,n,r){var i;return(i=this.getDelegateLogger(t,n,r))!==null&&i!==void 0?i:new Mm(this,t,n,r)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Zs},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateLogger=function(t,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(t,n,r)},e}(),Dm=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Wn=Symbol.for("io.opentelemetry.js.api.logs"),Ye=Dm;function Um(e,t,n){return function(r){return r===e?t:n}}var eu=1,jm=function(){function e(){this._proxyLoggerProvider=new tu}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(t){return Ye[Wn]?this.getLoggerProvider():(Ye[Wn]=Um(eu,t,Zs),this._proxyLoggerProvider.setDelegate(t),t)},e.prototype.getLoggerProvider=function(){var t,n;return(n=(t=Ye[Wn])===null||t===void 0?void 0:t.call(Ye,eu))!==null&&n!==void 0?n:this._proxyLoggerProvider},e.prototype.getLogger=function(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)},e.prototype.disable=function(){delete Ye[Wn],this._proxyLoggerProvider=new tu},e}(),Bm=jm.getInstance(),Gi=function(){return Gi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Gi.apply(this,arguments)},$m=function(){function e(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this._config={},this._wrap=K.wrap,this._unwrap=K.unwrap,this._massWrap=K.massWrap,this._massUnwrap=K.massUnwrap,this.setConfig(r),this._diag=b.createComponentLogger({namespace:t}),this._tracer=k.getTracer(t,n),this._meter=pe.getMeter(t,n),this._logger=Bm.getLogger(t,n),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var t,n=(t=this.init())!==null&&t!==void 0?t:[];return Array.isArray(n)?n:[n]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(t){this._config=Gi({enabled:!0},t)},e.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(t,n,r,i){if(t)try{t(r,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},e}(),Fm=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vm=function(e){Fm(t,e);function t(n,r,i){var o=e.call(this,n,r,i)||this;return o._config.enabled&&o.enable(),o}return t}($m);function Gm(e,t,n){var r,i;try{i=e()}catch(o){r=o}finally{return t(r,i),i}}function Hm(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}var Hi=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},qi=performance,qm="http.method",zm="http.url",Xm="http.host",Km="http.scheme",Wm="http.status_code",Ym="http.user_agent",Jm="http.request_content_length_uncompressed",Qm=qm,Zm=zm,t_=Xm,e_=Km,n_=Wm,r_=Ym,i_=Jm,o_=9,a_=6,s_=Math.pow(10,a_),nu=Math.pow(10,o_);function zi(e){var t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*s_);return[n,r]}function u_(){var e=qi.timeOrigin;if(typeof e!="number"){var t=qi;e=t.timing&&t.timing.fetchStart}return e}function ru(e){var t=zi(u_()),n=zi(qi.now());return c_(t,n)}function c_(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=nu&&(n[1]-=nu,n[0]+=1),n}var l_=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function p_(e,t){return typeof t=="string"?e===t:!!e.match(t)}function f_(e,t){var n,r;if(!t)return!1;try{for(var i=l_(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(p_(e,a))return!0}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1}var Yn;(function(e){e.COMPONENT="component",e.HTTP_ERROR_NAME="http.error_name",e.HTTP_STATUS_TEXT="http.status_text"})(Yn||(Yn={}));var h_=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},d_=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},v_=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},y_=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},iu=b.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function g_(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e[0]instanceof URL||typeof e[0]=="string"){var n=e[1];if(!(n!=null&&n.body))return Promise.resolve();if(n.body instanceof ReadableStream){var r=m_(n.body),i=r.body,o=r.length;return n.body=i,o}else return Promise.resolve(__(n.body))}else{var a=e[0];return a!=null&&a.body?a.clone().text().then(function(u){return Xi(u)}):Promise.resolve()}}function m_(e){if(!e.pipeThrough)return iu.warn("Platform has ReadableStream but not pipeThrough!"),{body:e,length:Promise.resolve(void 0)};var t=0,n,r=new Promise(function(o){n=o}),i=new TransformStream({start:function(){},transform:function(o,a){return h_(this,void 0,void 0,function(){var u;return d_(this,function(c){switch(c.label){case 0:return[4,o];case 1:return u=c.sent(),t+=u.byteLength,a.enqueue(o),[2]}})})},flush:function(){n(t)}});return{body:e.pipeThrough(i),length:r}}function __(e){if(typeof Document<"u"&&e instanceof Document)return new XMLSerializer().serializeToString(document).length;if(e instanceof Blob)return e.size;if(e.byteLength!==void 0)return e.byteLength;if(e instanceof FormData)return b_(e);if(e instanceof URLSearchParams)return Xi(e.toString());if(typeof e=="string")return Xi(e);iu.warn("unknown body type")}var E_=new TextEncoder;function Xi(e){return E_.encode(e).byteLength}function b_(e){var t,n,r=0;try{for(var i=v_(e.entries()),o=i.next();!o.done;o=i.next()){var a=y_(o.value,2),u=a[0],c=a[1];r+=u.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}var ou="0.57.2",T_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),S_=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},w_=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Ki,O_=300,au=typeof process=="object"&&((Ki=process.release)===null||Ki===void 0?void 0:Ki.name)==="node",L_=function(e){T_(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,"@opentelemetry/instrumentation-fetch",ou,n)||this;return r.component="fetch",r.version=ou,r.moduleName=r.component,r._usedResources=new WeakSet,r._tasksCount=0,r}return t.prototype.init=function(){},t.prototype._addChildSpan=function(n,r){var i=this.tracer.startSpan("CORS Preflight",{startTime:r[O.FETCH_START]},k.setSpan(P.active(),n));_e(i,r,this.getConfig().ignoreNetworkEvents),i.end(r[O.RESPONSE_END])},t.prototype._addFinalSpanAttributes=function(n,r){var i=mt(r.url);n.setAttribute(n_,r.status),r.statusText!=null&&n.setAttribute(Yn.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(t_,i.host),n.setAttribute(e_,i.protocol.replace(":","")),typeof navigator<"u"&&n.setAttribute(r_,navigator.userAgent)},t.prototype._addHeaders=function(n,r){if(!qs(r,this.getConfig().propagateTraceHeaderCorsUrls)){var i={};Z.inject(P.active(),i),Object.keys(i).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}if(n instanceof Request)Z.inject(P.active(),n.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else if(n.headers instanceof Headers)Z.inject(P.active(),n.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else if(n.headers instanceof Map)Z.inject(P.active(),n.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else{var i={};Z.inject(P.active(),i),n.headers=Object.assign({},i,n.headers||{})}},t.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)},t.prototype._createSpan=function(n,r){var i;if(r===void 0&&(r={}),f_(n,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var o=(r.method||"GET").toUpperCase(),a="HTTP "+o;return this.tracer.startSpan(a,{kind:Be.CLIENT,attributes:(i={},i[Yn.COMPONENT]=this.moduleName,i[Qm]=o,i[Zm]=n,i)})},t.prototype._findResourceAndAddNetworkEvents=function(n,r,i){var o=r.entries;if(!o.length){if(!performance.getEntriesByType)return;o=performance.getEntriesByType("resource")}var a=Gs(r.spanUrl,r.startTime,i,o,this._usedResources,"fetch");if(a.mainRequest){var u=a.mainRequest;this._markResourceAsUsed(u);var c=a.corsPreFlightRequest;c&&(this._addChildSpan(n,c),this._markResourceAsUsed(c)),_e(n,u,this.getConfig().ignoreNetworkEvents)}},t.prototype._markResourceAsUsed=function(n){this._usedResources.add(n)},t.prototype._endSpan=function(n,r,i){var o=this,a=zi(Date.now()),u=ru();this._addFinalSpanAttributes(n,i),setTimeout(function(){var c;(c=r.observer)===null||c===void 0||c.disconnect(),o._findResourceAndAddNetworkEvents(n,r,u),o._tasksCount--,o._clearResources(),n.end(a)},O_)},t.prototype._patchConstructor=function(){var n=this;return function(r){var i=n;return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=this,c=mt(o[0]instanceof Request?o[0].url:String(o[0])).href,s=o[0]instanceof Request?o[0]:o[1]||{},l=i._createSpan(c,s);if(!l)return r.apply(this,o);var p=i._prepareSpanData(c);i.getConfig().measureRequestSize&&g_.apply(void 0,w_([],S_(o),!1)).then(function(m){m&&l.setAttribute(i_,m)}).catch(function(m){i._diag.warn("getFetchBodyLength",m)});function f(m,E){i._applyAttributesAfterFetch(m,s,E),i._endSpan(m,p,{status:E.status||0,statusText:E.message,url:c})}function v(m,E){i._applyAttributesAfterFetch(m,s,E),E.status>=200&&E.status<400?i._endSpan(m,p,E):i._endSpan(m,p,{status:E.status,statusText:E.statusText,url:c})}function y(m,E,S){try{var N=S.clone(),j=S.clone(),$=N.body;if($){var nt=$.getReader(),X=function(){nt.read().then(function(U){var bt=U.done;bt?v(m,j):X()},function(U){f(m,U)})};X()}else v(m,S)}finally{E(S)}}function g(m,E,S){try{f(m,S)}finally{E(S)}}return new Promise(function(m,E){return P.with(k.setSpan(P.active(),l),function(){return i._addHeaders(s,c),i._tasksCount++,r.apply(u,s instanceof Request?[s]:[c,s]).then(y.bind(u,l,m),g.bind(u,l,E))})})}}},t.prototype._applyAttributesAfterFetch=function(n,r,i){var o=this,a=this.getConfig().applyCustomAttributesOnSpan;a&&Gm(function(){return a(n,r,i)},function(u){u&&o._diag.error("applyCustomAttributesOnSpan",u)})},t.prototype._prepareSpanData=function(n){var r=ru(),i=[];if(typeof PerformanceObserver!="function")return{entries:i,startTime:r,spanUrl:n};var o=new PerformanceObserver(function(a){var u=a.getEntries();u.forEach(function(c){c.initiatorType==="fetch"&&c.name===n&&i.push(c)})});return o.observe({entryTypes:["resource"]}),{entries:i,observer:o,startTime:r,spanUrl:n}},t.prototype.enable=function(){if(au){this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}Hm(fetch)&&(this._unwrap(Hi,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(Hi,"fetch",this._patchConstructor())},t.prototype.disable=function(){au||(this._unwrap(Hi,"fetch"),this._usedResources=new WeakSet)},t}(Vm),su=function(){function e(){}return e.prototype.emit=function(t){},e}(),A_=new su,R_=function(){function e(){}return e.prototype.getLogger=function(t,n,r){return new su},e}(),uu=new R_,C_=function(){function e(t,n,r,i){this._provider=t,this.name=n,this.version=r,this.options=i}return e.prototype.emit=function(t){this._getLogger().emit(t)},e.prototype._getLogger=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):A_},e}(),cu=function(){function e(){}return e.prototype.getLogger=function(t,n,r){var i;return(i=this.getDelegateLogger(t,n,r))!==null&&i!==void 0?i:new C_(this,t,n,r)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:uu},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateLogger=function(t,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(t,n,r)},e}(),x_=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Jn=Symbol.for("io.opentelemetry.js.api.logs"),Je=x_;function P_(e,t,n){return function(r){return r===e?t:n}}var lu=1,N_=function(){function e(){this._proxyLoggerProvider=new cu}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(t){return Je[Jn]?this.getLoggerProvider():(Je[Jn]=P_(lu,t,uu),this._proxyLoggerProvider.setDelegate(t),t)},e.prototype.getLoggerProvider=function(){var t,n;return(n=(t=Je[Jn])===null||t===void 0?void 0:t.call(Je,lu))!==null&&n!==void 0?n:this._proxyLoggerProvider},e.prototype.getLogger=function(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)},e.prototype.disable=function(){delete Je[Jn],this._proxyLoggerProvider=new cu},e}(),I_=N_.getInstance(),Wi=function(){return Wi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Wi.apply(this,arguments)},k_=function(){function e(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this._config={},this._wrap=K.wrap,this._unwrap=K.unwrap,this._massWrap=K.massWrap,this._massUnwrap=K.massUnwrap,this.setConfig(r),this._diag=b.createComponentLogger({namespace:t}),this._tracer=k.getTracer(t,n),this._meter=pe.getMeter(t,n),this._logger=I_.getLogger(t,n),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var t,n=(t=this.init())!==null&&t!==void 0?t:[];return Array.isArray(n)?n:[n]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(t){this._config=Wi({enabled:!0},t)},e.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(t,n,r,i){if(t)try{t(r,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},e}(),M_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),D_=function(e){M_(t,e);function t(n,r,i){var o=e.call(this,n,r,i)||this;return o._config.enabled&&o.enable(),o}return t}(k_);function U_(e,t,n){var r,i;try{i=e()}catch(o){r=o}finally{return t(r,i),i}}function pu(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}var Qe=performance,j_="http.method",B_="http.url",$_="http.host",F_="http.scheme",V_="http.status_code",G_="http.user_agent",H_="http.request_content_length_uncompressed",q_=j_,z_=B_,X_=$_,K_=F_,W_=V_,Y_=G_,J_=H_,Q_=9,Z_=6,tE=Math.pow(10,Z_),fu=Math.pow(10,Q_);function hu(e){var t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*tE);return[n,r]}function eE(){var e=Qe.timeOrigin;if(typeof e!="number"){var t=Qe;e=t.timing&&t.timing.fetchStart}return e}function du(e){var t=hu(eE()),n=hu(Qe.now());return nE(t,n)}function nE(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=fu&&(n[1]-=fu,n[0]+=1),n}var rE=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function iE(e,t){return typeof t=="string"?e===t:!!e.match(t)}function oE(e,t){var n,r;if(!t)return!1;try{for(var i=rE(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(iE(e,a))return!0}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1}var _t;(function(e){e.METHOD_OPEN="open",e.METHOD_SEND="send",e.EVENT_ABORT="abort",e.EVENT_ERROR="error",e.EVENT_LOAD="loaded",e.EVENT_TIMEOUT="timeout"})(_t||(_t={}));var aE=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},sE=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},uE=b.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function cE(e){if(typeof Document<"u"&&e instanceof Document)return new XMLSerializer().serializeToString(document).length;if(e instanceof Blob)return e.size;if(e.byteLength!==void 0)return e.byteLength;if(e instanceof FormData)return pE(e);if(e instanceof URLSearchParams)return vu(e.toString());if(typeof e=="string")return vu(e);uE.warn("unknown body type")}var lE=new TextEncoder;function vu(e){return lE.encode(e).byteLength}function pE(e){var t,n,r=0;try{for(var i=aE(e.entries()),o=i.next();!o.done;o=i.next()){var a=sE(o.value,2),u=a[0],c=a[1];r+=u.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}var yu="0.57.2",Yi;(function(e){e.HTTP_STATUS_TEXT="http.status_text"})(Yi||(Yi={}));var fE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),hE=300,dE=function(e){fE(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,"@opentelemetry/instrumentation-xml-http-request",yu,n)||this;return r.component="xml-http-request",r.version=yu,r.moduleName=r.component,r._tasksCount=0,r._xhrMem=new WeakMap,r._usedResources=new WeakSet,r}return t.prototype.init=function(){},t.prototype._addHeaders=function(n,r){var i=mt(r).href;if(!qs(i,this.getConfig().propagateTraceHeaderCorsUrls)){var o={};Z.inject(P.active(),o),Object.keys(o).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}var a={};Z.inject(P.active(),a),Object.keys(a).forEach(function(u){n.setRequestHeader(u,String(a[u]))})},t.prototype._addChildSpan=function(n,r){var i=this;P.with(k.setSpan(P.active(),n),function(){var o=i.tracer.startSpan("CORS Preflight",{startTime:r[O.FETCH_START]});_e(o,r,i.getConfig().ignoreNetworkEvents),o.end(r[O.RESPONSE_END])})},t.prototype._addFinalSpanAttributes=function(n,r,i){if(typeof i=="string"){var o=mt(i);r.status!==void 0&&n.setAttribute(W_,r.status),r.statusText!==void 0&&n.setAttribute(Yi.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(X_,o.host),n.setAttribute(K_,o.protocol.replace(":","")),n.setAttribute(Y_,navigator.userAgent)}},t.prototype._applyAttributesAfterXHR=function(n,r){var i=this,o=this.getConfig().applyCustomAttributesOnSpan;typeof o=="function"&&U_(function(){return o(n,r)},function(a){a&&i._diag.error("applyCustomAttributesOnSpan",a)})},t.prototype._addResourceObserver=function(n,r){var i=this._xhrMem.get(n);!i||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(i.createdResources={observer:new PerformanceObserver(function(o){var a=o.getEntries(),u=mt(r);a.forEach(function(c){c.initiatorType==="xmlhttprequest"&&c.name===u.href&&i.createdResources&&i.createdResources.entries.push(c)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))},t.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(Qe.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},t.prototype._findResourceAndAddNetworkEvents=function(n,r,i,o,a){if(!(!i||!o||!a||!n.createdResources)){var u=n.createdResources.entries;(!u||!u.length)&&(u=Qe.getEntriesByType("resource"));var c=Gs(mt(i).href,o,a,u,this._usedResources);if(c.mainRequest){var s=c.mainRequest;this._markResourceAsUsed(s);var l=c.corsPreFlightRequest;l&&(this._addChildSpan(r,l),this._markResourceAsUsed(l)),_e(r,s,this.getConfig().ignoreNetworkEvents)}}},t.prototype._cleanPreviousSpanInformation=function(n){var r=this._xhrMem.get(n);if(r){var i=r.callbackToRemoveEvents;i&&i(),this._xhrMem.delete(n)}},t.prototype._createSpan=function(n,r,i){var o;if(oE(r,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var a=i.toUpperCase(),u=this.tracer.startSpan(a,{kind:Be.CLIENT,attributes:(o={},o[q_]=i,o[z_]=mt(r).toString(),o)});return u.addEvent(_t.METHOD_OPEN),this._cleanPreviousSpanInformation(n),this._xhrMem.set(n,{span:u,spanUrl:r}),u},t.prototype._markResourceAsUsed=function(n){this._usedResources.add(n)},t.prototype._patchOpen=function(){var n=this;return function(r){var i=n;return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=o[0],c=o[1];return i._createSpan(this,c,u),r.apply(this,o)}}},t.prototype._patchSend=function(){var n=this;function r(l,p,f,v){var y=p.callbackToRemoveEvents;typeof y=="function"&&y();var g=p.span,m=p.spanUrl,E=p.sendStartTime;g&&(n._findResourceAndAddNetworkEvents(p,g,m,E,f),g.addEvent(l,v),n._addFinalSpanAttributes(g,p,m),g.end(v),n._tasksCount--),n._clearResources()}function i(l,p){var f=n._xhrMem.get(p);if(f){f.status=p.status,f.statusText=p.statusText,n._xhrMem.delete(p),f.span&&n._applyAttributesAfterXHR(f.span,p);var v=du(),y=Date.now();setTimeout(function(){r(l,f,v,y)},hE)}}function o(){i(_t.EVENT_ERROR,this)}function a(){i(_t.EVENT_ABORT,this)}function u(){i(_t.EVENT_TIMEOUT,this)}function c(){this.status<299?i(_t.EVENT_LOAD,this):i(_t.EVENT_ERROR,this)}function s(l){l.removeEventListener("abort",a),l.removeEventListener("error",o),l.removeEventListener("load",c),l.removeEventListener("timeout",u);var p=n._xhrMem.get(l);p&&(p.callbackToRemoveEvents=void 0)}return function(l){return function(){for(var p=this,f=[],v=0;v<arguments.length;v++)f[v]=arguments[v];var y=n._xhrMem.get(this);if(!y)return l.apply(this,f);var g=y.span,m=y.spanUrl;if(g&&m){if(n.getConfig().measureRequestSize&&f!=null&&f[0]){var E=f[0],S=cE(E);S!==void 0&&g.setAttribute(J_,S)}P.with(k.setSpan(P.active(),g),function(){n._tasksCount++,y.sendStartTime=du(),g.addEvent(_t.METHOD_SEND),p.addEventListener("abort",a),p.addEventListener("error",o),p.addEventListener("load",c),p.addEventListener("timeout",u),y.callbackToRemoveEvents=function(){s(p),y.createdResources&&y.createdResources.observer.disconnect()},n._addHeaders(p,m),n._addResourceObserver(p,m)})}return l.apply(this,f)}}},t.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),pu(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),pu(XMLHttpRequest.prototype.send)&&(this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.debug("removing previous patch from method send")),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend())},t.prototype.disable=function(){this._diag.debug("removing patch from",this.moduleName,this.version),this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet},t}(D_),vE="service.name",yE="telemetry.sdk.name",gE="telemetry.sdk.language",mE="telemetry.sdk.version",_E=vE,gu=yE,mu=gE,_u=mE;function EE(){return"unknown_service"}var Pt=function(){return Pt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Pt.apply(this,arguments)},bE=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},TE=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},SE=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Ji=function(){function e(t,n){var r=this,i;this._attributes=t,this.asyncAttributesPending=n!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=n?.then(function(o){return r._attributes=Object.assign({},r._attributes,o),r.asyncAttributesPending=!1,o},function(o){return b.debug("a resource's async attributes promise rejected: %s",o),r.asyncAttributesPending=!1,{}})}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e((t={},t[_E]=EE(),t[mu]=di[mu],t[gu]=di[gu],t[_u]=di[_u],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&b.error("Accessing resource attributes before async attributes settled"),(t=this._attributes)!==null&&t!==void 0?t:{}},enumerable:!1,configurable:!0}),e.prototype.waitForAsyncAttributes=function(){return bE(this,void 0,void 0,function(){return TE(this,function(t){switch(t.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},e.prototype.merge=function(t){var n=this,r;if(!t)return this;var i=Pt(Pt({},this._syncAttributes),(r=t._syncAttributes)!==null&&r!==void 0?r:t.attributes);if(!this._asyncAttributesPromise&&!t._asyncAttributesPromise)return new e(i);var o=Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then(function(a){var u,c=SE(a,2),s=c[0],l=c[1];return Pt(Pt(Pt(Pt({},n._syncAttributes),s),(u=t._syncAttributes)!==null&&u!==void 0?u:t.attributes),l)});return new e(i,o)},e.EMPTY=new e({}),e}();const Qi=(e,t,n)=>{var r,i;const o=R({},t);return n?((r=Object.keys(o))==null||r.forEach(a=>{[...n].includes(a?.toLowerCase())||(o[a]="[REDACTED]")}),o):((i=Object.keys(o))==null||i.forEach(a=>{[...wE,...e].includes(a?.toLowerCase())&&(o[a]="[REDACTED]")}),o)},wE=["authorization","cookie","proxy-authorization","set-cookie","token"],OE=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com"],LE=["awsaccesskeyid","signature","sig","x-goog-signature"],Eu=e=>{var t,n;try{return new URL(e)}catch{return new URL(e,(n=(t=globalThis.location)==null?void 0:t.origin)!=null?n:"http://example.com")}},Zi=e=>{try{const t=Eu(e);(t.username||t.password)&&(t.username="REDACTED",t.password="REDACTED");const n=t.searchParams;if(LE.forEach(r=>{for(const i of Array.from(n.keys()))i.toLowerCase()===r&&n.set(i,"REDACTED")}),!e.includes("://")&&!e.startsWith("//"))return t.pathname+t.search+t.hash;if(e.startsWith("//")){let r="//";return(t.username||t.password)&&(r+=t.username+":"+t.password+"@"),r+=t.host+t.pathname+t.search+t.hash,r}return t.toString()}catch{return e}},AE=new RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),RE=new RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?");function CE(e){return!!(e.includes("/sdk/evalx")&&e.match(AE)||e.includes("/eval/")&&e.match(RE))}const xE=e=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(t=>e.toLocaleLowerCase().includes(t)),PE=e=>CE(e),NE=(e,t)=>t.some(n=>e.toLocaleLowerCase().includes(n)),IE=(e,t,n)=>!NE(e,t)&&!PE(e)&&!xE(e),kE=(e,t,n)=>{var r;if(n.some(u=>e.toLowerCase().includes(u)))return!1;let i=[];t===!0?(i=["localhost",/^\//],(r=window?.location)!=null&&r.host&&i.push(bu(window.location.host))):t instanceof Array&&(i=t);const o=DE(e);let a=!1;return i.forEach(u=>{o.match(u)&&(a=!0)}),a},ME=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),bu=e=>new RegExp("^https?://([^/]+\\.)?"+ME(e)+"([:/?#]|$)"),DE=e=>{if(e.startsWith("/")&&!e.startsWith("//"))return e;try{return new URL(e).origin}catch{return e}},Tu=64*1024,UE={"application/json":64*1024*1024,"text/plain":64*1024*1024},to=(e,t,n,r)=>{var i,o,a;let u=Tu;if(r){let c="";typeof r.get=="function"?c=(i=r.get("content-type"))!=null?i:"":c=(o=r["content-type"])!=null?o:"";try{c=c.split(";")[0]}catch{}u=(a=UE[c])!=null?a:Tu}if(e){if(t)try{const c=JSON.parse(e);Array.isArray(c)?c.forEach(s=>{Object.keys(s).forEach(l=>{t.includes(l.toLocaleLowerCase())&&(s[l]="[REDACTED]")})}):Object.keys(c).forEach(s=>{t.includes(s.toLocaleLowerCase())&&(c[s]="[REDACTED]")}),e=JSON.stringify(c)}catch{}if(n)try{const c=JSON.parse(e);Object.keys(c).forEach(s=>{n.includes(s.toLocaleLowerCase())||(c[s]="[REDACTED]")}),e=JSON.stringify(c)}catch{}}try{e=e.slice(0,u)}catch{}return e},jE=(e,t,n)=>ct(void 0,null,function*(){let r;try{const i=e.clone().body;if(i){let o=i.getReader(),a=new TextDecoder,u,c="";for(;!(u=yield o.read()).done;){let s=u.value;c+=a.decode(s)}r=c,r=to(r,n,t,e.headers)}else r=""}catch(i){r=`Unable to clone response: ${i}`}return r});var Su=function(){function e(t){this._delegate=t}return e.prototype.export=function(t,n){this._delegate.export(t,n)},e.prototype.forceFlush=function(){return this._delegate.forceFlush()},e.prototype.shutdown=function(){return this._delegate.shutdown()},e}(),BE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),wu=function(e){BE(t,e);function t(n,r,i){var o=e.call(this,n)||this;return o.name="OTLPExporterError",o.data=i,o.code=r,o}return t}(Error);function $E(e){if(!Number.isNaN(e)&&Number.isFinite(e)&&e>0)return e;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+e+"')")}function FE(e){if(e!=null)return function(){return e}}function VE(e,t,n){var r,i,o,a,u,c;return{timeoutMillis:$E((i=(r=e.timeoutMillis)!==null&&r!==void 0?r:t.timeoutMillis)!==null&&i!==void 0?i:n.timeoutMillis),concurrencyLimit:(a=(o=e.concurrencyLimit)!==null&&o!==void 0?o:t.concurrencyLimit)!==null&&a!==void 0?a:n.concurrencyLimit,compression:(c=(u=e.compression)!==null&&u!==void 0?u:t.compression)!==null&&c!==void 0?c:n.compression}}function GE(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var HE=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},qE=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},zE=function(){function e(t){this._sendingPromises=[],this._concurrencyLimit=t}return e.prototype.pushPromise=function(t){var n=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(t);var r=function(){var i=n._sendingPromises.indexOf(t);n._sendingPromises.splice(i,1)};t.then(r,r)},e.prototype.hasReachedLimit=function(){return this._sendingPromises.length>=this._concurrencyLimit},e.prototype.awaitAll=function(){return HE(this,void 0,void 0,function(){return qE(this,function(t){switch(t.label){case 0:return[4,Promise.all(this._sendingPromises)];case 1:return t.sent(),[2]}})})},e}();function XE(e){return new zE(e.concurrencyLimit)}function KE(e){return Object.prototype.hasOwnProperty.call(e,"partialSuccess")}function WE(){return{handleResponse:function(e){e==null||!KE(e)||e.partialSuccess==null||Object.keys(e.partialSuccess).length===0||b.warn("Received Partial Success response:",JSON.stringify(e.partialSuccess))}}}var YE=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},JE=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},QE=function(){function e(t,n,r,i,o){this._transport=t,this._serializer=n,this._responseHandler=r,this._promiseQueue=i,this._timeout=o,this._diagLogger=b.createComponentLogger({namespace:"OTLPExportDelegate"})}return e.prototype.export=function(t,n){var r=this;if(this._diagLogger.debug("items to be sent",t),this._promiseQueue.hasReachedLimit()){n({code:B.FAILED,error:new Error("Concurrent export limit reached")});return}var i=this._serializer.serializeRequest(t);if(i==null){n({code:B.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(i,this._timeout).then(function(o){if(o.status==="success"){if(o.data!=null)try{r._responseHandler.handleResponse(r._serializer.deserializeResponse(o.data))}catch(a){r._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",a,o.data)}n({code:B.SUCCESS});return}else if(o.status==="failure"&&o.error){n({code:B.FAILED,error:o.error});return}else o.status==="retryable"?n({code:B.FAILED,error:new wu("Export failed with retryable status")}):n({code:B.FAILED,error:new wu("Export failed with unknown error")})},function(o){return n({code:B.FAILED,error:o})}))},e.prototype.forceFlush=function(){return this._promiseQueue.awaitAll()},e.prototype.shutdown=function(){return YE(this,void 0,void 0,function(){return JE(this,function(t){switch(t.label){case 0:return this._diagLogger.debug("shutdown started"),[4,this.forceFlush()];case 1:return t.sent(),this._transport.shutdown(),[2]}})})},e}();function ZE(e,t){return new QE(e.transport,e.serializer,WE(),e.promiseHandler,t.timeout)}function Ou(e,t,n){return ZE({transport:n,serializer:t,promiseHandler:XE(e)},{timeout:e.timeoutMillis})}function Lu(e){var t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function tb(e){var t=Number(BigInt.asUintN(32,e)),n=Number(BigInt.asUintN(32,e>>BigInt(32)));return{low:t,high:n}}function Au(e){var t=Lu(e);return tb(t)}function eb(e){var t=Lu(e);return t.toString()}var nb=typeof BigInt<"u"?eb:nv;function Ru(e){return e}function Cu(e){if(e!==void 0)return fi(e)}var rb={encodeHrTime:Au,encodeSpanContext:fi,encodeOptionalSpanContext:Cu};function xu(e){var t,n;if(e===void 0)return rb;var r=(t=e.useLongBits)!==null&&t!==void 0?t:!0,i=(n=e.useHex)!==null&&n!==void 0?n:!1;return{encodeHrTime:r?Au:nb,encodeSpanContext:i?Ru:fi,encodeOptionalSpanContext:i?Ru:Cu}}var ib=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function Pu(e){return{attributes:Ht(e.attributes),droppedAttributesCount:0}}function Nu(e){return{name:e.name,version:e.version}}function Ht(e){return Object.keys(e).map(function(t){return Iu(t,e[t])})}function Iu(e,t){return{key:e,value:ku(t)}}function ku(e){var t=typeof e;return t==="string"?{stringValue:e}:t==="number"?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:t==="boolean"?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(ku)}}:t==="object"&&e!=null?{kvlistValue:{values:Object.entries(e).map(function(n){var r=ib(n,2),i=r[0],o=r[1];return Iu(i,o)})}}:{}}var lt;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE"})(lt||(lt={}));var dt;(function(e){e[e.HISTOGRAM=0]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",e[e.GAUGE=2]="GAUGE",e[e.SUM=3]="SUM"})(dt||(dt={}));var ob=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mu=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},Du=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},ab=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},sb=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},ub=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function cb(e){return e!=null}function Uu(e){var t=Object.keys(e);return t.length===0?"":(t=t.sort(),JSON.stringify(t.map(function(n){return[n,e[n]]})))}function lb(e){var t,n;return e.name+":"+((t=e.version)!==null&&t!==void 0?t:"")+":"+((n=e.schemaUrl)!==null&&n!==void 0?n:"")}var ju=function(e){ob(t,e);function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return t}(Error);function Ze(e,t){var n,r=new Promise(function(i,o){n=setTimeout(function(){o(new ju("Operation timed out."))},t)});return Promise.race([e,r]).then(function(i){return clearTimeout(n),i},function(i){throw clearTimeout(n),i})}function pb(e){return Mu(this,void 0,void 0,function(){var t=this;return Du(this,function(n){return[2,Promise.all(e.map(function(r){return Mu(t,void 0,void 0,function(){var i,o;return Du(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,r];case 1:return i=a.sent(),[2,{status:"fulfilled",value:i}];case 2:return o=a.sent(),[2,{status:"rejected",reason:o}];case 3:return[2]}})})}))]})})}function fb(e){return e.status==="rejected"}function Bu(e,t){var n=[];return e.forEach(function(r){n.push.apply(n,sb([],ab(t(r)),!1))}),n}function hb(e,t){var n,r;if(e.size!==t.size)return!1;try{for(var i=ub(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(!t.has(a))return!1}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0}function db(e,t){for(var n=0,r=e.length-1,i=e.length;r>=n;){var o=n+Math.trunc((r-n)/2);e[o]<t?n=o+1:(i=o,r=o-1)}return i}function vb(e,t){return e.toLowerCase()===t.toLowerCase()}var qt;(function(e){e[e.DROP=0]="DROP",e[e.SUM=1]="SUM",e[e.LAST_VALUE=2]="LAST_VALUE",e[e.HISTOGRAM=3]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(qt||(qt={}));var yb=function(){function e(){this.kind=qt.DROP}return e.prototype.createAccumulation=function(){},e.prototype.merge=function(t,n){},e.prototype.diff=function(t,n){},e.prototype.toMetricData=function(t,n,r,i){},e}(),L;(function(e){e.COUNTER="COUNTER",e.GAUGE="GAUGE",e.HISTOGRAM="HISTOGRAM",e.UP_DOWN_COUNTER="UP_DOWN_COUNTER",e.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",e.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",e.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(L||(L={}));function Nt(e,t,n){var r,i,o,a;return Eb(e)||b.warn('Invalid metric name: "'+e+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:e,type:t,description:(r=n?.description)!==null&&r!==void 0?r:"",unit:(i=n?.unit)!==null&&i!==void 0?i:"",valueType:(o=n?.valueType)!==null&&o!==void 0?o:Lt.DOUBLE,advice:(a=n?.advice)!==null&&a!==void 0?a:{}}}function gb(e,t){var n,r;return{name:(n=e.name)!==null&&n!==void 0?n:t.name,description:(r=e.description)!==null&&r!==void 0?r:t.description,type:t.type,unit:t.unit,valueType:t.valueType,advice:t.advice}}function mb(e,t){return vb(e.name,t.name)&&e.unit===t.unit&&e.type===t.type&&e.valueType===t.valueType}var _b=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Eb(e){return e.match(_b)!=null}var bb=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function Tb(e){var t=e.map(function(){return 0});return t.push(0),{buckets:{boundaries:e,counts:t},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var eo=function(){function e(t,n,r,i){r===void 0&&(r=!0),i===void 0&&(i=Tb(n)),this.startTime=t,this._boundaries=n,this._recordMinMax=r,this._current=i}return e.prototype.record=function(t){if(!Number.isNaN(t)){this._current.count+=1,this._current.sum+=t,this._recordMinMax&&(this._current.min=Math.min(t,this._current.min),this._current.max=Math.max(t,this._current.max),this._current.hasMinMax=!0);var n=db(this._boundaries,t);this._current.buckets.counts[n]+=1}},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),$u=function(){function e(t,n){this._boundaries=t,this._recordMinMax=n,this.kind=qt.HISTOGRAM}return e.prototype.createAccumulation=function(t){return new eo(t,this._boundaries,this._recordMinMax)},e.prototype.merge=function(t,n){for(var r=t.toPointValue(),i=n.toPointValue(),o=r.buckets.counts,a=i.buckets.counts,u=new Array(o.length),c=0;c<o.length;c++)u[c]=o[c]+a[c];var s=1/0,l=-1/0;return this._recordMinMax&&(r.hasMinMax&&i.hasMinMax?(s=Math.min(r.min,i.min),l=Math.max(r.max,i.max)):r.hasMinMax?(s=r.min,l=r.max):i.hasMinMax&&(s=i.min,l=i.max)),new eo(t.startTime,r.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:r.buckets.boundaries,counts:u},count:r.count+i.count,sum:r.sum+i.sum,hasMinMax:this._recordMinMax&&(r.hasMinMax||i.hasMinMax),min:s,max:l})},e.prototype.diff=function(t,n){for(var r=t.toPointValue(),i=n.toPointValue(),o=r.buckets.counts,a=i.buckets.counts,u=new Array(o.length),c=0;c<o.length;c++)u[c]=a[c]-o[c];return new eo(n.startTime,r.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:r.buckets.boundaries,counts:u},count:i.count-r.count,sum:i.sum-r.sum,hasMinMax:!1,min:1/0,max:-1/0})},e.prototype.toMetricData=function(t,n,r,i){return{descriptor:t,aggregationTemporality:n,dataPointType:dt.HISTOGRAM,dataPoints:r.map(function(o){var a=bb(o,2),u=a[0],c=a[1],s=c.toPointValue(),l=t.type===L.GAUGE||t.type===L.UP_DOWN_COUNTER||t.type===L.OBSERVABLE_GAUGE||t.type===L.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:u,startTime:c.startTime,endTime:i,value:{min:s.hasMinMax?s.min:void 0,max:s.hasMinMax?s.max:void 0,sum:l?void 0:s.sum,buckets:s.buckets,count:s.count}}})}},e}(),no=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},ro=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Fu=function(){function e(t,n,r,i){t===void 0&&(t=new Sb),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=0),this.backing=t,this.indexBase=n,this.indexStart=r,this.indexEnd=i}return Object.defineProperty(e.prototype,"offset",{get:function(){return this.indexStart},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this.backing.length===0||this.indexEnd===this.indexStart&&this.at(0)===0?0:this.indexEnd-this.indexStart+1},enumerable:!1,configurable:!0}),e.prototype.counts=function(){var t=this;return Array.from({length:this.length},function(n,r){return t.at(r)})},e.prototype.at=function(t){var n=this.indexBase-this.indexStart;return t<n&&(t+=this.backing.length),t-=n,this.backing.countAt(t)},e.prototype.incrementBucket=function(t,n){this.backing.increment(t,n)},e.prototype.decrementBucket=function(t,n){this.backing.decrement(t,n)},e.prototype.trim=function(){for(var t=0;t<this.length;t++)if(this.at(t)!==0){this.indexStart+=t;break}else if(t===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(var t=this.length-1;t>=0;t--)if(this.at(t)!==0){this.indexEnd-=this.length-t-1;break}this._rotate()},e.prototype.downscale=function(t){this._rotate();for(var n=1+this.indexEnd-this.indexStart,r=1<<t,i=0,o=0,a=this.indexStart;a<=this.indexEnd;){var u=a%r;u<0&&(u+=r);for(var c=u;c<r&&i<n;c++)this._relocateBucket(o,i),i++,a++;o++}this.indexStart>>=t,this.indexEnd>>=t,this.indexBase=this.indexStart},e.prototype.clone=function(){return new e(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)},e.prototype._rotate=function(){var t=this.indexBase-this.indexStart;t!==0&&(t>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,t),this.backing.reverse(t,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+t)),this.indexBase=this.indexStart)},e.prototype._relocateBucket=function(t,n){t!==n&&this.incrementBucket(t,this.backing.emptyBucket(n))},e}(),Sb=function(){function e(t){t===void 0&&(t=[0]),this._counts=t}return Object.defineProperty(e.prototype,"length",{get:function(){return this._counts.length},enumerable:!1,configurable:!0}),e.prototype.countAt=function(t){return this._counts[t]},e.prototype.growTo=function(t,n,r){var i=new Array(t).fill(0);i.splice.apply(i,ro([r,this._counts.length-n],no(this._counts.slice(n)),!1)),i.splice.apply(i,ro([0,n],no(this._counts.slice(0,n)),!1)),this._counts=i},e.prototype.reverse=function(t,n){for(var r=Math.floor((t+n)/2)-t,i=0;i<r;i++){var o=this._counts[t+i];this._counts[t+i]=this._counts[n-i-1],this._counts[n-i-1]=o}},e.prototype.emptyBucket=function(t){var n=this._counts[t];return this._counts[t]=0,n},e.prototype.increment=function(t,n){this._counts[t]+=n},e.prototype.decrement=function(t,n){this._counts[t]>=n?this._counts[t]-=n:this._counts[t]=0},e.prototype.clone=function(){return new e(ro([],no(this._counts),!1))},e}(),wb=52,Ob=2146435072,Lb=1048575,io=1023,Vu=-io+1,Gu=io,oo=Math.pow(2,-1022);function Hu(e){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);var n=t.getUint32(0),r=(n&Ob)>>20;return r-io}function qu(e){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);var n=t.getUint32(0),r=t.getUint32(4),i=(n&Lb)*Math.pow(2,32);return i+r}function ao(e,t){return e===0||e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY||Number.isNaN(e)?e:e*Math.pow(2,t)}function Ab(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e++,e}var Rb=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),tn=function(e){Rb(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Error),Cb=function(){function e(t){this._shift=-t}return e.prototype.mapToIndex=function(t){if(t<oo)return this._minNormalLowerBoundaryIndex();var n=Hu(t),r=this._rightShift(qu(t)-1,wb);return n+r>>this._shift},e.prototype.lowerBoundary=function(t){var n=this._minNormalLowerBoundaryIndex();if(t<n)throw new tn("underflow: "+t+" is < minimum lower boundary: "+n);var r=this._maxNormalLowerBoundaryIndex();if(t>r)throw new tn("overflow: "+t+" is > maximum lower boundary: "+r);return ao(1,t<<this._shift)},Object.defineProperty(e.prototype,"scale",{get:function(){return this._shift===0?0:-this._shift},enumerable:!1,configurable:!0}),e.prototype._minNormalLowerBoundaryIndex=function(){var t=Vu>>this._shift;return this._shift<2&&t--,t},e.prototype._maxNormalLowerBoundaryIndex=function(){return Gu>>this._shift},e.prototype._rightShift=function(t,n){return Math.floor(t*Math.pow(2,-n))},e}(),xb=function(){function e(t){this._scale=t,this._scaleFactor=ao(Math.LOG2E,t),this._inverseFactor=ao(Math.LN2,-t)}return e.prototype.mapToIndex=function(t){if(t<=oo)return this._minNormalLowerBoundaryIndex()-1;if(qu(t)===0){var n=Hu(t);return(n<<this._scale)-1}var r=Math.floor(Math.log(t)*this._scaleFactor),i=this._maxNormalLowerBoundaryIndex();return r>=i?i:r},e.prototype.lowerBoundary=function(t){var n=this._maxNormalLowerBoundaryIndex();if(t>=n){if(t===n)return 2*Math.exp((t-(1<<this._scale))/this._scaleFactor);throw new tn("overflow: "+t+" is > maximum lower boundary: "+n)}var r=this._minNormalLowerBoundaryIndex();if(t<=r){if(t===r)return oo;if(t===r-1)return Math.exp((t+(1<<this._scale))/this._scaleFactor)/2;throw new tn("overflow: "+t+" is < minimum lower boundary: "+r)}return Math.exp(t*this._inverseFactor)},Object.defineProperty(e.prototype,"scale",{get:function(){return this._scale},enumerable:!1,configurable:!0}),e.prototype._minNormalLowerBoundaryIndex=function(){return Vu<<this._scale},e.prototype._maxNormalLowerBoundaryIndex=function(){return(Gu+1<<this._scale)-1},e}(),zu=-10,Xu=20,Pb=Array.from({length:31},function(e,t){return t>10?new xb(t-10):new Cb(t-10)});function Ku(e){if(e>Xu||e<zu)throw new tn("expected scale >= "+zu+" && <= "+Xu+", got: "+e);return Pb[e+10]}var Nb=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Qn=function(){function e(t,n){this.low=t,this.high=n}return e.combine=function(t,n){return new e(Math.min(t.low,n.low),Math.max(t.high,n.high))},e}(),Ib=20,kb=160,so=2,Mb=function(){function e(t,n,r,i,o,a,u,c,s,l,p){t===void 0&&(t=t),n===void 0&&(n=kb),r===void 0&&(r=!0),i===void 0&&(i=0),o===void 0&&(o=0),a===void 0&&(a=0),u===void 0&&(u=Number.POSITIVE_INFINITY),c===void 0&&(c=Number.NEGATIVE_INFINITY),s===void 0&&(s=new Fu),l===void 0&&(l=new Fu),p===void 0&&(p=Ku(Ib)),this.startTime=t,this._maxSize=n,this._recordMinMax=r,this._sum=i,this._count=o,this._zeroCount=a,this._min=u,this._max=c,this._positive=s,this._negative=l,this._mapping=p,this._maxSize<so&&(b.warn("Exponential Histogram Max Size set to "+this._maxSize+", changing to the minimum size of: "+so),this._maxSize=so)}return e.prototype.record=function(t){this.updateByIncrement(t,1)},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return{hasMinMax:this._recordMinMax,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}},Object.defineProperty(e.prototype,"sum",{get:function(){return this._sum},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zeroCount",{get:function(){return this._zeroCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this._count===this._zeroCount?0:this._mapping.scale},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"positive",{get:function(){return this._positive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"negative",{get:function(){return this._negative},enumerable:!1,configurable:!0}),e.prototype.updateByIncrement=function(t,n){if(!Number.isNaN(t)){if(t>this._max&&(this._max=t),t<this._min&&(this._min=t),this._count+=n,t===0){this._zeroCount+=n;return}this._sum+=t*n,t>0?this._updateBuckets(this._positive,t,n):this._updateBuckets(this._negative,-t,n)}},e.prototype.merge=function(t){this._count===0?(this._min=t.min,this._max=t.max):t.count!==0&&(t.min<this.min&&(this._min=t.min),t.max>this.max&&(this._max=t.max)),this.startTime=t.startTime,this._sum+=t.sum,this._count+=t.count,this._zeroCount+=t.zeroCount;var n=this._minScale(t);this._downscale(this.scale-n),this._mergeBuckets(this.positive,t,t.positive,n),this._mergeBuckets(this.negative,t,t.negative,n)},e.prototype.diff=function(t){this._min=1/0,this._max=-1/0,this._sum-=t.sum,this._count-=t.count,this._zeroCount-=t.zeroCount;var n=this._minScale(t);this._downscale(this.scale-n),this._diffBuckets(this.positive,t,t.positive,n),this._diffBuckets(this.negative,t,t.negative,n)},e.prototype.clone=function(){return new e(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)},e.prototype._updateBuckets=function(t,n,r){var i=this._mapping.mapToIndex(n),o=!1,a=0,u=0;if(t.length===0?(t.indexStart=i,t.indexEnd=t.indexStart,t.indexBase=t.indexStart):i<t.indexStart&&t.indexEnd-i>=this._maxSize?(o=!0,u=i,a=t.indexEnd):i>t.indexEnd&&i-t.indexStart>=this._maxSize&&(o=!0,u=t.indexStart,a=i),o){var c=this._changeScale(a,u);this._downscale(c),i=this._mapping.mapToIndex(n)}this._incrementIndexBy(t,i,r)},e.prototype._incrementIndexBy=function(t,n,r){if(r!==0){if(t.length===0&&(t.indexStart=t.indexEnd=t.indexBase=n),n<t.indexStart){var i=t.indexEnd-n;i>=t.backing.length&&this._grow(t,i+1),t.indexStart=n}else if(n>t.indexEnd){var i=n-t.indexStart;i>=t.backing.length&&this._grow(t,i+1),t.indexEnd=n}var o=n-t.indexBase;o<0&&(o+=t.backing.length),t.incrementBucket(o,r)}},e.prototype._grow=function(t,n){var r=t.backing.length,i=t.indexBase-t.indexStart,o=r-i,a=Ab(n);a>this._maxSize&&(a=this._maxSize);var u=a-i;t.backing.growTo(a,o,u)},e.prototype._changeScale=function(t,n){for(var r=0;t-n>=this._maxSize;)t>>=1,n>>=1,r++;return r},e.prototype._downscale=function(t){if(t!==0){if(t<0)throw new Error("impossible change of scale: "+this.scale);var n=this._mapping.scale-t;this._positive.downscale(t),this._negative.downscale(t),this._mapping=Ku(n)}},e.prototype._minScale=function(t){var n=Math.min(this.scale,t.scale),r=Qn.combine(this._highLowAtScale(this.positive,this.scale,n),this._highLowAtScale(t.positive,t.scale,n)),i=Qn.combine(this._highLowAtScale(this.negative,this.scale,n),this._highLowAtScale(t.negative,t.scale,n));return Math.min(n-this._changeScale(r.high,r.low),n-this._changeScale(i.high,i.low))},e.prototype._highLowAtScale=function(t,n,r){if(t.length===0)return new Qn(0,-1);var i=n-r;return new Qn(t.indexStart>>i,t.indexEnd>>i)},e.prototype._mergeBuckets=function(t,n,r,i){for(var o=r.offset,a=n.scale-i,u=0;u<r.length;u++)this._incrementIndexBy(t,o+u>>a,r.at(u))},e.prototype._diffBuckets=function(t,n,r,i){for(var o=r.offset,a=n.scale-i,u=0;u<r.length;u++){var c=o+u>>a,s=c-t.indexBase;s<0&&(s+=t.backing.length),t.decrementBucket(s,r.at(u))}t.trim()},e}(),Db=function(){function e(t,n){this._maxSize=t,this._recordMinMax=n,this.kind=qt.EXPONENTIAL_HISTOGRAM}return e.prototype.createAccumulation=function(t){return new Mb(t,this._maxSize,this._recordMinMax)},e.prototype.merge=function(t,n){var r=n.clone();return r.merge(t),r},e.prototype.diff=function(t,n){var r=n.clone();return r.diff(t),r},e.prototype.toMetricData=function(t,n,r,i){return{descriptor:t,aggregationTemporality:n,dataPointType:dt.EXPONENTIAL_HISTOGRAM,dataPoints:r.map(function(o){var a=Nb(o,2),u=a[0],c=a[1],s=c.toPointValue(),l=t.type===L.GAUGE||t.type===L.UP_DOWN_COUNTER||t.type===L.OBSERVABLE_GAUGE||t.type===L.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:u,startTime:c.startTime,endTime:i,value:{min:s.hasMinMax?s.min:void 0,max:s.hasMinMax?s.max:void 0,sum:l?void 0:s.sum,positive:{offset:s.positive.offset,bucketCounts:s.positive.bucketCounts},negative:{offset:s.negative.offset,bucketCounts:s.negative.bucketCounts},count:s.count,scale:s.scale,zeroCount:s.zeroCount}}})}},e}(),Ub=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},uo=function(){function e(t,n,r){n===void 0&&(n=0),r===void 0&&(r=[0,0]),this.startTime=t,this._current=n,this.sampleTime=r}return e.prototype.record=function(t){this._current=t,this.sampleTime=$e(Date.now())},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),jb=function(){function e(){this.kind=qt.LAST_VALUE}return e.prototype.createAccumulation=function(t){return new uo(t)},e.prototype.merge=function(t,n){var r=In(n.sampleTime)>=In(t.sampleTime)?n:t;return new uo(t.startTime,r.toPointValue(),r.sampleTime)},e.prototype.diff=function(t,n){var r=In(n.sampleTime)>=In(t.sampleTime)?n:t;return new uo(n.startTime,r.toPointValue(),r.sampleTime)},e.prototype.toMetricData=function(t,n,r,i){return{descriptor:t,aggregationTemporality:n,dataPointType:dt.GAUGE,dataPoints:r.map(function(o){var a=Ub(o,2),u=a[0],c=a[1];return{attributes:u,startTime:c.startTime,endTime:i,value:c.toPointValue()}})}},e}(),Bb=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},en=function(){function e(t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1),this.startTime=t,this.monotonic=n,this._current=r,this.reset=i}return e.prototype.record=function(t){this.monotonic&&t<0||(this._current+=t)},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),Wu=function(){function e(t){this.monotonic=t,this.kind=qt.SUM}return e.prototype.createAccumulation=function(t){return new en(t,this.monotonic)},e.prototype.merge=function(t,n){var r=t.toPointValue(),i=n.toPointValue();return n.reset?new en(n.startTime,this.monotonic,i,n.reset):new en(t.startTime,this.monotonic,r+i)},e.prototype.diff=function(t,n){var r=t.toPointValue(),i=n.toPointValue();return this.monotonic&&r>i?new en(n.startTime,this.monotonic,i,!0):new en(n.startTime,this.monotonic,i-r)},e.prototype.toMetricData=function(t,n,r,i){return{descriptor:t,aggregationTemporality:n,dataPointType:dt.SUM,dataPoints:r.map(function(o){var a=Bb(o,2),u=a[0],c=a[1];return{attributes:u,startTime:c.startTime,endTime:i,value:c.toPointValue()}}),isMonotonic:this.monotonic}},e}(),zt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Et=function(){function e(){}return e.Drop=function(){return Yu},e.Sum=function(){return Ju},e.LastValue=function(){return Qu},e.Histogram=function(){return Zu},e.ExponentialHistogram=function(){return Xb},e.Default=function(){return Kb},e}(),$b=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(n){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new yb,t}(Et),Fb=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(n){switch(n.type){case L.COUNTER:case L.OBSERVABLE_COUNTER:case L.HISTOGRAM:return t.MONOTONIC_INSTANCE;default:return t.NON_MONOTONIC_INSTANCE}},t.MONOTONIC_INSTANCE=new Wu(!0),t.NON_MONOTONIC_INSTANCE=new Wu(!1),t}(Et),Vb=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(n){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new jb,t}(Et),Gb=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(n){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new $u([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),t}(Et),Hb=function(e){zt(t,e);function t(n,r){r===void 0&&(r=!0);var i=e.call(this)||this;if(i._recordMinMax=r,n==null)throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");n=n.concat(),n=n.sort(function(u,c){return u-c});var o=n.lastIndexOf(-1/0),a=n.indexOf(1/0);return a===-1&&(a=void 0),i._boundaries=n.slice(o+1,a),i}return t.prototype.createAggregator=function(n){return new $u(this._boundaries,this._recordMinMax)},t}(Et),qb=function(e){zt(t,e);function t(n,r){n===void 0&&(n=160),r===void 0&&(r=!0);var i=e.call(this)||this;return i._maxSize=n,i._recordMinMax=r,i}return t.prototype.createAggregator=function(n){return new Db(this._maxSize,this._recordMinMax)},t}(Et),zb=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype._resolve=function(n){switch(n.type){case L.COUNTER:case L.UP_DOWN_COUNTER:case L.OBSERVABLE_COUNTER:case L.OBSERVABLE_UP_DOWN_COUNTER:return Ju;case L.GAUGE:case L.OBSERVABLE_GAUGE:return Qu;case L.HISTOGRAM:return n.advice.explicitBucketBoundaries?new Hb(n.advice.explicitBucketBoundaries):Zu}return b.warn("Unable to recognize instrument type: "+n.type),Yu},t.prototype.createAggregator=function(n){return this._resolve(n).createAggregator(n)},t}(Et),Yu=new $b,Ju=new Fb,Qu=new Vb,Zu=new Gb,Xb=new qb,Kb=new zb,Wb=function(e){return Et.Default()},Yb=function(e){return lt.CUMULATIVE},co=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},lo=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},tc=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Jb=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Qb=function(){function e(t){var n,r,i;this._shutdown=!1,this._aggregationSelector=(n=t?.aggregationSelector)!==null&&n!==void 0?n:Wb,this._aggregationTemporalitySelector=(r=t?.aggregationTemporalitySelector)!==null&&r!==void 0?r:Yb,this._metricProducers=(i=t?.metricProducers)!==null&&i!==void 0?i:[],this._cardinalitySelector=t?.cardinalitySelector}return e.prototype.setMetricProducer=function(t){if(this._sdkMetricProducer)throw new Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=t,this.onInitialized()},e.prototype.selectAggregation=function(t){return this._aggregationSelector(t)},e.prototype.selectAggregationTemporality=function(t){return this._aggregationTemporalitySelector(t)},e.prototype.selectCardinalityLimit=function(t){return this._cardinalitySelector?this._cardinalitySelector(t):2e3},e.prototype.onInitialized=function(){},e.prototype.collect=function(t){return co(this,void 0,void 0,function(){var n,r,i,o,a,u;return lo(this,function(c){switch(c.label){case 0:if(this._sdkMetricProducer===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw new Error("MetricReader is shutdown");return[4,Promise.all(Jb([this._sdkMetricProducer.collect({timeoutMillis:t?.timeoutMillis})],tc(this._metricProducers.map(function(s){return s.collect({timeoutMillis:t?.timeoutMillis})})),!1))];case 1:return n=tc.apply(void 0,[c.sent()]),r=n[0],i=n.slice(1),o=r.errors.concat(Bu(i,function(s){return s.errors})),a=r.resourceMetrics.resource,u=r.resourceMetrics.scopeMetrics.concat(Bu(i,function(s){return s.resourceMetrics.scopeMetrics})),[2,{resourceMetrics:{resource:a,scopeMetrics:u},errors:o}]}})})},e.prototype.shutdown=function(t){return co(this,void 0,void 0,function(){return lo(this,function(n){switch(n.label){case 0:return this._shutdown?(b.error("Cannot call shutdown twice."),[2]):t?.timeoutMillis!=null?[3,2]:[4,this.onShutdown()];case 1:return n.sent(),[3,4];case 2:return[4,Ze(this.onShutdown(),t.timeoutMillis)];case 3:n.sent(),n.label=4;case 4:return this._shutdown=!0,[2]}})})},e.prototype.forceFlush=function(t){return co(this,void 0,void 0,function(){return lo(this,function(n){switch(n.label){case 0:return this._shutdown?(b.warn("Cannot forceFlush on already shutdown MetricReader."),[2]):t?.timeoutMillis!=null?[3,2]:[4,this.onForceFlush()];case 1:return n.sent(),[2];case 2:return[4,Ze(this.onForceFlush(),t.timeoutMillis)];case 3:return n.sent(),[2]}})})},e}(),Zb=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zn=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},tr=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},tT=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},eT=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},nT=function(e){Zb(t,e);function t(n){var r,i,o,a,u=e.call(this,{aggregationSelector:(r=n.exporter.selectAggregation)===null||r===void 0?void 0:r.bind(n.exporter),aggregationTemporalitySelector:(i=n.exporter.selectAggregationTemporality)===null||i===void 0?void 0:i.bind(n.exporter),metricProducers:n.metricProducers})||this;if(n.exportIntervalMillis!==void 0&&n.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(n.exportTimeoutMillis!==void 0&&n.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(n.exportTimeoutMillis!==void 0&&n.exportIntervalMillis!==void 0&&n.exportIntervalMillis<n.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");return u._exportInterval=(o=n.exportIntervalMillis)!==null&&o!==void 0?o:6e4,u._exportTimeout=(a=n.exportTimeoutMillis)!==null&&a!==void 0?a:3e4,u._exporter=n.exporter,u}return t.prototype._runOnce=function(){return Zn(this,void 0,void 0,function(){var n;return tr(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,Ze(this._doRun(),this._exportTimeout)];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),n instanceof ju?(b.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout),[2]):(Ga(n),[3,3]);case 3:return[2]}})})},t.prototype._doRun=function(){var n,r;return Zn(this,void 0,void 0,function(){var i,o,a,u,c,s;return tr(this,function(l){switch(l.label){case 0:return[4,this.collect({timeoutMillis:this._exportTimeout})];case 1:if(i=l.sent(),o=i.resourceMetrics,a=i.errors,a.length>0&&(s=b).error.apply(s,eT(["PeriodicExportingMetricReader: metrics collection errors"],tT(a),!1)),!o.resource.asyncAttributesPending)return[3,5];l.label=2;case 2:return l.trys.push([2,4,,5]),[4,(r=(n=o.resource).waitForAsyncAttributes)===null||r===void 0?void 0:r.call(n)];case 3:return l.sent(),[3,5];case 4:return u=l.sent(),b.debug("Error while resolving async portion of resource: ",u),Ga(u),[3,5];case 5:return o.scopeMetrics.length===0?[2]:[4,jv._export(this._exporter,o)];case 6:if(c=l.sent(),c.code!==B.SUCCESS)throw new Error("PeriodicExportingMetricReader: metrics export failed (error "+c.error+")");return[2]}})})},t.prototype.onInitialized=function(){var n=this;this._interval=setInterval(function(){n._runOnce()},this._exportInterval)},t.prototype.onForceFlush=function(){return Zn(this,void 0,void 0,function(){return tr(this,function(n){switch(n.label){case 0:return[4,this._runOnce()];case 1:return n.sent(),[4,this._exporter.forceFlush()];case 2:return n.sent(),[2]}})})},t.prototype.onShutdown=function(){return Zn(this,void 0,void 0,function(){return tr(this,function(n){switch(n.label){case 0:return this._interval&&clearInterval(this._interval),[4,this.onForceFlush()];case 1:return n.sent(),[4,this._exporter.shutdown()];case 2:return n.sent(),[2]}})})},t}(Qb),rT=function(){function e(){this._registeredViews=[]}return e.prototype.addView=function(t){this._registeredViews.push(t)},e.prototype.findViews=function(t,n){var r=this,i=this._registeredViews.filter(function(o){return r._matchInstrument(o.instrumentSelector,t)&&r._matchMeter(o.meterSelector,n)});return i},e.prototype._matchInstrument=function(t,n){return(t.getType()===void 0||n.type===t.getType())&&t.getNameFilter().match(n.name)&&t.getUnitFilter().match(n.unit)},e.prototype._matchMeter=function(t,n){return t.getNameFilter().match(n.name)&&(n.version===void 0||t.getVersionFilter().match(n.version))&&(n.schemaUrl===void 0||t.getSchemaUrlFilter().match(n.schemaUrl))},e}(),Xt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),er=function(){function e(t,n){this._writableMetricStorage=t,this._descriptor=n}return e.prototype._record=function(t,n,r){if(n===void 0&&(n={}),r===void 0&&(r=P.active()),typeof t!="number"){b.warn("non-number value provided to metric "+this._descriptor.name+": "+t);return}this._descriptor.valueType===Lt.INT&&!Number.isInteger(t)&&(b.warn("INT value type cannot accept a floating-point value for "+this._descriptor.name+", ignoring the fractional digits."),t=Math.trunc(t),!Number.isInteger(t))||this._writableMetricStorage.record(t,n,r,$e(Date.now()))},e}(),iT=function(e){Xt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(n,r,i){this._record(n,r,i)},t}(er),oT=function(e){Xt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(n,r,i){if(n<0){b.warn("negative value provided to counter "+this._descriptor.name+": "+n);return}this._record(n,r,i)},t}(er),aT=function(e){Xt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(n,r,i){this._record(n,r,i)},t}(er),sT=function(e){Xt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(n,r,i){if(n<0){b.warn("negative value provided to histogram "+this._descriptor.name+": "+n);return}this._record(n,r,i)},t}(er),nr=function(){function e(t,n,r){this._observableRegistry=r,this._descriptor=t,this._metricStorages=n}return e.prototype.addCallback=function(t){this._observableRegistry.addCallback(t,this)},e.prototype.removeCallback=function(t){this._observableRegistry.removeCallback(t,this)},e}(),uT=function(e){Xt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(nr),cT=function(e){Xt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(nr),lT=function(e){Xt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(nr);function po(e){return e instanceof nr}var pT=function(){function e(t){this._meterSharedState=t}return e.prototype.createGauge=function(t,n){var r=Nt(t,L.GAUGE,n),i=this._meterSharedState.registerMetricStorage(r);return new aT(i,r)},e.prototype.createHistogram=function(t,n){var r=Nt(t,L.HISTOGRAM,n),i=this._meterSharedState.registerMetricStorage(r);return new sT(i,r)},e.prototype.createCounter=function(t,n){var r=Nt(t,L.COUNTER,n),i=this._meterSharedState.registerMetricStorage(r);return new oT(i,r)},e.prototype.createUpDownCounter=function(t,n){var r=Nt(t,L.UP_DOWN_COUNTER,n),i=this._meterSharedState.registerMetricStorage(r);return new iT(i,r)},e.prototype.createObservableGauge=function(t,n){var r=Nt(t,L.OBSERVABLE_GAUGE,n),i=this._meterSharedState.registerAsyncMetricStorage(r);return new cT(r,i,this._meterSharedState.observableRegistry)},e.prototype.createObservableCounter=function(t,n){var r=Nt(t,L.OBSERVABLE_COUNTER,n),i=this._meterSharedState.registerAsyncMetricStorage(r);return new uT(r,i,this._meterSharedState.observableRegistry)},e.prototype.createObservableUpDownCounter=function(t,n){var r=Nt(t,L.OBSERVABLE_UP_DOWN_COUNTER,n),i=this._meterSharedState.registerAsyncMetricStorage(r);return new lT(r,i,this._meterSharedState.observableRegistry)},e.prototype.addBatchObservableCallback=function(t,n){this._meterSharedState.observableRegistry.addBatchCallback(t,n)},e.prototype.removeBatchObservableCallback=function(t,n){this._meterSharedState.observableRegistry.removeBatchCallback(t,n)},e}(),ec=function(){function e(t){this._instrumentDescriptor=t}return e.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},e.prototype.updateDescription=function(t){this._instrumentDescriptor=Nt(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:t,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},e}(),fT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),nc=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},hT=function(){function e(t){this._hash=t,this._valueMap=new Map,this._keyMap=new Map}return e.prototype.get=function(t,n){return n!=null||(n=this._hash(t)),this._valueMap.get(n)},e.prototype.getOrDefault=function(t,n){var r=this._hash(t);if(this._valueMap.has(r))return this._valueMap.get(r);var i=n();return this._keyMap.has(r)||this._keyMap.set(r,t),this._valueMap.set(r,i),i},e.prototype.set=function(t,n,r){r!=null||(r=this._hash(t)),this._keyMap.has(r)||this._keyMap.set(r,t),this._valueMap.set(r,n)},e.prototype.has=function(t,n){return n!=null||(n=this._hash(t)),this._valueMap.has(n)},e.prototype.keys=function(){var t,n;return nc(this,function(r){switch(r.label){case 0:t=this._keyMap.entries(),n=t.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[n.value[1],n.value[0]]];case 2:return r.sent(),n=t.next(),[3,1];case 3:return[2]}})},e.prototype.entries=function(){var t,n;return nc(this,function(r){switch(r.label){case 0:t=this._valueMap.entries(),n=t.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[this._keyMap.get(n.value[0]),n.value[1],n.value[0]]];case 2:return r.sent(),n=t.next(),[3,1];case 3:return[2]}})},Object.defineProperty(e.prototype,"size",{get:function(){return this._valueMap.size},enumerable:!1,configurable:!0}),e}(),Kt=function(e){fT(t,e);function t(){return e.call(this,Uu)||this}return t}(hT),dT=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},rc=function(){function e(t,n){this._aggregator=t,this._activeCollectionStorage=new Kt,this._cumulativeMemoStorage=new Kt,this._overflowAttributes={"otel.metric.overflow":!0},this._cardinalityLimit=(n??2e3)-1,this._overflowHashCode=Uu(this._overflowAttributes)}return e.prototype.record=function(t,n,r,i){var o=this,a=this._activeCollectionStorage.get(n);if(!a){if(this._activeCollectionStorage.size>=this._cardinalityLimit){var u=this._activeCollectionStorage.getOrDefault(this._overflowAttributes,function(){return o._aggregator.createAccumulation(i)});u?.record(t);return}a=this._aggregator.createAccumulation(i),this._activeCollectionStorage.set(n,a)}a?.record(t)},e.prototype.batchCumulate=function(t,n){var r=this;Array.from(t.entries()).forEach(function(i){var o=dT(i,3),a=o[0],u=o[1],c=o[2],s=r._aggregator.createAccumulation(n);s?.record(u);var l=s;if(r._cumulativeMemoStorage.has(a,c)){var p=r._cumulativeMemoStorage.get(a,c);l=r._aggregator.diff(p,s)}else if(r._cumulativeMemoStorage.size>=r._cardinalityLimit&&(a=r._overflowAttributes,c=r._overflowHashCode,r._cumulativeMemoStorage.has(a,c))){var p=r._cumulativeMemoStorage.get(a,c);l=r._aggregator.diff(p,s)}if(r._activeCollectionStorage.has(a,c)){var f=r._activeCollectionStorage.get(a,c);l=r._aggregator.merge(f,l)}r._cumulativeMemoStorage.set(a,s,c),r._activeCollectionStorage.set(a,l,c)})},e.prototype.collect=function(){var t=this._activeCollectionStorage;return this._activeCollectionStorage=new Kt,t},e}(),fo=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ic=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},oc=function(){function e(t,n){var r=this;this._aggregator=t,this._unreportedAccumulations=new Map,this._reportHistory=new Map,n.forEach(function(i){r._unreportedAccumulations.set(i,[])})}return e.prototype.buildMetrics=function(t,n,r,i){this._stashAccumulations(r);var o=this._getMergedUnreportedAccumulations(t),a=o,u;if(this._reportHistory.has(t)){var c=this._reportHistory.get(t),s=c.collectionTime;u=c.aggregationTemporality,u===lt.CUMULATIVE?a=e.merge(c.accumulations,o,this._aggregator):a=e.calibrateStartTime(c.accumulations,o,s)}else u=t.selectAggregationTemporality(n.type);this._reportHistory.set(t,{accumulations:a,collectionTime:i,aggregationTemporality:u});var l=vT(a);if(l.length!==0)return this._aggregator.toMetricData(n,u,l,i)},e.prototype._stashAccumulations=function(t){var n,r,i=this._unreportedAccumulations.keys();try{for(var o=fo(i),a=o.next();!a.done;a=o.next()){var u=a.value,c=this._unreportedAccumulations.get(u);c===void 0&&(c=[],this._unreportedAccumulations.set(u,c)),c.push(t)}}catch(s){n={error:s}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype._getMergedUnreportedAccumulations=function(t){var n,r,i=new Kt,o=this._unreportedAccumulations.get(t);if(this._unreportedAccumulations.set(t,[]),o===void 0)return i;try{for(var a=fo(o),u=a.next();!u.done;u=a.next()){var c=u.value;i=e.merge(i,c,this._aggregator)}}catch(s){n={error:s}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},e.merge=function(t,n,r){for(var i=t,o=n.entries(),a=o.next();a.done!==!0;){var u=ic(a.value,3),c=u[0],s=u[1],l=u[2];if(t.has(c,l)){var p=t.get(c,l),f=r.merge(p,s);i.set(c,f,l)}else i.set(c,s,l);a=o.next()}return i},e.calibrateStartTime=function(t,n,r){var i,o;try{for(var a=fo(t.keys()),u=a.next();!u.done;u=a.next()){var c=ic(u.value,2),s=c[0],l=c[1],p=n.get(s,l);p?.setStartTime(r)}}catch(f){i={error:f}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return n},e}();function vT(e){return Array.from(e.entries())}var yT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),gT=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},mT=function(e){yT(t,e);function t(n,r,i,o,a){var u=e.call(this,n)||this;return u._attributesProcessor=i,u._aggregationCardinalityLimit=a,u._deltaMetricStorage=new rc(r,u._aggregationCardinalityLimit),u._temporalMetricStorage=new oc(r,o),u}return t.prototype.record=function(n,r){var i=this,o=new Kt;Array.from(n.entries()).forEach(function(a){var u=gT(a,2),c=u[0],s=u[1];o.set(i._attributesProcessor.process(c),s)}),this._deltaMetricStorage.batchCumulate(o,r)},t.prototype.collect=function(n,r){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(n,this._instrumentDescriptor,i,r)},t}(ec);function ac(e,t){var n="";return e.unit!==t.unit&&(n+=" - Unit '"+e.unit+"' does not match '"+t.unit+`'
296
+ `).filter(function(c){return!!c.match(r)&&!c.match(/^Error created at/)},this);return u.map(function(c){var s=c.split("@"),l=this.extractLocation(s.pop()),p=s.shift()||"",f=p.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,v;p.match(/\(([^)]*)\)/)&&(v=p.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var y=v===void 0||v==="[arguments not available]"?void 0:v.split(",");return new n({functionName:f,args:y,fileName:l[0],lineNumber:l[1],columnNumber:l[2],source:c})},this)}}})})(La);var Bf=La.exports;const Ca=vn(Bf);function An(e){try{return Ca.parse(e)}catch(t){try{return Ca.parse(new Error)}catch(n){return console.warn("Highlight Warning: failed to parse error",{originalError:t,secondaryError:n}),[]}}}function $f(e,t){const n=t.logger;let r;r=window[n];const i=[];if(t.level.includes("error")&&window){const a=u=>{const{message:c,error:s}=u;let l=[];s&&(l=An(s));const p=[Nr(c,t.stringifyOptions)];e({type:"Error",trace:l,time:Date.now(),value:p})};window.addEventListener("error",a),i.push(()=>{window&&window.removeEventListener("error",a)})}for(const a of t.level)i.push(o(r,a));return()=>{i.forEach(a=>a())};function o(a,u){return a[u]?Pp(a,u,c=>(...s)=>{c.apply(this,s);try{e(Ff(u,t,...s))}catch(l){c("highlight logger error:",l,...s)}}):()=>{}}}function Ff(e,t,...n){const r=An(new Error),i=t.serializeConsoleAttributes?n.map(o=>typeof o=="object"?Nr(o,t.stringifyOptions):o):n.filter(o=>typeof o!="object").map(o=>`${o}`);return{type:e,trace:r,value:i,attributes:Nr(n.filter(o=>typeof o=="object").reduce((o,a)=>R(R({},o),a),{}),t.stringifyOptions),time:Date.now()}}const Vf={start:0,end:3},Gf={start:4,end:5},zr={start:6,end:7},Xr={start:8,end:8},Hf={start:9,end:9},qf={start:10,end:15};function zf(){if(crypto&&crypto.getRandomValues){const t=new Uint8Array(16);return crypto.getRandomValues(t),[...t.values()]}const e=[];for(let t=0;t<16;t+=1)e.push(Math.floor(Math.random()*256));return e}function le(e,t){let n="";for(let r=t.start;r<=t.end;r+=1)n+=e[r].toString(16).padStart(2,"0");return n}function Xf(e){return e[Xr.start]=(e[Xr.start]|128)&191,e[zr.start]=e[zr.start]&15|64,`${le(e,Vf)}-${le(e,Gf)}-${le(e,zr)}-${le(e,Xr)}${le(e,Hf)}-${le(e,qf)}`}function Kf(){const e=zf();return Xf(e)}function Kr(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Kf()}function Wr(e,t,n,r){var i,o,a,u;let c=r??t,s=An(c),l={};t instanceof Error&&(t=t.message,t.cause&&(l={"exception.cause":t.cause}));const p=Yf(s);e({error:c,event:gn(t),type:"window.onerror",url:window.location.href,source:n??"",lineNumber:(i=p[0])!=null&&i.lineNumber?(o=p[0])==null?void 0:o.lineNumber:0,columnNumber:(a=p[0])!=null&&a.columnNumber?(u=p[0])==null?void 0:u.columnNumber:0,stackTrace:p,timestamp:new Date().toISOString(),payload:l?gn(l):void 0,id:Kr()})}const Wf=(e,{enablePromisePatch:t})=>{if(typeof window>"u")return()=>{};const n=window.onerror=(a,u,c,s,l)=>{Wr(e,a,u,l)},r=window.onunhandledrejection=a=>{if(a.reason){const u=a.promise;u.getStack?Wr(e,a.reason,a.type,u.getStack()):Wr(e,a.reason,a.type)}},i=window.Promise,o=class extends i{constructor(a){super(a),C(this,"promiseCreationError"),this.promiseCreationError=new Error}getStack(){return this.promiseCreationError}static shouldPatch(){const a=typeof window.Zone>"u";return t&&a}};return o.shouldPatch()&&(window.Promise=o),()=>{window.Promise=i,window.onunhandledrejection=r,window.onerror=n}},Yf=e=>{var t,n;if(e.length===0)return e;const r=e[0];return(t=r.fileName)!=null&&t.includes("highlight.run")||(n=r.fileName)!=null&&n.includes("highlight.io")||r.functionName==="new highlightPromise"?e.slice(1):e},Jf=['["\\"Script error.\\""]','"Script error."','["\\"Load failed.\\""]','"Load failed."','["\\"Network request failed.\\""]','"Network request failed."','["\\"Document is not focused.\\""]','"Document is not focused."','["\\"Failed to fetch\\""]','"Failed to fetch"','[{"isTrusted":true}]','{"isTrusted":true}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],Qf=["websocket error",'\\"ResizeObserver loop'];var Zf=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Ut="1.9.0",xa=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function th(e){var t=new Set([e]),n=new Set,r=e.match(xa);if(!r)return function(){return!1};var i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(u){return u===e};function o(u){return n.add(u),!1}function a(u){return t.add(u),!0}return function(u){if(t.has(u))return!0;if(n.has(u))return!1;var c=u.match(xa);if(!c)return o(u);var s={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return s.prerelease!=null||i.major!==s.major?o(u):i.major===0?i.minor===s.minor&&i.patch<=s.patch?a(u):o(u):i.minor<=s.minor?a(u):o(u)}}var eh=th(Ut),nh=Ut.split(".")[0],Ne=Symbol.for("opentelemetry.js.api."+nh),Ie=Zf;function ke(e,t,n,r){var i;r===void 0&&(r=!1);var o=Ie[Ne]=(i=Ie[Ne])!==null&&i!==void 0?i:{version:Ut};if(!r&&o[e]){var a=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return n.error(a.stack||a.message),!1}if(o.version!==Ut){var a=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+e+" does not match previously registered API v"+Ut);return n.error(a.stack||a.message),!1}return o[e]=t,n.debug("@opentelemetry/api: Registered a global for "+e+" v"+Ut+"."),!0}function jt(e){var t,n,r=(t=Ie[Ne])===null||t===void 0?void 0:t.version;if(!(!r||!eh(r)))return(n=Ie[Ne])===null||n===void 0?void 0:n[e]}function Me(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+Ut+".");var n=Ie[Ne];n&&delete n[e]}var rh=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},ih=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},oh=function(){function e(t){this._namespace=t.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return De("debug",this._namespace,t)},e.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return De("error",this._namespace,t)},e.prototype.info=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return De("info",this._namespace,t)},e.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return De("warn",this._namespace,t)},e.prototype.verbose=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return De("verbose",this._namespace,t)},e}();function De(e,t,n){var r=jt("diag");if(r)return n.unshift(t),r[e].apply(r,ih([],rh(n),!1))}var D;(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(D||(D={}));function ah(e,t){e<D.NONE?e=D.NONE:e>D.ALL&&(e=D.ALL),t=t||{};function n(r,i){var o=t[r];return typeof o=="function"&&e>=i?o.bind(t):function(){}}return{error:n("error",D.ERROR),warn:n("warn",D.WARN),info:n("info",D.INFO),debug:n("debug",D.DEBUG),verbose:n("verbose",D.VERBOSE)}}var sh=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},uh=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},ch="diag",pt=function(){function e(){function t(i){return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=jt("diag");if(u)return u[i].apply(u,uh([],sh(o),!1))}}var n=this,r=function(i,o){var a,u,c;if(o===void 0&&(o={logLevel:D.INFO}),i===n){var s=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((a=s.stack)!==null&&a!==void 0?a:s.message),!1}typeof o=="number"&&(o={logLevel:o});var l=jt("diag"),p=ah((u=o.logLevel)!==null&&u!==void 0?u:D.INFO,i);if(l&&!o.suppressOverrideMessage){var f=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";l.warn("Current logger will be overwritten from "+f),p.warn("Current logger will overwrite one already registered from "+f)}return ke("diag",p,n,!0)};n.setLogger=r,n.disable=function(){Me(ch,n)},n.createComponentLogger=function(i){return new oh(i)},n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}(),lh=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},ph=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},fh=function(){function e(t){this._entries=t?new Map(t):new Map}return e.prototype.getEntry=function(t){var n=this._entries.get(t);if(n)return Object.assign({},n)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(t){var n=lh(t,2),r=n[0],i=n[1];return[r,i]})},e.prototype.setEntry=function(t,n){var r=new e(this._entries);return r._entries.set(t,n),r},e.prototype.removeEntry=function(t){var n=new e(this._entries);return n._entries.delete(t),n},e.prototype.removeEntries=function(){for(var t,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=new e(this._entries);try{for(var a=ph(r),u=a.next();!u.done;u=a.next()){var c=u.value;o._entries.delete(c)}}catch(s){t={error:s}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o},e.prototype.clear=function(){return new e},e}(),hh=Symbol("BaggageEntryMetadata"),dh=pt.instance();function vh(e){return e===void 0&&(e={}),new fh(new Map(Object.entries(e)))}function Pa(e){return typeof e!="string"&&(dh.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:hh,toString:function(){return e}}}function Rn(e){return Symbol.for(e)}var yh=function(){function e(t){var n=this;n._currentContext=t?new Map(t):new Map,n.getValue=function(r){return n._currentContext.get(r)},n.setValue=function(r,i){var o=new e(n._currentContext);return o._currentContext.set(r,i),o},n.deleteValue=function(r){var i=new e(n._currentContext);return i._currentContext.delete(r),i}}return e}(),Bt=new yh,$t=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),gh=function(){function e(){}return e.prototype.createGauge=function(t,n){return Lh},e.prototype.createHistogram=function(t,n){return Ah},e.prototype.createCounter=function(t,n){return Oh},e.prototype.createUpDownCounter=function(t,n){return Rh},e.prototype.createObservableGauge=function(t,n){return xh},e.prototype.createObservableCounter=function(t,n){return Ch},e.prototype.createObservableUpDownCounter=function(t,n){return Ph},e.prototype.addBatchObservableCallback=function(t,n){},e.prototype.removeBatchObservableCallback=function(t){},e}(),Cn=function(){function e(){}return e}(),mh=function(e){$t(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(n,r){},t}(Cn),_h=function(e){$t(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(n,r){},t}(Cn),Eh=function(e){$t(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(n,r){},t}(Cn),bh=function(e){$t(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(n,r){},t}(Cn),Yr=function(){function e(){}return e.prototype.addCallback=function(t){},e.prototype.removeCallback=function(t){},e}(),Th=function(e){$t(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Yr),Sh=function(e){$t(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Yr),wh=function(e){$t(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Yr),Na=new gh,Oh=new mh,Lh=new Eh,Ah=new bh,Rh=new _h,Ch=new Th,xh=new Sh,Ph=new wh;function Nh(){return Na}var Lt;(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(Lt||(Lt={}));var Ih={get:function(e,t){if(e!=null)return e[t]},keys:function(e){return e==null?[]:Object.keys(e)}},kh={set:function(e,t,n){e!=null&&(e[t]=n)}},Mh=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Dh=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Uh=function(){function e(){}return e.prototype.active=function(){return Bt},e.prototype.with=function(t,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];return n.call.apply(n,Dh([r],Mh(i),!1))},e.prototype.bind=function(t,n){return n},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}(),jh=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Bh=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Jr="context",$h=new Uh,xn=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(t){return ke(Jr,t,pt.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(t,n,r){for(var i,o=[],a=3;a<arguments.length;a++)o[a-3]=arguments[a];return(i=this._getContextManager()).with.apply(i,Bh([t,n,r],jh(o),!1))},e.prototype.bind=function(t,n){return this._getContextManager().bind(t,n)},e.prototype._getContextManager=function(){return jt(Jr)||$h},e.prototype.disable=function(){this._getContextManager().disable(),Me(Jr,pt.instance())},e}(),ft;(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(ft||(ft={}));var Ia="0000000000000000",ka="00000000000000000000000000000000",Ma={traceId:ka,spanId:Ia,traceFlags:ft.NONE},Ue=function(){function e(t){t===void 0&&(t=Ma),this._spanContext=t}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,n){return this},e.prototype.setAttributes=function(t){return this},e.prototype.addEvent=function(t,n){return this},e.prototype.addLink=function(t){return this},e.prototype.addLinks=function(t){return this},e.prototype.setStatus=function(t){return this},e.prototype.updateName=function(t){return this},e.prototype.end=function(t){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(t,n){},e}(),Qr=Rn("OpenTelemetry Context Key SPAN");function Zr(e){return e.getValue(Qr)||void 0}function Fh(){return Zr(xn.getInstance().active())}function ti(e,t){return e.setValue(Qr,t)}function Vh(e){return e.deleteValue(Qr)}function Gh(e,t){return ti(e,new Ue(t))}function Da(e){var t;return(t=Zr(e))===null||t===void 0?void 0:t.spanContext()}var Hh=/^([0-9a-f]{32})$/i,qh=/^[0-9a-f]{16}$/i;function Ua(e){return Hh.test(e)&&e!==ka}function zh(e){return qh.test(e)&&e!==Ia}function je(e){return Ua(e.traceId)&&zh(e.spanId)}function Xh(e){return new Ue(e)}var ei=xn.getInstance(),ja=function(){function e(){}return e.prototype.startSpan=function(t,n,r){r===void 0&&(r=ei.active());var i=!!(n!=null&&n.root);if(i)return new Ue;var o=r&&Da(r);return Kh(o)&&je(o)?new Ue(o):new Ue},e.prototype.startActiveSpan=function(t,n,r,i){var o,a,u;if(!(arguments.length<2)){arguments.length===2?u=n:arguments.length===3?(o=n,u=r):(o=n,a=r,u=i);var c=a??ei.active(),s=this.startSpan(t,o,c),l=ti(c,s);return ei.with(l,u,void 0,s)}},e}();function Kh(e){return typeof e=="object"&&typeof e.spanId=="string"&&typeof e.traceId=="string"&&typeof e.traceFlags=="number"}var Wh=new ja,Yh=function(){function e(t,n,r,i){this._provider=t,this.name=n,this.version=r,this.options=i}return e.prototype.startSpan=function(t,n,r){return this._getTracer().startSpan(t,n,r)},e.prototype.startActiveSpan=function(t,n,r,i){var o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):Wh},e}(),Jh=function(){function e(){}return e.prototype.getTracer=function(t,n,r){return new ja},e}(),Qh=new Jh,Ba=function(){function e(){}return e.prototype.getTracer=function(t,n,r){var i;return(i=this.getDelegateTracer(t,n,r))!==null&&i!==void 0?i:new Yh(this,t,n,r)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Qh},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateTracer=function(t,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(t,n,r)},e}(),Pn;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Pn||(Pn={}));var Be;(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(Be||(Be={}));var Nn;(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(Nn||(Nn={}));var P=xn.getInstance(),b=pt.instance(),Zh=function(){function e(){}return e.prototype.getMeter=function(t,n,r){return Na},e}(),td=new Zh,ni="metrics",ed=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(t){return ke(ni,t,pt.instance())},e.prototype.getMeterProvider=function(){return jt(ni)||td},e.prototype.getMeter=function(t,n,r){return this.getMeterProvider().getMeter(t,n,r)},e.prototype.disable=function(){Me(ni,pt.instance())},e}(),pe=ed.getInstance(),nd=function(){function e(){}return e.prototype.inject=function(t,n){},e.prototype.extract=function(t,n){return t},e.prototype.fields=function(){return[]},e}(),ri=Rn("OpenTelemetry Baggage Key");function $a(e){return e.getValue(ri)||void 0}function rd(){return $a(xn.getInstance().active())}function id(e,t){return e.setValue(ri,t)}function od(e){return e.deleteValue(ri)}var ii="propagation",ad=new nd,sd=function(){function e(){this.createBaggage=vh,this.getBaggage=$a,this.getActiveBaggage=rd,this.setBaggage=id,this.deleteBaggage=od}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(t){return ke(ii,t,pt.instance())},e.prototype.inject=function(t,n,r){return r===void 0&&(r=kh),this._getGlobalPropagator().inject(t,n,r)},e.prototype.extract=function(t,n,r){return r===void 0&&(r=Ih),this._getGlobalPropagator().extract(t,n,r)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){Me(ii,pt.instance())},e.prototype._getGlobalPropagator=function(){return jt(ii)||ad},e}(),Z=sd.getInstance(),oi="trace",ud=function(){function e(){this._proxyTracerProvider=new Ba,this.wrapSpanContext=Xh,this.isSpanContextValid=je,this.deleteSpan=Vh,this.getSpan=Zr,this.getActiveSpan=Fh,this.getSpanContext=Da,this.setSpan=ti,this.setSpanContext=Gh}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(t){var n=ke(oi,this._proxyTracerProvider,pt.instance());return n&&this._proxyTracerProvider.setDelegate(t),n},e.prototype.getTracerProvider=function(){return jt(oi)||this._proxyTracerProvider},e.prototype.getTracer=function(t,n){return this.getTracerProvider().getTracer(t,n)},e.prototype.disable=function(){Me(oi,pt.instance()),this._proxyTracerProvider=new Ba},e}(),k=ud.getInstance(),Fa=Rn("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function cd(e){return e.setValue(Fa,!0)}function Va(e){return e.getValue(Fa)===!0}var ld="=",ai=";",si=",",ui="baggage",pd=180,fd=4096,hd=8192,dd=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function vd(e){return e.reduce(function(t,n){var r=""+t+(t!==""?si:"")+n;return r.length>hd?t:r},"")}function yd(e){return e.getAllEntries().map(function(t){var n=dd(t,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=ai+i.metadata.toString()),o})}function gd(e){var t=e.split(ai);if(!(t.length<=0)){var n=t.shift();if(n){var r=n.indexOf(ld);if(!(r<=0)){var i=decodeURIComponent(n.substring(0,r).trim()),o=decodeURIComponent(n.substring(r+1).trim()),a;return t.length>0&&(a=Pa(t.join(ai))),{key:i,value:o,metadata:a}}}}}var md=function(){function e(){}return e.prototype.inject=function(t,n,r){var i=Z.getBaggage(t);if(!(!i||Va(t))){var o=yd(i).filter(function(u){return u.length<=fd}).slice(0,pd),a=vd(o);a.length>0&&r.set(n,ui,a)}},e.prototype.extract=function(t,n,r){var i=r.get(n,ui),o=Array.isArray(i)?i.join(si):i;if(!o)return t;var a={};if(o.length===0)return t;var u=o.split(si);return u.forEach(function(c){var s=gd(c);if(s){var l={value:s.value};s.metadata&&(l.metadata=s.metadata),a[s.key]=l}}),Object.entries(a).length===0?t:Z.setBaggage(t,Z.createBaggage(a))},e.prototype.fields=function(){return[ui]},e}();function _d(){return function(e){b.error(Ed(e))}}function Ed(e){return typeof e=="string"?e:JSON.stringify(bd(e))}function bd(e){for(var t={},n=e;n!==null;)Object.getOwnPropertyNames(n).forEach(function(r){if(!t[r]){var i=n[r];i&&(t[r]=String(i))}}),n=Object.getPrototypeOf(n);return t}var Td=_d();function Ga(e){try{Td(e)}catch{}}var ci;(function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"})(ci||(ci={}));var Sd=",",wd=["OTEL_SDK_DISABLED"];function Od(e){return wd.indexOf(e)>-1}var Ld=["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"];function Ad(e){return Ld.indexOf(e)>-1}var Rd=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function Cd(e){return Rd.indexOf(e)>-1}var li=1/0,pi=128,xd=128,Pd=128,Ha={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:D.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:li,OTEL_ATTRIBUTE_COUNT_LIMIT:pi,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:li,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:pi,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:li,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:pi,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:xd,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Pd,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ci.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",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function Nd(e,t,n){if(typeof n[e]<"u"){var r=String(n[e]);t[e]=r.toLowerCase()==="true"}}function Id(e,t,n,r,i){if(r===void 0&&(r=-1/0),i===void 0&&(i=1/0),typeof n[e]<"u"){var o=Number(n[e]);isNaN(o)||(o<r?t[e]=r:o>i?t[e]=i:t[e]=o)}}function kd(e,t,n,r){r===void 0&&(r=Sd);var i=n[e];typeof i=="string"&&(t[e]=i.split(r).map(function(o){return o.trim()}))}var Md={ALL:D.ALL,VERBOSE:D.VERBOSE,DEBUG:D.DEBUG,INFO:D.INFO,WARN:D.WARN,ERROR:D.ERROR,NONE:D.NONE};function Dd(e,t,n){var r=n[e];if(typeof r=="string"){var i=Md[r.toUpperCase()];i!=null&&(t[e]=i)}}function Ud(e){var t={};for(var n in Ha){var r=n;switch(r){case"OTEL_LOG_LEVEL":Dd(r,t,e);break;default:if(Od(r))Nd(r,t,e);else if(Ad(r))Id(r,t,e);else if(Cd(r))kd(r,t,e);else{var i=e[r];typeof i<"u"&&i!==null&&(t[r]=String(i))}}}return t}var jd=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function Bd(){var e=Ud(jd);return Object.assign({},Ha,e)}function qa(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function fi(e){for(var t=new Uint8Array(e.length/2),n=0,r=0;r<e.length;r+=2){var i=qa(e.charCodeAt(r)),o=qa(e.charCodeAt(r+1));t[n++]=i<<4|o}return t}var hi=performance,$d="1.30.1",Fd="process.runtime.name",Vd="telemetry.sdk.name",Gd="telemetry.sdk.language",Hd="telemetry.sdk.version",qd=Fd,zd=Vd,Xd=Gd,Kd=Hd,Wd="webjs",Yd=Wd,fe,di=(fe={},fe[zd]="opentelemetry",fe[qd]="browser",fe[Xd]=Yd,fe[Kd]=$d,fe),Jd=9,Qd=6,Zd=Math.pow(10,Qd),vi=Math.pow(10,Jd);function $e(e){var t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*Zd);return[n,r]}function tv(){var e=hi.timeOrigin;if(typeof e!="number"){var t=hi;e=t.timing&&t.timing.fetchStart}return e}function ev(e){var t=$e(tv()),n=$e(hi.now());return rv(t,n)}function nv(e){return e[0]*vi+e[1]}function In(e){return e[0]*1e6+e[1]/1e3}function rv(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=vi&&(n[1]-=vi,n[0]+=1),n}var B;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(B||(B={}));var iv=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ov=function(){function e(t){t===void 0&&(t={});var n;this._propagators=(n=t.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,i){return r.concat(i)},[])))}return e.prototype.inject=function(t,n,r){var i,o;try{for(var a=iv(this._propagators),u=a.next();!u.done;u=a.next()){var c=u.value;try{c.inject(t,n,r)}catch(s){b.warn("Failed to inject with "+c.constructor.name+". Err: "+s.message)}}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}},e.prototype.extract=function(t,n,r){return this._propagators.reduce(function(i,o){try{return o.extract(i,n,r)}catch(a){b.warn("Failed to extract with "+o.constructor.name+". Err: "+a.message)}return i},t)},e.prototype.fields=function(){return this._fields.slice()},e}(),yi="[_0-9a-z-*/]",av="[a-z]"+yi+"{0,255}",sv="[a-z0-9]"+yi+"{0,240}@[a-z]"+yi+"{0,13}",uv=new RegExp("^(?:"+av+"|"+sv+")$"),cv=/^[ -~]{0,255}[!-~]$/,lv=/,|=/;function pv(e){return uv.test(e)}function fv(e){return cv.test(e)&&!lv.test(e)}var za=32,hv=512,Xa=",",Ka="=",dv=function(){function e(t){this._internalState=new Map,t&&this._parse(t)}return e.prototype.set=function(t,n){var r=this._clone();return r._internalState.has(t)&&r._internalState.delete(t),r._internalState.set(t,n),r},e.prototype.unset=function(t){var n=this._clone();return n._internalState.delete(t),n},e.prototype.get=function(t){return this._internalState.get(t)},e.prototype.serialize=function(){var t=this;return this._keys().reduce(function(n,r){return n.push(r+Ka+t.get(r)),n},[]).join(Xa)},e.prototype._parse=function(t){t.length>hv||(this._internalState=t.split(Xa).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(Ka);if(o!==-1){var a=i.slice(0,o),u=i.slice(o+1,r.length);pv(a)&&fv(u)&&n.set(a,u)}return n},new Map),this._internalState.size>za&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,za))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),gi="traceparent",mi="tracestate",vv="00",yv="(?!ff)[\\da-f]{2}",gv="(?![0]{32})[\\da-f]{32}",mv="(?![0]{16})[\\da-f]{16}",_v="[\\da-f]{2}",Ev=new RegExp("^\\s?("+yv+")-("+gv+")-("+mv+")-("+_v+")(-.*)?\\s?$");function bv(e){var t=Ev.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var Tv=function(){function e(){}return e.prototype.inject=function(t,n,r){var i=k.getSpanContext(t);if(!(!i||Va(t)||!je(i))){var o=vv+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||ft.NONE).toString(16);r.set(n,gi,o),i.traceState&&r.set(n,mi,i.traceState.serialize())}},e.prototype.extract=function(t,n,r){var i=r.get(n,gi);if(!i)return t;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return t;var a=bv(o);if(!a)return t;a.isRemote=!0;var u=r.get(n,mi);if(u){var c=Array.isArray(u)?u.join(","):u;a.traceState=new dv(typeof c=="string"?c:void 0)}return k.setSpanContext(t,a)},e.prototype.fields=function(){return[gi,mi]},e}(),Sv="[object Object]",wv="[object Null]",Ov="[object Undefined]",Lv=Function.prototype,Wa=Lv.toString,Av=Wa.call(Object),Rv=Cv(Object.getPrototypeOf,Object),Ya=Object.prototype,Ja=Ya.hasOwnProperty,Ft=Symbol?Symbol.toStringTag:void 0,Qa=Ya.toString;function Cv(e,t){return function(n){return e(t(n))}}function Za(e){if(!xv(e)||Pv(e)!==Sv)return!1;var t=Rv(e);if(t===null)return!0;var n=Ja.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Wa.call(n)===Av}function xv(e){return e!=null&&typeof e=="object"}function Pv(e){return e==null?e===void 0?Ov:wv:Ft&&Ft in Object(e)?Nv(e):Iv(e)}function Nv(e){var t=Ja.call(e,Ft),n=e[Ft],r=!1;try{e[Ft]=void 0,r=!0}catch{}var i=Qa.call(e);return r&&(t?e[Ft]=n:delete e[Ft]),i}function Iv(e){return Qa.call(e)}var kv=20;function Mv(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e.shift(),r=new WeakMap;e.length>0;)n=ts(n,e.shift(),0,r);return n}function _i(e){return kn(e)?e.slice():e}function ts(e,t,n,r){n===void 0&&(n=0);var i;if(!(n>kv)){if(n++,Mn(e)||Mn(t)||ns(t))i=_i(t);else if(kn(e)){if(i=e.slice(),kn(t))for(var o=0,a=t.length;o<a;o++)i.push(_i(t[o]));else if(Fe(t))for(var u=Object.keys(t),o=0,a=u.length;o<a;o++){var c=u[o];i[c]=_i(t[c])}}else if(Fe(e))if(Fe(t)){if(!Dv(e,t))return t;i=Object.assign({},e);for(var u=Object.keys(t),o=0,a=u.length;o<a;o++){var c=u[o],s=t[c];if(Mn(s))typeof s>"u"?delete i[c]:i[c]=s;else{var l=i[c],p=s;if(es(e,c,r)||es(t,c,r))delete i[c];else{if(Fe(l)&&Fe(p)){var f=r.get(l)||[],v=r.get(p)||[];f.push({obj:e,key:c}),v.push({obj:t,key:c}),r.set(l,f),r.set(p,v)}i[c]=ts(i[c],s,n,r)}}}}else i=t;return i}}function es(e,t,n){for(var r=n.get(e[t])||[],i=0,o=r.length;i<o;i++){var a=r[i];if(a.key===t&&a.obj===e)return!0}return!1}function kn(e){return Array.isArray(e)}function ns(e){return typeof e=="function"}function Fe(e){return!Mn(e)&&!kn(e)&&!ns(e)&&typeof e=="object"}function Mn(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function Dv(e,t){return!(!Za(e)||!Za(t))}function Uv(e,t){return new Promise(function(n){P.with(cd(P.active()),function(){e.export(t,function(r){n(r)})})})}var jv={_export:Uv},rs=function(){function e(){}return e.prototype.emit=function(t){},e}(),Bv=new rs,$v=function(){function e(){}return e.prototype.getLogger=function(t,n,r){return new rs},e}(),is=new $v,Fv=function(){function e(t,n,r,i){this._provider=t,this.name=n,this.version=r,this.options=i}return e.prototype.emit=function(t){this._getLogger().emit(t)},e.prototype._getLogger=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):Bv},e}(),os=function(){function e(){}return e.prototype.getLogger=function(t,n,r){var i;return(i=this.getDelegateLogger(t,n,r))!==null&&i!==void 0?i:new Fv(this,t,n,r)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:is},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateLogger=function(t,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(t,n,r)},e}(),Vv=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Dn=Symbol.for("io.opentelemetry.js.api.logs"),Ve=Vv;function Gv(e,t,n){return function(r){return r===e?t:n}}var as=1,Hv=function(){function e(){this._proxyLoggerProvider=new os}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(t){return Ve[Dn]?this.getLoggerProvider():(Ve[Dn]=Gv(as,t,is),this._proxyLoggerProvider.setDelegate(t),t)},e.prototype.getLoggerProvider=function(){var t,n;return(n=(t=Ve[Dn])===null||t===void 0?void 0:t.call(Ve,as))!==null&&n!==void 0?n:this._proxyLoggerProvider},e.prototype.getLogger=function(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)},e.prototype.disable=function(){delete Ve[Dn],this._proxyLoggerProvider=new os},e}(),ss=Hv.getInstance();function qv(e,t,n,r){for(var i=0,o=e.length;i<o;i++){var a=e[i];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}function zv(e){e.forEach(function(t){return t.disable()})}function Xv(e){var t,n,r=e.tracerProvider||k.getTracerProvider(),i=e.meterProvider||pe.getMeterProvider(),o=e.loggerProvider||ss.getLoggerProvider(),a=(n=(t=e.instrumentations)===null||t===void 0?void 0:t.flat())!==null&&n!==void 0?n:[];return qv(a,r,i,o),function(){zv(a)}}function Ei(e){return typeof e=="function"}var tt=console.error.bind(console);function Ge(e,t,n){var r=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}function He(e){e&&e.logger&&(Ei(e.logger)?tt=e.logger:tt("new logger isn't a function, not replacing"))}function us(e,t,n){if(!e||!e[t]){tt("no original function "+t+" to wrap");return}if(!n){tt("no wrapper function"),tt(new Error().stack);return}if(!Ei(e[t])||!Ei(n)){tt("original object and wrapper must be functions");return}var r=e[t],i=n(r,t);return Ge(i,"__original",r),Ge(i,"__unwrap",function(){e[t]===i&&Ge(e,t,r)}),Ge(i,"__wrapped",!0),Ge(e,t,i),i}function Kv(e,t,n){if(e)Array.isArray(e)||(e=[e]);else{tt("must provide one or more modules to patch"),tt(new Error().stack);return}if(!(t&&Array.isArray(t))){tt("must provide one or more functions to wrap on modules");return}e.forEach(function(r){t.forEach(function(i){us(r,i,n)})})}function cs(e,t){if(!e||!e[t]){tt("no function to unwrap."),tt(new Error().stack);return}if(!e[t].__unwrap)tt("no original to unwrap to -- has "+t+" already been unwrapped?");else return e[t].__unwrap()}function Wv(e,t){if(e)Array.isArray(e)||(e=[e]);else{tt("must provide one or more modules to patch"),tt(new Error().stack);return}if(!(t&&Array.isArray(t))){tt("must provide one or more functions to unwrap on modules");return}e.forEach(function(n){t.forEach(function(r){cs(n,r)})})}He.wrap=us,He.massWrap=Kv,He.unwrap=cs,He.massUnwrap=Wv;var K=He,bi=function(){return bi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},bi.apply(this,arguments)},Yv=function(){function e(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this._config={},this._wrap=K.wrap,this._unwrap=K.unwrap,this._massWrap=K.massWrap,this._massUnwrap=K.massUnwrap,this.setConfig(r),this._diag=b.createComponentLogger({namespace:t}),this._tracer=k.getTracer(t,n),this._meter=pe.getMeter(t,n),this._logger=ss.getLogger(t,n),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var t,n=(t=this.init())!==null&&t!==void 0?t:[];return Array.isArray(n)?n:[n]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(t){this._config=bi({enabled:!0},t)},e.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(t,n,r,i){if(t)try{t(r,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},e}(),Jv=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ls=function(e){Jv(t,e);function t(n,r,i){var o=e.call(this,n,r,i)||this;return o._config.enabled&&o.enable(),o}return t}(Yv);function et(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}var Un=performance,Qv="traceparent",ps=Rn("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Zv(e){return e.setValue(ps,!0)}function Ti(e){return e.getValue(ps)===!0}var ty="=",Si=";",wi=",",Oi="baggage",ey=180,ny=4096,ry=8192,iy=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function oy(e){return e.reduce(function(t,n){var r=""+t+(t!==""?wi:"")+n;return r.length>ry?t:r},"")}function ay(e){return e.getAllEntries().map(function(t){var n=iy(t,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=Si+i.metadata.toString()),o})}function sy(e){var t=e.split(Si);if(!(t.length<=0)){var n=t.shift();if(n){var r=n.indexOf(ty);if(!(r<=0)){var i=decodeURIComponent(n.substring(0,r).trim()),o=decodeURIComponent(n.substring(r+1).trim()),a;return t.length>0&&(a=Pa(t.join(Si))),{key:i,value:o,metadata:a}}}}}var uy=function(){function e(){}return e.prototype.inject=function(t,n,r){var i=Z.getBaggage(t);if(!(!i||Ti(t))){var o=ay(i).filter(function(u){return u.length<=ny}).slice(0,ey),a=oy(o);a.length>0&&r.set(n,Oi,a)}},e.prototype.extract=function(t,n,r){var i=r.get(n,Oi),o=Array.isArray(i)?i.join(wi):i;if(!o)return t;var a={};if(o.length===0)return t;var u=o.split(wi);return u.forEach(function(c){var s=sy(c);if(s){var l={value:s.value};s.metadata&&(l.metadata=s.metadata),a[s.key]=l}}),Object.entries(a).length===0?t:Z.setBaggage(t,Z.createBaggage(a))},e.prototype.fields=function(){return[Oi]},e}(),fs=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},cy=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function jn(e){var t,n,r={};if(typeof e!="object"||e==null)return r;try{for(var i=fs(Object.entries(e)),o=i.next();!o.done;o=i.next()){var a=cy(o.value,2),u=a[0],c=a[1];if(!ly(u)){b.warn("Invalid attribute key: "+u);continue}if(!hs(c)){b.warn("Invalid attribute value set for key: "+u);continue}Array.isArray(c)?r[u]=c.slice():r[u]=c}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function ly(e){return typeof e=="string"&&e.length>0}function hs(e){return e==null?!0:Array.isArray(e)?py(e):ds(e)}function py(e){var t,n,r;try{for(var i=fs(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(a!=null){if(!r){if(ds(a)){r=typeof a;continue}return!1}if(typeof a!==r)return!1}}}catch(u){t={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return!0}function ds(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}function fy(){return function(e){b.error(hy(e))}}function hy(e){return typeof e=="string"?e:JSON.stringify(dy(e))}function dy(e){for(var t={},n=e;n!==null;)Object.getOwnPropertyNames(n).forEach(function(r){if(!t[r]){var i=n[r];i&&(t[r]=String(i))}}),n=Object.getPrototypeOf(n);return t}var vy=fy();function he(e){try{vy(e)}catch{}}var ht;(function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"})(ht||(ht={}));var yy=",",gy=["OTEL_SDK_DISABLED"];function my(e){return gy.indexOf(e)>-1}var _y=["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"];function Ey(e){return _y.indexOf(e)>-1}var by=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function Ty(e){return by.indexOf(e)>-1}var Bn=1/0,$n=128,Sy=128,wy=128,vs={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:D.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:Bn,OTEL_ATTRIBUTE_COUNT_LIMIT:$n,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Bn,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:$n,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Bn,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:$n,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:Sy,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:wy,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ht.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",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function Oy(e,t,n){if(typeof n[e]<"u"){var r=String(n[e]);t[e]=r.toLowerCase()==="true"}}function Ly(e,t,n,r,i){if(r===void 0&&(r=-1/0),i===void 0&&(i=1/0),typeof n[e]<"u"){var o=Number(n[e]);isNaN(o)||(o<r?t[e]=r:o>i?t[e]=i:t[e]=o)}}function Ay(e,t,n,r){r===void 0&&(r=yy);var i=n[e];typeof i=="string"&&(t[e]=i.split(r).map(function(o){return o.trim()}))}var Ry={ALL:D.ALL,VERBOSE:D.VERBOSE,DEBUG:D.DEBUG,INFO:D.INFO,WARN:D.WARN,ERROR:D.ERROR,NONE:D.NONE};function Cy(e,t,n){var r=n[e];if(typeof r=="string"){var i=Ry[r.toUpperCase()];i!=null&&(t[e]=i)}}function ys(e){var t={};for(var n in vs){var r=n;switch(r){case"OTEL_LOG_LEVEL":Cy(r,t,e);break;default:if(my(r))Oy(r,t,e);else if(Ey(r))Ly(r,t,e);else if(Ty(r))Ay(r,t,e);else{var i=e[r];typeof i<"u"&&i!==null&&(t[r]=String(i))}}}return t}var gs=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function qe(){var e=ys(gs);return Object.assign({},vs,e)}function xy(){return ys(gs)}var de=performance,Py="1.30.1",Ny="exception.type",Iy="exception.message",ky="exception.stacktrace",My="http.response_content_length",Dy="http.response_content_length_uncompressed",Li=Ny,Ai=Iy,Uy=ky,jy=My,By=Dy,$y="process.runtime.name",Fy="service.name",Vy="telemetry.sdk.name",Gy="telemetry.sdk.language",Hy="telemetry.sdk.version",qy=$y,zy=Fy,Ri=Vy,Ci=Gy,xi=Hy,Xy="webjs",Ky=Xy,ve,Pi=(ve={},ve[Ri]="opentelemetry",ve[qy]="browser",ve[Ci]=Ky,ve[xi]=Py,ve),Wy=9,Yy=6,Jy=Math.pow(10,Yy),Fn=Math.pow(10,Wy);function At(e){var t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*Jy);return[n,r]}function Ni(){var e=de.timeOrigin;if(typeof e!="number"){var t=de;e=t.timing&&t.timing.fetchStart}return e}function ms(e){var t=At(Ni()),n=At(typeof e=="number"?e:de.now());return Es(t,n)}function ze(e){if(Ii(e))return e;if(typeof e=="number")return e<Ni()?ms(e):At(e);if(e instanceof Date)return At(e.getTime());throw TypeError("Invalid input type")}function Qy(e,t){var n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=Fn),[n,r]}function Rt(e){return e[0]*Fn+e[1]}function Ii(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}function _s(e){return Ii(e)||typeof e=="number"||e instanceof Date}function Es(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=Fn&&(n[1]-=Fn,n[0]+=1),n}var ki;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(ki||(ki={}));var Zy=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},tg=function(){function e(t){t===void 0&&(t={});var n;this._propagators=(n=t.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,i){return r.concat(i)},[])))}return e.prototype.inject=function(t,n,r){var i,o;try{for(var a=Zy(this._propagators),u=a.next();!u.done;u=a.next()){var c=u.value;try{c.inject(t,n,r)}catch(s){b.warn("Failed to inject with "+c.constructor.name+". Err: "+s.message)}}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}},e.prototype.extract=function(t,n,r){return this._propagators.reduce(function(i,o){try{return o.extract(i,n,r)}catch(a){b.warn("Failed to extract with "+o.constructor.name+". Err: "+a.message)}return i},t)},e.prototype.fields=function(){return this._fields.slice()},e}(),Mi="[_0-9a-z-*/]",eg="[a-z]"+Mi+"{0,255}",ng="[a-z0-9]"+Mi+"{0,240}@[a-z]"+Mi+"{0,13}",rg=new RegExp("^(?:"+eg+"|"+ng+")$"),ig=/^[ -~]{0,255}[!-~]$/,og=/,|=/;function ag(e){return rg.test(e)}function sg(e){return ig.test(e)&&!og.test(e)}var bs=32,ug=512,Ts=",",Ss="=",cg=function(){function e(t){this._internalState=new Map,t&&this._parse(t)}return e.prototype.set=function(t,n){var r=this._clone();return r._internalState.has(t)&&r._internalState.delete(t),r._internalState.set(t,n),r},e.prototype.unset=function(t){var n=this._clone();return n._internalState.delete(t),n},e.prototype.get=function(t){return this._internalState.get(t)},e.prototype.serialize=function(){var t=this;return this._keys().reduce(function(n,r){return n.push(r+Ss+t.get(r)),n},[]).join(Ts)},e.prototype._parse=function(t){t.length>ug||(this._internalState=t.split(Ts).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(Ss);if(o!==-1){var a=i.slice(0,o),u=i.slice(o+1,r.length);ag(a)&&sg(u)&&n.set(a,u)}return n},new Map),this._internalState.size>bs&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,bs))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),Di="traceparent",Ui="tracestate",lg="00",pg="(?!ff)[\\da-f]{2}",fg="(?![0]{32})[\\da-f]{32}",hg="(?![0]{16})[\\da-f]{16}",dg="[\\da-f]{2}",vg=new RegExp("^\\s?("+pg+")-("+fg+")-("+hg+")-("+dg+")(-.*)?\\s?$");function yg(e){var t=vg.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var gg=function(){function e(){}return e.prototype.inject=function(t,n,r){var i=k.getSpanContext(t);if(!(!i||Ti(t)||!je(i))){var o=lg+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||ft.NONE).toString(16);r.set(n,Di,o),i.traceState&&r.set(n,Ui,i.traceState.serialize())}},e.prototype.extract=function(t,n,r){var i=r.get(n,Di);if(!i)return t;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return t;var a=yg(o);if(!a)return t;a.isRemote=!0;var u=r.get(n,Ui);if(u){var c=Array.isArray(u)?u.join(","):u;a.traceState=new cg(typeof c=="string"?c:void 0)}return k.setSpanContext(t,a)},e.prototype.fields=function(){return[Di,Ui]},e}(),mg="[object Object]",_g="[object Null]",Eg="[object Undefined]",bg=Function.prototype,ws=bg.toString,Tg=ws.call(Object),Sg=wg(Object.getPrototypeOf,Object),Os=Object.prototype,Ls=Os.hasOwnProperty,Vt=Symbol?Symbol.toStringTag:void 0,As=Os.toString;function wg(e,t){return function(n){return e(t(n))}}function Rs(e){if(!Og(e)||Lg(e)!==mg)return!1;var t=Sg(e);if(t===null)return!0;var n=Ls.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ws.call(n)===Tg}function Og(e){return e!=null&&typeof e=="object"}function Lg(e){return e==null?e===void 0?Eg:_g:Vt&&Vt in Object(e)?Ag(e):Rg(e)}function Ag(e){var t=Ls.call(e,Vt),n=e[Vt],r=!1;try{e[Vt]=void 0,r=!0}catch{}var i=As.call(e);return r&&(t?e[Vt]=n:delete e[Vt]),i}function Rg(e){return As.call(e)}var Cg=20;function xg(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e.shift(),r=new WeakMap;e.length>0;)n=Cs(n,e.shift(),0,r);return n}function ji(e){return Vn(e)?e.slice():e}function Cs(e,t,n,r){n===void 0&&(n=0);var i;if(!(n>Cg)){if(n++,Gn(e)||Gn(t)||Ps(t))i=ji(t);else if(Vn(e)){if(i=e.slice(),Vn(t))for(var o=0,a=t.length;o<a;o++)i.push(ji(t[o]));else if(Xe(t))for(var u=Object.keys(t),o=0,a=u.length;o<a;o++){var c=u[o];i[c]=ji(t[c])}}else if(Xe(e))if(Xe(t)){if(!Pg(e,t))return t;i=Object.assign({},e);for(var u=Object.keys(t),o=0,a=u.length;o<a;o++){var c=u[o],s=t[c];if(Gn(s))typeof s>"u"?delete i[c]:i[c]=s;else{var l=i[c],p=s;if(xs(e,c,r)||xs(t,c,r))delete i[c];else{if(Xe(l)&&Xe(p)){var f=r.get(l)||[],v=r.get(p)||[];f.push({obj:e,key:c}),v.push({obj:t,key:c}),r.set(l,f),r.set(p,v)}i[c]=Cs(i[c],s,n,r)}}}}else i=t;return i}}function xs(e,t,n){for(var r=n.get(e[t])||[],i=0,o=r.length;i<o;i++){var a=r[i];if(a.key===t&&a.obj===e)return!0}return!1}function Vn(e){return Array.isArray(e)}function Ps(e){return typeof e=="function"}function Xe(e){return!Gn(e)&&!Vn(e)&&!Ps(e)&&typeof e=="object"}function Gn(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function Pg(e,t){return!(!Rs(e)||!Rs(t))}function Ng(e,t){return typeof t=="string"?e===t:!!e.match(t)}var Ig=function(){function e(){var t=this;this._promise=new Promise(function(n,r){t._resolve=n,t._reject=r})}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(t){this._resolve(t)},e.prototype.reject=function(t){this._reject(t)},e}(),kg=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Mg=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Dg=function(){function e(t,n){this._callback=t,this._that=n,this._isCalled=!1,this._deferred=new Ig}return Object.defineProperty(e.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),e.prototype.call=function(){for(var t,n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((t=this._callback).call.apply(t,Mg([this._that],kg(r),!1))).then(function(o){return n._deferred.resolve(o)},function(o){return n._deferred.reject(o)})}catch(o){this._deferred.reject(o)}}return this._deferred.promise},e}(),Ug="exception",Bi=function(){return Bi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Bi.apply(this,arguments)},jg=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ns=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Bg=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},$g=function(){function e(t,n,r,i,o,a,u,c,s,l){u===void 0&&(u=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:Nn.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=r,this._spanContext=i,this.parentSpanId=a,this.kind=o,this.links=u;var p=Date.now();this._performanceStartTime=de.now(),this._performanceOffset=p-(this._performanceStartTime+Ni()),this._startTimeProvided=c!=null,this.startTime=this._getTime(c??p),this.resource=t.resource,this.instrumentationLibrary=t.instrumentationLibrary,this._spanLimits=t.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,l!=null&&this.setAttributes(l),this._spanProcessor=t.getActiveSpanProcessor(),this._spanProcessor.onStart(this,n)}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,n){return n==null||this._isSpanEnded()?this:t.length===0?(b.warn("Invalid attribute key: "+t),this):hs(n)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?(this._droppedAttributesCount++,this):(this.attributes[t]=this._truncateToSize(n),this):(b.warn("Invalid attribute value set for key: "+t),this)},e.prototype.setAttributes=function(t){var n,r;try{for(var i=jg(Object.entries(t)),o=i.next();!o.done;o=i.next()){var a=Ns(o.value,2),u=a[0],c=a[1];this.setAttribute(u,c)}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return this},e.prototype.addEvent=function(t,n,r){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return b.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&b.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),_s(n)&&(_s(r)||(r=n),n=void 0);var i=jn(n);return this.events.push({name:t,attributes:i,time:this._getTime(r),droppedAttributesCount:0}),this},e.prototype.addLink=function(t){return this.links.push(t),this},e.prototype.addLinks=function(t){var n;return(n=this.links).push.apply(n,Bg([],Ns(t),!1)),this},e.prototype.setStatus=function(t){return this._isSpanEnded()?this:(this.status=Bi({},t),this.status.message!=null&&typeof t.message!="string"&&(b.warn("Dropping invalid status.message of type '"+typeof t.message+"', expected 'string'"),delete this.status.message),this)},e.prototype.updateName=function(t){return this._isSpanEnded()?this:(this.name=t,this)},e.prototype.end=function(t){if(this._isSpanEnded()){b.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once.");return}this._ended=!0,this.endTime=this._getTime(t),this._duration=Qy(this.startTime,this.endTime),this._duration[0]<0&&(b.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&b.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},e.prototype._getTime=function(t){if(typeof t=="number"&&t<=de.now())return ms(t+this._performanceOffset);if(typeof t=="number")return At(t);if(t instanceof Date)return At(t.getTime());if(Ii(t))return t;if(this._startTimeProvided)return At(Date.now());var n=de.now()-this._performanceStartTime;return Es(this.startTime,At(n))},e.prototype.isRecording=function(){return this._ended===!1},e.prototype.recordException=function(t,n){var r={};typeof t=="string"?r[Ai]=t:t&&(t.code?r[Li]=t.code.toString():t.name&&(r[Li]=t.name),t.message&&(r[Ai]=t.message),t.stack&&(r[Uy]=t.stack)),r[Li]||r[Ai]?this.addEvent(Ug,r,n):b.warn("Failed to record an exception "+t)},Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),e.prototype._isSpanEnded=function(){return this._ended&&b.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},e.prototype._truncateToLimitUtil=function(t,n){return t.length<=n?t:t.substring(0,n)},e.prototype._truncateToSize=function(t){var n=this,r=this._attributeValueLengthLimit;return r<=0?(b.warn("Attribute value limit must be positive, got "+r),t):typeof t=="string"?this._truncateToLimitUtil(t,r):Array.isArray(t)?t.map(function(i){return typeof i=="string"?n._truncateToLimitUtil(i,r):i}):t},e}(),ye;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ye||(ye={}));var Hn=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:ye.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),ge=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:ye.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),$i=function(){function e(t){var n,r,i,o;this._root=t.root,this._root||(he(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new ge),this._remoteParentSampled=(n=t.remoteParentSampled)!==null&&n!==void 0?n:new ge,this._remoteParentNotSampled=(r=t.remoteParentNotSampled)!==null&&r!==void 0?r:new Hn,this._localParentSampled=(i=t.localParentSampled)!==null&&i!==void 0?i:new ge,this._localParentNotSampled=(o=t.localParentNotSampled)!==null&&o!==void 0?o:new Hn}return e.prototype.shouldSample=function(t,n,r,i,o,a){var u=k.getSpanContext(t);return!u||!je(u)?this._root.shouldSample(t,n,r,i,o,a):u.isRemote?u.traceFlags&ft.SAMPLED?this._remoteParentSampled.shouldSample(t,n,r,i,o,a):this._remoteParentNotSampled.shouldSample(t,n,r,i,o,a):u.traceFlags&ft.SAMPLED?this._localParentSampled.shouldSample(t,n,r,i,o,a):this._localParentNotSampled.shouldSample(t,n,r,i,o,a)},e.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()+"}"},e}(),Is=function(){function e(t){t===void 0&&(t=0),this._ratio=t,this._ratio=this._normalize(t),this._upperBound=Math.floor(this._ratio*4294967295)}return e.prototype.shouldSample=function(t,n){return{decision:Ua(n)&&this._accumulate(n)<this._upperBound?ye.RECORD_AND_SAMPLED:ye.NOT_RECORD}},e.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},e.prototype._normalize=function(t){return typeof t!="number"||isNaN(t)?0:t>=1?1:t<=0?0:t},e.prototype._accumulate=function(t){for(var n=0,r=0;r<t.length/8;r++){var i=r*8,o=parseInt(t.slice(i,i+8),16);n=(n^o)>>>0}return n},e}(),Fg=ht.AlwaysOn,me=1;function ks(){var e=qe();return{sampler:Ms(e),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:e.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:e.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:e.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:e.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:e.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:e.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:e.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:e.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function Ms(e){switch(e===void 0&&(e=qe()),e.OTEL_TRACES_SAMPLER){case ht.AlwaysOn:return new ge;case ht.AlwaysOff:return new Hn;case ht.ParentBasedAlwaysOn:return new $i({root:new ge});case ht.ParentBasedAlwaysOff:return new $i({root:new Hn});case ht.TraceIdRatio:return new Is(Ds(e));case ht.ParentBasedTraceIdRatio:return new $i({root:new Is(Ds(e))});default:return b.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Fg+'".'),new ge}}function Ds(e){if(e.OTEL_TRACES_SAMPLER_ARG===void 0||e.OTEL_TRACES_SAMPLER_ARG==="")return b.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+me+"."),me;var t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(b.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+me+"."),me):t<0||t>1?(b.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+me+"."),me):t}function Vg(e){var t={sampler:Ms()},n=ks(),r=Object.assign({},n,t,e);return r.generalLimits=Object.assign({},n.generalLimits,e.generalLimits||{}),r.spanLimits=Object.assign({},n.spanLimits,e.spanLimits||{}),r}function Gg(e){var t,n,r,i,o,a,u,c,s,l,p,f,v=Object.assign({},e.spanLimits),y=xy();return v.attributeCountLimit=(a=(o=(i=(n=(t=e.spanLimits)===null||t===void 0?void 0:t.attributeCountLimit)!==null&&n!==void 0?n:(r=e.generalLimits)===null||r===void 0?void 0:r.attributeCountLimit)!==null&&i!==void 0?i:y.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:y.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&a!==void 0?a:$n,v.attributeValueLengthLimit=(f=(p=(l=(c=(u=e.spanLimits)===null||u===void 0?void 0:u.attributeValueLengthLimit)!==null&&c!==void 0?c:(s=e.generalLimits)===null||s===void 0?void 0:s.attributeValueLengthLimit)!==null&&l!==void 0?l:y.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:y.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&f!==void 0?f:Bn,Object.assign({},e,{spanLimits:v})}var Hg=function(){function e(t,n){this._exporter=t,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var r=qe();this._maxExportBatchSize=typeof n?.maxExportBatchSize=="number"?n.maxExportBatchSize:r.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof n?.maxQueueSize=="number"?n.maxQueueSize:r.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof n?.scheduledDelayMillis=="number"?n.scheduledDelayMillis:r.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof n?.exportTimeoutMillis=="number"?n.exportTimeoutMillis:r.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new Dg(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(b.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},e.prototype.onStart=function(t,n){},e.prototype.onEnd=function(t){this._shutdownOnce.isCalled||(t.spanContext().traceFlags&ft.SAMPLED)!==0&&this._addToBuffer(t)},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){var t=this;return Promise.resolve().then(function(){return t.onShutdown()}).then(function(){return t._flushAll()}).then(function(){return t._exporter.shutdown()})},e.prototype._addToBuffer=function(t){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&b.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(b.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(t),this._maybeStartTimer()},e.prototype._flushAll=function(){var t=this;return new Promise(function(n,r){for(var i=[],o=Math.ceil(t._finishedSpans.length/t._maxExportBatchSize),a=0,u=o;a<u;a++)i.push(t._flushOneBatch());Promise.all(i).then(function(){n()}).catch(r)})},e.prototype._flushOneBatch=function(){var t=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(n,r){var i=setTimeout(function(){r(new Error("Timeout"))},t._exportTimeoutMillis);P.with(Zv(P.active()),function(){var o;t._finishedSpans.length<=t._maxExportBatchSize?(o=t._finishedSpans,t._finishedSpans=[]):o=t._finishedSpans.splice(0,t._maxExportBatchSize);for(var a=function(){return t._exporter.export(o,function(p){var f;clearTimeout(i),p.code===ki.SUCCESS?n():r((f=p.error)!==null&&f!==void 0?f:new Error("BatchSpanProcessor: span export failed"))})},u=null,c=0,s=o.length;c<s;c++){var l=o[c];l.resource.asyncAttributesPending&&l.resource.waitForAsyncAttributes&&(u!=null||(u=[]),u.push(l.resource.waitForAsyncAttributes()))}u===null?a():Promise.all(u).then(a,function(p){he(p),r(p)})})})},e.prototype._maybeStartTimer=function(){var t=this;if(!this._isExporting){var n=function(){t._isExporting=!0,t._flushOneBatch().finally(function(){t._isExporting=!1,t._finishedSpans.length>0&&(t._clearTimer(),t._maybeStartTimer())}).catch(function(r){t._isExporting=!1,he(r)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return n();this._timer===void 0&&(this._timer=setTimeout(function(){return n()},this._scheduledDelayMillis))}},e.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},e}(),qg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Us=function(e){qg(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.onInit(r),i}return t.prototype.onInit=function(n){var r=this;n?.disableAutoFlushOnDocumentHide!==!0&&typeof document<"u"&&(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&r.forceFlush().catch(function(i){he(i)})},this._pageHideListener=function(){r.forceFlush().catch(function(i){he(i)})},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},t.prototype.onShutdown=function(){typeof document<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},t}(Hg),zg=8,Xg=16,Kg=function(){function e(){this.generateTraceId=js(Xg),this.generateSpanId=js(zg)}return e}(),qn=Array(32);function js(e){return function(){for(var t=0;t<e*2;t++)qn[t]=Math.floor(Math.random()*16)+48,qn[t]>=58&&(qn[t]+=39);return String.fromCharCode.apply(null,qn.slice(0,e*2))}}var Wg=function(){function e(t,n,r){this._tracerProvider=r;var i=Vg(n);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=n.idGenerator||new Kg,this.resource=r.resource,this.instrumentationLibrary=t}return e.prototype.startSpan=function(t,n,r){var i,o,a;n===void 0&&(n={}),r===void 0&&(r=P.active()),n.root&&(r=k.deleteSpan(r));var u=k.getSpan(r);if(Ti(r)){b.debug("Instrumentation suppressed, returning Noop Span");var c=k.wrapSpanContext(Ma);return c}var s=u?.spanContext(),l=this._idGenerator.generateSpanId(),p,f,v;!s||!k.isSpanContextValid(s)?p=this._idGenerator.generateTraceId():(p=s.traceId,f=s.traceState,v=s.spanId);var y=(i=n.kind)!==null&&i!==void 0?i:Be.INTERNAL,g=((o=n.links)!==null&&o!==void 0?o:[]).map(function(nt){return{context:nt.context,attributes:jn(nt.attributes)}}),m=jn(n.attributes),E=this._sampler.shouldSample(r,p,t,y,m,g);f=(a=E.traceState)!==null&&a!==void 0?a:f;var S=E.decision===Pn.RECORD_AND_SAMPLED?ft.SAMPLED:ft.NONE,N={traceId:p,spanId:l,traceFlags:S,traceState:f};if(E.decision===Pn.NOT_RECORD){b.debug("Recording is off, propagating context in a non-recording span");var c=k.wrapSpanContext(N);return c}var j=jn(Object.assign(m,E.attributes)),$=new $g(this,r,t,N,y,v,g,n.startTime,void 0,j);return $},e.prototype.startActiveSpan=function(t,n,r,i){var o,a,u;if(!(arguments.length<2)){arguments.length===2?u=n:arguments.length===3?(o=n,u=r):(o=n,a=r,u=i);var c=a??P.active(),s=this.startSpan(t,o,c),l=k.setSpan(c,s);return P.with(l,u,void 0,s)}},e.prototype.getGeneralLimits=function(){return this._generalLimits},e.prototype.getSpanLimits=function(){return this._spanLimits},e.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},e}();function Yg(){return"unknown_service"}var Ct=function(){return Ct=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ct.apply(this,arguments)},Jg=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},Qg=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Zg=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Bs=function(){function e(t,n){var r=this,i;this._attributes=t,this.asyncAttributesPending=n!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=n?.then(function(o){return r._attributes=Object.assign({},r._attributes,o),r.asyncAttributesPending=!1,o},function(o){return b.debug("a resource's async attributes promise rejected: %s",o),r.asyncAttributesPending=!1,{}})}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e((t={},t[zy]=Yg(),t[Ci]=Pi[Ci],t[Ri]=Pi[Ri],t[xi]=Pi[xi],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&b.error("Accessing resource attributes before async attributes settled"),(t=this._attributes)!==null&&t!==void 0?t:{}},enumerable:!1,configurable:!0}),e.prototype.waitForAsyncAttributes=function(){return Jg(this,void 0,void 0,function(){return Qg(this,function(t){switch(t.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},e.prototype.merge=function(t){var n=this,r;if(!t)return this;var i=Ct(Ct({},this._syncAttributes),(r=t._syncAttributes)!==null&&r!==void 0?r:t.attributes);if(!this._asyncAttributesPromise&&!t._asyncAttributesPromise)return new e(i);var o=Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then(function(a){var u,c=Zg(a,2),s=c[0],l=c[1];return Ct(Ct(Ct(Ct({},n._syncAttributes),s),(u=t._syncAttributes)!==null&&u!==void 0?u:t.attributes),l)});return new e(i,o)},e.EMPTY=new e({}),e}(),zn=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},$s=function(){function e(t){this._spanProcessors=t}return e.prototype.forceFlush=function(){var t,n,r=[];try{for(var i=zn(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;r.push(a.forceFlush())}}catch(u){t={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return new Promise(function(u){Promise.all(r).then(function(){u()}).catch(function(c){he(c||new Error("MultiSpanProcessor: forceFlush failed")),u()})})},e.prototype.onStart=function(t,n){var r,i;try{for(var o=zn(this._spanProcessors),a=o.next();!a.done;a=o.next()){var u=a.value;u.onStart(t,n)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},e.prototype.onEnd=function(t){var n,r;try{for(var i=zn(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;a.onEnd(t)}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype.shutdown=function(){var t,n,r=[];try{for(var i=zn(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;r.push(a.shutdown())}}catch(u){t={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return new Promise(function(u,c){Promise.all(r).then(function(){u()},c)})},e}(),tm=function(){function e(){}return e.prototype.onStart=function(t,n){},e.prototype.onEnd=function(t){},e.prototype.shutdown=function(){return Promise.resolve()},e.prototype.forceFlush=function(){return Promise.resolve()},e}(),em=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},nm=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Gt;(function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"})(Gt||(Gt={}));var rm=function(){function e(t){t===void 0&&(t={});var n,r;this._registeredSpanProcessors=[],this._tracers=new Map;var i=xg({},ks(),Gg(t));if(this.resource=(n=i.resource)!==null&&n!==void 0?n:Bs.empty(),i.mergeResourceWithDefaults&&(this.resource=Bs.default().merge(this.resource)),this._config=Object.assign({},i,{resource:this.resource}),!((r=t.spanProcessors)===null||r===void 0)&&r.length)this._registeredSpanProcessors=nm([],em(t.spanProcessors),!1),this.activeSpanProcessor=new $s(this._registeredSpanProcessors);else{var o=this._buildExporterFromEnv();if(o!==void 0){var a=new Us(o);this.activeSpanProcessor=a}else this.activeSpanProcessor=new tm}}return e.prototype.getTracer=function(t,n,r){var i=t+"@"+(n||"")+":"+(r?.schemaUrl||"");return this._tracers.has(i)||this._tracers.set(i,new Wg({name:t,version:n,schemaUrl:r?.schemaUrl},this._config,this)),this._tracers.get(i)},e.prototype.addSpanProcessor=function(t){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(n){return b.error("Error while trying to shutdown current span processor",n)}),this._registeredSpanProcessors.push(t),this.activeSpanProcessor=new $s(this._registeredSpanProcessors)},e.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},e.prototype.register=function(t){t===void 0&&(t={}),k.setGlobalTracerProvider(this),t.propagator===void 0&&(t.propagator=this._buildPropagatorFromEnv()),t.contextManager&&P.setGlobalContextManager(t.contextManager),t.propagator&&Z.setGlobalPropagator(t.propagator)},e.prototype.forceFlush=function(){var t=this._config.forceFlushTimeoutMillis,n=this._registeredSpanProcessors.map(function(r){return new Promise(function(i){var o,a=setTimeout(function(){i(new Error("Span processor did not completed within timeout period of "+t+" ms")),o=Gt.timeout},t);r.forceFlush().then(function(){clearTimeout(a),o!==Gt.timeout&&(o=Gt.resolved,i(o))}).catch(function(u){clearTimeout(a),o=Gt.error,i(u)})})});return new Promise(function(r,i){Promise.all(n).then(function(o){var a=o.filter(function(u){return u!==Gt.resolved});a.length>0?i(a):r()}).catch(function(o){return i([o])})})},e.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},e.prototype._getPropagator=function(t){var n;return(n=this.constructor._registeredPropagators.get(t))===null||n===void 0?void 0:n()},e.prototype._getSpanExporter=function(t){var n;return(n=this.constructor._registeredExporters.get(t))===null||n===void 0?void 0:n()},e.prototype._buildPropagatorFromEnv=function(){var t=this,n=Array.from(new Set(qe().OTEL_PROPAGATORS)),r=n.map(function(o){var a=t._getPropagator(o);return a||b.warn('Propagator "'+o+'" requested through environment variable is unavailable.'),a}),i=r.reduce(function(o,a){return a&&o.push(a),o},[]);if(i.length!==0)return n.length===1?i[0]:new tg({propagators:i})},e.prototype._buildExporterFromEnv=function(){var t=qe().OTEL_TRACES_EXPORTER;if(!(t==="none"||t==="")){var n=this._getSpanExporter(t);return n||b.error('Exporter "'+t+'" requested through environment variable is unavailable.'),n}},e._registeredPropagators=new Map([["tracecontext",function(){return new gg}],["baggage",function(){return new uy}]]),e._registeredExporters=new Map,e}(),im=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},om=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Fs=function(){function e(){this._enabled=!1,this._currentContext=Bt}return e.prototype._bindFunction=function(t,n){t===void 0&&(t=Bt);var r=this,i=function(){for(var o=this,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return r.with(t,function(){return n.apply(o,a)})};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:n.length}),i},e.prototype.active=function(){return this._currentContext},e.prototype.bind=function(t,n){return t===void 0&&(t=this.active()),typeof n=="function"?this._bindFunction(t,n):n},e.prototype.disable=function(){return this._currentContext=Bt,this._enabled=!1,this},e.prototype.enable=function(){return this._enabled?this:(this._enabled=!0,this._currentContext=Bt,this)},e.prototype.with=function(t,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var a=this._currentContext;this._currentContext=t||Bt;try{return n.call.apply(n,om([r],im(i),!1))}finally{this._currentContext=a}},e}(),am=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),sm=function(e){am(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,n)||this;if(n.contextManager)throw"contextManager should be defined in register method not in constructor";if(n.propagator)throw"propagator should be defined in register method not in constructor";return r}return t.prototype.register=function(n){n===void 0&&(n={}),n.contextManager===void 0&&(n.contextManager=new Fs),n.contextManager&&n.contextManager.enable(),e.prototype.register.call(this,n)},t}(rm),O;(function(e){e.CONNECT_END="connectEnd",e.CONNECT_START="connectStart",e.DECODED_BODY_SIZE="decodedBodySize",e.DOM_COMPLETE="domComplete",e.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",e.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",e.DOM_INTERACTIVE="domInteractive",e.DOMAIN_LOOKUP_END="domainLookupEnd",e.DOMAIN_LOOKUP_START="domainLookupStart",e.ENCODED_BODY_SIZE="encodedBodySize",e.FETCH_START="fetchStart",e.LOAD_EVENT_END="loadEventEnd",e.LOAD_EVENT_START="loadEventStart",e.NAVIGATION_START="navigationStart",e.REDIRECT_END="redirectEnd",e.REDIRECT_START="redirectStart",e.REQUEST_START="requestStart",e.RESPONSE_END="responseEnd",e.RESPONSE_START="responseStart",e.SECURE_CONNECTION_START="secureConnectionStart",e.UNLOAD_EVENT_END="unloadEventEnd",e.UNLOAD_EVENT_START="unloadEventStart"})(O||(O={}));var Fi;function um(){return Fi||(Fi=document.createElement("a")),Fi}function xt(e,t){return t in e}function q(e,t,n,r){var i=void 0,o=void 0;xt(n,t)&&typeof n[t]=="number"&&(i=n[t]);var a=O.FETCH_START;if(xt(n,a)&&typeof n[a]=="number"&&(o=n[a]),i!==void 0&&o!==void 0&&i>=o)return e.addEvent(t,i),e}function _e(e,t,n){n===void 0&&(n=!1),n||(q(e,O.FETCH_START,t),q(e,O.DOMAIN_LOOKUP_START,t),q(e,O.DOMAIN_LOOKUP_END,t),q(e,O.CONNECT_START,t),xt(t,"name")&&t.name.startsWith("https:")&&q(e,O.SECURE_CONNECTION_START,t),q(e,O.CONNECT_END,t),q(e,O.REQUEST_START,t),q(e,O.RESPONSE_START,t),q(e,O.RESPONSE_END,t));var r=t[O.ENCODED_BODY_SIZE];r!==void 0&&e.setAttribute(jy,r);var i=t[O.DECODED_BODY_SIZE];i!==void 0&&r!==i&&e.setAttribute(By,i)}function cm(e){return e.slice().sort(function(t,n){var r=t[O.FETCH_START],i=n[O.FETCH_START];return r>i?1:r<i?-1:0})}function Vs(){return typeof location<"u"?location.origin:void 0}function Gs(e,t,n,r,i,o){i===void 0&&(i=new WeakSet);var a=mt(e);e=a.toString();var u=pm(e,t,n,r,i,o);if(u.length===0)return{mainRequest:void 0};if(u.length===1)return{mainRequest:u[0]};var c=cm(u);if(a.origin!==Vs()&&c.length>1){var s=c[0],l=lm(c,s[O.RESPONSE_END],n),p=s[O.RESPONSE_END],f=l[O.FETCH_START];return f<p&&(l=s,s=void 0),{corsPreFlightRequest:s,mainRequest:l}}else return{mainRequest:u[0]}}function lm(e,t,n){for(var r=Rt(n),i=Rt(ze(t)),o=e[1],a,u=e.length,c=1;c<u;c++){var s=e[c],l=Rt(ze(s[O.FETCH_START])),p=Rt(ze(s[O.RESPONSE_END])),f=r-p;l>=i&&(!a||f<a)&&(a=f,o=s)}return o}function pm(e,t,n,r,i,o){var a=Rt(t),u=Rt(n),c=r.filter(function(s){var l=Rt(ze(s[O.FETCH_START])),p=Rt(ze(s[O.RESPONSE_END]));return s.initiatorType.toLowerCase()===(o||"xmlhttprequest")&&s.name===e&&l>=a&&p<=u});return c.length>0&&(c=c.filter(function(s){return!i.has(s)})),c}function mt(e){if(typeof URL=="function")return new URL(e,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);var t=um();return t.href=e,t}function Hs(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return"/";var n=hm(e,t);if(t&&n.indexOf("@id")>0)return n;var r="";return e.parentNode&&(r+=Hs(e.parentNode,!1)),r+=n,r}function fm(e){if(!e.parentNode)return 0;var t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);var n=Array.from(e.parentNode.childNodes);return n=n.filter(function(r){var i=r.localName;return t.indexOf(r.nodeType)>=0&&i===e.localName}),n.length>=1?n.indexOf(e)+1:0}function hm(e,t){var n=e.nodeType,r=fm(e),i="";if(n===Node.ELEMENT_NODE){var o=e.getAttribute("id");if(t&&o)return'//*[@id="'+o+'"]';i=e.localName}else if(n===Node.TEXT_NODE||n===Node.CDATA_SECTION_NODE)i="text()";else if(n===Node.COMMENT_NODE)i="comment()";else return"";return i&&r>1?"/"+i+"["+r+"]":"/"+i}function qs(e,t){var n=t||[];(typeof n=="string"||n instanceof RegExp)&&(n=[n]);var r=mt(e);return r.origin===Vs()?!0:n.some(function(i){return Ng(e,i)})}var zs=function(){function e(){}return e.prototype.emit=function(t){},e}(),dm=new zs,vm=function(){function e(){}return e.prototype.getLogger=function(t,n,r){return new zs},e}(),Xs=new vm,ym=function(){function e(t,n,r,i){this._provider=t,this.name=n,this.version=r,this.options=i}return e.prototype.emit=function(t){this._getLogger().emit(t)},e.prototype._getLogger=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):dm},e}(),Ks=function(){function e(){}return e.prototype.getLogger=function(t,n,r){var i;return(i=this.getDelegateLogger(t,n,r))!==null&&i!==void 0?i:new ym(this,t,n,r)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Xs},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateLogger=function(t,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(t,n,r)},e}(),gm=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Xn=Symbol.for("io.opentelemetry.js.api.logs"),Ke=gm;function mm(e,t,n){return function(r){return r===e?t:n}}var Ws=1,_m=function(){function e(){this._proxyLoggerProvider=new Ks}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(t){return Ke[Xn]?this.getLoggerProvider():(Ke[Xn]=mm(Ws,t,Xs),this._proxyLoggerProvider.setDelegate(t),t)},e.prototype.getLoggerProvider=function(){var t,n;return(n=(t=Ke[Xn])===null||t===void 0?void 0:t.call(Ke,Ws))!==null&&n!==void 0?n:this._proxyLoggerProvider},e.prototype.getLogger=function(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)},e.prototype.disable=function(){delete Ke[Xn],this._proxyLoggerProvider=new Ks},e}(),Em=_m.getInstance(),Vi=function(){return Vi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Vi.apply(this,arguments)},bm=function(){function e(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this._config={},this._wrap=K.wrap,this._unwrap=K.unwrap,this._massWrap=K.massWrap,this._massUnwrap=K.massUnwrap,this.setConfig(r),this._diag=b.createComponentLogger({namespace:t}),this._tracer=k.getTracer(t,n),this._meter=pe.getMeter(t,n),this._logger=Em.getLogger(t,n),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var t,n=(t=this.init())!==null&&t!==void 0?t:[];return Array.isArray(n)?n:[n]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(t){this._config=Vi({enabled:!0},t)},e.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(t,n,r,i){if(t)try{t(r,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},e}(),Tm=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sm=function(e){Tm(t,e);function t(n,r,i){var o=e.call(this,n,r,i)||this;return o._config.enabled&&o.enable(),o}return t}(bm);function Ys(e,t,n){var r,i;try{i=e()}catch(o){r=o}finally{return t(r,i),i}}var We;(function(e){e.DOCUMENT_LOAD="documentLoad",e.DOCUMENT_FETCH="documentFetch",e.RESOURCE_FETCH="resourceFetch"})(We||(We={}));var wm="0.44.0",Om="@opentelemetry/instrumentation-document-load";const Lm="http.url",Am="http.user_agent",Ee=Lm,Rm=Am;var Kn;(function(e){e.FIRST_PAINT="firstPaint",e.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(Kn||(Kn={}));var Cm=function(){var e,t,n={},r=(t=(e=Un).getEntriesByType)===null||t===void 0?void 0:t.call(e,"navigation")[0];if(r){var i=Object.values(O);i.forEach(function(u){if(xt(r,u)){var c=r[u];typeof c=="number"&&(n[u]=c)}})}else{var o=Un,a=o.timing;if(a){var i=Object.values(O);i.forEach(function(c){if(xt(a,c)){var s=a[c];typeof s=="number"&&(n[c]=s)}})}}return n},Js={"first-paint":Kn.FIRST_PAINT,"first-contentful-paint":Kn.FIRST_CONTENTFUL_PAINT},xm=function(e){var t,n,r=(n=(t=Un).getEntriesByType)===null||n===void 0?void 0:n.call(t,"paint");r&&r.forEach(function(i){var o=i.name,a=i.startTime;xt(Js,o)&&e.addEvent(Js[o],a)})},Pm=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nm=function(e){Pm(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,Om,wm,n)||this;return r.component="document-load",r.version="1",r.moduleName=r.component,r}return t.prototype.init=function(){},t.prototype._onDocumentLoaded=function(){var n=this;window.setTimeout(function(){n._collectPerformance()})},t.prototype._addResourcesSpans=function(n){var r=this,i,o,a=(o=(i=Un).getEntriesByType)===null||o===void 0?void 0:o.call(i,"resource");a&&a.forEach(function(u){r._initResourceSpan(u,n)})},t.prototype._collectPerformance=function(){var n=this,r=Array.from(document.getElementsByTagName("meta")).find(function(a){return a.getAttribute("name")===Qv}),i=Cm(),o=r&&r.content||"";P.with(Z.extract(Bt,{traceparent:o}),function(){var a,u=n._startSpan(We.DOCUMENT_LOAD,O.FETCH_START,i);u&&(P.with(k.setSpan(P.active(),u),function(){var c=n._startSpan(We.DOCUMENT_FETCH,O.FETCH_START,i);c&&(c.setAttribute(Ee,location.href),P.with(k.setSpan(P.active(),c),function(){var s;n.getConfig().ignoreNetworkEvents||_e(c,i),n._addCustomAttributesOnSpan(c,(s=n.getConfig().applyCustomAttributesOnSpan)===null||s===void 0?void 0:s.documentFetch),n._endSpan(c,O.RESPONSE_END,i)}))}),u.setAttribute(Ee,location.href),u.setAttribute(Rm,navigator.userAgent),n._addResourcesSpans(u),n.getConfig().ignoreNetworkEvents||(q(u,O.FETCH_START,i),q(u,O.UNLOAD_EVENT_START,i),q(u,O.UNLOAD_EVENT_END,i),q(u,O.DOM_INTERACTIVE,i),q(u,O.DOM_CONTENT_LOADED_EVENT_START,i),q(u,O.DOM_CONTENT_LOADED_EVENT_END,i),q(u,O.DOM_COMPLETE,i),q(u,O.LOAD_EVENT_START,i),q(u,O.LOAD_EVENT_END,i)),n.getConfig().ignorePerformancePaintEvents||xm(u),n._addCustomAttributesOnSpan(u,(a=n.getConfig().applyCustomAttributesOnSpan)===null||a===void 0?void 0:a.documentLoad),n._endSpan(u,O.LOAD_EVENT_END,i))})},t.prototype._endSpan=function(n,r,i){n&&(xt(i,r)?n.end(i[r]):n.end())},t.prototype._initResourceSpan=function(n,r){var i,o=this._startSpan(We.RESOURCE_FETCH,O.FETCH_START,n,r);o&&(o.setAttribute(Ee,n.name),this.getConfig().ignoreNetworkEvents||_e(o,n),this._addCustomAttributesOnResourceSpan(o,n,(i=this.getConfig().applyCustomAttributesOnSpan)===null||i===void 0?void 0:i.resourceFetch),this._endSpan(o,O.RESPONSE_END,n))},t.prototype._startSpan=function(n,r,i,o){if(xt(i,r)&&typeof i[r]=="number"){var a=this.tracer.startSpan(n,{startTime:i[r]},o?k.setSpan(P.active(),o):void 0);return a}},t.prototype._waitForPageLoad=function(){window.document.readyState==="complete"?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded))},t.prototype._addCustomAttributesOnSpan=function(n,r){var i=this;r&&Ys(function(){return r(n)},function(o){o&&i._diag.error("addCustomAttributesOnSpan",o)})},t.prototype._addCustomAttributesOnResourceSpan=function(n,r,i){var o=this;i&&Ys(function(){return i(n,r)},function(a){a&&o._diag.error("addCustomAttributesOnResourceSpan",a)})},t.prototype.enable=function(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()},t.prototype.disable=function(){window.removeEventListener("load",this._onDocumentLoaded)},t}(Sm),Qs=function(){function e(){}return e.prototype.emit=function(t){},e}(),Im=new Qs,km=function(){function e(){}return e.prototype.getLogger=function(t,n,r){return new Qs},e}(),Zs=new km,Mm=function(){function e(t,n,r,i){this._provider=t,this.name=n,this.version=r,this.options=i}return e.prototype.emit=function(t){this._getLogger().emit(t)},e.prototype._getLogger=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):Im},e}(),tu=function(){function e(){}return e.prototype.getLogger=function(t,n,r){var i;return(i=this.getDelegateLogger(t,n,r))!==null&&i!==void 0?i:new Mm(this,t,n,r)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Zs},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateLogger=function(t,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(t,n,r)},e}(),Dm=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Wn=Symbol.for("io.opentelemetry.js.api.logs"),Ye=Dm;function Um(e,t,n){return function(r){return r===e?t:n}}var eu=1,jm=function(){function e(){this._proxyLoggerProvider=new tu}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(t){return Ye[Wn]?this.getLoggerProvider():(Ye[Wn]=Um(eu,t,Zs),this._proxyLoggerProvider.setDelegate(t),t)},e.prototype.getLoggerProvider=function(){var t,n;return(n=(t=Ye[Wn])===null||t===void 0?void 0:t.call(Ye,eu))!==null&&n!==void 0?n:this._proxyLoggerProvider},e.prototype.getLogger=function(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)},e.prototype.disable=function(){delete Ye[Wn],this._proxyLoggerProvider=new tu},e}(),Bm=jm.getInstance(),Gi=function(){return Gi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Gi.apply(this,arguments)},$m=function(){function e(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this._config={},this._wrap=K.wrap,this._unwrap=K.unwrap,this._massWrap=K.massWrap,this._massUnwrap=K.massUnwrap,this.setConfig(r),this._diag=b.createComponentLogger({namespace:t}),this._tracer=k.getTracer(t,n),this._meter=pe.getMeter(t,n),this._logger=Bm.getLogger(t,n),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var t,n=(t=this.init())!==null&&t!==void 0?t:[];return Array.isArray(n)?n:[n]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(t){this._config=Gi({enabled:!0},t)},e.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(t,n,r,i){if(t)try{t(r,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},e}(),Fm=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vm=function(e){Fm(t,e);function t(n,r,i){var o=e.call(this,n,r,i)||this;return o._config.enabled&&o.enable(),o}return t}($m);function Gm(e,t,n){var r,i;try{i=e()}catch(o){r=o}finally{return t(r,i),i}}function Hm(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}var Hi=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},qi=performance,qm="http.method",zm="http.url",Xm="http.host",Km="http.scheme",Wm="http.status_code",Ym="http.user_agent",Jm="http.request_content_length_uncompressed",Qm=qm,Zm=zm,t_=Xm,e_=Km,n_=Wm,r_=Ym,i_=Jm,o_=9,a_=6,s_=Math.pow(10,a_),nu=Math.pow(10,o_);function zi(e){var t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*s_);return[n,r]}function u_(){var e=qi.timeOrigin;if(typeof e!="number"){var t=qi;e=t.timing&&t.timing.fetchStart}return e}function ru(e){var t=zi(u_()),n=zi(qi.now());return c_(t,n)}function c_(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=nu&&(n[1]-=nu,n[0]+=1),n}var l_=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function p_(e,t){return typeof t=="string"?e===t:!!e.match(t)}function f_(e,t){var n,r;if(!t)return!1;try{for(var i=l_(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(p_(e,a))return!0}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1}var Yn;(function(e){e.COMPONENT="component",e.HTTP_ERROR_NAME="http.error_name",e.HTTP_STATUS_TEXT="http.status_text"})(Yn||(Yn={}));var h_=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},d_=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},v_=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},y_=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},iu=b.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function g_(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e[0]instanceof URL||typeof e[0]=="string"){var n=e[1];if(!(n!=null&&n.body))return Promise.resolve();if(n.body instanceof ReadableStream){var r=m_(n.body),i=r.body,o=r.length;return n.body=i,o}else return Promise.resolve(__(n.body))}else{var a=e[0];return a!=null&&a.body?a.clone().text().then(function(u){return Xi(u)}):Promise.resolve()}}function m_(e){if(!e.pipeThrough)return iu.warn("Platform has ReadableStream but not pipeThrough!"),{body:e,length:Promise.resolve(void 0)};var t=0,n,r=new Promise(function(o){n=o}),i=new TransformStream({start:function(){},transform:function(o,a){return h_(this,void 0,void 0,function(){var u;return d_(this,function(c){switch(c.label){case 0:return[4,o];case 1:return u=c.sent(),t+=u.byteLength,a.enqueue(o),[2]}})})},flush:function(){n(t)}});return{body:e.pipeThrough(i),length:r}}function __(e){if(typeof Document<"u"&&e instanceof Document)return new XMLSerializer().serializeToString(document).length;if(e instanceof Blob)return e.size;if(e.byteLength!==void 0)return e.byteLength;if(e instanceof FormData)return b_(e);if(e instanceof URLSearchParams)return Xi(e.toString());if(typeof e=="string")return Xi(e);iu.warn("unknown body type")}var E_=new TextEncoder;function Xi(e){return E_.encode(e).byteLength}function b_(e){var t,n,r=0;try{for(var i=v_(e.entries()),o=i.next();!o.done;o=i.next()){var a=y_(o.value,2),u=a[0],c=a[1];r+=u.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}var ou="0.57.2",T_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),S_=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},w_=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Ki,O_=300,au=typeof process=="object"&&((Ki=process.release)===null||Ki===void 0?void 0:Ki.name)==="node",L_=function(e){T_(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,"@opentelemetry/instrumentation-fetch",ou,n)||this;return r.component="fetch",r.version=ou,r.moduleName=r.component,r._usedResources=new WeakSet,r._tasksCount=0,r}return t.prototype.init=function(){},t.prototype._addChildSpan=function(n,r){var i=this.tracer.startSpan("CORS Preflight",{startTime:r[O.FETCH_START]},k.setSpan(P.active(),n));_e(i,r,this.getConfig().ignoreNetworkEvents),i.end(r[O.RESPONSE_END])},t.prototype._addFinalSpanAttributes=function(n,r){var i=mt(r.url);n.setAttribute(n_,r.status),r.statusText!=null&&n.setAttribute(Yn.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(t_,i.host),n.setAttribute(e_,i.protocol.replace(":","")),typeof navigator<"u"&&n.setAttribute(r_,navigator.userAgent)},t.prototype._addHeaders=function(n,r){if(!qs(r,this.getConfig().propagateTraceHeaderCorsUrls)){var i={};Z.inject(P.active(),i),Object.keys(i).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}if(n instanceof Request)Z.inject(P.active(),n.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else if(n.headers instanceof Headers)Z.inject(P.active(),n.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else if(n.headers instanceof Map)Z.inject(P.active(),n.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else{var i={};Z.inject(P.active(),i),n.headers=Object.assign({},i,n.headers||{})}},t.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)},t.prototype._createSpan=function(n,r){var i;if(r===void 0&&(r={}),f_(n,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var o=(r.method||"GET").toUpperCase(),a="HTTP "+o;return this.tracer.startSpan(a,{kind:Be.CLIENT,attributes:(i={},i[Yn.COMPONENT]=this.moduleName,i[Qm]=o,i[Zm]=n,i)})},t.prototype._findResourceAndAddNetworkEvents=function(n,r,i){var o=r.entries;if(!o.length){if(!performance.getEntriesByType)return;o=performance.getEntriesByType("resource")}var a=Gs(r.spanUrl,r.startTime,i,o,this._usedResources,"fetch");if(a.mainRequest){var u=a.mainRequest;this._markResourceAsUsed(u);var c=a.corsPreFlightRequest;c&&(this._addChildSpan(n,c),this._markResourceAsUsed(c)),_e(n,u,this.getConfig().ignoreNetworkEvents)}},t.prototype._markResourceAsUsed=function(n){this._usedResources.add(n)},t.prototype._endSpan=function(n,r,i){var o=this,a=zi(Date.now()),u=ru();this._addFinalSpanAttributes(n,i),setTimeout(function(){var c;(c=r.observer)===null||c===void 0||c.disconnect(),o._findResourceAndAddNetworkEvents(n,r,u),o._tasksCount--,o._clearResources(),n.end(a)},O_)},t.prototype._patchConstructor=function(){var n=this;return function(r){var i=n;return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=this,c=mt(o[0]instanceof Request?o[0].url:String(o[0])).href,s=o[0]instanceof Request?o[0]:o[1]||{},l=i._createSpan(c,s);if(!l)return r.apply(this,o);var p=i._prepareSpanData(c);i.getConfig().measureRequestSize&&g_.apply(void 0,w_([],S_(o),!1)).then(function(m){m&&l.setAttribute(i_,m)}).catch(function(m){i._diag.warn("getFetchBodyLength",m)});function f(m,E){i._applyAttributesAfterFetch(m,s,E),i._endSpan(m,p,{status:E.status||0,statusText:E.message,url:c})}function v(m,E){i._applyAttributesAfterFetch(m,s,E),E.status>=200&&E.status<400?i._endSpan(m,p,E):i._endSpan(m,p,{status:E.status,statusText:E.statusText,url:c})}function y(m,E,S){try{var N=S.clone(),j=S.clone(),$=N.body;if($){var nt=$.getReader(),X=function(){nt.read().then(function(U){var bt=U.done;bt?v(m,j):X()},function(U){f(m,U)})};X()}else v(m,S)}finally{E(S)}}function g(m,E,S){try{f(m,S)}finally{E(S)}}return new Promise(function(m,E){return P.with(k.setSpan(P.active(),l),function(){return i._addHeaders(s,c),i._tasksCount++,r.apply(u,s instanceof Request?[s]:[c,s]).then(y.bind(u,l,m),g.bind(u,l,E))})})}}},t.prototype._applyAttributesAfterFetch=function(n,r,i){var o=this,a=this.getConfig().applyCustomAttributesOnSpan;a&&Gm(function(){return a(n,r,i)},function(u){u&&o._diag.error("applyCustomAttributesOnSpan",u)})},t.prototype._prepareSpanData=function(n){var r=ru(),i=[];if(typeof PerformanceObserver!="function")return{entries:i,startTime:r,spanUrl:n};var o=new PerformanceObserver(function(a){var u=a.getEntries();u.forEach(function(c){c.initiatorType==="fetch"&&c.name===n&&i.push(c)})});return o.observe({entryTypes:["resource"]}),{entries:i,observer:o,startTime:r,spanUrl:n}},t.prototype.enable=function(){if(au){this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}Hm(fetch)&&(this._unwrap(Hi,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(Hi,"fetch",this._patchConstructor())},t.prototype.disable=function(){au||(this._unwrap(Hi,"fetch"),this._usedResources=new WeakSet)},t}(Vm),su=function(){function e(){}return e.prototype.emit=function(t){},e}(),A_=new su,R_=function(){function e(){}return e.prototype.getLogger=function(t,n,r){return new su},e}(),uu=new R_,C_=function(){function e(t,n,r,i){this._provider=t,this.name=n,this.version=r,this.options=i}return e.prototype.emit=function(t){this._getLogger().emit(t)},e.prototype._getLogger=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):A_},e}(),cu=function(){function e(){}return e.prototype.getLogger=function(t,n,r){var i;return(i=this.getDelegateLogger(t,n,r))!==null&&i!==void 0?i:new C_(this,t,n,r)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:uu},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateLogger=function(t,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(t,n,r)},e}(),x_=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Jn=Symbol.for("io.opentelemetry.js.api.logs"),Je=x_;function P_(e,t,n){return function(r){return r===e?t:n}}var lu=1,N_=function(){function e(){this._proxyLoggerProvider=new cu}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(t){return Je[Jn]?this.getLoggerProvider():(Je[Jn]=P_(lu,t,uu),this._proxyLoggerProvider.setDelegate(t),t)},e.prototype.getLoggerProvider=function(){var t,n;return(n=(t=Je[Jn])===null||t===void 0?void 0:t.call(Je,lu))!==null&&n!==void 0?n:this._proxyLoggerProvider},e.prototype.getLogger=function(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)},e.prototype.disable=function(){delete Je[Jn],this._proxyLoggerProvider=new cu},e}(),I_=N_.getInstance(),Wi=function(){return Wi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Wi.apply(this,arguments)},k_=function(){function e(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this._config={},this._wrap=K.wrap,this._unwrap=K.unwrap,this._massWrap=K.massWrap,this._massUnwrap=K.massUnwrap,this.setConfig(r),this._diag=b.createComponentLogger({namespace:t}),this._tracer=k.getTracer(t,n),this._meter=pe.getMeter(t,n),this._logger=I_.getLogger(t,n),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var t,n=(t=this.init())!==null&&t!==void 0?t:[];return Array.isArray(n)?n:[n]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(t){this._config=Wi({enabled:!0},t)},e.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(t,n,r,i){if(t)try{t(r,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},e}(),M_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),D_=function(e){M_(t,e);function t(n,r,i){var o=e.call(this,n,r,i)||this;return o._config.enabled&&o.enable(),o}return t}(k_);function U_(e,t,n){var r,i;try{i=e()}catch(o){r=o}finally{return t(r,i),i}}function pu(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}var Qe=performance,j_="http.method",B_="http.url",$_="http.host",F_="http.scheme",V_="http.status_code",G_="http.user_agent",H_="http.request_content_length_uncompressed",q_=j_,z_=B_,X_=$_,K_=F_,W_=V_,Y_=G_,J_=H_,Q_=9,Z_=6,tE=Math.pow(10,Z_),fu=Math.pow(10,Q_);function hu(e){var t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*tE);return[n,r]}function eE(){var e=Qe.timeOrigin;if(typeof e!="number"){var t=Qe;e=t.timing&&t.timing.fetchStart}return e}function du(e){var t=hu(eE()),n=hu(Qe.now());return nE(t,n)}function nE(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=fu&&(n[1]-=fu,n[0]+=1),n}var rE=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function iE(e,t){return typeof t=="string"?e===t:!!e.match(t)}function oE(e,t){var n,r;if(!t)return!1;try{for(var i=rE(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(iE(e,a))return!0}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1}var _t;(function(e){e.METHOD_OPEN="open",e.METHOD_SEND="send",e.EVENT_ABORT="abort",e.EVENT_ERROR="error",e.EVENT_LOAD="loaded",e.EVENT_TIMEOUT="timeout"})(_t||(_t={}));var aE=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},sE=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},uE=b.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function cE(e){if(typeof Document<"u"&&e instanceof Document)return new XMLSerializer().serializeToString(document).length;if(e instanceof Blob)return e.size;if(e.byteLength!==void 0)return e.byteLength;if(e instanceof FormData)return pE(e);if(e instanceof URLSearchParams)return vu(e.toString());if(typeof e=="string")return vu(e);uE.warn("unknown body type")}var lE=new TextEncoder;function vu(e){return lE.encode(e).byteLength}function pE(e){var t,n,r=0;try{for(var i=aE(e.entries()),o=i.next();!o.done;o=i.next()){var a=sE(o.value,2),u=a[0],c=a[1];r+=u.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}var yu="0.57.2",Yi;(function(e){e.HTTP_STATUS_TEXT="http.status_text"})(Yi||(Yi={}));var fE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),hE=300,dE=function(e){fE(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,"@opentelemetry/instrumentation-xml-http-request",yu,n)||this;return r.component="xml-http-request",r.version=yu,r.moduleName=r.component,r._tasksCount=0,r._xhrMem=new WeakMap,r._usedResources=new WeakSet,r}return t.prototype.init=function(){},t.prototype._addHeaders=function(n,r){var i=mt(r).href;if(!qs(i,this.getConfig().propagateTraceHeaderCorsUrls)){var o={};Z.inject(P.active(),o),Object.keys(o).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}var a={};Z.inject(P.active(),a),Object.keys(a).forEach(function(u){n.setRequestHeader(u,String(a[u]))})},t.prototype._addChildSpan=function(n,r){var i=this;P.with(k.setSpan(P.active(),n),function(){var o=i.tracer.startSpan("CORS Preflight",{startTime:r[O.FETCH_START]});_e(o,r,i.getConfig().ignoreNetworkEvents),o.end(r[O.RESPONSE_END])})},t.prototype._addFinalSpanAttributes=function(n,r,i){if(typeof i=="string"){var o=mt(i);r.status!==void 0&&n.setAttribute(W_,r.status),r.statusText!==void 0&&n.setAttribute(Yi.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(X_,o.host),n.setAttribute(K_,o.protocol.replace(":","")),n.setAttribute(Y_,navigator.userAgent)}},t.prototype._applyAttributesAfterXHR=function(n,r){var i=this,o=this.getConfig().applyCustomAttributesOnSpan;typeof o=="function"&&U_(function(){return o(n,r)},function(a){a&&i._diag.error("applyCustomAttributesOnSpan",a)})},t.prototype._addResourceObserver=function(n,r){var i=this._xhrMem.get(n);!i||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(i.createdResources={observer:new PerformanceObserver(function(o){var a=o.getEntries(),u=mt(r);a.forEach(function(c){c.initiatorType==="xmlhttprequest"&&c.name===u.href&&i.createdResources&&i.createdResources.entries.push(c)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))},t.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(Qe.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},t.prototype._findResourceAndAddNetworkEvents=function(n,r,i,o,a){if(!(!i||!o||!a||!n.createdResources)){var u=n.createdResources.entries;(!u||!u.length)&&(u=Qe.getEntriesByType("resource"));var c=Gs(mt(i).href,o,a,u,this._usedResources);if(c.mainRequest){var s=c.mainRequest;this._markResourceAsUsed(s);var l=c.corsPreFlightRequest;l&&(this._addChildSpan(r,l),this._markResourceAsUsed(l)),_e(r,s,this.getConfig().ignoreNetworkEvents)}}},t.prototype._cleanPreviousSpanInformation=function(n){var r=this._xhrMem.get(n);if(r){var i=r.callbackToRemoveEvents;i&&i(),this._xhrMem.delete(n)}},t.prototype._createSpan=function(n,r,i){var o;if(oE(r,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var a=i.toUpperCase(),u=this.tracer.startSpan(a,{kind:Be.CLIENT,attributes:(o={},o[q_]=i,o[z_]=mt(r).toString(),o)});return u.addEvent(_t.METHOD_OPEN),this._cleanPreviousSpanInformation(n),this._xhrMem.set(n,{span:u,spanUrl:r}),u},t.prototype._markResourceAsUsed=function(n){this._usedResources.add(n)},t.prototype._patchOpen=function(){var n=this;return function(r){var i=n;return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=o[0],c=o[1];return i._createSpan(this,c,u),r.apply(this,o)}}},t.prototype._patchSend=function(){var n=this;function r(l,p,f,v){var y=p.callbackToRemoveEvents;typeof y=="function"&&y();var g=p.span,m=p.spanUrl,E=p.sendStartTime;g&&(n._findResourceAndAddNetworkEvents(p,g,m,E,f),g.addEvent(l,v),n._addFinalSpanAttributes(g,p,m),g.end(v),n._tasksCount--),n._clearResources()}function i(l,p){var f=n._xhrMem.get(p);if(f){f.status=p.status,f.statusText=p.statusText,n._xhrMem.delete(p),f.span&&n._applyAttributesAfterXHR(f.span,p);var v=du(),y=Date.now();setTimeout(function(){r(l,f,v,y)},hE)}}function o(){i(_t.EVENT_ERROR,this)}function a(){i(_t.EVENT_ABORT,this)}function u(){i(_t.EVENT_TIMEOUT,this)}function c(){this.status<299?i(_t.EVENT_LOAD,this):i(_t.EVENT_ERROR,this)}function s(l){l.removeEventListener("abort",a),l.removeEventListener("error",o),l.removeEventListener("load",c),l.removeEventListener("timeout",u);var p=n._xhrMem.get(l);p&&(p.callbackToRemoveEvents=void 0)}return function(l){return function(){for(var p=this,f=[],v=0;v<arguments.length;v++)f[v]=arguments[v];var y=n._xhrMem.get(this);if(!y)return l.apply(this,f);var g=y.span,m=y.spanUrl;if(g&&m){if(n.getConfig().measureRequestSize&&f!=null&&f[0]){var E=f[0],S=cE(E);S!==void 0&&g.setAttribute(J_,S)}P.with(k.setSpan(P.active(),g),function(){n._tasksCount++,y.sendStartTime=du(),g.addEvent(_t.METHOD_SEND),p.addEventListener("abort",a),p.addEventListener("error",o),p.addEventListener("load",c),p.addEventListener("timeout",u),y.callbackToRemoveEvents=function(){s(p),y.createdResources&&y.createdResources.observer.disconnect()},n._addHeaders(p,m),n._addResourceObserver(p,m)})}return l.apply(this,f)}}},t.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),pu(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),pu(XMLHttpRequest.prototype.send)&&(this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.debug("removing previous patch from method send")),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend())},t.prototype.disable=function(){this._diag.debug("removing patch from",this.moduleName,this.version),this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet},t}(D_),vE="service.name",yE="telemetry.sdk.name",gE="telemetry.sdk.language",mE="telemetry.sdk.version",_E=vE,gu=yE,mu=gE,_u=mE;function EE(){return"unknown_service"}var Pt=function(){return Pt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Pt.apply(this,arguments)},bE=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},TE=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},SE=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Ji=function(){function e(t,n){var r=this,i;this._attributes=t,this.asyncAttributesPending=n!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=n?.then(function(o){return r._attributes=Object.assign({},r._attributes,o),r.asyncAttributesPending=!1,o},function(o){return b.debug("a resource's async attributes promise rejected: %s",o),r.asyncAttributesPending=!1,{}})}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e((t={},t[_E]=EE(),t[mu]=di[mu],t[gu]=di[gu],t[_u]=di[_u],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&b.error("Accessing resource attributes before async attributes settled"),(t=this._attributes)!==null&&t!==void 0?t:{}},enumerable:!1,configurable:!0}),e.prototype.waitForAsyncAttributes=function(){return bE(this,void 0,void 0,function(){return TE(this,function(t){switch(t.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},e.prototype.merge=function(t){var n=this,r;if(!t)return this;var i=Pt(Pt({},this._syncAttributes),(r=t._syncAttributes)!==null&&r!==void 0?r:t.attributes);if(!this._asyncAttributesPromise&&!t._asyncAttributesPromise)return new e(i);var o=Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then(function(a){var u,c=SE(a,2),s=c[0],l=c[1];return Pt(Pt(Pt(Pt({},n._syncAttributes),s),(u=t._syncAttributes)!==null&&u!==void 0?u:t.attributes),l)});return new e(i,o)},e.EMPTY=new e({}),e}();const Qi=(e,t,n)=>{var r,i;const o=R({},t);return n?((r=Object.keys(o))==null||r.forEach(a=>{[...n].includes(a?.toLowerCase())||(o[a]="[REDACTED]")}),o):((i=Object.keys(o))==null||i.forEach(a=>{[...wE,...e].includes(a?.toLowerCase())&&(o[a]="[REDACTED]")}),o)},wE=["authorization","cookie","proxy-authorization","set-cookie","token"],OE=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com"],LE=["awsaccesskeyid","signature","sig","x-goog-signature","access_token","id_token","token","code","refresh_token","session_state"],AE=["access_token","id_token","token","code","refresh_token","session_state"],Eu=e=>{var t,n;try{return new URL(e)}catch{return new URL(e,(n=(t=globalThis.location)==null?void 0:t.origin)!=null?n:"http://example.com")}},RE=e=>{if(!e||e==="#")return"";const t=e.slice(1);if(!t.includes("="))return e;const n=t.indexOf("?"),r=n>=0?t.slice(n+1):t,i=new URLSearchParams(r);for(const o of i.keys())if(AE.includes(o.toLowerCase()))return"";return e},Zi=e=>{try{const t=Eu(e);(t.username||t.password)&&(t.username="REDACTED",t.password="REDACTED");const n=t.searchParams;LE.forEach(i=>{for(const o of Array.from(n.keys()))o.toLowerCase()===i&&n.set(o,"REDACTED")});const r=RE(t.hash);if(t.hash=r,!e.includes("://")&&!e.startsWith("//"))return t.pathname+t.search+r;if(e.startsWith("//")){let i="//";return(t.username||t.password)&&(i+=t.username+":"+t.password+"@"),i+=t.host+t.pathname+t.search+r,i}return t.toString()}catch{return e}},CE=new RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),xE=new RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?");function PE(e){return!!(e.includes("/sdk/evalx")&&e.match(CE)||e.includes("/eval/")&&e.match(xE))}const NE=e=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(t=>e.toLocaleLowerCase().includes(t)),IE=e=>PE(e),kE=(e,t)=>t.some(n=>e.toLocaleLowerCase().includes(n)),ME=(e,t,n)=>!kE(e,t)&&!IE(e)&&!NE(e),DE=(e,t,n)=>{var r;if(n.some(u=>e.toLowerCase().includes(u)))return!1;let i=[];t===!0?(i=["localhost",/^\//],(r=window?.location)!=null&&r.host&&i.push(bu(window.location.host))):t instanceof Array&&(i=t);const o=jE(e);let a=!1;return i.forEach(u=>{o.match(u)&&(a=!0)}),a},UE=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),bu=e=>new RegExp("^https?://([^/]+\\.)?"+UE(e)+"([:/?#]|$)"),jE=e=>{if(e.startsWith("/")&&!e.startsWith("//"))return e;try{return new URL(e).origin}catch{return e}},Tu=64*1024,BE={"application/json":64*1024*1024,"text/plain":64*1024*1024},to=(e,t,n,r)=>{var i,o,a;let u=Tu;if(r){let c="";typeof r.get=="function"?c=(i=r.get("content-type"))!=null?i:"":c=(o=r["content-type"])!=null?o:"";try{c=c.split(";")[0]}catch{}u=(a=BE[c])!=null?a:Tu}if(e){if(t)try{const c=JSON.parse(e);Array.isArray(c)?c.forEach(s=>{Object.keys(s).forEach(l=>{t.includes(l.toLocaleLowerCase())&&(s[l]="[REDACTED]")})}):Object.keys(c).forEach(s=>{t.includes(s.toLocaleLowerCase())&&(c[s]="[REDACTED]")}),e=JSON.stringify(c)}catch{}if(n)try{const c=JSON.parse(e);Object.keys(c).forEach(s=>{n.includes(s.toLocaleLowerCase())||(c[s]="[REDACTED]")}),e=JSON.stringify(c)}catch{}}try{e=e.slice(0,u)}catch{}return e},$E=(e,t,n)=>ct(void 0,null,function*(){let r;try{const i=e.clone().body;if(i){let o=i.getReader(),a=new TextDecoder,u,c="";for(;!(u=yield o.read()).done;){let s=u.value;c+=a.decode(s)}r=c,r=to(r,n,t,e.headers)}else r=""}catch(i){r=`Unable to clone response: ${i}`}return r});var Su=function(){function e(t){this._delegate=t}return e.prototype.export=function(t,n){this._delegate.export(t,n)},e.prototype.forceFlush=function(){return this._delegate.forceFlush()},e.prototype.shutdown=function(){return this._delegate.shutdown()},e}(),FE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),wu=function(e){FE(t,e);function t(n,r,i){var o=e.call(this,n)||this;return o.name="OTLPExporterError",o.data=i,o.code=r,o}return t}(Error);function VE(e){if(!Number.isNaN(e)&&Number.isFinite(e)&&e>0)return e;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+e+"')")}function GE(e){if(e!=null)return function(){return e}}function HE(e,t,n){var r,i,o,a,u,c;return{timeoutMillis:VE((i=(r=e.timeoutMillis)!==null&&r!==void 0?r:t.timeoutMillis)!==null&&i!==void 0?i:n.timeoutMillis),concurrencyLimit:(a=(o=e.concurrencyLimit)!==null&&o!==void 0?o:t.concurrencyLimit)!==null&&a!==void 0?a:n.concurrencyLimit,compression:(c=(u=e.compression)!==null&&u!==void 0?u:t.compression)!==null&&c!==void 0?c:n.compression}}function qE(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var zE=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},XE=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},KE=function(){function e(t){this._sendingPromises=[],this._concurrencyLimit=t}return e.prototype.pushPromise=function(t){var n=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(t);var r=function(){var i=n._sendingPromises.indexOf(t);n._sendingPromises.splice(i,1)};t.then(r,r)},e.prototype.hasReachedLimit=function(){return this._sendingPromises.length>=this._concurrencyLimit},e.prototype.awaitAll=function(){return zE(this,void 0,void 0,function(){return XE(this,function(t){switch(t.label){case 0:return[4,Promise.all(this._sendingPromises)];case 1:return t.sent(),[2]}})})},e}();function WE(e){return new KE(e.concurrencyLimit)}function YE(e){return Object.prototype.hasOwnProperty.call(e,"partialSuccess")}function JE(){return{handleResponse:function(e){e==null||!YE(e)||e.partialSuccess==null||Object.keys(e.partialSuccess).length===0||b.warn("Received Partial Success response:",JSON.stringify(e.partialSuccess))}}}var QE=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},ZE=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},tb=function(){function e(t,n,r,i,o){this._transport=t,this._serializer=n,this._responseHandler=r,this._promiseQueue=i,this._timeout=o,this._diagLogger=b.createComponentLogger({namespace:"OTLPExportDelegate"})}return e.prototype.export=function(t,n){var r=this;if(this._diagLogger.debug("items to be sent",t),this._promiseQueue.hasReachedLimit()){n({code:B.FAILED,error:new Error("Concurrent export limit reached")});return}var i=this._serializer.serializeRequest(t);if(i==null){n({code:B.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(i,this._timeout).then(function(o){if(o.status==="success"){if(o.data!=null)try{r._responseHandler.handleResponse(r._serializer.deserializeResponse(o.data))}catch(a){r._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",a,o.data)}n({code:B.SUCCESS});return}else if(o.status==="failure"&&o.error){n({code:B.FAILED,error:o.error});return}else o.status==="retryable"?n({code:B.FAILED,error:new wu("Export failed with retryable status")}):n({code:B.FAILED,error:new wu("Export failed with unknown error")})},function(o){return n({code:B.FAILED,error:o})}))},e.prototype.forceFlush=function(){return this._promiseQueue.awaitAll()},e.prototype.shutdown=function(){return QE(this,void 0,void 0,function(){return ZE(this,function(t){switch(t.label){case 0:return this._diagLogger.debug("shutdown started"),[4,this.forceFlush()];case 1:return t.sent(),this._transport.shutdown(),[2]}})})},e}();function eb(e,t){return new tb(e.transport,e.serializer,JE(),e.promiseHandler,t.timeout)}function Ou(e,t,n){return eb({transport:n,serializer:t,promiseHandler:WE(e)},{timeout:e.timeoutMillis})}function Lu(e){var t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function nb(e){var t=Number(BigInt.asUintN(32,e)),n=Number(BigInt.asUintN(32,e>>BigInt(32)));return{low:t,high:n}}function Au(e){var t=Lu(e);return nb(t)}function rb(e){var t=Lu(e);return t.toString()}var ib=typeof BigInt<"u"?rb:nv;function Ru(e){return e}function Cu(e){if(e!==void 0)return fi(e)}var ob={encodeHrTime:Au,encodeSpanContext:fi,encodeOptionalSpanContext:Cu};function xu(e){var t,n;if(e===void 0)return ob;var r=(t=e.useLongBits)!==null&&t!==void 0?t:!0,i=(n=e.useHex)!==null&&n!==void 0?n:!1;return{encodeHrTime:r?Au:ib,encodeSpanContext:i?Ru:fi,encodeOptionalSpanContext:i?Ru:Cu}}var ab=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function Pu(e){return{attributes:Ht(e.attributes),droppedAttributesCount:0}}function Nu(e){return{name:e.name,version:e.version}}function Ht(e){return Object.keys(e).map(function(t){return Iu(t,e[t])})}function Iu(e,t){return{key:e,value:ku(t)}}function ku(e){var t=typeof e;return t==="string"?{stringValue:e}:t==="number"?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:t==="boolean"?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(ku)}}:t==="object"&&e!=null?{kvlistValue:{values:Object.entries(e).map(function(n){var r=ab(n,2),i=r[0],o=r[1];return Iu(i,o)})}}:{}}var lt;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE"})(lt||(lt={}));var dt;(function(e){e[e.HISTOGRAM=0]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",e[e.GAUGE=2]="GAUGE",e[e.SUM=3]="SUM"})(dt||(dt={}));var sb=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mu=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},Du=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},ub=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},cb=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},lb=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function pb(e){return e!=null}function Uu(e){var t=Object.keys(e);return t.length===0?"":(t=t.sort(),JSON.stringify(t.map(function(n){return[n,e[n]]})))}function fb(e){var t,n;return e.name+":"+((t=e.version)!==null&&t!==void 0?t:"")+":"+((n=e.schemaUrl)!==null&&n!==void 0?n:"")}var ju=function(e){sb(t,e);function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return t}(Error);function Ze(e,t){var n,r=new Promise(function(i,o){n=setTimeout(function(){o(new ju("Operation timed out."))},t)});return Promise.race([e,r]).then(function(i){return clearTimeout(n),i},function(i){throw clearTimeout(n),i})}function hb(e){return Mu(this,void 0,void 0,function(){var t=this;return Du(this,function(n){return[2,Promise.all(e.map(function(r){return Mu(t,void 0,void 0,function(){var i,o;return Du(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,r];case 1:return i=a.sent(),[2,{status:"fulfilled",value:i}];case 2:return o=a.sent(),[2,{status:"rejected",reason:o}];case 3:return[2]}})})}))]})})}function db(e){return e.status==="rejected"}function Bu(e,t){var n=[];return e.forEach(function(r){n.push.apply(n,cb([],ub(t(r)),!1))}),n}function vb(e,t){var n,r;if(e.size!==t.size)return!1;try{for(var i=lb(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(!t.has(a))return!1}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0}function yb(e,t){for(var n=0,r=e.length-1,i=e.length;r>=n;){var o=n+Math.trunc((r-n)/2);e[o]<t?n=o+1:(i=o,r=o-1)}return i}function gb(e,t){return e.toLowerCase()===t.toLowerCase()}var qt;(function(e){e[e.DROP=0]="DROP",e[e.SUM=1]="SUM",e[e.LAST_VALUE=2]="LAST_VALUE",e[e.HISTOGRAM=3]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(qt||(qt={}));var mb=function(){function e(){this.kind=qt.DROP}return e.prototype.createAccumulation=function(){},e.prototype.merge=function(t,n){},e.prototype.diff=function(t,n){},e.prototype.toMetricData=function(t,n,r,i){},e}(),L;(function(e){e.COUNTER="COUNTER",e.GAUGE="GAUGE",e.HISTOGRAM="HISTOGRAM",e.UP_DOWN_COUNTER="UP_DOWN_COUNTER",e.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",e.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",e.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(L||(L={}));function Nt(e,t,n){var r,i,o,a;return Tb(e)||b.warn('Invalid metric name: "'+e+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:e,type:t,description:(r=n?.description)!==null&&r!==void 0?r:"",unit:(i=n?.unit)!==null&&i!==void 0?i:"",valueType:(o=n?.valueType)!==null&&o!==void 0?o:Lt.DOUBLE,advice:(a=n?.advice)!==null&&a!==void 0?a:{}}}function _b(e,t){var n,r;return{name:(n=e.name)!==null&&n!==void 0?n:t.name,description:(r=e.description)!==null&&r!==void 0?r:t.description,type:t.type,unit:t.unit,valueType:t.valueType,advice:t.advice}}function Eb(e,t){return gb(e.name,t.name)&&e.unit===t.unit&&e.type===t.type&&e.valueType===t.valueType}var bb=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Tb(e){return e.match(bb)!=null}var Sb=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function wb(e){var t=e.map(function(){return 0});return t.push(0),{buckets:{boundaries:e,counts:t},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var eo=function(){function e(t,n,r,i){r===void 0&&(r=!0),i===void 0&&(i=wb(n)),this.startTime=t,this._boundaries=n,this._recordMinMax=r,this._current=i}return e.prototype.record=function(t){if(!Number.isNaN(t)){this._current.count+=1,this._current.sum+=t,this._recordMinMax&&(this._current.min=Math.min(t,this._current.min),this._current.max=Math.max(t,this._current.max),this._current.hasMinMax=!0);var n=yb(this._boundaries,t);this._current.buckets.counts[n]+=1}},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),$u=function(){function e(t,n){this._boundaries=t,this._recordMinMax=n,this.kind=qt.HISTOGRAM}return e.prototype.createAccumulation=function(t){return new eo(t,this._boundaries,this._recordMinMax)},e.prototype.merge=function(t,n){for(var r=t.toPointValue(),i=n.toPointValue(),o=r.buckets.counts,a=i.buckets.counts,u=new Array(o.length),c=0;c<o.length;c++)u[c]=o[c]+a[c];var s=1/0,l=-1/0;return this._recordMinMax&&(r.hasMinMax&&i.hasMinMax?(s=Math.min(r.min,i.min),l=Math.max(r.max,i.max)):r.hasMinMax?(s=r.min,l=r.max):i.hasMinMax&&(s=i.min,l=i.max)),new eo(t.startTime,r.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:r.buckets.boundaries,counts:u},count:r.count+i.count,sum:r.sum+i.sum,hasMinMax:this._recordMinMax&&(r.hasMinMax||i.hasMinMax),min:s,max:l})},e.prototype.diff=function(t,n){for(var r=t.toPointValue(),i=n.toPointValue(),o=r.buckets.counts,a=i.buckets.counts,u=new Array(o.length),c=0;c<o.length;c++)u[c]=a[c]-o[c];return new eo(n.startTime,r.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:r.buckets.boundaries,counts:u},count:i.count-r.count,sum:i.sum-r.sum,hasMinMax:!1,min:1/0,max:-1/0})},e.prototype.toMetricData=function(t,n,r,i){return{descriptor:t,aggregationTemporality:n,dataPointType:dt.HISTOGRAM,dataPoints:r.map(function(o){var a=Sb(o,2),u=a[0],c=a[1],s=c.toPointValue(),l=t.type===L.GAUGE||t.type===L.UP_DOWN_COUNTER||t.type===L.OBSERVABLE_GAUGE||t.type===L.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:u,startTime:c.startTime,endTime:i,value:{min:s.hasMinMax?s.min:void 0,max:s.hasMinMax?s.max:void 0,sum:l?void 0:s.sum,buckets:s.buckets,count:s.count}}})}},e}(),no=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},ro=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Fu=function(){function e(t,n,r,i){t===void 0&&(t=new Ob),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=0),this.backing=t,this.indexBase=n,this.indexStart=r,this.indexEnd=i}return Object.defineProperty(e.prototype,"offset",{get:function(){return this.indexStart},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this.backing.length===0||this.indexEnd===this.indexStart&&this.at(0)===0?0:this.indexEnd-this.indexStart+1},enumerable:!1,configurable:!0}),e.prototype.counts=function(){var t=this;return Array.from({length:this.length},function(n,r){return t.at(r)})},e.prototype.at=function(t){var n=this.indexBase-this.indexStart;return t<n&&(t+=this.backing.length),t-=n,this.backing.countAt(t)},e.prototype.incrementBucket=function(t,n){this.backing.increment(t,n)},e.prototype.decrementBucket=function(t,n){this.backing.decrement(t,n)},e.prototype.trim=function(){for(var t=0;t<this.length;t++)if(this.at(t)!==0){this.indexStart+=t;break}else if(t===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(var t=this.length-1;t>=0;t--)if(this.at(t)!==0){this.indexEnd-=this.length-t-1;break}this._rotate()},e.prototype.downscale=function(t){this._rotate();for(var n=1+this.indexEnd-this.indexStart,r=1<<t,i=0,o=0,a=this.indexStart;a<=this.indexEnd;){var u=a%r;u<0&&(u+=r);for(var c=u;c<r&&i<n;c++)this._relocateBucket(o,i),i++,a++;o++}this.indexStart>>=t,this.indexEnd>>=t,this.indexBase=this.indexStart},e.prototype.clone=function(){return new e(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)},e.prototype._rotate=function(){var t=this.indexBase-this.indexStart;t!==0&&(t>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,t),this.backing.reverse(t,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+t)),this.indexBase=this.indexStart)},e.prototype._relocateBucket=function(t,n){t!==n&&this.incrementBucket(t,this.backing.emptyBucket(n))},e}(),Ob=function(){function e(t){t===void 0&&(t=[0]),this._counts=t}return Object.defineProperty(e.prototype,"length",{get:function(){return this._counts.length},enumerable:!1,configurable:!0}),e.prototype.countAt=function(t){return this._counts[t]},e.prototype.growTo=function(t,n,r){var i=new Array(t).fill(0);i.splice.apply(i,ro([r,this._counts.length-n],no(this._counts.slice(n)),!1)),i.splice.apply(i,ro([0,n],no(this._counts.slice(0,n)),!1)),this._counts=i},e.prototype.reverse=function(t,n){for(var r=Math.floor((t+n)/2)-t,i=0;i<r;i++){var o=this._counts[t+i];this._counts[t+i]=this._counts[n-i-1],this._counts[n-i-1]=o}},e.prototype.emptyBucket=function(t){var n=this._counts[t];return this._counts[t]=0,n},e.prototype.increment=function(t,n){this._counts[t]+=n},e.prototype.decrement=function(t,n){this._counts[t]>=n?this._counts[t]-=n:this._counts[t]=0},e.prototype.clone=function(){return new e(ro([],no(this._counts),!1))},e}(),Lb=52,Ab=2146435072,Rb=1048575,io=1023,Vu=-io+1,Gu=io,oo=Math.pow(2,-1022);function Hu(e){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);var n=t.getUint32(0),r=(n&Ab)>>20;return r-io}function qu(e){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);var n=t.getUint32(0),r=t.getUint32(4),i=(n&Rb)*Math.pow(2,32);return i+r}function ao(e,t){return e===0||e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY||Number.isNaN(e)?e:e*Math.pow(2,t)}function Cb(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e++,e}var xb=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),tn=function(e){xb(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Error),Pb=function(){function e(t){this._shift=-t}return e.prototype.mapToIndex=function(t){if(t<oo)return this._minNormalLowerBoundaryIndex();var n=Hu(t),r=this._rightShift(qu(t)-1,Lb);return n+r>>this._shift},e.prototype.lowerBoundary=function(t){var n=this._minNormalLowerBoundaryIndex();if(t<n)throw new tn("underflow: "+t+" is < minimum lower boundary: "+n);var r=this._maxNormalLowerBoundaryIndex();if(t>r)throw new tn("overflow: "+t+" is > maximum lower boundary: "+r);return ao(1,t<<this._shift)},Object.defineProperty(e.prototype,"scale",{get:function(){return this._shift===0?0:-this._shift},enumerable:!1,configurable:!0}),e.prototype._minNormalLowerBoundaryIndex=function(){var t=Vu>>this._shift;return this._shift<2&&t--,t},e.prototype._maxNormalLowerBoundaryIndex=function(){return Gu>>this._shift},e.prototype._rightShift=function(t,n){return Math.floor(t*Math.pow(2,-n))},e}(),Nb=function(){function e(t){this._scale=t,this._scaleFactor=ao(Math.LOG2E,t),this._inverseFactor=ao(Math.LN2,-t)}return e.prototype.mapToIndex=function(t){if(t<=oo)return this._minNormalLowerBoundaryIndex()-1;if(qu(t)===0){var n=Hu(t);return(n<<this._scale)-1}var r=Math.floor(Math.log(t)*this._scaleFactor),i=this._maxNormalLowerBoundaryIndex();return r>=i?i:r},e.prototype.lowerBoundary=function(t){var n=this._maxNormalLowerBoundaryIndex();if(t>=n){if(t===n)return 2*Math.exp((t-(1<<this._scale))/this._scaleFactor);throw new tn("overflow: "+t+" is > maximum lower boundary: "+n)}var r=this._minNormalLowerBoundaryIndex();if(t<=r){if(t===r)return oo;if(t===r-1)return Math.exp((t+(1<<this._scale))/this._scaleFactor)/2;throw new tn("overflow: "+t+" is < minimum lower boundary: "+r)}return Math.exp(t*this._inverseFactor)},Object.defineProperty(e.prototype,"scale",{get:function(){return this._scale},enumerable:!1,configurable:!0}),e.prototype._minNormalLowerBoundaryIndex=function(){return Vu<<this._scale},e.prototype._maxNormalLowerBoundaryIndex=function(){return(Gu+1<<this._scale)-1},e}(),zu=-10,Xu=20,Ib=Array.from({length:31},function(e,t){return t>10?new Nb(t-10):new Pb(t-10)});function Ku(e){if(e>Xu||e<zu)throw new tn("expected scale >= "+zu+" && <= "+Xu+", got: "+e);return Ib[e+10]}var kb=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Qn=function(){function e(t,n){this.low=t,this.high=n}return e.combine=function(t,n){return new e(Math.min(t.low,n.low),Math.max(t.high,n.high))},e}(),Mb=20,Db=160,so=2,Ub=function(){function e(t,n,r,i,o,a,u,c,s,l,p){t===void 0&&(t=t),n===void 0&&(n=Db),r===void 0&&(r=!0),i===void 0&&(i=0),o===void 0&&(o=0),a===void 0&&(a=0),u===void 0&&(u=Number.POSITIVE_INFINITY),c===void 0&&(c=Number.NEGATIVE_INFINITY),s===void 0&&(s=new Fu),l===void 0&&(l=new Fu),p===void 0&&(p=Ku(Mb)),this.startTime=t,this._maxSize=n,this._recordMinMax=r,this._sum=i,this._count=o,this._zeroCount=a,this._min=u,this._max=c,this._positive=s,this._negative=l,this._mapping=p,this._maxSize<so&&(b.warn("Exponential Histogram Max Size set to "+this._maxSize+", changing to the minimum size of: "+so),this._maxSize=so)}return e.prototype.record=function(t){this.updateByIncrement(t,1)},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return{hasMinMax:this._recordMinMax,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}},Object.defineProperty(e.prototype,"sum",{get:function(){return this._sum},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zeroCount",{get:function(){return this._zeroCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this._count===this._zeroCount?0:this._mapping.scale},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"positive",{get:function(){return this._positive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"negative",{get:function(){return this._negative},enumerable:!1,configurable:!0}),e.prototype.updateByIncrement=function(t,n){if(!Number.isNaN(t)){if(t>this._max&&(this._max=t),t<this._min&&(this._min=t),this._count+=n,t===0){this._zeroCount+=n;return}this._sum+=t*n,t>0?this._updateBuckets(this._positive,t,n):this._updateBuckets(this._negative,-t,n)}},e.prototype.merge=function(t){this._count===0?(this._min=t.min,this._max=t.max):t.count!==0&&(t.min<this.min&&(this._min=t.min),t.max>this.max&&(this._max=t.max)),this.startTime=t.startTime,this._sum+=t.sum,this._count+=t.count,this._zeroCount+=t.zeroCount;var n=this._minScale(t);this._downscale(this.scale-n),this._mergeBuckets(this.positive,t,t.positive,n),this._mergeBuckets(this.negative,t,t.negative,n)},e.prototype.diff=function(t){this._min=1/0,this._max=-1/0,this._sum-=t.sum,this._count-=t.count,this._zeroCount-=t.zeroCount;var n=this._minScale(t);this._downscale(this.scale-n),this._diffBuckets(this.positive,t,t.positive,n),this._diffBuckets(this.negative,t,t.negative,n)},e.prototype.clone=function(){return new e(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)},e.prototype._updateBuckets=function(t,n,r){var i=this._mapping.mapToIndex(n),o=!1,a=0,u=0;if(t.length===0?(t.indexStart=i,t.indexEnd=t.indexStart,t.indexBase=t.indexStart):i<t.indexStart&&t.indexEnd-i>=this._maxSize?(o=!0,u=i,a=t.indexEnd):i>t.indexEnd&&i-t.indexStart>=this._maxSize&&(o=!0,u=t.indexStart,a=i),o){var c=this._changeScale(a,u);this._downscale(c),i=this._mapping.mapToIndex(n)}this._incrementIndexBy(t,i,r)},e.prototype._incrementIndexBy=function(t,n,r){if(r!==0){if(t.length===0&&(t.indexStart=t.indexEnd=t.indexBase=n),n<t.indexStart){var i=t.indexEnd-n;i>=t.backing.length&&this._grow(t,i+1),t.indexStart=n}else if(n>t.indexEnd){var i=n-t.indexStart;i>=t.backing.length&&this._grow(t,i+1),t.indexEnd=n}var o=n-t.indexBase;o<0&&(o+=t.backing.length),t.incrementBucket(o,r)}},e.prototype._grow=function(t,n){var r=t.backing.length,i=t.indexBase-t.indexStart,o=r-i,a=Cb(n);a>this._maxSize&&(a=this._maxSize);var u=a-i;t.backing.growTo(a,o,u)},e.prototype._changeScale=function(t,n){for(var r=0;t-n>=this._maxSize;)t>>=1,n>>=1,r++;return r},e.prototype._downscale=function(t){if(t!==0){if(t<0)throw new Error("impossible change of scale: "+this.scale);var n=this._mapping.scale-t;this._positive.downscale(t),this._negative.downscale(t),this._mapping=Ku(n)}},e.prototype._minScale=function(t){var n=Math.min(this.scale,t.scale),r=Qn.combine(this._highLowAtScale(this.positive,this.scale,n),this._highLowAtScale(t.positive,t.scale,n)),i=Qn.combine(this._highLowAtScale(this.negative,this.scale,n),this._highLowAtScale(t.negative,t.scale,n));return Math.min(n-this._changeScale(r.high,r.low),n-this._changeScale(i.high,i.low))},e.prototype._highLowAtScale=function(t,n,r){if(t.length===0)return new Qn(0,-1);var i=n-r;return new Qn(t.indexStart>>i,t.indexEnd>>i)},e.prototype._mergeBuckets=function(t,n,r,i){for(var o=r.offset,a=n.scale-i,u=0;u<r.length;u++)this._incrementIndexBy(t,o+u>>a,r.at(u))},e.prototype._diffBuckets=function(t,n,r,i){for(var o=r.offset,a=n.scale-i,u=0;u<r.length;u++){var c=o+u>>a,s=c-t.indexBase;s<0&&(s+=t.backing.length),t.decrementBucket(s,r.at(u))}t.trim()},e}(),jb=function(){function e(t,n){this._maxSize=t,this._recordMinMax=n,this.kind=qt.EXPONENTIAL_HISTOGRAM}return e.prototype.createAccumulation=function(t){return new Ub(t,this._maxSize,this._recordMinMax)},e.prototype.merge=function(t,n){var r=n.clone();return r.merge(t),r},e.prototype.diff=function(t,n){var r=n.clone();return r.diff(t),r},e.prototype.toMetricData=function(t,n,r,i){return{descriptor:t,aggregationTemporality:n,dataPointType:dt.EXPONENTIAL_HISTOGRAM,dataPoints:r.map(function(o){var a=kb(o,2),u=a[0],c=a[1],s=c.toPointValue(),l=t.type===L.GAUGE||t.type===L.UP_DOWN_COUNTER||t.type===L.OBSERVABLE_GAUGE||t.type===L.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:u,startTime:c.startTime,endTime:i,value:{min:s.hasMinMax?s.min:void 0,max:s.hasMinMax?s.max:void 0,sum:l?void 0:s.sum,positive:{offset:s.positive.offset,bucketCounts:s.positive.bucketCounts},negative:{offset:s.negative.offset,bucketCounts:s.negative.bucketCounts},count:s.count,scale:s.scale,zeroCount:s.zeroCount}}})}},e}(),Bb=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},uo=function(){function e(t,n,r){n===void 0&&(n=0),r===void 0&&(r=[0,0]),this.startTime=t,this._current=n,this.sampleTime=r}return e.prototype.record=function(t){this._current=t,this.sampleTime=$e(Date.now())},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),$b=function(){function e(){this.kind=qt.LAST_VALUE}return e.prototype.createAccumulation=function(t){return new uo(t)},e.prototype.merge=function(t,n){var r=In(n.sampleTime)>=In(t.sampleTime)?n:t;return new uo(t.startTime,r.toPointValue(),r.sampleTime)},e.prototype.diff=function(t,n){var r=In(n.sampleTime)>=In(t.sampleTime)?n:t;return new uo(n.startTime,r.toPointValue(),r.sampleTime)},e.prototype.toMetricData=function(t,n,r,i){return{descriptor:t,aggregationTemporality:n,dataPointType:dt.GAUGE,dataPoints:r.map(function(o){var a=Bb(o,2),u=a[0],c=a[1];return{attributes:u,startTime:c.startTime,endTime:i,value:c.toPointValue()}})}},e}(),Fb=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},en=function(){function e(t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1),this.startTime=t,this.monotonic=n,this._current=r,this.reset=i}return e.prototype.record=function(t){this.monotonic&&t<0||(this._current+=t)},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),Wu=function(){function e(t){this.monotonic=t,this.kind=qt.SUM}return e.prototype.createAccumulation=function(t){return new en(t,this.monotonic)},e.prototype.merge=function(t,n){var r=t.toPointValue(),i=n.toPointValue();return n.reset?new en(n.startTime,this.monotonic,i,n.reset):new en(t.startTime,this.monotonic,r+i)},e.prototype.diff=function(t,n){var r=t.toPointValue(),i=n.toPointValue();return this.monotonic&&r>i?new en(n.startTime,this.monotonic,i,!0):new en(n.startTime,this.monotonic,i-r)},e.prototype.toMetricData=function(t,n,r,i){return{descriptor:t,aggregationTemporality:n,dataPointType:dt.SUM,dataPoints:r.map(function(o){var a=Fb(o,2),u=a[0],c=a[1];return{attributes:u,startTime:c.startTime,endTime:i,value:c.toPointValue()}}),isMonotonic:this.monotonic}},e}(),zt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Et=function(){function e(){}return e.Drop=function(){return Yu},e.Sum=function(){return Ju},e.LastValue=function(){return Qu},e.Histogram=function(){return Zu},e.ExponentialHistogram=function(){return Wb},e.Default=function(){return Yb},e}(),Vb=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(n){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new mb,t}(Et),Gb=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(n){switch(n.type){case L.COUNTER:case L.OBSERVABLE_COUNTER:case L.HISTOGRAM:return t.MONOTONIC_INSTANCE;default:return t.NON_MONOTONIC_INSTANCE}},t.MONOTONIC_INSTANCE=new Wu(!0),t.NON_MONOTONIC_INSTANCE=new Wu(!1),t}(Et),Hb=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(n){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new $b,t}(Et),qb=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(n){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new $u([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),t}(Et),zb=function(e){zt(t,e);function t(n,r){r===void 0&&(r=!0);var i=e.call(this)||this;if(i._recordMinMax=r,n==null)throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");n=n.concat(),n=n.sort(function(u,c){return u-c});var o=n.lastIndexOf(-1/0),a=n.indexOf(1/0);return a===-1&&(a=void 0),i._boundaries=n.slice(o+1,a),i}return t.prototype.createAggregator=function(n){return new $u(this._boundaries,this._recordMinMax)},t}(Et),Xb=function(e){zt(t,e);function t(n,r){n===void 0&&(n=160),r===void 0&&(r=!0);var i=e.call(this)||this;return i._maxSize=n,i._recordMinMax=r,i}return t.prototype.createAggregator=function(n){return new jb(this._maxSize,this._recordMinMax)},t}(Et),Kb=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype._resolve=function(n){switch(n.type){case L.COUNTER:case L.UP_DOWN_COUNTER:case L.OBSERVABLE_COUNTER:case L.OBSERVABLE_UP_DOWN_COUNTER:return Ju;case L.GAUGE:case L.OBSERVABLE_GAUGE:return Qu;case L.HISTOGRAM:return n.advice.explicitBucketBoundaries?new zb(n.advice.explicitBucketBoundaries):Zu}return b.warn("Unable to recognize instrument type: "+n.type),Yu},t.prototype.createAggregator=function(n){return this._resolve(n).createAggregator(n)},t}(Et),Yu=new Vb,Ju=new Gb,Qu=new Hb,Zu=new qb,Wb=new Xb,Yb=new Kb,Jb=function(e){return Et.Default()},Qb=function(e){return lt.CUMULATIVE},co=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},lo=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},tc=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Zb=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},tT=function(){function e(t){var n,r,i;this._shutdown=!1,this._aggregationSelector=(n=t?.aggregationSelector)!==null&&n!==void 0?n:Jb,this._aggregationTemporalitySelector=(r=t?.aggregationTemporalitySelector)!==null&&r!==void 0?r:Qb,this._metricProducers=(i=t?.metricProducers)!==null&&i!==void 0?i:[],this._cardinalitySelector=t?.cardinalitySelector}return e.prototype.setMetricProducer=function(t){if(this._sdkMetricProducer)throw new Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=t,this.onInitialized()},e.prototype.selectAggregation=function(t){return this._aggregationSelector(t)},e.prototype.selectAggregationTemporality=function(t){return this._aggregationTemporalitySelector(t)},e.prototype.selectCardinalityLimit=function(t){return this._cardinalitySelector?this._cardinalitySelector(t):2e3},e.prototype.onInitialized=function(){},e.prototype.collect=function(t){return co(this,void 0,void 0,function(){var n,r,i,o,a,u;return lo(this,function(c){switch(c.label){case 0:if(this._sdkMetricProducer===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw new Error("MetricReader is shutdown");return[4,Promise.all(Zb([this._sdkMetricProducer.collect({timeoutMillis:t?.timeoutMillis})],tc(this._metricProducers.map(function(s){return s.collect({timeoutMillis:t?.timeoutMillis})})),!1))];case 1:return n=tc.apply(void 0,[c.sent()]),r=n[0],i=n.slice(1),o=r.errors.concat(Bu(i,function(s){return s.errors})),a=r.resourceMetrics.resource,u=r.resourceMetrics.scopeMetrics.concat(Bu(i,function(s){return s.resourceMetrics.scopeMetrics})),[2,{resourceMetrics:{resource:a,scopeMetrics:u},errors:o}]}})})},e.prototype.shutdown=function(t){return co(this,void 0,void 0,function(){return lo(this,function(n){switch(n.label){case 0:return this._shutdown?(b.error("Cannot call shutdown twice."),[2]):t?.timeoutMillis!=null?[3,2]:[4,this.onShutdown()];case 1:return n.sent(),[3,4];case 2:return[4,Ze(this.onShutdown(),t.timeoutMillis)];case 3:n.sent(),n.label=4;case 4:return this._shutdown=!0,[2]}})})},e.prototype.forceFlush=function(t){return co(this,void 0,void 0,function(){return lo(this,function(n){switch(n.label){case 0:return this._shutdown?(b.warn("Cannot forceFlush on already shutdown MetricReader."),[2]):t?.timeoutMillis!=null?[3,2]:[4,this.onForceFlush()];case 1:return n.sent(),[2];case 2:return[4,Ze(this.onForceFlush(),t.timeoutMillis)];case 3:return n.sent(),[2]}})})},e}(),eT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zn=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},tr=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},nT=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},rT=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},iT=function(e){eT(t,e);function t(n){var r,i,o,a,u=e.call(this,{aggregationSelector:(r=n.exporter.selectAggregation)===null||r===void 0?void 0:r.bind(n.exporter),aggregationTemporalitySelector:(i=n.exporter.selectAggregationTemporality)===null||i===void 0?void 0:i.bind(n.exporter),metricProducers:n.metricProducers})||this;if(n.exportIntervalMillis!==void 0&&n.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(n.exportTimeoutMillis!==void 0&&n.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(n.exportTimeoutMillis!==void 0&&n.exportIntervalMillis!==void 0&&n.exportIntervalMillis<n.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");return u._exportInterval=(o=n.exportIntervalMillis)!==null&&o!==void 0?o:6e4,u._exportTimeout=(a=n.exportTimeoutMillis)!==null&&a!==void 0?a:3e4,u._exporter=n.exporter,u}return t.prototype._runOnce=function(){return Zn(this,void 0,void 0,function(){var n;return tr(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,Ze(this._doRun(),this._exportTimeout)];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),n instanceof ju?(b.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout),[2]):(Ga(n),[3,3]);case 3:return[2]}})})},t.prototype._doRun=function(){var n,r;return Zn(this,void 0,void 0,function(){var i,o,a,u,c,s;return tr(this,function(l){switch(l.label){case 0:return[4,this.collect({timeoutMillis:this._exportTimeout})];case 1:if(i=l.sent(),o=i.resourceMetrics,a=i.errors,a.length>0&&(s=b).error.apply(s,rT(["PeriodicExportingMetricReader: metrics collection errors"],nT(a),!1)),!o.resource.asyncAttributesPending)return[3,5];l.label=2;case 2:return l.trys.push([2,4,,5]),[4,(r=(n=o.resource).waitForAsyncAttributes)===null||r===void 0?void 0:r.call(n)];case 3:return l.sent(),[3,5];case 4:return u=l.sent(),b.debug("Error while resolving async portion of resource: ",u),Ga(u),[3,5];case 5:return o.scopeMetrics.length===0?[2]:[4,jv._export(this._exporter,o)];case 6:if(c=l.sent(),c.code!==B.SUCCESS)throw new Error("PeriodicExportingMetricReader: metrics export failed (error "+c.error+")");return[2]}})})},t.prototype.onInitialized=function(){var n=this;this._interval=setInterval(function(){n._runOnce()},this._exportInterval)},t.prototype.onForceFlush=function(){return Zn(this,void 0,void 0,function(){return tr(this,function(n){switch(n.label){case 0:return[4,this._runOnce()];case 1:return n.sent(),[4,this._exporter.forceFlush()];case 2:return n.sent(),[2]}})})},t.prototype.onShutdown=function(){return Zn(this,void 0,void 0,function(){return tr(this,function(n){switch(n.label){case 0:return this._interval&&clearInterval(this._interval),[4,this.onForceFlush()];case 1:return n.sent(),[4,this._exporter.shutdown()];case 2:return n.sent(),[2]}})})},t}(tT),oT=function(){function e(){this._registeredViews=[]}return e.prototype.addView=function(t){this._registeredViews.push(t)},e.prototype.findViews=function(t,n){var r=this,i=this._registeredViews.filter(function(o){return r._matchInstrument(o.instrumentSelector,t)&&r._matchMeter(o.meterSelector,n)});return i},e.prototype._matchInstrument=function(t,n){return(t.getType()===void 0||n.type===t.getType())&&t.getNameFilter().match(n.name)&&t.getUnitFilter().match(n.unit)},e.prototype._matchMeter=function(t,n){return t.getNameFilter().match(n.name)&&(n.version===void 0||t.getVersionFilter().match(n.version))&&(n.schemaUrl===void 0||t.getSchemaUrlFilter().match(n.schemaUrl))},e}(),Xt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),er=function(){function e(t,n){this._writableMetricStorage=t,this._descriptor=n}return e.prototype._record=function(t,n,r){if(n===void 0&&(n={}),r===void 0&&(r=P.active()),typeof t!="number"){b.warn("non-number value provided to metric "+this._descriptor.name+": "+t);return}this._descriptor.valueType===Lt.INT&&!Number.isInteger(t)&&(b.warn("INT value type cannot accept a floating-point value for "+this._descriptor.name+", ignoring the fractional digits."),t=Math.trunc(t),!Number.isInteger(t))||this._writableMetricStorage.record(t,n,r,$e(Date.now()))},e}(),aT=function(e){Xt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(n,r,i){this._record(n,r,i)},t}(er),sT=function(e){Xt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(n,r,i){if(n<0){b.warn("negative value provided to counter "+this._descriptor.name+": "+n);return}this._record(n,r,i)},t}(er),uT=function(e){Xt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(n,r,i){this._record(n,r,i)},t}(er),cT=function(e){Xt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(n,r,i){if(n<0){b.warn("negative value provided to histogram "+this._descriptor.name+": "+n);return}this._record(n,r,i)},t}(er),nr=function(){function e(t,n,r){this._observableRegistry=r,this._descriptor=t,this._metricStorages=n}return e.prototype.addCallback=function(t){this._observableRegistry.addCallback(t,this)},e.prototype.removeCallback=function(t){this._observableRegistry.removeCallback(t,this)},e}(),lT=function(e){Xt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(nr),pT=function(e){Xt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(nr),fT=function(e){Xt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(nr);function po(e){return e instanceof nr}var hT=function(){function e(t){this._meterSharedState=t}return e.prototype.createGauge=function(t,n){var r=Nt(t,L.GAUGE,n),i=this._meterSharedState.registerMetricStorage(r);return new uT(i,r)},e.prototype.createHistogram=function(t,n){var r=Nt(t,L.HISTOGRAM,n),i=this._meterSharedState.registerMetricStorage(r);return new cT(i,r)},e.prototype.createCounter=function(t,n){var r=Nt(t,L.COUNTER,n),i=this._meterSharedState.registerMetricStorage(r);return new sT(i,r)},e.prototype.createUpDownCounter=function(t,n){var r=Nt(t,L.UP_DOWN_COUNTER,n),i=this._meterSharedState.registerMetricStorage(r);return new aT(i,r)},e.prototype.createObservableGauge=function(t,n){var r=Nt(t,L.OBSERVABLE_GAUGE,n),i=this._meterSharedState.registerAsyncMetricStorage(r);return new pT(r,i,this._meterSharedState.observableRegistry)},e.prototype.createObservableCounter=function(t,n){var r=Nt(t,L.OBSERVABLE_COUNTER,n),i=this._meterSharedState.registerAsyncMetricStorage(r);return new lT(r,i,this._meterSharedState.observableRegistry)},e.prototype.createObservableUpDownCounter=function(t,n){var r=Nt(t,L.OBSERVABLE_UP_DOWN_COUNTER,n),i=this._meterSharedState.registerAsyncMetricStorage(r);return new fT(r,i,this._meterSharedState.observableRegistry)},e.prototype.addBatchObservableCallback=function(t,n){this._meterSharedState.observableRegistry.addBatchCallback(t,n)},e.prototype.removeBatchObservableCallback=function(t,n){this._meterSharedState.observableRegistry.removeBatchCallback(t,n)},e}(),ec=function(){function e(t){this._instrumentDescriptor=t}return e.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},e.prototype.updateDescription=function(t){this._instrumentDescriptor=Nt(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:t,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},e}(),dT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),nc=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},vT=function(){function e(t){this._hash=t,this._valueMap=new Map,this._keyMap=new Map}return e.prototype.get=function(t,n){return n!=null||(n=this._hash(t)),this._valueMap.get(n)},e.prototype.getOrDefault=function(t,n){var r=this._hash(t);if(this._valueMap.has(r))return this._valueMap.get(r);var i=n();return this._keyMap.has(r)||this._keyMap.set(r,t),this._valueMap.set(r,i),i},e.prototype.set=function(t,n,r){r!=null||(r=this._hash(t)),this._keyMap.has(r)||this._keyMap.set(r,t),this._valueMap.set(r,n)},e.prototype.has=function(t,n){return n!=null||(n=this._hash(t)),this._valueMap.has(n)},e.prototype.keys=function(){var t,n;return nc(this,function(r){switch(r.label){case 0:t=this._keyMap.entries(),n=t.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[n.value[1],n.value[0]]];case 2:return r.sent(),n=t.next(),[3,1];case 3:return[2]}})},e.prototype.entries=function(){var t,n;return nc(this,function(r){switch(r.label){case 0:t=this._valueMap.entries(),n=t.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[this._keyMap.get(n.value[0]),n.value[1],n.value[0]]];case 2:return r.sent(),n=t.next(),[3,1];case 3:return[2]}})},Object.defineProperty(e.prototype,"size",{get:function(){return this._valueMap.size},enumerable:!1,configurable:!0}),e}(),Kt=function(e){dT(t,e);function t(){return e.call(this,Uu)||this}return t}(vT),yT=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},rc=function(){function e(t,n){this._aggregator=t,this._activeCollectionStorage=new Kt,this._cumulativeMemoStorage=new Kt,this._overflowAttributes={"otel.metric.overflow":!0},this._cardinalityLimit=(n??2e3)-1,this._overflowHashCode=Uu(this._overflowAttributes)}return e.prototype.record=function(t,n,r,i){var o=this,a=this._activeCollectionStorage.get(n);if(!a){if(this._activeCollectionStorage.size>=this._cardinalityLimit){var u=this._activeCollectionStorage.getOrDefault(this._overflowAttributes,function(){return o._aggregator.createAccumulation(i)});u?.record(t);return}a=this._aggregator.createAccumulation(i),this._activeCollectionStorage.set(n,a)}a?.record(t)},e.prototype.batchCumulate=function(t,n){var r=this;Array.from(t.entries()).forEach(function(i){var o=yT(i,3),a=o[0],u=o[1],c=o[2],s=r._aggregator.createAccumulation(n);s?.record(u);var l=s;if(r._cumulativeMemoStorage.has(a,c)){var p=r._cumulativeMemoStorage.get(a,c);l=r._aggregator.diff(p,s)}else if(r._cumulativeMemoStorage.size>=r._cardinalityLimit&&(a=r._overflowAttributes,c=r._overflowHashCode,r._cumulativeMemoStorage.has(a,c))){var p=r._cumulativeMemoStorage.get(a,c);l=r._aggregator.diff(p,s)}if(r._activeCollectionStorage.has(a,c)){var f=r._activeCollectionStorage.get(a,c);l=r._aggregator.merge(f,l)}r._cumulativeMemoStorage.set(a,s,c),r._activeCollectionStorage.set(a,l,c)})},e.prototype.collect=function(){var t=this._activeCollectionStorage;return this._activeCollectionStorage=new Kt,t},e}(),fo=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ic=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},oc=function(){function e(t,n){var r=this;this._aggregator=t,this._unreportedAccumulations=new Map,this._reportHistory=new Map,n.forEach(function(i){r._unreportedAccumulations.set(i,[])})}return e.prototype.buildMetrics=function(t,n,r,i){this._stashAccumulations(r);var o=this._getMergedUnreportedAccumulations(t),a=o,u;if(this._reportHistory.has(t)){var c=this._reportHistory.get(t),s=c.collectionTime;u=c.aggregationTemporality,u===lt.CUMULATIVE?a=e.merge(c.accumulations,o,this._aggregator):a=e.calibrateStartTime(c.accumulations,o,s)}else u=t.selectAggregationTemporality(n.type);this._reportHistory.set(t,{accumulations:a,collectionTime:i,aggregationTemporality:u});var l=gT(a);if(l.length!==0)return this._aggregator.toMetricData(n,u,l,i)},e.prototype._stashAccumulations=function(t){var n,r,i=this._unreportedAccumulations.keys();try{for(var o=fo(i),a=o.next();!a.done;a=o.next()){var u=a.value,c=this._unreportedAccumulations.get(u);c===void 0&&(c=[],this._unreportedAccumulations.set(u,c)),c.push(t)}}catch(s){n={error:s}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype._getMergedUnreportedAccumulations=function(t){var n,r,i=new Kt,o=this._unreportedAccumulations.get(t);if(this._unreportedAccumulations.set(t,[]),o===void 0)return i;try{for(var a=fo(o),u=a.next();!u.done;u=a.next()){var c=u.value;i=e.merge(i,c,this._aggregator)}}catch(s){n={error:s}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},e.merge=function(t,n,r){for(var i=t,o=n.entries(),a=o.next();a.done!==!0;){var u=ic(a.value,3),c=u[0],s=u[1],l=u[2];if(t.has(c,l)){var p=t.get(c,l),f=r.merge(p,s);i.set(c,f,l)}else i.set(c,s,l);a=o.next()}return i},e.calibrateStartTime=function(t,n,r){var i,o;try{for(var a=fo(t.keys()),u=a.next();!u.done;u=a.next()){var c=ic(u.value,2),s=c[0],l=c[1],p=n.get(s,l);p?.setStartTime(r)}}catch(f){i={error:f}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return n},e}();function gT(e){return Array.from(e.entries())}var mT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),_T=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},ET=function(e){mT(t,e);function t(n,r,i,o,a){var u=e.call(this,n)||this;return u._attributesProcessor=i,u._aggregationCardinalityLimit=a,u._deltaMetricStorage=new rc(r,u._aggregationCardinalityLimit),u._temporalMetricStorage=new oc(r,o),u}return t.prototype.record=function(n,r){var i=this,o=new Kt;Array.from(n.entries()).forEach(function(a){var u=_T(a,2),c=u[0],s=u[1];o.set(i._attributesProcessor.process(c),s)}),this._deltaMetricStorage.batchCumulate(o,r)},t.prototype.collect=function(n,r){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(n,this._instrumentDescriptor,i,r)},t}(ec);function ac(e,t){var n="";return e.unit!==t.unit&&(n+=" - Unit '"+e.unit+"' does not match '"+t.unit+`'
297
297
  `),e.type!==t.type&&(n+=" - Type '"+e.type+"' does not match '"+t.type+`'
298
298
  `),e.valueType!==t.valueType&&(n+=" - Value Type '"+e.valueType+"' does not match '"+t.valueType+`'
299
299
  `),e.description!==t.description&&(n+=" - Description '"+e.description+"' does not match '"+t.description+`'
300
- `),n}function _T(e,t){return" - use valueType '"+e.valueType+"' on instrument creation or use an instrument name other than '"+t.name+"'"}function ET(e,t){return" - use unit '"+e.unit+"' on instrument creation or use an instrument name other than '"+t.name+"'"}function bT(e,t){var n={name:t.name,type:t.type,unit:t.unit},r=JSON.stringify(n);return" - create a new view with a name other than '"+e.name+"' and InstrumentSelector '"+r+"'"}function TT(e,t){var n={name:t.name,type:t.type,unit:t.unit},r=JSON.stringify(n);return" - create a new view with a name other than '"+e.name+"' and InstrumentSelector '"+r+`'
300
+ `),n}function bT(e,t){return" - use valueType '"+e.valueType+"' on instrument creation or use an instrument name other than '"+t.name+"'"}function TT(e,t){return" - use unit '"+e.unit+"' on instrument creation or use an instrument name other than '"+t.name+"'"}function ST(e,t){var n={name:t.name,type:t.type,unit:t.unit},r=JSON.stringify(n);return" - create a new view with a name other than '"+e.name+"' and InstrumentSelector '"+r+"'"}function wT(e,t){var n={name:t.name,type:t.type,unit:t.unit},r=JSON.stringify(n);return" - create a new view with a name other than '"+e.name+"' and InstrumentSelector '"+r+`'
301
301
  - OR - create a new view with the name `+e.name+" and description '"+e.description+"' and InstrumentSelector "+r+`
302
- - OR - create a new view with the name `+t.name+" and description '"+e.description+"' and InstrumentSelector "+r}function sc(e,t){return e.valueType!==t.valueType?_T(e,t):e.unit!==t.unit?ET(e,t):e.type!==t.type?bT(e,t):e.description!==t.description?TT(e,t):""}var ho=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ST=function(){function e(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}return e.create=function(){return new e},e.prototype.getStorages=function(t){var n,r,i,o,a=[];try{for(var u=ho(this._sharedRegistry.values()),c=u.next();!c.done;c=u.next()){var s=c.value;a=a.concat(s)}}catch(v){n={error:v}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}var l=this._perCollectorRegistry.get(t);if(l!=null)try{for(var p=ho(l.values()),f=p.next();!f.done;f=p.next()){var s=f.value;a=a.concat(s)}}catch(v){i={error:v}}finally{try{f&&!f.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}return a},e.prototype.register=function(t){this._registerStorage(t,this._sharedRegistry)},e.prototype.registerForCollector=function(t,n){var r=this._perCollectorRegistry.get(t);r==null&&(r=new Map,this._perCollectorRegistry.set(t,r)),this._registerStorage(n,r)},e.prototype.findOrUpdateCompatibleStorage=function(t){var n=this._sharedRegistry.get(t.name);return n===void 0?null:this._findOrUpdateCompatibleStorage(t,n)},e.prototype.findOrUpdateCompatibleCollectorStorage=function(t,n){var r=this._perCollectorRegistry.get(t);if(r===void 0)return null;var i=r.get(n.name);return i===void 0?null:this._findOrUpdateCompatibleStorage(n,i)},e.prototype._registerStorage=function(t,n){var r=t.getInstrumentDescriptor(),i=n.get(r.name);if(i===void 0){n.set(r.name,[t]);return}i.push(t)},e.prototype._findOrUpdateCompatibleStorage=function(t,n){var r,i,o=null;try{for(var a=ho(n),u=a.next();!u.done;u=a.next()){var c=u.value,s=c.getInstrumentDescriptor();mb(s,t)?(s.description!==t.description&&(t.description.length>s.description.length&&c.updateDescription(t.description),b.warn("A view or instrument with the name ",t.name,` has already been registered, but has a different description and is incompatible with another registered view.
302
+ - OR - create a new view with the name `+t.name+" and description '"+e.description+"' and InstrumentSelector "+r}function sc(e,t){return e.valueType!==t.valueType?bT(e,t):e.unit!==t.unit?TT(e,t):e.type!==t.type?ST(e,t):e.description!==t.description?wT(e,t):""}var ho=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},OT=function(){function e(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}return e.create=function(){return new e},e.prototype.getStorages=function(t){var n,r,i,o,a=[];try{for(var u=ho(this._sharedRegistry.values()),c=u.next();!c.done;c=u.next()){var s=c.value;a=a.concat(s)}}catch(v){n={error:v}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}var l=this._perCollectorRegistry.get(t);if(l!=null)try{for(var p=ho(l.values()),f=p.next();!f.done;f=p.next()){var s=f.value;a=a.concat(s)}}catch(v){i={error:v}}finally{try{f&&!f.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}return a},e.prototype.register=function(t){this._registerStorage(t,this._sharedRegistry)},e.prototype.registerForCollector=function(t,n){var r=this._perCollectorRegistry.get(t);r==null&&(r=new Map,this._perCollectorRegistry.set(t,r)),this._registerStorage(n,r)},e.prototype.findOrUpdateCompatibleStorage=function(t){var n=this._sharedRegistry.get(t.name);return n===void 0?null:this._findOrUpdateCompatibleStorage(t,n)},e.prototype.findOrUpdateCompatibleCollectorStorage=function(t,n){var r=this._perCollectorRegistry.get(t);if(r===void 0)return null;var i=r.get(n.name);return i===void 0?null:this._findOrUpdateCompatibleStorage(n,i)},e.prototype._registerStorage=function(t,n){var r=t.getInstrumentDescriptor(),i=n.get(r.name);if(i===void 0){n.set(r.name,[t]);return}i.push(t)},e.prototype._findOrUpdateCompatibleStorage=function(t,n){var r,i,o=null;try{for(var a=ho(n),u=a.next();!u.done;u=a.next()){var c=u.value,s=c.getInstrumentDescriptor();Eb(s,t)?(s.description!==t.description&&(t.description.length>s.description.length&&c.updateDescription(t.description),b.warn("A view or instrument with the name ",t.name,` has already been registered, but has a different description and is incompatible with another registered view.
303
303
  `,`Details:
304
304
  `,ac(s,t),`The longer description will be used.
305
305
  To resolve the conflict:`,sc(s,t))),o=c):b.warn("A view or instrument with the name ",t.name,` has already been registered and is incompatible with another registered view.
306
306
  `,`Details:
307
307
  `,ac(s,t),`To resolve the conflict:
308
- `,sc(s,t))}}catch(l){r={error:l}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o},e}(),wT=function(){function e(t){this._backingStorages=t}return e.prototype.record=function(t,n,r,i){this._backingStorages.forEach(function(o){o.record(t,n,r,i)})},e}(),OT=function(){function e(t,n){this._instrumentName=t,this._valueType=n,this._buffer=new Kt}return e.prototype.observe=function(t,n){if(n===void 0&&(n={}),typeof t!="number"){b.warn("non-number value provided to metric "+this._instrumentName+": "+t);return}this._valueType===Lt.INT&&!Number.isInteger(t)&&(b.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),t=Math.trunc(t),!Number.isInteger(t))||this._buffer.set(n,t)},e}(),LT=function(){function e(){this._buffer=new Map}return e.prototype.observe=function(t,n,r){if(r===void 0&&(r={}),!!po(t)){var i=this._buffer.get(t);if(i==null&&(i=new Kt,this._buffer.set(t,i)),typeof n!="number"){b.warn("non-number value provided to metric "+t._descriptor.name+": "+n);return}t._descriptor.valueType===Lt.INT&&!Number.isInteger(n)&&(b.warn("INT value type cannot accept a floating-point value for "+t._descriptor.name+", ignoring the fractional digits."),n=Math.trunc(n),!Number.isInteger(n))||i.set(r,n)}},e}(),vo=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},yo=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},uc=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},cc=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},AT=function(){function e(){this._callbacks=[],this._batchCallbacks=[]}return e.prototype.addCallback=function(t,n){var r=this._findCallback(t,n);r>=0||this._callbacks.push({callback:t,instrument:n})},e.prototype.removeCallback=function(t,n){var r=this._findCallback(t,n);r<0||this._callbacks.splice(r,1)},e.prototype.addBatchCallback=function(t,n){var r=new Set(n.filter(po));if(r.size===0){b.error("BatchObservableCallback is not associated with valid instruments",n);return}var i=this._findBatchCallback(t,r);i>=0||this._batchCallbacks.push({callback:t,instruments:r})},e.prototype.removeBatchCallback=function(t,n){var r=new Set(n.filter(po)),i=this._findBatchCallback(t,r);i<0||this._batchCallbacks.splice(i,1)},e.prototype.observe=function(t,n){return vo(this,void 0,void 0,function(){var r,i,o,a;return yo(this,function(u){switch(u.label){case 0:return r=this._observeCallbacks(t,n),i=this._observeBatchCallbacks(t,n),[4,pb(cc(cc([],uc(r),!1),uc(i),!1))];case 1:return o=u.sent(),a=o.filter(fb).map(function(c){return c.reason}),[2,a]}})})},e.prototype._observeCallbacks=function(t,n){var r=this;return this._callbacks.map(function(i){var o=i.callback,a=i.instrument;return vo(r,void 0,void 0,function(){var u,c;return yo(this,function(s){switch(s.label){case 0:return u=new OT(a._descriptor.name,a._descriptor.valueType),c=Promise.resolve(o(u)),n!=null&&(c=Ze(c,n)),[4,c];case 1:return s.sent(),a._metricStorages.forEach(function(l){l.record(u._buffer,t)}),[2]}})})})},e.prototype._observeBatchCallbacks=function(t,n){var r=this;return this._batchCallbacks.map(function(i){var o=i.callback,a=i.instruments;return vo(r,void 0,void 0,function(){var u,c;return yo(this,function(s){switch(s.label){case 0:return u=new LT,c=Promise.resolve(o(u)),n!=null&&(c=Ze(c,n)),[4,c];case 1:return s.sent(),a.forEach(function(l){var p=u._buffer.get(l);p!=null&&l._metricStorages.forEach(function(f){f.record(p,t)})}),[2]}})})})},e.prototype._findCallback=function(t,n){return this._callbacks.findIndex(function(r){return r.callback===t&&r.instrument===n})},e.prototype._findBatchCallback=function(t,n){return this._batchCallbacks.findIndex(function(r){return r.callback===t&&hb(r.instruments,n)})},e}(),RT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),CT=function(e){RT(t,e);function t(n,r,i,o,a){var u=e.call(this,n)||this;return u._attributesProcessor=i,u._aggregationCardinalityLimit=a,u._deltaMetricStorage=new rc(r,u._aggregationCardinalityLimit),u._temporalMetricStorage=new oc(r,o),u}return t.prototype.record=function(n,r,i,o){r=this._attributesProcessor.process(r,i),this._deltaMetricStorage.record(n,r,i,o)},t.prototype.collect=function(n,r){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(n,this._instrumentDescriptor,i,r)},t}(ec),lc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),go=function(){function e(){}return e.Noop=function(){return PT},e}(),xT=function(e){lc(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.process=function(n,r){return n},t}(go);(function(e){lc(t,e);function t(n){var r=e.call(this)||this;return r._allowedAttributeNames=n,r}return t.prototype.process=function(n,r){var i=this,o={};return Object.keys(n).filter(function(a){return i._allowedAttributeNames.includes(a)}).forEach(function(a){return o[a]=n[a]}),o},t})(go);var PT=new xT,NT=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},IT=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},kT=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},MT=function(){function e(t,n){this._meterProviderSharedState=t,this._instrumentationScope=n,this.metricStorageRegistry=new ST,this.observableRegistry=new AT,this.meter=new pT(this)}return e.prototype.registerMetricStorage=function(t){var n=this._registerMetricStorage(t,CT);return n.length===1?n[0]:new wT(n)},e.prototype.registerAsyncMetricStorage=function(t){var n=this._registerMetricStorage(t,mT);return n},e.prototype.collect=function(t,n,r){return NT(this,void 0,void 0,function(){var i,o,a;return IT(this,function(u){switch(u.label){case 0:return[4,this.observableRegistry.observe(n,r?.timeoutMillis)];case 1:return i=u.sent(),o=this.metricStorageRegistry.getStorages(t),o.length===0?[2,null]:(a=o.map(function(c){return c.collect(t,n)}).filter(cb),a.length===0?[2,{errors:i}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:a},errors:i}])}})})},e.prototype._registerMetricStorage=function(t,n){var r=this,i=this._meterProviderSharedState.viewRegistry.findViews(t,this._instrumentationScope),o=i.map(function(c){var s=gb(c,t),l=r.metricStorageRegistry.findOrUpdateCompatibleStorage(s);if(l!=null)return l;var p=c.aggregation.createAggregator(s),f=new n(s,p,c.attributesProcessor,r._meterProviderSharedState.metricCollectors,c.aggregationCardinalityLimit);return r.metricStorageRegistry.register(f),f});if(o.length===0){var a=this._meterProviderSharedState.selectAggregations(t.type),u=a.map(function(c){var s=kT(c,2),l=s[0],p=s[1],f=r.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(l,t);if(f!=null)return f;var v=p.createAggregator(t),y=l.selectCardinalityLimit(t.type),g=new n(t,v,go.Noop(),[l],y);return r.metricStorageRegistry.registerForCollector(l,g),g});o=o.concat(u)}return o},e}(),DT=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},UT=function(){function e(t){this.resource=t,this.viewRegistry=new rT,this.metricCollectors=[],this.meterSharedStates=new Map}return e.prototype.getMeterSharedState=function(t){var n=lb(t),r=this.meterSharedStates.get(n);return r==null&&(r=new MT(this,t),this.meterSharedStates.set(n,r)),r},e.prototype.selectAggregations=function(t){var n,r,i=[];try{for(var o=DT(this.metricCollectors),a=o.next();!a.done;a=o.next()){var u=a.value;i.push([u,u.selectAggregation(t)])}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},e}(),rr=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},ir=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},jT=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},BT=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},$T=function(){function e(t,n){this._sharedState=t,this._metricReader=n}return e.prototype.collect=function(t){return rr(this,void 0,void 0,function(){var n,r,i,o,a=this;return ir(this,function(u){switch(u.label){case 0:return n=$e(Date.now()),r=[],i=[],o=Array.from(this._sharedState.meterSharedStates.values()).map(function(c){return rr(a,void 0,void 0,function(){var s;return ir(this,function(l){switch(l.label){case 0:return[4,c.collect(this,n,t)];case 1:return s=l.sent(),s?.scopeMetrics!=null&&r.push(s.scopeMetrics),s?.errors!=null&&i.push.apply(i,BT([],jT(s.errors),!1)),[2]}})})}),[4,Promise.all(o)];case 1:return u.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:r},errors:i}]}})})},e.prototype.forceFlush=function(t){return rr(this,void 0,void 0,function(){return ir(this,function(n){switch(n.label){case 0:return[4,this._metricReader.forceFlush(t)];case 1:return n.sent(),[2]}})})},e.prototype.shutdown=function(t){return rr(this,void 0,void 0,function(){return ir(this,function(n){switch(n.label){case 0:return[4,this._metricReader.shutdown(t)];case 1:return n.sent(),[2]}})})},e.prototype.selectAggregationTemporality=function(t){return this._metricReader.selectAggregationTemporality(t)},e.prototype.selectAggregation=function(t){return this._metricReader.selectAggregation(t)},e.prototype.selectCardinalityLimit=function(t){var n,r,i;return(i=(r=(n=this._metricReader).selectCardinalityLimit)===null||r===void 0?void 0:r.call(n,t))!==null&&i!==void 0?i:2e3},e}(),pc=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},fc=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},hc=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function FT(e,t){var n=t??Ji.empty();return e?Ji.default().merge(n):n}var VT=function(){function e(t){var n,r,i,o,a;if(this._shutdown=!1,this._sharedState=new UT(FT((a=t?.mergeResourceWithDefaults)!==null&&a!==void 0?a:!0,t?.resource)),t?.views!=null&&t.views.length>0)try{for(var u=hc(t.views),c=u.next();!c.done;c=u.next()){var s=c.value;this._sharedState.viewRegistry.addView(s)}}catch(v){n={error:v}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}if(t?.readers!=null&&t.readers.length>0)try{for(var l=hc(t.readers),p=l.next();!p.done;p=l.next()){var f=p.value;this.addMetricReader(f)}}catch(v){i={error:v}}finally{try{p&&!p.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}}return e.prototype.getMeter=function(t,n,r){return n===void 0&&(n=""),r===void 0&&(r={}),this._shutdown?(b.warn("A shutdown MeterProvider cannot provide a Meter"),Nh()):this._sharedState.getMeterSharedState({name:t,version:n,schemaUrl:r.schemaUrl}).meter},e.prototype.addMetricReader=function(t){var n=new $T(this._sharedState,t);t.setMetricProducer(n),this._sharedState.metricCollectors.push(n)},e.prototype.shutdown=function(t){return pc(this,void 0,void 0,function(){return fc(this,function(n){switch(n.label){case 0:return this._shutdown?(b.warn("shutdown may only be called once per MeterProvider"),[2]):(this._shutdown=!0,[4,Promise.all(this._sharedState.metricCollectors.map(function(r){return r.shutdown(t)}))]);case 1:return n.sent(),[2]}})})},e.prototype.forceFlush=function(t){return pc(this,void 0,void 0,function(){return fc(this,function(n){switch(n.label){case 0:return this._shutdown?(b.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map(function(r){return r.forceFlush(t)}))];case 1:return n.sent(),[2]}})})},e}();function GT(e,t){var n=xu(t);return{resource:Pu(e.resource),schemaUrl:void 0,scopeMetrics:HT(e.scopeMetrics,n)}}function HT(e,t){return Array.from(e.map(function(n){return{scope:Nu(n.scope),metrics:n.metrics.map(function(r){return qT(r,t)}),schemaUrl:n.scope.schemaUrl}}))}function qT(e,t){var n={name:e.descriptor.name,description:e.descriptor.description,unit:e.descriptor.unit},r=WT(e.aggregationTemporality);switch(e.dataPointType){case dt.SUM:n.sum={aggregationTemporality:r,isMonotonic:e.isMonotonic,dataPoints:dc(e,t)};break;case dt.GAUGE:n.gauge={dataPoints:dc(e,t)};break;case dt.HISTOGRAM:n.histogram={aggregationTemporality:r,dataPoints:XT(e,t)};break;case dt.EXPONENTIAL_HISTOGRAM:n.exponentialHistogram={aggregationTemporality:r,dataPoints:KT(e,t)};break}return n}function zT(e,t,n){var r={attributes:Ht(e.attributes),startTimeUnixNano:n.encodeHrTime(e.startTime),timeUnixNano:n.encodeHrTime(e.endTime)};switch(t){case Lt.INT:r.asInt=e.value;break;case Lt.DOUBLE:r.asDouble=e.value;break}return r}function dc(e,t){return e.dataPoints.map(function(n){return zT(n,e.descriptor.valueType,t)})}function XT(e,t){return e.dataPoints.map(function(n){var r=n.value;return{attributes:Ht(n.attributes),bucketCounts:r.buckets.counts,explicitBounds:r.buckets.boundaries,count:r.count,sum:r.sum,min:r.min,max:r.max,startTimeUnixNano:t.encodeHrTime(n.startTime),timeUnixNano:t.encodeHrTime(n.endTime)}})}function KT(e,t){return e.dataPoints.map(function(n){var r=n.value;return{attributes:Ht(n.attributes),count:r.count,min:r.min,max:r.max,sum:r.sum,positive:{offset:r.positive.offset,bucketCounts:r.positive.bucketCounts},negative:{offset:r.negative.offset,bucketCounts:r.negative.bucketCounts},scale:r.scale,zeroCount:r.zeroCount,startTimeUnixNano:t.encodeHrTime(n.startTime),timeUnixNano:t.encodeHrTime(n.endTime)}})}function WT(e){switch(e){case lt.DELTA:return 1;case lt.CUMULATIVE:return 2}}function YT(e,t){return{resourceMetrics:e.map(function(n){return GT(n,t)})}}var JT=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},QT=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function ZT(e,t){var n,r=e.spanContext(),i=e.status;return{traceId:t.encodeSpanContext(r.traceId),spanId:t.encodeSpanContext(r.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:(n=r.traceState)===null||n===void 0?void 0:n.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:Ht(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(function(o){return e0(o,t)}),droppedEventsCount:e.droppedEventsCount,status:{code:i.code,message:i.message},links:e.links.map(function(o){return t0(o,t)}),droppedLinksCount:e.droppedLinksCount}}function t0(e,t){var n;return{attributes:e.attributes?Ht(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:(n=e.context.traceState)===null||n===void 0?void 0:n.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}function e0(e,t){return{attributes:e.attributes?Ht(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}function n0(e,t){var n=xu(t);return{resourceSpans:i0(e,n)}}function r0(e){var t,n,r=new Map;try{for(var i=JT(e),o=i.next();!o.done;o=i.next()){var a=o.value,u=r.get(a.resource);u||(u=new Map,r.set(a.resource,u));var c=a.instrumentationLibrary.name+"@"+(a.instrumentationLibrary.version||"")+":"+(a.instrumentationLibrary.schemaUrl||""),s=u.get(c);s||(s=[],u.set(c,s)),s.push(a)}}catch(l){t={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function i0(e,t){for(var n=r0(e),r=[],i=n.entries(),o=i.next();!o.done;){for(var a=QT(o.value,2),u=a[0],c=a[1],s=[],l=c.values(),p=l.next();!p.done;){var f=p.value;if(f.length>0){var v=f.map(function(g){return ZT(g,t)});s.push({scope:Nu(f[0].instrumentationLibrary),spans:v,schemaUrl:f[0].instrumentationLibrary.schemaUrl})}p=l.next()}var y={resource:Pu(u),scopeSpans:s,schemaUrl:void 0};r.push(y),o=i.next()}return r}var vc={serializeRequest:function(e){var t=YT([e],{useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},yc={serializeRequest:function(e){var t=n0(e,{useHex:!0,useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},o0=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},a0=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},s0=5,u0=1e3,c0=5e3,l0=1.5,gc=.2;function p0(){return Math.random()*(2*gc)-gc}var f0=function(){function e(t){this._transport=t}return e.prototype.retry=function(t,n,r){var i=this;return new Promise(function(o,a){setTimeout(function(){i._transport.send(t,n).then(o,a)},r)})},e.prototype.send=function(t,n){var r;return o0(this,void 0,void 0,function(){var i,o,a,u,c,s,l;return a0(this,function(p){switch(p.label){case 0:return i=Date.now()+n,[4,this._transport.send(t,n)];case 1:o=p.sent(),a=s0,u=u0,p.label=2;case 2:return o.status==="retryable"&&a>0?(a--,c=Math.max(Math.min(u,c0)+p0(),0),u=u*l0,s=(r=o.retryInMillis)!==null&&r!==void 0?r:c,l=i-Date.now(),s>l?[2,o]:[4,this.retry(t,l,s)]):[3,4];case 3:return o=p.sent(),[3,2];case 4:return[2,o]}})})},e.prototype.shutdown=function(){return this._transport.shutdown()},e}();function mc(e){return new f0(e.transport)}function h0(e){var t=[429,502,503,504];return t.includes(e)}function d0(e){if(e!=null){var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?t*1e3:-1;var n=new Date(e).getTime()-Date.now();return n>=0?n:0}}var v0=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},y0=function(){function e(t){this._parameters=t}return e.prototype.send=function(t,n){var r=this;return new Promise(function(i){var o=new XMLHttpRequest;o.timeout=n,o.open("POST",r._parameters.url);var a=r._parameters.headers();Object.entries(a).forEach(function(u){var c=v0(u,2),s=c[0],l=c[1];o.setRequestHeader(s,l)}),o.ontimeout=function(u){i({status:"failure",error:new Error("XHR request timed out")})},o.onreadystatechange=function(){o.status>=200&&o.status<=299?(b.debug("XHR success"),i({status:"success"})):o.status&&h0(o.status)?i({status:"retryable",retryInMillis:d0(o.getResponseHeader("Retry-After"))}):o.status!==0&&i({status:"failure",error:new Error("XHR request failed with non-retryable status")})},o.onabort=function(){i({status:"failure",error:new Error("XHR request aborted")})},o.onerror=function(){i({status:"failure",error:new Error("XHR request errored")})},o.send(t)})},e.prototype.shutdown=function(){},e}();function g0(e){return new y0(e)}var m0=function(){function e(t){this._params=t}return e.prototype.send=function(t){var n=this;return new Promise(function(r){navigator.sendBeacon(n._params.url,new Blob([t],{type:n._params.blobType}))?(b.debug("SendBeacon success"),r({status:"success"})):r({status:"failure",error:new Error("SendBeacon failed")})})},e.prototype.shutdown=function(){},e}();function _0(e){return new m0(e)}function E0(e,t){return Ou(e,t,mc({transport:g0(e)}))}function b0(e,t){return Ou(e,t,mc({transport:_0({url:e.url,blobType:e.headers()["Content-Type"]})}))}var T0=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function S0(e){return function(){var t,n={};return Object.entries((t=e?.())!==null&&t!==void 0?t:{}).forEach(function(r){var i=T0(r,2),o=i[0],a=i[1];typeof a<"u"?n[o]=String(a):b.warn('Header "'+o+'" has invalid value ('+a+") and will be ignored")}),n}}var Wt=function(){return Wt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Wt.apply(this,arguments)};function w0(e,t,n){var r=Wt({},n()),i={};return function(){return t!=null&&Object.assign(i,t()),e!=null&&Object.assign(i,e()),Object.assign(i,r)}}function O0(e){if(e!=null)try{return new URL(e),e}catch{throw new Error("Configuration: Could not parse user-provided export URL: '"+e+"'")}}function L0(e,t,n){var r,i,o,a;return Wt(Wt({},VE(e,t,n)),{headers:w0(S0(e.headers),t.headers,n.headers),url:(i=(r=O0(e.url))!==null&&r!==void 0?r:t.url)!==null&&i!==void 0?i:n.url,agentOptions:(a=(o=e.agentOptions)!==null&&o!==void 0?o:t.agentOptions)!==null&&a!==void 0?a:n.agentOptions})}function A0(e,t){return Wt(Wt({},GE()),{headers:function(){return e},url:"http://localhost:4318/"+t,agentOptions:{keepAlive:!0}})}function R0(e,t,n){return L0({url:e.url,timeoutMillis:e.timeoutMillis,headers:FE(e.headers),concurrencyLimit:e.concurrencyLimit},{},A0(n,t))}function _c(e,t,n,r){var i=!!e.headers||typeof navigator.sendBeacon!="function",o=R0(e,n,r);return i?E0(o,t):b0(o,t)}var C0=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),x0=function(e){C0(t,e);function t(n){return n===void 0&&(n={}),e.call(this,_c(n,yc,"v1/traces",{"Content-Type":"application/json"}))||this}return t}(Su),or;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE",e[e.LOWMEMORY=2]="LOWMEMORY"})(or||(or={}));var P0=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),mo=function(){return lt.CUMULATIVE},Ec=function(e){switch(e){case L.COUNTER:case L.OBSERVABLE_COUNTER:case L.GAUGE:case L.HISTOGRAM:case L.OBSERVABLE_GAUGE:return lt.DELTA;case L.UP_DOWN_COUNTER:case L.OBSERVABLE_UP_DOWN_COUNTER:return lt.CUMULATIVE}},bc=function(e){switch(e){case L.COUNTER:case L.HISTOGRAM:return lt.DELTA;case L.GAUGE:case L.UP_DOWN_COUNTER:case L.OBSERVABLE_UP_DOWN_COUNTER:case L.OBSERVABLE_COUNTER:case L.OBSERVABLE_GAUGE:return lt.CUMULATIVE}};function N0(){var e=Bd(),t=e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return t==="cumulative"?mo:t==="delta"?Ec:t==="lowmemory"?bc:(b.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),mo)}function I0(e){return e!=null?e===or.DELTA?Ec:e===or.LOWMEMORY?bc:mo:N0()}function k0(e){return e!=null&&e.aggregationPreference?e.aggregationPreference:function(t){return Et.Default()}}var M0=function(e){P0(t,e);function t(n,r){var i=e.call(this,n)||this;return i._aggregationSelector=k0(r),i._aggregationTemporalitySelector=I0(r?.temporalityPreference),i}return t.prototype.selectAggregation=function(n){return this._aggregationSelector(n)},t.prototype.selectAggregationTemporality=function(n){return this._aggregationTemporalitySelector(n)},t}(Su),D0=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),U0=function(e){D0(t,e);function t(n){return e.call(this,_c(n??{},vc,"v1/metrics",{"Content-Type":"application/json"}),n)||this}return t}(M0);function j0(e,t){const n=e.spanContext();return{name:e.name,kind:e.kind,spanContext:()=>n,parentSpanId:e.parentSpanId,startTime:e.startTime,endTime:e.endTime,status:e.status,attributes:Mv(e.attributes,t),links:e.links,events:e.events,duration:e.duration,ended:e.ended,resource:e.resource,instrumentationLibrary:e.instrumentationLibrary,droppedAttributesCount:e.droppedAttributesCount,droppedEventsCount:e.droppedEventsCount,droppedLinksCount:e.droppedLinksCount}}function B0(e,t){if(!t.isSamplingEnabled())return e;const n=[],r={},i={};for(const o of e){o.parentSpanId&&(i[o.parentSpanId]=i[o.parentSpanId]||[],i[o.parentSpanId].push(o.spanContext().spanId));const a=t.shouldSample(o);a.sample?a.attributes?r[o.spanContext().spanId]=j0(o,a.attributes):r[o.spanContext().spanId]=o:n.push(o.spanContext().spanId)}for(;n.length>0;){const o=n.shift(),a=i[o];if(a)for(const u of a)delete r[u],n.push(u)}return Object.values(r)}const $0=(e,t,n)=>{if(typeof navigator>"u"||!navigator.sendBeacon)return!1;try{const r=new Blob([t],{type:n});return navigator.sendBeacon(e,r)}catch{return!1}},Tc=(e,t,n,r)=>{const i=o=>{if($0(e,t,n))return r({code:B.SUCCESS});r({code:B.FAILED,error:o})};try{const o=new Blob([t],{type:n});fetch(e,{method:"POST",body:o,keepalive:!0,headers:{"Content-Type":n},credentials:"omit"}).then(a=>{if(a.ok)return r({code:B.SUCCESS});r({code:B.FAILED,error:new Error(`keepalive fetch export failed with status ${a.status}`)})},a=>i(a))}catch(o){i(o)}};class F0 extends x0{constructor(t,n){var r;super(Q(R({},t),{headers:{}})),C(this,"url"),C(this,"unloading",!1),this.sampler=n,this.url=(r=t?.url)!=null?r:""}setUnloading(t){this.unloading=t}export(t,n){const r=B0(t,this.sampler);if(r.length===0)return;if(this.unloading){const a=yc.serializeRequest(r);if(!a||!this.url)return n({code:B.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});Tc(this.url,a,"application/json",n);return}let i=0;const o=a=>{if(a.code===B.SUCCESS)return n({code:B.SUCCESS});if(i++,i>$r)return n({code:B.FAILED,error:a.error});new Promise(u=>setTimeout(u,Fr+Vr*Math.pow(2,i))).then(()=>{super.export(r,o)})};super.export(r,o)}}class V0 extends U0{constructor(t){var n;super(Q(R({},t),{headers:{}})),C(this,"url"),C(this,"unloading",!1),this.url=(n=t?.url)!=null?n:""}setUnloading(t){this.unloading=t}export(t,n){if(this.unloading){const o=vc.serializeRequest(t);if(!o||!this.url)return n({code:B.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});Tc(this.url,o,"application/json",n);return}let r=0;const i=o=>{var a;if(o.code===B.SUCCESS)return n({code:B.SUCCESS});if(r++,r>$r)return console.error(`[@launchdarkly/observability] failed to export OTeL metrics: ${(a=o.error)==null?void 0:a.message}`,o.error),n({code:B.FAILED,error:o.error});new Promise(u=>setTimeout(u,Fr+Vr*Math.pow(2,r))).then(()=>{var u;console.warn(`[@launchdarkly/observability] retry ${r}, failed to export OTeL metrics: ${(u=o.error)==null?void 0:u.message}`,o.error),super.export(t,i)})};super.export(t,i)}}const G0="OT_ZONE_CONTEXT",H0="Navigation:";function q0(){return!1}const _o=class ee extends ls{constructor(t={}){var n,r;super(ee.moduleName,ee.version,t),C(this,"_spansData",new WeakMap),C(this,"_zonePatched"),C(this,"_wrappedListeners",new WeakMap),C(this,"_eventsSpanMap",new WeakMap),C(this,"_eventNames"),C(this,"_shouldPreventSpanCreation"),C(this,"_getLDContextKeyAttributes"),this._getLDContextKeyAttributes=t.getLDContextKeyAttributes,this._eventNames=new Set((n=t?.eventNames)!=null?n:[]),((r=t.productAnalyticsEvents)==null?void 0:r.clicks)!==!1&&this._eventNames.add("click"),this._shouldPreventSpanCreation=typeof t?.shouldPreventSpanCreation=="function"?t.shouldPreventSpanCreation:q0}init(){}_checkForTimeout(t,n){const r=this._spansData.get(n);r&&(t.source==="setTimeout"?r.hrTimeLastTimeout=ev():t.source!=="Promise.then"&&t.source!=="setTimeout"&&(r.hrTimeLastTimeout=void 0))}_allowEventName(t){return this._eventNames.has(t)}_createSpan(t,n){var r,i;const o=t?.target,a=t?.type;if(!(o instanceof HTMLElement)||!o.getAttribute||o.hasAttribute("disabled")||!this._allowEventName(a))return;const u=Hs(o,!0);try{const c=this.tracer.startSpan(a,{attributes:{[wt]:window.location.href,"event.type":a,"event.tag":o.tagName,"event.xpath":u,"event.id":o.id,"event.classname":o.className,"event.text":(r=o.textContent)!=null?r:"","event.url":window.location.href,"viewport.width":window.innerWidth,"viewport.height":window.innerHeight}},n?k.setSpan(P.active(),n):void 0);t instanceof MouseEvent&&(c.setAttribute("event.x",t.clientX),c.setAttribute("event.y",t.clientY),c.setAttribute("event.relativeX",t.clientX/window.innerWidth),c.setAttribute("event.relativeY",t.clientY/window.innerHeight),a==="scroll"&&(c.setAttribute("event.scrollX",window.scrollX),c.setAttribute("event.scrollY",window.scrollY)));const s=(i=this._getLDContextKeyAttributes)==null?void 0:i.call(this);return s&&c.setAttributes(s),this._shouldPreventSpanCreation(a,o,c)===!0?void 0:(this._spansData.set(c,{taskCount:0}),c)}catch(c){this._diag.error("failed to start create new user interaction span",c)}}_decrementTask(t){const n=this._spansData.get(t);n&&(n.taskCount--,n.taskCount===0&&this._tryToEndSpan(t,n.hrTimeLastTimeout))}_getCurrentSpan(t){const n=t.get(G0);return n&&k.getSpan(n)}_incrementTask(t){const n=this._spansData.get(t);n&&n.taskCount++}addPatchedListener(t,n,r,i){let o=this._wrappedListeners.get(r);o||(o=new Map,this._wrappedListeners.set(r,o));let a=o.get(n);return a||(a=new Map,o.set(n,a)),a.has(t)?!1:(a.set(t,i),!0)}removePatchedListener(t,n,r){const i=this._wrappedListeners.get(r);if(!i)return;const o=i.get(n);if(!o)return;const a=o.get(t);return a&&(o.delete(t),o.size===0&&(i.delete(n),i.size===0&&this._wrappedListeners.delete(r))),a}_invokeListener(t,n,r){return typeof t=="function"?t.apply(n,r):t.handleEvent(r[0])}_patchAddEventListener(){const t=this;let n=new Map;return r=>function(i,o,a){if(!o)return r.call(this,i,o,a);const u=a&&typeof a=="object"&&a.once,c=function(...s){var l;let p;const f=s[0];if(!(f!=null&&f.type))return t._invokeListener(o,this,s);if(Date.now()-((l=n.get(f.type))!=null?l:0)<1e3/60)return t._invokeListener(o,this,s);n.set(f.type,Date.now()),f&&(p=t._eventsSpanMap.get(f)),u&&t.removePatchedListener(this,i,o);const v=t._createSpan(f,p);return v?(f&&t._eventsSpanMap.set(f,v),P.with(k.setSpan(P.active(),v),()=>{const y=t._invokeListener(o,this,s);return v.end(),y})):t._invokeListener(o,this,s)};if(t.addPatchedListener(this,i,o,c))return r.call(this,i,c,a)}}_patchRemoveEventListener(){const t=this;return n=>function(r,i,o){const a=t.removePatchedListener(this,r,i);return a?n.call(this,r,a,o):n.call(this,r,i,o)}}_getPatchableEventTargets(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}_patchHistoryApi(){this._unpatchHistoryApi(),this._wrap(history,"replaceState",this._patchHistoryMethod()),this._wrap(history,"pushState",this._patchHistoryMethod()),this._wrap(history,"back",this._patchHistoryMethod()),this._wrap(history,"forward",this._patchHistoryMethod()),this._wrap(history,"go",this._patchHistoryMethod())}_patchHistoryMethod(){const t=this;return n=>function(...r){const i=`${location.pathname}${location.hash}${location.search}`,o=n.apply(this,r),a=`${location.pathname}${location.hash}${location.search}`;return i!==a&&t._updateInteractionName(a),o}}_unpatchHistoryApi(){et(history.replaceState)&&this._unwrap(history,"replaceState"),et(history.pushState)&&this._unwrap(history,"pushState"),et(history.back)&&this._unwrap(history,"back"),et(history.forward)&&this._unwrap(history,"forward"),et(history.go)&&this._unwrap(history,"go")}_updateInteractionName(t){const n=k.getSpan(P.active());n&&typeof n.updateName=="function"&&n.updateName(`${H0} ${t}`)}_patchZoneCancelTask(){const t=this;return n=>function(r){const i=Zone.current,o=t._getCurrentSpan(i);return o&&t._shouldCountTask(r,i)&&t._decrementTask(o),n.call(this,r)}}_patchZoneScheduleTask(){const t=this;return n=>function(r){const i=Zone.current,o=t._getCurrentSpan(i);return o&&t._shouldCountTask(r,i)&&(t._incrementTask(o),t._checkForTimeout(r,o)),n.call(this,r)}}_patchZoneRunTask(){const t=this;return n=>function(r,i,o){const a=Array.isArray(o)&&o[0]instanceof Event?o[0]:void 0,u=a?.target;let c;const s=this;if(u){if(c=t._createSpan(a),c)return t._incrementTask(c),s.run(()=>{try{return P.with(k.setSpan(P.active(),c),()=>{const l=Zone.current;return r._zone=l,n.call(l,r,i,o)})}finally{t._decrementTask(c)}})}else c=t._getCurrentSpan(s);try{return n.call(s,r,i,o)}finally{c&&t._shouldCountTask(r,s)&&t._decrementTask(c)}}}_shouldCountTask(t,n){if(t._zone&&(n=t._zone),!n||!t.data||t.data.isPeriodic)return!1;const r=this._getCurrentSpan(n);return!r||!this._spansData.get(r)?!1:t.type==="macroTask"||t.type==="microTask"}_tryToEndSpan(t,n){t&&this._spansData.get(t)&&(t.end(n),this._spansData.delete(t))}enable(){const t=this._getZoneWithPrototype();this._diag.debug("applying patch to",ee.moduleName,ee.version,"zone:",!!t),t?(et(t.prototype.runTask)&&(this._unwrap(t.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),et(t.prototype.scheduleTask)&&(this._unwrap(t.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),et(t.prototype.cancelTask)&&(this._unwrap(t.prototype,"cancelTask"),this._diag.debug("removing previous patch from method cancelTask")),this._zonePatched=!0,this._wrap(t.prototype,"runTask",this._patchZoneRunTask()),this._wrap(t.prototype,"scheduleTask",this._patchZoneScheduleTask()),this._wrap(t.prototype,"cancelTask",this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(n=>{et(n.addEventListener)&&(this._unwrap(n,"addEventListener"),this._diag.debug("removing previous patch from method addEventListener")),et(n.removeEventListener)&&(this._unwrap(n,"removeEventListener"),this._diag.debug("removing previous patch from method removeEventListener")),this._wrap(n,"addEventListener",this._patchAddEventListener()),this._wrap(n,"removeEventListener",this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){const t=this._getZoneWithPrototype();this._diag.debug("removing patch from",ee.moduleName,ee.version,"zone:",!!t),t&&this._zonePatched?(et(t.prototype.runTask)&&this._unwrap(t.prototype,"runTask"),et(t.prototype.scheduleTask)&&this._unwrap(t.prototype,"scheduleTask"),et(t.prototype.cancelTask)&&this._unwrap(t.prototype,"cancelTask")):this._getPatchableEventTargets().forEach(n=>{et(n.addEventListener)&&this._unwrap(n,"addEventListener"),et(n.removeEventListener)&&this._unwrap(n,"removeEventListener")}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}};C(_o,"version","0.1.1"),C(_o,"moduleName","user-interaction");let z0=_o;const Eo=class No extends ls{constructor(t={}){super(No.moduleName,No.version,t),C(this,"_getLDContextKeyAttributes"),C(this,"_unlisten"),C(this,"_lastUrl",""),this._getLDContextKeyAttributes=t.getLDContextKeyAttributes}init(){}enable(){this._lastUrl=window.location.href,this._unlisten=Ef(t=>{var n;const r=this._lastUrl;if(this._lastUrl=t,r!==t)try{const i=this.tracer.startSpan(vf,{attributes:{[wt]:t,"page_view.previous_url":r,"page_view.url":t}}),o=(n=this._getLDContextKeyAttributes)==null?void 0:n.call(this);o&&i.setAttributes(o),i.end()}catch(i){this._diag.error("failed to create page view span",i)}})}disable(){var t;(t=this._unlisten)==null||t.call(this),this._unlisten=void 0}};C(Eo,"version","0.1.0"),C(Eo,"moduleName","location-change");let X0=Eo,z={},be,ar;const Yt="highlight.record",K0="highlight.session_id",bo=new Map,Sc=e=>`${e.spanContext().traceId}:${e.spanContext().spanId}`,wc="launchdarkly.js.log",W0="launchdarkly.exception.id",Oc="launchdarkly.sampling.ratio",Lc="log.severity",Ac="log.message",Y0=(e,t)=>{var n,r,i,o,a,u,c,s,l,p;if(z.tracerProvider||z.meterProvider){console.warn("OTEL already initialized. Skipping...");return}be=e;const f=e.backendUrl||void 0||"https://pub.highlight.io",v=[...(r=(n=e.networkRecordingOptions)==null?void 0:n.urlBlocklist)!=null?r:[],...OE],y=(i=e.environment)!=null?i:"production",g={url:e.otlpEndpoint+"/v1/traces",concurrencyLimit:10,timeoutMillis:3e4,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:6e4,keepAlive:!0}},m=new F0(g,t),E=new sr(m,{maxExportBatchSize:1024,maxQueueSize:2048,exportTimeoutMillis:g.timeoutMillis,scheduledDelayMillis:5e3}),S=new Ji({[Dp]:(o=e.serviceName)!=null?o:"highlight-browser",[Up]:e.serviceVersion,"deployment.environment.name":y,"highlight.project_id":e.projectId,[Fp]:navigator.userAgent,"browser.language":navigator.language,"telemetry.distro.name":"@highlight-run/observability","telemetry.distro.version":Sf});z.tracerProvider=new sm({resource:S,mergeResourceWithDefaults:!0,spanProcessors:[E]}),k.setGlobalTracerProvider(z.tracerProvider);const N=new V0(Q(R({},g),{url:e.otlpEndpoint+"/v1/metrics"})),j=new nT({exporter:N,exportIntervalMillis:g.timeoutMillis,exportTimeoutMillis:g.timeoutMillis});z.meterProvider=new VT({resource:S,readers:[j]}),pe.setGlobalMeterProvider(z.meterProvider);let $=[];if(((a=e.instrumentations)==null?void 0:a["@opentelemetry/instrumentation-document-load"])!==!1&&$.push(new Nm({applyCustomAttributesOnSpan:{documentLoad:Pc,documentFetch:Pc,resourceFetch:sS}})),((u=e.instrumentations)==null?void 0:u["@opentelemetry/instrumentation-user-interaction"])!==!1&&$.push(new z0({productAnalyticsEvents:e.productAnalyticsEvents,getLDContextKeyAttributes:e.getLDContextKeyAttributes})),((c=e.productAnalyticsEvents)==null?void 0:c.pageViews)!==!1&&$.push(new X0({getLDContextKeyAttributes:e.getLDContextKeyAttributes})),(s=e.networkRecordingOptions)!=null&&s.enabled){if(((l=e.instrumentations)==null?void 0:l["@opentelemetry/instrumentation-fetch"])!==!1){const X=new L_({propagateTraceHeaderCorsUrls:Ic(e.tracingOrigins),applyCustomAttributesOnSpan:(U,bt,yt)=>{var W,Qt;if(!U.attributes)return;const Tt=U;if(Tt.attributes[Yt]!==!1){if(xc(U,bt.body,bt.headers,e.networkRecordingOptions),!(yt instanceof Response)){U.setAttributes({"http.response.error":yt.message,[aa]:yt.status});return}if(!((W=e.networkRecordingOptions)!=null&&W.requestResponseSanitizer&&(So(U,e.networkRecordingOptions.requestResponseSanitizer),Tt.attributes[Yt]===!1))&&(Qt=e.networkRecordingOptions)!=null&&Qt.recordHeadersAndBody){const h=ct(void 0,null,function*(){var _,A,G,V,M,Zt;const te=yield jE(yt,(_=e.networkRecordingOptions)==null?void 0:_.bodyKeysToRecord,(A=e.networkRecordingOptions)==null?void 0:A.networkBodyKeysToRedact),sn=Object.fromEntries(yt.headers.entries()),WS=Qi((V=(G=e.networkRecordingOptions)==null?void 0:G.networkHeadersToRedact)!=null?V:[],sn,(M=e.networkRecordingOptions)==null?void 0:M.headerKeysToRecord),YS=To(WS,"http.response.header");Object.assign(U.attributes,R({"http.response.body":te},YS)),(Zt=e.networkRecordingOptions)!=null&&Zt.requestResponseSanitizer&&So(U,e.networkRecordingOptions.requestResponseSanitizer)});bo.set(Sc(U),h)}}}});$.push(X)}((p=e.instrumentations)==null?void 0:p["@opentelemetry/instrumentation-xml-http-request"])!==!1&&$.push(new dE({propagateTraceHeaderCorsUrls:Ic(e.tracingOrigins),applyCustomAttributesOnSpan:(X,U)=>{var bt,yt,W,Qt;const Tt=U;if(!(!X.attributes||X.attributes[Yt]===!1)){if(xc(X,Tt._body,Tt._requestHeaders,e.networkRecordingOptions),(bt=e.networkRecordingOptions)!=null&&bt.recordHeadersAndBody){let h="";(U.responseType===""||U.responseType==="text")&&(h=to(U.responseText,(yt=e.networkRecordingOptions)==null?void 0:yt.networkBodyKeysToRedact,(W=e.networkRecordingOptions)==null?void 0:W.bodyKeysToRecord,void 0));const _=eS(U.getAllResponseHeaders());oS(X,_,h,e.networkRecordingOptions)}(Qt=e.networkRecordingOptions)!=null&&Qt.requestResponseSanitizer&&So(X,e.networkRecordingOptions.requestResponseSanitizer)}}}))}Xv({instrumentations:$});const nt=new Fs;return nt.enable(),z.tracerProvider.register({contextManager:nt,propagator:new ov({propagators:[new md,new Q0({backendUrl:f,otlpEndpoint:e.otlpEndpoint,tracingOrigins:e.tracingOrigins,urlBlocklist:v})]})}),ar=J0(m,N,E,()=>z),z},J0=(e,t,n,r)=>{if(typeof document>"u"||typeof window>"u")return()=>{};const i=()=>{var u,c;e.setUnloading(!0),t.setUnloading(!0),n.setSkipPendingOnFlush(!0);const s=r();(u=s.tracerProvider)==null||u.forceFlush().catch(()=>{}),(c=s.meterProvider)==null||c.forceFlush().catch(()=>{})},o=()=>{document.visibilityState==="hidden"?i():document.visibilityState==="visible"&&(e.setUnloading(!1),t.setUnloading(!1),n.setSkipPendingOnFlush(!1))},a=()=>i();return document.addEventListener("visibilitychange",o),window.addEventListener("pagehide",a),()=>{document.removeEventListener("visibilitychange",o),window.removeEventListener("pagehide",a)}};class sr extends Us{constructor(){super(...arguments),C(this,"_pendingSpans",new Set),C(this,"_skipPendingOnFlush",!1)}setSkipPendingOnFlush(t){this._skipPendingOnFlush=t}onStart(t,n){t.setAttribute(K0,Ot()),super.onStart(t,n)}onEnd(t){if(t.attributes[Yt]===!1)return;const n=Sc(t),r=bo.get(n);if(r){const i=r.catch(o=>{console.warn("[CustomBatchSpanProcessor] Failed to capture response body attributes",o)}).finally(()=>{bo.delete(n),this._pendingSpans.delete(i),t.attributes[Yt]!==!1&&super.onEnd(t)});this._pendingSpans.add(i);return}super.onEnd(t)}shutdown(){return ct(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),Oa(sr.prototype,this,"shutdown").call(this)})}forceFlush(){return ct(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),Oa(sr.prototype,this,"forceFlush").call(this)})}}class Q0 extends Tv{constructor(t){super(),C(this,"highlightEndpoints"),C(this,"tracingOrigins"),C(this,"urlBlocklist"),this.highlightEndpoints=[t.backendUrl,`${t.otlpEndpoint}/v1/traces`,`${t.otlpEndpoint}/v1/logs`,`${t.otlpEndpoint}/v1/metrics`],this.tracingOrigins=t.tracingOrigins,this.urlBlocklist=t.urlBlocklist}inject(t,n,r){var i;const o=k.getSpan(t);if(!o||!o.attributes)return;const a=kc(o);typeof a=="string"&&(aS(a,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||o.setAttribute(Yt,!1),!kE(a,(i=this.tracingOrigins)!=null?i:[],this.urlBlocklist))||super.inject(t,n,r)}}const Rc="highlight-browser",Z0=Rc,Cc=()=>{var e;return(e=z.tracerProvider)==null?void 0:e.getTracer(Rc)},ur=()=>{var e;return(e=z.meterProvider)==null?void 0:e.getMeter(Z0)},tS=()=>ct(void 0,null,function*(){ar&&(ar(),ar=void 0),yield Promise.allSettled([ct(void 0,null,function*(){z.tracerProvider?(yield z.tracerProvider.shutdown(),z.tracerProvider=void 0):console.warn("OTEL shutdown called without initialized tracerProvider.")}),ct(void 0,null,function*(){z.meterProvider?(yield z.meterProvider.shutdown(),z.meterProvider=void 0):console.warn("OTEL shutdown called without initialized meterProvider.")})])}),xc=(e,t,n,r)=>{var i;if(!e.attributes)return;const o=kc(e),a=Zi(o),u=Eu(a),c=typeof t=="string"?t:String(t);try{const s=t?JSON.parse(c):void 0;s!=null&&s.operationName&&e.setAttribute("graphql.operation.name",s.operationName)}catch{}if(e.setAttributes({"highlight.type":"http.request",[Ee]:a,[wt]:a,[bn]:u.pathname,[$p]:u.search}),e.setAttributes(nS(u.searchParams,"url.query_params")),r!=null&&r.recordHeadersAndBody){const s=to(t,r.networkBodyKeysToRedact,r.bodyKeysToRecord,n);e.setAttribute("http.request.body",s);const l=Qi((i=r.networkHeadersToRedact)!=null?i:[],n,r.headerKeysToRecord),p=To(l,"http.request.header");e.setAttributes(p)}},eS=e=>{const t={};return e&&e.trim().split(/[\r\n]+/).forEach(n=>{const r=n.split(": "),i=r.shift();i&&(t[i]=r.join(": "))}),t},To=(e,t)=>{const n={};return Object.entries(e).forEach(([r,i])=>{const o=r.toLowerCase().replace(/_/g,"-"),a=`${t}.${o}`,u=iS(o,i);if(n[a]){const c=n[a];Array.isArray(c)?n[a]=[...c,...u]:n[a]=[c,...u]}else n[a]=u.length===1?u[0]:u}),n},nS=(e,t)=>{const n={};for(const[r,i]of e.entries()){const o=`${t}.${r}`,a=n[o];a===void 0?n[o]=i:Array.isArray(a)?a.push(i):n[o]=[a,i]}return n},rS=new Set(["accept","accept-charset","accept-encoding","accept-language","accept-ranges","allow","cache-control","connection","content-encoding","content-language","expect","if-match","if-none-match","pragma","proxy-authenticate","te","trailer","transfer-encoding","upgrade","vary","via","warning","www-authenticate","access-control-allow-headers","access-control-allow-methods","access-control-expose-headers","access-control-request-headers"]),iS=(e,t)=>rS.has(e)?t.split(",").map(n=>n.trim()).filter(n=>n.length>0):[t],oS=(e,t,n,r)=>{var i;e.setAttribute("http.response.body",n);const o=Qi((i=r.networkHeadersToRedact)!=null?i:[],t,r.headerKeysToRecord),a=To(o,"http.response.header");e.setAttributes(a)},So=(e,t)=>{var n,r,i,o,a,u,c,s,l,p;const f=e.attributes,v={},y={};for(const[N,j]of Object.entries(f))N.startsWith("http.request.header.")&&(v[N.slice(20)]=String(j)),N.startsWith("http.response.header.")&&(y[N.slice(21)]=String(j));let g={request:{sessionSecureID:"",id:"",url:(r=(n=f[wt])!=null?n:f[Ee])!=null?r:"",verb:(i=f["http.request.method"])!=null?i:"GET",headers:v,body:(o=f["http.request.body"])!=null?o:""},response:{status:Number((a=f[aa])!=null?a:0),headers:y,body:(u=f["http.response.body"])!=null?u:""},urlBlocked:!1},m=!0;try{g.request.body=JSON.parse(g.request.body)}catch{m=!1}let E=!0;try{g.response.body=JSON.parse(g.response.body)}catch{E=!1}let S;try{S=t(g)}catch{return}if(!S){Object.assign(e.attributes,{[Yt]:!1});return}m&&(c=S.request)!=null&&c.body&&(S.request.body=JSON.stringify(S.request.body)),E&&(s=S.response)!=null&&s.body&&(S.response.body=JSON.stringify(S.response.body)),Object.assign(e.attributes,{"http.request.body":(l=S.request.body)!=null?l:"","http.response.body":(p=S.response.body)!=null?p:""})},aS=(e,t,n,r)=>r!=null&&r.some(i=>e.toLowerCase().includes(i))?!1:IE(e,t),Pc=e=>{var t,n,r;if(!e.events)return;const i=e.events,o={unload:ot("unloadEventStart","unloadEventEnd",i),dom_interactive:ot("fetchStart","domInteractive",i),dom_content_loaded:ot("domContentLoadedEventStart","domContentLoadedEventEnd",i),dom_complete:ot("fetchStart","domComplete",i),load_event:ot("loadEventStart","loadEventEnd",i),document_load:ot("fetchStart","loadEventEnd",i),first_paint:ot("fetchStart","firstPaint",i),first_contentful_paint:ot("fetchStart","firstContentfulPaint",i),domain_lookup:ot("domainLookupStart","domainLookupEnd",i),connect:ot("connectStart","connectEnd",i),request:ot("requestStart","requestEnd",i),response:ot("responseStart","responseEnd",i)},a=(n=(t=be?.getIntegrations)==null?void 0:t.call(be))!=null?n:[];if(o.document_load!==void 0)for(const u of a)u.recordGauge((r=be?.sessionSecureId)!=null?r:"",{name:yf,value:o.document_load/1e6});Object.entries(o).forEach(([u,c])=>{c!==void 0&&(e.setAttribute(`timings.${u}.ns`,c),e.setAttribute(`timings.${u}.readable`,Nc(c)))})};function ot(e,t,n){const r=n.find(a=>a.name===e),i=n.find(a=>a.name===t);if(!r||!i)return;const o=r.time[0]*1e9+r.time[1];return i.time[0]*1e9+i.time[1]-o}const sS=(e,t)=>{const n={domain_lookup:(t.domainLookupEnd-t.domainLookupStart)*1e9,connect:(t.connectEnd-t.connectStart)*1e9,request:(t.responseEnd-t.requestStart)*1e9,response:(t.responseEnd-t.responseStart)*1e9};Object.entries(n).forEach(([r,i])=>{e.setAttribute(`timings.${r}.ns`,i),e.setAttribute(`timings.${r}.readable`,Nc(i))})},Nc=e=>{if(e>=36e11){const t=e/36e11;return`${Number(t.toFixed(1))}h`}else if(e>=6e10){const t=e/6e10;return`${Number(t.toFixed(1))}m`}else if(e>=1e9){const t=e/1e9;return`${Number(t.toFixed(1))}s`}else if(e>=1e6){const t=e/1e6;return`${Number(t.toFixed(1))}ms`}else if(e>=1e3){const t=e/1e3;return`${Number(t.toFixed(1))}µs`}else return`${Number(e.toFixed(1))}ns`},Ic=e=>e===!0?[/localhost/,/^\//,bu(window.location.host)]:Array.isArray(e)?e.map(t=>typeof t=="string"?new RegExp(t):t):/^$/,kc=e=>e.attributes[wt]?e.attributes[wt]:e.attributes[Ee],uS=30,cS=()=>new Promise(e=>requestAnimationFrame(t=>requestAnimationFrame(n=>e(n-t)))),lS=()=>ct(void 0,null,function*(){const e=[];for(let t=0;t<uS;t++)e.push(yield cS());return e.reduce((t,n)=>t+n,0)/e.length}),pS=(e,t)=>{let n={},r=16.666666666666668;lS().then(c=>r=c);const i=c=>{var s;n!=null&&n.event||(n={event:c,location:window.location.href,timerStart:(s=window.performance)==null?void 0:s.now()},window.requestAnimationFrame(o))},o=()=>{if(!(n!=null&&n.timerStart))return;const c=window.performance.now()-n.timerStart-r;a(c),n={}},a=c=>{const s=(new Date().getTime()-t)/1e3;e({relativeTimestamp:s,jankAmount:c,querySelector:u(),newLocation:window.location.href!=n.location?window.location.href:void 0})},u=()=>{var c;return(c=n?.event)!=null&&c.target?wf(n.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},fS=typeof window<"u",Mc=fS&&"performance"in window&&"memory"in performance?performance:{memory:{}},hS=(e,t)=>{let n=0,r=0;const i=()=>{const s=(new Date().getTime()-t)/1e3,l=Mc.memory.jsHeapSizeLimit||0,p=Mc.memory.usedJSHeapSize||0;e({jsHeapSizeLimit:l,usedJSHeapSize:p,relativeTimestamp:s,fps:n})};i();let o;o=setInterval(()=>{i()},1e3);let a=0,u=Date.now();const c=function(){var s=Date.now();a++,s>1e3+u&&(n=Math.round(a*1e3/(s-u)),a=0,u=s),r=requestAnimationFrame(c)};return c(),()=>{clearInterval(o),cancelAnimationFrame(r)}};var It,nn,Dc,cr,wo,Te=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},rn=function(e){if(document.readyState==="loading")return"loading";var t=Te();if(t){if(e<t.domInteractive)return"loading";if(t.domContentLoadedEventStart===0||e<t.domContentLoadedEventStart)return"dom-interactive";if(t.domComplete===0||e<t.domComplete)return"dom-content-loaded"}return"complete"},dS=function(e){var t=e.nodeName;return e.nodeType===1?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},lr=function(e,t){var n="";try{for(;e&&e.nodeType!==9;){var r=e,i=r.id?"#"+r.id:dS(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+i.length>99)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch{}return n},Uc=-1,jc=function(){return Uc},Jt=function(e){addEventListener("pageshow",function(t){t.persisted&&(Uc=t.timeStamp,e(t))},!0)},pr=function(){var e=Te();return e&&e.activationStart||0},at=function(e,t){var n=Te(),r="navigate";return jc()>=0?r="back-forward-cache":n&&(document.prerendering||pr()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t===void 0?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},Se=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver(function(i){Promise.resolve().then(function(){t(i.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},st=function(e,t,n,r){var i,o;return function(a){t.value>=0&&(a||r)&&((o=t.value-(i||0))||i===void 0)&&(i=t.value,t.delta=o,t.rating=function(u,c){return u>c[1]?"poor":u>c[0]?"needs-improvement":"good"}(t.value,n),e(t))}},Oo=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},fr=function(e){var t=function(n){n.type!=="pagehide"&&document.visibilityState!=="hidden"||e(n)};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},Lo=function(e){var t=!1;return function(n){t||(e(n),t=!0)}},we=-1,Bc=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},hr=function(e){document.visibilityState==="hidden"&&we>-1&&(we=e.type==="visibilitychange"?e.timeStamp:0,vS())},$c=function(){addEventListener("visibilitychange",hr,!0),addEventListener("prerenderingchange",hr,!0)},vS=function(){removeEventListener("visibilitychange",hr,!0),removeEventListener("prerenderingchange",hr,!0)},Ao=function(){return we<0&&(we=Bc(),$c(),Jt(function(){setTimeout(function(){we=Bc(),$c()},0)})),{get firstHiddenTime(){return we}}},on=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},Fc=[1800,3e3],Vc=function(e,t){t=t||{},on(function(){var n,r=Ao(),i=at("FCP"),o=Se("paint",function(a){a.forEach(function(u){u.name==="first-contentful-paint"&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(i.value=Math.max(u.startTime-pr(),0),i.entries.push(u),n(!0)))})});o&&(n=st(e,i,Fc,t.reportAllChanges),Jt(function(a){i=at("FCP"),n=st(e,i,Fc,t.reportAllChanges),Oo(function(){i.value=performance.now()-a.timeStamp,n(!0)})}))})},Gc=[.1,.25],yS=function(e,t){(function(n,r){r=r||{},Vc(Lo(function(){var i,o=at("CLS",0),a=0,u=[],c=function(l){l.forEach(function(p){if(!p.hadRecentInput){var f=u[0],v=u[u.length-1];a&&p.startTime-v.startTime<1e3&&p.startTime-f.startTime<5e3?(a+=p.value,u.push(p)):(a=p.value,u=[p])}}),a>o.value&&(o.value=a,o.entries=u,i())},s=Se("layout-shift",c);s&&(i=st(n,o,Gc,r.reportAllChanges),fr(function(){c(s.takeRecords()),i(!0)}),Jt(function(){a=0,o=at("CLS",0),i=st(n,o,Gc,r.reportAllChanges),Oo(function(){return i()})}),setTimeout(i,0))}))})(function(n){(function(r){if(r.entries.length){var i=r.entries.reduce(function(u,c){return u&&u.value>c.value?u:c});if(i&&i.sources&&i.sources.length){var o=(a=i.sources).find(function(u){return u.node&&u.node.nodeType===1})||a[0];if(o)return void(r.attribution={largestShiftTarget:lr(o.node),largestShiftTime:i.startTime,largestShiftValue:i.value,largestShiftSource:o,largestShiftEntry:i,loadState:rn(i.startTime)})}}var a;r.attribution={}})(n),e(n)},t)},gS=function(e,t){Vc(function(n){(function(r){if(r.entries.length){var i=Te(),o=r.entries[r.entries.length-1];if(i){var a=i.activationStart||0,u=Math.max(0,i.responseStart-a);return void(r.attribution={timeToFirstByte:u,firstByteToFCP:r.value-u,loadState:rn(r.entries[0].startTime),navigationEntry:i,fcpEntry:o})}}r.attribution={timeToFirstByte:0,firstByteToFCP:r.value,loadState:rn(jc())}})(n),e(n)},t)},an={passive:!0,capture:!0},mS=new Date,Hc=function(e,t){It||(It=t,nn=e,Dc=new Date,zc(removeEventListener),qc())},qc=function(){if(nn>=0&&nn<Dc-mS){var e={entryType:"first-input",name:It.type,target:It.target,cancelable:It.cancelable,startTime:It.timeStamp,processingStart:It.timeStamp+nn};cr.forEach(function(t){t(e)}),cr=[]}},_S=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;e.type=="pointerdown"?function(n,r){var i=function(){Hc(n,r),a()},o=function(){a()},a=function(){removeEventListener("pointerup",i,an),removeEventListener("pointercancel",o,an)};addEventListener("pointerup",i,an),addEventListener("pointercancel",o,an)}(t,e):Hc(t,e)}},zc=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,_S,an)})},Xc=[100,300],ES=function(e,t){t=t||{},on(function(){var n,r=Ao(),i=at("FID"),o=function(c){c.startTime<r.firstHiddenTime&&(i.value=c.processingStart-c.startTime,i.entries.push(c),n(!0))},a=function(c){c.forEach(o)},u=Se("first-input",a);n=st(e,i,Xc,t.reportAllChanges),u&&fr(Lo(function(){a(u.takeRecords()),u.disconnect()})),u&&Jt(function(){var c;i=at("FID"),n=st(e,i,Xc,t.reportAllChanges),cr=[],nn=-1,It=null,zc(addEventListener),c=o,cr.push(c),qc()})})},bS=function(e,t){ES(function(n){(function(r){var i=r.entries[0];r.attribution={eventTarget:lr(i.target),eventType:i.name,eventTime:i.startTime,eventEntry:i,loadState:rn(i.startTime)}})(n),e(n)},t)},Kc=0,Ro=1/0,dr=0,TS=function(e){e.forEach(function(t){t.interactionId&&(Ro=Math.min(Ro,t.interactionId),dr=Math.max(dr,t.interactionId),Kc=dr?(dr-Ro)/7+1:0)})},Wc=function(){return wo?Kc:performance.interactionCount||0},SS=function(){"interactionCount"in performance||wo||(wo=Se("event",TS,{type:"event",buffered:!0,durationThreshold:0}))},Yc=[200,500],Jc=0,Qc=function(){return Wc()-Jc},vt=[],Co={},Zc=function(e){var t=vt[vt.length-1],n=Co[e.interactionId];if(n||vt.length<10||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};Co[r.id]=r,vt.push(r)}vt.sort(function(i,o){return o.latency-i.latency}),vt.splice(10).forEach(function(i){delete Co[i.id]})}},wS=function(e,t){t=t||{},on(function(){var n;SS();var r,i=at("INP"),o=function(u){u.forEach(function(l){l.interactionId&&Zc(l),l.entryType==="first-input"&&!vt.some(function(p){return p.entries.some(function(f){return l.duration===f.duration&&l.startTime===f.startTime})})&&Zc(l)});var c,s=(c=Math.min(vt.length-1,Math.floor(Qc()/50)),vt[c]);s&&s.latency!==i.value&&(i.value=s.latency,i.entries=s.entries,r())},a=Se("event",o,{durationThreshold:(n=t.durationThreshold)!==null&&n!==void 0?n:40});r=st(e,i,Yc,t.reportAllChanges),a&&("interactionId"in PerformanceEventTiming.prototype&&a.observe({type:"first-input",buffered:!0}),fr(function(){o(a.takeRecords()),i.value<0&&Qc()>0&&(i.value=0,i.entries=[]),r(!0)}),Jt(function(){vt=[],Jc=Wc(),i=at("INP"),r=st(e,i,Yc,t.reportAllChanges)}))})},OS=function(e,t){wS(function(n){(function(r){if(r.entries.length){var i=r.entries.sort(function(o,a){return a.duration-o.duration||a.processingEnd-a.processingStart-(o.processingEnd-o.processingStart)})[0];r.attribution={eventTarget:lr(i.target),eventType:i.name,eventTime:i.startTime,eventEntry:i,loadState:rn(i.startTime)}}else r.attribution={}})(n),e(n)},t)},tl=[2500,4e3],xo={},LS=function(e,t){(function(n,r){r=r||{},on(function(){var i,o=Ao(),a=at("LCP"),u=function(l){var p=l[l.length-1];p&&p.startTime<o.firstHiddenTime&&(a.value=Math.max(p.startTime-pr(),0),a.entries=[p],i())},c=Se("largest-contentful-paint",u);if(c){i=st(n,a,tl,r.reportAllChanges);var s=Lo(function(){xo[a.id]||(u(c.takeRecords()),c.disconnect(),xo[a.id]=!0,i(!0))});["keydown","click"].forEach(function(l){addEventListener(l,function(){return setTimeout(s,0)},!0)}),fr(s),Jt(function(l){a=at("LCP"),i=st(n,a,tl,r.reportAllChanges),Oo(function(){a.value=performance.now()-l.timeStamp,xo[a.id]=!0,i(!0)})})}})})(function(n){(function(r){if(r.entries.length){var i=Te();if(i){var o=i.activationStart||0,a=r.entries[r.entries.length-1],u=a.url&&performance.getEntriesByType("resource").filter(function(v){return v.name===a.url})[0],c=Math.max(0,i.responseStart-o),s=Math.max(c,u?(u.requestStart||u.startTime)-o:0),l=Math.max(s,u?u.responseEnd-o:0),p=Math.max(l,a?a.startTime-o:0),f={element:lr(a.element),timeToFirstByte:c,resourceLoadDelay:s-c,resourceLoadTime:l-s,elementRenderDelay:p-l,navigationEntry:i,lcpEntry:a};return a.url&&(f.url=a.url),u&&(f.lcpResourceEntry=u),void(r.attribution=f)}}r.attribution={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadTime:0,elementRenderDelay:r.value}})(n),e(n)},t)},el=[800,1800],AS=function e(t){document.prerendering?on(function(){return e(t)}):document.readyState!=="complete"?addEventListener("load",function(){return e(t)},!0):setTimeout(t,0)},RS=function(e,t){t=t||{};var n=at("TTFB"),r=st(e,n,el,t.reportAllChanges);AS(function(){var i=Te();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;n.value=Math.max(o-pr(),0),n.entries=[i],r(!0),Jt(function(){n=at("TTFB",0),(r=st(e,n,el,t.reportAllChanges))(!0)})}})},CS=function(e,t){RS(function(n){(function(r){if(r.entries.length){var i=r.entries[0],o=i.activationStart||0,a=Math.max(i.domainLookupStart-o,0),u=Math.max(i.connectStart-o,0),c=Math.max(i.requestStart-o,0);r.attribution={waitingTime:a,dnsTime:u-a,connectionTime:c-u,requestTime:r.value-c,navigationEntry:i}}else r.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}})(n),e(n)},t)};const xS=e=>(yS(e),gS(e),bS(e),LS(e),CS(e),OS(e),()=>{}),Oe=typeof navigator<"u"&&"connection"in navigator?navigator.connection:{},PS=(e,t)=>{const n=()=>{const i=(new Date().getTime()-t)/1e3;e({relativeTimestamp:i,downlink:Oe.downlink,downlinkMax:Oe.downlinkMax,effectiveType:Oe.effectiveType,rtt:Oe.rtt,saveData:Oe.saveData,type:Oe.type})};n();let r;return r=setInterval(()=>{n()},1e3),()=>{clearInterval(r)}},NS=()=>{if(!("performance"in window&&"memory"in performance))return{getDeviceDetails:void 0,getCurrentDeviceDetails:void 0};const e=window.performance;return{getDeviceDetails:()=>({deviceMemory:IS(navigator.deviceMemory||0)}),getCurrentDeviceDetails:()=>{const t=Po(e.memory.jsHeapSizeLimit),n=Po(e.memory.totalJSHeapSize),r=Po(e.memory.usedJSHeapSize);return{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}},Po=e=>e/Math.pow(1e3,2),IS=e=>1024*e;function kS(e){return"regexValue"in e}function MS(e){return"matchValue"in e}function DS(e){const t=Math.trunc(e);return t===1?!0:t===0?!1:Math.floor(Math.random()*t)===0}class US{constructor(t=DS){C(this,"regexCache",new Map),C(this,"config"),this.sampler=t}setConfig(t){this.config=t}isSamplingEnabled(){var t,n,r,i;return!!((n=(t=this.config)==null?void 0:t.logs)!=null&&n.length||(i=(r=this.config)==null?void 0:r.spans)!=null&&i.length)}shouldSample(t){var n,r;return t.name===wc?this.sampleLog((n=this.config)==null?void 0:n.logs,t):this.sampleSpan((r=this.config)==null?void 0:r.spans,t)}matchesValue(t,n){if(!t)return!1;if(MS(t))return t.matchValue===n;if(kS(t)){const r=t.regexValue;if(r===null)return!1;this.regexCache.has(r)||this.regexCache.set(r,new RegExp(r));const i=this.regexCache.get(r);if(typeof n=="string")return i.test(n)}return!1}matchesAttributes(t,n){if(t)for(const r of t){let i=!1;for(const o of Object.keys(n))if(this.matchesValue(r.key,o)){const a=n[o];if(this.matchesValue(r.attribute,a)){i=!0;break}}if(!i)return!1}return!0}matchEvent(t,n){return!(t.name&&!this.matchesValue(t.name,n.name)||t.attributes&&(!n.attributes||!this.matchesAttributes(t.attributes,n.attributes)))}matchesEvents(t,n){if(t)for(const r of t){let i=!1;for(const o of n)if(this.matchEvent(r,o)){i=!0;break}if(!i)return!1}return!0}matchesSpanConfig(t,n){return!(t.name&&!this.matchesValue(t.name,n.name)||!this.matchesAttributes(t.attributes,n.attributes)||!this.matchesEvents(t.events,n.events))}matchesLogConfig(t,n){if(t.severityText){const r=n[Lc];if(!this.matchesValue(t.severityText,r))return!1}if(t.message){const r=n[Ac];if(!this.matchesValue(t.message,r))return!1}return!!this.matchesAttributes(t.attributes,n)}sampleSpan(t,n){if(t){for(const r of t)if(this.matchesSpanConfig(r,n))return{sample:this.sampler(r.samplingRatio),attributes:{[Oc]:r.samplingRatio}}}return{sample:!0}}sampleLog(t,n){if(t){for(const r of t)if(this.matchesLogConfig(r,n.attributes))return{sample:this.sampler(r.samplingRatio),attributes:{[Oc]:r.samplingRatio}}}return{sample:!0}}}const nl=()=>{const e={end:()=>{},spanContext:()=>({traceId:"",spanId:"",traceFlags:0}),setAttribute:(t,n)=>e,setAttributes:t=>e,addEvent:(t,n,r)=>e,addLinks:t=>e,setStatus:t=>e,recordException:()=>{},addLink:()=>e,updateName:()=>e,isRecording:()=>!1};return e},jS=()=>{if(typeof window>"u"||typeof PerformanceObserver>"u")return!1;const e=PerformanceObserver.supportedEntryTypes;return Array.isArray(e)&&e.includes("longtask")},BS=e=>{if(!jS())return()=>{};let t;try{t=new PerformanceObserver(n=>{var r;for(const i of n.getEntries()){const o=(r=i.attribution)==null?void 0:r[0];e({duration:i.duration,name:i.name,startTime:i.startTime,containerType:o?.containerType,containerSrc:o?.containerSrc,containerId:o?.containerId,containerName:o?.containerName})}}),t.observe({type:"longtask",buffered:!0})}catch{return()=>{}}return()=>{try{t.disconnect()}catch{}}},$S=new Set(["string","number","boolean"]),FS=()=>typeof window<"u"&&typeof window.ReportingObserver<"u",VS=e=>{const t={};if(!e||typeof e!="object")return t;for(const[n,r]of Object.entries(e))if(r!=null)if($S.has(typeof r))t[`report.body.${n}`]=r;else try{t[`report.body.${n}`]=JSON.stringify(r)}catch{}return t},GS=e=>{var t;const n=(t=e.body)!=null?t:{},r=n.message||n.reason||n.id||e.type;return typeof r=="string"?r:e.type},HS=(e,t)=>{if(!FS())return()=>{};const n=["deprecation","intervention","csp-violation"],r=window.ReportingObserver;let i;try{i=new r(o=>{var a,u;for(const c of o){const s=(a=c.type)!=null?a:"unknown",l=(u=c.body)!=null?u:{},p=R({"report.type":s,"report.url":c.url},VS(l)),f=GS({type:s,body:l});e(s==="deprecation"?{kind:"log",level:"warn",type:s,message:f,url:c.url,attributes:p}:{kind:"error",type:s,message:f,url:c.url,attributes:p})}},{buffered:!0,types:n}),i.observe()}catch{return()=>{}}return()=>{try{i.disconnect()}catch{}}},qS="exception",zS=function(e,t,n){if(!e)return;const r=R({},n);typeof t=="string"?r[Ir]=t:t&&(t.code?r[kr]=t.code.toString():t.name&&(r[kr]=t.name),t.message&&(r[Ir]=t.message),t.stack&&(r[kp]=t.stack)),r[kr]||r[Ir]?e.addEvent(qS,r):kt("otel","recordException","warn",`Failed to record an exception ${t}`)};class XS{constructor(t){C(this,"organizationID"),C(this,"_options"),C(this,"_integrations",[]),C(this,"_gauges",new Map),C(this,"_counters",new Map),C(this,"_histograms",new Map),C(this,"_up_down_counters",new Map),C(this,"sampler",new US),C(this,"_started",!1),C(this,"_ldContextKeys"),C(this,"graphqlSDK"),this._options=t,this.organizationID=t.projectId}_productAnalyticsEvents(){var t;const n=(t=this._options)==null?void 0:t.productAnalytics;if(n===!1)return{};const r={clicks:!0,pageViews:!0,trackEvents:!0};if(n===void 0||n===!0)return r;for(const i of Object.keys(n))n[i]===!1&&(r[i]=!1);return r}setLDContextKeyAttributes(t){t&&(this._ldContextKeys=Object.fromEntries(Object.entries(t).map(([n,r])=>[`${ff}.${n}`,r])))}getLDContextKeyAttributes(){return this._ldContextKeys}start(){return ct(this,null,function*(){var t,n,r,i,o,a,u,c,s,l,p,f,v,y,g;if(this._started)return;this._started=!0,Y0({backendUrl:(n=(t=this._options)==null?void 0:t.backendUrl)!=null?n:"https://pub.observability.app.launchdarkly.com",otlpEndpoint:(o=(i=(r=this._options)==null?void 0:r.otel)==null?void 0:i.otlpEndpoint)!=null?o:"https://otel.observability.app.launchdarkly.com",projectId:this._options.projectId,sessionSecureId:this._options.sessionSecureId,environment:(u=(a=this._options)==null?void 0:a.environment)!=null?u:"production",networkRecordingOptions:typeof((c=this._options)==null?void 0:c.networkRecording)=="object"?this._options.networkRecording:void 0,tracingOrigins:(s=this._options)==null?void 0:s.tracingOrigins,serviceName:(p=(l=this._options)==null?void 0:l.serviceName)!=null?p:"browser",serviceVersion:(f=this._options)==null?void 0:f.version,instrumentations:(y=(v=this._options)==null?void 0:v.otel)==null?void 0:y.instrumentations,productAnalyticsEvents:this._productAnalyticsEvents(),getLDContextKeyAttributes:()=>this.getLDContextKeyAttributes(),getIntegrations:()=>this._integrations},this.sampler),this._gauges.clear(),this._counters.clear(),this._histograms.clear(),this._up_down_counters.clear();const m=new up((g=this._options.backendUrl)!=null?g:"https://pub.observability.app.launchdarkly.com",{headers:{}});this.graphqlSDK=xp(m,Zp()),yield this.configureSampling(),this.setupListeners()})}stop(){return ct(this,null,function*(){this._started&&(this._started=!1,yield tS())})}configureSampling(){return ct(this,null,function*(){try{const t=yield this.graphqlSDK.GetSamplingConfig({organization_verbose_id:`${this.organizationID}`});this.sampler.setConfig(t.sampling)}catch(t){St("sampling","warn",`LaunchDarkly Observability: Failed to configure sampling: ${t}`)}})}_recordLog(t,n,r,i){this.startSpan(wc,o=>{var a,u,c,s,l;const p=typeof t=="string"?t:gn(t),f=i?i.map(v=>v.toString()).join(`
309
- `):void 0;if(o?.addEvent("log",R(R({[Lc]:n,[Ac]:p,"code.stacktrace":f},(a=this._ldContextKeys)!=null?a:{}),r)),this._options.reportConsoleErrors&&n==="error"){const v=new Error(p);o?.recordException(v),o?.setStatus({code:Nn.ERROR,message:p}),i?this._recordErrorMessage({error:v,event:v.message,type:"custom",url:window.location.href,source:"frontend",lineNumber:(c=(u=i[0])==null?void 0:u.lineNumber)!=null?c:0,columnNumber:(l=(s=i[0])==null?void 0:s.columnNumber)!=null?l:0,stackTrace:i,timestamp:new Date().toISOString(),id:Kr()}):this.recordError(v)}})}_recordErrorMessage(t,n){try{t.payload&&(n=R(R({},JSON.parse(t.payload)),n||{}))}catch{}this.startSpan("highlight.exception",o=>{var a;zS(o,(a=t.error)!=null?a:new Error(t.event),{[W0]:t.id}),o?.setAttributes(R({event:t.event,type:t.type,url:t.url,source:t.source,lineNumber:t.lineNumber,columnNumber:t.columnNumber},n))});const r=t,i=Df(r,["payload"]);for(const o of this._integrations)o.error(Ot(),Q(R({},i),{payload:JSON.stringify(n)}))}recordError(t,n,r,i,o){var a,u,c,s;t=t||new Error("Unknown error"),t instanceof Error&&t.cause&&(r=Q(R({},r),{"exception.cause":JSON.stringify(t.cause)}));let l=n?n+":"+t.message:t.message;o==="React.ErrorBoundary"&&(l="ErrorBoundary: "+l);const p=An(t),f={error:t,event:l,type:o??"custom",url:window.location.href,source:i??"frontend",lineNumber:(a=p[0])!=null&&a.lineNumber?(u=p[0])==null?void 0:u.lineNumber:0,columnNumber:(c=p[0])!=null&&c.columnNumber?(s=p[0])==null?void 0:s.columnNumber:0,stackTrace:p,timestamp:new Date().toISOString(),id:Kr()};this._recordErrorMessage(f,r)}recordCount(t){var n,r;let i=this._counters.get(t.name);if(!i){if(i=(n=ur())==null?void 0:n.createCounter(t.name),!i)return;this._counters.set(t.name,i)}i.add(t.value,Q(R(R({},(r=this._ldContextKeys)!=null?r:{}),t.attributes),{"highlight.session_id":Ot()}))}recordGauge(t){var n,r,i;let o=this._gauges.get(t.name);if(!o){if(o=(n=ur())==null?void 0:n.createGauge(t.name),!o)return;this._gauges.set(t.name,o)}const a=R(R({},(r=this._ldContextKeys)!=null?r:{}),t.attributes);o.record(t.value,Q(R({},a),{"highlight.session_id":Ot()}));const u={name:t.name,value:t.value,category:a.category,group:(i=a.group)==null?void 0:i.toString(),tags:Object.entries(a).map(([c,s])=>{var l;return{name:c??"",value:(l=s?.toString())!=null?l:""}})};for(const c of this._integrations)c.recordGauge(Ot(),u)}recordIncr(t){this.recordCount(Q(R({},t),{value:1}))}recordHistogram(t){var n,r;let i=this._histograms.get(t.name);if(!i){if(i=(n=ur())==null?void 0:n.createHistogram(t.name),!i)return;this._histograms.set(t.name,i)}i.record(t.value,Q(R(R({},(r=this._ldContextKeys)!=null?r:{}),t.attributes),{"highlight.session_id":Ot()}))}recordUpDownCounter(t){var n,r;let i=this._up_down_counters.get(t.name);if(!i){if(i=(n=ur())==null?void 0:n.createUpDownCounter(t.name),!i)return;this._up_down_counters.set(t.name,i)}i.add(t.value,Q(R(R({},(r=this._ldContextKeys)!=null?r:{}),t.attributes),{"highlight.session_id":Ot()}))}startSpan(t,n,r,i){const o=Cc();if(!o){const u=nl();return i===void 0&&r===void 0?n(u):i===void 0?r(u):i(u)}const a=(u,c)=>{this._ldContextKeys&&u.setAttributes(this._ldContextKeys);const s=c(u);return s instanceof Promise?s.finally(()=>u.end()):(u.end(),s)};return i===void 0&&r===void 0?o.startActiveSpan(t,u=>a(u,n)):i===void 0?o.startActiveSpan(t,n,u=>a(u,r)):o.startActiveSpan(t,n,r,u=>a(u,i))}startManualSpan(t,n,r,i){const o=Cc();if(!o){const a=nl();return i===void 0&&r===void 0?n(a):i===void 0?r(a):i(a)}return i===void 0&&r===void 0?o.startActiveSpan(t,n):i===void 0?o.startActiveSpan(t,n,r):o.startActiveSpan(t,n,r,i)}register(t,n){this._integrations.push(new _f(t,n))}getHooks(t){return this._integrations.flatMap(n=>{var r,i;return(i=(r=n.getHooks)==null?void 0:r.call(n,t))!=null?i:[]})}submitViewportMetrics({height:t,width:n,availHeight:r,availWidth:i}){this.recordGauge({name:Dt.ViewportHeight,value:t,attributes:{category:it.Device,group:window.location.href}}),this.recordGauge({name:Dt.ViewportWidth,value:n,attributes:{category:it.Device,group:window.location.href}}),this.recordGauge({name:Dt.ScreenHeight,value:r,attributes:{category:it.Device,group:window.location.href}}),this.recordGauge({name:Dt.ScreenWidth,value:i,attributes:{category:it.Device,group:window.location.href}}),this.recordGauge({name:Dt.ViewportArea,value:t*n,attributes:{category:it.Device,group:window.location.href}})}setupListeners(){var t;this._options.disableConsoleRecording||$f(r=>{var i;this._recordLog((i=r.value)==null?void 0:i.join(" "),r.type,r.attributes?JSON.parse(r.attributes):{},r.trace)},{level:(t=this._options.consoleMethodsToRecord)!=null?t:[...Uf],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),this._options.enablePerformanceRecording!==!1&&(hS(r=>{Object.entries(r).filter(([i])=>i!=="relativeTimestamp").forEach(([i,o])=>o&&this.recordGauge({name:i,value:o,attributes:{category:it.Performance,group:window.location.href}}))},0),pS(r=>{this.recordGauge({name:"Jank",value:r.jankAmount,attributes:{category:it.WebVital,group:r.querySelector}})},0)),Wf(r=>{var i;if(Jf.includes(r.event)||Qf.some(u=>r.event.includes(u)))return;const o=new Error(r.event);o.stack=gn(r.stackTrace.map(u=>u.toString()));let a={};try{r.payload&&(a=JSON.parse(r.payload))}catch{}this._recordErrorMessage(Q(R({},r),{error:(i=r.error)!=null?i:o}),a)},{enablePromisePatch:!!this._options.enablePromisePatch}),xS(r=>{const{name:i,value:o}=r,{hostname:a,pathname:u,href:c}=window.location,s={group:window.location.pathname,category:it.WebVital,[wt]:Zi(c),[bn]:u,[Mp]:a};switch(r.name){case"LCP":{const l=r.attribution;l.element&&(s["web_vital.element"]=l.element),l.url&&(s["web_vital.attribution.url"]=Zi(l.url));break}case"CLS":{const l=r.attribution;l.largestShiftTarget&&(s["web_vital.element"]=l.largestShiftTarget),l.loadState&&(s["web_vital.load_state"]=l.loadState);break}case"INP":{const l=r.attribution;l.eventTarget&&(s["web_vital.element"]=l.eventTarget),l.eventType&&(s["web_vital.event_type"]=l.eventType),l.loadState&&(s["web_vital.load_state"]=l.loadState);break}case"FID":{const l=r.attribution;l.eventTarget&&(s["web_vital.element"]=l.eventTarget),l.eventType&&(s["web_vital.event_type"]=l.eventType);break}case"FCP":{const l=r.attribution;l.loadState&&(s["web_vital.load_state"]=l.loadState);break}}this.recordGauge({name:i,value:o,attributes:s})}),Of(r=>{this.submitViewportMetrics(r)}),PS(r=>{const i={category:it.Performance,group:window.location.href};r.saveData!==void 0&&(i.saveData=r.saveData.toString()),r.effectiveType!==void 0&&(i.effectiveType=r.effectiveType.toString()),r.type!==void 0&&(i.type=r.type.toString()),Object.entries(r).filter(([o])=>o!=="relativeTimestamp").forEach(([o,a])=>{Ip(a)&&this.recordGauge({name:o,value:a,attributes:i})})},new Date().getTime());const{getDeviceDetails:n}=NS();n&&this.recordGauge({name:Dt.DeviceMemory,value:n().deviceMemory,attributes:{category:it.Device,group:window.location.href}}),this._options.enableLongtaskRecording!==!1&&BS(r=>{const i={category:it.Performance,name:r.name,[bn]:window.location.pathname};r.containerType&&(i.container_type=r.containerType),r.containerSrc&&(i.container_src=r.containerSrc),r.containerId&&(i.container_id=r.containerId),r.containerName&&(i.container_name=r.containerName),this.recordHistogram({name:"long_task.duration",value:r.duration,attributes:i})}),this._options.enableReportingObserver!==!1&&HS(r=>{var i;const o=Q(R({},r.attributes),{[bn]:window.location.pathname});if(r.kind==="log")this._recordLog(r.message,(i=r.level)!=null?i:"warn",o);else{const a=new Error(r.message);this.recordError(a,void 0,Object.fromEntries(Object.entries(o).map(([u,c])=>[u,c===void 0?"":String(c)])),"reporting-observer","custom")}})}recordLog(t,n,r){return this._recordLog(t,n,r)}}class KS extends Cf{constructor(t){super(t),C(this,"observe"),C(this,"options"),this.options=t}initialize(t,n){try{if(typeof window>"u"||typeof document>"u"){console.warn("@launchdarkly/observability is not initializing because it is not supported in this environment.");return}if(!t){console.warn("@launchdarkly/observability is not initializing because the SDK credential is undefined.");return}this.configureSession(t,n),this.observe=new XS(Q(R({},n),{projectId:t,sessionSecureId:this.sessionSecureID})),n!=null&&n.manualStart||this.observe.start(),rt.LDObserve.load(this.observe)}catch(r){St("Error initializing @launchdarkly/observability SDK","error",r)}}getMetadata(){return{name:"@launchdarkly/observability"}}register(t,n){var r;(r=this.observe)==null||r.register(t,n)}getHooks(t){var n,r,i,o;const a=R(R({[jp]:t.sdk.name,[Bp]:t.sdk.version,[ef]:t.clientSideId,[sf]:"LaunchDarkly"},(n=t.application)!=null&&n.id?{[cf]:t.application.id}:{}),(r=t.application)!=null&&r.version?{[lf]:t.application.version}:{});return this.initialize((o=(i=t.sdkKey)!=null?i:t.mobileKey)!=null?o:t.clientSideId,this.options),[{getMetadata:()=>({name:"@launchdarkly/observability/hooks"}),afterIdentify:(u,c,s)=>{var l,p,f,v,y,g,m,E,S;for(const j of(f=(p=(l=this.observe)==null?void 0:l.getHooks)==null?void 0:p.call(l,t))!=null?f:[])(v=j.afterIdentify)==null||v.call(j,u,c,s);const N=_a(u.context);if((y=this.observe)==null||y.setLDContextKeyAttributes(N),s.status==="completed"){const j=Q(R({},N),{key:(E=(m=(g=this.options)==null?void 0:g.contextFriendlyName)==null?void 0:m.call(g,u.context))!=null?E:Gr(u.context),timeout:u.timeout,canonicalKey:Gr(u.context),[gf]:s.status});(S=this.observe)==null||S.recordLog("LD.identify","info",R(R({},a),j))}return c},afterEvaluation:(u,c,s)=>{var l,p,f,v,y;for(const E of(f=(p=(l=this.observe)==null?void 0:l.getHooks)==null?void 0:p.call(l,t))!=null?f:[])(v=E.afterEvaluation)==null||v.call(E,u,c,s);const g=R({[nf]:u.flagKey,[af]:JSON.stringify(s.value)},s.variationIndex?{[uf]:s.variationIndex}:{});if(s.reason)for(const E in va){const S=E,N=s.reason[S];N&&(g[va[S]]=N)}u.context&&(g[rf]=JSON.stringify(_a(u.context)),g[of]=Gr(u.context));const m=R(R({},a),g);return(y=this.observe)==null||y.startSpan(tf,E=>{E&&E.addEvent(J,m)}),c},afterTrack:u=>{var c,s,l,p,f,v,y,g,m;for(const S of(l=(s=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:s.call(c,t))!=null?l:[])(p=S.afterTrack)==null||p.call(S,u);if(!(((f=this.options)==null?void 0:f.productAnalytics)!==!1&&(typeof((v=this.options)==null?void 0:v.productAnalytics)!="object"||this.options.productAnalytics.trackEvents!==!1)))return;const E=R(Q(R(R({[wt]:window.location.href},(g=(y=this.observe)==null?void 0:y.getLDContextKeyAttributes())!=null?g:{}),a),{key:u.key,value:u.metricValue}),typeof u.data=="object"?u.data:{});(m=this.observe)==null||m.startSpan(df,S=>{S&&S.setAttributes(E)})}}]}}rt.default=KS,Object.defineProperties(rt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
308
+ `,sc(s,t))}}catch(l){r={error:l}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o},e}(),LT=function(){function e(t){this._backingStorages=t}return e.prototype.record=function(t,n,r,i){this._backingStorages.forEach(function(o){o.record(t,n,r,i)})},e}(),AT=function(){function e(t,n){this._instrumentName=t,this._valueType=n,this._buffer=new Kt}return e.prototype.observe=function(t,n){if(n===void 0&&(n={}),typeof t!="number"){b.warn("non-number value provided to metric "+this._instrumentName+": "+t);return}this._valueType===Lt.INT&&!Number.isInteger(t)&&(b.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),t=Math.trunc(t),!Number.isInteger(t))||this._buffer.set(n,t)},e}(),RT=function(){function e(){this._buffer=new Map}return e.prototype.observe=function(t,n,r){if(r===void 0&&(r={}),!!po(t)){var i=this._buffer.get(t);if(i==null&&(i=new Kt,this._buffer.set(t,i)),typeof n!="number"){b.warn("non-number value provided to metric "+t._descriptor.name+": "+n);return}t._descriptor.valueType===Lt.INT&&!Number.isInteger(n)&&(b.warn("INT value type cannot accept a floating-point value for "+t._descriptor.name+", ignoring the fractional digits."),n=Math.trunc(n),!Number.isInteger(n))||i.set(r,n)}},e}(),vo=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},yo=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},uc=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},cc=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},CT=function(){function e(){this._callbacks=[],this._batchCallbacks=[]}return e.prototype.addCallback=function(t,n){var r=this._findCallback(t,n);r>=0||this._callbacks.push({callback:t,instrument:n})},e.prototype.removeCallback=function(t,n){var r=this._findCallback(t,n);r<0||this._callbacks.splice(r,1)},e.prototype.addBatchCallback=function(t,n){var r=new Set(n.filter(po));if(r.size===0){b.error("BatchObservableCallback is not associated with valid instruments",n);return}var i=this._findBatchCallback(t,r);i>=0||this._batchCallbacks.push({callback:t,instruments:r})},e.prototype.removeBatchCallback=function(t,n){var r=new Set(n.filter(po)),i=this._findBatchCallback(t,r);i<0||this._batchCallbacks.splice(i,1)},e.prototype.observe=function(t,n){return vo(this,void 0,void 0,function(){var r,i,o,a;return yo(this,function(u){switch(u.label){case 0:return r=this._observeCallbacks(t,n),i=this._observeBatchCallbacks(t,n),[4,hb(cc(cc([],uc(r),!1),uc(i),!1))];case 1:return o=u.sent(),a=o.filter(db).map(function(c){return c.reason}),[2,a]}})})},e.prototype._observeCallbacks=function(t,n){var r=this;return this._callbacks.map(function(i){var o=i.callback,a=i.instrument;return vo(r,void 0,void 0,function(){var u,c;return yo(this,function(s){switch(s.label){case 0:return u=new AT(a._descriptor.name,a._descriptor.valueType),c=Promise.resolve(o(u)),n!=null&&(c=Ze(c,n)),[4,c];case 1:return s.sent(),a._metricStorages.forEach(function(l){l.record(u._buffer,t)}),[2]}})})})},e.prototype._observeBatchCallbacks=function(t,n){var r=this;return this._batchCallbacks.map(function(i){var o=i.callback,a=i.instruments;return vo(r,void 0,void 0,function(){var u,c;return yo(this,function(s){switch(s.label){case 0:return u=new RT,c=Promise.resolve(o(u)),n!=null&&(c=Ze(c,n)),[4,c];case 1:return s.sent(),a.forEach(function(l){var p=u._buffer.get(l);p!=null&&l._metricStorages.forEach(function(f){f.record(p,t)})}),[2]}})})})},e.prototype._findCallback=function(t,n){return this._callbacks.findIndex(function(r){return r.callback===t&&r.instrument===n})},e.prototype._findBatchCallback=function(t,n){return this._batchCallbacks.findIndex(function(r){return r.callback===t&&vb(r.instruments,n)})},e}(),xT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),PT=function(e){xT(t,e);function t(n,r,i,o,a){var u=e.call(this,n)||this;return u._attributesProcessor=i,u._aggregationCardinalityLimit=a,u._deltaMetricStorage=new rc(r,u._aggregationCardinalityLimit),u._temporalMetricStorage=new oc(r,o),u}return t.prototype.record=function(n,r,i,o){r=this._attributesProcessor.process(r,i),this._deltaMetricStorage.record(n,r,i,o)},t.prototype.collect=function(n,r){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(n,this._instrumentDescriptor,i,r)},t}(ec),lc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),go=function(){function e(){}return e.Noop=function(){return IT},e}(),NT=function(e){lc(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.process=function(n,r){return n},t}(go);(function(e){lc(t,e);function t(n){var r=e.call(this)||this;return r._allowedAttributeNames=n,r}return t.prototype.process=function(n,r){var i=this,o={};return Object.keys(n).filter(function(a){return i._allowedAttributeNames.includes(a)}).forEach(function(a){return o[a]=n[a]}),o},t})(go);var IT=new NT,kT=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},MT=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},DT=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},UT=function(){function e(t,n){this._meterProviderSharedState=t,this._instrumentationScope=n,this.metricStorageRegistry=new OT,this.observableRegistry=new CT,this.meter=new hT(this)}return e.prototype.registerMetricStorage=function(t){var n=this._registerMetricStorage(t,PT);return n.length===1?n[0]:new LT(n)},e.prototype.registerAsyncMetricStorage=function(t){var n=this._registerMetricStorage(t,ET);return n},e.prototype.collect=function(t,n,r){return kT(this,void 0,void 0,function(){var i,o,a;return MT(this,function(u){switch(u.label){case 0:return[4,this.observableRegistry.observe(n,r?.timeoutMillis)];case 1:return i=u.sent(),o=this.metricStorageRegistry.getStorages(t),o.length===0?[2,null]:(a=o.map(function(c){return c.collect(t,n)}).filter(pb),a.length===0?[2,{errors:i}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:a},errors:i}])}})})},e.prototype._registerMetricStorage=function(t,n){var r=this,i=this._meterProviderSharedState.viewRegistry.findViews(t,this._instrumentationScope),o=i.map(function(c){var s=_b(c,t),l=r.metricStorageRegistry.findOrUpdateCompatibleStorage(s);if(l!=null)return l;var p=c.aggregation.createAggregator(s),f=new n(s,p,c.attributesProcessor,r._meterProviderSharedState.metricCollectors,c.aggregationCardinalityLimit);return r.metricStorageRegistry.register(f),f});if(o.length===0){var a=this._meterProviderSharedState.selectAggregations(t.type),u=a.map(function(c){var s=DT(c,2),l=s[0],p=s[1],f=r.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(l,t);if(f!=null)return f;var v=p.createAggregator(t),y=l.selectCardinalityLimit(t.type),g=new n(t,v,go.Noop(),[l],y);return r.metricStorageRegistry.registerForCollector(l,g),g});o=o.concat(u)}return o},e}(),jT=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},BT=function(){function e(t){this.resource=t,this.viewRegistry=new oT,this.metricCollectors=[],this.meterSharedStates=new Map}return e.prototype.getMeterSharedState=function(t){var n=fb(t),r=this.meterSharedStates.get(n);return r==null&&(r=new UT(this,t),this.meterSharedStates.set(n,r)),r},e.prototype.selectAggregations=function(t){var n,r,i=[];try{for(var o=jT(this.metricCollectors),a=o.next();!a.done;a=o.next()){var u=a.value;i.push([u,u.selectAggregation(t)])}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},e}(),rr=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},ir=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},$T=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},FT=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},VT=function(){function e(t,n){this._sharedState=t,this._metricReader=n}return e.prototype.collect=function(t){return rr(this,void 0,void 0,function(){var n,r,i,o,a=this;return ir(this,function(u){switch(u.label){case 0:return n=$e(Date.now()),r=[],i=[],o=Array.from(this._sharedState.meterSharedStates.values()).map(function(c){return rr(a,void 0,void 0,function(){var s;return ir(this,function(l){switch(l.label){case 0:return[4,c.collect(this,n,t)];case 1:return s=l.sent(),s?.scopeMetrics!=null&&r.push(s.scopeMetrics),s?.errors!=null&&i.push.apply(i,FT([],$T(s.errors),!1)),[2]}})})}),[4,Promise.all(o)];case 1:return u.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:r},errors:i}]}})})},e.prototype.forceFlush=function(t){return rr(this,void 0,void 0,function(){return ir(this,function(n){switch(n.label){case 0:return[4,this._metricReader.forceFlush(t)];case 1:return n.sent(),[2]}})})},e.prototype.shutdown=function(t){return rr(this,void 0,void 0,function(){return ir(this,function(n){switch(n.label){case 0:return[4,this._metricReader.shutdown(t)];case 1:return n.sent(),[2]}})})},e.prototype.selectAggregationTemporality=function(t){return this._metricReader.selectAggregationTemporality(t)},e.prototype.selectAggregation=function(t){return this._metricReader.selectAggregation(t)},e.prototype.selectCardinalityLimit=function(t){var n,r,i;return(i=(r=(n=this._metricReader).selectCardinalityLimit)===null||r===void 0?void 0:r.call(n,t))!==null&&i!==void 0?i:2e3},e}(),pc=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},fc=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},hc=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function GT(e,t){var n=t??Ji.empty();return e?Ji.default().merge(n):n}var HT=function(){function e(t){var n,r,i,o,a;if(this._shutdown=!1,this._sharedState=new BT(GT((a=t?.mergeResourceWithDefaults)!==null&&a!==void 0?a:!0,t?.resource)),t?.views!=null&&t.views.length>0)try{for(var u=hc(t.views),c=u.next();!c.done;c=u.next()){var s=c.value;this._sharedState.viewRegistry.addView(s)}}catch(v){n={error:v}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}if(t?.readers!=null&&t.readers.length>0)try{for(var l=hc(t.readers),p=l.next();!p.done;p=l.next()){var f=p.value;this.addMetricReader(f)}}catch(v){i={error:v}}finally{try{p&&!p.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}}return e.prototype.getMeter=function(t,n,r){return n===void 0&&(n=""),r===void 0&&(r={}),this._shutdown?(b.warn("A shutdown MeterProvider cannot provide a Meter"),Nh()):this._sharedState.getMeterSharedState({name:t,version:n,schemaUrl:r.schemaUrl}).meter},e.prototype.addMetricReader=function(t){var n=new VT(this._sharedState,t);t.setMetricProducer(n),this._sharedState.metricCollectors.push(n)},e.prototype.shutdown=function(t){return pc(this,void 0,void 0,function(){return fc(this,function(n){switch(n.label){case 0:return this._shutdown?(b.warn("shutdown may only be called once per MeterProvider"),[2]):(this._shutdown=!0,[4,Promise.all(this._sharedState.metricCollectors.map(function(r){return r.shutdown(t)}))]);case 1:return n.sent(),[2]}})})},e.prototype.forceFlush=function(t){return pc(this,void 0,void 0,function(){return fc(this,function(n){switch(n.label){case 0:return this._shutdown?(b.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map(function(r){return r.forceFlush(t)}))];case 1:return n.sent(),[2]}})})},e}();function qT(e,t){var n=xu(t);return{resource:Pu(e.resource),schemaUrl:void 0,scopeMetrics:zT(e.scopeMetrics,n)}}function zT(e,t){return Array.from(e.map(function(n){return{scope:Nu(n.scope),metrics:n.metrics.map(function(r){return XT(r,t)}),schemaUrl:n.scope.schemaUrl}}))}function XT(e,t){var n={name:e.descriptor.name,description:e.descriptor.description,unit:e.descriptor.unit},r=JT(e.aggregationTemporality);switch(e.dataPointType){case dt.SUM:n.sum={aggregationTemporality:r,isMonotonic:e.isMonotonic,dataPoints:dc(e,t)};break;case dt.GAUGE:n.gauge={dataPoints:dc(e,t)};break;case dt.HISTOGRAM:n.histogram={aggregationTemporality:r,dataPoints:WT(e,t)};break;case dt.EXPONENTIAL_HISTOGRAM:n.exponentialHistogram={aggregationTemporality:r,dataPoints:YT(e,t)};break}return n}function KT(e,t,n){var r={attributes:Ht(e.attributes),startTimeUnixNano:n.encodeHrTime(e.startTime),timeUnixNano:n.encodeHrTime(e.endTime)};switch(t){case Lt.INT:r.asInt=e.value;break;case Lt.DOUBLE:r.asDouble=e.value;break}return r}function dc(e,t){return e.dataPoints.map(function(n){return KT(n,e.descriptor.valueType,t)})}function WT(e,t){return e.dataPoints.map(function(n){var r=n.value;return{attributes:Ht(n.attributes),bucketCounts:r.buckets.counts,explicitBounds:r.buckets.boundaries,count:r.count,sum:r.sum,min:r.min,max:r.max,startTimeUnixNano:t.encodeHrTime(n.startTime),timeUnixNano:t.encodeHrTime(n.endTime)}})}function YT(e,t){return e.dataPoints.map(function(n){var r=n.value;return{attributes:Ht(n.attributes),count:r.count,min:r.min,max:r.max,sum:r.sum,positive:{offset:r.positive.offset,bucketCounts:r.positive.bucketCounts},negative:{offset:r.negative.offset,bucketCounts:r.negative.bucketCounts},scale:r.scale,zeroCount:r.zeroCount,startTimeUnixNano:t.encodeHrTime(n.startTime),timeUnixNano:t.encodeHrTime(n.endTime)}})}function JT(e){switch(e){case lt.DELTA:return 1;case lt.CUMULATIVE:return 2}}function QT(e,t){return{resourceMetrics:e.map(function(n){return qT(n,t)})}}var ZT=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},t0=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function e0(e,t){var n,r=e.spanContext(),i=e.status;return{traceId:t.encodeSpanContext(r.traceId),spanId:t.encodeSpanContext(r.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:(n=r.traceState)===null||n===void 0?void 0:n.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:Ht(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(function(o){return r0(o,t)}),droppedEventsCount:e.droppedEventsCount,status:{code:i.code,message:i.message},links:e.links.map(function(o){return n0(o,t)}),droppedLinksCount:e.droppedLinksCount}}function n0(e,t){var n;return{attributes:e.attributes?Ht(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:(n=e.context.traceState)===null||n===void 0?void 0:n.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}function r0(e,t){return{attributes:e.attributes?Ht(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}function i0(e,t){var n=xu(t);return{resourceSpans:a0(e,n)}}function o0(e){var t,n,r=new Map;try{for(var i=ZT(e),o=i.next();!o.done;o=i.next()){var a=o.value,u=r.get(a.resource);u||(u=new Map,r.set(a.resource,u));var c=a.instrumentationLibrary.name+"@"+(a.instrumentationLibrary.version||"")+":"+(a.instrumentationLibrary.schemaUrl||""),s=u.get(c);s||(s=[],u.set(c,s)),s.push(a)}}catch(l){t={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function a0(e,t){for(var n=o0(e),r=[],i=n.entries(),o=i.next();!o.done;){for(var a=t0(o.value,2),u=a[0],c=a[1],s=[],l=c.values(),p=l.next();!p.done;){var f=p.value;if(f.length>0){var v=f.map(function(g){return e0(g,t)});s.push({scope:Nu(f[0].instrumentationLibrary),spans:v,schemaUrl:f[0].instrumentationLibrary.schemaUrl})}p=l.next()}var y={resource:Pu(u),scopeSpans:s,schemaUrl:void 0};r.push(y),o=i.next()}return r}var vc={serializeRequest:function(e){var t=QT([e],{useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},yc={serializeRequest:function(e){var t=i0(e,{useHex:!0,useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},s0=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},u0=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},c0=5,l0=1e3,p0=5e3,f0=1.5,gc=.2;function h0(){return Math.random()*(2*gc)-gc}var d0=function(){function e(t){this._transport=t}return e.prototype.retry=function(t,n,r){var i=this;return new Promise(function(o,a){setTimeout(function(){i._transport.send(t,n).then(o,a)},r)})},e.prototype.send=function(t,n){var r;return s0(this,void 0,void 0,function(){var i,o,a,u,c,s,l;return u0(this,function(p){switch(p.label){case 0:return i=Date.now()+n,[4,this._transport.send(t,n)];case 1:o=p.sent(),a=c0,u=l0,p.label=2;case 2:return o.status==="retryable"&&a>0?(a--,c=Math.max(Math.min(u,p0)+h0(),0),u=u*f0,s=(r=o.retryInMillis)!==null&&r!==void 0?r:c,l=i-Date.now(),s>l?[2,o]:[4,this.retry(t,l,s)]):[3,4];case 3:return o=p.sent(),[3,2];case 4:return[2,o]}})})},e.prototype.shutdown=function(){return this._transport.shutdown()},e}();function mc(e){return new d0(e.transport)}function v0(e){var t=[429,502,503,504];return t.includes(e)}function y0(e){if(e!=null){var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?t*1e3:-1;var n=new Date(e).getTime()-Date.now();return n>=0?n:0}}var g0=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},m0=function(){function e(t){this._parameters=t}return e.prototype.send=function(t,n){var r=this;return new Promise(function(i){var o=new XMLHttpRequest;o.timeout=n,o.open("POST",r._parameters.url);var a=r._parameters.headers();Object.entries(a).forEach(function(u){var c=g0(u,2),s=c[0],l=c[1];o.setRequestHeader(s,l)}),o.ontimeout=function(u){i({status:"failure",error:new Error("XHR request timed out")})},o.onreadystatechange=function(){o.status>=200&&o.status<=299?(b.debug("XHR success"),i({status:"success"})):o.status&&v0(o.status)?i({status:"retryable",retryInMillis:y0(o.getResponseHeader("Retry-After"))}):o.status!==0&&i({status:"failure",error:new Error("XHR request failed with non-retryable status")})},o.onabort=function(){i({status:"failure",error:new Error("XHR request aborted")})},o.onerror=function(){i({status:"failure",error:new Error("XHR request errored")})},o.send(t)})},e.prototype.shutdown=function(){},e}();function _0(e){return new m0(e)}var E0=function(){function e(t){this._params=t}return e.prototype.send=function(t){var n=this;return new Promise(function(r){navigator.sendBeacon(n._params.url,new Blob([t],{type:n._params.blobType}))?(b.debug("SendBeacon success"),r({status:"success"})):r({status:"failure",error:new Error("SendBeacon failed")})})},e.prototype.shutdown=function(){},e}();function b0(e){return new E0(e)}function T0(e,t){return Ou(e,t,mc({transport:_0(e)}))}function S0(e,t){return Ou(e,t,mc({transport:b0({url:e.url,blobType:e.headers()["Content-Type"]})}))}var w0=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function O0(e){return function(){var t,n={};return Object.entries((t=e?.())!==null&&t!==void 0?t:{}).forEach(function(r){var i=w0(r,2),o=i[0],a=i[1];typeof a<"u"?n[o]=String(a):b.warn('Header "'+o+'" has invalid value ('+a+") and will be ignored")}),n}}var Wt=function(){return Wt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Wt.apply(this,arguments)};function L0(e,t,n){var r=Wt({},n()),i={};return function(){return t!=null&&Object.assign(i,t()),e!=null&&Object.assign(i,e()),Object.assign(i,r)}}function A0(e){if(e!=null)try{return new URL(e),e}catch{throw new Error("Configuration: Could not parse user-provided export URL: '"+e+"'")}}function R0(e,t,n){var r,i,o,a;return Wt(Wt({},HE(e,t,n)),{headers:L0(O0(e.headers),t.headers,n.headers),url:(i=(r=A0(e.url))!==null&&r!==void 0?r:t.url)!==null&&i!==void 0?i:n.url,agentOptions:(a=(o=e.agentOptions)!==null&&o!==void 0?o:t.agentOptions)!==null&&a!==void 0?a:n.agentOptions})}function C0(e,t){return Wt(Wt({},qE()),{headers:function(){return e},url:"http://localhost:4318/"+t,agentOptions:{keepAlive:!0}})}function x0(e,t,n){return R0({url:e.url,timeoutMillis:e.timeoutMillis,headers:GE(e.headers),concurrencyLimit:e.concurrencyLimit},{},C0(n,t))}function _c(e,t,n,r){var i=!!e.headers||typeof navigator.sendBeacon!="function",o=x0(e,n,r);return i?T0(o,t):S0(o,t)}var P0=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),N0=function(e){P0(t,e);function t(n){return n===void 0&&(n={}),e.call(this,_c(n,yc,"v1/traces",{"Content-Type":"application/json"}))||this}return t}(Su),or;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE",e[e.LOWMEMORY=2]="LOWMEMORY"})(or||(or={}));var I0=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),mo=function(){return lt.CUMULATIVE},Ec=function(e){switch(e){case L.COUNTER:case L.OBSERVABLE_COUNTER:case L.GAUGE:case L.HISTOGRAM:case L.OBSERVABLE_GAUGE:return lt.DELTA;case L.UP_DOWN_COUNTER:case L.OBSERVABLE_UP_DOWN_COUNTER:return lt.CUMULATIVE}},bc=function(e){switch(e){case L.COUNTER:case L.HISTOGRAM:return lt.DELTA;case L.GAUGE:case L.UP_DOWN_COUNTER:case L.OBSERVABLE_UP_DOWN_COUNTER:case L.OBSERVABLE_COUNTER:case L.OBSERVABLE_GAUGE:return lt.CUMULATIVE}};function k0(){var e=Bd(),t=e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return t==="cumulative"?mo:t==="delta"?Ec:t==="lowmemory"?bc:(b.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),mo)}function M0(e){return e!=null?e===or.DELTA?Ec:e===or.LOWMEMORY?bc:mo:k0()}function D0(e){return e!=null&&e.aggregationPreference?e.aggregationPreference:function(t){return Et.Default()}}var U0=function(e){I0(t,e);function t(n,r){var i=e.call(this,n)||this;return i._aggregationSelector=D0(r),i._aggregationTemporalitySelector=M0(r?.temporalityPreference),i}return t.prototype.selectAggregation=function(n){return this._aggregationSelector(n)},t.prototype.selectAggregationTemporality=function(n){return this._aggregationTemporalitySelector(n)},t}(Su),j0=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),B0=function(e){j0(t,e);function t(n){return e.call(this,_c(n??{},vc,"v1/metrics",{"Content-Type":"application/json"}),n)||this}return t}(U0);function $0(e,t){const n=e.spanContext();return{name:e.name,kind:e.kind,spanContext:()=>n,parentSpanId:e.parentSpanId,startTime:e.startTime,endTime:e.endTime,status:e.status,attributes:Mv(e.attributes,t),links:e.links,events:e.events,duration:e.duration,ended:e.ended,resource:e.resource,instrumentationLibrary:e.instrumentationLibrary,droppedAttributesCount:e.droppedAttributesCount,droppedEventsCount:e.droppedEventsCount,droppedLinksCount:e.droppedLinksCount}}function F0(e,t){if(!t.isSamplingEnabled())return e;const n=[],r={},i={};for(const o of e){o.parentSpanId&&(i[o.parentSpanId]=i[o.parentSpanId]||[],i[o.parentSpanId].push(o.spanContext().spanId));const a=t.shouldSample(o);a.sample?a.attributes?r[o.spanContext().spanId]=$0(o,a.attributes):r[o.spanContext().spanId]=o:n.push(o.spanContext().spanId)}for(;n.length>0;){const o=n.shift(),a=i[o];if(a)for(const u of a)delete r[u],n.push(u)}return Object.values(r)}const V0=(e,t,n)=>{if(typeof navigator>"u"||!navigator.sendBeacon)return!1;try{const r=new Blob([t],{type:n});return navigator.sendBeacon(e,r)}catch{return!1}},Tc=(e,t,n,r)=>{const i=o=>{if(V0(e,t,n))return r({code:B.SUCCESS});r({code:B.FAILED,error:o})};try{const o=new Blob([t],{type:n});fetch(e,{method:"POST",body:o,keepalive:!0,headers:{"Content-Type":n},credentials:"omit"}).then(a=>{if(a.ok)return r({code:B.SUCCESS});r({code:B.FAILED,error:new Error(`keepalive fetch export failed with status ${a.status}`)})},a=>i(a))}catch(o){i(o)}};class G0 extends N0{constructor(t,n){var r;super(Q(R({},t),{headers:{}})),C(this,"url"),C(this,"unloading",!1),this.sampler=n,this.url=(r=t?.url)!=null?r:""}setUnloading(t){this.unloading=t}export(t,n){const r=F0(t,this.sampler);if(r.length===0)return;if(this.unloading){const a=yc.serializeRequest(r);if(!a||!this.url)return n({code:B.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});Tc(this.url,a,"application/json",n);return}let i=0;const o=a=>{if(a.code===B.SUCCESS)return n({code:B.SUCCESS});if(i++,i>$r)return n({code:B.FAILED,error:a.error});new Promise(u=>setTimeout(u,Fr+Vr*Math.pow(2,i))).then(()=>{super.export(r,o)})};super.export(r,o)}}class H0 extends B0{constructor(t){var n;super(Q(R({},t),{headers:{}})),C(this,"url"),C(this,"unloading",!1),this.url=(n=t?.url)!=null?n:""}setUnloading(t){this.unloading=t}export(t,n){if(this.unloading){const o=vc.serializeRequest(t);if(!o||!this.url)return n({code:B.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});Tc(this.url,o,"application/json",n);return}let r=0;const i=o=>{var a;if(o.code===B.SUCCESS)return n({code:B.SUCCESS});if(r++,r>$r)return console.error(`[@launchdarkly/observability] failed to export OTeL metrics: ${(a=o.error)==null?void 0:a.message}`,o.error),n({code:B.FAILED,error:o.error});new Promise(u=>setTimeout(u,Fr+Vr*Math.pow(2,r))).then(()=>{var u;console.warn(`[@launchdarkly/observability] retry ${r}, failed to export OTeL metrics: ${(u=o.error)==null?void 0:u.message}`,o.error),super.export(t,i)})};super.export(t,i)}}const q0="OT_ZONE_CONTEXT",z0="Navigation:";function X0(){return!1}const _o=class ee extends ls{constructor(t={}){var n,r;super(ee.moduleName,ee.version,t),C(this,"_spansData",new WeakMap),C(this,"_zonePatched"),C(this,"_wrappedListeners",new WeakMap),C(this,"_eventsSpanMap",new WeakMap),C(this,"_eventNames"),C(this,"_shouldPreventSpanCreation"),C(this,"_getLDContextKeyAttributes"),this._getLDContextKeyAttributes=t.getLDContextKeyAttributes,this._eventNames=new Set((n=t?.eventNames)!=null?n:[]),((r=t.productAnalyticsEvents)==null?void 0:r.clicks)!==!1&&this._eventNames.add("click"),this._shouldPreventSpanCreation=typeof t?.shouldPreventSpanCreation=="function"?t.shouldPreventSpanCreation:X0}init(){}_checkForTimeout(t,n){const r=this._spansData.get(n);r&&(t.source==="setTimeout"?r.hrTimeLastTimeout=ev():t.source!=="Promise.then"&&t.source!=="setTimeout"&&(r.hrTimeLastTimeout=void 0))}_allowEventName(t){return this._eventNames.has(t)}_createSpan(t,n){var r,i;const o=t?.target,a=t?.type;if(!(o instanceof HTMLElement)||!o.getAttribute||o.hasAttribute("disabled")||!this._allowEventName(a))return;const u=Hs(o,!0);try{const c=this.tracer.startSpan(a,{attributes:{[wt]:window.location.href,"event.type":a,"event.tag":o.tagName,"event.xpath":u,"event.id":o.id,"event.classname":o.className,"event.text":(r=o.textContent)!=null?r:"","event.url":window.location.href,"viewport.width":window.innerWidth,"viewport.height":window.innerHeight}},n?k.setSpan(P.active(),n):void 0);t instanceof MouseEvent&&(c.setAttribute("event.x",t.clientX),c.setAttribute("event.y",t.clientY),c.setAttribute("event.relativeX",t.clientX/window.innerWidth),c.setAttribute("event.relativeY",t.clientY/window.innerHeight),a==="scroll"&&(c.setAttribute("event.scrollX",window.scrollX),c.setAttribute("event.scrollY",window.scrollY)));const s=(i=this._getLDContextKeyAttributes)==null?void 0:i.call(this);return s&&c.setAttributes(s),this._shouldPreventSpanCreation(a,o,c)===!0?void 0:(this._spansData.set(c,{taskCount:0}),c)}catch(c){this._diag.error("failed to start create new user interaction span",c)}}_decrementTask(t){const n=this._spansData.get(t);n&&(n.taskCount--,n.taskCount===0&&this._tryToEndSpan(t,n.hrTimeLastTimeout))}_getCurrentSpan(t){const n=t.get(q0);return n&&k.getSpan(n)}_incrementTask(t){const n=this._spansData.get(t);n&&n.taskCount++}addPatchedListener(t,n,r,i){let o=this._wrappedListeners.get(r);o||(o=new Map,this._wrappedListeners.set(r,o));let a=o.get(n);return a||(a=new Map,o.set(n,a)),a.has(t)?!1:(a.set(t,i),!0)}removePatchedListener(t,n,r){const i=this._wrappedListeners.get(r);if(!i)return;const o=i.get(n);if(!o)return;const a=o.get(t);return a&&(o.delete(t),o.size===0&&(i.delete(n),i.size===0&&this._wrappedListeners.delete(r))),a}_invokeListener(t,n,r){return typeof t=="function"?t.apply(n,r):t.handleEvent(r[0])}_patchAddEventListener(){const t=this;let n=new Map;return r=>function(i,o,a){if(!o)return r.call(this,i,o,a);const u=a&&typeof a=="object"&&a.once,c=function(...s){var l;let p;const f=s[0];if(!(f!=null&&f.type))return t._invokeListener(o,this,s);if(Date.now()-((l=n.get(f.type))!=null?l:0)<1e3/60)return t._invokeListener(o,this,s);n.set(f.type,Date.now()),f&&(p=t._eventsSpanMap.get(f)),u&&t.removePatchedListener(this,i,o);const v=t._createSpan(f,p);return v?(f&&t._eventsSpanMap.set(f,v),P.with(k.setSpan(P.active(),v),()=>{const y=t._invokeListener(o,this,s);return v.end(),y})):t._invokeListener(o,this,s)};if(t.addPatchedListener(this,i,o,c))return r.call(this,i,c,a)}}_patchRemoveEventListener(){const t=this;return n=>function(r,i,o){const a=t.removePatchedListener(this,r,i);return a?n.call(this,r,a,o):n.call(this,r,i,o)}}_getPatchableEventTargets(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}_patchHistoryApi(){this._unpatchHistoryApi(),this._wrap(history,"replaceState",this._patchHistoryMethod()),this._wrap(history,"pushState",this._patchHistoryMethod()),this._wrap(history,"back",this._patchHistoryMethod()),this._wrap(history,"forward",this._patchHistoryMethod()),this._wrap(history,"go",this._patchHistoryMethod())}_patchHistoryMethod(){const t=this;return n=>function(...r){const i=`${location.pathname}${location.hash}${location.search}`,o=n.apply(this,r),a=`${location.pathname}${location.hash}${location.search}`;return i!==a&&t._updateInteractionName(a),o}}_unpatchHistoryApi(){et(history.replaceState)&&this._unwrap(history,"replaceState"),et(history.pushState)&&this._unwrap(history,"pushState"),et(history.back)&&this._unwrap(history,"back"),et(history.forward)&&this._unwrap(history,"forward"),et(history.go)&&this._unwrap(history,"go")}_updateInteractionName(t){const n=k.getSpan(P.active());n&&typeof n.updateName=="function"&&n.updateName(`${z0} ${t}`)}_patchZoneCancelTask(){const t=this;return n=>function(r){const i=Zone.current,o=t._getCurrentSpan(i);return o&&t._shouldCountTask(r,i)&&t._decrementTask(o),n.call(this,r)}}_patchZoneScheduleTask(){const t=this;return n=>function(r){const i=Zone.current,o=t._getCurrentSpan(i);return o&&t._shouldCountTask(r,i)&&(t._incrementTask(o),t._checkForTimeout(r,o)),n.call(this,r)}}_patchZoneRunTask(){const t=this;return n=>function(r,i,o){const a=Array.isArray(o)&&o[0]instanceof Event?o[0]:void 0,u=a?.target;let c;const s=this;if(u){if(c=t._createSpan(a),c)return t._incrementTask(c),s.run(()=>{try{return P.with(k.setSpan(P.active(),c),()=>{const l=Zone.current;return r._zone=l,n.call(l,r,i,o)})}finally{t._decrementTask(c)}})}else c=t._getCurrentSpan(s);try{return n.call(s,r,i,o)}finally{c&&t._shouldCountTask(r,s)&&t._decrementTask(c)}}}_shouldCountTask(t,n){if(t._zone&&(n=t._zone),!n||!t.data||t.data.isPeriodic)return!1;const r=this._getCurrentSpan(n);return!r||!this._spansData.get(r)?!1:t.type==="macroTask"||t.type==="microTask"}_tryToEndSpan(t,n){t&&this._spansData.get(t)&&(t.end(n),this._spansData.delete(t))}enable(){const t=this._getZoneWithPrototype();this._diag.debug("applying patch to",ee.moduleName,ee.version,"zone:",!!t),t?(et(t.prototype.runTask)&&(this._unwrap(t.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),et(t.prototype.scheduleTask)&&(this._unwrap(t.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),et(t.prototype.cancelTask)&&(this._unwrap(t.prototype,"cancelTask"),this._diag.debug("removing previous patch from method cancelTask")),this._zonePatched=!0,this._wrap(t.prototype,"runTask",this._patchZoneRunTask()),this._wrap(t.prototype,"scheduleTask",this._patchZoneScheduleTask()),this._wrap(t.prototype,"cancelTask",this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(n=>{et(n.addEventListener)&&(this._unwrap(n,"addEventListener"),this._diag.debug("removing previous patch from method addEventListener")),et(n.removeEventListener)&&(this._unwrap(n,"removeEventListener"),this._diag.debug("removing previous patch from method removeEventListener")),this._wrap(n,"addEventListener",this._patchAddEventListener()),this._wrap(n,"removeEventListener",this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){const t=this._getZoneWithPrototype();this._diag.debug("removing patch from",ee.moduleName,ee.version,"zone:",!!t),t&&this._zonePatched?(et(t.prototype.runTask)&&this._unwrap(t.prototype,"runTask"),et(t.prototype.scheduleTask)&&this._unwrap(t.prototype,"scheduleTask"),et(t.prototype.cancelTask)&&this._unwrap(t.prototype,"cancelTask")):this._getPatchableEventTargets().forEach(n=>{et(n.addEventListener)&&this._unwrap(n,"addEventListener"),et(n.removeEventListener)&&this._unwrap(n,"removeEventListener")}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}};C(_o,"version","0.1.1"),C(_o,"moduleName","user-interaction");let K0=_o;const Eo=class No extends ls{constructor(t={}){super(No.moduleName,No.version,t),C(this,"_getLDContextKeyAttributes"),C(this,"_unlisten"),C(this,"_lastUrl",""),this._getLDContextKeyAttributes=t.getLDContextKeyAttributes}init(){}enable(){this._lastUrl=window.location.href,this._unlisten=Ef(t=>{var n;const r=this._lastUrl;if(this._lastUrl=t,r!==t)try{const i=this.tracer.startSpan(vf,{attributes:{[wt]:t,"page_view.previous_url":r,"page_view.url":t}}),o=(n=this._getLDContextKeyAttributes)==null?void 0:n.call(this);o&&i.setAttributes(o),i.end()}catch(i){this._diag.error("failed to create page view span",i)}})}disable(){var t;(t=this._unlisten)==null||t.call(this),this._unlisten=void 0}};C(Eo,"version","0.1.0"),C(Eo,"moduleName","location-change");let W0=Eo,z={},be,ar;const Yt="highlight.record",Y0="highlight.session_id",bo=new Map,Sc=e=>`${e.spanContext().traceId}:${e.spanContext().spanId}`,wc="launchdarkly.js.log",J0="launchdarkly.exception.id",Oc="launchdarkly.sampling.ratio",Lc="log.severity",Ac="log.message",Q0=(e,t)=>{var n,r,i,o,a,u,c,s,l,p;if(z.tracerProvider||z.meterProvider){console.warn("OTEL already initialized. Skipping...");return}be=e;const f=e.backendUrl||void 0||"https://pub.highlight.io",v=[...(r=(n=e.networkRecordingOptions)==null?void 0:n.urlBlocklist)!=null?r:[],...OE],y=(i=e.environment)!=null?i:"production",g={url:e.otlpEndpoint+"/v1/traces",concurrencyLimit:10,timeoutMillis:3e4,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:6e4,keepAlive:!0}},m=new G0(g,t),E=new sr(m,{maxExportBatchSize:1024,maxQueueSize:2048,exportTimeoutMillis:g.timeoutMillis,scheduledDelayMillis:5e3}),S=new Ji({[Dp]:(o=e.serviceName)!=null?o:"highlight-browser",[Up]:e.serviceVersion,"deployment.environment.name":y,"highlight.project_id":e.projectId,[Fp]:navigator.userAgent,"browser.language":navigator.language,"telemetry.distro.name":"@highlight-run/observability","telemetry.distro.version":Sf});z.tracerProvider=new sm({resource:S,mergeResourceWithDefaults:!0,spanProcessors:[E]}),k.setGlobalTracerProvider(z.tracerProvider);const N=new H0(Q(R({},g),{url:e.otlpEndpoint+"/v1/metrics"})),j=new iT({exporter:N,exportIntervalMillis:g.timeoutMillis,exportTimeoutMillis:g.timeoutMillis});z.meterProvider=new HT({resource:S,readers:[j]}),pe.setGlobalMeterProvider(z.meterProvider);let $=[];if(((a=e.instrumentations)==null?void 0:a["@opentelemetry/instrumentation-document-load"])!==!1&&$.push(new Nm({applyCustomAttributesOnSpan:{documentLoad:Pc,documentFetch:Pc,resourceFetch:cS}})),((u=e.instrumentations)==null?void 0:u["@opentelemetry/instrumentation-user-interaction"])!==!1&&$.push(new K0({productAnalyticsEvents:e.productAnalyticsEvents,getLDContextKeyAttributes:e.getLDContextKeyAttributes})),((c=e.productAnalyticsEvents)==null?void 0:c.pageViews)!==!1&&$.push(new W0({getLDContextKeyAttributes:e.getLDContextKeyAttributes})),(s=e.networkRecordingOptions)!=null&&s.enabled){if(((l=e.instrumentations)==null?void 0:l["@opentelemetry/instrumentation-fetch"])!==!1){const X=new L_({propagateTraceHeaderCorsUrls:Ic(e.tracingOrigins),applyCustomAttributesOnSpan:(U,bt,yt)=>{var W,Qt;if(!U.attributes)return;const Tt=U;if(Tt.attributes[Yt]!==!1){if(xc(U,bt.body,bt.headers,e.networkRecordingOptions),!(yt instanceof Response)){U.setAttributes({"http.response.error":yt.message,[aa]:yt.status});return}if(!((W=e.networkRecordingOptions)!=null&&W.requestResponseSanitizer&&(So(U,e.networkRecordingOptions.requestResponseSanitizer),Tt.attributes[Yt]===!1))&&(Qt=e.networkRecordingOptions)!=null&&Qt.recordHeadersAndBody){const h=ct(void 0,null,function*(){var _,A,G,V,M,Zt;const te=yield $E(yt,(_=e.networkRecordingOptions)==null?void 0:_.bodyKeysToRecord,(A=e.networkRecordingOptions)==null?void 0:A.networkBodyKeysToRedact),sn=Object.fromEntries(yt.headers.entries()),JS=Qi((V=(G=e.networkRecordingOptions)==null?void 0:G.networkHeadersToRedact)!=null?V:[],sn,(M=e.networkRecordingOptions)==null?void 0:M.headerKeysToRecord),QS=To(JS,"http.response.header");Object.assign(U.attributes,R({"http.response.body":te},QS)),(Zt=e.networkRecordingOptions)!=null&&Zt.requestResponseSanitizer&&So(U,e.networkRecordingOptions.requestResponseSanitizer)});bo.set(Sc(U),h)}}}});$.push(X)}((p=e.instrumentations)==null?void 0:p["@opentelemetry/instrumentation-xml-http-request"])!==!1&&$.push(new dE({propagateTraceHeaderCorsUrls:Ic(e.tracingOrigins),applyCustomAttributesOnSpan:(X,U)=>{var bt,yt,W,Qt;const Tt=U;if(!(!X.attributes||X.attributes[Yt]===!1)){if(xc(X,Tt._body,Tt._requestHeaders,e.networkRecordingOptions),(bt=e.networkRecordingOptions)!=null&&bt.recordHeadersAndBody){let h="";(U.responseType===""||U.responseType==="text")&&(h=to(U.responseText,(yt=e.networkRecordingOptions)==null?void 0:yt.networkBodyKeysToRedact,(W=e.networkRecordingOptions)==null?void 0:W.bodyKeysToRecord,void 0));const _=rS(U.getAllResponseHeaders());sS(X,_,h,e.networkRecordingOptions)}(Qt=e.networkRecordingOptions)!=null&&Qt.requestResponseSanitizer&&So(X,e.networkRecordingOptions.requestResponseSanitizer)}}}))}Xv({instrumentations:$});const nt=new Fs;return nt.enable(),z.tracerProvider.register({contextManager:nt,propagator:new ov({propagators:[new md,new tS({backendUrl:f,otlpEndpoint:e.otlpEndpoint,tracingOrigins:e.tracingOrigins,urlBlocklist:v})]})}),ar=Z0(m,N,E,()=>z),z},Z0=(e,t,n,r)=>{if(typeof document>"u"||typeof window>"u")return()=>{};const i=()=>{var u,c;e.setUnloading(!0),t.setUnloading(!0),n.setSkipPendingOnFlush(!0);const s=r();(u=s.tracerProvider)==null||u.forceFlush().catch(()=>{}),(c=s.meterProvider)==null||c.forceFlush().catch(()=>{})},o=()=>{document.visibilityState==="hidden"?i():document.visibilityState==="visible"&&(e.setUnloading(!1),t.setUnloading(!1),n.setSkipPendingOnFlush(!1))},a=()=>i();return document.addEventListener("visibilitychange",o),window.addEventListener("pagehide",a),()=>{document.removeEventListener("visibilitychange",o),window.removeEventListener("pagehide",a)}};class sr extends Us{constructor(){super(...arguments),C(this,"_pendingSpans",new Set),C(this,"_skipPendingOnFlush",!1)}setSkipPendingOnFlush(t){this._skipPendingOnFlush=t}onStart(t,n){t.setAttribute(Y0,Ot()),super.onStart(t,n)}onEnd(t){if(t.attributes[Yt]===!1)return;const n=Sc(t),r=bo.get(n);if(r){const i=r.catch(o=>{console.warn("[CustomBatchSpanProcessor] Failed to capture response body attributes",o)}).finally(()=>{bo.delete(n),this._pendingSpans.delete(i),t.attributes[Yt]!==!1&&super.onEnd(t)});this._pendingSpans.add(i);return}super.onEnd(t)}shutdown(){return ct(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),Oa(sr.prototype,this,"shutdown").call(this)})}forceFlush(){return ct(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),Oa(sr.prototype,this,"forceFlush").call(this)})}}class tS extends Tv{constructor(t){super(),C(this,"highlightEndpoints"),C(this,"tracingOrigins"),C(this,"urlBlocklist"),this.highlightEndpoints=[t.backendUrl,`${t.otlpEndpoint}/v1/traces`,`${t.otlpEndpoint}/v1/logs`,`${t.otlpEndpoint}/v1/metrics`],this.tracingOrigins=t.tracingOrigins,this.urlBlocklist=t.urlBlocklist}inject(t,n,r){var i;const o=k.getSpan(t);if(!o||!o.attributes)return;const a=kc(o);typeof a=="string"&&(uS(a,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||o.setAttribute(Yt,!1),!DE(a,(i=this.tracingOrigins)!=null?i:[],this.urlBlocklist))||super.inject(t,n,r)}}const Rc="highlight-browser",eS=Rc,Cc=()=>{var e;return(e=z.tracerProvider)==null?void 0:e.getTracer(Rc)},ur=()=>{var e;return(e=z.meterProvider)==null?void 0:e.getMeter(eS)},nS=()=>ct(void 0,null,function*(){ar&&(ar(),ar=void 0),yield Promise.allSettled([ct(void 0,null,function*(){z.tracerProvider?(yield z.tracerProvider.shutdown(),z.tracerProvider=void 0):console.warn("OTEL shutdown called without initialized tracerProvider.")}),ct(void 0,null,function*(){z.meterProvider?(yield z.meterProvider.shutdown(),z.meterProvider=void 0):console.warn("OTEL shutdown called without initialized meterProvider.")})])}),xc=(e,t,n,r)=>{var i;if(!e.attributes)return;const o=kc(e),a=Zi(o),u=Eu(a),c=typeof t=="string"?t:String(t);try{const s=t?JSON.parse(c):void 0;s!=null&&s.operationName&&e.setAttribute("graphql.operation.name",s.operationName)}catch{}if(e.setAttributes({"highlight.type":"http.request",[Ee]:a,[wt]:a,[bn]:u.pathname,[$p]:u.search}),e.setAttributes(iS(u.searchParams,"url.query_params")),r!=null&&r.recordHeadersAndBody){const s=to(t,r.networkBodyKeysToRedact,r.bodyKeysToRecord,n);e.setAttribute("http.request.body",s);const l=Qi((i=r.networkHeadersToRedact)!=null?i:[],n,r.headerKeysToRecord),p=To(l,"http.request.header");e.setAttributes(p)}},rS=e=>{const t={};return e&&e.trim().split(/[\r\n]+/).forEach(n=>{const r=n.split(": "),i=r.shift();i&&(t[i]=r.join(": "))}),t},To=(e,t)=>{const n={};return Object.entries(e).forEach(([r,i])=>{const o=r.toLowerCase().replace(/_/g,"-"),a=`${t}.${o}`,u=aS(o,i);if(n[a]){const c=n[a];Array.isArray(c)?n[a]=[...c,...u]:n[a]=[c,...u]}else n[a]=u.length===1?u[0]:u}),n},iS=(e,t)=>{const n={};for(const[r,i]of e.entries()){const o=`${t}.${r}`,a=n[o];a===void 0?n[o]=i:Array.isArray(a)?a.push(i):n[o]=[a,i]}return n},oS=new Set(["accept","accept-charset","accept-encoding","accept-language","accept-ranges","allow","cache-control","connection","content-encoding","content-language","expect","if-match","if-none-match","pragma","proxy-authenticate","te","trailer","transfer-encoding","upgrade","vary","via","warning","www-authenticate","access-control-allow-headers","access-control-allow-methods","access-control-expose-headers","access-control-request-headers"]),aS=(e,t)=>oS.has(e)?t.split(",").map(n=>n.trim()).filter(n=>n.length>0):[t],sS=(e,t,n,r)=>{var i;e.setAttribute("http.response.body",n);const o=Qi((i=r.networkHeadersToRedact)!=null?i:[],t,r.headerKeysToRecord),a=To(o,"http.response.header");e.setAttributes(a)},So=(e,t)=>{var n,r,i,o,a,u,c,s,l,p;const f=e.attributes,v={},y={};for(const[N,j]of Object.entries(f))N.startsWith("http.request.header.")&&(v[N.slice(20)]=String(j)),N.startsWith("http.response.header.")&&(y[N.slice(21)]=String(j));let g={request:{sessionSecureID:"",id:"",url:(r=(n=f[wt])!=null?n:f[Ee])!=null?r:"",verb:(i=f["http.request.method"])!=null?i:"GET",headers:v,body:(o=f["http.request.body"])!=null?o:""},response:{status:Number((a=f[aa])!=null?a:0),headers:y,body:(u=f["http.response.body"])!=null?u:""},urlBlocked:!1},m=!0;try{g.request.body=JSON.parse(g.request.body)}catch{m=!1}let E=!0;try{g.response.body=JSON.parse(g.response.body)}catch{E=!1}let S;try{S=t(g)}catch{return}if(!S){Object.assign(e.attributes,{[Yt]:!1});return}m&&(c=S.request)!=null&&c.body&&(S.request.body=JSON.stringify(S.request.body)),E&&(s=S.response)!=null&&s.body&&(S.response.body=JSON.stringify(S.response.body)),Object.assign(e.attributes,{"http.request.body":(l=S.request.body)!=null?l:"","http.response.body":(p=S.response.body)!=null?p:""})},uS=(e,t,n,r)=>r!=null&&r.some(i=>e.toLowerCase().includes(i))?!1:ME(e,t),Pc=e=>{var t,n,r;if(!e.events)return;const i=e.events,o={unload:ot("unloadEventStart","unloadEventEnd",i),dom_interactive:ot("fetchStart","domInteractive",i),dom_content_loaded:ot("domContentLoadedEventStart","domContentLoadedEventEnd",i),dom_complete:ot("fetchStart","domComplete",i),load_event:ot("loadEventStart","loadEventEnd",i),document_load:ot("fetchStart","loadEventEnd",i),first_paint:ot("fetchStart","firstPaint",i),first_contentful_paint:ot("fetchStart","firstContentfulPaint",i),domain_lookup:ot("domainLookupStart","domainLookupEnd",i),connect:ot("connectStart","connectEnd",i),request:ot("requestStart","requestEnd",i),response:ot("responseStart","responseEnd",i)},a=(n=(t=be?.getIntegrations)==null?void 0:t.call(be))!=null?n:[];if(o.document_load!==void 0)for(const u of a)u.recordGauge((r=be?.sessionSecureId)!=null?r:"",{name:yf,value:o.document_load/1e6});Object.entries(o).forEach(([u,c])=>{c!==void 0&&(e.setAttribute(`timings.${u}.ns`,c),e.setAttribute(`timings.${u}.readable`,Nc(c)))})};function ot(e,t,n){const r=n.find(a=>a.name===e),i=n.find(a=>a.name===t);if(!r||!i)return;const o=r.time[0]*1e9+r.time[1];return i.time[0]*1e9+i.time[1]-o}const cS=(e,t)=>{const n={domain_lookup:(t.domainLookupEnd-t.domainLookupStart)*1e9,connect:(t.connectEnd-t.connectStart)*1e9,request:(t.responseEnd-t.requestStart)*1e9,response:(t.responseEnd-t.responseStart)*1e9};Object.entries(n).forEach(([r,i])=>{e.setAttribute(`timings.${r}.ns`,i),e.setAttribute(`timings.${r}.readable`,Nc(i))})},Nc=e=>{if(e>=36e11){const t=e/36e11;return`${Number(t.toFixed(1))}h`}else if(e>=6e10){const t=e/6e10;return`${Number(t.toFixed(1))}m`}else if(e>=1e9){const t=e/1e9;return`${Number(t.toFixed(1))}s`}else if(e>=1e6){const t=e/1e6;return`${Number(t.toFixed(1))}ms`}else if(e>=1e3){const t=e/1e3;return`${Number(t.toFixed(1))}µs`}else return`${Number(e.toFixed(1))}ns`},Ic=e=>e===!0?[/localhost/,/^\//,bu(window.location.host)]:Array.isArray(e)?e.map(t=>typeof t=="string"?new RegExp(t):t):/^$/,kc=e=>e.attributes[wt]?e.attributes[wt]:e.attributes[Ee],lS=30,pS=()=>new Promise(e=>requestAnimationFrame(t=>requestAnimationFrame(n=>e(n-t)))),fS=()=>ct(void 0,null,function*(){const e=[];for(let t=0;t<lS;t++)e.push(yield pS());return e.reduce((t,n)=>t+n,0)/e.length}),hS=(e,t)=>{let n={},r=16.666666666666668;fS().then(c=>r=c);const i=c=>{var s;n!=null&&n.event||(n={event:c,location:window.location.href,timerStart:(s=window.performance)==null?void 0:s.now()},window.requestAnimationFrame(o))},o=()=>{if(!(n!=null&&n.timerStart))return;const c=window.performance.now()-n.timerStart-r;a(c),n={}},a=c=>{const s=(new Date().getTime()-t)/1e3;e({relativeTimestamp:s,jankAmount:c,querySelector:u(),newLocation:window.location.href!=n.location?window.location.href:void 0})},u=()=>{var c;return(c=n?.event)!=null&&c.target?wf(n.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},dS=typeof window<"u",Mc=dS&&"performance"in window&&"memory"in performance?performance:{memory:{}},vS=(e,t)=>{let n=0,r=0;const i=()=>{const s=(new Date().getTime()-t)/1e3,l=Mc.memory.jsHeapSizeLimit||0,p=Mc.memory.usedJSHeapSize||0;e({jsHeapSizeLimit:l,usedJSHeapSize:p,relativeTimestamp:s,fps:n})};i();let o;o=setInterval(()=>{i()},1e3);let a=0,u=Date.now();const c=function(){var s=Date.now();a++,s>1e3+u&&(n=Math.round(a*1e3/(s-u)),a=0,u=s),r=requestAnimationFrame(c)};return c(),()=>{clearInterval(o),cancelAnimationFrame(r)}};var It,nn,Dc,cr,wo,Te=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},rn=function(e){if(document.readyState==="loading")return"loading";var t=Te();if(t){if(e<t.domInteractive)return"loading";if(t.domContentLoadedEventStart===0||e<t.domContentLoadedEventStart)return"dom-interactive";if(t.domComplete===0||e<t.domComplete)return"dom-content-loaded"}return"complete"},yS=function(e){var t=e.nodeName;return e.nodeType===1?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},lr=function(e,t){var n="";try{for(;e&&e.nodeType!==9;){var r=e,i=r.id?"#"+r.id:yS(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+i.length>99)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch{}return n},Uc=-1,jc=function(){return Uc},Jt=function(e){addEventListener("pageshow",function(t){t.persisted&&(Uc=t.timeStamp,e(t))},!0)},pr=function(){var e=Te();return e&&e.activationStart||0},at=function(e,t){var n=Te(),r="navigate";return jc()>=0?r="back-forward-cache":n&&(document.prerendering||pr()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t===void 0?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},Se=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver(function(i){Promise.resolve().then(function(){t(i.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},st=function(e,t,n,r){var i,o;return function(a){t.value>=0&&(a||r)&&((o=t.value-(i||0))||i===void 0)&&(i=t.value,t.delta=o,t.rating=function(u,c){return u>c[1]?"poor":u>c[0]?"needs-improvement":"good"}(t.value,n),e(t))}},Oo=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},fr=function(e){var t=function(n){n.type!=="pagehide"&&document.visibilityState!=="hidden"||e(n)};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},Lo=function(e){var t=!1;return function(n){t||(e(n),t=!0)}},we=-1,Bc=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},hr=function(e){document.visibilityState==="hidden"&&we>-1&&(we=e.type==="visibilitychange"?e.timeStamp:0,gS())},$c=function(){addEventListener("visibilitychange",hr,!0),addEventListener("prerenderingchange",hr,!0)},gS=function(){removeEventListener("visibilitychange",hr,!0),removeEventListener("prerenderingchange",hr,!0)},Ao=function(){return we<0&&(we=Bc(),$c(),Jt(function(){setTimeout(function(){we=Bc(),$c()},0)})),{get firstHiddenTime(){return we}}},on=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},Fc=[1800,3e3],Vc=function(e,t){t=t||{},on(function(){var n,r=Ao(),i=at("FCP"),o=Se("paint",function(a){a.forEach(function(u){u.name==="first-contentful-paint"&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(i.value=Math.max(u.startTime-pr(),0),i.entries.push(u),n(!0)))})});o&&(n=st(e,i,Fc,t.reportAllChanges),Jt(function(a){i=at("FCP"),n=st(e,i,Fc,t.reportAllChanges),Oo(function(){i.value=performance.now()-a.timeStamp,n(!0)})}))})},Gc=[.1,.25],mS=function(e,t){(function(n,r){r=r||{},Vc(Lo(function(){var i,o=at("CLS",0),a=0,u=[],c=function(l){l.forEach(function(p){if(!p.hadRecentInput){var f=u[0],v=u[u.length-1];a&&p.startTime-v.startTime<1e3&&p.startTime-f.startTime<5e3?(a+=p.value,u.push(p)):(a=p.value,u=[p])}}),a>o.value&&(o.value=a,o.entries=u,i())},s=Se("layout-shift",c);s&&(i=st(n,o,Gc,r.reportAllChanges),fr(function(){c(s.takeRecords()),i(!0)}),Jt(function(){a=0,o=at("CLS",0),i=st(n,o,Gc,r.reportAllChanges),Oo(function(){return i()})}),setTimeout(i,0))}))})(function(n){(function(r){if(r.entries.length){var i=r.entries.reduce(function(u,c){return u&&u.value>c.value?u:c});if(i&&i.sources&&i.sources.length){var o=(a=i.sources).find(function(u){return u.node&&u.node.nodeType===1})||a[0];if(o)return void(r.attribution={largestShiftTarget:lr(o.node),largestShiftTime:i.startTime,largestShiftValue:i.value,largestShiftSource:o,largestShiftEntry:i,loadState:rn(i.startTime)})}}var a;r.attribution={}})(n),e(n)},t)},_S=function(e,t){Vc(function(n){(function(r){if(r.entries.length){var i=Te(),o=r.entries[r.entries.length-1];if(i){var a=i.activationStart||0,u=Math.max(0,i.responseStart-a);return void(r.attribution={timeToFirstByte:u,firstByteToFCP:r.value-u,loadState:rn(r.entries[0].startTime),navigationEntry:i,fcpEntry:o})}}r.attribution={timeToFirstByte:0,firstByteToFCP:r.value,loadState:rn(jc())}})(n),e(n)},t)},an={passive:!0,capture:!0},ES=new Date,Hc=function(e,t){It||(It=t,nn=e,Dc=new Date,zc(removeEventListener),qc())},qc=function(){if(nn>=0&&nn<Dc-ES){var e={entryType:"first-input",name:It.type,target:It.target,cancelable:It.cancelable,startTime:It.timeStamp,processingStart:It.timeStamp+nn};cr.forEach(function(t){t(e)}),cr=[]}},bS=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;e.type=="pointerdown"?function(n,r){var i=function(){Hc(n,r),a()},o=function(){a()},a=function(){removeEventListener("pointerup",i,an),removeEventListener("pointercancel",o,an)};addEventListener("pointerup",i,an),addEventListener("pointercancel",o,an)}(t,e):Hc(t,e)}},zc=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,bS,an)})},Xc=[100,300],TS=function(e,t){t=t||{},on(function(){var n,r=Ao(),i=at("FID"),o=function(c){c.startTime<r.firstHiddenTime&&(i.value=c.processingStart-c.startTime,i.entries.push(c),n(!0))},a=function(c){c.forEach(o)},u=Se("first-input",a);n=st(e,i,Xc,t.reportAllChanges),u&&fr(Lo(function(){a(u.takeRecords()),u.disconnect()})),u&&Jt(function(){var c;i=at("FID"),n=st(e,i,Xc,t.reportAllChanges),cr=[],nn=-1,It=null,zc(addEventListener),c=o,cr.push(c),qc()})})},SS=function(e,t){TS(function(n){(function(r){var i=r.entries[0];r.attribution={eventTarget:lr(i.target),eventType:i.name,eventTime:i.startTime,eventEntry:i,loadState:rn(i.startTime)}})(n),e(n)},t)},Kc=0,Ro=1/0,dr=0,wS=function(e){e.forEach(function(t){t.interactionId&&(Ro=Math.min(Ro,t.interactionId),dr=Math.max(dr,t.interactionId),Kc=dr?(dr-Ro)/7+1:0)})},Wc=function(){return wo?Kc:performance.interactionCount||0},OS=function(){"interactionCount"in performance||wo||(wo=Se("event",wS,{type:"event",buffered:!0,durationThreshold:0}))},Yc=[200,500],Jc=0,Qc=function(){return Wc()-Jc},vt=[],Co={},Zc=function(e){var t=vt[vt.length-1],n=Co[e.interactionId];if(n||vt.length<10||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};Co[r.id]=r,vt.push(r)}vt.sort(function(i,o){return o.latency-i.latency}),vt.splice(10).forEach(function(i){delete Co[i.id]})}},LS=function(e,t){t=t||{},on(function(){var n;OS();var r,i=at("INP"),o=function(u){u.forEach(function(l){l.interactionId&&Zc(l),l.entryType==="first-input"&&!vt.some(function(p){return p.entries.some(function(f){return l.duration===f.duration&&l.startTime===f.startTime})})&&Zc(l)});var c,s=(c=Math.min(vt.length-1,Math.floor(Qc()/50)),vt[c]);s&&s.latency!==i.value&&(i.value=s.latency,i.entries=s.entries,r())},a=Se("event",o,{durationThreshold:(n=t.durationThreshold)!==null&&n!==void 0?n:40});r=st(e,i,Yc,t.reportAllChanges),a&&("interactionId"in PerformanceEventTiming.prototype&&a.observe({type:"first-input",buffered:!0}),fr(function(){o(a.takeRecords()),i.value<0&&Qc()>0&&(i.value=0,i.entries=[]),r(!0)}),Jt(function(){vt=[],Jc=Wc(),i=at("INP"),r=st(e,i,Yc,t.reportAllChanges)}))})},AS=function(e,t){LS(function(n){(function(r){if(r.entries.length){var i=r.entries.sort(function(o,a){return a.duration-o.duration||a.processingEnd-a.processingStart-(o.processingEnd-o.processingStart)})[0];r.attribution={eventTarget:lr(i.target),eventType:i.name,eventTime:i.startTime,eventEntry:i,loadState:rn(i.startTime)}}else r.attribution={}})(n),e(n)},t)},tl=[2500,4e3],xo={},RS=function(e,t){(function(n,r){r=r||{},on(function(){var i,o=Ao(),a=at("LCP"),u=function(l){var p=l[l.length-1];p&&p.startTime<o.firstHiddenTime&&(a.value=Math.max(p.startTime-pr(),0),a.entries=[p],i())},c=Se("largest-contentful-paint",u);if(c){i=st(n,a,tl,r.reportAllChanges);var s=Lo(function(){xo[a.id]||(u(c.takeRecords()),c.disconnect(),xo[a.id]=!0,i(!0))});["keydown","click"].forEach(function(l){addEventListener(l,function(){return setTimeout(s,0)},!0)}),fr(s),Jt(function(l){a=at("LCP"),i=st(n,a,tl,r.reportAllChanges),Oo(function(){a.value=performance.now()-l.timeStamp,xo[a.id]=!0,i(!0)})})}})})(function(n){(function(r){if(r.entries.length){var i=Te();if(i){var o=i.activationStart||0,a=r.entries[r.entries.length-1],u=a.url&&performance.getEntriesByType("resource").filter(function(v){return v.name===a.url})[0],c=Math.max(0,i.responseStart-o),s=Math.max(c,u?(u.requestStart||u.startTime)-o:0),l=Math.max(s,u?u.responseEnd-o:0),p=Math.max(l,a?a.startTime-o:0),f={element:lr(a.element),timeToFirstByte:c,resourceLoadDelay:s-c,resourceLoadTime:l-s,elementRenderDelay:p-l,navigationEntry:i,lcpEntry:a};return a.url&&(f.url=a.url),u&&(f.lcpResourceEntry=u),void(r.attribution=f)}}r.attribution={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadTime:0,elementRenderDelay:r.value}})(n),e(n)},t)},el=[800,1800],CS=function e(t){document.prerendering?on(function(){return e(t)}):document.readyState!=="complete"?addEventListener("load",function(){return e(t)},!0):setTimeout(t,0)},xS=function(e,t){t=t||{};var n=at("TTFB"),r=st(e,n,el,t.reportAllChanges);CS(function(){var i=Te();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;n.value=Math.max(o-pr(),0),n.entries=[i],r(!0),Jt(function(){n=at("TTFB",0),(r=st(e,n,el,t.reportAllChanges))(!0)})}})},PS=function(e,t){xS(function(n){(function(r){if(r.entries.length){var i=r.entries[0],o=i.activationStart||0,a=Math.max(i.domainLookupStart-o,0),u=Math.max(i.connectStart-o,0),c=Math.max(i.requestStart-o,0);r.attribution={waitingTime:a,dnsTime:u-a,connectionTime:c-u,requestTime:r.value-c,navigationEntry:i}}else r.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}})(n),e(n)},t)};const NS=e=>(mS(e),_S(e),SS(e),RS(e),PS(e),AS(e),()=>{}),Oe=typeof navigator<"u"&&"connection"in navigator?navigator.connection:{},IS=(e,t)=>{const n=()=>{const i=(new Date().getTime()-t)/1e3;e({relativeTimestamp:i,downlink:Oe.downlink,downlinkMax:Oe.downlinkMax,effectiveType:Oe.effectiveType,rtt:Oe.rtt,saveData:Oe.saveData,type:Oe.type})};n();let r;return r=setInterval(()=>{n()},1e3),()=>{clearInterval(r)}},kS=()=>{if(!("performance"in window&&"memory"in performance))return{getDeviceDetails:void 0,getCurrentDeviceDetails:void 0};const e=window.performance;return{getDeviceDetails:()=>({deviceMemory:MS(navigator.deviceMemory||0)}),getCurrentDeviceDetails:()=>{const t=Po(e.memory.jsHeapSizeLimit),n=Po(e.memory.totalJSHeapSize),r=Po(e.memory.usedJSHeapSize);return{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}},Po=e=>e/Math.pow(1e3,2),MS=e=>1024*e;function DS(e){return"regexValue"in e}function US(e){return"matchValue"in e}function jS(e){const t=Math.trunc(e);return t===1?!0:t===0?!1:Math.floor(Math.random()*t)===0}class BS{constructor(t=jS){C(this,"regexCache",new Map),C(this,"config"),this.sampler=t}setConfig(t){this.config=t}isSamplingEnabled(){var t,n,r,i;return!!((n=(t=this.config)==null?void 0:t.logs)!=null&&n.length||(i=(r=this.config)==null?void 0:r.spans)!=null&&i.length)}shouldSample(t){var n,r;return t.name===wc?this.sampleLog((n=this.config)==null?void 0:n.logs,t):this.sampleSpan((r=this.config)==null?void 0:r.spans,t)}matchesValue(t,n){if(!t)return!1;if(US(t))return t.matchValue===n;if(DS(t)){const r=t.regexValue;if(r===null)return!1;this.regexCache.has(r)||this.regexCache.set(r,new RegExp(r));const i=this.regexCache.get(r);if(typeof n=="string")return i.test(n)}return!1}matchesAttributes(t,n){if(t)for(const r of t){let i=!1;for(const o of Object.keys(n))if(this.matchesValue(r.key,o)){const a=n[o];if(this.matchesValue(r.attribute,a)){i=!0;break}}if(!i)return!1}return!0}matchEvent(t,n){return!(t.name&&!this.matchesValue(t.name,n.name)||t.attributes&&(!n.attributes||!this.matchesAttributes(t.attributes,n.attributes)))}matchesEvents(t,n){if(t)for(const r of t){let i=!1;for(const o of n)if(this.matchEvent(r,o)){i=!0;break}if(!i)return!1}return!0}matchesSpanConfig(t,n){return!(t.name&&!this.matchesValue(t.name,n.name)||!this.matchesAttributes(t.attributes,n.attributes)||!this.matchesEvents(t.events,n.events))}matchesLogConfig(t,n){if(t.severityText){const r=n[Lc];if(!this.matchesValue(t.severityText,r))return!1}if(t.message){const r=n[Ac];if(!this.matchesValue(t.message,r))return!1}return!!this.matchesAttributes(t.attributes,n)}sampleSpan(t,n){if(t){for(const r of t)if(this.matchesSpanConfig(r,n))return{sample:this.sampler(r.samplingRatio),attributes:{[Oc]:r.samplingRatio}}}return{sample:!0}}sampleLog(t,n){if(t){for(const r of t)if(this.matchesLogConfig(r,n.attributes))return{sample:this.sampler(r.samplingRatio),attributes:{[Oc]:r.samplingRatio}}}return{sample:!0}}}const nl=()=>{const e={end:()=>{},spanContext:()=>({traceId:"",spanId:"",traceFlags:0}),setAttribute:(t,n)=>e,setAttributes:t=>e,addEvent:(t,n,r)=>e,addLinks:t=>e,setStatus:t=>e,recordException:()=>{},addLink:()=>e,updateName:()=>e,isRecording:()=>!1};return e},$S=()=>{if(typeof window>"u"||typeof PerformanceObserver>"u")return!1;const e=PerformanceObserver.supportedEntryTypes;return Array.isArray(e)&&e.includes("longtask")},FS=e=>{if(!$S())return()=>{};let t;try{t=new PerformanceObserver(n=>{var r;for(const i of n.getEntries()){const o=(r=i.attribution)==null?void 0:r[0];e({duration:i.duration,name:i.name,startTime:i.startTime,containerType:o?.containerType,containerSrc:o?.containerSrc,containerId:o?.containerId,containerName:o?.containerName})}}),t.observe({type:"longtask",buffered:!0})}catch{return()=>{}}return()=>{try{t.disconnect()}catch{}}},VS=new Set(["string","number","boolean"]),GS=()=>typeof window<"u"&&typeof window.ReportingObserver<"u",HS=e=>{const t={};if(!e||typeof e!="object")return t;for(const[n,r]of Object.entries(e))if(r!=null)if(VS.has(typeof r))t[`report.body.${n}`]=r;else try{t[`report.body.${n}`]=JSON.stringify(r)}catch{}return t},qS=e=>{var t;const n=(t=e.body)!=null?t:{},r=n.message||n.reason||n.id||e.type;return typeof r=="string"?r:e.type},zS=(e,t)=>{if(!GS())return()=>{};const n=["deprecation","intervention","csp-violation"],r=window.ReportingObserver;let i;try{i=new r(o=>{var a,u;for(const c of o){const s=(a=c.type)!=null?a:"unknown",l=(u=c.body)!=null?u:{},p=R({"report.type":s,"report.url":c.url},HS(l)),f=qS({type:s,body:l});e(s==="deprecation"?{kind:"log",level:"warn",type:s,message:f,url:c.url,attributes:p}:{kind:"error",type:s,message:f,url:c.url,attributes:p})}},{buffered:!0,types:n}),i.observe()}catch{return()=>{}}return()=>{try{i.disconnect()}catch{}}},XS="exception",KS=function(e,t,n){if(!e)return;const r=R({},n);typeof t=="string"?r[Ir]=t:t&&(t.code?r[kr]=t.code.toString():t.name&&(r[kr]=t.name),t.message&&(r[Ir]=t.message),t.stack&&(r[kp]=t.stack)),r[kr]||r[Ir]?e.addEvent(XS,r):kt("otel","recordException","warn",`Failed to record an exception ${t}`)};class WS{constructor(t){C(this,"organizationID"),C(this,"_options"),C(this,"_integrations",[]),C(this,"_gauges",new Map),C(this,"_counters",new Map),C(this,"_histograms",new Map),C(this,"_up_down_counters",new Map),C(this,"sampler",new BS),C(this,"_started",!1),C(this,"_ldContextKeys"),C(this,"graphqlSDK"),this._options=t,this.organizationID=t.projectId}_productAnalyticsEvents(){var t;const n=(t=this._options)==null?void 0:t.productAnalytics;if(n===!1)return{};const r={clicks:!0,pageViews:!0,trackEvents:!0};if(n===void 0||n===!0)return r;for(const i of Object.keys(n))n[i]===!1&&(r[i]=!1);return r}setLDContextKeyAttributes(t){t&&(this._ldContextKeys=Object.fromEntries(Object.entries(t).map(([n,r])=>[`${ff}.${n}`,r])))}getLDContextKeyAttributes(){return this._ldContextKeys}start(){return ct(this,null,function*(){var t,n,r,i,o,a,u,c,s,l,p,f,v,y,g;if(this._started)return;this._started=!0,Q0({backendUrl:(n=(t=this._options)==null?void 0:t.backendUrl)!=null?n:"https://pub.observability.app.launchdarkly.com",otlpEndpoint:(o=(i=(r=this._options)==null?void 0:r.otel)==null?void 0:i.otlpEndpoint)!=null?o:"https://otel.observability.app.launchdarkly.com",projectId:this._options.projectId,sessionSecureId:this._options.sessionSecureId,environment:(u=(a=this._options)==null?void 0:a.environment)!=null?u:"production",networkRecordingOptions:typeof((c=this._options)==null?void 0:c.networkRecording)=="object"?this._options.networkRecording:void 0,tracingOrigins:(s=this._options)==null?void 0:s.tracingOrigins,serviceName:(p=(l=this._options)==null?void 0:l.serviceName)!=null?p:"browser",serviceVersion:(f=this._options)==null?void 0:f.version,instrumentations:(y=(v=this._options)==null?void 0:v.otel)==null?void 0:y.instrumentations,productAnalyticsEvents:this._productAnalyticsEvents(),getLDContextKeyAttributes:()=>this.getLDContextKeyAttributes(),getIntegrations:()=>this._integrations},this.sampler),this._gauges.clear(),this._counters.clear(),this._histograms.clear(),this._up_down_counters.clear();const m=new up((g=this._options.backendUrl)!=null?g:"https://pub.observability.app.launchdarkly.com",{headers:{}});this.graphqlSDK=xp(m,Zp()),yield this.configureSampling(),this.setupListeners()})}stop(){return ct(this,null,function*(){this._started&&(this._started=!1,yield nS())})}configureSampling(){return ct(this,null,function*(){try{const t=yield this.graphqlSDK.GetSamplingConfig({organization_verbose_id:`${this.organizationID}`});this.sampler.setConfig(t.sampling)}catch(t){St("sampling","warn",`LaunchDarkly Observability: Failed to configure sampling: ${t}`)}})}_recordLog(t,n,r,i){this.startSpan(wc,o=>{var a,u,c,s,l;const p=typeof t=="string"?t:gn(t),f=i?i.map(v=>v.toString()).join(`
309
+ `):void 0;if(o?.addEvent("log",R(R({[Lc]:n,[Ac]:p,"code.stacktrace":f},(a=this._ldContextKeys)!=null?a:{}),r)),this._options.reportConsoleErrors&&n==="error"){const v=new Error(p);o?.recordException(v),o?.setStatus({code:Nn.ERROR,message:p}),i?this._recordErrorMessage({error:v,event:v.message,type:"custom",url:window.location.href,source:"frontend",lineNumber:(c=(u=i[0])==null?void 0:u.lineNumber)!=null?c:0,columnNumber:(l=(s=i[0])==null?void 0:s.columnNumber)!=null?l:0,stackTrace:i,timestamp:new Date().toISOString(),id:Kr()}):this.recordError(v)}})}_recordErrorMessage(t,n){try{t.payload&&(n=R(R({},JSON.parse(t.payload)),n||{}))}catch{}this.startSpan("highlight.exception",o=>{var a;KS(o,(a=t.error)!=null?a:new Error(t.event),{[J0]:t.id}),o?.setAttributes(R({event:t.event,type:t.type,url:t.url,source:t.source,lineNumber:t.lineNumber,columnNumber:t.columnNumber},n))});const r=t,i=Df(r,["payload"]);for(const o of this._integrations)o.error(Ot(),Q(R({},i),{payload:JSON.stringify(n)}))}recordError(t,n,r,i,o){var a,u,c,s;t=t||new Error("Unknown error"),t instanceof Error&&t.cause&&(r=Q(R({},r),{"exception.cause":JSON.stringify(t.cause)}));let l=n?n+":"+t.message:t.message;o==="React.ErrorBoundary"&&(l="ErrorBoundary: "+l);const p=An(t),f={error:t,event:l,type:o??"custom",url:window.location.href,source:i??"frontend",lineNumber:(a=p[0])!=null&&a.lineNumber?(u=p[0])==null?void 0:u.lineNumber:0,columnNumber:(c=p[0])!=null&&c.columnNumber?(s=p[0])==null?void 0:s.columnNumber:0,stackTrace:p,timestamp:new Date().toISOString(),id:Kr()};this._recordErrorMessage(f,r)}recordCount(t){var n,r;let i=this._counters.get(t.name);if(!i){if(i=(n=ur())==null?void 0:n.createCounter(t.name),!i)return;this._counters.set(t.name,i)}i.add(t.value,Q(R(R({},(r=this._ldContextKeys)!=null?r:{}),t.attributes),{"highlight.session_id":Ot()}))}recordGauge(t){var n,r,i;let o=this._gauges.get(t.name);if(!o){if(o=(n=ur())==null?void 0:n.createGauge(t.name),!o)return;this._gauges.set(t.name,o)}const a=R(R({},(r=this._ldContextKeys)!=null?r:{}),t.attributes);o.record(t.value,Q(R({},a),{"highlight.session_id":Ot()}));const u={name:t.name,value:t.value,category:a.category,group:(i=a.group)==null?void 0:i.toString(),tags:Object.entries(a).map(([c,s])=>{var l;return{name:c??"",value:(l=s?.toString())!=null?l:""}})};for(const c of this._integrations)c.recordGauge(Ot(),u)}recordIncr(t){this.recordCount(Q(R({},t),{value:1}))}recordHistogram(t){var n,r;let i=this._histograms.get(t.name);if(!i){if(i=(n=ur())==null?void 0:n.createHistogram(t.name),!i)return;this._histograms.set(t.name,i)}i.record(t.value,Q(R(R({},(r=this._ldContextKeys)!=null?r:{}),t.attributes),{"highlight.session_id":Ot()}))}recordUpDownCounter(t){var n,r;let i=this._up_down_counters.get(t.name);if(!i){if(i=(n=ur())==null?void 0:n.createUpDownCounter(t.name),!i)return;this._up_down_counters.set(t.name,i)}i.add(t.value,Q(R(R({},(r=this._ldContextKeys)!=null?r:{}),t.attributes),{"highlight.session_id":Ot()}))}startSpan(t,n,r,i){const o=Cc();if(!o){const u=nl();return i===void 0&&r===void 0?n(u):i===void 0?r(u):i(u)}const a=(u,c)=>{this._ldContextKeys&&u.setAttributes(this._ldContextKeys);const s=c(u);return s instanceof Promise?s.finally(()=>u.end()):(u.end(),s)};return i===void 0&&r===void 0?o.startActiveSpan(t,u=>a(u,n)):i===void 0?o.startActiveSpan(t,n,u=>a(u,r)):o.startActiveSpan(t,n,r,u=>a(u,i))}startManualSpan(t,n,r,i){const o=Cc();if(!o){const a=nl();return i===void 0&&r===void 0?n(a):i===void 0?r(a):i(a)}return i===void 0&&r===void 0?o.startActiveSpan(t,n):i===void 0?o.startActiveSpan(t,n,r):o.startActiveSpan(t,n,r,i)}register(t,n){this._integrations.push(new _f(t,n))}getHooks(t){return this._integrations.flatMap(n=>{var r,i;return(i=(r=n.getHooks)==null?void 0:r.call(n,t))!=null?i:[]})}submitViewportMetrics({height:t,width:n,availHeight:r,availWidth:i}){this.recordGauge({name:Dt.ViewportHeight,value:t,attributes:{category:it.Device,group:window.location.href}}),this.recordGauge({name:Dt.ViewportWidth,value:n,attributes:{category:it.Device,group:window.location.href}}),this.recordGauge({name:Dt.ScreenHeight,value:r,attributes:{category:it.Device,group:window.location.href}}),this.recordGauge({name:Dt.ScreenWidth,value:i,attributes:{category:it.Device,group:window.location.href}}),this.recordGauge({name:Dt.ViewportArea,value:t*n,attributes:{category:it.Device,group:window.location.href}})}setupListeners(){var t;this._options.disableConsoleRecording||$f(r=>{var i;this._recordLog((i=r.value)==null?void 0:i.join(" "),r.type,r.attributes?JSON.parse(r.attributes):{},r.trace)},{level:(t=this._options.consoleMethodsToRecord)!=null?t:[...Uf],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),this._options.enablePerformanceRecording!==!1&&(vS(r=>{Object.entries(r).filter(([i])=>i!=="relativeTimestamp").forEach(([i,o])=>o&&this.recordGauge({name:i,value:o,attributes:{category:it.Performance,group:window.location.href}}))},0),hS(r=>{this.recordGauge({name:"Jank",value:r.jankAmount,attributes:{category:it.WebVital,group:r.querySelector}})},0)),Wf(r=>{var i;if(Jf.includes(r.event)||Qf.some(u=>r.event.includes(u)))return;const o=new Error(r.event);o.stack=gn(r.stackTrace.map(u=>u.toString()));let a={};try{r.payload&&(a=JSON.parse(r.payload))}catch{}this._recordErrorMessage(Q(R({},r),{error:(i=r.error)!=null?i:o}),a)},{enablePromisePatch:!!this._options.enablePromisePatch}),NS(r=>{const{name:i,value:o}=r,{hostname:a,pathname:u,href:c}=window.location,s={group:window.location.pathname,category:it.WebVital,[wt]:Zi(c),[bn]:u,[Mp]:a};switch(r.name){case"LCP":{const l=r.attribution;l.element&&(s["web_vital.element"]=l.element),l.url&&(s["web_vital.attribution.url"]=Zi(l.url));break}case"CLS":{const l=r.attribution;l.largestShiftTarget&&(s["web_vital.element"]=l.largestShiftTarget),l.loadState&&(s["web_vital.load_state"]=l.loadState);break}case"INP":{const l=r.attribution;l.eventTarget&&(s["web_vital.element"]=l.eventTarget),l.eventType&&(s["web_vital.event_type"]=l.eventType),l.loadState&&(s["web_vital.load_state"]=l.loadState);break}case"FID":{const l=r.attribution;l.eventTarget&&(s["web_vital.element"]=l.eventTarget),l.eventType&&(s["web_vital.event_type"]=l.eventType);break}case"FCP":{const l=r.attribution;l.loadState&&(s["web_vital.load_state"]=l.loadState);break}}this.recordGauge({name:i,value:o,attributes:s})}),Of(r=>{this.submitViewportMetrics(r)}),IS(r=>{const i={category:it.Performance,group:window.location.href};r.saveData!==void 0&&(i.saveData=r.saveData.toString()),r.effectiveType!==void 0&&(i.effectiveType=r.effectiveType.toString()),r.type!==void 0&&(i.type=r.type.toString()),Object.entries(r).filter(([o])=>o!=="relativeTimestamp").forEach(([o,a])=>{Ip(a)&&this.recordGauge({name:o,value:a,attributes:i})})},new Date().getTime());const{getDeviceDetails:n}=kS();n&&this.recordGauge({name:Dt.DeviceMemory,value:n().deviceMemory,attributes:{category:it.Device,group:window.location.href}}),this._options.enableLongtaskRecording!==!1&&FS(r=>{const i={category:it.Performance,name:r.name,[bn]:window.location.pathname};r.containerType&&(i.container_type=r.containerType),r.containerSrc&&(i.container_src=r.containerSrc),r.containerId&&(i.container_id=r.containerId),r.containerName&&(i.container_name=r.containerName),this.recordHistogram({name:"long_task.duration",value:r.duration,attributes:i})}),this._options.enableReportingObserver!==!1&&zS(r=>{var i;const o=Q(R({},r.attributes),{[bn]:window.location.pathname});if(r.kind==="log")this._recordLog(r.message,(i=r.level)!=null?i:"warn",o);else{const a=new Error(r.message);this.recordError(a,void 0,Object.fromEntries(Object.entries(o).map(([u,c])=>[u,c===void 0?"":String(c)])),"reporting-observer","custom")}})}recordLog(t,n,r){return this._recordLog(t,n,r)}}class YS extends Cf{constructor(t){super(t),C(this,"observe"),C(this,"options"),this.options=t}initialize(t,n){try{if(typeof window>"u"||typeof document>"u"){console.warn("@launchdarkly/observability is not initializing because it is not supported in this environment.");return}if(!t){console.warn("@launchdarkly/observability is not initializing because the SDK credential is undefined.");return}this.configureSession(t,n),this.observe=new WS(Q(R({},n),{projectId:t,sessionSecureId:this.sessionSecureID})),n!=null&&n.manualStart||this.observe.start(),rt.LDObserve.load(this.observe)}catch(r){St("Error initializing @launchdarkly/observability SDK","error",r)}}getMetadata(){return{name:"@launchdarkly/observability"}}register(t,n){var r;(r=this.observe)==null||r.register(t,n)}getHooks(t){var n,r,i,o;const a=R(R({[jp]:t.sdk.name,[Bp]:t.sdk.version,[ef]:t.clientSideId,[sf]:"LaunchDarkly"},(n=t.application)!=null&&n.id?{[cf]:t.application.id}:{}),(r=t.application)!=null&&r.version?{[lf]:t.application.version}:{});return this.initialize((o=(i=t.sdkKey)!=null?i:t.mobileKey)!=null?o:t.clientSideId,this.options),[{getMetadata:()=>({name:"@launchdarkly/observability/hooks"}),afterIdentify:(u,c,s)=>{var l,p,f,v,y,g,m,E,S;for(const j of(f=(p=(l=this.observe)==null?void 0:l.getHooks)==null?void 0:p.call(l,t))!=null?f:[])(v=j.afterIdentify)==null||v.call(j,u,c,s);const N=_a(u.context);if((y=this.observe)==null||y.setLDContextKeyAttributes(N),s.status==="completed"){const j=Q(R({},N),{key:(E=(m=(g=this.options)==null?void 0:g.contextFriendlyName)==null?void 0:m.call(g,u.context))!=null?E:Gr(u.context),timeout:u.timeout,canonicalKey:Gr(u.context),[gf]:s.status});(S=this.observe)==null||S.recordLog("LD.identify","info",R(R({},a),j))}return c},afterEvaluation:(u,c,s)=>{var l,p,f,v,y;for(const E of(f=(p=(l=this.observe)==null?void 0:l.getHooks)==null?void 0:p.call(l,t))!=null?f:[])(v=E.afterEvaluation)==null||v.call(E,u,c,s);const g=R({[nf]:u.flagKey,[af]:JSON.stringify(s.value)},s.variationIndex?{[uf]:s.variationIndex}:{});if(s.reason)for(const E in va){const S=E,N=s.reason[S];N&&(g[va[S]]=N)}u.context&&(g[rf]=JSON.stringify(_a(u.context)),g[of]=Gr(u.context));const m=R(R({},a),g);return(y=this.observe)==null||y.startSpan(tf,E=>{E&&E.addEvent(J,m)}),c},afterTrack:u=>{var c,s,l,p,f,v,y,g,m;for(const S of(l=(s=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:s.call(c,t))!=null?l:[])(p=S.afterTrack)==null||p.call(S,u);if(!(((f=this.options)==null?void 0:f.productAnalytics)!==!1&&(typeof((v=this.options)==null?void 0:v.productAnalytics)!="object"||this.options.productAnalytics.trackEvents!==!1)))return;const E=R(Q(R(R({[wt]:window.location.href},(g=(y=this.observe)==null?void 0:y.getLDContextKeyAttributes())!=null?g:{}),a),{key:u.key,value:u.metricValue}),typeof u.data=="object"?u.data:{});(m=this.observe)==null||m.startSpan(df,S=>{S&&S.setAttributes(E)})}}]}}rt.default=YS,Object.defineProperties(rt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
310
310
  //# sourceMappingURL=index.umd.js.map