diff --git a/build/3.0.3/onboarding.asset.php b/build/3.0.3/onboarding.asset.php index b05106d98..1f185c2f2 100644 --- a/build/3.0.3/onboarding.asset.php +++ b/build/3.0.3/onboarding.asset.php @@ -1 +1 @@ - array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-media-utils', 'wp-preferences', 'wp-url'), 'version' => '30e304482fe213320ce4'); + array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-media-utils', 'wp-preferences', 'wp-url'), 'version' => '1fdbca79c31365f1aa5e'); diff --git a/build/3.0.3/onboarding.js b/build/3.0.3/onboarding.js index 1be40ace7..2f7cf5918 100644 --- a/build/3.0.3/onboarding.js +++ b/build/3.0.3/onboarding.js @@ -1,2 +1,2 @@ -(()=>{var e,t,n={232:(e,t)=>{"use strict";Object.prototype.toString},330:e=>{"use strict";e.exports={rE:"3.0.3"}},338:(e,t,n)=>{"use strict";var r=n(795);t.H=r.createRoot,r.hydrateRoot},556:(e,t,n)=>{e.exports=n(694)()},609:e=>{"use strict";e.exports=window.React},694:(e,t,n)=>{"use strict";var r=n(925);function i(){}function s(){}s.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,s,o){if(o!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:i};return n.PropTypes=n,n}},723:e=>{"use strict";e.exports=window.wp.i18n},740:function(e,t,n){!function(e,t){"use strict";function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var r=n(t);function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}var s={error:null},o=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i{"use strict";e.exports=window.ReactDOM},925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e="",t=0;t{(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{HiiveAnalytics:()=>z,HiiveEvent:()=>o});var r={};e.r(r),e.d(r,{initializeNamespace:()=>c,updateHiiveDebounceInstance:()=>h,updateHiiveDebounceTime:()=>p,updateHiiveEventsQueue:()=>u,updateHiiveEventsQueueThreshold:()=>d,updateHiiveUrls:()=>l});var i={};e.r(i),e.d(i,{getHiiveBatchUrl:()=>M,getHiiveDebounce:()=>y,getHiiveEventsQueue:()=>f,getHiiveEventsQueueThreshold:()=>m,getHiiveSingleUrl:()=>g});const s=window.wp.data;class o{constructor(e,t,n,r){this.category=e,this.action=t,this.data=n,this.namespace=r}}const a={urls:{single:void 0,batch:void 0},queue:{events:[],threshold:100},debounce:{time:void 0,instance:void 0}};function c(e){return{type:"INITIALIZE_NAMESPACE",namespace:e}}function l(e,t){return{type:"UPDATE_HIIVE_URLS",urls:e,namespace:t}}function u(e,t){return{type:"UPDATE_HIIVE_EVENTS_QUEUE",events:e,namespace:t}}function d(e,t){return{type:"UPDATE_HIIVE_EVENTS_QUEUE_THRESHOLD",threshold:e,namespace:t}}function p(e,t){return{type:"UPDATE_HIIVE_DEBOUNCE_TIME",debounceTime:e,namespace:t}}function h(e,t){return{type:"UPDATE_HIIVE_DEBOUNCE_INSTANCE",instance:e,namespace:t}}function f(e,t){return e.hiive[t]?.queue.events}function m(e,t){return e.hiive[t]?.queue.threshold}function g(e,t){return e.hiive[t]?.urls.single}function M(e,t){return e.hiive[t]?.urls.batch}function y(e,t){return e.hiive[t]?.debounce}const N="newfold/ui-analytics",v={reducer:(0,s.combineReducers)({hiive:(e,t)=>{switch(t.type){case"INITIALIZE_NAMESPACE":return{...e,[t.namespace]:a};case"UPDATE_HIIVE_URLS":return{...e,[t.namespace]:{...e[t.namespace],urls:{single:t.urls.single,batch:t.urls.batch}}};case"UPDATE_HIIVE_EVENTS_QUEUE":return{...e,[t.namespace]:{...e[t.namespace],queue:{events:t.events,threshold:e[t.namespace].queue.threshold}}};case"UPDATE_HIIVE_EVENTS_QUEUE_THRESHOLD":return{...e,[t.namespace]:{...e[t.namespace],queue:{events:e[t.namespace].queue.events,threshold:t.threshold}}};case"UPDATE_HIIVE_DEBOUNCE_TIME":return{...e,[t.namespace]:{...e[t.namespace],debounce:{time:t.debounceTime,instance:e[t.namespace].debounce.instance}}};case"UPDATE_HIIVE_DEBOUNCE_INSTANCE":return{...e,[t.namespace]:{...e[t.namespace],debounce:{time:e[t.namespace].debounce.time,instance:t.instance}}}}return e}}),actions:r,selectors:i},D=(0,s.createReduxStore)(N,v);(0,s.select)(N)||(0,s.register)(D);const j=window.wp.apiFetch;var x=e.n(j);const I=e=>!!window?.nfdUIAnalytics?.hiive&&e in window.nfdUIAnalytics.hiive,T=e=>e instanceof o,w=async e=>{if(!e||!I(e))return!1;const t=(0,s.select)(D).getHiiveBatchUrl(e);if(!t)return!1;const n=(0,s.select)(D).getHiiveEventsQueue(e);if(0===n.length)return!0;(0,s.dispatch)(D).updateHiiveEventsQueue([],e);try{await x()({url:t,method:"POST",data:n})}catch(t){console.error(t),(0,s.dispatch)(D).updateHiiveEventsQueue(n,e)}return!0},z={initialize:async({namespace:e,urls:{single:t,batch:n}={},settings:{debounce:{time:r}={},queue:{threshold:i=100}={}}={}})=>!(!e||!I(e)&&(!t&&!n||((0,s.dispatch)(D).initializeNamespace(e),(0,s.dispatch)(D).updateHiiveUrls({single:t,batch:n},e),(0,s.dispatch)(D).updateHiiveDebounceTime(r,e),(0,s.dispatch)(D).updateHiiveEventsQueueThreshold(i,e),window.nfdUIAnalytics?.hiive?window.nfdUIAnalytics.hiive[e]=!0:window.nfdUIAnalytics={hiive:{[e]:!0}},0))),initialized:I,validate:T,track:e=>{if(!T(e)||!I(e.namespace))return!1;const t=e.namespace;delete e.namespace;const n=(0,s.select)(D).getHiiveEventsQueue(t);n.push(e),(0,s.dispatch)(D).updateHiiveEventsQueue(n,t);const r=(0,s.select)(D).getHiiveEventsQueueThreshold(t);return r&&r{if(!e)return!1;const t=(0,s.select)(D).getHiiveDebounce(e);t.time&&(clearInterval(t.instance),(0,s.dispatch)(D).updateHiiveDebounceInstance(setTimeout(()=>{w(e),(0,s.dispatch)(D).updateHiiveDebounceInstance(void 0,e)},t.time),e))})(t),!0},send:async e=>{if(!T(e)||!I(e.namespace))return!1;const t=e.namespace;delete e.namespace;const n=(0,s.select)(D).getHiiveSingleUrl(t);if(!n)return!1;try{await x()({url:n,method:"POST",data:e})}catch(e){return console.error(e),!1}},dispatchEvents:w,disableDebounce:e=>{if(!e)return!1;const t=(0,s.select)(D).getHiiveDebounce(e);return t.instance&&(clearInterval(t.instance),(0,s.dispatch)(D).updateHiiveDebounceInstance(void 0,e),(0,s.dispatch)(D).updateHiiveDebounceTime(void 0,e)),!0}};var b=t;for(var E in n)b[E]=n[E];n.__esModule&&Object.defineProperty(b,"__esModule",{value:!0})})()}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var s=r[e]={exports:{}};return n[e].call(s.exports,s,s.exports,i),s.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var s=Object.create(null);i.r(s);var o={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(e=>o[e]=()=>n[e]);return o.default=()=>n,i.d(s,o),s},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})();var s={};(()=>{"use strict";i.r(s),i.d(s,{runtimeDataObjectIsMounted:()=>Cj});var e={};i.r(e),i.d(e,{closeModal:()=>ol,disableComplementaryArea:()=>Xc,enableComplementaryArea:()=>Kc,openModal:()=>sl,pinItem:()=>el,setDefaultComplementaryArea:()=>Jc,setFeatureDefaults:()=>il,setFeatureValue:()=>rl,toggleFeature:()=>nl,unpinItem:()=>tl});var t={};i.r(t),i.d(t,{getActiveComplementaryArea:()=>al,isComplementaryAreaLoading:()=>cl,isFeatureActive:()=>ul,isItemPinned:()=>ll,isModalActive:()=>dl});const n=window.wp.domReady;var r=i.n(n),o=i(338),a=i(974);const c="9.31.0",l=globalThis;function u(){return d(l),l}function d(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||c,t[c]=t[c]||{}}function p(e,t,n=l){const r=n.__SENTRY__=n.__SENTRY__||{},i=r[c]=r[c]||{};return i[e]||(i[e]=t())}const h="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,f=Object.prototype.toString;function m(e){switch(f.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return T(e,Error)}}function g(e,t){return f.call(e)===`[object ${t}]`}function M(e){return g(e,"ErrorEvent")}function y(e){return g(e,"DOMError")}function N(e){return g(e,"String")}function v(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function D(e){return null===e||v(e)||"object"!=typeof e&&"function"!=typeof e}function j(e){return g(e,"Object")}function x(e){return"undefined"!=typeof Event&&T(e,Event)}function I(e){return Boolean(e?.then&&"function"==typeof e.then)}function T(e,t){try{return e instanceof t}catch(e){return!1}}function w(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}function z(e){return"undefined"!=typeof Request&&T(e,Request)}const b=l;function E(e,t={}){if(!e)return"";try{let n=e;const r=5,i=[];let s=0,o=0;const a=" > ",c=a.length;let l;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&s++1&&o+i.length*c+l.length>=d));)i.push(l),o+=l.length,n=n.parentNode;return i.reverse().join(a)}catch(e){return""}}function A(e,t){const n=e,r=[];if(!n?.tagName)return"";if(b.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const i=t?.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(i?.length)i.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const e=n.className;if(e&&N(e)){const t=e.split(/\s+/);for(const e of t)r.push(`.${e}`)}}const s=["aria-label","type","name","title","alt"];for(const e of s){const t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join("")}function S(){try{return b.document.location.href}catch(e){return""}}function L(e){if(!b.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}const O=["debug","info","warn","error","log","assert","trace"],_={};function k(e){if(!("console"in l))return e();const t=l.console,n={},r=Object.keys(_);r.forEach(e=>{const r=_[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}const C=p("logger",function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return h?O.forEach(n=>{t[n]=(...t)=>{e&&k(()=>{l.console[n](`Sentry Logger [${n}]:`,...t)})}}):O.forEach(e=>{t[e]=()=>{}}),t});function Q(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function P(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;tfunction(e,t,n=!1){return!!N(e)&&(g(t,"RegExp")?t.test(e):!!N(t)&&(n?e===t:e.includes(t)))}(e,t,n))}function R(e,t,n){if(!(t in e))return;const r=e[t];if("function"!=typeof r)return;const i=n(r);"function"==typeof i&&F(i,r);try{e[t]=i}catch{h&&C.log(`Failed to replace method "${t}" in object`,e)}}function Y(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(n){h&&C.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function F(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Y(e,"__sentry_original__",t)}catch(e){}}function V(e){return e.__sentry_original__}function B(e){if(m(e))return{message:e.message,name:e.name,stack:e.stack,...H(e)};if(x(e)){const t={type:e.type,target:$(e.target),currentTarget:$(e.currentTarget),...H(e)};return"undefined"!=typeof CustomEvent&&T(e,CustomEvent)&&(t.detail=e.detail),t}return e}function $(e){try{return"undefined"!=typeof Element&&T(e,Element)?E(e):Object.prototype.toString.call(e)}catch(e){return""}}function H(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function W(e=function(){const e=l;return e.crypto||e.msCrypto}()){let t=()=>16*Math.random();try{if(e?.randomUUID)return e.randomUUID().replace(/-/g,"");e?.getRandomValues&&(t=()=>{const t=new Uint8Array(1);return e.getRandomValues(t),t[0]})}catch(e){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(15&t())>>e/4).toString(16))}function G(e){return e.exception?.values?.[0]}function q(e){const{message:t,event_id:n}=e;if(t)return t;const r=G(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function Z(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=t||""),s.type||(s.type=n||"Error")}function J(e,t){const n=G(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r?.data,...t.data};n.mechanism.data=e}}function K(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{Y(e,"__sentry_captured__",!0)}catch(e){}return!1}function X(){return Date.now()/1e3}const ee=function(){const{performance:e}=l;if(!e?.now)return X;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/1e3}();let te;function ne(){return te||(te=function(){const{performance:e}=l;if(!e?.now)return[void 0,"none"];const t=36e5,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,s=i=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function ie(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=ie(r[e],t[e],n-1));return r}function se(){return W()}function oe(){return W().substring(16)}const ae="_sentrySpan";function ce(e,t){t?Y(e,ae,t):delete e[ae]}function le(e){return e[ae]}class ue{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:se(),sampleRand:Math.random()}}clone(){const e=new ue;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,ce(e,le(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&re(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,n=t instanceof ue?t.getScopeData():j(t)?e:void 0,{tags:r,extra:i,user:s,contexts:o,level:a,fingerprint:c=[],propagationContext:l}=n||{};return this._tags={...this._tags,...r},this._extra={...this._extra,...i},this._contexts={...this._contexts,...o},s&&Object.keys(s).length&&(this._user=s),a&&(this._level=a),c.length&&(this._fingerprint=c),l&&(this._propagationContext=l),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,ce(this,void 0),this._attachments=[],this.setPropagationContext({traceId:se(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:X(),...e,message:e.message?Q(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:le(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=ie(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t?.event_id||W();if(!this._client)return C.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n?.event_id||W();if(!this._client)return C.warn("No client configured on scope - will not capture message!"),r;const i=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){const n=t?.event_id||W();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(C.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}class de{constructor(e,t){let n,r;n=e||new ue,r=t||new ue,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return I(n)?n.then(e=>(this._popScope(),e),e=>{throw this._popScope(),e}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1||!this._stack.pop())}}function pe(){const e=d(u());return e.stack=e.stack||new de(p("defaultCurrentScope",()=>new ue),p("defaultIsolationScope",()=>new ue))}function he(e){return pe().withScope(e)}function fe(e,t){const n=pe();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function me(e){return pe().withScope(()=>e(pe().getIsolationScope()))}function ge(e){const t=d(e);return t.acs?t.acs:{withIsolationScope:me,withScope:he,withSetScope:fe,withSetIsolationScope:(e,t)=>me(t),getCurrentScope:()=>pe().getScope(),getIsolationScope:()=>pe().getIsolationScope()}}function Me(){return ge(u()).getCurrentScope()}function ye(){return ge(u()).getIsolationScope()}function Ne(...e){const t=ge(u());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function ve(){return Me().getClient()}function De(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=t,s={trace_id:n,span_id:i||oe()};return r&&(s.parent_span_id=r),s}const je="production";var xe;function Ie(e){return new we(t=>{t(e)})}function Te(e){return new we((t,n)=>{n(e)})}!function(e){e[e.PENDING=0]="PENDING",e[e.RESOLVED=1]="RESOLVED",e[e.REJECTED=2]="REJECTED"}(xe||(xe={}));class we{constructor(e){this._state=xe.PENDING,this._handlers=[],this._runExecutor(e)}then(e,t){return new we((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new we((t,n)=>{let r,i;return this.then(t=>{i=!1,r=t,e&&e()},t=>{i=!0,r=t,e&&e()}).then(()=>{i?n(r):t(r)})})}_executeHandlers(){if(this._state===xe.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===xe.RESOLVED&&e[1](this._value),this._state===xe.REJECTED&&e[2](this._value),e[0]=!0)})}_runExecutor(e){const t=(e,t)=>{this._state===xe.PENDING&&(I(t)?t.then(n,r):(this._state=e,this._value=t,this._executeHandlers()))},n=e=>{t(xe.RESOLVED,e)},r=e=>{t(xe.REJECTED,e)};try{e(n,r)}catch(e){r(e)}}}function ze(e,t,n,r=0){return new we((i,s)=>{const o=e[r];if(null===t||"function"!=typeof o)i(t);else{const a=o({...t},n);h&&o.id&&null===a&&C.log(`Event processor "${o.id}" dropped event`),I(a)?a.then(t=>ze(e,t,n,r+1).then(i)).then(null,s):ze(e,a,n,r+1).then(i).then(null,s)}})}const be="sentry.source",Ee="sentry.sample_rate",Ae="sentry.previous_trace_sample_rate",Se="sentry.op",Le="sentry.origin",Oe="sentry.idle_span_finish_reason",_e="sentry.measurement_unit",ke="sentry.measurement_value",Ce="sentry.custom_span_name",Qe="sentry.profile_id",Pe="sentry.exclusive_time",Ue="sentry.link.type",Re="sentry-",Ye=/^sentry-/;function Fe(e){const t=function(e){if(e&&(N(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{const n=Ve(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):Ve(e)}(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>(t.match(Ye)&&(e[t.slice(7)]=n),e),{});return Object.keys(n).length>0?n:void 0}function Ve(e){return e.split(",").map(e=>e.split("=").map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}const Be=/^o(\d+)\./,$e=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function He(e,t=!1){const{host:n,path:r,pass:i,port:s,projectId:o,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${o}`}function We(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Ge(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=e||ve()?.getOptions();return!(!t||null==t.tracesSampleRate&&!t.tracesSampler)}function qe(e,t){e.setAttribute("http.response.status_code",t);const n=function(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"unknown_error"}}(t);"unknown_error"!==n.message&&e.setStatus(n)}const Ze="_sentryScope",Je="_sentryIsolationScope";function Ke(e){return{scope:e[Ze],isolationScope:e[Je]}}function Xe(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;return"number"!=typeof t||isNaN(t)||t<0||t>1?void 0:t}const et=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function tt(e=se(),t=oe(),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${e}-${t}${r}`}let nt=!1;function rt(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:s,status:o,origin:a,links:c}=ct(e);return{parent_span_id:s,span_id:t,trace_id:n,data:r,op:i,status:o,origin:a,links:c}}function it(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:ct(e).parent_span_id,s=Ke(e).scope;return{parent_span_id:i,span_id:r?s?.getPropagationContext().propagationSpanId||oe():t,trace_id:n}}function st(e){return e&&e.length>0?e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:1===n,attributes:i,...r})):void 0}function ot(e){return"number"==typeof e?at(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?at(e.getTime()):ee()}function at(e){return e>9999999999?e/1e3:e}function ct(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(function(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){const{attributes:r,startTime:i,name:s,endTime:o,status:a,links:c}=e;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0,start_timestamp:ot(i),timestamp:ot(o)||void 0,status:ut(a),op:r[Se],origin:r[Le],links:st(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function lt(e){const{traceFlags:t}=e.spanContext();return 1===t}function ut(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}const dt="_sentryChildSpans",pt="_sentryRootSpan";function ht(e,t){const n=e[pt]||e;Y(t,pt,n),e[dt]?e[dt].add(t):Y(e,dt,new Set([t]))}function ft(e){const t=new Set;return function e(n){if(!t.has(n)&<(n)){t.add(n);const r=n[dt]?Array.from(n[dt]):[];for(const t of r)e(t)}}(e),Array.from(t)}function mt(e){return e[pt]||e}function gt(){const e=ge(u());return e.getActiveSpan?e.getActiveSpan():le(Me())}function Mt(){nt||(k(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),nt=!0)}const yt="_frozenDsc";function Nt(e,t){Y(e,yt,t)}function vt(e,t){const n=t.getOptions(),{publicKey:r,host:i}=t.getDsn()||{};let s;n.orgId?s=String(n.orgId):i&&(s=function(e){const t=e.match(Be);return t?.[1]}(i));const o={environment:n.environment||je,release:n.release,public_key:r,trace_id:e,org_id:s};return t.emit("createDsc",o),o}function Dt(e,t){const n=t.getPropagationContext();return n.dsc||vt(n.traceId,e)}function jt(e){const t=ve();if(!t)return{};const n=mt(e),r=ct(n),i=r.data,s=n.spanContext().traceState,o=s?.get("sentry.sample_rate")??i[Ee]??i[Ae];function a(e){return"number"!=typeof o&&"string"!=typeof o||(e.sample_rate=`${o}`),e}const c=n[yt];if(c)return a(c);const l=s?.get("sentry.dsc"),u=l&&Fe(l);if(u)return a(u);const d=vt(e.spanContext().traceId,t),p=i[be],h=r.description;return"url"!==p&&h&&(d.transaction=h),Ge()&&(d.sampled=String(lt(n)),d.sample_rand=s?.get("sentry.sample_rand")??Ke(n).scope?.getPropagationContext().sampleRand.toString()),a(d),t.emit("createDsc",d,n),d}function xt(e,t){const{extra:n,tags:r,user:i,contexts:s,level:o,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:l,eventProcessors:u,attachments:d,propagationContext:p,transactionName:h,span:f}=t;It(e,"extra",n),It(e,"tags",r),It(e,"user",i),It(e,"contexts",s),e.sdkProcessingMetadata=ie(e.sdkProcessingMetadata,a,2),o&&(e.level=o),h&&(e.transactionName=h),f&&(e.span=f),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function It(e,t,n){e[t]=ie(e[t],n,1)}let Tt,wt,zt;const bt="?",Et=/\(error: (.*)\)/,At=/captureMessage|captureException/;function St(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{const i=[],s=e.split("\n");for(let e=n;e1024)continue;const o=Et.test(n)?n.replace(Et,"$1"):n;if(!o.match(/\S*Error: /)){for(const e of t){const t=e(o);if(t){i.push(t);break}}if(i.length>=50+r)break}}return function(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Lt(t).function||"")&&t.pop(),t.reverse(),At.test(Lt(t).function||"")&&(t.pop(),At.test(Lt(t).function||"")&&t.pop()),t.slice(0,50).map(e=>({...e,filename:e.filename||Lt(t).filename,function:e.function||bt}))}(i.slice(r))}}function Lt(e){return e[e.length-1]||{}}const Ot="";function _t(e){try{return e&&"function"==typeof e&&e.name||Ot}catch(e){return Ot}}function kt(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch(e){return}}}function Ct(e,t=100,n=1/0){try{return Pt("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Qt(e,t=3,n=102400){const r=Ct(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?Qt(e,t-1,n):r;var i}function Pt(e,t,n=1/0,r=1/0,i=function(){const e=new WeakSet;return[function(t){return!!e.has(t)||(e.add(t),!1)},function(t){e.delete(t)}]}()){const[s,o]=i;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if("undefined"!=typeof global&&t===global)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(w(t))return"[VueViewModel]";if(j(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${_t(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const r=function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}var n}(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===c)return a.replace("object ","");if(s(t))return"[Circular ~]";const l=t;if(l&&"function"==typeof l.toJSON)try{return Pt("",l.toJSON(),c-1,r,i)}catch(e){}const u=Array.isArray(t)?[]:{};let d=0;const p=B(t);for(const e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(d>=r){u[e]="[MaxProperties ~]";break}const t=p[e];u[e]=Pt(e,t,c-1,r,i),d++}return o(t),u}function Ut(e,t,n,r,i,s){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||W(),timestamp:t.timestamp||X()},u=n.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:n,release:r,dist:i,maxValueLength:s=250}=t;e.environment=e.environment||n||je,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);const o=e.request;o?.url&&(o.url=Q(o.url,s))}(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,u),i&&i.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=function(e){const t=l._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return zt&&n.length===wt||(wt=n.length,zt=n.reduce((n,r)=>{Tt||(Tt={});const i=Tt[r];if(i)n[i[0]]=i[1];else{const i=e(r);for(let e=i.length-1;e>=0;e--){const s=i[e],o=s?.filename,a=t[r];if(o&&a){n[o]=a,Tt[r]=[o,a];break}}}return n},{})),zt}(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}(c,e.stackParser);const d=function(e,t){if(!t)return e;const n=e?e.clone():new ue;return n.update(t),n}(r,n.captureContext);n.mechanism&&J(c,n.mechanism);const h=i?i.getEventProcessors():[],f=p("globalScope",()=>new ue).getScopeData();s&&xt(f,s.getScopeData()),d&&xt(f,d.getScopeData());const m=[...n.attachments||[],...f.attachments];return m.length&&(n.attachments=m),function(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:s}=t;!function(e,t){const{extra:n,tags:r,user:i,contexts:s,level:o,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(s).length&&(e.contexts={...s,...e.contexts}),o&&(e.level=o),a&&"transaction"!==e.type&&(e.transaction=a)}(e,t),r&&function(e,t){e.contexts={trace:it(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:jt(t),...e.sdkProcessingMetadata};const n=ct(mt(t)).description;n&&!e.transaction&&"transaction"===e.type&&(e.transaction=n)}(e,r),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,i),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,s)}(c,f),ze([...h,...f.eventProcessors],c,n).then(e=>(e&&function(e){const t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})})}(e),"number"==typeof o&&o>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:Ct(e.data,t,n)}}))},...e.user&&{user:Ct(e.user,t,n)},...e.contexts&&{contexts:Ct(e.contexts,t,n)},...e.extra&&{extra:Ct(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Ct(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:Ct(e.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=Ct(e.contexts.flags,3,n)),r}(e,o,a):e))}const Rt=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Yt(e,t){return Me().captureEvent(e,t)}function Ft(e){const t=ye(),n=Me(),{userAgent:r}=l.navigator||{},i=function(e){const t=ee(),n={sid:W(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return{sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}(n)};return e&&re(n,e),n}({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),s=t.getSession();return"ok"===s?.status&&re(s,{status:"exited"}),Vt(),t.setSession(i),i}function Vt(){const e=ye(),t=Me().getSession()||e.getSession();t&&function(e){let t={};"ok"===e.status&&(t={status:"exited"}),re(e,t)}(t),Bt(),e.setSession()}function Bt(){const e=ye(),t=ve(),n=e.getSession();n&&t&&t.captureSession(n)}function $t(e=!1){e?Vt():Bt()}const Ht=[];function Wt(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach(e=>{e.isDefaultInstance=!0}),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return function(e){const t={};return e.forEach(e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(r)}function Gt(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function qt(e,t,n){if(n[t.name])h&&C.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===Ht.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),Ht.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,r)=>n(t,r,e))}if("function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}h&&C.log(`Integration installed: ${t.name}`)}}function Zt(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch(e){}return t}const Jt=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],Kt=(e={})=>{let t;return{name:"EventFilters",setup(n){const r=n.getOptions();t=en(e,r)},processEvent(n,r,i){if(!t){const n=i.getOptions();t=en(e,n)}return function(e,t){if(e.type){if("transaction"===e.type&&function(e,t){if(!t?.length)return!1;const n=e.transaction;return!!n&&U(n,t)}(e,t.ignoreTransactions))return h&&C.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${q(e)}`),!0}else{if(function(e,t){return!!t?.length&&Zt(e).some(e=>U(e,t))}(e,t.ignoreErrors))return h&&C.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${q(e)}`),!0;if(function(e){return!!e.exception?.values?.length&&(!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value))}(e))return h&&C.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${q(e)}`),!0;if(function(e,t){if(!t?.length)return!1;const n=tn(e);return!!n&&U(n,t)}(e,t.denyUrls))return h&&C.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${q(e)}.\nUrl: ${tn(e)}`),!0;if(!function(e,t){if(!t?.length)return!0;const n=tn(e);return!n||U(n,t)}(e,t.allowUrls))return h&&C.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${q(e)}.\nUrl: ${tn(e)}`),!0}return!1}(n,t)?null:n}}},Xt=(e={})=>({...Kt(e),name:"InboundFilters"});function en(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Jt],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function tn(e){try{const t=[...e.exception?.values??[]].reverse().find(e=>void 0===e.mechanism?.parent_id&&e.stacktrace?.frames?.length),n=t?.stacktrace?.frames;return n?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&""!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch(t){return h&&C.error(`Cannot extract url for event ${q(e)}`),null}}let nn;const rn=new WeakMap,sn=()=>({name:"FunctionToString",setupOnce(){nn=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=V(this),n=rn.has(ve())&&void 0!==t?t:this;return nn.apply(n,e)}}catch{}},setup(e){rn.set(e,!0)}}),on=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){return!!t&&(!!function(e,t){const n=e.message,r=t.message;return!(!n&&!r)&&(!(n&&!r||!n&&r)&&(n===r&&(!!cn(e,t)&&!!an(e,t))))}(e,t)||!!function(e,t){const n=ln(t),r=ln(e);return!(!n||!r)&&(n.type===r.type&&n.value===r.value&&(!!cn(e,t)&&!!an(e,t)))}(e,t))}(t,e))return h&&C.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){}return e=t}}};function an(e,t){let n=kt(e),r=kt(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let e=0;ee+t.length,0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(r)}function mn(e){return[{type:"span"},e]}function gn(e){const t="string"==typeof e.data?hn(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const Mn={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function yn(e){return Mn[e]}function Nn(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}const vn="Not capturing exception because it's already been captured.",Dn="Discarded session because of missing or non-string release",jn=Symbol.for("SentryInternalError"),xn=Symbol.for("SentryDoNotSendEventError");function In(e){return{message:e,[jn]:!0}}function Tn(e){return{message:e,[xn]:!0}}function wn(e){return!!e&&"object"==typeof e&&jn in e}function zn(e){return!!e&&"object"==typeof e&&xn in e}class bn{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=function(e){const t="string"==typeof e?function(e){const t=$e.exec(e);if(!t)return void k(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});const[n,r,i="",s="",o="",a=""]=t.slice(1);let c="",l=a;const u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){const e=l.match(/^\d+/);e&&(l=e[0])}return We({host:s,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}(e):We(e);if(t&&function(e){if(!h)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(C.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(C.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(C.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(C.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}(e.dsn):h&&C.warn("No DSN provided, client will not send events."),this._dsn){const i=(t=this._dsn,n=e.tunnel,r=e._metadata?e._metadata.sdk:void 0,n||`${function(e){return`${function(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(t)}?${function(e,t){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(t,r)}`);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:i})}var t,n,r}captureException(e,t,n){const r=W();if(K(e))return h&&C.log(vn),r;const i={event_id:r,...t};return this._process(this.eventFromException(e,i).then(e=>this._captureEvent(e,i,n))),i.event_id}captureMessage(e,t,n,r){const i={event_id:W(),...n},s=v(e)?e:String(e),o=D(e)?this.eventFromMessage(s,t,i):this.eventFromException(e,i);return this._process(o.then(e=>this._captureEvent(e,i,r))),i.event_id}captureEvent(e,t,n){const r=W();if(t?.originalException&&K(t.originalException))return h&&C.log(vn),r;const i={event_id:r,...t},s=e.sdkProcessingMetadata||{},o=s.capturedSpanScope,a=s.capturedSpanIsolationScope;return this._process(this._captureEvent(e,i,o||n,a)),i.event_id}captureSession(e){this.sendSession(e),re(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e))):Ie(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,this.emit("close"),e))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];qt(this,e,this._integrations),t||Gt(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=function(e,t,n,r){const i=Nn(n),s=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n?.sdk);const o=function(e,t,n,r){const i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:He(r)},...i&&{trace:i}}}(e,i,r,t);return delete e.sdkProcessingMetadata,un(o,[[{type:s},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=dn(n,gn(e));const r=this.sendEnvelope(n);r&&r.then(t=>this.emit("afterSendEvent",e,t),null)}sendSession(e){const{release:t,environment:n=je}=this._options;if("aggregates"in e){const r=e.attrs||{};if(!r.release&&!t)return void(h&&C.warn(Dn));r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t)return void(h&&C.warn(Dn));e.release=e.release||t,e.environment=e.environment||n}this.emit("beforeSendSession",e);const r=function(e,t,n,r){const i=Nn(n);return un({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:He(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){const r=`${e}:${t}`;h&&C.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){const n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{const e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach(e=>e(...t))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,e=>(h&&C.error("Error while sending envelope:",e),e)):(h&&C.error("Transport disabled"),Ie({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{t&&qt(e,t,n)}),n}(this,e),Gt(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1;const i=t.exception?.values;if(i){r=!0;for(const e of i){const t=e.mechanism;if(!1===t?.handled){n=!0;break}}}const s="ok"===e.status;(s&&0===e.errors||s&&n)&&(re(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new we(t=>{let n=0;const r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){const i=this.getOptions(),s=Object.keys(this._integrations);return!t.integrations&&s?.length&&(t.integrations=s),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Ut(i,e,t,n,this,r).then(e=>{if(null===e)return e;this.emit("postprocessEvent",e,t),e.contexts={trace:De(n),...e.contexts};const r=Dt(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:r,...e.sdkProcessingMetadata},e})}_captureEvent(e,t={},n=Me(),r=ye()){return h&&En(e)&&C.log(`Captured error event \`${Zt(e)[0]||""}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{h&&(zn(e)?C.log(e.message):wn(e)?C.warn(e.message):C.warn(e))})}_processEvent(e,t,n,r){const i=this.getOptions(),{sampleRate:s}=i,o=An(e),a=En(e),c=e.type||"error",l=`before send for type \`${c}\``,u=void 0===s?void 0:Xe(s);if(a&&"number"==typeof u&&Math.random()>u)return this.recordDroppedEvent("sample_rate","error"),Te(Tn(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));const d="replay_event"===c?"replay":c;return this._prepareEvent(e,t,n,r).then(e=>{if(null===e)throw this.recordDroppedEvent("event_processor",d),Tn("An event processor returned `null`, will not send event.");if(t.data&&!0===t.data.__sentry__)return e;const n=function(e,t,n,r){const{beforeSend:i,beforeSendTransaction:s,beforeSendSpan:o}=t;let a=n;if(En(a)&&i)return i(a,r);if(An(a)){if(o){const e=o(function(e){const{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:s,data:o,op:a}=e.contexts?.trace??{};return{data:o??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:o?.[Qe],exclusive_time:o?.[Pe],measurements:e.measurements,is_segment:!0}}(a));if(e?a=ie(n,{type:"transaction",timestamp:(c=e).timestamp,start_timestamp:c.start_timestamp,transaction:c.description,contexts:{trace:{trace_id:c.trace_id,span_id:c.span_id,parent_span_id:c.parent_span_id,op:c.op,status:c.status,origin:c.origin,data:{...c.data,...c.profile_id&&{[Qe]:c.profile_id},...c.exclusive_time&&{[Pe]:c.exclusive_time}}}},measurements:c.measurements}):Mt(),a.spans){const e=[];for(const t of a.spans){const n=o(t);n?e.push(n):(Mt(),e.push(t))}a.spans=e}}if(s){if(a.spans){const e=a.spans.length;a.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return s(a,r)}}var c;return a}(0,i,e,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(I(e))return e.then(e=>{if(!j(e)&&null!==e)throw In(n);return e},e=>{throw In(`${t} rejected with ${e}`)});if(!j(e)&&null!==e)throw In(n);return e}(n,l)}).then(i=>{if(null===i){if(this.recordDroppedEvent("before_send",d),o){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw Tn(`${l} returned \`null\`, will not send event.`)}const s=n.getSession()||r.getSession();if(a&&s&&this._updateSessionFromEvent(s,i),o){const e=(i.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const c=i.transaction_info;if(o&&c&&i.transaction!==e.transaction){const e="custom";i.transaction_info={...c,source:e}}return this.sendEvent(i,t),i}).then(null,e=>{if(zn(e)||wn(e))throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),In(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)})}_process(e){this._numProcessing++,e.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}})}_flushOutcomes(){h&&C.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(h&&C.log("No outcomes to send"));if(!this._dsn)return void(h&&C.log("No dsn provided, will not send outcomes"));h&&C.log("Sending outcomes:",e);const t=(n=e,un((r=this._options.tunnel&&He(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:X(),discarded_events:n}]]));var n,r;this.sendEnvelope(t)}}function En(e){return void 0===e.type}function An(e){return"transaction"===e.type}function Sn(e,t,n=[t],r="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(e=>({name:`${r}:@sentry/${e}`,version:c})),version:c}),e._metadata=i}function Ln(e,t){const n=t??function(e){return l._sentryClientToLogBufferMap?.get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),i=function(e,t,n,r){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=He(r)),un(i,[(s=e,[{type:"log",item_count:s.length,content_type:"application/vnd.sentry.items.log+json"},{items:s}])]);var s}(n,r._metadata,r.tunnel,e.getDsn());l._sentryClientToLogBufferMap?.set(e,[]),e.emit("flushLogs"),e.sendEnvelope(i)}function On(e){void 0===e.user?.ip_address&&(e.user={...e.user,ip_address:"{{auto}}"})}function kn(e){"aggregates"in e?void 0===e.attrs?.ip_address&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}function Cn(e,t){const n=Pn(e,t),r={type:Yn(t),value:Fn(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Qn(e,t){return{exception:{values:[Cn(e,t)]}}}function Pn(e,t){const n=t.stacktrace||t.stack||"",r=function(e){return e&&Un.test(e.message)?1:0}(t),i=function(e){return"number"==typeof e.framesToPop?e.framesToPop:0}(t);try{return e(n,r,i)}catch(e){}return[]}l._sentryClientToLogBufferMap=new WeakMap;const Un=/Minified React error #\d+;/i;function Rn(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function Yn(e){const t=e?.name;return!t&&Rn(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}function Fn(e){const t=e?.message;return Rn(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function Vn(e,t,n,r,i){let s;if(M(t)&&t.error)return Qn(e,t.error);if(y(t)||g(t,"DOMException")){const i=t;if("stack"in t)s=Qn(e,t);else{const t=i.name||(y(i)?"DOMError":"DOMException"),o=i.message?`${t}: ${i.message}`:t;s=Bn(e,o,n,r),Z(s,o)}return"code"in i&&(s.tags={...s.tags,"DOMException.code":`${i.code}`}),s}return m(t)?Qn(e,t):j(t)||x(t)?(s=function(e,t,n,r){const i=ve(),s=i?.getOptions().normalizeDepth,o=function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}(t),a={__serialized__:Qt(t,s)};if(o)return{exception:{values:[Cn(e,o)]},extra:a};const c={exception:{values:[{type:x(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:$n(t,{isUnhandledRejection:r})}]},extra:a};if(n){const t=Pn(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}(e,t,n,i),J(s,{synthetic:!0}),s):(s=Bn(e,t,n,r),Z(s,`${t}`,void 0),J(s,{synthetic:!0}),s)}function Bn(e,t,n,r){const i={};if(r&&n){const r=Pn(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),J(i,{synthetic:!0})}if(v(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function $n(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(B(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return Q(r,t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:Q(r,t)}return""}(e),r=t?"promise rejection":"exception";return M(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:x(e)?`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}const Hn=l;let Wn=0;function Gn(){return Wn>0}function qn(e,t={}){if(!function(e){return"function"==typeof e}(e))return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(V(e))return e}catch(t){return e}const n=function(...n){try{const r=n.map(e=>qn(e,t));return e.apply(this,r)}catch(e){throw Wn++,setTimeout(()=>{Wn--}),Ne(r=>{var i;r.addEventProcessor(e=>(t.mechanism&&(Z(e,void 0,void 0),J(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),i=e,Me().captureException(i,function(e){if(e)return function(e){return e instanceof ue||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>Rt.includes(e))}(e)?{captureContext:e}:e}(undefined))}),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}F(n,e),Y(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}function Zn(){const e=S(),{referrer:t}=Hn.document||{},{userAgent:n}=Hn.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}class Jn extends bn{constructor(e){const t=(n=e,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:Hn.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...n});var n;Sn(t,"browser",["browser"],Hn.SENTRY_SDK_SOURCE||"npm"),super(t);const{sendDefaultPii:r,sendClientReports:i,_experiments:s}=this._options,o=s?.enableLogs;Hn.document&&(i||o)&&Hn.document.addEventListener("visibilitychange",()=>{"hidden"===Hn.document.visibilityState&&(i&&this._flushOutcomes(),o&&Ln(this))}),o&&(this.on("flush",()=>{Ln(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{Ln(this)},5e3)})),r&&(this.on("postprocessEvent",On),this.on("beforeSendSession",kn))}eventFromException(e,t){return function(e,t,n,r){const i=Vn(e,t,n?.syntheticException||void 0,r);return J(i),i.level="error",n?.event_id&&(i.event_id=n.event_id),Ie(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){const s=Bn(e,t,r?.syntheticException||void 0,i);return s.level=n,r?.event_id&&(s.event_id=r.event_id),Ie(s)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n,r)}}const Kn={},Xn={};function er(e,t){Kn[e]=Kn[e]||[],Kn[e].push(t)}function tr(e,t){if(!Xn[e]){Xn[e]=!0;try{t()}catch(t){h&&C.error(`Error while instrumenting ${e}`,t)}}}function nr(e,t){const n=e&&Kn[e];if(n)for(const r of n)try{r(t)}catch(t){h&&C.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${_t(r)}\nError:`,t)}}function rr(){"console"in l&&O.forEach(function(e){e in l.console&&R(l.console,e,function(t){return _[e]=t,function(...t){nr("console",{args:t,level:e});const n=_[e];n?.apply(l.console,t)}})})}const ir=l;function sr(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function or(e,t){const n="fetch";er(n,e),tr(n,()=>ar(void 0,t))}function ar(e,t=!1){t&&!function(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in ir))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}())return!1;if(sr(ir.fetch))return!0;let e=!1;const t=ir.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=sr(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){h&&C.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}()||R(l,"fetch",function(t){return function(...n){const r=new Error,{method:i,url:s}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:ur(t),method:lr(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:ur(t),method:lr(t,"method")?String(t.method).toUpperCase():"GET"}}(n),o={args:n,fetchData:{method:i,url:s},startTimestamp:1e3*ee(),virtualError:r,headers:dr(n)};return e||nr("fetch",{...o}),t.apply(l,n).then(async t=>(e?e(t):nr("fetch",{...o,endTimestamp:1e3*ee(),response:t}),t),e=>{if(nr("fetch",{...o,endTimestamp:1e3*ee(),error:e}),m(e)&&void 0===e.stack&&(e.stack=r.stack,Y(e,"framesToPop",1)),e instanceof TypeError&&("Failed to fetch"===e.message||"Load failed"===e.message||"NetworkError when attempting to fetch resource."===e.message))try{const t=new URL(o.fetchData.url);e.message=`${e.message} (${t.host})`}catch{}throw e})}})}function cr(e){let t;try{t=e.clone()}catch{return}!async function(e,t){if(e?.body){const n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},9e4);let s=!0;for(;s;){let e;try{e=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:i}=await r.read();clearTimeout(e),i&&(t(),s=!1)}catch(e){s=!1}finally{clearTimeout(e)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}(t,()=>{nr("fetch-body-resolved",{endTimestamp:1e3*ee(),response:e})})}function lr(e,t){return!!e&&"object"==typeof e&&!!e[t]}function ur(e){return"string"==typeof e?e:e?lr(e,"url")?e.url:e.toString?e.toString():"":""}function dr(e){const[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(z(t))return new Headers(t.headers)}catch{}}const pr=100;function hr(e,t){const n=ve(),r=ye();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=pr}=n.getOptions();if(s<=0)return;const o={timestamp:X(),...e},a=i?k(()=>i(o,t)):o;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,s))}function fr(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}function mr(e){return"isRelative"in e}function gr(e,t){const n=e.indexOf("://")<=0&&0!==e.indexOf("//"),r=t??(n?"thismessage:/":void 0);try{if("canParse"in URL&&!URL.canParse(e,r))return;const t=new URL(e,r);return n?{isRelative:n,pathname:t.pathname,search:t.search,hash:t.hash}:t}catch{}}function Mr(e){if(mr(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function yr(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}const Nr=l;let vr,Dr,jr;function xr(){if(!Nr.document)return;const e=nr.bind(null,"dom"),t=Ir(e,!0);Nr.document.addEventListener("click",t,!1),Nr.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=Nr,r=n[t]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(R(r,"addEventListener",function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},s=r[n]=r[n]||{refCount:0};if(!s.handler){const r=Ir(e);s.handler=r,t.call(this,n,r,i)}s.refCount++}catch(e){}return t.call(this,n,r,i)}}),R(r,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,r)}}))})}function Ir(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch(e){return null}}(n);if(function(e,t){return"keypress"===e&&(!t?.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;Y(n,"_sentryCaptured",!0),r&&!r._sentryId&&Y(r,"_sentryId",W());const i="keypress"===n.type?"input":n.type;(function(e){if(e.type!==Dr)return!1;try{if(!e.target||e.target._sentryId!==jr)return!1}catch(e){}return!0})(n)||(e({event:n,name:i,global:t}),Dr=n.type,jr=r?r._sentryId:void 0),clearTimeout(vr),vr=Nr.setTimeout(()=>{jr=void 0,Dr=void 0},1e3)}}const Tr="__sentry_xhr_v3__";function wr(e){er("xhr",e),tr("xhr",zr)}function zr(){if(!Nr.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,i=1e3*ee(),s=N(n[0])?n[0].toUpperCase():void 0,o=function(e){if(N(e))return e;try{return e.toString()}catch{}}(n[1]);if(!s||!o)return e.apply(t,n);t[Tr]={method:s,url:o,request_headers:{}},"POST"===s&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[Tr];if(e&&4===t.readyState){try{e.status_code=t.status}catch(e){}nr("xhr",{endTimestamp:1e3*ee(),startTimestamp:i,xhr:t,virtualError:r})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(a(),e.apply(t,n))}):t.addEventListener("readystatechange",a),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,i]=n,s=t[Tr];return s&&N(r)&&N(i)&&(s.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[Tr];return r?(void 0!==n[0]&&(r.body=n[0]),nr("xhr",{startTimestamp:1e3*ee(),xhr:t}),e.apply(t,n)):e.apply(t,n)}})}let br;function Er(e){const t="history";er(t,e),tr(t,Ar)}function Ar(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const r=br,i=function(e){try{return new URL(e,Nr.location.origin).toString()}catch{return e}}(String(n));if(br=i,r===i)return e.apply(this,t);nr("history",{from:r,to:i})}return e.apply(this,t)}}Nr.addEventListener("popstate",()=>{const e=Nr.location.href,t=br;br=e,t!==e&&nr("history",{from:t,to:e})}),"history"in ir&&ir.history&&(R(Nr.history,"pushState",e),R(Nr.history,"replaceState",e))}const Sr="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Lr=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){var n;t.console&&function(e){const t="console";er(t,e),tr(t,rr)}(function(e){return function(t){if(ve()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:(r=t.level,"warn"===r?"warning":["fatal","error","warning","log","info","debug"].includes(r)?r:"log"),message:P(t.args," ")};var r;if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${P(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}hr(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(ve()!==e)return;let r,i,s="object"==typeof t?t.serializeAttribute:void 0,o="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;o&&o>1024&&(Sr&&C.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${o} was configured. Sentry will use 1024 instead.`),o=1024),"string"==typeof s&&(s=[s]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=E(t,{keyAttrs:s,maxStringLength:o}),i=L(t)}catch(e){r=""}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};i&&(a.data={"ui.component_name":i}),hr(a,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),er("dom",n),tr("dom",xr)),t.xhr&&wr(function(e){return function(t){if(ve()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[Tr];if(!n||!r||!i)return;const{method:s,url:o,status_code:a,body:c}=i,l={method:s,url:o,status_code:a},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:"xhr",data:l,type:"http",level:fr(a)};e.emit("beforeOutgoingRequestBreadcrumb",d,u),hr(d,u)}}(e)),t.fetch&&or(function(e){return function(t){if(ve()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.fetchData.method,t.fetchData.url,t.error){const i=t.fetchData,s={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},o={category:"fetch",data:i,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",o,s),hr(o,s)}else{const i=t.response,s={...t.fetchData,status_code:i?.status};t.fetchData.request_body_size,t.fetchData.response_body_size;const o={input:t.args,response:i,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:s,type:"http",level:fr(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",a,o),hr(a,o)}}}(e)),t.history&&Er(function(e){return function(t){if(ve()!==e)return;let n=t.from,r=t.to;const i=yr(Hn.location.href);let s=n?yr(n):void 0;const o=yr(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),hr({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){ve()===e&&hr({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:q(t)},{event:t})}}(e))}}},Or=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],_r=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&R(Hn,"setTimeout",kr),t.setInterval&&R(Hn,"setInterval",kr),t.requestAnimationFrame&&R(Hn,"requestAnimationFrame",Cr),t.XMLHttpRequest&&"XMLHttpRequest"in Hn&&R(XMLHttpRequest.prototype,"send",Qr);const e=t.eventTarget;e&&(Array.isArray(e)?e:Or).forEach(e=>function(e,t){const n=Hn,r=n[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(R(r,"addEventListener",function(n){return function(r,i,s){try{"function"==typeof i.handleEvent&&(i.handleEvent=qn(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:_t(i),target:e},handled:!1,type:"instrument"}}))}catch{}return t.unregisterOriginalCallbacks&&function(e,t,n){e&&"object"==typeof e&&"removeEventListener"in e&&"function"==typeof e.removeEventListener&&e.removeEventListener(t,n)}(this,r,i),n.apply(this,[r,qn(i,{mechanism:{data:{function:"addEventListener",handler:_t(i),target:e},handled:!1,type:"instrument"}}),s])}}),R(r,"removeEventListener",function(e){return function(t,n,r){try{const i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch(e){}return e.call(this,t,n,r)}}))}(e,t))}}};function kr(e){return function(...t){const n=t[0];return t[0]=qn(n,{mechanism:{data:{function:_t(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Cr(e){return function(t){return e.apply(this,[qn(t,{mechanism:{data:{function:"requestAnimationFrame",handler:_t(e)},handled:!1,type:"instrument"}})])}}function Qr(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&R(n,e,function(t){const n={mechanism:{data:{function:e,handler:_t(t)},handled:!1,type:"instrument"}},r=V(t);return r&&(n.mechanism.data.handler=_t(r)),qn(t,n)})}),e.apply(this,t)}}let Pr=null;function Ur(e){const t="error";er(t,e),tr(t,Rr)}function Rr(){Pr=l.onerror,l.onerror=function(e,t,n,r,i){return nr("error",{column:r,error:i,line:n,msg:e,url:t}),!!Pr&&Pr.apply(this,arguments)},l.onerror.__SENTRY_INSTRUMENTED__=!0}let Yr=null;function Fr(e){const t="unhandledrejection";er(t,e),tr(t,Vr)}function Vr(){Yr=l.onunhandledrejection,l.onunhandledrejection=function(e){return nr("unhandledrejection",e),!Yr||Yr.apply(this,arguments)},l.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Br=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(function(e){Ur(t=>{const{stackParser:n,attachStacktrace:r}=Hr();if(ve()!==e||Gn())return;const{msg:i,url:s,line:o,column:a,error:c}=t,l=function(e,t,n,r){const i=e.exception=e.exception||{},s=i.values=i.values||[],o=s[0]=s[0]||{},a=o.stacktrace=o.stacktrace||{},c=a.frames=a.frames||[],l=r,u=n,d=N(t)&&t.length>0?t:S();return 0===c.length&&c.push({colno:l,filename:d,function:bt,in_app:!0,lineno:u}),e}(Vn(n,c||i,void 0,r,!1),s,o,a);l.level="error",Yt(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}(e),$r("onerror")),t.onunhandledrejection&&(function(e){Fr(t=>{const{stackParser:n,attachStacktrace:r}=Hr();if(ve()!==e||Gn())return;const i=function(e){if(D(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}(t),s=D(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:Vn(n,i,void 0,r,!0);s.level="error",Yt(s,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}(e),$r("onunhandledrejection"))}}};function $r(e){Sr&&C.log(`Global Handler attached: ${e}`)}function Hr(){const e=ve();return e?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function Wr(e,t,n,r,i,s){if(!i.exception?.values||!s||!T(s.originalException,Error))return;const o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=Gr(e,t,r,s.originalException,n,i.exception.values,o,0))}function Gr(e,t,n,r,i,s,o,a){if(s.length>=n+1)return s;let c=[...s];if(T(r[i],Error)){qr(o,a);const s=e(t,r[i]),l=c.length;Zr(s,i,l,a),c=Gr(e,t,n,r[i],i,[s,...c],s,l)}return Array.isArray(r.errors)&&r.errors.forEach((r,s)=>{if(T(r,Error)){qr(o,a);const l=e(t,r),u=c.length;Zr(l,`errors[${s}]`,u,a),c=Gr(e,t,n,r,i,[l,...c],l,u)}}),c}function qr(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function Zr(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}const Jr=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,i){Wr(Cn,i.getOptions().stackParser,n,t,e,r)}}};function Kr(e,t,n,r){const i={filename:e,function:""===t?bt:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const Xr=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,ei=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ti=/\((\S*)(?::(\d+))(?::(\d+))\)/,ni=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ri=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ii=St([30,e=>{const t=Xr.exec(e);if(t){const[,e,n,r]=t;return Kr(e,bt,+n,+r)}const n=ei.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=ti.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=si(n[1]||bt,n[2]);return Kr(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{const t=ni.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=ri.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||bt;return[n,e]=si(n,e),Kr(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),si=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:bt,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},oi=Symbol.for("SentryBufferFullError");function ai(e,t,n=function(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(void 0===e||t.lengthn(i)).then(null,()=>n(i).then(null,()=>{})),i},drain:function(e){return new we((n,r)=>{let i=t.length;if(!i)return n(!0);const s=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{Ie(e).then(()=>{--i||(clearTimeout(s),n(!0))},r)})})}}}(e.bufferSize||64)){let r={};return{send:function(i){const s=[];if(pn(i,(t,n)=>{const i=yn(n);!function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)?s.push(t):e.recordDroppedEvent("ratelimit_backoff",i)}),0===s.length)return Ie({});const o=un(i[0],s),a=t=>{pn(o,(n,r)=>{e.recordDroppedEvent(t,yn(r))})};return n.add(()=>t({body:fn(o)}).then(e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&h&&C.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=function(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},s=n?.["x-sentry-rate-limits"],o=n?.["retry-after"];if(s)for(const e of s.trim().split(",")){const[t,n,,,s]=e.split(":",5),o=parseInt(t,10),a=1e3*(isNaN(o)?60:o);if(n)for(const e of n.split(";"))"metric_bucket"===e&&s&&!s.split(";").includes("custom")||(i[e]=r+a);else i.all=r+a}else o?i.all=r+function(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(o,r):429===t&&(i.all=r+6e4);return i}(r,e),e),e=>{throw a("network_error"),h&&C.error("Encountered error running transport request:",e),e})).then(e=>e,e=>{if(e===oi)return h&&C.error("Skipped sending event because buffer is full."),a("queue_overflow"),Ie({});throw e})},flush:e=>n.drain(e)}}const ci="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,li={};function ui(e){li[e]=void 0}function di(e,t=function(e){const t=li[e];if(t)return t;let n=Nr[e];if(sr(n))return li[e]=n.bind(Nr);const r=Nr.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const i=t.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){ci&&C.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n?li[e]=n.bind(Nr):n}("fetch")){let n=0,r=0;return ai(e,function(i){const s=i.body.length;n+=s,r++;const o={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return ui("fetch"),Te("No fetch implementation available");try{return t(e.url,o).then(e=>(n-=s,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}))}catch(e){return ui("fetch"),n-=s,r--,Te(e)}})}var pi=i(609),hi=i.t(pi,2);function fi(e){const t={...e};var n;return Sn(t,"react"),n={version:pi.version},ye().setContext("react",n),function(e={}){const t=!e.skipBrowserExtensionCheck&&!!function(){if(void 0===Hn.window)return!1;const e=Hn;if(e.nw)return!1;const t=e.chrome||e.browser;if(!t?.runtime?.id)return!1;const n=S();return!(Hn===Hn.top&&["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"].some(e=>n.startsWith(`${e}://`)))}()&&(Sr&&k(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0),n={...e,enabled:!t&&e.enabled,stackParser:(r=e.stackParser||ii,Array.isArray(r)?St(...r):r),integrations:Wt({integrations:e.integrations,defaultIntegrations:null==e.defaultIntegrations?[Xt(),sn(),_r(),Lr(),Br(),Jr(),on(),{name:"HttpContext",preprocessEvent(e){if(!Hn.navigator&&!Hn.location&&!Hn.document)return;const t=Zn(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}},{name:"BrowserSession",setupOnce(){void 0!==Hn.document?(Ft({ignoreDuration:!0}),$t(),Er(({from:e,to:t})=>{void 0!==e&&e!==t&&(Ft({ignoreDuration:!0}),$t())})):Sr&&C.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}]:e.defaultIntegrations}),transport:e.transport||di};var r;return function(e,t){!0===t.debug&&(h?C.enable():k(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Me().update(t.initialScope);const n=new e(t);return function(e){Me().setClient(e)}(n),n.init(),n}(Jn,n)}(t)}class mi{constructor(e={}){this._traceId=e.traceId||se(),this._spanId=e.spanId||oe()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}}function gi(e){if(!e||0===e.length)return;const t={};return e.forEach(e=>{const n=e.attributes||{},r=n[_e],i=n[ke];"string"==typeof r&&"number"==typeof i&&(t[e.name]={value:i,unit:r})}),t}class Mi{constructor(e={}){this._traceId=e.traceId||se(),this._spanId=e.spanId||oe(),this._startTime=e.startTimestamp||ee(),this._links=e.links,this._attributes={},this.setAttributes({[Le]:"manual",[Se]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._links?this._links.push(e):this._links=[e],this}addLinks(e){return this._links?this._links.push(...e):this._links=e,this}recordException(e,t){}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}setAttribute(e,t){return void 0===t?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._startTime=ot(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(be,"custom"),this}end(e){this._endTime||(this._endTime=ot(e),function(e){if(!h)return;const{description:t="< unknown name >",op:n="< unknown op >"}=ct(e),{spanId:r}=e.spanContext(),i=`[Tracing] Finishing "${n}" ${mt(e)===e?"root ":""}span "${t}" with ID ${r}`;C.log(i)}(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Se],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:ut(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Le],profile_id:this._attributes[Qe],exclusive_time:this._attributes[Pe],measurements:gi(this._events),is_segment:this._isStandaloneSpan&&mt(this)===this||void 0,segment_id:this._isStandaloneSpan?mt(this).spanContext().spanId:void 0,links:st(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){h&&C.log("[Tracing] Adding an event to span:",e);const r=yi(t)?t:n||ee(),i=yi(t)?{}:t||{},s={name:e,time:ot(r),attributes:i};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=ve();if(e&&e.emit("spanEnd",this),!this._isStandaloneSpan&&this!==mt(this))return;if(this._isStandaloneSpan)return void(this._sampled?function(e){const t=ve();if(!t)return;const n=e[1];n&&0!==n.length?t.sendEnvelope(e):t.recordDroppedEvent("before_send","span")}(function(e,t){const n=jt(e[0]),r=t?.getDsn(),i=t?.getOptions().tunnel,s={sent_at:(new Date).toISOString(),...function(e){return!!e.trace_id&&!!e.public_key}(n)&&{trace:n},...!!i&&r&&{dsn:He(r)}},o=t?.getOptions().beforeSendSpan,a=o?e=>{const t=ct(e);return o(t)||(Mt(),t)}:ct,c=[];for(const t of e){const e=a(t);e&&c.push(mn(e))}return un(s,c)}([this],e)):(h&&C.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span")));const t=this._convertSpanToTransaction();t&&(Ke(this).scope||Me()).captureEvent(t)}_convertSpanToTransaction(){if(!Ni(ct(this)))return;this._name||(h&&C.warn("Transaction has no name, falling back to ``."),this._name="");const{scope:e,isolationScope:t}=Ke(this),n=e?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(!0!==this._sampled)return;const r=ft(this).filter(e=>e!==this&&!function(e){return e instanceof Mi&&e.isStandaloneSpan()}(e)).map(e=>ct(e)).filter(Ni),i=this._attributes[be];delete this._attributes[Ce],r.forEach(e=>{delete e.data[Ce]});const s={contexts:{trace:rt(this)},spans:r.length>1e3?r.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,1e3):r,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:t,dynamicSamplingContext:jt(this)},request:n,...i&&{transaction_info:{source:i}}},o=gi(this._events);return o&&Object.keys(o).length&&(h&&C.log("[Measurements] Adding measurements to transaction event",JSON.stringify(o,void 0,2)),s.measurements=o),s}}function yi(e){return e&&"number"==typeof e||e instanceof Date||Array.isArray(e)}function Ni(e){return!!(e.start_timestamp&&e.timestamp&&e.span_id&&e.trace_id)}const vi="__SENTRY_SUPPRESS_TRACING__";function Di(e){const t=xi();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=function(e){const t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const n={...t};return n.startTimestamp=ot(e.startTime),delete n.startTime,n}return t}(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?t=>Ne(e.scope,t):void 0!==i?e=>ji(i,e):e=>e())(()=>{const t=Me(),i=function(e){const t=le(e);if(!t)return;const n=ve();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?mt(t):t}(t);return e.onlyIfParent&&!i?new mi:function({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Ge()){const r=new mi;return!n&&e||Nt(r,{sampled:"false",sample_rate:"0",transaction:t.name,...jt(r)}),r}const i=ye();let s;if(e&&!n)s=function(e,t,n){const{spanId:r,traceId:i}=e.spanContext(),s=!t.getScopeData().sdkProcessingMetadata[vi]&<(e),o=s?new Mi({...n,parentSpanId:r,traceId:i,sampled:s}):new mi({traceId:i});ht(e,o);const a=ve();return a&&(a.emit("spanStart",o),n.endTimestamp&&a.emit("spanEnd",o)),o}(e,r,t),ht(e,s);else if(e){const n=jt(e),{traceId:i,spanId:o}=e.spanContext(),a=lt(e);s=Ii({traceId:i,parentSpanId:o,...t},r,a),Nt(s,n)}else{const{traceId:e,dsc:n,parentSpanId:o,sampled:a}={...i.getPropagationContext(),...r.getPropagationContext()};s=Ii({traceId:e,parentSpanId:o,...t},r,a),n&&Nt(s,n)}return function(e){if(!h)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=ct(e),{spanId:i}=e.spanContext(),s=lt(e),o=mt(e),a=o===e,c=`[Tracing] Starting ${s?"sampled":"unsampled"} ${a?"root ":""}span`,l=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];if(r&&l.push(`parent ID: ${r}`),!a){const{op:e,description:t}=ct(o);l.push(`root ID: ${o.spanContext().spanId}`),e&&l.push(`root op: ${e}`),t&&l.push(`root description: ${t}`)}C.log(`${c}\n ${l.join("\n ")}`)}(s),function(e,t,n){e&&(Y(e,Je,n),Y(e,Ze,t))}(s,r,i),s}({parentSpan:i,spanArguments:n,forceTransaction:r,scope:t})})}function ji(e,t){const n=xi();return n.withActiveSpan?n.withActiveSpan(e,t):Ne(n=>(ce(n,e||void 0),t(n)))}function xi(){return ge(u())}function Ii(e,t,n){const r=ve(),i=r?.getOptions()||{},{name:s=""}=e,o={spanAttributes:{...e.attributes},spanName:s,parentSampled:n};r?.emit("beforeSampling",o,{decision:!1});const a=o.parentSampled??n,c=o.spanAttributes,l=t.getPropagationContext(),[u,d,p]=t.getScopeData().sdkProcessingMetadata[vi]?[!1]:function(e,t,n){if(!Ge(e))return[!1];let r,i;"function"==typeof e.tracesSampler?(i=e.tracesSampler({...t,inheritOrSampleWith:e=>"number"==typeof t.parentSampleRate?t.parentSampleRate:"boolean"==typeof t.parentSampled?Number(t.parentSampled):e}),r=!0):void 0!==t.parentSampled?i=t.parentSampled:void 0!==e.tracesSampleRate&&(i=e.tracesSampleRate,r=!0);const s=Xe(i);if(void 0===s)return h&&C.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),[!1];if(!s)return h&&C.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,s,r];const o=n{!i&&0===n.size&&o&&(s="idleTimeout",g.end(e))},c)}function N(e){r=setTimeout(()=>{!i&&o&&(s="heartbeatFailed",g.end(e))},u)}function v(e){i=!0,n.clear(),a.forEach(e=>e()),ce(f,m);const t=ct(g),{start_timestamp:r}=t;if(!r)return;t.data[Oe]||g.setAttribute(Oe,s),C.log(`[Tracing] Idle span "${t.op}" finished`);const o=ft(g).filter(e=>e!==g);let u=0;o.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:"cancelled"}),t.end(e),h&&C.log("[Tracing] Cancelling span since span ended early",JSON.stringify(t,void 0,2)));const n=ct(t),{timestamp:r=0,start_timestamp:i=0}=n,s=i<=e,o=r-i<=(l+c)/1e3;if(h){const e=JSON.stringify(t,void 0,2);s?o||C.log("[Tracing] Discarding span since it finished after idle span final timeout",e):C.log("[Tracing] Discarding span since it happened after idle span was finished",e)}o&&s||(function(e,t){e[dt]&&e[dt].delete(t)}(g,t),u++)}),u>0&&g.setAttribute("sentry.idle_span_discarded_spans",u)}return g.end=new Proxy(g.end,{apply(e,t,n){if(d&&d(g),t instanceof mi)return;const[r,...i]=n,s=ot(r||ee()),o=ft(g).filter(e=>e!==g);if(!o.length)return v(s),Reflect.apply(e,t,[s,...i]);const a=o.map(e=>ct(e).timestamp).filter(e=>!!e),c=a.length?Math.max(...a):void 0,u=ct(g).start_timestamp,p=Math.min(u?u+l/1e3:1/0,Math.max(u||-1/0,Math.min(s,c||1/0)));return v(p),Reflect.apply(e,t,[p,...i])}}),a.push(p.on("spanStart",e=>{var t;i||e===g||ct(e).timestamp||ft(g).includes(e)&&(t=e.spanContext().spanId,M(),n.set(t,!0),N(ee()+u/1e3))})),a.push(p.on("spanEnd",e=>{var t;i||(t=e.spanContext().spanId,n.has(t)&&n.delete(t),0===n.size&&y(ee()+c/1e3))})),a.push(p.on("idleSpanEnableAutoFinish",e=>{e===g&&(o=!0,y(),n.size&&N())})),t.disableAutoFinish||y(),setTimeout(()=>{i||(g.setStatus({code:2,message:"deadline_exceeded"}),s="finalTimeout",g.end())},l),g}let zi=!1;function bi(){const e=gt(),t=e&&mt(e);if(t){const e="internal_error";h&&C.log(`[Tracing] Root span: ${e} -> Global error occurred`),t.setStatus({code:2,message:e})}}bi.tag="sentry_tracingErrorCallback";const Ei=(e,t,n,r)=>{let i,s;return o=>{t.value>=0&&(o||r)&&(s=t.value-(i??0),(s||void 0===i)&&(i=t.value,t.delta=s,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},Ai=(e=!0)=>{const t=Nr.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart{const e=Ai();return e?.activationStart??0},Li=(e,t=-1)=>{const n=Ai();let r="navigate";return n&&(Nr.document?.prerendering||Si()>0?r="prerender":Nr.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},Oi=new WeakMap;function _i(e,t){return Oi.get(e)||Oi.set(e,new t),Oi.get(e)}class ki{constructor(){ki.prototype.__init.call(this),ki.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(e){if(e.hadRecentInput)return;const t=this._sessionEntries[0],n=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),this._onAfterProcessingUnexpectedShift?.(e)}}const Ci=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},Qi=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Pi=-1;const Ui=e=>{"hidden"===Nr.document.visibilityState&&Pi>-1&&(Pi="visibilitychange"===e.type?e.timeStamp:0,Ri())},Ri=()=>{removeEventListener("visibilitychange",Ui,!0),removeEventListener("prerenderingchange",Ui,!0)},Yi=()=>{if(Nr.document&&Pi<0){const e=Si(),t=Nr.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime;Pi=t??("hidden"!==Nr.document?.visibilityState||Nr.document?.prerendering?1/0:0),addEventListener("visibilitychange",Ui,!0),addEventListener("prerenderingchange",Ui,!0)}return{get firstHiddenTime(){return Pi}}},Fi=e=>{Nr.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},Vi=[1800,3e3],Bi=[.1,.25],$i=e=>{const t=t=>{"pagehide"!==t.type&&"hidden"!==Nr.document?.visibilityState||e(t)};Nr.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},Hi=[100,300];let Wi=0,Gi=1/0,qi=0;const Zi=e=>{e.forEach(e=>{e.interactionId&&(Gi=Math.min(Gi,e.interactionId),qi=Math.max(qi,e.interactionId),Wi=qi?(qi-Gi)/7+1:0)})};let Ji;const Ki=()=>Ji?Wi:performance.interactionCount||0,Xi=()=>{"interactionCount"in performance||Ji||(Ji=Ci("event",Zi,{type:"event",buffered:!0,durationThreshold:0}))};let es=0;class ts{constructor(){ts.prototype.__init.call(this),ts.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){es=Ki(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const e=Math.min(this._longestInteractionList.length-1,Math.floor((Ki()-es)/50));return this._longestInteractionList[e]}_processEntry(e){if(this._onBeforeProcessingEntry?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this._longestInteractionList.at(-1);let n=this._longestInteractionMap.get(e.interactionId);if(n||this._longestInteractionList.length<10||e.duration>t._latency){if(n?e.duration>n._latency?(n.entries=[e],n._latency=e.duration):e.duration===n._latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(n.id,n),this._longestInteractionList.push(n)),this._longestInteractionList.sort((e,t)=>t._latency-e._latency),this._longestInteractionList.length>10){const e=this._longestInteractionList.splice(10);for(const t of e)this._longestInteractionMap.delete(t.id)}this._onAfterProcessingINPCandidate?.(n)}}}const ns=e=>{const t=Nr.requestIdleCallback||Nr.setTimeout;"hidden"===Nr.document?.visibilityState?e():(t(e=Qi(e)),$i(e))},rs=[200,500];class is{_processEntry(e){this._onBeforeProcessingEntry?.(e)}}const ss=[2500,4e3],os=[800,1800],as=e=>{Nr.document?.prerendering?Fi(()=>as(e)):"complete"!==Nr.document?.readyState?addEventListener("load",()=>as(e),!0):setTimeout(e)},cs={},ls={};let us,ds,ps,hs,fs;function ms(e,t=!1){return xs("cls",e,ys,us,t)}function gs(e,t){return Is(e,t),ls[e]||(function(e){const t={};"event"===e&&(t.durationThreshold=0),Ci(e,t=>{Ms(e,{entries:t})},t)}(e),ls[e]=!0),Ts(e,t)}function Ms(e,t){const n=cs[e];if(n?.length)for(const r of n)try{r(t)}catch(t){ci&&C.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${_t(r)}\nError:`,t)}}function ys(){return((e,t={})=>{((e,t={})=>{Fi(()=>{const n=Yi(),r=Li("FCP");let i;const s=Ci("paint",e=>{for(const t of e)"first-contentful-paint"===t.name&&(s.disconnect(),t.startTime{const n=Li("CLS",0);let r;const i=_i(t,ki),s=e=>{for(const t of e)i._processEntry(t);i._sessionValue>n.value&&(n.value=i._sessionValue,n.entries=i._sessionEntries,r())},o=Ci("layout-shift",s);o&&(r=Ei(e,n,Bi,t.reportAllChanges),Nr.document?.addEventListener("visibilitychange",()=>{"hidden"===Nr.document?.visibilityState&&(s(o.takeRecords()),r(!0))}),Nr?.setTimeout?.(r))}))})(e=>{Ms("cls",{metric:e}),us=e},{reportAllChanges:!0})}function Ns(){return((e,t={})=>{Fi(()=>{const n=Yi(),r=Li("FID");let i;const s=e=>{e.startTime{e.forEach(s)},a=Ci("first-input",o);i=Ei(e,r,Hi,t.reportAllChanges),a&&$i(Qi(()=>{o(a.takeRecords()),a.disconnect()}))})})(e=>{Ms("fid",{metric:e}),ds=e})}function vs(){return((e,t={})=>{Fi(()=>{const n=Yi(),r=Li("LCP");let i;const s=_i(t,is),o=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)s._processEntry(t),t.startTime{o(a.takeRecords()),a.disconnect(),i(!0)});for(const e of["keydown","click","visibilitychange"])Nr.document&&addEventListener(e,()=>ns(n),{capture:!0,once:!0})}})})(e=>{Ms("lcp",{metric:e}),ps=e},{reportAllChanges:!0})}function Ds(){return((e,t={})=>{const n=Li("TTFB"),r=Ei(e,n,os,t.reportAllChanges);as(()=>{const e=Ai();e&&(n.value=Math.max(e.responseStart-Si(),0),n.entries=[e],r(!0))})})(e=>{Ms("ttfb",{metric:e}),hs=e})}function js(){return((e,t={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&Fi(()=>{Xi();const n=Li("INP");let r;const i=_i(t,ts),s=e=>{ns(()=>{for(const t of e)i._processEntry(t);const t=i._estimateP98LongestInteraction();t&&t._latency!==n.value&&(n.value=t._latency,n.entries=t.entries,r())})},o=Ci("event",s,{durationThreshold:t.durationThreshold??40});r=Ei(e,n,rs,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),$i(()=>{s(o.takeRecords()),r(!0)}))})})(e=>{Ms("inp",{metric:e}),fs=e})}function xs(e,t,n,r,i=!1){let s;return Is(e,t),ls[e]||(s=n(),ls[e]=!0),r&&t({metric:r}),Ts(e,t,i?s:void 0)}function Is(e,t){cs[e]=cs[e]||[],cs[e].push(t)}function Ts(e,t,n){return()=>{n&&n();const r=cs[e];if(!r)return;const i=r.indexOf(t);-1!==i&&r.splice(i,1)}}function ws(e){return"number"==typeof e&&isFinite(e)}function zs(e,t,n,{...r}){const i=ct(e).start_timestamp;return i&&i>t&&"function"==typeof e.updateStartTime&&e.updateStartTime(t),ji(e,()=>{const e=Di({startTime:t,...r});return e&&e.end(n),e})}function bs(e){const t=ve();if(!t)return;const{name:n,transaction:r,attributes:i,startTime:s}=e,{release:o,environment:a,sendDefaultPii:c}=t.getOptions(),l=t.getIntegrationByName("Replay"),u=l?.getReplayId(),d=Me(),p=d.getUser(),h=void 0!==p?p.email||p.id||p.ip_address:void 0;let f;try{f=d.getScopeData().contexts.profile.profile_id}catch{}return Di({name:n,attributes:{release:o,environment:a,user:h||void 0,profile_id:f||void 0,replay_id:u||void 0,transaction:r,"user_agent.original":Nr.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...i},startTime:s,experimental:{standalone:!0}})}function Es(){return Nr.addEventListener&&Nr.performance}function As(e){return e/1e3}function Ss(e){let t="unknown",n="unknown",r="";for(const i of e){if("/"===i){[t,n]=e.split("/");break}if(!isNaN(Number(i))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}let Ls,Os,_s=0,ks={};function Cs({recordClsStandaloneSpans:e}){const t=Es();if(t&&ne()){t.mark&&Nr.performance.mark("sentry-tracing-init");const n=xs("fid",({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=As(ne()),r=As(t.startTime);ks.fid={value:e.value,unit:"millisecond"},ks["mark.fid"]={value:n+r,unit:"second"}},Ns,ds),r=function(e,t=!1){return xs("lcp",e,vs,ps,t)}(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(ks.lcp={value:e.value,unit:"millisecond"},Ls=t)},!0),i=xs("ttfb",({metric:e})=>{e.entries[e.entries.length-1]&&(ks.ttfb={value:e.value,unit:"millisecond"})},Ds,hs),s=e?function(){let e,t,n=0;if(!function(){try{return PerformanceObserver.supportedEntryTypes.includes("layout-shift")}catch{return!1}}())return;let r=!1;function i(){r||(r=!0,t&&function(e,t,n){ci&&C.log(`Sending CLS span (${e})`);const r=As((ne()||0)+(t?.startTime||0)),i=Me().getScopeData().transactionName,s=bs({name:t?E(t.sources[0]?.node):"Layout shift",transaction:i,attributes:{[Le]:"auto.http.browser.cls",[Se]:"ui.webvital.cls",[Pe]:t?.duration||0,"sentry.pageload.span_id":n},startTime:r});s&&(s.addEvent("cls",{[_e]:"",[ke]:e}),s.end(r))}(n,e,t),s())}const s=ms(({metric:t})=>{const r=t.entries[t.entries.length-1];r&&(n=t.value,e=r)},!0);$i(()=>{i()}),setTimeout(()=>{const e=ve();if(!e)return;const n=e.on("startNavigationSpan",()=>{i(),n?.()}),r=gt();if(r){const e=mt(r);"pageload"===ct(e).op&&(t=e.spanContext().spanId)}},0)}():ms(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(ks.cls={value:e.value,unit:""},Os=t)},!0);return()=>{n(),r(),i(),s?.()}}return()=>{}}function Qs(e,t,n,r,i=n){const s=function(e){return"secureConnection"===e?"connectEnd":"fetch"===e?"domainLookupStart":`${e}End`}(n),o=t[s],a=t[`${n}Start`];a&&o&&zs(e,r+As(a),r+As(o),{op:`browser.${i}`,name:t.name,attributes:{[Le]:"auto.ui.browser.metrics",..."redirect"===n&&null!=t.redirectCount?{"http.redirect_count":t.redirectCount}:{}}})}function Ps(e,t,n,r){const i=t[n];null!=i&&i<2147483647&&(e[r]=i)}const Us=[],Rs=new Map;const Ys={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"},Fs=({metric:e})=>{if(null==e.value)return;const t=As(e.value);if(t>60)return;const n=e.entries.find(t=>t.duration===e.value&&Ys[t.name]);if(!n)return;const{interactionId:r}=n,i=Ys[n.name],s=As(ne()+n.startTime),o=gt(),a=o?mt(o):void 0,c=(null!=r?Rs.get(r):void 0)||a,l=c?ct(c).description:Me().getScopeData().transactionName,u=bs({name:E(n.target),transaction:l,attributes:{[Le]:"auto.http.browser.inp",[Se]:`ui.interaction.${i}`,[Pe]:n.duration},startTime:s});u&&(u.addEvent("inp",{[_e]:"millisecond",[ke]:e.value}),u.end(s+t))},Vs="sentry_previous_trace";function Bs(e){return 1===e.traceFlags}function $s(e={}){const t=e.client||ve();if(!function(){const e=ve();return!1!==e?.getOptions().enabled&&!!e?.getTransport()}()||!t)return{};const n=ge(u());if(n.getTraceData)return n.getTraceData(e);const r=e.scope||Me(),i=e.span||gt(),s=i?function(e){const{traceId:t,spanId:n}=e.spanContext();return tt(t,n,lt(e))}(i):function(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return tt(t,r,n)}(r),o=function(e){if(e)return function(e){if(0!==Object.keys(e).length)return Object.entries(e).reduce((e,[t,n],r)=>{const i=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,s=0===r?i:`${e},${i}`;return s.length>8192?(h&&C.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):s},"")}(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${Re}${t}`]=n),e),{}))}(i?jt(i):Dt(t,r));return et.test(s)?{"sentry-trace":s,baggage:o}:(C.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function Hs(e){return e.split(",").some(e=>e.trim().startsWith(Re))}function Ws(e,t,n,r){const i={url:e,type:"fetch","http.method":n,[Le]:r,[Se]:"http.client"};return t&&(mr(t)||(i["http.url"]=t.href,i["server.address"]=t.host),t.search&&(i["http.query"]=t.search),t.hash&&(i["http.fragment"]=t.hash)),i}const Gs=new WeakMap,qs=new Map,Zs={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Js(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:i,shouldCreateSpanForRequest:s,enableHTTPTimings:o,tracePropagationTargets:a,onRequestSpanStart:c}={...Zs,...t},l="function"==typeof s?s:e=>!0,u=e=>function(e,t){const n=S();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch(e){return!1}const s=r.origin===i;return t?U(r.toString(),t)||s&&U(r.pathname,t):s}{const n=!!e.match(/^\/(?!\/)/);return t?U(e,t):n}}(e,a),d={};n&&(e.addEventProcessor(e=>("transaction"===e.type&&e.spans&&e.spans.forEach(e=>{if("http.client"===e.op){const t=qs.get(e.span_id);t&&(e.timestamp=t/1e3,qs.delete(e.span_id))}}),e)),i&&function(){const e="fetch-body-resolved";er(e,e=>{if(e.response){const t=Gs.get(e.response);t&&e.endTimestamp&&qs.set(t,e.endTimestamp)}}),tr(e,()=>ar(cr))}(),or(e=>{const t=function(e,t,n,r,i="auto.http.browser"){if(!e.fetchData)return;const{method:s,url:o}=e.fetchData,a=Ge()&&t(o);if(e.endTimestamp&&a){const t=e.fetchData.__span;if(!t)return;const n=r[t];return void(n&&(function(e,t){if(t.response){qe(e,t.response.status);const n=t.response?.headers&&t.response.headers.get("content-length");if(n){const t=parseInt(n);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus({code:2,message:"internal_error"});e.end()}(n,e),delete r[t]))}const c=!!gt(),l=a&&c?Di(function(e,t,n){const r=gr(e);return{name:r?`${t} ${Mr(r)}`:t,attributes:Ws(e,r,t,n)}}(o,s,i)):new mi;if(e.fetchData.__span=l.spanContext().spanId,r[l.spanContext().spanId]=l,n(e.fetchData.url)){const t=e.args[0],n=e.args[1]||{},r=function(e,t,n){const r=$s({span:n}),i=r["sentry-trace"],s=r.baggage;if(!i)return;const o=t.headers||(z(e)?e.headers:void 0);if(o){if(function(e){return"undefined"!=typeof Headers&&T(e,Headers)}(o)){const e=new Headers(o);if(e.get("sentry-trace")||e.set("sentry-trace",i),s){const t=e.get("baggage");t?Hs(t)||e.set("baggage",`${t},${s}`):e.set("baggage",s)}return e}if(Array.isArray(o)){const e=[...o];o.find(e=>"sentry-trace"===e[0])||e.push(["sentry-trace",i]);const t=o.find(e=>"baggage"===e[0]&&Hs(e[1]));return s&&!t&&e.push(["baggage",s]),e}{const e="sentry-trace"in o?o["sentry-trace"]:void 0,t="baggage"in o?o.baggage:void 0,n=t?Array.isArray(t)?[...t]:[t]:[],r=t&&(Array.isArray(t)?t.find(e=>Hs(e)):Hs(t));return s&&!r&&n.push(s),{...o,"sentry-trace":e??i,baggage:n.length>0?n.join(","):void 0}}}return{...r}}(t,n,Ge()&&c?l:void 0);r&&(e.args[1]=n,n.headers=r)}const u=ve();if(u){const t={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};u.emit("beforeOutgoingRequestSpan",l,t)}return l}(e,l,u,d);if(e.response&&e.fetchData.__span&&Gs.set(e.response,e.fetchData.__span),t){const n=eo(e.fetchData.url),r=n?yr(n).host:void 0;t.setAttributes({"http.url":n,"server.address":r}),o&&Ks(t),c?.(t,{headers:e.headers})}})),r&&wr(e=>{const t=function(e,t,n,r){const i=e.xhr,s=i?.[Tr];if(!i||i.__sentry_own_request__||!s)return;const{url:o,method:a}=s,c=Ge()&&t(o);if(e.endTimestamp&&c){const e=i.__sentry_xhr_span_id__;if(!e)return;const t=r[e];return void(t&&void 0!==s.status_code&&(qe(t,s.status_code),t.end(),delete r[e]))}const l=eo(o),u=yr(l||o),d=o.split(/[?#]/,1)[0],p=!!gt(),h=c&&p?Di({name:`${a} ${d}`,attributes:{url:o,type:"xhr","http.method":a,"http.url":l,"server.address":u?.host,[Le]:"auto.http.browser",[Se]:"http.client",...u?.search&&{"http.query":u?.search},...u?.hash&&{"http.fragment":u?.hash}}}):new mi;i.__sentry_xhr_span_id__=h.spanContext().spanId,r[i.__sentry_xhr_span_id__]=h,n(o)&&function(e,t){const{"sentry-trace":n,baggage:r}=$s({span:t});n&&function(e,t,n){const r=e.__sentry_xhr_v3__?.request_headers;if(!r?.["sentry-trace"])try{if(e.setRequestHeader("sentry-trace",t),n){const t=r?.baggage;t&&t.split(",").some(e=>e.trim().startsWith("sentry-"))||e.setRequestHeader("baggage",n)}}catch(e){}}(e,n,r)}(i,Ge()&&p?h:void 0);const f=ve();return f&&f.emit("beforeOutgoingRequestSpan",h,e),h}(e,l,u,d);if(t){let n;o&&Ks(t);try{n=new Headers(e.xhr.__sentry_xhr_v3__?.request_headers)}catch{}c?.(t,{headers:n})}})}function Ks(e){const{url:t}=ct(e).data;if(!t||"string"!=typeof t)return;const n=gs("resource",({entries:r})=>{r.forEach(r=>{(function(e){return"resource"===e.entryType&&"initiatorType"in e&&"string"==typeof e.nextHopProtocol&&("fetch"===e.initiatorType||"xmlhttprequest"===e.initiatorType)})(r)&&r.name.endsWith(t)&&(function(e){const{name:t,version:n}=Ss(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),ne()?[...r,["http.request.redirect_start",Xs(e.redirectStart)],["http.request.fetch_start",Xs(e.fetchStart)],["http.request.domain_lookup_start",Xs(e.domainLookupStart)],["http.request.domain_lookup_end",Xs(e.domainLookupEnd)],["http.request.connect_start",Xs(e.connectStart)],["http.request.secure_connection_start",Xs(e.secureConnectionStart)],["http.request.connection_end",Xs(e.connectEnd)],["http.request.request_start",Xs(e.requestStart)],["http.request.response_start",Xs(e.responseStart)],["http.request.response_end",Xs(e.responseEnd)]]:r}(r).forEach(t=>e.setAttribute(...t)),setTimeout(n))})})}function Xs(e=0){return((ne()||performance.timeOrigin)+e)/1e3}function eo(e){try{return new URL(e,Hn.location.origin).href}catch{return}}const to={...Ti,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],linkPreviousTrace:"in-memory",consistentTraceSampling:!1,_experiments:{},...Zs},no=(e={})=>{const t={name:void 0,source:void 0},n=Hn.document,{enableInp:r,enableLongTask:i,enableLongAnimationFrame:s,_experiments:{enableInteractions:o,enableStandaloneClsSpans:a},beforeStartSpan:c,idleTimeout:u,finalTimeout:d,childSpanTimeout:p,markBackgroundSpan:f,traceFetch:m,traceXHR:g,trackFetchStreamPerformance:M,shouldCreateSpanForRequest:y,enableHTTPTimings:N,ignoreResourceSpans:v,ignorePerformanceApiSpans:j,instrumentPageLoad:x,instrumentNavigation:I,linkPreviousTrace:T,consistentTraceSampling:w,onRequestSpanStart:z}={...to,...e};let b;function A(e,r){const i="pageload"===r.op,s=c?c(r):r,o=s.attributes||{};r.name!==s.name&&(o[be]="custom",s.attributes=o),t.name=s.name,t.source=o[be];const l=wi(s,{idleTimeout:u,finalTimeout:d,childSpanTimeout:p,disableAutoFinish:i,beforeSpanEnd:t=>{b?.(),function(e,t){const n=Es(),r=ne();if(!n?.getEntries||!r)return;const i=As(r),s=n.getEntries(),{op:o,start_timestamp:a}=ct(e);if(s.slice(_s).forEach(n=>{const r=As(n.startTime),s=As(Math.max(0,n.duration));if(!("navigation"===o&&a&&i+r{Qs(e,t,r,n)}),Qs(e,t,"secureConnection",n,"TLS/SSL"),Qs(e,t,"fetch",n,"cache"),Qs(e,t,"domainLookup",n,"DNS"),function(e,t,n){const r=n+As(t.requestStart),i=n+As(t.responseEnd),s=n+As(t.responseStart);t.responseEnd&&(zs(e,r,i,{op:"browser.request",name:t.name,attributes:{[Le]:"auto.ui.browser.metrics"}}),zs(e,s,i,{op:"browser.response",name:t.name,attributes:{[Le]:"auto.ui.browser.metrics"}}))}(e,t,n)}(e,n,i);break;case"mark":case"paint":case"measure":{!function(e,t,n,r,i,s){if(["mark","measure"].includes(t.entryType)&&U(t.name,s))return;const o=Ai(!1),a=As(o?o.requestStart:0),c=i+Math.max(n,a),l=i+n,u=l+r,d={[Le]:"auto.resource.browser.metrics"};c!==l&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=c),function(e,t){try{const n=t.detail;if(!n)return;if("object"==typeof n){for(const[t,r]of Object.entries(n))if(r&&D(r))e[`sentry.browser.measure.detail.${t}`]=r;else if(void 0!==r)try{e[`sentry.browser.measure.detail.${t}`]=JSON.stringify(r)}catch{}return}if(D(n))return void(e["sentry.browser.measure.detail"]=n);try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}(d,t),c<=u&&zs(e,c,u,{name:t.name,op:t.entryType,attributes:d})}(e,n,r,s,i,t.ignorePerformanceApiSpans);const o=Yi(),a=n.startTime{!function(e,t,n,r=gt()){const i=r&&mt(r);i&&(h&&C.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),i.addEvent(e,{[ke]:t,[_e]:n}))}(e,t.value,t.unit)}),e.setAttribute("performance.timeOrigin",i),e.setAttribute("performance.activationStart",Si()),function(e){Ls&&(Ls.element&&e.setAttribute("lcp.element",E(Ls.element)),Ls.id&&e.setAttribute("lcp.id",Ls.id),Ls.url&&e.setAttribute("lcp.url",Ls.url.trim().slice(0,200)),null!=Ls.loadTime&&e.setAttribute("lcp.loadTime",Ls.loadTime),null!=Ls.renderTime&&e.setAttribute("lcp.renderTime",Ls.renderTime),e.setAttribute("lcp.size",Ls.size)),Os?.sources&&Os.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,E(t.node)))}(e)}Ls=void 0,Os=void 0,ks={}}(t,{recordClsOnPageloadSpan:!a,ignoreResourceSpans:v,ignorePerformanceApiSpans:j}),oo(e,void 0);const n=Me(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:l.spanContext().traceId,sampled:lt(l),dsc:jt(t)})}});function f(){n&&["interactive","complete"].includes(n.readyState)&&e.emit("idleSpanEnableAutoFinish",l)}oo(e,l),i&&n&&(n.addEventListener("readystatechange",()=>{f()}),f())}return{name:"BrowserTracing",setup(e){function t(){const t=so(e);t&&!ct(t).timestamp&&(Sr&&C.log(`[Tracing] Finishing current active span with op: ${ct(t).op}`),t.setAttribute(Oe,"cancelled"),t.end())}zi||(zi=!0,Ur(bi),Fr(bi)),b=Cs({recordClsStandaloneSpans:a||!1}),r&&function(){if(Es()&&ne()){const e=xs("inp",Fs,js,fs);return()=>{e()}}}(),s&&l.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?new PerformanceObserver(e=>{const t=gt();if(t)for(const n of e.getEntries()){if(!n.scripts[0])continue;const e=As(ne()+n.startTime),{start_timestamp:r,op:i}=ct(t);if("navigation"===i&&r&&e{const t=gt();if(!t)return;const{op:n,start_timestamp:r}=ct(t);for(const i of e){const e=As(ne()+i.startTime),s=As(i.duration);"navigation"===n&&r&&e{const t=gt();if(t)for(const n of e)if("click"===n.name){const e=As(ne()+n.startTime),r=As(n.duration),i={name:E(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[Le]:"auto.ui.browser.metrics"}},s=L(n.target);s&&(i.attributes["ui.component_name"]=s),zs(t,e,e+r,i)}}),e.on("startNavigationSpan",n=>{if(ve()!==e)return;t(),ye().setPropagationContext({traceId:se(),sampleRand:Math.random()});const r=Me();r.setPropagationContext({traceId:se(),sampleRand:Math.random()}),r.setSDKProcessingMetadata({normalizedRequest:void 0}),A(e,{op:"navigation",...n})}),e.on("startPageLoadSpan",(n,r={})=>{if(ve()!==e)return;t();const i=function(e,t){const n=function(e){if(!e)return;const t=e.match(et);if(!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}(e),r=Fe(t);if(!n?.traceId)return{traceId:se(),sampleRand:Math.random()};const i=function(e,t){const n=Xe(t?.sample_rand);if(void 0!==n)return n;const r=Xe(t?.sample_rate);return r&&void 0!==e?.parentSampled?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}(n,r);r&&(r.sample_rand=i.toString());const{traceId:s,parentSpanId:o,parentSampled:a}=n;return{traceId:s,parentSpanId:o,sampled:a,dsc:r||{},sampleRand:i}}(r.sentryTrace||ro("sentry-trace"),r.baggage||ro("baggage")),s=Me();s.setPropagationContext(i),s.setSDKProcessingMetadata({normalizedRequest:Zn()}),A(e,{op:"pageload",...n})})},afterAllSetup(e){let n=S();if("off"!==T&&function(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r="session-storage"===t;let i=r?function(){try{const e=Hn.sessionStorage?.getItem(Vs);return JSON.parse(e)}catch(e){return}}():void 0;e.on("spanStart",e=>{if(mt(e)!==e)return;const t=Me().getPropagationContext();i=function(e,t,n){const r=ct(t),i={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:function(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[Ee])}catch{return 0}}(),sampleRand:n.sampleRand};if(!e)return i;const s=e.spanContext;return s.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=3600&&(Sr&&C.info(`Adding previous_trace ${s} link to span ${{op:r.op,...t.spanContext()}}`),t.addLink({context:s,attributes:{[Ue]:"previous_trace"}}),t.setAttribute("sentry.previous_trace",`${s.traceId}-${s.spanId}-${Bs(s)?1:0}`)),i)}(i,e,t),r&&function(e){try{Hn.sessionStorage.setItem(Vs,JSON.stringify(e))}catch(e){Sr&&C.warn("Could not store previous trace in sessionStorage",e)}}(i)});let s=!0;n&&e.on("beforeSampling",e=>{if(!i)return;const t=Me(),n=t.getPropagationContext();s&&n.parentSpanId?s=!1:(t.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(i.sampleRate),sampled:String(Bs(i.spanContext))},sampleRand:i.sampleRand}),e.parentSampled=Bs(i.spanContext),e.parentSampleRate=i.sampleRate,e.spanAttributes={...e.spanAttributes,[Ae]:i.sampleRate})})}(e,{linkPreviousTrace:T,consistentTraceSampling:w}),Hn.location){if(x){const t=ne();!function(e,t){e.emit("startPageLoadSpan",t,void 0),Me().setTransactionName(t.name),so(e)}(e,{name:Hn.location.pathname,startTime:t?t/1e3:void 0,attributes:{[be]:"url",[Le]:"auto.pageload.browser"}})}I&&Er(({to:t,from:r})=>{if(void 0===r&&-1!==n?.indexOf(t))return void(n=void 0);n=void 0;const i=gr(t);!function(e,t){e.emit("startNavigationSpan",t),Me().setTransactionName(t.name),so(e)}(e,{name:i?.pathname||Hn.location.pathname,attributes:{[be]:"url",[Le]:"auto.navigation.browser"}}),Me().setSDKProcessingMetadata({normalizedRequest:{...Zn(),url:t}})})}f&&(Hn.document?Hn.document.addEventListener("visibilitychange",()=>{const e=gt();if(!e)return;const t=mt(e);if(Hn.document.hidden&&t){const e="cancelled",{op:n,status:r}=ct(t);Sr&&C.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus({code:2,message:e}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):Sr&&C.warn("[Tracing] Could not set up background tab detection due to lack of global document")),o&&function(e,t,n,r,i){let s;Hn.document&&addEventListener("click",()=>{const o="ui.action.click",a=so(e);if(a){const e=ct(a).op;if(["navigation","pageload"].includes(e))return void(Sr&&C.warn(`[Tracing] Did not create ${o} span because a pageload or navigation span is in progress.`))}s&&(s.setAttribute(Oe,"interactionInterrupted"),s.end(),s=void 0),i.name?s=wi({name:i.name,op:o,attributes:{[be]:i.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r}):Sr&&C.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`)},{once:!1,capture:!0})}(e,u,d,p,t),r&&function(){const e=({entries:e})=>{const t=gt(),n=t&&mt(t);e.forEach(e=>{if(!function(e){return"duration"in e}(e)||!n)return;const t=e.interactionId;if(null!=t&&!Rs.has(t)){if(Us.length>10){const e=Us.shift();Rs.delete(e)}Us.push(t),Rs.set(t,n)}})};gs("event",e),gs("first-input",e)}(),Js(e,{traceFetch:m,traceXHR:g,trackFetchStreamPerformance:M,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:y,enableHTTPTimings:N,onRequestSpanStart:z})}}};function ro(e){const t=Hn.document,n=t?.querySelector(`meta[name=${e}]`);return n?.getAttribute("content")||void 0}const io="_sentry_idleSpan";function so(e){return e[io]}function oo(e,t){Y(e,io,t)}const ao=window.wp.apiFetch;var co=i.n(ao);const lo=window.wp.url;var uo;const po=window.nfdOnboarding.runtime.adminUrl,ho=(window.nfdOnboarding.runtime.siteUrl,window.nfdOnboarding.runtime.restUrl),fo=(0,lo.addQueryArgs)(`${po}index.php`,window.nfdOnboarding.runtime.currentBrand?.dashboardRedirectParams),mo=`${po}site-editor.php?referrer=nfd-onboarding&canvas=edit`,go=null!==(uo=(0,lo.addQueryArgs)(window.nfdOnboarding.runtime.currentBrand?.pluginDashboardPage,window.nfdOnboarding.runtime.currentBrand?.dashboardRedirectParams))&&void 0!==uo?uo:fo,Mo=async function(e){const t={body:null,error:null};try{t.body=await e}catch(e){t.error=e}return t},yo=`${ho}/newfold-migration/v1`,No=e=>`${yo}/${e}`,vo=`${ho}/newfold-onboarding/v1`,Do=e=>`${vo}/${e}`,jo=async e=>await Mo(co()({url:Do("app/complete"),method:"POST",body:JSON.stringify({selected_sitegen_homepage:e})}).then());async function xo(e,t,n,r=!0){return await Mo(co()({url:Do("sitegen/generate"),method:"POST",data:{site_info:t,identifier:e,locale:n,skip_cache:r}}))}const Io=`${ho}/wp/v2`,To="onboarding_complete",wo="onboarding_restarted",zo="onboarding_top_priority_set",bo="onboarding_step_skipped",Eo="primary_type_set",Ao="secondary_type_set",So="experience_level_set",Lo="theme_style_selected",Oo="colors_selected",_o="fonts_selected",ko="header_selected",Co="homepage_layout_selected",Qo="starter_pages_selected",Po="feature_added",Uo="site_title_set",Ro="tagline_set",Yo="onboarding_exited",Fo="onboarding_chapter_started",Vo="onboarding_chapter_complete",Bo="social_added",$o="migration_initiated",Ho="mfe_migration_initiated",Wo="exp_fork_diy_mar25",Go="fork_option_selected",qo="site_details_prompt_set",Zo="social_connected",Jo="homepage_selected",Ko="homepage_preview_failed",Xo="homepage_regenerated",ea="homepage_favorited",ta="homepage_renamed",na="site_pages_generation_failed",ra="canvas_customize_selected",ia="canvas_publish_selected",sa="sidebar_opened",oa="site_generation_time",aa="error_state_triggered",ca="wonder_start",la={[zo]:"top_priority",[bo]:"step",[Eo]:"primary_type",[Ao]:"secondary_type",[So]:"experience_level",[Lo]:"theme_style",[Oo]:"color_palette",[_o]:"font_set",[ko]:"header",[Co]:"layout",[Qo]:"pages",[Po]:"feature",[Uo]:"title",[Ro]:"tagline",[Yo]:"step",[Fo]:"chapter",[Vo]:"chapter",[Bo]:"platform",[Go]:"flow",[qo]:"prompt",[Zo]:"platform",[Jo]:"version",[Ko]:"version",[Xo]:"version",[ea]:"version",[na]:"version",[ra]:"version",[ia]:"version",[sa]:"type",[ta]:"version",[oa]:"time",[$o]:"path",[Ho]:"path",[aa]:"identifier",[wo]:"location",[Wo]:"value"};i(232);var ua="popstate";function da(e={}){return function(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a="POP",c=null,l=u();function u(){return(o.state||{idx:null}).idx}function d(){a="POP";let e=u(),t=null==e?null:e-l;l=e,c&&c({action:a,location:h.location,delta:t})}function p(e){return function(e,t=!1){let n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),pa(n,"No window.location.(origin|href) available to create URL");let r="string"==typeof e?e:ga(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}(e)}null==l&&(l=0,o.replaceState({...o.state,idx:l},""));let h={get action(){return a},get location(){return e(i,o)},listen(e){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(ua,d),c=e,()=>{i.removeEventListener(ua,d),c=null}},createHref:e=>t(i,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){a="PUSH";let r=ma(h.location,e,t);n&&n(r,e),l=u()+1;let d=fa(r,l),p=h.createHref(r);try{o.pushState(d,"",p)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;i.location.assign(p)}s&&c&&c({action:a,location:h.location,delta:1})},replace:function(e,t){a="REPLACE";let r=ma(h.location,e,t);n&&n(r,e),l=u();let i=fa(r,l),d=h.createHref(r);o.replaceState(i,"",d),s&&c&&c({action:a,location:h.location,delta:0})},go:e=>o.go(e)};return h}(function(e,t){let{pathname:n="/",search:r="",hash:i=""}=Ma(e.location.hash.substring(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),ma("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:ga(t))},function(e,t){ha("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)},e)}function pa(e,t){if(!1===e||null==e)throw new Error(t)}function ha(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function fa(e,t){return{usr:e.state,key:e.key,idx:t}}function ma(e,t,n=null,r){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?Ma(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)}}function ga({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function Ma(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ya(e,t,n="/"){return function(e,t,n,r){let i=La(("string"==typeof t?Ma(t):t).pathname||"/",n);if(null==i)return null;let s=Na(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(s);let o=null;for(let e=0;null==o&&e{let o={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};o.relativePath.startsWith("/")&&(pa(o.relativePath.startsWith(r),`Absolute route path "${o.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),o.relativePath=o.relativePath.slice(r.length));let a=Ca([r,o.relativePath]),c=n.concat(o);e.children&&e.children.length>0&&(pa(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${a}".`),Na(e.children,t,c,a)),(null!=e.path||e.index)&&t.push({path:a,score:ba(a,e.index),routesMeta:c})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of va(e.path))i(e,t,n);else i(e,t)}),t}function va(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(0===r.length)return i?[s,""]:[s];let o=va(r.join("/")),a=[];return a.push(...o.map(e=>""===e?s:[s,e].join("/"))),i&&a.push(...o),a.map(t=>e.startsWith("/")&&""===t?"/":t)}new WeakMap;var Da=/^:[\w-]+$/,ja=3,xa=2,Ia=1,Ta=10,wa=-2,za=e=>"*"===e;function ba(e,t){let n=e.split("/"),r=n.length;return n.some(za)&&(r+=wa),t&&(r+=xa),n.filter(e=>!za(e)).reduce((e,t)=>e+(Da.test(t)?ja:""===t?Ia:Ta),r)}function Ea(e,t,n=!1){let{routesMeta:r}=e,i={},s="/",o=[];for(let e=0;e(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=a[r]||"";o=s.slice(0,s.length-e.length).replace(/(.)\/+$/,"$1")}const i=a[r];return e[t]=n&&!i?void 0:(i||"").replace(/%2F/g,"/"),e},{}),pathname:s,pathnameBase:o,pattern:e}}function Sa(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return ha(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function La(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function Oa(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function _a(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function ka(e,t,n,r=!1){let i;"string"==typeof e?i=Ma(e):(i={...e},pa(!i.pathname||!i.pathname.includes("?"),Oa("?","pathname","search",i)),pa(!i.pathname||!i.pathname.includes("#"),Oa("#","pathname","hash",i)),pa(!i.search||!i.search.includes("#"),Oa("#","search","hash",i)));let s,o=""===e||""===i.pathname,a=o?"/":i.pathname;if(null==a)s=n;else{let e=t.length-1;if(!r&&a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}s=e>=0?t[e]:"/"}let c=function(e,t="/"){let{pathname:n,search:r="",hash:i=""}="string"==typeof e?Ma(e):e,s=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:s,search:Pa(r),hash:Ua(i)}}(i,s),l=a&&"/"!==a&&a.endsWith("/"),u=(o||"."===a)&&n.endsWith("/");return c.pathname.endsWith("/")||!l&&!u||(c.pathname+="/"),c}var Ca=e=>e.join("/").replace(/\/\/+/g,"/"),Qa=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Pa=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Ua=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";function Ra(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}var Ya=["POST","PUT","PATCH","DELETE"],Fa=(new Set(Ya),["GET",...Ya]);new Set(Fa),Symbol("ResetLoaderData");var Va=pi.createContext(null);Va.displayName="DataRouter";var Ba=pi.createContext(null);Ba.displayName="DataRouterState";var $a=pi.createContext({isTransitioning:!1});$a.displayName="ViewTransition",pi.createContext(new Map).displayName="Fetchers",pi.createContext(null).displayName="Await";var Ha=pi.createContext(null);Ha.displayName="Navigation";var Wa=pi.createContext(null);Wa.displayName="Location";var Ga=pi.createContext({outlet:null,matches:[],isDataRoute:!1});Ga.displayName="Route";var qa=pi.createContext(null);function Za(){return null!=pi.useContext(Wa)}function Ja(){return pa(Za(),"useLocation() may be used only in the context of a component."),pi.useContext(Wa).location}qa.displayName="RouteError";var Ka="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Xa(e){pi.useContext(Ha).static||pi.useLayoutEffect(e)}function ec(){let{isDataRoute:e}=pi.useContext(Ga);return e?function(){let{router:e}=function(e){let t=pi.useContext(Va);return pa(t,ac(e)),t}("useNavigate"),t=cc("useNavigate"),n=pi.useRef(!1);return Xa(()=>{n.current=!0}),pi.useCallback(async(r,i={})=>{ha(n.current,Ka),n.current&&("number"==typeof r?e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}():function(){pa(Za(),"useNavigate() may be used only in the context of a component.");let e=pi.useContext(Va),{basename:t,navigator:n}=pi.useContext(Ha),{matches:r}=pi.useContext(Ga),{pathname:i}=Ja(),s=JSON.stringify(_a(r)),o=pi.useRef(!1);return Xa(()=>{o.current=!0}),pi.useCallback((r,a={})=>{if(ha(o.current,Ka),!o.current)return;if("number"==typeof r)return void n.go(r);let c=ka(r,JSON.parse(s),i,"path"===a.relative);null==e&&"/"!==t&&(c.pathname="/"===c.pathname?t:Ca([t,c.pathname])),(a.replace?n.replace:n.push)(c,a.state,a)},[t,n,s,i,e])}()}function tc(e,{relative:t}={}){let{matches:n}=pi.useContext(Ga),{pathname:r}=Ja(),i=JSON.stringify(_a(n));return pi.useMemo(()=>ka(e,JSON.parse(i),r,"path"===t),[e,i,r,t])}function nc(e,t,n,r){pa(Za(),"useRoutes() may be used only in the context of a component.");let{navigator:i}=pi.useContext(Ha),{matches:s}=pi.useContext(Ga),o=s[s.length-1],a=o?o.params:{},c=o?o.pathname:"/",l=o?o.pathnameBase:"/",u=o&&o.route;{let e=u&&u.path||"";uc(c,!u||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${c}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent to .`)}let d,p=Ja();if(t){let e="string"==typeof t?Ma(t):t;pa("/"===l||e.pathname?.startsWith(l),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=p;let h=d.pathname||"/",f=h;if("/"!==l){let e=l.replace(/^\//,"").split("/");f="/"+h.replace(/^\//,"").split("/").slice(e.length).join("/")}let m=ya(e,{pathname:f});ha(u||null!=m,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),ha(null==m||void 0!==m[m.length-1].route.element||void 0!==m[m.length-1].route.Component||void 0!==m[m.length-1].route.lazy,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let g=function(e,t=[],n=null){if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let r=e,i=n?.errors;if(null!=i){let e=r.findIndex(e=>e.route.id&&void 0!==i?.[e.route.id]);pa(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),r=r.slice(0,Math.min(r.length,e+1))}let s=!1,o=-1;if(n)for(let e=0;e=0?r.slice(0,o+1):[r[0]];break}}}return r.reduceRight((e,a,c)=>{let l,u=!1,d=null,p=null;n&&(l=i&&a.route.id?i[a.route.id]:void 0,d=a.route.errorElement||ic,s&&(o<0&&0===c?(uc("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),u=!0,p=null):o===c&&(u=!0,p=a.route.hydrateFallbackElement||null)));let h=t.concat(r.slice(0,c+1)),f=()=>{let t;return t=l?d:u?p:a.route.Component?pi.createElement(a.route.Component,null):a.route.element?a.route.element:e,pi.createElement(oc,{match:a,routeContext:{outlet:e,matches:h,isDataRoute:null!=n},children:t})};return n&&(a.route.ErrorBoundary||a.route.errorElement||0===c)?pi.createElement(sc,{location:n.location,revalidation:n.revalidation,component:d,error:l,children:f(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):f()},null)}(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},a,e.params),pathname:Ca([l,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:Ca([l,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),s,n,r);return t&&g?pi.createElement(Wa.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...d},navigationType:"POP"}},g):g}function rc(){let e=function(){let e=pi.useContext(qa),t=function(e){let t=pi.useContext(Ba);return pa(t,ac(e)),t}("useRouteError"),n=cc("useRouteError");return void 0!==e?e:t.errors?.[n]}(),t=Ra(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=pi.createElement(pi.Fragment,null,pi.createElement("p",null,"💿 Hey developer 👋"),pi.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",pi.createElement("code",{style:s},"ErrorBoundary")," or"," ",pi.createElement("code",{style:s},"errorElement")," prop on your route.")),pi.createElement(pi.Fragment,null,pi.createElement("h2",null,"Unexpected Application Error!"),pi.createElement("h3",{style:{fontStyle:"italic"}},t),n?pi.createElement("pre",{style:i},n):null,o)}pi.createContext(null);var ic=pi.createElement(rc,null),sc=class extends pi.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?pi.createElement(Ga.Provider,{value:this.props.routeContext},pi.createElement(qa.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function oc({routeContext:e,match:t,children:n}){let r=pi.useContext(Va);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),pi.createElement(Ga.Provider,{value:e},n)}function ac(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function cc(e){let t=function(e){let t=pi.useContext(Ga);return pa(t,ac(e)),t}(e),n=t.matches[t.matches.length-1];return pa(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}var lc={};function uc(e,t,n){t||lc[e]||(lc[e]=!0,ha(!1,n))}function dc(e){pa(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function pc({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:s=!1}){pa(!Za(),"You cannot render a inside another . You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),a=pi.useMemo(()=>({basename:o,navigator:i,static:s,future:{}}),[o,i,s]);"string"==typeof n&&(n=Ma(n));let{pathname:c="/",search:l="",hash:u="",state:d=null,key:p="default"}=n,h=pi.useMemo(()=>{let e=La(c,o);return null==e?null:{location:{pathname:e,search:l,hash:u,state:d,key:p},navigationType:r}},[o,c,l,u,d,p,r]);return ha(null!=h,` is not able to match the URL "${c}${l}${u}" because it does not start with the basename, so the won't render anything.`),null==h?null:pi.createElement(Ha.Provider,{value:a},pi.createElement(Wa.Provider,{children:t,value:h}))}function hc({children:e,location:t}){return nc(fc(e),t)}function fc(e,t=[]){let n=[];return pi.Children.forEach(e,(e,r)=>{if(!pi.isValidElement(e))return;let i=[...t,r];if(e.type===pi.Fragment)return void n.push.apply(n,fc(e.props.children,i));pa(e.type===dc,`[${"string"==typeof e.type?e.type:e.type.name}] is not a component. All component children of must be a or `),pa(!e.props.index||!e.props.children,"An index route cannot have child routes.");let s={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(s.children=fc(e.props.children,i)),n.push(s)}),n}pi.memo(function({routes:e,future:t,state:n}){return nc(e,void 0,n,t)}),pi.Component;var mc="get",gc="application/x-www-form-urlencoded";function Mc(e){return null!=e&&"string"==typeof e.tagName}var yc=null,Nc=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function vc(e){return null==e||Nc.has(e)?e:(ha(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${gc}"`),null)}function Dc(e,t){if(!1===e||null==e)throw new Error(t)}function jc(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function xc(e,t,n,r,i,s){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,a=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===s?t.filter((e,t)=>o(e,t)||a(e,t)):"data"===s?t.filter((t,s)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,s)||a(t,s))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0}):[]}function Ic(e,t,{includeHydrateFallback:n}={}){return r=e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1),[...new Set(r)];var r}Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),"undefined"!=typeof window?window:"undefined"!=typeof globalThis&&globalThis,Symbol("SingleFetchRedirect");function Tc(){let e=pi.useContext(Va);return Dc(e,"You must render this element inside a element"),e}function wc(){let e=pi.useContext(Ba);return Dc(e,"You must render this element inside a element"),e}pi.Component;var zc=pi.createContext(void 0);function bc(){let e=pi.useContext(zc);return Dc(e,"You must render this element inside a element"),e}function Ec(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ac({page:e,...t}){let{router:n}=Tc(),r=pi.useMemo(()=>ya(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?pi.createElement(Lc,{page:e,matches:r,...t}):null}function Sc(e){let{manifest:t,routeModules:n}=bc(),[r,i]=pi.useState([]);return pi.useEffect(()=>{let r=!1;return async function(e,t,n){return function(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&(null==(s=i)||"string"!=typeof s.page)&&"script"===i.as&&i.href&&r.has(i.href))return e;var s;let o=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(i));return n.has(o)||(n.add(o),e.push({key:o,link:i})),e},[])}((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(jc).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Lc({page:e,matches:t,...n}){let r=Ja(),{manifest:i,routeModules:s}=bc(),{basename:o}=Tc(),{loaderData:a,matches:c}=wc(),l=pi.useMemo(()=>xc(e,t,c,i,r,"data"),[e,t,c,i,r]),u=pi.useMemo(()=>xc(e,t,c,i,r,"assets"),[e,t,c,i,r]),d=pi.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,c=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];t&&t.hasLoader&&(!l.some(t=>t.route.id===e.route.id)&&e.route.id in a&&s[e.route.id]?.shouldRevalidate||t.hasClientLoader?c=!0:n.add(e.route.id))}),0===n.size)return[];let u=function(e,t){let n="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===n.pathname?n.pathname="_root.data":t&&"/"===La(n.pathname,t)?n.pathname=`${t.replace(/\/$/,"")}/_root.data`:n.pathname=`${n.pathname.replace(/\/$/,"")}.data`,n}(e,o);return c&&n.size>0&&u.searchParams.set("_routes",t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(",")),[u.pathname+u.search]},[o,a,r,i,l,t,e,s]),p=pi.useMemo(()=>Ic(u,i),[u,i]),h=Sc(u);return pi.createElement(pi.Fragment,null,d.map(e=>pi.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n})),p.map(e=>pi.createElement("link",{key:e,rel:"modulepreload",href:e,...n})),h.map(({key:e,link:t})=>pi.createElement("link",{key:e,...t})))}zc.displayName="FrameworkContext";function Oc(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}var _c="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{_c&&(window.__reactRouterVersion="7.6.2")}catch(Zd){}function kc({basename:e,children:t,window:n}){let r=pi.useRef();null==r.current&&(r.current=da({window:n,v5Compat:!0}));let i=r.current,[s,o]=pi.useState({action:i.action,location:i.location}),a=pi.useCallback(e=>{pi.startTransition(()=>o(e))},[o]);return pi.useLayoutEffect(()=>i.listen(a),[i,a]),pi.createElement(pc,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i})}var Cc=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Qc=pi.forwardRef(function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:i,replace:s,state:o,target:a,to:c,preventScrollReset:l,viewTransition:u,...d},p){let h,{basename:f}=pi.useContext(Ha),m="string"==typeof c&&Cc.test(c),g=!1;if("string"==typeof c&&m&&(h=c,_c))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),n=La(t.pathname,f);t.origin===e.origin&&null!=n?c=n+t.search+t.hash:g=!0}catch(e){ha(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let M=function(e,{relative:t}={}){pa(Za(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=pi.useContext(Ha),{hash:i,pathname:s,search:o}=tc(e,{relative:t}),a=s;return"/"!==n&&(a="/"===s?n:Ca([n,s])),r.createHref({pathname:a,search:o,hash:i})}(c,{relative:r}),[y,N,v]=function(e,t){let n=pi.useContext(zc),[r,i]=pi.useState(!1),[s,o]=pi.useState(!1),{onFocus:a,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,p=pi.useRef(null);pi.useEffect(()=>{if("render"===e&&o(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),pi.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let h=()=>{i(!0)},f=()=>{i(!1),o(!1)};return n?"intent"!==e?[s,p,{}]:[s,p,{onFocus:Ec(a,h),onBlur:Ec(c,f),onMouseEnter:Ec(l,h),onMouseLeave:Ec(u,f),onTouchStart:Ec(d,h)}]:[!1,p,{}]}(n,d),D=function(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:s,viewTransition:o}={}){let a=ec(),c=Ja(),l=tc(e,{relative:s});return pi.useCallback(u=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(u,t)){u.preventDefault();let t=void 0!==n?n:ga(c)===ga(l);a(e,{replace:t,state:r,preventScrollReset:i,relative:s,viewTransition:o})}},[c,a,l,n,r,t,e,i,s,o])}(c,{replace:s,state:o,target:a,preventScrollReset:l,relative:r,viewTransition:u}),j=pi.createElement("a",{...d,...v,href:h||M,onClick:g||i?e:function(t){e&&e(t),t.defaultPrevented||D(t)},ref:Oc(p,N),target:a,"data-discover":m||"render"!==t?void 0:"true"});return y&&!m?pi.createElement(pi.Fragment,null,j,pi.createElement(Ac,{page:M})):j});Qc.displayName="Link",pi.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:i,to:s,viewTransition:o,children:a,...c},l){let u=tc(s,{relative:c.relative}),d=Ja(),p=pi.useContext(Ba),{navigator:h,basename:f}=pi.useContext(Ha),m=null!=p&&function(e,t={}){let n=pi.useContext($a);pa(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Uc("useViewTransitionState"),i=tc(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=La(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=La(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=Aa(i.pathname,o)||null!=Aa(i.pathname,s)}(u)&&!0===o,g=h.encodeLocation?h.encodeLocation(u).pathname:u.pathname,M=d.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(M=M.toLowerCase(),y=y?y.toLowerCase():null,g=g.toLowerCase()),y&&f&&(y=La(y,f)||y);const N="/"!==g&&g.endsWith("/")?g.length-1:g.length;let v,D=M===g||!r&&M.startsWith(g)&&"/"===M.charAt(N),j=null!=y&&(y===g||!r&&y.startsWith(g)&&"/"===y.charAt(g.length)),x={isActive:D,isPending:j,isTransitioning:m},I=D?e:void 0;v="function"==typeof n?n(x):[n,D?"active":null,j?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let T="function"==typeof i?i(x):i;return pi.createElement(Qc,{...c,"aria-current":I,className:v,ref:l,style:T,to:s,viewTransition:o},"function"==typeof a?a(x):a)}).displayName="NavLink";var Pc=pi.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:s,method:o=mc,action:a,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,...p},h)=>{let f=function(){let{router:e}=Uc("useSubmit"),{basename:t}=pi.useContext(Ha),n=cc("useRouteId");return pi.useCallback(async(r,i={})=>{let{action:s,method:o,encType:a,formData:c,body:l}=function(e,t){let n,r,i,s,o;if(Mc(a=e)&&"form"===a.tagName.toLowerCase()){let o=e.getAttribute("action");r=o?La(o,t):null,n=e.getAttribute("method")||mc,i=vc(e.getAttribute("enctype"))||gc,s=new FormData(e)}else if(function(e){return Mc(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Mc(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let o=e.form;if(null==o)throw new Error('Cannot submit a