import"./vendor-react-DfNOgXDS.js";const u=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,o=globalThis,h="10.52.0";function M(){return b(o),o}function b(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||h,t[h]=t[h]||{}}function y(e,t,n=o){const s=n.__SENTRY__=n.__SENTRY__||{},i=s[h]=s[h]||{};return i[e]||(i[e]=t())}const G="Sentry Logger ",w={};function j(e){if(!("console"in o))return e();const t=o.console,n={},s=Object.keys(w);s.forEach(i=>{const r=w[i];n[i]=t[i],t[i]=r});try{return e()}finally{s.forEach(i=>{t[i]=n[i]})}}function K(){v().enabled=!0}function V(){v().enabled=!1}function U(){return v().enabled}function W(...e){E("log",...e)}function X(...e){E("warn",...e)}function J(...e){E("error",...e)}function E(e,...t){u&&U()&&j(()=>{o.console[e](`${G}[${e}]:`,...t)})}function v(){return u?y("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const f={enable:K,disable:V,isEnabled:U,log:W,warn:X,error:J},q=Object.prototype.toString;function z(e,t){return q.call(e)===`[object ${t}]`}function H(e){return z(e,"Object")}function Q(e){return!!(e!=null&&e.then&&typeof e.then=="function")}function Z(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{u&&f.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}let c;function p(e){if(c!==void 0)return c?c(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=o;return t in n&&typeof n[t]=="function"?(c=n[t],c(e)):(c=null,e())}function S(){return p(()=>Math.random())}function tt(){return p(()=>Date.now())}function et(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function nt(){const e=o;return e.crypto||e.msCrypto}let g;function st(){return S()*16}function d(e=nt()){try{if(e!=null&&e.randomUUID)return p(()=>e.randomUUID()).replace(/-/g,"")}catch{}return g||(g="10000000100040008000"+1e11),g.replace(/[018]/g,t=>(t^(st()&15)>>t/4).toString(16))}const x=1e3;function B(){return tt()/x}function it(){const{performance:e}=o;if(!(e!=null&&e.now)||!e.timeOrigin)return B;const t=e.timeOrigin;return()=>(t+p(()=>e.now()))/x}let A;function rt(){return(A??(A=it()))()}function ot(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||rt(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:d()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n: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),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function O(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const s={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(s[i]=O(s[i],t[i],n-1));return s}function N(){return d()}const m="_sentrySpan";function k(e,t){t?Z(e,m,t):delete e[m]}function D(e){return e[m]}const at=100;class a{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:N(),sampleRand:S()}}clone(){const t=new a;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,k(t,D(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&ot(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this.setTags({[t]:n})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,s=n instanceof a?n.getScopeData():H(n)?t:void 0,{tags:i,attributes:r,extra:Y,user:l,contexts:$,level:I,fingerprint:L=[],propagationContext:C,conversationId:P}=s||{};return this._tags={...this._tags,...i},this._attributes={...this._attributes,...r},this._extra={...this._extra,...Y},this._contexts={...this._contexts,...$},l&&Object.keys(l).length&&(this._user=l),I&&(this._level=I),L.length&&(this._fingerprint=L),C&&(this._propagationContext=C),P&&(this._conversationId=P),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,k(this,void 0),this._attachments=[],this.setPropagationContext({traceId:N(),sampleRand:S()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){var r;const s=typeof n=="number"?n:at;if(s<=0)return this;const i={timestamp:B(),...t,message:t.message?et(t.message,2048):t.message};return this._breadcrumbs.push(i),this._breadcrumbs.length>s&&(this._breadcrumbs=this._breadcrumbs.slice(-s),(r=this._client)==null||r.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,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:D(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=O(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const s=(n==null?void 0:n.event_id)||d();if(!this._client)return u&&f.warn("No client configured on scope - will not capture exception!"),s;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:s},this),s}captureMessage(t,n,s){const i=(s==null?void 0:s.event_id)||d();if(!this._client)return u&&f.warn("No client configured on scope - will not capture message!"),i;const r=(s==null?void 0:s.syntheticException)??new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:r,...s,event_id:i},this),i}captureEvent(t,n){const s=t.event_id||(n==null?void 0:n.event_id)||d();return this._client?(this._client.captureEvent(t,{...n,event_id:s},this),s):(u&&f.warn("No client configured on scope - will not capture event!"),s)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function ct(){return y("defaultCurrentScope",()=>new a)}function ut(){return y("defaultIsolationScope",()=>new a)}const T=e=>e instanceof Promise&&!e[F],F=Symbol("chained PromiseLike"),_t=(e,t,n)=>{const s=e.then(i=>(t(i),i),i=>{throw n(i),i});return T(s)&&T(e)?s:ht(e,s)},ht=(e,t)=>{if(!t)return e;let n=!1;for(const s in e){if(s in t)continue;n=!0;const i=e[s];typeof i=="function"?Object.defineProperty(t,s,{value:(...r)=>i.apply(e,r),enumerable:!0,configurable:!0,writable:!0}):t[s]=i}return n&&Object.assign(t,{[F]:!0}),t};class dt{constructor(t,n){let s;t?s=t:s=new a;let i;n?i=n:i=new a,this._stack=[{scope:s}],this._isolationScope=i}withScope(t){const n=this._pushScope();let s;try{s=t(n)}catch(i){throw this._popScope(),i}return Q(s)?_t(s,()=>this._popScope(),()=>this._popScope()):(this._popScope(),s)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function _(){const e=M(),t=b(e);return t.stack=t.stack||new dt(ct(),ut())}function ft(e){return _().withScope(e)}function pt(e,t){const n=_();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function R(e){return _().withScope(()=>e(_().getIsolationScope()))}function lt(){return{withIsolationScope:R,withScope:ft,withSetScope:pt,withSetIsolationScope:(e,t)=>R(t),getCurrentScope:()=>_().getScope(),getIsolationScope:()=>_().getIsolationScope()}}function gt(e){const t=b(e);return t.acs?t.acs:lt()}function St(){const e=M();return gt(e).getCurrentScope()}function bt(e,t){const n=typeof t=="string"?t:void 0,s=typeof t!="string"?{captureContext:t}:void 0;return St().captureMessage(e,n,s)}export{bt as c,St as g};