8 lines
50 KiB
JavaScript
8 lines
50 KiB
JavaScript
/*! @sentry/browser 5.5.0 (994247d6) | https://github.com/getsentry/sentry-javascript */var Sentry=function(f){var St=function(e,t){return(St=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)r.hasOwnProperty(o)&&(n[o]=r[o])})(e,t)};function Y(e,t){function n(){this.constructor=e}St(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var xt,F,M,g=function(){return(g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function wt(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(t===void 0||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(a){o={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function x(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(wt(arguments[t]));return e}(function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Debug=2]="Debug",e[e.Verbose=3]="Verbose"})(xt||(xt={})),(F=f.Severity||(f.Severity={})).Fatal="fatal",F.Error="error",F.Warning="warning",F.Log="log",F.Info="info",F.Debug="debug",F.Critical="critical",function(e){e.fromString=function(t){switch(t){case"debug":return e.Debug;case"info":return e.Info;case"warn":case"warning":return e.Warning;case"error":return e.Error;case"fatal":return e.Fatal;case"critical":return e.Critical;case"log":default:return e.Log}}}(f.Severity||(f.Severity={})),(M=f.Status||(f.Status={})).Unknown="unknown",M.Skipped="skipped",M.Success="success",M.RateLimit="rate_limit",M.Invalid="invalid",M.Failed="failed",function(e){e.fromHttpCode=function(t){return t>=200&&t<300?e.Success:t===429?e.RateLimit:t>=400&&t<500?e.Invalid:t>=500?e.Failed:e.Unknown}}(f.Status||(f.Status={}));var ie=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){return e.__proto__=t,e}:function(e,t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n]);return e}),C=function(e){function t(n){var r=this.constructor,o=e.call(this,n)||this;return o.message=n,o.name=r.prototype.constructor.name,ie(o,r.prototype),o}return Y(t,e),t}(Error);function nt(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}}function rt(e){return Object.prototype.toString.call(e)==="[object ErrorEvent]"}function kt(e){return Object.prototype.toString.call(e)==="[object DOMError]"}function X(e){return Object.prototype.toString.call(e)==="[object String]"}function ot(e){return e===null||typeof e!="object"&&typeof e!="function"}function Ot(e){return Object.prototype.toString.call(e)==="[object Object]"}function it(e){return Boolean(e&&e.then&&typeof e.then=="function")}var se={};function b(){return Object.prototype.toString.call(typeof process!="undefined"?process:0)==="[object process]"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:se}function B(){var e=b(),t=e.crypto||e.msCrypto;if(t!==void 0&&t.getRandomValues){var n=new Uint16Array(8);t.getRandomValues(n),n[3]=4095&n[3]|16384,n[4]=16383&n[4]|32768;var r=function(o){for(var i=o.toString(16);i.length<4;)i="0"+i;return i};return r(n[0])+r(n[1])+r(n[2])+r(n[3])+r(n[4])+r(n[5])+r(n[6])+r(n[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(o){var i=16*Math.random()|0;return(o==="x"?i:3&i|8).toString(16)})}function st(e){if(!e)return{};var t=e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}function U(e){if(e.message)return e.message;if(e.exception&&e.exception.values&&e.exception.values[0]){var t=e.exception.values[0];return t.type&&t.value?t.type+": "+t.value:t.type||t.value||e.event_id||"<unknown>"}return e.event_id||"<unknown>"}function V(e){var t=b();if(!("console"in t))return e();var n=t.console,r={};["debug","info","warn","error","log","assert"].forEach(function(i){i in t.console&&n[i].__sentry__&&(r[i]=n[i].__sentry_wrapped__,n[i]=n[i].__sentry_original__)});var o=e();return Object.keys(r).forEach(function(i){n[i]=r[i]}),o}function $(e,t,n,r){r===void 0&&(r={handled:!0,type:"generic"}),e.exception=e.exception||{},e.exception.values=e.exception.values||[],e.exception.values[0]=e.exception.values[0]||{},e.exception.values[0].value=e.exception.values[0].value||t||"",e.exception.values[0].type=e.exception.values[0].type||n||"Error",e.exception.values[0].mechanism=e.exception.values[0].mechanism||r}var A=b(),at="Sentry Logger ",ae=function(){function e(){this.t=!1}return e.prototype.disable=function(){this.t=!1},e.prototype.enable=function(){this.t=!0},e.prototype.log=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.t&&V(function(){A.console.log(at+"[Log]: "+t.join(" "))})},e.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.t&&V(function(){A.console.warn(at+"[Warn]: "+t.join(" "))})},e.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.t&&V(function(){A.console.error(at+"[Error]: "+t.join(" "))})},e}();A.__SENTRY__=A.__SENTRY__||{};var y=A.__SENTRY__.logger||(A.__SENTRY__.logger=new ae),ue=function(){function e(){this.i=typeof WeakSet=="function",this.o=this.i?new WeakSet:[]}return e.prototype.memoize=function(t){if(this.i)return!!this.o.has(t)||(this.o.add(t),!1);for(var n=0;n<this.o.length;n++)if(this.o[n]===t)return!0;return this.o.push(t),!1},e.prototype.unmemoize=function(t){if(this.i)this.o.delete(t);else for(var n=0;n<this.o.length;n++)if(this.o[n]===t){this.o.splice(n,1);break}},e}();function S(e,t,n){if(t in e){var r=e[t],o=n(r);if(typeof o=="function")try{o.prototype=o.prototype||{},Object.defineProperties(o,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:r},__sentry_wrapped__:{enumerable:!1,value:o}})}catch(i){}e[t]=o}}function ce(e){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(e))}function Tt(e,t,n){t===void 0&&(t=3),n===void 0&&(n=102400);var r=w(e,t);return ce(r)>n?Tt(e,t-1,n):r}function jt(e,t){return t==="domain"&&typeof e=="object"&&e.u?"[Domain]":t==="domainEmitter"?"[DomainEmitter]":typeof global!="undefined"&&e===global?"[Global]":typeof window!="undefined"&&e===window?"[Window]":typeof document!="undefined"&&e===document?"[Document]":typeof Event!="undefined"&&e instanceof Event?Object.getPrototypeOf(e)?e.constructor.name:"Event":Ot(n=e)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n?"[SyntheticEvent]":Number.isNaN(e)?"[NaN]":e===void 0?"[undefined]":typeof e=="function"?"[Function: "+(e.name||"<unknown-function-name>")+"]":e;var n}function Nt(e,t,n,r){if(n===void 0&&(n=1/0),r===void 0&&(r=new ue),n===0)return function(u){var p=Object.prototype.toString.call(u);if(typeof u=="string")return u;if(p==="[object Object]")return"[Object]";if(p==="[object Array]")return"[Array]";var c=jt(u);return ot(c)?c:p}(t);if(t!=null&&typeof t.toJSON=="function")return t.toJSON();var o=jt(t,e);if(ot(o))return o;var i=nt(t)?function(u){var p={message:u.message,name:u.name,stack:u.stack};for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(p[c]=u[c]);return p}(t):t,s=Array.isArray(t)?[]:{};if(r.memoize(t))return"[Circular ~]";for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(s[a]=Nt(a,i[a],n-1,r));return r.unmemoize(t),s}function w(e,t){try{return JSON.parse(JSON.stringify(e,function(n,r){return Nt(n,r,t)}))}catch(n){return"**non-serializable**"}}var D,pe=function(){function e(t){this.s=t,this.h=[]}return e.prototype.isReady=function(){return this.s===void 0||this.length()<this.s},e.prototype.add=function(t){var n=this;return this.isReady()?(this.h.indexOf(t)===-1&&this.h.push(t),t.then(function(){return n.remove(t)}).catch(function(){return n.remove(t).catch(function(){})}),t):Promise.reject(new C("Not adding Promise due to buffer limit reached."))},e.prototype.remove=function(t){return this.h.splice(this.h.indexOf(t),1)[0]},e.prototype.length=function(){return this.h.length},e.prototype.drain=function(t){var n=this;return new Promise(function(r){var o=setTimeout(function(){t&&t>0&&r(!1)},t);Promise.all(n.h).then(function(){clearTimeout(o),r(!0)}).catch(function(){r(!0)})})},e}();function H(e,t){return t===void 0&&(t=0),typeof e!="string"||t===0||e.length<=t?e:e.substr(0,t)+"..."}function Rt(e,t){if(!Array.isArray(e))return"";for(var n=[],r=0;r<e.length;r++){var o=e[r];try{n.push(String(o))}catch(i){n.push("[value cannot be serialized]")}}return n.join(t)}function le(e,t){if(t===void 0&&(t=40),!e.length)return"[object has no keys]";if(e[0].length>=t)return H(e[0],t);for(var n=e.length;n>0;n--){var r=e.slice(0,n).join(", ");if(!(r.length>t))return n===e.length?r:H(r,t)}return""}function ut(e,t){return n=t,Object.prototype.toString.call(n)==="[object RegExp]"?t.test(e):typeof t=="string"&&e.includes(t);var n}function ct(){if(!("fetch"in b()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(e){return!1}}function he(){if(!ct())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(e){return!1}}(function(e){e.PENDING="PENDING",e.RESOLVED="RESOLVED",e.REJECTED="REJECTED"})(D||(D={}));var R=function(){function e(t){var n=this;this.l=D.PENDING,this.v=[],this.p=function(r){n.m(r,D.RESOLVED)},this.g=function(r){n.m(r,D.REJECTED)},this.m=function(r,o){n.l===D.PENDING&&(it(r)?r.then(n.p,n.g):(n.j=r,n.l=o,n._()))},this._=function(){n.l!==D.PENDING&&(n.l===D.REJECTED?n.v.forEach(function(r){return r.onFail&&r.onFail(n.j)}):n.v.forEach(function(r){return r.onSuccess&&r.onSuccess(n.j)}),n.v=[])},this.S=function(r){n.v=n.v.concat(r),n._()};try{t(this.p,this.g)}catch(r){this.g(r)}}return e.prototype.then=function(t,n){var r=this;return new e(function(o,i){r.S({onFail:function(s){if(n)try{return void o(n(s))}catch(a){return void i(a)}else i(s)},onSuccess:function(s){if(t)try{return void o(t(s))}catch(a){return void i(a)}else o(s)}})})},e.prototype.catch=function(t){return this.then(function(n){return n},t)},e.prototype.toString=function(){return"[object SyncPromise]"},e.resolve=function(t){return new e(function(n){n(t)})},e.reject=function(t){return new e(function(n,r){r(t)})},e}(),fe=/^[ \t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \t]*$/,It=function(){function e(t,n,r,o){t===void 0&&(t=B()),n===void 0&&(n=B().substring(16)),this.O=t,this.k=n,this.T=r,this.R=o}return e.prototype.setParent=function(t){return this.R=t,this},e.prototype.setSampled=function(t){return this.T=t,this},e.fromTraceparent=function(t){var n=t.match(fe);if(n){var r=void 0;n[3]==="1"?r=!0:n[3]==="0"&&(r=!1);var o=new e(n[1],n[2],r);return new e(n[1],void 0,r,o)}},e.prototype.toTraceparent=function(){var t="";return this.T===!0?t="-1":this.T===!1&&(t="-0"),this.O+"-"+this.k+t},e.prototype.toJSON=function(){return{parent:this.R&&this.R.toJSON()||void 0,sampled:this.T,span_id:this.k,trace_id:this.O}},e}(),z=function(){function e(){this.D=!1,this.I=[],this.C=[],this.N=[],this.A={},this.L={},this.M={},this.U={}}return e.prototype.addScopeListener=function(t){this.I.push(t)},e.prototype.addEventProcessor=function(t){return this.C.push(t),this},e.prototype.F=function(){var t=this;this.D||(this.D=!0,setTimeout(function(){t.I.forEach(function(n){n(t)}),t.D=!1}))},e.prototype.P=function(t,n,r,o){var i=this;return o===void 0&&(o=0),new R(function(s,a){var u=t[o];if(n===null||typeof u!="function")s(n);else{var p=u(g({},n),r);it(p)?p.then(function(c){return i.P(t,c,r,o+1).then(s)}).catch(a):i.P(t,p,r,o+1).then(s).catch(a)}})},e.prototype.setUser=function(t){return this.A=w(t),this.F(),this},e.prototype.setTags=function(t){return this.L=g({},this.L,w(t)),this.F(),this},e.prototype.setTag=function(t,n){var r;return this.L=g({},this.L,((r={})[t]=w(n),r)),this.F(),this},e.prototype.setExtras=function(t){return this.M=g({},this.M,w(t)),this.F(),this},e.prototype.setExtra=function(t,n){var r;return this.M=g({},this.M,((r={})[t]=w(n),r)),this.F(),this},e.prototype.setFingerprint=function(t){return this.$=w(t),this.F(),this},e.prototype.setLevel=function(t){return this.q=w(t),this.F(),this},e.prototype.setTransaction=function(t){return this.H=t,this.F(),this},e.prototype.setContext=function(t,n){return this.U[t]=n?w(n):void 0,this.F(),this},e.prototype.setSpan=function(t){return this.W=t,this.F(),this},e.prototype.startSpan=function(t){var n=new It;return n.setParent(t),this.setSpan(n),n},e.prototype.getSpan=function(){return this.W},e.clone=function(t){var n=new e;return Object.assign(n,t,{I:[]}),t&&(n.N=x(t.N),n.L=g({},t.L),n.M=g({},t.M),n.U=g({},t.U),n.A=t.A,n.q=t.q,n.W=t.W,n.H=t.H,n.$=t.$,n.C=x(t.C)),n},e.prototype.clear=function(){return this.N=[],this.L={},this.M={},this.A={},this.U={},this.q=void 0,this.H=void 0,this.$=void 0,this.W=void 0,this.F(),this},e.prototype.addBreadcrumb=function(t,n){var r=new Date().getTime()/1e3,o=g({timestamp:r},t);return this.N=n!==void 0&&n>=0?x(this.N,[w(o)]).slice(-n):x(this.N,[w(o)]),this.F(),this},e.prototype.clearBreadcrumbs=function(){return this.N=[],this.F(),this},e.prototype.B=function(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this.$&&(t.fingerprint=t.fingerprint.concat(this.$)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint},e.prototype.applyToEvent=function(t,n){return this.M&&Object.keys(this.M).length&&(t.extra=g({},this.M,t.extra)),this.L&&Object.keys(this.L).length&&(t.tags=g({},this.L,t.tags)),this.A&&Object.keys(this.A).length&&(t.user=g({},this.A,t.user)),this.U&&Object.keys(this.U).length&&(t.contexts=g({},this.U,t.contexts)),this.q&&(t.level=this.q),this.H&&(t.transaction=this.H),this.W&&(t.contexts=t.contexts||{},t.contexts.trace=this.W),this.B(t),t.breadcrumbs=x(t.breadcrumbs||[],this.N),t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,this.P(x(Ct(),this.C),t,n)},e}();function Ct(){var e=b();return e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.globalEventProcessors=e.__SENTRY__.globalEventProcessors||[],e.__SENTRY__.globalEventProcessors}function J(e){Ct().push(e)}var pt=3,K=function(){function e(t,n,r){n===void 0&&(n=new z),r===void 0&&(r=pt),this.J=r,this.X=[],this.X.push({client:t,scope:n})}return e.prototype.G=function(t){for(var n,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];var i=this.getStackTop();i&&i.client&&i.client[t]&&(n=i.client)[t].apply(n,x(r,[i.scope]))},e.prototype.isOlderThan=function(t){return this.J<t},e.prototype.bindClient=function(t){this.getStackTop().client=t},e.prototype.pushScope=function(){var t=this.getStack(),n=t.length>0?t[t.length-1].scope:void 0,r=z.clone(n);return this.getStack().push({client:this.getClient(),scope:r}),r},e.prototype.popScope=function(){return this.getStack().pop()!==void 0},e.prototype.withScope=function(t){var n=this.pushScope();try{t(n)}finally{this.popScope()}},e.prototype.getClient=function(){return this.getStackTop().client},e.prototype.getScope=function(){return this.getStackTop().scope},e.prototype.getStack=function(){return this.X},e.prototype.getStackTop=function(){return this.X[this.X.length-1]},e.prototype.captureException=function(t,n){var r=this.V=B(),o=n;if(!n){var i=void 0;try{throw new Error("Sentry syntheticException")}catch(s){i=s}o={originalException:t,syntheticException:i}}return this.G("captureException",t,g({},o,{event_id:r})),r},e.prototype.captureMessage=function(t,n,r){var o=this.V=B(),i=r;if(!r){var s=void 0;try{throw new Error(t)}catch(a){s=a}i={originalException:t,syntheticException:s}}return this.G("captureMessage",t,n,g({},i,{event_id:o})),o},e.prototype.captureEvent=function(t,n){var r=this.V=B();return this.G("captureEvent",t,g({},n,{event_id:r})),r},e.prototype.lastEventId=function(){return this.V},e.prototype.addBreadcrumb=function(t,n){var r=this.getStackTop();if(r.scope&&r.client){var o=r.client.getOptions&&r.client.getOptions()||{},i=o.beforeBreadcrumb,s=i===void 0?null:i,a=o.maxBreadcrumbs,u=a===void 0?30:a;if(!(u<=0)){var p=new Date().getTime()/1e3,c=g({timestamp:p},t),l=s?V(function(){return s(c,n)}):c;l!==null&&r.scope.addBreadcrumb(l,Math.min(u,100))}}},e.prototype.setUser=function(t){var n=this.getStackTop();n.scope&&n.scope.setUser(t)},e.prototype.setTags=function(t){var n=this.getStackTop();n.scope&&n.scope.setTags(t)},e.prototype.setExtras=function(t){var n=this.getStackTop();n.scope&&n.scope.setExtras(t)},e.prototype.setTag=function(t,n){var r=this.getStackTop();r.scope&&r.scope.setTag(t,n)},e.prototype.setExtra=function(t,n){var r=this.getStackTop();r.scope&&r.scope.setExtra(t,n)},e.prototype.setContext=function(t,n){var r=this.getStackTop();r.scope&&r.scope.setContext(t,n)},e.prototype.configureScope=function(t){var n=this.getStackTop();n.scope&&n.client&&t(n.scope)},e.prototype.run=function(t){var n=Lt(this);try{t(this)}finally{Lt(n)}},e.prototype.getIntegration=function(t){var n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch(r){return y.warn("Cannot retrieve integration "+t.id+" from the current Hub"),null}},e.prototype.traceHeaders=function(){var t=this.getStackTop();if(t.scope&&t.client){var n=t.scope.getSpan();if(n)return{"sentry-trace":n.toTraceparent()}}return{}},e}();function Dt(){var e=b();return e.__SENTRY__=e.__SENTRY__||{hub:void 0},e}function Lt(e){var t=Dt(),n=L(t);return lt(t,e),n}function _(){var e,t,n=Dt();Pt(n)&&!L(n).isOlderThan(pt)||lt(n,new K);try{var r=(e=module,t="domain",e.require(t)).active;if(!r)return L(n);if(!Pt(r)||L(r).isOlderThan(pt)){var o=L(n).getStackTop();lt(r,new K(o.client,z.clone(o.scope)))}return L(r)}catch(i){return L(n)}}function Pt(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function L(e){return e&&e.__SENTRY__&&e.__SENTRY__.hub||(e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.hub=new K),e.__SENTRY__.hub}function lt(e,t){return!!e&&(e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.hub=t,!0)}function N(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=_();if(r&&r[e])return r[e].apply(r,x(t));throw new Error("No hub defined or "+e+" was not found on the hub, please open a bug report.")}function Ft(e){var t;try{throw new Error("Sentry syntheticException")}catch(n){t=n}return N("captureException",e,{originalException:e,syntheticException:t})}function Ut(e){N("withScope",e)}var de=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w\.-]+)(?::(\d+))?\/(.+)/,At=function(){function e(t){typeof t=="string"?this.K(t):this.Z(t),this.Y()}return e.prototype.toString=function(t){t===void 0&&(t=!1);var n=this,r=n.host,o=n.path,i=n.pass,s=n.port,a=n.projectId;return n.protocol+"://"+n.user+(t&&i?":"+i:"")+"@"+r+(s?":"+s:"")+"/"+(o&&o+"/")+a},e.prototype.K=function(t){var n=de.exec(t);if(!n)throw new C("Invalid Dsn");var r=wt(n.slice(1),6),o=r[0],i=r[1],s=r[2],a=s===void 0?"":s,u=r[3],p=r[4],c=p===void 0?"":p,l="",h=r[5],d=h.split("/");d.length>1&&(l=d.slice(0,-1).join("/"),h=d.pop()),Object.assign(this,{host:u,pass:a,path:l,projectId:h,port:c,protocol:o,user:i})},e.prototype.Z=function(t){this.protocol=t.protocol,this.user=t.user,this.pass=t.pass||"",this.host=t.host,this.port=t.port||"",this.path=t.path||"",this.projectId=t.projectId},e.prototype.Y=function(){var t=this;if(["protocol","user","host","projectId"].forEach(function(n){if(!t[n])throw new C("Invalid Dsn")}),this.protocol!=="http"&&this.protocol!=="https")throw new C("Invalid Dsn");if(this.port&&Number.isNaN(parseInt(this.port,10)))throw new C("Invalid Dsn")},e}(),Z=function(){function e(t){this.dsn=t,this.nn=new At(t)}return e.prototype.getDsn=function(){return this.nn},e.prototype.getStoreEndpoint=function(){return""+this.tn()+this.getStoreEndpointPath()},e.prototype.getStoreEndpointWithUrlEncodedAuth=function(){var t,n={sentry_key:this.nn.user,sentry_version:"7"};return this.getStoreEndpoint()+"?"+(t=n,Object.keys(t).map(function(r){return encodeURIComponent(r)+"="+encodeURIComponent(t[r])}).join("&"))},e.prototype.tn=function(){var t=this.nn,n=t.protocol?t.protocol+":":"",r=t.port?":"+t.port:"";return n+"//"+t.host+r},e.prototype.getStoreEndpointPath=function(){var t=this.nn;return(t.path?"/"+t.path:"")+"/api/"+t.projectId+"/store/"},e.prototype.getRequestHeaders=function(t,n){var r=this.nn,o=["Sentry sentry_version=7"];return o.push("sentry_timestamp="+new Date().getTime()),o.push("sentry_client="+t+"/"+n),o.push("sentry_key="+r.user),r.pass&&o.push("sentry_secret="+r.pass),{"Content-Type":"application/json","X-Sentry-Auth":o.join(", ")}},e.prototype.getReportDialogEndpoint=function(t){t===void 0&&(t={});var n=this.nn,r=this.tn()+(n.path?"/"+n.path:"")+"/api/embed/error-page/",o=[];for(var i in o.push("dsn="+n.toString()),t)if(i==="user"){if(!t.user)continue;t.user.name&&o.push("name="+encodeURIComponent(t.user.name)),t.user.email&&o.push("email="+encodeURIComponent(t.user.email))}else o.push(encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return o.length?r+"?"+o.join("&"):r},e}(),Mt=[];function ve(e){var t={};return function(n){var r=n.defaultIntegrations&&x(n.defaultIntegrations)||[],o=n.integrations,i=[];if(Array.isArray(o)){var s=o.map(function(u){return u.name}),a=[];r.forEach(function(u){s.indexOf(u.name)===-1&&a.indexOf(u.name)===-1&&(i.push(u),a.push(u.name))}),o.forEach(function(u){a.indexOf(u.name)===-1&&(i.push(u),a.push(u.name))})}else{if(typeof o!="function")return x(r);i=o(r),i=Array.isArray(i)?i:[i]}return i}(e).forEach(function(n){t[n.name]=n,function(r){Mt.indexOf(r.name)===-1&&(r.setupOnce(J,_),Mt.push(r.name),y.log("Integration installed: "+r.name))}(n)}),t}var Bt,ge=function(){function e(t,n){this.rn=!1,this.en=new t(n),this.in=n,n.dsn&&(this.on=new At(n.dsn)),this.un=ve(this.in)}return e.prototype.captureException=function(t,n,r){var o=this,i=n&&n.event_id;return this.rn=!0,this.cn().eventFromException(t,n).then(function(s){return o.sn(s,n,r)}).then(function(s){i=s&&s.event_id,o.rn=!1}).catch(function(s){y.error(s),o.rn=!1}),i},e.prototype.captureMessage=function(t,n,r,o){var i=this,s=r&&r.event_id;return this.rn=!0,(ot(t)?this.cn().eventFromMessage(""+t,n,r):this.cn().eventFromException(t,r)).then(function(a){return i.sn(a,r,o)}).then(function(a){s=a&&a.event_id,i.rn=!1}).catch(function(a){y.error(a),i.rn=!1}),s},e.prototype.captureEvent=function(t,n,r){var o=this,i=n&&n.event_id;return this.rn=!0,this.sn(t,n,r).then(function(s){i=s&&s.event_id,o.rn=!1}).catch(function(s){y.error(s),o.rn=!1}),i},e.prototype.getDsn=function(){return this.on},e.prototype.getOptions=function(){return this.in},e.prototype.flush=function(t){var n=this;return this.an(t).then(function(r){return clearInterval(r.interval),n.cn().getTransport().close(t).then(function(o){return r.ready&&o})})},e.prototype.close=function(t){var n=this;return this.flush(t).then(function(r){return n.getOptions().enabled=!1,r})},e.prototype.getIntegrations=function(){return this.un||{}},e.prototype.getIntegration=function(t){try{return this.un[t.id]||null}catch(n){return y.warn("Cannot retrieve integration "+t.id+" from the current Client"),null}},e.prototype.an=function(t){var n=this;return new Promise(function(r){var o=0,i=0;clearInterval(i),i=setInterval(function(){n.rn?(o+=1,t&&o>=t&&r({interval:i,ready:!1})):r({interval:i,ready:!0})},1)})},e.prototype.cn=function(){return this.en},e.prototype.fn=function(){return this.getOptions().enabled!==!1&&this.on!==void 0},e.prototype.hn=function(t,n,r){var o=this.getOptions(),i=o.environment,s=o.release,a=o.dist,u=o.maxValueLength,p=u===void 0?250:u,c=g({},t);c.environment===void 0&&i!==void 0&&(c.environment=i),c.release===void 0&&s!==void 0&&(c.release=s),c.dist===void 0&&a!==void 0&&(c.dist=a),c.message&&(c.message=H(c.message,p));var l=c.exception&&c.exception.values&&c.exception.values[0];l&&l.value&&(l.value=H(l.value,p));var h=c.request;h&&h.url&&(h.url=H(h.url,p)),c.event_id===void 0&&(c.event_id=B()),this.ln(c.sdk);var d=R.resolve(c);return n&&(d=n.applyToEvent(c,r)),d},e.prototype.ln=function(t){var n=Object.keys(this.un);t&&n.length>0&&(t.integrations=n)},e.prototype.sn=function(t,n,r){var o=this,i=this.getOptions(),s=i.beforeSend,a=i.sampleRate;return this.fn()?typeof a=="number"&&Math.random()>a?R.reject("This event has been sampled, will not send event."):new R(function(u,p){o.hn(t,r,n).then(function(c){if(c!==null){var l=c;try{if(n&&n.data&&n.data.__sentry__===!0||!s)return o.cn().sendEvent(l),void u(l);var h=s(c,n);if(h===void 0)y.error("`beforeSend` method has to return `null` or a valid event.");else if(it(h))o.vn(h,u,p);else{if((l=h)===null)return y.log("`beforeSend` returned `null`, will not send event."),void u(null);o.cn().sendEvent(l),u(l)}}catch(d){o.captureException(d,{data:{__sentry__:!0},originalException:d}),p("`beforeSend` throw an error, will not send event.")}}else p("An event processor returned null, will not send event.")})}):R.reject("SDK not enabled, will not send event.")},e.prototype.vn=function(t,n,r){var o=this;t.then(function(i){i!==null?(o.cn().sendEvent(i),n(i)):r("`beforeSend` returned `null`, will not send event.")}).catch(function(i){r("beforeSend rejected with "+i)})},e}(),ye=function(){function e(){}return e.prototype.sendEvent=function(t){return Promise.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:f.Status.Skipped})},e.prototype.close=function(t){return Promise.resolve(!0)},e}(),me=function(){function e(t){this.in=t,this.in.dsn||y.warn("No DSN provided, backend will not do anything."),this.dn=this.pn()}return e.prototype.pn=function(){return new ye},e.prototype.eventFromException=function(t,n){throw new C("Backend has to implement `eventFromException` method")},e.prototype.eventFromMessage=function(t,n,r){throw new C("Backend has to implement `eventFromMessage` method")},e.prototype.sendEvent=function(t){this.dn.sendEvent(t).catch(function(n){y.error("Error while sending event: "+n)})},e.prototype.getTransport=function(){return this.dn},e}(),Ht=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(){Bt=Function.prototype.toString,Function.prototype.toString=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=this.__sentry__?this.__sentry_original__:this;return Bt.apply(r,t)}},e.id="FunctionToString",e}(),_e=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],qt=function(){function e(t){t===void 0&&(t={}),this.in=t,this.name=e.id}return e.prototype.setupOnce=function(){J(function(t){var n=_();if(!n)return t;var r=n.getIntegration(e);if(r){var o=n.getClient(),i=o?o.getOptions():{},s=r.mn(i);if(r.yn(t,s))return null}return t})},e.prototype.yn=function(t,n){return this.bn(t,n)?(y.warn(`Event dropped due to being internal Sentry Error.
|
|
Event: `+U(t)),!0):this.wn(t,n)?(y.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+U(t)),!0):this.gn(t,n)?(y.warn("Event dropped due to being matched by `blacklistUrls` option.\nEvent: "+U(t)+`.
|
|
Url: `+this.En(t)),!0):!this.xn(t,n)&&(y.warn("Event dropped due to not being matched by `whitelistUrls` option.\nEvent: "+U(t)+`.
|
|
Url: `+this.En(t)),!0)},e.prototype.bn=function(t,n){if(n===void 0&&(n={}),!n.ignoreInternal)return!1;try{return t.exception.values[0].type==="SentryError"}catch(r){return!1}},e.prototype.wn=function(t,n){return n===void 0&&(n={}),!(!n.ignoreErrors||!n.ignoreErrors.length)&&this.jn(t).some(function(r){return n.ignoreErrors.some(function(o){return ut(r,o)})})},e.prototype.gn=function(t,n){if(n===void 0&&(n={}),!n.blacklistUrls||!n.blacklistUrls.length)return!1;var r=this.En(t);return!!r&&n.blacklistUrls.some(function(o){return ut(r,o)})},e.prototype.xn=function(t,n){if(n===void 0&&(n={}),!n.whitelistUrls||!n.whitelistUrls.length)return!0;var r=this.En(t);return!r||n.whitelistUrls.some(function(o){return ut(r,o)})},e.prototype.mn=function(t){return t===void 0&&(t={}),{blacklistUrls:x(this.in.blacklistUrls||[],t.blacklistUrls||[]),ignoreErrors:x(this.in.ignoreErrors||[],t.ignoreErrors||[],_e),ignoreInternal:this.in.ignoreInternal===void 0||this.in.ignoreInternal,whitelistUrls:x(this.in.whitelistUrls||[],t.whitelistUrls||[])}},e.prototype.jn=function(t){if(t.message)return[t.message];if(t.exception)try{var n=t.exception.values[0],r=n.type,o=n.value;return[""+o,r+": "+o]}catch(i){return y.error("Cannot extract message for event "+U(t)),[]}return[]},e.prototype.En=function(t){try{if(t.stacktrace){var n=t.stacktrace.frames;return n[n.length-1].filename}if(t.exception){var r=t.exception.values[0].stacktrace.frames;return r[r.length-1].filename}return null}catch(o){return y.error("Cannot extract url for event "+U(t)),null}},e.id="InboundFilters",e}(),Ee=Object.freeze({FunctionToString:Ht,InboundFilters:qt}),q=b(),k={_n:!1,Sn:!1,On:!1,kn:!1},I="?",be=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function Wt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Yt(){return typeof document=="undefined"||document.location==null?"":document.location.href}k._n=function(){var e,t,n=[],r=null,o=null;function i(c,l,h){var d=null;if(!l||k.Sn){for(var v in n)if(Wt(n,v))try{n[v](c,l,h)}catch(m){d=m}if(d)throw d}}function s(c,l,h,d,v){var m=null;if(v=rt(v)?v.error:v,c=rt(c)?c.message:c,o)k.On.Tn(o,l,h,c),u();else if(v&&nt(v))(m=k.On(v)).mechanism="onerror",i(m,!0,v);else{var O,T={url:l,line:h,column:d},j=c;if({}.toString.call(c)==="[object String]"){var bt=c.match(be);bt&&(O=bt[1],j=bt[2])}T.func=I,T.context=null,i(m={name:O,message:j,mode:"onerror",mechanism:"onerror",stack:[g({},T,{url:T.url||Yt()})]},!0,null)}return!!e&&e.apply(this,arguments)}function a(c){var l=c&&(c.detail?c.detail.reason:c.reason)||c,h=k.On(l);h.mechanism="onunhandledrejection",h.message||(h.message=JSON.stringify(w(l))),i(h,!0,l)}function u(){var c=o,l=r;o=null,r=null,i(c,!1,l)}function p(c){if(o){if(r===c)return;u()}var l=k.On(c);throw o=l,r=c,setTimeout(function(){r===c&&u()},l.incomplete?2e3:0),c}return p.Rn=function(c){n.push(c)},p.Dn=function(){t!==!0&&(e=q.onerror,q.onerror=s,t=!0)},p.In=function(){q.onunhandledrejection=a},p}(),k.On=function(){function e(o){if(!o||!o.stack)return null;for(var i,s,a,u=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,p=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,c=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,l=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,h=/\((\S*)(?::(\d+))(?::(\d+))\)/,d=o.stack.split(`
|
|
`),v=[],m=/^(.*) is undefined$/.exec(o.message),O=0,T=d.length;O<T;++O){if(s=u.exec(d[O])){var j=s[2]&&s[2].indexOf("native")===0;s[2]&&s[2].indexOf("eval")===0&&(i=h.exec(s[2]))&&(s[2]=i[1],s[3]=i[2],s[4]=i[3]),a={url:s[2],func:s[1]||I,args:j?[s[2]]:[],line:s[3]?+s[3]:null,column:s[4]?+s[4]:null}}else if(s=c.exec(d[O]))a={url:s[2],func:s[1]||I,args:[],line:+s[3],column:s[4]?+s[4]:null};else{if(!(s=p.exec(d[O])))continue;s[3]&&s[3].indexOf(" > eval")>-1&&(i=l.exec(s[3]))?(s[1]=s[1]||"eval",s[3]=i[1],s[4]=i[2],s[5]=""):O!==0||s[5]||o.columnNumber===void 0||(v[0].column=o.columnNumber+1),a={url:s[3],func:s[1]||I,args:s[2]?s[2].split(","):[],line:s[4]?+s[4]:null,column:s[5]?+s[5]:null}}!a.func&&a.line&&(a.func=I),a.context=null,v.push(a)}return v.length?(v[0]&&v[0].line&&!v[0].column&&m&&(v[0].column=null),{mode:"stack",name:o.name,message:o.message,stack:v}):null}function t(o,i,s,a){var u={url:i,line:s};if(u.url&&u.line){if(o.incomplete=!1,u.func||(u.func=I),u.context||(u.context=null),/ '([^']+)' /.exec(a)&&(u.column=null),o.stack.length>0&&o.stack[0].url===u.url){if(o.stack[0].line===u.line)return!1;if(!o.stack[0].line&&o.stack[0].func===u.func)return o.stack[0].line=u.line,o.stack[0].context=u.context,!1}return o.stack.unshift(u),o.partial=!0,!0}return o.incomplete=!0,!1}function n(o,i){for(var s,a,u=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,p=[],c={},l=!1,h=n.caller;h&&!l;h=h.caller)if(h!==W&&h!==k._n){if(a={url:null,func:I,args:[],line:null,column:null},h.name?a.func=h.name:(s=u.exec(h.toString()))&&(a.func=s[1]),a.func===void 0)try{a.func=s.input.substring(0,s.input.indexOf("{"))}catch(v){}c[""+h]?l=!0:c[""+h]=!0,p.push(a)}i&&p.splice(0,i);var d={mode:"callers",name:o.name,message:o.message,stack:p};return t(d,o.sourceURL||o.fileName,o.line||o.lineNumber,o.message||o.description),d}function r(o,i){var s=null;i=i==null?0:+i;try{if(s=function(a){var u=a.stacktrace;if(u){for(var p,c=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,l=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,h=u.split(`
|
|
`),d=[],v=0;v<h.length;v+=2){var m=null;(p=c.exec(h[v]))?m={url:p[2],line:+p[1],column:null,func:p[3],args:[]}:(p=l.exec(h[v]))&&(m={url:p[6],line:+p[1],column:+p[2],func:p[3]||p[4],args:p[5]?p[5].split(","):[]}),m&&(!m.func&&m.line&&(m.func=I),m.line&&(m.context=null),m.context||(m.context=[h[v+1]]),d.push(m))}return d.length?{mode:"stacktrace",name:a.name,message:a.message,stack:d}:null}}(o))return s}catch(a){}try{if(s=e(o))return s}catch(a){}try{if(s=function(a){var u=a.message.split(`
|
|
`);if(u.length<4)return null;var p,c=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,l=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,h=/^\s*Line (\d+) of function script\s*$/i,d=[],v=q&&q.document&&q.document.getElementsByTagName("script"),m=[];for(var O in v)Wt(v,O)&&!v[O].src&&m.push(v[O]);for(var T=2;T<u.length;T+=2){var j=null;(p=c.exec(u[T]))?j={url:p[2],func:p[3],args:[],line:+p[1],column:null}:(p=l.exec(u[T]))?j={url:p[3],func:p[4],args:[],line:+p[1],column:null}:(p=h.exec(u[T]))&&(j={url:Yt().replace(/#.*$/,""),func:"",args:[],line:p[1],column:null}),j&&(j.func||(j.func=I),j.context=[u[T+1]],d.push(j))}return d.length?{mode:"multiline",name:a.name,message:u[0],stack:d}:null}(o))return s}catch(a){}try{if(s=n(o,i+1))return s}catch(a){}return{original:o,name:o.name,message:o.message,mode:"failed"}}return r.Tn=t,r.Cn=e,r}(),k.Sn=!0,k.kn=11;var Se=k._n.Rn,xe=k._n.Dn,we=k._n.In,W=k.On,ke=50;function $t(e){var t=ft(e.stack),n={type:e.name,value:e.message};return t&&t.length&&(n.stacktrace={frames:t}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function ht(e){return{exception:{values:[$t(e)]}}}function ft(e){if(!e||!e.length)return[];var t=e,n=t[0].func||"",r=t[t.length-1].func||"";return(n.includes("captureMessage")||n.includes("captureException"))&&(t=t.slice(1)),r.includes("sentryWrapped")&&(t=t.slice(0,-1)),t.map(function(o){return{colno:o.column,filename:o.url||t[0].url,function:o.func||"?",in_app:!0,lineno:o.line}}).slice(0,ke).reverse()}var G,Jt,dt=function(){function e(t){this.options=t,this.h=new pe(30),this.url=new Z(this.options.dsn).getStoreEndpointWithUrlEncodedAuth()}return e.prototype.sendEvent=function(t){throw new C("Transport Class has to implement `sendEvent` method")},e.prototype.close=function(t){return this.h.drain(t)},e}(),Oe=b(),Gt=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.sendEvent=function(n){var r={body:JSON.stringify(n),method:"POST",referrerPolicy:he()?"origin":""};return this.h.add(Oe.fetch(this.url,r).then(function(o){return{status:f.Status.fromHttpCode(o.status)}}))},t}(dt),Xt=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.sendEvent=function(n){var r=this;return this.h.add(new Promise(function(o,i){var s=new XMLHttpRequest;s.onreadystatechange=function(){s.readyState===4&&(s.status===200&&o({status:f.Status.fromHttpCode(s.status)}),i(s))},s.open("POST",r.url),s.send(JSON.stringify(n))}))},t}(dt),Te=Object.freeze({BaseTransport:dt,FetchTransport:Gt,XHRTransport:Xt}),je=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.pn=function(){if(!this.in.dsn)return e.prototype.pn.call(this);var n=g({},this.in.transportOptions,{dsn:this.in.dsn});return this.in.transport?new this.in.transport(n):ct()?new Gt(n):new Xt(n)},t.prototype.eventFromException=function(n,r){var o,i,s=this;if(rt(n)&&n.error)return n=n.error,o=ht(W(n)),R.resolve(this.Nn(o,r));if(kt(n)||(i=n,Object.prototype.toString.call(i)==="[object DOMException]")){var a=n,u=a.name||(kt(a)?"DOMError":"DOMException"),p=a.message?u+": "+a.message:u;return this.eventFromMessage(p,f.Severity.Error,r).then(function(l){return $(l,p),R.resolve(s.Nn(l,r))})}if(nt(n))return o=ht(W(n)),R.resolve(this.Nn(o,r));if(Ot(n)&&r&&r.syntheticException)return $(o=function(l,h){var d=Object.keys(l).sort(),v={extra:{__serialized__:Tt(l)},message:"Non-Error exception captured with keys: "+le(d)};if(h){var m=ft(W(h).stack);v.stacktrace={frames:m}}return v}(n,r.syntheticException),"Custom Object",void 0,{handled:!0,synthetic:!0,type:"generic"}),o.level=f.Severity.Error,R.resolve(this.Nn(o,r));var c=n;return this.eventFromMessage(c,void 0,r).then(function(l){return $(l,""+c,void 0,{handled:!0,synthetic:!0,type:"generic"}),l.level=f.Severity.Error,R.resolve(s.Nn(l,r))})},t.prototype.Nn=function(n,r){return g({},n,{event_id:r&&r.event_id})},t.prototype.eventFromMessage=function(n,r,o){r===void 0&&(r=f.Severity.Info);var i={event_id:o&&o.event_id,level:r,message:n};if(this.in.attachStacktrace&&o&&o.syntheticException){var s=ft(W(o.syntheticException).stack);i.stacktrace={frames:s}}return R.resolve(i)},t}(me),Vt="sentry.javascript.browser",zt=function(e){function t(n){return n===void 0&&(n={}),e.call(this,je,n)||this}return Y(t,e),t.prototype.hn=function(n,r,o){return n.platform=n.platform||"javascript",n.sdk=g({},n.sdk,{name:Vt,packages:x(n.sdk&&n.sdk.packages||[],[{name:"npm:@sentry/browser",version:"5.5.0"}]),version:"5.5.0"}),e.prototype.hn.call(this,n,r,o)},t.prototype.showReportDialog=function(n){n===void 0&&(n={});var r=b().document;if(r)if(this.fn()){var o=n.dsn||this.getDsn();if(n.eventId)if(o){var i=r.createElement("script");i.async=!0,i.src=new Z(o).getReportDialogEndpoint(n),n.onLoad&&(i.onload=n.onLoad),(r.head||r.body).appendChild(i)}else y.error("Missing `Dsn` option in showReportDialog call");else y.error("Missing `eventId` option in showReportDialog call")}else y.error("Trying to call showReportDialog with Sentry Client is disabled")},t}(ge),Ne=1e3,vt=0;function P(e,t,n){if(t===void 0&&(t={}),typeof e!="function")return e;try{if(e.__sentry__)return e;if(e.__sentry_wrapped__)return e.__sentry_wrapped__}catch(i){return e}var r=function(){n&&typeof n=="function"&&n.apply(this,arguments);var i=Array.prototype.slice.call(arguments);try{var s=i.map(function(a){return P(a,t)});return e.handleEvent?e.handleEvent.apply(this,s):e.apply(this,s)}catch(a){throw vt+=1,setTimeout(function(){vt-=1}),Ut(function(u){u.addEventProcessor(function(p){var c=g({},p);return t.mechanism&&$(c,void 0,void 0,t.mechanism),c.extra=g({},c.extra,{arguments:w(i,3)}),c}),Ft(a)}),a}};try{for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch(i){}e.prototype=e.prototype||{},r.prototype=e.prototype,Object.defineProperty(e,"__sentry_wrapped__",{enumerable:!1,value:r}),Object.defineProperties(r,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:e}});try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:function(){return e.name}})}catch(i){}return r}var gt=0;function Q(e,t){return t===void 0&&(t=!1),function(n){if(G=void 0,n&&Jt!==n){Jt=n;var r=function(){var o;try{o=n.target?Kt(n.target):Kt(n)}catch(i){o="<unknown>"}o.length!==0&&_().addBreadcrumb({category:"ui."+e,message:o},{event:n,name:e})};gt&&clearTimeout(gt),t?gt=setTimeout(r):r()}}}function yt(){return function(e){var t;try{t=e.target}catch(r){return}var n=t&&t.tagName;n&&(n==="INPUT"||n==="TEXTAREA"||t.isContentEditable)&&(G||Q("input")(e),clearTimeout(G),G=setTimeout(function(){G=void 0},Ne))}}function Kt(e){for(var t,n=e,r=[],o=0,i=0,s=" > ".length;n&&o++<5&&!((t=Re(n))==="html"||o>1&&i+r.length*s+t.length>=80);)r.push(t),i+=t.length,n=n.parentNode;return r.reverse().join(" > ")}function Re(e){var t,n,r,o,i,s=[];if(!e||!e.tagName)return"";if(s.push(e.tagName.toLowerCase()),e.id&&s.push("#"+e.id),(t=e.className)&&X(t))for(n=t.split(/\s+/),i=0;i<n.length;i++)s.push("."+n[i]);var a=["type","name","title","alt"];for(i=0;i<a.length;i++)r=a[i],(o=e.getAttribute(r))&&s.push("["+r+'="'+o+'"]');return s.join("")}var Zt=function(){function e(t){this.name=e.id,this.in=g({onerror:!0,onunhandledrejection:!0},t)}return e.prototype.setupOnce=function(){Error.stackTraceLimit=50,Se(function(t,n,r){if(!(vt>0)){var o=_().getIntegration(e);o&&_().captureEvent(o.An(t),{data:{stack:t},originalException:r})}}),this.in.onerror&&(y.log("Global Handler attached: onerror"),xe()),this.in.onunhandledrejection&&(y.log("Global Handler attached: onunhandledrejection"),we())},e.prototype.An=function(t){if(!X(t.message)&&t.mechanism!=="onunhandledrejection"){var n=t.message;t.message=n.error&&X(n.error.message)?n.error.message:"No error message"}var r=ht(t),o={mode:t.mode};t.message&&(o.message=t.message),t.name&&(o.name=t.name);var i=_().getClient(),s=i&&i.getOptions().maxValueLength||250;return $(r,t.original?H(JSON.stringify(w(t.original)),s):"",t.mechanism==="onunhandledrejection"?"UnhandledRejection":"Error",{data:o,handled:!1,type:t.mechanism}),r},e.id="GlobalHandlers",e}(),Qt=function(){function e(){this.Ln=0,this.name=e.id}return e.prototype.Mn=function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=n[0];return n[0]=P(o,{mechanism:{data:{function:tt(t)},handled:!0,type:"instrument"}}),t.apply(this,n)}},e.prototype.Un=function(t){return function(n){return t(P(n,{mechanism:{data:{function:"requestAnimationFrame",handler:tt(t)},handled:!0,type:"instrument"}}))}},e.prototype.Fn=function(t){var n=b(),r=n[t]&&n[t].prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(S(r,"addEventListener",function(o){return function(i,s,a){try{typeof s.handleEvent=="function"&&(s.handleEvent=P(s.handleEvent.bind(s),{mechanism:{data:{function:"handleEvent",handler:tt(s),target:t},handled:!0,type:"instrument"}}))}catch(u){}return o.call(this,i,P(s,{mechanism:{data:{function:"addEventListener",handler:tt(s),target:t},handled:!0,type:"instrument"}}),a)}}),S(r,"removeEventListener",function(o){return function(i,s,a){var u=s;try{u=u&&(u.__sentry_wrapped__||u)}catch(p){}return o.call(this,i,u,a)}}))},e.prototype.setupOnce=function(){this.Ln=this.Ln;var t=b();S(t,"setTimeout",this.Mn.bind(this)),S(t,"setInterval",this.Mn.bind(this)),S(t,"requestAnimationFrame",this.Un.bind(this)),["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"].forEach(this.Fn.bind(this))},e.id="TryCatch",e}();function tt(e){try{return e&&e.name||"<anonymous>"}catch(t){return"<anonymous>"}}var mt,E=b(),_t=function(){function e(t){this.name=e.id,this.in=g({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}return e.prototype.Pn=function(){"console"in E&&["debug","info","warn","error","log","assert"].forEach(function(t){t in E.console&&S(E.console,t,function(n){return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i={category:"console",data:{extra:{arguments:w(r,3)},logger:"console"},level:f.Severity.fromString(t),message:Rt(r," ")};t==="assert"&&r[0]===!1&&(i.message="Assertion failed: "+(Rt(r.slice(1)," ")||"console.assert"),i.data.extra.arguments=w(r.slice(1),3)),e.addBreadcrumb(i,{input:r,level:t}),n&&Function.prototype.apply.call(n,E.console,r)}})})},e.prototype.$n=function(){"document"in E&&(E.document.addEventListener("click",Q("click"),!1),E.document.addEventListener("keypress",yt(),!1),["EventTarget","Node"].forEach(function(t){var n=E[t]&&E[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(S(n,"addEventListener",function(r){return function(o,i,s){return i&&i.handleEvent?(o==="click"&&S(i,"handleEvent",function(a){return function(u){return Q("click")(u),a.call(this,u)}}),o==="keypress"&&S(i,"handleEvent",function(a){return function(u){return yt()(u),a.call(this,u)}})):(o==="click"&&Q("click",!0)(this),o==="keypress"&&yt()(this)),r.call(this,o,i,s)}}),S(n,"removeEventListener",function(r){return function(o,i,s){var a=i;try{a=a&&(a.__sentry_wrapped__||a)}catch(u){}return r.call(this,o,a,s)}}))}))},e.prototype.qn=function(){(function(){if(!ct())return!1;var t=function(s){return s.toString().indexOf("native")!==-1},n=b(),r=null,o=n.document;if(o){var i=o.createElement("iframe");i.hidden=!0;try{o.head.appendChild(i),i.contentWindow&&i.contentWindow.fetch&&(r=t(i.contentWindow.fetch)),o.head.removeChild(i)}catch(s){y.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",s)}}return r===null&&(r=t(n.fetch)),r})()&&S(E,"fetch",function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o,i=n[0],s="GET";typeof i=="string"?o=i:"Request"in E&&i instanceof Request?(o=i.url,i.method&&(s=i.method)):o=String(i),n[1]&&n[1].method&&(s=n[1].method);var a=_().getClient(),u=a&&a.getDsn();if(u){var p=new Z(u).getStoreEndpoint();if(p&&o.includes(p))return s==="POST"&&n[1]&&n[1].body&&te(n[1].body),t.apply(E,n)}var c={method:s,url:o};return t.apply(E,n).then(function(l){return c.status_code=l.status,e.addBreadcrumb({category:"fetch",data:c,type:"http"},{input:n,response:l}),l}).catch(function(l){throw e.addBreadcrumb({category:"fetch",data:c,level:f.Severity.Error,type:"http"},{error:l,input:n}),l})}})},e.prototype.Hn=function(){var t=this;if(n=b(),r=n.chrome,o=r&&r.app&&r.app.runtime,i="history"in n&&!!n.history.pushState&&!!n.history.replaceState,!o&&i){var n,r,o,i,s=function(p,c){var l=st(E.location.href),h=st(c),d=st(p);d.path||(d=l),mt=c,l.protocol===h.protocol&&l.host===h.host&&(c=h.relative),l.protocol===d.protocol&&l.host===d.host&&(p=d.relative),e.addBreadcrumb({category:"navigation",data:{from:p,to:c}})},a=E.onpopstate;E.onpopstate=function(){for(var p=[],c=0;c<arguments.length;c++)p[c]=arguments[c];var l=E.location.href;if(s(mt,l),a)return a.apply(t,p)},S(E.history,"pushState",u),S(E.history,"replaceState",u)}function u(p){return function(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];var h=c.length>2?c[2]:void 0;return h&&s(mt,String(h)),p.apply(this,c)}}},e.prototype.Wn=function(){if("XMLHttpRequest"in E){var t=XMLHttpRequest.prototype;S(t,"open",function(n){return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=r[1];this.__sentry_xhr__={method:r[0],url:r[1]};var s=_().getClient(),a=s&&s.getDsn();if(a){var u=new Z(a).getStoreEndpoint();X(i)&&u&&i.includes(u)&&(this.__sentry_own_request__=!0)}return n.apply(this,r)}}),S(t,"send",function(n){return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=this;function s(){if(i.readyState===4){if(i.__sentry_own_request__)return;try{i.__sentry_xhr__&&(i.__sentry_xhr__.status_code=i.status)}catch(a){}e.addBreadcrumb({category:"xhr",data:i.__sentry_xhr__,type:"http"},{xhr:i})}}return i.__sentry_own_request__&&te(r[0]),["onload","onerror","onprogress"].forEach(function(a){(function(u,p){u in p&&typeof p[u]=="function"&&S(p,u,function(c){return P(c,{mechanism:{data:{function:u,handler:c&&c.name||"<anonymous>"},handled:!0,type:"instrument"}})})})(a,i)}),"onreadystatechange"in i&&typeof i.onreadystatechange=="function"?S(i,"onreadystatechange",function(a){return P(a,{mechanism:{data:{function:"onreadystatechange",handler:a&&a.name||"<anonymous>"},handled:!0,type:"instrument"}},s)}):i.onreadystatechange=s,n.apply(this,r)}})}},e.addBreadcrumb=function(t,n){_().getIntegration(e)&&_().addBreadcrumb(t,n)},e.prototype.setupOnce=function(){this.in.console&&this.Pn(),this.in.dom&&this.$n(),this.in.xhr&&this.Wn(),this.in.fetch&&this.qn(),this.in.history&&this.Hn()},e.id="Breadcrumbs",e}();function te(e){try{var t=JSON.parse(e);_t.addBreadcrumb({category:"sentry",event_id:t.event_id,level:t.level||f.Severity.fromString("error"),message:U(t)},{event:t})}catch(n){y.error("Error while adding sentry type breadcrumb")}}var Ie="cause",Ce=5,ee=function(){function e(t){t===void 0&&(t={}),this.name=e.id,this.Bn=t.key||Ie,this.s=t.limit||Ce}return e.prototype.setupOnce=function(){J(function(t,n){var r=_().getIntegration(e);return r?r.Jn(t,n):t})},e.prototype.Jn=function(t,n){if(!(t.exception&&t.exception.values&&n&&n.originalException instanceof Error))return t;var r=this.Xn(n.originalException,this.Bn);return t.exception.values=x(r,t.exception.values),t},e.prototype.Xn=function(t,n,r){if(r===void 0&&(r=[]),!(t[n]instanceof Error)||r.length+1>=this.s)return r;var o=$t(W(t[n]));return this.Xn(t[n],n,x([o],r))},e.id="LinkedErrors",e}(),et=b(),ne=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(){J(function(t){if(_().getIntegration(e)){if(!et.navigator||!et.location)return t;var n=t.request||{};return n.url=n.url||et.location.href,n.headers=n.headers||{},n.headers["User-Agent"]=et.navigator.userAgent,g({},t,{request:n})}return t})},e.id="UserAgent",e}(),De=Object.freeze({GlobalHandlers:Zt,TryCatch:Qt,Breadcrumbs:_t,LinkedErrors:ee,UserAgent:ne}),re=[new qt,new Ht,new Qt,new _t,new Zt,new ee,new ne],oe={},Et=b();Et.Sentry&&Et.Sentry.Integrations&&(oe=Et.Sentry.Integrations);var Le=g({},oe,Ee,De);return f.BrowserClient=zt,f.Hub=K,f.Integrations=Le,f.SDK_NAME=Vt,f.SDK_VERSION="5.5.0",f.Scope=z,f.Span=It,f.Transports=Te,f.addBreadcrumb=function(e){N("addBreadcrumb",e)},f.addGlobalEventProcessor=J,f.captureEvent=function(e){return N("captureEvent",e)},f.captureException=Ft,f.captureMessage=function(e,t){var n;try{throw new Error(e)}catch(r){n=r}return N("captureMessage",e,t,{originalException:e,syntheticException:n})},f.close=function(e){var t=_().getClient();return t?t.close(e):Promise.reject(!1)},f.configureScope=function(e){N("configureScope",e)},f.defaultIntegrations=re,f.flush=function(e){var t=_().getClient();return t?t.flush(e):Promise.reject(!1)},f.forceLoad=function(){},f.getCurrentHub=_,f.getHubFromCarrier=L,f.init=function(e){if(e===void 0&&(e={}),e.defaultIntegrations===void 0&&(e.defaultIntegrations=re),e.release===void 0){var t=b();t.SENTRY_RELEASE&&t.SENTRY_RELEASE.id&&(e.release=t.SENTRY_RELEASE.id)}(function(n,r){r.debug===!0&&y.enable(),_().bindClient(new n(r))})(zt,e)},f.lastEventId=function(){return _().lastEventId()},f.onLoad=function(e){e()},f.setContext=function(e,t){N("setContext",e,t)},f.setExtra=function(e,t){N("setExtra",e,t)},f.setExtras=function(e){N("setExtras",e)},f.setTag=function(e,t){N("setTag",e,t)},f.setTags=function(e){N("setTags",e)},f.setUser=function(e){N("setUser",e)},f.showReportDialog=function(e){e===void 0&&(e={}),e.eventId||(e.eventId=_().lastEventId());var t=_().getClient();t&&t.showReportDialog(e)},f.withScope=Ut,f.wrap=function(e){P(e)()},f}({});
|