4 lines
72 KiB
JavaScript
4 lines
72 KiB
JavaScript
/*! @sentry/browser 6.13.3 (cbb01ba) | https://github.com/getsentry/sentry-javascript */
|
|
var Sentry=function(t){var n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(t,r)};function r(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}var i,e,o,u,s,c,a,f=function(){return(f=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++)for(var e in n=arguments[r])Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t}).apply(this,arguments)};function h(t){var n="function"==typeof Symbol&&t[Symbol.iterator],r=0;return n?n.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}function v(t,n){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var i,e,o=r.call(t),u=[];try{for(;(void 0===n||n-- >0)&&!(i=o.next()).done;)u.push(i.value)}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return u}function l(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(v(arguments[n]));return t}function d(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return j(t,Error)}}function p(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)}function y(t){return"[object DOMError]"===Object.prototype.toString.call(t)}function m(t){return"[object String]"===Object.prototype.toString.call(t)}function b(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function w(t){return"[object Object]"===Object.prototype.toString.call(t)}function g(t){return"undefined"!=typeof Event&&j(t,Event)}function E(t){return"undefined"!=typeof Element&&j(t,Element)}function x(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function j(t,n){try{return t instanceof n}catch(t){return!1}}function _(t,n){try{for(var r=t,i=[],e=0,o=0,u=" > ".length,s=void 0;r&&e++<5&&!("html"===(s=k(r,n))||e>1&&o+i.length*u+s.length>=80);)i.push(s),o+=s.length,r=r.parentNode;return i.reverse().join(" > ")}catch(t){return"<unknown>"}}function k(t,n){var r,i,e,o,u,s,c,a=t,f=[];if(!a||!a.tagName)return"";f.push(a.tagName.toLowerCase());var h=(null===(r=n)||void 0===r?void 0:r.length)?n.filter(function(t){return a.getAttribute(t)}).map(function(t){return[t,a.getAttribute(t)]}):null;if(null===(i=h)||void 0===i?void 0:i.length)h.forEach(function(t){f.push("["+t[0]+'="'+t[1]+'"]')});else if(a.id&&f.push("#"+a.id),(e=a.className)&&m(e))for(o=e.split(/\s+/),c=0;c<o.length;c++)f.push("."+o[c]);var v=["type","name","title","alt"];for(c=0;c<v.length;c++)u=v[c],(s=a.getAttribute(u))&&f.push("["+u+'="'+s+'"]');return f.join("")}!function(t){t[t.None=0]="None",t[t.Error=1]="Error",t[t.Debug=2]="Debug",t[t.Verbose=3]="Verbose"}(i||(i={})),function(t){t.Ok="ok",t.Exited="exited",t.Crashed="crashed",t.Abnormal="abnormal"}(e||(e={})),function(t){t.Ok="ok",t.Errored="errored",t.Crashed="crashed"}(o||(o={})),(u=t.Severity||(t.Severity={})).Fatal="fatal",u.Error="error",u.Warning="warning",u.Log="log",u.Info="info",u.Debug="debug",u.Critical="critical",function(t){t.fromString=function(n){switch(n){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(n){return n>=200&&n<300?t.Success:429===n?t.RateLimit:n>=400&&n<500?t.Invalid:n>=500?t.Failed:t.Unknown}}(t.Status||(t.Status={})),function(t){t.Explicit="explicitly_set",t.Sampler="client_sampler",t.Rate="client_rate",t.Inheritance="inheritance"}(c||(c={})),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"}(a||(a={}));var S=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){return t.__proto__=n,t}:function(t,n){for(var r in n)t.hasOwnProperty(r)||(t[r]=n[r]);return t});var O=function(t){function n(n){var r=this.constructor,i=t.call(this,n)||this;return i.message=n,i.name=r.prototype.constructor.name,S(i,r.prototype),i}return r(n,t),n}(Error),D=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,T=function(){function t(t){"string"==typeof t?this.t(t):this.i(t),this.o()}return t.prototype.toString=function(t){void 0===t&&(t=!1);var n=this,r=n.host,i=n.path,e=n.pass,o=n.port,u=n.projectId;return n.protocol+"://"+n.publicKey+(t&&e?":"+e:"")+"@"+r+(o?":"+o:"")+"/"+(i?i+"/":i)+u},t.prototype.t=function(t){var n=D.exec(t);if(!n)throw new O("Invalid Dsn");var r=v(n.slice(1),6),i=r[0],e=r[1],o=r[2],u=void 0===o?"":o,s=r[3],c=r[4],a=void 0===c?"":c,f="",h=r[5],l=h.split("/");if(l.length>1&&(f=l.slice(0,-1).join("/"),h=l.pop()),h){var d=h.match(/^\d+/);d&&(h=d[0])}this.i({host:s,pass:u,path:f,projectId:h,port:a,protocol:i,publicKey:e})},t.prototype.i=function(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},t.prototype.o=function(){var t=this;if(["protocol","publicKey","host","projectId"].forEach(function(n){if(!t[n])throw new O("Invalid Dsn: "+n+" missing")}),!this.projectId.match(/^\d+$/))throw new O("Invalid Dsn: Invalid projectId "+this.projectId);if("http"!==this.protocol&&"https"!==this.protocol)throw new O("Invalid Dsn: Invalid protocol "+this.protocol);if(this.port&&isNaN(parseInt(this.port,10)))throw new O("Invalid Dsn: Invalid port "+this.port)},t}();function N(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function R(t,n){return void 0===n&&(n=0),"string"!=typeof t||0===n?t:t.length<=n?t:t.substr(0,n)+"..."}function I(t,n){if(!Array.isArray(t))return"";for(var r=[],i=0;i<t.length;i++){var e=t[i];try{r.push(String(e))}catch(t){r.push("[value cannot be serialized]")}}return r.join(n)}function C(t,n){return!!m(t)&&(r=n,"[object RegExp]"===Object.prototype.toString.call(r)?n.test(t):"string"==typeof n&&-1!==t.indexOf(n));var r}var M={};function A(){return N()?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:M}function q(){var t=A(),n=t.crypto||t.msCrypto;if(void 0!==n&&n.getRandomValues){var r=new Uint16Array(8);n.getRandomValues(r),r[3]=4095&r[3]|16384,r[4]=16383&r[4]|32768;var i=function(t){for(var n=t.toString(16);n.length<4;)n="0"+n;return n};return i(r[0])+i(r[1])+i(r[2])+i(r[3])+i(r[4])+i(r[5])+i(r[6])+i(r[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=16*Math.random()|0;return("x"===t?n:3&n|8).toString(16)})}function L(t){if(!t)return{};var n=t.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!n)return{};var r=n[6]||"",i=n[8]||"";return{host:n[4],path:n[5],protocol:n[2],relative:n[5]+r+i}}function U(t){if(t.message)return t.message;if(t.exception&&t.exception.values&&t.exception.values[0]){var n=t.exception.values[0];return n.type&&n.value?n.type+": "+n.value:n.type||n.value||t.event_id||"<unknown>"}return t.event_id||"<unknown>"}function H(t){var n=A();if(!("console"in n))return t();var r=n.console,i={};["debug","info","warn","error","log","assert"].forEach(function(t){t in n.console&&r[t].__sentry_original__&&(i[t]=r[t],r[t]=r[t].__sentry_original__)});var e=t();return Object.keys(i).forEach(function(t){r[t]=i[t]}),e}function F(t,n,r){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].value=t.exception.values[0].value||n||"",t.exception.values[0].type=t.exception.values[0].type||r||"Error"}function P(t,n){void 0===n&&(n={});try{t.exception.values[0].mechanism=t.exception.values[0].mechanism||{},Object.keys(n).forEach(function(r){t.exception.values[0].mechanism[r]=n[r]})}catch(t){}}var J=6e4;var X=A(),B="Sentry Logger ",W=function(){function t(){this.u=!1}return t.prototype.disable=function(){this.u=!1},t.prototype.enable=function(){this.u=!0},t.prototype.log=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.u&&H(function(){X.console.log(B+"[Log]: "+t.join(" "))})},t.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.u&&H(function(){X.console.warn(B+"[Warn]: "+t.join(" "))})},t.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.u&&H(function(){X.console.error(B+"[Error]: "+t.join(" "))})},t}();X.__SENTRY__=X.__SENTRY__||{};var $=X.__SENTRY__.logger||(X.__SENTRY__.logger=new W),G=function(){function t(){this.s="function"==typeof WeakSet,this.h=this.s?new WeakSet:[]}return t.prototype.memoize=function(t){if(this.s)return!!this.h.has(t)||(this.h.add(t),!1);for(var n=0;n<this.h.length;n++){if(this.h[n]===t)return!0}return this.h.push(t),!1},t.prototype.unmemoize=function(t){if(this.s)this.h.delete(t);else for(var n=0;n<this.h.length;n++)if(this.h[n]===t){this.h.splice(n,1);break}},t}(),K="<anonymous>";function z(t){try{return t&&"function"==typeof t&&t.name||K}catch(t){return K}}function V(t,n,r){if(n in t){var i=t[n],e=r(i);if("function"==typeof e)try{e.prototype=e.prototype||{},Object.defineProperties(e,{__sentry_original__:{enumerable:!1,value:i}})}catch(t){}t[n]=e}}function Q(t){if(d(t)){var n=t,r={message:n.message,name:n.name,stack:n.stack};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i]);return r}if(g(t)){var e=t,o={};o.type=e.type;try{o.target=E(e.target)?_(e.target):Object.prototype.toString.call(e.target)}catch(t){o.target="<unknown>"}try{o.currentTarget=E(e.currentTarget)?_(e.currentTarget):Object.prototype.toString.call(e.currentTarget)}catch(t){o.currentTarget="<unknown>"}for(var u in"undefined"!=typeof CustomEvent&&j(t,CustomEvent)&&(o.detail=e.detail),e)Object.prototype.hasOwnProperty.call(e,u)&&(o[u]=e[u]);return o}return t}function Y(t){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}function Z(t,n,r){void 0===n&&(n=3),void 0===r&&(r=102400);var i=rt(t,n);return Y(i)>r?Z(t,n-1,r):i}function tt(t,n){return"domain"===n&&t&&"object"==typeof t&&t.v?"[Domain]":"domainEmitter"===n?"[DomainEmitter]":"undefined"!=typeof global&&t===global?"[Global]":"undefined"!=typeof window&&t===window?"[Window]":"undefined"!=typeof document&&t===document?"[Document]":w(r=t)&&"nativeEvent"in r&&"preventDefault"in r&&"stopPropagation"in r?"[SyntheticEvent]":"number"==typeof t&&t!=t?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?"[Function: "+z(t)+"]":"symbol"==typeof t?"["+String(t)+"]":"bigint"==typeof t?"[BigInt: "+String(t)+"]":t;var r}function nt(t,n,r,i){if(void 0===r&&(r=1/0),void 0===i&&(i=new G),0===r)return function(t){var n=Object.prototype.toString.call(t);if("string"==typeof t)return t;if("[object Object]"===n)return"[Object]";if("[object Array]"===n)return"[Array]";var r=tt(t);return b(r)?r:n}(n);if(null!=n&&"function"==typeof n.toJSON)return n.toJSON();var e=tt(n,t);if(b(e))return e;var o=Q(n),u=Array.isArray(n)?[]:{};if(i.memoize(n))return"[Circular ~]";for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(u[s]=nt(s,o[s],r-1,i));return i.unmemoize(n),u}function rt(t,n){try{return JSON.parse(JSON.stringify(t,function(t,r){return nt(t,r,n)}))}catch(t){return"**non-serializable**"}}function it(t,n){void 0===n&&(n=40);var r=Object.keys(Q(t));if(r.sort(),!r.length)return"[object has no keys]";if(r[0].length>=n)return R(r[0],n);for(var i=r.length;i>0;i--){var e=r.slice(0,i).join(", ");if(!(e.length>n))return i===r.length?e:R(e,n)}return""}function et(t){var n,r;if(w(t)){var i=t,e={};try{for(var o=h(Object.keys(i)),u=o.next();!u.done;u=o.next()){var s=u.value;void 0!==i[s]&&(e[s]=et(i[s]))}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return e}return Array.isArray(t)?t.map(et):t}function ot(){if(!("fetch"in A()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function ut(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function st(){if(!ot())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}var ct,at=A(),ft={},ht={};function vt(t){if(!ht[t])switch(ht[t]=!0,t){case"console":!function(){if(!("console"in at))return;["debug","info","warn","error","log","assert"].forEach(function(t){t in at.console&&V(at.console,t,function(n){return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];dt("console",{args:r,level:t}),n&&Function.prototype.apply.call(n,at.console,r)}})})}();break;case"dom":!function(){if(!("document"in at))return;var t=dt.bind(null,"dom"),n=gt(t,!0);at.document.addEventListener("click",n,!1),at.document.addEventListener("keypress",n,!1),["EventTarget","Node"].forEach(function(n){var r=at[n]&&at[n].prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(V(r,"addEventListener",function(n){return function(r,i,e){if("click"===r||"keypress"==r)try{var o=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},u=o[r]=o[r]||{refCount:0};if(!u.handler){var s=gt(t);u.handler=s,n.call(this,r,s,e)}u.refCount+=1}catch(t){}return n.call(this,r,i,e)}}),V(r,"removeEventListener",function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{var e=this.__sentry_instrumentation_handlers__||{},o=e[n];o&&(o.refCount-=1,o.refCount<=0&&(t.call(this,n,o.handler,i),o.handler=void 0,delete e[n]),0===Object.keys(e).length&&delete this.__sentry_instrumentation_handlers__)}catch(t){}return t.call(this,n,r,i)}}))})}();break;case"xhr":!function(){if(!("XMLHttpRequest"in at))return;var t=[],n=[],r=XMLHttpRequest.prototype;V(r,"open",function(r){return function(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];var o=this,u=i[1];o.__sentry_xhr__={method:m(i[0])?i[0].toUpperCase():i[0],url:i[1]},m(u)&&"POST"===o.__sentry_xhr__.method&&u.match(/sentry_key/)&&(o.__sentry_own_request__=!0);var s=function(){if(4===o.readyState){try{o.__sentry_xhr__&&(o.__sentry_xhr__.status_code=o.status)}catch(t){}try{var r=t.indexOf(o);if(-1!==r){t.splice(r);var e=n.splice(r)[0];o.__sentry_xhr__&&void 0!==e[0]&&(o.__sentry_xhr__.body=e[0])}}catch(t){}dt("xhr",{args:i,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:o})}};return"onreadystatechange"in o&&"function"==typeof o.onreadystatechange?V(o,"onreadystatechange",function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return s(),t.apply(o,n)}}):o.addEventListener("readystatechange",s),r.apply(o,i)}}),V(r,"send",function(r){return function(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];return t.push(this),n.push(i),dt("xhr",{args:i,startTimestamp:Date.now(),xhr:this}),r.apply(this,i)}})}();break;case"fetch":!function(){if(!function(){if(!ot())return!1;var t=A();if(ut(t.fetch))return!0;var n=!1,r=t.document;if(r&&"function"==typeof r.createElement)try{var i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i),i.contentWindow&&i.contentWindow.fetch&&(n=ut(i.contentWindow.fetch)),r.head.removeChild(i)}catch(t){$.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return n}())return;V(at,"fetch",function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i={args:n,fetchData:{method:pt(n),url:yt(n)},startTimestamp:Date.now()};return dt("fetch",f({},i)),t.apply(at,n).then(function(t){return dt("fetch",f(f({},i),{endTimestamp:Date.now(),response:t})),t},function(t){throw dt("fetch",f(f({},i),{endTimestamp:Date.now(),error:t})),t})}})}();break;case"history":!function(){if(t=A(),n=t.chrome,r=n&&n.app&&n.app.runtime,i="history"in t&&!!t.history.pushState&&!!t.history.replaceState,r||!i)return;var t,n,r,i;var e=at.onpopstate;function o(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length>2?n[2]:void 0;if(i){var e=ct,o=String(i);ct=o,dt("history",{from:e,to:o})}return t.apply(this,n)}}at.onpopstate=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=at.location.href,i=ct;if(ct=r,dt("history",{from:i,to:r}),e)try{return e.apply(this,t)}catch(t){}},V(at.history,"pushState",o),V(at.history,"replaceState",o)}();break;case"error":Et=at.onerror,at.onerror=function(t,n,r,i,e){return dt("error",{column:i,error:e,line:r,msg:t,url:n}),!!Et&&Et.apply(this,arguments)};break;case"unhandledrejection":jt=at.onunhandledrejection,at.onunhandledrejection=function(t){return dt("unhandledrejection",t),!jt||jt.apply(this,arguments)};break;default:$.warn("unknown instrumentation type:",t)}}function lt(t){t&&"string"==typeof t.type&&"function"==typeof t.callback&&(ft[t.type]=ft[t.type]||[],ft[t.type].push(t.callback),vt(t.type))}function dt(t,n){var r,i;if(t&&ft[t])try{for(var e=h(ft[t]||[]),o=e.next();!o.done;o=e.next()){var u=o.value;try{u(n)}catch(n){$.error("Error while triggering instrumentation handler.\nType: "+t+"\nName: "+z(u)+"\nError: "+n)}}}catch(t){r={error:t}}finally{try{o&&!o.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}}function pt(t){return void 0===t&&(t=[]),"Request"in at&&j(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function yt(t){return void 0===t&&(t=[]),"string"==typeof t[0]?t[0]:"Request"in at&&j(t[0],Request)?t[0].url:String(t[0])}var mt,bt,wt=1e3;function gt(t,n){return void 0===n&&(n=!1),function(r){if(r&&bt!==r&&!function(t){if("keypress"!==t.type)return!1;try{var n=t.target;if(!n||!n.tagName)return!0;if("INPUT"===n.tagName||"TEXTAREA"===n.tagName||n.isContentEditable)return!1}catch(t){}return!0}(r)){var i="keypress"===r.type?"input":r.type;void 0===mt?(t({event:r,name:i,global:n}),bt=r):function(t,n){if(!t)return!0;if(t.type!==n.type)return!0;try{if(t.target!==n.target)return!0}catch(t){}return!1}(bt,r)&&(t({event:r,name:i,global:n}),bt=r),clearTimeout(mt),mt=at.setTimeout(function(){mt=void 0},wt)}}}var Et=null;var xt,jt=null;!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(xt||(xt={}));var _t=function(){function t(t){var n=this;this.l=xt.PENDING,this.p=[],this.m=function(t){n.g(xt.RESOLVED,t)},this.j=function(t){n.g(xt.REJECTED,t)},this.g=function(t,r){n.l===xt.PENDING&&(x(r)?r.then(n.m,n.j):(n.l=t,n._=r,n.k()))},this.S=function(t){n.p=n.p.concat(t),n.k()},this.k=function(){if(n.l!==xt.PENDING){var t=n.p.slice();n.p=[],t.forEach(function(t){t.done||(n.l===xt.RESOLVED&&t.onfulfilled&&t.onfulfilled(n._),n.l===xt.REJECTED&&t.onrejected&&t.onrejected(n._),t.done=!0)})}};try{t(this.m,this.j)}catch(t){this.j(t)}}return t.resolve=function(n){return new t(function(t){t(n)})},t.reject=function(n){return new t(function(t,r){r(n)})},t.all=function(n){return new t(function(r,i){if(Array.isArray(n))if(0!==n.length){var e=n.length,o=[];n.forEach(function(n,u){t.resolve(n).then(function(t){o[u]=t,0===(e-=1)&&r(o)}).then(null,i)})}else r([]);else i(new TypeError("Promise.all requires an array as input."))})},t.prototype.then=function(n,r){var i=this;return new t(function(t,e){i.S({done:!1,onfulfilled:function(r){if(n)try{return void t(n(r))}catch(t){return void e(t)}else t(r)},onrejected:function(n){if(r)try{return void t(r(n))}catch(t){return void e(t)}else e(n)}})})},t.prototype.catch=function(t){return this.then(function(t){return t},t)},t.prototype.finally=function(n){var r=this;return new t(function(t,i){var e,o;return r.then(function(t){o=!1,e=t,n&&n()},function(t){o=!0,e=t,n&&n()}).then(function(){o?i(e):t(e)})})},t.prototype.toString=function(){return"[object SyncPromise]"},t}(),kt=function(){function t(t){this.O=t,this.D=[]}return t.prototype.isReady=function(){return void 0===this.O||this.length()<this.O},t.prototype.add=function(t){var n=this;if(!this.isReady())return _t.reject(new O("Not adding Promise due to buffer limit reached."));var r=t();return-1===this.D.indexOf(r)&&this.D.push(r),r.then(function(){return n.remove(r)}).then(null,function(){return n.remove(r).then(null,function(){})}),r},t.prototype.remove=function(t){return this.D.splice(this.D.indexOf(t),1)[0]},t.prototype.length=function(){return this.D.length},t.prototype.drain=function(t){var n=this;return new _t(function(r){var i=setTimeout(function(){t&&t>0&&r(!1)},t);_t.all(n.D).then(function(){clearTimeout(i),r(!0)}).then(null,function(){r(!0)})})},t}(),St={nowSeconds:function(){return Date.now()/1e3}};var Ot=N()?function(){try{return(t=module,n="perf_hooks",t.require(n)).performance}catch(t){return}var t,n}():function(){var t=A().performance;if(t&&t.now)return{now:function(){return t.now()},timeOrigin:Date.now()-t.now()}}(),Dt=void 0===Ot?St:{nowSeconds:function(){return(Ot.timeOrigin+Ot.now())/1e3}},Tt=St.nowSeconds.bind(St),Nt=Dt.nowSeconds.bind(Dt),Rt=(function(){var t=A().performance;if(t&&t.now){var n=t.now(),r=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+n-r):36e5,e=i<36e5,o=t.timing&&t.timing.navigationStart,u="number"==typeof o?Math.abs(o+n-r):36e5;(e||u<36e5)&&(i<=u&&t.timeOrigin)}}(),function(){function t(){this.T=!1,this.N=[],this.R=[],this.I=[],this.C={},this.M={},this.A={},this.q={}}return t.clone=function(n){var r=new t;return n&&(r.I=l(n.I),r.M=f({},n.M),r.A=f({},n.A),r.q=f({},n.q),r.C=n.C,r.L=n.L,r.U=n.U,r.H=n.H,r.F=n.F,r.P=n.P,r.R=l(n.R),r.J=n.J),r},t.prototype.addScopeListener=function(t){this.N.push(t)},t.prototype.addEventProcessor=function(t){return this.R.push(t),this},t.prototype.setUser=function(t){return this.C=t||{},this.H&&this.H.update({user:t}),this.X(),this},t.prototype.getUser=function(){return this.C},t.prototype.getRequestSession=function(){return this.J},t.prototype.setRequestSession=function(t){return this.J=t,this},t.prototype.setTags=function(t){return this.M=f(f({},this.M),t),this.X(),this},t.prototype.setTag=function(t,n){var r;return this.M=f(f({},this.M),((r={})[t]=n,r)),this.X(),this},t.prototype.setExtras=function(t){return this.A=f(f({},this.A),t),this.X(),this},t.prototype.setExtra=function(t,n){var r;return this.A=f(f({},this.A),((r={})[t]=n,r)),this.X(),this},t.prototype.setFingerprint=function(t){return this.P=t,this.X(),this},t.prototype.setLevel=function(t){return this.L=t,this.X(),this},t.prototype.setTransactionName=function(t){return this.F=t,this.X(),this},t.prototype.setTransaction=function(t){return this.setTransactionName(t)},t.prototype.setContext=function(t,n){var r;return null===n?delete this.q[t]:this.q=f(f({},this.q),((r={})[t]=n,r)),this.X(),this},t.prototype.setSpan=function(t){return this.U=t,this.X(),this},t.prototype.getSpan=function(){return this.U},t.prototype.getTransaction=function(){var t,n,r,i,e=this.getSpan();return(null===(t=e)||void 0===t?void 0:t.transaction)?null===(n=e)||void 0===n?void 0:n.transaction:(null===(i=null===(r=e)||void 0===r?void 0:r.spanRecorder)||void 0===i?void 0:i.spans[0])?e.spanRecorder.spans[0]:void 0},t.prototype.setSession=function(t){return t?this.H=t:delete this.H,this.X(),this},t.prototype.getSession=function(){return this.H},t.prototype.update=function(n){if(!n)return this;if("function"==typeof n){var r=n(this);return r instanceof t?r:this}return n instanceof t?(this.M=f(f({},this.M),n.M),this.A=f(f({},this.A),n.A),this.q=f(f({},this.q),n.q),n.C&&Object.keys(n.C).length&&(this.C=n.C),n.L&&(this.L=n.L),n.P&&(this.P=n.P),n.J&&(this.J=n.J)):w(n)&&(n=n,this.M=f(f({},this.M),n.tags),this.A=f(f({},this.A),n.extra),this.q=f(f({},this.q),n.contexts),n.user&&(this.C=n.user),n.level&&(this.L=n.level),n.fingerprint&&(this.P=n.fingerprint),n.requestSession&&(this.J=n.requestSession)),this},t.prototype.clear=function(){return this.I=[],this.M={},this.A={},this.C={},this.q={},this.L=void 0,this.F=void 0,this.P=void 0,this.J=void 0,this.U=void 0,this.H=void 0,this.X(),this},t.prototype.addBreadcrumb=function(t,n){var r="number"==typeof n?Math.min(n,100):100;if(r<=0)return this;var i=f({timestamp:Tt()},t);return this.I=l(this.I,[i]).slice(-r),this.X(),this},t.prototype.clearBreadcrumbs=function(){return this.I=[],this.X(),this},t.prototype.applyToEvent=function(t,n){var r;if(this.A&&Object.keys(this.A).length&&(t.extra=f(f({},this.A),t.extra)),this.M&&Object.keys(this.M).length&&(t.tags=f(f({},this.M),t.tags)),this.C&&Object.keys(this.C).length&&(t.user=f(f({},this.C),t.user)),this.q&&Object.keys(this.q).length&&(t.contexts=f(f({},this.q),t.contexts)),this.L&&(t.level=this.L),this.F&&(t.transaction=this.F),this.U){t.contexts=f({trace:this.U.getTraceContext()},t.contexts);var i=null===(r=this.U.transaction)||void 0===r?void 0:r.name;i&&(t.tags=f({transaction:i},t.tags))}return this.B(t),t.breadcrumbs=l(t.breadcrumbs||[],this.I),t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,this.W(l(It(),this.R),t,n)},t.prototype.W=function(t,n,r,i){var e=this;return void 0===i&&(i=0),new _t(function(o,u){var s=t[i];if(null===n||"function"!=typeof s)o(n);else{var c=s(f({},n),r);x(c)?c.then(function(n){return e.W(t,n,r,i+1).then(o)}).then(null,u):e.W(t,c,r,i+1).then(o).then(null,u)}})},t.prototype.X=function(){var t=this;this.T||(this.T=!0,this.N.forEach(function(n){n(t)}),this.T=!1)},t.prototype.B=function(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this.P&&(t.fingerprint=t.fingerprint.concat(this.P)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint},t}());function It(){var t=A();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function Ct(t){It().push(t)}var Mt=function(){function t(t){this.errors=0,this.sid=q(),this.duration=0,this.status=e.Ok,this.init=!0,this.ignoreDuration=!1;var n=Nt();this.timestamp=n,this.started=n,t&&this.update(t)}return t.prototype.update=function(t){if(void 0===t&&(t={}),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||Nt(),t.ignoreDuration&&(this.ignoreDuration=t.ignoreDuration),t.sid&&(this.sid=32===t.sid.length?t.sid:q()),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{var n=this.timestamp-this.started;this.duration=n>=0?n: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)},t.prototype.close=function(t){t?this.update({status:t}):this.status===e.Ok?this.update({status:e.Exited}):this.update()},t.prototype.toJSON=function(){return et({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:et({release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent})})},t}(),At=4,qt=function(){function t(t,n,r){void 0===n&&(n=new Rt),void 0===r&&(r=At),this.$=r,this.G=[{}],this.getStackTop().scope=n,t&&this.bindClient(t)}return t.prototype.isOlderThan=function(t){return this.$<t},t.prototype.bindClient=function(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()},t.prototype.pushScope=function(){var t=Rt.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t},t.prototype.popScope=function(){return!(this.getStack().length<=1)&&!!this.getStack().pop()},t.prototype.withScope=function(t){var n=this.pushScope();try{t(n)}finally{this.popScope()}},t.prototype.getClient=function(){return this.getStackTop().client},t.prototype.getScope=function(){return this.getStackTop().scope},t.prototype.getStack=function(){return this.G},t.prototype.getStackTop=function(){return this.G[this.G.length-1]},t.prototype.captureException=function(t,n){var r=this.K=q(),i=n;if(!n){var e=void 0;try{throw new Error("Sentry syntheticException")}catch(t){e=t}i={originalException:t,syntheticException:e}}return this.V("captureException",t,f(f({},i),{event_id:r})),r},t.prototype.captureMessage=function(t,n,r){var i=this.K=q(),e=r;if(!r){var o=void 0;try{throw new Error(t)}catch(t){o=t}e={originalException:t,syntheticException:o}}return this.V("captureMessage",t,n,f(f({},e),{event_id:i})),i},t.prototype.captureEvent=function(t,n){var r=q();return"transaction"!==t.type&&(this.K=r),this.V("captureEvent",t,f(f({},n),{event_id:r})),r},t.prototype.lastEventId=function(){return this.K},t.prototype.addBreadcrumb=function(t,n){var r=this.getStackTop(),i=r.scope,e=r.client;if(i&&e){var o=e.getOptions&&e.getOptions()||{},u=o.beforeBreadcrumb,s=void 0===u?null:u,c=o.maxBreadcrumbs,a=void 0===c?100:c;if(!(a<=0)){var h=Tt(),v=f({timestamp:h},t),l=s?H(function(){return s(v,n)}):v;null!==l&&i.addBreadcrumb(l,a)}}},t.prototype.setUser=function(t){var n=this.getScope();n&&n.setUser(t)},t.prototype.setTags=function(t){var n=this.getScope();n&&n.setTags(t)},t.prototype.setExtras=function(t){var n=this.getScope();n&&n.setExtras(t)},t.prototype.setTag=function(t,n){var r=this.getScope();r&&r.setTag(t,n)},t.prototype.setExtra=function(t,n){var r=this.getScope();r&&r.setExtra(t,n)},t.prototype.setContext=function(t,n){var r=this.getScope();r&&r.setContext(t,n)},t.prototype.configureScope=function(t){var n=this.getStackTop(),r=n.scope,i=n.client;r&&i&&t(r)},t.prototype.run=function(t){var n=Ut(this);try{t(this)}finally{Ut(n)}},t.prototype.getIntegration=function(t){var n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch(n){return $.warn("Cannot retrieve integration "+t.id+" from the current Hub"),null}},t.prototype.startSpan=function(t){return this.Y("startSpan",t)},t.prototype.startTransaction=function(t,n){return this.Y("startTransaction",t,n)},t.prototype.traceHeaders=function(){return this.Y("traceHeaders")},t.prototype.captureSession=function(t){if(void 0===t&&(t=!1),t)return this.endSession();this.Z()},t.prototype.endSession=function(){var t,n,r,i,e;null===(r=null===(n=null===(t=this.getStackTop())||void 0===t?void 0:t.scope)||void 0===n?void 0:n.getSession())||void 0===r||r.close(),this.Z(),null===(e=null===(i=this.getStackTop())||void 0===i?void 0:i.scope)||void 0===e||e.setSession()},t.prototype.startSession=function(t){var n=this.getStackTop(),r=n.scope,i=n.client,o=i&&i.getOptions()||{},u=o.release,s=o.environment,c=(A().navigator||{}).userAgent,a=new Mt(f(f(f({release:u,environment:s},r&&{user:r.getUser()}),c&&{userAgent:c}),t));if(r){var h=r.getSession&&r.getSession();h&&h.status===e.Ok&&h.update({status:e.Exited}),this.endSession(),r.setSession(a)}return a},t.prototype.Z=function(){var t=this.getStackTop(),n=t.scope,r=t.client;if(n){var i=n.getSession&&n.getSession();i&&r&&r.captureSession&&r.captureSession(i)}},t.prototype.V=function(t){for(var n,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var e=this.getStackTop(),o=e.scope,u=e.client;u&&u[t]&&(n=u)[t].apply(n,l(r,[o]))},t.prototype.Y=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=Lt().__SENTRY__;if(i&&i.extensions&&"function"==typeof i.extensions[t])return i.extensions[t].apply(this,n);$.warn("Extension method "+t+" couldn't be found, doing nothing.")},t}();function Lt(){var t=A();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function Ut(t){var n=Lt(),r=Pt(n);return Jt(n,t),r}function Ht(){var t=Lt();return Ft(t)&&!Pt(t).isOlderThan(At)||Jt(t,new qt),N()?function(t){var n,r,i;try{var e=null===(i=null===(r=null===(n=Lt().__SENTRY__)||void 0===n?void 0:n.extensions)||void 0===r?void 0:r.domain)||void 0===i?void 0:i.active;if(!e)return Pt(t);if(!Ft(e)||Pt(e).isOlderThan(At)){var o=Pt(t).getStackTop();Jt(e,new qt(o.client,Rt.clone(o.scope)))}return Pt(e)}catch(n){return Pt(t)}}(t):Pt(t)}function Ft(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function Pt(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub?t.__SENTRY__.hub:(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new qt,t.__SENTRY__.hub)}function Jt(t,n){return!!t&&(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=n,!0)}function Xt(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=Ht();if(i&&i[t])return i[t].apply(i,l(n));throw new Error("No hub defined or "+t+" was not found on the hub, please open a bug report.")}function captureException(t,n){var r;try{throw new Error("Sentry syntheticException")}catch(t){r=t}return Xt("captureException",t,{captureContext:n,originalException:t,syntheticException:r})}function Bt(t){Xt("withScope",t)}var Wt=function(){function t(t,n,r){void 0===n&&(n={}),this.dsn=t,this.tt=new T(t),this.metadata=n,this.nt=r}return t.prototype.getDsn=function(){return this.tt},t.prototype.forceEnvelope=function(){return!!this.nt},t.prototype.getBaseApiEndpoint=function(){var t=this.getDsn(),n=t.protocol?t.protocol+":":"",r=t.port?":"+t.port:"";return n+"//"+t.host+r+(t.path?"/"+t.path:"")+"/api/"},t.prototype.getStoreEndpoint=function(){return this.rt("store")},t.prototype.getStoreEndpointWithUrlEncodedAuth=function(){return this.getStoreEndpoint()+"?"+this.it()},t.prototype.getEnvelopeEndpointWithUrlEncodedAuth=function(){return this.forceEnvelope()?this.nt:this.et()+"?"+this.it()},t.prototype.getStoreEndpointPath=function(){var t=this.getDsn();return(t.path?"/"+t.path:"")+"/api/"+t.projectId+"/store/"},t.prototype.getRequestHeaders=function(t,n){var r=this.getDsn(),i=["Sentry sentry_version=7"];return i.push("sentry_client="+t+"/"+n),i.push("sentry_key="+r.publicKey),r.pass&&i.push("sentry_secret="+r.pass),{"Content-Type":"application/json","X-Sentry-Auth":i.join(", ")}},t.prototype.getReportDialogEndpoint=function(t){void 0===t&&(t={});var n=this.getDsn(),r=this.getBaseApiEndpoint()+"embed/error-page/",i=[];for(var e in i.push("dsn="+n.toString()),t)if("dsn"!==e)if("user"===e){if(!t.user)continue;t.user.name&&i.push("name="+encodeURIComponent(t.user.name)),t.user.email&&i.push("email="+encodeURIComponent(t.user.email))}else i.push(encodeURIComponent(e)+"="+encodeURIComponent(t[e]));return i.length?r+"?"+i.join("&"):r},t.prototype.et=function(){return this.rt("envelope")},t.prototype.rt=function(t){return this.nt?this.nt:""+this.getBaseApiEndpoint()+this.getDsn().projectId+"/"+t+"/"},t.prototype.it=function(){var t,n={sentry_key:this.getDsn().publicKey,sentry_version:"7"};return t=n,Object.keys(t).map(function(n){return encodeURIComponent(n)+"="+encodeURIComponent(t[n])}).join("&")},t}(),$t=[];function Gt(t){return t.reduce(function(t,n){return t.every(function(t){return n.name!==t.name})&&t.push(n),t},[])}function Kt(t){var n={};return function(t){var n=t.defaultIntegrations&&l(t.defaultIntegrations)||[],r=t.integrations,i=l(Gt(n));Array.isArray(r)?i=l(i.filter(function(t){return r.every(function(n){return n.name!==t.name})}),Gt(r)):"function"==typeof r&&(i=r(i),i=Array.isArray(i)?i:[i]);var e=i.map(function(t){return t.name});return-1!==e.indexOf("Debug")&&i.push.apply(i,l(i.splice(e.indexOf("Debug"),1))),i}(t).forEach(function(t){n[t.name]=t,function(t){-1===$t.indexOf(t.name)&&(t.setupOnce(Ct,Ht),$t.push(t.name),$.log("Integration installed: "+t.name))}(t)}),Object.defineProperty(n,"initialized",{value:!0}),n}var zt=function(){function t(t,n){this.ot={},this.ut=0,this.st=new t(n),this.ct=n,n.dsn&&(this.at=new T(n.dsn))}return t.prototype.captureException=function(t,n,r){var i=this,e=n&&n.event_id;return this.ft(this.ht().eventFromException(t,n).then(function(t){return i.vt(t,n,r)}).then(function(t){e=t})),e},t.prototype.captureMessage=function(t,n,r,i){var e=this,o=r&&r.event_id,u=b(t)?this.ht().eventFromMessage(String(t),n,r):this.ht().eventFromException(t,r);return this.ft(u.then(function(t){return e.vt(t,r,i)}).then(function(t){o=t})),o},t.prototype.captureEvent=function(t,n,r){var i=n&&n.event_id;return this.ft(this.vt(t,n,r).then(function(t){i=t})),i},t.prototype.captureSession=function(t){this.lt()?"string"!=typeof t.release?$.warn("Discarded session because of missing or non-string release"):(this.dt(t),t.update({init:!1})):$.warn("SDK not enabled, will not capture session.")},t.prototype.getDsn=function(){return this.at},t.prototype.getOptions=function(){return this.ct},t.prototype.getTransport=function(){return this.ht().getTransport()},t.prototype.flush=function(t){var n=this;return this.pt(t).then(function(r){return n.getTransport().close(t).then(function(t){return r&&t})})},t.prototype.close=function(t){var n=this;return this.flush(t).then(function(t){return n.getOptions().enabled=!1,t})},t.prototype.setupIntegrations=function(){this.lt()&&!this.ot.initialized&&(this.ot=Kt(this.ct))},t.prototype.getIntegration=function(t){try{return this.ot[t.id]||null}catch(n){return $.warn("Cannot retrieve integration "+t.id+" from the current Client"),null}},t.prototype.yt=function(t,n){var r,i,o=!1,u=!1,s=n.exception&&n.exception.values;if(s){u=!0;try{for(var c=h(s),a=c.next();!a.done;a=c.next()){var v=a.value.mechanism;if(v&&!1===v.handled){o=!0;break}}}catch(t){r={error:t}}finally{try{a&&!a.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}}var l=t.status===e.Ok;(l&&0===t.errors||l&&o)&&(t.update(f(f({},o&&{status:e.Crashed}),{errors:t.errors||Number(u||o)})),this.captureSession(t))},t.prototype.dt=function(t){this.ht().sendSession(t)},t.prototype.pt=function(t){var n=this;return new _t(function(r){var i=0,e=setInterval(function(){0==n.ut?(clearInterval(e),r(!0)):(i+=1,t&&i>=t&&(clearInterval(e),r(!1)))},1)})},t.prototype.ht=function(){return this.st},t.prototype.lt=function(){return!1!==this.getOptions().enabled&&void 0!==this.at},t.prototype.bt=function(t,n,r){var i=this,e=this.getOptions().normalizeDepth,o=void 0===e?3:e,u=f(f({},t),{event_id:t.event_id||(r&&r.event_id?r.event_id:q()),timestamp:t.timestamp||Tt()});this.wt(u),this.gt(u);var s=n;r&&r.captureContext&&(s=Rt.clone(s).update(r.captureContext));var c=_t.resolve(u);return s&&(c=s.applyToEvent(u,r)),c.then(function(t){return"number"==typeof o&&o>0?i.Et(t,o):t})},t.prototype.Et=function(t,n){if(!t)return null;var r=f(f(f(f(f({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(function(t){return f(f({},t),t.data&&{data:rt(t.data,n)})})}),t.user&&{user:rt(t.user,n)}),t.contexts&&{contexts:rt(t.contexts,n)}),t.extra&&{extra:rt(t.extra,n)});t.contexts&&t.contexts.trace&&(r.contexts.trace=t.contexts.trace);var i=this.getOptions().xt;return(void 0===i?{}:i).ensureNoCircularStructures?rt(r):r},t.prototype.wt=function(t){var n=this.getOptions(),r=n.environment,i=n.release,e=n.dist,o=n.maxValueLength,u=void 0===o?250:o;"environment"in t||(t.environment="environment"in n?r:"production"),void 0===t.release&&void 0!==i&&(t.release=i),void 0===t.dist&&void 0!==e&&(t.dist=e),t.message&&(t.message=R(t.message,u));var s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=R(s.value,u));var c=t.request;c&&c.url&&(c.url=R(c.url,u))},t.prototype.gt=function(t){var n=Object.keys(this.ot);n.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=l(t.sdk.integrations||[],n))},t.prototype.jt=function(t){this.ht().sendEvent(t)},t.prototype.vt=function(t,n,r){return this._t(t,n,r).then(function(t){return t.event_id},function(t){$.error(t)})},t.prototype._t=function(t,n,r){var i,e,o=this,u=this.getOptions(),s=u.beforeSend,c=u.sampleRate,f=this.getTransport();if(!this.lt())return _t.reject(new O("SDK not enabled, will not capture event."));var h="transaction"===t.type;return!h&&"number"==typeof c&&Math.random()>c?(null===(e=(i=f).recordLostEvent)||void 0===e||e.call(i,a.SampleRate,"event"),_t.reject(new O("Discarding event because it's not included in the random sample (sampling rate = "+c+")"))):this.bt(t,r,n).then(function(r){var i,e;if(null===r)throw null===(e=(i=f).recordLostEvent)||void 0===e||e.call(i,a.EventProcessor,t.type||"event"),new O("An event processor returned null, will not send event.");if(n&&n.data&&!0===n.data.__sentry__||h||!s)return r;var u=s(r,n);return o.kt(u)}).then(function(n){var i,e;if(null===n)throw null===(e=(i=f).recordLostEvent)||void 0===e||e.call(i,a.BeforeSend,t.type||"event"),new O("`beforeSend` returned `null`, will not send event.");var u=r&&r.getSession&&r.getSession();return!h&&u&&o.yt(u,n),o.jt(n),n}).then(null,function(t){if(t instanceof O)throw t;throw o.captureException(t,{data:{__sentry__:!0},originalException:t}),new O("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+t)})},t.prototype.ft=function(t){var n=this;this.ut+=1,t.then(function(t){return n.ut-=1,t},function(t){return n.ut-=1,t})},t.prototype.kt=function(t){var n="`beforeSend` method has to return `null` or a valid event.";if(x(t))return t.then(function(t){if(!w(t)&&null!==t)throw new O(n);return t},function(t){throw new O("beforeSend rejected with "+t)});if(!w(t)&&null!==t)throw new O(n);return t},t}(),Vt=function(){function n(){}return n.prototype.sendEvent=function(n){return _t.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:t.Status.Skipped})},n.prototype.close=function(t){return _t.resolve(!0)},n}(),Qt=function(){function t(t){this.ct=t,this.ct.dsn||$.warn("No DSN provided, backend will not do anything."),this.St=this.Ot()}return t.prototype.eventFromException=function(t,n){throw new O("Backend has to implement `eventFromException` method")},t.prototype.eventFromMessage=function(t,n,r){throw new O("Backend has to implement `eventFromMessage` method")},t.prototype.sendEvent=function(t){this.St.sendEvent(t).then(null,function(t){$.error("Error while sending event: "+t)})},t.prototype.sendSession=function(t){this.St.sendSession?this.St.sendSession(t).then(null,function(t){$.error("Error while sending session: "+t)}):$.warn("Dropping session because custom transport doesn't implement sendSession")},t.prototype.getTransport=function(){return this.St},t.prototype.Ot=function(){return new Vt},t}();function Yt(t){if(t.metadata&&t.metadata.sdk){var n=t.metadata.sdk;return{name:n.name,version:n.version}}}function Zt(t,n){return n?(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||n.name,t.sdk.version=t.sdk.version||n.version,t.sdk.integrations=l(t.sdk.integrations||[],n.integrations||[]),t.sdk.packages=l(t.sdk.packages||[],n.packages||[]),t):t}function tn(t,n){var r=Yt(n),i="aggregates"in t?"sessions":"session";return{body:JSON.stringify(f(f({sent_at:(new Date).toISOString()},r&&{sdk:r}),n.forceEnvelope()&&{dsn:n.getDsn().toString()}))+"\n"+JSON.stringify({type:i})+"\n"+JSON.stringify(t),type:i,url:n.getEnvelopeEndpointWithUrlEncodedAuth()}}function nn(t,n){var r=Yt(n),i=t.type||"event",e="transaction"===i||n.forceEnvelope(),o=t.debug_meta||{},u=o.transactionSampling,s=function(t,n){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&n.indexOf(i)<0&&(r[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var e=0;for(i=Object.getOwnPropertySymbols(t);e<i.length;e++)n.indexOf(i[e])<0&&(r[i[e]]=t[i[e]])}return r}(o,["transactionSampling"]),c=u||{},a=c.method,h=c.rate;0===Object.keys(s).length?delete t.debug_meta:t.debug_meta=s;var v={body:JSON.stringify(r?Zt(t,n.metadata.sdk):t),type:i,url:e?n.getEnvelopeEndpointWithUrlEncodedAuth():n.getStoreEndpointWithUrlEncodedAuth()};if(e){var l=JSON.stringify(f(f({event_id:t.event_id,sent_at:(new Date).toISOString()},r&&{sdk:r}),n.forceEnvelope()&&{dsn:n.getDsn().toString()}))+"\n"+JSON.stringify({type:i,sample_rates:[{id:a,rate:h}]})+"\n"+v.body;v.body=l}return v}var rn,en="6.13.3",on=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){rn=Function.prototype.toString,Function.prototype.toString=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=this.__sentry_original__||this;return rn.apply(r,t)}},t.id="FunctionToString",t}(),un=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],sn=function(){function t(n){void 0===n&&(n={}),this.ct=n,this.name=t.id}return t.prototype.setupOnce=function(){Ct(function(n){var r=Ht();if(!r)return n;var i=r.getIntegration(t);if(i){var e=r.getClient(),o=e?e.getOptions():{},u="function"==typeof i._mergeOptions?i._mergeOptions(o):{};return"function"!=typeof i.Dt?n:i.Dt(n,u)?null:n}return n})},t.prototype.Dt=function(t,n){return this.Tt(t,n)?($.warn("Event dropped due to being internal Sentry Error.\nEvent: "+U(t)),!0):this.Nt(t,n)?($.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+U(t)),!0):this.Rt(t,n)?($.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: "+U(t)+".\nUrl: "+this.It(t)),!0):!this.Ct(t,n)&&($.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: "+U(t)+".\nUrl: "+this.It(t)),!0)},t.prototype.Tt=function(t,n){if(!n.ignoreInternal)return!1;try{return t&&t.exception&&t.exception.values&&t.exception.values[0]&&"SentryError"===t.exception.values[0].type||!1}catch(t){return!1}},t.prototype.Nt=function(t,n){return!(!n.ignoreErrors||!n.ignoreErrors.length)&&this.Mt(t).some(function(t){return n.ignoreErrors.some(function(n){return C(t,n)})})},t.prototype.Rt=function(t,n){if(!n.denyUrls||!n.denyUrls.length)return!1;var r=this.It(t);return!!r&&n.denyUrls.some(function(t){return C(r,t)})},t.prototype.Ct=function(t,n){if(!n.allowUrls||!n.allowUrls.length)return!0;var r=this.It(t);return!r||n.allowUrls.some(function(t){return C(r,t)})},t.prototype._mergeOptions=function(t){return void 0===t&&(t={}),{allowUrls:l(this.ct.whitelistUrls||[],this.ct.allowUrls||[],t.whitelistUrls||[],t.allowUrls||[]),denyUrls:l(this.ct.blacklistUrls||[],this.ct.denyUrls||[],t.blacklistUrls||[],t.denyUrls||[]),ignoreErrors:l(this.ct.ignoreErrors||[],t.ignoreErrors||[],un),ignoreInternal:void 0===this.ct.ignoreInternal||this.ct.ignoreInternal}},t.prototype.Mt=function(t){if(t.message)return[t.message];if(t.exception)try{var n=t.exception.values&&t.exception.values[0]||{},r=n.type,i=void 0===r?"":r,e=n.value,o=void 0===e?"":e;return[""+o,i+": "+o]}catch(n){return $.error("Cannot extract message for event "+U(t)),[]}return[]},t.prototype.At=function(t){var n,r;void 0===t&&(t=[]);for(var i=t.length-1;i>=0;i--){var e=t[i];if("<anonymous>"!==(null===(n=e)||void 0===n?void 0:n.filename)&&"[native code]"!==(null===(r=e)||void 0===r?void 0:r.filename))return e.filename||null}return null},t.prototype.It=function(t){try{if(t.stacktrace){var n=t.stacktrace.frames;return this.At(n)}if(t.exception){var r=t.exception.values&&t.exception.values[0].stacktrace&&t.exception.values[0].stacktrace.frames;return this.At(r)}return null}catch(n){return $.error("Cannot extract url for event "+U(t)),null}},t.id="InboundFilters",t}(),cn=Object.freeze({__proto__:null,FunctionToString:on,InboundFilters:sn}),an="?",fn=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,hn=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. \/=]+)(?::(\d+))?(?::(\d+))?\s*$/i,vn=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ln=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,dn=/\((\S*)(?::(\d+))(?::(\d+))\)/,pn=/Minified React error #\d+;/i;function yn(t){var n=null,r=0;t&&("number"==typeof t.framesToPop?r=t.framesToPop:pn.test(t.message)&&(r=1));try{if(n=function(t){if(!t||!t.stacktrace)return null;for(var n,r=t.stacktrace,i=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,e=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\((.*)\))? in (.*):\s*$/i,o=r.split("\n"),u=[],s=0;s<o.length;s+=2){var c=null;(n=i.exec(o[s]))?c={url:n[2],func:n[3],args:[],line:+n[1],column:null}:(n=e.exec(o[s]))&&(c={url:n[6],func:n[3]||n[4],args:n[5]?n[5].split(","):[],line:+n[1],column:+n[2]}),c&&(!c.func&&c.line&&(c.func=an),u.push(c))}if(!u.length)return null;return{message:wn(t),name:t.name,stack:u}}(t))return bn(n,r)}catch(t){}try{if(n=function(t){var n,r;if(!t||!t.stack)return null;for(var i,e,o,u=[],s=t.stack.split("\n"),c=0;c<s.length;++c){if(e=fn.exec(s[c])){var a=e[2]&&0===e[2].indexOf("native");e[2]&&0===e[2].indexOf("eval")&&(i=dn.exec(e[2]))&&(e[2]=i[1],e[3]=i[2],e[4]=i[3]);var f=e[2]&&0===e[2].indexOf("address at ")?e[2].substr("address at ".length):e[2],h=e[1]||an;n=v(mn(h,f),2),h=n[0],f=n[1],o={url:f,func:h,args:a?[e[2]]:[],line:e[3]?+e[3]:null,column:e[4]?+e[4]:null}}else if(e=vn.exec(s[c]))o={url:e[2],func:e[1]||an,args:[],line:+e[3],column:e[4]?+e[4]:null};else{if(!(e=hn.exec(s[c])))continue;e[3]&&e[3].indexOf(" > eval")>-1&&(i=ln.exec(e[3]))?(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]=""):0!==c||e[5]||void 0===t.columnNumber||(u[0].column=t.columnNumber+1);var f=e[3],h=e[1]||an;r=v(mn(h,f),2),h=r[0],f=r[1],o={url:f,func:h,args:e[2]?e[2].split(","):[],line:e[4]?+e[4]:null,column:e[5]?+e[5]:null}}!o.func&&o.line&&(o.func=an),u.push(o)}if(!u.length)return null;return{message:wn(t),name:t.name,stack:u}}(t))return bn(n,r)}catch(t){}return{message:wn(t),name:t&&t.name,stack:[],failed:!0}}var mn=function(t,n){var r=-1!==t.indexOf("safari-extension"),i=-1!==t.indexOf("safari-web-extension");return r||i?[-1!==t.indexOf("@")?t.split("@")[0]:an,r?"safari-extension:"+n:"safari-web-extension:"+n]:[t,n]};function bn(t,n){try{return f(f({},t),{stack:t.stack.slice(n)})}catch(n){return t}}function wn(t){var n=t&&t.message;return n?n.error&&"string"==typeof n.error.message?n.error.message:n:"No error message"}var gn=50;function En(t){var n=jn(t.stack),r={type:t.name,value:t.message};return n&&n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function xn(t){return{exception:{values:[En(t)]}}}function jn(t){if(!t||!t.length)return[];var n=t,r=n[0].func||"",i=n[n.length-1].func||"";return-1===r.indexOf("captureMessage")&&-1===r.indexOf("captureException")||(n=n.slice(1)),-1!==i.indexOf("sentryWrapped")&&(n=n.slice(0,-1)),n.slice(0,gn).map(function(t){return{colno:null===t.column?void 0:t.column,filename:t.url||n[0].url,function:t.func||"?",in_app:!0,lineno:null===t.line?void 0:t.line}}).reverse()}function _n(n,r,i){var e=Sn(r,i&&i.syntheticException||void 0,{attachStacktrace:n.attachStacktrace});return P(e,{handled:!0,type:"generic"}),e.level=t.Severity.Error,i&&i.event_id&&(e.event_id=i.event_id),_t.resolve(e)}function kn(n,r,i,e){void 0===i&&(i=t.Severity.Info);var o=On(r,e&&e.syntheticException||void 0,{attachStacktrace:n.attachStacktrace});return o.level=i,e&&e.event_id&&(o.event_id=e.event_id),_t.resolve(o)}function Sn(t,n,r){var i,e;if(void 0===r&&(r={}),p(t)&&t.error)return i=xn(yn(t=t.error));if(y(t)||(e=t,"[object DOMException]"===Object.prototype.toString.call(e))){var o=t,u=o.name||(y(o)?"DOMError":"DOMException"),s=o.message?u+": "+o.message:u;return F(i=On(s,n,r),s),"code"in o&&(i.tags=f(f({},i.tags),{"DOMException.code":""+o.code})),i}return d(t)?i=xn(yn(t)):w(t)||g(t)?(P(i=function(t,n,r){var i={exception:{values:[{type:g(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:"Non-Error "+(r?"promise rejection":"exception")+" captured with keys: "+it(t)}]},extra:{__serialized__:Z(t)}};if(n){var e=jn(yn(n).stack);i.stacktrace={frames:e}}return i}(t,n,r.rejection),{synthetic:!0}),i):(F(i=On(t,n,r),""+t,void 0),P(i,{synthetic:!0}),i)}function On(t,n,r){void 0===r&&(r={});var i={message:t};if(r.attachStacktrace&&n){var e=jn(yn(n).stack);i.stacktrace={frames:e}}return i}var Dn,Tn=A();function Nn(){var t,n;if(Dn)return Dn;if(ut(Tn.fetch))return Dn=Tn.fetch.bind(Tn);var r=Tn.document,i=Tn.fetch;if("function"==typeof(null===(t=r)||void 0===t?void 0:t.createElement))try{var e=r.createElement("iframe");e.hidden=!0,r.head.appendChild(e),(null===(n=e.contentWindow)||void 0===n?void 0:n.fetch)&&(i=e.contentWindow.fetch),r.head.removeChild(e)}catch(t){$.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return Dn=i.bind(Tn)}function Rn(t,n){if("[object Navigator]"===Object.prototype.toString.call(Tn&&Tn.navigator)&&"function"==typeof Tn.navigator.sendBeacon)return Tn.navigator.sendBeacon.bind(Tn.navigator)(t,n);if(ot()){var r=Nn();r(t,{body:n,method:"POST",credentials:"omit",keepalive:!0}).then(null,function(t){console.error(t)})}else;}var In={event:"error",transaction:"transaction",session:"session",attachment:"attachment"},Cn=A(),Mn=function(){function n(t){var n=this;this.options=t,this.D=new kt(30),this.qt={},this.Lt={},this.Ut=new Wt(t.dsn,t.Ht,t.tunnel),this.url=this.Ut.getStoreEndpointWithUrlEncodedAuth(),this.options.sendClientReports&&Cn.document&&Cn.document.addEventListener("visibilitychange",function(){"hidden"===Cn.document.visibilityState&&n.Ft()})}return n.prototype.sendEvent=function(t){throw new O("Transport Class has to implement `sendEvent` method")},n.prototype.close=function(t){return this.D.drain(t)},n.prototype.recordLostEvent=function(t,n){var r;if(this.options.sendClientReports){var i=In[n]+":"+t;$.log("Adding outcome: "+i),this.Lt[i]=(null!=(r=this.Lt[i])?r:0)+1}},n.prototype.Ft=function(){if(this.options.sendClientReports){var t=this.Lt;if(this.Lt={},Object.keys(t).length){$.log("Flushing outcomes:\n"+JSON.stringify(t,null,2));var n=this.Ut.getEnvelopeEndpointWithUrlEncodedAuth(),r=JSON.stringify({})+"\n"+JSON.stringify({type:"client_report"})+"\n"+JSON.stringify({timestamp:Tt(),discarded_events:Object.keys(t).map(function(n){var r=v(n.split(":"),2),i=r[0];return{reason:r[1],category:i,quantity:t[n]}})});try{Rn(n,r)}catch(t){$.error(t)}}else $.log("No outcomes to flush")}},n.prototype.Pt=function(n){var r=n.requestType,i=n.response,e=n.headers,o=n.resolve,u=n.reject,s=t.Status.fromHttpCode(i.status);this.Jt(e)&&$.warn("Too many "+r+" requests, backing off until: "+this.Xt(r)),s!==t.Status.Success?u(i):o({status:s})},n.prototype.Xt=function(t){var n=In[t];return this.qt[n]||this.qt.all},n.prototype.Bt=function(t){return this.Xt(t)>new Date(Date.now())},n.prototype.Jt=function(t){var n,r,i,e,o=Date.now(),u=t["x-sentry-rate-limits"],s=t["retry-after"];if(u){try{for(var c=h(u.trim().split(",")),a=c.next();!a.done;a=c.next()){var f=a.value.split(":",2),v=parseInt(f[0],10),l=1e3*(isNaN(v)?60:v);try{for(var d=(i=void 0,h(f[1].split(";"))),p=d.next();!p.done;p=d.next()){var y=p.value;this.qt[y||"all"]=new Date(o+l)}}catch(t){i={error:t}}finally{try{p&&!p.done&&(e=d.return)&&e.call(d)}finally{if(i)throw i.error}}}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return!0}return!!s&&(this.qt.all=new Date(o+function(t,n){if(!n)return J;var r=parseInt(""+n,10);if(!isNaN(r))return 1e3*r;var i=Date.parse(""+n);return isNaN(i)?J:i-t}(o,s)),!0)},n}(),An=function(t){function n(n,r){void 0===r&&(r=Nn());var i=t.call(this,n)||this;return i.Wt=r,i}return r(n,t),n.prototype.sendEvent=function(t){return this.$t(nn(t,this.Ut),t)},n.prototype.sendSession=function(t){return this.$t(tn(t,this.Ut),t)},n.prototype.$t=function(t,n){var r=this;if(this.Bt(t.type))return this.recordLostEvent(a.RateLimitBackoff,t.type),Promise.reject({event:n,type:t.type,reason:"Transport for "+t.type+" requests locked till "+this.Xt(t.type)+" due to too many requests.",status:429});var i={body:t.body,method:"POST",referrerPolicy:st()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(i,this.options.fetchParameters),void 0!==this.options.headers&&(i.headers=this.options.headers),this.D.add(function(){return new _t(function(n,e){r.Wt(t.url,i).then(function(i){var o={"x-sentry-rate-limits":i.headers.get("X-Sentry-Rate-Limits"),"retry-after":i.headers.get("Retry-After")};r.Pt({requestType:t.type,response:i,headers:o,resolve:n,reject:e})}).catch(e)})}).then(void 0,function(n){throw n instanceof O?r.recordLostEvent(a.QueueOverflow,t.type):r.recordLostEvent(a.NetworkError,t.type),n})},n}(Mn),qn=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r(n,t),n.prototype.sendEvent=function(t){return this.$t(nn(t,this.Ut),t)},n.prototype.sendSession=function(t){return this.$t(tn(t,this.Ut),t)},n.prototype.$t=function(t,n){var r=this;return this.Bt(t.type)?(this.recordLostEvent(a.RateLimitBackoff,t.type),Promise.reject({event:n,type:t.type,reason:"Transport for "+t.type+" requests locked till "+this.Xt(t.type)+" due to too many requests.",status:429})):this.D.add(function(){return new _t(function(n,i){var e=new XMLHttpRequest;for(var o in e.onreadystatechange=function(){if(4===e.readyState){var o={"x-sentry-rate-limits":e.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":e.getResponseHeader("Retry-After")};r.Pt({requestType:t.type,response:e,headers:o,resolve:n,reject:i})}},e.open("POST",t.url),r.options.headers)r.options.headers.hasOwnProperty(o)&&e.setRequestHeader(o,r.options.headers[o]);e.send(t.body)})}).then(void 0,function(n){throw n instanceof O?r.recordLostEvent(a.QueueOverflow,t.type):r.recordLostEvent(a.NetworkError,t.type),n})},n}(Mn),Ln=Object.freeze({__proto__:null,BaseTransport:Mn,FetchTransport:An,XHRTransport:qn}),Un=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return r(i,n),i.prototype.eventFromException=function(t,n){return _n(this.ct,t,n)},i.prototype.eventFromMessage=function(n,r,i){return void 0===r&&(r=t.Severity.Info),kn(this.ct,n,r,i)},i.prototype.Ot=function(){if(!this.ct.dsn)return n.prototype.Ot.call(this);var t=f(f({},this.ct.transportOptions),{dsn:this.ct.dsn,tunnel:this.ct.tunnel,sendClientReports:this.ct.sendClientReports,Ht:this.ct.Ht});return this.ct.transport?new this.ct.transport(t):ot()?new An(t):new qn(t)},i}(Qt),Hn=A(),Fn=0;function Pn(){return Fn>0}function Jn(t,n,r){if(void 0===n&&(n={}),"function"!=typeof t)return t;try{if(t.__sentry__)return t;if(t.__sentry_wrapped__)return t.__sentry_wrapped__}catch(n){return t}var sentryWrapped=function(){var i=Array.prototype.slice.call(arguments);try{r&&"function"==typeof r&&r.apply(this,arguments);var e=i.map(function(t){return Jn(t,n)});return t.handleEvent?t.handleEvent.apply(this,e):t.apply(this,e)}catch(t){throw Fn+=1,setTimeout(function(){Fn-=1}),Bt(function(r){r.addEventProcessor(function(t){var r=f({},t);return n.mechanism&&(F(r,void 0,void 0),P(r,n.mechanism)),r.extra=f(f({},r.extra),{arguments:i}),r}),captureException(t)}),t}};try{for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(sentryWrapped[i]=t[i])}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:function(){return t.name}})}catch(t){}return sentryWrapped}function Xn(t){if(void 0===t&&(t={}),Hn.document)if(t.eventId)if(t.dsn){var n=Hn.document.createElement("script");n.async=!0,n.src=new Wt(t.dsn).getReportDialogEndpoint(t),t.onLoad&&(n.onload=t.onLoad);var r=Hn.document.head||Hn.document.body;r&&r.appendChild(n)}else $.error("Missing dsn option in showReportDialog call");else $.error("Missing eventId option in showReportDialog call")}var Bn=function(){function n(t){this.name=n.id,this.Gt=!1,this.Kt=!1,this.ct=f({onerror:!0,onunhandledrejection:!0},t)}return n.prototype.setupOnce=function(){Error.stackTraceLimit=50,this.ct.onerror&&($.log("Global Handler attached: onerror"),this.zt()),this.ct.onunhandledrejection&&($.log("Global Handler attached: onunhandledrejection"),this.Vt())},n.prototype.zt=function(){var t=this;this.Gt||(lt({callback:function(r){var i=r.error,e=Ht(),o=e.getIntegration(n),u=i&&!0===i.__sentry_own_request__;if(o&&!Pn()&&!u){var s=e.getClient(),c=void 0===i&&m(r.msg)?t.Qt(r.msg,r.url,r.line,r.column):t.Yt(Sn(i||r.msg,void 0,{attachStacktrace:s&&s.getOptions().attachStacktrace,rejection:!1}),r.url,r.line,r.column);P(c,{handled:!1,type:"onerror"}),e.captureEvent(c,{originalException:i})}},type:"error"}),this.Gt=!0)},n.prototype.Vt=function(){var r=this;this.Kt||(lt({callback:function(i){var e=i;try{"reason"in i?e=i.reason:"detail"in i&&"reason"in i.detail&&(e=i.detail.reason)}catch(t){}var o=Ht(),u=o.getIntegration(n),s=e&&!0===e.__sentry_own_request__;if(!u||Pn()||s)return!0;var c=o.getClient(),a=b(e)?r.Zt(e):Sn(e,void 0,{attachStacktrace:c&&c.getOptions().attachStacktrace,rejection:!0});a.level=t.Severity.Error,P(a,{handled:!1,type:"onunhandledrejection"}),o.captureEvent(a,{originalException:e})},type:"unhandledrejection"}),this.Kt=!0)},n.prototype.Qt=function(t,n,r,i){var e,o=p(t)?t.message:t,u=o.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);u&&(e=u[1],o=u[2]);var s={exception:{values:[{type:e||"Error",value:o}]}};return this.Yt(s,n,r,i)},n.prototype.Zt=function(t){return{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(t)}]}}},n.prototype.Yt=function(t,n,r,i){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||[];var e=isNaN(parseInt(i,10))?void 0:i,o=isNaN(parseInt(r,10))?void 0:r,u=m(n)&&n.length>0?n:function(){var t=A();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:e,filename:u,function:"?",in_app:!0,lineno:o}),t},n.id="GlobalHandlers",n}(),Wn=["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"],$n=function(){function t(n){this.name=t.id,this.ct=f({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},n)}return t.prototype.setupOnce=function(){var t=A();(this.ct.setTimeout&&V(t,"setTimeout",this.tn.bind(this)),this.ct.setInterval&&V(t,"setInterval",this.tn.bind(this)),this.ct.requestAnimationFrame&&V(t,"requestAnimationFrame",this.nn.bind(this)),this.ct.XMLHttpRequest&&"XMLHttpRequest"in t&&V(XMLHttpRequest.prototype,"send",this.rn.bind(this)),this.ct.eventTarget)&&(Array.isArray(this.ct.eventTarget)?this.ct.eventTarget:Wn).forEach(this.in.bind(this))},t.prototype.tn=function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n[0];return n[0]=Jn(i,{mechanism:{data:{function:z(t)},handled:!0,type:"instrument"}}),t.apply(this,n)}},t.prototype.nn=function(t){return function(n){return t.call(this,Jn(n,{mechanism:{data:{function:"requestAnimationFrame",handler:z(t)},handled:!0,type:"instrument"}}))}},t.prototype.in=function(t){var n=A(),r=n[t]&&n[t].prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(V(r,"addEventListener",function(n){return function(r,i,e){try{"function"==typeof i.handleEvent&&(i.handleEvent=Jn(i.handleEvent.bind(i),{mechanism:{data:{function:"handleEvent",handler:z(i),target:t},handled:!0,type:"instrument"}}))}catch(t){}return n.call(this,r,Jn(i,{mechanism:{data:{function:"addEventListener",handler:z(i),target:t},handled:!0,type:"instrument"}}),e)}}),V(r,"removeEventListener",function(t){return function(n,r,i){var e,o=r;try{var u=null===(e=o)||void 0===e?void 0:e.__sentry_wrapped__;u&&t.call(this,n,u,i)}catch(t){}return t.call(this,n,o,i)}}))},t.prototype.rn=function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(function(t){t in i&&"function"==typeof i[t]&&V(i,t,function(n){var r={mechanism:{data:{function:t,handler:z(n)},handled:!0,type:"instrument"}};return n.__sentry_original__&&(r.mechanism.data.handler=z(n.__sentry_original__)),Jn(n,r)})}),t.apply(this,n)}},t.id="TryCatch",t}(),Gn=function(){function n(t){this.name=n.id,this.ct=f({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}return n.prototype.addSentryBreadcrumb=function(t){this.ct.sentry&&Ht().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:U(t)},{event:t})},n.prototype.setupOnce=function(){var t=this;this.ct.console&<({callback:function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];t.en.apply(t,l(n))},type:"console"}),this.ct.dom&<({callback:function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];t.on.apply(t,l(n))},type:"dom"}),this.ct.xhr&<({callback:function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];t.un.apply(t,l(n))},type:"xhr"}),this.ct.fetch&<({callback:function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];t.sn.apply(t,l(n))},type:"fetch"}),this.ct.history&<({callback:function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];t.cn.apply(t,l(n))},type:"history"})},n.prototype.en=function(n){var r={category:"console",data:{arguments:n.args,logger:"console"},level:t.Severity.fromString(n.level),message:I(n.args," ")};if("assert"===n.level){if(!1!==n.args[0])return;r.message="Assertion failed: "+(I(n.args.slice(1)," ")||"console.assert"),r.data.arguments=n.args.slice(1)}Ht().addBreadcrumb(r,{input:n.args,level:n.level})},n.prototype.on=function(t){var n,r="object"==typeof this.ct.dom?this.ct.dom.serializeAttribute:void 0;"string"==typeof r&&(r=[r]);try{n=t.event.target?_(t.event.target,r):_(t.event,r)}catch(t){n="<unknown>"}0!==n.length&&Ht().addBreadcrumb({category:"ui."+t.name,message:n},{event:t.event,name:t.name,global:t.global})},n.prototype.un=function(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;var n=t.xhr.__sentry_xhr__||{},r=n.method,i=n.url,e=n.status_code,o=n.body;Ht().addBreadcrumb({category:"xhr",data:{method:r,url:i,status_code:e},type:"http"},{xhr:t.xhr,input:o})}else;},n.prototype.sn=function(n){n.endTimestamp&&(n.fetchData.url.match(/sentry_key/)&&"POST"===n.fetchData.method||(n.error?Ht().addBreadcrumb({category:"fetch",data:n.fetchData,level:t.Severity.Error,type:"http"},{data:n.error,input:n.args}):Ht().addBreadcrumb({category:"fetch",data:f(f({},n.fetchData),{status_code:n.response.status}),type:"http"},{input:n.args,response:n.response})))},n.prototype.cn=function(t){var n=A(),r=t.from,i=t.to,e=L(n.location.href),o=L(r),u=L(i);o.path||(o=e),e.protocol===u.protocol&&e.host===u.host&&(i=u.relative),e.protocol===o.protocol&&e.host===o.host&&(r=o.relative),Ht().addBreadcrumb({category:"navigation",data:{from:r,to:i}})},n.id="Breadcrumbs",n}(),Kn="cause",zn=5,Vn=function(){function t(n){void 0===n&&(n={}),this.name=t.id,this.an=n.key||Kn,this.O=n.limit||zn}return t.prototype.setupOnce=function(){Ct(function(n,r){var i=Ht().getIntegration(t);if(i){var e=i.fn&&i.fn.bind(i);return"function"==typeof e?e(n,r):n}return n})},t.prototype.fn=function(t,n){if(!(t.exception&&t.exception.values&&n&&j(n.originalException,Error)))return t;var r=this.hn(n.originalException,this.an);return t.exception.values=l(r,t.exception.values),t},t.prototype.hn=function(t,n,r){if(void 0===r&&(r=[]),!j(t[n],Error)||r.length+1>=this.O)return r;var i=En(yn(t[n]));return this.hn(t[n],n,l([i],r))},t.id="LinkedErrors",t}(),Qn=A(),Yn=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){Ct(function(n){var r,i,e;if(Ht().getIntegration(t)){if(!Qn.navigator&&!Qn.location&&!Qn.document)return n;var o=(null===(r=n.request)||void 0===r?void 0:r.url)||(null===(i=Qn.location)||void 0===i?void 0:i.href),u=(Qn.document||{}).referrer,s=(Qn.navigator||{}).userAgent,c=f(f(f({},null===(e=n.request)||void 0===e?void 0:e.headers),u&&{Referer:u}),s&&{"User-Agent":s}),a=f(f({},o&&{url:o}),{headers:c});return f(f({},n),{request:a})}return n})},t.id="UserAgent",t}(),Zn=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(n,r){n(function(n){var i=r().getIntegration(t);if(i){try{if(i.Dt(n,i.vn))return $.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(t){return i.vn=n}return i.vn=n}return n})},t.prototype.Dt=function(t,n){return!!n&&(!!this.ln(t,n)||!!this.dn(t,n))},t.prototype.ln=function(t,n){var r=t.message,i=n.message;return!(!r&&!i)&&(!(r&&!i||!r&&i)&&(r===i&&(!!this.pn(t,n)&&!!this.yn(t,n))))},t.prototype.mn=function(t){var n=t.exception;if(n)try{return n.values[0].stacktrace.frames}catch(t){return}else if(t.stacktrace)return t.stacktrace.frames},t.prototype.yn=function(t,n){var r=this.mn(t),i=this.mn(n);if(!r&&!i)return!0;if(r&&!i||!r&&i)return!1;if(r=r,(i=i).length!==r.length)return!1;for(var e=0;e<i.length;e++){var o=i[e],u=r[e];if(o.filename!==u.filename||o.lineno!==u.lineno||o.colno!==u.colno||o.function!==u.function)return!1}return!0},t.prototype.bn=function(t){return t.exception&&t.exception.values&&t.exception.values[0]},t.prototype.dn=function(t,n){var r=this.bn(n),i=this.bn(t);return!(!r||!i)&&(r.type===i.type&&r.value===i.value&&(!!this.pn(t,n)&&!!this.yn(t,n)))},t.prototype.pn=function(t,n){var r=t.fingerprint,i=n.fingerprint;if(!r&&!i)return!0;if(r&&!i||!r&&i)return!1;r=r,i=i;try{return!(r.join("")!==i.join(""))}catch(t){return!1}},t.id="Dedupe",t}(),tr=Object.freeze({__proto__:null,GlobalHandlers:Bn,TryCatch:$n,Breadcrumbs:Gn,LinkedErrors:Vn,UserAgent:Yn,Dedupe:Zn}),nr=function(t){function n(n){void 0===n&&(n={});return n.Ht=n.Ht||{},n.Ht.sdk=n.Ht.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:en}],version:en},t.call(this,Un,n)||this}return r(n,t),n.prototype.showReportDialog=function(t){void 0===t&&(t={}),A().document&&(this.lt()?Xn(f(f({},t),{dsn:t.dsn||this.getDsn()})):$.error("Trying to call showReportDialog with Sentry Client disabled"))},n.prototype.bt=function(n,r,i){return n.platform=n.platform||"javascript",t.prototype.bt.call(this,n,r,i)},n.prototype.jt=function(n){var r=this.getIntegration(Gn);r&&r.addSentryBreadcrumb(n),t.prototype.jt.call(this,n)},n}(zt),rr=[new sn,new on,new $n,new Gn,new Bn,new Vn,new Zn,new Yn];var ir={},er=A();er.Sentry&&er.Sentry.Integrations&&(ir=er.Sentry.Integrations);var or=f(f(f({},ir),cn),tr);return t.BrowserClient=nr,t.Hub=qt,t.Integrations=or,t.SDK_NAME="sentry.javascript.browser",t.SDK_VERSION=en,t.Scope=Rt,t.Transports=Ln,t.addBreadcrumb=function(t){Xt("addBreadcrumb",t)},t.addGlobalEventProcessor=Ct,t.captureEvent=function(t){return Xt("captureEvent",t)},t.captureException=captureException,t.captureMessage=function(t,n){var r;try{throw new Error(t)}catch(t){r=t}return Xt("captureMessage",t,"string"==typeof n?n:void 0,f({originalException:t,syntheticException:r},"string"!=typeof n?{captureContext:n}:void 0))},t.close=function(t){var n=Ht().getClient();return n?n.close(t):($.warn("Cannot flush events and disable SDK. No client defined."),_t.resolve(!1))},t.configureScope=function(t){Xt("configureScope",t)},t.defaultIntegrations=rr,t.eventFromException=_n,t.eventFromMessage=kn,t.flush=function(t){var n=Ht().getClient();return n?n.flush(t):($.warn("Cannot flush events. No client defined."),_t.resolve(!1))},t.forceLoad=function(){},t.getCurrentHub=Ht,t.getHubFromCarrier=Pt,t.init=function(t){if(void 0===t&&(t={}),void 0===t.defaultIntegrations&&(t.defaultIntegrations=rr),void 0===t.release){var n=A();n.SENTRY_RELEASE&&n.SENTRY_RELEASE.id&&(t.release=n.SENTRY_RELEASE.id)}void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),void 0===t.sendClientReports&&(t.sendClientReports=!0),function(t,n){var r;!0===n.debug&&$.enable();var i=Ht();null===(r=i.getScope())||void 0===r||r.update(n.initialScope);var e=new t(n);i.bindClient(e)}(nr,t),t.autoSessionTracking&&function(){if(void 0!==A().document){var t=Ht();"function"==typeof t.startSession&&"function"==typeof t.captureSession&&(t.startSession({ignoreDuration:!0}),t.captureSession(),lt({callback:function(n){var r=n.from,i=n.to;void 0!==r&&r!==i&&(t.startSession({ignoreDuration:!0}),t.captureSession())},type:"history"}))}else $.warn("Session tracking in non-browser environment with @sentry/browser is not supported.")}()},t.injectReportDialog=Xn,t.lastEventId=function(){return Ht().lastEventId()},t.makeMain=Ut,t.onLoad=function(t){t()},t.setContext=function(t,n){Xt("setContext",t,n)},t.setExtra=function(t,n){Xt("setExtra",t,n)},t.setExtras=function(t){Xt("setExtras",t)},t.setTag=function(t,n){Xt("setTag",t,n)},t.setTags=function(t){Xt("setTags",t)},t.setUser=function(t){Xt("setUser",t)},t.showReportDialog=function(t){void 0===t&&(t={});var n=Ht(),r=n.getScope();r&&(t.user=f(f({},r.getUser()),t.user)),t.eventId||(t.eventId=n.lastEventId());var i=n.getClient();i&&i.showReportDialog(t)},t.startTransaction=function(t,n){return Xt("startTransaction",f({},t),n)},t.withScope=Bt,t.wrap=function(t){return Jn(t)()},t}({});
|
|
//# sourceMappingURL=sentry-6.13.3.min.js.map
|