找回密码
 立即注册
搜索
热搜: 丝袜 魅魔 黑丝
查看: 8|回复: 0

19963243_女社長的日常生活

[复制链接]

13万

主题

343

回帖

22万

积分

管理员

站长

UID
1
积分
224400
余额
13 R
Moe币
84881
在线时间
279 小时
注册时间
2025-12-28
最后登录
2026-11-9
发表于 2026-9-3 23:00:59 | 显示全部楼层 |阅读模式
tion Mi(t,n,e,r,i="auto.http.browser"){if(!we()||!t.fetchData)return;const s=n(t.fetchData.url);if(t.endTimestamp&&s){const n=t.fetchData.__span;if(!n)return;const e=r[n];return void(e&&(!function(t,n){if(n.response){be(t,n.response.status);const e=n.response&&n.response.headers&&n.response.headers.get("content-length");if(e){const n=parseInt(e);n>0&&t.setAttribute("http.response_content_length",n)}}else n.error&&t.setStatus("internal_error");t.end()}(e,t),delete r[n]))}const o=Wn(),c=Bn(),{method:u,url:a}=t.fetchData,h=function(t){try{return new URL(t).href}catch(t){return}}(a),f=h?Jt(h).host:void 0,d=s?Se({name:`${u} ${a}`,onlyIfParent:!0,attributes:{url:a,type:"fetch","http.method":u,"http.url":h,"server.address":f,[De]:i},op:"http.client"}):void 0;if(d&&(t.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d),e(t.fetchData.url)&&c){const n=t.args[0];t.args[1]=t.args[1]||{};const e=t.args[1];e.headers=function(t,n,e,r,i){const s=i||e.getSpan(),o=fe(),{traceId:c,spanId:u,sampled:a,dsc:h}={...o.getPropagationContext(),...e.getPropagationContext()},f=s?jn(s):an(c,u,a),d=sn(h||(s?Yn(s):Vn(c,n,e))),p=r.headers||("undefined"!=typeof Request&&l(t,Request)?t.headers:void 0);if(p){if("undefined"!=typeof Headers&&l(p,Headers)){const t=new Headers(p);return t.append("sentry-trace",f),d&&t.append(tn,d),t}if(Array.isArray(p)){const t=[...p,["sentry-trace",f]];return d&&t.push([tn,d]),t}{const t="baggage"in p?p.baggage:void 0,n=[];return Array.isArray(t)?n.push(...t):t&&n.push(t),d&&n.push(d),{...p,"sentry-trace":f,baggage:n.length>0?n.join(","):void 0}}}return{"sentry-trace":f,baggage:d}}(n,c,o,e,d)}return d}const Di=["localhost",/^\/(?!\/)/],Ni={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:Di,tracePropagationTargets:Di};function Li(t){const{traceFetch:n,traceXHR:e,tracePropagationTargets:r,tracingOrigins:i,shouldCreateSpanForRequest:s,enableHTTPTimings:o}={traceFetch:Ni.traceFetch,traceXHR:Ni.traceXHR,...t},c="function"==typeof s?s:t=>!0,u=t=>function(t,n){return y(t,n||Di)}(t,r||i),a={};n&&St((t=>{const n=Mi(t,c,u,a);if(n){const e=qi(t.fetchData.url),r=e?Jt(e).host:void 0;n.setAttributes({"http.url":e,"server.address":r})}o&&n&&Ai(n)})),e&&Pt((t=>{const n=function(t,n,e,r){const i=t.xhr,s=i&&i.__sentry_xhr_v3__;if(!we()||!i||i.__sentry_own_request__||!s)return;const o=n(s.url);if(t.endTimestamp&&o){const t=i.__sentry_xhr_span_id__;if(!t)return;const n=r[t];return void(n&&void 0!==s.status_code&&(be(n,s.status_code),n.end(),delete r[t]))}const c=Wn(),u=fe(),a=qi(s.url),h=a?Jt(a).host:void 0,f=o?Se({name:`${s.method} ${s.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":s.method,"http.url":a,url:s.url,"server.address":h,[De]:"auto.http.browser"},op:"http.client"}):void 0;f&&(i.__sentry_xhr_span_id__=f.spanContext().spanId,r[i.__sentry_xhr_span_id__]=f);const d=Bn();if(i.setRequestHeader&&e(s.url)&&d){const{traceId:t,spanId:n,sampled:e,dsc:r}={...u.getPropagationContext(),...c.getPropagationContext()};!function(t,n,e){try{t.setRequestHeader("sentry-trace",n),e&&t.setRequestHeader(tn,e)}catch(t){}}(i,f?jn(f):an(t,n,e),sn(r||(f?Yn(f):Vn(t,d,c))))}return f}(t,c,u,a);o&&n&&Ai(n)}))}function Ai(t){const{url:n}=Dn(t).data||{};if(!n||"string"!=typeof n)return;const e=ai("resource",(({entries:r})=>{r.forEach((r=>{if(function(t){return"resource"===t.entryType&&"initiatorType"in t&&"string"==typeof t.nextHopProtocol&&("fetch"===t.initiatorType||"xmlhttprequest"===t.initiatorType)}(r)&&r.name.endsWith(n)){(function(t){const{name:n,version:e}=function(t){let n="unknown",e="unknown",r="";for(const i of t){if("/"===i){[n,e]=t.split("/");break}if(!isNaN(Number(i))){n="h"===r?"http":r,e=t.split(r)[1];break}r+=i}r===t&&(n=r);return{name:n,version:e}}(t.nextHopProtocol),r=[];if(r.push(["network.protocol.version",e],["network.protocol.name",n]),!Zt)return r;return[...r,["http.request.redirect_start",Pi(t.redirectStart)],["http.request.fetch_start",Pi(t.fetchStart)],["http.request.domain_lookup_start",Pi(t.domainLookupStart)],["http.request.domain_lookup_end",Pi(t.domainLookupEnd)],["http.request.connect_start",Pi(t.connectStart)],["http.request.secure_connection_start",Pi(t.secureConnectionStart)],["http.request.connection_end",Pi(t.connectEnd)],["http.request.request_start",Pi(t.requestStart)],["http.request.response_start",Pi(t.responseStart)],["http.request.response_end",Pi(t.responseEnd)]]})(r).forEach((n=>t.setAttribute(...n))),setTimeout(e)}}))}))}function Pi(t=0){return((Zt||performance.timeOrigin)+t)/1e3}function qi(t){try{return new URL(t,Dr.location.origin).href}catch(t){return}}const Fi={...Pe,markBackgroundTransactions:!0,routingInstrumentation:function(t,n=!0,e=!0){if(!Dr||!Dr.location)return;let r,i=Dr.location.href;n&&(r=t({name:Dr.location.pathname,startTimestamp:Zt?Zt/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),e&&Nt((({to:n,from:e})=>{void 0===e&&i&&-1!==i.indexOf(n)?i=void 0:e!==n&&(i=void 0,r&&r.end(),r=t({name:Dr.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))}))},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...Ni};class Hi{constructor(t){this.name="BrowserTracing",this.zt=!1,Ge(),this.options={...Fi,...t},void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this.Xt=ki(),this.Gt={},this.options.enableInp&&Ii(this.Gt,this.options.interactionsSampleRate),this.options.enableLongTask&&ai("longtask",(({entries:t})=>{for(const n of t){const t=me();if(!t)return;const e=wi(Zt+n.startTime),r=wi(n.duration);t.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:e,endTimestamp:e+r})}})),this.options._experiments.enableInteractions&&ai("event",(({entries:t})=>{for(const n of t){const t=me();if(!t)return;if("click"===n.name){const e=wi(Zt+n.startTime),r=wi(n.duration),i={description:I(n.target),op:`ui.interaction.${n.name}`,origin:"auto.ui.browser.metrics",startTimestamp:e,endTimestamp:e+r},s=C(n.target);s&&(i.attributes={"ui.component_name":s}),t.startChild(i)}}})),this.Jt={name:void 0,context:void 0}}setupOnce(t,n){this.Kt=n;const e=n().getClient(),r=e&&e.getOptions(),{routingInstrumentation:i,startTransactionOnLocationChange:s,startTransactionOnPageLoad:o,markBackgroundTransactions:c,traceFetch:u,traceXHR:a,shouldCreateSpanForRequest:h,enableHTTPTimings:f,_experiments:d}=this.options,l=r&&r.tracePropagationTargets,p=l||this.options.tracePropagationTargets;i((t=>{const e=this.Vt(t);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(e,t,n),e}),o,s),c&&Dr.document&&Dr.document.addEventListener("visibilitychange",(()=>{const t=me();if(Dr.document.hidden&&t){const n="cancelled",{op:e,status:r}=Dn(t);r||t.setStatus(n),t.setTag("visibilitychange","document.hidden"),t.end()}})),d.enableInteractions&&this.Yt(),this.options.enableInp&&this.Qt(),Li({traceFetch:u,traceXHR:a,tracePropagationTargets:p,shouldCreateSpanForRequest:h,enableHTTPTimings:f})}Vt(t){if(!this.Kt)return;const n=this.Kt(),{beforeNavigate:e,idleTimeout:r,finalTimeout:i,heartbeatInterval:s}=this.options,o="pageload"===t.op;let c;if(o){const n=o?Ui("sentry-trace"):"",e=o?Ui("baggage"):void 0,{traceId:r,dsc:i,parentSpanId:s,sampled:u}=function(t,n){const e=un(t),r=rn(n),{traceId:i,parentSpanId:s,parentSampled:o}=e||{};return e?{traceId:i||ot(),parentSpanId:s||ot().substring(16),spanId:ot().substring(16),sampled:o,dsc:r||{}}:{traceId:i||ot(),spanId:ot().substring(16)}}(n,e);c={traceId:r,parentSpanId:s,parentSampled:u,...t,metadata:{...t.metadata,dynamicSamplingContext:i},trimEnd:!0}}else c={trimEnd:!0,...t};const u="function"==typeof e?e(c):c,a=void 0===u?{...c,sampled:!1}:u;a.metadata=a.name!==c.name?{...a.metadata,source:"custom"}:a.metadata,this.Jt.name=a.name,this.Jt.context=a,a.sampled;const{location:h}=Dr,f=Xe(n,a,r,i,!0,{location:h},s,o);return o&&Dr.document&&(Dr.document.addEventListener("readystatechange",(()=>{["interactive","complete"].includes(Dr.document.readyState)&&f.sendAutoFinishSignal()})),["interactive","complete"].includes(Dr.document.readyState)&&f.sendAutoFinishSignal()),f.registerBeforeFinishCallback((t=>{this.Xt(),Ci(t)})),f}Yt(){let t;const n=()=>{const{idleTimeout:n,finalTimeout:e,heartbeatInterval:r}=this.options,i=me();if(i&&i.op&&["navigation","pageload"].includes(i.op))return;if(t&&(t.setFinishReason("interactionInterrupted"),t.end(),t=void 0),!this.Kt)return;if(!this.Jt.name)return;const s=this.Kt(),{location:o}=Dr,c={name:this.Jt.name,op:"ui.action.click",trimEnd:!0,data:{[je]:this.Jt.context?Bi(this.Jt.context):"url"}};t=Xe(s,c,n,e,!0,{location:o},r)};["click"].forEach((t=>{Dr.document&&addEventListener(t,n,{once:!1,capture:!0})}))}Qt(){const t=({entries:t})=>{const n=Bn(),e=void 0!==n&&void 0!==n.getIntegrationByName?n.getIntegrationByName("Replay"):void 0,r=void 0!==e?e.getReplayId():void 0,i=me(),s=Wn(),o=void 0!==s?s.getUser():void 0;t.forEach((t=>{if(function(t){return"duration"in t}(t)){const n=t.interactionId;if(void 0===n)return;const e=this.Gt[n],s=t.duration,c=t.startTime,u=Object.keys(this.Gt),a=u.length>0?u.reduce(((t,n)=>this.Gt[t].duration<this.Gt[n].duration?t:n)):void 0;if("first-input"===t.entryType){if(u.map((t=>this.Gt[t])).some((t=>t.duration===s&&t.startTime===c)))return}if(!n)return;if(e)e.duration=Math.max(e.duration,s);else if(u.length<10||void 0===a||s>this.Gt[a].duration){const t=this.Jt.name,e=this.Jt.context;t&&e&&(a&&Object.keys(this.Gt).length>=10&&delete this.Gt[a],this.Gt[n]={routeName:t,duration:s,parentContext:e,user:o,activeTransaction:i,replayId:r,startTime:c})}}}))};ai("event",t),ai("first-input",t)}}function Ui(t){const n=(e=`meta[name=${t}]`,k.document&&k.document.querySelector?k.document.querySelector(e):null);var e;return n?n.getAttribute("content"):void 0}function Bi(t){const n=t.attributes&&t.attributes["sentry.source"],e=t.data&&t.data["sentry.source"],r=t.metadata&&t.metadata.source;return n||e||r}function Wi(){Ge()}const zi=E;let Xi=0;function Gi(){return Xi>0}function Ji(){Xi++,setTimeout((()=>{Xi--}))}function Ki(t,n={},e){if("function"!=typeof t)return t;try{const n=t.__sentry_wrapped__;if(n)return"function"==typeof n?n:t;if(B(t))return t}catch(n){return t}const sentryWrapped=function(){const r=Array.prototype.slice.call(arguments);try{e&&"function"==typeof e&&e.apply(this,arguments);const i=r.map((t=>Ki(t,n)));return t.apply(this,i)}catch(t){throw Ji(),Un((e=>{e.addEventProcessor((t=>(n.mechanism&&(at(t,void 0,void 0),ht(t,n.mechanism)),t.extra={...t.extra,arguments:r},t))),captureException(t)})),t}};try{for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(sentryWrapped[n]=t[n])}catch(t){}U(sentryWrapped,t),H(t,"__sentry_wrapped__",sentryWrapped);try{Object.getOwnPropertyDescriptor(sentryWrapped,"name").configurable&&Object.defineProperty(sentryWrapped,"name",{get:()=>t.name})}catch(t){}return sentryWrapped}function Vi(t,n){const e=Qi(t,n),r={type:n&&n.name,value:ts(n)};return e.length&&(r.stacktrace={frames:e}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Yi(t,n){return{exception:{values:[Vi(t,n)]}}}function Qi(t,n){const e=n.stacktrace||n.stack||"",r=function(t){if(t){if("number"==typeof t.framesToPop)return t.framesToPop;if(Zi.test(t.message))return 1}return 0}(n);try{return t(e,r)}catch(t){}return[]}const Zi=/Minified React error #\d+;/i;function ts(t){const n=t&&t.message;return n?n.error&&"string"==typeof n.error.message?n.error.message:n:"No error message"}function ns(t,n,e,r){const i=rs(t,n,e&&e.syntheticException||void 0,r);return ht(i),i.level="error",e&&e.event_id&&(i.event_id=e.event_id),Wt(i)}function es(t,n,e="info",r,i){const s=is(t,n,r&&r.syntheticException||void 0,i);return s.level=e,r&&r.event_id&&(s.event_id=r.event_id),Wt(s)}function rs(t,n,o,c,u){let f;if(i(n)&&n.error){return Yi(t,n.error)}if(s(n)||r(n,"DOMException")){const e=n;if("stack"in n)f=Yi(t,n);else{const n=e.name||(s(e)?"DOMError":"DOMException"),r=e.message?`${n}: ${e.message}`:n;f=is(t,r,o,c),at(f,r)}return"code"in e&&(f.tags={...f.tags,"DOMException.code":`${e.code}`}),f}if(e(n))return Yi(t,n);if(a(n)||h(n)){return f=function(t,n,e,r){const i=Bn(),s=i&&i.getOptions().normalizeDepth,o={exception:{values:[{type:h(n)?n.constructor.name:r?"UnhandledRejection":"Error",value:ss(n,{isUnhandledRejection:r})}]},extra:{__serialized__:Ht(n,s)}};if(e){const n=Qi(t,e);n.length&&(o.exception.values[0].stacktrace={frames:n})}return o}(t,n,o,u),ht(f,{synthetic:!0}),f}return f=is(t,n,o,c),at(f,`${n}`,void 0),ht(f,{synthetic:!0}),f}function is(t,n,e,r){const i={};if(r&&e){const r=Qi(t,e);r.length&&(i.exception={values:[{value:n,stacktrace:{frames:r}}]})}if(c(n)){const{__sentry_template_string__:t,__sentry_template_values__:e}=n;return i.logentry={message:t,params:e},i}return i.message=n,i}function ss(t,{isUnhandledRejection:n}){const e=function(t,n=40){const e=Object.keys(W(t));if(e.sort(),!e.length)return"[object has no keys]";if(e[0].length>=n)return m(e[0],n);for(let t=e.length;t>0;t--){const r=e.slice(0,t).join(", ");if(!(r.length>n))return t===e.length?r:m(r,n)}return""}(t),r=n?"promise rejection":"exception";if(i(t))return`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``;if(h(t)){return`Event \`${function(t){try{const n=Object.getPrototypeOf(t);return n?n.constructor.name:void 0}catch(t){}}(t)}\` (type=${t.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${e}`}function os(t,{metadata:n,tunnel:e,dsn:r}){const i={event_id:t.event_id,sent_at:(new Date).toISOString(),...n&&n.sdk&&{sdk:{name:n.sdk.name,version:n.sdk.version}},...!!e&&!!r&&{dsn:L(r)}},s=function(t){return[{type:"user_report"},t]}(t);return hn(i,[s])}class cs extends class{constructor(t){if(this.Zt=t,this._integrations={},this.tn=!1,this.nn=0,this.en={},this.rn={},this.T=[],t.dsn&&(this.sn=P(t.dsn)),this.sn){const n=Ye(this.sn,t);this.cn=t.transport({tunnel:this.Zt.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,e){if(ft(t))return;let r=n&&n.event_id;return this.un(this.eventFromException(t,n).then((t=>this.an(t,n,e))).then((t=>{r=t}))),r}captureMessage(t,n,e,r){let i=e&&e.event_id;const s=c(t)?t:String(t),o=u(t)?this.eventFromMessage(s,n,e):this.eventFromException(t,e);return this.un(o.then((t=>this.an(t,e,r))).then((t=>{i=t}))),i}captureEvent(t,n,e){if(n&&n.originalException&&ft(n.originalException))return;let r=n&&n.event_id;const i=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this.un(this.an(t,n,i||e).then((t=>{r=t}))),r}captureSession(t){"string"!=typeof t.release||(this.sendSession(t),In(t,{init:!1}))}getDsn(){return this.sn}getOptions(){return this.Zt}getSdkMetadata(){return this.Zt.lt}getTransport(){return this.cn}flush(t){const n=this.cn;return n?(this.metricsAggregator&&this.metricsAggregator.flush(),this.hn(t).then((e=>n.flush(t).then((t=>e&&t))))):Wt(!0)}close(t){return this.flush(t).then((t=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),t)))}getEventProcessors(){return this.T}addEventProcessor(t){this.T.push(t)}setupIntegrations(t){(t&&!this.tn||this.fn()&&!this.tn)&&this.dn()}init(){this.fn()&&this.dn()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch(t){return null}}addIntegration(t){const n=this._integrations[t.name];nr(this,t,this._integrations),n||tr(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let e=Je(t,this.sn,this.Zt.lt,this.Zt.tunnel);for(const t of n.attachments||[])e=fn(e,mn(t,this.Zt.transportOptions&&this.Zt.transportOptions.textEncoder));const r=this.ln(e);r&&r.then((n=>this.emit("afterSendEvent",t,n)),null)}sendSession(t){const n=function(t,n,e,r){const i=yn(e);return hn({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&n&&{dsn:L(n)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(t,this.sn,this.Zt.lt,this.Zt.tunnel);this.ln(n)}recordDroppedEvent(t,n,e){if(this.Zt.sendClientReports){const r="number"==typeof e?e:1,i=`${t}:${n}`;this.en[i]=(this.en[i]||0)+r}}captureAggregateMetrics(t){const n=or(t,this.sn,this.Zt.lt,this.Zt.tunnel);this.ln(n)}on(t,n){this.rn[t]||(this.rn[t]=[]),this.rn[t].push(n)}emit(t,...n){this.rn[t]&&this.rn[t].forEach((t=>t(...n)))}dn(){const{integrations:t}=this.Zt;this._integrations=function(t,n){const e={};return n.forEach((n=>{n&&nr(t,n,e)})),e}(this,t),tr(this,t),this.tn=!0}pn(t,n){let e=!1,r=!1;const i=n.exception&&n.exception.values;if(i){r=!0;for(const t of i){const n=t.mechanism;if(n&&!1===n.handled){e=!0;break}}}const s="ok"===t.status;(s&&0===t.errors||s&&e)&&(In(t,{...e&&{status:"crashed"},errors:t.errors||Number(r||e)}),this.captureSession(t))}hn(t){return new Xt((n=>{let e=0;const r=setInterval((()=>{0==this.nn?(clearInterval(r),n(!0)):(e+=1,t&&e>=t&&(clearInterval(r),n(!1)))}),1)}))}fn(){return!1!==this.getOptions().enabled&&void 0!==this.cn}mn(t,n,e,r=fe()){const i=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s.length>0&&(n.integrations=s),this.emit("preprocessEvent",t,n),Ln(i,t,n,e,this,r).then((t=>{if(null===t)return t;const n={...r.getPropagationContext(),...e?e.getPropagationContext():void 0};if(!(t.contexts&&t.contexts.trace)&&n){const{traceId:r,spanId:i,parentSpanId:s,dsc:o}=n;t.contexts={trace:{trace_id:r,span_id:i,parent_span_id:s},...t.contexts};const c=o||Vn(r,this,e);t.sdkProcessingMetadata={dynamicSamplingContext:c,...t.sdkProcessingMetadata}}return t}))}an(t,n={},e){return this.gn(t,n,e).then((t=>t.event_id),(t=>{}))}gn(t,n,e){const r=this.getOptions(),{sampleRate:i}=r,s=ur(t),o=cr(t),c=t.type||"error",u=`before send for type \`${c}\``;if(o&&"number"==typeof i&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",t),zt(new q(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const h="replay_event"===c?"replay":c,d=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this.mn(t,n,e,d).then((e=>{if(null===e)throw this.recordDroppedEvent("event_processor",h,t),new q("An event processor returned `null`, will not send event.","log");if(n.data&&!0===n.data.__sentry__)return e;const i=function(t,n,e){const{beforeSend:r,beforeSendTransaction:i}=t;if(cr(n)&&r)return r(n,e);if(ur(n)&&i){if(n.spans){const t=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:t}}return i(n,e)}return n}(r,e,n);return function(t,n){const e=`${n} must return \`null\` or a valid event.`;if(f(t))return t.then((t=>{if(!a(t)&&null!==t)throw new q(e);return t}),(t=>{throw new q(`${n} rejected with ${t}`)}));if(!a(t)&&null!==t)throw new q(e);return t}(i,u)})).then((r=>{if(null===r){if(this.recordDroppedEvent("before_send",h,t),s){const n=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",n)}throw new q(`${u} returned \`null\`, will not send event.`,"log")}const i=e&&e.getSession();if(!s&&i&&this.pn(i,r),s){const t=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);t>0&&this.recordDroppedEvent("before_send","span",t)}const o=r.transaction_info;if(s&&o&&r.transaction!==t.transaction){const t="custom";r.transaction_info={...o,source:t}}return this.sendEvent(r,n),r})).then(null,(t=>{if(t instanceof q)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new q(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)}))}un(t){this.nn++,t.then((t=>(this.nn--,t)),(t=>(this.nn--,t)))}ln(t){if(this.emit("beforeEnvelope",t),this.fn()&&this.cn)return this.cn.send(t).then(null,(t=>{}))}vn(){const t=this.en;return this.en={},Object.keys(t).map((n=>{const[e,r]=n.split(":");return{reason:e,category:r,quantity:t[n]}}))}}{constructor(t){!function(t,n,e=[n],r="npm"){const i=t.lt||{};i.sdk||(i.sdk={name:`sentry.javascript.${n}`,packages:e.map((t=>({name:`${r}:@sentry/${t}`,version:ie}))),version:ie}),t.lt=i}(t,"browser",["browser"],zi.SENTRY_SDK_SOURCE||"npm"),super(t),t.sendClientReports&&zi.document&&zi.document.addEventListener("visibilitychange",(()=>{"hidden"===zi.document.visibilityState&&this.yn()}))}eventFromException(t,n){return ns(this.Zt.stackParser,t,n,this.Zt.attachStacktrace)}eventFromMessage(t,n="info",e){return es(this.Zt.stackParser,t,n,e,this.Zt.attachStacktrace)}captureUserFeedback(t){if(!this.fn())return;const n=os(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.ln(n)}mn(t,n,e){return t.platform=t.platform||"javascript",super.mn(t,n,e)}yn(){const t=this.vn();if(0===t.length)return;if(!this.sn)return;const n=(e=t,hn((r=this.Zt.tunnel&&L(this.sn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:i||Yt(),discarded_events:e}]]));var e,r,i;this.ln(n)}}let us;function as(t,n=function(){if(us)return us;if(wt(zi.fetch))return us=zi.fetch.bind(zi);const t=zi.document;let n=zi.fetch;if(t&&"function"==typeof t.createElement)try{const e=t.createElement("iframe");e.hidden=!0,t.head.appendChild(e);const r=e.contentWindow;r&&r.fetch&&(n=r.fetch),t.head.removeChild(e)}catch(t){}return us=n.bind(zi)}()){let e=0,r=0;return fr(t,(function(i){const s=i.body.length;e+=s,r++;const o={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:e<=6e4&&r<15,...t.fetchOptions};try{return n(t.url,o).then((t=>(e-=s,r--,{statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}})))}catch(t){return us=void 0,e-=s,r--,zt(t)}}))}function hs(t){return fr(t,(function(n){return new Xt(((e,r)=>{const i=new XMLHttpRequest;i.onerror=r,i.onreadystatechange=()=>{4===i.readyState&&e({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",t.url);for(const n in t.headers)Object.prototype.hasOwnProperty.call(t.headers,n)&&i.setRequestHeader(n,t.headers[n]);i.send(n.body)}))}))}const fs="?";function ds(t,n,e,r){const i={filename:t,function:n,in_app:!0};return void 0!==e&&(i.lineno=e),void 0!==r&&(i.colno=r),i}const ls=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ps=/\((\S*)(?::(\d+))(?::(\d+))\)/,ms=[30,t=>{const n=ls.exec(t);if(n){if(n[2]&&0===n[2].indexOf("eval")){const t=ps.exec(n[2]);t&&(n[2]=t[1],n[3]=t[2],n[4]=t[3])}const[t,e]=ks(n[1]||fs,n[2]);return ds(e,t,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],gs=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,vs=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ys=[50,t=>{const n=gs.exec(t);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){const t=vs.exec(n[3]);t&&(n[1]=n[1]||"eval",n[3]=t[1],n[4]=t[2],n[5]="")}let t=n[3],e=n[1]||fs;return[e,t]=ks(e,t),ds(t,e,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}}],bs=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,_s=[40,t=>{const n=bs.exec(t);return n?ds(n[2],n[1]||fs,+n[3],n[4]?+n[4]:void 0):void 0}],ws=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,Ss=[10,t=>{const n=ws.exec(t);return n?ds(n[2],n[3]||fs,+n[1]):void 0}],Ts=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,Es=[20,t=>{const n=Ts.exec(t);return n?ds(n[5],n[3]||n[4]||fs,+n[1],+n[2]):void 0}],$s=[ms,ys,_s],xs=Y(...$s),ks=(t,n)=>{const e=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return e||r?[-1!==t.indexOf("@")?t.split("@")[0]:fs,e?`safari-extension:${n}`:`safari-web-extension:${n}`]:[t,n]},Is=1024,Os="Breadcrumbs",Cs=(t={})=>{const n={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:Os,setupOnce(){},setup(t){var e;n.console&&function(t){const n="console";et(n,t),rt(n,st)}(function(t){return function(n){if(Bn()!==t)return;const e={category:"console",data:{arguments:n.args,logger:"console"},level:Vt(n.level),message:g(n.args," ")};if("assert"===n.level){if(!1!==n.args[0])return;e.message=`Assertion failed: ${g(n.args.slice(1)," ")||"console.assert"}`,e.data.arguments=n.args.slice(1)}Hn(e,{input:n.args,level:n.level})}}(t)),n.dom&&(e=function(t,n){return function(e){if(Bn()!==t)return;let r,i,s="object"==typeof n?n.serializeAttribute:void 0,o="object"==typeof n&&"number"==typeof n.maxStringLength?n.maxStringLength:void 0;o&&o>Is&&(o=Is),"string"==typeof s&&(s=[s]);try{const t=e.event,n=function(t){return!!t&&!!t.target}(t)?t.target:t;r=I(n,{keyAttrs:s,maxStringLength:o}),i=C(n)}catch(t){r="<unknown>"}if(0===r.length)return;const c={category:`ui.${e.name}`,message:r};i&&(c.data={"ui.component_name":i}),Hn(c,{event:e.event,name:e.name,global:e.global})}}(t,n.dom),et("dom",e),rt("dom",vt)),n.xhr&&Pt(function(t){return function(n){if(Bn()!==t)return;const{startTimestamp:e,endTimestamp:r}=n,i=n.xhr.__sentry_xhr_v3__;if(!e||!r||!i)return;const{method:s,url:o,status_code:c,body:u}=i;Hn({category:"xhr",data:{method:s,url:o,status_code:c},type:"http"},{xhr:n.xhr,input:u,startTimestamp:e,endTimestamp:r})}}(t)),n.fetch&&St(function(t){return function(n){if(Bn()!==t)return;const{startTimestamp:e,endTimestamp:r}=n;if(r&&(!n.fetchData.url.match(/sentry_key/)||"POST"!==n.fetchData.method))if(n.error){Hn({category:"fetch",data:n.fetchData,level:"error",type:"http"},{data:n.error,input:n.args,startTimestamp:e,endTimestamp:r})}else{const t=n.response;Hn({category:"fetch",data:{...n.fetchData,status_code:t&&t.status},type:"http"},{input:n.args,response:t,startTimestamp:e,endTimestamp:r})}}}(t)),n.history&&Nt(function(t){return function(n){if(Bn()!==t)return;let e=n.from,r=n.to;const i=Jt(zi.location.href);let s=e?Jt(e):void 0;const o=Jt(r);s&&s.path||(s=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===s.protocol&&i.host===s.host&&(e=s.relative),Hn({category:"navigation",data:{from:e,to:r}})}}(t)),n.sentry&&t.on&&t.on("beforeSendEvent",function(t){return function(n){Bn()===t&&Hn({category:"sentry."+("transaction"===n.type?"transaction":"event"),event_id:n.event_id,level:n.level,message:ut(n)},{event:n})}}(t))}}},js=er(Os,Cs);const Rs="Dedupe",Ms=()=>{let t;return{name:Rs,setupOnce(){},processEvent(n){if(n.type)return n;try{if(function(t,n){if(!n)return!1;if(function(t,n){const e=t.message,r=n.message;if(!e&&!r)return!1;if(e&&!r||!e&&r)return!1;if(e!==r)return!1;if(!Ls(t,n))return!1;if(!Ns(t,n))return!1;return!0}(t,n))return!0;if(function(t,n){const e=As(n),r=As(t);if(!e||!r)return!1;if(e.type!==r.type||e.value!==r.value)return!1;if(!Ls(t,n))return!1;if(!Ns(t,n))return!1;return!0}(t,n))return!0;return!1}(n,t))return null}catch(t){}return t=n}}},Ds=er(Rs,Ms);function Ns(t,n){let e=Ps(t),r=Ps(n);if(!e&&!r)return!0;if(e&&!r||!e&&r)return!1;if(e=e,r=r,r.length!==e.length)return!1;for(let t=0;t<r.length;t++){const n=r[t],i=e[t];if(n.filename!==i.filename||n.lineno!==i.lineno||n.colno!==i.colno||n.function!==i.function)return!1}return!0}function Ls(t,n){let e=t.fingerprint,r=n.fingerprint;if(!e&&!r)return!0;if(e&&!r||!e&&r)return!1;e=e,r=r;try{return!(e.join("")!==r.join(""))}catch(t){return!1}}function As(t){return t.exception&&t.exception.values&&t.exception.values[0]}function Ps(t){const n=t.exception;if(n)try{return n.values[0].stacktrace.frames}catch(t){return}}const qs="GlobalHandlers",Fs=(t={})=>{const n={onerror:!0,onunhandledrejection:!0,...t};return{name:qs,setupOnce(){Error.stackTraceLimit=50},setup(t){n.onerror&&function(t){kt((n=>{const{stackParser:e,attachStacktrace:r}=Bs();if(Bn()!==t||Gi())return;const{msg:s,url:c,line:u,column:a,error:h}=n,f=void 0===h&&o(s)?function(t,n,e,r){const s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o=i(t)?t.message:t,c="Error";const u=o.match(s);u&&(c=u[1],o=u[2]);return Us({exception:{values:[{type:c,value:o}]}},n,e,r)}(s,c,u,a):Us(rs(e,h||s,void 0,r,!1),c,u,a);f.level="error",Fn(f,{originalException:h,mechanism:{handled:!1,type:"onerror"}})}))}(t),n.onunhandledrejection&&function(t){Ct((n=>{const{stackParser:e,attachStacktrace:r}=Bs();if(Bn()!==t||Gi())return;const i=function(t){if(u(t))return t;const n=t;try{if("reason"in n)return n.reason;if("detail"in n&&"reason"in n.detail)return n.detail.reason}catch(t){}return t}(n),s=u(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:rs(e,i,void 0,r,!0);s.level="error",Fn(s,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}(t)}}},Hs=er(qs,Fs);function Us(t,n,e,r){const i=t.exception=t.exception||{},s=i.values=i.values||[],c=s[0]=s[0]||{},u=c.stacktrace=c.stacktrace||{},a=u.frames=u.frames||[],h=isNaN(parseInt(r,10))?void 0:r,f=isNaN(parseInt(e,10))?void 0:e,d=o(n)&&n.length>0?n:function(){try{return k.document.location.href}catch(t){return""}}();return 0===a.length&&a.push({colno:h,filename:d,function:"?",in_app:!0,lineno:f}),t}function Bs(){const t=Bn();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Ws="HttpContext",zs=()=>({name:Ws,setupOnce(){},preprocessEvent(t){if(!zi.navigator&&!zi.location&&!zi.document)return;const n=t.request&&t.request.url||zi.location&&zi.location.href,{referrer:e}=zi.document||{},{userAgent:r}=zi.navigator||{},i={...t.request&&t.request.headers,...e&&{Referer:e},...r&&{"User-Agent":r}},s={...t.request,...n&&{url:n},headers:i};t.request=s}}),Xs=er(Ws,zs),Gs="LinkedErrors",Js=(t={})=>{const n=t.limit||5,e=t.key||"cause";return{name:Gs,setupOnce(){},preprocessEvent(t,r,i){const s=i.getOptions();b(Vi,s.stackParser,s.maxValueLength,e,n,t,r)}}},Ks=er(Gs,Js),Vs=["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"],Ys="TryCatch",Qs=(t={})=>{const n={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:Ys,setupOnce(){n.setTimeout&&F(zi,"setTimeout",to),n.setInterval&&F(zi,"setInterval",to),n.requestAnimationFrame&&F(zi,"requestAnimationFrame",no),n.XMLHttpRequest&&"XMLHttpRequest"in zi&&F(XMLHttpRequest.prototype,"send",eo);const t=n.eventTarget;if(t){(Array.isArray(t)?t:Vs).forEach(ro)}}}},Zs=er(Ys,Qs);function to(t){return function(...n){const e=n[0];return n[0]=Ki(e,{mechanism:{data:{function:Z(t)},handled:!1,type:"instrument"}}),t.apply(this,n)}}function no(t){return function(n){return t.apply(this,[Ki(n,{mechanism:{data:{function:"requestAnimationFrame",handler:Z(t)},handled:!1,type:"instrument"}})])}}function eo(t){return function(...n){const e=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((t=>{t in e&&"function"==typeof e[t]&&F(e,t,(function(n){const e={mechanism:{data:{function:t,handler:Z(n)},handled:!1,type:"instrument"}},r=B(n);return r&&(e.mechanism.data.handler=Z(r)),Ki(n,e)}))})),t.apply(this,n)}}function ro(t){const n=zi,e=n[t]&&n[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(F(e,"addEventListener",(function(n){return function(e,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=Ki(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Z(r),target:t},handled:!1,type:"instrument"}}))}catch(t){}return n.apply(this,[e,Ki(r,{mechanism:{data:{function:"addEventListener",handler:Z(r),target:t},handled:!1,type:"instrument"}}),i])}})),F(e,"removeEventListener",(function(t){return function(n,e,r){const i=e;try{const e=i&&i.__sentry_wrapped__;e&&t.call(this,n,e,r)}catch(t){}return t.call(this,n,i,r)}})))}const io=[vr(),Tr(),Qs(),Cs(),Fs(),Js(),Ms(),zs()];function so(t){return[...io]}var oo=Object.freeze({__proto__:null,GlobalHandlers:Hs,TryCatch:Zs,Breadcrumbs:js,LinkedErrors:Ks,HttpContext:Xs,Dedupe:Ds});let co={};zi.Sentry&&zi.Sentry.Integrations&&(co=zi.Sentry.Integrations);const uo={...co,...Mr,...oo};return uo.Replay=Sn,uo.BrowserTracing=Hi,Wi(),t.Breadcrumbs=js,t.BrowserClient=cs,t.BrowserTracing=Hi,t.Dedupe=Ds,t.Feedback=wn,t.FunctionToString=Er,t.GlobalHandlers=Hs,t.HttpContext=Xs,t.Hub=ce,t.InboundFilters=yr,t.Integrations=uo,t.LinkedErrors=Ks,t.Replay=Sn,t.SDK_VERSION=ie,t.SEMANTIC_ATTRIBUTE_SENTRY_OP=Me,t.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN=De,t.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE=Re,t.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE=je,t.Scope=ee,t.Span=Le,t.TryCatch=Zs,t.WINDOW=zi,t.addBreadcrumb=Hn,t.addEventProcessor=function(t){const n=Bn();n&&n.addEventProcessor&&n.addEventProcessor(t)},t.addExtensionMethods=Wi,t.addGlobalEventProcessor=$n,t.addIntegration=function(t){const n=Bn();n&&n.addIntegration&&n.addIntegration(t)},t.breadcrumbsIntegration=Cs,t.browserApiErrorsIntegration=Qs,t.browserTracingIntegration=function(t={}){const n=t;return"boolean"==typeof t.markBackgroundSpan&&(n.markBackgroundTransactions=t.markBackgroundSpan),"boolean"==typeof t.instrumentPageLoad&&(n.startTransactionOnPageLoad=t.instrumentPageLoad),"boolean"==typeof t.instrumentNavigation&&(n.startTransactionOnLocationChange=t.instrumentNavigation),new Hi(n)},t.captureEvent=Fn,t.captureException=captureException,t.captureMessage=function(t,n){const e="string"==typeof n?n:void 0,r="string"!=typeof n?{captureContext:n}:void 0;return he().captureMessage(t,e,r)},t.captureSession=Jn,t.captureUserFeedback=function(t){const n=Bn();n&&n.captureUserFeedback(t)},t.chromeStackLineParser=ms,t.close=async function(t){const n=Bn();return n?n.close(t):Promise.resolve(!1)},t.configureScope=function(t){he().configureScope(t)},t.continueTrace=({sentryTrace:t,baggage:n},e)=>{const r=Wn(),{traceparentData:i,dynamicSamplingContext:s,propagationContext:o}=function(t,n){const e=un(t),r=rn(n),{traceId:i,parentSpanId:s,parentSampled:o}=e||{};return e?{traceparentData:e,dynamicSamplingContext:r||{},propagationContext:{traceId:i||ot(),parentSpanId:s||ot().substring(16),spanId:ot().substring(16),sampled:o,dsc:r||{}}}:{traceparentData:e,dynamicSamplingContext:void 0,propagationContext:{traceId:i||ot(),spanId:ot().substring(16)}}}(t,n);r.setPropagationContext(o);const c={...i,metadata:G({dynamicSamplingContext:s})};return e?de((()=>e(c))):c},t.createTransport=fr,t.createUserFeedbackEnvelope=os,t.dedupeIntegration=Ms,t.defaultIntegrations=io,t.defaultStackLineParsers=$s,t.defaultStackParser=xs,t.endSession=Xn,t.eventFromException=ns,t.eventFromMessage=es,t.exceptionFromError=Vi,t.feedbackIntegration=function(t){return new wn({})},t.flush=async function(t){const n=Bn();return n?n.flush(t):Promise.resolve(!1)},t.forceLoad=function(){},t.functionToStringIntegration=Tr,t.geckoStackLineParser=ys,t.getActiveSpan=Te,t.getClient=Bn,t.getCurrentHub=he,t.getCurrentScope=Wn,t.getDefaultIntegrations=so,t.getHubFromCarrier=le,t.globalHandlersIntegration=Fs,t.httpContextIntegration=zs,t.inboundFiltersIntegration=vr,t.init=function(t={}){void 0===t.defaultIntegrations&&(t.defaultIntegrations=so()),void 0===t.release&&("string"==typeof __SENTRY_RELEASE__&&(t.release=__SENTRY_RELEASE__),zi.SENTRY_RELEASE&&zi.SENTRY_RELEASE.id&&(t.release=zi.SENTRY_RELEASE.id)),void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),void 0===t.sendClientReports&&(t.sendClientReports=!0);const n={...t,stackParser:(e=t.stackParser||xs,Array.isArray(e)?Y(...e):e),integrations:Ze(t),transport:t.transport||(_t()?as:hs)};var e;!function(t,n){!0===n.debug&&M((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Wn().update(n.initialScope);const e=new t(n);hr(e),function(t){t.init?t.init():t.setupIntegrations&&t.setupIntegrations()}(e)}(cs,n),t.autoSessionTracking&&function(){if(void 0===zi.document)return;zn({ignoreDuration:!0}),Jn(),Nt((({from:t,to:n})=>{void 0!==t&&t!==n&&(zn({ignoreDuration:!0}),Jn())}))}()},t.isInitialized=function(){return!!Bn()},t.lastEventId=function(){return he().lastEventId()},t.linkedErrorsIntegration=Js,t.makeFetchTransport=as,t.makeMain=ae,t.makeXHRTransport=hs,t.metrics=Rr,t.onLoad=function(t){t()},t.opera10StackLineParser=Ss,t.opera11StackLineParser=Es,t.parameterize=function(t,...n){const e=new String(String.raw(t,...n));return e.__sentry_template_string__=t.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),e.__sentry_template_values__=n,e},t.replayIntegration=function(t){return new Sn({})},t.setContext=function(t,n){he().setContext(t,n)},t.setCurrentClient=hr,t.setExtra=function(t,n){he().setExtra(t,n)},t.setExtras=function(t){he().setExtras(t)},t.setTag=function(t,n){he().setTag(t,n)},t.setTags=function(t){he().setTags(t)},t.setUser=function(t){he().setUser(t)},t.showReportDialog=(t={},n=he())=>{if(!zi.document)return;const{client:e,scope:r}=n.getStackTop(),i=t.dsn||e&&e.getDsn();if(!i)return;r&&(t.user={...r.getUser(),...t.user}),t.eventId||(t.eventId=n.lastEventId());const s=zi.document.createElement("script");s.async=!0,s.crossOrigin="anonymous",s.src=function(t,n){const e=P(t);if(!e)return"";const r=`${Ke(e)}embed/error-page/`;let i=`dsn=${L(e)}`;for(const t in n)if("dsn"!==t&&"onClose"!==t)if("user"===t){const t=n.user;if(!t)continue;t.name&&(i+=`&name=${encodeURIComponent(t.name)}`),t.email&&(i+=`&email=${encodeURIComponent(t.email)}`)}else i+=`&${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`;return`${r}?${i}`}(i,t),t.onLoad&&(s.onload=t.onLoad);const{onClose:o}=t;if(o){const t=n=>{if("__sentry_reportdialog_closed__"===n.data)try{o()}finally{zi.removeEventListener("message",t)}};zi.addEventListener("message",t)}const c=zi.document.head||zi.document.body;c&&c.appendChild(s)},t.startInactiveSpan=Se,t.startSession=zn,t.startSpan=function(t,n){const e=$e(t);return de((()=>Un(t.scope,(r=>{const i=he(),s=r.getSpan(),o=t.onlyIfParent&&!s?void 0:Ee(i,{parentSpan:s,spanContext:e,forceTransaction:t.forceTransaction,scope:r});return _e((()=>n(o)),(()=>{if(o){const{status:t}=Dn(o);t&&"ok"!==t||o.setStatus("internal_error")}}),(()=>o&&o.end()))}))))},t.startSpanManual=function(t,n){const e=$e(t);return de((()=>Un(t.scope,(r=>{const i=he(),s=r.getSpan(),o=t.onlyIfParent&&!s?void 0:Ee(i,{parentSpan:s,spanContext:e,forceTransaction:t
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|M男之家

GMT+8, 2026-11-11 14:32 , Processed in 0.089409 second(s), 22 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表