@dash0/sdk-web 0.18.3 → 0.18.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dash0.js CHANGED
@@ -1,2 +1,2 @@
1
- function t(){}function e(t){return t}var n={debug:0,info:1,warn:2,error:3},r=n.warn;function i(t){var e;r=null!==(e=n[t])&&void 0!==e?e:n.warn}var o=c("info"),a=c("warn"),u=c("error"),s=c("debug");function c(e){if("undefined"!=typeof console&&console[e]&&"function"==typeof console[e].apply){var i=n[e];return function(){i>=r&&console[e].apply(console,arguments)}}return t}var l=Object.prototype.hasOwnProperty;function f(t,e){return l.call(t,e)}var d="undefined"!=typeof window?window:void 0,v=null==d?void 0:d.document,p=null==d?void 0:d.navigator,h="undefined"!=typeof location?location:void 0,m=(null==d?void 0:d.performance)||(null==d?void 0:d.webkitPerformance)||(null==d?void 0:d.msPerformance)||(null==d?void 0:d.mozPerformance);null==d||d.encodeURIComponent;var y=null==d?void 0:d.fetch,g=function(){try{var t;return null!==(t=null==d?void 0:d.localStorage)&&void 0!==t?t:null}catch(t){return null}}(),b=function(){try{var t;return null!==(t=null==d?void 0:d.sessionStorage)&&void 0!==t?t:null}catch(t){return null}}(),T=Array(32);function E(t){for(var e=0;e<2*t;e++)T[e]=Math.floor(16*Math.random())+48,T[e]>=58&&(T[e]+=39);return String.fromCharCode.apply(null,T.slice(0,2*t))}function w(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)}var S=null!=g&&"function"==typeof g.getItem&&"function"==typeof g.setItem;function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function O(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function I(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){O(o,r,i,a,u,"next",t)}function u(t){O(o,r,i,a,u,"throw",t)}a(void 0)}))}}function N(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function C(t,e,n){return e&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,j(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function L(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=U(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function R(t,e,n){return(e=j(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function x(){x=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),u=new R(r||[]);return i(a,"_invoke",{value:I(t,n,u)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d="suspendedStart",v="suspendedYield",p="executing",h="completed",m={};function y(){}function g(){}function b(){}var T={};c(T,a,(function(){return this}));var E=Object.getPrototypeOf,w=E&&E(E(_([])));w&&w!==n&&r.call(w,a)&&(T=w);var S=b.prototype=y.prototype=Object.create(T);function A(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(i,o,a,u){var s=f(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function I(e,n,r){var i=d;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===h){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?h:v,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=h,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=f(i,e.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[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function _(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(typeof e+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,s,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},A(O.prototype),c(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(S),c(S,s,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=_,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){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(t,e){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"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),L(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;L(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:_(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function k(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e);else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,e)||U(t,e)||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 P(t){return function(t){if(Array.isArray(t))return A(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||U(t)||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 j(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}function D(t){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(t)}function U(t,e){if(t){if("string"==typeof t)return A(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(t,e):void 0}}function M(){return(new Date).getTime()}function F(){var t=B();return t?String(1e6*(m.now()+t)):V(new Date)}function V(t){return"object"===D(t)?V(t.getTime()):String(t)+"000000"}function B(){var t,e=null==m?void 0:m.timeOrigin;"number"!=typeof e&&(e=null==m||null===(t=m.timing)||void 0===t?void 0:t.fetchStart);return e}var H={setTimeout:null==d?void 0:d.setTimeout,clearTimeout:null==d?void 0:d.clearTimeout,setInterval:null==d?void 0:d.setInterval,clearInterval:null==d?void 0:d.clearInterval},W=null!=d&&null!=d.Zone&&null!=d.Zone.root&&"function"==typeof d.Zone.root.run;function z(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return K.apply("setTimeout",arguments)}function q(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return K.apply("clearTimeout",arguments)}function G(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return K.apply("setInterval",arguments)}function K(){var t,e=this;if(W)try{var n=Array.prototype.slice.apply(arguments);return d.Zone.root.run(H[e],d,n)}catch(t){a("Failed to execute %s inside of zone (via Zone.js). Falling back to execution inside currently active zone.",e,t)}return null===(t=H[e])||void 0===t?void 0:t.apply(d,arguments)}W&&s("Discovered Zone.js globals. Will attempt to register all timers inside the root Zone.");m&&m.getEntriesByType;var Z=m&&"function"==typeof d.PerformanceObserver&&"function"==typeof m.now,Y=Object.freeze({CONNECT_END:"connectEnd",CONNECT_START:"connectStart",DECODED_BODY_SIZE:"decodedBodySize",DOM_COMPLETE:"domComplete",DOM_CONTENT_LOADED_EVENT_END:"domContentLoadedEventEnd",DOM_CONTENT_LOADED_EVENT_START:"domContentLoadedEventStart",DOM_INTERACTIVE:"domInteractive",DOMAIN_LOOKUP_END:"domainLookupEnd",DOMAIN_LOOKUP_START:"domainLookupStart",ENCODED_BODY_SIZE:"encodedBodySize",FETCH_START:"fetchStart",LOAD_EVENT_END:"loadEventEnd",LOAD_EVENT_START:"loadEventStart",NAVIGATION_START:"navigationStart",REDIRECT_END:"redirectEnd",REDIRECT_START:"redirectStart",REQUEST_START:"requestStart",RESPONSE_END:"responseEnd",RESPONSE_START:"responseStart",SECURE_CONNECTION_START:"secureConnectionStart",START_TIME:"startTime",UNLOAD_EVENT_END:"unloadEventEnd",UNLOAD_EVENT_START:"unloadEventStart"}),X=new WeakSet;function Q(e){if(!Z)return function(e){var n=0;return{start:function(){n=M()},end:function(){return e({duration:M()-n})},cancel:t}}(e.onEnd);var n,r,i,o,a,u=[];return{start:function(){n=m.now();try{var t,e=null==d?void 0:d.PerformanceObserver;if(e)null===(t=i=new e(c))||void 0===t||t.observe({type:"resource"})}catch(t){}a=z(f,6e5)},end:function(t){if(r)return;if(r=null!=t?t:m.now(),p(),!$())return s();z((function(){return s()}),Math.min(300,e.maxWaitForResourceMillis)),w(v,"visibilitychange",l),o=z(s,e.maxWaitForResourceMillis)},cancel:f};function s(){f();var t=function(){if(!u.length)return;var t,i,o=u.filter((function(t){return t.responseEnd<=r+e.maxToleranceForResourceTimingsMillis&&!X.has(t)}));if(!o.length)return;1===o.length&&(t=o[0]);if(!t){var a,s=L(o);try{for(s.s();!(a=s.n()).done;){var c=a.value,l=Math.abs(r-n-c.duration)+Math.abs(c.responseEnd-r);(void 0===i||l<i)&&(i=l,t=c)}}catch(t){s.e(t)}finally{s.f()}}if(!t)return;return X.add(t),t}();null!=t&&t.duration&&t.duration<864e5?e.onEnd({resource:t,duration:t.duration}):e.onEnd({resource:t,duration:r-n})}function c(t){t.getEntriesByType("resource").filter((function(t){var r=t;return r.startTime>=n&&e.resourceMatcher(r)})).forEach((function(t){u.length>=100&&u.shift(),u.push(t)}))}function l(){$()||s()}function f(){!function(){if(i){try{var t;null===(t=i)||void 0===t||t.disconnect()}catch(t){}i=void 0}}(),o&&(clearTimeout(o),o=void 0),p(),function(){if(!v)return;t=v,e="visibilitychange",n=l,t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n);var t,e,n}()}function p(){a&&(clearTimeout(a),a=void 0)}}function $(){return"visible"===(null==v?void 0:v.visibilityState)||"prerender"===(null==v?void 0:v.visibilityState)}var J="undefined";function tt(t){return Math.round(100*t)/100}function et(t){var e;return"string"!=typeof t?t:new URL(t,null!==(e=null==v?void 0:v.baseURI)&&void 0!==e?e:null==h?void 0:h.href)}function nt(t){try{return et(t).origin===("undefined"!=typeof location?location.origin:void 0)}catch(t){return!1}}var rt=Symbol.for("INSTRUMENTED_BY_DASH0");function it(t,e,n){var r=t[e];r?!0!==r[rt]?(!function(t){t[rt]=!0}(r),t[e]=n(r)):s("".concat(String(e)," has already been instrumented, skipping")):s("".concat(String(e)," is not defined, unable to instrument"))}var ot={endpoints:[],resource:{attributes:[]},scope:{name:"dash0-web-sdk",version:"0.18.3",attributes:[]},signalAttributes:[],ignoreUrls:[],ignoreErrorMessages:[],wrapEventHandlers:!0,wrapTimers:!0,propagateTraceHeadersCorsURLs:[],maxWaitForResourceTimingsMillis:1e4,maxToleranceForResourceTimingsMillis:50,headersToCapture:[],urlAttributeScrubber:e,pageViewInstrumentation:{trackVirtualPageViews:!0,includeParts:[]},enableTransportCompression:!1},at="service.name",ut="service.version",st="deployment.environment.name",ct="deployment.name",lt="deployment.id",ft="event.name",dt="dash0.web.event.id",vt="page.load.id",pt="user_agent.original",ht="user.id",mt="user.name",yt="user.full_name",gt="user.email",bt="user.hash",Tt="user.roles",Et="exception.message",wt="exception.type",St="exception.stacktrace",At="url.full",Ot={PAGE_VIEW:"browser.page_view",NAVIGATION_TIMING:"browser.navigation_timing",WEB_VITAL:"browser.web_vital",ERROR:"browser.error"},It={UNSPECIFIED:0,TRACE:1,DEBUG:5,INFO:9,WARN:13,ERROR:17,FATAL:21},Nt=0,Ct=1,Lt="pushState",Rt="replaceState",_t=1;function xt(){var t,e;return"".concat((t={ephemeralSession:!S},e=0,t.ephemeralSession&&(e|=_t),e.toString(16).padStart(2,"0"))).concat(E(7))}var kt="d0_session",Pt="#",jt=864e5,Dt=null;function Ut(t,e){if(!S)return s("Storage API is not available and session tracking is therefore not supported."),void(Dt=xt());t||(t=108e5),e||(e=216e5),t=Math.min(t,jt),e=Math.min(e,jt);try{var n=function(t){return S&&g?g.getItem(t):null}(kt),r=function(t){if(!t)return null;var e=t.split(Pt);if(e.length<3)return null;var n=e[0],r=parseInt(e[1],10),i=parseInt(e[2],10);if(!n||isNaN(r)||isNaN(i))return null;return{id:n,startTime:r,lastActivityTime:i}}(n);r&&!function(t,e,n){var r=M()-e;if(t.lastActivityTime<r)return!1;var i=M()-n;return t.startTime>=i}(r,t,e)&&(r=null),r?r.lastActivityTime=M():r={id:xt(),startTime:M(),lastActivityTime:M()},function(t,e){S&&g&&g.setItem(t,e)}(kt,function(t){return t.id+Pt+t.startTime+Pt+t.lastActivityTime}(r)),Dt=r.id}catch(t){a("Failed to record session information",t)}}function Mt(){if(S)try{!function(t){S&&g&&g.removeItem(t)}(kt)}catch(t){o("Failed to terminate session",t)}}var Ft=-1,Vt=function(t){addEventListener("pageshow",(function(e){e.persisted&&(Ft=e.timeStamp,t(e))}),!0)},Bt=function(t,e,n,r){var i,o;return function(a){e.value>=0&&(a||r)&&(((o=e.value-(null!=i?i:0))||void 0===i)&&(i=e.value,e.delta=o,e.rating=function(t,e){return t>e[1]?"poor":t>e[0]?"needs-improvement":"good"}(e.value,n),t(e)))}},Ht=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},Wt=function(){var t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},zt=function(){var t,e=Wt();return null!==(t=null==e?void 0:e.activationStart)&&void 0!==t?t:0},qt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=Wt(),r="navigate";return Ft>=0?r="back-forward-cache":n&&(document.prerendering||zt()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e,rating:"good",delta:0,entries:[],id:"v5-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},Gt=new WeakMap;function Kt(t,e){return Gt.get(t)||Gt.set(t,new e),Gt.get(t)}var Zt,Yt=function(){return C((function t(){N(this,t),R(this,"t",void 0),R(this,"i",0),R(this,"o",[])}),[{key:"h",value:function(t){var e;if(!t.hadRecentInput){var n=this.o[0],r=this.o.at(-1);this.i&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),null===(e=this.t)||void 0===e||e.call(this,t)}}}])}(),Xt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(t){Promise.resolve().then((function(){e(t.getEntries())}))}));return r.observe(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(Object(n),!0).forEach((function(e){R(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({type:t,buffered:!0},n)),r}}catch(t){}},Qt=function(t){var e=!1;return function(){e||(t(),e=!0)}},$t=-1,Jt=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},te=function(t){"hidden"===document.visibilityState&&$t>-1&&($t="visibilitychange"===t.type?t.timeStamp:0,ne())},ee=function(){addEventListener("visibilitychange",te,!0),addEventListener("prerenderingchange",te,!0)},ne=function(){removeEventListener("visibilitychange",te,!0),removeEventListener("prerenderingchange",te,!0)},re=function(){if($t<0){var t,e=zt(),n=document.prerendering||null===(t=globalThis.performance.getEntriesByType("visibility-state").filter((function(t){return"hidden"===t.name&&t.startTime>e}))[0])||void 0===t?void 0:t.startTime;$t=null!=n?n:Jt(),ee(),Vt((function(){setTimeout((function(){$t=Jt(),ee()}))}))}return{get firstHiddenTime(){return $t}}},ie=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},oe=[1800,3e3],ae=[.1,.25],ue=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ie((function(){var n,r=re(),i=qt("FCP"),o=Xt("paint",(function(t){var e,a=L(t);try{for(a.s();!(e=a.n()).done;){var u=e.value;"first-contentful-paint"===u.name&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(i.value=Math.max(u.startTime-zt(),0),i.entries.push(u),n(!0)))}}catch(t){a.e(t)}finally{a.f()}}));o&&(n=Bt(t,i,oe,e.reportAllChanges),Vt((function(r){i=qt("FCP"),n=Bt(t,i,oe,e.reportAllChanges),Ht((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(Qt((function(){var n,r=qt("CLS",0),i=Kt(e,Yt),o=function(t){var e,o=L(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;i.h(a)}}catch(t){o.e(t)}finally{o.f()}i.i>r.value&&(r.value=i.i,r.entries=i.o,n())},a=Xt("layout-shift",o);a&&(n=Bt(t,r,ae,e.reportAllChanges),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(o(a.takeRecords()),n(!0))})),Vt((function(){i.i=0,r=qt("CLS",0),n=Bt(t,r,ae,e.reportAllChanges),Ht((function(){return n()}))})),setTimeout(n))})))},se=0,ce=1/0,le=0,fe=function(t){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.interactionId&&(ce=Math.min(ce,r.interactionId),le=Math.max(le,r.interactionId),se=le?(le-ce)/7+1:0)}}catch(t){n.e(t)}finally{n.f()}},de=function(){var t;return Zt?se:null!==(t=performance.interactionCount)&&void 0!==t?t:0},ve=0,pe=function(){return C((function t(){N(this,t),R(this,"u",[]),R(this,"l",new Map),R(this,"m",void 0),R(this,"v",void 0)}),[{key:"p",value:function(){ve=de(),this.u.length=0,this.l.clear()}},{key:"P",value:function(){var t=Math.min(this.u.length-1,Math.floor((de()-ve)/50));return this.u[t]}},{key:"h",value:function(t){var e;if(null!==(e=this.m)&&void 0!==e&&e.call(this,t),t.interactionId||"first-input"===t.entryType){var n=this.u.at(-1),r=this.l.get(t.interactionId);if(r||this.u.length<10||t.duration>n.T){var i;if(r?t.duration>r.T?(r.entries=[t],r.T=t.duration):t.duration===r.T&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],T:t.duration},this.l.set(r.id,r),this.u.push(r)),this.u.sort((function(t,e){return e.T-t.T})),this.u.length>10){var o,a=L(this.u.splice(10));try{for(a.s();!(o=a.n()).done;){var u=o.value;this.l.delete(u.id)}}catch(t){a.e(t)}finally{a.f()}}null===(i=this.v)||void 0===i||i.call(this,r)}}}}])}(),he=function(t){var e=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?t():(t=Qt(t),document.addEventListener("visibilitychange",t,{once:!0}),e((function(){t(),document.removeEventListener("visibilitychange",t)})))},me=[200,500],ye=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&ie((function(){var n;"interactionCount"in performance||Zt||(Zt=Xt("event",fe,{type:"event",buffered:!0,durationThreshold:0}));var r,i=qt("INP"),o=Kt(e,pe),a=function(t){he((function(){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var a=e.value;o.h(a)}}catch(t){n.e(t)}finally{n.f()}var u=o.P();u&&u.T!==i.value&&(i.value=u.T,i.entries=u.entries,r())}))},u=Xt("event",a,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=Bt(t,i,me,e.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(a(u.takeRecords()),r(!0))})),Vt((function(){o.p(),i=qt("INP"),r=Bt(t,i,me,e.reportAllChanges)})))}))},ge=function(){return C((function t(){N(this,t),R(this,"m",void 0)}),[{key:"h",value:function(t){var e;null===(e=this.m)||void 0===e||e.call(this,t)}}])}(),be=[2500,4e3],Te=!1;function Ee(t){var e,n,r=[];return n=i,Te&&n(),v&&d&&(w(v,"visibilitychange",(function(){"visible"!==v.visibilityState&&n()})),w(d,"pagehide",(function(){Te=!0,n()})),w(d,"beforeunload",(function(){Te=!0,n()}))),{send:function(n){"visible"===(null==v?void 0:v.visibilityState)?(r.push(n),r.length>=15?i():null==e&&(e=z(i,1e3))):t([n])}};function i(){null!=e&&(clearTimeout(e),e=null),r.length>0&&(t(r.slice()),r.length=0)}}var we=0,Se=0;function Ae(t,e){return Oe.apply(this,arguments)}function Oe(){return Oe=I(x().mark((function e(n,r){var i,o,u,c;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s("Transmitting telemetry to endpoints",r),i=JSON.stringify(r),o=i,u=new Blob([i]).size,c=!1,"undefined"==typeof CompressionStream||!ot.enableTransportCompression){e.next=11;break}return e.next=8,Ie(i);case 8:o=e.sent,u=o.byteLength,c=!0;case 11:return e.next=13,Promise.all(ot.endpoints.map(function(){var e=I(x().mark((function e(r){var i,s,l;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(i=new URL(r.url)).pathname=i.pathname+(i.pathname.endsWith("/")?n.substring(1):n),s={"Content-Type":"application/json",Authorization:"Bearer ".concat(r.authToken)},r.dataset&&(s["Dash0-Dataset"]=r.dataset),c&&(s["Content-Encoding"]="gzip"),y){e.next=9;break}return a("Unable to send telemetry, fetch is not defined"),e.abrupt("return");case 9:return we+=u,Se++,e.next=13,y(i,{method:"POST",headers:s,body:o,keepalive:we<=6e4&&Se<=15});case 13:(l=e.sent).text().catch(t),l.ok||a("Failed to send telemetry to ".concat(i,": ").concat(l.status," ").concat(l.statusText)),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),a("Error sending telemetry to ".concat(r.url).concat(n,":"),e.t0);case 21:return e.prev=21,we-=u,Se--,e.finish(21);case 25:case"end":return e.stop()}}),e,null,[[0,18,21,25]])})));return function(t){return e.apply(this,arguments)}}()));case 13:case"end":return e.stop()}}),e)}))),Oe.apply(this,arguments)}function Ie(t){return Ne.apply(this,arguments)}function Ne(){return(Ne=I(x().mark((function t(e){var n,r,i;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new Blob([e]),r=n.stream(),i=r.pipeThrough(new CompressionStream("gzip")),t.abrupt("return",new Response(i).arrayBuffer());case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Ce,Le=Ee((function(t){Ae("/v1/logs",{resourceLogs:[{resource:ot.resource,scopeLogs:[{scope:ot.scope,logRecords:t}]}]}).catch((function(t){u("Failed to transmit logs",t)}))})),Re=Ee((function(t){Ae("/v1/traces",{resourceSpans:[{resource:ot.resource,scopeSpans:[{scope:ot.scope,spans:t}]}]}).catch((function(t){u("Failed to transmit spans",t)}))}));function _e(){var t,e,n,r,i;return Ce||(e=(t={maxCallsPerTenMinutes:4096,maxCallsPerTenSeconds:128}).maxCallsPerTenMinutes,n=t.maxCallsPerTenSeconds,r=0,i=0,G((function(){r=0}),6e5),G((function(){i=0}),1e4),Ce=function(){return++r>e||++i>n}),Ce()}function xe(t){_e()?s("Transport rate limit. Will not send item.",t):Le.send(t)}function ke(t){t&&(_e()?s("Transport rate limit. Will not send item.",t):Re.send(t))}var Pe=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"];function je(t){if(null!=t){var e={};return Array.isArray(t)?e.arrayValue={values:t.map((function(t){return je(t)}))}:"string"==typeof t?e.stringValue=t:"number"==typeof t?e.doubleValue=t:"boolean"==typeof t?e.boolValue=t:!function(t){if(null==t||"object"!==D(t))return!1;var e=Object.keys(t);return 1===e.length&&Pe.includes(e[0])}(t)?"object"===D(t)&&(e.kvlistValue={values:Object.entries(t).map((function(t){var e=k(t,2);return De(e[0],e[1])}))}):e=t,e}}function De(t,e){return{key:t,value:je(e)}}function Ue(t,e,n){e&&t.push(De(e,n))}function Me(t,e){e&&Object.entries(e).forEach((function(e){var n=k(e,2),r=n[0],i=n[1];return Ue(t,r,i)}))}function Fe(t,e){var n=t.findIndex((function(t){return t.key===e}));-1!==n&&t.splice(n,1)}var Ve="traceparent",Be=/^00-([a-f0-9]{32})-([a-f0-9]{16})-[0-9]{1,2}$/;function He(){var t,e,n=((null===(t=Array.from(null!==(e=null==v?void 0:v.getElementsByTagName("meta"))&&void 0!==e?e:[]).find((function(t){var e;return(null===(e=t.getAttribute("name"))||void 0===e?void 0:e.toLowerCase())===Ve})))||void 0===t?void 0:t.content.trim())||"").match(Be)||function(){var t=m.getEntriesByType("navigation")[0];if(!t)return"";if(!t.serverTiming)return"";return function(t){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.name===Ve)return r.description.trim()}}catch(t){n.e(t)}finally{n.f()}return""}(t.serverTiming)}().match(Be);if(n)return{traceId:n[1],spanId:n[2]}}function We(t,e,n){t.call(e,"traceparent","00-".concat(n.traceId,"-").concat(n.spanId,"-01"))}function ze(t,e,n){var r,i,o,a=(r=n.traceId,i=r.substring(0,8),o=r.substring(8,32),"1-".concat(i,"-").concat(o)),u="Root=".concat(a,";Parent=").concat(n.spanId,";Sampled=1");t.call(e,"X-Amzn-Trace-Id",u)}var qe="d042",Ge=1;function Ke(t){var e=0;return t.withoutSession&&(e|=Ge),e.toString(16).padStart(2,"0")}for(var Ze=new Uint32Array(256),Ye=0;Ye<256;Ye++){for(var Xe=Ye,Qe=0;Qe<8;Qe++)Xe=1&Xe?3988292384^Xe>>>1:Xe>>>1;Ze[Ye]=Xe>>>0}function $e(t){var e=function(t){for(var e=new Uint8Array(t.length/2),n=0;n<t.length;n+=2)e[n/2]=parseInt(t.substring(n,n+2),16);for(var r=4294967295,i=0;i<e.length;i++){var o=e[i];r=r>>>8^Ze[255&(r^o)]}return(4294967295^r)>>>0}(t).toString(16).padStart(8,"0");return"".concat(e).concat(E(4))}function Je(t){var e=function(t){return t?"".concat(qe).concat(Ke({withoutSession:!1})).concat(t).concat(E(5)):"".concat(qe).concat(Ke({withoutSession:!0})).concat(E(13))}(Dt),n=$e(e),r=[];return Ue(r,dt,n),{traceId:e,spanId:n,name:t,kind:3,startTimeUnixNano:F(),attributes:r,events:[],links:[],status:{code:0}}}function tn(t,e,n){var r=t;if(!r.endTimeUnixNano)return e&&(r.status=e),r.endTimeUnixNano=null!=n?String(Math.round(parseInt(r.startTimeUnixNano)+n)):F(),r;s("Attempting to end already ended span. Dropping...",r)}function en(t,e,n,r){var i=void 0,o=void 0;"string"==typeof n?i=n:Array.isArray(n)&&(o=n),t.events.push({name:e,timeUnixNano:null!=i?i:F(),attributes:null!=o?o:[]})}function nn(t,n,r){var i=function(t){return t?Array.isArray(t)?function(e){return[].concat(P(t),[e]).join(".")}:function(e){return"".concat(t,".").concat(e)}:function(t){return t}}(r);try{var o=et(n);o.username&&(o.username="REDACTED"),o.password&&(o.password="REDACTED");var a=ot.urlAttributeScrubber(R(R(R(R(R(R({},At,o.href),"url.path",o.pathname),"url.domain",o.hostname),"url.scheme",o.protocol.replace(":","")),"url.fragment",o.hash?o.hash.replace("#",""):void 0),"url.query",o.search?o.search.replace("?",""):void 0));Object.entries(a).forEach((function(e){var n=k(e,2),r=n[0],o=n[1];void 0!==o&&Ue(t,i(r),o)}))}catch(r){ot.urlAttributeScrubber===e&&Ue(t,i(At),String(n))}}var rn=null!=b&&"function"==typeof b.getItem&&"function"==typeof b.setItem;var on="d0_tab",an=null;function un(){if(rn)try{var t=function(t){return rn&&b?b.getItem(t):null}(on);if(t)return void(an=t);an=E(8),function(t,e){rn&&b&&b.setItem(t,e)}(on,an)}catch(t){a("Failed to record tab ID information",t)}else s("Storage API is not available and tab tracking is therefore not supported.")}function sn(t,e){var n,r,i,o,a;void 0===t.find((function(t){return t.key===dt}))&&Ue(t,dt,E(8));for(var u=0;u<ot.signalAttributes.length;u++)t.push(ot.signalAttributes[u]);nn(t,null!==(n=null!==(r=null==e?void 0:e.url)&&void 0!==r?r:null==d?void 0:d.location.href)&&void 0!==n?n:J,"page"),Dt&&Ue(t,"session.id",Dt),an&&Ue(t,"browser.tab.id",an),Ue(t,"browser.window.width",null!==(i=null==d?void 0:d.innerWidth)&&void 0!==i?i:J),Ue(t,"browser.window.height",null!==(o=null==d?void 0:d.innerHeight)&&void 0!==o?o:J);var s=null==p||null===(a=p.connection)||void 0===a?void 0:a.effectiveType;s&&Ue(t,"network.connection.subtype",s)}function cn(){!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ie((function(){var n,r=re(),i=qt("LCP"),o=Kt(e,ge),a=function(t){e.reportAllChanges||(t=t.slice(-1));var a,u=L(t);try{for(u.s();!(a=u.n()).done;){var s=a.value;o.h(s),s.startTime<r.firstHiddenTime&&(i.value=Math.max(s.startTime-zt(),0),i.entries=[s],n())}}catch(t){u.e(t)}finally{u.f()}},u=Xt("largest-contentful-paint",a);if(u){n=Bt(t,i,be,e.reportAllChanges);for(var s=Qt((function(){a(u.takeRecords()),u.disconnect(),n(!0)})),c=0,l=["keydown","click","visibilitychange"];c<l.length;c++)addEventListener(l[c],(function(){return he(s)}),{capture:!0,once:!0});Vt((function(r){i=qt("LCP"),n=Bt(t,i,be,e.reportAllChanges),Ht((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))}}))}(ln,{reportAllChanges:!0}),ye(ln,{reportAllChanges:!0}),ue(ln,{reportAllChanges:!0})}function ln(t){var e=[];Ue(e,ft,Ot.WEB_VITAL);var n=[];Ue(n,"name",t.name),Ue(n,"value",tt(t.value)),Ue(n,"delta",tt(t.delta));var r={timeUnixNano:F(),attributes:e,severityNumber:It.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};sn(r.attributes),xe(r)}function fn(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].test(e))return!0;return!1}var dn="data:";function vn(t){return!t||(!(t=String(t))||(null==t.substring||t.substring(0,5).toLowerCase()===dn||(!!function(t){for(var e=t.toLowerCase(),n=0,r=ot.endpoints.length;n<r;n++){var i=ot.endpoints[n];if(e.startsWith(i.url))return!0}return!1}(t)||fn(ot.ignoreUrls,t))))}var pn,hn=0,mn=0,yn={},gn=!1;function bn(){gn=!0}function Tn(t,e){t&&En("string"==typeof t?{message:t,opts:e}:{message:t.message,type:t.name,stack:t.stack,opts:e})}function En(t){var e=t.message,n=t.type,r=t.stack,i=t.opts;if(e&&!(hn>100)&&!function(t){return!t||fn(ot.ignoreErrorMessages,t)}(e)){mn>=20&&(yn={},mn=0);var o=(e=String(e).substring(0,300))+(r=function(t){return String(t||"").split("\n").slice(0,30).join("\n")}(r))+(null==d?void 0:d.location.href),a=yn[o];if(a)a.seenCount++;else{var u=[];sn(u),Ue(u,ft,Ot.ERROR),Ue(u,Et,e),n&&Ue(u,wt,n),r&&Ue(u,St,r),null!=i&&i.componentStack&&Ue(u,"exception.component_stack",null==i?void 0:i.componentStack.substring(0,2048)),Me(u,null==i?void 0:i.attributes),a={seenCount:1,transmittedCount:0,log:{timeUnixNano:F(),attributes:u,severityNumber:It.ERROR,severityText:"ERROR",body:{stringValue:e}}},yn[o]=a,mn++}!function(){if(pn)return;pn=setTimeout(wn,1e3)}()}}function wn(){for(var t in pn&&(clearTimeout(pn),pn=null),yn)if(f(yn,t)){var e=yn[t];e.seenCount>e.transmittedCount&&(xe(e.log),hn++)}yn={},mn=0}var Sn="Unhandled promise rejection: ",An="<unavailable because Promise wasn't rejected with an Error object>";function On(t){null==t.reason?Tn({message:Sn+"<no reason defined>",stack:An}):"string"==typeof t.reason.message?Tn({message:Sn+t.reason.message,stack:"string"==typeof t.reason.stack?t.reason.stack:An}):"object"!==D(t.reason)&&Tn({message:Sn+t.reason,stack:An})}var In="__dash0OriginalFunctions";function Nn(t,e){for(var n=t[In],r=0;r<n.length;r++){if(Cn(n[r].valuesForEqualityCheck,e))return r}return-1}function Cn(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Ln(t,e,n,r,i){return function(t,e,n){if(!t)return e;var r=t[In]=t[In]||[],i=Nn(t,n);return-1!==i?r[i].wrappedFunction:(r.push({wrappedFunction:e,valuesForEqualityCheck:n}),e)}(t,e,Rn(n,r,i))}function Rn(t,e,n){return[t,e,_n(n)]}function _n(t){return null!=t&&("object"===D(t)?Boolean(t.capture):Boolean(t))}function xn(t,e,n,r,i){return function(t,e,n){var r=null==t?void 0:t[In];if(null==r)return n;var i=Nn(t,e);if(-1===i)return n;var o=r[i];return r.splice(i,1),o.wrappedFunction}(t,Rn(e,n,r),i)}function kn(){ot.wrapEventHandlers&&function(t){if(!t||"function"!=typeof t.prototype.addEventListener||"function"!=typeof t.prototype.removeEventListener)return;var e=t.prototype.addEventListener,n=t.prototype.removeEventListener;t.prototype.addEventListener=function(t,n,r){if("function"!=typeof n)return e.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=function(){try{return n.apply(this,arguments)}catch(t){throw Tn(t),bn(),t}},i[1]=Ln(this,i[1],t,n,r),e.apply(this,i)},t.prototype.removeEventListener=function(t,e,r){if("function"!=typeof e)return n.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=xn(this,t,e,r,e),n.apply(this,i)}}(null==d?void 0:d.EventTarget)}function Pn(t){var e=null==d?void 0:d[t];"function"==typeof e&&(d[t]=function(t){for(var n=new Array(arguments.length),r=0;r<arguments.length;r++)n[r]=arguments[r];return n[0]=function(t){if("function"!=typeof t)return t;return function(){try{return t.apply(this,arguments)}catch(t){throw reportError(t),bn(),t}}}(t),e.apply(this,n)})}function jn(){!function(){if(d){var t=d.onerror;d.onerror=function(e,n,r,i,o){if(gn)return gn=!1,"function"==typeof t?t.apply(this,arguments):void 0;var a=o&&o.stack;return a||(a="at "+n+" "+r,null!=i&&(a+=":"+i)),En({message:String(e),stack:a}),"function"==typeof t?t.apply(this,arguments):void 0}}}(),"function"==typeof(null==d?void 0:d.addEventListener)&&d.addEventListener("unhandledrejection",On),kn(),function(){if(ot.wrapTimers){if(W)return void a("We discovered a usage of Zone.js. In order to avoid any incompatibility issues timer wrapping is not going to be enabled.");Pn("setTimeout"),Pn("setInterval")}}()}var Dn=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"];function Un(t){return Dn.includes(t)}function Mn(t,e){var n=0!==e.startTime;Fn(t,Y.FETCH_START,e,n),Fn(t,Y.DOMAIN_LOOKUP_START,e,n),Fn(t,Y.DOMAIN_LOOKUP_END,e,n),Fn(t,Y.CONNECT_START,e,n),Fn(t,Y.SECURE_CONNECTION_START,e,n),Fn(t,Y.CONNECT_END,e,n),Fn(t,Y.REQUEST_START,e,n),Fn(t,Y.RESPONSE_START,e,n),Fn(t,Y.RESPONSE_END,e,n)}function Fn(t,e,n){var r,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];!(e in n)||"number"!=typeof n[e]||i&&0===n[e]||en(t,e,(r=n[e],String(Math.round(1e6*(r+B())))))}function Vn(t,e){var n=e.encodedBodySize;null!=n&&Ue(t.attributes,"http.response.body.size",n)}function Bn(t){return function(){var e=I(x().mark((function e(n,r){var i,o,a,u,c,l,f,d,v,p,h,m,y,g,b;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r?Object.assign({},r):r,u=null,null!==(i=a)&&void 0!==i&&i.body&&(u=a.body,a.body=void 0),c=new Request(n,a),u&&a&&(a.body=u),!vn(l=c.url)){e.next=9;break}return s("Not creating span for fetch call because the url is ignored, URL: ".concat(l)),e.abrupt("return",t(n instanceof Request?c:n,r));case 9:return f=null!==(o=c.method)&&void 0!==o?o:"GET",d=Un(f),v=Un(f.toUpperCase()),p=v?f.toUpperCase():"_OTHER",sn((h=Je("HTTP ".concat(p))).attributes),nn(h.attributes,l),Hn(n,r),Ue(h.attributes,"http.request.method",p),d||Ue(h.attributes,"http.request.method_original",f),m=Kn(l),m.length>0&&(null!==(y=a)&&void 0!==y&&y.headers?(a.headers=new Headers(a.headers),Zn(a.headers.append,a.headers,h,m)):n instanceof Request?Zn(c.headers.append,c.headers,h,m):(a||(a={}),a.headers=new Headers,Zn(a.headers.append,a.headers,h,m))),Wn(c.headers,h,(function(t){return e=t,"".concat("http.request.header",".").concat(e.toLowerCase());var e})),(g=Q({resourceMatcher:function(t){var e=t.initiatorType,n=t.name;return("fetch"===e||"xmlhttprequest"===e)&&n===et(l).href},maxWaitForResourceMillis:ot.maxWaitForResourceTimingsMillis,maxToleranceForResourceTimingsMillis:ot.maxToleranceForResourceTimingsMillis,onEnd:function(t){var e=t.duration,n=t.resource;n&&(Mn(h,n),Vn(h,n)),ke(tn(h,void 0,1e6*e))}})).start(),e.prev=25,e.next=28,t(n instanceof Request?c:n,a);case 28:return b=e.sent,zn(h,b),e.abrupt("return",qn(b,ot.maxToleranceForResourceTimingsMillis,(function(){return g.end()}),(function(t){g.cancel(),Gn(h,t)})));case 33:throw e.prev=33,e.t0=e.catch(25),g.cancel(),Gn(h,e.t0),e.t0;case 38:case"end":return e.stop()}}),e,null,[[25,33]])})));return function(t,n){return e.apply(this,arguments)}}()}function Hn(t,e,n){try{return void 0}catch(n){s("failed to analyze request for GraphQL insights",n,t,e)}}function Wn(t,e,n){try{if(!ot.headersToCapture.length)return;t.forEach((function(t,r){ot.headersToCapture.some((function(t){return t.test(r)}))&&Ue(e.attributes,n(r),t)}))}catch(t){s("unable to capture http headers due to CORS policy")}}function zn(t,e){var n=e.status;!function(t,e,n){t.status={code:e,message:n}}(t,n>=200&&n<400?0:2),0===n&&Ue(t.attributes,"error.type",e.type),Ue(t.attributes,"http.response.status_code",String(n)),Wn(e.headers,t,(function(t){return e=t,"".concat("http.response.header",".").concat(e.toLowerCase());var e}))}function qn(t,e,n,r){var i,o,a=m.now(),u=t.body;if(!(u&&(i=t,o=i.status,o>=200&&204!=o&&205!=o&&304!=o)))return n(),t;var s=!1,c=function(t){s||(n(t),s=!0)},l=function(t){s||(r(t),s=!0)},f=z((function(){return c(a)}),e),d=u.getReader(),v=new ReadableStream({pull:function(t){return I(x().mark((function n(){var r,i;return x().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,q(f),n.next=4,d.read();case 4:r=n.sent,i=r.value,r.done?(d.releaseLock(),t.close(),c()):(a=m.now(),f=z((function(){return c(a)}),e),t.enqueue(i)),n.next=15;break;case 10:n.prev=10,n.t0=n.catch(0),l(n.t0),t.error(n.t0);try{d.releaseLock()}catch(t){}case 15:case"end":return n.stop()}}),n,null,[[0,10]])})))()},cancel:function(t){return q(f),c(),d.cancel(t)}});return new Response(v,{status:t.status,statusText:t.statusText,headers:t.headers})}function Gn(t,e){!function(t,e){var n=[];"string"==typeof e?Ue(n,Et,e):e&&(e.code?Ue(n,wt,e.code.toString()):e.name&&Ue(n,wt,e.name),e.message&&Ue(n,Et,e.message),e.stack&&Ue(n,St,e.stack),en(t,"exception",n))}(t,e),ke(tn(t,function(t){return{code:2,message:t&&"object"===D(t)&&"message"in t?t.message:String(t)}}(e),void 0))}function Kn(t){var e=[];if(nt(t)){if(e.push("traceparent"),ot.propagators){var n,r=L(ot.propagators);try{for(r.s();!(n=r.n()).done;){var i=n.value;"traceparent"===i.type||e.includes(i.type)||e.push(i.type)}}catch(t){r.e(t)}finally{r.f()}}return e}if(ot.propagators){var o,a=L(ot.propagators);try{for(a.s();!(o=a.n()).done;){var u=o.value;fn(u.match,t)&&(e.includes(u.type)||e.push(u.type))}}catch(t){a.e(t)}finally{a.f()}return e}return[]}function Zn(t,e,n,r){var i,o=L(r);try{for(o.s();!(i=o.n()).done;){"xray"===i.value?ze(t,e,n):We(t,e,n)}}catch(t){o.e(t)}finally{o.f()}}function Yn(t,e,n,r){var i,o,a=function(t){var e,n,r;return t&&null!==(e=null===(n=(r=ot.pageViewInstrumentation).generateMetadata)||void 0===n?void 0:n.call(r,t))&&void 0!==e?e:{}}(e),u=[];Ue(u,ft,Ot.PAGE_VIEW),a.attributes&&Object.entries(a.attributes).forEach((function(t){var e=k(t,2),n=e[0],r=e[1];return Ue(u,n,r)})),sn(u,{url:e});var s=[];Ue(s,"title",null!==(i=null!==(o=a.title)&&void 0!==o?o:null==v?void 0:v.title)&&void 0!==i?i:J),null!=v&&v.referrer&&Ue(s,"referrer",v.referrer),Ue(s,"type",n?Ct:Nt),Ue(s,"change_state",r?Rt:Lt);var c={timeUnixNano:t,attributes:u,severityNumber:It.INFO,severityText:"INFO",body:{kvlistValue:{values:s}}},l=He();l&&(c.traceId=l.traceId,c.spanId=l.spanId),xe(c)}function Xn(){var t=null==d?void 0:d.performance.getEntriesByType("navigation")[0];if(t){var e=[];Ue(e,ft,Ot.NAVIGATION_TIMING);var n=[];Ue(n,"name",t.name),Qn(n,t,"responseStatus"),Qn(n,t,"fetchStart"),Qn(n,t,"requestStart"),Qn(n,t,"responseStart"),Qn(n,t,"domInteractive"),Qn(n,t,"domContentLoadedEventEnd"),Qn(n,t,"domComplete"),Qn(n,t,"loadEventEnd"),Qn(n,t,"transferSize"),Qn(n,t,"encodedBodySize"),Qn(n,t,"decodedBodySize");var r={timeUnixNano:$n(),attributes:e,severityNumber:It.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};sn(r.attributes);var i=He();i&&(r.traceId=i.traceId,r.spanId=i.spanId),xe(r)}else s("Navigation timings not available. Cannot emit navigation timing log")}function Qn(t,e,n){var r=e[n];"number"!=typeof r||isNaN(r)||Ue(t,n,Number.isInteger(r)?r:tt(r))}function $n(){return V(Math.round(B()))}var Jn={},tr=!1,er=!1;function nr(){ir(null==d?void 0:d.location.href)}function rr(t){ir(t.newURL)}function ir(t,e){var n;if(t)try{var r=new URL(t,null==d?void 0:d.location.href);((n=r).pathname!==Jn.path||er&&n.search!==Jn.search||tr&&n.hash!==Jn.hash)&&(or(r),Yn(F(),r,!0,Boolean(e)))}catch(t){s("Failed to handle url change",t)}}function or(t){Jn.path=t.pathname,Jn.search=t.search,Jn.hash=t.hash}function ar(){!function(){try{Yn($n(),null!=d&&d.location.href?new URL(null==d?void 0:d.location.href):void 0)}catch(t){u("Failed to transmit initial page view event",t)}if("complete"===(null==v?void 0:v.readyState))return Xn();d&&w(d,"load",(function(){setTimeout(Xn,0)}))}(),function(){var t,e,n,r;if(d&&d.history){if(ot.pageViewInstrumentation.trackVirtualPageViews){er=null!==(t=null===(e=ot.pageViewInstrumentation.includeParts)||void 0===e?void 0:e.includes("SEARCH"))&&void 0!==t&&t,tr=null!==(n=null===(r=ot.pageViewInstrumentation.includeParts)||void 0===r?void 0:r.includes("HASH"))&&void 0!==n&&n,it(d.history,"replaceState",(function(t){return function(e,n,r){return ir(r?String(r):void 0,!0),t.apply(this,[e,n,r])}})),it(d.history,"pushState",(function(t){return function(e,n,r){return ir(r?String(r):void 0),t.apply(this,[e,n,r])}})),d.addEventListener("hashchange",rr),d.addEventListener("popstate",nr);try{or(new URL(d.location.href))}catch(t){}}}else s("Browser does not support history API, skipping instrumentation")}()}var ur=function(t){if("object"===D(t)&&null!==t){if("function"==typeof Object.getPrototypeOf){var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}return"[object Object]"===Object.prototype.toString.call(t)}return!1},sr=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce((function(t,e){if(void 0===e)return t;if(Array.isArray(e))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(e).forEach((function(n){["__proto__","constructor","prototype"].includes(n)||(Array.isArray(t[n])&&Array.isArray(e[n])?t[n]=sr.options.mergeArrays?sr.options.uniqueArrayItems?Array.from(new Set(t[n].concat(e[n]))):[].concat(P(t[n]),P(e[n])):e[n]:ur(t[n])&&ur(e[n])?t[n]=sr(t[n],e[n]):!ur(t[n])&&ur(e[n])?t[n]=sr(e[n],void 0):t[n]=void 0===e[n]?sr.options.allowUndefinedOverrides?e[n]:t[n]:e[n])})),t}),{})},cr={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};sr.options=cr,sr.withOptions=function(t){sr.options=Object.assign(Object.assign({},cr),t);for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=sr.apply(void 0,n);return sr.options=cr,i};var lr=!1;function fr(t){if(lr)s("Dash0 SDK is being reinitialized, skipping ...");else if(null!=d)if("function"==typeof y&&m&&m.getEntriesByType){var e;if(!t.serviceName.trim())s("Missing or empty serviceName value. Falling back to location.hostname."),t.serviceName=null!==(e=null==h?void 0:h.hostname)&&void 0!==e?e:"unknown";ot.endpoints=t.endpoint instanceof Array?t.endpoint:[t.endpoint],0!==ot.endpoints.length?(Object.assign(ot,sr(ot,function(t,e){var n,r={},i=L(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;o in t&&(r[o]=t[o])}}catch(t){i.e(t)}finally{i.f()}return r}(t,["ignoreUrls","ignoreErrorMessages","wrapEventHandlers","wrapTimers","propagateTraceHeadersCorsURLs","maxWaitForResourceTimingsMillis","maxToleranceForResourceTimingsMillis","headersToCapture","urlAttributeScrubber","pageViewInstrumentation","enableTransportCompression"]))),function(t){t.propagators?(t.propagateTraceHeadersCorsURLs&&a("Both 'propagators' and deprecated 'propagateTraceHeadersCorsURLs' were provided. Using 'propagators' configuration. Please migrate to the new 'propagators' config."),ot.propagators=t.propagators):t.propagateTraceHeadersCorsURLs&&t.propagateTraceHeadersCorsURLs.length>0?(a("'propagateTraceHeadersCorsURLs' is deprecated. Please use the new 'propagators' configuration."),ot.propagators=[{type:"traceparent",match:P(t.propagateTraceHeadersCorsURLs)}]):ot.propagators=[{type:"traceparent",match:[]}]}(t),function(t){Ue(ot.resource.attributes,at,t.serviceName),t.serviceVersion&&Ue(ot.resource.attributes,ut,t.serviceVersion);var e=function(t){if(t.environment)return t.environment;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_ENV}catch(t){return}}(t);e&&Ue(ot.resource.attributes,st,e);var n=function(t){if(t.deploymentName)return t.deploymentName;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_TARGET_ENV}catch(t){return}}(t);n&&Ue(ot.resource.attributes,ct,n);var r=function(t){if(t.deploymentId)return t.deploymentId;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_BRANCH_URL}catch(t){return}}(t);r&&Ue(ot.resource.attributes,lt,r)}(t),function(t){var e;Ue(ot.signalAttributes,vt,E(16)),Ue(ot.signalAttributes,pt,null!==(e=null==p?void 0:p.userAgent)&&void 0!==e?e:J),t.additionalSignalAttributes&&Object.entries(t.additionalSignalAttributes).forEach((function(t){var e=k(t,2),n=e[0],r=e[1];Ue(ot.signalAttributes,n,r)}))}(t),un(),Ut(t.sessionInactivityTimeoutMillis,t.sessionTerminationTimeoutMillis),dr("@dash0/navigation",t)&&ar(),dr("@dash0/web-vitals",t)&&cn(),dr("@dash0/error",t)&&jn(),dr("@dash0/fetch",t)&&(d&&d.fetch&&d.Request?it(d,"fetch",Bn):s("Browser does not support the Fetch API, skipping instrumentation")),lr=!0):a("No telemetry endpoint configured. Aborting Dash0 Web SDK initialization process.")}else s("Stopping Dash0 Web SDK initialization. This browser does not support the necessary APIs.");else s("Looks like we are not running in a browser context. Stopping Dash0 Web SDK initialization.")}function dr(t,e){var n=e.enabledInstrumentations;return!n||n.includes(t)}function vr(t,e){Fe(ot.signalAttributes,ht),null!=t&&Ue(ot.signalAttributes,ht,t),Fe(ot.signalAttributes,mt),null!=(null==e?void 0:e.name)&&Ue(ot.signalAttributes,mt,e.name),Fe(ot.signalAttributes,yt),null!=(null==e?void 0:e.fullName)&&Ue(ot.signalAttributes,yt,e.fullName),Fe(ot.signalAttributes,gt),null!=(null==e?void 0:e.email)&&Ue(ot.signalAttributes,gt,e.email),Fe(ot.signalAttributes,bt),null!=(null==e?void 0:e.hash)&&Ue(ot.signalAttributes,bt,e.hash),Fe(ot.signalAttributes,Tt),null!=(null==e?void 0:e.roles)&&Ue(ot.signalAttributes,Tt,e.roles)}function pr(){s("Dash0 Web SDK configuration state:",ot)}function hr(t,e){Ue(ot.signalAttributes,t,e)}function mr(t){Fe(ot.signalAttributes,t)}function yr(t,e){if(Object.values(Ot).includes(t))a("Unable to send custom event ".concat(t,". You are not allowed to use an internal event name while sending a custom event. Dropping event..."));else{var n=[];sn(n),Ue(n,ft,t),null!=e&&e.title&&Ue(n,"dash0.web.event.title",e.title),Me(n,null==e?void 0:e.attributes),xe({timeUnixNano:null!=(null==e?void 0:e.timestamp)?V(e.timestamp):F(),attributes:n,body:je(null==e?void 0:e.data),severityText:null==e?void 0:e.severity,severityNumber:null!=e&&e.severity?It[e.severity]:void 0})}}function gr(t,e){Tn(t,e)}function br(t){s("".concat("Initializing Dash0 Web SDK"," (via package)")),fr(t)}export{hr as addSignalAttribute,pr as debug,vr as identify,br as init,mr as removeSignalAttribute,gr as reportError,yr as sendEvent,i as setActiveLogLevel,Mt as terminateSession};
1
+ function t(){}function e(t){return t}var n={debug:0,info:1,warn:2,error:3},r=n.warn;function i(t){var e;r=null!==(e=n[t])&&void 0!==e?e:n.warn}var o=c("info"),a=c("warn"),u=c("error"),s=c("debug");function c(e){if("undefined"!=typeof console&&console[e]&&"function"==typeof console[e].apply){var i=n[e];return function(){i>=r&&console[e].apply(console,arguments)}}return t}var l=Object.prototype.hasOwnProperty;function f(t,e){return l.call(t,e)}var d="undefined"!=typeof window?window:void 0,v=null==d?void 0:d.document,p=null==d?void 0:d.navigator,h="undefined"!=typeof location?location:void 0,m=(null==d?void 0:d.performance)||(null==d?void 0:d.webkitPerformance)||(null==d?void 0:d.msPerformance)||(null==d?void 0:d.mozPerformance);null==d||d.encodeURIComponent;var y=null==d?void 0:d.fetch,g=function(){try{var t;return null!==(t=null==d?void 0:d.localStorage)&&void 0!==t?t:null}catch(t){return null}}(),b=function(){try{var t;return null!==(t=null==d?void 0:d.sessionStorage)&&void 0!==t?t:null}catch(t){return null}}(),T=Array(32);function E(t){for(var e=0;e<2*t;e++)T[e]=Math.floor(16*Math.random())+48,T[e]>=58&&(T[e]+=39);return String.fromCharCode.apply(null,T.slice(0,2*t))}function w(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)}var S=null!=g&&"function"==typeof g.getItem&&"function"==typeof g.setItem;function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function O(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function I(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){O(o,r,i,a,u,"next",t)}function u(t){O(o,r,i,a,u,"throw",t)}a(void 0)}))}}function N(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function C(t,e,n){return e&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,j(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function L(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=M(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function R(t,e,n){return(e=j(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function x(){x=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),u=new R(r||[]);return i(a,"_invoke",{value:I(t,n,u)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d="suspendedStart",v="suspendedYield",p="executing",h="completed",m={};function y(){}function g(){}function b(){}var T={};c(T,a,(function(){return this}));var E=Object.getPrototypeOf,w=E&&E(E(_([])));w&&w!==n&&r.call(w,a)&&(T=w);var S=b.prototype=y.prototype=Object.create(T);function A(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(i,o,a,u){var s=f(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function I(e,n,r){var i=d;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===h){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?h:v,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=h,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=f(i,e.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[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function _(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(typeof e+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,s,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},A(O.prototype),c(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(S),c(S,s,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=_,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){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(t,e){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"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),L(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;L(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:_(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function k(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e);else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,e)||M(t,e)||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 P(t){return function(t){if(Array.isArray(t))return A(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||M(t)||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 j(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}function D(t){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(t)}function M(t,e){if(t){if("string"==typeof t)return A(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(t,e):void 0}}function U(){return(new Date).getTime()}function F(){var t=B(),e=new Date;if(t){var n=m.now()+t,r=e.getTime();if(Math.abs(n-r)<6e4)return String(1e6*n)}return V(e)}function V(t){return"object"===D(t)?V(t.getTime()):String(t)+"000000"}function B(){var t,e=null==m?void 0:m.timeOrigin;"number"!=typeof e&&(e=null==m||null===(t=m.timing)||void 0===t?void 0:t.fetchStart);return e}var H={setTimeout:null==d?void 0:d.setTimeout,clearTimeout:null==d?void 0:d.clearTimeout,setInterval:null==d?void 0:d.setInterval,clearInterval:null==d?void 0:d.clearInterval},W=null!=d&&null!=d.Zone&&null!=d.Zone.root&&"function"==typeof d.Zone.root.run;function z(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return K.apply("setTimeout",arguments)}function q(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return K.apply("clearTimeout",arguments)}function G(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return K.apply("setInterval",arguments)}function K(){var t,e=this;if(W)try{var n=Array.prototype.slice.apply(arguments);return d.Zone.root.run(H[e],d,n)}catch(t){a("Failed to execute %s inside of zone (via Zone.js). Falling back to execution inside currently active zone.",e,t)}return null===(t=H[e])||void 0===t?void 0:t.apply(d,arguments)}W&&s("Discovered Zone.js globals. Will attempt to register all timers inside the root Zone.");m&&m.getEntriesByType;var Z=m&&"function"==typeof d.PerformanceObserver&&"function"==typeof m.now,Y=Object.freeze({CONNECT_END:"connectEnd",CONNECT_START:"connectStart",DECODED_BODY_SIZE:"decodedBodySize",DOM_COMPLETE:"domComplete",DOM_CONTENT_LOADED_EVENT_END:"domContentLoadedEventEnd",DOM_CONTENT_LOADED_EVENT_START:"domContentLoadedEventStart",DOM_INTERACTIVE:"domInteractive",DOMAIN_LOOKUP_END:"domainLookupEnd",DOMAIN_LOOKUP_START:"domainLookupStart",ENCODED_BODY_SIZE:"encodedBodySize",FETCH_START:"fetchStart",LOAD_EVENT_END:"loadEventEnd",LOAD_EVENT_START:"loadEventStart",NAVIGATION_START:"navigationStart",REDIRECT_END:"redirectEnd",REDIRECT_START:"redirectStart",REQUEST_START:"requestStart",RESPONSE_END:"responseEnd",RESPONSE_START:"responseStart",SECURE_CONNECTION_START:"secureConnectionStart",START_TIME:"startTime",UNLOAD_EVENT_END:"unloadEventEnd",UNLOAD_EVENT_START:"unloadEventStart"}),X=new WeakSet;function Q(e){if(!Z)return function(e){var n=0;return{start:function(){n=U()},end:function(){return e({duration:U()-n})},cancel:t}}(e.onEnd);var n,r,i,o,a,u=[];return{start:function(){n=m.now();try{var t,e=null==d?void 0:d.PerformanceObserver;if(e)null===(t=i=new e(c))||void 0===t||t.observe({type:"resource"})}catch(t){}a=z(f,6e5)},end:function(t){if(r)return;if(r=null!=t?t:m.now(),p(),!$())return s();z((function(){return s()}),Math.min(300,e.maxWaitForResourceMillis)),w(v,"visibilitychange",l),o=z(s,e.maxWaitForResourceMillis)},cancel:f};function s(){f();var t=function(){if(!u.length)return;var t,i,o=u.filter((function(t){return t.responseEnd<=r+e.maxToleranceForResourceTimingsMillis&&!X.has(t)}));if(!o.length)return;1===o.length&&(t=o[0]);if(!t){var a,s=L(o);try{for(s.s();!(a=s.n()).done;){var c=a.value,l=Math.abs(r-n-c.duration)+Math.abs(c.responseEnd-r);(void 0===i||l<i)&&(i=l,t=c)}}catch(t){s.e(t)}finally{s.f()}}if(!t)return;return X.add(t),t}();null!=t&&t.duration&&t.duration<864e5?e.onEnd({resource:t,duration:t.duration}):e.onEnd({resource:t,duration:r-n})}function c(t){t.getEntriesByType("resource").filter((function(t){var r=t;return r.startTime>=n&&e.resourceMatcher(r)})).forEach((function(t){u.length>=100&&u.shift(),u.push(t)}))}function l(){$()||s()}function f(){!function(){if(i){try{var t;null===(t=i)||void 0===t||t.disconnect()}catch(t){}i=void 0}}(),o&&(clearTimeout(o),o=void 0),p(),function(){if(!v)return;t=v,e="visibilitychange",n=l,t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n);var t,e,n}()}function p(){a&&(clearTimeout(a),a=void 0)}}function $(){return"visible"===(null==v?void 0:v.visibilityState)||"prerender"===(null==v?void 0:v.visibilityState)}var J="undefined";function tt(t){return Math.round(100*t)/100}function et(t){var e;return"string"!=typeof t?t:new URL(t,null!==(e=null==v?void 0:v.baseURI)&&void 0!==e?e:null==h?void 0:h.href)}function nt(t){try{return et(t).origin===("undefined"!=typeof location?location.origin:void 0)}catch(t){return!1}}var rt=Symbol.for("INSTRUMENTED_BY_DASH0");function it(t,e,n){var r=t[e];r?!0!==r[rt]?(!function(t){t[rt]=!0}(r),t[e]=n(r)):s("".concat(String(e)," has already been instrumented, skipping")):s("".concat(String(e)," is not defined, unable to instrument"))}var ot={endpoints:[],resource:{attributes:[]},scope:{name:"dash0-web-sdk",version:"0.18.5",attributes:[]},signalAttributes:[],ignoreUrls:[],ignoreErrorMessages:[],wrapEventHandlers:!0,wrapTimers:!0,propagateTraceHeadersCorsURLs:[],maxWaitForResourceTimingsMillis:1e4,maxToleranceForResourceTimingsMillis:50,headersToCapture:[],urlAttributeScrubber:e,pageViewInstrumentation:{trackVirtualPageViews:!0,includeParts:[]},enableTransportCompression:!1},at="service.name",ut="service.namespace",st="service.version",ct="deployment.environment.name",lt="deployment.name",ft="deployment.id",dt="event.name",vt="dash0.web.event.id",pt="page.load.id",ht="user_agent.original",mt="user.id",yt="user.name",gt="user.full_name",bt="user.email",Tt="user.hash",Et="user.roles",wt="exception.message",St="exception.type",At="exception.stacktrace",Ot="url.full",It={PAGE_VIEW:"browser.page_view",NAVIGATION_TIMING:"browser.navigation_timing",WEB_VITAL:"browser.web_vital",ERROR:"browser.error"},Nt={UNSPECIFIED:0,TRACE:1,DEBUG:5,INFO:9,WARN:13,ERROR:17,FATAL:21},Ct=0,Lt=1,Rt="pushState",_t="replaceState",xt=1;function kt(){var t,e;return"".concat((t={ephemeralSession:!S},e=0,t.ephemeralSession&&(e|=xt),e.toString(16).padStart(2,"0"))).concat(E(7))}var Pt="d0_session",jt="#",Dt=864e5,Mt=null;function Ut(t,e){if(!S)return s("Storage API is not available and session tracking is therefore not supported."),void(Mt=kt());t||(t=108e5),e||(e=216e5),t=Math.min(t,Dt),e=Math.min(e,Dt);try{var n=function(t){return S&&g?g.getItem(t):null}(Pt),r=function(t){if(!t)return null;var e=t.split(jt);if(e.length<3)return null;var n=e[0],r=parseInt(e[1],10),i=parseInt(e[2],10);if(!n||isNaN(r)||isNaN(i))return null;return{id:n,startTime:r,lastActivityTime:i}}(n);r&&!function(t,e,n){var r=U()-e;if(t.lastActivityTime<r)return!1;var i=U()-n;return t.startTime>=i}(r,t,e)&&(r=null),r?r.lastActivityTime=U():r={id:kt(),startTime:U(),lastActivityTime:U()},function(t,e){S&&g&&g.setItem(t,e)}(Pt,function(t){return t.id+jt+t.startTime+jt+t.lastActivityTime}(r)),Mt=r.id}catch(t){a("Failed to record session information",t)}}function Ft(){if(S)try{!function(t){S&&g&&g.removeItem(t)}(Pt)}catch(t){o("Failed to terminate session",t)}}var Vt=-1,Bt=function(t){addEventListener("pageshow",(function(e){e.persisted&&(Vt=e.timeStamp,t(e))}),!0)},Ht=function(t,e,n,r){var i,o;return function(a){e.value>=0&&(a||r)&&(((o=e.value-(null!=i?i:0))||void 0===i)&&(i=e.value,e.delta=o,e.rating=function(t,e){return t>e[1]?"poor":t>e[0]?"needs-improvement":"good"}(e.value,n),t(e)))}},Wt=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},zt=function(){var t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},qt=function(){var t,e=zt();return null!==(t=null==e?void 0:e.activationStart)&&void 0!==t?t:0},Gt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=zt(),r="navigate";return Vt>=0?r="back-forward-cache":n&&(document.prerendering||qt()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e,rating:"good",delta:0,entries:[],id:"v5-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},Kt=new WeakMap;function Zt(t,e){return Kt.get(t)||Kt.set(t,new e),Kt.get(t)}var Yt,Xt=function(){return C((function t(){N(this,t),R(this,"t",void 0),R(this,"i",0),R(this,"o",[])}),[{key:"h",value:function(t){var e;if(!t.hadRecentInput){var n=this.o[0],r=this.o.at(-1);this.i&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),null===(e=this.t)||void 0===e||e.call(this,t)}}}])}(),Qt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(t){Promise.resolve().then((function(){e(t.getEntries())}))}));return r.observe(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(Object(n),!0).forEach((function(e){R(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({type:t,buffered:!0},n)),r}}catch(t){}},$t=function(t){var e=!1;return function(){e||(t(),e=!0)}},Jt=-1,te=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},ee=function(t){"hidden"===document.visibilityState&&Jt>-1&&(Jt="visibilitychange"===t.type?t.timeStamp:0,re())},ne=function(){addEventListener("visibilitychange",ee,!0),addEventListener("prerenderingchange",ee,!0)},re=function(){removeEventListener("visibilitychange",ee,!0),removeEventListener("prerenderingchange",ee,!0)},ie=function(){if(Jt<0){var t,e=qt(),n=document.prerendering||null===(t=globalThis.performance.getEntriesByType("visibility-state").filter((function(t){return"hidden"===t.name&&t.startTime>e}))[0])||void 0===t?void 0:t.startTime;Jt=null!=n?n:te(),ne(),Bt((function(){setTimeout((function(){Jt=te(),ne()}))}))}return{get firstHiddenTime(){return Jt}}},oe=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},ae=[1800,3e3],ue=[.1,.25],se=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};oe((function(){var n,r=ie(),i=Gt("FCP"),o=Qt("paint",(function(t){var e,a=L(t);try{for(a.s();!(e=a.n()).done;){var u=e.value;"first-contentful-paint"===u.name&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(i.value=Math.max(u.startTime-qt(),0),i.entries.push(u),n(!0)))}}catch(t){a.e(t)}finally{a.f()}}));o&&(n=Ht(t,i,ae,e.reportAllChanges),Bt((function(r){i=Gt("FCP"),n=Ht(t,i,ae,e.reportAllChanges),Wt((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}($t((function(){var n,r=Gt("CLS",0),i=Zt(e,Xt),o=function(t){var e,o=L(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;i.h(a)}}catch(t){o.e(t)}finally{o.f()}i.i>r.value&&(r.value=i.i,r.entries=i.o,n())},a=Qt("layout-shift",o);a&&(n=Ht(t,r,ue,e.reportAllChanges),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(o(a.takeRecords()),n(!0))})),Bt((function(){i.i=0,r=Gt("CLS",0),n=Ht(t,r,ue,e.reportAllChanges),Wt((function(){return n()}))})),setTimeout(n))})))},ce=0,le=1/0,fe=0,de=function(t){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.interactionId&&(le=Math.min(le,r.interactionId),fe=Math.max(fe,r.interactionId),ce=fe?(fe-le)/7+1:0)}}catch(t){n.e(t)}finally{n.f()}},ve=function(){var t;return Yt?ce:null!==(t=performance.interactionCount)&&void 0!==t?t:0},pe=0,he=function(){return C((function t(){N(this,t),R(this,"u",[]),R(this,"l",new Map),R(this,"m",void 0),R(this,"v",void 0)}),[{key:"p",value:function(){pe=ve(),this.u.length=0,this.l.clear()}},{key:"P",value:function(){var t=Math.min(this.u.length-1,Math.floor((ve()-pe)/50));return this.u[t]}},{key:"h",value:function(t){var e;if(null!==(e=this.m)&&void 0!==e&&e.call(this,t),t.interactionId||"first-input"===t.entryType){var n=this.u.at(-1),r=this.l.get(t.interactionId);if(r||this.u.length<10||t.duration>n.T){var i;if(r?t.duration>r.T?(r.entries=[t],r.T=t.duration):t.duration===r.T&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],T:t.duration},this.l.set(r.id,r),this.u.push(r)),this.u.sort((function(t,e){return e.T-t.T})),this.u.length>10){var o,a=L(this.u.splice(10));try{for(a.s();!(o=a.n()).done;){var u=o.value;this.l.delete(u.id)}}catch(t){a.e(t)}finally{a.f()}}null===(i=this.v)||void 0===i||i.call(this,r)}}}}])}(),me=function(t){var e=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?t():(t=$t(t),document.addEventListener("visibilitychange",t,{once:!0}),e((function(){t(),document.removeEventListener("visibilitychange",t)})))},ye=[200,500],ge=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&oe((function(){var n;"interactionCount"in performance||Yt||(Yt=Qt("event",de,{type:"event",buffered:!0,durationThreshold:0}));var r,i=Gt("INP"),o=Zt(e,he),a=function(t){me((function(){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var a=e.value;o.h(a)}}catch(t){n.e(t)}finally{n.f()}var u=o.P();u&&u.T!==i.value&&(i.value=u.T,i.entries=u.entries,r())}))},u=Qt("event",a,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=Ht(t,i,ye,e.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(a(u.takeRecords()),r(!0))})),Bt((function(){o.p(),i=Gt("INP"),r=Ht(t,i,ye,e.reportAllChanges)})))}))},be=function(){return C((function t(){N(this,t),R(this,"m",void 0)}),[{key:"h",value:function(t){var e;null===(e=this.m)||void 0===e||e.call(this,t)}}])}(),Te=[2500,4e3],Ee=!1;function we(t){var e,n,r=[];return n=i,Ee&&n(),v&&d&&(w(v,"visibilitychange",(function(){"visible"!==v.visibilityState&&n()})),w(d,"pagehide",(function(){Ee=!0,n()})),w(d,"beforeunload",(function(){Ee=!0,n()}))),{send:function(n){"visible"===(null==v?void 0:v.visibilityState)?(r.push(n),r.length>=15?i():null==e&&(e=z(i,1e3))):t([n])}};function i(){null!=e&&(clearTimeout(e),e=null),r.length>0&&(t(r.slice()),r.length=0)}}var Se=0,Ae=0;function Oe(t,e){return Ie.apply(this,arguments)}function Ie(){return Ie=I(x().mark((function e(n,r){var i,o,u,c;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s("Transmitting telemetry to endpoints",r),i=JSON.stringify(r),o=i,u=new Blob([i]).size,c=!1,"undefined"==typeof CompressionStream||!ot.enableTransportCompression){e.next=11;break}return e.next=8,Ne(i);case 8:o=e.sent,u=o.byteLength,c=!0;case 11:return e.next=13,Promise.all(ot.endpoints.map(function(){var e=I(x().mark((function e(r){var i,s,l;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(i=new URL(r.url)).pathname=i.pathname+(i.pathname.endsWith("/")?n.substring(1):n),s={"Content-Type":"application/json",Authorization:"Bearer ".concat(r.authToken)},r.dataset&&(s["Dash0-Dataset"]=r.dataset),c&&(s["Content-Encoding"]="gzip"),y){e.next=9;break}return a("Unable to send telemetry, fetch is not defined"),e.abrupt("return");case 9:return Se+=u,Ae++,e.next=13,y(i,{method:"POST",headers:s,body:o,keepalive:Se<=6e4&&Ae<=15});case 13:(l=e.sent).text().catch(t),l.ok||a("Failed to send telemetry to ".concat(i,": ").concat(l.status," ").concat(l.statusText)),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),a("Error sending telemetry to ".concat(r.url).concat(n,":"),e.t0);case 21:return e.prev=21,Se-=u,Ae--,e.finish(21);case 25:case"end":return e.stop()}}),e,null,[[0,18,21,25]])})));return function(t){return e.apply(this,arguments)}}()));case 13:case"end":return e.stop()}}),e)}))),Ie.apply(this,arguments)}function Ne(t){return Ce.apply(this,arguments)}function Ce(){return(Ce=I(x().mark((function t(e){var n,r,i;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new Blob([e]),r=n.stream(),i=r.pipeThrough(new CompressionStream("gzip")),t.abrupt("return",new Response(i).arrayBuffer());case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Le,Re=we((function(t){Oe("/v1/logs",{resourceLogs:[{resource:ot.resource,scopeLogs:[{scope:ot.scope,logRecords:t}]}]}).catch((function(t){u("Failed to transmit logs",t)}))})),_e=we((function(t){Oe("/v1/traces",{resourceSpans:[{resource:ot.resource,scopeSpans:[{scope:ot.scope,spans:t}]}]}).catch((function(t){u("Failed to transmit spans",t)}))}));function xe(){var t,e,n,r,i;return Le||(e=(t={maxCallsPerTenMinutes:4096,maxCallsPerTenSeconds:128}).maxCallsPerTenMinutes,n=t.maxCallsPerTenSeconds,r=0,i=0,G((function(){r=0}),6e5),G((function(){i=0}),1e4),Le=function(){return++r>e||++i>n}),Le()}function ke(t){xe()?s("Transport rate limit. Will not send item.",t):Re.send(t)}function Pe(t){t&&(xe()?s("Transport rate limit. Will not send item.",t):_e.send(t))}var je=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"];function De(t){if(null!=t){var e={};return Array.isArray(t)?e.arrayValue={values:t.map((function(t){return De(t)}))}:"string"==typeof t?e.stringValue=t:"number"==typeof t?e.doubleValue=t:"boolean"==typeof t?e.boolValue=t:!function(t){if(null==t||"object"!==D(t))return!1;var e=Object.keys(t);return 1===e.length&&je.includes(e[0])}(t)?"object"===D(t)&&(e.kvlistValue={values:Object.entries(t).map((function(t){var e=k(t,2);return Me(e[0],e[1])}))}):e=t,e}}function Me(t,e){return{key:t,value:De(e)}}function Ue(t,e,n){e&&t.push(Me(e,n))}function Fe(t,e){e&&Object.entries(e).forEach((function(e){var n=k(e,2),r=n[0],i=n[1];return Ue(t,r,i)}))}function Ve(t,e){var n=t.findIndex((function(t){return t.key===e}));-1!==n&&t.splice(n,1)}var Be="traceparent",He=/^00-([a-f0-9]{32})-([a-f0-9]{16})-[0-9]{1,2}$/;function We(){var t,e,n=((null===(t=Array.from(null!==(e=null==v?void 0:v.getElementsByTagName("meta"))&&void 0!==e?e:[]).find((function(t){var e;return(null===(e=t.getAttribute("name"))||void 0===e?void 0:e.toLowerCase())===Be})))||void 0===t?void 0:t.content.trim())||"").match(He)||function(){var t=m.getEntriesByType("navigation")[0];if(!t)return"";if(!t.serverTiming)return"";return function(t){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.name===Be)return r.description.trim()}}catch(t){n.e(t)}finally{n.f()}return""}(t.serverTiming)}().match(He);if(n)return{traceId:n[1],spanId:n[2]}}function ze(t,e,n){t.call(e,"traceparent","00-".concat(n.traceId,"-").concat(n.spanId,"-01"))}function qe(t,e,n){var r,i,o,a=(r=n.traceId,i=r.substring(0,8),o=r.substring(8,32),"1-".concat(i,"-").concat(o)),u="Root=".concat(a,";Parent=").concat(n.spanId,";Sampled=1");t.call(e,"X-Amzn-Trace-Id",u)}var Ge="d042",Ke=1;function Ze(t){var e=0;return t.withoutSession&&(e|=Ke),e.toString(16).padStart(2,"0")}for(var Ye=new Uint32Array(256),Xe=0;Xe<256;Xe++){for(var Qe=Xe,$e=0;$e<8;$e++)Qe=1&Qe?3988292384^Qe>>>1:Qe>>>1;Ye[Xe]=Qe>>>0}function Je(t){var e=function(t){for(var e=new Uint8Array(t.length/2),n=0;n<t.length;n+=2)e[n/2]=parseInt(t.substring(n,n+2),16);for(var r=4294967295,i=0;i<e.length;i++){var o=e[i];r=r>>>8^Ye[255&(r^o)]}return(4294967295^r)>>>0}(t).toString(16).padStart(8,"0");return"".concat(e).concat(E(4))}function tn(t){var e=function(t){return t?"".concat(Ge).concat(Ze({withoutSession:!1})).concat(t).concat(E(5)):"".concat(Ge).concat(Ze({withoutSession:!0})).concat(E(13))}(Mt),n=Je(e),r=[];return Ue(r,vt,n),{traceId:e,spanId:n,name:t,kind:3,startTimeUnixNano:F(),attributes:r,events:[],links:[],status:{code:0}}}function en(t,e,n){var r=t;if(!r.endTimeUnixNano)return e&&(r.status=e),r.endTimeUnixNano=null!=n?String(Math.round(parseInt(r.startTimeUnixNano)+n)):F(),r;s("Attempting to end already ended span. Dropping...",r)}function nn(t,e,n,r){var i=void 0,o=void 0;"string"==typeof n?i=n:Array.isArray(n)&&(o=n),t.events.push({name:e,timeUnixNano:null!=i?i:F(),attributes:null!=o?o:[]})}function rn(t,n,r){var i=function(t){return t?Array.isArray(t)?function(e){return[].concat(P(t),[e]).join(".")}:function(e){return"".concat(t,".").concat(e)}:function(t){return t}}(r);try{var o=et(n);o.username&&(o.username="REDACTED"),o.password&&(o.password="REDACTED");var a=ot.urlAttributeScrubber(R(R(R(R(R(R({},Ot,o.href),"url.path",o.pathname),"url.domain",o.hostname),"url.scheme",o.protocol.replace(":","")),"url.fragment",o.hash?o.hash.replace("#",""):void 0),"url.query",o.search?o.search.replace("?",""):void 0));Object.entries(a).forEach((function(e){var n=k(e,2),r=n[0],o=n[1];void 0!==o&&Ue(t,i(r),o)}))}catch(r){ot.urlAttributeScrubber===e&&Ue(t,i(Ot),String(n))}}var on=null!=b&&"function"==typeof b.getItem&&"function"==typeof b.setItem;var an="d0_tab",un=null;function sn(){if(on)try{var t=function(t){return on&&b?b.getItem(t):null}(an);if(t)return void(un=t);un=E(8),function(t,e){on&&b&&b.setItem(t,e)}(an,un)}catch(t){a("Failed to record tab ID information",t)}else s("Storage API is not available and tab tracking is therefore not supported.")}function cn(t,e){var n,r,i,o,a;void 0===t.find((function(t){return t.key===vt}))&&Ue(t,vt,E(8));for(var u=0;u<ot.signalAttributes.length;u++)t.push(ot.signalAttributes[u]);rn(t,null!==(n=null!==(r=null==e?void 0:e.url)&&void 0!==r?r:null==d?void 0:d.location.href)&&void 0!==n?n:J,"page"),Mt&&Ue(t,"session.id",Mt),un&&Ue(t,"browser.tab.id",un),Ue(t,"browser.window.width",null!==(i=null==d?void 0:d.innerWidth)&&void 0!==i?i:J),Ue(t,"browser.window.height",null!==(o=null==d?void 0:d.innerHeight)&&void 0!==o?o:J);var s=null==p||null===(a=p.connection)||void 0===a?void 0:a.effectiveType;s&&Ue(t,"network.connection.subtype",s)}function ln(){!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};oe((function(){var n,r=ie(),i=Gt("LCP"),o=Zt(e,be),a=function(t){e.reportAllChanges||(t=t.slice(-1));var a,u=L(t);try{for(u.s();!(a=u.n()).done;){var s=a.value;o.h(s),s.startTime<r.firstHiddenTime&&(i.value=Math.max(s.startTime-qt(),0),i.entries=[s],n())}}catch(t){u.e(t)}finally{u.f()}},u=Qt("largest-contentful-paint",a);if(u){n=Ht(t,i,Te,e.reportAllChanges);for(var s=$t((function(){a(u.takeRecords()),u.disconnect(),n(!0)})),c=0,l=["keydown","click","visibilitychange"];c<l.length;c++)addEventListener(l[c],(function(){return me(s)}),{capture:!0,once:!0});Bt((function(r){i=Gt("LCP"),n=Ht(t,i,Te,e.reportAllChanges),Wt((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))}}))}(fn,{reportAllChanges:!0}),ge(fn,{reportAllChanges:!0}),se(fn,{reportAllChanges:!0})}function fn(t){var e=[];Ue(e,dt,It.WEB_VITAL);var n=[];Ue(n,"name",t.name),Ue(n,"value",tt(t.value)),Ue(n,"delta",tt(t.delta));var r={timeUnixNano:F(),attributes:e,severityNumber:Nt.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};cn(r.attributes),ke(r)}function dn(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].test(e))return!0;return!1}var vn="data:";function pn(t){return!t||(!(t=String(t))||(null==t.substring||t.substring(0,5).toLowerCase()===vn||(!!function(t){for(var e=t.toLowerCase(),n=0,r=ot.endpoints.length;n<r;n++){var i=ot.endpoints[n];if(e.startsWith(i.url))return!0}return!1}(t)||dn(ot.ignoreUrls,t))))}var hn,mn=0,yn=0,gn={},bn=!1;function Tn(){bn=!0}function En(t,e){t&&wn("string"==typeof t?{message:t,opts:e}:{message:t.message,type:t.name,stack:t.stack,opts:e})}function wn(t){var e=t.message,n=t.type,r=t.stack,i=t.opts;if(e&&!(mn>100)&&!function(t){return!t||dn(ot.ignoreErrorMessages,t)}(e)){yn>=20&&(gn={},yn=0);var o=(e=String(e).substring(0,300))+(r=function(t){return String(t||"").split("\n").slice(0,30).join("\n")}(r))+(null==d?void 0:d.location.href),a=gn[o];if(a)a.seenCount++;else{var u=[];cn(u),Ue(u,dt,It.ERROR),Ue(u,wt,e),n&&Ue(u,St,n),r&&Ue(u,At,r),null!=i&&i.componentStack&&Ue(u,"exception.component_stack",null==i?void 0:i.componentStack.substring(0,2048)),Fe(u,null==i?void 0:i.attributes),a={seenCount:1,transmittedCount:0,log:{timeUnixNano:F(),attributes:u,severityNumber:Nt.ERROR,severityText:"ERROR",body:{stringValue:e}}},gn[o]=a,yn++}!function(){if(hn)return;hn=setTimeout(Sn,1e3)}()}}function Sn(){for(var t in hn&&(clearTimeout(hn),hn=null),gn)if(f(gn,t)){var e=gn[t];e.seenCount>e.transmittedCount&&(ke(e.log),mn++)}gn={},yn=0}var An="Unhandled promise rejection: ",On="<unavailable because Promise wasn't rejected with an Error object>";function In(t){null==t.reason?En({message:An+"<no reason defined>",stack:On}):"string"==typeof t.reason.message?En({message:An+t.reason.message,stack:"string"==typeof t.reason.stack?t.reason.stack:On}):"object"!==D(t.reason)&&En({message:An+t.reason,stack:On})}var Nn="__dash0OriginalFunctions";function Cn(t,e){for(var n=t[Nn],r=0;r<n.length;r++){if(Ln(n[r].valuesForEqualityCheck,e))return r}return-1}function Ln(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Rn(t,e,n,r,i){return function(t,e,n){if(!t)return e;var r=t[Nn]=t[Nn]||[],i=Cn(t,n);return-1!==i?r[i].wrappedFunction:(r.push({wrappedFunction:e,valuesForEqualityCheck:n}),e)}(t,e,_n(n,r,i))}function _n(t,e,n){return[t,e,xn(n)]}function xn(t){return null!=t&&("object"===D(t)?Boolean(t.capture):Boolean(t))}function kn(t,e,n,r,i){return function(t,e,n){var r=null==t?void 0:t[Nn];if(null==r)return n;var i=Cn(t,e);if(-1===i)return n;var o=r[i];return r.splice(i,1),o.wrappedFunction}(t,_n(e,n,r),i)}function Pn(){ot.wrapEventHandlers&&function(t){if(!t||"function"!=typeof t.prototype.addEventListener||"function"!=typeof t.prototype.removeEventListener)return;var e=t.prototype.addEventListener,n=t.prototype.removeEventListener;t.prototype.addEventListener=function(t,n,r){if("function"!=typeof n)return e.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=function(){try{return n.apply(this,arguments)}catch(t){throw En(t),Tn(),t}},i[1]=Rn(this,i[1],t,n,r),e.apply(this,i)},t.prototype.removeEventListener=function(t,e,r){if("function"!=typeof e)return n.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=kn(this,t,e,r,e),n.apply(this,i)}}(null==d?void 0:d.EventTarget)}function jn(t){var e=null==d?void 0:d[t];"function"==typeof e&&(d[t]=function(t){for(var n=new Array(arguments.length),r=0;r<arguments.length;r++)n[r]=arguments[r];return n[0]=function(t){if("function"!=typeof t)return t;return function(){try{return t.apply(this,arguments)}catch(t){throw reportError(t),Tn(),t}}}(t),e.apply(this,n)})}function Dn(){!function(){if(d){var t=d.onerror;d.onerror=function(e,n,r,i,o){if(bn)return bn=!1,"function"==typeof t?t.apply(this,arguments):void 0;var a=o&&o.stack;return a||(a="at "+n+" "+r,null!=i&&(a+=":"+i)),wn({message:String(e),stack:a}),"function"==typeof t?t.apply(this,arguments):void 0}}}(),"function"==typeof(null==d?void 0:d.addEventListener)&&d.addEventListener("unhandledrejection",In),Pn(),function(){if(ot.wrapTimers){if(W)return void a("We discovered a usage of Zone.js. In order to avoid any incompatibility issues timer wrapping is not going to be enabled.");jn("setTimeout"),jn("setInterval")}}()}var Mn=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"];function Un(t){return Mn.includes(t)}function Fn(t,e){var n=0!==e.startTime;Vn(t,Y.FETCH_START,e,n),Vn(t,Y.DOMAIN_LOOKUP_START,e,n),Vn(t,Y.DOMAIN_LOOKUP_END,e,n),Vn(t,Y.CONNECT_START,e,n),Vn(t,Y.SECURE_CONNECTION_START,e,n),Vn(t,Y.CONNECT_END,e,n),Vn(t,Y.REQUEST_START,e,n),Vn(t,Y.RESPONSE_START,e,n),Vn(t,Y.RESPONSE_END,e,n)}function Vn(t,e,n){var r,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];!(e in n)||"number"!=typeof n[e]||i&&0===n[e]||nn(t,e,(r=n[e],String(Math.round(1e6*(r+B())))))}function Bn(t,e){var n=e.encodedBodySize;null!=n&&Ue(t.attributes,"http.response.body.size",n)}function Hn(t){return function(){var e=I(x().mark((function e(n,r){var i,o,a,u,c,l,f,d,v,p,h,m,y,g,b;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r?Object.assign({},r):r,u=null,null!==(i=a)&&void 0!==i&&i.body&&(u=a.body,a.body=void 0),c=new Request(n,a),u&&a&&(a.body=u),!pn(l=c.url)){e.next=9;break}return s("Not creating span for fetch call because the url is ignored, URL: ".concat(l)),e.abrupt("return",t(n instanceof Request?c:n,r));case 9:return f=null!==(o=c.method)&&void 0!==o?o:"GET",d=Un(f),v=Un(f.toUpperCase()),p=v?f.toUpperCase():"_OTHER",cn((h=tn("HTTP ".concat(p))).attributes),rn(h.attributes,l),Wn(n,r),Ue(h.attributes,"http.request.method",p),d||Ue(h.attributes,"http.request.method_original",f),m=Zn(l),m.length>0&&(null!==(y=a)&&void 0!==y&&y.headers?(a.headers=new Headers(a.headers),Yn(a.headers.append,a.headers,h,m)):n instanceof Request?Yn(c.headers.append,c.headers,h,m):(a||(a={}),a.headers=new Headers,Yn(a.headers.append,a.headers,h,m))),zn(c.headers,h,(function(t){return e=t,"".concat("http.request.header",".").concat(e.toLowerCase());var e})),(g=Q({resourceMatcher:function(t){var e=t.initiatorType,n=t.name;return("fetch"===e||"xmlhttprequest"===e)&&n===et(l).href},maxWaitForResourceMillis:ot.maxWaitForResourceTimingsMillis,maxToleranceForResourceTimingsMillis:ot.maxToleranceForResourceTimingsMillis,onEnd:function(t){var e=t.duration,n=t.resource;n&&(Fn(h,n),Bn(h,n)),Pe(en(h,void 0,1e6*e))}})).start(),e.prev=25,e.next=28,t(n instanceof Request?c:n,a);case 28:return b=e.sent,qn(h,b),e.abrupt("return",Gn(b,ot.maxToleranceForResourceTimingsMillis,(function(){return g.end()}),(function(t){g.cancel(),Kn(h,t)})));case 33:throw e.prev=33,e.t0=e.catch(25),g.cancel(),Kn(h,e.t0),e.t0;case 38:case"end":return e.stop()}}),e,null,[[25,33]])})));return function(t,n){return e.apply(this,arguments)}}()}function Wn(t,e,n){try{return void 0}catch(n){s("failed to analyze request for GraphQL insights",n,t,e)}}function zn(t,e,n){try{if(!ot.headersToCapture.length)return;t.forEach((function(t,r){ot.headersToCapture.some((function(t){return t.test(r)}))&&Ue(e.attributes,n(r),t)}))}catch(t){s("unable to capture http headers due to CORS policy")}}function qn(t,e){var n=e.status;!function(t,e,n){t.status={code:e,message:n}}(t,n>=200&&n<400?0:2),0===n&&Ue(t.attributes,"error.type",e.type),Ue(t.attributes,"http.response.status_code",String(n)),zn(e.headers,t,(function(t){return e=t,"".concat("http.response.header",".").concat(e.toLowerCase());var e}))}function Gn(t,e,n,r){var i,o,a=m.now(),u=t.body;if(!(u&&(i=t,o=i.status,o>=200&&204!=o&&205!=o&&304!=o)))return n(),t;var s=!1,c=function(t){s||(n(t),s=!0)},l=function(t){s||(r(t),s=!0)},f=z((function(){return c(a)}),e),d=u.getReader(),v=new ReadableStream({pull:function(t){return I(x().mark((function n(){var r,i;return x().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,q(f),n.next=4,d.read();case 4:r=n.sent,i=r.value,r.done?(d.releaseLock(),t.close(),c()):(a=m.now(),f=z((function(){return c(a)}),e),t.enqueue(i)),n.next=15;break;case 10:n.prev=10,n.t0=n.catch(0),l(n.t0),t.error(n.t0);try{d.releaseLock()}catch(t){}case 15:case"end":return n.stop()}}),n,null,[[0,10]])})))()},cancel:function(t){return q(f),c(),d.cancel(t)}});return new Response(v,{status:t.status,statusText:t.statusText,headers:t.headers})}function Kn(t,e){!function(t,e){var n=[];"string"==typeof e?Ue(n,wt,e):e&&(e.code?Ue(n,St,e.code.toString()):e.name&&Ue(n,St,e.name),e.message&&Ue(n,wt,e.message),e.stack&&Ue(n,At,e.stack),nn(t,"exception",n))}(t,e),Pe(en(t,function(t){return{code:2,message:t&&"object"===D(t)&&"message"in t?t.message:String(t)}}(e),void 0))}function Zn(t){var e=[];if(nt(t)){if(e.push("traceparent"),ot.propagators){var n,r=L(ot.propagators);try{for(r.s();!(n=r.n()).done;){var i=n.value;"traceparent"===i.type||e.includes(i.type)||e.push(i.type)}}catch(t){r.e(t)}finally{r.f()}}return e}if(ot.propagators){var o,a=L(ot.propagators);try{for(a.s();!(o=a.n()).done;){var u=o.value;dn(u.match,t)&&(e.includes(u.type)||e.push(u.type))}}catch(t){a.e(t)}finally{a.f()}return e}return[]}function Yn(t,e,n,r){var i,o=L(r);try{for(o.s();!(i=o.n()).done;){"xray"===i.value?qe(t,e,n):ze(t,e,n)}}catch(t){o.e(t)}finally{o.f()}}function Xn(t,e,n,r){var i,o,a=function(t){var e,n,r;return t&&null!==(e=null===(n=(r=ot.pageViewInstrumentation).generateMetadata)||void 0===n?void 0:n.call(r,t))&&void 0!==e?e:{}}(e),u=[];Ue(u,dt,It.PAGE_VIEW),a.attributes&&Object.entries(a.attributes).forEach((function(t){var e=k(t,2),n=e[0],r=e[1];return Ue(u,n,r)})),cn(u,{url:e});var s=[];Ue(s,"title",null!==(i=null!==(o=a.title)&&void 0!==o?o:null==v?void 0:v.title)&&void 0!==i?i:J),null!=v&&v.referrer&&Ue(s,"referrer",v.referrer),Ue(s,"type",n?Lt:Ct),Ue(s,"change_state",r?_t:Rt);var c={timeUnixNano:t,attributes:u,severityNumber:Nt.INFO,severityText:"INFO",body:{kvlistValue:{values:s}}},l=We();l&&(c.traceId=l.traceId,c.spanId=l.spanId),ke(c)}function Qn(){var t=null==d?void 0:d.performance.getEntriesByType("navigation")[0];if(t){var e=[];Ue(e,dt,It.NAVIGATION_TIMING);var n=[];Ue(n,"name",t.name),$n(n,t,"responseStatus"),$n(n,t,"fetchStart"),$n(n,t,"requestStart"),$n(n,t,"responseStart"),$n(n,t,"domInteractive"),$n(n,t,"domContentLoadedEventEnd"),$n(n,t,"domComplete"),$n(n,t,"loadEventEnd"),$n(n,t,"transferSize"),$n(n,t,"encodedBodySize"),$n(n,t,"decodedBodySize");var r={timeUnixNano:Jn(),attributes:e,severityNumber:Nt.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};cn(r.attributes);var i=We();i&&(r.traceId=i.traceId,r.spanId=i.spanId),ke(r)}else s("Navigation timings not available. Cannot emit navigation timing log")}function $n(t,e,n){var r=e[n];"number"!=typeof r||isNaN(r)||Ue(t,n,Number.isInteger(r)?r:tt(r))}function Jn(){return V(Math.round(B()))}var tr={},er=!1,nr=!1;function rr(){or(null==d?void 0:d.location.href)}function ir(t){or(t.newURL)}function or(t,e){var n;if(t)try{var r=new URL(t,null==d?void 0:d.location.href);((n=r).pathname!==tr.path||nr&&n.search!==tr.search||er&&n.hash!==tr.hash)&&(ar(r),Xn(F(),r,!0,Boolean(e)))}catch(t){s("Failed to handle url change",t)}}function ar(t){tr.path=t.pathname,tr.search=t.search,tr.hash=t.hash}function ur(){!function(){try{Xn(Jn(),null!=d&&d.location.href?new URL(null==d?void 0:d.location.href):void 0)}catch(t){u("Failed to transmit initial page view event",t)}if("complete"===(null==v?void 0:v.readyState))return Qn();d&&w(d,"load",(function(){setTimeout(Qn,0)}))}(),function(){var t,e,n,r;if(d&&d.history){if(ot.pageViewInstrumentation.trackVirtualPageViews){nr=null!==(t=null===(e=ot.pageViewInstrumentation.includeParts)||void 0===e?void 0:e.includes("SEARCH"))&&void 0!==t&&t,er=null!==(n=null===(r=ot.pageViewInstrumentation.includeParts)||void 0===r?void 0:r.includes("HASH"))&&void 0!==n&&n,it(d.history,"replaceState",(function(t){return function(e,n,r){return or(r?String(r):void 0,!0),t.apply(this,[e,n,r])}})),it(d.history,"pushState",(function(t){return function(e,n,r){return or(r?String(r):void 0),t.apply(this,[e,n,r])}})),d.addEventListener("hashchange",ir),d.addEventListener("popstate",rr);try{ar(new URL(d.location.href))}catch(t){}}}else s("Browser does not support history API, skipping instrumentation")}()}var sr=function(t){if("object"===D(t)&&null!==t){if("function"==typeof Object.getPrototypeOf){var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}return"[object Object]"===Object.prototype.toString.call(t)}return!1},cr=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce((function(t,e){if(void 0===e)return t;if(Array.isArray(e))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(e).forEach((function(n){["__proto__","constructor","prototype"].includes(n)||(Array.isArray(t[n])&&Array.isArray(e[n])?t[n]=cr.options.mergeArrays?cr.options.uniqueArrayItems?Array.from(new Set(t[n].concat(e[n]))):[].concat(P(t[n]),P(e[n])):e[n]:sr(t[n])&&sr(e[n])?t[n]=cr(t[n],e[n]):!sr(t[n])&&sr(e[n])?t[n]=cr(e[n],void 0):t[n]=void 0===e[n]?cr.options.allowUndefinedOverrides?e[n]:t[n]:e[n])})),t}),{})},lr={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};cr.options=lr,cr.withOptions=function(t){cr.options=Object.assign(Object.assign({},lr),t);for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=cr.apply(void 0,n);return cr.options=lr,i};var fr=!1;function dr(t){if(fr)s("Dash0 SDK is being reinitialized, skipping ...");else if(null!=d)if("function"==typeof y&&m&&m.getEntriesByType){var e;if(!t.serviceName.trim())s("Missing or empty serviceName value. Falling back to location.hostname."),t.serviceName=null!==(e=null==h?void 0:h.hostname)&&void 0!==e?e:"unknown";ot.endpoints=t.endpoint instanceof Array?t.endpoint:[t.endpoint],0!==ot.endpoints.length?(Object.assign(ot,cr(ot,function(t,e){var n,r={},i=L(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;o in t&&(r[o]=t[o])}}catch(t){i.e(t)}finally{i.f()}return r}(t,["ignoreUrls","ignoreErrorMessages","wrapEventHandlers","wrapTimers","propagateTraceHeadersCorsURLs","maxWaitForResourceTimingsMillis","maxToleranceForResourceTimingsMillis","headersToCapture","urlAttributeScrubber","pageViewInstrumentation","enableTransportCompression"]))),function(t){t.propagators?(t.propagateTraceHeadersCorsURLs&&a("Both 'propagators' and deprecated 'propagateTraceHeadersCorsURLs' were provided. Using 'propagators' configuration. Please migrate to the new 'propagators' config."),ot.propagators=t.propagators):t.propagateTraceHeadersCorsURLs&&t.propagateTraceHeadersCorsURLs.length>0?(a("'propagateTraceHeadersCorsURLs' is deprecated. Please use the new 'propagators' configuration."),ot.propagators=[{type:"traceparent",match:P(t.propagateTraceHeadersCorsURLs)}]):ot.propagators=[{type:"traceparent",match:[]}]}(t),function(t){Ue(ot.resource.attributes,at,t.serviceName),t.serviceNamespace&&Ue(ot.resource.attributes,ut,t.serviceNamespace);t.serviceVersion&&Ue(ot.resource.attributes,st,t.serviceVersion);var e=function(t){if(t.environment)return t.environment;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_ENV}catch(t){return}}(t);e&&Ue(ot.resource.attributes,ct,e);var n=function(t){if(t.deploymentName)return t.deploymentName;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_TARGET_ENV}catch(t){return}}(t);n&&Ue(ot.resource.attributes,lt,n);var r=function(t){if(t.deploymentId)return t.deploymentId;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_BRANCH_URL}catch(t){return}}(t);r&&Ue(ot.resource.attributes,ft,r)}(t),function(t){var e;Ue(ot.signalAttributes,pt,E(16)),Ue(ot.signalAttributes,ht,null!==(e=null==p?void 0:p.userAgent)&&void 0!==e?e:J),t.additionalSignalAttributes&&Object.entries(t.additionalSignalAttributes).forEach((function(t){var e=k(t,2),n=e[0],r=e[1];Ue(ot.signalAttributes,n,r)}))}(t),sn(),Ut(t.sessionInactivityTimeoutMillis,t.sessionTerminationTimeoutMillis),vr("@dash0/navigation",t)&&ur(),vr("@dash0/web-vitals",t)&&ln(),vr("@dash0/error",t)&&Dn(),vr("@dash0/fetch",t)&&(d&&d.fetch&&d.Request?it(d,"fetch",Hn):s("Browser does not support the Fetch API, skipping instrumentation")),fr=!0):a("No telemetry endpoint configured. Aborting Dash0 Web SDK initialization process.")}else s("Stopping Dash0 Web SDK initialization. This browser does not support the necessary APIs.");else s("Looks like we are not running in a browser context. Stopping Dash0 Web SDK initialization.")}function vr(t,e){var n=e.enabledInstrumentations;return!n||n.includes(t)}function pr(t,e){Ve(ot.signalAttributes,mt),null!=t&&Ue(ot.signalAttributes,mt,t),Ve(ot.signalAttributes,yt),null!=(null==e?void 0:e.name)&&Ue(ot.signalAttributes,yt,e.name),Ve(ot.signalAttributes,gt),null!=(null==e?void 0:e.fullName)&&Ue(ot.signalAttributes,gt,e.fullName),Ve(ot.signalAttributes,bt),null!=(null==e?void 0:e.email)&&Ue(ot.signalAttributes,bt,e.email),Ve(ot.signalAttributes,Tt),null!=(null==e?void 0:e.hash)&&Ue(ot.signalAttributes,Tt,e.hash),Ve(ot.signalAttributes,Et),null!=(null==e?void 0:e.roles)&&Ue(ot.signalAttributes,Et,e.roles)}function hr(){s("Dash0 Web SDK configuration state:",ot)}function mr(t,e){Ue(ot.signalAttributes,t,e)}function yr(t){Ve(ot.signalAttributes,t)}function gr(t,e){if(Object.values(It).includes(t))a("Unable to send custom event ".concat(t,". You are not allowed to use an internal event name while sending a custom event. Dropping event..."));else{var n=[];cn(n),Ue(n,dt,t),null!=e&&e.title&&Ue(n,"dash0.web.event.title",e.title),Fe(n,null==e?void 0:e.attributes),ke({timeUnixNano:null!=(null==e?void 0:e.timestamp)?V(e.timestamp):F(),attributes:n,body:De(null==e?void 0:e.data),severityText:null==e?void 0:e.severity,severityNumber:null!=e&&e.severity?Nt[e.severity]:void 0})}}function br(t,e){En(t,e)}function Tr(t){s("".concat("Initializing Dash0 Web SDK"," (via package)")),dr(t)}export{mr as addSignalAttribute,hr as debug,pr as identify,Tr as init,yr as removeSignalAttribute,br as reportError,gr as sendEvent,i as setActiveLogLevel,Ft as terminateSession};
2
2
  //# sourceMappingURL=dash0.js.map