/*! For license information please see sentry.min.js.LICENSE.txt */ var Sentry=function(t){var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(t,e)};function e(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var r,o,i,s=function(){return(s=Object.assign||function(t){for(var n,e=1,r=arguments.length;e0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return s}function c(){for(var t=[],n=0;n=200&&n<300?t.Success:429===n?t.RateLimit:n>=400&&n<500?t.Invalid:n>=500?t.Failed:t.Unknown}}(t.Status||(t.Status={}));var u=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){return t.__proto__=n,t}:function(t,n){for(var e in n)t.hasOwnProperty(e)||(t[e]=n[e]);return t}),p=function(t){function n(n){var e=this.constructor,r=t.call(this,n)||this;return r.message=n,r.name=e.prototype.constructor.name,u(r,e.prototype),r}return e(n,t),n}(Error);function l(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return t instanceof Error}}function h(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)}function f(t){return"[object DOMError]"===Object.prototype.toString.call(t)}function d(t){return"[object String]"===Object.prototype.toString.call(t)}function v(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function y(t){return"[object Object]"===Object.prototype.toString.call(t)}function g(t){return Boolean(t&&t.then&&"function"==typeof t.then)}var m={};function _(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:m}function E(){var t=_(),n=t.crypto||t.msCrypto;if(void 0!==n&&n.getRandomValues){var e=new Uint16Array(8);n.getRandomValues(e),e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;var r=function(t){for(var n=t.toString(16);n.length<4;)n="0"+n;return n};return r(e[0])+r(e[1])+r(e[2])+r(e[3])+r(e[4])+r(e[5])+r(e[6])+r(e[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=16*Math.random()|0;return("x"===t?n:3&n|8).toString(16)}))}function b(t){if(!t)return{};var n=t.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!n)return{};var e=n[6]||"",r=n[8]||"";return{host:n[4],path:n[5],protocol:n[2],relative:n[5]+e+r}}function S(t){if(t.message)return t.message;if(t.exception&&t.exception.values&&t.exception.values[0]){var n=t.exception.values[0];return n.type&&n.value?n.type+": "+n.value:n.type||n.value||t.event_id||""}return t.event_id||""}function w(t){var n=_();if(!("console"in n))return t();var e=n.console,r={};["debug","info","warn","error","log","assert"].forEach((function(t){t in n.console&&e[t].__sentry__&&(r[t]=e[t].__sentry_wrapped__,e[t]=e[t].__sentry_original__)}));var o=t();return Object.keys(r).forEach((function(t){e[t]=r[t]})),o}function x(t,n,e,r){void 0===r&&(r={handled:!0,type:"generic"}),t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].value=t.exception.values[0].value||n||"",t.exception.values[0].type=t.exception.values[0].type||e||"Error",t.exception.values[0].mechanism=t.exception.values[0].mechanism||r}var k=_(),O="Sentry Logger ",T=function(){function t(){this.t=!1}return t.prototype.disable=function(){this.t=!1},t.prototype.enable=function(){this.t=!0},t.prototype.log=function(){for(var t=[],n=0;ne?I(t,n-1,e):r}function C(t,n){return"domain"===n&&"object"==typeof t&&t.u?"[Domain]":"domainEmitter"===n?"[DomainEmitter]":"undefined"!=typeof global&&t===global?"[Global]":"undefined"!=typeof window&&t===window?"[Window]":"undefined"!=typeof document&&t===document?"[Document]":"undefined"!=typeof Event&&t instanceof Event?Object.getPrototypeOf(t)?t.constructor.name:"Event":y(e=t)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e?"[SyntheticEvent]":Number.isNaN(t)?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?"[Function: "+(t.name||"")+"]":t;var e}function D(t,n,e,r){if(void 0===e&&(e=1/0),void 0===r&&(r=new N),0===e)return function(t){var n=Object.prototype.toString.call(t);if("string"==typeof t)return t;if("[object Object]"===n)return"[Object]";if("[object Array]"===n)return"[Array]";var e=C(t);return v(e)?e:n}(n);if(null!=n&&"function"==typeof n.toJSON)return n.toJSON();var o=C(n,t);if(v(o))return o;var i=l(n)?function(t){var n={message:t.message,name:t.name,stack:t.stack};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}(n):n,s=Array.isArray(n)?[]:{};if(r.memoize(n))return"[Circular ~]";for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(s[a]=D(a,i[a],e-1,r));return r.unmemoize(n),s}function L(t,n){try{return JSON.parse(JSON.stringify(t,(function(t,e){return D(t,e,n)})))}catch(t){return"**non-serializable**"}}var P,F=function(){function t(t){this.s=t,this.h=[]}return t.prototype.isReady=function(){return void 0===this.s||this.length()0&&e(!1)}),t);Promise.all(n.h).then((function(){clearTimeout(r),e(!0)})).catch((function(){e(!0)}))}))},t}();function U(t,n){return void 0===n&&(n=0),"string"!=typeof t||0===n||t.length<=n?t:t.substr(0,n)+"..."}function A(t,n){if(!Array.isArray(t))return"";for(var e=[],r=0;r=n)return U(t[0],n);for(var e=t.length;e>0;e--){var r=t.slice(0,e).join(", ");if(!(r.length>n))return e===t.length?r:U(r,n)}return""}function B(t,n){return e=n,"[object RegExp]"===Object.prototype.toString.call(e)?n.test(t):"string"==typeof n&&t.includes(n);var e}function H(){if(!("fetch"in _()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function q(){if(!H())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(P||(P={}));var W=function(){function t(t){var n=this;this.l=P.PENDING,this.v=[],this.p=function(t){n.m(t,P.RESOLVED)},this.g=function(t){n.m(t,P.REJECTED)},this.m=function(t,e){n.l===P.PENDING&&(g(t)?t.then(n.p,n.g):(n.j=t,n.l=e,n._()))},this._=function(){n.l!==P.PENDING&&(n.l===P.REJECTED?n.v.forEach((function(t){return t.onFail&&t.onFail(n.j)})):n.v.forEach((function(t){return t.onSuccess&&t.onSuccess(n.j)})),n.v=[])},this.S=function(t){n.v=n.v.concat(t),n._()};try{t(this.p,this.g)}catch(t){this.g(t)}}return t.prototype.then=function(n,e){var r=this;return new t((function(t,o){r.S({onFail:function(n){if(e)try{return void t(e(n))}catch(t){return void o(t)}else o(n)},onSuccess:function(e){if(n)try{return void t(n(e))}catch(t){return void o(t)}else t(e)}})}))},t.prototype.catch=function(t){return this.then((function(t){return t}),t)},t.prototype.toString=function(){return"[object SyncPromise]"},t.resolve=function(n){return new t((function(t){t(n)}))},t.reject=function(n){return new t((function(t,e){e(n)}))},t}(),Y=/^[ \t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \t]*$/,$=function(){function t(t,n,e,r){void 0===t&&(t=E()),void 0===n&&(n=E().substring(16)),this.O=t,this.k=n,this.T=e,this.R=r}return t.prototype.setParent=function(t){return this.R=t,this},t.prototype.setSampled=function(t){return this.T=t,this},t.fromTraceparent=function(n){var e=n.match(Y);if(e){var r=void 0;"1"===e[3]?r=!0:"0"===e[3]&&(r=!1);var o=new t(e[1],e[2],r);return new t(e[1],void 0,r,o)}},t.prototype.toTraceparent=function(){var t="";return!0===this.T?t="-1":!1===this.T&&(t="-0"),this.O+"-"+this.k+t},t.prototype.toJSON=function(){return{parent:this.R&&this.R.toJSON()||void 0,sampled:this.T,span_id:this.k,trace_id:this.O}},t}(),J=function(){function t(){this.D=!1,this.I=[],this.C=[],this.N=[],this.A={},this.L={},this.M={},this.U={}}return t.prototype.addScopeListener=function(t){this.I.push(t)},t.prototype.addEventProcessor=function(t){return this.C.push(t),this},t.prototype.F=function(){var t=this;this.D||(this.D=!0,setTimeout((function(){t.I.forEach((function(n){n(t)})),t.D=!1})))},t.prototype.P=function(t,n,e,r){var o=this;return void 0===r&&(r=0),new W((function(i,a){var c=t[r];if(null===n||"function"!=typeof c)i(n);else{var u=c(s({},n),e);g(u)?u.then((function(n){return o.P(t,n,e,r+1).then(i)})).catch(a):o.P(t,u,e,r+1).then(i).catch(a)}}))},t.prototype.setUser=function(t){return this.A=L(t),this.F(),this},t.prototype.setTags=function(t){return this.L=s({},this.L,L(t)),this.F(),this},t.prototype.setTag=function(t,n){var e;return this.L=s({},this.L,((e={})[t]=L(n),e)),this.F(),this},t.prototype.setExtras=function(t){return this.M=s({},this.M,L(t)),this.F(),this},t.prototype.setExtra=function(t,n){var e;return this.M=s({},this.M,((e={})[t]=L(n),e)),this.F(),this},t.prototype.setFingerprint=function(t){return this.$=L(t),this.F(),this},t.prototype.setLevel=function(t){return this.q=L(t),this.F(),this},t.prototype.setTransaction=function(t){return this.H=t,this.F(),this},t.prototype.setContext=function(t,n){return this.U[t]=n?L(n):void 0,this.F(),this},t.prototype.setSpan=function(t){return this.W=t,this.F(),this},t.prototype.startSpan=function(t){var n=new $;return n.setParent(t),this.setSpan(n),n},t.prototype.getSpan=function(){return this.W},t.clone=function(n){var e=new t;return Object.assign(e,n,{I:[]}),n&&(e.N=c(n.N),e.L=s({},n.L),e.M=s({},n.M),e.U=s({},n.U),e.A=n.A,e.q=n.q,e.W=n.W,e.H=n.H,e.$=n.$,e.C=c(n.C)),e},t.prototype.clear=function(){return this.N=[],this.L={},this.M={},this.A={},this.U={},this.q=void 0,this.H=void 0,this.$=void 0,this.W=void 0,this.F(),this},t.prototype.addBreadcrumb=function(t,n){var e=(new Date).getTime()/1e3,r=s({timestamp:e},t);return this.N=void 0!==n&&n>=0?c(this.N,[L(r)]).slice(-n):c(this.N,[L(r)]),this.F(),this},t.prototype.clearBreadcrumbs=function(){return this.N=[],this.F(),this},t.prototype.B=function(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this.$&&(t.fingerprint=t.fingerprint.concat(this.$)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint},t.prototype.applyToEvent=function(t,n){return this.M&&Object.keys(this.M).length&&(t.extra=s({},this.M,t.extra)),this.L&&Object.keys(this.L).length&&(t.tags=s({},this.L,t.tags)),this.A&&Object.keys(this.A).length&&(t.user=s({},this.A,t.user)),this.U&&Object.keys(this.U).length&&(t.contexts=s({},this.U,t.contexts)),this.q&&(t.level=this.q),this.H&&(t.transaction=this.H),this.W&&(t.contexts=t.contexts||{},t.contexts.trace=this.W),this.B(t),t.breadcrumbs=c(t.breadcrumbs||[],this.N),t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,this.P(c(G(),this.C),t,n)},t}();function G(){var t=_();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function X(t){G().push(t)}var V=3,z=function(){function t(t,n,e){void 0===n&&(n=new J),void 0===e&&(e=V),this.J=e,this.X=[],this.X.push({client:t,scope:n})}return t.prototype.G=function(t){for(var n,e=[],r=1;r0?t[t.length-1].scope:void 0,e=J.clone(n);return this.getStack().push({client:this.getClient(),scope:e}),e},t.prototype.popScope=function(){return void 0!==this.getStack().pop()},t.prototype.withScope=function(t){var n=this.pushScope();try{t(n)}finally{this.popScope()}},t.prototype.getClient=function(){return this.getStackTop().client},t.prototype.getScope=function(){return this.getStackTop().scope},t.prototype.getStack=function(){return this.X},t.prototype.getStackTop=function(){return this.X[this.X.length-1]},t.prototype.captureException=function(t,n){var e=this.V=E(),r=n;if(!n){var o=void 0;try{throw new Error("Sentry syntheticException")}catch(t){o=t}r={originalException:t,syntheticException:o}}return this.G("captureException",t,s({},r,{event_id:e})),e},t.prototype.captureMessage=function(t,n,e){var r=this.V=E(),o=e;if(!e){var i=void 0;try{throw new Error(t)}catch(t){i=t}o={originalException:t,syntheticException:i}}return this.G("captureMessage",t,n,s({},o,{event_id:r})),r},t.prototype.captureEvent=function(t,n){var e=this.V=E();return this.G("captureEvent",t,s({},n,{event_id:e})),e},t.prototype.lastEventId=function(){return this.V},t.prototype.addBreadcrumb=function(t,n){var e=this.getStackTop();if(e.scope&&e.client){var r=e.client.getOptions&&e.client.getOptions()||{},o=r.beforeBreadcrumb,i=void 0===o?null:o,a=r.maxBreadcrumbs,c=void 0===a?30:a;if(!(c<=0)){var u=(new Date).getTime()/1e3,p=s({timestamp:u},t),l=i?w((function(){return i(p,n)})):p;null!==l&&e.scope.addBreadcrumb(l,Math.min(c,100))}}},t.prototype.setUser=function(t){var n=this.getStackTop();n.scope&&n.scope.setUser(t)},t.prototype.setTags=function(t){var n=this.getStackTop();n.scope&&n.scope.setTags(t)},t.prototype.setExtras=function(t){var n=this.getStackTop();n.scope&&n.scope.setExtras(t)},t.prototype.setTag=function(t,n){var e=this.getStackTop();e.scope&&e.scope.setTag(t,n)},t.prototype.setExtra=function(t,n){var e=this.getStackTop();e.scope&&e.scope.setExtra(t,n)},t.prototype.setContext=function(t,n){var e=this.getStackTop();e.scope&&e.scope.setContext(t,n)},t.prototype.configureScope=function(t){var n=this.getStackTop();n.scope&&n.client&&t(n.scope)},t.prototype.run=function(t){var n=Z(this);try{t(this)}finally{Z(n)}},t.prototype.getIntegration=function(t){var n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch(n){return j.warn("Cannot retrieve integration "+t.id+" from the current Hub"),null}},t.prototype.traceHeaders=function(){var t=this.getStackTop();if(t.scope&&t.client){var n=t.scope.getSpan();if(n)return{"sentry-trace":n.toTraceparent()}}return{}},t}();function K(){var t=_();return t.__SENTRY__=t.__SENTRY__||{hub:void 0},t}function Z(t){var n=K(),e=nt(n);return et(n,t),e}function Q(){var t,n=K();tt(n)&&!nt(n).isOlderThan(V)||et(n,new z);try{var e=(t=module,"domain",t.require("domain")).active;if(!e)return nt(n);if(!tt(e)||nt(e).isOlderThan(V)){var r=nt(n).getStackTop();et(e,new z(r.client,J.clone(r.scope)))}return nt(e)}catch(t){return nt(n)}}function tt(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function nt(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub||(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new z),t.__SENTRY__.hub}function et(t,n){return!!t&&(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=n,!0)}function rt(t){for(var n=[],e=1;e1&&(h=d.slice(0,-1).join("/"),f=d.pop()),Object.assign(this,{host:c,pass:s,path:h,projectId:f,port:l,protocol:r,user:o})},t.prototype.Z=function(t){this.protocol=t.protocol,this.user=t.user,this.pass=t.pass||"",this.host=t.host,this.port=t.port||"",this.path=t.path||"",this.projectId=t.projectId},t.prototype.Y=function(){var t=this;if(["protocol","user","host","projectId"].forEach((function(n){if(!t[n])throw new p("Invalid Dsn")})),"http"!==this.protocol&&"https"!==this.protocol)throw new p("Invalid Dsn");if(this.port&&Number.isNaN(parseInt(this.port,10)))throw new p("Invalid Dsn")},t}(),ct=function(){function t(t){this.dsn=t,this.nn=new at(t)}return t.prototype.getDsn=function(){return this.nn},t.prototype.getStoreEndpoint=function(){return""+this.tn()+this.getStoreEndpointPath()},t.prototype.getStoreEndpointWithUrlEncodedAuth=function(){var t,n={sentry_key:this.nn.user,sentry_version:"7"};return this.getStoreEndpoint()+"?"+(t=n,Object.keys(t).map((function(n){return encodeURIComponent(n)+"="+encodeURIComponent(t[n])})).join("&"))},t.prototype.tn=function(){var t=this.nn,n=t.protocol?t.protocol+":":"",e=t.port?":"+t.port:"";return n+"//"+t.host+e},t.prototype.getStoreEndpointPath=function(){var t=this.nn;return(t.path?"/"+t.path:"")+"/api/"+t.projectId+"/store/"},t.prototype.getRequestHeaders=function(t,n){var e=this.nn,r=["Sentry sentry_version=7"];return r.push("sentry_timestamp="+(new Date).getTime()),r.push("sentry_client="+t+"/"+n),r.push("sentry_key="+e.user),e.pass&&r.push("sentry_secret="+e.pass),{"Content-Type":"application/json","X-Sentry-Auth":r.join(", ")}},t.prototype.getReportDialogEndpoint=function(t){void 0===t&&(t={});var n=this.nn,e=this.tn()+(n.path?"/"+n.path:"")+"/api/embed/error-page/",r=[];for(var o in r.push("dsn="+n.toString()),t)if("user"===o){if(!t.user)continue;t.user.name&&r.push("name="+encodeURIComponent(t.user.name)),t.user.email&&r.push("email="+encodeURIComponent(t.user.email))}else r.push(encodeURIComponent(o)+"="+encodeURIComponent(t[o]));return r.length?e+"?"+r.join("&"):e},t}(),ut=[];var pt,lt=function(){function t(t,n){this.rn=!1,this.en=new t(n),this.in=n,n.dsn&&(this.on=new at(n.dsn)),this.un=function(t){var n={};return function(t){var n=t.defaultIntegrations&&c(t.defaultIntegrations)||[],e=t.integrations,r=[];if(Array.isArray(e)){var o=e.map((function(t){return t.name})),i=[];n.forEach((function(t){-1===o.indexOf(t.name)&&-1===i.indexOf(t.name)&&(r.push(t),i.push(t.name))})),e.forEach((function(t){-1===i.indexOf(t.name)&&(r.push(t),i.push(t.name))}))}else{if("function"!=typeof e)return c(n);r=e(n),r=Array.isArray(r)?r:[r]}return r}(t).forEach((function(t){n[t.name]=t,function(t){-1===ut.indexOf(t.name)&&(t.setupOnce(X,Q),ut.push(t.name),j.log("Integration installed: "+t.name))}(t)})),n}(this.in)}return t.prototype.captureException=function(t,n,e){var r=this,o=n&&n.event_id;return this.rn=!0,this.cn().eventFromException(t,n).then((function(t){return r.sn(t,n,e)})).then((function(t){o=t&&t.event_id,r.rn=!1})).catch((function(t){j.error(t),r.rn=!1})),o},t.prototype.captureMessage=function(t,n,e,r){var o=this,i=e&&e.event_id;return this.rn=!0,(v(t)?this.cn().eventFromMessage(""+t,n,e):this.cn().eventFromException(t,e)).then((function(t){return o.sn(t,e,r)})).then((function(t){i=t&&t.event_id,o.rn=!1})).catch((function(t){j.error(t),o.rn=!1})),i},t.prototype.captureEvent=function(t,n,e){var r=this,o=n&&n.event_id;return this.rn=!0,this.sn(t,n,e).then((function(t){o=t&&t.event_id,r.rn=!1})).catch((function(t){j.error(t),r.rn=!1})),o},t.prototype.getDsn=function(){return this.on},t.prototype.getOptions=function(){return this.in},t.prototype.flush=function(t){var n=this;return this.an(t).then((function(e){return clearInterval(e.interval),n.cn().getTransport().close(t).then((function(t){return e.ready&&t}))}))},t.prototype.close=function(t){var n=this;return this.flush(t).then((function(t){return n.getOptions().enabled=!1,t}))},t.prototype.getIntegrations=function(){return this.un||{}},t.prototype.getIntegration=function(t){try{return this.un[t.id]||null}catch(n){return j.warn("Cannot retrieve integration "+t.id+" from the current Client"),null}},t.prototype.an=function(t){var n=this;return new Promise((function(e){var r=0,o=0;clearInterval(o),o=setInterval((function(){n.rn?(r+=1,t&&r>=t&&e({interval:o,ready:!1})):e({interval:o,ready:!0})}),1)}))},t.prototype.cn=function(){return this.en},t.prototype.fn=function(){return!1!==this.getOptions().enabled&&void 0!==this.on},t.prototype.hn=function(t,n,e){var r=this.getOptions(),o=r.environment,i=r.release,a=r.dist,c=r.maxValueLength,u=void 0===c?250:c,p=s({},t);void 0===p.environment&&void 0!==o&&(p.environment=o),void 0===p.release&&void 0!==i&&(p.release=i),void 0===p.dist&&void 0!==a&&(p.dist=a),p.message&&(p.message=U(p.message,u));var l=p.exception&&p.exception.values&&p.exception.values[0];l&&l.value&&(l.value=U(l.value,u));var h=p.request;h&&h.url&&(h.url=U(h.url,u)),void 0===p.event_id&&(p.event_id=E()),this.ln(p.sdk);var f=W.resolve(p);return n&&(f=n.applyToEvent(p,e)),f},t.prototype.ln=function(t){var n=Object.keys(this.un);t&&n.length>0&&(t.integrations=n)},t.prototype.sn=function(t,n,e){var r=this,o=this.getOptions(),i=o.beforeSend,s=o.sampleRate;return this.fn()?"number"==typeof s&&Math.random()>s?W.reject("This event has been sampled, will not send event."):new W((function(o,s){r.hn(t,e,n).then((function(t){if(null!==t){var e=t;try{if(n&&n.data&&!0===n.data.__sentry__||!i)return r.cn().sendEvent(e),void o(e);var a=i(t,n);if(void 0===a)j.error("`beforeSend` method has to return `null` or a valid event.");else if(g(a))r.vn(a,o,s);else{if(null===(e=a))return j.log("`beforeSend` returned `null`, will not send event."),void o(null);r.cn().sendEvent(e),o(e)}}catch(t){r.captureException(t,{data:{__sentry__:!0},originalException:t}),s("`beforeSend` throw an error, will not send event.")}}else s("An event processor returned null, will not send event.")}))})):W.reject("SDK not enabled, will not send event.")},t.prototype.vn=function(t,n,e){var r=this;t.then((function(t){null!==t?(r.cn().sendEvent(t),n(t)):e("`beforeSend` returned `null`, will not send event.")})).catch((function(t){e("beforeSend rejected with "+t)}))},t}(),ht=function(){function n(){}return n.prototype.sendEvent=function(n){return Promise.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:t.Status.Skipped})},n.prototype.close=function(t){return Promise.resolve(!0)},n}(),ft=function(){function t(t){this.in=t,this.in.dsn||j.warn("No DSN provided, backend will not do anything."),this.dn=this.pn()}return t.prototype.pn=function(){return new ht},t.prototype.eventFromException=function(t,n){throw new p("Backend has to implement `eventFromException` method")},t.prototype.eventFromMessage=function(t,n,e){throw new p("Backend has to implement `eventFromMessage` method")},t.prototype.sendEvent=function(t){this.dn.sendEvent(t).catch((function(t){j.error("Error while sending event: "+t)}))},t.prototype.getTransport=function(){return this.dn},t}(),dt=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){pt=Function.prototype.toString,Function.prototype.toString=function(){for(var t=[],n=0;n|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,i=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,s=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,a=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,c=/\((\S*)(?::(\d+))(?::(\d+))\)/,u=t.stack.split("\n"),p=[],l=/^(.*) is undefined$/.exec(t.message),h=0,f=u.length;h eval")>-1&&(n=a.exec(e[3]))?(e[1]=e[1]||"eval",e[3]=n[1],e[4]=n[2],e[5]=""):0!==h||e[5]||void 0===t.columnNumber||(p[0].column=t.columnNumber+1),r={url:e[3],func:e[1]||Et,args:e[2]?e[2].split(","):[],line:e[4]?+e[4]:null,column:e[5]?+e[5]:null}}!r.func&&r.line&&(r.func=Et),r.context=null,p.push(r)}return p.length?(p[0]&&p[0].line&&!p[0].column&&l&&(p[0].column=null),{mode:"stack",name:t.name,message:t.message,stack:p}):null}function n(t,n,e,r){var o={url:n,line:e};if(o.url&&o.line){if(t.incomplete=!1,o.func||(o.func=Et),o.context||(o.context=null),/ '([^']+)' /.exec(r)&&(o.column=null),t.stack.length>0&&t.stack[0].url===o.url){if(t.stack[0].line===o.line)return!1;if(!t.stack[0].line&&t.stack[0].func===o.func)return t.stack[0].line=o.line,t.stack[0].context=o.context,!1}return t.stack.unshift(o),t.partial=!0,!0}return t.incomplete=!0,!1}function e(t,r){for(var o,i,s=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,a=[],c={},u=!1,p=e.caller;p&&!u;p=p.caller)if(p!==Tt&&p!==_t._n){if(i={url:null,func:Et,args:[],line:null,column:null},p.name?i.func=p.name:(o=s.exec(p.toString()))&&(i.func=o[1]),void 0===i.func)try{i.func=o.input.substring(0,o.input.indexOf("{"))}catch(t){}c[""+p]?u=!0:c[""+p]=!0,a.push(i)}r&&a.splice(0,r);var l={mode:"callers",name:t.name,message:t.message,stack:a};return n(l,t.sourceURL||t.fileName,t.line||t.lineNumber,t.message||t.description),l}function r(n,r){var o=null;r=null==r?0:+r;try{if(o=function(t){var n=t.stacktrace;if(n){for(var e,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,o=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,i=n.split("\n"),s=[],a=0;a"}0!==n.length&&Q().addBreadcrumb({category:"ui."+t,message:n},{event:e,name:t})};Yt&&clearTimeout(Yt),n?Yt=setTimeout(r):r()}}}function Jt(){return function(t){var n;try{n=t.target}catch(t){return}var e=n&&n.tagName;e&&("INPUT"===e||"TEXTAREA"===e||n.isContentEditable)&&(Ct||$t("input")(t),clearTimeout(Ct),Ct=setTimeout((function(){Ct=void 0}),1e3))}}function Gt(t){for(var n,e=t,r=[],o=0,i=0;e&&o++<5&&!("html"===(n=Xt(e))||o>1&&i+3*r.length+n.length>=80);)r.push(n),i+=n.length,e=e.parentNode;return r.reverse().join(" > ")}function Xt(t){var n,e,r,o,i,s=[];if(!t||!t.tagName)return"";if(s.push(t.tagName.toLowerCase()),t.id&&s.push("#"+t.id),(n=t.className)&&d(n))for(e=n.split(/\s+/),i=0;i0)){var o=Q().getIntegration(t);o&&Q().captureEvent(o.An(n),{data:{stack:n},originalException:r})}})),this.in.onerror&&(j.log("Global Handler attached: onerror"),kt()),this.in.onunhandledrejection&&(j.log("Global Handler attached: onunhandledrejection"),Ot())},t.prototype.An=function(t){if(!d(t.message)&&"onunhandledrejection"!==t.mechanism){var n=t.message;t.message=n.error&&d(n.error.message)?n.error.message:"No error message"}var e=Rt(t),r={mode:t.mode};t.message&&(r.message=t.message),t.name&&(r.name=t.name);var o=Q().getClient(),i=o&&o.getOptions().maxValueLength||250;return x(e,t.original?U(JSON.stringify(L(t.original)),i):"","onunhandledrejection"===t.mechanism?"UnhandledRejection":"Error",{data:r,handled:!1,type:t.mechanism}),e},t.id="GlobalHandlers",t}(),zt=function(){function t(){this.Ln=0,this.name=t.id}return t.prototype.Mn=function(t){return function(){for(var n=[],e=0;e"}catch(t){return""}}var Zt,Qt=_(),tn=function(){function n(t){this.name=n.id,this.in=s({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}return n.prototype.Pn=function(){"console"in Qt&&["debug","info","warn","error","log","assert"].forEach((function(e){e in Qt.console&&R(Qt.console,e,(function(r){return function(){for(var o=[],i=0;i2?n[2]:void 0;return r&&s(Zt,String(r)),t.apply(this,n)}}},n.prototype.Wn=function(){if("XMLHttpRequest"in Qt){var t=XMLHttpRequest.prototype;R(t,"open",(function(t){return function(){for(var n=[],e=0;e"},handled:!0,type:"instrument"}})}))}(t,o)})),"onreadystatechange"in o&&"function"==typeof o.onreadystatechange?R(o,"onreadystatechange",(function(t){return Wt(t,{mechanism:{data:{function:"onreadystatechange",handler:t&&t.name||""},handled:!0,type:"instrument"}},i)})):o.onreadystatechange=i,t.apply(this,e)}}))}},n.addBreadcrumb=function(t,e){Q().getIntegration(n)&&Q().addBreadcrumb(t,e)},n.prototype.setupOnce=function(){this.in.console&&this.Pn(),this.in.dom&&this.$n(),this.in.xhr&&this.Wn(),this.in.fetch&&this.qn(),this.in.history&&this.Hn()},n.id="Breadcrumbs",n}();function nn(n){try{var e=JSON.parse(n);tn.addBreadcrumb({category:"sentry",event_id:e.event_id,level:e.level||t.Severity.fromString("error"),message:S(e)},{event:e})}catch(t){j.error("Error while adding sentry type breadcrumb")}}var en=function(){function t(n){void 0===n&&(n={}),this.name=t.id,this.Bn=n.key||"cause",this.s=n.limit||5}return t.prototype.setupOnce=function(){X((function(n,e){var r=Q().getIntegration(t);return r?r.Jn(n,e):n}))},t.prototype.Jn=function(t,n){if(!(t.exception&&t.exception.values&&n&&n.originalException instanceof Error))return t;var e=this.Xn(n.originalException,this.Bn);return t.exception.values=c(e,t.exception.values),t},t.prototype.Xn=function(t,n,e){if(void 0===e&&(e=[]),!(t[n]instanceof Error)||e.length+1>=this.s)return e;var r=Nt(Tt(t[n]));return this.Xn(t[n],n,c([r],e))},t.id="LinkedErrors",t}(),rn=_(),on=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){X((function(n){if(Q().getIntegration(t)){if(!rn.navigator||!rn.location)return n;var e=n.request||{};return e.url=e.url||rn.location.href,e.headers=e.headers||{},e.headers["User-Agent"]=rn.navigator.userAgent,s({},n,{request:e})}return n}))},t.id="UserAgent",t}(),sn=Object.freeze({GlobalHandlers:Vt,TryCatch:zt,Breadcrumbs:tn,LinkedErrors:en,UserAgent:on}),an=[new yt,new dt,new zt,new tn,new Vt,new en,new on],cn={},un=_();un.Sentry&&un.Sentry.Integrations&&(cn=un.Sentry.Integrations);var pn=s({},cn,gt,sn);return t.BrowserClient=Ht,t.Hub=z,t.Integrations=pn,t.SDK_NAME=Bt,t.SDK_VERSION="5.5.0",t.Scope=J,t.Span=$,t.Transports=At,t.addBreadcrumb=function(t){rt("addBreadcrumb",t)},t.addGlobalEventProcessor=X,t.captureEvent=function(t){return rt("captureEvent",t)},t.captureException=ot,t.captureMessage=function(t,n){var e;try{throw new Error(t)}catch(t){e=t}return rt("captureMessage",t,n,{originalException:t,syntheticException:e})},t.close=function(t){var n=Q().getClient();return n?n.close(t):Promise.reject(!1)},t.configureScope=function(t){rt("configureScope",t)},t.defaultIntegrations=an,t.flush=function(t){var n=Q().getClient();return n?n.flush(t):Promise.reject(!1)},t.forceLoad=function(){},t.getCurrentHub=Q,t.getHubFromCarrier=nt,t.init=function(t){if(void 0===t&&(t={}),void 0===t.defaultIntegrations&&(t.defaultIntegrations=an),void 0===t.release){var n=_();n.SENTRY_RELEASE&&n.SENTRY_RELEASE.id&&(t.release=n.SENTRY_RELEASE.id)}!function(t,n){!0===n.debug&&j.enable(),Q().bindClient(new t(n))}(Ht,t)},t.lastEventId=function(){return Q().lastEventId()},t.onLoad=function(t){t()},t.setContext=function(t,n){rt("setContext",t,n)},t.setExtra=function(t,n){rt("setExtra",t,n)},t.setExtras=function(t){rt("setExtras",t)},t.setTag=function(t,n){rt("setTag",t,n)},t.setTags=function(t){rt("setTags",t)},t.setUser=function(t){rt("setUser",t)},t.showReportDialog=function(t){void 0===t&&(t={}),t.eventId||(t.eventId=Q().lastEventId());var n=Q().getClient();n&&n.showReportDialog(t)},t.withScope=it,t.wrap=function(t){Wt(t)()},t}({});