@launchdarkly/o11y 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/{common-7gIdCuSo.js → common-D8kkCWo3.js} +2 -2
- package/dist/{common-7gIdCuSo.js.map → common-D8kkCWo3.js.map} +1 -1
- package/dist/index.js +5 -5
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/{observe-DVzqBVcI.js → observe-BCebRa17.js} +4 -3
- package/dist/{observe-DVzqBVcI.js.map → observe-BCebRa17.js.map} +1 -1
- package/dist/observe.js +2 -2
- package/dist/{record-CwkFdJT0.js → record-DG2IcHxO.js} +2 -2
- package/dist/{record-CwkFdJT0.js.map → record-DG2IcHxO.js.map} +1 -1
- package/dist/record.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -40,11 +40,11 @@ var R = (s, e, t) => new Promise((i, n) => {
|
|
|
40
40
|
}, l = (d) => d.done ? i(d.value) : Promise.resolve(d.value).then(o, r);
|
|
41
41
|
l((t = t.apply(s, e)).next());
|
|
42
42
|
});
|
|
43
|
-
import { W as Qe, M as L, r as J, I as ve, a as Re, S as Ye, C as Xe, F as Ze, b as et, P as tt, c as _e, g as st, p as it, d as nt, e as rt, f as ot, h as at, s as ct, i as lt } from "./record-
|
|
44
|
-
import { R as ds } from "./record-
|
|
45
|
-
import { s as K, G as T, g as F, S as E, r as De, a as Q, b as dt, c as ht, d as Y, e as X, f as W, F as Ie, V as gt, P as ut, h as ft, H as Z, M as mt, i as wt, L as We, j as ze, k as pt, p as St, l as Ce, m as Le, n as yt, o as bt, q as kt, t as vt, u as Rt, v as _t, w as Dt, x as It, y as Ct } from "./common-
|
|
46
|
-
import { X as Lt, F as Et, A as Nt, C as Tt, E as Ot, s as Be, D as Pt, a as Ht, m as Ee, d as Me, b as Ne, c as Te, r as Fe, e as Ut, p as Wt, f as zt, g as Bt, M as D, h as N, W as Mt, N as Ft, P as $t, J as Vt, i as x, j as A, k as xt, l as At, n as Kt, o as Oe } from "./observe-
|
|
47
|
-
import { O as gs } from "./observe-
|
|
43
|
+
import { W as Qe, M as L, r as J, I as ve, a as Re, S as Ye, C as Xe, F as Ze, b as et, P as tt, c as _e, g as st, p as it, d as nt, e as rt, f as ot, h as at, s as ct, i as lt } from "./record-DG2IcHxO.js";
|
|
44
|
+
import { R as ds } from "./record-DG2IcHxO.js";
|
|
45
|
+
import { s as K, G as T, g as F, S as E, r as De, a as Q, b as dt, c as ht, d as Y, e as X, f as W, F as Ie, V as gt, P as ut, h as ft, H as Z, M as mt, i as wt, L as We, j as ze, k as pt, p as St, l as Ce, m as Le, n as yt, o as bt, q as kt, t as vt, u as Rt, v as _t, w as Dt, x as It, y as Ct } from "./common-D8kkCWo3.js";
|
|
46
|
+
import { X as Lt, F as Et, A as Nt, C as Tt, E as Ot, s as Be, D as Pt, a as Ht, m as Ee, d as Me, b as Ne, c as Te, r as Fe, e as Ut, p as Wt, f as zt, g as Bt, M as D, h as N, W as Mt, N as Ft, P as $t, J as Vt, i as x, j as A, k as xt, l as At, n as Kt, o as Oe } from "./observe-BCebRa17.js";
|
|
47
|
+
import { O as gs } from "./observe-BCebRa17.js";
|
|
48
48
|
import { L as qt, s as Gt, a as O } from "./buffer-CwCRPuMA.js";
|
|
49
49
|
import { g as Pe } from "./LDObserve-BQr7RYVC.js";
|
|
50
50
|
import { L as fs } from "./LDObserve-BQr7RYVC.js";
|
package/dist/index.umd.js
CHANGED
|
@@ -459,11 +459,11 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o
|
|
|
459
459
|
To resolve the conflict:`,Pm(a,t))),s=c):Y.warn("A view or instrument with the name ",t.name,` has already been registered and is incompatible with another registered view.
|
|
460
460
|
`,`Details:
|
|
461
461
|
`,Wm(a,t),`To resolve the conflict:
|
|
462
|
-
`,Pm(a,t))}}catch(h){n={error:h}}finally{try{l&&!l.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return s},e}(),pZ=function(){function e(t){this._backingStorages=t}return e.prototype.record=function(t,r,n,i){this._backingStorages.forEach(function(s){s.record(t,r,n,i)})},e}(),mZ=function(){function e(t,r){this._instrumentName=t,this._valueType=r,this._buffer=new Ir}return e.prototype.observe=function(t,r){if(r===void 0&&(r={}),typeof t!="number"){Y.warn("non-number value provided to metric "+this._instrumentName+": "+t);return}this._valueType===qt.INT&&!Number.isInteger(t)&&(Y.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),t=Math.trunc(t),!Number.isInteger(t))||this._buffer.set(r,t)},e}(),gZ=function(){function e(){this._buffer=new Map}return e.prototype.observe=function(t,r,n){if(n===void 0&&(n={}),!!bc(t)){var i=this._buffer.get(t);if(i==null&&(i=new Ir,this._buffer.set(t,i)),typeof r!="number"){Y.warn("non-number value provided to metric "+t._descriptor.name+": "+r);return}t._descriptor.valueType===qt.INT&&!Number.isInteger(r)&&(Y.warn("INT value type cannot accept a floating-point value for "+t._descriptor.name+", ignoring the fractional digits."),r=Math.trunc(r),!Number.isInteger(r))||i.set(n,r)}},e}(),wc=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},Rc=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Mm=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Am=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},yZ=function(){function e(){this._callbacks=[],this._batchCallbacks=[]}return e.prototype.addCallback=function(t,r){var n=this._findCallback(t,r);n>=0||this._callbacks.push({callback:t,instrument:r})},e.prototype.removeCallback=function(t,r){var n=this._findCallback(t,r);n<0||this._callbacks.splice(n,1)},e.prototype.addBatchCallback=function(t,r){var n=new Set(r.filter(bc));if(n.size===0){Y.error("BatchObservableCallback is not associated with valid instruments",r);return}var i=this._findBatchCallback(t,n);i>=0||this._batchCallbacks.push({callback:t,instruments:n})},e.prototype.removeBatchCallback=function(t,r){var n=new Set(r.filter(bc)),i=this._findBatchCallback(t,n);i<0||this._batchCallbacks.splice(i,1)},e.prototype.observe=function(t,r){return wc(this,void 0,void 0,function(){var n,i,s,o;return Rc(this,function(l){switch(l.label){case 0:return n=this._observeCallbacks(t,r),i=this._observeBatchCallbacks(t,r),[4,tC(Am(Am([],Mm(n),!1),Mm(i),!1))];case 1:return s=l.sent(),o=s.filter(rC).map(function(c){return c.reason}),[2,o]}})})},e.prototype._observeCallbacks=function(t,r){var n=this;return this._callbacks.map(function(i){var s=i.callback,o=i.instrument;return wc(n,void 0,void 0,function(){var l,c;return Rc(this,function(a){switch(a.label){case 0:return l=new mZ(o._descriptor.name,o._descriptor.valueType),c=Promise.resolve(s(l)),r!=null&&(c=Bn(c,r)),[4,c];case 1:return a.sent(),o._metricStorages.forEach(function(h){h.record(l._buffer,t)}),[2]}})})})},e.prototype._observeBatchCallbacks=function(t,r){var n=this;return this._batchCallbacks.map(function(i){var s=i.callback,o=i.instruments;return wc(n,void 0,void 0,function(){var l,c;return Rc(this,function(a){switch(a.label){case 0:return l=new gZ,c=Promise.resolve(s(l)),r!=null&&(c=Bn(c,r)),[4,c];case 1:return a.sent(),o.forEach(function(h){var u=l._buffer.get(h);u!=null&&h._metricStorages.forEach(function(f){f.record(u,t)})}),[2]}})})})},e.prototype._findCallback=function(t,r){return this._callbacks.findIndex(function(n){return n.callback===t&&n.instrument===r})},e.prototype._findBatchCallback=function(t,r){return this._batchCallbacks.findIndex(function(n){return n.callback===t&&nC(n.instruments,r)})},e}(),bZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),vZ=function(e){bZ(t,e);function t(r,n,i,s,o){var l=e.call(this,r)||this;return l._attributesProcessor=i,l._aggregationCardinalityLimit=o,l._deltaMetricStorage=new Vm(n,l._aggregationCardinalityLimit),l._temporalMetricStorage=new Xm(n,s),l}return t.prototype.record=function(r,n,i,s){n=this._attributesProcessor.process(n,i),this._deltaMetricStorage.record(r,n,i,s)},t.prototype.collect=function(r,n){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,i,n)},t}(Om),Um=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),_c=function(){function e(){}return e.Noop=function(){return wZ},e}(),SZ=function(e){Um(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.process=function(r,n){return r},t}(_c);(function(e){Um(t,e);function t(r){var n=e.call(this)||this;return n._allowedAttributeNames=r,n}return t.prototype.process=function(r,n){var i=this,s={};return Object.keys(r).filter(function(o){return i._allowedAttributeNames.includes(o)}).forEach(function(o){return s[o]=r[o]}),s},t})(_c);var wZ=new SZ,RZ=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},_Z=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},TZ=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},EZ=function(){function e(t,r){this._meterProviderSharedState=t,this._instrumentationScope=r,this.metricStorageRegistry=new fZ,this.observableRegistry=new yZ,this.meter=new tZ(this)}return e.prototype.registerMetricStorage=function(t){var r=this._registerMetricStorage(t,vZ);return r.length===1?r[0]:new pZ(r)},e.prototype.registerAsyncMetricStorage=function(t){var r=this._registerMetricStorage(t,lZ);return r},e.prototype.collect=function(t,r,n){return RZ(this,void 0,void 0,function(){var i,s,o;return _Z(this,function(l){switch(l.label){case 0:return[4,this.observableRegistry.observe(r,n==null?void 0:n.timeoutMillis)];case 1:return i=l.sent(),s=this.metricStorageRegistry.getStorages(t),s.length===0?[2,null]:(o=s.map(function(c){return c.collect(t,r)}).filter(qI),o.length===0?[2,{errors:i}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:o},errors:i}])}})})},e.prototype._registerMetricStorage=function(t,r){var n=this,i=this._meterProviderSharedState.viewRegistry.findViews(t,this._instrumentationScope),s=i.map(function(c){var a=aC(c,t),h=n.metricStorageRegistry.findOrUpdateCompatibleStorage(a);if(h!=null)return h;var u=c.aggregation.createAggregator(a),f=new r(a,u,c.attributesProcessor,n._meterProviderSharedState.metricCollectors,c.aggregationCardinalityLimit);return n.metricStorageRegistry.register(f),f});if(s.length===0){var o=this._meterProviderSharedState.selectAggregations(t.type),l=o.map(function(c){var a=TZ(c,2),h=a[0],u=a[1],f=n.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(h,t);if(f!=null)return f;var d=u.createAggregator(t),p=h.selectCardinalityLimit(t.type),m=new r(t,d,_c.Noop(),[h],p);return n.metricStorageRegistry.registerForCollector(h,m),m});s=s.concat(l)}return s},e}(),IZ=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},CZ=function(){function e(t){this.resource=t,this.viewRegistry=new BC,this.metricCollectors=[],this.meterSharedStates=new Map}return e.prototype.getMeterSharedState=function(t){var r=eC(t),n=this.meterSharedStates.get(r);return n==null&&(n=new EZ(this,t),this.meterSharedStates.set(r,n)),n},e.prototype.selectAggregations=function(t){var r,n,i=[];try{for(var s=IZ(this.metricCollectors),o=s.next();!o.done;o=s.next()){var l=o.value;i.push([l,l.selectAggregation(t)])}}catch(c){r={error:c}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return i},e}(),Ms=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},As=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},ZZ=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},LZ=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},xZ=function(){function e(t,r){this._sharedState=t,this._metricReader=r}return e.prototype.collect=function(t){return Ms(this,void 0,void 0,function(){var r,n,i,s,o=this;return As(this,function(l){switch(l.label){case 0:return r=pt(Date.now()),n=[],i=[],s=Array.from(this._sharedState.meterSharedStates.values()).map(function(c){return Ms(o,void 0,void 0,function(){var a;return As(this,function(h){switch(h.label){case 0:return[4,c.collect(this,r,t)];case 1:return a=h.sent(),(a==null?void 0:a.scopeMetrics)!=null&&n.push(a.scopeMetrics),(a==null?void 0:a.errors)!=null&&i.push.apply(i,LZ([],ZZ(a.errors),!1)),[2]}})})}),[4,Promise.all(s)];case 1:return l.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:n},errors:i}]}})})},e.prototype.forceFlush=function(t){return Ms(this,void 0,void 0,function(){return As(this,function(r){switch(r.label){case 0:return[4,this._metricReader.forceFlush(t)];case 1:return r.sent(),[2]}})})},e.prototype.shutdown=function(t){return Ms(this,void 0,void 0,function(){return As(this,function(r){switch(r.label){case 0:return[4,this._metricReader.shutdown(t)];case 1:return r.sent(),[2]}})})},e.prototype.selectAggregationTemporality=function(t){return this._metricReader.selectAggregationTemporality(t)},e.prototype.selectAggregation=function(t){return this._metricReader.selectAggregation(t)},e.prototype.selectCardinalityLimit=function(t){var r,n,i;return(i=(n=(r=this._metricReader).selectCardinalityLimit)===null||n===void 0?void 0:n.call(r,t))!==null&&i!==void 0?i:2e3},e}(),Dm=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},Fm=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Jm=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function NZ(e,t){var r=t!=null?t:Un.empty();return e?Un.default().merge(r):r}var OZ=function(){function e(t){var r,n,i,s,o;if(this._shutdown=!1,this._sharedState=new CZ(NZ((o=t==null?void 0:t.mergeResourceWithDefaults)!==null&&o!==void 0?o:!0,t==null?void 0:t.resource)),(t==null?void 0:t.views)!=null&&t.views.length>0)try{for(var l=Jm(t.views),c=l.next();!c.done;c=l.next()){var a=c.value;this._sharedState.viewRegistry.addView(a)}}catch(d){r={error:d}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}if((t==null?void 0:t.readers)!=null&&t.readers.length>0)try{for(var h=Jm(t.readers),u=h.next();!u.done;u=h.next()){var f=u.value;this.addMetricReader(f)}}catch(d){i={error:d}}finally{try{u&&!u.done&&(s=h.return)&&s.call(h)}finally{if(i)throw i.error}}}return e.prototype.getMeter=function(t,r,n){return r===void 0&&(r=""),n===void 0&&(n={}),this._shutdown?(Y.warn("A shutdown MeterProvider cannot provide a Meter"),Jw()):this._sharedState.getMeterSharedState({name:t,version:r,schemaUrl:n.schemaUrl}).meter},e.prototype.addMetricReader=function(t){var r=new xZ(this._sharedState,t);t.setMetricProducer(r),this._sharedState.metricCollectors.push(r)},e.prototype.shutdown=function(t){return Dm(this,void 0,void 0,function(){return Fm(this,function(r){switch(r.label){case 0:return this._shutdown?(Y.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(t)}))]);case 1:return r.sent(),[2]}})})},e.prototype.forceFlush=function(t){return Dm(this,void 0,void 0,function(){return Fm(this,function(r){switch(r.label){case 0:return this._shutdown?(Y.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map(function(n){return n.forceFlush(t)}))];case 1:return r.sent(),[2]}})})},e}(),jn;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE",e[e.LOWMEMORY=2]="LOWMEMORY"})(jn||(jn={}));var Hm=function(){function e(t){this._delegate=t}return e.prototype.export=function(t,r){this._delegate.export(t,r)},e.prototype.forceFlush=function(){return this._delegate.forceFlush()},e.prototype.shutdown=function(){return this._delegate.shutdown()},e}(),GZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ym=function(e){GZ(t,e);function t(r,n,i){var s=e.call(this,r)||this;return s.name="OTLPExporterError",s.data=i,s.code=n,s}return t}(Error);function VZ(e){if(!Number.isNaN(e)&&Number.isFinite(e)&&e>0)return e;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+e+"')")}function kZ(e){if(e!=null)return function(){return e}}function XZ(e,t,r){var n,i,s,o,l,c;return{timeoutMillis:VZ((i=(n=e.timeoutMillis)!==null&&n!==void 0?n:t.timeoutMillis)!==null&&i!==void 0?i:r.timeoutMillis),concurrencyLimit:(o=(s=e.concurrencyLimit)!==null&&s!==void 0?s:t.concurrencyLimit)!==null&&o!==void 0?o:r.concurrencyLimit,compression:(c=(l=e.compression)!==null&&l!==void 0?l:t.compression)!==null&&c!==void 0?c:r.compression}}function WZ(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var PZ=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},MZ=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},AZ=function(){function e(t){this._sendingPromises=[],this._concurrencyLimit=t}return e.prototype.pushPromise=function(t){var r=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(t);var n=function(){var i=r._sendingPromises.indexOf(t);r._sendingPromises.splice(i,1)};t.then(n,n)},e.prototype.hasReachedLimit=function(){return this._sendingPromises.length>=this._concurrencyLimit},e.prototype.awaitAll=function(){return PZ(this,void 0,void 0,function(){return MZ(this,function(t){switch(t.label){case 0:return[4,Promise.all(this._sendingPromises)];case 1:return t.sent(),[2]}})})},e}();function UZ(e){return new AZ(e.concurrencyLimit)}function DZ(e){return Object.prototype.hasOwnProperty.call(e,"partialSuccess")}function FZ(){return{handleResponse:function(e){e==null||!DZ(e)||e.partialSuccess==null||Object.keys(e.partialSuccess).length===0||Y.warn("Received Partial Success response:",JSON.stringify(e.partialSuccess))}}}var JZ=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},HZ=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},YZ=function(){function e(t,r,n,i,s){this._transport=t,this._serializer=r,this._responseHandler=n,this._promiseQueue=i,this._timeout=s,this._diagLogger=Y.createComponentLogger({namespace:"OTLPExportDelegate"})}return e.prototype.export=function(t,r){var n=this;if(this._diagLogger.debug("items to be sent",t),this._promiseQueue.hasReachedLimit()){r({code:Ie.FAILED,error:new Error("Concurrent export limit reached")});return}var i=this._serializer.serializeRequest(t);if(i==null){r({code:Ie.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(i,this._timeout).then(function(s){if(s.status==="success"){if(s.data!=null)try{n._responseHandler.handleResponse(n._serializer.deserializeResponse(s.data))}catch(o){n._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",o,s.data)}r({code:Ie.SUCCESS});return}else if(s.status==="failure"&&s.error){r({code:Ie.FAILED,error:s.error});return}else s.status==="retryable"?r({code:Ie.FAILED,error:new Ym("Export failed with retryable status")}):r({code:Ie.FAILED,error:new Ym("Export failed with unknown error")})},function(s){return r({code:Ie.FAILED,error:s})}))},e.prototype.forceFlush=function(){return this._promiseQueue.awaitAll()},e.prototype.shutdown=function(){return JZ(this,void 0,void 0,function(){return HZ(this,function(t){switch(t.label){case 0:return this._diagLogger.debug("shutdown started"),[4,this.forceFlush()];case 1:return t.sent(),this._transport.shutdown(),[2]}})})},e}();function BZ(e,t){return new YZ(e.transport,e.serializer,FZ(),e.promiseHandler,t.timeout)}function Bm(e,t,r){return BZ({transport:r,serializer:t,promiseHandler:UZ(e)},{timeout:e.timeoutMillis})}var zZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Tc=function(){return Ct.CUMULATIVE},zm=function(e){switch(e){case se.COUNTER:case se.OBSERVABLE_COUNTER:case se.GAUGE:case se.HISTOGRAM:case se.OBSERVABLE_GAUGE:return Ct.DELTA;case se.UP_DOWN_COUNTER:case se.OBSERVABLE_UP_DOWN_COUNTER:return Ct.CUMULATIVE}},Km=function(e){switch(e){case se.COUNTER:case se.HISTOGRAM:return Ct.DELTA;case se.GAUGE:case se.UP_DOWN_COUNTER:case se.OBSERVABLE_UP_DOWN_COUNTER:case se.OBSERVABLE_COUNTER:case se.OBSERVABLE_GAUGE:return Ct.CUMULATIVE}};function KZ(){var e=zr(),t=e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return t==="cumulative"?Tc:t==="delta"?zm:t==="lowmemory"?Km:(Y.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),Tc)}function jZ(e){return e!=null?e===jn.DELTA?zm:e===jn.LOWMEMORY?Km:Tc:KZ()}function QZ(e){return e!=null&&e.aggregationPreference?e.aggregationPreference:function(t){return Jt.Default()}}var $Z=function(e){zZ(t,e);function t(r,n){var i=e.call(this,r)||this;return i._aggregationSelector=QZ(n),i._aggregationTemporalitySelector=jZ(n==null?void 0:n.temporalityPreference),i}return t.prototype.selectAggregation=function(r){return this._aggregationSelector(r)},t.prototype.selectAggregationTemporality=function(r){return this._aggregationTemporalitySelector(r)},t}(Hm);function jm(e){var t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function qZ(e){var t=Number(BigInt.asUintN(32,e)),r=Number(BigInt.asUintN(32,e>>BigInt(32)));return{low:t,high:r}}function Qm(e){var t=jm(e);return qZ(t)}function eL(e){var t=jm(e);return t.toString()}var tL=typeof BigInt!="undefined"?eL:At;function $m(e){return e}function qm(e){if(e!==void 0)return Gl(e)}var rL={encodeHrTime:Qm,encodeSpanContext:Gl,encodeOptionalSpanContext:qm};function eg(e){var t,r;if(e===void 0)return rL;var n=(t=e.useLongBits)!==null&&t!==void 0?t:!0,i=(r=e.useHex)!==null&&r!==void 0?r:!1;return{encodeHrTime:n?Qm:tL,encodeSpanContext:i?$m:Gl,encodeOptionalSpanContext:i?$m:qm}}var nL=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function tg(e){return{attributes:Cr(e.attributes),droppedAttributesCount:0}}function rg(e){return{name:e.name,version:e.version}}function Cr(e){return Object.keys(e).map(function(t){return ng(t,e[t])})}function ng(e,t){return{key:e,value:ig(t)}}function ig(e){var t=typeof e;return t==="string"?{stringValue:e}:t==="number"?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:t==="boolean"?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(ig)}}:t==="object"&&e!=null?{kvlistValue:{values:Object.entries(e).map(function(r){var n=nL(r,2),i=n[0],s=n[1];return ng(i,s)})}}:{}}function iL(e,t){var r=eg(t);return{resource:tg(e.resource),schemaUrl:void 0,scopeMetrics:sL(e.scopeMetrics,r)}}function sL(e,t){return Array.from(e.map(function(r){return{scope:rg(r.scope),metrics:r.metrics.map(function(n){return oL(n,t)}),schemaUrl:r.scope.schemaUrl}}))}function oL(e,t){var r={name:e.descriptor.name,description:e.descriptor.description,unit:e.descriptor.unit},n=uL(e.aggregationTemporality);switch(e.dataPointType){case Gt.SUM:r.sum={aggregationTemporality:n,isMonotonic:e.isMonotonic,dataPoints:sg(e,t)};break;case Gt.GAUGE:r.gauge={dataPoints:sg(e,t)};break;case Gt.HISTOGRAM:r.histogram={aggregationTemporality:n,dataPoints:lL(e,t)};break;case Gt.EXPONENTIAL_HISTOGRAM:r.exponentialHistogram={aggregationTemporality:n,dataPoints:cL(e,t)};break}return r}function aL(e,t,r){var n={attributes:Cr(e.attributes),startTimeUnixNano:r.encodeHrTime(e.startTime),timeUnixNano:r.encodeHrTime(e.endTime)};switch(t){case qt.INT:n.asInt=e.value;break;case qt.DOUBLE:n.asDouble=e.value;break}return n}function sg(e,t){return e.dataPoints.map(function(r){return aL(r,e.descriptor.valueType,t)})}function lL(e,t){return e.dataPoints.map(function(r){var n=r.value;return{attributes:Cr(r.attributes),bucketCounts:n.buckets.counts,explicitBounds:n.buckets.boundaries,count:n.count,sum:n.sum,min:n.min,max:n.max,startTimeUnixNano:t.encodeHrTime(r.startTime),timeUnixNano:t.encodeHrTime(r.endTime)}})}function cL(e,t){return e.dataPoints.map(function(r){var n=r.value;return{attributes:Cr(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:t.encodeHrTime(r.startTime),timeUnixNano:t.encodeHrTime(r.endTime)}})}function uL(e){switch(e){case Ct.DELTA:return 1;case Ct.CUMULATIVE:return 2}}function dL(e,t){return{resourceMetrics:e.map(function(r){return iL(r,t)})}}var hL=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},fL=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function pL(e,t){var r,n=e.spanContext(),i=e.status;return{traceId:t.encodeSpanContext(n.traceId),spanId:t.encodeSpanContext(n.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:(r=n.traceState)===null||r===void 0?void 0:r.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:Cr(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(function(s){return gL(s,t)}),droppedEventsCount:e.droppedEventsCount,status:{code:i.code,message:i.message},links:e.links.map(function(s){return mL(s,t)}),droppedLinksCount:e.droppedLinksCount}}function mL(e,t){var r;return{attributes:e.attributes?Cr(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:(r=e.context.traceState)===null||r===void 0?void 0:r.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}function gL(e,t){return{attributes:e.attributes?Cr(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}function yL(e,t){var r=eg(t);return{resourceSpans:vL(e,r)}}function bL(e){var t,r,n=new Map;try{for(var i=hL(e),s=i.next();!s.done;s=i.next()){var o=s.value,l=n.get(o.resource);l||(l=new Map,n.set(o.resource,l));var c=o.instrumentationLibrary.name+"@"+(o.instrumentationLibrary.version||"")+":"+(o.instrumentationLibrary.schemaUrl||""),a=l.get(c);a||(a=[],l.set(c,a)),a.push(o)}}catch(h){t={error:h}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}function vL(e,t){for(var r=bL(e),n=[],i=r.entries(),s=i.next();!s.done;){for(var o=fL(s.value,2),l=o[0],c=o[1],a=[],h=c.values(),u=h.next();!u.done;){var f=u.value;if(f.length>0){var d=f.map(function(m){return pL(m,t)});a.push({scope:rg(f[0].instrumentationLibrary),spans:d,schemaUrl:f[0].instrumentationLibrary.schemaUrl})}u=h.next()}var p={resource:tg(l),scopeSpans:a,schemaUrl:void 0};n.push(p),s=i.next()}return n}var og={serializeRequest:function(e){var t=dL([e],{useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},ag={serializeRequest:function(e){var t=yL(e,{useHex:!0,useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},SL=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},wL=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},RL=5,_L=1e3,TL=5e3,EL=1.5,lg=.2;function IL(){return Math.random()*(2*lg)-lg}var CL=function(){function e(t){this._transport=t}return e.prototype.retry=function(t,r,n){var i=this;return new Promise(function(s,o){setTimeout(function(){i._transport.send(t,r).then(s,o)},n)})},e.prototype.send=function(t,r){var n;return SL(this,void 0,void 0,function(){var i,s,o,l,c,a,h;return wL(this,function(u){switch(u.label){case 0:return i=Date.now()+r,[4,this._transport.send(t,r)];case 1:s=u.sent(),o=RL,l=_L,u.label=2;case 2:return s.status==="retryable"&&o>0?(o--,c=Math.max(Math.min(l,TL)+IL(),0),l=l*EL,a=(n=s.retryInMillis)!==null&&n!==void 0?n:c,h=i-Date.now(),a>h?[2,s]:[4,this.retry(t,h,a)]):[3,4];case 3:return s=u.sent(),[3,2];case 4:return[2,s]}})})},e.prototype.shutdown=function(){return this._transport.shutdown()},e}();function cg(e){return new CL(e.transport)}function ZL(e){var t=[429,502,503,504];return t.includes(e)}function LL(e){if(e!=null){var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?t*1e3:-1;var r=new Date(e).getTime()-Date.now();return r>=0?r:0}}var xL=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},NL=function(){function e(t){this._parameters=t}return e.prototype.send=function(t,r){var n=this;return new Promise(function(i){var s=new XMLHttpRequest;s.timeout=r,s.open("POST",n._parameters.url);var o=n._parameters.headers();Object.entries(o).forEach(function(l){var c=xL(l,2),a=c[0],h=c[1];s.setRequestHeader(a,h)}),s.ontimeout=function(l){i({status:"failure",error:new Error("XHR request timed out")})},s.onreadystatechange=function(){s.status>=200&&s.status<=299?(Y.debug("XHR success"),i({status:"success"})):s.status&&ZL(s.status)?i({status:"retryable",retryInMillis:LL(s.getResponseHeader("Retry-After"))}):s.status!==0&&i({status:"failure",error:new Error("XHR request failed with non-retryable status")})},s.onabort=function(){i({status:"failure",error:new Error("XHR request aborted")})},s.onerror=function(){i({status:"failure",error:new Error("XHR request errored")})},s.send(t)})},e.prototype.shutdown=function(){},e}();function OL(e){return new NL(e)}var GL=function(){function e(t){this._params=t}return e.prototype.send=function(t){var r=this;return new Promise(function(n){navigator.sendBeacon(r._params.url,new Blob([t],{type:r._params.blobType}))?(Y.debug("SendBeacon success"),n({status:"success"})):n({status:"failure",error:new Error("SendBeacon failed")})})},e.prototype.shutdown=function(){},e}();function VL(e){return new GL(e)}function kL(e,t){return Bm(e,t,cg({transport:OL(e)}))}function XL(e,t){return Bm(e,t,cg({transport:VL({url:e.url,blobType:e.headers()["Content-Type"]})}))}var WL=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function PL(e){return function(){var t,r={};return Object.entries((t=e==null?void 0:e())!==null&&t!==void 0?t:{}).forEach(function(n){var i=WL(n,2),s=i[0],o=i[1];typeof o!="undefined"?r[s]=String(o):Y.warn('Header "'+s+'" has invalid value ('+o+") and will be ignored")}),r}}var Zr=function(){return Zr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Zr.apply(this,arguments)};function ML(e,t,r){var n=Zr({},r()),i={};return function(){return t!=null&&Object.assign(i,t()),e!=null&&Object.assign(i,e()),Object.assign(i,n)}}function AL(e){if(e!=null)try{return new URL(e),e}catch(t){throw new Error("Configuration: Could not parse user-provided export URL: '"+e+"'")}}function UL(e,t,r){var n,i,s,o;return Zr(Zr({},XZ(e,t,r)),{headers:ML(PL(e.headers),t.headers,r.headers),url:(i=(n=AL(e.url))!==null&&n!==void 0?n:t.url)!==null&&i!==void 0?i:r.url,agentOptions:(o=(s=e.agentOptions)!==null&&s!==void 0?s:t.agentOptions)!==null&&o!==void 0?o:r.agentOptions})}function DL(e,t){return Zr(Zr({},WZ()),{headers:function(){return e},url:"http://localhost:4318/"+t,agentOptions:{keepAlive:!0}})}function FL(e,t,r){return UL({url:e.url,timeoutMillis:e.timeoutMillis,headers:kZ(e.headers),concurrencyLimit:e.concurrencyLimit},{},DL(r,t))}function ug(e,t,r,n){var i=!!e.headers||typeof navigator.sendBeacon!="function",s=FL(e,r,n);return i?kL(s,t):XL(s,t)}var JL=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),HL=function(e){JL(t,e);function t(r){return e.call(this,ug(r!=null?r:{},og,"v1/metrics",{"Content-Type":"application/json"}),r)||this}return t}($Z),YL=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),BL=function(e){YL(t,e);function t(r){return r===void 0&&(r={}),e.call(this,ug(r,ag,"v1/traces",{"Content-Type":"application/json"}))||this}return t}(Hm),dg=(e=>(e.BillingQuotaExceeded="BillingQuotaExceeded",e))(dg||{});const Ec=3,Ic=1e3,Cc=500,zL=[dg.BillingQuotaExceeded.toString()],KL=e=>{var r;return((r=e.response.errors)==null?void 0:r.find(n=>zL.includes(n.message)))===void 0},Zc=()=>{const e=(t,r,n,i,s=0)=>z(this,null,function*(){try{return yield t()}catch(o){if(o instanceof Wr&&!KL(o))throw o;if(s<Ec)return yield new Promise(l=>setTimeout(l,Ic+Cc*Math.pow(2,s))),yield e(t,r,n,i,s+1);throw _e("error",`highlight.io: data request failed after ${s} retries`),o}});return e};function jL(e,t){const r=e.spanContext();return{name:e.name,kind:e.kind,spanContext:()=>r,parentSpanId:e.parentSpanId,startTime:e.startTime,endTime:e.endTime,status:e.status,attributes:lp(e.attributes,t),links:e.links,events:e.events,duration:e.duration,ended:e.ended,resource:e.resource,instrumentationLibrary:e.instrumentationLibrary,droppedAttributesCount:e.droppedAttributesCount,droppedEventsCount:e.droppedEventsCount,droppedLinksCount:e.droppedLinksCount}}function QL(e,t){if(!t.isSamplingEnabled())return e;const r=[],n={},i={};for(const s of e){s.parentSpanId&&(i[s.parentSpanId]=i[s.parentSpanId]||[],i[s.parentSpanId].push(s.spanContext().spanId));const o=t.shouldSample(s);o.sample?o.attributes?n[s.spanContext().spanId]=jL(s,o.attributes):n[s.spanContext().spanId]=s:r.push(s.spanContext().spanId)}for(;r.length>0;){const s=r.shift(),o=i[s];if(o)for(const l of o)delete n[l],r.push(l)}return Object.values(n)}const $L=(e,t,r)=>{if(typeof navigator=="undefined"||!navigator.sendBeacon)return!1;try{const n=new Blob([t],{type:r});return navigator.sendBeacon(e,n)}catch(n){return!1}},hg=(e,t,r,n)=>{const i=s=>{if($L(e,t,r))return n({code:Ie.SUCCESS});n({code:Ie.FAILED,error:s})};try{const s=new Blob([t],{type:r});fetch(e,{method:"POST",body:s,keepalive:!0,headers:{"Content-Type":r},credentials:"omit"}).then(o=>{if(o.ok)return n({code:Ie.SUCCESS});n({code:Ie.FAILED,error:new Error(`keepalive fetch export failed with status ${o.status}`)})},o=>i(o))}catch(s){i(s)}};class qL extends BL{constructor(r,n){var i;super(B(x({},r),{headers:{}}));L(this,"url");L(this,"unloading",!1);this.sampler=n,this.url=(i=r==null?void 0:r.url)!=null?i:""}setUnloading(r){this.unloading=r}export(r,n){const i=QL(r,this.sampler);if(i.length===0)return n({code:Ie.SUCCESS});if(this.unloading){const l=ag.serializeRequest(i);if(!l||!this.url)return n({code:Ie.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});hg(this.url,l,"application/json",n);return}let s=0;const o=l=>{if(l.code===Ie.SUCCESS)return n({code:Ie.SUCCESS});if(s++,s>Ec)return n({code:Ie.FAILED,error:l.error});new Promise(c=>setTimeout(c,Ic+Cc*Math.pow(2,s))).then(()=>{super.export(i,o)})};super.export(i,o)}}class ex extends HL{constructor(r){var n;super(B(x({},r),{headers:{}}));L(this,"url");L(this,"unloading",!1);this.url=(n=r==null?void 0:r.url)!=null?n:""}setUnloading(r){this.unloading=r}export(r,n){if(this.unloading){const o=og.serializeRequest(r);if(!o||!this.url)return n({code:Ie.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});hg(this.url,o,"application/json",n);return}let i=0;const s=o=>{var l;if(o.code===Ie.SUCCESS)return n({code:Ie.SUCCESS});if(i++,i>Ec)return _e("error",`[@launchdarkly/observability] failed to export OTeL metrics: ${(l=o.error)==null?void 0:l.message}`,o.error),n({code:Ie.FAILED,error:o.error});new Promise(c=>setTimeout(c,Ic+Cc*Math.pow(2,i))).then(()=>{var c;_e("warn",`[@launchdarkly/observability] retry ${i}, failed to export OTeL metrics: ${(c=o.error)==null?void 0:c.message}`,o.error),super.export(r,s)})};super.export(r,s)}}const tx="OT_ZONE_CONTEXT",rx="Navigation:";function nx(){return!1}const kt=class kt extends An{constructor(r={}){var n,i;super(kt.moduleName,kt.version,r);L(this,"_spansData",new WeakMap);L(this,"_zonePatched");L(this,"_wrappedListeners",new WeakMap);L(this,"_eventsSpanMap",new WeakMap);L(this,"_eventNames");L(this,"_shouldPreventSpanCreation");L(this,"_getLDContextKeyAttributes");this._getLDContextKeyAttributes=r.getLDContextKeyAttributes,this._eventNames=new Set((n=r==null?void 0:r.eventNames)!=null?n:[]),((i=r.productAnalyticsEvents)==null?void 0:i.clicks)!==!1&&this._eventNames.add("click"),this._shouldPreventSpanCreation=typeof(r==null?void 0:r.shouldPreventSpanCreation)=="function"?r.shouldPreventSpanCreation:nx}init(){}_checkForTimeout(r,n){const i=this._spansData.get(n);i&&(r.source==="setTimeout"?i.hrTimeLastTimeout=vr():r.source!=="Promise.then"&&r.source!=="setTimeout"&&(i.hrTimeLastTimeout=void 0))}_allowEventName(r){return this._eventNames.has(r)}_createSpan(r,n){var l,c;const i=r==null?void 0:r.target,s=r==null?void 0:r.type;if(!(i instanceof HTMLElement)||!i.getAttribute||i.hasAttribute("disabled")||!this._allowEventName(s))return;const o=kp(i,!0);try{const a=this.tracer.startSpan(s,{attributes:{[nr]:window.location.href,"event.type":s,"event.tag":i.tagName,"event.xpath":o,"event.id":i.id,"event.classname":i.className,"event.text":(l=i.textContent)!=null?l:"","event.url":window.location.href,"viewport.width":window.innerWidth,"viewport.height":window.innerHeight}},n?we.setSpan(pe.active(),n):void 0);r instanceof MouseEvent&&(a.setAttribute("event.x",r.clientX),a.setAttribute("event.y",r.clientY),a.setAttribute("event.relativeX",r.clientX/window.innerWidth),a.setAttribute("event.relativeY",r.clientY/window.innerHeight),s==="scroll"&&(a.setAttribute("event.scrollX",window.scrollX),a.setAttribute("event.scrollY",window.scrollY)));const h=(c=this._getLDContextKeyAttributes)==null?void 0:c.call(this);return h&&a.setAttributes(h),this._shouldPreventSpanCreation(s,i,a)===!0?void 0:(this._spansData.set(a,{taskCount:0}),a)}catch(a){this._diag.error("failed to start create new user interaction span",a)}}_decrementTask(r){const n=this._spansData.get(r);n&&(n.taskCount--,n.taskCount===0&&this._tryToEndSpan(r,n.hrTimeLastTimeout))}_getCurrentSpan(r){const n=r.get(tx);return n&&we.getSpan(n)}_incrementTask(r){const n=this._spansData.get(r);n&&n.taskCount++}addPatchedListener(r,n,i,s){let o=this._wrappedListeners.get(i);o||(o=new Map,this._wrappedListeners.set(i,o));let l=o.get(n);return l||(l=new Map,o.set(n,l)),l.has(r)?!1:(l.set(r,s),!0)}removePatchedListener(r,n,i){const s=this._wrappedListeners.get(i);if(!s)return;const o=s.get(n);if(!o)return;const l=o.get(r);return l&&(o.delete(r),o.size===0&&(s.delete(n),s.size===0&&this._wrappedListeners.delete(i))),l}_invokeListener(r,n,i){return typeof r=="function"?r.apply(n,i):r.handleEvent(i[0])}_patchAddEventListener(){const r=this;let n=new Map;return i=>function(o,l,c){if(!l)return i.call(this,o,l,c);const a=c&&typeof c=="object"&&c.once,h=function(...u){var m;let f;const d=u[0];if(!(d!=null&&d.type))return r._invokeListener(l,this,u);if(Date.now()-((m=n.get(d.type))!=null?m:0)<1e3/60)return r._invokeListener(l,this,u);n.set(d.type,Date.now()),d&&(f=r._eventsSpanMap.get(d)),a&&r.removePatchedListener(this,o,l);const p=r._createSpan(d,f);return p?(d&&r._eventsSpanMap.set(d,p),pe.with(we.setSpan(pe.active(),p),()=>{const g=r._invokeListener(l,this,u);return p.end(),g})):r._invokeListener(l,this,u)};if(r.addPatchedListener(this,o,l,h))return i.call(this,o,h,c)}}_patchRemoveEventListener(){const r=this;return n=>function(s,o,l){const c=r.removePatchedListener(this,s,o);return c?n.call(this,s,c,l):n.call(this,s,o,l)}}_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 r=this;return n=>function(...s){const o=`${location.pathname}${location.hash}${location.search}`,l=n.apply(this,s),c=`${location.pathname}${location.hash}${location.search}`;return o!==c&&r._updateInteractionName(c),l}}_unpatchHistoryApi(){Ae(history.replaceState)&&this._unwrap(history,"replaceState"),Ae(history.pushState)&&this._unwrap(history,"pushState"),Ae(history.back)&&this._unwrap(history,"back"),Ae(history.forward)&&this._unwrap(history,"forward"),Ae(history.go)&&this._unwrap(history,"go")}_updateInteractionName(r){const n=we.getSpan(pe.active());n&&typeof n.updateName=="function"&&n.updateName(`${rx} ${r}`)}_patchZoneCancelTask(){const r=this;return n=>function(s){const o=Zone.current,l=r._getCurrentSpan(o);return l&&r._shouldCountTask(s,o)&&r._decrementTask(l),n.call(this,s)}}_patchZoneScheduleTask(){const r=this;return n=>function(s){const o=Zone.current,l=r._getCurrentSpan(o);return l&&r._shouldCountTask(s,o)&&(r._incrementTask(l),r._checkForTimeout(s,l)),n.call(this,s)}}_patchZoneRunTask(){const r=this;return n=>function(s,o,l){const c=Array.isArray(l)&&l[0]instanceof Event?l[0]:void 0,a=c==null?void 0:c.target;let h;const u=this;if(a){if(h=r._createSpan(c),h)return r._incrementTask(h),u.run(()=>{try{return pe.with(we.setSpan(pe.active(),h),()=>{const f=Zone.current;return s._zone=f,n.call(f,s,o,l)})}finally{r._decrementTask(h)}})}else h=r._getCurrentSpan(u);try{return n.call(u,s,o,l)}finally{h&&r._shouldCountTask(s,u)&&r._decrementTask(h)}}}_shouldCountTask(r,n){if(r._zone&&(n=r._zone),!n||!r.data||r.data.isPeriodic)return!1;const i=this._getCurrentSpan(n);return!i||!this._spansData.get(i)?!1:r.type==="macroTask"||r.type==="microTask"}_tryToEndSpan(r,n){r&&this._spansData.get(r)&&(r.end(n),this._spansData.delete(r))}enable(){const r=this._getZoneWithPrototype();this._diag.debug("applying patch to",kt.moduleName,kt.version,"zone:",!!r),r?(Ae(r.prototype.runTask)&&(this._unwrap(r.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),Ae(r.prototype.scheduleTask)&&(this._unwrap(r.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),Ae(r.prototype.cancelTask)&&(this._unwrap(r.prototype,"cancelTask"),this._diag.debug("removing previous patch from method cancelTask")),this._zonePatched=!0,this._wrap(r.prototype,"runTask",this._patchZoneRunTask()),this._wrap(r.prototype,"scheduleTask",this._patchZoneScheduleTask()),this._wrap(r.prototype,"cancelTask",this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(i=>{Ae(i.addEventListener)&&(this._unwrap(i,"addEventListener"),this._diag.debug("removing previous patch from method addEventListener")),Ae(i.removeEventListener)&&(this._unwrap(i,"removeEventListener"),this._diag.debug("removing previous patch from method removeEventListener")),this._wrap(i,"addEventListener",this._patchAddEventListener()),this._wrap(i,"removeEventListener",this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){const r=this._getZoneWithPrototype();this._diag.debug("removing patch from",kt.moduleName,kt.version,"zone:",!!r),r&&this._zonePatched?(Ae(r.prototype.runTask)&&this._unwrap(r.prototype,"runTask"),Ae(r.prototype.scheduleTask)&&this._unwrap(r.prototype,"scheduleTask"),Ae(r.prototype.cancelTask)&&this._unwrap(r.prototype,"cancelTask")):this._getPatchableEventTargets().forEach(i=>{Ae(i.addEventListener)&&this._unwrap(i,"addEventListener"),Ae(i.removeEventListener)&&this._unwrap(i,"removeEventListener")}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}};L(kt,"version","0.1.1"),L(kt,"moduleName","user-interaction");let Lc=kt;const ix=e=>{if(typeof XMLHttpRequest=="undefined")return()=>{};const t=XMLHttpRequest.prototype,r=t.open,n=t.setRequestHeader,i=t.send,s=a=>!!a&&e.some(h=>a.toLowerCase().includes(h)),o=function(a,h){return this._method=a,this._url=typeof h=="string"?h:String(h),this._requestHeaders={},this._body=void 0,r.apply(this,arguments)},l=function(a,h){return this._requestHeaders||(this._requestHeaders={}),this._requestHeaders[a]=h,n.apply(this,arguments)},c=function(a){if(this._body===void 0&&a!==void 0&&a!==null&&!s(this._url)){const h=sc(a,this._url);h&&(this._body=h)}return i.apply(this,arguments)};return t.open=o,t.setRequestHeader=l,t.send=c,()=>{t.open===o&&(t.open=r),t.setRequestHeader===l&&(t.setRequestHeader=n),t.send===c&&(t.send=i)}},sx=256*1024,ox=e=>!!e&&e.split(";")[0].trim().toLowerCase()==="multipart/form-data",fg=e=>{if(!e||typeof e!="object")return{};if(typeof Headers!="undefined"&&e instanceof Headers)return Object.fromEntries(e.entries());if(Array.isArray(e))try{return Object.fromEntries(new Headers(e).entries())}catch(t){return Object.fromEntries(e.map(([r,n])=>[String(r),String(n)]))}return x({},e)},Us=e=>Object.prototype.toString.call(e),ax=e=>typeof ArrayBuffer!="undefined"&&e instanceof ArrayBuffer||Us(e)==="[object ArrayBuffer]"||Us(e)==="[object SharedArrayBuffer]",pg=e=>{if(typeof File!="undefined"&&e instanceof File||Us(e)==="[object File]"){const t=e;return`[File name="${t.name}" type="${t.type}" size=${t.size}]`}return`[Blob type="${e.type}" size=${e.size}]`},xc=(e,t,r)=>{const n=e[t];n===void 0?e[t]=r:Array.isArray(n)?n.push(r):e[t]=[n,r]},lx=e=>{const t={};return e.forEach((r,n)=>{xc(t,n,typeof r=="string"?r:pg(r))}),JSON.stringify(t)},cx=e=>{const t=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e);if(t.byteLength>sx)return`[binary size=${t.byteLength}]`;try{return new TextDecoder("utf-8",{fatal:!0}).decode(t)}catch(r){return`[binary size=${t.byteLength}]`}},mg=e=>{if(e==null)return;switch(typeof e){case"string":return e;case"number":case"boolean":case"bigint":return String(e);case"object":break;default:return}const t=Us(e);if(typeof URLSearchParams!="undefined"&&e instanceof URLSearchParams||t==="[object URLSearchParams]")return e.toString();if(typeof FormData!="undefined"&&e instanceof FormData||t==="[object FormData]")return lx(e);if(typeof Blob!="undefined"&&e instanceof Blob||t==="[object Blob]"||t==="[object File]")return pg(e);if(ax(e)||ArrayBuffer.isView(e))return cx(e);if(!(typeof ReadableStream!="undefined"&&e instanceof ReadableStream||t==="[object ReadableStream]")){if(typeof Document!="undefined"&&e instanceof Document)try{return new XMLSerializer().serializeToString(e)}catch(r){return}try{return Rt(e)}catch(r){return}}},Nc=new WeakMap,ux=e=>Nc.get(e),dx=(e,t)=>z(this,null,function*(){const r=e.getReader(),n=[];let i=0;for(;i<t;){const{done:s,value:o}=yield r.read();if(s)return{chunks:n,byteLength:i,truncated:!1};const l=t-i,c=o.byteLength>l?o.subarray(0,l):o;n.push(c),i+=c.byteLength}return r.cancel().catch(()=>{}),{chunks:n,byteLength:i,truncated:!0}}),hx=({chunks:e,byteLength:t})=>{const r=new Uint8Array(t);let n=0;for(const i of e)r.set(i,n),n+=i.byteLength;return r},fx=e=>{const t=new TextDecoder("utf-8",{fatal:!0});try{let r="";for(const n of e.chunks)r+=t.decode(n,{stream:!0});return e.truncated?r:r+t.decode()}catch(r){return`[binary size${e.truncated?">":"="}${e.byteLength}]`}},Ds=e=>`[multipart/form-data size${e.truncated?">":"="}${e.byteLength}]`,px=(e,t)=>{var i,s,o,l,c,a,h;const r=/;\s*boundary=(?:"([^"]*)"|([^;]*))/i.exec(t),n=(s=(i=r==null?void 0:r[1])!=null?i:r==null?void 0:r[2])==null?void 0:s.trim();if(!n)return Ds(e);try{const u=hx(e),f=new TextDecoder("windows-1252").decode(u),d=`--${n}`,p={};let m=f.indexOf(d);if(m===-1)return Ds(e);for(;m!==-1&&(m+=d.length,!f.startsWith("--",m));){const g=f.indexOf(`\r
|
|
462
|
+
`,Pm(a,t))}}catch(h){n={error:h}}finally{try{l&&!l.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return s},e}(),pZ=function(){function e(t){this._backingStorages=t}return e.prototype.record=function(t,r,n,i){this._backingStorages.forEach(function(s){s.record(t,r,n,i)})},e}(),mZ=function(){function e(t,r){this._instrumentName=t,this._valueType=r,this._buffer=new Ir}return e.prototype.observe=function(t,r){if(r===void 0&&(r={}),typeof t!="number"){Y.warn("non-number value provided to metric "+this._instrumentName+": "+t);return}this._valueType===qt.INT&&!Number.isInteger(t)&&(Y.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),t=Math.trunc(t),!Number.isInteger(t))||this._buffer.set(r,t)},e}(),gZ=function(){function e(){this._buffer=new Map}return e.prototype.observe=function(t,r,n){if(n===void 0&&(n={}),!!bc(t)){var i=this._buffer.get(t);if(i==null&&(i=new Ir,this._buffer.set(t,i)),typeof r!="number"){Y.warn("non-number value provided to metric "+t._descriptor.name+": "+r);return}t._descriptor.valueType===qt.INT&&!Number.isInteger(r)&&(Y.warn("INT value type cannot accept a floating-point value for "+t._descriptor.name+", ignoring the fractional digits."),r=Math.trunc(r),!Number.isInteger(r))||i.set(n,r)}},e}(),wc=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},Rc=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Mm=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Am=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},yZ=function(){function e(){this._callbacks=[],this._batchCallbacks=[]}return e.prototype.addCallback=function(t,r){var n=this._findCallback(t,r);n>=0||this._callbacks.push({callback:t,instrument:r})},e.prototype.removeCallback=function(t,r){var n=this._findCallback(t,r);n<0||this._callbacks.splice(n,1)},e.prototype.addBatchCallback=function(t,r){var n=new Set(r.filter(bc));if(n.size===0){Y.error("BatchObservableCallback is not associated with valid instruments",r);return}var i=this._findBatchCallback(t,n);i>=0||this._batchCallbacks.push({callback:t,instruments:n})},e.prototype.removeBatchCallback=function(t,r){var n=new Set(r.filter(bc)),i=this._findBatchCallback(t,n);i<0||this._batchCallbacks.splice(i,1)},e.prototype.observe=function(t,r){return wc(this,void 0,void 0,function(){var n,i,s,o;return Rc(this,function(l){switch(l.label){case 0:return n=this._observeCallbacks(t,r),i=this._observeBatchCallbacks(t,r),[4,tC(Am(Am([],Mm(n),!1),Mm(i),!1))];case 1:return s=l.sent(),o=s.filter(rC).map(function(c){return c.reason}),[2,o]}})})},e.prototype._observeCallbacks=function(t,r){var n=this;return this._callbacks.map(function(i){var s=i.callback,o=i.instrument;return wc(n,void 0,void 0,function(){var l,c;return Rc(this,function(a){switch(a.label){case 0:return l=new mZ(o._descriptor.name,o._descriptor.valueType),c=Promise.resolve(s(l)),r!=null&&(c=Bn(c,r)),[4,c];case 1:return a.sent(),o._metricStorages.forEach(function(h){h.record(l._buffer,t)}),[2]}})})})},e.prototype._observeBatchCallbacks=function(t,r){var n=this;return this._batchCallbacks.map(function(i){var s=i.callback,o=i.instruments;return wc(n,void 0,void 0,function(){var l,c;return Rc(this,function(a){switch(a.label){case 0:return l=new gZ,c=Promise.resolve(s(l)),r!=null&&(c=Bn(c,r)),[4,c];case 1:return a.sent(),o.forEach(function(h){var u=l._buffer.get(h);u!=null&&h._metricStorages.forEach(function(f){f.record(u,t)})}),[2]}})})})},e.prototype._findCallback=function(t,r){return this._callbacks.findIndex(function(n){return n.callback===t&&n.instrument===r})},e.prototype._findBatchCallback=function(t,r){return this._batchCallbacks.findIndex(function(n){return n.callback===t&&nC(n.instruments,r)})},e}(),bZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),vZ=function(e){bZ(t,e);function t(r,n,i,s,o){var l=e.call(this,r)||this;return l._attributesProcessor=i,l._aggregationCardinalityLimit=o,l._deltaMetricStorage=new Vm(n,l._aggregationCardinalityLimit),l._temporalMetricStorage=new Xm(n,s),l}return t.prototype.record=function(r,n,i,s){n=this._attributesProcessor.process(n,i),this._deltaMetricStorage.record(r,n,i,s)},t.prototype.collect=function(r,n){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,i,n)},t}(Om),Um=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),_c=function(){function e(){}return e.Noop=function(){return wZ},e}(),SZ=function(e){Um(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.process=function(r,n){return r},t}(_c);(function(e){Um(t,e);function t(r){var n=e.call(this)||this;return n._allowedAttributeNames=r,n}return t.prototype.process=function(r,n){var i=this,s={};return Object.keys(r).filter(function(o){return i._allowedAttributeNames.includes(o)}).forEach(function(o){return s[o]=r[o]}),s},t})(_c);var wZ=new SZ,RZ=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},_Z=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},TZ=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},EZ=function(){function e(t,r){this._meterProviderSharedState=t,this._instrumentationScope=r,this.metricStorageRegistry=new fZ,this.observableRegistry=new yZ,this.meter=new tZ(this)}return e.prototype.registerMetricStorage=function(t){var r=this._registerMetricStorage(t,vZ);return r.length===1?r[0]:new pZ(r)},e.prototype.registerAsyncMetricStorage=function(t){var r=this._registerMetricStorage(t,lZ);return r},e.prototype.collect=function(t,r,n){return RZ(this,void 0,void 0,function(){var i,s,o;return _Z(this,function(l){switch(l.label){case 0:return[4,this.observableRegistry.observe(r,n==null?void 0:n.timeoutMillis)];case 1:return i=l.sent(),s=this.metricStorageRegistry.getStorages(t),s.length===0?[2,null]:(o=s.map(function(c){return c.collect(t,r)}).filter(qI),o.length===0?[2,{errors:i}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:o},errors:i}])}})})},e.prototype._registerMetricStorage=function(t,r){var n=this,i=this._meterProviderSharedState.viewRegistry.findViews(t,this._instrumentationScope),s=i.map(function(c){var a=aC(c,t),h=n.metricStorageRegistry.findOrUpdateCompatibleStorage(a);if(h!=null)return h;var u=c.aggregation.createAggregator(a),f=new r(a,u,c.attributesProcessor,n._meterProviderSharedState.metricCollectors,c.aggregationCardinalityLimit);return n.metricStorageRegistry.register(f),f});if(s.length===0){var o=this._meterProviderSharedState.selectAggregations(t.type),l=o.map(function(c){var a=TZ(c,2),h=a[0],u=a[1],f=n.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(h,t);if(f!=null)return f;var d=u.createAggregator(t),p=h.selectCardinalityLimit(t.type),m=new r(t,d,_c.Noop(),[h],p);return n.metricStorageRegistry.registerForCollector(h,m),m});s=s.concat(l)}return s},e}(),IZ=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},CZ=function(){function e(t){this.resource=t,this.viewRegistry=new BC,this.metricCollectors=[],this.meterSharedStates=new Map}return e.prototype.getMeterSharedState=function(t){var r=eC(t),n=this.meterSharedStates.get(r);return n==null&&(n=new EZ(this,t),this.meterSharedStates.set(r,n)),n},e.prototype.selectAggregations=function(t){var r,n,i=[];try{for(var s=IZ(this.metricCollectors),o=s.next();!o.done;o=s.next()){var l=o.value;i.push([l,l.selectAggregation(t)])}}catch(c){r={error:c}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return i},e}(),Ms=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},As=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},ZZ=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},LZ=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},xZ=function(){function e(t,r){this._sharedState=t,this._metricReader=r}return e.prototype.collect=function(t){return Ms(this,void 0,void 0,function(){var r,n,i,s,o=this;return As(this,function(l){switch(l.label){case 0:return r=pt(Date.now()),n=[],i=[],s=Array.from(this._sharedState.meterSharedStates.values()).map(function(c){return Ms(o,void 0,void 0,function(){var a;return As(this,function(h){switch(h.label){case 0:return[4,c.collect(this,r,t)];case 1:return a=h.sent(),(a==null?void 0:a.scopeMetrics)!=null&&n.push(a.scopeMetrics),(a==null?void 0:a.errors)!=null&&i.push.apply(i,LZ([],ZZ(a.errors),!1)),[2]}})})}),[4,Promise.all(s)];case 1:return l.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:n},errors:i}]}})})},e.prototype.forceFlush=function(t){return Ms(this,void 0,void 0,function(){return As(this,function(r){switch(r.label){case 0:return[4,this._metricReader.forceFlush(t)];case 1:return r.sent(),[2]}})})},e.prototype.shutdown=function(t){return Ms(this,void 0,void 0,function(){return As(this,function(r){switch(r.label){case 0:return[4,this._metricReader.shutdown(t)];case 1:return r.sent(),[2]}})})},e.prototype.selectAggregationTemporality=function(t){return this._metricReader.selectAggregationTemporality(t)},e.prototype.selectAggregation=function(t){return this._metricReader.selectAggregation(t)},e.prototype.selectCardinalityLimit=function(t){var r,n,i;return(i=(n=(r=this._metricReader).selectCardinalityLimit)===null||n===void 0?void 0:n.call(r,t))!==null&&i!==void 0?i:2e3},e}(),Dm=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},Fm=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Jm=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function NZ(e,t){var r=t!=null?t:Un.empty();return e?Un.default().merge(r):r}var OZ=function(){function e(t){var r,n,i,s,o;if(this._shutdown=!1,this._sharedState=new CZ(NZ((o=t==null?void 0:t.mergeResourceWithDefaults)!==null&&o!==void 0?o:!0,t==null?void 0:t.resource)),(t==null?void 0:t.views)!=null&&t.views.length>0)try{for(var l=Jm(t.views),c=l.next();!c.done;c=l.next()){var a=c.value;this._sharedState.viewRegistry.addView(a)}}catch(d){r={error:d}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}if((t==null?void 0:t.readers)!=null&&t.readers.length>0)try{for(var h=Jm(t.readers),u=h.next();!u.done;u=h.next()){var f=u.value;this.addMetricReader(f)}}catch(d){i={error:d}}finally{try{u&&!u.done&&(s=h.return)&&s.call(h)}finally{if(i)throw i.error}}}return e.prototype.getMeter=function(t,r,n){return r===void 0&&(r=""),n===void 0&&(n={}),this._shutdown?(Y.warn("A shutdown MeterProvider cannot provide a Meter"),Jw()):this._sharedState.getMeterSharedState({name:t,version:r,schemaUrl:n.schemaUrl}).meter},e.prototype.addMetricReader=function(t){var r=new xZ(this._sharedState,t);t.setMetricProducer(r),this._sharedState.metricCollectors.push(r)},e.prototype.shutdown=function(t){return Dm(this,void 0,void 0,function(){return Fm(this,function(r){switch(r.label){case 0:return this._shutdown?(Y.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(t)}))]);case 1:return r.sent(),[2]}})})},e.prototype.forceFlush=function(t){return Dm(this,void 0,void 0,function(){return Fm(this,function(r){switch(r.label){case 0:return this._shutdown?(Y.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map(function(n){return n.forceFlush(t)}))];case 1:return r.sent(),[2]}})})},e}(),jn;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE",e[e.LOWMEMORY=2]="LOWMEMORY"})(jn||(jn={}));var Hm=function(){function e(t){this._delegate=t}return e.prototype.export=function(t,r){this._delegate.export(t,r)},e.prototype.forceFlush=function(){return this._delegate.forceFlush()},e.prototype.shutdown=function(){return this._delegate.shutdown()},e}(),GZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ym=function(e){GZ(t,e);function t(r,n,i){var s=e.call(this,r)||this;return s.name="OTLPExporterError",s.data=i,s.code=n,s}return t}(Error);function VZ(e){if(!Number.isNaN(e)&&Number.isFinite(e)&&e>0)return e;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+e+"')")}function kZ(e){if(e!=null)return function(){return e}}function XZ(e,t,r){var n,i,s,o,l,c;return{timeoutMillis:VZ((i=(n=e.timeoutMillis)!==null&&n!==void 0?n:t.timeoutMillis)!==null&&i!==void 0?i:r.timeoutMillis),concurrencyLimit:(o=(s=e.concurrencyLimit)!==null&&s!==void 0?s:t.concurrencyLimit)!==null&&o!==void 0?o:r.concurrencyLimit,compression:(c=(l=e.compression)!==null&&l!==void 0?l:t.compression)!==null&&c!==void 0?c:r.compression}}function WZ(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var PZ=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},MZ=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},AZ=function(){function e(t){this._sendingPromises=[],this._concurrencyLimit=t}return e.prototype.pushPromise=function(t){var r=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(t);var n=function(){var i=r._sendingPromises.indexOf(t);r._sendingPromises.splice(i,1)};t.then(n,n)},e.prototype.hasReachedLimit=function(){return this._sendingPromises.length>=this._concurrencyLimit},e.prototype.awaitAll=function(){return PZ(this,void 0,void 0,function(){return MZ(this,function(t){switch(t.label){case 0:return[4,Promise.all(this._sendingPromises)];case 1:return t.sent(),[2]}})})},e}();function UZ(e){return new AZ(e.concurrencyLimit)}function DZ(e){return Object.prototype.hasOwnProperty.call(e,"partialSuccess")}function FZ(){return{handleResponse:function(e){e==null||!DZ(e)||e.partialSuccess==null||Object.keys(e.partialSuccess).length===0||Y.warn("Received Partial Success response:",JSON.stringify(e.partialSuccess))}}}var JZ=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},HZ=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},YZ=function(){function e(t,r,n,i,s){this._transport=t,this._serializer=r,this._responseHandler=n,this._promiseQueue=i,this._timeout=s,this._diagLogger=Y.createComponentLogger({namespace:"OTLPExportDelegate"})}return e.prototype.export=function(t,r){var n=this;if(this._diagLogger.debug("items to be sent",t),this._promiseQueue.hasReachedLimit()){r({code:Ie.FAILED,error:new Error("Concurrent export limit reached")});return}var i=this._serializer.serializeRequest(t);if(i==null){r({code:Ie.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(i,this._timeout).then(function(s){if(s.status==="success"){if(s.data!=null)try{n._responseHandler.handleResponse(n._serializer.deserializeResponse(s.data))}catch(o){n._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",o,s.data)}r({code:Ie.SUCCESS});return}else if(s.status==="failure"&&s.error){r({code:Ie.FAILED,error:s.error});return}else s.status==="retryable"?r({code:Ie.FAILED,error:new Ym("Export failed with retryable status")}):r({code:Ie.FAILED,error:new Ym("Export failed with unknown error")})},function(s){return r({code:Ie.FAILED,error:s})}))},e.prototype.forceFlush=function(){return this._promiseQueue.awaitAll()},e.prototype.shutdown=function(){return JZ(this,void 0,void 0,function(){return HZ(this,function(t){switch(t.label){case 0:return this._diagLogger.debug("shutdown started"),[4,this.forceFlush()];case 1:return t.sent(),this._transport.shutdown(),[2]}})})},e}();function BZ(e,t){return new YZ(e.transport,e.serializer,FZ(),e.promiseHandler,t.timeout)}function Bm(e,t,r){return BZ({transport:r,serializer:t,promiseHandler:UZ(e)},{timeout:e.timeoutMillis})}var zZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Tc=function(){return Ct.CUMULATIVE},zm=function(e){switch(e){case se.COUNTER:case se.OBSERVABLE_COUNTER:case se.GAUGE:case se.HISTOGRAM:case se.OBSERVABLE_GAUGE:return Ct.DELTA;case se.UP_DOWN_COUNTER:case se.OBSERVABLE_UP_DOWN_COUNTER:return Ct.CUMULATIVE}},Km=function(e){switch(e){case se.COUNTER:case se.HISTOGRAM:return Ct.DELTA;case se.GAUGE:case se.UP_DOWN_COUNTER:case se.OBSERVABLE_UP_DOWN_COUNTER:case se.OBSERVABLE_COUNTER:case se.OBSERVABLE_GAUGE:return Ct.CUMULATIVE}};function KZ(){var e=zr(),t=e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return t==="cumulative"?Tc:t==="delta"?zm:t==="lowmemory"?Km:(Y.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),Tc)}function jZ(e){return e!=null?e===jn.DELTA?zm:e===jn.LOWMEMORY?Km:Tc:KZ()}function QZ(e){return e!=null&&e.aggregationPreference?e.aggregationPreference:function(t){return Jt.Default()}}var $Z=function(e){zZ(t,e);function t(r,n){var i=e.call(this,r)||this;return i._aggregationSelector=QZ(n),i._aggregationTemporalitySelector=jZ(n==null?void 0:n.temporalityPreference),i}return t.prototype.selectAggregation=function(r){return this._aggregationSelector(r)},t.prototype.selectAggregationTemporality=function(r){return this._aggregationTemporalitySelector(r)},t}(Hm);function jm(e){var t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function qZ(e){var t=Number(BigInt.asUintN(32,e)),r=Number(BigInt.asUintN(32,e>>BigInt(32)));return{low:t,high:r}}function Qm(e){var t=jm(e);return qZ(t)}function eL(e){var t=jm(e);return t.toString()}var tL=typeof BigInt!="undefined"?eL:At;function $m(e){return e}function qm(e){if(e!==void 0)return Gl(e)}var rL={encodeHrTime:Qm,encodeSpanContext:Gl,encodeOptionalSpanContext:qm};function eg(e){var t,r;if(e===void 0)return rL;var n=(t=e.useLongBits)!==null&&t!==void 0?t:!0,i=(r=e.useHex)!==null&&r!==void 0?r:!1;return{encodeHrTime:n?Qm:tL,encodeSpanContext:i?$m:Gl,encodeOptionalSpanContext:i?$m:qm}}var nL=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function tg(e){return{attributes:Cr(e.attributes),droppedAttributesCount:0}}function rg(e){return{name:e.name,version:e.version}}function Cr(e){return Object.keys(e).map(function(t){return ng(t,e[t])})}function ng(e,t){return{key:e,value:ig(t)}}function ig(e){var t=typeof e;return t==="string"?{stringValue:e}:t==="number"?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:t==="boolean"?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(ig)}}:t==="object"&&e!=null?{kvlistValue:{values:Object.entries(e).map(function(r){var n=nL(r,2),i=n[0],s=n[1];return ng(i,s)})}}:{}}function iL(e,t){var r=eg(t);return{resource:tg(e.resource),schemaUrl:void 0,scopeMetrics:sL(e.scopeMetrics,r)}}function sL(e,t){return Array.from(e.map(function(r){return{scope:rg(r.scope),metrics:r.metrics.map(function(n){return oL(n,t)}),schemaUrl:r.scope.schemaUrl}}))}function oL(e,t){var r={name:e.descriptor.name,description:e.descriptor.description,unit:e.descriptor.unit},n=uL(e.aggregationTemporality);switch(e.dataPointType){case Gt.SUM:r.sum={aggregationTemporality:n,isMonotonic:e.isMonotonic,dataPoints:sg(e,t)};break;case Gt.GAUGE:r.gauge={dataPoints:sg(e,t)};break;case Gt.HISTOGRAM:r.histogram={aggregationTemporality:n,dataPoints:lL(e,t)};break;case Gt.EXPONENTIAL_HISTOGRAM:r.exponentialHistogram={aggregationTemporality:n,dataPoints:cL(e,t)};break}return r}function aL(e,t,r){var n={attributes:Cr(e.attributes),startTimeUnixNano:r.encodeHrTime(e.startTime),timeUnixNano:r.encodeHrTime(e.endTime)};switch(t){case qt.INT:n.asInt=e.value;break;case qt.DOUBLE:n.asDouble=e.value;break}return n}function sg(e,t){return e.dataPoints.map(function(r){return aL(r,e.descriptor.valueType,t)})}function lL(e,t){return e.dataPoints.map(function(r){var n=r.value;return{attributes:Cr(r.attributes),bucketCounts:n.buckets.counts,explicitBounds:n.buckets.boundaries,count:n.count,sum:n.sum,min:n.min,max:n.max,startTimeUnixNano:t.encodeHrTime(r.startTime),timeUnixNano:t.encodeHrTime(r.endTime)}})}function cL(e,t){return e.dataPoints.map(function(r){var n=r.value;return{attributes:Cr(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:t.encodeHrTime(r.startTime),timeUnixNano:t.encodeHrTime(r.endTime)}})}function uL(e){switch(e){case Ct.DELTA:return 1;case Ct.CUMULATIVE:return 2}}function dL(e,t){return{resourceMetrics:e.map(function(r){return iL(r,t)})}}var hL=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},fL=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function pL(e,t){var r,n=e.spanContext(),i=e.status;return{traceId:t.encodeSpanContext(n.traceId),spanId:t.encodeSpanContext(n.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:(r=n.traceState)===null||r===void 0?void 0:r.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:Cr(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(function(s){return gL(s,t)}),droppedEventsCount:e.droppedEventsCount,status:{code:i.code,message:i.message},links:e.links.map(function(s){return mL(s,t)}),droppedLinksCount:e.droppedLinksCount}}function mL(e,t){var r;return{attributes:e.attributes?Cr(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:(r=e.context.traceState)===null||r===void 0?void 0:r.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}function gL(e,t){return{attributes:e.attributes?Cr(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}function yL(e,t){var r=eg(t);return{resourceSpans:vL(e,r)}}function bL(e){var t,r,n=new Map;try{for(var i=hL(e),s=i.next();!s.done;s=i.next()){var o=s.value,l=n.get(o.resource);l||(l=new Map,n.set(o.resource,l));var c=o.instrumentationLibrary.name+"@"+(o.instrumentationLibrary.version||"")+":"+(o.instrumentationLibrary.schemaUrl||""),a=l.get(c);a||(a=[],l.set(c,a)),a.push(o)}}catch(h){t={error:h}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}function vL(e,t){for(var r=bL(e),n=[],i=r.entries(),s=i.next();!s.done;){for(var o=fL(s.value,2),l=o[0],c=o[1],a=[],h=c.values(),u=h.next();!u.done;){var f=u.value;if(f.length>0){var d=f.map(function(m){return pL(m,t)});a.push({scope:rg(f[0].instrumentationLibrary),spans:d,schemaUrl:f[0].instrumentationLibrary.schemaUrl})}u=h.next()}var p={resource:tg(l),scopeSpans:a,schemaUrl:void 0};n.push(p),s=i.next()}return n}var og={serializeRequest:function(e){var t=dL([e],{useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},ag={serializeRequest:function(e){var t=yL(e,{useHex:!0,useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},SL=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},wL=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},RL=5,_L=1e3,TL=5e3,EL=1.5,lg=.2;function IL(){return Math.random()*(2*lg)-lg}var CL=function(){function e(t){this._transport=t}return e.prototype.retry=function(t,r,n){var i=this;return new Promise(function(s,o){setTimeout(function(){i._transport.send(t,r).then(s,o)},n)})},e.prototype.send=function(t,r){var n;return SL(this,void 0,void 0,function(){var i,s,o,l,c,a,h;return wL(this,function(u){switch(u.label){case 0:return i=Date.now()+r,[4,this._transport.send(t,r)];case 1:s=u.sent(),o=RL,l=_L,u.label=2;case 2:return s.status==="retryable"&&o>0?(o--,c=Math.max(Math.min(l,TL)+IL(),0),l=l*EL,a=(n=s.retryInMillis)!==null&&n!==void 0?n:c,h=i-Date.now(),a>h?[2,s]:[4,this.retry(t,h,a)]):[3,4];case 3:return s=u.sent(),[3,2];case 4:return[2,s]}})})},e.prototype.shutdown=function(){return this._transport.shutdown()},e}();function cg(e){return new CL(e.transport)}function ZL(e){var t=[429,502,503,504];return t.includes(e)}function LL(e){if(e!=null){var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?t*1e3:-1;var r=new Date(e).getTime()-Date.now();return r>=0?r:0}}var xL=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},NL=function(){function e(t){this._parameters=t}return e.prototype.send=function(t,r){var n=this;return new Promise(function(i){var s=new XMLHttpRequest;s.timeout=r,s.open("POST",n._parameters.url);var o=n._parameters.headers();Object.entries(o).forEach(function(l){var c=xL(l,2),a=c[0],h=c[1];s.setRequestHeader(a,h)}),s.ontimeout=function(l){i({status:"failure",error:new Error("XHR request timed out")})},s.onreadystatechange=function(){s.status>=200&&s.status<=299?(Y.debug("XHR success"),i({status:"success"})):s.status&&ZL(s.status)?i({status:"retryable",retryInMillis:LL(s.getResponseHeader("Retry-After"))}):s.status!==0&&i({status:"failure",error:new Error("XHR request failed with non-retryable status")})},s.onabort=function(){i({status:"failure",error:new Error("XHR request aborted")})},s.onerror=function(){i({status:"failure",error:new Error("XHR request errored")})},s.send(t)})},e.prototype.shutdown=function(){},e}();function OL(e){return new NL(e)}var GL=function(){function e(t){this._params=t}return e.prototype.send=function(t){var r=this;return new Promise(function(n){navigator.sendBeacon(r._params.url,new Blob([t],{type:r._params.blobType}))?(Y.debug("SendBeacon success"),n({status:"success"})):n({status:"failure",error:new Error("SendBeacon failed")})})},e.prototype.shutdown=function(){},e}();function VL(e){return new GL(e)}function kL(e,t){return Bm(e,t,cg({transport:OL(e)}))}function XL(e,t){return Bm(e,t,cg({transport:VL({url:e.url,blobType:e.headers()["Content-Type"]})}))}var WL=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function PL(e){return function(){var t,r={};return Object.entries((t=e==null?void 0:e())!==null&&t!==void 0?t:{}).forEach(function(n){var i=WL(n,2),s=i[0],o=i[1];typeof o!="undefined"?r[s]=String(o):Y.warn('Header "'+s+'" has invalid value ('+o+") and will be ignored")}),r}}var Zr=function(){return Zr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Zr.apply(this,arguments)};function ML(e,t,r){var n=Zr({},r()),i={};return function(){return t!=null&&Object.assign(i,t()),e!=null&&Object.assign(i,e()),Object.assign(i,n)}}function AL(e){if(e!=null)try{return new URL(e),e}catch(t){throw new Error("Configuration: Could not parse user-provided export URL: '"+e+"'")}}function UL(e,t,r){var n,i,s,o;return Zr(Zr({},XZ(e,t,r)),{headers:ML(PL(e.headers),t.headers,r.headers),url:(i=(n=AL(e.url))!==null&&n!==void 0?n:t.url)!==null&&i!==void 0?i:r.url,agentOptions:(o=(s=e.agentOptions)!==null&&s!==void 0?s:t.agentOptions)!==null&&o!==void 0?o:r.agentOptions})}function DL(e,t){return Zr(Zr({},WZ()),{headers:function(){return e},url:"http://localhost:4318/"+t,agentOptions:{keepAlive:!0}})}function FL(e,t,r){return UL({url:e.url,timeoutMillis:e.timeoutMillis,headers:kZ(e.headers),concurrencyLimit:e.concurrencyLimit},{},DL(r,t))}function ug(e,t,r,n){var i=!!e.headers||typeof navigator.sendBeacon!="function",s=FL(e,r,n);return i?kL(s,t):XL(s,t)}var JL=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),HL=function(e){JL(t,e);function t(r){return e.call(this,ug(r!=null?r:{},og,"v1/metrics",{"Content-Type":"application/json"}),r)||this}return t}($Z),YL=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),BL=function(e){YL(t,e);function t(r){return r===void 0&&(r={}),e.call(this,ug(r,ag,"v1/traces",{"Content-Type":"application/json"}))||this}return t}(Hm),dg=(e=>(e.BillingQuotaExceeded="BillingQuotaExceeded",e))(dg||{});const Ec=3,Ic=1e3,Cc=500,zL=[dg.BillingQuotaExceeded.toString()],KL=e=>{var r;return((r=e.response.errors)==null?void 0:r.find(n=>zL.includes(n.message)))===void 0},Zc=()=>{const e=(t,r,n,i,s=0)=>z(this,null,function*(){try{return yield t()}catch(o){if(o instanceof Wr&&!KL(o))throw o;if(s<Ec)return yield new Promise(l=>setTimeout(l,Ic+Cc*Math.pow(2,s))),yield e(t,r,n,i,s+1);throw _e("error",`highlight.io: data request failed after ${s} retries`),o}});return e};function jL(e,t){const r=e.spanContext();return{name:e.name,kind:e.kind,spanContext:()=>r,parentSpanId:e.parentSpanId,startTime:e.startTime,endTime:e.endTime,status:e.status,attributes:lp(e.attributes,t),links:e.links,events:e.events,duration:e.duration,ended:e.ended,resource:e.resource,instrumentationLibrary:e.instrumentationLibrary,droppedAttributesCount:e.droppedAttributesCount,droppedEventsCount:e.droppedEventsCount,droppedLinksCount:e.droppedLinksCount}}function QL(e,t){if(!t.isSamplingEnabled())return e;const r=[],n={},i={};for(const s of e){s.parentSpanId&&(i[s.parentSpanId]=i[s.parentSpanId]||[],i[s.parentSpanId].push(s.spanContext().spanId));const o=t.shouldSample(s);o.sample?o.attributes?n[s.spanContext().spanId]=jL(s,o.attributes):n[s.spanContext().spanId]=s:r.push(s.spanContext().spanId)}for(;r.length>0;){const s=r.shift(),o=i[s];if(o)for(const l of o)delete n[l],r.push(l)}return Object.values(n)}const $L=(e,t,r)=>{if(typeof navigator=="undefined"||!navigator.sendBeacon)return!1;try{const n=new Blob([t],{type:r});return navigator.sendBeacon(e,n)}catch(n){return!1}},hg=(e,t,r,n)=>{const i=s=>{if($L(e,t,r))return n({code:Ie.SUCCESS});n({code:Ie.FAILED,error:s})};try{const s=new Blob([t],{type:r});fetch(e,{method:"POST",body:s,keepalive:!0,headers:{"Content-Type":r},credentials:"omit"}).then(o=>{if(o.ok)return n({code:Ie.SUCCESS});n({code:Ie.FAILED,error:new Error(`keepalive fetch export failed with status ${o.status}`)})},o=>i(o))}catch(s){i(s)}};class qL extends BL{constructor(r,n){var i;super(B(x({},r),{headers:{}}));L(this,"url");L(this,"unloading",!1);this.sampler=n,this.url=(i=r==null?void 0:r.url)!=null?i:""}setUnloading(r){this.unloading=r}export(r,n){const i=QL(r,this.sampler);if(i.length===0)return n({code:Ie.SUCCESS});if(this.unloading){const l=ag.serializeRequest(i);if(!l||!this.url)return n({code:Ie.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});hg(this.url,l,"application/json",n);return}let s=0;const o=l=>{if(l.code===Ie.SUCCESS)return n({code:Ie.SUCCESS});if(s++,s>Ec)return n({code:Ie.FAILED,error:l.error});new Promise(c=>setTimeout(c,Ic+Cc*Math.pow(2,s))).then(()=>{super.export(i,o)})};super.export(i,o)}}class ex extends HL{constructor(r){var n;super(B(x({},r),{headers:{}}));L(this,"url");L(this,"unloading",!1);this.url=(n=r==null?void 0:r.url)!=null?n:""}setUnloading(r){this.unloading=r}export(r,n){if(this.unloading){const o=og.serializeRequest(r);if(!o||!this.url)return n({code:Ie.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});hg(this.url,o,"application/json",n);return}let i=0;const s=o=>{var l;if(o.code===Ie.SUCCESS)return n({code:Ie.SUCCESS});if(i++,i>Ec)return _e("error",`[@launchdarkly/observability] failed to export OTeL metrics: ${(l=o.error)==null?void 0:l.message}`,o.error),n({code:Ie.FAILED,error:o.error});new Promise(c=>setTimeout(c,Ic+Cc*Math.pow(2,i))).then(()=>{var c;_e("warn",`[@launchdarkly/observability] retry ${i}, failed to export OTeL metrics: ${(c=o.error)==null?void 0:c.message}`,o.error),super.export(r,s)})};super.export(r,s)}}const tx="OT_ZONE_CONTEXT",rx="Navigation:";function nx(){return!1}const kt=class kt extends An{constructor(r={}){var n,i;super(kt.moduleName,kt.version,r);L(this,"_spansData",new WeakMap);L(this,"_zonePatched");L(this,"_wrappedListeners",new WeakMap);L(this,"_eventsSpanMap",new WeakMap);L(this,"_eventNames");L(this,"_shouldPreventSpanCreation");L(this,"_getLDContextKeyAttributes");this._getLDContextKeyAttributes=r.getLDContextKeyAttributes,this._eventNames=new Set((n=r==null?void 0:r.eventNames)!=null?n:[]),((i=r.productAnalyticsEvents)==null?void 0:i.clicks)!==!1&&this._eventNames.add("click"),this._shouldPreventSpanCreation=typeof(r==null?void 0:r.shouldPreventSpanCreation)=="function"?r.shouldPreventSpanCreation:nx}init(){}_checkForTimeout(r,n){const i=this._spansData.get(n);i&&(r.source==="setTimeout"?i.hrTimeLastTimeout=vr():r.source!=="Promise.then"&&r.source!=="setTimeout"&&(i.hrTimeLastTimeout=void 0))}_allowEventName(r){return this._eventNames.has(r)}_createSpan(r,n){var l,c;const i=r==null?void 0:r.target,s=r==null?void 0:r.type;if(!(i instanceof HTMLElement)||!i.getAttribute||i.hasAttribute("disabled")||!this._allowEventName(s))return;const o=kp(i,!0);try{const a=this.tracer.startSpan(s,{attributes:{[nr]:window.location.href,"event.type":s,"event.tag":i.tagName,"event.xpath":o,"event.id":i.id,"event.classname":i.className,"event.text":(l=i.textContent)!=null?l:"","event.url":window.location.href,"viewport.width":window.innerWidth,"viewport.height":window.innerHeight}},n?we.setSpan(pe.active(),n):void 0);r instanceof MouseEvent&&(a.setAttribute("event.x",r.clientX),a.setAttribute("event.y",r.clientY),a.setAttribute("event.relativeX",r.clientX/window.innerWidth),a.setAttribute("event.relativeY",r.clientY/window.innerHeight),s==="scroll"&&(a.setAttribute("event.scrollX",window.scrollX),a.setAttribute("event.scrollY",window.scrollY)));const h=(c=this._getLDContextKeyAttributes)==null?void 0:c.call(this);return h&&a.setAttributes(h),this._shouldPreventSpanCreation(s,i,a)===!0?void 0:(this._spansData.set(a,{taskCount:0}),a)}catch(a){this._diag.error("failed to start create new user interaction span",a)}}_decrementTask(r){const n=this._spansData.get(r);n&&(n.taskCount--,n.taskCount===0&&this._tryToEndSpan(r,n.hrTimeLastTimeout))}_getCurrentSpan(r){const n=r.get(tx);return n&&we.getSpan(n)}_incrementTask(r){const n=this._spansData.get(r);n&&n.taskCount++}addPatchedListener(r,n,i,s){let o=this._wrappedListeners.get(i);o||(o=new Map,this._wrappedListeners.set(i,o));let l=o.get(n);return l||(l=new Map,o.set(n,l)),l.has(r)?!1:(l.set(r,s),!0)}removePatchedListener(r,n,i){const s=this._wrappedListeners.get(i);if(!s)return;const o=s.get(n);if(!o)return;const l=o.get(r);return l&&(o.delete(r),o.size===0&&(s.delete(n),s.size===0&&this._wrappedListeners.delete(i))),l}_invokeListener(r,n,i){return typeof r=="function"?r.apply(n,i):r.handleEvent(i[0])}_patchAddEventListener(){const r=this;let n=new Map;return i=>function(o,l,c){if(!l)return i.call(this,o,l,c);const a=c&&typeof c=="object"&&c.once,h=function(...u){var m;a&&r.removePatchedListener(this,o,l);let f;const d=u[0];if(!(d!=null&&d.type))return r._invokeListener(l,this,u);if(Date.now()-((m=n.get(d.type))!=null?m:0)<1e3/60)return r._invokeListener(l,this,u);n.set(d.type,Date.now()),d&&(f=r._eventsSpanMap.get(d));const p=r._createSpan(d,f);return p?(d&&r._eventsSpanMap.set(d,p),pe.with(we.setSpan(pe.active(),p),()=>{const g=r._invokeListener(l,this,u);return p.end(),g})):r._invokeListener(l,this,u)};if(r.addPatchedListener(this,o,l,h))return i.call(this,o,h,c)}}_patchRemoveEventListener(){const r=this;return n=>function(s,o,l){const c=r.removePatchedListener(this,s,o);return c?n.call(this,s,c,l):n.call(this,s,o,l)}}_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 r=this;return n=>function(...s){const o=`${location.pathname}${location.hash}${location.search}`,l=n.apply(this,s),c=`${location.pathname}${location.hash}${location.search}`;return o!==c&&r._updateInteractionName(c),l}}_unpatchHistoryApi(){Ae(history.replaceState)&&this._unwrap(history,"replaceState"),Ae(history.pushState)&&this._unwrap(history,"pushState"),Ae(history.back)&&this._unwrap(history,"back"),Ae(history.forward)&&this._unwrap(history,"forward"),Ae(history.go)&&this._unwrap(history,"go")}_updateInteractionName(r){const n=we.getSpan(pe.active());n&&typeof n.updateName=="function"&&n.updateName(`${rx} ${r}`)}_patchZoneCancelTask(){const r=this;return n=>function(s){const o=Zone.current,l=r._getCurrentSpan(o);return l&&r._shouldCountTask(s,o)&&r._decrementTask(l),n.call(this,s)}}_patchZoneScheduleTask(){const r=this;return n=>function(s){const o=Zone.current,l=r._getCurrentSpan(o);return l&&r._shouldCountTask(s,o)&&(r._incrementTask(l),r._checkForTimeout(s,l)),n.call(this,s)}}_patchZoneRunTask(){const r=this;return n=>function(s,o,l){const c=Array.isArray(l)&&l[0]instanceof Event?l[0]:void 0,a=c==null?void 0:c.target;let h;const u=this;if(a){if(h=r._createSpan(c),h)return r._incrementTask(h),u.run(()=>{try{return pe.with(we.setSpan(pe.active(),h),()=>{const f=Zone.current;return s._zone=f,n.call(f,s,o,l)})}finally{r._decrementTask(h)}})}else h=r._getCurrentSpan(u);try{return n.call(u,s,o,l)}finally{h&&r._shouldCountTask(s,u)&&r._decrementTask(h)}}}_shouldCountTask(r,n){if(r._zone&&(n=r._zone),!n||!r.data||r.data.isPeriodic)return!1;const i=this._getCurrentSpan(n);return!i||!this._spansData.get(i)?!1:r.type==="macroTask"||r.type==="microTask"}_tryToEndSpan(r,n){r&&this._spansData.get(r)&&(r.end(n),this._spansData.delete(r))}enable(){const r=this._getZoneWithPrototype();this._diag.debug("applying patch to",kt.moduleName,kt.version,"zone:",!!r),r?(Ae(r.prototype.runTask)&&(this._unwrap(r.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),Ae(r.prototype.scheduleTask)&&(this._unwrap(r.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),Ae(r.prototype.cancelTask)&&(this._unwrap(r.prototype,"cancelTask"),this._diag.debug("removing previous patch from method cancelTask")),this._zonePatched=!0,this._wrap(r.prototype,"runTask",this._patchZoneRunTask()),this._wrap(r.prototype,"scheduleTask",this._patchZoneScheduleTask()),this._wrap(r.prototype,"cancelTask",this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(i=>{Ae(i.addEventListener)&&(this._unwrap(i,"addEventListener"),this._diag.debug("removing previous patch from method addEventListener")),Ae(i.removeEventListener)&&(this._unwrap(i,"removeEventListener"),this._diag.debug("removing previous patch from method removeEventListener")),this._wrap(i,"addEventListener",this._patchAddEventListener()),this._wrap(i,"removeEventListener",this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){const r=this._getZoneWithPrototype();this._diag.debug("removing patch from",kt.moduleName,kt.version,"zone:",!!r),r&&this._zonePatched?(Ae(r.prototype.runTask)&&this._unwrap(r.prototype,"runTask"),Ae(r.prototype.scheduleTask)&&this._unwrap(r.prototype,"scheduleTask"),Ae(r.prototype.cancelTask)&&this._unwrap(r.prototype,"cancelTask")):this._getPatchableEventTargets().forEach(i=>{Ae(i.addEventListener)&&this._unwrap(i,"addEventListener"),Ae(i.removeEventListener)&&this._unwrap(i,"removeEventListener")}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}};L(kt,"version","0.1.1"),L(kt,"moduleName","user-interaction");let Lc=kt;const ix=e=>{if(typeof XMLHttpRequest=="undefined")return()=>{};const t=XMLHttpRequest.prototype,r=t.open,n=t.setRequestHeader,i=t.send,s=a=>!!a&&e.some(h=>a.toLowerCase().includes(h)),o=function(a,h){return this._method=a,this._url=typeof h=="string"?h:String(h),this._requestHeaders={},this._body=void 0,r.apply(this,arguments)},l=function(a,h){return this._requestHeaders||(this._requestHeaders={}),this._requestHeaders[a]=h,n.apply(this,arguments)},c=function(a){if(this._body===void 0&&a!==void 0&&a!==null&&!s(this._url)){const h=sc(a,this._url);h&&(this._body=h)}return i.apply(this,arguments)};return t.open=o,t.setRequestHeader=l,t.send=c,()=>{t.open===o&&(t.open=r),t.setRequestHeader===l&&(t.setRequestHeader=n),t.send===c&&(t.send=i)}},sx=256*1024,ox=e=>!!e&&e.split(";")[0].trim().toLowerCase()==="multipart/form-data",fg=e=>{if(!e||typeof e!="object")return{};if(typeof Headers!="undefined"&&e instanceof Headers)return Object.fromEntries(e.entries());if(Array.isArray(e))try{return Object.fromEntries(new Headers(e).entries())}catch(t){return Object.fromEntries(e.map(([r,n])=>[String(r),String(n)]))}return x({},e)},Us=e=>Object.prototype.toString.call(e),ax=e=>typeof ArrayBuffer!="undefined"&&e instanceof ArrayBuffer||Us(e)==="[object ArrayBuffer]"||Us(e)==="[object SharedArrayBuffer]",pg=e=>{if(typeof File!="undefined"&&e instanceof File||Us(e)==="[object File]"){const t=e;return`[File name="${t.name}" type="${t.type}" size=${t.size}]`}return`[Blob type="${e.type}" size=${e.size}]`},xc=(e,t,r)=>{const n=e[t];n===void 0?e[t]=r:Array.isArray(n)?n.push(r):e[t]=[n,r]},lx=e=>{const t={};return e.forEach((r,n)=>{xc(t,n,typeof r=="string"?r:pg(r))}),JSON.stringify(t)},cx=e=>{const t=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e);if(t.byteLength>sx)return`[binary size=${t.byteLength}]`;try{return new TextDecoder("utf-8",{fatal:!0}).decode(t)}catch(r){return`[binary size=${t.byteLength}]`}},mg=e=>{if(e==null)return;switch(typeof e){case"string":return e;case"number":case"boolean":case"bigint":return String(e);case"object":break;default:return}const t=Us(e);if(typeof URLSearchParams!="undefined"&&e instanceof URLSearchParams||t==="[object URLSearchParams]")return e.toString();if(typeof FormData!="undefined"&&e instanceof FormData||t==="[object FormData]")return lx(e);if(typeof Blob!="undefined"&&e instanceof Blob||t==="[object Blob]"||t==="[object File]")return pg(e);if(ax(e)||ArrayBuffer.isView(e))return cx(e);if(!(typeof ReadableStream!="undefined"&&e instanceof ReadableStream||t==="[object ReadableStream]")){if(typeof Document!="undefined"&&e instanceof Document)try{return new XMLSerializer().serializeToString(e)}catch(r){return}try{return Rt(e)}catch(r){return}}},Nc=new WeakMap,ux=e=>Nc.get(e),dx=(e,t)=>z(this,null,function*(){const r=e.getReader(),n=[];let i=0;for(;i<t;){const{done:s,value:o}=yield r.read();if(s)return{chunks:n,byteLength:i,truncated:!1};const l=t-i,c=o.byteLength>l?o.subarray(0,l):o;n.push(c),i+=c.byteLength}return r.cancel().catch(()=>{}),{chunks:n,byteLength:i,truncated:!0}}),hx=({chunks:e,byteLength:t})=>{const r=new Uint8Array(t);let n=0;for(const i of e)r.set(i,n),n+=i.byteLength;return r},fx=e=>{const t=new TextDecoder("utf-8",{fatal:!0});try{let r="";for(const n of e.chunks)r+=t.decode(n,{stream:!0});return e.truncated?r:r+t.decode()}catch(r){return`[binary size${e.truncated?">":"="}${e.byteLength}]`}},Ds=e=>`[multipart/form-data size${e.truncated?">":"="}${e.byteLength}]`,px=(e,t)=>{var i,s,o,l,c,a,h;const r=/;\s*boundary=(?:"([^"]*)"|([^;]*))/i.exec(t),n=(s=(i=r==null?void 0:r[1])!=null?i:r==null?void 0:r[2])==null?void 0:s.trim();if(!n)return Ds(e);try{const u=hx(e),f=new TextDecoder("windows-1252").decode(u),d=`--${n}`,p={};let m=f.indexOf(d);if(m===-1)return Ds(e);for(;m!==-1&&(m+=d.length,!f.startsWith("--",m));){const g=f.indexOf(`\r
|
|
463
463
|
`,m),v=g===-1?-1:f.indexOf(`\r
|
|
464
464
|
\r
|
|
465
465
|
`,g);if(v===-1)break;const y=new TextDecoder().decode(u.subarray(g+2,v)),w=v+4,_=f.indexOf(`\r
|
|
466
|
-
${d}`,w),S=_===-1,b=S?f.length:_,R=(o=/\bname="([^"]*)"/i.exec(y))==null?void 0:o[1];if(R!==void 0){const I=(l=/\bfilename="([^"]*)"/i.exec(y))==null?void 0:l[1];if(I!==void 0){const E=(h=(a=(c=/^content-type:[ \t]*(.*)$/im.exec(y))==null?void 0:c[1])==null?void 0:a.trim())!=null?h:"",C=b-w;xc(p,R,`[File name="${I}" type="${E}" size${S?">=":"="}${C}]`)}else xc(p,R,new TextDecoder().decode(u.subarray(w,b)))}m=S?-1:_+2}return e.truncated&&Object.keys(p).length===0?Ds(e):JSON.stringify(p)}catch(u){return Ds(e)}},mx=(e,t)=>{try{if(t&&t.body!==void 0&&t.body!==null)return Promise.resolve(mg(t.body));if(!e.body||e.bodyUsed)return Promise.resolve(void 0);const r=e.clone();if(!r.body)return Promise.resolve(void 0);const n=e.headers.get("content-type");return dx(r.body,ac(e.headers)).then(i=>ox(n)?px(i,n):fx(i)).catch(()=>{})}catch(r){return Promise.resolve(void 0)}},gx=(e=[])=>{if(typeof window=="undefined"||typeof window.fetch!="function"||typeof Request=="undefined")return()=>{};const t=i=>e.some(s=>i.toLowerCase().includes(s)),r=window.fetch,n=function(i,s){return i instanceof Request&&!Nc.has(i)&&!t(i.url)&&Nc.set(i,mx(i,s)),r.call(this!=null?this:window,i,s)};return window.fetch=n,()=>{window.fetch===n&&(window.fetch=r)}};class Oc{constructor(t,r){L(this,"debug");L(this,"name");this.debug=t,this.name=r}prefix(){let t=`[${Date.now()}]`;return this.name&&(t+=` - ${this.name}`),t}log(...t){this.debug&&dl(()=>console.log.apply(console,[this.prefix(),...t]))}warn(...t){(this.debug||_f())&&dl(()=>console.warn.apply(console,[this.prefix(),...t]))}}class Gc{constructor(){L(this,"_sdk");L(this,"_isLoaded",!1);L(this,"_isReady",!1);L(this,"_callBuffer",[]);L(this,"_capacity",1e5);L(this,"_droppedEvents",0);L(this,"_exceededCapacity",!1);L(this,"_logger",new Oc);L(this,"_pendingStart");L(this,"_lastOp")}_bufferCall(t,r){if(this._isReady)return this._callSdk(t,r);this._enqueue({method:t,args:r})}_callSdk(t,r){try{return this._sdk[t](...r)}catch(n){We(`Error executing buffered call to ${t}:`,"error",n)}}_enqueue(t){this._callBuffer.length<this._capacity?(this._callBuffer.push(t),this._exceededCapacity=!1):(this._exceededCapacity||(this._exceededCapacity=!0,We("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this._droppedEvents+=1)}load(t,{ready:r=!0,started:n}={}){this._sdk=t,this._isLoaded=!0;const i=this._pendingStart;this._pendingStart=void 0,r?(this.markReady(),n?this._queueOp("start",()=>z(this,null,function*(){yield n})).catch(o=>{We("Error starting the SDK","error",o)}).then(()=>i==null?void 0:i.resolve()):i==null||i.resolve()):i&&this._runPendingStart(i)}_runPendingStart(t){return z(this,null,function*(){try{yield this._start()}catch(r){We("Error starting the SDK","error",r)}t.resolve()})}_start(){var t;return this._isLoaded?((t=this._lastOp)==null?void 0:t.kind)==="start"?this._lastOp.promise:this._queueOp("start",()=>z(this,null,function*(){try{yield this._startSdk()}finally{this.markReady()}})):this._deferStart()}_stop(t){return this._isLoaded?this._queueOp("stop",()=>z(this,null,function*(){try{yield t()}catch(r){We("Error stopping the SDK","error",r)}})):(this._cancelPendingStart(),Promise.resolve())}_queueOp(t,r){var s;const n=(s=this._lastOp)==null?void 0:s.promise,i=(n?n.then(r,r):r()).finally(()=>{var o;((o=this._lastOp)==null?void 0:o.promise)===i&&(this._lastOp=void 0)});return this._lastOp={kind:t,promise:i},i}_startSdk(){return z(this,null,function*(){})}markReady(){if(!this._isReady){this._isReady=!0;for(const{method:t,args:r}of this._callBuffer)try{this._sdk[t](...r)}catch(n){We(`Error executing buffered call to ${t}:`,"error",n)}this._callBuffer=[]}}_deferStart(){if(!this._pendingStart){let t;const r=new Promise(n=>{t=n});this._pendingStart={promise:r,resolve:t}}return this._pendingStart.promise}_cancelPendingStart(){this._pendingStart&&(this._pendingStart.resolve(),this._pendingStart=void 0)}}const Ye="feature_flag",gg="launchdarkly",Vc="evaluation",yx=`${Ye}.${Vc}`,yg=`${Ye}.set.id`,bg=`${Ye}.key`,vg=`${Ye}.contextKeys`,Sg=`${Ye}.context.id`,wg=`${Ye}.result.value`,kc=`${Ye}.provider.name`,Fs={kind:`${Ye}.result.reason.kind`,errorKind:`${Ye}.result.reason.errorKind`,ruleIndex:`${Ye}.result.reason.ruleIndex`,ruleId:`${Ye}.result.reason.ruleId`,prerequisiteKey:`${Ye}.result.reason.prerequisiteKey`,inExperiment:`${Ye}.result.reason.inExperiment`,bigSegmentsStatus:`${Ye}.result.reason.bigSegmentsStatus`},Rg=`${Ye}.result.variationIndex`,_g=`${gg}.application.id`,Tg=`${gg}.application.version`,bx="context.contextKeys",vx="$ld:telemetry:session:init",Eg="$ld:telemetry:track",Sx="launchdarkly.track",wx="page_view",Rx="document_load",_x="result.status";function Ig(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}function Cg(e){return e.kind==="multi"}function Lr(e){return Cg(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${Ig(e[t].key)}`).join(":"):"kind"in e&&e.kind==="user"?e.key:"kind"in e?`${e.kind}:${Ig(e.key)}`:e.key}function Qn(e){return Cg(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>({[t]:e[t].key})).reduce((t,r)=>x(x({},t),r),{}):"kind"in e?{[e.kind]:e.key}:{user:e.key}}function Tx(e,t,r){t.addHook({getMetadata:()=>({name:"highlight.run"}),afterIdentify:(n,i,s)=>{var l,c;const o=B(x({},Qn(n.context)),{key:(c=(l=r==null?void 0:r.contextFriendlyName)==null?void 0:l.call(r,n.context))!=null?c:Lr(n.context)});return e.log("LD.identify","INFO",o),s.status==="completed"&&e.identify(o.key,o,"LaunchDarkly"),i},afterEvaluation:(n,i,s)=>{const o=x({[kc]:"LaunchDarkly",[bg]:n.flagKey,[wg]:JSON.stringify(s.value)},s.variationIndex!==void 0&&s.variationIndex!==null?{[Rg]:s.variationIndex}:{});if(s.reason)for(const l in Fs){const c=l,a=s.reason[c];a!=null&&(o[Fs[c]]=a)}return n.context&&(o[vg]=JSON.stringify(Qn(n.context)),o[Sg]=Lr(n.context)),e.startSpan(Vc,l=>{l&&l.addEvent(yx,o)}),i}})}class Ex{constructor(t,r){L(this,"client");L(this,"metadata");this.client=t,this.metadata=r}getHooks(t){return[]}init(t){this.client.track(vx,{sessionID:t})}recordGauge(t,r){}identify(t,r,n={},i){}error(t,r){}track(t,r){const n=r.event;this.client.track(n?`${Eg}:${n}`:Eg,B(x({},r),{sessionID:t}))}}class Js extends Gc{constructor(r,n){super();L(this,"client");this.client=new Ex(r,n)}getHooks(r){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(n,i,s)=>(this.load(this.client),i)}]}init(r){return this._bufferCall("init",[r])}recordGauge(r,n){return this._bufferCall("recordGauge",[r,n])}identify(r,n,i={},s){return this._bufferCall("identify",[r,n,i,s])}error(r,n){return this._bufferCall("error",[r,n])}track(r,n){return this._bufferCall("track",[r,n])}}const Xc=e=>{e(window.location.href);const t=history.pushState;history.pushState=(s=>function(){var l=s.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),l})(history.pushState);const r=history.replaceState;history.replaceState=(s=>function(){var l=s.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),l})(history.replaceState);const n=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",n);const i=function(){e(window.location.href)};return window.addEventListener("locationchange",i),()=>{window.removeEventListener("popstate",n),window.removeEventListener("locationchange",i),history.pushState=t,history.replaceState=r}},un=class un extends An{constructor(r={}){super(un.moduleName,un.version,r);L(this,"_getLDContextKeyAttributes");L(this,"_unlisten");L(this,"_lastUrl","");this._getLDContextKeyAttributes=r.getLDContextKeyAttributes}init(){}enable(){this._lastUrl=window.location.href,this._unlisten=Xc(r=>{var i;const n=this._lastUrl;if(this._lastUrl=r,n!==r)try{const s=this.tracer.startSpan(wx,{attributes:{[nr]:r,"page_view.previous_url":n,"page_view.url":r}}),o=(i=this._getLDContextKeyAttributes)==null?void 0:i.call(this);o&&s.setAttributes(o),s.end()}catch(s){this._diag.error("failed to create page view span",s)}})}disable(){var r;(r=this._unlisten)==null||r.call(this),this._unlisten=void 0}};L(un,"version","0.1.0"),L(un,"moduleName","location-change");let Wc=un;const Pc={version:"1.4.0"}.version;let De={},Ht,Hs,xr,Nr;const Or="highlight.record",Ix="highlight.session_id",Ys=new Map,Mc=e=>`${e.spanContext().traceId}:${e.spanContext().spanId}`,Zg="launchdarkly.js.log",Cx="launchdarkly.exception.id",Lg="launchdarkly.sampling.ratio",xg="log.severity",Ng="log.message",Og=(e,t)=>{var g,v,y,w,_,S,b,R,I,E,C,N,G,q;if(De.tracerProvider||De.meterProvider){_e("warn","OTEL already initialized. Skipping...");return}Ht=e,_f()&&Y.setLogger({verbose:(...Z)=>_e("debug",...Z),debug:(...Z)=>_e("debug",...Z),info:(...Z)=>_e("info",...Z),warn:(...Z)=>_e("warn",...Z),error:(...Z)=>_e("error",...Z)},Ne.WARN);const r=e.backendUrl||void 0||"https://pub.highlight.io",n=[...(v=(g=e.networkRecordingOptions)==null?void 0:g.urlBlocklist)!=null?v:[],...Ef],i=[r,e.otlpEndpoint].filter(Z=>!!Z).map(Z=>Z.toLowerCase()),s=(y=e.environment)!=null?y:"production",o={url:e.otlpEndpoint+"/v1/traces",concurrencyLimit:10,timeoutMillis:3e4,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:6e4,keepAlive:!0}},l=new qL(o,t),c=new Bs(l,{maxExportBatchSize:1024,maxQueueSize:2048,exportTimeoutMillis:o.timeoutMillis,scheduledDelayMillis:5e3}),a=new Un({[cE]:(w=e.serviceName)!=null?w:"highlight-browser",[uE]:e.serviceVersion,"deployment.environment.name":s,"highlight.project_id":e.projectId,[hE]:navigator.userAgent,"browser.language":navigator.language,"telemetry.distro.name":"@highlight-run/observability","telemetry.distro.version":Pc});De.tracerProvider=new UT({resource:a,mergeResourceWithDefaults:!0,spanProcessors:[c]}),we.setGlobalTracerProvider(De.tracerProvider);const h=Zx(o,e.otlpEndpoint+"/v1/metrics"),u=new YC({exporter:h,exportIntervalMillis:o.timeoutMillis,exportTimeoutMillis:o.timeoutMillis});De.meterProvider=new OZ({resource:a,readers:[u]}),El.setGlobalMeterProvider(De.meterProvider);let f=[];if(((_=e.instrumentations)==null?void 0:_["@opentelemetry/instrumentation-document-load"])!==!1&&f.push(new gE({applyCustomAttributesOnSpan:{documentLoad:Wg,documentFetch:Wg,resourceFetch:Ax}})),((S=e.instrumentations)==null?void 0:S["@opentelemetry/instrumentation-user-interaction"])!==!1&&f.push(new Lc({productAnalyticsEvents:e.productAnalyticsEvents,getLDContextKeyAttributes:e.getLDContextKeyAttributes})),((b=e.productAnalyticsEvents)==null?void 0:b.pageViews)!==!1&&f.push(new Wc({getLDContextKeyAttributes:e.getLDContextKeyAttributes})),(R=e.networkRecordingOptions)!=null&&R.enabled){if(((I=e.instrumentations)==null?void 0:I["@opentelemetry/instrumentation-fetch"])!==!1){const W=new JE({propagateTraceHeaderCorsUrls:Mg(e.tracingOrigins),applyCustomAttributesOnSpan:(k,M,P)=>{var de;if(!k.attributes)return;const U=k;if(U.attributes[Or]===!1)return;const $=typeof Request!="undefined"&&M instanceof Request,me=$?ux(M):void 0;kg(k,$?void 0:M.body,M.headers,e.networkRecordingOptions);const O=()=>z(this,null,function*(){const ve=yield me;ve!==void 0&&Gx(k,ve,M.headers,e.networkRecordingOptions)}),ye=()=>{var ve;return(ve=e.networkRecordingOptions)!=null&&ve.requestResponseSanitizer&&Xg(k,e.networkRecordingOptions.requestResponseSanitizer),U.attributes[Or]!==!1};if(!(P instanceof Response)){if(k.setAttributes({"http.response.error":P.message,[Wp]:P.status}),!ye())return;me&&Ys.set(Mc(k),O().then(()=>{ye()}));return}if(ye()&&(de=e.networkRecordingOptions)!=null&&de.recordHeadersAndBody){const ve=z(this,null,function*(){var te,K,ie,ce,Ce;yield O();const D=yield dm(P,(te=e.networkRecordingOptions)==null?void 0:te.bodyKeysToRecord,(K=e.networkRecordingOptions)==null?void 0:K.networkBodyKeysToRedact),F=Object.fromEntries(P.headers.entries()),H=ts((ce=(ie=e.networkRecordingOptions)==null?void 0:ie.networkHeadersToRedact)!=null?ce:[],F,(Ce=e.networkRecordingOptions)==null?void 0:Ce.headerKeysToRecord),Q=Uc(H,"http.response.header");Object.assign(k.attributes,x({"http.response.body":D},Q)),ye()});Ys.set(Mc(k),ve)}}});f.push(W)}((E=e.instrumentations)==null?void 0:E["@opentelemetry/instrumentation-xml-http-request"])!==!1&&f.push(new fI({propagateTraceHeaderCorsUrls:Mg(e.tracingOrigins),applyCustomAttributesOnSpan:(W,k)=>{var U,$,me,O;const M=k;if(!(!W.attributes||W.attributes[Or]===!1)){if(kg(W,M._body,M._requestHeaders,e.networkRecordingOptions),(U=e.networkRecordingOptions)!=null&&U.recordHeadersAndBody){let ye="";(k.responseType===""||k.responseType==="text")&&(ye=Ot(k.responseText,($=e.networkRecordingOptions)==null?void 0:$.networkBodyKeysToRedact,(me=e.networkRecordingOptions)==null?void 0:me.bodyKeysToRecord,void 0));const de=Vx(k.getAllResponseHeaders());Px(W,de,ye,e.networkRecordingOptions)}(O=e.networkRecordingOptions)!=null&&O.requestResponseSanitizer&&Xg(W,e.networkRecordingOptions.requestResponseSanitizer)}}}))}nT({instrumentations:f}),(C=e.networkRecordingOptions)!=null&&C.enabled&&e.networkRecordingOptions.recordHeadersAndBody&&((N=e.instrumentations)==null?void 0:N["@opentelemetry/instrumentation-xml-http-request"])!==!1&&(xr==null||xr(),xr=ix([...n,...i])),(G=e.networkRecordingOptions)!=null&&G.enabled&&e.networkRecordingOptions.recordHeadersAndBody&&((q=e.instrumentations)==null?void 0:q["@opentelemetry/instrumentation-fetch"])!==!1&&(Nr==null||Nr(),Nr=gx([...n,...i]));const m=new Op;return m.enable(),De.tracerProvider.register({contextManager:m,propagator:new $f({propagators:[new Ff,new xx({backendUrl:r,otlpEndpoint:e.otlpEndpoint,tracingOrigins:e.tracingOrigins,urlBlocklist:n})]})}),Hs=Lx(l,h,c,()=>De),De},Zx=(e,t)=>new ex(B(x({},e),{url:t,temporalityPreference:jn.DELTA})),Lx=(e,t,r,n)=>{if(typeof document=="undefined"||typeof window=="undefined")return()=>{};const i=()=>{var c,a;e.setUnloading(!0),t.setUnloading(!0),r.setSkipPendingOnFlush(!0);const l=n();(c=l.tracerProvider)==null||c.forceFlush().catch(()=>{}),(a=l.meterProvider)==null||a.forceFlush().catch(()=>{})},s=()=>{document.visibilityState==="hidden"?i():document.visibilityState==="visible"&&(e.setUnloading(!1),t.setUnloading(!1),r.setSkipPendingOnFlush(!1))},o=()=>i();return document.addEventListener("visibilitychange",s),window.addEventListener("pagehide",o),()=>{document.removeEventListener("visibilitychange",s),window.removeEventListener("pagehide",o)}};class Bs extends Ip{constructor(){super(...arguments);L(this,"_pendingSpans",new Set);L(this,"_skipPendingOnFlush",!1)}setSkipPendingOnFlush(r){this._skipPendingOnFlush=r}onStart(r,n){r.setAttribute(Ix,Nt()),super.onStart(r,n)}onEnd(r){if(r.attributes[Or]===!1)return;LI();const n=Mc(r),i=Ys.get(n);if(i){const s=i.catch(o=>{_e("warn","[CustomBatchSpanProcessor] Failed to capture response body attributes",o)}).finally(()=>{Ys.delete(n),this._pendingSpans.delete(s),r.attributes[Or]!==!1&&super.onEnd(r)});this._pendingSpans.add(s);return}super.onEnd(r)}shutdown(){return z(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),wu(Bs.prototype,this,"shutdown").call(this)})}forceFlush(){return z(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),wu(Bs.prototype,this,"forceFlush").call(this)})}}class xx extends rp{constructor(r){super();L(this,"highlightEndpoints");L(this,"tracingOrigins");L(this,"urlBlocklist");this.highlightEndpoints=[r.backendUrl,`${r.otlpEndpoint}/v1/traces`,`${r.otlpEndpoint}/v1/logs`,`${r.otlpEndpoint}/v1/metrics`],this.tracingOrigins=r.tracingOrigins,this.urlBlocklist=r.urlBlocklist}inject(r,n,i){var l;const s=we.getSpan(r);if(!s||!s.attributes)return;const o=Ag(s);typeof o=="string"&&(Mx(o,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||s.setAttribute(Or,!1),!nc(o,(l=this.tracingOrigins)!=null?l:[],this.urlBlocklist))||super.inject(r,n,i)}}const Gg="highlight-browser",Nx=Gg,zs=()=>{var e;return(e=De.tracerProvider)==null?void 0:e.getTracer(Gg)},or=()=>{var e;return(e=De.meterProvider)==null?void 0:e.getMeter(Nx)},Ox=()=>we.getActiveSpan(),Ac=()=>z(this,null,function*(){Hs&&(Hs(),Hs=void 0),xr&&(xr(),xr=void 0),Nr&&(Nr(),Nr=void 0),yield Promise.allSettled([z(this,null,function*(){De.tracerProvider?(yield De.tracerProvider.shutdown(),De.tracerProvider=void 0):_e("warn","OTEL shutdown called without initialized tracerProvider.")}),z(this,null,function*(){De.meterProvider?(yield De.meterProvider.shutdown(),De.meterProvider=void 0):_e("warn","OTEL shutdown called without initialized meterProvider.")})])}),Vg=e=>{const t=pI(e),r={};return t!=null&&t.name&&(r["graphql.operation.name"]=t.name),t!=null&&t.type&&(r["graphql.operation.type"]=t.type),r},Gx=(e,t,r,n)=>{if(!e.attributes)return;const i=e.attributes;Object.assign(i,Vg(t)),n!=null&&n.recordHeadersAndBody&&Object.assign(i,{"http.request.body":Ot(t,n.networkBodyKeysToRedact,n.bodyKeysToRecord,fg(r))})},kg=(e,t,r,n)=>{var h;if(!e.attributes)return;const s=Ag(e),o=ns(s),l=If(o),c=mg(t),a=fg(r);if(e.setAttributes(Vg(c!=null?c:t)),e.setAttributes({"highlight.type":"http.request",[en]:o,[nr]:o,[_s]:l.pathname,[dE]:l.search}),e.setAttributes(kx(l.searchParams,"url.query_params")),n!=null&&n.recordHeadersAndBody){c!==void 0&&e.setAttribute("http.request.body",Ot(c,n.networkBodyKeysToRedact,n.bodyKeysToRecord,a));const u=ts((h=n.networkHeadersToRedact)!=null?h:[],a,n.headerKeysToRecord),f=Uc(u,"http.request.header");e.setAttributes(f)}},Vx=e=>{const t={};return e&&e.trim().split(/[\r\n]+/).forEach(r=>{const n=r.split(": "),i=n.shift();i&&(t[i]=n.join(": "))}),t},Uc=(e,t)=>{const r={};return Object.entries(e).forEach(([n,i])=>{const s=n.toLowerCase().replace(/_/g,"-"),o=`${t}.${s}`,l=Wx(s,i);if(r[o]){const c=r[o];Array.isArray(c)?r[o]=[...c,...l]:r[o]=[c,...l]}else r[o]=l.length===1?l[0]:l}),r},kx=(e,t)=>{const r={};for(const[n,i]of e.entries()){const s=`${t}.${n}`,o=r[s];o===void 0?r[s]=i:Array.isArray(o)?o.push(i):r[s]=[o,i]}return r},Xx=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"]),Wx=(e,t)=>Xx.has(e)?t.split(",").map(r=>r.trim()).filter(r=>r.length>0):[t],Px=(e,t,r,n)=>{var o;e.setAttribute("http.response.body",r);const i=ts((o=n.networkHeadersToRedact)!=null?o:[],t,n.headerKeysToRecord),s=Uc(i,"http.response.header");e.setAttributes(s)},Xg=(e,t)=>{var u,f,d,p,m,g,v,y,w,_,S,b;const n=e.attributes,i={},s={};for(const[R,I]of Object.entries(n))R.startsWith("http.request.header.")&&(i[R.slice(20)]=String(I)),R.startsWith("http.response.header.")&&(s[R.slice(21)]=String(I));let l={request:{sessionSecureID:"",id:"",url:(f=(u=n[nr])!=null?u:n[en])!=null?f:"",verb:(p=(d=n["http.request.method"])!=null?d:n[iE])!=null?p:"GET",headers:i,body:(m=n["http.request.body"])!=null?m:""},response:{status:Number((v=(g=n[Wp])!=null?g:n[sE])!=null?v:0),headers:s,body:(y=n["http.response.body"])!=null?y:""},urlBlocked:!1},c=!0;try{l.request.body=JSON.parse(l.request.body)}catch(R){c=!1}let a=!0;try{l.response.body=JSON.parse(l.response.body)}catch(R){a=!1}let h;try{h=t(l)}catch(R){return}if(!h){Object.assign(e.attributes,{[Or]:!1});return}c&&((w=h.request)!=null&&w.body)&&(h.request.body=JSON.stringify(h.request.body)),a&&((_=h.response)!=null&&_.body)&&(h.response.body=JSON.stringify(h.response.body)),Object.assign(e.attributes,{"http.request.body":(S=h.request.body)!=null?S:"","http.response.body":(b=h.response.body)!=null?b:""})},Mx=(e,t,r,n)=>n!=null&&n.some(s=>e.toLowerCase().includes(s))?!1:Gs(e,t),Wg=e=>{var s,o,l;if(!e.events)return;const r=e.events,n={unload:gt("unloadEventStart","unloadEventEnd",r),dom_interactive:gt("fetchStart","domInteractive",r),dom_content_loaded:gt("domContentLoadedEventStart","domContentLoadedEventEnd",r),dom_complete:gt("fetchStart","domComplete",r),load_event:gt("loadEventStart","loadEventEnd",r),document_load:gt("fetchStart","loadEventEnd",r),first_paint:gt("fetchStart","firstPaint",r),first_contentful_paint:gt("fetchStart","firstContentfulPaint",r),domain_lookup:gt("domainLookupStart","domainLookupEnd",r),connect:gt("connectStart","connectEnd",r),request:gt("requestStart","requestEnd",r),response:gt("responseStart","responseEnd",r)},i=(o=(s=Ht==null?void 0:Ht.getIntegrations)==null?void 0:s.call(Ht))!=null?o:[];if(n.document_load!==void 0)for(const c of i)c.recordGauge((l=Ht==null?void 0:Ht.sessionSecureId)!=null?l:"",{name:Rx,value:n.document_load/1e6});Object.entries(n).forEach(([c,a])=>{a!==void 0&&(e.setAttribute(`timings.${c}.ns`,a),e.setAttribute(`timings.${c}.readable`,Pg(a)))})};function gt(e,t,r){const n=r.find(l=>l.name===e),i=r.find(l=>l.name===t);if(!n||!i)return;const s=n.time[0]*1e9+n.time[1];return i.time[0]*1e9+i.time[1]-s}const Ax=(e,t)=>{const r={domain_lookup:(t.domainLookupEnd-t.domainLookupStart)*1e6,connect:(t.connectEnd-t.connectStart)*1e6,request:(t.responseEnd-t.requestStart)*1e6,response:(t.responseEnd-t.responseStart)*1e6};Object.entries(r).forEach(([n,i])=>{e.setAttribute(`timings.${n}.ns`,i),e.setAttribute(`timings.${n}.readable`,Pg(i))})},Pg=e=>{if(e>=36e11){const o=e/36e11;return`${Number(o.toFixed(1))}h`}else if(e>=6e10){const o=e/6e10;return`${Number(o.toFixed(1))}m`}else if(e>=1e9){const o=e/1e9;return`${Number(o.toFixed(1))}s`}else if(e>=1e6){const o=e/1e6;return`${Number(o.toFixed(1))}ms`}else if(e>=1e3){const o=e/1e3;return`${Number(o.toFixed(1))}µs`}else return`${Number(e.toFixed(1))}ns`},Mg=e=>e===!0?[/localhost/,/^\//,am(window.location.host)]:Array.isArray(e)?e.map(t=>typeof t=="string"?new RegExp(t):t):/^$/,Ag=e=>e.attributes[nr]?e.attributes[nr]:e.attributes[en],Ux=(e,t,r)=>{const n=window._highlightWebSocketRequestCallback;window._highlightWebSocketRequestCallback=e;const i=window._highlightWebSocketEventCallback;return window._highlightWebSocketEventCallback=s=>{const u=s,{message:o,size:l}=u,c=nt(u,["message","size"]),h=r.some(f=>s.name.toLowerCase().includes(f))?c:s;t(h)},()=>{window._highlightWebSocketRequestCallback=n,window._highlightWebSocketEventCallback=i}},Dx=({xhrCallback:e,fetchCallback:t,webSocketRequestCallback:r,webSocketEventCallback:n,disableWebSocketRecording:i,bodyKeysToRedact:s,highlightEndpoints:o,tracingOrigins:l,urlBlocklist:c,bodyKeysToRecord:a})=>{const h=UI(e,o,l,c,s,a),u=YI(t,o,l,c,s,a),f=i?()=>{}:Ux(r,n,c);return()=>{h(),u(),f()}};class Yt{constructor(t){L(this,"disableConsoleRecording");L(this,"reportConsoleErrors");L(this,"enablePromisePatch");L(this,"consoleMethodsToRecord");L(this,"listeners");L(this,"errors");L(this,"messages");L(this,"options");L(this,"hasNetworkRecording",!0);L(this,"disableNetworkRecording");L(this,"enableRecordingNetworkContents");L(this,"xhrNetworkContents");L(this,"fetchNetworkContents");L(this,"disableRecordingWebSocketContents");L(this,"webSocketNetworkContents");L(this,"webSocketEventContents");L(this,"tracingOrigins");L(this,"networkHeadersToRedact");L(this,"networkBodyKeysToRedact");L(this,"networkBodyKeysToRecord");L(this,"networkHeaderKeysToRecord");L(this,"lastNetworkRequestTimestamp");L(this,"urlBlocklist");L(this,"highlightEndpoints");L(this,"requestResponseSanitizer");var r,n;this.options=t,this.disableConsoleRecording=!!t.disableConsoleRecording,this.reportConsoleErrors=(r=t.reportConsoleErrors)!=null?r:!1,this.enablePromisePatch=(n=t.enablePromisePatch)!=null?n:!1,this.consoleMethodsToRecord=t.consoleMethodsToRecord||[...il],this.listeners=[],this.errors=[],this.messages=[],this.lastNetworkRequestTimestamp=0}isListening(){return this.listeners.length>0}startListening(){if(this.isListening())return;const t=this;this.disableConsoleRecording||this.listeners.push(Zf(r=>{var n,i,s;if(this.reportConsoleErrors&&(r.type==="Error"||r.type==="error")&&r.value&&r.trace){const o=Rt(r.value);if(ml.includes(o)||gl.some(l=>o.includes(l)))return;t.errors.push({event:o,type:"console.error",url:window.location.href,source:(n=r.trace[0])!=null&&n.fileName?r.trace[0].fileName:"",lineNumber:(i=r.trace[0])!=null&&i.lineNumber?r.trace[0].lineNumber:0,columnNumber:(s=r.trace[0])!=null&&s.columnNumber?r.trace[0].columnNumber:0,stackTrace:r.trace,timestamp:new Date().toISOString(),id:In()})}t.messages.push(r)},B(x({},Cf),{level:this.consoleMethodsToRecord,recordLaunchDarklySdkLogs:this.options.recordLaunchDarklySdkLogs}))),this.listeners.push(xf(r=>{ml.includes(r.event)||gl.some(n=>r.event.includes(n))||t.errors.push(r)},{enablePromisePatch:this.enablePromisePatch})),this.listeners.push(Ac),Yt.setupNetworkListener(this,this.options)}stopListening(){this.listeners.forEach(t=>t()),this.listeners=[]}static setupNetworkListener(t,r){var s,o,l,c,a,h,u,f,d,p,m,g;const n=(r==null?void 0:r.backendUrl)||void 0||"https://pub.highlight.io",i=r.otlpEndpoint||"https://otel.highlight.io";t.highlightEndpoints=[n,`${i}/v1/traces`,`${i}/v1/logs`,`${i}/v1/metrics`],t.xhrNetworkContents=[],t.fetchNetworkContents=[],t.webSocketNetworkContents=[],t.webSocketEventContents=[],t.networkHeadersToRedact=[],t.urlBlocklist=[],t.tracingOrigins=r.tracingOrigins||[],(r==null?void 0:r.disableNetworkRecording)!==void 0?(t.disableNetworkRecording=r==null?void 0:r.disableNetworkRecording,t.enableRecordingNetworkContents=!1,t.disableRecordingWebSocketContents=!0,t.networkHeadersToRedact=[],t.networkBodyKeysToRedact=[],t.urlBlocklist=[],t.networkBodyKeysToRecord=[]):typeof(r==null?void 0:r.networkRecording)=="boolean"?(t.disableNetworkRecording=!r.networkRecording,t.enableRecordingNetworkContents=!1,t.disableRecordingWebSocketContents=!0,t.networkHeadersToRedact=[],t.networkBodyKeysToRedact=[],t.urlBlocklist=[]):(((s=r.networkRecording)==null?void 0:s.enabled)!==void 0?t.disableNetworkRecording=!r.networkRecording.enabled:t.disableNetworkRecording=!1,t.enableRecordingNetworkContents=((o=r.networkRecording)==null?void 0:o.recordHeadersAndBody)||!1,t.disableRecordingWebSocketContents=((l=r.networkRecording)==null?void 0:l.disableWebSocketEventRecordings)||!1,t.networkHeadersToRedact=((a=(c=r.networkRecording)==null?void 0:c.networkHeadersToRedact)==null?void 0:a.map(v=>v.toLowerCase()))||[],t.networkBodyKeysToRedact=((u=(h=r.networkRecording)==null?void 0:h.networkBodyKeysToRedact)==null?void 0:u.map(v=>v.toLowerCase()))||[],t.urlBlocklist=((d=(f=r.networkRecording)==null?void 0:f.urlBlocklist)==null?void 0:d.map(v=>v.toLowerCase()))||[],t.urlBlocklist=[...t.urlBlocklist,...Ef],t.requestResponseSanitizer=(p=r.networkRecording)==null?void 0:p.requestResponseSanitizer,t.networkHeaderKeysToRecord=(m=r.networkRecording)==null?void 0:m.headerKeysToRecord,t.networkHeaderKeysToRecord&&(t.networkHeadersToRedact=[],t.networkHeaderKeysToRecord=t.networkHeaderKeysToRecord.map(v=>v.toLocaleLowerCase())),t.networkBodyKeysToRecord=(g=r.networkRecording)==null?void 0:g.bodyKeysToRecord,t.networkBodyKeysToRecord&&(t.networkBodyKeysToRedact=[],t.networkBodyKeysToRecord=t.networkBodyKeysToRecord.map(v=>v.toLocaleLowerCase()))),!t.disableNetworkRecording&&t.enableRecordingNetworkContents&&(t.hasNetworkRecording=!0,t.listeners.push(Dx({xhrCallback:v=>{t.xhrNetworkContents.push(v)},fetchCallback:v=>{t.fetchNetworkContents.push(v)},webSocketRequestCallback:v=>{t.webSocketNetworkContents&&t.webSocketNetworkContents.push(v)},webSocketEventCallback:v=>{t.webSocketEventContents.push(v)},disableWebSocketRecording:t.disableRecordingWebSocketContents,bodyKeysToRedact:t.networkBodyKeysToRedact,highlightEndpoints:t.highlightEndpoints,tracingOrigins:t.tracingOrigins,urlBlocklist:t.urlBlocklist,bodyKeysToRecord:t.networkBodyKeysToRecord})))}static getRecordedNetworkResources(t,r){var s,o;let n=[],i=[];if(!t.disableNetworkRecording){const l=((s=window==null?void 0:window.performance)==null?void 0:s.timeOrigin)||0;n=performance.getEntriesByType("resource");const c=(r-l)*2;if(n=n.filter(a=>a.responseEnd<t.lastNetworkRequestTimestamp?!1:Gs(a.name,t.highlightEndpoints)).map(a=>B(x({},a.toJSON()),{offsetStartTime:a.startTime-c,offsetResponseEnd:a.responseEnd-c,offsetFetchStart:a.fetchStart-c})),t.lastNetworkRequestTimestamp=((o=n.at(-1))==null?void 0:o.responseEnd)||t.lastNetworkRequestTimestamp,t.enableRecordingNetworkContents){const a={headersToRedact:t.networkHeadersToRedact,headersToRecord:t.networkHeaderKeysToRecord,requestResponseSanitizer:t.requestResponseSanitizer};n=om(n,t.xhrNetworkContents,"xmlhttprequest",a),n=om(n,t.fetchNetworkContents,"fetch",a)}}return t.disableRecordingWebSocketContents||(i=t.webSocketNetworkContents||[]),[...n,...i]}static getRecordedWebSocketEvents(t){let r=[];return!t.disableNetworkRecording&&!t.disableRecordingWebSocketContents&&(r=t.webSocketEventContents),r}static clearRecordedNetworkResources(t){t.disableNetworkRecording||(t.xhrNetworkContents=[],t.fetchNetworkContents=[],t.webSocketNetworkContents=[],t.webSocketEventContents=[],performance.clearResourceTimings())}}const Ug=(e,t,r)=>{switch(e){case"strict":return[!0,void 0];case"default":return[!0,void 0];case"none":return[!!t,B(x({},r),{password:!0})]}},Dg=(e,t)=>e==="strict"?"strict":(t!=null?t:e==="default")?"default":"none";let yt,Dc;function Fg(e,t){return e.nodeType,Node.ELEMENT_NODE,Bc(e);return Fx(e,t)}function Fc(e){if(e.id.length)return`#${e.id}`;if(e.classList.length){let t=[];for(const r of e.classList)t.push(`.${r}`);return`${e.nodeName.toLowerCase()}${t.join(",")}`}return e.nodeName.toLowerCase()}function Fx(e,t){if(e.tagName.toLowerCase()==="html")return"html";try{const r={root:document.body,idName:i=>!0,className:i=>!0,tagName:i=>!0,attr:(i,s)=>!1,seedMinLength:1,optimizedMinLength:2,threshold:50,maxNumberOfTries:1e3,optimized:!0};yt=x(x({},r),t),Dc=Jx(yt.root,r);let n=Jc(e,0,()=>Jc(e,1,()=>Jc(e,2)));if(n){if(yt.optimized){const i=zg(Kg(n,e));i.length>0&&(n=i[0])}return Ks(n)}else return Bc(e)}catch(r){return Bc(e)}}function Jx(e,t){return e.nodeType===Node.DOCUMENT_NODE?e:e===t.root?e.ownerDocument:e}function Jc(e,t,r){let n=null,i=[],s=e,o=0;for(;s&&s!==yt.root.parentElement;){let l=js(Hx(s))||js(...Yx(s))||js(...Bx(s))||js(zx(s))||[Kx()];const c=jx(s);if(t===0)c&&(l=l.concat(l.filter(Yc).map(a=>Hc(a,c))));else if(t===1)l=l.slice(0,1),c&&(l=l.concat(l.filter(Yc).map(a=>Hc(a,c))));else if(t===2){const[a]=l=l.slice(0,1);c&&Yc(a)&&(l=[Hc(a,c)])}for(let a of l)a.level=o;if(i.push(l),i.length>=yt.seedMinLength&&(n=Jg(i,r),n))break;s=s.parentElement,o++}return n||(n=Jg(i,r)),n}function Jg(e,t){const r=zg(Bg(e));if(r.length>yt.threshold)return t?t():null;for(let n of r)if(Yg(n))return n;return null}function Ks(e){let t=e[0],r=t.name;for(let n=1;n<e.length;n++){const i=e[n].level||0;t.level===i-1?r=`${e[n].name} > ${r}`:r=`${e[n].name} ${r}`,t=e[n]}return r}function Hg(e){return e.map(t=>t.penalty).reduce((t,r)=>t+r,0)}function Yg(e){switch(Dc.querySelectorAll(Ks(e)).length){case 0:return!0;case 1:return!0;default:return!1}}function Hx(e){const t=e.getAttribute("id");return t&&yt.idName(t)?{name:"#"+Qs(t,{isIdentifier:!0}),penalty:0}:null}function Yx(e){return Array.from(e.attributes).filter(r=>yt.attr(r.name,r.value)).map(r=>({name:"["+Qs(r.name,{isIdentifier:!0})+'="'+Qs(r.value)+'"]',penalty:.5}))}function Bx(e){return Array.from(e.classList).filter(yt.className).map(r=>({name:"."+Qs(r,{isIdentifier:!0}),penalty:1}))}function zx(e){const t=e.tagName.toLowerCase();return yt.tagName(t)?{name:t,penalty:2}:null}function Kx(){return{name:"*",penalty:3}}function jx(e){const t=e.parentNode;if(!t)return null;let r=t.firstChild;if(!r)return null;let n=0;for(;r&&(r.nodeType===Node.ELEMENT_NODE&&n++,r!==e);)r=r.nextSibling;return n}function Hc(e,t){return{name:e.name+`:nth-child(${t})`,penalty:e.penalty+1}}function Yc(e){return e.name!=="html"&&!e.name.startsWith("#")}function js(...e){const t=e.filter(Qx);return t.length>0?t:null}function Qx(e){return e!=null}function*Bg(e,t=[]){if(e.length>0)for(let r of e[0])yield*Ru(Bg(e.slice(1,e.length),t.concat(r)));else yield t}function zg(e){return Array.from(e).sort((t,r)=>Hg(t)-Hg(r))}function*Kg(e,t,r={counter:0,visited:new Map}){if(e.length>2&&e.length>yt.optimizedMinLength)for(let n=1;n<e.length-1;n++){if(r.counter>yt.maxNumberOfTries)return;r.counter+=1;const i=[...e];i.splice(n,1);const s=Ks(i);if(r.visited.has(s))return;Yg(i)&&$x(i,t)&&(yield i,r.visited.set(s,!0),yield*Ru(Kg(i,t,r)))}}function $x(e,t){return Dc.querySelector(Ks(e))===t}const qx=/[ -,\.\/:-@\[-\^`\{-~]/,eN=/[ -,\.\/:-@\[\]\^`\{-~]/,tN=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,rN={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};function Qs(e,t={}){const r=x(x({},rN),t);r.quotes!="single"&&r.quotes!="double"&&(r.quotes="single");const n=r.quotes=="double"?'"':"'",i=r.isIdentifier,s=e.charAt(0);let o="",l=0;const c=e.length;for(;l<c;){const a=e.charAt(l++);let h=a.charCodeAt(0),u;if(h<32||h>126){if(h>=55296&&h<=56319&&l<c){const f=e.charCodeAt(l++);(f&64512)==56320?h=((h&1023)<<10)+(f&1023)+65536:l--}u="\\"+h.toString(16).toUpperCase()+" "}else r.escapeEverything?qx.test(a)?u="\\"+a:u="\\"+h.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(a)?u="\\"+h.toString(16).toUpperCase()+" ":a=="\\"||!i&&(a=='"'&&n==a||a=="'"&&n==a)||i&&eN.test(a)?u="\\"+a:u=a;o+=u}return i&&(/^-[-\d]/.test(o)?o="\\-"+o.slice(1):/\d/.test(s)&&(o="\\3"+s+" "+o.slice(1))),o=o.replace(tN,function(a,h,u){return h&&h.length%2?a:(h||"")+u}),!i&&r.wrap?n+o+n:o}const Bc=e=>{let t="";const r=e.getAttribute("class"),n=e.getAttribute("id");return n&&(t=t.concat(jg(n,"#"))),r&&(t=t.concat(jg(r,"."))),t===""&&(t=t.concat(e.tagName.toLowerCase())),t},jg=(e,t)=>`${t}${e.trim().split(" ").join(t)}`,Qg=e=>{const t=n=>{if(n.target){const i=n.target,s=Fg(i);e(s,n)}},r={capture:!0};return window.addEventListener("click",t,r),()=>window.removeEventListener("click",t,r)},$g=e=>{const t=r=>{if(r.target){const n=Fg(r.target);e(n)}};return window.addEventListener("focusin",t),()=>window.removeEventListener("focusin",t)},nN=30,iN=()=>new Promise(e=>requestAnimationFrame(t=>requestAnimationFrame(r=>e(r-t)))),sN=()=>z(this,null,function*(){const e=[];for(let t=0;t<nN;t++)e.push(yield iN());return e.reduce((t,r)=>t+r,0)/e.length}),qg=(e,t)=>{let r={},n=16.666666666666668;sN().then(c=>n=c);const i=c=>{var a;r!=null&&r.event||(r={event:c,location:window.location.href,timerStart:(a=window.performance)==null?void 0:a.now()},window.requestAnimationFrame(s))},s=()=>{if(!(r!=null&&r.timerStart))return;const c=window.performance.now()-r.timerStart-n;o(c),r={}},o=c=>{const a=(new Date().getTime()-t)/1e3;e({relativeTimestamp:a,jankAmount:c,querySelector:l(),newLocation:window.location.href!=r.location?window.location.href:void 0})},l=()=>{var c;return(c=r==null?void 0:r.event)!=null&&c.target?Fc(r.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},ey=e=>{let t,r;if(typeof document.hidden!="undefined"?(t="hidden",r="visibilitychange"):typeof document.msHidden!="undefined"?(t="msHidden",r="msvisibilitychange"):typeof document.webkitHidden!="undefined"&&(t="webkitHidden",r="webkitvisibilitychange"),r===void 0)return()=>{};if(t===void 0)return()=>{};const n=t,i=()=>{const o=document[n];e(!!o)};document.addEventListener(r,i);const s=r;return()=>document.removeEventListener(s,i)},ty=typeof window!="undefined"&&"performance"in window&&"memory"in performance?performance:{memory:{}},ry=(e,t)=>{let r=0,n=0;const i=()=>{const h=(new Date().getTime()-t)/1e3,u=ty.memory.jsHeapSizeLimit||0,f=ty.memory.usedJSHeapSize||0;e({jsHeapSizeLimit:u,usedJSHeapSize:f,relativeTimestamp:h,fps:r})};i();let s;s=setInterval(()=>{i()},1e3);let o=0,l=Date.now();const c=function(){var a=Date.now();o++,a>1e3+l&&(r=Math.round(o*1e3/(a-l)),o=0,l=a),n=requestAnimationFrame(c)};return c(),()=>{clearInterval(s),cancelAnimationFrame(n)}},ny=e=>{e(window.location.href);var t=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(s){setTimeout(()=>{var l;var o;try{o=JSON.parse((l=s==null?void 0:s.toString())!=null?l:"")}catch(c){return}(o.type==="track"||o.type==="identify")&&zc(o)&&e(o)},100),t.call(this,s)};const r=s=>{if(s.key==="ajs_user_id"||s.key==="ajs_anonymous_id"||s.key==="ajs_user_traits"){const{userId:o,userTraits:l}=iy();if(o){let c={};l&&(c=JSON.parse(l));const a={type:"identify",userId:o.toString(),traits:c};zc(a)&&e(a)}}},{userId:n,userTraits:i}=iy();if(n){let s={};i&&(s=JSON.parse(i));const o={type:"identify",userId:n.toString(),traits:s};zc(o)&&e(o)}return window.addEventListener("storage",r),II(({keyName:s})=>{r({key:s})}),()=>{window.removeEventListener("storage",r),XMLHttpRequest.prototype.send=t}},iy=()=>{const e=He("ajs_user_id"),t=He("ajs_user_traits"),r=He("ajs_anonymous_id");return{userId:e,userTraits:t,anonymousId:r}},zc=e=>{if(!e)return!1;let t="";try{t=JSON.stringify(e)}catch(i){return!1}const r=oN(t),n=He(Ge.SEGMENT_LAST_SENT_HASH_KEY);return n===void 0||r!==n?(mt(Ge.SEGMENT_LAST_SENT_HASH_KEY,r),!0):!1},oN=e=>{var t=0,r=e.length,n=0;if(r>0)for(;n<r;)t=(t<<5)-t+e.charCodeAt(n++)|0;return t.toString()},sy=(e,t)=>{const r=aN(e);let n=[];const i=!1,s=!0,o=[];for(let c=0;c<r.length;c++){let a=r[c].split("+");n=[],a.length>1&&(n=uN(ay,a)),a=a[a.length-1],a=a==="*"?"*":cN(a),a in Zt||(Zt[a]=[]);const h={mods:n,shortcut:r[c],key:r[c],method:t,keyup:i,keydown:s,scope:"all",splitKey:"+"};Zt[a].push(h),o.push({key:a,handler:h})}const l=c=>fN(c);return dN(document,"keydown",l),()=>{document.removeEventListener("keydown",l);for(const{key:c,handler:a}of o){const h=Zt[c],u=h?h.indexOf(a):-1;u>-1&&h.splice(u,1)}}};let Qe=[];function aN(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");const t=e.split(",");let r=t.lastIndexOf("");for(;r>=0;)t[r-1]+=",",t.splice(r,1),r=t.lastIndexOf("");return t}const Zt={},Kc=typeof navigator!="undefined"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1,lN={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":Kc?173:189,"=":Kc?61:187,";":Kc?59:186,"'":222,"[":219,"]":221,"\\":220},oy={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},$e={16:!1,18:!1,17:!1,91:!1},ay={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},cN=e=>lN[e.toLowerCase()]||ay[e.toLowerCase()]||e.toUpperCase().charCodeAt(0);function uN(e,t){const r=t.slice(0,t.length-1);for(let n=0;n<r.length;n++)r[n]=e[r[n].toLowerCase()];return r}function dN(e,t,r){e.addEventListener?e.addEventListener(t,r,!1):e.attachEvent&&e.attachEvent(`on${t}`,()=>{r(window.event)})}function hN(e,t,r){let n;if(t.scope===r||t.scope==="all"){n=t.mods.length>0;for(const i in $e)Object.prototype.hasOwnProperty.call($e,i)&&(!$e[i]&&t.mods.indexOf(+i)>-1||$e[i]&&t.mods.indexOf(+i)===-1)&&(n=!1);(t.mods.length===0&&!$e[16]&&!$e[18]&&!$e[17]&&!$e[91]||n||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function fN(e){const t=Zt["*"];let r=e.keyCode||e.which||e.charCode;if((r===93||r===224)&&(r=91),Qe.indexOf(r)===-1&&r!==229&&Qe.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(n=>{const i=oy[n];e[n]&&Qe.indexOf(i)===-1?Qe.push(i):!e[n]&&Qe.indexOf(i)>-1?Qe.splice(Qe.indexOf(i),1):n==="metaKey"&&e[n]&&Qe.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(Qe=Qe.slice(Qe.indexOf(i))))}),!(r in $e&&($e[r]=!0,!t))){for(const n in $e)Object.prototype.hasOwnProperty.call($e,n)&&($e[n]=e[oy[n]]);if(e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(Qe.indexOf(17)===-1&&Qe.push(17),Qe.indexOf(18)===-1&&Qe.push(18),$e[17]=!0,$e[18]=!0),r in Zt){for(let n=0;n<Zt[r].length;n++)if((e.type==="keydown"&&Zt[r][n].keydown||e.type==="keyup"&&Zt[r][n].keyup)&&Zt[r][n].key){const i=Zt[r][n];hN(e,i,"all")}}}}const jc=e=>{let t;const n=()=>{clearTimeout(t),t=setTimeout(()=>{var i,s;e({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(s=(i=window.screen.orientation)==null?void 0:i.angle)!=null?s:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)};var ar,$n,ly,$s,Qc,nn=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},qn=function(e){if(document.readyState==="loading")return"loading";var t=nn();if(t){if(e<t.domInteractive)return"loading";if(t.domContentLoadedEventStart===0||e<t.domContentLoadedEventStart)return"dom-interactive";if(t.domComplete===0||e<t.domComplete)return"dom-content-loaded"}return"complete"},pN=function(e){var t=e.nodeName;return e.nodeType===1?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},qs=function(e,t){var r="";try{for(;e&&e.nodeType!==9;){var n=e,i=n.id?"#"+n.id:pN(n)+(n.classList&&n.classList.value&&n.classList.value.trim()&&n.classList.value.trim().length?"."+n.classList.value.trim().replace(/\s+/g,"."):"");if(r.length+i.length>99)return r||i;if(r=r?i+">"+r:i,n.id)break;e=n.parentNode}}catch(s){}return r},cy=-1,uy=function(){return cy},Gr=function(e){addEventListener("pageshow",function(t){t.persisted&&(cy=t.timeStamp,e(t))},!0)},eo=function(){var e=nn();return e&&e.activationStart||0},bt=function(e,t){var r=nn(),n="navigate";return uy()>=0?n="back-forward-cache":r&&(document.prerendering||eo()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:t===void 0?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:n}},sn=function(e,t,r){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver(function(i){Promise.resolve().then(function(){t(i.getEntries())})});return n.observe(Object.assign({type:e,buffered:!0},r||{})),n}}catch(i){}},vt=function(e,t,r,n){var i,s;return function(o){t.value>=0&&(o||n)&&((s=t.value-(i||0))||i===void 0)&&(i=t.value,t.delta=s,t.rating=function(l,c){return l>c[1]?"poor":l>c[0]?"needs-improvement":"good"}(t.value,r),e(t))}},$c=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},to=function(e){var t=function(r){r.type!=="pagehide"&&document.visibilityState!=="hidden"||e(r)};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},qc=function(e){var t=!1;return function(r){t||(e(r),t=!0)}},on=-1,dy=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},ro=function(e){document.visibilityState==="hidden"&&on>-1&&(on=e.type==="visibilitychange"?e.timeStamp:0,mN())},hy=function(){addEventListener("visibilitychange",ro,!0),addEventListener("prerenderingchange",ro,!0)},mN=function(){removeEventListener("visibilitychange",ro,!0),removeEventListener("prerenderingchange",ro,!0)},eu=function(){return on<0&&(on=dy(),hy(),Gr(function(){setTimeout(function(){on=dy(),hy()},0)})),{get firstHiddenTime(){return on}}},ei=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},fy=[1800,3e3],py=function(e,t){t=t||{},ei(function(){var r,n=eu(),i=bt("FCP"),s=sn("paint",function(o){o.forEach(function(l){l.name==="first-contentful-paint"&&(s.disconnect(),l.startTime<n.firstHiddenTime&&(i.value=Math.max(l.startTime-eo(),0),i.entries.push(l),r(!0)))})});s&&(r=vt(e,i,fy,t.reportAllChanges),Gr(function(o){i=bt("FCP"),r=vt(e,i,fy,t.reportAllChanges),$c(function(){i.value=performance.now()-o.timeStamp,r(!0)})}))})},my=[.1,.25],gN=function(e,t){(function(r,n){n=n||{},py(qc(function(){var i,s=bt("CLS",0),o=0,l=[],c=function(h){h.forEach(function(u){if(!u.hadRecentInput){var f=l[0],d=l[l.length-1];o&&u.startTime-d.startTime<1e3&&u.startTime-f.startTime<5e3?(o+=u.value,l.push(u)):(o=u.value,l=[u])}}),o>s.value&&(s.value=o,s.entries=l,i())},a=sn("layout-shift",c);a&&(i=vt(r,s,my,n.reportAllChanges),to(function(){c(a.takeRecords()),i(!0)}),Gr(function(){o=0,s=bt("CLS",0),i=vt(r,s,my,n.reportAllChanges),$c(function(){return i()})}),setTimeout(i,0))}))})(function(r){(function(n){if(n.entries.length){var i=n.entries.reduce(function(l,c){return l&&l.value>c.value?l:c});if(i&&i.sources&&i.sources.length){var s=(o=i.sources).find(function(l){return l.node&&l.node.nodeType===1})||o[0];if(s)return void(n.attribution={largestShiftTarget:qs(s.node),largestShiftTime:i.startTime,largestShiftValue:i.value,largestShiftSource:s,largestShiftEntry:i,loadState:qn(i.startTime)})}}var o;n.attribution={}})(r),e(r)},t)},yN=function(e,t){py(function(r){(function(n){if(n.entries.length){var i=nn(),s=n.entries[n.entries.length-1];if(i){var o=i.activationStart||0,l=Math.max(0,i.responseStart-o);return void(n.attribution={timeToFirstByte:l,firstByteToFCP:n.value-l,loadState:qn(n.entries[0].startTime),navigationEntry:i,fcpEntry:s})}}n.attribution={timeToFirstByte:0,firstByteToFCP:n.value,loadState:qn(uy())}})(r),e(r)},t)},ti={passive:!0,capture:!0},bN=new Date,gy=function(e,t){ar||(ar=t,$n=e,ly=new Date,by(removeEventListener),yy())},yy=function(){if($n>=0&&$n<ly-bN){var e={entryType:"first-input",name:ar.type,target:ar.target,cancelable:ar.cancelable,startTime:ar.timeStamp,processingStart:ar.timeStamp+$n};$s.forEach(function(t){t(e)}),$s=[]}},vN=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;e.type=="pointerdown"?function(r,n){var i=function(){gy(r,n),o()},s=function(){o()},o=function(){removeEventListener("pointerup",i,ti),removeEventListener("pointercancel",s,ti)};addEventListener("pointerup",i,ti),addEventListener("pointercancel",s,ti)}(t,e):gy(t,e)}},by=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,vN,ti)})},vy=[100,300],SN=function(e,t){t=t||{},ei(function(){var r,n=eu(),i=bt("FID"),s=function(c){c.startTime<n.firstHiddenTime&&(i.value=c.processingStart-c.startTime,i.entries.push(c),r(!0))},o=function(c){c.forEach(s)},l=sn("first-input",o);r=vt(e,i,vy,t.reportAllChanges),l&&to(qc(function(){o(l.takeRecords()),l.disconnect()})),l&&Gr(function(){var c;i=bt("FID"),r=vt(e,i,vy,t.reportAllChanges),$s=[],$n=-1,ar=null,by(addEventListener),c=s,$s.push(c),yy()})})},wN=function(e,t){SN(function(r){(function(n){var i=n.entries[0];n.attribution={eventTarget:qs(i.target),eventType:i.name,eventTime:i.startTime,eventEntry:i,loadState:qn(i.startTime)}})(r),e(r)},t)},Sy=0,tu=1/0,no=0,RN=function(e){e.forEach(function(t){t.interactionId&&(tu=Math.min(tu,t.interactionId),no=Math.max(no,t.interactionId),Sy=no?(no-tu)/7+1:0)})},wy=function(){return Qc?Sy:performance.interactionCount||0},_N=function(){"interactionCount"in performance||Qc||(Qc=sn("event",RN,{type:"event",buffered:!0,durationThreshold:0}))},Ry=[200,500],_y=0,Ty=function(){return wy()-_y},Vt=[],ru={},Ey=function(e){var t=Vt[Vt.length-1],r=ru[e.interactionId];if(r||Vt.length<10||e.duration>t.latency){if(r)r.entries.push(e),r.latency=Math.max(r.latency,e.duration);else{var n={id:e.interactionId,latency:e.duration,entries:[e]};ru[n.id]=n,Vt.push(n)}Vt.sort(function(i,s){return s.latency-i.latency}),Vt.splice(10).forEach(function(i){delete ru[i.id]})}},TN=function(e,t){t=t||{},ei(function(){var r;_N();var n,i=bt("INP"),s=function(l){l.forEach(function(h){h.interactionId&&Ey(h),h.entryType==="first-input"&&!Vt.some(function(u){return u.entries.some(function(f){return h.duration===f.duration&&h.startTime===f.startTime})})&&Ey(h)});var c,a=(c=Math.min(Vt.length-1,Math.floor(Ty()/50)),Vt[c]);a&&a.latency!==i.value&&(i.value=a.latency,i.entries=a.entries,n())},o=sn("event",s,{durationThreshold:(r=t.durationThreshold)!==null&&r!==void 0?r:40});n=vt(e,i,Ry,t.reportAllChanges),o&&("interactionId"in PerformanceEventTiming.prototype&&o.observe({type:"first-input",buffered:!0}),to(function(){s(o.takeRecords()),i.value<0&&Ty()>0&&(i.value=0,i.entries=[]),n(!0)}),Gr(function(){Vt=[],_y=wy(),i=bt("INP"),n=vt(e,i,Ry,t.reportAllChanges)}))})},EN=function(e,t){TN(function(r){(function(n){if(n.entries.length){var i=n.entries.sort(function(s,o){return o.duration-s.duration||o.processingEnd-o.processingStart-(s.processingEnd-s.processingStart)})[0];n.attribution={eventTarget:qs(i.target),eventType:i.name,eventTime:i.startTime,eventEntry:i,loadState:qn(i.startTime)}}else n.attribution={}})(r),e(r)},t)},Iy=[2500,4e3],nu={},IN=function(e,t){(function(r,n){n=n||{},ei(function(){var i,s=eu(),o=bt("LCP"),l=function(h){var u=h[h.length-1];u&&u.startTime<s.firstHiddenTime&&(o.value=Math.max(u.startTime-eo(),0),o.entries=[u],i())},c=sn("largest-contentful-paint",l);if(c){i=vt(r,o,Iy,n.reportAllChanges);var a=qc(function(){nu[o.id]||(l(c.takeRecords()),c.disconnect(),nu[o.id]=!0,i(!0))});["keydown","click"].forEach(function(h){addEventListener(h,function(){return setTimeout(a,0)},!0)}),to(a),Gr(function(h){o=bt("LCP"),i=vt(r,o,Iy,n.reportAllChanges),$c(function(){o.value=performance.now()-h.timeStamp,nu[o.id]=!0,i(!0)})})}})})(function(r){(function(n){if(n.entries.length){var i=nn();if(i){var s=i.activationStart||0,o=n.entries[n.entries.length-1],l=o.url&&performance.getEntriesByType("resource").filter(function(d){return d.name===o.url})[0],c=Math.max(0,i.responseStart-s),a=Math.max(c,l?(l.requestStart||l.startTime)-s:0),h=Math.max(a,l?l.responseEnd-s:0),u=Math.max(h,o?o.startTime-s:0),f={element:qs(o.element),timeToFirstByte:c,resourceLoadDelay:a-c,resourceLoadTime:h-a,elementRenderDelay:u-h,navigationEntry:i,lcpEntry:o};return o.url&&(f.url=o.url),l&&(f.lcpResourceEntry=l),void(n.attribution=f)}}n.attribution={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadTime:0,elementRenderDelay:n.value}})(r),e(r)},t)},Cy=[800,1800],CN=function e(t){document.prerendering?ei(function(){return e(t)}):document.readyState!=="complete"?addEventListener("load",function(){return e(t)},!0):setTimeout(t,0)},ZN=function(e,t){t=t||{};var r=bt("TTFB"),n=vt(e,r,Cy,t.reportAllChanges);CN(function(){var i=nn();if(i){var s=i.responseStart;if(s<=0||s>performance.now())return;r.value=Math.max(s-eo(),0),r.entries=[i],n(!0),Gr(function(){r=bt("TTFB",0),(n=vt(e,r,Cy,t.reportAllChanges))(!0)})}})},LN=function(e,t){ZN(function(r){(function(n){if(n.entries.length){var i=n.entries[0],s=i.activationStart||0,o=Math.max(i.domainLookupStart-s,0),l=Math.max(i.connectStart-s,0),c=Math.max(i.requestStart-s,0);n.attribution={waitingTime:o,dnsTime:l-o,connectionTime:c-l,requestTime:n.value-c,navigationEntry:i}}else n.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}})(r),e(r)},t)};const Zy=e=>(gN(e),yN(e),wN(e),IN(e),LN(e),EN(e),()=>{}),an=typeof navigator!="undefined"&&"connection"in navigator?navigator.connection:{},Ly=(e,t)=>{const r=()=>{const s=(new Date().getTime()-t)/1e3;e({relativeTimestamp:s,downlink:an.downlink,downlinkMax:an.downlinkMax,effectiveType:an.effectiveType,rtt:an.rtt,saveData:an.saveData,type:an.type})};r();let n;return n=setInterval(()=>{r()},1e3),()=>{clearInterval(n)}},io="iframe parent ready",so="iframe ok",ri="highlightLogs",xN=e=>{let t=He(ri)||"";t=t+"["+new Date().getTime()+"] "+e+`
|
|
466
|
+
${d}`,w),S=_===-1,b=S?f.length:_,R=(o=/\bname="([^"]*)"/i.exec(y))==null?void 0:o[1];if(R!==void 0){const I=(l=/\bfilename="([^"]*)"/i.exec(y))==null?void 0:l[1];if(I!==void 0){const E=(h=(a=(c=/^content-type:[ \t]*(.*)$/im.exec(y))==null?void 0:c[1])==null?void 0:a.trim())!=null?h:"",C=b-w;xc(p,R,`[File name="${I}" type="${E}" size${S?">=":"="}${C}]`)}else xc(p,R,new TextDecoder().decode(u.subarray(w,b)))}m=S?-1:_+2}return e.truncated&&Object.keys(p).length===0?Ds(e):JSON.stringify(p)}catch(u){return Ds(e)}},mx=(e,t)=>{try{if(t&&t.body!==void 0&&t.body!==null)return Promise.resolve(mg(t.body));if(!e.body||e.bodyUsed)return Promise.resolve(void 0);const r=e.clone();if(!r.body)return Promise.resolve(void 0);const n=e.headers.get("content-type");return dx(r.body,ac(e.headers)).then(i=>ox(n)?px(i,n):fx(i)).catch(()=>{})}catch(r){return Promise.resolve(void 0)}},gx=(e=[])=>{if(typeof window=="undefined"||typeof window.fetch!="function"||typeof Request=="undefined")return()=>{};const t=i=>e.some(s=>i.toLowerCase().includes(s)),r=window.fetch,n=function(i,s){return i instanceof Request&&!Nc.has(i)&&!t(i.url)&&Nc.set(i,mx(i,s)),r.call(this!=null?this:window,i,s)};return window.fetch=n,()=>{window.fetch===n&&(window.fetch=r)}};class Oc{constructor(t,r){L(this,"debug");L(this,"name");this.debug=t,this.name=r}prefix(){let t=`[${Date.now()}]`;return this.name&&(t+=` - ${this.name}`),t}log(...t){this.debug&&dl(()=>console.log.apply(console,[this.prefix(),...t]))}warn(...t){(this.debug||_f())&&dl(()=>console.warn.apply(console,[this.prefix(),...t]))}}class Gc{constructor(){L(this,"_sdk");L(this,"_isLoaded",!1);L(this,"_isReady",!1);L(this,"_callBuffer",[]);L(this,"_capacity",1e5);L(this,"_droppedEvents",0);L(this,"_exceededCapacity",!1);L(this,"_logger",new Oc);L(this,"_pendingStart");L(this,"_lastOp")}_bufferCall(t,r){if(this._isReady)return this._callSdk(t,r);this._enqueue({method:t,args:r})}_callSdk(t,r){try{return this._sdk[t](...r)}catch(n){We(`Error executing buffered call to ${t}:`,"error",n)}}_enqueue(t){this._callBuffer.length<this._capacity?(this._callBuffer.push(t),this._exceededCapacity=!1):(this._exceededCapacity||(this._exceededCapacity=!0,We("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this._droppedEvents+=1)}load(t,{ready:r=!0,started:n}={}){this._sdk=t,this._isLoaded=!0;const i=this._pendingStart;this._pendingStart=void 0,r?(this.markReady(),n?this._queueOp("start",()=>z(this,null,function*(){yield n})).catch(o=>{We("Error starting the SDK","error",o)}).then(()=>i==null?void 0:i.resolve()):i==null||i.resolve()):i&&this._runPendingStart(i)}_runPendingStart(t){return z(this,null,function*(){try{yield this._start()}catch(r){We("Error starting the SDK","error",r)}t.resolve()})}_start(){var t;return this._isLoaded?((t=this._lastOp)==null?void 0:t.kind)==="start"?this._lastOp.promise:this._queueOp("start",()=>z(this,null,function*(){try{yield this._startSdk()}finally{this.markReady()}})):this._deferStart()}_stop(t){return this._isLoaded?this._queueOp("stop",()=>z(this,null,function*(){try{yield t()}catch(r){We("Error stopping the SDK","error",r)}})):(this._cancelPendingStart(),Promise.resolve())}_queueOp(t,r){var s;const n=(s=this._lastOp)==null?void 0:s.promise,i=(n?n.then(r,r):r()).finally(()=>{var o;((o=this._lastOp)==null?void 0:o.promise)===i&&(this._lastOp=void 0)});return this._lastOp={kind:t,promise:i},i}_startSdk(){return z(this,null,function*(){})}markReady(){if(!this._isReady){this._isReady=!0;for(const{method:t,args:r}of this._callBuffer)try{this._sdk[t](...r)}catch(n){We(`Error executing buffered call to ${t}:`,"error",n)}this._callBuffer=[]}}_deferStart(){if(!this._pendingStart){let t;const r=new Promise(n=>{t=n});this._pendingStart={promise:r,resolve:t}}return this._pendingStart.promise}_cancelPendingStart(){this._pendingStart&&(this._pendingStart.resolve(),this._pendingStart=void 0)}}const Ye="feature_flag",gg="launchdarkly",Vc="evaluation",yx=`${Ye}.${Vc}`,yg=`${Ye}.set.id`,bg=`${Ye}.key`,vg=`${Ye}.contextKeys`,Sg=`${Ye}.context.id`,wg=`${Ye}.result.value`,kc=`${Ye}.provider.name`,Fs={kind:`${Ye}.result.reason.kind`,errorKind:`${Ye}.result.reason.errorKind`,ruleIndex:`${Ye}.result.reason.ruleIndex`,ruleId:`${Ye}.result.reason.ruleId`,prerequisiteKey:`${Ye}.result.reason.prerequisiteKey`,inExperiment:`${Ye}.result.reason.inExperiment`,bigSegmentsStatus:`${Ye}.result.reason.bigSegmentsStatus`},Rg=`${Ye}.result.variationIndex`,_g=`${gg}.application.id`,Tg=`${gg}.application.version`,bx="context.contextKeys",vx="$ld:telemetry:session:init",Eg="$ld:telemetry:track",Sx="launchdarkly.track",wx="page_view",Rx="document_load",_x="result.status";function Ig(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}function Cg(e){return e.kind==="multi"}function Lr(e){return Cg(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${Ig(e[t].key)}`).join(":"):"kind"in e&&e.kind==="user"?e.key:"kind"in e?`${e.kind}:${Ig(e.key)}`:e.key}function Qn(e){return Cg(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>({[t]:e[t].key})).reduce((t,r)=>x(x({},t),r),{}):"kind"in e?{[e.kind]:e.key}:{user:e.key}}function Tx(e,t,r){t.addHook({getMetadata:()=>({name:"highlight.run"}),afterIdentify:(n,i,s)=>{var l,c;const o=B(x({},Qn(n.context)),{key:(c=(l=r==null?void 0:r.contextFriendlyName)==null?void 0:l.call(r,n.context))!=null?c:Lr(n.context)});return e.log("LD.identify","INFO",o),s.status==="completed"&&e.identify(o.key,o,"LaunchDarkly"),i},afterEvaluation:(n,i,s)=>{const o=x({[kc]:"LaunchDarkly",[bg]:n.flagKey,[wg]:JSON.stringify(s.value)},s.variationIndex!==void 0&&s.variationIndex!==null?{[Rg]:s.variationIndex}:{});if(s.reason)for(const l in Fs){const c=l,a=s.reason[c];a!=null&&(o[Fs[c]]=a)}return n.context&&(o[vg]=JSON.stringify(Qn(n.context)),o[Sg]=Lr(n.context)),e.startSpan(Vc,l=>{l&&l.addEvent(yx,o)}),i}})}class Ex{constructor(t,r){L(this,"client");L(this,"metadata");this.client=t,this.metadata=r}getHooks(t){return[]}init(t){this.client.track(vx,{sessionID:t})}recordGauge(t,r){}identify(t,r,n={},i){}error(t,r){}track(t,r){const n=r.event;this.client.track(n?`${Eg}:${n}`:Eg,B(x({},r),{sessionID:t}))}}class Js extends Gc{constructor(r,n){super();L(this,"client");this.client=new Ex(r,n)}getHooks(r){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(n,i,s)=>(this.load(this.client),i)}]}init(r){return this._bufferCall("init",[r])}recordGauge(r,n){return this._bufferCall("recordGauge",[r,n])}identify(r,n,i={},s){return this._bufferCall("identify",[r,n,i,s])}error(r,n){return this._bufferCall("error",[r,n])}track(r,n){return this._bufferCall("track",[r,n])}}const Xc=e=>{e(window.location.href);const t=history.pushState;history.pushState=(s=>function(){var l=s.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),l})(history.pushState);const r=history.replaceState;history.replaceState=(s=>function(){var l=s.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),l})(history.replaceState);const n=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",n);const i=function(){e(window.location.href)};return window.addEventListener("locationchange",i),()=>{window.removeEventListener("popstate",n),window.removeEventListener("locationchange",i),history.pushState=t,history.replaceState=r}},un=class un extends An{constructor(r={}){super(un.moduleName,un.version,r);L(this,"_getLDContextKeyAttributes");L(this,"_unlisten");L(this,"_lastUrl","");this._getLDContextKeyAttributes=r.getLDContextKeyAttributes}init(){}enable(){this._lastUrl=window.location.href,this._unlisten=Xc(r=>{var i;const n=this._lastUrl;if(this._lastUrl=r,n!==r)try{const s=this.tracer.startSpan(wx,{attributes:{[nr]:r,"page_view.previous_url":n,"page_view.url":r}}),o=(i=this._getLDContextKeyAttributes)==null?void 0:i.call(this);o&&s.setAttributes(o),s.end()}catch(s){this._diag.error("failed to create page view span",s)}})}disable(){var r;(r=this._unlisten)==null||r.call(this),this._unlisten=void 0}};L(un,"version","0.1.0"),L(un,"moduleName","location-change");let Wc=un;const Pc={version:"1.4.1"}.version;let De={},Ht,Hs,xr,Nr;const Or="highlight.record",Ix="highlight.session_id",Ys=new Map,Mc=e=>`${e.spanContext().traceId}:${e.spanContext().spanId}`,Zg="launchdarkly.js.log",Cx="launchdarkly.exception.id",Lg="launchdarkly.sampling.ratio",xg="log.severity",Ng="log.message",Og=(e,t)=>{var g,v,y,w,_,S,b,R,I,E,C,N,G,q;if(De.tracerProvider||De.meterProvider){_e("warn","OTEL already initialized. Skipping...");return}Ht=e,_f()&&Y.setLogger({verbose:(...Z)=>_e("debug",...Z),debug:(...Z)=>_e("debug",...Z),info:(...Z)=>_e("info",...Z),warn:(...Z)=>_e("warn",...Z),error:(...Z)=>_e("error",...Z)},Ne.WARN);const r=e.backendUrl||void 0||"https://pub.highlight.io",n=[...(v=(g=e.networkRecordingOptions)==null?void 0:g.urlBlocklist)!=null?v:[],...Ef],i=[r,e.otlpEndpoint].filter(Z=>!!Z).map(Z=>Z.toLowerCase()),s=(y=e.environment)!=null?y:"production",o={url:e.otlpEndpoint+"/v1/traces",concurrencyLimit:10,timeoutMillis:3e4,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:6e4,keepAlive:!0}},l=new qL(o,t),c=new Bs(l,{maxExportBatchSize:1024,maxQueueSize:2048,exportTimeoutMillis:o.timeoutMillis,scheduledDelayMillis:5e3}),a=new Un({[cE]:(w=e.serviceName)!=null?w:"highlight-browser",[uE]:e.serviceVersion,"deployment.environment.name":s,"highlight.project_id":e.projectId,[hE]:navigator.userAgent,"browser.language":navigator.language,"telemetry.distro.name":"@highlight-run/observability","telemetry.distro.version":Pc});De.tracerProvider=new UT({resource:a,mergeResourceWithDefaults:!0,spanProcessors:[c]}),we.setGlobalTracerProvider(De.tracerProvider);const h=Zx(o,e.otlpEndpoint+"/v1/metrics"),u=new YC({exporter:h,exportIntervalMillis:o.timeoutMillis,exportTimeoutMillis:o.timeoutMillis});De.meterProvider=new OZ({resource:a,readers:[u]}),El.setGlobalMeterProvider(De.meterProvider);let f=[];if(((_=e.instrumentations)==null?void 0:_["@opentelemetry/instrumentation-document-load"])!==!1&&f.push(new gE({applyCustomAttributesOnSpan:{documentLoad:Wg,documentFetch:Wg,resourceFetch:Ax}})),((S=e.instrumentations)==null?void 0:S["@opentelemetry/instrumentation-user-interaction"])!==!1&&f.push(new Lc({productAnalyticsEvents:e.productAnalyticsEvents,getLDContextKeyAttributes:e.getLDContextKeyAttributes})),((b=e.productAnalyticsEvents)==null?void 0:b.pageViews)!==!1&&f.push(new Wc({getLDContextKeyAttributes:e.getLDContextKeyAttributes})),(R=e.networkRecordingOptions)!=null&&R.enabled){if(((I=e.instrumentations)==null?void 0:I["@opentelemetry/instrumentation-fetch"])!==!1){const W=new JE({propagateTraceHeaderCorsUrls:Mg(e.tracingOrigins),applyCustomAttributesOnSpan:(k,M,P)=>{var de;if(!k.attributes)return;const U=k;if(U.attributes[Or]===!1)return;const $=typeof Request!="undefined"&&M instanceof Request,me=$?ux(M):void 0;kg(k,$?void 0:M.body,M.headers,e.networkRecordingOptions);const O=()=>z(this,null,function*(){const ve=yield me;ve!==void 0&&Gx(k,ve,M.headers,e.networkRecordingOptions)}),ye=()=>{var ve;return(ve=e.networkRecordingOptions)!=null&&ve.requestResponseSanitizer&&Xg(k,e.networkRecordingOptions.requestResponseSanitizer),U.attributes[Or]!==!1};if(!(P instanceof Response)){if(k.setAttributes({"http.response.error":P.message,[Wp]:P.status}),!ye())return;me&&Ys.set(Mc(k),O().then(()=>{ye()}));return}if(ye()&&(de=e.networkRecordingOptions)!=null&&de.recordHeadersAndBody){const ve=z(this,null,function*(){var te,K,ie,ce,Ce;yield O();const D=yield dm(P,(te=e.networkRecordingOptions)==null?void 0:te.bodyKeysToRecord,(K=e.networkRecordingOptions)==null?void 0:K.networkBodyKeysToRedact),F=Object.fromEntries(P.headers.entries()),H=ts((ce=(ie=e.networkRecordingOptions)==null?void 0:ie.networkHeadersToRedact)!=null?ce:[],F,(Ce=e.networkRecordingOptions)==null?void 0:Ce.headerKeysToRecord),Q=Uc(H,"http.response.header");Object.assign(k.attributes,x({"http.response.body":D},Q)),ye()});Ys.set(Mc(k),ve)}}});f.push(W)}((E=e.instrumentations)==null?void 0:E["@opentelemetry/instrumentation-xml-http-request"])!==!1&&f.push(new fI({propagateTraceHeaderCorsUrls:Mg(e.tracingOrigins),applyCustomAttributesOnSpan:(W,k)=>{var U,$,me,O;const M=k;if(!(!W.attributes||W.attributes[Or]===!1)){if(kg(W,M._body,M._requestHeaders,e.networkRecordingOptions),(U=e.networkRecordingOptions)!=null&&U.recordHeadersAndBody){let ye="";(k.responseType===""||k.responseType==="text")&&(ye=Ot(k.responseText,($=e.networkRecordingOptions)==null?void 0:$.networkBodyKeysToRedact,(me=e.networkRecordingOptions)==null?void 0:me.bodyKeysToRecord,void 0));const de=Vx(k.getAllResponseHeaders());Px(W,de,ye,e.networkRecordingOptions)}(O=e.networkRecordingOptions)!=null&&O.requestResponseSanitizer&&Xg(W,e.networkRecordingOptions.requestResponseSanitizer)}}}))}nT({instrumentations:f}),(C=e.networkRecordingOptions)!=null&&C.enabled&&e.networkRecordingOptions.recordHeadersAndBody&&((N=e.instrumentations)==null?void 0:N["@opentelemetry/instrumentation-xml-http-request"])!==!1&&(xr==null||xr(),xr=ix([...n,...i])),(G=e.networkRecordingOptions)!=null&&G.enabled&&e.networkRecordingOptions.recordHeadersAndBody&&((q=e.instrumentations)==null?void 0:q["@opentelemetry/instrumentation-fetch"])!==!1&&(Nr==null||Nr(),Nr=gx([...n,...i]));const m=new Op;return m.enable(),De.tracerProvider.register({contextManager:m,propagator:new $f({propagators:[new Ff,new xx({backendUrl:r,otlpEndpoint:e.otlpEndpoint,tracingOrigins:e.tracingOrigins,urlBlocklist:n})]})}),Hs=Lx(l,h,c,()=>De),De},Zx=(e,t)=>new ex(B(x({},e),{url:t,temporalityPreference:jn.DELTA})),Lx=(e,t,r,n)=>{if(typeof document=="undefined"||typeof window=="undefined")return()=>{};const i=()=>{var c,a;e.setUnloading(!0),t.setUnloading(!0),r.setSkipPendingOnFlush(!0);const l=n();(c=l.tracerProvider)==null||c.forceFlush().catch(()=>{}),(a=l.meterProvider)==null||a.forceFlush().catch(()=>{})},s=()=>{document.visibilityState==="hidden"?i():document.visibilityState==="visible"&&(e.setUnloading(!1),t.setUnloading(!1),r.setSkipPendingOnFlush(!1))},o=()=>i();return document.addEventListener("visibilitychange",s),window.addEventListener("pagehide",o),()=>{document.removeEventListener("visibilitychange",s),window.removeEventListener("pagehide",o)}};class Bs extends Ip{constructor(){super(...arguments);L(this,"_pendingSpans",new Set);L(this,"_skipPendingOnFlush",!1)}setSkipPendingOnFlush(r){this._skipPendingOnFlush=r}onStart(r,n){r.setAttribute(Ix,Nt()),super.onStart(r,n)}onEnd(r){if(r.attributes[Or]===!1)return;LI();const n=Mc(r),i=Ys.get(n);if(i){const s=i.catch(o=>{_e("warn","[CustomBatchSpanProcessor] Failed to capture response body attributes",o)}).finally(()=>{Ys.delete(n),this._pendingSpans.delete(s),r.attributes[Or]!==!1&&super.onEnd(r)});this._pendingSpans.add(s);return}super.onEnd(r)}shutdown(){return z(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),wu(Bs.prototype,this,"shutdown").call(this)})}forceFlush(){return z(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),wu(Bs.prototype,this,"forceFlush").call(this)})}}class xx extends rp{constructor(r){super();L(this,"highlightEndpoints");L(this,"tracingOrigins");L(this,"urlBlocklist");this.highlightEndpoints=[r.backendUrl,`${r.otlpEndpoint}/v1/traces`,`${r.otlpEndpoint}/v1/logs`,`${r.otlpEndpoint}/v1/metrics`],this.tracingOrigins=r.tracingOrigins,this.urlBlocklist=r.urlBlocklist}inject(r,n,i){var l;const s=we.getSpan(r);if(!s||!s.attributes)return;const o=Ag(s);typeof o=="string"&&(Mx(o,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||s.setAttribute(Or,!1),!nc(o,(l=this.tracingOrigins)!=null?l:[],this.urlBlocklist))||super.inject(r,n,i)}}const Gg="highlight-browser",Nx=Gg,zs=()=>{var e;return(e=De.tracerProvider)==null?void 0:e.getTracer(Gg)},or=()=>{var e;return(e=De.meterProvider)==null?void 0:e.getMeter(Nx)},Ox=()=>we.getActiveSpan(),Ac=()=>z(this,null,function*(){Hs&&(Hs(),Hs=void 0),xr&&(xr(),xr=void 0),Nr&&(Nr(),Nr=void 0),yield Promise.allSettled([z(this,null,function*(){De.tracerProvider?(yield De.tracerProvider.shutdown(),De.tracerProvider=void 0):_e("warn","OTEL shutdown called without initialized tracerProvider.")}),z(this,null,function*(){De.meterProvider?(yield De.meterProvider.shutdown(),De.meterProvider=void 0):_e("warn","OTEL shutdown called without initialized meterProvider.")})])}),Vg=e=>{const t=pI(e),r={};return t!=null&&t.name&&(r["graphql.operation.name"]=t.name),t!=null&&t.type&&(r["graphql.operation.type"]=t.type),r},Gx=(e,t,r,n)=>{if(!e.attributes)return;const i=e.attributes;Object.assign(i,Vg(t)),n!=null&&n.recordHeadersAndBody&&Object.assign(i,{"http.request.body":Ot(t,n.networkBodyKeysToRedact,n.bodyKeysToRecord,fg(r))})},kg=(e,t,r,n)=>{var h;if(!e.attributes)return;const s=Ag(e),o=ns(s),l=If(o),c=mg(t),a=fg(r);if(e.setAttributes(Vg(c!=null?c:t)),e.setAttributes({"highlight.type":"http.request",[en]:o,[nr]:o,[_s]:l.pathname,[dE]:l.search}),e.setAttributes(kx(l.searchParams,"url.query_params")),n!=null&&n.recordHeadersAndBody){c!==void 0&&e.setAttribute("http.request.body",Ot(c,n.networkBodyKeysToRedact,n.bodyKeysToRecord,a));const u=ts((h=n.networkHeadersToRedact)!=null?h:[],a,n.headerKeysToRecord),f=Uc(u,"http.request.header");e.setAttributes(f)}},Vx=e=>{const t={};return e&&e.trim().split(/[\r\n]+/).forEach(r=>{const n=r.split(": "),i=n.shift();i&&(t[i]=n.join(": "))}),t},Uc=(e,t)=>{const r={};return Object.entries(e).forEach(([n,i])=>{const s=n.toLowerCase().replace(/_/g,"-"),o=`${t}.${s}`,l=Wx(s,i);if(r[o]){const c=r[o];Array.isArray(c)?r[o]=[...c,...l]:r[o]=[c,...l]}else r[o]=l.length===1?l[0]:l}),r},kx=(e,t)=>{const r={};for(const[n,i]of e.entries()){const s=`${t}.${n}`,o=r[s];o===void 0?r[s]=i:Array.isArray(o)?o.push(i):r[s]=[o,i]}return r},Xx=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"]),Wx=(e,t)=>Xx.has(e)?t.split(",").map(r=>r.trim()).filter(r=>r.length>0):[t],Px=(e,t,r,n)=>{var o;e.setAttribute("http.response.body",r);const i=ts((o=n.networkHeadersToRedact)!=null?o:[],t,n.headerKeysToRecord),s=Uc(i,"http.response.header");e.setAttributes(s)},Xg=(e,t)=>{var u,f,d,p,m,g,v,y,w,_,S,b;const n=e.attributes,i={},s={};for(const[R,I]of Object.entries(n))R.startsWith("http.request.header.")&&(i[R.slice(20)]=String(I)),R.startsWith("http.response.header.")&&(s[R.slice(21)]=String(I));let l={request:{sessionSecureID:"",id:"",url:(f=(u=n[nr])!=null?u:n[en])!=null?f:"",verb:(p=(d=n["http.request.method"])!=null?d:n[iE])!=null?p:"GET",headers:i,body:(m=n["http.request.body"])!=null?m:""},response:{status:Number((v=(g=n[Wp])!=null?g:n[sE])!=null?v:0),headers:s,body:(y=n["http.response.body"])!=null?y:""},urlBlocked:!1},c=!0;try{l.request.body=JSON.parse(l.request.body)}catch(R){c=!1}let a=!0;try{l.response.body=JSON.parse(l.response.body)}catch(R){a=!1}let h;try{h=t(l)}catch(R){return}if(!h){Object.assign(e.attributes,{[Or]:!1});return}c&&((w=h.request)!=null&&w.body)&&(h.request.body=JSON.stringify(h.request.body)),a&&((_=h.response)!=null&&_.body)&&(h.response.body=JSON.stringify(h.response.body)),Object.assign(e.attributes,{"http.request.body":(S=h.request.body)!=null?S:"","http.response.body":(b=h.response.body)!=null?b:""})},Mx=(e,t,r,n)=>n!=null&&n.some(s=>e.toLowerCase().includes(s))?!1:Gs(e,t),Wg=e=>{var s,o,l;if(!e.events)return;const r=e.events,n={unload:gt("unloadEventStart","unloadEventEnd",r),dom_interactive:gt("fetchStart","domInteractive",r),dom_content_loaded:gt("domContentLoadedEventStart","domContentLoadedEventEnd",r),dom_complete:gt("fetchStart","domComplete",r),load_event:gt("loadEventStart","loadEventEnd",r),document_load:gt("fetchStart","loadEventEnd",r),first_paint:gt("fetchStart","firstPaint",r),first_contentful_paint:gt("fetchStart","firstContentfulPaint",r),domain_lookup:gt("domainLookupStart","domainLookupEnd",r),connect:gt("connectStart","connectEnd",r),request:gt("requestStart","requestEnd",r),response:gt("responseStart","responseEnd",r)},i=(o=(s=Ht==null?void 0:Ht.getIntegrations)==null?void 0:s.call(Ht))!=null?o:[];if(n.document_load!==void 0)for(const c of i)c.recordGauge((l=Ht==null?void 0:Ht.sessionSecureId)!=null?l:"",{name:Rx,value:n.document_load/1e6});Object.entries(n).forEach(([c,a])=>{a!==void 0&&(e.setAttribute(`timings.${c}.ns`,a),e.setAttribute(`timings.${c}.readable`,Pg(a)))})};function gt(e,t,r){const n=r.find(l=>l.name===e),i=r.find(l=>l.name===t);if(!n||!i)return;const s=n.time[0]*1e9+n.time[1];return i.time[0]*1e9+i.time[1]-s}const Ax=(e,t)=>{const r={domain_lookup:(t.domainLookupEnd-t.domainLookupStart)*1e6,connect:(t.connectEnd-t.connectStart)*1e6,request:(t.responseEnd-t.requestStart)*1e6,response:(t.responseEnd-t.responseStart)*1e6};Object.entries(r).forEach(([n,i])=>{e.setAttribute(`timings.${n}.ns`,i),e.setAttribute(`timings.${n}.readable`,Pg(i))})},Pg=e=>{if(e>=36e11){const o=e/36e11;return`${Number(o.toFixed(1))}h`}else if(e>=6e10){const o=e/6e10;return`${Number(o.toFixed(1))}m`}else if(e>=1e9){const o=e/1e9;return`${Number(o.toFixed(1))}s`}else if(e>=1e6){const o=e/1e6;return`${Number(o.toFixed(1))}ms`}else if(e>=1e3){const o=e/1e3;return`${Number(o.toFixed(1))}µs`}else return`${Number(e.toFixed(1))}ns`},Mg=e=>e===!0?[/localhost/,/^\//,am(window.location.host)]:Array.isArray(e)?e.map(t=>typeof t=="string"?new RegExp(t):t):/^$/,Ag=e=>e.attributes[nr]?e.attributes[nr]:e.attributes[en],Ux=(e,t,r)=>{const n=window._highlightWebSocketRequestCallback;window._highlightWebSocketRequestCallback=e;const i=window._highlightWebSocketEventCallback;return window._highlightWebSocketEventCallback=s=>{const u=s,{message:o,size:l}=u,c=nt(u,["message","size"]),h=r.some(f=>s.name.toLowerCase().includes(f))?c:s;t(h)},()=>{window._highlightWebSocketRequestCallback=n,window._highlightWebSocketEventCallback=i}},Dx=({xhrCallback:e,fetchCallback:t,webSocketRequestCallback:r,webSocketEventCallback:n,disableWebSocketRecording:i,bodyKeysToRedact:s,highlightEndpoints:o,tracingOrigins:l,urlBlocklist:c,bodyKeysToRecord:a})=>{const h=UI(e,o,l,c,s,a),u=YI(t,o,l,c,s,a),f=i?()=>{}:Ux(r,n,c);return()=>{h(),u(),f()}};class Yt{constructor(t){L(this,"disableConsoleRecording");L(this,"reportConsoleErrors");L(this,"enablePromisePatch");L(this,"consoleMethodsToRecord");L(this,"listeners");L(this,"errors");L(this,"messages");L(this,"options");L(this,"hasNetworkRecording",!0);L(this,"disableNetworkRecording");L(this,"enableRecordingNetworkContents");L(this,"xhrNetworkContents");L(this,"fetchNetworkContents");L(this,"disableRecordingWebSocketContents");L(this,"webSocketNetworkContents");L(this,"webSocketEventContents");L(this,"tracingOrigins");L(this,"networkHeadersToRedact");L(this,"networkBodyKeysToRedact");L(this,"networkBodyKeysToRecord");L(this,"networkHeaderKeysToRecord");L(this,"lastNetworkRequestTimestamp");L(this,"urlBlocklist");L(this,"highlightEndpoints");L(this,"requestResponseSanitizer");var r,n;this.options=t,this.disableConsoleRecording=!!t.disableConsoleRecording,this.reportConsoleErrors=(r=t.reportConsoleErrors)!=null?r:!1,this.enablePromisePatch=(n=t.enablePromisePatch)!=null?n:!1,this.consoleMethodsToRecord=t.consoleMethodsToRecord||[...il],this.listeners=[],this.errors=[],this.messages=[],this.lastNetworkRequestTimestamp=0}isListening(){return this.listeners.length>0}startListening(){if(this.isListening())return;const t=this;this.disableConsoleRecording||this.listeners.push(Zf(r=>{var n,i,s;if(this.reportConsoleErrors&&(r.type==="Error"||r.type==="error")&&r.value&&r.trace){const o=Rt(r.value);if(ml.includes(o)||gl.some(l=>o.includes(l)))return;t.errors.push({event:o,type:"console.error",url:window.location.href,source:(n=r.trace[0])!=null&&n.fileName?r.trace[0].fileName:"",lineNumber:(i=r.trace[0])!=null&&i.lineNumber?r.trace[0].lineNumber:0,columnNumber:(s=r.trace[0])!=null&&s.columnNumber?r.trace[0].columnNumber:0,stackTrace:r.trace,timestamp:new Date().toISOString(),id:In()})}t.messages.push(r)},B(x({},Cf),{level:this.consoleMethodsToRecord,recordLaunchDarklySdkLogs:this.options.recordLaunchDarklySdkLogs}))),this.listeners.push(xf(r=>{ml.includes(r.event)||gl.some(n=>r.event.includes(n))||t.errors.push(r)},{enablePromisePatch:this.enablePromisePatch})),this.listeners.push(Ac),Yt.setupNetworkListener(this,this.options)}stopListening(){this.listeners.forEach(t=>t()),this.listeners=[]}static setupNetworkListener(t,r){var s,o,l,c,a,h,u,f,d,p,m,g;const n=(r==null?void 0:r.backendUrl)||void 0||"https://pub.highlight.io",i=r.otlpEndpoint||"https://otel.highlight.io";t.highlightEndpoints=[n,`${i}/v1/traces`,`${i}/v1/logs`,`${i}/v1/metrics`],t.xhrNetworkContents=[],t.fetchNetworkContents=[],t.webSocketNetworkContents=[],t.webSocketEventContents=[],t.networkHeadersToRedact=[],t.urlBlocklist=[],t.tracingOrigins=r.tracingOrigins||[],(r==null?void 0:r.disableNetworkRecording)!==void 0?(t.disableNetworkRecording=r==null?void 0:r.disableNetworkRecording,t.enableRecordingNetworkContents=!1,t.disableRecordingWebSocketContents=!0,t.networkHeadersToRedact=[],t.networkBodyKeysToRedact=[],t.urlBlocklist=[],t.networkBodyKeysToRecord=[]):typeof(r==null?void 0:r.networkRecording)=="boolean"?(t.disableNetworkRecording=!r.networkRecording,t.enableRecordingNetworkContents=!1,t.disableRecordingWebSocketContents=!0,t.networkHeadersToRedact=[],t.networkBodyKeysToRedact=[],t.urlBlocklist=[]):(((s=r.networkRecording)==null?void 0:s.enabled)!==void 0?t.disableNetworkRecording=!r.networkRecording.enabled:t.disableNetworkRecording=!1,t.enableRecordingNetworkContents=((o=r.networkRecording)==null?void 0:o.recordHeadersAndBody)||!1,t.disableRecordingWebSocketContents=((l=r.networkRecording)==null?void 0:l.disableWebSocketEventRecordings)||!1,t.networkHeadersToRedact=((a=(c=r.networkRecording)==null?void 0:c.networkHeadersToRedact)==null?void 0:a.map(v=>v.toLowerCase()))||[],t.networkBodyKeysToRedact=((u=(h=r.networkRecording)==null?void 0:h.networkBodyKeysToRedact)==null?void 0:u.map(v=>v.toLowerCase()))||[],t.urlBlocklist=((d=(f=r.networkRecording)==null?void 0:f.urlBlocklist)==null?void 0:d.map(v=>v.toLowerCase()))||[],t.urlBlocklist=[...t.urlBlocklist,...Ef],t.requestResponseSanitizer=(p=r.networkRecording)==null?void 0:p.requestResponseSanitizer,t.networkHeaderKeysToRecord=(m=r.networkRecording)==null?void 0:m.headerKeysToRecord,t.networkHeaderKeysToRecord&&(t.networkHeadersToRedact=[],t.networkHeaderKeysToRecord=t.networkHeaderKeysToRecord.map(v=>v.toLocaleLowerCase())),t.networkBodyKeysToRecord=(g=r.networkRecording)==null?void 0:g.bodyKeysToRecord,t.networkBodyKeysToRecord&&(t.networkBodyKeysToRedact=[],t.networkBodyKeysToRecord=t.networkBodyKeysToRecord.map(v=>v.toLocaleLowerCase()))),!t.disableNetworkRecording&&t.enableRecordingNetworkContents&&(t.hasNetworkRecording=!0,t.listeners.push(Dx({xhrCallback:v=>{t.xhrNetworkContents.push(v)},fetchCallback:v=>{t.fetchNetworkContents.push(v)},webSocketRequestCallback:v=>{t.webSocketNetworkContents&&t.webSocketNetworkContents.push(v)},webSocketEventCallback:v=>{t.webSocketEventContents.push(v)},disableWebSocketRecording:t.disableRecordingWebSocketContents,bodyKeysToRedact:t.networkBodyKeysToRedact,highlightEndpoints:t.highlightEndpoints,tracingOrigins:t.tracingOrigins,urlBlocklist:t.urlBlocklist,bodyKeysToRecord:t.networkBodyKeysToRecord})))}static getRecordedNetworkResources(t,r){var s,o;let n=[],i=[];if(!t.disableNetworkRecording){const l=((s=window==null?void 0:window.performance)==null?void 0:s.timeOrigin)||0;n=performance.getEntriesByType("resource");const c=(r-l)*2;if(n=n.filter(a=>a.responseEnd<t.lastNetworkRequestTimestamp?!1:Gs(a.name,t.highlightEndpoints)).map(a=>B(x({},a.toJSON()),{offsetStartTime:a.startTime-c,offsetResponseEnd:a.responseEnd-c,offsetFetchStart:a.fetchStart-c})),t.lastNetworkRequestTimestamp=((o=n.at(-1))==null?void 0:o.responseEnd)||t.lastNetworkRequestTimestamp,t.enableRecordingNetworkContents){const a={headersToRedact:t.networkHeadersToRedact,headersToRecord:t.networkHeaderKeysToRecord,requestResponseSanitizer:t.requestResponseSanitizer};n=om(n,t.xhrNetworkContents,"xmlhttprequest",a),n=om(n,t.fetchNetworkContents,"fetch",a)}}return t.disableRecordingWebSocketContents||(i=t.webSocketNetworkContents||[]),[...n,...i]}static getRecordedWebSocketEvents(t){let r=[];return!t.disableNetworkRecording&&!t.disableRecordingWebSocketContents&&(r=t.webSocketEventContents),r}static clearRecordedNetworkResources(t){t.disableNetworkRecording||(t.xhrNetworkContents=[],t.fetchNetworkContents=[],t.webSocketNetworkContents=[],t.webSocketEventContents=[],performance.clearResourceTimings())}}const Ug=(e,t,r)=>{switch(e){case"strict":return[!0,void 0];case"default":return[!0,void 0];case"none":return[!!t,B(x({},r),{password:!0})]}},Dg=(e,t)=>e==="strict"?"strict":(t!=null?t:e==="default")?"default":"none";let yt,Dc;function Fg(e,t){return e.nodeType,Node.ELEMENT_NODE,Bc(e);return Fx(e,t)}function Fc(e){if(e.id.length)return`#${e.id}`;if(e.classList.length){let t=[];for(const r of e.classList)t.push(`.${r}`);return`${e.nodeName.toLowerCase()}${t.join(",")}`}return e.nodeName.toLowerCase()}function Fx(e,t){if(e.tagName.toLowerCase()==="html")return"html";try{const r={root:document.body,idName:i=>!0,className:i=>!0,tagName:i=>!0,attr:(i,s)=>!1,seedMinLength:1,optimizedMinLength:2,threshold:50,maxNumberOfTries:1e3,optimized:!0};yt=x(x({},r),t),Dc=Jx(yt.root,r);let n=Jc(e,0,()=>Jc(e,1,()=>Jc(e,2)));if(n){if(yt.optimized){const i=zg(Kg(n,e));i.length>0&&(n=i[0])}return Ks(n)}else return Bc(e)}catch(r){return Bc(e)}}function Jx(e,t){return e.nodeType===Node.DOCUMENT_NODE?e:e===t.root?e.ownerDocument:e}function Jc(e,t,r){let n=null,i=[],s=e,o=0;for(;s&&s!==yt.root.parentElement;){let l=js(Hx(s))||js(...Yx(s))||js(...Bx(s))||js(zx(s))||[Kx()];const c=jx(s);if(t===0)c&&(l=l.concat(l.filter(Yc).map(a=>Hc(a,c))));else if(t===1)l=l.slice(0,1),c&&(l=l.concat(l.filter(Yc).map(a=>Hc(a,c))));else if(t===2){const[a]=l=l.slice(0,1);c&&Yc(a)&&(l=[Hc(a,c)])}for(let a of l)a.level=o;if(i.push(l),i.length>=yt.seedMinLength&&(n=Jg(i,r),n))break;s=s.parentElement,o++}return n||(n=Jg(i,r)),n}function Jg(e,t){const r=zg(Bg(e));if(r.length>yt.threshold)return t?t():null;for(let n of r)if(Yg(n))return n;return null}function Ks(e){let t=e[0],r=t.name;for(let n=1;n<e.length;n++){const i=e[n].level||0;t.level===i-1?r=`${e[n].name} > ${r}`:r=`${e[n].name} ${r}`,t=e[n]}return r}function Hg(e){return e.map(t=>t.penalty).reduce((t,r)=>t+r,0)}function Yg(e){switch(Dc.querySelectorAll(Ks(e)).length){case 0:return!0;case 1:return!0;default:return!1}}function Hx(e){const t=e.getAttribute("id");return t&&yt.idName(t)?{name:"#"+Qs(t,{isIdentifier:!0}),penalty:0}:null}function Yx(e){return Array.from(e.attributes).filter(r=>yt.attr(r.name,r.value)).map(r=>({name:"["+Qs(r.name,{isIdentifier:!0})+'="'+Qs(r.value)+'"]',penalty:.5}))}function Bx(e){return Array.from(e.classList).filter(yt.className).map(r=>({name:"."+Qs(r,{isIdentifier:!0}),penalty:1}))}function zx(e){const t=e.tagName.toLowerCase();return yt.tagName(t)?{name:t,penalty:2}:null}function Kx(){return{name:"*",penalty:3}}function jx(e){const t=e.parentNode;if(!t)return null;let r=t.firstChild;if(!r)return null;let n=0;for(;r&&(r.nodeType===Node.ELEMENT_NODE&&n++,r!==e);)r=r.nextSibling;return n}function Hc(e,t){return{name:e.name+`:nth-child(${t})`,penalty:e.penalty+1}}function Yc(e){return e.name!=="html"&&!e.name.startsWith("#")}function js(...e){const t=e.filter(Qx);return t.length>0?t:null}function Qx(e){return e!=null}function*Bg(e,t=[]){if(e.length>0)for(let r of e[0])yield*Ru(Bg(e.slice(1,e.length),t.concat(r)));else yield t}function zg(e){return Array.from(e).sort((t,r)=>Hg(t)-Hg(r))}function*Kg(e,t,r={counter:0,visited:new Map}){if(e.length>2&&e.length>yt.optimizedMinLength)for(let n=1;n<e.length-1;n++){if(r.counter>yt.maxNumberOfTries)return;r.counter+=1;const i=[...e];i.splice(n,1);const s=Ks(i);if(r.visited.has(s))return;Yg(i)&&$x(i,t)&&(yield i,r.visited.set(s,!0),yield*Ru(Kg(i,t,r)))}}function $x(e,t){return Dc.querySelector(Ks(e))===t}const qx=/[ -,\.\/:-@\[-\^`\{-~]/,eN=/[ -,\.\/:-@\[\]\^`\{-~]/,tN=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,rN={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};function Qs(e,t={}){const r=x(x({},rN),t);r.quotes!="single"&&r.quotes!="double"&&(r.quotes="single");const n=r.quotes=="double"?'"':"'",i=r.isIdentifier,s=e.charAt(0);let o="",l=0;const c=e.length;for(;l<c;){const a=e.charAt(l++);let h=a.charCodeAt(0),u;if(h<32||h>126){if(h>=55296&&h<=56319&&l<c){const f=e.charCodeAt(l++);(f&64512)==56320?h=((h&1023)<<10)+(f&1023)+65536:l--}u="\\"+h.toString(16).toUpperCase()+" "}else r.escapeEverything?qx.test(a)?u="\\"+a:u="\\"+h.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(a)?u="\\"+h.toString(16).toUpperCase()+" ":a=="\\"||!i&&(a=='"'&&n==a||a=="'"&&n==a)||i&&eN.test(a)?u="\\"+a:u=a;o+=u}return i&&(/^-[-\d]/.test(o)?o="\\-"+o.slice(1):/\d/.test(s)&&(o="\\3"+s+" "+o.slice(1))),o=o.replace(tN,function(a,h,u){return h&&h.length%2?a:(h||"")+u}),!i&&r.wrap?n+o+n:o}const Bc=e=>{let t="";const r=e.getAttribute("class"),n=e.getAttribute("id");return n&&(t=t.concat(jg(n,"#"))),r&&(t=t.concat(jg(r,"."))),t===""&&(t=t.concat(e.tagName.toLowerCase())),t},jg=(e,t)=>`${t}${e.trim().split(" ").join(t)}`,Qg=e=>{const t=n=>{if(n.target){const i=n.target,s=Fg(i);e(s,n)}},r={capture:!0};return window.addEventListener("click",t,r),()=>window.removeEventListener("click",t,r)},$g=e=>{const t=r=>{if(r.target){const n=Fg(r.target);e(n)}};return window.addEventListener("focusin",t),()=>window.removeEventListener("focusin",t)},nN=30,iN=()=>new Promise(e=>requestAnimationFrame(t=>requestAnimationFrame(r=>e(r-t)))),sN=()=>z(this,null,function*(){const e=[];for(let t=0;t<nN;t++)e.push(yield iN());return e.reduce((t,r)=>t+r,0)/e.length}),qg=(e,t)=>{let r={},n=16.666666666666668;sN().then(c=>n=c);const i=c=>{var a;r!=null&&r.event||(r={event:c,location:window.location.href,timerStart:(a=window.performance)==null?void 0:a.now()},window.requestAnimationFrame(s))},s=()=>{if(!(r!=null&&r.timerStart))return;const c=window.performance.now()-r.timerStart-n;o(c),r={}},o=c=>{const a=(new Date().getTime()-t)/1e3;e({relativeTimestamp:a,jankAmount:c,querySelector:l(),newLocation:window.location.href!=r.location?window.location.href:void 0})},l=()=>{var c;return(c=r==null?void 0:r.event)!=null&&c.target?Fc(r.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},ey=e=>{let t,r;if(typeof document.hidden!="undefined"?(t="hidden",r="visibilitychange"):typeof document.msHidden!="undefined"?(t="msHidden",r="msvisibilitychange"):typeof document.webkitHidden!="undefined"&&(t="webkitHidden",r="webkitvisibilitychange"),r===void 0)return()=>{};if(t===void 0)return()=>{};const n=t,i=()=>{const o=document[n];e(!!o)};document.addEventListener(r,i);const s=r;return()=>document.removeEventListener(s,i)},ty=typeof window!="undefined"&&"performance"in window&&"memory"in performance?performance:{memory:{}},ry=(e,t)=>{let r=0,n=0;const i=()=>{const h=(new Date().getTime()-t)/1e3,u=ty.memory.jsHeapSizeLimit||0,f=ty.memory.usedJSHeapSize||0;e({jsHeapSizeLimit:u,usedJSHeapSize:f,relativeTimestamp:h,fps:r})};i();let s;s=setInterval(()=>{i()},1e3);let o=0,l=Date.now();const c=function(){var a=Date.now();o++,a>1e3+l&&(r=Math.round(o*1e3/(a-l)),o=0,l=a),n=requestAnimationFrame(c)};return c(),()=>{clearInterval(s),cancelAnimationFrame(n)}},ny=e=>{e(window.location.href);var t=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(s){setTimeout(()=>{var l;var o;try{o=JSON.parse((l=s==null?void 0:s.toString())!=null?l:"")}catch(c){return}(o.type==="track"||o.type==="identify")&&zc(o)&&e(o)},100),t.call(this,s)};const r=s=>{if(s.key==="ajs_user_id"||s.key==="ajs_anonymous_id"||s.key==="ajs_user_traits"){const{userId:o,userTraits:l}=iy();if(o){let c={};l&&(c=JSON.parse(l));const a={type:"identify",userId:o.toString(),traits:c};zc(a)&&e(a)}}},{userId:n,userTraits:i}=iy();if(n){let s={};i&&(s=JSON.parse(i));const o={type:"identify",userId:n.toString(),traits:s};zc(o)&&e(o)}return window.addEventListener("storage",r),II(({keyName:s})=>{r({key:s})}),()=>{window.removeEventListener("storage",r),XMLHttpRequest.prototype.send=t}},iy=()=>{const e=He("ajs_user_id"),t=He("ajs_user_traits"),r=He("ajs_anonymous_id");return{userId:e,userTraits:t,anonymousId:r}},zc=e=>{if(!e)return!1;let t="";try{t=JSON.stringify(e)}catch(i){return!1}const r=oN(t),n=He(Ge.SEGMENT_LAST_SENT_HASH_KEY);return n===void 0||r!==n?(mt(Ge.SEGMENT_LAST_SENT_HASH_KEY,r),!0):!1},oN=e=>{var t=0,r=e.length,n=0;if(r>0)for(;n<r;)t=(t<<5)-t+e.charCodeAt(n++)|0;return t.toString()},sy=(e,t)=>{const r=aN(e);let n=[];const i=!1,s=!0,o=[];for(let c=0;c<r.length;c++){let a=r[c].split("+");n=[],a.length>1&&(n=uN(ay,a)),a=a[a.length-1],a=a==="*"?"*":cN(a),a in Zt||(Zt[a]=[]);const h={mods:n,shortcut:r[c],key:r[c],method:t,keyup:i,keydown:s,scope:"all",splitKey:"+"};Zt[a].push(h),o.push({key:a,handler:h})}const l=c=>fN(c);return dN(document,"keydown",l),()=>{document.removeEventListener("keydown",l);for(const{key:c,handler:a}of o){const h=Zt[c],u=h?h.indexOf(a):-1;u>-1&&h.splice(u,1)}}};let Qe=[];function aN(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");const t=e.split(",");let r=t.lastIndexOf("");for(;r>=0;)t[r-1]+=",",t.splice(r,1),r=t.lastIndexOf("");return t}const Zt={},Kc=typeof navigator!="undefined"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1,lN={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":Kc?173:189,"=":Kc?61:187,";":Kc?59:186,"'":222,"[":219,"]":221,"\\":220},oy={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},$e={16:!1,18:!1,17:!1,91:!1},ay={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},cN=e=>lN[e.toLowerCase()]||ay[e.toLowerCase()]||e.toUpperCase().charCodeAt(0);function uN(e,t){const r=t.slice(0,t.length-1);for(let n=0;n<r.length;n++)r[n]=e[r[n].toLowerCase()];return r}function dN(e,t,r){e.addEventListener?e.addEventListener(t,r,!1):e.attachEvent&&e.attachEvent(`on${t}`,()=>{r(window.event)})}function hN(e,t,r){let n;if(t.scope===r||t.scope==="all"){n=t.mods.length>0;for(const i in $e)Object.prototype.hasOwnProperty.call($e,i)&&(!$e[i]&&t.mods.indexOf(+i)>-1||$e[i]&&t.mods.indexOf(+i)===-1)&&(n=!1);(t.mods.length===0&&!$e[16]&&!$e[18]&&!$e[17]&&!$e[91]||n||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function fN(e){const t=Zt["*"];let r=e.keyCode||e.which||e.charCode;if((r===93||r===224)&&(r=91),Qe.indexOf(r)===-1&&r!==229&&Qe.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(n=>{const i=oy[n];e[n]&&Qe.indexOf(i)===-1?Qe.push(i):!e[n]&&Qe.indexOf(i)>-1?Qe.splice(Qe.indexOf(i),1):n==="metaKey"&&e[n]&&Qe.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(Qe=Qe.slice(Qe.indexOf(i))))}),!(r in $e&&($e[r]=!0,!t))){for(const n in $e)Object.prototype.hasOwnProperty.call($e,n)&&($e[n]=e[oy[n]]);if(e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(Qe.indexOf(17)===-1&&Qe.push(17),Qe.indexOf(18)===-1&&Qe.push(18),$e[17]=!0,$e[18]=!0),r in Zt){for(let n=0;n<Zt[r].length;n++)if((e.type==="keydown"&&Zt[r][n].keydown||e.type==="keyup"&&Zt[r][n].keyup)&&Zt[r][n].key){const i=Zt[r][n];hN(e,i,"all")}}}}const jc=e=>{let t;const n=()=>{clearTimeout(t),t=setTimeout(()=>{var i,s;e({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(s=(i=window.screen.orientation)==null?void 0:i.angle)!=null?s:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)};var ar,$n,ly,$s,Qc,nn=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},qn=function(e){if(document.readyState==="loading")return"loading";var t=nn();if(t){if(e<t.domInteractive)return"loading";if(t.domContentLoadedEventStart===0||e<t.domContentLoadedEventStart)return"dom-interactive";if(t.domComplete===0||e<t.domComplete)return"dom-content-loaded"}return"complete"},pN=function(e){var t=e.nodeName;return e.nodeType===1?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},qs=function(e,t){var r="";try{for(;e&&e.nodeType!==9;){var n=e,i=n.id?"#"+n.id:pN(n)+(n.classList&&n.classList.value&&n.classList.value.trim()&&n.classList.value.trim().length?"."+n.classList.value.trim().replace(/\s+/g,"."):"");if(r.length+i.length>99)return r||i;if(r=r?i+">"+r:i,n.id)break;e=n.parentNode}}catch(s){}return r},cy=-1,uy=function(){return cy},Gr=function(e){addEventListener("pageshow",function(t){t.persisted&&(cy=t.timeStamp,e(t))},!0)},eo=function(){var e=nn();return e&&e.activationStart||0},bt=function(e,t){var r=nn(),n="navigate";return uy()>=0?n="back-forward-cache":r&&(document.prerendering||eo()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:t===void 0?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:n}},sn=function(e,t,r){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver(function(i){Promise.resolve().then(function(){t(i.getEntries())})});return n.observe(Object.assign({type:e,buffered:!0},r||{})),n}}catch(i){}},vt=function(e,t,r,n){var i,s;return function(o){t.value>=0&&(o||n)&&((s=t.value-(i||0))||i===void 0)&&(i=t.value,t.delta=s,t.rating=function(l,c){return l>c[1]?"poor":l>c[0]?"needs-improvement":"good"}(t.value,r),e(t))}},$c=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},to=function(e){var t=function(r){r.type!=="pagehide"&&document.visibilityState!=="hidden"||e(r)};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},qc=function(e){var t=!1;return function(r){t||(e(r),t=!0)}},on=-1,dy=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},ro=function(e){document.visibilityState==="hidden"&&on>-1&&(on=e.type==="visibilitychange"?e.timeStamp:0,mN())},hy=function(){addEventListener("visibilitychange",ro,!0),addEventListener("prerenderingchange",ro,!0)},mN=function(){removeEventListener("visibilitychange",ro,!0),removeEventListener("prerenderingchange",ro,!0)},eu=function(){return on<0&&(on=dy(),hy(),Gr(function(){setTimeout(function(){on=dy(),hy()},0)})),{get firstHiddenTime(){return on}}},ei=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},fy=[1800,3e3],py=function(e,t){t=t||{},ei(function(){var r,n=eu(),i=bt("FCP"),s=sn("paint",function(o){o.forEach(function(l){l.name==="first-contentful-paint"&&(s.disconnect(),l.startTime<n.firstHiddenTime&&(i.value=Math.max(l.startTime-eo(),0),i.entries.push(l),r(!0)))})});s&&(r=vt(e,i,fy,t.reportAllChanges),Gr(function(o){i=bt("FCP"),r=vt(e,i,fy,t.reportAllChanges),$c(function(){i.value=performance.now()-o.timeStamp,r(!0)})}))})},my=[.1,.25],gN=function(e,t){(function(r,n){n=n||{},py(qc(function(){var i,s=bt("CLS",0),o=0,l=[],c=function(h){h.forEach(function(u){if(!u.hadRecentInput){var f=l[0],d=l[l.length-1];o&&u.startTime-d.startTime<1e3&&u.startTime-f.startTime<5e3?(o+=u.value,l.push(u)):(o=u.value,l=[u])}}),o>s.value&&(s.value=o,s.entries=l,i())},a=sn("layout-shift",c);a&&(i=vt(r,s,my,n.reportAllChanges),to(function(){c(a.takeRecords()),i(!0)}),Gr(function(){o=0,s=bt("CLS",0),i=vt(r,s,my,n.reportAllChanges),$c(function(){return i()})}),setTimeout(i,0))}))})(function(r){(function(n){if(n.entries.length){var i=n.entries.reduce(function(l,c){return l&&l.value>c.value?l:c});if(i&&i.sources&&i.sources.length){var s=(o=i.sources).find(function(l){return l.node&&l.node.nodeType===1})||o[0];if(s)return void(n.attribution={largestShiftTarget:qs(s.node),largestShiftTime:i.startTime,largestShiftValue:i.value,largestShiftSource:s,largestShiftEntry:i,loadState:qn(i.startTime)})}}var o;n.attribution={}})(r),e(r)},t)},yN=function(e,t){py(function(r){(function(n){if(n.entries.length){var i=nn(),s=n.entries[n.entries.length-1];if(i){var o=i.activationStart||0,l=Math.max(0,i.responseStart-o);return void(n.attribution={timeToFirstByte:l,firstByteToFCP:n.value-l,loadState:qn(n.entries[0].startTime),navigationEntry:i,fcpEntry:s})}}n.attribution={timeToFirstByte:0,firstByteToFCP:n.value,loadState:qn(uy())}})(r),e(r)},t)},ti={passive:!0,capture:!0},bN=new Date,gy=function(e,t){ar||(ar=t,$n=e,ly=new Date,by(removeEventListener),yy())},yy=function(){if($n>=0&&$n<ly-bN){var e={entryType:"first-input",name:ar.type,target:ar.target,cancelable:ar.cancelable,startTime:ar.timeStamp,processingStart:ar.timeStamp+$n};$s.forEach(function(t){t(e)}),$s=[]}},vN=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;e.type=="pointerdown"?function(r,n){var i=function(){gy(r,n),o()},s=function(){o()},o=function(){removeEventListener("pointerup",i,ti),removeEventListener("pointercancel",s,ti)};addEventListener("pointerup",i,ti),addEventListener("pointercancel",s,ti)}(t,e):gy(t,e)}},by=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,vN,ti)})},vy=[100,300],SN=function(e,t){t=t||{},ei(function(){var r,n=eu(),i=bt("FID"),s=function(c){c.startTime<n.firstHiddenTime&&(i.value=c.processingStart-c.startTime,i.entries.push(c),r(!0))},o=function(c){c.forEach(s)},l=sn("first-input",o);r=vt(e,i,vy,t.reportAllChanges),l&&to(qc(function(){o(l.takeRecords()),l.disconnect()})),l&&Gr(function(){var c;i=bt("FID"),r=vt(e,i,vy,t.reportAllChanges),$s=[],$n=-1,ar=null,by(addEventListener),c=s,$s.push(c),yy()})})},wN=function(e,t){SN(function(r){(function(n){var i=n.entries[0];n.attribution={eventTarget:qs(i.target),eventType:i.name,eventTime:i.startTime,eventEntry:i,loadState:qn(i.startTime)}})(r),e(r)},t)},Sy=0,tu=1/0,no=0,RN=function(e){e.forEach(function(t){t.interactionId&&(tu=Math.min(tu,t.interactionId),no=Math.max(no,t.interactionId),Sy=no?(no-tu)/7+1:0)})},wy=function(){return Qc?Sy:performance.interactionCount||0},_N=function(){"interactionCount"in performance||Qc||(Qc=sn("event",RN,{type:"event",buffered:!0,durationThreshold:0}))},Ry=[200,500],_y=0,Ty=function(){return wy()-_y},Vt=[],ru={},Ey=function(e){var t=Vt[Vt.length-1],r=ru[e.interactionId];if(r||Vt.length<10||e.duration>t.latency){if(r)r.entries.push(e),r.latency=Math.max(r.latency,e.duration);else{var n={id:e.interactionId,latency:e.duration,entries:[e]};ru[n.id]=n,Vt.push(n)}Vt.sort(function(i,s){return s.latency-i.latency}),Vt.splice(10).forEach(function(i){delete ru[i.id]})}},TN=function(e,t){t=t||{},ei(function(){var r;_N();var n,i=bt("INP"),s=function(l){l.forEach(function(h){h.interactionId&&Ey(h),h.entryType==="first-input"&&!Vt.some(function(u){return u.entries.some(function(f){return h.duration===f.duration&&h.startTime===f.startTime})})&&Ey(h)});var c,a=(c=Math.min(Vt.length-1,Math.floor(Ty()/50)),Vt[c]);a&&a.latency!==i.value&&(i.value=a.latency,i.entries=a.entries,n())},o=sn("event",s,{durationThreshold:(r=t.durationThreshold)!==null&&r!==void 0?r:40});n=vt(e,i,Ry,t.reportAllChanges),o&&("interactionId"in PerformanceEventTiming.prototype&&o.observe({type:"first-input",buffered:!0}),to(function(){s(o.takeRecords()),i.value<0&&Ty()>0&&(i.value=0,i.entries=[]),n(!0)}),Gr(function(){Vt=[],_y=wy(),i=bt("INP"),n=vt(e,i,Ry,t.reportAllChanges)}))})},EN=function(e,t){TN(function(r){(function(n){if(n.entries.length){var i=n.entries.sort(function(s,o){return o.duration-s.duration||o.processingEnd-o.processingStart-(s.processingEnd-s.processingStart)})[0];n.attribution={eventTarget:qs(i.target),eventType:i.name,eventTime:i.startTime,eventEntry:i,loadState:qn(i.startTime)}}else n.attribution={}})(r),e(r)},t)},Iy=[2500,4e3],nu={},IN=function(e,t){(function(r,n){n=n||{},ei(function(){var i,s=eu(),o=bt("LCP"),l=function(h){var u=h[h.length-1];u&&u.startTime<s.firstHiddenTime&&(o.value=Math.max(u.startTime-eo(),0),o.entries=[u],i())},c=sn("largest-contentful-paint",l);if(c){i=vt(r,o,Iy,n.reportAllChanges);var a=qc(function(){nu[o.id]||(l(c.takeRecords()),c.disconnect(),nu[o.id]=!0,i(!0))});["keydown","click"].forEach(function(h){addEventListener(h,function(){return setTimeout(a,0)},!0)}),to(a),Gr(function(h){o=bt("LCP"),i=vt(r,o,Iy,n.reportAllChanges),$c(function(){o.value=performance.now()-h.timeStamp,nu[o.id]=!0,i(!0)})})}})})(function(r){(function(n){if(n.entries.length){var i=nn();if(i){var s=i.activationStart||0,o=n.entries[n.entries.length-1],l=o.url&&performance.getEntriesByType("resource").filter(function(d){return d.name===o.url})[0],c=Math.max(0,i.responseStart-s),a=Math.max(c,l?(l.requestStart||l.startTime)-s:0),h=Math.max(a,l?l.responseEnd-s:0),u=Math.max(h,o?o.startTime-s:0),f={element:qs(o.element),timeToFirstByte:c,resourceLoadDelay:a-c,resourceLoadTime:h-a,elementRenderDelay:u-h,navigationEntry:i,lcpEntry:o};return o.url&&(f.url=o.url),l&&(f.lcpResourceEntry=l),void(n.attribution=f)}}n.attribution={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadTime:0,elementRenderDelay:n.value}})(r),e(r)},t)},Cy=[800,1800],CN=function e(t){document.prerendering?ei(function(){return e(t)}):document.readyState!=="complete"?addEventListener("load",function(){return e(t)},!0):setTimeout(t,0)},ZN=function(e,t){t=t||{};var r=bt("TTFB"),n=vt(e,r,Cy,t.reportAllChanges);CN(function(){var i=nn();if(i){var s=i.responseStart;if(s<=0||s>performance.now())return;r.value=Math.max(s-eo(),0),r.entries=[i],n(!0),Gr(function(){r=bt("TTFB",0),(n=vt(e,r,Cy,t.reportAllChanges))(!0)})}})},LN=function(e,t){ZN(function(r){(function(n){if(n.entries.length){var i=n.entries[0],s=i.activationStart||0,o=Math.max(i.domainLookupStart-s,0),l=Math.max(i.connectStart-s,0),c=Math.max(i.requestStart-s,0);n.attribution={waitingTime:o,dnsTime:l-o,connectionTime:c-l,requestTime:n.value-c,navigationEntry:i}}else n.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}})(r),e(r)},t)};const Zy=e=>(gN(e),yN(e),wN(e),IN(e),LN(e),EN(e),()=>{}),an=typeof navigator!="undefined"&&"connection"in navigator?navigator.connection:{},Ly=(e,t)=>{const r=()=>{const s=(new Date().getTime()-t)/1e3;e({relativeTimestamp:s,downlink:an.downlink,downlinkMax:an.downlinkMax,effectiveType:an.effectiveType,rtt:an.rtt,saveData:an.saveData,type:an.type})};r();let n;return n=setInterval(()=>{r()},1e3),()=>{clearInterval(n)}},io="iframe parent ready",so="iframe ok",ri="highlightLogs",xN=e=>{let t=He(ri)||"";t=t+"["+new Date().getTime()+"] "+e+`
|
|
467
467
|
`,mt(ri,t)},xy=()=>He(ri)||"",Ny=e=>{if(!e)return;let t=He(ri)||"";t&&(t.startsWith(e)?(t=t.slice(e.length),mt(ri,t)):xN("Unable to clear logs "+e.replace(`
|
|
468
468
|
`," ")+" from "+t.replace(`
|
|
469
469
|
`," ")))},Oy=()=>{if(!("performance"in window&&"memory"in performance))return{getDeviceDetails:void 0,getCurrentDeviceDetails:void 0};const e=window.performance;return{getDeviceDetails:()=>({deviceMemory:NN(navigator.deviceMemory||0)}),getCurrentDeviceDetails:()=>{const n=iu(e.memory.jsHeapSizeLimit),i=iu(e.memory.totalJSHeapSize),s=iu(e.memory.usedJSHeapSize);return{jsHeapSizeLimit:n,totalJSHeapSize:i,usedJSHeapSize:s}}}},iu=e=>e/Math.pow(1e3,2),NN=e=>1024*e;var Gy={exports:{}};/**
|