@sentry/browser 5.25.0-beta.2 → 5.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/bundle.es6.js +545 -829
- package/build/bundle.es6.js.map +1 -1
- package/build/bundle.es6.min.js +2 -2
- package/build/bundle.es6.min.js.map +1 -1
- package/build/bundle.js +552 -860
- package/build/bundle.js.map +1 -1
- package/build/bundle.min.js +2 -2
- package/build/bundle.min.js.map +1 -1
- package/dist/transports/fetch.d.ts +0 -5
- package/dist/transports/fetch.d.ts.map +1 -1
- package/dist/transports/fetch.js +0 -34
- package/dist/transports/fetch.js.map +1 -1
- package/dist/transports/xhr.d.ts +0 -5
- package/dist/transports/xhr.d.ts.map +1 -1
- package/dist/transports/xhr.js +0 -28
- package/dist/transports/xhr.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/esm/transports/fetch.d.ts +0 -5
- package/esm/transports/fetch.d.ts.map +1 -1
- package/esm/transports/fetch.js +1 -35
- package/esm/transports/fetch.js.map +1 -1
- package/esm/transports/xhr.d.ts +0 -5
- package/esm/transports/xhr.d.ts.map +1 -1
- package/esm/transports/xhr.js +1 -29
- package/esm/transports/xhr.js.map +1 -1
- package/esm/version.d.ts +1 -1
- package/esm/version.d.ts.map +1 -1
- package/esm/version.js +1 -1
- package/esm/version.js.map +1 -1
- package/package.json +8 -6
package/build/bundle.es6.min.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! @sentry/browser 5.25.0
|
|
2
|
-
var Sentry=function(t){var e,n,r,s;function i(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return p(t,Error)}}function o(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)}function c(t){return"[object DOMError]"===Object.prototype.toString.call(t)}function u(t){return"[object String]"===Object.prototype.toString.call(t)}function a(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function h(t){return"[object Object]"===Object.prototype.toString.call(t)}function l(t){return"undefined"!=typeof Event&&p(t,Event)}function f(t){return"undefined"!=typeof Element&&p(t,Element)}function d(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function p(t,e){try{return t instanceof e}catch(t){return!1}}function b(t){try{let e=t;const n=5,r=80,s=[];let i=0,o=0;const c=" > ",u=c.length;let a;for(;e&&i++<n&&!("html"===(a=m(e))||i>1&&o+s.length*u+a.length>=r);)s.push(a),o+=a.length,e=e.parentNode;return s.reverse().join(c)}catch(t){return"<unknown>"}}function m(t){const e=t,n=[];let r,s,i,o,c;if(!e||!e.tagName)return"";if(n.push(e.tagName.toLowerCase()),e.id&&n.push(`#${e.id}`),(r=e.className)&&u(r))for(s=r.split(/\s+/),c=0;c<s.length;c++)n.push(`.${s[c]}`);const a=["type","name","title","alt"];for(c=0;c<a.length;c++)i=a[c],(o=e.getAttribute(i))&&n.push(`[${i}="${o}"]`);return n.join("")}!function(t){t[t.None=0]="None",t[t.Error=1]="Error",t[t.Debug=2]="Debug",t[t.Verbose=3]="Verbose"}(e||(e={})),function(t){t.Ok="ok",t.Exited="exited",t.Crashed="crashed",t.Abnormal="abnormal"}(n||(n={})),(r=t.Severity||(t.Severity={})).Fatal="fatal",r.Error="error",r.Warning="warning",r.Log="log",r.Info="info",r.Debug="debug",r.Critical="critical",function(t){t.fromString=function(e){switch(e){case"debug":return t.Debug;case"info":return t.Info;case"warn":case"warning":return t.Warning;case"error":return t.Error;case"fatal":return t.Fatal;case"critical":return t.Critical;case"log":default:return t.Log}}}(t.Severity||(t.Severity={})),(s=t.Status||(t.Status={})).Unknown="unknown",s.Skipped="skipped",s.Success="success",s.RateLimit="rate_limit",s.Invalid="invalid",s.Failed="failed",function(t){t.fromHttpCode=function(e){return e>=200&&e<300?t.Success:429===e?t.RateLimit:e>=400&&e<500?t.Invalid:e>=500?t.Failed:t.Unknown}}(t.Status||(t.Status={}));const v=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){return t.__proto__=e,t}:function(t,e){for(const n in e)t.hasOwnProperty(n)||(t[n]=e[n]);return t});class y extends Error{constructor(t){super(t),this.message=t,this.name=new.target.prototype.constructor.name,v(this,new.target.prototype)}}const g=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,j="Invalid Dsn";class O{constructor(t){"string"==typeof t?this.t(t):this.s(t),this.i()}toString(t=!1){const{host:e,path:n,pass:r,port:s,projectId:i,protocol:o,user:c}=this;return`${o}://${c}${t&&r?`:${r}`:""}`+`@${e}${s?`:${s}`:""}/${n?`${n}/`:n}${i}`}t(t){const e=g.exec(t);if(!e)throw new y(j);const[n,r,s="",i,o="",c]=e.slice(1);let u="",a=c;const h=a.split("/");if(h.length>1&&(u=h.slice(0,-1).join("/"),a=h.pop()),a){const t=a.match(/^\d+/);t&&(a=t[0])}this.s({host:i,pass:s,path:u,projectId:a,port:o,protocol:n,user:r})}s(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}i(){if(["protocol","user","host","projectId"].forEach(t=>{if(!this[t])throw new y(`${j}: ${t} missing`)}),!this.projectId.match(/^\d+$/))throw new y(`${j}: Invalid projectId ${this.projectId}`);if("http"!==this.protocol&&"https"!==this.protocol)throw new y(`${j}: Invalid protocol ${this.protocol}`);if(this.port&&isNaN(parseInt(this.port,10)))throw new y(`${j}: Invalid port ${this.port}`)}}class w{constructor(){this.o="function"==typeof WeakSet,this.u=this.o?new WeakSet:[]}memoize(t){if(this.o)return!!this.u.has(t)||(this.u.add(t),!1);for(let e=0;e<this.u.length;e++){if(this.u[e]===t)return!0}return this.u.push(t),!1}unmemoize(t){if(this.o)this.u.delete(t);else for(let e=0;e<this.u.length;e++)if(this.u[e]===t){this.u.splice(e,1);break}}}const E="<anonymous>";function $(t){try{return t&&"function"==typeof t&&t.name||E}catch(t){return E}}function _(t,e=0){return"string"!=typeof t||0===e?t:t.length<=e?t:`${t.substr(0,e)}...`}function x(t,e){if(!Array.isArray(t))return"";const n=[];for(let e=0;e<t.length;e++){const r=t[e];try{n.push(String(r))}catch(t){n.push("[value cannot be serialized]")}}return n.join(e)}function S(t,e){return!!u(t)&&(n=e,"[object RegExp]"===Object.prototype.toString.call(n)?e.test(t):"string"==typeof e&&-1!==t.indexOf(e));var n}function k(t,e,n){if(!(e in t))return;const r=t[e],s=n(r);if("function"==typeof s)try{s.prototype=s.prototype||{},Object.defineProperties(s,{__sentry_original__:{enumerable:!1,value:r}})}catch(t){}t[e]=s}function T(t){if(i(t)){const e=t,n={message:e.message,name:e.name,stack:e.stack};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n}if(l(t)){const e=t,n={};n.type=e.type;try{n.target=f(e.target)?b(e.target):Object.prototype.toString.call(e.target)}catch(t){n.target="<unknown>"}try{n.currentTarget=f(e.currentTarget)?b(e.currentTarget):Object.prototype.toString.call(e.currentTarget)}catch(t){n.currentTarget="<unknown>"}"undefined"!=typeof CustomEvent&&p(t,CustomEvent)&&(n.detail=e.detail);for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e);return n}return t}function D(t){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}function R(t,e=3,n=102400){const r=C(t,e);return D(r)>n?R(t,e-1,n):r}function I(t,e){return"domain"===e&&t&&"object"==typeof t&&t.h?"[Domain]":"domainEmitter"===e?"[DomainEmitter]":"undefined"!=typeof global&&t===global?"[Global]":"undefined"!=typeof window&&t===window?"[Window]":"undefined"!=typeof document&&t===document?"[Document]":h(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n?"[SyntheticEvent]":"number"==typeof t&&t!=t?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?`[Function: ${$(t)}]`:t;var n}function N(t,e,n=1/0,r=new w){if(0===n)return function(t){const e=Object.prototype.toString.call(t);if("string"==typeof t)return t;if("[object Object]"===e)return"[Object]";if("[object Array]"===e)return"[Array]";const n=I(t);return a(n)?n:e}(e);if(null!=e&&"function"==typeof e.toJSON)return e.toJSON();const s=I(e,t);if(a(s))return s;const i=T(e),o=Array.isArray(e)?[]:{};if(r.memoize(e))return"[Circular ~]";for(const t in i)Object.prototype.hasOwnProperty.call(i,t)&&(o[t]=N(t,i[t],n-1,r));return r.unmemoize(e),o}function C(t,e){try{return JSON.parse(JSON.stringify(t,(t,n)=>N(t,n,e)))}catch(t){return"**non-serializable**"}}function M(t,e=40){const n=Object.keys(T(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return _(n[0],e);for(let t=n.length;t>0;t--){const r=n.slice(0,t).join(", ");if(!(r.length>e))return t===n.length?r:_(r,e)}return""}function A(t){if(h(t)){const e=t,n={};for(const t of Object.keys(e))void 0!==e[t]&&(n[t]=A(e[t]));return n}return Array.isArray(t)?t.map(A):t}function U(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}const L={};function F(){return U()?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:L}function q(){const t=F(),e=t.crypto||t.msCrypto;if(void 0!==e&&e.getRandomValues){const t=new Uint16Array(8);e.getRandomValues(t),t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const n=t=>{let e=t.toString(16);for(;e.length<4;)e=`0${e}`;return e};return n(t[0])+n(t[1])+n(t[2])+n(t[3])+n(t[4])+n(t[5])+n(t[6])+n(t[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,t=>{const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}function B(t){if(!t)return{};const e=t.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],relative:e[5]+n+r}}function H(t){if(t.message)return t.message;if(t.exception&&t.exception.values&&t.exception.values[0]){const e=t.exception.values[0];return e.type&&e.value?`${e.type}: ${e.value}`:e.type||e.value||t.event_id||"<unknown>"}return t.event_id||"<unknown>"}function P(t){const e=F();if(!("console"in e))return t();const n=e.console,r={};["debug","info","warn","error","log","assert"].forEach(t=>{t in e.console&&n[t].__sentry_original__&&(r[t]=n[t],n[t]=n[t].__sentry_original__)});const s=t();return Object.keys(r).forEach(t=>{n[t]=r[t]}),s}function W(t,e,n){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||e||"",t.exception.values[0].type=t.exception.values[0].type||n||"Error"}function X(t,e={}){try{t.exception.values[0].mechanism=t.exception.values[0].mechanism||{},Object.keys(e).forEach(n=>{t.exception.values[0].mechanism[n]=e[n]})}catch(t){}}const J=Date.now();let G=0;const z={now(){let t=Date.now()-J;return t<G&&(t=G),G=t,t},timeOrigin:J};const V=(()=>{if(function(){var t;return"ReactNative"===(null===(t=F().navigator)||void 0===t?void 0:t.product)}())return function(){const{performance:t}=F();if(t&&"function"==typeof t.now){const e=t.now();return{now:()=>t.now()-e,timeOrigin:J}}return z}();if(U())try{return function(t,e){return t.require(e)}(module,"perf_hooks").performance}catch(t){return z}const{performance:t}=F();return t&&t.now?(void 0===t.timeOrigin&&(t.timeOrigin=t.timing&&t.timing.navigationStart||J),t):z})();function K(){return(V.timeOrigin+V.now())/1e3}const Q=6e4;function Y(t,e){if(!e)return Q;const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?Q:r-t}const Z=F(),tt="Sentry Logger ";Z.__SENTRY__=Z.__SENTRY__||{};const et=Z.__SENTRY__.logger||(Z.__SENTRY__.logger=new class{constructor(){this.l=!1}disable(){this.l=!1}enable(){this.l=!0}log(...t){this.l&&P(()=>{Z.console.log(`${tt}[Log]: ${t.join(" ")}`)})}warn(...t){this.l&&P(()=>{Z.console.warn(`${tt}[Warn]: ${t.join(" ")}`)})}error(...t){this.l&&P(()=>{Z.console.error(`${tt}[Error]: ${t.join(" ")}`)})}});var nt;!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(nt||(nt={}));class rt{constructor(t){this.p=nt.PENDING,this.m=[],this.v=(t=>{this.g(nt.RESOLVED,t)}),this.j=(t=>{this.g(nt.REJECTED,t)}),this.g=((t,e)=>{this.p===nt.PENDING&&(d(e)?e.then(this.v,this.j):(this.p=t,this.O=e,this.$()))}),this._=(t=>{this.m=this.m.concat(t),this.$()}),this.$=(()=>{if(this.p===nt.PENDING)return;const t=this.m.slice();this.m=[],t.forEach(t=>{t.done||(this.p===nt.RESOLVED&&t.onfulfilled&&t.onfulfilled(this.O),this.p===nt.REJECTED&&t.onrejected&&t.onrejected(this.O),t.done=!0)})});try{t(this.v,this.j)}catch(t){this.j(t)}}static resolve(t){return new rt(e=>{e(t)})}static reject(t){return new rt((e,n)=>{n(t)})}static all(t){return new rt((e,n)=>{if(!Array.isArray(t))return void n(new TypeError("Promise.all requires an array as input."));if(0===t.length)return void e([]);let r=t.length;const s=[];t.forEach((t,i)=>{rt.resolve(t).then(t=>{s[i]=t,0===(r-=1)&&e(s)}).then(null,n)})})}then(t,e){return new rt((n,r)=>{this._({done:!1,onfulfilled:e=>{if(t)try{return void n(t(e))}catch(t){return void r(t)}else n(e)},onrejected:t=>{if(e)try{return void n(e(t))}catch(t){return void r(t)}else r(t)}})})}catch(t){return this.then(t=>t,t)}finally(t){return new rt((e,n)=>{let r,s;return this.then(e=>{s=!1,r=e,t&&t()},e=>{s=!0,r=e,t&&t()}).then(()=>{s?n(r):e(r)})})}toString(){return"[object SyncPromise]"}}class st{constructor(t){this.S=t,this.k=[]}isReady(){return void 0===this.S||this.length()<this.S}add(t){return this.isReady()?(-1===this.k.indexOf(t)&&this.k.push(t),t.then(()=>this.remove(t)).then(null,()=>this.remove(t).then(null,()=>{})),t):rt.reject(new y("Not adding Promise due to buffer limit reached."))}remove(t){return this.k.splice(this.k.indexOf(t),1)[0]}length(){return this.k.length}drain(t){return new rt(e=>{const n=setTimeout(()=>{t&&t>0&&e(!1)},t);rt.all(this.k).then(()=>{clearTimeout(n),e(!0)}).then(null,()=>{e(!0)})})}}function it(){if(!("fetch"in F()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function ot(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function ct(){if(!it())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}const ut=F(),at={},ht={};function lt(t){if(!ht[t])switch(ht[t]=!0,t){case"console":!function(){if(!("console"in ut))return;["debug","info","warn","error","log","assert"].forEach(function(t){t in ut.console&&k(ut.console,t,function(e){return function(...n){dt("console",{args:n,level:t}),e&&Function.prototype.apply.call(e,ut.console,n)}})})}();break;case"dom":!function(){if(!("document"in ut))return;ut.document.addEventListener("click",Ot("click",dt.bind(null,"dom")),!1),ut.document.addEventListener("keypress",wt(dt.bind(null,"dom")),!1),["EventTarget","Node"].forEach(t=>{const e=ut[t]&&ut[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(k(e,"addEventListener",function(t){return function(e,n,r){return n&&n.handleEvent?("click"===e&&k(n,"handleEvent",function(t){return function(e){return Ot("click",dt.bind(null,"dom"))(e),t.call(this,e)}}),"keypress"===e&&k(n,"handleEvent",function(t){return function(e){return wt(dt.bind(null,"dom"))(e),t.call(this,e)}})):("click"===e&&Ot("click",dt.bind(null,"dom"),!0)(this),"keypress"===e&&wt(dt.bind(null,"dom"))(this)),t.call(this,e,n,r)}}),k(e,"removeEventListener",function(t){return function(e,n,r){try{t.call(this,e,n.__sentry_wrapped__,r)}catch(t){}return t.call(this,e,n,r)}}))})}();break;case"xhr":!function(){if(!("XMLHttpRequest"in ut))return;const t=[],e=[],n=XMLHttpRequest.prototype;k(n,"open",function(n){return function(...r){const s=this,i=r[1];s.__sentry_xhr__={method:u(r[0])?r[0].toUpperCase():r[0],url:r[1]},u(i)&&"POST"===s.__sentry_xhr__.method&&i.match(/sentry_key/)&&(s.__sentry_own_request__=!0);const o=function(){if(4===s.readyState){try{s.__sentry_xhr__&&(s.__sentry_xhr__.status_code=s.status)}catch(t){}try{const n=t.indexOf(s);if(-1!==n){t.splice(n);const r=e.splice(n)[0];s.__sentry_xhr__&&void 0!==r[0]&&(s.__sentry_xhr__.body=r[0])}}catch(t){}dt("xhr",{args:r,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:s})}};return"onreadystatechange"in s&&"function"==typeof s.onreadystatechange?k(s,"onreadystatechange",function(t){return function(...e){return o(),t.apply(s,e)}}):s.addEventListener("readystatechange",o),n.apply(s,r)}}),k(n,"send",function(n){return function(...r){return t.push(this),e.push(r),dt("xhr",{args:r,startTimestamp:Date.now(),xhr:this}),n.apply(this,r)}})}();break;case"fetch":!function(){if(!function(){if(!it())return!1;const t=F();if(ot(t.fetch))return!0;let e=!1;const n=t.document;if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t),t.contentWindow&&t.contentWindow.fetch&&(e=ot(t.contentWindow.fetch)),n.head.removeChild(t)}catch(t){et.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return e}())return;k(ut,"fetch",function(t){return function(...e){const n={args:e,fetchData:{method:pt(e),url:bt(e)},startTimestamp:Date.now()};return dt("fetch",Object.assign({},n)),t.apply(ut,e).then(t=>(dt("fetch",Object.assign(Object.assign({},n),{endTimestamp:Date.now(),response:t})),t),t=>{throw dt("fetch",Object.assign(Object.assign({},n),{endTimestamp:Date.now(),error:t})),t})}})}();break;case"history":!function(){if(!function(){const t=F(),e=t.chrome,n=e&&e.app&&e.app.runtime,r="history"in t&&!!t.history.pushState&&!!t.history.replaceState;return!n&&r}())return;const t=ut.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=mt,e=String(n);mt=e,dt("history",{from:t,to:e})}return t.apply(this,e)}}ut.onpopstate=function(...e){const n=ut.location.href,r=mt;if(mt=n,dt("history",{from:r,to:n}),t)return t.apply(this,e)},k(ut.history,"pushState",e),k(ut.history,"replaceState",e)}();break;case"error":Et=ut.onerror,ut.onerror=function(t,e,n,r,s){return dt("error",{column:r,error:s,line:n,msg:t,url:e}),!!Et&&Et.apply(this,arguments)};break;case"unhandledrejection":$t=ut.onunhandledrejection,ut.onunhandledrejection=function(t){return dt("unhandledrejection",t),!$t||$t.apply(this,arguments)};break;default:et.warn("unknown instrumentation type:",t)}}function ft(t){t&&"string"==typeof t.type&&"function"==typeof t.callback&&(at[t.type]=at[t.type]||[],at[t.type].push(t.callback),lt(t.type))}function dt(t,e){if(t&&at[t])for(const n of at[t]||[])try{n(e)}catch(e){et.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${$(n)}\nError: ${e}`)}}function pt(t=[]){return"Request"in ut&&p(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function bt(t=[]){return"string"==typeof t[0]?t[0]:"Request"in ut&&p(t[0],Request)?t[0].url:String(t[0])}let mt;const vt=1e3;let yt,gt,jt=0;function Ot(t,e,n=!1){return r=>{yt=void 0,r&>!==r&&(gt=r,jt&&clearTimeout(jt),n?jt=setTimeout(()=>{e({event:r,name:t})}):e({event:r,name:t}))}}function wt(t){return e=>{let n;try{n=e.target}catch(t){return}const r=n&&n.tagName;r&&("INPUT"===r||"TEXTAREA"===r||n.isContentEditable)&&(yt||Ot("input",t)(e),clearTimeout(yt),yt=setTimeout(()=>{yt=void 0},vt))}}let Et=null;let $t=null;class _t{constructor(){this.T=!1,this.D=[],this.R=[],this.I=[],this.N={},this.C={},this.M={},this.A={}}static clone(t){const e=new _t;return t&&(e.I=[...t.I],e.C=Object.assign({},t.C),e.M=Object.assign({},t.M),e.A=Object.assign({},t.A),e.N=t.N,e.U=t.U,e.L=t.L,e.F=t.F,e.q=t.q,e.B=t.B,e.R=[...t.R]),e}addScopeListener(t){this.D.push(t)}addEventProcessor(t){return this.R.push(t),this}setUser(t){return this.N=t||{},this.F&&this.F.update({user:t}),this.H(),this}getUser(){return this.N}setTags(t){return this.C=Object.assign(Object.assign({},this.C),t),this.H(),this}setTag(t,e){return this.C=Object.assign(Object.assign({},this.C),{[t]:e}),this.H(),this}setExtras(t){return this.M=Object.assign(Object.assign({},this.M),t),this.H(),this}setExtra(t,e){return this.M=Object.assign(Object.assign({},this.M),{[t]:e}),this.H(),this}setFingerprint(t){return this.B=t,this.H(),this}setLevel(t){return this.U=t,this.H(),this}setTransactionName(t){return this.q=t,this.H(),this}setTransaction(t){return this.setTransactionName(t)}setContext(t,e){return this.A=Object.assign(Object.assign({},this.A),{[t]:e}),this.H(),this}setSpan(t){return this.L=t,this.H(),this}getSpan(){return this.L}getTransaction(){const t=this.getSpan();if(t&&t.spanRecorder&&t.spanRecorder.spans[0])return t.spanRecorder.spans[0]}setSession(t){return t?this.F=t:delete this.F,this.H(),this}getSession(){return this.F}update(t){if(!t)return this;if("function"==typeof t){const e=t(this);return e instanceof _t?e:this}return t instanceof _t?(this.C=Object.assign(Object.assign({},this.C),t.C),this.M=Object.assign(Object.assign({},this.M),t.M),this.A=Object.assign(Object.assign({},this.A),t.A),t.N&&(this.N=t.N),t.U&&(this.U=t.U),t.B&&(this.B=t.B)):h(t)&&(t=t,this.C=Object.assign(Object.assign({},this.C),t.tags),this.M=Object.assign(Object.assign({},this.M),t.extra),this.A=Object.assign(Object.assign({},this.A),t.contexts),t.user&&(this.N=t.user),t.level&&(this.U=t.level),t.fingerprint&&(this.B=t.fingerprint)),this}clear(){return this.I=[],this.C={},this.M={},this.N={},this.A={},this.U=void 0,this.q=void 0,this.B=void 0,this.L=void 0,this.F=void 0,this.H(),this}addBreadcrumb(t,e){const n=Object.assign({timestamp:K()},t);return this.I=void 0!==e&&e>=0?[...this.I,n].slice(-e):[...this.I,n],this.H(),this}clearBreadcrumbs(){return this.I=[],this.H(),this}applyToEvent(t,e){return this.M&&Object.keys(this.M).length&&(t.extra=Object.assign(Object.assign({},this.M),t.extra)),this.C&&Object.keys(this.C).length&&(t.tags=Object.assign(Object.assign({},this.C),t.tags)),this.N&&Object.keys(this.N).length&&(t.user=Object.assign(Object.assign({},this.N),t.user)),this.A&&Object.keys(this.A).length&&(t.contexts=Object.assign(Object.assign({},this.A),t.contexts)),this.U&&(t.level=this.U),this.q&&(t.transaction=this.q),this.L&&(t.contexts=Object.assign({trace:this.L.getTraceContext()},t.contexts)),this.P(t),t.breadcrumbs=[...t.breadcrumbs||[],...this.I],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,this.W([...xt(),...this.R],t,e)}W(t,e,n,r=0){return new rt((s,i)=>{const o=t[r];if(null===e||"function"!=typeof o)s(e);else{const c=o(Object.assign({},e),n);d(c)?c.then(e=>this.W(t,e,n,r+1).then(s)).then(null,i):this.W(t,c,n,r+1).then(s).then(null,i)}})}H(){this.T||(this.T=!0,setTimeout(()=>{this.D.forEach(t=>{t(this)}),this.T=!1}))}P(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this.B&&(t.fingerprint=t.fingerprint.concat(this.B)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}}function xt(){const t=F();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function St(t){xt().push(t)}class kt{constructor(t){this.errors=0,this.sid=q(),this.timestamp=Date.now(),this.started=Date.now(),this.status=n.Ok,console.log("new session constructed"),t&&this.update(t)}update(t){t.user&&(t.user.ip_address&&(this.ip_address=t.user.ip_address),t.did||(this.did=t.user.id||t.user.email||t.user.username)),this.timestamp=t.timestamp||Date.now(),t.sid&&(this.sid=32===t.sid.length?t.sid:q()),t.did&&(this.did=`${t.did}`),"number"==typeof t.started&&(this.started=t.started),"number"==typeof t.duration&&(this.duration=t.duration),t.release&&(this.release=t.release),t.environment&&(this.environment=t.environment),t.ip_address&&(this.ip_address=t.ip_address),t.user_agent&&(this.user_agent=t.user_agent),"number"==typeof t.errors&&(this.errors=t.errors),t.status&&(this.status=t.status)}close(t){t?this.update({status:t}):this.status===n.Ok&&this.update({status:n.Exited})}toJSON(){return A({sid:`${this.sid}`,init:!0,started:new Date(this.started).toISOString(),timestamp:new Date(this.timestamp).toISOString(),status:this.status,errors:this.errors,did:"number"==typeof this.did||"string"==typeof this.did?`${this.did}`:void 0,duration:this.duration,attrs:A({release:this.release,environment:this.environment,ip_address:this.ip_address,user_agent:this.user_agent})})}}const Tt=3,Dt=100,Rt=100;class It{constructor(t,e=new _t,n=Tt){this.X=n,this.J=[],this.J.push({client:t,scope:e}),this.bindClient(t)}isOlderThan(t){return this.X<t}bindClient(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getStack(),e=t.length>0?t[t.length-1].scope:void 0,n=_t.clone(e);return this.getStack().push({client:this.getClient(),scope:n}),n}popScope(){return void 0!==this.getStack().pop()}withScope(t){const e=this.pushScope();try{t(e)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this.J}getStackTop(){return this.J[this.J.length-1]}captureException(t,e){const n=this.G=q();let r=e;if(!e){let e;try{throw new Error("Sentry syntheticException")}catch(t){e=t}r={originalException:t,syntheticException:e}}return this.V("captureException",t,Object.assign(Object.assign({},r),{event_id:n})),n}captureMessage(t,e,n){const r=this.G=q();let s=n;if(!n){let e;try{throw new Error(t)}catch(t){e=t}s={originalException:t,syntheticException:e}}return this.V("captureMessage",t,e,Object.assign(Object.assign({},s),{event_id:r})),r}captureEvent(t,e){const n=this.G=q();return this.V("captureEvent",t,Object.assign(Object.assign({},e),{event_id:n})),n}lastEventId(){return this.G}addBreadcrumb(t,e){const n=this.getStackTop();if(!n.scope||!n.client)return;const{beforeBreadcrumb:r=null,maxBreadcrumbs:s=Dt}=n.client.getOptions&&n.client.getOptions()||{};if(s<=0)return;const i=K(),o=Object.assign({timestamp:i},t),c=r?P(()=>r(o,e)):o;null!==c&&n.scope.addBreadcrumb(c,Math.min(s,Rt))}setUser(t){const e=this.getStackTop();e.scope&&e.scope.setUser(t)}setTags(t){const e=this.getStackTop();e.scope&&e.scope.setTags(t)}setExtras(t){const e=this.getStackTop();e.scope&&e.scope.setExtras(t)}setTag(t,e){const n=this.getStackTop();n.scope&&n.scope.setTag(t,e)}setExtra(t,e){const n=this.getStackTop();n.scope&&n.scope.setExtra(t,e)}setContext(t,e){const n=this.getStackTop();n.scope&&n.scope.setContext(t,e)}configureScope(t){const e=this.getStackTop();e.scope&&e.client&&t(e.scope)}run(t){const e=Ct(this);try{t(this)}finally{Ct(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return et.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startSpan(t){return this.K("startSpan",t)}startTransaction(t,e){return this.K("startTransaction",t,e)}traceHeaders(){return this.K("traceHeaders")}startSession(){const t=this.getStackTop();if(!t.scope)return;const e=t.client,{release:n,environment:r}=e&&e.getOptions()||{};this.endSession(),t.scope.setSession(new kt({release:n,environment:r,user:t.scope.getUser()}))}endSession(){const t=this.getStackTop();if(!t.scope)return;const e=t.scope.getSession();e&&(e.close(),t.client&&t.client.captureSession(e)),t.scope.setSession(void 0)}V(t,...e){const n=this.getStackTop();n&&n.client&&n.client[t]&&n.client[t](...e,n.scope)}K(t,...e){const n=Nt().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);et.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function Nt(){const t=F();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function Ct(t){const e=Nt(),n=Ut(e);return Lt(e,t),n}function Mt(){const t=Nt();return At(t)&&!Ut(t).isOlderThan(Tt)||Lt(t,new It),U()?function(t){try{const e=function(){const t=Nt().__SENTRY__;return t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active}();if(!e)return Ut(t);if(!At(e)||Ut(e).isOlderThan(Tt)){const n=Ut(t).getStackTop();Lt(e,new It(n.client,_t.clone(n.scope)))}return Ut(e)}catch(e){return Ut(t)}}(t):Ut(t)}function At(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function Ut(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub?t.__SENTRY__.hub:(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new It,t.__SENTRY__.hub)}function Lt(t,e){return!!t&&(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=e,!0)}function Ft(t,...e){const n=Mt();if(n&&n[t])return n[t](...e);throw new Error(`No hub defined or ${t} was not found on the hub, please open a bug report.`)}function captureException(t,e){let n;try{throw new Error("Sentry syntheticException")}catch(t){n=t}return Ft("captureException",t,{captureContext:e,originalException:t,syntheticException:n})}function qt(t){Ft("withScope",t)}const Bt="7";class Ht{constructor(t){this.dsn=t,this.Y=new O(t)}getDsn(){return this.Y}getBaseApiEndpoint(){const t=this.Y,e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}getStoreEndpoint(){return this.Z("store")}getStoreEndpointWithUrlEncodedAuth(){return`${this.getStoreEndpoint()}?${this.tt()}`}getEnvelopeEndpointWithUrlEncodedAuth(){return`${this.et()}?${this.tt()}`}getStoreEndpointPath(){const t=this.Y;return`${t.path?`/${t.path}`:""}/api/${t.projectId}/store/`}getRequestHeaders(t,e){const n=this.Y,r=[`Sentry sentry_version=${Bt}`];return r.push(`sentry_client=${t}/${e}`),r.push(`sentry_key=${n.user}`),n.pass&&r.push(`sentry_secret=${n.pass}`),{"Content-Type":"application/json","X-Sentry-Auth":r.join(", ")}}getReportDialogEndpoint(t={}){const e=this.Y,n=`${this.getBaseApiEndpoint()}embed/error-page/`,r=[];r.push(`dsn=${e.toString()}`);for(const e in t)if("user"===e){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(e)}=${encodeURIComponent(t[e])}`);return r.length?`${n}?${r.join("&")}`:n}et(){return this.Z("envelope")}Z(t){return`${this.getBaseApiEndpoint()}${this.Y.projectId}/${t}/`}tt(){const t={sentry_key:this.Y.user,sentry_version:Bt};return e=t,Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&");var e}}const Pt=[];function Wt(t){const e={};return function(t){const e=t.defaultIntegrations&&[...t.defaultIntegrations]||[],n=t.integrations;let r=[];if(Array.isArray(n)){const t=n.map(t=>t.name),s=[];e.forEach(e=>{-1===t.indexOf(e.name)&&-1===s.indexOf(e.name)&&(r.push(e),s.push(e.name))}),n.forEach(t=>{-1===s.indexOf(t.name)&&(r.push(t),s.push(t.name))})}else"function"==typeof n?(r=n(e),r=Array.isArray(r)?r:[r]):r=[...e];const s=r.map(t=>t.name);return-1!==s.indexOf("Debug")&&r.push(...r.splice(s.indexOf("Debug"),1)),r}(t).forEach(t=>{e[t.name]=t,function(t){-1===Pt.indexOf(t.name)&&(t.setupOnce(St,Mt),Pt.push(t.name),et.log(`Integration installed: ${t.name}`))}(t)}),e}class Xt{constructor(t,e){this.nt={},this.rt=!1,this.st=new t(e),this.it=e,e.dsn&&(this.ot=new O(e.dsn))}captureException(t,e,n){let r=e&&e.event_id;return this.rt=!0,this.ct().eventFromException(t,e).then(t=>{r=this.captureEvent(t,e,n)}),r}captureMessage(t,e,n,r){let s=n&&n.event_id;return this.rt=!0,(a(t)?this.ct().eventFromMessage(`${t}`,e,n):this.ct().eventFromException(t,n)).then(t=>{s=this.captureEvent(t,n,r)}),s}captureEvent(t,e,n){let r=e&&e.event_id;return this.rt=!0,this.ut(t,e,n).then(t=>{r=t&&t.event_id,this.rt=!1}).then(null,t=>{et.error(t),this.rt=!1}),r}captureSession(t){t.release?this.at(t):et.warn("Discarded session update because of missing release")}getDsn(){return this.ot}getOptions(){return this.it}flush(t){return this.ht(t).then(e=>(clearInterval(e.interval),this.ct().getTransport().close(t).then(t=>e.ready&&t)))}close(t){return this.flush(t).then(t=>(this.getOptions().enabled=!1,t))}setupIntegrations(){this.lt()&&(this.nt=Wt(this.it))}getIntegration(t){try{return this.nt[t.id]||null}catch(e){return et.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}ft(t,e){let r,s=!1,i=!1;const o=e.exception&&e.exception.values;if(o){i=!0;for(const t of o){const e=t.mechanism;if(e&&!1===e.handled){s=!0;break}}}const c=e.user;if(!t.user_agent){const t=e.request?e.request.headers:{};for(const e in t)if("user-agent"===e.toLowerCase()){r=t[e];break}}t.update(Object.assign(Object.assign({},s&&{status:n.Crashed}),{user:c,user_agent:r,errors:t.errors+Number(i||s)}))}at(t){this.ct().sendSession(t)}ht(t){return new rt(e=>{let n=0;let r=0;clearInterval(r),r=setInterval(()=>{this.rt?(n+=1,t&&n>=t&&e({interval:r,ready:!1})):e({interval:r,ready:!0})},1)})}ct(){return this.st}lt(){return!1!==this.getOptions().enabled&&void 0!==this.ot}dt(t,e,n){const{normalizeDepth:r=3}=this.getOptions(),s=Object.assign(Object.assign({},t),{event_id:t.event_id||(n&&n.event_id?n.event_id:q()),timestamp:t.timestamp||K()});this.pt(s),this.bt(s);let i=e;n&&n.captureContext&&(i=_t.clone(i).update(n.captureContext));let o=rt.resolve(s);return i&&(o=i.applyToEvent(s,n)),o.then(t=>"number"==typeof r&&r>0?this.vt(t,r):t)}vt(t,e){if(!t)return null;const n=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(t=>Object.assign(Object.assign({},t),t.data&&{data:C(t.data,e)}))}),t.user&&{user:C(t.user,e)}),t.contexts&&{contexts:C(t.contexts,e)}),t.extra&&{extra:C(t.extra,e)});return t.contexts&&t.contexts.trace&&(n.contexts.trace=t.contexts.trace),n}pt(t){const{environment:e,release:n,dist:r,maxValueLength:s=250}=this.getOptions();void 0===t.environment&&void 0!==e&&(t.environment=e),void 0===t.release&&void 0!==n&&(t.release=n),void 0===t.dist&&void 0!==r&&(t.dist=r),t.message&&(t.message=_(t.message,s));const i=t.exception&&t.exception.values&&t.exception.values[0];i&&i.value&&(i.value=_(i.value,s));const o=t.request;o&&o.url&&(o.url=_(o.url,s))}bt(t){const e=t.sdk,n=Object.keys(this.nt);e&&n.length>0&&(e.integrations=n)}yt(t){this.ct().sendEvent(t)}ut(t,e,n){const{beforeSend:r,sampleRate:s}=this.getOptions();if(!this.lt())return rt.reject("SDK not enabled, will not send event.");const i="transaction"===t.type;return!i&&"number"==typeof s&&Math.random()>s?rt.reject("This event has been sampled, will not send event."):new rt((s,o)=>{this.dt(t,n,e).then(t=>{if(null===t)return void o("An event processor returned null, will not send event.");let c=t;if(e&&e.data&&!0===e.data.__sentry__||!r||i){if(!i){const t=n&&n.getSession();t&&this.ft(t,c)}return this.yt(c),void s(c)}const u=r(t,e);if(void 0===u)et.error("`beforeSend` method has to return `null` or a valid event.");else if(d(u))this.gt(u,s,o);else{if(null===(c=u))return et.log("`beforeSend` returned `null`, will not send event."),void s(null);const t=n&&n.getSession();t&&this.ft(t,c),this.yt(c),s(c)}}).then(null,t=>{this.captureException(t,{data:{__sentry__:!0},originalException:t}),o(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)})})}gt(t,e,n){t.then(t=>{null!==t?(this.yt(t),e(t)):n("`beforeSend` returned `null`, will not send event.")}).then(null,t=>{n(`beforeSend rejected with ${t}`)})}}class Jt{sendEvent(e){return rt.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:t.Status.Skipped})}close(t){return rt.resolve(!0)}}class Gt{constructor(t){this.it=t,this.it.dsn||et.warn("No DSN provided, backend will not do anything."),this.jt=this.Ot()}eventFromException(t,e){throw new y("Backend has to implement `eventFromException` method")}eventFromMessage(t,e,n){throw new y("Backend has to implement `eventFromMessage` method")}sendEvent(t){this.jt.sendEvent(t).then(null,t=>{et.error(`Error while sending event: ${t}`)})}sendSession(t){this.jt.sendSession?this.jt.sendSession(t).then(null,t=>{et.error(`Error while sending session: ${t}`)}):et.warn("sendSession not implemented for a transport used")}getTransport(){return this.jt}Ot(){return new Jt}}function zt(t,e){return{body:`${JSON.stringify({sent_at:new Date(1e3*K()).toISOString()})}\n${JSON.stringify({type:"session"})}\n${JSON.stringify(t)}`,url:e.getEnvelopeEndpointWithUrlEncodedAuth()}}function Vt(t,e){const n="transaction"===t.type,r={body:JSON.stringify(t),url:n?e.getEnvelopeEndpointWithUrlEncodedAuth():e.getStoreEndpointWithUrlEncodedAuth()};if(n){const e=`${JSON.stringify({event_id:t.event_id,sent_at:new Date(1e3*K()).toISOString()})}\n${JSON.stringify({type:t.type})}\n${r.body}`;r.body=e}return r}let Kt;class Qt{constructor(){this.name=Qt.id}setupOnce(){Kt=Function.prototype.toString,Function.prototype.toString=function(...t){const e=this.__sentry_original__||this;return Kt.apply(e,t)}}}Qt.id="FunctionToString";const Yt=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class Zt{constructor(t={}){this.it=t,this.name=Zt.id}setupOnce(){St(t=>{const e=Mt();if(!e)return t;const n=e.getIntegration(Zt);if(n){const r=e.getClient(),s=r?r.getOptions():{},i=n.wt(s);if(n.Et(t,i))return null}return t})}Et(t,e){return this.$t(t,e)?(et.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${H(t)}`),!0):this._t(t,e)?(et.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${H(t)}`),!0):this.xt(t,e)?(et.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${H(t)}.\nUrl: ${this.St(t)}`),!0):!this.kt(t,e)&&(et.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${H(t)}.\nUrl: ${this.St(t)}`),!0)}$t(t,e){if(!e.ignoreInternal)return!1;try{return t&&t.exception&&t.exception.values&&t.exception.values[0]&&"SentryError"===t.exception.values[0].type||!1}catch(t){return!1}}_t(t,e){return!(!e.ignoreErrors||!e.ignoreErrors.length)&&this.Tt(t).some(t=>e.ignoreErrors.some(e=>S(t,e)))}xt(t,e){if(!e.denyUrls||!e.denyUrls.length)return!1;const n=this.St(t);return!!n&&e.denyUrls.some(t=>S(n,t))}kt(t,e){if(!e.allowUrls||!e.allowUrls.length)return!0;const n=this.St(t);return!n||e.allowUrls.some(t=>S(n,t))}wt(t={}){return{allowUrls:[...this.it.whitelistUrls||[],...this.it.allowUrls||[],...t.whitelistUrls||[],...t.allowUrls||[]],denyUrls:[...this.it.blacklistUrls||[],...this.it.denyUrls||[],...t.blacklistUrls||[],...t.denyUrls||[]],ignoreErrors:[...this.it.ignoreErrors||[],...t.ignoreErrors||[],...Yt],ignoreInternal:void 0===this.it.ignoreInternal||this.it.ignoreInternal}}Tt(t){if(t.message)return[t.message];if(t.exception)try{const{type:e="",value:n=""}=t.exception.values&&t.exception.values[0]||{};return[`${n}`,`${e}: ${n}`]}catch(e){return et.error(`Cannot extract message for event ${H(t)}`),[]}return[]}St(t){try{if(t.stacktrace){const e=t.stacktrace.frames;return e&&e[e.length-1].filename||null}if(t.exception){const e=t.exception.values&&t.exception.values[0].stacktrace&&t.exception.values[0].stacktrace.frames;return e&&e[e.length-1].filename||null}return null}catch(e){return et.error(`Cannot extract url for event ${H(t)}`),null}}}Zt.id="InboundFilters";var te=Object.freeze({__proto__:null,FunctionToString:Qt,InboundFilters:Zt});const ee="?",ne=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,re=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,se=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ie=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,oe=/\((\S*)(?::(\d+))(?::(\d+))\)/,ce=/Minified React error #\d+;/i;function ue(t){let e=null,n=0;t&&("number"==typeof t.framesToPop?n=t.framesToPop:ce.test(t.message)&&(n=1));try{if(e=function(t){if(!t||!t.stacktrace)return null;const e=t.stacktrace,n=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,r=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\((.*)\))? in (.*):\s*$/i,s=e.split("\n"),i=[];let o;for(let t=0;t<s.length;t+=2){let e=null;(o=n.exec(s[t]))?e={url:o[2],func:o[3],args:[],line:+o[1],column:null}:(o=r.exec(s[t]))&&(e={url:o[6],func:o[3]||o[4],args:o[5]?o[5].split(","):[],line:+o[1],column:+o[2]}),e&&(!e.func&&e.line&&(e.func=ee),i.push(e))}if(!i.length)return null;return{message:he(t),name:t.name,stack:i}}(t))return ae(e,n)}catch(t){}try{if(e=function(t){if(!t||!t.stack)return null;const e=[],n=t.stack.split("\n");let r,s,i,o;for(let c=0;c<n.length;++c){if(i=ne.exec(n[c])){const t=i[2]&&0===i[2].indexOf("native");(r=i[2]&&0===i[2].indexOf("eval"))&&(s=oe.exec(i[2]))&&(i[2]=s[1],i[3]=s[2],i[4]=s[3]),o={url:i[2]&&0===i[2].indexOf("address at ")?i[2].substr("address at ".length):i[2],func:i[1]||ee,args:t?[i[2]]:[],line:i[3]?+i[3]:null,column:i[4]?+i[4]:null}}else if(i=se.exec(n[c]))o={url:i[2],func:i[1]||ee,args:[],line:+i[3],column:i[4]?+i[4]:null};else{if(!(i=re.exec(n[c])))continue;(r=i[3]&&i[3].indexOf(" > eval")>-1)&&(s=ie.exec(i[3]))?(i[1]=i[1]||"eval",i[3]=s[1],i[4]=s[2],i[5]=""):0!==c||i[5]||void 0===t.columnNumber||(e[0].column=t.columnNumber+1),o={url:i[3],func:i[1]||ee,args:i[2]?i[2].split(","):[],line:i[4]?+i[4]:null,column:i[5]?+i[5]:null}}!o.func&&o.line&&(o.func=ee),e.push(o)}if(!e.length)return null;return{message:he(t),name:t.name,stack:e}}(t))return ae(e,n)}catch(t){}return{message:he(t),name:t&&t.name,stack:[],failed:!0}}function ae(t,e){try{return Object.assign(Object.assign({},t),{stack:t.stack.slice(e)})}catch(e){return t}}function he(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}const le=50;function fe(t){const e=pe(t.stack),n={type:t.name,value:t.message};return e&&e.length&&(n.stacktrace={frames:e}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function de(t){return{exception:{values:[fe(t)]}}}function pe(t){if(!t||!t.length)return[];let e=t;const n=e[0].func||"",r=e[e.length-1].func||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(e=e.slice(1)),-1!==r.indexOf("sentryWrapped")&&(e=e.slice(0,-1)),e.slice(0,le).map(t=>({colno:null===t.column?void 0:t.column,filename:t.url||e[0].url,function:t.func||"?",in_app:!0,lineno:null===t.line?void 0:t.line})).reverse()}function be(e,n,r){const s=ve(n,r&&r.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return X(s,{handled:!0,type:"generic"}),s.level=t.Severity.Error,r&&r.event_id&&(s.event_id=r.event_id),rt.resolve(s)}function me(e,n,r=t.Severity.Info,s){const i=ye(n,s&&s.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return i.level=r,s&&s.event_id&&(i.event_id=s.event_id),rt.resolve(i)}function ve(t,e,n={}){let r;if(o(t)&&t.error){return r=de(ue(t=t.error))}if(c(t)||(s=t,"[object DOMException]"===Object.prototype.toString.call(s))){const s=t,i=s.name||(c(s)?"DOMError":"DOMException"),o=s.message?`${i}: ${s.message}`:i;return W(r=ye(o,e,n),o),r}var s;if(i(t))return r=de(ue(t));if(h(t)||l(t)){return X(r=function(t,e,n){const r={exception:{values:[{type:l(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:`Non-Error ${n?"promise rejection":"exception"} captured with keys: ${M(t)}`}]},extra:{__serialized__:R(t)}};if(e){const t=pe(ue(e).stack);r.stacktrace={frames:t}}return r}(t,e,n.rejection),{synthetic:!0}),r}return W(r=ye(t,e,n),`${t}`,void 0),X(r,{synthetic:!0}),r}function ye(t,e,n={}){const r={message:t};if(n.attachStacktrace&&e){const t=pe(ue(e).stack);r.stacktrace={frames:t}}return r}class ge{constructor(t){this.options=t,this.k=new st(30),this.Dt=new Ht(this.options.dsn),this.url=this.Dt.getStoreEndpointWithUrlEncodedAuth()}sendEvent(t){throw new y("Transport Class has to implement `sendEvent` method")}close(t){return this.k.drain(t)}}const je=F();class Oe extends ge{constructor(){super(...arguments),this.Rt=new Date(Date.now())}sendEvent(e){if(new Date(Date.now())<this.Rt)return Promise.reject({event:e,reason:`Transport locked till ${this.Rt} due to too many requests.`,status:429});const n=Vt(e,this.Dt),r={body:n.body,method:"POST",referrerPolicy:ct()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(r,this.options.fetchParameters),void 0!==this.options.headers&&(r.headers=this.options.headers),this.k.add(new rt((e,s)=>{je.fetch(n.url,r).then(n=>{const r=t.Status.fromHttpCode(n.status);if(r!==t.Status.Success){if(r===t.Status.RateLimit){const t=Date.now(),e=n.headers.get("Retry-After");this.Rt=new Date(t+Y(t,e)),et.warn(`Too many requests, backing off till: ${this.Rt}`)}s(n)}else e({status:r})}).catch(s)}))}sendSession(e){const n=zt(e,this.Dt),r={body:n.body,method:"POST",referrerPolicy:ct()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(r,this.options.fetchParameters),void 0!==this.options.headers&&(r.headers=this.options.headers),new rt((e,s)=>{je.fetch(n.url,r).then(n=>{const r=t.Status.fromHttpCode(n.status);r!==t.Status.Success?s(n):e({status:r})}).catch(s)})}}class we extends ge{constructor(){super(...arguments),this.Rt=new Date(Date.now())}sendEvent(e){if(new Date(Date.now())<this.Rt)return Promise.reject({event:e,reason:`Transport locked till ${this.Rt} due to too many requests.`,status:429});const n=Vt(e,this.Dt);return this.k.add(new rt((e,r)=>{const s=new XMLHttpRequest;s.onreadystatechange=(()=>{if(4!==s.readyState)return;const n=t.Status.fromHttpCode(s.status);if(n!==t.Status.Success){if(n===t.Status.RateLimit){const t=Date.now(),e=s.getResponseHeader("Retry-After");this.Rt=new Date(t+Y(t,e)),et.warn(`Too many requests, backing off till: ${this.Rt}`)}r(s)}else e({status:n})}),s.open("POST",n.url);for(const t in this.options.headers)this.options.headers.hasOwnProperty(t)&&s.setRequestHeader(t,this.options.headers[t]);s.send(n.body)}))}sendSession(e){const n=zt(e,this.Dt);return new rt((e,r)=>{const s=new XMLHttpRequest;s.onreadystatechange=(()=>{if(4!==s.readyState)return;const n=t.Status.fromHttpCode(s.status);n!==t.Status.Success?r(s):e({status:n})}),s.open("POST",n.url);for(const t in this.options.headers)this.options.headers.hasOwnProperty(t)&&s.setRequestHeader(t,this.options.headers[t]);s.send(n.body)})}}var Ee=Object.freeze({__proto__:null,BaseTransport:ge,FetchTransport:Oe,XHRTransport:we});class $e extends Gt{eventFromException(t,e){return be(this.it,t,e)}eventFromMessage(e,n=t.Severity.Info,r){return me(this.it,e,n,r)}Ot(){if(!this.it.dsn)return super.Ot();const t=Object.assign(Object.assign({},this.it.transportOptions),{dsn:this.it.dsn});return this.it.transport?new this.it.transport(t):it()?new Oe(t):new we(t)}}let _e=0;function xe(){return _e>0}function Se(t,e={},n){if("function"!=typeof t)return t;try{if(t.__sentry__)return t;if(t.__sentry_wrapped__)return t.__sentry_wrapped__}catch(e){return t}const sentryWrapped=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const s=r.map(t=>Se(t,e));return t.handleEvent?t.handleEvent.apply(this,s):t.apply(this,s)}catch(t){throw _e+=1,setTimeout(()=>{_e-=1}),qt(n=>{n.addEventProcessor(t=>{const n=Object.assign({},t);return e.mechanism&&(W(n,void 0,void 0),X(n,e.mechanism)),n.extra=Object.assign(Object.assign({},n.extra),{arguments:r}),n}),captureException(t)}),t}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(sentryWrapped[e]=t[e])}catch(t){}t.prototype=t.prototype||{},sentryWrapped.prototype=t.prototype,Object.defineProperty(t,"__sentry_wrapped__",{enumerable:!1,value:sentryWrapped}),Object.defineProperties(sentryWrapped,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:t}});try{Object.getOwnPropertyDescriptor(sentryWrapped,"name").configurable&&Object.defineProperty(sentryWrapped,"name",{get:()=>t.name})}catch(t){}return sentryWrapped}function ke(t={}){if(!t.eventId)return void et.error("Missing eventId option in showReportDialog call");if(!t.dsn)return void et.error("Missing dsn option in showReportDialog call");const e=document.createElement("script");e.async=!0,e.src=new Ht(t.dsn).getReportDialogEndpoint(t),t.onLoad&&(e.onload=t.onLoad),(document.head||document.body).appendChild(e)}class Te{constructor(t){this.name=Te.id,this.It=!1,this.Nt=!1,this.it=Object.assign({onerror:!0,onunhandledrejection:!0},t)}setupOnce(){Error.stackTraceLimit=50,this.it.onerror&&(et.log("Global Handler attached: onerror"),this.Ct()),this.it.onunhandledrejection&&(et.log("Global Handler attached: onunhandledrejection"),this.Mt())}Ct(){this.It||(ft({callback:t=>{const e=t.error,n=Mt(),r=n.getIntegration(Te),s=e&&!0===e.__sentry_own_request__;if(!r||xe()||s)return;const i=n.getClient(),o=a(e)?this.At(t.msg,t.url,t.line,t.column):this.Ut(ve(e,void 0,{attachStacktrace:i&&i.getOptions().attachStacktrace,rejection:!1}),t.url,t.line,t.column);X(o,{handled:!1,type:"onerror"}),n.captureEvent(o,{originalException:e})},type:"error"}),this.It=!0)}Mt(){this.Nt||(ft({callback:e=>{let n=e;try{"reason"in e?n=e.reason:"detail"in e&&"reason"in e.detail&&(n=e.detail.reason)}catch(t){}const r=Mt(),s=r.getIntegration(Te),i=n&&!0===n.__sentry_own_request__;if(!s||xe()||i)return!0;const o=r.getClient(),c=a(n)?this.Lt(n):ve(n,void 0,{attachStacktrace:o&&o.getOptions().attachStacktrace,rejection:!0});c.level=t.Severity.Error,X(c,{handled:!1,type:"onunhandledrejection"}),r.captureEvent(c,{originalException:n})},type:"unhandledrejection"}),this.Nt=!0)}At(t,e,n,r){const s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let i,c=o(t)?t.message:t;if(u(c)){const t=c.match(s);t&&(i=t[1],c=t[2])}const a={exception:{values:[{type:i||"Error",value:c}]}};return this.Ut(a,e,n,r)}Lt(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${t}`}]}}}Ut(t,e,n,r){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].stacktrace=t.exception.values[0].stacktrace||{},t.exception.values[0].stacktrace.frames=t.exception.values[0].stacktrace.frames||[];const s=isNaN(parseInt(r,10))?void 0:r,i=isNaN(parseInt(n,10))?void 0:n,o=u(e)&&e.length>0?e:function(){try{return document.location.href}catch(t){return""}}();return 0===t.exception.values[0].stacktrace.frames.length&&t.exception.values[0].stacktrace.frames.push({colno:s,filename:o,function:"?",in_app:!0,lineno:i}),t}}Te.id="GlobalHandlers";const De=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class Re{constructor(t){this.name=Re.id,this.it=Object.assign({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t)}setupOnce(){const t=F();if(this.it.setTimeout&&k(t,"setTimeout",this.Ft.bind(this)),this.it.setInterval&&k(t,"setInterval",this.Ft.bind(this)),this.it.requestAnimationFrame&&k(t,"requestAnimationFrame",this.qt.bind(this)),this.it.XMLHttpRequest&&"XMLHttpRequest"in t&&k(XMLHttpRequest.prototype,"send",this.Bt.bind(this)),this.it.eventTarget){(Array.isArray(this.it.eventTarget)?this.it.eventTarget:De).forEach(this.Ht.bind(this))}}Ft(t){return function(...e){const n=e[0];return e[0]=Se(n,{mechanism:{data:{function:$(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}qt(t){return function(e){return t.call(this,Se(e,{mechanism:{data:{function:"requestAnimationFrame",handler:$(t)},handled:!0,type:"instrument"}}))}}Ht(t){const e=F(),n=e[t]&&e[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(k(n,"addEventListener",function(e){return function(n,r,s){try{"function"==typeof r.handleEvent&&(r.handleEvent=Se(r.handleEvent.bind(r),{mechanism:{data:{function:"handleEvent",handler:$(r),target:t},handled:!0,type:"instrument"}}))}catch(t){}return e.call(this,n,Se(r,{mechanism:{data:{function:"addEventListener",handler:$(r),target:t},handled:!0,type:"instrument"}}),s)}}),k(n,"removeEventListener",function(t){return function(e,n,r){try{t.call(this,e,n.__sentry_wrapped__,r)}catch(t){}return t.call(this,e,n,r)}}))}Bt(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(t=>{t in n&&"function"==typeof n[t]&&k(n,t,function(e){const n={mechanism:{data:{function:t,handler:$(e)},handled:!0,type:"instrument"}};return e.__sentry_original__&&(n.mechanism.data.handler=$(e.__sentry_original__)),Se(e,n)})}),t.apply(this,e)}}}Re.id="TryCatch";class Ie{constructor(t){this.name=Ie.id,this.it=Object.assign({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}addSentryBreadcrumb(t){this.it.sentry&&Mt().addBreadcrumb({category:`sentry.${"transaction"===t.type?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:H(t)},{event:t})}setupOnce(){this.it.console&&ft({callback:(...t)=>{this.Pt(...t)},type:"console"}),this.it.dom&&ft({callback:(...t)=>{this.Wt(...t)},type:"dom"}),this.it.xhr&&ft({callback:(...t)=>{this.Xt(...t)},type:"xhr"}),this.it.fetch&&ft({callback:(...t)=>{this.Jt(...t)},type:"fetch"}),this.it.history&&ft({callback:(...t)=>{this.Gt(...t)},type:"history"})}Pt(e){const n={category:"console",data:{arguments:e.args,logger:"console"},level:t.Severity.fromString(e.level),message:x(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;n.message=`Assertion failed: ${x(e.args.slice(1)," ")||"console.assert"}`,n.data.arguments=e.args.slice(1)}Mt().addBreadcrumb(n,{input:e.args,level:e.level})}Wt(t){let e;try{e=t.event.target?b(t.event.target):b(t.event)}catch(t){e="<unknown>"}0!==e.length&&Mt().addBreadcrumb({category:`ui.${t.name}`,message:e},{event:t.event,name:t.name})}Xt(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;const{method:e,url:n,status_code:r,body:s}=t.xhr.__sentry_xhr__||{};Mt().addBreadcrumb({category:"xhr",data:{method:e,url:n,status_code:r},type:"http"},{xhr:t.xhr,input:s})}else;}Jt(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?Mt().addBreadcrumb({category:"fetch",data:e.fetchData,level:t.Severity.Error,type:"http"},{data:e.error,input:e.args}):Mt().addBreadcrumb({category:"fetch",data:Object.assign(Object.assign({},e.fetchData),{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response})))}Gt(t){const e=F();let n=t.from,r=t.to;const s=B(e.location.href);let i=B(n);const o=B(r);i.path||(i=s),s.protocol===o.protocol&&s.host===o.host&&(r=o.relative),s.protocol===i.protocol&&s.host===i.host&&(n=i.relative),Mt().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}}Ie.id="Breadcrumbs";const Ne="cause",Ce=5;class Me{constructor(t={}){this.name=Me.id,this.zt=t.key||Ne,this.S=t.limit||Ce}setupOnce(){St((t,e)=>{const n=Mt().getIntegration(Me);return n?n.Vt(t,e):t})}Vt(t,e){if(!(t.exception&&t.exception.values&&e&&p(e.originalException,Error)))return t;const n=this.Kt(e.originalException,this.zt);return t.exception.values=[...n,...t.exception.values],t}Kt(t,e,n=[]){if(!p(t[e],Error)||n.length+1>=this.S)return n;const r=fe(ue(t[e]));return this.Kt(t[e],e,[r,...n])}}Me.id="LinkedErrors";const Ae=F();class Ue{constructor(){this.name=Ue.id}setupOnce(){St(t=>{var e,n,r;if(Mt().getIntegration(Ue)){if(!Ae.navigator&&!Ae.location&&!Ae.document)return t;const s=(null===(e=t.request)||void 0===e?void 0:e.url)||(null===(n=Ae.location)||void 0===n?void 0:n.href),{referrer:i}=Ae.document||{},{userAgent:o}=Ae.navigator||{},c=Object.assign(Object.assign(Object.assign({},null===(r=t.request)||void 0===r?void 0:r.headers),i&&{Referer:i}),o&&{"User-Agent":o}),u=Object.assign(Object.assign({},s&&{url:s}),{headers:c});return Object.assign(Object.assign({},t),{request:u})}return t})}}Ue.id="UserAgent";var Le=Object.freeze({__proto__:null,GlobalHandlers:Te,TryCatch:Re,Breadcrumbs:Ie,LinkedErrors:Me,UserAgent:Ue});const Fe="sentry.javascript.browser",qe="5.25.0-beta.2";class Be extends Xt{constructor(t={}){super($e,t)}showReportDialog(t={}){F().document&&(this.lt()?ke(Object.assign(Object.assign({},t),{dsn:t.dsn||this.getDsn()})):et.error("Trying to call showReportDialog with Sentry Client disabled"))}dt(t,e,n){return t.platform=t.platform||"javascript",t.sdk=Object.assign(Object.assign({},t.sdk),{name:Fe,packages:[...t.sdk&&t.sdk.packages||[],{name:"npm:@sentry/browser",version:qe}],version:qe}),super.dt(t,e,n)}yt(t){const e=this.getIntegration(Ie);e&&e.addSentryBreadcrumb(t),super.yt(t)}}const He=[new Zt,new Qt,new Re,new Ie,new Te,new Me,new Ue];let Pe={};const We=F();We.Sentry&&We.Sentry.Integrations&&(Pe=We.Sentry.Integrations);const Xe=Object.assign(Object.assign(Object.assign({},Pe),te),Le);return t.BrowserClient=Be,t.Hub=It,t.Integrations=Xe,t.SDK_NAME=Fe,t.SDK_VERSION=qe,t.Scope=_t,t.Transports=Ee,t.addBreadcrumb=function(t){Ft("addBreadcrumb",t)},t.addGlobalEventProcessor=St,t.captureEvent=function(t){return Ft("captureEvent",t)},t.captureException=captureException,t.captureMessage=function(t,e){let n;try{throw new Error(t)}catch(t){n=t}const r="string"!=typeof e?{captureContext:e}:void 0;return Ft("captureMessage",t,"string"==typeof e?e:void 0,Object.assign({originalException:t,syntheticException:n},r))},t.close=function(t){const e=Mt().getClient();return e?e.close(t):rt.reject(!1)},t.configureScope=function(t){Ft("configureScope",t)},t.defaultIntegrations=He,t.eventFromException=be,t.eventFromMessage=me,t.flush=function(t){const e=Mt().getClient();return e?e.flush(t):rt.reject(!1)},t.forceLoad=function(){},t.getCurrentHub=Mt,t.getHubFromCarrier=Ut,t.init=function(t={}){if(void 0===t.defaultIntegrations&&(t.defaultIntegrations=He),void 0===t.release){const e=F();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}!function(t,e){!0===e.debug&&et.enable();const n=Mt(),r=new t(e);n.bindClient(r)}(Be,t)},t.injectReportDialog=ke,t.lastEventId=function(){return Mt().lastEventId()},t.makeMain=Ct,t.onLoad=function(t){t()},t.setContext=function(t,e){Ft("setContext",t,e)},t.setExtra=function(t,e){Ft("setExtra",t,e)},t.setExtras=function(t){Ft("setExtras",t)},t.setTag=function(t,e){Ft("setTag",t,e)},t.setTags=function(t){Ft("setTags",t)},t.setUser=function(t){Ft("setUser",t)},t.showReportDialog=function(t={}){t.eventId||(t.eventId=Mt().lastEventId());const e=Mt().getClient();e&&e.showReportDialog(t)},t.startTransaction=function(t,e){return Ft("startTransaction",Object.assign({},t),e)},t.withScope=qt,t.wrap=function(t){return Se(t)()},t}({});
|
|
1
|
+
/*! @sentry/browser 5.25.0 (bca2c59) | https://github.com/getsentry/sentry-javascript */
|
|
2
|
+
var Sentry=function(t){var e,n,r;function i(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return d(t,Error)}}function s(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)}function o(t){return"[object DOMError]"===Object.prototype.toString.call(t)}function c(t){return"[object String]"===Object.prototype.toString.call(t)}function u(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function a(t){return"[object Object]"===Object.prototype.toString.call(t)}function h(t){return"undefined"!=typeof Event&&d(t,Event)}function l(t){return"undefined"!=typeof Element&&d(t,Element)}function f(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function d(t,e){try{return t instanceof e}catch(t){return!1}}function p(t){try{let e=t;const n=5,r=80,i=[];let s=0,o=0;const c=" > ",u=c.length;let a;for(;e&&s++<n&&!("html"===(a=b(e))||s>1&&o+i.length*u+a.length>=r);)i.push(a),o+=a.length,e=e.parentNode;return i.reverse().join(c)}catch(t){return"<unknown>"}}function b(t){const e=t,n=[];let r,i,s,o,u;if(!e||!e.tagName)return"";if(n.push(e.tagName.toLowerCase()),e.id&&n.push(`#${e.id}`),(r=e.className)&&c(r))for(i=r.split(/\s+/),u=0;u<i.length;u++)n.push(`.${i[u]}`);const a=["type","name","title","alt"];for(u=0;u<a.length;u++)s=a[u],(o=e.getAttribute(s))&&n.push(`[${s}="${o}"]`);return n.join("")}!function(t){t[t.None=0]="None",t[t.Error=1]="Error",t[t.Debug=2]="Debug",t[t.Verbose=3]="Verbose"}(e||(e={})),(n=t.Severity||(t.Severity={})).Fatal="fatal",n.Error="error",n.Warning="warning",n.Log="log",n.Info="info",n.Debug="debug",n.Critical="critical",function(t){t.fromString=function(e){switch(e){case"debug":return t.Debug;case"info":return t.Info;case"warn":case"warning":return t.Warning;case"error":return t.Error;case"fatal":return t.Fatal;case"critical":return t.Critical;case"log":default:return t.Log}}}(t.Severity||(t.Severity={})),(r=t.Status||(t.Status={})).Unknown="unknown",r.Skipped="skipped",r.Success="success",r.RateLimit="rate_limit",r.Invalid="invalid",r.Failed="failed",function(t){t.fromHttpCode=function(e){return e>=200&&e<300?t.Success:429===e?t.RateLimit:e>=400&&e<500?t.Invalid:e>=500?t.Failed:t.Unknown}}(t.Status||(t.Status={}));const v=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){return t.__proto__=e,t}:function(t,e){for(const n in e)t.hasOwnProperty(n)||(t[n]=e[n]);return t});class y extends Error{constructor(t){super(t),this.message=t,this.name=new.target.prototype.constructor.name,v(this,new.target.prototype)}}const m=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,g="Invalid Dsn";class j{constructor(t){"string"==typeof t?this.t(t):this.i(t),this.s()}toString(t=!1){const{host:e,path:n,pass:r,port:i,projectId:s,protocol:o,user:c}=this;return`${o}://${c}${t&&r?`:${r}`:""}`+`@${e}${i?`:${i}`:""}/${n?`${n}/`:n}${s}`}t(t){const e=m.exec(t);if(!e)throw new y(g);const[n,r,i="",s,o="",c]=e.slice(1);let u="",a=c;const h=a.split("/");if(h.length>1&&(u=h.slice(0,-1).join("/"),a=h.pop()),a){const t=a.match(/^\d+/);t&&(a=t[0])}this.i({host:s,pass:i,path:u,projectId:a,port:o,protocol:n,user:r})}i(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}s(){if(["protocol","user","host","projectId"].forEach(t=>{if(!this[t])throw new y(`${g}: ${t} missing`)}),!this.projectId.match(/^\d+$/))throw new y(`${g}: Invalid projectId ${this.projectId}`);if("http"!==this.protocol&&"https"!==this.protocol)throw new y(`${g}: Invalid protocol ${this.protocol}`);if(this.port&&isNaN(parseInt(this.port,10)))throw new y(`${g}: Invalid port ${this.port}`)}}class w{constructor(){this.o="function"==typeof WeakSet,this.u=this.o?new WeakSet:[]}memoize(t){if(this.o)return!!this.u.has(t)||(this.u.add(t),!1);for(let e=0;e<this.u.length;e++){if(this.u[e]===t)return!0}return this.u.push(t),!1}unmemoize(t){if(this.o)this.u.delete(t);else for(let e=0;e<this.u.length;e++)if(this.u[e]===t){this.u.splice(e,1);break}}}const E="<anonymous>";function O(t){try{return t&&"function"==typeof t&&t.name||E}catch(t){return E}}function $(t,e=0){return"string"!=typeof t||0===e?t:t.length<=e?t:`${t.substr(0,e)}...`}function _(t,e){if(!Array.isArray(t))return"";const n=[];for(let e=0;e<t.length;e++){const r=t[e];try{n.push(String(r))}catch(t){n.push("[value cannot be serialized]")}}return n.join(e)}function x(t,e){return!!c(t)&&(n=e,"[object RegExp]"===Object.prototype.toString.call(n)?e.test(t):"string"==typeof e&&-1!==t.indexOf(e));var n}function S(t,e,n){if(!(e in t))return;const r=t[e],i=n(r);if("function"==typeof i)try{i.prototype=i.prototype||{},Object.defineProperties(i,{__sentry_original__:{enumerable:!1,value:r}})}catch(t){}t[e]=i}function k(t){if(i(t)){const e=t,n={message:e.message,name:e.name,stack:e.stack};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n}if(h(t)){const e=t,n={};n.type=e.type;try{n.target=l(e.target)?p(e.target):Object.prototype.toString.call(e.target)}catch(t){n.target="<unknown>"}try{n.currentTarget=l(e.currentTarget)?p(e.currentTarget):Object.prototype.toString.call(e.currentTarget)}catch(t){n.currentTarget="<unknown>"}"undefined"!=typeof CustomEvent&&d(t,CustomEvent)&&(n.detail=e.detail);for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e);return n}return t}function T(t){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}function D(t,e=3,n=102400){const r=C(t,e);return T(r)>n?D(t,e-1,n):r}function R(t,e){return"domain"===e&&t&&"object"==typeof t&&t.h?"[Domain]":"domainEmitter"===e?"[DomainEmitter]":"undefined"!=typeof global&&t===global?"[Global]":"undefined"!=typeof window&&t===window?"[Window]":"undefined"!=typeof document&&t===document?"[Document]":a(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n?"[SyntheticEvent]":"number"==typeof t&&t!=t?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?`[Function: ${O(t)}]`:t;var n}function I(t,e,n=1/0,r=new w){if(0===n)return function(t){const e=Object.prototype.toString.call(t);if("string"==typeof t)return t;if("[object Object]"===e)return"[Object]";if("[object Array]"===e)return"[Array]";const n=R(t);return u(n)?n:e}(e);if(null!=e&&"function"==typeof e.toJSON)return e.toJSON();const i=R(e,t);if(u(i))return i;const s=k(e),o=Array.isArray(e)?[]:{};if(r.memoize(e))return"[Circular ~]";for(const t in s)Object.prototype.hasOwnProperty.call(s,t)&&(o[t]=I(t,s[t],n-1,r));return r.unmemoize(e),o}function C(t,e){try{return JSON.parse(JSON.stringify(t,(t,n)=>I(t,n,e)))}catch(t){return"**non-serializable**"}}function M(t,e=40){const n=Object.keys(k(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return $(n[0],e);for(let t=n.length;t>0;t--){const r=n.slice(0,t).join(", ");if(!(r.length>e))return t===n.length?r:$(r,e)}return""}function N(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}const A={};function U(){return N()?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:A}function L(){const t=U(),e=t.crypto||t.msCrypto;if(void 0!==e&&e.getRandomValues){const t=new Uint16Array(8);e.getRandomValues(t),t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const n=t=>{let e=t.toString(16);for(;e.length<4;)e=`0${e}`;return e};return n(t[0])+n(t[1])+n(t[2])+n(t[3])+n(t[4])+n(t[5])+n(t[6])+n(t[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,t=>{const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}function F(t){if(!t)return{};const e=t.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],relative:e[5]+n+r}}function q(t){if(t.message)return t.message;if(t.exception&&t.exception.values&&t.exception.values[0]){const e=t.exception.values[0];return e.type&&e.value?`${e.type}: ${e.value}`:e.type||e.value||t.event_id||"<unknown>"}return t.event_id||"<unknown>"}function B(t){const e=U();if(!("console"in e))return t();const n=e.console,r={};["debug","info","warn","error","log","assert"].forEach(t=>{t in e.console&&n[t].__sentry_original__&&(r[t]=n[t],n[t]=n[t].__sentry_original__)});const i=t();return Object.keys(r).forEach(t=>{n[t]=r[t]}),i}function H(t,e,n){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||e||"",t.exception.values[0].type=t.exception.values[0].type||n||"Error"}function P(t,e={}){try{t.exception.values[0].mechanism=t.exception.values[0].mechanism||{},Object.keys(e).forEach(n=>{t.exception.values[0].mechanism[n]=e[n]})}catch(t){}}const W=6e4;function X(t,e){if(!e)return W;const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?W:r-t}const G=U(),z="Sentry Logger ";G.__SENTRY__=G.__SENTRY__||{};const J=G.__SENTRY__.logger||(G.__SENTRY__.logger=new class{constructor(){this.l=!1}disable(){this.l=!1}enable(){this.l=!0}log(...t){this.l&&B(()=>{G.console.log(`${z}[Log]: ${t.join(" ")}`)})}warn(...t){this.l&&B(()=>{G.console.warn(`${z}[Warn]: ${t.join(" ")}`)})}error(...t){this.l&&B(()=>{G.console.error(`${z}[Error]: ${t.join(" ")}`)})}});function V(){if(!("fetch"in U()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function K(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Q(){if(!V())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}const Y=U(),Z={},tt={};function et(t){if(!tt[t])switch(tt[t]=!0,t){case"console":!function(){if(!("console"in Y))return;["debug","info","warn","error","log","assert"].forEach(function(t){t in Y.console&&S(Y.console,t,function(e){return function(...n){rt("console",{args:n,level:t}),e&&Function.prototype.apply.call(e,Y.console,n)}})})}();break;case"dom":!function(){if(!("document"in Y))return;Y.document.addEventListener("click",lt("click",rt.bind(null,"dom")),!1),Y.document.addEventListener("keypress",ft(rt.bind(null,"dom")),!1),["EventTarget","Node"].forEach(t=>{const e=Y[t]&&Y[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(S(e,"addEventListener",function(t){return function(e,n,r){return n&&n.handleEvent?("click"===e&&S(n,"handleEvent",function(t){return function(e){return lt("click",rt.bind(null,"dom"))(e),t.call(this,e)}}),"keypress"===e&&S(n,"handleEvent",function(t){return function(e){return ft(rt.bind(null,"dom"))(e),t.call(this,e)}})):("click"===e&<("click",rt.bind(null,"dom"),!0)(this),"keypress"===e&&ft(rt.bind(null,"dom"))(this)),t.call(this,e,n,r)}}),S(e,"removeEventListener",function(t){return function(e,n,r){try{t.call(this,e,n.__sentry_wrapped__,r)}catch(t){}return t.call(this,e,n,r)}}))})}();break;case"xhr":!function(){if(!("XMLHttpRequest"in Y))return;const t=[],e=[],n=XMLHttpRequest.prototype;S(n,"open",function(n){return function(...r){const i=this,s=r[1];i.__sentry_xhr__={method:c(r[0])?r[0].toUpperCase():r[0],url:r[1]},c(s)&&"POST"===i.__sentry_xhr__.method&&s.match(/sentry_key/)&&(i.__sentry_own_request__=!0);const o=function(){if(4===i.readyState){try{i.__sentry_xhr__&&(i.__sentry_xhr__.status_code=i.status)}catch(t){}try{const n=t.indexOf(i);if(-1!==n){t.splice(n);const r=e.splice(n)[0];i.__sentry_xhr__&&void 0!==r[0]&&(i.__sentry_xhr__.body=r[0])}}catch(t){}rt("xhr",{args:r,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:i})}};return"onreadystatechange"in i&&"function"==typeof i.onreadystatechange?S(i,"onreadystatechange",function(t){return function(...e){return o(),t.apply(i,e)}}):i.addEventListener("readystatechange",o),n.apply(i,r)}}),S(n,"send",function(n){return function(...r){return t.push(this),e.push(r),rt("xhr",{args:r,startTimestamp:Date.now(),xhr:this}),n.apply(this,r)}})}();break;case"fetch":!function(){if(!function(){if(!V())return!1;const t=U();if(K(t.fetch))return!0;let e=!1;const n=t.document;if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t),t.contentWindow&&t.contentWindow.fetch&&(e=K(t.contentWindow.fetch)),n.head.removeChild(t)}catch(t){J.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return e}())return;S(Y,"fetch",function(t){return function(...e){const n={args:e,fetchData:{method:it(e),url:st(e)},startTimestamp:Date.now()};return rt("fetch",Object.assign({},n)),t.apply(Y,e).then(t=>(rt("fetch",Object.assign(Object.assign({},n),{endTimestamp:Date.now(),response:t})),t),t=>{throw rt("fetch",Object.assign(Object.assign({},n),{endTimestamp:Date.now(),error:t})),t})}})}();break;case"history":!function(){if(!function(){const t=U(),e=t.chrome,n=e&&e.app&&e.app.runtime,r="history"in t&&!!t.history.pushState&&!!t.history.replaceState;return!n&&r}())return;const t=Y.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=ot,e=String(n);ot=e,rt("history",{from:t,to:e})}return t.apply(this,e)}}Y.onpopstate=function(...e){const n=Y.location.href,r=ot;if(ot=n,rt("history",{from:r,to:n}),t)return t.apply(this,e)},S(Y.history,"pushState",e),S(Y.history,"replaceState",e)}();break;case"error":dt=Y.onerror,Y.onerror=function(t,e,n,r,i){return rt("error",{column:r,error:i,line:n,msg:t,url:e}),!!dt&&dt.apply(this,arguments)};break;case"unhandledrejection":pt=Y.onunhandledrejection,Y.onunhandledrejection=function(t){return rt("unhandledrejection",t),!pt||pt.apply(this,arguments)};break;default:J.warn("unknown instrumentation type:",t)}}function nt(t){t&&"string"==typeof t.type&&"function"==typeof t.callback&&(Z[t.type]=Z[t.type]||[],Z[t.type].push(t.callback),et(t.type))}function rt(t,e){if(t&&Z[t])for(const n of Z[t]||[])try{n(e)}catch(e){J.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${O(n)}\nError: ${e}`)}}function it(t=[]){return"Request"in Y&&d(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function st(t=[]){return"string"==typeof t[0]?t[0]:"Request"in Y&&d(t[0],Request)?t[0].url:String(t[0])}let ot;const ct=1e3;let ut,at,ht=0;function lt(t,e,n=!1){return r=>{ut=void 0,r&&at!==r&&(at=r,ht&&clearTimeout(ht),n?ht=setTimeout(()=>{e({event:r,name:t})}):e({event:r,name:t}))}}function ft(t){return e=>{let n;try{n=e.target}catch(t){return}const r=n&&n.tagName;r&&("INPUT"===r||"TEXTAREA"===r||n.isContentEditable)&&(ut||lt("input",t)(e),clearTimeout(ut),ut=setTimeout(()=>{ut=void 0},ct))}}let dt=null;let pt=null;var bt;!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(bt||(bt={}));class vt{constructor(t){this.p=bt.PENDING,this.v=[],this.m=(t=>{this.g(bt.RESOLVED,t)}),this.j=(t=>{this.g(bt.REJECTED,t)}),this.g=((t,e)=>{this.p===bt.PENDING&&(f(e)?e.then(this.m,this.j):(this.p=t,this.O=e,this.$()))}),this._=(t=>{this.v=this.v.concat(t),this.$()}),this.$=(()=>{if(this.p===bt.PENDING)return;const t=this.v.slice();this.v=[],t.forEach(t=>{t.done||(this.p===bt.RESOLVED&&t.onfulfilled&&t.onfulfilled(this.O),this.p===bt.REJECTED&&t.onrejected&&t.onrejected(this.O),t.done=!0)})});try{t(this.m,this.j)}catch(t){this.j(t)}}static resolve(t){return new vt(e=>{e(t)})}static reject(t){return new vt((e,n)=>{n(t)})}static all(t){return new vt((e,n)=>{if(!Array.isArray(t))return void n(new TypeError("Promise.all requires an array as input."));if(0===t.length)return void e([]);let r=t.length;const i=[];t.forEach((t,s)=>{vt.resolve(t).then(t=>{i[s]=t,0===(r-=1)&&e(i)}).then(null,n)})})}then(t,e){return new vt((n,r)=>{this._({done:!1,onfulfilled:e=>{if(t)try{return void n(t(e))}catch(t){return void r(t)}else n(e)},onrejected:t=>{if(e)try{return void n(e(t))}catch(t){return void r(t)}else r(t)}})})}catch(t){return this.then(t=>t,t)}finally(t){return new vt((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{i?n(r):e(r)})})}toString(){return"[object SyncPromise]"}}class yt{constructor(t){this.S=t,this.k=[]}isReady(){return void 0===this.S||this.length()<this.S}add(t){return this.isReady()?(-1===this.k.indexOf(t)&&this.k.push(t),t.then(()=>this.remove(t)).then(null,()=>this.remove(t).then(null,()=>{})),t):vt.reject(new y("Not adding Promise due to buffer limit reached."))}remove(t){return this.k.splice(this.k.indexOf(t),1)[0]}length(){return this.k.length}drain(t){return new vt(e=>{const n=setTimeout(()=>{t&&t>0&&e(!1)},t);vt.all(this.k).then(()=>{clearTimeout(n),e(!0)}).then(null,()=>{e(!0)})})}}const mt={nowSeconds:()=>Date.now()/1e3};const gt=N()?function(){try{return(t=module,e="perf_hooks",t.require(e)).performance}catch(t){return}var t,e}():function(){const{performance:t}=U();if(t&&t.now)return{now:()=>t.now(),timeOrigin:Date.now()-t.now()}}(),jt=void 0===gt?mt:{nowSeconds:()=>(gt.timeOrigin+gt.now())/1e3},wt=mt.nowSeconds.bind(mt);jt.nowSeconds.bind(jt),(()=>{const{performance:t}=U();if(t)t.timeOrigin?t.timeOrigin:t.timing&&t.timing.navigationStart||Date.now()})();class Et{constructor(){this.T=!1,this.D=[],this.R=[],this.I=[],this.C={},this.M={},this.N={},this.A={}}static clone(t){const e=new Et;return t&&(e.I=[...t.I],e.M=Object.assign({},t.M),e.N=Object.assign({},t.N),e.A=Object.assign({},t.A),e.C=t.C,e.U=t.U,e.L=t.L,e.F=t.F,e.q=t.q,e.R=[...t.R]),e}addScopeListener(t){this.D.push(t)}addEventProcessor(t){return this.R.push(t),this}setUser(t){return this.C=t||{},this.B(),this}setTags(t){return this.M=Object.assign(Object.assign({},this.M),t),this.B(),this}setTag(t,e){return this.M=Object.assign(Object.assign({},this.M),{[t]:e}),this.B(),this}setExtras(t){return this.N=Object.assign(Object.assign({},this.N),t),this.B(),this}setExtra(t,e){return this.N=Object.assign(Object.assign({},this.N),{[t]:e}),this.B(),this}setFingerprint(t){return this.q=t,this.B(),this}setLevel(t){return this.U=t,this.B(),this}setTransactionName(t){return this.F=t,this.B(),this}setTransaction(t){return this.setTransactionName(t)}setContext(t,e){return null===e?delete this.A[t]:this.A=Object.assign(Object.assign({},this.A),{[t]:e}),this.B(),this}setSpan(t){return this.L=t,this.B(),this}getSpan(){return this.L}getTransaction(){var t,e,n,r;const i=this.getSpan();return(null===(t=i)||void 0===t?void 0:t.transaction)?null===(e=i)||void 0===e?void 0:e.transaction:(null===(r=null===(n=i)||void 0===n?void 0:n.spanRecorder)||void 0===r?void 0:r.spans[0])?i.spanRecorder.spans[0]:void 0}update(t){if(!t)return this;if("function"==typeof t){const e=t(this);return e instanceof Et?e:this}return t instanceof Et?(this.M=Object.assign(Object.assign({},this.M),t.M),this.N=Object.assign(Object.assign({},this.N),t.N),this.A=Object.assign(Object.assign({},this.A),t.A),t.C&&(this.C=t.C),t.U&&(this.U=t.U),t.q&&(this.q=t.q)):a(t)&&(t=t,this.M=Object.assign(Object.assign({},this.M),t.tags),this.N=Object.assign(Object.assign({},this.N),t.extra),this.A=Object.assign(Object.assign({},this.A),t.contexts),t.user&&(this.C=t.user),t.level&&(this.U=t.level),t.fingerprint&&(this.q=t.fingerprint)),this}clear(){return this.I=[],this.M={},this.N={},this.C={},this.A={},this.U=void 0,this.F=void 0,this.q=void 0,this.L=void 0,this.B(),this}addBreadcrumb(t,e){const n=Object.assign({timestamp:wt()},t);return this.I=void 0!==e&&e>=0?[...this.I,n].slice(-e):[...this.I,n],this.B(),this}clearBreadcrumbs(){return this.I=[],this.B(),this}applyToEvent(t,e){return this.N&&Object.keys(this.N).length&&(t.extra=Object.assign(Object.assign({},this.N),t.extra)),this.M&&Object.keys(this.M).length&&(t.tags=Object.assign(Object.assign({},this.M),t.tags)),this.C&&Object.keys(this.C).length&&(t.user=Object.assign(Object.assign({},this.C),t.user)),this.A&&Object.keys(this.A).length&&(t.contexts=Object.assign(Object.assign({},this.A),t.contexts)),this.U&&(t.level=this.U),this.F&&(t.transaction=this.F),this.L&&(t.contexts=Object.assign({trace:this.L.getTraceContext()},t.contexts)),this.H(t),t.breadcrumbs=[...t.breadcrumbs||[],...this.I],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,this.P([...Ot(),...this.R],t,e)}P(t,e,n,r=0){return new vt((i,s)=>{const o=t[r];if(null===e||"function"!=typeof o)i(e);else{const c=o(Object.assign({},e),n);f(c)?c.then(e=>this.P(t,e,n,r+1).then(i)).then(null,s):this.P(t,c,n,r+1).then(i).then(null,s)}})}B(){this.T||(this.T=!0,setTimeout(()=>{this.D.forEach(t=>{t(this)}),this.T=!1}))}H(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this.q&&(t.fingerprint=t.fingerprint.concat(this.q)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}}function Ot(){const t=U();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function $t(t){Ot().push(t)}const _t=3,xt=100,St=100;class kt{constructor(t,e=new Et,n=_t){this.W=n,this.X=[],this.X.push({client:t,scope:e}),this.bindClient(t)}isOlderThan(t){return this.W<t}bindClient(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getStack(),e=t.length>0?t[t.length-1].scope:void 0,n=Et.clone(e);return this.getStack().push({client:this.getClient(),scope:n}),n}popScope(){return void 0!==this.getStack().pop()}withScope(t){const e=this.pushScope();try{t(e)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this.X}getStackTop(){return this.X[this.X.length-1]}captureException(t,e){const n=this.G=L();let r=e;if(!e){let e;try{throw new Error("Sentry syntheticException")}catch(t){e=t}r={originalException:t,syntheticException:e}}return this.J("captureException",t,Object.assign(Object.assign({},r),{event_id:n})),n}captureMessage(t,e,n){const r=this.G=L();let i=n;if(!n){let e;try{throw new Error(t)}catch(t){e=t}i={originalException:t,syntheticException:e}}return this.J("captureMessage",t,e,Object.assign(Object.assign({},i),{event_id:r})),r}captureEvent(t,e){const n=this.G=L();return this.J("captureEvent",t,Object.assign(Object.assign({},e),{event_id:n})),n}lastEventId(){return this.G}addBreadcrumb(t,e){const n=this.getStackTop();if(!n.scope||!n.client)return;const{beforeBreadcrumb:r=null,maxBreadcrumbs:i=xt}=n.client.getOptions&&n.client.getOptions()||{};if(i<=0)return;const s=wt(),o=Object.assign({timestamp:s},t),c=r?B(()=>r(o,e)):o;null!==c&&n.scope.addBreadcrumb(c,Math.min(i,St))}setUser(t){const e=this.getStackTop();e.scope&&e.scope.setUser(t)}setTags(t){const e=this.getStackTop();e.scope&&e.scope.setTags(t)}setExtras(t){const e=this.getStackTop();e.scope&&e.scope.setExtras(t)}setTag(t,e){const n=this.getStackTop();n.scope&&n.scope.setTag(t,e)}setExtra(t,e){const n=this.getStackTop();n.scope&&n.scope.setExtra(t,e)}setContext(t,e){const n=this.getStackTop();n.scope&&n.scope.setContext(t,e)}configureScope(t){const e=this.getStackTop();e.scope&&e.client&&t(e.scope)}run(t){const e=Dt(this);try{t(this)}finally{Dt(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return J.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startSpan(t){return this.V("startSpan",t)}startTransaction(t,e){return this.V("startTransaction",t,e)}traceHeaders(){return this.V("traceHeaders")}J(t,...e){const n=this.getStackTop();n&&n.client&&n.client[t]&&n.client[t](...e,n.scope)}V(t,...e){const n=Tt().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);J.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function Tt(){const t=U();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function Dt(t){const e=Tt(),n=Ct(e);return Mt(e,t),n}function Rt(){const t=Tt();return It(t)&&!Ct(t).isOlderThan(_t)||Mt(t,new kt),N()?function(t){try{const e=function(){const t=Tt().__SENTRY__;return t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active}();if(!e)return Ct(t);if(!It(e)||Ct(e).isOlderThan(_t)){const n=Ct(t).getStackTop();Mt(e,new kt(n.client,Et.clone(n.scope)))}return Ct(e)}catch(e){return Ct(t)}}(t):Ct(t)}function It(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function Ct(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub?t.__SENTRY__.hub:(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new kt,t.__SENTRY__.hub)}function Mt(t,e){return!!t&&(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=e,!0)}function Nt(t,...e){const n=Rt();if(n&&n[t])return n[t](...e);throw new Error(`No hub defined or ${t} was not found on the hub, please open a bug report.`)}function captureException(t,e){let n;try{throw new Error("Sentry syntheticException")}catch(t){n=t}return Nt("captureException",t,{captureContext:e,originalException:t,syntheticException:n})}function At(t){Nt("withScope",t)}const Ut="7";class Lt{constructor(t){this.dsn=t,this.K=new j(t)}getDsn(){return this.K}getBaseApiEndpoint(){const t=this.K,e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}getStoreEndpoint(){return this.Y("store")}getStoreEndpointWithUrlEncodedAuth(){return`${this.getStoreEndpoint()}?${this.Z()}`}getEnvelopeEndpointWithUrlEncodedAuth(){return`${this.tt()}?${this.Z()}`}getStoreEndpointPath(){const t=this.K;return`${t.path?`/${t.path}`:""}/api/${t.projectId}/store/`}getRequestHeaders(t,e){const n=this.K,r=[`Sentry sentry_version=${Ut}`];return r.push(`sentry_client=${t}/${e}`),r.push(`sentry_key=${n.user}`),n.pass&&r.push(`sentry_secret=${n.pass}`),{"Content-Type":"application/json","X-Sentry-Auth":r.join(", ")}}getReportDialogEndpoint(t={}){const e=this.K,n=`${this.getBaseApiEndpoint()}embed/error-page/`,r=[];r.push(`dsn=${e.toString()}`);for(const e in t)if("user"===e){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(e)}=${encodeURIComponent(t[e])}`);return r.length?`${n}?${r.join("&")}`:n}tt(){return this.Y("envelope")}Y(t){return`${this.getBaseApiEndpoint()}${this.K.projectId}/${t}/`}Z(){const t={sentry_key:this.K.user,sentry_version:Ut};return e=t,Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&");var e}}const Ft=[];function qt(t){const e={};return function(t){const e=t.defaultIntegrations&&[...t.defaultIntegrations]||[],n=t.integrations;let r=[];if(Array.isArray(n)){const t=n.map(t=>t.name),i=[];e.forEach(e=>{-1===t.indexOf(e.name)&&-1===i.indexOf(e.name)&&(r.push(e),i.push(e.name))}),n.forEach(t=>{-1===i.indexOf(t.name)&&(r.push(t),i.push(t.name))})}else"function"==typeof n?(r=n(e),r=Array.isArray(r)?r:[r]):r=[...e];const i=r.map(t=>t.name);return-1!==i.indexOf("Debug")&&r.push(...r.splice(i.indexOf("Debug"),1)),r}(t).forEach(t=>{e[t.name]=t,function(t){-1===Ft.indexOf(t.name)&&(t.setupOnce($t,Rt),Ft.push(t.name),J.log(`Integration installed: ${t.name}`))}(t)}),e}class Bt{constructor(t,e){this.et={},this.nt=!1,this.rt=new t(e),this.it=e,e.dsn&&(this.st=new j(e.dsn))}captureException(t,e,n){let r=e&&e.event_id;return this.nt=!0,this.ot().eventFromException(t,e).then(t=>{r=this.captureEvent(t,e,n)}),r}captureMessage(t,e,n,r){let i=n&&n.event_id;return this.nt=!0,(u(t)?this.ot().eventFromMessage(`${t}`,e,n):this.ot().eventFromException(t,n)).then(t=>{i=this.captureEvent(t,n,r)}),i}captureEvent(t,e,n){let r=e&&e.event_id;return this.nt=!0,this.ct(t,e,n).then(t=>{r=t&&t.event_id,this.nt=!1}).then(null,t=>{J.error(t),this.nt=!1}),r}getDsn(){return this.st}getOptions(){return this.it}flush(t){return this.ut(t).then(e=>(clearInterval(e.interval),this.ot().getTransport().close(t).then(t=>e.ready&&t)))}close(t){return this.flush(t).then(t=>(this.getOptions().enabled=!1,t))}setupIntegrations(){this.at()&&(this.et=qt(this.it))}getIntegration(t){try{return this.et[t.id]||null}catch(e){return J.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}ut(t){return new vt(e=>{let n=0;let r=0;clearInterval(r),r=setInterval(()=>{this.nt?(n+=1,t&&n>=t&&e({interval:r,ready:!1})):e({interval:r,ready:!0})},1)})}ot(){return this.rt}at(){return!1!==this.getOptions().enabled&&void 0!==this.st}ht(t,e,n){const{normalizeDepth:r=3}=this.getOptions(),i=Object.assign(Object.assign({},t),{event_id:t.event_id||(n&&n.event_id?n.event_id:L()),timestamp:t.timestamp||wt()});this.lt(i),this.ft(i);let s=e;n&&n.captureContext&&(s=Et.clone(s).update(n.captureContext));let o=vt.resolve(i);return s&&(o=s.applyToEvent(i,n)),o.then(t=>"number"==typeof r&&r>0?this.dt(t,r):t)}dt(t,e){if(!t)return null;const n=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(t=>Object.assign(Object.assign({},t),t.data&&{data:C(t.data,e)}))}),t.user&&{user:C(t.user,e)}),t.contexts&&{contexts:C(t.contexts,e)}),t.extra&&{extra:C(t.extra,e)});return t.contexts&&t.contexts.trace&&(n.contexts.trace=t.contexts.trace),n}lt(t){const{environment:e,release:n,dist:r,maxValueLength:i=250}=this.getOptions();void 0===t.environment&&void 0!==e&&(t.environment=e),void 0===t.release&&void 0!==n&&(t.release=n),void 0===t.dist&&void 0!==r&&(t.dist=r),t.message&&(t.message=$(t.message,i));const s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=$(s.value,i));const o=t.request;o&&o.url&&(o.url=$(o.url,i))}ft(t){const e=t.sdk,n=Object.keys(this.et);e&&n.length>0&&(e.integrations=n)}pt(t){this.ot().sendEvent(t)}ct(t,e,n){const{beforeSend:r,sampleRate:i}=this.getOptions();if(!this.at())return vt.reject("SDK not enabled, will not send event.");const s="transaction"===t.type;return!s&&"number"==typeof i&&Math.random()>i?vt.reject("This event has been sampled, will not send event."):new vt((i,o)=>{this.ht(t,n,e).then(t=>{if(null===t)return void o("An event processor returned null, will not send event.");let n=t;if(e&&e.data&&!0===e.data.__sentry__||!r||s)return this.pt(n),void i(n);const c=r(t,e);if(void 0===c)J.error("`beforeSend` method has to return `null` or a valid event.");else if(f(c))this.bt(c,i,o);else{if(null===(n=c))return J.log("`beforeSend` returned `null`, will not send event."),void i(null);this.pt(n),i(n)}}).then(null,t=>{this.captureException(t,{data:{__sentry__:!0},originalException:t}),o(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)})})}bt(t,e,n){t.then(t=>{null!==t?(this.pt(t),e(t)):n("`beforeSend` returned `null`, will not send event.")}).then(null,t=>{n(`beforeSend rejected with ${t}`)})}}class Ht{sendEvent(e){return vt.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:t.Status.Skipped})}close(t){return vt.resolve(!0)}}class Pt{constructor(t){this.it=t,this.it.dsn||J.warn("No DSN provided, backend will not do anything."),this.vt=this.yt()}eventFromException(t,e){throw new y("Backend has to implement `eventFromException` method")}eventFromMessage(t,e,n){throw new y("Backend has to implement `eventFromMessage` method")}sendEvent(t){this.vt.sendEvent(t).then(null,t=>{J.error(`Error while sending event: ${t}`)})}getTransport(){return this.vt}yt(){return new Ht}}function Wt(t,e){const n="transaction"===t.type,r={body:JSON.stringify(t),url:n?e.getEnvelopeEndpointWithUrlEncodedAuth():e.getStoreEndpointWithUrlEncodedAuth()};if(n){const e=`${JSON.stringify({event_id:t.event_id,sent_at:(new Date).toISOString()})}\n${JSON.stringify({type:t.type})}\n${r.body}`;r.body=e}return r}let Xt;class Gt{constructor(){this.name=Gt.id}setupOnce(){Xt=Function.prototype.toString,Function.prototype.toString=function(...t){const e=this.__sentry_original__||this;return Xt.apply(e,t)}}}Gt.id="FunctionToString";const zt=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class Jt{constructor(t={}){this.it=t,this.name=Jt.id}setupOnce(){$t(t=>{const e=Rt();if(!e)return t;const n=e.getIntegration(Jt);if(n){const r=e.getClient(),i=r?r.getOptions():{},s=n.gt(i);if(n.jt(t,s))return null}return t})}jt(t,e){return this.wt(t,e)?(J.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${q(t)}`),!0):this.Et(t,e)?(J.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${q(t)}`),!0):this.Ot(t,e)?(J.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${q(t)}.\nUrl: ${this.$t(t)}`),!0):!this._t(t,e)&&(J.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${q(t)}.\nUrl: ${this.$t(t)}`),!0)}wt(t,e){if(!e.ignoreInternal)return!1;try{return t&&t.exception&&t.exception.values&&t.exception.values[0]&&"SentryError"===t.exception.values[0].type||!1}catch(t){return!1}}Et(t,e){return!(!e.ignoreErrors||!e.ignoreErrors.length)&&this.xt(t).some(t=>e.ignoreErrors.some(e=>x(t,e)))}Ot(t,e){if(!e.denyUrls||!e.denyUrls.length)return!1;const n=this.$t(t);return!!n&&e.denyUrls.some(t=>x(n,t))}_t(t,e){if(!e.allowUrls||!e.allowUrls.length)return!0;const n=this.$t(t);return!n||e.allowUrls.some(t=>x(n,t))}gt(t={}){return{allowUrls:[...this.it.whitelistUrls||[],...this.it.allowUrls||[],...t.whitelistUrls||[],...t.allowUrls||[]],denyUrls:[...this.it.blacklistUrls||[],...this.it.denyUrls||[],...t.blacklistUrls||[],...t.denyUrls||[]],ignoreErrors:[...this.it.ignoreErrors||[],...t.ignoreErrors||[],...zt],ignoreInternal:void 0===this.it.ignoreInternal||this.it.ignoreInternal}}xt(t){if(t.message)return[t.message];if(t.exception)try{const{type:e="",value:n=""}=t.exception.values&&t.exception.values[0]||{};return[`${n}`,`${e}: ${n}`]}catch(e){return J.error(`Cannot extract message for event ${q(t)}`),[]}return[]}$t(t){try{if(t.stacktrace){const e=t.stacktrace.frames;return e&&e[e.length-1].filename||null}if(t.exception){const e=t.exception.values&&t.exception.values[0].stacktrace&&t.exception.values[0].stacktrace.frames;return e&&e[e.length-1].filename||null}return null}catch(e){return J.error(`Cannot extract url for event ${q(t)}`),null}}}Jt.id="InboundFilters";var Vt=Object.freeze({__proto__:null,FunctionToString:Gt,InboundFilters:Jt});const Kt="?",Qt=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Yt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,Zt=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,te=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ee=/\((\S*)(?::(\d+))(?::(\d+))\)/,ne=/Minified React error #\d+;/i;function re(t){let e=null,n=0;t&&("number"==typeof t.framesToPop?n=t.framesToPop:ne.test(t.message)&&(n=1));try{if(e=function(t){if(!t||!t.stacktrace)return null;const e=t.stacktrace,n=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,r=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\((.*)\))? in (.*):\s*$/i,i=e.split("\n"),s=[];let o;for(let t=0;t<i.length;t+=2){let e=null;(o=n.exec(i[t]))?e={url:o[2],func:o[3],args:[],line:+o[1],column:null}:(o=r.exec(i[t]))&&(e={url:o[6],func:o[3]||o[4],args:o[5]?o[5].split(","):[],line:+o[1],column:+o[2]}),e&&(!e.func&&e.line&&(e.func=Kt),s.push(e))}if(!s.length)return null;return{message:se(t),name:t.name,stack:s}}(t))return ie(e,n)}catch(t){}try{if(e=function(t){if(!t||!t.stack)return null;const e=[],n=t.stack.split("\n");let r,i,s,o;for(let c=0;c<n.length;++c){if(s=Qt.exec(n[c])){const t=s[2]&&0===s[2].indexOf("native");(r=s[2]&&0===s[2].indexOf("eval"))&&(i=ee.exec(s[2]))&&(s[2]=i[1],s[3]=i[2],s[4]=i[3]),o={url:s[2]&&0===s[2].indexOf("address at ")?s[2].substr("address at ".length):s[2],func:s[1]||Kt,args:t?[s[2]]:[],line:s[3]?+s[3]:null,column:s[4]?+s[4]:null}}else if(s=Zt.exec(n[c]))o={url:s[2],func:s[1]||Kt,args:[],line:+s[3],column:s[4]?+s[4]:null};else{if(!(s=Yt.exec(n[c])))continue;(r=s[3]&&s[3].indexOf(" > eval")>-1)&&(i=te.exec(s[3]))?(s[1]=s[1]||"eval",s[3]=i[1],s[4]=i[2],s[5]=""):0!==c||s[5]||void 0===t.columnNumber||(e[0].column=t.columnNumber+1),o={url:s[3],func:s[1]||Kt,args:s[2]?s[2].split(","):[],line:s[4]?+s[4]:null,column:s[5]?+s[5]:null}}!o.func&&o.line&&(o.func=Kt),e.push(o)}if(!e.length)return null;return{message:se(t),name:t.name,stack:e}}(t))return ie(e,n)}catch(t){}return{message:se(t),name:t&&t.name,stack:[],failed:!0}}function ie(t,e){try{return Object.assign(Object.assign({},t),{stack:t.stack.slice(e)})}catch(e){return t}}function se(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}const oe=50;function ce(t){const e=ae(t.stack),n={type:t.name,value:t.message};return e&&e.length&&(n.stacktrace={frames:e}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function ue(t){return{exception:{values:[ce(t)]}}}function ae(t){if(!t||!t.length)return[];let e=t;const n=e[0].func||"",r=e[e.length-1].func||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(e=e.slice(1)),-1!==r.indexOf("sentryWrapped")&&(e=e.slice(0,-1)),e.slice(0,oe).map(t=>({colno:null===t.column?void 0:t.column,filename:t.url||e[0].url,function:t.func||"?",in_app:!0,lineno:null===t.line?void 0:t.line})).reverse()}function he(e,n,r){const i=fe(n,r&&r.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return P(i,{handled:!0,type:"generic"}),i.level=t.Severity.Error,r&&r.event_id&&(i.event_id=r.event_id),vt.resolve(i)}function le(e,n,r=t.Severity.Info,i){const s=de(n,i&&i.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return s.level=r,i&&i.event_id&&(s.event_id=i.event_id),vt.resolve(s)}function fe(t,e,n={}){let r;if(s(t)&&t.error){return r=ue(re(t=t.error))}if(o(t)||(c=t,"[object DOMException]"===Object.prototype.toString.call(c))){const i=t,s=i.name||(o(i)?"DOMError":"DOMException"),c=i.message?`${s}: ${i.message}`:s;return H(r=de(c,e,n),c),r}var c;if(i(t))return r=ue(re(t));if(a(t)||h(t)){return P(r=function(t,e,n){const r={exception:{values:[{type:h(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:`Non-Error ${n?"promise rejection":"exception"} captured with keys: ${M(t)}`}]},extra:{__serialized__:D(t)}};if(e){const t=ae(re(e).stack);r.stacktrace={frames:t}}return r}(t,e,n.rejection),{synthetic:!0}),r}return H(r=de(t,e,n),`${t}`,void 0),P(r,{synthetic:!0}),r}function de(t,e,n={}){const r={message:t};if(n.attachStacktrace&&e){const t=ae(re(e).stack);r.stacktrace={frames:t}}return r}class pe{constructor(t){this.options=t,this.k=new yt(30),this.St=new Lt(this.options.dsn),this.url=this.St.getStoreEndpointWithUrlEncodedAuth()}sendEvent(t){throw new y("Transport Class has to implement `sendEvent` method")}close(t){return this.k.drain(t)}}const be=U();class ve extends pe{constructor(){super(...arguments),this.kt=new Date(Date.now())}sendEvent(e){if(new Date(Date.now())<this.kt)return Promise.reject({event:e,reason:`Transport locked till ${this.kt} due to too many requests.`,status:429});const n=Wt(e,this.St),r={body:n.body,method:"POST",referrerPolicy:Q()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(r,this.options.fetchParameters),void 0!==this.options.headers&&(r.headers=this.options.headers),this.k.add(new vt((e,i)=>{be.fetch(n.url,r).then(n=>{const r=t.Status.fromHttpCode(n.status);if(r!==t.Status.Success){if(r===t.Status.RateLimit){const t=Date.now(),e=n.headers.get("Retry-After");this.kt=new Date(t+X(t,e)),J.warn(`Too many requests, backing off till: ${this.kt}`)}i(n)}else e({status:r})}).catch(i)}))}}class ye extends pe{constructor(){super(...arguments),this.kt=new Date(Date.now())}sendEvent(e){if(new Date(Date.now())<this.kt)return Promise.reject({event:e,reason:`Transport locked till ${this.kt} due to too many requests.`,status:429});const n=Wt(e,this.St);return this.k.add(new vt((e,r)=>{const i=new XMLHttpRequest;i.onreadystatechange=(()=>{if(4!==i.readyState)return;const n=t.Status.fromHttpCode(i.status);if(n!==t.Status.Success){if(n===t.Status.RateLimit){const t=Date.now(),e=i.getResponseHeader("Retry-After");this.kt=new Date(t+X(t,e)),J.warn(`Too many requests, backing off till: ${this.kt}`)}r(i)}else e({status:n})}),i.open("POST",n.url);for(const t in this.options.headers)this.options.headers.hasOwnProperty(t)&&i.setRequestHeader(t,this.options.headers[t]);i.send(n.body)}))}}var me=Object.freeze({__proto__:null,BaseTransport:pe,FetchTransport:ve,XHRTransport:ye});class ge extends Pt{eventFromException(t,e){return he(this.it,t,e)}eventFromMessage(e,n=t.Severity.Info,r){return le(this.it,e,n,r)}yt(){if(!this.it.dsn)return super.yt();const t=Object.assign(Object.assign({},this.it.transportOptions),{dsn:this.it.dsn});return this.it.transport?new this.it.transport(t):V()?new ve(t):new ye(t)}}let je=0;function we(){return je>0}function Ee(t,e={},n){if("function"!=typeof t)return t;try{if(t.__sentry__)return t;if(t.__sentry_wrapped__)return t.__sentry_wrapped__}catch(e){return t}const sentryWrapped=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const i=r.map(t=>Ee(t,e));return t.handleEvent?t.handleEvent.apply(this,i):t.apply(this,i)}catch(t){throw je+=1,setTimeout(()=>{je-=1}),At(n=>{n.addEventProcessor(t=>{const n=Object.assign({},t);return e.mechanism&&(H(n,void 0,void 0),P(n,e.mechanism)),n.extra=Object.assign(Object.assign({},n.extra),{arguments:r}),n}),captureException(t)}),t}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(sentryWrapped[e]=t[e])}catch(t){}t.prototype=t.prototype||{},sentryWrapped.prototype=t.prototype,Object.defineProperty(t,"__sentry_wrapped__",{enumerable:!1,value:sentryWrapped}),Object.defineProperties(sentryWrapped,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:t}});try{Object.getOwnPropertyDescriptor(sentryWrapped,"name").configurable&&Object.defineProperty(sentryWrapped,"name",{get:()=>t.name})}catch(t){}return sentryWrapped}function Oe(t={}){if(!t.eventId)return void J.error("Missing eventId option in showReportDialog call");if(!t.dsn)return void J.error("Missing dsn option in showReportDialog call");const e=document.createElement("script");e.async=!0,e.src=new Lt(t.dsn).getReportDialogEndpoint(t),t.onLoad&&(e.onload=t.onLoad),(document.head||document.body).appendChild(e)}class $e{constructor(t){this.name=$e.id,this.Tt=!1,this.Dt=!1,this.it=Object.assign({onerror:!0,onunhandledrejection:!0},t)}setupOnce(){Error.stackTraceLimit=50,this.it.onerror&&(J.log("Global Handler attached: onerror"),this.Rt()),this.it.onunhandledrejection&&(J.log("Global Handler attached: onunhandledrejection"),this.It())}Rt(){this.Tt||(nt({callback:t=>{const e=t.error,n=Rt(),r=n.getIntegration($e),i=e&&!0===e.__sentry_own_request__;if(!r||we()||i)return;const s=n.getClient(),o=u(e)?this.Ct(t.msg,t.url,t.line,t.column):this.Mt(fe(e,void 0,{attachStacktrace:s&&s.getOptions().attachStacktrace,rejection:!1}),t.url,t.line,t.column);P(o,{handled:!1,type:"onerror"}),n.captureEvent(o,{originalException:e})},type:"error"}),this.Tt=!0)}It(){this.Dt||(nt({callback:e=>{let n=e;try{"reason"in e?n=e.reason:"detail"in e&&"reason"in e.detail&&(n=e.detail.reason)}catch(t){}const r=Rt(),i=r.getIntegration($e),s=n&&!0===n.__sentry_own_request__;if(!i||we()||s)return!0;const o=r.getClient(),c=u(n)?this.Nt(n):fe(n,void 0,{attachStacktrace:o&&o.getOptions().attachStacktrace,rejection:!0});c.level=t.Severity.Error,P(c,{handled:!1,type:"onunhandledrejection"}),r.captureEvent(c,{originalException:n})},type:"unhandledrejection"}),this.Dt=!0)}Ct(t,e,n,r){const i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o,u=s(t)?t.message:t;if(c(u)){const t=u.match(i);t&&(o=t[1],u=t[2])}const a={exception:{values:[{type:o||"Error",value:u}]}};return this.Mt(a,e,n,r)}Nt(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${t}`}]}}}Mt(t,e,n,r){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].stacktrace=t.exception.values[0].stacktrace||{},t.exception.values[0].stacktrace.frames=t.exception.values[0].stacktrace.frames||[];const i=isNaN(parseInt(r,10))?void 0:r,s=isNaN(parseInt(n,10))?void 0:n,o=c(e)&&e.length>0?e:function(){try{return document.location.href}catch(t){return""}}();return 0===t.exception.values[0].stacktrace.frames.length&&t.exception.values[0].stacktrace.frames.push({colno:i,filename:o,function:"?",in_app:!0,lineno:s}),t}}$e.id="GlobalHandlers";const _e=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class xe{constructor(t){this.name=xe.id,this.it=Object.assign({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t)}setupOnce(){const t=U();if(this.it.setTimeout&&S(t,"setTimeout",this.At.bind(this)),this.it.setInterval&&S(t,"setInterval",this.At.bind(this)),this.it.requestAnimationFrame&&S(t,"requestAnimationFrame",this.Ut.bind(this)),this.it.XMLHttpRequest&&"XMLHttpRequest"in t&&S(XMLHttpRequest.prototype,"send",this.Lt.bind(this)),this.it.eventTarget){(Array.isArray(this.it.eventTarget)?this.it.eventTarget:_e).forEach(this.Ft.bind(this))}}At(t){return function(...e){const n=e[0];return e[0]=Ee(n,{mechanism:{data:{function:O(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}Ut(t){return function(e){return t.call(this,Ee(e,{mechanism:{data:{function:"requestAnimationFrame",handler:O(t)},handled:!0,type:"instrument"}}))}}Ft(t){const e=U(),n=e[t]&&e[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(S(n,"addEventListener",function(e){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=Ee(r.handleEvent.bind(r),{mechanism:{data:{function:"handleEvent",handler:O(r),target:t},handled:!0,type:"instrument"}}))}catch(t){}return e.call(this,n,Ee(r,{mechanism:{data:{function:"addEventListener",handler:O(r),target:t},handled:!0,type:"instrument"}}),i)}}),S(n,"removeEventListener",function(t){return function(e,n,r){try{t.call(this,e,n.__sentry_wrapped__,r)}catch(t){}return t.call(this,e,n,r)}}))}Lt(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(t=>{t in n&&"function"==typeof n[t]&&S(n,t,function(e){const n={mechanism:{data:{function:t,handler:O(e)},handled:!0,type:"instrument"}};return e.__sentry_original__&&(n.mechanism.data.handler=O(e.__sentry_original__)),Ee(e,n)})}),t.apply(this,e)}}}xe.id="TryCatch";class Se{constructor(t){this.name=Se.id,this.it=Object.assign({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}addSentryBreadcrumb(t){this.it.sentry&&Rt().addBreadcrumb({category:`sentry.${"transaction"===t.type?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:q(t)},{event:t})}setupOnce(){this.it.console&&nt({callback:(...t)=>{this.qt(...t)},type:"console"}),this.it.dom&&nt({callback:(...t)=>{this.Bt(...t)},type:"dom"}),this.it.xhr&&nt({callback:(...t)=>{this.Ht(...t)},type:"xhr"}),this.it.fetch&&nt({callback:(...t)=>{this.Pt(...t)},type:"fetch"}),this.it.history&&nt({callback:(...t)=>{this.Wt(...t)},type:"history"})}qt(e){const n={category:"console",data:{arguments:e.args,logger:"console"},level:t.Severity.fromString(e.level),message:_(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;n.message=`Assertion failed: ${_(e.args.slice(1)," ")||"console.assert"}`,n.data.arguments=e.args.slice(1)}Rt().addBreadcrumb(n,{input:e.args,level:e.level})}Bt(t){let e;try{e=t.event.target?p(t.event.target):p(t.event)}catch(t){e="<unknown>"}0!==e.length&&Rt().addBreadcrumb({category:`ui.${t.name}`,message:e},{event:t.event,name:t.name})}Ht(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;const{method:e,url:n,status_code:r,body:i}=t.xhr.__sentry_xhr__||{};Rt().addBreadcrumb({category:"xhr",data:{method:e,url:n,status_code:r},type:"http"},{xhr:t.xhr,input:i})}else;}Pt(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?Rt().addBreadcrumb({category:"fetch",data:e.fetchData,level:t.Severity.Error,type:"http"},{data:e.error,input:e.args}):Rt().addBreadcrumb({category:"fetch",data:Object.assign(Object.assign({},e.fetchData),{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response})))}Wt(t){const e=U();let n=t.from,r=t.to;const i=F(e.location.href);let s=F(n);const o=F(r);s.path||(s=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),Rt().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}}Se.id="Breadcrumbs";const ke="cause",Te=5;class De{constructor(t={}){this.name=De.id,this.Xt=t.key||ke,this.S=t.limit||Te}setupOnce(){$t((t,e)=>{const n=Rt().getIntegration(De);return n?n.Gt(t,e):t})}Gt(t,e){if(!(t.exception&&t.exception.values&&e&&d(e.originalException,Error)))return t;const n=this.zt(e.originalException,this.Xt);return t.exception.values=[...n,...t.exception.values],t}zt(t,e,n=[]){if(!d(t[e],Error)||n.length+1>=this.S)return n;const r=ce(re(t[e]));return this.zt(t[e],e,[r,...n])}}De.id="LinkedErrors";const Re=U();class Ie{constructor(){this.name=Ie.id}setupOnce(){$t(t=>{var e,n,r;if(Rt().getIntegration(Ie)){if(!Re.navigator&&!Re.location&&!Re.document)return t;const i=(null===(e=t.request)||void 0===e?void 0:e.url)||(null===(n=Re.location)||void 0===n?void 0:n.href),{referrer:s}=Re.document||{},{userAgent:o}=Re.navigator||{},c=Object.assign(Object.assign(Object.assign({},null===(r=t.request)||void 0===r?void 0:r.headers),s&&{Referer:s}),o&&{"User-Agent":o}),u=Object.assign(Object.assign({},i&&{url:i}),{headers:c});return Object.assign(Object.assign({},t),{request:u})}return t})}}Ie.id="UserAgent";var Ce=Object.freeze({__proto__:null,GlobalHandlers:$e,TryCatch:xe,Breadcrumbs:Se,LinkedErrors:De,UserAgent:Ie});const Me="sentry.javascript.browser",Ne="5.25.0";class Ae extends Bt{constructor(t={}){super(ge,t)}showReportDialog(t={}){U().document&&(this.at()?Oe(Object.assign(Object.assign({},t),{dsn:t.dsn||this.getDsn()})):J.error("Trying to call showReportDialog with Sentry Client disabled"))}ht(t,e,n){return t.platform=t.platform||"javascript",t.sdk=Object.assign(Object.assign({},t.sdk),{name:Me,packages:[...t.sdk&&t.sdk.packages||[],{name:"npm:@sentry/browser",version:Ne}],version:Ne}),super.ht(t,e,n)}pt(t){const e=this.getIntegration(Se);e&&e.addSentryBreadcrumb(t),super.pt(t)}}const Ue=[new Jt,new Gt,new xe,new Se,new $e,new De,new Ie];let Le={};const Fe=U();Fe.Sentry&&Fe.Sentry.Integrations&&(Le=Fe.Sentry.Integrations);const qe=Object.assign(Object.assign(Object.assign({},Le),Vt),Ce);return t.BrowserClient=Ae,t.Hub=kt,t.Integrations=qe,t.SDK_NAME=Me,t.SDK_VERSION=Ne,t.Scope=Et,t.Transports=me,t.addBreadcrumb=function(t){Nt("addBreadcrumb",t)},t.addGlobalEventProcessor=$t,t.captureEvent=function(t){return Nt("captureEvent",t)},t.captureException=captureException,t.captureMessage=function(t,e){let n;try{throw new Error(t)}catch(t){n=t}const r="string"!=typeof e?{captureContext:e}:void 0;return Nt("captureMessage",t,"string"==typeof e?e:void 0,Object.assign({originalException:t,syntheticException:n},r))},t.close=function(t){const e=Rt().getClient();return e?e.close(t):vt.reject(!1)},t.configureScope=function(t){Nt("configureScope",t)},t.defaultIntegrations=Ue,t.eventFromException=he,t.eventFromMessage=le,t.flush=function(t){const e=Rt().getClient();return e?e.flush(t):vt.reject(!1)},t.forceLoad=function(){},t.getCurrentHub=Rt,t.getHubFromCarrier=Ct,t.init=function(t={}){if(void 0===t.defaultIntegrations&&(t.defaultIntegrations=Ue),void 0===t.release){const e=U();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}!function(t,e){!0===e.debug&&J.enable();const n=Rt(),r=new t(e);n.bindClient(r)}(Ae,t)},t.injectReportDialog=Oe,t.lastEventId=function(){return Rt().lastEventId()},t.makeMain=Dt,t.onLoad=function(t){t()},t.setContext=function(t,e){Nt("setContext",t,e)},t.setExtra=function(t,e){Nt("setExtra",t,e)},t.setExtras=function(t){Nt("setExtras",t)},t.setTag=function(t,e){Nt("setTag",t,e)},t.setTags=function(t){Nt("setTags",t)},t.setUser=function(t){Nt("setUser",t)},t.showReportDialog=function(t={}){t.eventId||(t.eventId=Rt().lastEventId());const e=Rt().getClient();e&&e.showReportDialog(t)},t.startTransaction=function(t,e){return Nt("startTransaction",Object.assign({},t),e)},t.withScope=At,t.wrap=function(t){return Ee(t)()},t}({});
|
|
3
3
|
//# sourceMappingURL=bundle.es6.min.js.map
|