vendor: 5,827 bytes, lines 1-2
1/*! For license information please see install-opentelemetry.js.LICENSE.txt */ 2!function(){"use strict";var e={16:function(e,t,n){function r(e){var t="function"==typeof Map?new Map:void 0;return r=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(f())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&v(i,n.prototype),i}(e,arguments,d(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),v(n,e)},r(e)}function i(e,t,n,r){var i=o(d(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function o(){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},o.apply(null,arguments)}function a(){a=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new C(r||[]);return i(a,"_invoke",{value:R(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",v="suspendedYield",p="executing",_="completed",m={};function g(){}function E(){}function T(){}var y={};l(y,s,(function(){return this}));var b=Object.getPrototypeOf,O=b&&b(b(I([])));O&&O!==n&&r.call(O,s)&&(y=O);var w=T.prototype=g.prototype=Object.create(y);function A(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function L(e,t){function n(i,o,a,s){var u=d(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==S(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function R(t,n,r){var i=h;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===_){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=k(s,r);if(u){if(u===m)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=_,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?_:v,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=_,r.method="throw",r.arg=c.arg)}}}function k(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(S(t)+" is not iterable")}return E.prototype=T,i(w,"constructor",{value:T,configurable:!0}),i(T,"constructor",{value:E,configurable:!0}),E.displayName=l(T,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===E||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,T):(e.__proto__=T,l(e,c,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},A(L.prototype),l(L.prototype,u,(function(){return this})),t.AsyncIterator=L,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new L(f(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},A(w),l(w,c,"Generator"),l(w,s,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEac
vendor: 4,150 bytes, line 2
2h(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;P(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function s(e,t,n){return(t=b(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=m(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function c(e,t,n){return t=d(t),function(e,t){if(t&&("object"==S(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}(e,f()?Reflect.construct(t,n||[],d(e).constructor):t.apply(e,n))}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}
2finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||m(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){if(e){if("string"==typeof e)return g(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,b(r.key),r)}}function y(e,t,n){return t&&T(e.prototype,t),n&&T(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function b(e){var t=function(e){if("object"!=S(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==S(t)?t:t+""}function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}var O="object"==("undefined"==typeof globalThis?"undefined":S(globalThis))?globalThis:"object"==("undefined"==typeof self?"undefined":S(self))?self:"object"==("undefined"==typeof window?"undefined":S(window))?window:"object"==(void 0===n.g?"undefined":S(n.g))?n.g:{},w="1.8.0",A=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,L=function(e){var t=new Set([e]),n=new Set,r=e.match(A);if(!r)return function(){return!1};var i=+r[1],o=+r[2],a=+r[3];if(null!=r[4])return function(t){return t===e};function s(e){return n.add(e),!1}function u(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(n.has(e))return!1;var r=e.match(A);if(!r)return s(e);var c=+r[1],l=+r[2],f=+r[3];return null!=r[4]||i!==c?s(e):0===i?o===l&&a<=f?u(e):s(e):o<=l?u(e):s(e)}}(w),R=w.split(".")[0],k=Symbol.for("opentelemetry.js.api.".concat(R)),N=O;function P(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=N[k]=null!==(r=N[k])&&void 0!==r?r:{version:w};if(!i&&o[e]){var a=new Error("@opentelemetry/api: Attempted duplicate registration of API: ".concat(e));return n.error(a.stack||a.message),!1}if(o.version!==w){var s=new Error("@opentelemetry/api: Registration of version v".concat(o.version," for ").concat(e," does not match previously registered API v").concat(w));return n.error(s.stack||s.message),!1}return o[e]=t,n.debug("@opentelemetry/api: Registered a global for ".concat(e," v").concat(w,".")),!0}function C(e){var t,n,r=null===(t=N[k])||void 0===t?void 0:t.version;if(r&&L(r))return null===(n=N[k])||void 0===n?void 0:n[e]}function I(e,t){t.debug("@opentelemetry/api: Unregistering a global for ".concat(e," v").concat(w,"."));var n=N[k];n&&delete n[e]}var x,M=function(){return y((function e(t){E(this,e),this._namespace=t.namespace||"DiagComponentLogger"}),[{key:"debug",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return U("debug",this._namespace,t)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return U("error",this._namespace,t)}},{key:"info",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return U("info",this._namespace,t)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return U("warn",this._namespace,t)}},{key:"verbose",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return U("verbose",this._namespace,t)}}])}();function U(e,t,n){var r=C("diag");if(r)return n.unshift(t),r[e].apply(r,_(n))}
2!function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"}(x||(x={}));var D=function(){function e(){function t(e){return function(){var t=C("diag");if(t)return t[e].apply(t,arguments)}}E(this,e);var n=this;n.setLogger=function(e){var t,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{logLevel:x.INFO};if(e===n){var a=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error(null!==(t=a.stack)&&void 0!==t?t:a.message),!1}"number"==typeof o&&(o={logLevel:o});var s=C("diag"),u=function(e,t){function n(n,r){var i=t[n];return"function"==typeof i&&e>=r?i.bind(t):function(){}}return e<x.NONE?e=x.NONE:e>x.ALL&&(e=x.ALL),t=t||{},{error:n("error",x.ERROR),warn:n("warn",x.WARN),info:n("info",x.INFO),debug:n("debug",x.DEBUG),verbose:n("verbose",x.VERBOSE)}}(null!==(r=o.logLevel)&&void 0!==r?r:x.INFO,e);if(s&&!o.suppressOverrideMessage){var c=null!==(i=(new Error).stack)&&void 0!==i?i:"<failed to generate stacktrace>";s.warn("Current logger will be overwritten from ".concat(c)),u.warn("Current logger will over
2write one already registered from ".concat(c))}return P("diag",u,n,!0)},n.disable=function(){I("diag",n)},n.createComponentLogger=function(e){return new M(e)},n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}return y(e,null,[{key:"instance",value:function(){return this._instance||(this._instance=new e),this._instance}}])}(),B=function(){function e(t){E(this,e),this._entries=t?new Map(t):new Map}return y(e,[{key:"getEntry",value:function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)}},{key:"getAllEntries",value:function(){return Array.from(this._entries.entries()).map((function(e){var t=p(e,2);return[t[0],t[1]]}))}},{key:"setEntry",value:function(t,n){var r=new e(this._entries);return r._entries.set(t,n),r}},{key:"removeEntry",value:function(t){var n=new e(this._entries);return n._entries.delete(t),n}},{key:"removeEntries",value:function(){for(var t=new e(this._entries),n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var s=a[o];t._entries.delete(s)}return t}},{key:"clear",value:function(){return new e}}])}(),j=Symbol("BaggageEntryMetadata"),H=D.instance();function F(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new B(new Map(Object.entries(e)))}function V(e){return"string"!=typeof e&&(H.error("Cannot create baggage metadata from unknown type: "+S(e)),e=""),{__TYPE__:j,toString:function(){return e}}}function G(e){return Symbol.for(e)}var X,z=y((function e(t){E(this,e);var n=this;n._currentContext=t?new Map(t):new Map,n.getValue=function(e){return n._currentContext.get(e)},n.setValue=function(t,r){var i=new e(n._currentContext);return i._currentContext.set(t,r),i},n.deleteValue=function(t){var r=new e(n._currentContext);return r._currentContext.delete(t),r}})),q=new z,W=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],K=y((function e(){E(this,e)})),Y=function(){return y((function e(){E(this,e)}),[{key:"addCallback",value:function(e){}},{key:"removeCallback",value:function(e){}}])}(),Q=new(function(){return y((function e(){E(this,e)}),[{key:"createHistogram",value:function(e,t){return J}},{key:"createCounter",value:function(e,t){return Z}},{key:"createUpDownCounter",value:function(e,t){return $}},{key:"createObservableGauge",value:function(e,t){return te}},{key:"createObservableCounter",value:function(e,t){return ee}},{key:"createObservableUpDownCounter",value:function(e,t){return ne}},{key:"addBatchObservableCallback",value:function(e,t){}},{key:"removeBatchObservableCallback",value:function(e){}}])}()),Z=new(function(e){function t(){return E(this,t),c(this,t,arguments)}return h(t,e),y(t,[{key:"add",value:function(e,t){}}])}(K)),J=new(function(e){function t(){return E(this,t),c(this,t,arguments)}return h(t,e),y(t,[{key:"record",value:function(e,t){}}])}(K)),$=new(function(e){function t(){return E(this,t),c(this,t,arguments)}return h(t,e),y(t,[{key:"add",value:function(e,t){}}])}(K)),ee=new(function(e){function t(){return E(this,t),c(this,t,arguments)}return h(t,e),y(t)}(Y)),te=new(function(e){function t(){return E(this,t),c(this,t,arguments)}return h(t,e),y(t)}(Y)),ne=new(function(e){function t(){return E(this,t),c(this,t,arguments)}return h(t,e),y(t)}(Y));!function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"}(X||(X={}));var re,ie={get:function(e,t){if(null!=e)return e[t]},keys:function(e){return null==e?[]:Object.keys(e)}},oe={set:function(e,t,n){null!=e&&(e[t]=n)}},ae="context",se=new(function(){return y((function e(){E(this,e)}),[{key:"active",value:function(){return q}},{key:"with",value:function(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];return t.call.apply(t,[n].concat(i))}},{key:"bind",value:function(e,t){return t}},{key:"enable",value:function(){return this}},{key:"disable",value:function(){return this}}])}()),ue=function(){function e(){E(this,e)}return y(e,[{key:"setGlobalContextManager",value:function(e){return P(ae,e,D.instance())}},{key:"active",value:function(){return this._getContextManager().active()}},{key:"with",value:function(e,t,n){for(var r,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return(r=this._getContextManager()).with.apply(r,[e,t,n].concat(o))}},{key:"bind",value:function(e,t){return this._getContextManager().bind(e,t)}},{key:"_getContextManager",value:function(){return C(ae)||se}},{key:"disable",value:function(){this._getContextManager().disable(),I(ae,D.instance())}}],[{key:"getInstance",value:function(){return this._instance||(this._instance=new e),this._instance}}])}();!function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"}(re||(re={}));var ce="0000000000000000",le="00000000000000000000000000000000",fe={traceId:le,spanId:ce,traceFlags:re.NONE},de=function(){return y((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fe;E(this,e),this._spanContext=t}),[{key:"spanContext",value:function(){return this._spanContext}},{key:"setAttribute",value:function(e,t){return this}},{key:"setAttributes",value:function(e){return this}},{key:"addEvent",value:function(e,t){return this}},{key:"setStatus",value:function(e){return this}},{key:"updateName",value:function(e){return this}},{key:"end",value:function(e){}},{key:"isRecording",value:function(){return!1}},{key:"recordException",value:function(e,t){}}])}(),he=G("OpenTelemetry Context Key SPAN");function ve(e){return e.getValue(he)||void 0}function pe(){return ve(ue.getInstance().active())}function _e(e,t){return e.setValue(he,t)}function me(e){return e.deleteValue(he)}function ge(e,t){return _e(e,new de(t))}function Ee(e){var t;return null===(t=ve(e))||void 0===t?void 0:t.spanContext()}var Te=/^([0-9a-f]{32})$/i,ye=/^[0-9a-f]{16}$/i;function be(e){return Te.test(e)&&e!==le}function Se(e){return ye.test(e)&&e!==ce}function Oe(e){return be(e.traceId)&&Se(e.spanId)}function we(e){return new de(e)}var Ae,Le,Re,ke=ue.getInstance(),Ne=function(){return y((function e(){E(this,e)}),[{key:"startSpan",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ke.active();if(Boolean(null==t?void 0:t.root))return new de;var r,i=n&&Ee(n);return"object"==S(r=i)&&"string"==typeof r.spanId&&"string"==typeof r.traceId&&"number"==typeof r.traceFlags&&Oe(i)?new de(i):new de}},{key:"startActiveSpan",value:function(e,t,n,r){var i,o,a;if(!(arguments.length<2)){2===arguments.length?a=t:3===arguments.length?(i=t,a=n):(i=t,o=n,a=r);var s=null!=o?o:ke.active(),u=this.startSpan(e,i,s),c=_e(s,u);return ke.with(c,a,void 0,u)}}}])}(),Pe=new Ne,Ce=function(){return y((function e(t,n,r,i){E(this,e),this._provider=t,this.name=n,this.version=r,this.options=i}),[{key:"startSpan",value:function(e,t,n){return this._getTracer().startSpan(e,t,n)}},{key:"startActiveSpan",value:function(e,t,n,r){var i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)}},{key:"_getTracer",value:function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):Pe}}])}(),Ie=new(function(){return y((function e(){E(this,e)}),[{key:"getTracer",value:function(e,t,n){return new Ne}}])}()),xe=function(){return y((function e(){E(this,e)}),[{key:"getTracer",value:function(e,t,n){var r;return null!==(r=this.getDelegateTracer(e,t,n))&&void 0!==r?r:new Ce(this,e,t,n)}},{key:"getDelegate",value:function(){var e;return null!==(e=this._delegate)&&void 0!==e?e:Ie}},{key:"setDelegate",value:function(e){this._delegate=e}},{key:"getDelegateTracer",value:function(e,t,n){var r;return null===(r=this._delegate)||void 0===r?void 0:r.getTracer(e,t,n)}}])}();!function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(Ae||(Ae={})),function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"}(Le||(Le={})),function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"}(Re||(Re={}));var Me="[_0-9a-z-*/]",Ue=new RegExp("^(?:".concat("[a-z]".concat(Me,"{0,255}"),"|","[a-z0-9]".concat(Me,"{0,240}@[a-z]").concat(Me,"{0,13}"),")$")),De=/^[ -~]{0,255}[!-~]$/,Be=/,|=/,je=function(){function e(t){E(this,e),this._internalState=new Map,t&&this._parse(t)}return y(e,[{key:"set",value:function(e,t){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n}},{key:"unset",value:function(e){var t=this._clone();return t._internalState.delete(e),t}},{key:"get",value:function(e){return this._internalState.get(e)}},{key:"serialize",value:function(){var e=this;return this._keys().reduce((function(t,n){return t.push(n+"="+e.get(n)),t}),[]).join(",")}},{key:"_parse",value:function(e){e.length>512||(this._internalState=e.split(",").reverse().reduce((function(e,t){var n=t.trim(),r
2=n.indexOf("=");if(-1!==r){var i=n.slice(0,r),o=n.slice(r+1,t.length);(function(e){return Ue.test(e)})(i)&&function(e){return De.test(e)&&!Be.test(e)}(o)&&e.set(i,o)}return e}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))}},{key:"_keys",value:function(){return Array.from(this._internalState.keys()).reverse()}},{key:"_clone",value:function(){var t=new e;return t._internalState=new Map(this._internalState),t}}])}(),He=ue.getInstance(),Fe=D.instance(),Ve=new(function(){return y((function e(){E(this,e)}),[{key:"getMeter",value:function(e,t,n){return Q}}])}()),Ge="metrics",Xe=function(){function e(){E(this,e)}return y(e,[{key:"setGlobalMeterProvider",value:function(e){return P(Ge,e,D.instance())}},{key:"getMeterProvider",value:function(){return C(Ge)||Ve}},{key:"getMeter",value:function(e,t,n){return this.getMeterProvider().getMeter(e,t,n)}},{key:"disable",value:function(){I(Ge,D.instance())}}],[{key:"getInstance",value:function(){return this._instance||(this._instance=new e),this._instance}}])}(),ze=Xe.getInstance(),qe=G("OpenTelemetry Baggage Key");function We(e){return e.getValue(qe)||void 0}function Ke(){return We(ue.getInstance().active())}function Ye(e,t){return e.setValue(qe,t)}function Qe(e){return e.deleteValue(qe)}var Ze="propagation",Je=new(function(){return y((function e(){E(this,e)}),[{key:"inject",value:function(e,t){}},{key:"extract",value:function(e,t){return e}},{key:"fields",value:function(){return[]}}])}()),$e=function(){function e(){E(this,e),this.createBaggage=F,this.getBaggage=We,this.getActiveBaggage=Ke,this.setBaggage=Ye,this.deleteBaggage=Qe}return y(e,[{key:"setGlobalPropagator",value:function(e){return P(Ze,e,D.instance())}},{key:"inject",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:oe;return this._getGlobalPropagator().inject(e,t,n)}},{key:"extract",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ie;return this._getGlobalPropagator().extract(e,t,n)}},{key:"fields",value:function(){return this._getGlobalPropagator().fields()}},{key:"disable",value:function(){I(Ze,D.instance())}},{key:"_getGlobalPropagator",value:function(){return C(Ze)||Je}}],[{key:"getInstance",value:function(){return this._instance||(this._instance=new e),this._instance}}])}(),et=$e.getInstance(),tt="trace",nt=function(){function e(){E(this,e),this._proxyTracerProvider=new xe,this.wrapSpanContext=we,this.isSpanContextValid=Oe,this.deleteSpan=me,this.getSpan=ve,this.getActiveSpan=pe,this.getSpanContext=Ee,this.setSpan=_e,this.setSpanContext=ge}return y(e,[{key:"setGlobalTracerProvider",value:function(e){var t=P(tt,this._proxyTracerProvider,D.instance());return t&&this._proxyTracerProvider.setDelegate(e),t}},{key:"getTracerProvider",value:function(){return C(tt)||this._proxyTracerProvider}},{key:"getTracer",value:function(e,t){return this.getTracerProvider().getTracer(e,t)}},{key:"disable",value:function(){I(tt,D.instance()),this._proxyTracerProvider=new xe}}],[{key:"getInstance",value:function(){return this._instance||(this._instance=new e),this._instance}}])}(),rt=nt.getInstance(),it={context:He,diag:Fe,metrics:ze,propagation:et,trace:rt},ot=Object.freeze({__proto__:null,context:He,diag:Fe,metrics:ze,propagation:et,trace:rt,default:it,baggageEntryMetadataFromString:V,createContextKey:G,ROOT_CONTEXT:q,DiagConsoleLogger:y((function e(){function t(e){return function(){if(console){for(var t=console[e],n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];if("function"!=typeof t&&(t=console.log),"function"==typeof t)return t.apply(console,r)}}}E(this,e);for(var n=0;n<W.length;n++)this[W[n].n]=t(W[n].c)})),get DiagLogLevel(){return x},createNoopMeter:function(){return Q},get ValueType(){return X},defaultTextMapGetter:ie,defaultTextMapSetter:oe,ProxyTracer:Ce,ProxyTracerProvider:xe,get SamplingDecision(){return Ae},get SpanKind(){return Le},get SpanStatusCode(){return Re},get TraceFlags(){return re},createTraceState:function(e){return new je(e)},isSpanContextValid:Oe,isValidTraceId:be,isValidSpanId:Se,INVALID_SPANID:ce,INVALID_TRACEID:le,INVALID_SPAN_CONTEXT:fe}),at=G("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function st(e){return!0===e.getValue(at)}var ut=",",ct="baggage";function lt(e){var t=e.split(";");if(!(t.length<=0)){var n=t.shift();if(n){var r=n.indexOf("=");if(!(r<=0)){var i,o=decodeURIComponent(n.substring(0,r).trim()),a=decodeURIComponent(n.substring(r+1).trim());return t.length>0&&(i=V(t.join(";"))),{key:o,value:a,metadata:i}}}}}function ft(e){return"string"!=typeof e||0===e.length?{}:e.split(ut).map((function(e){return lt(e)})).filter((function(e){return void 0!==e&&e.value.length>0})).reduce((function(e,t){return e[t.key]=t.value,e}),{})}var dt,ht=function(){return y((function e(){E(this,e)}),[{key:"inject",value:function(e,t,n){var r=et.getBaggage(e);if(r&&!st(e)){var i=function(e){return e.getAllEntries().map((function(e){var t=p(e,2),n=t[0],r=t[1],i="".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(r.value));return void 0!==r.metadata&&(i+=";"+r.metadata.toString()),i}))}(r).filter((function(e){return e.length<=4096})).slice(0,180),o=function(e){return e.reduce((function(e,t){var n="".concat(e).concat(""!==e?ut:"").concat(t);return n.length>8192?e:n}),"")}(i);o.length>0&&n.set(t,ct,o)}}},{key:"extract",value:function(e,t,n){var r=n.get(t,ct),i=Array.isArray(r)?r.join(ut):r;if(!i)return e;var o={};return 0===i.length?e:(i.split(ut).forEach((function(e){var t=lt(e);if(t){var n={value:t.value};t.metadata&&(n.metadata=t.metadata),o[t.key]=n}})),0===Object.entries(o).length?e:et.setBaggage(e,et.createBaggage(
2o)))}},{key:"fields",value:function(){return[ct]}}])}();function vt(e){var t={};if("object"!=S(e)||null==e)return t;for(var n=0,r=Object.entries(e);n<r.length;n++){var i=p(r[n],2),o=i[0],a=i[1];pt(o)?_t(a)?Array.isArray(a)?t[o]=a.slice():t[o]=a:Fe.warn("Invalid attribute value set for key: ".concat(o)):Fe.warn("Invalid attribute key: ".concat(o))}return t}function pt(e){return"string"==typeof e&&e.length>0}function _t(e){return null==e||(Array.isArray(e)?function(e){var t,n,r=u(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(null!=i){if(!t){if(mt(i)){t=S(i);continue}return!1}if(S(i)!==t)return!1}}}catch(e){r.e(e)}finally{r.f()}return!0}(e):mt(e))}function mt(e){switch(S(e)){case"number":case"boolean":case"string":return!0}return!1}function gt(e){try{!function(e){Fe.error(function(e){return"string"==typeof e?e:JSON.stringify(function(e){for(var t={},n=e;null!==n;)Object.getOwnPropertyNames(n).forEach((function(e){if(!t[e]){var r=n[e];r&&(t[e]=String(r))}})),n=Object.getPrototypeOf(n);return t}(e))}(e))}(e)}catch(e){}}!function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"}(dt||(dt={}));var Et="object"==("undefined"==typeof globalThis?"undefined":S(globalThis))?globalThis:"object"==("undefined"==typeof self?"undefined":S(self))?self:"object"==("undefined"==typeof window?"undefined":S(window))?window:"object"==(void 0===n.g?"undefined":S(n.g))?n.g:{},Tt=["OTEL_SDK_DISABLED"];function yt(e){return Tt.indexOf(e)>-1}var bt=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function St(e){return bt.indexOf(e)>-1}var Ot=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function wt(e){return Ot.indexOf(e)>-1}var At=1/0,Lt=128,Rt={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:x.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:At,OTEL_ATTRIBUTE_COUNT_LIMIT:Lt,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:At,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:Lt,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:At,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:Lt,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:128,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:dt.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function kt(e,t,n){if(void 0!==n[e]){var r=String(n[e]);t[e]="true"===r.toLowerCase()}}function Nt(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1/0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1/0;
2if(void 0!==n[e]){var o=Number(n[e]);isNaN(o)||(t[e]=o<r?r:o>i?i:o)}}function Pt(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:",",i=n[e];"string"==typeof i&&(t[e]=i.split(r).map((function(e){return e.trim()})))}var Ct={ALL:x.ALL,VERBOSE:x.VERBOSE,DEBUG:x.DEBUG,INFO:x.INFO,WARN:x.WARN,ERROR:x.ERROR,NONE:x.NONE};function It(e,t,n){var r=n[e];if("string"==typeof r){var i=Ct[r.toUpperCase()];null!=i&&(t[e]=i)}}function xt(e){var t={};for(var n in Rt){var r=n;if("OTEL_LOG_LEVEL"===r)It(r,t,e);else if(yt(r))kt(r,t,e);else if(St(r))Nt(r,t,e);else if(wt(r))Pt(r,t,e);else{var i=e[r];null!=i&&(t[r]=String(i))}}return t}function Mt(){var e=xt(Et);return Object.assign({},Rt,e)}function Ut(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function Dt(e){for(var t=new Uint8Array(e.length/2),n=0,r=0;r<e.length;r+=2){var i=Ut(e.charCodeAt(r)),o=Ut(e.charCodeAt(r+1));t[n++]=i<<4|o}return t}var Bt=Array(32);function jt(e){return function(){for(var t=0;t<2*e;t++)Bt[t]=Math.floor(16*Math.random())+48,Bt[t]>=58&&(Bt[t]+=39);return String.fromCharCode.apply(null,Bt.slice(0,2*e))}}var Ht=performance;function Ft(e){for(var t={},n=e.length,r=0;r<n;r++){var i=e[r];i&&(t[String(i).toUpperCase().replace(/[-.]/g,"_")]=i)}return t}var Vt,Gt=Ft(["aws.lambda.invoked_arn","db.system","db.connection_string","db.user","db.jdbc.driver_classname","db.name","db.statement","db.operation","db.mssql.instance_name","db.cassandra.keyspace","db.cassandra.page_size","db.cassandra.consistency_level","db.cassandra.table","db.cassandra.idempotence","db.cassandra.speculative_execution_count","db.cassandra.coordinator.id","db.cassandra.coordinator.dc","db.hbase.namespace","db.redis.database_index","db.mongodb.collection","db.sql.table","exception.type","exception.message","exception.stacktrace","exception.escaped","faas.trigger","faas.execution","faas.document.collection","faas.document.operation","faas.document.time","faas.document.name","faas.time","faas.cron","faas.coldstart","faas.invoked_name","faas.invoked_provider","faas.invoked_region","net.transport","net.peer.ip","net.peer.port","net.peer.name","net.host.ip","net.host.port","net.host.name","net.host.connection.type","net.host.connection.subtype","net.host.carrier.name","net.host.carrier.mcc","net.host.carrier.mnc","net.host.carrier.icc","peer.service","enduser.id","enduser.role","enduser.scope","thread.id","thread.name","code.function","code.namespace","code.filepath","code.lineno","http.method","http.url","http.target","http.host","http.scheme","http.status_code","http.flavor","http.user_agent","http.request_content_length","http.request_content_length_uncompressed","http.response_content_length","http.response_content_length_uncompressed","http.server_name","http.route","http.client_ip","aws.dynamodb.table_names","aws.dynamodb.consumed_capacity","aws.dynamodb.item_collection_metrics","aws.dynamodb.provisioned_read_capacity","aws.dynamodb.provisioned_write_capacity","aws.dynamodb.consistent_read","aws.dynamodb.projection","aws.dynamodb.limit","aws.dynamodb.attributes_to_get","aws.dynamodb.index_name","aws.dynamodb.select","aws.dynamodb.global_secondary_indexes","aws.dynamodb.local_secondary_indexes","aws.dynamodb.exclusive_start_table","aws.dynamodb.table_count","aws.dynamodb.scan_forward","aws.dynamodb.segment","aws.dynamodb.total_segments","aws.dynamodb.count","aws.dynamodb.scanned_count","aws.dynamodb.attribute_definitions","aws.dynamodb.global_secondary_index_updates","messaging.system","messaging.destination","messaging.destination_kind","messaging.temp_destination","messaging.protocol","messaging.protocol_version","messaging.url","messaging.message_id","messaging.conversation_id","messaging.message_payload_size_bytes","messaging.message_payload_compressed_size_bytes","messaging.operation","messaging.consumer_id","messaging.rabbitmq.routing_key","messaging.kafka.message_key","messaging.kafka.consumer_group","messaging.kafka.client_id","messaging.kafka.partition","messaging.kafka.tombstone","rpc.system","rpc.service","rpc.method","rpc.grpc.status_code","rpc.jsonrpc.version","rpc.jsonrpc.request_id","rpc.jsonrpc.error_code","rpc.jsonrpc.error_message","message.type","message.id","message.compressed_size","message.uncompressed_size"]),Xt=Ft(["cloud.provider","cloud.account.id","cloud.region","cloud.availability_zone","cloud.platform","aws.ecs.container.arn","aws.ecs.cluster.arn","aws.ecs.launchtype","aws.ecs.task.arn","aws.ecs.task.family","aws.ecs.task.revision","aws.eks.cluster.arn","aws.log.group.names","aws.log.group.arns","aws.log.stream.names","aws.log.stream.arns","container.name","container.id","container.runtime","container.image.name","container.image.tag","deployment.environment","device.id","device.model.identifier","device.model.name","faas.name","faas.id","faas.version","faas.instance","faas.max_memory","host.id","host.name","host.type","host.arch","host.image.name","host.image.id","host.image.ver
2sion","k8s.cluster.name","k8s.node.name","k8s.node.uid","k8s.namespace.name","k8s.pod.uid","k8s.pod.name","k8s.container.name","k8s.replicaset.uid","k8s.replicaset.name","k8s.deployment.uid","k8s.deployment.name","k8s.statefulset.uid","k8s.statefulset.name","k8s.daemonset.uid","k8s.daemonset.name","k8s.job.uid","k8s.job.name","k8s.cronjob.uid","k8s.cronjob.name","os.type","os.description","os.name","os.version","process.pid","process.executable.name","process.executable.path","process.command","process.command_line","process.command_args","process.owner","process.runtime.name","process.runtime.version","process.runtime.description","service.name","service.namespace","service.instance.id","service.version","telemetry.sdk.name","telemetry.sdk.language","telemetry.sdk.version","telemetry.auto.version","webengine.name","webengine.version","webengine.description"]),zt=Ft(["cpp","dotnet","erlang","go","java","nodejs","php","python","ruby","webjs"]),qt=s(s(s(s({},Xt.TELEMETRY_SDK_NAME,"opentelemetry"),Xt.PROCESS_RUNTIME_NAME,"browser"),Xt.TELEMETRY_SDK_LANGUAGE,zt.WEBJS),Xt.TELEMETRY_SDK_VERSION,"1.22.0"),Wt=Math.pow(10,6),Kt=Math.pow(10,9);function Yt(e){var t=e/1e3;return[Math.trunc(t),Math.round(e%1e3*Wt)]}function Qt(){var e=Ht.timeOrigin;if("number"!=typeof e){var t=Ht;e=t.timing&&t.timing.fetchStart}return e}function Zt(e){return rn(Yt(Qt()),Yt("number"==typeof e?e:Ht.now()))}function Jt(e){if(tn(e))return e;if("number"==typeof e)return e<Qt()?Zt(e):Yt(e);if(e instanceof Date)return Yt(e.getTime());throw TypeError("Invalid input type")}function $t(e){return e[0]*Kt+e[1]}function en(e){return 1e6*e[0]+e[1]/1e3}function tn(e){return Array.isArray(e)&&2===e.length&&"number"==typeof e[0]&&"number"==typeof e[1]}function nn(e){return tn(e)||"number"==typeof e||e instanceof Date}function rn(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=Kt&&(n[1]-=Kt,n[0]+=1),n}!function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"}(Vt||(Vt={}));var on,an=function(){return y((function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};E(this,e),this._propagators=null!==(t=n.propagators)&&void 0!==t?t:[],this._fields=Array.from(new Set(this._propagators.map((function(e){return"function"==typeof e.fields?e.fields():[]})).reduce((function(e,t){return e.concat(t)}),[])))}),[{key:"inject",value:function(e,t,n){var r,i=u(this._propagators);try{for(i.s();!(r=i.n()).done;){var o=r.value;try{o.inject(e,t,n)}catch(e){Fe.warn("Failed to inject with ".concat(o.constructor.name,". Err: ").concat(e.message))}}}catch(e){i.e(e)}finally{i.f()}}},{key:"extract",value:function(e,t,n){return this._propagators.reduce((function(e,r){try{return r.extract(e,t,n)}catch(e){Fe.warn("Failed to inject with ".concat(r.constructor.name,". Err: ").concat(e.message))}return e}),e)}},{key:"fields",value:function(){return this._fields.slice()}}])}(),sn="[_0-9a-z-*/]",un=new RegExp("^(?:".concat("[a-z]".concat(sn,"{0,255}"),"|","[a-z0-9]".concat(sn,"{0,240}@[a-z]").concat(sn,"{0,13}"),")$")),cn=/^[ -~]{0,255}[!-~]$/,ln=/,|=/,fn=function(){function e(t){E(this,e),this._internalState=new Map,t&&this._parse(t)}return y(e,[{key:"set",value:function(e,t){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n}},{key:"unset",value:function(e){var t=this._clone();return t._internalState.delete(e),t}},{key:"get",value:function(e){return this._internalState.get(e)}},{key:"serialize",value:function(){var e=this;return this._keys().reduce((function(t,n){return t.push(n+"="+e.get(n)),t}),[]).join(",")}},{key:"_parse",value:function(e){e.length>512||(this._internalState=e.split(",").reverse().reduce((function(e,t){var n=t.trim(),r=n.indexOf("=");if(-1!==r){var i=n.slice(0,r),o=n.slice(r+1,t.length);(function(e){return un.test(e)})(i)&&function(e){return cn.test(e)&&!ln.test(e)}(o)&&e.set(i,o)}return e}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))}},{key:"_keys",value:function(){return Array.from(this._internalState.keys()).reverse()}},{key:"_clone",value:function(){var t=new e;return t._internalState=new Map(this._internalState),t}}])}(),dn="traceparent",hn="tracestate",vn=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$"),pn=function(){return y((function e(){E(this,e)}),[{key:"inject",value:function(e,t,n){var r=rt.getSpanContext(e);if(r&&!st(e)&&Oe(r)){var i="00-".concat(r.traceId,"-").concat(r.spanId,"-0").concat(Number(r.traceFlags||re.NONE).toString(16));n.set(t,dn,i),r.traceState&&n.set(t,hn,r.traceState.serialize())}}},{key:"extract",value:function(e,t,n){var r=n.get(t,dn);if(!r)return e;var i=Array.isArray(r)?r[0]:r;if("string"!=typeof i)return e;var o=function(e){var t=vn.exec(e);return t?"00"===t[1]&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}:null}(i);if(!o)return e;o.isRemote=!0;var a=n.get(t,hn);if(a){var s=Array.isArray(a)?a.join(","):a;o.traceState=new fn("string"==typeof s?s:void 0)}return rt.setSpanContext(e,o)}},{key:"fields",value:function(){return[dn,hn]}}])}();!function(e){e.HTTP="http"}(on||(on={}));var _n,mn,gn=Function.prototype.toString,En=gn.call(Object),Tn=(_n=Object.getPrototypeOf,mn=Object,function(e){return _n(mn(e))}),yn=Object.prototype,bn=yn.hasOwnProperty,Sn=Symbol?Symbol.toStringTag:void 0,On=yn.toString;function wn(e){if(!function(e){return null!=e&&"object"==S(e)}(e)||"[object Object]"!==function(e){return null==e?void 0===e?"[object Undef
2ined]":"[object Null]":Sn&&Sn in Object(e)?function(e){var t=bn.call(e,Sn),n=e[Sn],r=!1;try{e[Sn]=void 0,r=!0}catch(e){}var i=On.call(e);return r&&(t?e[Sn]=n:delete e[Sn]),i}(e):function(e){return On.call(e)}(e)}(e))return!1;var t=Tn(e);if(null===t)return!0;var n=bn.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&gn.call(n)===En}function An(e){return kn(e)?e.slice():e}function Ln(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3?arguments[3]:void 0;if(!(r>20)){if(r++,Cn(e)||Cn(t)||Nn(t))n=An(t);else if(kn(e)){if(n=e.slice(),kn(t))for(var o=0,a=t.length;o<a;o++)n.push(An(t[o]));else if(Pn(t))for(var s=Object.keys(t),u=0,c=s.length;u<c;u++){var l=s[u];n[l]=An(t[l])}}else if(Pn(e))if(Pn(t)){if(!function(e,t){return!(!wn(e)||!wn(t))}(e,t))return t;n=Object.assign({},e);for(var f=Object.keys(t),d=0,h=f.length;d<h;d++){var v=f[d],p=t[v];if(Cn(p))void 0===p?delete n[v]:n[v]=p;else{var _=n[v],m=p;if(Rn(e,v,i)||Rn(t,v,i))delete n[v];else{if(Pn(_)&&Pn(m)){var g=i.get(_)||[],E=i.get(m)||[];g.push({obj:e,key:v}),E.push({obj:t,key:v}),i.set(_,g),i.set(m,E)}n[v]=Ln(n[v],p,r,i)}}}}else n=t;return n}}function Rn(e,t,n){for(var r=n.get(e[t])||[],i=0,o=r.length;i<o;i++){var a=r[i];if(a.key===t&&a.obj===e)return!0}return!1}function kn(e){return Array.isArray(e)}function Nn(e){return"function"==typeof e}function Pn(e){return!Cn(e)&&!kn(e)&&!Nn(e)&&"object"==S(e)}function Cn(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||void 0===e||e instanceof Date||e instanceof RegExp||null===e}function In(e,t){return"string"==typeof t?e===t:!!e.match(t)}function xn(e,t){if(!t)return!1;var n,r=u(t);try{for(r.s();!(n=r.n()).done;)if(In(e,n.value))return!0}catch(e){r.e(e)}finally{r.f()}return!1}var Mn,Un=function(){return y((function e(){var t=this;E(this,e),this._promise=new Promise((function(e,n){t._resolve=e,t._reject=n}))}),[{key:"promise",get:function(){return this._promise}},{key:"resolve",value:function(e){this._resolve(e)}},{key:"reject",value:function(e){this._reject(e)}}])}(),Dn=function(){return y((function e(t,n){E(this,e),this._callback=t,this._that=n,this._isCalled=!1,this._deferred=new Un}),[{key:"isCalled",get:function(){return this._isCalled}},{key:"promise",get:function(){return this._deferred.promise}},{key:"call",value:function(){var e=this;if(!this._isCalled){this._isCalled=!0;try{for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];Promise.resolve((t=this._callback).call.apply(t,[this._that].concat(r))).then((function(t){return e._deferred.resolve(t)}),(function(t){return e._deferred.reject(t)}))}catch(r){this._deferred.reject(r)}}return this._deferred.promise}}])}(),Bn=function(){return y((function e(t,n,r,i,o,a){var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[],u=arguments.length>7?arguments[7]:void 0,c=arguments.length>9?arguments[9]:void 0;E(this,e),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:Re.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=r,this._spanContext=i,this.parentSpanId=a,this.kind=o,this.links=s;var l=Date.now();this._performanceStartTime=Ht.now(),this._performanceOffset=l-(this._performanceStartTime+Qt()),this._startTimeProvided=null!=u,this.startTime=this._getTime(null!=u?u:l),this.resource=t.resource,this.instrumentationLibrary=t.instrumentationLibrary,this._spanLimits=t.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,null!=c&&this.setAttributes(c),this._spanProcessor=t.getActiveSpanProcessor(),this._spanProcessor.onStart(this,n)}),[{key:"spanContext",value:function(){return this._spanContext}},{key:"setAttribute",value:function(e,t){return null==t||this._isSpanEnded()?this:0===e.length?(Fe.warn("Invalid attribute key: ".concat(e)),this):_t(t)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(t),this):(Fe.warn("Invalid attribute value set for key: ".concat(e)),this)}},{key:"setAttributes",value:function(e){for(var t=0,n=Object.entries(e);t<n.length;t++){var r=p(n[t],2),i=r[0],o=r[1];this.setAttribute(i,o)}return this}},{key:"addEvent",value:function(e,t,n){if(this._isSpanEnded())return this;if(0===this._spanLimits.eventCountLimit)return Fe.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(0===this._droppedEventsCount&&Fe.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),nn(t)&&(nn(n)||(n=t),t=void 0);var r=vt(t);return this.events.push({name:e,attributes:r,time:this._getTime(n),droppedAttributesCount:0}),this}},{key:"setStatus",value:function(e){return this._isSpanEnded()||(this.status=e),this}},{key:"updateName",value:function(e){return this._isSpanEnded()||(this.name=e),this}},{key:"end",value:function(e){this._isSpanEnded()?Fe.error("".concat(this.name," ").concat(this._spanContext.traceId,"-").concat(this._spanContext.spanId," - You can only call end() on a span once.")):(this._ended=!0,this.endTime=this._getTime(e),this._duration=function(e,t){var n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=Kt),[n,r]}(this.startTime,this.endTime),this._duration[0]<0&&(Fe.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&Fe.warn("Dropped ".concat(this._droppedEventsCount," events because eventCountLimit reached")),this._spanProcessor.onEnd(this))}},{key:"_getTime",value:function(e){if("number"==typeof e&&e<Ht.now())return Zt(e+this._performanceOffset);if("number"==typeof e)return Yt(e);if(e instanceof Date)return Yt(e.getTime());if(tn(e))return e;if(this._startTimeProvided)return Yt(Date.now());var t=Ht.now()-this._performanceStartTime;return rn(this.startTime,Yt(t))}},{key:"isRecording",value:function(){return!1===this._ended}},{key:"recordException",value:function(e,t){var n={};"string"==typeof e?n[Gt.EXCEPTION_MESSAGE]=e:e&&(e.code?n[Gt.EXCEPTION_TYPE]=e.code.toString():e.name&&(n[Gt.EXCEPTION_TYPE]=e.name),e.message&&(n[Gt.EXCEPTION_MESSAGE]=e.message),e.stack&&(n[Gt.EXCEPTION_STACKTRACE]=e.stack)),n[Gt.EXCEPTION_TYPE]||n[Gt.EXCEPTION_MESSAGE]?this.addEvent("exception",n,t):Fe.warn("Failed to record an exception ".concat(e))}},{key:"duration",get:function(){return this._duration}},{key:"ended",get:function(){return this._ended}},{key:"droppedAttributesCount",get:function(){return this._droppedAttributesCount}},{key:"droppedEventsCount",get:function(){return this._droppedEventsCount}},{key:"droppedLinksCount",get:function(){return this._droppedLinksCount}},{key:"_isSpanEnded",value:function(){return this._ended&&Fe.warn("Can not execute the operation on ended Span {traceId: ".concat(this._spanContext.traceId,", spanId: ").concat(this._spanContext.spanId,"}")),this._ended}},{key:"_truncateToLimitUtil",value:function(e,t){return e.length<=t?e:e.substr(0,t)}},{key:"_truncateToSize",value:function(e){var t=this,n=this._attributeValueLengthLimit;return n<=0?(Fe.warn("Attribute value limit must be positive, got ".concat(n)),e):"string"==typeof e?this._truncateToLimitUtil(e,n):Array.isArray(e)?e.map((function(e){return"string"==typeof e?t._truncateToLimitUtil(e,n):e})):e}}])}();!function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(Mn||(Mn={}));var jn=function(){return y((function e(){E(this,e)}),[{key:"shouldSample",value:function(){return{decision:Mn.NOT_RECORD}}},{key:"toString",value:function(){return"AlwaysOffSampler"}}])}(),Hn=function(){return y((function e(){E(this,e)}),[{key:"shouldSample",value:function(){return{decision:Mn.RECORD_AND_SAMPLED}}},{key:"toString",value:function(){return"AlwaysOnSampler"}}])}(),Fn=function(){return y((function e(t){var n,r,i,o;E(this,e),this._root=t.root,this._root||(gt(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Hn),this._remoteParentSampled=null!==(n=t.remoteParentSampled)&&void 0!==n?n:new Hn,this._remoteParentNotSampled=null!==(r=t.remoteParentNotSampled)&&void 0!==r?r:new jn,this._localParentSampled=null!==(i=t.localParentSampled)&&void 0!==i?i:new Hn,this._localParentNotSampled=null!==(o=t.localParentNotSampled)&&void 0!==o?o:new jn}),[{key:"shouldSample",value:function(e,t,n,r,i,o){var a=rt.getSpanContext(e);return a&&Oe(a)?a.isRemote?a.traceFlags&re.SAMPLED?this._remoteParentSampled.shouldSample(e,t,n,r,i,o):this._remoteParentNotSampled.shouldSample(e,t,n,r,i,o):a.traceFlags&re.SAMPLED?this._localParentSampled.shouldSample(e,t,n,r,i,o):this._localParentNotSampled.shouldSample(e,t,n,r,i,o):this._root.shouldSample(e,t,n,r,i,o)}},{key:"toString",value:function(){return"ParentBased{root=".concat(this._root.toString(),", remoteParentSampled=").concat(this._remoteParentSampled.toString(),", remoteParentNotSampled=").concat(this._remoteParentNotSampled.toString(),", localParentSampled=").concat(this._localParentSampled.toString(),", localParentNotSampled=").concat(this._localParentNotSampled.toString(),"}")}}])}(),Vn=function(){return y((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;E(this,e),this._ratio=t,this._ratio=this._normalize(t),this._upperBound=Math.floor(4294967295*this._ratio)}),[{key:"shouldSample",value:function(e,t){return{decision:be(t)&&this._accumulate(t)<this._upperBound?Mn.RECORD_AND_SAMPLED:Mn.NOT_RECORD}}},{key:"toString",value:function(){return"TraceIdRatioBased{".concat(this._ratio,"}")}},{key:"_normalize",value:function(e){return"number"!=typeof e||isNaN(e)?0:e>=1?1:e<=0?0:e}},{key:"_accumulate",value:function(e){for(var t=0,n=0;n<e.length/8;n++){var r=8*n;t=(t^parseInt(e.slice(r,r+8),16))>>>0}return t}}])}(),Gn=Mt(),Xn=dt.AlwaysOn;function zn(){return{sampler:qn(Gn),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:Mt().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:Mt().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:Mt().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:Mt().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:Mt().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:Mt().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:Mt().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:Mt().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function qn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Mt();switch(e.OTEL_TRACES_SAMPLER){case dt.AlwaysOn:return new Hn;case dt.AlwaysOff:return new jn;case dt.ParentBasedAlwaysOn:return new Fn({root:new Hn});case dt.ParentBasedAlwaysOff:return new Fn({root:new jn});case dt.TraceIdRatio:return new Vn(Wn(e));case dt.ParentBasedTraceIdRatio:return new Fn({root:new Vn(Wn(e))});default:return Fe.error('OTEL_TRACES_SAMPLER value "'.concat(e.OTEL_TRACES_SAMPLER," invalid, defaulting to ").concat(Xn,'".')),new Hn}}function Wn(e){if(void 0===e.OTEL_TRACES_SAMPLER_ARG||""===e.OTEL_TRACES_SAMPLER_ARG)return Fe.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ".concat(1,".")),1;var t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(Fe.error("OTEL_TRACES_SAMPLER_ARG=".concat(e.OTEL_TRACES_SAMPLER_ARG," was given, but it is invali
2d, defaulting to ").concat(1,".")),1):t<0||t>1?(Fe.error("OTEL_TRACES_SAMPLER_ARG=".concat(e.OTEL_TRACES_SAMPLER_ARG," was given, but it is out of range ([0..1]), defaulting to ").concat(1,".")),1):t}var Kn=function(){return y((function e(t,n){E(this,e),this._exporter=t,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var r=Mt();this._maxExportBatchSize="number"==typeof(null==n?void 0:n.maxExportBatchSize)?n.maxExportBatchSize:r.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==n?void 0:n.maxQueueSize)?n.maxQueueSize:r.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==n?void 0:n.scheduledDelayMillis)?n.scheduledDelayMillis:r.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==n?void 0:n.exportTimeoutMillis)?n.exportTimeoutMillis:r.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new Dn(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(Fe.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}),[{key:"forceFlush",value:function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}},{key:"onStart",value:function(e,t){}},{key:"onEnd",value:function(e){this._shutdownOnce.isCalled||e.spanContext().traceFlags&re.SAMPLED&&this._addToBuffer(e)}},{key:"shutdown",value:function(){return this._shutdownOnce.call()}},{key:"_shutdown",value:function(){var e=this;return Promise.resolve().then((function(){return e.onShutdown()})).then((function(){return e._flushAll()})).then((function(){return e._exporter.shutdown()}))}},{key:"_addToBuffer",value:function(e){if(this._finishedSpans.length>=this._maxQueueSize)return 0===this._droppedSpansCount&&Fe.debug("maxQueueSize reached, dropping spans"),void this._droppedSpansCount++;this._droppedSpansCount>0&&(Fe.warn("Dropped ".concat(this._droppedSpansCount," spans because maxQueueSize reached")),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()}},{key:"_flushAll",value:function(){var e=this;return new Promise((function(t,n){for(var r=[],i=0,o=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize);i<o;i++)r.push(e._flushOneBatch());Promise.all(r).then((function(){t()})).catch(n)}))}},{key:"_flushOneBatch",value:function(){var e=this;return this._clearTimer(),0===this._finishedSpans.length?Promise.resolve():new Promise((function(t,n){var r=window.setTimeout((function(){n(new Error("Timeout"))}),e._exportTimeoutMillis);He.with(function(e){return e.setValue(at,!0)}(He.active()),(function(){var i=e._finishedSpans.splice(0,e._maxExportBatchSize),o=function(){return e._exporter.export(i,(function(e){var i;clearTimeout(r),e.code===Vt.SUCCESS?t():n(null!==(i=e.error)&&void 0!==i?i:new Error("BatchSpanProcessor: span export failed"))}))},a=i.map((function(e){return e.resource})).filter((function(e){return e.asyncAttributesPending}));0===a.length?o():Promise.all(a.map((function(e){var t;return null===(t=e.waitForAsyncAttributes)||void 0===t?void 0:t.call(e)}))).then(o,(function(e){gt(e),n(e)}))}))}))}},{key:"_maybeStartTimer",value:function(){var e=this;if(!this._isExporting){var t=function(){e._isExporting=!0,e._flushOneBatch().finally((function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())})).catch((function(t){e._isExporting=!1,gt(t)}))};if(this._finishedSpans.length>=this._maxExportBatchSize)return t();void 0===this._timer&&(this._timer=window.setTimeout((function(){return t()}),this._scheduledDelayMillis),this._timer)}}},{key:"_clearTimer",value:function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)}}])}(),Yn=function(e){function t(e,n){var r;return E(this,t),(r=c(this,t,[e,n])).onInit(n),r}return h(t,e),y(t,[{key:"onInit",value:function(e){var t=this;!0!==(null==e?void 0:e.disableAutoFlushOnDocumentHide)&&"undefined"!=typeof document&&(this._visibilityChangeListener=function(){"hidden"===document.visibilityState&&t.forceFlush()},this._pageHideListener=function(){t.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))}},{key:"onShutdown",value:function(){"undefined"!=typeof document&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))}}])}(Kn),Qn=y((function e(){E(this,e),this.generateTraceId=Jn(16),this.generateSpanId=Jn(8)})),Zn=Array(32);function Jn(e){return function(){for(var t=0;t<2*e;t++)Zn[t]=Math.floor(16*Math.random())+48,Zn[t]>=58&&(Zn[t]+=39);return String.fromCharCode.apply(null,Zn.slice(0,2*e))}}var $n=function(){return y((function e(t,n,r){E(this,e),this._tracerProvider=r;var i=function(e){var t={sampler:qn()},n=zn(),r=Object.assign({},n,t,e);return r.generalLimits=Object.assign({},n.generalLimits,e.generalLimits||{}),r.spanLimits=Object.assign({},n.spanLimits,e.spanLimits||{}),r}(n);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=n.idGenerator||new Qn,this.resource=r.resource,this.instrumentationLibrary=t}),[{key:"startSpan",value:function(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:He.active();i.root&&(o=rt.deleteSpan(o));var a=rt.getSpan(o);if(st(o))return Fe.debug("Instrumentation suppressed, returning Noop Span"),rt.wrapSpanContext(fe);var s,u,c,l=null==a?void 0:a.spanContext(),f=this._idGenerator.generateSpanId();l&&rt.isSpanContextValid(l)?(s=l.traceId,u=l.traceState,c=l.spanId):s=this._idGenerator.generateTraceId();var d=null!==(t=i.kind)&&void 0!==t?t:Le.INTERNAL,h=(null!==(n=i.links)&&void 0!==n?n:[]).map((function(e){return{context:e.context,attributes:vt(e.attributes)}})),v=vt(i.attributes),p=this._sampler.shouldSample(o,s,e,d,v,h);u=null!==(r=p.traceState)&&void 0!==r?r:u;var _={traceId:s,spanId:f,traceFlags:p.decision===Ae.RECORD_AND_SAMPLED?re.SAMPLED:re.NONE,traceState:u};if(p.decision===Ae.NOT_RECORD)return Fe.debug("Recording is off, prop
2agating context in a non-recording span"),rt.wrapSpanContext(_);var m=vt(Object.assign(v,p.attributes));return new Bn(this,o,e,_,d,c,h,i.startTime,void 0,m)}},{key:"startActiveSpan",value:function(e,t,n,r){var i,o,a;if(!(arguments.length<2)){2===arguments.length?a=t:3===arguments.length?(i=t,a=n):(i=t,o=n,a=r);var s=null!=o?o:He.active(),u=this.startSpan(e,i,s),c=rt.setSpan(s,u);return He.with(c,a,void 0,u)}}},{key:"getGeneralLimits",value:function(){return this._generalLimits}},{key:"getSpanLimits",value:function(){return this._spanLimits}},{key:"getActiveSpanProcessor",value:function(){return this._tracerProvider.getActiveSpanProcessor()}}])}();function er(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}var tr=function(){function e(t,n){var r,i=this;E(this,e),this._attributes=t,this.asyncAttributesPending=null!=n,this._syncAttributes=null!==(r=this._attributes)&&void 0!==r?r:{},this._asyncAttributesPromise=null==n?void 0:n.then((function(e){return i._attributes=Object.assign({},i._attributes,e),i.asyncAttributesPending=!1,e}),(function(e){return Fe.debug("a resource's async attributes promise rejected: %s",e),i.asyncAttributesPending=!1,{}}))}return y(e,[{key:"attributes",get:function(){var e;return this.asyncAttributesPending&&Fe.error("Accessing resource attributes before async attributes settled"),null!==(e=this._attributes)&&void 0!==e?e:{}}},{key:"waitForAsyncAttributes",value:function(){return er(this,void 0,void 0,a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=this.asyncAttributesPending,!e.t0){e.next=4;break}return e.next=4,this._asyncAttributesPromise;case 4:case"end":return e.stop()}}),e,this)})))}},{key:"merge",value:function(t){var n,r=this;if(!t)return this;var i=Object.assign(Object.assign({},this._syncAttributes),null!==(n=t._syncAttributes)&&void 0!==n?n:t.attributes);if(!this._asyncAttributesPromise&&!t._asyncAttributesPromise)return new e(i);var o=Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then((function(e){var n,i=p(e,2),o=i[0],a=i[1];return Object.assign(Object.assign(Object.assign(Object.assign({},r._syncAttributes),o),null!==(n=t._syncAttributes)&&void 0!==n?n:t.attributes),a)}));return new e(i,o)}}],[{key:"empty",value:function(){return e.EMPTY}},{key:"default",value:function(){return new e(s(s(s(s({},Xt.SERVICE_NAME,"unknown_service"),Xt.TELEMETRY_SDK_LANGUAGE,qt[Xt.TELEMETRY_SDK_LANGUAGE]),Xt.TELEMETRY_SDK_NAME,qt[Xt.TELEMETRY_SDK_NAME]),Xt.TELEMETRY_SDK_VERSION,qt[Xt.TELEMETRY_SDK_VERSION]))}}])}();tr.EMPTY=new tr({});var nr,rr,ir=function(){return y((function e(t){E(this,e),this._spanProcessors=t}),[{key:"forceFlush",value:function(){var e,t=[],n=u(this._spanProcessors);try{for(n.s();!(e=n.n()).done;){var r=e.value;t.push(r.forceFlush())}}catch(e){n.e(e)}finally{n.f()}return new Promise((function(e){Promise.all(t).then((function(){e()})).catch((function(t){gt(t||new Error("MultiSpanProcessor: forceFlush failed")),e()}))}))}},{key:"onStart",value:function(e,t){var n,r=u(this._spanProcessors);try{for(r.s();!(n=r.n()).done;)n.value.onStart(e,t)}catch(e){r.e(e)}finally{r.f()}}},{key:"onEnd",value:function(e){var t,n=u(this._spanProcessors);try{for(n.s();!(t=n.n()).done;)t.value.onEnd(e)}catch(e){n.e(e)}finally{n.f()}}},{key:"shutdown",value:function(){var e,t=[],n=u(this._spanProcessors);try{for(n.s();!(e=n.n()).done;){var r=e.value;t.push(r.shutdown())}}catch(e){n.e(e)}finally{n.f()}return new Promise((function(e,n){Promise.all(t).then((function(){e()}),n)}))}}])}(),or=function(){return y((function e(){E(this,e)}),[{key:"onStart",value:function(e,t){}},{key:"onEnd",value:function(e){}},{key:"shutdown",value:function(){return Promise.resolve()}},{key:"forceFlush",value:function(){return Promise.resolve()}}])}();!function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"}(nr||(nr={}));var ar=function(){return y((function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};E(this,e),this._registeredSpanProcessors=[],this._tracers=new Map;var r=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=t.shift(),i=new WeakMap;t.length>0;)r=Ln(r,t.shift(),0,i);return r}({},zn(),function(e){var t,n,r,i,o,a,s,u,c,l,f,d,h=Object.assign({},e.spanLimits),v="undefined"!=typeof process&&process&&process.env?xt(process.env):xt(Et);return h.attributeCountLimit=null!==(a=null!==(o=null!==(i=null!==(n=null===(t=e.spanLimits)||void 0===t?void 0:t.attributeCountLimit)&&void 0!==n?n:null===(r=e.generalLimits)||void 0===r?void 0:r.attributeCountLimit)&&void 0!==i?i:v.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)&&void 0!==o?o:v.OTEL_ATTRIBUTE_COUNT_LIMIT)&&void 0!==a?a:Lt,h.attributeValueLengthLimit=null!==(d=null!==(f=null!==(l=null!==(u=null===(s=e.spanLimits)||void 0===s?void 0:s.attributeValueLengthLimit)&&void 0!==u?u:null===(c=e.generalLimits)||void 0===c?void 0:c.attributeValueLengthLimit)&&void 0!==l?l:v.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==f?f:v.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==d?d:At,Object.assign({},e,{spanLimits:h})}(n));this.resource=null!==(t=r.resource)&&void 0!==t?t:tr.empty(),this.resource=tr.default().merge(this.resource),this._config=Object.assign({},r,{resource:this.resource});var i=this._buildExporterFromEnv();if(void 0!==i){var o=new Yn(i);this.activeSpanProcessor=o}else this.activeSpanProcessor=new or}),[{key:"getTracer",value:function(e,t,n){var r="".concat(e,"@").concat(t||"",":").concat((null==n?void 0:n.schemaUrl)||"");return this._tracers.has(r)||this._tracers.set(r,new $n({name:e,version:t,schemaUrl:null==n?void 0:n.schemaUrl},this._config,this)),this._tracers.get(r)}},{key:"addSpanProcessor",value:function(e){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch((function(e){return Fe.error("Error while trying to shutdown current span processor",e)})),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new ir(this._registeredSpanProcessors)}},{key:"getActiveSpanProcessor",value:function(){return this.activeSpanProcessor}},{key:"register",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};rt.setGlobalTracerProvider(this),void 0===e.propagator&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&He.setGlobalContextManager(e.contextManager),e.propagator&&et.setGlobalPropagator(e.propagator)}},{key:"forceFlush",value:function(){var e=this._config.forceFlushTimeoutMillis,t=this._registeredSpanProcessors.map((function(t){return new Promise((function(n){var r,i=setTimeout((function(){n(new Error("Span processor did n
2ot completed within timeout period of ".concat(e," ms"))),r=nr.timeout}),e);t.forceFlush().then((function(){clearTimeout(i),r!==nr.timeout&&(r=nr.resolved,n(r))})).catch((function(e){clearTimeout(i),r=nr.error,n(e)}))}))}));return new Promise((function(e,n){Promise.all(t).then((function(t){var r=t.filter((function(e){return e!==nr.resolved}));r.length>0?n(r):e()})).catch((function(e){return n([e])}))}))}},{key:"shutdown",value:function(){return this.activeSpanProcessor.shutdown()}},{key:"_getPropagator",value:function(e){var t;return null===(t=this.constructor._registeredPropagators.get(e))||void 0===t?void 0:t()}},{key:"_getSpanExporter",value:function(e){var t;return null===(t=this.constructor._registeredExporters.get(e))||void 0===t?void 0:t()}},{key:"_buildPropagatorFromEnv",value:function(){var e=this,t=Array.from(new Set(Mt().OTEL_PROPAGATORS)),n=t.map((function(t){var n=e._getPropagator(t);return n||Fe.warn('Propagator "'.concat(t,'" requested through environment variable is unavailable.')),n})).reduce((function(e,t){return t&&e.push(t),e}),[]);return 0===n.length?void 0:1===t.length?n[0]:new an({propagators:n})}},{key:"_buildExporterFromEnv",value:function(){var e=Mt().OTEL_TRACES_EXPORTER;if("none"!==e&&""!==e){var t=this._getSpanExporter(e);return t||Fe.error('Exporter "'.concat(e,'" requested through environment variable is unavailable.')),t}}}])}();ar._registeredPropagators=new Map([["tracecontext",function(){return new pn}],["baggage",function(){return new ht}]]),ar._registeredExporters=new Map;var sr,ur,cr=function(){return y((function e(){E(this,e),this._enabled=!1,this._currentContext=q}),[{key:"_bindFunction",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q,t=arguments.length>1?arguments[1]:void 0,n=this,r=function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n.with(e,(function(){return t.apply(r,o)}))};return Object.defineProperty(r,"length",{enumerable:!1,configurable:!0,writable:!1,value:t.length}),r}},{key:"active",value:function(){return this._currentContext}},{key:"bind",value:function(e,t){return void 0===e&&(e=this.active()),"function"==typeof t?this._bindFunction(e,t):t}},{key:"disable",value:function(){return this._currentContext=q,this._enabled=!1,this}},{key:"enable",value:function(){return this._enabled||(this._enabled=!0,this._currentContext=q),this}},{key:"with",value:function(e,t,n){var r=this._currentContext;this._currentContext=e||q;try{for(var i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return t.call.apply(t,[n].concat(o))}finally{this._currentContext=r}}}])}(),lr=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(E(this,t),e=c(this,t,[n]),n.contextManager)throw"contextManager should be defined in register method not in constructor";if(n.propagator)throw"propagator should be defined in register method not in constructor";return l(e)}return h(t,e),y(t,[{key:"register",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0===e.contextManager&&(e.contextManager=new cr),e.contextManager&&e.contextManager.enable(),i(t,"register",this,3)([e])}}])}(ar);function fr(e,t){return t in e}function dr(e,t,n){if(fr(n,t)&&"number"==typeof n[t])return e.addEvent(t,n[t]),e}function hr(e,t){dr(e,rr.FETCH_START,t),dr(e,rr.DOMAIN_LOOKUP_START,t),dr(e,rr.DOMAIN_LOOKUP_END,t),dr(e,rr.CONNECT_START,t),fr(t,"name")&&t.name.startsWith("https:")&&dr(e,rr.SECURE_CONNECTION_START,t),dr(e,rr.CONNECT_END,t),dr(e,rr.REQUEST_START,t),dr(e,rr.RESPONSE_START,t),dr(e,rr.RESPONSE_END,t);var n=t[rr.ENCODED_BODY_SIZE];void 0!==n&&e.setAttribute(Gt.HTTP_RESPONSE_CONTENT_LENGTH,n);var r=t[rr.DECODED_BODY_SIZE];void 0!==r&&n!==r&&e.setAttribute(Gt.HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED,r)}function vr(){return"undefined"!=typeof location?location.origin:void 0}function pr(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new WeakSet,o=arguments.length>5?arguments[5]:void 0,a=_r(e),s=function(e,t,n,r,i,o){var a=$t(t),s=$t(n),u=r.filter((function(t){var n=$t(Jt(t[rr.FETCH_START])),r
2=$t(Jt(t[rr.RESPONSE_END]));return t.initiatorType.toLowerCase()===(o||"xmlhttprequest")&&t.name===e&&n>=a&&r<=s}));return u.length>0&&(u=u.filter((function(e){return!i.has(e)}))),u}(e=a.toString(),t,n,r,i,o);if(0===s.length)return{mainRequest:void 0};if(1===s.length)return{mainRequest:s[0]};var u=function(e){return e.slice().sort((function(e,t){var n=e[rr.FETCH_START],r=t[rr.FETCH_START];return n>r?1:n<r?-1:0}))}(s);if(a.origin!==vr()&&u.length>1){var c=u[0],l=function(e,t,n){for(var r,i=$t(n),o=$t(Jt(t)),a=e[1],s=e.length,u=1;u<s;u++){var c=e[u],l=$t(Jt(c[rr.FETCH_START])),f=i-$t(Jt(c[rr.RESPONSE_END]));l>=o&&(!r||f<r)&&(r=f,a=c)}return a}(u,c[rr.RESPONSE_END],n),f=c[rr.RESPONSE_END];return l[rr.FETCH_START]<f&&(l=c,c=void 0),{corsPreFlightRequest:c,mainRequest:l}}return{mainRequest:s[0]}}function _r(e){if("function"==typeof URL)return new URL(e,"undefined"!=typeof document?document.baseURI:"undefined"!=typeof location?location.href:void 0);var t=(sr||(sr=document.createElement("a")),sr);return t.href=e,t}function mr(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return"/";var n=function(e,t){var n=e.nodeType,r=function(e){if(!e.parentNode)return 0;var t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);var n=Array.from(e.parentNode.childNodes);return n=n.filter((function(n){var r=n.localName;return t.indexOf(n.nodeType)>=0&&r===e.localName})),n.length>=1?n.indexOf(e)+1:0}(e),i="";if(n===Node.ELEMENT_NODE){var o=e.getAttribute("id");if(t&&o)return'//*[@id="'.concat(o,'"]');i=e.localName}else if(n===Node.TEXT_NODE||n===Node.CDATA_SECTION_NODE)i="text()";else{if(n!==Node.COMMENT_NODE)return"";i="comment()"}return i&&r>1?"/".concat(i,"[").concat(r,"]"):"/".concat(i)}(e,t);if(t&&n.indexOf("@id")>0)return n;var r="";return e.parentNode&&(r+=mr(e.parentNode,!1)),r+n}function gr(e,t){var n=t||[];return("string"==typeof n||n instanceof RegExp)&&(n=[n]),_r(e).origin===vr()||n.some((function(t){return In(e,t)}))}!function(e){e.CONNECT_END="connectEnd",e.CONNECT_START="connectStart",e.DECODED_BODY_SIZE="decodedBodySize",e.DOM_COMPLETE="domComplete",e.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",e.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",e.DOM_INTERACTIVE="domInteractive",e.DOMAIN_LOOKUP_END="domainLookupEnd",e.DOMAIN_LOOKUP_START="domainLookupStart",e.ENCODED_BODY_SIZE="encodedBodySize",e.FETCH_START="fetchStart",e.LOAD_EVENT_END="loadEventEnd",e.LOAD_EVENT_START="loadEventStart",e.NAVIGATION_START="navigationStart",e.REDIRECT_END="redirectEnd",e.REDIRECT_START="redirectStart",e.REQUEST_START="requestStart",e.RESPONSE_END="responseEnd",e.RESPONSE_START="responseStart",e.SECURE_CONNECTION_START="secureConnectionStart",e.UNLOAD_EVENT_END="unloadEventEnd",e.UNLOAD_EVENT_START="unloadEventStart"}(rr||(rr={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"}(ur||(ur={}));var Er=function(){return y((function e(){E(this,e)}),[{key:"emit",value:function(e){}}])}(),Tr=new(function(){return y((function e(){E(this,e)}),[{key:"getLogger",value:function(e,t,n){return new Er}}])}()),yr="object"==("undefined"==typeof globalThis?"undefined":S(globalThis))?globalThis:"object"==("undefined"==typeof self?"undefined":S(self))?self:"object"==("undefined"==typeof window?"undefined":S(window))?window:"object"==(void 0===n.g?"undefined":S(n.g))?n.g:{},br=Symbol.for("io.opentelemetry.js.api.logs"),Sr=yr,Or=function(){function e(){E(this,e)}return y(e,[{key:"setGlobalLoggerProvider",value:function(e){return Sr[br]?this.getLoggerProvider():(Sr[br]=(t=e,n=Tr,function(e){return 1===e?t:n}),e);var t,n}},{key:"getLoggerProvider",value:function(){var e,t;return null!==(t=null===(e=Sr[br])||void 0===e?void 0:e.call(Sr,1))&&void 0!==t?t:Tr}},{key:"getLogger",value:function(e,t,n){return this.getLoggerProvider().getLogger(e,t,n)}},{key:"disable",value:function(){delete Sr[br]}}],[{key:"getInstance",value:function(){return this._instance||(this._instance=new e),this._instance}}])}(),wr=Or.getInstance();function Ar(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=0,r=e.length;n<r;n++){var i=e[n];if(Array.isArray(i)){var o=Ar(i);t=t.concat(o.instrumentations)}else"function"==typeof i?t.push(new i):i.instrumentationName&&t.push(i)}return{instrumentations:t}}function Lr(e){var t=Ar(e.instrumentations).instrumentations,n=e.tracerProvider||rt.getTracerProvider(),r=e.meterProvider||ze.getMeterProvider(),i=e.loggerProvider||wr.getLoggerProvider();return function(e,t,n,r){for(var i=0,o=e.length;i<o;i++){var a=e[i];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}(t,n,r,i),function(){!function(e){e.forEach((function(e){return e.disable()}))}(t)}}function Rr(e){return"function"==typeof e}var kr=console.error.bind(console);function Nr(e,t,n){var r=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}function Pr(e){e&&e.logger&&(Rr(e.logger)?kr=e.logger:kr("new logger isn't a function, not replacing"))}function Cr(e,t,n){if(e&&e[t]){if(!n)return kr("no wrapper function"),void kr((new Error).stack);if(Rr(e[t])&&Rr(n)){var r=e[t],i=n(r,t);return Nr(i,"__original",r),Nr(i,"__unwrap",(function(){e[t]===i&&Nr(e,t,r)})),Nr(i,"__wrapped",!0),Nr(e,t,i),i}kr("original object and wrapper must be functions")}else kr("no original function "+t+" to wrap")}function Ir(e,t){return e&&e[t]?e[t].__unwrap?e[t].__unwrap():void kr("no original to unwrap to -- has "+t+" already been unwrapped?"):(kr("no function to unwrap."),void kr((new Error).stack))}Pr.wrap=Cr,Pr.massWrap=function(e,t,n){if(!e)return kr("must provide one or more modules to patch"),void kr((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach((function(e){t.forEach((function(t){Cr(e,t,n)}))})):kr("must provide one or more functions to wrap on modules")},Pr.unwrap=Ir,Pr.massUnwrap=function(e,t){if(!e)return kr("must provide one or more modules to patch"),void kr((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach((function(e){t.forEach((function(t){Ir(e,t)}))})):kr("must provide one or more functions to unwrap on modules")};var xr,Mr=Pr,Ur=function(){return y((function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};E(this,e),this.instrumentationName=t,this.instrumentationVersion=n,this._wrap=Mr.wrap,this._unwrap=Mr.unwrap,this._massWrap=Mr.massWrap,this._massUnwrap=Mr.massUnwrap,this._config=Object.assign({enabled:!0},r),this._diag=Fe.createComponentLogger({namespace:t}),this._tracer=rt.getTracer(t,n),this._meter=ze.getMeter(t,n),this._logger=wr.getLogger(t,n),this._updateMetricInstruments()}),[{key:"meter",get:function(){return this._meter}},{key:"setMeterProvider",value:function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}},{key:"logger",get:function(){return this._logger}},{key:"setLoggerProvider",value:function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)}},{key:"getModuleDefinitions",value:function(){var e,t=null!==(e=this.init())&&void 0!==e?e:[];return Array.isArray(t)?t:[t]}},{key:"_updateMetricInstruments",value:function(){}},{key:"getConfig",value:function(){return this._config}},{key:"setConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._config=Object.assign({},e)}},{key:"setTracerProvider",value:function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)}},{key:"tracer",get:function(){return this._tracer}}])}(),Dr=function(e){function t(e,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return E(this,t),(r=c(this,t,[e,n,i]))._config.enabled&&r.enable(),r}return h(t,e),y(t)}(Ur);function Br(e,t,n){var r,i;try{i=e()}catch(e){r=e}finally{if(t(r,i),r&&!n)throw r;return i}}function jr(e){return"function"==typeof e&&"function"==typeof e.__original&&"function"==typeof e.__unwrap&&!0===e.__wrapped}!function(e){e.METHOD_OPEN="open",e.METHOD_SEND="send",e.EVENT_ABORT="abort",e.EVENT_ERROR="error",e.EVENT_LOAD="loaded",e.EVENT_TIMEOUT="timeout"}(xr||(xr={}));var Hr,Fr="0.49.1";(Hr||(Hr={})).HTTP_STATUS_TEXT="http.status_text";var Vr,Gr=function(e){function t(e){var n;return E(this,t),(n=c(this,t,["@opentelemetry/instrumentation-xml-http-request",Fr,e])).component="xml-http-request",n.version=Fr,n.moduleName=n.component,n._tasksCount=0,n._xhrMem=new WeakMap,n._usedResources=new WeakSet,n}return h(t,e),y(t,[{key:"init",value:function(){}},{key:"_getConfig",value:function(){return this._config}},{key:"_addHeaders",value:function(e,t){if(!gr(_r(t).href,this._getConfig().propagateTraceHeaderCorsUrls)){var n={};return et.inject(He.active(),n),void(Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy"))}
2var r={};et.inject(He.active(),r),Object.keys(r).forEach((function(t){e.setRequestHeader(t,String(r[t]))}))}},{key:"_addChildSpan",value:function(e,t){var n=this;He.with(rt.setSpan(He.active(),e),(function(){var e=n.tracer.startSpan("CORS Preflight",{startTime:t[rr.FETCH_START]});hr(e,t),e.end(t[rr.RESPONSE_END])}))}},{key:"_addFinalSpanAttributes",value:function(e,t,n){if("string"==typeof n){var r=_r(n);void 0!==t.status&&e.setAttribute(Gt.HTTP_STATUS_CODE,t.status),void 0!==t.statusText&&e.setAttribute(Hr.HTTP_STATUS_TEXT,t.statusText),e.setAttribute(Gt.HTTP_HOST,r.host),e.setAttribute(Gt.HTTP_SCHEME,r.protocol.replace(":","")),e.setAttribute(Gt.HTTP_USER_AGENT,navigator.userAgent)}}},{key:"_applyAttributesAfterXHR",value:function(e,t){var n=this,r=this._getConfig().applyCustomAttributesOnSpan;"function"==typeof r&&Br((function(){return r(e,t)}),(function(e){e&&n._diag.error("applyCustomAttributesOnSpan",e)}),!0)}},{key:"_addResourceObserver",value:function(e,t){var n=this._xhrMem.get(e);n&&"function"==typeof PerformanceObserver&&"function"==typeof PerformanceResourceTiming&&(n.createdResources={observer:new PerformanceObserver((function(e){var r=e.getEntries(),i=_r(t);r.forEach((function(e){"xmlhttprequest"===e.initiatorType&&e.name===i.href&&n.createdResources&&n.createdResources.entries.push(e)}))})),entries:[]},n.createdResources.observer.observe({entryTypes:["resource"]}))}},{key:"_clearResources",value:function(){0===this._tasksCount&&this._getConfig().clearTimingResources&&(Ht.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)}},{key:"_findResourceAndAddNetworkEvents",value:function(e,t,n,r,i){if(n&&r&&i&&e.createdResources){var o=e.createdResources.entries;o&&o.length||(o=Ht.getEntriesByType("resource"));var a=pr(_r(n).href,r,i,o,this._usedResources);if(a.mainRequest){var s=a.mainRequest;this._markResourceAsUsed(s);var u=a.corsPreFlightRequest;u&&(this._addChildSpan(t,u),this._markResourceAsUsed(u)),hr(t,s)}}}},{key:"_cleanPreviousSpanInformation",value:function(e){var t=this._xhrMem.get(e);if(t){var n=t.callbackToRemoveEvents;n&&n(),this._xhrMem.delete(e)}}},{key:"_createSpan",value:function(e,t,n){if(!xn(t,this._getConfig().ignoreUrls)){var r=n.toUpperCase(),i=this.tracer.startSpan(r,{kind:Le.CLIENT,attributes:s(s({},Gt.HTTP_METHOD,n),Gt.HTTP_URL,_r(t).toString())});return i.addEvent(xr.METHOD_OPEN),this._cleanPreviousSpanInformation(e),this._xhrMem.set(e,{span:i,spanUrl:t}),i}this._diag.debug("ignoring span as url matches ignored url")}},{key:"_markResourceAsUsed",value:function(e){this._usedResources.add(e)}},{key:"_patchOpen",value:function(){var e=this;return function(t){var n=e;return function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var o=r[0],a=r[1];return n._createSpan(this,a,o),t.apply(this,r)}}}},{key:"_patchSend",value:function(){var e=this;function t(t,n){var r=e._xhrMem.get(n);if(r){r.status=n.status,r.statusText=n.statusText,e._xhrMem.delete(n),r.span&&e._applyAttributesAfterXHR(r.span,n);var i=Zt(),o=Date.now();setTimeout((function(){!function(t,n,r,i){var o=n.callbackToRemoveEvents;"function"==typeof o&&o();var a=n.span,s=n.spanUrl,u=n.sendStartTime;a&&(e._findResourceAndAddNetworkEvents(n,a,s,u,r),a.addEvent(t,i),e._addFinalSpanAttributes(a,n,s),a.end(i),e._tasksCount--),e._clearResources()}(t,r,i,o)}),300)}}function n(){t(xr.EVENT_ERROR,this)}function r(){t(xr.EVENT_ABORT,this)}function i(){t(xr.EVENT_TIMEOUT,this)}function o(){this.status<299?t(xr.EVENT_LOAD,this):t(xr.EVENT_ERROR,this)}return function(t){return function(){for(var a=this,s=e._xhrMem.get(this),u=arguments.length,c=new Array(u),l=0;l<u;l++)c[l]=arguments[l];if(!s)return t.apply(this,c);var f=s.span,d=s.spanUrl;return f&&d&&He.with(rt.setSpan(He.active(),f),(function(){e._tasksCount++,s.sendStartTime=Zt(),f.addEvent(xr.METHOD_SEND),a.addEventListener("abort",r),a.addEventListener("error",n),a.addEventListener("load",o),a.addEventListener("timeout",i),s.callbackToRemoveEvents=function(){!function(t){t.removeEventListener("abort",r),t.removeEventListener("error",n),t.removeEventListener("load",o),t.removeEventListener("timeout",i);var a=e._xhrMem.get(t);
2a&&(a.callbackToRemoveEvents=void 0)}(a),s.createdResources&&s.createdResources.observer.disconnect()},e._addHeaders(a,d),e._addResourceObserver(a,d)})),t.apply(this,c)}}}},{key:"enable",value:function(){this._diag.debug("applying patch to",this.moduleName,this.version),jr(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),jr(XMLHttpRequest.prototype.send)&&(this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.debug("removing previous patch from method send")),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend())}},{key:"disable",value:function(){this._diag.debug("removing patch from",this.moduleName,this.version),this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet}}])}(Dr);!function(e){e.COMPONENT="component",e.HTTP_ERROR_NAME="http.error_name",e.HTTP_STATUS_TEXT="http.status_text"}(Vr||(Vr={}));var Xr,zr,qr,Wr,Kr,Yr,Qr,Zr,Jr,$r,ei,ti,ni="0.49.1",ri="object"==("undefined"==typeof process?"undefined":S(process))&&"node"===(null===(Xr=process.release)||void 0===Xr?void 0:Xr.name),ii=function(e){function t(e){var n;return E(this,t),(n=c(this,t,["@opentelemetry/instrumentation-fetch",ni,e])).component="fetch",n.version=ni,n.moduleName=n.component,n._usedResources=new WeakSet,n._tasksCount=0,n}return h(t,e),y(t,[{key:"init",value:function(){}},{key:"_getConfig",value:function(){return this._config}},{key:"_addChildSpan",value:function(e,t){var n=this.tracer.startSpan("CORS Preflight",{startTime:t[rr.FETCH_START]},rt.setSpan(He.active(),e));this._getConfig().ignoreNetworkEvents||hr(n,t),n.end(t[rr.RESPONSE_END])}},{key:"_addFinalSpanAttributes",value:function(e,t){var n=_r(t.url);e.setAttribute(Gt.HTTP_STATUS_CODE,t.status),null!=t.statusText&&e.setAttribute(Vr.HTTP_STATUS_TEXT,t.statusText),e.setAttribute(Gt.HTTP_HOST,n.host),e.setAttribute(Gt.HTTP_SCHEME,n.protocol.replace(":","")),"undefined"!=typeof navigator&&e.setAttribute(Gt.HTTP_USER_AGENT,navigator.userAgent)}},{key:"_addHeaders",value:function(e,t){if(!gr(t,this._getConfig().propagateTraceHeaderCorsUrls)){var n={};return et.inject(He.active(),n),void(Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy"))}if(e instanceof Request)et.inject(He.active(),e.headers,{set:function(e,t,n){return e.set(t,"string"==typeof n?n:String(n))}});else if(e.headers instanceof Headers)et.inject(He.active(),e.headers,{set:function(e,t,n){return e.set(t,"string"==typeof n?n:String(n))}});else if(e.headers instanceof Map)et.inject(He.active(),e.headers,{set:function(e,t,n){return e.set(t,"string"==typeof n?n:String(n))}});else{var r={};et.inject(He.active(),r),e.headers=Object.assign({},r,e.headers||{})}}},{key:"_clearResources",value:function(){0===this._tasksCount&&this._getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)}},{key:"_createSpan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!xn(e,this._getConfig().ignoreUrls)){var n=(t.method||"GET").toUpperCase(),r="HTTP ".concat(n);return this.tracer.startSpan(r,{kind:Le.CLIENT,attributes:s(s(s({},Vr.COMPONENT,this.moduleName),Gt.HTTP_METHOD,n),Gt.HTTP_URL,e)})}this._diag.debug("ignoring span as url matches ignored url")}},{key:"_findResourceAndAddNetworkEvents",value:function(e,t,n){var r=t.entries;if(!r.length){if(!performance.getEntriesByType)return;r=performance.getEntriesByType("resource")}var i=pr(t.spanUrl,t.startTime,n,r,this._usedResources,"fetch");if(i.mainRequest){var o=i.mainRequest;this._markResourceAsUsed(o);var a=i.corsPreFlightRequest;a&&(this._addChildSpan(e,a),this._markResourceAsUsed(a)),this._getConfig().ignoreNetworkEvents||hr(e,o)}}},{key:"_markResourceAsUsed",value:function(e){this._usedResources.add(e)}},{key:"_endSpan",value:function(e,t,n){var r=this,i=Yt(Date.now()),o=Zt();this._addFinalSpanAttributes(e,n),setTimeout((function(){var n;null===(n=t.observer)||void 0===n||n.disconnect(),r._findResourceAndAddNetworkEvents(e,t,o),r._tasksCount--,r._clearResources(),e.end(i)}),300)}},{key:"_patchConstructor",value:function(){var e=this;return function(t){var n=e;return function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var o=this,a=_r(r[0]instanceof Request?r[0].url:String(r[0])).href,s=r[0]instanceof Request?r[0]:r[1]||{},u=n._createSpan(a,s);if(!u)return t.apply(this,r);var c=n._prepareSpanData(a);function l(e,t){n._applyAttributesAfterFetch(e,s,t),n._endSpan(e,c,{status:t.status||0,statusText:t.message,url:a})}function f(e,t){n._applyAttributesAfterFetch(e,s,t),t.status>=200&&t.status<400?n._endSpan(e,c,t):n._endSpan(e,c,{status:t.status,statusText:t.statusText,url:a})}function d(e,t,n){try{var r=n.clone(),i=n.clone(),o=r.body;if(o){var a=o.getReader(),s=function(){a.read().then((function(t){t.done?f(e,i):s()}),(function(t){l(e,t)}))};s()}else f(e,n)}finally{t(n)}}function h(e,t,n){try{l(e,n)}finally{t(n)}}return new Promise((function(e,r){return He.with(rt.setSpan(He.active(),u),(function(){return n._addHeaders(s,a),n._tasksCount++,t.apply(o,s instanceof Request?[s]:[a,s]).then(d.bind(o,u,e),h.bind(o,u,r))}))}))}}}},{key:"_applyAttributesAfterFetch",value:function(e,t,n){var r=this,i=this._getConfig().applyCustomAttributesOnSpan;i&&Br((function(){return i(e,t,n)}),(function(e){e&&r._diag.error("applyCustomAttributesOnSpan",e)}),!0)}},{key:"_prepareSpanData",value:function(e){var t=Zt(),n=[];if("function"!=typeof PerformanceObserver)return{entries:n,startTime:t,spanUrl:e};var r=new PerformanceObserver((function(t){t.getEntries().forEac
2h((function(t){"fetch"===t.initiatorType&&t.name===e&&n.push(t)}))}));return r.observe({entryTypes:["resource"]}),{entries:n,observer:r,startTime:t,spanUrl:e}}},{key:"enable",value:function(){ri?this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()"):(jr(fetch)&&(this._unwrap(Et,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(Et,"fetch",this._patchConstructor()))}},{key:"disable",value:function(){ri||(this._unwrap(Et,"fetch"),this._usedResources=new WeakSet)}}])}(Dr),oi=function(e,t,n){var r=e[t];return"function"!=typeof r?r:(Mr.wrap(e,t,n),ai(e[t],r),e[t])},ai=function(e,t){var n=t.toString;Object.defineProperty(e,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){return n.call(this===e?t:this)}})},si=new WeakMap,ui=function(e,t){return si.set(e,t)},ci=new Map([[[null===(zr=globalThis.XMLHttpRequest)||void 0===zr?void 0:zr.prototype],["abort","error","load","loadend","loadstart","progress","readystatechange","timeout"]],[[null===(qr=globalThis.MessagePort)||void 0===qr?void 0:qr.prototype],["message","messageerror"]],[[null===(Wr=globalThis.WebSocket)||void 0===Wr?void 0:Wr.prototype],["close","error","open","message"]],[[null===(Kr=globalThis.Worker)||void 0===Kr?void 0:Kr.prototype],["error","message"]],[[null===(Yr=globalThis.IDBIndex)||void 0===Yr?void 0:Yr.prototype,null===(Qr=globalThis.IDBRequest)||void 0===Qr?void 0:Qr.prototype,null===(Zr=globalThis.IDBOpenDBRequest)||void 0===Zr?void 0:Zr.prototype,null===(Jr=globalThis.IDBDatabase)||void 0===Jr?void 0:Jr.prototype,null===($r=globalThis.IDBTransaction)||void 0===$r?void 0:$r.prototype,null===(ei=globalThis.IDBCursor)||void 0===ei?void 0:ei.prototype],["abort","blocked","close","complete","error","success","upgradeneeded","versionchange"]]]),li=["MutationObserver","IntersectionObserver","ResizeObserver"],fi=function(e){return"number"!=typeof e||e<=1500},di=function(){return y((function e(){E(this,e),this._enabled=!1,this._currentContext=q}),[{key:"_bindFunction",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q,t=arguments.length>1?arguments[1]:void 0,n=this,r=function(){for(var r,i=this,o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return n.with(null!==(r=function(e){return e?function(e){return si.get(e)}(e):void 0}(this))&&void 0!==r?r:e,(function(){return t.apply(i,a)}))};return Object.defineProperty(r,"length",{enumerable:!1,configurable:!0,writable:!1,value:t.length}),r}},{key:"active",value:function(){return this._currentContext}},{key:"bind",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.active(),t=arguments.length>1?arguments[1]:void 0;return"function"==typeof t?this._bindFunction(e,t):t}},{key:"disable",value:function(){return this._enabled?(Mr.unwrap(window,"Promise"),Mr.unwrap(window,"setTimeout"),Mr.unwrap(window,"setInterval"),null!=window.setImmediate&&Mr.unwrap(window,"setImmediate"),Mr.unwrap(window,"requestAnimationFrame"),null!=window.queueMicrotask&&Mr.unwrap(window,"queueMicrotask"),Mr.unwrap(EventTarget.prototype,"addEventListener"),Mr.unwrap(EventTarget.prototype,"removeEventListener"),ci.forEach((function(e,t){t.forEach((function(t){t&&function(e,t){t.forEach((function(t){!function(e,t){var n=Object.getOwnPropertyDescriptor(e,t);n&&(Mr.unwrap(n,"get"),Mr.unwrap(n,"set"),Object.defineProperty(e,t,n))}(e,"on".concat(t))}))}(t,e)}))})),self.MessageChannel&&self.MessagePort&&(Mr.unwrap(window,"MessageChannel"),Mr.unwrap(MessagePort.prototype,"postMessage")),li.forEach((function(e){globalThis[e]&&Mr.unwrap(globalThis,e)})),this._currentContext=q,this._enabled=!1,this):this}},{key:"enable",value:function(){return this._enabled||(function(e){window.Promise&&oi(window,"Promise",(function(t){var n=function(e){function t(){return E(this,t),c(this,t,arguments)}return h(t,e),y(t)}(t);return ai(n,t),oi(n.prototype,"then",(function(t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return r[0]=e.bind(e.active(),r[0]),r[1]=e.bind(e.active(),r[1]),t.apply(this,r)}})),oi(n.prototype,"catch",(function(t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return r[0]=e.bind(e.active(),r[0]),t.apply(this,r)}})),oi(n.prototype,"finally",(function(t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return r[0]=e.bind(e.active(),r[0]),t.apply(this,r)}})),n}))}(this),function(e){oi(window,"setTimeout",(function(t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return fi(r[1])&&(r[0]=e.bind(e.active(),r[0])),t.apply(this,r)}})),oi(window,"setInterval",(function(t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return fi(r[1])&&(r[0]=e.bind(e.active(),r[0])),t.apply(this,r)}})),oi(window,"setImmediate",(function(t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return r[0]=e.bind(e.active(),r[0]),t.apply(this,r)}})),oi(window,"requestAnimationFrame",(function(t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return r[0]=e.bind(e.active(),r[0]),t.apply(this,r)}})),oi(window,"queueMicrotask",(function(t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return r[0]=e.bind(e.active(),r[0]),t.apply(this,r)}}))}(this),function(e){var t=new WeakMap,n=function(r,i){var o=Object.getOwnPropertyDescriptor(r,i);if(!o){var a=Object.getPrototypeOf(r);if(!a)return;return n(a,i)}oi(o,"get",(function(e){return function(){var n,r=null==e?void 0:e.call(this);return null!==(n=t.get(r))&&void 0!==n?n:r}})),oi(o,"set",(function(n){return function(r){var i=null;r&&(i=e.bind(e.active(),r),t.set(i,r)),n.call(this,i)}})),Object.defineProperty(r,i,o)},r=new WeakMap;oi(EventTarget.prototype,"addEventListener",(function(t){return function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];var a=i[1];if(a){var s=r.get(a);s||("function"==typeof a?s=e.bind(e.active(),a):a&&"function"==typeof a.handleEvent&&(s=Object.assign(Object.assign({},a),{handleEvent:e.bind(e.active(),a.handleEvent)}))),s&&(r.set(a,s),i[1]=s)}return t.apply(this,i)}})),oi(EventTarget.prototype,"removeEventListener",(function(e){return function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var o=n[1];if(o){var a=r.get(o);a&&(n[1]=a)}return e.apply(this,n)}})),ci.forEach((function(e,t){t.forEach((function(t){t&&function(e,t){t.forEach((function(t){n(e,"on".concat(t))}))}(t,e)}))}
2))}(this),function(e){if(self.MessageChannel&&self.MessagePort){var t=new WeakMap;oi(window,"MessageChannel",(function(e){return function(e){function n(){var e;E(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=c(this,n,[].concat(i)),t.set(e.port1,e.port2),t.set(e.port2,e.port1),e}return h(n,e),y(n)}(e)})),oi(MessagePort.prototype,"postMessage",(function(n){return function(){for(var r=t.get(this),i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e.active()&&r&&ui(r,e.active()),n.apply(this,o)}}))}}(this),function(e){li.forEach((function(t){globalThis[t]&&oi(globalThis,t,(function(n){var r=function(t){function n(){var t;E(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i[0]=e.bind(e.active(),i[0]),t=c(this,n,[].concat(i)),setTimeout((function(){ui(l(t),q)}),300),t}return h(n,t),y(n)}(n);return Object.defineProperty(r,"name",{enumerable:!1,configurable:!0,writable:!1,value:t}),ai(r,n),r}))}))}(this),this._enabled=!0,this._currentContext=q),this}},{key:"with",value:function(e,t,n){var r=this._currentContext;this._currentContext=null!=e?e:q;try{for(var i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return t.apply(n,o)}finally{this._currentContext=r}}}])}();!function(e){e.DOCUMENT_LOAD="documentLoad",e.DOCUMENT_FETCH="documentFetch",e.RESOURCE_FETCH="resourceFetch",e.PAGE_TITLE="page_title"}(ti||(ti={}));var hi,vi,pi,_i,mi,gi=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},Ei=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},Ti=function(e,t){var n=function n(r){"pagehide"!==r.type&&"hidden"!==document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},yi=function(e){addEventListener("pageshow",(function(t){t.persisted&&e(t)}),!0)},bi=function(e,t,n){var r;return function(i){t.value>=0&&(i||n)&&(t.delta=t.value-(r||0),(t.delta||void 0===r)&&(r=t.value,e(t)))}},Si=-1,Oi=function(){return"hidden"===document.visibilityState?0:1/0},wi=function(){Ti((function(e){var t=e.timeStamp;Si=t}),!0)},Ai=function(){return Si<0&&(Si=Oi(),wi(),yi((function(){setTimeout((function(){Si=Oi(),wi()}),0)}))),{get firstHiddenTime(){return Si}}},Li=function(e,t){var n,r=Ai(),i=gi("FCP"),o=function(e){"first-contentful-paint"===e.name&&(s&&s.disconnect(),e.startTime<r.firstHiddenTime&&(i.value=e.startTime,i.entries.push(e),n(!0)))},a=window.performance&&performance.getEntriesByName&&performance.getEntriesByName("first-contentful-paint")[0],s=a?null:Ei("paint",o);(a||s)&&(n=bi(e,i,t),a&&o(a),yi((function(r){i=gi("FCP"),n=bi(e,i,t),requestAnimationFrame((function(){requestAnimationFrame((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))})))},Ri=!1,ki=-1,Ni={passive:!0,capture:!0},Pi=new Date,Ci=function(e,t){hi||(hi=t,vi=e,pi=new Date,Mi(removeEventListener),Ii())},Ii=function(){if(vi>=0&&vi<pi-Pi){var e={entryType:"first-input",name:hi.type,target:hi.target,cancelable:hi.cancelable,startTime:hi.timeStamp,processingStart:hi.timeStamp+vi};_i.forEach((function(t){t(e)})),_i=[]}},xi=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){Ci(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,Ni),removeEventListener("pointercancel",r,Ni)};addEventListener("pointerup",n,Ni),addEventListener("pointercancel",r,Ni)}(t,e):Ci(t,e)}},Mi=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,xi,Ni)}))},Ui={};!function(e){e.FIRST_PAINT="firstPaint",e.FIRST_CONTENTFUL_PAINT="firstContentfulPaint",e.LARGEST_CONTENTFUL_PAINT="largestContentfulPaint",e.CUMULATIVE_LAYOUT_SHIFT="cumulativeLayoutShift",e.FIRST_INPUT_DELAY="firstInputDelay",e.TIME_TO_FIRST_BYTE="timeToFirstByte"}(mi||(mi={}));var Di,Bi={FCP:mi.FIRST_CONTENTFUL_PAINT,FID:mi.FIRST_INPUT_DELAY,TTFB:mi.TIME_TO_FIRST_BYTE,LCP:mi.LARGEST_CONTENTFUL_PAINT,CLS:mi.CUMULATIVE_LAYOUT_SHIFT},ji={"first-paint":mi.FIRST_PAINT},Hi=new Set([mi.CUMULATIVE_LAYOUT_SHIFT]),Fi=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return E(this,t),(e=c(this,t,["@opentelemetry/instrumentation-document-load","0.36.0",n])).component="document-load",e.version="1",e.moduleName=e.component,e._enabled=!1,e}return h(t,e),y(t,[{key:"init",value:function(){}},{key:"_onDocumentLoaded",value:function(){var e=this;window.setTimeout((function(){e._collectPerformance()}))}},{key:"_addResourcesSpans",value:function(e){var t,n,r=this,i=null===(n=(t=Ht).getEntriesByType)||void 0===n?void 0:n.call(t,"resource");
2i&&i.forEach((function(t){r._initResourceSpan(t,e)}))}},{key:"_collectPerformance",value:function(){var e=this,t=Array.from(document.getElementsByTagName("meta")).find((function(e){return e.getAttribute("name")===dn})),n=function(){var e,t,n={},r=null===(t=(e=Ht).getEntriesByType)||void 0===t?void 0:t.call(e,"navigation")[0];if(r)Object.values(rr).forEach((function(e){if(fr(r,e)){var t=r[e];"number"==typeof t&&(n[e]=t)}}));else{var i=Ht.timing;i&&Object.values(rr).forEach((function(e){if(fr(i,e)){var t=i[e];"number"==typeof t&&(n[e]=t)}}))}return n}(),r=t&&t.content||"";He.with(et.extract(q,{traceparent:r}),(function(){var t,r=e._startSpan(ti.DOCUMENT_LOAD,rr.FETCH_START,n);r&&(He.with(rt.setSpan(He.active(),r),(function(){var t=e._startSpan(ti.DOCUMENT_FETCH,rr.FETCH_START,n);t&&(t.setAttribute(Gt.HTTP_URL,location.href),t.setAttribute(Gt.HTTP_USER_AGENT,navigator.userAgent),He.with(rt.setSpan(He.active(),t),(function(){var r;hr(t,n),e._addCustomAttributesOnSpan(t,null===(r=e._getConfig().applyCustomAttributesOnSpan)||void 0===r?void 0:r.documentFetch),e._endSpan(t,rr.RESPONSE_END,n)})))})),r.setAttribute(Gt.HTTP_URL,location.href),r.setAttribute(Gt.HTTP_USER_AGENT,navigator.userAgent),r.setAttribute(ti.PAGE_TITLE,document.title),e._addResourcesSpans(r),dr(r,rr.FETCH_START,n),dr(r,rr.UNLOAD_EVENT_START,n),dr(r,rr.UNLOAD_EVENT_END,n),dr(r,rr.DOM_INTERACTIVE,n),dr(r,rr.DOM_CONTENT_LOADED_EVENT_START,n),dr(r,rr.DOM_CONTENT_LOADED_EVENT_END,n),dr(r,rr.DOM_COMPLETE,n),dr(r,rr.LOAD_EVENT_START,n),dr(r,rr.LOAD_EVENT_END,n),e._addCustomAttributesOnSpan(r,null===(t=e._getConfig().applyCustomAttributesOnSpan)||void 0===t?void 0:t.documentLoad),function(e,t){var n={},r=new Set(["FCP","FID","TTFB"]);"chrome"in globalThis&&(r.add("LCP"),r.add("CLS"));var i=!1,o=function(){var r,a;if(document.removeEventListener("visibilitychange",o),globalThis.removeEventListener("pagehide",o),!i){var s=null===(a=(r=Ht).getEntriesByType)||void 0===a?void 0:a.call(r,"paint");s&&s.forEach((function(e){var t=e.name,r=e.startTime;fr(ji,t)&&(n[ji[t]]=r)})),i=!0,Object.entries(n).forEach((function(t){var n=p(t,2),r=n[0],i=n[1];e[Hi.has(r)?"setAttribute":"addEvent"](r,i)})),t()}},a=function(e){r.delete(e.name),n[Bi[e.name]]=e.value,r.size||o()};if(document.addEventListener("visibilitychange",o),globalThis.addEventListener("pagehide",o),function(e,t){Ri||(Li((function(e){ki=e.value})),Ri=!0);var n,r=function(t){ki>-1&&e(t)},i=gi("CLS",0),o=0,a=[],s=function(e){if(!e.hadRecentInput){var t=a[0],r=a[a.length-1];o&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,a.push(e)):(o=e.value,a=[e]),o>i.value&&(i.value=o,i.entries=a,n())}},u=Ei("layout-shift",s);u&&(n=bi(r,i,t),Ti((function(){u.takeRecords().map(s),n(!0)})),yi((function(){o=0,ki=-1,i=gi("CLS",0),n=bi(r,i,t)})))}(a),Li(a),function(e,t){var n,r=Ai(),i=gi("FID"),o=function(e){e.startTime<r.firstHiddenTime&&(i.value=e.processingStart-e.startTime,i.entries.push(e),n(!0))},a=Ei("first-input",o);n=bi(e,i,t),a&&Ti((function(){a.takeRecords().map(o),a.disconnect()}),!0),a&&yi((function(){var r;i=gi("FID"),n=bi(e,i,t),_i=[],vi=-1,hi=null,Mi(addEventListener),r=o,_i.push(r),Ii()}))}(a),function(e,t){var n,r=Ai(),i=gi("LCP"),o=function(e){var t=e.startTime;t<r.firstHiddenTime&&(i.value=t,i.entries.push(e),n())},a=Ei("largest-contentful-paint",o);if(a){n=bi(e,i,t);var s=function(){Ui[i.id]||(a.takeRecords().map(o),a.disconnect(),Ui[i.id]=!0,n(!0))};["keydown","click"].forEach((function(e){addEventListener(e,s,{once:!0,capture:!0})})),Ti(s,!0),yi((function(r){i=gi("LCP"),n=bi(e,i,t),requestAnimationFrame((function(){requestAnimationFrame((function(){i.value=performance.now()-r.timeStamp,Ui[i.id]=!0,n(!0)}))}))}))}}(a),function(e){var t,n=gi("TTFB");t=function(){try{var t=performance.getEntriesByType("navigation")[0]||function(){var e=performance.timing,t={entryType:"navigation",startTime:0};for(var n in e)"navigationStart"!==n&&"toJSON"!==n&&(t[n]=Math.max(e[n]-e.navigationStart,0));return t}();if(n.value=n.delta=t.responseStart,n.value<0||n.value>performance.now())return;n.entries=[t],e(n)}catch(e){}},"complete"===document.readyState?setTimeout(t,0):addEventListener("load",(function(){return setTimeout(t,0)}))}(a),"function"==typeof PerformanceObserver){var s=new PerformanceObserver((function(){}));if(s.observe({type:"largest-contentful-paint",buffered:!0}
2),"function"==typeof s.takeRecords){var u=p(s.takeRecords(),1)[0];u&&(r.delete("LCP"),n[mi.LARGEST_CONTENTFUL_PAINT]=u.startTime)}}}(r,(function(){e._endSpan(r,rr.LOAD_EVENT_END,n)})))}))}},{key:"_endSpan",value:function(e,t,n){e&&(fr(n,t)?e.end(n[t]):e.end())}},{key:"_initResourceSpan",value:function(e,t){var n,r=this._startSpan(ti.RESOURCE_FETCH,rr.FETCH_START,e,t);r&&(r.setAttribute(Gt.HTTP_URL,e.name),hr(r,e),this._addCustomAttributesOnResourceSpan(r,e,null===(n=this._getConfig().applyCustomAttributesOnSpan)||void 0===n?void 0:n.resourceFetch),this._endSpan(r,rr.RESPONSE_END,e))}},{key:"_startSpan",value:function(e,t,n,r){if(fr(n,t)&&"number"==typeof n[t])return this.tracer.startSpan(e,{startTime:n[t]},r?rt.setSpan(He.active(),r):void 0)}},{key:"_waitForPageLoad",value:function(){"complete"!==window.document.readyState||this._enabled?(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded)):(this._enabled=!0,this._onDocumentLoaded())}},{key:"_getConfig",value:function(){return this._config}},{key:"_addCustomAttributesOnSpan",value:function(e,t){var n=this;t&&Br((function(){return t(e)}),(function(e){e&&n._diag.error("addCustomAttributesOnSpan",e)}),!0)}},{key:"_addCustomAttributesOnResourceSpan",value:function(e,t,n){var r=this;n&&Br((function(){return n(e,t)}),(function(e){e&&r._diag.error("addCustomAttributesOnResourceSpan",e)}),!0)}},{key:"enable",value:function(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()}},{key:"disable",value:function(){window.removeEventListener("load",this._onDocumentLoaded)}}])}(Dr);!function(e){e.EVENT_TYPE="event_type",e.TARGET_ELEMENT="target_element",e.TARGET_XPATH="target_xpath",e.HTTP_URL="http.url"}(Di||(Di={}));var Vi="0.36.0",Gi=["click"];function Xi(){return!1}var zi=function(){return"".concat(location.pathname).concat(location.search).concat(location.hash)},qi=function(e){function t(e){var n,r;return E(this,t),(n=c(this,t,["@opentelemetry/instrumentation-user-interaction",Vi,e])).version=Vi,n.moduleName="user-interaction",n._spansData=new WeakMap,n._isEnabled=!1,n._wrappedListeners=new WeakMap,n._eventsSpanMap=new WeakMap,n._eventNames=new Set(null!==(r=null==e?void 0:e.eventNames)&&void 0!==r?r:Gi),n._shouldPreventSpanCreation="function"==typeof(null==e?void 0:e.shouldPreventSpanCreation)?e.shouldPreventSpanCreation:Xi,n}return h(t,e),y(t,[{key:"init",value:function(){}},{key:"_allowEventName",value:function(e){return this._eventNames.has(e)}},{key:"_createSpan",value:function(e,t){if(e instanceof HTMLElement&&e.getAttribute&&!e.hasAttribute("disabled")&&this._allowEventName(t)){var n=mr(e,!0);try{var r=this.tracer.startSpan(t,{attributes:s(s(s(s({},Di.EVENT_TYPE,t),Di.TARGET_ELEMENT,e.tagName),Di.TARGET_XPATH,n),Di.HTTP_URL,window.location.href)},q);if(!0===this._shouldPreventSpanCreation(t,e,r))return;return this._spansData.set(r,{taskCount:0}),r}catch(e){this._diag.error("failed to start create new user interaction span",e)}}}},{key:"addPatchedListener",value:function(e,t,n,r){var i=this._wrappedListeners.get(n);i||(i=new Map,this._wrappedListeners.set(n,i));var o=i.get(t);return o||(o=new Map,i.set(t,o)),!o.has(e)&&(o.set(e,r),!0)}},{key:"removePatchedListener",value:function(e,t,n){var r=this._wrappedListeners.get(n);if(r){var i=r.get(t);if(i){var o=i.get(e);return o&&(i.delete(e),0===i.size&&(r.delete(t),0===r.size&&this._wrappedListeners.delete(n))),o}}}},{key:"_invokeListener",value:function(e,t,n){return"function"==typeof e?e.apply(t,n):e.handleEvent(n[0])}},{key:"_patchAddEventListener",value:function(){var e=this;return function(t){return function(n,r,i){if(!r)return t.call(this,n,r,i);var o=i&&"object"==S(i)&&i.once,a=this,s=function(){for(var t=this,i=arguments.length,s=new Array(i),u=0;u<i;u++)s[u]=arguments[u];var c=s[0],l=null==c?void 0:c.target;o&&e.removePatchedListener(a,n,r);var f=c&&e._eventsSpanMap.get(c),d=f||e._createSpan(l,n);if(d){c&&!f&&e._eventsSpanMap.set(c,d);var h=e._spansData.get(d),v=He.with(rt.setSpan(He.active(),d),(function(){void 0===h.currentLocation&&(h.currentLocation=zi());var n=e._invokeListener(r,t,s);return h.lastListenerEndHrTime=Zt(),n}));return c&&!f&&setTimeout((function(){h.currentLocation!==zi()&&e._updateSpanAsNavigation(d),d.end(h.lastListenerEndHrTime)}),200),v}return c instanceof UIEvent&&c.isTrusted?He.with(q,(function(){return e._invokeListener(r,t,s)})):e._invokeListener(r,this,s)};return e.addPatchedListener(this,n,r,s)?t.call(this,n,s,i):void 0}}}},{key:"_patchRemoveEventListener",value:function(){var e=this;return function(t){return function(n,r,i){var o=e.removePatchedListener(this,n,r);return o?t.call(this,n,o,i):t.call(this,n,r,i)}}}},{key:"_getPatchableEventTargets",value:function(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}},{key:"_updateSpanAsNavigation",value:function(e){e.updateName("Navigation: ".concat(zi())),e.setAttribute("new.location.href",location.href)}},{key:"enable",value:function(){var e=this;this._isEnabled||(this._isEnabled=!0,this._diag.debug("applying patch to",this.moduleName,this.version),this._getPatchableEventTargets().forEac
2h((function(t){e._wrap(t,"addEventListener",e._patchAddEventListener()),e._wrap(t,"removeEventListener",e._patchRemoveEventListener())})))}},{key:"disable",value:function(){var e=this;this._isEnabled&&(this._isEnabled=!1,this._diag.debug("removing patch from",this.moduleName,this.version),this._getPatchableEventTargets().forEach((function(t){jr(t.addEventListener)&&e._unwrap(t,"addEventListener"),jr(t.removeEventListener)&&e._unwrap(t,"removeEventListener")})))}}])}(Dr);function Wi(e,t){return Fe.warn("Timeout must be greater than 0",e),t}var Ki=function(){return y((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};E(this,e),this._sendingPromises=[],this.url=this.getDefaultUrl(t),"string"==typeof t.hostname&&(this.hostname=t.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new Dn(this._shutdown,this),this._concurrencyLimit="number"==typeof t.concurrencyLimit?t.concurrencyLimit:30,this.timeoutMillis=function(e){return"number"==typeof e?e<=0?Wi(e,1e4):e:function(){var e,t=Number(null!==(e=Mt().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)&&void 0!==e?e:Mt().OTEL_EXPORTER_OTLP_TIMEOUT);return t<=0?Wi(t,1e4):t}()}(t.timeoutMillis),this.onInit(t)}),[{key:"export",value:function(e,t){this._shutdownOnce.isCalled?t({code:Vt.FAILED,error:new Error("Exporter has been shutdown")}):this._sendingPromises.length>=this._concurrencyLimit?t({code:Vt.FAILED,error:new Error("Concurrent export limit reached")}):this._export(e).then((function(){t({code:Vt.SUCCESS})})).catch((function(e){t({code:Vt.FAILED,error:e})}))}},{key:"_export",value:function(e){var t=this;return new Promise((function(n,r){try{Fe.debug("items to be sent",e),t.send(e,n,r)}catch(e){r(e)}}))}},{key:"shutdown",value:function(){return this._shutdownOnce.call()}},{key:"forceFlush",value:function(){return Promise.all(this._sendingPromises).then((function(){}))}},{key:"_shutdown",value:function(){return Fe.debug("shutdown started"),this.onShutdown(),this.forceFlush()}}])}(),Yi=function(e){function t(e,n,r){var i;return E(this,t),(i=c(this,t,[e])).name="OTLPExporterError",i.data=r,i.code=n,i}return h(t,e),y(t)}(r(Error)),Qi=1/0,Zi=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return E(this,t),(e=c(this,t,[n]))._useXHR=!1,e._useXHR=!!n.headers||"function"!=typeof navigator.sendBeacon,e._useXHR?e._headers=Object.assign({},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return Object.entries(e).forEach((function(e){var n=p(e,2),r=n[0],i=n[1];void 0!==i?t[r]=String(i):Fe.warn('Header "'.concat(r,'" has wrong value and will be ignored'))})),t}(n.headers),ft(Mt().OTEL_EXPORTER_OTLP_HEADERS)):e._headers={},e}return h(t,e),y(t,[{key:"onInit",value:function(){}},{key:"onShutdown",value:function(){}},{key:"send",value:function(e,t,n){var r=this;if(this._shutdownOnce.isCalled)Fe.debug("Shutdown already started. Cannot send objects");else{var i=this.convert(e),o=JSON.stringify(i),a=new Promise((function(e,t){!r._useXHR&&function(e,t){var n=new Blob([e],{type:"application/json"});return n.size<Qi&&navigator.sendBeacon(t,n)?(Fe.debug("sendBeacon - can send",e),!0):(Qi=n.size,Fe.info("sendBeacon failed because the given payload was too big; try to lower your span processor limits"),!1)}(o,r.url)?e():function(e,t,n,r,i,o){var a,s,u=!1,c=setTimeout((function(){if(clearTimeout(a),u=!0,s.readyState===XMLHttpRequest.DONE){var e=new Yi("Request Timeout");o(e)}else s.abort()}),r),l=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;(s=new XMLHttpRequest).open("POST",t),Object.entries(Object.assign(Object.assign({},{Accept:"application/json","Content-Type":"application/json"}),n)).forEach((function(e){var t=p(e,2),n=t[0],r=t[1];s.setRequestHeader(n,r)})),s.send(e),s.onreadystatechange=function(){if(s.readyState===XMLHttpRequest.DONE&&!1===u)if(s.status>=200&&s.status<=299)Fe.debug("xhr success",e),i(),clearTimeout(c),clearTimeout(a);else if(s.status&&(d=s.status,[429,502,503,504].includes(d))&&r>0){var t;f*=1.5,t=s.getResponseHeader("Retry-After")?function(e){if(null==e)return-1;var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?1e3*t:-1;var n=new Date(e).getTime()-Date.now();return n>=0?n:0}(s.getResponseHeader("Retry-After")):Math.round(Math.random()*(5e3-f)+f),a=setTimeout((function(){l(r-1,f)}),t)}else{var n=new Yi("Failed to export with XHR (status: ".concat(s.status,")"),s.status);o(n),clearTimeout(c),clearTimeout(a)}var d},s.onabort=function(){if(u){var e=new Yi("Request Timeout");o(e)}clearTimeout(c),clearTimeout(a)},s.onerror=function(){if(u){var e=new Yi("Request Timeout");o(e)}clearTimeout(c),clearTimeout(a)}};l()}(o,r.url,r._headers,r.timeoutMillis,e,t)})).then(t,n);this._sendingPromises.push(a);var s=function(){var e=r._sendingPromises.indexOf(a);r._sendingPromises.splice(e,1)};a.then(s,s)}}}])}(Ki);function Ji(e){var t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function $i(e){var t;return t=Ji(e),{low:Number(BigInt.asUintN(32,t)),high:Number(BigInt.asUintN(32,t>>BigInt(32)))}}var eo="undefined"!=typeof BigInt?function(e){return Ji(e).toString()}:$t;function to(e){return e}function no(e){if(void 0!==e)return Dt(e)}var ro,io,oo,ao,so,uo={encodeHrTime:$i,encodeSpanContext:Dt,encodeOptionalSpanContext:no};function co(e){var t,n;if(void 0===e)return uo;var r=null===(t=e.useLongBits)||void 0===t||t,i=null!==(n=e.useHex)&&void 0!==n&&n;return{encodeHrTime:r?$i:eo,encodeSpanContext:i?to:Dt,encodeOptionalSpanContext:i?to:no}}function lo(e){return Object.keys(e).map((function(t){return fo(t,e[t])}))}function fo(e,t){return{key:e,value:ho(t)}}function ho(e){var t=S(e);return"string"===t?{stringValue:e}:"number"===t?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:"boolean"===t?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(ho)}}:"object"===t&&null!=e?{kvlistValue:{values:Object.entries(e).map((function(e){var t=p(e,2);return fo(t[0],t[1])}))}}:{}}function vo(e,t){var n,r=e.spanContext(),i=e.status;return{traceId:t.encodeSpanContext(r.traceId),spanId:t.encodeSpanContext(r.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:null===(n=r.traceState)||void 0===n?void 0:n.serialize(),name:e.name,kind:null==e.kind?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:lo(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map((function(e){return function(e,t){return{attributes:e.attributes?lo(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}(e,t)})),droppedEventsCount:e.droppedEventsCount,status:{code:i.code,message:i.message},links:e.links.map((function(e){return function(e,t){var n;return{attributes:e.attributes?lo(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:null===(n=e.context.traceState)||void 0===n?void 0:n.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}(e,t)})),droppedLinksCount:e.droppedLinksCount}}function po(e,t){for(var n=function(e){var t,n=new Map,r=u(e);try{for(r.s();!(t=r.n()).done;){var i=t.value,o=n.get(i.resource);o||(o=new Map,n.set(i.resource,o));var a="".concat(i.instrumentationLibrary.name,"@").concat(i.instrumentationLibrary.version||"",":").concat(i.instrumentationLibrary.schemaUrl||""),s=o.get(a);s||(s=[],o.set(a,s)),s.push(i)}}catch(e){r.e(e)}finally{r.f()}return n}(e),r=[],i=n.entries(),o=i.next();!o.done;){for(var a=p(o.value,2),s=a[0],c=[],l=a[1].values(),f=l.next();!f.done;){var d=f.value;if(d.length>0){var h=d[0].instrumentationLibrary,v=h.name,_=h.version,m=h.schemaUrl,g=d.map((function(e){return vo(e,t)}));c.push({scope:{name:v,version:_},spans:g,schemaUrl:m})}f=l.next()}var E={resource:{attributes:lo(s.attributes),droppedAttributesCount:0},scopeSpans:c,schemaUrl:void 0};
2r.push(E),o=i.next()}return r}!function(e){e[e.SPAN_KIND_UNSPECIFIED=0]="SPAN_KIND_UNSPECIFIED",e[e.SPAN_KIND_INTERNAL=1]="SPAN_KIND_INTERNAL",e[e.SPAN_KIND_SERVER=2]="SPAN_KIND_SERVER",e[e.SPAN_KIND_CLIENT=3]="SPAN_KIND_CLIENT",e[e.SPAN_KIND_PRODUCER=4]="SPAN_KIND_PRODUCER",e[e.SPAN_KIND_CONSUMER=5]="SPAN_KIND_CONSUMER"}(ro||(ro={})),function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE"}(io||(io={})),function(e){e[e.HISTOGRAM=0]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",e[e.GAUGE=2]="GAUGE",e[e.SUM=3]="SUM"}(oo||(oo={})),function(e){e[e.DROP=0]="DROP",e[e.SUM=1]="SUM",e[e.LAST_VALUE=2]="LAST_VALUE",e[e.HISTOGRAM=3]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"}(ao||(ao={})),function(e){e.COUNTER="COUNTER",e.HISTOGRAM="HISTOGRAM",e.UP_DOWN_COUNTER="UP_DOWN_COUNTER",e.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",e.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",e.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"}(so||(so={}));var _o=function(){return y((function e(t,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(e){var t=e.map((function(){return 0}));return t.push(0),{buckets:{boundaries:e,counts:t},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}(n);E(this,e),this.startTime=t,this._boundaries=n,this._recordMinMax=r,this._current=i}),[{key:"record",value:function(e){if(!Number.isNaN(e)){this._current.count+=1,this._current.sum+=e,this._recordMinMax&&(this._current.min=Math.min(e,this._current.min),this._current.max=Math.max(e,this._current.max),this._current.hasMinMax=!0);var t=function(e,t){for(var n=0,r=e.length-1;r-n>1;){var i=Math.trunc((r+n)/2);e[i]<=t?n=i:r=i-1}return e[r]<=t?r:e[n]<=t?n:-1}(this._boundaries,e);this._current.buckets.counts[t+1]+=1}}},{key:"setStartTime",value:function(e){this.startTime=e}},{key:"toPointValue",value:function(){return this._current}}])}(),mo=function(){return y((function e(t,n){E(this,e),this._boundaries=t,this._recordMinMax=n,this.kind=ao.HISTOGRAM}),[{key:"createAccumulation",value:function(e){return new _o(e,this._boundaries,this._recordMinMax)}},{key:"merge",value:function(e,t){for(var n=e.toPointValue(),r=t.toPointValue(),i=n.buckets.counts,o=r.buckets.counts,a=new Array(i.length),s=0;s<i.length;s++)a[s]=i[s]+o[s];var u=1/0,c=-1/0;return this._recordMinMax&&(n.hasMinMax&&r.hasMinMax?(u=Math.min(n.min,r.min),c=Math.max(n.max,r.max)):n.hasMinMax?(u=n.min,c=n.max):r.hasMinMax&&(u=r.min,c=r.max)),new _o(e.startTime,n.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:n.buckets.boundaries,counts:a},count:n.count+r.count,sum:n.sum+r.sum,hasMinMax:this._recordMinMax&&(n.hasMinMax||r.hasMinMax),min:u,max:c})}},{key:"diff",value:function(e,t){for(var n=e.toPointValue(),r=t.toPointValue(),i=n.buckets.counts,o=r.buckets.counts,a=new Array(i.length),s=0;s<i.length;s++)a[s]=o[s]-i[s];return new _o(t.startTime,n.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:n.buckets.boundaries,counts:a},count:r.count-n.count,sum:r.sum-n.sum,hasMinMax:!1,min:1/0,max:-1/0})}},{key:"toMetricData",value:function(e,t,n,r){return{descriptor:e,aggregationTemporality:t,dataPointType:oo.HISTOGRAM,dataPoints:n.map((function(t){var n=p(t,2),i=n[0],o=n[1],a=o.toPointValue(),s=e.type===so.UP_DOWN_COUNTER||e.type===so.OBSERVABLE_GAUGE||e.type===so.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:i,startTime:o.startTime,endTime:r,value:{min:a.hasMinMax?a.min:void 0,max:a.hasMinMax?a.max:void 0,sum:s?void 0:a.sum,buckets:a.buckets,count:a.count}}}))}}}])}(),go=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Eo,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;E(this,e),this.backing=t,this.indexBase=n,this.indexStart=r,this.indexEnd=i}return y(e,[{key:"offset",get:function(){return this.indexStart}},{key:"length",get:function(){return 0===this.backing.length||this.indexEnd===this.indexStart&&0===this.at(0)?0:this.indexEnd-this.indexStart+1}},{key:"counts",value:function(){var e=this;return Array.from({length:this.length},(function(t,n){return e.at(n)}))}},{key:"at",value:function(e){var t=this.indexBase-this.indexStart;return e<t&&(e+=this.backing.length),e-=t,this.backing.countAt(e)}},{key:"incrementBucket",value:function(e,t){this.backing.increment(e,t)}},{key:"decrementBucket",value:function(e,t){this.backing.decrement
2(e,t)}},{key:"trim",value:function(){for(var e=0;e<this.length;e++){if(0!==this.at(e)){this.indexStart+=e;break}if(e===this.length-1)return void(this.indexStart=this.indexEnd=this.indexBase=0)}for(var t=this.length-1;t>=0;t--)if(0!==this.at(t)){this.indexEnd-=this.length-t-1;break}this._rotate()}},{key:"downscale",value:function(e){this._rotate();for(var t=1+this.indexEnd-this.indexStart,n=1<<e,r=0,i=0,o=this.indexStart;o<=this.indexEnd;){var a=o%n;a<0&&(a+=n);for(var s=a;s<n&&r<t;s++)this._relocateBucket(i,r),r++,o++;i++}this.indexStart>>=e,this.indexEnd>>=e,this.indexBase=this.indexStart}},{key:"clone",value:function(){return new e(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)}},{key:"_rotate",value:function(){var e=this.indexBase-this.indexStart;0!==e&&(e>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,e),this.backing.reverse(e,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+e)),this.indexBase=this.indexStart)}},{key:"_relocateBucket",value:function(e,t){e!==t&&this.incrementBucket(e,this.backing.emptyBucket(t))}}])}(),Eo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0];E(this,e),this._counts=t}return y(e,[{key:"length",get:function(){return this._counts.length}},{key:"countAt",value:function(e){return this._counts[e]}},{key:"growTo",value:function(e,t,n){var r=new Array(e).fill(0);r.splice.apply(r,[n,this._counts.length-t].concat(_(this._counts.slice(t)))),r.splice.apply(r,[0,t].concat(_(this._counts.slice(0,t)))),this._counts=r}},{key:"reverse",value:function(e,t){for(var n=Math.floor((e+t)/2)-e,r=0;r<n;r++){var i=this._counts[e+r];this._counts[e+r]=this._counts[t-r-1],this._counts[t-r-1]=i}}},{key:"emptyBucket",value:function(e){var t=this._counts[e];return this._counts[e]=0,t}},{key:"increment",value:function(e,t){this._counts[e]+=t}},{key:"decrement",value:function(e,t){this._counts[e]>=t?this._counts[e]-=t:this._counts[e]=0}},{key:"clone",value:function(){return new e(_(this._counts))}}])}(),To=Math.pow(2,-1022);function yo(e){var t=new DataView(new ArrayBuffer(8));return t.setFloat64(0,e),((2146435072&t.getUint32(0))>>20)-1023}function bo(e){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);var n=t.getUint32(0),r=t.getUint32(4);return(1048575&n)*Math.pow(2,32)+r}function So(e,t){return 0===e||e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY||Number.isNaN(e)?e:e*Math.pow(2,t)}var Oo=function(e){function t(){return E(this,t),c(this,t,arguments)}return h(t,e),y(t)}(r(Error)),wo=function(){return y((function e(t){E(this,e),this._shift=-t}),[{key:"mapToIndex",value:function(e){return e<To?this._minNormalLowerBoundaryIndex():yo(e)+this._rightShift(bo(e)-1,52)>>this._shift}},{key:"lowerBoundary",value:function(e){var t=this._minNormalLowerBoundaryIndex();if(e<t)throw new Oo("underflow: ".concat(e," is < minimum lower boundary: ").concat(t));var n=this._maxNormalLowerBoundaryIndex();if(e>n)throw new Oo("overflow: ".concat(e," is > maximum lower boundary: ").concat(n));return So(1,e<<this._shift)}},{key:"scale",get:function(){return 0===this._shift?0:-this._shift}},{key:"_minNormalLowerBoundaryIndex",value:function(){var e=-1022>>this._shift;return this._shift<2&&e--,e}},{key:"_maxNormalLowerBoundaryIndex",value:function(){return 1023>>this._shift}},{key:"_rightShift",value:function(e,t){return Math.floor(e*Math.pow(2,-t))}}])}(),Ao=function(){return y((function e(t){E(this,e),this._scale=t,this._scaleFactor=So(Math.LOG2E,t),this._inverseFactor=So(Math.LN2,-t)}),[{key:"mapToIndex",value:function(e){if(e<=To)return this._minNormalLowerBoundaryIndex()-1;if(0===bo(e))return(yo(e)<<this._scale)-1;var t=Math.floor(Math.log(e)*this._scaleFactor),n=this._maxNormalLowerBoundaryIndex();return t>=n?n:t}},{key:"lowerBoundary",value:function(e){var t=this._maxNormalLowerBoundaryIndex();if(e>=t){if(e===t)return 2*Math.exp((e-(1<<this._scale))/this._scaleFactor);throw new Oo("overflow: ".concat(e," is > maximum lower boundary: ").concat(t))}var n=this._minNormalLowerBoundaryIndex();if(e<=n){if(e===n)return To;if(e===n-1)return Math.exp((e+(1<<this._scale))/this._scaleFactor)/2;throw new Oo("overflow: ".concat(e," is < minimum lower boundary: ").concat(n))}return Math.exp(e*this._inverseFactor)}},{key:"scale",get:function(){return this._scale}},{key:"_minNormalLowerBoundaryIndex",value:function(){return-1022<<this._scale}},{key:"_maxNormalLowerBoundaryIndex",value:function(){return(1024<<this._scale)-1}}])}(),Lo=Array.from({length:31},(function(e,t){return t>10?new Ao(t-10):new wo(t-10)}));function Ro(e){if(e>20||e<-10)throw new Oo("expected scale >= -10 && <= 20, got: ".concat(e));return Lo[e+10]}var ko=function(){function e(t,n){E(this,e),this.low=t,this.high=n}
2return y(e,null,[{key:"combine",value:function(t,n){return new e(Math.min(t.low,n.low),Math.max(t.high,n.high))}}])}(),No=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:160,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Number.POSITIVE_INFINITY,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:Number.NEGATIVE_INFINITY,c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:new go,l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:new go,f=arguments.length>10&&void 0!==arguments[10]?arguments[10]:Ro(20);E(this,e),this.startTime=t,this._maxSize=n,this._recordMinMax=r,this._sum=i,this._count=o,this._zeroCount=a,this._min=s,this._max=u,this._positive=c,this._negative=l,this._mapping=f,this._maxSize<2&&(Fe.warn("Exponential Histogram Max Size set to ".concat(this._maxSize,", changing to the minimum size of: 2")),this._maxSize=2)}return y(e,[{key:"record",value:function(e){this.updateByIncrement(e,1)}},{key:"setStartTime",value:function(e){this.startTime=e}},{key:"toPointValue",value:function(){return{hasMinMax:this._recordMinMax,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}}},{key:"sum",get:function(){return this._sum}},{key:"min",get:function(){return this._min}},{key:"max",get:function(){return this._max}},{key:"count",get:function(){return this._count}},{key:"zeroCount",get:function(){return this._zeroCount}},{key:"scale",get:function(){return this._count===this._zeroCount?0:this._mapping.scale}},{key:"positive",get:function(){return this._positive}},{key:"negative",get:function(){return this._negative}},{key:"updateByIncrement",value:function(e,t){Number.isNaN(e)||(e>this._max&&(this._max=e),e<this._min&&(this._min=e),this._count+=t,0!==e?(this._sum+=e*t,e>0?this._updateBuckets(this._positive,e,t):this._updateBuckets(this._negative,-e,t)):this._zeroCount+=t)}},{key:"merge",value:function(e){0===this._count?(this._min=e.min,this._max=e.max):0!==e.count&&(e.min<this.min&&(this._min=e.min),e.max>this.max&&(this._max=e.max)),this.startTime=e.startTime,this._sum+=e.sum,this._count+=e.count,this._zeroCount+=e.zeroCount;var t=this._minScale(e);this._downscale(this.scale-t),this._mergeBuckets(this.positive,e,e.positive,t),this._mergeBuckets(this.negative,e,e.negative,t)}},{key:"diff",value:function(e){this._min=1/0,this._max=-1/0,this._sum-=e.sum,this._count-=e.count,this._zeroCount-=e.zeroCount;var t=this._minScale(e);this._downscale(this.scale-t),this._diffBuckets(this.positive,e,e.positive,t),this._diffBuckets(this.negative,e,e.negative,t)}},{key:"clone",value:function(){return new e(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)}},{key:"_updateBuckets",value:function(e,t,n){var r=this._mapping.mapToIndex(t),i=!1,o=0,a=0;if(0===e.length?(e.indexStart=r,e.indexEnd=e.indexStart,e.indexBase=e.indexStart):r<e.indexStart&&e.indexEnd-r>=this._maxSize?(i=!0,a=r,o=e.indexEnd):r>e.indexEnd&&r-e.indexStart>=this._maxSize&&(i=!0,a=e.indexStart,o=r),i){var s=this._changeScale(o,a);this._downscale(s),r=this._mapping.mapToIndex(t)}this._incrementIndexBy(e,r,n)}},{key:"_incrementIndexBy",value:function(e,t,n){if(0!==n){if(0===e.length&&(e.indexStart=e.indexEnd=e.indexBase=t),t<e.indexStart){var r=e.indexEnd-t;r>=e.backing.length&&this._grow(e,r+1),e.indexStart=t}else if(t>e.indexEnd){var i=t-e.indexStart;i>=e.backing.length&&this._grow(e,i+1),e.indexEnd=t}var o=t-e.indexBase;o<0&&(o+=e.backing.length),e.incrementBucket(o,n)}}},{key:"_grow",value:function(e,t){var n=e.backing.length,r=e.indexBase-e.indexStart,i=n-r,o=function(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e}(t);o>this._maxSize&&(o=this._maxSize);var a=o-r;e.backing.growTo(o,i,a)}},{key:"_changeScale",value:function(e,t){for(var n=0;e-t>=this._maxSize;)e>>=1,t>>=1,n++;return n}},{key:"_downscale",value:function(e){if(0!==e){if(e<0)throw new Error("impossible change of scale: ".concat(this.scale));var t=this._mapping.scale-e;this._positive.downscale(e),this._negative.downscale(e),this._mapping=Ro(t)}}},{key:"_minScale",value:function(e){var t=Math.min(this.scale,e.scale),n=ko.combine(this._highLowAtScale(this.positive,this.scale,t),this._highLowAtScale(e.positive,e.scale,t)),r=ko.combine(this._highLowAtScale(this.negative,this.scale,t),this._highLowAtScale(e.negative,e.scale,t));return Math.min(t-this._changeScale(n.high,n.low),t-this._changeScale(r.high,r.low))}},{key:"_highLowAtScale",value:function(e,t,n){if(0===e.length)return new ko(0,-1);var r=t-n;return new ko(e.indexStart>>r,e.indexEnd>>r)}},{key:"_mergeBuckets",value:function(e,t,n,r){for(var i=n.offset,o=t.scale-r,a=0;a<n.length;a++)this._incrementIndexBy(e,i+a>>o,n.at(a))}},{key:"_diffBuckets",value:function(e,t,n,r){for(var i=n.offset,o=t.scale-r,a=0;a<n.length;a++){var s=(i+a>>o)-e.indexBase;s<0&&(s+=e.backing.length),e.decrementBucket(s,n.at(a))}e.trim()}}])}(),Po=function(){return y((function e(t,n){E(this,e),this._maxSize=t,this._recordMinMax=n,this.kind=ao.EXPONENTIAL_HISTOGRAM}),[{key:"createAccumulation",value:function(e){return new No(e,this._maxSize,this._recordMinMax)}},{key:"merge",value:function(e,t){var n=t.clone();return n.merge(e),n}},{key:"diff",value:function(e,t){var n=t.clone();return n.diff(e),n}},{key:"toMetricData",value:function(e,t,n,r){return{descriptor:e,aggregationTemporality:t,dataPointType:
2oo.EXPONENTIAL_HISTOGRAM,dataPoints:n.map((function(t){var n=p(t,2),i=n[0],o=n[1],a=o.toPointValue(),s=e.type===so.UP_DOWN_COUNTER||e.type===so.OBSERVABLE_GAUGE||e.type===so.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:i,startTime:o.startTime,endTime:r,value:{min:a.hasMinMax?a.min:void 0,max:a.hasMinMax?a.max:void 0,sum:s?void 0:a.sum,positive:{offset:a.positive.offset,bucketCounts:a.positive.bucketCounts},negative:{offset:a.negative.offset,bucketCounts:a.negative.bucketCounts},count:a.count,scale:a.scale,zeroCount:a.zeroCount}}}))}}}])}(),Co=function(){return y((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0];E(this,e),this.startTime=t,this._current=n,this.sampleTime=r}),[{key:"record",value:function(e){this._current=e,this.sampleTime=Yt(Date.now())}},{key:"setStartTime",value:function(e){this.startTime=e}},{key:"toPointValue",value:function(){return this._current}}])}(),Io=function(){return y((function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];E(this,e),this.startTime=t,this.monotonic=n,this._current=r,this.reset=i}),[{key:"record",value:function(e){this.monotonic&&e<0||(this._current+=e)}},{key:"setStartTime",value:function(e){this.startTime=e}},{key:"toPointValue",value:function(){return this._current}}])}(),xo=function(){return y((function e(t){E(this,e),this.monotonic=t,this.kind=ao.SUM}),[{key:"createAccumulation",value:function(e){return new Io(e,this.monotonic)}},{key:"merge",value:function(e,t){var n=e.toPointValue(),r=t.toPointValue();return t.reset?new Io(t.startTime,this.monotonic,r,t.reset):new Io(e.startTime,this.monotonic,n+r)}},{key:"diff",value:function(e,t){var n=e.toPointValue(),r=t.toPointValue();return this.monotonic&&n>r?new Io(t.startTime,this.monotonic,r,!0):new Io(t.startTime,this.monotonic,r-n)}},{key:"toMetricData",value:function(e,t,n,r){return{descriptor:e,aggregationTemporality:t,dataPointType:oo.SUM,dataPoints:n.map((function(e){var t=p(e,2),n=t[0],i=t[1];return{attributes:n,startTime:i.startTime,endTime:r,value:i.toPointValue()}})),isMonotonic:this.monotonic}}}])}(),Mo=function(){return y((function e(){E(this,e)}),null,[{key:"Drop",value:function(){return Fo}},{key:"Sum",value:function(){return Vo}},{key:"LastValue",value:function(){return Go}},{key:"Histogram",value:function(){return Xo}},{key:"ExponentialHistogram",value:function(){return zo}},{key:"Default",value:function(){return qo}}])}(),Uo=function(e){function t(){return E(this,t),c(this,t,arguments)}return h(t,e),y(t,[{key:"createAggregator",value:function(e){return t.DEFAULT_INSTANCE}}])}(Mo);Uo.DEFAULT_INSTANCE=new(function(){return y((function e(){E(this,e),this.kind=ao.DROP}),[{key:"createAccumulation",value:function(){}},{key:"merge",value:function(e,t){}},{key:"diff",value:function(e,t){}},{key:"toMetricData",value:function(e,t,n,r){}}])}());var Do=function(e){function t(){return E(this,t),c(this,t,arguments)}return h(t,e),y(t,[{key:"createAggregator",value:function(e){switch(e.type){case so.COUNTER:case so.OBSERVABLE_COUNTER:case so.HISTOGRAM:return t.MONOTONIC_INSTANCE;default:return t.NON_MONOTONIC_INSTANCE}}}])}(Mo);Do.MONOTONIC_INSTANCE=new xo(!0),Do.NON_MONOTONIC_INSTANCE=new xo(!1);var Bo=function(e){function t(){return E(this,t),c(this,t,arguments)}return h(t,e),y(t,[{key:"createAggregator",value:function(e){return t.DEFAULT_INSTANCE}}])}(Mo);Bo.DEFAULT_INSTANCE=new(function(){return y((function e(){E(this,e),this.kind=ao.LAST_VALUE}),[{key:"createAccumulation",value:function(e){return new Co(e)}},{key:"merge",value:function(e,t){var n=en(t.sampleTime)>=en(e.sampleTime)?t:e;return new Co(e.startTime,n.toPointValue(),n.sampleTime)}},{key:"diff",value:function(e,t){var n=en(t.sampleTime)>=en(e.sampleTime)?t:e;return new Co(t.startTime,n.toPointValue(),n.sampleTime)}},{key:"toMetricData",value:function(e,t,n,r){return{descriptor:e,aggregationTemporality:t,dataPointType:oo.GAUGE,dataPoints:n.map((function(e){var t=p(e,2),n=t[0],i=t[1];return{attributes:n,startTime:i.startTime,endTime:r,value:i.toPointValue()}}))}}}])}());var jo=function(e){function t(){return E(this,t),c(this,t,arguments)}return h(t,e),y(t,[{key:"createAggregator",value:function(e){return t.DEFAULT_INSTANCE}}])}(Mo);jo.DEFAULT_INSTANCE=new mo([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0);var Ho=function(e){function t(e){var n,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(E(this,t),(n=c(this,t))._recordMinMax=r,null==e)throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");e=(e=e.concat()).sort((function(e,t){return e-t}));var i=e.lastIndexOf(-1/0),o=e.indexOf(1/0);return-1===o&&(o=void 0),n._boundaries=e.slice(i+1,o),l(n)}return h(t,e),y(t,[{key:"createAggregator",value:function(e){return new mo(this._boundaries,this._recordMinMax)}}])}(Mo),Fo=new Uo,Vo=new Do,Go=new Bo,Xo=new jo,zo=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:160,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return E(this,t),(e=c(this,t))._maxSize=n,e._recordMinMax=r,e}return h(t,e),y(t,[{key:"createAggregator",value:function(e){return new Po(this._maxSize,this._recordMinMax)}}])}(Mo)),qo=new(function(e){function t(){return E(this,t),c(this,t,arguments)}return h(t,e),y(t,[{key:"_resolve",value:function(e){switch(e.type){case so.COUNTER:case so.UP_DOWN_COUNTER:case so.OBSERVABLE_COUNTER:case so.OBSERVABLE_UP_DOWN_COUNTER:return Vo;case so.OBSERVABLE_GAUGE:return Go;case so.HISTOGRAM:return e.advice.explicitBucketBoundaries?new Ho(e.advice.explicitBucketBoundaries):Xo}
2return Fe.warn("Unable to recognize instrument type: ".concat(e.type)),Fo}},{key:"createAggregator",value:function(e){return this._resolve(e).createAggregator(e)}}])}(Mo));function Wo(e,t){var n=function(e){var t,n=new Map,r=u(e);try{for(r.s();!(t=r.n()).done;){var i=t.value,o=i.resource,a=i.instrumentationScope,s=a.name,c=a.version,l=void 0===c?"":c,f=a.schemaUrl,d=void 0===f?"":f,h=n.get(o);h||(h=new Map,n.set(o,h));var v="".concat(s,"@").concat(l,":").concat(d),p=h.get(v);p||(p=[],h.set(v,p)),p.push(i)}}catch(e){r.e(e)}finally{r.f()}return n}(e);return Array.from(n,(function(e){var n=p(e,2),r=n[0],i=n[1];return{resource:{attributes:lo(r.attributes),droppedAttributesCount:0},scopeLogs:Array.from(i,(function(e){var n=p(e,2)[1],r=n[0].instrumentationScope,i=r.name,o=r.version,a=r.schemaUrl;return{scope:{name:i,version:o},logRecords:n.map((function(e){return function(e,t){var n,r,i;return{timeUnixNano:t.encodeHrTime(e.hrTime),observedTimeUnixNano:t.encodeHrTime(e.hrTimeObserved),severityNumber:e.severityNumber,severityText:e.severityText,body:ho(e.body),attributes:Ko(e.attributes),droppedAttributesCount:e.droppedAttributesCount,flags:null===(n=e.spanContext)||void 0===n?void 0:n.traceFlags,traceId:t.encodeOptionalSpanContext(null===(r=e.spanContext)||void 0===r?void 0:r.traceId),spanId:t.encodeOptionalSpanContext(null===(i=e.spanContext)||void 0===i?void 0:i.spanId)}}(e,t)})),schemaUrl:a}})),schemaUrl:void 0}}))}function Ko(e){return Object.keys(e).map((function(t){return fo(t,e[t])}))}var Yo="v1/traces",Qo="http://localhost:4318/".concat(Yo),Zo=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return E(this,t),(e=c(this,t,[n]))._headers=Object.assign(e._headers,ft(Mt().OTEL_EXPORTER_OTLP_TRACES_HEADERS)),e}return h(t,e),y(t,[{key:"convert",value:function(e){return function(e){return{resourceSpans:po(e,co({useHex:!0,useLongBits:!1}))}}(e)}},{key:"getDefaultUrl",value:function(e){return"string"==typeof e.url?e.url:Mt().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length>0?function(e){try{var t=new URL(e);return""===t.pathname&&(t.pathname=t.pathname+"/"),t.toString()}catch(t){return Fe.warn("Could not parse export URL: '".concat(e,"'")),e}}(Mt().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT):Mt().OTEL_EXPORTER_OTLP_ENDPOINT.length>0?(t=Mt().OTEL_EXPORTER_OTLP_ENDPOINT,n=Yo,t.endsWith("/")||(t+="/"),t+n):Qo;var t,n}}])}(Zi),Jo=function(){return y((function e(t){E(this,e),this._exporter=t}),[{key:"export",value:function(e,t){var n,r=1e3*(n=Zt())[0]+n[1]/1e6;e.forEach((function(e){e.resource.attributes["sumologic.telemetry.sdk.export_timestamp"]=r})),this._exporter.export(e,t)}},{key:"shutdown",value:function(){return er(this,void 0,void 0,a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._exporter.shutdown());case 1:case"end":return e.stop()}}),e,this)})))}}])}(),$o=["click","dblclick","submit","reset","pause","play","dragstart","dragend","drop"],ea="root_span.operation",ta="root_span.http.url",na="xhr.is_root_span",ra="http.action_type",ia="object"==("undefined"==typeof window?"undefined":S(window))&&null!=window,oa="object"==("undefined"==typeof document?"undefined":S(document))&&null!=document,aa=function(e){return e.name.startsWith("HTTP ")&&e.kind===Le.CLIENT},sa=function(e){var t;if(e)return"documentLoad"===(t=e).name&&"@opentelemetry/instrumentation-document-load"===t.instrumentationLibrary.name?"document_loads":e.attributes[na]?function(e){return e.name.startsWith("Navigation: ")&&"@opentelemetry/instrumentation-user-interaction"===e.instrumentationLibrary.name}(e)?"route_changes":"xhr_requests":void 0},ua=function(e){return e.attributes["new.location.href"]||e.attributes["location.href"]},ca="document.visibilityState",la={visible:"pageshow",hidden:"pagehide"},fa=[],da=oa?null===document||void 0===document?void 0:document.visibilityState:null,ha=da,va=function(){var e=null===document||void 0===document?void 0:document.visibilityState;if(ha!==e){ha=e;var t=Zt();fa.push({timestampInNanoseconds:$t(t),timestampInHrTime:t,state:e}),fa.length>100&&fa.shift()}};oa&&ia&&(null===document||void 0===document||document.addEventListener("visibilitychange",(function(){va()})),null===window||void 0===window||window.addEventListener("pagehide",(function(){va()})),null===window||void 0===window||window.addEventListener("pageshow",(function(){va()})));var pa,_a=1e7,ma=[],ga=[],Ea=function(e,t,n){return e+_a>=t&&e-_a<=n},Ta=function(e,t){e.parentSpanId=t.spanContext().spanId,e.spanContext().traceId=t.spanContext().traceId},ya={},ba=[],Sa=new WeakMap,Oa=function(e){return ya[e.spanContext().traceId]},wa=function(e){return e.name.startsWith("HTTP ")&&e.kind===Le.CLIENT},Aa=function(e){return"@opentelemetry/instrumentation-long-task"===e.instrumentationLibrary.name},La=function(e,t){var n=ua(t);if(e.attributes[ea]=t.name,n&&(e.attributes[ta]=n),Aa(e)){var r=sa(t);r&&(e.attributes[ra]=r)}};!function(e){e[e.DROP_ROOT_SPAN=0]="DROP_ROOT_SPAN"}(pa||(pa={}));var Ra,ka=[function(e,t,n){if(n.shouldDropSingleUserInteractionTraces&&"@opentelemetry/instrumentation-user-interaction"===e.instrumentationLibrary.name&&1===t.length)return pa.DROP_ROOT_SPAN},function(e,t){var n=t.filter((function(e){return"@opentelemetry/instrumentation-long-task"===e.instrumentationLibrary.name&&"longtask"===e.name}));if(n.length>0){var r=n.map((function(e){return $t(e.duration)})).reduce((function(e,t){return e+t}),0);e.attributes["http.longtasks_sum"]=r}},function(e,t){var n=t.filter(aa).sort((function(e,t){return $t(e.startTime)-$t(t.startTime)}));if(n.length){var r=p(n,1)[0],i=n[n.length-1];e.attributes["http.time_to_first_xhr"]=$t(r.startTime)-$t(e.startTime),e.attributes["http.time_to_last_xhr"]=$t(i.endTime)-$t(e.startTime);var o=Math.max.apply(Math,_(t.map((function(e){return $t(e.endTime)}))));e.attributes["http.time_to_xhr_processing_end"]=o-$t(e.startTime);var a=[];
2n.forEach((function(e){var t=$t(e.startTime),n=$t(e.endTime),r=a[a.length-1];!r||t>r[1]?a.push([t,n]):n>r[1]&&(r[1]=n)})),e.attributes["http.time_in_xhr_calls"]=a.reduce((function(e,t){var n=p(t,2),r=n[0];return e+(n[1]-r)}),0)}}],Na={},Pa="sumoLogicOpenTelemetryRumSessionId",Ca=function(e){var t=e.sessionId,n=e.lastActivityTimestamp;document.cookie="".concat(Pa,"=").concat(t,"-").concat(n,"; path=/")},Ia=new(y((function e(){E(this,e),this.generateTraceId=jt(16),this.generateSpanId=jt(8)})));oa&&(Ra=function(){var e=document.cookie.split("; ").find((function(e){return e.startsWith("".concat(Pa,"="))}));if(e){var t=p(e.split("=")[1].split("-"),2),n=t[0],r=t[1];return{sessionId:n,lastActivityTimestamp:parseInt(r,10)}}}());var xa,Ma,Ua=function(){var e=Date.now();if(Ra){var t=e-Ra.lastActivityTimestamp;t>3e5?Ra=void 0:t>3e4&&(Ra.lastActivityTimestamp=e,Ca(Ra))}return Ra||(Ra={sessionId:Ia.generateTraceId(),lastActivityTimestamp:e},Ca(Ra)),Ra.sessionId},Da=function(e){function t(e,n){var r,i,o;return E(this,t),(r=c(this,t,[e,n])).shouldCollectSessionId=null===(i=n.collectSessionId)||void 0===i||i,r.shouldDropSingleUserInteractionTraces=null===(o=n.dropSingleUserInteractionTraces)||void 0===o||o,r.getOverriddenServiceName=n.getOverriddenServiceName,r.defaultServiceName=n.defaultServiceName,r.traceProcessor=function(e){var t=function(){Object.values(Na).forEach((function(e){n(e)}))};document.addEventListener("visibilitychange",(function(){t()})),window.addEventListener("pagehide",(function(){t()}));var n=function(t){var n=t.traceId,r=t.rootSpan,i=t.send,o=t.spans;if(delete Na[n],r&&i){var a=!0;ka.forEach((function(t){t(r,o,e)===pa.DROP_ROOT_SPAN&&(a=!1)})),a&&i()}},r=function(e){clearTimeout(e.timeout),e.timeout=setTimeout((function(){n(e)}),3e4)};return{onStart:function(e,t){var n=e.spanContext().traceId,i=Na[n];i||(i={traceId:n,timeout:-1,spans:[]},Na[n]=i),e.parentSpanId||i.rootSpan||(i.rootSpan=e),r(i)},onEnd:function(e,t){var n=!0,i=e,o=i.spanContext().traceId,a=Na[o];a&&(a.spans.push(i),a.rootSpan===i&&(n=!1,a.send=function(){t(e)}),r(a)),n&&t(e)}}}(l(r)),r}return h(t,e),y(t,[{key:"onStart",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:q;(function(e){if(oa&&null!==da){e.setAttribute(ca,da);for(var t=$t(e.startTime),n=fa.length-1;n>=0;n-=1){var r=fa[n],i=r.timestampInNanoseconds,o=r.state;if(i<=t){e.setAttribute(ca,o);break}}}})(e),function(e){var t=e.parentSpanId;if(wa(e)&&t){var n=Oa(e);n&&(n.attributes[na]=!0)}if(!t){var r=e.spanContext().traceId;if(ya[r]=e,ba.push(r),ba.length>50){var i=ba.shift();delete ya[i]}}}(e),this.traceProcessor.onStart(e,n),this.shouldCollectSessionId&&function(e){oa&&e.setAttribute("rum.session_id",Ua())}(e),function(e,t,n){var r,i=null===(r=null==n?void 0:n.getOverriddenServiceName)||void 0===r?void 0:r.call(n,e);void 0!==i&&(e.setAttribute(Xt.SERVICE_NAME,i),e.setAttribute("default.service.name",n.defaultServiceName))}(e,0,{getOverriddenServiceName:this.getOverriddenServiceName,defaultServiceName:this.defaultServiceName}),e.setAttribute("location.href",location.href),i(t,"onStart",this,3)([e,n])}},{key:"onEnd",value:function(e){var n=this;(function(e){for(var t=e,n=$t(t.startTime),r=e.parentSpanId?$t(t.endTime):1/0,i=fa.length-1;i>=0;i-=1){var o=fa[i],a=o.timestampInNanoseconds,s=o.timestampInHrTime,u=o.state;if(a<n)break;a>=n&&a<=r&&(t.events.push({name:la[u],attributes:void 0,time:s}),"hidden"===u&&(t.attributes[ca]=u))}})(e),function(e,t){if("@opentelemetry/instrumentation-long-task"===e.instrumentationLibrary.name){if(!e.parentSpanId){var n=function(e){for(var t=$t(e),n=ma.length-1;n>=0;n-=1){var r=ma[n];if(Ea(t,$t(r.startTime),$t(r.endTime)))return r}}(e.startTime);if(!n)return ga.push(e),void(ga.length>10&&ga.shift());Ta(e,n)}}else ma.push(e),ma.length>100&&ma.shift(),function(e,t){for(var n=$t(e.startTime),r=$t(e.endTime),i=ga.length-1;i>=0;i-=1){var o=ga[i];Ea($t(o.startTime),n,r)&&(ga.splice(i,1),Ta(o,e),t(o))}}(e,t);t(e)}(e,(function(e){(function(e){var t=e,n=Sa.get(t);n&&n.forEach((function(e){return La(e,t)}));var r=wa(t),i=Aa(t);if(e.parentSpanId&&(r||i)){var o=Oa(t);
2if(o&&(La(t,o),!o.ended)){var a=Sa.get(o);a?a.push(t):Sa.set(o,[t])}}})(e),n.traceProcessor.onEnd(e,(function(e){i(t,"onEnd",n,3)([e])}))}))}}])}(Yn),Ba="0.36.0",ja="longtask",Ha=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return E(this,t),(e=c(this,t,["@opentelemetry/instrumentation-long-task",Ba,n])).version=Ba,e}return h(t,e),y(t,[{key:"init",value:function(){}},{key:"isSupported",value:function(){return!("undefined"==typeof PerformanceObserver||!PerformanceObserver.supportedEntryTypes)&&PerformanceObserver.supportedEntryTypes.includes(ja)}},{key:"_createSpanFromEntry",value:function(e){var t=this.tracer.startSpan(ja,{startTime:Zt(e.startTime)});if(this._config.observerCallback)try{this._config.observerCallback(t,{longtaskEntry:e})}catch(e){Fe.error("longtask instrumentation: observer callback failed",e)}t.setAttribute("http.url",location.href),t.setAttribute("longtask.name",e.name),t.setAttribute("longtask.entry_type",e.entryType),t.setAttribute("longtask.duration",e.duration),Array.isArray(e.attribution)&&e.attribution.forEach((function(n,r){var i=e.attribution.length>1?"longtask.attribution[".concat(r,"]"):"longtask.attribution";t.setAttribute("".concat(i,".name"),n.name),t.setAttribute("".concat(i,".entry_type"),n.entryType),t.setAttribute("".concat(i,".start_time"),n.startTime),t.setAttribute("".concat(i,".duration"),n.duration),t.setAttribute("".concat(i,".container_type"),n.containerType),t.setAttribute("".concat(i,".container_src"),n.containerSrc),t.setAttribute("".concat(i,".container_id"),n.containerId),t.setAttribute("".concat(i,".container_name"),n.containerName)})),t.end(Zt(e.startTime+e.duration))}},{key:"enable",value:function(){var e=this;this.isSupported()?this._observer||(this._observer=new PerformanceObserver((function(t){t.getEntries().forEach((function(t){return e._createSpanFromEntry(t)}))})),this._observer.observe({type:ja,buffered:!0})):this._diag.debug("Environment not supported")}},{key:"disable",value:function(){this._observer&&(this._observer.disconnect(),this._observer=void 0)}}])}(Dr),Fa="4.6.0",Va=1/0,Ga=function(){return y((function e(t){var n=this,r=t.resource,i=t.attributes,o=t.collectorUrl,a=t.maxQueueSize,s=t.scheduledDelayMillis;E(this,e),this.onVisibilityChange=function(){"hidden"===document.visibilityState&&n.export()},this.onPageHide=function(){n.export()}
2,this.recordCustomError=function(e,t){n.recordLog({type:"customError",message:e,attributes:t})},this.resource=r,this.defaultAttributes=i,this.collectorUrl=o,this.maxQueueSize=a,this.scheduledDelayMillis=s,this.logs=[]}),[{key:"enable",value:function(){null!=document&&(this.disable(),document.addEventListener("visibilitychange",this.onVisibilityChange),document.addEventListener("pagehide",this.onPageHide))}},{key:"disable",value:function(){document.removeEventListener("visibilitychange",this.onVisibilityChange),document.removeEventListener("pagehide",this.onPageHide)}},{key:"exportWhenNeeded",value:function(){var e=this;this.logs.length>=this.maxQueueSize?this.export():void 0===this.timer&&(this.timer=Number(setTimeout((function(){return e.export()}),this.scheduledDelayMillis)))}},{key:"recordLog",value:function(e){var t,n=Object.assign(Object.assign({},this.defaultAttributes),{type:e.type,"http.url":location.href}),r=rt.getSpan(He.active());if(r&&function(e){return"name"in e&&"instrumentationLibrary"in e}(r)){var i=null===(t=function(e){var t=Na[e];if(t)return{rootSpan:t.rootSpan,spans:t.spans}}(r.spanContext().traceId))||void 0===t?void 0:t.rootSpan;if(i){n[ea]=i.name;var o=ua(i);o&&(n[ta]=o);var a=sa(i);a&&(n[ra]=a)}}e.element&&(n["element.xpath"]=e.element.xpath),e.error&&(n["error.name"]=e.error.name,n["error.message"]=e.error.message,e.error.stack&&(n["error.stack"]=e.error.stack)),e.arguments&&(n.arguments=e.arguments),e.attributes&&(n=Object.assign(Object.assign({},n),e.attributes));var s=Zt();this.logs.push({hrTime:s,hrTimeObserved:s,resource:this.resource,severityNumber:ur.ERROR,attributes:n,body:e.message,droppedAttributesCount:0,instrumentationScope:{name:"@sumologic/opentelemetry-rum",version:Fa},spanContext:r?{traceId:r.spanContext().traceId,spanId:r.spanContext().spanId,traceFlags:re.NONE}:void 0}),this.exportWhenNeeded()}},{key:"export",value:function(){clearTimeout(this.timer),this.timer=void 0;var e=this.logs;if(e.length){this.logs=[];var t=JSON.stringify({resourceLogs:Wo(e,co({useHex:!0,useLongBits:!1}))});!function(e,t){var n=new Blob([t],{type:"application/json"});(n.size>=Va||!navigator.sendBeacon(e,n))&&(Va=n.size,fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:t}))}(this.collectorUrl,t)}}}])}(),Xa=function(e,t){return e.length>t?"".concat(e.slice(0,t),"..."):e},za=function(e){return e instanceof Error?{name:e.name,message:e.message,stack:e.stack?Xa(e.stack,5e3):void 0}:void 0},qa=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if("string"==typeof e){var n=Xa(e,500);return t>0?'"'.concat(n,'"'):n}return Array.isArray(e)?t>0?"...":"[".concat(e.map((function(e){return qa(e,t+1)})).join(", "),"]"):e instanceof Error?qa({name:e.name,message:e.message},t):null!=e&&"object"==S(e)?t>0?"...":"{ ".concat(Object.getOwnPropertyNames(e).map((function(n){return"".concat(n,": ").concat(qa(e[n],t+1))})).join(", ")," }"):String(e)},Wa=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set,n=!t.has(e);if(t.add(e),Array.isArray(e))return e.map((function(e){return Wa(e,t)}));if(null!=e&&"object"==S(e)){var r={};return Object.getOwnPropertyNames(e).forEach((function(i){var o=e[i];r[i]=t.has(o)&&(o!==e||n)?"[Circular]":Wa(o)})),r}return e},Ka=function(){return y((function e(t){var n=this,r=t.exporter;E(this,e),this.isEnabled=!1,this.onError=function(e){n.exporter.recordLog({type:"uncaughtException",message:e.message,error:za(e.error)})},this.onUnhandledRejection=function(e){var t=e.reason;if(t){var r=za(t);n.exporter.recordLog({type:"unhandledRejection",message:r?"Unhandled rejection ".concat(t):String(t),error:r})}},this.onDocumentError=function(e){var t=e.target;if(t){var r=mr(t);r&&n.exporter.recordLog({type:"documentError",message:"Uncaught error in element ".concat(r),element:{xpath:r}})}},this.onConsoleError=function(e){var t=e.find(za),r=e.length>3||e.find((function(e){return null!=e&&"object"==S(e)&&!(e instanceof Error)}))?e.map((function(e){return Wa(e)})):void 0;n.exporter.recordLog({type:"consoleError",message:e.map((function(e){return qa(e)})).join(" "),arguments:r,error:t})},this.exporter=r;var i=console.error;console.error=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];n.isEnabled&&n.onConsoleError(t),i.apply(console,t)}}),[{key:"enable",value:function(){this.disable(),window.addEventListener("error",this.onError),window.addEventListener("unhandledrejection",this.onUnhandledRejection),document.documentElement.addEventListener("error",this.onDocumentError,{capture:!0}),this.isEnabled=!0}},{key:"disable",value:function(){window.removeEventListener("error",this.onError),window.removeEventListener("unhandledrejection",this.onUnhandledRejection),document.documentElement.removeEventListener("error",this.onDocumentError,{capture:!0}),this.isEnabled=!1}}])}(),Ya=function(e){return"number"==typeof e?e:null!=e&&Number.isFinite(+e)?+e:void 0},Qa="object"==("undefined"==typeof window?"undefined":S(window))&&null!=window;Qa&&(window.sumoLogicOpenTelemetryRum=window.sumoLogicOpenTelemetryRum||{},(Ma=new di).enable());var Za=function(e){var t,n=e.collectionSourceUrl,r=e.authorizationToken,i=e.serviceName,o=e.applicationName,a=e.deploymentEnvironment,u=e.defaultAttributes,c=e.samplingProbability,l=void 0===c?1:c,f=e.bufferMaxSpans,d=void 0===f?2048:f,h=e.maxExportBatchSize,v=void 0===h?50:h,p=e.bufferTimeout,m=void 0===p?2e3:p,g=e.ignoreUrls,E=void 0===g?[]:g,T=e.propagateTraceHeaderCorsUrls,y=void 0===T?[]:T,b=e.collectSessionId,S=e.dropSingleUserInteractionTraces,O=e.collectErrors,w=void 0===O||O,A=e.userInteractionElementNameLimit,L=void 0===A?20:A,R=e.getOverriddenServiceName;if(Qa){if(!n)throw new Error("collectionSourceUrl needs to be defined to initialize Sumo Logic OpenTelemetry RUM");var k=null!==(t=Ya(l))&&void 0!==t?t:1,N=null!=i?i:"unknown",P=s(s({},Xt.SERVICE_NAME,N),"sumologic.rum.version",Fa);o&&(P.application=o),a&&(P[Xt.DEPLOYMENT_ENVIRONMENT]=a);var C=new tr(P),I=C.merge(new tr(Object.assign(Object.assign({},u),{"sampling.probability":k}))),x=new lr({resource:I,sampler:new Vn(k)}),M=new an({propagators:[new pn,new ht]});x.register({contextManager:Ma,propagator:M});var U=Object.assign({},u),D=function(e){var t=new URL(e);return t.pathname=t.pathname.replace(/\/v1\/(traces|metrics|logs)\/?$/,""),t.pathname.endsWith("/")||(t.pathname+="/"),t.href}(n),B=new Zo({url:"".concat(D,"v1/traces"),headers:r?{Authorization:r}:void 0}),j=new Jo(B);x.addSpanProcessor(new Da(j,{maxQueueSize:d,maxExportBatchSize:v,scheduledDelayMillis:m,collectSessionId:b,dropSingleUserInteractionTraces:S,getOverriddenServiceName:R,defaultServiceName:N}));var H,F=C.merge(new tr(s({},Gt.HTTP_USER_AGENT,navigator.userAgent))),V=new Ga({resource:F,attributes:U,collectorUrl:"".concat(D,"v1/logs"),maxQueueSize:d,scheduledDelayMillis:m}),G=w?new Ka({exporter:V}):void 0,X=function(){H&&(H(),null==G||G.disable(),V.disable(),H=void 0)},z=function(){X(),V.enable(),null==G||G.enable(),H=Lr({tracerProvider:x,instrumentations:[new Ha({enabled:!1}),new Fi({enabled:!1}),new qi({enabled:!1,eventNames:$o,shouldPreventSpanCreation:function(e,t,n){var r=function(e,t,n){for(var r,i="",o=t;o&&!i;)i=(i=o.getAttribute("aria-label")||o.id||o.textContent||"").trim(),o=o.parentElement;if(i){var a=null!==(r=Ya(n))&&void 0!==r?r:20;return a>0&&i.length>a&&(i="".concat(i.slice(0,a-3),"...")),"".concat(e," on '").concat(i,"'")}}(e,t,L);return r&&n.updateName(r),!1}}
2),new Gr({enabled:!1,propagateTraceHeaderCorsUrls:y,ignoreUrls:[n].concat(_(E))}),new ii({enabled:!1,propagateTraceHeaderCorsUrls:y,ignoreUrls:E})]})},q=x.getTracer("@sumologic/opentelemetry-rum");z();var W={readyListeners:[],onReady:function(e){e()},api:ot,tracer:q,registerInstrumentations:z,disableInstrumentations:X,setDefaultAttribute:function(e,t){x.resource.attributes[e]=t,U[e]=t},getCurrentSessionId:Ua,recordError:V.recordCustomError};return Qa&&Object.assign(window.sumoLogicOpenTelemetryRum,W),W}};if(Qa){window.sumoLogicOpenTelemetryRum.initialize=Za;var Ja=null===(xa=window.sumoLogicOpenTelemetryRum)||void 0===xa?void 0:xa.readyListeners;Array.isArray(Ja)&&Ja.forEach((function(e){return e()}))}var $a=function(e){if(e)try{return JSON.parse(e)}catch(e){return}},es=function(e){var t;return null===(t=$a(e)||function(e){if("string"==typeof e)return e.split(",").map((function(e){return e.trim()}))}(e))||void 0===t?void 0:t.map((function(e){return new RegExp(e)}))};if("object"==("undefined"==typeof document?"undefined":S(document))&&null!=document&&document.currentScript&&document.currentScript.dataset.collectionSourceUrl){var ts=document.currentScript.dataset,ns=ts.collectionSourceUrl,rs=ts.authorizationToken,is=ts.serviceName,os=ts.applicationName,as=ts.defaultAttributes,ss=ts.samplingProbability,us=ts.bufferMaxSpans,cs=ts.bufferTimeout,ls=ts.ignoreUrls,fs=ts.propagateTraceHeaderCorsUrls;window.opentelemetry=Za({collectionSourceUrl:ns,authorizationToken:rs,serviceName:is,applicationName:os,defaultAttributes:$a(as),samplingProbability:Ya(ss),bufferMaxSpans:Ya(us),bufferTimeout:Ya(cs),ignoreUrls:es(ls),propagateTraceHeaderCorsUrls:es(fs)||[/.*/]})}t.n=Za}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var r=n(16),i={sampleRate:.5,serviceName:document.location.hostname,collectorUrl:"https://rum-collectors.us2.sumologic.com/receiver/v1/rum/ZaVnC4dhaV2bNPtG9wOlfFnUuO7tGbv2BIQACgjn4u01aJ3qkDZ8CvBpie0pPbBebpShyVffRPLBlqqqK9TcHv_IjhxTvhw_2IEEhIopdDN9iRacrQQt0Q=="},o=!1,a={register:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t=e.sampleRate,n=void 0===t?i.sampleRate:t,a=e.serviceName,s=void 0===a?i.serviceName:a,u=e.collectorUrl,c=void 0===u?i.collectorUrl:u;if(o||window.cjOpenTelemetry)return window.cjOpenTelemetry;var l=(0,r.n)({collectionSourceUrl:c,applicationName:"cjam",serviceName:s,samplingProbability:n,propagateTraceHeaderCorsUrls:[/^https:\/\/.*\.cj\.com\/.*/],ignoreUrls:[/^https:\/\/signin\.cj\.com\/.*/,/^https:\/\/staging-signin\.cj\.com\/.*/,/^https:\/\/id\.api\.cj\.com\/.*/,/.*\/static\/.*/]});return o=!0,l},isRegistered:function(){return o}};window.OpenTelemetry=a}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.