(window.webpackJsonp=window.webpackJsonp||[]).push([[443],{1595:function(t,e,n){"use strict";(function(t){n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return o}));var r=function(){"production"!==t.env&&console.log(...arguments)},o=()=>{try{return crypto.randomUUID()}catch(t){return null}}}).call(this,n(98))},2506:function(t,e,n){"use strict";(function(t){var r=n(2507),o=n(2508),c=n(2509),f=setTimeout;function d(t){return Boolean(t&&void 0!==t.length)}function l(){}function v(t){if(!(this instanceof v))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],w(t,this)}function h(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,v._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void y(e.promise,t)}m(e.promise,r)}else(1===t._state?m:y)(e.promise,t._value)}))):t._deferreds.push(e)}function m(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof v)return t._state=3,t._value=e,void _(t);if("function"==typeof n)return void w((r=n,o=e,function(){r.apply(o,arguments)}),t)}t._state=1,t._value=e,_(t)}catch(e){y(t,e)}var r,o}function y(t,e){t._state=2,t._value=e,_(t)}function _(t){2===t._state&&0===t._deferreds.length&&v._immediateFn((function(){t._handled||v._unhandledRejectionFn(t._value)}));for(var i=0,e=t._deferreds.length;i<e;i++)h(t,t._deferreds[i]);t._deferreds=null}function S(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function w(t,e){var n=!1;try{t((function(t){n||(n=!0,m(e,t))}),(function(t){n||(n=!0,y(e,t))}))}catch(t){if(n)return;n=!0,y(e,t)}}v.prototype.catch=function(t){return this.then(null,t)},v.prototype.then=function(t,e){var n=new this.constructor(l);return h(this,new S(t,e,n)),n},v.prototype.finally=r.a,v.all=function(t){return new v((function(e,n){if(!d(t))return n(new TypeError("Promise.all accepts an array"));var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);var o=r.length;function c(i,t){try{if(t&&("object"==typeof t||"function"==typeof t)){var f=t.then;if("function"==typeof f)return void f.call(t,(function(t){c(i,t)}),n)}r[i]=t,0==--o&&e(r)}catch(t){n(t)}}for(var i=0;i<r.length;i++)c(i,r[i])}))},v.any=c.a,v.allSettled=o.a,v.resolve=function(t){return t&&"object"==typeof t&&t.constructor===v?t:new v((function(e){e(t)}))},v.reject=function(t){return new v((function(e,n){n(t)}))},v.race=function(t){return new v((function(e,n){if(!d(t))return n(new TypeError("Promise.race accepts an array"));for(var i=0,r=t.length;i<r;i++)v.resolve(t[i]).then(e,n)}))},v._immediateFn="function"==typeof t&&function(e){t(e)}||function(t){f(t,0)},v._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},e.a=v}).call(this,n(382).setImmediate)},2507:function(t,e,n){"use strict";e.a=function(t){var e=this.constructor;return this.then((function(n){return e.resolve(t()).then((function(){return n}))}),(function(n){return e.resolve(t()).then((function(){return e.reject(n)}))}))}},2508:function(t,e,n){"use strict";e.a=function(t){return new this((function(e,n){if(!t||void 0===t.length)return n(new TypeError(typeof t+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);var o=r.length;function c(i,t){if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void n.call(t,(function(t){c(i,t)}),(function(t){r[i]={status:"rejected",reason:t},0==--o&&e(r)}))}r[i]={status:"fulfilled",value:t},0==--o&&e(r)}for(var i=0;i<r.length;i++)c(i,r[i])}))}},2509:function(t,e,n){"use strict";function r(t,e){this.name="AggregateError",this.errors=t,this.message=e||""}r.prototype=Error.prototype,e.a=function(t){var e=this;return new e((function(n,o){if(!t||void 0===t.length)return o(new TypeError("Promise.any accepts an array"));var c=Array.prototype.slice.call(t);if(0===c.length)return o();for(var f=[],i=0;i<c.length;i++)try{e.resolve(c[i]).then(n).catch((function(t){f.push(t),f.length===c.length&&o(new r(f,"All promises were rejected"))}))}catch(t){o(t)}}))}},2510:function(t,e,n){var r,o,c;!function(f,d){"use strict";o=[n(2511)],void 0===(c="function"==typeof(r=function(t){var e=/(^|@)\S+\:\d+/,n=/^\s*at .*(\S+\:\d+|\(native\))/m,r=/^(eval@)?(\[native code\])?$/;function o(t,e,n){if("function"==typeof Array.prototype.map)return t.map(e,n);for(var output=new Array(t.length),i=0;i<t.length;i++)output[i]=e.call(n,t[i]);return output}function c(t,e,n){if("function"==typeof Array.prototype.filter)return t.filter(e,n);for(var output=[],i=0;i<t.length;i++)e.call(n,t[i])&&output.push(t[i]);return output}function f(t,e){if("function"==typeof Array.prototype.indexOf)return t.indexOf(e);for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}return{parse:function(t){if(void 0!==t.stacktrace||void 0!==t["opera#sourceloc"])return this.parseOpera(t);if(t.stack&&t.stack.match(n))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error("Cannot parse given Error object")},extractLocation:function(t){if(-1===t.indexOf(":"))return[t];var e=/(.+?)(?:\:(\d+))?(?:\:(\d+))?$/.exec(t.replace(/[\(\)]/g,""));return[e[1],e[2]||void 0,e[3]||void 0]},parseV8OrIE:function(e){return o(c(e.stack.split("\n"),(function(line){return!!line.match(n)}),this),(function(line){line.indexOf("(eval ")>-1&&(line=line.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var e=line.replace(/^\s+/,"").replace(/\(eval code/g,"(").split(/\s+/).slice(1),n=this.extractLocation(e.pop()),r=e.join(" ")||void 0,o=f(["eval","<anonymous>"],n[0])>-1?void 0:n[0];return new t(r,void 0,o,n[1],n[2],line)}),this)},parseFFOrSafari:function(e){return o(c(e.stack.split("\n"),(function(line){return!line.match(r)}),this),(function(line){if(line.indexOf(" > eval")>-1&&(line=line.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),-1===line.indexOf("@")&&-1===line.indexOf(":"))return new t(line);var e=line.split("@"),n=this.extractLocation(e.pop()),r=e.join("@")||void 0;return new t(r,void 0,n[0],n[1],n[2],line)}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var n=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),o=[],i=2,c=r.length;i<c;i+=2){var f=n.exec(r[i]);f&&o.push(new t(void 0,void 0,f[2],f[1],void 0,r[i]))}return o},parseOpera10:function(e){for(var n=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),o=[],i=0,c=r.length;i<c;i+=2){var f=n.exec(r[i]);f&&o.push(new t(f[3]||void 0,void 0,f[2],f[1],void 0,r[i]))}return o},parseOpera11:function(n){return o(c(n.stack.split("\n"),(function(line){return!!line.match(e)&&!line.match(/^Error created at/)}),this),(function(line){var e,n=line.split("@"),r=this.extractLocation(n.pop()),o=n.shift()||"",c=o.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^\)]*\)/g,"")||void 0;o.match(/\(([^\)]*)\)/)&&(e=o.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var f=void 0===e||"[arguments not available]"===e?void 0:e.split(",");return new t(c,f,r[0],r[1],r[2],line)}),this)}}})?r.apply(e,o):r)||(t.exports=c)}()},2511:function(t,e,n){var r,o,c;!function(n,f){"use strict";o=[],void 0===(c="function"==typeof(r=function(){function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t,e,n,r,o,source){void 0!==t&&this.setFunctionName(t),void 0!==e&&this.setArgs(e),void 0!==n&&this.setFileName(n),void 0!==r&&this.setLineNumber(r),void 0!==o&&this.setColumnNumber(o),void 0!==source&&this.setSource(source)}return e.prototype={getFunctionName:function(){return this.functionName},setFunctionName:function(t){this.functionName=String(t)},getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("Args must be an Array");this.args=t},getFileName:function(){return this.fileName},setFileName:function(t){this.fileName=String(t)},getLineNumber:function(){return this.lineNumber},setLineNumber:function(e){if(!t(e))throw new TypeError("Line Number must be a Number");this.lineNumber=Number(e)},getColumnNumber:function(){return this.columnNumber},setColumnNumber:function(e){if(!t(e))throw new TypeError("Column Number must be a Number");this.columnNumber=Number(e)},getSource:function(){return this.source},setSource:function(t){this.source=String(t)},toString:function(){return(this.getFunctionName()||"{anonymous}")+("("+(this.getArgs()||[]).join(",")+")")+(this.getFileName()?"@"+this.getFileName():"")+(t(this.getLineNumber())?":"+this.getLineNumber():"")+(t(this.getColumnNumber())?":"+this.getColumnNumber():"")}},e})?r.apply(e,o):r)||(t.exports=c)}()},2953:function(t,e,n){"use strict";n.r(e);var r=n(2506),o={};d?o=window:"undefined"!=typeof self&&(o=self);var c="Promise"in o?o.Promise:r.a,f=[].slice,d="undefined"!=typeof window,l=d&&"undefined"!=typeof performance?performance:{};for(var v=[],h=0;h<256;++h)v[h]=(h+256).toString(16).substr(1);var m=new Uint8Array(16);function y(t){return function(t){for(var e=[],n=0;n<t.length;n++)e.push(v[t[n]]);return e.join("")}("undefined"!=typeof crypto&&"function"==typeof crypto.getRandomValues?crypto.getRandomValues(m):"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues?msCrypto.getRandomValues(m):m).substr(0,t)}function _(t,e,n){"function"==typeof t.setRequestHeader?t.setRequestHeader(e,n):t.headers&&"function"==typeof t.headers.append?t.headers.append(e,n):t[e]=n}function S(source,t){var e=!1;return"string"==typeof t?e=source===t:t&&"function"==typeof t.test?e=t.test(source):Array.isArray(t)&&t.forEach((function(t){e||(e=S(source,t))})),e}function w(){return d&&"function"==typeof Set&&"function"==typeof JSON.stringify&&l&&"function"==typeof l.now&&"withCredentials"in new window.XMLHttpRequest}function T(t,e,n){if(n&&t){var r=j(t),o=typeof e;return null!=e&&"boolean"!==o&&"number"!==o&&(e=String(e)),n[r]=e,n}}function E(t){return t&&t.split("?")[0]}function x(t){return null!==t&&"object"==typeof t}function I(t,e,n){for(var i=0,r=e.length;i<r;++i){var o=e[i];if(x(o)||"function"==typeof o)for(var c=Object.keys(o),f=0,d=c.length;f<d;f++){var l=c[f],v=o[l];n&&x(v)?(x(t[l])||(t[l]=Array.isArray(v)?[]:{}),I(t[l],[v],!1)):t[l]=v}}return t}function k(){if("undefined"!=typeof document){var t=document.currentScript;return t||function(){if("undefined"!=typeof document)for(var t=document.getElementsByTagName("script"),i=0,e=t.length;i<e;i++){var n=t[i];if(n.src.indexOf("elastic")>0)return n}}()}}function O(t){return I(t,f.call(arguments,1),!1)}function L(t){return I(t,f.call(arguments,1),!0)}function C(t){return void 0===t}function N(){}function j(t){return t.replace(/[.*"]/g,"_")}function R(t,e){for(var n=null,r=0;r<t.length;r++){var span=t[r];e&&e(span.type)&&(!n||n._end<span._end)&&(n=span)}return n}function F(){return l.now()}function A(time){return"number"==typeof time&&time>=0?time:F()}function P(t,e){return C(e)||C(t)?null:parseInt(e-t)}function M(t){c.resolve().then(t)}function D(){return"function"==typeof l.getEntriesByType}function H(t){return"undefined"!=typeof PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.indexOf(t)>=0}function U(){return"interactionCount"in performance}function z(t){return t.redirectStart>0}var B={fetchInProgress:!1};function V(t){return"__apm_symbol__"+t}function $(t,e,n){for(var r=t;r&&!r.hasOwnProperty(e);)r=Object.getPrototypeOf(r);!r&&t[e]&&(r=t);var o,c,f,d,l=V(e);if(r&&!(o=r[l])){o=r[l]=r[e];var desc=r&&Object.getOwnPropertyDescriptor(r,e);if(!(d=desc)||!1!==d.writable&&("function"!=typeof d.get||void 0!==d.set)){var v=n(o,l,e);r[e]=function(){return v(this,arguments)},c=r[e],f=o,c[V("OriginalDelegate")]=f}}return o}var J=V("xhrIgnore"),Y=V("xhrSync"),X=V("xhrURL"),G=V("xhrMethod"),Z="schedule",Q="invoke",W="addEventListener",K=["link","css","script","img","xmlhttprequest","fetch","beacon","iframe"],tt=3e5,et="page-load",nt="custom",it="user-interaction",at="http-request",ot="temporary",st="Unknown",ct="page-exit",ut=[et,"route-change",it,at,nt,ot],ft=60,lt="transaction:end",pt="config:change",vt="queue:flush",ht="queue:add_transaction",gt="transaction:ignore",mt="xmlhttprequest",yt="fetch",bt="history",_t="eventtarget",St="click",wt="error",Tt=":after",Et="elastic_apm_config",xt="longtask",It="largest-contentful-paint",kt="first-input",Ot="layout-shift",Lt="errors",Ct="transactions",Nt="ConfigService",jt="LoggingService",Rt="TransactionService",Ft="ApmServer",At="PerformanceMonitoring",qt="ErrorLogging",Pt=".truncated",Mt=1024;function Dt(t){var e=XMLHttpRequest.prototype;if(e&&e[W])var n="readystatechange",r="load",o="error",c=$(e,"open",(function(){return function(t,e){return t[J]||(t[G]=e[0],t[X]=e[1],t[Y]=!1===e[2]),c.apply(t,e)}})),f=$(e,"send",(function(){return function(e,c){if(e[J])return f.apply(e,c);var l={source:mt,state:"",type:"macroTask",data:{target:e,method:e[G],sync:e[Y],url:e[X],status:""}};try{return function(e){if(e.state!==Z){e.state=Z,t(Z,e);var c=e.data.target;f(n),f(r),f("timeout"),f(o),f("abort")}function f(t){c[W](t,(function(t){var o=t.type;o===n?4===c.readyState&&0!==c.status&&d(e,"success"):d(e,o===r?"success":o)}))}}(l),f.apply(e,c)}catch(t){throw d(l,o),t}}}));function d(e,n){e.state!==Q&&(e.state=Q,e.data.status=n,t(Q,e))}}function Ht(t){return!(0===t||t>399&&t<600)}function Ut(){return Ut=Object.assign||function(t){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var e in source)Object.prototype.hasOwnProperty.call(source,e)&&(t[e]=source[e])}return t},Ut.apply(this,arguments)}function zt(t,e){if(!Bt())return!1;if(!("keepalive"in new Request("")))return!1;var n=function(t){if(!t)return 0;if(t instanceof Blob)return t.size;return new Blob([t]).size}(e);return"POST"===t&&n<6e4}function Bt(){return"function"==typeof window.fetch&&"function"==typeof window.Request}function Vt(t){if(Bt()){var e=window.fetch;window.fetch=function(input,o){var f,d,l=this,v=arguments,h=input instanceof URL;if("string"==typeof input||h)f=new Request(input,o),d=h?f.url:input;else{if(!input)return e.apply(l,v);d=(f=input).url}var m={source:yt,state:"",type:"macroTask",data:{target:f,method:f.method,url:d,aborted:!1}};return new c((function(o,c){var d;B.fetchInProgress=!0,function(e){e.state=Z,t(Z,e)}(m);try{d=e.apply(l,[f])}catch(t){return c(t),m.data.error=t,n(m),void(B.fetchInProgress=!1)}d.then((function(t){var e=t.clone?t.clone():{};o(t),M((function(){m.data.response=t;var body=e.body;body?function(t,e){var o=t.getReader();!function t(){o.read().then((function(r){r.done?n(e):t()}),(function(t){r(e,t)}))}()}(body,m):n(m)}))}),(function(t){c(t),M((function(){r(m,t)}))})),B.fetchInProgress=!1}))}}function n(e){e.state=Q,t(Q,e)}function r(t,e){t.data.aborted=function(t){return t&&"AbortError"===t.name}(e),t.data.error=e,n(t)}}var $t=function(){function t(){this.observers={}}var e=t.prototype;return e.observe=function(t,e){var n=this;if("function"==typeof e)return this.observers[t]||(this.observers[t]=[]),this.observers[t].push(e),function(){var r=n.observers[t].indexOf(e);r>-1&&n.observers[t].splice(r,1)}},e.sendOnly=function(t,e){var n=this.observers[t];n&&n.forEach((function(t){try{t.apply(void 0,e)}catch(t){console.log(t,t.stack)}}))},e.send=function(t,e){this.sendOnly(t+":before",e),this.sendOnly(t,e),this.sendOnly(t+Tt,e)},t}(),Jt=new $t,Yt=!1;function Xt(){return Yt||(Yt=!0,Dt((function(t,e){Jt.send(mt,[t,e])})),Vt((function(t,e){Jt.send(yt,[t,e])})),function(t){if(window.history){var e=history.pushState;"function"==typeof e&&(history.pushState=function(n,title,r){t(Q,{source:bt,data:{state:n,title:title,url:r}}),e.apply(this,arguments)})}}((function(t,e){Jt.send(bt,[t,e])}))),Jt}var Gt=!1,Zt={bootstrapTime:null,lastHiddenStart:Number.MIN_SAFE_INTEGER},Qt=!1;function Wt(t,e){var n=e.error,r=e.filename,o=e.lineno,c=e.colno,f=[];if(n)try{f=t.parse(n)}catch(t){}return function(t){return 0!==t.length&&(1!==t.length||"lineNumber"in t[0])}(f)||(f=[{fileName:r,lineNumber:o,columnNumber:c}]),f.map((function(t){return t.functionName&&(t.functionName=(e=t.functionName,n=e.split("/"),e=n.length>1?["Object",n[n.length-1]].join("."):n[0],e=(n=(e=(e=e.replace(/.<$/gi,".<anonymous>")).replace(/^Anonymous function$/,"<anonymous>")).split(".")).length>1?n[n.length-1]:n[0])),t;var e,n})).map((function(t){var e=t.fileName,n=t.lineNumber,r=t.columnNumber,o=t.functionName,c=void 0===o?"<anonymous>":o;if(!e&&!n)return{};if(!r&&!n)return{};var f,d,l=function(t){return void 0===t&&(t=""),"<anonymous>"===t&&(t=""),t}(e),v=(f=l,d=window.location.origin||window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""),f.indexOf(d)>-1&&(f=f.replace(d+"/","")),f);return function(t){return!!t&&0===window.location.href.indexOf(t)}(l)&&(v="(inline script)"),{abs_path:e,filename:v,function:c,lineno:n,colno:r}}))}var Kt=[["#","hash"],["?","query"],["/","path"],["@","auth",1],[NaN,"host",void 0,1]],te=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,ee=function(){function t(t){var e,n=this.extractProtocol(t||""),r=n.protocol,address=n.address,o=n.slashes,c=!r&&!o,f=this.getLocation(),d=Kt.slice();address=address.replace("\\","/"),o||(d[2]=[NaN,"path"]);for(var i=0;i<d.length;i++){var l=d[i],v=l[0],h=l[1];if("string"==typeof v){if(~(e=address.indexOf(v))){var m=l[2];if(m){var y=address.lastIndexOf(v);e=Math.max(e,y),this[h]=address.slice(0,e),address=address.slice(e+m)}else this[h]=address.slice(e),address=address.slice(0,e)}}else this[h]=address,address="";this[h]=this[h]||c&&l[3]&&f[h]||"",l[3]&&(this[h]=this[h].toLowerCase())}if(c&&"/"!==this.path.charAt(0)&&(this.path="/"+this.path),this.relative=c,this.protocol=r||f.protocol,this.hostname=this.host,this.port="",/:\d+$/.test(this.host)){var _=this.host.split(":"),S=_.pop(),w=_.join(":");!function(t,e){switch(e){case"http:":return"80"===t;case"https:":return"443"===t}return!0}(S,this.protocol)?this.port=S:this.host=w,this.hostname=w}this.origin=this.protocol&&this.host&&"file:"!==this.protocol?this.protocol+"//"+this.host:"null",this.href=this.toString()}var e=t.prototype;return e.toString=function(){var t=this.protocol;if(t+="//",this.auth){var e="[REDACTED]",n=this.auth.split(":");t+=(n[0]?e:"")+(n[1]?":"+e:"")+"@"}return t+=this.host,t+=this.path,t+=this.query,t+=this.hash},e.getLocation=function(){var t={};return d&&(t=window),t.location},e.extractProtocol=function(t){var e=te.exec(t);return{protocol:e[1]?e[1].toLowerCase():"",slashes:!!e[2],address:e[3]}},t}();var ne=["tags"];var re=91,ie=93;function ae(t){var e={transfer_size:t.transferSize,encoded_body_size:t.encodedBodySize,decoded_body_size:t.decodedBodySize},n=function(t){void 0===t&&(t=[]);for(var e=[],n=0;n<t.length;n++){var r=t[n],o=r.name,c=r.duration,f=r.description,d=o;f&&(d+=";desc="+f),c&&(d+=";dur="+c),e.push(d)}return e.join(", ")}(t.serverTiming);return n&&(e.headers={"server-timing":n}),e}function oe(t){var e=t.port,n=t.protocol,r=t.hostname,o=function(t,e){return""===t&&(t="http:"===e?"80":"https:"===e?"443":""),t}(e,n),c=r.charCodeAt(0)===re&&r.charCodeAt(r.length-1)===ie,address=r;return c&&(address=r.slice(1,-1)),{service:{resource:r+":"+o,name:"",type:""},address:address,port:Number(o)}}function se(){return{page:{referer:document.referrer,url:location.href}}}function ce(span,data){if(data){var t;switch(span.type){case"external":t=function(data){var t,e=data.url,n=data.method,r=data.target,o=data.response,c=new ee(e),f=oe(c),d={http:{method:n,url:c.href},destination:f};return r&&void 0!==r.status?t=r.status:o&&(t=o.status),d.http.status_code=t,d}(data);break;case"resource":t=function(data){var t=data.entry,e=data.url,n=oe(new ee(e));return{http:{url:e,response:ae(t)},destination:n}}(data);break;case"hard-navigation":t=function(data){var t=data.url;return{destination:oe(new ee(t))}}(data)}span.addContext(t)}}function ue(t,e){var n=void 0===e?{}:e,r=(n.tags,function(source,t){if(null==source)return{};var e,i,n={},r=Object.keys(source);for(i=0;i<r.length;i++)e=r[i],t.indexOf(e)>=0||(n[e]=source[e]);return n}(n,ne)),o=se(),c={};if(t.type===ct)t.ensureContext(),t.context.page&&t.context.page.url&&(o.page.url=t.context.page.url);else if(t.type===et&&D()){var f=l.getEntriesByType("navigation");f&&f.length>0&&(c={response:ae(f[0])})}t.addContext(o,c,r)}var fe={service:{name:[Mt,!0],version:!0,agent:{version:[Mt,!0]},environment:!0},labels:{"*":!0}},de={"*":!0,headers:{"*":!0}},le={user:{id:!0,email:!0,username:!0},tags:{"*":!0},http:{response:de},destination:{address:[Mt],service:{"*":[Mt,!0]}},response:de},pe={name:[Mt,!0],type:[Mt,!0],id:[Mt,!0],trace_id:[Mt,!0],parent_id:[Mt,!0],transaction_id:[Mt,!0],subtype:!0,action:!0,context:le},ve={name:!0,parent_id:!0,type:[Mt,!0],id:[Mt,!0],trace_id:[Mt,!0],span_count:{started:[Mt,!0]},context:le},he={id:[Mt,!0],trace_id:!0,transaction_id:!0,parent_id:!0,culprit:!0,exception:{type:!0},transaction:{type:!0},context:le};function ge(t){return null==t||""===t||void 0===t}function me(t,e,n){var r=function(t,e,n,r){return void 0===e&&(e=Mt),void 0===n&&(n=!1),void 0===r&&(r="N/A"),n&&ge(t)&&(t=r),"string"==typeof t?t.substring(0,e):t}(t[e],n[0],n[1]);ge(r)?delete t[e]:t[e]=r}function ye(t,e,n){void 0===t&&(t={}),void 0===n&&(n=e);for(var r=Object.keys(t),o=[],c=function(i){var c=r[i],f=!0===t[c]?o:t[c];Array.isArray(f)?"*"===c?Object.keys(n).forEach((function(t){return me(n,t,f)})):me(n,c,f):ye(f,e,n[c])},i=0;i<r.length;i++)c(i);return e}var be=n(2510),_e=n.n(be),Se=["tags"];var we=["stack","message"],Te="Unhandled promise rejection: ";var Ee=function(){function t(t,e,n){this._apmServer=t,this._configService=e,this._transactionService=n}var e=t.prototype;return e.createErrorDataModel=function(t){var e=function(t){return t.filter((function(t){var e=t.filename,n=t.lineno;return void 0!==e&&void 0!==n}))}(Wt(_e.a,t)),n="(inline script)",r=e[e.length-1];r&&r.filename&&(n=r.filename);var o=t.message,c=t.error,f=o,d="",l={};if(c&&"object"==typeof c){f=f||c.message,d=c.name;var v=function(t){var e=!1,n={};if(Object.keys(t).forEach((function(r){if(!(we.indexOf(r)>=0)){var o=t[r];if(null!=o&&"function"!=typeof o){if("object"==typeof o){if("function"!=typeof o.toISOString)return;o=o.toISOString()}n[r]=o,e=!0}}})),e)return n}(c);v&&(l.custom=v)}d||f&&f.indexOf(":")>-1&&(d=f.split(":")[0]);var h=this._transactionService.getCurrentTransaction(),m=h?h.context:{},_=this._configService.get("context"),S=(_.tags,function(source,t){if(null==source)return{};var e,i,n={},r=Object.keys(source);for(i=0;i<r.length;i++)e=r[i],t.indexOf(e)>=0||(n[e]=source[e]);return n}(_,Se)),w=L({},se(),m,S,l),T={id:y(),culprit:n,exception:{message:f,stacktrace:e,type:d},context:w};return h&&(T=O(T,{trace_id:h.traceId,parent_id:h.id,transaction_id:h.id,transaction:{type:h.type,sampled:h.sampled}})),ye(he,T)},e.logErrorEvent=function(t){if(void 0!==t){var e=this.createErrorDataModel(t);void 0!==e.exception.message&&this._apmServer.addError(e)}},e.registerListeners=function(){var t=this;window.addEventListener("error",(function(e){return t.logErrorEvent(e)})),window.addEventListener("unhandledrejection",(function(e){return t.logPromiseEvent(e)}))},e.logPromiseEvent=function(t){var e,n=t.reason;if(null==n&&(n="<no reason specified>"),"string"==typeof n.message){var r=n.name?n.name+": ":"";e={error:n,message:Te+r+n.message}}else e=this._parseRejectReason(n);this.logErrorEvent(e)},e.logError=function(t){var e={};return"string"==typeof t?e.message=t:e.error=t,this.logErrorEvent(e)},e._parseRejectReason=function(t){var e={message:Te};if(Array.isArray(t))e.message+="<object>";else if("object"==typeof t)try{e.message+=JSON.stringify(t),e.error=t}catch(t){e.message+="<object>"}else e.message+="function"==typeof t?"<function>":t;return e},t}(),xe=function(){function t(t,e){void 0===e&&(e={}),this.onFlush=t,this.items=[],this.queueLimit=e.queueLimit||-1,this.flushInterval=e.flushInterval||0,this.timeoutId=void 0}var e=t.prototype;return e._setTimer=function(){var t=this;this.timeoutId=setTimeout((function(){return t.flush()}),this.flushInterval)},e._clear=function(){void 0!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=void 0),this.items=[]},e.flush=function(){this.onFlush(this.items),this._clear()},e.add=function(t){this.items.push(t),-1!==this.queueLimit&&this.items.length>=this.queueLimit?this.flush():void 0===this.timeoutId&&this._setTimer()},t}();var Ie=function(){function t(){}return t.stringify=function(object){return JSON.stringify(object)+"\n"},t}(),ke=["fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","requestStart","responseStart","responseEnd","domLoading","domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","loadEventStart","loadEventEnd"],Oe=["fs","ls","le","cs","ce","qs","rs","re","dl","di","ds","de","dc","es","ee"];function Le(t){var e=function(t){var e=t.redirectStart,n=t.fetchStart,r=t.navigationStart,o=t.responseStart,c=t.responseEnd;if(n>=r&&o>=n&&c>=o){var f={};return ke.forEach((function(r){var o=t[r];o&&o>=n&&(z(t)?f[r]=parseInt(o-e):f[r]=parseInt(o-n))})),f}return null}(t);return null==e?null:{navigationTiming:e,agent:{timeToFirstByte:e.responseStart,domInteractive:e.domInteractive,domComplete:e.domComplete}}}function Ce(t){return{ts:t.transfer_size,ebs:t.encoded_body_size,dbs:t.decoded_body_size}}function Ne(t){if(!t)return null;var e={},n=t.page,r=t.http,o=t.response,c=t.destination,f=t.user,d=t.custom;if(n&&(e.p={rf:n.referer,url:n.url}),r&&(e.h=function(t){var e={},n=t.method,r=t.status_code,o=t.url,c=t.response;return e.url=o,n&&(e.mt=n),r&&(e.sc=r),c&&(e.r=Ce(c)),e}(r)),o&&(e.r=Ce(o)),c){var l=c.service;e.dt={se:{n:l.name,t:l.type,rc:l.resource},ad:c.address,po:c.port}}return f&&(e.u={id:f.id,un:f.username,em:f.email}),d&&(e.cu=d),e}function je(t){if(!t)return null;var e=function(t){if(!t)return null;var e={};return Oe.forEach((function(mark,n){var r=ke[n];e[mark]=t[r]})),e}(t.navigationTiming);return{nt:e,a:Re(e,t.agent)}}function Re(t,e){var n={};if(t&&(n={fb:t.rs,di:t.di,dc:t.dc}),e){var r=e.firstContentfulPaint,o=e.largestContentfulPaint;r&&(n.fp=r),o&&(n.lp=o)}return 0===Object.keys(n).length?null:n}function Fe(t,e){void 0===e&&(e="gzip");var n="function"==typeof CompressionStream;return new c((function(r){if(!n)return r(t);if(function(){var t="_elastic_inspect_beacon_";if(null!=sessionStorage.getItem(t))return!0;if(!window.URL||!window.URLSearchParams)return!1;try{var e=new URL(window.location.href).searchParams.has(t);return e&&sessionStorage.setItem(t,!0),e}catch(t){}return!1}())return r(t);var o=t.payload,c=t.headers,f=t.beforeSend,d=new Blob([o]).stream().pipeThrough(new CompressionStream(e));return new Response(d).blob().then((function(t){return c["Content-Encoding"]=e,r({payload:t,headers:c,beforeSend:f})}))}))}function Ae(t,e,n){var r=n.timeout,o=void 0===r?HTTP_REQUEST_TIMEOUT:r,f=n.payload,d=n.headers,l=n.beforeSend,v=n.sendCredentials;return new c((function(n,r){var c=new window.XMLHttpRequest;if(c[J]=!0,c.open(t,e,!0),c.timeout=o,c.withCredentials=v,d)for(var header in d)d.hasOwnProperty(header)&&c.setRequestHeader(header,d[header]);c.onreadystatechange=function(){if(4===c.readyState){var t=c.status,o=c.responseText;Ht(t)?n(c):r({url:e,status:t,responseText:o})}},c.onerror=function(){var t=c.status,n=c.responseText;r({url:e,status:t,responseText:n})};var h=!0;"function"==typeof l&&(h=l({url:e,method:t,headers:d,payload:f,xhr:c})),h?c.send(f):r({url:e,status:0,responseText:"Request rejected by user configuration."})}))}var qe=function(){function t(t,e){this._configService=t,this._loggingService=e,this.queue=void 0,this.throttleEvents=N}var e=t.prototype;return e.init=function(){var t=this,e=this._configService.get("queueLimit"),n=this._configService.get("flushInterval"),r=this._configService.get("eventsLimit");this.queue=new xe((function(e){var n=t.sendEvents(e);n&&n.catch((function(e){t._loggingService.warn("Failed sending events!",t._constructError(e))}))}),{queueLimit:e,flushInterval:n}),this.throttleEvents=function(t,e,n){var r,o=this,c=n.limit,f=n.interval,d=0;return function(){return d++,void 0===r&&(r=setTimeout((function(){d=0,r=void 0}),f)),d>c&&"function"==typeof e?e.apply(o,arguments):t.apply(o,arguments)}}(this.queue.add.bind(this.queue),(function(){return t._loggingService.warn("Dropped events due to throttling!")}),{limit:r,interval:6e4}),this._configService.observeEvent(vt,(function(){t.queue.flush()}))},e._postJson=function(t,e){var n=this,r={payload:e,headers:{"Content-Type":"application/x-ndjson"},beforeSend:this._configService.get("apmRequest")};return Fe(r).catch((function(t){return r})).then((function(e){return n._makeHttpRequest("POST",t,e)})).then((function(t){return t.responseText}))},e._constructError=function(t){var e=t.url,n=t.status;t.responseText;if(void 0===n)return t;var r=e+" HTTP status: "+n;return new Error(r)},e._makeHttpRequest=function(t,e,n){var r=void 0===n?{}:n,o=r.timeout,c=void 0===o?1e4:o,f=r.payload,d=r.headers,l=r.beforeSend,v=this._configService.get("sendCredentials");return!l&&zt(t,f)?function(t,e,n){var r,o=n.keepalive,c=void 0!==o&&o,f=n.timeout,d=void 0===f?1e4:f,l=n.payload,v=n.headers,h=n.sendCredentials,m={};if("function"==typeof AbortController){var y=new AbortController;m.signal=y.signal,setTimeout((function(){return y.abort()}),d)}return window.fetch(e,Ut({body:l,headers:v,method:t,keepalive:c,credentials:h?"include":"omit"},m)).then((function(t){return(r=t).text()})).then((function(t){var n={url:e,status:r.status,responseText:t};if(!Ht(r.status))throw n;return n}))}(t,e,{keepalive:!0,timeout:c,payload:f,headers:d,sendCredentials:v}).catch((function(n){if(n instanceof TypeError)return Ae(t,e,{timeout:c,payload:f,headers:d,beforeSend:l,sendCredentials:v});throw n})):Ae(t,e,{timeout:c,payload:f,headers:d,beforeSend:l,sendCredentials:v})},e.fetchConfig=function(t,e){var n=this,r=this.getEndpoints().configEndpoint;if(!t)return c.reject("serviceName is required for fetching central config.");r+="?service.name="+t,e&&(r+="&service.environment="+e);var o=this._configService.getLocalConfig();o&&(r+="&ifnonematch="+o.etag);var f=this._configService.get("apmRequest");return this._makeHttpRequest("GET",r,{timeout:5e3,beforeSend:f}).then((function(t){var e=t.status,r=t.responseText;if(304===e)return o;var c=JSON.parse(r),f=t.getResponseHeader("etag");return f&&(c.etag=f.replace(/["]/g,""),n._configService.setLocalConfig(c,!0)),c})).catch((function(t){var e=n._constructError(t);return c.reject(e)}))},e.createMetaData=function(){var t=this._configService,e={service:{name:t.get("serviceName"),version:t.get("serviceVersion"),agent:{name:"rum-js",version:t.version},language:{name:"javascript"},environment:t.get("environment")},labels:t.get("context.tags")};return ye(fe,e)},e.addError=function(t){var e;this.throttleEvents(((e={})[Lt]=t,e))},e.addTransaction=function(t){var e;this.throttleEvents(((e={})[Ct]=t,e))},e.ndjsonErrors=function(t,e){var n=e?"e":"error";return t.map((function(t){var r;return Ie.stringify(((r={})[n]=e?function(t){var e,n=t.exception,r={id:t.id,cl:t.culprit,ex:{mg:n.message,st:(e=n.stacktrace,e.map((function(t){return{ap:t.abs_path,f:t.filename,fn:t.function,li:t.lineno,co:t.colno}}))),t:t.type},c:Ne(t.context)},o=t.transaction;return o&&(r.tid=t.trace_id,r.pid=t.parent_id,r.xid=t.transaction_id,r.x={t:o.type,sm:o.sampled}),r}(t):t,r))}))},e.ndjsonMetricsets=function(t){return t.map((function(t){return Ie.stringify({metricset:t})})).join("")},e.ndjsonTransactions=function(t,e){var n=this,r=e?"x":"transaction";return t.map((function(tr){var t,o="",c="";return e||(tr.spans&&(o=tr.spans.map((function(span){return Ie.stringify({span:span})})).join(""),delete tr.spans),tr.breakdown&&(c=n.ndjsonMetricsets(tr.breakdown),delete tr.breakdown)),Ie.stringify(((t={})[r]=e?function(t){var e,n=t.spans.map((function(span){var e={id:span.id,n:span.name,t:span.type,s:span.start,d:span.duration,c:Ne(span.context),o:span.outcome,sr:span.sample_rate};return span.parent_id!==t.id&&(e.pid=span.parent_id),!0===span.sync&&(e.sy=!0),span.subtype&&(e.su=span.subtype),span.action&&(e.ac=span.action),e})),tr={id:t.id,tid:t.trace_id,n:t.name,t:t.type,d:t.duration,c:Ne(t.context),k:je(t.marks),me:(e=t.breakdown,e.map((function(t){var span=t.span,e=t.samples;return{y:{t:span.type},sa:{ysc:{v:e["span.self_time.count"].value},yss:{v:e["span.self_time.sum.us"].value}}}}))),y:n,yc:{sd:n.length},sm:t.sampled,sr:t.sample_rate,o:t.outcome};if(t.experience){var r=t.experience,o=r.cls,c=r.fid,f=r.tbt,d=r.longtask;tr.exp={cls:o,fid:c,tbt:f,lt:d}}if(t.session){var l=t.session,v=l.id,h=l.sequence;tr.ses={id:v,seq:h}}return tr}(tr):tr,t))+o+c}))},e.sendEvents=function(t){var e,n;if(0!==t.length){for(var r=[],o=[],i=0;i<t.length;i++){var c=t[i];c[Ct]&&r.push(c[Ct]),c[Lt]&&o.push(c[Lt])}if(0!==r.length||0!==o.length){var f=this._configService,d=((e={})[Ct]=r,e[Lt]=o,e),l=f.applyFilters(d);if(l){var v=f.get("apiVersion")>2,h=[],m=this.createMetaData(),y=v?"m":"metadata";h.push(Ie.stringify(((n={})[y]=v?function(t){var e=t.service,n=t.labels,r=e.agent,o=e.language;return{se:{n:e.name,ve:e.version,a:{n:r.name,ve:r.version},la:{n:o.name},en:e.environment},l:n}}(m):m,n)));var _=(h=h.concat(this.ndjsonErrors(l[Lt],v),this.ndjsonTransactions(l[Ct],v))).join(""),S=this.getEndpoints().intakeEndpoint;return this._postJson(S,_)}this._loggingService.warn("Dropped payload due to filtering!")}}},e.getEndpoints=function(){var t=this._configService.get("serverUrl"),e=this._configService.get("apiVersion");return{intakeEndpoint:t+(this._configService.get("serverUrlPrefix")||"/intake/v"+e+"/rum/events"),configEndpoint:t+"/config/v1/rum/agents"}},t}(),Pe=qe;function Me(){return Me=Object.assign||function(t){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var e in source)Object.prototype.hasOwnProperty.call(source,e)&&(t[e]=source[e])}return t},Me.apply(this,arguments)}var De,He=function(){function t(){this.config={serviceName:"",serviceVersion:"",environment:"",serverUrl:"http://localhost:8200",serverUrlPrefix:"",active:!0,instrument:!0,disableInstrumentations:[],logLevel:"warn",breakdownMetrics:!1,ignoreTransactions:[],eventsLimit:80,queueLimit:-1,flushInterval:500,distributedTracing:!0,distributedTracingOrigins:[],distributedTracingHeaderName:"traceparent",pageLoadTraceId:"",pageLoadSpanId:"",pageLoadSampled:!1,pageLoadTransactionName:"",propagateTracestate:!1,transactionSampleRate:1,centralConfig:!1,monitorLongtasks:!0,apiVersion:2,context:{},session:!1,apmRequest:null,sendCredentials:!1},this.events=new $t,this.filters=[],this.version=""}var e=t.prototype;return e.init=function(){var t=function(t){if(!t)return{};for(var e={},n=/^data-([\w-]+)$/,r=t.attributes,i=0;i<r.length;i++){var o=r[i];n.test(o.nodeName)&&(e[o.nodeName.match(n)[1].split("-").map((function(t,e){return e>0?t.charAt(0).toUpperCase()+t.substring(1):t})).join("")]=o.value||o.nodeValue)}return e}(k());this.setConfig(t)},e.setVersion=function(t){this.version=t},e.addFilter=function(t){if("function"!=typeof t)throw new Error("Argument to must be function");this.filters.push(t)},e.applyFilters=function(data){for(var i=0;i<this.filters.length;i++)if(!(data=this.filters[i](data)))return;return data},e.get=function(t){return t.split(".").reduce((function(t,e){return t&&t[e]}),this.config)},e.setUserContext=function(t){void 0===t&&(t={});var e={},n=t,r=n.id,o=n.username,c=n.email;"number"!=typeof r&&"string"!=typeof r||(e.id=r),"string"==typeof o&&(e.username=o),"string"==typeof c&&(e.email=c),this.config.context.user=O(this.config.context.user||{},e)},e.setCustomContext=function(t){void 0===t&&(t={}),this.config.context.custom=O(this.config.context.custom||{},t)},e.addLabels=function(t){var e=this;this.config.context.tags||(this.config.context.tags={}),Object.keys(t).forEach((function(n){return T(n,t[n],e.config.context.tags)}))},e.setConfig=function(t){void 0===t&&(t={});var e=t,n=e.transactionSampleRate,r=e.serverUrl;r&&(t.serverUrl=r.replace(/\/+$/,"")),C(n)||(n<1e-4&&n>0&&(n=1e-4),t.transactionSampleRate=Math.round(1e4*n)/1e4),L(this.config,t),this.events.send(pt,[this.config])},e.validate=function(t){void 0===t&&(t={});var e=["serviceName","serverUrl"],n=Object.keys(this.config),r={missing:[],invalid:[],unknown:[]};Object.keys(t).forEach((function(o){-1===e.indexOf(o)||t[o]||r.missing.push(o),-1===n.indexOf(o)&&r.unknown.push(o)})),t.serviceName&&!/^[a-zA-Z0-9 _-]+$/.test(t.serviceName)&&r.invalid.push({key:"serviceName",value:t.serviceName,allowed:"a-z, A-Z, 0-9, _, -, <space>"});var o=t.transactionSampleRate;return void 0!==o&&("number"!=typeof o||isNaN(o)||o<0||o>1)&&r.invalid.push({key:"transactionSampleRate",value:o,allowed:"Number between 0 and 1"}),r},e.getLocalConfig=function(){var t=sessionStorage;this.config.session&&(t=localStorage);var e=t.getItem(Et);if(e)return JSON.parse(e)},e.setLocalConfig=function(t,e){if(t){if(e)t=Me({},this.getLocalConfig(),t);var n=sessionStorage;this.config.session&&(n=localStorage),n.setItem(Et,JSON.stringify(t))}},e.dispatchEvent=function(t,e){this.events.send(t,e)},e.observeEvent=function(t,e){return this.events.observe(t,e)},t}(),Ue=function(){function t(t){void 0===t&&(t={}),this.levels=["trace","debug","info","warn","error"],this.level=t.level||"warn",this.prefix=t.prefix||"",this.resetLogMethods()}var e=t.prototype;return e.shouldLog=function(t){return this.levels.indexOf(t)>=this.levels.indexOf(this.level)},e.setLevel=function(t){t!==this.level&&(this.level=t,this.resetLogMethods())},e.resetLogMethods=function(){var t=this;this.levels.forEach((function(e){t[e]=t.shouldLog(e)?function(){var t=e;"trace"!==e&&"debug"!==e||(t="info");var n=arguments;if(n[0]=this.prefix+n[0],console){var r=console[t]||console.log;"function"==typeof r&&r.apply(console,n)}}:N}))},t}(),ze=Ue,Be=((De={})[Nt]=function(){return new He},De[jt]=function(){return new ze({prefix:"[Elastic APM] "})},De[Ft]=function(t){var e=t.getService([Nt,jt]),n=e[0],r=e[1];return new Pe(n,r)},De),Ve=function(){function t(){this.instances={},this.initialized=!1}var e=t.prototype;return e.init=function(){if(!this.initialized){this.initialized=!0;var t=this.getService(Nt);t.init();var e=this.getService([jt,Ft]),n=e[0],r=e[1];t.events.observe(pt,(function(){var e=t.get("logLevel");n.setLevel(e)})),r.init()}},e.getService=function(t){var e=this;return"string"==typeof t?(this.instances[t]||"function"==typeof Be[t]&&(this.instances[t]=Be[t](this)),this.instances[t]):Array.isArray(t)?t.map((function(t){return e.getService(t)})):void 0},t}();var $e=function(){function t(t,e,n,r){this._apmServer=t,this._configService=e,this._logginService=n,this._transactionService=r}var e=t.prototype;return e.init=function(t){var e=this;void 0===t&&(t={}),this._configService.events.observe(lt+Tt,(function(tr){var t=e.createTransactionPayload(tr);t&&(e._apmServer.addTransaction(t),e._configService.dispatchEvent(ht))})),t[bt]&&Jt.observe(bt,this.getHistorySub()),t[mt]&&Jt.observe(mt,this.getXHRSub()),t[yt]&&Jt.observe(yt,this.getFetchSub())},e.getHistorySub=function(){var t=this._transactionService;return function(e,n){n.source===bt&&e===Q&&t.startTransaction(n.data.title,"route-change",{managed:!0,canReuse:!0})}},e.getXHRSub=function(){var t=this;return function(e,n){n.source!==mt||B.fetchInProgress||t.processAPICalls(e,n)}},e.getFetchSub=function(){var t=this;return function(e,n){n.source===yt&&t.processAPICalls(e,n)}},e.processAPICalls=function(t,e){var n=this._configService,r=this._transactionService;if(e.data&&e.data.url){var o=this._apmServer.getEndpoints();if(Object.keys(o).some((function(t){return-1!==e.data.url.indexOf(o[t])})))return}if(t===Z&&e.data){var data=e.data,c=new ee(data.url),f=data.method+" "+(c.relative?c.path:E(c.href));r.getCurrentTransaction()||r.startTransaction(f,at,{managed:!0});var span=r.startSpan(f,"external.http",{blocking:!0});if(!span)return;var d=n.get("distributedTracing"),l=n.get("distributedTracingOrigins"),v=new ee(window.location.href),h=S(c.origin,v.origin)||S(c.origin,l),m=data.target;if(d&&h&&m)this.injectDtHeader(span,m),n.get("propagateTracestate")&&this.injectTSHeader(span,m);else Gt;data.sync&&(span.sync=data.sync),data.span=span}else if(t===Q){var y=e.data;if(y&&y.span){var _,w,T=y.span,x=y.response,I=y.target;_=x?x.status:I.status,w="abort"==y.status||y.aborted?"unknown":_>=400||0==_?"failure":"success",T.outcome=w;var tr=r.getCurrentTransaction();tr&&tr.type===at&&(tr.outcome=w),r.endSpan(T,y)}}},e.injectDtHeader=function(span,t){var header,e=this._configService.get("distributedTracingHeaderName"),n=function(span){if(span&&span.traceId&&span.id&&span.parentId){var t=span.sampled?"01":"00",e=span.sampled?span.id:span.parentId;return"00-"+span.traceId+"-"+e+"-"+t}}(span);/^[\da-f]{2}-[\da-f]{32}-[\da-f]{16}-[\da-f]{2}$/.test(header=n)&&"00000000000000000000000000000000"!==header.slice(3,35)&&"0000000000000000"!==header.slice(36,52)&&n&&e&&_(t,e,n)},e.injectTSHeader=function(span,t){var e=function(t){var e=t.sampleRate;if(!("number"!=typeof e||String(e).length>256))return"es=s:"+e}(span);e&&_(t,"tracestate",e)},e.extractDtHeader=function(t){var e=this._configService.get("distributedTracingHeaderName");if(t)return function(t){var e=/^([\da-f]{2})-([\da-f]{32})-([\da-f]{16})-([\da-f]{2})$/.exec(t);if(e){var n="00"!==e[4];return{traceId:e[2],id:e[3],sampled:n}}}(t[e])},e.filterTransaction=function(tr){var t=tr.duration();if(!t)return!1;if(tr.isManaged()){if(t>6e4)return!1;if(tr.sampled&&0===tr.spans.length)return!1}return!0},e.createTransactionDataModel=function(t){var e=t._start,n=t.spans.map((function(span){var n={id:span.id,transaction_id:t.id,parent_id:span.parentId||t.id,trace_id:t.traceId,name:span.name,type:span.type,subtype:span.subtype,action:span.action,sync:span.sync,start:parseInt(span._start-e),duration:span.duration(),context:span.context,outcome:span.outcome,sample_rate:span.sampleRate};return ye(pe,n)})),r={id:t.id,trace_id:t.traceId,session:t.session,name:t.name,type:t.type,duration:t.duration(),spans:n,context:t.context,marks:t.marks,breakdown:t.breakdownTimings,span_count:{started:n.length},sampled:t.sampled,sample_rate:t.sampleRate,experience:t.experience,outcome:t.outcome};return ye(ve,r)},e.createTransactionPayload=function(t){var e=function(t){if(t.sampled){var e=t.spans.filter((function(span){return span.duration()>0&&span._start>=t._start&&span._end<=t._end}));if(t.isManaged()){var n=function(t,e,n){t.sort((function(t,e){return t._start-e._start}));var r=[],o=1;return t.forEach((function(span,c){if(0===r.length)r.push(span);else{var f=r[r.length-1],d=f.type===span.type&&f.subtype===span.subtype&&f.action===span.action&&f.name===span.name&&span.duration()/e<n&&(span._start-f._end)/e<n,l=t.length===c+1;d&&(o++,f._end=span._end),o>1&&(!d||l)&&(f.name=o+"x "+f.name,o=1),d||r.push(span)}})),r}(e,t.duration(),.05);t.spans=n}else t.spans=e}else t.resetFields();return t}(t);if(this.filterTransaction(e))return this.createTransactionDataModel(t);this._configService.dispatchEvent(gt)},t}(),Je=function(){function t(t,e,n){void 0===n&&(n={}),t||(t=st),e||(e=nt),this.name=t,this.type=e,this.options=n,this.id=n.id||y(16),this.traceId=n.traceId,this.sampled=n.sampled,this.sampleRate=n.sampleRate,this.timestamp=n.timestamp,this._start=A(n.startTime),this._end=void 0,this.ended=!1,this.outcome=void 0,this.onEnd=n.onEnd}var e=t.prototype;return e.ensureContext=function(){this.context||(this.context={})},e.addLabels=function(t){this.ensureContext();var e=this.context;e.tags||(e.tags={}),Object.keys(t).forEach((function(n){return T(n,t[n],e.tags)}))},e.addContext=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];0!==e.length&&(this.ensureContext(),L.apply(void 0,[this.context].concat(e)))},e.end=function(t){this.ended||(this.ended=!0,this._end=A(t),this.callOnEnd())},e.callOnEnd=function(){"function"==typeof this.onEnd&&this.onEnd(this)},e.duration=function(){return P(this._start,this._end)},t}(),Ye=Je;function Xe(t,p){return Xe=Object.setPrototypeOf||function(t,p){return t.__proto__=p,t},Xe(t,p)}var Ge=function(t){var e,n;function r(e,n,r){var o;if((o=t.call(this,e,n,r)||this).parentId=o.options.parentId,o.subtype=void 0,o.action=void 0,-1!==o.type.indexOf(".")){var c=o.type.split(".",3);o.type=c[0],o.subtype=c[1],o.action=c[2]}return o.sync=o.options.sync,o}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,Xe(e,n),r.prototype.end=function(e,data){t.prototype.end.call(this,e),ce(this,data)},r}(Ye),Ze=[["domainLookupStart","domainLookupEnd","DNS"],["connectStart","connectEnd","TCP"],["requestStart","responseStart","Request"],["responseStart","responseEnd","Response"],["domLoading","domComplete","Processing"],["loadEventStart","loadEventEnd","Load"]];function Qe(t){return{value:t}}function We(t,e){var details=e.details,n=e.count,r=void 0===n?1:n,o=e.duration;return{transaction:t,span:details,samples:{"span.self_time.count":Qe(r),"span.self_time.sum.us":Qe(1e3*o)}}}function Ke(t,e){void 0===e&&(e=l.timing);var n=[],r=t.name,o=t.type,c=t.sampled,f={name:r,type:o};if(!c)return n;if(o===et&&e)for(var i=0;i<Ze.length;i++){var d=Ze[i],v=P(e[d[0]],e[d[1]]);0!==v&&null!=v&&n.push(We(f,{details:{type:d[2]},duration:v}))}else{var h=function(t){var e={},n=function(t){var e=t.spans,n=t._start,r=t._end;if(0===e.length)return t.duration();e.sort((function(t,e){return t._start-e._start}));for(var span=e[0],o=span._end,c=span._start,f=o,d=c-n,i=1;i<e.length;i++)c=(span=e[i])._start,o=span._end,c>f?(d+=c-f,f=o):o>f&&(f=o);return f<r&&(d+=r-f),d}(t);e.app={count:1,duration:n};for(var r=t.spans,i=0;i<r.length;i++){var span=r[i],o=span.duration();if(0!==o&&null!=o){var c=span.type,f=span.subtype,d=c.replace(Pt,"");f&&(d+="."+f),e[d]||(e[d]={duration:0,count:0}),e[d].count++,e[d].duration+=o}}return e}(t);Object.keys(h).forEach((function(t){var e=t.split("."),r=e[0],o=e[1],c=h[t],d=c.duration,l=c.count;n.push(We(f,{details:{type:r,subtype:o},duration:d,count:l}))}))}return n}function tn(t,p){return tn=Object.setPrototypeOf||function(t,p){return t.__proto__=p,t},tn(t,p)}var en=function(t){var e,n;function r(e,n,r){var o;return(o=t.call(this,e,n,r)||this).traceId=y(),o.marks=void 0,o.spans=[],o._activeSpans={},o._activeTasks=new Set,o.blocked=!1,o.captureTimings=!1,o.breakdownTimings=[],o.sampleRate=o.options.transactionSampleRate,o.sampled=Math.random()<=o.sampleRate,o}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,tn(e,n);var o=r.prototype;return o.addMarks=function(t){this.marks=L(this.marks||{},t)},o.mark=function(t){var e=j(t),n=F()-this._start,r={};r[e]=n,this.addMarks({custom:r})},o.canReuse=function(){var t=this.options.reuseThreshold||5e3;return!!this.options.canReuse&&!this.ended&&F()-this._start<t},o.redefine=function(t,e,n){t&&(this.name=t),e&&(this.type=e),n&&(this.options.reuseThreshold=n.reuseThreshold,O(this.options,n))},o.startSpan=function(t,e,n){var r=this;if(!this.ended){var o=O({},n);o.onEnd=function(t){r._onSpanEnd(t)},o.traceId=this.traceId,o.sampled=this.sampled,o.sampleRate=this.sampleRate,o.parentId||(o.parentId=this.id);var span=new Ge(t,e,o);return this._activeSpans[span.id]=span,o.blocking&&this.addTask(span.id),span}},o.isFinished=function(){return!this.blocked&&0===this._activeTasks.size},o.detectFinish=function(){this.isFinished()&&this.end()},o.end=function(t){if(!this.ended){for(var e in this.ended=!0,this._end=A(t),this._activeSpans){var span=this._activeSpans[e];span.type=span.type+Pt,span.end(t)}this.callOnEnd()}},o.captureBreakdown=function(){this.breakdownTimings=Ke(this)},o.block=function(t){this.blocked=t,this.blocked||this.detectFinish()},o.addTask=function(t){return t||(t="task-"+y(16)),this._activeTasks.add(t),t},o.removeTask=function(t){this._activeTasks.delete(t)&&this.detectFinish()},o.resetFields=function(){this.spans=[],this.sampleRate=0},o._onSpanEnd=function(span){this.spans.push(span),delete this._activeSpans[span.id],this.removeTask(span.id)},o.isManaged=function(){return!!this.options.managed},r}(Ye);function nn(){return nn=Object.assign||function(t){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var e in source)Object.prototype.hasOwnProperty.call(source,e)&&(t[e]=source[e])}return t},nn.apply(this,arguments)}var rn={fid:0,fcp:0,tbt:{start:1/0,duration:0},cls:{score:0,firstEntryTime:Number.NEGATIVE_INFINITY,prevEntryTime:Number.NEGATIVE_INFINITY,currentSessionScore:0},longtask:{count:0,duration:0,max:0}},an=50;function on(t,e){var n=e.isHardNavigation,r=e.trStart,o=t.getEntriesByType(xt).filter((function(t){return t.startTime>=r})),c={spans:function(t,e){for(var n=[],i=0;i<t.length;i++){var r=t[i],o=r.name,c=r.startTime,f=r.duration,d=r.attribution,l=c+f,span=new Ge("Longtask("+o+")",xt,{startTime:c});if(e.count++,e.duration+=f,e.max=Math.max(f,e.max),d.length>0){var v=d[0],h=v.name,m=v.containerType,y=v.containerName,_=v.containerId,S={attribution:h,type:m};y&&(S.name=y),_&&(S.id=_),span.addContext({custom:S})}span.end(l),n.push(span)}return n}(o,rn.longtask),marks:{}};if(!n)return c;var f=t.getEntriesByType(It),d=f[f.length-1];if(d){var v=parseInt(d.startTime);rn.lcp=v,c.marks.largestContentfulPaint=v}var h=l.timing,m=h.fetchStart-h.navigationStart;z(h)&&(m=0);var y=t.getEntriesByName("first-contentful-paint")[0];if(y){var _=parseInt(m>=0?y.startTime-m:y.startTime);rn.fcp=_,c.marks.firstContentfulPaint=_}var S=function(t){var e=t[0];if(e){var n=e.startTime,r=e.processingStart,span=new Ge("First Input Delay",kt,{startTime:n});return span.end(r),span}}(t.getEntriesByType(kt));return S&&(rn.fid=S.duration(),c.spans.push(S)),function(t){t.forEach((function(t){var e=t.name,n=t.startTime,r=t.duration;if(!(n<rn.fcp||"self"!==e&&-1===e.indexOf("same-origin"))){rn.tbt.start=Math.min(rn.tbt.start,n);var o=r-an;o>0&&(rn.tbt.duration+=o)}}))}(o),function(t){t.forEach((function(t){!t.hadRecentInput&&t.value&&((t.startTime-rn.cls.firstEntryTime>5e3||t.startTime-rn.cls.prevEntryTime>1e3)&&(rn.cls.firstEntryTime=t.startTime,rn.cls.currentSessionScore=0),rn.cls.prevEntryTime=t.startTime,rn.cls.currentSessionScore+=t.value,rn.cls.score=Math.max(rn.cls.score,rn.cls.currentSessionScore))}))}(t.getEntriesByType(Ot)),c}var sn=function(){function t(t){this.po={observe:N,disconnect:N},window.PerformanceObserver&&(this.po=new PerformanceObserver(t))}var e=t.prototype;return e.start=function(t,e){void 0===e&&(e={buffered:!0});try{if(!H(t))return;this.po.observe(nn({type:t},e))}catch(t){}},e.stop=function(){this.po.disconnect()},t}();function cn(t,e,n,r,o){return void 0===o&&(o=0),"number"==typeof t&&"number"==typeof e&&t>=o&&e>t&&t-o>=n&&e-o<=r&&e-t<tt&&t-o<tt&&e-o<tt}var un=[["redirectStart","redirectEnd","Redirect"],["domainLookupStart","domainLookupEnd","Domain lookup"],["connectStart","connectEnd","Making a connection to the server"],["requestStart","responseEnd","Requesting and receiving the document"],["domLoading","domInteractive","Parsing the document, executing sync. scripts"],["domContentLoadedEventStart","domContentLoadedEventEnd",'Fire "DOMContentLoaded" event'],["loadEventStart","loadEventEnd",'Fire "load" event']];function fn(t){var e=t.name,n=t.initiatorType,r=t.startTime,o=t.responseEnd,c="resource";n&&(c+="."+n);var f=E(e),span=new Ge(f,c);return span._start=r,span.end(o,{url:e,entry:t}),span}function dn(t,e){return null!=e&&t>e}function ln(t){if(t.captureTimings){var e=t._end;if(t.type===et){if(t.marks&&t.marks.custom){var n=t.marks.custom;Object.keys(n).forEach((function(e){n[e]+=t._start}))}t._start=0;var r=l.timing;(function(t,e,n,r){for(var o=[],i=0;i<un.length;i++){var c=t[un[i][0]],f=t[un[i][1]];if(cn(c,f,n,r,e)){var span=new Ge(un[i][2],"hard-navigation.browser-timing"),data=null;"requestStart"===un[i][0]&&(span.pageResponse=!0,data={url:location.origin}),span._start=c-e,span.end(f-e,data),o.push(span)}}return o})(r,z(r)?r.redirectStart:r.fetchStart,0,e).forEach((function(span){span.traceId=t.traceId,span.sampled=t.sampled,span.pageResponse&&t.options.pageLoadSpanId&&(span.id=t.options.pageLoadSpanId),t.spans.push(span)})),t.addMarks(Le(r))}if(D()){var o=t._start;(function(t,e,n,r){for(var o=[],i=0;i<t.length;i++){var c=t[i],f=c.initiatorType,d=c.name,l=c.startTime,v=c.responseEnd;-1!==K.indexOf(f)&&null!=d&&(("xmlhttprequest"===f||"fetch"===f)&&(/intake\/v\d+\/rum\/events/.test(d)||dn(l,e))||cn(l,v,n,r)&&o.push(fn(t[i])))}return o})(l.getEntriesByType("resource"),Zt.bootstrapTime,o,e).forEach((function(span){return t.spans.push(span)})),function(t,e,n){for(var r=[],i=0;i<t.length;i++){var o=t[i],c=o.name,f=o.startTime,d=o.duration,l=f+d;if(!(d<=ft)&&cn(f,l,e,n)){var span=new Ge(c,"app");span._start=f,span.end(l),r.push(span)}}return r}(l.getEntriesByType("measure"),o,e).forEach((function(span){return t.spans.push(span)}))}}else t.type===et&&(t._start=0)}var pn=function(){function t(t,e){var n=this;this._config=e,this._logger=t,this.currentTransaction=void 0,this.respIntervalId=void 0,this.recorder=new sn((function(t){var tr=n.getCurrentTransaction();if(tr&&tr.captureTimings){var e,r=tr.type===et,o=on(t,{isHardNavigation:r,trStart:r?0:tr._start}),c=o.spans,f=o.marks;(e=tr.spans).push.apply(e,c),tr.addMarks({agent:f})}}))}var e=t.prototype;return e.createCurrentTransaction=function(t,e,n){var tr=new en(t,e,n);return this.currentTransaction=tr,tr},e.getCurrentTransaction=function(){if(this.currentTransaction&&!this.currentTransaction.ended)return this.currentTransaction},e.createOptions=function(t){var e=this._config.config,n=O({transactionSampleRate:e.transactionSampleRate},t);return n.managed&&(n=O({pageLoadTraceId:e.pageLoadTraceId,pageLoadSampled:e.pageLoadSampled,pageLoadSpanId:e.pageLoadSpanId,pageLoadTransactionName:e.pageLoadTransactionName},n)),n},e.startManagedTransaction=function(t,e,n){var tr=this.getCurrentTransaction(),r=!1;if(tr)if(tr.canReuse()&&n.canReuse){var o=tr.type,c=ut.indexOf(tr.type),f=ut.indexOf(e);c>=0&&f<c&&(o=e),tr.redefine(t,o,n),r=!0}else tr.end(),tr=this.createCurrentTransaction(t,e,n);else tr=this.createCurrentTransaction(t,e,n);return tr.type===et&&(r||(this.recorder.start(It),this.recorder.start("paint"),this.recorder.start(kt),this.recorder.start(Ot)),n.pageLoadTraceId&&(tr.traceId=n.pageLoadTraceId),n.pageLoadSampled&&(tr.sampled=n.pageLoadSampled),tr.name===st&&n.pageLoadTransactionName&&(tr.name=n.pageLoadTransactionName)),!r&&this._config.get("monitorLongtasks")&&this.recorder.start(xt),tr.sampled&&(tr.captureTimings=!0),tr},e.startTransaction=function(t,e,n){var tr,r=this,o=this.createOptions(n),c=!0;o.managed?this.currentTransaction===(tr=this.startManagedTransaction(t,e,o))&&(c=!1):tr=new en(t,e,o);return tr.onEnd=function(){return r.handleTransactionEnd(tr)},c&&this._config.events.send("transaction:start",[tr]),tr},e.handleTransactionEnd=function(tr){var t=this;this.recorder.stop();var e=window.location.href;return c.resolve().then((function(){var n=tr.name,r=tr.type;if(Zt.lastHiddenStart>=tr._start)t._config.dispatchEvent(gt);else if(t.shouldIgnoreTransaction(n)||r===ot)t._config.dispatchEvent(gt);else{if(r===et){var o=t._config.get("pageLoadTransactionName");if(n===st&&o&&(tr.name=o),tr.captureTimings){var c=rn.cls,f=rn.fid,d=rn.tbt,l=rn.longtask;d.duration>0&&tr.spans.push((h=(v=d).start,m=v.duration,(y=new Ge("Total Blocking Time",xt,{startTime:h})).end(h+m),y)),tr.experience={},H(xt)&&(tr.experience.tbt=d.duration),H(Ot)&&(tr.experience.cls=c.score),f>0&&(tr.experience.fid=f),l.count>0&&(tr.experience.longtask={count:l.count,sum:l.duration,max:l.max})}t.setSession(tr)}var v,h,m,y;tr.name===st&&(tr.name=function(t,e){void 0===e&&(e=2);for(var n=new ee(t),r=n.query,o=n.path.substring(1).split("/"),c=":id",f=/\W|_/g,d=/[0-9]/g,l=/[a-z]/g,v=/[A-Z]/g,h=[],m=!1,y=0;y<o.length;y++){var _=o[y];if(m||y>e-1){_&&h.push("*");break}if((_.match(f)||[]).length>=2)h.push(c),m=!0;else{var S=(_.match(d)||[]).length;if(S>3||_.length>3&&S/_.length>=.3)h.push(c),m=!0;else{var w=(_.match(v)||[]).length,T=(_.match(l)||[]).length/_.length,E=w/_.length;_.length>5&&(E>.3&&E<.6||T>.3&&T<.6)?(h.push(c),m=!0):_&&h.push(_)}}}return"/"+(h.length>=2?h.join("/"):h.join(""))+(r?"?{query}":"")}(e)),ln(tr),t.adjustTransactionTime(tr),t._config.get("breakdownMetrics")&&tr.captureBreakdown();var _=t._config.get("context");ue(tr,_),t._config.events.send(lt,[tr])}}),(function(t){Gt}))},e.setSession=function(tr){var t=this._config.get("session");if(t){"boolean"==typeof t||t.timestamp&&Date.now()-t.timestamp>18e5?tr.session={id:y(16),sequence:1}:tr.session={id:t.id,sequence:t.sequence?t.sequence+1:1};var e={session:{id:tr.session.id,sequence:tr.session.sequence,timestamp:Date.now()}};this._config.setConfig(e),this._config.setLocalConfig(e,!0)}},e.adjustTransactionTime=function(t){var e=t.spans,n=function(t){for(var e=t[0],n=1;n<t.length;n++){var span=t[n];e._start>span._start&&(e=span)}return e}(e);n&&n._start<t._start&&(t._start=n._start);var r=function(t){return R(t,(function(t){return-1===String(t).indexOf("external")}))}(e)||{},o=r._end||0;if(t.type===et){var c=t._end-1e3,f=rn.lcp||0,d=function(t){return R(t,(function(t){return-1!==String(t).indexOf("external")}))}(e)||{},l=d._end||0;t._end=Math.max(o,l,f,c)}else o>t._end&&(t._end=o);this.truncateSpans(e,t._end)},e.truncateSpans=function(t,e){for(var i=0;i<t.length;i++){var span=t[i];span._end>e&&(span._end=e,span.type+=Pt),span._start>e&&(span._start=e)}},e.shouldIgnoreTransaction=function(t){var e=this._config.get("ignoreTransactions");if(e&&e.length)for(var i=0;i<e.length;i++){var element=e[i];if("function"==typeof element.test){if(element.test(t))return!0}else if(element===t)return!0}return!1},e.startSpan=function(t,e,n){var tr=this.getCurrentTransaction();tr||(tr=this.createCurrentTransaction(void 0,ot,this.createOptions({canReuse:!0,managed:!0})));var span=tr.startSpan(t,e,n);return span},e.endSpan=function(span,t){span&&span.end(null,t)},t}();function vn(){return Be[Rt]=function(t){var e=t.getService([jt,Nt]),n=e[0],r=e[1];return new pn(n,r)},Be[At]=function(t){var e=t.getService([Ft,Nt,jt,Rt]),n=e[0],r=e[1],o=e[2],c=e[3];return new $e(n,r,o,c)},Be[qt]=function(t){var e=t.getService([Ft,Nt,Rt]),n=e[0],r=e[1],o=e[2];return new Ee(n,r,o)},new Ve}var hn=40,gn=10,mn={minInteractionId:1/0,maxInteractionId:0,interactionCount:0,longestInteractions:[]};function yn(t){t.getEntries().forEach((function(t){t.interactionId&&(function(t){if(U())return;mn.minInteractionId=Math.min(mn.minInteractionId,t.interactionId),mn.maxInteractionId=Math.max(mn.maxInteractionId,t.interactionId),mn.interactionCount=(mn.maxInteractionId-mn.minInteractionId)/7+1}(t),t.duration<hn||function(t){var e=mn.longestInteractions[mn.longestInteractions.length-1];if(void 0!==e&&t.duration<=e.duration&&t.interactionId!=e.id)return;var n=mn.longestInteractions.filter((function(e){return e.id===t.interactionId}));if(n.length>0){var r=n[0];r.duration=Math.max(r.duration,t.duration)}else mn.longestInteractions.push({id:t.interactionId,duration:t.duration});mn.longestInteractions.sort((function(a,b){return b.duration-a.duration})),mn.longestInteractions.splice(gn)}(t))}))}function bn(){return performance.interactionCount||mn.interactionCount}function _n(t){var e=function(){if(0===mn.longestInteractions.length)return bn()>0?0:void 0;var t=Math.min(mn.longestInteractions.length-1,Math.floor(bn()/50));return mn.longestInteractions[t].duration}();if(e>=0){var n=F(),r=t.startTransaction(ct,ct,{startTime:n}),o=performance.getEntriesByType("navigation");if(o.length>0){var c=o[0].name;r.addContext({page:{url:c}})}r.addLabels({inp_value:e});var f=n+e+1;return r.end(f),mn.minInteractionId=1/0,mn.maxInteractionId=0,mn.interactionCount=0,mn.longestInteractions=[],r}}function Sn(t,e){if(_n(e))var n=t.observeEvent(ht,(function(){wn(t,e),n()}));else wn(t,e)}function wn(t,e){var tr=e.getCurrentTransaction();if(tr){var n=t.observeEvent(gt,(function(){Zt.lastHiddenStart=F(),n(),r()})),r=t.observeEvent(ht,(function(){t.dispatchEvent(vt),Zt.lastHiddenStart=F(),r(),n()}));tr.end()}else t.dispatchEvent(vt),Zt.lastHiddenStart=F()}var Tn="a[data-transaction-name], button[data-transaction-name]";function En(t){var e=function(e){e.target instanceof Element&&function(t,e){var n=function(t){var e={transactionName:null,context:null};e.transactionName=function(t){var e=function(t){if(t.closest){var element=t.closest(Tn);return element?element.dataset.transactionName:null}return t.dataset.transactionName}(t);if(e)return e;var n=t.tagName.toLowerCase(),r=t.getAttribute("name");if(r)return n+'["'+r+'"]';return n}(t);var n=t.getAttribute("class");n&&(e.context={custom:{classes:n}});return e}(e),r=n.transactionName,o=n.context,tr=t.startTransaction("Click - "+r,it,{managed:!0,canReuse:!0,reuseThreshold:300});tr&&o&&tr.addContext(o)}(t,e.target)},n="click";return window.addEventListener(n,e,true),function(){window.removeEventListener(n,e,true)}}var xn=function(){function t(t,e){this._disable=e,this.serviceFactory=t,this._initialized=!1}var e=t.prototype;return e.isEnabled=function(){return!this._disable},e.isActive=function(){var t=this.serviceFactory.getService(Nt);return this.isEnabled()&&this._initialized&&t.get("active")},e.init=function(t){var e=this;if(this.isEnabled()&&!this._initialized){this._initialized=!0;var n=this.serviceFactory.getService([Nt,jt,Rt]),r=n[0],o=n[1],c=n[2];r.setVersion("5.16.0"),this.config(t);var f=r.get("logLevel");if(o.setLevel(f),r.get("active")){this.serviceFactory.init();var d=function(t,e){var n,r=((n={})[mt]=!1,n[yt]=!1,n[bt]=!1,n[et]=!1,n[wt]=!1,n[_t]=!1,n[St]=!1,n);return t?(Object.keys(r).forEach((function(t){-1===e.indexOf(t)&&(r[t]=!0)})),r):r}(r.get("instrument"),r.get("disableInstrumentations"));if(this.serviceFactory.getService(At).init(d),d[wt])this.serviceFactory.getService(qt).registerListeners();if(r.get("session")){var l=r.getLocalConfig();l&&l.session&&r.setConfig({session:l.session})}var v=function(){return d[et]&&e._sendPageLoadMetrics()};r.get("centralConfig")?this.fetchCentralConfig().then(v):v(),function(t,e){"hidden"===document.visibilityState&&(Zt.lastHiddenStart=0);var n=function(){"hidden"===document.visibilityState&&Sn(t,e)},r=function(){return Sn(t,e)},o=!0;window.addEventListener("visibilitychange",n,o),window.addEventListener("pagehide",r,o)}(r,c),d[_t]&&d[St]&&En(c),function(t){void 0===t&&(t=new sn(yn));var e=U(),n=e?hn:16;t.start("event",{buffered:!0,durationThreshold:n}),e||t.start(kt)}()}else this._disable=!0,o.warn("RUM agent is inactive")}return this},e.fetchCentralConfig=function(){var t=this.serviceFactory.getService([Ft,jt,Nt]),e=t[0],n=t[1],r=t[2];return e.fetchConfig(r.get("serviceName"),r.get("environment")).then((function(t){var e=t.transaction_sample_rate;if(e){var o={transactionSampleRate:e=Number(e)},c=r.validate(o).invalid;if(0===c.length)r.setConfig(o);else{var f=c[0],d=f.key,l=f.value,v=f.allowed;n.warn('invalid value "'+l+'" for '+d+". Allowed: "+v+".")}}return t})).catch((function(t){n.warn("failed fetching config:",t)}))},e._sendPageLoadMetrics=function(){var tr=this.startTransaction(void 0,et,{managed:!0,canReuse:!0});if(tr){tr.addTask(et);var t=function(){setTimeout((function(){return tr.removeTask(et)}),1e3)};"complete"===document.readyState?t():window.addEventListener("load",t)}},e.observe=function(t,e){this.serviceFactory.getService(Nt).events.observe(t,e)},e.config=function(t){var e=this.serviceFactory.getService([Nt,jt]),n=e[0],r=e[1],o=n.validate(t),c=o.missing,f=o.invalid,d=o.unknown;if(d.length>0){var l="Unknown config options are specified for RUM agent: "+d.join(", ");r.warn(l)}if(0===c.length&&0===f.length)n.setConfig(t);else{var v=", ",h="RUM agent isn't correctly configured. ";c.length>0&&(h+=c.join(v)+" is missing",f.length>0&&(h+=v)),f.forEach((function(t,e){var n=t.key,r=t.value,o=t.allowed;h+=n+' "'+r+'" contains invalid characters! (allowed: '+o+")"+(e!==f.length-1?v:"")})),r.error(h),n.setConfig({active:!1})}},e.setUserContext=function(t){this.serviceFactory.getService(Nt).setUserContext(t)},e.setCustomContext=function(t){this.serviceFactory.getService(Nt).setCustomContext(t)},e.addLabels=function(t){this.serviceFactory.getService(Nt).addLabels(t)},e.setInitialPageLoadName=function(t){this.serviceFactory.getService(Nt).setConfig({pageLoadTransactionName:t})},e.startTransaction=function(t,e,n){if(this.isEnabled())return this.serviceFactory.getService(Rt).startTransaction(t,e,n)},e.startSpan=function(t,e,n){if(this.isEnabled())return this.serviceFactory.getService(Rt).startSpan(t,e,n)},e.getCurrentTransaction=function(){if(this.isEnabled())return this.serviceFactory.getService(Rt).getCurrentTransaction()},e.captureError=function(t){if(this.isEnabled())return this.serviceFactory.getService(qt).logError(t)},e.addFilter=function(t){this.serviceFactory.getService(Nt).addFilter(t)},t}();var In=function(){if(d&&window.elasticApm)return window.elasticApm;var t=(w()?(Xt(),Zt.bootstrapTime=F(),Qt=!0):d&&console.log("[Elastic APM] platform is not supported!"),Qt),e=vn(),n=new xn(e,!t);return d&&(window.elasticApm=n),n}(),kn=In.init.bind(In),On=n(1595);function Ln(){return Ln=Object.assign?Object.assign.bind():function(t){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var e in source)Object.prototype.hasOwnProperty.call(source,e)&&(t[e]=source[e])}return t},Ln.apply(this,arguments)}var Cn=t=>({get:()=>t.load(),getOrCreate:()=>{var e,n,r=null;return(r=t.load())||(e=new Date,r=(n=Object(On.a)())?{id:n.toString(),startedAt:e.toISOString(),sequence:0}:null),t.save(r),r},increase:()=>{var e=null;return t.isAvailable()?((e=t.load())&&(e=Ln({},e,{sequence:e.sequence+1}),t.save(e)),e):null}}),Nn=t=>{var e=null;return{start:(n,r)=>{var o,c=null;try{c=t.getOrCreate()}catch(t){}if(null!=(o=c)&&o.startedAt){if(c.sequence>0)return void Object(On.b)("PingService: canceled because session is not pristine");var f=new Date(c.startedAt).getTime()+n-(new Date).getTime();return f<=0?void Object(On.b)("PingService: canceled because ping delay expired"):(e=setTimeout((()=>{r()}),f),Object(On.b)("PingService: started with timeout "+f+"ms"),()=>{clearTimeout(e)})}},stop:()=>{clearTimeout(e)}}};function jn(){return jn=Object.assign?Object.assign.bind():function(t){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var e in source)Object.prototype.hasOwnProperty.call(source,e)&&(t[e]=source[e])}return t},jn.apply(this,arguments)}var Rn=function(t){void 0===t&&(t={});var e={formInputs:"input,textarea,select"},n=jn({},e,t),r={},o=()=>{},c=()=>{},f=t=>{var e=t.target;if(e.matches(n.formInputs)){r.totalClicks=r.totalClicks+1;var c=(element=>{var t=element.tagName.toLowerCase(),e=element.getAttribute("name");return e?t+'["'+e+'"]':t})(e);o({selectorName:c})}},d=t=>{t.target.matches(n.formInputs)&&c()},l=()=>{document.body.removeEventListener("focusin",f),document.body.removeEventListener("focusout",d)},v=()=>{r={totalClicks:0}};return v(),{name:"focus",install:()=>(document.body.addEventListener("focusin",f),document.body.addEventListener("focusout",d),l),onFocusIn:t=>{o=t},onFocusOut:t=>{c=t},uninstall:l,getStats:()=>jn({},r,{totalFocusableElements:document.querySelectorAll(e.formInputs).length}),resetStats:v}},Fn=()=>{var t={},e=()=>{},n=()=>{},r=function(t,e){void 0===t&&(t=()=>{}),void 0===e&&(e=()=>{});var n=null;return{tick:function(){for(var r=arguments.length,o=new Array(r),c=0;c<r;c++)o[c]=arguments[c];n||t(...o),clearTimeout(n),n=setTimeout((()=>{e(...o),n=null}),300)},stop:()=>{clearTimeout(n)}}}((()=>{e()}),(e=>{var r=e-t.lastScrollY;t.totalDistance=t.totalDistance+Math.abs(r),t.maxDepth=Math.max(e,t.maxDepth),t.lastScrollY=e,n(t)})),o=t=>{r.tick(Math.floor(window.scrollY))},c=()=>{document.removeEventListener("scroll",o)},f=()=>{t={lastScrollY:0,totalDistance:0,maxDepth:0}};return f(),{name:"scroll",install:()=>(document.addEventListener("scroll",o),c),uninstall:c,getStats:()=>t,resetStats:f,onScrollStart:t=>{e=t},onScrollEnd:t=>{n=t}}},An=()=>{var t=null,e=()=>{},n=null,r=null,o=0,c=Object(On.a)(),f=Rn(),d=Fn(),l=()=>{(n=t.startTransaction("PageVisit","page-visit")).addLabels({original_url:window.location.href})},v=()=>{var{totalDistance:t,maxDepth:e}=d.getStats(),{totalClicks:l,totalFocusableElements:v}=f.getStats();return n.addLabels({visit_seq:o,visit_prev_transaction_id:r,visit_id:c,scroll_total_distance:t,scroll_max_depth:e,focus_count:l,focusable_elements:v}),n.end(),o+=1,r=n.id,n},h=()=>{v(),c=Object(On.a)(),o=0,r=null,f.resetStats(),d.resetStats(),l()};return{init:()=>{window.addEventListener("visibilitychange",(()=>{e("hidden"===document.visibilityState)}),!0),window.addEventListener("pagehide",e("hidden"===document.visibilityState),!0)},start:r=>{var o,c;t=r,l(),o=null,d.install(),d.onScrollStart((()=>{o=n.startSpan("Scroll","scroll")})),d.onScrollEnd((()=>{o&&!o.ended&&o.end()})),c=null,f.install(),f.onFocusIn((t=>{var{selectorName:e}=t;(c=n.startSpan("Focus "+e,"focus")).addLabels({selector:e})})),f.onFocusOut((()=>{c&&!c.ended&&c.end()})),e=t=>{t?v():l()},function(t){void 0===t&&(t=()=>{});var e=history.pushState;history.pushState=function(){"function"==typeof t&&t(),e.apply(history,arguments)}}((()=>{try{h()}catch(t){}}))},getVisitId:()=>c,rotateVisit:h}},qn=["page-load","route-change","ping"];e.default=function(t){void 0===t&&(t={});var e=function(t){void 0===t&&(t={});var e=t.key||"_insights_ssid";return{isAvailable:()=>!!localStorage,load:()=>{var t;return JSON.parse(null==(t=localStorage)?void 0:t.getItem(e))},save:data=>{var t;null==(t=localStorage)||t.setItem(e,JSON.stringify(data))}}}({key:"_insights_ssid"}),n=Cn(e),r=Nn(n),o=An();o.init();var{serviceName:c,clientId:f,serverUrl:d}=t,l=kn({serviceName:c||f,serverUrl:d,session:!0});l.addLabels({v:5});l.observe("transaction:end",(t=>{(t=>{var e,r,c,f,d,l=null,v=qn.includes(t.type);try{l=n.getOrCreate()}catch(t){}t.addLabels({ssid:null==(e=l)?void 0:e.id,ssid_seq:"number"==typeof(null==(r=l)?void 0:r.sequence)?l.sequence+(v?1:0):void 0,v:5,visit_id:(null==t||null==(c=t.context)||null==(c=c.tags)?void 0:c.visit_id)||o.getVisitId()}),null!=t&&null!=(f=t.context)&&null!=(f=f.tags)&&f.original_url&&(t.context.page.url=null==t||null==(d=t.context)||null==(d=d.tags)?void 0:d.original_url),v&&n.increase()})(t)}));try{r.start(3e4,(()=>{var t=l.startTransaction("ping","ping"),span=t.startSpan("trigger");setTimeout((()=>{span.end(),t.end()}),10)}))}catch(t){}o.start(l)}}}]);