@vforcity/logger
Version:
时间线前端异常监控工具包。
1 lines • 72.9 kB
JavaScript
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var set,get,has$1,O="object",check=function(e){return e&&e.Math==Math&&e},global_1=check(typeof globalThis==O&&globalThis)||check(typeof window==O&&window)||check(typeof self==O&&self)||check(typeof commonjsGlobal==O&&commonjsGlobal)||Function("return this")(),fails=function(e){try{return!!e()}catch(e){return!0}},descriptors=!fails(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),nativePropertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor&&!nativePropertyIsEnumerable.call({1:2},1),f=NASHORN_BUG?function(e){var t=getOwnPropertyDescriptor(this,e);return!!t&&t.enumerable}:nativePropertyIsEnumerable,objectPropertyIsEnumerable={f:f},createPropertyDescriptor=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},toString={}.toString,classofRaw=function(e){return toString.call(e).slice(8,-1)},split="".split,indexedObject=fails(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==classofRaw(e)?split.call(e,""):Object(e)}:Object,requireObjectCoercible=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},toIndexedObject=function(e){return indexedObject(requireObjectCoercible(e))},isObject=function(e){return"object"==typeof e?null!==e:"function"==typeof e},toPrimitive=function(e,t){if(!isObject(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!isObject(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!isObject(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!isObject(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},hasOwnProperty={}.hasOwnProperty,has=function(e,t){return hasOwnProperty.call(e,t)},document$1=global_1.document,EXISTS=isObject(document$1)&&isObject(document$1.createElement),documentCreateElement=function(e){return EXISTS?document$1.createElement(e):{}},ie8DomDefine=!descriptors&&!fails(function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a}),nativeGetOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,f$1=descriptors?nativeGetOwnPropertyDescriptor:function(e,t){if(e=toIndexedObject(e),t=toPrimitive(t,!0),ie8DomDefine)try{return nativeGetOwnPropertyDescriptor(e,t)}catch(e){}if(has(e,t))return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(e,t),e[t])},objectGetOwnPropertyDescriptor={f:f$1},anObject=function(e){if(!isObject(e))throw TypeError(String(e)+" is not an object");return e},nativeDefineProperty=Object.defineProperty,f$2=descriptors?nativeDefineProperty:function(e,t,n){if(anObject(e),t=toPrimitive(t,!0),anObject(n),ie8DomDefine)try{return nativeDefineProperty(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e},objectDefineProperty={f:f$2},hide=descriptors?function(e,t,n){return objectDefineProperty.f(e,t,createPropertyDescriptor(1,n))}:function(e,t,n){return e[t]=n,e},setGlobal=function(e,t){try{hide(global_1,e,t)}catch(n){global_1[e]=t}return t},shared=createCommonjsModule(function(e){var t=global_1["__core-js_shared__"]||setGlobal("__core-js_shared__",{});(e.exports=function(e,n){return t[e]||(t[e]=void 0!==n?n:{})})("versions",[]).push({version:"3.1.3",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),functionToString=shared("native-function-to-string",Function.toString),WeakMap=global_1.WeakMap,nativeWeakMap="function"==typeof WeakMap&&/native code/.test(functionToString.call(WeakMap)),id=0,postfix=Math.random(),uid=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++id+postfix).toString(36)},keys=shared("keys"),sharedKey=function(e){return keys[e]||(keys[e]=uid(e))},hiddenKeys={},WeakMap$1=global_1.WeakMap,enforce=function(e){return has$1(e)?get(e):set(e,{})},getterFor=function(e){return function(t){var n;if(!isObject(t)||(n=get(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(nativeWeakMap){var store=new WeakMap$1,wmget=store.get,wmhas=store.has,wmset=store.set;set=function(e,t){return wmset.call(store,e,t),t},get=function(e){return wmget.call(store,e)||{}},has$1=function(e){return wmhas.call(store,e)}}else{var STATE=sharedKey("state");hiddenKeys[STATE]=!0,set=function(e,t){return hide(e,STATE,t),t},get=function(e){return has(e,STATE)?e[STATE]:{}},has$1=function(e){return has(e,STATE)}}var internalState={set:set,get:get,has:has$1,enforce:enforce,getterFor:getterFor},redefine=createCommonjsModule(function(e){var t=internalState.get,n=internalState.enforce,r=String(functionToString).split("toString");shared("inspectSource",function(e){return functionToString.call(e)}),(e.exports=function(e,t,o,i){var a=!!i&&!!i.unsafe,s=!!i&&!!i.enumerable,c=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof t||has(o,"name")||hide(o,"name",t),n(o).source=r.join("string"==typeof t?t:"")),e!==global_1?(a?!c&&e[t]&&(s=!0):delete e[t],s?e[t]=o:hide(e,t,o)):s?e[t]=o:setGlobal(t,o)})(Function.prototype,"toString",function(){return"function"==typeof this&&t(this).source||functionToString.call(this)})}),path=global_1,aFunction=function(e){return"function"==typeof e?e:void 0},getBuiltIn=function(e,t){return arguments.length<2?aFunction(path[e])||aFunction(global_1[e]):path[e]&&path[e][t]||global_1[e]&&global_1[e][t]},ceil=Math.ceil,floor=Math.floor,toInteger=function(e){return isNaN(e=+e)?0:(e>0?floor:ceil)(e)},min=Math.min,toLength=function(e){return e>0?min(toInteger(e),9007199254740991):0},max=Math.max,min$1=Math.min,toAbsoluteIndex=function(e,t){var n=toInteger(e);return n<0?max(n+t,0):min$1(n,t)},createMethod=function(e){return function(t,n,r){var o,i=toIndexedObject(t),a=toLength(i.length),s=toAbsoluteIndex(r,a);if(e&&n!=n){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===n)return e||s||0;return!e&&-1}},arrayIncludes={includes:createMethod(!0),indexOf:createMethod(!1)},indexOf=arrayIncludes.indexOf,objectKeysInternal=function(e,t){var n,r=toIndexedObject(e),o=0,i=[];for(n in r)!has(hiddenKeys,n)&&has(r,n)&&i.push(n);for(;t.length>o;)has(r,n=t[o++])&&(~indexOf(i,n)||i.push(n));return i},enumBugKeys=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],hiddenKeys$1=enumBugKeys.concat("length","prototype"),f$3=Object.getOwnPropertyNames||function(e){return objectKeysInternal(e,hiddenKeys$1)},objectGetOwnPropertyNames={f:f$3},f$4=Object.getOwnPropertySymbols,objectGetOwnPropertySymbols={f:f$4},ownKeys=getBuiltIn("Reflect","ownKeys")||function(e){var t=objectGetOwnPropertyNames.f(anObject(e)),n=objectGetOwnPropertySymbols.f;return n?t.concat(n(e)):t},copyConstructorProperties=function(e,t){for(var n=ownKeys(t),r=objectDefineProperty.f,o=objectGetOwnPropertyDescriptor.f,i=0;i<n.length;i++){var a=n[i];has(e,a)||r(e,a,o(t,a))}},replacement=/#|\.prototype\./,isForced=function(e,t){var n=data[normalize(e)];return n==POLYFILL||n!=NATIVE&&("function"==typeof t?fails(t):!!t)},normalize=isForced.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced.data={},NATIVE=isForced.NATIVE="N",POLYFILL=isForced.POLYFILL="P",isForced_1=isForced,getOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f,_export=function(e,t){var n,r,o,i,a,s=e.target,c=e.global,u=e.stat;if(n=c?global_1:u?global_1[s]||setGlobal(s,{}):(global_1[s]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(a=getOwnPropertyDescriptor$1(n,r))&&a.value:n[r],!isForced_1(c?r:s+(u?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;copyConstructorProperties(i,o)}(e.sham||o&&o.sham)&&hide(i,"sham",!0),redefine(n,r,i,e)}};_export({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var isNan=path.Number.isNaN,nativeSymbol=!!Object.getOwnPropertySymbols&&!fails(function(){return!String(Symbol())}),Symbol$1=global_1.Symbol,store$1=shared("wks"),wellKnownSymbol=function(e){return store$1[e]||(store$1[e]=nativeSymbol&&Symbol$1[e]||(nativeSymbol?Symbol$1:uid)("Symbol."+e))},MATCH=wellKnownSymbol("match"),isRegexp=function(e){var t;return isObject(e)&&(void 0!==(t=e[MATCH])?!!t:"RegExp"==classofRaw(e))},notARegexp=function(e){if(isRegexp(e))throw TypeError("The method doesn't accept regular expressions");return e},MATCH$1=wellKnownSymbol("match"),correctIsRegexpLogic=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[MATCH$1]=!1,"/./"[e](t)}catch(e){}}return!1};_export({target:"String",proto:!0,forced:!correctIsRegexpLogic("includes")},{includes:function(e){return!!~String(requireObjectCoercible(this)).indexOf(notARegexp(e),arguments.length>1?arguments[1]:void 0)}});var aFunction$1=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},bindContext=function(e,t,n){if(aFunction$1(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}},call=Function.call,entryUnbind=function(e,t,n){return bindContext(call,global_1[e].prototype[t],n)},includes=entryUnbind("String","includes"),extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function __extends(e,t){function n(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var LogLevel,Severity,Status,__assign=function(){return(__assign=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 __read(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function __spread(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(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"}(LogLevel||(LogLevel={})),function(e){e.Fatal="fatal",e.Error="error",e.Warning="warning",e.Log="log",e.Info="info",e.Debug="debug",e.Critical="critical"}(Severity||(Severity={})),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}}}(Severity||(Severity={})),function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.Invalid="invalid",e.Failed="failed"}(Status||(Status={})),function(e){e.fromHttpCode=function(t){return t>=200&&t<300?e.Success:429===t?e.RateLimit:t>=400&&t<500?e.Invalid:t>=500?e.Failed:e.Unknown}}(Status||(Status={}));var setPrototypeOf=Object.setPrototypeOf||({__proto__:[]}instanceof Array?setProtoOf:mixinProperties);function setProtoOf(e,t){return e.__proto__=t,e}function mixinProperties(e,t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n]);return e}var SentryError=function(e){function t(t){var n=this.constructor,r=e.call(this,t)||this;return r.message=t,r.name=n.prototype.constructor.name,setPrototypeOf(r,n.prototype),r}return __extends(t,e),t}(Error);function isError(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}}function isErrorEvent(e){return"[object ErrorEvent]"===Object.prototype.toString.call(e)}function isDOMError(e){return"[object DOMError]"===Object.prototype.toString.call(e)}function isDOMException(e){return"[object DOMException]"===Object.prototype.toString.call(e)}function isString(e){return"[object String]"===Object.prototype.toString.call(e)}function isPrimitive(e){return null===e||"object"!=typeof e&&"function"!=typeof e}function isPlainObject(e){return"[object Object]"===Object.prototype.toString.call(e)}function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function isThenable(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function isSyntheticEvent(e){return isPlainObject(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function dynamicRequire(e,t){return e.require(t)}function isNodeEnv(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}var fallbackGlobalObject={};function getGlobalObject(){return isNodeEnv()?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:fallbackGlobalObject}function uuid4(){var e=getGlobalObject(),t=e.crypto||e.msCrypto;if(void 0!==t&&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(e){for(var t=e.toString(16);t.length<4;)t="0"+t;return t};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(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function parseUrl(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 getEventDescription(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 consoleSandbox(e){var t=getGlobalObject();if(!("console"in t))return e();var n=t.console,r={};["debug","info","warn","error","log","assert"].forEach(function(e){e in t.console&&n[e].__sentry__&&(r[e]=n[e].__sentry_wrapped__,n[e]=n[e].__sentry_original__)});var o=e();return Object.keys(r).forEach(function(e){n[e]=r[e]}),o}function addExceptionTypeValue(e,t,n,r){void 0===r&&(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 global$1=getGlobalObject(),PREFIX="Sentry Logger ",Logger=function(){function e(){this._enabled=!1}return e.prototype.disable=function(){this._enabled=!1},e.prototype.enable=function(){this._enabled=!0},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._enabled&&consoleSandbox(function(){global$1.console.log(PREFIX+"[Log]: "+e.join(" "))})},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._enabled&&consoleSandbox(function(){global$1.console.warn(PREFIX+"[Warn]: "+e.join(" "))})},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._enabled&&consoleSandbox(function(){global$1.console.error(PREFIX+"[Error]: "+e.join(" "))})},e}();global$1.__SENTRY__=global$1.__SENTRY__||{};var logger=global$1.__SENTRY__.logger||(global$1.__SENTRY__.logger=new Logger),Memo=function(){function e(){this._hasWeakSet="function"==typeof WeakSet,this._inner=this._hasWeakSet?new WeakSet:[]}return e.prototype.memoize=function(e){if(this._hasWeakSet)return!!this._inner.has(e)||(this._inner.add(e),!1);for(var t=0;t<this._inner.length;t++){if(this._inner[t]===e)return!0}return this._inner.push(e),!1},e.prototype.unmemoize=function(e){if(this._hasWeakSet)this._inner.delete(e);else for(var t=0;t<this._inner.length;t++)if(this._inner[t]===e){this._inner.splice(t,1);break}},e}();function fill(e,t,n){if(t in e){var r=e[t],o=n(r);if("function"==typeof o)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(e){}e[t]=o}}function urlEncode(e){return Object.keys(e).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&")}function objectifyError(e){var t={message:e.message,name:e.name,stack:e.stack};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function utf8Length(e){return~-encodeURI(e).split(/%..|./).length}function jsonSize(e){return utf8Length(JSON.stringify(e))}function normalizeToSize(e,t,n){void 0===t&&(t=3),void 0===n&&(n=102400);var r=normalize$1(e,t);return jsonSize(r)>n?normalizeToSize(e,t-1,n):r}function serializeValue(e){var t=Object.prototype.toString.call(e);if("string"==typeof e)return e;if("[object Object]"===t)return"[Object]";if("[object Array]"===t)return"[Array]";var n=normalizeValue(e);return isPrimitive(n)?n:t}function normalizeValue(e,t){return"domain"===t&&"object"==typeof e&&e._events?"[Domain]":"domainEmitter"===t?"[DomainEmitter]":"undefined"!=typeof global&&e===global?"[Global]":"undefined"!=typeof window&&e===window?"[Window]":"undefined"!=typeof document&&e===document?"[Document]":"undefined"!=typeof Event&&e instanceof Event?Object.getPrototypeOf(e)?e.constructor.name:"Event":isSyntheticEvent(e)?"[SyntheticEvent]":Number.isNaN(e)?"[NaN]":void 0===e?"[undefined]":"function"==typeof e?"[Function: "+(e.name||"<unknown-function-name>")+"]":e}function walk(e,t,n,r){if(void 0===n&&(n=1/0),void 0===r&&(r=new Memo),0===n)return serializeValue(t);if(null!=t&&"function"==typeof t.toJSON)return t.toJSON();var o=normalizeValue(t,e);if(isPrimitive(o))return o;var i=isError(t)?objectifyError(t):t,a=Array.isArray(t)?[]:{};if(r.memoize(t))return"[Circular ~]";for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(a[s]=walk(s,i[s],n-1,r));return r.unmemoize(t),a}function normalize$1(e,t){try{return JSON.parse(JSON.stringify(e,function(e,n){return walk(e,n,t)}))}catch(e){return"**non-serializable**"}}var States,PromiseBuffer=function(){function e(e){this._limit=e,this._buffer=[]}return e.prototype.isReady=function(){return void 0===this._limit||this.length()<this._limit},e.prototype.add=function(e){var t=this;return this.isReady()?(-1===this._buffer.indexOf(e)&&this._buffer.push(e),e.then(function(){return t.remove(e)}).catch(function(){return t.remove(e).catch(function(){})}),e):Promise.reject(new SentryError("Not adding Promise due to buffer limit reached."))},e.prototype.remove=function(e){return this._buffer.splice(this._buffer.indexOf(e),1)[0]},e.prototype.length=function(){return this._buffer.length},e.prototype.drain=function(e){var t=this;return new Promise(function(n){var r=setTimeout(function(){e&&e>0&&n(!1)},e);Promise.all(t._buffer).then(function(){clearTimeout(r),n(!0)}).catch(function(){n(!0)})})},e}();function truncate(e,t){return void 0===t&&(t=0),"string"!=typeof e||0===t?e:e.length<=t?e:e.substr(0,t)+"..."}function safeJoin(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(e){n.push("[value cannot be serialized]")}}return n.join(t)}function keysToEventMessage(e,t){if(void 0===t&&(t=40),!e.length)return"[object has no keys]";if(e[0].length>=t)return truncate(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:truncate(r,t)}return""}function isMatchingPattern(e,t){return isRegExp(t)?t.test(e):"string"==typeof t&&e.includes(t)}function supportsFetch(){if(!("fetch"in getGlobalObject()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(e){return!1}}function supportsNativeFetch(){if(!supportsFetch())return!1;var e=function(e){return-1!==e.toString().indexOf("native")},t=getGlobalObject(),n=null,r=t.document;if(r){var o=r.createElement("iframe");o.hidden=!0;try{r.head.appendChild(o),o.contentWindow&&o.contentWindow.fetch&&(n=e(o.contentWindow.fetch)),r.head.removeChild(o)}catch(e){logger.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}}return null===n&&(n=e(t.fetch)),n}function supportsReferrerPolicy(){if(!supportsFetch())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(e){return!1}}function supportsHistory(){var e=getGlobalObject(),t=e.chrome,n=t&&t.app&&t.app.runtime,r="history"in e&&!!e.history.pushState&&!!e.history.replaceState;return!n&&r}!function(e){e.PENDING="PENDING",e.RESOLVED="RESOLVED",e.REJECTED="REJECTED"}(States||(States={}));var SyncPromise=function(){function e(e){var t=this;this._state=States.PENDING,this._handlers=[],this._resolve=function(e){t._setResult(e,States.RESOLVED)},this._reject=function(e){t._setResult(e,States.REJECTED)},this._setResult=function(e,n){t._state===States.PENDING&&(isThenable(e)?e.then(t._resolve,t._reject):(t._value=e,t._state=n,t._executeHandlers()))},this._executeHandlers=function(){t._state!==States.PENDING&&(t._state===States.REJECTED?t._handlers.forEach(function(e){return e.onFail&&e.onFail(t._value)}):t._handlers.forEach(function(e){return e.onSuccess&&e.onSuccess(t._value)}),t._handlers=[])},this._attachHandler=function(e){t._handlers=t._handlers.concat(e),t._executeHandlers()};try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}return e.prototype.then=function(t,n){var r=this;return new e(function(e,o){r._attachHandler({onFail:function(t){if(n)try{return void e(n(t))}catch(e){return void o(e)}else o(t)},onSuccess:function(n){if(t)try{return void e(t(n))}catch(e){return void o(e)}else e(n)}})})},e.prototype.catch=function(e){return this.then(function(e){return e},e)},e.prototype.toString=function(){return"[object SyncPromise]"},e.resolve=function(t){return new e(function(e){e(t)})},e.reject=function(t){return new e(function(e,n){n(t)})},e}(),TRACEPARENT_REGEXP=/^[ \t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \t]*$/,Span=function(){function e(e,t,n,r){void 0===e&&(e=uuid4()),void 0===t&&(t=uuid4().substring(16)),this._traceId=e,this._spanId=t,this._sampled=n,this._parent=r}return e.prototype.setParent=function(e){return this._parent=e,this},e.prototype.setSampled=function(e){return this._sampled=e,this},e.fromTraceparent=function(t){var n=t.match(TRACEPARENT_REGEXP);if(n){var r=void 0;"1"===n[3]?r=!0:"0"===n[3]&&(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 e="";return!0===this._sampled?e="-1":!1===this._sampled&&(e="-0"),this._traceId+"-"+this._spanId+e},e.prototype.toJSON=function(){return{parent:this._parent&&this._parent.toJSON()||void 0,sampled:this._sampled,span_id:this._spanId,trace_id:this._traceId}},e}(),Scope=function(){function e(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._context={}}return e.prototype.addScopeListener=function(e){this._scopeListeners.push(e)},e.prototype.addEventProcessor=function(e){return this._eventProcessors.push(e),this},e.prototype._notifyScopeListeners=function(){var e=this;this._notifyingListeners||(this._notifyingListeners=!0,setTimeout(function(){e._scopeListeners.forEach(function(t){t(e)}),e._notifyingListeners=!1}))},e.prototype._notifyEventProcessors=function(e,t,n,r){var o=this;return void 0===r&&(r=0),new SyncPromise(function(i,a){var s=e[r];if(null===t||"function"!=typeof s)i(t);else{var c=s(__assign({},t),n);isThenable(c)?c.then(function(t){return o._notifyEventProcessors(e,t,n,r+1).then(i)}).catch(a):o._notifyEventProcessors(e,c,n,r+1).then(i).catch(a)}})},e.prototype.setUser=function(e){return this._user=normalize$1(e),this._notifyScopeListeners(),this},e.prototype.setTags=function(e){return this._tags=__assign({},this._tags,normalize$1(e)),this._notifyScopeListeners(),this},e.prototype.setTag=function(e,t){var n;return this._tags=__assign({},this._tags,((n={})[e]=normalize$1(t),n)),this._notifyScopeListeners(),this},e.prototype.setExtras=function(e){return this._extra=__assign({},this._extra,normalize$1(e)),this._notifyScopeListeners(),this},e.prototype.setExtra=function(e,t){var n;return this._extra=__assign({},this._extra,((n={})[e]=normalize$1(t),n)),this._notifyScopeListeners(),this},e.prototype.setFingerprint=function(e){return this._fingerprint=normalize$1(e),this._notifyScopeListeners(),this},e.prototype.setLevel=function(e){return this._level=normalize$1(e),this._notifyScopeListeners(),this},e.prototype.setTransaction=function(e){return this._transaction=e,this._notifyScopeListeners(),this},e.prototype.setContext=function(e,t){return this._context[e]=t?normalize$1(t):void 0,this._notifyScopeListeners(),this},e.prototype.setSpan=function(e){return this._span=e,this._notifyScopeListeners(),this},e.prototype.startSpan=function(e){var t=new Span;return t.setParent(e),this.setSpan(t),t},e.prototype.getSpan=function(){return this._span},e.clone=function(t){var n=new e;return Object.assign(n,t,{_scopeListeners:[]}),t&&(n._breadcrumbs=__spread(t._breadcrumbs),n._tags=__assign({},t._tags),n._extra=__assign({},t._extra),n._context=__assign({},t._context),n._user=t._user,n._level=t._level,n._span=t._span,n._transaction=t._transaction,n._fingerprint=t._fingerprint,n._eventProcessors=__spread(t._eventProcessors)),n},e.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._context={},this._level=void 0,this._transaction=void 0,this._fingerprint=void 0,this._span=void 0,this._notifyScopeListeners(),this},e.prototype.addBreadcrumb=function(e,t){var n=(new Date).getTime()/1e3,r=__assign({timestamp:n},e);return this._breadcrumbs=void 0!==t&&t>=0?__spread(this._breadcrumbs,[normalize$1(r)]).slice(-t):__spread(this._breadcrumbs,[normalize$1(r)]),this._notifyScopeListeners(),this},e.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},e.prototype._applyFingerprint=function(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint},e.prototype.applyToEvent=function(e,t){return this._extra&&Object.keys(this._extra).length&&(e.extra=__assign({},this._extra,e.extra)),this._tags&&Object.keys(this._tags).length&&(e.tags=__assign({},this._tags,e.tags)),this._user&&Object.keys(this._user).length&&(e.user=__assign({},this._user,e.user)),this._context&&Object.keys(this._context).length&&(e.contexts=__assign({},this._context,e.contexts)),this._level&&(e.level=this._level),this._transaction&&(e.transaction=this._transaction),this._span&&(e.contexts=e.contexts||{},e.contexts.trace=this._span),this._applyFingerprint(e),e.breadcrumbs=__spread(e.breadcrumbs||[],this._breadcrumbs),e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,this._notifyEventProcessors(__spread(getGlobalEventProcessors(),this._eventProcessors),e,t)},e}();function getGlobalEventProcessors(){var e=getGlobalObject();return e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.globalEventProcessors=e.__SENTRY__.globalEventProcessors||[],e.__SENTRY__.globalEventProcessors}function addGlobalEventProcessor(e){getGlobalEventProcessors().push(e)}var API_VERSION=3,DEFAULT_BREADCRUMBS=30,MAX_BREADCRUMBS=100,Hub=function(){function e(e,t,n){void 0===t&&(t=new Scope),void 0===n&&(n=API_VERSION),this._version=n,this._stack=[],this._stack.push({client:e,scope:t})}return e.prototype._invokeClient=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=this.getStackTop();o&&o.client&&o.client[e]&&(t=o.client)[e].apply(t,__spread(n,[o.scope]))},e.prototype.isOlderThan=function(e){return this._version<e},e.prototype.bindClient=function(e){this.getStackTop().client=e},e.prototype.pushScope=function(){var e=this.getStack(),t=e.length>0?e[e.length-1].scope:void 0,n=Scope.clone(t);return this.getStack().push({client:this.getClient(),scope:n}),n},e.prototype.popScope=function(){return void 0!==this.getStack().pop()},e.prototype.withScope=function(e){var t=this.pushScope();try{e(t)}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._stack},e.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},e.prototype.captureException=function(e,t){var n=this._lastEventId=uuid4(),r=t;if(!t){var o=void 0;try{throw new Error("Sentry syntheticException")}catch(e){o=e}r={originalException:e,syntheticException:o}}return this._invokeClient("captureException",e,__assign({},r,{event_id:n})),n},e.prototype.captureMessage=function(e,t,n){var r=this._lastEventId=uuid4(),o=n;if(!n){var i=void 0;try{throw new Error(e)}catch(e){i=e}o={originalException:e,syntheticException:i}}return this._invokeClient("captureMessage",e,t,__assign({},o,{event_id:r})),r},e.prototype.captureEvent=function(e,t){var n=this._lastEventId=uuid4();return this._invokeClient("captureEvent",e,__assign({},t,{event_id:n})),n},e.prototype.lastEventId=function(){return this._lastEventId},e.prototype.addBreadcrumb=function(e,t){var n=this.getStackTop();if(n.scope&&n.client){var r=n.client.getOptions&&n.client.getOptions()||{},o=r.beforeBreadcrumb,i=void 0===o?null:o,a=r.maxBreadcrumbs,s=void 0===a?DEFAULT_BREADCRUMBS:a;if(!(s<=0)){var c=(new Date).getTime()/1e3,u=__assign({timestamp:c},e),l=i?consoleSandbox(function(){return i(u,t)}):u;null!==l&&n.scope.addBreadcrumb(l,Math.min(s,MAX_BREADCRUMBS))}}},e.prototype.setUser=function(e){var t=this.getStackTop();t.scope&&t.scope.setUser(e)},e.prototype.setTags=function(e){var t=this.getStackTop();t.scope&&t.scope.setTags(e)},e.prototype.setExtras=function(e){var t=this.getStackTop();t.scope&&t.scope.setExtras(e)},e.prototype.setTag=function(e,t){var n=this.getStackTop();n.scope&&n.scope.setTag(e,t)},e.prototype.setExtra=function(e,t){var n=this.getStackTop();n.scope&&n.scope.setExtra(e,t)},e.prototype.setContext=function(e,t){var n=this.getStackTop();n.scope&&n.scope.setContext(e,t)},e.prototype.configureScope=function(e){var t=this.getStackTop();t.scope&&t.client&&e(t.scope)},e.prototype.run=function(e){var t=makeMain(this);try{e(this)}finally{makeMain(t)}},e.prototype.getIntegration=function(e){var t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){return logger.warn("Cannot retrieve integration "+e.id+" from the current Hub"),null}},e.prototype.traceHeaders=function(){var e=this.getStackTop();if(e.scope&&e.client){var t=e.scope.getSpan();if(t)return{"sentry-trace":t.toTraceparent()}}return{}},e}();function getMainCarrier(){var e=getGlobalObject();return e.__SENTRY__=e.__SENTRY__||{hub:void 0},e}function makeMain(e){var t=getMainCarrier(),n=getHubFromCarrier(t);return setHubOnCarrier(t,e),n}function getCurrentHub(){var e=getMainCarrier();hasHubOnCarrier(e)&&!getHubFromCarrier(e).isOlderThan(API_VERSION)||setHubOnCarrier(e,new Hub);try{var t=dynamicRequire(module,"domain").active;if(!t)return getHubFromCarrier(e);if(!hasHubOnCarrier(t)||getHubFromCarrier(t).isOlderThan(API_VERSION)){var n=getHubFromCarrier(e).getStackTop();setHubOnCarrier(t,new Hub(n.client,Scope.clone(n.scope)))}return getHubFromCarrier(t)}catch(t){return getHubFromCarrier(e)}}function hasHubOnCarrier(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function getHubFromCarrier(e){return e&&e.__SENTRY__&&e.__SENTRY__.hub?e.__SENTRY__.hub:(e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.hub=new Hub,e.__SENTRY__.hub)}function setHubOnCarrier(e,t){return!!e&&(e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.hub=t,!0)}function callOnHub(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=getCurrentHub();if(r&&r[e])return r[e].apply(r,__spread(t));throw new Error("No hub defined or "+e+" was not found on the hub, please open a bug report.")}function captureException(e){var t;try{throw new Error("Sentry syntheticException")}catch(e){t=e}return callOnHub("captureException",e,{originalException:e,syntheticException:t})}function captureMessage(e,t){var n;try{throw new Error(e)}catch(e){n=e}return callOnHub("captureMessage",e,t,{originalException:e,syntheticException:n})}function captureEvent(e){return callOnHub("captureEvent",e)}function configureScope(e){callOnHub("configureScope",e)}function addBreadcrumb(e){callOnHub("addBreadcrumb",e)}function setContext(e,t){callOnHub("setContext",e,t)}function setExtras(e){callOnHub("setExtras",e)}function setTags(e){callOnHub("setTags",e)}function setExtra(e,t){callOnHub("setExtra",e,t)}function setTag(e,t){callOnHub("setTag",e,t)}function setUser(e){callOnHub("setUser",e)}function withScope(e){callOnHub("withScope",e)}var DSN_REGEX=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w\.-]+)(?::(\d+))?\/(.+)/,ERROR_MESSAGE="Invalid Dsn",Dsn=function(){function e(e){"string"==typeof e?this._fromString(e):this._fromComponents(e),this._validate()}return e.prototype.toString=function(e){void 0===e&&(e=!1);var t=this,n=t.host,r=t.path,o=t.pass,i=t.port,a=t.projectId;return t.protocol+"://"+t.user+(e&&o?":"+o:"")+"@"+n+(i?":"+i:"")+"/"+(r?r+"/":r)+a},e.prototype._fromString=function(e){var t=DSN_REGEX.exec(e);if(!t)throw new SentryError(ERROR_MESSAGE);var n=__read(t.slice(1),6),r=n[0],o=n[1],i=n[2],a=void 0===i?"":i,s=n[3],c=n[4],u=void 0===c?"":c,l="",p=n[5],f=p.split("/");f.length>1&&(l=f.slice(0,-1).join("/"),p=f.pop()),Object.assign(this,{host:s,pass:a,path:l,projectId:p,port:u,protocol:r,user:o})},e.prototype._fromComponents=function(e){this.protocol=e.protocol,this.user=e.user,this.pass=e.pass||"",this.host=e.host,this.port=e.port||"",this.path=e.path||"",this.projectId=e.projectId},e.prototype._validate=function(){var e=this;if(["protocol","user","host","projectId"].forEach(function(t){if(!e[t])throw new SentryError(ERROR_MESSAGE)}),"http"!==this.protocol&&"https"!==this.protocol)throw new SentryError(ERROR_MESSAGE);if(this.port&&Number.isNaN(parseInt(this.port,10)))throw new SentryError(ERROR_MESSAGE)},e}(),SENTRY_API_VERSION="7",API=function(){function e(e){this.dsn=e,this._dsnObject=new Dsn(e)}return e.prototype.getDsn=function(){return this._dsnObject},e.prototype.getStoreEndpoint=function(){return""+this._getBaseUrl()+this.getStoreEndpointPath()},e.prototype.getStoreEndpointWithUrlEncodedAuth=function(){var e={sentry_key:this._dsnObject.user,sentry_version:SENTRY_API_VERSION};return this.getStoreEndpoint()+"?"+urlEncode(e)},e.prototype._getBaseUrl=function(){var e=this._dsnObject,t=e.protocol?e.protocol+":":"",n=e.port?":"+e.port:"";return t+"//"+e.host+n},e.prototype.getStoreEndpointPath=function(){var e=this._dsnObject;return(e.path?"/"+e.path:"")+"/api/"+e.projectId+"/store/"},e.prototype.getRequestHeaders=function(e,t){var n=this._dsnObject,r=["Sentry sentry_version="+SENTRY_API_VERSION];return r.push("sentry_timestamp="+(new Date).getTime()),r.push("sentry_client="+e+"/"+t),r.push("sentry_key="+n.user),n.pass&&r.push("sentry_secret="+n.pass),{"Content-Type":"application/json","X-Sentry-Auth":r.join(", ")}},e.prototype.getReportDialogEndpoint=function(e){void 0===e&&(e={});var t=this._dsnObject,n=this._getBaseUrl()+(t.path?"/"+t.path:"")+"/api/embed/error-page/",r=[];for(var o in r.push("dsn="+t.toString()),e)if("user"===o){if(!e.user)continue;e.user.name&&r.push("name="+encodeURIComponent(e.user.name)),e.user.email&&r.push("email="+encodeURIComponent(e.user.email))}else r.push(encodeURIComponent(o)+"="+encodeURIComponent(e[o]));return r.length?n+"?"+r.join("&"):n},e}(),installedIntegrations=[];function getIntegrationsToSetup(e){var t=e.defaultIntegrations&&__spread(e.defaultIntegrations)||[],n=e.integrations,r=[];if(Array.isArray(n)){var o=n.map(function(e){return e.name}),i=[];t.forEach(function(e){-1===o.indexOf(e.name)&&-1===i.indexOf(e.name)&&(r.push(e),i.push(e.name))}),n.forEach(function(e){-1===i.indexOf(e.name)&&(r.push(e),i.push(e.name))})}else{if("function"!=typeof n)return __spread(t);r=n(t),r=Array.isArray(r)?r:[r]}return r}function setupIntegration(e){-1===installedIntegrations.indexOf(e.name)&&(e.setupOnce(addGlobalEventProcessor,getCurrentHub),installedIntegrations.push(e.name),logger.log("Integration installed: "+e.name))}function setupIntegrations(e){var t={};return getIntegrationsToSetup(e).forEach(function(e){t[e.name]=e,setupIntegration(e)}),t}var originalFunctionToString,BaseClient=function(){function e(e,t){this._processing=!1,this._backend=new e(t),this._options=t,t.dsn&&(this._dsn=new Dsn(t.dsn)),this._integrations=setupIntegrations(this._options)}return e.prototype.captureException=function(e,t,n){var r=this,o=t&&t.event_id;return this._processing=!0,this._getBackend().eventFromException(e,t).then(function(e){return r._processEvent(e,t,n)}).then(function(e){o=e&&e.event_id,r._processing=!1}).catch(function(e){logger.error(e),r._processing=!1}),o},e.prototype.captureMessage=function(e,t,n,r){var o=this,i=n&&n.event_id;return this._processing=!0,(isPrimitive(e)?this._getBackend().eventFromMessage(""+e,t,n):this._getBackend().eventFromException(e,n)).then(function(e){return o._processEvent(e,n,r)}).then(function(e){i=e&&e.event_id,o._processing=!1}).catch(function(e){logger.error(e),o._processing=!1}),i},e.prototype.captureEvent=function(e,t,n){var r=this,o=t&&t.event_id;return this._processing=!0,this._processEvent(e,t,n).then(function(e){o=e&&e.event_id,r._processing=!1}).catch(function(e){logger.error(e),r._processing=!1}),o},e.prototype.getDsn=function(){return this._dsn},e.prototype.getOptions=function(){return this._options},e.prototype.flush=function(e){var t=this;return this._isClientProcessing(e).then(function(n){return clearInterval(n.interval),t._getBackend().getTransport().close(e).then(function(e){return n.ready&&e})})},e.prototype.close=function(e){var t=this;return this.flush(e).then(function(e){return t.getOptions().enabled=!1,e})},e.prototype.getIntegrations=function(){return this._integrations||{}},e.prototype.getIntegration=function(e){try{return this._integrations[e.id]||null}catch(t){return logger.warn("Cannot retrieve integration "+e.id+" from the current Client"),null}},e.prototype._isClientProcessing=function(e){var t=this;return new Promise(function(n){var r=0,o=0;clearInterval(o),o=setInterval(function(){t._processing?(r+=1,e&&r>=e&&n({interval:o,ready:!1})):n({interval:o,ready:!0})},1)})},e.prototype._getBackend=function(){return this._backend},e.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},e.prototype._prepareEvent=function(e,t,n){var r=this.getOptions(),o=r.environment,i=r.release,a=r.dist,s=r.maxValueLength,c=void 0===s?250:s,u=__assign({},e);void 0===u.environment&&void 0!==o&&(u.environment=o),void 0===u.release&&void 0!==i&&(u.release=i),void 0===u.dist&&void 0!==a&&(u.dist=a),u.message&&(u.message=truncate(u.message,c));var l=u.exception&&u.exception.values&&u.exception.values[0];l&&l.value&&(l.value=truncate(l.value,c));var p=u.request;p&&p.url&&(p.url=truncate(p.url,c)),void 0===u.event_id&&(u.event_id=uuid4()),this._addIntegrations(u.sdk);var f=SyncPromise.resolve(u);return t&&(f=t.applyToEvent(u,n)),f},e.prototype._addIntegrations=function(e){var t=Object.keys(this._integrations);e&&t.length>0&&(e.integrations=t)},e.prototype._processEvent=function(e,t,n){var r=this,o=this.getOptions(),i=o.beforeSend,a=o.sampleRate;return this._isEnabled()?"number"==typeof a&&Math.random()>a?SyncPromise.reject("This event has been sampled, will not send event."):new SyncPromise(function(o,a){r._prepareEvent(e,n,t).then(function(e){if(null!==e){var n=e;try{if(t&&t.data&&!0===t.data.__sentry__||!i)return r._getBackend().sendEvent(n),void o(n);var s=i(e,t);if(void 0===s)logger.error("`beforeSend` method has to return `null` or a valid event.");else if(isThenable(s))r._handleAsyncBeforeSend(s,o,a);else{if(null===(n=s))return logger.log("`beforeSend` returned `null`, will not send event."),void o(null);r._getBackend().sendEvent(n),o(n)}}catch(e){r.captureException(e,{data:{__sentry__:!0},originalException:e}),a("`beforeSend` throw an error, will not send event.")}}else a("An event processor returned null, will not send event.")})}):SyncPromise.reject("SDK not enabled, will not send event.")},e.prototype._handleAsyncBeforeSend=function(e,t,n){var r=this;e.then(function(e){null!==e?(r._getBackend().sendEvent(e),t(e)):n("`beforeSend` returned `null`, will not send event.")}).catch(function(e){n("beforeSend rejected with "+e)})},e}(),NoopTransport=function(){function e(){}return e.prototype.sendEvent=function(e){return Promise.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:Status.Skipped})},e.prototype.close=function(e){return Promise.resolve(!0)},e}(),BaseBackend=function(){function e(e){this._options=e,this._options.dsn||logger.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return e.prototype._setupTransport=function(){return new NoopTransport},e.prototype.eventFromException=function(e,t){throw new SentryError("Backend has to implement `eventFromException` method")},e.prototype.eventFromMessage=function(e,t,n){throw new SentryError("Backend has to implement `eventFromMessage` method")},e.prototype.sendEvent=function(e){this._transport.sendEvent(e).catch(function(e){logger.error("Error while sending event: "+e)})},e.prototype.getTransport=function(){return this._transport},e}();function initAndBind(e,t){!0===t.debug&&logger.enable(),getCurrentHub().bindClient(new e(t))}var FunctionToString=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(){originalFunctionToString=Function.prototype.toString,Function.prototype.toString=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.__sentry__?this.__sentry_original__:this;return originalFunctionToString.apply(n,e)}},e.id="FunctionToString",e}(),DEFAULT_IGNORE_ERRORS=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],InboundFilters=function(){function e(t){void 0===t&&(t={}),this._options=t,this.name=e.id}return e.prototype.setupOnce=function(){addGlobalEventProcessor(function(t){var n=getCurrentHub();if(!n)return t;var r=n.getIntegration(e);if(r){var o=n.getClient(),i=o?o.getOptions():{},a=r._mergeOptions(i);if(r._shouldDropEvent(t,a))return null}return t})},e.prototype._shouldDropEvent=function(e,t){return this._isSentryError(e,t)?(logger.warn("Event dropped due to being internal Sentry Error.\nEvent: "+getEventDescription(e)),!0):this._isIgnoredError(e,t)?(logger.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+getEventDescription(e)),!0):this._isBlacklistedUrl(e,t)?(logger.warn("Event dropped due to being matched by `blacklistUrls` option.\nEvent: "+getEventDescription(e)+".\nUrl: "+this._getEventFilterUrl(e)),!0):!this._isWhitelistedUrl(e,t)&&(logger.warn("Event dropped due to not being matched by `whitelistUrls` option.\nEvent: "+getEventDescription(e)+".\nUrl: "+this._getEventFilterUrl(e)),!0)},e.prototype._isSentryError=function(e,t){if(void 0===t&&(t={}),!t.ignoreInternal)return!1;try{return"SentryError"===e.exception.values[0].type}catch(e){return!1}},e.prototype._isIgnoredError=function(e,t){return void 0===t&&(t={}),!(!t.ignoreErrors||!t.ignoreErrors.length)&&this._getPossibleEventMessages(e).some(function(e){return t.ignoreErrors.some(function(t){return isMatchingPattern(e,t)})})},e.prototype._isBlacklistedUrl=function(e,t){if(void 0===t&&(t={}),!t.blacklistUrls||!t.blacklistUrls.length)return!1;var n=this._getEventFilterUrl(e);return!!n&&t.blacklistUrls.some(function(e){return isMatchingPattern(n,e)})},e.prototype._isWhitelistedUrl=function(e,t){if(void 0===t&&(t={}),!t.whitelistUrls||!t.whitelistUrls.length)return!0;var n=this._getEventFilterUrl(e);return!n||t.whitelistUrls.some(function(e){return isMatchingPattern(n,e)})},e.prototype._mergeOptions=function(e){return void 0===e&&(e={}),{blacklistUrls:__spread(this._options.blacklistUrls||[],e.blacklistUrls||[]),ignoreErrors:__spread(this._options.ignoreErrors||[],e.ignoreErrors||[],DEFAULT_IGNORE_ERRORS),ignoreInternal:void 0===this._options.ignoreInternal||this._options.ignoreInternal,whitelistUrls:__spread(this._options.whitelistUrls||[],e.whitelistUrls||[])}},e.prototype._getPossibleEventMessages=function(e){if(e.message)return[e.message];if(e.exception)try{var t=e.exception.values[0],n=t.type,r=t.value;return[""+r,n+": "+r]}catch(t){return logger.error("Cannot extract message for event "+getEventDescription(e)),[]}return[]},e.prototype._getEventFilterUrl=function(e){try{if(e.stacktrace){var t=e.stacktrace.frames;return t[t.length-1].filename}if(e.exception){var n=e.exception.values[0].stacktrace.frames;return n[n.length-1].filename}return null}catch(t){return logger.error("Cannot extract url for event "+getEventDescription(e)),null}},e.id="InboundFilters",e}(),CoreIntegrations=Object.freeze({FunctionToString:FunctionToString,InboundFilters:InboundFilters}),window$1=getGlobalObject(),TraceKit={_report:!1,_collectWindowErrors:!1,_computeStackTrace:!1,_linesOfContext:!1},UNKNOWN_FUNCTION="?",ERROR_TYPES_RE=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function _has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function getLocationHref(){return"undefined"==typeof document||null==document.location?"":document.location.href}TraceKit._report=function(){var e,t,n=[],r=null,o=null;function i(e,t,r){var o=null;if(!t||TraceKit._collectWindowErrors){for(var i in n)if(_has(n,i))try{n[i](e,t,r)}catch(e){o=e}if(o)throw o}}function a(t,n,r,a,s){var u=null;if(s=isErrorEvent(s)?s.error:s,t=isErrorEvent(t)?t.message:t,o)TraceKit._computeStackTrace._augmentStackTraceWithInitialElement(o,n,r,t),c();else if(s&&isError(s))(u=TraceKit._computeStackTrace(s)).mechanism="onerror",i(u,!0,s);else{var l,p={url:n,line:r,column:a},f=t;if("[object String]"==={}.toString.call(t)){var d=t.match(ERROR_TYPES_RE);d&&(l=d[1],f=d[2])}p.func=UNKNOWN_FUNCTION,p.context=null,i(u={name:l,message:f,mode:"onerror",mechanism:"onerror",stack:[__assign({},p,{url:p.url||getLocationHref()})]},!0,null)}return!!e&&e.apply(this,arguments)}function s(e){var t=e&&(e.detail?e.detail.reason:e.reason)||e,n=TraceKit._computeStackTrace(t);n.mechanism="onunhandledrejection",n.message||(n.message=JSON.stringify(normalize$1(t))),i(n,!0,t)}function c(){var e=o,t=r;o=null,r=null,i(e,!1,t)}function u(e){if(o){if(r===e)return;c()}var t=TraceKit._computeStackTrace(e);throw o=t,r=e,setTimeout(function(){r===e&&c()},t.incomplete?2e3:0),e}return u._subscribe=function(e){n.push(e)},u._installGlobalHandler=function(){!0!==t&&(e=window$1.onerror,window$1.onerror=a,t=!0)},u._installGlobalUnhandledRejectionHandler=function(){window$1.onunhandledrejection=s},u}(),TraceKit._computeStackTrace=function(){function e(e){if(!e||!e.stack)return null;for(var t,n,r,o=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,i=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,a=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,s=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,c=/\((\S*)(?::(\d+))(?::(\d+))\)/,u=e.stack.split("\n"),l=[],p=/^(.*) is undefined$/.exec(e.message),f=0,d=u.length;f<d;++f){if(n=o.exec(u[f])){var h=n[2]&&0===n[2].indexOf("native");n[2]&&0===n[2].indexOf("eval")&&(t=c.exec(n[2]))&&(n[2]=t[1],n[3]=t[2],n[4]=t[3]),r={url:n[2],func:n[1]||UNKNOWN_FUNCTION,args:h?[n[2]]:[],line:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}else if(n=a.exec(u[f]))r={url:n[2],func:n[1]||UNKNOWN_FUNCTION,args:[],line:+n[3],column:n[4]?+n[4]:null};else{if(!(n=i.exec(u[f])))continue;n[3]&&n[3].indexOf(" > eval")>-1&&(t=s.exec(n[3]))?(n[1]=n[1]||"eval",n[3]=t[1],n[4]=t[2],n[5]=""):0!==f||n[5]||void 0===e.columnNumber||(l[0].column=e.columnNumber+1),r={url:n[3],func:n[1]||UNKNOWN_FUNCTION,args:n[2]?n[2].split(","):[],line:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}!r.func&&r.line&&(r.func=UNKNOWN_FUNCTION),r.context=null,l.push(r)}return l.length?(l[0]&&l[0].line&&!l[0].column&&p&&(l[0].column=null),{mode:"stack",name:e.name,message:e.message,stack:l}):null}function t(e,t,n,r){var o={url:t,line:n};if(o.url&&o.line){if(e.incomplete=!1,o.func||(o.func=UNKNOWN_FUNCTION),o.context||(o.context=null),/ '([^']+)' /.exec(r)&&(o.column=null),e.stack.length>0&&e.stack[0].url===o.url){if(e.stack[0].line===o.line)return!1;if(!e.stack[0].line&&e.stack[0].func===o.func)return e.stack[0].line=o.line,e.stack[0].context=o.context,!1}return e.stack.unshift(o),e.partial=!0,!0}return e.incomplete=!0,!1}function n(e,r){for(var o,i,a=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,s=[],c={},u=!1,l=n.caller;l&&!u;l=l.caller)if(l!==_computeStackTrace&&l!==TraceKit._report){if(i={url:null,func:UNKNOWN_FUNCTION,args:[],line:null,column:null},l.name?i.func=l.name:(o=a.exec(l.toString()))&&(i.func=o[1]),void 0===i.func)try{i.func=o.input.substring(0,o.input.indexOf("{"))}catch(e){}c[""+l]?u=!0:c[""+l]=!0,s.push(i)}r&&s.splice(0,r);var p={mode:"callers",name:e.name,message:e.message,stack:s};return t(p,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),p}function r(t,r){var o=null;r=null==r?0:+r;try{if(o=function(e){var t=e.stacktrace;if(t){for(var n,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,o=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\