@launchdarkly/observability 0.4.9 → 0.4.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,309 @@
1
+ (function(nt,me){typeof exports=="object"&&typeof module<"u"?me(exports):typeof define=="function"&&define.amd?define(["exports"],me):(nt=typeof globalThis<"u"?globalThis:nt||self,me(nt.LDObserve={}))})(this,function(nt){"use strict";var me=Object.defineProperty,_c=(t,e,r)=>e in t?me(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,vt=(t,e,r)=>_c(t,typeof e!="symbol"?e+"":e,r),gc=(t,e,r)=>new Promise((n,i)=>{var o=c=>{try{u(r.next(c))}catch(s){i(s)}},a=c=>{try{u(r.throw(c))}catch(s){i(s)}},u=c=>c.done?n(c.value):Promise.resolve(c.value).then(o,a);u((r=r.apply(t,e)).next())});const po=Object.create(null),Tt=(t,e,...r)=>{const n=`[@launchdarkly plugins]: (${t}): `;console[e].apply(console,[n,...r]),Ec(n,...r)},bt=(t,e,r,...n)=>{po[`${t}-${e}`]||(po[`${t}-${e}`]=!0,Tt(t,r,...n))},Ec=(t,...e)=>gc(void 0,null,function*(){try{const{LDObserve:r}=yield Promise.resolve().then(()=>$p);r.recordLog(`${t}${e}`,"warn")}catch{}});class Tc{constructor(e,r){vt(this,"debug"),vt(this,"name"),this.debug=e,this.name=r}log(...e){if(this.debug){let r=`[${Date.now()}]`;this.name&&(r+=` - ${this.name}`),console.log.apply(console,[r,...e])}}warn(...e){let r=`[${Date.now()}]`;this.name&&(r+=` - ${this.name}`),console.warn.apply(console,[r,...e])}}let fo=class{constructor(){vt(this,"_sdk"),vt(this,"_isLoaded",!1),vt(this,"_callBuffer",[]),vt(this,"_capacity",1e5),vt(this,"_droppedEvents",0),vt(this,"_exceededCapacity",!1),vt(this,"_logger",new Tc)}_bufferCall(e,r){if(this._isLoaded)try{return this._sdk[e](...r)}catch(n){Tt(`Error executing buffered call to ${e}:`,"error",n)}else{this._enqueue({method:e,args:r});return}}_enqueue(e){this._callBuffer.length<this._capacity?(this._callBuffer.push(e),this._exceededCapacity=!1):(this._exceededCapacity||(this._exceededCapacity=!0,Tt("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this._droppedEvents+=1)}load(e){this._sdk=e,this._isLoaded=!0;for(const{method:r,args:n}of this._callBuffer)try{this._sdk[r](...n)}catch(i){Tt(`Error executing buffered call to ${r}:`,"error",i)}this._callBuffer=[]}};var bc=Object.defineProperty,Oc=Object.defineProperties,Sc=Object.getOwnPropertyDescriptors,Ze=Object.getOwnPropertySymbols,ho=Object.prototype.hasOwnProperty,vo=Object.prototype.propertyIsEnumerable,en=(t,e,r)=>e in t?bc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,C=(t,e)=>{for(var r in e||(e={}))ho.call(e,r)&&en(t,r,e[r]);if(Ze)for(var r of Ze(e))vo.call(e,r)&&en(t,r,e[r]);return t},tr=(t,e)=>Oc(t,Sc(e)),_e=(t,e)=>{var r={};for(var n in t)ho.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Ze)for(var n of Ze(t))e.indexOf(n)<0&&vo.call(t,n)&&(r[n]=t[n]);return r},ge=(t,e,r)=>en(t,typeof e!="symbol"?e+"":e,r),Yt=(t,e,r)=>new Promise((n,i)=>{var o=c=>{try{u(r.next(c))}catch(s){i(s)}},a=c=>{try{u(r.throw(c))}catch(s){i(s)}},u=c=>c.done?n(c.value):Promise.resolve(c.value).then(o,a);u((r=r.apply(t,e)).next())});function wc(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in t)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function er(t,e){throw new Error(e)}function Ac(t){return typeof t=="object"&&t!==null}function Lc(t,e){throw new Error("Unexpected invariant triggered.")}const Rc=/\r\n|[\n\r]/g;function rn(t,e){let r=0,n=1;for(const i of t.body.matchAll(Rc)){if(typeof i.index=="number"||Lc(),i.index>=e)break;r=i.index+i[0].length,n+=1}return{line:n,column:e+1-r}}function Nc(t){return yo(t.source,rn(t.source,t.start))}function yo(t,e){const r=t.locationOffset.column-1,n="".padStart(r)+t.body,i=e.line-1,o=t.locationOffset.line-1,a=e.line+o,u=e.line===1?r:0,c=e.column+u,s=`${t.name}:${a}:${c}
2
+ `,l=n.split(/\r\n|[\n\r]/g),p=l[i];if(p.length>120){const f=Math.floor(c/80),y=c%80,v=[];for(let m=0;m<p.length;m+=80)v.push(p.slice(m,m+80));return s+mo([[`${a} |`,v[0]],...v.slice(1,f+1).map(m=>["|",m]),["|","^".padStart(y)],["|",v[f+1]]])}return s+mo([[`${a-1} |`,l[i-1]],[`${a} |`,p],["|","^".padStart(c)],[`${a+1} |`,l[i+1]]])}function mo(t){const e=t.filter(([n,i])=>i!==void 0),r=Math.max(...e.map(([n])=>n.length));return e.map(([n,i])=>n.padStart(r)+(i?" "+i:"")).join(`
3
+ `)}function Cc(t){const e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}let xc=class mc extends Error{constructor(e,...r){var n,i,o;const{nodes:a,source:u,positions:c,path:s,originalError:l,extensions:p}=Cc(r);super(e),this.name="GraphQLError",this.path=s??void 0,this.originalError=l??void 0,this.nodes=_o(Array.isArray(a)?a:a?[a]:void 0);const f=_o((n=this.nodes)===null||n===void 0?void 0:n.map(v=>v.loc).filter(v=>v!=null));this.source=u??(f==null||(i=f[0])===null||i===void 0?void 0:i.source),this.positions=c??f?.map(v=>v.start),this.locations=c&&u?c.map(v=>rn(u,v)):f?.map(v=>rn(v.source,v.start));const y=Ac(l?.extensions)?l?.extensions:void 0;this.extensions=(o=p??y)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),l!=null&&l.stack?Object.defineProperty(this,"stack",{value:l.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,mc):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const r of this.nodes)r.loc&&(e+=`
4
+
5
+ `+Nc(r.loc));else if(this.source&&this.locations)for(const r of this.locations)e+=`
6
+
7
+ `+yo(this.source,r);return e}toJSON(){const e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}};function _o(t){return t===void 0||t.length===0?void 0:t}function F(t,e,r){return new xc(`Syntax Error: ${r}`,{source:t,positions:[e]})}let Pc=class{constructor(e,r,n){this.start=e.start,this.end=r.end,this.startToken=e,this.endToken=r,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},go=class{constructor(e,r,n,i,o,a){this.kind=e,this.start=r,this.end=n,this.line=i,this.column=o,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}};const Eo={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Ic=new Set(Object.keys(Eo));function To(t){const e=t?.kind;return typeof e=="string"&&Ic.has(e)}var Jt;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(Jt||(Jt={}));var nn;(function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(nn||(nn={}));var O;(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(O||(O={}));function on(t){return t===9||t===32}function Ee(t){return t>=48&&t<=57}function bo(t){return t>=97&&t<=122||t>=65&&t<=90}function Oo(t){return bo(t)||t===95}function Mc(t){return bo(t)||Ee(t)||t===95}function kc(t){var e;let r=Number.MAX_SAFE_INTEGER,n=null,i=-1;for(let a=0;a<t.length;++a){var o;const u=t[a],c=Dc(u);c!==u.length&&(n=(o=n)!==null&&o!==void 0?o:a,i=a,a!==0&&c<r&&(r=c))}return t.map((a,u)=>u===0?a:a.slice(r)).slice((e=n)!==null&&e!==void 0?e:0,i+1)}function Dc(t){let e=0;for(;e<t.length&&on(t.charCodeAt(e));)++e;return e}function Uc(t,e){const r=t.replace(/"""/g,'\\"""'),n=r.split(/\r\n|[\n\r]/g),i=n.length===1,o=n.length>1&&n.slice(1).every(y=>y.length===0||on(y.charCodeAt(0))),a=r.endsWith('\\"""'),u=t.endsWith('"')&&!a,c=t.endsWith("\\"),s=u||c,l=!i||t.length>70||s||o||a;let p="";const f=i&&on(t.charCodeAt(0));return(l&&!f||o)&&(p+=`
8
+ `),p+=r,(l||s)&&(p+=`
9
+ `),'"""'+p+'"""'}var d;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(d||(d={}));let jc=class{constructor(e){const r=new go(d.SOF,0,0,0,0);this.source=e,this.lastToken=r,this.token=r,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==d.EOF)do if(e.next)e=e.next;else{const r=$c(this,e.end);e.next=r,r.prev=e,e=r}while(e.kind===d.COMMENT);return e}};function Bc(t){return t===d.BANG||t===d.DOLLAR||t===d.AMP||t===d.PAREN_L||t===d.PAREN_R||t===d.SPREAD||t===d.COLON||t===d.EQUALS||t===d.AT||t===d.BRACKET_L||t===d.BRACKET_R||t===d.BRACE_L||t===d.PIPE||t===d.BRACE_R}function Qt(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function rr(t,e){return So(t.charCodeAt(e))&&wo(t.charCodeAt(e+1))}function So(t){return t>=55296&&t<=56319}function wo(t){return t>=56320&&t<=57343}function xt(t,e){const r=t.source.body.codePointAt(e);if(r===void 0)return d.EOF;if(r>=32&&r<=126){const n=String.fromCodePoint(r);return n==='"'?`'"'`:`"${n}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function $(t,e,r,n,i){const o=t.line,a=1+r-t.lineStart;return new go(e,r,n,o,a,i)}function $c(t,e){const r=t.source.body,n=r.length;let i=e;for(;i<n;){const o=r.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++t.line,t.lineStart=i;continue;case 13:r.charCodeAt(i+1)===10?i+=2:++i,++t.line,t.lineStart=i;continue;case 35:return Fc(t,i);case 33:return $(t,d.BANG,i,i+1);case 36:return $(t,d.DOLLAR,i,i+1);case 38:return $(t,d.AMP,i,i+1);case 40:return $(t,d.PAREN_L,i,i+1);case 41:return $(t,d.PAREN_R,i,i+1);case 46:if(r.charCodeAt(i+1)===46&&r.charCodeAt(i+2)===46)return $(t,d.SPREAD,i,i+3);break;case 58:return $(t,d.COLON,i,i+1);case 61:return $(t,d.EQUALS,i,i+1);case 64:return $(t,d.AT,i,i+1);case 91:return $(t,d.BRACKET_L,i,i+1);case 93:return $(t,d.BRACKET_R,i,i+1);case 123:return $(t,d.BRACE_L,i,i+1);case 124:return $(t,d.PIPE,i,i+1);case 125:return $(t,d.BRACE_R,i,i+1);case 34:return r.charCodeAt(i+1)===34&&r.charCodeAt(i+2)===34?qc(t,i):Gc(t,i)}if(Ee(o)||o===45)return Vc(t,i,o);if(Oo(o))return Kc(t,i);throw F(t.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Qt(o)||rr(r,i)?`Unexpected character: ${xt(t,i)}.`:`Invalid character: ${xt(t,i)}.`)}return $(t,d.EOF,n,n)}function Fc(t,e){const r=t.source.body,n=r.length;let i=e+1;for(;i<n;){const o=r.charCodeAt(i);if(o===10||o===13)break;if(Qt(o))++i;else if(rr(r,i))i+=2;else break}return $(t,d.COMMENT,e,i,r.slice(e+1,i))}function Vc(t,e,r){const n=t.source.body;let i=e,o=r,a=!1;if(o===45&&(o=n.charCodeAt(++i)),o===48){if(o=n.charCodeAt(++i),Ee(o))throw F(t.source,i,`Invalid number, unexpected digit after 0: ${xt(t,i)}.`)}else i=an(t,i,o),o=n.charCodeAt(i);if(o===46&&(a=!0,o=n.charCodeAt(++i),i=an(t,i,o),o=n.charCodeAt(i)),(o===69||o===101)&&(a=!0,o=n.charCodeAt(++i),(o===43||o===45)&&(o=n.charCodeAt(++i)),i=an(t,i,o),o=n.charCodeAt(i)),o===46||Oo(o))throw F(t.source,i,`Invalid number, expected digit but got: ${xt(t,i)}.`);return $(t,a?d.FLOAT:d.INT,e,i,n.slice(e,i))}function an(t,e,r){if(!Ee(r))throw F(t.source,e,`Invalid number, expected digit but got: ${xt(t,e)}.`);const n=t.source.body;let i=e+1;for(;Ee(n.charCodeAt(i));)++i;return i}function Gc(t,e){const r=t.source.body,n=r.length;let i=e+1,o=i,a="";for(;i<n;){const u=r.charCodeAt(i);if(u===34)return a+=r.slice(o,i),$(t,d.STRING,e,i+1,a);if(u===92){a+=r.slice(o,i);const c=r.charCodeAt(i+1)===117?r.charCodeAt(i+2)===123?Hc(t,i):zc(t,i):Xc(t,i);a+=c.value,i+=c.size,o=i;continue}if(u===10||u===13)break;if(Qt(u))++i;else if(rr(r,i))i+=2;else throw F(t.source,i,`Invalid character within String: ${xt(t,i)}.`)}throw F(t.source,i,"Unterminated string.")}function Hc(t,e){const r=t.source.body;let n=0,i=3;for(;i<12;){const o=r.charCodeAt(e+i++);if(o===125){if(i<5||!Qt(n))break;return{value:String.fromCodePoint(n),size:i}}if(n=n<<4|Te(o),n<0)break}throw F(t.source,e,`Invalid Unicode escape sequence: "${r.slice(e,e+i)}".`)}function zc(t,e){const r=t.source.body,n=Ao(r,e+2);if(Qt(n))return{value:String.fromCodePoint(n),size:6};if(So(n)&&r.charCodeAt(e+6)===92&&r.charCodeAt(e+7)===117){const i=Ao(r,e+8);if(wo(i))return{value:String.fromCodePoint(n,i),size:12}}throw F(t.source,e,`Invalid Unicode escape sequence: "${r.slice(e,e+6)}".`)}function Ao(t,e){return Te(t.charCodeAt(e))<<12|Te(t.charCodeAt(e+1))<<8|Te(t.charCodeAt(e+2))<<4|Te(t.charCodeAt(e+3))}function Te(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function Xc(t,e){const r=t.source.body;switch(r.charCodeAt(e+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
10
+ `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw F(t.source,e,`Invalid character escape sequence: "${r.slice(e,e+2)}".`)}function qc(t,e){const r=t.source.body,n=r.length;let i=t.lineStart,o=e+3,a=o,u="";const c=[];for(;o<n;){const s=r.charCodeAt(o);if(s===34&&r.charCodeAt(o+1)===34&&r.charCodeAt(o+2)===34){u+=r.slice(a,o),c.push(u);const l=$(t,d.BLOCK_STRING,e,o+3,kc(c).join(`
11
+ `));return t.line+=c.length-1,t.lineStart=i,l}if(s===92&&r.charCodeAt(o+1)===34&&r.charCodeAt(o+2)===34&&r.charCodeAt(o+3)===34){u+=r.slice(a,o),a=o+1,o+=4;continue}if(s===10||s===13){u+=r.slice(a,o),c.push(u),s===13&&r.charCodeAt(o+1)===10?o+=2:++o,u="",a=o,i=o;continue}if(Qt(s))++o;else if(rr(r,o))o+=2;else throw F(t.source,o,`Invalid character within String: ${xt(t,o)}.`)}throw F(t.source,o,"Unterminated string.")}function Kc(t,e){const r=t.source.body,n=r.length;let i=e+1;for(;i<n;){const o=r.charCodeAt(i);if(Mc(o))++i;else break}return $(t,d.NAME,e,i,r.slice(e,i))}const Wc=10,Lo=2;function sn(t){return nr(t,[])}function nr(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return Yc(t,e);default:return String(t)}}function Yc(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";const r=[...e,t];if(Jc(t)){const n=t.toJSON();if(n!==t)return typeof n=="string"?n:nr(n,r)}else if(Array.isArray(t))return Zc(t,r);return Qc(t,r)}function Jc(t){return typeof t.toJSON=="function"}function Qc(t,e){const r=Object.entries(t);return r.length===0?"{}":e.length>Lo?"["+tl(t)+"]":"{ "+r.map(([n,i])=>n+": "+nr(i,e)).join(", ")+" }"}function Zc(t,e){if(t.length===0)return"[]";if(e.length>Lo)return"[Array]";const r=Math.min(Wc,t.length),n=t.length-r,i=[];for(let o=0;o<r;++o)i.push(nr(t[o],e));return n===1?i.push("... 1 more item"):n>1&&i.push(`... ${n} more items`),"["+i.join(", ")+"]"}function tl(t){const e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){const r=t.constructor.name;if(typeof r=="string"&&r!=="")return r}return e}const el=globalThis.process&&process.env.NODE_ENV==="production",rl=el?function(t,e){return t instanceof e}:function(t,e){if(t instanceof e)return!0;if(typeof t=="object"&&t!==null){var r;const n=e.prototype[Symbol.toStringTag],i=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(n===i){const o=sn(t);throw new Error(`Cannot use ${n} "${o}" from another module or realm.
12
+
13
+ Ensure that there is only one instance of "graphql" in the node_modules
14
+ directory. If different versions of "graphql" are the dependencies of other
15
+ relied on modules, use "resolutions" to ensure only one version is installed.
16
+
17
+ https://yarnpkg.com/en/docs/selective-version-resolutions
18
+
19
+ Duplicate "graphql" modules cannot be used at the same time since different
20
+ versions may have different capabilities and behavior. The data from one
21
+ version used in the function from another could produce confusing and
22
+ spurious results.`)}}return!1};let Ro=class{constructor(e,r="GraphQL request",n={line:1,column:1}){typeof e=="string"||er(!1,`Body must be a string. Received: ${sn(e)}.`),this.body=e,this.name=r,this.locationOffset=n,this.locationOffset.line>0||er(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||er(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function nl(t){return rl(t,Ro)}function No(t,e){const r=new il(t,e),n=r.parseDocument();return Object.defineProperty(n,"tokenCount",{enumerable:!1,value:r.tokenCount}),n}let il=class{constructor(e,r={}){const n=nl(e)?e:new Ro(e);this._lexer=new jc(n),this._options=r,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const e=this.expectToken(d.NAME);return this.node(e,{kind:O.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:O.DOCUMENT,definitions:this.many(d.SOF,this.parseDefinition,d.EOF)})}parseDefinition(){if(this.peek(d.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),r=e?this._lexer.lookahead():this._lexer.token;if(r.kind===d.NAME){switch(r.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw F(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(r.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(r)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(d.BRACE_L))return this.node(e,{kind:O.OPERATION_DEFINITION,operation:Jt.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const r=this.parseOperationType();let n;return this.peek(d.NAME)&&(n=this.parseName()),this.node(e,{kind:O.OPERATION_DEFINITION,operation:r,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(d.NAME);switch(e.value){case"query":return Jt.QUERY;case"mutation":return Jt.MUTATION;case"subscription":return Jt.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(d.PAREN_L,this.parseVariableDefinition,d.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:O.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(d.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(d.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(d.DOLLAR),this.node(e,{kind:O.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:O.SELECTION_SET,selections:this.many(d.BRACE_L,this.parseSelection,d.BRACE_R)})}parseSelection(){return this.peek(d.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,r=this.parseName();let n,i;return this.expectOptionalToken(d.COLON)?(n=r,i=this.parseName()):i=r,this.node(e,{kind:O.FIELD,alias:n,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(d.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const r=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(d.PAREN_L,r,d.PAREN_R)}parseArgument(e=!1){const r=this._lexer.token,n=this.parseName();return this.expectToken(d.COLON),this.node(r,{kind:O.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(d.SPREAD);const r=this.expectOptionalKeyword("on");return!r&&this.peek(d.NAME)?this.node(e,{kind:O.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:O.INLINE_FRAGMENT,typeCondition:r?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(e,{kind:O.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:O.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(e){const r=this._lexer.token;switch(r.kind){case d.BRACKET_L:return this.parseList(e);case d.BRACE_L:return this.parseObject(e);case d.INT:return this.advanceLexer(),this.node(r,{kind:O.INT,value:r.value});case d.FLOAT:return this.advanceLexer(),this.node(r,{kind:O.FLOAT,value:r.value});case d.STRING:case d.BLOCK_STRING:return this.parseStringLiteral();case d.NAME:switch(this.advanceLexer(),r.value){case"true":return this.node(r,{kind:O.BOOLEAN,value:!0});case"false":return this.node(r,{kind:O.BOOLEAN,value:!1});case"null":return this.node(r,{kind:O.NULL});default:return this.node(r,{kind:O.ENUM,value:r.value})}case d.DOLLAR:if(e)if(this.expectToken(d.DOLLAR),this._lexer.token.kind===d.NAME){const n=this._lexer.token.value;throw F(this._lexer.source,r.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(r);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:O.STRING,value:e.value,block:e.kind===d.BLOCK_STRING})}parseList(e){const r=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:O.LIST,values:this.any(d.BRACKET_L,r,d.BRACKET_R)})}parseObject(e){const r=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:O.OBJECT,fields:this.any(d.BRACE_L,r,d.BRACE_R)})}parseObjectField(e){const r=this._lexer.token,n=this.parseName();return this.expectToken(d.COLON),this.node(r,{kind:O.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const r=[];for(;this.peek(d.AT);)r.push(this.parseDirective(e));return r}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const r=this._lexer.token;return this.expectToken(d.AT),this.node(r,{kind:O.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let r;if(this.expectOptionalToken(d.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(d.BRACKET_R),r=this.node(e,{kind:O.LIST_TYPE,type:n})}else r=this.parseNamedType();return this.expectOptionalToken(d.BANG)?this.node(e,{kind:O.NON_NULL_TYPE,type:r}):r}parseNamedType(){return this.node(this._lexer.token,{kind:O.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(d.STRING)||this.peek(d.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.many(d.BRACE_L,this.parseOperationTypeDefinition,d.BRACE_R);return this.node(e,{kind:O.SCHEMA_DEFINITION,description:r,directives:n,operationTypes:i})}parseOperationTypeDefinition(){const e=this._lexer.token,r=this.parseOperationType();this.expectToken(d.COLON);const n=this.parseNamedType();return this.node(e,{kind:O.OPERATION_TYPE_DEFINITION,operation:r,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();return this.node(e,{kind:O.SCALAR_TYPE_DEFINITION,description:r,name:n,directives:i})}parseObjectTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:O.OBJECT_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:o,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(d.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(d.BRACE_L,this.parseFieldDefinition,d.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,r=this.parseDescription(),n=this.parseName(),i=this.parseArgumentDefs();this.expectToken(d.COLON);const o=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(e,{kind:O.FIELD_DEFINITION,description:r,name:n,arguments:i,type:o,directives:a})}parseArgumentDefs(){return this.optionalMany(d.PAREN_L,this.parseInputValueDef,d.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,r=this.parseDescription(),n=this.parseName();this.expectToken(d.COLON);const i=this.parseTypeReference();let o;this.expectOptionalToken(d.EQUALS)&&(o=this.parseConstValueLiteral());const a=this.parseConstDirectives();return this.node(e,{kind:O.INPUT_VALUE_DEFINITION,description:r,name:n,type:i,defaultValue:o,directives:a})}parseInterfaceTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:O.INTERFACE_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:o,fields:a})}parseUnionTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(e,{kind:O.UNION_TYPE_DEFINITION,description:r,name:n,directives:i,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(d.EQUALS)?this.delimitedMany(d.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(e,{kind:O.ENUM_TYPE_DEFINITION,description:r,name:n,directives:i,values:o})}parseEnumValuesDefinition(){return this.optionalMany(d.BRACE_L,this.parseEnumValueDefinition,d.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,r=this.parseDescription(),n=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(e,{kind:O.ENUM_VALUE_DEFINITION,description:r,name:n,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw F(this._lexer.source,this._lexer.token.start,`${ir(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(e,{kind:O.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:n,directives:i,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(d.BRACE_L,this.parseInputValueDef,d.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===d.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.optionalMany(d.BRACE_L,this.parseOperationTypeDefinition,d.BRACE_R);if(r.length===0&&n.length===0)throw this.unexpected();return this.node(e,{kind:O.SCHEMA_EXTENSION,directives:r,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(e,{kind:O.SCALAR_TYPE_EXTENSION,name:r,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(e,{kind:O.OBJECT_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:o})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(e,{kind:O.INTERFACE_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:o})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:O.UNION_TYPE_EXTENSION,name:r,directives:n,types:i})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:O.ENUM_TYPE_EXTENSION,name:r,directives:n,values:i})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:O.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:n,fields:i})}parseDirectiveDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("directive"),this.expectToken(d.AT);const n=this.parseName(),i=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const a=this.parseDirectiveLocations();return this.node(e,{kind:O.DIRECTIVE_DEFINITION,description:r,name:n,arguments:i,repeatable:o,locations:a})}parseDirectiveLocations(){return this.delimitedMany(d.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,r=this.parseName();if(Object.prototype.hasOwnProperty.call(nn,r.value))return r;throw this.unexpected(e)}node(e,r){return this._options.noLocation!==!0&&(r.loc=new Pc(e,this._lexer.lastToken,this._lexer.source)),r}peek(e){return this._lexer.token.kind===e}expectToken(e){const r=this._lexer.token;if(r.kind===e)return this.advanceLexer(),r;throw F(this._lexer.source,r.start,`Expected ${Co(e)}, found ${ir(r)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){const r=this._lexer.token;if(r.kind===d.NAME&&r.value===e)this.advanceLexer();else throw F(this._lexer.source,r.start,`Expected "${e}", found ${ir(r)}.`)}expectOptionalKeyword(e){const r=this._lexer.token;return r.kind===d.NAME&&r.value===e?(this.advanceLexer(),!0):!1}unexpected(e){const r=e??this._lexer.token;return F(this._lexer.source,r.start,`Unexpected ${ir(r)}.`)}any(e,r,n){this.expectToken(e);const i=[];for(;!this.expectOptionalToken(n);)i.push(r.call(this));return i}optionalMany(e,r,n){if(this.expectOptionalToken(e)){const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}return[]}many(e,r,n){this.expectToken(e);const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}delimitedMany(e,r){this.expectOptionalToken(e);const n=[];do n.push(r.call(this));while(this.expectOptionalToken(e));return n}advanceLexer(){const{maxTokens:e}=this._options,r=this._lexer.advance();if(r.kind!==d.EOF&&(++this._tokenCounter,e!==void 0&&this._tokenCounter>e))throw F(this._lexer.source,r.start,`Document contains more that ${e} tokens. Parsing aborted.`)}};function ir(t){const e=t.value;return Co(t.kind)+(e!=null?` "${e}"`:"")}function Co(t){return Bc(t)?`"${t}"`:t}function ol(t){return`"${t.replace(al,sl)}"`}const al=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function sl(t){return ul[t.charCodeAt(0)]}const ul=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],cl=Object.freeze({});function ll(t,e,r=Eo){const n=new Map;for(const E of Object.values(O))n.set(E,pl(e,E));let i,o=Array.isArray(t),a=[t],u=-1,c=[],s=t,l,p;const f=[],y=[];do{u++;const E=u===a.length,R=E&&c.length!==0;if(E){if(l=y.length===0?void 0:f[f.length-1],s=p,p=y.pop(),R)if(o){s=s.slice();let D=0;for(const[G,j]of c){const H=G-D;j===null?(s.splice(H,1),D++):s[H]=j}}else{s=C({},s);for(const[D,G]of c)s[D]=G}u=i.index,a=i.keys,c=i.edits,o=i.inArray,i=i.prev}else if(p){if(l=o?u:a[u],s=p[l],s==null)continue;f.push(l)}let U;if(!Array.isArray(s)){var v,m;To(s)||er(!1,`Invalid AST Node: ${sn(s)}.`);const D=E?(v=n.get(s.kind))===null||v===void 0?void 0:v.leave:(m=n.get(s.kind))===null||m===void 0?void 0:m.enter;if(U=D?.call(e,s,l,p,f,y),U===cl)break;if(U===!1){if(!E){f.pop();continue}}else if(U!==void 0&&(c.push([l,U]),!E))if(To(U))s=U;else{f.pop();continue}}if(U===void 0&&R&&c.push([l,s]),E)f.pop();else{var _;i={inArray:o,index:u,keys:a,edits:c,prev:i},o=Array.isArray(s),a=o?s:(_=r[s.kind])!==null&&_!==void 0?_:[],u=-1,c=[],p&&y.push(p),p=s}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:t}function pl(t,e){const r=t[e];return typeof r=="object"?r:typeof r=="function"?{enter:r,leave:void 0}:{enter:t.enter,leave:t.leave}}function fl(t){return ll(t,dl)}const hl=80,dl={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>b(t.definitions,`
23
+
24
+ `)},OperationDefinition:{leave(t){const e=L("(",b(t.variableDefinitions,", "),")"),r=b([t.operation,b([t.name,e]),b(t.directives," ")]," ");return(r==="query"?"":r+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:r,directives:n})=>t+": "+e+L(" = ",r)+L(" ",b(n," "))},SelectionSet:{leave:({selections:t})=>st(t)},Field:{leave({alias:t,name:e,arguments:r,directives:n,selectionSet:i}){const o=L("",t,": ")+e;let a=o+L("(",b(r,", "),")");return a.length>hl&&(a=o+L(`(
25
+ `,or(b(r,`
26
+ `)),`
27
+ )`)),b([a,b(n," "),i]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+L(" ",b(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:r})=>b(["...",L("on ",t),b(e," "),r]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:r,directives:n,selectionSet:i})=>`fragment ${t}${L("(",b(r,", "),")")} on ${e} ${L("",b(n," ")," ")}`+i},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?Uc(t):ol(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+b(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+b(t,", ")+"}"},ObjectField:{leave:({name:t,value:e})=>t+": "+e},Directive:{leave:({name:t,arguments:e})=>"@"+t+L("(",b(e,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:e,operationTypes:r})=>L("",t,`
28
+ `)+b(["schema",b(e," "),st(r)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:r})=>L("",t,`
29
+ `)+b(["scalar",e,b(r," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:r,directives:n,fields:i})=>L("",t,`
30
+ `)+b(["type",e,L("implements ",b(r," & ")),b(n," "),st(i)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:r,type:n,directives:i})=>L("",t,`
31
+ `)+e+(xo(r)?L(`(
32
+ `,or(b(r,`
33
+ `)),`
34
+ )`):L("(",b(r,", "),")"))+": "+n+L(" ",b(i," "))},InputValueDefinition:{leave:({description:t,name:e,type:r,defaultValue:n,directives:i})=>L("",t,`
35
+ `)+b([e+": "+r,L("= ",n),b(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:t,name:e,interfaces:r,directives:n,fields:i})=>L("",t,`
36
+ `)+b(["interface",e,L("implements ",b(r," & ")),b(n," "),st(i)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:r,types:n})=>L("",t,`
37
+ `)+b(["union",e,b(r," "),L("= ",b(n," | "))]," ")},EnumTypeDefinition:{leave:({description:t,name:e,directives:r,values:n})=>L("",t,`
38
+ `)+b(["enum",e,b(r," "),st(n)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:r})=>L("",t,`
39
+ `)+b([e,b(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:r,fields:n})=>L("",t,`
40
+ `)+b(["input",e,b(r," "),st(n)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:r,repeatable:n,locations:i})=>L("",t,`
41
+ `)+"directive @"+e+(xo(r)?L(`(
42
+ `,or(b(r,`
43
+ `)),`
44
+ )`):L("(",b(r,", "),")"))+(n?" repeatable":"")+" on "+b(i," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>b(["extend schema",b(t," "),st(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>b(["extend scalar",t,b(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:r,fields:n})=>b(["extend type",t,L("implements ",b(e," & ")),b(r," "),st(n)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:r,fields:n})=>b(["extend interface",t,L("implements ",b(e," & ")),b(r," "),st(n)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:r})=>b(["extend union",t,b(e," "),L("= ",b(r," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:r})=>b(["extend enum",t,b(e," "),st(r)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:r})=>b(["extend input",t,b(e," "),st(r)]," ")}};function b(t,e=""){var r;return(r=t?.filter(n=>n).join(e))!==null&&r!==void 0?r:""}function st(t){return L(`{
45
+ `,or(b(t,`
46
+ `)),`
47
+ }`)}function L(t,e,r=""){return e!=null&&e!==""?t+e+r:""}function or(t){return L(" ",t.replace(/\n/g,`
48
+ `))}function xo(t){var e;return(e=t?.some(r=>r.includes(`
49
+ `)))!==null&&e!==void 0?e:!1}const un=JSON,vl=t=>t.toUpperCase(),yl=t=>{const e={};return t.forEach((r,n)=>{e[n]=r}),e},ml=(t,e,r)=>t.document?t:{document:t,variables:e,requestHeaders:r,signal:void 0},_l=(t,e,r)=>t.query?t:{query:t,variables:e,requestHeaders:r,signal:void 0},gl=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},Po=t=>{var e,r;let n;const i=t.definitions.filter(o=>o.kind==="OperationDefinition");return i.length===1&&(n=(r=(e=i[0])==null?void 0:e.name)==null?void 0:r.value),n},cn=t=>{if(typeof t=="string"){let r;try{const n=No(t);r=Po(n)}catch{}return{query:t,operationName:r}}const e=Po(t);return{query:fl(t),operationName:e}};let Io=class tn extends Error{constructor(e,r){const n=`${tn.extractMessage(e)}: ${JSON.stringify({response:e,request:r})}`;super(n),Object.setPrototypeOf(this,tn.prototype),this.response=e,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,tn)}static extractMessage(e){var r,n,i;return(i=(n=(r=e.errors)==null?void 0:r[0])==null?void 0:n.message)!=null?i:`GraphQL Error (Code: ${e.status})`}};var ln=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ar(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var pn={exports:{}};(function(t,e){var r=typeof self<"u"?self:ln,n=function(){function o(){this.fetch=!1,this.DOMException=r.DOMException}return o.prototype=r,new o}();(function(o){(function(a){var u={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function c(h){return h&&DataView.prototype.isPrototypeOf(h)}if(u.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(h){return h&&s.indexOf(Object.prototype.toString.call(h))>-1};function p(h){if(typeof h!="string"&&(h=String(h)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(h))throw new TypeError("Invalid character in header field name");return h.toLowerCase()}function f(h){return typeof h!="string"&&(h=String(h)),h}function y(h){var g={next:function(){var A=h.shift();return{done:A===void 0,value:A}}};return u.iterable&&(g[Symbol.iterator]=function(){return g}),g}function v(h){this.map={},h instanceof v?h.forEach(function(g,A){this.append(A,g)},this):Array.isArray(h)?h.forEach(function(g){this.append(g[0],g[1])},this):h&&Object.getOwnPropertyNames(h).forEach(function(g){this.append(g,h[g])},this)}v.prototype.append=function(h,g){h=p(h),g=f(g);var A=this.map[h];this.map[h]=A?A+", "+g:g},v.prototype.delete=function(h){delete this.map[p(h)]},v.prototype.get=function(h){return h=p(h),this.has(h)?this.map[h]:null},v.prototype.has=function(h){return this.map.hasOwnProperty(p(h))},v.prototype.set=function(h,g){this.map[p(h)]=f(g)},v.prototype.forEach=function(h,g){for(var A in this.map)this.map.hasOwnProperty(A)&&h.call(g,this.map[A],A,this)},v.prototype.keys=function(){var h=[];return this.forEach(function(g,A){h.push(A)}),y(h)},v.prototype.values=function(){var h=[];return this.forEach(function(g){h.push(g)}),y(h)},v.prototype.entries=function(){var h=[];return this.forEach(function(g,A){h.push([A,g])}),y(h)},u.iterable&&(v.prototype[Symbol.iterator]=v.prototype.entries);function m(h){if(h.bodyUsed)return Promise.reject(new TypeError("Already read"));h.bodyUsed=!0}function _(h){return new Promise(function(g,A){h.onload=function(){g(h.result)},h.onerror=function(){A(h.error)}})}function E(h){var g=new FileReader,A=_(g);return g.readAsArrayBuffer(h),A}function R(h){var g=new FileReader,A=_(g);return g.readAsText(h),A}function U(h){for(var g=new Uint8Array(h),A=new Array(g.length),W=0;W<g.length;W++)A[W]=String.fromCharCode(g[W]);return A.join("")}function D(h){if(h.slice)return h.slice(0);var g=new Uint8Array(h.byteLength);return g.set(new Uint8Array(h)),g.buffer}function G(){return this.bodyUsed=!1,this._initBody=function(h){this._bodyInit=h,h?typeof h=="string"?this._bodyText=h:u.blob&&Blob.prototype.isPrototypeOf(h)?this._bodyBlob=h:u.formData&&FormData.prototype.isPrototypeOf(h)?this._bodyFormData=h:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)?this._bodyText=h.toString():u.arrayBuffer&&u.blob&&c(h)?(this._bodyArrayBuffer=D(h.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(h)||l(h))?this._bodyArrayBuffer=D(h):this._bodyText=h=Object.prototype.toString.call(h):this._bodyText="",this.headers.get("content-type")||(typeof h=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var h=m(this);if(h)return h;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(E)}),this.text=function(){var h=m(this);if(h)return h;if(this._bodyBlob)return R(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(U(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(Et)}),this.json=function(){return this.text().then(JSON.parse)},this}var j=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function H(h){var g=h.toUpperCase();return j.indexOf(g)>-1?g:h}function B(h,g){g=g||{};var A=g.body;if(h instanceof B){if(h.bodyUsed)throw new TypeError("Already read");this.url=h.url,this.credentials=h.credentials,g.headers||(this.headers=new v(h.headers)),this.method=h.method,this.mode=h.mode,this.signal=h.signal,!A&&h._bodyInit!=null&&(A=h._bodyInit,h.bodyUsed=!0)}else this.url=String(h);if(this.credentials=g.credentials||this.credentials||"same-origin",(g.headers||!this.headers)&&(this.headers=new v(g.headers)),this.method=H(g.method||this.method||"GET"),this.mode=g.mode||this.mode||null,this.signal=g.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&A)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(A)}B.prototype.clone=function(){return new B(this,{body:this._bodyInit})};function Et(h){var g=new FormData;return h.trim().split("&").forEach(function(A){if(A){var W=A.split("="),z=W.shift().replace(/\+/g," "),M=W.join("=").replace(/\+/g," ");g.append(decodeURIComponent(z),decodeURIComponent(M))}}),g}function qt(h){var g=new v,A=h.replace(/\r?\n[\t ]+/g," ");return A.split(/\r?\n/).forEach(function(W){var z=W.split(":"),M=z.shift().trim();if(M){var Zr=z.join(":").trim();g.append(M,Zr)}}),g}G.call(B.prototype);function K(h,g){g||(g={}),this.type="default",this.status=g.status===void 0?200:g.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in g?g.statusText:"OK",this.headers=new v(g.headers),this.url=g.url||"",this._initBody(h)}G.call(K.prototype),K.prototype.clone=function(){return new K(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new v(this.headers),url:this.url})},K.error=function(){var h=new K(null,{status:0,statusText:""});return h.type="error",h};var ye=[301,302,303,307,308];K.redirect=function(h,g){if(ye.indexOf(g)===-1)throw new RangeError("Invalid status code");return new K(null,{status:g,headers:{location:h}})},a.DOMException=o.DOMException;try{new a.DOMException}catch{a.DOMException=function(g,A){this.message=g,this.name=A;var W=Error(g);this.stack=W.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function Kt(h,g){return new Promise(function(A,W){var z=new B(h,g);if(z.signal&&z.signal.aborted)return W(new a.DOMException("Aborted","AbortError"));var M=new XMLHttpRequest;function Zr(){M.abort()}M.onload=function(){var Qe={status:M.status,statusText:M.statusText,headers:qt(M.getAllResponseHeaders()||"")};Qe.url="responseURL"in M?M.responseURL:Qe.headers.get("X-Request-URL");var lo="response"in M?M.response:M.responseText;A(new K(lo,Qe))},M.onerror=function(){W(new TypeError("Network request failed"))},M.ontimeout=function(){W(new TypeError("Network request failed"))},M.onabort=function(){W(new a.DOMException("Aborted","AbortError"))},M.open(z.method,z.url,!0),z.credentials==="include"?M.withCredentials=!0:z.credentials==="omit"&&(M.withCredentials=!1),"responseType"in M&&u.blob&&(M.responseType="blob"),z.headers.forEach(function(Qe,lo){M.setRequestHeader(lo,Qe)}),z.signal&&(z.signal.addEventListener("abort",Zr),M.onreadystatechange=function(){M.readyState===4&&z.signal.removeEventListener("abort",Zr)}),M.send(typeof z._bodyInit>"u"?null:z._bodyInit)})}return Kt.polyfill=!0,o.fetch||(o.fetch=Kt,o.Headers=v,o.Request=B,o.Response=K),a.Headers=v,a.Request=B,a.Response=K,a.fetch=Kt,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(pn,pn.exports);var sr=pn.exports;const ur=ar(sr),El=wc({__proto__:null,default:ur},[sr]),Zt=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||El&&sr.Headers&&t instanceof sr.Headers?e=yl(t):Array.isArray(t)?t.forEach(([r,n])=>{r&&n!==void 0&&(e[r]=n)}):e=t),e},Mo=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),Tl=t=>{if(!Array.isArray(t.query)){const n=t,i=[`query=${encodeURIComponent(Mo(n.query))}`];return t.variables&&i.push(`variables=${encodeURIComponent(n.jsonSerializer.stringify(n.variables))}`),n.operationName&&i.push(`operationName=${encodeURIComponent(n.operationName)}`),i.join("&")}if(typeof t.variables<"u"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");const e=t,r=t.query.reduce((n,i,o)=>(n.push({query:Mo(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),n),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(r))}`},bl=t=>e=>Yt(void 0,null,function*(){var r;const{url:n,query:i,variables:o,operationName:a,fetch:u,fetchOptions:c,middleware:s}=e,l=C({},e.headers);let p="",f;t==="POST"?(f=Sl(i,o,a,c.jsonSerializer),typeof f=="string"&&(l["Content-Type"]="application/json")):p=Tl({query:i,variables:o,operationName:a,jsonSerializer:(r=c.jsonSerializer)!=null?r:un});const y=C({method:t,headers:l,body:f},c);let v=n,m=y;if(s){const _=yield Promise.resolve(s(tr(C({},y),{url:n,operationName:a,variables:o}))),{url:E}=_,R=_e(_,["url"]);v=E,m=R}return p&&(v=`${v}?${p}`),yield u(v,m)});let Ol=class{constructor(e,r={}){this.url=e,this.requestConfig=r,this.rawRequest=(...n)=>Yt(this,null,function*(){const[i,o,a]=n,u=_l(i,o,a),c=this.requestConfig,{headers:s,fetch:l=ur,method:p="POST",requestMiddleware:f,responseMiddleware:y}=c,v=_e(c,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:m}=this;u.signal!==void 0&&(v.signal=u.signal);const{operationName:_}=cn(u.query);return fn({url:m,query:u.query,variables:u.variables,headers:C(C({},Zt(hn(s))),Zt(u.requestHeaders)),operationName:_,fetch:l,method:p,fetchOptions:v,middleware:f}).then(E=>(y&&y(E),E)).catch(E=>{throw y&&y(E),E})})}request(e,...r){return Yt(this,null,function*(){const[n,i]=r,o=ml(e,n,i),a=this.requestConfig,{headers:u,fetch:c=ur,method:s="POST",requestMiddleware:l,responseMiddleware:p}=a,f=_e(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:y}=this;o.signal!==void 0&&(f.signal=o.signal);const{query:v,operationName:m}=cn(o.document);return fn({url:y,query:v,variables:o.variables,headers:C(C({},Zt(hn(u))),Zt(o.requestHeaders)),operationName:m,fetch:c,method:s,fetchOptions:f,middleware:l}).then(_=>(p&&p(_),_.data)).catch(_=>{throw p&&p(_),_})})}batchRequests(e,r){var n;const i=gl(e,r),o=this.requestConfig,{headers:a}=o,u=_e(o,["headers"]);i.signal!==void 0&&(u.signal=i.signal);const c=i.documents.map(({document:l})=>cn(l).query),s=i.documents.map(({variables:l})=>l);return fn({url:this.url,query:c,variables:s,headers:C(C({},Zt(hn(a))),Zt(i.requestHeaders)),operationName:void 0,fetch:(n=this.requestConfig.fetch)!=null?n:ur,method:this.requestConfig.method||"POST",fetchOptions:u,middleware:this.requestConfig.requestMiddleware}).then(l=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l.data)).catch(l=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,r){const{headers:n}=this.requestConfig;return n?n[e]=r:this.requestConfig.headers={[e]:r},this}setEndpoint(e){return this.url=e,this}};const fn=t=>Yt(void 0,null,function*(){var e,r;const{query:n,variables:i,fetchOptions:o}=t,a=bl(vl((e=t.method)!=null?e:"post")),u=Array.isArray(t.query),c=yield a(t),s=yield wl(c,(r=o.jsonSerializer)!=null?r:un),l=Array.isArray(s)?!s.some(({data:f})=>!f):!!s.data,p=Array.isArray(s)||!s.errors||Array.isArray(s.errors)&&!s.errors.length||o.errorPolicy==="all"||o.errorPolicy==="ignore";if(c.ok&&p&&l){const f=s,y=_e(f,["errors"]),v=o.errorPolicy==="ignore"?y:s;return tr(C({},u?{data:v}:v),{headers:c.headers,status:c.status})}else{const f=typeof s=="string"?{error:s}:s;throw new Io(tr(C({},f),{status:c.status,headers:c.headers}),{query:n,variables:i})}}),Sl=(t,e,r,n)=>{const i=n??un;if(!Array.isArray(t))return i.stringify({query:t,variables:e,operationName:r});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");const o=t.reduce((a,u,c)=>(a.push({query:u,variables:e?e[c]:void 0}),a),[]);return i.stringify(o)},wl=(t,e)=>Yt(void 0,null,function*(){let r;return t.headers.forEach((n,i)=>{i.toLowerCase()==="content-type"&&(r=n)}),r&&(r.toLowerCase().startsWith("application/json")||r.toLowerCase().startsWith("application/graphql+json")||r.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(yield t.text()):t.text()}),hn=t=>typeof t=="function"?t():t;var dn={exports:{}};(function(t,e){e=t.exports=r,e.getSerialize=n;function r(i,o,a,u){return JSON.stringify(i,n(o,u),a)}function n(i,o){var a=[],u=[];return o==null&&(o=function(c,s){return a[0]===s?"[Circular ~]":"[Circular ~."+u.slice(0,a.indexOf(s)).join(".")+"]"}),function(c,s){if(a.length>0){var l=a.indexOf(this);~l?a.splice(l+1):a.push(this),~l?u.splice(l,1/0,c):u.push(c),~a.indexOf(s)&&(s=o.call(this,c,s))}else a.push(s);return i==null?s:i.call(this,c,s)}}})(dn,dn.exports);var Al=dn.exports;const be=ar(Al);var cr=function(){return cr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},cr.apply(this,arguments)},lr=new Map,vn=new Map,ko=!0,pr=!1;function Do(t){return t.replace(/[\s,]+/g," ").trim()}function Ll(t){return Do(t.source.body.substring(t.start,t.end))}function Rl(t){var e=new Set,r=[];return t.definitions.forEach(function(n){if(n.kind==="FragmentDefinition"){var i=n.name.value,o=Ll(n.loc),a=vn.get(i);a&&!a.has(o)?ko&&console.warn("Warning: fragment with name "+i+` already exists.
50
+ graphql-tag enforces all fragment names across your application to be unique; read more about
51
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a||vn.set(i,a=new Set),a.add(o),e.has(o)||(e.add(o),r.push(n))}else r.push(n)}),cr(cr({},t),{definitions:r})}function Nl(t){var e=new Set(t.definitions);e.forEach(function(n){n.loc&&delete n.loc,Object.keys(n).forEach(function(i){var o=n[i];o&&typeof o=="object"&&e.add(o)})});var r=t.loc;return r&&(delete r.startToken,delete r.endToken),t}function Cl(t){var e=Do(t);if(!lr.has(e)){var r=No(t,{experimentalFragmentVariables:pr,allowLegacyFragmentVariables:pr});if(!r||r.kind!=="Document")throw new Error("Not a valid GraphQL document.");lr.set(e,Nl(Rl(r)))}return lr.get(e)}function Y(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];typeof t=="string"&&(t=[t]);var n=t[0];return e.forEach(function(i,o){i&&i.kind==="Document"?n+=i.loc.source.body:n+=i,n+=t[o+1]}),Cl(n)}function xl(){lr.clear(),vn.clear()}function Pl(){ko=!1}function Il(){pr=!0}function Ml(){pr=!1}var Oe={gql:Y,resetCaches:xl,disableFragmentWarnings:Pl,enableExperimentalFragmentVariables:Il,disableExperimentalFragmentVariables:Ml};(function(t){t.gql=Oe.gql,t.resetCaches=Oe.resetCaches,t.disableFragmentWarnings=Oe.disableFragmentWarnings,t.enableExperimentalFragmentVariables=Oe.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=Oe.disableExperimentalFragmentVariables})(Y||(Y={})),Y.default=Y;const Uo=Y`
52
+ fragment MatchParts on MatchConfig {
53
+ regexValue
54
+ matchValue
55
+ }
56
+ `,kl=Y`
57
+ mutation PushPayload(
58
+ $session_secure_id: String!
59
+ $payload_id: ID!
60
+ $events: ReplayEventsInput!
61
+ $messages: String!
62
+ $resources: String!
63
+ $web_socket_events: String!
64
+ $errors: [ErrorObjectInput]!
65
+ $is_beacon: Boolean
66
+ $has_session_unloaded: Boolean
67
+ $highlight_logs: String
68
+ ) {
69
+ pushPayload(
70
+ session_secure_id: $session_secure_id
71
+ payload_id: $payload_id
72
+ events: $events
73
+ messages: $messages
74
+ resources: $resources
75
+ web_socket_events: $web_socket_events
76
+ errors: $errors
77
+ is_beacon: $is_beacon
78
+ has_session_unloaded: $has_session_unloaded
79
+ highlight_logs: $highlight_logs
80
+ )
81
+ }
82
+ `,Dl=Y`
83
+ mutation PushSessionEvents(
84
+ $session_secure_id: String!
85
+ $payload_id: Int64ID!
86
+ $data: String!
87
+ ) {
88
+ pushSessionEvents(
89
+ session_secure_id: $session_secure_id
90
+ payload_id: $payload_id
91
+ data: $data
92
+ )
93
+ }
94
+ `,Ul=Y`
95
+ mutation identifySession(
96
+ $session_secure_id: String!
97
+ $user_identifier: String!
98
+ $user_object: Any
99
+ ) {
100
+ identifySession(
101
+ session_secure_id: $session_secure_id
102
+ user_identifier: $user_identifier
103
+ user_object: $user_object
104
+ )
105
+ }
106
+ `,jl=Y`
107
+ mutation addSessionProperties(
108
+ $session_secure_id: String!
109
+ $properties_object: Any
110
+ ) {
111
+ addSessionProperties(
112
+ session_secure_id: $session_secure_id
113
+ properties_object: $properties_object
114
+ )
115
+ }
116
+ `,Bl=Y`
117
+ mutation pushMetrics($metrics: [MetricInput]!) {
118
+ pushMetrics(metrics: $metrics)
119
+ }
120
+ `,$l=Y`
121
+ mutation addSessionFeedback(
122
+ $session_secure_id: String!
123
+ $user_name: String
124
+ $user_email: String
125
+ $verbatim: String!
126
+ $timestamp: Timestamp!
127
+ ) {
128
+ addSessionFeedback(
129
+ session_secure_id: $session_secure_id
130
+ user_name: $user_name
131
+ user_email: $user_email
132
+ verbatim: $verbatim
133
+ timestamp: $timestamp
134
+ )
135
+ }
136
+ `,Fl=Y`
137
+ mutation initializeSession(
138
+ $session_secure_id: String!
139
+ $session_key: String
140
+ $organization_verbose_id: String!
141
+ $enable_strict_privacy: Boolean!
142
+ $privacy_setting: String!
143
+ $enable_recording_network_contents: Boolean!
144
+ $clientVersion: String!
145
+ $firstloadVersion: String!
146
+ $clientConfig: String!
147
+ $environment: String!
148
+ $id: String!
149
+ $appVersion: String
150
+ $serviceName: String!
151
+ $client_id: String!
152
+ $network_recording_domains: [String!]
153
+ $disable_session_recording: Boolean
154
+ ) {
155
+ initializeSession(
156
+ session_secure_id: $session_secure_id
157
+ session_key: $session_key
158
+ organization_verbose_id: $organization_verbose_id
159
+ enable_strict_privacy: $enable_strict_privacy
160
+ enable_recording_network_contents: $enable_recording_network_contents
161
+ clientVersion: $clientVersion
162
+ firstloadVersion: $firstloadVersion
163
+ clientConfig: $clientConfig
164
+ environment: $environment
165
+ appVersion: $appVersion
166
+ serviceName: $serviceName
167
+ fingerprint: $id
168
+ client_id: $client_id
169
+ network_recording_domains: $network_recording_domains
170
+ disable_session_recording: $disable_session_recording
171
+ privacy_setting: $privacy_setting
172
+ ) {
173
+ secure_id
174
+ project_id
175
+ sampling {
176
+ spans {
177
+ name {
178
+ ...MatchParts
179
+ }
180
+ attributes {
181
+ key {
182
+ ...MatchParts
183
+ }
184
+ attribute {
185
+ ...MatchParts
186
+ }
187
+ }
188
+ events {
189
+ name {
190
+ ...MatchParts
191
+ }
192
+ attributes {
193
+ key {
194
+ ...MatchParts
195
+ }
196
+ attribute {
197
+ ...MatchParts
198
+ }
199
+ }
200
+ }
201
+ samplingRatio
202
+ }
203
+ logs {
204
+ message {
205
+ ...MatchParts
206
+ }
207
+ severityText {
208
+ ...MatchParts
209
+ }
210
+ attributes {
211
+ key {
212
+ ...MatchParts
213
+ }
214
+ attribute {
215
+ ...MatchParts
216
+ }
217
+ }
218
+ samplingRatio
219
+ }
220
+ }
221
+ }
222
+ }
223
+ ${Uo}
224
+ `,Vl=Y`
225
+ query Ignore($id: ID!) {
226
+ ignore(id: $id)
227
+ }
228
+ `,Gl=Y`
229
+ query GetSamplingConfig($organization_verbose_id: String!) {
230
+ sampling(organization_verbose_id: $organization_verbose_id) {
231
+ spans {
232
+ name {
233
+ ...MatchParts
234
+ }
235
+ attributes {
236
+ key {
237
+ ...MatchParts
238
+ }
239
+ attribute {
240
+ ...MatchParts
241
+ }
242
+ }
243
+ events {
244
+ name {
245
+ ...MatchParts
246
+ }
247
+ attributes {
248
+ key {
249
+ ...MatchParts
250
+ }
251
+ attribute {
252
+ ...MatchParts
253
+ }
254
+ }
255
+ }
256
+ samplingRatio
257
+ }
258
+ logs {
259
+ message {
260
+ ...MatchParts
261
+ }
262
+ severityText {
263
+ ...MatchParts
264
+ }
265
+ attributes {
266
+ key {
267
+ ...MatchParts
268
+ }
269
+ attribute {
270
+ ...MatchParts
271
+ }
272
+ }
273
+ samplingRatio
274
+ }
275
+ }
276
+ }
277
+ ${Uo}
278
+ `,Hl=(t,e,r,n)=>t();function zl(t,e=Hl){return{PushPayload(r,n){return e(i=>t.request(kl,r,C(C({},n),i)),"PushPayload","mutation",r)},PushSessionEvents(r,n){return e(i=>t.request(Dl,r,C(C({},n),i)),"PushSessionEvents","mutation",r)},identifySession(r,n){return e(i=>t.request(Ul,r,C(C({},n),i)),"identifySession","mutation",r)},addSessionProperties(r,n){return e(i=>t.request(jl,r,C(C({},n),i)),"addSessionProperties","mutation",r)},pushMetrics(r,n){return e(i=>t.request(Bl,r,C(C({},n),i)),"pushMetrics","mutation",r)},addSessionFeedback(r,n){return e(i=>t.request($l,r,C(C({},n),i)),"addSessionFeedback","mutation",r)},initializeSession(r,n){return e(i=>t.request(Fl,r,C(C({},n),i)),"initializeSession","mutation",r)},Ignore(r,n){return e(i=>t.request(Vl,r,C(C({},n),i)),"Ignore","query",r)},GetSamplingConfig(r,n){return e(i=>t.request(Gl,r,C(C({},n),i)),"GetSamplingConfig","query",r)}}}function Xl(t,e,r){try{if(!(e in t))return()=>{};const n=t[e],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=i,()=>{t[e]=n}}catch{return()=>{}}}function ql(t){if(!t||!t.outerHTML)return"";let e="";for(;t.parentElement;){let r=t.localName;if(!r)break;r=r.toLowerCase();let n=t.parentElement,i=[];if(n.children&&n.children.length>0)for(let o=0;o<n.children.length;o++){let a=n.children[o];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===r&&i.push(a)}i.length>1&&(r+=":eq("+i.indexOf(t)+")"),e=r+(e?">"+e:""),t=n}return e}function yn(t){return Object.prototype.toString.call(t)==="[object Object]"}function jo(t,e){if(e===0)return!0;const r=Object.keys(t);for(const n of r)if(yn(t[n])&&jo(t[n],e-1))return!0;return!1}function mn(t,e){const r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,e);const n=[],i=[];return JSON.stringify(t,function(u,c){if(n.length>0){const s=n.indexOf(this);~s?n.splice(s+1):n.push(this),~s?i.splice(s,1/0,u):i.push(u),~n.indexOf(c)&&(n[0]===c?c="[Circular ~]":c="[Circular ~."+i.slice(0,n.indexOf(c)).join(".")+"]")}else n.push(c);if(c==null)return c;if(o(c))return a(c);if(c instanceof Event){const s={};for(const l in c){const p=c[l];Array.isArray(p)?s[l]=ql(p.length?p[0]:null):s[l]=p}return s}else{if(c instanceof Node)return c instanceof HTMLElement?c?c.outerHTML:"":c.nodeName;if(c instanceof Error)return c.name+": "+c.message}return c});function o(u){return yn(u)&&Object.keys(u).length>r.numOfKeysLimit||typeof u=="function"?!0:u instanceof Event&&u.isTrusted===!1?Object.keys(u).length===1:!!(yn(u)&&jo(u,r.depthOfLimit))}function a(u){let c=u.toString();return r.stringLengthLimit&&c.length>r.stringLengthLimit&&(c=`${c.slice(0,r.stringLengthLimit)}...`),c}}function Kl(t){return typeof t=="number"&&!isNaN(t)&&isFinite(t)}const _n="exception.message",Wl="exception.stacktrace",gn="exception.type",Yl="http.response.status_code",Jl="server.address",Ql="service.name",Zl="service.version",tp="telemetry.sdk.name",ep="telemetry.sdk.version",fr="url.full",Bo="url.path",rp="url.query",np="user_agent.original",En=15*60*1e3;/*! js-cookie v3.0.5 | MIT */function hr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}var ip={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Tn(t,e){function r(i,o,a){if(typeof document<"u"){a=hr({},e,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var c in a)a[c]&&(u+="; "+c,a[c]!==!0&&(u+="="+a[c].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+u}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],a={},u=0;u<o.length;u++){var c=o[u].split("="),s=c.slice(1).join("=");try{var l=decodeURIComponent(c[0]);if(a[l]=t.read(s,l),i===l)break}catch{}}return i?a[i]:a}}return Object.create({set:r,get:n,remove:function(i,o){r(i,"",hr({},o,{expires:-1}))},withAttributes:function(i){return Tn(this.converter,hr({},this.attributes,i))},withConverter:function(i){return Tn(hr({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var bn=Tn(ip,{path:"/"});let On="localStorage",Sn=!0,op=class{constructor(){ge(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(e){var r;return(r=Object.keys(this.storage)[e])!=null?r:null}getItem(e){var r;return(r=this.storage[e])!=null?r:""}setItem(e,r){this.storage[e]=r}removeItem(e){delete this.storage[e]}},ap=class{getItem(e){var r;return(r=bn.get(e))!=null?r:""}setItem(e,r){if(!Sn)return;const n=new Date;n.setTime(n.getTime()+En),bn.set(e,r,{expires:n})}removeItem(e){Sn&&bn.remove(e)}};const te=new op,dr=new ap,Se=()=>{let t=null;if(typeof window>"u")return te;try{switch(On){case"localStorage":t=window.localStorage;break;case"sessionStorage":t=window.sessionStorage;break}t||(bt("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${On}; using global storage`),t=te)}catch(e){bt("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",e),t=te}return t},sp=t=>{On=t},$o=t=>{Sn=t},wn=t=>{try{return Se().getItem(t)}catch(e){return bt("storage","getItem","debug",`failed to get item ${t}; using global storage`,e),te.getItem(t)}},Fo=(t,e)=>{dr.setItem(t,e);try{return Se().setItem(t,e)}catch(r){return bt("storage","setItem","debug",`failed to set item ${t}; using global storage`,r),te.setItem(t,e)}},Vo=t=>{dr.removeItem(t);try{return Se().removeItem(t)}catch(e){return bt("storage","removeItem","debug",`failed to remove item ${t}; using global storage`,e),te.removeItem(t)}};var ee=(t=>(t.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",t.SESSION_ID="sessionID",t.SESSION_DATA="sessionData",t.USER_IDENTIFIER="highlightIdentifier",t.USER_OBJECT="highlightUserObject",t))(ee||{});const vr=t=>`${ee.SESSION_DATA}_${t}`,Ot=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:Go()},up=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},Go=()=>{var t;return(t=wn(ee.SESSION_ID))!=null?t:""},Ho=t=>{Fo(ee.SESSION_ID,t)},cp=t=>{const e=vr(t);return JSON.parse(wn(e)||"{}")},lp=t=>{t||(t=Go());let e=cp(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<En)return e;Vo(vr(t))},zo=function(t){if(!(t!=null&&t.sessionSecureID))return;const e=t.sessionSecureID;up(e);const r=vr(e);Fo(r,JSON.stringify(t)),fp(r)},pp=function(){const t=dr.getItem(ee.SESSION_ID);Ho(t);const e=vr(t),r=dr.getItem(e);try{zo(JSON.parse(r))}catch{}};function fp(t){const e=`${ee.SESSION_DATA}_`;for(let r=Se().length-1;r>=0;r--){const n=Se().key(r);if(n&&n.startsWith(e)&&n!==t)try{const i=JSON.parse(wn(n)||"{}");i.lastPushTime!==void 0&&Date.now()-i.lastPushTime>=En&&(bt("highlightSession","pruneSessionData","debug",`removing session data for stale key ${n}`),Vo(n))}catch(i){bt("highlightSession","pruneSessionData","error",`failed to parse session data for key ${n}`,i)}}}var Xo=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(Xo||{});const An=3,Ln=1e3,Rn=500,hp=[Xo.BillingQuotaExceeded.toString()],dp=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(r=>hp.includes(r.message)))===void 0},vp=()=>{const t=(e,r,n,i,o=0)=>Yt(void 0,null,function*(){try{return yield e()}catch(a){if(a instanceof Io&&!dp(a))throw a;if(o<An)return yield new Promise(u=>setTimeout(u,Ln+Rn*Math.pow(2,o))),yield t(e,r,n,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),a}});return t},J="feature_flag",qo="launchdarkly",yp="evaluation",mp=`${J}.set.id`,_p=`${J}.key`,gp=`${J}.contextKeys`,Ep=`${J}.context.id`,Tp=`${J}.result.value`,bp=`${J}.provider.name`,Ko={kind:`${J}.result.reason.kind`,errorKind:`${J}.result.reason.errorKind`,ruleIndex:`${J}.result.reason.ruleIndex`,ruleId:`${J}.result.reason.ruleId`,prerequisiteKey:`${J}.result.reason.prerequisiteKey`,inExperiment:`${J}.result.reason.inExperiment`,bigSegmentsStatus:`${J}.result.reason.bigSegmentsStatus`},Op=`${J}.result.variationIndex`,Sp=`${qo}.application.id`,wp=`${qo}.application.version`,Ap="$ld:telemetry:session:init",Wo="$ld:telemetry:track",Lp="document_load",Rp="result.status";function Yo(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function Jo(t){return t.kind==="multi"}function Nn(t){return Jo(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${Yo(t[e].key)}`).join(":"):"kind"in t&&t.kind==="user"?t.key:"kind"in t?`${t.kind}:${Yo(t.key)}`:t.key}function Qo(t){return Jo(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:t[e].key})).reduce((e,r)=>C(C({},e),r),{}):"kind"in t?{[t.kind]:t.key}:{user:t.key}}class Np{constructor(e,r){ge(this,"client"),ge(this,"metadata"),this.client=e,this.metadata=r}getHooks(e){return[]}init(e){this.client.track(Ap,{sessionID:e})}recordGauge(e,r){}identify(e,r,n={},i){}error(e,r){}track(e,r){const n=r.event;this.client.track(n?`${Wo}:${n}`:Wo,tr(C({},r),{sessionID:e}))}}let Cp=class extends fo{constructor(e,r){super(),ge(this,"client"),this.client=new Np(e,r)}getHooks(e){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(r,n,i)=>(this.load(this.client),n)}]}init(e){return this._bufferCall("init",[e])}recordGauge(e,r){return this._bufferCall("recordGauge",[e,r])}identify(e,r,n={},i){return this._bufferCall("identify",[e,r,n,i])}error(e,r){return this._bufferCall("error",[e,r])}track(e,r){return this._bufferCall("track",[e,r])}};const xp="9.25.0",Pp={version:xp},Ip=Pp.version;function Mp(t){if(t.id.length)return`#${t.id}`;if(t.classList.length){let e=[];for(const r of t.classList)e.push(`.${r}`);return`${t.nodeName.toLowerCase()}${e.join(",")}`}return t.nodeName.toLowerCase()}const kp=t=>{let e;const r=()=>{clearTimeout(e),e=setTimeout(()=>{var n,i;t({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(n=window.screen.orientation)==null?void 0:n.angle)!=null?i:0})},500)};return window.addEventListener("resize",r),r(),()=>window.removeEventListener("resize",r)};var Zo={exports:{}};/**
279
+ * @preserve
280
+ * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
281
+ *
282
+ * @author <a href="mailto:jensyt@gmail.com">Jens Taylor</a>
283
+ * @see http://github.com/homebrewing/brauhaus-diff
284
+ * @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
285
+ * @see http://github.com/garycourt/murmurhash-js
286
+ * @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
287
+ * @see http://sites.google.com/site/murmurhash/
288
+ */(function(t){(function(){var e;function r(n,i){var o=this instanceof r?this:e;if(o.reset(i),typeof n=="string"&&n.length>0&&o.hash(n),o!==this)return o}r.prototype.hash=function(n){var i,o,a,u,c;switch(c=n.length,this.len+=c,o=this.k1,a=0,this.rem){case 0:o^=c>a?n.charCodeAt(a++)&65535:0;case 1:o^=c>a?(n.charCodeAt(a++)&65535)<<8:0;case 2:o^=c>a?(n.charCodeAt(a++)&65535)<<16:0;case 3:o^=c>a?(n.charCodeAt(a)&255)<<24:0,o^=c>a?(n.charCodeAt(a++)&65280)>>8:0}if(this.rem=c+this.rem&3,c-=this.rem,c>0){for(i=this.h1;o=o*11601+(o&65535)*3432906752&4294967295,o=o<<15|o>>>17,o=o*13715+(o&65535)*461832192&4294967295,i^=o,i=i<<13|i>>>19,i=i*5+3864292196&4294967295,!(a>=c);)o=n.charCodeAt(a++)&65535^(n.charCodeAt(a++)&65535)<<8^(n.charCodeAt(a++)&65535)<<16,u=n.charCodeAt(a++),o^=(u&255)<<24^(u&65280)>>8;switch(o=0,this.rem){case 3:o^=(n.charCodeAt(a+2)&65535)<<16;case 2:o^=(n.charCodeAt(a+1)&65535)<<8;case 1:o^=n.charCodeAt(a)&65535}this.h1=i}return this.k1=o,this},r.prototype.result=function(){var n,i;return n=this.k1,i=this.h1,n>0&&(n=n*11601+(n&65535)*3432906752&4294967295,n=n<<15|n>>>17,n=n*13715+(n&65535)*461832192&4294967295,i^=n),i^=this.len,i^=i>>>16,i=i*51819+(i&65535)*2246770688&4294967295,i^=i>>>13,i=i*44597+(i&65535)*3266445312&4294967295,i^=i>>>16,i>>>0},r.prototype.reset=function(n){return this.h1=typeof n=="number"?n:0,this.rem=this.k1=this.len=0,this},e=new r,t.exports=r})()})(Zo);var Dp=Zo.exports;const Up=ar(Dp),Cn=28,re="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",jp=2246822507,ta=t=>{var e,r="";if(t){const n=Up(t).result();for(let i=0;i<Cn;i++){const o=((n^i*jp)>>>0)%re.length;r+=re.charAt(o)}}else{const n=typeof window<"u"&&((e=window.crypto)==null?void 0:e.getRandomValues),i=new Uint32Array(Cn);n&&window.crypto.getRandomValues(i);for(let o=0;o<Cn;o++)n?r+=re.charAt(i[o]%re.length):r+=re.charAt(Math.floor(Math.random()*re.length))}return r};let Bp=class{constructor(e){ge(this,"sessionSecureID");try{e!=null&&e.storageMode&&sp(e?.storageMode),$o(!!(e!=null&&e.sessionCookie)),e!=null&&e.sessionCookie?pp():$o(!1)}catch(r){Tt("Error initializing @launchdarkly observability plugin","error",r)}}configureSession(e,r){try{const n=Ot();let i=lp(n);i!=null&&i.sessionSecureID?this.sessionSecureID=i.sessionSecureID:(r!=null&&r.sessionKey?this.sessionSecureID=ta(`${e}-${r.sessionKey}`):this.sessionSecureID=ta(),Ho(this.sessionSecureID),zo({sessionSecureID:this.sessionSecureID,sessionKey:r?.sessionKey,projectID:0,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(n){Tt("Error configuring session in @launchdarkly observability plugin","error",n)}}};class ea extends fo{start(){return this._sdk.start()}stop(){return this._sdk.stop()}recordGauge(e){return this._bufferCall("recordGauge",[e])}recordCount(e){return this._bufferCall("recordCount",[e])}recordIncr(e){return this._bufferCall("recordIncr",[e])}recordHistogram(e){return this._bufferCall("recordHistogram",[e])}recordUpDownCounter(e){return this._bufferCall("recordUpDownCounter",[e])}startSpan(e,r,n,i){return this._bufferCall("startSpan",[e,r,n,i])}startManualSpan(e,r,n,i){return this._bufferCall("startManualSpan",[e,r,n,i])}register(e,r){return this._bufferCall("register",[e,r])}recordLog(e,r,n){return this._bufferCall("recordLog",[e,r,n])}recordError(e,r,n,i,o){return this._bufferCall("recordError",[e,r,n,i,o])}}nt.LDObserve=void 0,typeof globalThis<"u"?globalThis.LDObserve?nt.LDObserve=globalThis.LDObserve:(nt.LDObserve=new ea,globalThis.LDObserve=nt.LDObserve):nt.LDObserve=new ea;const $p=Object.freeze(Object.defineProperty({__proto__:null,get LDObserve(){return nt.LDObserve}},Symbol.toStringTag,{value:"Module"}));var Fp=Object.defineProperty,Vp=Object.defineProperties,Gp=Object.getOwnPropertyDescriptors,yr=Object.getOwnPropertySymbols,ra=Object.prototype.hasOwnProperty,na=Object.prototype.propertyIsEnumerable,xn=(t,e,r)=>e in t?Fp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,P=(t,e)=>{for(var r in e||(e={}))ra.call(e,r)&&xn(t,r,e[r]);if(yr)for(var r of yr(e))na.call(e,r)&&xn(t,r,e[r]);return t},rt=(t,e)=>Vp(t,Gp(e)),Hp=(t,e)=>{var r={};for(var n in t)ra.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&yr)for(var n of yr(t))e.indexOf(n)<0&&na.call(t,n)&&(r[n]=t[n]);return r},k=(t,e,r)=>xn(t,typeof e!="symbol"?e+"":e,r),yt=(t,e,r)=>new Promise((n,i)=>{var o=c=>{try{u(r.next(c))}catch(s){i(s)}},a=c=>{try{u(r.throw(c))}catch(s){i(s)}},u=c=>c.done?n(c.value):Promise.resolve(c.value).then(o,a);u((r=r.apply(t,e)).next())});const zp=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"];var Pt=(t=>(t.DeviceMemory="DeviceMemory",t.ViewportHeight="ViewportHeight",t.ViewportWidth="ViewportWidth",t.ScreenHeight="ScreenHeight",t.ScreenWidth="ScreenWidth",t.ViewportArea="ViewportArea",t))(Pt||{}),ut=(t=>(t.Device="Device",t.WebVital="WebVital",t.Performance="Performance",t.Frontend="Frontend",t.Backend="Backend",t))(ut||{}),ia={exports:{}},oa={exports:{}},aa;function Xp(){return aa||(aa=1,function(t,e){(function(r,n){t.exports=n()})(ln,function(){function r(m){return!isNaN(parseFloat(m))&&isFinite(m)}function n(m){return m.charAt(0).toUpperCase()+m.substring(1)}function i(m){return function(){return this[m]}}var o=["isConstructor","isEval","isNative","isToplevel"],a=["columnNumber","lineNumber"],u=["fileName","functionName","source"],c=["args"],s=["evalOrigin"],l=o.concat(a,u,c,s);function p(m){if(m)for(var _=0;_<l.length;_++)m[l[_]]!==void 0&&this["set"+n(l[_])](m[l[_]])}p.prototype={getArgs:function(){return this.args},setArgs:function(m){if(Object.prototype.toString.call(m)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=m},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(m){if(m instanceof p)this.evalOrigin=m;else if(m instanceof Object)this.evalOrigin=new p(m);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var m=this.getFileName()||"",_=this.getLineNumber()||"",E=this.getColumnNumber()||"",R=this.getFunctionName()||"";return this.getIsEval()?m?"[eval] ("+m+":"+_+":"+E+")":"[eval]:"+_+":"+E:R?R+" ("+m+":"+_+":"+E+")":m+":"+_+":"+E}},p.fromString=function(m){var _=m.indexOf("("),E=m.lastIndexOf(")"),R=m.substring(0,_),U=m.substring(_+1,E).split(","),D=m.substring(E+1);if(D.indexOf("@")===0)var G=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(D,""),j=G[1],H=G[2],B=G[3];return new p({functionName:R,args:U||void 0,fileName:j,lineNumber:H||void 0,columnNumber:B||void 0})};for(var f=0;f<o.length;f++)p.prototype["get"+n(o[f])]=i(o[f]),p.prototype["set"+n(o[f])]=function(m){return function(_){this[m]=!!_}}(o[f]);for(var y=0;y<a.length;y++)p.prototype["get"+n(a[y])]=i(a[y]),p.prototype["set"+n(a[y])]=function(m){return function(_){if(!r(_))throw new TypeError(m+" must be a Number");this[m]=Number(_)}}(a[y]);for(var v=0;v<u.length;v++)p.prototype["get"+n(u[v])]=i(u[v]),p.prototype["set"+n(u[v])]=function(m){return function(_){this[m]=String(_)}}(u[v]);return p})}(oa)),oa.exports}(function(t,e){(function(r,n){t.exports=n(Xp())})(ln,function(r){var n=/(^|@)\S+:\d+/,i=/^\s*at .*(\S+:\d+|\(native\))/m,o=/^(eval@)?(\[native code])?$/;return{parse:function(a){if(typeof a.stacktrace<"u"||typeof a["opera#sourceloc"]<"u")return this.parseOpera(a);if(a.stack&&a.stack.match(i))return this.parseV8OrIE(a);if(a.stack)return this.parseFFOrSafari(a);throw new Error("Cannot parse given Error object")},extractLocation:function(a){if(a.indexOf(":")===-1)return[a];var u=/(.+?)(?::(\d+))?(?::(\d+))?$/,c=u.exec(a.replace(/[()]/g,""));return[c[1],c[2]||void 0,c[3]||void 0]},parseV8OrIE:function(a){var u=a.stack.split(`
289
+ `).filter(function(c){return!!c.match(i)},this);return u.map(function(c){c.indexOf("(eval ")>-1&&(c=c.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var s=c.replace(/^\s+/,"").replace(/\(eval code/g,"("),l=s.match(/ (\((.+):(\d+):(\d+)\)$)/);s=l?s.replace(l[0],""):s;var p=s.split(/\s+/).slice(1),f=this.extractLocation(l?l[1]:p.pop()),y=p.join(" ")||void 0,v=["eval","<anonymous>"].indexOf(f[0])>-1?void 0:f[0];return new r({functionName:y,fileName:v,lineNumber:f[1],columnNumber:f[2],source:c})},this)},parseFFOrSafari:function(a){var u=a.stack.split(`
290
+ `).filter(function(c){return!c.match(o)},this);return u.map(function(c){if(c.indexOf(" > eval")>-1&&(c=c.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),c.indexOf("@")===-1&&c.indexOf(":")===-1)return new r({functionName:c});var s=/((.*".+"[^@]*)?[^@]*)(?:@)/,l=c.match(s),p=l&&l[1]?l[1]:void 0,f=this.extractLocation(c.replace(s,""));return new r({functionName:p,fileName:f[0],lineNumber:f[1],columnNumber:f[2],source:c})},this)},parseOpera:function(a){return!a.stacktrace||a.message.indexOf(`
291
+ `)>-1&&a.message.split(`
292
+ `).length>a.stacktrace.split(`
293
+ `).length?this.parseOpera9(a):a.stack?this.parseOpera11(a):this.parseOpera10(a)},parseOpera9:function(a){for(var u=/Line (\d+).*script (?:in )?(\S+)/i,c=a.message.split(`
294
+ `),s=[],l=2,p=c.length;l<p;l+=2){var f=u.exec(c[l]);f&&s.push(new r({fileName:f[2],lineNumber:f[1],source:c[l]}))}return s},parseOpera10:function(a){for(var u=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,c=a.stacktrace.split(`
295
+ `),s=[],l=0,p=c.length;l<p;l+=2){var f=u.exec(c[l]);f&&s.push(new r({functionName:f[3]||void 0,fileName:f[2],lineNumber:f[1],source:c[l]}))}return s},parseOpera11:function(a){var u=a.stack.split(`
296
+ `).filter(function(c){return!!c.match(n)&&!c.match(/^Error created at/)},this);return u.map(function(c){var s=c.split("@"),l=this.extractLocation(s.pop()),p=s.shift()||"",f=p.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,y;p.match(/\(([^)]*)\)/)&&(y=p.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var v=y===void 0||y==="[arguments not available]"?void 0:y.split(",");return new r({functionName:f,args:v,fileName:l[0],lineNumber:l[1],columnNumber:l[2],source:c})},this)}}})})(ia);var qp=ia.exports;const sa=ar(qp);function mr(t){try{return sa.parse(t)}catch(e){try{return sa.parse(new Error)}catch(r){return console.warn("Highlight Warning: failed to parse error",{originalError:e,secondaryError:r}),[]}}}function Kp(t,e){const r=e.logger;let n;n=window[r];const i=[];if(e.level.includes("error")&&window){const a=u=>{const{message:c,error:s}=u;let l=[];s&&(l=mr(s));const p=[mn(c,e.stringifyOptions)];t({type:"Error",trace:l,time:Date.now(),value:p})};window.addEventListener("error",a),i.push(()=>{window&&window.removeEventListener("error",a)})}for(const a of e.level)i.push(o(n,a));return()=>{i.forEach(a=>a())};function o(a,u){return a[u]?Xl(a,u,c=>(...s)=>{c.apply(this,s);try{t(Wp(u,e,...s))}catch(l){c("highlight logger error:",l,...s)}}):()=>{}}}function Wp(t,e,...r){const n=mr(new Error),i=e.serializeConsoleAttributes?r.map(o=>typeof o=="object"?mn(o,e.stringifyOptions):o):r.filter(o=>typeof o!="object").map(o=>`${o}`);return{type:t,trace:n,value:i,attributes:mn(r.filter(o=>typeof o=="object").reduce((o,a)=>P(P({},o),a),{}),e.stringifyOptions),time:Date.now()}}const Yp={start:0,end:3},Jp={start:4,end:5},Pn={start:6,end:7},In={start:8,end:8},Qp={start:9,end:9},Zp={start:10,end:15};function tf(){if(crypto&&crypto.getRandomValues){const e=new Uint8Array(16);return crypto.getRandomValues(e),[...e.values()]}const t=[];for(let e=0;e<16;e+=1)t.push(Math.floor(Math.random()*256));return t}function ne(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 ef(t){return t[In.start]=(t[In.start]|128)&191,t[Pn.start]=t[Pn.start]&15|64,`${ne(t,Yp)}-${ne(t,Jp)}-${ne(t,Pn)}-${ne(t,In)}${ne(t,Qp)}-${ne(t,Zp)}`}function rf(){const t=tf();return ef(t)}function ua(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():rf()}function Mn(t,e,r,n){var i,o,a,u;let c=n??e,s=mr(c),l={};e instanceof Error&&(e=e.message,e.cause&&(l={"exception.cause":e.cause}));const p=of(s);t({error:c,event:be(e),type:"window.onerror",url:window.location.href,source:r??"",lineNumber:(i=p[0])!=null&&i.lineNumber?(o=p[0])==null?void 0:o.lineNumber:0,columnNumber:(a=p[0])!=null&&a.columnNumber?(u=p[0])==null?void 0:u.columnNumber:0,stackTrace:p,timestamp:new Date().toISOString(),payload:l?be(l):void 0,id:ua()})}const nf=(t,{enablePromisePatch:e})=>{if(typeof window>"u")return()=>{};const r=window.onerror=(a,u,c,s,l)=>{Mn(t,a,u,l)},n=window.onunhandledrejection=a=>{if(a.reason){const u=a.promise;u.getStack?Mn(t,a.reason,a.type,u.getStack()):Mn(t,a.reason,a.type)}},i=window.Promise,o=class extends i{constructor(a){super(a),k(this,"promiseCreationError"),this.promiseCreationError=new Error}getStack(){return this.promiseCreationError}static shouldPatch(){const a=typeof window.Zone>"u";return e&&a}};return o.shouldPatch()&&(window.Promise=o),()=>{window.Promise=i,window.onunhandledrejection=n,window.onerror=r}},of=t=>{var e,r;if(t.length===0)return t;const n=t[0];return(e=n.fileName)!=null&&e.includes("highlight.run")||(r=n.fileName)!=null&&r.includes("highlight.io")||n.functionName==="new highlightPromise"?t.slice(1):t},af=['["\\"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}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],sf=["websocket error",'\\"ResizeObserver loop'];var uf=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},It="1.9.0",ca=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function cf(t){var e=new Set([t]),r=new Set,n=t.match(ca);if(!n)return function(){return!1};var i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null)return function(u){return u===t};function o(u){return r.add(u),!1}function a(u){return e.add(u),!0}return function(u){if(e.has(u))return!0;if(r.has(u))return!1;var c=u.match(ca);if(!c)return o(u);var s={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return s.prerelease!=null||i.major!==s.major?o(u):i.major===0?i.minor===s.minor&&i.patch<=s.patch?a(u):o(u):i.minor<=s.minor?a(u):o(u)}}var lf=cf(It),pf=It.split(".")[0],we=Symbol.for("opentelemetry.js.api."+pf),Ae=uf;function Le(t,e,r,n){var i;n===void 0&&(n=!1);var o=Ae[we]=(i=Ae[we])!==null&&i!==void 0?i:{version:It};if(!n&&o[t]){var a=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return r.error(a.stack||a.message),!1}if(o.version!==It){var a=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+t+" does not match previously registered API v"+It);return r.error(a.stack||a.message),!1}return o[t]=e,r.debug("@opentelemetry/api: Registered a global for "+t+" v"+It+"."),!0}function Mt(t){var e,r,n=(e=Ae[we])===null||e===void 0?void 0:e.version;if(!(!n||!lf(n)))return(r=Ae[we])===null||r===void 0?void 0:r[t]}function Re(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+It+".");var r=Ae[we];r&&delete r[t]}var ff=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},hf=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},df=function(){function t(e){this._namespace=e.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Ne("debug",this._namespace,e)},t.prototype.error=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Ne("error",this._namespace,e)},t.prototype.info=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Ne("info",this._namespace,e)},t.prototype.warn=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Ne("warn",this._namespace,e)},t.prototype.verbose=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Ne("verbose",this._namespace,e)},t}();function Ne(t,e,r){var n=Mt("diag");if(n)return r.unshift(e),n[t].apply(n,hf([],ff(r),!1))}var I;(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"})(I||(I={}));function vf(t,e){t<I.NONE?t=I.NONE:t>I.ALL&&(t=I.ALL),e=e||{};function r(n,i){var o=e[n];return typeof o=="function"&&t>=i?o.bind(e):function(){}}return{error:r("error",I.ERROR),warn:r("warn",I.WARN),info:r("info",I.INFO),debug:r("debug",I.DEBUG),verbose:r("verbose",I.VERBOSE)}}var yf=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},mf=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},_f="diag",lt=function(){function t(){function e(i){return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=Mt("diag");if(u)return u[i].apply(u,mf([],yf(o),!1))}}var r=this,n=function(i,o){var a,u,c;if(o===void 0&&(o={logLevel:I.INFO}),i===r){var s=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return r.error((a=s.stack)!==null&&a!==void 0?a:s.message),!1}typeof o=="number"&&(o={logLevel:o});var l=Mt("diag"),p=vf((u=o.logLevel)!==null&&u!==void 0?u:I.INFO,i);if(l&&!o.suppressOverrideMessage){var f=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";l.warn("Current logger will be overwritten from "+f),p.warn("Current logger will overwrite one already registered from "+f)}return Le("diag",p,r,!0)};r.setLogger=n,r.disable=function(){Re(_f,r)},r.createComponentLogger=function(i){return new df(i)},r.verbose=e("verbose"),r.debug=e("debug"),r.info=e("info"),r.warn=e("warn"),r.error=e("error")}return t.instance=function(){return this._instance||(this._instance=new t),this._instance},t}(),gf=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Ef=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Tf=function(){function t(e){this._entries=e?new Map(e):new Map}return t.prototype.getEntry=function(e){var r=this._entries.get(e);if(r)return Object.assign({},r)},t.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var r=gf(e,2),n=r[0],i=r[1];return[n,i]})},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=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=new t(this._entries);try{for(var a=Ef(n),u=a.next();!u.done;u=a.next()){var c=u.value;o._entries.delete(c)}}catch(s){e={error:s}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return o},t.prototype.clear=function(){return new t},t}(),bf=Symbol("BaggageEntryMetadata"),Of=lt.instance();function Sf(t){return t===void 0&&(t={}),new Tf(new Map(Object.entries(t)))}function la(t){return typeof t!="string"&&(Of.error("Cannot create baggage metadata from unknown type: "+typeof t),t=""),{__TYPE__:bf,toString:function(){return t}}}function Ce(t){return Symbol.for(t)}var wf=function(){function t(e){var r=this;r._currentContext=e?new Map(e):new Map,r.getValue=function(n){return r._currentContext.get(n)},r.setValue=function(n,i){var o=new t(r._currentContext);return o._currentContext.set(n,i),o},r.deleteValue=function(n){var i=new t(r._currentContext);return i._currentContext.delete(n),i}}return t}(),kt=new wf,Dt=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Af=function(){function t(){}return t.prototype.createGauge=function(e,r){return kf},t.prototype.createHistogram=function(e,r){return Df},t.prototype.createCounter=function(e,r){return Mf},t.prototype.createUpDownCounter=function(e,r){return Uf},t.prototype.createObservableGauge=function(e,r){return Bf},t.prototype.createObservableCounter=function(e,r){return jf},t.prototype.createObservableUpDownCounter=function(e,r){return $f},t.prototype.addBatchObservableCallback=function(e,r){},t.prototype.removeBatchObservableCallback=function(e){},t}(),_r=function(){function t(){}return t}(),Lf=function(t){Dt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(r,n){},e}(_r),Rf=function(t){Dt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(r,n){},e}(_r),Nf=function(t){Dt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(r,n){},e}(_r),Cf=function(t){Dt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(r,n){},e}(_r),kn=function(){function t(){}return t.prototype.addCallback=function(e){},t.prototype.removeCallback=function(e){},t}(),xf=function(t){Dt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(kn),Pf=function(t){Dt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(kn),If=function(t){Dt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(kn),pa=new Af,Mf=new Lf,kf=new Nf,Df=new Cf,Uf=new Rf,jf=new xf,Bf=new Pf,$f=new If;function Ff(){return pa}var St;(function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"})(St||(St={}));var Vf={get:function(t,e){if(t!=null)return t[e]},keys:function(t){return t==null?[]:Object.keys(t)}},Gf={set:function(t,e,r){t!=null&&(t[e]=r)}},Hf=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},zf=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},Xf=function(){function t(){}return t.prototype.active=function(){return kt},t.prototype.with=function(e,r,n){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];return r.call.apply(r,zf([n],Hf(i),!1))},t.prototype.bind=function(e,r){return r},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t}(),qf=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Kf=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},Dn="context",Wf=new Xf,gr=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalContextManager=function(e){return Le(Dn,e,lt.instance())},t.prototype.active=function(){return this._getContextManager().active()},t.prototype.with=function(e,r,n){for(var i,o=[],a=3;a<arguments.length;a++)o[a-3]=arguments[a];return(i=this._getContextManager()).with.apply(i,Kf([e,r,n],qf(o),!1))},t.prototype.bind=function(e,r){return this._getContextManager().bind(e,r)},t.prototype._getContextManager=function(){return Mt(Dn)||Wf},t.prototype.disable=function(){this._getContextManager().disable(),Re(Dn,lt.instance())},t}(),pt;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(pt||(pt={}));var fa="0000000000000000",ha="00000000000000000000000000000000",da={traceId:ha,spanId:fa,traceFlags:pt.NONE},xe=function(){function t(e){e===void 0&&(e=da),this._spanContext=e}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,r){return this},t.prototype.setAttributes=function(e){return this},t.prototype.addEvent=function(e,r){return this},t.prototype.addLink=function(e){return this},t.prototype.addLinks=function(e){return this},t.prototype.setStatus=function(e){return this},t.prototype.updateName=function(e){return this},t.prototype.end=function(e){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(e,r){},t}(),Un=Ce("OpenTelemetry Context Key SPAN");function jn(t){return t.getValue(Un)||void 0}function Yf(){return jn(gr.getInstance().active())}function Bn(t,e){return t.setValue(Un,e)}function Jf(t){return t.deleteValue(Un)}function Qf(t,e){return Bn(t,new xe(e))}function va(t){var e;return(e=jn(t))===null||e===void 0?void 0:e.spanContext()}var Zf=/^([0-9a-f]{32})$/i,th=/^[0-9a-f]{16}$/i;function ya(t){return Zf.test(t)&&t!==ha}function eh(t){return th.test(t)&&t!==fa}function Pe(t){return ya(t.traceId)&&eh(t.spanId)}function rh(t){return new xe(t)}var $n=gr.getInstance(),ma=function(){function t(){}return t.prototype.startSpan=function(e,r,n){n===void 0&&(n=$n.active());var i=!!(r!=null&&r.root);if(i)return new xe;var o=n&&va(n);return nh(o)&&Pe(o)?new xe(o):new xe},t.prototype.startActiveSpan=function(e,r,n,i){var o,a,u;if(!(arguments.length<2)){arguments.length===2?u=r:arguments.length===3?(o=r,u=n):(o=r,a=n,u=i);var c=a??$n.active(),s=this.startSpan(e,o,c),l=Bn(c,s);return $n.with(l,u,void 0,s)}},t}();function nh(t){return typeof t=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var ih=new ma,oh=function(){function t(e,r,n,i){this._provider=e,this.name=r,this.version=n,this.options=i}return t.prototype.startSpan=function(e,r,n){return this._getTracer().startSpan(e,r,n)},t.prototype.startActiveSpan=function(e,r,n,i){var o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)},t.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):ih},t}(),ah=function(){function t(){}return t.prototype.getTracer=function(e,r,n){return new ma},t}(),sh=new ah,_a=function(){function t(){}return t.prototype.getTracer=function(e,r,n){var i;return(i=this.getDelegateTracer(e,r,n))!==null&&i!==void 0?i:new oh(this,e,r,n)},t.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:sh},t.prototype.setDelegate=function(e){this._delegate=e},t.prototype.getDelegateTracer=function(e,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(e,r,n)},t}(),Er;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Er||(Er={}));var Ie;(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"})(Ie||(Ie={}));var Tr;(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(Tr||(Tr={}));var N=gr.getInstance(),T=lt.instance(),uh=function(){function t(){}return t.prototype.getMeter=function(e,r,n){return pa},t}(),ch=new uh,Fn="metrics",lh=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalMeterProvider=function(e){return Le(Fn,e,lt.instance())},t.prototype.getMeterProvider=function(){return Mt(Fn)||ch},t.prototype.getMeter=function(e,r,n){return this.getMeterProvider().getMeter(e,r,n)},t.prototype.disable=function(){Re(Fn,lt.instance())},t}(),ie=lh.getInstance(),ph=function(){function t(){}return t.prototype.inject=function(e,r){},t.prototype.extract=function(e,r){return e},t.prototype.fields=function(){return[]},t}(),Vn=Ce("OpenTelemetry Baggage Key");function ga(t){return t.getValue(Vn)||void 0}function fh(){return ga(gr.getInstance().active())}function hh(t,e){return t.setValue(Vn,e)}function dh(t){return t.deleteValue(Vn)}var Gn="propagation",vh=new ph,yh=function(){function t(){this.createBaggage=Sf,this.getBaggage=ga,this.getActiveBaggage=fh,this.setBaggage=hh,this.deleteBaggage=dh}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalPropagator=function(e){return Le(Gn,e,lt.instance())},t.prototype.inject=function(e,r,n){return n===void 0&&(n=Gf),this._getGlobalPropagator().inject(e,r,n)},t.prototype.extract=function(e,r,n){return n===void 0&&(n=Vf),this._getGlobalPropagator().extract(e,r,n)},t.prototype.fields=function(){return this._getGlobalPropagator().fields()},t.prototype.disable=function(){Re(Gn,lt.instance())},t.prototype._getGlobalPropagator=function(){return Mt(Gn)||vh},t}(),Q=yh.getInstance(),Hn="trace",mh=function(){function t(){this._proxyTracerProvider=new _a,this.wrapSpanContext=rh,this.isSpanContextValid=Pe,this.deleteSpan=Jf,this.getSpan=jn,this.getActiveSpan=Yf,this.getSpanContext=va,this.setSpan=Bn,this.setSpanContext=Qf}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalTracerProvider=function(e){var r=Le(Hn,this._proxyTracerProvider,lt.instance());return r&&this._proxyTracerProvider.setDelegate(e),r},t.prototype.getTracerProvider=function(){return Mt(Hn)||this._proxyTracerProvider},t.prototype.getTracer=function(e,r){return this.getTracerProvider().getTracer(e,r)},t.prototype.disable=function(){Re(Hn,lt.instance()),this._proxyTracerProvider=new _a},t}(),x=mh.getInstance(),_h=Ce("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Ea(t){return t.getValue(_h)===!0}var gh="=",zn=";",Xn=",",qn="baggage",Eh=180,Th=4096,bh=8192,Oh=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};function Sh(t){return t.reduce(function(e,r){var n=""+e+(e!==""?Xn:"")+r;return n.length>bh?e:n},"")}function wh(t){return t.getAllEntries().map(function(e){var r=Oh(e,2),n=r[0],i=r[1],o=encodeURIComponent(n)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=zn+i.metadata.toString()),o})}function Ah(t){var e=t.split(zn);if(!(e.length<=0)){var r=e.shift();if(r){var n=r.indexOf(gh);if(!(n<=0)){var i=decodeURIComponent(r.substring(0,n).trim()),o=decodeURIComponent(r.substring(n+1).trim()),a;return e.length>0&&(a=la(e.join(zn))),{key:i,value:o,metadata:a}}}}}var Lh=function(){function t(){}return t.prototype.inject=function(e,r,n){var i=Q.getBaggage(e);if(!(!i||Ea(e))){var o=wh(i).filter(function(u){return u.length<=Th}).slice(0,Eh),a=Sh(o);a.length>0&&n.set(r,qn,a)}},t.prototype.extract=function(e,r,n){var i=n.get(r,qn),o=Array.isArray(i)?i.join(Xn):i;if(!o)return e;var a={};if(o.length===0)return e;var u=o.split(Xn);return u.forEach(function(c){var s=Ah(c);if(s){var l={value:s.value};s.metadata&&(l.metadata=s.metadata),a[s.key]=l}}),Object.entries(a).length===0?e:Q.setBaggage(e,Q.createBaggage(a))},t.prototype.fields=function(){return[qn]},t}(),Kn;(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"})(Kn||(Kn={}));var Rh=",",Nh=["OTEL_SDK_DISABLED"];function Ch(t){return Nh.indexOf(t)>-1}var xh=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function Ph(t){return xh.indexOf(t)>-1}var Ih=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function Mh(t){return Ih.indexOf(t)>-1}var Wn=1/0,Yn=128,kh=128,Dh=128,Ta={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:I.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:Wn,OTEL_ATTRIBUTE_COUNT_LIMIT:Yn,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Wn,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:Yn,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Wn,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:Yn,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:kh,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Dh,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Kn.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function Uh(t,e,r){if(typeof r[t]<"u"){var n=String(r[t]);e[t]=n.toLowerCase()==="true"}}function jh(t,e,r,n,i){if(n===void 0&&(n=-1/0),i===void 0&&(i=1/0),typeof r[t]<"u"){var o=Number(r[t]);isNaN(o)||(o<n?e[t]=n:o>i?e[t]=i:e[t]=o)}}function Bh(t,e,r,n){n===void 0&&(n=Rh);var i=r[t];typeof i=="string"&&(e[t]=i.split(n).map(function(o){return o.trim()}))}var $h={ALL:I.ALL,VERBOSE:I.VERBOSE,DEBUG:I.DEBUG,INFO:I.INFO,WARN:I.WARN,ERROR:I.ERROR,NONE:I.NONE};function Fh(t,e,r){var n=r[t];if(typeof n=="string"){var i=$h[n.toUpperCase()];i!=null&&(e[t]=i)}}function Vh(t){var e={};for(var r in Ta){var n=r;switch(n){case"OTEL_LOG_LEVEL":Fh(n,e,t);break;default:if(Ch(n))Uh(n,e,t);else if(Ph(n))jh(n,e,t);else if(Mh(n))Bh(n,e,t);else{var i=t[n];typeof i<"u"&&i!==null&&(e[n]=String(i))}}}return e}var Gh=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function Hh(){var t=Vh(Gh);return Object.assign({},Ta,t)}var Jn=performance,zh=9,Xh=6,qh=Math.pow(10,Xh),ba=Math.pow(10,zh);function Oa(t){var e=t/1e3,r=Math.trunc(e),n=Math.round(t%1e3*qh);return[r,n]}function Kh(){var t=Jn.timeOrigin;if(typeof t!="number"){var e=Jn;t=e.timing&&e.timing.fetchStart}return t}function Wh(t){var e=Oa(Kh()),r=Oa(Jn.now());return Yh(e,r)}function Yh(t,e){var r=[t[0]+e[0],t[1]+e[1]];return r[1]>=ba&&(r[1]-=ba,r[0]+=1),r}var Z;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(Z||(Z={}));var Jh=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Qh=function(){function t(e){e===void 0&&(e={});var r;this._propagators=(r=e.propagators)!==null&&r!==void 0?r:[],this._fields=Array.from(new Set(this._propagators.map(function(n){return typeof n.fields=="function"?n.fields():[]}).reduce(function(n,i){return n.concat(i)},[])))}return t.prototype.inject=function(e,r,n){var i,o;try{for(var a=Jh(this._propagators),u=a.next();!u.done;u=a.next()){var c=u.value;try{c.inject(e,r,n)}catch(s){T.warn("Failed to inject with "+c.constructor.name+". Err: "+s.message)}}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}},t.prototype.extract=function(e,r,n){return this._propagators.reduce(function(i,o){try{return o.extract(i,r,n)}catch(a){T.warn("Failed to extract with "+o.constructor.name+". Err: "+a.message)}return i},e)},t.prototype.fields=function(){return this._fields.slice()},t}(),Qn="[_0-9a-z-*/]",Zh="[a-z]"+Qn+"{0,255}",td="[a-z0-9]"+Qn+"{0,240}@[a-z]"+Qn+"{0,13}",ed=new RegExp("^(?:"+Zh+"|"+td+")$"),rd=/^[ -~]{0,255}[!-~]$/,nd=/,|=/;function id(t){return ed.test(t)}function od(t){return rd.test(t)&&!nd.test(t)}var Sa=32,ad=512,wa=",",Aa="=",sd=function(){function t(e){this._internalState=new Map,e&&this._parse(e)}return t.prototype.set=function(e,r){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,r),n},t.prototype.unset=function(e){var r=this._clone();return r._internalState.delete(e),r},t.prototype.get=function(e){return this._internalState.get(e)},t.prototype.serialize=function(){var e=this;return this._keys().reduce(function(r,n){return r.push(n+Aa+e.get(n)),r},[]).join(wa)},t.prototype._parse=function(e){e.length>ad||(this._internalState=e.split(wa).reverse().reduce(function(r,n){var i=n.trim(),o=i.indexOf(Aa);if(o!==-1){var a=i.slice(0,o),u=i.slice(o+1,n.length);id(a)&&od(u)&&r.set(a,u)}return r},new Map),this._internalState.size>Sa&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Sa))))},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}(),Zn="traceparent",ti="tracestate",ud="00",cd="(?!ff)[\\da-f]{2}",ld="(?![0]{32})[\\da-f]{32}",pd="(?![0]{16})[\\da-f]{16}",fd="[\\da-f]{2}",hd=new RegExp("^\\s?("+cd+")-("+ld+")-("+pd+")-("+fd+")(-.*)?\\s?$");function dd(t){var e=hd.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var vd=function(){function t(){}return t.prototype.inject=function(e,r,n){var i=x.getSpanContext(e);if(!(!i||Ea(e)||!Pe(i))){var o=ud+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||pt.NONE).toString(16);n.set(r,Zn,o),i.traceState&&n.set(r,ti,i.traceState.serialize())}},t.prototype.extract=function(e,r,n){var i=n.get(r,Zn);if(!i)return e;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return e;var a=dd(o);if(!a)return e;a.isRemote=!0;var u=n.get(r,ti);if(u){var c=Array.isArray(u)?u.join(","):u;a.traceState=new sd(typeof c=="string"?c:void 0)}return x.setSpanContext(e,a)},t.prototype.fields=function(){return[Zn,ti]},t}(),yd="[object Object]",md="[object Null]",_d="[object Undefined]",gd=Function.prototype,La=gd.toString,Ed=La.call(Object),Td=bd(Object.getPrototypeOf,Object),Ra=Object.prototype,Na=Ra.hasOwnProperty,Ut=Symbol?Symbol.toStringTag:void 0,Ca=Ra.toString;function bd(t,e){return function(r){return t(e(r))}}function xa(t){if(!Od(t)||Sd(t)!==yd)return!1;var e=Td(t);if(e===null)return!0;var r=Na.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&La.call(r)===Ed}function Od(t){return t!=null&&typeof t=="object"}function Sd(t){return t==null?t===void 0?_d:md:Ut&&Ut in Object(t)?wd(t):Ad(t)}function wd(t){var e=Na.call(t,Ut),r=t[Ut],n=!1;try{t[Ut]=void 0,n=!0}catch{}var i=Ca.call(t);return n&&(e?t[Ut]=r:delete t[Ut]),i}function Ad(t){return Ca.call(t)}var Ld=20;function Rd(){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=Pa(r,t.shift(),0,n);return r}function ei(t){return br(t)?t.slice():t}function Pa(t,e,r,n){r===void 0&&(r=0);var i;if(!(r>Ld)){if(r++,Or(t)||Or(e)||Ma(e))i=ei(e);else if(br(t)){if(i=t.slice(),br(e))for(var o=0,a=e.length;o<a;o++)i.push(ei(e[o]));else if(Me(e))for(var u=Object.keys(e),o=0,a=u.length;o<a;o++){var c=u[o];i[c]=ei(e[c])}}else if(Me(t))if(Me(e)){if(!Nd(t,e))return e;i=Object.assign({},t);for(var u=Object.keys(e),o=0,a=u.length;o<a;o++){var c=u[o],s=e[c];if(Or(s))typeof s>"u"?delete i[c]:i[c]=s;else{var l=i[c],p=s;if(Ia(t,c,n)||Ia(e,c,n))delete i[c];else{if(Me(l)&&Me(p)){var f=n.get(l)||[],y=n.get(p)||[];f.push({obj:t,key:c}),y.push({obj:e,key:c}),n.set(l,f),n.set(p,y)}i[c]=Pa(i[c],s,r,n)}}}}else i=e;return i}}function Ia(t,e,r){for(var n=r.get(t[e])||[],i=0,o=n.length;i<o;i++){var a=n[i];if(a.key===e&&a.obj===t)return!0}return!1}function br(t){return Array.isArray(t)}function Ma(t){return typeof t=="function"}function Me(t){return!Or(t)&&!br(t)&&!Ma(t)&&typeof t=="object"}function Or(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function Nd(t,e){return!(!xa(t)||!xa(e))}var ka=function(){function t(){}return t.prototype.emit=function(e){},t}(),Cd=new ka,xd=function(){function t(){}return t.prototype.getLogger=function(e,r,n){return new ka},t}(),Da=new xd,Pd=function(){function t(e,r,n,i){this._provider=e,this.name=r,this.version=n,this.options=i}return t.prototype.emit=function(e){this._getLogger().emit(e)},t.prototype._getLogger=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):Cd},t}(),Ua=function(){function t(){}return t.prototype.getLogger=function(e,r,n){var i;return(i=this.getDelegateLogger(e,r,n))!==null&&i!==void 0?i:new Pd(this,e,r,n)},t.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:Da},t.prototype.setDelegate=function(e){this._delegate=e},t.prototype.getDelegateLogger=function(e,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(e,r,n)},t}(),Id=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Sr=Symbol.for("io.opentelemetry.js.api.logs"),ke=Id;function Md(t,e,r){return function(n){return n===t?e:r}}var ja=1,kd=function(){function t(){this._proxyLoggerProvider=new Ua}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalLoggerProvider=function(e){return ke[Sr]?this.getLoggerProvider():(ke[Sr]=Md(ja,e,Da),this._proxyLoggerProvider.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,r;return(r=(e=ke[Sr])===null||e===void 0?void 0:e.call(ke,ja))!==null&&r!==void 0?r:this._proxyLoggerProvider},t.prototype.getLogger=function(e,r,n){return this.getLoggerProvider().getLogger(e,r,n)},t.prototype.disable=function(){delete ke[Sr],this._proxyLoggerProvider=new Ua},t}(),De=kd.getInstance();function Dd(t,e,r,n){for(var i=0,o=t.length;i<o;i++){var a=t[i];e&&a.setTracerProvider(e),r&&a.setMeterProvider(r),n&&a.setLoggerProvider&&a.setLoggerProvider(n),a.getConfig().enabled||a.enable()}}function Ud(t){t.forEach(function(e){return e.disable()})}function jd(t){var e,r,n=t.tracerProvider||x.getTracerProvider(),i=t.meterProvider||ie.getMeterProvider(),o=t.loggerProvider||De.getLoggerProvider(),a=(r=(e=t.instrumentations)===null||e===void 0?void 0:e.flat())!==null&&r!==void 0?r:[];return Dd(a,n,i,o),function(){Ud(a)}}function ri(t){return typeof t=="function"}var tt=console.error.bind(console);function Ue(t,e,r){var n=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:n,writable:!0,value:r})}function je(t){t&&t.logger&&(ri(t.logger)?tt=t.logger:tt("new logger isn't a function, not replacing"))}function Ba(t,e,r){if(!t||!t[e]){tt("no original function "+e+" to wrap");return}if(!r){tt("no wrapper function"),tt(new Error().stack);return}if(!ri(t[e])||!ri(r)){tt("original object and wrapper must be functions");return}var n=t[e],i=r(n,e);return Ue(i,"__original",n),Ue(i,"__unwrap",function(){t[e]===i&&Ue(t,e,n)}),Ue(i,"__wrapped",!0),Ue(t,e,i),i}function Bd(t,e,r){if(t)Array.isArray(t)||(t=[t]);else{tt("must provide one or more modules to patch"),tt(new Error().stack);return}if(!(e&&Array.isArray(e))){tt("must provide one or more functions to wrap on modules");return}t.forEach(function(n){e.forEach(function(i){Ba(n,i,r)})})}function $a(t,e){if(!t||!t[e]){tt("no function to unwrap."),tt(new Error().stack);return}if(!t[e].__unwrap)tt("no original to unwrap to -- has "+e+" already been unwrapped?");else return t[e].__unwrap()}function $d(t,e){if(t)Array.isArray(t)||(t=[t]);else{tt("must provide one or more modules to patch"),tt(new Error().stack);return}if(!(e&&Array.isArray(e))){tt("must provide one or more functions to unwrap on modules");return}t.forEach(function(r){e.forEach(function(n){$a(r,n)})})}je.wrap=Ba,je.massWrap=Bd,je.unwrap=$a,je.massUnwrap=$d;var X=je,ni=function(){return ni=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ni.apply(this,arguments)},Fd=function(){function t(e,r,n){this.instrumentationName=e,this.instrumentationVersion=r,this._config={},this._wrap=X.wrap,this._unwrap=X.unwrap,this._massWrap=X.massWrap,this._massUnwrap=X.massUnwrap,this.setConfig(n),this._diag=T.createComponentLogger({namespace:e}),this._tracer=x.getTracer(e,r),this._meter=ie.getMeter(e,r),this._logger=De.getLogger(e,r),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,r=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(r)?r:[r]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(e){this._config=ni({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(e,r,n,i){if(e)try{e(n,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},o)}},t}(),Vd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Gd=function(t){Vd(e,t);function e(r,n,i){var o=t.call(this,r,n,i)||this;return o._config.enabled&&o.enable(),o}return e}(Fd);function et(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var wr=performance,Hd="traceparent",Fa=Ce("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function zd(t){return t.setValue(Fa,!0)}function ii(t){return t.getValue(Fa)===!0}var Xd="=",oi=";",ai=",",si="baggage",qd=180,Kd=4096,Wd=8192,Yd=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};function Jd(t){return t.reduce(function(e,r){var n=""+e+(e!==""?ai:"")+r;return n.length>Wd?e:n},"")}function Qd(t){return t.getAllEntries().map(function(e){var r=Yd(e,2),n=r[0],i=r[1],o=encodeURIComponent(n)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=oi+i.metadata.toString()),o})}function Zd(t){var e=t.split(oi);if(!(e.length<=0)){var r=e.shift();if(r){var n=r.indexOf(Xd);if(!(n<=0)){var i=decodeURIComponent(r.substring(0,n).trim()),o=decodeURIComponent(r.substring(n+1).trim()),a;return e.length>0&&(a=la(e.join(oi))),{key:i,value:o,metadata:a}}}}}var tv=function(){function t(){}return t.prototype.inject=function(e,r,n){var i=Q.getBaggage(e);if(!(!i||ii(e))){var o=Qd(i).filter(function(u){return u.length<=Kd}).slice(0,qd),a=Jd(o);a.length>0&&n.set(r,si,a)}},t.prototype.extract=function(e,r,n){var i=n.get(r,si),o=Array.isArray(i)?i.join(ai):i;if(!o)return e;var a={};if(o.length===0)return e;var u=o.split(ai);return u.forEach(function(c){var s=Zd(c);if(s){var l={value:s.value};s.metadata&&(l.metadata=s.metadata),a[s.key]=l}}),Object.entries(a).length===0?e:Q.setBaggage(e,Q.createBaggage(a))},t.prototype.fields=function(){return[si]},t}(),Va=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ev=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};function Ar(t){var e,r,n={};if(typeof t!="object"||t==null)return n;try{for(var i=Va(Object.entries(t)),o=i.next();!o.done;o=i.next()){var a=ev(o.value,2),u=a[0],c=a[1];if(!rv(u)){T.warn("Invalid attribute key: "+u);continue}if(!Ga(c)){T.warn("Invalid attribute value set for key: "+u);continue}Array.isArray(c)?n[u]=c.slice():n[u]=c}}catch(s){e={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n}function rv(t){return typeof t=="string"&&t.length>0}function Ga(t){return t==null?!0:Array.isArray(t)?nv(t):Ha(t)}function nv(t){var e,r,n;try{for(var i=Va(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(a!=null){if(!n){if(Ha(a)){n=typeof a;continue}return!1}if(typeof a!==n)return!1}}}catch(u){e={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return!0}function Ha(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}function iv(){return function(t){T.error(ov(t))}}function ov(t){return typeof t=="string"?t:JSON.stringify(av(t))}function av(t){for(var e={},r=t;r!==null;)Object.getOwnPropertyNames(r).forEach(function(n){if(!e[n]){var i=r[n];i&&(e[n]=String(i))}}),r=Object.getPrototypeOf(r);return e}var sv=iv();function oe(t){try{sv(t)}catch{}}var ft;(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"})(ft||(ft={}));var uv=",",cv=["OTEL_SDK_DISABLED"];function lv(t){return cv.indexOf(t)>-1}var pv=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function fv(t){return pv.indexOf(t)>-1}var hv=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function dv(t){return hv.indexOf(t)>-1}var Lr=1/0,Rr=128,vv=128,yv=128,za={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:I.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:Lr,OTEL_ATTRIBUTE_COUNT_LIMIT:Rr,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Lr,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:Rr,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Lr,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:Rr,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:vv,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:yv,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ft.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function mv(t,e,r){if(typeof r[t]<"u"){var n=String(r[t]);e[t]=n.toLowerCase()==="true"}}function _v(t,e,r,n,i){if(n===void 0&&(n=-1/0),i===void 0&&(i=1/0),typeof r[t]<"u"){var o=Number(r[t]);isNaN(o)||(o<n?e[t]=n:o>i?e[t]=i:e[t]=o)}}function gv(t,e,r,n){n===void 0&&(n=uv);var i=r[t];typeof i=="string"&&(e[t]=i.split(n).map(function(o){return o.trim()}))}var Ev={ALL:I.ALL,VERBOSE:I.VERBOSE,DEBUG:I.DEBUG,INFO:I.INFO,WARN:I.WARN,ERROR:I.ERROR,NONE:I.NONE};function Tv(t,e,r){var n=r[t];if(typeof n=="string"){var i=Ev[n.toUpperCase()];i!=null&&(e[t]=i)}}function Xa(t){var e={};for(var r in za){var n=r;switch(n){case"OTEL_LOG_LEVEL":Tv(n,e,t);break;default:if(lv(n))mv(n,e,t);else if(fv(n))_v(n,e,t);else if(dv(n))gv(n,e,t);else{var i=t[n];typeof i<"u"&&i!==null&&(e[n]=String(i))}}}return e}var qa=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function Be(){var t=Xa(qa);return Object.assign({},za,t)}function bv(){return Xa(qa)}var ae=performance,Ov="exception.type",Sv="exception.message",wv="exception.stacktrace",Av="http.response_content_length",Lv="http.response_content_length_uncompressed",ui=Ov,ci=Sv,Rv=wv,Nv=Av,Cv=Lv,xv=9,Pv=6,Iv=Math.pow(10,Pv),Nr=Math.pow(10,xv);function wt(t){var e=t/1e3,r=Math.trunc(e),n=Math.round(t%1e3*Iv);return[r,n]}function li(){var t=ae.timeOrigin;if(typeof t!="number"){var e=ae;t=e.timing&&e.timing.fetchStart}return t}function Ka(t){var e=wt(li()),r=wt(typeof t=="number"?t:ae.now());return Ya(e,r)}function $e(t){if(pi(t))return t;if(typeof t=="number")return t<li()?Ka(t):wt(t);if(t instanceof Date)return wt(t.getTime());throw TypeError("Invalid input type")}function Mv(t,e){var r=e[0]-t[0],n=e[1]-t[1];return n<0&&(r-=1,n+=Nr),[r,n]}function At(t){return t[0]*Nr+t[1]}function pi(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function Wa(t){return pi(t)||typeof t=="number"||t instanceof Date}function Ya(t,e){var r=[t[0]+e[0],t[1]+e[1]];return r[1]>=Nr&&(r[1]-=Nr,r[0]+=1),r}var fi;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(fi||(fi={}));var kv=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Dv=function(){function t(e){e===void 0&&(e={});var r;this._propagators=(r=e.propagators)!==null&&r!==void 0?r:[],this._fields=Array.from(new Set(this._propagators.map(function(n){return typeof n.fields=="function"?n.fields():[]}).reduce(function(n,i){return n.concat(i)},[])))}return t.prototype.inject=function(e,r,n){var i,o;try{for(var a=kv(this._propagators),u=a.next();!u.done;u=a.next()){var c=u.value;try{c.inject(e,r,n)}catch(s){T.warn("Failed to inject with "+c.constructor.name+". Err: "+s.message)}}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}},t.prototype.extract=function(e,r,n){return this._propagators.reduce(function(i,o){try{return o.extract(i,r,n)}catch(a){T.warn("Failed to extract with "+o.constructor.name+". Err: "+a.message)}return i},e)},t.prototype.fields=function(){return this._fields.slice()},t}(),hi="[_0-9a-z-*/]",Uv="[a-z]"+hi+"{0,255}",jv="[a-z0-9]"+hi+"{0,240}@[a-z]"+hi+"{0,13}",Bv=new RegExp("^(?:"+Uv+"|"+jv+")$"),$v=/^[ -~]{0,255}[!-~]$/,Fv=/,|=/;function Vv(t){return Bv.test(t)}function Gv(t){return $v.test(t)&&!Fv.test(t)}var Ja=32,Hv=512,Qa=",",Za="=",zv=function(){function t(e){this._internalState=new Map,e&&this._parse(e)}return t.prototype.set=function(e,r){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,r),n},t.prototype.unset=function(e){var r=this._clone();return r._internalState.delete(e),r},t.prototype.get=function(e){return this._internalState.get(e)},t.prototype.serialize=function(){var e=this;return this._keys().reduce(function(r,n){return r.push(n+Za+e.get(n)),r},[]).join(Qa)},t.prototype._parse=function(e){e.length>Hv||(this._internalState=e.split(Qa).reverse().reduce(function(r,n){var i=n.trim(),o=i.indexOf(Za);if(o!==-1){var a=i.slice(0,o),u=i.slice(o+1,n.length);Vv(a)&&Gv(u)&&r.set(a,u)}return r},new Map),this._internalState.size>Ja&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Ja))))},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}(),di="traceparent",vi="tracestate",Xv="00",qv="(?!ff)[\\da-f]{2}",Kv="(?![0]{32})[\\da-f]{32}",Wv="(?![0]{16})[\\da-f]{16}",Yv="[\\da-f]{2}",Jv=new RegExp("^\\s?("+qv+")-("+Kv+")-("+Wv+")-("+Yv+")(-.*)?\\s?$");function Qv(t){var e=Jv.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var Zv=function(){function t(){}return t.prototype.inject=function(e,r,n){var i=x.getSpanContext(e);if(!(!i||ii(e)||!Pe(i))){var o=Xv+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||pt.NONE).toString(16);n.set(r,di,o),i.traceState&&n.set(r,vi,i.traceState.serialize())}},t.prototype.extract=function(e,r,n){var i=n.get(r,di);if(!i)return e;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return e;var a=Qv(o);if(!a)return e;a.isRemote=!0;var u=n.get(r,vi);if(u){var c=Array.isArray(u)?u.join(","):u;a.traceState=new zv(typeof c=="string"?c:void 0)}return x.setSpanContext(e,a)},t.prototype.fields=function(){return[di,vi]},t}(),ty="[object Object]",ey="[object Null]",ry="[object Undefined]",ny=Function.prototype,ts=ny.toString,iy=ts.call(Object),oy=ay(Object.getPrototypeOf,Object),es=Object.prototype,rs=es.hasOwnProperty,jt=Symbol?Symbol.toStringTag:void 0,ns=es.toString;function ay(t,e){return function(r){return t(e(r))}}function is(t){if(!sy(t)||uy(t)!==ty)return!1;var e=oy(t);if(e===null)return!0;var r=rs.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&ts.call(r)===iy}function sy(t){return t!=null&&typeof t=="object"}function uy(t){return t==null?t===void 0?ry:ey:jt&&jt in Object(t)?cy(t):ly(t)}function cy(t){var e=rs.call(t,jt),r=t[jt],n=!1;try{t[jt]=void 0,n=!0}catch{}var i=ns.call(t);return n&&(e?t[jt]=r:delete t[jt]),i}function ly(t){return ns.call(t)}var py=20;function fy(){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=os(r,t.shift(),0,n);return r}function yi(t){return Cr(t)?t.slice():t}function os(t,e,r,n){r===void 0&&(r=0);var i;if(!(r>py)){if(r++,xr(t)||xr(e)||ss(e))i=yi(e);else if(Cr(t)){if(i=t.slice(),Cr(e))for(var o=0,a=e.length;o<a;o++)i.push(yi(e[o]));else if(Fe(e))for(var u=Object.keys(e),o=0,a=u.length;o<a;o++){var c=u[o];i[c]=yi(e[c])}}else if(Fe(t))if(Fe(e)){if(!hy(t,e))return e;i=Object.assign({},t);for(var u=Object.keys(e),o=0,a=u.length;o<a;o++){var c=u[o],s=e[c];if(xr(s))typeof s>"u"?delete i[c]:i[c]=s;else{var l=i[c],p=s;if(as(t,c,n)||as(e,c,n))delete i[c];else{if(Fe(l)&&Fe(p)){var f=n.get(l)||[],y=n.get(p)||[];f.push({obj:t,key:c}),y.push({obj:e,key:c}),n.set(l,f),n.set(p,y)}i[c]=os(i[c],s,r,n)}}}}else i=e;return i}}function as(t,e,r){for(var n=r.get(t[e])||[],i=0,o=n.length;i<o;i++){var a=n[i];if(a.key===e&&a.obj===t)return!0}return!1}function Cr(t){return Array.isArray(t)}function ss(t){return typeof t=="function"}function Fe(t){return!xr(t)&&!Cr(t)&&!ss(t)&&typeof t=="object"}function xr(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function hy(t,e){return!(!is(t)||!is(e))}function dy(t,e){return typeof e=="string"?t===e:!!t.match(e)}var vy=function(){function t(){var e=this;this._promise=new Promise(function(r,n){e._resolve=r,e._reject=n})}return Object.defineProperty(t.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),t.prototype.resolve=function(e){this._resolve(e)},t.prototype.reject=function(e){this._reject(e)},t}(),yy=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},my=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},_y=function(){function t(e,r){this._callback=e,this._that=r,this._isCalled=!1,this._deferred=new vy}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var e,r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((e=this._callback).call.apply(e,my([this._that],yy(n),!1))).then(function(o){return r._deferred.resolve(o)},function(o){return r._deferred.reject(o)})}catch(o){this._deferred.reject(o)}}return this._deferred.promise},t}(),gy="exception",mi=function(){return mi=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},mi.apply(this,arguments)},Ey=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},us=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Ty=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},by=function(){function t(e,r,n,i,o,a,u,c,s,l){u===void 0&&(u=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:Tr.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=i,this.parentSpanId=a,this.kind=o,this.links=u;var p=Date.now();this._performanceStartTime=ae.now(),this._performanceOffset=p-(this._performanceStartTime+li()),this._startTimeProvided=c!=null,this.startTime=this._getTime(c??p),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,l!=null&&this.setAttributes(l),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,r)}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,r){return r==null||this._isSpanEnded()?this:e.length===0?(T.warn("Invalid attribute key: "+e),this):Ga(r)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(r),this):(T.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var r,n;try{for(var i=Ey(Object.entries(e)),o=i.next();!o.done;o=i.next()){var a=us(o.value,2),u=a[0],c=a[1];this.setAttribute(u,c)}}catch(s){r={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return this},t.prototype.addEvent=function(e,r,n){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return T.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&T.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),Wa(r)&&(Wa(n)||(n=r),r=void 0);var i=Ar(r);return this.events.push({name:e,attributes:i,time:this._getTime(n),droppedAttributesCount:0}),this},t.prototype.addLink=function(e){return this.links.push(e),this},t.prototype.addLinks=function(e){var r;return(r=this.links).push.apply(r,Ty([],us(e),!1)),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=mi({},e),this.status.message!=null&&typeof e.message!="string"&&(T.warn("Dropping invalid status.message of type '"+typeof e.message+"', expected 'string'"),delete this.status.message),this)},t.prototype.updateName=function(e){return this._isSpanEnded()?this:(this.name=e,this)},t.prototype.end=function(e){if(this._isSpanEnded()){T.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(e),this._duration=Mv(this.startTime,this.endTime),this._duration[0]<0&&(T.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&&T.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},t.prototype._getTime=function(e){if(typeof e=="number"&&e<=ae.now())return Ka(e+this._performanceOffset);if(typeof e=="number")return wt(e);if(e instanceof Date)return wt(e.getTime());if(pi(e))return e;if(this._startTimeProvided)return wt(Date.now());var r=ae.now()-this._performanceStartTime;return Ya(this.startTime,wt(r))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,r){var n={};typeof e=="string"?n[ci]=e:e&&(e.code?n[ui]=e.code.toString():e.name&&(n[ui]=e.name),e.message&&(n[ci]=e.message),e.stack&&(n[Rv]=e.stack)),n[ui]||n[ci]?this.addEvent(gy,n,r):T.warn("Failed to record an exception "+e)},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&&T.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(e,r){return e.length<=r?e:e.substring(0,r)},t.prototype._truncateToSize=function(e){var r=this,n=this._attributeValueLengthLimit;return n<=0?(T.warn("Attribute value limit must be positive, got "+n),e):typeof e=="string"?this._truncateToLimitUtil(e,n):Array.isArray(e)?e.map(function(i){return typeof i=="string"?r._truncateToLimitUtil(i,n):i}):e},t}(),se;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(se||(se={}));var Pr=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:se.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}(),ue=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:se.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}(),_i=function(){function t(e){var r,n,i,o;this._root=e.root,this._root||(oe(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new ue),this._remoteParentSampled=(r=e.remoteParentSampled)!==null&&r!==void 0?r:new ue,this._remoteParentNotSampled=(n=e.remoteParentNotSampled)!==null&&n!==void 0?n:new Pr,this._localParentSampled=(i=e.localParentSampled)!==null&&i!==void 0?i:new ue,this._localParentNotSampled=(o=e.localParentNotSampled)!==null&&o!==void 0?o:new Pr}return t.prototype.shouldSample=function(e,r,n,i,o,a){var u=x.getSpanContext(e);return!u||!Pe(u)?this._root.shouldSample(e,r,n,i,o,a):u.isRemote?u.traceFlags&pt.SAMPLED?this._remoteParentSampled.shouldSample(e,r,n,i,o,a):this._remoteParentNotSampled.shouldSample(e,r,n,i,o,a):u.traceFlags&pt.SAMPLED?this._localParentSampled.shouldSample(e,r,n,i,o,a):this._localParentNotSampled.shouldSample(e,r,n,i,o,a)},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}(),cs=function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return t.prototype.shouldSample=function(e,r){return{decision:ya(r)&&this._accumulate(r)<this._upperBound?se.RECORD_AND_SAMPLED:se.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var r=0,n=0;n<e.length/8;n++){var i=n*8,o=parseInt(e.slice(i,i+8),16);r=(r^o)>>>0}return r},t}(),Oy=ft.AlwaysOn,ce=1;function ls(){var t=Be();return{sampler:ps(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},mergeResourceWithDefaults:!0}}function ps(t){switch(t===void 0&&(t=Be()),t.OTEL_TRACES_SAMPLER){case ft.AlwaysOn:return new ue;case ft.AlwaysOff:return new Pr;case ft.ParentBasedAlwaysOn:return new _i({root:new ue});case ft.ParentBasedAlwaysOff:return new _i({root:new Pr});case ft.TraceIdRatio:return new cs(fs(t));case ft.ParentBasedTraceIdRatio:return new _i({root:new cs(fs(t))});default:return T.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Oy+'".'),new ue}}function fs(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return T.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+ce+"."),ce;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(T.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+ce+"."),ce):e<0||e>1?(T.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+ce+"."),ce):e}function Sy(t){var e={sampler:ps()},r=ls(),n=Object.assign({},r,e,t);return n.generalLimits=Object.assign({},r.generalLimits,t.generalLimits||{}),n.spanLimits=Object.assign({},r.spanLimits,t.spanLimits||{}),n}function wy(t){var e,r,n,i,o,a,u,c,s,l,p,f,y=Object.assign({},t.spanLimits),v=bv();return y.attributeCountLimit=(a=(o=(i=(r=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&r!==void 0?r:(n=t.generalLimits)===null||n===void 0?void 0:n.attributeCountLimit)!==null&&i!==void 0?i:v.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:v.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&a!==void 0?a:Rr,y.attributeValueLengthLimit=(f=(p=(l=(c=(u=t.spanLimits)===null||u===void 0?void 0:u.attributeValueLengthLimit)!==null&&c!==void 0?c:(s=t.generalLimits)===null||s===void 0?void 0:s.attributeValueLengthLimit)!==null&&l!==void 0?l:v.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:v.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&f!==void 0?f:Lr,Object.assign({},t,{spanLimits:y})}var Ay=function(){function t(e,r){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=Be();this._maxExportBatchSize=typeof r?.maxExportBatchSize=="number"?r.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof r?.maxQueueSize=="number"?r.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof r?.scheduledDelayMillis=="number"?r.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof r?.exportTimeoutMillis=="number"?r.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new _y(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(T.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(e,r){},t.prototype.onEnd=function(e){this._shutdownOnce.isCalled||e.spanContext().traceFlags&pt.SAMPLED&&this._addToBuffer(e)},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){var e=this;return Promise.resolve().then(function(){return e.onShutdown()}).then(function(){return e._flushAll()}).then(function(){return e._exporter.shutdown()})},t.prototype._addToBuffer=function(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&T.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(T.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()},t.prototype._flushAll=function(){var e=this;return new Promise(function(r,n){for(var i=[],o=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize),a=0,u=o;a<u;a++)i.push(e._flushOneBatch());Promise.all(i).then(function(){r()}).catch(n)})},t.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(r,n){var i=setTimeout(function(){n(new Error("Timeout"))},e._exportTimeoutMillis);N.with(zd(N.active()),function(){var o;e._finishedSpans.length<=e._maxExportBatchSize?(o=e._finishedSpans,e._finishedSpans=[]):o=e._finishedSpans.splice(0,e._maxExportBatchSize);for(var a=function(){return e._exporter.export(o,function(p){var f;clearTimeout(i),p.code===fi.SUCCESS?r():n((f=p.error)!==null&&f!==void 0?f:new Error("BatchSpanProcessor: span export failed"))})},u=null,c=0,s=o.length;c<s;c++){var l=o[c];l.resource.asyncAttributesPending&&l.resource.waitForAsyncAttributes&&(u!=null||(u=[]),u.push(l.resource.waitForAsyncAttributes()))}u===null?a():Promise.all(u).then(a,function(p){oe(p),n(p)})})})},t.prototype._maybeStartTimer=function(){var e=this;if(!this._isExporting){var r=function(){e._isExporting=!0,e._flushOneBatch().finally(function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(n){e._isExporting=!1,oe(n)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return r();this._timer===void 0&&(this._timer=setTimeout(function(){return r()},this._scheduledDelayMillis))}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t}(),Ly=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),hs=function(t){Ly(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.onInit(n),i}return e.prototype.onInit=function(r){var n=this;r?.disableAutoFlushOnDocumentHide!==!0&&typeof document<"u"&&(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&n.forceFlush().catch(function(i){oe(i)})},this._pageHideListener=function(){n.forceFlush().catch(function(i){oe(i)})},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},e.prototype.onShutdown=function(){typeof document<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},e}(Ay),Ry=8,Ny=16,Cy=function(){function t(){this.generateTraceId=ds(Ny),this.generateSpanId=ds(Ry)}return t}(),Ir=Array(32);function ds(t){return function(){for(var e=0;e<t*2;e++)Ir[e]=Math.floor(Math.random()*16)+48,Ir[e]>=58&&(Ir[e]+=39);return String.fromCharCode.apply(null,Ir.slice(0,t*2))}}var xy=function(){function t(e,r,n){this._tracerProvider=n;var i=Sy(r);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=r.idGenerator||new Cy,this.resource=n.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,r,n){var i,o,a;r===void 0&&(r={}),n===void 0&&(n=N.active()),r.root&&(n=x.deleteSpan(n));var u=x.getSpan(n);if(ii(n)){T.debug("Instrumentation suppressed, returning Noop Span");var c=x.wrapSpanContext(da);return c}var s=u?.spanContext(),l=this._idGenerator.generateSpanId(),p,f,y;!s||!x.isSpanContextValid(s)?p=this._idGenerator.generateTraceId():(p=s.traceId,f=s.traceState,y=s.spanId);var v=(i=r.kind)!==null&&i!==void 0?i:Ie.INTERNAL,m=((o=r.links)!==null&&o!==void 0?o:[]).map(function(j){return{context:j.context,attributes:Ar(j.attributes)}}),_=Ar(r.attributes),E=this._sampler.shouldSample(n,p,e,v,_,m);f=(a=E.traceState)!==null&&a!==void 0?a:f;var R=E.decision===Er.RECORD_AND_SAMPLED?pt.SAMPLED:pt.NONE,U={traceId:p,spanId:l,traceFlags:R,traceState:f};if(E.decision===Er.NOT_RECORD){T.debug("Recording is off, propagating context in a non-recording span");var c=x.wrapSpanContext(U);return c}var D=Ar(Object.assign(_,E.attributes)),G=new by(this,n,e,U,v,y,m,r.startTime,void 0,D);return G},t.prototype.startActiveSpan=function(e,r,n,i){var o,a,u;if(!(arguments.length<2)){arguments.length===2?u=r:arguments.length===3?(o=r,u=n):(o=r,a=n,u=i);var c=a??N.active(),s=this.startSpan(e,o,c),l=x.setSpan(c,s);return N.with(l,u,void 0,s)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t}(),Py="process.runtime.name",Iy="service.name",My="telemetry.sdk.name",ky="telemetry.sdk.language",Dy="telemetry.sdk.version",Uy=Py,jy=Iy,gi=My,Ei=ky,Ti=Dy,By="webjs",$y=By,Fy="1.30.1",le,bi=(le={},le[gi]="opentelemetry",le[Uy]="browser",le[Ei]=$y,le[Ti]=Fy,le);function Vy(){return"unknown_service"}var Lt=function(){return Lt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Lt.apply(this,arguments)},Gy=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},Hy=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},zy=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Ve=function(){function t(e,r){var n=this,i;this._attributes=e,this.asyncAttributesPending=r!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=r?.then(function(o){return n._attributes=Object.assign({},n._attributes,o),n.asyncAttributesPending=!1,o},function(o){return T.debug("a resource's async attributes promise rejected: %s",o),n.asyncAttributesPending=!1,{}})}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t((e={},e[jy]=Vy(),e[Ei]=bi[Ei],e[gi]=bi[gi],e[Ti]=bi[Ti],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&T.error("Accessing resource attributes before async attributes settled"),(e=this._attributes)!==null&&e!==void 0?e:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return Gy(this,void 0,void 0,function(){return Hy(this,function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.merge=function(e){var r=this,n;if(!e)return this;var i=Lt(Lt({},this._syncAttributes),(n=e._syncAttributes)!==null&&n!==void 0?n:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new t(i);var o=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(function(a){var u,c=zy(a,2),s=c[0],l=c[1];return Lt(Lt(Lt(Lt({},r._syncAttributes),s),(u=e._syncAttributes)!==null&&u!==void 0?u:e.attributes),l)});return new t(i,o)},t.EMPTY=new t({}),t}(),Mr=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},vs=function(){function t(e){this._spanProcessors=e}return t.prototype.forceFlush=function(){var e,r,n=[];try{for(var i=Mr(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;n.push(a.forceFlush())}}catch(u){e={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return new Promise(function(u){Promise.all(n).then(function(){u()}).catch(function(c){oe(c||new Error("MultiSpanProcessor: forceFlush failed")),u()})})},t.prototype.onStart=function(e,r){var n,i;try{for(var o=Mr(this._spanProcessors),a=o.next();!a.done;a=o.next()){var u=a.value;u.onStart(e,r)}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}},t.prototype.onEnd=function(e){var r,n;try{for(var i=Mr(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;a.onEnd(e)}}catch(u){r={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},t.prototype.shutdown=function(){var e,r,n=[];try{for(var i=Mr(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;n.push(a.shutdown())}}catch(u){e={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return new Promise(function(u,c){Promise.all(n).then(function(){u()},c)})},t}(),Xy=function(){function t(){}return t.prototype.onStart=function(e,r){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t}(),qy=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Ky=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},Bt;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(Bt||(Bt={}));var Wy=function(){function t(e){e===void 0&&(e={});var r,n;this._registeredSpanProcessors=[],this._tracers=new Map;var i=fy({},ls(),wy(e));if(this.resource=(r=i.resource)!==null&&r!==void 0?r:Ve.empty(),i.mergeResourceWithDefaults&&(this.resource=Ve.default().merge(this.resource)),this._config=Object.assign({},i,{resource:this.resource}),!((n=e.spanProcessors)===null||n===void 0)&&n.length)this._registeredSpanProcessors=Ky([],qy(e.spanProcessors),!1),this.activeSpanProcessor=new vs(this._registeredSpanProcessors);else{var o=this._buildExporterFromEnv();if(o!==void 0){var a=new hs(o);this.activeSpanProcessor=a}else this.activeSpanProcessor=new Xy}}return t.prototype.getTracer=function(e,r,n){var i=e+"@"+(r||"")+":"+(n?.schemaUrl||"");return this._tracers.has(i)||this._tracers.set(i,new xy({name:e,version:r,schemaUrl:n?.schemaUrl},this._config,this)),this._tracers.get(i)},t.prototype.addSpanProcessor=function(e){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(r){return T.error("Error while trying to shutdown current span processor",r)}),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new vs(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(e){e===void 0&&(e={}),x.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&N.setGlobalContextManager(e.contextManager),e.propagator&&Q.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,r=this._registeredSpanProcessors.map(function(n){return new Promise(function(i){var o,a=setTimeout(function(){i(new Error("Span processor did not completed within timeout period of "+e+" ms")),o=Bt.timeout},e);n.forceFlush().then(function(){clearTimeout(a),o!==Bt.timeout&&(o=Bt.resolved,i(o))}).catch(function(u){clearTimeout(a),o=Bt.error,i(u)})})});return new Promise(function(n,i){Promise.all(r).then(function(o){var a=o.filter(function(u){return u!==Bt.resolved});a.length>0?i(a):n()}).catch(function(o){return i([o])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(e){var r;return(r=this.constructor._registeredPropagators.get(e))===null||r===void 0?void 0:r()},t.prototype._getSpanExporter=function(e){var r;return(r=this.constructor._registeredExporters.get(e))===null||r===void 0?void 0:r()},t.prototype._buildPropagatorFromEnv=function(){var e=this,r=Array.from(new Set(Be().OTEL_PROPAGATORS)),n=r.map(function(o){var a=e._getPropagator(o);return a||T.warn('Propagator "'+o+'" requested through environment variable is unavailable.'),a}),i=n.reduce(function(o,a){return a&&o.push(a),o},[]);if(i.length!==0)return r.length===1?i[0]:new Dv({propagators:i})},t.prototype._buildExporterFromEnv=function(){var e=Be().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var r=this._getSpanExporter(e);return r||T.error('Exporter "'+e+'" requested through environment variable is unavailable.'),r}},t._registeredPropagators=new Map([["tracecontext",function(){return new Zv}],["baggage",function(){return new tv}]]),t._registeredExporters=new Map,t}(),Yy=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Jy=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},ys=function(){function t(){this._enabled=!1,this._currentContext=kt}return t.prototype._bindFunction=function(e,r){e===void 0&&(e=kt);var n=this,i=function(){for(var o=this,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return n.with(e,function(){return r.apply(o,a)})};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),i},t.prototype.active=function(){return this._currentContext},t.prototype.bind=function(e,r){return e===void 0&&(e=this.active()),typeof r=="function"?this._bindFunction(e,r):r},t.prototype.disable=function(){return this._currentContext=kt,this._enabled=!1,this},t.prototype.enable=function(){return this._enabled?this:(this._enabled=!0,this._currentContext=kt,this)},t.prototype.with=function(e,r,n){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var a=this._currentContext;this._currentContext=e||kt;try{return r.call.apply(r,Jy([n],Yy(i),!1))}finally{this._currentContext=a}},t}(),Qy=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Zy=function(t){Qy(e,t);function e(r){r===void 0&&(r={});var n=t.call(this,r)||this;if(r.contextManager)throw"contextManager should be defined in register method not in constructor";if(r.propagator)throw"propagator should be defined in register method not in constructor";return n}return e.prototype.register=function(r){r===void 0&&(r={}),r.contextManager===void 0&&(r.contextManager=new ys),r.contextManager&&r.contextManager.enable(),t.prototype.register.call(this,r)},e}(Wy),S;(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"})(S||(S={}));var Oi;function tm(){return Oi||(Oi=document.createElement("a")),Oi}function Rt(t,e){return e in t}function V(t,e,r,n){var i=void 0,o=void 0;Rt(r,e)&&typeof r[e]=="number"&&(i=r[e]);var a=S.FETCH_START;if(Rt(r,a)&&typeof r[a]=="number"&&(o=r[a]),i!==void 0&&o!==void 0&&i>=o)return t.addEvent(e,i),t}function pe(t,e,r){r===void 0&&(r=!1),r||(V(t,S.FETCH_START,e),V(t,S.DOMAIN_LOOKUP_START,e),V(t,S.DOMAIN_LOOKUP_END,e),V(t,S.CONNECT_START,e),Rt(e,"name")&&e.name.startsWith("https:")&&V(t,S.SECURE_CONNECTION_START,e),V(t,S.CONNECT_END,e),V(t,S.REQUEST_START,e),V(t,S.RESPONSE_START,e),V(t,S.RESPONSE_END,e));var n=e[S.ENCODED_BODY_SIZE];n!==void 0&&t.setAttribute(Nv,n);var i=e[S.DECODED_BODY_SIZE];i!==void 0&&n!==i&&t.setAttribute(Cv,i)}function em(t){return t.slice().sort(function(e,r){var n=e[S.FETCH_START],i=r[S.FETCH_START];return n>i?1:n<i?-1:0})}function ms(){return typeof location<"u"?location.origin:void 0}function _s(t,e,r,n,i,o){i===void 0&&(i=new WeakSet);var a=mt(t);t=a.toString();var u=nm(t,e,r,n,i,o);if(u.length===0)return{mainRequest:void 0};if(u.length===1)return{mainRequest:u[0]};var c=em(u);if(a.origin!==ms()&&c.length>1){var s=c[0],l=rm(c,s[S.RESPONSE_END],r),p=s[S.RESPONSE_END],f=l[S.FETCH_START];return f<p&&(l=s,s=void 0),{corsPreFlightRequest:s,mainRequest:l}}else return{mainRequest:u[0]}}function rm(t,e,r){for(var n=At(r),i=At($e(e)),o=t[1],a,u=t.length,c=1;c<u;c++){var s=t[c],l=At($e(s[S.FETCH_START])),p=At($e(s[S.RESPONSE_END])),f=n-p;l>=i&&(!a||f<a)&&(a=f,o=s)}return o}function nm(t,e,r,n,i,o){var a=At(e),u=At(r),c=n.filter(function(s){var l=At($e(s[S.FETCH_START])),p=At($e(s[S.RESPONSE_END]));return s.initiatorType.toLowerCase()===(o||"xmlhttprequest")&&s.name===t&&l>=a&&p<=u});return c.length>0&&(c=c.filter(function(s){return!i.has(s)})),c}function mt(t){if(typeof URL=="function")return new URL(t,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);var e=tm();return e.href=t,e}function gs(t,e){if(t.nodeType===Node.DOCUMENT_NODE)return"/";var r=om(t,e);if(e&&r.indexOf("@id")>0)return r;var n="";return t.parentNode&&(n+=gs(t.parentNode,!1)),n+=r,n}function im(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(n){var i=n.localName;return e.indexOf(n.nodeType)>=0&&i===t.localName}),r.length>=1?r.indexOf(t)+1:0}function om(t,e){var r=t.nodeType,n=im(t),i="";if(r===Node.ELEMENT_NODE){var o=t.getAttribute("id");if(e&&o)return'//*[@id="'+o+'"]';i=t.localName}else if(r===Node.TEXT_NODE||r===Node.CDATA_SECTION_NODE)i="text()";else if(r===Node.COMMENT_NODE)i="comment()";else return"";return i&&n>1?"/"+i+"["+n+"]":"/"+i}function Es(t,e){var r=e||[];(typeof r=="string"||r instanceof RegExp)&&(r=[r]);var n=mt(t);return n.origin===ms()?!0:r.some(function(i){return dy(t,i)})}var Si=function(){return Si=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Si.apply(this,arguments)},am=function(){function t(e,r,n){this.instrumentationName=e,this.instrumentationVersion=r,this._config={},this._wrap=X.wrap,this._unwrap=X.unwrap,this._massWrap=X.massWrap,this._massUnwrap=X.massUnwrap,this.setConfig(n),this._diag=T.createComponentLogger({namespace:e}),this._tracer=x.getTracer(e,r),this._meter=ie.getMeter(e,r),this._logger=De.getLogger(e,r),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,r=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(r)?r:[r]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(e){this._config=Si({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(e,r,n,i){if(e)try{e(n,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},o)}},t}(),sm=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),um=function(t){sm(e,t);function e(r,n,i){var o=t.call(this,r,n,i)||this;return o._config.enabled&&o.enable(),o}return e}(am);function Ts(t,e,r){var n,i;try{i=t()}catch(o){n=o}finally{return e(n,i),i}}var Ge;(function(t){t.DOCUMENT_LOAD="documentLoad",t.DOCUMENT_FETCH="documentFetch",t.RESOURCE_FETCH="resourceFetch"})(Ge||(Ge={}));var cm="0.44.0",lm="@opentelemetry/instrumentation-document-load";const pm="http.url",fm="http.user_agent",He=pm,hm=fm;var kr;(function(t){t.FIRST_PAINT="firstPaint",t.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(kr||(kr={}));var dm=function(){var t,e,r={},n=(e=(t=wr).getEntriesByType)===null||e===void 0?void 0:e.call(t,"navigation")[0];if(n){var i=Object.values(S);i.forEach(function(u){if(Rt(n,u)){var c=n[u];typeof c=="number"&&(r[u]=c)}})}else{var o=wr,a=o.timing;if(a){var i=Object.values(S);i.forEach(function(c){if(Rt(a,c)){var s=a[c];typeof s=="number"&&(r[c]=s)}})}}return r},bs={"first-paint":kr.FIRST_PAINT,"first-contentful-paint":kr.FIRST_CONTENTFUL_PAINT},vm=function(t){var e,r,n=(r=(e=wr).getEntriesByType)===null||r===void 0?void 0:r.call(e,"paint");n&&n.forEach(function(i){var o=i.name,a=i.startTime;Rt(bs,o)&&t.addEvent(bs[o],a)})},ym=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),mm=function(t){ym(e,t);function e(r){r===void 0&&(r={});var n=t.call(this,lm,cm,r)||this;return n.component="document-load",n.version="1",n.moduleName=n.component,n}return e.prototype.init=function(){},e.prototype._onDocumentLoaded=function(){var r=this;window.setTimeout(function(){r._collectPerformance()})},e.prototype._addResourcesSpans=function(r){var n=this,i,o,a=(o=(i=wr).getEntriesByType)===null||o===void 0?void 0:o.call(i,"resource");a&&a.forEach(function(u){n._initResourceSpan(u,r)})},e.prototype._collectPerformance=function(){var r=this,n=Array.from(document.getElementsByTagName("meta")).find(function(a){return a.getAttribute("name")===Hd}),i=dm(),o=n&&n.content||"";N.with(Q.extract(kt,{traceparent:o}),function(){var a,u=r._startSpan(Ge.DOCUMENT_LOAD,S.FETCH_START,i);u&&(N.with(x.setSpan(N.active(),u),function(){var c=r._startSpan(Ge.DOCUMENT_FETCH,S.FETCH_START,i);c&&(c.setAttribute(He,location.href),N.with(x.setSpan(N.active(),c),function(){var s;r.getConfig().ignoreNetworkEvents||pe(c,i),r._addCustomAttributesOnSpan(c,(s=r.getConfig().applyCustomAttributesOnSpan)===null||s===void 0?void 0:s.documentFetch),r._endSpan(c,S.RESPONSE_END,i)}))}),u.setAttribute(He,location.href),u.setAttribute(hm,navigator.userAgent),r._addResourcesSpans(u),r.getConfig().ignoreNetworkEvents||(V(u,S.FETCH_START,i),V(u,S.UNLOAD_EVENT_START,i),V(u,S.UNLOAD_EVENT_END,i),V(u,S.DOM_INTERACTIVE,i),V(u,S.DOM_CONTENT_LOADED_EVENT_START,i),V(u,S.DOM_CONTENT_LOADED_EVENT_END,i),V(u,S.DOM_COMPLETE,i),V(u,S.LOAD_EVENT_START,i),V(u,S.LOAD_EVENT_END,i)),r.getConfig().ignorePerformancePaintEvents||vm(u),r._addCustomAttributesOnSpan(u,(a=r.getConfig().applyCustomAttributesOnSpan)===null||a===void 0?void 0:a.documentLoad),r._endSpan(u,S.LOAD_EVENT_END,i))})},e.prototype._endSpan=function(r,n,i){r&&(Rt(i,n)?r.end(i[n]):r.end())},e.prototype._initResourceSpan=function(r,n){var i,o=this._startSpan(Ge.RESOURCE_FETCH,S.FETCH_START,r,n);o&&(o.setAttribute(He,r.name),this.getConfig().ignoreNetworkEvents||pe(o,r),this._addCustomAttributesOnResourceSpan(o,r,(i=this.getConfig().applyCustomAttributesOnSpan)===null||i===void 0?void 0:i.resourceFetch),this._endSpan(o,S.RESPONSE_END,r))},e.prototype._startSpan=function(r,n,i,o){if(Rt(i,n)&&typeof i[n]=="number"){var a=this.tracer.startSpan(r,{startTime:i[n]},o?x.setSpan(N.active(),o):void 0);return a}},e.prototype._waitForPageLoad=function(){window.document.readyState==="complete"?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded))},e.prototype._addCustomAttributesOnSpan=function(r,n){var i=this;n&&Ts(function(){return n(r)},function(o){o&&i._diag.error("addCustomAttributesOnSpan",o)})},e.prototype._addCustomAttributesOnResourceSpan=function(r,n,i){var o=this;i&&Ts(function(){return i(r,n)},function(a){a&&o._diag.error("addCustomAttributesOnResourceSpan",a)})},e.prototype.enable=function(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()},e.prototype.disable=function(){window.removeEventListener("load",this._onDocumentLoaded)},e}(um),wi=function(){return wi=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},wi.apply(this,arguments)},_m=function(){function t(e,r,n){this.instrumentationName=e,this.instrumentationVersion=r,this._config={},this._wrap=X.wrap,this._unwrap=X.unwrap,this._massWrap=X.massWrap,this._massUnwrap=X.massUnwrap,this.setConfig(n),this._diag=T.createComponentLogger({namespace:e}),this._tracer=x.getTracer(e,r),this._meter=ie.getMeter(e,r),this._logger=De.getLogger(e,r),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,r=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(r)?r:[r]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(e){this._config=wi({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(e,r,n,i){if(e)try{e(n,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},o)}},t}(),gm=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Em=function(t){gm(e,t);function e(r,n,i){var o=t.call(this,r,n,i)||this;return o._config.enabled&&o.enable(),o}return e}(_m);function Tm(t,e,r){var n,i;try{i=t()}catch(o){n=o}finally{return e(n,i),i}}function bm(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var Ai=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Li=performance,Om="http.method",Sm="http.url",wm="http.host",Am="http.scheme",Lm="http.status_code",Rm="http.user_agent",Nm="http.request_content_length_uncompressed",Cm=Om,xm=Sm,Pm=wm,Im=Am,Mm=Lm,km=Rm,Dm=Nm,Um=9,jm=6,Bm=Math.pow(10,jm),Os=Math.pow(10,Um);function Ri(t){var e=t/1e3,r=Math.trunc(e),n=Math.round(t%1e3*Bm);return[r,n]}function $m(){var t=Li.timeOrigin;if(typeof t!="number"){var e=Li;t=e.timing&&e.timing.fetchStart}return t}function Ss(t){var e=Ri($m()),r=Ri(Li.now());return Fm(e,r)}function Fm(t,e){var r=[t[0]+e[0],t[1]+e[1]];return r[1]>=Os&&(r[1]-=Os,r[0]+=1),r}var Vm=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Gm(t,e){return typeof e=="string"?t===e:!!t.match(e)}function Hm(t,e){var r,n;if(!e)return!1;try{for(var i=Vm(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(Gm(t,a))return!0}}catch(u){r={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}var Dr;(function(t){t.COMPONENT="component",t.HTTP_ERROR_NAME="http.error_name",t.HTTP_STATUS_TEXT="http.status_text"})(Dr||(Dr={}));var zm=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},Xm=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},qm=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Km=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},ws=T.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function Wm(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t[0]instanceof URL||typeof t[0]=="string"){var r=t[1];if(!(r!=null&&r.body))return Promise.resolve();if(r.body instanceof ReadableStream){var n=Ym(r.body),i=n.body,o=n.length;return r.body=i,o}else return Promise.resolve(Jm(r.body))}else{var a=t[0];return a!=null&&a.body?a.clone().text().then(function(u){return Ni(u)}):Promise.resolve()}}function Ym(t){if(!t.pipeThrough)return ws.warn("Platform has ReadableStream but not pipeThrough!"),{body:t,length:Promise.resolve(void 0)};var e=0,r,n=new Promise(function(o){r=o}),i=new TransformStream({start:function(){},transform:function(o,a){return zm(this,void 0,void 0,function(){var u;return Xm(this,function(c){switch(c.label){case 0:return[4,o];case 1:return u=c.sent(),e+=u.byteLength,a.enqueue(o),[2]}})})},flush:function(){r(e)}});return{body:t.pipeThrough(i),length:n}}function Jm(t){if(typeof Document<"u"&&t instanceof Document)return new XMLSerializer().serializeToString(document).length;if(t instanceof Blob)return t.size;if(t.byteLength!==void 0)return t.byteLength;if(t instanceof FormData)return Zm(t);if(t instanceof URLSearchParams)return Ni(t.toString());if(typeof t=="string")return Ni(t);ws.warn("unknown body type")}var Qm=new TextEncoder;function Ni(t){return Qm.encode(t).byteLength}function Zm(t){var e,r,n=0;try{for(var i=qm(t.entries()),o=i.next();!o.done;o=i.next()){var a=Km(o.value,2),u=a[0],c=a[1];n+=u.length,c instanceof Blob?n+=c.size:n+=c.length}}catch(s){e={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n}var As="0.57.2",t_=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),e_=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},r_=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},Ci,n_=300,Ls=typeof process=="object"&&((Ci=process.release)===null||Ci===void 0?void 0:Ci.name)==="node",i_=function(t){t_(e,t);function e(r){r===void 0&&(r={});var n=t.call(this,"@opentelemetry/instrumentation-fetch",As,r)||this;return n.component="fetch",n.version=As,n.moduleName=n.component,n._usedResources=new WeakSet,n._tasksCount=0,n}return e.prototype.init=function(){},e.prototype._addChildSpan=function(r,n){var i=this.tracer.startSpan("CORS Preflight",{startTime:n[S.FETCH_START]},x.setSpan(N.active(),r));pe(i,n,this.getConfig().ignoreNetworkEvents),i.end(n[S.RESPONSE_END])},e.prototype._addFinalSpanAttributes=function(r,n){var i=mt(n.url);r.setAttribute(Mm,n.status),n.statusText!=null&&r.setAttribute(Dr.HTTP_STATUS_TEXT,n.statusText),r.setAttribute(Pm,i.host),r.setAttribute(Im,i.protocol.replace(":","")),typeof navigator<"u"&&r.setAttribute(km,navigator.userAgent)},e.prototype._addHeaders=function(r,n){if(!Es(n,this.getConfig().propagateTraceHeaderCorsUrls)){var i={};Q.inject(N.active(),i),Object.keys(i).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}if(r instanceof Request)Q.inject(N.active(),r.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else if(r.headers instanceof Headers)Q.inject(N.active(),r.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else if(r.headers instanceof Map)Q.inject(N.active(),r.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else{var i={};Q.inject(N.active(),i),r.headers=Object.assign({},i,r.headers||{})}},e.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)},e.prototype._createSpan=function(r,n){var i;if(n===void 0&&(n={}),Hm(r,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var o=(n.method||"GET").toUpperCase(),a="HTTP "+o;return this.tracer.startSpan(a,{kind:Ie.CLIENT,attributes:(i={},i[Dr.COMPONENT]=this.moduleName,i[Cm]=o,i[xm]=r,i)})},e.prototype._findResourceAndAddNetworkEvents=function(r,n,i){var o=n.entries;if(!o.length){if(!performance.getEntriesByType)return;o=performance.getEntriesByType("resource")}var a=_s(n.spanUrl,n.startTime,i,o,this._usedResources,"fetch");if(a.mainRequest){var u=a.mainRequest;this._markResourceAsUsed(u);var c=a.corsPreFlightRequest;c&&(this._addChildSpan(r,c),this._markResourceAsUsed(c)),pe(r,u,this.getConfig().ignoreNetworkEvents)}},e.prototype._markResourceAsUsed=function(r){this._usedResources.add(r)},e.prototype._endSpan=function(r,n,i){var o=this,a=Ri(Date.now()),u=Ss();this._addFinalSpanAttributes(r,i),setTimeout(function(){var c;(c=n.observer)===null||c===void 0||c.disconnect(),o._findResourceAndAddNetworkEvents(r,n,u),o._tasksCount--,o._clearResources(),r.end(a)},n_)},e.prototype._patchConstructor=function(){var r=this;return function(n){var i=r;return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=this,c=mt(o[0]instanceof Request?o[0].url:String(o[0])).href,s=o[0]instanceof Request?o[0]:o[1]||{},l=i._createSpan(c,s);if(!l)return n.apply(this,o);var p=i._prepareSpanData(c);i.getConfig().measureRequestSize&&Wm.apply(void 0,r_([],e_(o),!1)).then(function(_){_&&l.setAttribute(Dm,_)}).catch(function(_){i._diag.warn("getFetchBodyLength",_)});function f(_,E){i._applyAttributesAfterFetch(_,s,E),i._endSpan(_,p,{status:E.status||0,statusText:E.message,url:c})}function y(_,E){i._applyAttributesAfterFetch(_,s,E),E.status>=200&&E.status<400?i._endSpan(_,p,E):i._endSpan(_,p,{status:E.status,statusText:E.statusText,url:c})}function v(_,E,R){try{var U=R.clone(),D=R.clone(),G=U.body;if(G){var j=G.getReader(),H=function(){j.read().then(function(B){var Et=B.done;Et?y(_,D):H()},function(B){f(_,B)})};H()}else y(_,R)}finally{E(R)}}function m(_,E,R){try{f(_,R)}finally{E(R)}}return new Promise(function(_,E){return N.with(x.setSpan(N.active(),l),function(){return i._addHeaders(s,c),i._tasksCount++,n.apply(u,s instanceof Request?[s]:[c,s]).then(v.bind(u,l,_),m.bind(u,l,E))})})}}},e.prototype._applyAttributesAfterFetch=function(r,n,i){var o=this,a=this.getConfig().applyCustomAttributesOnSpan;a&&Tm(function(){return a(r,n,i)},function(u){u&&o._diag.error("applyCustomAttributesOnSpan",u)})},e.prototype._prepareSpanData=function(r){var n=Ss(),i=[];if(typeof PerformanceObserver!="function")return{entries:i,startTime:n,spanUrl:r};var o=new PerformanceObserver(function(a){var u=a.getEntries();u.forEach(function(c){c.initiatorType==="fetch"&&c.name===r&&i.push(c)})});return o.observe({entryTypes:["resource"]}),{entries:i,observer:o,startTime:n,spanUrl:r}},e.prototype.enable=function(){if(Ls){this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}bm(fetch)&&(this._unwrap(Ai,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(Ai,"fetch",this._patchConstructor())},e.prototype.disable=function(){Ls||(this._unwrap(Ai,"fetch"),this._usedResources=new WeakSet)},e}(Em),xi=function(){return xi=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},xi.apply(this,arguments)},o_=function(){function t(e,r,n){this.instrumentationName=e,this.instrumentationVersion=r,this._config={},this._wrap=X.wrap,this._unwrap=X.unwrap,this._massWrap=X.massWrap,this._massUnwrap=X.massUnwrap,this.setConfig(n),this._diag=T.createComponentLogger({namespace:e}),this._tracer=x.getTracer(e,r),this._meter=ie.getMeter(e,r),this._logger=De.getLogger(e,r),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,r=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(r)?r:[r]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(e){this._config=xi({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(e,r,n,i){if(e)try{e(n,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},o)}},t}(),a_=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),s_=function(t){a_(e,t);function e(r,n,i){var o=t.call(this,r,n,i)||this;return o._config.enabled&&o.enable(),o}return e}(o_);function u_(t,e,r){var n,i;try{i=t()}catch(o){n=o}finally{return e(n,i),i}}function Rs(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var ze=performance,c_="http.method",l_="http.url",p_="http.host",f_="http.scheme",h_="http.status_code",d_="http.user_agent",v_="http.request_content_length_uncompressed",y_=c_,m_=l_,__=p_,g_=f_,E_=h_,T_=d_,b_=v_,O_=9,S_=6,w_=Math.pow(10,S_),Ns=Math.pow(10,O_);function Cs(t){var e=t/1e3,r=Math.trunc(e),n=Math.round(t%1e3*w_);return[r,n]}function A_(){var t=ze.timeOrigin;if(typeof t!="number"){var e=ze;t=e.timing&&e.timing.fetchStart}return t}function xs(t){var e=Cs(A_()),r=Cs(ze.now());return L_(e,r)}function L_(t,e){var r=[t[0]+e[0],t[1]+e[1]];return r[1]>=Ns&&(r[1]-=Ns,r[0]+=1),r}var R_=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function N_(t,e){return typeof e=="string"?t===e:!!t.match(e)}function C_(t,e){var r,n;if(!e)return!1;try{for(var i=R_(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(N_(t,a))return!0}}catch(u){r={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}var _t;(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"})(_t||(_t={}));var x_=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},P_=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},I_=T.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function M_(t){if(typeof Document<"u"&&t instanceof Document)return new XMLSerializer().serializeToString(document).length;if(t instanceof Blob)return t.size;if(t.byteLength!==void 0)return t.byteLength;if(t instanceof FormData)return D_(t);if(t instanceof URLSearchParams)return Ps(t.toString());if(typeof t=="string")return Ps(t);I_.warn("unknown body type")}var k_=new TextEncoder;function Ps(t){return k_.encode(t).byteLength}function D_(t){var e,r,n=0;try{for(var i=x_(t.entries()),o=i.next();!o.done;o=i.next()){var a=P_(o.value,2),u=a[0],c=a[1];n+=u.length,c instanceof Blob?n+=c.size:n+=c.length}}catch(s){e={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n}var Is="0.57.2",Pi;(function(t){t.HTTP_STATUS_TEXT="http.status_text"})(Pi||(Pi={}));var U_=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),j_=300,B_=function(t){U_(e,t);function e(r){r===void 0&&(r={});var n=t.call(this,"@opentelemetry/instrumentation-xml-http-request",Is,r)||this;return n.component="xml-http-request",n.version=Is,n.moduleName=n.component,n._tasksCount=0,n._xhrMem=new WeakMap,n._usedResources=new WeakSet,n}return e.prototype.init=function(){},e.prototype._addHeaders=function(r,n){var i=mt(n).href;if(!Es(i,this.getConfig().propagateTraceHeaderCorsUrls)){var o={};Q.inject(N.active(),o),Object.keys(o).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}var a={};Q.inject(N.active(),a),Object.keys(a).forEach(function(u){r.setRequestHeader(u,String(a[u]))})},e.prototype._addChildSpan=function(r,n){var i=this;N.with(x.setSpan(N.active(),r),function(){var o=i.tracer.startSpan("CORS Preflight",{startTime:n[S.FETCH_START]});pe(o,n,i.getConfig().ignoreNetworkEvents),o.end(n[S.RESPONSE_END])})},e.prototype._addFinalSpanAttributes=function(r,n,i){if(typeof i=="string"){var o=mt(i);n.status!==void 0&&r.setAttribute(E_,n.status),n.statusText!==void 0&&r.setAttribute(Pi.HTTP_STATUS_TEXT,n.statusText),r.setAttribute(__,o.host),r.setAttribute(g_,o.protocol.replace(":","")),r.setAttribute(T_,navigator.userAgent)}},e.prototype._applyAttributesAfterXHR=function(r,n){var i=this,o=this.getConfig().applyCustomAttributesOnSpan;typeof o=="function"&&u_(function(){return o(r,n)},function(a){a&&i._diag.error("applyCustomAttributesOnSpan",a)})},e.prototype._addResourceObserver=function(r,n){var i=this._xhrMem.get(r);!i||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(i.createdResources={observer:new PerformanceObserver(function(o){var a=o.getEntries(),u=mt(n);a.forEach(function(c){c.initiatorType==="xmlhttprequest"&&c.name===u.href&&i.createdResources&&i.createdResources.entries.push(c)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))},e.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(ze.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},e.prototype._findResourceAndAddNetworkEvents=function(r,n,i,o,a){if(!(!i||!o||!a||!r.createdResources)){var u=r.createdResources.entries;(!u||!u.length)&&(u=ze.getEntriesByType("resource"));var c=_s(mt(i).href,o,a,u,this._usedResources);if(c.mainRequest){var s=c.mainRequest;this._markResourceAsUsed(s);var l=c.corsPreFlightRequest;l&&(this._addChildSpan(n,l),this._markResourceAsUsed(l)),pe(n,s,this.getConfig().ignoreNetworkEvents)}}},e.prototype._cleanPreviousSpanInformation=function(r){var n=this._xhrMem.get(r);if(n){var i=n.callbackToRemoveEvents;i&&i(),this._xhrMem.delete(r)}},e.prototype._createSpan=function(r,n,i){var o;if(C_(n,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var a=i.toUpperCase(),u=this.tracer.startSpan(a,{kind:Ie.CLIENT,attributes:(o={},o[y_]=i,o[m_]=mt(n).toString(),o)});return u.addEvent(_t.METHOD_OPEN),this._cleanPreviousSpanInformation(r),this._xhrMem.set(r,{span:u,spanUrl:n}),u},e.prototype._markResourceAsUsed=function(r){this._usedResources.add(r)},e.prototype._patchOpen=function(){var r=this;return function(n){var i=r;return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=o[0],c=o[1];return i._createSpan(this,c,u),n.apply(this,o)}}},e.prototype._patchSend=function(){var r=this;function n(l,p,f,y){var v=p.callbackToRemoveEvents;typeof v=="function"&&v();var m=p.span,_=p.spanUrl,E=p.sendStartTime;m&&(r._findResourceAndAddNetworkEvents(p,m,_,E,f),m.addEvent(l,y),r._addFinalSpanAttributes(m,p,_),m.end(y),r._tasksCount--),r._clearResources()}function i(l,p){var f=r._xhrMem.get(p);if(f){f.status=p.status,f.statusText=p.statusText,r._xhrMem.delete(p),f.span&&r._applyAttributesAfterXHR(f.span,p);var y=xs(),v=Date.now();setTimeout(function(){n(l,f,y,v)},j_)}}function o(){i(_t.EVENT_ERROR,this)}function a(){i(_t.EVENT_ABORT,this)}function u(){i(_t.EVENT_TIMEOUT,this)}function c(){this.status<299?i(_t.EVENT_LOAD,this):i(_t.EVENT_ERROR,this)}function s(l){l.removeEventListener("abort",a),l.removeEventListener("error",o),l.removeEventListener("load",c),l.removeEventListener("timeout",u);var p=r._xhrMem.get(l);p&&(p.callbackToRemoveEvents=void 0)}return function(l){return function(){for(var p=this,f=[],y=0;y<arguments.length;y++)f[y]=arguments[y];var v=r._xhrMem.get(this);if(!v)return l.apply(this,f);var m=v.span,_=v.spanUrl;if(m&&_){if(r.getConfig().measureRequestSize&&f!=null&&f[0]){var E=f[0],R=M_(E);R!==void 0&&m.setAttribute(b_,R)}N.with(x.setSpan(N.active(),m),function(){r._tasksCount++,v.sendStartTime=xs(),m.addEvent(_t.METHOD_SEND),p.addEventListener("abort",a),p.addEventListener("error",o),p.addEventListener("load",c),p.addEventListener("timeout",u),v.callbackToRemoveEvents=function(){s(p),v.createdResources&&v.createdResources.observer.disconnect()},r._addHeaders(p,_),r._addResourceObserver(p,_)})}return l.apply(this,f)}}},e.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),Rs(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),Rs(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}(s_);const Ms=(t,e,r)=>{var n,i;const o=P({},e);return r?((n=Object.keys(o))==null||n.forEach(a=>{[...r].includes(a?.toLowerCase())||(o[a]="[REDACTED]")}),o):((i=Object.keys(o))==null||i.forEach(a=>{[...$_,...t].includes(a?.toLowerCase())&&(o[a]="[REDACTED]")}),o)},$_=["authorization","cookie","proxy-authorization","token"],F_=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com"],V_=["awsaccesskeyid","signature","sig","x-goog-signature"],ks=t=>{var e,r;try{return new URL(t)}catch{return new URL(t,(r=(e=globalThis.location)==null?void 0:e.origin)!=null?r:"http://example.com")}},Ds=t=>{try{const e=ks(t);(e.username||e.password)&&(e.username="REDACTED",e.password="REDACTED");const r=e.searchParams;if(V_.forEach(n=>{for(const i of Array.from(r.keys()))i.toLowerCase()===n&&r.set(i,"REDACTED")}),!t.includes("://")&&!t.startsWith("//"))return e.pathname+e.search+e.hash;if(t.startsWith("//")){let n="//";return(e.username||e.password)&&(n+=e.username+":"+e.password+"@"),n+=e.host+e.pathname+e.search+e.hash,n}return e.toString()}catch{return t}},G_=new RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),H_=new RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?");function z_(t){return!!(t.includes("/sdk/evalx")&&t.match(G_)||t.includes("/eval/")&&t.match(H_))}const X_=t=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(e=>t.toLocaleLowerCase().includes(e)),q_=t=>z_(t),K_=(t,e)=>e.some(r=>t.toLocaleLowerCase().includes(r)),W_=(t,e,r)=>!K_(t,e)&&!q_(t)&&!X_(t),Y_=(t,e,r)=>{var n;if(r.some(a=>t.toLowerCase().includes(a)))return!1;let i=[];e===!0?(i=["localhost",/^\//],(n=window?.location)!=null&&n.host&&i.push(window.location.host)):e instanceof Array&&(i=e);let o=!1;return i.forEach(a=>{t.match(a)&&(o=!0)}),o},Us=64*1024,J_={"application/json":64*1024*1024,"text/plain":64*1024*1024},Ii=(t,e,r,n)=>{var i,o,a;let u=Us;if(n){let c="";typeof n.get=="function"?c=(i=n.get("content-type"))!=null?i:"":c=(o=n["content-type"])!=null?o:"";try{c=c.split(";")[0]}catch{}u=(a=J_[c])!=null?a:Us}if(t){if(e)try{const c=JSON.parse(t);Array.isArray(c)?c.forEach(s=>{Object.keys(s).forEach(l=>{e.includes(l.toLocaleLowerCase())&&(s[l]="[REDACTED]")})}):Object.keys(c).forEach(s=>{e.includes(s.toLocaleLowerCase())&&(c[s]="[REDACTED]")}),t=JSON.stringify(c)}catch{}if(r)try{const c=JSON.parse(t);Object.keys(c).forEach(s=>{r.includes(s.toLocaleLowerCase())||(c[s]="[REDACTED]")}),t=JSON.stringify(c)}catch{}}try{t=t.slice(0,u)}catch{}return t},Q_=(t,e,r)=>yt(void 0,null,function*(){let n;try{const i=t.clone().body;if(i){let o=i.getReader(),a=new TextDecoder,u,c="";for(;!(u=yield o.read()).done;){let s=u.value;c+=a.decode(s)}n=c,n=Ii(n,r,e,t.headers)}else n=""}catch(i){n=`Unable to clone response: ${i}`}return n});var js=function(){function t(e){this._delegate=e}return t.prototype.export=function(e,r){this._delegate.export(e,r)},t.prototype.forceFlush=function(){return this._delegate.forceFlush()},t.prototype.shutdown=function(){return this._delegate.shutdown()},t}(),Z_=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Bs=function(t){Z_(e,t);function e(r,n,i){var o=t.call(this,r)||this;return o.name="OTLPExporterError",o.data=i,o.code=n,o}return e}(Error);function tg(t){if(!Number.isNaN(t)&&Number.isFinite(t)&&t>0)return t;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+t+"')")}function eg(t){if(t!=null)return function(){return t}}function rg(t,e,r){var n,i,o,a,u,c;return{timeoutMillis:tg((i=(n=t.timeoutMillis)!==null&&n!==void 0?n:e.timeoutMillis)!==null&&i!==void 0?i:r.timeoutMillis),concurrencyLimit:(a=(o=t.concurrencyLimit)!==null&&o!==void 0?o:e.concurrencyLimit)!==null&&a!==void 0?a:r.concurrencyLimit,compression:(c=(u=t.compression)!==null&&u!==void 0?u:e.compression)!==null&&c!==void 0?c:r.compression}}function ng(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var ig=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},og=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},ag=function(){function t(e){this._sendingPromises=[],this._concurrencyLimit=e}return t.prototype.pushPromise=function(e){var r=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(e);var n=function(){var i=r._sendingPromises.indexOf(e);r._sendingPromises.splice(i,1)};e.then(n,n)},t.prototype.hasReachedLimit=function(){return this._sendingPromises.length>=this._concurrencyLimit},t.prototype.awaitAll=function(){return ig(this,void 0,void 0,function(){return og(this,function(e){switch(e.label){case 0:return[4,Promise.all(this._sendingPromises)];case 1:return e.sent(),[2]}})})},t}();function sg(t){return new ag(t.concurrencyLimit)}function ug(t){return Object.prototype.hasOwnProperty.call(t,"partialSuccess")}function cg(){return{handleResponse:function(t){t==null||!ug(t)||t.partialSuccess==null||Object.keys(t.partialSuccess).length===0||T.warn("Received Partial Success response:",JSON.stringify(t.partialSuccess))}}}var lg=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},pg=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},fg=function(){function t(e,r,n,i,o){this._transport=e,this._serializer=r,this._responseHandler=n,this._promiseQueue=i,this._timeout=o,this._diagLogger=T.createComponentLogger({namespace:"OTLPExportDelegate"})}return t.prototype.export=function(e,r){var n=this;if(this._diagLogger.debug("items to be sent",e),this._promiseQueue.hasReachedLimit()){r({code:Z.FAILED,error:new Error("Concurrent export limit reached")});return}var i=this._serializer.serializeRequest(e);if(i==null){r({code:Z.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(i,this._timeout).then(function(o){if(o.status==="success"){if(o.data!=null)try{n._responseHandler.handleResponse(n._serializer.deserializeResponse(o.data))}catch(a){n._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",a,o.data)}r({code:Z.SUCCESS});return}else if(o.status==="failure"&&o.error){r({code:Z.FAILED,error:o.error});return}else o.status==="retryable"?r({code:Z.FAILED,error:new Bs("Export failed with retryable status")}):r({code:Z.FAILED,error:new Bs("Export failed with unknown error")})},function(o){return r({code:Z.FAILED,error:o})}))},t.prototype.forceFlush=function(){return this._promiseQueue.awaitAll()},t.prototype.shutdown=function(){return lg(this,void 0,void 0,function(){return pg(this,function(e){switch(e.label){case 0:return this._diagLogger.debug("shutdown started"),[4,this.forceFlush()];case 1:return e.sent(),this._transport.shutdown(),[2]}})})},t}();function hg(t,e){return new fg(t.transport,t.serializer,cg(),t.promiseHandler,e.timeout)}function $s(t,e,r){return hg({transport:r,serializer:e,promiseHandler:sg(t)},{timeout:t.timeoutMillis})}function Fs(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function Mi(t){for(var e=new Uint8Array(t.length/2),r=0,n=0;n<t.length;n+=2){var i=Fs(t.charCodeAt(n)),o=Fs(t.charCodeAt(n+1));e[r++]=i<<4|o}return e}var dg=9,vg=Math.pow(10,dg);function yg(t){return t[0]*vg+t[1]}function Vs(t){var e=BigInt(1e9);return BigInt(t[0])*e+BigInt(t[1])}function mg(t){var e=Number(BigInt.asUintN(32,t)),r=Number(BigInt.asUintN(32,t>>BigInt(32)));return{low:e,high:r}}function Gs(t){var e=Vs(t);return mg(e)}function _g(t){var e=Vs(t);return e.toString()}var gg=typeof BigInt<"u"?_g:yg;function Hs(t){return t}function zs(t){if(t!==void 0)return Mi(t)}var Eg={encodeHrTime:Gs,encodeSpanContext:Mi,encodeOptionalSpanContext:zs};function Xs(t){var e,r;if(t===void 0)return Eg;var n=(e=t.useLongBits)!==null&&e!==void 0?e:!0,i=(r=t.useHex)!==null&&r!==void 0?r:!1;return{encodeHrTime:n?Gs:gg,encodeSpanContext:i?Hs:Mi,encodeOptionalSpanContext:i?Hs:zs}}var Tg=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};function qs(t){return{attributes:$t(t.attributes),droppedAttributesCount:0}}function Ks(t){return{name:t.name,version:t.version}}function $t(t){return Object.keys(t).map(function(e){return Ws(e,t[e])})}function Ws(t,e){return{key:t,value:Ys(e)}}function Ys(t){var e=typeof t;return e==="string"?{stringValue:t}:e==="number"?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:e==="boolean"?{boolValue:t}:t instanceof Uint8Array?{bytesValue:t}:Array.isArray(t)?{arrayValue:{values:t.map(Ys)}}:e==="object"&&t!=null?{kvlistValue:{values:Object.entries(t).map(function(r){var n=Tg(r,2),i=n[0],o=n[1];return Ws(i,o)})}}:{}}var ct;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE"})(ct||(ct={}));var ht;(function(t){t[t.HISTOGRAM=0]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",t[t.GAUGE=2]="GAUGE",t[t.SUM=3]="SUM"})(ht||(ht={}));var bg=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Js=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},Qs=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Og=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Sg=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},wg=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Ag(t){return t!=null}function Zs(t){var e=Object.keys(t);return e.length===0?"":(e=e.sort(),JSON.stringify(e.map(function(r){return[r,t[r]]})))}function Lg(t){var e,r;return t.name+":"+((e=t.version)!==null&&e!==void 0?e:"")+":"+((r=t.schemaUrl)!==null&&r!==void 0?r:"")}var tu=function(t){bg(e,t);function e(r){var n=t.call(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return e}(Error);function Xe(t,e){var r,n=new Promise(function(i,o){r=setTimeout(function(){o(new tu("Operation timed out."))},e)});return Promise.race([t,n]).then(function(i){return clearTimeout(r),i},function(i){throw clearTimeout(r),i})}function Rg(t){return Js(this,void 0,void 0,function(){var e=this;return Qs(this,function(r){return[2,Promise.all(t.map(function(n){return Js(e,void 0,void 0,function(){var i,o;return Qs(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,n];case 1:return i=a.sent(),[2,{status:"fulfilled",value:i}];case 2:return o=a.sent(),[2,{status:"rejected",reason:o}];case 3:return[2]}})})}))]})})}function Ng(t){return t.status==="rejected"}function eu(t,e){var r=[];return t.forEach(function(n){r.push.apply(r,Sg([],Og(e(n)),!1))}),r}function Cg(t,e){var r,n;if(t.size!==e.size)return!1;try{for(var i=wg(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(!e.has(a))return!1}}catch(u){r={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!0}function xg(t,e){for(var r=0,n=t.length-1,i=t.length;n>=r;){var o=r+Math.trunc((n-r)/2);t[o]<e?r=o+1:(i=o,n=o-1)}return i}function Pg(t,e){return t.toLowerCase()===e.toLowerCase()}var Ft;(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"})(Ft||(Ft={}));var Ig=function(){function t(){this.kind=Ft.DROP}return t.prototype.createAccumulation=function(){},t.prototype.merge=function(e,r){},t.prototype.diff=function(e,r){},t.prototype.toMetricData=function(e,r,n,i){},t}(),w;(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"})(w||(w={}));function Nt(t,e,r){var n,i,o,a;return Ug(t)||T.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:(n=r?.description)!==null&&n!==void 0?n:"",unit:(i=r?.unit)!==null&&i!==void 0?i:"",valueType:(o=r?.valueType)!==null&&o!==void 0?o:St.DOUBLE,advice:(a=r?.advice)!==null&&a!==void 0?a:{}}}function Mg(t,e){var r,n;return{name:(r=t.name)!==null&&r!==void 0?r:e.name,description:(n=t.description)!==null&&n!==void 0?n:e.description,type:e.type,unit:e.unit,valueType:e.valueType,advice:e.advice}}function kg(t,e){return Pg(t.name,e.name)&&t.unit===e.unit&&t.type===e.type&&t.valueType===e.valueType}var Dg=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Ug(t){return t.match(Dg)!=null}var jg=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};function Bg(t){var e=t.map(function(){return 0});return e.push(0),{buckets:{boundaries:t,counts:e},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var ki=function(){function t(e,r,n,i){n===void 0&&(n=!0),i===void 0&&(i=Bg(r)),this.startTime=e,this._boundaries=r,this._recordMinMax=n,this._current=i}return t.prototype.record=function(e){if(!Number.isNaN(e)){this._current.count+=1,this._current.sum+=e,this._recordMinMax&&(this._current.min=Math.min(e,this._current.min),this._current.max=Math.max(e,this._current.max),this._current.hasMinMax=!0);var r=xg(this._boundaries,e);this._current.buckets.counts[r]+=1}},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this._current},t}(),ru=function(){function t(e,r){this._boundaries=e,this._recordMinMax=r,this.kind=Ft.HISTOGRAM}return t.prototype.createAccumulation=function(e){return new ki(e,this._boundaries,this._recordMinMax)},t.prototype.merge=function(e,r){for(var n=e.toPointValue(),i=r.toPointValue(),o=n.buckets.counts,a=i.buckets.counts,u=new Array(o.length),c=0;c<o.length;c++)u[c]=o[c]+a[c];var s=1/0,l=-1/0;return this._recordMinMax&&(n.hasMinMax&&i.hasMinMax?(s=Math.min(n.min,i.min),l=Math.max(n.max,i.max)):n.hasMinMax?(s=n.min,l=n.max):i.hasMinMax&&(s=i.min,l=i.max)),new ki(e.startTime,n.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:n.buckets.boundaries,counts:u},count:n.count+i.count,sum:n.sum+i.sum,hasMinMax:this._recordMinMax&&(n.hasMinMax||i.hasMinMax),min:s,max:l})},t.prototype.diff=function(e,r){for(var n=e.toPointValue(),i=r.toPointValue(),o=n.buckets.counts,a=i.buckets.counts,u=new Array(o.length),c=0;c<o.length;c++)u[c]=a[c]-o[c];return new ki(r.startTime,n.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:n.buckets.boundaries,counts:u},count:i.count-n.count,sum:i.sum-n.sum,hasMinMax:!1,min:1/0,max:-1/0})},t.prototype.toMetricData=function(e,r,n,i){return{descriptor:e,aggregationTemporality:r,dataPointType:ht.HISTOGRAM,dataPoints:n.map(function(o){var a=jg(o,2),u=a[0],c=a[1],s=c.toPointValue(),l=e.type===w.GAUGE||e.type===w.UP_DOWN_COUNTER||e.type===w.OBSERVABLE_GAUGE||e.type===w.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:u,startTime:c.startTime,endTime:i,value:{min:s.hasMinMax?s.min:void 0,max:s.hasMinMax?s.max:void 0,sum:l?void 0:s.sum,buckets:s.buckets,count:s.count}}})}},t}(),Di=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Ui=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},nu=function(){function t(e,r,n,i){e===void 0&&(e=new $g),r===void 0&&(r=0),n===void 0&&(n=0),i===void 0&&(i=0),this.backing=e,this.indexBase=r,this.indexStart=n,this.indexEnd=i}return Object.defineProperty(t.prototype,"offset",{get:function(){return this.indexStart},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.backing.length===0||this.indexEnd===this.indexStart&&this.at(0)===0?0:this.indexEnd-this.indexStart+1},enumerable:!1,configurable:!0}),t.prototype.counts=function(){var e=this;return Array.from({length:this.length},function(r,n){return e.at(n)})},t.prototype.at=function(e){var r=this.indexBase-this.indexStart;return e<r&&(e+=this.backing.length),e-=r,this.backing.countAt(e)},t.prototype.incrementBucket=function(e,r){this.backing.increment(e,r)},t.prototype.decrementBucket=function(e,r){this.backing.decrement(e,r)},t.prototype.trim=function(){for(var e=0;e<this.length;e++)if(this.at(e)!==0){this.indexStart+=e;break}else if(e===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(var e=this.length-1;e>=0;e--)if(this.at(e)!==0){this.indexEnd-=this.length-e-1;break}this._rotate()},t.prototype.downscale=function(e){this._rotate();for(var r=1+this.indexEnd-this.indexStart,n=1<<e,i=0,o=0,a=this.indexStart;a<=this.indexEnd;){var u=a%n;u<0&&(u+=n);for(var c=u;c<n&&i<r;c++)this._relocateBucket(o,i),i++,a++;o++}this.indexStart>>=e,this.indexEnd>>=e,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 e=this.indexBase-this.indexStart;e!==0&&(e>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,e),this.backing.reverse(e,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+e)),this.indexBase=this.indexStart)},t.prototype._relocateBucket=function(e,r){e!==r&&this.incrementBucket(e,this.backing.emptyBucket(r))},t}(),$g=function(){function t(e){e===void 0&&(e=[0]),this._counts=e}return Object.defineProperty(t.prototype,"length",{get:function(){return this._counts.length},enumerable:!1,configurable:!0}),t.prototype.countAt=function(e){return this._counts[e]},t.prototype.growTo=function(e,r,n){var i=new Array(e).fill(0);i.splice.apply(i,Ui([n,this._counts.length-r],Di(this._counts.slice(r)),!1)),i.splice.apply(i,Ui([0,r],Di(this._counts.slice(0,r)),!1)),this._counts=i},t.prototype.reverse=function(e,r){for(var n=Math.floor((e+r)/2)-e,i=0;i<n;i++){var o=this._counts[e+i];this._counts[e+i]=this._counts[r-i-1],this._counts[r-i-1]=o}},t.prototype.emptyBucket=function(e){var r=this._counts[e];return this._counts[e]=0,r},t.prototype.increment=function(e,r){this._counts[e]+=r},t.prototype.decrement=function(e,r){this._counts[e]>=r?this._counts[e]-=r:this._counts[e]=0},t.prototype.clone=function(){return new t(Ui([],Di(this._counts),!1))},t}(),Fg=52,Vg=2146435072,Gg=1048575,ji=1023,iu=-ji+1,ou=ji,Bi=Math.pow(2,-1022);function au(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var r=e.getUint32(0),n=(r&Vg)>>20;return n-ji}function su(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var r=e.getUint32(0),n=e.getUint32(4),i=(r&Gg)*Math.pow(2,32);return i+n}function $i(t,e){return t===0||t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY||Number.isNaN(t)?t:t*Math.pow(2,e)}function Hg(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t}var zg=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),qe=function(t){zg(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Error),Xg=function(){function t(e){this._shift=-e}return t.prototype.mapToIndex=function(e){if(e<Bi)return this._minNormalLowerBoundaryIndex();var r=au(e),n=this._rightShift(su(e)-1,Fg);return r+n>>this._shift},t.prototype.lowerBoundary=function(e){var r=this._minNormalLowerBoundaryIndex();if(e<r)throw new qe("underflow: "+e+" is < minimum lower boundary: "+r);var n=this._maxNormalLowerBoundaryIndex();if(e>n)throw new qe("overflow: "+e+" is > maximum lower boundary: "+n);return $i(1,e<<this._shift)},Object.defineProperty(t.prototype,"scale",{get:function(){return this._shift===0?0:-this._shift},enumerable:!1,configurable:!0}),t.prototype._minNormalLowerBoundaryIndex=function(){var e=iu>>this._shift;return this._shift<2&&e--,e},t.prototype._maxNormalLowerBoundaryIndex=function(){return ou>>this._shift},t.prototype._rightShift=function(e,r){return Math.floor(e*Math.pow(2,-r))},t}(),qg=function(){function t(e){this._scale=e,this._scaleFactor=$i(Math.LOG2E,e),this._inverseFactor=$i(Math.LN2,-e)}return t.prototype.mapToIndex=function(e){if(e<=Bi)return this._minNormalLowerBoundaryIndex()-1;if(su(e)===0){var r=au(e);return(r<<this._scale)-1}var n=Math.floor(Math.log(e)*this._scaleFactor),i=this._maxNormalLowerBoundaryIndex();return n>=i?i:n},t.prototype.lowerBoundary=function(e){var r=this._maxNormalLowerBoundaryIndex();if(e>=r){if(e===r)return 2*Math.exp((e-(1<<this._scale))/this._scaleFactor);throw new qe("overflow: "+e+" is > maximum lower boundary: "+r)}var n=this._minNormalLowerBoundaryIndex();if(e<=n){if(e===n)return Bi;if(e===n-1)return Math.exp((e+(1<<this._scale))/this._scaleFactor)/2;throw new qe("overflow: "+e+" is < minimum lower boundary: "+n)}return Math.exp(e*this._inverseFactor)},Object.defineProperty(t.prototype,"scale",{get:function(){return this._scale},enumerable:!1,configurable:!0}),t.prototype._minNormalLowerBoundaryIndex=function(){return iu<<this._scale},t.prototype._maxNormalLowerBoundaryIndex=function(){return(ou+1<<this._scale)-1},t}(),uu=-10,cu=20,Kg=Array.from({length:31},function(t,e){return e>10?new qg(e-10):new Xg(e-10)});function lu(t){if(t>cu||t<uu)throw new qe("expected scale >= "+uu+" && <= "+cu+", got: "+t);return Kg[t+10]}var Wg=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Ur=function(){function t(e,r){this.low=e,this.high=r}return t.combine=function(e,r){return new t(Math.min(e.low,r.low),Math.max(e.high,r.high))},t}(),Yg=20,Jg=160,Fi=2,Qg=function(){function t(e,r,n,i,o,a,u,c,s,l,p){e===void 0&&(e=e),r===void 0&&(r=Jg),n===void 0&&(n=!0),i===void 0&&(i=0),o===void 0&&(o=0),a===void 0&&(a=0),u===void 0&&(u=Number.POSITIVE_INFINITY),c===void 0&&(c=Number.NEGATIVE_INFINITY),s===void 0&&(s=new nu),l===void 0&&(l=new nu),p===void 0&&(p=lu(Yg)),this.startTime=e,this._maxSize=r,this._recordMinMax=n,this._sum=i,this._count=o,this._zeroCount=a,this._min=u,this._max=c,this._positive=s,this._negative=l,this._mapping=p,this._maxSize<Fi&&(T.warn("Exponential Histogram Max Size set to "+this._maxSize+", changing to the minimum size of: "+Fi),this._maxSize=Fi)}return t.prototype.record=function(e){this.updateByIncrement(e,1)},t.prototype.setStartTime=function(e){this.startTime=e},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(e,r){if(!Number.isNaN(e)){if(e>this._max&&(this._max=e),e<this._min&&(this._min=e),this._count+=r,e===0){this._zeroCount+=r;return}this._sum+=e*r,e>0?this._updateBuckets(this._positive,e,r):this._updateBuckets(this._negative,-e,r)}},t.prototype.merge=function(e){this._count===0?(this._min=e.min,this._max=e.max):e.count!==0&&(e.min<this.min&&(this._min=e.min),e.max>this.max&&(this._max=e.max)),this.startTime=e.startTime,this._sum+=e.sum,this._count+=e.count,this._zeroCount+=e.zeroCount;var r=this._minScale(e);this._downscale(this.scale-r),this._mergeBuckets(this.positive,e,e.positive,r),this._mergeBuckets(this.negative,e,e.negative,r)},t.prototype.diff=function(e){this._min=1/0,this._max=-1/0,this._sum-=e.sum,this._count-=e.count,this._zeroCount-=e.zeroCount;var r=this._minScale(e);this._downscale(this.scale-r),this._diffBuckets(this.positive,e,e.positive,r),this._diffBuckets(this.negative,e,e.negative,r)},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(e,r,n){var i=this._mapping.mapToIndex(r),o=!1,a=0,u=0;if(e.length===0?(e.indexStart=i,e.indexEnd=e.indexStart,e.indexBase=e.indexStart):i<e.indexStart&&e.indexEnd-i>=this._maxSize?(o=!0,u=i,a=e.indexEnd):i>e.indexEnd&&i-e.indexStart>=this._maxSize&&(o=!0,u=e.indexStart,a=i),o){var c=this._changeScale(a,u);this._downscale(c),i=this._mapping.mapToIndex(r)}this._incrementIndexBy(e,i,n)},t.prototype._incrementIndexBy=function(e,r,n){if(n!==0){if(e.length===0&&(e.indexStart=e.indexEnd=e.indexBase=r),r<e.indexStart){var i=e.indexEnd-r;i>=e.backing.length&&this._grow(e,i+1),e.indexStart=r}else if(r>e.indexEnd){var i=r-e.indexStart;i>=e.backing.length&&this._grow(e,i+1),e.indexEnd=r}var o=r-e.indexBase;o<0&&(o+=e.backing.length),e.incrementBucket(o,n)}},t.prototype._grow=function(e,r){var n=e.backing.length,i=e.indexBase-e.indexStart,o=n-i,a=Hg(r);a>this._maxSize&&(a=this._maxSize);var u=a-i;e.backing.growTo(a,o,u)},t.prototype._changeScale=function(e,r){for(var n=0;e-r>=this._maxSize;)e>>=1,r>>=1,n++;return n},t.prototype._downscale=function(e){if(e!==0){if(e<0)throw new Error("impossible change of scale: "+this.scale);var r=this._mapping.scale-e;this._positive.downscale(e),this._negative.downscale(e),this._mapping=lu(r)}},t.prototype._minScale=function(e){var r=Math.min(this.scale,e.scale),n=Ur.combine(this._highLowAtScale(this.positive,this.scale,r),this._highLowAtScale(e.positive,e.scale,r)),i=Ur.combine(this._highLowAtScale(this.negative,this.scale,r),this._highLowAtScale(e.negative,e.scale,r));return Math.min(r-this._changeScale(n.high,n.low),r-this._changeScale(i.high,i.low))},t.prototype._highLowAtScale=function(e,r,n){if(e.length===0)return new Ur(0,-1);var i=r-n;return new Ur(e.indexStart>>i,e.indexEnd>>i)},t.prototype._mergeBuckets=function(e,r,n,i){for(var o=n.offset,a=r.scale-i,u=0;u<n.length;u++)this._incrementIndexBy(e,o+u>>a,n.at(u))},t.prototype._diffBuckets=function(e,r,n,i){for(var o=n.offset,a=r.scale-i,u=0;u<n.length;u++){var c=o+u>>a,s=c-e.indexBase;s<0&&(s+=e.backing.length),e.decrementBucket(s,n.at(u))}e.trim()},t}(),Zg=function(){function t(e,r){this._maxSize=e,this._recordMinMax=r,this.kind=Ft.EXPONENTIAL_HISTOGRAM}return t.prototype.createAccumulation=function(e){return new Qg(e,this._maxSize,this._recordMinMax)},t.prototype.merge=function(e,r){var n=r.clone();return n.merge(e),n},t.prototype.diff=function(e,r){var n=r.clone();return n.diff(e),n},t.prototype.toMetricData=function(e,r,n,i){return{descriptor:e,aggregationTemporality:r,dataPointType:ht.EXPONENTIAL_HISTOGRAM,dataPoints:n.map(function(o){var a=Wg(o,2),u=a[0],c=a[1],s=c.toPointValue(),l=e.type===w.GAUGE||e.type===w.UP_DOWN_COUNTER||e.type===w.OBSERVABLE_GAUGE||e.type===w.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:u,startTime:c.startTime,endTime:i,value:{min:s.hasMinMax?s.min:void 0,max:s.hasMinMax?s.max:void 0,sum:l?void 0:s.sum,positive:{offset:s.positive.offset,bucketCounts:s.positive.bucketCounts},negative:{offset:s.negative.offset,bucketCounts:s.negative.bucketCounts},count:s.count,scale:s.scale,zeroCount:s.zeroCount}}})}},t}(),tE=Ce("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function eE(t){return t.setValue(tE,!0)}function rE(){return function(t){T.error(nE(t))}}function nE(t){return typeof t=="string"?t:JSON.stringify(iE(t))}function iE(t){for(var e={},r=t;r!==null;)Object.getOwnPropertyNames(r).forEach(function(n){if(!e[n]){var i=r[n];i&&(e[n]=String(i))}}),r=Object.getPrototypeOf(r);return e}var oE=rE();function pu(t){try{oE(t)}catch{}}var aE=6,sE=Math.pow(10,aE);function Vi(t){var e=t/1e3,r=Math.trunc(e),n=Math.round(t%1e3*sE);return[r,n]}function jr(t){return t[0]*1e6+t[1]/1e3}var Gi;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(Gi||(Gi={}));function uE(t,e){return new Promise(function(r){N.with(eE(N.active()),function(){t.export(e,function(n){r(n)})})})}var cE={_export:uE},lE=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Hi=function(){function t(e,r,n){r===void 0&&(r=0),n===void 0&&(n=[0,0]),this.startTime=e,this._current=r,this.sampleTime=n}return t.prototype.record=function(e){this._current=e,this.sampleTime=Vi(Date.now())},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this._current},t}(),pE=function(){function t(){this.kind=Ft.LAST_VALUE}return t.prototype.createAccumulation=function(e){return new Hi(e)},t.prototype.merge=function(e,r){var n=jr(r.sampleTime)>=jr(e.sampleTime)?r:e;return new Hi(e.startTime,n.toPointValue(),n.sampleTime)},t.prototype.diff=function(e,r){var n=jr(r.sampleTime)>=jr(e.sampleTime)?r:e;return new Hi(r.startTime,n.toPointValue(),n.sampleTime)},t.prototype.toMetricData=function(e,r,n,i){return{descriptor:e,aggregationTemporality:r,dataPointType:ht.GAUGE,dataPoints:n.map(function(o){var a=lE(o,2),u=a[0],c=a[1];return{attributes:u,startTime:c.startTime,endTime:i,value:c.toPointValue()}})}},t}(),fE=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Ke=function(){function t(e,r,n,i){n===void 0&&(n=0),i===void 0&&(i=!1),this.startTime=e,this.monotonic=r,this._current=n,this.reset=i}return t.prototype.record=function(e){this.monotonic&&e<0||(this._current+=e)},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this._current},t}(),fu=function(){function t(e){this.monotonic=e,this.kind=Ft.SUM}return t.prototype.createAccumulation=function(e){return new Ke(e,this.monotonic)},t.prototype.merge=function(e,r){var n=e.toPointValue(),i=r.toPointValue();return r.reset?new Ke(r.startTime,this.monotonic,i,r.reset):new Ke(e.startTime,this.monotonic,n+i)},t.prototype.diff=function(e,r){var n=e.toPointValue(),i=r.toPointValue();return this.monotonic&&n>i?new Ke(r.startTime,this.monotonic,i,!0):new Ke(r.startTime,this.monotonic,i-n)},t.prototype.toMetricData=function(e,r,n,i){return{descriptor:e,aggregationTemporality:r,dataPointType:ht.SUM,dataPoints:n.map(function(o){var a=fE(o,2),u=a[0],c=a[1];return{attributes:u,startTime:c.startTime,endTime:i,value:c.toPointValue()}}),isMonotonic:this.monotonic}},t}(),Vt=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),gt=function(){function t(){}return t.Drop=function(){return hu},t.Sum=function(){return du},t.LastValue=function(){return vu},t.Histogram=function(){return yu},t.ExponentialHistogram=function(){return EE},t.Default=function(){return TE},t}(),hE=function(t){Vt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(r){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new Ig,e}(gt),dE=function(t){Vt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(r){switch(r.type){case w.COUNTER:case w.OBSERVABLE_COUNTER:case w.HISTOGRAM:return e.MONOTONIC_INSTANCE;default:return e.NON_MONOTONIC_INSTANCE}},e.MONOTONIC_INSTANCE=new fu(!0),e.NON_MONOTONIC_INSTANCE=new fu(!1),e}(gt),vE=function(t){Vt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(r){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new pE,e}(gt),yE=function(t){Vt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(r){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new ru([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),e}(gt),mE=function(t){Vt(e,t);function e(r,n){n===void 0&&(n=!0);var i=t.call(this)||this;if(i._recordMinMax=n,r==null)throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");r=r.concat(),r=r.sort(function(u,c){return u-c});var o=r.lastIndexOf(-1/0),a=r.indexOf(1/0);return a===-1&&(a=void 0),i._boundaries=r.slice(o+1,a),i}return e.prototype.createAggregator=function(r){return new ru(this._boundaries,this._recordMinMax)},e}(gt),_E=function(t){Vt(e,t);function e(r,n){r===void 0&&(r=160),n===void 0&&(n=!0);var i=t.call(this)||this;return i._maxSize=r,i._recordMinMax=n,i}return e.prototype.createAggregator=function(r){return new Zg(this._maxSize,this._recordMinMax)},e}(gt),gE=function(t){Vt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype._resolve=function(r){switch(r.type){case w.COUNTER:case w.UP_DOWN_COUNTER:case w.OBSERVABLE_COUNTER:case w.OBSERVABLE_UP_DOWN_COUNTER:return du;case w.GAUGE:case w.OBSERVABLE_GAUGE:return vu;case w.HISTOGRAM:return r.advice.explicitBucketBoundaries?new mE(r.advice.explicitBucketBoundaries):yu}return T.warn("Unable to recognize instrument type: "+r.type),hu},e.prototype.createAggregator=function(r){return this._resolve(r).createAggregator(r)},e}(gt),hu=new hE,du=new dE,vu=new vE,yu=new yE,EE=new _E,TE=new gE,bE=function(t){return gt.Default()},OE=function(t){return ct.CUMULATIVE},zi=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},Xi=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},mu=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},SE=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},wE=function(){function t(e){var r,n,i;this._shutdown=!1,this._aggregationSelector=(r=e?.aggregationSelector)!==null&&r!==void 0?r:bE,this._aggregationTemporalitySelector=(n=e?.aggregationTemporalitySelector)!==null&&n!==void 0?n:OE,this._metricProducers=(i=e?.metricProducers)!==null&&i!==void 0?i:[],this._cardinalitySelector=e?.cardinalitySelector}return t.prototype.setMetricProducer=function(e){if(this._sdkMetricProducer)throw new Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=e,this.onInitialized()},t.prototype.selectAggregation=function(e){return this._aggregationSelector(e)},t.prototype.selectAggregationTemporality=function(e){return this._aggregationTemporalitySelector(e)},t.prototype.selectCardinalityLimit=function(e){return this._cardinalitySelector?this._cardinalitySelector(e):2e3},t.prototype.onInitialized=function(){},t.prototype.collect=function(e){return zi(this,void 0,void 0,function(){var r,n,i,o,a,u;return Xi(this,function(c){switch(c.label){case 0:if(this._sdkMetricProducer===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw new Error("MetricReader is shutdown");return[4,Promise.all(SE([this._sdkMetricProducer.collect({timeoutMillis:e?.timeoutMillis})],mu(this._metricProducers.map(function(s){return s.collect({timeoutMillis:e?.timeoutMillis})})),!1))];case 1:return r=mu.apply(void 0,[c.sent()]),n=r[0],i=r.slice(1),o=n.errors.concat(eu(i,function(s){return s.errors})),a=n.resourceMetrics.resource,u=n.resourceMetrics.scopeMetrics.concat(eu(i,function(s){return s.resourceMetrics.scopeMetrics})),[2,{resourceMetrics:{resource:a,scopeMetrics:u},errors:o}]}})})},t.prototype.shutdown=function(e){return zi(this,void 0,void 0,function(){return Xi(this,function(r){switch(r.label){case 0:return this._shutdown?(T.error("Cannot call shutdown twice."),[2]):e?.timeoutMillis!=null?[3,2]:[4,this.onShutdown()];case 1:return r.sent(),[3,4];case 2:return[4,Xe(this.onShutdown(),e.timeoutMillis)];case 3:r.sent(),r.label=4;case 4:return this._shutdown=!0,[2]}})})},t.prototype.forceFlush=function(e){return zi(this,void 0,void 0,function(){return Xi(this,function(r){switch(r.label){case 0:return this._shutdown?(T.warn("Cannot forceFlush on already shutdown MetricReader."),[2]):e?.timeoutMillis!=null?[3,2]:[4,this.onForceFlush()];case 1:return r.sent(),[2];case 2:return[4,Xe(this.onForceFlush(),e.timeoutMillis)];case 3:return r.sent(),[2]}})})},t}(),AE=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Br=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},$r=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},LE=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},RE=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},NE=function(t){AE(e,t);function e(r){var n,i,o,a,u=t.call(this,{aggregationSelector:(n=r.exporter.selectAggregation)===null||n===void 0?void 0:n.bind(r.exporter),aggregationTemporalitySelector:(i=r.exporter.selectAggregationTemporality)===null||i===void 0?void 0:i.bind(r.exporter),metricProducers:r.metricProducers})||this;if(r.exportIntervalMillis!==void 0&&r.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(r.exportTimeoutMillis!==void 0&&r.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(r.exportTimeoutMillis!==void 0&&r.exportIntervalMillis!==void 0&&r.exportIntervalMillis<r.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");return u._exportInterval=(o=r.exportIntervalMillis)!==null&&o!==void 0?o:6e4,u._exportTimeout=(a=r.exportTimeoutMillis)!==null&&a!==void 0?a:3e4,u._exporter=r.exporter,u}return e.prototype._runOnce=function(){return Br(this,void 0,void 0,function(){var r;return $r(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,Xe(this._doRun(),this._exportTimeout)];case 1:return n.sent(),[3,3];case 2:return r=n.sent(),r instanceof tu?(T.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout),[2]):(pu(r),[3,3]);case 3:return[2]}})})},e.prototype._doRun=function(){var r,n;return Br(this,void 0,void 0,function(){var i,o,a,u,c,s;return $r(this,function(l){switch(l.label){case 0:return[4,this.collect({timeoutMillis:this._exportTimeout})];case 1:if(i=l.sent(),o=i.resourceMetrics,a=i.errors,a.length>0&&(s=T).error.apply(s,RE(["PeriodicExportingMetricReader: metrics collection errors"],LE(a),!1)),!o.resource.asyncAttributesPending)return[3,5];l.label=2;case 2:return l.trys.push([2,4,,5]),[4,(n=(r=o.resource).waitForAsyncAttributes)===null||n===void 0?void 0:n.call(r)];case 3:return l.sent(),[3,5];case 4:return u=l.sent(),T.debug("Error while resolving async portion of resource: ",u),pu(u),[3,5];case 5:return o.scopeMetrics.length===0?[2]:[4,cE._export(this._exporter,o)];case 6:if(c=l.sent(),c.code!==Gi.SUCCESS)throw new Error("PeriodicExportingMetricReader: metrics export failed (error "+c.error+")");return[2]}})})},e.prototype.onInitialized=function(){var r=this;this._interval=setInterval(function(){r._runOnce()},this._exportInterval)},e.prototype.onForceFlush=function(){return Br(this,void 0,void 0,function(){return $r(this,function(r){switch(r.label){case 0:return[4,this._runOnce()];case 1:return r.sent(),[4,this._exporter.forceFlush()];case 2:return r.sent(),[2]}})})},e.prototype.onShutdown=function(){return Br(this,void 0,void 0,function(){return $r(this,function(r){switch(r.label){case 0:return this._interval&&clearInterval(this._interval),[4,this.onForceFlush()];case 1:return r.sent(),[4,this._exporter.shutdown()];case 2:return r.sent(),[2]}})})},e}(wE),CE=function(){function t(){this._registeredViews=[]}return t.prototype.addView=function(e){this._registeredViews.push(e)},t.prototype.findViews=function(e,r){var n=this,i=this._registeredViews.filter(function(o){return n._matchInstrument(o.instrumentSelector,e)&&n._matchMeter(o.meterSelector,r)});return i},t.prototype._matchInstrument=function(e,r){return(e.getType()===void 0||r.type===e.getType())&&e.getNameFilter().match(r.name)&&e.getUnitFilter().match(r.unit)},t.prototype._matchMeter=function(e,r){return e.getNameFilter().match(r.name)&&(r.version===void 0||e.getVersionFilter().match(r.version))&&(r.schemaUrl===void 0||e.getSchemaUrlFilter().match(r.schemaUrl))},t}(),Gt=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Fr=function(){function t(e,r){this._writableMetricStorage=e,this._descriptor=r}return t.prototype._record=function(e,r,n){if(r===void 0&&(r={}),n===void 0&&(n=N.active()),typeof e!="number"){T.warn("non-number value provided to metric "+this._descriptor.name+": "+e);return}this._descriptor.valueType===St.INT&&!Number.isInteger(e)&&(T.warn("INT value type cannot accept a floating-point value for "+this._descriptor.name+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this._writableMetricStorage.record(e,r,n,Vi(Date.now()))},t}(),xE=function(t){Gt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(r,n,i){this._record(r,n,i)},e}(Fr),PE=function(t){Gt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(r,n,i){if(r<0){T.warn("negative value provided to counter "+this._descriptor.name+": "+r);return}this._record(r,n,i)},e}(Fr),IE=function(t){Gt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(r,n,i){this._record(r,n,i)},e}(Fr),ME=function(t){Gt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(r,n,i){if(r<0){T.warn("negative value provided to histogram "+this._descriptor.name+": "+r);return}this._record(r,n,i)},e}(Fr),Vr=function(){function t(e,r,n){this._observableRegistry=n,this._descriptor=e,this._metricStorages=r}return t.prototype.addCallback=function(e){this._observableRegistry.addCallback(e,this)},t.prototype.removeCallback=function(e){this._observableRegistry.removeCallback(e,this)},t}(),kE=function(t){Gt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Vr),DE=function(t){Gt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Vr),UE=function(t){Gt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Vr);function qi(t){return t instanceof Vr}var jE=function(){function t(e){this._meterSharedState=e}return t.prototype.createGauge=function(e,r){var n=Nt(e,w.GAUGE,r),i=this._meterSharedState.registerMetricStorage(n);return new IE(i,n)},t.prototype.createHistogram=function(e,r){var n=Nt(e,w.HISTOGRAM,r),i=this._meterSharedState.registerMetricStorage(n);return new ME(i,n)},t.prototype.createCounter=function(e,r){var n=Nt(e,w.COUNTER,r),i=this._meterSharedState.registerMetricStorage(n);return new PE(i,n)},t.prototype.createUpDownCounter=function(e,r){var n=Nt(e,w.UP_DOWN_COUNTER,r),i=this._meterSharedState.registerMetricStorage(n);return new xE(i,n)},t.prototype.createObservableGauge=function(e,r){var n=Nt(e,w.OBSERVABLE_GAUGE,r),i=this._meterSharedState.registerAsyncMetricStorage(n);return new DE(n,i,this._meterSharedState.observableRegistry)},t.prototype.createObservableCounter=function(e,r){var n=Nt(e,w.OBSERVABLE_COUNTER,r),i=this._meterSharedState.registerAsyncMetricStorage(n);return new kE(n,i,this._meterSharedState.observableRegistry)},t.prototype.createObservableUpDownCounter=function(e,r){var n=Nt(e,w.OBSERVABLE_UP_DOWN_COUNTER,r),i=this._meterSharedState.registerAsyncMetricStorage(n);return new UE(n,i,this._meterSharedState.observableRegistry)},t.prototype.addBatchObservableCallback=function(e,r){this._meterSharedState.observableRegistry.addBatchCallback(e,r)},t.prototype.removeBatchObservableCallback=function(e,r){this._meterSharedState.observableRegistry.removeBatchCallback(e,r)},t}(),_u=function(){function t(e){this._instrumentDescriptor=e}return t.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},t.prototype.updateDescription=function(e){this._instrumentDescriptor=Nt(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:e,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},t}(),BE=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),gu=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},$E=function(){function t(e){this._hash=e,this._valueMap=new Map,this._keyMap=new Map}return t.prototype.get=function(e,r){return r!=null||(r=this._hash(e)),this._valueMap.get(r)},t.prototype.getOrDefault=function(e,r){var n=this._hash(e);if(this._valueMap.has(n))return this._valueMap.get(n);var i=r();return this._keyMap.has(n)||this._keyMap.set(n,e),this._valueMap.set(n,i),i},t.prototype.set=function(e,r,n){n!=null||(n=this._hash(e)),this._keyMap.has(n)||this._keyMap.set(n,e),this._valueMap.set(n,r)},t.prototype.has=function(e,r){return r!=null||(r=this._hash(e)),this._valueMap.has(r)},t.prototype.keys=function(){var e,r;return gu(this,function(n){switch(n.label){case 0:e=this._keyMap.entries(),r=e.next(),n.label=1;case 1:return r.done===!0?[3,3]:[4,[r.value[1],r.value[0]]];case 2:return n.sent(),r=e.next(),[3,1];case 3:return[2]}})},t.prototype.entries=function(){var e,r;return gu(this,function(n){switch(n.label){case 0:e=this._valueMap.entries(),r=e.next(),n.label=1;case 1:return r.done===!0?[3,3]:[4,[this._keyMap.get(r.value[0]),r.value[1],r.value[0]]];case 2:return n.sent(),r=e.next(),[3,1];case 3:return[2]}})},Object.defineProperty(t.prototype,"size",{get:function(){return this._valueMap.size},enumerable:!1,configurable:!0}),t}(),Ht=function(t){BE(e,t);function e(){return t.call(this,Zs)||this}return e}($E),FE=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Eu=function(){function t(e,r){this._aggregator=e,this._activeCollectionStorage=new Ht,this._cumulativeMemoStorage=new Ht,this._overflowAttributes={"otel.metric.overflow":!0},this._cardinalityLimit=(r??2e3)-1,this._overflowHashCode=Zs(this._overflowAttributes)}return t.prototype.record=function(e,r,n,i){var o=this,a=this._activeCollectionStorage.get(r);if(!a){if(this._activeCollectionStorage.size>=this._cardinalityLimit){var u=this._activeCollectionStorage.getOrDefault(this._overflowAttributes,function(){return o._aggregator.createAccumulation(i)});u?.record(e);return}a=this._aggregator.createAccumulation(i),this._activeCollectionStorage.set(r,a)}a?.record(e)},t.prototype.batchCumulate=function(e,r){var n=this;Array.from(e.entries()).forEach(function(i){var o=FE(i,3),a=o[0],u=o[1],c=o[2],s=n._aggregator.createAccumulation(r);s?.record(u);var l=s;if(n._cumulativeMemoStorage.has(a,c)){var p=n._cumulativeMemoStorage.get(a,c);l=n._aggregator.diff(p,s)}else if(n._cumulativeMemoStorage.size>=n._cardinalityLimit&&(a=n._overflowAttributes,c=n._overflowHashCode,n._cumulativeMemoStorage.has(a,c))){var p=n._cumulativeMemoStorage.get(a,c);l=n._aggregator.diff(p,s)}if(n._activeCollectionStorage.has(a,c)){var f=n._activeCollectionStorage.get(a,c);l=n._aggregator.merge(f,l)}n._cumulativeMemoStorage.set(a,s,c),n._activeCollectionStorage.set(a,l,c)})},t.prototype.collect=function(){var e=this._activeCollectionStorage;return this._activeCollectionStorage=new Ht,e},t}(),Ki=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Tu=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},bu=function(){function t(e,r){var n=this;this._aggregator=e,this._unreportedAccumulations=new Map,this._reportHistory=new Map,r.forEach(function(i){n._unreportedAccumulations.set(i,[])})}return t.prototype.buildMetrics=function(e,r,n,i){this._stashAccumulations(n);var o=this._getMergedUnreportedAccumulations(e),a=o,u;if(this._reportHistory.has(e)){var c=this._reportHistory.get(e),s=c.collectionTime;u=c.aggregationTemporality,u===ct.CUMULATIVE?a=t.merge(c.accumulations,o,this._aggregator):a=t.calibrateStartTime(c.accumulations,o,s)}else u=e.selectAggregationTemporality(r.type);this._reportHistory.set(e,{accumulations:a,collectionTime:i,aggregationTemporality:u});var l=VE(a);if(l.length!==0)return this._aggregator.toMetricData(r,u,l,i)},t.prototype._stashAccumulations=function(e){var r,n,i=this._unreportedAccumulations.keys();try{for(var o=Ki(i),a=o.next();!a.done;a=o.next()){var u=a.value,c=this._unreportedAccumulations.get(u);c===void 0&&(c=[],this._unreportedAccumulations.set(u,c)),c.push(e)}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},t.prototype._getMergedUnreportedAccumulations=function(e){var r,n,i=new Ht,o=this._unreportedAccumulations.get(e);if(this._unreportedAccumulations.set(e,[]),o===void 0)return i;try{for(var a=Ki(o),u=a.next();!u.done;u=a.next()){var c=u.value;i=t.merge(i,c,this._aggregator)}}catch(s){r={error:s}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i},t.merge=function(e,r,n){for(var i=e,o=r.entries(),a=o.next();a.done!==!0;){var u=Tu(a.value,3),c=u[0],s=u[1],l=u[2];if(e.has(c,l)){var p=e.get(c,l),f=n.merge(p,s);i.set(c,f,l)}else i.set(c,s,l);a=o.next()}return i},t.calibrateStartTime=function(e,r,n){var i,o;try{for(var a=Ki(e.keys()),u=a.next();!u.done;u=a.next()){var c=Tu(u.value,2),s=c[0],l=c[1],p=r.get(s,l);p?.setStartTime(n)}}catch(f){i={error:f}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return r},t}();function VE(t){return Array.from(t.entries())}var GE=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),HE=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},zE=function(t){GE(e,t);function e(r,n,i,o,a){var u=t.call(this,r)||this;return u._attributesProcessor=i,u._aggregationCardinalityLimit=a,u._deltaMetricStorage=new Eu(n,u._aggregationCardinalityLimit),u._temporalMetricStorage=new bu(n,o),u}return e.prototype.record=function(r,n){var i=this,o=new Ht;Array.from(r.entries()).forEach(function(a){var u=HE(a,2),c=u[0],s=u[1];o.set(i._attributesProcessor.process(c),s)}),this._deltaMetricStorage.batchCumulate(o,n)},e.prototype.collect=function(r,n){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,i,n)},e}(_u);function Ou(t,e){var r="";return t.unit!==e.unit&&(r+=" - Unit '"+t.unit+"' does not match '"+e.unit+`'
297
+ `),t.type!==e.type&&(r+=" - Type '"+t.type+"' does not match '"+e.type+`'
298
+ `),t.valueType!==e.valueType&&(r+=" - Value Type '"+t.valueType+"' does not match '"+e.valueType+`'
299
+ `),t.description!==e.description&&(r+=" - Description '"+t.description+"' does not match '"+e.description+`'
300
+ `),r}function XE(t,e){return" - use valueType '"+t.valueType+"' on instrument creation or use an instrument name other than '"+e.name+"'"}function qE(t,e){return" - use unit '"+t.unit+"' on instrument creation or use an instrument name other than '"+e.name+"'"}function KE(t,e){var r={name:e.name,type:e.type,unit:e.unit},n=JSON.stringify(r);return" - create a new view with a name other than '"+t.name+"' and InstrumentSelector '"+n+"'"}function WE(t,e){var r={name:e.name,type:e.type,unit:e.unit},n=JSON.stringify(r);return" - create a new view with a name other than '"+t.name+"' and InstrumentSelector '"+n+`'
301
+ - OR - create a new view with the name `+t.name+" and description '"+t.description+"' and InstrumentSelector "+n+`
302
+ - OR - create a new view with the name `+e.name+" and description '"+t.description+"' and InstrumentSelector "+n}function Su(t,e){return t.valueType!==e.valueType?XE(t,e):t.unit!==e.unit?qE(t,e):t.type!==e.type?KE(t,e):t.description!==e.description?WE(t,e):""}var Wi=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},YE=function(){function t(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}return t.create=function(){return new t},t.prototype.getStorages=function(e){var r,n,i,o,a=[];try{for(var u=Wi(this._sharedRegistry.values()),c=u.next();!c.done;c=u.next()){var s=c.value;a=a.concat(s)}}catch(y){r={error:y}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}var l=this._perCollectorRegistry.get(e);if(l!=null)try{for(var p=Wi(l.values()),f=p.next();!f.done;f=p.next()){var s=f.value;a=a.concat(s)}}catch(y){i={error:y}}finally{try{f&&!f.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}return a},t.prototype.register=function(e){this._registerStorage(e,this._sharedRegistry)},t.prototype.registerForCollector=function(e,r){var n=this._perCollectorRegistry.get(e);n==null&&(n=new Map,this._perCollectorRegistry.set(e,n)),this._registerStorage(r,n)},t.prototype.findOrUpdateCompatibleStorage=function(e){var r=this._sharedRegistry.get(e.name);return r===void 0?null:this._findOrUpdateCompatibleStorage(e,r)},t.prototype.findOrUpdateCompatibleCollectorStorage=function(e,r){var n=this._perCollectorRegistry.get(e);if(n===void 0)return null;var i=n.get(r.name);return i===void 0?null:this._findOrUpdateCompatibleStorage(r,i)},t.prototype._registerStorage=function(e,r){var n=e.getInstrumentDescriptor(),i=r.get(n.name);if(i===void 0){r.set(n.name,[e]);return}i.push(e)},t.prototype._findOrUpdateCompatibleStorage=function(e,r){var n,i,o=null;try{for(var a=Wi(r),u=a.next();!u.done;u=a.next()){var c=u.value,s=c.getInstrumentDescriptor();kg(s,e)?(s.description!==e.description&&(e.description.length>s.description.length&&c.updateDescription(e.description),T.warn("A view or instrument with the name ",e.name,` has already been registered, but has a different description and is incompatible with another registered view.
303
+ `,`Details:
304
+ `,Ou(s,e),`The longer description will be used.
305
+ To resolve the conflict:`,Su(s,e))),o=c):T.warn("A view or instrument with the name ",e.name,` has already been registered and is incompatible with another registered view.
306
+ `,`Details:
307
+ `,Ou(s,e),`To resolve the conflict:
308
+ `,Su(s,e))}}catch(l){n={error:l}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o},t}(),JE=function(){function t(e){this._backingStorages=e}return t.prototype.record=function(e,r,n,i){this._backingStorages.forEach(function(o){o.record(e,r,n,i)})},t}(),QE=function(){function t(e,r){this._instrumentName=e,this._valueType=r,this._buffer=new Ht}return t.prototype.observe=function(e,r){if(r===void 0&&(r={}),typeof e!="number"){T.warn("non-number value provided to metric "+this._instrumentName+": "+e);return}this._valueType===St.INT&&!Number.isInteger(e)&&(T.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this._buffer.set(r,e)},t}(),ZE=function(){function t(){this._buffer=new Map}return t.prototype.observe=function(e,r,n){if(n===void 0&&(n={}),!!qi(e)){var i=this._buffer.get(e);if(i==null&&(i=new Ht,this._buffer.set(e,i)),typeof r!="number"){T.warn("non-number value provided to metric "+e._descriptor.name+": "+r);return}e._descriptor.valueType===St.INT&&!Number.isInteger(r)&&(T.warn("INT value type cannot accept a floating-point value for "+e._descriptor.name+", ignoring the fractional digits."),r=Math.trunc(r),!Number.isInteger(r))||i.set(n,r)}},t}(),Yi=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},Ji=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},wu=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Au=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},tT=function(){function t(){this._callbacks=[],this._batchCallbacks=[]}return t.prototype.addCallback=function(e,r){var n=this._findCallback(e,r);n>=0||this._callbacks.push({callback:e,instrument:r})},t.prototype.removeCallback=function(e,r){var n=this._findCallback(e,r);n<0||this._callbacks.splice(n,1)},t.prototype.addBatchCallback=function(e,r){var n=new Set(r.filter(qi));if(n.size===0){T.error("BatchObservableCallback is not associated with valid instruments",r);return}var i=this._findBatchCallback(e,n);i>=0||this._batchCallbacks.push({callback:e,instruments:n})},t.prototype.removeBatchCallback=function(e,r){var n=new Set(r.filter(qi)),i=this._findBatchCallback(e,n);i<0||this._batchCallbacks.splice(i,1)},t.prototype.observe=function(e,r){return Yi(this,void 0,void 0,function(){var n,i,o,a;return Ji(this,function(u){switch(u.label){case 0:return n=this._observeCallbacks(e,r),i=this._observeBatchCallbacks(e,r),[4,Rg(Au(Au([],wu(n),!1),wu(i),!1))];case 1:return o=u.sent(),a=o.filter(Ng).map(function(c){return c.reason}),[2,a]}})})},t.prototype._observeCallbacks=function(e,r){var n=this;return this._callbacks.map(function(i){var o=i.callback,a=i.instrument;return Yi(n,void 0,void 0,function(){var u,c;return Ji(this,function(s){switch(s.label){case 0:return u=new QE(a._descriptor.name,a._descriptor.valueType),c=Promise.resolve(o(u)),r!=null&&(c=Xe(c,r)),[4,c];case 1:return s.sent(),a._metricStorages.forEach(function(l){l.record(u._buffer,e)}),[2]}})})})},t.prototype._observeBatchCallbacks=function(e,r){var n=this;return this._batchCallbacks.map(function(i){var o=i.callback,a=i.instruments;return Yi(n,void 0,void 0,function(){var u,c;return Ji(this,function(s){switch(s.label){case 0:return u=new ZE,c=Promise.resolve(o(u)),r!=null&&(c=Xe(c,r)),[4,c];case 1:return s.sent(),a.forEach(function(l){var p=u._buffer.get(l);p!=null&&l._metricStorages.forEach(function(f){f.record(p,e)})}),[2]}})})})},t.prototype._findCallback=function(e,r){return this._callbacks.findIndex(function(n){return n.callback===e&&n.instrument===r})},t.prototype._findBatchCallback=function(e,r){return this._batchCallbacks.findIndex(function(n){return n.callback===e&&Cg(n.instruments,r)})},t}(),eT=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),rT=function(t){eT(e,t);function e(r,n,i,o,a){var u=t.call(this,r)||this;return u._attributesProcessor=i,u._aggregationCardinalityLimit=a,u._deltaMetricStorage=new Eu(n,u._aggregationCardinalityLimit),u._temporalMetricStorage=new bu(n,o),u}return e.prototype.record=function(r,n,i,o){n=this._attributesProcessor.process(n,i),this._deltaMetricStorage.record(r,n,i,o)},e.prototype.collect=function(r,n){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,i,n)},e}(_u),Lu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qi=function(){function t(){}return t.Noop=function(){return iT},t}(),nT=function(t){Lu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.process=function(r,n){return r},e}(Qi);(function(t){Lu(e,t);function e(r){var n=t.call(this)||this;return n._allowedAttributeNames=r,n}return e.prototype.process=function(r,n){var i=this,o={};return Object.keys(r).filter(function(a){return i._allowedAttributeNames.includes(a)}).forEach(function(a){return o[a]=r[a]}),o},e})(Qi);var iT=new nT,oT=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},aT=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},sT=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},uT=function(){function t(e,r){this._meterProviderSharedState=e,this._instrumentationScope=r,this.metricStorageRegistry=new YE,this.observableRegistry=new tT,this.meter=new jE(this)}return t.prototype.registerMetricStorage=function(e){var r=this._registerMetricStorage(e,rT);return r.length===1?r[0]:new JE(r)},t.prototype.registerAsyncMetricStorage=function(e){var r=this._registerMetricStorage(e,zE);return r},t.prototype.collect=function(e,r,n){return oT(this,void 0,void 0,function(){var i,o,a;return aT(this,function(u){switch(u.label){case 0:return[4,this.observableRegistry.observe(r,n?.timeoutMillis)];case 1:return i=u.sent(),o=this.metricStorageRegistry.getStorages(e),o.length===0?[2,null]:(a=o.map(function(c){return c.collect(e,r)}).filter(Ag),a.length===0?[2,{errors:i}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:a},errors:i}])}})})},t.prototype._registerMetricStorage=function(e,r){var n=this,i=this._meterProviderSharedState.viewRegistry.findViews(e,this._instrumentationScope),o=i.map(function(c){var s=Mg(c,e),l=n.metricStorageRegistry.findOrUpdateCompatibleStorage(s);if(l!=null)return l;var p=c.aggregation.createAggregator(s),f=new r(s,p,c.attributesProcessor,n._meterProviderSharedState.metricCollectors,c.aggregationCardinalityLimit);return n.metricStorageRegistry.register(f),f});if(o.length===0){var a=this._meterProviderSharedState.selectAggregations(e.type),u=a.map(function(c){var s=sT(c,2),l=s[0],p=s[1],f=n.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(l,e);if(f!=null)return f;var y=p.createAggregator(e),v=l.selectCardinalityLimit(e.type),m=new r(e,y,Qi.Noop(),[l],v);return n.metricStorageRegistry.registerForCollector(l,m),m});o=o.concat(u)}return o},t}(),cT=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},lT=function(){function t(e){this.resource=e,this.viewRegistry=new CE,this.metricCollectors=[],this.meterSharedStates=new Map}return t.prototype.getMeterSharedState=function(e){var r=Lg(e),n=this.meterSharedStates.get(r);return n==null&&(n=new uT(this,e),this.meterSharedStates.set(r,n)),n},t.prototype.selectAggregations=function(e){var r,n,i=[];try{for(var o=cT(this.metricCollectors),a=o.next();!a.done;a=o.next()){var u=a.value;i.push([u,u.selectAggregation(e)])}}catch(c){r={error:c}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},t}(),Gr=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},Hr=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},pT=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},fT=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},hT=function(){function t(e,r){this._sharedState=e,this._metricReader=r}return t.prototype.collect=function(e){return Gr(this,void 0,void 0,function(){var r,n,i,o,a=this;return Hr(this,function(u){switch(u.label){case 0:return r=Vi(Date.now()),n=[],i=[],o=Array.from(this._sharedState.meterSharedStates.values()).map(function(c){return Gr(a,void 0,void 0,function(){var s;return Hr(this,function(l){switch(l.label){case 0:return[4,c.collect(this,r,e)];case 1:return s=l.sent(),s?.scopeMetrics!=null&&n.push(s.scopeMetrics),s?.errors!=null&&i.push.apply(i,fT([],pT(s.errors),!1)),[2]}})})}),[4,Promise.all(o)];case 1:return u.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:n},errors:i}]}})})},t.prototype.forceFlush=function(e){return Gr(this,void 0,void 0,function(){return Hr(this,function(r){switch(r.label){case 0:return[4,this._metricReader.forceFlush(e)];case 1:return r.sent(),[2]}})})},t.prototype.shutdown=function(e){return Gr(this,void 0,void 0,function(){return Hr(this,function(r){switch(r.label){case 0:return[4,this._metricReader.shutdown(e)];case 1:return r.sent(),[2]}})})},t.prototype.selectAggregationTemporality=function(e){return this._metricReader.selectAggregationTemporality(e)},t.prototype.selectAggregation=function(e){return this._metricReader.selectAggregation(e)},t.prototype.selectCardinalityLimit=function(e){var r,n,i;return(i=(n=(r=this._metricReader).selectCardinalityLimit)===null||n===void 0?void 0:n.call(r,e))!==null&&i!==void 0?i:2e3},t}(),Ru=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},Nu=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Cu=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function dT(t,e){var r=e??Ve.empty();return t?Ve.default().merge(r):r}var vT=function(){function t(e){var r,n,i,o,a;if(this._shutdown=!1,this._sharedState=new lT(dT((a=e?.mergeResourceWithDefaults)!==null&&a!==void 0?a:!0,e?.resource)),e?.views!=null&&e.views.length>0)try{for(var u=Cu(e.views),c=u.next();!c.done;c=u.next()){var s=c.value;this._sharedState.viewRegistry.addView(s)}}catch(y){r={error:y}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}if(e?.readers!=null&&e.readers.length>0)try{for(var l=Cu(e.readers),p=l.next();!p.done;p=l.next()){var f=p.value;this.addMetricReader(f)}}catch(y){i={error:y}}finally{try{p&&!p.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}}return t.prototype.getMeter=function(e,r,n){return r===void 0&&(r=""),n===void 0&&(n={}),this._shutdown?(T.warn("A shutdown MeterProvider cannot provide a Meter"),Ff()):this._sharedState.getMeterSharedState({name:e,version:r,schemaUrl:n.schemaUrl}).meter},t.prototype.addMetricReader=function(e){var r=new hT(this._sharedState,e);e.setMetricProducer(r),this._sharedState.metricCollectors.push(r)},t.prototype.shutdown=function(e){return Ru(this,void 0,void 0,function(){return Nu(this,function(r){switch(r.label){case 0:return this._shutdown?(T.warn("shutdown may only be called once per MeterProvider"),[2]):(this._shutdown=!0,[4,Promise.all(this._sharedState.metricCollectors.map(function(n){return n.shutdown(e)}))]);case 1:return r.sent(),[2]}})})},t.prototype.forceFlush=function(e){return Ru(this,void 0,void 0,function(){return Nu(this,function(r){switch(r.label){case 0:return this._shutdown?(T.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map(function(n){return n.forceFlush(e)}))];case 1:return r.sent(),[2]}})})},t}();function yT(t,e){var r=Xs(e);return{resource:qs(t.resource),schemaUrl:void 0,scopeMetrics:mT(t.scopeMetrics,r)}}function mT(t,e){return Array.from(t.map(function(r){return{scope:Ks(r.scope),metrics:r.metrics.map(function(n){return _T(n,e)}),schemaUrl:r.scope.schemaUrl}}))}function _T(t,e){var r={name:t.descriptor.name,description:t.descriptor.description,unit:t.descriptor.unit},n=bT(t.aggregationTemporality);switch(t.dataPointType){case ht.SUM:r.sum={aggregationTemporality:n,isMonotonic:t.isMonotonic,dataPoints:xu(t,e)};break;case ht.GAUGE:r.gauge={dataPoints:xu(t,e)};break;case ht.HISTOGRAM:r.histogram={aggregationTemporality:n,dataPoints:ET(t,e)};break;case ht.EXPONENTIAL_HISTOGRAM:r.exponentialHistogram={aggregationTemporality:n,dataPoints:TT(t,e)};break}return r}function gT(t,e,r){var n={attributes:$t(t.attributes),startTimeUnixNano:r.encodeHrTime(t.startTime),timeUnixNano:r.encodeHrTime(t.endTime)};switch(e){case St.INT:n.asInt=t.value;break;case St.DOUBLE:n.asDouble=t.value;break}return n}function xu(t,e){return t.dataPoints.map(function(r){return gT(r,t.descriptor.valueType,e)})}function ET(t,e){return t.dataPoints.map(function(r){var n=r.value;return{attributes:$t(r.attributes),bucketCounts:n.buckets.counts,explicitBounds:n.buckets.boundaries,count:n.count,sum:n.sum,min:n.min,max:n.max,startTimeUnixNano:e.encodeHrTime(r.startTime),timeUnixNano:e.encodeHrTime(r.endTime)}})}function TT(t,e){return t.dataPoints.map(function(r){var n=r.value;return{attributes:$t(r.attributes),count:n.count,min:n.min,max:n.max,sum:n.sum,positive:{offset:n.positive.offset,bucketCounts:n.positive.bucketCounts},negative:{offset:n.negative.offset,bucketCounts:n.negative.bucketCounts},scale:n.scale,zeroCount:n.zeroCount,startTimeUnixNano:e.encodeHrTime(r.startTime),timeUnixNano:e.encodeHrTime(r.endTime)}})}function bT(t){switch(t){case ct.DELTA:return 1;case ct.CUMULATIVE:return 2}}function OT(t,e){return{resourceMetrics:t.map(function(r){return yT(r,e)})}}var ST=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},wT=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};function AT(t,e){var r,n=t.spanContext(),i=t.status;return{traceId:e.encodeSpanContext(n.traceId),spanId:e.encodeSpanContext(n.spanId),parentSpanId:e.encodeOptionalSpanContext(t.parentSpanId),traceState:(r=n.traceState)===null||r===void 0?void 0:r.serialize(),name:t.name,kind:t.kind==null?0:t.kind+1,startTimeUnixNano:e.encodeHrTime(t.startTime),endTimeUnixNano:e.encodeHrTime(t.endTime),attributes:$t(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(function(o){return RT(o,e)}),droppedEventsCount:t.droppedEventsCount,status:{code:i.code,message:i.message},links:t.links.map(function(o){return LT(o,e)}),droppedLinksCount:t.droppedLinksCount}}function LT(t,e){var r;return{attributes:t.attributes?$t(t.attributes):[],spanId:e.encodeSpanContext(t.context.spanId),traceId:e.encodeSpanContext(t.context.traceId),traceState:(r=t.context.traceState)===null||r===void 0?void 0:r.serialize(),droppedAttributesCount:t.droppedAttributesCount||0}}function RT(t,e){return{attributes:t.attributes?$t(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}function NT(t,e){var r=Xs(e);return{resourceSpans:xT(t,r)}}function CT(t){var e,r,n=new Map;try{for(var i=ST(t),o=i.next();!o.done;o=i.next()){var a=o.value,u=n.get(a.resource);u||(u=new Map,n.set(a.resource,u));var c=a.instrumentationLibrary.name+"@"+(a.instrumentationLibrary.version||"")+":"+(a.instrumentationLibrary.schemaUrl||""),s=u.get(c);s||(s=[],u.set(c,s)),s.push(a)}}catch(l){e={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n}function xT(t,e){for(var r=CT(t),n=[],i=r.entries(),o=i.next();!o.done;){for(var a=wT(o.value,2),u=a[0],c=a[1],s=[],l=c.values(),p=l.next();!p.done;){var f=p.value;if(f.length>0){var y=f.map(function(m){return AT(m,e)});s.push({scope:Ks(f[0].instrumentationLibrary),spans:y,schemaUrl:f[0].instrumentationLibrary.schemaUrl})}p=l.next()}var v={resource:qs(u),scopeSpans:s,schemaUrl:void 0};n.push(v),o=i.next()}return n}var PT={serializeRequest:function(t){var e=OT([t],{useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},IT={serializeRequest:function(t){var e=NT(t,{useHex:!0,useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},MT=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},kT=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},DT=5,UT=1e3,jT=5e3,BT=1.5,Pu=.2;function $T(){return Math.random()*(2*Pu)-Pu}var FT=function(){function t(e){this._transport=e}return t.prototype.retry=function(e,r,n){var i=this;return new Promise(function(o,a){setTimeout(function(){i._transport.send(e,r).then(o,a)},n)})},t.prototype.send=function(e,r){var n;return MT(this,void 0,void 0,function(){var i,o,a,u,c,s,l;return kT(this,function(p){switch(p.label){case 0:return i=Date.now()+r,[4,this._transport.send(e,r)];case 1:o=p.sent(),a=DT,u=UT,p.label=2;case 2:return o.status==="retryable"&&a>0?(a--,c=Math.max(Math.min(u,jT)+$T(),0),u=u*BT,s=(n=o.retryInMillis)!==null&&n!==void 0?n:c,l=i-Date.now(),s>l?[2,o]:[4,this.retry(e,l,s)]):[3,4];case 3:return o=p.sent(),[3,2];case 4:return[2,o]}})})},t.prototype.shutdown=function(){return this._transport.shutdown()},t}();function Iu(t){return new FT(t.transport)}function VT(t){var e=[429,502,503,504];return e.includes(t)}function GT(t){if(t!=null){var e=Number.parseInt(t,10);if(Number.isInteger(e))return e>0?e*1e3:-1;var r=new Date(t).getTime()-Date.now();return r>=0?r:0}}var HT=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},zT=function(){function t(e){this._parameters=e}return t.prototype.send=function(e,r){var n=this;return new Promise(function(i){var o=new XMLHttpRequest;o.timeout=r,o.open("POST",n._parameters.url);var a=n._parameters.headers();Object.entries(a).forEach(function(u){var c=HT(u,2),s=c[0],l=c[1];o.setRequestHeader(s,l)}),o.ontimeout=function(u){i({status:"failure",error:new Error("XHR request timed out")})},o.onreadystatechange=function(){o.status>=200&&o.status<=299?(T.debug("XHR success"),i({status:"success"})):o.status&&VT(o.status)?i({status:"retryable",retryInMillis:GT(o.getResponseHeader("Retry-After"))}):o.status!==0&&i({status:"failure",error:new Error("XHR request failed with non-retryable status")})},o.onabort=function(){i({status:"failure",error:new Error("XHR request aborted")})},o.onerror=function(){i({status:"failure",error:new Error("XHR request errored")})},o.send(e)})},t.prototype.shutdown=function(){},t}();function XT(t){return new zT(t)}var qT=function(){function t(e){this._params=e}return t.prototype.send=function(e){var r=this;return new Promise(function(n){navigator.sendBeacon(r._params.url,new Blob([e],{type:r._params.blobType}))?(T.debug("SendBeacon success"),n({status:"success"})):n({status:"failure",error:new Error("SendBeacon failed")})})},t.prototype.shutdown=function(){},t}();function KT(t){return new qT(t)}function WT(t,e){return $s(t,e,Iu({transport:XT(t)}))}function YT(t,e){return $s(t,e,Iu({transport:KT({url:t.url,blobType:t.headers()["Content-Type"]})}))}var JT=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};function QT(t){return function(){var e,r={};return Object.entries((e=t?.())!==null&&e!==void 0?e:{}).forEach(function(n){var i=JT(n,2),o=i[0],a=i[1];typeof a<"u"?r[o]=String(a):T.warn('Header "'+o+'" has invalid value ('+a+") and will be ignored")}),r}}var zt=function(){return zt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},zt.apply(this,arguments)};function ZT(t,e,r){var n=zt({},r()),i={};return function(){return e!=null&&Object.assign(i,e()),t!=null&&Object.assign(i,t()),Object.assign(i,n)}}function tb(t){if(t!=null)try{return new URL(t),t}catch{throw new Error("Configuration: Could not parse user-provided export URL: '"+t+"'")}}function eb(t,e,r){var n,i,o,a;return zt(zt({},rg(t,e,r)),{headers:ZT(QT(t.headers),e.headers,r.headers),url:(i=(n=tb(t.url))!==null&&n!==void 0?n:e.url)!==null&&i!==void 0?i:r.url,agentOptions:(a=(o=t.agentOptions)!==null&&o!==void 0?o:e.agentOptions)!==null&&a!==void 0?a:r.agentOptions})}function rb(t,e){return zt(zt({},ng()),{headers:function(){return t},url:"http://localhost:4318/"+e,agentOptions:{keepAlive:!0}})}function nb(t,e,r){return eb({url:t.url,timeoutMillis:t.timeoutMillis,headers:eg(t.headers),concurrencyLimit:t.concurrencyLimit},{},rb(r,e))}function Mu(t,e,r,n){var i=!!t.headers||typeof navigator.sendBeacon!="function",o=nb(t,r,n);return i?WT(o,e):YT(o,e)}var ib=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ob=function(t){ib(e,t);function e(r){return r===void 0&&(r={}),t.call(this,Mu(r,IT,"v1/traces",{"Content-Type":"application/json"}))||this}return e}(js),zr;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE",t[t.LOWMEMORY=2]="LOWMEMORY"})(zr||(zr={}));var ab=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Zi=function(){return ct.CUMULATIVE},ku=function(t){switch(t){case w.COUNTER:case w.OBSERVABLE_COUNTER:case w.GAUGE:case w.HISTOGRAM:case w.OBSERVABLE_GAUGE:return ct.DELTA;case w.UP_DOWN_COUNTER:case w.OBSERVABLE_UP_DOWN_COUNTER:return ct.CUMULATIVE}},Du=function(t){switch(t){case w.COUNTER:case w.HISTOGRAM:return ct.DELTA;case w.GAUGE:case w.UP_DOWN_COUNTER:case w.OBSERVABLE_UP_DOWN_COUNTER:case w.OBSERVABLE_COUNTER:case w.OBSERVABLE_GAUGE:return ct.CUMULATIVE}};function sb(){var t=Hh(),e=t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return e==="cumulative"?Zi:e==="delta"?ku:e==="lowmemory"?Du:(T.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),Zi)}function ub(t){return t!=null?t===zr.DELTA?ku:t===zr.LOWMEMORY?Du:Zi:sb()}function cb(t){return t!=null&&t.aggregationPreference?t.aggregationPreference:function(e){return gt.Default()}}var lb=function(t){ab(e,t);function e(r,n){var i=t.call(this,r)||this;return i._aggregationSelector=cb(n),i._aggregationTemporalitySelector=ub(n?.temporalityPreference),i}return e.prototype.selectAggregation=function(r){return this._aggregationSelector(r)},e.prototype.selectAggregationTemporality=function(r){return this._aggregationTemporalitySelector(r)},e}(js),pb=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),fb=function(t){pb(e,t);function e(r){return t.call(this,Mu(r??{},PT,"v1/metrics",{"Content-Type":"application/json"}),r)||this}return e}(lb);function hb(t,e){const 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:Rd(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}}function db(t,e){if(!e.isSamplingEnabled())return t;const r=[],n={},i={};for(const o of t){o.parentSpanId&&(i[o.parentSpanId]=i[o.parentSpanId]||[],i[o.parentSpanId].push(o.spanContext().spanId));const a=e.shouldSample(o);a.sample?a.attributes?n[o.spanContext().spanId]=hb(o,a.attributes):n[o.spanContext().spanId]=o:r.push(o.spanContext().spanId)}for(;r.length>0;){const o=r.shift(),a=i[o];if(a)for(const u of a)delete n[u],r.push(u)}return Object.values(n)}class vb extends ob{constructor(e,r){super(rt(P({},e),{headers:{}})),this.sampler=r}export(e,r){const n=db(e,this.sampler);if(n.length===0)return;let i=0;const o=a=>{if(a.code===Z.SUCCESS)return r({code:Z.SUCCESS});if(i++,i>An)return r({code:Z.FAILED,error:a.error});new Promise(u=>setTimeout(u,Ln+Rn*Math.pow(2,i))).then(()=>{super.export(n,o)})};super.export(n,o)}}class yb extends fb{constructor(e){super(rt(P({},e),{headers:{}}))}export(e,r){let n=0;const i=o=>{var a;if(o.code===Z.SUCCESS)return r({code:Z.SUCCESS});if(n++,n>An)return console.error(`[@launchdarkly/observability] failed to export OTeL metrics: ${(a=o.error)==null?void 0:a.message}`,o.error),r({code:Z.FAILED,error:o.error});new Promise(u=>setTimeout(u,Ln+Rn*Math.pow(2,n))).then(()=>{var u;console.warn(`[@launchdarkly/observability] retry ${n}, failed to export OTeL metrics: ${(u=o.error)==null?void 0:u.message}`,o.error),super.export(e,i)})};super.export(e,i)}}const mb="OT_ZONE_CONTEXT",_b="Navigation:",gb=["click","input","submit"];function Eb(){return!1}const to=class Wt extends Gd{constructor(e={}){var r;super(Wt.moduleName,Wt.version,e),k(this,"_spansData",new WeakMap),k(this,"_zonePatched"),k(this,"_wrappedListeners",new WeakMap),k(this,"_eventsSpanMap",new WeakMap),k(this,"_eventNames"),k(this,"_shouldPreventSpanCreation"),this._eventNames=new Set((r=e?.eventNames)!=null?r:gb),this._shouldPreventSpanCreation=typeof e?.shouldPreventSpanCreation=="function"?e.shouldPreventSpanCreation:Eb}init(){}_checkForTimeout(e,r){const n=this._spansData.get(r);n&&(e.source==="setTimeout"?n.hrTimeLastTimeout=Wh():e.source!=="Promise.then"&&e.source!=="setTimeout"&&(n.hrTimeLastTimeout=void 0))}_allowEventName(e){return this._eventNames.has(e)}_createSpan(e,r){var n;const i=e?.target,o=e?.type;if(!(i instanceof HTMLElement)||!i.getAttribute||i.hasAttribute("disabled")||!this._allowEventName(o))return;const a=gs(i,!0);try{const u=this.tracer.startSpan(o,{attributes:{"event.type":o,"event.tag":i.tagName,"event.xpath":a,"event.id":i.id,"event.classname":i.className,"event.text":(n=i.textContent)!=null?n:"","event.url":window.location.href,"viewport.width":window.innerWidth,"viewport.height":window.innerHeight}},r?x.setSpan(N.active(),r):void 0);return e instanceof MouseEvent&&(u.setAttribute("event.x",e.clientX),u.setAttribute("event.y",e.clientY),u.setAttribute("event.relativeX",e.clientX/window.innerWidth),u.setAttribute("event.relativeY",e.clientY/window.innerHeight),o==="scroll"&&(u.setAttribute("event.scrollX",window.scrollX),u.setAttribute("event.scrollY",window.scrollY))),this._shouldPreventSpanCreation(o,i,u)===!0?void 0:(this._spansData.set(u,{taskCount:0}),u)}catch(u){this._diag.error("failed to start create new user interaction span",u)}}_decrementTask(e){const r=this._spansData.get(e);r&&(r.taskCount--,r.taskCount===0&&this._tryToEndSpan(e,r.hrTimeLastTimeout))}_getCurrentSpan(e){const r=e.get(mb);return r&&x.getSpan(r)}_incrementTask(e){const r=this._spansData.get(e);r&&r.taskCount++}addPatchedListener(e,r,n,i){let o=this._wrappedListeners.get(n);o||(o=new Map,this._wrappedListeners.set(n,o));let a=o.get(r);return a||(a=new Map,o.set(r,a)),a.has(e)?!1:(a.set(e,i),!0)}removePatchedListener(e,r,n){const i=this._wrappedListeners.get(n);if(!i)return;const o=i.get(r);if(!o)return;const a=o.get(e);return a&&(o.delete(e),o.size===0&&(i.delete(r),i.size===0&&this._wrappedListeners.delete(n))),a}_invokeListener(e,r,n){return typeof e=="function"?e.apply(r,n):e.handleEvent(n[0])}_patchAddEventListener(){const e=this;let r=new Map;return n=>function(i,o,a){if(!o)return n.call(this,i,o,a);const u=a&&typeof a=="object"&&a.once,c=function(...s){var l;let p;const f=s[0];if(!(f!=null&&f.type))return e._invokeListener(o,this,s);if(Date.now()-((l=r.get(f.type))!=null?l:0)<1e3/60)return e._invokeListener(o,this,s);r.set(f.type,Date.now()),f&&(p=e._eventsSpanMap.get(f)),u&&e.removePatchedListener(this,i,o);const y=e._createSpan(f,p);return y?(f&&e._eventsSpanMap.set(f,y),N.with(x.setSpan(N.active(),y),()=>{const v=e._invokeListener(o,this,s);return y.end(),v})):e._invokeListener(o,this,s)};if(e.addPatchedListener(this,i,o,c))return n.call(this,i,c,a)}}_patchRemoveEventListener(){const e=this;return r=>function(n,i,o){const a=e.removePatchedListener(this,n,i);return a?r.call(this,n,a,o):r.call(this,n,i,o)}}_getPatchableEventTargets(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}_patchHistoryApi(){this._unpatchHistoryApi(),this._wrap(history,"replaceState",this._patchHistoryMethod()),this._wrap(history,"pushState",this._patchHistoryMethod()),this._wrap(history,"back",this._patchHistoryMethod()),this._wrap(history,"forward",this._patchHistoryMethod()),this._wrap(history,"go",this._patchHistoryMethod())}_patchHistoryMethod(){const e=this;return r=>function(...n){const i=`${location.pathname}${location.hash}${location.search}`,o=r.apply(this,n),a=`${location.pathname}${location.hash}${location.search}`;return i!==a&&e._updateInteractionName(a),o}}_unpatchHistoryApi(){et(history.replaceState)&&this._unwrap(history,"replaceState"),et(history.pushState)&&this._unwrap(history,"pushState"),et(history.back)&&this._unwrap(history,"back"),et(history.forward)&&this._unwrap(history,"forward"),et(history.go)&&this._unwrap(history,"go")}_updateInteractionName(e){const r=x.getSpan(N.active());r&&typeof r.updateName=="function"&&r.updateName(`${_b} ${e}`)}_patchZoneCancelTask(){const e=this;return r=>function(n){const i=Zone.current,o=e._getCurrentSpan(i);return o&&e._shouldCountTask(n,i)&&e._decrementTask(o),r.call(this,n)}}_patchZoneScheduleTask(){const e=this;return r=>function(n){const i=Zone.current,o=e._getCurrentSpan(i);return o&&e._shouldCountTask(n,i)&&(e._incrementTask(o),e._checkForTimeout(n,o)),r.call(this,n)}}_patchZoneRunTask(){const e=this;return r=>function(n,i,o){const a=Array.isArray(o)&&o[0]instanceof Event?o[0]:void 0,u=a?.target;let c;const s=this;if(u){if(c=e._createSpan(a),c)return e._incrementTask(c),s.run(()=>{try{return N.with(x.setSpan(N.active(),c),()=>{const l=Zone.current;return n._zone=l,r.call(l,n,i,o)})}finally{e._decrementTask(c)}})}else c=e._getCurrentSpan(s);try{return r.call(s,n,i,o)}finally{c&&e._shouldCountTask(n,s)&&e._decrementTask(c)}}}_shouldCountTask(e,r){if(e._zone&&(r=e._zone),!r||!e.data||e.data.isPeriodic)return!1;const n=this._getCurrentSpan(r);return!n||!this._spansData.get(n)?!1:e.type==="macroTask"||e.type==="microTask"}_tryToEndSpan(e,r){e&&this._spansData.get(e)&&(e.end(r),this._spansData.delete(e))}enable(){const e=this._getZoneWithPrototype();this._diag.debug("applying patch to",Wt.moduleName,Wt.version,"zone:",!!e),e?(et(e.prototype.runTask)&&(this._unwrap(e.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),et(e.prototype.scheduleTask)&&(this._unwrap(e.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),et(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(r=>{et(r.addEventListener)&&(this._unwrap(r,"addEventListener"),this._diag.debug("removing previous patch from method addEventListener")),et(r.removeEventListener)&&(this._unwrap(r,"removeEventListener"),this._diag.debug("removing previous patch from method removeEventListener")),this._wrap(r,"addEventListener",this._patchAddEventListener()),this._wrap(r,"removeEventListener",this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){const e=this._getZoneWithPrototype();this._diag.debug("removing patch from",Wt.moduleName,Wt.version,"zone:",!!e),e&&this._zonePatched?(et(e.prototype.runTask)&&this._unwrap(e.prototype,"runTask"),et(e.prototype.scheduleTask)&&this._unwrap(e.prototype,"scheduleTask"),et(e.prototype.cancelTask)&&this._unwrap(e.prototype,"cancelTask")):this._getPatchableEventTargets().forEach(r=>{et(r.addEventListener)&&this._unwrap(r,"addEventListener"),et(r.removeEventListener)&&this._unwrap(r,"removeEventListener")}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}};k(to,"version","0.1.1"),k(to,"moduleName","user-interaction");let Tb=to,q={},fe;const Xr="highlight.record",bb="highlight.session_id",Uu="launchdarkly.js.log",Ob="launchdarkly.exception.id",ju="launchdarkly.sampling.ratio",Bu="log.severity",$u="log.message",Sb=(t,e)=>{var r,n,i,o,a,u,c,s,l;if(q.tracerProvider||q.meterProvider){console.warn("OTEL already initialized. Skipping...");return}fe=t;const p=t.backendUrl||void 0||"https://pub.highlight.io",f=[...(n=(r=t.networkRecordingOptions)==null?void 0:r.urlBlocklist)!=null?n:[],...F_],y=(i=t.environment)!=null?i:"production",v={url:t.otlpEndpoint+"/v1/traces",concurrencyLimit:10,timeoutMillis:3e4,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:6e4,keepAlive:!0}},m=new vb(v,e),_=new wb(m,{maxExportBatchSize:1024,maxQueueSize:2048,exportTimeoutMillis:v.timeoutMillis,scheduledDelayMillis:v.timeoutMillis}),E=new Ve({[Ql]:(o=t.serviceName)!=null?o:"highlight-browser",[Zl]:t.serviceVersion,"deployment.environment.name":y,"highlight.project_id":t.projectId,[np]:navigator.userAgent,"browser.language":navigator.language,"telemetry.distro.name":"@highlight-run/observability","telemetry.distro.version":Ip});q.tracerProvider=new Zy({resource:E,mergeResourceWithDefaults:!0,spanProcessors:[_]}),x.setGlobalTracerProvider(q.tracerProvider);const R=new yb(rt(P({},v),{url:t.otlpEndpoint+"/v1/metrics"})),U=new NE({exporter:R,exportIntervalMillis:v.timeoutMillis,exportTimeoutMillis:v.timeoutMillis});q.meterProvider=new vT({resource:E,readers:[U]}),ie.setGlobalMeterProvider(q.meterProvider);let D=[];((a=t.instrumentations)==null?void 0:a["@opentelemetry/instrumentation-document-load"])!==!1&&D.push(new mm({applyCustomAttributesOnSpan:{documentLoad:Xu,documentFetch:Xu,resourceFetch:Ib}})),((u=t.instrumentations)==null?void 0:u["@opentelemetry/instrumentation-user-interaction"])!==!1&&D.push(new Tb({eventNames:t.eventNames})),(c=t.networkRecordingOptions)!=null&&c.enabled&&(((s=t.instrumentations)==null?void 0:s["@opentelemetry/instrumentation-fetch"])!==!1&&D.push(new i_({propagateTraceHeaderCorsUrls:Ku(t.tracingOrigins),applyCustomAttributesOnSpan:(j,H,B)=>yt(void 0,null,function*(){var Et,qt,K;if(!(!j.attributes||j.attributes[Xr]===!1)){if(Gu(j,H.body,H.headers,t.networkRecordingOptions),!(B instanceof Response)){j.setAttributes({"http.response.error":B.message,[Yl]:B.status});return}if((Et=t.networkRecordingOptions)!=null&&Et.recordHeadersAndBody){const ye=yield Q_(B,(qt=t.networkRecordingOptions)==null?void 0:qt.bodyKeysToRecord,(K=t.networkRecordingOptions)==null?void 0:K.networkBodyKeysToRedact),Kt=Object.fromEntries(B.headers.entries());zu(j,Kt,ye,t.networkRecordingOptions)}}})})),((l=t.instrumentations)==null?void 0:l["@opentelemetry/instrumentation-xml-http-request"])!==!1&&D.push(new B_({propagateTraceHeaderCorsUrls:Ku(t.tracingOrigins),applyCustomAttributesOnSpan:(j,H)=>{var B,Et,qt;const K=H;if(!(!j.attributes||j.attributes[Xr]===!1)&&(Gu(j,K._body,K._requestHeaders,t.networkRecordingOptions),(B=t.networkRecordingOptions)!=null&&B.recordHeadersAndBody)){let ye="";(H.responseType===""||H.responseType==="text")&&(ye=Ii(H.responseText,(Et=t.networkRecordingOptions)==null?void 0:Et.networkBodyKeysToRedact,(qt=t.networkRecordingOptions)==null?void 0:qt.bodyKeysToRecord,void 0));const Kt=Nb(H.getAllResponseHeaders());zu(j,Kt,ye,t.networkRecordingOptions)}}}))),jd({instrumentations:D});const G=new ys;return G.enable(),q.tracerProvider.register({contextManager:G,propagator:new Qh({propagators:[new Lh,new Ab({backendUrl:p,otlpEndpoint:t.otlpEndpoint,tracingOrigins:t.tracingOrigins,urlBlocklist:f})]})}),q};class wb extends hs{onStart(e,r){e.setAttribute(bb,Ot()),super.onStart(e,r)}onEnd(e){e.attributes[Xr]!==!1&&super.onEnd(e)}}class Ab extends vd{constructor(e){super(),k(this,"highlightEndpoints"),k(this,"tracingOrigins"),k(this,"urlBlocklist"),this.highlightEndpoints=[e.backendUrl,`${e.otlpEndpoint}/v1/traces`,`${e.otlpEndpoint}/v1/logs`,`${e.otlpEndpoint}/v1/metrics`],this.tracingOrigins=e.tracingOrigins,this.urlBlocklist=e.urlBlocklist}inject(e,r,n){var i;const o=x.getSpan(e);if(!o||!o.attributes)return;const a=Wu(o);typeof a=="string"&&(Pb(a,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||o.setAttribute(Xr,!1),!Y_(a,(i=this.tracingOrigins)!=null?i:[],this.urlBlocklist))||super.inject(e,r,n)}}const Fu="highlight-browser",Lb=Fu,Vu=()=>{var t;return(t=q.tracerProvider)==null?void 0:t.getTracer(Fu)},qr=()=>{var t;return(t=q.meterProvider)==null?void 0:t.getMeter(Lb)},Rb=()=>yt(void 0,null,function*(){yield Promise.allSettled([yt(void 0,null,function*(){q.tracerProvider?(yield q.tracerProvider.shutdown(),q.tracerProvider=void 0):console.warn("OTEL shutdown called without initialized tracerProvider.")}),yt(void 0,null,function*(){q.meterProvider?(yield q.meterProvider.shutdown(),q.meterProvider=void 0):console.warn("OTEL shutdown called without initialized meterProvider.")})])}),Gu=(t,e,r,n)=>{var i;if(!t.attributes)return;const o=Wu(t),a=Ds(o),u=ks(a),c=typeof e=="string"?e:String(e);try{const l=e?JSON.parse(c):void 0;l!=null&&l.operationName&&t.setAttribute("graphql.operation.name",l.operationName)}catch{}t.setAttributes({"highlight.type":"http.request",[He]:a,[fr]:a,[Bo]:u.pathname,[rp]:u.search});const s=Array.from(u.searchParams.entries());if(s.length>0&&t.setAttribute("url.query_params",JSON.stringify(Object.fromEntries(s))),n!=null&&n.recordHeadersAndBody){const l=Ii(e,n.networkBodyKeysToRedact,n.bodyKeysToRecord,r);t.setAttribute("http.request.body",l);const p=Ms((i=n.networkHeadersToRedact)!=null?i:[],r,n.headerKeysToRecord),f=Hu(p,"http.request.header");t.setAttributes(f)}},Nb=t=>{const e={};return t&&t.trim().split(/[\r\n]+/).forEach(r=>{const n=r.split(": "),i=n.shift();i&&(e[i]=n.join(": "))}),e},Hu=(t,e)=>{const r={};return Object.entries(t).forEach(([n,i])=>{const o=n.toLowerCase().replace(/_/g,"-"),a=`${e}.${o}`,u=xb(o,i);if(r[a]){const c=r[a];Array.isArray(c)?r[a]=[...c,...u]:r[a]=[c,...u]}else r[a]=u.length===1?u[0]:u}),r},Cb=new Set(["accept","accept-charset","accept-encoding","accept-language","accept-ranges","allow","cache-control","connection","content-encoding","content-language","expect","if-match","if-none-match","pragma","proxy-authenticate","te","trailer","transfer-encoding","upgrade","vary","via","warning","www-authenticate","access-control-allow-headers","access-control-allow-methods","access-control-expose-headers","access-control-request-headers"]),xb=(t,e)=>Cb.has(t)?e.split(",").map(r=>r.trim()).filter(r=>r.length>0):[e],zu=(t,e,r,n)=>{var i;t.setAttribute("http.response.body",r);const o=Ms((i=n.networkHeadersToRedact)!=null?i:[],e,n.headerKeysToRecord),a=Hu(o,"http.response.header");t.setAttributes(a)},Pb=(t,e,r,n)=>n!=null&&n.some(i=>t.toLowerCase().includes(i))?!1:W_(t,e),Xu=t=>{var e,r,n;if(!t.events)return;const i=t.events,o={unload:it("unloadEventStart","unloadEventEnd",i),dom_interactive:it("fetchStart","domInteractive",i),dom_content_loaded:it("domContentLoadedEventStart","domContentLoadedEventEnd",i),dom_complete:it("fetchStart","domComplete",i),load_event:it("loadEventStart","loadEventEnd",i),document_load:it("fetchStart","loadEventEnd",i),first_paint:it("fetchStart","firstPaint",i),first_contentful_paint:it("fetchStart","firstContentfulPaint",i),domain_lookup:it("domainLookupStart","domainLookupEnd",i),connect:it("connectStart","connectEnd",i),request:it("requestStart","requestEnd",i),response:it("responseStart","responseEnd",i)},a=(r=(e=fe?.getIntegrations)==null?void 0:e.call(fe))!=null?r:[];if(o.document_load!==void 0)for(const u of a)u.recordGauge((n=fe?.sessionSecureId)!=null?n:"",{name:Lp,value:o.document_load/1e6});Object.entries(o).forEach(([u,c])=>{c!==void 0&&(t.setAttribute(`timings.${u}.ns`,c),t.setAttribute(`timings.${u}.readable`,qu(c)))})};function it(t,e,r){const n=r.find(a=>a.name===t),i=r.find(a=>a.name===e);if(!n||!i)return;const o=n.time[0]*1e9+n.time[1];return i.time[0]*1e9+i.time[1]-o}const Ib=(t,e)=>{const r={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};Object.entries(r).forEach(([n,i])=>{t.setAttribute(`timings.${n}.ns`,i),t.setAttribute(`timings.${n}.readable`,qu(i))})},qu=t=>{if(t>=36e11){const e=t/36e11;return`${Number(e.toFixed(1))}h`}else if(t>=6e10){const e=t/6e10;return`${Number(e.toFixed(1))}m`}else if(t>=1e9){const e=t/1e9;return`${Number(e.toFixed(1))}s`}else if(t>=1e6){const e=t/1e6;return`${Number(e.toFixed(1))}ms`}else if(t>=1e3){const e=t/1e3;return`${Number(e.toFixed(1))}µs`}else return`${Number(t.toFixed(1))}ns`},Ku=t=>t===!0?[/localhost/,/^\//,new RegExp(window.location.host)]:Array.isArray(t)?t.map(e=>typeof e=="string"?new RegExp(e):e):/^$/,Wu=t=>t.attributes[fr]?t.attributes[fr]:t.attributes[He],Mb=30,kb=()=>new Promise(t=>requestAnimationFrame(e=>requestAnimationFrame(r=>t(r-e)))),Db=()=>yt(void 0,null,function*(){const t=[];for(let e=0;e<Mb;e++)t.push(yield kb());return t.reduce((e,r)=>e+r,0)/t.length}),Ub=(t,e)=>{let r={},n=16.666666666666668;Db().then(c=>n=c);const i=c=>{var s;r!=null&&r.event||(r={event:c,location:window.location.href,timerStart:(s=window.performance)==null?void 0:s.now()},window.requestAnimationFrame(o))},o=()=>{if(!(r!=null&&r.timerStart))return;const c=window.performance.now()-r.timerStart-n;a(c),r={}},a=c=>{const s=(new Date().getTime()-e)/1e3;t({relativeTimestamp:s,jankAmount:c,querySelector:u(),newLocation:window.location.href!=r.location?window.location.href:void 0})},u=()=>{var c;return(c=r?.event)!=null&&c.target?Mp(r.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},jb=typeof window<"u",Yu=jb&&"performance"in window&&"memory"in performance?performance:{memory:{}},Bb=(t,e)=>{let r=0,n=0;const i=()=>{const s=(new Date().getTime()-e)/1e3,l=Yu.memory.jsHeapSizeLimit||0,p=Yu.memory.usedJSHeapSize||0;t({jsHeapSizeLimit:l,usedJSHeapSize:p,relativeTimestamp:s,fps:r})};i();let o;o=setInterval(()=>{i()},1e3);let a=0,u=Date.now();const c=function(){var s=Date.now();a++,s>1e3+u&&(r=Math.round(a*1e3/(s-u)),a=0,u=s),n=requestAnimationFrame(c)};return c(),()=>{clearInterval(o),cancelAnimationFrame(n)}};var Ct,We,Ju,Kr,eo,Qu=-1,Xt=function(t){addEventListener("pageshow",function(e){e.persisted&&(Qu=e.timeStamp,t(e))},!0)},ro=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},Wr=function(){var t=ro();return t&&t.activationStart||0},ot=function(t,e){var r=ro(),n="navigate";return Qu>=0?n="back-forward-cache":r&&(document.prerendering||Wr()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:t,value:e===void 0?-1:e,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:n}},he=function(t,e,r){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var n=new PerformanceObserver(function(i){Promise.resolve().then(function(){e(i.getEntries())})});return n.observe(Object.assign({type:t,buffered:!0},r||{})),n}}catch{}},at=function(t,e,r,n){var i,o;return function(a){e.value>=0&&(a||n)&&((o=e.value-(i||0))||i===void 0)&&(i=e.value,e.delta=o,e.rating=function(u,c){return u>c[1]?"poor":u>c[0]?"needs-improvement":"good"}(e.value,r),t(e))}},no=function(t){requestAnimationFrame(function(){return requestAnimationFrame(function(){return t()})})},Yr=function(t){var e=function(r){r.type!=="pagehide"&&document.visibilityState!=="hidden"||t(r)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},io=function(t){var e=!1;return function(r){e||(t(r),e=!0)}},de=-1,Zu=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Jr=function(t){document.visibilityState==="hidden"&&de>-1&&(de=t.type==="visibilitychange"?t.timeStamp:0,$b())},tc=function(){addEventListener("visibilitychange",Jr,!0),addEventListener("prerenderingchange",Jr,!0)},$b=function(){removeEventListener("visibilitychange",Jr,!0),removeEventListener("prerenderingchange",Jr,!0)},oo=function(){return de<0&&(de=Zu(),tc(),Xt(function(){setTimeout(function(){de=Zu(),tc()},0)})),{get firstHiddenTime(){return de}}},Ye=function(t){document.prerendering?addEventListener("prerenderingchange",function(){return t()},!0):t()},ec=[1800,3e3],rc=function(t,e){e=e||{},Ye(function(){var r,n=oo(),i=ot("FCP"),o=he("paint",function(a){a.forEach(function(u){u.name==="first-contentful-paint"&&(o.disconnect(),u.startTime<n.firstHiddenTime&&(i.value=Math.max(u.startTime-Wr(),0),i.entries.push(u),r(!0)))})});o&&(r=at(t,i,ec,e.reportAllChanges),Xt(function(a){i=ot("FCP"),r=at(t,i,ec,e.reportAllChanges),no(function(){i.value=performance.now()-a.timeStamp,r(!0)})}))})},nc=[.1,.25],Fb=function(t,e){e=e||{},rc(io(function(){var r,n=ot("CLS",0),i=0,o=[],a=function(c){c.forEach(function(s){if(!s.hadRecentInput){var l=o[0],p=o[o.length-1];i&&s.startTime-p.startTime<1e3&&s.startTime-l.startTime<5e3?(i+=s.value,o.push(s)):(i=s.value,o=[s])}}),i>n.value&&(n.value=i,n.entries=o,r())},u=he("layout-shift",a);u&&(r=at(t,n,nc,e.reportAllChanges),Yr(function(){a(u.takeRecords()),r(!0)}),Xt(function(){i=0,n=ot("CLS",0),r=at(t,n,nc,e.reportAllChanges),no(function(){return r()})}),setTimeout(r,0))}))},Je={passive:!0,capture:!0},Vb=new Date,ic=function(t,e){Ct||(Ct=e,We=t,Ju=new Date,ac(removeEventListener),oc())},oc=function(){if(We>=0&&We<Ju-Vb){var t={entryType:"first-input",name:Ct.type,target:Ct.target,cancelable:Ct.cancelable,startTime:Ct.timeStamp,processingStart:Ct.timeStamp+We};Kr.forEach(function(e){e(t)}),Kr=[]}},Gb=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;t.type=="pointerdown"?function(r,n){var i=function(){ic(r,n),a()},o=function(){a()},a=function(){removeEventListener("pointerup",i,Je),removeEventListener("pointercancel",o,Je)};addEventListener("pointerup",i,Je),addEventListener("pointercancel",o,Je)}(e,t):ic(e,t)}},ac=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,Gb,Je)})},sc=[100,300],Hb=function(t,e){e=e||{},Ye(function(){var r,n=oo(),i=ot("FID"),o=function(c){c.startTime<n.firstHiddenTime&&(i.value=c.processingStart-c.startTime,i.entries.push(c),r(!0))},a=function(c){c.forEach(o)},u=he("first-input",a);r=at(t,i,sc,e.reportAllChanges),u&&Yr(io(function(){a(u.takeRecords()),u.disconnect()})),u&&Xt(function(){var c;i=ot("FID"),r=at(t,i,sc,e.reportAllChanges),Kr=[],We=-1,Ct=null,ac(addEventListener),c=o,Kr.push(c),oc()})})},uc=0,ao=1/0,Qr=0,zb=function(t){t.forEach(function(e){e.interactionId&&(ao=Math.min(ao,e.interactionId),Qr=Math.max(Qr,e.interactionId),uc=Qr?(Qr-ao)/7+1:0)})},cc=function(){return eo?uc:performance.interactionCount||0},Xb=function(){"interactionCount"in performance||eo||(eo=he("event",zb,{type:"event",buffered:!0,durationThreshold:0}))},lc=[200,500],pc=0,fc=function(){return cc()-pc},dt=[],so={},hc=function(t){var e=dt[dt.length-1],r=so[t.interactionId];if(r||dt.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]};so[n.id]=n,dt.push(n)}dt.sort(function(i,o){return o.latency-i.latency}),dt.splice(10).forEach(function(i){delete so[i.id]})}},qb=function(t,e){e=e||{},Ye(function(){var r;Xb();var n,i=ot("INP"),o=function(u){u.forEach(function(l){l.interactionId&&hc(l),l.entryType==="first-input"&&!dt.some(function(p){return p.entries.some(function(f){return l.duration===f.duration&&l.startTime===f.startTime})})&&hc(l)});var c,s=(c=Math.min(dt.length-1,Math.floor(fc()/50)),dt[c]);s&&s.latency!==i.value&&(i.value=s.latency,i.entries=s.entries,n())},a=he("event",o,{durationThreshold:(r=e.durationThreshold)!==null&&r!==void 0?r:40});n=at(t,i,lc,e.reportAllChanges),a&&("interactionId"in PerformanceEventTiming.prototype&&a.observe({type:"first-input",buffered:!0}),Yr(function(){o(a.takeRecords()),i.value<0&&fc()>0&&(i.value=0,i.entries=[]),n(!0)}),Xt(function(){dt=[],pc=cc(),i=ot("INP"),n=at(t,i,lc,e.reportAllChanges)}))})},dc=[2500,4e3],uo={},Kb=function(t,e){e=e||{},Ye(function(){var r,n=oo(),i=ot("LCP"),o=function(c){var s=c[c.length-1];s&&s.startTime<n.firstHiddenTime&&(i.value=Math.max(s.startTime-Wr(),0),i.entries=[s],r())},a=he("largest-contentful-paint",o);if(a){r=at(t,i,dc,e.reportAllChanges);var u=io(function(){uo[i.id]||(o(a.takeRecords()),a.disconnect(),uo[i.id]=!0,r(!0))});["keydown","click"].forEach(function(c){addEventListener(c,function(){return setTimeout(u,0)},!0)}),Yr(u),Xt(function(c){i=ot("LCP"),r=at(t,i,dc,e.reportAllChanges),no(function(){i.value=performance.now()-c.timeStamp,uo[i.id]=!0,r(!0)})})}})},vc=[800,1800],Wb=function t(e){document.prerendering?Ye(function(){return t(e)}):document.readyState!=="complete"?addEventListener("load",function(){return t(e)},!0):setTimeout(e,0)},Yb=function(t,e){e=e||{};var r=ot("TTFB"),n=at(t,r,vc,e.reportAllChanges);Wb(function(){var i=ro();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;r.value=Math.max(o-Wr(),0),r.entries=[i],n(!0),Xt(function(){r=ot("TTFB",0),(n=at(t,r,vc,e.reportAllChanges))(!0)})}})};const Jb=t=>(Fb(t),rc(t),Hb(t),Kb(t),Yb(t),qb(t),()=>{}),ve=typeof navigator<"u"&&"connection"in navigator?navigator.connection:{},Qb=(t,e)=>{const r=()=>{const i=(new Date().getTime()-e)/1e3;t({relativeTimestamp:i,downlink:ve.downlink,downlinkMax:ve.downlinkMax,effectiveType:ve.effectiveType,rtt:ve.rtt,saveData:ve.saveData,type:ve.type})};r();let n;return n=setInterval(()=>{r()},1e3),()=>{clearInterval(n)}},Zb=()=>{if(!("performance"in window&&"memory"in performance))return{getDeviceDetails:void 0,getCurrentDeviceDetails:void 0};const t=window.performance;return{getDeviceDetails:()=>({deviceMemory:tO(navigator.deviceMemory||0)}),getCurrentDeviceDetails:()=>{const e=co(t.memory.jsHeapSizeLimit),r=co(t.memory.totalJSHeapSize),n=co(t.memory.usedJSHeapSize);return{jsHeapSizeLimit:e,totalJSHeapSize:r,usedJSHeapSize:n}}}},co=t=>t/Math.pow(1e3,2),tO=t=>1024*t;function eO(t){return"regexValue"in t}function rO(t){return"matchValue"in t}function nO(t){const e=Math.trunc(t);return e===1?!0:e===0?!1:Math.floor(Math.random()*e)===0}class iO{constructor(e=nO){k(this,"regexCache",new Map),k(this,"config"),this.sampler=e}setConfig(e){this.config=e}isSamplingEnabled(){var e,r,n,i;return!!((r=(e=this.config)==null?void 0:e.logs)!=null&&r.length||(i=(n=this.config)==null?void 0:n.spans)!=null&&i.length)}shouldSample(e){var r,n;return e.name===Uu?this.sampleLog((r=this.config)==null?void 0:r.logs,e):this.sampleSpan((n=this.config)==null?void 0:n.spans,e)}matchesValue(e,r){if(!e)return!1;if(rO(e))return e.matchValue===r;if(eO(e)){const n=e.regexValue;if(n===null)return!1;this.regexCache.has(n)||this.regexCache.set(n,new RegExp(n));const i=this.regexCache.get(n);if(typeof r=="string")return i.test(r)}return!1}matchesAttributes(e,r){if(e)for(const n of e){let i=!1;for(const o of Object.keys(r))if(this.matchesValue(n.key,o)){const a=r[o];if(this.matchesValue(n.attribute,a)){i=!0;break}}if(!i)return!1}return!0}matchEvent(e,r){return!(e.name&&!this.matchesValue(e.name,r.name)||e.attributes&&(!r.attributes||!this.matchesAttributes(e.attributes,r.attributes)))}matchesEvents(e,r){if(e)for(const n of e){let i=!1;for(const o of r)if(this.matchEvent(n,o)){i=!0;break}if(!i)return!1}return!0}matchesSpanConfig(e,r){return!(e.name&&!this.matchesValue(e.name,r.name)||!this.matchesAttributes(e.attributes,r.attributes)||!this.matchesEvents(e.events,r.events))}matchesLogConfig(e,r){if(e.severityText){const n=r[Bu];if(!this.matchesValue(e.severityText,n))return!1}if(e.message){const n=r[$u];if(!this.matchesValue(e.message,n))return!1}return!!this.matchesAttributes(e.attributes,r)}sampleSpan(e,r){if(e){for(const n of e)if(this.matchesSpanConfig(n,r))return{sample:this.sampler(n.samplingRatio),attributes:{[ju]:n.samplingRatio}}}return{sample:!0}}sampleLog(e,r){if(e){for(const n of e)if(this.matchesLogConfig(n,r.attributes))return{sample:this.sampler(n.samplingRatio),attributes:{[ju]:n.samplingRatio}}}return{sample:!0}}}const yc=()=>{const 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},oO="exception",aO=function(t,e,r){if(!t)return;const n=P({},r);typeof e=="string"?n[_n]=e:e&&(e.code?n[gn]=e.code.toString():e.name&&(n[gn]=e.name),e.message&&(n[_n]=e.message),e.stack&&(n[Wl]=e.stack)),n[gn]||n[_n]?t.addEvent(oO,n):bt("otel","recordException","warn",`Failed to record an exception ${e}`)};class sO{constructor(e){k(this,"organizationID"),k(this,"_options"),k(this,"_integrations",[]),k(this,"_gauges",new Map),k(this,"_counters",new Map),k(this,"_histograms",new Map),k(this,"_up_down_counters",new Map),k(this,"sampler",new iO),k(this,"_started",!1),k(this,"graphqlSDK"),this._options=e,this.organizationID=e.projectId}start(){return yt(this,null,function*(){var e,r,n,i,o,a,u,c,s,l,p,f,y,v,m,_,E;if(this._started)return;this._started=!0,Sb({backendUrl:(r=(e=this._options)==null?void 0:e.backendUrl)!=null?r:"https://pub.observability.app.launchdarkly.com",otlpEndpoint:(o=(i=(n=this._options)==null?void 0:n.otel)==null?void 0:i.otlpEndpoint)!=null?o:"https://otel.observability.app.launchdarkly.com",projectId:this._options.projectId,sessionSecureId:this._options.sessionSecureId,environment:(u=(a=this._options)==null?void 0:a.environment)!=null?u:"production",networkRecordingOptions:typeof((c=this._options)==null?void 0:c.networkRecording)=="object"?this._options.networkRecording:void 0,tracingOrigins:(s=this._options)==null?void 0:s.tracingOrigins,serviceName:(p=(l=this._options)==null?void 0:l.serviceName)!=null?p:"browser",serviceVersion:(f=this._options)==null?void 0:f.version,instrumentations:(v=(y=this._options)==null?void 0:y.otel)==null?void 0:v.instrumentations,eventNames:(_=(m=this._options)==null?void 0:m.otel)==null?void 0:_.eventNames,getIntegrations:()=>this._integrations},this.sampler),this._gauges.clear(),this._counters.clear(),this._histograms.clear(),this._up_down_counters.clear();const R=new Ol((E=this._options.backendUrl)!=null?E:"https://pub.observability.app.launchdarkly.com",{headers:{}});this.graphqlSDK=zl(R,vp()),yield this.configureSampling(),this.setupListeners()})}stop(){return yt(this,null,function*(){this._started&&(this._started=!1,yield Rb())})}configureSampling(){return yt(this,null,function*(){try{const e=yield this.graphqlSDK.GetSamplingConfig({organization_verbose_id:`${this.organizationID}`});this.sampler.setConfig(e.sampling)}catch(e){Tt("sampling","warn",`LaunchDarkly Observability: Failed to configure sampling: ${e}`)}})}_recordLog(e,r,n,i){this.startSpan(Uu,o=>{const a=typeof e=="string"?e:be(e),u=i?be(i.map(c=>c.toString())):void 0;if(o?.addEvent("log",P({[Bu]:r,[$u]:a,"code.stacktrace":u},n)),this._options.reportConsoleErrors&&r==="error"){o?.recordException(new Error(a)),o?.setStatus({code:Tr.ERROR,message:a});const c=new Error(a);i&&(c.stack=u),this.recordError(c)}})}_recordErrorMessage(e,r){try{e.payload&&(r=P(P({},JSON.parse(e.payload)),r||{}))}catch{}this.startSpan("highlight.exception",o=>{var a;aO(o,(a=e.error)!=null?a:new Error(e.event),{[Ob]:e.id}),o?.setAttributes(P({event:e.event,type:e.type,url:e.url,source:e.source,lineNumber:e.lineNumber,columnNumber:e.columnNumber},r))});const n=e,i=Hp(n,["payload"]);for(const o of this._integrations)o.error(Ot(),rt(P({},i),{payload:JSON.stringify(r)}))}recordError(e,r,n,i,o){var a,u,c,s;e=e||new Error("Unknown error"),e instanceof Error&&e.cause&&(n=rt(P({},n),{"exception.cause":JSON.stringify(e.cause)}));let l=r?r+":"+e.message:e.message;o==="React.ErrorBoundary"&&(l="ErrorBoundary: "+l);const p=mr(e),f={error:e,event:l,type:o??"custom",url:window.location.href,source:i??"frontend",lineNumber:(a=p[0])!=null&&a.lineNumber?(u=p[0])==null?void 0:u.lineNumber:0,columnNumber:(c=p[0])!=null&&c.columnNumber?(s=p[0])==null?void 0:s.columnNumber:0,stackTrace:p,timestamp:new Date().toISOString(),id:ua()};this._recordErrorMessage(f,n)}recordCount(e){var r;let n=this._counters.get(e.name);if(!n){if(n=(r=qr())==null?void 0:r.createCounter(e.name),!n)return;this._counters.set(e.name,n)}n.add(e.value,rt(P({},e.attributes),{"highlight.session_id":Ot()}))}recordGauge(e){var r,n,i,o;let a=this._gauges.get(e.name);if(!a){if(a=(r=qr())==null?void 0:r.createGauge(e.name),!a)return;this._gauges.set(e.name,a)}a.record(e.value,rt(P({},e.attributes),{"highlight.session_id":Ot()}));const u={name:e.name,value:e.value,category:(n=e.attributes)==null?void 0:n.category,group:(o=(i=e.attributes)==null?void 0:i.group)==null?void 0:o.toString(),tags:e.attributes?Object.entries(e.attributes).map(([c,s])=>{var l;return{name:c??"",value:(l=s?.toString())!=null?l:""}}):[]};for(const c of this._integrations)c.recordGauge(Ot(),u)}recordIncr(e){this.recordCount(rt(P({},e),{value:1}))}recordHistogram(e){var r;let n=this._histograms.get(e.name);if(!n){if(n=(r=qr())==null?void 0:r.createHistogram(e.name),!n)return;this._histograms.set(e.name,n)}n.record(e.value,rt(P({},e.attributes),{"highlight.session_id":Ot()}))}recordUpDownCounter(e){var r;let n=this._up_down_counters.get(e.name);if(!n){if(n=(r=qr())==null?void 0:r.createUpDownCounter(e.name),!n)return;this._up_down_counters.set(e.name,n)}n.add(e.value,rt(P({},e.attributes),{"highlight.session_id":Ot()}))}startSpan(e,r,n,i){const o=Vu();if(!o){const u=yc();return i===void 0&&n===void 0?r(u):i===void 0?n(u):i(u)}const a=(u,c)=>{const s=c(u);return s instanceof Promise?s.finally(()=>u.end()):(u.end(),s)};return i===void 0&&n===void 0?o.startActiveSpan(e,u=>a(u,r)):i===void 0?o.startActiveSpan(e,r,u=>a(u,n)):o.startActiveSpan(e,r,n,u=>a(u,i))}startManualSpan(e,r,n,i){const o=Vu();if(!o){const a=yc();return i===void 0&&n===void 0?r(a):i===void 0?n(a):i(a)}return i===void 0&&n===void 0?o.startActiveSpan(e,r):i===void 0?o.startActiveSpan(e,r,n):o.startActiveSpan(e,r,n,i)}register(e,r){this._integrations.push(new Cp(e,r))}getHooks(e){return this._integrations.flatMap(r=>{var n,i;return(i=(n=r.getHooks)==null?void 0:n.call(r,e))!=null?i:[]})}submitViewportMetrics({height:e,width:r,availHeight:n,availWidth:i}){this.recordGauge({name:Pt.ViewportHeight,value:e,attributes:{category:ut.Device,group:window.location.href}}),this.recordGauge({name:Pt.ViewportWidth,value:r,attributes:{category:ut.Device,group:window.location.href}}),this.recordGauge({name:Pt.ScreenHeight,value:n,attributes:{category:ut.Device,group:window.location.href}}),this.recordGauge({name:Pt.ScreenWidth,value:i,attributes:{category:ut.Device,group:window.location.href}}),this.recordGauge({name:Pt.ViewportArea,value:e*r,attributes:{category:ut.Device,group:window.location.href}})}setupListeners(){var e;this._options.disableConsoleRecording||Kp(n=>{var i;this._recordLog((i=n.value)==null?void 0:i.join(" "),n.type,n.attributes?JSON.parse(n.attributes):{},n.trace)},{level:(e=this._options.consoleMethodsToRecord)!=null?e:[...zp],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),this._options.enablePerformanceRecording!==!1&&(Bb(n=>{Object.entries(n).filter(([i])=>i!=="relativeTimestamp").forEach(([i,o])=>o&&this.recordGauge({name:i,value:o,attributes:{category:ut.Performance,group:window.location.href}}))},0),Ub(n=>{this.recordGauge({name:"Jank",value:n.jankAmount,attributes:{category:ut.WebVital,group:n.querySelector}})},0)),nf(n=>{var i;if(af.includes(n.event)||sf.some(u=>n.event.includes(u)))return;const o=new Error(n.event);o.stack=be(n.stackTrace.map(u=>u.toString()));let a={};try{n.payload&&(a=JSON.parse(n.payload))}catch{}this._recordErrorMessage(rt(P({},n),{error:(i=n.error)!=null?i:o}),a)},{enablePromisePatch:!!this._options.enablePromisePatch}),Jb(n=>{const{name:i,value:o}=n,{hostname:a,pathname:u,href:c}=window.location;this.recordGauge({name:i,value:o,attributes:{group:window.location.pathname,category:ut.WebVital,[fr]:Ds(c),[Bo]:u,[Jl]:a}})}),kp(n=>{this.submitViewportMetrics(n)}),Qb(n=>{const i={category:ut.Performance,group:window.location.href};n.saveData!==void 0&&(i.saveData=n.saveData.toString()),n.effectiveType!==void 0&&(i.effectiveType=n.effectiveType.toString()),n.type!==void 0&&(i.type=n.type.toString()),Object.entries(n).filter(([o])=>o!=="relativeTimestamp").forEach(([o,a])=>{Kl(a)&&this.recordGauge({name:o,value:a,attributes:i})})},new Date().getTime());const{getDeviceDetails:r}=Zb();r&&this.recordGauge({name:Pt.DeviceMemory,value:r().deviceMemory,attributes:{category:ut.Device,group:window.location.href}})}recordLog(e,r,n){return this._recordLog(e,r,n)}}class uO extends Bp{constructor(e){super(e),k(this,"observe"),k(this,"options"),this.options=e}initialize(e,r){try{if(typeof window>"u"||typeof document>"u"){console.warn("@launchdarkly/observability is not initializing because it is not supported in this environment.");return}if(!e){console.warn("@launchdarkly/observability is not initializing because the SDK credential is undefined.");return}this.configureSession(e,r),this.observe=new sO(rt(P({},r),{projectId:e,sessionSecureId:this.sessionSecureID})),r!=null&&r.manualStart||this.observe.start(),nt.LDObserve.load(this.observe)}catch(n){Tt("Error initializing @launchdarkly/observability SDK","error",n)}}getMetadata(){return{name:"@launchdarkly/observability"}}register(e,r){var n;(n=this.observe)==null||n.register(e,r)}getHooks(e){var r,n,i,o;const a=P(P({[tp]:e.sdk.name,[ep]:e.sdk.version,[mp]:e.clientSideId,[bp]:"LaunchDarkly"},(r=e.application)!=null&&r.id?{[Sp]:e.application.id}:{}),(n=e.application)!=null&&n.version?{[wp]:e.application.version}:{});return this.initialize((o=(i=e.sdkKey)!=null?i:e.mobileKey)!=null?o:e.clientSideId,this.options),[{getMetadata:()=>({name:"@launchdarkly/observability/hooks"}),afterIdentify:(u,c,s)=>{var l,p,f,y,v,m,_,E;for(const R of(f=(p=(l=this.observe)==null?void 0:l.getHooks)==null?void 0:p.call(l,e))!=null?f:[])(y=R.afterIdentify)==null||y.call(R,u,c,s);if(s.status==="completed"){const R=rt(P({},Qo(u.context)),{key:(_=(m=(v=this.options)==null?void 0:v.contextFriendlyName)==null?void 0:m.call(v,u.context))!=null?_:Nn(u.context),timeout:u.timeout,canonicalKey:Nn(u.context),[Rp]:s.status});(E=this.observe)==null||E.recordLog("LD.identify","info",P(P({},a),R))}return c},afterEvaluation:(u,c,s)=>{var l,p,f,y,v;for(const E of(f=(p=(l=this.observe)==null?void 0:l.getHooks)==null?void 0:p.call(l,e))!=null?f:[])(y=E.afterEvaluation)==null||y.call(E,u,c,s);const m=P({[_p]:u.flagKey,[Tp]:JSON.stringify(s.value)},s.variationIndex?{[Op]:s.variationIndex}:{});if(s.reason)for(const E in Ko){const R=E,U=s.reason[R];U&&(m[Ko[R]]=U)}u.context&&(m[gp]=JSON.stringify(Qo(u.context)),m[Ep]=Nn(u.context));const _=P(P({},a),m);return(v=this.observe)==null||v.startSpan(yp,E=>{E&&E.addEvent(J,_)}),c},afterTrack:u=>{var c,s,l,p,f;for(const y of(l=(s=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:s.call(c,e))!=null?l:[])(p=y.afterTrack)==null||p.call(y,u);(f=this.observe)==null||f.recordLog("LD.track","info",P(rt(P({},a),{key:u.key,value:u.metricValue}),typeof u.data=="object"?u.data:{}))}}]}}nt.default=uO,Object.defineProperties(nt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
309
+ //# sourceMappingURL=index.umd.js.map