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