PageSourceSearch

https://flyleafpublishing.com/products/_next/static/chunks/155831ab-4fdfc93c3d7ac7e2.js

js flyleafpublishing.com collected 2026-09-24 11:10:33 UTC 243,654 bytes, 21 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[563],{94484:(t,e,r)=>{r.d(e,{B:()=>sD,C:()=>w,D:()=>o_,E:()=>k,F:()=>oD,J:()=>sJ,N:()=>uz,P:()=>sK,W:()=>uV,X:()=>oN,a:()=>oR,b:()=>U,c:()=>j,d:()=>S,e:()=>O,f:()=>sN,g:()=>uY,h:()=>uX,i:()=>en,j:()=>ox,k:()=>sU,l:()=>uJ,m:()=>ow,p:()=>T,r:()=>M,s:()=>sB});var n=r(2617);r(96931),r(90522);var o,i=r(40459),a=Object.defineProperty,s=Object.defineProperties,u=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,f=(t,e,r)=>e in t?a(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,h=(t,e)=>{for(var r in e||(e={}))l.call(e,r)&&f(t,r,e[r]);if(c)for(var r of c(e))p.call(e,r)&&f(t,r,e[r]);return t},d=(t,e)=>s(t,u(e)),y=(t,e)=>{var r={};for(var n in t)l.call(t,n)&&0>e.indexOf(n)&&(r[n]=t[n]);if(null!=t&&c)for(var n of c(t))0>e.indexOf(n)&&p.call(t,n)&&(r[n]=t[n]);return r},v=(t,e,r)=>f(t,"symbol"!=typeof e?e+"":e,r),m=(t,e,r)=>new Promise((n,o)=>{var i=t=>{try{s(r.next(t))}catch(t){o(t)}},a=t=>{try{s(r.throw(t))}catch(t){o(t)}},s=t=>t.done?n(t.value):Promise.resolve(t.value).then(i,a);s((r=r.apply(t,e)).next())}),_={exports:{}},g={exports:{}};!function(t,e){var r,i;n.W,r=function(t){var e=/(^|@)\S+:\d+/,r=/^\s*at .*(\S+:\d+|\(native\))/m,n=/^(eval@)?(\[native code])?$/;return{parse:function(t){if(void 0!==t.stacktrace||void 0!==t["opera#sourceloc"])return this.parseOpera(t);if(t.stack&&t.stack.match(r))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw Error("Cannot parse given Error object")},extractLocation:function(t){if(-1===t.indexOf(":"))return[t];var e=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,""));return[e[1],e[2]||void 0,e[3]||void 0]},parseV8OrIE:function(e){return e.stack.split(`
2`).filter(function(t){return!!t.match(r)},this).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:o.pop());return new t({functionName:o.join(" ")||void 0,fileName:["eval","<anonymous>"].indexOf(i[0])>-1?void 0:i[0],lineNumber:i[1],columnNumber:i[2],source:e})},this)},parseFFOrSafari:function(e){return e.stack.split(`
3`).filter(function(t){return!t.match(n)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})},this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf(`
4`)>-1&&t.message.split(`
5`).length>t.stacktrace.split(`
6`).length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split(`
7`),o=[],i=2,a=n.length;i<a;i+=2){var s=r.exec(n[i]);s&&o.push(new t({fileName:s[2],lineNumber:s[1],source:n[i]}))}return o},parseOpera10:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=e.stacktrace.split(`
8`),o=[],i=0,a=n.length;i<a;i+=2){var s=r.exec(n[i]);s&&o.push(new t({functionName:s[3]||void 0,fileName:s[2],lineNumber:s[1],source:n[i]}))}return o},parseOpera11:function(r){return r.stack.split(`
9`).filter(function(t){return!!t.match(e)&&!t.match(/^Error created at/)},this).map(function(e){var r,n=e.split("@"),o=this.extractLocation(n.pop()),i=n.shift()||"",a=i.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1")),new t({functionName:a,args:void 0===r||"[arguments not available]"===r?void 0:r.split(","),fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})},this)}}},t.exports=r((o||(o=1,n.W,i=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}
9var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function a(e){if(e)for(var r=0;r<i.length;r++)void 0!==e[i[r]]&&this["set"+t(i[r])](e[i[r]])}a.prototype={getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw TypeError("Args must be an Array");this.args=t},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(t){if(t instanceof a)this.evalOrigin=t;else if(t instanceof Object)this.evalOrigin=new a(t);else throw TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var t=this.getFileName()||"",e=this.getLineNumber()||"",r=this.getColumnNumber()||"",n=this.getFunctionName()||"";return this.getIsEval()?t?"[eval] ("+t+":"+e+":"+r+")":"[eval]:"+e+":"+r:n?n+" ("+t+":"+e+":"+r+")":t+":"+e+":"+r}},a.fromString=function(t){var e=t.indexOf("("),r=t.lastIndexOf(")"),n=t.substring(0,e),o=t.substring(e+1,r).split(","),i=t.substring(r+1);if(0===i.indexOf("@"))var s=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(i,""),u=s[1],c=s[2],l=s[3];return new a({functionName:n,args:o||void 0,fileName:u,lineNumber:c||void 0,columnNumber:l||void 0})};for(var s=0;s<r.length;s++)a.prototype["get"+t(r[s])]=e(r[s]),a.prototype["set"+t(r[s])]=function(t){return function(e){this[t]=!!e}}(r[s]);for(var u=0;u<n.length;u++)a.prototype["get"+t(n[u])]=e(n[u]),a.prototype["set"+t(n[u])]=function(t){return function(e){if(!(!isNaN(parseFloat(e))&&isFinite(e)))throw TypeError(t+" must be a Number");this[t]=Number(e)}}(n[u]);for(var c=0;c<o.length;c++)a.prototype["get"+t(o[c])]=e(o[c]),a.prototype["set"+t(o[c])]=function(t){return function(e){this[t]=String(e)}}(o[c]);return a},g.exports=i()),g.exports))}(_);var b=_.exports;let E=(0,n.X)(b);function T(t){try{return E.parse(t)}catch(t){try{return E.parse(Error())}catch(e){return console.warn("Highlight Warning: failed to parse error",{originalError:t,secondaryError:e}),[]}}}let S={level:[...n.A],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}};function w(t,e){let r;let o=e.logger;if(!o)return()=>{};r="string"==typeof o?window[o]:o;let i=[];if(e.level.includes("error")&&window){let r=r=>{let{message:o,error:i}=r,a=[];i&&(a=T(i));let s=[(0,n.Y)(o,e.stringifyOptions)];t({type:"Error",trace:a,time:Date.now(),value:s})};window.addEventListener("error",r),i.push(()=>{window&&window.removeEventListener("error",r)})}for(let o of e.level)i.push(function(r,o){return r[o]?(0,n.Z)(r,o,r=>(...n)=>{r.apply(this,n);try{t(O(o,e,...n))}catch(t){r("highlight logger error:",t,...n)}}):()=>{}}(r,o));return()=>{i.forEach(t=>t())}}function O(t,e,...r){return{type:t,trace:T(Error()),value:e.serializeConsoleAttributes?r.map(t=>"object"==typeof t?(0,n.Y)(t,e.stringifyOptions):t):r.filter(t=>"object"!=typeof t).map(t=>`${t}`),attributes:(0,n.Y)(r.filter(t=>"object"==typeof t).reduce((t,e)=>h(h({},t),e),{}),e.stringifyOptions),time:Date.now()}}let A={start:0,end:3},L={start:4,end:5},R={start:6,end:7},C={start:8,end:8},x={start:9,end:9},P={start:10,end:15};function N(t,e){let r="";for(let n=e.start;n<=e.end;n+=1)r+=t[n].toString(16).padStart(2,"0");return r}function M(){var t;return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():((t=function(){if(crypto&&crypto.getRandomValues){let t=new Uint8Array(16);return crypto.getRandomValues(t),[...t.values()]}let t=[];for(let e=0;e<16;e+=1)t.push(Math.floor(256*Math.random()));return t}())[C.start]=(128|t[C.start])&191,t[R.start]=15&t[R.start]|64,`${N(t,A)}-${N(t,L)}-${N(t,R)}-${N(t,C)}${N(t,x)}-${N(t,P)}`)}function I(t,e,r,o){var i,a,s,u;let c=null!=o?o:e,l=T(c),p={};e instanceof Error&&(e=e.message).cause&&(p={"exception.cause":e.cause});let f=D(l);t({error:c,event:(0,n.s)(e),type:"window.onerror",url:window.location.href,source:null!=r?r:"",lineNumber:null!=(i=f[0])&&i.lineNumber?null==(a=f[0])?void 0:a.lineNumber:0,columnNumber:null!=(s=f[0])&&s.columnNumber?null==(u=f[0])?void 0:u.columnNumber:0,stackTrace:f,timestamp:new Date().toISOString(),payload:p?(0,n.s)(p):void 0,id:M()})}let k=(t,{enablePromisePatch:e})=>
9{if("undefined"==typeof window)return()=>{};let r=window.onerror=(e,r,n,o,i)=>{I(t,e,r,i)},n=window.onunhandledrejection=e=>{if(e.reason){let r=e.promise;r.getStack?I(t,e.reason,e.type,r.getStack()):I(t,e.reason,e.type)}},o=window.Promise,i=class extends o{constructor(t){super(t),v(this,"promiseCreationError"),this.promiseCreationError=Error()}getStack(){return this.promiseCreationError}static shouldPatch(){let t=void 0===window.Zone;return e&&t}};return i.shouldPatch()&&(window.Promise=i),()=>{window.Promise=o,window.onunhandledrejection=n,window.onerror=r}},D=t=>{var e,r;if(0===t.length)return t;let n=t[0];return null!=(e=n.fileName)&&e.includes("highlight.run")||null!=(r=n.fileName)&&r.includes("highlight.io")||"new highlightPromise"===n.functionName?t.slice(1):t},U=['["\\"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}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],j=["websocket error",'\\"ResizeObserver loop'];var B="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},H="1.9.0",F=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,V=function(t){var e=new Set([t]),r=new Set,n=t.match(F);if(!n)return function(){return!1};var o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(null!=o.prerelease)return function(e){return e===t};function i(t){return r.add(t),!1}return function(t){if(e.has(t))return!0;if(r.has(t))return!1;var n=t.match(F);if(!n)return i(t);var a={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};return null!=a.prerelease||o.major!==a.major?i(t):0===o.major?o.minor===a.minor&&o.patch<=a.patch?(e.add(t),!0):i(t):o.minor<=a.minor?(e.add(t),!0):i(t)}}(H),G=Symbol.for("opentelemetry.js.api."+H.split(".")[0]);function z(t,e,r,n){void 0===n&&(n=!1);var o,i=B[G]=null!==(o=B[G])&&void 0!==o?o:{version:H};if(!n&&i[t]){var a=Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return r.error(a.stack||a.message),!1}if(i.version!==H){var a=Error("@opentelemetry/api: Registration of version v"+i.version+" for "+t+" does not match previously registered API v"+H);return r.error(a.stack||a.message),!1}return i[t]=e,r.debug("@opentelemetry/api: Registered a global for "+t+" v"+H+"."),!0}function X(t){var e,r,n=null===(e=B[G])||void 0===e?void 0:e.version;if(!(!n||!V(n)))return null===(r=B[G])||void 0===r?void 0:r[t]}function q(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+H+".");var r=B[G];r&&delete r[t]}var W=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},$=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},Y=function(){function t(t){this._namespace=t.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return J("debug",this._namespace,t)},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return J("error",this._namespace,t)},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return J("info",this._namespace,t)},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return J("warn",this._namespace,t)},t.prototype.verbose=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return J("verbose",this._namespace,t)},t}();function J(t,e,r){var n=X("diag");if(n)return r.unshift(e),n[t].apply(n,$([],W(r),!1))}!function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"}(tL||(tL={}));var Z=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},K=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},Q=function(){function t(){function t(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=X("diag");if(n)return n[t].apply(n,K([],Z(e),!1))}}var e=this;e.setLogger=function(t,r){if(void 0===r&&(r={logLevel:tL.INFO}),t===e){var n,o,i,a=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return e.error(null!==(n=a.stack)&&void 0!==n?n:a.message),!1}"number"==typeof r&&(r={logLevel:r});var s=X("diag"),u=function(t,e){function r(r,n){var o=e[r];return"function"==typeof o&&t>=n?o.bind(e):function(){}}return t<tL.NONE?t=tL.NONE:t>tL.ALL&&(t=tL.ALL),e=e||{},{error:r("error",tL.ERROR),warn:r("warn",tL.WARN),info:r("info",tL.INFO),debug:r("debug",tL.DEBUG),verbose
9:r("verbose",tL.VERBOSE)}}(null!==(o=r.logLevel)&&void 0!==o?o:tL.INFO,t);if(s&&!r.suppressOverrideMessage){var c=null!==(i=Error().stack)&&void 0!==i?i:"<failed to generate stacktrace>";s.warn("Current logger will be overwritten from "+c),u.warn("Current logger will overwrite one already registered from "+c)}return z("diag",u,e,!0)},e.disable=function(){q("diag",e)},e.createComponentLogger=function(t){return new Y(t)},e.verbose=t("verbose"),e.debug=t("debug"),e.info=t("info"),e.warn=t("warn"),e.error=t("error")}return t.instance=function(){return this._instance||(this._instance=new t),this._instance},t}(),tt=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},te=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},tr=function(){function t(t){this._entries=t?new Map(t):new Map}return t.prototype.getEntry=function(t){var e=this._entries.get(t);if(e)return Object.assign({},e)},t.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(t){var e=tt(t,2);return[e[0],e[1]]})},t.prototype.setEntry=function(e,r){var n=new t(this._entries);return n._entries.set(e,r),n},t.prototype.removeEntry=function(e){var r=new t(this._entries);return r._entries.delete(e),r},t.prototype.removeEntries=function(){for(var e,r,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var i=new t(this._entries);try{for(var a=te(n),s=a.next();!s.done;s=a.next()){var u=s.value;i._entries.delete(u)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return i},t.prototype.clear=function(){return new t},t}(),tn=Symbol("BaggageEntryMetadata"),to=Q.instance();function ti(t){return void 0===t&&(t={}),new tr(new Map(Object.entries(t)))}function ta(t){return Symbol.for(t)}var ts=new function t(e){var r=this;r._currentContext=e?new Map(e):new Map,r.getValue=function(t){return r._currentContext.get(t)},r.setValue=function(e,n){var o=new t(r._currentContext);return o._currentContext.set(e,n),o},r.deleteValue=function(e){var n=new t(r._currentContext);return n._currentContext.delete(e),n}},tu=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),tc=function(){function t(){}return t.prototype.createGauge=function(t,e){return tE},t.prototype.createHistogram=function(t,e){return tT},t.prototype.createCounter=function(t,e){return tb},t.prototype.createUpDownCounter=function(t,e){return tS},t.prototype.createObservableGauge=function(t,e){return tO},t.prototype.createObservableCounter=function(t,e){return tw},t.prototype.createObservableUpDownCounter=function(t,e){return tA},t.prototype.addBatchObservableCallback=function(t,e){},t.prototype.removeBatchObservableCallback=function(t){},t}(),tl=function(){},tp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tu(e,t),e.prototype.add=function(t,e){},e}(tl),tf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tu(e,t),e.prototype.add=function(t,e){},e}(tl),th=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tu(e,t),e.prototype.record=function(t,e){},e}(tl),td=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tu(e,t),e.prototype.record=function(t,e){},e}(tl),ty=function(){function t(){}return t.prototype.addCallback=function(t){},t.prototype.removeCallback=function(t){},t}(),tv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tu(e,t),e}(ty),tm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tu(e,t),e}(ty),t_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tu(e,t),e}(ty),tg=new tc,tb=new tp,tE=new th,tT=new td,tS=new tf,tw=new tv,tO=new tm,tA=new t_;!function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"}(tR||(tR={}));var tL,tR,tC,tx={get:function(t,e){if(null!=t)return t[e]},keys:function(t){return null==t?[]:Object.keys(t)}},tP={set:function(t,e,r){null!=t&&(t[e]=r)}},tN=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},tM=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},tI=function(){function t(){}return t.prototype.active=function(){return ts},t.prototype.with=function(t,e,r){for(var n=[],o=3;o<arguments.length;o++)n[o-3]=arguments[o];return e.call.apply(e,tM([r],tN(n),!1))},t.prototype.bind=function(t,e){return e},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t}(),tk=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},tD=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},tU="context",tj=new tI,tB=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalContextManager=function(t){return z(tU,t,Q.instance())},t.prototype.active=function(){return this._getContextManager().active()},t.prototype.with=function(t,e,r){for(var n,o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];return(n=this._getContextManager()).with.apply(n,tD([t,e,r],tk(o),!1))},t.prototype.bind=function(t,e){return this._getContextManager().bind(t,e)},t.prototype._getContextManager=function(){return X(tU)||tj},t.prototype.disable=function(){this._getContextManager().disable(),q(tU,Q.instance())},t}();!function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"}(tC||(tC={}));var tH="0000000000000000",tF="00000000000000000000000000000000",tV={traceId:tF,spanId:tH,traceFlags:tC.NONE},tG=function(){function t(t){void 0===t&&(t=tV),this._spanContext=t}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(t,e){return this},t.prototype.setAttributes=function(t){return this},t.prototype.addEvent=function(t,e){return this},t.prototype.addLink=function(t){return this},t.prototype.addLinks=function(t){return this},t.prototype.setStatus=function(t){return this},t.prototype.updateName=function(t){return this},t.prototype.end=function(t){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(t,e){},t}(),tz=ta("OpenTelemetry Context Key SPAN");function tX(t){return t.getValue(tz)||void 0}function tq(){return tX(tB.getInstance().active())}function tW(t,e){return t.setValue(tz,e)}
9function t$(t){return t.deleteValue(tz)}function tY(t,e){return tW(t,new tG(e))}function tJ(t){var e;return null===(e=tX(t))||void 0===e?void 0:e.spanContext()}var tZ=/^([0-9a-f]{32})$/i,tK=/^[0-9a-f]{16}$/i;function tQ(t){return tZ.test(t)&&t!==tF}function t0(t){var e;return tQ(t.traceId)&&(e=t.spanId,tK.test(e)&&e!==tH)}function t1(t){return new tG(t)}var t2,t3=tB.getInstance(),t4=function(){function t(){}return t.prototype.startSpan=function(t,e,r){if(void 0===r&&(r=t3.active()),null!=e&&e.root)return new tG;var n=r&&tJ(r);return"object"==typeof n&&"string"==typeof n.spanId&&"string"==typeof n.traceId&&"number"==typeof n.traceFlags&&t0(n)?new tG(n):new tG},t.prototype.startActiveSpan=function(t,e,r,n){var o,i,a;if(!(arguments.length<2)){2==arguments.length?a=e:3==arguments.length?(o=e,a=r):(o=e,i=r,a=n);var s=null!=i?i:t3.active(),u=this.startSpan(t,o,s),c=tW(s,u);return t3.with(c,a,void 0,u)}},t}(),t5=new t4,t6=function(){function t(t,e,r,n){this._provider=t,this.name=e,this.version=r,this.options=n}return t.prototype.startSpan=function(t,e,r){return this._getTracer().startSpan(t,e,r)},t.prototype.startActiveSpan=function(t,e,r,n){var o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)},t.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):t5},t}(),t8=new(function(){function t(){}return t.prototype.getTracer=function(t,e,r){return new t4},t}()),t9=function(){function t(){}return t.prototype.getTracer=function(t,e,r){var n;return null!==(n=this.getDelegateTracer(t,e,r))&&void 0!==n?n:new t6(this,t,e,r)},t.prototype.getDelegate=function(){var t;return null!==(t=this._delegate)&&void 0!==t?t:t8},t.prototype.setDelegate=function(t){this._delegate=t},t.prototype.getDelegateTracer=function(t,e,r){var n;return null===(n=this._delegate)||void 0===n?void 0:n.getTracer(t,e,r)},t}();!function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(t2||(t2={})),function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"}(eB||(eB={})),function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"}(eH||(eH={}));var t7=tB.getInstance(),et=Q.instance(),ee=new(function(){function t(){}return t.prototype.getMeter=function(t,e,r){return tg},t}()),er="metrics",en=(function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalMeterProvider=function(t){return z(er,t,Q.instance())},t.prototype.getMeterProvider=function(){return X(er)||ee},t.prototype.getMeter=function(t,e,r){return this.getMeterProvider().getMeter(t,e,r)},t.prototype.disable=function(){q(er,Q.instance())},t})().getInstance(),eo=function(){function t(){}return t.prototype.inject=function(t,e){},t.prototype.extract=function(t,e){return t},t.prototype.fields=function(){return[]},t}(),ei=ta("OpenTelemetry Baggage Key");function ea(t){return t.getValue(ei)||void 0}function es(){return ea(tB.getInstance().active())}function eu(t,e){return t.setValue(ei,e)}function ec(t){return t.deleteValue(ei)}var el="propagation",ep=new eo,ef=(function(){function t(){this.createBaggage=ti,this.getBaggage=ea,this.getActiveBaggage=es,this.setBaggage=eu,this.deleteBaggage=ec}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalPropagator=function(t){return z(el,t,Q.instance())},t.prototype.inject=function(t,e,r){return void 0===r&&(r=tP),this._getGlobalPropagator().inject(t,e,r)},t.prototype.extract=function(t,e,r){return void 0===r&&(r=tx),this._getGlobalPropagator().extract(t,e,r)},t.prototype.fields=function(){return this._getGlobalPropagator().fields()},t.prototype.disable=function(){q(el,Q.instance())},t.prototype._getGlobalPropagator=function(){return X(el)||ep},t})().getInstance(),eh="trace",ed=(function(){function t(){this._proxyTracerProvider=new t9,this.wrapSpanContext=t1,this.isSpanContextValid=t0,this.deleteSpan=t$,this.get
9Span=tX,this.getActiveSpan=tq,this.getSpanContext=tJ,this.setSpan=tW,this.setSpanContext=tY}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalTracerProvider=function(t){var e=z(eh,this._proxyTracerProvider,Q.instance());return e&&this._proxyTracerProvider.setDelegate(t),e},t.prototype.getTracerProvider=function(){return X(eh)||this._proxyTracerProvider},t.prototype.getTracer=function(t,e){return this.getTracerProvider().getTracer(t,e)},t.prototype.disable=function(){q(eh,Q.instance()),this._proxyTracerProvider=new t9},t})().getInstance(),ey=ta("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function ev(t){return t.setValue(ey,!0)}function em(t){return!0===t.getValue(ey)}var e_="baggage",eg=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},eb=function(){function t(){}return t.prototype.inject=function(t,e,r){var n=ef.getBaggage(t);if(!(!n||em(t))){var o=n.getAllEntries().map(function(t){var e=eg(t,2),r=e[0],n=e[1],o=encodeURIComponent(r)+"="+encodeURIComponent(n.value);return void 0!==n.metadata&&(o+=";"+n.metadata.toString()),o}).filter(function(t){return t.length<=4096}).slice(0,180).reduce(function(t,e){var r=""+t+(""!==t?",":"")+e;return r.length>8192?t:r},"");o.length>0&&r.set(e,e_,o)}},t.prototype.extract=function(t,e,r){var n=r.get(e,e_),o=Array.isArray(n)?n.join(","):n;if(!o)return t;var i={};return 0===o.length?t:(o.split(",").forEach(function(t){var e=function(t){var e=t.split(";");if(!(e.length<=0)){var r=e.shift();if(r){var n=r.indexOf("=");if(!(n<=0)){var o,i,a=decodeURIComponent(r.substring(0,n).trim()),s=decodeURIComponent(r.substring(n+1).trim());return e.length>0&&("string"!=typeof(o=e.join(";"))&&(to.error("Cannot create baggage metadata from unknown type: "+typeof o),o=""),i={__TYPE__:tn,toString:function(){return o}}),{key:a,value:s,metadata:i}}}}}(t);if(e){var r={value:e.value};e.metadata&&(r.metadata=e.metadata),i[e.key]=r}}),0===Object.entries(i).length?t:ef.setBaggage(t,ef.createBaggage(i)))},t.prototype.fields=function(){return[e_]},t}(),eE=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},eT=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};function eS(t){var e,r,n={};if("object"!=typeof t||null==t)return n;try{for(var o=eE(Object.entries(t)),i=o.next();!i.done;i=o.next()){var a=eT(i.value,2),s=a[0],u=a[1];if("string"!=typeof s||!(s.length>0)){et.warn("Invalid attribute key: "+s);continue}if(!ew(u)){et.warn("Invalid attribute value set for key: "+s);continue}Array.isArray(u)?n[s]=u.slice():n[s]=u}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n}function ew(t){return null==t||(Array.isArray(t)?function(t){var e,r,n;try{for(var o=eE(t),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){if(!n){if(eO(a)){n=typeof a;continue}return!1}if(typeof a!==n)return!1}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return!0}(t):eO(t))}function eO(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}var eA=function(t){et.error("string"==typeof t?t:JSON.stringify(function(t){for(var e={},r=t;null!==r;)Object.getOwnPropertyNames(r).forEach(function(t){if(!e[t]){var n=r[t];n&&(e[t]=String(n))}}),r=Object.getPrototypeOf(r);return e}(t)))};function eL(t){try{eA(t)}catch(t){}}!function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"}(eF||(eF={}));var eR=["OTEL_SDK_DISABLED"],eC=["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"],ex=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"],eP=1/0,eN={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/s
9pans",OTEL_LOG_LEVEL:tL.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:eP,OTEL_ATTRIBUTE_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:eP,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:128,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:eP,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:128,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:128,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:eF.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:[]},eM={ALL:tL.ALL,VERBOSE:tL.VERBOSE,DEBUG:tL.DEBUG,INFO:tL.INFO,WARN:tL.WARN,ERROR:tL.ERROR,NONE:tL.NONE};function eI(t){var e={};for(var r in eN)if("OTEL_LOG_LEVEL"===r)!function(t,e,r){var n=r[t];if("string"==typeof n){var o=eM[n.toUpperCase()];null!=o&&(e[t]=o)}}(r,e,t);else if(eR.indexOf(r)>-1)!function(t,e,r){if(void 0!==r[t]){var n=String(r[t]);e[t]="true"===n.toLowerCase()}}(r,e,t);else if(eC.indexOf(r)>-1)!function(t,e,r,n,o){if(void 0===n&&(n=-1/0),void 0===o&&(o=1/0),void 0!==r[t]){var i=Number(r[t]);isNaN(i)||(i<n?e[t]=n:i>o?e[t]=o:e[t]=i)}}(r,e,t);else if(ex.indexOf(r)>-1)!function(t,e,r,n){void 0===n&&(n=",");var o=r[t];"string"==typeof o&&(e[t]=o.split(n).map(function(t){return t.trim()}))}(r,e,t);else{var n=t[r];null!=n&&(e[r]=String(n))}return e}var ek="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{};function eD(){return Object.assign({},eN,eI(ek))}function eU(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function ej(t){for(var e=new Uint8Array(t.length/2),r=0,n=0;n<t.length;n+=2){var o=eU(t.charCodeAt(n)),i=eU(t.charCodeAt(n+1));e[r++]=o<<4|i}return e}var eB,eH,eF,eV,eG=performance,ez=((eV={})["telemetry.sdk.name"]="opentelemetry",eV["process.runtime.name"]="browser",eV["telemetry.sdk.language"]="webjs",eV["telemetry.sdk.version"]="1.30.1",eV);function eX(t){return[Math.trunc(t/1e3),Math.round(t%1e3*1e6)]}function eq(){var t=eG.timeOrigin;return"number"!=typeof t&&(t=eG.timing&&eG.timing.fetchStart),t}function eW(t){return eQ(eX(eq()),eX("number"==typeof t?t:eG.now()))}function e$(t){if(eZ(t))return t;if("number"==typeof t)return t<eq()?eW(t):eX(t);if(t instanceof Date)return eX(t.getTime());throw TypeError("Invalid input type")}function eY(t){return 1e9*t[0]+t[1]}function eJ(t){return 1e6*t[0]+t[1]/1e3}function eZ(t){return Array.isArray(t)&&2===t.length&&"number"==typeof t[0]&&"number"==typeof t[1]}function eK(t){return eZ(t)||"number"==typeof t||t instanceof Date}function eQ(t,e){var r=[t[0]+e[0],t[1]+e[1]];return r[1]>=1e9&&(r[1]-=1e9,r[0]+=1),r}!function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"}(rX||(rX={}));var e0=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},e1=function(){function t(t){var e;void 0===t&&(t={}),this._propagators=null!==(e=t.propagators)&&void 0!==e?e:[],this._fields=Array.from(new Set(this._propagators.map(function(t){return"function"==typeof t.fields?t.f
9ields():[]}).reduce(function(t,e){return t.concat(e)},[])))}return t.prototype.inject=function(t,e,r){var n,o;try{for(var i=e0(this._propagators),a=i.next();!a.done;a=i.next()){var s=a.value;try{s.inject(t,e,r)}catch(t){et.warn("Failed to inject with "+s.constructor.name+". Err: "+t.message)}}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}},t.prototype.extract=function(t,e,r){return this._propagators.reduce(function(t,n){try{return n.extract(t,e,r)}catch(t){et.warn("Failed to extract with "+n.constructor.name+". Err: "+t.message)}return t},t)},t.prototype.fields=function(){return this._fields.slice()},t}(),e2="[_0-9a-z-*/]",e3=RegExp("^(?:[a-z]"+e2+"{0,255}|"+("[a-z0-9]"+e2)+"{0,240}@[a-z]"+e2+"{0,13})$"),e4=/^[ -~]{0,255}[!-~]$/,e5=/,|=/,e6=function(){function t(t){this._internalState=new Map,t&&this._parse(t)}return t.prototype.set=function(t,e){var r=this._clone();return r._internalState.has(t)&&r._internalState.delete(t),r._internalState.set(t,e),r},t.prototype.unset=function(t){var e=this._clone();return e._internalState.delete(t),e},t.prototype.get=function(t){return this._internalState.get(t)},t.prototype.serialize=function(){var t=this;return this._keys().reduce(function(e,r){return e.push(r+"="+t.get(r)),e},[]).join(",")},t.prototype._parse=function(t){t.length>512||(this._internalState=t.split(",").reverse().reduce(function(t,e){var r=e.trim(),n=r.indexOf("=");if(-1!==n){var o=r.slice(0,n),i=r.slice(n+1,e.length);e3.test(o)&&e4.test(i)&&!e5.test(i)&&t.set(o,i)}return t},new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t}(),e8="traceparent",e9="tracestate",e7=RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$"),rt=function(){function t(){}return t.prototype.inject=function(t,e,r){var n=ed.getSpanContext(t);if(!(!n||em(t)||!t0(n))){var o="00-"+n.traceId+"-"+n.spanId+"-0"+Number(n.traceFlags||tC.NONE).toString(16);r.set(e,e8,o),n.traceState&&r.set(e,e9,n.traceState.serialize())}},t.prototype.extract=function(t,e,r){var n,o=r.get(e,e8);if(!o)return t;var i=Array.isArray(o)?o[0]:o;if("string"!=typeof i)return t;var a=(n=e7.exec(i))&&("00"!==n[1]||!n[5])?{traceId:n[2],spanId:n[3],traceFlags:parseInt(n[4],16)}:null;if(!a)return t;a.isRemote=!0;var s=r.get(e,e9);if(s){var u=Array.isArray(s)?s.join(","):s;a.traceState=new e6("string"==typeof u?u:void 0)}return ed.setSpanContext(t,a)},t.prototype.fields=function(){return[e8,e9]},t}(),re=Function.prototype.toString,rr=re.call(Object),rn=(rG=Object.getPrototypeOf,rz=Object,function(t){return rG(rz(t))}),ro=Object.prototype,ri=ro.hasOwnProperty,ra=Symbol?Symbol.toStringTag:void 0,rs=ro.toString;function ru(t){if(!(null!=t&&"object"==typeof t)||"[object Object]"!==(null==t?void 0===t?"[object Undefined]":"[object Null]":ra&&ra in Object(t)?function(t){var e=ri.call(t,ra),r=t[ra],n=!1;try{t[ra]=void 0,n=!0}catch(t){}var o=rs.call(t);return n&&(e?t[ra]=r:delete t[ra]),o}(t):rs.call(t)))return!1;var e=rn(t);if(null===e)return!0;var r=ri.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&re.call(r)===rr}function rc(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=t.shift(),n=new WeakMap;t.length>0;)r=function t(e,r,n,o){if(void 0===n&&(n=0),!(n>20)){if(n++,ry(e)||ry(r)||rh(r))i=rl(r);else if(rf(e)){if(i=e.slice(),rf(r))for(var i,a=0,s=r.length;a<s;a++)i.push(rl(r[a]));else if(rd(r))for(var u=Object.keys(r),a=0,s=u.length;a<s;a++){var c=u[a];i[c]=rl(r[c])}}else if(rd(e)){if(rd(r)){if(!ru(e)||!ru(r))return r;i=Object.assign({},e);for(var u=Object.keys(r),a=0,s=u.length;a<s;a++){var c=u[a],l=r[c];if(ry(l))void 0===l?delete i[c]:i[c]=l;else{var p=i[c];if(rp(e,c,o)||rp(r,c,o))delete i[c];else{if(rd(p)&&rd(l)){var f=o.get(p)||[],h=o.get(l)||[];f.push({obj:e,key:c}),h.push({obj:r,key:c}),o.set(p,f),o.set(l,h)}i[c]=t(i[c],l,n,o)}}}}else i=r}return i}}(r,t.shift(),0,n);return r}function rl(t){return rf(t)?t.slice():t}function rp(t,e,r){for(var n=r.get(t[e])||[],o=0,i=n.length;o<i;o++){var a=n[o];if(a.key===e&&a.obj===t)return!0}return!1}function rf(t){return Array.isArray(t)}function rh(t){return"function"==typeof t}function rd(t){return!ry(t)&&!rf(t)&&!rh(t)&&"object"==typeof t}function ry(t){return"string"==typeof t||"number"==typeof t||"boolean"==typeof t||void 0===t||t instanceof Date||t instanceof RegExp||null===t}var rv=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function rm(t,e){return"string"==typeof e?t===e:!!t.match(e)}function r_(t,e){var r,n;if(!e)return!1;try{for(var o=rv(e),i=o.next();!i.done;i=o.next()){var a=i.value;if(rm(t,a))return!0}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!1}var rg=function(){function t(){var t=this;this._promise=new Promise(function(e,r){t._resolve=e,t._reject=r})}return Object.defineProperty(t.prototype,"promise",{get:function(){return this._promise}
9,enumerable:!1,configurable:!0}),t.prototype.resolve=function(t){this._resolve(t)},t.prototype.reject=function(t){this._reject(t)},t}(),rb=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},rE=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},rT=function(){function t(t,e){this._callback=t,this._that=e,this._isCalled=!1,this._deferred=new rg}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var t,e=this,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((t=this._callback).call.apply(t,rE([this._that],rb(r),!1))).then(function(t){return e._deferred.resolve(t)},function(t){return e._deferred.reject(t)})}catch(t){this._deferred.reject(t)}}return this._deferred.promise},t}(),rS={_export:function(t,e){return new Promise(function(r){t7.with(ev(t7.active()),function(){t.export(e,function(t){r(t)})})})}},rw=function(){function t(){}return t.prototype.emit=function(t){},t}(),rO=new rw,rA=new(function(){function t(){}return t.prototype.getLogger=function(t,e,r){return new rw},t}()),rL=function(){function t(t,e,r,n){this._provider=t,this.name=e,this.version=r,this.options=n}return t.prototype.emit=function(t){this._getLogger().emit(t)},t.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):rO},t}(),rR=function(){function t(){}return t.prototype.getLogger=function(t,e,r){var n;return null!==(n=this.getDelegateLogger(t,e,r))&&void 0!==n?n:new rL(this,t,e,r)},t.prototype.getDelegate=function(){var t;return null!==(t=this._delegate)&&void 0!==t?t:rA},t.prototype.setDelegate=function(t){this._delegate=t},t.prototype.getDelegateLogger=function(t,e,r){var n;return null===(n=this._delegate)||void 0===n?void 0:n.getLogger(t,e,r)},t}(),rC="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},rx=Symbol.for("io.opentelemetry.js.api.logs"),rP=(function(){function t(){this._proxyLoggerProvider=new rR}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalLoggerProvider=function(t){return rC[rx]?this.getLoggerProvider():(rC[rx]=function(e){return 1===e?t:rA},this._proxyLoggerProvider.setDelegate(t),t)},t.prototype.getLoggerProvider=function(){var t,e;return null!==(e=null===(t=rC[rx])||void 0===t?void 0:t.call(rC,1))&&void 0!==e?e:this._proxyLoggerProvider},t.prototype.getLogger=function(t,e,r){return this.getLoggerProvider().getLogger(t,e,r)},t.prototype.disable=function(){delete rC[rx],this._proxyLoggerProvider=new rR},t})().getInstance();function rN(t){return"function"==typeof t}var rM=console.error.bind(console);function rI(t,e,r){var n=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:n,writable:!0,value:r})}function rk(t){t&&t.logger&&(rN(t.logger)?rM=t.logger:rM("new logger isn't a function, not replacing"))}function rD(t,e,r){if(!t||!t[e]){rM("no original function "+e+" to wrap");return}if(!r){rM("no wrapper function"),rM(Error().stack);return}if(!rN(t[e])||!rN(r)){rM("original object and wrapper must be functions");return}var n=t[e],o=r(n,e);return rI(o,"__original",n),rI(o,"__unwrap",function(){t[e]===o&&rI(t,e,n)}),rI(o,"__wrapped",!0),rI(t,e,o),o}function rU(t,e){if(!t||!t[e]){rM("no function to unwrap."),rM(Error().stack);return}if(t[e].__unwrap)return t[e].__unwrap();rM("no original to unwrap to -- has "+e+" already been unwrapped?")}rk.wrap=rD,rk.massWrap=function(t,e,r){if(t)Array.isArray(t)||(t=[t]);else{rM("must provide one or more modules to patch"),rM(Error().stack);return}if(!(e&&Array.isArray(e))){rM("must provide one or more functions to wrap on modules");return}t.forEach(function(t){e.forEach(function(e){rD(t,e,r)})})},rk.unwrap=rU,rk.massUnwrap=function(t,e){if(t)Array.isArray(t)||(t=[t]);else{rM("must provide one or more modules to patch"),rM(Error().stack);return}if(!(e&&Array.isArray(e))){rM("must provide one or more functions to unwrap on modules");return}t.forEach(function(t){e.forEach(function(e){rU(t,e)})})};var rj=function(){return(rj=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},rB=function(){function t(t,e,r){this.instrumentationName=t,this.instrumentationVersion=e,this._config={},this._wrap=rk.wrap,this._unwrap=rk.unwrap,this._massWrap=rk.massWrap,this._massUnwrap=rk.massUnwrap,this.setConfig(r),this._diag=et.createComponentLogger({namespace:t}),this._tracer=ed.getTracer(t,e),this._meter=en.getMeter(t,e),this._logger=rP.getLogger(t,e),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter}
9,enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var t,e=null!==(t=this.init())&&void 0!==t?t:[];return Array.isArray(e)?e:[e]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(t){this._config=rj({enabled:!0},t)},t.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(t,e,r,n){if(t)try{t(r,n)}catch(t){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:e},t)}},t}(),rH=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),rF=function(t){function e(e,r,n){var o=t.call(this,e,r,n)||this;return o._config.enabled&&o.enable(),o}return rH(e,t),e}(rB);function rV(t){return"function"==typeof t&&"function"==typeof t.__original&&"function"==typeof t.__unwrap&&!0===t.__wrapped}var rG,rz,rX,rq,rW="exception.type",r$="exception.message",rY=function(){return(rY=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},rJ=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},rZ=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},rK=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},rQ=function(){function t(t,e,r,n,o,i,a,s,u,c){void 0===a&&(a=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:eH.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=r,this._spanContext=n,this.parentSpanId=i,this.kind=o,this.links=a;var l=Date.now();this._performanceStartTime=eG.now(),this._performanceOffset=l-(this._performanceStartTime+eq()),this._startTimeProvided=null!=s,this.startTime=this._getTime(null!=s?s:l),this.resource=t.resource,this.instrumentationLibrary=t.instrumentationLibrary,this._spanLimits=t.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,null!=c&&this.setAttributes(c),this._spanProcessor=t.getActiveSpanProcessor(),this._spanProcessor.onStart(this,e)}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(t,e){return null==e||this._isSpanEnded()||(0===t.length?et.warn("Invalid attribute key: "+t):ew(e)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?this._droppedAttributesCount++:this.attributes[t]=this._truncateToSize(e):et.w
9arn("Invalid attribute value set for key: "+t)),this},t.prototype.setAttributes=function(t){var e,r;try{for(var n=rJ(Object.entries(t)),o=n.next();!o.done;o=n.next()){var i=rZ(o.value,2),a=i[0],s=i[1];this.setAttribute(a,s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return this},t.prototype.addEvent=function(t,e,r){if(this._isSpanEnded())return this;if(0===this._spanLimits.eventCountLimit)return et.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(0===this._droppedEventsCount&&et.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),eK(e)&&(eK(r)||(r=e),e=void 0);var n=eS(e);return this.events.push({name:t,attributes:n,time:this._getTime(r),droppedAttributesCount:0}),this},t.prototype.addLink=function(t){return this.links.push(t),this},t.prototype.addLinks=function(t){var e;return(e=this.links).push.apply(e,rK([],rZ(t),!1)),this},t.prototype.setStatus=function(t){return this._isSpanEnded()||(this.status=rY({},t),null!=this.status.message&&"string"!=typeof t.message&&(et.warn("Dropping invalid status.message of type '"+typeof t.message+"', expected 'string'"),delete this.status.message)),this},t.prototype.updateName=function(t){return this._isSpanEnded()||(this.name=t),this},t.prototype.end=function(t){var e,r,n,o;if(this._isSpanEnded()){et.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=(e=this.startTime,n=(r=this.endTime)[0]-e[0],(o=r[1]-e[1])<0&&(n-=1,o+=1e9),[n,o]),this._duration[0]<0&&(et.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&&et.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},t.prototype._getTime=function(t){if("number"==typeof t&&t<=eG.now())return eW(t+this._performanceOffset);if("number"==typeof t)return eX(t);if(t instanceof Date)return eX(t.getTime());if(eZ(t))return t;if(this._startTimeProvided)return eX(Date.now());var e=eG.now()-this._performanceStartTime;return eQ(this.startTime,eX(e))},t.prototype.isRecording=function(){return!1===this._ended},t.prototype.recordException=function(t,e){var r={};"string"==typeof t?r[r$]=t:t&&(t.code?r[rW]=t.code.toString():t.name&&(r[rW]=t.name),t.message&&(r[r$]=t.message),t.stack&&(r["exception.stacktrace"]=t.stack)),r[rW]||r[r$]?this.addEvent("exception",r,e):et.warn("Failed to record an exception "+t)},Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),t.prototype._isSpanEnded=function(){return this._ended&&et.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(t,e){return t.length<=e?t:t.substring(0,e)},t.prototype._truncateToSize=function(t){var e=this,r=this._attributeValueLengthLimit;return r<=0?(et.warn("Attribute value limit must be positive, got "+r),t):"string"==typeof t?this._truncateToLimitUtil(t,r):Array.isArray(t)?t.map(function(t){return"string"==typeof t?e._truncateToLimitUtil(t,r):t}):t},t}();!function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(rq||(rq={}));var r0=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:rq.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}(),r1=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:rq.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}(),r2=function(){function t(t){var e,r,n,o;this._root=t.root,this._root||(eL(Error("ParentBasedSampler must have a root sampler configured")),this._root=new r1),this._remoteParentSampled=null!==(e=t.remoteParentSampled)&&void 0!==e?e:new r1,this._remoteParentNotSampled=null!==(r=t.remoteParentNotSampled)&&void 0!==r?r:new r0,this._localParentSampled=null!==(n=t.localParentSampled)&&void 0!==n?n:new r1,this._localParentNotSampled=null!==(o=t.localParentNotSampled)&&void 0!==o?o:new r0}return t.prototype.shouldSample=function(t,e,r,n,o,i){var a=ed.getSpanContext(t);return a&&t0(a)?a.isRemote?a.traceFlags&tC.SAMPLED?this._remoteParentSampled.shouldSample(t,e,r,n,o,i):this._remoteParentNotSampled.shouldSample(t,e,r,n,o,i):a.traceFlags&tC.SAMPLED?this._localParentSampled.shouldSample(t,e,r,n,o,i):this._localParentNotSampled.shouldSample(t,e,r,n,o,i):this._root.shouldSample(t,e,r,n,o,i)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t}(),r3=function(){function t(t){void 0===t&&(t=0),this._ratio=t,this._ratio=this._normalize(t),this._upperBound=Math.floor(0xffffffff*this._ratio)}return t.prototype.shouldSample=function(t,e){return{decision:tQ(e)&&this._accumulate(e)<this._upperBound?rq.RECORD_AND_SAMPLED:rq.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(t){return"number"!=typeof t||isNaN(t)?0:t>=1?1:t<=0?0:t},t.prototype._accumulate=function(t){for(var e=0,r=0;r<t.length/8;r++){var n=8*r;e=(e^parseInt(t.slice(n,n+8),16))>>>0}return e},t}(),r4=eF.AlwaysOn;function r5(){var t=eD();return{sampler:r6(t),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:t.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:t.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:t.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}
9,mergeResourceWithDefaults:!0}}function r6(t){switch(void 0===t&&(t=eD()),t.OTEL_TRACES_SAMPLER){case eF.AlwaysOn:return new r1;case eF.AlwaysOff:return new r0;case eF.ParentBasedAlwaysOn:return new r2({root:new r1});case eF.ParentBasedAlwaysOff:return new r2({root:new r0});case eF.TraceIdRatio:return new r3(r8(t));case eF.ParentBasedTraceIdRatio:return new r2({root:new r3(r8(t))});default:return et.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+r4+'".'),new r1}}function r8(t){if(void 0===t.OTEL_TRACES_SAMPLER_ARG||""===t.OTEL_TRACES_SAMPLER_ARG)return et.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to 1."),1;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(et.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to 1."),1):e<0||e>1?(et.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to 1."),1):e}var r9=function(){function t(t,e){this._exporter=t,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var r=eD();this._maxExportBatchSize="number"==typeof(null==e?void 0:e.maxExportBatchSize)?e.maxExportBatchSize:r.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==e?void 0:e.maxQueueSize)?e.maxQueueSize:r.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==e?void 0:e.scheduledDelayMillis)?e.scheduledDelayMillis:r.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==e?void 0:e.exportTimeoutMillis)?e.exportTimeoutMillis:r.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new rT(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(et.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(t,e){},t.prototype.onEnd=function(t){this._shutdownOnce.isCalled||t.spanContext().traceFlags&tC.SAMPLED&&this._addToBuffer(t)},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.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()})},t.prototype._addToBuffer=function(t){if(this._finishedSpans.length>=this._maxQueueSize){0===this._droppedSpansCount&&et.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(et.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(t),this._maybeStartTimer()},t.prototype._flushAll=function(){var t=this;return new Promise(function(e,r){for(var n=[],o=Math.ceil(t._finishedSpans.length/t._maxExportBatchSize),i=0;i<o;i++)n.push(t._flushOneBatch());Promise.all(n).then(function(){e()}).catch(r)})},t.prototype._flushOneBatch=function(){var t=this;return this._clearTimer(),0===this._finishedSpans.length?Promise.resolve():new Promise(function(e,r){var n=setTimeout(function(){r(Error("Timeout"))},t._exportTimeoutMillis);t7.with(ev(t7.active()),function(){var o;t._finishedSpans.length<=t._maxExportBatchSize?(o=t._finishedSpans,t._finishedSpans=[]):o=t._finishedSpans.splice(0,t._maxExportBatchSize);for(var i=function(){return t._exporter.export(o,function(t){var o;clearTimeout(n),t.code===rX.SUCCESS?e():r(null!==(o=t.error)&&void 0!==o?o:Error("BatchSpanProcessor: span export failed"))})},a=null,s=0,u=o.length;s<u;s++){var c=o[s];c.resource.asyncAttributesPending&&c.resource.waitForAsyncAttributes&&(null!=a||(a=[]),a.push(c.resource.waitForAsyncAttributes()))}null===a?i():Promise.all(a).then(i,function(t){eL(t),r(t)})})})},t.prototype._maybeStartTimer=function(){var t=this;if(!this._isExporting){var e=function(){t._isExporting=!0,t._flushOneBatch().finally(function(){t._isExporting=!1,t._finishedSpans.length>0&&(t._clearTimer(),t._maybeStartTimer())}).catch(function(e){t._isExporting=!1,eL(e)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();void 0===this._timer&&(this._timer=setTimeout(function(){return e()},this._scheduledDelayMillis))}},t.prototype._clearTimer=function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)},t}(),r7=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]}
9)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),nt=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.onInit(r),n}return r7(e,t),e.prototype.onInit=function(t){var e=this;(null==t?void 0:t.disableAutoFlushOnDocumentHide)!==!0&&"undefined"!=typeof document&&(this._visibilityChangeListener=function(){"hidden"===document.visibilityState&&e.forceFlush().catch(function(t){eL(t)})},this._pageHideListener=function(){e.forceFlush().catch(function(t){eL(t)})},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},e.prototype.onShutdown=function(){"undefined"!=typeof document&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},e}(r9),ne=function(){this.generateTraceId=nn(16),this.generateSpanId=nn(8)},nr=Array(32);function nn(t){return function(){for(var e=0;e<2*t;e++)nr[e]=Math.floor(16*Math.random())+48,nr[e]>=58&&(nr[e]+=39);return String.fromCharCode.apply(null,nr.slice(0,2*t))}}var no,ni=function(){function t(t,e,r){this._tracerProvider=r;var n,o,i,a=(n={sampler:r6()},(i=Object.assign({},o=r5(),n,e)).generalLimits=Object.assign({},o.generalLimits,e.generalLimits||{}),i.spanLimits=Object.assign({},o.spanLimits,e.spanLimits||{}),i);this._sampler=a.sampler,this._generalLimits=a.generalLimits,this._spanLimits=a.spanLimits,this._idGenerator=e.idGenerator||new ne,this.resource=r.resource,this.instrumentationLibrary=t}return t.prototype.startSpan=function(t,e,r){void 0===e&&(e={}),void 0===r&&(r=t7.active()),e.root&&(r=ed.deleteSpan(r));var n=ed.getSpan(r);if(em(r)){et.debug("Instrumentation suppressed, returning Noop Span");var o=ed.wrapSpanContext(tV);return o}var i,a,s,u,c,l,p=null==n?void 0:n.spanContext(),f=this._idGenerator.generateSpanId();p&&ed.isSpanContextValid(p)?(u=p.traceId,c=p.traceState,l=p.spanId):u=this._idGenerator.generateTraceId();var h=null!==(i=e.kind)&&void 0!==i?i:eB.INTERNAL,d=(null!==(a=e.links)&&void 0!==a?a:[]).map(function(t){return{context:t.context,attributes:eS(t.attributes)}}),y=eS(e.attributes),v=this._sampler.shouldSample(r,u,t,h,y,d);c=null!==(s=v.traceState)&&void 0!==s?s:c;var m={traceId:u,spanId:f,traceFlags:v.decision===t2.RECORD_AND_SAMPLED?tC.SAMPLED:tC.NONE,traceState:c};if(v.decision===t2.NOT_RECORD){et.debug("Recording is off, propagating context in a non-recording span");var o=ed.wrapSpanContext(m);return o}var _=eS(Object.assign(y,v.attributes));return new rQ(this,r,t,m,h,l,d,e.startTime,void 0,_)},t.prototype.startActiveSpan=function(t,e,r,n){var o,i,a;if(!(arguments.length<2)){2==arguments.length?a=e:3==arguments.length?(o=e,a=r):(o=e,i=r,a=n);var s=null!=i?i:t7.active(),u=this.startSpan(t,o,s),c=ed.setSpan(s,u);return t7.with(c,a,void 0,u)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t}(),na="telemetry.sdk.name",ns="telemetry.sdk.language",nu="telemetry.sdk.version",nc=function(){return(nc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},nl=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}
9finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},np=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},nf=function(){function t(t,e){var r,n=this;this._attributes=t,this.asyncAttributesPending=null!=e,this._syncAttributes=null!==(r=this._attributes)&&void 0!==r?r:{},this._asyncAttributesPromise=null==e?void 0:e.then(function(t){return n._attributes=Object.assign({},n._attributes,t),n.asyncAttributesPending=!1,t},function(t){return et.debug("a resource's async attributes promise rejected: %s",t),n.asyncAttributesPending=!1,{}})}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t(((e={})["service.name"]="unknown_service",e[ns]=ez[ns],e[na]=ez[na],e[nu]=ez[nu],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&et.error("Accessing resource attributes before async attributes settled"),null!==(t=this._attributes)&&void 0!==t?t:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){var t,e,r,n;return t=this,e=void 0,r=void 0,n=function(){return nl(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]}})},new(r||(r=Promise))(function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(a,s)}u((n=n.apply(t,e||[])).next())})},t.prototype.merge=function(e){var r,n=this;if(!e)return this;var o=nc(nc({},this._syncAttributes),null!==(r=e._syncAttributes)&&void 0!==r?r:e.attributes);return this._asyncAttributesPromise||e._asyncAttributesPromise?new t(o,Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(function(t){var r,o=np(t,2),i=o[0],a=o[1];return nc(nc(nc(nc({},n._syncAttributes),i),null!==(r=e._syncAttributes)&&void 0!==r?r:e.attributes),a)})):new t(o)},t.EMPTY=new t({}),t}(),nh=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},nd=function(){function t(t){this._spanProcessors=t}return t.prototype.forceFlush=function(){var t,e,r=[];try{for(var n=nh(this._spanProcessors),o=n.next();!o.done;o=n.next()){var i=o.value;r.push(i.forceFlush())}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return new Promise(function(t){Promise.all(r).then(function(){t()}).catch(function(e){eL(e||Error("MultiSpanProcessor: forceFlush failed")),t()})})},t.prototype.onStart=function(t,e){var r,n;try{for(var o=nh(this._spanProcessors),i=o.next();!i.done;i=o.next())i.value.onStart(t,e)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},t.prototype.onEnd=function(t){var e,r;try{for(var n=nh(this._spanProcessors),o=n.next();!o.done;o=n.next())o.value.onEnd(t)}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.prototype.shutdown=function(){var t,e,r=[];try{for(var n=nh(this._spanProcessors),o=n.next();!o.done;o=n.next()){var i=o.value;r.push(i.shutdown())}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return new Promise(function(t,e){Promise.all(r).then(function(){t()},e)})},t}(),ny=function(){function t(){}return t.prototype.onStart=function(t,e){},t.prototype.onEnd=function(t){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t}(),nv=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},nm=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};!function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"}(no||(no={}));var n_,ng=function(){function t(t){void 0===t&&(t={}),this._registeredSpanProcessors=[],this._tracers=new Map;var e,r,n,o,i,a,s,u,c,l,p,f,h,d,y,v,m,_=rc({},r5(),(d=Object.assign({},(e=t).spanLimits),y=eI(ek),d.attributeCountLimit=null!==(s=null!==(a=null!==(i=null!==(n=null===(r=e.spanLimits)||void 0===r?void 0:r.attributeCountLimit)&&void 0!==n?n:null===(o=e.generalLimits)||void 0===o?void 0:o.attributeCountLimit)&&void 0!==i?i:y.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)&&void 0!==a?a:y.OTEL_ATTRIBUTE_COUNT_LIMIT)&&void 0!==s?s:128,d.attributeValueLengthLimit=null!==(h=null!==(f=null!==(p=null!==(c=null===(u=e.spanLimits)||void 0===u?void 0:u.attributeValueLengthLimit)&&void 0!==c?c:null===(l=e.generalLimits)||void 0===l?void 0:l.attributeValueLengthLimit)&&void 0!==p?p:y.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==f?f:y.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==h?h:eP,Object.assign({},e,{spanLimits:d})));if(this.resource=null!==(v=_.resource)&&void 0!==v?v:nf.empty(),_.mergeResourceW
9ithDefaults&&(this.resource=nf.default().merge(this.resource)),this._config=Object.assign({},_,{resource:this.resource}),!(null===(m=t.spanProcessors)||void 0===m)&&m.length)this._registeredSpanProcessors=nm([],nv(t.spanProcessors),!1),this.activeSpanProcessor=new nd(this._registeredSpanProcessors);else{var g=this._buildExporterFromEnv();if(void 0!==g){var b=new nt(g);this.activeSpanProcessor=b}else this.activeSpanProcessor=new ny}}return t.prototype.getTracer=function(t,e,r){var n=t+"@"+(e||"")+":"+((null==r?void 0:r.schemaUrl)||"");return this._tracers.has(n)||this._tracers.set(n,new ni({name:t,version:e,schemaUrl:null==r?void 0:r.schemaUrl},this._config,this)),this._tracers.get(n)},t.prototype.addSpanProcessor=function(t){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch(function(t){return et.error("Error while trying to shutdown current span processor",t)}),this._registeredSpanProcessors.push(t),this.activeSpanProcessor=new nd(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(t){void 0===t&&(t={}),ed.setGlobalTracerProvider(this),void 0===t.propagator&&(t.propagator=this._buildPropagatorFromEnv()),t.contextManager&&t7.setGlobalContextManager(t.contextManager),t.propagator&&ef.setGlobalPropagator(t.propagator)},t.prototype.forceFlush=function(){var t=this._config.forceFlushTimeoutMillis,e=this._registeredSpanProcessors.map(function(e){return new Promise(function(r){var n,o=setTimeout(function(){r(Error("Span processor did not completed within timeout period of "+t+" ms")),n=no.timeout},t);e.forceFlush().then(function(){clearTimeout(o),n!==no.timeout&&r(n=no.resolved)}).catch(function(t){clearTimeout(o),n=no.error,r(t)})})});return new Promise(function(t,r){Promise.all(e).then(function(e){var n=e.filter(function(t){return t!==no.resolved});n.length>0?r(n):t()}).catch(function(t){return r([t])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(t){var e;return null===(e=this.constructor._registeredPropagators.get(t))||void 0===e?void 0:e()},t.prototype._getSpanExporter=function(t){var e;return null===(e=this.constructor._registeredExporters.get(t))||void 0===e?void 0:e()},t.prototype._buildPropagatorFromEnv=function(){var t=this,e=Array.from(new Set(eD().OTEL_PROPAGATORS)),r=e.map(function(e){var r=t._getPropagator(e);return r||et.warn('Propagator "'+e+'" requested through environment variable is unavailable.'),r}).reduce(function(t,e){return e&&t.push(e),t},[]);if(0!==r.length)return 1===e.length?r[0]:new e1({propagators:r})},t.prototype._buildExporterFromEnv=function(){var t=eD().OTEL_TRACES_EXPORTER;if(!("none"===t||""===t)){var e=this._getSpanExporter(t);return e||et.error('Exporter "'+t+'" requested through environment variable is unavailable.'),e}},t._registeredPropagators=new Map([["tracecontext",function(){return new rt}],["baggage",function(){return new eb}]]),t._registeredExporters=new Map,t}(),nb=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},nE=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},nT=function(){function t(){this._enabled=!1,this._currentContext=ts}return t.prototype._bindFunction=function(t,e){void 0===t&&(t=ts);var r=this,n=function(){for(var n=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return r.with(t,function(){return e.apply(n,o)})};return Object.defineProperty(n,"length",{enumerable:!1,configurable:!0,writable:!1,value:e.length}),n},t.prototype.active=function(){return this._currentContext},t.prototype.bind=function(t,e){return void 0===t&&(t=this.active()),"function"==typeof e?this._bindFunction(t,e):e},t.prototype.disable=function(){return this._currentContext=ts,this._enabled=!1,this},t.prototype.enable=function(){return this._enabled||(this._enabled=!0,this._currentContext=ts),this},t.prototype.with=function(t,e,r){for(var n=[],o=3;o<arguments.length;o++)n[o-3]=arguments[o];var i=this._currentContext;this._currentContext=t||ts;try{return e.call.apply(e,nE([r],nb(n),!1))}finally{this._currentContext=i}},t}(),nS=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]}
9)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),nw=function(t){function e(e){void 0===e&&(e={});var r=t.call(this,e)||this;if(e.contextManager)throw"contextManager should be defined in register method not in constructor";if(e.propagator)throw"propagator should be defined in register method not in constructor";return r}return nS(e,t),e.prototype.register=function(e){void 0===e&&(e={}),void 0===e.contextManager&&(e.contextManager=new nT),e.contextManager&&e.contextManager.enable(),t.prototype.register.call(this,e)},e}(ng);function nO(t,e,r,n){var o=void 0,i=void 0;e in r&&"number"==typeof r[e]&&(o=r[e]);var a=n_.FETCH_START;if(a in r&&"number"==typeof r[a]&&(i=r[a]),void 0!==o&&void 0!==i&&o>=i)return t.addEvent(e,o),t}function nA(t,e,r){void 0===r&&(r=!1),r||(nO(t,n_.FETCH_START,e),nO(t,n_.DOMAIN_LOOKUP_START,e),nO(t,n_.DOMAIN_LOOKUP_END,e),nO(t,n_.CONNECT_START,e),"name"in e&&e.name.startsWith("https:")&&nO(t,n_.SECURE_CONNECTION_START,e),nO(t,n_.CONNECT_END,e),nO(t,n_.REQUEST_START,e),nO(t,n_.RESPONSE_START,e),nO(t,n_.RESPONSE_END,e));var n=e[n_.ENCODED_BODY_SIZE];void 0!==n&&t.setAttribute("http.response_content_length",n);var o=e[n_.DECODED_BODY_SIZE];void 0!==o&&n!==o&&t.setAttribute("http.response_content_length_uncompressed",o)}function nL(){return"undefined"!=typeof location?location.origin:void 0}function nR(t,e,r,n,o,i){void 0===o&&(o=new WeakSet);var a,s,u,c,l,p=nC(t),f=(a=t=p.toString(),s=o,u=eY(e),c=eY(r),(l=n.filter(function(t){var e=eY(e$(t[n_.FETCH_START])),r=eY(e$(t[n_.RESPONSE_END]));return t.initiatorType.toLowerCase()===(i||"xmlhttprequest")&&t.name===a&&e>=u&&r<=c})).length>0&&(l=l.filter(function(t){return!s.has(t)})),l);if(0===f.length)return{mainRequest:void 0};if(1===f.length)return{mainRequest:f[0]};var h=f.slice().sort(function(t,e){var r=t[n_.FETCH_START],n=e[n_.FETCH_START];return r>n?1:r<n?-1:0});if(p.origin===nL()||!(h.length>1))return{mainRequest:f[0]};var d=h[0],y=function(t,e,r){for(var n,o=eY(r),i=eY(e$(e)),a=t[1],s=t.length,u=1;u<s;u++){var c=t[u],l=eY(e$(c[n_.FETCH_START])),p=o-eY(e$(c[n_.RESPONSE_END]));l>=i&&(!n||p<n)&&(n=p,a=c)}return a}(h,d[n_.RESPONSE_END],r),v=d[n_.RESPONSE_END];return y[n_.FETCH_START]<v&&(y=d,d=void 0),{corsPreFlightRequest:d,mainRequest:y}}function nC(t){if("function"==typeof URL)return new URL(t,"undefined"!=typeof document?document.baseURI:"undefined"!=typeof location?location.href:void 0);var e=(nQ||(nQ=document.createElement("a")),nQ);return e.href=t,e}function nx(t,e){var r=e||[];return("string"==typeof r||r instanceof RegExp)&&(r=[r]),nC(t).origin===nL()||r.some(function(e){return rm(t,e)})}!function(t){t.CONNECT_END="connectEnd",t.CONNECT_START="connectStart",t.DECODED_BODY_SIZE="decodedBodySize",t.DOM_COMPLETE="domComplete",t.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",t.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",t.DOM_INTERACTIVE="domInteractive",t.DOMAIN_LOOKUP_END="domainLookupEnd",t.DOMAIN_LOOKUP_START="domainLookupStart",t.ENCODED_BODY_SIZE="encodedBodySize",t.FETCH_START="fetchStart",t.LOAD_EVENT_END="loadEventEnd",t.LOAD_EVENT_START="loadEventStart",t.NAVIGATION_START="navigationStart",t.REDIRECT_END="redirectEnd",t.REDIRECT_START="redirectStart",t.REQUEST_START="requestStart",t.RESPONSE_END="responseEnd",t.RESPONSE_START="responseStart",t.SECURE_CONNECTION_START="secureConnectionStart",t.UNLOAD_EVENT_END="unloadEventEnd",t.UNLOAD_EVENT_START="unloadEventStart"}(n_||(n_={}));var nP=function(){return(nP=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},nN=function(){function t(t,e,r){this.instrumentationName=t,this.instrumentationVersion=e,this._config={},this._wrap=rk.wrap,this._unwrap=rk.unwrap,this._massWrap=rk.massWrap,this._massUnwrap=rk.massUnwrap,this.setConfig(r),this._diag=et.createComponentLogger({namespace:t}),this._tracer=ed.getTracer(t,e),this._meter=en.getMeter(t,e),this._logger=rP.getLogger(t,e),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter}
9,enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var t,e=null!==(t=this.init())&&void 0!==t?t:[];return Array.isArray(e)?e:[e]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(t){this._config=nP({enabled:!0},t)},t.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(t,e,r,n){if(t)try{t(r,n)}catch(t){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:e},t)}},t}(),nM=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),nI=function(t){function e(e,r,n){var o=t.call(this,e,r,n)||this;return o._config.enabled&&o.enable(),o}return nM(e,t),e}(nN);function nk(t,e,r){var n,o;try{o=t()}catch(t){n=t}finally{return e(n,o),o}}!function(t){t.DOCUMENT_LOAD="documentLoad",t.DOCUMENT_FETCH="documentFetch",t.RESOURCE_FETCH="resourceFetch"}(n0||(n0={}));let nD="http.url";!function(t){t.FIRST_PAINT="firstPaint",t.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"}(n1||(n1={}));var nU=function(){var t,e={},r=null===(t=eG.getEntriesByType)||void 0===t?void 0:t.call(eG,"navigation")[0];if(r){var n=Object.values(n_);n.forEach(function(t){if(t in r){var n=r[t];"number"==typeof n&&(e[t]=n)}})}else{var o=eG.timing;if(o){var n=Object.values(n_);n.forEach(function(t){if(t in o){var r=o[t];"number"==typeof r&&(e[t]=r)}})}}return e},nj={"first-paint":n1.FIRST_PAINT,"first-contentful-paint":n1.FIRST_CONTENTFUL_PAINT},nB=function(t){var e,r=null===(e=eG.getEntriesByType)||void 0===e?void 0:e.call(eG,"paint");r&&r.forEach(function(e){var r=e.name,n=e.startTime;r in nj&&t.addEvent(nj[r],n)})},nH=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),nF=function(t){function e(e){void 0===e&&(e={});var r=t.call(this,"@opentelemetry/instrumentation-document-load","0.44.0",e)||this;return r.component="document-load",r.version="1",r.moduleName=r.component,r}return nH(e,t),e.prototype.init=function(){},e.prototype._onDocumentLoaded=function(){var t=this;window.setTimeout(function(){t._collectPerformance()})},e.prototype._addResourcesSpans=function(t){var e,r=this,n=null===(e=eG.getEntriesByType)||void 0===e?void 0:e.call(eG,"resource");n&&n.forEach(function(e){r._initResourceSpan(e,t)})},e.prototype._collectPerformance=function(){var t=this,e=Array.from(document.getElementsByTagName("meta")).find(function(t){return t.getAttribute("name")===e8}),r=nU(),n=e&&e.content||"";t7.with(ef.extract(ts,{traceparent:n}),function(){var e,n=t._startSpan(n0.DOCUMENT_LOAD,n_.FETCH_START,r);n&&(t7.with(ed.setSpan(t7.active(),n),function(){var e=t._startSpan(n0.DOCUMENT_FETCH,n_.FETCH_START,r);e&&(e.setAttribute(nD,location.href),t7.with(ed.setSpan(t7.active(),e),function(){var n;t.getConfig().ignoreNetworkEvents||nA(e,r),t._addCustomAttributesOnSpan(e,null===(n=t.getConfig().applyCustomAttributesOnSpan)||void 0===n?void 0:n.documentFetch),t._endSpan(e,n_.RESPONSE_END,r)}))}),n.setAttribute(nD,location.href),n.setAttribute("http.user_agent",navigator.userAgent),t._addResourcesSpans(n),t.getConfig().ignoreNetworkEvents||(nO(n,n_.FETCH_START,r),nO(n,n_.UNLOAD_EVENT_START,r),nO(n,n_.UNLOAD_EVENT_END,r),nO(n,n_.DOM_INTERACTIVE,r),nO(n,n_.DOM_CONTENT_LOADED_EVENT_START,r),nO(n,n_.DOM_CONTENT_LOADED_EVENT_END,r),nO(n,n_.DOM_COMPLETE,r),nO(n,n_.LOAD_EVENT_START,r),nO(n,n_.LOAD_EVENT_END,r)),t.getConfig().ignorePerformancePaintEvents||nB(n),t._addCustomAttributesOnSpan(n,null===(e=t.getConfig().applyCustomAttributesOnSpan)||void 0===e?void 0:e.documentLoad),t._endSpan(n,n_.LOAD_EVENT_END,r))})},e.prototype._endSpan=function(t,e,r){t&&(e in r?t.end(r[e]):t.end())},e.prototype._initResourceSpan=function(t,e){var r,n=this._startSpan(n0.RESOURCE_FETCH,n_.FETCH_START,t,e);n&&(n.setAttribute(nD,t.name),this.getConfig().ignoreNetworkEvents||nA(n,t),this._addCustomAttributesOnResourceSpan(n,t,null===(r=this.getConfig().applyCustomAttributesOnSpan)||void 0===r?void 0:r.resourceFetch),this._endSpan(n,n_.RESPONSE_END,t))},e.prototype._startSpan=function(t,e,r,n){if(e in r&&"number"==typeof r[e])return this.tracer.startSpan(t,{startTime:r[e]},n?ed.setSpan(t7.active(),n):void 0)},e.prototype._waitForPageLoad=function(){"complete"===window.document.readyState?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded))},e.prototype._addCustomAttributesOnSpan=function(t,e){var r=this;e&&nk(function(){return e(t)},function(t){t&&r._diag.error("addCustomAttributesOnSpan",t)})},e.prototype._addCustomAttributesOnResourceSpan=function(t,e,r){var n=this;r&&nk(function(){return r(t,e)},function(t){t&&n._diag.error("addCustomAttributesOnResourceSpan",t)})},e.prototype.enable=function(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()},e.prototype.disable=function(){window.removeEventListener("load",this._onDocumentLoaded)},e}(nI),nV=function(){return(nV=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},nG=function(){function t(t,e,r){this.instrumentationName=t,this.instrumentationVersion=e,this._config={},this._wrap=rk.wrap,this._unwrap=rk.unwrap,this._massWrap=rk.massWrap,this._massUnwrap=rk.massUnwrap,this.setConfig(r),this._diag=et.createComponentLogger({namespace:t}),this._tracer=ed.getTracer(t,e),this._meter=en.getMeter(t,e),this._logger=rP.getLogger(t,e),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter}
9,enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var t,e=null!==(t=this.init())&&void 0!==t?t:[];return Array.isArray(e)?e:[e]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(t){this._config=nV({enabled:!0},t)},t.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(t,e,r,n){if(t)try{t(r,n)}catch(t){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:e},t)}},t}(),nz=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),nX=function(t){function e(e,r,n){var o=t.call(this,e,r,n)||this;return o._config.enabled&&o.enable(),o}return nz(e,t),e}(nG);!function(t){t.COMPONENT="component",t.HTTP_ERROR_NAME="http.error_name",t.HTTP_STATUS_TEXT="http.status_text"}(n2||(n2={}));var nq=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},nW=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},n$=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},nY=et.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function nJ(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t[0]instanceof URL||"string"==typeof t[0]){var r,n=t[1];if(!(null!=n&&n.body))return Promise.resolve();if(!(n.body instanceof ReadableStream))return Promise.resolve((r=n.body,"undefined"!=typeof Document&&r instanceof Document?new XMLSerializer().serializeToString(document).length:r instanceof Blob?r.size:void 0!==r.byteLength?r.byteLength:r instanceof FormData?function(t){var e,r,n=0;try{for(var o=nW(t.entries()),i=o.next();!i.done;i=o.next()){var a=n$(i.value,2),s=a[0],u=a[1];n+=s.length,u instanceof Blob?n+=u.size:n+=u.length}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n}(r):r instanceof URLSearchParams?nK(r.toString()):"string"==typeof r?nK(r):void nY.warn("unknown body type")));
9var o=function(t){if(!t.pipeThrough)return nY.warn("Platform has ReadableStream but not pipeThrough!"),{body:t,length:Promise.resolve(void 0)};var e,r=0,n=new Promise(function(t){e=t}),o=new TransformStream({start:function(){},transform:function(t,e){var n,o,i,a;return n=this,o=void 0,i=void 0,a=function(){var n;return nq(this,function(o){switch(o.label){case 0:return[4,t];case 1:return n=o.sent(),r+=n.byteLength,e.enqueue(t),[2]}})},new(i||(i=Promise))(function(t,e){function r(t){try{u(a.next(t))}catch(t){e(t)}}function s(t){try{u(a.throw(t))}catch(t){e(t)}}function u(e){var n;e.done?t(e.value):((n=e.value)instanceof i?n:new i(function(t){t(n)})).then(r,s)}u((a=a.apply(n,o||[])).next())})},flush:function(){e(r)}});return{body:t.pipeThrough(o),length:n}}(n.body),i=o.body,a=o.length;return n.body=i,a}var s=t[0];return null!=s&&s.body?s.clone().text().then(function(t){return nK(t)}):Promise.resolve()}var nZ=new TextEncoder;function nK(t){return nZ.encode(t).byteLength}var nQ,n0,n1,n2,n3,n4="0.57.2",n5=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),n6=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},n8=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},n9="object"==typeof i&&(null===(n3=i.release)||void 0===n3?void 0:n3.name)==="node",n7=function(t){function e(e){void 0===e&&(e={});var r=t.call(this,"@opentelemetry/instrumentation-fetch",n4,e)||this;return r.component="fetch",r.version=n4,r.moduleName=r.component,r._usedResources=new WeakSet,r._tasksCount=0,r}return n5(e,t),e.prototype.init=function(){},e.prototype._addChildSpan=function(t,e){var r=this.tracer.startSpan("CORS Preflight",{startTime:e[n_.FETCH_START]},ed.setSpan(t7.active(),t));nA(r,e,this.getConfig().ignoreNetworkEvents),r.end(e[n_.RESPONSE_END])},e.prototype._addFinalSpanAttributes=function(t,e){var r=nC(e.url);t.setAttribute("http.status_code",e.status),null!=e.statusText&&t.setAttribute(n2.HTTP_STATUS_TEXT,e.statusText),t.setAttribute("http.host",r.host),t.setAttribute("http.scheme",r.protocol.replace(":","")),"undefined"!=typeof navigator&&t.setAttribute("http.user_agent",navigator.userAgent)},e.prototype._addHeaders=function(t,e){if(!nx(e,this.getConfig().propagateTraceHeaderCorsUrls)){var r={};ef.inject(t7.active(),r),Object.keys(r).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}if(t instanceof Request)ef.inject(t7.active(),t.headers,{set:function(t,e,r){return t.set(e,"string"==typeof r?r:String(r))}});else if(t.headers instanceof Headers)ef.inject(t7.active(),t.headers,{set:function(t,e,r){return t.set(e,"string"==typeof r?r:String(r))}});else if(t.headers instanceof Map)ef.inject(t7.active(),t.headers,{set:function(t,e,r){return t.set(e,"string"==typeof r?r:String(r))}});else{var r={};ef.inject(t7.active(),r),t.headers=Object.assign({},r,t.headers||{})}},e.prototype._clearResources=function(){0===this._tasksCount&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)},e.prototype._createSpan=function(t,e){if(void 0===e&&(e={}),r_(t,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var r,n=(e.method||"GET").toUpperCase(),o="HTTP "+n;return this.tracer.startSpan(o,{kind:eB.CLIENT,attributes:((r={})[n2.COMPONENT]=this.moduleName,r["http.method"]=n,r["http.url"]=t,r)})},e.prototype._findResourceAndAddNetworkEvents=function(t,e,r){var n=e.entries;if(!n.length){if(!performance.getEntriesByType)return;n=performance.getEntriesByType("resource")}var o=nR(e.spanUrl,e.startTime,r,n,this._usedResources,"fetch");if(o.mainRequest){var i=o.mainRequest;this._markResourceAsUsed(i);var a=o.corsPreFlightRequest;a&&(this._addChildSpan(t,a),this._markResourceAsUsed(a)),nA(t,i,this.getConfig().ignoreNetworkEvents)}},e.prototype._markResourceAsUsed=function(t){this._usedResources.add(t)},e.prototype._endSpan=function(t,e,r){var n=this,o=eX(Date.now()),i=eW();this._addFinalSpanAttributes(t,r),setTimeout(function(){var r;null===(r=e.observer)||void 0===r||r.disconnect(),n._findResourceAndAddNetworkEvents(t,e,i),n._tasksCount--,n._clearResources(),t.end(o)},300)},e.prototype._patchConstructor=function(){var t=this;return function(e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var o=this,i=nC(r[0]instanceof Request?r[0].url:String(r[0])).href,a=r[0]instanceof Request?r[0]:r[1]||{},s=t._createSpan(i,a);if(!s)return e.apply(this,r);var u=t._prepareSpanData(i);function c(e,r){t._applyAttributesAfterFetch(e,a,r),t._endSpan(e,u,{status:r.status||0,statusText:r.message,url:i})}function l(e,r){t._applyAttributesAfterFetch(e,a,r),r.status>=200&&r.status<400?t._endSpan(e,u,r):t._endSpan(e,u,{status:r.status,statusText:r.statusText,url:i})}function p(t,e,r){try{var n=r.clone(),o=r.clone(),i=n.body;if(i){var a=i.getReader(),s=function(){a.read().then(function(e){e.done?l(t,o):s()},function(e){c(t,e)})};s()}else l(t,r)}finally{e(r)}}function f(t,e,r){try{c(t,r)}finally{e(r)}}return t.getConfig().measureRequestSize&&nJ.apply(void 0,n8([],n6(r),!1)).then(function(t){t&&s.setAttribute("http.request_content_length_uncompressed",t)}).catch(function(e){t._diag.warn("getFetchBodyLength",e)}),new Promise(function(r,n){return t7.with(ed.setSpan(t7.active(),s),function(){return t._addHeaders(a,i),t._tasksCount++,e.apply(o,a instanceof Request?[a]:[i,a]).then(p.bind(o,s,r),f.bind(o,s,n))})})}}},e.prototype._applyAttributesAfterFetch=function(t,e,r){var n=this,o=this.getConfig().applyCustomAttributesOnSpan;o&&function(t,e,r){var n,o;try{o=t()}catch(t){n=t}finally{e(n,o)}}(function(){return o(t,e,r)},function(t){t&&n._diag.error("applyCustomAttributesOnSpan",t)})},e.prototype._prepareSpanData=function(t){var e=eW(),r=[];if("function"!=typeof PerformanceObserver)return{entries:r,startTime:e,spanUrl:t};
9var n=new PerformanceObserver(function(e){e.getEntries().forEach(function(e){"fetch"===e.initiatorType&&e.name===t&&r.push(e)})});return n.observe({entryTypes:["resource"]}),{entries:r,observer:n,startTime:e,spanUrl:t}},e.prototype.enable=function(){var t;if(n9){this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}"function"==typeof(t=fetch)&&"function"==typeof t.__original&&"function"==typeof t.__unwrap&&!0===t.__wrapped&&(this._unwrap(ek,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(ek,"fetch",this._patchConstructor())},e.prototype.disable=function(){n9||(this._unwrap(ek,"fetch"),this._usedResources=new WeakSet)},e}(nX),ot=function(){return(ot=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},oe=function(){function t(t,e,r){this.instrumentationName=t,this.instrumentationVersion=e,this._config={},this._wrap=rk.wrap,this._unwrap=rk.unwrap,this._massWrap=rk.massWrap,this._massUnwrap=rk.massUnwrap,this.setConfig(r),this._diag=et.createComponentLogger({namespace:t}),this._tracer=ed.getTracer(t,e),this._meter=en.getMeter(t,e),this._logger=rP.getLogger(t,e),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var t,e=null!==(t=this.init())&&void 0!==t?t:[];return Array.isArray(e)?e:[e]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(t){this._config=ot({enabled:!0},t)},t.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(t,e,r,n){if(t)try{t(r,n)}catch(t){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:e},t)}},t}(),or=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),on=function(t){function e(e,r,n){var o=t.call(this,e,r,n)||this;return o._config.enabled&&o.enable(),o}return or(e,t),e}(oe);function oo(t){return"function"==typeof t&&"function"==typeof t.__original&&"function"==typeof t.__unwrap&&!0===t.__wrapped}!function(t){t.METHOD_OPEN="open",t.METHOD_SEND="send",t.EVENT_ABORT="abort",t.EVENT_ERROR="error",t.EVENT_LOAD="loaded",t.EVENT_TIMEOUT="timeout"}(ol||(ol={}));var oi=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},oa=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},os=et.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"}),ou=new TextEncoder;function oc(t){return ou.encode(t).byteLength}var ol,op,of="0.57.2";(op||(op={})).HTTP_STATUS_TEXT="http.status_text";var oh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]}
9)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),od=function(t){function e(e){void 0===e&&(e={});var r=t.call(this,"@opentelemetry/instrumentation-xml-http-request",of,e)||this;return r.component="xml-http-request",r.version=of,r.moduleName=r.component,r._tasksCount=0,r._xhrMem=new WeakMap,r._usedResources=new WeakSet,r}return oh(e,t),e.prototype.init=function(){},e.prototype._addHeaders=function(t,e){if(!nx(nC(e).href,this.getConfig().propagateTraceHeaderCorsUrls)){var r={};ef.inject(t7.active(),r),Object.keys(r).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}var n={};ef.inject(t7.active(),n),Object.keys(n).forEach(function(e){t.setRequestHeader(e,String(n[e]))})},e.prototype._addChildSpan=function(t,e){var r=this;t7.with(ed.setSpan(t7.active(),t),function(){var t=r.tracer.startSpan("CORS Preflight",{startTime:e[n_.FETCH_START]});nA(t,e,r.getConfig().ignoreNetworkEvents),t.end(e[n_.RESPONSE_END])})},e.prototype._addFinalSpanAttributes=function(t,e,r){if("string"==typeof r){var n=nC(r);void 0!==e.status&&t.setAttribute("http.status_code",e.status),void 0!==e.statusText&&t.setAttribute(op.HTTP_STATUS_TEXT,e.statusText),t.setAttribute("http.host",n.host),t.setAttribute("http.scheme",n.protocol.replace(":","")),t.setAttribute("http.user_agent",navigator.userAgent)}},e.prototype._applyAttributesAfterXHR=function(t,e){var r=this,n=this.getConfig().applyCustomAttributesOnSpan;"function"==typeof n&&function(t,e,r){var n,o;try{o=t()}catch(t){n=t}finally{e(n,o)}}(function(){return n(t,e)},function(t){t&&r._diag.error("applyCustomAttributesOnSpan",t)})},e.prototype._addResourceObserver=function(t,e){var r=this._xhrMem.get(t);r&&"function"==typeof PerformanceObserver&&"function"==typeof PerformanceResourceTiming&&(r.createdResources={observer:new PerformanceObserver(function(t){var n=t.getEntries(),o=nC(e);n.forEach(function(t){"xmlhttprequest"===t.initiatorType&&t.name===o.href&&r.createdResources&&r.createdResources.entries.push(t)})}),entries:[]},r.createdResources.observer.observe({entryTypes:["resource"]}))},e.prototype._clearResources=function(){0===this._tasksCount&&this.getConfig().clearTimingResources&&(eG.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},e.prototype._findResourceAndAddNetworkEvents=function(t,e,r,n,o){if(!(!r||!n||!o||!t.createdResources)){var i=t.createdResources.entries;i&&i.length||(i=eG.getEntriesByType("resource"));var a=nR(nC(r).href,n,o,i,this._usedResources);if(a.mainRequest){var s=a.mainRequest;this._markResourceAsUsed(s);var u=a.corsPreFlightRequest;u&&(this._addChildSpan(e,u),this._markResourceAsUsed(u)),nA(e,s,this.getConfig().ignoreNetworkEvents)}}},e.prototype._cleanPreviousSpanInformation=function(t){var e=this._xhrMem.get(t);if(e){var r=e.callbackToRemoveEvents;r&&r(),this._xhrMem.delete(t)}},e.prototype._createSpan=function(t,e,r){if(r_(e,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var n,o=r.toUpperCase(),i=this.tracer.startSpan(o,{kind:eB.CLIENT,attributes:((n={})["http.method"]=r,n["http.url"]=nC(e).toString(),n)});return i.addEvent(ol.METHOD_OPEN),this._cleanPreviousSpanInformation(t),this._xhrMem.set(t,{span:i,spanUrl:e}),i},e.prototype._markResourceAsUsed=function(t){this._usedResources.add(t)},e.prototype._patchOpen=function(){var t=this;return function(e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var o=r[0],i=r[1];return t._createSpan(this,i,o),e.apply(this,r)}}},e.prototype._patchSend=function(){var t=this;function e(e,r){var n=t._xhrMem.get(r);if(n){n.status=r.status,n.statusText=r.statusText,t._xhrMem.delete(r),n.span&&t._applyAttributesAfterXHR(n.span,r);var o=eW(),i=Date.now();setTimeout(function(){var r,a,s,u;"function"==typeof(r=n.callbackToRemoveEvents)&&r(),a=n.span,s=n.spanUrl,u=n.sendStartTime,a&&(t._findResourceAndAddNetworkEvents(n,a,s,u,o),a.addEvent(e,i),t._addFinalSpanAttributes(a,n,s),a.end(i),t._tasksCount--),t._clearResources()},300)}}function r(){e(ol.EVENT_ERROR,this)}function n(){e(ol.EVENT_ABORT,this)}function o(){e(ol.EVENT_TIMEOUT,this)}function i(){this.status<299?e(ol.EVENT_LOAD,this):e(ol.EVENT_ERROR,this)}return function(e){return function(){for(var a=this,s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];var c=t._xhrMem.get(this);if(!c)return e.apply(this,s);var l=c.span,p=c.spanUrl;if(l&&p){if(t.getConfig().measureRequestSize&&null!=s&&s[0]){var f,h=(f=s[0],"undefined"!=typeof Document&&f instanceof Document?new XMLSerializer().serializeToString(document).length:f instanceof Blob?f.size:void 0!==f.byteLength?f.byteLength:f instanceof FormData?function(t){var e,r,n=0;try{for(var o=oi(t.entries()),i=o.next();!i.done;i=o.next()){var a=oa(i.value,2),s=a[0],u=a[1];n+=s.length,u instanceof Blob?n+=u.size:n+=u.length}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n}(f):f instanceof URLSearchParams?oc(f.toString()):"string"==typeof f?oc(f):void os.warn("unknown body type"));void 0!==h&&l.setAttribute("http.request_content_length_uncompressed",h)}t7.with(ed.setSpan(t7.active(),l),function(){t._tasksCount++,c.sendStartTime=eW(),l.addEvent(ol.METHOD_SEND),a.addEventListener("abort",n),a.addEventListener("error",r),a.addEventListener("load",i),a.addEventListener("timeout",o),c.callbackToRemoveEvents=function(){var e;a.removeEventListener("abort",n),a.removeEventListener("error",r),a.removeEventListener("load",i),a.removeEventListener("timeout",o),(e=t._xhrMem.get(a))&&(e.callbackToRemoveEvents=void 0),c.createdResources&&c.createdResources.observer.disconnect()},t._addHeaders(a,p),t._addResourceObserver(a,p)})}return e.apply(this,s)}}},e.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),oo(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),oo(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())},e.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},e}(on);let oy=(t,e,r)=>{let n=ov(e,t.headers,r);return d(h({},t),{headers:n})},ov=(t,e,r)=>{var n,o;let i=h({},e);
9return r?null==(n=Object.keys(i))||n.forEach(t=>{[...r].includes(null==t?void 0:t.toLowerCase())||(i[t]="[REDACTED]")}):null==(o=Object.keys(i))||o.forEach(e=>{[...om,...t].includes(null==e?void 0:e.toLowerCase())&&(i[e]="[REDACTED]")}),i},om=["authorization","cookie","proxy-authorization","token"],o_=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com"],og=RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),ob=RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?"),oE="X-Highlight-Request",oT=t=>{let e=t;return t.startsWith("https://")||t.startsWith("http://")||(e=`${window.location.origin}${e}`),e.replace(/\/+$/,"")},oS=(t,{headersToRedact:e,headersToRecord:r,requestResponseSanitizer:n})=>{var o,i;let a=t;if(n){let t=!0;try{a.request.body=JSON.parse(a.request.body)}catch(e){t=!1}let e=!0;try{a.response.body=JSON.parse(a.response.body)}catch(t){e=!1}try{a=n(a)}catch(t){}finally{t=t&&!!(null!=(o=null==a?void 0:a.request)&&o.body),e=e&&!!(null!=(i=null==a?void 0:a.response)&&i.body),t&&(a.request.body=JSON.stringify(a.request.body)),e&&(a.response.body=JSON.stringify(a.response.body))}if(!a)return null}let s=a,{request:u,response:c}=s,l=y(s,["request","response"]);return h({request:oy(u,e,r),response:oy(c,e,r)},l)},ow=(t,e,r,n)=>{t.sort((t,e)=>t.responseEnd-e.responseEnd);let o=t.reduce((t,e)=>{let n=oT(e.name);return e.initiatorType===r?t[r][n]=[...t[r][n]||[],e]:t.others[n]=[...t.others[n]||[],e],t},{xmlhttprequest:{},others:{},fetch:{}}),i={};for(let t in i=e.reduce((t,e)=>{let r=oT(e.request.url);return t[r]=[...t[r]||[],e],t},i),o[r]){let e=o[r][t],n=i[t];if(!n)continue;let a=Math.max(e.length-n.length,0);for(let t=a;t<e.length;t++)e[t]&&(e[t].requestResponsePair=n[t-a])}let a=[];for(let t in o)for(let e in o[t])a=a.concat(o[t][e]);return a.sort((t,e)=>t.fetchStart-e.fetchStart).reduce((t,e)=>{let r=e.requestResponsePair;return(!r||(r=oS(e.requestResponsePair,n)))&&(e.toJSON=function(){let t=window.performance.timeOrigin;return{initiatorType:this.initiatorType,startTimeAbs:t+this.startTime,connectStartAbs:t+this.connectStart,connectEndAbs:t+this.connectEnd,domainLookupStartAbs:t+this.domainLookupStart,domainLookupEndAbs:t+this.domainLookupEnd,fetchStartAbs:t+this.fetchStart,redirectStartAbs:t+this.redirectStart,redirectEndAbs:t+this.redirectEnd,requestStartAbs:t+this.requestStart,responseStartAbs:t+this.responseStart,responseEndAbs:t+this.responseEnd,secureConnectionStartAbs:t+this.secureConnectionStart,workerStartAbs:t+this.workerStart,name:this.name,transferSize:this.transferSize,encodedBodySize:this.encodedBodySize,decodedBodySize:this.decodedBodySize,nextHopProtocol:this.nextHopProtocol,requestResponsePairs:r}},t.push(e)),t},[])},oO=t=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(e=>t.toLocaleLowerCase().includes(e)),oA=t=>(function(t){return!!(t.includes("/sdk/evalx")&&t.match(og)||t.includes("/eval/")&&t.match(ob))})(t),oL=(t,e)=>e.some(e=>t.toLocaleLowerCase().includes(e)),oR=(t,e,r)=>!oL(t,e)&&!oA(t)&&!oO(t),oC=(t,e,r)=>{var n;if(r.some(e=>t.toLowerCase().includes(e)))return!1;let o=[];!0===e?(o=["localhost",/^\//],null!=(n=null==window?void 0:window.location)&&n.host&&o.push(window.location.host)):e instanceof Array&&(o=e);let i=!1;return o.forEach(e=>{t.match(e)&&(i=!0)}),i},ox=()=>{let t=function(t){for(var e="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=r.length,o=0;o<10;o++)e+=r.charAt(Math.floor(Math.random()*n));return e}(0),e=sj(),r=null==e?void 0:e.spanContext().traceId;return[(0,n._)(),null!=r?r:t]},oP=(t,e)=>t+"/"+e,oN=(t,e,r,n,o,i)=>{let a=XMLHttpRequest.prototype,s=a.open,u=a.send,c=a.setRequestHeader;return a.open=function(t,e){return"string"==typeof e?this._url=e:this._url=e.toString(),this._method=t,this._requestHeaders={},this._shouldRecordHeaderAndBody=!n.some(t=>this._url.toLowerCase().includes(t)),s.apply(this,arguments)},a.setRequestHeader=function(t,e){return this._requestHeaders[t]=e,c.apply(this,arguments)},a.send=function(a){if(!oR(this._url,e))return u.apply(this,arguments);let[s,c]=ox();oC(this._url,r,n)&&this.setRequestHeader(oE,oP(s,c));let l=this._shouldRecordHeaderAndBody,p={sessionSecureID:s,id:c,url:this._url,verb:this._method,headers:l?this._requestHeaders:{},body:void 0};
9if(l&&a){let t=oM(a,p.url);t&&(this._body=t,p.body=ok(t,o,i,p.headers))}return this.addEventListener("load",function(){return m(this,null,function*(){let e={status:this.status,headers:{},body:void 0};if(l){let t=this.getAllResponseHeaders().trim().split(/[\r\n]+/),r={};if(t.forEach(function(t){let e=t.split(": ");r[e.shift()]=e.join(": ")}),e.headers=r,a){let t=oM(a,p.url);t&&(p.body=ok(t,o,i,e.headers))}if(""===this.responseType||"text"===this.responseType)e.body=ok(this.responseText,o,i,e.headers),e.size=8*this.responseText.length;else if("blob"===this.responseType){if(this.response instanceof Blob)try{let t=yield this.response.text();e.body=ok(t,o,i,e.headers),e.size=this.response.size}catch(t){}}else try{e.body=ok(this.response,o,i,e.headers)}catch(t){}}t({request:p,response:e,urlBlocked:!l})})}),this.addEventListener("error",function(){return m(this,null,function*(){t({request:p,response:{status:this.status,headers:void 0,body:void 0},urlBlocked:!1})})}),u.apply(this,arguments)},()=>{a.open=s,a.send=u,a.setRequestHeader=c}},oM=(t,e)=>{if("string"==typeof t){if(!((null!=e&&e.includes("localhost")||null!=e&&e.includes("highlight.run"))&&(t.includes("pushPayload")||t.includes("pushSessionEvents"))))return t}else if("object"==typeof t||"number"==typeof t||"boolean"==typeof t)return(0,n.s)(t);return null},oI={"application/json":0x4000000,"text/plain":0x4000000},ok=(t,e,r,n)=>{var o,i,a;let s=65536;if(n){let t="";t="function"==typeof n.get?null!=(o=n.get("content-type"))?o:"":null!=(i=n["content-type"])?i:"";try{t=t.split(";")[0]}catch(t){}s=null!=(a=oI[t])?a:65536}if(t){if(e)try{let r=JSON.parse(t);Array.isArray(r)?r.forEach(t=>{Object.keys(t).forEach(r=>{e.includes(r.toLocaleLowerCase())&&(t[r]="[REDACTED]")})}):Object.keys(r).forEach(t=>{e.includes(t.toLocaleLowerCase())&&(r[t]="[REDACTED]")}),t=JSON.stringify(r)}catch(t){}if(r)try{let e=JSON.parse(t);Object.keys(e).forEach(t=>{r.includes(t.toLocaleLowerCase())||(e[t]="[REDACTED]")}),t=JSON.stringify(e)}catch(t){}}try{t=t.slice(0,s)}catch(t){}return t},oD=(t,e,r,n,o,i)=>{let a=window._fetchProxy;return window._fetchProxy=function(s,u){let{method:c,url:l}=oU(s,u);if(!oR(l,e))return a.call(this,s,u);let[p,f]=ox();if(oC(l,r,n)){let t=new Headers((u=u||{}).headers);s instanceof Request&&[...s.headers].forEach(([e,r])=>t.set(e,r)),t.set(oE,oP(p,f)),u.headers=Object.fromEntries(t.entries())}let h={sessionSecureID:p,id:f,headers:{},body:void 0,url:l,verb:c},d=!n.some(t=>l.toLowerCase().includes(t));d&&(h.headers=Object.fromEntries(new Headers(null==u?void 0:u.headers).entries()),h.body=ok(null==u?void 0:u.body,o,i,null==u?void 0:u.headers));let y=a.call(this,s,u);return oj(y,h,t,d,o,i),y},()=>{window._fetchProxy=a}},oU=(t,e)=>({method:e&&e.method||"object"==typeof t&&"method"in t&&t.method||"GET",url:"object"==typeof t?"url"in t&&t.url?t.url:t.toString():t}),oj=(t,e,r,n,o,i)=>{t.then(t=>m(void 0,null,function*(){let a={body:void 0,headers:void 0,status:0,size:0},s=!1,u=!n;"stack"in t||t instanceof Error?(a=d(h({},a),{body:t.message,status:0,size:void 0}),s=!0):"status"in t&&(a=d(h({},a),{status:t.status}),n&&(a.body=yield oB(t,i,o),a.headers=Object.fromEntries(t.headers.entries()),a.size=8*a.body.length),("opaque"===t.type||"opaqueredirect"===t.type)&&(u=!0,a=d(h({},a),{body:"CORS blocked request"})),s=!0),s&&r({request:e,response:a,urlBlocked:u})})).catch(()=>{})},oB=(t,e,r)=>m(void 0,null,function*(){let n;try{let o=t.clone().body;if(o){let i=o.getReader(),a=new TextDecoder,s,u="";for(;!(s=yield i.read()).done;){let t=s.value;u+=a.decode(t)}n=u,n=ok(n,r,e,t.headers)}else n=""}catch(t){n=`Unable to clone response: ${t}`}return n});var oH=function(){function t(t){this._delegate=t}return t.prototype.export=function(t,e){this._delegate.export(t,e)},t.prototype.forceFlush=function(){return this._delegate.forceFlush()},t.prototype.shutdown=function(){return this._delegate.shutdown()},t}(),oF=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),oV=function(t){function e(e,r,n){var o=t.call(this,e)||this;
9return o.name="OTLPExporterError",o.data=n,o.code=r,o}return oF(e,t),e}(Error),oG=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},oz=function(){function t(t){this._sendingPromises=[],this._concurrencyLimit=t}return t.prototype.pushPromise=function(t){var e=this;if(this.hasReachedLimit())throw Error("Concurrency Limit reached");this._sendingPromises.push(t);var r=function(){var r=e._sendingPromises.indexOf(t);e._sendingPromises.splice(r,1)};t.then(r,r)},t.prototype.hasReachedLimit=function(){return this._sendingPromises.length>=this._concurrencyLimit},t.prototype.awaitAll=function(){var t,e,r,n;return t=this,e=void 0,r=void 0,n=function(){return oG(this,function(t){switch(t.label){case 0:return[4,Promise.all(this._sendingPromises)];case 1:return t.sent(),[2]}})},new(r||(r=Promise))(function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(a,s)}u((n=n.apply(t,e||[])).next())})},t}(),oX=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},oq=function(){function t(t,e,r,n,o){this._transport=t,this._serializer=e,this._responseHandler=r,this._promiseQueue=n,this._timeout=o,this._diagLogger=et.createComponentLogger({namespace:"OTLPExportDelegate"})}return t.prototype.export=function(t,e){var r=this;if(this._diagLogger.debug("items to be sent",t),this._promiseQueue.hasReachedLimit()){e({code:rX.FAILED,error:Error("Concurrent export limit reached")});return}var n=this._serializer.serializeRequest(t);if(null==n){e({code:rX.FAILED,error:Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(n,this._timeout).then(function(t){if("success"===t.status){if(null!=t.data)try{r._responseHandler.handleResponse(r._serializer.deserializeResponse(t.data))}catch(e){r._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",e,t.data)}e({code:rX.SUCCESS});return}if("failure"===t.status&&t.error){e({code:rX.FAILED,error:t.error});return}"retryable"===t.status?e({code:rX.FAILED,error:new oV("Export failed with retryable status")}):e({code:rX.FAILED,error:new oV("Export failed with unknown error")})},function(t){return e({code:rX.FAILED,error:t})}))},t.prototype.forceFlush=function(){return this._promiseQueue.awaitAll()},t.prototype.shutdown=function(){var t,e,r,n;return t=this,e=void 0,r=void 0,n=function(){return oX(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]}})},new(r||(r=Promise))(function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(a,s)}u((n=n.apply(t,e||[])).next())})},t}();function oW(t,e,r){var n,o;return n={transport:r,serializer:e,promiseHandler:new oz(t.concurrencyLimit)},o={timeout:t.timeoutMillis},new oq(n.transport,n.serializer,{handleResponse:function(t){null!=t&&Object.prototype.hasOwnProperty.call(t,"partialSuccess")&&null!=t.partialSuccess&&0!==Object.keys(t.partialSuccess).length&&et.warn("Received Partial Success response:",JSON.stringify(t.partialSuccess))}},n.promiseHandler,o.timeout)}function o$(t){var e=BigInt(1e9);return BigInt(t[0])*e+BigInt(t[1])}function oY(t){var e;return{low:Number(BigInt.asUintN(32,e=o$(t))),high:Number(BigInt.asUintN(32,e>>BigInt(32)))}}var oJ="undefined"!=typeof BigInt?function(t){return o$(t).toString()}:eY;function oZ(t){return t}function oK(t){if(void 0!==t)return ej(t)}var oQ={encodeHrTime:oY,encodeSpanContext:ej,encodeOptionalSpanContext:oK};function o0(t){if(void 0===t)return oQ;var e,r,n=null===(e=t.useLongBits)||void 0===e||e,o=null!==(r=t.useHex)&&void 0!==r&&r;return{encodeHrTime:n?oY:oJ,encodeSpanContext:o?oZ:ej,encodeOptionalSpanContext:o?oZ:oK}}var o1=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};function o2(t){return{attributes:o4(t.attributes),droppedAttributesCount:0}}function o3(t){return{name:t.name,version:t.version}}function o4(t){return Object.keys(t).map(function(e){return function t(e,r){return{key:e,value:function e(r){var n=typeof r;
9return"string"===n?{stringValue:r}:"number"===n?Number.isInteger(r)?{intValue:r}:{doubleValue:r}:"boolean"===n?{boolValue:r}:r instanceof Uint8Array?{bytesValue:r}:Array.isArray(r)?{arrayValue:{values:r.map(e)}}:"object"===n&&null!=r?{kvlistValue:{values:Object.entries(r).map(function(e){var r=o1(e,2);return t(r[0],r[1])})}}:{}}(r)}}(e,t[e])})}!function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE"}(iu||(iu={})),function(t){t[t.HISTOGRAM=0]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",t[t.GAUGE=2]="GAUGE",t[t.SUM=3]="SUM"}(ic||(ic={}));var o5=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),o6=function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(a,s)}u((n=n.apply(t,e||[])).next())})},o8=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},o9=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o7=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},it=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function ie(t){return null!=t}function ir(t){var e=Object.keys(t);return 0===e.length?"":JSON.stringify((e=e.sort()).map(function(e){return[e,t[e]]}))}var io=function(t){function e(r){var n=t.call(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return o5(e,t),e}(Error);function ii(t,e){var r;return Promise.race([t,new Promise(function(t,n){r=setTimeout(function(){n(new io("Operation timed out."))},e)})]).then(function(t){return clearTimeout(r),t},function(t){throw clearTimeout(r),t})}function ia(t){return"rejected"===t.status}function is(t,e){var r=[];return t.forEach(function(t){r.push.apply(r,o7([],o9(e(t)),!1))}),r}!function(t){t[t.DROP=0]="DROP",t[t.SUM=1]="SUM",t[t.LAST_VALUE=2]="LAST_VALUE",t[t.HISTOGRAM=3]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"}(il||(il={}));var iu,ic,il,ip,ih=function(){function t(){this.kind=il.DROP}return t.prototype.createAccumulation=function(){},t.prototype.merge=function(t,e){},t.prototype.diff=function(t,e){},t.prototype.toMetricData=function(t,e,r,n){},t}();function id(t,e,r){var n,o,i,a;return null!=t.match(iy)||et.warn('Invalid metric name: "'+t+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:t,type:e,description:null!==(n=null==r?void 0:r.description)&&void 0!==n?n:"",unit:null!==(o=null==r?void 0:r.unit)&&void 0!==o?o:"",valueType:null!==(i=null==r?void 0:r.valueType)&&void 0!==i?i:tR.DOUBLE,advice:null!==(a=null==r?void 0:r.advice)&&void 0!==a?a:{}}}!function(t){t.COUNTER="COUNTER",t.GAUGE="GAUGE",t.HISTOGRAM="HISTOGRAM",t.UP_DOWN_COUNTER="UP_DOWN_COUNTER",t.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",t.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",t.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"}(ip||(ip={}));var iy=/^[a-z][a-z0-9_.\-/]{0,254}$/i,iv=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},im=function(){function t(t,e,r,n){var o;void 0===r&&(r=!0),void 0===n&&((o=e.map(function(){return 0})).push(0),n={buckets:{boundaries:e,counts:o},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}),this.startTime=t,this._boundaries=e,this._recordMinMax=r,this._current=n}return t.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 e=function(t,e){for(var r=0,n=t.length-1,o=t.length;n>=r;){var i=r+Math.trunc((n-r)/2);t[i]<e?r=i+1:(o=i,n=i-1)}return o}(this._boundaries,t);this._current.buckets.counts[e]+=1}},t.prototype.setStartTime=function(t){this.startTime=t},t.prototype.toPointValue=function(){return this._current},t}(),i_=function(){function t(t,e){this._boundaries=t,this._recordMinMax=e,this.kind=il.HISTOGRAM}return t.prototype.createAccumulation=function(t){return new im(t,this._boundaries,this._recordMinMax)},t.prototype.merge=function(t,e){for(var r=t.toPointValue(),n=e.toPointValue(),o=r.buckets.counts,i=n.buckets.counts,a=Array(o.length),s=0;s<o.length;s++)a[s]=o[s]+i[s];var u=1/0,c=-1/0;return this._recordMinMax&&(r.hasMinMax&&n.hasMinMax?(u=Math.min(r.min,n.min),c=Math.max(r.max,n.max)):r.hasMinMax?(u=r.min,c=r.max):n.hasMinMax&&(u=n.min,c=n.max)),new im(t.startTime,r.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:r.buckets.boundaries,counts:a},count:r.count+n.count,sum:r.sum+n.sum,hasMinMax:this._recordMinMax&&(r.hasMinMax||n.hasMinMax),min:u,max:c})},t.prototype.diff=function(t,e){for(var r=t.toPointValue(),n=e.toPointValue(),o=r.buckets.counts,i=n.buckets.counts,a=Array(o.length),s=0;s<o.length;s++)a[s]=i[s]-o[s];return new im(e.startTime,r.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:r.buckets.boundaries,counts:a},count:n.count-r.count,sum:n.sum-r.sum,hasMinMax:!1,min:1/0,max:-1/0})},t.prototype.toMetricData=function(t,e,r,n){return{descriptor:t,aggregationTemporality:e,dataPointType:ic.HISTOGRAM,dataPoints:r.map(function(e){var r=iv(e,2),o=r[0],i=r[1],a=i.toPointValue(),s=t.type===ip.GAUGE||t.type===ip.UP_DOWN_COUNTER||t.type===ip.OBSERVABLE_GAUGE||t.type===ip.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:o,startTime:i.startTime,endTime:n,value:{min:a.hasMinMax?a.min:void 0,max:a.hasMinMax?a.max:void 0,sum:s?void 0:a.sum,buckets:a.buckets,count:a.count}}})}},t}(),ig=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},ib=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},iE=function(){function t(t,e,r,n){void 0===t&&(t=new iT),void 0===e&&(e=0),void 0===r&&(r=0),void 0===n&&(n=0),this.backing=t,this.indexBase=e,this.indexStart=r,this.indexEnd=n}return Object.defineProperty(t.prototype,"offset",{get:function(){return this.indexStart}
9,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return 0===this.backing.length||this.indexEnd===this.indexStart&&0===this.at(0)?0:this.indexEnd-this.indexStart+1},enumerable:!1,configurable:!0}),t.prototype.counts=function(){var t=this;return Array.from({length:this.length},function(e,r){return t.at(r)})},t.prototype.at=function(t){var e=this.indexBase-this.indexStart;return t<e&&(t+=this.backing.length),t-=e,this.backing.countAt(t)},t.prototype.incrementBucket=function(t,e){this.backing.increment(t,e)},t.prototype.decrementBucket=function(t,e){this.backing.decrement(t,e)},t.prototype.trim=function(){for(var t=0;t<this.length;t++)if(0!==this.at(t)){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(0!==this.at(t)){this.indexEnd-=this.length-t-1;break}this._rotate()},t.prototype.downscale=function(t){this._rotate();for(var e=1+this.indexEnd-this.indexStart,r=1<<t,n=0,o=0,i=this.indexStart;i<=this.indexEnd;){var a=i%r;a<0&&(a+=r);for(var s=a;s<r&&n<e;s++)this._relocateBucket(o,n),n++,i++;o++}this.indexStart>>=t,this.indexEnd>>=t,this.indexBase=this.indexStart},t.prototype.clone=function(){return new t(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)},t.prototype._rotate=function(){var t=this.indexBase-this.indexStart;0!==t&&(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)},t.prototype._relocateBucket=function(t,e){t!==e&&this.incrementBucket(t,this.backing.emptyBucket(e))},t}(),iT=function(){function t(t){void 0===t&&(t=[0]),this._counts=t}return Object.defineProperty(t.prototype,"length",{get:function(){return this._counts.length},enumerable:!1,configurable:!0}),t.prototype.countAt=function(t){return this._counts[t]},t.prototype.growTo=function(t,e,r){var n=Array(t).fill(0);n.splice.apply(n,ib([r,this._counts.length-e],ig(this._counts.slice(e)),!1)),n.splice.apply(n,ib([0,e],ig(this._counts.slice(0,e)),!1)),this._counts=n},t.prototype.reverse=function(t,e){for(var r=Math.floor((t+e)/2)-t,n=0;n<r;n++){var o=this._counts[t+n];this._counts[t+n]=this._counts[e-n-1],this._counts[e-n-1]=o}},t.prototype.emptyBucket=function(t){var e=this._counts[t];return this._counts[t]=0,e},t.prototype.increment=function(t,e){this._counts[t]+=e},t.prototype.decrement=function(t,e){this._counts[t]>=e?this._counts[t]-=e:this._counts[t]=0},t.prototype.clone=function(){return new t(ib([],ig(this._counts),!1))},t}();function iS(t){var e=new DataView(new ArrayBuffer(8));return e.setFloat64(0,t),((0x7ff00000&e.getUint32(0))>>20)-1023}function iw(t){var e=new DataView(new ArrayBuffer(8));return e.setFloat64(0,t),(1048575&e.getUint32(0))*0x100000000+e.getUint32(4)}function iO(t,e){return 0===t||t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY||Number.isNaN(t)?t:t*Math.pow(2,e)}var iA=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),iL=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return iA(e,t),e}(Error),iR=function(){function t(t){this._shift=-t}return t.prototype.mapToIndex=function(t){return t<22250738585072014e-324?this._minNormalLowerBoundaryIndex():iS(t)+this._rightShift(iw(t)-1,52)>>this._shift},t.prototype.lowerBoundary=function(t){var e=this._minNormalLowerBoundaryIndex();if(t<e)throw new iL("underflow: "+t+" is < minimum lower boundary: "+e);var r=this._maxNormalLowerBoundaryIndex();if(t>r)throw new iL("overflow: "+t+" is > maximum lower boundary: "+r);return iO(1,t<<this._shift)},Object.defineProperty(t.prototype,"scale",{get:function(){return 0===this._shift?0:-this._shift}
9,enumerable:!1,configurable:!0}),t.prototype._minNormalLowerBoundaryIndex=function(){var t=-1022>>this._shift;return this._shift<2&&t--,t},t.prototype._maxNormalLowerBoundaryIndex=function(){return 1023>>this._shift},t.prototype._rightShift=function(t,e){return Math.floor(t*Math.pow(2,-e))},t}(),iC=function(){function t(t){this._scale=t,this._scaleFactor=iO(Math.LOG2E,t),this._inverseFactor=iO(Math.LN2,-t)}return t.prototype.mapToIndex=function(t){if(t<=22250738585072014e-324)return this._minNormalLowerBoundaryIndex()-1;if(0===iw(t))return(iS(t)<<this._scale)-1;var e=Math.floor(Math.log(t)*this._scaleFactor),r=this._maxNormalLowerBoundaryIndex();return e>=r?r:e},t.prototype.lowerBoundary=function(t){var e=this._maxNormalLowerBoundaryIndex();if(t>=e){if(t===e)return 2*Math.exp((t-(1<<this._scale))/this._scaleFactor);throw new iL("overflow: "+t+" is > maximum lower boundary: "+e)}var r=this._minNormalLowerBoundaryIndex();if(t<=r){if(t===r)return 22250738585072014e-324;if(t===r-1)return Math.exp((t+(1<<this._scale))/this._scaleFactor)/2;throw new iL("overflow: "+t+" is < minimum lower boundary: "+r)}return Math.exp(t*this._inverseFactor)},Object.defineProperty(t.prototype,"scale",{get:function(){return this._scale},enumerable:!1,configurable:!0}),t.prototype._minNormalLowerBoundaryIndex=function(){return -1022<<this._scale},t.prototype._maxNormalLowerBoundaryIndex=function(){return(1024<<this._scale)-1},t}(),ix=Array.from({length:31},function(t,e){return e>10?new iC(e-10):new iR(e-10)});function iP(t){if(t>20||t<-10)throw new iL("expected scale >= -10 && <= 20, got: "+t);return ix[t+10]}var iN=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},iM=function(){function t(t,e){this.low=t,this.high=e}return t.combine=function(e,r){return new t(Math.min(e.low,r.low),Math.max(e.high,r.high))},t}(),iI=function(){function t(t,e,r,n,o,i,a,s,u,c,l){void 0===e&&(e=160),void 0===r&&(r=!0),void 0===n&&(n=0),void 0===o&&(o=0),void 0===i&&(i=0),void 0===a&&(a=Number.POSITIVE_INFINITY),void 0===s&&(s=Number.NEGATIVE_INFINITY),void 0===u&&(u=new iE),void 0===c&&(c=new iE),void 0===l&&(l=iP(20)),this.startTime=t,this._maxSize=e,this._recordMinMax=r,this._sum=n,this._count=o,this._zeroCount=i,this._min=a,this._max=s,this._positive=u,this._negative=c,this._mapping=l,this._maxSize<2&&(et.warn("Exponential Histogram Max Size set to "+this._maxSize+",                 changing to the minimum size of: 2"),this._maxSize=2)}return t.prototype.record=function(t){this.updateByIncrement(t,1)},t.prototype.setStartTime=function(t){this.startTime=t},t.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(t.prototype,"sum",{get:function(){return this._sum},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this._min},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this._max},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zeroCount",{get:function(){return this._zeroCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scale",{get:function(){return this._count===this._zeroCount?0:this._mapping.scale},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"positive",{get:function(){return this._positive},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"negative",{get:function(){return this._negative},enumerable:!1,configurable:!0}),t.prototype.updateByIncrement=function(t,e){if(!Number.isNaN(t)){if(t>this._max&&(this._max=t),t<this._min&&(this._min=t),this._count+=e,0===t){this._zeroCount+=e;return}this._sum+=t*e,t>0?this._updateBuckets(this._positive,t,e):this._updateBuckets(this._negative,-t,e)}},t.prototype.merge=function(t){0===this._count?(this._min=t.min,this._max=t.max):0!==t.count&&(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 e=this._minScale(t);this._downscale(this.scale-e),this._mergeBuckets(this.positive,t,t.positive,e),this._mergeBuckets(this.negative,t,t.negative,e)},t.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 e=this._minScale(t);this._downscale(this.scale-e),this._diffBuckets(this.positive,t,t.positive,e),this._diffBuckets(this.negative,t,t.negative,e)},t.prototype.clone=function(){return new t(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)},t.prototype._updateBuckets=function(t,e,r){var n=this._mapping.mapToIndex(e),o=!1,i=0,a=0;if(0===t.length?(t.indexStart=n,t.indexEnd=t.indexStart,t.indexBase=t.indexStart):n<t.indexStart&&t.indexEnd-n>=this._maxSize?(o=!0,a=n,i=t.indexEnd):n>t.indexEnd&&n-t.indexStart>=this._maxSize&&(o=!0,a=t.indexStart,i=n),o){var s=this._changeScale(i,a);this._downscale(s),n=this._mapping.mapToIndex(e)}this._incrementIndexBy(t,n,r)},t.prototype._incrementIndexBy=function(t,e,r){if(0!==r){if(0===t.length&&(t.indexStart=t.indexEnd=t.indexBase=e),e<t.indexStart){var n=t.indexEnd-e;n>=t.backing.length&&this._grow(t,n+1),t.indexStart=e}else if(e>t.indexEnd){var n=e-t.indexStart;n>=t.backing.length&&this._grow(t,n+1),t.indexEnd=e}var o=e-t.indexBase;o<0&&(o+=t.backing.length),t.incrementBucket(o,r)}},t.prototype._grow=function(t,e){var r,n=t.backing.length,o=t.indexBase-t.indexStart,i=(r=e,r--,r|=r>>1,r|=r>>2,r|=r>>4,r|=r>>8,r|=r>>16,++r);i>this._maxSize&&(i=this._maxSize);var a=i-o;t.backing.growTo(i,n-o,a)},t.prototype._changeScale=function(t,e){for(var r=0;t-e>=this._maxSize;)t>>=1,e>>=1,r++;return r},t.prototype._downscale=function(t){if(0!==t){if(t<0)throw Error("impossible change of scale: "+this.scale);var e=this._mapping.scale-t;this._positive.downscale(t),this._negative.downscale(t),this._mapping=iP(e)}},t.prototype._minScale=function(t){var e=Math.min(this.scale,t.scale),r=iM.combine(this._highLowAtScale(this.positive,this.scale,e),this._highLowAtScale(t.positive,t.scale,e)),n=iM.combine(this._highLowAtScale(this.negative,this.scale,e),this._highLowAtScale(t.negative,t.scale,e));return Math.min(e-this._changeScale(r.high,r.low),e-this._changeScale(n.high,n.low))},t.prototype._highLowAtScale=function(t,e,r){if(0===t.length)return new iM(0,-1);var n=e-r;return new iM(t.indexStart>>n,t.indexEnd>>n)},t.prototype._mergeBuckets=function(t,e,r,n){for(var o=r.offset,i=e.scale-n,a=0;a<r.length;a++)this._incrementIndexBy(t,o+a>>i,r.at(a))},t.prototype._diffBuckets=function(t,e,r,n){for(var o=r.offset,i=e.scale-n,a=0;a<r.length;a++){var s=(o+a>>i)-t.indexBase;s<0&&(s+=t.backing.length),t.decrementBucket(s,r.at(a))}t.trim()},t}(),ik=function(){function t(t,e){this._maxSize=t,this._recordMinMax=e,this.kind=il.EXPONENTIAL_HISTOGRAM}return t.prototype.createAccumulation=function(t){return new iI(t,this._maxSize,this._recordMinMax)},t.prototype.merge=function(t,e){var r=e.clone();return r.merge(t),r},t.prototype.diff=function(t,e){var r=e.clone();return r.diff(t),r},t.prototype.toMetricData=function(t,e,r,n){return{descriptor:t,aggregationTemporality:e,dataPointType:ic.EXPONENTIAL_HISTOGRAM,dataPoints:r.map(function(e){var r=iN(e,2),o=r[0],i=r[1],a=i.toPointValue(),s=t.type===ip.GAUGE||t.type===ip.UP_DOWN_COUNTER||t.type===ip.OBSERVABLE_GAUGE||t.type===ip.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:o,startTime:i.startTime,endTime:n,value:{min:a.hasMinMax?a.min:void 0,max:a.hasMinMax?a.max:void 0,sum:s?void 0:a.sum,positive:{offset:a.positive.offset,bucketCounts:a.positive.bu
9cketCounts},negative:{offset:a.negative.offset,bucketCounts:a.negative.bucketCounts},count:a.count,scale:a.scale,zeroCount:a.zeroCount}}})}},t}(),iD=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},iU=function(){function t(t,e,r){void 0===e&&(e=0),void 0===r&&(r=[0,0]),this.startTime=t,this._current=e,this.sampleTime=r}return t.prototype.record=function(t){this._current=t,this.sampleTime=eX(Date.now())},t.prototype.setStartTime=function(t){this.startTime=t},t.prototype.toPointValue=function(){return this._current},t}(),ij=function(){function t(){this.kind=il.LAST_VALUE}return t.prototype.createAccumulation=function(t){return new iU(t)},t.prototype.merge=function(t,e){var r=eJ(e.sampleTime)>=eJ(t.sampleTime)?e:t;return new iU(t.startTime,r.toPointValue(),r.sampleTime)},t.prototype.diff=function(t,e){var r=eJ(e.sampleTime)>=eJ(t.sampleTime)?e:t;return new iU(e.startTime,r.toPointValue(),r.sampleTime)},t.prototype.toMetricData=function(t,e,r,n){return{descriptor:t,aggregationTemporality:e,dataPointType:ic.GAUGE,dataPoints:r.map(function(t){var e=iD(t,2),r=e[0],o=e[1];return{attributes:r,startTime:o.startTime,endTime:n,value:o.toPointValue()}})}},t}(),iB=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},iH=function(){function t(t,e,r,n){void 0===r&&(r=0),void 0===n&&(n=!1),this.startTime=t,this.monotonic=e,this._current=r,this.reset=n}return t.prototype.record=function(t){this.monotonic&&t<0||(this._current+=t)},t.prototype.setStartTime=function(t){this.startTime=t},t.prototype.toPointValue=function(){return this._current},t}(),iF=function(){function t(t){this.monotonic=t,this.kind=il.SUM}return t.prototype.createAccumulation=function(t){return new iH(t,this.monotonic)},t.prototype.merge=function(t,e){var r=t.toPointValue(),n=e.toPointValue();return e.reset?new iH(e.startTime,this.monotonic,n,e.reset):new iH(t.startTime,this.monotonic,r+n)},t.prototype.diff=function(t,e){var r=t.toPointValue(),n=e.toPointValue();return this.monotonic&&r>n?new iH(e.startTime,this.monotonic,n,!0):new iH(e.startTime,this.monotonic,n-r)},t.prototype.toMetricData=function(t,e,r,n){return{descriptor:t,aggregationTemporality:e,dataPointType:ic.SUM,dataPoints:r.map(function(t){var e=iB(t,2),r=e[0],o=e[1];return{attributes:r,startTime:o.startTime,endTime:n,value:o.toPointValue()}}),isMonotonic:this.monotonic}},t}(),iV=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),iG=function(){function t(){}return t.Drop=function(){return iZ},t.Sum=function(){return iK},t.LastValue=function(){return iQ},t.Histogram=function(){return i0},t.ExponentialHistogram=function(){return i1},t.Default=function(){return i2},t}(),iz=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return iV(e,t),e.prototype.createAggregator=function(t){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new ih,e}(iG),iX=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return iV(e,t),e.prototype.createAggregator=function(t){switch(t.type){case ip.COUNTER:case ip.OBSERVABLE_COUNTER:case ip.HISTOGRAM:return e.MONOTONIC_INSTANCE;default:return e.NON_MONOTONIC_INSTANCE}},e.MONOTONIC_INSTANCE=new iF(!0),e.NON_MONOTONIC_INSTANCE=new iF(!1),e}(iG),iq=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return iV(e,t),e.prototype.createAggregator=function(t){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new ij,e}(iG),iW=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return iV(e,t),e.prototype.createAggregator=function(t){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new i_([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),e}(iG),i$=function(t){function e(e,r){void 0===r&&(r=!0);var n=t.call(this)||this;if(n._recordMinMax=r,null==e)throw Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");var o=(e=(e=e.concat()).sort(function(t,e){return t-e})).lastIndexOf(-1/0),i=e.indexOf(1/0);return -1===i&&(i=void 0),n._boundaries=e.slice(o+1,i),n}return iV(e,t),e.prototype.createAggregator=function(t){return new i_(this._boundaries,this._recordMinMax)},e}(iG),iY=function(t){function e(e,r){void 0===e&&(e=160),void 0===r&&(r=!0);var n=t.call(this)||this;return n._maxSize=e,n._recordMinMax=r,n}return iV(e,t),e.prototype.createAggregator=function(t){return new ik(this._maxSize,this._recordMinMax)},e}(iG),iJ=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return iV(e,t),e.prototype._resolve=function(t){switch(t.type){case ip.COUNTER:case ip.UP_DOWN_COUNTER:case ip.OBSERVABLE_COUNTER:case ip.OBSERVABLE_UP_DOWN_COUNTER:return iK;case ip.GAUGE:case ip.OBSERVABLE_GAUGE:return iQ;case ip.HISTOGRAM:return t.advice.explicitBucketBoundaries?new i$(t.advice.explicitBucketBoundaries):i0}
9return et.warn("Unable to recognize instrument type: "+t.type),iZ},e.prototype.createAggregator=function(t){return this._resolve(t).createAggregator(t)},e}(iG),iZ=new iz,iK=new iX,iQ=new iq,i0=new iW,i1=new iY,i2=new iJ,i3=function(t){return iG.Default()},i4=function(t){return iu.CUMULATIVE},i5=function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(a,s)}u((n=n.apply(t,e||[])).next())})},i6=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i8=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},i9=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},i7=function(){function t(t){var e,r,n;this._shutdown=!1,this._aggregationSelector=null!==(e=null==t?void 0:t.aggregationSelector)&&void 0!==e?e:i3,this._aggregationTemporalitySelector=null!==(r=null==t?void 0:t.aggregationTemporalitySelector)&&void 0!==r?r:i4,this._metricProducers=null!==(n=null==t?void 0:t.metricProducers)&&void 0!==n?n:[],this._cardinalitySelector=null==t?void 0:t.cardinalitySelector}return t.prototype.setMetricProducer=function(t){if(this._sdkMetricProducer)throw Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=t,this.onInitialized()},t.prototype.selectAggregation=function(t){return this._aggregationSelector(t)},t.prototype.selectAggregationTemporality=function(t){return this._aggregationTemporalitySelector(t)},t.prototype.selectCardinalityLimit=function(t){return this._cardinalitySelector?this._cardinalitySelector(t):2e3},t.prototype.onInitialized=function(){},t.prototype.collect=function(t){return i5(this,void 0,void 0,function(){var e,r,n,o;return i6(this,function(i){switch(i.label){case 0:if(void 0===this._sdkMetricProducer)throw Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw Error("MetricReader is shutdown");return[4,Promise.all(i9([this._sdkMetricProducer.collect({timeoutMillis:null==t?void 0:t.timeoutMillis})],i8(this._metricProducers.map(function(e){return e.collect({timeoutMillis:null==t?void 0:t.timeoutMillis})})),!1))];case 1:return r=(e=i8.apply(void 0,[i.sent()]))[0],n=e.slice(1),o=r.errors.concat(is(n,function(t){return t.errors})),[2,{resourceMetrics:{resource:r.resourceMetrics.resource,scopeMetrics:r.resourceMetrics.scopeMetrics.concat(is(n,function(t){return t.resourceMetrics.scopeMetrics}))},errors:o}]}})})},t.prototype.shutdown=function(t){return i5(this,void 0,void 0,function(){return i6(this,function(e){switch(e.label){case 0:return this._shutdown?(et.error("Cannot call shutdown twice."),[2]):(null==t?void 0:t.timeoutMillis)!=null?[3,2]:[4,this.onShutdown()];case 1:return e.sent(),[3,4];case 2:return[4,ii(this.onShutdown(),t.timeoutMillis)];case 3:e.sent(),e.label=4;case 4:return this._shutdown=!0,[2]}})})},t.prototype.forceFlush=function(t){return i5(this,void 0,void 0,function(){return i6(this,function(e){switch(e.label){case 0:return this._shutdown?(et.warn("Cannot forceFlush on already shutdown MetricReader."),[2]):(null==t?void 0:t.t
9imeoutMillis)!=null?[3,2]:[4,this.onForceFlush()];case 1:case 3:return e.sent(),[2];case 2:return[4,ii(this.onForceFlush(),t.timeoutMillis)]}})})},t}(),at=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ae=function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(a,s)}u((n=n.apply(t,e||[])).next())})},ar=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},an=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},ao=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},ai=function(t){function e(e){var r,n,o,i,a=t.call(this,{aggregationSelector:null===(r=e.exporter.selectAggregation)||void 0===r?void 0:r.bind(e.exporter),aggregationTemporalitySelector:null===(n=e.exporter.selectAggregationTemporality)||void 0===n?void 0:n.bind(e.exporter),metricProducers:e.metricProducers})||this;if(void 0!==e.exportIntervalMillis&&e.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(void 0!==e.exportTimeoutMillis&&e.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(void 0!==e.exportTimeoutMillis&&void 0!==e.exportIntervalMillis&&e.exportIntervalMillis<e.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");return a._exportInterval=null!==(o=e.exportIntervalMillis)&&void 0!==o?o:6e4,a._exportTimeout=null!==(i=e.exportTimeoutMillis)&&void 0!==i?i:3e4,a._exporter=e.exporter,a}return at(e,t),e.prototype._runOnce=function(){return ae(this,void 0,void 0,function(){var t;return ar(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,ii(this._doRun(),this._exportTimeout)];case 1:return e.sent(),[3,3];case 2:return(t=e.sent())instanceof io?(et.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout),[2]):(eL(t),[3,3]);case 3:return[2]}})})},e.prototype._doRun=function(){var t,e;return ae(this,void 0,void 0,function(){var r,n,o,i,a,s;return ar(this,function(u){switch(u.label){case 0:return[4,this.collect({timeoutMillis:this._exportTimeout})];case 1:if(n=(r=u.sent()).resourceMetrics,(o=r.errors).length>0&&(s=et).error.apply(s,ao(["PeriodicExportingMetricReader: metrics collection errors"],an(o),!1)),!n.resource.asyncAttributesPending)return[3,5];u.label=2;case 2:return u.trys.push([2,4,,5]),[4,null===(e=(t=n.resource).waitForAsyncAttributes)||void 0===e?void 0:e.call(t)];case 3:return u.sent(),[3,5];case 4:return i=u.sent(),et.debug("Error while resolving async portion of resource: ",i),eL(i),[3,5];case 5:return 0===n.scopeMetrics.length?[2]:[4,rS._export(this._exporter,n)];case 6:if((a=u.sent()).code!==rX.SUCCESS)throw Error("PeriodicExportingMetricReader: metrics export failed (error "+a.error+")");return[2]}})})},e.prototype.onInitialized=function(){var t=this;this._interval=setInterval(function(){t._runOnce()},this._exportInterval)},e.prototype.onForceFlush=function(){return ae(this,void 0,void 0,function(){return ar(this,function(t){switch(t.label){case 0:return[4,this._runOnce()];case 1:return t.sent(),[4,this._exporter.forceFlush()];case 2:return t.sent(),[2]}})})},e.prototype.onShutdown=function(){return ae(this,void 0,void 0,function(){return ar(this,function(t){switch(t.label){case 0:return this._interval&&clearInterval(this._interval),[4,this.onForceFlush()];case 1:return t.sent(),[4,this._exporter.shutdown()];case 2:return t.sent(),[2]}})})},e}(i7),aa=function(){function t(){this._registeredViews=[]}return t.prototype.addView=function(t){this._registeredViews.push(t)},t.prototype.findViews=function(t,e){var r=this;return this._registeredViews.filter(function(n){return r._matchInstrument(n.instrumentSelector,t)&&r._matchMeter(n.meterSelector,e)})},t.prototype._matchInstrument=function(t,e){return(void 0===t.getType()||e.type===t.getType())&&t.getNameFilter().match(e.name)&&t.getUnitFilter().match(e.unit)},t.prototype._matchMeter=function(t,e){return t.getNameFilter().match(e.name)&&(void 0===e.version||t.getVersionFilter().match(e.version))&&(void 0===e.schemaUrl||t.getSchemaUrlFilter().match(e.schemaUrl))},t}(),as=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]}
9)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),au=function(){function t(t,e){this._writableMetricStorage=t,this._descriptor=e}return t.prototype._record=function(t,e,r){if(void 0===e&&(e={}),void 0===r&&(r=t7.active()),"number"!=typeof t){et.warn("non-number value provided to metric "+this._descriptor.name+": "+t);return}(this._descriptor.valueType!==tR.INT||Number.isInteger(t)||(et.warn("INT value type cannot accept a floating-point value for "+this._descriptor.name+", ignoring the fractional digits."),Number.isInteger(t=Math.trunc(t))))&&this._writableMetricStorage.record(t,e,r,eX(Date.now()))},t}(),ac=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return as(e,t),e.prototype.add=function(t,e,r){this._record(t,e,r)},e}(au),al=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return as(e,t),e.prototype.add=function(t,e,r){if(t<0){et.warn("negative value provided to counter "+this._descriptor.name+": "+t);return}this._record(t,e,r)},e}(au),ap=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return as(e,t),e.prototype.record=function(t,e,r){this._record(t,e,r)},e}(au),af=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return as(e,t),e.prototype.record=function(t,e,r){if(t<0){et.warn("negative value provided to histogram "+this._descriptor.name+": "+t);return}this._record(t,e,r)},e}(au),ah=function(){function t(t,e,r){this._observableRegistry=r,this._descriptor=t,this._metricStorages=e}return t.prototype.addCallback=function(t){this._observableRegistry.addCallback(t,this)},t.prototype.removeCallback=function(t){this._observableRegistry.removeCallback(t,this)},t}(),ad=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return as(e,t),e}(ah),ay=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return as(e,t),e}(ah),av=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return as(e,t),e}(ah);function am(t){return t instanceof ah}var a_=function(){function t(t){this._meterSharedState=t}return t.prototype.createGauge=function(t,e){var r=id(t,ip.GAUGE,e);return new ap(this._meterSharedState.registerMetricStorage(r),r)},t.prototype.createHistogram=function(t,e){var r=id(t,ip.HISTOGRAM,e);return new af(this._meterSharedState.registerMetricStorage(r),r)},t.prototype.createCounter=function(t,e){var r=id(t,ip.COUNTER,e);return new al(this._meterSharedState.registerMetricStorage(r),r)},t.prototype.createUpDownCounter=function(t,e){var r=id(t,ip.UP_DOWN_COUNTER,e);return new ac(this._meterSharedState.registerMetricStorage(r),r)},t.prototype.createObservableGauge=function(t,e){var r=id(t,ip.OBSERVABLE_GAUGE,e),n=this._meterSharedState.registerAsyncMetricStorage(r);return new ay(r,n,this._meterSharedState.observableRegistry)},t.prototype.createObservableCounter=function(t,e){var r=id(t,ip.OBSERVABLE_COUNTER,e),n=this._meterSharedState.registerAsyncMetricStorage(r);return new ad(r,n,this._meterSharedState.observableRegistry)},t.prototype.createObservableUpDownCounter=function(t,e){var r=id(t,ip.OBSERVABLE_UP_DOWN_COUNTER,e),n=this._meterSharedState.registerAsyncMetricStorage(r);return new av(r,n,this._meterSharedState.observableRegistry)},t.prototype.addBatchObservableCallback=function(t,e){this._meterSharedState.observableRegistry.addBatchCallback(t,e)},t.prototype.removeBatchObservableCallback=function(t,e){this._meterSharedState.observableRegistry.removeBatchCallback(t,e)},t}(),ag=function(){function t(t){this._instrumentDescriptor=t}return t.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},t.prototype.updateDescription=function(t){this._instrumentDescriptor=id(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:t,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},t}(),ab=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]}
9)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),aE=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},aT=function(t){function e(){return t.call(this,ir)||this}return ab(e,t),e}(function(){function t(t){this._hash=t,this._valueMap=new Map,this._keyMap=new Map}return t.prototype.get=function(t,e){return null!=e||(e=this._hash(t)),this._valueMap.get(e)},t.prototype.getOrDefault=function(t,e){var r=this._hash(t);if(this._valueMap.has(r))return this._valueMap.get(r);var n=e();return this._keyMap.has(r)||this._keyMap.set(r,t),this._valueMap.set(r,n),n},t.prototype.set=function(t,e,r){null!=r||(r=this._hash(t)),this._keyMap.has(r)||this._keyMap.set(r,t),this._valueMap.set(r,e)},t.prototype.has=function(t,e){return null!=e||(e=this._hash(t)),this._valueMap.has(e)},t.prototype.keys=function(){var t,e;return aE(this,function(r){switch(r.label){case 0:e=(t=this._keyMap.entries()).next(),r.label=1;case 1:return!0===e.done?[3,3]:[4,[e.value[1],e.value[0]]];case 2:return r.sent(),e=t.next(),[3,1];case 3:return[2]}})},t.prototype.entries=function(){var t,e;return aE(this,function(r){switch(r.label){case 0:e=(t=this._valueMap.entries()).next(),r.label=1;case 1:return!0===e.done?[3,3]:[4,[this._keyMap.get(e.value[0]),e.value[1],e.value[0]]];case 2:return r.sent(),e=t.next(),[3,1];case 3:return[2]}})},Object.defineProperty(t.prototype,"size",{get:function(){return this._valueMap.size},enumerable:!1,configurable:!0}),t}()),aS=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},aw=function(){function t(t,e){this._aggregator=t,this._activeCollectionStorage=new aT,this._cumulativeMemoStorage=new aT,this._overflowAttributes={"otel.metric.overflow":!0},this._cardinalityLimit=(null!=e?e:2e3)-1,this._overflowHashCode=ir(this._overflowAttributes)}return t.prototype.record=function(t,e,r,n){var o=this,i=this._activeCollectionStorage.get(e);if(!i){if(this._activeCollectionStorage.size>=this._cardinalityLimit){var a=this._activeCollectionStorage.getOrDefault(this._overflowAttributes,function(){return o._aggregator.createAccumulation(n)});null==a||a.record(t);return}i=this._aggregator.createAccumulation(n),this._activeCollectionStorage.set(e,i)}null==i||i.record(t)},t.prototype.batchCumulate=function(t,e){var r=this;Array.from(t.entries()).forEach(function(t){var n=aS(t,3),o=n[0],i=n[1],a=n[2],s=r._aggregator.createAccumulation(e);null==s||s.record(i);var u=s;if(r._cumulativeMemoStorage.has(o,a)){var c=r._cumulativeMemoStorage.get(o,a);u=r._aggregator.diff(c,s)}else if(r._cumulativeMemoStorage.size>=r._cardinalityLimit&&(o=r._overflowAttributes,a=r._overflowHashCode,r._cumulativeMemoStorage.has(o,a))){var c=r._cumulativeMemoStorage.get(o,a);u=r._aggregator.diff(c,s)}if(r._activeCollectionStorage.has(o,a)){var l=r._activeCollectionStorage.get(o,a);u=r._aggregator.merge(l,u)}r._cumulativeMemoStorage.set(o,s,a),r._activeCollectionStorage.set(o,u,a)})},t.prototype.collect=function(){var t=this._activeCollectionStorage;return this._activeCollectionStorage=new aT,t},t}(),aO=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},aA=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},aL=function(){function t(t,e){var r=this;this._aggregator=t,this._unreportedAccumulations=new Map,this._reportHistory=new Map,e.forEach(function(t){r._unreportedAccumulations.set(t,[])})}return t.prototype.buildMetrics=function(e,r,n,o){this._stashAccumulations(n);var i,a=this._getMergedUnreportedAccumulations(e),s=a;if(this._reportHistory.has(e)){var u=this._reportHistory.get(e),c=u.collectionTime;s=(i=u.aggregationTemporality)===iu.CUMULATIVE?t.merge(u.accumulations,a,this._aggregator):t.calibrateStartTime(u.accumulations,a,c)}else i=e.selectAggregationTemporality(r.type);this._reportHistory.set(e,{accumulations:s,collectionTime:o,aggregationTemporality:i});var l=Array.from(s.entries());if(0!==l.length)return this._aggregator.toMetricData(r,i,l,o)},t.prototype._stashAccumulations=function(t){var e,r,n=this._unreportedAccumulations.keys();try{for(var o=aO(n),i=o.next();!i.done;i=o.next()){var a=i.value,s=this._unreportedAccumulations.get(a);void 0===s&&(s=[],this._unreportedAccumulations.set(a,s)),s.push(t)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}},t.prototype._getMergedUnreportedAccumulations=function(e){var r,n,o=new aT,i=this._unreportedAccumulations.get(e);if(this._unreportedAccumulations.set(e,[]),void 0===i)return o;try{for(var a=aO(i),s=a.next();!s.done;s=a.next()){var u=s.value;o=t.merge(o,u,this._aggregator)}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o},t.merge=function(t,e,r){for(var n=e.entries(),o=n.next();!0!==o.done;){var i=aA(o.value,3),a=i[0],s=i[1],u=i[2];if(t.has(a,u)){var c=t.get(a,u),l=r.merge(c,s);t.set(a,l,u)}else t.set(a,s,u);o=n.next()}return t},t.calibrateStartTime=function(t,e,r){var n,o;try{for(var i=aO(t.keys()),a=i.next();!a.done;a=i.next()){var s=aA(a.value,2),u=s[0],c=s[1],l=e.get(u,c);null==l||l.setStartTime(r)}}catch(t){n={error:t}}
9finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return e},t}(),aR=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),aC=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},ax=function(t){function e(e,r,n,o,i){var a=t.call(this,e)||this;return a._attributesProcessor=n,a._aggregationCardinalityLimit=i,a._deltaMetricStorage=new aw(r,a._aggregationCardinalityLimit),a._temporalMetricStorage=new aL(r,o),a}return aR(e,t),e.prototype.record=function(t,e){var r=this,n=new aT;Array.from(t.entries()).forEach(function(t){var e=aC(t,2),o=e[0],i=e[1];n.set(r._attributesProcessor.process(o),i)}),this._deltaMetricStorage.batchCumulate(n,e)},e.prototype.collect=function(t,e){var r=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(t,this._instrumentDescriptor,r,e)},e}(ag);function aP(t,e){var r="";return t.unit!==e.unit&&(r+="	- Unit '"+t.unit+"' does not match '"+e.unit+`'
10`),t.type!==e.type&&(r+="	- Type '"+t.type+"' does not match '"+e.type+`'
11`),t.valueType!==e.valueType&&(r+="	- Value Type '"+t.valueType+"' does not match '"+e.valueType+`'
12`),t.description!==e.description&&(r+="	- Description '"+t.description+"' does not match '"+e.description+`'
13`),r}function aN(t,e){var r,n;return t.valueType!==e.valueType?"	- use valueType '"+t.valueType+"' on instrument creation or use an instrument name other than '"+e.name+"'":t.unit!==e.unit?"	- use unit '"+t.unit+"' on instrument creation or use an instrument name other than '"+e.name+"'":t.type!==e.type?(r=JSON.stringify({name:e.name,type:e.type,unit:e.unit}),"	- create a new view with a name other than '"+t.name+"' and InstrumentSelector '"+r+"'"):t.description!==e.description?(n=JSON.stringify({name:e.name,type:e.type,unit:e.unit}),"	- create a new view with a name other than '"+t.name+"' and InstrumentSelector '"+n+`'
14    	- OR - create a new view with the name `+t.name+" and description '"+t.description+"' and InstrumentSelector "+n+`
15    	- OR - create a new view with the name `+e.name+" and description '"+t.description+"' and InstrumentSelector "+n):""}var aM=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},aI=function(){function t(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}return t.create=function(){return new t},t.prototype.getStorages=function(t){var e,r,n,o,i=[];try{for(var a=aM(this._sharedRegistry.values()),s=a.next();!s.done;s=a.next()){var u=s.value;i=i.concat(u)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}var c=this._perCollectorRegistry.get(t);if(null!=c)try{for(var l=aM(c.values()),p=l.next();!p.done;p=l.next()){var u=p.value;i=i.concat(u)}}catch(t){n={error:t}}finally{try{p&&!p.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}return i},t.prototype.register=function(t){this._registerStorage(t,this._sharedRegistry)},t.prototype.registerForCollector=function(t,e){var r=this._perCollectorRegistry.get(t);null==r&&(r=new Map,this._perCollectorRegistry.set(t,r)),this._registerStorage(e,r)},t.prototype.findOrUpdateCompatibleStorage=function(t){var e=this._sharedRegistry.get(t.name);return void 0===e?null:this._findOrUpdateCompatibleStorage(t,e)},t.prototype.findOrUpdateCompatibleCollectorStorage=function(t,e){var r=this._perCollectorRegistry.get(t);if(void 0===r)return null;
15var n=r.get(e.name);return void 0===n?null:this._findOrUpdateCompatibleStorage(e,n)},t.prototype._registerStorage=function(t,e){var r=t.getInstrumentDescriptor(),n=e.get(r.name);if(void 0===n){e.set(r.name,[t]);return}n.push(t)},t.prototype._findOrUpdateCompatibleStorage=function(t,e){var r,n,o=null;try{for(var i=aM(e),a=i.next();!a.done;a=i.next()){var s=a.value,u=s.getInstrumentDescriptor();(function(t,e){var r,n;return r=t.name,n=e.name,r.toLowerCase()===n.toLowerCase()&&t.unit===e.unit&&t.type===e.type&&t.valueType===e.valueType})(u,t)?(u.description!==t.description&&(t.description.length>u.description.length&&s.updateDescription(t.description),et.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.
16`,`Details:
17`,aP(u,t),`The longer description will be used.
18To resolve the conflict:`,aN(u,t))),o=s):et.warn("A view or instrument with the name ",t.name,` has already been registered and is incompatible with another registered view.
19`,`Details:
20`,aP(u,t),`To resolve the conflict:
21`,aN(u,t))}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o},t}(),ak=function(){function t(t){this._backingStorages=t}return t.prototype.record=function(t,e,r,n){this._backingStorages.forEac
21h(function(o){o.record(t,e,r,n)})},t}(),aD=function(){function t(t,e){this._instrumentName=t,this._valueType=e,this._buffer=new aT}return t.prototype.observe=function(t,e){if(void 0===e&&(e={}),"number"!=typeof t){et.warn("non-number value provided to metric "+this._instrumentName+": "+t);return}(this._valueType!==tR.INT||Number.isInteger(t)||(et.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),Number.isInteger(t=Math.trunc(t))))&&this._buffer.set(e,t)},t}(),aU=function(){function t(){this._buffer=new Map}return t.prototype.observe=function(t,e,r){if(void 0===r&&(r={}),am(t)){var n=this._buffer.get(t);if(null==n&&(n=new aT,this._buffer.set(t,n)),"number"!=typeof e){et.warn("non-number value provided to metric "+t._descriptor.name+": "+e);return}(t._descriptor.valueType!==tR.INT||Number.isInteger(e)||(et.warn("INT value type cannot accept a floating-point value for "+t._descriptor.name+", ignoring the fractional digits."),Number.isInteger(e=Math.trunc(e))))&&n.set(r,e)}},t}(),aj=function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(a,s)}u((n=n.apply(t,e||[])).next())})},aB=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},aH=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},aF=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},aV=function(){function t(){this._callbacks=[],this._batchCallbacks=[]}return t.prototype.addCallback=function(t,e){this._findCallback(t,e)>=0||this._callbacks.push({callback:t,instrument:e})},t.prototype.removeCallback=function(t,e){var r=this._findCallback(t,e);r<0||this._callbacks.splice(r,1)},t.prototype.addBatchCallback=function(t,e){var r=new Set(e.filter(am));if(0===r.size){et.error("BatchObservableCallback is not associated with valid instruments",e);return}this._findBatchCallback(t,r)>=0||this._batchCallbacks.push({callback:t,instruments:r})},t.prototype.removeBatchCallback=function(t,e){var r=new Set(e.filter(am)),n=this._findBatchCallback(t,r);n<0||this._batchCallbacks.splice(n,1)},t.prototype.observe=function(t,e){return aj(this,void 0,void 0,function(){var r,n;return aB(this,function(o){switch(o.label){case 0:return r=this._observeCallbacks(t,e),n=this._observeBatchCallbacks(t,e),[4,function(t){return o6(this,void 0,void 0,function(){var e=this;return o8(this,function(r){return[2,Promise.all(t.map(function(t){return o6(e,void 0,void 0,function(){return o8(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,t];case 1:return[2,{status:"fulfilled",value:e.sent()}];case 2:return[2,{status:"rejected",reason:e.sent()}];case 3:return[2]}})})}))]})})}(aF(aF([],aH(r),!1),aH(n),!1))];case 1:return[2,o.sent().filter(ia).map(function(t){return t.reason})]}})})},t.prototype._observeCallbacks=function(t,e){var r=this;return this._callbacks.map(function(n){var o=n.callback,i=n.instrument;return aj(r,void 0,void 0,function(){var r,n;return aB(this,function(a){switch(a.label){case 0:return n=Promise.resolve(o(r=ne
21w aD(i._descriptor.name,i._descriptor.valueType))),null!=e&&(n=ii(n,e)),[4,n];case 1:return a.sent(),i._metricStorages.forEach(function(e){e.record(r._buffer,t)}),[2]}})})})},t.prototype._observeBatchCallbacks=function(t,e){var r=this;return this._batchCallbacks.map(function(n){var o=n.callback,i=n.instruments;return aj(r,void 0,void 0,function(){var r,n;return aB(this,function(a){switch(a.label){case 0:return n=Promise.resolve(o(r=new aU)),null!=e&&(n=ii(n,e)),[4,n];case 1:return a.sent(),i.forEach(function(e){var n=r._buffer.get(e);null!=n&&e._metricStorages.forEach(function(e){e.record(n,t)})}),[2]}})})})},t.prototype._findCallback=function(t,e){return this._callbacks.findIndex(function(r){return r.callback===t&&r.instrument===e})},t.prototype._findBatchCallback=function(t,e){return this._batchCallbacks.findIndex(function(r){return r.callback===t&&function(t,e){var r,n;if(t.size!==e.size)return!1;try{for(var o=it(t),i=o.next();!i.done;i=o.next()){var a=i.value;if(!e.has(a))return!1}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!0}(r.instruments,e)})},t}(),aG=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),az=function(t){function e(e,r,n,o,i){var a=t.call(this,e)||this;return a._attributesProcessor=n,a._aggregationCardinalityLimit=i,a._deltaMetricStorage=new aw(r,a._aggregationCardinalityLimit),a._temporalMetricStorage=new aL(r,o),a}return aG(e,t),e.prototype.record=function(t,e,r,n){e=this._attributesProcessor.process(e,r),this._deltaMetricStorage.record(t,e,r,n)},e.prototype.collect=function(t,e){var r=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(t,this._instrumentDescriptor,r,e)},e}(ag),aX=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),aq=function(){function t(){}return t.Noop=function(){return a$},t}(),aW=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return aX(e,t),e.prototype.process=function(t,e){return t},e}(aq);!function(t){function e(e){var r=t.call(this)||this;return r._allowedAttributeNames=e,r}aX(e,t),e.prototype.process=function(t,e){var r=this,n={};return Object.keys(t).filter(function(t){return r._allowedAttributeNames.includes(t)}).forEach(function(e){return n[e]=t[e]}),n}}(aq);var a$=new aW,aY=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},aJ=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},aZ=function(){function t(t,e){this._meterProviderSharedState=t,this._instrumentationScope=e,this.metricStorageRegistry=new aI,this.observableRegistry=new aV,this.meter=new a_(this)}return t.prototype.registerMetricStorage=function(t){var e=this._registerMetricStorage(t,az);return 1===e.length?e[0]:new ak(e)},t.prototype.registerAsyncMetricStorage=function(t){return this._registerMetricStorage(t,ax)},t.prototype.collect=function(t,e,r){var n,o,i,a;return n=this,o=void 0,i=void 0,a=function(){var n,o,i;return aY(this,function(a){switch(a.label){case 0:return[4,this.observableRegistry.observe(e,null==r?void 0:r.timeoutMillis)];case 1:return n=a.sent(),0===(o=this.metricStorageRegistry.getStorages(t)).length?[2,null]:0===(i=o.map(function(r){return r.collect(t,e)}).filter(ie)).length?[2,{errors:n}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:i},errors:n}]}})}
21,new(i||(i=Promise))(function(t,e){function r(t){try{u(a.next(t))}catch(t){e(t)}}function s(t){try{u(a.throw(t))}catch(t){e(t)}}function u(e){var n;e.done?t(e.value):((n=e.value)instanceof i?n:new i(function(t){t(n)})).then(r,s)}u((a=a.apply(n,o||[])).next())})},t.prototype._registerMetricStorage=function(t,e){var r=this,n=this._meterProviderSharedState.viewRegistry.findViews(t,this._instrumentationScope).map(function(n){var o,i,a={name:null!==(o=n.name)&&void 0!==o?o:t.name,description:null!==(i=n.description)&&void 0!==i?i:t.description,type:t.type,unit:t.unit,valueType:t.valueType,advice:t.advice},s=r.metricStorageRegistry.findOrUpdateCompatibleStorage(a);if(null!=s)return s;var u=n.aggregation.createAggregator(a),c=new e(a,u,n.attributesProcessor,r._meterProviderSharedState.metricCollectors,n.aggregationCardinalityLimit);return r.metricStorageRegistry.register(c),c});if(0===n.length){var o=this._meterProviderSharedState.selectAggregations(t.type).map(function(n){var o=aJ(n,2),i=o[0],a=o[1],s=r.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(i,t);if(null!=s)return s;var u=a.createAggregator(t),c=i.selectCardinalityLimit(t.type),l=new e(t,u,aq.Noop(),[i],c);return r.metricStorageRegistry.registerForCollector(i,l),l});n=n.concat(o)}return n},t}(),aK=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},aQ=function(){function t(t){this.resource=t,this.viewRegistry=new aa,this.metricCollectors=[],this.meterSharedStates=new Map}return t.prototype.getMeterSharedState=function(t){var e,r,n=t.name+":"+(null!==(e=t.version)&&void 0!==e?e:"")+":"+(null!==(r=t.schemaUrl)&&void 0!==r?r:""),o=this.meterSharedStates.get(n);return null==o&&(o=new aZ(this,t),this.meterSharedStates.set(n,o)),o},t.prototype.selectAggregations=function(t){var e,r,n=[];try{for(var o=aK(this.metricCollectors),i=o.next();!i.done;i=o.next()){var a=i.value;n.push([a,a.selectAggregation(t)])}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t}(),a0=function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(a,s)}u((n=n.apply(t,e||[])).next())})},a1=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a2=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},a3=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},a4=function(){function t(t,e){this._sharedState=t,this._metricReader=e}return t.prototype.collect=function(t){return a0(this,void 0,void 0,function(){var e,r,n,o=this;return a1(this,function(i){switch(i.label){case 0:return e=eX(Date.now()),r=[],n=[],[4,Promise.all(Array.from(this._sharedState.meterSharedStates.values()).map(function(i){return a0(o,void 0,void 0,function(){var o;return a1(this,function(a){switch(a.label){case 0:return[4,i.collect(this,e,t)];case 1:return(null==(o=a.sent())?void 0:o.scopeMetrics)!=null&&r.push(o.scopeMetrics),(null==o?void 0:o.errors)!=null&&n.push.apply(n,a3([],a2(o.errors),!1)),[2]}})})}))];case 1:return i.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:r},errors:n}]}})})},t.prototype.forceFlush=function(t){return a0(this,void 0,void 0,function(){return a1(this,function(e){switch(e.label){case 0:return[4,this._metricReader.forceFlush(t)];case 1:return e.sent(),[2]}})})},t.prototype.shutdown=function(t){return a0(this,void 0,void 0,function(){return a1(this,function(e){switch(e.label){case 0:return[4,this._metricReader.shutdown(t)];case 1:return e.sent(),[2]}})})},t.prototype.selectAggregationTemporality=function(t){return this._metricReader.selectAggregationTemporality(t)},t.prototype.selectAggregation=function(t){return this._metricReader.selectAggregation(t)},t.prototype.selectCardinalityLimit=function(t){var e,r,n;return null!==(n=null===(r=(e=this._metricReader).selectCardinalityLimit)||void 0===r?void 0:r.call(e,t))&&void 0!==n?n:2e3},t}(),a5=function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(a,s)}u((n=n.apply(t,e||[])).next())})},a6=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}
21finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a8=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},a9=function(){function t(t){if(this._shutdown=!1,this._sharedState=new aQ((a=null===(i=null==t?void 0:t.mergeResourceWithDefaults)||void 0===i||i,u=null!=(s=null==t?void 0:t.resource)?s:nf.empty(),a?nf.default().merge(u):u)),(null==t?void 0:t.views)!=null&&t.views.length>0)try{for(var e,r,n,o,i,a,s,u,c=a8(t.views),l=c.next();!l.done;l=c.next()){var p=l.value;this._sharedState.viewRegistry.addView(p)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}if((null==t?void 0:t.readers)!=null&&t.readers.length>0)try{for(var f=a8(t.readers),h=f.next();!h.done;h=f.next()){var d=h.value;this.addMetricReader(d)}}catch(t){n={error:t}}finally{try{h&&!h.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}}return t.prototype.getMeter=function(t,e,r){return void 0===e&&(e=""),void 0===r&&(r={}),this._shutdown?(et.warn("A shutdown MeterProvider cannot provide a Meter"),tg):this._sharedState.getMeterSharedState({name:t,version:e,schemaUrl:r.schemaUrl}).meter},t.prototype.addMetricReader=function(t){var e=new a4(this._sharedState,t);t.setMetricProducer(e),this._sharedState.metricCollectors.push(e)},t.prototype.shutdown=function(t){return a5(this,void 0,void 0,function(){return a6(this,function(e){switch(e.label){case 0:return this._shutdown?(et.warn("shutdown may only be called once per MeterProvider"),[2]):(this._shutdown=!0,[4,Promise.all(this._sharedState.metricCollectors.map(function(e){return e.shutdown(t)}))]);case 1:return e.sent(),[2]}})})},t.prototype.forceFlush=function(t){return a5(this,void 0,void 0,function(){return a6(this,function(e){switch(e.label){case 0:return this._shutdown?(et.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map(function(e){return e.forceFlush(t)}))];case 1:return e.sent(),[2]}})})},t}();function a7(t,e){return t.dataPoints.map(function(r){return function(t,e,r){var n={attributes:o4(t.attributes),startTimeUnixNano:r.encodeHrTime(t.startTime),timeUnixNano:r.encodeHrTime(t.endTime)};switch(e){case tR.INT:n.asInt=t.value;break;case tR.DOUBLE:n.asDouble=t.value}return n}(r,t.descriptor.valueType,e)})}var st=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},se=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},sr={serializeRequest:function(t){var e,r=(e={useLongBits:!1},{resourceMetrics:[t].map(function(t){var r;return r=o0(e),{resource:o2(t.resource),schemaUrl:void 0,scopeMetrics:Array.from(t.scopeMetrics.map(function(t){return{scope:o3(t.scope),metrics:t.metrics.map(function(t){return function(t,e){var r={name:t.descriptor.name,description:t.descriptor.description,unit:t.descriptor.unit},n=function(t){switch(t){case iu.DELTA:return 1;case iu.CUMULATIVE:return 2}}(t.aggregationTemporality);switch(t.dataPointType){case ic.SUM:r.sum={aggregationTemporality:n,isMonotonic:t.isMonotonic,dataPoints:a7(t,e)};break;case ic.GAUGE:r.gauge={dataPoints:a7(t,e)};break;case ic.HISTOGRAM:r.histogram={aggregationTemporality:n,dataPoints:t.dataPoints.map(function(t){var r=t.value;return{attributes:o4(t.attributes),bucketCounts:r.buckets.counts,explicitBounds:r.buckets.boundaries,count:r.count,sum:r.sum,min:r.min,max:r.max,startTimeUnixNano:e.encodeHrTime(t.startTime),timeUnixNano:e.encodeHrTime(t.endTime)}})};break;case ic.EXPONENTIAL_HISTOGRAM:r.exponentialHistogram={aggregationTemporality:n,dataPoints:t.dataPoints.map(function(t){var r=t.value;return{attributes:o4(t.attributes),count:r.count,min:r.min,max:r.max,sum:r.sum,positive:{offset:r.positive.offset,bucketCounts:r.positive.bu
21cketCounts},negative:{offset:r.negative.offset,bucketCounts:r.negative.bucketCounts},scale:r.scale,zeroCount:r.zeroCount,startTimeUnixNano:e.encodeHrTime(t.startTime),timeUnixNano:e.encodeHrTime(t.endTime)}})}}return r}(t,r)}),schemaUrl:t.scope.schemaUrl}}))}})});return new TextEncoder().encode(JSON.stringify(r))},deserializeResponse:function(t){return JSON.parse(new TextDecoder().decode(t))}},sn={serializeRequest:function(t){var e={resourceSpans:function(t,e){for(var r=function(t){var e,r,n=new Map;try{for(var o=st(t),i=o.next();!i.done;i=o.next()){var a=i.value,s=n.get(a.resource);s||(s=new Map,n.set(a.resource,s));var u=a.instrumentationLibrary.name+"@"+(a.instrumentationLibrary.version||"")+":"+(a.instrumentationLibrary.schemaUrl||""),c=s.get(u);c||(c=[],s.set(u,c)),c.push(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n}(t),n=[],o=r.entries(),i=o.next();!i.done;){for(var a=se(i.value,2),s=a[0],u=a[1],c=[],l=u.values(),p=l.next();!p.done;){var f=p.value;if(f.length>0){var h=f.map(function(t){return function(t,e){var r,n=t.spanContext(),o=t.status;return{traceId:e.encodeSpanContext(n.traceId),spanId:e.encodeSpanContext(n.spanId),parentSpanId:e.encodeOptionalSpanContext(t.parentSpanId),traceState:null===(r=n.traceState)||void 0===r?void 0:r.serialize(),name:t.name,kind:null==t.kind?0:t.kind+1,startTimeUnixNano:e.encodeHrTime(t.startTime),endTimeUnixNano:e.encodeHrTime(t.endTime),attributes:o4(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(function(t){return{attributes:t.attributes?o4(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}),droppedEventsCount:t.droppedEventsCount,status:{code:o.code,message:o.message},links:t.links.map(function(t){return function(t,e){var r;return{attributes:t.attributes?o4(t.attributes):[],spanId:e.encodeSpanContext(t.context.spanId),traceId:e.encodeSpanContext(t.context.traceId),traceState:null===(r=t.context.traceState)||void 0===r?void 0:r.serialize(),droppedAttributesCount:t.droppedAttributesCount||0}}(t,e)}),droppedLinksCount:t.droppedLinksCount}}(t,e)});c.push({scope:o3(f[0].instrumentationLibrary),spans:h,schemaUrl:f[0].instrumentationLibrary.schemaUrl})}p=l.next()}var d={resource:o2(s),scopeSpans:c,schemaUrl:void 0};n.push(d),i=o.next()}return n}(t,o0({useHex:!0,useLongBits:!1}))};return new TextEncoder().encode(JSON.stringify(e))},deserializeResponse:function(t){return JSON.parse(new TextDecoder().decode(t))}},so=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},si=function(){function t(t){this._transport=t}return t.prototype.retry=function(t,e,r){var n=this;return new Promise(function(o,i){setTimeout(function(){n._transport.send(t,e).then(o,i)},r)})},t.prototype.send=function(t,e){var r,n,o,i,a;return n=this,o=void 0,i=void 0,a=function(){var n,o,i,a,s,u,c;return so(this,function(l){switch(l.label){case 0:return n=Date.now()+e,[4,this._transport.send(t,e)];case 1:o=l.sent(),i=5,a=1e3,l.label=2;case 2:return"retryable"===o.status&&i>0?(i--,s=Math.max(Math.min(a,5e3)+(.4*Math.random()-.2),0),a*=1.5,(u=null!==(r=o.retryInMillis)&&void 0!==r?r:s)>(c=n-Date.now())?[2,o]:[4,this.retry(t,c,u)]):[3,4];case 3:return o=l.sent(),[3,2];case 4:return[2,o]}})}
21,new(i||(i=Promise))(function(t,e){function r(t){try{u(a.next(t))}catch(t){e(t)}}function s(t){try{u(a.throw(t))}catch(t){e(t)}}function u(e){var n;e.done?t(e.value):((n=e.value)instanceof i?n:new i(function(t){t(n)})).then(r,s)}u((a=a.apply(n,o||[])).next())})},t.prototype.shutdown=function(){return this._transport.shutdown()},t}();function sa(t){return new si(t.transport)}var ss=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},su=function(){function t(t){this._parameters=t}return t.prototype.send=function(t,e){var r=this;return new Promise(function(n){var o=new XMLHttpRequest;o.timeout=e,o.open("POST",r._parameters.url),Object.entries(r._parameters.headers()).forEach(function(t){var e=ss(t,2),r=e[0],n=e[1];o.setRequestHeader(r,n)}),o.ontimeout=function(t){n({status:"failure",error:Error("XHR request timed out")})},o.onreadystatechange=function(){o.status>=200&&o.status<=299?(et.debug("XHR success"),n({status:"success"})):o.status&&[429,502,503,504].includes(o.status)?n({status:"retryable",retryInMillis:function(t){if(null!=t){var e=Number.parseInt(t,10);if(Number.isInteger(e))return e>0?1e3*e:-1;var r=new Date(t).getTime()-Date.now();return r>=0?r:0}}(o.getResponseHeader("Retry-After"))}):0!==o.status&&n({status:"failure",error:Error("XHR request failed with non-retryable status")})},o.onabort=function(){n({status:"failure",error:Error("XHR request aborted")})},o.onerror=function(){n({status:"failure",error:Error("XHR request errored")})},o.send(t)})},t.prototype.shutdown=function(){},t}(),sc=function(){function t(t){this._params=t}return t.prototype.send=function(t){var e=this;return new Promise(function(r){navigator.sendBeacon(e._params.url,new Blob([t],{type:e._params.blobType}))?(et.debug("SendBeacon success"),r({status:"success"})):r({status:"failure",error:Error("SendBeacon failed")})})},t.prototype.shutdown=function(){},t}(),sl=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},sp=function(){return(sp=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function sf(t,e,r,n){var o,i,a,s,u,c,l,p,f,h,d,y,v,m,_,g,b,E,T,S=!!t.headers||"function"!=typeof navigator.sendBeacon,w=(o={url:t.url,timeoutMillis:t.timeoutMillis,headers:function(t){if(null!=t)return function(){return t}}(t.headers),concurrencyLimit:t.concurrencyLimit},i={},a=sp(sp({},{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}),{headers:function(){return n},url:"http://localhost:4318/"+r,agentOptions:{keepAlive:!0}}),sp(sp({},{timeoutMillis:function(t){if(!Number.isNaN(t)&&Number.isFinite(t)&&t>0)return t;throw Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+t+"')")}(null!==(f=null!==(p=o.timeoutMillis)&&void 0!==p?p:i.timeoutMillis)&&void 0!==f?f:a.timeoutMillis),concurrencyLimit:null!==(d=null!==(h=o.concurrencyLimit)&&void 0!==h?h:i.concurrencyLimit)&&void 0!==d?d:a.concurrencyLimit,compression:null!==(v=null!==(y=o.compression)&&void 0!==y?y:i.compression)&&void 0!==v?v:a.compression}),{headers:(m=o.headers,_=function(){var t,e={};return Object.entries(null!==(t=null==m?void 0:m())&&void 0!==t?t:{}).forEach(function(t){var r=sl(t,2),n=r[0],o=r[1];void 0!==o?e[n]=String(o):et.warn('Header "'+n+'" has invalid value ('+o+") and will be ignored")}),e},g=i.headers,b=a.headers,E=sp({},b()),T={},function(){return null!=g&&Object.assign(T,g()),null!=_&&Object.assign(T,_()),Object.assign(T,E)}),url:null!==(u=null!==(s=function(t){if(null!=t)try{return new URL(t),t}
21catch(e){throw Error("Configuration: Could not parse user-provided export URL: '"+t+"'")}}(o.url))&&void 0!==s?s:i.url)&&void 0!==u?u:a.url,agentOptions:null!==(l=null!==(c=o.agentOptions)&&void 0!==c?c:i.agentOptions)&&void 0!==l?l:a.agentOptions}));return S?oW(w,e,sa({transport:new su(w)})):oW(w,e,sa({transport:new sc({url:w.url,blobType:w.headers()["Content-Type"]})}))}var sh,sd=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),sy=function(t){function e(e){return void 0===e&&(e={}),t.call(this,sf(e,sn,"v1/traces",{"Content-Type":"application/json"}))||this}return sd(e,t),e}(oH);!function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE",t[t.LOWMEMORY=2]="LOWMEMORY"}(sh||(sh={}));var sv=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),sm=function(){return iu.CUMULATIVE},s_=function(t){switch(t){case ip.COUNTER:case ip.OBSERVABLE_COUNTER:case ip.GAUGE:case ip.HISTOGRAM:case ip.OBSERVABLE_GAUGE:return iu.DELTA;case ip.UP_DOWN_COUNTER:case ip.OBSERVABLE_UP_DOWN_COUNTER:return iu.CUMULATIVE}},sg=function(t){switch(t){case ip.COUNTER:case ip.HISTOGRAM:return iu.DELTA;case ip.GAUGE:case ip.UP_DOWN_COUNTER:case ip.OBSERVABLE_UP_DOWN_COUNTER:case ip.OBSERVABLE_COUNTER:case ip.OBSERVABLE_GAUGE:return iu.CUMULATIVE}},sb=function(t){function e(e,r){var n,o,i,a=t.call(this,e)||this;return a._aggregationSelector=null!=r&&r.aggregationPreference?r.aggregationPreference:function(t){return iG.Default()},a._aggregationTemporalitySelector=null!=(n=null==r?void 0:r.temporalityPreference)?n===sh.DELTA?s_:n===sh.LOWMEMORY?sg:sm:"cumulative"===(i=(o=eD()).OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase())?sm:"delta"===i?s_:"lowmemory"===i?sg:(et.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+o.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),sm),a}return sv(e,t),e.prototype.selectAggregation=function(t){return this._aggregationSelector(t)},e.prototype.selectAggregationTemporality=function(t){return this._aggregationTemporalitySelector(t)},e}(oH),sE=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),sT=function(t){function e(e){return t.call(this,sf(null!=e?e:{},sr,"v1/metrics",{"Content-Type":"application/json"}),e)||this}return sE(e,t),e}(sb);class sS extends sy{constructor(t,e){super(d(h({},t),{headers:{}})),this.sampler=e}export(t,e){let r=function(t,e){if(!e.isSamplingEnabled())return t;let r=[],n={},o={};for(let i of t){i.parentSpanId&&(o[i.parentSpanId]=o[i.parentSpanId]||[],o[i.parentSpanId].push(i.spanContext().spanId));let t=e.shouldSample(i);t.sample?t.attributes?n[i.spanContext().spanId]=function(t,e){let r=t.spanContext();return{name:t.name,kind:t.kind,spanContext:()=>r,parentSpanId:t.parentSpanId,startTime:t.startTime,endTime:t.endTime,status:t.status,attributes:rc(t.attributes,e),links:t.links,events:t.events,duration:t.duration,ended:t.ended,resource:t.resource,instrumentationLibrary:t.instrumentationLibrary,droppedAttributesCount:t.droppedAttributesCount,droppedEventsCount:t.droppedEventsCount,droppedLinksCount:t.droppedLinksCount}}(i,t.attributes):n[i.spanContext().spanId]=i:r.push(i.spanContext().spanId)}for(;r.length>0;){let t=o[r.shift()];if(t)for(let e of t)delete n[e],r.push(e)}return Object.values(n)}(t,this.sampler);if(0===r.length)return;let o=0,i=t=>{var a;return t.code===rX.SUCCESS?e({code:rX.SUCCESS}):++o>n.$?(console.error(`[@launchdarkly/observability] failed to export OTeL traces: ${null==(a=t.error)?void 0:a.message}`,t.error),e({code:rX.FAILED,error:t.error})):void new Promise(t=>setTimeout(t,n.a0+n.a1*Math.pow(2,o))).then(()=>{var e;console.warn(`[@launchdarkly/observability] retry ${o}, failed to export OTeL traces: ${null==(e=t.error)?void 0:e.message}`,t.error),super.export(r,i)})};super.export(r,i)}}class sw extends sT{constructor(t){super(d(h({},t),{headers:{}}))}export(t,e){let r=0,o=i=>{var a;return i.code===rX.SUCCESS?e({code:rX.SUCCESS}):++r>n.$?(console.error(`[@launchdarkly/observability] failed to export OTeL metrics: ${null==(a=i.error)?void 0:a.message}`,i.error),e({code:rX.FAILED,error:i.error})):void new Promise(t=>setTimeout(t,n.a0+n.a1*Math.pow(2,r))).then(()=>{var e;console.warn(`[@launchdarkly/observability] retry ${r}, failed to export OTeL metrics: ${null==(e=i.error)?void 0:e.message}`,i.error),super.export(t,o)})};super.export(t,o)}}let sO=["click","input","submit"];function sA(){return!1}let sL=class t extends rF{constructor(e={}){var r;super(t.moduleName,t.version,e),v(this,"_spansData",new WeakMap),v(this,"_zonePatched"),v(this,"_wrappedListeners",new WeakMap),v(this,"_eventsSpanMap",new WeakMap),v(this,"_eventNames"),v(this,"_shouldPreventSpanCreation"),this._eventNames=new Set(null!=(r=null==e?void 0:e.eventNames)?r:sO),this._shouldPreventSpanCreation="function"==typeof(null==e?void 0:e.shouldPreventSpanCreation)?e.shouldPreventSpanCreation:sA}init(){}_checkForTimeout(t,e){let r=this._spansData.get(e);r&&("setTimeout"===t.source?r.hrTimeLastTimeout=eW():"Promise.then"!==t.source&&"setTimeout"!==t.source&&(r.hrTimeLastTimeout=void 0))}_allowEventName(t){return this._eventNames.has(t)}_createSpan(t,e){var r;let n=null==t?void 0:t.target,o=null==t?void 0:t.type;if(!(n instanceof HTMLElement)||!n.getAttribute||n.hasAttribute("disabled")||!this._allowEventName(o))return;let i=function t(e,r){if(e.nodeType===Node.DOCUMENT_NODE)return"/";
21var n=function(t,e){var r=t.nodeType,n=function(t){if(!t.parentNode)return 0;var e=[t.nodeType];t.nodeType===Node.CDATA_SECTION_NODE&&e.push(Node.TEXT_NODE);var r=Array.from(t.parentNode.childNodes);return(r=r.filter(function(r){var n=r.localName;return e.indexOf(r.nodeType)>=0&&n===t.localName})).length>=1?r.indexOf(t)+1:0}(t),o="";if(r===Node.ELEMENT_NODE){var i=t.getAttribute("id");if(e&&i)return'//*[@id="'+i+'"]';o=t.localName}else if(r===Node.TEXT_NODE||r===Node.CDATA_SECTION_NODE)o="text()";else{if(r!==Node.COMMENT_NODE)return"";o="comment()"}return o&&n>1?"/"+o+"["+n+"]":"/"+o}(e,r);if(r&&n.indexOf("@id")>0)return n;var o="";return e.parentNode&&(o+=t(e.parentNode,!1)),o+=n}(n,!0);try{let a=this.tracer.startSpan(o,{attributes:{"event.type":o,"event.tag":n.tagName,"event.xpath":i,"event.id":n.id,"event.text":null!=(r=n.textContent)?r:"","event.url":window.location.href,"viewport.width":window.innerWidth,"viewport.height":window.innerHeight}},e?ed.setSpan(t7.active(),e):void 0);return t instanceof MouseEvent&&(a.setAttribute("event.x",t.clientX),a.setAttribute("event.y",t.clientY),a.setAttribute("event.relativeX",t.clientX/window.innerWidth),a.setAttribute("event.relativeY",t.clientY/window.innerHeight),"scroll"===o&&(a.setAttribute("event.scrollX",window.scrollX),a.setAttribute("event.scrollY",window.scrollY))),!0===this._shouldPreventSpanCreation(o,n,a)?void 0:(this._spansData.set(a,{taskCount:0}),a)}catch(t){this._diag.error("failed to start create new user interaction span",t)}}_decrementTask(t){let e=this._spansData.get(t);e&&(e.taskCount--,0===e.taskCount&&this._tryToEndSpan(t,e.hrTimeLastTimeout))}_getCurrentSpan(t){let e=t.get("OT_ZONE_CONTEXT");return e&&ed.getSpan(e)}_incrementTask(t){let e=this._spansData.get(t);e&&e.taskCount++}addPatchedListener(t,e,r,n){let o=this._wrappedListeners.get(r);o||(o=new Map,this._wrappedListeners.set(r,o));let i=o.get(e);return i||(i=new Map,o.set(e,i)),!i.has(t)&&(i.set(t,n),!0)}removePatchedListener(t,e,r){let n=this._wrappedListeners.get(r);if(!n)return;let o=n.get(e);if(!o)return;let i=o.get(t);return i&&(o.delete(t),0===o.size&&(n.delete(e),0===n.size&&this._wrappedListeners.delete(r))),i}_invokeListener(t,e,r){return"function"==typeof t?t.apply(e,r):t.handleEvent(r[0])}_patchAddEventListener(){let t=this,e=new Map;return r=>function(n,o,i){if(!o)return r.call(this,n,o,i);let a=i&&"object"==typeof i&&i.once,s=function(...r){var i;let s;let u=r[0];if(!(null!=u&&u.type)||Date.now()-(null!=(i=e.get(u.type))?i:0)<1e3/60)return t._invokeListener(o,this,r);e.set(u.type,Date.now()),u&&(s=t._eventsSpanMap.get(u)),a&&t.removePatchedListener(this,n,o);let c=t._createSpan(u,s);return c?(u&&t._eventsSpanMap.set(u,c),t7.with(ed.setSpan(t7.active(),c),()=>{let e=t._invokeListener(o,this,r);return c.end(),e})):t._invokeListener(o,this,r)};if(t.addPatchedListener(this,n,o,s))return r.call(this,n,s,i)}}_patchRemoveEventListener(){let t=this;return e=>function(r,n,o){let i=t.removePatchedListener(this,r,n);return i?e.call(this,r,i,o):e.call(this,r,n,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(){let t=this;return e=>function(...r){let n=`${location.pathname}${location.hash}${location.search}`,o=e.apply(this,r),i=`${location.pathname}${location.hash}${location.search}`;return n!==i&&t._updateInteractionName(i),o}}_unpatchHistoryApi(){rV(history.replaceState)&&this._unwrap(history,"replaceState"),rV(history.pushState)&&this._unwrap(history,"pushState"),rV(history.back)&&this._unwrap(history,"back"),rV(history.forward)&&this._unwrap(history,"forward"),rV(history.go)&&this._unwrap(history,"go")}_updateInteractionName(t){let e=ed.getSpan(t7.active());e&&"function"==typeof e.updateName&&e.updateName(`Navigation: ${t}`)}_patchZoneCancelTask(){let t=this;return e=>function(r){let n=Zone.current,o=t._getCurrentSpan(n);return o&&t._shouldCountTask(r,n)&&t._decrementTask(o),e.call(this,r)}}
21_patchZoneScheduleTask(){let t=this;return e=>function(r){let n=Zone.current,o=t._getCurrentSpan(n);return o&&t._shouldCountTask(r,n)&&(t._incrementTask(o),t._checkForTimeout(r,o)),e.call(this,r)}}_patchZoneRunTask(){let t=this;return e=>function(r,n,o){let i;let a=Array.isArray(o)&&o[0]instanceof Event?o[0]:void 0;if(null==a?void 0:a.target){if(i=t._createSpan(a))return t._incrementTask(i),this.run(()=>{try{return t7.with(ed.setSpan(t7.active(),i),()=>{let t=Zone.current;return r._zone=t,e.call(t,r,n,o)})}finally{t._decrementTask(i)}})}else i=t._getCurrentSpan(this);try{return e.call(this,r,n,o)}finally{i&&t._shouldCountTask(r,this)&&t._decrementTask(i)}}}_shouldCountTask(t,e){if(t._zone&&(e=t._zone),!e||!t.data||t.data.isPeriodic)return!1;let r=this._getCurrentSpan(e);return!!(r&&this._spansData.get(r))&&("macroTask"===t.type||"microTask"===t.type)}_tryToEndSpan(t,e){t&&this._spansData.get(t)&&(t.end(e),this._spansData.delete(t))}enable(){let e=this._getZoneWithPrototype();this._diag.debug("applying patch to",t.moduleName,t.version,"zone:",!!e),e?(rV(e.prototype.runTask)&&(this._unwrap(e.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),rV(e.prototype.scheduleTask)&&(this._unwrap(e.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),rV(e.prototype.cancelTask)&&(this._unwrap(e.prototype,"cancelTask"),this._diag.debug("removing previous patch from method cancelTask")),this._zonePatched=!0,this._wrap(e.prototype,"runTask",this._patchZoneRunTask()),this._wrap(e.prototype,"scheduleTask",this._patchZoneScheduleTask()),this._wrap(e.prototype,"cancelTask",this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(t=>{rV(t.addEventListener)&&(this._unwrap(t,"addEventListener"),this._diag.debug("removing previous patch from method addEventListener")),rV(t.removeEventListener)&&(this._unwrap(t,"removeEventListener"),this._diag.debug("removing previous patch from method removeEventListener")),this._wrap(t,"addEventListener",this._patchAddEventListener()),this._wrap(t,"removeEventListener",this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){let e=this._getZoneWithPrototype();this._diag.debug("removing patch from",t.moduleName,t.version,"zone:",!!e),e&&this._zonePatched?(rV(e.prototype.runTask)&&this._unwrap(e.prototype,"runTask"),rV(e.prototype.scheduleTask)&&this._unwrap(e.prototype,"scheduleTask"),rV(e.prototype.cancelTask)&&this._unwrap(e.prototype,"cancelTask")):this._getPatchableEventTargets().forEach(t=>{rV(t.addEventListener)&&this._unwrap(t,"addEventListener"),rV(t.removeEventListener)&&this._unwrap(t,"removeEventListener")}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}};v(sL,"version","0.1.0"),v(sL,"moduleName","user-interaction");let sR={},sC,sx="highlight.record",sP="launchdarkly.sampling.ratio",sN=(t,e)=>{var r,o,i,a,s,u,c,l,p;if(void 0!==sR.tracerProvider){console.warn("OTEL already initialized. Skipping...");return}sC=t;let f=t.backendUrl||"https://pub.highlight.io",y=[...null!=(o=null==(r=t.networkRecordingOptions)?void 0:r.urlBlocklist)?o:[],...o_],v=null!=(i=t.environment)?i:"production",_={url:t.otlpEndpoint+"/v1/traces",concurrencyLimit:100,timeoutMillis:5e3,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:5e3,keepAlive:!0}},g=new sM(new sS(_,e),{maxExportBatchSize:100,maxQueueSize:1e3,exportTimeoutMillis:_.timeoutMillis,scheduledDelayMillis:_.timeoutMillis}),b=new nf({[n.a3]:null!=(a=t.serviceName)?a:"highlight-browser","deployment.environment.name":v,"highlight.project_id":t.projectId,[n.a2]:navigator.userAgent,"browser.language":navigator.language,"telemetry.distro.name":"@highlight-run/observability","telemetry.distro.version":n.x});sR.tracerProvider=new nw({resource:b,mergeResourceWithDefaults:!0,spanProcessors:[g]}),ed.setGlobalTracerProvider(sR.tracerProvider);let E=new ai({exporter:new sw(d(h({},_),{url:t.otlpEndpoint+"/v1/metrics"})),exportIntervalMillis:_.timeoutMillis,exportTimeoutMillis:_.timeoutMillis});sR.meterProvider=new a9({resource:b,readers:[E]}),en.setGlobalMeterProvider(sR.meterProvider);let T=[];(null==(s=t.instrumentations)?void 0:s["@opentelemetry/instrumentation-document-load"])!==!1&&T.push(new nF({applyCustomAttributesOnSpan:{documentLoad:sG,documentFetch:sG,resourceFetch:sX}})),(null==(u=t.instrumentations)?void 0:u["@opentelemetry/instrumentation-user-interaction"])!==!1&&T.push(new sL({eventNames:t.eventNames})),null!=(c=t.networkRecordingOptions)&&c.enabled&&((null==(l=t.instrumentations)?void 0:l["@opentelemetry/instrumentation-fetch"])!==!1&&T.push(new n7({propagateTraceHeaderCorsUrls:sW(t.tracingOrigins),applyCustomAttributesOnSpan:(e,r,n)=>m(void 0,null,function*(){var o,i,a;if(!e.attributes||!1===e.attributes[sx])return;let s=e.attributes["http.url"],u=null!=(o=r.method)?o:"GET";if(e.updateName(sH(s,u,r.body)),!(n instanceof Response)){e.setAttributes({"http.response.error":n.message,"http.response.status":n.status});return}sF(e,r.body,r.headers,t.networkRecordingOptions);let c=yield oB(n,null==(i=t.networkRecordingOptions)?void 0:i.bodyKeysToRecord,null==(a=t.networkRecordingOptions)?void 0:a.networkBodyKeysToRedact);
21e.setAttribute("http.response.body",c)})})),(null==(p=t.instrumentations)?void 0:p["@opentelemetry/instrumentation-xml-http-request"])!==!1&&T.push(new od({propagateTraceHeaderCorsUrls:sW(t.tracingOrigins),applyCustomAttributesOnSpan:(e,r)=>{var n,o;if(!e.attributes||!1===e.attributes[sx])return;let i=sH(r._url,r._method,r.responseText);e.updateName(i),sF(e,r._body,r._requestHeaders,t.networkRecordingOptions);let a=ok(r._body,null==(n=t.networkRecordingOptions)?void 0:n.networkBodyKeysToRedact,null==(o=t.networkRecordingOptions)?void 0:o.bodyKeysToRecord,r._requestHeaders);e.setAttribute("http.request.body",a)}}))),function(t){var e,r,n=t.tracerProvider||ed.getTracerProvider(),o=t.meterProvider||en.getMeterProvider(),i=t.loggerProvider||rP.getLoggerProvider();(function(t,e,r,n){for(var o=0,i=t.length;o<i;o++){var a=t[o];e&&a.setTracerProvider(e),r&&a.setMeterProvider(r),n&&a.setLoggerProvider&&a.setLoggerProvider(n),a.getConfig().enabled||a.enable()}})(null!==(r=null===(e=t.instrumentations)||void 0===e?void 0:e.flat())&&void 0!==r?r:[],n,o,i)}({instrumentations:T});let S=new nT;return S.enable(),sR.tracerProvider.register({contextManager:S,propagator:new e1({propagators:[new eb,new sI({backendUrl:f,otlpEndpoint:t.otlpEndpoint,tracingOrigins:t.tracingOrigins,urlBlocklist:y})]})}),sR};class sM extends nt{onStart(t,e){t.setAttribute("highlight.session_id",(0,n._)()),super.onStart(t,e)}onEnd(t){!1!==t.attributes[sx]&&super.onEnd(t)}}class sI extends rt{constructor(t){super(),v(this,"highlightEndpoints"),v(this,"tracingOrigins"),v(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,e,r){var n;let o=ed.getSpan(t);if(!o||!o.attributes)return;let i=o.attributes["http.url"];("string"!=typeof i||(sV(i,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||o.setAttribute(sx,!1),oC(i,null!=(n=this.tracingOrigins)?n:[],this.urlBlocklist)))&&super.inject(t,e,r)}}let sk="highlight-browser",sD=sk,sU=()=>{var t;return null==(t=sR.tracerProvider)?void 0:t.getTracer(sk)},sj=()=>ed.getActiveSpan(),sB=()=>m(void 0,null,function*(){sR.tracerProvider?(yield sR.tracerProvider.forceFlush(),yield sR.tracerProvider.shutdown()):console.warn("OTEL shutdown called without initialized tracerProvider."),sR.meterProvider?(yield sR.meterProvider.forceFlush(),yield sR.meterProvider.shutdown()):console.warn("OTEL shutdown called without initialized meterProvider.")}),sH=(t,e,r)=>{var o,i,a;let s;let u=new URL(t),c=u.pathname,l=`${e.toUpperCase()} - ${c}`;try{if((s="string"==typeof r?JSON.parse(r):r)&&s.query){let t=(0,n.a5)(s.query),e=(null==(o=t.definitions[0])?void 0:o.kind)==="OperationDefinition"?null==(a=null==(i=t.definitions[0])?void 0:i.name)?void 0:a.value:void 0;e&&(l=`${e} (GraphQL: ${u.host+u.pathname})`)}}catch(t){}return l},sF=(t,e,r,o)=>{var i;let a;let s="string"==typeof e?e:String(e);if(!t.attributes)return;let u=t.attributes["http.url"],c=new URL(u);try{(a=e?JSON.parse(s):void 0).operationName&&t.setAttribute("graphql.operation.name",a.operationName)}catch(t){}let l=ov(null!=(i=null==o?void 0:o.networkHeadersToRedact)?i:[],r,null==o?void 0:o.headerKeysToRecord);t.setAttributes({"highlight.type":"http.request","http.request.headers":JSON.stringify(l),"http.request.body":s,[n.a8]:u,[n.a7]:c.pathname,[n.a6]:c.search}),c.searchParams.size>0&&t.setAttributes({"url.query_params":JSON.stringify(Object.fromEntries(c.searchParams))})},sV=(t,e,r,n)=>!(null!=n&&n.some(e=>t.toLowerCase().includes(e)))&&oR(t,e),sG=t=>{var e,r,o;if(!t.events)return;let i=t.events,a={unload:sz("unloadEventStart","unloadEventEnd",i),dom_interactive:sz("fetchStart","domInteractive",i),dom_content_loaded:sz("domContentLoadedEventStart","domContentLoadedEventEnd",i),dom_complete:sz("fetchStart","domComplete",i),load_event:sz("loadEventStart","loadEventEnd",i),document_load:sz("fetchStart","loadEventEnd",i),first_paint:sz("fetchStart","firstPaint",i),first_contentful_paint:sz("fetchStart","firstContentfulPaint",i),domain_lookup:sz("domainLookupStart","domainLookupEnd",i),connect:sz("connectStart","connectEnd",i),request:sz("requestStart","requestEnd",i),response:sz("responseStart","responseEnd",i)},s=null!=(r=null==(e=null==sC?void 0:sC.getIntegrations)?void 0:e.call(sC))?r:[];
21if(void 0!==a.document_load)for(let t of s)t.recordGauge(null!=(o=null==sC?void 0:sC.sessionSecureId)?o:"",{name:n.a4,value:a.document_load/1e6});Object.entries(a).forEach(([e,r])=>{void 0!==r&&(t.setAttribute(`timings.${e}.ns`,r),t.setAttribute(`timings.${e}.readable`,sq(r)))})};function sz(t,e,r){let n=r.find(e=>e.name===t),o=r.find(t=>t.name===e);if(!n||!o)return;let i=1e9*n.time[0]+n.time[1];return 1e9*o.time[0]+o.time[1]-i}let sX=(t,e)=>{Object.entries({domain_lookup:(e.domainLookupEnd-e.domainLookupStart)*1e9,connect:(e.connectEnd-e.connectStart)*1e9,request:(e.responseEnd-e.requestStart)*1e9,response:(e.responseEnd-e.responseStart)*1e9}).forEach(([e,r])=>{t.setAttribute(`timings.${e}.ns`,r),t.setAttribute(`timings.${e}.readable`,sq(r))})},sq=t=>{if(t>=36e11){let e=t/36e11;return`${Number(e.toFixed(1))}h`}if(t>=6e10){let e=t/6e10;return`${Number(e.toFixed(1))}m`}if(t>=1e9){let e=t/1e9;return`${Number(e.toFixed(1))}s`}if(t>=1e6){let e=t/1e6;return`${Number(e.toFixed(1))}ms`}{if(!(t>=1e3))return`${Number(t.toFixed(1))}ns`;let e=t/1e3;return`${Number(e.toFixed(1))}\xb5s`}},sW=t=>!0===t?[/localhost/,/^\//,new RegExp(window.location.host)]:Array.isArray(t)?t.map(t=>"string"==typeof t?new RegExp(t):t):/^$/,s$=()=>new Promise(t=>requestAnimationFrame(e=>requestAnimationFrame(r=>t(r-e)))),sY=()=>m(void 0,null,function*(){let t=[];for(let e=0;e<30;e++)t.push((yield s$()));return t.reduce((t,e)=>t+e,0)/t.length}),sJ=(t,e)=>{let r={},o=16.666666666666668;sY().then(t=>o=t);let i=t=>{var e;null!=r&&r.event||(r={event:t,location:window.location.href,timerStart:null==(e=window.performance)?void 0:e.now()},window.requestAnimationFrame(a))},a=()=>{null!=r&&r.timerStart&&(s(window.performance.now()-r.timerStart-o),r={})},s=n=>{t({relativeTimestamp:(new Date().getTime()-e)/1e3,jankAmount:n,querySelector:u(),newLocation:window.location.href!=r.location?window.location.href:void 0})},u=()=>{var t;return null!=(t=null==r?void 0:r.event)&&t.target?(0,n.u)(r.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},sZ="undefined"!=typeof window&&"performance"in window&&"memory"in performance?performance:{memory:{}},sK=(t,e)=>{let r,n=0,o=0,i=()=>{let r=(new Date().getTime()-e)/1e3;t({jsHeapSizeLimit:sZ.memory.jsHeapSizeLimit||0,usedJSHeapSize:sZ.memory.usedJSHeapSize||0,relativeTimestamp:r,fps:n})};i(),r=setInterval(()=>{i()},1e3);let a=0,s=Date.now(),u=function(){var t=Date.now();a++,t>1e3+s&&(n=Math.round(1e3*a/(t-s)),a=0,s=t),o=requestAnimationFrame(u)};return u(),()=>{clearInterval(r),cancelAnimationFrame(o)}};var sQ,s0,s1,s2,s3,s4=-1,s5=function(t){addEventListener("pageshow",function(e){e.persisted&&(s4=e.timeStamp,t(e))},!0)},s6=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},s8=function(){var t=s6();return t&&t.activationStart||0},s9=function(t,e){var r=s6(),n="navigate";return s4>=0?n="back-forward-cache":r&&(document.prerendering||s8()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(0x82f79cd8fff*Math.random())+1e12),navigationType:n}},s7=function(t,e,r){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var n=new PerformanceObserver(function(t){Promise.resolve().then(function(){e(t.getEntries())})});return n.observe(Object.assign({type:t,buffered:!0},r||{})),n}}catch(t){}},ut=function(t,e,r,n){var o,i;return function(a){var s;e.value>=0&&(a||n)&&((i=e.value-(o||0))||void 0===o)&&(o=e.value,e.delta=i,e.rating=(s=e.value)>r[1]?"poor":s>r[0]?"needs-improvement":"good",t(e))}},ue=function(t){requestAnimationFrame(function(){return requestAnimationFrame(function(){return t()})})},ur=function(t){var e=function(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||t(e)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},un=function(t){var e=!1;return function(r){e||(t(r),e=!0)}},uo=-1,ui=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},ua=function(t){"hidden"===document.visibilityState&&uo>-1&&(uo="visibilitychange"===t.type?t.timeStamp:0,uu())},us=function(){addEventListener("visibilitychange",ua,!0),addEventListener("prerenderingchange",ua,!0)},uu=function(){removeEventListener("visibilitychange",ua,!0),removeEventListener("prerenderingchange",ua,!0)},uc=function(){return uo<0&&(uo=ui(),us(),s5(function(){setTimeout(function(){uo=ui(),us()},0)})),{get firstHiddenTime(){return uo}}},ul=function(t){document.prerendering?addEventListener("prerenderingchange",function(){return t()},!0):t()},up=[1800,3e3],uf=function(t,e){e=e||{},ul(function(){var r,n=uc(),o=s9("FCP"),i=s7("paint",function(t){t.forEach(function(t){"first-contentful-paint"===t.name&&(i.disconnect(),t.startTime<n.firstHiddenTime&&(o.value=Math.max(t.startTime-s8(),0),o.entries.push(t),r(!0)))})});i&&(r=ut(t,o,up,e.reportAllChanges),s5(function(n){r=ut(t,o=s9("FCP"),up,e.reportAllChanges),ue(function(){o.value=performance.now()-n.timeStamp,r(!0)})}))})},uh=[.1,.25],ud=function(t,e){e=e||{},uf(un(function(){var r,n=s9("CLS",0),o=0,i=[],a=function(t){t.forEach(function(t){if(!t.hadRecentInput){var e=i[0],r=i[i.length-1];o&&t.startTime-r.startTime<1e3&&t.startTime-e.startTime<5e3?(o+=t.value,i.push(t)):(o=t.value,i=[t])}}),o>n.value&&(n.value=o,n.entries=i,r())},s=s7("layout-shift",a);s&&(r=ut(t,n,uh,e.reportAllChanges),ur(function(){a(s.takeRecords()),r(!0)}),s5(function(){o=0,r=ut(t,n=s9("CLS",0),uh,e.reportAllChanges),ue(function(){return r()})}),setTimeout(r,0))}))},uy={passive:!0,capture:!0},uv=new Date,um=function(t,e){sQ||(sQ=e,s0=t,s1=new Date,ub(removeEventListener),u_())},u_=function(){if(s0>
21=0&&s0<s1-uv){var t={entryType:"first-input",name:sQ.type,target:sQ.target,cancelable:sQ.cancelable,startTime:sQ.timeStamp,processingStart:sQ.timeStamp+s0};s2.forEach(function(e){e(t)}),s2=[]}},ug=function(t){if(t.cancelable){var e,r,n,o=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;"pointerdown"==t.type?(e=function(){um(o,t),n()},r=function(){n()},n=function(){removeEventListener("pointerup",e,uy),removeEventListener("pointercancel",r,uy)},addEventListener("pointerup",e,uy),addEventListener("pointercancel",r,uy)):um(o,t)}},ub=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,ug,uy)})},uE=[100,300],uT=function(t,e){e=e||{},ul(function(){var r,n=uc(),o=s9("FID"),i=function(t){t.startTime<n.firstHiddenTime&&(o.value=t.processingStart-t.startTime,o.entries.push(t),r(!0))},a=function(t){t.forEach(i)},s=s7("first-input",a);r=ut(t,o,uE,e.reportAllChanges),s&&ur(un(function(){a(s.takeRecords()),s.disconnect()})),s&&s5(function(){r=ut(t,o=s9("FID"),uE,e.reportAllChanges),s2=[],s0=-1,sQ=null,ub(addEventListener),s2.push(i),u_()})})},uS=0,uw=1/0,uO=0,uA=function(t){t.forEach(function(t){t.interactionId&&(uw=Math.min(uw,t.interactionId),uS=(uO=Math.max(uO,t.interactionId))?(uO-uw)/7+1:0)})},uL=function(){return s3?uS:performance.interactionCount||0},uR=function(){"interactionCount"in performance||s3||(s3=s7("event",uA,{type:"event",buffered:!0,durationThreshold:0}))},uC=[200,500],ux=0,uP=function(){return uL()-ux},uN=[],uM={},uI=function(t){var e=uN[uN.length-1],r=uM[t.interactionId];if(r||uN.length<10||t.duration>e.latency){if(r)r.entries.push(t),r.latency=Math.max(r.latency,t.duration);else{var n={id:t.interactionId,latency:t.duration,entries:[t]};uM[n.id]=n,uN.push(n)}uN.sort(function(t,e){return e.latency-t.latency}),uN.splice(10).forEach(function(t){delete uM[t.id]})}},uk=function(t,e){e=e||{},ul(function(){uR();var r,n,o=s9("INP"),i=function(t){t.forEach(function(t){t.interactionId&&uI(t),"first-input"!==t.entryType||uN.some(function(e){return e.entries.some(function(e){return t.duration===e.duration&&t.startTime===e.startTime})})||uI(t)});var e,r=(e=Math.min(uN.length-1,Math.floor(uP()/50)),uN[e]);r&&r.latency!==o.value&&(o.value=r.latency,o.entries=r.entries,n())},a=s7("event",i,{durationThreshold:null!==(r=e.durationThreshold)&&void 0!==r?r:40});n=ut(t,o,uC,e.reportAllChanges),a&&("interactionId"in PerformanceEventTiming.prototype&&a.observe({type:"first-input",buffered:!0}),ur(function(){i(a.takeRecords()),o.value<0&&uP()>0&&(o.value=0,o.entries=[]),n(!0)}),s5(function(){uN=[],ux=uL(),n=ut(t,o=s9("INP"),uC,e.reportAllChanges)}))})},uD=[2500,4e3],uU={},uj=function(t,e){e=e||{},ul(function(){var r,n=uc(),o=s9("LCP"),i=function(t){var e=t[t.length-1];e&&e.startTime<n.firstHiddenTime&&(o.value=Math.max(e.startTime-s8(),0),o.entries=[e],r())},a=s7("largest-contentful-paint",i);if(a){r=ut(t,o,uD,e.reportAllChanges);var s=un(function(){uU[o.id]||(i(a.takeRecords()),a.disconnect(),uU[o.id]=!0,r(!0))});["keydown","click"].forEach(function(t){addEventListener(t,function(){return setTimeout(s,0)},!0)}),ur(s),s5(function(n){r=ut(t,o=s9("LCP"),uD,e.reportAllChanges),ue(function(){o.value=performance.now()-n.timeStamp,uU[o.id]=!0,r(!0)})})}})},uB=[800,1800],uH=function t(e){document.prerendering?ul(function(){return t(e)}):"complete"!==document.readyState?addEventListener("load",function(){return t(e)},!0):setTimeout(e,0)},uF=function(t,e){e=e||{};var r=s9("TTFB"),n=ut(t,r,uB,e.reportAllChanges);uH(function(){var o=s6();if(o){var i=o.responseStart;if(i<=0||i>performance.now())return;r.value=Math.max(i-s8(),0),r.entries=[o],n(!0),s5(function(){(n=ut(t,r=s9("TTFB",0),uB,e.reportAllChanges))(!0)})}})};let uV=t=>(ud(t),uf(t),uT(t),uj(t),uF(t),uk(t),()=>{}),uG="undefined"!=typeof navigator&&"connection"in navigator?navigator.connection:{},uz=(t,e)=>{let r;let n=()=>{t({relativeTimestamp:(new Date().getTime()-e)/1e3,downlink:uG.downlink,downlinkMax:uG.downlinkMax,effectiveType:uG.effectiveType,rtt:uG.rtt,saveData:uG.saveData,type:uG.type})};return n(),r=setInterval(()=>{n()},1e3),()=>{clearInterval(r)}},uX=()=>
21{if(!("performance"in window&&"memory"in performance))return{getDeviceDetails:void 0,getCurrentDeviceDetails:void 0};let t=window.performance;return{getDeviceDetails:()=>({deviceMemory:uW(navigator.deviceMemory||0)}),getCurrentDeviceDetails:()=>({jsHeapSizeLimit:uq(t.memory.jsHeapSizeLimit),totalJSHeapSize:uq(t.memory.totalJSHeapSize),usedJSHeapSize:uq(t.memory.usedJSHeapSize)})}},uq=t=>t/1e6,uW=t=>1024*t;function u$(t){let e=Math.trunc(t);return 1===e||0!==e&&0===Math.floor(Math.random()*e)}class uY{constructor(t=u$){v(this,"regexCache",new Map),v(this,"config"),this.sampler=t}setConfig(t){this.config=t}isSamplingEnabled(){var t,e,r,n;return!!(null!=(e=null==(t=this.config)?void 0:t.logs)&&e.length||null!=(n=null==(r=this.config)?void 0:r.spans)&&n.length)}shouldSample(t){var e,r;return"launchdarkly.js.log"===t.name?this.sampleLog(null==(e=this.config)?void 0:e.logs,t):this.sampleSpan(null==(r=this.config)?void 0:r.spans,t)}matchesValue(t,e){if(!t)return!1;if("matchValue"in t)return t.matchValue===e;if("regexValue"in t){let r=t.regexValue;if(null===r)return!1;this.regexCache.has(r)||this.regexCache.set(r,new RegExp(r));let n=this.regexCache.get(r);if("string"==typeof e)return n.test(e)}return!1}matchesAttributes(t,e){if(t)for(let r of t){let t=!1;for(let n of Object.keys(e))if(this.matchesValue(r.key,n)){let o=e[n];if(this.matchesValue(r.attribute,o)){t=!0;break}}if(!t)return!1}return!0}matchEvent(t,e){return!(t.name&&!this.matchesValue(t.name,e.name)||t.attributes&&(!e.attributes||!this.matchesAttributes(t.attributes,e.attributes)))}matchesEvents(t,e){if(t)for(let r of t){let t=!1;for(let n of e)if(this.matchEvent(r,n)){t=!0;break}if(!t)return!1}return!0}matchesSpanConfig(t,e){return!(t.name&&!this.matchesValue(t.name,e.name)||!this.matchesAttributes(t.attributes,e.attributes)||!this.matchesEvents(t.events,e.events))}matchesLogConfig(t,e){if(t.severityText){let r=e["log.severity"];if("string"==typeof r&&!this.matchesValue(t.severityText,r))return!1}if(t.message){let r=e["log.message"];if("string"==typeof r&&!this.matchesValue(t.message,r))return!1}return!!this.matchesAttributes(t.attributes,e)}sampleSpan(t,e){if(t){for(let r of t)if(this.matchesSpanConfig(r,e))return{sample:this.sampler(r.samplingRatio),attributes:{[sP]:r.samplingRatio}}}return{sample:!0}}sampleLog(t,e){if(t){for(let r of t)if(this.matchesLogConfig(r,e.attributes))return{sample:this.sampler(r.samplingRatio),attributes:{[sP]:r.samplingRatio}}}return{sample:!0}}}let uJ=()=>{let t={end:()=>{},spanContext:()=>({traceId:"",spanId:"",traceFlags:0}),setAttribute:(e,r)=>t,setAttributes:e=>t,addEvent:(e,r,n)=>t,addLinks:e=>t,setStatus:e=>t,recordException:()=>{},addLink:()=>t,updateName:()=>t,isRecording:()=>!1};return t}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.