@grafana/faro-web-tracing 1.8.2 → 1.9.0

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.
@@ -1,4 +1,4 @@
1
- var GrafanaFaroWebTracing=function(t,e){"use strict";var n="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},r="1.9.0",o=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;var i=function(t){var e=new Set([t]),n=new Set,r=t.match(o);if(!r)return function(){return!1};var i=+r[1],a=+r[2],s=+r[3];if(null!=r[4])return function(e){return e===t};function u(t){return n.add(t),!1}function c(t){return e.add(t),!0}return function(t){if(e.has(t))return!0;if(n.has(t))return!1;var r=t.match(o);if(!r)return u(t);var l=+r[1],p=+r[2],f=+r[3];return null!=r[4]||i!==l?u(t):0===i?a===p&&s<=f?c(t):u(t):a<=p?c(t):u(t)}}(r),a=r.split(".")[0],s=Symbol.for("opentelemetry.js.api."+a),u=n;function c(t,e,n,o){var i;void 0===o&&(o=!1);var a=u[s]=null!==(i=u[s])&&void 0!==i?i:{version:r};if(!o&&a[t]){var c=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return n.error(c.stack||c.message),!1}if(a.version!==r){c=new Error("@opentelemetry/api: Registration of version v"+a.version+" for "+t+" does not match previously registered API v"+r);return n.error(c.stack||c.message),!1}return a[t]=e,n.debug("@opentelemetry/api: Registered a global for "+t+" v"+r+"."),!0}function l(t){var e,n,r=null===(e=u[s])||void 0===e?void 0:e.version;if(r&&i(r))return null===(n=u[s])||void 0===n?void 0:n[t]}function p(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+r+".");var n=u[s];n&&delete n[t]}var f,h=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},d=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},_=function(){function t(t){this._namespace=t.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return v("debug",this._namespace,t)},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return v("error",this._namespace,t)},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return v("info",this._namespace,t)},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return v("warn",this._namespace,t)},t.prototype.verbose=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return v("verbose",this._namespace,t)},t}();function v(t,e,n){var r=l("diag");if(r)return n.unshift(e),r[t].apply(r,d([],h(n),!1))}!function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"}(f||(f={}));var g=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},y=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},E=function(){function t(){function t(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=l("diag");if(r)return r[t].apply(r,y([],g(e),!1))}}var e=this;e.setLogger=function(t,n){var r,o,i;if(void 0===n&&(n={logLevel:f.INFO}),t===e){var a=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return e.error(null!==(r=a.stack)&&void 0!==r?r:a.message),!1}"number"==typeof n&&(n={logLevel:n});var s=l("diag"),u=function(t,e){function n(n,r){var o=e[n];return"function"==typeof o&&t>=r?o.bind(e):function(){}}return t<f.NONE?t=f.NONE:t>f.ALL&&(t=f.ALL),e=e||{},{error:n("error",f.ERROR),warn:n("warn",f.WARN),info:n("info",f.INFO),debug:n("debug",f.DEBUG),verbose:n("verbose",f.VERBOSE)}}(null!==(o=n.logLevel)&&void 0!==o?o:f.INFO,t);if(s&&!n.suppressOverrideMessage){var p=null!==(i=(new Error).stack)&&void 0!==i?i:"<failed to generate stacktrace>";s.warn("Current logger will be overwritten from "+p),u.warn("Current logger will overwrite one already registered from "+p)}return c("diag",u,e,!0)},e.disable=function(){p("diag",e)},e.createComponentLogger=function(t){return new _(t)},e.verbose=t("verbose"),e.debug=t("debug"),e.info=t("info"),e.warn=t("warn"),e.error=t("error")}return t.instance=function(){return this._instance||(this._instance=new t),this._instance},t}(),T=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},m=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},b=function(){function t(t){this._entries=t?new Map(t):new Map}return t.prototype.getEntry=function(t){var e=this._entries.get(t);if(e)return Object.assign({},e)},t.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map((function(t){var e=T(t,2);return[e[0],e[1]]}))},t.prototype.setEntry=function(e,n){var r=new t(this._entries);return r._entries.set(e,n),r},t.prototype.removeEntry=function(e){var n=new t(this._entries);return n._entries.delete(e),n},t.prototype.removeEntries=function(){for(var e,n,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=new t(this._entries);try{for(var a=m(r),s=a.next();!s.done;s=a.next()){var u=s.value;i._entries.delete(u)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return i},t.prototype.clear=function(){return new t},t}(),S=Symbol("BaggageEntryMetadata"),O=E.instance();function R(t){return void 0===t&&(t={}),new b(new Map(Object.entries(t)))}function w(t){return Symbol.for(t)}var P,L,A=function t(e){var n=this;n._currentContext=e?new Map(e):new Map,n.getValue=function(t){return n._currentContext.get(t)},n.setValue=function(e,r){var o=new t(n._currentContext);return o._currentContext.set(e,r),o},n.deleteValue=function(e){var r=new t(n._currentContext);return r._currentContext.delete(e),r}},C=new A,k=(P=function(t,e){return P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},P(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}P(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),I=function(){function t(){}return t.prototype.createGauge=function(t,e){return G},t.prototype.createHistogram=function(t,e){return X},t.prototype.createCounter=function(t,e){return F},t.prototype.createUpDownCounter=function(t,e){return V},t.prototype.createObservableGauge=function(t,e){return W},t.prototype.createObservableCounter=function(t,e){return q},t.prototype.createObservableUpDownCounter=function(t,e){return K},t.prototype.addBatchObservableCallback=function(t,e){},t.prototype.removeBatchObservableCallback=function(t){},t}(),N=function(){},x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return k(e,t),e.prototype.add=function(t,e){},e}(N),D=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return k(e,t),e.prototype.add=function(t,e){},e}(N),M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return k(e,t),e.prototype.record=function(t,e){},e}(N),j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return k(e,t),e.prototype.record=function(t,e){},e}(N),U=function(){function t(){}return t.prototype.addCallback=function(t){},t.prototype.removeCallback=function(t){},t}(),Z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return k(e,t),e}(U),B=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return k(e,t),e}(U),H=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return k(e,t),e}(U),z=new I,F=new x,G=new M,X=new j,V=new D,q=new Z,W=new B,K=new H,Y={get:function(t,e){if(null!=t)return t[e]},keys:function(t){return null==t?[]:Object.keys(t)}},$={set:function(t,e,n){null!=t&&(t[e]=n)}},Q=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},J=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},tt=function(){function t(){}return t.prototype.active=function(){return C},t.prototype.with=function(t,e,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];return e.call.apply(e,J([n],Q(r),!1))},t.prototype.bind=function(t,e){return e},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t}(),et=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},nt=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},rt="context",ot=new tt,it=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalContextManager=function(t){return c(rt,t,E.instance())},t.prototype.active=function(){return this._getContextManager().active()},t.prototype.with=function(t,e,n){for(var r,o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];return(r=this._getContextManager()).with.apply(r,nt([t,e,n],et(o),!1))},t.prototype.bind=function(t,e){return this._getContextManager().bind(t,e)},t.prototype._getContextManager=function(){return l(rt)||ot},t.prototype.disable=function(){this._getContextManager().disable(),p(rt,E.instance())},t}();!function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"}(L||(L={}));var at="0000000000000000",st="00000000000000000000000000000000",ut={traceId:st,spanId:at,traceFlags:L.NONE},ct=function(){function t(t){void 0===t&&(t=ut),this._spanContext=t}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(t,e){return this},t.prototype.setAttributes=function(t){return this},t.prototype.addEvent=function(t,e){return this},t.prototype.addLink=function(t){return this},t.prototype.addLinks=function(t){return this},t.prototype.setStatus=function(t){return this},t.prototype.updateName=function(t){return this},t.prototype.end=function(t){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(t,e){},t}(),lt=w("OpenTelemetry Context Key SPAN");function pt(t){return t.getValue(lt)||void 0}function ft(){return pt(it.getInstance().active())}function ht(t,e){return t.setValue(lt,e)}function dt(t){return t.deleteValue(lt)}function _t(t,e){return ht(t,new ct(e))}function vt(t){var e;return null===(e=pt(t))||void 0===e?void 0:e.spanContext()}var gt=/^([0-9a-f]{32})$/i,yt=/^[0-9a-f]{16}$/i;function Et(t){return gt.test(t)&&t!==st}function Tt(t){return Et(t.traceId)&&(e=t.spanId,yt.test(e)&&e!==at);var e}function mt(t){return new ct(t)}var bt=it.getInstance(),St=function(){function t(){}return t.prototype.startSpan=function(t,e,n){if(void 0===n&&(n=bt.active()),Boolean(null==e?void 0:e.root))return new ct;var r,o=n&&vt(n);return"object"==typeof(r=o)&&"string"==typeof r.spanId&&"string"==typeof r.traceId&&"number"==typeof r.traceFlags&&Tt(o)?new ct(o):new ct},t.prototype.startActiveSpan=function(t,e,n,r){var o,i,a;if(!(arguments.length<2)){2===arguments.length?a=e:3===arguments.length?(o=e,a=n):(o=e,i=n,a=r);var s=null!=i?i:bt.active(),u=this.startSpan(t,o,s),c=ht(s,u);return bt.with(c,a,void 0,u)}},t}();var Ot,Rt,wt,Pt=new St,Lt=function(){function t(t,e,n,r){this._provider=t,this.name=e,this.version=n,this.options=r}return t.prototype.startSpan=function(t,e,n){return this._getTracer().startSpan(t,e,n)},t.prototype.startActiveSpan=function(t,e,n,r){var o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)},t.prototype._getTracer=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):Pt},t}(),At=new(function(){function t(){}return t.prototype.getTracer=function(t,e,n){return new St},t}()),Ct=function(){function t(){}return t.prototype.getTracer=function(t,e,n){var r;return null!==(r=this.getDelegateTracer(t,e,n))&&void 0!==r?r:new Lt(this,t,e,n)},t.prototype.getDelegate=function(){var t;return null!==(t=this._delegate)&&void 0!==t?t:At},t.prototype.setDelegate=function(t){this._delegate=t},t.prototype.getDelegateTracer=function(t,e,n){var r;return null===(r=this._delegate)||void 0===r?void 0:r.getTracer(t,e,n)},t}();!function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(Ot||(Ot={})),function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"}(Rt||(Rt={})),function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"}(wt||(wt={}));var kt=it.getInstance(),It=E.instance(),Nt=new(function(){function t(){}return t.prototype.getMeter=function(t,e,n){return z},t}()),xt="metrics",Dt=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalMeterProvider=function(t){return c(xt,t,E.instance())},t.prototype.getMeterProvider=function(){return l(xt)||Nt},t.prototype.getMeter=function(t,e,n){return this.getMeterProvider().getMeter(t,e,n)},t.prototype.disable=function(){p(xt,E.instance())},t}().getInstance(),Mt=function(){function t(){}return t.prototype.inject=function(t,e){},t.prototype.extract=function(t,e){return t},t.prototype.fields=function(){return[]},t}(),jt=w("OpenTelemetry Baggage Key");function Ut(t){return t.getValue(jt)||void 0}function Zt(){return Ut(it.getInstance().active())}function Bt(t,e){return t.setValue(jt,e)}function Ht(t){return t.deleteValue(jt)}var zt="propagation",Ft=new Mt,Gt=function(){function t(){this.createBaggage=R,this.getBaggage=Ut,this.getActiveBaggage=Zt,this.setBaggage=Bt,this.deleteBaggage=Ht}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalPropagator=function(t){return c(zt,t,E.instance())},t.prototype.inject=function(t,e,n){return void 0===n&&(n=$),this._getGlobalPropagator().inject(t,e,n)},t.prototype.extract=function(t,e,n){return void 0===n&&(n=Y),this._getGlobalPropagator().extract(t,e,n)},t.prototype.fields=function(){return this._getGlobalPropagator().fields()},t.prototype.disable=function(){p(zt,E.instance())},t.prototype._getGlobalPropagator=function(){return l(zt)||Ft},t}(),Xt=Gt.getInstance(),Vt="trace",qt=function(){function t(){this._proxyTracerProvider=new Ct,this.wrapSpanContext=mt,this.isSpanContextValid=Tt,this.deleteSpan=dt,this.getSpan=pt,this.getActiveSpan=ft,this.getSpanContext=vt,this.setSpan=ht,this.setSpanContext=_t}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalTracerProvider=function(t){var e=c(Vt,this._proxyTracerProvider,E.instance());return e&&this._proxyTracerProvider.setDelegate(t),e},t.prototype.getTracerProvider=function(){return l(Vt)||this._proxyTracerProvider},t.prototype.getTracer=function(t,e){return this.getTracerProvider().getTracer(t,e)},t.prototype.disable=function(){p(Vt,E.instance()),this._proxyTracerProvider=new Ct},t}().getInstance(),Wt=w("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Kt(t){return!0===t.getValue(Wt)}var Yt="baggage",$t=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function Qt(t){var e=t.split(";");if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf("=");if(!(r<=0)){var o,i,a=decodeURIComponent(n.substring(0,r).trim()),s=decodeURIComponent(n.substring(r+1).trim());return e.length>0&&("string"!=typeof(i=e.join(";"))&&(O.error("Cannot create baggage metadata from unknown type: "+typeof i),i=""),o={__TYPE__:S,toString:function(){return i}}),{key:a,value:s,metadata:o}}}}}var Jt=function(){function t(){}return t.prototype.inject=function(t,e,n){var r=Xt.getBaggage(t);if(r&&!Kt(t)){var o=function(t){return t.getAllEntries().map((function(t){var e=$t(t,2),n=e[0],r=e[1],o=encodeURIComponent(n)+"="+encodeURIComponent(r.value);return void 0!==r.metadata&&(o+=";"+r.metadata.toString()),o}))}(r).filter((function(t){return t.length<=4096})).slice(0,180),i=function(t){return t.reduce((function(t,e){var n=t+(""!==t?",":"")+e;return n.length>8192?t:n}),"")}(o);i.length>0&&n.set(e,Yt,i)}},t.prototype.extract=function(t,e,n){var r=n.get(e,Yt),o=Array.isArray(r)?r.join(","):r;if(!o)return t;var i={};return 0===o.length?t:(o.split(",").forEach((function(t){var e=Qt(t);if(e){var n={value:e.value};e.metadata&&(n.metadata=e.metadata),i[e.key]=n}})),0===Object.entries(i).length?t:Xt.setBaggage(t,Xt.createBaggage(i)))},t.prototype.fields=function(){return[Yt]},t}(),te=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ee=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function ne(t){var e,n,r={};if("object"!=typeof t||null==t)return r;try{for(var o=te(Object.entries(t)),i=o.next();!i.done;i=o.next()){var a=ee(i.value,2),s=a[0],u=a[1];re(s)?oe(u)?Array.isArray(u)?r[s]=u.slice():r[s]=u:It.warn("Invalid attribute value set for key: "+s):It.warn("Invalid attribute key: "+s)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}function re(t){return"string"==typeof t&&t.length>0}function oe(t){return null==t||(Array.isArray(t)?function(t){var e,n,r;try{for(var o=te(t),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){if(!r){if(ie(a)){r=typeof a;continue}return!1}if(typeof a!==r)return!1}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return!0}(t):ie(t))}function ie(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}var ae,se=function(t){It.error(function(t){return"string"==typeof t?t:JSON.stringify(function(t){for(var e={},n=t;null!==n;)Object.getOwnPropertyNames(n).forEach((function(t){if(!e[t]){var r=n[t];r&&(e[t]=String(r))}})),n=Object.getPrototypeOf(n);return e}(t))}(t))};function ue(t){try{se(t)}catch(t){}}!function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"}(ae||(ae={}));var ce=["OTEL_SDK_DISABLED"];function le(t){return ce.indexOf(t)>-1}var pe=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function fe(t){return pe.indexOf(t)>-1}var he=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function de(t){return he.indexOf(t)>-1}var _e=1/0,ve=128,ge={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:f.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:_e,OTEL_ATTRIBUTE_COUNT_LIMIT:ve,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:_e,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:ve,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:_e,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:ve,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:128,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ae.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function ye(t,e,n){if(void 0!==n[t]){var r=String(n[t]);e[t]="true"===r.toLowerCase()}}function Ee(t,e,n,r,o){if(void 0===r&&(r=-1/0),void 0===o&&(o=1/0),void 0!==n[t]){var i=Number(n[t]);isNaN(i)||(e[t]=i<r?r:i>o?o:i)}}function Te(t,e,n,r){void 0===r&&(r=",");var o=n[t];"string"==typeof o&&(e[t]=o.split(r).map((function(t){return t.trim()})))}var me={ALL:f.ALL,VERBOSE:f.VERBOSE,DEBUG:f.DEBUG,INFO:f.INFO,WARN:f.WARN,ERROR:f.ERROR,NONE:f.NONE};function be(t,e,n){var r=n[t];if("string"==typeof r){var o=me[r.toUpperCase()];null!=o&&(e[t]=o)}}function Se(t){var e={};for(var n in ge){var r=n;if("OTEL_LOG_LEVEL"===r)be(r,e,t);else if(le(r))ye(r,e,t);else if(fe(r))Ee(r,e,t);else if(de(r))Te(r,e,t);else{var o=t[r];null!=o&&(e[r]=String(o))}}return e}var Oe="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{};function Re(){var t=Se(Oe);return Object.assign({},ge,t)}function we(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function Pe(t){for(var e=new Uint8Array(t.length/2),n=0,r=0;r<t.length;r+=2){var o=we(t.charCodeAt(r)),i=we(t.charCodeAt(r+1));e[n++]=o<<4|i}return e}var Le=performance;function Ae(t){for(var e={},n=t.length,r=0;r<n;r++){var o=t[r];o&&(e[String(o).toUpperCase().replace(/[-.]/g,"_")]=o)}return e}var Ce,ke="exception.type",Ie="exception.message",Ne="exception.stacktrace",xe="http.method",De="http.url",Me="http.host",je="http.scheme",Ue="http.status_code",Ze="http.user_agent",Be="http.response_content_length",He="http.response_content_length_uncompressed",ze=ke,Fe=Ie,Ge=Ne,Xe=xe,Ve=De,qe=Me,We=je,Ke=Ue,Ye=Ze,$e=Be,Qe=He,Je=Ae(["aws.lambda.invoked_arn","db.system","db.connection_string","db.user","db.jdbc.driver_classname","db.name","db.statement","db.operation","db.mssql.instance_name","db.cassandra.keyspace","db.cassandra.page_size","db.cassandra.consistency_level","db.cassandra.table","db.cassandra.idempotence","db.cassandra.speculative_execution_count","db.cassandra.coordinator.id","db.cassandra.coordinator.dc","db.hbase.namespace","db.redis.database_index","db.mongodb.collection","db.sql.table",ke,Ie,Ne,"exception.escaped","faas.trigger","faas.execution","faas.document.collection","faas.document.operation","faas.document.time","faas.document.name","faas.time","faas.cron","faas.coldstart","faas.invoked_name","faas.invoked_provider","faas.invoked_region","net.transport","net.peer.ip","net.peer.port","net.peer.name","net.host.ip","net.host.port","net.host.name","net.host.connection.type","net.host.connection.subtype","net.host.carrier.name","net.host.carrier.mcc","net.host.carrier.mnc","net.host.carrier.icc","peer.service","enduser.id","enduser.role","enduser.scope","thread.id","thread.name","code.function","code.namespace","code.filepath","code.lineno",xe,De,"http.target",Me,je,Ue,"http.flavor",Ze,"http.request_content_length","http.request_content_length_uncompressed",Be,He,"http.server_name","http.route","http.client_ip","aws.dynamodb.table_names","aws.dynamodb.consumed_capacity","aws.dynamodb.item_collection_metrics","aws.dynamodb.provisioned_read_capacity","aws.dynamodb.provisioned_write_capacity","aws.dynamodb.consistent_read","aws.dynamodb.projection","aws.dynamodb.limit","aws.dynamodb.attributes_to_get","aws.dynamodb.index_name","aws.dynamodb.select","aws.dynamodb.global_secondary_indexes","aws.dynamodb.local_secondary_indexes","aws.dynamodb.exclusive_start_table","aws.dynamodb.table_count","aws.dynamodb.scan_forward","aws.dynamodb.segment","aws.dynamodb.total_segments","aws.dynamodb.count","aws.dynamodb.scanned_count","aws.dynamodb.attribute_definitions","aws.dynamodb.global_secondary_index_updates","messaging.system","messaging.destination","messaging.destination_kind","messaging.temp_destination","messaging.protocol","messaging.protocol_version","messaging.url","messaging.message_id","messaging.conversation_id","messaging.message_payload_size_bytes","messaging.message_payload_compressed_size_bytes","messaging.operation","messaging.consumer_id","messaging.rabbitmq.routing_key","messaging.kafka.message_key","messaging.kafka.consumer_group","messaging.kafka.client_id","messaging.kafka.partition","messaging.kafka.tombstone","rpc.system","rpc.service","rpc.method","rpc.grpc.status_code","rpc.jsonrpc.version","rpc.jsonrpc.request_id","rpc.jsonrpc.error_code","rpc.jsonrpc.error_message","message.type","message.id","message.compressed_size","message.uncompressed_size"]),tn="service.name",en="telemetry.sdk.name",nn="telemetry.sdk.language",rn="telemetry.sdk.version",on=((Ce={})[en]="opentelemetry",Ce["process.runtime.name"]="browser",Ce[nn]="webjs",Ce[rn]="1.25.0",Ce);var an,sn=Math.pow(10,6),un=Math.pow(10,9);function cn(t){var e=t/1e3;return[Math.trunc(e),Math.round(t%1e3*sn)]}function ln(){var t=Le.timeOrigin;if("number"!=typeof t){var e=Le;t=e.timing&&e.timing.fetchStart}return t}function pn(t){return vn(cn(ln()),cn("number"==typeof t?t:Le.now()))}function fn(t){if(dn(t))return t;if("number"==typeof t)return t<ln()?pn(t):cn(t);if(t instanceof Date)return cn(t.getTime());throw TypeError("Invalid input type")}function hn(t){return t[0]*un+t[1]}function dn(t){return Array.isArray(t)&&2===t.length&&"number"==typeof t[0]&&"number"==typeof t[1]}function _n(t){return dn(t)||"number"==typeof t||t instanceof Date}function vn(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=un&&(n[1]-=un,n[0]+=1),n}!function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"}(an||(an={}));var gn=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},yn=function(){function t(t){var e;void 0===t&&(t={}),this._propagators=null!==(e=t.propagators)&&void 0!==e?e:[],this._fields=Array.from(new Set(this._propagators.map((function(t){return"function"==typeof t.fields?t.fields():[]})).reduce((function(t,e){return t.concat(e)}),[])))}return t.prototype.inject=function(t,e,n){var r,o;try{for(var i=gn(this._propagators),a=i.next();!a.done;a=i.next()){var s=a.value;try{s.inject(t,e,n)}catch(t){It.warn("Failed to inject with "+s.constructor.name+". Err: "+t.message)}}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}},t.prototype.extract=function(t,e,n){return this._propagators.reduce((function(t,r){try{return r.extract(t,e,n)}catch(t){It.warn("Failed to inject with "+r.constructor.name+". Err: "+t.message)}return t}),t)},t.prototype.fields=function(){return this._fields.slice()},t}(),En="[_0-9a-z-*/]",Tn=new RegExp("^(?:"+("[a-z]"+En+"{0,255}")+"|"+("[a-z0-9]"+En+"{0,240}@[a-z]"+En+"{0,13}")+")$"),mn=/^[ -~]{0,255}[!-~]$/,bn=/,|=/;var Sn=function(){function t(t){this._internalState=new Map,t&&this._parse(t)}return t.prototype.set=function(t,e){var n=this._clone();return n._internalState.has(t)&&n._internalState.delete(t),n._internalState.set(t,e),n},t.prototype.unset=function(t){var e=this._clone();return e._internalState.delete(t),e},t.prototype.get=function(t){return this._internalState.get(t)},t.prototype.serialize=function(){var t=this;return this._keys().reduce((function(e,n){return e.push(n+"="+t.get(n)),e}),[]).join(",")},t.prototype._parse=function(t){t.length>512||(this._internalState=t.split(",").reverse().reduce((function(t,e){var n=e.trim(),r=n.indexOf("=");if(-1!==r){var o=n.slice(0,r),i=n.slice(r+1,e.length);(function(t){return Tn.test(t)})(o)&&function(t){return mn.test(t)&&!bn.test(t)}(i)&&t.set(o,i)}return t}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t}(),On="traceparent",Rn="tracestate",wn=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");var Pn,Ln,An=function(){function t(){}return t.prototype.inject=function(t,e,n){var r=qt.getSpanContext(t);if(r&&!Kt(t)&&Tt(r)){var o="00-"+r.traceId+"-"+r.spanId+"-0"+Number(r.traceFlags||L.NONE).toString(16);n.set(e,On,o),r.traceState&&n.set(e,Rn,r.traceState.serialize())}},t.prototype.extract=function(t,e,n){var r=n.get(e,On);if(!r)return t;var o=Array.isArray(r)?r[0]:r;if("string"!=typeof o)return t;var i=function(t){var e=wn.exec(t);return e?"00"===e[1]&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}:null}(o);if(!i)return t;i.isRemote=!0;var a=n.get(e,Rn);if(a){var s=Array.isArray(a)?a.join(","):a;i.traceState=new Sn("string"==typeof s?s:void 0)}return qt.setSpanContext(t,i)},t.prototype.fields=function(){return[On,Rn]},t}(),Cn="[object Null]",kn="[object Undefined]",In=Function.prototype.toString,Nn=In.call(Object),xn=(Pn=Object.getPrototypeOf,Ln=Object,function(t){return Pn(Ln(t))}),Dn=Object.prototype,Mn=Dn.hasOwnProperty,jn=Symbol?Symbol.toStringTag:void 0,Un=Dn.toString;function Zn(t){if(!function(t){return null!=t&&"object"==typeof t}(t)||"[object Object]"!==function(t){if(null==t)return void 0===t?kn:Cn;return jn&&jn in Object(t)?function(t){var e=Mn.call(t,jn),n=t[jn],r=!1;try{t[jn]=void 0,r=!0}catch(t){}var o=Un.call(t);r&&(e?t[jn]=n:delete t[jn]);return o}(t):function(t){return Un.call(t)}(t)}(t))return!1;var e=xn(t);if(null===e)return!0;var n=Mn.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&In.call(n)===Nn}function Bn(t){return Fn(t)?t.slice():t}function Hn(t,e,n,r){var o;if(void 0===n&&(n=0),!(n>20)){if(n++,Vn(t)||Vn(e)||Gn(e))o=Bn(e);else if(Fn(t)){if(o=t.slice(),Fn(e))for(var i=0,a=e.length;i<a;i++)o.push(Bn(e[i]));else if(Xn(e))for(i=0,a=(s=Object.keys(e)).length;i<a;i++){o[u=s[i]]=Bn(e[u])}}else if(Xn(t))if(Xn(e)){if(!function(t,e){if(!Zn(t)||!Zn(e))return!1;return!0}(t,e))return e;o=Object.assign({},t);var s;for(i=0,a=(s=Object.keys(e)).length;i<a;i++){var u,c=e[u=s[i]];if(Vn(c))void 0===c?delete o[u]:o[u]=c;else{var l=o[u],p=c;if(zn(t,u,r)||zn(e,u,r))delete o[u];else{if(Xn(l)&&Xn(p)){var f=r.get(l)||[],h=r.get(p)||[];f.push({obj:t,key:u}),h.push({obj:e,key:u}),r.set(l,f),r.set(p,h)}o[u]=Hn(o[u],c,n,r)}}}}else o=e;return o}}function zn(t,e,n){for(var r=n.get(t[e])||[],o=0,i=r.length;o<i;o++){var a=r[o];if(a.key===e&&a.obj===t)return!0}return!1}function Fn(t){return Array.isArray(t)}function Gn(t){return"function"==typeof t}function Xn(t){return!Vn(t)&&!Fn(t)&&!Gn(t)&&"object"==typeof t}function Vn(t){return"string"==typeof t||"number"==typeof t||"boolean"==typeof t||void 0===t||t instanceof Date||t instanceof RegExp||null===t}var qn=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Wn(t,e){return"string"==typeof e?t===e:!!t.match(e)}function Kn(t,e){var n,r;if(!e)return!1;try{for(var o=qn(e),i=o.next();!i.done;i=o.next()){if(Wn(t,i.value))return!0}}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}var Yn=function(){function t(){var t=this;this._promise=new Promise((function(e,n){t._resolve=e,t._reject=n}))}return Object.defineProperty(t.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),t.prototype.resolve=function(t){this._resolve(t)},t.prototype.reject=function(t){this._reject(t)},t}(),$n=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Qn=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},Jn=function(){function t(t,e){this._callback=t,this._that=e,this._isCalled=!1,this._deferred=new Yn}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var t,e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((t=this._callback).call.apply(t,Qn([this._that],$n(n),!1))).then((function(t){return e._deferred.resolve(t)}),(function(t){return e._deferred.reject(t)}))}catch(t){this._deferred.reject(t)}}return this._deferred.promise},t}();function tr(t){var e=BigInt(1e9);return BigInt(t[0])*e+BigInt(t[1])}function er(t){var e,n=tr(t);return e=n,{low:Number(BigInt.asUintN(32,e)),high:Number(BigInt.asUintN(32,e>>BigInt(32)))}}var nr="undefined"!=typeof BigInt?function(t){return tr(t).toString()}:hn;function rr(t){return t}function or(t){if(void 0!==t)return Pe(t)}var ir,ar={encodeHrTime:er,encodeSpanContext:Pe,encodeOptionalSpanContext:or};!function(t){t[t.SPAN_KIND_UNSPECIFIED=0]="SPAN_KIND_UNSPECIFIED",t[t.SPAN_KIND_INTERNAL=1]="SPAN_KIND_INTERNAL",t[t.SPAN_KIND_SERVER=2]="SPAN_KIND_SERVER",t[t.SPAN_KIND_CLIENT=3]="SPAN_KIND_CLIENT",t[t.SPAN_KIND_PRODUCER=4]="SPAN_KIND_PRODUCER",t[t.SPAN_KIND_CONSUMER=5]="SPAN_KIND_CONSUMER"}(ir||(ir={}));var sr=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function ur(t){return Object.keys(t).map((function(e){return cr(e,t[e])}))}function cr(t,e){return{key:t,value:lr(e)}}function lr(t){var e=typeof t;return"string"===e?{stringValue:t}:"number"===e?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:"boolean"===e?{boolValue:t}:t instanceof Uint8Array?{bytesValue:t}:Array.isArray(t)?{arrayValue:{values:t.map(lr)}}:"object"===e&&null!=t?{kvlistValue:{values:Object.entries(t).map((function(t){var e=sr(t,2);return cr(e[0],e[1])}))}}:{}}function pr(t,e){var n,r=t.spanContext(),o=t.status;return{traceId:e.encodeSpanContext(r.traceId),spanId:e.encodeSpanContext(r.spanId),parentSpanId:e.encodeOptionalSpanContext(t.parentSpanId),traceState:null===(n=r.traceState)||void 0===n?void 0:n.serialize(),name:t.name,kind:null==t.kind?0:t.kind+1,startTimeUnixNano:e.encodeHrTime(t.startTime),endTimeUnixNano:e.encodeHrTime(t.endTime),attributes:ur(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map((function(t){return function(t,e){return{attributes:t.attributes?ur(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}(t,e)})),droppedEventsCount:t.droppedEventsCount,status:{code:o.code,message:o.message},links:t.links.map((function(t){return function(t,e){var n;return{attributes:t.attributes?ur(t.attributes):[],spanId:e.encodeSpanContext(t.context.spanId),traceId:e.encodeSpanContext(t.context.traceId),traceState:null===(n=t.context.traceState)||void 0===n?void 0:n.serialize(),droppedAttributesCount:t.droppedAttributesCount||0}}(t,e)})),droppedLinksCount:t.droppedLinksCount}}function fr(t){return{attributes:ur(t.attributes),droppedAttributesCount:0}}var hr=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},dr=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function _r(t,e){var n=function(t){var e,n;if(void 0===t)return ar;var r=null===(e=t.useLongBits)||void 0===e||e,o=null!==(n=t.useHex)&&void 0!==n&&n;return{encodeHrTime:r?er:nr,encodeSpanContext:o?rr:Pe,encodeOptionalSpanContext:o?rr:or}}(e);return{resourceSpans:vr(t,n)}}function vr(t,e){for(var n,r=function(t){var e,n,r=new Map;try{for(var o=hr(t),i=o.next();!i.done;i=o.next()){var a=i.value,s=r.get(a.resource);s||(s=new Map,r.set(a.resource,s));var u=a.instrumentationLibrary.name+"@"+(a.instrumentationLibrary.version||"")+":"+(a.instrumentationLibrary.schemaUrl||""),c=s.get(u);c||(c=[],s.set(u,c)),c.push(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}(t),o=[],i=r.entries(),a=i.next();!a.done;){for(var s=dr(a.value,2),u=s[0],c=[],l=s[1].values(),p=l.next();!p.done;){var f=p.value;if(f.length>0){var h=f.map((function(t){return pr(t,e)}));c.push({scope:(n=f[0].instrumentationLibrary,{name:n.name,version:n.version}),spans:h,schemaUrl:f[0].instrumentationLibrary.schemaUrl})}p=l.next()}var d={resource:fr(u),scopeSpans:c,schemaUrl:void 0};o.push(d),a=i.next()}return o}var gr=function(){return gr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},gr.apply(this,arguments)},yr=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},Er=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Tr=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},mr=function(){function t(t,e){var n,r=this;this._attributes=t,this.asyncAttributesPending=null!=e,this._syncAttributes=null!==(n=this._attributes)&&void 0!==n?n:{},this._asyncAttributesPromise=null==e?void 0:e.then((function(t){return r._attributes=Object.assign({},r._attributes,t),r.asyncAttributesPending=!1,t}),(function(t){return It.debug("a resource's async attributes promise rejected: %s",t),r.asyncAttributesPending=!1,{}}))}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t(((e={})[tn]="unknown_service",e[nn]=on[nn],e[en]=on[en],e[rn]=on[rn],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&It.error("Accessing resource attributes before async attributes settled"),null!==(t=this._attributes)&&void 0!==t?t:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return yr(this,void 0,void 0,(function(){return Er(this,(function(t){switch(t.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},t.prototype.merge=function(e){var n,r=this;if(!e)return this;var o=gr(gr({},this._syncAttributes),null!==(n=e._syncAttributes)&&void 0!==n?n:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new t(o);var i=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then((function(t){var n,o=Tr(t,2),i=o[0],a=o[1];return gr(gr(gr(gr({},r._syncAttributes),i),null!==(n=e._syncAttributes)&&void 0!==n?n:e.attributes),a)}));return new t(o,i)},t.EMPTY=new t({}),t}(),br="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};let Sr={};class Or{constructor(t){this.config=t}export(t,e){const n=_r(t,{useHex:!0,useLongBits:!1});this.config.api.pushTraces(n),function(t=[]){var e,n;for(const r of t){const{scopeSpans:t}=r;for(const r of t){const{scope:t,spans:o=[]}=r;for(const r of o){if(r.kind!==ir.SPAN_KIND_CLIENT)continue;const o={traceId:r.traceId.toString(),spanId:r.spanId.toString()},i={};for(const t of r.attributes)i[t.key]=String(Object.values(t.value)[0]);const a=(null!==(e=null==t?void 0:t.name)&&void 0!==e?e:"").indexOf("-");let s="unknown";(null==t?void 0:t.name)&&(-1===a&&(s=null!==(n=t.name.split("/")[1])&&void 0!==n?n:t.name),a>-1&&(s=null==t?void 0:t.name.substring(a+1))),Sr.api.pushEvent(`faro.tracing.${s}`,i,void 0,{spanContext:o})}}}}(n.resourceSpans),e({code:an.SUCCESS})}shutdown(){return Promise.resolve(void 0)}}class Rr{constructor(t,e){this.processor=t,this.metas=e}forceFlush(){return this.processor.forceFlush()}onStart(t,e){const n=this.metas.value.session;(null==n?void 0:n.id)&&(t.attributes.session_id=n.id),this.processor.onStart(t,e)}onEnd(t){this.processor.onEnd(t)}shutdown(){return this.processor.shutdown()}}"function"==typeof SuppressedError&&SuppressedError;var wr=function(){function t(){}return t.prototype.emit=function(t){},t}(),Pr=new(function(){function t(){}return t.prototype.getLogger=function(t,e,n){return new wr},t}()),Lr="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},Ar=Symbol.for("io.opentelemetry.js.api.logs"),Cr=Lr;var kr=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalLoggerProvider=function(t){return Cr[Ar]?this.getLoggerProvider():(Cr[Ar]=(e=1,n=t,r=Pr,function(t){return t===e?n:r}),t);var e,n,r},t.prototype.getLoggerProvider=function(){var t,e;return null!==(e=null===(t=Cr[Ar])||void 0===t?void 0:t.call(Cr,1))&&void 0!==e?e:Pr},t.prototype.getLogger=function(t,e,n){return this.getLoggerProvider().getLogger(t,e,n)},t.prototype.disable=function(){delete Cr[Ar]},t}(),Ir=kr.getInstance();function Nr(t){return"function"==typeof t}var xr=console.error.bind(console);function Dr(t,e,n){var r=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:r,writable:!0,value:n})}function Mr(t){t&&t.logger&&(Nr(t.logger)?xr=t.logger:xr("new logger isn't a function, not replacing"))}function jr(t,e,n){if(t&&t[e]){if(!n)return xr("no wrapper function"),void xr((new Error).stack);if(Nr(t[e])&&Nr(n)){var r=t[e],o=n(r,e);return Dr(o,"__original",r),Dr(o,"__unwrap",(function(){t[e]===o&&Dr(t,e,r)})),Dr(o,"__wrapped",!0),Dr(t,e,o),o}xr("original object and wrapper must be functions")}else xr("no original function "+e+" to wrap")}function Ur(t,e){return t&&t[e]?t[e].__unwrap?t[e].__unwrap():void xr("no original to unwrap to -- has "+e+" already been unwrapped?"):(xr("no function to unwrap."),void xr((new Error).stack))}Mr.wrap=jr,Mr.massWrap=function(t,e,n){if(!t)return xr("must provide one or more modules to patch"),void xr((new Error).stack);Array.isArray(t)||(t=[t]),e&&Array.isArray(e)?t.forEach((function(t){e.forEach((function(e){jr(t,e,n)}))})):xr("must provide one or more functions to wrap on modules")},Mr.unwrap=Ur,Mr.massUnwrap=function(t,e){if(!t)return xr("must provide one or more modules to patch"),void xr((new Error).stack);Array.isArray(t)||(t=[t]),e&&Array.isArray(e)?t.forEach((function(t){e.forEach((function(e){Ur(t,e)}))})):xr("must provide one or more functions to unwrap on modules")};var Zr=Mr,Br=function(){return Br=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Br.apply(this,arguments)},Hr=function(){function t(t,e,n){this.instrumentationName=t,this.instrumentationVersion=e,this._wrap=Zr.wrap,this._unwrap=Zr.unwrap,this._massWrap=Zr.massWrap,this._massUnwrap=Zr.massUnwrap,this._config=Br({enabled:!0},n),this._diag=It.createComponentLogger({namespace:t}),this._tracer=qt.getTracer(t,e),this._meter=Dt.getMeter(t,e),this._logger=Ir.getLogger(t,e),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var t,e=null!==(t=this.init())&&void 0!==t?t:[];return Array.isArray(e)?e:[e]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(t){this._config=Br({},t)},t.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(t,e,n,r){if(t)try{t(n,r)}catch(t){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:e},t)}},t}(),zr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=function(t){function e(e,n,r){var o=t.call(this,e,n,r)||this;return o._config.enabled&&o.enable(),o}return zr(e,t),e}(Hr);function Gr(t,e,n){var r,o;try{o=t()}catch(t){r=t}finally{if(e(r,o),r&&!n)throw r;return o}}function Xr(t){return"function"==typeof t&&"function"==typeof t.__original&&"function"==typeof t.__unwrap&&!0===t.__wrapped}var Vr,qr=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Wr=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Kr=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},Yr=function(){function t(t,e,n,r,o,i,a,s,u,c){void 0===a&&(a=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:wt.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=r,this.parentSpanId=i,this.kind=o,this.links=a;var l=Date.now();this._performanceStartTime=Le.now(),this._performanceOffset=l-(this._performanceStartTime+ln()),this._startTimeProvided=null!=s,this.startTime=this._getTime(null!=s?s:l),this.resource=t.resource,this.instrumentationLibrary=t.instrumentationLibrary,this._spanLimits=t.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,null!=c&&this.setAttributes(c),this._spanProcessor=t.getActiveSpanProcessor(),this._spanProcessor.onStart(this,e)}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(t,e){return null==e||this._isSpanEnded()?this:0===t.length?(It.warn("Invalid attribute key: "+t),this):oe(e)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?(this._droppedAttributesCount++,this):(this.attributes[t]=this._truncateToSize(e),this):(It.warn("Invalid attribute value set for key: "+t),this)},t.prototype.setAttributes=function(t){var e,n;try{for(var r=qr(Object.entries(t)),o=r.next();!o.done;o=r.next()){var i=Wr(o.value,2),a=i[0],s=i[1];this.setAttribute(a,s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return this},t.prototype.addEvent=function(t,e,n){if(this._isSpanEnded())return this;if(0===this._spanLimits.eventCountLimit)return It.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(0===this._droppedEventsCount&&It.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),_n(e)&&(_n(n)||(n=e),e=void 0);var r=ne(e);return this.events.push({name:t,attributes:r,time:this._getTime(n),droppedAttributesCount:0}),this},t.prototype.addLink=function(t){return this.links.push(t),this},t.prototype.addLinks=function(t){var e;return(e=this.links).push.apply(e,Kr([],Wr(t),!1)),this},t.prototype.setStatus=function(t){return this._isSpanEnded()||(this.status=t),this},t.prototype.updateName=function(t){return this._isSpanEnded()||(this.name=t),this},t.prototype.end=function(t){this._isSpanEnded()?It.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once."):(this._ended=!0,this.endTime=this._getTime(t),this._duration=function(t,e){var n=e[0]-t[0],r=e[1]-t[1];return r<0&&(n-=1,r+=un),[n,r]}(this.startTime,this.endTime),this._duration[0]<0&&(It.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&It.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this))},t.prototype._getTime=function(t){if("number"==typeof t&&t<Le.now())return pn(t+this._performanceOffset);if("number"==typeof t)return cn(t);if(t instanceof Date)return cn(t.getTime());if(dn(t))return t;if(this._startTimeProvided)return cn(Date.now());var e=Le.now()-this._performanceStartTime;return vn(this.startTime,cn(e))},t.prototype.isRecording=function(){return!1===this._ended},t.prototype.recordException=function(t,e){var n={};"string"==typeof t?n[Fe]=t:t&&(t.code?n[ze]=t.code.toString():t.name&&(n[ze]=t.name),t.message&&(n[Fe]=t.message),t.stack&&(n[Ge]=t.stack)),n[ze]||n[Fe]?this.addEvent("exception",n,e):It.warn("Failed to record an exception "+t)},Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),t.prototype._isSpanEnded=function(){return this._ended&&It.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(t,e){return t.length<=e?t:t.substr(0,e)},t.prototype._truncateToSize=function(t){var e=this,n=this._attributeValueLengthLimit;return n<=0?(It.warn("Attribute value limit must be positive, got "+n),t):"string"==typeof t?this._truncateToLimitUtil(t,n):Array.isArray(t)?t.map((function(t){return"string"==typeof t?e._truncateToLimitUtil(t,n):t})):t},t}();!function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(Vr||(Vr={}));var $r=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:Vr.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}(),Qr=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:Vr.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}(),Jr=function(){function t(t){var e,n,r,o;this._root=t.root,this._root||(ue(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Qr),this._remoteParentSampled=null!==(e=t.remoteParentSampled)&&void 0!==e?e:new Qr,this._remoteParentNotSampled=null!==(n=t.remoteParentNotSampled)&&void 0!==n?n:new $r,this._localParentSampled=null!==(r=t.localParentSampled)&&void 0!==r?r:new Qr,this._localParentNotSampled=null!==(o=t.localParentNotSampled)&&void 0!==o?o:new $r}return t.prototype.shouldSample=function(t,e,n,r,o,i){var a=qt.getSpanContext(t);return a&&Tt(a)?a.isRemote?a.traceFlags&L.SAMPLED?this._remoteParentSampled.shouldSample(t,e,n,r,o,i):this._remoteParentNotSampled.shouldSample(t,e,n,r,o,i):a.traceFlags&L.SAMPLED?this._localParentSampled.shouldSample(t,e,n,r,o,i):this._localParentNotSampled.shouldSample(t,e,n,r,o,i):this._root.shouldSample(t,e,n,r,o,i)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t}(),to=function(){function t(t){void 0===t&&(t=0),this._ratio=t,this._ratio=this._normalize(t),this._upperBound=Math.floor(4294967295*this._ratio)}return t.prototype.shouldSample=function(t,e){return{decision:Et(e)&&this._accumulate(e)<this._upperBound?Vr.RECORD_AND_SAMPLED:Vr.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(t){return"number"!=typeof t||isNaN(t)?0:t>=1?1:t<=0?0:t},t.prototype._accumulate=function(t){for(var e=0,n=0;n<t.length/8;n++){var r=8*n;e=(e^parseInt(t.slice(r,r+8),16))>>>0}return e},t}(),eo=Re(),no=ae.AlwaysOn;function ro(){return{sampler:oo(eo),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:Re().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:Re().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:Re().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:Re().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:Re().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:Re().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:Re().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:Re().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function oo(t){switch(void 0===t&&(t=Re()),t.OTEL_TRACES_SAMPLER){case ae.AlwaysOn:return new Qr;case ae.AlwaysOff:return new $r;case ae.ParentBasedAlwaysOn:return new Jr({root:new Qr});case ae.ParentBasedAlwaysOff:return new Jr({root:new $r});case ae.TraceIdRatio:return new to(io(t));case ae.ParentBasedTraceIdRatio:return new Jr({root:new to(io(t))});default:return It.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+no+'".'),new Qr}}function io(t){if(void 0===t.OTEL_TRACES_SAMPLER_ARG||""===t.OTEL_TRACES_SAMPLER_ARG)return It.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to 1."),1;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(It.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to 1."),1):e<0||e>1?(It.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to 1."),1):e}function ao(t){var e,n,r,o,i,a,s,u,c,l,p,f,h=Object.assign({},t.spanLimits),d=Se(Oe);return h.attributeCountLimit=null!==(a=null!==(i=null!==(o=null!==(n=null===(e=t.spanLimits)||void 0===e?void 0:e.attributeCountLimit)&&void 0!==n?n:null===(r=t.generalLimits)||void 0===r?void 0:r.attributeCountLimit)&&void 0!==o?o:d.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)&&void 0!==i?i:d.OTEL_ATTRIBUTE_COUNT_LIMIT)&&void 0!==a?a:ve,h.attributeValueLengthLimit=null!==(f=null!==(p=null!==(l=null!==(u=null===(s=t.spanLimits)||void 0===s?void 0:s.attributeValueLengthLimit)&&void 0!==u?u:null===(c=t.generalLimits)||void 0===c?void 0:c.attributeValueLengthLimit)&&void 0!==l?l:d.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==p?p:d.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==f?f:_e,Object.assign({},t,{spanLimits:h})}var so=function(){function t(t,e){this._exporter=t,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=Re();this._maxExportBatchSize="number"==typeof(null==e?void 0:e.maxExportBatchSize)?e.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==e?void 0:e.maxQueueSize)?e.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==e?void 0:e.scheduledDelayMillis)?e.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==e?void 0:e.exportTimeoutMillis)?e.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new Jn(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(It.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(t,e){},t.prototype.onEnd=function(t){this._shutdownOnce.isCalled||0!=(t.spanContext().traceFlags&L.SAMPLED)&&this._addToBuffer(t)},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){var t=this;return Promise.resolve().then((function(){return t.onShutdown()})).then((function(){return t._flushAll()})).then((function(){return t._exporter.shutdown()}))},t.prototype._addToBuffer=function(t){if(this._finishedSpans.length>=this._maxQueueSize)return 0===this._droppedSpansCount&&It.debug("maxQueueSize reached, dropping spans"),void this._droppedSpansCount++;this._droppedSpansCount>0&&(It.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(t),this._maybeStartTimer()},t.prototype._flushAll=function(){var t=this;return new Promise((function(e,n){for(var r=[],o=0,i=Math.ceil(t._finishedSpans.length/t._maxExportBatchSize);o<i;o++)r.push(t._flushOneBatch());Promise.all(r).then((function(){e()})).catch(n)}))},t.prototype._flushOneBatch=function(){var t=this;return this._clearTimer(),0===this._finishedSpans.length?Promise.resolve():new Promise((function(e,n){var r=setTimeout((function(){n(new Error("Timeout"))}),t._exportTimeoutMillis);kt.with(function(t){return t.setValue(Wt,!0)}(kt.active()),(function(){var o;t._finishedSpans.length<=t._maxExportBatchSize?(o=t._finishedSpans,t._finishedSpans=[]):o=t._finishedSpans.splice(0,t._maxExportBatchSize);for(var i=function(){return t._exporter.export(o,(function(t){var o;clearTimeout(r),t.code===an.SUCCESS?e():n(null!==(o=t.error)&&void 0!==o?o:new Error("BatchSpanProcessor: span export failed"))}))},a=null,s=0,u=o.length;s<u;s++){var c=o[s];c.resource.asyncAttributesPending&&c.resource.waitForAsyncAttributes&&(null!=a||(a=[]),a.push(c.resource.waitForAsyncAttributes()))}null===a?i():Promise.all(a).then(i,(function(t){ue(t),n(t)}))}))}))},t.prototype._maybeStartTimer=function(){var t=this;if(!this._isExporting){var e=function(){t._isExporting=!0,t._flushOneBatch().finally((function(){t._isExporting=!1,t._finishedSpans.length>0&&(t._clearTimer(),t._maybeStartTimer())})).catch((function(e){t._isExporting=!1,ue(e)}))};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();void 0===this._timer&&(this._timer=setTimeout((function(){return e()}),this._scheduledDelayMillis),this._timer)}},t.prototype._clearTimer=function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)},t}(),uo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),co=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.onInit(n),r}return uo(e,t),e.prototype.onInit=function(t){var e=this;!0!==(null==t?void 0:t.disableAutoFlushOnDocumentHide)&&"undefined"!=typeof document&&(this._visibilityChangeListener=function(){"hidden"===document.visibilityState&&e.forceFlush()},this._pageHideListener=function(){e.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},e.prototype.onShutdown=function(){"undefined"!=typeof document&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},e}(so),lo=function(){this.generateTraceId=fo(16),this.generateSpanId=fo(8)},po=Array(32);function fo(t){return function(){for(var e=0;e<2*t;e++)po[e]=Math.floor(16*Math.random())+48,po[e]>=58&&(po[e]+=39);return String.fromCharCode.apply(null,po.slice(0,2*t))}}var ho,_o=function(){function t(t,e,n){this._tracerProvider=n;var r,o,i,a,s=(r=e,o={sampler:oo()},i=ro(),(a=Object.assign({},i,o,r)).generalLimits=Object.assign({},i.generalLimits,r.generalLimits||{}),a.spanLimits=Object.assign({},i.spanLimits,r.spanLimits||{}),a);this._sampler=s.sampler,this._generalLimits=s.generalLimits,this._spanLimits=s.spanLimits,this._idGenerator=e.idGenerator||new lo,this.resource=n.resource,this.instrumentationLibrary=t}return t.prototype.startSpan=function(t,e,n){var r,o,i;void 0===e&&(e={}),void 0===n&&(n=kt.active()),e.root&&(n=qt.deleteSpan(n));var a=qt.getSpan(n);if(Kt(n))return It.debug("Instrumentation suppressed, returning Noop Span"),qt.wrapSpanContext(ut);var s,u,c,l=null==a?void 0:a.spanContext(),p=this._idGenerator.generateSpanId();l&&qt.isSpanContextValid(l)?(s=l.traceId,u=l.traceState,c=l.spanId):s=this._idGenerator.generateTraceId();var f=null!==(r=e.kind)&&void 0!==r?r:Rt.INTERNAL,h=(null!==(o=e.links)&&void 0!==o?o:[]).map((function(t){return{context:t.context,attributes:ne(t.attributes)}})),d=ne(e.attributes),_=this._sampler.shouldSample(n,s,t,f,d,h);u=null!==(i=_.traceState)&&void 0!==i?i:u;var v={traceId:s,spanId:p,traceFlags:_.decision===Ot.RECORD_AND_SAMPLED?L.SAMPLED:L.NONE,traceState:u};if(_.decision===Ot.NOT_RECORD)return It.debug("Recording is off, propagating context in a non-recording span"),qt.wrapSpanContext(v);var g=ne(Object.assign(d,_.attributes));return new Yr(this,n,t,v,f,c,h,e.startTime,void 0,g)},t.prototype.startActiveSpan=function(t,e,n,r){var o,i,a;if(!(arguments.length<2)){2===arguments.length?a=e:3===arguments.length?(o=e,a=n):(o=e,i=n,a=r);var s=null!=i?i:kt.active(),u=this.startSpan(t,o,s),c=qt.setSpan(s,u);return kt.with(c,a,void 0,u)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t}(),vo=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},go=function(){function t(t){this._spanProcessors=t}return t.prototype.forceFlush=function(){var t,e,n=[];try{for(var r=vo(this._spanProcessors),o=r.next();!o.done;o=r.next()){var i=o.value;n.push(i.forceFlush())}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return new Promise((function(t){Promise.all(n).then((function(){t()})).catch((function(e){ue(e||new Error("MultiSpanProcessor: forceFlush failed")),t()}))}))},t.prototype.onStart=function(t,e){var n,r;try{for(var o=vo(this._spanProcessors),i=o.next();!i.done;i=o.next()){i.value.onStart(t,e)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},t.prototype.onEnd=function(t){var e,n;try{for(var r=vo(this._spanProcessors),o=r.next();!o.done;o=r.next()){o.value.onEnd(t)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.prototype.shutdown=function(){var t,e,n=[];try{for(var r=vo(this._spanProcessors),o=r.next();!o.done;o=r.next()){var i=o.value;n.push(i.shutdown())}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return new Promise((function(t,e){Promise.all(n).then((function(){t()}),e)}))},t}(),yo=function(){function t(){}return t.prototype.onStart=function(t,e){},t.prototype.onEnd=function(t){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t}();!function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"}(ho||(ho={}));var Eo,To,mo,bo=function(){function t(t){var e;void 0===t&&(t={}),this._registeredSpanProcessors=[],this._tracers=new Map;var n=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t.shift(),r=new WeakMap;t.length>0;)n=Hn(n,t.shift(),0,r);return n}({},ro(),ao(t));this.resource=null!==(e=n.resource)&&void 0!==e?e:mr.empty(),this.resource=mr.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});var r=this._buildExporterFromEnv();if(void 0!==r){var o=new co(r);this.activeSpanProcessor=o}else this.activeSpanProcessor=new yo}return t.prototype.getTracer=function(t,e,n){var r=t+"@"+(e||"")+":"+((null==n?void 0:n.schemaUrl)||"");return this._tracers.has(r)||this._tracers.set(r,new _o({name:t,version:e,schemaUrl:null==n?void 0:n.schemaUrl},this._config,this)),this._tracers.get(r)},t.prototype.addSpanProcessor=function(t){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch((function(t){return It.error("Error while trying to shutdown current span processor",t)})),this._registeredSpanProcessors.push(t),this.activeSpanProcessor=new go(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(t){void 0===t&&(t={}),qt.setGlobalTracerProvider(this),void 0===t.propagator&&(t.propagator=this._buildPropagatorFromEnv()),t.contextManager&&kt.setGlobalContextManager(t.contextManager),t.propagator&&Xt.setGlobalPropagator(t.propagator)},t.prototype.forceFlush=function(){var t=this._config.forceFlushTimeoutMillis,e=this._registeredSpanProcessors.map((function(e){return new Promise((function(n){var r,o=setTimeout((function(){n(new Error("Span processor did not completed within timeout period of "+t+" ms")),r=ho.timeout}),t);e.forceFlush().then((function(){clearTimeout(o),r!==ho.timeout&&(r=ho.resolved,n(r))})).catch((function(t){clearTimeout(o),r=ho.error,n(t)}))}))}));return new Promise((function(t,n){Promise.all(e).then((function(e){var r=e.filter((function(t){return t!==ho.resolved}));r.length>0?n(r):t()})).catch((function(t){return n([t])}))}))},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(t){var e;return null===(e=this.constructor._registeredPropagators.get(t))||void 0===e?void 0:e()},t.prototype._getSpanExporter=function(t){var e;return null===(e=this.constructor._registeredExporters.get(t))||void 0===e?void 0:e()},t.prototype._buildPropagatorFromEnv=function(){var t=this,e=Array.from(new Set(Re().OTEL_PROPAGATORS)),n=e.map((function(e){var n=t._getPropagator(e);return n||It.warn('Propagator "'+e+'" requested through environment variable is unavailable.'),n})).reduce((function(t,e){return e&&t.push(e),t}),[]);return 0===n.length?void 0:1===e.length?n[0]:new yn({propagators:n})},t.prototype._buildExporterFromEnv=function(){var t=Re().OTEL_TRACES_EXPORTER;if("none"!==t&&""!==t){var e=this._getSpanExporter(t);return e||It.error('Exporter "'+t+'" requested through environment variable is unavailable.'),e}},t._registeredPropagators=new Map([["tracecontext",function(){return new An}],["baggage",function(){return new Jt}]]),t._registeredExporters=new Map,t}(),So=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Oo=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},Ro=function(){function t(){this._enabled=!1,this._currentContext=C}return t.prototype._bindFunction=function(t,e){void 0===t&&(t=C);var n=this,r=function(){for(var r=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return n.with(t,(function(){return e.apply(r,o)}))};return Object.defineProperty(r,"length",{enumerable:!1,configurable:!0,writable:!1,value:e.length}),r},t.prototype.active=function(){return this._currentContext},t.prototype.bind=function(t,e){return void 0===t&&(t=this.active()),"function"==typeof e?this._bindFunction(t,e):e},t.prototype.disable=function(){return this._currentContext=C,this._enabled=!1,this},t.prototype.enable=function(){return this._enabled||(this._enabled=!0,this._currentContext=C),this},t.prototype.with=function(t,e,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];var i=this._currentContext;this._currentContext=t||C;try{return e.call.apply(e,Oo([n],So(r),!1))}finally{this._currentContext=i}},t}(),wo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Po=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;if(e.contextManager)throw"contextManager should be defined in register method not in constructor";if(e.propagator)throw"propagator should be defined in register method not in constructor";return n}return wo(e,t),e.prototype.register=function(e){void 0===e&&(e={}),void 0===e.contextManager&&(e.contextManager=new Ro),e.contextManager&&e.contextManager.enable(),t.prototype.register.call(this,e)},e}(bo);function Lo(t,e){return e in t}function Ao(t,e,n,r){var o=void 0,i=void 0;Lo(n,e)&&"number"==typeof n[e]&&(o=n[e]);var a=r||Eo.FETCH_START;if(Lo(n,a)&&"number"==typeof n[a]&&(i=n[a]),void 0!==o&&void 0!==i&&o>=i)return t.addEvent(e,o),t}function Co(t,e){Ao(t,Eo.FETCH_START,e),Ao(t,Eo.DOMAIN_LOOKUP_START,e),Ao(t,Eo.DOMAIN_LOOKUP_END,e),Ao(t,Eo.CONNECT_START,e),Lo(e,"name")&&e.name.startsWith("https:")&&Ao(t,Eo.SECURE_CONNECTION_START,e),Ao(t,Eo.CONNECT_END,e),Ao(t,Eo.REQUEST_START,e),Ao(t,Eo.RESPONSE_START,e),Ao(t,Eo.RESPONSE_END,e);var n=e[Eo.ENCODED_BODY_SIZE];void 0!==n&&t.setAttribute($e,n);var r=e[Eo.DECODED_BODY_SIZE];void 0!==r&&n!==r&&t.setAttribute(Qe,r)}function ko(){return"undefined"!=typeof location?location.origin:void 0}function Io(t,e,n,r,o,i){void 0===o&&(o=new WeakSet);var a=No(t),s=function(t,e,n,r,o,i){var a=hn(e),s=hn(n),u=r.filter((function(e){var n=hn(fn(e[Eo.FETCH_START])),r=hn(fn(e[Eo.RESPONSE_END]));return e.initiatorType.toLowerCase()===(i||"xmlhttprequest")&&e.name===t&&n>=a&&r<=s}));u.length>0&&(u=u.filter((function(t){return!o.has(t)})));return u}(t=a.toString(),e,n,r,o,i);if(0===s.length)return{mainRequest:void 0};if(1===s.length)return{mainRequest:s[0]};var u=function(t){return t.slice().sort((function(t,e){var n=t[Eo.FETCH_START],r=e[Eo.FETCH_START];return n>r?1:n<r?-1:0}))}(s);if(a.origin!==ko()&&u.length>1){var c=u[0],l=function(t,e,n){for(var r,o=hn(n),i=hn(fn(e)),a=t[1],s=t.length,u=1;u<s;u++){var c=t[u],l=hn(fn(c[Eo.FETCH_START])),p=o-hn(fn(c[Eo.RESPONSE_END]));l>=i&&(!r||p<r)&&(r=p,a=c)}return a}(u,c[Eo.RESPONSE_END],n),p=c[Eo.RESPONSE_END];return l[Eo.FETCH_START]<p&&(l=c,c=void 0),{corsPreFlightRequest:c,mainRequest:l}}return{mainRequest:s[0]}}function No(t){if("function"==typeof URL)return new URL(t,"undefined"!=typeof document?document.baseURI:"undefined"!=typeof location?location.href:void 0);var e=(To||(To=document.createElement("a")),To);return e.href=t,e}function xo(t,e){var n=e||[];return("string"==typeof n||n instanceof RegExp)&&(n=[n]),No(t).origin===ko()||n.some((function(e){return Wn(t,e)}))}!function(t){t.CONNECT_END="connectEnd",t.CONNECT_START="connectStart",t.DECODED_BODY_SIZE="decodedBodySize",t.DOM_COMPLETE="domComplete",t.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",t.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",t.DOM_INTERACTIVE="domInteractive",t.DOMAIN_LOOKUP_END="domainLookupEnd",t.DOMAIN_LOOKUP_START="domainLookupStart",t.ENCODED_BODY_SIZE="encodedBodySize",t.FETCH_START="fetchStart",t.LOAD_EVENT_END="loadEventEnd",t.LOAD_EVENT_START="loadEventStart",t.NAVIGATION_START="navigationStart",t.REDIRECT_END="redirectEnd",t.REDIRECT_START="redirectStart",t.REQUEST_START="requestStart",t.RESPONSE_END="responseEnd",t.RESPONSE_START="responseStart",t.SECURE_CONNECTION_START="secureConnectionStart",t.UNLOAD_EVENT_END="unloadEventEnd",t.UNLOAD_EVENT_START="unloadEventStart"}(Eo||(Eo={})),function(t){t.COMPONENT="component",t.HTTP_ERROR_NAME="http.error_name",t.HTTP_STATUS_TEXT="http.status_text"}(mo||(mo={}));var Do,Mo,jo="0.52.0",Uo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zo="object"==typeof process&&"node"===(null===(Do=process.release)||void 0===Do?void 0:Do.name),Bo=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,"@opentelemetry/instrumentation-fetch",jo,e)||this;return n.component="fetch",n.version=jo,n.moduleName=n.component,n._usedResources=new WeakSet,n._tasksCount=0,n}return Uo(e,t),e.prototype.init=function(){},e.prototype._addChildSpan=function(t,e){var n=this.tracer.startSpan("CORS Preflight",{startTime:e[Eo.FETCH_START]},qt.setSpan(kt.active(),t));this.getConfig().ignoreNetworkEvents||Co(n,e),n.end(e[Eo.RESPONSE_END])},e.prototype._addFinalSpanAttributes=function(t,e){var n=No(e.url);t.setAttribute(Je.HTTP_STATUS_CODE,e.status),null!=e.statusText&&t.setAttribute(mo.HTTP_STATUS_TEXT,e.statusText),t.setAttribute(Je.HTTP_HOST,n.host),t.setAttribute(Je.HTTP_SCHEME,n.protocol.replace(":","")),"undefined"!=typeof navigator&&t.setAttribute(Je.HTTP_USER_AGENT,navigator.userAgent)},e.prototype._addHeaders=function(t,e){if(!xo(e,this.getConfig().propagateTraceHeaderCorsUrls)){var n={};return Xt.inject(kt.active(),n),void(Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy"))}if(t instanceof Request)Xt.inject(kt.active(),t.headers,{set:function(t,e,n){return t.set(e,"string"==typeof n?n:String(n))}});else if(t.headers instanceof Headers)Xt.inject(kt.active(),t.headers,{set:function(t,e,n){return t.set(e,"string"==typeof n?n:String(n))}});else if(t.headers instanceof Map)Xt.inject(kt.active(),t.headers,{set:function(t,e,n){return t.set(e,"string"==typeof n?n:String(n))}});else{n={};Xt.inject(kt.active(),n),t.headers=Object.assign({},n,t.headers||{})}},e.prototype._clearResources=function(){0===this._tasksCount&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)},e.prototype._createSpan=function(t,e){var n;if(void 0===e&&(e={}),!Kn(t,this.getConfig().ignoreUrls)){var r=(e.method||"GET").toUpperCase(),o="HTTP "+r;return this.tracer.startSpan(o,{kind:Rt.CLIENT,attributes:(n={},n[mo.COMPONENT]=this.moduleName,n[Je.HTTP_METHOD]=r,n[Je.HTTP_URL]=t,n)})}this._diag.debug("ignoring span as url matches ignored url")},e.prototype._findResourceAndAddNetworkEvents=function(t,e,n){var r=e.entries;if(!r.length){if(!performance.getEntriesByType)return;r=performance.getEntriesByType("resource")}var o=Io(e.spanUrl,e.startTime,n,r,this._usedResources,"fetch");if(o.mainRequest){var i=o.mainRequest;this._markResourceAsUsed(i);var a=o.corsPreFlightRequest;a&&(this._addChildSpan(t,a),this._markResourceAsUsed(a)),this.getConfig().ignoreNetworkEvents||Co(t,i)}},e.prototype._markResourceAsUsed=function(t){this._usedResources.add(t)},e.prototype._endSpan=function(t,e,n){var r=this,o=cn(Date.now()),i=pn();this._addFinalSpanAttributes(t,n),setTimeout((function(){var n;null===(n=e.observer)||void 0===n||n.disconnect(),r._findResourceAndAddNetworkEvents(t,e,i),r._tasksCount--,r._clearResources(),t.end(o)}),300)},e.prototype._patchConstructor=function(){var t=this;return function(e){var n=t;return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=this,i=No(t[0]instanceof Request?t[0].url:String(t[0])).href,a=t[0]instanceof Request?t[0]:t[1]||{},s=n._createSpan(i,a);if(!s)return e.apply(this,t);var u=n._prepareSpanData(i);function c(t,e){n._applyAttributesAfterFetch(t,a,e),n._endSpan(t,u,{status:e.status||0,statusText:e.message,url:i})}function l(t,e){n._applyAttributesAfterFetch(t,a,e),e.status>=200&&e.status<400?n._endSpan(t,u,e):n._endSpan(t,u,{status:e.status,statusText:e.statusText,url:i})}function p(t,e,n){try{var r=n.clone(),o=n.clone(),i=r.body;if(i){var a=i.getReader(),s=function(){a.read().then((function(e){e.done?l(t,o):s()}),(function(e){c(t,e)}))};s()}else l(t,n)}finally{e(n)}}function f(t,e,n){try{c(t,n)}finally{e(n)}}return new Promise((function(t,r){return kt.with(qt.setSpan(kt.active(),s),(function(){return n._addHeaders(a,i),n._tasksCount++,e.apply(o,a instanceof Request?[a]:[i,a]).then(p.bind(o,s,t),f.bind(o,s,r))}))}))}}},e.prototype._applyAttributesAfterFetch=function(t,e,n){var r=this,o=this.getConfig().applyCustomAttributesOnSpan;o&&Gr((function(){return o(t,e,n)}),(function(t){t&&r._diag.error("applyCustomAttributesOnSpan",t)}),!0)},e.prototype._prepareSpanData=function(t){var e=pn(),n=[];if("function"!=typeof PerformanceObserver)return{entries:n,startTime:e,spanUrl:t};var r=new PerformanceObserver((function(e){e.getEntries().forEach((function(e){"fetch"===e.initiatorType&&e.name===t&&n.push(e)}))}));return r.observe({entryTypes:["resource"]}),{entries:n,observer:r,startTime:e,spanUrl:t}},e.prototype.enable=function(){Zo?this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()"):(Xr(fetch)&&(this._unwrap(Oe,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(Oe,"fetch",this._patchConstructor()))},e.prototype.disable=function(){Zo||(this._unwrap(Oe,"fetch"),this._usedResources=new WeakSet)},e}(Fr);!function(t){t.METHOD_OPEN="open",t.METHOD_SEND="send",t.EVENT_ABORT="abort",t.EVENT_ERROR="error",t.EVENT_LOAD="loaded",t.EVENT_TIMEOUT="timeout"}(Mo||(Mo={}));var Ho,zo="0.52.0";!function(t){t.HTTP_STATUS_TEXT="http.status_text"}(Ho||(Ho={}));var Fo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Go=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,"@opentelemetry/instrumentation-xml-http-request",zo,e)||this;return n.component="xml-http-request",n.version=zo,n.moduleName=n.component,n._tasksCount=0,n._xhrMem=new WeakMap,n._usedResources=new WeakSet,n}return Fo(e,t),e.prototype.init=function(){},e.prototype._addHeaders=function(t,e){if(!xo(No(e).href,this.getConfig().propagateTraceHeaderCorsUrls)){var n={};return Xt.inject(kt.active(),n),void(Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy"))}var r={};Xt.inject(kt.active(),r),Object.keys(r).forEach((function(e){t.setRequestHeader(e,String(r[e]))}))},e.prototype._addChildSpan=function(t,e){var n=this;kt.with(qt.setSpan(kt.active(),t),(function(){var t=n.tracer.startSpan("CORS Preflight",{startTime:e[Eo.FETCH_START]});n.getConfig().ignoreNetworkEvents||Co(t,e),t.end(e[Eo.RESPONSE_END])}))},e.prototype._addFinalSpanAttributes=function(t,e,n){if("string"==typeof n){var r=No(n);void 0!==e.status&&t.setAttribute(Ke,e.status),void 0!==e.statusText&&t.setAttribute(Ho.HTTP_STATUS_TEXT,e.statusText),t.setAttribute(qe,r.host),t.setAttribute(We,r.protocol.replace(":","")),t.setAttribute(Ye,navigator.userAgent)}},e.prototype._applyAttributesAfterXHR=function(t,e){var n=this,r=this.getConfig().applyCustomAttributesOnSpan;"function"==typeof r&&Gr((function(){return r(t,e)}),(function(t){t&&n._diag.error("applyCustomAttributesOnSpan",t)}),!0)},e.prototype._addResourceObserver=function(t,e){var n=this._xhrMem.get(t);n&&"function"==typeof PerformanceObserver&&"function"==typeof PerformanceResourceTiming&&(n.createdResources={observer:new PerformanceObserver((function(t){var r=t.getEntries(),o=No(e);r.forEach((function(t){"xmlhttprequest"===t.initiatorType&&t.name===o.href&&n.createdResources&&n.createdResources.entries.push(t)}))})),entries:[]},n.createdResources.observer.observe({entryTypes:["resource"]}))},e.prototype._clearResources=function(){0===this._tasksCount&&this.getConfig().clearTimingResources&&(Le.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},e.prototype._findResourceAndAddNetworkEvents=function(t,e,n,r,o){if(n&&r&&o&&t.createdResources){var i=t.createdResources.entries;i&&i.length||(i=Le.getEntriesByType("resource"));var a=Io(No(n).href,r,o,i,this._usedResources);if(a.mainRequest){var s=a.mainRequest;this._markResourceAsUsed(s);var u=a.corsPreFlightRequest;u&&(this._addChildSpan(e,u),this._markResourceAsUsed(u)),this.getConfig().ignoreNetworkEvents||Co(e,s)}}},e.prototype._cleanPreviousSpanInformation=function(t){var e=this._xhrMem.get(t);if(e){var n=e.callbackToRemoveEvents;n&&n(),this._xhrMem.delete(t)}},e.prototype._createSpan=function(t,e,n){var r;if(!Kn(e,this.getConfig().ignoreUrls)){var o=n.toUpperCase(),i=this.tracer.startSpan(o,{kind:Rt.CLIENT,attributes:(r={},r[Xe]=n,r[Ve]=No(e).toString(),r)});return i.addEvent(Mo.METHOD_OPEN),this._cleanPreviousSpanInformation(t),this._xhrMem.set(t,{span:i,spanUrl:e}),i}this._diag.debug("ignoring span as url matches ignored url")},e.prototype._markResourceAsUsed=function(t){this._usedResources.add(t)},e.prototype._patchOpen=function(){var t=this;return function(e){var n=t;return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=t[0],i=t[1];return n._createSpan(this,i,o),e.apply(this,t)}}},e.prototype._patchSend=function(){var t=this;function e(e,n){var r=t._xhrMem.get(n);if(r){r.status=n.status,r.statusText=n.statusText,t._xhrMem.delete(n),r.span&&t._applyAttributesAfterXHR(r.span,n);var o=pn(),i=Date.now();setTimeout((function(){!function(e,n,r,o){var i=n.callbackToRemoveEvents;"function"==typeof i&&i();var a=n.span,s=n.spanUrl,u=n.sendStartTime;a&&(t._findResourceAndAddNetworkEvents(n,a,s,u,r),a.addEvent(e,o),t._addFinalSpanAttributes(a,n,s),a.end(o),t._tasksCount--),t._clearResources()}(e,r,o,i)}),300)}}function n(){e(Mo.EVENT_ERROR,this)}function r(){e(Mo.EVENT_ABORT,this)}function o(){e(Mo.EVENT_TIMEOUT,this)}function i(){this.status<299?e(Mo.EVENT_LOAD,this):e(Mo.EVENT_ERROR,this)}function a(e){e.removeEventListener("abort",r),e.removeEventListener("error",n),e.removeEventListener("load",i),e.removeEventListener("timeout",o);var a=t._xhrMem.get(e);a&&(a.callbackToRemoveEvents=void 0)}return function(e){return function(){for(var s=this,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];var l=t._xhrMem.get(this);if(!l)return e.apply(this,u);var p=l.span,f=l.spanUrl;return p&&f&&kt.with(qt.setSpan(kt.active(),p),(function(){t._tasksCount++,l.sendStartTime=pn(),p.addEvent(Mo.METHOD_SEND),s.addEventListener("abort",r),s.addEventListener("error",n),s.addEventListener("load",i),s.addEventListener("timeout",o),l.callbackToRemoveEvents=function(){a(s),l.createdResources&&l.createdResources.observer.disconnect()},t._addHeaders(s,f),t._addResourceObserver(s,f)})),e.apply(this,u)}}},e.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),Xr(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),Xr(XMLHttpRequest.prototype.send)&&(this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.debug("removing previous patch from method send")),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend())},e.prototype.disable=function(){this._diag.debug("removing patch from",this.moduleName,this.version),this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet},e}(Fr);const Xo={ignoreUrls:[],propagateTraceHeaderCorsUrls:[]};function Vo(t=Xo){const{fetchInstrumentationOptions:e,xhrInstrumentationOptions:n}=t,r=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}(t,["fetchInstrumentationOptions","xhrInstrumentationOptions"]);return[new Bo(Object.assign(Object.assign({},r),e)),new Go(Object.assign(Object.assign({},r),n))]}var qo="OT_ZONE_CONTEXT",Wo=function(){function t(){this._enabled=!1,this._zoneCounter=0}return t.prototype._activeContextFromZone=function(t){return t&&t.get(qo)||C},t.prototype._bindFunction=function(t,e){var n=this,r=function(){for(var r=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return n.with(t,(function(){return e.apply(r,o)}))};return Object.defineProperty(r,"length",{enumerable:!1,configurable:!0,writable:!1,value:e.length}),r},t.prototype._bindListener=function(t,e){var n=e;return void 0!==n.__ot_listeners||(n.__ot_listeners={},"function"==typeof n.addEventListener&&(n.addEventListener=this._patchAddEventListener(n,n.addEventListener,t)),"function"==typeof n.removeEventListener&&(n.removeEventListener=this._patchRemoveEventListener(n,n.removeEventListener))),e},t.prototype._createZoneName=function(){this._zoneCounter++;var t=Math.random();return this._zoneCounter+"-"+t},t.prototype._createZone=function(t,e){var n;return Zone.current.fork({name:t,properties:(n={},n[qo]=e,n)})},t.prototype._getActiveZone=function(){return Zone.current},t.prototype._patchAddEventListener=function(t,e,n){var r=this;return function(o,i,a){void 0===t.__ot_listeners&&(t.__ot_listeners={});var s=t.__ot_listeners[o];void 0===s&&(s=new WeakMap,t.__ot_listeners[o]=s);var u=r.bind(n,i);return s.set(i,u),e.call(this,o,u,a)}},t.prototype._patchRemoveEventListener=function(t,e){return function(n,r){if(void 0===t.__ot_listeners||void 0===t.__ot_listeners[n])return e.call(this,n,r);var o=t.__ot_listeners[n],i=o.get(r);return o.delete(r),e.call(this,n,i||r)}},t.prototype.active=function(){if(!this._enabled)return C;var t=this._getActiveZone(),e=this._activeContextFromZone(t);return e||C},t.prototype.bind=function(t,e){return void 0===t&&(t=this.active()),"function"==typeof e?this._bindFunction(t,e):(void 0===(n=e)&&(n={}),"function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener&&this._bindListener(t,e),e);var n},t.prototype.disable=function(){return this._enabled=!1,this},t.prototype.enable=function(){return this._enabled=!0,this},t.prototype.with=function(t,e,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];var i=this._createZoneName(),a=this._createZone(i,t);return a.run(e,n,r)},t}();
1
+ var GrafanaFaroWebTracing=function(t,e){"use strict";var n="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},r="1.9.0",o=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;var i=function(t){var e=new Set([t]),n=new Set,r=t.match(o);if(!r)return function(){return!1};var i=+r[1],a=+r[2],s=+r[3];if(null!=r[4])return function(e){return e===t};function u(t){return n.add(t),!1}function c(t){return e.add(t),!0}return function(t){if(e.has(t))return!0;if(n.has(t))return!1;var r=t.match(o);if(!r)return u(t);var l=+r[1],p=+r[2],f=+r[3];return null!=r[4]||i!==l?u(t):0===i?a===p&&s<=f?c(t):u(t):a<=p?c(t):u(t)}}(r),a=r.split(".")[0],s=Symbol.for("opentelemetry.js.api."+a),u=n;function c(t,e,n,o){var i;void 0===o&&(o=!1);var a=u[s]=null!==(i=u[s])&&void 0!==i?i:{version:r};if(!o&&a[t]){var c=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return n.error(c.stack||c.message),!1}if(a.version!==r){c=new Error("@opentelemetry/api: Registration of version v"+a.version+" for "+t+" does not match previously registered API v"+r);return n.error(c.stack||c.message),!1}return a[t]=e,n.debug("@opentelemetry/api: Registered a global for "+t+" v"+r+"."),!0}function l(t){var e,n,r=null===(e=u[s])||void 0===e?void 0:e.version;if(r&&i(r))return null===(n=u[s])||void 0===n?void 0:n[t]}function p(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+r+".");var n=u[s];n&&delete n[t]}var f,h=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},d=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},_=function(){function t(t){this._namespace=t.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return v("debug",this._namespace,t)},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return v("error",this._namespace,t)},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return v("info",this._namespace,t)},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return v("warn",this._namespace,t)},t.prototype.verbose=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return v("verbose",this._namespace,t)},t}();function v(t,e,n){var r=l("diag");if(r)return n.unshift(e),r[t].apply(r,d([],h(n),!1))}!function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"}(f||(f={}));var g=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},y=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},E=function(){function t(){function t(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=l("diag");if(r)return r[t].apply(r,y([],g(e),!1))}}var e=this;e.setLogger=function(t,n){var r,o,i;if(void 0===n&&(n={logLevel:f.INFO}),t===e){var a=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return e.error(null!==(r=a.stack)&&void 0!==r?r:a.message),!1}"number"==typeof n&&(n={logLevel:n});var s=l("diag"),u=function(t,e){function n(n,r){var o=e[n];return"function"==typeof o&&t>=r?o.bind(e):function(){}}return t<f.NONE?t=f.NONE:t>f.ALL&&(t=f.ALL),e=e||{},{error:n("error",f.ERROR),warn:n("warn",f.WARN),info:n("info",f.INFO),debug:n("debug",f.DEBUG),verbose:n("verbose",f.VERBOSE)}}(null!==(o=n.logLevel)&&void 0!==o?o:f.INFO,t);if(s&&!n.suppressOverrideMessage){var p=null!==(i=(new Error).stack)&&void 0!==i?i:"<failed to generate stacktrace>";s.warn("Current logger will be overwritten from "+p),u.warn("Current logger will overwrite one already registered from "+p)}return c("diag",u,e,!0)},e.disable=function(){p("diag",e)},e.createComponentLogger=function(t){return new _(t)},e.verbose=t("verbose"),e.debug=t("debug"),e.info=t("info"),e.warn=t("warn"),e.error=t("error")}return t.instance=function(){return this._instance||(this._instance=new t),this._instance},t}(),T=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},m=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},b=function(){function t(t){this._entries=t?new Map(t):new Map}return t.prototype.getEntry=function(t){var e=this._entries.get(t);if(e)return Object.assign({},e)},t.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map((function(t){var e=T(t,2);return[e[0],e[1]]}))},t.prototype.setEntry=function(e,n){var r=new t(this._entries);return r._entries.set(e,n),r},t.prototype.removeEntry=function(e){var n=new t(this._entries);return n._entries.delete(e),n},t.prototype.removeEntries=function(){for(var e,n,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=new t(this._entries);try{for(var a=m(r),s=a.next();!s.done;s=a.next()){var u=s.value;i._entries.delete(u)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return i},t.prototype.clear=function(){return new t},t}(),S=Symbol("BaggageEntryMetadata"),O=E.instance();function R(t){return void 0===t&&(t={}),new b(new Map(Object.entries(t)))}function w(t){return Symbol.for(t)}var P,L,A=function t(e){var n=this;n._currentContext=e?new Map(e):new Map,n.getValue=function(t){return n._currentContext.get(t)},n.setValue=function(e,r){var o=new t(n._currentContext);return o._currentContext.set(e,r),o},n.deleteValue=function(e){var r=new t(n._currentContext);return r._currentContext.delete(e),r}},C=new A,k=(P=function(t,e){return P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},P(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}P(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),I=function(){function t(){}return t.prototype.createGauge=function(t,e){return G},t.prototype.createHistogram=function(t,e){return X},t.prototype.createCounter=function(t,e){return F},t.prototype.createUpDownCounter=function(t,e){return V},t.prototype.createObservableGauge=function(t,e){return W},t.prototype.createObservableCounter=function(t,e){return q},t.prototype.createObservableUpDownCounter=function(t,e){return K},t.prototype.addBatchObservableCallback=function(t,e){},t.prototype.removeBatchObservableCallback=function(t){},t}(),N=function(){},x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return k(e,t),e.prototype.add=function(t,e){},e}(N),D=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return k(e,t),e.prototype.add=function(t,e){},e}(N),M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return k(e,t),e.prototype.record=function(t,e){},e}(N),j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return k(e,t),e.prototype.record=function(t,e){},e}(N),U=function(){function t(){}return t.prototype.addCallback=function(t){},t.prototype.removeCallback=function(t){},t}(),Z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return k(e,t),e}(U),B=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return k(e,t),e}(U),H=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return k(e,t),e}(U),z=new I,F=new x,G=new M,X=new j,V=new D,q=new Z,W=new B,K=new H,Y={get:function(t,e){if(null!=t)return t[e]},keys:function(t){return null==t?[]:Object.keys(t)}},$={set:function(t,e,n){null!=t&&(t[e]=n)}},Q=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},J=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},tt=function(){function t(){}return t.prototype.active=function(){return C},t.prototype.with=function(t,e,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];return e.call.apply(e,J([n],Q(r),!1))},t.prototype.bind=function(t,e){return e},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t}(),et=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},nt=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},rt="context",ot=new tt,it=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalContextManager=function(t){return c(rt,t,E.instance())},t.prototype.active=function(){return this._getContextManager().active()},t.prototype.with=function(t,e,n){for(var r,o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];return(r=this._getContextManager()).with.apply(r,nt([t,e,n],et(o),!1))},t.prototype.bind=function(t,e){return this._getContextManager().bind(t,e)},t.prototype._getContextManager=function(){return l(rt)||ot},t.prototype.disable=function(){this._getContextManager().disable(),p(rt,E.instance())},t}();!function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"}(L||(L={}));var at="0000000000000000",st="00000000000000000000000000000000",ut={traceId:st,spanId:at,traceFlags:L.NONE},ct=function(){function t(t){void 0===t&&(t=ut),this._spanContext=t}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(t,e){return this},t.prototype.setAttributes=function(t){return this},t.prototype.addEvent=function(t,e){return this},t.prototype.addLink=function(t){return this},t.prototype.addLinks=function(t){return this},t.prototype.setStatus=function(t){return this},t.prototype.updateName=function(t){return this},t.prototype.end=function(t){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(t,e){},t}(),lt=w("OpenTelemetry Context Key SPAN");function pt(t){return t.getValue(lt)||void 0}function ft(){return pt(it.getInstance().active())}function ht(t,e){return t.setValue(lt,e)}function dt(t){return t.deleteValue(lt)}function _t(t,e){return ht(t,new ct(e))}function vt(t){var e;return null===(e=pt(t))||void 0===e?void 0:e.spanContext()}var gt=/^([0-9a-f]{32})$/i,yt=/^[0-9a-f]{16}$/i;function Et(t){return gt.test(t)&&t!==st}function Tt(t){return Et(t.traceId)&&(e=t.spanId,yt.test(e)&&e!==at);var e}function mt(t){return new ct(t)}var bt=it.getInstance(),St=function(){function t(){}return t.prototype.startSpan=function(t,e,n){if(void 0===n&&(n=bt.active()),Boolean(null==e?void 0:e.root))return new ct;var r,o=n&&vt(n);return"object"==typeof(r=o)&&"string"==typeof r.spanId&&"string"==typeof r.traceId&&"number"==typeof r.traceFlags&&Tt(o)?new ct(o):new ct},t.prototype.startActiveSpan=function(t,e,n,r){var o,i,a;if(!(arguments.length<2)){2===arguments.length?a=e:3===arguments.length?(o=e,a=n):(o=e,i=n,a=r);var s=null!=i?i:bt.active(),u=this.startSpan(t,o,s),c=ht(s,u);return bt.with(c,a,void 0,u)}},t}();var Ot,Rt,wt,Pt=new St,Lt=function(){function t(t,e,n,r){this._provider=t,this.name=e,this.version=n,this.options=r}return t.prototype.startSpan=function(t,e,n){return this._getTracer().startSpan(t,e,n)},t.prototype.startActiveSpan=function(t,e,n,r){var o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)},t.prototype._getTracer=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):Pt},t}(),At=new(function(){function t(){}return t.prototype.getTracer=function(t,e,n){return new St},t}()),Ct=function(){function t(){}return t.prototype.getTracer=function(t,e,n){var r;return null!==(r=this.getDelegateTracer(t,e,n))&&void 0!==r?r:new Lt(this,t,e,n)},t.prototype.getDelegate=function(){var t;return null!==(t=this._delegate)&&void 0!==t?t:At},t.prototype.setDelegate=function(t){this._delegate=t},t.prototype.getDelegateTracer=function(t,e,n){var r;return null===(r=this._delegate)||void 0===r?void 0:r.getTracer(t,e,n)},t}();!function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(Ot||(Ot={})),function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"}(Rt||(Rt={})),function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"}(wt||(wt={}));var kt=it.getInstance(),It=E.instance(),Nt=new(function(){function t(){}return t.prototype.getMeter=function(t,e,n){return z},t}()),xt="metrics",Dt=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalMeterProvider=function(t){return c(xt,t,E.instance())},t.prototype.getMeterProvider=function(){return l(xt)||Nt},t.prototype.getMeter=function(t,e,n){return this.getMeterProvider().getMeter(t,e,n)},t.prototype.disable=function(){p(xt,E.instance())},t}().getInstance(),Mt=function(){function t(){}return t.prototype.inject=function(t,e){},t.prototype.extract=function(t,e){return t},t.prototype.fields=function(){return[]},t}(),jt=w("OpenTelemetry Baggage Key");function Ut(t){return t.getValue(jt)||void 0}function Zt(){return Ut(it.getInstance().active())}function Bt(t,e){return t.setValue(jt,e)}function Ht(t){return t.deleteValue(jt)}var zt="propagation",Ft=new Mt,Gt=function(){function t(){this.createBaggage=R,this.getBaggage=Ut,this.getActiveBaggage=Zt,this.setBaggage=Bt,this.deleteBaggage=Ht}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalPropagator=function(t){return c(zt,t,E.instance())},t.prototype.inject=function(t,e,n){return void 0===n&&(n=$),this._getGlobalPropagator().inject(t,e,n)},t.prototype.extract=function(t,e,n){return void 0===n&&(n=Y),this._getGlobalPropagator().extract(t,e,n)},t.prototype.fields=function(){return this._getGlobalPropagator().fields()},t.prototype.disable=function(){p(zt,E.instance())},t.prototype._getGlobalPropagator=function(){return l(zt)||Ft},t}(),Xt=Gt.getInstance(),Vt="trace",qt=function(){function t(){this._proxyTracerProvider=new Ct,this.wrapSpanContext=mt,this.isSpanContextValid=Tt,this.deleteSpan=dt,this.getSpan=pt,this.getActiveSpan=ft,this.getSpanContext=vt,this.setSpan=ht,this.setSpanContext=_t}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalTracerProvider=function(t){var e=c(Vt,this._proxyTracerProvider,E.instance());return e&&this._proxyTracerProvider.setDelegate(t),e},t.prototype.getTracerProvider=function(){return l(Vt)||this._proxyTracerProvider},t.prototype.getTracer=function(t,e){return this.getTracerProvider().getTracer(t,e)},t.prototype.disable=function(){p(Vt,E.instance()),this._proxyTracerProvider=new Ct},t}().getInstance(),Wt=w("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Kt(t){return!0===t.getValue(Wt)}var Yt="baggage",$t=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function Qt(t){var e=t.split(";");if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf("=");if(!(r<=0)){var o,i,a=decodeURIComponent(n.substring(0,r).trim()),s=decodeURIComponent(n.substring(r+1).trim());return e.length>0&&("string"!=typeof(i=e.join(";"))&&(O.error("Cannot create baggage metadata from unknown type: "+typeof i),i=""),o={__TYPE__:S,toString:function(){return i}}),{key:a,value:s,metadata:o}}}}}var Jt=function(){function t(){}return t.prototype.inject=function(t,e,n){var r=Xt.getBaggage(t);if(r&&!Kt(t)){var o=function(t){return t.getAllEntries().map((function(t){var e=$t(t,2),n=e[0],r=e[1],o=encodeURIComponent(n)+"="+encodeURIComponent(r.value);return void 0!==r.metadata&&(o+=";"+r.metadata.toString()),o}))}(r).filter((function(t){return t.length<=4096})).slice(0,180),i=function(t){return t.reduce((function(t,e){var n=t+(""!==t?",":"")+e;return n.length>8192?t:n}),"")}(o);i.length>0&&n.set(e,Yt,i)}},t.prototype.extract=function(t,e,n){var r=n.get(e,Yt),o=Array.isArray(r)?r.join(","):r;if(!o)return t;var i={};return 0===o.length?t:(o.split(",").forEach((function(t){var e=Qt(t);if(e){var n={value:e.value};e.metadata&&(n.metadata=e.metadata),i[e.key]=n}})),0===Object.entries(i).length?t:Xt.setBaggage(t,Xt.createBaggage(i)))},t.prototype.fields=function(){return[Yt]},t}(),te=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ee=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function ne(t){var e,n,r={};if("object"!=typeof t||null==t)return r;try{for(var o=te(Object.entries(t)),i=o.next();!i.done;i=o.next()){var a=ee(i.value,2),s=a[0],u=a[1];re(s)?oe(u)?Array.isArray(u)?r[s]=u.slice():r[s]=u:It.warn("Invalid attribute value set for key: "+s):It.warn("Invalid attribute key: "+s)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}function re(t){return"string"==typeof t&&t.length>0}function oe(t){return null==t||(Array.isArray(t)?function(t){var e,n,r;try{for(var o=te(t),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){if(!r){if(ie(a)){r=typeof a;continue}return!1}if(typeof a!==r)return!1}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return!0}(t):ie(t))}function ie(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}var ae,se=function(t){It.error(function(t){return"string"==typeof t?t:JSON.stringify(function(t){for(var e={},n=t;null!==n;)Object.getOwnPropertyNames(n).forEach((function(t){if(!e[t]){var r=n[t];r&&(e[t]=String(r))}})),n=Object.getPrototypeOf(n);return e}(t))}(t))};function ue(t){try{se(t)}catch(t){}}!function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"}(ae||(ae={}));var ce=",",le=["OTEL_SDK_DISABLED"];function pe(t){return le.indexOf(t)>-1}var fe=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function he(t){return fe.indexOf(t)>-1}var de=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function _e(t){return de.indexOf(t)>-1}var ve=1/0,ge=128,ye={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:f.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:ve,OTEL_ATTRIBUTE_COUNT_LIMIT:ge,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:ve,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:ge,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:ve,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:ge,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:128,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ae.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function Ee(t,e,n){if(void 0!==n[t]){var r=String(n[t]);e[t]="true"===r.toLowerCase()}}function Te(t,e,n,r,o){if(void 0===r&&(r=-1/0),void 0===o&&(o=1/0),void 0!==n[t]){var i=Number(n[t]);isNaN(i)||(e[t]=i<r?r:i>o?o:i)}}function me(t,e,n,r){void 0===r&&(r=ce);var o=n[t];"string"==typeof o&&(e[t]=o.split(r).map((function(t){return t.trim()})))}var be={ALL:f.ALL,VERBOSE:f.VERBOSE,DEBUG:f.DEBUG,INFO:f.INFO,WARN:f.WARN,ERROR:f.ERROR,NONE:f.NONE};function Se(t,e,n){var r=n[t];if("string"==typeof r){var o=be[r.toUpperCase()];null!=o&&(e[t]=o)}}function Oe(t){var e={};for(var n in ye){var r=n;if("OTEL_LOG_LEVEL"===r)Se(r,e,t);else if(pe(r))Ee(r,e,t);else if(he(r))Te(r,e,t);else if(_e(r))me(r,e,t);else{var o=t[r];null!=o&&(e[r]=String(o))}}return e}var Re="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{};function we(){var t=Oe(Re);return Object.assign({},ye,t)}function Pe(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function Le(t){for(var e=new Uint8Array(t.length/2),n=0,r=0;r<t.length;r+=2){var o=Pe(t.charCodeAt(r)),i=Pe(t.charCodeAt(r+1));e[n++]=o<<4|i}return e}var Ae=performance;function Ce(t){for(var e={},n=t.length,r=0;r<n;r++){var o=t[r];o&&(e[String(o).toUpperCase().replace(/[-.]/g,"_")]=o)}return e}var ke,Ie="exception.type",Ne="exception.message",xe="exception.stacktrace",De="http.method",Me="http.url",je="http.host",Ue="http.scheme",Ze="http.status_code",Be="http.user_agent",He="http.response_content_length",ze="http.response_content_length_uncompressed",Fe=Ie,Ge=Ne,Xe=xe,Ve=De,qe=Me,We=je,Ke=Ue,Ye=Ze,$e=Be,Qe=He,Je=ze,tn=Ce(["aws.lambda.invoked_arn","db.system","db.connection_string","db.user","db.jdbc.driver_classname","db.name","db.statement","db.operation","db.mssql.instance_name","db.cassandra.keyspace","db.cassandra.page_size","db.cassandra.consistency_level","db.cassandra.table","db.cassandra.idempotence","db.cassandra.speculative_execution_count","db.cassandra.coordinator.id","db.cassandra.coordinator.dc","db.hbase.namespace","db.redis.database_index","db.mongodb.collection","db.sql.table",Ie,Ne,xe,"exception.escaped","faas.trigger","faas.execution","faas.document.collection","faas.document.operation","faas.document.time","faas.document.name","faas.time","faas.cron","faas.coldstart","faas.invoked_name","faas.invoked_provider","faas.invoked_region","net.transport","net.peer.ip","net.peer.port","net.peer.name","net.host.ip","net.host.port","net.host.name","net.host.connection.type","net.host.connection.subtype","net.host.carrier.name","net.host.carrier.mcc","net.host.carrier.mnc","net.host.carrier.icc","peer.service","enduser.id","enduser.role","enduser.scope","thread.id","thread.name","code.function","code.namespace","code.filepath","code.lineno",De,Me,"http.target",je,Ue,Ze,"http.flavor",Be,"http.request_content_length","http.request_content_length_uncompressed",He,ze,"http.server_name","http.route","http.client_ip","aws.dynamodb.table_names","aws.dynamodb.consumed_capacity","aws.dynamodb.item_collection_metrics","aws.dynamodb.provisioned_read_capacity","aws.dynamodb.provisioned_write_capacity","aws.dynamodb.consistent_read","aws.dynamodb.projection","aws.dynamodb.limit","aws.dynamodb.attributes_to_get","aws.dynamodb.index_name","aws.dynamodb.select","aws.dynamodb.global_secondary_indexes","aws.dynamodb.local_secondary_indexes","aws.dynamodb.exclusive_start_table","aws.dynamodb.table_count","aws.dynamodb.scan_forward","aws.dynamodb.segment","aws.dynamodb.total_segments","aws.dynamodb.count","aws.dynamodb.scanned_count","aws.dynamodb.attribute_definitions","aws.dynamodb.global_secondary_index_updates","messaging.system","messaging.destination","messaging.destination_kind","messaging.temp_destination","messaging.protocol","messaging.protocol_version","messaging.url","messaging.message_id","messaging.conversation_id","messaging.message_payload_size_bytes","messaging.message_payload_compressed_size_bytes","messaging.operation","messaging.consumer_id","messaging.rabbitmq.routing_key","messaging.kafka.message_key","messaging.kafka.consumer_group","messaging.kafka.client_id","messaging.kafka.partition","messaging.kafka.tombstone","rpc.system","rpc.service","rpc.method","rpc.grpc.status_code","rpc.jsonrpc.version","rpc.jsonrpc.request_id","rpc.jsonrpc.error_code","rpc.jsonrpc.error_message","message.type","message.id","message.compressed_size","message.uncompressed_size"]),en="service.name",nn="telemetry.sdk.name",rn="telemetry.sdk.language",on="telemetry.sdk.version",an=((ke={})[nn]="opentelemetry",ke["process.runtime.name"]="browser",ke[rn]="webjs",ke[on]="1.25.0",ke);var sn,un=Math.pow(10,6),cn=Math.pow(10,9);function ln(t){var e=t/1e3;return[Math.trunc(e),Math.round(t%1e3*un)]}function pn(){var t=Ae.timeOrigin;if("number"!=typeof t){var e=Ae;t=e.timing&&e.timing.fetchStart}return t}function fn(t){return gn(ln(pn()),ln("number"==typeof t?t:Ae.now()))}function hn(t){if(_n(t))return t;if("number"==typeof t)return t<pn()?fn(t):ln(t);if(t instanceof Date)return ln(t.getTime());throw TypeError("Invalid input type")}function dn(t){return t[0]*cn+t[1]}function _n(t){return Array.isArray(t)&&2===t.length&&"number"==typeof t[0]&&"number"==typeof t[1]}function vn(t){return _n(t)||"number"==typeof t||t instanceof Date}function gn(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=cn&&(n[1]-=cn,n[0]+=1),n}!function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"}(sn||(sn={}));var yn=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},En=function(){function t(t){var e;void 0===t&&(t={}),this._propagators=null!==(e=t.propagators)&&void 0!==e?e:[],this._fields=Array.from(new Set(this._propagators.map((function(t){return"function"==typeof t.fields?t.fields():[]})).reduce((function(t,e){return t.concat(e)}),[])))}return t.prototype.inject=function(t,e,n){var r,o;try{for(var i=yn(this._propagators),a=i.next();!a.done;a=i.next()){var s=a.value;try{s.inject(t,e,n)}catch(t){It.warn("Failed to inject with "+s.constructor.name+". Err: "+t.message)}}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}},t.prototype.extract=function(t,e,n){return this._propagators.reduce((function(t,r){try{return r.extract(t,e,n)}catch(t){It.warn("Failed to inject with "+r.constructor.name+". Err: "+t.message)}return t}),t)},t.prototype.fields=function(){return this._fields.slice()},t}(),Tn="[_0-9a-z-*/]",mn=new RegExp("^(?:"+("[a-z]"+Tn+"{0,255}")+"|"+("[a-z0-9]"+Tn+"{0,240}@[a-z]"+Tn+"{0,13}")+")$"),bn=/^[ -~]{0,255}[!-~]$/,Sn=/,|=/;var On=function(){function t(t){this._internalState=new Map,t&&this._parse(t)}return t.prototype.set=function(t,e){var n=this._clone();return n._internalState.has(t)&&n._internalState.delete(t),n._internalState.set(t,e),n},t.prototype.unset=function(t){var e=this._clone();return e._internalState.delete(t),e},t.prototype.get=function(t){return this._internalState.get(t)},t.prototype.serialize=function(){var t=this;return this._keys().reduce((function(e,n){return e.push(n+"="+t.get(n)),e}),[]).join(",")},t.prototype._parse=function(t){t.length>512||(this._internalState=t.split(",").reverse().reduce((function(t,e){var n=e.trim(),r=n.indexOf("=");if(-1!==r){var o=n.slice(0,r),i=n.slice(r+1,e.length);(function(t){return mn.test(t)})(o)&&function(t){return bn.test(t)&&!Sn.test(t)}(i)&&t.set(o,i)}return t}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t}(),Rn="traceparent",wn="tracestate",Pn=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");var Ln,An,Cn=function(){function t(){}return t.prototype.inject=function(t,e,n){var r=qt.getSpanContext(t);if(r&&!Kt(t)&&Tt(r)){var o="00-"+r.traceId+"-"+r.spanId+"-0"+Number(r.traceFlags||L.NONE).toString(16);n.set(e,Rn,o),r.traceState&&n.set(e,wn,r.traceState.serialize())}},t.prototype.extract=function(t,e,n){var r=n.get(e,Rn);if(!r)return t;var o=Array.isArray(r)?r[0]:r;if("string"!=typeof o)return t;var i=function(t){var e=Pn.exec(t);return e?"00"===e[1]&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}:null}(o);if(!i)return t;i.isRemote=!0;var a=n.get(e,wn);if(a){var s=Array.isArray(a)?a.join(","):a;i.traceState=new On("string"==typeof s?s:void 0)}return qt.setSpanContext(t,i)},t.prototype.fields=function(){return[Rn,wn]},t}(),kn="[object Object]",In="[object Null]",Nn="[object Undefined]",xn=Function.prototype.toString,Dn=xn.call(Object),Mn=(Ln=Object.getPrototypeOf,An=Object,function(t){return Ln(An(t))}),jn=Object.prototype,Un=jn.hasOwnProperty,Zn=Symbol?Symbol.toStringTag:void 0,Bn=jn.toString;function Hn(t){if(!function(t){return null!=t&&"object"==typeof t}(t)||function(t){if(null==t)return void 0===t?Nn:In;return Zn&&Zn in Object(t)?function(t){var e=Un.call(t,Zn),n=t[Zn],r=!1;try{t[Zn]=void 0,r=!0}catch(t){}var o=Bn.call(t);r&&(e?t[Zn]=n:delete t[Zn]);return o}(t):function(t){return Bn.call(t)}(t)}(t)!==kn)return!1;var e=Mn(t);if(null===e)return!0;var n=Un.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&xn.call(n)===Dn}var zn=20;function Fn(t){return Vn(t)?t.slice():t}function Gn(t,e,n,r){var o;if(void 0===n&&(n=0),!(n>zn)){if(n++,Kn(t)||Kn(e)||qn(e))o=Fn(e);else if(Vn(t)){if(o=t.slice(),Vn(e))for(var i=0,a=e.length;i<a;i++)o.push(Fn(e[i]));else if(Wn(e))for(i=0,a=(s=Object.keys(e)).length;i<a;i++){o[u=s[i]]=Fn(e[u])}}else if(Wn(t))if(Wn(e)){if(!function(t,e){if(!Hn(t)||!Hn(e))return!1;return!0}(t,e))return e;o=Object.assign({},t);var s;for(i=0,a=(s=Object.keys(e)).length;i<a;i++){var u,c=e[u=s[i]];if(Kn(c))void 0===c?delete o[u]:o[u]=c;else{var l=o[u],p=c;if(Xn(t,u,r)||Xn(e,u,r))delete o[u];else{if(Wn(l)&&Wn(p)){var f=r.get(l)||[],h=r.get(p)||[];f.push({obj:t,key:u}),h.push({obj:e,key:u}),r.set(l,f),r.set(p,h)}o[u]=Gn(o[u],c,n,r)}}}}else o=e;return o}}function Xn(t,e,n){for(var r=n.get(t[e])||[],o=0,i=r.length;o<i;o++){var a=r[o];if(a.key===e&&a.obj===t)return!0}return!1}function Vn(t){return Array.isArray(t)}function qn(t){return"function"==typeof t}function Wn(t){return!Kn(t)&&!Vn(t)&&!qn(t)&&"object"==typeof t}function Kn(t){return"string"==typeof t||"number"==typeof t||"boolean"==typeof t||void 0===t||t instanceof Date||t instanceof RegExp||null===t}var Yn=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function $n(t,e){return"string"==typeof e?t===e:!!t.match(e)}function Qn(t,e){var n,r;if(!e)return!1;try{for(var o=Yn(e),i=o.next();!i.done;i=o.next()){if($n(t,i.value))return!0}}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}var Jn=function(){function t(){var t=this;this._promise=new Promise((function(e,n){t._resolve=e,t._reject=n}))}return Object.defineProperty(t.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),t.prototype.resolve=function(t){this._resolve(t)},t.prototype.reject=function(t){this._reject(t)},t}(),tr=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},er=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},nr=function(){function t(t,e){this._callback=t,this._that=e,this._isCalled=!1,this._deferred=new Jn}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var t,e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((t=this._callback).call.apply(t,er([this._that],tr(n),!1))).then((function(t){return e._deferred.resolve(t)}),(function(t){return e._deferred.reject(t)}))}catch(t){this._deferred.reject(t)}}return this._deferred.promise},t}();function rr(t){var e=BigInt(1e9);return BigInt(t[0])*e+BigInt(t[1])}function or(t){var e,n=rr(t);return e=n,{low:Number(BigInt.asUintN(32,e)),high:Number(BigInt.asUintN(32,e>>BigInt(32)))}}var ir="undefined"!=typeof BigInt?function(t){return rr(t).toString()}:dn;function ar(t){return t}function sr(t){if(void 0!==t)return Le(t)}var ur,cr={encodeHrTime:or,encodeSpanContext:Le,encodeOptionalSpanContext:sr};!function(t){t[t.SPAN_KIND_UNSPECIFIED=0]="SPAN_KIND_UNSPECIFIED",t[t.SPAN_KIND_INTERNAL=1]="SPAN_KIND_INTERNAL",t[t.SPAN_KIND_SERVER=2]="SPAN_KIND_SERVER",t[t.SPAN_KIND_CLIENT=3]="SPAN_KIND_CLIENT",t[t.SPAN_KIND_PRODUCER=4]="SPAN_KIND_PRODUCER",t[t.SPAN_KIND_CONSUMER=5]="SPAN_KIND_CONSUMER"}(ur||(ur={}));var lr=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function pr(t){return Object.keys(t).map((function(e){return fr(e,t[e])}))}function fr(t,e){return{key:t,value:hr(e)}}function hr(t){var e=typeof t;return"string"===e?{stringValue:t}:"number"===e?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:"boolean"===e?{boolValue:t}:t instanceof Uint8Array?{bytesValue:t}:Array.isArray(t)?{arrayValue:{values:t.map(hr)}}:"object"===e&&null!=t?{kvlistValue:{values:Object.entries(t).map((function(t){var e=lr(t,2);return fr(e[0],e[1])}))}}:{}}function dr(t,e){var n,r=t.spanContext(),o=t.status;return{traceId:e.encodeSpanContext(r.traceId),spanId:e.encodeSpanContext(r.spanId),parentSpanId:e.encodeOptionalSpanContext(t.parentSpanId),traceState:null===(n=r.traceState)||void 0===n?void 0:n.serialize(),name:t.name,kind:null==t.kind?0:t.kind+1,startTimeUnixNano:e.encodeHrTime(t.startTime),endTimeUnixNano:e.encodeHrTime(t.endTime),attributes:pr(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map((function(t){return function(t,e){return{attributes:t.attributes?pr(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}(t,e)})),droppedEventsCount:t.droppedEventsCount,status:{code:o.code,message:o.message},links:t.links.map((function(t){return function(t,e){var n;return{attributes:t.attributes?pr(t.attributes):[],spanId:e.encodeSpanContext(t.context.spanId),traceId:e.encodeSpanContext(t.context.traceId),traceState:null===(n=t.context.traceState)||void 0===n?void 0:n.serialize(),droppedAttributesCount:t.droppedAttributesCount||0}}(t,e)})),droppedLinksCount:t.droppedLinksCount}}function _r(t){return{attributes:pr(t.attributes),droppedAttributesCount:0}}var vr=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},gr=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function yr(t,e){var n=function(t){var e,n;if(void 0===t)return cr;var r=null===(e=t.useLongBits)||void 0===e||e,o=null!==(n=t.useHex)&&void 0!==n&&n;return{encodeHrTime:r?or:ir,encodeSpanContext:o?ar:Le,encodeOptionalSpanContext:o?ar:sr}}(e);return{resourceSpans:Er(t,n)}}function Er(t,e){for(var n,r=function(t){var e,n,r=new Map;try{for(var o=vr(t),i=o.next();!i.done;i=o.next()){var a=i.value,s=r.get(a.resource);s||(s=new Map,r.set(a.resource,s));var u=a.instrumentationLibrary.name+"@"+(a.instrumentationLibrary.version||"")+":"+(a.instrumentationLibrary.schemaUrl||""),c=s.get(u);c||(c=[],s.set(u,c)),c.push(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}(t),o=[],i=r.entries(),a=i.next();!a.done;){for(var s=gr(a.value,2),u=s[0],c=[],l=s[1].values(),p=l.next();!p.done;){var f=p.value;if(f.length>0){var h=f.map((function(t){return dr(t,e)}));c.push({scope:(n=f[0].instrumentationLibrary,{name:n.name,version:n.version}),spans:h,schemaUrl:f[0].instrumentationLibrary.schemaUrl})}p=l.next()}var d={resource:_r(u),scopeSpans:c,schemaUrl:void 0};o.push(d),a=i.next()}return o}var Tr=function(){return Tr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Tr.apply(this,arguments)},mr=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},br=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Sr=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Or=function(){function t(t,e){var n,r=this;this._attributes=t,this.asyncAttributesPending=null!=e,this._syncAttributes=null!==(n=this._attributes)&&void 0!==n?n:{},this._asyncAttributesPromise=null==e?void 0:e.then((function(t){return r._attributes=Object.assign({},r._attributes,t),r.asyncAttributesPending=!1,t}),(function(t){return It.debug("a resource's async attributes promise rejected: %s",t),r.asyncAttributesPending=!1,{}}))}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t(((e={})[en]="unknown_service",e[rn]=an[rn],e[nn]=an[nn],e[on]=an[on],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&It.error("Accessing resource attributes before async attributes settled"),null!==(t=this._attributes)&&void 0!==t?t:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return mr(this,void 0,void 0,(function(){return br(this,(function(t){switch(t.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},t.prototype.merge=function(e){var n,r=this;if(!e)return this;var o=Tr(Tr({},this._syncAttributes),null!==(n=e._syncAttributes)&&void 0!==n?n:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new t(o);var i=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then((function(t){var n,o=Sr(t,2),i=o[0],a=o[1];return Tr(Tr(Tr(Tr({},r._syncAttributes),i),null!==(n=e._syncAttributes)&&void 0!==n?n:e.attributes),a)}));return new t(o,i)},t.EMPTY=new t({}),t}(),Rr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};let wr={};class Pr{constructor(t){this.config=t}export(t,e){const n=yr(t,{useHex:!0,useLongBits:!1});this.config.api.pushTraces(n),function(t=[]){var e,n;for(const r of t){const{scopeSpans:t}=r;for(const r of t){const{scope:t,spans:o=[]}=r;for(const r of o){if(r.kind!==ur.SPAN_KIND_CLIENT)continue;const o={traceId:r.traceId.toString(),spanId:r.spanId.toString()},i={};for(const t of r.attributes)i[t.key]=String(Object.values(t.value)[0]);const a=(null!==(e=null==t?void 0:t.name)&&void 0!==e?e:"").indexOf("-");let s="unknown";(null==t?void 0:t.name)&&(-1===a&&(s=null!==(n=t.name.split("/")[1])&&void 0!==n?n:t.name),a>-1&&(s=null==t?void 0:t.name.substring(a+1))),wr.api.pushEvent(`faro.tracing.${s}`,i,void 0,{spanContext:o})}}}}(n.resourceSpans),e({code:sn.SUCCESS})}shutdown(){return Promise.resolve(void 0)}}class Lr{constructor(t,e){this.processor=t,this.metas=e}forceFlush(){return this.processor.forceFlush()}onStart(t,e){const n=this.metas.value.session;(null==n?void 0:n.id)&&(t.attributes.session_id=n.id),this.processor.onStart(t,e)}onEnd(t){this.processor.onEnd(t)}shutdown(){return this.processor.shutdown()}}"function"==typeof SuppressedError&&SuppressedError;var Ar=function(){function t(){}return t.prototype.emit=function(t){},t}(),Cr=new(function(){function t(){}return t.prototype.getLogger=function(t,e,n){return new Ar},t}()),kr="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},Ir=Symbol.for("io.opentelemetry.js.api.logs"),Nr=kr;var xr=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalLoggerProvider=function(t){return Nr[Ir]?this.getLoggerProvider():(Nr[Ir]=(e=1,n=t,r=Cr,function(t){return t===e?n:r}),t);var e,n,r},t.prototype.getLoggerProvider=function(){var t,e;return null!==(e=null===(t=Nr[Ir])||void 0===t?void 0:t.call(Nr,1))&&void 0!==e?e:Cr},t.prototype.getLogger=function(t,e,n){return this.getLoggerProvider().getLogger(t,e,n)},t.prototype.disable=function(){delete Nr[Ir]},t}(),Dr=xr.getInstance();function Mr(t){return"function"==typeof t}var jr=console.error.bind(console);function Ur(t,e,n){var r=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:r,writable:!0,value:n})}function Zr(t){t&&t.logger&&(Mr(t.logger)?jr=t.logger:jr("new logger isn't a function, not replacing"))}function Br(t,e,n){if(t&&t[e]){if(!n)return jr("no wrapper function"),void jr((new Error).stack);if(Mr(t[e])&&Mr(n)){var r=t[e],o=n(r,e);return Ur(o,"__original",r),Ur(o,"__unwrap",(function(){t[e]===o&&Ur(t,e,r)})),Ur(o,"__wrapped",!0),Ur(t,e,o),o}jr("original object and wrapper must be functions")}else jr("no original function "+e+" to wrap")}function Hr(t,e){return t&&t[e]?t[e].__unwrap?t[e].__unwrap():void jr("no original to unwrap to -- has "+e+" already been unwrapped?"):(jr("no function to unwrap."),void jr((new Error).stack))}Zr.wrap=Br,Zr.massWrap=function(t,e,n){if(!t)return jr("must provide one or more modules to patch"),void jr((new Error).stack);Array.isArray(t)||(t=[t]),e&&Array.isArray(e)?t.forEach((function(t){e.forEach((function(e){Br(t,e,n)}))})):jr("must provide one or more functions to wrap on modules")},Zr.unwrap=Hr,Zr.massUnwrap=function(t,e){if(!t)return jr("must provide one or more modules to patch"),void jr((new Error).stack);Array.isArray(t)||(t=[t]),e&&Array.isArray(e)?t.forEach((function(t){e.forEach((function(e){Hr(t,e)}))})):jr("must provide one or more functions to unwrap on modules")};var zr=Zr,Fr=function(){return Fr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Fr.apply(this,arguments)},Gr=function(){function t(t,e,n){this.instrumentationName=t,this.instrumentationVersion=e,this._wrap=zr.wrap,this._unwrap=zr.unwrap,this._massWrap=zr.massWrap,this._massUnwrap=zr.massUnwrap,this._config=Fr({enabled:!0},n),this._diag=It.createComponentLogger({namespace:t}),this._tracer=qt.getTracer(t,e),this._meter=Dt.getMeter(t,e),this._logger=Dr.getLogger(t,e),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var t,e=null!==(t=this.init())&&void 0!==t?t:[];return Array.isArray(e)?e:[e]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(t){this._config=Fr({},t)},t.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(t,e,n,r){if(t)try{t(n,r)}catch(t){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:e},t)}},t}(),Xr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vr=function(t){function e(e,n,r){var o=t.call(this,e,n,r)||this;return o._config.enabled&&o.enable(),o}return Xr(e,t),e}(Gr);function qr(t,e,n){var r,o;try{o=t()}catch(t){r=t}finally{if(e(r,o),r&&!n)throw r;return o}}function Wr(t){return"function"==typeof t&&"function"==typeof t.__original&&"function"==typeof t.__unwrap&&!0===t.__wrapped}var Kr,Yr=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},$r=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Qr=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},Jr=function(){function t(t,e,n,r,o,i,a,s,u,c){void 0===a&&(a=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:wt.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=r,this.parentSpanId=i,this.kind=o,this.links=a;var l=Date.now();this._performanceStartTime=Ae.now(),this._performanceOffset=l-(this._performanceStartTime+pn()),this._startTimeProvided=null!=s,this.startTime=this._getTime(null!=s?s:l),this.resource=t.resource,this.instrumentationLibrary=t.instrumentationLibrary,this._spanLimits=t.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,null!=c&&this.setAttributes(c),this._spanProcessor=t.getActiveSpanProcessor(),this._spanProcessor.onStart(this,e)}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(t,e){return null==e||this._isSpanEnded()?this:0===t.length?(It.warn("Invalid attribute key: "+t),this):oe(e)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?(this._droppedAttributesCount++,this):(this.attributes[t]=this._truncateToSize(e),this):(It.warn("Invalid attribute value set for key: "+t),this)},t.prototype.setAttributes=function(t){var e,n;try{for(var r=Yr(Object.entries(t)),o=r.next();!o.done;o=r.next()){var i=$r(o.value,2),a=i[0],s=i[1];this.setAttribute(a,s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return this},t.prototype.addEvent=function(t,e,n){if(this._isSpanEnded())return this;if(0===this._spanLimits.eventCountLimit)return It.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(0===this._droppedEventsCount&&It.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),vn(e)&&(vn(n)||(n=e),e=void 0);var r=ne(e);return this.events.push({name:t,attributes:r,time:this._getTime(n),droppedAttributesCount:0}),this},t.prototype.addLink=function(t){return this.links.push(t),this},t.prototype.addLinks=function(t){var e;return(e=this.links).push.apply(e,Qr([],$r(t),!1)),this},t.prototype.setStatus=function(t){return this._isSpanEnded()||(this.status=t),this},t.prototype.updateName=function(t){return this._isSpanEnded()||(this.name=t),this},t.prototype.end=function(t){this._isSpanEnded()?It.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once."):(this._ended=!0,this.endTime=this._getTime(t),this._duration=function(t,e){var n=e[0]-t[0],r=e[1]-t[1];return r<0&&(n-=1,r+=cn),[n,r]}(this.startTime,this.endTime),this._duration[0]<0&&(It.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&It.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this))},t.prototype._getTime=function(t){if("number"==typeof t&&t<Ae.now())return fn(t+this._performanceOffset);if("number"==typeof t)return ln(t);if(t instanceof Date)return ln(t.getTime());if(_n(t))return t;if(this._startTimeProvided)return ln(Date.now());var e=Ae.now()-this._performanceStartTime;return gn(this.startTime,ln(e))},t.prototype.isRecording=function(){return!1===this._ended},t.prototype.recordException=function(t,e){var n={};"string"==typeof t?n[Ge]=t:t&&(t.code?n[Fe]=t.code.toString():t.name&&(n[Fe]=t.name),t.message&&(n[Ge]=t.message),t.stack&&(n[Xe]=t.stack)),n[Fe]||n[Ge]?this.addEvent("exception",n,e):It.warn("Failed to record an exception "+t)},Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),t.prototype._isSpanEnded=function(){return this._ended&&It.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(t,e){return t.length<=e?t:t.substr(0,e)},t.prototype._truncateToSize=function(t){var e=this,n=this._attributeValueLengthLimit;return n<=0?(It.warn("Attribute value limit must be positive, got "+n),t):"string"==typeof t?this._truncateToLimitUtil(t,n):Array.isArray(t)?t.map((function(t){return"string"==typeof t?e._truncateToLimitUtil(t,n):t})):t},t}();!function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(Kr||(Kr={}));var to=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:Kr.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}(),eo=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:Kr.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}(),no=function(){function t(t){var e,n,r,o;this._root=t.root,this._root||(ue(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new eo),this._remoteParentSampled=null!==(e=t.remoteParentSampled)&&void 0!==e?e:new eo,this._remoteParentNotSampled=null!==(n=t.remoteParentNotSampled)&&void 0!==n?n:new to,this._localParentSampled=null!==(r=t.localParentSampled)&&void 0!==r?r:new eo,this._localParentNotSampled=null!==(o=t.localParentNotSampled)&&void 0!==o?o:new to}return t.prototype.shouldSample=function(t,e,n,r,o,i){var a=qt.getSpanContext(t);return a&&Tt(a)?a.isRemote?a.traceFlags&L.SAMPLED?this._remoteParentSampled.shouldSample(t,e,n,r,o,i):this._remoteParentNotSampled.shouldSample(t,e,n,r,o,i):a.traceFlags&L.SAMPLED?this._localParentSampled.shouldSample(t,e,n,r,o,i):this._localParentNotSampled.shouldSample(t,e,n,r,o,i):this._root.shouldSample(t,e,n,r,o,i)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t}(),ro=function(){function t(t){void 0===t&&(t=0),this._ratio=t,this._ratio=this._normalize(t),this._upperBound=Math.floor(4294967295*this._ratio)}return t.prototype.shouldSample=function(t,e){return{decision:Et(e)&&this._accumulate(e)<this._upperBound?Kr.RECORD_AND_SAMPLED:Kr.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(t){return"number"!=typeof t||isNaN(t)?0:t>=1?1:t<=0?0:t},t.prototype._accumulate=function(t){for(var e=0,n=0;n<t.length/8;n++){var r=8*n;e=(e^parseInt(t.slice(r,r+8),16))>>>0}return e},t}(),oo=we(),io=ae.AlwaysOn,ao=1;function so(){return{sampler:uo(oo),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:we().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:we().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:we().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:we().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:we().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:we().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:we().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:we().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function uo(t){switch(void 0===t&&(t=we()),t.OTEL_TRACES_SAMPLER){case ae.AlwaysOn:return new eo;case ae.AlwaysOff:return new to;case ae.ParentBasedAlwaysOn:return new no({root:new eo});case ae.ParentBasedAlwaysOff:return new no({root:new to});case ae.TraceIdRatio:return new ro(co(t));case ae.ParentBasedTraceIdRatio:return new no({root:new ro(co(t))});default:return It.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+io+'".'),new eo}}function co(t){if(void 0===t.OTEL_TRACES_SAMPLER_ARG||""===t.OTEL_TRACES_SAMPLER_ARG)return It.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+ao+"."),ao;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(It.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+ao+"."),ao):e<0||e>1?(It.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+ao+"."),ao):e}function lo(t){var e,n,r,o,i,a,s,u,c,l,p,f,h=Object.assign({},t.spanLimits),d=Oe(Re);return h.attributeCountLimit=null!==(a=null!==(i=null!==(o=null!==(n=null===(e=t.spanLimits)||void 0===e?void 0:e.attributeCountLimit)&&void 0!==n?n:null===(r=t.generalLimits)||void 0===r?void 0:r.attributeCountLimit)&&void 0!==o?o:d.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)&&void 0!==i?i:d.OTEL_ATTRIBUTE_COUNT_LIMIT)&&void 0!==a?a:ge,h.attributeValueLengthLimit=null!==(f=null!==(p=null!==(l=null!==(u=null===(s=t.spanLimits)||void 0===s?void 0:s.attributeValueLengthLimit)&&void 0!==u?u:null===(c=t.generalLimits)||void 0===c?void 0:c.attributeValueLengthLimit)&&void 0!==l?l:d.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==p?p:d.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==f?f:ve,Object.assign({},t,{spanLimits:h})}var po=function(){function t(t,e){this._exporter=t,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=we();this._maxExportBatchSize="number"==typeof(null==e?void 0:e.maxExportBatchSize)?e.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==e?void 0:e.maxQueueSize)?e.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==e?void 0:e.scheduledDelayMillis)?e.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==e?void 0:e.exportTimeoutMillis)?e.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new nr(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(It.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(t,e){},t.prototype.onEnd=function(t){this._shutdownOnce.isCalled||t.spanContext().traceFlags&L.SAMPLED&&this._addToBuffer(t)},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){var t=this;return Promise.resolve().then((function(){return t.onShutdown()})).then((function(){return t._flushAll()})).then((function(){return t._exporter.shutdown()}))},t.prototype._addToBuffer=function(t){if(this._finishedSpans.length>=this._maxQueueSize)return 0===this._droppedSpansCount&&It.debug("maxQueueSize reached, dropping spans"),void this._droppedSpansCount++;this._droppedSpansCount>0&&(It.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(t),this._maybeStartTimer()},t.prototype._flushAll=function(){var t=this;return new Promise((function(e,n){for(var r=[],o=0,i=Math.ceil(t._finishedSpans.length/t._maxExportBatchSize);o<i;o++)r.push(t._flushOneBatch());Promise.all(r).then((function(){e()})).catch(n)}))},t.prototype._flushOneBatch=function(){var t=this;return this._clearTimer(),0===this._finishedSpans.length?Promise.resolve():new Promise((function(e,n){var r=setTimeout((function(){n(new Error("Timeout"))}),t._exportTimeoutMillis);kt.with(function(t){return t.setValue(Wt,!0)}(kt.active()),(function(){var o;t._finishedSpans.length<=t._maxExportBatchSize?(o=t._finishedSpans,t._finishedSpans=[]):o=t._finishedSpans.splice(0,t._maxExportBatchSize);for(var i=function(){return t._exporter.export(o,(function(t){var o;clearTimeout(r),t.code===sn.SUCCESS?e():n(null!==(o=t.error)&&void 0!==o?o:new Error("BatchSpanProcessor: span export failed"))}))},a=null,s=0,u=o.length;s<u;s++){var c=o[s];c.resource.asyncAttributesPending&&c.resource.waitForAsyncAttributes&&(null!=a||(a=[]),a.push(c.resource.waitForAsyncAttributes()))}null===a?i():Promise.all(a).then(i,(function(t){ue(t),n(t)}))}))}))},t.prototype._maybeStartTimer=function(){var t=this;if(!this._isExporting){var e=function(){t._isExporting=!0,t._flushOneBatch().finally((function(){t._isExporting=!1,t._finishedSpans.length>0&&(t._clearTimer(),t._maybeStartTimer())})).catch((function(e){t._isExporting=!1,ue(e)}))};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();void 0===this._timer&&(this._timer=setTimeout((function(){return e()}),this._scheduledDelayMillis),this._timer)}},t.prototype._clearTimer=function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)},t}(),fo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ho=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.onInit(n),r}return fo(e,t),e.prototype.onInit=function(t){var e=this;!0!==(null==t?void 0:t.disableAutoFlushOnDocumentHide)&&"undefined"!=typeof document&&(this._visibilityChangeListener=function(){"hidden"===document.visibilityState&&e.forceFlush()},this._pageHideListener=function(){e.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},e.prototype.onShutdown=function(){"undefined"!=typeof document&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},e}(po),_o=function(){this.generateTraceId=go(16),this.generateSpanId=go(8)},vo=Array(32);function go(t){return function(){for(var e=0;e<2*t;e++)vo[e]=Math.floor(16*Math.random())+48,vo[e]>=58&&(vo[e]+=39);return String.fromCharCode.apply(null,vo.slice(0,2*t))}}var yo,Eo=function(){function t(t,e,n){this._tracerProvider=n;var r,o,i,a,s=(r=e,o={sampler:uo()},i=so(),(a=Object.assign({},i,o,r)).generalLimits=Object.assign({},i.generalLimits,r.generalLimits||{}),a.spanLimits=Object.assign({},i.spanLimits,r.spanLimits||{}),a);this._sampler=s.sampler,this._generalLimits=s.generalLimits,this._spanLimits=s.spanLimits,this._idGenerator=e.idGenerator||new _o,this.resource=n.resource,this.instrumentationLibrary=t}return t.prototype.startSpan=function(t,e,n){var r,o,i;void 0===e&&(e={}),void 0===n&&(n=kt.active()),e.root&&(n=qt.deleteSpan(n));var a=qt.getSpan(n);if(Kt(n))return It.debug("Instrumentation suppressed, returning Noop Span"),qt.wrapSpanContext(ut);var s,u,c,l=null==a?void 0:a.spanContext(),p=this._idGenerator.generateSpanId();l&&qt.isSpanContextValid(l)?(s=l.traceId,u=l.traceState,c=l.spanId):s=this._idGenerator.generateTraceId();var f=null!==(r=e.kind)&&void 0!==r?r:Rt.INTERNAL,h=(null!==(o=e.links)&&void 0!==o?o:[]).map((function(t){return{context:t.context,attributes:ne(t.attributes)}})),d=ne(e.attributes),_=this._sampler.shouldSample(n,s,t,f,d,h);u=null!==(i=_.traceState)&&void 0!==i?i:u;var v={traceId:s,spanId:p,traceFlags:_.decision===Ot.RECORD_AND_SAMPLED?L.SAMPLED:L.NONE,traceState:u};if(_.decision===Ot.NOT_RECORD)return It.debug("Recording is off, propagating context in a non-recording span"),qt.wrapSpanContext(v);var g=ne(Object.assign(d,_.attributes));return new Jr(this,n,t,v,f,c,h,e.startTime,void 0,g)},t.prototype.startActiveSpan=function(t,e,n,r){var o,i,a;if(!(arguments.length<2)){2===arguments.length?a=e:3===arguments.length?(o=e,a=n):(o=e,i=n,a=r);var s=null!=i?i:kt.active(),u=this.startSpan(t,o,s),c=qt.setSpan(s,u);return kt.with(c,a,void 0,u)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t}(),To=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mo=function(){function t(t){this._spanProcessors=t}return t.prototype.forceFlush=function(){var t,e,n=[];try{for(var r=To(this._spanProcessors),o=r.next();!o.done;o=r.next()){var i=o.value;n.push(i.forceFlush())}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return new Promise((function(t){Promise.all(n).then((function(){t()})).catch((function(e){ue(e||new Error("MultiSpanProcessor: forceFlush failed")),t()}))}))},t.prototype.onStart=function(t,e){var n,r;try{for(var o=To(this._spanProcessors),i=o.next();!i.done;i=o.next()){i.value.onStart(t,e)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},t.prototype.onEnd=function(t){var e,n;try{for(var r=To(this._spanProcessors),o=r.next();!o.done;o=r.next()){o.value.onEnd(t)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.prototype.shutdown=function(){var t,e,n=[];try{for(var r=To(this._spanProcessors),o=r.next();!o.done;o=r.next()){var i=o.value;n.push(i.shutdown())}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return new Promise((function(t,e){Promise.all(n).then((function(){t()}),e)}))},t}(),bo=function(){function t(){}return t.prototype.onStart=function(t,e){},t.prototype.onEnd=function(t){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t}();!function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"}(yo||(yo={}));var So,Oo,Ro,wo=function(){function t(t){var e;void 0===t&&(t={}),this._registeredSpanProcessors=[],this._tracers=new Map;var n=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t.shift(),r=new WeakMap;t.length>0;)n=Gn(n,t.shift(),0,r);return n}({},so(),lo(t));this.resource=null!==(e=n.resource)&&void 0!==e?e:Or.empty(),this.resource=Or.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});var r=this._buildExporterFromEnv();if(void 0!==r){var o=new ho(r);this.activeSpanProcessor=o}else this.activeSpanProcessor=new bo}return t.prototype.getTracer=function(t,e,n){var r=t+"@"+(e||"")+":"+((null==n?void 0:n.schemaUrl)||"");return this._tracers.has(r)||this._tracers.set(r,new Eo({name:t,version:e,schemaUrl:null==n?void 0:n.schemaUrl},this._config,this)),this._tracers.get(r)},t.prototype.addSpanProcessor=function(t){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch((function(t){return It.error("Error while trying to shutdown current span processor",t)})),this._registeredSpanProcessors.push(t),this.activeSpanProcessor=new mo(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(t){void 0===t&&(t={}),qt.setGlobalTracerProvider(this),void 0===t.propagator&&(t.propagator=this._buildPropagatorFromEnv()),t.contextManager&&kt.setGlobalContextManager(t.contextManager),t.propagator&&Xt.setGlobalPropagator(t.propagator)},t.prototype.forceFlush=function(){var t=this._config.forceFlushTimeoutMillis,e=this._registeredSpanProcessors.map((function(e){return new Promise((function(n){var r,o=setTimeout((function(){n(new Error("Span processor did not completed within timeout period of "+t+" ms")),r=yo.timeout}),t);e.forceFlush().then((function(){clearTimeout(o),r!==yo.timeout&&(r=yo.resolved,n(r))})).catch((function(t){clearTimeout(o),r=yo.error,n(t)}))}))}));return new Promise((function(t,n){Promise.all(e).then((function(e){var r=e.filter((function(t){return t!==yo.resolved}));r.length>0?n(r):t()})).catch((function(t){return n([t])}))}))},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(t){var e;return null===(e=this.constructor._registeredPropagators.get(t))||void 0===e?void 0:e()},t.prototype._getSpanExporter=function(t){var e;return null===(e=this.constructor._registeredExporters.get(t))||void 0===e?void 0:e()},t.prototype._buildPropagatorFromEnv=function(){var t=this,e=Array.from(new Set(we().OTEL_PROPAGATORS)),n=e.map((function(e){var n=t._getPropagator(e);return n||It.warn('Propagator "'+e+'" requested through environment variable is unavailable.'),n})).reduce((function(t,e){return e&&t.push(e),t}),[]);return 0===n.length?void 0:1===e.length?n[0]:new En({propagators:n})},t.prototype._buildExporterFromEnv=function(){var t=we().OTEL_TRACES_EXPORTER;if("none"!==t&&""!==t){var e=this._getSpanExporter(t);return e||It.error('Exporter "'+t+'" requested through environment variable is unavailable.'),e}},t._registeredPropagators=new Map([["tracecontext",function(){return new Cn}],["baggage",function(){return new Jt}]]),t._registeredExporters=new Map,t}(),Po=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Lo=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},Ao=function(){function t(){this._enabled=!1,this._currentContext=C}return t.prototype._bindFunction=function(t,e){void 0===t&&(t=C);var n=this,r=function(){for(var r=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return n.with(t,(function(){return e.apply(r,o)}))};return Object.defineProperty(r,"length",{enumerable:!1,configurable:!0,writable:!1,value:e.length}),r},t.prototype.active=function(){return this._currentContext},t.prototype.bind=function(t,e){return void 0===t&&(t=this.active()),"function"==typeof e?this._bindFunction(t,e):e},t.prototype.disable=function(){return this._currentContext=C,this._enabled=!1,this},t.prototype.enable=function(){return this._enabled||(this._enabled=!0,this._currentContext=C),this},t.prototype.with=function(t,e,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];var i=this._currentContext;this._currentContext=t||C;try{return e.call.apply(e,Lo([n],Po(r),!1))}finally{this._currentContext=i}},t}(),Co=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ko=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;if(e.contextManager)throw"contextManager should be defined in register method not in constructor";if(e.propagator)throw"propagator should be defined in register method not in constructor";return n}return Co(e,t),e.prototype.register=function(e){void 0===e&&(e={}),void 0===e.contextManager&&(e.contextManager=new Ao),e.contextManager&&e.contextManager.enable(),t.prototype.register.call(this,e)},e}(wo);function Io(t,e){return e in t}function No(t,e,n,r){var o=void 0,i=void 0;Io(n,e)&&"number"==typeof n[e]&&(o=n[e]);var a=r||So.FETCH_START;if(Io(n,a)&&"number"==typeof n[a]&&(i=n[a]),void 0!==o&&void 0!==i&&o>=i)return t.addEvent(e,o),t}function xo(t,e){No(t,So.FETCH_START,e),No(t,So.DOMAIN_LOOKUP_START,e),No(t,So.DOMAIN_LOOKUP_END,e),No(t,So.CONNECT_START,e),Io(e,"name")&&e.name.startsWith("https:")&&No(t,So.SECURE_CONNECTION_START,e),No(t,So.CONNECT_END,e),No(t,So.REQUEST_START,e),No(t,So.RESPONSE_START,e),No(t,So.RESPONSE_END,e);var n=e[So.ENCODED_BODY_SIZE];void 0!==n&&t.setAttribute(Qe,n);var r=e[So.DECODED_BODY_SIZE];void 0!==r&&n!==r&&t.setAttribute(Je,r)}function Do(){return"undefined"!=typeof location?location.origin:void 0}function Mo(t,e,n,r,o,i){void 0===o&&(o=new WeakSet);var a=jo(t),s=function(t,e,n,r,o,i){var a=dn(e),s=dn(n),u=r.filter((function(e){var n=dn(hn(e[So.FETCH_START])),r=dn(hn(e[So.RESPONSE_END]));return e.initiatorType.toLowerCase()===(i||"xmlhttprequest")&&e.name===t&&n>=a&&r<=s}));u.length>0&&(u=u.filter((function(t){return!o.has(t)})));return u}(t=a.toString(),e,n,r,o,i);if(0===s.length)return{mainRequest:void 0};if(1===s.length)return{mainRequest:s[0]};var u=function(t){return t.slice().sort((function(t,e){var n=t[So.FETCH_START],r=e[So.FETCH_START];return n>r?1:n<r?-1:0}))}(s);if(a.origin!==Do()&&u.length>1){var c=u[0],l=function(t,e,n){for(var r,o=dn(n),i=dn(hn(e)),a=t[1],s=t.length,u=1;u<s;u++){var c=t[u],l=dn(hn(c[So.FETCH_START])),p=o-dn(hn(c[So.RESPONSE_END]));l>=i&&(!r||p<r)&&(r=p,a=c)}return a}(u,c[So.RESPONSE_END],n),p=c[So.RESPONSE_END];return l[So.FETCH_START]<p&&(l=c,c=void 0),{corsPreFlightRequest:c,mainRequest:l}}return{mainRequest:s[0]}}function jo(t){if("function"==typeof URL)return new URL(t,"undefined"!=typeof document?document.baseURI:"undefined"!=typeof location?location.href:void 0);var e=(Oo||(Oo=document.createElement("a")),Oo);return e.href=t,e}function Uo(t,e){var n=e||[];return("string"==typeof n||n instanceof RegExp)&&(n=[n]),jo(t).origin===Do()||n.some((function(e){return $n(t,e)}))}!function(t){t.CONNECT_END="connectEnd",t.CONNECT_START="connectStart",t.DECODED_BODY_SIZE="decodedBodySize",t.DOM_COMPLETE="domComplete",t.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",t.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",t.DOM_INTERACTIVE="domInteractive",t.DOMAIN_LOOKUP_END="domainLookupEnd",t.DOMAIN_LOOKUP_START="domainLookupStart",t.ENCODED_BODY_SIZE="encodedBodySize",t.FETCH_START="fetchStart",t.LOAD_EVENT_END="loadEventEnd",t.LOAD_EVENT_START="loadEventStart",t.NAVIGATION_START="navigationStart",t.REDIRECT_END="redirectEnd",t.REDIRECT_START="redirectStart",t.REQUEST_START="requestStart",t.RESPONSE_END="responseEnd",t.RESPONSE_START="responseStart",t.SECURE_CONNECTION_START="secureConnectionStart",t.UNLOAD_EVENT_END="unloadEventEnd",t.UNLOAD_EVENT_START="unloadEventStart"}(So||(So={})),function(t){t.COMPONENT="component",t.HTTP_ERROR_NAME="http.error_name",t.HTTP_STATUS_TEXT="http.status_text"}(Ro||(Ro={}));var Zo,Bo,Ho="0.52.0",zo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fo="object"==typeof process&&"node"===(null===(Zo=process.release)||void 0===Zo?void 0:Zo.name),Go=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,"@opentelemetry/instrumentation-fetch",Ho,e)||this;return n.component="fetch",n.version=Ho,n.moduleName=n.component,n._usedResources=new WeakSet,n._tasksCount=0,n}return zo(e,t),e.prototype.init=function(){},e.prototype._addChildSpan=function(t,e){var n=this.tracer.startSpan("CORS Preflight",{startTime:e[So.FETCH_START]},qt.setSpan(kt.active(),t));this.getConfig().ignoreNetworkEvents||xo(n,e),n.end(e[So.RESPONSE_END])},e.prototype._addFinalSpanAttributes=function(t,e){var n=jo(e.url);t.setAttribute(tn.HTTP_STATUS_CODE,e.status),null!=e.statusText&&t.setAttribute(Ro.HTTP_STATUS_TEXT,e.statusText),t.setAttribute(tn.HTTP_HOST,n.host),t.setAttribute(tn.HTTP_SCHEME,n.protocol.replace(":","")),"undefined"!=typeof navigator&&t.setAttribute(tn.HTTP_USER_AGENT,navigator.userAgent)},e.prototype._addHeaders=function(t,e){if(!Uo(e,this.getConfig().propagateTraceHeaderCorsUrls)){var n={};return Xt.inject(kt.active(),n),void(Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy"))}if(t instanceof Request)Xt.inject(kt.active(),t.headers,{set:function(t,e,n){return t.set(e,"string"==typeof n?n:String(n))}});else if(t.headers instanceof Headers)Xt.inject(kt.active(),t.headers,{set:function(t,e,n){return t.set(e,"string"==typeof n?n:String(n))}});else if(t.headers instanceof Map)Xt.inject(kt.active(),t.headers,{set:function(t,e,n){return t.set(e,"string"==typeof n?n:String(n))}});else{n={};Xt.inject(kt.active(),n),t.headers=Object.assign({},n,t.headers||{})}},e.prototype._clearResources=function(){0===this._tasksCount&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)},e.prototype._createSpan=function(t,e){var n;if(void 0===e&&(e={}),!Qn(t,this.getConfig().ignoreUrls)){var r=(e.method||"GET").toUpperCase(),o="HTTP "+r;return this.tracer.startSpan(o,{kind:Rt.CLIENT,attributes:(n={},n[Ro.COMPONENT]=this.moduleName,n[tn.HTTP_METHOD]=r,n[tn.HTTP_URL]=t,n)})}this._diag.debug("ignoring span as url matches ignored url")},e.prototype._findResourceAndAddNetworkEvents=function(t,e,n){var r=e.entries;if(!r.length){if(!performance.getEntriesByType)return;r=performance.getEntriesByType("resource")}var o=Mo(e.spanUrl,e.startTime,n,r,this._usedResources,"fetch");if(o.mainRequest){var i=o.mainRequest;this._markResourceAsUsed(i);var a=o.corsPreFlightRequest;a&&(this._addChildSpan(t,a),this._markResourceAsUsed(a)),this.getConfig().ignoreNetworkEvents||xo(t,i)}},e.prototype._markResourceAsUsed=function(t){this._usedResources.add(t)},e.prototype._endSpan=function(t,e,n){var r=this,o=ln(Date.now()),i=fn();this._addFinalSpanAttributes(t,n),setTimeout((function(){var n;null===(n=e.observer)||void 0===n||n.disconnect(),r._findResourceAndAddNetworkEvents(t,e,i),r._tasksCount--,r._clearResources(),t.end(o)}),300)},e.prototype._patchConstructor=function(){var t=this;return function(e){var n=t;return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=this,i=jo(t[0]instanceof Request?t[0].url:String(t[0])).href,a=t[0]instanceof Request?t[0]:t[1]||{},s=n._createSpan(i,a);if(!s)return e.apply(this,t);var u=n._prepareSpanData(i);function c(t,e){n._applyAttributesAfterFetch(t,a,e),n._endSpan(t,u,{status:e.status||0,statusText:e.message,url:i})}function l(t,e){n._applyAttributesAfterFetch(t,a,e),e.status>=200&&e.status<400?n._endSpan(t,u,e):n._endSpan(t,u,{status:e.status,statusText:e.statusText,url:i})}function p(t,e,n){try{var r=n.clone(),o=n.clone(),i=r.body;if(i){var a=i.getReader(),s=function(){a.read().then((function(e){e.done?l(t,o):s()}),(function(e){c(t,e)}))};s()}else l(t,n)}finally{e(n)}}function f(t,e,n){try{c(t,n)}finally{e(n)}}return new Promise((function(t,r){return kt.with(qt.setSpan(kt.active(),s),(function(){return n._addHeaders(a,i),n._tasksCount++,e.apply(o,a instanceof Request?[a]:[i,a]).then(p.bind(o,s,t),f.bind(o,s,r))}))}))}}},e.prototype._applyAttributesAfterFetch=function(t,e,n){var r=this,o=this.getConfig().applyCustomAttributesOnSpan;o&&qr((function(){return o(t,e,n)}),(function(t){t&&r._diag.error("applyCustomAttributesOnSpan",t)}),!0)},e.prototype._prepareSpanData=function(t){var e=fn(),n=[];if("function"!=typeof PerformanceObserver)return{entries:n,startTime:e,spanUrl:t};var r=new PerformanceObserver((function(e){e.getEntries().forEach((function(e){"fetch"===e.initiatorType&&e.name===t&&n.push(e)}))}));return r.observe({entryTypes:["resource"]}),{entries:n,observer:r,startTime:e,spanUrl:t}},e.prototype.enable=function(){Fo?this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()"):(Wr(fetch)&&(this._unwrap(Re,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(Re,"fetch",this._patchConstructor()))},e.prototype.disable=function(){Fo||(this._unwrap(Re,"fetch"),this._usedResources=new WeakSet)},e}(Vr);!function(t){t.METHOD_OPEN="open",t.METHOD_SEND="send",t.EVENT_ABORT="abort",t.EVENT_ERROR="error",t.EVENT_LOAD="loaded",t.EVENT_TIMEOUT="timeout"}(Bo||(Bo={}));var Xo,Vo="0.52.0";!function(t){t.HTTP_STATUS_TEXT="http.status_text"}(Xo||(Xo={}));var qo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wo=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,"@opentelemetry/instrumentation-xml-http-request",Vo,e)||this;return n.component="xml-http-request",n.version=Vo,n.moduleName=n.component,n._tasksCount=0,n._xhrMem=new WeakMap,n._usedResources=new WeakSet,n}return qo(e,t),e.prototype.init=function(){},e.prototype._addHeaders=function(t,e){if(!Uo(jo(e).href,this.getConfig().propagateTraceHeaderCorsUrls)){var n={};return Xt.inject(kt.active(),n),void(Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy"))}var r={};Xt.inject(kt.active(),r),Object.keys(r).forEach((function(e){t.setRequestHeader(e,String(r[e]))}))},e.prototype._addChildSpan=function(t,e){var n=this;kt.with(qt.setSpan(kt.active(),t),(function(){var t=n.tracer.startSpan("CORS Preflight",{startTime:e[So.FETCH_START]});n.getConfig().ignoreNetworkEvents||xo(t,e),t.end(e[So.RESPONSE_END])}))},e.prototype._addFinalSpanAttributes=function(t,e,n){if("string"==typeof n){var r=jo(n);void 0!==e.status&&t.setAttribute(Ye,e.status),void 0!==e.statusText&&t.setAttribute(Xo.HTTP_STATUS_TEXT,e.statusText),t.setAttribute(We,r.host),t.setAttribute(Ke,r.protocol.replace(":","")),t.setAttribute($e,navigator.userAgent)}},e.prototype._applyAttributesAfterXHR=function(t,e){var n=this,r=this.getConfig().applyCustomAttributesOnSpan;"function"==typeof r&&qr((function(){return r(t,e)}),(function(t){t&&n._diag.error("applyCustomAttributesOnSpan",t)}),!0)},e.prototype._addResourceObserver=function(t,e){var n=this._xhrMem.get(t);n&&"function"==typeof PerformanceObserver&&"function"==typeof PerformanceResourceTiming&&(n.createdResources={observer:new PerformanceObserver((function(t){var r=t.getEntries(),o=jo(e);r.forEach((function(t){"xmlhttprequest"===t.initiatorType&&t.name===o.href&&n.createdResources&&n.createdResources.entries.push(t)}))})),entries:[]},n.createdResources.observer.observe({entryTypes:["resource"]}))},e.prototype._clearResources=function(){0===this._tasksCount&&this.getConfig().clearTimingResources&&(Ae.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},e.prototype._findResourceAndAddNetworkEvents=function(t,e,n,r,o){if(n&&r&&o&&t.createdResources){var i=t.createdResources.entries;i&&i.length||(i=Ae.getEntriesByType("resource"));var a=Mo(jo(n).href,r,o,i,this._usedResources);if(a.mainRequest){var s=a.mainRequest;this._markResourceAsUsed(s);var u=a.corsPreFlightRequest;u&&(this._addChildSpan(e,u),this._markResourceAsUsed(u)),this.getConfig().ignoreNetworkEvents||xo(e,s)}}},e.prototype._cleanPreviousSpanInformation=function(t){var e=this._xhrMem.get(t);if(e){var n=e.callbackToRemoveEvents;n&&n(),this._xhrMem.delete(t)}},e.prototype._createSpan=function(t,e,n){var r;if(!Qn(e,this.getConfig().ignoreUrls)){var o=n.toUpperCase(),i=this.tracer.startSpan(o,{kind:Rt.CLIENT,attributes:(r={},r[Ve]=n,r[qe]=jo(e).toString(),r)});return i.addEvent(Bo.METHOD_OPEN),this._cleanPreviousSpanInformation(t),this._xhrMem.set(t,{span:i,spanUrl:e}),i}this._diag.debug("ignoring span as url matches ignored url")},e.prototype._markResourceAsUsed=function(t){this._usedResources.add(t)},e.prototype._patchOpen=function(){var t=this;return function(e){var n=t;return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=t[0],i=t[1];return n._createSpan(this,i,o),e.apply(this,t)}}},e.prototype._patchSend=function(){var t=this;function e(e,n){var r=t._xhrMem.get(n);if(r){r.status=n.status,r.statusText=n.statusText,t._xhrMem.delete(n),r.span&&t._applyAttributesAfterXHR(r.span,n);var o=fn(),i=Date.now();setTimeout((function(){!function(e,n,r,o){var i=n.callbackToRemoveEvents;"function"==typeof i&&i();var a=n.span,s=n.spanUrl,u=n.sendStartTime;a&&(t._findResourceAndAddNetworkEvents(n,a,s,u,r),a.addEvent(e,o),t._addFinalSpanAttributes(a,n,s),a.end(o),t._tasksCount--),t._clearResources()}(e,r,o,i)}),300)}}function n(){e(Bo.EVENT_ERROR,this)}function r(){e(Bo.EVENT_ABORT,this)}function o(){e(Bo.EVENT_TIMEOUT,this)}function i(){this.status<299?e(Bo.EVENT_LOAD,this):e(Bo.EVENT_ERROR,this)}return function(e){return function(){for(var a=this,s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];var c=t._xhrMem.get(this);if(!c)return e.apply(this,s);var l=c.span,p=c.spanUrl;return l&&p&&kt.with(qt.setSpan(kt.active(),l),(function(){t._tasksCount++,c.sendStartTime=fn(),l.addEvent(Bo.METHOD_SEND),a.addEventListener("abort",r),a.addEventListener("error",n),a.addEventListener("load",i),a.addEventListener("timeout",o),c.callbackToRemoveEvents=function(){!function(e){e.removeEventListener("abort",r),e.removeEventListener("error",n),e.removeEventListener("load",i),e.removeEventListener("timeout",o);var a=t._xhrMem.get(e);a&&(a.callbackToRemoveEvents=void 0)}(a),c.createdResources&&c.createdResources.observer.disconnect()},t._addHeaders(a,p),t._addResourceObserver(a,p)})),e.apply(this,s)}}},e.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),Wr(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),Wr(XMLHttpRequest.prototype.send)&&(this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.debug("removing previous patch from method send")),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend())},e.prototype.disable=function(){this._diag.debug("removing patch from",this.moduleName,this.version),this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet},e}(Vr);function Ko(t,e,n){Yo(t,n instanceof Error?0:n.status)}function Yo(t,e){if(null==e)return;(0===e||e>=400&&e<600)&&t.setStatus({code:wt.ERROR})}function $o(t){return(e,n,r)=>{Ko(e,0,r),null==t||t(e,n,r)}}function Qo(t){return(e,n)=>{!function(t,e){Yo(t,e.status)}(e,n),null==t||t(e,n)}}function Jo(t={}){const{fetchInstrumentationOptions:e,xhrInstrumentationOptions:n}=t,r=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}(t,["fetchInstrumentationOptions","xhrInstrumentationOptions"]),o=function(t,e){return Object.assign(Object.assign(Object.assign(Object.assign({},e),{ignoreNetworkEvents:!0}),t),{applyCustomAttributesOnSpan:$o(null==t?void 0:t.applyCustomAttributesOnSpan)})}(e,r),i=function(t,e){return Object.assign(Object.assign(Object.assign(Object.assign({},e),{ignoreNetworkEvents:!0}),t),{applyCustomAttributesOnSpan:Qo(null==t?void 0:t.applyCustomAttributesOnSpan)})}(n,r);return[new Go(o),new Wo(i)]}var ti="OT_ZONE_CONTEXT",ei=function(){function t(){this._enabled=!1,this._zoneCounter=0}return t.prototype._activeContextFromZone=function(t){return t&&t.get(ti)||C},t.prototype._bindFunction=function(t,e){var n=this,r=function(){for(var r=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return n.with(t,(function(){return e.apply(r,o)}))};return Object.defineProperty(r,"length",{enumerable:!1,configurable:!0,writable:!1,value:e.length}),r},t.prototype._bindListener=function(t,e){var n=e;return void 0!==n.__ot_listeners||(n.__ot_listeners={},"function"==typeof n.addEventListener&&(n.addEventListener=this._patchAddEventListener(n,n.addEventListener,t)),"function"==typeof n.removeEventListener&&(n.removeEventListener=this._patchRemoveEventListener(n,n.removeEventListener))),e},t.prototype._createZoneName=function(){this._zoneCounter++;var t=Math.random();return this._zoneCounter+"-"+t},t.prototype._createZone=function(t,e){var n;return Zone.current.fork({name:t,properties:(n={},n[ti]=e,n)})},t.prototype._getActiveZone=function(){return Zone.current},t.prototype._patchAddEventListener=function(t,e,n){var r=this;return function(o,i,a){void 0===t.__ot_listeners&&(t.__ot_listeners={});var s=t.__ot_listeners[o];void 0===s&&(s=new WeakMap,t.__ot_listeners[o]=s);var u=r.bind(n,i);return s.set(i,u),e.call(this,o,u,a)}},t.prototype._patchRemoveEventListener=function(t,e){return function(n,r){if(void 0===t.__ot_listeners||void 0===t.__ot_listeners[n])return e.call(this,n,r);var o=t.__ot_listeners[n],i=o.get(r);return o.delete(r),e.call(this,n,i||r)}},t.prototype.active=function(){if(!this._enabled)return C;var t=this._getActiveZone(),e=this._activeContextFromZone(t);return e||C},t.prototype.bind=function(t,e){return void 0===t&&(t=this.active()),"function"==typeof e?this._bindFunction(t,e):(void 0===(n=e)&&(n={}),"function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener&&this._bindListener(t,e),e);var n},t.prototype.disable=function(){return this._enabled=!1,this},t.prototype.enable=function(){return this._enabled=!0,this},t.prototype.with=function(t,e,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];var i=this._createZoneName();return this._createZone(i,t).run(e,n,r)},t}();
2
2
  /**
3
3
  * @license Angular v14.2.0-next.0
4
4
  * (c) 2010-2022 Google LLC. https://angular.io/
@@ -11,7 +11,7 @@ var GrafanaFaroWebTracing=function(t,e){"use strict";var n="object"==typeof glob
11
11
  * Use of this source code is governed by an MIT-style license that can be
12
12
  * found in the LICENSE file at https://angular.io/license
13
13
  */
14
- !function(t){const e=t.performance;function n(t){e&&e.mark&&e.mark(t)}function r(t,n){e&&e.measure&&e.measure(t,n)}n("Zone");const o=t.__Zone_symbol_prefix||"__zone_symbol__";function i(t){return o+t}const a=!0===t[i("forceDuplicateZoneCheck")];if(t.Zone){if(a||"function"!=typeof t.Zone.__symbol__)throw new Error("Zone already loaded.");return t.Zone}class s{constructor(t,e){this._parent=t,this._name=e?e.name||"unnamed":"<root>",this._properties=e&&e.properties||{},this._zoneDelegate=new c(this,this._parent&&this._parent._zoneDelegate,e)}static assertZonePatched(){if(t.Promise!==C.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let t=s.current;for(;t.parent;)t=t.parent;return t}static get current(){return I.zone}static get currentTask(){return N}static __load_patch(e,o,i=!1){if(C.hasOwnProperty(e)){if(!i&&a)throw Error("Already loaded patch: "+e)}else if(!t["__Zone_disable_"+e]){const i="Zone:"+e;n(i),C[e]=o(t,s,k),r(i,i)}}get parent(){return this._parent}get name(){return this._name}get(t){const e=this.getZoneWith(t);if(e)return e._properties[t]}getZoneWith(t){let e=this;for(;e;){if(e._properties.hasOwnProperty(t))return e;e=e._parent}return null}fork(t){if(!t)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,t)}wrap(t,e){if("function"!=typeof t)throw new Error("Expecting function got: "+t);const n=this._zoneDelegate.intercept(this,t,e),r=this;return function(){return r.runGuarded(n,this,arguments,e)}}run(t,e,n,r){I={parent:I,zone:this};try{return this._zoneDelegate.invoke(this,t,e,n,r)}finally{I=I.parent}}runGuarded(t,e=null,n,r){I={parent:I,zone:this};try{try{return this._zoneDelegate.invoke(this,t,e,n,r)}catch(t){if(this._zoneDelegate.handleError(this,t))throw t}}finally{I=I.parent}}runTask(t,e,n){if(t.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(t.zone||T).name+"; Execution: "+this.name+")");if(t.state===m&&(t.type===A||t.type===L))return;const r=t.state!=O;r&&t._transitionTo(O,S),t.runCount++;const o=N;N=t,I={parent:I,zone:this};try{t.type==L&&t.data&&!t.data.isPeriodic&&(t.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,t,e,n)}catch(t){if(this._zoneDelegate.handleError(this,t))throw t}}finally{t.state!==m&&t.state!==w&&(t.type==A||t.data&&t.data.isPeriodic?r&&t._transitionTo(S,O):(t.runCount=0,this._updateTaskCount(t,-1),r&&t._transitionTo(m,O,m))),I=I.parent,N=o}}scheduleTask(t){if(t.zone&&t.zone!==this){let e=this;for(;e;){if(e===t.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${t.zone.name}`);e=e.parent}}t._transitionTo(b,m);const e=[];t._zoneDelegates=e,t._zone=this;try{t=this._zoneDelegate.scheduleTask(this,t)}catch(e){throw t._transitionTo(w,b,m),this._zoneDelegate.handleError(this,e),e}return t._zoneDelegates===e&&this._updateTaskCount(t,1),t.state==b&&t._transitionTo(S,b),t}scheduleMicroTask(t,e,n,r){return this.scheduleTask(new l(P,t,e,n,r,void 0))}scheduleMacroTask(t,e,n,r,o){return this.scheduleTask(new l(L,t,e,n,r,o))}scheduleEventTask(t,e,n,r,o){return this.scheduleTask(new l(A,t,e,n,r,o))}cancelTask(t){if(t.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(t.zone||T).name+"; Execution: "+this.name+")");t._transitionTo(R,S,O);try{this._zoneDelegate.cancelTask(this,t)}catch(e){throw t._transitionTo(w,R),this._zoneDelegate.handleError(this,e),e}return this._updateTaskCount(t,-1),t._transitionTo(m,R),t.runCount=0,t}_updateTaskCount(t,e){const n=t._zoneDelegates;-1==e&&(t._zoneDelegates=null);for(let r=0;r<n.length;r++)n[r]._updateTaskCount(t.type,e)}}s.__symbol__=i;const u={name:"",onHasTask:(t,e,n,r)=>t.hasTask(n,r),onScheduleTask:(t,e,n,r)=>t.scheduleTask(n,r),onInvokeTask:(t,e,n,r,o,i)=>t.invokeTask(n,r,o,i),onCancelTask:(t,e,n,r)=>t.cancelTask(n,r)};class c{constructor(t,e,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=t,this._parentDelegate=e,this._forkZS=n&&(n&&n.onFork?n:e._forkZS),this._forkDlgt=n&&(n.onFork?e:e._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:e._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:e._interceptZS),this._interceptDlgt=n&&(n.onIntercept?e:e._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:e._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:e._invokeZS),this._invokeDlgt=n&&(n.onInvoke?e:e._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:e._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:e._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?e:e._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:e._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:e._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?e:e._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:e._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:e._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?e:e._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:e._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:e._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?e:e._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:e._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const r=n&&n.onHasTask,o=e&&e._hasTaskZS;(r||o)&&(this._hasTaskZS=r?n:u,this._hasTaskDlgt=e,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=t,n.onScheduleTask||(this._scheduleTaskZS=u,this._scheduleTaskDlgt=e,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=u,this._invokeTaskDlgt=e,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=u,this._cancelTaskDlgt=e,this._cancelTaskCurrZone=this.zone))}fork(t,e){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,t,e):new s(t,e)}intercept(t,e,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,t,e,n):e}invoke(t,e,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,t,e,n,r,o):e.apply(n,r)}handleError(t,e){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,t,e)}scheduleTask(t,e){let n=e;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,t,e),n||(n=e);else if(e.scheduleFn)e.scheduleFn(e);else{if(e.type!=P)throw new Error("Task is missing scheduleFn.");y(e)}return n}invokeTask(t,e,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,t,e,n,r):e.callback.apply(n,r)}cancelTask(t,e){let n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,t,e);else{if(!e.cancelFn)throw Error("Task is not cancelable");n=e.cancelFn(e)}return n}hasTask(t,e){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,t,e)}catch(e){this.handleError(t,e)}}_updateTaskCount(t,e){const n=this._taskCounts,r=n[t],o=n[t]=r+e;if(o<0)throw new Error("More tasks executed then were scheduled.");if(0==r||0==o){const e={microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:t};this.hasTask(this.zone,e)}}}class l{constructor(e,n,r,o,i,a){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=e,this.source=n,this.data=o,this.scheduleFn=i,this.cancelFn=a,!r)throw new Error("callback is not defined");this.callback=r;const s=this;e===A&&o&&o.useG?this.invoke=l.invokeTask:this.invoke=function(){return l.invokeTask.call(t,s,this,arguments)}}static invokeTask(t,e,n){t||(t=this),x++;try{return t.runCount++,t.zone.runTask(t,e,n)}finally{1==x&&E(),x--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(m,b)}_transitionTo(t,e,n){if(this._state!==e&&this._state!==n)throw new Error(`${this.type} '${this.source}': can not transition to '${t}', expecting state '${e}'${n?" or '"+n+"'":""}, was '${this._state}'.`);this._state=t,t==m&&(this._zoneDelegates=null)}toString(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const p=i("setTimeout"),f=i("Promise"),h=i("then");let d,_=[],v=!1;function g(e){if(d||t[f]&&(d=t[f].resolve(0)),d){let t=d[h];t||(t=d.then),t.call(d,e)}else t[p](e,0)}function y(t){0===x&&0===_.length&&g(E),t&&_.push(t)}function E(){if(!v){for(v=!0;_.length;){const t=_;_=[];for(let e=0;e<t.length;e++){const n=t[e];try{n.zone.runTask(n,null,null)}catch(t){k.onUnhandledError(t)}}}k.microtaskDrainDone(),v=!1}}const T={name:"NO ZONE"},m="notScheduled",b="scheduling",S="scheduled",O="running",R="canceling",w="unknown",P="microTask",L="macroTask",A="eventTask",C={},k={symbol:i,currentZoneFrame:()=>I,onUnhandledError:D,microtaskDrainDone:D,scheduleMicroTask:y,showUncaughtError:()=>!s[i("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:D,patchMethod:()=>D,bindArguments:()=>[],patchThen:()=>D,patchMacroTask:()=>D,patchEventPrototype:()=>D,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>D,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>D,wrapWithCurrentZone:()=>D,filterProperties:()=>[],attachOriginToPatched:()=>D,_redefineProperty:()=>D,patchCallbacks:()=>D,nativeScheduleMicroTask:g};let I={parent:null,zone:new s(null,null)},N=null,x=0;function D(){}r("Zone","Zone"),t.Zone=s}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||br);
14
+ !function(t){const e=t.performance;function n(t){e&&e.mark&&e.mark(t)}function r(t,n){e&&e.measure&&e.measure(t,n)}n("Zone");const o=t.__Zone_symbol_prefix||"__zone_symbol__";function i(t){return o+t}const a=!0===t[i("forceDuplicateZoneCheck")];if(t.Zone){if(a||"function"!=typeof t.Zone.__symbol__)throw new Error("Zone already loaded.");return t.Zone}class s{constructor(t,e){this._parent=t,this._name=e?e.name||"unnamed":"<root>",this._properties=e&&e.properties||{},this._zoneDelegate=new c(this,this._parent&&this._parent._zoneDelegate,e)}static assertZonePatched(){if(t.Promise!==C.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let t=s.current;for(;t.parent;)t=t.parent;return t}static get current(){return I.zone}static get currentTask(){return N}static __load_patch(e,o,i=!1){if(C.hasOwnProperty(e)){if(!i&&a)throw Error("Already loaded patch: "+e)}else if(!t["__Zone_disable_"+e]){const i="Zone:"+e;n(i),C[e]=o(t,s,k),r(i,i)}}get parent(){return this._parent}get name(){return this._name}get(t){const e=this.getZoneWith(t);if(e)return e._properties[t]}getZoneWith(t){let e=this;for(;e;){if(e._properties.hasOwnProperty(t))return e;e=e._parent}return null}fork(t){if(!t)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,t)}wrap(t,e){if("function"!=typeof t)throw new Error("Expecting function got: "+t);const n=this._zoneDelegate.intercept(this,t,e),r=this;return function(){return r.runGuarded(n,this,arguments,e)}}run(t,e,n,r){I={parent:I,zone:this};try{return this._zoneDelegate.invoke(this,t,e,n,r)}finally{I=I.parent}}runGuarded(t,e=null,n,r){I={parent:I,zone:this};try{try{return this._zoneDelegate.invoke(this,t,e,n,r)}catch(t){if(this._zoneDelegate.handleError(this,t))throw t}}finally{I=I.parent}}runTask(t,e,n){if(t.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(t.zone||T).name+"; Execution: "+this.name+")");if(t.state===m&&(t.type===A||t.type===L))return;const r=t.state!=O;r&&t._transitionTo(O,S),t.runCount++;const o=N;N=t,I={parent:I,zone:this};try{t.type==L&&t.data&&!t.data.isPeriodic&&(t.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,t,e,n)}catch(t){if(this._zoneDelegate.handleError(this,t))throw t}}finally{t.state!==m&&t.state!==w&&(t.type==A||t.data&&t.data.isPeriodic?r&&t._transitionTo(S,O):(t.runCount=0,this._updateTaskCount(t,-1),r&&t._transitionTo(m,O,m))),I=I.parent,N=o}}scheduleTask(t){if(t.zone&&t.zone!==this){let e=this;for(;e;){if(e===t.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${t.zone.name}`);e=e.parent}}t._transitionTo(b,m);const e=[];t._zoneDelegates=e,t._zone=this;try{t=this._zoneDelegate.scheduleTask(this,t)}catch(e){throw t._transitionTo(w,b,m),this._zoneDelegate.handleError(this,e),e}return t._zoneDelegates===e&&this._updateTaskCount(t,1),t.state==b&&t._transitionTo(S,b),t}scheduleMicroTask(t,e,n,r){return this.scheduleTask(new l(P,t,e,n,r,void 0))}scheduleMacroTask(t,e,n,r,o){return this.scheduleTask(new l(L,t,e,n,r,o))}scheduleEventTask(t,e,n,r,o){return this.scheduleTask(new l(A,t,e,n,r,o))}cancelTask(t){if(t.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(t.zone||T).name+"; Execution: "+this.name+")");t._transitionTo(R,S,O);try{this._zoneDelegate.cancelTask(this,t)}catch(e){throw t._transitionTo(w,R),this._zoneDelegate.handleError(this,e),e}return this._updateTaskCount(t,-1),t._transitionTo(m,R),t.runCount=0,t}_updateTaskCount(t,e){const n=t._zoneDelegates;-1==e&&(t._zoneDelegates=null);for(let r=0;r<n.length;r++)n[r]._updateTaskCount(t.type,e)}}s.__symbol__=i;const u={name:"",onHasTask:(t,e,n,r)=>t.hasTask(n,r),onScheduleTask:(t,e,n,r)=>t.scheduleTask(n,r),onInvokeTask:(t,e,n,r,o,i)=>t.invokeTask(n,r,o,i),onCancelTask:(t,e,n,r)=>t.cancelTask(n,r)};class c{constructor(t,e,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=t,this._parentDelegate=e,this._forkZS=n&&(n&&n.onFork?n:e._forkZS),this._forkDlgt=n&&(n.onFork?e:e._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:e._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:e._interceptZS),this._interceptDlgt=n&&(n.onIntercept?e:e._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:e._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:e._invokeZS),this._invokeDlgt=n&&(n.onInvoke?e:e._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:e._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:e._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?e:e._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:e._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:e._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?e:e._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:e._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:e._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?e:e._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:e._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:e._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?e:e._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:e._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const r=n&&n.onHasTask,o=e&&e._hasTaskZS;(r||o)&&(this._hasTaskZS=r?n:u,this._hasTaskDlgt=e,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=t,n.onScheduleTask||(this._scheduleTaskZS=u,this._scheduleTaskDlgt=e,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=u,this._invokeTaskDlgt=e,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=u,this._cancelTaskDlgt=e,this._cancelTaskCurrZone=this.zone))}fork(t,e){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,t,e):new s(t,e)}intercept(t,e,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,t,e,n):e}invoke(t,e,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,t,e,n,r,o):e.apply(n,r)}handleError(t,e){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,t,e)}scheduleTask(t,e){let n=e;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,t,e),n||(n=e);else if(e.scheduleFn)e.scheduleFn(e);else{if(e.type!=P)throw new Error("Task is missing scheduleFn.");y(e)}return n}invokeTask(t,e,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,t,e,n,r):e.callback.apply(n,r)}cancelTask(t,e){let n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,t,e);else{if(!e.cancelFn)throw Error("Task is not cancelable");n=e.cancelFn(e)}return n}hasTask(t,e){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,t,e)}catch(e){this.handleError(t,e)}}_updateTaskCount(t,e){const n=this._taskCounts,r=n[t],o=n[t]=r+e;if(o<0)throw new Error("More tasks executed then were scheduled.");if(0==r||0==o){const e={microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:t};this.hasTask(this.zone,e)}}}class l{constructor(e,n,r,o,i,a){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=e,this.source=n,this.data=o,this.scheduleFn=i,this.cancelFn=a,!r)throw new Error("callback is not defined");this.callback=r;const s=this;e===A&&o&&o.useG?this.invoke=l.invokeTask:this.invoke=function(){return l.invokeTask.call(t,s,this,arguments)}}static invokeTask(t,e,n){t||(t=this),x++;try{return t.runCount++,t.zone.runTask(t,e,n)}finally{1==x&&E(),x--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(m,b)}_transitionTo(t,e,n){if(this._state!==e&&this._state!==n)throw new Error(`${this.type} '${this.source}': can not transition to '${t}', expecting state '${e}'${n?" or '"+n+"'":""}, was '${this._state}'.`);this._state=t,t==m&&(this._zoneDelegates=null)}toString(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const p=i("setTimeout"),f=i("Promise"),h=i("then");let d,_=[],v=!1;function g(e){if(d||t[f]&&(d=t[f].resolve(0)),d){let t=d[h];t||(t=d.then),t.call(d,e)}else t[p](e,0)}function y(t){0===x&&0===_.length&&g(E),t&&_.push(t)}function E(){if(!v){for(v=!0;_.length;){const t=_;_=[];for(let e=0;e<t.length;e++){const n=t[e];try{n.zone.runTask(n,null,null)}catch(t){k.onUnhandledError(t)}}}k.microtaskDrainDone(),v=!1}}const T={name:"NO ZONE"},m="notScheduled",b="scheduling",S="scheduled",O="running",R="canceling",w="unknown",P="microTask",L="macroTask",A="eventTask",C={},k={symbol:i,currentZoneFrame:()=>I,onUnhandledError:D,microtaskDrainDone:D,scheduleMicroTask:y,showUncaughtError:()=>!s[i("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:D,patchMethod:()=>D,bindArguments:()=>[],patchThen:()=>D,patchMacroTask:()=>D,patchEventPrototype:()=>D,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>D,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>D,wrapWithCurrentZone:()=>D,filterProperties:()=>[],attachOriginToPatched:()=>D,_redefineProperty:()=>D,patchCallbacks:()=>D,nativeScheduleMicroTask:g};let I={parent:null,zone:new s(null,null)},N=null,x=0;function D(){}r("Zone","Zone"),t.Zone=s}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||Rr);
15
15
  /**
16
16
  * @license
17
17
  * Copyright Google LLC All Rights Reserved.
@@ -19,14 +19,14 @@ var GrafanaFaroWebTracing=function(t,e){"use strict";var n="object"==typeof glob
19
19
  * Use of this source code is governed by an MIT-style license that can be
20
20
  * found in the LICENSE file at https://angular.io/license
21
21
  */
22
- const Ko=Object.getOwnPropertyDescriptor,Yo=Object.defineProperty,$o=Object.getPrototypeOf,Qo=Object.create,Jo=Array.prototype.slice,ti="addEventListener",ei="removeEventListener",ni=Zone.__symbol__(ti),ri=Zone.__symbol__(ei),oi="true",ii="false",ai=Zone.__symbol__("");function si(t,e){return Zone.current.wrap(t,e)}function ui(t,e,n,r,o){return Zone.current.scheduleMacroTask(t,e,n,r,o)}const ci=Zone.__symbol__,li="undefined"!=typeof window,pi=li?window:void 0,fi=li&&pi||"object"==typeof self&&self||br;function hi(t,e){for(let n=t.length-1;n>=0;n--)"function"==typeof t[n]&&(t[n]=si(t[n],e+"_"+n));return t}function di(t){return!t||!1!==t.writable&&!("function"==typeof t.get&&void 0===t.set)}const _i="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,vi=!("nw"in fi)&&void 0!==fi.process&&"[object process]"==={}.toString.call(fi.process),gi=!vi&&!_i&&!(!li||!pi.HTMLElement),yi=void 0!==fi.process&&"[object process]"==={}.toString.call(fi.process)&&!_i&&!(!li||!pi.HTMLElement),Ei={},Ti=function(t){if(!(t=t||fi.event))return;let e=Ei[t.type];e||(e=Ei[t.type]=ci("ON_PROPERTY"+t.type));const n=this||t.target||fi,r=n[e];let o;if(gi&&n===pi&&"error"===t.type){const e=t;o=r&&r.call(this,e.message,e.filename,e.lineno,e.colno,e.error),!0===o&&t.preventDefault()}else o=r&&r.apply(this,arguments),null==o||o||t.preventDefault();return o};function mi(t,e,n){let r=Ko(t,e);if(!r&&n){Ko(n,e)&&(r={enumerable:!0,configurable:!0})}if(!r||!r.configurable)return;const o=ci("on"+e+"patched");if(t.hasOwnProperty(o)&&t[o])return;delete r.writable,delete r.value;const i=r.get,a=r.set,s=e.slice(2);let u=Ei[s];u||(u=Ei[s]=ci("ON_PROPERTY"+s)),r.set=function(e){let n=this;if(n||t!==fi||(n=fi),!n)return;"function"==typeof n[u]&&n.removeEventListener(s,Ti),a&&a.call(n,null),n[u]=e,"function"==typeof e&&n.addEventListener(s,Ti,!1)},r.get=function(){let n=this;if(n||t!==fi||(n=fi),!n)return null;const o=n[u];if(o)return o;if(i){let t=i.call(this);if(t)return r.set.call(this,t),"function"==typeof n.removeAttribute&&n.removeAttribute(e),t}return null},Yo(t,e,r),t[o]=!0}function bi(t,e,n){if(e)for(let r=0;r<e.length;r++)mi(t,"on"+e[r],n);else{const e=[];for(const n in t)"on"==n.slice(0,2)&&e.push(n);for(let r=0;r<e.length;r++)mi(t,e[r],n)}}const Si=ci("originalInstance");function Oi(t){const e=fi[t];if(!e)return;fi[ci(t)]=e,fi[t]=function(){const n=hi(arguments,t);switch(n.length){case 0:this[Si]=new e;break;case 1:this[Si]=new e(n[0]);break;case 2:this[Si]=new e(n[0],n[1]);break;case 3:this[Si]=new e(n[0],n[1],n[2]);break;case 4:this[Si]=new e(n[0],n[1],n[2],n[3]);break;default:throw new Error("Arg list too long.")}},Pi(fi[t],e);const n=new e((function(){}));let r;for(r in n)"XMLHttpRequest"===t&&"responseBlob"===r||function(e){"function"==typeof n[e]?fi[t].prototype[e]=function(){return this[Si][e].apply(this[Si],arguments)}:Yo(fi[t].prototype,e,{set:function(n){"function"==typeof n?(this[Si][e]=si(n,t+"."+e),Pi(this[Si][e],n)):this[Si][e]=n},get:function(){return this[Si][e]}})}(r);for(r in e)"prototype"!==r&&e.hasOwnProperty(r)&&(fi[t][r]=e[r])}function Ri(t,e,n){let r=t;for(;r&&!r.hasOwnProperty(e);)r=$o(r);!r&&t[e]&&(r=t);const o=ci(e);let i=null;if(r&&(!(i=r[o])||!r.hasOwnProperty(o))){i=r[o]=r[e];if(di(r&&Ko(r,e))){const t=n(i,o,e);r[e]=function(){return t(this,arguments)},Pi(r[e],i)}}return i}function wi(t,e,n){let r=null;function o(t){const e=t.data;return e.args[e.cbIdx]=function(){t.invoke.apply(this,arguments)},r.apply(e.target,e.args),t}r=Ri(t,e,(t=>function(e,r){const i=n(e,r);return i.cbIdx>=0&&"function"==typeof r[i.cbIdx]?ui(i.name,r[i.cbIdx],i,o):t.apply(e,r)}))}function Pi(t,e){t[ci("OriginalDelegate")]=e}let Li=!1,Ai=!1;function Ci(){try{const t=pi.navigator.userAgent;if(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/"))return!0}catch(t){}return!1}function ki(){if(Li)return Ai;Li=!0;try{const t=pi.navigator.userAgent;-1===t.indexOf("MSIE ")&&-1===t.indexOf("Trident/")&&-1===t.indexOf("Edge/")||(Ai=!0)}catch(t){}return Ai}
22
+ const ni=Object.getOwnPropertyDescriptor,ri=Object.defineProperty,oi=Object.getPrototypeOf,ii=Object.create,ai=Array.prototype.slice,si="addEventListener",ui="removeEventListener",ci=Zone.__symbol__(si),li=Zone.__symbol__(ui),pi="true",fi="false",hi=Zone.__symbol__("");function di(t,e){return Zone.current.wrap(t,e)}function _i(t,e,n,r,o){return Zone.current.scheduleMacroTask(t,e,n,r,o)}const vi=Zone.__symbol__,gi="undefined"!=typeof window,yi=gi?window:void 0,Ei=gi&&yi||"object"==typeof self&&self||Rr,Ti="removeAttribute";function mi(t,e){for(let n=t.length-1;n>=0;n--)"function"==typeof t[n]&&(t[n]=di(t[n],e+"_"+n));return t}function bi(t){return!t||!1!==t.writable&&!("function"==typeof t.get&&void 0===t.set)}const Si="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,Oi=!("nw"in Ei)&&void 0!==Ei.process&&"[object process]"==={}.toString.call(Ei.process),Ri=!Oi&&!Si&&!(!gi||!yi.HTMLElement),wi=void 0!==Ei.process&&"[object process]"==={}.toString.call(Ei.process)&&!Si&&!(!gi||!yi.HTMLElement),Pi={},Li=function(t){if(!(t=t||Ei.event))return;let e=Pi[t.type];e||(e=Pi[t.type]=vi("ON_PROPERTY"+t.type));const n=this||t.target||Ei,r=n[e];let o;if(Ri&&n===yi&&"error"===t.type){const e=t;o=r&&r.call(this,e.message,e.filename,e.lineno,e.colno,e.error),!0===o&&t.preventDefault()}else o=r&&r.apply(this,arguments),null==o||o||t.preventDefault();return o};function Ai(t,e,n){let r=ni(t,e);if(!r&&n){ni(n,e)&&(r={enumerable:!0,configurable:!0})}if(!r||!r.configurable)return;const o=vi("on"+e+"patched");if(t.hasOwnProperty(o)&&t[o])return;delete r.writable,delete r.value;const i=r.get,a=r.set,s=e.slice(2);let u=Pi[s];u||(u=Pi[s]=vi("ON_PROPERTY"+s)),r.set=function(e){let n=this;if(n||t!==Ei||(n=Ei),!n)return;"function"==typeof n[u]&&n.removeEventListener(s,Li),a&&a.call(n,null),n[u]=e,"function"==typeof e&&n.addEventListener(s,Li,!1)},r.get=function(){let n=this;if(n||t!==Ei||(n=Ei),!n)return null;const o=n[u];if(o)return o;if(i){let t=i.call(this);if(t)return r.set.call(this,t),"function"==typeof n[Ti]&&n.removeAttribute(e),t}return null},ri(t,e,r),t[o]=!0}function Ci(t,e,n){if(e)for(let r=0;r<e.length;r++)Ai(t,"on"+e[r],n);else{const e=[];for(const n in t)"on"==n.slice(0,2)&&e.push(n);for(let r=0;r<e.length;r++)Ai(t,e[r],n)}}const ki=vi("originalInstance");function Ii(t){const e=Ei[t];if(!e)return;Ei[vi(t)]=e,Ei[t]=function(){const n=mi(arguments,t);switch(n.length){case 0:this[ki]=new e;break;case 1:this[ki]=new e(n[0]);break;case 2:this[ki]=new e(n[0],n[1]);break;case 3:this[ki]=new e(n[0],n[1],n[2]);break;case 4:this[ki]=new e(n[0],n[1],n[2],n[3]);break;default:throw new Error("Arg list too long.")}},Di(Ei[t],e);const n=new e((function(){}));let r;for(r in n)"XMLHttpRequest"===t&&"responseBlob"===r||function(e){"function"==typeof n[e]?Ei[t].prototype[e]=function(){return this[ki][e].apply(this[ki],arguments)}:ri(Ei[t].prototype,e,{set:function(n){"function"==typeof n?(this[ki][e]=di(n,t+"."+e),Di(this[ki][e],n)):this[ki][e]=n},get:function(){return this[ki][e]}})}(r);for(r in e)"prototype"!==r&&e.hasOwnProperty(r)&&(Ei[t][r]=e[r])}function Ni(t,e,n){let r=t;for(;r&&!r.hasOwnProperty(e);)r=oi(r);!r&&t[e]&&(r=t);const o=vi(e);let i=null;if(r&&(!(i=r[o])||!r.hasOwnProperty(o))){i=r[o]=r[e];if(bi(r&&ni(r,e))){const t=n(i,o,e);r[e]=function(){return t(this,arguments)},Di(r[e],i)}}return i}function xi(t,e,n){let r=null;function o(t){const e=t.data;return e.args[e.cbIdx]=function(){t.invoke.apply(this,arguments)},r.apply(e.target,e.args),t}r=Ni(t,e,(t=>function(e,r){const i=n(e,r);return i.cbIdx>=0&&"function"==typeof r[i.cbIdx]?_i(i.name,r[i.cbIdx],i,o):t.apply(e,r)}))}function Di(t,e){t[vi("OriginalDelegate")]=e}let Mi=!1,ji=!1;function Ui(){try{const t=yi.navigator.userAgent;if(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/"))return!0}catch(t){}return!1}function Zi(){if(Mi)return ji;Mi=!0;try{const t=yi.navigator.userAgent;-1===t.indexOf("MSIE ")&&-1===t.indexOf("Trident/")&&-1===t.indexOf("Edge/")||(ji=!0)}catch(t){}return ji}
23
23
  /**
24
24
  * @license
25
25
  * Copyright Google LLC All Rights Reserved.
26
26
  *
27
27
  * Use of this source code is governed by an MIT-style license that can be
28
28
  * found in the LICENSE file at https://angular.io/license
29
- */Zone.__load_patch("ZoneAwarePromise",((t,e,n)=>{const r=Object.getOwnPropertyDescriptor,o=Object.defineProperty;const i=n.symbol,a=[],s=!0===t[i("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],u=i("Promise"),c=i("then");n.onUnhandledError=t=>{if(n.showUncaughtError()){const e=t&&t.rejection;e?console.error("Unhandled Promise rejection:",e instanceof Error?e.message:e,"; Zone:",t.zone.name,"; Task:",t.task&&t.task.source,"; Value:",e,e instanceof Error?e.stack:void 0):console.error(t)}},n.microtaskDrainDone=()=>{for(;a.length;){const t=a.shift();try{t.zone.runGuarded((()=>{if(t.throwOriginal)throw t.rejection;throw t}))}catch(t){p(t)}}};const l=i("unhandledPromiseRejectionHandler");function p(t){n.onUnhandledError(t);try{const n=e[l];"function"==typeof n&&n.call(this,t)}catch(t){}}function f(t){return t&&t.then}function h(t){return t}function d(t){return I.reject(t)}const _=i("state"),v=i("value"),g=i("finally"),y=i("parentPromiseValue"),E=i("parentPromiseState"),T=null,m=!0,b=!1;function S(t,e){return n=>{try{w(t,e,n)}catch(e){w(t,!1,e)}}}const O=function(){let t=!1;return function(e){return function(){t||(t=!0,e.apply(null,arguments))}}},R=i("currentTaskTrace");function w(t,r,i){const u=O();if(t===i)throw new TypeError("Promise resolved with itself");if(t[_]===T){let c=null;try{"object"!=typeof i&&"function"!=typeof i||(c=i&&i.then)}catch(e){return u((()=>{w(t,!1,e)}))(),t}if(r!==b&&i instanceof I&&i.hasOwnProperty(_)&&i.hasOwnProperty(v)&&i[_]!==T)L(i),w(t,i[_],i[v]);else if(r!==b&&"function"==typeof c)try{c.call(i,u(S(t,r)),u(S(t,!1)))}catch(e){u((()=>{w(t,!1,e)}))()}else{t[_]=r;const u=t[v];if(t[v]=i,t[g]===g&&r===m&&(t[_]=t[E],t[v]=t[y]),r===b&&i instanceof Error){const t=e.currentTask&&e.currentTask.data&&e.currentTask.data.__creationTrace__;t&&o(i,R,{configurable:!0,enumerable:!1,writable:!0,value:t})}for(let e=0;e<u.length;)A(t,u[e++],u[e++],u[e++],u[e++]);if(0==u.length&&r==b){t[_]=0;let r=i;try{throw new Error("Uncaught (in promise): "+function(t){if(t&&t.toString===Object.prototype.toString){return(t.constructor&&t.constructor.name||"")+": "+JSON.stringify(t)}return t?t.toString():Object.prototype.toString.call(t)}(i)+(i&&i.stack?"\n"+i.stack:""))}catch(t){r=t}s&&(r.throwOriginal=!0),r.rejection=i,r.promise=t,r.zone=e.current,r.task=e.currentTask,a.push(r),n.scheduleMicroTask()}}}return t}const P=i("rejectionHandledHandler");function L(t){if(0===t[_]){try{const n=e[P];n&&"function"==typeof n&&n.call(this,{rejection:t[v],promise:t})}catch(t){}t[_]=b;for(let e=0;e<a.length;e++)t===a[e].promise&&a.splice(e,1)}}function A(t,e,n,r,o){L(t);const i=t[_],a=i?"function"==typeof r?r:h:"function"==typeof o?o:d;e.scheduleMicroTask("Promise.then",(()=>{try{const r=t[v],o=!!n&&g===n[g];o&&(n[y]=r,n[E]=i);const s=e.run(a,void 0,o&&a!==d&&a!==h?[]:[r]);w(n,!0,s)}catch(t){w(n,!1,t)}}),n)}const C=function(){},k=t.AggregateError;class I{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(t){return w(new this(null),m,t)}static reject(t){return w(new this(null),b,t)}static any(t){if(!t||"function"!=typeof t[Symbol.iterator])return Promise.reject(new k([],"All promises were rejected"));const e=[];let n=0;try{for(let r of t)n++,e.push(I.resolve(r))}catch(t){return Promise.reject(new k([],"All promises were rejected"))}if(0===n)return Promise.reject(new k([],"All promises were rejected"));let r=!1;const o=[];return new I(((t,i)=>{for(let a=0;a<e.length;a++)e[a].then((e=>{r||(r=!0,t(e))}),(t=>{o.push(t),n--,0===n&&(r=!0,i(new k(o,"All promises were rejected")))}))}))}static race(t){let e,n,r=new this(((t,r)=>{e=t,n=r}));function o(t){e(t)}function i(t){n(t)}for(let e of t)f(e)||(e=this.resolve(e)),e.then(o,i);return r}static all(t){return I.allWithCallback(t)}static allSettled(t){return(this&&this.prototype instanceof I?this:I).allWithCallback(t,{thenCallback:t=>({status:"fulfilled",value:t}),errorCallback:t=>({status:"rejected",reason:t})})}static allWithCallback(t,e){let n,r,o=new this(((t,e)=>{n=t,r=e})),i=2,a=0;const s=[];for(let o of t){f(o)||(o=this.resolve(o));const t=a;try{o.then((r=>{s[t]=e?e.thenCallback(r):r,i--,0===i&&n(s)}),(o=>{e?(s[t]=e.errorCallback(o),i--,0===i&&n(s)):r(o)}))}catch(t){r(t)}i++,a++}return i-=2,0===i&&n(s),o}constructor(t){const e=this;if(!(e instanceof I))throw new Error("Must be an instanceof Promise.");e[_]=T,e[v]=[];try{const n=O();t&&t(n(S(e,m)),n(S(e,b)))}catch(t){w(e,!1,t)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return I}then(t,n){var r;let o=null===(r=this.constructor)||void 0===r?void 0:r[Symbol.species];o&&"function"==typeof o||(o=this.constructor||I);const i=new o(C),a=e.current;return this[_]==T?this[v].push(a,i,t,n):A(this,a,i,t,n),i}catch(t){return this.then(null,t)}finally(t){var n;let r=null===(n=this.constructor)||void 0===n?void 0:n[Symbol.species];r&&"function"==typeof r||(r=I);const o=new r(C);o[g]=g;const i=e.current;return this[_]==T?this[v].push(i,o,t,t):A(this,i,o,t,t),o}}I.resolve=I.resolve,I.reject=I.reject,I.race=I.race,I.all=I.all;const N=t[u]=t.Promise;t.Promise=I;const x=i("thenPatched");function D(t){const e=t.prototype,n=r(e,"then");if(n&&(!1===n.writable||!n.configurable))return;const o=e.then;e[c]=o,t.prototype.then=function(t,e){return new I(((t,e)=>{o.call(this,t,e)})).then(t,e)},t[x]=!0}return n.patchThen=D,N&&(D(N),Ri(t,"fetch",(t=>{return e=t,function(t,n){let r=e.apply(t,n);if(r instanceof I)return r;let o=r.constructor;return o[x]||D(o),r};var e}))),Promise[e.__symbol__("uncaughtPromiseErrors")]=a,I})),
29
+ */Zone.__load_patch("ZoneAwarePromise",((t,e,n)=>{const r=Object.getOwnPropertyDescriptor,o=Object.defineProperty;const i=n.symbol,a=[],s=!0===t[i("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],u=i("Promise"),c=i("then"),l="__creationTrace__";n.onUnhandledError=t=>{if(n.showUncaughtError()){const e=t&&t.rejection;e?console.error("Unhandled Promise rejection:",e instanceof Error?e.message:e,"; Zone:",t.zone.name,"; Task:",t.task&&t.task.source,"; Value:",e,e instanceof Error?e.stack:void 0):console.error(t)}},n.microtaskDrainDone=()=>{for(;a.length;){const t=a.shift();try{t.zone.runGuarded((()=>{if(t.throwOriginal)throw t.rejection;throw t}))}catch(t){f(t)}}};const p=i("unhandledPromiseRejectionHandler");function f(t){n.onUnhandledError(t);try{const n=e[p];"function"==typeof n&&n.call(this,t)}catch(t){}}function h(t){return t&&t.then}function d(t){return t}function _(t){return M.reject(t)}const v=i("state"),g=i("value"),y=i("finally"),E=i("parentPromiseValue"),T=i("parentPromiseState"),m="Promise.then",b=null,S=!0,O=!1,R=0;function w(t,e){return n=>{try{C(t,e,n)}catch(e){C(t,!1,e)}}}const P=function(){let t=!1;return function(e){return function(){t||(t=!0,e.apply(null,arguments))}}},L="Promise resolved with itself",A=i("currentTaskTrace");function C(t,r,i){const u=P();if(t===i)throw new TypeError(L);if(t[v]===b){let c=null;try{"object"!=typeof i&&"function"!=typeof i||(c=i&&i.then)}catch(e){return u((()=>{C(t,!1,e)}))(),t}if(r!==O&&i instanceof M&&i.hasOwnProperty(v)&&i.hasOwnProperty(g)&&i[v]!==b)I(i),C(t,i[v],i[g]);else if(r!==O&&"function"==typeof c)try{c.call(i,u(w(t,r)),u(w(t,!1)))}catch(e){u((()=>{C(t,!1,e)}))()}else{t[v]=r;const u=t[g];if(t[g]=i,t[y]===y&&r===S&&(t[v]=t[T],t[g]=t[E]),r===O&&i instanceof Error){const t=e.currentTask&&e.currentTask.data&&e.currentTask.data[l];t&&o(i,A,{configurable:!0,enumerable:!1,writable:!0,value:t})}for(let e=0;e<u.length;)N(t,u[e++],u[e++],u[e++],u[e++]);if(0==u.length&&r==O){t[v]=R;let r=i;try{throw new Error("Uncaught (in promise): "+function(t){if(t&&t.toString===Object.prototype.toString){return(t.constructor&&t.constructor.name||"")+": "+JSON.stringify(t)}return t?t.toString():Object.prototype.toString.call(t)}(i)+(i&&i.stack?"\n"+i.stack:""))}catch(t){r=t}s&&(r.throwOriginal=!0),r.rejection=i,r.promise=t,r.zone=e.current,r.task=e.currentTask,a.push(r),n.scheduleMicroTask()}}}return t}const k=i("rejectionHandledHandler");function I(t){if(t[v]===R){try{const n=e[k];n&&"function"==typeof n&&n.call(this,{rejection:t[g],promise:t})}catch(t){}t[v]=O;for(let e=0;e<a.length;e++)t===a[e].promise&&a.splice(e,1)}}function N(t,e,n,r,o){I(t);const i=t[v],a=i?"function"==typeof r?r:d:"function"==typeof o?o:_;e.scheduleMicroTask(m,(()=>{try{const r=t[g],o=!!n&&y===n[y];o&&(n[E]=r,n[T]=i);const s=e.run(a,void 0,o&&a!==_&&a!==d?[]:[r]);C(n,!0,s)}catch(t){C(n,!1,t)}}),n)}const x=function(){},D=t.AggregateError;class M{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(t){return C(new this(null),S,t)}static reject(t){return C(new this(null),O,t)}static any(t){if(!t||"function"!=typeof t[Symbol.iterator])return Promise.reject(new D([],"All promises were rejected"));const e=[];let n=0;try{for(let r of t)n++,e.push(M.resolve(r))}catch(t){return Promise.reject(new D([],"All promises were rejected"))}if(0===n)return Promise.reject(new D([],"All promises were rejected"));let r=!1;const o=[];return new M(((t,i)=>{for(let a=0;a<e.length;a++)e[a].then((e=>{r||(r=!0,t(e))}),(t=>{o.push(t),n--,0===n&&(r=!0,i(new D(o,"All promises were rejected")))}))}))}static race(t){let e,n,r=new this(((t,r)=>{e=t,n=r}));function o(t){e(t)}function i(t){n(t)}for(let e of t)h(e)||(e=this.resolve(e)),e.then(o,i);return r}static all(t){return M.allWithCallback(t)}static allSettled(t){return(this&&this.prototype instanceof M?this:M).allWithCallback(t,{thenCallback:t=>({status:"fulfilled",value:t}),errorCallback:t=>({status:"rejected",reason:t})})}static allWithCallback(t,e){let n,r,o=new this(((t,e)=>{n=t,r=e})),i=2,a=0;const s=[];for(let o of t){h(o)||(o=this.resolve(o));const t=a;try{o.then((r=>{s[t]=e?e.thenCallback(r):r,i--,0===i&&n(s)}),(o=>{e?(s[t]=e.errorCallback(o),i--,0===i&&n(s)):r(o)}))}catch(t){r(t)}i++,a++}return i-=2,0===i&&n(s),o}constructor(t){const e=this;if(!(e instanceof M))throw new Error("Must be an instanceof Promise.");e[v]=b,e[g]=[];try{const n=P();t&&t(n(w(e,S)),n(w(e,O)))}catch(t){C(e,!1,t)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return M}then(t,n){var r;let o=null===(r=this.constructor)||void 0===r?void 0:r[Symbol.species];o&&"function"==typeof o||(o=this.constructor||M);const i=new o(x),a=e.current;return this[v]==b?this[g].push(a,i,t,n):N(this,a,i,t,n),i}catch(t){return this.then(null,t)}finally(t){var n;let r=null===(n=this.constructor)||void 0===n?void 0:n[Symbol.species];r&&"function"==typeof r||(r=M);const o=new r(x);o[y]=y;const i=e.current;return this[v]==b?this[g].push(i,o,t,t):N(this,i,o,t,t),o}}M.resolve=M.resolve,M.reject=M.reject,M.race=M.race,M.all=M.all;const j=t[u]=t.Promise;t.Promise=M;const U=i("thenPatched");function Z(t){const e=t.prototype,n=r(e,"then");if(n&&(!1===n.writable||!n.configurable))return;const o=e.then;e[c]=o,t.prototype.then=function(t,e){return new M(((t,e)=>{o.call(this,t,e)})).then(t,e)},t[U]=!0}return n.patchThen=Z,j&&(Z(j),Ni(t,"fetch",(t=>{return e=t,function(t,n){let r=e.apply(t,n);if(r instanceof M)return r;let o=r.constructor;return o[U]||Z(o),r};var e}))),Promise[e.__symbol__("uncaughtPromiseErrors")]=a,M})),
30
30
  /**
31
31
  * @license
32
32
  * Copyright Google LLC All Rights Reserved.
@@ -34,7 +34,7 @@ const Ko=Object.getOwnPropertyDescriptor,Yo=Object.defineProperty,$o=Object.getP
34
34
  * Use of this source code is governed by an MIT-style license that can be
35
35
  * found in the LICENSE file at https://angular.io/license
36
36
  */
37
- Zone.__load_patch("toString",(t=>{const e=Function.prototype.toString,n=ci("OriginalDelegate"),r=ci("Promise"),o=ci("Error"),i=function(){if("function"==typeof this){const i=this[n];if(i)return"function"==typeof i?e.call(i):Object.prototype.toString.call(i);if(this===Promise){const n=t[r];if(n)return e.call(n)}if(this===Error){const n=t[o];if(n)return e.call(n)}}return e.call(this)};i[n]=e,Function.prototype.toString=i;const a=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":a.call(this)}}));
37
+ Zone.__load_patch("toString",(t=>{const e=Function.prototype.toString,n=vi("OriginalDelegate"),r=vi("Promise"),o=vi("Error"),i=function(){if("function"==typeof this){const i=this[n];if(i)return"function"==typeof i?e.call(i):Object.prototype.toString.call(i);if(this===Promise){const n=t[r];if(n)return e.call(n)}if(this===Error){const n=t[o];if(n)return e.call(n)}}return e.call(this)};i[n]=e,Function.prototype.toString=i;const a=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":a.call(this)}}));
38
38
  /**
39
39
  * @license
40
40
  * Copyright Google LLC All Rights Reserved.
@@ -42,28 +42,28 @@ Zone.__load_patch("toString",(t=>{const e=Function.prototype.toString,n=ci("Orig
42
42
  * Use of this source code is governed by an MIT-style license that can be
43
43
  * found in the LICENSE file at https://angular.io/license
44
44
  */
45
- let Ii=!1;if("undefined"!=typeof window)try{const t=Object.defineProperty({},"passive",{get:function(){Ii=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){Ii=!1}const Ni={useG:!0},xi={},Di={},Mi=new RegExp("^"+ai+"(\\w+)(true|false)$"),ji=ci("propagationStopped");function Ui(t,e){const n=(e?e(t):t)+ii,r=(e?e(t):t)+oi,o=ai+n,i=ai+r;xi[t]={},xi[t][ii]=o,xi[t][oi]=i}function Zi(t,e,n,r){const o=r&&r.add||ti,i=r&&r.rm||ei,a=r&&r.listeners||"eventListeners",s=r&&r.rmAll||"removeAllListeners",u=ci(o),c="."+o+":",l="prependListener",p="."+l+":",f=function(t,e,n){if(t.isRemoved)return;const r=t.callback;let o;"object"==typeof r&&r.handleEvent&&(t.callback=t=>r.handleEvent(t),t.originalDelegate=r);try{t.invoke(t,e,[n])}catch(t){o=t}const a=t.options;if(a&&"object"==typeof a&&a.once){const r=t.originalDelegate?t.originalDelegate:t.callback;e[i].call(e,n.type,r,a)}return o};function h(n,r,o){if(!(r=r||t.event))return;const i=n||r.target||t,a=i[xi[r.type][o?oi:ii]];if(a){const t=[];if(1===a.length){const e=f(a[0],i,r);e&&t.push(e)}else{const e=a.slice();for(let n=0;n<e.length&&(!r||!0!==r[ji]);n++){const o=f(e[n],i,r);o&&t.push(o)}}if(1===t.length)throw t[0];for(let n=0;n<t.length;n++){const r=t[n];e.nativeScheduleMicroTask((()=>{throw r}))}}}const d=function(t){return h(this,t,!1)},_=function(t){return h(this,t,!0)};function v(e,n){if(!e)return!1;let r=!0;n&&void 0!==n.useG&&(r=n.useG);const f=n&&n.vh;let h=!0;n&&void 0!==n.chkDup&&(h=n.chkDup);let v=!1;n&&void 0!==n.rt&&(v=n.rt);let g=e;for(;g&&!g.hasOwnProperty(o);)g=$o(g);if(!g&&e[o]&&(g=e),!g)return!1;if(g[u])return!1;const y=n&&n.eventNameToString,E={},T=g[u]=g[o],m=g[ci(i)]=g[i],b=g[ci(a)]=g[a],S=g[ci(s)]=g[s];let O;function R(t,e){return!Ii&&"object"==typeof t&&t?!!t.capture:Ii&&e?"boolean"==typeof t?{capture:t,passive:!0}:t?"object"==typeof t&&!1!==t.passive?Object.assign(Object.assign({},t),{passive:!0}):t:{passive:!0}:t}n&&n.prepend&&(O=g[ci(n.prepend)]=g[n.prepend]);const w=function(t){return O.call(E.target,E.eventName,t.invoke,E.options)},P=r?function(t){if(!E.isExisting)return T.call(E.target,E.eventName,E.capture?_:d,E.options)}:function(t){return T.call(E.target,E.eventName,t.invoke,E.options)},L=r?function(t){if(!t.isRemoved){const e=xi[t.eventName];let n;e&&(n=e[t.capture?oi:ii]);const r=n&&t.target[n];if(r)for(let e=0;e<r.length;e++){if(r[e]===t){r.splice(e,1),t.isRemoved=!0,0===r.length&&(t.allRemoved=!0,t.target[n]=null);break}}}if(t.allRemoved)return m.call(t.target,t.eventName,t.capture?_:d,t.options)}:function(t){return m.call(t.target,t.eventName,t.invoke,t.options)},A=n&&n.diff?n.diff:function(t,e){const n=typeof e;return"function"===n&&t.callback===e||"object"===n&&t.originalDelegate===e},C=Zone[ci("UNPATCHED_EVENTS")],k=t[ci("PASSIVE_EVENTS")],I=function(e,o,i,a,s=!1,u=!1){return function(){const c=this||t;let l=arguments[0];n&&n.transferEventName&&(l=n.transferEventName(l));let p=arguments[1];if(!p)return e.apply(this,arguments);if(vi&&"uncaughtException"===l)return e.apply(this,arguments);let d=!1;if("function"!=typeof p){if(!p.handleEvent)return e.apply(this,arguments);d=!0}if(f&&!f(e,p,c,arguments))return;const _=Ii&&!!k&&-1!==k.indexOf(l),v=R(arguments[2],_);if(C)for(let t=0;t<C.length;t++)if(l===C[t])return _?e.call(c,l,p,v):e.apply(this,arguments);const g=!!v&&("boolean"==typeof v||v.capture),T=!(!v||"object"!=typeof v)&&v.once,m=Zone.current;let b=xi[l];b||(Ui(l,y),b=xi[l]);const S=b[g?oi:ii];let O,w=c[S],P=!1;if(w){if(P=!0,h)for(let t=0;t<w.length;t++)if(A(w[t],p))return}else w=c[S]=[];const L=c.constructor.name,I=Di[L];I&&(O=I[l]),O||(O=L+o+(y?y(l):l)),E.options=v,T&&(E.options.once=!1),E.target=c,E.capture=g,E.eventName=l,E.isExisting=P;const N=r?Ni:void 0;N&&(N.taskData=E);const x=m.scheduleEventTask(O,p,N,i,a);return E.target=null,N&&(N.taskData=null),T&&(v.once=!0),(Ii||"boolean"!=typeof x.options)&&(x.options=v),x.target=c,x.capture=g,x.eventName=l,d&&(x.originalDelegate=p),u?w.unshift(x):w.push(x),s?c:void 0}};return g[o]=I(T,c,P,L,v),O&&(g[l]=I(O,p,w,L,v,!0)),g[i]=function(){const e=this||t;let r=arguments[0];n&&n.transferEventName&&(r=n.transferEventName(r));const o=arguments[2],i=!!o&&("boolean"==typeof o||o.capture),a=arguments[1];if(!a)return m.apply(this,arguments);if(f&&!f(m,a,e,arguments))return;const s=xi[r];let u;s&&(u=s[i?oi:ii]);const c=u&&e[u];if(c)for(let t=0;t<c.length;t++){const n=c[t];if(A(n,a)){if(c.splice(t,1),n.isRemoved=!0,0===c.length&&(n.allRemoved=!0,e[u]=null,"string"==typeof r)){e[ai+"ON_PROPERTY"+r]=null}return n.zone.cancelTask(n),v?e:void 0}}return m.apply(this,arguments)},g[a]=function(){const e=this||t;let r=arguments[0];n&&n.transferEventName&&(r=n.transferEventName(r));const o=[],i=Bi(e,y?y(r):r);for(let t=0;t<i.length;t++){const e=i[t];let n=e.originalDelegate?e.originalDelegate:e.callback;o.push(n)}return o},g[s]=function(){const e=this||t;let r=arguments[0];if(r){n&&n.transferEventName&&(r=n.transferEventName(r));const t=xi[r];if(t){const n=t[ii],o=t[oi],a=e[n],s=e[o];if(a){const t=a.slice();for(let e=0;e<t.length;e++){const n=t[e];let o=n.originalDelegate?n.originalDelegate:n.callback;this[i].call(this,r,o,n.options)}}if(s){const t=s.slice();for(let e=0;e<t.length;e++){const n=t[e];let o=n.originalDelegate?n.originalDelegate:n.callback;this[i].call(this,r,o,n.options)}}}}else{const t=Object.keys(e);for(let e=0;e<t.length;e++){const n=t[e],r=Mi.exec(n);let o=r&&r[1];o&&"removeListener"!==o&&this[s].call(this,o)}this[s].call(this,"removeListener")}if(v)return this},Pi(g[o],T),Pi(g[i],m),S&&Pi(g[s],S),b&&Pi(g[a],b),!0}let g=[];for(let t=0;t<n.length;t++)g[t]=v(n[t],r);return g}function Bi(t,e){if(!e){const n=[];for(let r in t){const o=Mi.exec(r);let i=o&&o[1];if(i&&(!e||i===e)){const e=t[r];if(e)for(let t=0;t<e.length;t++)n.push(e[t])}}return n}let n=xi[e];n||(Ui(e),n=xi[e]);const r=t[n[ii]],o=t[n[oi]];return r?o?r.concat(o):r.slice():o?o.slice():[]}function Hi(t,e){const n=t.Event;n&&n.prototype&&e.patchMethod(n.prototype,"stopImmediatePropagation",(t=>function(e,n){e[ji]=!0,t&&t.apply(e,n)}))}
45
+ let Bi=!1;if("undefined"!=typeof window)try{const t=Object.defineProperty({},"passive",{get:function(){Bi=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){Bi=!1}const Hi={useG:!0},zi={},Fi={},Gi=new RegExp("^"+hi+"(\\w+)(true|false)$"),Xi=vi("propagationStopped");function Vi(t,e){const n=(e?e(t):t)+fi,r=(e?e(t):t)+pi,o=hi+n,i=hi+r;zi[t]={},zi[t][fi]=o,zi[t][pi]=i}function qi(t,e,n,r){const o=r&&r.add||si,i=r&&r.rm||ui,a=r&&r.listeners||"eventListeners",s=r&&r.rmAll||"removeAllListeners",u=vi(o),c="."+o+":",l="prependListener",p="."+l+":",f=function(t,e,n){if(t.isRemoved)return;const r=t.callback;let o;"object"==typeof r&&r.handleEvent&&(t.callback=t=>r.handleEvent(t),t.originalDelegate=r);try{t.invoke(t,e,[n])}catch(t){o=t}const a=t.options;if(a&&"object"==typeof a&&a.once){const r=t.originalDelegate?t.originalDelegate:t.callback;e[i].call(e,n.type,r,a)}return o};function h(n,r,o){if(!(r=r||t.event))return;const i=n||r.target||t,a=i[zi[r.type][o?pi:fi]];if(a){const t=[];if(1===a.length){const e=f(a[0],i,r);e&&t.push(e)}else{const e=a.slice();for(let n=0;n<e.length&&(!r||!0!==r[Xi]);n++){const o=f(e[n],i,r);o&&t.push(o)}}if(1===t.length)throw t[0];for(let n=0;n<t.length;n++){const r=t[n];e.nativeScheduleMicroTask((()=>{throw r}))}}}const d=function(t){return h(this,t,!1)},_=function(t){return h(this,t,!0)};function v(e,n){if(!e)return!1;let r=!0;n&&void 0!==n.useG&&(r=n.useG);const f=n&&n.vh;let h=!0;n&&void 0!==n.chkDup&&(h=n.chkDup);let v=!1;n&&void 0!==n.rt&&(v=n.rt);let g=e;for(;g&&!g.hasOwnProperty(o);)g=oi(g);if(!g&&e[o]&&(g=e),!g)return!1;if(g[u])return!1;const y=n&&n.eventNameToString,E={},T=g[u]=g[o],m=g[vi(i)]=g[i],b=g[vi(a)]=g[a],S=g[vi(s)]=g[s];let O;n&&n.prepend&&(O=g[vi(n.prepend)]=g[n.prepend]);const R=function(t){return O.call(E.target,E.eventName,t.invoke,E.options)},w=r?function(t){if(!E.isExisting)return T.call(E.target,E.eventName,E.capture?_:d,E.options)}:function(t){return T.call(E.target,E.eventName,t.invoke,E.options)},P=r?function(t){if(!t.isRemoved){const e=zi[t.eventName];let n;e&&(n=e[t.capture?pi:fi]);const r=n&&t.target[n];if(r)for(let e=0;e<r.length;e++){if(r[e]===t){r.splice(e,1),t.isRemoved=!0,0===r.length&&(t.allRemoved=!0,t.target[n]=null);break}}}if(t.allRemoved)return m.call(t.target,t.eventName,t.capture?_:d,t.options)}:function(t){return m.call(t.target,t.eventName,t.invoke,t.options)},L=n&&n.diff?n.diff:function(t,e){const n=typeof e;return"function"===n&&t.callback===e||"object"===n&&t.originalDelegate===e},A=Zone[vi("UNPATCHED_EVENTS")],C=t[vi("PASSIVE_EVENTS")],k=function(e,o,i,a,s=!1,u=!1){return function(){const c=this||t;let l=arguments[0];n&&n.transferEventName&&(l=n.transferEventName(l));let p=arguments[1];if(!p)return e.apply(this,arguments);if(Oi&&"uncaughtException"===l)return e.apply(this,arguments);let d=!1;if("function"!=typeof p){if(!p.handleEvent)return e.apply(this,arguments);d=!0}if(f&&!f(e,p,c,arguments))return;const _=Bi&&!!C&&-1!==C.indexOf(l),v=function(t,e){return!Bi&&"object"==typeof t&&t?!!t.capture:Bi&&e?"boolean"==typeof t?{capture:t,passive:!0}:t?"object"==typeof t&&!1!==t.passive?Object.assign(Object.assign({},t),{passive:!0}):t:{passive:!0}:t}(arguments[2],_);if(A)for(let t=0;t<A.length;t++)if(l===A[t])return _?e.call(c,l,p,v):e.apply(this,arguments);const g=!!v&&("boolean"==typeof v||v.capture),T=!(!v||"object"!=typeof v)&&v.once,m=Zone.current;let b=zi[l];b||(Vi(l,y),b=zi[l]);const S=b[g?pi:fi];let O,R=c[S],w=!1;if(R){if(w=!0,h)for(let t=0;t<R.length;t++)if(L(R[t],p))return}else R=c[S]=[];const P=c.constructor.name,k=Fi[P];k&&(O=k[l]),O||(O=P+o+(y?y(l):l)),E.options=v,T&&(E.options.once=!1),E.target=c,E.capture=g,E.eventName=l,E.isExisting=w;const I=r?Hi:void 0;I&&(I.taskData=E);const N=m.scheduleEventTask(O,p,I,i,a);return E.target=null,I&&(I.taskData=null),T&&(v.once=!0),(Bi||"boolean"!=typeof N.options)&&(N.options=v),N.target=c,N.capture=g,N.eventName=l,d&&(N.originalDelegate=p),u?R.unshift(N):R.push(N),s?c:void 0}};return g[o]=k(T,c,w,P,v),O&&(g[l]=k(O,p,R,P,v,!0)),g[i]=function(){const e=this||t;let r=arguments[0];n&&n.transferEventName&&(r=n.transferEventName(r));const o=arguments[2],i=!!o&&("boolean"==typeof o||o.capture),a=arguments[1];if(!a)return m.apply(this,arguments);if(f&&!f(m,a,e,arguments))return;const s=zi[r];let u;s&&(u=s[i?pi:fi]);const c=u&&e[u];if(c)for(let t=0;t<c.length;t++){const n=c[t];if(L(n,a)){if(c.splice(t,1),n.isRemoved=!0,0===c.length&&(n.allRemoved=!0,e[u]=null,"string"==typeof r)){e[hi+"ON_PROPERTY"+r]=null}return n.zone.cancelTask(n),v?e:void 0}}return m.apply(this,arguments)},g[a]=function(){const e=this||t;let r=arguments[0];n&&n.transferEventName&&(r=n.transferEventName(r));const o=[],i=Wi(e,y?y(r):r);for(let t=0;t<i.length;t++){const e=i[t];let n=e.originalDelegate?e.originalDelegate:e.callback;o.push(n)}return o},g[s]=function(){const e=this||t;let r=arguments[0];if(r){n&&n.transferEventName&&(r=n.transferEventName(r));const t=zi[r];if(t){const n=t[fi],o=t[pi],a=e[n],s=e[o];if(a){const t=a.slice();for(let e=0;e<t.length;e++){const n=t[e];let o=n.originalDelegate?n.originalDelegate:n.callback;this[i].call(this,r,o,n.options)}}if(s){const t=s.slice();for(let e=0;e<t.length;e++){const n=t[e];let o=n.originalDelegate?n.originalDelegate:n.callback;this[i].call(this,r,o,n.options)}}}}else{const t=Object.keys(e);for(let e=0;e<t.length;e++){const n=t[e],r=Gi.exec(n);let o=r&&r[1];o&&"removeListener"!==o&&this[s].call(this,o)}this[s].call(this,"removeListener")}if(v)return this},Di(g[o],T),Di(g[i],m),S&&Di(g[s],S),b&&Di(g[a],b),!0}let g=[];for(let t=0;t<n.length;t++)g[t]=v(n[t],r);return g}function Wi(t,e){if(!e){const n=[];for(let r in t){const o=Gi.exec(r);let i=o&&o[1];if(i&&(!e||i===e)){const e=t[r];if(e)for(let t=0;t<e.length;t++)n.push(e[t])}}return n}let n=zi[e];n||(Vi(e),n=zi[e]);const r=t[n[fi]],o=t[n[pi]];return r?o?r.concat(o):r.slice():o?o.slice():[]}function Ki(t,e){const n=t.Event;n&&n.prototype&&e.patchMethod(n.prototype,"stopImmediatePropagation",(t=>function(e,n){e[Xi]=!0,t&&t.apply(e,n)}))}
46
46
  /**
47
47
  * @license
48
48
  * Copyright Google LLC All Rights Reserved.
49
49
  *
50
50
  * Use of this source code is governed by an MIT-style license that can be
51
51
  * found in the LICENSE file at https://angular.io/license
52
- */function zi(t,e,n,r,o){const i=Zone.__symbol__(r);if(e[i])return;const a=e[i]=e[r];e[r]=function(i,s,u){return s&&s.prototype&&o.forEach((function(e){const o=`${n}.${r}::`+e,i=s.prototype;try{if(i.hasOwnProperty(e)){const n=t.ObjectGetOwnPropertyDescriptor(i,e);n&&n.value?(n.value=t.wrapWithCurrentZone(n.value,o),t._redefineProperty(s.prototype,e,n)):i[e]&&(i[e]=t.wrapWithCurrentZone(i[e],o))}else i[e]&&(i[e]=t.wrapWithCurrentZone(i[e],o))}catch(t){}})),a.call(e,i,s,u)},t.attachOriginToPatched(e[r],a)}
52
+ */function Yi(t,e,n,r,o){const i=Zone.__symbol__(r);if(e[i])return;const a=e[i]=e[r];e[r]=function(i,s,u){return s&&s.prototype&&o.forEach((function(e){const o=`${n}.${r}::`+e,i=s.prototype;try{if(i.hasOwnProperty(e)){const n=t.ObjectGetOwnPropertyDescriptor(i,e);n&&n.value?(n.value=t.wrapWithCurrentZone(n.value,o),t._redefineProperty(s.prototype,e,n)):i[e]&&(i[e]=t.wrapWithCurrentZone(i[e],o))}else i[e]&&(i[e]=t.wrapWithCurrentZone(i[e],o))}catch(t){}})),a.call(e,i,s,u)},t.attachOriginToPatched(e[r],a)}
53
53
  /**
54
54
  * @license
55
55
  * Copyright Google LLC All Rights Reserved.
56
56
  *
57
57
  * Use of this source code is governed by an MIT-style license that can be
58
58
  * found in the LICENSE file at https://angular.io/license
59
- */function Fi(t,e,n){if(!n||0===n.length)return e;const r=n.filter((e=>e.target===t));if(!r||0===r.length)return e;const o=r[0].ignoreProperties;return e.filter((t=>-1===o.indexOf(t)))}function Gi(t,e,n,r){if(!t)return;bi(t,Fi(t,e,n),r)}function Xi(t){return Object.getOwnPropertyNames(t).filter((t=>t.startsWith("on")&&t.length>2)).map((t=>t.substring(2)))}function Vi(t,e){if(vi&&!yi)return;if(Zone[t.symbol("patchEvents")])return;const n=e.__Zone_ignore_on_properties;let r=[];if(gi){const t=window;r=r.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);const e=Ci()?[{target:t,ignoreProperties:["error"]}]:[];Gi(t,Xi(t),n?n.concat(e):n,$o(t))}r=r.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let t=0;t<r.length;t++){const o=e[r[t]];o&&o.prototype&&Gi(o.prototype,Xi(o.prototype),n)}}
59
+ */function $i(t,e,n){if(!n||0===n.length)return e;const r=n.filter((e=>e.target===t));if(!r||0===r.length)return e;const o=r[0].ignoreProperties;return e.filter((t=>-1===o.indexOf(t)))}function Qi(t,e,n,r){if(!t)return;Ci(t,$i(t,e,n),r)}function Ji(t){return Object.getOwnPropertyNames(t).filter((t=>t.startsWith("on")&&t.length>2)).map((t=>t.substring(2)))}function ta(t,e){if(Oi&&!wi)return;if(Zone[t.symbol("patchEvents")])return;const n=e.__Zone_ignore_on_properties;let r=[];if(Ri){const t=window;r=r.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);const e=Ui()?[{target:t,ignoreProperties:["error"]}]:[];Qi(t,Ji(t),n?n.concat(e):n,oi(t))}r=r.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let t=0;t<r.length;t++){const o=e[r[t]];o&&o.prototype&&Qi(o.prototype,Ji(o.prototype),n)}}
60
60
  /**
61
61
  * @license
62
62
  * Copyright Google LLC All Rights Reserved.
63
63
  *
64
64
  * Use of this source code is governed by an MIT-style license that can be
65
65
  * found in the LICENSE file at https://angular.io/license
66
- */Zone.__load_patch("util",((t,e,n)=>{const r=Xi(t);n.patchOnProperties=bi,n.patchMethod=Ri,n.bindArguments=hi,n.patchMacroTask=wi;const o=e.__symbol__("BLACK_LISTED_EVENTS"),i=e.__symbol__("UNPATCHED_EVENTS");t[i]&&(t[o]=t[i]),t[o]&&(e[o]=e[i]=t[o]),n.patchEventPrototype=Hi,n.patchEventTarget=Zi,n.isIEOrEdge=ki,n.ObjectDefineProperty=Yo,n.ObjectGetOwnPropertyDescriptor=Ko,n.ObjectCreate=Qo,n.ArraySlice=Jo,n.patchClass=Oi,n.wrapWithCurrentZone=si,n.filterProperties=Fi,n.attachOriginToPatched=Pi,n._redefineProperty=Object.defineProperty,n.patchCallbacks=zi,n.getGlobalObjects=()=>({globalSources:Di,zoneSymbolEventNames:xi,eventNames:r,isBrowser:gi,isMix:yi,isNode:vi,TRUE_STR:oi,FALSE_STR:ii,ZONE_SYMBOL_PREFIX:ai,ADD_EVENT_LISTENER_STR:ti,REMOVE_EVENT_LISTENER_STR:ei})}));
66
+ */Zone.__load_patch("util",((t,e,n)=>{const r=Ji(t);n.patchOnProperties=Ci,n.patchMethod=Ni,n.bindArguments=mi,n.patchMacroTask=xi;const o=e.__symbol__("BLACK_LISTED_EVENTS"),i=e.__symbol__("UNPATCHED_EVENTS");t[i]&&(t[o]=t[i]),t[o]&&(e[o]=e[i]=t[o]),n.patchEventPrototype=Ki,n.patchEventTarget=qi,n.isIEOrEdge=Zi,n.ObjectDefineProperty=ri,n.ObjectGetOwnPropertyDescriptor=ni,n.ObjectCreate=ii,n.ArraySlice=ai,n.patchClass=Ii,n.wrapWithCurrentZone=di,n.filterProperties=$i,n.attachOriginToPatched=Di,n._redefineProperty=Object.defineProperty,n.patchCallbacks=Yi,n.getGlobalObjects=()=>({globalSources:Fi,zoneSymbolEventNames:zi,eventNames:r,isBrowser:Ri,isMix:wi,isNode:Oi,TRUE_STR:pi,FALSE_STR:fi,ZONE_SYMBOL_PREFIX:hi,ADD_EVENT_LISTENER_STR:si,REMOVE_EVENT_LISTENER_STR:ui})}));
67
67
  /**
68
68
  * @license
69
69
  * Copyright Google LLC All Rights Reserved.
@@ -71,7 +71,7 @@ let Ii=!1;if("undefined"!=typeof window)try{const t=Object.defineProperty({},"pa
71
71
  * Use of this source code is governed by an MIT-style license that can be
72
72
  * found in the LICENSE file at https://angular.io/license
73
73
  */
74
- const qi=ci("zoneTask");function Wi(t,e,n,r){let o=null,i=null;n+=r;const a={};function s(e){const n=e.data;return n.args[0]=function(){return e.invoke.apply(this,arguments)},n.handleId=o.apply(t,n.args),e}function u(e){return i.call(t,e.data.handleId)}o=Ri(t,e+=r,(n=>function(o,i){if("function"==typeof i[0]){const t={isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?i[1]||0:void 0,args:i},n=i[0];i[0]=function(){try{return n.apply(this,arguments)}finally{t.isPeriodic||("number"==typeof t.handleId?delete a[t.handleId]:t.handleId&&(t.handleId[qi]=null))}};const o=ui(e,i[0],t,s,u);if(!o)return o;const c=o.data.handleId;return"number"==typeof c?a[c]=o:c&&(c[qi]=o),c&&c.ref&&c.unref&&"function"==typeof c.ref&&"function"==typeof c.unref&&(o.ref=c.ref.bind(c),o.unref=c.unref.bind(c)),"number"==typeof c||c?c:o}return n.apply(t,i)})),i=Ri(t,n,(e=>function(n,r){const o=r[0];let i;"number"==typeof o?i=a[o]:(i=o&&o[qi],i||(i=o)),i&&"string"==typeof i.type?"notScheduled"!==i.state&&(i.cancelFn&&i.data.isPeriodic||0===i.runCount)&&("number"==typeof o?delete a[o]:o&&(o[qi]=null),i.zone.cancelTask(i)):e.apply(t,r)}))}
74
+ const ea=vi("zoneTask");function na(t,e,n,r){let o=null,i=null;n+=r;const a={};function s(e){const n=e.data;return n.args[0]=function(){return e.invoke.apply(this,arguments)},n.handleId=o.apply(t,n.args),e}function u(e){return i.call(t,e.data.handleId)}o=Ni(t,e+=r,(n=>function(o,i){if("function"==typeof i[0]){const t={isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?i[1]||0:void 0,args:i},n=i[0];i[0]=function(){try{return n.apply(this,arguments)}finally{t.isPeriodic||("number"==typeof t.handleId?delete a[t.handleId]:t.handleId&&(t.handleId[ea]=null))}};const o=_i(e,i[0],t,s,u);if(!o)return o;const c=o.data.handleId;return"number"==typeof c?a[c]=o:c&&(c[ea]=o),c&&c.ref&&c.unref&&"function"==typeof c.ref&&"function"==typeof c.unref&&(o.ref=c.ref.bind(c),o.unref=c.unref.bind(c)),"number"==typeof c||c?c:o}return n.apply(t,i)})),i=Ni(t,n,(e=>function(n,r){const o=r[0];let i;"number"==typeof o?i=a[o]:(i=o&&o[ea],i||(i=o)),i&&"string"==typeof i.type?"notScheduled"!==i.state&&(i.cancelFn&&i.data.isPeriodic||0===i.runCount)&&("number"==typeof o?delete a[o]:o&&(o[ea]=null),i.zone.cancelTask(i)):e.apply(t,r)}))}
75
75
  /**
76
76
  * @license
77
77
  * Copyright Google LLC All Rights Reserved.
@@ -86,7 +86,7 @@ const qi=ci("zoneTask");function Wi(t,e,n,r){let o=null,i=null;n+=r;const a={};f
86
86
  * Use of this source code is governed by an MIT-style license that can be
87
87
  * found in the LICENSE file at https://angular.io/license
88
88
  */
89
- function Ki(t,e){if(Zone[e.symbol("patchEventTarget")])return;const{eventNames:n,zoneSymbolEventNames:r,TRUE_STR:o,FALSE_STR:i,ZONE_SYMBOL_PREFIX:a}=e.getGlobalObjects();for(let t=0;t<n.length;t++){const e=n[t],s=a+(e+i),u=a+(e+o);r[e]={},r[e][i]=s,r[e][o]=u}const s=t.EventTarget;return s&&s.prototype?(e.patchEventTarget(t,e,[s&&s.prototype]),!0):void 0}function Yi(t,e,n){$i(t,n instanceof Error?0:n.status)}function $i(t,e){if(null==e)return;(0===e||e>=400&&e<600)&&t.setStatus({code:wt.ERROR})}function Qi(t){return(e,n,r)=>{Yi(e,0,r),null==t||t(e,n,r)}}function Ji(t){return(e,n)=>{!function(t,e){$i(t,e.status)}(e,n),null==t||t(e,n)}}function ta(t={}){var e;return"true"===(null===(e=t.attributes)||void 0===e?void 0:e.isSampled)?Vr.RECORD_AND_SAMPLED:Vr.NOT_RECORD}
89
+ function ra(t,e){if(Zone[e.symbol("patchEventTarget")])return;const{eventNames:n,zoneSymbolEventNames:r,TRUE_STR:o,FALSE_STR:i,ZONE_SYMBOL_PREFIX:a}=e.getGlobalObjects();for(let t=0;t<n.length;t++){const e=n[t],s=a+(e+i),u=a+(e+o);r[e]={},r[e][i]=s,r[e][o]=u}const s=t.EventTarget;return s&&s.prototype?(e.patchEventTarget(t,e,[s&&s.prototype]),!0):void 0}function oa(t={}){var e;return"true"===(null===(e=t.attributes)||void 0===e?void 0:e.isSampled)?Kr.RECORD_AND_SAMPLED:Kr.NOT_RECORD}
90
90
  /**
91
91
  * @license
92
92
  * Copyright Google LLC All Rights Reserved.
@@ -94,4 +94,4 @@ function Ki(t,e){if(Zone[e.symbol("patchEventTarget")])return;const{eventNames:n
94
94
  * Use of this source code is governed by an MIT-style license that can be
95
95
  * found in the LICENSE file at https://angular.io/license
96
96
  */
97
- Zone.__load_patch("legacy",(t=>{const e=t[Zone.__symbol__("legacyPatch")];e&&e()})),Zone.__load_patch("queueMicrotask",((t,e,n)=>{n.patchMethod(t,"queueMicrotask",(t=>function(t,n){e.current.scheduleMicroTask("queueMicrotask",n[0])}))})),Zone.__load_patch("timers",(t=>{const e="set",n="clear";Wi(t,e,n,"Timeout"),Wi(t,e,n,"Interval"),Wi(t,e,n,"Immediate")})),Zone.__load_patch("requestAnimationFrame",(t=>{Wi(t,"request","cancel","AnimationFrame"),Wi(t,"mozRequest","mozCancel","AnimationFrame"),Wi(t,"webkitRequest","webkitCancel","AnimationFrame")})),Zone.__load_patch("blocking",((t,e)=>{const n=["alert","prompt","confirm"];for(let r=0;r<n.length;r++){Ri(t,n[r],((n,r,o)=>function(r,i){return e.current.run(n,t,i,o)}))}})),Zone.__load_patch("EventTarget",((t,e,n)=>{!function(t,e){e.patchEventPrototype(t,e)}(t,n),Ki(t,n);const r=t.XMLHttpRequestEventTarget;r&&r.prototype&&n.patchEventTarget(t,n,[r.prototype])})),Zone.__load_patch("MutationObserver",((t,e,n)=>{Oi("MutationObserver"),Oi("WebKitMutationObserver")})),Zone.__load_patch("IntersectionObserver",((t,e,n)=>{Oi("IntersectionObserver")})),Zone.__load_patch("FileReader",((t,e,n)=>{Oi("FileReader")})),Zone.__load_patch("on_property",((t,e,n)=>{Vi(n,t)})),Zone.__load_patch("customElements",((t,e,n)=>{!function(t,e){const{isBrowser:n,isMix:r}=e.getGlobalObjects();if(!n&&!r||!t.customElements||!("customElements"in t))return;e.patchCallbacks(e,t.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(t,n)})),Zone.__load_patch("XHR",((t,e)=>{!function(t){const u=t.XMLHttpRequest;if(!u)return;const c=u.prototype;let l=c[ni],p=c[ri];if(!l){const e=t.XMLHttpRequestEventTarget;if(e){const t=e.prototype;l=t[ni],p=t[ri]}}const f="readystatechange",h="scheduled";function d(t){const r=t.data,a=r.target;a[i]=!1,a[s]=!1;const u=a[o];l||(l=a[ni],p=a[ri]),u&&p.call(a,f,u);const c=a[o]=()=>{if(a.readyState===a.DONE)if(!r.aborted&&a[i]&&t.state===h){const n=a[e.__symbol__("loadfalse")];if(0!==a.status&&n&&n.length>0){const o=t.invoke;t.invoke=function(){const n=a[e.__symbol__("loadfalse")];for(let e=0;e<n.length;e++)n[e]===t&&n.splice(e,1);r.aborted||t.state!==h||o.call(t)},n.push(t)}else t.invoke()}else r.aborted||!1!==a[i]||(a[s]=!0)};l.call(a,f,c);return a[n]||(a[n]=t),T.apply(a,r.args),a[i]=!0,t}function _(){}function v(t){const e=t.data;return e.aborted=!0,m.apply(e.target,e.args)}const g=Ri(c,"open",(()=>function(t,e){return t[r]=0==e[2],t[a]=e[1],g.apply(t,e)})),y=ci("fetchTaskAborting"),E=ci("fetchTaskScheduling"),T=Ri(c,"send",(()=>function(t,n){if(!0===e.current[E])return T.apply(t,n);if(t[r])return T.apply(t,n);{const e={target:t,url:t[a],isPeriodic:!1,args:n,aborted:!1},r=ui("XMLHttpRequest.send",_,e,d,v);t&&!0===t[s]&&!e.aborted&&r.state===h&&r.invoke()}})),m=Ri(c,"abort",(()=>function(t,r){const o=t[n];if(o&&"string"==typeof o.type){if(null==o.cancelFn||o.data&&o.data.aborted)return;o.zone.cancelTask(o)}else if(!0===e.current[y])return m.apply(t,r)}))}(t);const n=ci("xhrTask"),r=ci("xhrSync"),o=ci("xhrListener"),i=ci("xhrScheduled"),a=ci("xhrURL"),s=ci("xhrErrorBeforeScheduled")})),Zone.__load_patch("geolocation",(t=>{t.navigator&&t.navigator.geolocation&&function(t,e){const n=t.constructor.name;for(let r=0;r<e.length;r++){const o=e[r],i=t[o];if(i){if(!di(Ko(t,o)))continue;t[o]=(t=>{const e=function(){return t.apply(this,hi(arguments,n+"."+o))};return Pi(e,t),e})(i)}}}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])})),Zone.__load_patch("PromiseRejectionEvent",((t,e)=>{function n(e){return function(n){Bi(t,e).forEach((r=>{const o=t.PromiseRejectionEvent;if(o){const t=new o(e,{promise:n.promise,reason:n.rejection});r.invoke(t)}}))}}t.PromiseRejectionEvent&&(e[ci("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),e[ci("rejectionHandledHandler")]=n("rejectionhandled"))}));class ea extends e.BaseInstrumentation{constructor(t={}){super(),this.options=t,this.name="@grafana/faro-web-tracing",this.version=e.VERSION}initialize(){var t,e,n,r,o,i,a,s,u;const c=this.options,l={};this.config.app.name&&(l[tn]=this.config.app.name),this.config.app.namespace&&(l["service.namespace"]=this.config.app.namespace),this.config.app.version&&(l["service.version"]=this.config.app.version),this.config.app.environment&&(l["deployment.environment"]=this.config.app.environment),Object.assign(l,c.resourceAttributes);const p=mr.default().merge(new mr(l)),f=new Po({resource:p,sampler:{shouldSample:()=>({decision:ta(this.api.getSession())})}});f.addSpanProcessor(null!==(t=c.spanProcessor)&&void 0!==t?t:new Rr(new co(new Or({api:this.api}),{scheduledDelayMillis:ea.SCHEDULED_BATCH_DELAY_MS,maxExportBatchSize:30}),this.metas)),f.register({propagator:null!==(e=c.propagator)&&void 0!==e?e:new An,contextManager:null!==(n=c.contextManager)&&void 0!==n?n:new Wo}),function(t){var e,n,r=t.tracerProvider||qt.getTracerProvider(),o=t.meterProvider||Dt.getMeterProvider(),i=t.loggerProvider||Ir.getLoggerProvider(),a=null!==(n=null===(e=t.instrumentations)||void 0===e?void 0:e.flat())&&void 0!==n?n:[];(function(t,e,n,r){for(var o=0,i=t.length;o<i;o++){var a=t[o];e&&a.setTracerProvider(e),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}})(a,r,o,i)}({instrumentations:null!==(r=c.instrumentations)&&void 0!==r?r:Vo({ignoreUrls:this.getIgnoreUrls(),propagateTraceHeaderCorsUrls:null===(o=this.options.instrumentationOptions)||void 0===o?void 0:o.propagateTraceHeaderCorsUrls,fetchInstrumentationOptions:{applyCustomAttributesOnSpan:Qi(null===(a=null===(i=this.options.instrumentationOptions)||void 0===i?void 0:i.fetchInstrumentationOptions)||void 0===a?void 0:a.applyCustomAttributesOnSpan)},xhrInstrumentationOptions:{applyCustomAttributesOnSpan:Ji(null===(u=null===(s=this.options.instrumentationOptions)||void 0===s?void 0:s.xhrInstrumentationOptions)||void 0===u?void 0:u.applyCustomAttributesOnSpan)}})}),this.api.initOTEL(qt,kt)}getIgnoreUrls(){return this.transports.transports.flatMap((t=>t.getIgnoreUrls()))}}return ea.SCHEDULED_BATCH_DELAY_MS=1e3,t.FaroSessionSpanProcessor=Rr,t.FaroTraceExporter=Or,t.TracingInstrumentation=ea,t.fetchCustomAttributeFunctionWithDefaults=Qi,t.getDefaultOTELInstrumentations=Vo,t.getSamplingDecision=ta,t.setSpanStatusOnFetchError=Yi,t}({},GrafanaFaroWebSdk);
97
+ Zone.__load_patch("legacy",(t=>{const e=t[Zone.__symbol__("legacyPatch")];e&&e()})),Zone.__load_patch("queueMicrotask",((t,e,n)=>{n.patchMethod(t,"queueMicrotask",(t=>function(t,n){e.current.scheduleMicroTask("queueMicrotask",n[0])}))})),Zone.__load_patch("timers",(t=>{const e="set",n="clear";na(t,e,n,"Timeout"),na(t,e,n,"Interval"),na(t,e,n,"Immediate")})),Zone.__load_patch("requestAnimationFrame",(t=>{na(t,"request","cancel","AnimationFrame"),na(t,"mozRequest","mozCancel","AnimationFrame"),na(t,"webkitRequest","webkitCancel","AnimationFrame")})),Zone.__load_patch("blocking",((t,e)=>{const n=["alert","prompt","confirm"];for(let r=0;r<n.length;r++){Ni(t,n[r],((n,r,o)=>function(r,i){return e.current.run(n,t,i,o)}))}})),Zone.__load_patch("EventTarget",((t,e,n)=>{!function(t,e){e.patchEventPrototype(t,e)}(t,n),ra(t,n);const r=t.XMLHttpRequestEventTarget;r&&r.prototype&&n.patchEventTarget(t,n,[r.prototype])})),Zone.__load_patch("MutationObserver",((t,e,n)=>{Ii("MutationObserver"),Ii("WebKitMutationObserver")})),Zone.__load_patch("IntersectionObserver",((t,e,n)=>{Ii("IntersectionObserver")})),Zone.__load_patch("FileReader",((t,e,n)=>{Ii("FileReader")})),Zone.__load_patch("on_property",((t,e,n)=>{ta(n,t)})),Zone.__load_patch("customElements",((t,e,n)=>{!function(t,e){const{isBrowser:n,isMix:r}=e.getGlobalObjects();if(!n&&!r||!t.customElements||!("customElements"in t))return;e.patchCallbacks(e,t.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(t,n)})),Zone.__load_patch("XHR",((t,e)=>{!function(t){const u=t.XMLHttpRequest;if(!u)return;const c=u.prototype;let l=c[ci],p=c[li];if(!l){const e=t.XMLHttpRequestEventTarget;if(e){const t=e.prototype;l=t[ci],p=t[li]}}const f="readystatechange",h="scheduled";function d(t){const r=t.data,a=r.target;a[i]=!1,a[s]=!1;const u=a[o];l||(l=a[ci],p=a[li]),u&&p.call(a,f,u);const c=a[o]=()=>{if(a.readyState===a.DONE)if(!r.aborted&&a[i]&&t.state===h){const n=a[e.__symbol__("loadfalse")];if(0!==a.status&&n&&n.length>0){const o=t.invoke;t.invoke=function(){const n=a[e.__symbol__("loadfalse")];for(let e=0;e<n.length;e++)n[e]===t&&n.splice(e,1);r.aborted||t.state!==h||o.call(t)},n.push(t)}else t.invoke()}else r.aborted||!1!==a[i]||(a[s]=!0)};l.call(a,f,c);return a[n]||(a[n]=t),T.apply(a,r.args),a[i]=!0,t}function _(){}function v(t){const e=t.data;return e.aborted=!0,m.apply(e.target,e.args)}const g=Ni(c,"open",(()=>function(t,e){return t[r]=0==e[2],t[a]=e[1],g.apply(t,e)})),y=vi("fetchTaskAborting"),E=vi("fetchTaskScheduling"),T=Ni(c,"send",(()=>function(t,n){if(!0===e.current[E])return T.apply(t,n);if(t[r])return T.apply(t,n);{const e={target:t,url:t[a],isPeriodic:!1,args:n,aborted:!1},r=_i("XMLHttpRequest.send",_,e,d,v);t&&!0===t[s]&&!e.aborted&&r.state===h&&r.invoke()}})),m=Ni(c,"abort",(()=>function(t,r){const o=t[n];if(o&&"string"==typeof o.type){if(null==o.cancelFn||o.data&&o.data.aborted)return;o.zone.cancelTask(o)}else if(!0===e.current[y])return m.apply(t,r)}))}(t);const n=vi("xhrTask"),r=vi("xhrSync"),o=vi("xhrListener"),i=vi("xhrScheduled"),a=vi("xhrURL"),s=vi("xhrErrorBeforeScheduled")})),Zone.__load_patch("geolocation",(t=>{t.navigator&&t.navigator.geolocation&&function(t,e){const n=t.constructor.name;for(let r=0;r<e.length;r++){const o=e[r],i=t[o];if(i){if(!bi(ni(t,o)))continue;t[o]=(t=>{const e=function(){return t.apply(this,mi(arguments,n+"."+o))};return Di(e,t),e})(i)}}}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])})),Zone.__load_patch("PromiseRejectionEvent",((t,e)=>{function n(e){return function(n){Wi(t,e).forEach((r=>{const o=t.PromiseRejectionEvent;if(o){const t=new o(e,{promise:n.promise,reason:n.rejection});r.invoke(t)}}))}}t.PromiseRejectionEvent&&(e[vi("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),e[vi("rejectionHandledHandler")]=n("rejectionhandled"))}));class ia extends e.BaseInstrumentation{constructor(t={}){super(),this.options=t,this.name="@grafana/faro-web-tracing",this.version=e.VERSION}initialize(){var t,e,n,r,o;const i=this.options,a={};this.config.app.name&&(a[en]=this.config.app.name),this.config.app.namespace&&(a["service.namespace"]=this.config.app.namespace),this.config.app.version&&(a["service.version"]=this.config.app.version),this.config.app.environment&&(a["deployment.environment"]=this.config.app.environment),Object.assign(a,i.resourceAttributes);const s=Or.default().merge(new Or(a)),u=new ko({resource:s,sampler:{shouldSample:()=>({decision:oa(this.api.getSession())})}});u.addSpanProcessor(null!==(t=i.spanProcessor)&&void 0!==t?t:new Lr(new ho(new Pr({api:this.api}),{scheduledDelayMillis:ia.SCHEDULED_BATCH_DELAY_MS,maxExportBatchSize:30}),this.metas)),u.register({propagator:null!==(e=i.propagator)&&void 0!==e?e:new Cn,contextManager:null!==(n=i.contextManager)&&void 0!==n?n:new ei});const{propagateTraceHeaderCorsUrls:c,fetchInstrumentationOptions:l,xhrInstrumentationOptions:p}=null!==(r=this.options.instrumentationOptions)&&void 0!==r?r:{};!function(t){var e,n,r=t.tracerProvider||qt.getTracerProvider(),o=t.meterProvider||Dt.getMeterProvider(),i=t.loggerProvider||Dr.getLoggerProvider(),a=null!==(n=null===(e=t.instrumentations)||void 0===e?void 0:e.flat())&&void 0!==n?n:[];(function(t,e,n,r){for(var o=0,i=t.length;o<i;o++){var a=t[o];e&&a.setTracerProvider(e),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}})(a,r,o,i)}({instrumentations:null!==(o=i.instrumentations)&&void 0!==o?o:Jo({ignoreUrls:this.getIgnoreUrls(),propagateTraceHeaderCorsUrls:c,fetchInstrumentationOptions:l,xhrInstrumentationOptions:p})}),this.api.initOTEL(qt,kt)}getIgnoreUrls(){return this.transports.transports.flatMap((t=>t.getIgnoreUrls()))}}return ia.SCHEDULED_BATCH_DELAY_MS=1e3,t.FaroSessionSpanProcessor=Lr,t.FaroTraceExporter=Pr,t.TracingInstrumentation=ia,t.fetchCustomAttributeFunctionWithDefaults=$o,t.getDefaultOTELInstrumentations=Jo,t.getSamplingDecision=oa,t.setSpanStatusOnFetchError=Ko,t}({},GrafanaFaroWebSdk);
@@ -24,8 +24,10 @@ export type DefaultInstrumentationsOptions = {
24
24
  propagateTraceHeaderCorsUrls?: MatchUrlDefinitions;
25
25
  fetchInstrumentationOptions?: {
26
26
  applyCustomAttributesOnSpan?: FetchCustomAttributeFunction;
27
+ ignoreNetworkEvents?: boolean;
27
28
  };
28
29
  xhrInstrumentationOptions?: {
29
30
  applyCustomAttributesOnSpan?: XHRCustomAttributeFunction;
31
+ ignoreNetworkEvents?: boolean;
30
32
  };
31
33
  };
@@ -25,17 +25,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
25
25
  exports.getDefaultOTELInstrumentations = void 0;
26
26
  var instrumentation_fetch_1 = require("@opentelemetry/instrumentation-fetch");
27
27
  var instrumentation_xml_http_request_1 = require("@opentelemetry/instrumentation-xml-http-request");
28
- var initialInstrumentationsOptions = {
29
- ignoreUrls: [],
30
- propagateTraceHeaderCorsUrls: [],
31
- };
28
+ var instrumentationUtils_1 = require("./instrumentationUtils");
32
29
  function getDefaultOTELInstrumentations(options) {
33
- if (options === void 0) { options = initialInstrumentationsOptions; }
30
+ if (options === void 0) { options = {}; }
34
31
  var fetchInstrumentationOptions = options.fetchInstrumentationOptions, xhrInstrumentationOptions = options.xhrInstrumentationOptions, sharedOptions = __rest(options, ["fetchInstrumentationOptions", "xhrInstrumentationOptions"]);
35
- return [
36
- new instrumentation_fetch_1.FetchInstrumentation(__assign(__assign({}, sharedOptions), fetchInstrumentationOptions)),
37
- new instrumentation_xml_http_request_1.XMLHttpRequestInstrumentation(__assign(__assign({}, sharedOptions), xhrInstrumentationOptions)),
38
- ];
32
+ var fetchOpts = createFetchInstrumentationOptions(fetchInstrumentationOptions, sharedOptions);
33
+ var xhrOpts = createXhrInstrumentationOptions(xhrInstrumentationOptions, sharedOptions);
34
+ return [new instrumentation_fetch_1.FetchInstrumentation(fetchOpts), new instrumentation_xml_http_request_1.XMLHttpRequestInstrumentation(xhrOpts)];
39
35
  }
40
36
  exports.getDefaultOTELInstrumentations = getDefaultOTELInstrumentations;
37
+ function createFetchInstrumentationOptions(fetchInstrumentationOptions, sharedOptions) {
38
+ return __assign(__assign(__assign(__assign({}, sharedOptions), { ignoreNetworkEvents: true }), fetchInstrumentationOptions), {
39
+ // always keep this function
40
+ applyCustomAttributesOnSpan: (0, instrumentationUtils_1.fetchCustomAttributeFunctionWithDefaults)(fetchInstrumentationOptions === null || fetchInstrumentationOptions === void 0 ? void 0 : fetchInstrumentationOptions.applyCustomAttributesOnSpan) });
41
+ }
42
+ function createXhrInstrumentationOptions(xhrInstrumentationOptions, sharedOptions) {
43
+ return __assign(__assign(__assign(__assign({}, sharedOptions), { ignoreNetworkEvents: true }), xhrInstrumentationOptions), {
44
+ // always keep this function
45
+ applyCustomAttributesOnSpan: (0, instrumentationUtils_1.xhrCustomAttributeFunctionWithDefaults)(xhrInstrumentationOptions === null || xhrInstrumentationOptions === void 0 ? void 0 : xhrInstrumentationOptions.applyCustomAttributesOnSpan) });
46
+ }
41
47
  //# sourceMappingURL=getDefaultOTELInstrumentations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDefaultOTELInstrumentations.js","sourceRoot":"","sources":["../../src/getDefaultOTELInstrumentations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8EAA4E;AAC5E,oGAAgG;AAIhG,IAAM,8BAA8B,GAAG;IACrC,UAAU,EAAE,EAAE;IACd,4BAA4B,EAAE,EAAE;CACjC,CAAC;AAEF,SAAgB,8BAA8B,CAC5C,OAAwE;IAAxE,wBAAA,EAAA,wCAAwE;IAEhE,IAAA,2BAA2B,GAAkD,OAAO,4BAAzD,EAAE,yBAAyB,GAAuB,OAAO,0BAA9B,EAAK,aAAa,UAAK,OAAO,EAAtF,4DAA4E,CAAF,CAAa;IAE7F,OAAO;QACL,IAAI,4CAAoB,uBAAM,aAAa,GAAK,2BAA2B,EAAG;QAC9E,IAAI,gEAA6B,uBAAM,aAAa,GAAK,yBAAyB,EAAG;KACtF,CAAC;AACJ,CAAC;AATD,wEASC","sourcesContent":["import { FetchInstrumentation } from '@opentelemetry/instrumentation-fetch';\nimport { XMLHttpRequestInstrumentation } from '@opentelemetry/instrumentation-xml-http-request';\n\nimport type { DefaultInstrumentationsOptions, InstrumentationOption } from './types';\n\nconst initialInstrumentationsOptions = {\n ignoreUrls: [],\n propagateTraceHeaderCorsUrls: [],\n};\n\nexport function getDefaultOTELInstrumentations(\n options: DefaultInstrumentationsOptions = initialInstrumentationsOptions\n): InstrumentationOption[] {\n const { fetchInstrumentationOptions, xhrInstrumentationOptions, ...sharedOptions } = options;\n\n return [\n new FetchInstrumentation({ ...sharedOptions, ...fetchInstrumentationOptions }),\n new XMLHttpRequestInstrumentation({ ...sharedOptions, ...xhrInstrumentationOptions }),\n ];\n}\n"]}
1
+ {"version":3,"file":"getDefaultOTELInstrumentations.js","sourceRoot":"","sources":["../../src/getDefaultOTELInstrumentations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8EAA4E;AAC5E,oGAAgG;AAEhG,+DAGgC;AAGhC,SAAgB,8BAA8B,CAAC,OAA4C;IAA5C,wBAAA,EAAA,YAA4C;IACjF,IAAA,2BAA2B,GAAkD,OAAO,4BAAzD,EAAE,yBAAyB,GAAuB,OAAO,0BAA9B,EAAK,aAAa,UAAK,OAAO,EAAtF,4DAA4E,CAAF,CAAa;IAE7F,IAAM,SAAS,GAAG,iCAAiC,CAAC,2BAA2B,EAAE,aAAa,CAAC,CAAC;IAChG,IAAM,OAAO,GAAG,+BAA+B,CAAC,yBAAyB,EAAE,aAAa,CAAC,CAAC;IAE1F,OAAO,CAAC,IAAI,4CAAoB,CAAC,SAAS,CAAC,EAAE,IAAI,gEAA6B,CAAC,OAAO,CAAC,CAAC,CAAC;AAC3F,CAAC;AAPD,wEAOC;AACD,SAAS,iCAAiC,CACxC,2BAA0F,EAC1F,aAAsC;IAEtC,+CACK,aAAa,KAChB,mBAAmB,EAAE,IAAI,KAEtB,2BAA2B;QAC9B,4BAA4B;QAC5B,2BAA2B,EAAE,IAAA,+DAAwC,EACnE,2BAA2B,aAA3B,2BAA2B,uBAA3B,2BAA2B,CAAE,2BAA2B,CACzD,IACD;AACJ,CAAC;AAED,SAAS,+BAA+B,CACtC,yBAAsF,EACtF,aAAsC;IAEtC,+CACK,aAAa,KAChB,mBAAmB,EAAE,IAAI,KAEtB,yBAAyB;QAC5B,4BAA4B;QAC5B,2BAA2B,EAAE,IAAA,6DAAsC,EACjE,yBAAyB,aAAzB,yBAAyB,uBAAzB,yBAAyB,CAAE,2BAA2B,CACvD,IACD;AACJ,CAAC","sourcesContent":["import { FetchInstrumentation } from '@opentelemetry/instrumentation-fetch';\nimport { XMLHttpRequestInstrumentation } from '@opentelemetry/instrumentation-xml-http-request';\n\nimport {\n fetchCustomAttributeFunctionWithDefaults,\n xhrCustomAttributeFunctionWithDefaults,\n} from './instrumentationUtils';\nimport type { DefaultInstrumentationsOptions, InstrumentationOption } from './types';\n\nexport function getDefaultOTELInstrumentations(options: DefaultInstrumentationsOptions = {}): InstrumentationOption[] {\n const { fetchInstrumentationOptions, xhrInstrumentationOptions, ...sharedOptions } = options;\n\n const fetchOpts = createFetchInstrumentationOptions(fetchInstrumentationOptions, sharedOptions);\n const xhrOpts = createXhrInstrumentationOptions(xhrInstrumentationOptions, sharedOptions);\n\n return [new FetchInstrumentation(fetchOpts), new XMLHttpRequestInstrumentation(xhrOpts)];\n}\nfunction createFetchInstrumentationOptions(\n fetchInstrumentationOptions: DefaultInstrumentationsOptions['fetchInstrumentationOptions'],\n sharedOptions: Record<string, unknown>\n) {\n return {\n ...sharedOptions,\n ignoreNetworkEvents: true,\n // keep this here to overwrite the defaults above if provided by the users\n ...fetchInstrumentationOptions,\n // always keep this function\n applyCustomAttributesOnSpan: fetchCustomAttributeFunctionWithDefaults(\n fetchInstrumentationOptions?.applyCustomAttributesOnSpan\n ),\n };\n}\n\nfunction createXhrInstrumentationOptions(\n xhrInstrumentationOptions: DefaultInstrumentationsOptions['xhrInstrumentationOptions'],\n sharedOptions: Record<string, unknown>\n) {\n return {\n ...sharedOptions,\n ignoreNetworkEvents: true,\n // keep this here to overwrite the defaults above if provided by the users\n ...xhrInstrumentationOptions,\n // always keep this function\n applyCustomAttributesOnSpan: xhrCustomAttributeFunctionWithDefaults(\n xhrInstrumentationOptions?.applyCustomAttributesOnSpan\n ),\n };\n}\n"]}
@@ -26,7 +26,6 @@ var semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
26
26
  var faro_web_sdk_1 = require("@grafana/faro-web-sdk");
27
27
  var faroTraceExporter_1 = require("./faroTraceExporter");
28
28
  var getDefaultOTELInstrumentations_1 = require("./getDefaultOTELInstrumentations");
29
- var instrumentationUtils_1 = require("./instrumentationUtils");
30
29
  var sampler_1 = require("./sampler");
31
30
  var sessionSpanProcessor_1 = require("./sessionSpanProcessor");
32
31
  // the providing of app name here is not great
@@ -44,7 +43,7 @@ var TracingInstrumentation = /** @class */ (function (_super) {
44
43
  }
45
44
  TracingInstrumentation.prototype.initialize = function () {
46
45
  var _this = this;
47
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
46
+ var _a, _b, _c, _d, _e;
48
47
  var options = this.options;
49
48
  var attributes = {};
50
49
  if (this.config.app.name) {
@@ -79,16 +78,13 @@ var TracingInstrumentation = /** @class */ (function (_super) {
79
78
  propagator: (_b = options.propagator) !== null && _b !== void 0 ? _b : new core_1.W3CTraceContextPropagator(),
80
79
  contextManager: (_c = options.contextManager) !== null && _c !== void 0 ? _c : new context_zone_1.ZoneContextManager(),
81
80
  });
81
+ var _f = (_d = this.options.instrumentationOptions) !== null && _d !== void 0 ? _d : {}, propagateTraceHeaderCorsUrls = _f.propagateTraceHeaderCorsUrls, fetchInstrumentationOptions = _f.fetchInstrumentationOptions, xhrInstrumentationOptions = _f.xhrInstrumentationOptions;
82
82
  (0, instrumentation_1.registerInstrumentations)({
83
- instrumentations: (_d = options.instrumentations) !== null && _d !== void 0 ? _d : (0, getDefaultOTELInstrumentations_1.getDefaultOTELInstrumentations)({
83
+ instrumentations: (_e = options.instrumentations) !== null && _e !== void 0 ? _e : (0, getDefaultOTELInstrumentations_1.getDefaultOTELInstrumentations)({
84
84
  ignoreUrls: this.getIgnoreUrls(),
85
- propagateTraceHeaderCorsUrls: (_e = this.options.instrumentationOptions) === null || _e === void 0 ? void 0 : _e.propagateTraceHeaderCorsUrls,
86
- fetchInstrumentationOptions: {
87
- applyCustomAttributesOnSpan: (0, instrumentationUtils_1.fetchCustomAttributeFunctionWithDefaults)((_g = (_f = this.options.instrumentationOptions) === null || _f === void 0 ? void 0 : _f.fetchInstrumentationOptions) === null || _g === void 0 ? void 0 : _g.applyCustomAttributesOnSpan),
88
- },
89
- xhrInstrumentationOptions: {
90
- applyCustomAttributesOnSpan: (0, instrumentationUtils_1.xhrCustomAttributeFunctionWithDefaults)((_j = (_h = this.options.instrumentationOptions) === null || _h === void 0 ? void 0 : _h.xhrInstrumentationOptions) === null || _j === void 0 ? void 0 : _j.applyCustomAttributesOnSpan),
91
- },
85
+ propagateTraceHeaderCorsUrls: propagateTraceHeaderCorsUrls,
86
+ fetchInstrumentationOptions: fetchInstrumentationOptions,
87
+ xhrInstrumentationOptions: xhrInstrumentationOptions,
92
88
  }),
93
89
  });
94
90
  this.api.initOTEL(api_1.trace, api_1.context);
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentation.js","sourceRoot":"","sources":["../../src/instrumentation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,0CAAoD;AACpD,4DAAiE;AACjE,4CAAgE;AAChE,kEAA0E;AAC1E,sDAAwE;AACxE,8DAAqF;AACrF,4EAK6C;AAE7C,sDAAgF;AAEhF,yDAAwD;AACxD,mFAAkF;AAClF,+DAGgC;AAChC,qCAAgD;AAChD,+DAAkE;AAGlE,8CAA8C;AAC9C,gEAAgE;AAChE,0BAA0B;AAE1B;IAA4C,0CAAmB;IAM7D,gCAAoB,OAA2C;QAA3C,wBAAA,EAAA,YAA2C;QAA/D,YACE,iBAAO,SACR;QAFmB,aAAO,GAAP,OAAO,CAAoC;QAL/D,UAAI,GAAG,2BAA2B,CAAC;QACnC,aAAO,GAAG,sBAAO,CAAC;;IAMlB,CAAC;IAED,2CAAU,GAAV;QAAA,iBAuEC;;QAtEC,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAM,UAAU,GAAuB,EAAE,CAAC;QAE1C,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE;YACxB,UAAU,CAAC,+CAAwB,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;SAC7D;QAED,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE;YAC7B,UAAU,CAAC,oDAA6B,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC;SACvE;QAED,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE;YAC3B,UAAU,CAAC,kDAA2B,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC;SACnE;QAED,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE;YAC/B,UAAU,CAAC,yDAAkC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC;SAC9E;QAED,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;QAEtD,IAAM,QAAQ,GAAG,oBAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,oBAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;QAEpE,IAAM,QAAQ,GAAG,IAAI,iCAAiB,CAAC;YACrC,QAAQ,UAAA;YACR,OAAO,EAAE;gBACP,YAAY,EAAE;oBACZ,OAAO;wBACL,QAAQ,EAAE,IAAA,6BAAmB,EAAC,KAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;qBACrD,CAAC;gBACJ,CAAC;aACF;SACF,CAAC,CAAC;QAEH,QAAQ,CAAC,gBAAgB,CACvB,MAAA,OAAO,CAAC,aAAa,mCACnB,IAAI,+CAAwB,CAC1B,IAAI,kCAAkB,CAAC,IAAI,qCAAiB,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,EAAE;YAC/D,oBAAoB,EAAE,sBAAsB,CAAC,wBAAwB;YACrE,kBAAkB,EAAE,EAAE;SACvB,CAAC,EACF,IAAI,CAAC,KAAK,CACX,CACJ,CAAC;QAEF,QAAQ,CAAC,QAAQ,CAAC;YAChB,UAAU,EAAE,MAAA,OAAO,CAAC,UAAU,mCAAI,IAAI,gCAAyB,EAAE;YACjE,cAAc,EAAE,MAAA,OAAO,CAAC,cAAc,mCAAI,IAAI,iCAAkB,EAAE;SACnE,CAAC,CAAC;QAEH,IAAA,0CAAwB,EAAC;YACvB,gBAAgB,EACd,MAAA,OAAO,CAAC,gBAAgB,mCACxB,IAAA,+DAA8B,EAAC;gBAC7B,UAAU,EAAE,IAAI,CAAC,aAAa,EAAE;gBAChC,4BAA4B,EAAE,MAAA,IAAI,CAAC,OAAO,CAAC,sBAAsB,0CAAE,4BAA4B;gBAC/F,2BAA2B,EAAE;oBAC3B,2BAA2B,EAAE,IAAA,+DAAwC,EACnE,MAAA,MAAA,IAAI,CAAC,OAAO,CAAC,sBAAsB,0CAAE,2BAA2B,0CAAE,2BAA2B,CAC9F;iBACF;gBACD,yBAAyB,EAAE;oBACzB,2BAA2B,EAAE,IAAA,6DAAsC,EACjE,MAAA,MAAA,IAAI,CAAC,OAAO,CAAC,sBAAsB,0CAAE,yBAAyB,0CAAE,2BAA2B,CAC5F;iBACF;aACF,CAAC;SACL,CAAC,CAAC;QAEH,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,WAAK,EAAE,aAAO,CAAC,CAAC;IACpC,CAAC;IAEO,8CAAa,GAArB;QACE,OAAO,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,SAAoB,IAAK,OAAA,SAAS,CAAC,aAAa,EAAE,EAAzB,CAAyB,CAAC,CAAC;IACjG,CAAC;IAjFM,+CAAwB,GAAG,IAAI,CAAC;IAkFzC,6BAAC;CAAA,AAtFD,CAA4C,kCAAmB,GAsF9D;AAtFY,wDAAsB","sourcesContent":["import { context, trace } from '@opentelemetry/api';\nimport { ZoneContextManager } from '@opentelemetry/context-zone';\nimport { W3CTraceContextPropagator } from '@opentelemetry/core';\nimport { registerInstrumentations } from '@opentelemetry/instrumentation';\nimport { Resource, ResourceAttributes } from '@opentelemetry/resources';\nimport { BatchSpanProcessor, WebTracerProvider } from '@opentelemetry/sdk-trace-web';\nimport {\n SEMRESATTRS_DEPLOYMENT_ENVIRONMENT,\n SEMRESATTRS_SERVICE_NAME,\n SEMRESATTRS_SERVICE_NAMESPACE,\n SEMRESATTRS_SERVICE_VERSION,\n} from '@opentelemetry/semantic-conventions';\n\nimport { BaseInstrumentation, Transport, VERSION } from '@grafana/faro-web-sdk';\n\nimport { FaroTraceExporter } from './faroTraceExporter';\nimport { getDefaultOTELInstrumentations } from './getDefaultOTELInstrumentations';\nimport {\n fetchCustomAttributeFunctionWithDefaults,\n xhrCustomAttributeFunctionWithDefaults,\n} from './instrumentationUtils';\nimport { getSamplingDecision } from './sampler';\nimport { FaroSessionSpanProcessor } from './sessionSpanProcessor';\nimport type { TracingInstrumentationOptions } from './types';\n\n// the providing of app name here is not great\n// should delay initialization and provide the full Faro config,\n// taking app name from it\n\nexport class TracingInstrumentation extends BaseInstrumentation {\n name = '@grafana/faro-web-tracing';\n version = VERSION;\n\n static SCHEDULED_BATCH_DELAY_MS = 1000;\n\n constructor(private options: TracingInstrumentationOptions = {}) {\n super();\n }\n\n initialize(): void {\n const options = this.options;\n const attributes: ResourceAttributes = {};\n\n if (this.config.app.name) {\n attributes[SEMRESATTRS_SERVICE_NAME] = this.config.app.name;\n }\n\n if (this.config.app.namespace) {\n attributes[SEMRESATTRS_SERVICE_NAMESPACE] = this.config.app.namespace;\n }\n\n if (this.config.app.version) {\n attributes[SEMRESATTRS_SERVICE_VERSION] = this.config.app.version;\n }\n\n if (this.config.app.environment) {\n attributes[SEMRESATTRS_DEPLOYMENT_ENVIRONMENT] = this.config.app.environment;\n }\n\n Object.assign(attributes, options.resourceAttributes);\n\n const resource = Resource.default().merge(new Resource(attributes));\n\n const provider = new WebTracerProvider({\n resource,\n sampler: {\n shouldSample: () => {\n return {\n decision: getSamplingDecision(this.api.getSession()),\n };\n },\n },\n });\n\n provider.addSpanProcessor(\n options.spanProcessor ??\n new FaroSessionSpanProcessor(\n new BatchSpanProcessor(new FaroTraceExporter({ api: this.api }), {\n scheduledDelayMillis: TracingInstrumentation.SCHEDULED_BATCH_DELAY_MS,\n maxExportBatchSize: 30,\n }),\n this.metas\n )\n );\n\n provider.register({\n propagator: options.propagator ?? new W3CTraceContextPropagator(),\n contextManager: options.contextManager ?? new ZoneContextManager(),\n });\n\n registerInstrumentations({\n instrumentations:\n options.instrumentations ??\n getDefaultOTELInstrumentations({\n ignoreUrls: this.getIgnoreUrls(),\n propagateTraceHeaderCorsUrls: this.options.instrumentationOptions?.propagateTraceHeaderCorsUrls,\n fetchInstrumentationOptions: {\n applyCustomAttributesOnSpan: fetchCustomAttributeFunctionWithDefaults(\n this.options.instrumentationOptions?.fetchInstrumentationOptions?.applyCustomAttributesOnSpan\n ),\n },\n xhrInstrumentationOptions: {\n applyCustomAttributesOnSpan: xhrCustomAttributeFunctionWithDefaults(\n this.options.instrumentationOptions?.xhrInstrumentationOptions?.applyCustomAttributesOnSpan\n ),\n },\n }),\n });\n\n this.api.initOTEL(trace, context);\n }\n\n private getIgnoreUrls(): Array<string | RegExp> {\n return this.transports.transports.flatMap((transport: Transport) => transport.getIgnoreUrls());\n }\n}\n"]}
1
+ {"version":3,"file":"instrumentation.js","sourceRoot":"","sources":["../../src/instrumentation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,0CAAoD;AACpD,4DAAiE;AACjE,4CAAgE;AAChE,kEAA0E;AAC1E,sDAAwE;AACxE,8DAAqF;AACrF,4EAK6C;AAE7C,sDAAgF;AAEhF,yDAAwD;AACxD,mFAAkF;AAClF,qCAAgD;AAChD,+DAAkE;AAGlE,8CAA8C;AAC9C,gEAAgE;AAChE,0BAA0B;AAE1B;IAA4C,0CAAmB;IAM7D,gCAAoB,OAA2C;QAA3C,wBAAA,EAAA,YAA2C;QAA/D,YACE,iBAAO,SACR;QAFmB,aAAO,GAAP,OAAO,CAAoC;QAL/D,UAAI,GAAG,2BAA2B,CAAC;QACnC,aAAO,GAAG,sBAAO,CAAC;;IAMlB,CAAC;IAED,2CAAU,GAAV;QAAA,iBAkEC;;QAjEC,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAM,UAAU,GAAuB,EAAE,CAAC;QAE1C,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE;YACxB,UAAU,CAAC,+CAAwB,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;SAC7D;QAED,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE;YAC7B,UAAU,CAAC,oDAA6B,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC;SACvE;QAED,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE;YAC3B,UAAU,CAAC,kDAA2B,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC;SACnE;QAED,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE;YAC/B,UAAU,CAAC,yDAAkC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC;SAC9E;QAED,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;QAEtD,IAAM,QAAQ,GAAG,oBAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,oBAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;QAEpE,IAAM,QAAQ,GAAG,IAAI,iCAAiB,CAAC;YACrC,QAAQ,UAAA;YACR,OAAO,EAAE;gBACP,YAAY,EAAE;oBACZ,OAAO;wBACL,QAAQ,EAAE,IAAA,6BAAmB,EAAC,KAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;qBACrD,CAAC;gBACJ,CAAC;aACF;SACF,CAAC,CAAC;QAEH,QAAQ,CAAC,gBAAgB,CACvB,MAAA,OAAO,CAAC,aAAa,mCACnB,IAAI,+CAAwB,CAC1B,IAAI,kCAAkB,CAAC,IAAI,qCAAiB,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,EAAE;YAC/D,oBAAoB,EAAE,sBAAsB,CAAC,wBAAwB;YACrE,kBAAkB,EAAE,EAAE;SACvB,CAAC,EACF,IAAI,CAAC,KAAK,CACX,CACJ,CAAC;QAEF,QAAQ,CAAC,QAAQ,CAAC;YAChB,UAAU,EAAE,MAAA,OAAO,CAAC,UAAU,mCAAI,IAAI,gCAAyB,EAAE;YACjE,cAAc,EAAE,MAAA,OAAO,CAAC,cAAc,mCAAI,IAAI,iCAAkB,EAAE;SACnE,CAAC,CAAC;QAEG,IAAA,KACJ,MAAA,IAAI,CAAC,OAAO,CAAC,sBAAsB,mCAAI,EAAE,EADnC,4BAA4B,kCAAA,EAAE,2BAA2B,iCAAA,EAAE,yBAAyB,+BACjD,CAAC;QAE5C,IAAA,0CAAwB,EAAC;YACvB,gBAAgB,EACd,MAAA,OAAO,CAAC,gBAAgB,mCACxB,IAAA,+DAA8B,EAAC;gBAC7B,UAAU,EAAE,IAAI,CAAC,aAAa,EAAE;gBAChC,4BAA4B,8BAAA;gBAC5B,2BAA2B,6BAAA;gBAC3B,yBAAyB,2BAAA;aAC1B,CAAC;SACL,CAAC,CAAC;QAEH,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,WAAK,EAAE,aAAO,CAAC,CAAC;IACpC,CAAC;IAEO,8CAAa,GAArB;QACE,OAAO,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,SAAoB,IAAK,OAAA,SAAS,CAAC,aAAa,EAAE,EAAzB,CAAyB,CAAC,CAAC;IACjG,CAAC;IA5EM,+CAAwB,GAAG,IAAI,CAAC;IA6EzC,6BAAC;CAAA,AAjFD,CAA4C,kCAAmB,GAiF9D;AAjFY,wDAAsB","sourcesContent":["import { context, trace } from '@opentelemetry/api';\nimport { ZoneContextManager } from '@opentelemetry/context-zone';\nimport { W3CTraceContextPropagator } from '@opentelemetry/core';\nimport { registerInstrumentations } from '@opentelemetry/instrumentation';\nimport { Resource, ResourceAttributes } from '@opentelemetry/resources';\nimport { BatchSpanProcessor, WebTracerProvider } from '@opentelemetry/sdk-trace-web';\nimport {\n SEMRESATTRS_DEPLOYMENT_ENVIRONMENT,\n SEMRESATTRS_SERVICE_NAME,\n SEMRESATTRS_SERVICE_NAMESPACE,\n SEMRESATTRS_SERVICE_VERSION,\n} from '@opentelemetry/semantic-conventions';\n\nimport { BaseInstrumentation, Transport, VERSION } from '@grafana/faro-web-sdk';\n\nimport { FaroTraceExporter } from './faroTraceExporter';\nimport { getDefaultOTELInstrumentations } from './getDefaultOTELInstrumentations';\nimport { getSamplingDecision } from './sampler';\nimport { FaroSessionSpanProcessor } from './sessionSpanProcessor';\nimport type { TracingInstrumentationOptions } from './types';\n\n// the providing of app name here is not great\n// should delay initialization and provide the full Faro config,\n// taking app name from it\n\nexport class TracingInstrumentation extends BaseInstrumentation {\n name = '@grafana/faro-web-tracing';\n version = VERSION;\n\n static SCHEDULED_BATCH_DELAY_MS = 1000;\n\n constructor(private options: TracingInstrumentationOptions = {}) {\n super();\n }\n\n initialize(): void {\n const options = this.options;\n const attributes: ResourceAttributes = {};\n\n if (this.config.app.name) {\n attributes[SEMRESATTRS_SERVICE_NAME] = this.config.app.name;\n }\n\n if (this.config.app.namespace) {\n attributes[SEMRESATTRS_SERVICE_NAMESPACE] = this.config.app.namespace;\n }\n\n if (this.config.app.version) {\n attributes[SEMRESATTRS_SERVICE_VERSION] = this.config.app.version;\n }\n\n if (this.config.app.environment) {\n attributes[SEMRESATTRS_DEPLOYMENT_ENVIRONMENT] = this.config.app.environment;\n }\n\n Object.assign(attributes, options.resourceAttributes);\n\n const resource = Resource.default().merge(new Resource(attributes));\n\n const provider = new WebTracerProvider({\n resource,\n sampler: {\n shouldSample: () => {\n return {\n decision: getSamplingDecision(this.api.getSession()),\n };\n },\n },\n });\n\n provider.addSpanProcessor(\n options.spanProcessor ??\n new FaroSessionSpanProcessor(\n new BatchSpanProcessor(new FaroTraceExporter({ api: this.api }), {\n scheduledDelayMillis: TracingInstrumentation.SCHEDULED_BATCH_DELAY_MS,\n maxExportBatchSize: 30,\n }),\n this.metas\n )\n );\n\n provider.register({\n propagator: options.propagator ?? new W3CTraceContextPropagator(),\n contextManager: options.contextManager ?? new ZoneContextManager(),\n });\n\n const { propagateTraceHeaderCorsUrls, fetchInstrumentationOptions, xhrInstrumentationOptions } =\n this.options.instrumentationOptions ?? {};\n\n registerInstrumentations({\n instrumentations:\n options.instrumentations ??\n getDefaultOTELInstrumentations({\n ignoreUrls: this.getIgnoreUrls(),\n propagateTraceHeaderCorsUrls,\n fetchInstrumentationOptions,\n xhrInstrumentationOptions,\n }),\n });\n\n this.api.initOTEL(trace, context);\n }\n\n private getIgnoreUrls(): Array<string | RegExp> {\n return this.transports.transports.flatMap((transport: Transport) => transport.getIgnoreUrls());\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContextManager, TextMapPropagator } from '@opentelemetry/api';\nimport type { Instrumentation } from '@opentelemetry/instrumentation';\nimport type { FetchCustomAttributeFunction } from '@opentelemetry/instrumentation-fetch';\nimport type { XHRCustomAttributeFunction } from '@opentelemetry/instrumentation-xml-http-request';\nimport type { ResourceAttributes } from '@opentelemetry/resources';\nimport type { SpanProcessor } from '@opentelemetry/sdk-trace-web';\n\nimport type { Patterns } from '@grafana/faro-core';\nimport type { API } from '@grafana/faro-web-sdk';\n\n// type got remove by with experimental/v0.52.0 and is replaced by the following type:\n// See: https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.52.0\nexport type InstrumentationOption = Instrumentation | Instrumentation[];\n\nexport interface FaroTraceExporterConfig {\n api: API;\n}\n\nexport interface TracingInstrumentationOptions {\n resourceAttributes?: ResourceAttributes;\n propagator?: TextMapPropagator;\n contextManager?: ContextManager;\n instrumentations?: InstrumentationOption[];\n spanProcessor?: SpanProcessor;\n instrumentationOptions?: Omit<DefaultInstrumentationsOptions, 'ignoreUrls'>;\n}\n\nexport type MatchUrlDefinitions = Patterns;\n\nexport type DefaultInstrumentationsOptions = {\n ignoreUrls?: MatchUrlDefinitions;\n propagateTraceHeaderCorsUrls?: MatchUrlDefinitions;\n\n fetchInstrumentationOptions?: {\n applyCustomAttributesOnSpan?: FetchCustomAttributeFunction;\n };\n\n xhrInstrumentationOptions?: {\n applyCustomAttributesOnSpan?: XHRCustomAttributeFunction;\n };\n};\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContextManager, TextMapPropagator } from '@opentelemetry/api';\nimport type { Instrumentation } from '@opentelemetry/instrumentation';\nimport type { FetchCustomAttributeFunction } from '@opentelemetry/instrumentation-fetch';\nimport type { XHRCustomAttributeFunction } from '@opentelemetry/instrumentation-xml-http-request';\nimport type { ResourceAttributes } from '@opentelemetry/resources';\nimport type { SpanProcessor } from '@opentelemetry/sdk-trace-web';\n\nimport type { Patterns } from '@grafana/faro-core';\nimport type { API } from '@grafana/faro-web-sdk';\n\n// type got remove by with experimental/v0.52.0 and is replaced by the following type:\n// See: https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.52.0\nexport type InstrumentationOption = Instrumentation | Instrumentation[];\n\nexport interface FaroTraceExporterConfig {\n api: API;\n}\n\nexport interface TracingInstrumentationOptions {\n resourceAttributes?: ResourceAttributes;\n propagator?: TextMapPropagator;\n contextManager?: ContextManager;\n instrumentations?: InstrumentationOption[];\n spanProcessor?: SpanProcessor;\n instrumentationOptions?: Omit<DefaultInstrumentationsOptions, 'ignoreUrls'>;\n}\n\nexport type MatchUrlDefinitions = Patterns;\n\nexport type DefaultInstrumentationsOptions = {\n ignoreUrls?: MatchUrlDefinitions;\n propagateTraceHeaderCorsUrls?: MatchUrlDefinitions;\n\n fetchInstrumentationOptions?: {\n applyCustomAttributesOnSpan?: FetchCustomAttributeFunction;\n ignoreNetworkEvents?: boolean;\n };\n\n xhrInstrumentationOptions?: {\n applyCustomAttributesOnSpan?: XHRCustomAttributeFunction;\n ignoreNetworkEvents?: boolean;\n };\n};\n"]}
@@ -11,15 +11,21 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  };
12
12
  import { FetchInstrumentation } from '@opentelemetry/instrumentation-fetch';
13
13
  import { XMLHttpRequestInstrumentation } from '@opentelemetry/instrumentation-xml-http-request';
14
- const initialInstrumentationsOptions = {
15
- ignoreUrls: [],
16
- propagateTraceHeaderCorsUrls: [],
17
- };
18
- export function getDefaultOTELInstrumentations(options = initialInstrumentationsOptions) {
14
+ import { fetchCustomAttributeFunctionWithDefaults, xhrCustomAttributeFunctionWithDefaults, } from './instrumentationUtils';
15
+ export function getDefaultOTELInstrumentations(options = {}) {
19
16
  const { fetchInstrumentationOptions, xhrInstrumentationOptions } = options, sharedOptions = __rest(options, ["fetchInstrumentationOptions", "xhrInstrumentationOptions"]);
20
- return [
21
- new FetchInstrumentation(Object.assign(Object.assign({}, sharedOptions), fetchInstrumentationOptions)),
22
- new XMLHttpRequestInstrumentation(Object.assign(Object.assign({}, sharedOptions), xhrInstrumentationOptions)),
23
- ];
17
+ const fetchOpts = createFetchInstrumentationOptions(fetchInstrumentationOptions, sharedOptions);
18
+ const xhrOpts = createXhrInstrumentationOptions(xhrInstrumentationOptions, sharedOptions);
19
+ return [new FetchInstrumentation(fetchOpts), new XMLHttpRequestInstrumentation(xhrOpts)];
20
+ }
21
+ function createFetchInstrumentationOptions(fetchInstrumentationOptions, sharedOptions) {
22
+ return Object.assign(Object.assign(Object.assign(Object.assign({}, sharedOptions), { ignoreNetworkEvents: true }), fetchInstrumentationOptions), {
23
+ // always keep this function
24
+ applyCustomAttributesOnSpan: fetchCustomAttributeFunctionWithDefaults(fetchInstrumentationOptions === null || fetchInstrumentationOptions === void 0 ? void 0 : fetchInstrumentationOptions.applyCustomAttributesOnSpan) });
25
+ }
26
+ function createXhrInstrumentationOptions(xhrInstrumentationOptions, sharedOptions) {
27
+ return Object.assign(Object.assign(Object.assign(Object.assign({}, sharedOptions), { ignoreNetworkEvents: true }), xhrInstrumentationOptions), {
28
+ // always keep this function
29
+ applyCustomAttributesOnSpan: xhrCustomAttributeFunctionWithDefaults(xhrInstrumentationOptions === null || xhrInstrumentationOptions === void 0 ? void 0 : xhrInstrumentationOptions.applyCustomAttributesOnSpan) });
24
30
  }
25
31
  //# sourceMappingURL=getDefaultOTELInstrumentations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDefaultOTELInstrumentations.js","sourceRoot":"","sources":["../../src/getDefaultOTELInstrumentations.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,6BAA6B,EAAE,MAAM,iDAAiD,CAAC;AAIhG,MAAM,8BAA8B,GAAG;IACrC,UAAU,EAAE,EAAE;IACd,4BAA4B,EAAE,EAAE;CACjC,CAAC;AAEF,MAAM,UAAU,8BAA8B,CAC5C,UAA0C,8BAA8B;IAExE,MAAM,EAAE,2BAA2B,EAAE,yBAAyB,KAAuB,OAAO,EAAzB,aAAa,UAAK,OAAO,EAAtF,4DAA4E,CAAU,CAAC;IAE7F,OAAO;QACL,IAAI,oBAAoB,iCAAM,aAAa,GAAK,2BAA2B,EAAG;QAC9E,IAAI,6BAA6B,iCAAM,aAAa,GAAK,yBAAyB,EAAG;KACtF,CAAC;AACJ,CAAC","sourcesContent":["import { FetchInstrumentation } from '@opentelemetry/instrumentation-fetch';\nimport { XMLHttpRequestInstrumentation } from '@opentelemetry/instrumentation-xml-http-request';\n\nimport type { DefaultInstrumentationsOptions, InstrumentationOption } from './types';\n\nconst initialInstrumentationsOptions = {\n ignoreUrls: [],\n propagateTraceHeaderCorsUrls: [],\n};\n\nexport function getDefaultOTELInstrumentations(\n options: DefaultInstrumentationsOptions = initialInstrumentationsOptions\n): InstrumentationOption[] {\n const { fetchInstrumentationOptions, xhrInstrumentationOptions, ...sharedOptions } = options;\n\n return [\n new FetchInstrumentation({ ...sharedOptions, ...fetchInstrumentationOptions }),\n new XMLHttpRequestInstrumentation({ ...sharedOptions, ...xhrInstrumentationOptions }),\n ];\n}\n"]}
1
+ {"version":3,"file":"getDefaultOTELInstrumentations.js","sourceRoot":"","sources":["../../src/getDefaultOTELInstrumentations.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,6BAA6B,EAAE,MAAM,iDAAiD,CAAC;AAEhG,OAAO,EACL,wCAAwC,EACxC,sCAAsC,GACvC,MAAM,wBAAwB,CAAC;AAGhC,MAAM,UAAU,8BAA8B,CAAC,UAA0C,EAAE;IACzF,MAAM,EAAE,2BAA2B,EAAE,yBAAyB,KAAuB,OAAO,EAAzB,aAAa,UAAK,OAAO,EAAtF,4DAA4E,CAAU,CAAC;IAE7F,MAAM,SAAS,GAAG,iCAAiC,CAAC,2BAA2B,EAAE,aAAa,CAAC,CAAC;IAChG,MAAM,OAAO,GAAG,+BAA+B,CAAC,yBAAyB,EAAE,aAAa,CAAC,CAAC;IAE1F,OAAO,CAAC,IAAI,oBAAoB,CAAC,SAAS,CAAC,EAAE,IAAI,6BAA6B,CAAC,OAAO,CAAC,CAAC,CAAC;AAC3F,CAAC;AACD,SAAS,iCAAiC,CACxC,2BAA0F,EAC1F,aAAsC;IAEtC,mEACK,aAAa,KAChB,mBAAmB,EAAE,IAAI,KAEtB,2BAA2B;QAC9B,4BAA4B;QAC5B,2BAA2B,EAAE,wCAAwC,CACnE,2BAA2B,aAA3B,2BAA2B,uBAA3B,2BAA2B,CAAE,2BAA2B,CACzD,IACD;AACJ,CAAC;AAED,SAAS,+BAA+B,CACtC,yBAAsF,EACtF,aAAsC;IAEtC,mEACK,aAAa,KAChB,mBAAmB,EAAE,IAAI,KAEtB,yBAAyB;QAC5B,4BAA4B;QAC5B,2BAA2B,EAAE,sCAAsC,CACjE,yBAAyB,aAAzB,yBAAyB,uBAAzB,yBAAyB,CAAE,2BAA2B,CACvD,IACD;AACJ,CAAC","sourcesContent":["import { FetchInstrumentation } from '@opentelemetry/instrumentation-fetch';\nimport { XMLHttpRequestInstrumentation } from '@opentelemetry/instrumentation-xml-http-request';\n\nimport {\n fetchCustomAttributeFunctionWithDefaults,\n xhrCustomAttributeFunctionWithDefaults,\n} from './instrumentationUtils';\nimport type { DefaultInstrumentationsOptions, InstrumentationOption } from './types';\n\nexport function getDefaultOTELInstrumentations(options: DefaultInstrumentationsOptions = {}): InstrumentationOption[] {\n const { fetchInstrumentationOptions, xhrInstrumentationOptions, ...sharedOptions } = options;\n\n const fetchOpts = createFetchInstrumentationOptions(fetchInstrumentationOptions, sharedOptions);\n const xhrOpts = createXhrInstrumentationOptions(xhrInstrumentationOptions, sharedOptions);\n\n return [new FetchInstrumentation(fetchOpts), new XMLHttpRequestInstrumentation(xhrOpts)];\n}\nfunction createFetchInstrumentationOptions(\n fetchInstrumentationOptions: DefaultInstrumentationsOptions['fetchInstrumentationOptions'],\n sharedOptions: Record<string, unknown>\n) {\n return {\n ...sharedOptions,\n ignoreNetworkEvents: true,\n // keep this here to overwrite the defaults above if provided by the users\n ...fetchInstrumentationOptions,\n // always keep this function\n applyCustomAttributesOnSpan: fetchCustomAttributeFunctionWithDefaults(\n fetchInstrumentationOptions?.applyCustomAttributesOnSpan\n ),\n };\n}\n\nfunction createXhrInstrumentationOptions(\n xhrInstrumentationOptions: DefaultInstrumentationsOptions['xhrInstrumentationOptions'],\n sharedOptions: Record<string, unknown>\n) {\n return {\n ...sharedOptions,\n ignoreNetworkEvents: true,\n // keep this here to overwrite the defaults above if provided by the users\n ...xhrInstrumentationOptions,\n // always keep this function\n applyCustomAttributesOnSpan: xhrCustomAttributeFunctionWithDefaults(\n xhrInstrumentationOptions?.applyCustomAttributesOnSpan\n ),\n };\n}\n"]}
@@ -8,7 +8,6 @@ import { SEMRESATTRS_DEPLOYMENT_ENVIRONMENT, SEMRESATTRS_SERVICE_NAME, SEMRESATT
8
8
  import { BaseInstrumentation, VERSION } from '@grafana/faro-web-sdk';
9
9
  import { FaroTraceExporter } from './faroTraceExporter';
10
10
  import { getDefaultOTELInstrumentations } from './getDefaultOTELInstrumentations';
11
- import { fetchCustomAttributeFunctionWithDefaults, xhrCustomAttributeFunctionWithDefaults, } from './instrumentationUtils';
12
11
  import { getSamplingDecision } from './sampler';
13
12
  import { FaroSessionSpanProcessor } from './sessionSpanProcessor';
14
13
  // the providing of app name here is not great
@@ -22,7 +21,7 @@ export class TracingInstrumentation extends BaseInstrumentation {
22
21
  this.version = VERSION;
23
22
  }
24
23
  initialize() {
25
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
24
+ var _a, _b, _c, _d, _e;
26
25
  const options = this.options;
27
26
  const attributes = {};
28
27
  if (this.config.app.name) {
@@ -57,16 +56,13 @@ export class TracingInstrumentation extends BaseInstrumentation {
57
56
  propagator: (_b = options.propagator) !== null && _b !== void 0 ? _b : new W3CTraceContextPropagator(),
58
57
  contextManager: (_c = options.contextManager) !== null && _c !== void 0 ? _c : new ZoneContextManager(),
59
58
  });
59
+ const { propagateTraceHeaderCorsUrls, fetchInstrumentationOptions, xhrInstrumentationOptions } = (_d = this.options.instrumentationOptions) !== null && _d !== void 0 ? _d : {};
60
60
  registerInstrumentations({
61
- instrumentations: (_d = options.instrumentations) !== null && _d !== void 0 ? _d : getDefaultOTELInstrumentations({
61
+ instrumentations: (_e = options.instrumentations) !== null && _e !== void 0 ? _e : getDefaultOTELInstrumentations({
62
62
  ignoreUrls: this.getIgnoreUrls(),
63
- propagateTraceHeaderCorsUrls: (_e = this.options.instrumentationOptions) === null || _e === void 0 ? void 0 : _e.propagateTraceHeaderCorsUrls,
64
- fetchInstrumentationOptions: {
65
- applyCustomAttributesOnSpan: fetchCustomAttributeFunctionWithDefaults((_g = (_f = this.options.instrumentationOptions) === null || _f === void 0 ? void 0 : _f.fetchInstrumentationOptions) === null || _g === void 0 ? void 0 : _g.applyCustomAttributesOnSpan),
66
- },
67
- xhrInstrumentationOptions: {
68
- applyCustomAttributesOnSpan: xhrCustomAttributeFunctionWithDefaults((_j = (_h = this.options.instrumentationOptions) === null || _h === void 0 ? void 0 : _h.xhrInstrumentationOptions) === null || _j === void 0 ? void 0 : _j.applyCustomAttributesOnSpan),
69
- },
63
+ propagateTraceHeaderCorsUrls,
64
+ fetchInstrumentationOptions,
65
+ xhrInstrumentationOptions,
70
66
  }),
71
67
  });
72
68
  this.api.initOTEL(trace, context);
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentation.js","sourceRoot":"","sources":["../../src/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAsB,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EACL,kCAAkC,EAClC,wBAAwB,EACxB,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,mBAAmB,EAAa,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EACL,wCAAwC,EACxC,sCAAsC,GACvC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAGlE,8CAA8C;AAC9C,gEAAgE;AAChE,0BAA0B;AAE1B,MAAM,OAAO,sBAAuB,SAAQ,mBAAmB;IAM7D,YAAoB,UAAyC,EAAE;QAC7D,KAAK,EAAE,CAAC;QADU,YAAO,GAAP,OAAO,CAAoC;QAL/D,SAAI,GAAG,2BAA2B,CAAC;QACnC,YAAO,GAAG,OAAO,CAAC;IAMlB,CAAC;IAED,UAAU;;QACR,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,MAAM,UAAU,GAAuB,EAAE,CAAC;QAE1C,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE;YACxB,UAAU,CAAC,wBAAwB,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;SAC7D;QAED,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE;YAC7B,UAAU,CAAC,6BAA6B,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC;SACvE;QAED,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE;YAC3B,UAAU,CAAC,2BAA2B,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC;SACnE;QAED,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE;YAC/B,UAAU,CAAC,kCAAkC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC;SAC9E;QAED,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;QAEtD,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;QAEpE,MAAM,QAAQ,GAAG,IAAI,iBAAiB,CAAC;YACrC,QAAQ;YACR,OAAO,EAAE;gBACP,YAAY,EAAE,GAAG,EAAE;oBACjB,OAAO;wBACL,QAAQ,EAAE,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;qBACrD,CAAC;gBACJ,CAAC;aACF;SACF,CAAC,CAAC;QAEH,QAAQ,CAAC,gBAAgB,CACvB,MAAA,OAAO,CAAC,aAAa,mCACnB,IAAI,wBAAwB,CAC1B,IAAI,kBAAkB,CAAC,IAAI,iBAAiB,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,EAAE;YAC/D,oBAAoB,EAAE,sBAAsB,CAAC,wBAAwB;YACrE,kBAAkB,EAAE,EAAE;SACvB,CAAC,EACF,IAAI,CAAC,KAAK,CACX,CACJ,CAAC;QAEF,QAAQ,CAAC,QAAQ,CAAC;YAChB,UAAU,EAAE,MAAA,OAAO,CAAC,UAAU,mCAAI,IAAI,yBAAyB,EAAE;YACjE,cAAc,EAAE,MAAA,OAAO,CAAC,cAAc,mCAAI,IAAI,kBAAkB,EAAE;SACnE,CAAC,CAAC;QAEH,wBAAwB,CAAC;YACvB,gBAAgB,EACd,MAAA,OAAO,CAAC,gBAAgB,mCACxB,8BAA8B,CAAC;gBAC7B,UAAU,EAAE,IAAI,CAAC,aAAa,EAAE;gBAChC,4BAA4B,EAAE,MAAA,IAAI,CAAC,OAAO,CAAC,sBAAsB,0CAAE,4BAA4B;gBAC/F,2BAA2B,EAAE;oBAC3B,2BAA2B,EAAE,wCAAwC,CACnE,MAAA,MAAA,IAAI,CAAC,OAAO,CAAC,sBAAsB,0CAAE,2BAA2B,0CAAE,2BAA2B,CAC9F;iBACF;gBACD,yBAAyB,EAAE;oBACzB,2BAA2B,EAAE,sCAAsC,CACjE,MAAA,MAAA,IAAI,CAAC,OAAO,CAAC,sBAAsB,0CAAE,yBAAyB,0CAAE,2BAA2B,CAC5F;iBACF;aACF,CAAC;SACL,CAAC,CAAC;QAEH,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACpC,CAAC;IAEO,aAAa;QACnB,OAAO,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,SAAoB,EAAE,EAAE,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,CAAC;IACjG,CAAC;;AAjFM,+CAAwB,GAAG,IAAI,CAAC","sourcesContent":["import { context, trace } from '@opentelemetry/api';\nimport { ZoneContextManager } from '@opentelemetry/context-zone';\nimport { W3CTraceContextPropagator } from '@opentelemetry/core';\nimport { registerInstrumentations } from '@opentelemetry/instrumentation';\nimport { Resource, ResourceAttributes } from '@opentelemetry/resources';\nimport { BatchSpanProcessor, WebTracerProvider } from '@opentelemetry/sdk-trace-web';\nimport {\n SEMRESATTRS_DEPLOYMENT_ENVIRONMENT,\n SEMRESATTRS_SERVICE_NAME,\n SEMRESATTRS_SERVICE_NAMESPACE,\n SEMRESATTRS_SERVICE_VERSION,\n} from '@opentelemetry/semantic-conventions';\n\nimport { BaseInstrumentation, Transport, VERSION } from '@grafana/faro-web-sdk';\n\nimport { FaroTraceExporter } from './faroTraceExporter';\nimport { getDefaultOTELInstrumentations } from './getDefaultOTELInstrumentations';\nimport {\n fetchCustomAttributeFunctionWithDefaults,\n xhrCustomAttributeFunctionWithDefaults,\n} from './instrumentationUtils';\nimport { getSamplingDecision } from './sampler';\nimport { FaroSessionSpanProcessor } from './sessionSpanProcessor';\nimport type { TracingInstrumentationOptions } from './types';\n\n// the providing of app name here is not great\n// should delay initialization and provide the full Faro config,\n// taking app name from it\n\nexport class TracingInstrumentation extends BaseInstrumentation {\n name = '@grafana/faro-web-tracing';\n version = VERSION;\n\n static SCHEDULED_BATCH_DELAY_MS = 1000;\n\n constructor(private options: TracingInstrumentationOptions = {}) {\n super();\n }\n\n initialize(): void {\n const options = this.options;\n const attributes: ResourceAttributes = {};\n\n if (this.config.app.name) {\n attributes[SEMRESATTRS_SERVICE_NAME] = this.config.app.name;\n }\n\n if (this.config.app.namespace) {\n attributes[SEMRESATTRS_SERVICE_NAMESPACE] = this.config.app.namespace;\n }\n\n if (this.config.app.version) {\n attributes[SEMRESATTRS_SERVICE_VERSION] = this.config.app.version;\n }\n\n if (this.config.app.environment) {\n attributes[SEMRESATTRS_DEPLOYMENT_ENVIRONMENT] = this.config.app.environment;\n }\n\n Object.assign(attributes, options.resourceAttributes);\n\n const resource = Resource.default().merge(new Resource(attributes));\n\n const provider = new WebTracerProvider({\n resource,\n sampler: {\n shouldSample: () => {\n return {\n decision: getSamplingDecision(this.api.getSession()),\n };\n },\n },\n });\n\n provider.addSpanProcessor(\n options.spanProcessor ??\n new FaroSessionSpanProcessor(\n new BatchSpanProcessor(new FaroTraceExporter({ api: this.api }), {\n scheduledDelayMillis: TracingInstrumentation.SCHEDULED_BATCH_DELAY_MS,\n maxExportBatchSize: 30,\n }),\n this.metas\n )\n );\n\n provider.register({\n propagator: options.propagator ?? new W3CTraceContextPropagator(),\n contextManager: options.contextManager ?? new ZoneContextManager(),\n });\n\n registerInstrumentations({\n instrumentations:\n options.instrumentations ??\n getDefaultOTELInstrumentations({\n ignoreUrls: this.getIgnoreUrls(),\n propagateTraceHeaderCorsUrls: this.options.instrumentationOptions?.propagateTraceHeaderCorsUrls,\n fetchInstrumentationOptions: {\n applyCustomAttributesOnSpan: fetchCustomAttributeFunctionWithDefaults(\n this.options.instrumentationOptions?.fetchInstrumentationOptions?.applyCustomAttributesOnSpan\n ),\n },\n xhrInstrumentationOptions: {\n applyCustomAttributesOnSpan: xhrCustomAttributeFunctionWithDefaults(\n this.options.instrumentationOptions?.xhrInstrumentationOptions?.applyCustomAttributesOnSpan\n ),\n },\n }),\n });\n\n this.api.initOTEL(trace, context);\n }\n\n private getIgnoreUrls(): Array<string | RegExp> {\n return this.transports.transports.flatMap((transport: Transport) => transport.getIgnoreUrls());\n }\n}\n"]}
1
+ {"version":3,"file":"instrumentation.js","sourceRoot":"","sources":["../../src/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAsB,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EACL,kCAAkC,EAClC,wBAAwB,EACxB,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,mBAAmB,EAAa,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAGlE,8CAA8C;AAC9C,gEAAgE;AAChE,0BAA0B;AAE1B,MAAM,OAAO,sBAAuB,SAAQ,mBAAmB;IAM7D,YAAoB,UAAyC,EAAE;QAC7D,KAAK,EAAE,CAAC;QADU,YAAO,GAAP,OAAO,CAAoC;QAL/D,SAAI,GAAG,2BAA2B,CAAC;QACnC,YAAO,GAAG,OAAO,CAAC;IAMlB,CAAC;IAED,UAAU;;QACR,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,MAAM,UAAU,GAAuB,EAAE,CAAC;QAE1C,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE;YACxB,UAAU,CAAC,wBAAwB,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;SAC7D;QAED,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE;YAC7B,UAAU,CAAC,6BAA6B,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC;SACvE;QAED,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE;YAC3B,UAAU,CAAC,2BAA2B,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC;SACnE;QAED,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE;YAC/B,UAAU,CAAC,kCAAkC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC;SAC9E;QAED,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;QAEtD,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;QAEpE,MAAM,QAAQ,GAAG,IAAI,iBAAiB,CAAC;YACrC,QAAQ;YACR,OAAO,EAAE;gBACP,YAAY,EAAE,GAAG,EAAE;oBACjB,OAAO;wBACL,QAAQ,EAAE,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;qBACrD,CAAC;gBACJ,CAAC;aACF;SACF,CAAC,CAAC;QAEH,QAAQ,CAAC,gBAAgB,CACvB,MAAA,OAAO,CAAC,aAAa,mCACnB,IAAI,wBAAwB,CAC1B,IAAI,kBAAkB,CAAC,IAAI,iBAAiB,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,EAAE;YAC/D,oBAAoB,EAAE,sBAAsB,CAAC,wBAAwB;YACrE,kBAAkB,EAAE,EAAE;SACvB,CAAC,EACF,IAAI,CAAC,KAAK,CACX,CACJ,CAAC;QAEF,QAAQ,CAAC,QAAQ,CAAC;YAChB,UAAU,EAAE,MAAA,OAAO,CAAC,UAAU,mCAAI,IAAI,yBAAyB,EAAE;YACjE,cAAc,EAAE,MAAA,OAAO,CAAC,cAAc,mCAAI,IAAI,kBAAkB,EAAE;SACnE,CAAC,CAAC;QAEH,MAAM,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,GAC5F,MAAA,IAAI,CAAC,OAAO,CAAC,sBAAsB,mCAAI,EAAE,CAAC;QAE5C,wBAAwB,CAAC;YACvB,gBAAgB,EACd,MAAA,OAAO,CAAC,gBAAgB,mCACxB,8BAA8B,CAAC;gBAC7B,UAAU,EAAE,IAAI,CAAC,aAAa,EAAE;gBAChC,4BAA4B;gBAC5B,2BAA2B;gBAC3B,yBAAyB;aAC1B,CAAC;SACL,CAAC,CAAC;QAEH,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACpC,CAAC;IAEO,aAAa;QACnB,OAAO,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,SAAoB,EAAE,EAAE,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,CAAC;IACjG,CAAC;;AA5EM,+CAAwB,GAAG,IAAI,CAAC","sourcesContent":["import { context, trace } from '@opentelemetry/api';\nimport { ZoneContextManager } from '@opentelemetry/context-zone';\nimport { W3CTraceContextPropagator } from '@opentelemetry/core';\nimport { registerInstrumentations } from '@opentelemetry/instrumentation';\nimport { Resource, ResourceAttributes } from '@opentelemetry/resources';\nimport { BatchSpanProcessor, WebTracerProvider } from '@opentelemetry/sdk-trace-web';\nimport {\n SEMRESATTRS_DEPLOYMENT_ENVIRONMENT,\n SEMRESATTRS_SERVICE_NAME,\n SEMRESATTRS_SERVICE_NAMESPACE,\n SEMRESATTRS_SERVICE_VERSION,\n} from '@opentelemetry/semantic-conventions';\n\nimport { BaseInstrumentation, Transport, VERSION } from '@grafana/faro-web-sdk';\n\nimport { FaroTraceExporter } from './faroTraceExporter';\nimport { getDefaultOTELInstrumentations } from './getDefaultOTELInstrumentations';\nimport { getSamplingDecision } from './sampler';\nimport { FaroSessionSpanProcessor } from './sessionSpanProcessor';\nimport type { TracingInstrumentationOptions } from './types';\n\n// the providing of app name here is not great\n// should delay initialization and provide the full Faro config,\n// taking app name from it\n\nexport class TracingInstrumentation extends BaseInstrumentation {\n name = '@grafana/faro-web-tracing';\n version = VERSION;\n\n static SCHEDULED_BATCH_DELAY_MS = 1000;\n\n constructor(private options: TracingInstrumentationOptions = {}) {\n super();\n }\n\n initialize(): void {\n const options = this.options;\n const attributes: ResourceAttributes = {};\n\n if (this.config.app.name) {\n attributes[SEMRESATTRS_SERVICE_NAME] = this.config.app.name;\n }\n\n if (this.config.app.namespace) {\n attributes[SEMRESATTRS_SERVICE_NAMESPACE] = this.config.app.namespace;\n }\n\n if (this.config.app.version) {\n attributes[SEMRESATTRS_SERVICE_VERSION] = this.config.app.version;\n }\n\n if (this.config.app.environment) {\n attributes[SEMRESATTRS_DEPLOYMENT_ENVIRONMENT] = this.config.app.environment;\n }\n\n Object.assign(attributes, options.resourceAttributes);\n\n const resource = Resource.default().merge(new Resource(attributes));\n\n const provider = new WebTracerProvider({\n resource,\n sampler: {\n shouldSample: () => {\n return {\n decision: getSamplingDecision(this.api.getSession()),\n };\n },\n },\n });\n\n provider.addSpanProcessor(\n options.spanProcessor ??\n new FaroSessionSpanProcessor(\n new BatchSpanProcessor(new FaroTraceExporter({ api: this.api }), {\n scheduledDelayMillis: TracingInstrumentation.SCHEDULED_BATCH_DELAY_MS,\n maxExportBatchSize: 30,\n }),\n this.metas\n )\n );\n\n provider.register({\n propagator: options.propagator ?? new W3CTraceContextPropagator(),\n contextManager: options.contextManager ?? new ZoneContextManager(),\n });\n\n const { propagateTraceHeaderCorsUrls, fetchInstrumentationOptions, xhrInstrumentationOptions } =\n this.options.instrumentationOptions ?? {};\n\n registerInstrumentations({\n instrumentations:\n options.instrumentations ??\n getDefaultOTELInstrumentations({\n ignoreUrls: this.getIgnoreUrls(),\n propagateTraceHeaderCorsUrls,\n fetchInstrumentationOptions,\n xhrInstrumentationOptions,\n }),\n });\n\n this.api.initOTEL(trace, context);\n }\n\n private getIgnoreUrls(): Array<string | RegExp> {\n return this.transports.transports.flatMap((transport: Transport) => transport.getIgnoreUrls());\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContextManager, TextMapPropagator } from '@opentelemetry/api';\nimport type { Instrumentation } from '@opentelemetry/instrumentation';\nimport type { FetchCustomAttributeFunction } from '@opentelemetry/instrumentation-fetch';\nimport type { XHRCustomAttributeFunction } from '@opentelemetry/instrumentation-xml-http-request';\nimport type { ResourceAttributes } from '@opentelemetry/resources';\nimport type { SpanProcessor } from '@opentelemetry/sdk-trace-web';\n\nimport type { Patterns } from '@grafana/faro-core';\nimport type { API } from '@grafana/faro-web-sdk';\n\n// type got remove by with experimental/v0.52.0 and is replaced by the following type:\n// See: https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.52.0\nexport type InstrumentationOption = Instrumentation | Instrumentation[];\n\nexport interface FaroTraceExporterConfig {\n api: API;\n}\n\nexport interface TracingInstrumentationOptions {\n resourceAttributes?: ResourceAttributes;\n propagator?: TextMapPropagator;\n contextManager?: ContextManager;\n instrumentations?: InstrumentationOption[];\n spanProcessor?: SpanProcessor;\n instrumentationOptions?: Omit<DefaultInstrumentationsOptions, 'ignoreUrls'>;\n}\n\nexport type MatchUrlDefinitions = Patterns;\n\nexport type DefaultInstrumentationsOptions = {\n ignoreUrls?: MatchUrlDefinitions;\n propagateTraceHeaderCorsUrls?: MatchUrlDefinitions;\n\n fetchInstrumentationOptions?: {\n applyCustomAttributesOnSpan?: FetchCustomAttributeFunction;\n };\n\n xhrInstrumentationOptions?: {\n applyCustomAttributesOnSpan?: XHRCustomAttributeFunction;\n };\n};\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContextManager, TextMapPropagator } from '@opentelemetry/api';\nimport type { Instrumentation } from '@opentelemetry/instrumentation';\nimport type { FetchCustomAttributeFunction } from '@opentelemetry/instrumentation-fetch';\nimport type { XHRCustomAttributeFunction } from '@opentelemetry/instrumentation-xml-http-request';\nimport type { ResourceAttributes } from '@opentelemetry/resources';\nimport type { SpanProcessor } from '@opentelemetry/sdk-trace-web';\n\nimport type { Patterns } from '@grafana/faro-core';\nimport type { API } from '@grafana/faro-web-sdk';\n\n// type got remove by with experimental/v0.52.0 and is replaced by the following type:\n// See: https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.52.0\nexport type InstrumentationOption = Instrumentation | Instrumentation[];\n\nexport interface FaroTraceExporterConfig {\n api: API;\n}\n\nexport interface TracingInstrumentationOptions {\n resourceAttributes?: ResourceAttributes;\n propagator?: TextMapPropagator;\n contextManager?: ContextManager;\n instrumentations?: InstrumentationOption[];\n spanProcessor?: SpanProcessor;\n instrumentationOptions?: Omit<DefaultInstrumentationsOptions, 'ignoreUrls'>;\n}\n\nexport type MatchUrlDefinitions = Patterns;\n\nexport type DefaultInstrumentationsOptions = {\n ignoreUrls?: MatchUrlDefinitions;\n propagateTraceHeaderCorsUrls?: MatchUrlDefinitions;\n\n fetchInstrumentationOptions?: {\n applyCustomAttributesOnSpan?: FetchCustomAttributeFunction;\n ignoreNetworkEvents?: boolean;\n };\n\n xhrInstrumentationOptions?: {\n applyCustomAttributesOnSpan?: XHRCustomAttributeFunction;\n ignoreNetworkEvents?: boolean;\n };\n};\n"]}
@@ -24,8 +24,10 @@ export type DefaultInstrumentationsOptions = {
24
24
  propagateTraceHeaderCorsUrls?: MatchUrlDefinitions;
25
25
  fetchInstrumentationOptions?: {
26
26
  applyCustomAttributesOnSpan?: FetchCustomAttributeFunction;
27
+ ignoreNetworkEvents?: boolean;
27
28
  };
28
29
  xhrInstrumentationOptions?: {
29
30
  applyCustomAttributesOnSpan?: XHRCustomAttributeFunction;
31
+ ignoreNetworkEvents?: boolean;
30
32
  };
31
33
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/faro-web-tracing",
3
- "version": "1.8.2",
3
+ "version": "1.9.0",
4
4
  "description": "Faro web tracing implementation.",
5
5
  "keywords": [
6
6
  "observability",
@@ -52,7 +52,7 @@
52
52
  "quality:circular-deps": "madge --circular ."
53
53
  },
54
54
  "dependencies": {
55
- "@grafana/faro-web-sdk": "^1.8.2",
55
+ "@grafana/faro-web-sdk": "^1.9.0",
56
56
  "@opentelemetry/api": "^1.9.0",
57
57
  "@opentelemetry/context-zone": "1.21.0",
58
58
  "@opentelemetry/core": "^1.25.0",
@@ -68,5 +68,5 @@
68
68
  "publishConfig": {
69
69
  "access": "public"
70
70
  },
71
- "gitHead": "ce860054636cc98bc3ad86420c3da19cccfc971a"
71
+ "gitHead": "adbb672f86fe8158022cb93a2802edf6219e6655"
72
72
  }