@sentry/browser 6.14.2 → 6.14.3
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 +12 -10
- 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 +12 -10
- package/build/bundle.js.map +1 -1
- package/build/bundle.min.js +2 -2
- package/build/bundle.min.js.map +1 -1
- package/dist/eventbuilder.d.ts.map +1 -1
- package/dist/eventbuilder.js +3 -2
- package/dist/eventbuilder.js.map +1 -1
- package/esm/eventbuilder.d.ts.map +1 -1
- package/esm/eventbuilder.js +3 -2
- package/esm/eventbuilder.js.map +1 -1
- package/package.json +5 -5
package/build/bundle.es6.min.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! @sentry/browser 6.14.
|
|
2
|
-
var Sentry=function(t){var e,n,r,i,s,o,c;function u(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}!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={})),function(t){t.BeforeSend="before_send",t.EventProcessor="event_processor",t.NetworkError="network_error",t.QueueOverflow="queue_overflow",t.RateLimitBackoff="ratelimit_backoff",t.SampleRate="sample_rate"}(c||(c={}));const a={};function h(){return u()?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:a}function l(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return j(t,Error)}}function f(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)}function d(t){return"[object DOMError]"===Object.prototype.toString.call(t)}function p(t){return"[object String]"===Object.prototype.toString.call(t)}function v(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function b(t){return"[object Object]"===Object.prototype.toString.call(t)}function y(t){return"undefined"!=typeof Event&&j(t,Event)}function m(t){return"undefined"!=typeof Element&&j(t,Element)}function g(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function j(t,e){try{return t instanceof e}catch(t){return!1}}function O(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=w(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 w(t,e){var n,r;const i=t,s=[];let o,c,u,a,h;if(!i||!i.tagName)return"";s.push(i.tagName.toLowerCase());const l=(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=l)||void 0===r?void 0:r.length)l.forEach(t=>{s.push(`[${t[0]}="${t[1]}"]`)});else if(i.id&&s.push(`#${i.id}`),(o=i.className)&&p(o))for(c=o.split(/\s+/),h=0;h<c.length;h++)s.push(`.${c[h]}`);const f=["type","name","title","alt"];for(h=0;h<f.length;h++)u=f[h],(a=i.getAttribute(u))&&s.push(`[${u}="${a}"]`);return s.join("")}const E=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){return t.__proto__=e,t}:function(t,e){for(const n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n]);return t});class _ extends Error{constructor(t){super(t),this.message=t,this.name=new.target.prototype.constructor.name,E(this,new.target.prototype)}}const $=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,x="Invalid Dsn";class S{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=$.exec(t);if(!e)throw new _(x);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 _(`${x}: ${t} missing`)}),!this.projectId.match(/^\d+$/))throw new _(`${x}: Invalid projectId ${this.projectId}`);if("http"!==this.protocol&&"https"!==this.protocol)throw new _(`${x}: Invalid protocol ${this.protocol}`);if(this.port&&isNaN(parseInt(this.port,10)))throw new _(`${x}: Invalid port ${this.port}`)}}const k=h(),T="Sentry Logger ";function D(t){const e=h();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}k.__SENTRY__=k.__SENTRY__||{};const R=k.__SENTRY__.logger||(k.__SENTRY__.logger=new class{constructor(){this.o=!1}disable(){this.o=!1}enable(){this.o=!0}log(...t){this.o&&D(()=>{k.console.log(`${T}[Log]: ${t.join(" ")}`)})}warn(...t){this.o&&D(()=>{k.console.warn(`${T}[Warn]: ${t.join(" ")}`)})}error(...t){this.o&&D(()=>{k.console.error(`${T}[Error]: ${t.join(" ")}`)})}});class N{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 I="<anonymous>";function C(t){try{return t&&"function"==typeof t&&t.name||I}catch(t){return I}}function M(t,e=0){return"string"!=typeof t||0===e?t:t.length<=e?t:`${t.substr(0,e)}...`}function A(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 U(t,e){return!!p(t)&&(n=e,"[object RegExp]"===Object.prototype.toString.call(n)?e.test(t):"string"==typeof e&&-1!==t.indexOf(e));var n}function q(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 L(t){if(l(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(y(t)){const e=t,n={};n.type=e.type;try{n.target=m(e.target)?O(e.target):Object.prototype.toString.call(e.target)}catch(t){n.target="<unknown>"}try{n.currentTarget=m(e.currentTarget)?O(e.currentTarget):Object.prototype.toString.call(e.currentTarget)}catch(t){n.currentTarget="<unknown>"}"undefined"!=typeof CustomEvent&&j(t,CustomEvent)&&(n.detail=e.detail);for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n}return t}function F(t){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}function B(t,e=3,n=102400){const r=J(t,e);return F(r)>n?B(t,e-1,n):r}function H(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]":b(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: ${C(t)}]`:"symbol"==typeof t?`[${String(t)}]`:"bigint"==typeof t?`[BigInt: ${String(t)}]`:t;var n}function P(t,e,n=1/0,r=new N){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=H(t);return v(n)?n:e}(e);if(null!=e&&"function"==typeof e.toJSON)return e.toJSON();const i=H(e,t);if(v(i))return i;const s=L(e),o=Array.isArray(e)?[]:{};if(r.memoize(e))return"[Circular ~]";for(const t in s)Object.prototype.hasOwnProperty.call(s,t)&&(o[t]=P(t,s[t],n-1,r));return r.unmemoize(e),o}function J(t,e){try{return JSON.parse(JSON.stringify(t,(t,n)=>P(t,n,e)))}catch(t){return"**non-serializable**"}}function W(t,e=40){const n=Object.keys(L(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return M(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:M(r,e)}return""}function X(t){if(b(t)){const e={};for(const n of Object.keys(t))void 0!==t[n]&&(e[n]=X(t[n]));return e}return Array.isArray(t)?t.map(X):t}function z(){if(!("fetch"in h()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function G(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function K(){if(!z())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}const V=h(),Q={},Y={};function Z(t){if(!Y[t])switch(Y[t]=!0,t){case"console":!function(){if(!("console"in V))return;["debug","info","warn","error","log","assert"].forEach(function(t){t in V.console&&q(V.console,t,function(e){return function(...n){et("console",{args:n,level:t}),e&&Function.prototype.apply.call(e,V.console,n)}})})}();break;case"dom":!function(){if(!("document"in V))return;const t=et.bind(null,"dom"),e=ut(t,!0);V.document.addEventListener("click",e,!1),V.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(e=>{const n=V[e]&&V[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(q(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=ut(t);o.handler=r,e.call(this,n,r,i)}o.refCount+=1}catch(t){}return e.call(this,n,r,i)}}),q(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 V))return;const t=[],e=[],n=XMLHttpRequest.prototype;q(n,"open",function(n){return function(...r){const i=this,s=r[1];i.__sentry_xhr__={method:p(r[0])?r[0].toUpperCase():r[0],url:r[1]},p(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){}et("xhr",{args:r,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:i})}};return"onreadystatechange"in i&&"function"==typeof i.onreadystatechange?q(i,"onreadystatechange",function(t){return function(...e){return o(),t.apply(i,e)}}):i.addEventListener("readystatechange",o),n.apply(i,r)}}),q(n,"send",function(n){return function(...r){return t.push(this),e.push(r),et("xhr",{args:r,startTimestamp:Date.now(),xhr:this}),n.apply(this,r)}})}();break;case"fetch":!function(){if(!function(){if(!z())return!1;const t=h();if(G(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=G(t.contentWindow.fetch)),n.head.removeChild(t)}catch(t){R.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return e}())return;q(V,"fetch",function(t){return function(...e){const n={args:e,fetchData:{method:nt(e),url:rt(e)},startTimestamp:Date.now()};return et("fetch",Object.assign({},n)),t.apply(V,e).then(t=>(et("fetch",Object.assign(Object.assign({},n),{endTimestamp:Date.now(),response:t})),t),t=>{throw et("fetch",Object.assign(Object.assign({},n),{endTimestamp:Date.now(),error:t})),t})}})}();break;case"history":!function(){if(!function(){const t=h(),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=V.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=it,e=String(n);it=e,et("history",{from:t,to:e})}return t.apply(this,e)}}V.onpopstate=function(...e){const n=V.location.href,r=it;if(it=n,et("history",{from:r,to:n}),t)try{return t.apply(this,e)}catch(t){}},q(V.history,"pushState",e),q(V.history,"replaceState",e)}();break;case"error":at=V.onerror,V.onerror=function(t,e,n,r,i){return et("error",{column:r,error:i,line:n,msg:t,url:e}),!!at&&at.apply(this,arguments)};break;case"unhandledrejection":ht=V.onunhandledrejection,V.onunhandledrejection=function(t){return et("unhandledrejection",t),!ht||ht.apply(this,arguments)};break;default:R.warn("unknown instrumentation type:",t)}}function tt(t){t&&"string"==typeof t.type&&"function"==typeof t.callback&&(Q[t.type]=Q[t.type]||[],Q[t.type].push(t.callback),Z(t.type))}function et(t,e){if(t&&Q[t])for(const n of Q[t]||[])try{n(e)}catch(e){R.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${C(n)}\nError: ${e}`)}}function nt(t=[]){return"Request"in V&&j(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function rt(t=[]){return"string"==typeof t[0]?t[0]:"Request"in V&&j(t[0],Request)?t[0].url:String(t[0])}let it;const st=1e3;let ot,ct;function ut(t,e=!1){return n=>{if(!n||ct===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===ot?(t({event:n,name:r,global:e}),ct=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}(ct,n)&&(t({event:n,name:r,global:e}),ct=n),clearTimeout(ot),ot=V.setTimeout(()=>{ot=void 0},st)}}let at=null;let ht=null;function lt(){const t=h(),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 ft(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 dt(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 pt(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 vt(t,e){var n;if(!t.exception||!t.exception.values)return;const r=t.exception.values[0],i=r.mechanism;if(r.mechanism=Object.assign(Object.assign(Object.assign({},{type:"generic",handled:!0}),i),e),e&&"data"in e){const t=Object.assign(Object.assign({},null===(n=i)||void 0===n?void 0:n.data),e.data);r.mechanism.data=t}}const bt=6e4;function yt(t){var e;if(null===(e=t)||void 0===e?void 0:e.__sentry_captured__)return!0;try{Object.defineProperty(t,"__sentry_captured__",{value:!0})}catch(t){}return!1}var mt;!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(mt||(mt={}));class gt{constructor(t){this.p=mt.PENDING,this.v=[],this.m=(t=>{this.g(mt.RESOLVED,t)}),this.j=(t=>{this.g(mt.REJECTED,t)}),this.g=((t,e)=>{this.p===mt.PENDING&&(g(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===mt.PENDING)return;const t=this.v.slice();this.v=[],t.forEach(t=>{t.done||(this.p===mt.RESOLVED&&t.onfulfilled&&t.onfulfilled(this.O),this.p===mt.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 gt(e=>{e(t)})}static reject(t){return new gt((e,n)=>{n(t)})}static all(t){return new gt((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)=>{gt.resolve(t).then(t=>{i[s]=t,0===(r-=1)&&e(i)}).then(null,n)})})}then(t,e){return new gt((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 gt((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 jt{constructor(t){this.S=t,this.k=[]}isReady(){return void 0===this.S||this.length()<this.S}add(t){if(!this.isReady())return gt.reject(new _("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 gt(e=>{const n=setTimeout(()=>{t&&t>0&&e(!1)},t);gt.all(this.k).then(()=>{clearTimeout(n),e(!0)}).then(null,()=>{e(!0)})})}}const Ot={nowSeconds:()=>Date.now()/1e3};const wt=u()?function(){try{return(t=module,e="perf_hooks",t.require(e)).performance}catch(t){return}var t,e}():function(){const{performance:t}=h();if(t&&t.now)return{now:()=>t.now(),timeOrigin:Date.now()-t.now()}}(),Et=void 0===wt?Ot:{nowSeconds:()=>(wt.timeOrigin+wt.now())/1e3},_t=Ot.nowSeconds.bind(Ot),$t=Et.nowSeconds.bind(Et),xt=((()=>{const{performance:t}=h();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 St{constructor(){this.T=!1,this.D=[],this.R=[],this.N=[],this.I={},this.C={},this.M={},this.A={}}static clone(t){const e=new St;return t&&(e.N=[...t.N],e.C=Object.assign({},t.C),e.M=Object.assign({},t.M),e.A=Object.assign({},t.A),e.I=t.I,e.U=t.U,e.q=t.q,e.L=t.L,e.F=t.F,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.I=t||{},this.L&&this.L.update({user:t}),this.P(),this}getUser(){return this.I}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 St?e:this}return t instanceof St?(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.I&&Object.keys(t.I).length&&(this.I=t.I),t.U&&(this.U=t.U),t.B&&(this.B=t.B),t.H&&(this.H=t.H)):b(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.I=t.user),t.level&&(this.U=t.level),t.fingerprint&&(this.B=t.fingerprint),t.requestSession&&(this.H=t.requestSession)),this}clear(){return this.N=[],this.C={},this.M={},this.I={},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,xt):xt;if(n<=0)return this;const r=Object.assign({timestamp:_t()},t);return this.N=[...this.N,r].slice(-n),this.P(),this}clearBreadcrumbs(){return this.N=[],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.I&&Object.keys(this.I).length&&(t.user=Object.assign(Object.assign({},this.I),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.J(t),t.breadcrumbs=[...t.breadcrumbs||[],...this.N],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,this.W([...kt(),...this.R],t,e)}W(t,e,n,r=0){return new gt((i,s)=>{const o=t[r];if(null===e||"function"!=typeof o)i(e);else{const c=o(Object.assign({},e),n);g(c)?c.then(e=>this.W(t,e,n,r+1).then(i)).then(null,s):this.W(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)}J(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 kt(){const t=h();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function Tt(t){kt().push(t)}class Dt{constructor(t){this.errors=0,this.sid=lt(),this.duration=0,this.status=n.Ok,this.init=!0,this.ignoreDuration=!1;const e=$t();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||$t(),t.ignoreDuration&&(this.ignoreDuration=t.ignoreDuration),t.sid&&(this.sid=32===t.sid.length?t.sid:lt()),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 X({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:X({release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent})})}}const Rt=4,Nt=100;class It{constructor(t,e=new St,n=Rt){this.X=n,this.G=[{}],this.getStackTop().scope=e,t&&this.bindClient(t)}isOlderThan(t){return this.X<t}bindClient(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=St.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=lt();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=lt();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=lt();return"transaction"!==t.type&&(this.K=n),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=Nt}=r.getOptions&&r.getOptions()||{};if(s<=0)return;const o=_t(),c=Object.assign({timestamp:o},t),u=i?D(()=>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=Mt(this);try{t(this)}finally{Mt(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return R.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=h(),{userAgent:c}=o.navigator||{},u=new Dt(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=Ct().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);R.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function Ct(){const t=h();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function Mt(t){const e=Ct(),n=qt(e);return Lt(e,t),n}function At(){const t=Ct();return Ut(t)&&!qt(t).isOlderThan(Rt)||Lt(t,new It),u()?function(t){var e,n,r;try{const i=null===(r=null===(n=null===(e=Ct().__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 qt(t);if(!Ut(i)||qt(i).isOlderThan(Rt)){const e=qt(t).getStackTop();Lt(i,new It(e.client,St.clone(e.scope)))}return qt(i)}catch(e){return qt(t)}}(t):qt(t)}function Ut(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function qt(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub?t.__SENTRY__.hub:(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new It,t.__SENTRY__.hub)}function Lt(t,e){return!!t&&(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=e,!0)}function Ft(t,...e){const n=At();if(n&&n[t])return n[t](...e);throw new Error(`No hub defined or ${t} was not found on the hub, please open a bug report.`)}function captureException(t,e){let n;try{throw new Error("Sentry syntheticException")}catch(t){n=t}return Ft("captureException",t,{captureContext:e,originalException:t,syntheticException:n})}function Bt(t){Ft("withScope",t)}const Ht="7";class Pt{constructor(t,e={},n){this.dsn=t,this.tt=new S(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=${Ht}`];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:Ht};return e=t,Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&");var e}}const Jt=[];function Wt(t){return t.reduce((t,e)=>(t.every(t=>e.name!==t.name)&&t.push(e),t),[])}function Xt(t){const e={};return function(t){const e=t.defaultIntegrations&&[...t.defaultIntegrations]||[],n=t.integrations;let r=[...Wt(e)];Array.isArray(n)?r=[...r.filter(t=>n.every(e=>e.name!==t.name)),...Wt(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===Jt.indexOf(t.name)&&(t.setupOnce(Tt,At),Jt.push(t.name),R.log(`Integration installed: ${t.name}`))}(t)}),Object.defineProperty(e,"initialized",{value:!0}),e}const zt="Not capturing exception because it's already been captured.";class Gt{constructor(t,e){this.st={},this.ot=0,this.ct=new t(e),this.ut=e,e.dsn&&(this.at=new S(e.dsn))}captureException(t,e,n){if(yt(t))return void R.log(zt);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=v(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){var r;if((null===(r=e)||void 0===r?void 0:r.originalException)&&yt(e.originalException))return void R.log(zt);let i=e&&e.event_id;return this.ht(this.ft(t,e,n).then(t=>{i=t})),i}captureSession(t){this.dt()?"string"!=typeof t.release?R.warn("Discarded session because of missing or non-string release"):(this.pt(t),t.update({init:!1})):R.warn("SDK not enabled, will not capture session.")}getDsn(){return this.at}getOptions(){return this.ut}getTransport(){return this.lt().getTransport()}flush(t){return this.vt(t).then(e=>this.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.initialized&&(this.st=Xt(this.ut))}getIntegration(t){try{return this.st[t.id]||null}catch(e){return R.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}bt(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)}vt(t){return new gt(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:lt()),timestamp:t.timestamp||_t()});this.gt(i),this.jt(i);let s=e;n&&n.captureContext&&(s=St.clone(s).update(n.captureContext));let o=gt.resolve(i);return s&&(o=s.applyToEvent(i,n)),o.then(t=>"number"==typeof r&&r>0?this.Ot(t,r):t)}Ot(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:J(t.data,e)}))}),t.user&&{user:J(t.user,e)}),t.contexts&&{contexts:J(t.contexts,e)}),t.extra&&{extra:J(t.extra,e)});t.contexts&&t.contexts.trace&&(n.contexts.trace=t.contexts.trace);const{wt:r={}}=this.getOptions();return r.ensureNoCircularStructures?J(n):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=M(t.message,s));const o=t.exception&&t.exception.values&&t.exception.values[0];o&&o.value&&(o.value=M(o.value,s));const c=t.request;c&&c.url&&(c.url=M(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])}Et(t){this.lt().sendEvent(t)}ft(t,e,n){return this._t(t,e,n).then(t=>t.event_id,t=>{R.error(t)})}_t(t,e,n){var r,i;const{beforeSend:s,sampleRate:o}=this.getOptions(),u=this.getTransport();if(!this.dt())return gt.reject(new _("SDK not enabled, will not capture event."));const a="transaction"===t.type;return!a&&"number"==typeof o&&Math.random()>o?(null===(i=(r=u).recordLostEvent)||void 0===i||i.call(r,c.SampleRate,"event"),gt.reject(new _(`Discarding event because it's not included in the random sample (sampling rate = ${o})`))):this.yt(t,n,e).then(n=>{var r,i;if(null===n)throw null===(i=(r=u).recordLostEvent)||void 0===i||i.call(r,c.EventProcessor,t.type||"event"),new _("An event processor returned null, will not send event.");if(e&&e.data&&!0===e.data.__sentry__||a||!s)return n;const o=s(n,e);return this.$t(o)}).then(e=>{var r,i;if(null===e)throw null===(i=(r=u).recordLostEvent)||void 0===i||i.call(r,c.BeforeSend,t.type||"event"),new _("`beforeSend` returned `null`, will not send event.");const s=n&&n.getSession&&n.getSession();return!a&&s&&this.bt(s,e),this.Et(e),e}).then(null,t=>{if(t instanceof _)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new _(`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(g(t))return t.then(t=>{if(!b(t)&&null!==t)throw new _(e);return t},t=>{throw new _(`beforeSend rejected with ${t}`)});if(!b(t)&&null!==t)throw new _(e);return t}}class Kt{sendEvent(e){return gt.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:t.Status.Skipped})}close(t){return gt.resolve(!0)}}class Vt{constructor(t){this.ut=t,this.ut.dsn||R.warn("No DSN provided, backend will not do anything."),this.xt=this.St()}eventFromException(t,e){throw new _("Backend has to implement `eventFromException` method")}eventFromMessage(t,e,n){throw new _("Backend has to implement `eventFromMessage` method")}sendEvent(t){this.xt.sendEvent(t).then(null,t=>{R.error(`Error while sending event: ${t}`)})}sendSession(t){this.xt.sendSession?this.xt.sendSession(t).then(null,t=>{R.error(`Error while sending session: ${t}`)}):R.warn("Dropping session because custom transport doesn't implement sendSession")}getTransport(){return this.xt}St(){return new Kt}}function Qt(t){if(!t.metadata||!t.metadata.sdk)return;const{name:e,version:n}=t.metadata.sdk;return{name:e,version:n}}function Yt(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 Zt(t,e){const n=Qt(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 te(t,e){const n=Qt(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?Yt(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 ee="6.14.2";let ne;class re{constructor(){this.name=re.id}setupOnce(){ne=Function.prototype.toString,Function.prototype.toString=function(...t){const e=this.__sentry_original__||this;return ne.apply(e,t)}}}re.id="FunctionToString";const ie=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class se{constructor(t={}){this.ut=t,this.name=se.id}setupOnce(){Tt(t=>{const e=At();if(!e)return t;const n=e.getIntegration(se);if(n){const r=e.getClient(),i=r?r.getOptions():{},s="function"==typeof n._mergeOptions?n._mergeOptions(i):{};return"function"!=typeof n.kt?t:n.kt(t,s)?null:t}return t})}kt(t,e){return this.Tt(t,e)?(R.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${dt(t)}`),!0):this.Dt(t,e)?(R.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${dt(t)}`),!0):this.Rt(t,e)?(R.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${dt(t)}.\nUrl: ${this.Nt(t)}`),!0):!this.It(t,e)&&(R.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${dt(t)}.\nUrl: ${this.Nt(t)}`),!0)}Tt(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}}Dt(t,e){return!(!e.ignoreErrors||!e.ignoreErrors.length)&&this.Ct(t).some(t=>e.ignoreErrors.some(e=>U(t,e)))}Rt(t,e){if(!e.denyUrls||!e.denyUrls.length)return!1;const n=this.Nt(t);return!!n&&e.denyUrls.some(t=>U(n,t))}It(t,e){if(!e.allowUrls||!e.allowUrls.length)return!0;const n=this.Nt(t);return!n||e.allowUrls.some(t=>U(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||[],...ie],ignoreInternal:void 0===this.ut.ignoreInternal||this.ut.ignoreInternal}}Ct(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 R.error(`Cannot extract message for event ${dt(t)}`),[]}return[]}Mt(t=[]){var e,n;for(let r=t.length-1;r>=0;r--){const i=t[r];if("<anonymous>"!==(null===(e=i)||void 0===e?void 0:e.filename)&&"[native code]"!==(null===(n=i)||void 0===n?void 0:n.filename))return i.filename||null}return null}Nt(t){try{if(t.stacktrace){const e=t.stacktrace.frames;return this.Mt(e)}if(t.exception){const e=t.exception.values&&t.exception.values[0].stacktrace&&t.exception.values[0].stacktrace.frames;return this.Mt(e)}return null}catch(e){return R.error(`Cannot extract url for event ${dt(t)}`),null}}}se.id="InboundFilters";var oe=Object.freeze({__proto__:null,FunctionToString:re,InboundFilters:se});const ce="?",ue=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ae=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. \/=]+)(?::(\d+))?(?::(\d+))?\s*$/i,he=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,le=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,fe=/\((\S*)(?::(\d+))(?::(\d+))\)/,de=/Minified React error #\d+;/i;function pe(t){let e=null,n=0;t&&("number"==typeof t.framesToPop?n=t.framesToPop:de.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=ce),s.push(e))}if(!s.length)return null;return{message:ye(t),name:t.name,stack:s}}(t))return be(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=ue.exec(n[c])){const t=s[2]&&0===s[2].indexOf("native");(r=s[2]&&0===s[2].indexOf("eval"))&&(i=fe.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]||ce;[n,e]=ve(n,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=he.exec(n[c]))o={url:s[2],func:s[1]||ce,args:[],line:+s[3],column:s[4]?+s[4]:null};else{if(!(s=ae.exec(n[c])))continue;{(r=s[3]&&s[3].indexOf(" > eval")>-1)&&(i=le.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);let n=s[3],u=s[1]||ce;[u,n]=ve(u,n),o={url:n,func:u,args:s[2]?s[2].split(","):[],line:s[4]?+s[4]:null,column:s[5]?+s[5]:null}}}!o.func&&o.line&&(o.func=ce),e.push(o)}if(!e.length)return null;return{message:ye(t),name:t.name,stack:e}}(t))return be(e,n)}catch(t){}return{message:ye(t),name:t&&t.name,stack:[],failed:!0}}const ve=(t,e)=>{const n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:ce,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};function be(t,e){try{return Object.assign(Object.assign({},t),{stack:t.stack.slice(e)})}catch(e){return t}}function ye(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}const me=50;function ge(t){const e=Oe(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 je(t){return{exception:{values:[ge(t)]}}}function Oe(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,me).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 we(e,n,r){const i=_e(n,r&&r.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return vt(i),i.level=t.Severity.Error,r&&r.event_id&&(i.event_id=r.event_id),gt.resolve(i)}function Ee(e,n,r=t.Severity.Info,i){const s=$e(n,i&&i.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return s.level=r,i&&i.event_id&&(s.event_id=i.event_id),gt.resolve(s)}function _e(t,e,n={}){let r;if(f(t))return r=je(pe(t=t.error));if(d(t)||(i=t,"[object DOMException]"===Object.prototype.toString.call(i))){const i=t,s=i.name||(d(i)?"DOMError":"DOMException"),o=i.message?`${s}: ${i.message}`:s;return pt(r=$e(o,e,n),o),"code"in i&&(r.tags=Object.assign(Object.assign({},r.tags),{"DOMException.code":`${i.code}`})),r}var i;if(l(t))return r=je(pe(t));if(b(t)||y(t)){return vt(r=function(t,e,n){const r={exception:{values:[{type:y(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:`Non-Error ${n?"promise rejection":"exception"} captured with keys: ${W(t)}`}]},extra:{__serialized__:B(t)}};if(e){const t=Oe(pe(e).stack);r.stacktrace={frames:t}}return r}(t,e,n.rejection),{synthetic:!0}),r}return pt(r=$e(t,e,n),`${t}`,void 0),vt(r,{synthetic:!0}),r}function $e(t,e,n={}){const r={message:t};if(n.attachStacktrace&&e){const t=Oe(pe(e).stack);r.stacktrace={frames:t}}return r}const xe=h();let Se;function ke(){var t,e;if(Se)return Se;if(G(xe.fetch))return Se=xe.fetch.bind(xe);const n=xe.document;let r=xe.fetch;if("function"==typeof(null===(t=n)||void 0===t?void 0:t.createElement))try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t),(null===(e=t.contentWindow)||void 0===e?void 0:e.fetch)&&(r=t.contentWindow.fetch),n.head.removeChild(t)}catch(t){R.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return Se=r.bind(xe)}function Te(t,e){if("[object Navigator]"===Object.prototype.toString.call(xe&&xe.navigator)&&"function"==typeof xe.navigator.sendBeacon){return xe.navigator.sendBeacon.bind(xe.navigator)(t,e)}if(z()){const n=ke();n(t,{body:e,method:"POST",credentials:"omit",keepalive:!0}).then(null,t=>{console.error(t)})}else;}const De={event:"error",transaction:"transaction",session:"session",attachment:"attachment"},Re=h();class Ne{constructor(t){this.options=t,this.k=new jt(30),this.At={},this.Ut={},this.qt=new Pt(t.dsn,t.Lt,t.tunnel),this.url=this.qt.getStoreEndpointWithUrlEncodedAuth(),this.options.sendClientReports&&Re.document&&Re.document.addEventListener("visibilitychange",()=>{"hidden"===Re.document.visibilityState&&this.Ft()})}sendEvent(t){throw new _("Transport Class has to implement `sendEvent` method")}close(t){return this.k.drain(t)}recordLostEvent(t,e){var n;if(!this.options.sendClientReports)return;const r=`${De[e]}:${t}`;R.log(`Adding outcome: ${r}`),this.Ut[r]=(null!=(n=this.Ut[r])?n:0)+1}Ft(){if(!this.options.sendClientReports)return;const t=this.Ut;if(this.Ut={},!Object.keys(t).length)return void R.log("No outcomes to flush");R.log(`Flushing outcomes:\n${JSON.stringify(t,null,2)}`);const e=this.qt.getEnvelopeEndpointWithUrlEncodedAuth(),n=`${JSON.stringify(Object.assign({},this.options.tunnel&&{dsn:this.qt.getDsn().toString()}))}\n${JSON.stringify({type:"client_report"})}\n${JSON.stringify({timestamp:_t(),discarded_events:Object.keys(t).map(e=>{const[n,r]=e.split(":");return{reason:r,category:n,quantity:t[e]}})})}`;try{Te(e,n)}catch(t){R.error(t)}}Bt({requestType:e,response:n,headers:r,resolve:i,reject:s}){const o=t.Status.fromHttpCode(n.status);this.Ht(r)&&R.warn(`Too many ${e} requests, backing off until: ${this.Pt(e)}`),o!==t.Status.Success?s(n):i({status:o})}Pt(t){const e=De[t];return this.At[e]||this.At.all}Jt(t){return this.Pt(t)>new Date(Date.now())}Ht(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.At[t||"all"]=new Date(e+i)}return!0}return!!r&&(this.At.all=new Date(e+function(t,e){if(!e)return bt;const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?bt:r-t}(e,r)),!0)}}class Ie extends Ne{constructor(t,e=ke()){super(t),this.Wt=e}sendEvent(t){return this.Xt(te(t,this.qt),t)}sendSession(t){return this.Xt(Zt(t,this.qt),t)}Xt(t,e){if(this.Jt(t.type))return this.recordLostEvent(c.RateLimitBackoff,t.type),Promise.reject({event:e,type:t.type,reason:`Transport for ${t.type} requests locked till ${this.Pt(t.type)} due to too many requests.`,status:429});const n={body:t.body,method:"POST",referrerPolicy:K()?"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 gt((e,r)=>{this.Wt(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.Bt({requestType:t.type,response:n,headers:i,resolve:e,reject:r})}).catch(r)})).then(void 0,e=>{throw e instanceof _?this.recordLostEvent(c.QueueOverflow,t.type):this.recordLostEvent(c.NetworkError,t.type),e})}}class Ce extends Ne{sendEvent(t){return this.Xt(te(t,this.qt),t)}sendSession(t){return this.Xt(Zt(t,this.qt),t)}Xt(t,e){return this.Jt(t.type)?(this.recordLostEvent(c.RateLimitBackoff,t.type),Promise.reject({event:e,type:t.type,reason:`Transport for ${t.type} requests locked till ${this.Pt(t.type)} due to too many requests.`,status:429})):this.k.add(()=>new gt((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.Bt({requestType:t.type,response:r,headers:i,resolve:e,reject:n})}}),r.open("POST",t.url);for(const t in this.options.headers)Object.prototype.hasOwnProperty.call(this.options.headers,t)&&r.setRequestHeader(t,this.options.headers[t]);r.send(t.body)})).then(void 0,e=>{throw e instanceof _?this.recordLostEvent(c.QueueOverflow,t.type):this.recordLostEvent(c.NetworkError,t.type),e})}}var Me=Object.freeze({__proto__:null,BaseTransport:Ne,FetchTransport:Ie,XHRTransport:Ce});class Ae extends Vt{eventFromException(t,e){return we(this.ut,t,e)}eventFromMessage(e,n=t.Severity.Info,r){return Ee(this.ut,e,n,r)}St(){if(!this.ut.dsn)return super.St();const t=Object.assign(Object.assign({},this.ut.transportOptions),{dsn:this.ut.dsn,tunnel:this.ut.tunnel,sendClientReports:this.ut.sendClientReports,Lt:this.ut.Lt});return this.ut.transport?new this.ut.transport(t):z()?new Ie(t):new Ce(t)}}const Ue=h();let qe=0;function Le(){return qe>0}function Fe(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=>Fe(t,e));return t.handleEvent?t.handleEvent.apply(this,i):t.apply(this,i)}catch(t){throw qe+=1,setTimeout(()=>{qe-=1}),Bt(n=>{n.addEventProcessor(t=>{const n=Object.assign({},t);return e.mechanism&&(pt(n,void 0,void 0),vt(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 Be(t={}){if(!Ue.document)return;if(!t.eventId)return void R.error("Missing eventId option in showReportDialog call");if(!t.dsn)return void R.error("Missing dsn option in showReportDialog call");const e=Ue.document.createElement("script");e.async=!0,e.src=new Pt(t.dsn).getReportDialogEndpoint(t),t.onLoad&&(e.onload=t.onLoad);const n=Ue.document.head||Ue.document.body;n&&n.appendChild(e)}class He{constructor(t){this.name=He.id,this.zt=!1,this.Gt=!1,this.ut=Object.assign({onerror:!0,onunhandledrejection:!0},t)}setupOnce(){Error.stackTraceLimit=50,this.ut.onerror&&(R.log("Global Handler attached: onerror"),this.Kt()),this.ut.onunhandledrejection&&(R.log("Global Handler attached: onunhandledrejection"),this.Vt())}Kt(){this.zt||(tt({callback:t=>{const e=t.error,n=At(),r=n.getIntegration(He),i=e&&!0===e.__sentry_own_request__;if(!r||Le()||i)return;const s=n.getClient(),o=void 0===e&&p(t.msg)?this.Qt(t.msg,t.url,t.line,t.column):this.Yt(_e(e||t.msg,void 0,{attachStacktrace:s&&s.getOptions().attachStacktrace,rejection:!1}),t.url,t.line,t.column);vt(o,{handled:!1,type:"onerror"}),n.captureEvent(o,{originalException:e})},type:"error"}),this.zt=!0)}Vt(){this.Gt||(tt({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=At(),i=r.getIntegration(He),s=n&&!0===n.__sentry_own_request__;if(!i||Le()||s)return!0;const o=r.getClient(),c=v(n)?this.Zt(n):_e(n,void 0,{attachStacktrace:o&&o.getOptions().attachStacktrace,rejection:!0});c.level=t.Severity.Error,vt(c,{handled:!1,type:"onunhandledrejection"}),r.captureEvent(c,{originalException:n})},type:"unhandledrejection"}),this.Gt=!0)}Qt(t,e,n,r){let i,s=f(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.Yt(c,e,n,r)}Zt(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}Yt(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=p(e)&&e.length>0?e:function(){const t=h();try{return t.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}}He.id="GlobalHandlers";const Pe=["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 Je{constructor(t){this.name=Je.id,this.ut=Object.assign({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t)}setupOnce(){const t=h();if(this.ut.setTimeout&&q(t,"setTimeout",this.te.bind(this)),this.ut.setInterval&&q(t,"setInterval",this.te.bind(this)),this.ut.requestAnimationFrame&&q(t,"requestAnimationFrame",this.ee.bind(this)),this.ut.XMLHttpRequest&&"XMLHttpRequest"in t&&q(XMLHttpRequest.prototype,"send",this.ne.bind(this)),this.ut.eventTarget){(Array.isArray(this.ut.eventTarget)?this.ut.eventTarget:Pe).forEach(this.re.bind(this))}}te(t){return function(...e){const n=e[0];return e[0]=Fe(n,{mechanism:{data:{function:C(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}ee(t){return function(e){return t.call(this,Fe(e,{mechanism:{data:{function:"requestAnimationFrame",handler:C(t)},handled:!0,type:"instrument"}}))}}re(t){const e=h(),n=e[t]&&e[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(q(n,"addEventListener",function(e){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=Fe(r.handleEvent.bind(r),{mechanism:{data:{function:"handleEvent",handler:C(r),target:t},handled:!0,type:"instrument"}}))}catch(t){}return e.call(this,n,Fe(r,{mechanism:{data:{function:"addEventListener",handler:C(r),target:t},handled:!0,type:"instrument"}}),i)}}),q(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)}}))}ne(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(t=>{t in n&&"function"==typeof n[t]&&q(n,t,function(e){const n={mechanism:{data:{function:t,handler:C(e)},handled:!0,type:"instrument"}};return e.__sentry_original__&&(n.mechanism.data.handler=C(e.__sentry_original__)),Fe(e,n)})}),t.apply(this,e)}}}Je.id="TryCatch";class We{constructor(t){this.name=We.id,this.ut=Object.assign({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}addSentryBreadcrumb(t){this.ut.sentry&&At().addBreadcrumb({category:`sentry.${"transaction"===t.type?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:dt(t)},{event:t})}setupOnce(){this.ut.console&&tt({callback:(...t)=>{this.ie(...t)},type:"console"}),this.ut.dom&&tt({callback:(...t)=>{this.se(...t)},type:"dom"}),this.ut.xhr&&tt({callback:(...t)=>{this.oe(...t)},type:"xhr"}),this.ut.fetch&&tt({callback:(...t)=>{this.ce(...t)},type:"fetch"}),this.ut.history&&tt({callback:(...t)=>{this.ue(...t)},type:"history"})}ie(e){const n={category:"console",data:{arguments:e.args,logger:"console"},level:t.Severity.fromString(e.level),message:A(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;n.message=`Assertion failed: ${A(e.args.slice(1)," ")||"console.assert"}`,n.data.arguments=e.args.slice(1)}At().addBreadcrumb(n,{input:e.args,level:e.level})}se(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?O(t.event.target,n):O(t.event,n)}catch(t){e="<unknown>"}0!==e.length&&At().addBreadcrumb({category:`ui.${t.name}`,message:e},{event:t.event,name:t.name,global:t.global})}oe(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__||{};At().addBreadcrumb({category:"xhr",data:{method:e,url:n,status_code:r},type:"http"},{xhr:t.xhr,input:i})}else;}ce(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?At().addBreadcrumb({category:"fetch",data:e.fetchData,level:t.Severity.Error,type:"http"},{data:e.error,input:e.args}):At().addBreadcrumb({category:"fetch",data:Object.assign(Object.assign({},e.fetchData),{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response})))}ue(t){const e=h();let n=t.from,r=t.to;const i=ft(e.location.href);let s=ft(n);const o=ft(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),At().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}}We.id="Breadcrumbs";const Xe="cause",ze=5;class Ge{constructor(t={}){this.name=Ge.id,this.ae=t.key||Xe,this.S=t.limit||ze}setupOnce(){Tt((t,e)=>{const n=At().getIntegration(Ge);if(n){const r=n.he&&n.he.bind(n);return"function"==typeof r?r(t,e):t}return t})}he(t,e){if(!(t.exception&&t.exception.values&&e&&j(e.originalException,Error)))return t;const n=this.le(e.originalException,this.ae);return t.exception.values=[...n,...t.exception.values],t}le(t,e,n=[]){if(!j(t[e],Error)||n.length+1>=this.S)return n;const r=ge(pe(t[e]));return this.le(t[e],e,[r,...n])}}Ge.id="LinkedErrors";const Ke=h();class Ve{constructor(){this.name=Ve.id}setupOnce(){Tt(t=>{var e,n,r;if(At().getIntegration(Ve)){if(!Ke.navigator&&!Ke.location&&!Ke.document)return t;const i=(null===(e=t.request)||void 0===e?void 0:e.url)||(null===(n=Ke.location)||void 0===n?void 0:n.href),{referrer:s}=Ke.document||{},{userAgent:o}=Ke.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})}}Ve.id="UserAgent";class Qe{constructor(){this.name=Qe.id}setupOnce(t,e){t(t=>{const n=e().getIntegration(Qe);if(n){try{if(n.kt(t,n.fe))return R.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){return n.fe=t}return n.fe=t}return t})}kt(t,e){return!!e&&(!!this.de(t,e)||!!this.pe(t,e))}de(t,e){const n=t.message,r=e.message;return!(!n&&!r)&&(!(n&&!r||!n&&r)&&(n===r&&(!!this.ve(t,e)&&!!this.be(t,e))))}ye(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}be(t,e){let n=this.ye(t),r=this.ye(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}me(t){return t.exception&&t.exception.values&&t.exception.values[0]}pe(t,e){const n=this.me(e),r=this.me(t);return!(!n||!r)&&(n.type===r.type&&n.value===r.value&&(!!this.ve(t,e)&&!!this.be(t,e)))}ve(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}}}Qe.id="Dedupe";var Ye=Object.freeze({__proto__:null,GlobalHandlers:He,TryCatch:Je,Breadcrumbs:We,LinkedErrors:Ge,UserAgent:Ve,Dedupe:Qe});class Ze extends Gt{constructor(t={}){t.Lt=t.Lt||{},t.Lt.sdk=t.Lt.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:ee}],version:ee},super(Ae,t)}showReportDialog(t={}){h().document&&(this.dt()?Be(Object.assign(Object.assign({},t),{dsn:t.dsn||this.getDsn()})):R.error("Trying to call showReportDialog with Sentry Client disabled"))}yt(t,e,n){return t.platform=t.platform||"javascript",super.yt(t,e,n)}Et(t){const e=this.getIntegration(We);e&&e.addSentryBreadcrumb(t),super.Et(t)}}const tn=[new se,new re,new Je,new We,new He,new Ge,new Qe,new Ve];let en={};const nn=h();nn.Sentry&&nn.Sentry.Integrations&&(en=nn.Sentry.Integrations);const rn=Object.assign(Object.assign(Object.assign({},en),oe),Ye);return t.BrowserClient=Ze,t.Hub=It,t.Integrations=rn,t.SDK_NAME="sentry.javascript.browser",t.SDK_VERSION=ee,t.Scope=St,t.Transports=Me,t.addBreadcrumb=function(t){Ft("addBreadcrumb",t)},t.addGlobalEventProcessor=Tt,t.captureEvent=function(t){return Ft("captureEvent",t)},t.captureException=captureException,t.captureMessage=function(t,e){let n;try{throw new Error(t)}catch(t){n=t}const r="string"!=typeof e?{captureContext:e}:void 0;return Ft("captureMessage",t,"string"==typeof e?e:void 0,Object.assign({originalException:t,syntheticException:n},r))},t.close=function(t){const e=At().getClient();return e?e.close(t):(R.warn("Cannot flush events and disable SDK. No client defined."),gt.resolve(!1))},t.configureScope=function(t){Ft("configureScope",t)},t.defaultIntegrations=tn,t.eventFromException=we,t.eventFromMessage=Ee,t.flush=function(t){const e=At().getClient();return e?e.flush(t):(R.warn("Cannot flush events. No client defined."),gt.resolve(!1))},t.forceLoad=function(){},t.getCurrentHub=At,t.getHubFromCarrier=qt,t.init=function(t={}){if(void 0===t.defaultIntegrations&&(t.defaultIntegrations=tn),void 0===t.release){const e=h();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),void 0===t.sendClientReports&&(t.sendClientReports=!0),function(t,e){var n;!0===e.debug&&R.enable();const r=At();null===(n=r.getScope())||void 0===n||n.update(e.initialScope);const i=new t(e);r.bindClient(i)}(Ze,t),t.autoSessionTracking&&function(){if(void 0===h().document)return void R.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");const t=At();"function"==typeof t.startSession&&"function"==typeof t.captureSession&&(t.startSession({ignoreDuration:!0}),t.captureSession(),tt({callback:({from:e,to:n})=>{void 0!==e&&e!==n&&(t.startSession({ignoreDuration:!0}),t.captureSession())},type:"history"}))}()},t.injectReportDialog=Be,t.lastEventId=function(){return At().lastEventId()},t.makeMain=Mt,t.onLoad=function(t){t()},t.setContext=function(t,e){Ft("setContext",t,e)},t.setExtra=function(t,e){Ft("setExtra",t,e)},t.setExtras=function(t){Ft("setExtras",t)},t.setTag=function(t,e){Ft("setTag",t,e)},t.setTags=function(t){Ft("setTags",t)},t.setUser=function(t){Ft("setUser",t)},t.showReportDialog=function(t={}){const e=At(),n=e.getScope();n&&(t.user=Object.assign(Object.assign({},n.getUser()),t.user)),t.eventId||(t.eventId=e.lastEventId());const r=e.getClient();r&&r.showReportDialog(t)},t.startTransaction=function(t,e){return Ft("startTransaction",Object.assign({},t),e)},t.withScope=Bt,t.wrap=function(t){return Fe(t)()},t}({});
|
|
1
|
+
/*! @sentry/browser 6.14.3 (3807d99) | https://github.com/getsentry/sentry-javascript */
|
|
2
|
+
var Sentry=function(t){var e,n,r,i,s,o,c;function u(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}!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={})),function(t){t.BeforeSend="before_send",t.EventProcessor="event_processor",t.NetworkError="network_error",t.QueueOverflow="queue_overflow",t.RateLimitBackoff="ratelimit_backoff",t.SampleRate="sample_rate"}(c||(c={}));const a={};function h(){return u()?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:a}function l(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return j(t,Error)}}function f(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)}function d(t){return"[object DOMError]"===Object.prototype.toString.call(t)}function p(t){return"[object String]"===Object.prototype.toString.call(t)}function v(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function b(t){return"[object Object]"===Object.prototype.toString.call(t)}function y(t){return"undefined"!=typeof Event&&j(t,Event)}function m(t){return"undefined"!=typeof Element&&j(t,Element)}function g(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function j(t,e){try{return t instanceof e}catch(t){return!1}}function O(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=w(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 w(t,e){var n,r;const i=t,s=[];let o,c,u,a,h;if(!i||!i.tagName)return"";s.push(i.tagName.toLowerCase());const l=(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=l)||void 0===r?void 0:r.length)l.forEach(t=>{s.push(`[${t[0]}="${t[1]}"]`)});else if(i.id&&s.push(`#${i.id}`),(o=i.className)&&p(o))for(c=o.split(/\s+/),h=0;h<c.length;h++)s.push(`.${c[h]}`);const f=["type","name","title","alt"];for(h=0;h<f.length;h++)u=f[h],(a=i.getAttribute(u))&&s.push(`[${u}="${a}"]`);return s.join("")}const E=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){return t.__proto__=e,t}:function(t,e){for(const n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n]);return t});class _ extends Error{constructor(t){super(t),this.message=t,this.name=new.target.prototype.constructor.name,E(this,new.target.prototype)}}const $=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,x="Invalid Dsn";class S{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=$.exec(t);if(!e)throw new _(x);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 _(`${x}: ${t} missing`)}),!this.projectId.match(/^\d+$/))throw new _(`${x}: Invalid projectId ${this.projectId}`);if("http"!==this.protocol&&"https"!==this.protocol)throw new _(`${x}: Invalid protocol ${this.protocol}`);if(this.port&&isNaN(parseInt(this.port,10)))throw new _(`${x}: Invalid port ${this.port}`)}}const k=h(),T="Sentry Logger ";function D(t){const e=h();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}k.__SENTRY__=k.__SENTRY__||{};const R=k.__SENTRY__.logger||(k.__SENTRY__.logger=new class{constructor(){this.o=!1}disable(){this.o=!1}enable(){this.o=!0}log(...t){this.o&&D(()=>{k.console.log(`${T}[Log]: ${t.join(" ")}`)})}warn(...t){this.o&&D(()=>{k.console.warn(`${T}[Warn]: ${t.join(" ")}`)})}error(...t){this.o&&D(()=>{k.console.error(`${T}[Error]: ${t.join(" ")}`)})}});class N{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 I="<anonymous>";function C(t){try{return t&&"function"==typeof t&&t.name||I}catch(t){return I}}function M(t,e=0){return"string"!=typeof t||0===e?t:t.length<=e?t:`${t.substr(0,e)}...`}function A(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 U(t,e){return!!p(t)&&(n=e,"[object RegExp]"===Object.prototype.toString.call(n)?e.test(t):"string"==typeof e&&-1!==t.indexOf(e));var n}function q(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 L(t){if(l(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(y(t)){const e=t,n={};n.type=e.type;try{n.target=m(e.target)?O(e.target):Object.prototype.toString.call(e.target)}catch(t){n.target="<unknown>"}try{n.currentTarget=m(e.currentTarget)?O(e.currentTarget):Object.prototype.toString.call(e.currentTarget)}catch(t){n.currentTarget="<unknown>"}"undefined"!=typeof CustomEvent&&j(t,CustomEvent)&&(n.detail=e.detail);for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n}return t}function F(t){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}function B(t,e=3,n=102400){const r=J(t,e);return F(r)>n?B(t,e-1,n):r}function H(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]":b(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: ${C(t)}]`:"symbol"==typeof t?`[${String(t)}]`:"bigint"==typeof t?`[BigInt: ${String(t)}]`:t;var n}function P(t,e,n=1/0,r=new N){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=H(t);return v(n)?n:e}(e);if(null!=e&&"function"==typeof e.toJSON)return e.toJSON();const i=H(e,t);if(v(i))return i;const s=L(e),o=Array.isArray(e)?[]:{};if(r.memoize(e))return"[Circular ~]";for(const t in s)Object.prototype.hasOwnProperty.call(s,t)&&(o[t]=P(t,s[t],n-1,r));return r.unmemoize(e),o}function J(t,e){try{return JSON.parse(JSON.stringify(t,(t,n)=>P(t,n,e)))}catch(t){return"**non-serializable**"}}function W(t,e=40){const n=Object.keys(L(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return M(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:M(r,e)}return""}function X(t){if(b(t)){const e=t,n={};for(const t of Object.keys(e))void 0!==e[t]&&(n[t]=X(e[t]));return n}return Array.isArray(t)?t.map(X):t}function z(){if(!("fetch"in h()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function G(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function K(){if(!z())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}const V=h(),Q={},Y={};function Z(t){if(!Y[t])switch(Y[t]=!0,t){case"console":!function(){if(!("console"in V))return;["debug","info","warn","error","log","assert"].forEach(function(t){t in V.console&&q(V.console,t,function(e){return function(...n){et("console",{args:n,level:t}),e&&Function.prototype.apply.call(e,V.console,n)}})})}();break;case"dom":!function(){if(!("document"in V))return;const t=et.bind(null,"dom"),e=ut(t,!0);V.document.addEventListener("click",e,!1),V.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(e=>{const n=V[e]&&V[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(q(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=ut(t);o.handler=r,e.call(this,n,r,i)}o.refCount+=1}catch(t){}return e.call(this,n,r,i)}}),q(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 V))return;const t=[],e=[],n=XMLHttpRequest.prototype;q(n,"open",function(n){return function(...r){const i=this,s=r[1];i.__sentry_xhr__={method:p(r[0])?r[0].toUpperCase():r[0],url:r[1]},p(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){}et("xhr",{args:r,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:i})}};return"onreadystatechange"in i&&"function"==typeof i.onreadystatechange?q(i,"onreadystatechange",function(t){return function(...e){return o(),t.apply(i,e)}}):i.addEventListener("readystatechange",o),n.apply(i,r)}}),q(n,"send",function(n){return function(...r){return t.push(this),e.push(r),et("xhr",{args:r,startTimestamp:Date.now(),xhr:this}),n.apply(this,r)}})}();break;case"fetch":!function(){if(!function(){if(!z())return!1;const t=h();if(G(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=G(t.contentWindow.fetch)),n.head.removeChild(t)}catch(t){R.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return e}())return;q(V,"fetch",function(t){return function(...e){const n={args:e,fetchData:{method:nt(e),url:rt(e)},startTimestamp:Date.now()};return et("fetch",Object.assign({},n)),t.apply(V,e).then(t=>(et("fetch",Object.assign(Object.assign({},n),{endTimestamp:Date.now(),response:t})),t),t=>{throw et("fetch",Object.assign(Object.assign({},n),{endTimestamp:Date.now(),error:t})),t})}})}();break;case"history":!function(){if(!function(){const t=h(),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=V.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=it,e=String(n);it=e,et("history",{from:t,to:e})}return t.apply(this,e)}}V.onpopstate=function(...e){const n=V.location.href,r=it;if(it=n,et("history",{from:r,to:n}),t)try{return t.apply(this,e)}catch(t){}},q(V.history,"pushState",e),q(V.history,"replaceState",e)}();break;case"error":at=V.onerror,V.onerror=function(t,e,n,r,i){return et("error",{column:r,error:i,line:n,msg:t,url:e}),!!at&&at.apply(this,arguments)};break;case"unhandledrejection":ht=V.onunhandledrejection,V.onunhandledrejection=function(t){return et("unhandledrejection",t),!ht||ht.apply(this,arguments)};break;default:R.warn("unknown instrumentation type:",t)}}function tt(t){t&&"string"==typeof t.type&&"function"==typeof t.callback&&(Q[t.type]=Q[t.type]||[],Q[t.type].push(t.callback),Z(t.type))}function et(t,e){if(t&&Q[t])for(const n of Q[t]||[])try{n(e)}catch(e){R.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${C(n)}\nError: ${e}`)}}function nt(t=[]){return"Request"in V&&j(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function rt(t=[]){return"string"==typeof t[0]?t[0]:"Request"in V&&j(t[0],Request)?t[0].url:String(t[0])}let it;const st=1e3;let ot,ct;function ut(t,e=!1){return n=>{if(!n||ct===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===ot?(t({event:n,name:r,global:e}),ct=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}(ct,n)&&(t({event:n,name:r,global:e}),ct=n),clearTimeout(ot),ot=V.setTimeout(()=>{ot=void 0},st)}}let at=null;let ht=null;function lt(){const t=h(),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 ft(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 dt(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 pt(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 vt(t,e){var n;if(!t.exception||!t.exception.values)return;const r=t.exception.values[0],i=r.mechanism;if(r.mechanism=Object.assign(Object.assign(Object.assign({},{type:"generic",handled:!0}),i),e),e&&"data"in e){const t=Object.assign(Object.assign({},null===(n=i)||void 0===n?void 0:n.data),e.data);r.mechanism.data=t}}const bt=6e4;function yt(t){var e;if(null===(e=t)||void 0===e?void 0:e.__sentry_captured__)return!0;try{Object.defineProperty(t,"__sentry_captured__",{value:!0})}catch(t){}return!1}var mt;!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(mt||(mt={}));class gt{constructor(t){this.p=mt.PENDING,this.v=[],this.m=(t=>{this.g(mt.RESOLVED,t)}),this.j=(t=>{this.g(mt.REJECTED,t)}),this.g=((t,e)=>{this.p===mt.PENDING&&(g(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===mt.PENDING)return;const t=this.v.slice();this.v=[],t.forEach(t=>{t.done||(this.p===mt.RESOLVED&&t.onfulfilled&&t.onfulfilled(this.O),this.p===mt.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 gt(e=>{e(t)})}static reject(t){return new gt((e,n)=>{n(t)})}static all(t){return new gt((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)=>{gt.resolve(t).then(t=>{i[s]=t,0===(r-=1)&&e(i)}).then(null,n)})})}then(t,e){return new gt((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 gt((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 jt{constructor(t){this.S=t,this.k=[]}isReady(){return void 0===this.S||this.length()<this.S}add(t){if(!this.isReady())return gt.reject(new _("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 gt(e=>{const n=setTimeout(()=>{t&&t>0&&e(!1)},t);gt.all(this.k).then(()=>{clearTimeout(n),e(!0)}).then(null,()=>{e(!0)})})}}const Ot={nowSeconds:()=>Date.now()/1e3};const wt=u()?function(){try{return(t=module,e="perf_hooks",t.require(e)).performance}catch(t){return}var t,e}():function(){const{performance:t}=h();if(t&&t.now)return{now:()=>t.now(),timeOrigin:Date.now()-t.now()}}(),Et=void 0===wt?Ot:{nowSeconds:()=>(wt.timeOrigin+wt.now())/1e3},_t=Ot.nowSeconds.bind(Ot),$t=Et.nowSeconds.bind(Et),xt=((()=>{const{performance:t}=h();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 St{constructor(){this.T=!1,this.D=[],this.R=[],this.N=[],this.I={},this.C={},this.M={},this.A={}}static clone(t){const e=new St;return t&&(e.N=[...t.N],e.C=Object.assign({},t.C),e.M=Object.assign({},t.M),e.A=Object.assign({},t.A),e.I=t.I,e.U=t.U,e.q=t.q,e.L=t.L,e.F=t.F,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.I=t||{},this.L&&this.L.update({user:t}),this.P(),this}getUser(){return this.I}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 St?e:this}return t instanceof St?(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.I&&Object.keys(t.I).length&&(this.I=t.I),t.U&&(this.U=t.U),t.B&&(this.B=t.B),t.H&&(this.H=t.H)):b(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.I=t.user),t.level&&(this.U=t.level),t.fingerprint&&(this.B=t.fingerprint),t.requestSession&&(this.H=t.requestSession)),this}clear(){return this.N=[],this.C={},this.M={},this.I={},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,xt):xt;if(n<=0)return this;const r=Object.assign({timestamp:_t()},t);return this.N=[...this.N,r].slice(-n),this.P(),this}clearBreadcrumbs(){return this.N=[],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.I&&Object.keys(this.I).length&&(t.user=Object.assign(Object.assign({},this.I),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.J(t),t.breadcrumbs=[...t.breadcrumbs||[],...this.N],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,this.W([...kt(),...this.R],t,e)}W(t,e,n,r=0){return new gt((i,s)=>{const o=t[r];if(null===e||"function"!=typeof o)i(e);else{const c=o(Object.assign({},e),n);g(c)?c.then(e=>this.W(t,e,n,r+1).then(i)).then(null,s):this.W(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)}J(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 kt(){const t=h();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function Tt(t){kt().push(t)}class Dt{constructor(t){this.errors=0,this.sid=lt(),this.duration=0,this.status=n.Ok,this.init=!0,this.ignoreDuration=!1;const e=$t();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||$t(),t.ignoreDuration&&(this.ignoreDuration=t.ignoreDuration),t.sid&&(this.sid=32===t.sid.length?t.sid:lt()),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 X({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:X({release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent})})}}const Rt=4,Nt=100;class It{constructor(t,e=new St,n=Rt){this.X=n,this.G=[{}],this.getStackTop().scope=e,t&&this.bindClient(t)}isOlderThan(t){return this.X<t}bindClient(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=St.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=lt();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=lt();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=lt();return"transaction"!==t.type&&(this.K=n),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=Nt}=r.getOptions&&r.getOptions()||{};if(s<=0)return;const o=_t(),c=Object.assign({timestamp:o},t),u=i?D(()=>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=Mt(this);try{t(this)}finally{Mt(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return R.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=h(),{userAgent:c}=o.navigator||{},u=new Dt(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=Ct().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);R.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function Ct(){const t=h();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function Mt(t){const e=Ct(),n=qt(e);return Lt(e,t),n}function At(){const t=Ct();return Ut(t)&&!qt(t).isOlderThan(Rt)||Lt(t,new It),u()?function(t){var e,n,r;try{const i=null===(r=null===(n=null===(e=Ct().__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 qt(t);if(!Ut(i)||qt(i).isOlderThan(Rt)){const e=qt(t).getStackTop();Lt(i,new It(e.client,St.clone(e.scope)))}return qt(i)}catch(e){return qt(t)}}(t):qt(t)}function Ut(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function qt(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub?t.__SENTRY__.hub:(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new It,t.__SENTRY__.hub)}function Lt(t,e){return!!t&&(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=e,!0)}function Ft(t,...e){const n=At();if(n&&n[t])return n[t](...e);throw new Error(`No hub defined or ${t} was not found on the hub, please open a bug report.`)}function captureException(t,e){let n;try{throw new Error("Sentry syntheticException")}catch(t){n=t}return Ft("captureException",t,{captureContext:e,originalException:t,syntheticException:n})}function Bt(t){Ft("withScope",t)}const Ht="7";class Pt{constructor(t,e={},n){this.dsn=t,this.tt=new S(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=${Ht}`];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:Ht};return e=t,Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&");var e}}const Jt=[];function Wt(t){return t.reduce((t,e)=>(t.every(t=>e.name!==t.name)&&t.push(e),t),[])}function Xt(t){const e={};return function(t){const e=t.defaultIntegrations&&[...t.defaultIntegrations]||[],n=t.integrations;let r=[...Wt(e)];Array.isArray(n)?r=[...r.filter(t=>n.every(e=>e.name!==t.name)),...Wt(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===Jt.indexOf(t.name)&&(t.setupOnce(Tt,At),Jt.push(t.name),R.log(`Integration installed: ${t.name}`))}(t)}),Object.defineProperty(e,"initialized",{value:!0}),e}const zt="Not capturing exception because it's already been captured.";class Gt{constructor(t,e){this.st={},this.ot=0,this.ct=new t(e),this.ut=e,e.dsn&&(this.at=new S(e.dsn))}captureException(t,e,n){if(yt(t))return void R.log(zt);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=v(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){var r;if((null===(r=e)||void 0===r?void 0:r.originalException)&&yt(e.originalException))return void R.log(zt);let i=e&&e.event_id;return this.ht(this.ft(t,e,n).then(t=>{i=t})),i}captureSession(t){this.dt()?"string"!=typeof t.release?R.warn("Discarded session because of missing or non-string release"):(this.pt(t),t.update({init:!1})):R.warn("SDK not enabled, will not capture session.")}getDsn(){return this.at}getOptions(){return this.ut}getTransport(){return this.lt().getTransport()}flush(t){return this.vt(t).then(e=>this.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.initialized&&(this.st=Xt(this.ut))}getIntegration(t){try{return this.st[t.id]||null}catch(e){return R.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}bt(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)}vt(t){return new gt(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:lt()),timestamp:t.timestamp||_t()});this.gt(i),this.jt(i);let s=e;n&&n.captureContext&&(s=St.clone(s).update(n.captureContext));let o=gt.resolve(i);return s&&(o=s.applyToEvent(i,n)),o.then(t=>"number"==typeof r&&r>0?this.Ot(t,r):t)}Ot(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:J(t.data,e)}))}),t.user&&{user:J(t.user,e)}),t.contexts&&{contexts:J(t.contexts,e)}),t.extra&&{extra:J(t.extra,e)});t.contexts&&t.contexts.trace&&(n.contexts.trace=t.contexts.trace);const{wt:r={}}=this.getOptions();return r.ensureNoCircularStructures?J(n):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=M(t.message,s));const o=t.exception&&t.exception.values&&t.exception.values[0];o&&o.value&&(o.value=M(o.value,s));const c=t.request;c&&c.url&&(c.url=M(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])}Et(t){this.lt().sendEvent(t)}ft(t,e,n){return this._t(t,e,n).then(t=>t.event_id,t=>{R.error(t)})}_t(t,e,n){var r,i;const{beforeSend:s,sampleRate:o}=this.getOptions(),u=this.getTransport();if(!this.dt())return gt.reject(new _("SDK not enabled, will not capture event."));const a="transaction"===t.type;return!a&&"number"==typeof o&&Math.random()>o?(null===(i=(r=u).recordLostEvent)||void 0===i||i.call(r,c.SampleRate,"event"),gt.reject(new _(`Discarding event because it's not included in the random sample (sampling rate = ${o})`))):this.yt(t,n,e).then(n=>{var r,i;if(null===n)throw null===(i=(r=u).recordLostEvent)||void 0===i||i.call(r,c.EventProcessor,t.type||"event"),new _("An event processor returned null, will not send event.");if(e&&e.data&&!0===e.data.__sentry__||a||!s)return n;const o=s(n,e);return this.$t(o)}).then(e=>{var r,i;if(null===e)throw null===(i=(r=u).recordLostEvent)||void 0===i||i.call(r,c.BeforeSend,t.type||"event"),new _("`beforeSend` returned `null`, will not send event.");const s=n&&n.getSession&&n.getSession();return!a&&s&&this.bt(s,e),this.Et(e),e}).then(null,t=>{if(t instanceof _)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new _(`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(g(t))return t.then(t=>{if(!b(t)&&null!==t)throw new _(e);return t},t=>{throw new _(`beforeSend rejected with ${t}`)});if(!b(t)&&null!==t)throw new _(e);return t}}class Kt{sendEvent(e){return gt.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:t.Status.Skipped})}close(t){return gt.resolve(!0)}}class Vt{constructor(t){this.ut=t,this.ut.dsn||R.warn("No DSN provided, backend will not do anything."),this.xt=this.St()}eventFromException(t,e){throw new _("Backend has to implement `eventFromException` method")}eventFromMessage(t,e,n){throw new _("Backend has to implement `eventFromMessage` method")}sendEvent(t){this.xt.sendEvent(t).then(null,t=>{R.error(`Error while sending event: ${t}`)})}sendSession(t){this.xt.sendSession?this.xt.sendSession(t).then(null,t=>{R.error(`Error while sending session: ${t}`)}):R.warn("Dropping session because custom transport doesn't implement sendSession")}getTransport(){return this.xt}St(){return new Kt}}function Qt(t){if(!t.metadata||!t.metadata.sdk)return;const{name:e,version:n}=t.metadata.sdk;return{name:e,version:n}}function Yt(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 Zt(t,e){const n=Qt(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 te(t,e){const n=Qt(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?Yt(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 ee="6.14.3";let ne;class re{constructor(){this.name=re.id}setupOnce(){ne=Function.prototype.toString,Function.prototype.toString=function(...t){const e=this.__sentry_original__||this;return ne.apply(e,t)}}}re.id="FunctionToString";const ie=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class se{constructor(t={}){this.ut=t,this.name=se.id}setupOnce(){Tt(t=>{const e=At();if(!e)return t;const n=e.getIntegration(se);if(n){const r=e.getClient(),i=r?r.getOptions():{},s="function"==typeof n._mergeOptions?n._mergeOptions(i):{};return"function"!=typeof n.kt?t:n.kt(t,s)?null:t}return t})}kt(t,e){return this.Tt(t,e)?(R.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${dt(t)}`),!0):this.Dt(t,e)?(R.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${dt(t)}`),!0):this.Rt(t,e)?(R.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${dt(t)}.\nUrl: ${this.Nt(t)}`),!0):!this.It(t,e)&&(R.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${dt(t)}.\nUrl: ${this.Nt(t)}`),!0)}Tt(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}}Dt(t,e){return!(!e.ignoreErrors||!e.ignoreErrors.length)&&this.Ct(t).some(t=>e.ignoreErrors.some(e=>U(t,e)))}Rt(t,e){if(!e.denyUrls||!e.denyUrls.length)return!1;const n=this.Nt(t);return!!n&&e.denyUrls.some(t=>U(n,t))}It(t,e){if(!e.allowUrls||!e.allowUrls.length)return!0;const n=this.Nt(t);return!n||e.allowUrls.some(t=>U(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||[],...ie],ignoreInternal:void 0===this.ut.ignoreInternal||this.ut.ignoreInternal}}Ct(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 R.error(`Cannot extract message for event ${dt(t)}`),[]}return[]}Mt(t=[]){var e,n;for(let r=t.length-1;r>=0;r--){const i=t[r];if("<anonymous>"!==(null===(e=i)||void 0===e?void 0:e.filename)&&"[native code]"!==(null===(n=i)||void 0===n?void 0:n.filename))return i.filename||null}return null}Nt(t){try{if(t.stacktrace){const e=t.stacktrace.frames;return this.Mt(e)}if(t.exception){const e=t.exception.values&&t.exception.values[0].stacktrace&&t.exception.values[0].stacktrace.frames;return this.Mt(e)}return null}catch(e){return R.error(`Cannot extract url for event ${dt(t)}`),null}}}se.id="InboundFilters";var oe=Object.freeze({__proto__:null,FunctionToString:re,InboundFilters:se});const ce="?",ue=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ae=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. \/=]+)(?::(\d+))?(?::(\d+))?\s*$/i,he=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,le=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,fe=/\((\S*)(?::(\d+))(?::(\d+))\)/,de=/Minified React error #\d+;/i;function pe(t){let e=null,n=0;t&&("number"==typeof t.framesToPop?n=t.framesToPop:de.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=ce),s.push(e))}if(!s.length)return null;return{message:ye(t),name:t.name,stack:s}}(t))return be(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=ue.exec(n[c])){const t=s[2]&&0===s[2].indexOf("native");(r=s[2]&&0===s[2].indexOf("eval"))&&(i=fe.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]||ce;[n,e]=ve(n,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=he.exec(n[c]))o={url:s[2],func:s[1]||ce,args:[],line:+s[3],column:s[4]?+s[4]:null};else{if(!(s=ae.exec(n[c])))continue;{(r=s[3]&&s[3].indexOf(" > eval")>-1)&&(i=le.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);let n=s[3],u=s[1]||ce;[u,n]=ve(u,n),o={url:n,func:u,args:s[2]?s[2].split(","):[],line:s[4]?+s[4]:null,column:s[5]?+s[5]:null}}}!o.func&&o.line&&(o.func=ce),e.push(o)}if(!e.length)return null;return{message:ye(t),name:t.name,stack:e}}(t))return be(e,n)}catch(t){}return{message:ye(t),name:t&&t.name,stack:[],failed:!0}}const ve=(t,e)=>{const n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:ce,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};function be(t,e){try{return Object.assign(Object.assign({},t),{stack:t.stack.slice(e)})}catch(e){return t}}function ye(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}const me=50;function ge(t){const e=Oe(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 je(t){return{exception:{values:[ge(t)]}}}function Oe(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,me).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 we(e,n,r){const i=_e(n,r&&r.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return vt(i),i.level=t.Severity.Error,r&&r.event_id&&(i.event_id=r.event_id),gt.resolve(i)}function Ee(e,n,r=t.Severity.Info,i){const s=$e(n,i&&i.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return s.level=r,i&&i.event_id&&(s.event_id=i.event_id),gt.resolve(s)}function _e(t,e,n={}){let r;if(f(t)&&t.error){return r=je(pe(t=t.error))}if(d(t)||(i=t,"[object DOMException]"===Object.prototype.toString.call(i))){const i=t,s=i.name||(d(i)?"DOMError":"DOMException"),o=i.message?`${s}: ${i.message}`:s;return pt(r=$e(o,e,n),o),"code"in i&&(r.tags=Object.assign(Object.assign({},r.tags),{"DOMException.code":`${i.code}`})),r}var i;if(l(t))return r=je(pe(t));if(b(t)||y(t)){return vt(r=function(t,e,n){const r={exception:{values:[{type:y(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:`Non-Error ${n?"promise rejection":"exception"} captured with keys: ${W(t)}`}]},extra:{__serialized__:B(t)}};if(e){const t=Oe(pe(e).stack);r.stacktrace={frames:t}}return r}(t,e,n.rejection),{synthetic:!0}),r}return pt(r=$e(t,e,n),`${t}`,void 0),vt(r,{synthetic:!0}),r}function $e(t,e,n={}){const r={message:t};if(n.attachStacktrace&&e){const t=Oe(pe(e).stack);r.stacktrace={frames:t}}return r}const xe=h();let Se;function ke(){var t,e;if(Se)return Se;if(G(xe.fetch))return Se=xe.fetch.bind(xe);const n=xe.document;let r=xe.fetch;if("function"==typeof(null===(t=n)||void 0===t?void 0:t.createElement))try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t),(null===(e=t.contentWindow)||void 0===e?void 0:e.fetch)&&(r=t.contentWindow.fetch),n.head.removeChild(t)}catch(t){R.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return Se=r.bind(xe)}function Te(t,e){if("[object Navigator]"===Object.prototype.toString.call(xe&&xe.navigator)&&"function"==typeof xe.navigator.sendBeacon){return xe.navigator.sendBeacon.bind(xe.navigator)(t,e)}if(z()){const n=ke();n(t,{body:e,method:"POST",credentials:"omit",keepalive:!0}).then(null,t=>{console.error(t)})}else;}const De={event:"error",transaction:"transaction",session:"session",attachment:"attachment"},Re=h();class Ne{constructor(t){this.options=t,this.k=new jt(30),this.At={},this.Ut={},this.qt=new Pt(t.dsn,t.Lt,t.tunnel),this.url=this.qt.getStoreEndpointWithUrlEncodedAuth(),this.options.sendClientReports&&Re.document&&Re.document.addEventListener("visibilitychange",()=>{"hidden"===Re.document.visibilityState&&this.Ft()})}sendEvent(t){throw new _("Transport Class has to implement `sendEvent` method")}close(t){return this.k.drain(t)}recordLostEvent(t,e){var n;if(!this.options.sendClientReports)return;const r=`${De[e]}:${t}`;R.log(`Adding outcome: ${r}`),this.Ut[r]=(null!=(n=this.Ut[r])?n:0)+1}Ft(){if(!this.options.sendClientReports)return;const t=this.Ut;if(this.Ut={},!Object.keys(t).length)return void R.log("No outcomes to flush");R.log(`Flushing outcomes:\n${JSON.stringify(t,null,2)}`);const e=this.qt.getEnvelopeEndpointWithUrlEncodedAuth(),n=`${JSON.stringify(Object.assign({},this.options.tunnel&&{dsn:this.qt.getDsn().toString()}))}\n${JSON.stringify({type:"client_report"})}\n${JSON.stringify({timestamp:_t(),discarded_events:Object.keys(t).map(e=>{const[n,r]=e.split(":");return{reason:r,category:n,quantity:t[e]}})})}`;try{Te(e,n)}catch(t){R.error(t)}}Bt({requestType:e,response:n,headers:r,resolve:i,reject:s}){const o=t.Status.fromHttpCode(n.status);this.Ht(r)&&R.warn(`Too many ${e} requests, backing off until: ${this.Pt(e)}`),o!==t.Status.Success?s(n):i({status:o})}Pt(t){const e=De[t];return this.At[e]||this.At.all}Jt(t){return this.Pt(t)>new Date(Date.now())}Ht(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.At[t||"all"]=new Date(e+i)}return!0}return!!r&&(this.At.all=new Date(e+function(t,e){if(!e)return bt;const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?bt:r-t}(e,r)),!0)}}class Ie extends Ne{constructor(t,e=ke()){super(t),this.Wt=e}sendEvent(t){return this.Xt(te(t,this.qt),t)}sendSession(t){return this.Xt(Zt(t,this.qt),t)}Xt(t,e){if(this.Jt(t.type))return this.recordLostEvent(c.RateLimitBackoff,t.type),Promise.reject({event:e,type:t.type,reason:`Transport for ${t.type} requests locked till ${this.Pt(t.type)} due to too many requests.`,status:429});const n={body:t.body,method:"POST",referrerPolicy:K()?"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 gt((e,r)=>{this.Wt(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.Bt({requestType:t.type,response:n,headers:i,resolve:e,reject:r})}).catch(r)})).then(void 0,e=>{throw e instanceof _?this.recordLostEvent(c.QueueOverflow,t.type):this.recordLostEvent(c.NetworkError,t.type),e})}}class Ce extends Ne{sendEvent(t){return this.Xt(te(t,this.qt),t)}sendSession(t){return this.Xt(Zt(t,this.qt),t)}Xt(t,e){return this.Jt(t.type)?(this.recordLostEvent(c.RateLimitBackoff,t.type),Promise.reject({event:e,type:t.type,reason:`Transport for ${t.type} requests locked till ${this.Pt(t.type)} due to too many requests.`,status:429})):this.k.add(()=>new gt((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.Bt({requestType:t.type,response:r,headers:i,resolve:e,reject:n})}}),r.open("POST",t.url);for(const t in this.options.headers)Object.prototype.hasOwnProperty.call(this.options.headers,t)&&r.setRequestHeader(t,this.options.headers[t]);r.send(t.body)})).then(void 0,e=>{throw e instanceof _?this.recordLostEvent(c.QueueOverflow,t.type):this.recordLostEvent(c.NetworkError,t.type),e})}}var Me=Object.freeze({__proto__:null,BaseTransport:Ne,FetchTransport:Ie,XHRTransport:Ce});class Ae extends Vt{eventFromException(t,e){return we(this.ut,t,e)}eventFromMessage(e,n=t.Severity.Info,r){return Ee(this.ut,e,n,r)}St(){if(!this.ut.dsn)return super.St();const t=Object.assign(Object.assign({},this.ut.transportOptions),{dsn:this.ut.dsn,tunnel:this.ut.tunnel,sendClientReports:this.ut.sendClientReports,Lt:this.ut.Lt});return this.ut.transport?new this.ut.transport(t):z()?new Ie(t):new Ce(t)}}const Ue=h();let qe=0;function Le(){return qe>0}function Fe(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=>Fe(t,e));return t.handleEvent?t.handleEvent.apply(this,i):t.apply(this,i)}catch(t){throw qe+=1,setTimeout(()=>{qe-=1}),Bt(n=>{n.addEventProcessor(t=>{const n=Object.assign({},t);return e.mechanism&&(pt(n,void 0,void 0),vt(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 Be(t={}){if(!Ue.document)return;if(!t.eventId)return void R.error("Missing eventId option in showReportDialog call");if(!t.dsn)return void R.error("Missing dsn option in showReportDialog call");const e=Ue.document.createElement("script");e.async=!0,e.src=new Pt(t.dsn).getReportDialogEndpoint(t),t.onLoad&&(e.onload=t.onLoad);const n=Ue.document.head||Ue.document.body;n&&n.appendChild(e)}class He{constructor(t){this.name=He.id,this.zt=!1,this.Gt=!1,this.ut=Object.assign({onerror:!0,onunhandledrejection:!0},t)}setupOnce(){Error.stackTraceLimit=50,this.ut.onerror&&(R.log("Global Handler attached: onerror"),this.Kt()),this.ut.onunhandledrejection&&(R.log("Global Handler attached: onunhandledrejection"),this.Vt())}Kt(){this.zt||(tt({callback:t=>{const e=t.error,n=At(),r=n.getIntegration(He),i=e&&!0===e.__sentry_own_request__;if(!r||Le()||i)return;const s=n.getClient(),o=void 0===e&&p(t.msg)?this.Qt(t.msg,t.url,t.line,t.column):this.Yt(_e(e||t.msg,void 0,{attachStacktrace:s&&s.getOptions().attachStacktrace,rejection:!1}),t.url,t.line,t.column);vt(o,{handled:!1,type:"onerror"}),n.captureEvent(o,{originalException:e})},type:"error"}),this.zt=!0)}Vt(){this.Gt||(tt({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=At(),i=r.getIntegration(He),s=n&&!0===n.__sentry_own_request__;if(!i||Le()||s)return!0;const o=r.getClient(),c=v(n)?this.Zt(n):_e(n,void 0,{attachStacktrace:o&&o.getOptions().attachStacktrace,rejection:!0});c.level=t.Severity.Error,vt(c,{handled:!1,type:"onunhandledrejection"}),r.captureEvent(c,{originalException:n})},type:"unhandledrejection"}),this.Gt=!0)}Qt(t,e,n,r){let i,s=f(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.Yt(c,e,n,r)}Zt(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}Yt(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=p(e)&&e.length>0?e:function(){const t=h();try{return t.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}}He.id="GlobalHandlers";const Pe=["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 Je{constructor(t){this.name=Je.id,this.ut=Object.assign({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t)}setupOnce(){const t=h();if(this.ut.setTimeout&&q(t,"setTimeout",this.te.bind(this)),this.ut.setInterval&&q(t,"setInterval",this.te.bind(this)),this.ut.requestAnimationFrame&&q(t,"requestAnimationFrame",this.ee.bind(this)),this.ut.XMLHttpRequest&&"XMLHttpRequest"in t&&q(XMLHttpRequest.prototype,"send",this.ne.bind(this)),this.ut.eventTarget){(Array.isArray(this.ut.eventTarget)?this.ut.eventTarget:Pe).forEach(this.re.bind(this))}}te(t){return function(...e){const n=e[0];return e[0]=Fe(n,{mechanism:{data:{function:C(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}ee(t){return function(e){return t.call(this,Fe(e,{mechanism:{data:{function:"requestAnimationFrame",handler:C(t)},handled:!0,type:"instrument"}}))}}re(t){const e=h(),n=e[t]&&e[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(q(n,"addEventListener",function(e){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=Fe(r.handleEvent.bind(r),{mechanism:{data:{function:"handleEvent",handler:C(r),target:t},handled:!0,type:"instrument"}}))}catch(t){}return e.call(this,n,Fe(r,{mechanism:{data:{function:"addEventListener",handler:C(r),target:t},handled:!0,type:"instrument"}}),i)}}),q(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)}}))}ne(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(t=>{t in n&&"function"==typeof n[t]&&q(n,t,function(e){const n={mechanism:{data:{function:t,handler:C(e)},handled:!0,type:"instrument"}};return e.__sentry_original__&&(n.mechanism.data.handler=C(e.__sentry_original__)),Fe(e,n)})}),t.apply(this,e)}}}Je.id="TryCatch";class We{constructor(t){this.name=We.id,this.ut=Object.assign({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}addSentryBreadcrumb(t){this.ut.sentry&&At().addBreadcrumb({category:`sentry.${"transaction"===t.type?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:dt(t)},{event:t})}setupOnce(){this.ut.console&&tt({callback:(...t)=>{this.ie(...t)},type:"console"}),this.ut.dom&&tt({callback:(...t)=>{this.se(...t)},type:"dom"}),this.ut.xhr&&tt({callback:(...t)=>{this.oe(...t)},type:"xhr"}),this.ut.fetch&&tt({callback:(...t)=>{this.ce(...t)},type:"fetch"}),this.ut.history&&tt({callback:(...t)=>{this.ue(...t)},type:"history"})}ie(e){const n={category:"console",data:{arguments:e.args,logger:"console"},level:t.Severity.fromString(e.level),message:A(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;n.message=`Assertion failed: ${A(e.args.slice(1)," ")||"console.assert"}`,n.data.arguments=e.args.slice(1)}At().addBreadcrumb(n,{input:e.args,level:e.level})}se(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?O(t.event.target,n):O(t.event,n)}catch(t){e="<unknown>"}0!==e.length&&At().addBreadcrumb({category:`ui.${t.name}`,message:e},{event:t.event,name:t.name,global:t.global})}oe(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__||{};At().addBreadcrumb({category:"xhr",data:{method:e,url:n,status_code:r},type:"http"},{xhr:t.xhr,input:i})}else;}ce(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?At().addBreadcrumb({category:"fetch",data:e.fetchData,level:t.Severity.Error,type:"http"},{data:e.error,input:e.args}):At().addBreadcrumb({category:"fetch",data:Object.assign(Object.assign({},e.fetchData),{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response})))}ue(t){const e=h();let n=t.from,r=t.to;const i=ft(e.location.href);let s=ft(n);const o=ft(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),At().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}}We.id="Breadcrumbs";const Xe="cause",ze=5;class Ge{constructor(t={}){this.name=Ge.id,this.ae=t.key||Xe,this.S=t.limit||ze}setupOnce(){Tt((t,e)=>{const n=At().getIntegration(Ge);if(n){const r=n.he&&n.he.bind(n);return"function"==typeof r?r(t,e):t}return t})}he(t,e){if(!(t.exception&&t.exception.values&&e&&j(e.originalException,Error)))return t;const n=this.le(e.originalException,this.ae);return t.exception.values=[...n,...t.exception.values],t}le(t,e,n=[]){if(!j(t[e],Error)||n.length+1>=this.S)return n;const r=ge(pe(t[e]));return this.le(t[e],e,[r,...n])}}Ge.id="LinkedErrors";const Ke=h();class Ve{constructor(){this.name=Ve.id}setupOnce(){Tt(t=>{var e,n,r;if(At().getIntegration(Ve)){if(!Ke.navigator&&!Ke.location&&!Ke.document)return t;const i=(null===(e=t.request)||void 0===e?void 0:e.url)||(null===(n=Ke.location)||void 0===n?void 0:n.href),{referrer:s}=Ke.document||{},{userAgent:o}=Ke.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})}}Ve.id="UserAgent";class Qe{constructor(){this.name=Qe.id}setupOnce(t,e){t(t=>{const n=e().getIntegration(Qe);if(n){try{if(n.kt(t,n.fe))return R.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){return n.fe=t}return n.fe=t}return t})}kt(t,e){return!!e&&(!!this.de(t,e)||!!this.pe(t,e))}de(t,e){const n=t.message,r=e.message;return!(!n&&!r)&&(!(n&&!r||!n&&r)&&(n===r&&(!!this.ve(t,e)&&!!this.be(t,e))))}ye(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}be(t,e){let n=this.ye(t),r=this.ye(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}me(t){return t.exception&&t.exception.values&&t.exception.values[0]}pe(t,e){const n=this.me(e),r=this.me(t);return!(!n||!r)&&(n.type===r.type&&n.value===r.value&&(!!this.ve(t,e)&&!!this.be(t,e)))}ve(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}}}Qe.id="Dedupe";var Ye=Object.freeze({__proto__:null,GlobalHandlers:He,TryCatch:Je,Breadcrumbs:We,LinkedErrors:Ge,UserAgent:Ve,Dedupe:Qe});class Ze extends Gt{constructor(t={}){t.Lt=t.Lt||{},t.Lt.sdk=t.Lt.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:ee}],version:ee},super(Ae,t)}showReportDialog(t={}){h().document&&(this.dt()?Be(Object.assign(Object.assign({},t),{dsn:t.dsn||this.getDsn()})):R.error("Trying to call showReportDialog with Sentry Client disabled"))}yt(t,e,n){return t.platform=t.platform||"javascript",super.yt(t,e,n)}Et(t){const e=this.getIntegration(We);e&&e.addSentryBreadcrumb(t),super.Et(t)}}const tn=[new se,new re,new Je,new We,new He,new Ge,new Qe,new Ve];let en={};const nn=h();nn.Sentry&&nn.Sentry.Integrations&&(en=nn.Sentry.Integrations);const rn=Object.assign(Object.assign(Object.assign({},en),oe),Ye);return t.BrowserClient=Ze,t.Hub=It,t.Integrations=rn,t.SDK_NAME="sentry.javascript.browser",t.SDK_VERSION=ee,t.Scope=St,t.Transports=Me,t.addBreadcrumb=function(t){Ft("addBreadcrumb",t)},t.addGlobalEventProcessor=Tt,t.captureEvent=function(t){return Ft("captureEvent",t)},t.captureException=captureException,t.captureMessage=function(t,e){let n;try{throw new Error(t)}catch(t){n=t}const r="string"!=typeof e?{captureContext:e}:void 0;return Ft("captureMessage",t,"string"==typeof e?e:void 0,Object.assign({originalException:t,syntheticException:n},r))},t.close=function(t){const e=At().getClient();return e?e.close(t):(R.warn("Cannot flush events and disable SDK. No client defined."),gt.resolve(!1))},t.configureScope=function(t){Ft("configureScope",t)},t.defaultIntegrations=tn,t.eventFromException=we,t.eventFromMessage=Ee,t.flush=function(t){const e=At().getClient();return e?e.flush(t):(R.warn("Cannot flush events. No client defined."),gt.resolve(!1))},t.forceLoad=function(){},t.getCurrentHub=At,t.getHubFromCarrier=qt,t.init=function(t={}){if(void 0===t.defaultIntegrations&&(t.defaultIntegrations=tn),void 0===t.release){const e=h();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),void 0===t.sendClientReports&&(t.sendClientReports=!0),function(t,e){var n;!0===e.debug&&R.enable();const r=At();null===(n=r.getScope())||void 0===n||n.update(e.initialScope);const i=new t(e);r.bindClient(i)}(Ze,t),t.autoSessionTracking&&function(){if(void 0===h().document)return void R.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");const t=At();"function"==typeof t.startSession&&"function"==typeof t.captureSession&&(t.startSession({ignoreDuration:!0}),t.captureSession(),tt({callback:({from:e,to:n})=>{void 0!==e&&e!==n&&(t.startSession({ignoreDuration:!0}),t.captureSession())},type:"history"}))}()},t.injectReportDialog=Be,t.lastEventId=function(){return At().lastEventId()},t.makeMain=Mt,t.onLoad=function(t){t()},t.setContext=function(t,e){Ft("setContext",t,e)},t.setExtra=function(t,e){Ft("setExtra",t,e)},t.setExtras=function(t){Ft("setExtras",t)},t.setTag=function(t,e){Ft("setTag",t,e)},t.setTags=function(t){Ft("setTags",t)},t.setUser=function(t){Ft("setUser",t)},t.showReportDialog=function(t={}){const e=At(),n=e.getScope();n&&(t.user=Object.assign(Object.assign({},n.getUser()),t.user)),t.eventId||(t.eventId=e.lastEventId());const r=e.getClient();r&&r.showReportDialog(t)},t.startTransaction=function(t,e){return Ft("startTransaction",Object.assign({},t),e)},t.withScope=Bt,t.wrap=function(t){return Fe(t)()},t}({});
|
|
3
3
|
//# sourceMappingURL=bundle.es6.min.js.map
|