@sentry/browser 6.7.2 → 6.8.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 +197 -24
- 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 +235 -57
- package/build/bundle.js.map +1 -1
- package/build/bundle.min.js +2 -2
- package/build/bundle.min.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/integrations/breadcrumbs.d.ts +1 -1
- package/dist/integrations/breadcrumbs.d.ts.map +1 -1
- package/dist/integrations/breadcrumbs.js +6 -3
- package/dist/integrations/breadcrumbs.js.map +1 -1
- package/dist/integrations/dedupe.d.ts +35 -0
- package/dist/integrations/dedupe.d.ts.map +1 -0
- package/dist/integrations/dedupe.js +166 -0
- package/dist/integrations/dedupe.js.map +1 -0
- package/dist/integrations/globalhandlers.d.ts.map +1 -1
- package/dist/integrations/globalhandlers.js +6 -8
- package/dist/integrations/globalhandlers.js.map +1 -1
- package/dist/integrations/index.d.ts +1 -0
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/index.js +2 -0
- package/dist/integrations/index.js.map +1 -1
- package/dist/sdk.d.ts +2 -2
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +1 -0
- package/dist/sdk.js.map +1 -1
- package/dist/transports/fetch.d.ts.map +1 -1
- package/dist/transports/fetch.js +19 -17
- package/dist/transports/fetch.js.map +1 -1
- package/dist/transports/xhr.d.ts.map +1 -1
- package/dist/transports/xhr.js +20 -18
- package/dist/transports/xhr.js.map +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/integrations/breadcrumbs.d.ts +1 -1
- package/esm/integrations/breadcrumbs.d.ts.map +1 -1
- package/esm/integrations/breadcrumbs.js +6 -3
- package/esm/integrations/breadcrumbs.js.map +1 -1
- package/esm/integrations/dedupe.d.ts +35 -0
- package/esm/integrations/dedupe.d.ts.map +1 -0
- package/esm/integrations/dedupe.js +165 -0
- package/esm/integrations/dedupe.js.map +1 -0
- package/esm/integrations/globalhandlers.d.ts.map +1 -1
- package/esm/integrations/globalhandlers.js +6 -8
- package/esm/integrations/globalhandlers.js.map +1 -1
- package/esm/integrations/index.d.ts +1 -0
- package/esm/integrations/index.d.ts.map +1 -1
- package/esm/integrations/index.js +1 -0
- package/esm/integrations/index.js.map +1 -1
- package/esm/sdk.d.ts +2 -2
- package/esm/sdk.d.ts.map +1 -1
- package/esm/sdk.js +2 -1
- package/esm/sdk.js.map +1 -1
- package/esm/transports/fetch.d.ts.map +1 -1
- package/esm/transports/fetch.js +19 -17
- package/esm/transports/fetch.js.map +1 -1
- package/esm/transports/xhr.d.ts.map +1 -1
- package/esm/transports/xhr.js +20 -18
- package/esm/transports/xhr.js.map +1 -1
- package/package.json +5 -5
package/build/bundle.es6.min.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! @sentry/browser 6.
|
|
2
|
-
var Sentry=function(t){var e,n,r,i,s,o;function c(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return v(t,Error)}}function u(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)}function a(t){return"[object DOMError]"===Object.prototype.toString.call(t)}function h(t){return"[object String]"===Object.prototype.toString.call(t)}function l(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function f(t){return"[object Object]"===Object.prototype.toString.call(t)}function d(t){return"undefined"!=typeof Event&&v(t,Event)}function p(t){return"undefined"!=typeof Element&&v(t,Element)}function b(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function v(t,e){try{return t instanceof e}catch(t){return!1}}function y(t,e){try{let n=t;const r=5,i=80,s=[];let o=0,c=0;const u=" > ",a=u.length;let h;for(;n&&o++<r&&!("html"===(h=m(n,e))||o>1&&c+s.length*a+h.length>=i);)s.push(h),c+=h.length,n=n.parentNode;return s.reverse().join(u)}catch(t){return"<unknown>"}}function m(t,e){const n=t,r=[];let i,s,o,c,u;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());const a=e?n.getAttribute(e):null;if(a)r.push(`[${e}="${a}"]`);else if(n.id&&r.push(`#${n.id}`),(i=n.className)&&h(i))for(s=i.split(/\s+/),u=0;u<s.length;u++)r.push(`.${s[u]}`);const l=["type","name","title","alt"];for(u=0;u<l.length;u++)o=l[u],(c=n.getAttribute(o))&&r.push(`[${o}="${c}"]`);return r.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={})),function(t){t.Ok="ok",t.Errored="errored",t.Crashed="crashed"}(r||(r={})),(i=t.Severity||(t.Severity={})).Fatal="fatal",i.Error="error",i.Warning="warning",i.Log="log",i.Info="info",i.Debug="debug",i.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={})),function(t){t.Explicit="explicitly_set",t.Sampler="client_sampler",t.Rate="client_rate",t.Inheritance="inheritance"}(o||(o={}));const g=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 j extends Error{constructor(t){super(t),this.message=t,this.name=new.target.prototype.constructor.name,g(this,new.target.prototype)}}const w=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,O="Invalid Dsn";class E{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,publicKey:c}=this;return`${o}://${c}${t&&r?`:${r}`:""}`+`@${e}${i?`:${i}`:""}/${n?`${n}/`:n}${s}`}t(t){const e=w.exec(t);if(!e)throw new j(O);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,publicKey:r})}i(t){"user"in t&&!("publicKey"in t)&&(t.publicKey=t.user),this.user=t.publicKey||"",this.protocol=t.protocol,this.publicKey=t.publicKey||"",this.pass=t.pass||"",this.host=t.host,this.port=t.port||"",this.path=t.path||"",this.projectId=t.projectId}s(){if(["protocol","publicKey","host","projectId"].forEach(t=>{if(!this[t])throw new j(`${O}: ${t} missing`)}),!this.projectId.match(/^\d+$/))throw new j(`${O}: Invalid projectId ${this.projectId}`);if("http"!==this.protocol&&"https"!==this.protocol)throw new j(`${O}: Invalid protocol ${this.protocol}`);if(this.port&&isNaN(parseInt(this.port,10)))throw new j(`${O}: Invalid port ${this.port}`)}}function _(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}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!!h(t)&&(n=e,"[object RegExp]"===Object.prototype.toString.call(n)?e.test(t):"string"==typeof e&&-1!==t.indexOf(e));var n}const k={};function T(){return _()?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:k}function R(){const t=T(),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 D(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 I(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 N(t){const e=T();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 C(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 M(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 A=6e4;const U=T(),q="Sentry Logger ";U.__SENTRY__=U.__SENTRY__||{};const L=U.__SENTRY__.logger||(U.__SENTRY__.logger=new class{constructor(){this.o=!1}disable(){this.o=!1}enable(){this.o=!0}log(...t){this.o&&N(()=>{U.console.log(`${q}[Log]: ${t.join(" ")}`)})}warn(...t){this.o&&N(()=>{U.console.warn(`${q}[Warn]: ${t.join(" ")}`)})}error(...t){this.o&&N(()=>{U.console.error(`${q}[Error]: ${t.join(" ")}`)})}});class F{constructor(){this.u="function"==typeof WeakSet,this.h=this.u?new WeakSet:[]}memoize(t){if(this.u)return!!this.h.has(t)||(this.h.add(t),!1);for(let e=0;e<this.h.length;e++){if(this.h[e]===t)return!0}return this.h.push(t),!1}unmemoize(t){if(this.u)this.h.delete(t);else for(let e=0;e<this.h.length;e++)if(this.h[e]===t){this.h.splice(e,1);break}}}const B="<anonymous>";function H(t){try{return t&&"function"==typeof t&&t.name||B}catch(t){return B}}function P(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 W(t){if(c(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(d(t)){const e=t,n={};n.type=e.type;try{n.target=p(e.target)?y(e.target):Object.prototype.toString.call(e.target)}catch(t){n.target="<unknown>"}try{n.currentTarget=p(e.currentTarget)?y(e.currentTarget):Object.prototype.toString.call(e.currentTarget)}catch(t){n.currentTarget="<unknown>"}"undefined"!=typeof CustomEvent&&v(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 X(t){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}function J(t,e=3,n=102400){const r=K(t,e);return X(r)>n?J(t,e-1,n):r}function G(t,e){return"domain"===e&&t&&"object"==typeof t&&t.l?"[Domain]":"domainEmitter"===e?"[DomainEmitter]":"undefined"!=typeof global&&t===global?"[Global]":"undefined"!=typeof window&&t===window?"[Window]":"undefined"!=typeof document&&t===document?"[Document]":f(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: ${H(t)}]`:"symbol"==typeof t?`[${String(t)}]`:"bigint"==typeof t?`[BigInt: ${String(t)}]`:t;var n}function z(t,e,n=1/0,r=new F){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=G(t);return l(n)?n:e}(e);if(null!=e&&"function"==typeof e.toJSON)return e.toJSON();const i=G(e,t);if(l(i))return i;const s=W(e),o=Array.isArray(e)?[]:{};if(r.memoize(e))return"[Circular ~]";for(const t in s)Object.prototype.hasOwnProperty.call(s,t)&&(o[t]=z(t,s[t],n-1,r));return r.unmemoize(e),o}function K(t,e){try{return JSON.parse(JSON.stringify(t,(t,n)=>z(t,n,e)))}catch(t){return"**non-serializable**"}}function V(t,e=40){const n=Object.keys(W(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 Q(t){if(f(t)){const e=t,n={};for(const t of Object.keys(e))void 0!==e[t]&&(n[t]=Q(e[t]));return n}return Array.isArray(t)?t.map(Q):t}function Y(){if(!("fetch"in T()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function Z(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function tt(){if(!Y())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}const et=T(),nt={},rt={};function it(t){if(!rt[t])switch(rt[t]=!0,t){case"console":!function(){if(!("console"in et))return;["debug","info","warn","error","log","assert"].forEach(function(t){t in et.console&&P(et.console,t,function(e){return function(...n){ot("console",{args:n,level:t}),e&&Function.prototype.apply.call(e,et.console,n)}})})}();break;case"dom":!function(){if(!("document"in et))return;const t=ot.bind(null,"dom"),e=dt(t,!0);et.document.addEventListener("click",e,!1),et.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(e=>{const n=et[e]&&et[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(P(n,"addEventListener",function(e){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this,s=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},o=s[n]=s[n]||{refCount:0};if(!o.handler){const r=dt(t);o.handler=r,e.call(this,n,r,i)}o.refCount+=1}catch(t){}return e.call(this,n,r,i)}}),P(n,"removeEventListener",function(t){return function(e,n,r){if("click"===e||"keypress"==e)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},s=i[e];s&&(s.refCount-=1,s.refCount<=0&&(t.call(this,e,s.handler,r),s.handler=void 0,delete i[e]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch(t){}return t.call(this,e,n,r)}}))})}();break;case"xhr":!function(){if(!("XMLHttpRequest"in et))return;const t=[],e=[],n=XMLHttpRequest.prototype;P(n,"open",function(n){return function(...r){const i=this,s=r[1];i.__sentry_xhr__={method:h(r[0])?r[0].toUpperCase():r[0],url:r[1]},h(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){}ot("xhr",{args:r,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:i})}};return"onreadystatechange"in i&&"function"==typeof i.onreadystatechange?P(i,"onreadystatechange",function(t){return function(...e){return o(),t.apply(i,e)}}):i.addEventListener("readystatechange",o),n.apply(i,r)}}),P(n,"send",function(n){return function(...r){return t.push(this),e.push(r),ot("xhr",{args:r,startTimestamp:Date.now(),xhr:this}),n.apply(this,r)}})}();break;case"fetch":!function(){if(!function(){if(!Y())return!1;const t=T();if(Z(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=Z(t.contentWindow.fetch)),n.head.removeChild(t)}catch(t){L.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return e}())return;P(et,"fetch",function(t){return function(...e){const n={args:e,fetchData:{method:ct(e),url:ut(e)},startTimestamp:Date.now()};return ot("fetch",Object.assign({},n)),t.apply(et,e).then(t=>(ot("fetch",Object.assign(Object.assign({},n),{endTimestamp:Date.now(),response:t})),t),t=>{throw ot("fetch",Object.assign(Object.assign({},n),{endTimestamp:Date.now(),error:t})),t})}})}();break;case"history":!function(){if(!function(){const t=T(),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=et.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=at,e=String(n);at=e,ot("history",{from:t,to:e})}return t.apply(this,e)}}et.onpopstate=function(...e){const n=et.location.href,r=at;if(at=n,ot("history",{from:r,to:n}),t)try{return t.apply(this,e)}catch(t){}},P(et.history,"pushState",e),P(et.history,"replaceState",e)}();break;case"error":pt=et.onerror,et.onerror=function(t,e,n,r,i){return ot("error",{column:r,error:i,line:n,msg:t,url:e}),!!pt&&pt.apply(this,arguments)};break;case"unhandledrejection":bt=et.onunhandledrejection,et.onunhandledrejection=function(t){return ot("unhandledrejection",t),!bt||bt.apply(this,arguments)};break;default:L.warn("unknown instrumentation type:",t)}}function st(t){t&&"string"==typeof t.type&&"function"==typeof t.callback&&(nt[t.type]=nt[t.type]||[],nt[t.type].push(t.callback),it(t.type))}function ot(t,e){if(t&&nt[t])for(const n of nt[t]||[])try{n(e)}catch(e){L.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${H(n)}\nError: ${e}`)}}function ct(t=[]){return"Request"in et&&v(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function ut(t=[]){return"string"==typeof t[0]?t[0]:"Request"in et&&v(t[0],Request)?t[0].url:String(t[0])}let at;const ht=1e3;let lt,ft;function dt(t,e=!1){return n=>{if(!n||ft===n)return;if(function(t){if("keypress"!==t.type)return!1;try{const e=t.target;if(!e||!e.tagName)return!0;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)return!1}catch(t){}return!0}(n))return;const r="keypress"===n.type?"input":n.type;void 0===lt?(t({event:n,name:r,global:e}),ft=n):function(t,e){if(!t)return!0;if(t.type!==e.type)return!0;try{if(t.target!==e.target)return!0}catch(t){}return!1}(ft,n)&&(t({event:n,name:r,global:e}),ft=n),clearTimeout(lt),lt=et.setTimeout(()=>{lt=void 0},ht)}}let pt=null;let bt=null;var vt;!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(vt||(vt={}));class yt{constructor(t){this.p=vt.PENDING,this.v=[],this.m=(t=>{this.g(vt.RESOLVED,t)}),this.j=(t=>{this.g(vt.REJECTED,t)}),this.g=((t,e)=>{this.p===vt.PENDING&&(b(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===vt.PENDING)return;const t=this.v.slice();this.v=[],t.forEach(t=>{t.done||(this.p===vt.RESOLVED&&t.onfulfilled&&t.onfulfilled(this.O),this.p===vt.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 yt(e=>{e(t)})}static reject(t){return new yt((e,n)=>{n(t)})}static all(t){return new yt((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)=>{yt.resolve(t).then(t=>{i[s]=t,0===(r-=1)&&e(i)}).then(null,n)})})}then(t,e){return new yt((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 yt((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 mt{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):yt.reject(new j("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 yt(e=>{const n=setTimeout(()=>{t&&t>0&&e(!1)},t);yt.all(this.k).then(()=>{clearTimeout(n),e(!0)}).then(null,()=>{e(!0)})})}}const gt={nowSeconds:()=>Date.now()/1e3};const jt=_()?function(){try{return(t=module,e="perf_hooks",t.require(e)).performance}catch(t){return}var t,e}():function(){const{performance:t}=T();if(t&&t.now)return{now:()=>t.now(),timeOrigin:Date.now()-t.now()}}(),wt=void 0===jt?gt:{nowSeconds:()=>(jt.timeOrigin+jt.now())/1e3},Ot=gt.nowSeconds.bind(gt),Et=wt.nowSeconds.bind(wt),_t=((()=>{const{performance:t}=T();if(!t||!t.now)return;const e=t.now(),n=Date.now(),r=t.timeOrigin?Math.abs(t.timeOrigin+e-n):36e5,i=r<36e5,s=t.timing&&t.timing.navigationStart,o="number"==typeof s?Math.abs(s+e-n):36e5;(i||o<36e5)&&(r<=o&&t.timeOrigin)})(),100);class $t{constructor(){this.T=!1,this.R=[],this.D=[],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.q=t.q,e.L=t.L,e.F=t.F,e.B=t.B,e.D=[...t.D],e.H=t.H),e}addScopeListener(t){this.R.push(t)}addEventProcessor(t){return this.D.push(t),this}setUser(t){return this.N=t||{},this.L&&this.L.update({user:t}),this.P(),this}getUser(){return this.N}getRequestSession(){return this.H}setRequestSession(t){return this.H=t,this}setTags(t){return this.C=Object.assign(Object.assign({},this.C),t),this.P(),this}setTag(t,e){return this.C=Object.assign(Object.assign({},this.C),{[t]:e}),this.P(),this}setExtras(t){return this.M=Object.assign(Object.assign({},this.M),t),this.P(),this}setExtra(t,e){return this.M=Object.assign(Object.assign({},this.M),{[t]:e}),this.P(),this}setFingerprint(t){return this.B=t,this.P(),this}setLevel(t){return this.U=t,this.P(),this}setTransactionName(t){return this.F=t,this.P(),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.P(),this}setSpan(t){return this.q=t,this.P(),this}getSpan(){return this.q}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}setSession(t){return t?this.L=t:delete this.L,this.P(),this}getSession(){return this.L}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&&Object.keys(t.N).length&&(this.N=t.N),t.U&&(this.U=t.U),t.B&&(this.B=t.B),t.H&&(this.H=t.H)):f(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),t.requestSession&&(this.H=t.requestSession)),this}clear(){return this.I=[],this.C={},this.M={},this.N={},this.A={},this.U=void 0,this.F=void 0,this.B=void 0,this.H=void 0,this.q=void 0,this.L=void 0,this.P(),this}addBreadcrumb(t,e){const n="number"==typeof e?Math.min(e,_t):_t;if(n<=0)return this;const r=Object.assign({timestamp:Ot()},t);return this.I=[...this.I,r].slice(-n),this.P(),this}clearBreadcrumbs(){return this.I=[],this.P(),this}applyToEvent(t,e){var n;if(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.F&&(t.transaction=this.F),this.q){t.contexts=Object.assign({trace:this.q.getTraceContext()},t.contexts);const e=null===(n=this.q.transaction)||void 0===n?void 0:n.name;e&&(t.tags=Object.assign({transaction:e},t.tags))}return this.W(t),t.breadcrumbs=[...t.breadcrumbs||[],...this.I],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,this.X([...xt(),...this.D],t,e)}X(t,e,n,r=0){return new yt((i,s)=>{const o=t[r];if(null===e||"function"!=typeof o)i(e);else{const c=o(Object.assign({},e),n);b(c)?c.then(e=>this.X(t,e,n,r+1).then(i)).then(null,s):this.X(t,c,n,r+1).then(i).then(null,s)}})}P(){this.T||(this.T=!0,this.R.forEach(t=>{t(this)}),this.T=!1)}W(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=T();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=R(),this.duration=0,this.status=n.Ok,this.init=!0,this.ignoreDuration=!1;const e=Et();this.timestamp=e,this.started=e,t&&this.update(t)}update(t={}){if(t.user&&(!this.ipAddress&&t.user.ip_address&&(this.ipAddress=t.user.ip_address),this.did||t.did||(this.did=t.user.id||t.user.email||t.user.username)),this.timestamp=t.timestamp||Et(),t.ignoreDuration&&(this.ignoreDuration=t.ignoreDuration),t.sid&&(this.sid=32===t.sid.length?t.sid:R()),void 0!==t.init&&(this.init=t.init),!this.did&&t.did&&(this.did=`${t.did}`),"number"==typeof t.started&&(this.started=t.started),this.ignoreDuration)this.duration=void 0;else if("number"==typeof t.duration)this.duration=t.duration;else{const t=this.timestamp-this.started;this.duration=t>=0?t:0}t.release&&(this.release=t.release),t.environment&&(this.environment=t.environment),!this.ipAddress&&t.ipAddress&&(this.ipAddress=t.ipAddress),!this.userAgent&&t.userAgent&&(this.userAgent=t.userAgent),"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}):this.update()}toJSON(){return Q({sid:`${this.sid}`,init:this.init,started:new Date(1e3*this.started).toISOString(),timestamp:new Date(1e3*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:Q({release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent})})}}const Tt=4,Rt=100;class Dt{constructor(t,e=new $t,n=Tt){this.J=n,this.G=[{}],this.getStackTop().scope=e,this.bindClient(t)}isOlderThan(t){return this.J<t}bindClient(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=$t.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return!(this.getStack().length<=1)&&!!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.G}getStackTop(){return this.G[this.G.length-1]}captureException(t,e){const n=this.K=R();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.K=R();let i=n;if(!n){let e;try{throw new Error(t)}catch(t){e=t}i={originalException:t,syntheticException:e}}return this.V("captureMessage",t,e,Object.assign(Object.assign({},i),{event_id:r})),r}captureEvent(t,e){const n=this.K=R();return this.V("captureEvent",t,Object.assign(Object.assign({},e),{event_id:n})),n}lastEventId(){return this.K}addBreadcrumb(t,e){const{scope:n,client:r}=this.getStackTop();if(!n||!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=Rt}=r.getOptions&&r.getOptions()||{};if(s<=0)return;const o=Ot(),c=Object.assign({timestamp:o},t),u=i?N(()=>i(c,e)):c;null!==u&&n.addBreadcrumb(u,s)}setUser(t){const e=this.getScope();e&&e.setUser(t)}setTags(t){const e=this.getScope();e&&e.setTags(t)}setExtras(t){const e=this.getScope();e&&e.setExtras(t)}setTag(t,e){const n=this.getScope();n&&n.setTag(t,e)}setExtra(t,e){const n=this.getScope();n&&n.setExtra(t,e)}setContext(t,e){const n=this.getScope();n&&n.setContext(t,e)}configureScope(t){const{scope:e,client:n}=this.getStackTop();e&&n&&t(e)}run(t){const e=Nt(this);try{t(this)}finally{Nt(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return L.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startSpan(t){return this.Y("startSpan",t)}startTransaction(t,e){return this.Y("startTransaction",t,e)}traceHeaders(){return this.Y("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this.Z()}endSession(){var t,e,n,r,i;null===(n=null===(e=null===(t=this.getStackTop())||void 0===t?void 0:t.scope)||void 0===e?void 0:e.getSession())||void 0===n||n.close(),this.Z(),null===(i=null===(r=this.getStackTop())||void 0===r?void 0:r.scope)||void 0===i||i.setSession()}startSession(t){const{scope:e,client:r}=this.getStackTop(),{release:i,environment:s}=r&&r.getOptions()||{},o=T(),{userAgent:c}=o.navigator||{},u=new kt(Object.assign(Object.assign(Object.assign({release:i,environment:s},e&&{user:e.getUser()}),c&&{userAgent:c}),t));if(e){const t=e.getSession&&e.getSession();t&&t.status===n.Ok&&t.update({status:n.Exited}),this.endSession(),e.setSession(u)}return u}Z(){const{scope:t,client:e}=this.getStackTop();if(!t)return;const n=t.getSession&&t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}V(t,...e){const{scope:n,client:r}=this.getStackTop();r&&r[t]&&r[t](...e,n)}Y(t,...e){const n=It().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);L.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function It(){const t=T();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function Nt(t){const e=It(),n=At(e);return Ut(e,t),n}function Ct(){const t=It();return Mt(t)&&!At(t).isOlderThan(Tt)||Ut(t,new Dt),_()?function(t){var e,n,r;try{const i=null===(r=null===(n=null===(e=It().__SENTRY__)||void 0===e?void 0:e.extensions)||void 0===n?void 0:n.domain)||void 0===r?void 0:r.active;if(!i)return At(t);if(!Mt(i)||At(i).isOlderThan(Tt)){const e=At(t).getStackTop();Ut(i,new Dt(e.client,$t.clone(e.scope)))}return At(i)}catch(e){return At(t)}}(t):At(t)}function Mt(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function At(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub?t.__SENTRY__.hub:(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new Dt,t.__SENTRY__.hub)}function Ut(t,e){return!!t&&(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=e,!0)}function qt(t,...e){const n=Ct();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 qt("captureException",t,{captureContext:e,originalException:t,syntheticException:n})}function Lt(t){qt("withScope",t)}const Ft="7";class Bt{constructor(t,e={},n){this.dsn=t,this.tt=new E(t),this.metadata=e,this.et=n}getDsn(){return this.tt}forceEnvelope(){return!!this.et}getBaseApiEndpoint(){const t=this.getDsn(),e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}getStoreEndpoint(){return this.nt("store")}getStoreEndpointWithUrlEncodedAuth(){return`${this.getStoreEndpoint()}?${this.rt()}`}getEnvelopeEndpointWithUrlEncodedAuth(){return this.forceEnvelope()?this.et:`${this.it()}?${this.rt()}`}getStoreEndpointPath(){const t=this.getDsn();return`${t.path?`/${t.path}`:""}/api/${t.projectId}/store/`}getRequestHeaders(t,e){const n=this.getDsn(),r=[`Sentry sentry_version=${Ft}`];return r.push(`sentry_client=${t}/${e}`),r.push(`sentry_key=${n.publicKey}`),n.pass&&r.push(`sentry_secret=${n.pass}`),{"Content-Type":"application/json","X-Sentry-Auth":r.join(", ")}}getReportDialogEndpoint(t={}){const e=this.getDsn(),n=`${this.getBaseApiEndpoint()}embed/error-page/`,r=[];r.push(`dsn=${e.toString()}`);for(const e in t)if("dsn"!==e)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}it(){return this.nt("envelope")}nt(t){if(this.et)return this.et;return`${this.getBaseApiEndpoint()}${this.getDsn().projectId}/${t}/`}rt(){const t={sentry_key:this.getDsn().publicKey,sentry_version:Ft};return e=t,Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&");var e}}const Ht=[];function Pt(t){return t.reduce((t,e)=>(t.every(t=>e.name!==t.name)&&t.push(e),t),[])}function Wt(t){const e={};return function(t){const e=t.defaultIntegrations&&[...t.defaultIntegrations]||[],n=t.integrations;let r=[...Pt(e)];Array.isArray(n)?r=[...r.filter(t=>n.every(e=>e.name!==t.name)),...Pt(n)]:"function"==typeof n&&(r=n(r),r=Array.isArray(r)?r:[r]);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===Ht.indexOf(t.name)&&(t.setupOnce(St,Ct),Ht.push(t.name),L.log(`Integration installed: ${t.name}`))}(t)}),e}class Xt{constructor(t,e){this.st={},this.ot=0,this.ct=new t(e),this.ut=e,e.dsn&&(this.at=new E(e.dsn))}captureException(t,e,n){let r=e&&e.event_id;return this.ht(this.lt().eventFromException(t,e).then(t=>this.ft(t,e,n)).then(t=>{r=t})),r}captureMessage(t,e,n,r){let i=n&&n.event_id;const s=l(t)?this.lt().eventFromMessage(String(t),e,n):this.lt().eventFromException(t,n);return this.ht(s.then(t=>this.ft(t,n,r)).then(t=>{i=t})),i}captureEvent(t,e,n){let r=e&&e.event_id;return this.ht(this.ft(t,e,n).then(t=>{r=t})),r}captureSession(t){this.dt()?"string"!=typeof t.release?L.warn("Discarded session because of missing or non-string release"):(this.pt(t),t.update({init:!1})):L.warn("SDK not enabled, will not capture session.")}getDsn(){return this.at}getOptions(){return this.ut}flush(t){return this.bt(t).then(e=>this.lt().getTransport().close(t).then(t=>e&&t))}close(t){return this.flush(t).then(t=>(this.getOptions().enabled=!1,t))}setupIntegrations(){this.dt()&&(this.st=Wt(this.ut))}getIntegration(t){try{return this.st[t.id]||null}catch(e){return L.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}vt(t,e){let r=!1,i=!1;const s=e.exception&&e.exception.values;if(s){i=!0;for(const t of s){const e=t.mechanism;if(e&&!1===e.handled){r=!0;break}}}const o=t.status===n.Ok;(o&&0===t.errors||o&&r)&&(t.update(Object.assign(Object.assign({},r&&{status:n.Crashed}),{errors:t.errors||Number(i||r)})),this.captureSession(t))}pt(t){this.lt().sendSession(t)}bt(t){return new yt(e=>{let n=0;const r=setInterval(()=>{0==this.ot?(clearInterval(r),e(!0)):(n+=1,t&&n>=t&&(clearInterval(r),e(!1)))},1)})}lt(){return this.ct}dt(){return!1!==this.getOptions().enabled&&void 0!==this.at}yt(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:R()),timestamp:t.timestamp||Ot()});this.gt(i),this.jt(i);let s=e;n&&n.captureContext&&(s=$t.clone(s).update(n.captureContext));let o=yt.resolve(i);return s&&(o=s.applyToEvent(i,n)),o.then(t=>"number"==typeof r&&r>0?this.wt(t,r):t)}wt(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:K(t.data,e)}))}),t.user&&{user:K(t.user,e)}),t.contexts&&{contexts:K(t.contexts,e)}),t.extra&&{extra:K(t.extra,e)});return t.contexts&&t.contexts.trace&&(n.contexts.trace=t.contexts.trace),n}gt(t){const e=this.getOptions(),{environment:n,release:r,dist:i,maxValueLength:s=250}=e;"environment"in t||(t.environment="environment"in e?n:"production"),void 0===t.release&&void 0!==r&&(t.release=r),void 0===t.dist&&void 0!==i&&(t.dist=i),t.message&&(t.message=$(t.message,s));const o=t.exception&&t.exception.values&&t.exception.values[0];o&&o.value&&(o.value=$(o.value,s));const c=t.request;c&&c.url&&(c.url=$(c.url,s))}jt(t){const e=Object.keys(this.st);e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}Ot(t){this.lt().sendEvent(t)}ft(t,e,n){return this.Et(t,e,n).then(t=>t.event_id,t=>{L.error(t)})}Et(t,e,n){const{beforeSend:r,sampleRate:i}=this.getOptions();if(!this.dt())return yt.reject(new j("SDK not enabled, will not capture event."));const s="transaction"===t.type;return!s&&"number"==typeof i&&Math.random()>i?yt.reject(new j(`Discarding event because it's not included in the random sample (sampling rate = ${i})`)):this.yt(t,n,e).then(t=>{if(null===t)throw new j("An event processor returned null, will not send event.");if(e&&e.data&&!0===e.data.__sentry__||s||!r)return t;const n=r(t,e);return this._t(n)}).then(t=>{if(null===t)throw new j("`beforeSend` returned `null`, will not send event.");const e=n&&n.getSession&&n.getSession();return!s&&e&&this.vt(e,t),this.Ot(t),t}).then(null,t=>{if(t instanceof j)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new j(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)})}ht(t){this.ot+=1,t.then(t=>(this.ot-=1,t),t=>(this.ot-=1,t))}_t(t){const e="`beforeSend` method has to return `null` or a valid event.";if(b(t))return t.then(t=>{if(!f(t)&&null!==t)throw new j(e);return t},t=>{throw new j(`beforeSend rejected with ${t}`)});if(!f(t)&&null!==t)throw new j(e);return t}}class Jt{sendEvent(e){return yt.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:t.Status.Skipped})}close(t){return yt.resolve(!0)}}class Gt{constructor(t){this.ut=t,this.ut.dsn||L.warn("No DSN provided, backend will not do anything."),this.$t=this.xt()}eventFromException(t,e){throw new j("Backend has to implement `eventFromException` method")}eventFromMessage(t,e,n){throw new j("Backend has to implement `eventFromMessage` method")}sendEvent(t){this.$t.sendEvent(t).then(null,t=>{L.error(`Error while sending event: ${t}`)})}sendSession(t){this.$t.sendSession?this.$t.sendSession(t).then(null,t=>{L.error(`Error while sending session: ${t}`)}):L.warn("Dropping session because custom transport doesn't implement sendSession")}getTransport(){return this.$t}xt(){return new Jt}}function zt(t){if(!t.metadata||!t.metadata.sdk)return;const{name:e,version:n}=t.metadata.sdk;return{name:e,version:n}}function Kt(t,e){return e?(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]],t):t}function Vt(t,e){const n=zt(e),r="aggregates"in t?"sessions":"session";return{body:`${JSON.stringify(Object.assign(Object.assign({sent_at:(new Date).toISOString()},n&&{sdk:n}),e.forceEnvelope()&&{dsn:e.getDsn().toString()}))}\n${JSON.stringify({type:r})}\n${JSON.stringify(t)}`,type:r,url:e.getEnvelopeEndpointWithUrlEncodedAuth()}}function Qt(t,e){const n=zt(e),r=t.type||"event",i="transaction"===r||e.forceEnvelope(),s=t.debug_meta||{},{transactionSampling:o}=s,c=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(n[r[i]]=t[r[i]])}return n}(s,["transactionSampling"]),{method:u,rate:a}=o||{};0===Object.keys(c).length?delete t.debug_meta:t.debug_meta=c;const h={body:JSON.stringify(n?Kt(t,e.metadata.sdk):t),type:r,url:i?e.getEnvelopeEndpointWithUrlEncodedAuth():e.getStoreEndpointWithUrlEncodedAuth()};if(i){const i=`${JSON.stringify(Object.assign(Object.assign({event_id:t.event_id,sent_at:(new Date).toISOString()},n&&{sdk:n}),e.forceEnvelope()&&{dsn:e.getDsn().toString()}))}\n${JSON.stringify({type:r,sample_rates:[{id:u,rate:a}]})}\n${h.body}`;h.body=i}return h}const Yt="6.7.2";let Zt;class te{constructor(){this.name=te.id}setupOnce(){Zt=Function.prototype.toString,Function.prototype.toString=function(...t){const e=this.__sentry_original__||this;return Zt.apply(e,t)}}}te.id="FunctionToString";const ee=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class ne{constructor(t={}){this.ut=t,this.name=ne.id}setupOnce(){St(t=>{const e=Ct();if(!e)return t;const n=e.getIntegration(ne);if(n){const r=e.getClient(),i=r?r.getOptions():{},s="function"==typeof n._mergeOptions?n._mergeOptions(i):{};return"function"!=typeof n.St?t:n.St(t,s)?null:t}return t})}St(t,e){return this.kt(t,e)?(L.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${I(t)}`),!0):this.Tt(t,e)?(L.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${I(t)}`),!0):this.Rt(t,e)?(L.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${I(t)}.\nUrl: ${this.Dt(t)}`),!0):!this.It(t,e)&&(L.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${I(t)}.\nUrl: ${this.Dt(t)}`),!0)}kt(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}}Tt(t,e){return!(!e.ignoreErrors||!e.ignoreErrors.length)&&this.Nt(t).some(t=>e.ignoreErrors.some(e=>S(t,e)))}Rt(t,e){if(!e.denyUrls||!e.denyUrls.length)return!1;const n=this.Dt(t);return!!n&&e.denyUrls.some(t=>S(n,t))}It(t,e){if(!e.allowUrls||!e.allowUrls.length)return!0;const n=this.Dt(t);return!n||e.allowUrls.some(t=>S(n,t))}_mergeOptions(t={}){return{allowUrls:[...this.ut.whitelistUrls||[],...this.ut.allowUrls||[],...t.whitelistUrls||[],...t.allowUrls||[]],denyUrls:[...this.ut.blacklistUrls||[],...this.ut.denyUrls||[],...t.blacklistUrls||[],...t.denyUrls||[]],ignoreErrors:[...this.ut.ignoreErrors||[],...t.ignoreErrors||[],...ee],ignoreInternal:void 0===this.ut.ignoreInternal||this.ut.ignoreInternal}}Nt(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 L.error(`Cannot extract message for event ${I(t)}`),[]}return[]}Dt(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 L.error(`Cannot extract url for event ${I(t)}`),null}}}ne.id="InboundFilters";var re=Object.freeze({__proto__:null,FunctionToString:te,InboundFilters:ne});const ie="?",se=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,oe=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. \/=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ce=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ue=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ae=/\((\S*)(?::(\d+))(?::(\d+))\)/,he=/Minified React error #\d+;/i;function le(t){let e=null,n=0;t&&("number"==typeof t.framesToPop?n=t.framesToPop:he.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=ie),s.push(e))}if(!s.length)return null;return{message:de(t),name:t.name,stack:s}}(t))return fe(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=se.exec(n[c])){const t=s[2]&&0===s[2].indexOf("native");(r=s[2]&&0===s[2].indexOf("eval"))&&(i=ae.exec(s[2]))&&(s[2]=i[1],s[3]=i[2],s[4]=i[3]);let e=s[2]&&0===s[2].indexOf("address at ")?s[2].substr("address at ".length):s[2],n=s[1]||ie;const c=-1!==n.indexOf("safari-extension"),u=-1!==n.indexOf("safari-web-extension");(c||u)&&(n=-1!==n.indexOf("@")?n.split("@")[0]:ie,e=c?`safari-extension:${e}`:`safari-web-extension:${e}`),o={url:e,func:n,args:t?[s[2]]:[],line:s[3]?+s[3]:null,column:s[4]?+s[4]:null}}else if(s=ce.exec(n[c]))o={url:s[2],func:s[1]||ie,args:[],line:+s[3],column:s[4]?+s[4]:null};else{if(!(s=oe.exec(n[c])))continue;(r=s[3]&&s[3].indexOf(" > eval")>-1)&&(i=ue.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]||ie,args:s[2]?s[2].split(","):[],line:s[4]?+s[4]:null,column:s[5]?+s[5]:null}}!o.func&&o.line&&(o.func=ie),e.push(o)}if(!e.length)return null;return{message:de(t),name:t.name,stack:e}}(t))return fe(e,n)}catch(t){}return{message:de(t),name:t&&t.name,stack:[],failed:!0}}function fe(t,e){try{return Object.assign(Object.assign({},t),{stack:t.stack.slice(e)})}catch(e){return t}}function de(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}const pe=50;function be(t){const e=ye(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 ve(t){return{exception:{values:[be(t)]}}}function ye(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,pe).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 me(e,n,r){const i=je(n,r&&r.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return M(i,{handled:!0,type:"generic"}),i.level=t.Severity.Error,r&&r.event_id&&(i.event_id=r.event_id),yt.resolve(i)}function ge(e,n,r=t.Severity.Info,i){const s=we(n,i&&i.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return s.level=r,i&&i.event_id&&(s.event_id=i.event_id),yt.resolve(s)}function je(t,e,n={}){let r;if(u(t)&&t.error){return r=ve(le(t=t.error))}if(a(t)||(i=t,"[object DOMException]"===Object.prototype.toString.call(i))){const i=t,s=i.name||(a(i)?"DOMError":"DOMException"),o=i.message?`${s}: ${i.message}`:s;return C(r=we(o,e,n),o),"code"in i&&(r.tags=Object.assign(Object.assign({},r.tags),{"DOMException.code":`${i.code}`})),r}var i;if(c(t))return r=ve(le(t));if(f(t)||d(t)){return M(r=function(t,e,n){const r={exception:{values:[{type:d(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:`Non-Error ${n?"promise rejection":"exception"} captured with keys: ${V(t)}`}]},extra:{__serialized__:J(t)}};if(e){const t=ye(le(e).stack);r.stacktrace={frames:t}}return r}(t,e,n.rejection),{synthetic:!0}),r}return C(r=we(t,e,n),`${t}`,void 0),M(r,{synthetic:!0}),r}function we(t,e,n={}){const r={message:t};if(n.attachStacktrace&&e){const t=ye(le(e).stack);r.stacktrace={frames:t}}return r}const Oe={event:"error",transaction:"transaction",session:"session",attachment:"attachment"};class Ee{constructor(t){this.options=t,this.k=new mt(30),this.Ct={},this.Mt=new Bt(t.dsn,t.At,t.tunnel),this.url=this.Mt.getStoreEndpointWithUrlEncodedAuth()}sendEvent(t){throw new j("Transport Class has to implement `sendEvent` method")}close(t){return this.k.drain(t)}Ut({requestType:e,response:n,headers:r,resolve:i,reject:s}){const o=t.Status.fromHttpCode(n.status);this.qt(r)&&L.warn(`Too many ${e} requests, backing off until: ${this.Lt(e)}`),o!==t.Status.Success?s(n):i({status:o})}Lt(t){const e=Oe[t];return this.Ct[e]||this.Ct.all}Ft(t){return this.Lt(t)>new Date(Date.now())}qt(t){const e=Date.now(),n=t["x-sentry-rate-limits"],r=t["retry-after"];if(n){for(const t of n.trim().split(",")){const n=t.split(":",2),r=parseInt(n[0],10),i=1e3*(isNaN(r)?60:r);for(const t of n[1].split(";"))this.Ct[t||"all"]=new Date(e+i)}return!0}return!!r&&(this.Ct.all=new Date(e+function(t,e){if(!e)return A;const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?A:r-t}(e,r)),!0)}}class _e extends Ee{constructor(t,e=function(){var t,e;const n=T();if(Z(n.fetch))return n.fetch.bind(n);const r=n.document;let i=n.fetch;if("function"==typeof(null===(t=r)||void 0===t?void 0:t.createElement))try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t),(null===(e=t.contentWindow)||void 0===e?void 0:e.fetch)&&(i=t.contentWindow.fetch),r.head.removeChild(t)}catch(t){L.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return i.bind(n)}()){super(t),this.Bt=e}sendEvent(t){return this.Ht(Qt(t,this.Mt),t)}sendSession(t){return this.Ht(Vt(t,this.Mt),t)}Ht(t,e){if(this.Ft(t.type))return Promise.reject({event:e,type:t.type,reason:`Transport for ${t.type} requests locked till ${this.Lt(t.type)} due to too many requests.`,status:429});const n={body:t.body,method:"POST",referrerPolicy:tt()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(n,this.options.fetchParameters),void 0!==this.options.headers&&(n.headers=this.options.headers),this.k.add(new yt((e,r)=>{this.Bt(t.url,n).then(n=>{const i={"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")};this.Ut({requestType:t.type,response:n,headers:i,resolve:e,reject:r})}).catch(r)}))}}class $e extends Ee{sendEvent(t){return this.Ht(Qt(t,this.Mt),t)}sendSession(t){return this.Ht(Vt(t,this.Mt),t)}Ht(t,e){return this.Ft(t.type)?Promise.reject({event:e,type:t.type,reason:`Transport for ${t.type} requests locked till ${this.Lt(t.type)} due to too many requests.`,status:429}):this.k.add(new yt((e,n)=>{const r=new XMLHttpRequest;r.onreadystatechange=(()=>{if(4===r.readyState){const i={"x-sentry-rate-limits":r.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":r.getResponseHeader("Retry-After")};this.Ut({requestType:t.type,response:r,headers:i,resolve:e,reject:n})}}),r.open("POST",t.url);for(const t in this.options.headers)this.options.headers.hasOwnProperty(t)&&r.setRequestHeader(t,this.options.headers[t]);r.send(t.body)}))}}var xe=Object.freeze({__proto__:null,BaseTransport:Ee,FetchTransport:_e,XHRTransport:$e});class Se extends Gt{eventFromException(t,e){return me(this.ut,t,e)}eventFromMessage(e,n=t.Severity.Info,r){return ge(this.ut,e,n,r)}xt(){if(!this.ut.dsn)return super.xt();const t=Object.assign(Object.assign({},this.ut.transportOptions),{dsn:this.ut.dsn,tunnel:this.ut.tunnel,At:this.ut.At});return this.ut.transport?new this.ut.transport(t):Y()?new _e(t):new $e(t)}}let ke=0;function Te(){return ke>0}function Re(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=>Re(t,e));return t.handleEvent?t.handleEvent.apply(this,i):t.apply(this,i)}catch(t){throw ke+=1,setTimeout(()=>{ke-=1}),Lt(n=>{n.addEventProcessor(t=>{const n=Object.assign({},t);return e.mechanism&&(C(n,void 0,void 0),M(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 De(t={}){if(!t.eventId)return void L.error("Missing eventId option in showReportDialog call");if(!t.dsn)return void L.error("Missing dsn option in showReportDialog call");const e=document.createElement("script");e.async=!0,e.src=new Bt(t.dsn).getReportDialogEndpoint(t),t.onLoad&&(e.onload=t.onLoad),(document.head||document.body).appendChild(e)}class Ie{constructor(t){this.name=Ie.id,this.Pt=!1,this.Wt=!1,this.ut=Object.assign({onerror:!0,onunhandledrejection:!0},t)}setupOnce(){Error.stackTraceLimit=50,this.ut.onerror&&(L.log("Global Handler attached: onerror"),this.Xt()),this.ut.onunhandledrejection&&(L.log("Global Handler attached: onunhandledrejection"),this.Jt())}Xt(){this.Pt||(st({callback:t=>{const e=t.error,n=Ct(),r=n.getIntegration(Ie),i=e&&!0===e.__sentry_own_request__;if(!r||Te()||i)return;const s=n.getClient(),o=l(e)?this.Gt(t.msg,t.url,t.line,t.column):this.zt(je(e,void 0,{attachStacktrace:s&&s.getOptions().attachStacktrace,rejection:!1}),t.url,t.line,t.column);M(o,{handled:!1,type:"onerror"}),n.captureEvent(o,{originalException:e})},type:"error"}),this.Pt=!0)}Jt(){this.Wt||(st({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=Ct(),i=r.getIntegration(Ie),s=n&&!0===n.__sentry_own_request__;if(!i||Te()||s)return!0;const o=r.getClient(),c=l(n)?this.Kt(n):je(n,void 0,{attachStacktrace:o&&o.getOptions().attachStacktrace,rejection:!0});c.level=t.Severity.Error,M(c,{handled:!1,type:"onunhandledrejection"}),r.captureEvent(c,{originalException:n})},type:"unhandledrejection"}),this.Wt=!0)}Gt(t,e,n,r){const i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let s,o=u(t)?t.message:t;if(h(o)){const t=o.match(i);t&&(s=t[1],o=t[2])}const c={exception:{values:[{type:s||"Error",value:o}]}};return this.zt(c,e,n,r)}Kt(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}zt(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=h(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}}Ie.id="GlobalHandlers";const Ne=["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 Ce{constructor(t){this.name=Ce.id,this.ut=Object.assign({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t)}setupOnce(){const t=T();if(this.ut.setTimeout&&P(t,"setTimeout",this.Vt.bind(this)),this.ut.setInterval&&P(t,"setInterval",this.Vt.bind(this)),this.ut.requestAnimationFrame&&P(t,"requestAnimationFrame",this.Qt.bind(this)),this.ut.XMLHttpRequest&&"XMLHttpRequest"in t&&P(XMLHttpRequest.prototype,"send",this.Yt.bind(this)),this.ut.eventTarget){(Array.isArray(this.ut.eventTarget)?this.ut.eventTarget:Ne).forEach(this.Zt.bind(this))}}Vt(t){return function(...e){const n=e[0];return e[0]=Re(n,{mechanism:{data:{function:H(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}Qt(t){return function(e){return t.call(this,Re(e,{mechanism:{data:{function:"requestAnimationFrame",handler:H(t)},handled:!0,type:"instrument"}}))}}Zt(t){const e=T(),n=e[t]&&e[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(P(n,"addEventListener",function(e){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=Re(r.handleEvent.bind(r),{mechanism:{data:{function:"handleEvent",handler:H(r),target:t},handled:!0,type:"instrument"}}))}catch(t){}return e.call(this,n,Re(r,{mechanism:{data:{function:"addEventListener",handler:H(r),target:t},handled:!0,type:"instrument"}}),i)}}),P(n,"removeEventListener",function(t){return function(e,n,r){var i;const s=n;try{const n=null===(i=s)||void 0===i?void 0:i.__sentry_wrapped__;n&&t.call(this,e,n,r)}catch(t){}return t.call(this,e,s,r)}}))}Yt(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(t=>{t in n&&"function"==typeof n[t]&&P(n,t,function(e){const n={mechanism:{data:{function:t,handler:H(e)},handled:!0,type:"instrument"}};return e.__sentry_original__&&(n.mechanism.data.handler=H(e.__sentry_original__)),Re(e,n)})}),t.apply(this,e)}}}Ce.id="TryCatch";class Me{constructor(t){this.name=Me.id,this.ut=Object.assign({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}addSentryBreadcrumb(t){this.ut.sentry&&Ct().addBreadcrumb({category:`sentry.${"transaction"===t.type?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:I(t)},{event:t})}setupOnce(){this.ut.console&&st({callback:(...t)=>{this.te(...t)},type:"console"}),this.ut.dom&&st({callback:(...t)=>{this.ee(...t)},type:"dom"}),this.ut.xhr&&st({callback:(...t)=>{this.ne(...t)},type:"xhr"}),this.ut.fetch&&st({callback:(...t)=>{this.re(...t)},type:"fetch"}),this.ut.history&&st({callback:(...t)=>{this.ie(...t)},type:"history"})}te(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)}Ct().addBreadcrumb(n,{input:e.args,level:e.level})}ee(t){let e;const n="object"==typeof this.ut.dom?this.ut.dom.serializeAttribute:void 0;try{e=t.event.target?y(t.event.target,n):y(t.event,n)}catch(t){e="<unknown>"}0!==e.length&&Ct().addBreadcrumb({category:`ui.${t.name}`,message:e},{event:t.event,name:t.name,global:t.global})}ne(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__||{};Ct().addBreadcrumb({category:"xhr",data:{method:e,url:n,status_code:r},type:"http"},{xhr:t.xhr,input:i})}else;}re(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?Ct().addBreadcrumb({category:"fetch",data:e.fetchData,level:t.Severity.Error,type:"http"},{data:e.error,input:e.args}):Ct().addBreadcrumb({category:"fetch",data:Object.assign(Object.assign({},e.fetchData),{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response})))}ie(t){const e=T();let n=t.from,r=t.to;const i=D(e.location.href);let s=D(n);const o=D(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),Ct().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}}Me.id="Breadcrumbs";const Ae="cause",Ue=5;class qe{constructor(t={}){this.name=qe.id,this.se=t.key||Ae,this.S=t.limit||Ue}setupOnce(){St((t,e)=>{const n=Ct().getIntegration(qe);return n?n.oe(t,e):t})}oe(t,e){if(!(t.exception&&t.exception.values&&e&&v(e.originalException,Error)))return t;const n=this.ce(e.originalException,this.se);return t.exception.values=[...n,...t.exception.values],t}ce(t,e,n=[]){if(!v(t[e],Error)||n.length+1>=this.S)return n;const r=be(le(t[e]));return this.ce(t[e],e,[r,...n])}}qe.id="LinkedErrors";const Le=T();class Fe{constructor(){this.name=Fe.id}setupOnce(){St(t=>{var e,n,r;if(Ct().getIntegration(Fe)){if(!Le.navigator&&!Le.location&&!Le.document)return t;const i=(null===(e=t.request)||void 0===e?void 0:e.url)||(null===(n=Le.location)||void 0===n?void 0:n.href),{referrer:s}=Le.document||{},{userAgent:o}=Le.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})}}Fe.id="UserAgent";var Be=Object.freeze({__proto__:null,GlobalHandlers:Ie,TryCatch:Ce,Breadcrumbs:Me,LinkedErrors:qe,UserAgent:Fe});class He extends Xt{constructor(t={}){t.At=t.At||{},t.At.sdk=t.At.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:Yt}],version:Yt},super(Se,t)}showReportDialog(t={}){T().document&&(this.dt()?De(Object.assign(Object.assign({},t),{dsn:t.dsn||this.getDsn()})):L.error("Trying to call showReportDialog with Sentry Client disabled"))}yt(t,e,n){return t.platform=t.platform||"javascript",super.yt(t,e,n)}Ot(t){const e=this.getIntegration(Me);e&&e.addSentryBreadcrumb(t),super.Ot(t)}}const Pe=[new ne,new te,new Ce,new Me,new Ie,new qe,new Fe];let We={};const Xe=T();Xe.Sentry&&Xe.Sentry.Integrations&&(We=Xe.Sentry.Integrations);const Je=Object.assign(Object.assign(Object.assign({},We),re),Be);return t.BrowserClient=He,t.Hub=Dt,t.Integrations=Je,t.SDK_NAME="sentry.javascript.browser",t.SDK_VERSION=Yt,t.Scope=$t,t.Transports=xe,t.addBreadcrumb=function(t){qt("addBreadcrumb",t)},t.addGlobalEventProcessor=St,t.captureEvent=function(t){return qt("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 qt("captureMessage",t,"string"==typeof e?e:void 0,Object.assign({originalException:t,syntheticException:n},r))},t.close=function(t){const e=Ct().getClient();return e?e.close(t):yt.reject(!1)},t.configureScope=function(t){qt("configureScope",t)},t.defaultIntegrations=Pe,t.eventFromException=me,t.eventFromMessage=ge,t.flush=function(t){const e=Ct().getClient();return e?e.flush(t):yt.reject(!1)},t.forceLoad=function(){},t.getCurrentHub=Ct,t.getHubFromCarrier=At,t.init=function(t={}){if(void 0===t.defaultIntegrations&&(t.defaultIntegrations=Pe),void 0===t.release){const e=T();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),function(t,e){var n;!0===e.debug&&L.enable();const r=Ct();null===(n=r.getScope())||void 0===n||n.update(e.initialScope);const i=new t(e);r.bindClient(i)}(He,t),t.autoSessionTracking&&function(){if(void 0===T().document)return void L.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");const t=Ct();"function"==typeof t.startSession&&"function"==typeof t.captureSession&&(t.startSession({ignoreDuration:!0}),t.captureSession(),st({callback:({from:e,to:n})=>{void 0!==e&&e!==n&&(t.startSession({ignoreDuration:!0}),t.captureSession())},type:"history"}))}()},t.injectReportDialog=De,t.lastEventId=function(){return Ct().lastEventId()},t.makeMain=Nt,t.onLoad=function(t){t()},t.setContext=function(t,e){qt("setContext",t,e)},t.setExtra=function(t,e){qt("setExtra",t,e)},t.setExtras=function(t){qt("setExtras",t)},t.setTag=function(t,e){qt("setTag",t,e)},t.setTags=function(t){qt("setTags",t)},t.setUser=function(t){qt("setUser",t)},t.showReportDialog=function(t={}){t.eventId||(t.eventId=Ct().lastEventId());const e=Ct().getClient();e&&e.showReportDialog(t)},t.startTransaction=function(t,e){return qt("startTransaction",Object.assign({},t),e)},t.withScope=Lt,t.wrap=function(t){return Re(t)()},t}({});
|
|
1
|
+
/*! @sentry/browser 6.8.0 (e93d96f) | https://github.com/getsentry/sentry-javascript */
|
|
2
|
+
var Sentry=function(t){var e,n,r,i,s,o;function c(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return v(t,Error)}}function u(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)}function a(t){return"[object DOMError]"===Object.prototype.toString.call(t)}function h(t){return"[object String]"===Object.prototype.toString.call(t)}function l(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function f(t){return"[object Object]"===Object.prototype.toString.call(t)}function d(t){return"undefined"!=typeof Event&&v(t,Event)}function p(t){return"undefined"!=typeof Element&&v(t,Element)}function b(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function v(t,e){try{return t instanceof e}catch(t){return!1}}function y(t,e){try{let n=t;const r=5,i=80,s=[];let o=0,c=0;const u=" > ",a=u.length;let h;for(;n&&o++<r&&!("html"===(h=m(n,e))||o>1&&c+s.length*a+h.length>=i);)s.push(h),c+=h.length,n=n.parentNode;return s.reverse().join(u)}catch(t){return"<unknown>"}}function m(t,e){var n,r;const i=t,s=[];let o,c,u,a,l;if(!i||!i.tagName)return"";s.push(i.tagName.toLowerCase());const f=(null===(n=e)||void 0===n?void 0:n.length)?e.filter(t=>i.getAttribute(t)).map(t=>[t,i.getAttribute(t)]):null;if(null===(r=f)||void 0===r?void 0:r.length)f.forEach(t=>{s.push(`[${t[0]}="${t[1]}"]`)});else if(i.id&&s.push(`#${i.id}`),(o=i.className)&&h(o))for(c=o.split(/\s+/),l=0;l<c.length;l++)s.push(`.${c[l]}`);const d=["type","name","title","alt"];for(l=0;l<d.length;l++)u=d[l],(a=i.getAttribute(u))&&s.push(`[${u}="${a}"]`);return s.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={})),function(t){t.Ok="ok",t.Errored="errored",t.Crashed="crashed"}(r||(r={})),(i=t.Severity||(t.Severity={})).Fatal="fatal",i.Error="error",i.Warning="warning",i.Log="log",i.Info="info",i.Debug="debug",i.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={})),function(t){t.Explicit="explicitly_set",t.Sampler="client_sampler",t.Rate="client_rate",t.Inheritance="inheritance"}(o||(o={}));const g=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 j extends Error{constructor(t){super(t),this.message=t,this.name=new.target.prototype.constructor.name,g(this,new.target.prototype)}}const w=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,O="Invalid Dsn";class E{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,publicKey:c}=this;return`${o}://${c}${t&&r?`:${r}`:""}`+`@${e}${i?`:${i}`:""}/${n?`${n}/`:n}${s}`}t(t){const e=w.exec(t);if(!e)throw new j(O);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,publicKey:r})}i(t){"user"in t&&!("publicKey"in t)&&(t.publicKey=t.user),this.user=t.publicKey||"",this.protocol=t.protocol,this.publicKey=t.publicKey||"",this.pass=t.pass||"",this.host=t.host,this.port=t.port||"",this.path=t.path||"",this.projectId=t.projectId}s(){if(["protocol","publicKey","host","projectId"].forEach(t=>{if(!this[t])throw new j(`${O}: ${t} missing`)}),!this.projectId.match(/^\d+$/))throw new j(`${O}: Invalid projectId ${this.projectId}`);if("http"!==this.protocol&&"https"!==this.protocol)throw new j(`${O}: Invalid protocol ${this.protocol}`);if(this.port&&isNaN(parseInt(this.port,10)))throw new j(`${O}: Invalid port ${this.port}`)}}function _(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}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!!h(t)&&(n=e,"[object RegExp]"===Object.prototype.toString.call(n)?e.test(t):"string"==typeof e&&-1!==t.indexOf(e));var n}const k={};function T(){return _()?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:k}function D(){const t=T(),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 R(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 I(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 N(t){const e=T();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 M(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 C(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 A=6e4;const U=T(),q="Sentry Logger ";U.__SENTRY__=U.__SENTRY__||{};const F=U.__SENTRY__.logger||(U.__SENTRY__.logger=new class{constructor(){this.o=!1}disable(){this.o=!1}enable(){this.o=!0}log(...t){this.o&&N(()=>{U.console.log(`${q}[Log]: ${t.join(" ")}`)})}warn(...t){this.o&&N(()=>{U.console.warn(`${q}[Warn]: ${t.join(" ")}`)})}error(...t){this.o&&N(()=>{U.console.error(`${q}[Error]: ${t.join(" ")}`)})}});class L{constructor(){this.u="function"==typeof WeakSet,this.h=this.u?new WeakSet:[]}memoize(t){if(this.u)return!!this.h.has(t)||(this.h.add(t),!1);for(let e=0;e<this.h.length;e++){if(this.h[e]===t)return!0}return this.h.push(t),!1}unmemoize(t){if(this.u)this.h.delete(t);else for(let e=0;e<this.h.length;e++)if(this.h[e]===t){this.h.splice(e,1);break}}}const B="<anonymous>";function H(t){try{return t&&"function"==typeof t&&t.name||B}catch(t){return B}}function P(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 W(t){if(c(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(d(t)){const e=t,n={};n.type=e.type;try{n.target=p(e.target)?y(e.target):Object.prototype.toString.call(e.target)}catch(t){n.target="<unknown>"}try{n.currentTarget=p(e.currentTarget)?y(e.currentTarget):Object.prototype.toString.call(e.currentTarget)}catch(t){n.currentTarget="<unknown>"}"undefined"!=typeof CustomEvent&&v(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 X(t){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}function J(t,e=3,n=102400){const r=K(t,e);return X(r)>n?J(t,e-1,n):r}function G(t,e){return"domain"===e&&t&&"object"==typeof t&&t.l?"[Domain]":"domainEmitter"===e?"[DomainEmitter]":"undefined"!=typeof global&&t===global?"[Global]":"undefined"!=typeof window&&t===window?"[Window]":"undefined"!=typeof document&&t===document?"[Document]":f(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: ${H(t)}]`:"symbol"==typeof t?`[${String(t)}]`:"bigint"==typeof t?`[BigInt: ${String(t)}]`:t;var n}function z(t,e,n=1/0,r=new L){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=G(t);return l(n)?n:e}(e);if(null!=e&&"function"==typeof e.toJSON)return e.toJSON();const i=G(e,t);if(l(i))return i;const s=W(e),o=Array.isArray(e)?[]:{};if(r.memoize(e))return"[Circular ~]";for(const t in s)Object.prototype.hasOwnProperty.call(s,t)&&(o[t]=z(t,s[t],n-1,r));return r.unmemoize(e),o}function K(t,e){try{return JSON.parse(JSON.stringify(t,(t,n)=>z(t,n,e)))}catch(t){return"**non-serializable**"}}function V(t,e=40){const n=Object.keys(W(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 Q(t){if(f(t)){const e=t,n={};for(const t of Object.keys(e))void 0!==e[t]&&(n[t]=Q(e[t]));return n}return Array.isArray(t)?t.map(Q):t}function Y(){if(!("fetch"in T()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function Z(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function tt(){if(!Y())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}const et=T(),nt={},rt={};function it(t){if(!rt[t])switch(rt[t]=!0,t){case"console":!function(){if(!("console"in et))return;["debug","info","warn","error","log","assert"].forEach(function(t){t in et.console&&P(et.console,t,function(e){return function(...n){ot("console",{args:n,level:t}),e&&Function.prototype.apply.call(e,et.console,n)}})})}();break;case"dom":!function(){if(!("document"in et))return;const t=ot.bind(null,"dom"),e=dt(t,!0);et.document.addEventListener("click",e,!1),et.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(e=>{const n=et[e]&&et[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(P(n,"addEventListener",function(e){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this,s=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},o=s[n]=s[n]||{refCount:0};if(!o.handler){const r=dt(t);o.handler=r,e.call(this,n,r,i)}o.refCount+=1}catch(t){}return e.call(this,n,r,i)}}),P(n,"removeEventListener",function(t){return function(e,n,r){if("click"===e||"keypress"==e)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},s=i[e];s&&(s.refCount-=1,s.refCount<=0&&(t.call(this,e,s.handler,r),s.handler=void 0,delete i[e]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch(t){}return t.call(this,e,n,r)}}))})}();break;case"xhr":!function(){if(!("XMLHttpRequest"in et))return;const t=[],e=[],n=XMLHttpRequest.prototype;P(n,"open",function(n){return function(...r){const i=this,s=r[1];i.__sentry_xhr__={method:h(r[0])?r[0].toUpperCase():r[0],url:r[1]},h(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){}ot("xhr",{args:r,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:i})}};return"onreadystatechange"in i&&"function"==typeof i.onreadystatechange?P(i,"onreadystatechange",function(t){return function(...e){return o(),t.apply(i,e)}}):i.addEventListener("readystatechange",o),n.apply(i,r)}}),P(n,"send",function(n){return function(...r){return t.push(this),e.push(r),ot("xhr",{args:r,startTimestamp:Date.now(),xhr:this}),n.apply(this,r)}})}();break;case"fetch":!function(){if(!function(){if(!Y())return!1;const t=T();if(Z(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=Z(t.contentWindow.fetch)),n.head.removeChild(t)}catch(t){F.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return e}())return;P(et,"fetch",function(t){return function(...e){const n={args:e,fetchData:{method:ct(e),url:ut(e)},startTimestamp:Date.now()};return ot("fetch",Object.assign({},n)),t.apply(et,e).then(t=>(ot("fetch",Object.assign(Object.assign({},n),{endTimestamp:Date.now(),response:t})),t),t=>{throw ot("fetch",Object.assign(Object.assign({},n),{endTimestamp:Date.now(),error:t})),t})}})}();break;case"history":!function(){if(!function(){const t=T(),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=et.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=at,e=String(n);at=e,ot("history",{from:t,to:e})}return t.apply(this,e)}}et.onpopstate=function(...e){const n=et.location.href,r=at;if(at=n,ot("history",{from:r,to:n}),t)try{return t.apply(this,e)}catch(t){}},P(et.history,"pushState",e),P(et.history,"replaceState",e)}();break;case"error":pt=et.onerror,et.onerror=function(t,e,n,r,i){return ot("error",{column:r,error:i,line:n,msg:t,url:e}),!!pt&&pt.apply(this,arguments)};break;case"unhandledrejection":bt=et.onunhandledrejection,et.onunhandledrejection=function(t){return ot("unhandledrejection",t),!bt||bt.apply(this,arguments)};break;default:F.warn("unknown instrumentation type:",t)}}function st(t){t&&"string"==typeof t.type&&"function"==typeof t.callback&&(nt[t.type]=nt[t.type]||[],nt[t.type].push(t.callback),it(t.type))}function ot(t,e){if(t&&nt[t])for(const n of nt[t]||[])try{n(e)}catch(e){F.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${H(n)}\nError: ${e}`)}}function ct(t=[]){return"Request"in et&&v(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function ut(t=[]){return"string"==typeof t[0]?t[0]:"Request"in et&&v(t[0],Request)?t[0].url:String(t[0])}let at;const ht=1e3;let lt,ft;function dt(t,e=!1){return n=>{if(!n||ft===n)return;if(function(t){if("keypress"!==t.type)return!1;try{const e=t.target;if(!e||!e.tagName)return!0;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)return!1}catch(t){}return!0}(n))return;const r="keypress"===n.type?"input":n.type;void 0===lt?(t({event:n,name:r,global:e}),ft=n):function(t,e){if(!t)return!0;if(t.type!==e.type)return!0;try{if(t.target!==e.target)return!0}catch(t){}return!1}(ft,n)&&(t({event:n,name:r,global:e}),ft=n),clearTimeout(lt),lt=et.setTimeout(()=>{lt=void 0},ht)}}let pt=null;let bt=null;var vt;!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(vt||(vt={}));class yt{constructor(t){this.p=vt.PENDING,this.v=[],this.m=(t=>{this.g(vt.RESOLVED,t)}),this.j=(t=>{this.g(vt.REJECTED,t)}),this.g=((t,e)=>{this.p===vt.PENDING&&(b(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===vt.PENDING)return;const t=this.v.slice();this.v=[],t.forEach(t=>{t.done||(this.p===vt.RESOLVED&&t.onfulfilled&&t.onfulfilled(this.O),this.p===vt.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 yt(e=>{e(t)})}static reject(t){return new yt((e,n)=>{n(t)})}static all(t){return new yt((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)=>{yt.resolve(t).then(t=>{i[s]=t,0===(r-=1)&&e(i)}).then(null,n)})})}then(t,e){return new yt((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 yt((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 mt{constructor(t){this.S=t,this.k=[]}isReady(){return void 0===this.S||this.length()<this.S}add(t){if(!this.isReady())return yt.reject(new j("Not adding Promise due to buffer limit reached."));const e=t();return-1===this.k.indexOf(e)&&this.k.push(e),e.then(()=>this.remove(e)).then(null,()=>this.remove(e).then(null,()=>{})),e}remove(t){return this.k.splice(this.k.indexOf(t),1)[0]}length(){return this.k.length}drain(t){return new yt(e=>{const n=setTimeout(()=>{t&&t>0&&e(!1)},t);yt.all(this.k).then(()=>{clearTimeout(n),e(!0)}).then(null,()=>{e(!0)})})}}const gt={nowSeconds:()=>Date.now()/1e3};const jt=_()?function(){try{return(t=module,e="perf_hooks",t.require(e)).performance}catch(t){return}var t,e}():function(){const{performance:t}=T();if(t&&t.now)return{now:()=>t.now(),timeOrigin:Date.now()-t.now()}}(),wt=void 0===jt?gt:{nowSeconds:()=>(jt.timeOrigin+jt.now())/1e3},Ot=gt.nowSeconds.bind(gt),Et=wt.nowSeconds.bind(wt),_t=((()=>{const{performance:t}=T();if(!t||!t.now)return;const e=t.now(),n=Date.now(),r=t.timeOrigin?Math.abs(t.timeOrigin+e-n):36e5,i=r<36e5,s=t.timing&&t.timing.navigationStart,o="number"==typeof s?Math.abs(s+e-n):36e5;(i||o<36e5)&&(r<=o&&t.timeOrigin)})(),100);class $t{constructor(){this.T=!1,this.D=[],this.R=[],this.I=[],this.N={},this.M={},this.C={},this.A={}}static clone(t){const e=new $t;return t&&(e.I=[...t.I],e.M=Object.assign({},t.M),e.C=Object.assign({},t.C),e.A=Object.assign({},t.A),e.N=t.N,e.U=t.U,e.q=t.q,e.F=t.F,e.L=t.L,e.B=t.B,e.R=[...t.R],e.H=t.H),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.P(),this}getUser(){return this.N}getRequestSession(){return this.H}setRequestSession(t){return this.H=t,this}setTags(t){return this.M=Object.assign(Object.assign({},this.M),t),this.P(),this}setTag(t,e){return this.M=Object.assign(Object.assign({},this.M),{[t]:e}),this.P(),this}setExtras(t){return this.C=Object.assign(Object.assign({},this.C),t),this.P(),this}setExtra(t,e){return this.C=Object.assign(Object.assign({},this.C),{[t]:e}),this.P(),this}setFingerprint(t){return this.B=t,this.P(),this}setLevel(t){return this.U=t,this.P(),this}setTransactionName(t){return this.L=t,this.P(),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.P(),this}setSpan(t){return this.q=t,this.P(),this}getSpan(){return this.q}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}setSession(t){return t?this.F=t:delete this.F,this.P(),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.M=Object.assign(Object.assign({},this.M),t.M),this.C=Object.assign(Object.assign({},this.C),t.C),this.A=Object.assign(Object.assign({},this.A),t.A),t.N&&Object.keys(t.N).length&&(this.N=t.N),t.U&&(this.U=t.U),t.B&&(this.B=t.B),t.H&&(this.H=t.H)):f(t)&&(t=t,this.M=Object.assign(Object.assign({},this.M),t.tags),this.C=Object.assign(Object.assign({},this.C),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),t.requestSession&&(this.H=t.requestSession)),this}clear(){return this.I=[],this.M={},this.C={},this.N={},this.A={},this.U=void 0,this.L=void 0,this.B=void 0,this.H=void 0,this.q=void 0,this.F=void 0,this.P(),this}addBreadcrumb(t,e){const n="number"==typeof e?Math.min(e,_t):_t;if(n<=0)return this;const r=Object.assign({timestamp:Ot()},t);return this.I=[...this.I,r].slice(-n),this.P(),this}clearBreadcrumbs(){return this.I=[],this.P(),this}applyToEvent(t,e){var n;if(this.C&&Object.keys(this.C).length&&(t.extra=Object.assign(Object.assign({},this.C),t.extra)),this.M&&Object.keys(this.M).length&&(t.tags=Object.assign(Object.assign({},this.M),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.L&&(t.transaction=this.L),this.q){t.contexts=Object.assign({trace:this.q.getTraceContext()},t.contexts);const e=null===(n=this.q.transaction)||void 0===n?void 0:n.name;e&&(t.tags=Object.assign({transaction:e},t.tags))}return this.W(t),t.breadcrumbs=[...t.breadcrumbs||[],...this.I],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,this.X([...xt(),...this.R],t,e)}X(t,e,n,r=0){return new yt((i,s)=>{const o=t[r];if(null===e||"function"!=typeof o)i(e);else{const c=o(Object.assign({},e),n);b(c)?c.then(e=>this.X(t,e,n,r+1).then(i)).then(null,s):this.X(t,c,n,r+1).then(i).then(null,s)}})}P(){this.T||(this.T=!0,this.D.forEach(t=>{t(this)}),this.T=!1)}W(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=T();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=D(),this.duration=0,this.status=n.Ok,this.init=!0,this.ignoreDuration=!1;const e=Et();this.timestamp=e,this.started=e,t&&this.update(t)}update(t={}){if(t.user&&(!this.ipAddress&&t.user.ip_address&&(this.ipAddress=t.user.ip_address),this.did||t.did||(this.did=t.user.id||t.user.email||t.user.username)),this.timestamp=t.timestamp||Et(),t.ignoreDuration&&(this.ignoreDuration=t.ignoreDuration),t.sid&&(this.sid=32===t.sid.length?t.sid:D()),void 0!==t.init&&(this.init=t.init),!this.did&&t.did&&(this.did=`${t.did}`),"number"==typeof t.started&&(this.started=t.started),this.ignoreDuration)this.duration=void 0;else if("number"==typeof t.duration)this.duration=t.duration;else{const t=this.timestamp-this.started;this.duration=t>=0?t:0}t.release&&(this.release=t.release),t.environment&&(this.environment=t.environment),!this.ipAddress&&t.ipAddress&&(this.ipAddress=t.ipAddress),!this.userAgent&&t.userAgent&&(this.userAgent=t.userAgent),"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}):this.update()}toJSON(){return Q({sid:`${this.sid}`,init:this.init,started:new Date(1e3*this.started).toISOString(),timestamp:new Date(1e3*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:Q({release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent})})}}const Tt=4,Dt=100;class Rt{constructor(t,e=new $t,n=Tt){this.J=n,this.G=[{}],this.getStackTop().scope=e,this.bindClient(t)}isOlderThan(t){return this.J<t}bindClient(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=$t.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return!(this.getStack().length<=1)&&!!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.G}getStackTop(){return this.G[this.G.length-1]}captureException(t,e){const n=this.K=D();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.K=D();let i=n;if(!n){let e;try{throw new Error(t)}catch(t){e=t}i={originalException:t,syntheticException:e}}return this.V("captureMessage",t,e,Object.assign(Object.assign({},i),{event_id:r})),r}captureEvent(t,e){const n=this.K=D();return this.V("captureEvent",t,Object.assign(Object.assign({},e),{event_id:n})),n}lastEventId(){return this.K}addBreadcrumb(t,e){const{scope:n,client:r}=this.getStackTop();if(!n||!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=Dt}=r.getOptions&&r.getOptions()||{};if(s<=0)return;const o=Ot(),c=Object.assign({timestamp:o},t),u=i?N(()=>i(c,e)):c;null!==u&&n.addBreadcrumb(u,s)}setUser(t){const e=this.getScope();e&&e.setUser(t)}setTags(t){const e=this.getScope();e&&e.setTags(t)}setExtras(t){const e=this.getScope();e&&e.setExtras(t)}setTag(t,e){const n=this.getScope();n&&n.setTag(t,e)}setExtra(t,e){const n=this.getScope();n&&n.setExtra(t,e)}setContext(t,e){const n=this.getScope();n&&n.setContext(t,e)}configureScope(t){const{scope:e,client:n}=this.getStackTop();e&&n&&t(e)}run(t){const e=Nt(this);try{t(this)}finally{Nt(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return F.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startSpan(t){return this.Y("startSpan",t)}startTransaction(t,e){return this.Y("startTransaction",t,e)}traceHeaders(){return this.Y("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this.Z()}endSession(){var t,e,n,r,i;null===(n=null===(e=null===(t=this.getStackTop())||void 0===t?void 0:t.scope)||void 0===e?void 0:e.getSession())||void 0===n||n.close(),this.Z(),null===(i=null===(r=this.getStackTop())||void 0===r?void 0:r.scope)||void 0===i||i.setSession()}startSession(t){const{scope:e,client:r}=this.getStackTop(),{release:i,environment:s}=r&&r.getOptions()||{},o=T(),{userAgent:c}=o.navigator||{},u=new kt(Object.assign(Object.assign(Object.assign({release:i,environment:s},e&&{user:e.getUser()}),c&&{userAgent:c}),t));if(e){const t=e.getSession&&e.getSession();t&&t.status===n.Ok&&t.update({status:n.Exited}),this.endSession(),e.setSession(u)}return u}Z(){const{scope:t,client:e}=this.getStackTop();if(!t)return;const n=t.getSession&&t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}V(t,...e){const{scope:n,client:r}=this.getStackTop();r&&r[t]&&r[t](...e,n)}Y(t,...e){const n=It().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);F.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function It(){const t=T();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function Nt(t){const e=It(),n=At(e);return Ut(e,t),n}function Mt(){const t=It();return Ct(t)&&!At(t).isOlderThan(Tt)||Ut(t,new Rt),_()?function(t){var e,n,r;try{const i=null===(r=null===(n=null===(e=It().__SENTRY__)||void 0===e?void 0:e.extensions)||void 0===n?void 0:n.domain)||void 0===r?void 0:r.active;if(!i)return At(t);if(!Ct(i)||At(i).isOlderThan(Tt)){const e=At(t).getStackTop();Ut(i,new Rt(e.client,$t.clone(e.scope)))}return At(i)}catch(e){return At(t)}}(t):At(t)}function Ct(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function At(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub?t.__SENTRY__.hub:(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new Rt,t.__SENTRY__.hub)}function Ut(t,e){return!!t&&(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=e,!0)}function qt(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 qt("captureException",t,{captureContext:e,originalException:t,syntheticException:n})}function Ft(t){qt("withScope",t)}const Lt="7";class Bt{constructor(t,e={},n){this.dsn=t,this.tt=new E(t),this.metadata=e,this.et=n}getDsn(){return this.tt}forceEnvelope(){return!!this.et}getBaseApiEndpoint(){const t=this.getDsn(),e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}getStoreEndpoint(){return this.nt("store")}getStoreEndpointWithUrlEncodedAuth(){return`${this.getStoreEndpoint()}?${this.rt()}`}getEnvelopeEndpointWithUrlEncodedAuth(){return this.forceEnvelope()?this.et:`${this.it()}?${this.rt()}`}getStoreEndpointPath(){const t=this.getDsn();return`${t.path?`/${t.path}`:""}/api/${t.projectId}/store/`}getRequestHeaders(t,e){const n=this.getDsn(),r=[`Sentry sentry_version=${Lt}`];return r.push(`sentry_client=${t}/${e}`),r.push(`sentry_key=${n.publicKey}`),n.pass&&r.push(`sentry_secret=${n.pass}`),{"Content-Type":"application/json","X-Sentry-Auth":r.join(", ")}}getReportDialogEndpoint(t={}){const e=this.getDsn(),n=`${this.getBaseApiEndpoint()}embed/error-page/`,r=[];r.push(`dsn=${e.toString()}`);for(const e in t)if("dsn"!==e)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}it(){return this.nt("envelope")}nt(t){if(this.et)return this.et;return`${this.getBaseApiEndpoint()}${this.getDsn().projectId}/${t}/`}rt(){const t={sentry_key:this.getDsn().publicKey,sentry_version:Lt};return e=t,Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&");var e}}const Ht=[];function Pt(t){return t.reduce((t,e)=>(t.every(t=>e.name!==t.name)&&t.push(e),t),[])}function Wt(t){const e={};return function(t){const e=t.defaultIntegrations&&[...t.defaultIntegrations]||[],n=t.integrations;let r=[...Pt(e)];Array.isArray(n)?r=[...r.filter(t=>n.every(e=>e.name!==t.name)),...Pt(n)]:"function"==typeof n&&(r=n(r),r=Array.isArray(r)?r:[r]);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===Ht.indexOf(t.name)&&(t.setupOnce(St,Mt),Ht.push(t.name),F.log(`Integration installed: ${t.name}`))}(t)}),e}class Xt{constructor(t,e){this.st={},this.ot=0,this.ct=new t(e),this.ut=e,e.dsn&&(this.at=new E(e.dsn))}captureException(t,e,n){let r=e&&e.event_id;return this.ht(this.lt().eventFromException(t,e).then(t=>this.ft(t,e,n)).then(t=>{r=t})),r}captureMessage(t,e,n,r){let i=n&&n.event_id;const s=l(t)?this.lt().eventFromMessage(String(t),e,n):this.lt().eventFromException(t,n);return this.ht(s.then(t=>this.ft(t,n,r)).then(t=>{i=t})),i}captureEvent(t,e,n){let r=e&&e.event_id;return this.ht(this.ft(t,e,n).then(t=>{r=t})),r}captureSession(t){this.dt()?"string"!=typeof t.release?F.warn("Discarded session because of missing or non-string release"):(this.pt(t),t.update({init:!1})):F.warn("SDK not enabled, will not capture session.")}getDsn(){return this.at}getOptions(){return this.ut}flush(t){return this.bt(t).then(e=>this.lt().getTransport().close(t).then(t=>e&&t))}close(t){return this.flush(t).then(t=>(this.getOptions().enabled=!1,t))}setupIntegrations(){this.dt()&&(this.st=Wt(this.ut))}getIntegration(t){try{return this.st[t.id]||null}catch(e){return F.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}vt(t,e){let r=!1,i=!1;const s=e.exception&&e.exception.values;if(s){i=!0;for(const t of s){const e=t.mechanism;if(e&&!1===e.handled){r=!0;break}}}const o=t.status===n.Ok;(o&&0===t.errors||o&&r)&&(t.update(Object.assign(Object.assign({},r&&{status:n.Crashed}),{errors:t.errors||Number(i||r)})),this.captureSession(t))}pt(t){this.lt().sendSession(t)}bt(t){return new yt(e=>{let n=0;const r=setInterval(()=>{0==this.ot?(clearInterval(r),e(!0)):(n+=1,t&&n>=t&&(clearInterval(r),e(!1)))},1)})}lt(){return this.ct}dt(){return!1!==this.getOptions().enabled&&void 0!==this.at}yt(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:D()),timestamp:t.timestamp||Ot()});this.gt(i),this.jt(i);let s=e;n&&n.captureContext&&(s=$t.clone(s).update(n.captureContext));let o=yt.resolve(i);return s&&(o=s.applyToEvent(i,n)),o.then(t=>"number"==typeof r&&r>0?this.wt(t,r):t)}wt(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:K(t.data,e)}))}),t.user&&{user:K(t.user,e)}),t.contexts&&{contexts:K(t.contexts,e)}),t.extra&&{extra:K(t.extra,e)});return t.contexts&&t.contexts.trace&&(n.contexts.trace=t.contexts.trace),n}gt(t){const e=this.getOptions(),{environment:n,release:r,dist:i,maxValueLength:s=250}=e;"environment"in t||(t.environment="environment"in e?n:"production"),void 0===t.release&&void 0!==r&&(t.release=r),void 0===t.dist&&void 0!==i&&(t.dist=i),t.message&&(t.message=$(t.message,s));const o=t.exception&&t.exception.values&&t.exception.values[0];o&&o.value&&(o.value=$(o.value,s));const c=t.request;c&&c.url&&(c.url=$(c.url,s))}jt(t){const e=Object.keys(this.st);e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}Ot(t){this.lt().sendEvent(t)}ft(t,e,n){return this.Et(t,e,n).then(t=>t.event_id,t=>{F.error(t)})}Et(t,e,n){const{beforeSend:r,sampleRate:i}=this.getOptions();if(!this.dt())return yt.reject(new j("SDK not enabled, will not capture event."));const s="transaction"===t.type;return!s&&"number"==typeof i&&Math.random()>i?yt.reject(new j(`Discarding event because it's not included in the random sample (sampling rate = ${i})`)):this.yt(t,n,e).then(t=>{if(null===t)throw new j("An event processor returned null, will not send event.");if(e&&e.data&&!0===e.data.__sentry__||s||!r)return t;const n=r(t,e);return this._t(n)}).then(t=>{if(null===t)throw new j("`beforeSend` returned `null`, will not send event.");const e=n&&n.getSession&&n.getSession();return!s&&e&&this.vt(e,t),this.Ot(t),t}).then(null,t=>{if(t instanceof j)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new j(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)})}ht(t){this.ot+=1,t.then(t=>(this.ot-=1,t),t=>(this.ot-=1,t))}_t(t){const e="`beforeSend` method has to return `null` or a valid event.";if(b(t))return t.then(t=>{if(!f(t)&&null!==t)throw new j(e);return t},t=>{throw new j(`beforeSend rejected with ${t}`)});if(!f(t)&&null!==t)throw new j(e);return t}}class Jt{sendEvent(e){return yt.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:t.Status.Skipped})}close(t){return yt.resolve(!0)}}class Gt{constructor(t){this.ut=t,this.ut.dsn||F.warn("No DSN provided, backend will not do anything."),this.$t=this.xt()}eventFromException(t,e){throw new j("Backend has to implement `eventFromException` method")}eventFromMessage(t,e,n){throw new j("Backend has to implement `eventFromMessage` method")}sendEvent(t){this.$t.sendEvent(t).then(null,t=>{F.error(`Error while sending event: ${t}`)})}sendSession(t){this.$t.sendSession?this.$t.sendSession(t).then(null,t=>{F.error(`Error while sending session: ${t}`)}):F.warn("Dropping session because custom transport doesn't implement sendSession")}getTransport(){return this.$t}xt(){return new Jt}}function zt(t){if(!t.metadata||!t.metadata.sdk)return;const{name:e,version:n}=t.metadata.sdk;return{name:e,version:n}}function Kt(t,e){return e?(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]],t):t}function Vt(t,e){const n=zt(e),r="aggregates"in t?"sessions":"session";return{body:`${JSON.stringify(Object.assign(Object.assign({sent_at:(new Date).toISOString()},n&&{sdk:n}),e.forceEnvelope()&&{dsn:e.getDsn().toString()}))}\n${JSON.stringify({type:r})}\n${JSON.stringify(t)}`,type:r,url:e.getEnvelopeEndpointWithUrlEncodedAuth()}}function Qt(t,e){const n=zt(e),r=t.type||"event",i="transaction"===r||e.forceEnvelope(),s=t.debug_meta||{},{transactionSampling:o}=s,c=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(n[r[i]]=t[r[i]])}return n}(s,["transactionSampling"]),{method:u,rate:a}=o||{};0===Object.keys(c).length?delete t.debug_meta:t.debug_meta=c;const h={body:JSON.stringify(n?Kt(t,e.metadata.sdk):t),type:r,url:i?e.getEnvelopeEndpointWithUrlEncodedAuth():e.getStoreEndpointWithUrlEncodedAuth()};if(i){const i=`${JSON.stringify(Object.assign(Object.assign({event_id:t.event_id,sent_at:(new Date).toISOString()},n&&{sdk:n}),e.forceEnvelope()&&{dsn:e.getDsn().toString()}))}\n${JSON.stringify({type:r,sample_rates:[{id:u,rate:a}]})}\n${h.body}`;h.body=i}return h}const Yt="6.8.0";let Zt;class te{constructor(){this.name=te.id}setupOnce(){Zt=Function.prototype.toString,Function.prototype.toString=function(...t){const e=this.__sentry_original__||this;return Zt.apply(e,t)}}}te.id="FunctionToString";const ee=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class ne{constructor(t={}){this.ut=t,this.name=ne.id}setupOnce(){St(t=>{const e=Mt();if(!e)return t;const n=e.getIntegration(ne);if(n){const r=e.getClient(),i=r?r.getOptions():{},s="function"==typeof n._mergeOptions?n._mergeOptions(i):{};return"function"!=typeof n.St?t:n.St(t,s)?null:t}return t})}St(t,e){return this.kt(t,e)?(F.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${I(t)}`),!0):this.Tt(t,e)?(F.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${I(t)}`),!0):this.Dt(t,e)?(F.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${I(t)}.\nUrl: ${this.Rt(t)}`),!0):!this.It(t,e)&&(F.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${I(t)}.\nUrl: ${this.Rt(t)}`),!0)}kt(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}}Tt(t,e){return!(!e.ignoreErrors||!e.ignoreErrors.length)&&this.Nt(t).some(t=>e.ignoreErrors.some(e=>S(t,e)))}Dt(t,e){if(!e.denyUrls||!e.denyUrls.length)return!1;const n=this.Rt(t);return!!n&&e.denyUrls.some(t=>S(n,t))}It(t,e){if(!e.allowUrls||!e.allowUrls.length)return!0;const n=this.Rt(t);return!n||e.allowUrls.some(t=>S(n,t))}_mergeOptions(t={}){return{allowUrls:[...this.ut.whitelistUrls||[],...this.ut.allowUrls||[],...t.whitelistUrls||[],...t.allowUrls||[]],denyUrls:[...this.ut.blacklistUrls||[],...this.ut.denyUrls||[],...t.blacklistUrls||[],...t.denyUrls||[]],ignoreErrors:[...this.ut.ignoreErrors||[],...t.ignoreErrors||[],...ee],ignoreInternal:void 0===this.ut.ignoreInternal||this.ut.ignoreInternal}}Nt(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 F.error(`Cannot extract message for event ${I(t)}`),[]}return[]}Rt(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 F.error(`Cannot extract url for event ${I(t)}`),null}}}ne.id="InboundFilters";var re=Object.freeze({__proto__:null,FunctionToString:te,InboundFilters:ne});const ie="?",se=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,oe=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. \/=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ce=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ue=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ae=/\((\S*)(?::(\d+))(?::(\d+))\)/,he=/Minified React error #\d+;/i;function le(t){let e=null,n=0;t&&("number"==typeof t.framesToPop?n=t.framesToPop:he.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=ie),s.push(e))}if(!s.length)return null;return{message:de(t),name:t.name,stack:s}}(t))return fe(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=se.exec(n[c])){const t=s[2]&&0===s[2].indexOf("native");(r=s[2]&&0===s[2].indexOf("eval"))&&(i=ae.exec(s[2]))&&(s[2]=i[1],s[3]=i[2],s[4]=i[3]);let e=s[2]&&0===s[2].indexOf("address at ")?s[2].substr("address at ".length):s[2],n=s[1]||ie;const c=-1!==n.indexOf("safari-extension"),u=-1!==n.indexOf("safari-web-extension");(c||u)&&(n=-1!==n.indexOf("@")?n.split("@")[0]:ie,e=c?`safari-extension:${e}`:`safari-web-extension:${e}`),o={url:e,func:n,args:t?[s[2]]:[],line:s[3]?+s[3]:null,column:s[4]?+s[4]:null}}else if(s=ce.exec(n[c]))o={url:s[2],func:s[1]||ie,args:[],line:+s[3],column:s[4]?+s[4]:null};else{if(!(s=oe.exec(n[c])))continue;(r=s[3]&&s[3].indexOf(" > eval")>-1)&&(i=ue.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]||ie,args:s[2]?s[2].split(","):[],line:s[4]?+s[4]:null,column:s[5]?+s[5]:null}}!o.func&&o.line&&(o.func=ie),e.push(o)}if(!e.length)return null;return{message:de(t),name:t.name,stack:e}}(t))return fe(e,n)}catch(t){}return{message:de(t),name:t&&t.name,stack:[],failed:!0}}function fe(t,e){try{return Object.assign(Object.assign({},t),{stack:t.stack.slice(e)})}catch(e){return t}}function de(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}const pe=50;function be(t){const e=ye(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 ve(t){return{exception:{values:[be(t)]}}}function ye(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,pe).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 me(e,n,r){const i=je(n,r&&r.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return C(i,{handled:!0,type:"generic"}),i.level=t.Severity.Error,r&&r.event_id&&(i.event_id=r.event_id),yt.resolve(i)}function ge(e,n,r=t.Severity.Info,i){const s=we(n,i&&i.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return s.level=r,i&&i.event_id&&(s.event_id=i.event_id),yt.resolve(s)}function je(t,e,n={}){let r;if(u(t)&&t.error){return r=ve(le(t=t.error))}if(a(t)||(i=t,"[object DOMException]"===Object.prototype.toString.call(i))){const i=t,s=i.name||(a(i)?"DOMError":"DOMException"),o=i.message?`${s}: ${i.message}`:s;return M(r=we(o,e,n),o),"code"in i&&(r.tags=Object.assign(Object.assign({},r.tags),{"DOMException.code":`${i.code}`})),r}var i;if(c(t))return r=ve(le(t));if(f(t)||d(t)){return C(r=function(t,e,n){const r={exception:{values:[{type:d(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:`Non-Error ${n?"promise rejection":"exception"} captured with keys: ${V(t)}`}]},extra:{__serialized__:J(t)}};if(e){const t=ye(le(e).stack);r.stacktrace={frames:t}}return r}(t,e,n.rejection),{synthetic:!0}),r}return M(r=we(t,e,n),`${t}`,void 0),C(r,{synthetic:!0}),r}function we(t,e,n={}){const r={message:t};if(n.attachStacktrace&&e){const t=ye(le(e).stack);r.stacktrace={frames:t}}return r}const Oe={event:"error",transaction:"transaction",session:"session",attachment:"attachment"};class Ee{constructor(t){this.options=t,this.k=new mt(30),this.Mt={},this.Ct=new Bt(t.dsn,t.At,t.tunnel),this.url=this.Ct.getStoreEndpointWithUrlEncodedAuth()}sendEvent(t){throw new j("Transport Class has to implement `sendEvent` method")}close(t){return this.k.drain(t)}Ut({requestType:e,response:n,headers:r,resolve:i,reject:s}){const o=t.Status.fromHttpCode(n.status);this.qt(r)&&F.warn(`Too many ${e} requests, backing off until: ${this.Ft(e)}`),o!==t.Status.Success?s(n):i({status:o})}Ft(t){const e=Oe[t];return this.Mt[e]||this.Mt.all}Lt(t){return this.Ft(t)>new Date(Date.now())}qt(t){const e=Date.now(),n=t["x-sentry-rate-limits"],r=t["retry-after"];if(n){for(const t of n.trim().split(",")){const n=t.split(":",2),r=parseInt(n[0],10),i=1e3*(isNaN(r)?60:r);for(const t of n[1].split(";"))this.Mt[t||"all"]=new Date(e+i)}return!0}return!!r&&(this.Mt.all=new Date(e+function(t,e){if(!e)return A;const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?A:r-t}(e,r)),!0)}}class _e extends Ee{constructor(t,e=function(){var t,e;const n=T();if(Z(n.fetch))return n.fetch.bind(n);const r=n.document;let i=n.fetch;if("function"==typeof(null===(t=r)||void 0===t?void 0:t.createElement))try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t),(null===(e=t.contentWindow)||void 0===e?void 0:e.fetch)&&(i=t.contentWindow.fetch),r.head.removeChild(t)}catch(t){F.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return i.bind(n)}()){super(t),this.Bt=e}sendEvent(t){return this.Ht(Qt(t,this.Ct),t)}sendSession(t){return this.Ht(Vt(t,this.Ct),t)}Ht(t,e){if(this.Lt(t.type))return Promise.reject({event:e,type:t.type,reason:`Transport for ${t.type} requests locked till ${this.Ft(t.type)} due to too many requests.`,status:429});const n={body:t.body,method:"POST",referrerPolicy:tt()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(n,this.options.fetchParameters),void 0!==this.options.headers&&(n.headers=this.options.headers),this.k.add(()=>new yt((e,r)=>{this.Bt(t.url,n).then(n=>{const i={"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")};this.Ut({requestType:t.type,response:n,headers:i,resolve:e,reject:r})}).catch(r)}))}}class $e extends Ee{sendEvent(t){return this.Ht(Qt(t,this.Ct),t)}sendSession(t){return this.Ht(Vt(t,this.Ct),t)}Ht(t,e){return this.Lt(t.type)?Promise.reject({event:e,type:t.type,reason:`Transport for ${t.type} requests locked till ${this.Ft(t.type)} due to too many requests.`,status:429}):this.k.add(()=>new yt((e,n)=>{const r=new XMLHttpRequest;r.onreadystatechange=(()=>{if(4===r.readyState){const i={"x-sentry-rate-limits":r.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":r.getResponseHeader("Retry-After")};this.Ut({requestType:t.type,response:r,headers:i,resolve:e,reject:n})}}),r.open("POST",t.url);for(const t in this.options.headers)this.options.headers.hasOwnProperty(t)&&r.setRequestHeader(t,this.options.headers[t]);r.send(t.body)}))}}var xe=Object.freeze({__proto__:null,BaseTransport:Ee,FetchTransport:_e,XHRTransport:$e});class Se extends Gt{eventFromException(t,e){return me(this.ut,t,e)}eventFromMessage(e,n=t.Severity.Info,r){return ge(this.ut,e,n,r)}xt(){if(!this.ut.dsn)return super.xt();const t=Object.assign(Object.assign({},this.ut.transportOptions),{dsn:this.ut.dsn,tunnel:this.ut.tunnel,At:this.ut.At});return this.ut.transport?new this.ut.transport(t):Y()?new _e(t):new $e(t)}}let ke=0;function Te(){return ke>0}function De(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=>De(t,e));return t.handleEvent?t.handleEvent.apply(this,i):t.apply(this,i)}catch(t){throw ke+=1,setTimeout(()=>{ke-=1}),Ft(n=>{n.addEventProcessor(t=>{const n=Object.assign({},t);return e.mechanism&&(M(n,void 0,void 0),C(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 Re(t={}){if(!t.eventId)return void F.error("Missing eventId option in showReportDialog call");if(!t.dsn)return void F.error("Missing dsn option in showReportDialog call");const e=document.createElement("script");e.async=!0,e.src=new Bt(t.dsn).getReportDialogEndpoint(t),t.onLoad&&(e.onload=t.onLoad),(document.head||document.body).appendChild(e)}class Ie{constructor(t){this.name=Ie.id,this.Pt=!1,this.Wt=!1,this.ut=Object.assign({onerror:!0,onunhandledrejection:!0},t)}setupOnce(){Error.stackTraceLimit=50,this.ut.onerror&&(F.log("Global Handler attached: onerror"),this.Xt()),this.ut.onunhandledrejection&&(F.log("Global Handler attached: onunhandledrejection"),this.Jt())}Xt(){this.Pt||(st({callback:t=>{const e=t.error,n=Mt(),r=n.getIntegration(Ie),i=e&&!0===e.__sentry_own_request__;if(!r||Te()||i)return;const s=n.getClient(),o=void 0===e&&h(t.msg)?this.Gt(t.msg,t.url,t.line,t.column):this.zt(je(e||t.msg,void 0,{attachStacktrace:s&&s.getOptions().attachStacktrace,rejection:!1}),t.url,t.line,t.column);C(o,{handled:!1,type:"onerror"}),n.captureEvent(o,{originalException:e})},type:"error"}),this.Pt=!0)}Jt(){this.Wt||(st({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(),i=r.getIntegration(Ie),s=n&&!0===n.__sentry_own_request__;if(!i||Te()||s)return!0;const o=r.getClient(),c=l(n)?this.Kt(n):je(n,void 0,{attachStacktrace:o&&o.getOptions().attachStacktrace,rejection:!0});c.level=t.Severity.Error,C(c,{handled:!1,type:"onunhandledrejection"}),r.captureEvent(c,{originalException:n})},type:"unhandledrejection"}),this.Wt=!0)}Gt(t,e,n,r){let i,s=u(t)?t.message:t;const o=s.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);o&&(i=o[1],s=o[2]);const c={exception:{values:[{type:i||"Error",value:s}]}};return this.zt(c,e,n,r)}Kt(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}zt(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=h(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}}Ie.id="GlobalHandlers";const Ne=["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 Me{constructor(t){this.name=Me.id,this.ut=Object.assign({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t)}setupOnce(){const t=T();if(this.ut.setTimeout&&P(t,"setTimeout",this.Vt.bind(this)),this.ut.setInterval&&P(t,"setInterval",this.Vt.bind(this)),this.ut.requestAnimationFrame&&P(t,"requestAnimationFrame",this.Qt.bind(this)),this.ut.XMLHttpRequest&&"XMLHttpRequest"in t&&P(XMLHttpRequest.prototype,"send",this.Yt.bind(this)),this.ut.eventTarget){(Array.isArray(this.ut.eventTarget)?this.ut.eventTarget:Ne).forEach(this.Zt.bind(this))}}Vt(t){return function(...e){const n=e[0];return e[0]=De(n,{mechanism:{data:{function:H(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}Qt(t){return function(e){return t.call(this,De(e,{mechanism:{data:{function:"requestAnimationFrame",handler:H(t)},handled:!0,type:"instrument"}}))}}Zt(t){const e=T(),n=e[t]&&e[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(P(n,"addEventListener",function(e){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=De(r.handleEvent.bind(r),{mechanism:{data:{function:"handleEvent",handler:H(r),target:t},handled:!0,type:"instrument"}}))}catch(t){}return e.call(this,n,De(r,{mechanism:{data:{function:"addEventListener",handler:H(r),target:t},handled:!0,type:"instrument"}}),i)}}),P(n,"removeEventListener",function(t){return function(e,n,r){var i;const s=n;try{const n=null===(i=s)||void 0===i?void 0:i.__sentry_wrapped__;n&&t.call(this,e,n,r)}catch(t){}return t.call(this,e,s,r)}}))}Yt(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(t=>{t in n&&"function"==typeof n[t]&&P(n,t,function(e){const n={mechanism:{data:{function:t,handler:H(e)},handled:!0,type:"instrument"}};return e.__sentry_original__&&(n.mechanism.data.handler=H(e.__sentry_original__)),De(e,n)})}),t.apply(this,e)}}}Me.id="TryCatch";class Ce{constructor(t){this.name=Ce.id,this.ut=Object.assign({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}addSentryBreadcrumb(t){this.ut.sentry&&Mt().addBreadcrumb({category:`sentry.${"transaction"===t.type?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:I(t)},{event:t})}setupOnce(){this.ut.console&&st({callback:(...t)=>{this.te(...t)},type:"console"}),this.ut.dom&&st({callback:(...t)=>{this.ee(...t)},type:"dom"}),this.ut.xhr&&st({callback:(...t)=>{this.ne(...t)},type:"xhr"}),this.ut.fetch&&st({callback:(...t)=>{this.re(...t)},type:"fetch"}),this.ut.history&&st({callback:(...t)=>{this.ie(...t)},type:"history"})}te(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})}ee(t){let e,n="object"==typeof this.ut.dom?this.ut.dom.serializeAttribute:void 0;"string"==typeof n&&(n=[n]);try{e=t.event.target?y(t.event.target,n):y(t.event,n)}catch(t){e="<unknown>"}0!==e.length&&Mt().addBreadcrumb({category:`ui.${t.name}`,message:e},{event:t.event,name:t.name,global:t.global})}ne(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__||{};Mt().addBreadcrumb({category:"xhr",data:{method:e,url:n,status_code:r},type:"http"},{xhr:t.xhr,input:i})}else;}re(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})))}ie(t){const e=T();let n=t.from,r=t.to;const i=R(e.location.href);let s=R(n);const o=R(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),Mt().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}}Ce.id="Breadcrumbs";const Ae="cause",Ue=5;class qe{constructor(t={}){this.name=qe.id,this.se=t.key||Ae,this.S=t.limit||Ue}setupOnce(){St((t,e)=>{const n=Mt().getIntegration(qe);return n?n.oe(t,e):t})}oe(t,e){if(!(t.exception&&t.exception.values&&e&&v(e.originalException,Error)))return t;const n=this.ce(e.originalException,this.se);return t.exception.values=[...n,...t.exception.values],t}ce(t,e,n=[]){if(!v(t[e],Error)||n.length+1>=this.S)return n;const r=be(le(t[e]));return this.ce(t[e],e,[r,...n])}}qe.id="LinkedErrors";const Fe=T();class Le{constructor(){this.name=Le.id}setupOnce(){St(t=>{var e,n,r;if(Mt().getIntegration(Le)){if(!Fe.navigator&&!Fe.location&&!Fe.document)return t;const i=(null===(e=t.request)||void 0===e?void 0:e.url)||(null===(n=Fe.location)||void 0===n?void 0:n.href),{referrer:s}=Fe.document||{},{userAgent:o}=Fe.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})}}Le.id="UserAgent";class Be{constructor(){this.name=Be.id}setupOnce(t,e){t(t=>{const n=e().getIntegration(Be);if(n){try{if(n.St(t,n.ue))return null}catch(e){return n.ue=t}return n.ue=t}return t})}St(t,e){return!!e&&(!!this.ae(t,e)||!!this.he(t,e))}ae(t,e){const n=t.message,r=e.message;return!(!n&&!r)&&(!(n&&!r||!n&&r)&&(n===r&&(!!this.le(t,e)&&!!this.fe(t,e))))}de(t){const e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch(t){return}else if(t.stacktrace)return t.stacktrace.frames}fe(t,e){let n=this.de(t),r=this.de(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(n=n,(r=r).length!==n.length)return!1;for(let t=0;t<r.length;t++){const e=r[t],i=n[t];if(e.filename!==i.filename||e.lineno!==i.lineno||e.colno!==i.colno||e.function!==i.function)return!1}return!0}pe(t){return t.exception&&t.exception.values&&t.exception.values[0]}he(t,e){const n=this.pe(e),r=this.pe(t);return!(!n||!r)&&(n.type===r.type&&n.value===r.value&&(!!this.le(t,e)&&!!this.fe(t,e)))}le(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return!(n.join("")!==r.join(""))}catch(t){return!1}}}Be.id="Dedupe";var He=Object.freeze({__proto__:null,GlobalHandlers:Ie,TryCatch:Me,Breadcrumbs:Ce,LinkedErrors:qe,UserAgent:Le,Dedupe:Be});class Pe extends Xt{constructor(t={}){t.At=t.At||{},t.At.sdk=t.At.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:Yt}],version:Yt},super(Se,t)}showReportDialog(t={}){T().document&&(this.dt()?Re(Object.assign(Object.assign({},t),{dsn:t.dsn||this.getDsn()})):F.error("Trying to call showReportDialog with Sentry Client disabled"))}yt(t,e,n){return t.platform=t.platform||"javascript",super.yt(t,e,n)}Ot(t){const e=this.getIntegration(Ce);e&&e.addSentryBreadcrumb(t),super.Ot(t)}}const We=[new ne,new te,new Me,new Ce,new Ie,new qe,new Be,new Le];let Xe={};const Je=T();Je.Sentry&&Je.Sentry.Integrations&&(Xe=Je.Sentry.Integrations);const Ge=Object.assign(Object.assign(Object.assign({},Xe),re),He);return t.BrowserClient=Pe,t.Hub=Rt,t.Integrations=Ge,t.SDK_NAME="sentry.javascript.browser",t.SDK_VERSION=Yt,t.Scope=$t,t.Transports=xe,t.addBreadcrumb=function(t){qt("addBreadcrumb",t)},t.addGlobalEventProcessor=St,t.captureEvent=function(t){return qt("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 qt("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):yt.reject(!1)},t.configureScope=function(t){qt("configureScope",t)},t.defaultIntegrations=We,t.eventFromException=me,t.eventFromMessage=ge,t.flush=function(t){const e=Mt().getClient();return e?e.flush(t):yt.reject(!1)},t.forceLoad=function(){},t.getCurrentHub=Mt,t.getHubFromCarrier=At,t.init=function(t={}){if(void 0===t.defaultIntegrations&&(t.defaultIntegrations=We),void 0===t.release){const e=T();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),function(t,e){var n;!0===e.debug&&F.enable();const r=Mt();null===(n=r.getScope())||void 0===n||n.update(e.initialScope);const i=new t(e);r.bindClient(i)}(Pe,t),t.autoSessionTracking&&function(){if(void 0===T().document)return void F.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");const t=Mt();"function"==typeof t.startSession&&"function"==typeof t.captureSession&&(t.startSession({ignoreDuration:!0}),t.captureSession(),st({callback:({from:e,to:n})=>{void 0!==e&&e!==n&&(t.startSession({ignoreDuration:!0}),t.captureSession())},type:"history"}))}()},t.injectReportDialog=Re,t.lastEventId=function(){return Mt().lastEventId()},t.makeMain=Nt,t.onLoad=function(t){t()},t.setContext=function(t,e){qt("setContext",t,e)},t.setExtra=function(t,e){qt("setExtra",t,e)},t.setExtras=function(t){qt("setExtras",t)},t.setTag=function(t,e){qt("setTag",t,e)},t.setTags=function(t){qt("setTags",t)},t.setUser=function(t){qt("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 qt("startTransaction",Object.assign({},t),e)},t.withScope=Ft,t.wrap=function(t){return De(t)()},t}({});
|
|
3
3
|
//# sourceMappingURL=bundle.es6.min.js.map
|