@objectstack/console 16.0.0-rc.1 → 16.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.objectui-sha +1 -1
- package/dist/assets/{AdapterProvider-DkXaFA1A.js → AdapterProvider-C6zOh6HD.js} +1 -1
- package/dist/assets/{AiPendingActionsPage-C1pkyzWu.js → AiPendingActionsPage-CnAw7P3v.js} +1 -1
- package/dist/assets/{ApiConsolePage-BCujjvCA.js → ApiConsolePage-BI45__VZ.js} +1 -1
- package/dist/assets/{AppDocsIndex-DwtDfwnR.js → AppDocsIndex-f25vfEKO.js} +1 -1
- package/dist/assets/{AppManagementPage-KPrmIA-f.js → AppManagementPage-Bg9uJgOg.js} +1 -1
- package/dist/assets/{ApprovalsInboxPage-DFQUv0F_.js → ApprovalsInboxPage-DNHuqeXG.js} +1 -1
- package/dist/assets/{AuditLogPage-BNkFvefV.js → AuditLogPage-B7miw4yM.js} +1 -1
- package/dist/assets/{ComponentNavView-FTFk3uvC.js → ComponentNavView-hbkzWx99.js} +1 -1
- package/dist/assets/CreateViewDialog-C9MmF1EQ.js +1 -0
- package/dist/assets/{DashboardView-Y6nIjjJB.js → DashboardView-B5fvjbK1.js} +1 -1
- package/dist/assets/{DeveloperHubPage-CYPM3AvL.js → DeveloperHubPage-CLMxDfF8.js} +1 -1
- package/dist/assets/{DocShell-DnXj6ocC.js → DocShell-Xat5mAFu.js} +1 -1
- package/dist/assets/{FlowRunsPage-BAbmqrqx.js → FlowRunsPage-D3geofgO.js} +1 -1
- package/dist/assets/{IntegrationsPage-CyD9iolE.js → IntegrationsPage-BomrdGvC.js} +1 -1
- package/dist/assets/{InterfaceListPage-DdaX7c_c.js → InterfaceListPage-B-1CV8r_.js} +1 -1
- package/dist/assets/{ManagedByBadge-DbYycO1m.js → ManagedByBadge-B6i8b85J.js} +1 -1
- package/dist/assets/MarketplaceAccessDenied-CB0BqpZm.js +1 -0
- package/dist/assets/{MarketplaceInstalledPage-BtD9NMRl.js → MarketplaceInstalledPage-k4tMP5Il.js} +1 -1
- package/dist/assets/{MarketplacePackagePage-DHrjr3jY.js → MarketplacePackagePage-DFu-NbiT.js} +1 -1
- package/dist/assets/{MarketplacePage-Dw2yHsdE.js → MarketplacePage-hFFqWDhG.js} +1 -1
- package/dist/assets/MetadataInspector-GuDvqIYj.js +1 -0
- package/dist/assets/{MetadataProvider-BnfG1pyl.js → MetadataProvider-1pC12cNH.js} +1 -1
- package/dist/assets/ObjectDataPage-BXb8qS_O.js +1 -0
- package/dist/assets/{PageView-jtsz_IPE.js → PageView-CJffWMXV.js} +1 -1
- package/dist/assets/{ProfilePage-BhlwjGUP.js → ProfilePage-giyDPnkE.js} +1 -1
- package/dist/assets/PublicFormsPage-CvTGsvEk.js +1 -0
- package/dist/assets/RecordDetailView-BWj_n2Xd.js +9 -0
- package/dist/assets/{RecordFormPage-BRDfPdPg.js → RecordFormPage-DaAXyIFl.js} +1 -1
- package/dist/assets/ReportDefaultInspector-nzEI_7uY.js +3 -0
- package/dist/assets/ReportView-BkvoSROz.js +2 -0
- package/dist/assets/{SearchResultsPage-0pCQZ9_u.js → SearchResultsPage-Badp3TZy.js} +1 -1
- package/dist/assets/{SettingsHub-DqS8nfs-.js → SettingsHub-CLEl9yB4.js} +1 -1
- package/dist/assets/{SettingsView-DHrrHsbU.js → SettingsView-D48FlZZ-.js} +1 -1
- package/dist/assets/{SystemHubPage-BWPXrnc9.js → SystemHubPage-Bcedpt6c.js} +1 -1
- package/dist/assets/{useMetadata-Byeqylbl.js → createDerive-CoXOsdH9.js} +1 -1
- package/dist/assets/data-adapter-C-CzgrY8.js +9 -0
- package/dist/assets/{getIcon-EzAarNT8.js → getIcon-CHjgso2Q.js} +1 -1
- package/dist/assets/{highlighted-body-OFNGDK62-3tGE6imP.js → highlighted-body-OFNGDK62-iRcLhe8Y.js} +1 -1
- package/dist/assets/{i18n-CWIk44wT.js → i18n-BBfFXbqS.js} +1 -1
- package/dist/assets/{index-LuGaXtX0.js → index-DQKFSIRa.js} +1 -1
- package/dist/assets/index-De6xiiED.css +2 -0
- package/dist/assets/mermaid-GHXKKRXX-o9V61CTW.js +1 -0
- package/dist/assets/metadata-admin-DUDb4_-I.js +25 -0
- package/dist/assets/{plugin-calendar-Bx_Bsdae.js → plugin-calendar-BwqRXov_.js} +1 -1
- package/dist/assets/plugin-charts-DFywQsyC.js +7 -0
- package/dist/assets/plugin-chatbot-ChDQ0sZw.js +120 -0
- package/dist/assets/{plugin-dashboard-D2VhHDxA.js → plugin-dashboard-LbTxdFyx.js} +3 -3
- package/dist/assets/{plugin-form-HMQsT2Tp.js → plugin-form-B69IWc-v.js} +1 -1
- package/dist/assets/{plugin-gantt-CMpG3oO4.js → plugin-gantt-DNfSxpfa.js} +2 -2
- package/dist/assets/plugin-grid-D5ooeMq3.js +8 -0
- package/dist/assets/plugin-kanban-CDv0cMku.js +1 -0
- package/dist/assets/{plugin-map-zagD7Zuk.js → plugin-map-CFb9fmBs.js} +1 -1
- package/dist/assets/{plugin-markdown-DtcSX8M_.js → plugin-markdown-BxslElNy.js} +1 -1
- package/dist/assets/{plugin-report-BRs6v5vb.js → plugin-report-DEkf0Fe2.js} +1 -1
- package/dist/assets/{plugin-timeline-Cl8J9HYj.js → plugin-timeline-DUw-qsiu.js} +1 -1
- package/dist/assets/{plugin-tree-B3zTpUOf.js → plugin-tree-8wyez9hx.js} +1 -1
- package/dist/assets/plugin-view-baVOQ3XC.js +1 -0
- package/dist/assets/plugins-views-Bi6X55Wz.js +4 -0
- package/dist/assets/runtime-metadata-persistence-Clk8TRxl.js +1 -0
- package/dist/assets/{skeletons-CPF9cI6N.js → skeletons-D8fbNHVX.js} +1 -1
- package/dist/assets/src-BEYY1hUL.js +19 -0
- package/dist/assets/{src-A4S4Zx5p.js → src-DM9imiv_.js} +1 -1
- package/dist/assets/src-IWc9jIui.js +1 -0
- package/dist/assets/{types-CtGENai_.js → types-DwzGXr-7.js} +1 -1
- package/dist/assets/{ui-components-D1psd5qA.js → ui-components-BDIRZFoR.js} +11 -11
- package/dist/assets/{ui-layout-UgL2qgLW.js → ui-layout-ZABgadCW.js} +1 -1
- package/dist/assets/{use-book-data-CWCLCSUn.js → use-book-data-C4CaJKQX.js} +1 -1
- package/dist/assets/{vendor-i18n-ByHglwq-.js → vendor-i18n-D2ce6sLS.js} +1 -1
- package/dist/assets/vendor-radix-B1fu-dZi.js +46 -0
- package/dist/assets/{vendor-sentry-C3ouQ5cr.js → vendor-sentry-BFtl-K03.js} +25 -25
- package/dist/index.html +4 -4
- package/package.json +1 -1
- package/dist/assets/CreateViewDialog-DTzKynzF.js +0 -1
- package/dist/assets/MarketplaceAccessDenied-Csr3Jh7C.js +0 -1
- package/dist/assets/MetadataInspector-C6pU5_lx.js +0 -1
- package/dist/assets/ObjectDataPage-BA93ldBf.js +0 -1
- package/dist/assets/PublicFormsPage-D5kg7qJa.js +0 -1
- package/dist/assets/RecordDetailView-F0k3QMTV.js +0 -9
- package/dist/assets/ReportDefaultInspector-CYCJDOVb.js +0 -3
- package/dist/assets/ReportView-Dtz9IJbH.js +0 -2
- package/dist/assets/data-adapter-BR5P3Htq.js +0 -9
- package/dist/assets/index-D3TWmLHH.css +0 -2
- package/dist/assets/mermaid-GHXKKRXX-btdeklf1.js +0 -1
- package/dist/assets/metadata-admin-Buf34qxl.js +0 -25
- package/dist/assets/plugin-charts-DqND8tT3.js +0 -7
- package/dist/assets/plugin-chatbot-DwbSyUax.js +0 -120
- package/dist/assets/plugin-grid-Dz4WW_sQ.js +0 -8
- package/dist/assets/plugin-kanban-fgScBnfP.js +0 -1
- package/dist/assets/plugin-view-BDYhOlHx.js +0 -1
- package/dist/assets/plugins-views-Dc4ARhcP.js +0 -4
- package/dist/assets/runtime-metadata-persistence-D1KKivGr.js +0 -1
- package/dist/assets/src-By-rFjBo.js +0 -1
- package/dist/assets/src-CRFYUj2Z.js +0 -19
- package/dist/assets/vendor-radix-CWCRv2pn.js +0 -46
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import{o as e,r as t}from"./rolldown-runtime-DAXXjFlN.js";import{y as n}from"./vendor-react-BKSb6vFP.js";var r=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,i=globalThis,a=`10.
|
|
1
|
+
import{o as e,r as t}from"./rolldown-runtime-DAXXjFlN.js";import{y as n}from"./vendor-react-BKSb6vFP.js";var r=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,i=globalThis,a=`10.66.0`;function o(){return s(i),i}function s(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||`10.66.0`,t[a]=t[`10.66.0`]||{}}function c(e,t,n=i){let r=n.__SENTRY__=n.__SENTRY__||{},o=r[a]=r[`10.66.0`]||{};return o[e]||(o[e]=t())}var l=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],u=`Sentry Logger `,d={};function f(e){if(!(`console`in i))return e();let t=i.console,n={},r=Object.keys(d);r.forEach(e=>{let r=d[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function p(){b().enabled=!0}function m(){b().enabled=!1}function h(){return b().enabled}function g(...e){y(`log`,...e)}function _(...e){y(`warn`,...e)}function v(...e){y(`error`,...e)}function y(e,...t){r&&h()&&f(()=>{i.console[e](`${u}[${e}]:`,...t)})}function b(){return r?c(`loggerSettings`,()=>({enabled:!1})):{enabled:!1}}var x={enable:p,disable:m,isEnabled:h,log:g,warn:_,error:v},S=50,C=/\(error: (.*)\)/,w=/captureMessage|captureException/;function T(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{let i=[],a=e.split(`
|
|
2
2
|
`);for(let e=n;e<a.length;e++){let n=a[e];n.length>1024&&(n=n.slice(0,1024));let o=C.test(n)?n.replace(C,`$1`):n;if(!o.includes(`Error: `)){for(let e of t){let t=e(o);if(t){i.push(t);break}}if(i.length>=S+r)break}}return te(i.slice(r))}}function ee(e){return Array.isArray(e)?T(...e):e}function te(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(ne(t).function||``)&&t.pop(),t.reverse(),w.test(ne(t).function||``)&&(t.pop(),w.test(ne(t).function||``)&&t.pop()),t.slice(0,S).map(e=>({...e,filename:e.filename||ne(t).filename,function:e.function||`?`}))}function ne(e){return e[e.length-1]||{}}var re=`<anonymous>`;function ie(e){try{return!e||typeof e!=`function`?re:e.name||re}catch{return re}}function ae(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}function oe(e){let t=e?.startsWith(`file://`)?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}var se={},E={};function ce(e,t){return se[e]=se[e]||[],se[e].push(t),()=>{let n=se[e];if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}function le(e,t){if(!E[e]){E[e]=!0;try{t()}catch(t){r&&x.error(`Error while instrumenting ${e}`,t)}}}function ue(e,t){let n=e&&se[e];if(n)for(let i of n)try{i(t)}catch(t){r&&x.error(`Error while triggering instrumentation handler.
|
|
3
3
|
Type: ${e}
|
|
4
4
|
Name: ${ie(i)}
|
|
5
|
-
Error:`,t)}}var de=null;function fe(e){let t=`error`;ce(t,e),le(t,pe)}function pe(){de=i.onerror,i.onerror=function(e,t,n,r,i){return ue(`error`,{column:r,error:i,line:n,msg:e,url:t}),de?de.apply(this,arguments):!1},i.onerror.__SENTRY_INSTRUMENTED__=!0}var me=null;function he(e){let t=`unhandledrejection`;ce(t,e),le(t,ge)}function ge(){me=i.onunhandledrejection,i.onunhandledrejection=function(e){return ue(`unhandledrejection`,e),!me||me.apply(this,arguments)},i.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var _e=Object.prototype.toString;function ve(e){switch(_e.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return je(e,Error)}}function ye(e,t){return _e.call(e)===`[object ${t}]`}function be(e){return ye(e,`ErrorEvent`)}function xe(e){return ye(e,`DOMError`)}function Se(e){return ye(e,`DOMException`)}function Ce(e){return ye(e,`String`)}function we(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function Te(e){return e===null||we(e)||typeof e!=`object`&&typeof e!=`function`}function Ee(e){return ye(e,`Object`)}function De(e){return typeof e==`object`&&!!e}function Oe(e){return typeof Event<`u`&&je(e,Event)}function ke(e){return ye(e,`RegExp`)}function Ae(e){return!!(e?.then&&typeof e.then==`function`)}function je(e,t){try{return e instanceof t}catch{return!1}}function Me(e){return typeof Request<`u`&&je(e,Request)}function Ne(e,t,n){if(!(t in e))return;let i=e[t];if(typeof i!=`function`)return;let a=n(i);typeof a==`function`&&Pe(a,i);try{e[t]=a}catch{r&&x.log(`Failed to replace method "${t}" in object`,e)}}function D(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{r&&x.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function Pe(e,t){try{e.prototype=t.prototype=t.prototype||{},D(e,`__sentry_original__`,t)}catch{}}function Fe(e){return e.__sentry_original__}function Ie(e){if(ve(e))return{message:e.message,name:e.name,stack:e.stack,...Le(e)};if(Oe(e)){let{type:t,target:n,currentTarget:r,detail:i}=e;return{type:t,target:n,currentTarget:r,...i?{detail:i}:{},...Le(e)}}return e}function Le(e){return De(e)?Object.fromEntries(Object.entries(e)):{}}function Re(e){let t=Object.keys(Ie(e));return t.sort(),t[0]?t.join(`, `):`[object has no keys]`}var ze;function Be(e){if(ze!==void 0)return ze?ze(e):e();let t=Symbol.for(`__SENTRY_SAFE_RANDOM_ID_WRAPPER__`),n=i;return t in n&&typeof n[t]==`function`?(ze=n[t],ze(e)):(ze=null,e())}function Ve(){return Be(()=>Math.random())}function He(){return Be(()=>Date.now())}var Ue=Symbol.for(`sentry.skipNormalization`),We=Symbol.for(`sentry.overrideNormalizationDepth`);function Ge(e){D(e,Ue,!0)}function Ke(e,t){D(e,We,t)}function qe(e){return!!e[Ue]}function Je(e){let t=e[We];return typeof t==`number`?t:void 0}var Ye;function Xe(e){Ye=e}function Ze(e,t=100,n=1/0){try{return $e(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Qe(e,t=3,n=100*1024){let r=Ze(e,t);return rt(r)>n?Qe(e,t-1,n):r}function $e(e,t,n=1/0,r=1/0,i=it()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=et(e,t);if(!s.startsWith(`[object `))return s;if(qe(t))return t;let c=Je(t),l=c===void 0?n:c;if(l===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let u=t;if(u&&typeof u.toJSON==`function`)try{return $e(``,u.toJSON(),l-1,r,i)}catch{}let d=Array.isArray(t)?[]:{},f=0,p=Ie(t);for(let e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(f>=r){d[e]=`[MaxProperties ~]`;break}let t=p[e];d[e]=$e(e,t,l-1,r,i),f++}return o(t),d}function et(e,t){try{if(Ye){let e=Ye(t);if(e)return e}return typeof global<`u`&&t===global?`[Global]`:typeof t==`number`&&!Number.isFinite(t)?`[${t}]`:typeof t==`function`?`[Function: ${ie(t)}]`:typeof t==`symbol`?`[${String(t)}]`:typeof t==`bigint`?`[BigInt: ${String(t)}]`:`[object ${tt(t)}]`}catch(e){return`**non-serializable** (${e})`}}function tt(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function nt(e){return~-encodeURI(e).split(/%..|./).length}function rt(e){return nt(JSON.stringify(e))}function it(){let e=new WeakSet;function t(t){return e.has(t)?!0:(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}function at(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function ot(e,t){let n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let a=Math.min(i+140,r);return a>r-5&&(a=r),a===r&&(i=Math.max(a-140,0)),n=n.slice(i,a),i>0&&(n=`'{snip} ${n}`),a<r&&(n+=` {snip}`),n}function st(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];Te(r)?n.push(String(r)):r instanceof Error?n.push(r.message?`${r.name}: ${r.message}`:r.name):n.push(et(void 0,r))}return n.join(t)}function ct(e,t,n=!1){return Ce(e)?ke(t)?t.test(e):Ce(t)?n?e===t:e.includes(t):typeof t==`function`&&t(e):!1}function lt(e,t=[],n=!1){for(let r of t)if(ct(e,r,n))return!0;return!1}function ut(){let e=i;return e.crypto||e.msCrypto}var dt;function ft(){return Ve()*16}function pt(e=ut()){try{if(e?.randomUUID)return Be(()=>e.randomUUID()).replace(/-/g,``)}catch{}return dt||=`10000000100040008000100000000000`,dt.replace(/[018]/g,e=>(e^(ft()&15)>>e/4).toString(16))}function mt(e){return e.exception?.values?.[0]}function ht(e){let{message:t,event_id:n}=e;if(t)return t;let r=mt(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function gt(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function _t(e,t){let n=mt(e);if(!n)return;let r={type:`generic`,handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&`data`in t){let e={...i?.data,...t.data};n.mechanism.data=e}}function vt(e,t,n=5){if(t.lineno===void 0)return;let r=e.length,i=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,i-n),i).map(e=>ot(e,0)),t.context_line=ot(e[Math.min(r-1,i)],t.colno||0),t.post_context=e.slice(Math.min(i+1,r),i+1+n).map(e=>ot(e,0))}function yt(e){if(bt(e))return!0;try{D(e,`__sentry_captured__`,!0)}catch{}return!1}function bt(e){try{return e.__sentry_captured__}catch{}}var xt=1e3;function St(){return He()/xt}function Ct(){let{performance:e}=i;if(!e?.now||!e.timeOrigin)return St;let t=e.timeOrigin;return()=>(t+Be(()=>e.now()))/xt}var wt;function O(){return(wt??=Ct())()}var Tt=null;function Et(){let{performance:e}=i;if(!e?.now)return;let t=3e5,n=Be(()=>e.now()),r=He(),a=e.timeOrigin;if(typeof a==`number`&&Math.abs(a+n-r)<t)return a;let o=e.timing?.navigationStart;return typeof o==`number`&&Math.abs(o+n-r)<t?o:r-n}function Dt(){return Tt===null&&(Tt=Et()),Tt}function Ot(e){let t=O(),n={sid:pt(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>jt(n)};return e&&kt(n,e),n}function kt(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||O(),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:pt()),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{let t=e.timestamp-e.started;e.duration=t>=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),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function At(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),kt(e,n)}function jt(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did==`number`||typeof e.did==`string`?`${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}}}function Mt(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=Mt(r[e],t[e],n-1));return r}function Nt(){return pt()}function Pt(){return pt().substring(16)}function Ft(e){try{let t=i.WeakRef;if(typeof t==`function`)return new t(e)}catch{}return e}function It(e){if(e){if(typeof e==`object`&&`deref`in e&&typeof e.deref==`function`)try{return e.deref()}catch{return}return e}}var Lt=`_sentrySpan`;function Rt(e,t){t?D(e,Lt,Ft(t)):delete e[Lt]}function zt(e){return It(e[Lt])}var Bt=100,Vt=class e{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:Nt(),sampleRand:Ve()}}clone(){let t=new e;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,Rt(t,zt(this)),t}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&&kt(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],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 t===null?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(t){if(!t)return this;let n=typeof t==`function`?t(this):t,{tags:r,attributes:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u,conversationId:d}=(n instanceof e?n.getScopeData():Ee(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),d&&(this._conversationId=d),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,Rt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Nt(),sampleRand:Ve()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:Bt;if(n<=0)return this;let r={timestamp:St(),...e,message:e.message?at(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,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:zt(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Mt(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t?.event_id||pt();if(!this._client)return r&&x.warn(`No client configured on scope - will not capture exception!`),n;let i=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:i,...t,event_id:n},this),n}captureMessage(e,t,n){let i=n?.event_id||pt();if(!this._client)return r&&x.warn(`No client configured on scope - will not capture message!`),i;let a=n?.syntheticException??Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:a,...n,event_id:i},this),i}captureEvent(e,t){let n=e.event_id||t?.event_id||pt();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(r&&x.warn(`No client configured on scope - will not capture event!`),n)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}};function Ht(){return c(`defaultCurrentScope`,()=>new Vt)}function Ut(){return c(`defaultIsolationScope`,()=>new Vt)}var Wt=e=>e instanceof Promise&&!e[Gt],Gt=Symbol(`chained PromiseLike`),Kt=(e,t,n)=>{let r=e.then(e=>(t(e),e),e=>{throw n(e),e});return Wt(r)&&Wt(e)?r:qt(e,r)},qt=(e,t)=>{if(!t)return e;let n=!1;for(let r in e){if(r in t)continue;n=!0;let i=e[r];typeof i==`function`?Object.defineProperty(t,r,{value:(...t)=>i.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[Gt]:!0}),t},Jt=class{constructor(e,t){let n;n=e||new Vt;let r;r=t||new Vt,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return Ae(n)?Kt(n,()=>this._popScope(),()=>this._popScope()):(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(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function Yt(){let e=s(o());return e.stack=e.stack||new Jt(Ht(),Ut())}function Xt(e){return Yt().withScope(e)}function Zt(e,t){let n=Yt();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Qt(e){return Yt().withScope(()=>e(Yt().getIsolationScope()))}function $t(){return{withIsolationScope:Qt,withScope:Xt,withSetScope:Zt,withSetIsolationScope:(e,t)=>Qt(t),getCurrentScope:()=>Yt().getScope(),getIsolationScope:()=>Yt().getIsolationScope()}}function en(e){let t=s(e);return t.acs?t.acs:$t()}function tn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.keys(e).includes(`value`)}function nn(e,t){let{value:n,unit:r}=tn(e)?e:{value:e,unit:void 0},i=sn(n),a=r&&typeof r==`string`?{unit:r}:{};if(i)return{...i,...a};if(!t||t===`skip-undefined`&&n===void 0)return;let o=``;try{o=JSON.stringify(n)??``}catch{}return{value:o,type:`string`,...a}}function rn(e,t=!1){let n={};for(let[r,i]of Object.entries(e??{})){let e=nn(i,t);e&&(n[r]=e)}return n}function an(e){if(!e)return 0;let t=0;for(let[n,r]of Object.entries(e)){t+=n.length*2,t+=r.type.length*2,t+=(r.unit?.length??0)*2;let e=r.value;Array.isArray(e)?t+=on(e[0])*e.length:Te(e)?t+=on(e):t+=100}return t}function on(e){return typeof e==`string`?e.length*2:typeof e==`boolean`?4:typeof e==`number`?8:0}function sn(e){if(Array.isArray(e))return{value:e,type:`array`};let t=typeof e==`string`?`string`:typeof e==`boolean`?`boolean`:typeof e==`number`&&!Number.isNaN(e)?Number.isInteger(e)?`integer`:`double`:null;if(t)return{value:e,type:t}}var cn;function ln(){return cn?.()}function un(){return cn!==void 0}function k(){return en(o()).getCurrentScope()}function A(){return en(o()).getIsolationScope()}function dn(){return c(`globalScope`,()=>new Vt)}function fn(...e){let t=en(o());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function pn(...e){let t=en(o());if(e.length===2){let[n,r]=e;return n?t.withSetIsolationScope(n,r):t.withIsolationScope(r)}return t.withIsolationScope(e[0])}function j(){return k().getClient()}function mn(e){let t=ln();if(t)return{trace_id:t.traceId,span_id:t.spanId};let{traceId:n,parentSpanId:r,propagationSpanId:i}=e.getPropagationContext(),a={trace_id:n,span_id:i||Pt()};return r&&(a.parent_span_id=r),a}var M=`sentry.source`,hn=`sentry.sample_rate`,gn=`sentry.previous_trace_sample_rate`,N=`sentry.op`,P=`sentry.origin`,_n=`sentry.idle_span_finish_reason`,vn=`sentry.measurement_unit`,yn=`sentry.measurement_value`,bn=`sentry.release`,xn=`sentry.environment`,Sn=`sentry.sdk.integrations`,Cn=`user.id`,wn=`user.email`,Tn=`user.ip_address`,En=`user.name`,Dn=`sentry.custom_span_name`,On=`sentry.profile_id`,kn=`sentry.exclusive_time`,An=`url.full`,jn=`sentry.link.type`,Mn=`gen_ai.conversation.id`;function Nn(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:`internal_error`}}function Pn(e,t){e.setAttribute(`http.response.status_code`,t);let n=Nn(t);n.message!==`unknown_error`&&e.setStatus(n)}var Fn=`_sentryScope`,In=`_sentryIsolationScope`,Ln=Symbol.for(`sentry.otelSourceInference`),Rn=Symbol.for(`sentry.otelSourceExplicitlySet`),zn=Symbol.for(`sentry.tracerProviderSpan`);function Bn(e,t,n){e&&(D(e,In,Ft(n)),D(e,Fn,t))}function Vn(e){let t=e;return{scope:t[Fn],isolationScope:It(t[In])}}function Hn(e){return e[Ln]===!0}function Un(e){D(e,Rn,!0)}function Wn(e){return e[zn]===!0}var Gn=`sentry-`;function Kn(e){let t=Jn(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(`sentry-`)){let r=t.slice(7);e[r]=n}return e},{});if(Object.keys(n).length>0)return n}function qn(e){if(e)return Xn(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${Gn}${t}`]=n),e),{}))}function Jn(e){if(!(!e||!Ce(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=Yn(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):Yn(e)}function Yn(e){return e.split(`,`).map(e=>{let t=e.indexOf(`=`);return t===-1?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}function Xn(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((e,[t,n],i)=>{let a=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,o=i===0?a:`${e},${a}`;return o.length>8192?(r&&x.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):o},``)}var Zn=/^o(\d+)\./,Qn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function $n(e){return e===`http`||e===`https`}function er(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function tr(e){let t=Qn.exec(e);if(!t){f(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,l=s,u=l.split(`/`);if(u.length>1&&(c=u.slice(0,-1).join(`/`),l=u.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return nr({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}function nr(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function rr(e){if(!r)return!0;let{port:t,projectId:n,protocol:i}=e;return[`protocol`,`publicKey`,`host`,`projectId`].find(t=>e[t]?!1:(x.error(`Invalid Sentry Dsn: ${t} missing`),!0))?!1:n.match(/^\d+$/)?$n(i)?t&&isNaN(parseInt(t,10))?(x.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(x.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),!1):(x.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function ir(e){return e.match(Zn)?.[1]}function ar(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=ir(n)),r}function or(e){let t=typeof e==`string`?tr(e):nr(e);if(!(!t||!rr(t)))return t}function sr(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t}var cr=RegExp(`^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$`);function lr(e){if(!e)return;let t=e.match(cr);if(!t)return;let n;return t[3]===`1`?n=!0:t[3]===`0`&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function ur(e,t){let n=lr(e),r=Kn(t);if(!n?.traceId)return{traceId:Nt(),sampleRand:Ve()};let i=pr(n,r);r&&(r.sample_rand=i.toString());let{traceId:a,parentSpanId:o,parentSampled:s}=n;return{traceId:a,parentSpanId:o,sampled:s,dsc:r||{},sampleRand:i}}function dr(e=Nt(),t=Pt(),n){let r=``;return n!==void 0&&(r=n?`-1`:`-0`),`${e}-${t}${r}`}function fr(e=Nt(),t=Pt(),n){return`00-${e}-${t}-${n?`01`:`00`}`}function pr(e,t){let n=sr(t?.sample_rand);if(n!==void 0)return n;let r=sr(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Ve()*r:r+Ve()*(1-r):Ve()}function mr(e,t){let n=ar(e);return t&&n&&t!==n?(x.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${n})`),!1):e.getOptions().strictTraceContinuation&&(t&&!n||!t&&n)?(x.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${t}, Sentry client: ${n})`),!1):!0}var hr=!1;function gr(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:a,status:o,origin:s,links:c}=F(e);return{parent_span_id:a,span_id:t,trace_id:n,data:r,op:i,status:o,origin:s,links:c}}function _r(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:F(e).parent_span_id,a=Vn(e).scope;return{parent_span_id:i,span_id:r?a?.getPropagationContext().propagationSpanId||Pt():t,trace_id:n}}function vr(e){let{traceId:t,spanId:n}=e.spanContext();return dr(t,n,kr(e))}function yr(e){let{traceId:t,spanId:n}=e.spanContext();return fr(t,n,kr(e))}function br(e){if(e&&e.length>0)return e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:n===1,attributes:i,...r}))}function xr(e){if(e?.length)return e.map(({context:{spanId:e,traceId:t,traceFlags:n},attributes:r})=>({span_id:e,trace_id:t,sampled:n===1,attributes:r}))}function Sr(e){return typeof e==`number`?Cr(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Cr(e.getTime()):O()}function Cr(e){return e>9999999999?e/1e3:e}function F(e){if(Or(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(Dr(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:Tr(e),start_timestamp:Sr(i),timestamp:Sr(o)||void 0,status:Ar(s),op:r[N],origin:r[P],links:br(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function wr(e){if(Or(e))return e.getStreamedSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(Dr(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{name:a,span_id:t,trace_id:n,parent_span_id:Tr(e),start_timestamp:Sr(i),end_timestamp:Sr(o),is_segment:e===Rr(e),status:jr(s),attributes:Mr(r,s),links:xr(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:``,end_timestamp:0,status:`ok`,is_segment:e===Rr(e)}}function Tr(e){return`parentSpanId`in e?e.parentSpanId:`parentSpanContext`in e?e.parentSpanContext?.spanId:void 0}function Er(e){return{...e,attributes:rn(e.attributes),links:e.links?.map(e=>({...e,attributes:rn(e.attributes)}))}}function Dr(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Or(e){return typeof e.getSpanJSON==`function`}function kr(e){let{traceFlags:t}=e.spanContext();return t===1}function Ar(e){if(!(!e||e.code===0))return e.code===1?`ok`:e.message||`internal_error`}function jr(e){return!e||e.code===1||e.code===0||e.message===`cancelled`?`ok`:`error`}function Mr(e,t){let n=jr(t)===`error`?t?.message:void 0;return{...n&&{"sentry.status.message":n},...e}}var Nr=`_sentryChildSpans`,Pr=`_sentryRootSpan`;function Fr(e,t){D(t,Pr,e[Pr]||e),e[Nr]?e[Nr].add(t):D(e,Nr,new Set([t]))}function Ir(e,t){e[Nr]&&e[Nr].delete(t)}function Lr(e){let t=new Set;function n(e){if(!t.has(e)&&kr(e)){t.add(e);let r=e[Nr]?Array.from(e[Nr]):[];for(let e of r)n(e)}}return n(e),Array.from(t)}var I=Rr;function Rr(e){return e[Pr]||e}function zr(){let e=en(o());return e.getActiveSpan?e.getActiveSpan():zt(k())}function Br(){hr||=(f(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),!0)}function Vr(e,t){e.updateName(t),e.setAttributes({[M]:`custom`,[Dn]:t})}var Hr=!1;function Ur(){if(Hr)return;function e(){let e=zr(),t=e&&I(e);if(t){let e=`internal_error`;r&&x.log(`[Tracing] Root span: ${e} -> Global error occurred`),t.setStatus({code:2,message:e})}}Hr=!0,fe(e),he(e)}function Wr(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=e||j()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Gr(e){x.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Kr(e,t){if(!t?.length)return!1;for(let n of t){if(Yr(n)){if(e.description&&ct(e.description,n))return r&&Gr(e),!0;continue}let t=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!t)continue;let i=!n.name||e.description&&ct(e.description,n.name),a=!n.op||e.op&&ct(e.op,n.op),o=!n.attributes||Object.entries(n.attributes).every(([t,n])=>qr(e.attributes?.[t],n));if(i&&a&&o)return r&&Gr(e),!0}return!1}function qr(e,t){return typeof e==`string`&&(typeof t==`string`||t instanceof RegExp)?ct(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function Jr(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function Yr(e){return typeof e==`string`||e instanceof RegExp}var Xr=Symbol.for(`sentry.nonRecordingSpan`),Zr=class{constructor(e={}){this._traceId=e.traceId||Nt(),this._spanId=e.spanId||Pt(),this.dropReason=e.dropReason,D(this,Xr,!0)}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 Qr(e){return!!e&&e[Xr]===!0}var $r=`params.<key>`,ei=`sentry.sdk.name`,ti=`sentry.sdk.version`,ni=`sentry.segment.id`,ri=`sentry.segment.name`,ii=`sentry.span.source`,ai=`sentry.trace_lifecycle`,oi=`sentry.transaction`,si=`url.full`,ci=`url.path`,li=`url.path.parameter.<key>`,ui=`url.template`,di=`production`,fi=`_frozenDsc`;function pi(e,t){D(e,fi,t)}function mi(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||`production`,release:n.release,public_key:r,trace_id:e,org_id:ar(t)};return t.emit(`createDsc`,i),i}function hi(e,t){let n=t.getPropagationContext();return n.dsc||mi(n.traceId,e)}function gi(e){let t=j();if(!t)return{};let n=I(e),r=F(n),i=r.data,a=n.spanContext().traceState,o=a?.get(`sentry.sample_rate`)??i[`sentry.sample_rate`]??i[`sentry.previous_trace_sample_rate`];function s(e){return(typeof o==`number`||typeof o==`string`)&&(e.sample_rate=`${o}`),e}let c=n[fi];if(c)return s(c);if(Qr(n)&&!Wr(t.getOptions())){let e=Vn(n).scope;if(e)return s({...hi(t,e)})}let l=a?.get(`sentry.dsc`),u=l&&Kn(l);if(u)return s(u);let d=mi(e.spanContext().traceId,t),f=i[`sentry.source`]??i[`sentry.span.source`],p=r.description;return f!==`url`&&p&&(d.transaction=p),Wr()&&(d.sampled=String(kr(n)),d.sample_rand=a?.get(`sentry.sample_rand`)??Vn(n).scope?.getPropagationContext().sampleRand.toString()),s(d),t.emit(`createDsc`,d,n),d}function _i(e){return qn(gi(e))}function vi(e){return D(e,`_streamed`,!0),e}function yi(e){return!!e&&typeof e==`function`&&`_streamed`in e&&!!e._streamed}function bi(e,t=[]){return[e,t]}function xi(e,t){let[n,r]=e;return[n,[...r,t]]}function Si(e,t){let n=e[1];for(let e of n){let n=e[0].type;if(t(e,n))return!0}return!1}function Ci(e,t){return Si(e,(e,n)=>t.includes(n))}function wi(e){let t=s(i);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Ti(e){let t=s(i);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function Ei(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[wi(r),e]:r.push(typeof e==`string`?wi(e):e)}for(let e of n){let[t,n]=e;if(i(`
|
|
5
|
+
Error:`,t)}}var de=null;function fe(e){let t=`error`;ce(t,e),le(t,pe)}function pe(){de=i.onerror,i.onerror=function(e,t,n,r,i){return ue(`error`,{column:r,error:i,line:n,msg:e,url:t}),de?de.apply(this,arguments):!1},i.onerror.__SENTRY_INSTRUMENTED__=!0}var me=null;function he(e){let t=`unhandledrejection`;ce(t,e),le(t,ge)}function ge(){me=i.onunhandledrejection,i.onunhandledrejection=function(e){return ue(`unhandledrejection`,e),!me||me.apply(this,arguments)},i.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var _e=Object.prototype.toString;function ve(e){switch(_e.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return je(e,Error)}}function ye(e,t){return _e.call(e)===`[object ${t}]`}function be(e){return ye(e,`ErrorEvent`)}function xe(e){return ye(e,`DOMError`)}function Se(e){return ye(e,`DOMException`)}function Ce(e){return ye(e,`String`)}function we(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function Te(e){return e===null||we(e)||typeof e!=`object`&&typeof e!=`function`}function Ee(e){return ye(e,`Object`)}function De(e){return typeof e==`object`&&!!e}function Oe(e){return typeof Event<`u`&&je(e,Event)}function ke(e){return ye(e,`RegExp`)}function Ae(e){return!!(e?.then&&typeof e.then==`function`)}function je(e,t){try{return e instanceof t}catch{return!1}}function Me(e){return typeof Request<`u`&&je(e,Request)}function Ne(e,t,n){if(!(t in e))return;let i=e[t];if(typeof i!=`function`)return;let a=n(i);typeof a==`function`&&Pe(a,i);try{e[t]=a}catch{r&&x.log(`Failed to replace method "${t}" in object`,e)}}function D(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{r&&x.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function Pe(e,t){try{e.prototype=t.prototype=t.prototype||{},D(e,`__sentry_original__`,t)}catch{}}function Fe(e){return e.__sentry_original__}function Ie(e){if(ve(e))return{message:e.message,name:e.name,stack:e.stack,...Le(e)};if(Oe(e)){let{type:t,target:n,currentTarget:r,detail:i}=e;return{type:t,target:n,currentTarget:r,...i?{detail:i}:{},...Le(e)}}return e}function Le(e){return De(e)?Object.fromEntries(Object.entries(e)):{}}function Re(e){let t=Object.keys(Ie(e));return t.sort(),t[0]?t.join(`, `):`[object has no keys]`}var ze;function Be(e){if(ze!==void 0)return ze?ze(e):e();let t=Symbol.for(`__SENTRY_SAFE_RANDOM_ID_WRAPPER__`),n=i;return t in n&&typeof n[t]==`function`?(ze=n[t],ze(e)):(ze=null,e())}function Ve(){return Be(()=>Math.random())}function He(){return Be(()=>Date.now())}var Ue=Symbol.for(`sentry.skipNormalization`),We=Symbol.for(`sentry.overrideNormalizationDepth`);function Ge(e){D(e,Ue,!0)}function Ke(e,t){D(e,We,t)}function qe(e){return!!e[Ue]}function Je(e){let t=e[We];return typeof t==`number`?t:void 0}var Ye;function Xe(e){Ye=e}function Ze(e,t=100,n=1/0){try{return $e(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Qe(e,t=3,n=100*1024){let r=Ze(e,t);return rt(r)>n?Qe(e,t-1,n):r}function $e(e,t,n=1/0,r=1/0,i=it()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=et(e,t);if(!s.startsWith(`[object `))return s;if(qe(t))return t;let c=Je(t),l=c===void 0?n:c;if(l===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let u=t;if(u&&typeof u.toJSON==`function`)try{return $e(``,u.toJSON(),l-1,r,i)}catch{}let d=Array.isArray(t)?[]:{},f=0,p=Ie(t);for(let e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(f>=r){d[e]=`[MaxProperties ~]`;break}let t=p[e];d[e]=$e(e,t,l-1,r,i),f++}return o(t),d}function et(e,t){try{if(Ye){let e=Ye(t);if(e)return e}return typeof global<`u`&&t===global?`[Global]`:typeof t==`number`&&!Number.isFinite(t)?`[${t}]`:typeof t==`function`?`[Function: ${ie(t)}]`:typeof t==`symbol`?`[${String(t)}]`:typeof t==`bigint`?`[BigInt: ${String(t)}]`:`[object ${tt(t)}]`}catch(e){return`**non-serializable** (${e})`}}function tt(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function nt(e){return~-encodeURI(e).split(/%..|./).length}function rt(e){return nt(JSON.stringify(e))}function it(){let e=new WeakSet;function t(t){return e.has(t)?!0:(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}function at(e,t=`[unserializable]`){if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return typeof t==`function`?t(e):t}}function ot(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function st(e,t){let n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let a=Math.min(i+140,r);return a>r-5&&(a=r),a===r&&(i=Math.max(a-140,0)),n=n.slice(i,a),i>0&&(n=`'{snip} ${n}`),a<r&&(n+=` {snip}`),n}function ct(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];Te(r)?n.push(String(r)):r instanceof Error?n.push(r.message?`${r.name}: ${r.message}`:r.name):n.push(et(void 0,r))}return n.join(t)}function lt(e,t,n=!1){return Ce(e)?ke(t)?t.test(e):Ce(t)?n?e===t:e.includes(t):typeof t==`function`&&t(e):!1}function ut(e,t=[],n=!1){for(let r of t)if(lt(e,r,n))return!0;return!1}function dt(){let e=i;return e.crypto||e.msCrypto}var ft;function pt(){return Ve()*16}function mt(e=dt()){try{if(e?.randomUUID)return Be(()=>e.randomUUID()).replace(/-/g,``)}catch{}return ft||=`10000000100040008000100000000000`,ft.replace(/[018]/g,e=>(e^(pt()&15)>>e/4).toString(16))}function ht(e){return e.exception?.values?.[0]}function gt(e){let{message:t,event_id:n}=e;if(t)return t;let r=ht(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function _t(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function vt(e,t){let n=ht(e);if(!n)return;let r={type:`generic`,handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&`data`in t){let e={...i?.data,...t.data};n.mechanism.data=e}}function yt(e,t,n=5){if(t.lineno===void 0)return;let r=e.length,i=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,i-n),i).map(e=>st(e,0)),t.context_line=st(e[Math.min(r-1,i)],t.colno||0),t.post_context=e.slice(Math.min(i+1,r),i+1+n).map(e=>st(e,0))}function bt(e){if(xt(e))return!0;try{D(e,`__sentry_captured__`,!0)}catch{}return!1}function xt(e){try{return e.__sentry_captured__}catch{}}var St=1e3;function Ct(){return He()/St}function wt(){let{performance:e}=i;if(!e?.now||!e.timeOrigin)return Ct;let t=e.timeOrigin;return()=>(t+Be(()=>e.now()))/St}var Tt;function O(){return(Tt??=wt())()}var Et=null;function Dt(){let{performance:e}=i;if(!e?.now)return;let t=3e5,n=Be(()=>e.now()),r=He(),a=e.timeOrigin;if(typeof a==`number`&&Math.abs(a+n-r)<t)return a;let o=e.timing?.navigationStart;return typeof o==`number`&&Math.abs(o+n-r)<t?o:r-n}function Ot(){return Et===null&&(Et=Dt()),Et}function kt(e){let t=O(),n={sid:mt(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>Mt(n)};return e&&At(n,e),n}function At(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||O(),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:mt()),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{let t=e.timestamp-e.started;e.duration=t>=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),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function jt(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),At(e,n)}function Mt(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did==`number`||typeof e.did==`string`?`${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}}}function Nt(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=Nt(r[e],t[e],n-1));return r}function Pt(){return mt()}function Ft(){return mt().substring(16)}function It(e){try{let t=i.WeakRef;if(typeof t==`function`)return new t(e)}catch{}return e}function Lt(e){if(e){if(typeof e==`object`&&`deref`in e&&typeof e.deref==`function`)try{return e.deref()}catch{return}return e}}var Rt=`_sentrySpan`;function zt(e,t){t?D(e,Rt,It(t)):delete e[Rt]}function Bt(e){return Lt(e[Rt])}var Vt=100,Ht=class e{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:Pt(),sampleRand:Ve()}}clone(){let t=new e;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,zt(t,Bt(this)),t}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&&At(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],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 t===null?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(t){if(!t)return this;let n=typeof t==`function`?t(this):t,{tags:r,attributes:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u,conversationId:d}=(n instanceof e?n.getScopeData():Ee(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),d&&(this._conversationId=d),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,zt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Pt(),sampleRand:Ve()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:Vt;if(n<=0)return this;let r={timestamp:Ct(),...e,message:e.message?ot(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,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:Bt(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Nt(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t?.event_id||mt();if(!this._client)return r&&x.warn(`No client configured on scope - will not capture exception!`),n;let i=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:i,...t,event_id:n},this),n}captureMessage(e,t,n){let i=n?.event_id||mt();if(!this._client)return r&&x.warn(`No client configured on scope - will not capture message!`),i;let a=n?.syntheticException??Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:a,...n,event_id:i},this),i}captureEvent(e,t){let n=e.event_id||t?.event_id||mt();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(r&&x.warn(`No client configured on scope - will not capture event!`),n)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}};function Ut(){return c(`defaultCurrentScope`,()=>new Ht)}function Wt(){return c(`defaultIsolationScope`,()=>new Ht)}var Gt=e=>e instanceof Promise&&!e[Kt],Kt=Symbol(`chained PromiseLike`),qt=(e,t,n)=>{let r=e.then(e=>(t(e),e),e=>{throw n(e),e});return Gt(r)&&Gt(e)?r:Jt(e,r)},Jt=(e,t)=>{if(!t)return e;let n=!1;for(let r in e){if(r in t)continue;n=!0;let i=e[r];typeof i==`function`?Object.defineProperty(t,r,{value:(...t)=>i.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[Kt]:!0}),t},Yt=class{constructor(e,t){let n;n=e||new Ht;let r;r=t||new Ht,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return Ae(n)?qt(n,()=>this._popScope(),()=>this._popScope()):(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(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function Xt(){let e=s(o());return e.stack=e.stack||new Yt(Ut(),Wt())}function Zt(e){return Xt().withScope(e)}function Qt(e,t){let n=Xt();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function $t(e){return Xt().withScope(()=>e(Xt().getIsolationScope()))}function en(){return{withIsolationScope:$t,withScope:Zt,withSetScope:Qt,withSetIsolationScope:(e,t)=>$t(t),getCurrentScope:()=>Xt().getScope(),getIsolationScope:()=>Xt().getIsolationScope()}}function tn(e){let t=s(e);return t.acs?t.acs:en()}function nn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.keys(e).includes(`value`)}function rn(e,t){let{value:n,unit:r}=nn(e)?e:{value:e,unit:void 0},i=cn(n),a=r&&typeof r==`string`?{unit:r}:{};if(i)return{...i,...a};if(!t||t===`skip-undefined`&&n===void 0)return;let o=``;try{o=JSON.stringify(n)??``}catch{}return{value:o,type:`string`,...a}}function an(e,t=!1){let n={};for(let[r,i]of Object.entries(e??{})){let e=rn(i,t);e&&(n[r]=e)}return n}function on(e){if(!e)return 0;let t=0;for(let[n,r]of Object.entries(e)){t+=n.length*2,t+=r.type.length*2,t+=(r.unit?.length??0)*2;let e=r.value;Array.isArray(e)?t+=sn(e[0])*e.length:Te(e)?t+=sn(e):t+=100}return t}function sn(e){return typeof e==`string`?e.length*2:typeof e==`boolean`?4:typeof e==`number`?8:0}function cn(e){if(Array.isArray(e))return{value:e,type:`array`};let t=typeof e==`string`?`string`:typeof e==`boolean`?`boolean`:typeof e==`number`&&!Number.isNaN(e)?Number.isInteger(e)?`integer`:`double`:null;if(t)return{value:e,type:t}}var ln;function un(){return ln?.()}function dn(){return ln!==void 0}function k(){return tn(o()).getCurrentScope()}function A(){return tn(o()).getIsolationScope()}function fn(){return c(`globalScope`,()=>new Ht)}function pn(...e){let t=tn(o());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function mn(...e){let t=tn(o());if(e.length===2){let[n,r]=e;return n?t.withSetIsolationScope(n,r):t.withIsolationScope(r)}return t.withIsolationScope(e[0])}function j(){return k().getClient()}function hn(e){let t=un();if(t)return{trace_id:t.traceId,span_id:t.spanId};let{traceId:n,parentSpanId:r,propagationSpanId:i}=e.getPropagationContext(),a={trace_id:n,span_id:i||Ft()};return r&&(a.parent_span_id=r),a}var M=`sentry.source`,gn=`sentry.sample_rate`,_n=`sentry.previous_trace_sample_rate`,N=`sentry.op`,P=`sentry.origin`,vn=`sentry.idle_span_finish_reason`,yn=`sentry.measurement_unit`,bn=`sentry.measurement_value`,xn=`sentry.release`,Sn=`sentry.environment`,Cn=`sentry.sdk.integrations`,wn=`user.id`,Tn=`user.email`,En=`user.ip_address`,Dn=`user.name`,On=`sentry.custom_span_name`,kn=`sentry.profile_id`,An=`sentry.exclusive_time`,jn=`url.full`,Mn=`sentry.link.type`,Nn=`gen_ai.conversation.id`;function Pn(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:`internal_error`}}function Fn(e,t){e.setAttribute(`http.response.status_code`,t);let n=Pn(t);n.message!==`unknown_error`&&e.setStatus(n)}var In=`_sentryScope`,Ln=`_sentryIsolationScope`,Rn=Symbol.for(`sentry.otelSourceInference`),zn=Symbol.for(`sentry.otelSourceExplicitlySet`),Bn=Symbol.for(`sentry.tracerProviderSpan`);function Vn(e,t,n){e&&(D(e,Ln,It(n)),D(e,In,t))}function Hn(e){let t=e;return{scope:t[In],isolationScope:Lt(t[Ln])}}function Un(e){return e[Rn]===!0}function Wn(e){D(e,zn,!0)}function Gn(e){return e[Bn]===!0}var Kn=`sentry-`;function qn(e){let t=Yn(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(`sentry-`)){let r=t.slice(7);e[r]=n}return e},{});if(Object.keys(n).length>0)return n}function Jn(e){if(e)return Zn(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${Kn}${t}`]=n),e),{}))}function Yn(e){if(!(!e||!Ce(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=Xn(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):Xn(e)}function Xn(e){return e.split(`,`).map(e=>{let t=e.indexOf(`=`);return t===-1?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}function Zn(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((e,[t,n],i)=>{let a=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,o=i===0?a:`${e},${a}`;return o.length>8192?(r&&x.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):o},``)}var Qn=/^o(\d+)\./,$n=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function er(e){return e===`http`||e===`https`}function tr(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function nr(e){let t=$n.exec(e);if(!t){f(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,l=s,u=l.split(`/`);if(u.length>1&&(c=u.slice(0,-1).join(`/`),l=u.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return rr({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}function rr(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function ir(e){if(!r)return!0;let{port:t,projectId:n,protocol:i}=e;return[`protocol`,`publicKey`,`host`,`projectId`].find(t=>e[t]?!1:(x.error(`Invalid Sentry Dsn: ${t} missing`),!0))?!1:n.match(/^\d+$/)?er(i)?t&&isNaN(parseInt(t,10))?(x.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(x.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),!1):(x.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function ar(e){return e.match(Qn)?.[1]}function or(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=ar(n)),r}function sr(e){let t=typeof e==`string`?nr(e):rr(e);if(!(!t||!ir(t)))return t}function cr(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t}var lr=RegExp(`^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$`);function ur(e){if(!e)return;let t=e.match(lr);if(!t)return;let n;return t[3]===`1`?n=!0:t[3]===`0`&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function dr(e,t){let n=ur(e),r=qn(t);if(!n?.traceId)return{traceId:Pt(),sampleRand:Ve()};let i=mr(n,r);r&&(r.sample_rand=i.toString());let{traceId:a,parentSpanId:o,parentSampled:s}=n;return{traceId:a,parentSpanId:o,sampled:s,dsc:r||{},sampleRand:i}}function fr(e=Pt(),t=Ft(),n){let r=``;return n!==void 0&&(r=n?`-1`:`-0`),`${e}-${t}${r}`}function pr(e=Pt(),t=Ft(),n){return`00-${e}-${t}-${n?`01`:`00`}`}function mr(e,t){let n=cr(t?.sample_rand);if(n!==void 0)return n;let r=cr(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Ve()*r:r+Ve()*(1-r):Ve()}function hr(e,t){let n=or(e);return t&&n&&t!==n?(x.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${n})`),!1):e.getOptions().strictTraceContinuation&&(t&&!n||!t&&n)?(x.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${t}, Sentry client: ${n})`),!1):!0}var gr=!1;function _r(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:a,status:o,origin:s,links:c}=F(e);return{parent_span_id:a,span_id:t,trace_id:n,data:r,op:i,status:o,origin:s,links:c}}function vr(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:F(e).parent_span_id,a=Hn(e).scope;return{parent_span_id:i,span_id:r?a?.getPropagationContext().propagationSpanId||Ft():t,trace_id:n}}function yr(e){let{traceId:t,spanId:n}=e.spanContext();return fr(t,n,Ar(e))}function br(e){let{traceId:t,spanId:n}=e.spanContext();return pr(t,n,Ar(e))}function xr(e){if(e&&e.length>0)return e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:n===1,attributes:i,...r}))}function Sr(e){if(e?.length)return e.map(({context:{spanId:e,traceId:t,traceFlags:n},attributes:r})=>({span_id:e,trace_id:t,sampled:n===1,attributes:r}))}function Cr(e){return typeof e==`number`?wr(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?wr(e.getTime()):O()}function wr(e){return e>9999999999?e/1e3:e}function F(e){if(kr(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(Or(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:Er(e),start_timestamp:Cr(i),timestamp:Cr(o)||void 0,status:jr(s),op:r[N],origin:r[P],links:xr(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Tr(e){if(kr(e))return e.getStreamedSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(Or(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{name:a,span_id:t,trace_id:n,parent_span_id:Er(e),start_timestamp:Cr(i),end_timestamp:Cr(o),is_segment:e===zr(e),status:Mr(s),attributes:Nr(r,s),links:Sr(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:``,end_timestamp:0,status:`ok`,is_segment:e===zr(e)}}function Er(e){return`parentSpanId`in e?e.parentSpanId:`parentSpanContext`in e?e.parentSpanContext?.spanId:void 0}function Dr(e){return{...e,attributes:an(e.attributes),links:e.links?.map(e=>({...e,attributes:an(e.attributes)}))}}function Or(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function kr(e){return typeof e.getSpanJSON==`function`}function Ar(e){let{traceFlags:t}=e.spanContext();return t===1}function jr(e){if(!(!e||e.code===0))return e.code===1?`ok`:e.message||`internal_error`}function Mr(e){return!e||e.code===1||e.code===0||e.message===`cancelled`?`ok`:`error`}function Nr(e,t){let n=Mr(t)===`error`?t?.message:void 0;return{...n&&{"sentry.status.message":n},...e}}var Pr=`_sentryChildSpans`,Fr=`_sentryRootSpan`;function Ir(e,t){D(t,Fr,e[Fr]||e),e[Pr]?e[Pr].add(t):D(e,Pr,new Set([t]))}function Lr(e,t){e[Pr]&&e[Pr].delete(t)}function Rr(e){let t=new Set;function n(e){if(!t.has(e)&&Ar(e)){t.add(e);let r=e[Pr]?Array.from(e[Pr]):[];for(let e of r)n(e)}}return n(e),Array.from(t)}var I=zr;function zr(e){return e[Fr]||e}function Br(){let e=tn(o());return e.getActiveSpan?e.getActiveSpan():Bt(k())}function Vr(){gr||=(f(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),!0)}function Hr(e,t){e.updateName(t),e.setAttributes({[M]:`custom`,[On]:t})}var Ur=!1;function Wr(){if(Ur)return;function e(){let e=Br(),t=e&&I(e);if(t){let e=`internal_error`;r&&x.log(`[Tracing] Root span: ${e} -> Global error occurred`),t.setStatus({code:2,message:e})}}Ur=!0,fe(e),he(e)}function Gr(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=e||j()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Kr(e){x.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function qr(e,t){if(!t?.length)return!1;for(let n of t){if(Xr(n)){if(e.description&<(e.description,n))return r&&Kr(e),!0;continue}let t=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!t)continue;let i=!n.name||e.description&<(e.description,n.name),a=!n.op||e.op&<(e.op,n.op),o=!n.attributes||Object.entries(n.attributes).every(([t,n])=>Jr(e.attributes?.[t],n));if(i&&a&&o)return r&&Kr(e),!0}return!1}function Jr(e,t){return typeof e==`string`&&(typeof t==`string`||t instanceof RegExp)?lt(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function Yr(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function Xr(e){return typeof e==`string`||e instanceof RegExp}var Zr=Symbol.for(`sentry.nonRecordingSpan`),Qr=class{constructor(e={}){this._traceId=e.traceId||Pt(),this._spanId=e.spanId||Ft(),this.dropReason=e.dropReason,D(this,Zr,!0)}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 $r(e){return!!e&&e[Zr]===!0}var ei=`graphql.document`,ti=`params.<key>`,ni=`sentry.sdk.name`,ri=`sentry.sdk.version`,ii=`sentry.segment.id`,ai=`sentry.segment.name`,oi=`sentry.span.source`,si=`sentry.trace_lifecycle`,ci=`sentry.transaction`,li=`url.full`,ui=`url.path`,di=`url.path.parameter.<key>`,fi=`url.template`,pi=`production`,mi=`_frozenDsc`;function hi(e,t){D(e,mi,t)}function gi(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||`production`,release:n.release,public_key:r,trace_id:e,org_id:or(t)};return t.emit(`createDsc`,i),i}function _i(e,t){let n=t.getPropagationContext();return n.dsc||gi(n.traceId,e)}function vi(e){let t=j();if(!t)return{};let n=I(e),r=F(n),i=r.data,a=n.spanContext().traceState,o=a?.get(`sentry.sample_rate`)??i[`sentry.sample_rate`]??i[`sentry.previous_trace_sample_rate`];function s(e){return(typeof o==`number`||typeof o==`string`)&&(e.sample_rate=`${o}`),e}let c=n[mi];if(c)return s(c);let l=$r(n),u=l&&n.dropReason===`ignored`;if(l&&(!Gr(t.getOptions())||u)){let e=Hn(n).scope;if(e){let n={..._i(t,e)};return u&&(n.sampled=`false`),s(n)}}let d=a?.get(`sentry.dsc`),f=d&&qn(d);if(f)return s(f);let p=gi(e.spanContext().traceId,t),m=i[`sentry.source`]??i[`sentry.span.source`],h=r.description;return m!==`url`&&h&&(p.transaction=h),Gr()&&(p.sampled=String(Ar(n)),p.sample_rand=a?.get(`sentry.sample_rand`)??Hn(n).scope?.getPropagationContext().sampleRand.toString()),s(p),t.emit(`createDsc`,p,n),p}function yi(e){return Jn(vi(e))}function bi(e){return D(e,`_streamed`,!0),e}function xi(e){return!!e&&typeof e==`function`&&`_streamed`in e&&!!e._streamed}function Si(e,t=[]){return[e,t]}function Ci(e,t){let[n,r]=e;return[n,[...r,t]]}function wi(e,t){let n=e[1];for(let e of n){let n=e[0].type;if(t(e,n))return!0}return!1}function Ti(e,t){return wi(e,(e,n)=>t.includes(n))}function Ei(e){let t=s(i);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Di(e){let t=s(i);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function Oi(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[Ei(r),e]:r.push(typeof e==`string`?Ei(e):e)}for(let e of n){let[t,n]=e;if(i(`
|
|
6
6
|
${JSON.stringify(t)}
|
|
7
|
-
`),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(Ze(n))}i(e)}}return typeof r==`string`?r:
|
|
7
|
+
`),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(Ze(n))}i(e)}}return typeof r==`string`?r:ki(r)}function ki(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function Ai(e){let t=typeof e==`string`?Ei(e):e;function n(e){let n=t.subarray(0,e);return t=t.subarray(e+1),n}function r(){let e=t.indexOf(10);return e<0&&(e=t.length),JSON.parse(Di(n(e)))}let i=r(),a=[];for(;t.length;){let e=r(),t=typeof e.length==`number`?e.length:void 0;a.push([e,t?n(t):r()])}return[i,a]}function ji(e){return[{type:`span`},e]}function Mi(e){let t=typeof e.data==`string`?Ei(e.data):e.data;return[{type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Ni={sessions:`session`,event:`error`,client_report:`internal`,user_report:`default`,profile_chunk:`profile`,replay_event:`replay`,replay_recording:`replay`,check_in:`monitor`,raw_security:`security`,log:`log_item`,trace_metric:`metric`};function Pi(e){return e in Ni}function Fi(e){return Pi(e)?Ni[e]:e}function Ii(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function Li(e,t,n,r){let i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(He()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:tr(r)},...i&&{trace:i}}}function Ri(e,t){if(!t)return e;let n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function zi(e,t,n,r){let i=Ii(n);return Si({sent_at:new Date(He()).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:tr(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}function Bi(e,t,n,r){let i=Ii(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;Ri(e,n?.sdk);let o=Li(e,i,r,t);return delete e.sdkProcessingMetadata,Si(o,[[{type:a},e]])}function Vi(e,t){function n(e){return!!e.trace_id&&!!e.public_key}let r=vi(e[0]),i=t?.getDsn(),a=t?.getOptions().tunnel,o={sent_at:new Date(He()).toISOString(),...n(r)&&{trace:r},...!!a&&i&&{dsn:tr(i)}},{beforeSendSpan:s,ignoreSpans:c}=t?.getOptions()||{},l=c?.length?e.filter(e=>{let t=F(e);return!qr({description:t.description,op:t.op,attributes:t.data},c)}):e,u=e.length-l.length;u&&t?.recordDroppedEvent(`before_send`,`span`,u);let d=s?e=>{let t=F(e);return(xi(s)?t:s(t))||(Vr(),t)}:F,f=[];for(let e of l){let t=d(e);t&&f.push(ji(t))}return Si(o,f)}function Hi(e){if(!r)return;let{description:t=`< unknown name >`,op:n=`< unknown op >`,parent_span_id:i}=F(e),{spanId:a}=e.spanContext(),o=Ar(e),s=I(e),c=s===e,l=`[Tracing] Starting ${o?`sampled`:`unsampled`} ${c?`root `:``}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${a}`];if(i&&u.push(`parent ID: ${i}`),!c){let{op:e,description:t}=F(s);u.push(`root ID: ${s.spanContext().spanId}`),e&&u.push(`root op: ${e}`),t&&u.push(`root description: ${t}`)}x.log(`${l}
|
|
8
8
|
${u.join(`
|
|
9
|
-
`)}`)}function Vi(e){if(!r)return;let{description:t=`< unknown name >`,op:n=`< unknown op >`}=F(e),{spanId:i}=e.spanContext(),a=`[Tracing] Finishing "${n}" ${I(e)===e?`root `:``}span "${t}" with ID ${i}`;x.log(a)}function Hi(e,t,n,i=zr()){let a=i&&I(i);a&&(r&&x.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),a.addEvent(e,{[yn]:t,[vn]:n}))}function Ui(e){if(!e||e.length===0)return;let t={};return e.forEach(e=>{let n=e.attributes||{},r=n[vn],i=n[yn];typeof r==`string`&&typeof i==`number`&&(t[e.name]={value:i,unit:r})}),t}function Wi(){return s(o()).segmentSpanCaptureStrategy}function Gi(e){return e.getOptions().traceLifecycle===`stream`}var Ki=1e3,qi=class{constructor(e={}){this._traceId=e.traceId||Nt(),this._spanId=e.spanId||Pt(),this._startTime=e.startTimestamp||O(),this._links=e.links,this._attributes={},this.setAttributes({[P]:`manual`,[N]: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._frozen||(this._links?this._links.push(e):this._links=[e]),this}addLinks(e){return this._frozen||(this._links?this._links.push(...e):this._links=e),this}recordException(e,t){}spanContext(){let{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:+!!n}}setAttribute(e,t){return this._frozen?this:(t===void 0?delete this._attributes[e]:this._attributes[e]=t,e===`sentry.source`&&t!==void 0&&Hn(this)&&Un(this),this)}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._frozen||(this._startTime=Sr(e))}setStatus(e){return this._frozen||(this._status=e),this}updateName(e){return this._frozen?this:(this._name=e,Hn(this)||this.setAttribute(M,`custom`),this)}end(e){if(this._endTime){this._frozen=Wn(this);return}this._endTime=Sr(e),Vi(this),this._onSpanEnded(),this._frozen=Wn(this)}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[N],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Ar(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[P],profile_id:this._attributes[On],exclusive_time:this._attributes[kn],measurements:Ui(this._events),is_segment:this._isStandaloneSpan&&I(this)===this||void 0,segment_id:this._isStandaloneSpan?I(this).spanContext().spanId:void 0,links:br(this._links)}}getStreamedSpanJSON(){return{name:this._name??``,span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===I(this),status:jr(this._status),attributes:Mr(this._attributes,this._status),links:xr(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){if(this._frozen)return this;r&&x.log(`[Tracing] Adding an event to span:`,e);let i=Ji(t)?t:n||O(),a=Ji(t)?{}:t||{},o={name:e,time:Sr(i),attributes:a};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let e=j();e&&(e.emit(`spanEnd`,this),this._isStandaloneSpan||e.emit(`afterSpanEnd`,this));let t=I(this),n=this._isStandaloneSpan||this===t;if(this._isStandaloneSpan){this._sampled?Zi(zi([this],e)):(r&&x.log(`[Tracing] Discarding standalone span because its trace was not chosen to be sampled.`),e&&e.recordDroppedEvent(`sample_rate`,`span`));return}if(!n){let e=Wi();if(e){let n=Vn(this).scope||k();e.onChildSpanEnded(this,t,e=>this._convertSpanToTransaction(e),n)}return}if(e&&Gi(e)){e.emit(`afterSegmentSpanEnd`,this);return}let i=Vn(this).scope||k(),a=Wi();if(a)a.onSegmentSpanEnded(e=>this._convertSpanToTransaction(e),i);else{let e=this._convertSpanToTransaction();e&&i.captureEvent(e)}}_convertSpanToTransaction(e={}){if(!Yi(F(this)))return;this._name||=(r&&x.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),`<unlabeled transaction>`);let{scope:t,isolationScope:n}=Vn(this),i=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;e.onSpanCaptured?.(this);let a=[];for(let t of Lr(this)){if(t===this||Xi(t)||e.isSpanAlreadyCaptured?.(t))continue;let n=F(t);Yi(n)&&(e.onSpanCaptured?.(t),a.push(n))}let o=this._attributes[M];delete this._attributes[Dn];let s=!1;a.forEach(e=>{delete e.data[Dn],e.op?.startsWith(`gen_ai.`)&&(s=!0)});let c={contexts:{trace:gr(this)},spans:a.length>Ki?a.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,Ki):a,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:`transaction`,sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:gi(this),hasGenAiSpans:s},request:i,...o&&{transaction_info:{source:o}}},l=Ui(this._events);return l&&Object.keys(l).length&&(r&&x.log(`[Measurements] Adding measurements to transaction event`,JSON.stringify(l,void 0,2)),c.measurements=l),c}};function Ji(e){return e&&typeof e==`number`||e instanceof Date||Array.isArray(e)}function Yi(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function Xi(e){return e instanceof qi&&e.isStandaloneSpan()}function Zi(e){let t=j();if(!t)return;let n=e[1];if(!n||n.length===0){t.recordDroppedEvent(`before_send`,`span`);return}t.sendEnvelope(e)}function Qi(e,t,n=()=>{},r=()=>{}){let i;try{i=e()}catch(e){throw t(e),n(),e}return $i(i,t,n,r)}function $i(e,t,n,r){return Ae(e)?Kt(e,e=>{n(),r(e)},e=>{t(e),n()}):(n(),r(e),e)}function ea(e,t,n){if(!Wr(e))return[!1];let i,a;typeof e.tracesSampler==`function`?(a=e.tracesSampler({...t,inheritOrSampleWith:e=>typeof t.parentSampleRate==`number`?t.parentSampleRate:typeof t.parentSampled==`boolean`?Number(t.parentSampled):e}),i=!0):t.parentSampled===void 0?e.tracesSampleRate!==void 0&&(a=e.tracesSampleRate,i=!0):a=t.parentSampled;let o=sr(a);if(o===void 0)return r&&x.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(a)} of type ${JSON.stringify(typeof a)}.`),[!1];if(!o)return r&&x.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler==`function`?`tracesSampler returned 0 or false`:`a negative sampling decision was inherited or tracesSampleRate is set to 0`}`),[!1,o,i];let s=n<o;return s||r&&x.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(a)})`),[s,o,i]}var ta=`__SENTRY_SUPPRESS_TRACING__`;function na(e,t){let n=ma();if(n.startSpan)return n.startSpan(e,t);let r=pa(e),{forceTransaction:i,parentSpan:a,scope:o}=e,s=o?.clone();return fn(s,()=>va(a)(()=>{let n=k(),o=_a(n,a),s=j(),c=e.onlyIfParent&&!o?da(n,s):fa({parentSpan:o,spanArguments:r,forceTransaction:i,scope:n});return(!ba(c)||!o)&&Rt(n,c),Qi(()=>t(c),()=>{let{status:e}=F(c);c.isRecording()&&(!e||e===`ok`)&&c.setStatus({code:2,message:`internal_error`})},()=>{c.end()})}))}function ra(e,t){let n=ma();if(n.startSpanManual)return n.startSpanManual(e,t);let r=pa(e),{forceTransaction:i,parentSpan:a,scope:o}=e,s=o?.clone();return fn(s,()=>va(a)(()=>{let n=k(),o=_a(n,a),s=e.onlyIfParent&&!o?da(n,j()):fa({parentSpan:o,spanArguments:r,forceTransaction:i,scope:n});return(!ba(s)||!o)&&Rt(n,s),Qi(()=>t(s,()=>s.end()),()=>{let{status:e}=F(s);s.isRecording()&&(!e||e===`ok`)&&s.setStatus({code:2,message:`internal_error`})})}))}function ia(e){let t=ma();return t.startInactiveSpan?t.startInactiveSpan(e):aa(e)}function aa(e){let t=pa(e),{forceTransaction:n,parentSpan:r}=e;return(e.scope?t=>fn(e.scope,t):r===void 0?e=>e():e=>sa(r,e))(()=>{let i=k(),a=_a(i,r),o=j();return e.onlyIfParent&&!a?da(i,o):fa({parentSpan:a,spanArguments:t,forceTransaction:n,scope:i})})}var oa=(e,t)=>{let n=en(o());if(n.continueTrace)return n.continueTrace(e,t);let{sentryTrace:r,baggage:i}=e,a=j(),s=Kn(i);return a&&!mr(a,s?.org_id)?ua(t):fn(e=>{let n=ur(r,i);return e.setPropagationContext(n),Rt(e,void 0),t()})};function sa(e,t){let n=ma();return n.withActiveSpan?n.withActiveSpan(e,t):fn(n=>(Rt(n,e||void 0),t(n)))}function ca(e){let t=ma();return t.suppressTracing?t.suppressTracing(e):fn(t=>{t.setSDKProcessingMetadata({[ta]:!0});let n=e();return t.setSDKProcessingMetadata({[ta]:void 0}),n})}function la(e=k()){let t=ma();return t.isTracingSuppressed?t.isTracingSuppressed(e):e.getScopeData().sdkProcessingMetadata[ta]===!0}function ua(e){let t=ma();return t.startNewTrace?t.startNewTrace(e):fn(t=>(t.setPropagationContext({traceId:Nt(),sampleRand:Ve()}),r&&x.log(`Starting a new trace with id ${t.getPropagationContext().traceId}`),sa(null,e)))}function da(e,t){t?.recordDroppedEvent(`no_parent_span`,`span`);let n=new Zr({traceId:e.getPropagationContext().traceId});return Bn(n,e,A()),n}function fa({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){let i=A();if(!Wr()){let t={...i.getPropagationContext(),...r.getPropagationContext()},a=new Zr({traceId:e?e.spanContext().traceId:t.traceId});return e&&!n&&Fr(e,a),Bn(a,r,i),a}let a=j();if(ya(a,t)){la(r)||a?.recordDroppedEvent(`ignored`,`span`);let t=new Zr({dropReason:`ignored`,traceId:e?.spanContext().traceId??r.getPropagationContext().traceId});return Bn(t,r,i),t}let o;if(e&&!n)o=ga(e,r,t,i),Fr(e,o);else if(e){let n=gi(e),{traceId:a,spanId:s}=e.spanContext(),c=kr(e);o=ha({traceId:a,parentSpanId:s,...t},r,i,c),pi(o,n)}else{let{traceId:e,dsc:n,parentSpanId:a,sampled:s}={...i.getPropagationContext(),...r.getPropagationContext()};o=ha({traceId:e,parentSpanId:a,...t},r,i,s),n&&pi(o,n)}return Bi(o),o}function pa(e){let t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let n={...t};return n.startTimestamp=Sr(e.startTime),delete n.startTime,n}return t}function ma(){return en(o())}function ha(e,t,n,i){let a=j(),o=a?.getOptions()||{},{name:s=``}=e,c={spanAttributes:{...e.attributes},spanName:s,parentSampled:i};a?.emit(`beforeSampling`,c,{decision:!1});let l=c.parentSampled??i,u=c.spanAttributes,d=t.getPropagationContext(),f=la(t),[p,m,h]=f?[!1]:ea(o,{name:s,parentSampled:l,attributes:u,normalizedRequest:n.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:sr(d.dsc?.sample_rate)},d.sampleRand),g=new qi({...e,attributes:{[M]:`custom`,[hn]:m!==void 0&&h?m:void 0,...u},sampled:p});return!p&&a&&!f&&(r&&x.log(`[Tracing] Discarding root span because its trace was not chosen to be sampled.`),a.recordDroppedEvent(`sample_rate`,Gi(a)?`span`:`transaction`)),Bn(g,t,n),a&&a.emit(`spanStart`,g),g}function ga(e,t,n,r){let{spanId:i,traceId:a}=e.spanContext(),o=la(t),s=!o&&kr(e),c=s?new qi({...n,parentSpanId:i,traceId:a,sampled:s}):new Zr({traceId:a});Fr(e,c),Bn(c,t,r);let l=j();return l?(Gi(l)&&Qr(c)&&(Qr(e)&&e.dropReason?(c.dropReason=e.dropReason,l.recordDroppedEvent(e.dropReason,`span`)):o||(c.dropReason=`sample_rate`,l.recordDroppedEvent(`sample_rate`,`span`))),l.emit(`spanStart`,c),n.endTimestamp&&(l.emit(`spanEnd`,c),l.emit(`afterSpanEnd`,c)),c):c}function _a(e,t){if(t)return t;if(t===null)return;let n=zt(e);if(!n)return;let r=j();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?I(n):n}function va(e){return e===void 0?e=>e():t=>sa(e,t)}function ya(e,t){let n=e?.getOptions().ignoreSpans;return!e||!Gi(e)||!n?.length?!1:Kr({description:t.name||``,op:t.attributes?.[`sentry.op`]||t.op,attributes:t.attributes},n)}function ba(e){return Qr(e)&&e.dropReason===`ignored`}var xa={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Sa=`heartbeatFailed`,Ca=`idleTimeout`,wa=`finalTimeout`,Ta=`externalFinish`;function Ea(e,t={}){let n=new Map,i=!1,a,o=Ta,s=!t.disableAutoFinish,c=[],{idleTimeout:l=xa.idleTimeout,finalTimeout:u=xa.finalTimeout,childSpanTimeout:d=xa.childSpanTimeout,beforeSpanEnd:f,trimIdleSpanEndTimestamp:p=!0}=t,m=j(),h=k();if(!m||!Wr()){let e=new Zr({traceId:h.getPropagationContext().traceId});return Bn(e,h,A()),e}let g=zr(),_=Da(e);_.end=new Proxy(_.end,{apply(e,t,n){if(f&&f(_),Qr(t))return;let[r,...i]=n,a=Sr(r||O()),o=Lr(_).filter(e=>e!==_),s=F(_);if(!o.length||!p)return w(a),Reflect.apply(e,t,[a,...i]);let c=m.getOptions().ignoreSpans,l=o?.reduce((e,t)=>{let n=F(t);return!n.timestamp||c&&Kr({description:n.description,op:n.op,attributes:n.data},c)?e:e?Math.max(e,n.timestamp):n.timestamp},void 0),d=s.start_timestamp,h=Math.min(d?d+u/1e3:1/0,Math.max(d||-1/0,Math.min(a,l||1/0)));return w(h),Reflect.apply(e,t,[h,...i])}});function v(){a&&=(clearTimeout(a),void 0)}function y(e){v(),a=setTimeout(()=>{!i&&n.size===0&&s&&(o=Ca,_.end(e))},l)}function b(e){a=setTimeout(()=>{!i&&s&&(o=Sa,_.end(e))},d)}function S(e){v(),n.set(e,!0),b(O()+d/1e3)}function C(e){n.has(e)&&n.delete(e),n.size===0&&y(O()+l/1e3)}function w(e){i=!0,n.clear(),c.forEach(e=>e()),Rt(h,g);let t=F(_),{start_timestamp:a}=t;if(!a)return;t.data[`sentry.idle_span_finish_reason`]||_.setAttribute(_n,o);let s=t.status;(!s||s===`unknown`)&&_.setStatus({code:1}),x.log(`[Tracing] Idle span "${t.op}" finished`);let d=Lr(_).filter(e=>e!==_),f=0;d.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:`cancelled`}),t.end(e),r&&x.log(`[Tracing] Cancelling span since span ended early`,JSON.stringify(t,void 0,2)));let{timestamp:n=0,start_timestamp:i=0}=F(t),a=i<=e,o=(u+l)/1e3,s=n-i<=o;if(r){let e=JSON.stringify(t,void 0,2);a?s||x.log(`[Tracing] Discarding span since it finished after idle span final timeout`,e):x.log(`[Tracing] Discarding span since it happened after idle span was finished`,e)}(!s||!a)&&(Ir(_,t),f++)}),f>0&&_.setAttribute(`sentry.idle_span_discarded_spans`,f)}return c.push(m.on(`spanStart`,e=>{i||e===_||F(e).timestamp||e instanceof qi&&e.isStandaloneSpan()||Lr(_).includes(e)&&S(e.spanContext().spanId)})),c.push(m.on(`spanEnd`,e=>{i||C(e.spanContext().spanId)})),c.push(m.on(`idleSpanEnableAutoFinish`,e=>{e===_&&(s=!0,y(),n.size&&b())})),t.disableAutoFinish||y(),setTimeout(()=>{i||(_.setStatus({code:2,message:`deadline_exceeded`}),o=wa,_.end())},u),_}function Da(e){let t=ia(e);return Rt(k(),t),r&&x.log(`[Tracing] Started span is an idle span`),t}function Oa(e,t,n){let r,i,a,o=n?.maxWait?Math.max(n.maxWait,t):0,s=n?.setTimeoutImpl||setTimeout;function c(){return l(),r=e(),r}function l(){i!==void 0&&clearTimeout(i),a!==void 0&&clearTimeout(a),i=a=void 0}function u(){return i!==void 0||a!==void 0?c():r}function d(){return i&&clearTimeout(i),i=s(c,t),o&&a===void 0&&(a=s(c,o)),r}return d.cancel=l,d.flush=u,d}var ka=[`addListener`,`on`,`once`,`prependListener`,`prependOnceListener`,`addEventListener`],Aa=[`removeListener`,`off`,`removeEventListener`],ja=Symbol(`SentryScopeBoundListeners`),Ma;function Na(e){return Ma!==void 0&&(e===Ma||e.listener===Ma)}function Pa(e,t=k()){let n=e;if(Va(n))return e;Ba(n);for(let e of ka)typeof n[e]==`function`&&(n[e]=La(n,n[e],t));for(let e of Aa)typeof n[e]==`function`&&(n[e]=Ra(n,n[e]));return typeof n.removeAllListeners==`function`&&(n.removeAllListeners=za(n,n.removeAllListeners)),e}function Fa(e,t){return function(...n){return fn(t,()=>e.apply(this,n))}}function Ia(e){return typeof e==`function`}function La(e,t,n){return function(...r){let i=r[0],a=r[1],o=r.slice(2);if(!Ia(a)||Na(a))return t.apply(this,r);let s=Va(e)||Ba(e),c=s.get(i);c||(c=new WeakMap,s.set(i,c));let l=c.get(a);l||(l=Fa(a,n),c.set(a,l));let u=Ma;Ma=l;try{return t.call(this,i,l,...o)}finally{Ma=u}}}function Ra(e,t){return function(...n){let r=n[0],i=n[1],a=n.slice(2),o=Ia(i)?Va(e)?.get(r)?.get(i):void 0;return o?t.call(this,r,o,...a):t.apply(this,n)}}function za(e,t){return function(...n){let r=Va(e);if(r)if(n.length===0)Ba(e);else{let e=n[0];r.delete(e)}return t.apply(this,n)}}function Ba(e){let t=new Map;return e[ja]=t,t}function Va(e){return e[ja]}function Ha(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;Ka(e,t),r&&Ya(e,r),Xa(e,n),qa(e,i),Ja(e,a)}function Ua(e,t){let{extra:n,tags:r,attributes:i,user:a,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:m,span:h}=t;Wa(e,`extra`,n),Wa(e,`tags`,r),Wa(e,`attributes`,i),Wa(e,`user`,a),Wa(e,`contexts`,o),e.sdkProcessingMetadata=Mt(e.sdkProcessingMetadata,c,2),s&&(e.level=s),m&&(e.transactionName=m),h&&(e.span=h),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function Wa(e,t,n){e[t]=Mt(e[t],n,1)}function Ga(e,t){let n=dn().getScopeData();return e&&Ua(n,e.getScopeData()),t&&Ua(n,t.getScopeData()),n}function Ka(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=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(a).length&&(e.contexts={...a,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)}function qa(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Ja(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Ya(e,t){e.contexts={trace:_r(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:gi(t),...e.sdkProcessingMetadata};let n=F(I(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}function Xa(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}function Za(e){let t={},{response:n,profile:r,cloud_resource:i,culture:a,state:o}=e;if(n&&(n.status_code!=null&&(t[`http.response.status_code`]=n.status_code),n.body_size!=null&&(t[`http.response.body.size`]=n.body_size)),r&&(r.profile_id&&(t[`sentry.profile_id`]=r.profile_id),r.profiler_id&&(t[`sentry.profiler_id`]=r.profiler_id)),i)for(let[e,n]of Object.entries(i))n!=null&&(t[e]=n);a&&(a.locale&&(t[`culture.locale`]=a.locale),a.timezone&&(t[`culture.timezone`]=a.timezone)),o?.state&&typeof o.state.type==`string`&&(t[`state.type`]=o.state.type);let s=e.angular;if(s){let e=s.version;(typeof e==`string`||typeof e==`number`)&&(t[`angular.version`]=e)}let c=e.react;if(c){let e=c.version;(typeof e==`string`||typeof e==`number`)&&(t[`react.version`]=e)}return t}function Qa(e,t){let n=wr(e),r=Rr(e),i=wr(r),{isolationScope:a,scope:o}=Vn(e),s=Ga(a,o);no(n,i,t,s);let c=e.kind;t.emit(`preprocessSpan`,n,{spanKind:c}),n.is_segment&&($a(n,s),to(n,t),t.emit(`processSegmentSpan`,n)),t.emit(`processSpan`,n);let{beforeSendSpan:l}=t.getOptions(),u=l&&yi(l)?ro(n,l):n,d=u.attributes?.[M];return d&&eo(u,{[ii]:d}),{...Er(u),_segmentSpan:r}}function $a(e,t){eo(e,Za(t.contexts))}function eo(e,t){let n=e.attributes??={};Object.entries(t).forEach(([e,t])=>{t!=null&&!(e in n)&&(n[e]=t)})}function to(e,t){let n=t.getIntegrationNames();n.length&&eo(e,{[Sn]:n})}function no(e,t,n,r){let i=n.getSdkMetadata(),{release:a,environment:o}=n.getOptions();eo(e,{[ai]:`stream`,[ri]:t.name,[ni]:t.span_id,[ei]:i?.sdk?.name,[ti]:i?.sdk?.version,[bn]:a,[xn]:o||`production`,[Cn]:r.user?.id,[wn]:r.user?.email,[Tn]:r.user?.ip_address,[En]:r.user?.username,...r.attributes})}function ro(e,t){return t(e)||(Br(),e)}var io=0,ao=1,oo=2;function so(e){return new lo(t=>{t(e)})}function co(e){return new lo((t,n)=>{n(e)})}var lo=class e{constructor(e){this._state=io,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(!t)e(n);else try{e(t(n))}catch(e){r(e)}},t=>{if(!n)r(t);else try{e(n(t))}catch(e){r(e)}}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{if(i){n(r);return}e(r)})})}_executeHandlers(){if(this._state===io)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===ao&&e[1](this._value),this._state===oo&&e[2](this._value),!0)})}_runExecutor(e){let t=(e,t)=>{if(this._state===io){if(Ae(t)){t.then(n,r);return}this._state=e,this._value=t,this._executeHandlers()}},n=e=>{t(ao,e)},r=e=>{t(oo,e)};try{e(n,r)}catch(e){r(e)}}};function uo(e,t,n,r=0){try{let i=fo(t,n,e,r);return Ae(i)?i:so(i)}catch(e){return co(e)}}function fo(e,t,n,i){let a=n[i];if(!e||!a)return e;let o=a({...e},t);return r&&o===null&&x.log(`Event processor "${a.id||`?`}" dropped event`),Ae(o)?o.then(e=>fo(e,t,n,i+1)):fo(o,t,n,i+1)}var po,mo,ho,go;function _o(e){let t=i._sentryDebugIds,n=i._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],a=n?Object.keys(n):[];if(go&&r.length===mo&&a.length===ho)return go;mo=r.length,ho=a.length,go={},po||={};let o=(t,n)=>{for(let r of t){let t=n[r],i=po?.[r];if(i&&go&&t)go[i[0]]=t,po&&(po[r]=[i[0],t]);else if(t){let n=e(r);for(let e=n.length-1;e>=0;e--){let i=n[e]?.filename;if(i&&go&&po){go[i]=t,po[r]=[i,t];break}}}}};return t&&o(r,t),n&&o(a,n),go}function vo(e,t){let n=_o(e);if(!n)return[];let r=[];for(let e of t){let t=oe(e);t&&n[t]&&r.push({type:`sourcemap`,code_file:e,debug_id:n[t]})}return r}function yo(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||pt(),timestamp:t.timestamp||St()},l=n.integrations||e.integrations.map(e=>e.name);bo(c,e),Co(c,l),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&xo(c,e.stackParser);let u=To(r,n.captureContext);n.mechanism&&_t(c,n.mechanism);let d=i?i.getEventProcessors():[],f=Ga(a,u),p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),Ha(c,f);let m=[...d,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?so(c):uo(m,c,n)).then(e=>(e&&So(e),typeof o==`number`&&o>0?wo(e,o,s):e))}function bo(e,t){let{environment:n,release:r,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||`production`,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);let o=e.request;o?.url&&a&&(o.url=at(o.url,a)),a&&e.exception?.values?.forEach(e=>{e.value&&=at(e.value,a)})}function xo(e,t){let n=_o(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}function So(e){let 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)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:`sourcemap`,code_file:e,debug_id:t})})}function Co(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function wo(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:Ze(e.data,t,n)}}))},...e.user&&{user:Ze(e.user,t,n)},...e.contexts&&{contexts:Ze(e.contexts,t,n)},...e.extra&&{extra:Ze(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Ze(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:Ze(e.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=Ze(e.contexts.flags,3,n)),r}function To(e,t){if(!t)return e;let n=e?e.clone():new Vt;return n.update(t),n}function Eo(e){if(e)return Do(e)||ko(e)?{captureContext:e}:e}function Do(e){return e instanceof Vt||typeof e==`function`}var Oo=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`propagationContext`];function ko(e){return Object.keys(e).some(e=>Oo.includes(e))}function L(e,t){return k().captureException(e,Eo(t))}function Ao(e,t){let n=typeof t==`string`?t:void 0,r=typeof t==`string`?void 0:{captureContext:t};return k().captureMessage(e,n,r)}function jo(e,t){return k().captureEvent(e,t)}function Mo(e,t){A().setContext(e,t)}function No(e){A().setExtras(e)}function Po(e,t){A().setExtra(e,t)}function Fo(e){A().setTags(e)}function Io(e,t){A().setTag(e,t)}function Lo(e){A().setAttributes(e)}function Ro(e,t){A().setAttribute(e,t)}function zo(e){A().setUser(e)}function Bo(e){A().setConversationId(e)}function Vo(){return A().lastEventId()}async function Ho(e){let t=j();return t?t.flush(e):(r&&x.warn(`Cannot flush events. No client defined.`),Promise.resolve(!1))}async function Uo(e){let t=j();return t?t.close(e):(r&&x.warn(`Cannot flush events and disable SDK. No client defined.`),Promise.resolve(!1))}function Wo(){return!!j()}function Go(){let e=j();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function Ko(e){A().addEventProcessor(e)}function qo(e){let t=A(),{user:n}=Ga(t,k()),{userAgent:r}=i.navigator||{},a=Ot({user:n,...r&&{userAgent:r},...e}),o=t.getSession();return o?.status===`ok`&&kt(o,{status:`exited`}),Jo(),t.setSession(a),a}function Jo(){let e=A(),t=k().getSession()||e.getSession();t&&At(t),Yo(),e.setSession()}function Yo(){let e=A(),t=j(),n=e.getSession();n&&t&&t.captureSession(n)}function Xo(e=!1){if(e){Jo();return}Yo()}function Zo(e){return typeof e==`object`&&typeof e.unref==`function`&&e.unref(),e}function Qo(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}function $o(e){return`${Qo(e)}${e.projectId}/envelope/`}function es(e,t){let n={sentry_version:`7`};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function ts(e,t,n){return t||`${$o(e)}?${es(e,n)}`}function ns(e,t){let n=or(e);if(!n)return``;let r=`${Qo(n)}embed/error-page/`,i=`dsn=${er(n)}`;for(let e in t)if(e!==`dsn`&&e!==`onClose`)if(e===`user`){let e=t.user;if(!e)continue;e.name&&(i+=`&name=${encodeURIComponent(e.name)}`),e.email&&(i+=`&email=${encodeURIComponent(e.email)}`)}else i+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`;return`${r}?${i}`}var rs=[];function is(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}function as(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n==`function`){let e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return is(r)}function os(e,t){let n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&cs(e,t,n)}),n}function ss(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function cs(e,t,n){if(n[t.name]){r&&x.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!rs.includes(t.name)&&typeof t.setupOnce==`function`&&(t.setupOnce(),rs.push(t.name)),t.setup&&typeof t.setup==`function`&&t.setup(e),typeof t.preprocessEvent==`function`){let n=t.preprocessEvent.bind(t);e.on(`preprocessEvent`,(t,r)=>n(t,r,e))}if(typeof t.processEvent==`function`){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}[`processSpan`,`processSegmentSpan`].forEach(n=>{let r=t[n];typeof r==`function`&&e.on(n,n=>r.call(t,n,e))}),r&&x.log(`Integration installed: ${t.name}`)}function ls(e){let t=j();if(!t){r&&x.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function R(e){return e}var us=`sentry.timestamp.sequence`,ds=0,fs;function ps(e){let t=Math.floor(e*1e3);fs!==void 0&&t!==fs&&(ds=0);let n=ds;return ds++,fs=t,{key:us,value:{value:n,type:`integer`}}}function ms(e,t){return t?fn(t,()=>{let n=zr(),r=n?_r(n):mn(t);return[n?gi(n):hi(e,t),r]}):[void 0,void 0]}var hs={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function gs(){return typeof __SENTRY_BROWSER_BUNDLE__<`u`&&!!__SENTRY_BROWSER_BUNDLE__}function _s(){return`npm`}function vs(){return!gs()&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`}function ys(){return typeof window<`u`&&(!vs()||bs())}function bs(){return i.process?.type===`renderer`}function xs(e,t){let n=t?`auto`:`never`;return[{type:`log`,item_count:e.length,content_type:`application/vnd.sentry.items.log+json`},{version:2,...ys()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Ss(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=er(r)),bi(a,[xs(e,i)])}var Cs=100;function ws(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function Ts(e,t){let n=ks(),r=Os(e);r===void 0?n.set(e,[t]):r.length>=Cs?(Ds(e,r),n.set(e,[t])):n.set(e,[...r,t])}function Es(e,t=k(),n=Ts){let i=t?.getClient()??j();if(!i){r&&x.warn(`No client available to capture log.`);return}let{release:a,environment:o,enableLogs:s=!1,beforeSendLog:c}=i.getOptions();if(!s){r&&x.warn(`logging option not enabled, log will not be captured.`);return}let[,l]=ms(i,t),u={...e.attributes},{user:{id:d,email:p,username:m},attributes:h={}}=Ga(A(),t);ws(u,`user.id`,d,!1),ws(u,`user.email`,p,!1),ws(u,`user.name`,m,!1),ws(u,`sentry.release`,a),ws(u,`sentry.environment`,o);let{name:g,version:_}=i.getSdkMetadata()?.sdk??{};ws(u,`sentry.sdk.name`,g),ws(u,`sentry.sdk.version`,_);let v=i.getIntegrationByName(`Replay`),y=v?.getReplayId(!0);ws(u,`sentry.replay_id`,y),y&&v?.getRecordingMode()===`buffer`&&ws(u,`sentry._internal.replay_is_buffering`,!0);let b=e.message;if(we(b)){let{__sentry_template_string__:e,__sentry_template_values__:t=[]}=b;t?.length&&(u[`sentry.message.template`]=e),t.forEach((e,t)=>{u[`sentry.message.parameter.${t}`]=e})}ws(u,`sentry.trace.parent_span_id`,zt(t)?.spanContext().spanId);let S={...e,attributes:u};i.emit(`beforeCaptureLog`,S);let C=c?f(()=>c(S)):S;if(!C){i.recordDroppedEvent(`before_send`,`log_item`,1),r&&x.warn(`beforeSendLog returned null, log will not be captured.`);return}let{level:w,message:T,attributes:ee={},severityNumber:te}=C,ne=O(),re=ps(ne);n(i,{timestamp:ne,level:w,body:js(String(T)),trace_id:l?.trace_id,severity_number:te??hs[w],attributes:As({...rn(h),...rn(ee,!0),[re.key]:re.value})}),i.emit(`afterCaptureLog`,C)}function Ds(e,t){let n=t??Os(e)??[];if(n.length===0)return;let r=e.getOptions(),i=Ss(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);ks().set(e,[]),e.emit(`flushLogs`),e.sendEnvelope(i)}function Os(e){return ks().get(e)}function ks(){return c(`clientToLogBufferMap`,()=>new WeakMap)}function As(e){let t={};for(let[n,r]of Object.entries(e)){let e=js(n);r.type===`string`?t[e]={...r,value:js(r.value)}:t[e]=r}return t}function js(e){let t=Object(e),n=t.isWellFormed,r=t.toWellFormed;return typeof n==`function`&&typeof r==`function`?n.call(e)?e:r.call(e):e}function Ms(e,t){let n=t?`auto`:`never`;return[{type:`trace_metric`,item_count:e.length,content_type:`application/vnd.sentry.items.trace-metric+json`},{version:2,...ys()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Ns(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=er(r)),bi(a,[Ms(e,i)])}var Ps=1e3;function Fs(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function Is(e,t){let n=Hs(),r=Vs(e);r===void 0?n.set(e,[t]):r.length>=Ps?(Bs(e,r),n.set(e,[t])):n.set(e,[...r,t])}function Ls(e,t,n){let{release:r,environment:i}=t.getOptions(),a={...e.attributes};Fs(a,`user.id`,n.id,!1),Fs(a,`user.email`,n.email,!1),Fs(a,`user.name`,n.username,!1),Fs(a,`sentry.release`,r),Fs(a,`sentry.environment`,i);let{name:o,version:s}=t.getSdkMetadata()?.sdk??{};Fs(a,`sentry.sdk.name`,o),Fs(a,`sentry.sdk.version`,s);let c=t.getIntegrationByName(`Replay`),l=c?.getReplayId(!0);return Fs(a,`sentry.replay_id`,l),l&&c?.getRecordingMode()===`buffer`&&Fs(a,`sentry._internal.replay_is_buffering`,!0),{...e,attributes:a}}function Rs(e,t,n,r){let[,i]=ms(t,n),a=zt(n),o=a?a.spanContext().traceId:i?.trace_id,s=a?a.spanContext().spanId:void 0,c=O(),l=ps(c);return{timestamp:c,trace_id:o??``,span_id:s,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...rn(r),...rn(e.attributes,`skip-undefined`),[l.key]:l.value}}}function zs(e,t){let n=t?.scope??k(),i=t?.captureSerializedMetric??Is,a=n?.getClient()??j();if(!a){r&&x.warn(`No client available to capture metric.`);return}let{_experiments:o,enableMetrics:s,beforeSendMetric:c}=a.getOptions();if(!(s??o?.enableMetrics??!0)){r&&x.warn(`metrics option not enabled, metric will not be captured.`);return}let{user:l,attributes:u}=Ga(A(),n),d=Ls(e,a,l);a.emit(`processMetric`,d);let f=c||o?.beforeSendMetric,p=f?f(d):d;if(!p){r&&x.log("`beforeSendMetric` returned `null`, will not send metric.");return}let m=Rs(p,a,n,u);r&&x.log(`[Metric]`,m),i(a,m),a.emit(`afterCaptureMetric`,p)}function Bs(e,t){let n=t??Vs(e)??[];if(n.length===0)return;let r=e.getOptions(),i=Ns(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Hs().set(e,[]),e.emit(`flushMetrics`),e.sendEnvelope(i)}function Vs(e){return Hs().get(e)}function Hs(){return c(`clientToMetricBufferMap`,()=>new WeakMap)}function Us(e){return Er({trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||``,start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:!e.status||e.status===`ok`||e.status===`cancelled`?`ok`:`error`,is_segment:!1,attributes:{...e.data},links:e.links})}function Ws(e,t){if(e.type!==`transaction`||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||t.getOptions().streamGenAiSpans===!1||Gi(t))return;let n=[],r=[];for(let t of e.spans)t.op?.startsWith(`gen_ai.`)?n.push(Us(t)):r.push(t);if(n.length===0)return;e.spans=r;let i=t.getDataCollectionOptions().userInfo?`auto`:`never`;return[{type:`span`,item_count:n.length,content_type:`application/vnd.sentry.items.span.v2+json`},{version:2,...ys()&&{ingest_settings:{infer_ip:i,infer_user_agent:i}},items:n}]}var Gs=Symbol.for(`SentryBufferFullError`);function Ks(e=100){let t=new Set;function n(){return t.size<e}function r(e){t.delete(e)}function i(e){if(!n())return co(Gs);let i=e();return t.add(i),i.then(()=>r(i),()=>r(i)),i}function a(e){if(!t.size)return so(!0);let n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;let r=[n,new Promise(t=>Zo(setTimeout(()=>t(!1),e)))];return Promise.race(r)}return{get $(){return Array.from(t)},add:i,drain:a}}var qs=60*1e3;function Js(e,t=He()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?qs:r-t}function Ys(e,t){return e[t]||e.all||0}function Xs(e,t,n=He()){return Ys(e,t)>n}function Zs(e,{statusCode:t,headers:n},r=He()){let i={...e},a=n?.[`x-sentry-rate-limits`],o=n?.[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=(isNaN(o)?60:o)*1e3;if(!n)i.all=r+s;else for(let e of n.split(`;`))e===`metric_bucket`?(!a||a.split(`;`).includes(`custom`))&&(i[e]=r+s):i[e]=r+s}else o?i.all=r+Js(o,r):t===429&&(i.all=r+60*1e3);return i}function Qs(e,t,n=Ks(e.bufferSize||64)){let i={},a=e=>n.drain(e);function o(a){let o=[];if(Si(a,(t,n)=>{let r=Ni(n);Xs(i,r)?e.recordDroppedEvent(`ratelimit_backoff`,r):o.push(t)}),o.length===0)return Promise.resolve({});let s=bi(a[0],o),c=t=>{if(Ci(s,[`client_report`])){r&&x.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`);return}Si(s,(n,r)=>{e.recordDroppedEvent(t,Ni(r))})};return n.add(()=>t({body:Ei(s)}).then(e=>e.statusCode===413?(r&&x.error(`Sentry responded with status code 413. Envelope was discarded due to exceeding size limits.`),c(`send_error`),e):(r&&e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&x.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),i=Zs(i,e),e),e=>{throw c(`network_error`),r&&x.error(`Encountered error running transport request:`,e),e})).then(e=>e,e=>{if(e===Gs)return r&&x.error(`Skipped sending event because buffer is full.`),c(`queue_overflow`),Promise.resolve({});throw e})}return{send:o,flush:a}}function $s(e,t,n){let r=[{type:`client_report`},{timestamp:n||St(),discarded_events:e}];return bi(t?{dsn:t}:{},[r])}function ec(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function tc(e){let{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:a,data:o,op:s}=e.contexts?.trace??{};return{data:o??{},description:e.transaction,op:s,parent_span_id:n,span_id:r??``,start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??``,origin:a,profile_id:o?.[On],exclusive_time:o?.[kn],measurements:e.measurements,is_segment:!0}}function nc(e){return{type:`transaction`,timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{"sentry.profile_id":e.profile_id},...e.exclusive_time&&{"sentry.exclusive_time":e.exclusive_time}}}},measurements:e.measurements}}var rc=`[Filtered]`,ic=[`forwarded`,`-ip`,`remote-`,`via`,`-user`],ac=[`auth`,`token`,`secret`,`session`,`password`,`passwd`,`pwd`,`key`,`jwt`,`bearer`,`sso`,`saml`,`csrf`,`xsrf`,`credentials`,`sid`,`identity`,`set-cookie`,`cookie`],oc=[`.sid`,`sessid`,`remember`,`oidc`,`pkce`,`nonce`,`__secure-`,`__host-`,`awsalb`,`awselb`,`akamai`,`__stripe`,`cognito`,`firebase`,`supabase`,`sb-`,`mfa`,`2fa`];function sc(e){return e===!0?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[`incomingRequest`,`outgoingRequest`,`incomingResponse`,`outgoingResponse`],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:ic},httpHeaders:{request:{deny:ic},response:{deny:ic}},httpBodies:[],queryParams:{deny:ic},genAI:{inputs:!1,outputs:!1},stackFrameVariables:!0,frameContextLines:7}}var cc={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[`incomingRequest`,`outgoingRequest`,`incomingResponse`,`outgoingResponse`],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:5};function lc(e){let t=e.dataCollection==null?sc(e.sendDefaultPii):cc,n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:{request:n.httpHeaders?.request??t.httpHeaders.request,response:n.httpHeaders?.response??t.httpHeaders.response},httpBodies:n.httpBodies??t.httpBodies,queryParams:n.queryParams??t.queryParams,genAI:{inputs:n.genAI?.inputs??t.genAI.inputs,outputs:n.genAI?.outputs??t.genAI.outputs},stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}var uc=`Not capturing exception because it's already been captured.`,dc=`Discarded session because of missing or non-string release`,fc=Symbol.for(`SentryInternalError`),pc=Symbol.for(`SentryDoNotSendEventError`),mc=5e3;function hc(e){return{message:e,[fc]:!0}}function gc(e){return{message:e,[pc]:!0}}function _c(e){return De(e)&&fc in e}function vc(e){return De(e)&&pc in e}function yc(e,t,n,r,i){let a=0,o,s=!1;e.on(n,()=>{a=0,clearTimeout(o),s=!1}),e.on(t,t=>{if(a+=r(t),a>=8e5)i(e);else if(!s){let t=e.getOptions()._flushInterval??mc;t>0&&(s=!0,o=Zo(setTimeout(()=>{i(e)},t)))}}),e.on(`flush`,()=>{i(e)})}var bc=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Ks(e.transportOptions?.bufferSize??64),this._dataCollection=lc(e),e.dsn?this._dsn=or(e.dsn):r&&x.warn(`No DSN provided, client will not send events.`),this._dsn){let t=ts(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&yc(this,`afterCaptureLog`,`flushLogs`,Dc,Ds),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&yc(this,`afterCaptureMetric`,`flushMetrics`,Ec,Bs)}captureException(e,t,n){let i=pt();if(yt(e))return r&&x.log(uc),i;let a={event_id:i,...t};return this._process(()=>this.eventFromException(e,a).then(e=>this._captureEvent(e,a,n)).then(e=>e),`error`),a.event_id}captureMessage(e,t,n,r){let i={event_id:pt(),...n},a=we(e)?e:String(e),o=Te(e),s=o?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(()=>s.then(e=>this._captureEvent(e,i,r)),o?`unknown`:`error`),i.event_id}captureEvent(e,t,n){let i=pt();if(t?.originalException&&yt(t.originalException))return r&&x.log(uc),i;let a={event_id:i,...t},o=e.sdkProcessingMetadata||{},s=o.capturedSpanScope,c=o.capturedSpanIsolationScope,l=xc(e.type);return this._process(()=>this._captureEvent(e,a,s||n,c),l),a.event_id}captureSession(e){this.sendSession(e),kt(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){let t=this._transport;if(this.emit(`flush`),!t)return!0;let n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){Ds(this);let t=await this.flush(e);return this.getOptions().enabled=!1,this.emit(`close`),t}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]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){let t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),cs(this,e,this._integrations),t||ss(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=Ws(e,this),r=Ri(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])r=xi(r,Ai(e));n&&(r=xi(r,n)),this.sendEnvelope(r).then(t=>this.emit(`afterSendEvent`,e,t))}sendSession(e){let{release:t,environment:n=di}=this._options;if(`aggregates`in e){let i=e.attrs||{};if(!i.release&&!t){r&&x.warn(dc);return}i.release=i.release||t,i.environment=i.environment||n,e.attrs=i}else{if(!e.release&&!t){r&&x.warn(dc);return}e.release=e.release||t,e.environment=e.environment||n}this.emit(`beforeSendSession`,e);let i=Li(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){let i=`${e}:${t}`;r&&x.log(`Recording outcome: "${i}"${n>1?` (${n} times)`:``}`),this._outcomes[i]=(this._outcomes[i]||0)+n}}on(e,t){let n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit(`beforeEnvelope`,e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(e){return r&&x.error(`Error while sending envelope:`,e),{}}return r&&x.error(`Transport disabled`),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=os(this,e),ss(this,e)}_updateSessionFromEvent(e,t){let n=t.level===`fatal`,r=!1,i=t.exception?.values;if(i){r=!0,n=!1;for(let e of i)if(e.mechanism?.handled===!1){n=!0;break}}let a=e.status===`ok`;(a&&e.errors===0||a&&n)&&(kt(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r){let i=this.getOptions(),a=this.getIntegrationNames();return!t.integrations&&a.length&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),yo(i,e,t,n,this,r).then(e=>e===null?e:(this.emit(`postprocessEvent`,e,t),e.contexts={trace:{...e.contexts?.trace,...mn(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:hi(this,n),...e.sdkProcessingMetadata},e))}_captureEvent(e,t={},n=k(),i=A()){return r&&wc(e)&&x.log(`Captured error event \`${ec(e)[0]||`<unknown>`}\``),this._processEvent(e,t,n,i).then(e=>e.event_id,e=>{r&&(vc(e)?x.log(e.message):_c(e)?x.warn(e.message):x.warn(e))})}_processEvent(e,t,n,r){let i=this.getOptions(),{sampleRate:a}=i,o=Tc(e),s=wc(e),c=`before send for type \`${e.type||`error`}\``,l=a===void 0?void 0:sr(a);if(s&&typeof l==`number`&&Ve()>l)return this.recordDroppedEvent(`sample_rate`,`error`),co(gc(`Discarding event because it's not included in the random sample (sampling rate = ${a})`));let u=xc(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(e===null)throw this.recordDroppedEvent(`event_processor`,u),gc("An event processor returned `null`, will not send event.");return t.data?.__sentry__===!0?e:Sc(Cc(this,i,e,t),c)}).then(i=>{if(i===null){if(this.recordDroppedEvent(`before_send`,u),o){let t=1+(e.spans||[]).length;this.recordDroppedEvent(`before_send`,`span`,t)}throw gc(`${c} returned \`null\`, will not send event.`)}let a=n.getSession()||r.getSession();if(s&&a&&this._updateSessionFromEvent(a,i),o){let e=(i.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let l=i.transaction_info;return o&&l&&i.transaction!==e.transaction&&(i.transaction_info={...l,source:`custom`}),this.sendEvent(i,t),i}).then(null,e=>{throw vc(e)||_c(e)?e:(this.captureException(e,{mechanism:{handled:!1,type:`internal`},data:{__sentry__:!0},originalException:e}),hc(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
10
|
-
Reason: ${e}`))})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===Gs&&this.recordDroppedEvent(`queue_overflow`,t),e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}})}_flushOutcomes(){r&&x.log(`Flushing outcomes...`);let e=this._clearOutcomes();if(e.length===0){r&&x.log(`No outcomes to send`);return}if(!this._dsn){r&&x.log(`No dsn provided, will not send outcomes`);return}r&&x.log(`Sending outcomes:`,e);let t=$s(e,this._options.tunnel&&er(this._dsn));this.sendEnvelope(t)}};function xc(e){return e===`replay_event`?`replay`:e||`error`}function Sc(e,t){let n=`${t} must return \`null\` or a valid event.`;if(Ae(e))return e.then(e=>{if(!Ee(e)&&e!==null)throw hc(n);return e},e=>{throw hc(`${t} rejected with ${e}`)});if(!Ee(e)&&e!==null)throw hc(n);return e}function Cc(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,ignoreSpans:o}=t,s=!yi(t.beforeSendSpan)&&t.beforeSendSpan,c=n;if(wc(c)&&i)return i(c,r);if(Tc(c)){if(s||o){let t=tc(c);if(o?.length&&Kr({description:t.description,op:t.op,attributes:t.data},o))return null;if(s){let e=s(t);e?c=Mt(n,nc(e)):Br()}if(c.spans){let t=[],n=c.spans;for(let e of n){if(o?.length&&Kr({description:e.description,op:e.op,attributes:e.data},o)){Jr(n,e);continue}if(s){let n=s(e);n?t.push(n):(Br(),t.push(e))}else t.push(e)}let r=c.spans.length-t.length;r&&e.recordDroppedEvent(`before_send`,`span`,r),c.spans=t}}if(a){if(c.spans){let e=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(c,r)}}return c}function wc(e){return e.type===void 0}function Tc(e){return e.type===`transaction`}function Ec(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Oc(e.attributes)}function Dc(e){let t=0;return e.message&&(t+=e.message.length*2),t+Oc(e.attributes)}function Oc(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*kc(e[0]):Te(e)?t+=kc(e):t+=100}),t}function kc(e){return typeof e==`string`?e.length*2:typeof e==`number`?8:typeof e==`boolean`?4:0}function Ac(e,t){t.debug===!0&&(r?x.enable():f(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),k().update(t.initialScope);let n=new e(t);return jc(n),n.init(),n}function jc(e){k().setClient(e)}var Mc=5e3,Nc=36e5;function Pc(e){function t(...e){r&&x.log(`[Offline]:`,...e)}return n=>{let r=e(n);if(!n.createStore)throw Error("No `createStore` function was provided");let i=n.createStore(n),a=Mc,o;function s(e,t,r){return Ci(e,[`client_report`])?!1:!n.shouldStore||n.shouldStore(e,t,r)}function c(e){o&&clearTimeout(o),o=Zo(setTimeout(async()=>{o=void 0;let e=await i.shift();e&&(t(`Attempting to send previously queued event`),e[0].sent_at=new Date(He()).toISOString(),u(e,!0).catch(e=>{t(`Failed to retry sending`,e)}))},e))}function l(){o||(c(a),a=Math.min(a*2,Nc))}async function u(e,o=!1){if(!o&&Ci(e,[`replay_event`,`replay_recording`]))return await i.push(e),c(100),{};try{if(n.shouldSend&&await n.shouldSend(e)===!1)throw Error("Envelope not sent because `shouldSend` callback returned false");let t=await r.send(e),i=100;if(t){if(t.headers?.[`retry-after`])i=Js(t.headers[`retry-after`]);else if(t.headers?.[`x-sentry-rate-limits`])i=6e4;else if((t.statusCode||0)>=400)return t}return c(i),a=Mc,t}catch(n){if(await s(e,n,a))return o?await i.unshift(e):await i.push(e),l(),t(`Error sending. Event queued.`,n),{};throw n}}return n.flushAtStartup&&l(),{send:u,flush:e=>(e===void 0&&(a=Mc,c(100)),r.flush(e))}}}var Fc=`MULTIPLEXED_TRANSPORT_EXTRA_KEY`;function Ic(e,t){let n;return Si(e,(e,r)=>(t.includes(r)&&(n=Array.isArray(e)?e[1]:void 0),!!n)),n}function Lc(e,t){return n=>{let r=e(n);return{...r,send:async e=>{let n=Ic(e,[`event`,`transaction`,`profile`,`replay_event`]);return n&&(n.release=t),r.send(e)}}}}function Rc(e,t){return bi(t?{...e[0],dsn:t}:e[0],e[1])}function zc(e,t){return n=>{let r=e(n),i=new Map,a=t||(e=>{let t=e.getEvent();return t?.extra?.MULTIPLEXED_TRANSPORT_EXTRA_KEY&&Array.isArray(t.extra.MULTIPLEXED_TRANSPORT_EXTRA_KEY)?t.extra.MULTIPLEXED_TRANSPORT_EXTRA_KEY:[]});function o(t,r){let a=r?`${t}:${r}`:t,o=i.get(a);if(!o){let s=tr(t);if(!s)return;let c=ts(s,n.tunnel);o=r?Lc(e,r)({...n,url:c}):e({...n,url:c}),i.set(a,o)}return[t,o]}async function s(e){function t(t){return Ic(e,t?.length?t:[`event`])}let n=a({envelope:e,getEvent:t}).map(e=>typeof e==`string`?o(e,void 0):o(e.dsn,e.release)).filter(e=>!!e),i=n.length?n:[[``,r]];return(await Promise.all(i.map(([t,n])=>n.send(Rc(e,t)))))[0]}async function c(e){let t=[...i.values(),r];return(await Promise.all(t.map(t=>t.flush(e)))).every(e=>e)}return{send:s,flush:c}}}function Bc(e,t){return t.some(t=>e.includes(t))}function Vc(e,t,n){if(t===!1)return{};let r=n==null?ac:[...ac,...n],i={};if(t===!0){for(let t of Object.keys(e))i[t]=Bc(t.toLowerCase(),r)?rc:e[t];return i}if(`deny`in t){let n=t.deny.map(e=>e.toLowerCase());for(let t of Object.keys(e)){let a=t.toLowerCase();i[t]=Bc(a,r)||n.some(e=>a.includes(e))?rc:e[t]}return i}let a=t.allow.map(e=>e.toLowerCase());for(let t of Object.keys(e)){let n=t.toLowerCase();Bc(n,r)?i[t]=rc:i[t]=a.some(e=>n.includes(e))?e[t]:rc}return i}function Hc(e){let t={},n=0;for(;n<e.length;){let r=e.indexOf(`=`,n);if(r===-1)break;let i=e.indexOf(`;`,n);if(i===-1)i=e.length;else if(i<r){n=e.lastIndexOf(`;`,r-1)+1;continue}let a=e.slice(n,r).trim();if(t[a]===void 0){let n=e.slice(r+1,i).trim();n.charCodeAt(0)===34&&(n=n.slice(1,-1));try{t[a]=n.indexOf(`%`)===-1?n:decodeURIComponent(n)}catch{t[a]=n}}n=i+1}return t}function Uc(e,t){if(t===!1)return{};try{let n=Hc(e);return Object.keys(n).length===0?{}:Vc(n,t,oc)}catch{return rc}}var Wc=`thismessage:/`;function Gc(e){return`isRelative`in e}function Kc(e,t){let n=e.indexOf(`://`)<=0&&e.indexOf(`//`)!==0,r=t??(n?Wc:void 0);try{if(`canParse`in URL&&!URL.canParse(e,r))return;let t=new URL(e,r);return n?{isRelative:n,pathname:t.pathname,search:t.search,hash:t.hash}:t}catch{}}function qc(e){if(Gc(e))return e.pathname;let t=new URL(e);return t.search=``,t.hash=``,[`80`,`443`].includes(t.port)&&(t.port=``),t.password&&=`%filtered%`,t.username&&=`%filtered%`,t.toString()}function Jc(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let 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}}function Yc(e){return e.split(/[?#]/,1)[0]}function Xc(e,t=!0){if(e.startsWith(`data:`)){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:`text/plain`,i=e.includes(`;base64,`),a=e.indexOf(`,`),o=``;if(t&&a!==-1){let t=e.slice(a+1);o=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?`,base64`:``}${o?`,${o}`:``}`}return e}function Zc(e,t){let n=t?.getDsn(),r=t?.getOptions().tunnel;return $c(e,n)||Qc(e,r)}function Qc(e,t){return t?tl(e)===tl(t):!1}function $c(e,t){let n=Kc(e);return!n||Gc(n)||!t?!1:el(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function el(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function tl(e){return e[e.length-1]===`/`?e.slice(0,-1):e}function nl(e,...t){let n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join(`\0`).replace(/%/g,`%%`).replace(/\0/g,`%s`),n.__sentry_template_values__=t,n}var rl=nl;function il(e){`aggregates`in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:`{{auto}}`}):e.ipAddress===void 0&&(e.ipAddress=`{{auto}}`)}function al(e,t,n=[t],r=`npm`){let i=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${t}`,i.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:a})),i.version=a)}function ol(e={}){let t=e.client||j();if(!Go()||!t)return{};let n=en(o());if(n.getTraceData)return n.getTraceData(e);let r=e.scope||k(),i=e.span||zr(),a=Qr(i)&&!Wr(t.getOptions());if(!i&&un())return{};let s=i&&!a?vr(i):sl(r),c=qn(i?gi(i):hi(t,r));if(!cr.test(s))return x.warn(`Invalid sentry-trace data. Cannot generate trace data`),{};let l={"sentry-trace":s,baggage:c};return e.propagateTraceparent&&(l.traceparent=i&&!a?yr(i):cl(r)),l}function sl(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return dr(t,r,n)}function cl(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return fr(t,r,n)}var ll=100;function ul(e,t){let n=j(),r=A();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=ll}=n.getOptions();if(a<=0)return;let o={timestamp:St(),...e},s=i?f(()=>i(o,t)):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}var dl,fl=`FunctionToString`,pl=new WeakMap,ml=R((()=>({name:fl,setupOnce(){dl=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Fe(this),n=pl.has(j())&&t!==void 0?t:this;return dl.apply(n,e)}}catch{}},setup(e){pl.set(e,!0)}}))),hl=[/^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/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],gl=`EventFilters`,_l=R((e={})=>{let t;return{name:gl,setup(n){t=yl(e,n.getOptions())},processEvent(n,r,i){return t||=yl(e,i.getOptions()),bl(n,t)?null:n}}}),vl=R(((e={})=>({..._l(e),name:`InboundFilters`})));function yl(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:hl],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function bl(e,t){if(!e.type){if(xl(e,t.ignoreErrors))return r&&x.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
11
|
-
Event: ${
|
|
12
|
-
Event: ${
|
|
13
|
-
Event: ${
|
|
14
|
-
Url: ${
|
|
15
|
-
Event: ${
|
|
16
|
-
Url: ${
|
|
17
|
-
Event: ${ht(e)}`),!0;return!1}function xl(e,t){return t?.length?ec(e).some(e=>lt(e,t)):!1}function Sl(e,t){if(!t?.length)return!1;let n=e.transaction;return n?lt(n,t):!1}function Cl(e,t){if(!t?.length)return!1;let n=El(e);return n?lt(n,t):!1}function wl(e,t){if(!t?.length)return!0;let n=El(e);return!n||lt(n,t)}function Tl(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}function El(e){try{let t=[...e.exception?.values??[]].reverse().find(e=>e.mechanism?.parent_id===void 0&&e.stacktrace?.frames?.length)?.stacktrace?.frames;return t?Tl(t):null}catch{return r&&x.error(`Cannot extract url for event ${ht(e)}`),null}}function Dl(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&e.type!==`Error`||e.value):!1}function Ol(e,t,n,r,i,a){if(!i.exception?.values||!a||!je(a.originalException,Error))return;let o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=kl(e,t,r,a.originalException,n,i.exception.values,o,0))}function kl(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(je(r[i],Error)){jl(o,s,r);let a=e(t,r[i]),l=c.length;Ml(a,i,l,s),c=kl(e,t,n,r[i],i,[a,...c],a,l)}return Al(r)&&r.errors.forEach((a,l)=>{if(je(a,Error)){jl(o,s,r);let u=e(t,a),d=c.length;Ml(u,`errors[${l}]`,d,s),c=kl(e,t,n,a,i,[u,...c],u,d)}}),c}function Al(e){return Array.isArray(e.errors)}function jl(e,t,n){e.mechanism={handled:!0,type:`auto.core.linked_errors`,...Al(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Ml(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}function Nl(e){return ve(e)&&`__sentry_fetch_url_host__`in e&&typeof e.__sentry_fetch_url_host__==`string`}function Pl(e){return Nl(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}var Fl=new Map,Il=new Set;function Ll(e){if(i._sentryModuleMetadata)for(let t of Object.keys(i._sentryModuleMetadata)){let n=i._sentryModuleMetadata[t];if(Il.has(t))continue;Il.add(t);let r=e(t);for(let e of r.reverse())if(e.filename){Fl.set(e.filename,n);break}}}function Rl(e,t){return Ll(e),Fl.get(t)}function zl(e,t){t.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(t=>{if(!t.filename||t.module_metadata)return;let n=Rl(e,t.filename);n&&(t.module_metadata=n)})})}function Bl(e){e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{delete e.module_metadata})})}var Vl=R(()=>({name:`ModuleMetadata`,setup(e){e.on(`beforeEnvelope`,e=>{Si(e,(e,t)=>{if(t===`event`){let t=Array.isArray(e)?e[1]:void 0;t&&(Bl(t),e[1]=t)}})}),e.on(`applyFrameMetadata`,t=>{if(t.type)return;let n=e.getOptions().stackParser;zl(n,t)})}})),Hl=new Set([]);function Ul(e){let t=`console`,n=ce(t,e);return le(t,Wl),n}function Wl(){`console`in i&&l.forEach(function(e){e in i.console&&Ne(i.console,e,function(t){return d[e]=t,function(...t){let n=t[0],a=d[e],o=Hl.size&&typeof n==`string`&<(n,Hl);o||ue(`console`,{args:t,level:e}),(!o||r&&x.isEnabled())&&a?.apply(i.console,t)}})})}function Gl(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var Kl=`CaptureConsole`,ql=R(((e={})=>{let t=e.levels||l,n=e.handled??!0;return{name:Kl,setup(e){`console`in i&&Ul(({args:r,level:i})=>{j()!==e||!t.includes(i)||Jl(r,i,n)})}}}));function Jl(e,t,n){let r=Gl(t),i=Error(),a={level:Gl(t),extra:{arguments:e}};fn(o=>{if(o.addEventProcessor(e=>(e.logger=`console`,_t(e,{handled:n,type:`auto.core.capture_console`}),e)),t===`assert`){if(!e[0]){let t=`Assertion failed: ${st(e.slice(1),` `)||`console.assert`}`;o.setExtra(`arguments`,e.slice(1)),o.captureMessage(t,r,{captureContext:a,syntheticException:i})}return}let s=e.find(e=>e instanceof Error);if(s){L(s,a);return}let c=st(e,` `);o.captureMessage(c,r,{captureContext:a,syntheticException:i})})}var Yl=`Dedupe`,Xl=R((()=>{let e;return{name:Yl,processEvent(t){if(t.type)return t;try{if(Zl(t,e))return r&&x.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}}));function Zl(e,t){return t?!!(Ql(e,t)||$l(e,t)):!1}function Ql(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!tu(e,t)||!eu(e,t))}function $l(e,t){let n=nu(t),r=nu(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!tu(e,t)||!eu(e,t))}function eu(e,t){let n=ae(e),r=ae(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function tu(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join(``)===r.join(``)}catch{return!1}}function nu(e){return e.exception?.values?.[0]}var ru=`ExtraErrorData`,iu=R(((e={})=>{let{depth:t=3,captureErrorCause:n=!0}=e;return{name:ru,processEvent(e,r,i){let{maxValueLength:a}=i.getOptions();return au(e,r,t,n,a)}}}));function au(e,t={},n,r,i){if(!t.originalException||!ve(t.originalException))return e;let a=t.originalException.name||t.originalException.constructor.name,o=ou(t.originalException,r,i);if(o){let t={...e.contexts},r=Ze(o,n);return Ee(r)&&(Ge(r),t[a]=r),{...e,contexts:t}}return e}function ou(e,t,n){try{let r=[`name`,`message`,`stack`,`line`,`column`,`fileName`,`lineNumber`,`columnNumber`,`toJSON`],i={};for(let t of Object.keys(e)){if(r.indexOf(t)!==-1)continue;let a=e[t];i[t]=ve(a)||typeof a==`string`?n?at(`${a}`,n):`${a}`:a}if(t&&e.cause!==void 0&&(ve(e.cause)?i.cause={[e.cause.name||e.cause.constructor.name]:ou(e.cause,!1,n)}:i.cause=e.cause),typeof e.toJSON==`function`){let t=e.toJSON();for(let e of Object.keys(t)){let n=t[e];i[e]=ve(n)?n.toString():n}}return i}catch(e){r&&x.error(`Unable to extract extra data from the Error object:`,e)}return null}function su(e,t){let n=0;for(let t=e.length-1;t>=0;t--){let r=e[t];r===`.`?e.splice(t,1):r===`..`?(e.splice(t,1),n++):n&&(e.splice(t,1),n--)}if(t)for(;n--;)e.unshift(`..`);return e}var cu=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function lu(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=cu.exec(t);return n?n.slice(1):[]}function uu(...e){let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:`/`;i&&(t=`${i}/${t}`,n=i.charAt(0)===`/`)}return t=su(t.split(`/`).filter(e=>!!e),!n).join(`/`),(n?`/`:``)+t||`.`}function du(e){let t=0;for(;t<e.length&&e[t]===``;t++);let n=e.length-1;for(;n>=0&&e[n]===``;n--);return t>n?[]:e.slice(t,n-t+1)}function fu(e,t){e=uu(e).slice(1),t=uu(t).slice(1);let n=du(e.split(`/`)),r=du(t.split(`/`)),i=Math.min(n.length,r.length),a=i;for(let e=0;e<i;e++)if(n[e]!==r[e]){a=e;break}let o=[];for(let e=a;e<n.length;e++)o.push(`..`);return o=o.concat(r.slice(a)),o.join(`/`)}function pu(e,t){let n=lu(e)[2]||``;return t&&n.slice(t.length*-1)===t&&(n=n.slice(0,n.length-t.length)),n}var mu=`RewriteFrames`,hu=R((e={})=>{let t=e.root,n=e.prefix||`app:///`,r=`window`in i&&!!i.window,a=e.iteratee||gu({isBrowser:r,root:t,prefix:n});function o(e){try{return{...e,exception:{...e.exception,values:e.exception.values.map(e=>({...e,...e.stacktrace&&{stacktrace:s(e.stacktrace)}}))}}}catch{return e}}function s(e){return{...e,frames:e?.frames?.map(e=>a(e))}}return{name:mu,processEvent(e){let t=e;return e.exception&&Array.isArray(e.exception.values)&&(t=o(t)),t}}});function gu({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;let i=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes(`\\`)&&!r.filename.includes(`/`),a=/^\//.test(r.filename);if(e){if(t){let e=r.filename;e.indexOf(t)===0&&(r.filename=e.replace(t,n))}}else if(i||a){let e=i?r.filename.replace(/^[a-zA-Z]:/,``).replace(/\\/g,`/`):r.filename;r.filename=`${n}${t?fu(t,e):pu(e)}`}return r}}var _u=[`reauthenticate`,`signInAnonymously`,`signInWithOAuth`,`signInWithIdToken`,`signInWithOtp`,`signInWithPassword`,`signInWithSSO`,`signOut`,`signUp`,`verifyOtp`],vu=[`createUser`,`deleteUser`,`listUsers`,`getUserById`,`updateUserById`,`inviteUserByEmail`],yu={eq:`eq`,neq:`neq`,gt:`gt`,gte:`gte`,lt:`lt`,lte:`lte`,like:`like`,"like(all)":`likeAllOf`,"like(any)":`likeAnyOf`,ilike:`ilike`,"ilike(all)":`ilikeAllOf`,"ilike(any)":`ilikeAnyOf`,is:`is`,in:`in`,cs:`contains`,cd:`containedBy`,sr:`rangeGt`,nxl:`rangeGte`,sl:`rangeLt`,nxr:`rangeLte`,adj:`rangeAdjacent`,ov:`overlaps`,fts:``,plfts:`plain`,phfts:`phrase`,wfts:`websearch`,not:`not`},bu=[`select`,`insert`,`upsert`,`update`,`delete`];function xu(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function Su(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function Cu(e,t){if(Object.keys(t).length>0)return t;if(Array.isArray(e)&&e.length>0)return e}function wu(e,t){return Cu(e,t)!==void 0}function Tu(e,t={}){switch(e){case`GET`:return`select`;case`POST`:return t.Prefer?.includes(`resolution=`)?`upsert`:`insert`;case`PATCH`:return`update`;case`DELETE`:return`delete`;default:return`<unknown-op>`}}function Eu(e,t){if(t===``||t===`*`)return`select(*)`;if(e===`select`)return`select(${t})`;if(e===`or`||e.endsWith(`.or`))return`${e}${t}`;let[n,...r]=t.split(`.`),i;return i=n?.startsWith(`fts`)?`textSearch`:n?.startsWith(`plfts`)?`textSearch[plain]`:n?.startsWith(`phfts`)?`textSearch[phrase]`:n?.startsWith(`wfts`)?`textSearch[websearch]`:n&&yu[n]||`filter`,`${i}(${e}, ${r.join(`.`)})`}function Du(e,t=!1){return new Proxy(e,{apply(n,r,i){return na({name:`auth ${t?`(admin) `:``}${e.name}`,attributes:{[P]:`auto.db.supabase`,[N]:`db`,"db.system":`postgresql`,"db.operation":`auth.${t?`admin.`:``}${e.name}`}},e=>Reflect.apply(n,r,i).then(t=>(De(t)&&`error`in t&&t.error?(e.setStatus({code:2}),L(t.error,{mechanism:{handled:!1,type:`auto.db.supabase.auth`}})):e.setStatus({code:1}),e.end(),t)).catch(t=>{throw e.setStatus({code:2}),e.end(),L(t,{mechanism:{handled:!1,type:`auto.db.supabase.auth`}}),t}).then(...i))}})}function Ou(e){let t=e.auth;if(!(!t||Su(e.auth))){for(let n of _u){let r=t[n];r&&typeof e.auth[n]==`function`&&(e.auth[n]=Du(r))}for(let n of vu){let r=t.admin[n];r&&typeof e.auth.admin[n]==`function`&&(e.auth.admin[n]=Du(r,!0))}xu(e.auth)}}function ku(e,t){Su(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(e,n,r){let i=Reflect.apply(e,n,r),a=i.constructor;return ju(a,t),i}}),xu(e.prototype.from))}function Au(e,t){Su(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(e,n,r){let i=bu,a=n,o=Tu(a.method,a.headers);if(!i.includes(o)||!a?.url?.pathname||typeof a.url.pathname!=`string`)return Reflect.apply(e,n,r);let s=a.url.pathname.split(`/`),c=s.length>0?s[s.length-1]:``,l=[];for(let[e,t]of a.url.searchParams.entries())l.push(Eu(e,t));let u=Object.create(null);if(Ee(a.body))for(let[e,t]of Object.entries(a.body))u[e]=t;let d=j(),f=t.sendOperationData??d?.getDataCollectionOptions().userInfo===!0,p=Cu(a.body,u),m=o===`select`?``:`${o}${wu(a.body,u)?`(...) `:``}`,h=f?l.join(` `):l.length>0?`[redacted]`:``,g=[m.trimEnd(),h].filter(Boolean).join(` `),_=g?`${g} from(${c})`:`from(${c})`,v={"db.table":c,"db.schema":a.schema,"db.url":a.url.origin,"db.sdk":a.headers[`X-Client-Info`],"db.system":`postgresql`,"db.operation":o,[P]:`auto.db.supabase`,[N]:`db`};return l.length&&f&&(v[`db.query`]=l),p!==void 0&&f&&(v[`db.body`]=p),na({name:_,attributes:v},t=>Reflect.apply(e,n,[]).then(e=>{if(t&&(e&&typeof e==`object`&&`status`in e&&Pn(t,e.status||500),t.end()),e?.error){let t=Error(e.error.message);e.error.code&&(t.code=e.error.code),e.error.details&&(t.details=e.error.details);let n={};l.length&&f&&(n.query=l),p!==void 0&&f&&(n.body=p),L(t,e=>(e.addEventProcessor(e=>(_t(e,{handled:!1,type:`auto.db.supabase.postgres`}),e)),e.setContext(`supabase`,n),e))}let n={type:`supabase`,category:`db.${o}`,message:_},r={};return l.length&&f&&(r.query=l),p!==void 0&&f&&(r.body=p),Object.keys(r).length&&(n.data=r),ul(n),e},e=>{throw t&&(Pn(t,500),t.end()),e}).then(...r))}}),xu(e.prototype.then))}function ju(e,t){for(let n of bu)Su(e.prototype[n])||(e.prototype[n]=new Proxy(e.prototype[n],{apply(e,i,a){let o=Reflect.apply(e,i,a),s=o.constructor;return r&&x.log(`Instrumenting ${n} operation's PostgRESTFilterBuilder`),Au(s,t),o}}),xu(e.prototype[n]))}var Mu=(e,t={})=>{if(!e){r&&x.warn(`Supabase integration was not installed because no Supabase client was provided.`);return}ku(e.constructor===Function?e:e.constructor,t),Ou(e)},Nu=`Supabase`,Pu=((e,t)=>({setupOnce(){Mu(e,t)},name:Nu})),Fu=R(e=>Pu(e.supabaseClient,{sendOperationData:e.sendOperationData})),Iu=10,Lu=`ZodErrors`;function Ru(e){return ve(e)&&e.name===`ZodError`&&Array.isArray(e.issues)}function zu(e){return{...e,path:`path`in e&&Array.isArray(e.path)?e.path.join(`.`):void 0,keys:`keys`in e?JSON.stringify(e.keys):void 0,unionErrors:`unionErrors`in e?JSON.stringify(e.unionErrors):void 0}}function Bu(e){return e.map(e=>typeof e==`number`?`<array>`:e).join(`.`)}function Vu(e){let t=new Set;for(let n of e.issues){let e=Bu(n.path);e.length>0&&t.add(e)}let n=Array.from(t);if(n.length===0){let t=`variable`;if(e.issues.length>0){let n=e.issues[0];n!==void 0&&`expected`in n&&typeof n.expected==`string`&&(t=n.expected)}return`Failed to validate ${t}`}return`Failed to validate keys: ${at(n.join(`, `),100)}`}function Hu(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!Ru(r.originalException)||r.originalException.issues.length===0)return n;try{let i=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(zu);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:`zod_issues.json`,data:JSON.stringify({issues:i})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:Vu(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":i.slice(0,e)}}}catch(e){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:`an exception was thrown while processing ZodError within applyZodErrorsToEvent()`,error:e instanceof Error?`${e.name}: ${e.message}
|
|
18
|
-
${e.stack}`:`unknown`}}}}}var Uu=R(((e={})=>{let t=e.limit??Iu;return{name:Lu,processEvent(n,r){return Hu(t,e.saveZodIssuesAsAttachment,n,r)}}})),Wu=R(e=>({name:`ThirdPartyErrorsFilter`,setup(e){e.on(`beforeEnvelope`,e=>{Si(e,(e,t)=>{if(t===`event`){let t=Array.isArray(e)?e[1]:void 0;t&&(Bl(t),e[1]=t)}})}),e.on(`applyFrameMetadata`,t=>{if(t.type)return;let n=e.getOptions().stackParser;zl(n,t)})},preprocessEvent(t){e.ignoreSentryInternalFrames&&(i._sentryWrappedDepth??0)>0&&(t.sdkProcessingMetadata={...t.sdkProcessingMetadata,insideSentryWrapped:!0})},processEvent(t){let n=e.ignoreSentryInternalFrames?t.sdkProcessingMetadata?.insideSentryWrapped===!0&&t.exception?.values?.length===1:!1,r=Ku(t,e.ignoreSentryInternalFrames,n);if(r&&r[e.behaviour===`drop-error-if-contains-third-party-frames`||e.behaviour===`apply-tag-if-contains-third-party-frames`?`some`:`every`](t=>!t.some(t=>e.filterKeys.includes(t)))){if(e.behaviour===`drop-error-if-contains-third-party-frames`||e.behaviour===`drop-error-if-exclusively-contains-third-party-frames`)return null;t.tags={...t.tags,third_party_code:!0}}return t}}));function Gu(e,t,n){if(t!==0)return!1;if(n&&qu(e)||e.function===`sentryWrapped`)return!0;if(!e.context_line||!e.filename||!e.filename.includes(`sentry`)||!e.filename.includes(`helpers`)||!e.context_line.includes(Xu))return!1;if(e.pre_context){let t=e.pre_context.length;for(let n=0;n<t;n++)if(e.pre_context[n]?.includes(Yu))return!0}return!1}function Ku(e,t,n){let r=ae(e);if(r)return r.filter((e,r)=>!e.filename||e.lineno==null&&e.colno==null&&e.instruction_addr==null?!1:!t||!Gu(e,r,!!n)).map(e=>e.module_metadata?Object.keys(e.module_metadata).filter(e=>e.startsWith(Ju)).map(e=>e.slice(Ju.length)):[])}function qu(e){return!e.context_line&&!e.pre_context&&!!e.function&&e.function.length<=2}var Ju=`_sentryBundlerPluginAppKey:`,Yu=`Attempt to invoke user-land function`,Xu=`fn.apply(this, wrappedArguments)`,Zu=`flag.evaluation.`;function Qu(e){if(e.type)return e;let t=k().getScopeData().contexts.flags,n=t?t.values:[];return n.length?(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...n]},e):e}function $u(e,t,n=100){let r=k().getScopeData().contexts;r.flags||={values:[]};let i=r.flags.values;ed(i,e,t,n)}function ed(e,t,n,i){if(typeof n!=`boolean`)return;if(e.length>i){r&&x.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${i}`);return}let a=e.findIndex(e=>e.flag===t);a!==-1&&e.splice(a,1),e.length===i&&e.shift(),e.push({flag:t,result:n})}function td(e,t,n=10){if(typeof t!=`boolean`)return;let r=zr();if(!r)return;let i=F(r).data;if(`${Zu}${e}`in i){r.setAttribute(`${Zu}${e}`,t);return}Object.keys(i).filter(e=>e.startsWith(Zu)).length<n&&r.setAttribute(`${Zu}${e}`,t)}var nd=R(()=>({name:`FeatureFlags`,processEvent(e,t,n){return Qu(e)},addFeatureFlag(e,t){$u(e,t),td(e,t)}})),rd=R(({growthbookClass:e})=>({name:`GrowthBook`,setupOnce(){let t=e.prototype;typeof t.isOn==`function`&&Ne(t,`isOn`,id),typeof t.getFeatureValue==`function`&&Ne(t,`getFeatureValue`,id)},processEvent(e,t,n){return Qu(e)}}));function id(e){return function(...t){let n=t[0],r=e.apply(this,t);return typeof n==`string`&&typeof r==`boolean`&&($u(n,r),td(n,r)),r}}var ad=`ConversationId`,od=R((()=>({name:ad,setup(e){e.on(`spanStart`,e=>{let t=k().getScopeData(),n=A().getScopeData(),r=t.conversationId||n.conversationId;if(r){let{op:t,data:n,description:i}=F(e);if(!t?.startsWith(`gen_ai.`)&&!n[`ai.operationId`]&&!i?.startsWith(`ai.`))return;e.setAttribute(Mn,r)}})}})));function sd(e,t,n,r,i){if(!e.fetchData)return;let{method:a,url:o}=e.fetchData,s=Wr()&&t(o);if(e.endTimestamp){let t=e.fetchData.__span;if(!t)return;let n=r[t];n&&(s&&(ud(n,e),cd(n,e,i)),delete r[t]);return}let{spanOrigin:c=`auto.http.browser`,propagateTraceparent:l=!1}=typeof i==`object`?i:{spanOrigin:i},u=j(),d=!!zr()||!!u&&Gi(u),f=s&&d?ia(md(o,a,c)):new Zr;if(s&&!d&&u?.recordDroppedEvent(`no_parent_span`,`span`),e.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f,n(e.fetchData.url)){let t=e.args[0],n={...e.args[1]||{}},r=ld(t,n,Wr()&&d?f:void 0,l);r&&(e.args[1]=n,n.headers=r)}if(u){let t={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};u.emit(`beforeOutgoingRequestSpan`,f,t)}return f}function cd(e,t,n){(typeof n==`object`&&n?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function ld(e,t,n,r){let i=ol({span:n,propagateTraceparent:r}),a=i[`sentry-trace`],o=i.baggage,s=i.traceparent;if(!a)return;let c=t.headers||(Me(e)?e.headers:void 0);if(!c)return{...i};if(fd(c)){let e=new Headers(c);if(e.get(`sentry-trace`)||e.set(`sentry-trace`,a),r&&s&&!e.get(`traceparent`)&&e.set(`traceparent`,s),o){let t=e.get(`baggage`);t?dd(t)||e.set(`baggage`,`${t},${o}`):e.set(`baggage`,o)}return e}else if(pd(c)){let e=[...c];e.find(e=>e[0]===`sentry-trace`)||e.push([`sentry-trace`,a]),r&&s&&!e.find(e=>e[0]===`traceparent`)&&e.push([`traceparent`,s]);let t=c.find(e=>e[0]===`baggage`&&typeof e[1]==`string`&&dd(e[1]));return o&&!t&&e.push([`baggage`,o]),e}else{let e=`sentry-trace`in c?c[`sentry-trace`]:void 0,t=`traceparent`in c?c.traceparent:void 0,n=`baggage`in c?c.baggage:void 0,i=n?Array.isArray(n)?[...n]:[n]:[],l=n&&(Array.isArray(n)?n.find(e=>dd(e)):dd(n));o&&!l&&i.push(o);let u=Object.assign({},c,{"sentry-trace":e??a,baggage:i.length>0?i.join(`,`):void 0});return r&&s&&!t&&(u.traceparent=s),u}}function ud(e,t){if(t.response){Pn(e,t.response.status);let n=t.response?.headers?.get(`content-length`);if(n){let t=parseInt(n);t>0&&e.setAttribute(`http.response_content_length`,t)}}else t.error&&e.setStatus({code:2,message:`internal_error`});e.end()}function dd(e){return typeof e==`string`&&e.split(`,`).some(e=>e.trim().startsWith(Gn))}function fd(e){return typeof Headers<`u`&&je(e,Headers)}function pd(e){return Array.isArray(e)?e.every(e=>Array.isArray(e)&&e.length===2&&typeof e[0]==`string`):!1}function md(e,t,n){if(e.startsWith(`data:`))return{name:`${t} ${Xc(e)}`,attributes:hd(e,void 0,t,n)};let r=Kc(e);return{name:`${t} ${r?qc(r):e}`,attributes:hd(e,r,t,n)}}function hd(e,t,n,r){let i={url:Xc(e),type:`fetch`,"http.method":n,[P]:r,[N]:`http.client`};return t&&(Gc(t)||(i[`http.url`]=Xc(t.href),i[`server.address`]=t.host),t.search&&(i[`http.query`]=t.search),t.hash&&(i[`http.fragment`]=t.hash)),i}function gd(e,t={},n=k()){let{message:r,name:i,email:a,url:o,source:s,associatedEventId:c,tags:l}=e,u={contexts:{feedback:{contact_email:a,name:i,message:r,url:o,source:s,associated_event_id:c}},type:`feedback`,level:`info`,tags:l},d=n?.getClient()||j();return d&&d.emit(`beforeSendFeedback`,u,t),n.captureEvent(u,t)}var _d=t({debug:()=>bd,error:()=>Cd,fatal:()=>wd,fmt:()=>rl,info:()=>xd,trace:()=>yd,warn:()=>Sd});function vd(e,t,n,r,i){Es({level:e,message:t,attributes:n,severityNumber:i},r)}function yd(e,t,{scope:n}={}){vd(`trace`,e,t,n)}function bd(e,t,{scope:n}={}){vd(`debug`,e,t,n)}function xd(e,t,{scope:n}={}){vd(`info`,e,t,n)}function Sd(e,t,{scope:n}={}){vd(`warn`,e,t,n)}function Cd(e,t,{scope:n}={}){vd(`error`,e,t,n)}function wd(e,t,{scope:n}={}){vd(`fatal`,e,t,n)}function Td(e,t,n){return`util`in i&&typeof i.util.format==`function`?i.util.format(...e):Ed(e,t,n)}function Ed(e,t,n){return e.map(e=>Te(e)?String(e):JSON.stringify(Ze(e,t,n))).join(` `)}function Dd(e){return/%[sdifocO]/.test(e)}function Od(e,t){let n={};return n[`sentry.message.template`]=`${e} ${Array(t.length).fill(`{}`).join(` `)}`,t.forEach((e,t)=>{n[`sentry.message.parameter.${t}`]=e}),n}var kd=`ConsoleLogs`,Ad={[P]:`auto.log.console`},jd=R(((e={})=>{let t=e.levels||l;return{name:kd,setup(e){let{enableLogs:n,normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e.getOptions();if(!n){r&&x.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}let o=Ul(({args:n,level:r})=>{if(j()!==e||!t.includes(r))return;let o=n[0],s=n.slice(1);if(r===`assert`){o||Es({level:`error`,message:s.length>0?`Assertion failed: ${Td(s,i,a)}`:`Assertion failed`,attributes:Ad});return}let c=r===`log`,l={...Ad};if(Ee(o)){Object.assign(l,Ze(o,i,a));let e=typeof n[1]==`string`?2:1;n.slice(e).forEach((e,t)=>{l[`sentry.message.parameter.${t}`]=Ze(e,i,a)})}else if(s.length>0&&typeof o==`string`&&!Dd(o)){let e=Od(o,s);for(let[t,n]of Object.entries(e))l[t]=t.startsWith(`sentry.message.parameter.`)?Ze(n,i,a):n}Es({level:c?`info`:r,message:Td(n,i,a),severityNumber:c?10:void 0,attributes:l})});e.registerCleanup(o)}}})),Md=t({count:()=>Pd,distribution:()=>Id,gauge:()=>Fd});function Nd(e,t,n,r){zs({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function Pd(e,t=1,n){Nd(`counter`,e,t,n)}function Fd(e,t,n){Nd(`gauge`,e,t,n)}function Id(e,t,n){Nd(`distribution`,e,t,n)}var Ld=[`trace`,`debug`,`info`,`warn`,`error`,`fatal`];function Rd(e={}){let t=new Set(e.levels??Ld),n=e.client;return{log(e){let{type:r,level:i,message:a,args:o,tag:s,date:c,...l}=e,u=n||j();if(!u)return;let d=Vd(r,i);if(!t.has(d))return;let{normalizeDepth:f=3,normalizeMaxBreadth:p=1e3}=u.getOptions(),m={};for(let[e,t]of Object.entries(l))m[e]=Ze(t,f,p);m[`sentry.origin`]=`auto.log.consola`,s&&(m[`consola.tag`]=s),r&&(m[`consola.type`]=r),i!=null&&typeof i==`number`&&(m[`consola.level`]=i);let h=Ud(Hd(o,f,p),f,p);h?.attributes&&Object.assign(m,h.attributes),Es({level:d,message:h?.message||a||o&&Td(o,f,p)||``,attributes:m})}}}var zd={silent:`trace`,fatal:`fatal`,error:`error`,warn:`warn`,log:`info`,info:`info`,success:`info`,fail:`error`,ready:`info`,start:`info`,box:`info`,debug:`debug`,trace:`trace`,verbose:`debug`,critical:`fatal`,notice:`info`},Bd={0:`fatal`,1:`warn`,2:`info`,3:`info`,4:`debug`,5:`trace`};function Vd(e,t){if(e===`verbose`)return`debug`;if(e===`silent`)return`trace`;if(e){let t=zd[e];if(t)return t}if(typeof t==`number`){let e=Bd[t];if(e)return e}return`info`}function Hd(e,t,n){if(!e?.length)return{message:``};let r=Td(e,t,n),i=e[0];if(Ee(i)){let t=typeof e[1]==`string`?2:1;return{message:r,attributes:i,messageParameters:e.slice(t)}}else{let t=e.slice(1),n=t.length>0&&typeof i==`string`&&!Dd(i);return{message:r,messageTemplate:n?i:void 0,messageParameters:n?t:void 0}}}function Ud(e,t,n){let{message:r,attributes:i,messageTemplate:a,messageParameters:o}=e,s={};if(a&&o){let e=Od(a,o);for(let[r,i]of Object.entries(e))s[r]=r.startsWith(`sentry.message.parameter.`)?Ze(i,t,n):i}else o&&o.length>0&&o.forEach((e,r)=>{s[`sentry.message.parameter.${r}`]=Ze(e,t,n)});return{message:r,attributes:{...Ze(i,t,n),...s}}}var Wd=`gen_ai.prompt`,Gd=`gen_ai.system`,Kd=`gen_ai.request.model`,qd=`gen_ai.request.stream`,Jd=`gen_ai.request.temperature`,Yd=`gen_ai.request.max_tokens`,Xd=`gen_ai.request.frequency_penalty`,Zd=`gen_ai.request.presence_penalty`,Qd=`gen_ai.request.top_p`,$d=`gen_ai.request.top_k`,ef=`gen_ai.request.encoding_format`,tf=`gen_ai.request.dimensions`,nf=`gen_ai.response.finish_reasons`,rf=`gen_ai.response.model`,af=`gen_ai.response.id`,of=`gen_ai.response.stop_reason`,sf=`gen_ai.usage.input_tokens`,cf=`gen_ai.usage.output_tokens`,lf=`gen_ai.usage.total_tokens`,uf=`gen_ai.operation.name`,df=`sentry.sdk_meta.gen_ai.input.messages.original_length`,ff=`gen_ai.input.messages`,pf=`gen_ai.system_instructions`,mf=`gen_ai.response.text`,hf=`gen_ai.request.available_tools`,gf=`gen_ai.response.streaming`,_f=`gen_ai.response.tool_calls`,vf=`gen_ai.agent.name`,yf=`gen_ai.pipeline.name`,bf=`gen_ai.conversation.id`,xf=`gen_ai.usage.cache_creation_input_tokens`,Sf=`gen_ai.usage.cache_read_input_tokens`,Cf=`gen_ai.invoke_agent`,wf=`gen_ai.embeddings.input`,Tf=`gen_ai.embeddings`,Ef=`gen_ai.execute_tool`,Df=`gen_ai.tool.name`,Of=`gen_ai.tool.call.id`,kf=`gen_ai.tool.type`,Af=`gen_ai.tool.input`,jf=`gen_ai.tool.output`,Mf=`gen_ai.tool.description`;function Nf(e){return!e||typeof e!=`object`?!1:If(e)||Lf(e)||Pf(e)||Rf(e)||zf(e)||Bf(e)||Vf(e)||Hf(e)||Uf(e)||Wf(e)||Gf(e)||Kf(e)}function Pf(e){return`image_url`in e?typeof e.image_url==`string`?e.image_url.startsWith(`data:`):Ff(e):!1}function Ff(e){return`image_url`in e&&!!e.image_url&&typeof e.image_url==`object`&&`url`in e.image_url&&typeof e.image_url.url==`string`&&e.image_url.url.startsWith(`data:`)}function If(e){return`type`in e&&typeof e.type==`string`&&`source`in e&&Nf(e.source)}function Lf(e){return`inlineData`in e&&!!e.inlineData&&typeof e.inlineData==`object`&&`data`in e.inlineData&&typeof e.inlineData.data==`string`}function Rf(e){return`type`in e&&e.type===`input_audio`&&`input_audio`in e&&!!e.input_audio&&typeof e.input_audio==`object`&&`data`in e.input_audio&&typeof e.input_audio.data==`string`}function zf(e){return`type`in e&&e.type===`file`&&`file`in e&&!!e.file&&typeof e.file==`object`&&`file_data`in e.file&&typeof e.file.file_data==`string`}function Bf(e){return`media_type`in e&&typeof e.media_type==`string`&&`data`in e}function Vf(e){return`type`in e&&e.type===`file`&&`mediaType`in e&&typeof e.mediaType==`string`&&`data`in e&&typeof e.data==`string`&&!e.data.startsWith(`http://`)&&!e.data.startsWith(`https://`)}function Hf(e){return`type`in e&&e.type===`image`&&`image`in e&&typeof e.image==`string`&&!e.image.startsWith(`http://`)&&!e.image.startsWith(`https://`)}function Uf(e){return`type`in e&&(e.type===`blob`||e.type===`base64`)}function Wf(e){return`b64_json`in e}function Gf(e){return`type`in e&&`result`in e&&e.type===`image_generation`}function Kf(e){return`uri`in e&&typeof e.uri==`string`&&e.uri.startsWith(`data:`)}var qf=`[Blob substitute]`,Jf=[`image_url`,`data`,`content`,`b64_json`,`result`,`uri`,`image`];function Yf(e){let t={...e};Nf(t.source)&&(t.source=Yf(t.source)),Lf(e)&&(t.inlineData={...e.inlineData,data:qf}),Ff(e)&&(t.image_url={...e.image_url,url:qf}),Rf(e)&&(t.input_audio={...e.input_audio,data:qf}),zf(e)&&(t.file={...e.file,file_data:qf});for(let e of Jf)typeof t[e]==`string`&&(t[e]=qf);return t}var Xf=2e4,Zf=e=>new TextEncoder().encode(e).length,Qf=e=>Zf(JSON.stringify(e));function $f(e,t){if(Zf(e)<=t)return e;let n=0,r=e.length,i=``;for(;n<=r;){let a=Math.floor((n+r)/2),o=e.slice(0,a);Zf(o)<=t?(i=o,n=a+1):r=a-1}return i}function ep(e){return typeof e==`string`?e:`text`in e&&typeof e.text==`string`?e.text:``}function tp(e,t){return typeof e==`string`?t:{...e,text:t}}function np(e){return typeof e==`object`&&!!e&&`content`in e&&typeof e.content==`string`}function rp(e){return typeof e==`object`&&!!e&&`content`in e&&Array.isArray(e.content)}function ip(e){return typeof e==`object`&&!!e&&`parts`in e&&Array.isArray(e.parts)&&e.parts.length>0}function ap(e,t){let n=t-Qf({...e,content:``});if(n<=0)return[];let r=$f(e.content,n);return[{...e,content:r}]}function op(e){return`parts`in e&&Array.isArray(e.parts)?{key:`parts`,items:e.parts}:`content`in e&&Array.isArray(e.content)?{key:`content`,items:e.content}:{key:null,items:[]}}function sp(e,t){let{key:n,items:r}=op(e);if(n===null||r.length===0)return[];let i=r.map(e=>tp(e,``)),a=t-Qf({...e,[n]:i});if(a<=0)return[];let o=[];for(let e of r){let t=ep(e),n=Zf(t);if(n<=a)o.push(e),a-=n;else if(o.length===0){let n=$f(t,a);n&&o.push(tp(e,n));break}else break}return o.length<=0?[]:[{...e,[n]:o}]}function cp(e,t){if(!e)return[];if(typeof e==`string`){let n=$f(e,t);return n?[n]:[]}return typeof e==`object`?np(e)?ap(e,t):rp(e)||ip(e)?sp(e,t):[]:[]}function lp(e){return e.map(e=>{let t;return e&&typeof e==`object`&&(rp(e)?t={...e,content:lp(e.content)}:`content`in e&&Nf(e.content)&&(t={...e,content:Yf(e.content)}),ip(e)&&(t={...t??e,parts:lp(e.parts)}),Nf(t)?t=Yf(t):Nf(e)&&(t=Yf(e))),t??e})}function up(e,t){if(!Array.isArray(e)||e.length===0)return e;let n=t-2,r=e[e.length-1],i=lp([r]),a=i[0];return Qf(a)<=n?i:cp(a,n)}function dp(e){return up(e,Xf)}function fp(e){return $f(e,Xf)}function pp(e){let t=j()?.getDataCollectionOptions().genAI;return{...e,recordInputs:e?.recordInputs??t?.inputs??!1,recordOutputs:e?.recordOutputs??t?.outputs??!1}}function mp(e){if(e!==void 0)return e;let t=j();return!t||!Gi(t)&&t.getOptions().streamGenAiSpans===!1}function hp(e,t){return e?`${e}.${t}`:t}function gp(e,t,n,r,i){if(t!==void 0&&e.setAttributes({[sf]:t}),n!==void 0&&e.setAttributes({[cf]:n}),t!==void 0||n!==void 0||r!==void 0||i!==void 0){let a=(t??0)+(n??0)+(r??0)+(i??0);e.setAttributes({[lf]:a})}}function _p(e,t,n){if(!e.isRecording())return;let r={[gf]:!0};t.responseId&&(r[af]=t.responseId),t.responseModel&&(r[rf]=t.responseModel),t.promptTokens!==void 0&&(r[sf]=t.promptTokens),t.completionTokens!==void 0&&(r[cf]=t.completionTokens),t.totalTokens===void 0?(t.promptTokens!==void 0||t.completionTokens!==void 0||t.cacheCreationInputTokens!==void 0||t.cacheReadInputTokens!==void 0)&&(r[lf]=(t.promptTokens??0)+(t.completionTokens??0)+(t.cacheCreationInputTokens??0)+(t.cacheReadInputTokens??0)):r[lf]=t.totalTokens,t.finishReasons.length&&(r[nf]=JSON.stringify(t.finishReasons)),n&&t.responseTexts.length&&(r[mf]=t.responseTexts.join(``)),n&&t.toolCalls.length&&(r[_f]=JSON.stringify(t.toolCalls)),e.setAttributes(r),e.end()}function vp(e){return typeof e==`string`?e:JSON.stringify(e)}function yp(e){if(typeof e==`string`)return fp(e);if(Array.isArray(e)){let t=dp(e);return JSON.stringify(t)}return JSON.stringify(e)}function bp(e){if(!Array.isArray(e))return{systemInstructions:void 0,filteredMessages:e};let t=e.findIndex(e=>e&&typeof e==`object`&&`role`in e&&e.role===`system`);if(t===-1)return{systemInstructions:void 0,filteredMessages:e};let n=e[t],r=typeof n.content==`string`?n.content:n.content===void 0?void 0:JSON.stringify(n.content);return r?{systemInstructions:JSON.stringify([{type:`text`,content:r}]),filteredMessages:[...e.slice(0,t),...e.slice(t+1)]}:{systemInstructions:void 0,filteredMessages:e}}async function xp(e,t,n){let r=e.catch(e=>{throw L(e,{mechanism:{handled:!1,type:n}}),e}),i=await t,a=await r;return a&&typeof a==`object`&&`data`in a?{...a,data:i}:i}function Sp(e,t,n){return Ae(e)?new Proxy(e,{get(e,r){let i=r in Promise.prototype||r===Symbol.toStringTag?t:e,a=Reflect.get(i,r);return r===`withResponse`&&typeof a==`function`?function(){return xp(a.call(e),t,n)}:typeof a==`function`?a.bind(i):a}}):t}var Cp={"responses.create":{operation:`chat`},"chat.completions.create":{operation:`chat`},"embeddings.create":{operation:`embeddings`},"conversations.create":{operation:`chat`}},wp=[`response.created`,`response.in_progress`,`response.failed`,`response.completed`,`response.incomplete`,`response.queued`,`response.output_text.delta`,`response.output_item.added`,`response.function_call_arguments.delta`,`response.function_call_arguments.done`,`response.output_item.done`];function Tp(e){return typeof e==`object`&&!!e&&`type`in e&&typeof e.type==`string`&&e.type.startsWith(`response.`)}function Ep(e){return typeof e==`object`&&!!e&&`object`in e&&e.object===`chat.completion.chunk`}function Dp(e,t,n){if(!t||typeof t!=`object`)return;let r=t,i={};if(typeof r.id==`string`&&(i[af]=r.id),typeof r.model==`string`&&(i[rf]=r.model),r.object===`conversation`&&typeof r.id==`string`&&(i[bf]=r.id),r.usage&&typeof r.usage==`object`){let e=r.usage,t=e.prompt_tokens??e.input_tokens;typeof t==`number`&&(i[sf]=t);let n=e.completion_tokens??e.output_tokens;typeof n==`number`&&(i[cf]=n),typeof e.total_tokens==`number`&&(i[lf]=e.total_tokens)}if(Array.isArray(r.choices)){let e=r.choices,t=e.map(e=>e.finish_reason).filter(e=>typeof e==`string`);if(t.length>0&&(i[nf]=JSON.stringify(t)),n){let t=e.map(e=>e.message?.content||``);i[mf]=JSON.stringify(t);let n=e.map(e=>e.message?.tool_calls).filter(e=>Array.isArray(e)&&e.length>0).flat();n.length>0&&(i[_f]=JSON.stringify(n))}}if(typeof r.status==`string`&&(i[`gen_ai.response.finish_reasons`]||(i[nf]=JSON.stringify([r.status]))),n&&(typeof r.output_text==`string`&&!i[`gen_ai.response.text`]&&(i[mf]=r.output_text),Array.isArray(r.output)&&r.output.length>0&&!i[`gen_ai.response.tool_calls`])){let e=r.output.filter(e=>e?.type===`function_call`);e.length>0&&(i[_f]=JSON.stringify(e))}e.setAttributes(i)}function Op(e){if(`conversation`in e&&typeof e.conversation==`string`)return e.conversation;if(`previous_response_id`in e&&typeof e.previous_response_id==`string`)return e.previous_response_id}function kp(e){let t={[Kd]:e.model??`unknown`};`temperature`in e&&(t[Jd]=e.temperature),`top_p`in e&&(t[Qd]=e.top_p),`frequency_penalty`in e&&(t[Xd]=e.frequency_penalty),`presence_penalty`in e&&(t[Zd]=e.presence_penalty),`stream`in e&&(t[qd]=e.stream),`encoding_format`in e&&(t[ef]=e.encoding_format),`dimensions`in e&&(t[tf]=e.dimensions);let n=Op(e);return n&&(t[bf]=n),t}function Ap(e,t){for(let n of e){let e=n.index;if(!(e===void 0||!n.function))if(!(e in t.chatCompletionToolCalls))t.chatCompletionToolCalls[e]={...n,function:{name:n.function.name,arguments:n.function.arguments||``}};else{let r=t.chatCompletionToolCalls[e];n.function.arguments&&r?.function&&(r.function.arguments+=n.function.arguments)}}}function jp(e,t,n){t.responseId=e.id??t.responseId,t.responseModel=e.model??t.responseModel,e.usage&&(t.promptTokens=e.usage.prompt_tokens,t.completionTokens=e.usage.completion_tokens,t.totalTokens=e.usage.total_tokens);for(let r of e.choices??[])n&&(r.delta?.content&&t.responseTexts.push(r.delta.content),r.delta?.tool_calls&&Ap(r.delta.tool_calls,t)),r.finish_reason&&t.finishReasons.push(r.finish_reason)}function Mp(e,t,n,r){if(!(e&&typeof e==`object`)){t.eventTypes.push(`unknown:non-object`);return}if(e instanceof Error){r.setStatus({code:2,message:`internal_error`}),L(e,{mechanism:{handled:!1,type:`auto.ai.openai.stream-response`}});return}if(!(`type`in e))return;let i=e;if(!wp.includes(i.type)){t.eventTypes.push(i.type);return}if(n&&(i.type===`response.output_item.done`&&`item`in i&&t.responsesApiToolCalls.push(i.item),i.type===`response.output_text.delta`&&`delta`in i&&i.delta)){t.responseTexts.push(i.delta);return}if(`response`in i){let{response:e}=i;t.responseId=e.id??t.responseId,t.responseModel=e.model??t.responseModel,e.usage&&(t.promptTokens=e.usage.input_tokens,t.completionTokens=e.usage.output_tokens,t.totalTokens=e.usage.total_tokens),e.status&&t.finishReasons.push(e.status),n&&e.output_text&&t.responseTexts.push(e.output_text)}}async function*Np(e,t,n){let r={eventTypes:[],responseTexts:[],finishReasons:[],responseId:``,responseModel:``,promptTokens:void 0,completionTokens:void 0,totalTokens:void 0,chatCompletionToolCalls:{},responsesApiToolCalls:[]};try{for await(let i of e)Ep(i)?jp(i,r,n):Tp(i)&&Mp(i,r,n,t),yield i}finally{let e=[...Object.values(r.chatCompletionToolCalls),...r.responsesApiToolCalls];_p(t,{...r,toolCalls:e},n)}}function Pp(e){let t=Array.isArray(e.tools)?e.tools:[],n=e.web_search_options&&typeof e.web_search_options==`object`?[{type:`web_search_options`,...e.web_search_options}]:[],i=[...t,...n];if(i.length!==0)try{return JSON.stringify(i)}catch(e){r&&x.error(`Failed to serialize OpenAI tools:`,e);return}}function Fp(e,t){let n={[Gd]:`openai`,[uf]:t,[P]:`auto.ai.openai`};if(e.length>0&&typeof e[0]==`object`&&e[0]!==null){let t=e[0],r=Pp(t);r&&(n[hf]=r),Object.assign(n,kp(t))}else n[Kd]=`unknown`;return n}function Ip(e,t,n,r){if(n===`embeddings`&&`input`in t){let n=t.input;if(n==null||typeof n==`string`&&n.length===0||Array.isArray(n)&&n.length===0)return;e.setAttribute(wf,typeof n==`string`?n:JSON.stringify(n));return}let i=`input`in t?t.input:`messages`in t?t.messages:void 0;if(!i||Array.isArray(i)&&i.length===0)return;let{systemInstructions:a,filteredMessages:o}=bp(i);a&&e.setAttribute(pf,a),e.setAttribute(ff,r?yp(o):vp(o)),Array.isArray(o)?e.setAttribute(df,o.length):e.setAttribute(df,1)}function Lp(e,t,n,r,i){return function(...a){let o=n.operation||`unknown`,s=Fp(a,o),c=s[`gen_ai.request.model`]||`unknown`,l=a[0],u=l&&typeof l==`object`&&l.stream===!0,d={name:`${o} ${c}`,op:`gen_ai.${o}`,attributes:s};if(u){let n,s=ra(d,s=>(n=e.apply(r,a),i.recordInputs&&l&&Ip(s,l,o,mp(i.enableTruncation)),(async()=>{try{return Np(await n,s,i.recordOutputs??!1)}catch(e){throw s.setStatus({code:2,message:`internal_error`}),L(e,{mechanism:{handled:!1,type:`auto.ai.openai.stream`,data:{function:t}}}),s.end(),e}})()));return Sp(n,s,`auto.ai.openai`)}let f,p=na(d,n=>(f=e.apply(r,a),i.recordInputs&&l&&Ip(n,l,o,mp(i.enableTruncation)),f.then(e=>(Dp(n,e,i.recordOutputs),e),e=>{throw L(e,{mechanism:{handled:!1,type:`auto.ai.openai`,data:{function:t}}}),e})));return Sp(f,p,`auto.ai.openai`)}}function Rp(e,t=``,n){return new Proxy(e,{get(e,r){let i=e[r],a=hp(t,String(r)),o=Cp[a];return typeof i==`function`&&o?Lp(i,a,o,e,n):typeof i==`function`?i.bind(e):i&&typeof i==`object`?Rp(i,a,n):i}})}function zp(e,t){return Rp(e,``,pp(t))}var Bp={"messages.create":{operation:`chat`},"messages.stream":{operation:`chat`,streaming:!0},"messages.countTokens":{operation:`chat`},"models.get":{operation:`models`},"completions.create":{operation:`chat`},"models.retrieve":{operation:`models`},"beta.messages.create":{operation:`chat`}};function Vp(e,t,n){if(Array.isArray(t)&&t.length===0)return;let{systemInstructions:r,filteredMessages:i}=bp(t);r&&e.setAttributes({[pf]:r});let a=Array.isArray(i)?i.length:1;e.setAttributes({[ff]:n?yp(i):vp(i),[df]:a})}var Hp={invalid_request_error:`invalid_argument`,authentication_error:`unauthenticated`,permission_error:`permission_denied`,not_found_error:`not_found`,request_too_large:`failed_precondition`,rate_limit_error:`resource_exhausted`,api_error:`internal_error`,overloaded_error:`unavailable`};function Up(e){return e&&Hp[e]||`internal_error`}function Wp(e,t){t.error&&(e.setStatus({code:2,message:Up(t.error.type)}),L(t.error,{mechanism:{handled:!1,type:`auto.ai.anthropic.anthropic_error`}}))}function Gp(e){let{system:t,messages:n,input:r}=e,i=typeof t==`string`?[{role:`system`,content:e.system}]:[],a=(Array.isArray(r)?r:r==null?void 0:[r])??(Array.isArray(n)?n:n==null?[]:[n]);return[...i,...a]}function Kp(e,t){return`type`in e&&typeof e.type==`string`&&e.type===`error`?(t.setStatus({code:2,message:Up(e.error?.type)}),L(e.error,{mechanism:{handled:!1,type:`auto.ai.anthropic.anthropic_error`}}),!0):!1}function qp(e,t){if(e.type===`message_delta`&&(e.usage&&typeof e.usage.output_tokens==`number`&&(t.completionTokens=e.usage.output_tokens),e.delta?.stop_reason&&t.finishReasons.push(e.delta.stop_reason)),e.message){let n=e.message;n.id&&(t.responseId=n.id),n.model&&(t.responseModel=n.model),n.usage&&(typeof n.usage.input_tokens==`number`&&(t.promptTokens=n.usage.input_tokens),typeof n.usage.cache_creation_input_tokens==`number`&&(t.cacheCreationInputTokens=n.usage.cache_creation_input_tokens),typeof n.usage.cache_read_input_tokens==`number`&&(t.cacheReadInputTokens=n.usage.cache_read_input_tokens))}}function Jp(e,t){e.type!==`content_block_start`||typeof e.index!=`number`||!e.content_block||(e.content_block.type===`tool_use`||e.content_block.type===`server_tool_use`)&&(t.activeToolBlocks[e.index]={id:e.content_block.id,name:e.content_block.name,inputJsonParts:[]})}function Yp(e,t,n){if(!(e.type!==`content_block_delta`||!e.delta)){if(typeof e.index==`number`&&`partial_json`in e.delta&&typeof e.delta.partial_json==`string`){let n=t.activeToolBlocks[e.index];n&&n.inputJsonParts.push(e.delta.partial_json)}n&&typeof e.delta.text==`string`&&t.responseTexts.push(e.delta.text)}}function Xp(e,t){if(e.type!==`content_block_stop`||typeof e.index!=`number`)return;let n=t.activeToolBlocks[e.index];if(!n)return;let r=n.inputJsonParts.join(``),i;try{i=r?JSON.parse(r):{}}catch{i={__unparsed:r}}t.toolCalls.push({type:`tool_use`,id:n.id,name:n.name,input:i}),delete t.activeToolBlocks[e.index]}function Zp(e,t,n,r){e&&typeof e==`object`&&(Kp(e,r)||(qp(e,t),Jp(e,t),Yp(e,t,n),Xp(e,t)))}async function*Qp(e,t,n){let r={responseTexts:[],finishReasons:[],responseId:``,responseModel:``,promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};try{for await(let i of e)Zp(i,r,n,t),yield i}finally{_p(t,r,n)}}function $p(e,t,n){let r={responseTexts:[],finishReasons:[],responseId:``,responseModel:``,promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};return e.on(`streamEvent`,e=>{Zp(e,r,n,t)}),e.on(`message`,()=>{_p(t,r,n)}),e.on(`error`,e=>{L(e,{mechanism:{handled:!1,type:`auto.ai.anthropic.stream_error`}}),t.isRecording()&&(t.setStatus({code:2,message:`internal_error`}),t.end())}),e}function em(e,t,n){let r={[Gd]:`anthropic`,[uf]:n,[P]:`auto.ai.anthropic`};if(e.length>0&&typeof e[0]==`object`&&e[0]!==null){let t=e[0];t.tools&&Array.isArray(t.tools)&&(r[hf]=JSON.stringify(t.tools)),r[Kd]=t.model??`unknown`,`temperature`in t&&(r[Jd]=t.temperature),`top_p`in t&&(r[Qd]=t.top_p),`stream`in t&&(r[qd]=t.stream),`top_k`in t&&(r[$d]=t.top_k),`frequency_penalty`in t&&(r[Xd]=t.frequency_penalty),`max_tokens`in t&&(r[Yd]=t.max_tokens)}else t===`models.retrieve`||t===`models.get`?r[Kd]=e[0]:r[Kd]=`unknown`;return r}function tm(e,t,n){Vp(e,Gp(t),n),`prompt`in t&&e.setAttributes({[Wd]:JSON.stringify(t.prompt)})}function nm(e,t){if(`content`in t&&Array.isArray(t.content)){e.setAttributes({[mf]:t.content.map(e=>e.text).filter(e=>!!e).join(``)});let n=[];for(let e of t.content)(e.type===`tool_use`||e.type===`server_tool_use`)&&n.push(e);n.length>0&&e.setAttributes({[_f]:JSON.stringify(n)})}`completion`in t&&e.setAttributes({[mf]:t.completion}),`input_tokens`in t&&e.setAttributes({[mf]:JSON.stringify(t.input_tokens)})}function rm(e,t){`id`in t&&`model`in t&&(e.setAttributes({[af]:t.id,[rf]:t.model}),`usage`in t&&t.usage&&gp(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens))}function im(e,t,n){if(!(!t||typeof t!=`object`)){if(`type`in t&&t.type===`error`){Wp(e,t);return}n&&nm(e,t),rm(e,t)}}function am(e,t,n){throw L(e,{mechanism:{handled:!1,type:`auto.ai.anthropic`,data:{function:n}}}),t.isRecording()&&(t.setStatus({code:2,message:`internal_error`}),t.end()),e}function om(e,t,n,r,i,a,o,s,c,l,u){let d={name:`${a} ${i[`gen_ai.request.model`]??`unknown`}`,op:`gen_ai.${a}`,attributes:i};if(l&&!u){let t,i=ra(d,i=>(t=e.apply(n,r),c.recordInputs&&s&&tm(i,s,mp(c.enableTruncation)),(async()=>{try{return Qp(await t,i,c.recordOutputs??!1)}catch(e){return am(e,i,o)}})()));return Sp(t,i,`auto.ai.anthropic`)}else return ra(d,e=>{try{return c.recordInputs&&s&&tm(e,s,mp(c.enableTruncation)),$p(t.apply(n,r),e,c.recordOutputs??!1)}catch(t){return am(t,e,o)}})}function sm(e,t,n,r,i){return new Proxy(e,{apply(a,o,s){let c=n.operation||`unknown`,l=em(s,t,c),u=l[`gen_ai.request.model`]??`unknown`,d=typeof s[0]==`object`?s[0]:void 0,f=!!d?.stream,p=n.streaming===!0;if(f||p)return om(e,a,r,s,l,c,t,d,i,f,p);let m,h=na({name:`${c} ${u}`,op:`gen_ai.${c}`,attributes:l},e=>(m=a.apply(r,s),i.recordInputs&&d&&tm(e,d,mp(i.enableTruncation)),m.then(t=>(im(e,t,i.recordOutputs),t),e=>{throw L(e,{mechanism:{handled:!1,type:`auto.ai.anthropic`,data:{function:t}}}),e})));return Sp(m,h,`auto.ai.anthropic`)}})}function cm(e,t=``,n){return new Proxy(e,{get(e,r){let i=e[r],a=hp(t,String(r)),o=Bp[a];return typeof i==`function`&&o?sm(i,a,o,e,n):typeof i==`function`?i.bind(e):i&&typeof i==`object`?cm(i,a,n):i}})}function lm(e,t){return cm(e,``,pp(t))}var um={"models.generateContent":{operation:`generate_content`},"models.generateContentStream":{operation:`generate_content`,streaming:!0},"models.embedContent":{operation:`embeddings`},"chats.create":{proxyResultPath:`chat`},"chat.sendMessage":{operation:`chat`},"chat.sendMessageStream":{operation:`chat`,streaming:!0}},dm=`google_genai`;function fm(e,t){let n=e?.promptFeedback;if(n?.blockReason){let e=n.blockReasonMessage??n.blockReason;return t.setStatus({code:2,message:`internal_error`}),L(`Content blocked: ${e}`,{mechanism:{handled:!1,type:`auto.ai.google_genai`}}),!0}return!1}function pm(e,t){typeof e.responseId==`string`&&(t.responseId=e.responseId),typeof e.modelVersion==`string`&&(t.responseModel=e.modelVersion);let n=e.usageMetadata;n&&(typeof n.promptTokenCount==`number`&&(t.promptTokens=n.promptTokenCount),typeof n.candidatesTokenCount==`number`&&(t.completionTokens=n.candidatesTokenCount),typeof n.totalTokenCount==`number`&&(t.totalTokens=n.totalTokenCount))}function mm(e,t,n){Array.isArray(e.functionCalls)&&t.toolCalls.push(...e.functionCalls);for(let r of e.candidates??[]){r?.finishReason&&!t.finishReasons.includes(r.finishReason)&&t.finishReasons.push(r.finishReason);for(let e of r?.content?.parts??[])n&&e.text&&t.responseTexts.push(e.text),e.functionCall&&t.toolCalls.push({type:`function`,id:e.functionCall.id,name:e.functionCall.name,arguments:e.functionCall.args})}}function hm(e,t,n,r){!e||fm(e,r)||(pm(e,t),mm(e,t,n))}async function*gm(e,t,n){let r={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(let i of e)hm(i,r,n,t),yield i}finally{_p(t,r,n)}}function _m(e,t=`user`){return typeof e==`string`?[{role:t,content:e}]:Array.isArray(e)?e.flatMap(e=>_m(e,t)):typeof e!=`object`||!e?[]:`role`in e&&typeof e.role==`string`?[e]:`parts`in e?[{...e,role:t}]:[{role:t,content:e}]}function vm(e,t){if(`model`in e&&typeof e.model==`string`)return e.model;if(t&&typeof t==`object`){let e=t;if(`model`in e&&typeof e.model==`string`)return e.model;if(`modelVersion`in e&&typeof e.modelVersion==`string`)return e.modelVersion}return`unknown`}function ym(e){let t={};return`temperature`in e&&typeof e.temperature==`number`&&(t[Jd]=e.temperature),`topP`in e&&typeof e.topP==`number`&&(t[Qd]=e.topP),`topK`in e&&typeof e.topK==`number`&&(t[$d]=e.topK),`maxOutputTokens`in e&&typeof e.maxOutputTokens==`number`&&(t[Yd]=e.maxOutputTokens),`frequencyPenalty`in e&&typeof e.frequencyPenalty==`number`&&(t[Xd]=e.frequencyPenalty),`presencePenalty`in e&&typeof e.presencePenalty==`number`&&(t[Zd]=e.presencePenalty),t}function bm(e,t,n){let r={[Gd]:dm,[uf]:e,[P]:`auto.ai.google_genai`};if(t){if(r[Kd]=vm(t,n),`config`in t&&typeof t.config==`object`&&t.config){let e=t.config;if(Object.assign(r,ym(e)),`tools`in e&&Array.isArray(e.tools)){let t=e.tools.flatMap(e=>e.functionDeclarations);r[hf]=JSON.stringify(t)}}}else r[Kd]=vm({},n);return r}function xm(e,t,n,r){if(n===`embeddings`){let n=t.contents;n!=null&&e.setAttribute(wf,typeof n==`string`?n:JSON.stringify(n));return}let i=[];if(`config`in t&&t.config&&typeof t.config==`object`&&`systemInstruction`in t.config&&t.config.systemInstruction&&i.push(..._m(t.config.systemInstruction,`system`)),`history`in t&&i.push(..._m(t.history,`user`)),`contents`in t&&i.push(..._m(t.contents,`user`)),`message`in t&&i.push(..._m(t.message,`user`)),Array.isArray(i)&&i.length){let{systemInstructions:t,filteredMessages:n}=bp(i);t&&e.setAttribute(pf,t);let a=Array.isArray(n)?n.length:0;e.setAttributes({[df]:a,[ff]:r?yp(n):vp(n)})}}function Sm(e,t,n){if(!(!t||typeof t!=`object`)){if(t.modelVersion&&e.setAttribute(rf,t.modelVersion),t.usageMetadata&&typeof t.usageMetadata==`object`){let n=t.usageMetadata;typeof n.promptTokenCount==`number`&&e.setAttributes({[sf]:n.promptTokenCount}),typeof n.candidatesTokenCount==`number`&&e.setAttributes({[cf]:n.candidatesTokenCount}),typeof n.totalTokenCount==`number`&&e.setAttributes({[lf]:n.totalTokenCount})}if(n&&Array.isArray(t.candidates)&&t.candidates.length>0){let n=t.candidates.map(e=>e.content?.parts&&Array.isArray(e.content.parts)?e.content.parts.map(e=>typeof e.text==`string`?e.text:``).filter(e=>e.length>0).join(``):``).filter(e=>e.length>0);n.length>0&&e.setAttributes({[mf]:n.join(``)})}if(n&&t.functionCalls){let n=t.functionCalls;Array.isArray(n)&&n.length>0&&e.setAttributes({[_f]:JSON.stringify(n)})}}}function Cm(e,t,n,r,i){let a=n.operation===`embeddings`;return new Proxy(e,{apply(e,o,s){let c=n.operation||`unknown`,l=s[0],u=bm(c,l,r),d=u[`gen_ai.request.model`]??`unknown`;return n.streaming?ra({name:`${c} ${d}`,op:`gen_ai.${c}`,attributes:u},async n=>{try{return i.recordInputs&&l&&xm(n,l,c,mp(i.enableTruncation)),gm(await e.apply(r,s),n,!!i.recordOutputs)}catch(e){throw n.setStatus({code:2,message:`internal_error`}),L(e,{mechanism:{handled:!1,type:`auto.ai.google_genai`,data:{function:t}}}),n.end(),e}}):na({name:`${c} ${d}`,op:`gen_ai.${c}`,attributes:u},n=>(i.recordInputs&&l&&xm(n,l,c,mp(i.enableTruncation)),Qi(()=>e.apply(r,s),e=>{L(e,{mechanism:{handled:!1,type:`auto.ai.google_genai`,data:{function:t}}})},()=>{},e=>{a||Sm(n,e,i.recordOutputs)})))}})}function wm(e,t=``,n){return new Proxy(e,{get:(e,r,i)=>{let a=Reflect.get(e,r,i),o=hp(t,String(r)),s=um[o];if(typeof a==`function`&&s){let t=s.operation?Cm(a,o,s,e,n):a.bind(e);return s.proxyResultPath?function(...e){let r=t(...e);return r&&typeof r==`object`?wm(r,s.proxyResultPath,n):r}:t}return typeof a==`function`?a.bind(e):a&&typeof a==`object`?wm(a,o,n):a}})}function Tm(e,t){return wm(e,``,pp(t))}var Em=`auto.ai.langchain`,Dm={human:`user`,ai:`assistant`,assistant:`assistant`,system:`system`,function:`function`,tool:`tool`},Om=(e,t,n)=>{n!=null&&(e[t]=n)},km=(e,t,n)=>{let r=Number(n);Number.isNaN(r)||(e[t]=r)};function Am(e){if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function jm(e){if(Array.isArray(e))try{let t=e.map(e=>e&&typeof e==`object`&&Nf(e)?Yf(e):e);return JSON.stringify(t)}catch{return String(e)}return Am(e)}function Mm(e){let t=e.toLowerCase();return Dm[t]??t}function Nm(e){return e.includes(`System`)?`system`:e.includes(`Human`)?`user`:e.includes(`AI`)||e.includes(`Assistant`)?`assistant`:e.includes(`Function`)?`function`:e.includes(`Tool`)?`tool`:`user`}function Pm(e){if(!(!e||Array.isArray(e)))return e.invocation_params}function Fm(e){return e.map(e=>{let t=e._getType;if(typeof t==`function`)return{role:Mm(t.call(e)),content:jm(e.content)};if(e.lc===1&&e.kwargs){let t=e.id,n=Array.isArray(t)&&t.length>0?t[t.length-1]:``;return{role:Mm(typeof n==`string`?Nm(n):`user`),content:jm(e.kwargs?.content)}}if(e.type)return{role:Mm(String(e.type).toLowerCase()),content:jm(e.content)};if(e.role)return{role:Mm(String(e.role)),content:jm(e.content)};let n=e.constructor?.name;return n&&n!==`Object`?{role:Mm(Nm(n)),content:jm(e.content)}:{role:`user`,content:jm(e.content)}})}function Im(e,t,n){let r={},i=`kwargs`in e?e.kwargs:void 0;km(r,Jd,t?.temperature??n?.ls_temperature??i?.temperature),km(r,Yd,t?.max_tokens??n?.ls_max_tokens??i?.max_tokens),km(r,Qd,t?.top_p??i?.top_p);let a=t?.frequency_penalty;km(r,Xd,a);let o=t?.presence_penalty;return km(r,Zd,o),t&&`stream`in t&&Om(r,qd,!!t.stream),r}function Lm(e,t,n,r,i){return{[Gd]:Am(e??`langchain`),[uf]:`chat`,[Kd]:Am(t),[P]:Em,...Im(n,r,i)}}function Rm(e,t,n,r,i,a){let o=a?.ls_provider,s=Lm(o,i?.model??a?.ls_model_name??`unknown`,e,i,a);if(n&&Array.isArray(t)&&t.length>0){Om(s,df,t.length);let e=t.map(e=>({role:`user`,content:e}));Om(s,ff,r?yp(e):vp(e))}return s}function zm(e,t,n,r,i,a){let o=Lm(a?.ls_provider??e.id?.[2],i?.model??a?.ls_model_name??`unknown`,e,i,a);if(n&&Array.isArray(t)&&t.length>0){let{systemInstructions:e,filteredMessages:n}=bp(Fm(t.flat()));e&&Om(o,pf,e),Om(o,df,Array.isArray(n)?n.length:0),Om(o,ff,r?yp(n):vp(n))}return o}function Bm(e,t){let n=[],r=e.flat();for(let e of r){let t=e.message?.tool_calls;if(Array.isArray(t)&&t.length>0)n.push(...t);else{let t=e.message?.content;if(Array.isArray(t))for(let e of t){let t=e;t.type===`tool_use`&&n.push(t)}}}n.length>0&&Om(t,_f,Am(n))}function Vm(e,t){if(!e)return;let n=e.tokenUsage,r=e.usage;if(n)km(t,sf,n.promptTokens),km(t,cf,n.completionTokens),km(t,lf,n.totalTokens);else if(r){km(t,sf,r.input_tokens),km(t,cf,r.output_tokens);let e=Number(r.input_tokens),n=Number(r.output_tokens),i=(Number.isNaN(e)?0:e)+(Number.isNaN(n)?0:n);i>0&&km(t,lf,i),r.cache_creation_input_tokens!==void 0&&km(t,xf,r.cache_creation_input_tokens),r.cache_read_input_tokens!==void 0&&km(t,Sf,r.cache_read_input_tokens)}}function Hm(e,t){if(!e)return;let n={};if(Array.isArray(e.generations)){let r=e.generations.flat().map(e=>e.generationInfo?.finish_reason?e.generationInfo.finish_reason:e.generation_info?.finish_reason?e.generation_info.finish_reason:null).filter(e=>typeof e==`string`);if(r.length>0&&Om(n,nf,Am(r)),Bm(e.generations,n),t){let t=e.generations.flat().map(e=>e.text??e.message?.content).filter(e=>typeof e==`string`);t.length>0&&Om(n,mf,Am(t))}}Vm(e.llmOutput,n);let r=e.llmOutput,i=e.generations?.[0]?.[0]?.message,a=r?.model_name??r?.model??i?.response_metadata?.model_name;a&&Om(n,rf,a);let o=r?.id??i?.id;o&&Om(n,af,o);let s=r?.stop_reason??i?.response_metadata?.finish_reason;return s&&Om(n,of,Am(s)),n}function Um(e){let t={},n=e?.lc_agent_name;return typeof n==`string`&&(t[vf]=n),t}function Wm(e){let t=e?.invocation_params?.tools??e?.options?.tools;if(!Array.isArray(t)||t.length===0)return;let n=t.map(e=>{let t=e.function;return{type:`function`,name:e.name??t?.name??``,description:e.description??t?.description}});return JSON.stringify(n)}function Gm(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.addHandler==`function`&&typeof t.copy==`function`}function Km(e){return typeof e==`object`&&e?.name===`SentryCallbackHandler`}function qm(e){return e.some(Km)}function Jm(e,t){if(!e)return[t];if(Gm(e)){if(qm(e.handlers??[]))return e;let n=e.copy();return n.addHandler(t,!0),n}let n=Array.isArray(e)?e:[e];return qm(n)?e:[...n,t]}function Ym(e={}){let{recordInputs:t,recordOutputs:n}=pp(e),r=mp(e.enableTruncation),i=new Map,a=e=>{let t=i.get(e);t?.isRecording()&&(t.end(),i.delete(e))},o={lc_serializable:!1,lc_namespace:[`langchain_core`,`callbacks`,`sentry`],lc_secrets:void 0,lc_attributes:void 0,lc_aliases:void 0,lc_serializable_keys:void 0,lc_id:[`langchain_core`,`callbacks`,`sentry`],lc_kwargs:{},name:`SentryCallbackHandler`,ignoreLLM:!1,ignoreChain:!1,ignoreAgent:!1,ignoreRetriever:!1,ignoreCustomEvent:!1,raiseError:!1,awaitHandlers:!0,handleLLMStart(e,n,a,o,s,c,l,u){let d=Pm(c),f=Rm(e,n,t,r,d,l),p=f[Kd],m=f[uf];ra({name:`${m} ${p}`,op:`gen_ai.chat`,attributes:{...Um(l),...f,[N]:`gen_ai.chat`}},e=>(i.set(a,e),e))},handleChatModelStart(e,n,a,o,s,c,l,u){let d=Pm(c),f=zm(e,n,t,r,d,l),p=Wm(s);p&&(f[hf]=p);let m=f[Kd],h=f[uf];ra({name:`${h} ${m}`,op:`gen_ai.chat`,attributes:{...Um(l),...f,[N]:`gen_ai.chat`}},e=>(i.set(a,e),e))},handleLLMEnd(e,t,r,o,s){let c=i.get(t);if(c?.isRecording()){let r=Hm(e,n);r&&c.setAttributes(r),a(t)}},handleLLMError(e,t){let n=i.get(t);n?.isRecording()&&(n.setStatus({code:2,message:`internal_error`}),a(t)),L(e,{mechanism:{handled:!1,type:`${Em}.llm_error_handler`}})},handleChainStart(e,n,r,a,o,s,c,l){if(s?.__sentry_langgraph__)return;let u=l||e.name||`unknown_chain`,d={[P]:`auto.ai.langchain`,"langchain.chain.name":u};t&&(d[`langchain.chain.inputs`]=JSON.stringify(n)),ra({name:`chain ${u}`,op:`gen_ai.invoke_agent`,attributes:{...d,[N]:`gen_ai.invoke_agent`}},e=>(i.set(r,e),e))},handleChainEnd(e,t){let r=i.get(t);r?.isRecording()&&(n&&r.setAttributes({"langchain.chain.outputs":JSON.stringify(e)}),a(t))},handleChainError(e,t){let n=i.get(t);n?.isRecording()&&(n.setStatus({code:2,message:`internal_error`}),a(t)),L(e,{mechanism:{handled:!1,type:`${Em}.chain_error_handler`}})},handleToolStart(e,n,r,a,o,s,c){if(s?.__sentry_langgraph__)return;let l=c||e.name||`unknown_tool`,u={...Um(s),[P]:Em,[uf]:`execute_tool`,[Df]:l};t&&(u[Af]=n),ra({name:`execute_tool ${l}`,op:`gen_ai.execute_tool`,attributes:{...u,[N]:`gen_ai.execute_tool`}},e=>(i.set(r,e),e))},handleToolEnd(e,t){let r=i.get(t);if(r?.isRecording()){if(n){let t=e,n=t&&typeof t==`object`&&`content`in t?t.content:e;r.setAttributes({[jf]:typeof n==`string`?n:JSON.stringify(n)})}a(t)}},handleToolError(e,t){let n=i.get(t);n?.isRecording()&&(n.setStatus({code:2,message:`internal_error`}),a(t)),L(e,{mechanism:{handled:!1,type:`${Em}.tool_error_handler`}})},copy(){return o},toJSON(){return{lc:1,type:`not_implemented`,id:o.lc_id}},toJSONNotImplemented(){return{lc:1,type:`not_implemented`,id:o.lc_id}}};return o}var Xm=`auto.ai.langgraph`;function Zm(e){let t=e[0];if(typeof t!=`object`||!t||!(`llm`in t)||!t.llm||typeof t.llm!=`object`)return null;let n=t.llm;return typeof n.modelName!=`string`&&typeof n.model!=`string`?null:n}function Qm(e){let t=e[0];return typeof t==`object`&&t&&`name`in t&&typeof t.name==`string`?t.name:null}function $m(e,t,n){let r=`__sentry_tool_wrapped__`;for(let i of e){if(!i||typeof i!=`object`)continue;let e=i,a=e.invoke;if(typeof a!=`function`||Object.prototype.hasOwnProperty.call(e,r))continue;let o=typeof e.name==`string`?e.name:`unknown_tool`,s=typeof e.description==`string`?e.description:void 0;e.invoke=new Proxy(a,{apply(e,r,i){let a={[P]:Xm,[N]:Ef,[uf]:`execute_tool`,[Df]:o,[kf]:`function`},c=i[1]?.metadata?.lc_agent_name??n;typeof c==`string`&&(a[vf]=c),s&&(a[Mf]=s);let l=i[0];if(typeof l==`object`&&l&&(`id`in l&&typeof l.id==`string`&&(a[Of]=l.id),t.recordInputs)){let e=`args`in l&&typeof l.args==`object`?l.args:l;try{a[Af]=JSON.stringify(e)}catch{}}return na({op:Ef,name:`execute_tool ${o}`,attributes:a},async n=>{try{let a=await Reflect.apply(e,r,i);if(t.recordOutputs)try{let e=a,t=e&&typeof e==`object`&&`content`in e?e.content:a;n.setAttribute(jf,typeof t==`string`?t:JSON.stringify(t))}catch{}return a}catch(e){throw n.setStatus({code:2,message:`internal_error`}),L(e,{mechanism:{handled:!1,type:`auto.ai.langgraph.error`}}),e}})}}),Object.defineProperty(e,r,{value:!0,enumerable:!1})}return e}function eh(e){if(!e||e.length===0)return null;let t=[];for(let n of e)if(n&&typeof n==`object`){let e=n.tool_calls;e&&Array.isArray(e)&&t.push(...e)}return t.length>0?t:null}function th(e){let t=e,n=0,r=0,i=0;if(t.usage_metadata&&typeof t.usage_metadata==`object`){let e=t.usage_metadata;return typeof e.input_tokens==`number`&&(n=e.input_tokens),typeof e.output_tokens==`number`&&(r=e.output_tokens),typeof e.total_tokens==`number`&&(i=e.total_tokens),{inputTokens:n,outputTokens:r,totalTokens:i}}if(t.response_metadata&&typeof t.response_metadata==`object`){let e=t.response_metadata;if(e.tokenUsage&&typeof e.tokenUsage==`object`){let t=e.tokenUsage;typeof t.promptTokens==`number`&&(n=t.promptTokens),typeof t.completionTokens==`number`&&(r=t.completionTokens),typeof t.totalTokens==`number`&&(i=t.totalTokens)}}return{inputTokens:n,outputTokens:r,totalTokens:i}}function nh(e,t){let n=t;if(n.response_metadata&&typeof n.response_metadata==`object`){let t=n.response_metadata;t.model_name&&typeof t.model_name==`string`&&e.setAttribute(rf,t.model_name),t.finish_reason&&typeof t.finish_reason==`string`&&e.setAttribute(nf,[t.finish_reason])}}function rh(e){if(!e.builder?.nodes?.tools?.runnable?.tools)return null;let t=e.builder?.nodes?.tools?.runnable?.tools;return!t||!Array.isArray(t)||t.length===0?null:t.map(e=>({name:e.lc_kwargs?.name,description:e.lc_kwargs?.description,schema:e.lc_kwargs?.schema}))}function ih(e,t,n){let r=n?.messages;if(!r||!Array.isArray(r))return;let i=t?.length??0,a=r.length>i?r.slice(i):[];if(a.length===0)return;let o=eh(a);o&&e.setAttribute(_f,JSON.stringify(o));let s=Fm(a);e.setAttribute(mf,JSON.stringify(s));let c=0,l=0,u=0;for(let t of a){let n=th(t);c+=n.inputTokens,l+=n.outputTokens,u+=n.totalTokens,nh(e,t)}c>0&&e.setAttribute(sf,c),l>0&&e.setAttribute(cf,l),u>0&&e.setAttribute(lf,u)}var ah=!1,oh=`__sentry_patched__`;function sh(e,t){if(Object.prototype.hasOwnProperty.call(e,oh))return e;let n=Ym(t),r=new Proxy(e,{apply(e,r,i){return ah?Reflect.apply(e,r,i):na({op:`gen_ai.create_agent`,name:`create_agent`,attributes:{[P]:Xm,[N]:`gen_ai.create_agent`,[uf]:`create_agent`}},a=>{try{let o=Reflect.apply(e,r,i),s=i.length>0?i[0]:{};s?.name&&typeof s.name==`string`&&(a.setAttribute(vf,s.name),a.updateName(`create_agent ${s.name}`));let c=o.invoke;return c&&typeof c==`function`&&(o.invoke=ch(c.bind(o),o,s,t,void 0,n)),o}catch(e){throw a.setStatus({code:2,message:`internal_error`}),L(e,{mechanism:{handled:!1,type:`auto.ai.langgraph.error`}}),e}})}});return Object.defineProperty(r,oh,{value:!0,enumerable:!1}),r}function ch(e,t,n,r,i,a){return new Proxy(e,{apply(e,o,s){let c=i?.modelName??i?.model;return na({op:`gen_ai.invoke_agent`,name:`invoke_agent`,attributes:{[P]:Xm,[N]:Cf,[uf]:`invoke_agent`}},async i=>{try{let l=n?.name;l&&typeof l==`string`&&(i.setAttribute(yf,l),i.setAttribute(vf,l),i.updateName(`invoke_agent ${l}`)),c&&i.setAttribute(Kd,c);let u=(s.length>1?s[1]:void 0)?.configurable?.thread_id;if(u&&typeof u==`string`&&i.setAttribute(bf,u),a){let e=s[1]??{};s[1]=e,e.metadata={...e.metadata??{},__sentry_langgraph__:!0,...typeof l==`string`?{lc_agent_name:l}:{}},e.callbacks=Jm(e.callbacks,a)}let d=rh(t);d&&i.setAttribute(hf,JSON.stringify(d));let f=r.recordInputs,p=r.recordOutputs,m=s.length>0?s[0]?.messages??[]:[];if(m&&f){let{systemInstructions:e,filteredMessages:t}=bp(Fm(m));e&&i.setAttribute(pf,e);let n=mp(r.enableTruncation),a=Array.isArray(t)?t.length:0;i.setAttributes({[ff]:n?yp(t):vp(t),[df]:a})}let h=await Reflect.apply(e,o,s);return p&&ih(i,m??null,h),h}catch(e){throw i.setStatus({code:2,message:`internal_error`}),L(e,{mechanism:{handled:!1,type:`auto.ai.langgraph.error`}}),e}})}})}function lh(e,t){if(Object.prototype.hasOwnProperty.call(e,oh))return e;let n=pp(t),r=Ym(n),i=new Proxy(e,{apply(e,t,i){let a=Zm(i),o=Qm(i),s=i[0];s&&Array.isArray(s.tools)&&s.tools.length>0&&$m(s.tools,n,o??void 0),ah=!0;let c;try{c=Reflect.apply(e,t,i)}finally{ah=!1}let l=c.invoke;if(l&&typeof l==`function`){let e={};o&&(e.name=o),c.invoke=ch(l.bind(c),c,e,n,a,r)}return c}});return Object.defineProperty(i,oh,{value:!0,enumerable:!1}),i}function uh(e,t){return e.compile=sh(e.compile,pp(t)),e}function dh(e,t,n){let r=n.getOptions(),i=n.getDsn(),a=r.tunnel,o=Pi(r._metadata),s={sent_at:new Date(He()).toISOString(),...fh(t)&&{trace:t},...o&&{sdk:o},...!!a&&i&&{dsn:er(i)}},c=n.getDataCollectionOptions().userInfo?`auto`:`never`;return bi(s,[[{type:`span`,item_count:e.length,content_type:`application/vnd.sentry.items.span.v2+json`},{version:2,...ys()&&{ingest_settings:{infer_ip:c,infer_user_agent:c}},items:e}]])}function fh(e){return!!e.trace_id&&!!e.public_key}function ph(e){let t=156;if(t+=e.name.length*2,t+=an(e.attributes),e.links&&e.links.length>0){let n=e.links[0]?.attributes,r=100+(n?an(n):0);t+=r*e.links.length}return t}var mh=1e3,hh=5e6,gh=class{constructor(e,t){this._traceBuckets=new Map,this._client=e;let{maxSpanLimit:n,flushInterval:r,maxTraceWeightInBytes:i}=t??{};this._maxSpanLimit=n&&n>0&&n<=mh?n:mh,this._flushInterval=r&&r>0?r:5e3,this._maxTraceWeight=i&&i>0?i:hh,this._client.on(`flush`,()=>{this.drain()}),this._client.on(`close`,()=>{this._traceBuckets.forEach(e=>{clearTimeout(e.timeout)}),this._traceBuckets.clear()})}add(e){let t=e.trace_id,n=this._traceBuckets.get(t);n||(n={spans:new Set,size:0,timeout:Zo(setTimeout(()=>{this.flush(t)},this._flushInterval))},this._traceBuckets.set(t,n)),n.spans.add(e),n.size+=ph(e),(n.spans.size>=this._maxSpanLimit||n.size>=this._maxTraceWeight)&&this.flush(t)}drain(){this._traceBuckets.size&&(r&&x.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((e,t)=>{this.flush(t)}))}flush(e){let t=this._traceBuckets.get(e);if(!t)return;if(!t.spans.size){this._removeTrace(e);return}let n=Array.from(t.spans),i=n[0]?._segmentSpan;if(!i){r&&x.warn(`No segment span reference found on span JSON, cannot compute DSC`),this._removeTrace(e);return}let a=gi(i),o=n.map(e=>{let{_segmentSpan:t,...n}=e;return n}),s=dh(o,a,this._client);r&&x.log(`Sending span envelope for trace ${e} with ${o.length} spans`),this._client.sendEnvelope(s).then(null,e=>{r&&x.error(`Error while sending streamed span envelope:`,e)}),this._removeTrace(e)}_removeTrace(e){let t=this._traceBuckets.get(e);t&&clearTimeout(t.timeout),this._traceBuckets.delete(e)}};function _h(e){if(e!==void 0){if(e>=400&&e<500)return`warning`;if(e>=500)return`error`}}var vh=i;function yh(){return`history`in vh&&!!vh.history}function bh(){if(!(`fetch`in vh))return!1;try{return new Headers,new Request(`data:,`),new Response,!0}catch{return!1}}function xh(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Sh(){if(typeof EdgeRuntime==`string`)return!0;if(!bh())return!1;if(xh(vh.fetch))return!0;let e=!1,t=vh.document;if(t&&typeof t.createElement==`function`)try{let n=t.createElement(`iframe`);n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=xh(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){r&&x.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function Ch(){return`ReportingObserver`in vh}function wh(e,t){let n=`fetch`,r=ce(n,e);return le(n,()=>Eh(void 0,t)),r}function Th(e){let t=`fetch-body-resolved`,n=ce(t,e);return le(t,()=>Eh(Oh)),n}function Eh(e,t=!1){t&&!Sh()||Ne(i,`fetch`,function(t){return function(...n){let r=Error(),{method:a,url:o}=jh(n),s={args:n,fetchData:{method:a,url:o},startTimestamp:O()*1e3,virtualError:r,headers:Mh(n)};return e||ue(`fetch`,{...s}),t.apply(i,n).then(async t=>(e?e(t):ue(`fetch`,{...s,endTimestamp:O()*1e3,response:t}),t),e=>{ue(`fetch`,{...s,endTimestamp:O()*1e3,error:e}),ve(e)&&e.stack===void 0&&(e.stack=r.stack,D(e,`framesToPop`,1));let t=j()?.getOptions().enhanceFetchErrorMessages??`always`;if(t!==!1&&e instanceof TypeError&&(e.message===`Failed to fetch`||e.message===`Load failed`||e.message===`NetworkError when attempting to fetch resource.`))try{let n=new URL(s.fetchData.url).host;t===`always`?e.message=`${e.message} (${n})`:D(e,`__sentry_fetch_url_host__`,n)}catch{}throw e})}})}async function Dh(e,t){if(e?.body){let n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3),a=!0;for(;a;){let e;try{e=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);let{done:i}=await r.read();clearTimeout(e),i&&(t(),a=!1)}catch{a=!1}finally{clearTimeout(e)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function Oh(e){let t;try{t=e.clone()}catch{return}Dh(t,()=>{ue(`fetch-body-resolved`,{endTimestamp:O()*1e3,response:e})})}function kh(e,t){return De(e)&&!!e[t]}function Ah(e){return typeof e==`string`?e:e?kh(e,`url`)?e.url:e.toString?e.toString():``:``}function jh(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:Ah(t),method:kh(n,`method`)?String(n.method).toUpperCase():Me(t)&&kh(t,`method`)?String(t.method).toUpperCase():`GET`}}let t=e[0];return{url:Ah(t),method:kh(t,`method`)?String(t.method).toUpperCase():`GET`}}function Mh(e){let[t,n]=e;try{if(typeof n==`object`&&n&&`headers`in n&&n.headers)return new Headers(n.headers);if(Me(t))return new Headers(t.headers)}catch{}}var Nh=i;function Ph(){try{return Nh.document.location.href}catch{return``}}function Fh(e,t=5){if(!Nh.HTMLElement)return null;let n=e;for(let e=0;e<t;e++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}function Ih(e){let t=e.constructor?.name??``;return t.includes(`OpenAI`)?`openai`:t.includes(`Google`)?`google_genai`:t.includes(`Mistral`)?`mistralai`:t.includes(`Vertex`)?`google_vertexai`:t.includes(`Bedrock`)?`aws_bedrock`:t.includes(`Ollama`)?`ollama`:t.includes(`Cloudflare`)?`cloudflare`:t.includes(`Cohere`)?`cohere`:`langchain`}function Lh(e){let t=e??{},n={[P]:Em,[N]:Tf,[uf]:`embeddings`,[Kd]:t.model??`unknown`};return n[Gd]=Ih(t),`dimensions`in t&&(n[tf]=t.dimensions),`encodingFormat`in t&&(n[ef]=t.encodingFormat),n}function Rh(e,t={}){let{recordInputs:n}=pp(t);return new Proxy(e,{apply(e,t,r){let i=Lh(t),a=i[`gen_ai.request.model`]||`unknown`;if(n){let e=r[0];e!=null&&(i[wf]=typeof e==`string`?e:JSON.stringify(e))}return na({name:`embeddings ${a}`,op:Tf,attributes:i},()=>Reflect.apply(e,t,r).then(void 0,e=>{throw L(e,{mechanism:{handled:!1,type:`auto.ai.langchain`}}),e}))}})}function zh(e,t){let n=e;return typeof n.embedQuery==`function`&&(n.embedQuery=Rh(n.embedQuery,t)),typeof n.embedDocuments==`function`&&(n.embedDocuments=Rh(n.embedDocuments,t)),e}var Bh=i,z=Bh.document,Vh=Bh.navigator,Hh=`Report a Bug`,Uh=`Cancel`,Wh=`Send Bug Report`,Gh=`Confirm`,Kh=`Report a Bug`,qh=`your.email@example.org`,Jh=`Email`,Yh=`What's the bug? What did you expect?`,Xh=`Description`,Zh=`Your Name`,Qh=`Name`,$h=`Thank you for your report!`,eg=`(required)`,tg=`Add a screenshot`,ng=`Remove screenshot`,rg=`Highlight`,ig=`Hide`,ag=`Remove`,og=`Unable to submit feedback with empty message`,sg=`No client setup, cannot send feedback.`,cg=`Unable to determine if Feedback was correctly sent.`,lg=`Unable to send feedback. This could be because this domain is not in your list of allowed domains.`,ug=`Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.`,dg=`widget`,fg=`api`,pg=5e3,mg={ERROR_EMPTY_MESSAGE:og,ERROR_NO_CLIENT:sg,ERROR_TIMEOUT:cg,ERROR_FORBIDDEN:lg,ERROR_GENERIC:ug};function hg(e,t){return t?.[e]??mg[e]}function gg(e,t){return Error(hg(e,t))}var _g=(e,t={includeReplay:!0})=>{let n=t.errorMessages;if(!e.message)throw gg(`ERROR_EMPTY_MESSAGE`,n);let r=j();if(!r)throw gg(`ERROR_NO_CLIENT`,n);e.tags&&Object.keys(e.tags).length&&k().setTags(e.tags);let i=gd({source:fg,url:Ph(),...e},t);return new Promise((e,t)=>{let a=setTimeout(()=>{o(),t(hg(`ERROR_TIMEOUT`,n))},3e4),o=r.on(`afterSendEvent`,(r,s)=>{if(r.event_id===i)return clearTimeout(a),o(),s?.statusCode&&s.statusCode>=200&&s.statusCode<300?e(i):s?.statusCode===403?t(hg(`ERROR_FORBIDDEN`,n)):t(hg(`ERROR_GENERIC`,n))})})},vg=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__;function yg(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Vh.userAgent)||/Macintosh/i.test(Vh.userAgent)&&Vh.maxTouchPoints&&Vh.maxTouchPoints>1||!isSecureContext)}function bg(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen?.(),e.onFormOpen?.()},onFormClose:()=>{t.onFormClose?.(),e.onFormClose?.()},onSubmitSuccess:(n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},onSubmitError:n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},onFormSubmitted:()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function xg(e){let t=z.createElement(`style`);return t.textContent=`
|
|
9
|
+
`)}`)}function Ui(e){if(!r)return;let{description:t=`< unknown name >`,op:n=`< unknown op >`}=F(e),{spanId:i}=e.spanContext(),a=`[Tracing] Finishing "${n}" ${I(e)===e?`root `:``}span "${t}" with ID ${i}`;x.log(a)}function Wi(e,t,n,i=Br()){let a=i&&I(i);a&&(r&&x.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),a.addEvent(e,{[bn]:t,[yn]:n}))}function Gi(e){if(!e||e.length===0)return;let t={};return e.forEach(e=>{let n=e.attributes||{},r=n[yn],i=n[bn];typeof r==`string`&&typeof i==`number`&&(t[e.name]={value:i,unit:r})}),t}function Ki(){return s(o()).segmentSpanCaptureStrategy}function qi(e){return e.getOptions().traceLifecycle===`stream`}var Ji=1e3,Yi=class{constructor(e={}){this._traceId=e.traceId||Pt(),this._spanId=e.spanId||Ft(),this._startTime=e.startTimestamp||O(),this._links=e.links,this._attributes={},this.setAttributes({[P]:`manual`,[N]: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._frozen||(this._links?this._links.push(e):this._links=[e]),this}addLinks(e){return this._frozen||(this._links?this._links.push(...e):this._links=e),this}recordException(e,t){}spanContext(){let{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:+!!n}}setAttribute(e,t){return this._frozen?this:(t===void 0?delete this._attributes[e]:this._attributes[e]=t,e===`sentry.source`&&t!==void 0&&Un(this)&&Wn(this),this)}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._frozen||(this._startTime=Cr(e))}setStatus(e){return this._frozen||(this._status=e),this}updateName(e){return this._frozen?this:(this._name=e,Un(this)||this.setAttribute(M,`custom`),this)}end(e){if(this._endTime){this._frozen=Gn(this);return}this._endTime=Cr(e),Ui(this),this._onSpanEnded(),this._frozen=Gn(this)}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[N],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:jr(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[P],profile_id:this._attributes[kn],exclusive_time:this._attributes[An],measurements:Gi(this._events),is_segment:this._isStandaloneSpan&&I(this)===this||void 0,segment_id:this._isStandaloneSpan?I(this).spanContext().spanId:void 0,links:xr(this._links)}}getStreamedSpanJSON(){return{name:this._name??``,span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===I(this),status:Mr(this._status),attributes:Nr(this._attributes,this._status),links:Sr(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){if(this._frozen)return this;r&&x.log(`[Tracing] Adding an event to span:`,e);let i=Xi(t)?t:n||O(),a=Xi(t)?{}:t||{},o={name:e,time:Cr(i),attributes:a};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let e=j();e&&(e.emit(`spanEnd`,this),this._isStandaloneSpan||e.emit(`afterSpanEnd`,this));let t=I(this),n=this._isStandaloneSpan||this===t;if(this._isStandaloneSpan){this._sampled?$i(Vi([this],e)):(r&&x.log(`[Tracing] Discarding standalone span because its trace was not chosen to be sampled.`),e&&e.recordDroppedEvent(`sample_rate`,`span`));return}if(!n){let e=Ki();if(e){let n=Hn(this).scope||k();e.onChildSpanEnded(this,t,e=>this._convertSpanToTransaction(e),n)}return}if(e&&qi(e)){e.emit(`afterSegmentSpanEnd`,this);return}let i=Hn(this).scope||k(),a=Ki();if(a)a.onSegmentSpanEnded(e=>this._convertSpanToTransaction(e),i);else{let e=this._convertSpanToTransaction();e&&i.captureEvent(e)}}_convertSpanToTransaction(e={}){if(!Zi(F(this)))return;this._name||=(r&&x.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),`<unlabeled transaction>`);let{scope:t,isolationScope:n}=Hn(this),i=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;e.onSpanCaptured?.(this);let a=[];for(let t of Rr(this)){if(t===this||Qi(t)||e.isSpanAlreadyCaptured?.(t))continue;let n=F(t);Zi(n)&&(e.onSpanCaptured?.(t),a.push(n))}let o=this._attributes[M];delete this._attributes[On];let s=!1;a.forEach(e=>{delete e.data[On],e.op?.startsWith(`gen_ai.`)&&(s=!0)});let c={contexts:{trace:_r(this)},spans:a.length>Ji?a.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,Ji):a,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:`transaction`,sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:vi(this),hasGenAiSpans:s},request:i,...o&&{transaction_info:{source:o}}},l=Gi(this._events);return l&&Object.keys(l).length&&(r&&x.log(`[Measurements] Adding measurements to transaction event`,JSON.stringify(l,void 0,2)),c.measurements=l),c}};function Xi(e){return e&&typeof e==`number`||e instanceof Date||Array.isArray(e)}function Zi(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function Qi(e){return e instanceof Yi&&e.isStandaloneSpan()}function $i(e){let t=j();if(!t)return;let n=e[1];if(!n||n.length===0){t.recordDroppedEvent(`before_send`,`span`);return}t.sendEnvelope(e)}function ea(e,t,n=()=>{},r=()=>{}){let i;try{i=e()}catch(e){throw t(e),n(),e}return ta(i,t,n,r)}function ta(e,t,n,r){return Ae(e)?qt(e,e=>{n(),r(e)},e=>{t(e),n()}):(n(),r(e),e)}function na(e,t,n){if(!Gr(e))return[!1];let i,a;typeof e.tracesSampler==`function`?(a=e.tracesSampler({...t,inheritOrSampleWith:e=>typeof t.parentSampleRate==`number`?t.parentSampleRate:typeof t.parentSampled==`boolean`?Number(t.parentSampled):e}),i=!0):t.parentSampled===void 0?e.tracesSampleRate!==void 0&&(a=e.tracesSampleRate,i=!0):a=t.parentSampled;let o=cr(a);if(o===void 0)return r&&x.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(a)} of type ${JSON.stringify(typeof a)}.`),[!1];if(!o)return r&&x.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler==`function`?`tracesSampler returned 0 or false`:`a negative sampling decision was inherited or tracesSampleRate is set to 0`}`),[!1,o,i];let s=n<o;return s||r&&x.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(a)})`),[s,o,i]}var ra=`__SENTRY_SUPPRESS_TRACING__`;function ia(e,t){let n=ga();if(n.startSpan)return n.startSpan(e,t);let r=ha(e),{forceTransaction:i,parentSpan:a,scope:o}=e,s=o?.clone();return pn(s,()=>ba(a)(()=>{let n=k(),o=ya(n,a),s=j(),c=e.onlyIfParent&&!o?pa(n,s):ma({parentSpan:o,spanArguments:r,forceTransaction:i,scope:n});return(!Sa(c)||!o)&&zt(n,c),ea(()=>t(c),()=>{let{status:e}=F(c);c.isRecording()&&(!e||e===`ok`)&&c.setStatus({code:2,message:`internal_error`})},()=>{c.end()})}))}function aa(e,t){let n=ga();if(n.startSpanManual)return n.startSpanManual(e,t);let r=ha(e),{forceTransaction:i,parentSpan:a,scope:o}=e,s=o?.clone();return pn(s,()=>ba(a)(()=>{let n=k(),o=ya(n,a),s=e.onlyIfParent&&!o?pa(n,j()):ma({parentSpan:o,spanArguments:r,forceTransaction:i,scope:n});return(!Sa(s)||!o)&&zt(n,s),ea(()=>t(s,()=>s.end()),()=>{let{status:e}=F(s);s.isRecording()&&(!e||e===`ok`)&&s.setStatus({code:2,message:`internal_error`})})}))}function oa(e){let t=ga();return t.startInactiveSpan?t.startInactiveSpan(e):sa(e)}function sa(e){let t=ha(e),{forceTransaction:n,parentSpan:r}=e;return(e.scope?t=>pn(e.scope,t):r===void 0?e=>e():e=>la(r,e))(()=>{let i=k(),a=ya(i,r),o=j();return e.onlyIfParent&&!a?pa(i,o):ma({parentSpan:a,spanArguments:t,forceTransaction:n,scope:i})})}var ca=(e,t)=>{let n=tn(o());if(n.continueTrace)return n.continueTrace(e,t);let{sentryTrace:r,baggage:i}=e,a=j(),s=qn(i);return a&&!hr(a,s?.org_id)?fa(t):pn(e=>{let n=dr(r,i);return e.setPropagationContext(n),zt(e,void 0),t()})};function la(e,t){let n=ga();return n.withActiveSpan?n.withActiveSpan(e,t):pn(n=>(zt(n,e||void 0),t(n)))}function ua(e){let t=ga();return t.suppressTracing?t.suppressTracing(e):pn(t=>{t.setSDKProcessingMetadata({[ra]:!0});let n=e();return t.setSDKProcessingMetadata({[ra]:void 0}),n})}function da(e=k()){let t=ga();return t.isTracingSuppressed?t.isTracingSuppressed(e):e.getScopeData().sdkProcessingMetadata[ra]===!0}function fa(e){let t=ga();return t.startNewTrace?t.startNewTrace(e):pn(t=>(t.setPropagationContext({traceId:Pt(),sampleRand:Ve()}),r&&x.log(`Starting a new trace with id ${t.getPropagationContext().traceId}`),la(null,e)))}function pa(e,t){t?.recordDroppedEvent(`no_parent_span`,`span`);let n=new Qr({traceId:e.getPropagationContext().traceId});return Vn(n,e,A()),n}function ma({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){let i=A();if(!Gr()){let t={...i.getPropagationContext(),...r.getPropagationContext()},a=new Qr({traceId:e?e.spanContext().traceId:t.traceId});return e&&!n&&Ir(e,a),Vn(a,r,i),a}let a=j();if(xa(a,t)){da(r)||a?.recordDroppedEvent(`ignored`,`span`);let t=new Qr({dropReason:`ignored`,traceId:e?.spanContext().traceId??r.getPropagationContext().traceId});return e&&!n&&Ir(e,t),Vn(t,r,i),t}let o;if(e&&!n)o=va(e,r,t,i),Ir(e,o);else if(e){let n=vi(e),{traceId:a,spanId:s}=e.spanContext(),c=Ar(e);o=_a({traceId:a,parentSpanId:s,...t},r,i,c),hi(o,n)}else{let{traceId:e,dsc:n,parentSpanId:a,sampled:s}={...i.getPropagationContext(),...r.getPropagationContext()};o=_a({traceId:e,parentSpanId:a,...t},r,i,s),n&&hi(o,n)}return Hi(o),o}function ha(e){let t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let n={...t};return n.startTimestamp=Cr(e.startTime),delete n.startTime,n}return t}function ga(){return tn(o())}function _a(e,t,n,i){let a=j(),o=a?.getOptions()||{},{name:s=``}=e,c={spanAttributes:{...e.attributes},spanName:s,parentSampled:i};a?.emit(`beforeSampling`,c,{decision:!1});let l=c.parentSampled??i,u=c.spanAttributes,d=t.getPropagationContext(),f=da(t),[p,m,h]=f?[!1]:na(o,{name:s,parentSampled:l,attributes:u,normalizedRequest:n.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:cr(d.dsc?.sample_rate)},d.sampleRand),g=new Yi({...e,attributes:{[M]:`custom`,[gn]:m!==void 0&&h?m:void 0,...u},sampled:p});return!p&&a&&!f&&(r&&x.log(`[Tracing] Discarding root span because its trace was not chosen to be sampled.`),a.recordDroppedEvent(`sample_rate`,qi(a)?`span`:`transaction`)),Vn(g,t,n),a&&a.emit(`spanStart`,g),g}function va(e,t,n,r){let{spanId:i,traceId:a}=e.spanContext(),o=da(t),s=!o&&Ar(e),c=s?new Yi({...n,parentSpanId:i,traceId:a,sampled:s}):new Qr({traceId:a});Ir(e,c),Vn(c,t,r);let l=j();return l?(qi(l)&&$r(c)&&($r(e)&&e.dropReason?(c.dropReason=e.dropReason,l.recordDroppedEvent(e.dropReason,`span`)):o||(c.dropReason=`sample_rate`,l.recordDroppedEvent(`sample_rate`,`span`))),l.emit(`spanStart`,c),n.endTimestamp&&(l.emit(`spanEnd`,c),l.emit(`afterSpanEnd`,c)),c):c}function ya(e,t){if(t)return t;if(t===null)return;let n=Bt(e);if(!n)return;let r=j();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?I(n):n}function ba(e){return e===void 0?e=>e():t=>la(e,t)}function xa(e,t){let n=e?.getOptions().ignoreSpans;return!e||!qi(e)||!n?.length?!1:qr({description:t.name||``,op:t.attributes?.[`sentry.op`]||t.op,attributes:t.attributes},n)}function Sa(e){return $r(e)&&e.dropReason===`ignored`}var Ca={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},wa=`heartbeatFailed`,Ta=`idleTimeout`,Ea=`finalTimeout`,Da=`externalFinish`;function Oa(e,t={}){let n=new Map,i=!1,a,o=Da,s=!t.disableAutoFinish,c=[],{idleTimeout:l=Ca.idleTimeout,finalTimeout:u=Ca.finalTimeout,childSpanTimeout:d=Ca.childSpanTimeout,beforeSpanEnd:f,trimIdleSpanEndTimestamp:p=!0}=t,m=j(),h=k();if(!m||!Gr()){let e=new Qr({traceId:h.getPropagationContext().traceId});return Vn(e,h,A()),e}let g=Br(),_=ka(e);_.end=new Proxy(_.end,{apply(e,t,n){if(f&&f(_),$r(t))return;let[r,...i]=n,a=Cr(r||O()),o=Rr(_).filter(e=>e!==_),s=F(_);if(!o.length||!p)return w(a),Reflect.apply(e,t,[a,...i]);let c=m.getOptions().ignoreSpans,l=o?.reduce((e,t)=>{let n=F(t);return!n.timestamp||c&&qr({description:n.description,op:n.op,attributes:n.data},c)?e:e?Math.max(e,n.timestamp):n.timestamp},void 0),d=s.start_timestamp,h=Math.min(d?d+u/1e3:1/0,Math.max(d||-1/0,Math.min(a,l||1/0)));return w(h),Reflect.apply(e,t,[h,...i])}});function v(){a&&=(clearTimeout(a),void 0)}function y(e){v(),a=setTimeout(()=>{!i&&n.size===0&&s&&(o=Ta,_.end(e))},l)}function b(e){a=setTimeout(()=>{!i&&s&&(o=wa,_.end(e))},d)}function S(e){v(),n.set(e,!0),b(O()+d/1e3)}function C(e){n.has(e)&&n.delete(e),n.size===0&&y(O()+l/1e3)}function w(e){i=!0,n.clear(),c.forEach(e=>e()),zt(h,g);let t=F(_),{start_timestamp:a}=t;if(!a)return;t.data[`sentry.idle_span_finish_reason`]||_.setAttribute(vn,o);let s=t.status;(!s||s===`unknown`)&&_.setStatus({code:1}),x.log(`[Tracing] Idle span "${t.op}" finished`);let d=Rr(_).filter(e=>e!==_),f=0;d.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:`cancelled`}),t.end(e),r&&x.log(`[Tracing] Cancelling span since span ended early`,JSON.stringify(t,void 0,2)));let{timestamp:n=0,start_timestamp:i=0}=F(t),a=i<=e,o=(u+l)/1e3,s=n-i<=o;if(r){let e=JSON.stringify(t,void 0,2);a?s||x.log(`[Tracing] Discarding span since it finished after idle span final timeout`,e):x.log(`[Tracing] Discarding span since it happened after idle span was finished`,e)}(!s||!a)&&(Lr(_,t),f++)}),f>0&&_.setAttribute(`sentry.idle_span_discarded_spans`,f)}return c.push(m.on(`spanStart`,e=>{i||e===_||F(e).timestamp||e instanceof Yi&&e.isStandaloneSpan()||Rr(_).includes(e)&&S(e.spanContext().spanId)})),c.push(m.on(`spanEnd`,e=>{i||C(e.spanContext().spanId)})),c.push(m.on(`idleSpanEnableAutoFinish`,e=>{e===_&&(s=!0,y(),n.size&&b())})),t.disableAutoFinish||y(),setTimeout(()=>{i||(_.setStatus({code:2,message:`deadline_exceeded`}),o=Ea,_.end())},u),_}function ka(e){let t=oa(e);return zt(k(),t),r&&x.log(`[Tracing] Started span is an idle span`),t}function Aa(e,t,n){let r,i,a,o=n?.maxWait?Math.max(n.maxWait,t):0,s=n?.setTimeoutImpl||setTimeout;function c(){return l(),r=e(),r}function l(){i!==void 0&&clearTimeout(i),a!==void 0&&clearTimeout(a),i=a=void 0}function u(){return i!==void 0||a!==void 0?c():r}function d(){return i&&clearTimeout(i),i=s(c,t),o&&a===void 0&&(a=s(c,o)),r}return d.cancel=l,d.flush=u,d}var ja=[`addListener`,`on`,`once`,`prependListener`,`prependOnceListener`,`addEventListener`],Ma=[`removeListener`,`off`,`removeEventListener`],Na=Symbol(`SentryScopeBoundListeners`),Pa;function Fa(e){return Pa!==void 0&&(e===Pa||e.listener===Pa)}function Ia(e,t=k()){let n=e;if(Ua(n))return e;Ha(n);for(let e of ja)typeof n[e]==`function`&&(n[e]=za(n,n[e],t));for(let e of Ma)typeof n[e]==`function`&&(n[e]=Ba(n,n[e]));return typeof n.removeAllListeners==`function`&&(n.removeAllListeners=Va(n,n.removeAllListeners)),e}function La(e,t){return function(...n){return pn(t,()=>e.apply(this,n))}}function Ra(e){return typeof e==`function`}function za(e,t,n){return function(...r){let i=r[0],a=r[1],o=r.slice(2);if(!Ra(a)||Fa(a))return t.apply(this,r);let s=Ua(e)||Ha(e),c=s.get(i);c||(c=new WeakMap,s.set(i,c));let l=c.get(a);l||(l=La(a,n),c.set(a,l));let u=Pa;Pa=l;try{return t.call(this,i,l,...o)}finally{Pa=u}}}function Ba(e,t){return function(...n){let r=n[0],i=n[1],a=n.slice(2),o=Ra(i)?Ua(e)?.get(r)?.get(i):void 0;return o?t.call(this,r,o,...a):t.apply(this,n)}}function Va(e,t){return function(...n){let r=Ua(e);if(r)if(n.length===0)Ha(e);else{let e=n[0];r.delete(e)}return t.apply(this,n)}}function Ha(e){let t=new Map;return e[Na]=t,t}function Ua(e){return e[Na]}function Wa(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;Ja(e,t),r&&Za(e,r),Qa(e,n),Ya(e,i),Xa(e,a)}function Ga(e,t){let{extra:n,tags:r,attributes:i,user:a,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:m,span:h}=t;Ka(e,`extra`,n),Ka(e,`tags`,r),Ka(e,`attributes`,i),Ka(e,`user`,a),Ka(e,`contexts`,o),e.sdkProcessingMetadata=Nt(e.sdkProcessingMetadata,c,2),s&&(e.level=s),m&&(e.transactionName=m),h&&(e.span=h),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function Ka(e,t,n){e[t]=Nt(e[t],n,1)}function qa(e,t){let n=fn().getScopeData();return e&&Ga(n,e.getScopeData()),t&&Ga(n,t.getScopeData()),n}function Ja(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=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(a).length&&(e.contexts={...a,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)}function Ya(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Xa(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Za(e,t){e.contexts={trace:vr(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:vi(t),...e.sdkProcessingMetadata};let n=F(I(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}function Qa(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}function $a(e){let t={},{response:n,profile:r,cloud_resource:i,culture:a,state:o}=e;if(n&&(n.status_code!=null&&(t[`http.response.status_code`]=n.status_code),n.body_size!=null&&(t[`http.response.body.size`]=n.body_size)),r&&(r.profile_id&&(t[`sentry.profile_id`]=r.profile_id),r.profiler_id&&(t[`sentry.profiler_id`]=r.profiler_id)),i)for(let[e,n]of Object.entries(i))n!=null&&(t[e]=n);a&&(a.locale&&(t[`culture.locale`]=a.locale),a.timezone&&(t[`culture.timezone`]=a.timezone)),o?.state&&typeof o.state.type==`string`&&(t[`state.type`]=o.state.type);let s=e.angular;if(s){let e=s.version;(typeof e==`string`||typeof e==`number`)&&(t[`angular.version`]=e)}let c=e.react;if(c){let e=c.version;(typeof e==`string`||typeof e==`number`)&&(t[`react.version`]=e)}return t}function eo(e,t){let n=Tr(e),r=zr(e),i=Tr(r),{isolationScope:a,scope:o}=Hn(e),s=qa(a,o);io(n,i,t,s);let c=e.kind;t.emit(`preprocessSpan`,n,{spanKind:c}),n.is_segment&&(to(n,s),ro(n,t),t.emit(`processSegmentSpan`,n)),t.emit(`processSpan`,n);let{beforeSendSpan:l}=t.getOptions(),u=l&&xi(l)?ao(n,l):n,d=u.attributes?.[M];return d&&no(u,{[oi]:d}),{...Dr(u),_segmentSpan:r}}function to(e,t){no(e,$a(t.contexts))}function no(e,t){let n=e.attributes??={};Object.entries(t).forEach(([e,t])=>{t!=null&&!(e in n)&&(n[e]=t)})}function ro(e,t){let n=t.getIntegrationNames();n.length&&no(e,{[Cn]:n})}function io(e,t,n,r){let i=n.getSdkMetadata(),{release:a,environment:o}=n.getOptions();no(e,{[si]:`stream`,[ai]:t.name,[ii]:t.span_id,[ni]:i?.sdk?.name,[ri]:i?.sdk?.version,[xn]:a,[Sn]:o||`production`,[wn]:r.user?.id,[Tn]:r.user?.email,[En]:r.user?.ip_address,[Dn]:r.user?.username,...r.attributes})}function ao(e,t){return t(e)||(Vr(),e)}var oo=0,so=1,co=2;function lo(e){return new fo(t=>{t(e)})}function uo(e){return new fo((t,n)=>{n(e)})}var fo=class e{constructor(e){this._state=oo,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(!t)e(n);else try{e(t(n))}catch(e){r(e)}},t=>{if(!n)r(t);else try{e(n(t))}catch(e){r(e)}}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{if(i){n(r);return}e(r)})})}_executeHandlers(){if(this._state===oo)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===so&&e[1](this._value),this._state===co&&e[2](this._value),!0)})}_runExecutor(e){let t=(e,t)=>{if(this._state===oo){if(Ae(t)){t.then(n,r);return}this._state=e,this._value=t,this._executeHandlers()}},n=e=>{t(so,e)},r=e=>{t(co,e)};try{e(n,r)}catch(e){r(e)}}};function po(e,t,n,r=0){try{let i=mo(t,n,e,r);return Ae(i)?i:lo(i)}catch(e){return uo(e)}}function mo(e,t,n,i){let a=n[i];if(!e||!a)return e;let o=a({...e},t);return r&&o===null&&x.log(`Event processor "${a.id||`?`}" dropped event`),Ae(o)?o.then(e=>mo(e,t,n,i+1)):mo(o,t,n,i+1)}var ho,go,_o,vo;function yo(e){let t=i._sentryDebugIds,n=i._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],a=n?Object.keys(n):[];if(vo&&r.length===go&&a.length===_o)return vo;go=r.length,_o=a.length,vo={},ho||={};let o=(t,n)=>{for(let r of t){let t=n[r],i=ho?.[r];if(i&&vo&&t)vo[i[0]]=t,ho&&(ho[r]=[i[0],t]);else if(t){let n=e(r);for(let e=n.length-1;e>=0;e--){let i=n[e]?.filename;if(i&&vo&&ho){vo[i]=t,ho[r]=[i,t];break}}}}};return t&&o(r,t),n&&o(a,n),vo}function bo(e,t){let n=yo(e);if(!n)return[];let r=[];for(let e of t){let t=oe(e);t&&n[t]&&r.push({type:`sourcemap`,code_file:e,debug_id:n[t]})}return r}function xo(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||mt(),timestamp:t.timestamp||Ct()},l=n.integrations||e.integrations.map(e=>e.name);So(c,e),To(c,l),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&Co(c,e.stackParser);let u=Do(r,n.captureContext);n.mechanism&&vt(c,n.mechanism);let d=i?i.getEventProcessors():[],f=qa(a,u),p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),Wa(c,f);let m=[...d,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?lo(c):po(m,c,n)).then(e=>(e&&wo(e),typeof o==`number`&&o>0?Eo(e,o,s):e))}function So(e,t){let{environment:n,release:r,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||`production`,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);let o=e.request;o?.url&&a&&(o.url=ot(o.url,a)),a&&e.exception?.values?.forEach(e=>{e.value&&=ot(e.value,a)})}function Co(e,t){let n=yo(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}function wo(e){let 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)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:`sourcemap`,code_file:e,debug_id:t})})}function To(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Eo(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:Ze(e.data,t,n)}}))},...e.user&&{user:Ze(e.user,t,n)},...e.contexts&&{contexts:Ze(e.contexts,t,n)},...e.extra&&{extra:Ze(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Ze(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:Ze(e.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=Ze(e.contexts.flags,3,n)),r}function Do(e,t){if(!t)return e;let n=e?e.clone():new Ht;return n.update(t),n}function Oo(e){if(e)return ko(e)||jo(e)?{captureContext:e}:e}function ko(e){return e instanceof Ht||typeof e==`function`}var Ao=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`propagationContext`];function jo(e){return Object.keys(e).some(e=>Ao.includes(e))}function L(e,t){return k().captureException(e,Oo(t))}function Mo(e,t){let n=typeof t==`string`?t:void 0,r=typeof t==`string`?void 0:{captureContext:t};return k().captureMessage(e,n,r)}function No(e,t){return k().captureEvent(e,t)}function Po(e,t){A().setContext(e,t)}function Fo(e){A().setExtras(e)}function Io(e,t){A().setExtra(e,t)}function Lo(e){A().setTags(e)}function Ro(e,t){A().setTag(e,t)}function zo(e){A().setAttributes(e)}function Bo(e,t){A().setAttribute(e,t)}function Vo(e){A().setUser(e)}function Ho(e){A().setConversationId(e)}function Uo(){return A().lastEventId()}async function Wo(e){let t=j();return t?t.flush(e):(r&&x.warn(`Cannot flush events. No client defined.`),Promise.resolve(!1))}async function Go(e){let t=j();return t?t.close(e):(r&&x.warn(`Cannot flush events and disable SDK. No client defined.`),Promise.resolve(!1))}function Ko(){return!!j()}function qo(){let e=j();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function Jo(e){A().addEventProcessor(e)}function Yo(e){let t=A(),{user:n}=qa(t,k()),{userAgent:r}=i.navigator||{},a=kt({user:n,...r&&{userAgent:r},...e}),o=t.getSession();return o?.status===`ok`&&At(o,{status:`exited`}),Xo(),t.setSession(a),a}function Xo(){let e=A(),t=k().getSession()||e.getSession();t&&jt(t),Zo(),e.setSession()}function Zo(){let e=A(),t=j(),n=e.getSession();n&&t&&t.captureSession(n)}function Qo(e=!1){if(e){Xo();return}Zo()}function $o(e){return typeof e==`object`&&typeof e.unref==`function`&&e.unref(),e}function es(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}function ts(e){return`${es(e)}${e.projectId}/envelope/`}function ns(e,t){let n={sentry_version:`7`};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function rs(e,t,n){return t||`${ts(e)}?${ns(e,n)}`}function is(e,t){let n=sr(e);if(!n)return``;let r=`${es(n)}embed/error-page/`,i=`dsn=${tr(n)}`;for(let e in t)if(e!==`dsn`&&e!==`onClose`)if(e===`user`){let e=t.user;if(!e)continue;e.name&&(i+=`&name=${encodeURIComponent(e.name)}`),e.email&&(i+=`&email=${encodeURIComponent(e.email)}`)}else i+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`;return`${r}?${i}`}var as=[];function os(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}function ss(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n==`function`){let e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return os(r)}function cs(e,t){let n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&us(e,t,n)}),n}function ls(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function us(e,t,n){if(n[t.name]){r&&x.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!as.includes(t.name)&&typeof t.setupOnce==`function`&&(t.setupOnce(),as.push(t.name)),t.setup&&typeof t.setup==`function`&&t.setup(e),typeof t.preprocessEvent==`function`){let n=t.preprocessEvent.bind(t);e.on(`preprocessEvent`,(t,r)=>n(t,r,e))}if(typeof t.processEvent==`function`){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}[`processSpan`,`processSegmentSpan`].forEach(n=>{let r=t[n];typeof r==`function`&&e.on(n,n=>r.call(t,n,e))}),r&&x.log(`Integration installed: ${t.name}`)}function ds(e){let t=j();if(!t){r&&x.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function R(e){return e}var fs=`sentry.timestamp.sequence`,ps=0,ms;function hs(e){let t=Math.floor(e*1e3);ms!==void 0&&t!==ms&&(ps=0);let n=ps;return ps++,ms=t,{key:fs,value:{value:n,type:`integer`}}}function gs(e,t){return t?pn(t,()=>{let n=Br(),r=n?vr(n):hn(t);return[n?vi(n):_i(e,t),r]}):[void 0,void 0]}var _s={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function vs(){return typeof __SENTRY_BROWSER_BUNDLE__<`u`&&!!__SENTRY_BROWSER_BUNDLE__}function ys(){return`npm`}function bs(){return!vs()&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`}function xs(){return typeof window<`u`&&(!bs()||Ss())}function Ss(){return i.process?.type===`renderer`}function Cs(e,t){let n=t?`auto`:`never`;return[{type:`log`,item_count:e.length,content_type:`application/vnd.sentry.items.log+json`},{version:2,...xs()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function ws(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=tr(r)),Si(a,[Cs(e,i)])}var Ts=100;function Es(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function Ds(e,t){let n=js(),r=As(e);r===void 0?n.set(e,[t]):r.length>=Ts?(ks(e,r),n.set(e,[t])):n.set(e,[...r,t])}function Os(e,t=k(),n=Ds){let i=t?.getClient()??j();if(!i){r&&x.warn(`No client available to capture log.`);return}let{release:a,environment:o,enableLogs:s=!1,beforeSendLog:c}=i.getOptions();if(!s){r&&x.warn(`logging option not enabled, log will not be captured.`);return}let[,l]=gs(i,t),u={...e.attributes},{user:{id:d,email:p,username:m},attributes:h={}}=qa(A(),t);Es(u,`user.id`,d,!1),Es(u,`user.email`,p,!1),Es(u,`user.name`,m,!1),Es(u,`sentry.release`,a),Es(u,`sentry.environment`,o);let{name:g,version:_}=i.getSdkMetadata()?.sdk??{};Es(u,`sentry.sdk.name`,g),Es(u,`sentry.sdk.version`,_);let v=i.getIntegrationByName(`Replay`),y=v?.getReplayId(!0);Es(u,`sentry.replay_id`,y),y&&v?.getRecordingMode()===`buffer`&&Es(u,`sentry._internal.replay_is_buffering`,!0);let b=e.message;if(we(b)){let{__sentry_template_string__:e,__sentry_template_values__:t=[]}=b;t?.length&&(u[`sentry.message.template`]=e),t.forEach((e,t)=>{u[`sentry.message.parameter.${t}`]=e})}Es(u,`sentry.trace.parent_span_id`,Bt(t)?.spanContext().spanId);let S={...e,attributes:u};i.emit(`beforeCaptureLog`,S);let C=c?f(()=>c(S)):S;if(!C){i.recordDroppedEvent(`before_send`,`log_item`,1),r&&x.warn(`beforeSendLog returned null, log will not be captured.`);return}let{level:w,message:T,attributes:ee={},severityNumber:te}=C,ne=O(),re=hs(ne);n(i,{timestamp:ne,level:w,body:Ns(String(T)),trace_id:l?.trace_id,severity_number:te??_s[w],attributes:Ms({...an(h),...an(ee,!0),[re.key]:re.value})}),i.emit(`afterCaptureLog`,C)}function ks(e,t){let n=t??As(e)??[];if(n.length===0)return;let r=e.getOptions(),i=ws(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);js().set(e,[]),e.emit(`flushLogs`),e.sendEnvelope(i)}function As(e){return js().get(e)}function js(){return c(`clientToLogBufferMap`,()=>new WeakMap)}function Ms(e){let t={};for(let[n,r]of Object.entries(e)){let e=Ns(n);r.type===`string`?t[e]={...r,value:Ns(r.value)}:t[e]=r}return t}function Ns(e){let t=Object(e),n=t.isWellFormed,r=t.toWellFormed;return typeof n==`function`&&typeof r==`function`?n.call(e)?e:r.call(e):e}function Ps(e,t){let n=t?`auto`:`never`;return[{type:`trace_metric`,item_count:e.length,content_type:`application/vnd.sentry.items.trace-metric+json`},{version:2,...xs()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Fs(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=tr(r)),Si(a,[Ps(e,i)])}var Is=1e3;function Ls(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function Rs(e,t){let n=Ws(),r=Us(e);r===void 0?n.set(e,[t]):r.length>=Is?(Hs(e,r),n.set(e,[t])):n.set(e,[...r,t])}function zs(e,t,n){let{release:r,environment:i}=t.getOptions(),a={...e.attributes};Ls(a,`user.id`,n.id,!1),Ls(a,`user.email`,n.email,!1),Ls(a,`user.name`,n.username,!1),Ls(a,`sentry.release`,r),Ls(a,`sentry.environment`,i);let{name:o,version:s}=t.getSdkMetadata()?.sdk??{};Ls(a,`sentry.sdk.name`,o),Ls(a,`sentry.sdk.version`,s);let c=t.getIntegrationByName(`Replay`),l=c?.getReplayId(!0);return Ls(a,`sentry.replay_id`,l),l&&c?.getRecordingMode()===`buffer`&&Ls(a,`sentry._internal.replay_is_buffering`,!0),{...e,attributes:a}}function Bs(e,t,n,r){let[,i]=gs(t,n),a=Bt(n),o=a?a.spanContext().traceId:i?.trace_id,s=a?a.spanContext().spanId:void 0,c=O(),l=hs(c);return{timestamp:c,trace_id:o??``,span_id:s,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...an(r),...an(e.attributes,`skip-undefined`),[l.key]:l.value}}}function Vs(e,t){let n=t?.scope??k(),i=t?.captureSerializedMetric??Rs,a=n?.getClient()??j();if(!a){r&&x.warn(`No client available to capture metric.`);return}let{_experiments:o,enableMetrics:s,beforeSendMetric:c}=a.getOptions();if(!(s??o?.enableMetrics??!0)){r&&x.warn(`metrics option not enabled, metric will not be captured.`);return}let{user:l,attributes:u}=qa(A(),n),d=zs(e,a,l);a.emit(`processMetric`,d);let f=c||o?.beforeSendMetric,p=f?f(d):d;if(!p){r&&x.log("`beforeSendMetric` returned `null`, will not send metric.");return}let m=Bs(p,a,n,u);r&&x.log(`[Metric]`,m),i(a,m),a.emit(`afterCaptureMetric`,p)}function Hs(e,t){let n=t??Us(e)??[];if(n.length===0)return;let r=e.getOptions(),i=Fs(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Ws().set(e,[]),e.emit(`flushMetrics`),e.sendEnvelope(i)}function Us(e){return Ws().get(e)}function Ws(){return c(`clientToMetricBufferMap`,()=>new WeakMap)}function Gs(e){return Dr({trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||``,start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:!e.status||e.status===`ok`||e.status===`cancelled`?`ok`:`error`,is_segment:!1,attributes:{...e.data},links:e.links})}function Ks(e,t){if(e.type!==`transaction`||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||t.getOptions().streamGenAiSpans===!1||qi(t))return;let n=[],r=[];for(let t of e.spans)t.op?.startsWith(`gen_ai.`)?n.push(Gs(t)):r.push(t);if(n.length===0)return;e.spans=r;let i=t.getDataCollectionOptions().userInfo?`auto`:`never`;return[{type:`span`,item_count:n.length,content_type:`application/vnd.sentry.items.span.v2+json`},{version:2,...xs()&&{ingest_settings:{infer_ip:i,infer_user_agent:i}},items:n}]}var qs=Symbol.for(`SentryBufferFullError`);function Js(e=100){let t=new Set;function n(){return t.size<e}function r(e){t.delete(e)}function i(e){if(!n())return uo(qs);let i=e();return t.add(i),i.then(()=>r(i),()=>r(i)),i}function a(e){if(!t.size)return lo(!0);let n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;let r=[n,new Promise(t=>$o(setTimeout(()=>t(!1),e)))];return Promise.race(r)}return{get $(){return Array.from(t)},add:i,drain:a}}var Ys=60*1e3;function Xs(e,t=He()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?Ys:r-t}function Zs(e,t){return e[t]||e.all||0}function Qs(e,t,n=He()){return Zs(e,t)>n}function $s(e,{statusCode:t,headers:n},r=He()){let i={...e},a=n?.[`x-sentry-rate-limits`],o=n?.[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=(isNaN(o)?60:o)*1e3;if(!n)i.all=r+s;else for(let e of n.split(`;`))e===`metric_bucket`?(!a||a.split(`;`).includes(`custom`))&&(i[e]=r+s):i[e]=r+s}else o?i.all=r+Xs(o,r):t===429&&(i.all=r+60*1e3);return i}function ec(e,t,n=Js(e.bufferSize||64)){let i={},a=e=>n.drain(e);function o(a){let o=[];if(wi(a,(t,n)=>{let r=Fi(n);Qs(i,r)?e.recordDroppedEvent(`ratelimit_backoff`,r):o.push(t)}),o.length===0)return Promise.resolve({});let s=Si(a[0],o),c=t=>{if(Ti(s,[`client_report`])){r&&x.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`);return}wi(s,(n,r)=>{e.recordDroppedEvent(t,Fi(r))})};return n.add(()=>t({body:Oi(s)}).then(e=>e.statusCode===413?(r&&x.error(`Sentry responded with status code 413. Envelope was discarded due to exceeding size limits.`),c(`send_error`),e):(r&&e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&x.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),i=$s(i,e),e),e=>{throw c(`network_error`),r&&x.error(`Encountered error running transport request:`,e),e})).then(e=>e,e=>{if(e===qs)return r&&x.error(`Skipped sending event because buffer is full.`),c(`queue_overflow`),Promise.resolve({});throw e})}return{send:o,flush:a}}function tc(e,t,n){let r=[{type:`client_report`},{timestamp:n||Ct(),discarded_events:e}];return Si(t?{dsn:t}:{},[r])}function nc(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function rc(e){let{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:a,data:o,op:s}=e.contexts?.trace??{};return{data:o??{},description:e.transaction,op:s,parent_span_id:n,span_id:r??``,start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??``,origin:a,profile_id:o?.[kn],exclusive_time:o?.[An],measurements:e.measurements,is_segment:!0}}function ic(e){return{type:`transaction`,timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{"sentry.profile_id":e.profile_id},...e.exclusive_time&&{"sentry.exclusive_time":e.exclusive_time}}}},measurements:e.measurements}}var ac=`[Filtered]`,oc=[`forwarded`,`-ip`,`remote-`,`via`,`-user`],sc=[`auth`,`token`,`secret`,`session`,`password`,`passwd`,`pwd`,`key`,`jwt`,`bearer`,`sso`,`saml`,`csrf`,`xsrf`,`credentials`,`sid`,`identity`,`set-cookie`,`cookie`],cc=[`.sid`,`sessid`,`remember`,`oidc`,`pkce`,`nonce`,`__secure-`,`__host-`,`awsalb`,`awselb`,`akamai`,`__stripe`,`cognito`,`firebase`,`supabase`,`sb-`,`mfa`,`2fa`];function lc(e){return e===!0?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[`incomingRequest`,`outgoingRequest`,`incomingResponse`,`outgoingResponse`],queryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:oc},httpHeaders:{request:{deny:oc},response:{deny:oc}},httpBodies:[],queryParams:{deny:oc},graphQL:{document:!0,variables:!0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,stackFrameVariables:!0,frameContextLines:7}}var uc={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[`incomingRequest`,`outgoingRequest`,`incomingResponse`,`outgoingResponse`],queryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:5};function dc(e){let t=e.dataCollection==null?lc(e.sendDefaultPii):uc,n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:{request:n.httpHeaders?.request??t.httpHeaders.request,response:n.httpHeaders?.response??t.httpHeaders.response},httpBodies:n.httpBodies??t.httpBodies,queryParams:n.queryParams??t.queryParams,graphQL:{document:n.graphQL?.document??t.graphQL.document,variables:n.graphQL?.variables??t.graphQL.variables},genAI:{inputs:n.genAI?.inputs??t.genAI.inputs,outputs:n.genAI?.outputs??t.genAI.outputs},databaseQueryData:n.databaseQueryData??t.databaseQueryData,stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}var fc=`Not capturing exception because it's already been captured.`,pc=`Discarded session because of missing or non-string release`,mc=Symbol.for(`SentryInternalError`),hc=Symbol.for(`SentryDoNotSendEventError`),gc=5e3;function _c(e){return{message:e,[mc]:!0}}function vc(e){return{message:e,[hc]:!0}}function yc(e){return De(e)&&mc in e}function bc(e){return De(e)&&hc in e}function xc(e,t,n,r,i){let a=0,o,s=!1;e.on(n,()=>{a=0,clearTimeout(o),s=!1}),e.on(t,t=>{if(a+=r(t),a>=8e5)i(e);else if(!s){let t=e.getOptions()._flushInterval??gc;t>0&&(s=!0,o=$o(setTimeout(()=>{i(e)},t)))}}),e.on(`flush`,()=>{i(e)})}var Sc=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Js(e.transportOptions?.bufferSize??64),this._dataCollection=dc(e),e.dsn?this._dsn=sr(e.dsn):r&&x.warn(`No DSN provided, client will not send events.`),this._dsn){let t=rs(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&xc(this,`afterCaptureLog`,`flushLogs`,kc,ks),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&xc(this,`afterCaptureMetric`,`flushMetrics`,Oc,Hs)}captureException(e,t,n){let i=mt();if(bt(e))return r&&x.log(fc),i;let a={event_id:i,...t};return this._process(()=>this.eventFromException(e,a).then(e=>this._captureEvent(e,a,n)).then(e=>e),`error`),a.event_id}captureMessage(e,t,n,r){let i={event_id:mt(),...n},a=we(e)?e:String(e),o=Te(e),s=o?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(()=>s.then(e=>this._captureEvent(e,i,r)),o?`unknown`:`error`),i.event_id}captureEvent(e,t,n){let i=mt();if(t?.originalException&&bt(t.originalException))return r&&x.log(fc),i;let a={event_id:i,...t},o=e.sdkProcessingMetadata||{},s=o.capturedSpanScope,c=o.capturedSpanIsolationScope,l=Cc(e.type);return this._process(()=>this._captureEvent(e,a,s||n,c),l),a.event_id}captureSession(e){this.sendSession(e),At(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){let t=this._transport;if(this.emit(`flush`),!t)return!0;let n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){let t=await this.flush(e);return this.getOptions().enabled=!1,this.emit(`close`),t}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]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){let t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),us(this,e,this._integrations),t||ls(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=Ks(e,this),r=Bi(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])r=Ci(r,Mi(e));n&&(r=Ci(r,n)),this.sendEnvelope(r).then(t=>this.emit(`afterSendEvent`,e,t))}sendSession(e){let{release:t,environment:n=pi}=this._options;if(`aggregates`in e){let i=e.attrs||{};if(!i.release&&!t){r&&x.warn(pc);return}i.release=i.release||t,i.environment=i.environment||n,e.attrs=i}else{if(!e.release&&!t){r&&x.warn(pc);return}e.release=e.release||t,e.environment=e.environment||n}this.emit(`beforeSendSession`,e);let i=zi(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){let i=`${e}:${t}`;r&&x.log(`Recording outcome: "${i}"${n>1?` (${n} times)`:``}`),this._outcomes[i]=(this._outcomes[i]||0)+n}}on(e,t){let n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit(`beforeEnvelope`,e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(e){return r&&x.error(`Error while sending envelope:`,e),{}}return r&&x.error(`Transport disabled`),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=cs(this,e),ls(this,e)}_updateSessionFromEvent(e,t){let n=t.level===`fatal`,r=!1,i=t.exception?.values;if(i){r=!0,n=!1;for(let e of i)if(e.mechanism?.handled===!1){n=!0;break}}let a=e.status===`ok`;(a&&e.errors===0||a&&n)&&(At(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r){let i=this.getOptions(),a=this.getIntegrationNames();return!t.integrations&&a.length&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),xo(i,e,t,n,this,r).then(e=>e===null?e:(this.emit(`postprocessEvent`,e,t),e.contexts={trace:{...e.contexts?.trace,...hn(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:_i(this,n),...e.sdkProcessingMetadata},e))}_captureEvent(e,t={},n=k(),i=A()){return r&&Ec(e)&&x.log(`Captured error event \`${nc(e)[0]||`<unknown>`}\``),this._processEvent(e,t,n,i).then(e=>e.event_id,e=>{r&&(bc(e)?x.log(e.message):yc(e)?x.warn(e.message):x.warn(e))})}_processEvent(e,t,n,r){let i=this.getOptions(),{sampleRate:a}=i,o=Dc(e),s=Ec(e),c=`before send for type \`${e.type||`error`}\``,l=a===void 0?void 0:cr(a);if(s&&typeof l==`number`&&Ve()>l)return this.recordDroppedEvent(`sample_rate`,`error`),uo(vc(`Discarding event because it's not included in the random sample (sampling rate = ${a})`));let u=Cc(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(e===null)throw this.recordDroppedEvent(`event_processor`,u),vc("An event processor returned `null`, will not send event.");return t.data?.__sentry__===!0?e:wc(Tc(this,i,e,t),c)}).then(i=>{if(i===null){if(this.recordDroppedEvent(`before_send`,u),o){let t=1+(e.spans||[]).length;this.recordDroppedEvent(`before_send`,`span`,t)}throw vc(`${c} returned \`null\`, will not send event.`)}let a=n.getSession()||r.getSession();if(s&&a&&this._updateSessionFromEvent(a,i),o){let e=(i.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let l=i.transaction_info;return o&&l&&i.transaction!==e.transaction&&(i.transaction_info={...l,source:`custom`}),this.sendEvent(i,t),i}).then(null,e=>{throw bc(e)||yc(e)?e:(this.captureException(e,{mechanism:{handled:!1,type:`internal`},data:{__sentry__:!0},originalException:e}),_c(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
10
|
+
Reason: ${e}`))})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===qs&&this.recordDroppedEvent(`queue_overflow`,t),e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}})}_flushOutcomes(){r&&x.log(`Flushing outcomes...`);let e=this._clearOutcomes();if(e.length===0){r&&x.log(`No outcomes to send`);return}if(!this._dsn){r&&x.log(`No dsn provided, will not send outcomes`);return}r&&x.log(`Sending outcomes:`,e);let t=tc(e,this._options.tunnel&&tr(this._dsn));this.sendEnvelope(t)}};function Cc(e){return e===`replay_event`?`replay`:e||`error`}function wc(e,t){let n=`${t} must return \`null\` or a valid event.`;if(Ae(e))return e.then(e=>{if(!Ee(e)&&e!==null)throw _c(n);return e},e=>{throw _c(`${t} rejected with ${e}`)});if(!Ee(e)&&e!==null)throw _c(n);return e}function Tc(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,ignoreSpans:o}=t,s=!xi(t.beforeSendSpan)&&t.beforeSendSpan,c=n;if(Ec(c)&&i)return i(c,r);if(Dc(c)){if(s||o){let t=rc(c);if(o?.length&&qr({description:t.description,op:t.op,attributes:t.data},o))return null;if(s){let e=s(t);e?c=Nt(n,ic(e)):Vr()}if(c.spans){let t=[],n=c.spans;for(let e of n){if(o?.length&&qr({description:e.description,op:e.op,attributes:e.data},o)){Yr(n,e);continue}if(s){let n=s(e);n?t.push(n):(Vr(),t.push(e))}else t.push(e)}let r=c.spans.length-t.length;r&&e.recordDroppedEvent(`before_send`,`span`,r),c.spans=t}}if(a){if(c.spans){let e=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(c,r)}}return c}function Ec(e){return e.type===void 0}function Dc(e){return e.type===`transaction`}function Oc(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Ac(e.attributes)}function kc(e){let t=0;return e.message&&(t+=e.message.length*2),t+Ac(e.attributes)}function Ac(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*jc(e[0]):Te(e)?t+=jc(e):t+=100}),t}function jc(e){return typeof e==`string`?e.length*2:typeof e==`number`?8:typeof e==`boolean`?4:0}function Mc(e,t){t.debug===!0&&(r?x.enable():f(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),k().update(t.initialScope);let n=new e(t);return Nc(n),n.init(),n}function Nc(e){k().setClient(e)}var Pc=5e3,Fc=36e5;function Ic(e){function t(...e){r&&x.log(`[Offline]:`,...e)}return n=>{let r=e(n);if(!n.createStore)throw Error("No `createStore` function was provided");let i=n.createStore(n),a=Pc,o;function s(e,t,r){return Ti(e,[`client_report`])?!1:!n.shouldStore||n.shouldStore(e,t,r)}function c(e){o&&clearTimeout(o),o=$o(setTimeout(async()=>{o=void 0;let e=await i.shift();e&&(t(`Attempting to send previously queued event`),e[0].sent_at=new Date(He()).toISOString(),u(e,!0).catch(e=>{t(`Failed to retry sending`,e)}))},e))}function l(){o||(c(a),a=Math.min(a*2,Fc))}async function u(e,o=!1){if(!o&&Ti(e,[`replay_event`,`replay_recording`]))return await i.push(e),c(100),{};try{if(n.shouldSend&&await n.shouldSend(e)===!1)throw Error("Envelope not sent because `shouldSend` callback returned false");let t=await r.send(e),i=100;if(t){if(t.headers?.[`retry-after`])i=Xs(t.headers[`retry-after`]);else if(t.headers?.[`x-sentry-rate-limits`])i=6e4;else if((t.statusCode||0)>=400)return t}return c(i),a=Pc,t}catch(n){if(await s(e,n,a))return o?await i.unshift(e):await i.push(e),l(),t(`Error sending. Event queued.`,n),{};throw n}}return n.flushAtStartup&&l(),{send:u,flush:e=>(e===void 0&&(a=Pc,c(100)),r.flush(e))}}}var Lc=`MULTIPLEXED_TRANSPORT_EXTRA_KEY`;function Rc(e,t){let n;return wi(e,(e,r)=>(t.includes(r)&&(n=Array.isArray(e)?e[1]:void 0),!!n)),n}function zc(e,t){return n=>{let r=e(n);return{...r,send:async e=>{let n=Rc(e,[`event`,`transaction`,`profile`,`replay_event`]);return n&&(n.release=t),r.send(e)}}}}function Bc(e,t){return Si(t?{...e[0],dsn:t}:e[0],e[1])}function Vc(e,t){return n=>{let r=e(n),i=new Map,a=t||(e=>{let t=e.getEvent();return t?.extra?.MULTIPLEXED_TRANSPORT_EXTRA_KEY&&Array.isArray(t.extra.MULTIPLEXED_TRANSPORT_EXTRA_KEY)?t.extra.MULTIPLEXED_TRANSPORT_EXTRA_KEY:[]});function o(t,r){let a=r?`${t}:${r}`:t,o=i.get(a);if(!o){let s=nr(t);if(!s)return;let c=rs(s,n.tunnel);o=r?zc(e,r)({...n,url:c}):e({...n,url:c}),i.set(a,o)}return[t,o]}async function s(e){function t(t){return Rc(e,t?.length?t:[`event`])}let n=a({envelope:e,getEvent:t}).map(e=>typeof e==`string`?o(e,void 0):o(e.dsn,e.release)).filter(e=>!!e),i=n.length?n:[[``,r]];return(await Promise.all(i.map(([t,n])=>n.send(Bc(e,t)))))[0]}async function c(e){let t=[...i.values(),r];return(await Promise.all(t.map(t=>t.flush(e)))).every(e=>e)}return{send:s,flush:c}}}function Hc(e,t){return t.some(t=>e.includes(t))}function Uc(e,t,n){if(t===!1)return{};let r=n==null?sc:[...sc,...n],i={};if(t===!0){for(let t of Object.keys(e))i[t]=Hc(t.toLowerCase(),r)?ac:e[t];return i}if(`deny`in t){let n=t.deny.map(e=>e.toLowerCase());for(let t of Object.keys(e)){let a=t.toLowerCase();i[t]=Hc(a,r)||n.some(e=>a.includes(e))?ac:e[t]}return i}let a=t.allow.map(e=>e.toLowerCase());for(let t of Object.keys(e)){let n=t.toLowerCase();Hc(n,r)?i[t]=ac:i[t]=a.some(e=>n.includes(e))?e[t]:ac}return i}function Wc(e){let t={},n=0;for(;n<e.length;){let r=e.indexOf(`=`,n);if(r===-1)break;let i=e.indexOf(`;`,n);if(i===-1)i=e.length;else if(i<r){n=e.lastIndexOf(`;`,r-1)+1;continue}let a=e.slice(n,r).trim();if(t[a]===void 0){let n=e.slice(r+1,i).trim();n.charCodeAt(0)===34&&(n=n.slice(1,-1));try{t[a]=n.indexOf(`%`)===-1?n:decodeURIComponent(n)}catch{t[a]=n}}n=i+1}return t}function Gc(e,t){if(t===!1)return{};try{let n=Wc(e);return Object.keys(n).length===0?{}:Uc(n,t,cc)}catch{return ac}}var Kc=`thismessage:/`;function qc(e){return`isRelative`in e}function Jc(e,t){let n=e.indexOf(`://`)<=0&&e.indexOf(`//`)!==0,r=t??(n?Kc:void 0);try{if(`canParse`in URL&&!URL.canParse(e,r))return;let t=new URL(e,r);return n?{isRelative:n,pathname:t.pathname,search:t.search,hash:t.hash}:t}catch{}}function Yc(e){if(qc(e))return e.pathname;let t=new URL(e);return t.search=``,t.hash=``,[`80`,`443`].includes(t.port)&&(t.port=``),t.password&&=`%filtered%`,t.username&&=`%filtered%`,t.toString()}function Xc(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let 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}}function Zc(e){return e.split(/[?#]/,1)[0]}function Qc(e,t=!0){if(e.startsWith(`data:`)){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:`text/plain`,i=e.includes(`;base64,`),a=e.indexOf(`,`),o=``;if(t&&a!==-1){let t=e.slice(a+1);o=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?`,base64`:``}${o?`,${o}`:``}`}return e}function $c(e,t){let n=t?.getDsn(),r=t?.getOptions().tunnel;return tl(e,n)||el(e,r)}function el(e,t){return t?rl(e)===rl(t):!1}function tl(e,t){let n=Jc(e);return!n||qc(n)||!t?!1:nl(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function nl(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function rl(e){return e[e.length-1]===`/`?e.slice(0,-1):e}function il(e,...t){let n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join(`\0`).replace(/%/g,`%%`).replace(/\0/g,`%s`),n.__sentry_template_values__=t,n}var al=il;function ol(e){`aggregates`in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:`{{auto}}`}):e.ipAddress===void 0&&(e.ipAddress=`{{auto}}`)}function sl(e,t,n=[t],r=`npm`){let i=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${t}`,i.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:a})),i.version=a)}function cl(e={}){let t=e.client||j();if(!qo()||!t)return{};let n=tn(o());if(n.getTraceData)return n.getTraceData(e);let r=e.scope||k(),i=e.span||Br(),a=$r(i)&&!Gr(t.getOptions());if(!i&&dn())return{};let s=i&&!a?yr(i):ll(r),c=Jn(i?vi(i):_i(t,r));if(!lr.test(s))return x.warn(`Invalid sentry-trace data. Cannot generate trace data`),{};let l={"sentry-trace":s,baggage:c};return e.propagateTraceparent&&(l.traceparent=i&&!a?br(i):ul(r)),l}function ll(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return fr(t,r,n)}function ul(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return pr(t,r,n)}var dl=100;function fl(e,t){let n=j(),r=A();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=dl}=n.getOptions();if(a<=0)return;let o={timestamp:Ct(),...e},s=i?f(()=>i(o,t)):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}var pl,ml=`FunctionToString`,hl=new WeakMap,gl=R((()=>({name:ml,setupOnce(){pl=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Fe(this),n=hl.has(j())&&t!==void 0?t:this;return pl.apply(n,e)}}catch{}},setup(e){hl.set(e,!0)}}))),_l=[/^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/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],vl=`EventFilters`,yl=R((e={})=>{let t;return{name:vl,setup(n){t=xl(e,n.getOptions())},processEvent(n,r,i){return t||=xl(e,i.getOptions()),Sl(n,t)?null:n}}}),bl=R(((e={})=>({...yl(e),name:`InboundFilters`})));function xl(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:_l],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Sl(e,t){if(!e.type){if(Cl(e,t.ignoreErrors))return r&&x.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
11
|
+
Event: ${gt(e)}`),!0;if(kl(e))return r&&x.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
12
|
+
Event: ${gt(e)}`),!0;if(Tl(e,t.denyUrls))return r&&x.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
13
|
+
Event: ${gt(e)}.
|
|
14
|
+
Url: ${Ol(e)}`),!0;if(!El(e,t.allowUrls))return r&&x.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
15
|
+
Event: ${gt(e)}.
|
|
16
|
+
Url: ${Ol(e)}`),!0}else if(e.type===`transaction`&&wl(e,t.ignoreTransactions))return r&&x.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
17
|
+
Event: ${gt(e)}`),!0;return!1}function Cl(e,t){return t?.length?nc(e).some(e=>ut(e,t)):!1}function wl(e,t){if(!t?.length)return!1;let n=e.transaction;return n?ut(n,t):!1}function Tl(e,t){if(!t?.length)return!1;let n=Ol(e);return n?ut(n,t):!1}function El(e,t){if(!t?.length)return!0;let n=Ol(e);return!n||ut(n,t)}function Dl(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}function Ol(e){try{let t=[...e.exception?.values??[]].reverse().find(e=>e.mechanism?.parent_id===void 0&&e.stacktrace?.frames?.length)?.stacktrace?.frames;return t?Dl(t):null}catch{return r&&x.error(`Cannot extract url for event ${gt(e)}`),null}}function kl(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&e.type!==`Error`||e.value):!1}function Al(e,t,n,r,i,a){if(!i.exception?.values||!a||!je(a.originalException,Error))return;let o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=jl(e,t,r,a.originalException,n,i.exception.values,o,0))}function jl(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(je(r[i],Error)){Nl(o,s,r);let a=e(t,r[i]),l=c.length;Pl(a,i,l,s),c=jl(e,t,n,r[i],i,[a,...c],a,l)}return Ml(r)&&r.errors.forEach((a,l)=>{if(je(a,Error)){Nl(o,s,r);let u=e(t,a),d=c.length;Pl(u,`errors[${l}]`,d,s),c=jl(e,t,n,a,i,[u,...c],u,d)}}),c}function Ml(e){return Array.isArray(e.errors)}function Nl(e,t,n){e.mechanism={handled:!0,type:`auto.core.linked_errors`,...Ml(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Pl(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}function Fl(e){return ve(e)&&`__sentry_fetch_url_host__`in e&&typeof e.__sentry_fetch_url_host__==`string`}function Il(e){return Fl(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}var Ll=new Map,Rl=new Set;function zl(e){if(i._sentryModuleMetadata)for(let t of Object.keys(i._sentryModuleMetadata)){let n=i._sentryModuleMetadata[t];if(Rl.has(t))continue;Rl.add(t);let r=e(t);for(let e of r.reverse())if(e.filename){Ll.set(e.filename,n);break}}}function Bl(e,t){return zl(e),Ll.get(t)}function Vl(e,t){t.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(t=>{if(!t.filename||t.module_metadata)return;let n=Bl(e,t.filename);n&&(t.module_metadata=n)})})}function Hl(e){e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{delete e.module_metadata})})}var Ul=R(()=>({name:`ModuleMetadata`,setup(e){e.on(`beforeEnvelope`,e=>{wi(e,(e,t)=>{if(t===`event`){let t=Array.isArray(e)?e[1]:void 0;t&&(Hl(t),e[1]=t)}})}),e.on(`applyFrameMetadata`,t=>{if(t.type)return;let n=e.getOptions().stackParser;Vl(n,t)})}})),Wl=new Set([]);function Gl(e){let t=`console`,n=ce(t,e);return le(t,Kl),n}function Kl(){`console`in i&&l.forEach(function(e){e in i.console&&Ne(i.console,e,function(t){return d[e]=t,function(...t){let n=t[0],a=d[e],o=Wl.size&&typeof n==`string`&&ut(n,Wl);o||ue(`console`,{args:t,level:e}),(!o||r&&x.isEnabled())&&a?.apply(i.console,t)}})})}function ql(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var Jl=`CaptureConsole`,Yl=R(((e={})=>{let t=e.levels||l,n=e.handled??!0;return{name:Jl,setup(e){`console`in i&&Gl(({args:r,level:i})=>{j()!==e||!t.includes(i)||Xl(r,i,n)})}}}));function Xl(e,t,n){let r=ql(t),i=Error(),a={level:ql(t),extra:{arguments:e}};pn(o=>{if(o.addEventProcessor(e=>(e.logger=`console`,vt(e,{handled:n,type:`auto.core.capture_console`}),e)),t===`assert`){if(!e[0]){let t=`Assertion failed: ${ct(e.slice(1),` `)||`console.assert`}`;o.setExtra(`arguments`,e.slice(1)),o.captureMessage(t,r,{captureContext:a,syntheticException:i})}return}let s=e.find(e=>e instanceof Error);if(s){L(s,a);return}let c=ct(e,` `);o.captureMessage(c,r,{captureContext:a,syntheticException:i})})}var Zl=`Dedupe`,Ql=R((()=>{let e;return{name:Zl,processEvent(t){if(t.type)return t;try{if($l(t,e))return r&&x.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}}));function $l(e,t){return t?!!(eu(e,t)||tu(e,t)):!1}function eu(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!ru(e,t)||!nu(e,t))}function tu(e,t){let n=iu(t),r=iu(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!ru(e,t)||!nu(e,t))}function nu(e,t){let n=ae(e),r=ae(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function ru(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join(``)===r.join(``)}catch{return!1}}function iu(e){return e.exception?.values?.[0]}var au=`ExtraErrorData`,ou=R(((e={})=>{let{depth:t=3,captureErrorCause:n=!0}=e;return{name:au,processEvent(e,r,i){let{maxValueLength:a}=i.getOptions();return su(e,r,t,n,a)}}}));function su(e,t={},n,r,i){if(!t.originalException||!ve(t.originalException))return e;let a=t.originalException.name||t.originalException.constructor.name,o=cu(t.originalException,r,i);if(o){let t={...e.contexts},r=Ze(o,n);return Ee(r)&&(Ge(r),t[a]=r),{...e,contexts:t}}return e}function cu(e,t,n){try{let r=[`name`,`message`,`stack`,`line`,`column`,`fileName`,`lineNumber`,`columnNumber`,`toJSON`],i={};for(let t of Object.keys(e)){if(r.indexOf(t)!==-1)continue;let a=e[t];i[t]=ve(a)||typeof a==`string`?n?ot(`${a}`,n):`${a}`:a}if(t&&e.cause!==void 0&&(ve(e.cause)?i.cause={[e.cause.name||e.cause.constructor.name]:cu(e.cause,!1,n)}:i.cause=e.cause),typeof e.toJSON==`function`){let t=e.toJSON();for(let e of Object.keys(t)){let n=t[e];i[e]=ve(n)?n.toString():n}}return i}catch(e){r&&x.error(`Unable to extract extra data from the Error object:`,e)}return null}function lu(e,t){let n=0;for(let t=e.length-1;t>=0;t--){let r=e[t];r===`.`?e.splice(t,1):r===`..`?(e.splice(t,1),n++):n&&(e.splice(t,1),n--)}if(t)for(;n--;)e.unshift(`..`);return e}var uu=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function du(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=uu.exec(t);return n?n.slice(1):[]}function fu(...e){let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:`/`;i&&(t=`${i}/${t}`,n=i.charAt(0)===`/`)}return t=lu(t.split(`/`).filter(e=>!!e),!n).join(`/`),(n?`/`:``)+t||`.`}function pu(e){let t=0;for(;t<e.length&&e[t]===``;t++);let n=e.length-1;for(;n>=0&&e[n]===``;n--);return t>n?[]:e.slice(t,n-t+1)}function mu(e,t){e=fu(e).slice(1),t=fu(t).slice(1);let n=pu(e.split(`/`)),r=pu(t.split(`/`)),i=Math.min(n.length,r.length),a=i;for(let e=0;e<i;e++)if(n[e]!==r[e]){a=e;break}let o=[];for(let e=a;e<n.length;e++)o.push(`..`);return o=o.concat(r.slice(a)),o.join(`/`)}function hu(e,t){let n=du(e)[2]||``;return t&&n.slice(t.length*-1)===t&&(n=n.slice(0,n.length-t.length)),n}var gu=`RewriteFrames`,_u=R((e={})=>{let t=e.root,n=e.prefix||`app:///`,r=`window`in i&&!!i.window,a=e.iteratee||vu({isBrowser:r,root:t,prefix:n});function o(e){try{return{...e,exception:{...e.exception,values:e.exception.values.map(e=>({...e,...e.stacktrace&&{stacktrace:s(e.stacktrace)}}))}}}catch{return e}}function s(e){return{...e,frames:e?.frames?.map(e=>a(e))}}return{name:gu,processEvent(e){let t=e;return e.exception&&Array.isArray(e.exception.values)&&(t=o(t)),t}}});function vu({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;let i=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes(`\\`)&&!r.filename.includes(`/`),a=/^\//.test(r.filename);if(e){if(t){let e=r.filename;e.indexOf(t)===0&&(r.filename=e.replace(t,n))}}else if(i||a){let e=i?r.filename.replace(/^[a-zA-Z]:/,``).replace(/\\/g,`/`):r.filename;r.filename=`${n}${t?mu(t,e):hu(e)}`}return r}}var yu=[`reauthenticate`,`signInAnonymously`,`signInWithOAuth`,`signInWithIdToken`,`signInWithOtp`,`signInWithPassword`,`signInWithSSO`,`signOut`,`signUp`,`verifyOtp`],bu=[`createUser`,`deleteUser`,`listUsers`,`getUserById`,`updateUserById`,`inviteUserByEmail`],xu={eq:`eq`,neq:`neq`,gt:`gt`,gte:`gte`,lt:`lt`,lte:`lte`,like:`like`,"like(all)":`likeAllOf`,"like(any)":`likeAnyOf`,ilike:`ilike`,"ilike(all)":`ilikeAllOf`,"ilike(any)":`ilikeAnyOf`,is:`is`,in:`in`,cs:`contains`,cd:`containedBy`,sr:`rangeGt`,nxl:`rangeGte`,sl:`rangeLt`,nxr:`rangeLte`,adj:`rangeAdjacent`,ov:`overlaps`,fts:``,plfts:`plain`,phfts:`phrase`,wfts:`websearch`,not:`not`},Su=[`select`,`insert`,`upsert`,`update`,`delete`];function Cu(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function wu(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function Tu(e,t){if(Object.keys(t).length>0)return t;if(Array.isArray(e)&&e.length>0)return e}function Eu(e,t){return Tu(e,t)!==void 0}function Du(e,t={}){switch(e){case`GET`:return`select`;case`POST`:return t.Prefer?.includes(`resolution=`)?`upsert`:`insert`;case`PATCH`:return`update`;case`DELETE`:return`delete`;default:return`<unknown-op>`}}function Ou(e,t){if(t===``||t===`*`)return`select(*)`;if(e===`select`)return`select(${t})`;if(e===`or`||e.endsWith(`.or`))return`${e}${t}`;let[n,...r]=t.split(`.`),i;return i=n?.startsWith(`fts`)?`textSearch`:n?.startsWith(`plfts`)?`textSearch[plain]`:n?.startsWith(`phfts`)?`textSearch[phrase]`:n?.startsWith(`wfts`)?`textSearch[websearch]`:n&&xu[n]||`filter`,`${i}(${e}, ${r.join(`.`)})`}function ku(e,t=!1){return new Proxy(e,{apply(n,r,i){return ia({name:`auth ${t?`(admin) `:``}${e.name}`,attributes:{[P]:`auto.db.supabase`,[N]:`db`,"db.system":`postgresql`,"db.operation":`auth.${t?`admin.`:``}${e.name}`}},e=>Reflect.apply(n,r,i).then(t=>(De(t)&&`error`in t&&t.error?(e.setStatus({code:2}),L(t.error,{mechanism:{handled:!1,type:`auto.db.supabase.auth`}})):e.setStatus({code:1}),e.end(),t)).catch(t=>{throw e.setStatus({code:2}),e.end(),L(t,{mechanism:{handled:!1,type:`auto.db.supabase.auth`}}),t}).then(...i))}})}function Au(e){let t=e.auth;if(!(!t||wu(e.auth))){for(let n of yu){let r=t[n];r&&typeof e.auth[n]==`function`&&(e.auth[n]=ku(r))}for(let n of bu){let r=t.admin[n];r&&typeof e.auth.admin[n]==`function`&&(e.auth.admin[n]=ku(r,!0))}Cu(e.auth)}}function ju(e,t){wu(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(e,n,r){let i=Reflect.apply(e,n,r),a=i.constructor;return Nu(a,t),i}}),Cu(e.prototype.from))}function Mu(e,t){wu(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(e,n,r){let i=Su,a=n,o=Du(a.method,a.headers);if(!i.includes(o)||!a?.url?.pathname||typeof a.url.pathname!=`string`)return Reflect.apply(e,n,r);let s=a.url.pathname.split(`/`),c=s.length>0?s[s.length-1]:``,l=[];for(let[e,t]of a.url.searchParams.entries())l.push(Ou(e,t));let u=Object.create(null);if(Ee(a.body))for(let[e,t]of Object.entries(a.body))u[e]=t;let d=j(),f=t.sendOperationData??d?.getDataCollectionOptions().databaseQueryData===!0,p=Tu(a.body,u),m=o===`select`?``:`${o}${Eu(a.body,u)?`(...) `:``}`,h=f?l.join(` `):l.length>0?`[redacted]`:``,g=[m.trimEnd(),h].filter(Boolean).join(` `),_=g?`${g} from(${c})`:`from(${c})`,v={"db.table":c,"db.schema":a.schema,"db.url":a.url.origin,"db.sdk":a.headers[`X-Client-Info`],"db.system":`postgresql`,"db.operation":o,[P]:`auto.db.supabase`,[N]:`db`};return l.length&&f&&(v[`db.query`]=l),p!==void 0&&f&&(v[`db.body`]=p),ia({name:_,attributes:v},t=>Reflect.apply(e,n,[]).then(e=>{if(t&&(e&&typeof e==`object`&&`status`in e&&Fn(t,e.status||500),t.end()),e?.error){let t=Error(e.error.message);e.error.code&&(t.code=e.error.code),e.error.details&&(t.details=e.error.details);let n={};l.length&&f&&(n.query=l),p!==void 0&&f&&(n.body=p),L(t,e=>(e.addEventProcessor(e=>(vt(e,{handled:!1,type:`auto.db.supabase.postgres`}),e)),e.setContext(`supabase`,n),e))}let n={type:`supabase`,category:`db.${o}`,message:_},r={};return l.length&&f&&(r.query=l),p!==void 0&&f&&(r.body=p),Object.keys(r).length&&(n.data=r),fl(n),e},e=>{throw t&&(Fn(t,500),t.end()),e}).then(...r))}}),Cu(e.prototype.then))}function Nu(e,t){for(let n of Su)wu(e.prototype[n])||(e.prototype[n]=new Proxy(e.prototype[n],{apply(e,i,a){let o=Reflect.apply(e,i,a),s=o.constructor;return r&&x.log(`Instrumenting ${n} operation's PostgRESTFilterBuilder`),Mu(s,t),o}}),Cu(e.prototype[n]))}var Pu=(e,t={})=>{if(!e){r&&x.warn(`Supabase integration was not installed because no Supabase client was provided.`);return}ju(e.constructor===Function?e:e.constructor,t),Au(e)},Fu=`Supabase`,Iu=((e,t)=>({setupOnce(){Pu(e,t)},name:Fu})),Lu=R(e=>Iu(e.supabaseClient,{sendOperationData:e.sendOperationData})),Ru=10,zu=`ZodErrors`;function Bu(e){return ve(e)&&e.name===`ZodError`&&Array.isArray(e.issues)}function Vu(e){return{...e,path:`path`in e&&Array.isArray(e.path)?e.path.join(`.`):void 0,keys:`keys`in e?JSON.stringify(e.keys):void 0,unionErrors:`unionErrors`in e?JSON.stringify(e.unionErrors):void 0}}function Hu(e){return e.map(e=>typeof e==`number`?`<array>`:e).join(`.`)}function Uu(e){let t=new Set;for(let n of e.issues){let e=Hu(n.path);e.length>0&&t.add(e)}let n=Array.from(t);if(n.length===0){let t=`variable`;if(e.issues.length>0){let n=e.issues[0];n!==void 0&&`expected`in n&&typeof n.expected==`string`&&(t=n.expected)}return`Failed to validate ${t}`}return`Failed to validate keys: ${ot(n.join(`, `),100)}`}function Wu(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!Bu(r.originalException)||r.originalException.issues.length===0)return n;try{let i=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(Vu);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:`zod_issues.json`,data:JSON.stringify({issues:i})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:Uu(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":i.slice(0,e)}}}catch(e){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:`an exception was thrown while processing ZodError within applyZodErrorsToEvent()`,error:e instanceof Error?`${e.name}: ${e.message}
|
|
18
|
+
${e.stack}`:`unknown`}}}}}var Gu=R(((e={})=>{let t=e.limit??Ru;return{name:zu,processEvent(n,r){return Wu(t,e.saveZodIssuesAsAttachment,n,r)}}})),Ku=R(e=>({name:`ThirdPartyErrorsFilter`,setup(e){e.on(`beforeEnvelope`,e=>{wi(e,(e,t)=>{if(t===`event`){let t=Array.isArray(e)?e[1]:void 0;t&&(Hl(t),e[1]=t)}})}),e.on(`applyFrameMetadata`,t=>{if(t.type)return;let n=e.getOptions().stackParser;Vl(n,t)})},preprocessEvent(t){e.ignoreSentryInternalFrames&&(i._sentryWrappedDepth??0)>0&&(t.sdkProcessingMetadata={...t.sdkProcessingMetadata,insideSentryWrapped:!0})},processEvent(t){let n=e.ignoreSentryInternalFrames?t.sdkProcessingMetadata?.insideSentryWrapped===!0&&t.exception?.values?.length===1:!1,r=Ju(t,e.ignoreSentryInternalFrames,n);if(r&&r[e.behaviour===`drop-error-if-contains-third-party-frames`||e.behaviour===`apply-tag-if-contains-third-party-frames`?`some`:`every`](t=>!t.some(t=>e.filterKeys.includes(t)))){if(e.behaviour===`drop-error-if-contains-third-party-frames`||e.behaviour===`drop-error-if-exclusively-contains-third-party-frames`)return null;t.tags={...t.tags,third_party_code:!0}}return t}}));function qu(e,t,n){if(t!==0)return!1;if(n&&Yu(e)||e.function===`sentryWrapped`)return!0;if(!e.context_line||!e.filename||!e.filename.includes(`sentry`)||!e.filename.includes(`helpers`)||!e.context_line.includes(Qu))return!1;if(e.pre_context){let t=e.pre_context.length;for(let n=0;n<t;n++)if(e.pre_context[n]?.includes(Zu))return!0}return!1}function Ju(e,t,n){let r=ae(e);if(r)return r.filter((e,r)=>!e.filename||e.lineno==null&&e.colno==null&&e.instruction_addr==null?!1:!t||!qu(e,r,!!n)).map(e=>e.module_metadata?Object.keys(e.module_metadata).filter(e=>e.startsWith(Xu)).map(e=>e.slice(Xu.length)):[])}function Yu(e){return!e.context_line&&!e.pre_context&&!!e.function&&e.function.length<=2}var Xu=`_sentryBundlerPluginAppKey:`,Zu=`Attempt to invoke user-land function`,Qu=`fn.apply(this, wrappedArguments)`,$u=`flag.evaluation.`;function ed(e){if(e.type)return e;let t=k().getScopeData().contexts.flags,n=t?t.values:[];return n.length?(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...n]},e):e}function td(e,t,n=100){let r=k().getScopeData().contexts;r.flags||={values:[]};let i=r.flags.values;nd(i,e,t,n)}function nd(e,t,n,i){if(typeof n!=`boolean`)return;if(e.length>i){r&&x.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${i}`);return}let a=e.findIndex(e=>e.flag===t);a!==-1&&e.splice(a,1),e.length===i&&e.shift(),e.push({flag:t,result:n})}function rd(e,t,n=10){if(typeof t!=`boolean`)return;let r=Br();if(!r)return;let i=F(r).data;if(`${$u}${e}`in i){r.setAttribute(`${$u}${e}`,t);return}Object.keys(i).filter(e=>e.startsWith($u)).length<n&&r.setAttribute(`${$u}${e}`,t)}var id=R(()=>({name:`FeatureFlags`,processEvent(e,t,n){return ed(e)},addFeatureFlag(e,t){td(e,t),rd(e,t)}})),ad=R(({growthbookClass:e})=>({name:`GrowthBook`,setupOnce(){let t=e.prototype;typeof t.isOn==`function`&&Ne(t,`isOn`,od),typeof t.getFeatureValue==`function`&&Ne(t,`getFeatureValue`,od)},processEvent(e,t,n){return ed(e)}}));function od(e){return function(...t){let n=t[0],r=e.apply(this,t);return typeof n==`string`&&typeof r==`boolean`&&(td(n,r),rd(n,r)),r}}var sd=`ConversationId`,cd=R((()=>({name:sd,setup(e){e.on(`spanStart`,e=>{let t=k().getScopeData(),n=A().getScopeData(),r=t.conversationId||n.conversationId;if(r){let{op:t,data:n,description:i}=F(e);if(!t?.startsWith(`gen_ai.`)&&!n[`ai.operationId`]&&!i?.startsWith(`ai.`))return;e.setAttribute(Nn,r)}})}})));function ld(e,t,n,r,i){if(!e.fetchData)return;let{method:a,url:o}=e.fetchData,s=Gr()&&t(o);if(e.endTimestamp){let t=e.fetchData.__span;if(!t)return;let n=r[t];n&&(s&&(fd(n,e),ud(n,e,i)),delete r[t]);return}let{spanOrigin:c=`auto.http.browser`,propagateTraceparent:l=!1}=typeof i==`object`?i:{spanOrigin:i},u=j(),d=!!Br(),f=d||!!u&&qi(u),p=s&&f?oa(gd(o,a,c)):new Qr,m=Sa(p)&&d?void 0:p;if(s&&!f&&u?.recordDroppedEvent(`no_parent_span`,`span`),e.fetchData.__span=p.spanContext().spanId,r[p.spanContext().spanId]=p,n(e.fetchData.url)){let t=e.args[0],n={...e.args[1]||{}},r=dd(t,n,Gr()&&f?m:void 0,l);r&&(e.args[1]=n,n.headers=r)}if(u){let t={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};u.emit(`beforeOutgoingRequestSpan`,p,t)}return p}function ud(e,t,n){(typeof n==`object`&&n?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function dd(e,t,n,r){let i=cl({span:n,propagateTraceparent:r}),a=i[`sentry-trace`],o=i.baggage,s=i.traceparent;if(!a)return;let c=t.headers||(Me(e)?e.headers:void 0);if(!c)return{...i};if(md(c)){let e=new Headers(c);if(e.get(`sentry-trace`)||e.set(`sentry-trace`,a),r&&s&&!e.get(`traceparent`)&&e.set(`traceparent`,s),o){let t=e.get(`baggage`);t?pd(t)||e.set(`baggage`,`${t},${o}`):e.set(`baggage`,o)}return e}else if(hd(c)){let e=[...c];e.find(e=>e[0]===`sentry-trace`)||e.push([`sentry-trace`,a]),r&&s&&!e.find(e=>e[0]===`traceparent`)&&e.push([`traceparent`,s]);let t=c.find(e=>e[0]===`baggage`&&typeof e[1]==`string`&&pd(e[1]));return o&&!t&&e.push([`baggage`,o]),e}else{let e=`sentry-trace`in c?c[`sentry-trace`]:void 0,t=`traceparent`in c?c.traceparent:void 0,n=`baggage`in c?c.baggage:void 0,i=n?Array.isArray(n)?[...n]:[n]:[],l=n&&(Array.isArray(n)?n.find(e=>pd(e)):pd(n));o&&!l&&i.push(o);let u=Object.assign({},c,{"sentry-trace":e??a,baggage:i.length>0?i.join(`,`):void 0});return r&&s&&!t&&(u.traceparent=s),u}}function fd(e,t){if(t.response){Fn(e,t.response.status);let n=t.response?.headers?.get(`content-length`);if(n){let t=parseInt(n);t>0&&e.setAttribute(`http.response_content_length`,t)}}else t.error&&e.setStatus({code:2,message:`internal_error`});e.end()}function pd(e){return typeof e==`string`&&e.split(`,`).some(e=>e.trim().startsWith(Kn))}function md(e){return typeof Headers<`u`&&je(e,Headers)}function hd(e){return Array.isArray(e)?e.every(e=>Array.isArray(e)&&e.length===2&&typeof e[0]==`string`):!1}function gd(e,t,n){if(e.startsWith(`data:`))return{name:`${t} ${Qc(e)}`,attributes:_d(e,void 0,t,n)};let r=Jc(e);return{name:`${t} ${r?Yc(r):e}`,attributes:_d(e,r,t,n)}}function _d(e,t,n,r){let i={url:Qc(e),type:`fetch`,"http.method":n,[P]:r,[N]:`http.client`};return t&&(qc(t)||(i[`http.url`]=Qc(t.href),i[`server.address`]=t.host),t.search&&(i[`http.query`]=t.search),t.hash&&(i[`http.fragment`]=t.hash)),i}function vd(e,t={},n=k()){let{message:r,name:i,email:a,url:o,source:s,associatedEventId:c,tags:l}=e,u={contexts:{feedback:{contact_email:a,name:i,message:r,url:o,source:s,associated_event_id:c}},type:`feedback`,level:`info`,tags:l},d=n?.getClient()||j();return d&&d.emit(`beforeSendFeedback`,u,t),n.captureEvent(u,t)}var yd=t({debug:()=>Sd,error:()=>Td,fatal:()=>Ed,fmt:()=>al,info:()=>Cd,trace:()=>xd,warn:()=>wd});function bd(e,t,n,r,i){Os({level:e,message:t,attributes:n,severityNumber:i},r)}function xd(e,t,{scope:n}={}){bd(`trace`,e,t,n)}function Sd(e,t,{scope:n}={}){bd(`debug`,e,t,n)}function Cd(e,t,{scope:n}={}){bd(`info`,e,t,n)}function wd(e,t,{scope:n}={}){bd(`warn`,e,t,n)}function Td(e,t,{scope:n}={}){bd(`error`,e,t,n)}function Ed(e,t,{scope:n}={}){bd(`fatal`,e,t,n)}function Dd(e,t,n){return`util`in i&&typeof i.util.format==`function`?i.util.format(...e):Od(e,t,n)}function Od(e,t,n){return e.map(e=>Te(e)?String(e):JSON.stringify(Ze(e,t,n))).join(` `)}function kd(e){return/%[sdifocO]/.test(e)}function Ad(e,t){let n={};return n[`sentry.message.template`]=`${e} ${Array(t.length).fill(`{}`).join(` `)}`,t.forEach((e,t)=>{n[`sentry.message.parameter.${t}`]=e}),n}var jd=`ConsoleLogs`,Md={[P]:`auto.log.console`},Nd=R(((e={})=>{let t=e.levels||l;return{name:jd,setup(e){let{enableLogs:n,normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e.getOptions();if(!n){r&&x.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}let o=Gl(({args:n,level:r})=>{if(j()!==e||!t.includes(r))return;let o=n[0],s=n.slice(1);if(r===`assert`){o||Os({level:`error`,message:s.length>0?`Assertion failed: ${Dd(s,i,a)}`:`Assertion failed`,attributes:Md});return}let c=r===`log`,l={...Md};if(Ee(o)){Object.assign(l,Ze(o,i,a));let e=typeof n[1]==`string`?2:1;n.slice(e).forEach((e,t)=>{l[`sentry.message.parameter.${t}`]=Ze(e,i,a)})}else if(s.length>0&&typeof o==`string`&&!kd(o)){let e=Ad(o,s);for(let[t,n]of Object.entries(e))l[t]=t.startsWith(`sentry.message.parameter.`)?Ze(n,i,a):n}Os({level:c?`info`:r,message:Dd(n,i,a),severityNumber:c?10:void 0,attributes:l})});e.registerCleanup(o)}}})),Pd=t({count:()=>Id,distribution:()=>Rd,gauge:()=>Ld});function Fd(e,t,n,r){Vs({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function Id(e,t=1,n){Fd(`counter`,e,t,n)}function Ld(e,t,n){Fd(`gauge`,e,t,n)}function Rd(e,t,n){Fd(`distribution`,e,t,n)}var zd=[`trace`,`debug`,`info`,`warn`,`error`,`fatal`];function Bd(e={}){let t=new Set(e.levels??zd),n=e.client;return{log(e){let{type:r,level:i,message:a,args:o,tag:s,date:c,...l}=e,u=n||j();if(!u)return;let d=Ud(r,i);if(!t.has(d))return;let{normalizeDepth:f=3,normalizeMaxBreadth:p=1e3}=u.getOptions(),m={};for(let[e,t]of Object.entries(l))m[e]=Ze(t,f,p);m[`sentry.origin`]=`auto.log.consola`,s&&(m[`consola.tag`]=s),r&&(m[`consola.type`]=r),i!=null&&typeof i==`number`&&(m[`consola.level`]=i);let h=Gd(Wd(o,f,p),f,p);h?.attributes&&Object.assign(m,h.attributes),Os({level:d,message:h?.message||a||o&&Dd(o,f,p)||``,attributes:m})}}}var Vd={silent:`trace`,fatal:`fatal`,error:`error`,warn:`warn`,log:`info`,info:`info`,success:`info`,fail:`error`,ready:`info`,start:`info`,box:`info`,debug:`debug`,trace:`trace`,verbose:`debug`,critical:`fatal`,notice:`info`},Hd={0:`fatal`,1:`warn`,2:`info`,3:`info`,4:`debug`,5:`trace`};function Ud(e,t){if(e===`verbose`)return`debug`;if(e===`silent`)return`trace`;if(e){let t=Vd[e];if(t)return t}if(typeof t==`number`){let e=Hd[t];if(e)return e}return`info`}function Wd(e,t,n){if(!e?.length)return{message:``};let r=Dd(e,t,n),i=e[0];if(Ee(i)){let t=typeof e[1]==`string`?2:1;return{message:r,attributes:i,messageParameters:e.slice(t)}}else{let t=e.slice(1),n=t.length>0&&typeof i==`string`&&!kd(i);return{message:r,messageTemplate:n?i:void 0,messageParameters:n?t:void 0}}}function Gd(e,t,n){let{message:r,attributes:i,messageTemplate:a,messageParameters:o}=e,s={};if(a&&o){let e=Ad(a,o);for(let[r,i]of Object.entries(e))s[r]=r.startsWith(`sentry.message.parameter.`)?Ze(i,t,n):i}else o&&o.length>0&&o.forEach((e,r)=>{s[`sentry.message.parameter.${r}`]=Ze(e,t,n)});return{message:r,attributes:{...Ze(i,t,n),...s}}}var Kd=`gen_ai.prompt`,qd=`gen_ai.system`,Jd=`gen_ai.request.model`,Yd=`gen_ai.request.stream`,Xd=`gen_ai.request.temperature`,Zd=`gen_ai.request.max_tokens`,Qd=`gen_ai.request.frequency_penalty`,$d=`gen_ai.request.presence_penalty`,ef=`gen_ai.request.top_p`,tf=`gen_ai.request.top_k`,nf=`gen_ai.request.encoding_format`,rf=`gen_ai.request.dimensions`,af=`gen_ai.response.finish_reasons`,of=`gen_ai.response.model`,sf=`gen_ai.response.id`,cf=`gen_ai.response.stop_reason`,lf=`gen_ai.usage.input_tokens`,uf=`gen_ai.usage.output_tokens`,df=`gen_ai.usage.total_tokens`,ff=`gen_ai.operation.name`,pf=`sentry.sdk_meta.gen_ai.input.messages.original_length`,mf=`gen_ai.input.messages`,hf=`gen_ai.system_instructions`,gf=`gen_ai.response.text`,_f=`gen_ai.request.available_tools`,vf=`gen_ai.response.streaming`,yf=`gen_ai.response.tool_calls`,bf=`gen_ai.agent.name`,xf=`gen_ai.pipeline.name`,Sf=`gen_ai.conversation.id`,Cf=`gen_ai.usage.cache_creation_input_tokens`,wf=`gen_ai.usage.cache_read_input_tokens`,Tf=`gen_ai.invoke_agent`,Ef=`gen_ai.embeddings.input`,Df=`gen_ai.embeddings`,Of=`gen_ai.execute_tool`,kf=`gen_ai.tool.name`,Af=`gen_ai.tool.call.id`,jf=`gen_ai.tool.type`,Mf=`gen_ai.tool.input`,Nf=`gen_ai.tool.output`,Pf=`gen_ai.tool.description`;function Ff(e){return!e||typeof e!=`object`?!1:Rf(e)||zf(e)||If(e)||Bf(e)||Vf(e)||Hf(e)||Uf(e)||Wf(e)||Gf(e)||Kf(e)||qf(e)||Jf(e)}function If(e){return`image_url`in e?typeof e.image_url==`string`?e.image_url.startsWith(`data:`):Lf(e):!1}function Lf(e){return`image_url`in e&&!!e.image_url&&typeof e.image_url==`object`&&`url`in e.image_url&&typeof e.image_url.url==`string`&&e.image_url.url.startsWith(`data:`)}function Rf(e){return`type`in e&&typeof e.type==`string`&&`source`in e&&Ff(e.source)}function zf(e){return`inlineData`in e&&!!e.inlineData&&typeof e.inlineData==`object`&&`data`in e.inlineData&&typeof e.inlineData.data==`string`}function Bf(e){return`type`in e&&e.type===`input_audio`&&`input_audio`in e&&!!e.input_audio&&typeof e.input_audio==`object`&&`data`in e.input_audio&&typeof e.input_audio.data==`string`}function Vf(e){return`type`in e&&e.type===`file`&&`file`in e&&!!e.file&&typeof e.file==`object`&&`file_data`in e.file&&typeof e.file.file_data==`string`}function Hf(e){return`media_type`in e&&typeof e.media_type==`string`&&`data`in e}function Uf(e){return`type`in e&&e.type===`file`&&`mediaType`in e&&typeof e.mediaType==`string`&&`data`in e&&typeof e.data==`string`&&!e.data.startsWith(`http://`)&&!e.data.startsWith(`https://`)}function Wf(e){return`type`in e&&e.type===`image`&&`image`in e&&typeof e.image==`string`&&!e.image.startsWith(`http://`)&&!e.image.startsWith(`https://`)}function Gf(e){return`type`in e&&(e.type===`blob`||e.type===`base64`)}function Kf(e){return`b64_json`in e}function qf(e){return`type`in e&&`result`in e&&e.type===`image_generation`}function Jf(e){return`uri`in e&&typeof e.uri==`string`&&e.uri.startsWith(`data:`)}var Yf=`[Blob substitute]`,Xf=[`image_url`,`data`,`content`,`b64_json`,`result`,`uri`,`image`];function Zf(e){let t={...e};Ff(t.source)&&(t.source=Zf(t.source)),zf(e)&&(t.inlineData={...e.inlineData,data:Yf}),Lf(e)&&(t.image_url={...e.image_url,url:Yf}),Bf(e)&&(t.input_audio={...e.input_audio,data:Yf}),Vf(e)&&(t.file={...e.file,file_data:Yf});for(let e of Xf)typeof t[e]==`string`&&(t[e]=Yf);return t}var Qf=2e4,$f=e=>new TextEncoder().encode(e).length,ep=e=>$f(JSON.stringify(e));function tp(e,t){if($f(e)<=t)return e;let n=0,r=e.length,i=``;for(;n<=r;){let a=Math.floor((n+r)/2),o=e.slice(0,a);$f(o)<=t?(i=o,n=a+1):r=a-1}return i}function np(e){return typeof e==`string`?e:`text`in e&&typeof e.text==`string`?e.text:``}function rp(e,t){return typeof e==`string`?t:{...e,text:t}}function ip(e){return typeof e==`object`&&!!e&&`content`in e&&typeof e.content==`string`}function ap(e){return typeof e==`object`&&!!e&&`content`in e&&Array.isArray(e.content)}function op(e){return typeof e==`object`&&!!e&&`parts`in e&&Array.isArray(e.parts)&&e.parts.length>0}function sp(e,t){let n=t-ep({...e,content:``});if(n<=0)return[];let r=tp(e.content,n);return[{...e,content:r}]}function cp(e){return`parts`in e&&Array.isArray(e.parts)?{key:`parts`,items:e.parts}:`content`in e&&Array.isArray(e.content)?{key:`content`,items:e.content}:{key:null,items:[]}}function lp(e,t){let{key:n,items:r}=cp(e);if(n===null||r.length===0)return[];let i=r.map(e=>rp(e,``)),a=t-ep({...e,[n]:i});if(a<=0)return[];let o=[];for(let e of r){let t=np(e),n=$f(t);if(n<=a)o.push(e),a-=n;else if(o.length===0){let n=tp(t,a);n&&o.push(rp(e,n));break}else break}return o.length<=0?[]:[{...e,[n]:o}]}function up(e,t){if(!e)return[];if(typeof e==`string`){let n=tp(e,t);return n?[n]:[]}return typeof e==`object`?ip(e)?sp(e,t):ap(e)||op(e)?lp(e,t):[]:[]}function dp(e){return e.map(e=>{let t;return e&&typeof e==`object`&&(ap(e)?t={...e,content:dp(e.content)}:`content`in e&&Ff(e.content)&&(t={...e,content:Zf(e.content)}),op(e)&&(t={...t??e,parts:dp(e.parts)}),Ff(t)?t=Zf(t):Ff(e)&&(t=Zf(e))),t??e})}function fp(e,t){if(!Array.isArray(e)||e.length===0)return e;let n=t-2,r=e[e.length-1],i=dp([r]),a=i[0];return ep(a)<=n?i:up(a,n)}function pp(e){return fp(e,Qf)}function mp(e){return tp(e,Qf)}function hp(e){let t=j()?.getDataCollectionOptions().genAI;return{...e,recordInputs:e?.recordInputs??t?.inputs??!1,recordOutputs:e?.recordOutputs??t?.outputs??!1}}function gp(e){if(e!==void 0)return e;let t=j();return!t||!qi(t)&&t.getOptions().streamGenAiSpans===!1}function _p(e,t){return e?`${e}.${t}`:t}function vp(e,t,n,r,i){if(t!==void 0&&e.setAttributes({[lf]:t}),n!==void 0&&e.setAttributes({[uf]:n}),t!==void 0||n!==void 0||r!==void 0||i!==void 0){let a=(t??0)+(n??0)+(r??0)+(i??0);e.setAttributes({[df]:a})}}function yp(e,t,n){if(!e.isRecording())return;let r={[vf]:!0};t.responseId&&(r[sf]=t.responseId),t.responseModel&&(r[of]=t.responseModel),t.promptTokens!==void 0&&(r[lf]=t.promptTokens),t.completionTokens!==void 0&&(r[uf]=t.completionTokens),t.totalTokens===void 0?(t.promptTokens!==void 0||t.completionTokens!==void 0||t.cacheCreationInputTokens!==void 0||t.cacheReadInputTokens!==void 0)&&(r[df]=(t.promptTokens??0)+(t.completionTokens??0)+(t.cacheCreationInputTokens??0)+(t.cacheReadInputTokens??0)):r[df]=t.totalTokens,t.finishReasons.length&&(r[af]=JSON.stringify(t.finishReasons)),n&&t.responseTexts.length&&(r[gf]=t.responseTexts.join(``)),n&&t.toolCalls.length&&(r[yf]=JSON.stringify(t.toolCalls)),e.setAttributes(r),e.end()}function bp(e){if(typeof e==`string`)return mp(e);try{return JSON.stringify(Array.isArray(e)?pp(e):e)}catch{return`[unserializable]`}}function xp(e){if(!Array.isArray(e))return{systemInstructions:void 0,filteredMessages:e};let t=e.findIndex(e=>e&&typeof e==`object`&&`role`in e&&e.role===`system`);if(t===-1)return{systemInstructions:void 0,filteredMessages:e};let n=e[t],r=typeof n.content==`string`?n.content:n.content===void 0?void 0:JSON.stringify(n.content);return r?{systemInstructions:JSON.stringify([{type:`text`,content:r}]),filteredMessages:[...e.slice(0,t),...e.slice(t+1)]}:{systemInstructions:void 0,filteredMessages:e}}async function Sp(e,t,n){let r=e.catch(e=>{throw L(e,{mechanism:{handled:!1,type:n}}),e}),i=await t,a=await r;return a&&typeof a==`object`&&`data`in a?{...a,data:i}:i}function Cp(e,t,n){return Ae(e)?new Proxy(e,{get(e,r){let i=r in Promise.prototype||r===Symbol.toStringTag?t:e,a=Reflect.get(i,r);return r===`withResponse`&&typeof a==`function`?function(){return Sp(a.call(e),t,n)}:typeof a==`function`?a.bind(i):a}}):t}var wp={"responses.create":{operation:`chat`},"chat.completions.create":{operation:`chat`},"embeddings.create":{operation:`embeddings`},"conversations.create":{operation:`chat`}},Tp=[`response.created`,`response.in_progress`,`response.failed`,`response.completed`,`response.incomplete`,`response.queued`,`response.output_text.delta`,`response.output_item.added`,`response.function_call_arguments.delta`,`response.function_call_arguments.done`,`response.output_item.done`];function Ep(e){return typeof e==`object`&&!!e&&`type`in e&&typeof e.type==`string`&&e.type.startsWith(`response.`)}function Dp(e){return typeof e==`object`&&!!e&&`object`in e&&e.object===`chat.completion.chunk`}function Op(e,t,n){if(!t||typeof t!=`object`)return;let r=t,i={};if(typeof r.id==`string`&&(i[sf]=r.id),typeof r.model==`string`&&(i[of]=r.model),r.object===`conversation`&&typeof r.id==`string`&&(i[Sf]=r.id),r.usage&&typeof r.usage==`object`){let e=r.usage,t=e.prompt_tokens??e.input_tokens;typeof t==`number`&&(i[lf]=t);let n=e.completion_tokens??e.output_tokens;typeof n==`number`&&(i[uf]=n),typeof e.total_tokens==`number`&&(i[df]=e.total_tokens)}if(Array.isArray(r.choices)){let e=r.choices,t=e.map(e=>e.finish_reason).filter(e=>typeof e==`string`);if(t.length>0&&(i[af]=JSON.stringify(t)),n){let t=e.map(e=>e.message?.content||``);i[gf]=JSON.stringify(t);let n=e.map(e=>e.message?.tool_calls).filter(e=>Array.isArray(e)&&e.length>0).flat();n.length>0&&(i[yf]=JSON.stringify(n))}}if(typeof r.status==`string`&&(i[`gen_ai.response.finish_reasons`]||(i[af]=JSON.stringify([r.status]))),n&&(typeof r.output_text==`string`&&!i[`gen_ai.response.text`]&&(i[gf]=r.output_text),Array.isArray(r.output)&&r.output.length>0&&!i[`gen_ai.response.tool_calls`])){let e=r.output.filter(e=>e?.type===`function_call`);e.length>0&&(i[yf]=JSON.stringify(e))}e.setAttributes(i)}function kp(e){if(`conversation`in e&&typeof e.conversation==`string`)return e.conversation;if(`previous_response_id`in e&&typeof e.previous_response_id==`string`)return e.previous_response_id}function Ap(e){let t={[Jd]:e.model??`unknown`};`temperature`in e&&(t[Xd]=e.temperature),`top_p`in e&&(t[ef]=e.top_p),`frequency_penalty`in e&&(t[Qd]=e.frequency_penalty),`presence_penalty`in e&&(t[$d]=e.presence_penalty),`stream`in e&&(t[Yd]=e.stream),`encoding_format`in e&&(t[nf]=e.encoding_format),`dimensions`in e&&(t[rf]=e.dimensions);let n=kp(e);return n&&(t[Sf]=n),t}function jp(e,t){for(let n of e){let e=n.index;if(!(e===void 0||!n.function))if(!(e in t.chatCompletionToolCalls))t.chatCompletionToolCalls[e]={...n,function:{name:n.function.name,arguments:n.function.arguments||``}};else{let r=t.chatCompletionToolCalls[e];n.function.arguments&&r?.function&&(r.function.arguments+=n.function.arguments)}}}function Mp(e,t,n){t.responseId=e.id??t.responseId,t.responseModel=e.model??t.responseModel,e.usage&&(t.promptTokens=e.usage.prompt_tokens,t.completionTokens=e.usage.completion_tokens,t.totalTokens=e.usage.total_tokens);for(let r of e.choices??[])n&&(r.delta?.content&&t.responseTexts.push(r.delta.content),r.delta?.tool_calls&&jp(r.delta.tool_calls,t)),r.finish_reason&&t.finishReasons.push(r.finish_reason)}function Np(e,t,n,r){if(!(e&&typeof e==`object`)){t.eventTypes.push(`unknown:non-object`);return}if(e instanceof Error){r.setStatus({code:2,message:`internal_error`}),L(e,{mechanism:{handled:!1,type:`auto.ai.openai.stream-response`}});return}if(!(`type`in e))return;let i=e;if(!Tp.includes(i.type)){t.eventTypes.push(i.type);return}if(n&&(i.type===`response.output_item.done`&&`item`in i&&t.responsesApiToolCalls.push(i.item),i.type===`response.output_text.delta`&&`delta`in i&&i.delta)){t.responseTexts.push(i.delta);return}if(`response`in i){let{response:e}=i;t.responseId=e.id??t.responseId,t.responseModel=e.model??t.responseModel,e.usage&&(t.promptTokens=e.usage.input_tokens,t.completionTokens=e.usage.output_tokens,t.totalTokens=e.usage.total_tokens),e.status&&t.finishReasons.push(e.status),n&&e.output_text&&t.responseTexts.push(e.output_text)}}async function*Pp(e,t,n){let r={eventTypes:[],responseTexts:[],finishReasons:[],responseId:``,responseModel:``,promptTokens:void 0,completionTokens:void 0,totalTokens:void 0,chatCompletionToolCalls:{},responsesApiToolCalls:[]};try{for await(let i of e)Dp(i)?Mp(i,r,n):Ep(i)&&Np(i,r,n,t),yield i}finally{let e=[...Object.values(r.chatCompletionToolCalls),...r.responsesApiToolCalls];yp(t,{...r,toolCalls:e},n)}}function Fp(e){let t=Array.isArray(e.tools)?e.tools:[],n=e.web_search_options&&typeof e.web_search_options==`object`?[{type:`web_search_options`,...e.web_search_options}]:[],i=[...t,...n];if(i.length!==0)try{return JSON.stringify(i)}catch(e){r&&x.error(`Failed to serialize OpenAI tools:`,e);return}}function Ip(e,t){let n={[qd]:`openai`,[ff]:t,[P]:`auto.ai.openai`};if(e.length>0&&typeof e[0]==`object`&&e[0]!==null){let t=e[0],r=Fp(t);r&&(n[_f]=r),Object.assign(n,Ap(t))}else n[Jd]=`unknown`;return n}function Lp(e,t,n,r){if(n===`embeddings`&&`input`in t){let n=t.input;if(n==null||typeof n==`string`&&n.length===0||Array.isArray(n)&&n.length===0)return;e.setAttribute(Ef,typeof n==`string`?n:JSON.stringify(n));return}let i=`input`in t?t.input:`messages`in t?t.messages:void 0;if(!i||Array.isArray(i)&&i.length===0)return;let{systemInstructions:a,filteredMessages:o}=xp(i);a&&e.setAttribute(hf,a),e.setAttribute(mf,r?bp(o):at(o)),Array.isArray(o)?e.setAttribute(pf,o.length):e.setAttribute(pf,1)}function Rp(e,t,n,r,i){return function(...a){let o=n.operation||`unknown`,s=Ip(a,o),c=s[`gen_ai.request.model`]||`unknown`,l=a[0],u=l&&typeof l==`object`&&l.stream===!0,d={name:`${o} ${c}`,op:`gen_ai.${o}`,attributes:s};if(u){let n,s=aa(d,s=>(n=e.apply(r,a),i.recordInputs&&l&&Lp(s,l,o,gp(i.enableTruncation)),(async()=>{try{return Pp(await n,s,i.recordOutputs??!1)}catch(e){throw s.setStatus({code:2,message:`internal_error`}),L(e,{mechanism:{handled:!1,type:`auto.ai.openai.stream`,data:{function:t}}}),s.end(),e}})()));return Cp(n,s,`auto.ai.openai`)}let f,p=ia(d,n=>(f=e.apply(r,a),i.recordInputs&&l&&Lp(n,l,o,gp(i.enableTruncation)),f.then(e=>(Op(n,e,i.recordOutputs),e),e=>{throw L(e,{mechanism:{handled:!1,type:`auto.ai.openai`,data:{function:t}}}),e})));return Cp(f,p,`auto.ai.openai`)}}function zp(e,t=``,n){return new Proxy(e,{get(e,r){let i=e[r],a=_p(t,String(r)),o=wp[a];return typeof i==`function`&&o?Rp(i,a,o,e,n):typeof i==`function`?i.bind(e):i&&typeof i==`object`?zp(i,a,n):i}})}function Bp(e,t){return zp(e,``,hp(t))}var Vp={"messages.create":{operation:`chat`},"messages.stream":{operation:`chat`,streaming:!0},"messages.countTokens":{operation:`chat`},"models.get":{operation:`models`},"completions.create":{operation:`chat`},"models.retrieve":{operation:`models`},"beta.messages.create":{operation:`chat`}};function Hp(e,t,n){if(Array.isArray(t)&&t.length===0)return;let{systemInstructions:r,filteredMessages:i}=xp(t);r&&e.setAttributes({[hf]:r});let a=Array.isArray(i)?i.length:1;e.setAttributes({[mf]:n?bp(i):at(i),[pf]:a})}var Up={invalid_request_error:`invalid_argument`,authentication_error:`unauthenticated`,permission_error:`permission_denied`,not_found_error:`not_found`,request_too_large:`failed_precondition`,rate_limit_error:`resource_exhausted`,api_error:`internal_error`,overloaded_error:`unavailable`};function Wp(e){return e&&Up[e]||`internal_error`}function Gp(e,t){t.error&&(e.setStatus({code:2,message:Wp(t.error.type)}),L(t.error,{mechanism:{handled:!1,type:`auto.ai.anthropic.anthropic_error`}}))}function Kp(e){let{system:t,messages:n,input:r}=e,i=typeof t==`string`?[{role:`system`,content:e.system}]:[],a=(Array.isArray(r)?r:r==null?void 0:[r])??(Array.isArray(n)?n:n==null?[]:[n]);return[...i,...a]}function qp(e,t){return`type`in e&&typeof e.type==`string`&&e.type===`error`?(t.setStatus({code:2,message:Wp(e.error?.type)}),L(e.error,{mechanism:{handled:!1,type:`auto.ai.anthropic.anthropic_error`}}),!0):!1}function Jp(e,t){if(e.type===`message_delta`&&(e.usage&&typeof e.usage.output_tokens==`number`&&(t.completionTokens=e.usage.output_tokens),e.delta?.stop_reason&&t.finishReasons.push(e.delta.stop_reason)),e.message){let n=e.message;n.id&&(t.responseId=n.id),n.model&&(t.responseModel=n.model),n.usage&&(typeof n.usage.input_tokens==`number`&&(t.promptTokens=n.usage.input_tokens),typeof n.usage.cache_creation_input_tokens==`number`&&(t.cacheCreationInputTokens=n.usage.cache_creation_input_tokens),typeof n.usage.cache_read_input_tokens==`number`&&(t.cacheReadInputTokens=n.usage.cache_read_input_tokens))}}function Yp(e,t){e.type!==`content_block_start`||typeof e.index!=`number`||!e.content_block||(e.content_block.type===`tool_use`||e.content_block.type===`server_tool_use`)&&(t.activeToolBlocks[e.index]={id:e.content_block.id,name:e.content_block.name,inputJsonParts:[]})}function Xp(e,t,n){if(!(e.type!==`content_block_delta`||!e.delta)){if(typeof e.index==`number`&&`partial_json`in e.delta&&typeof e.delta.partial_json==`string`){let n=t.activeToolBlocks[e.index];n&&n.inputJsonParts.push(e.delta.partial_json)}n&&typeof e.delta.text==`string`&&t.responseTexts.push(e.delta.text)}}function Zp(e,t){if(e.type!==`content_block_stop`||typeof e.index!=`number`)return;let n=t.activeToolBlocks[e.index];if(!n)return;let r=n.inputJsonParts.join(``),i;try{i=r?JSON.parse(r):{}}catch{i={__unparsed:r}}t.toolCalls.push({type:`tool_use`,id:n.id,name:n.name,input:i}),delete t.activeToolBlocks[e.index]}function Qp(e,t,n,r){e&&typeof e==`object`&&(qp(e,r)||(Jp(e,t),Yp(e,t),Xp(e,t,n),Zp(e,t)))}async function*$p(e,t,n){let r={responseTexts:[],finishReasons:[],responseId:``,responseModel:``,promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};try{for await(let i of e)Qp(i,r,n,t),yield i}finally{yp(t,r,n)}}function em(e,t,n){let r={responseTexts:[],finishReasons:[],responseId:``,responseModel:``,promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};return e.on(`streamEvent`,e=>{Qp(e,r,n,t)}),e.on(`message`,()=>{yp(t,r,n)}),e.on(`error`,e=>{L(e,{mechanism:{handled:!1,type:`auto.ai.anthropic.stream_error`}}),t.isRecording()&&(t.setStatus({code:2,message:`internal_error`}),t.end())}),e}function tm(e,t,n){let r={[qd]:`anthropic`,[ff]:n,[P]:`auto.ai.anthropic`};if(e.length>0&&typeof e[0]==`object`&&e[0]!==null){let t=e[0];t.tools&&Array.isArray(t.tools)&&(r[_f]=JSON.stringify(t.tools)),r[Jd]=t.model??`unknown`,`temperature`in t&&(r[Xd]=t.temperature),`top_p`in t&&(r[ef]=t.top_p),`stream`in t&&(r[Yd]=t.stream),`top_k`in t&&(r[tf]=t.top_k),`frequency_penalty`in t&&(r[Qd]=t.frequency_penalty),`max_tokens`in t&&(r[Zd]=t.max_tokens)}else t===`models.retrieve`||t===`models.get`?r[Jd]=e[0]:r[Jd]=`unknown`;return r}function nm(e,t,n){Hp(e,Kp(t),n),`prompt`in t&&e.setAttributes({[Kd]:JSON.stringify(t.prompt)})}function rm(e,t){if(`content`in t&&Array.isArray(t.content)){e.setAttributes({[gf]:t.content.map(e=>e.text).filter(e=>!!e).join(``)});let n=[];for(let e of t.content)(e.type===`tool_use`||e.type===`server_tool_use`)&&n.push(e);n.length>0&&e.setAttributes({[yf]:JSON.stringify(n)})}`completion`in t&&e.setAttributes({[gf]:t.completion}),`input_tokens`in t&&e.setAttributes({[gf]:JSON.stringify(t.input_tokens)})}function im(e,t){`id`in t&&`model`in t&&(e.setAttributes({[sf]:t.id,[of]:t.model}),`usage`in t&&t.usage&&vp(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens))}function am(e,t,n){if(!(!t||typeof t!=`object`)){if(`type`in t&&t.type===`error`){Gp(e,t);return}n&&rm(e,t),im(e,t)}}function om(e,t,n){throw L(e,{mechanism:{handled:!1,type:`auto.ai.anthropic`,data:{function:n}}}),t.isRecording()&&(t.setStatus({code:2,message:`internal_error`}),t.end()),e}function sm(e,t,n,r,i,a,o,s,c,l,u){let d={name:`${a} ${i[`gen_ai.request.model`]??`unknown`}`,op:`gen_ai.${a}`,attributes:i};if(l&&!u){let t,i=aa(d,i=>(t=e.apply(n,r),c.recordInputs&&s&&nm(i,s,gp(c.enableTruncation)),(async()=>{try{return $p(await t,i,c.recordOutputs??!1)}catch(e){return om(e,i,o)}})()));return Cp(t,i,`auto.ai.anthropic`)}else return aa(d,e=>{try{return c.recordInputs&&s&&nm(e,s,gp(c.enableTruncation)),em(t.apply(n,r),e,c.recordOutputs??!1)}catch(t){return om(t,e,o)}})}function cm(e,t,n,r,i){return new Proxy(e,{apply(a,o,s){let c=n.operation||`unknown`,l=tm(s,t,c),u=l[`gen_ai.request.model`]??`unknown`,d=typeof s[0]==`object`?s[0]:void 0,f=!!d?.stream,p=n.streaming===!0;if(f||p)return sm(e,a,r,s,l,c,t,d,i,f,p);let m,h=ia({name:`${c} ${u}`,op:`gen_ai.${c}`,attributes:l},e=>(m=a.apply(r,s),i.recordInputs&&d&&nm(e,d,gp(i.enableTruncation)),m.then(t=>(am(e,t,i.recordOutputs),t),e=>{throw L(e,{mechanism:{handled:!1,type:`auto.ai.anthropic`,data:{function:t}}}),e})));return Cp(m,h,`auto.ai.anthropic`)}})}function lm(e,t=``,n){return new Proxy(e,{get(e,r){let i=e[r],a=_p(t,String(r)),o=Vp[a];return typeof i==`function`&&o?cm(i,a,o,e,n):typeof i==`function`?i.bind(e):i&&typeof i==`object`?lm(i,a,n):i}})}function um(e,t){return lm(e,``,hp(t))}var dm={"models.generateContent":{operation:`generate_content`},"models.generateContentStream":{operation:`generate_content`,streaming:!0},"models.embedContent":{operation:`embeddings`},"chats.create":{proxyResultPath:`chat`},"chat.sendMessage":{operation:`chat`},"chat.sendMessageStream":{operation:`chat`,streaming:!0}},fm=`google_genai`;function pm(e,t){let n=e?.promptFeedback;if(n?.blockReason){let e=n.blockReasonMessage??n.blockReason;return t.setStatus({code:2,message:`internal_error`}),L(`Content blocked: ${e}`,{mechanism:{handled:!1,type:`auto.ai.google_genai`}}),!0}return!1}function mm(e,t){typeof e.responseId==`string`&&(t.responseId=e.responseId),typeof e.modelVersion==`string`&&(t.responseModel=e.modelVersion);let n=e.usageMetadata;n&&(typeof n.promptTokenCount==`number`&&(t.promptTokens=n.promptTokenCount),typeof n.candidatesTokenCount==`number`&&(t.completionTokens=n.candidatesTokenCount),typeof n.totalTokenCount==`number`&&(t.totalTokens=n.totalTokenCount))}function hm(e,t,n){Array.isArray(e.functionCalls)&&t.toolCalls.push(...e.functionCalls);for(let r of e.candidates??[]){r?.finishReason&&!t.finishReasons.includes(r.finishReason)&&t.finishReasons.push(r.finishReason);for(let e of r?.content?.parts??[])n&&e.text&&t.responseTexts.push(e.text),e.functionCall&&t.toolCalls.push({type:`function`,id:e.functionCall.id,name:e.functionCall.name,arguments:e.functionCall.args})}}function gm(e,t,n,r){!e||pm(e,r)||(mm(e,t),hm(e,t,n))}async function*_m(e,t,n){let r={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(let i of e)gm(i,r,n,t),yield i}finally{yp(t,r,n)}}function vm(e,t=`user`){return typeof e==`string`?[{role:t,content:e}]:Array.isArray(e)?e.flatMap(e=>vm(e,t)):typeof e!=`object`||!e?[]:`role`in e&&typeof e.role==`string`?[e]:`parts`in e?[{...e,role:t}]:[{role:t,content:e}]}function ym(e,t){if(`model`in e&&typeof e.model==`string`)return e.model;if(t&&typeof t==`object`){let e=t;if(`model`in e&&typeof e.model==`string`)return e.model;if(`modelVersion`in e&&typeof e.modelVersion==`string`)return e.modelVersion}return`unknown`}function bm(e){let t={};return`temperature`in e&&typeof e.temperature==`number`&&(t[Xd]=e.temperature),`topP`in e&&typeof e.topP==`number`&&(t[ef]=e.topP),`topK`in e&&typeof e.topK==`number`&&(t[tf]=e.topK),`maxOutputTokens`in e&&typeof e.maxOutputTokens==`number`&&(t[Zd]=e.maxOutputTokens),`frequencyPenalty`in e&&typeof e.frequencyPenalty==`number`&&(t[Qd]=e.frequencyPenalty),`presencePenalty`in e&&typeof e.presencePenalty==`number`&&(t[$d]=e.presencePenalty),t}function xm(e,t,n){let r={[qd]:fm,[ff]:e,[P]:`auto.ai.google_genai`};if(t){if(r[Jd]=ym(t,n),`config`in t&&typeof t.config==`object`&&t.config){let e=t.config;if(Object.assign(r,bm(e)),`tools`in e&&Array.isArray(e.tools)){let t=e.tools.flatMap(e=>e.functionDeclarations);r[_f]=JSON.stringify(t)}}}else r[Jd]=ym({},n);return r}function Sm(e,t,n,r){if(n===`embeddings`){let n=t.contents;n!=null&&e.setAttribute(Ef,typeof n==`string`?n:JSON.stringify(n));return}let i=[];if(`config`in t&&t.config&&typeof t.config==`object`&&`systemInstruction`in t.config&&t.config.systemInstruction&&i.push(...vm(t.config.systemInstruction,`system`)),`history`in t&&i.push(...vm(t.history,`user`)),`contents`in t&&i.push(...vm(t.contents,`user`)),`message`in t&&i.push(...vm(t.message,`user`)),Array.isArray(i)&&i.length){let{systemInstructions:t,filteredMessages:n}=xp(i);t&&e.setAttribute(hf,t);let a=Array.isArray(n)?n.length:0;e.setAttributes({[pf]:a,[mf]:r?bp(n):at(n)})}}function Cm(e,t,n){if(!(!t||typeof t!=`object`)){if(t.modelVersion&&e.setAttribute(of,t.modelVersion),t.usageMetadata&&typeof t.usageMetadata==`object`){let n=t.usageMetadata;typeof n.promptTokenCount==`number`&&e.setAttributes({[lf]:n.promptTokenCount}),typeof n.candidatesTokenCount==`number`&&e.setAttributes({[uf]:n.candidatesTokenCount}),typeof n.totalTokenCount==`number`&&e.setAttributes({[df]:n.totalTokenCount})}if(n&&Array.isArray(t.candidates)&&t.candidates.length>0){let n=t.candidates.map(e=>e.content?.parts&&Array.isArray(e.content.parts)?e.content.parts.map(e=>typeof e.text==`string`?e.text:``).filter(e=>e.length>0).join(``):``).filter(e=>e.length>0);n.length>0&&e.setAttributes({[gf]:n.join(``)})}if(n&&t.functionCalls){let n=t.functionCalls;Array.isArray(n)&&n.length>0&&e.setAttributes({[yf]:JSON.stringify(n)})}}}function wm(e,t,n,r,i){let a=n.operation===`embeddings`;return new Proxy(e,{apply(e,o,s){let c=n.operation||`unknown`,l=s[0],u=xm(c,l,r),d=u[`gen_ai.request.model`]??`unknown`;return n.streaming?aa({name:`${c} ${d}`,op:`gen_ai.${c}`,attributes:u},async n=>{try{return i.recordInputs&&l&&Sm(n,l,c,gp(i.enableTruncation)),_m(await e.apply(r,s),n,!!i.recordOutputs)}catch(e){throw n.setStatus({code:2,message:`internal_error`}),L(e,{mechanism:{handled:!1,type:`auto.ai.google_genai`,data:{function:t}}}),n.end(),e}}):ia({name:`${c} ${d}`,op:`gen_ai.${c}`,attributes:u},n=>(i.recordInputs&&l&&Sm(n,l,c,gp(i.enableTruncation)),ea(()=>e.apply(r,s),e=>{L(e,{mechanism:{handled:!1,type:`auto.ai.google_genai`,data:{function:t}}})},()=>{},e=>{a||Cm(n,e,i.recordOutputs)})))}})}function Tm(e,t=``,n){return new Proxy(e,{get:(e,r,i)=>{let a=Reflect.get(e,r,i),o=_p(t,String(r)),s=dm[o];if(typeof a==`function`&&s){let t=s.operation?wm(a,o,s,e,n):a.bind(e);return s.proxyResultPath?function(...e){let r=t(...e);return r&&typeof r==`object`?Tm(r,s.proxyResultPath,n):r}:t}return typeof a==`function`?a.bind(e):a&&typeof a==`object`?Tm(a,o,n):a}})}function Em(e,t){return Tm(e,``,hp(t))}var Dm=`auto.ai.langchain`,Om={human:`user`,ai:`assistant`,assistant:`assistant`,system:`system`,function:`function`,tool:`tool`},km=(e,t,n)=>{n!=null&&(e[t]=n)},Am=(e,t,n)=>{let r=Number(n);Number.isNaN(r)||(e[t]=r)};function jm(e){if(Array.isArray(e))try{let t=e.map(e=>e&&typeof e==`object`&&Ff(e)?Zf(e):e);return JSON.stringify(t)}catch{return String(e)}return at(e,String)}function Mm(e){let t=e.toLowerCase();return Om[t]??t}function Nm(e){return e.includes(`System`)?`system`:e.includes(`Human`)?`user`:e.includes(`AI`)||e.includes(`Assistant`)?`assistant`:e.includes(`Function`)?`function`:e.includes(`Tool`)?`tool`:`user`}function Pm(e){if(!(!e||Array.isArray(e)))return e.invocation_params}function Fm(e){return e.map(e=>{let t=e._getType;if(typeof t==`function`)return{role:Mm(t.call(e)),content:jm(e.content)};if(e.lc===1&&e.kwargs){let t=e.id,n=Array.isArray(t)&&t.length>0?t[t.length-1]:``;return{role:Mm(typeof n==`string`?Nm(n):`user`),content:jm(e.kwargs?.content)}}if(e.type)return{role:Mm(String(e.type).toLowerCase()),content:jm(e.content)};if(e.role)return{role:Mm(String(e.role)),content:jm(e.content)};let n=e.constructor?.name;return n&&n!==`Object`?{role:Mm(Nm(n)),content:jm(e.content)}:{role:`user`,content:jm(e.content)}})}function Im(e,t,n){let r={},i=`kwargs`in e?e.kwargs:void 0;Am(r,Xd,t?.temperature??n?.ls_temperature??i?.temperature),Am(r,Zd,t?.max_tokens??n?.ls_max_tokens??i?.max_tokens),Am(r,ef,t?.top_p??i?.top_p);let a=t?.frequency_penalty;Am(r,Qd,a);let o=t?.presence_penalty;return Am(r,$d,o),t&&`stream`in t&&km(r,Yd,!!t.stream),r}function Lm(e,t,n,r,i){return{[qd]:at(e??`langchain`,String),[ff]:`chat`,[Jd]:at(t,String),[P]:Dm,...Im(n,r,i)}}function Rm(e,t,n,r,i,a){let o=a?.ls_provider,s=Lm(o,i?.model??a?.ls_model_name??`unknown`,e,i,a);if(n&&Array.isArray(t)&&t.length>0){km(s,pf,t.length);let e=t.map(e=>({role:`user`,content:e}));km(s,mf,r?bp(e):at(e))}return s}function zm(e,t,n,r,i,a){let o=Lm(a?.ls_provider??e.id?.[2],i?.model??a?.ls_model_name??`unknown`,e,i,a);if(n&&Array.isArray(t)&&t.length>0){let{systemInstructions:e,filteredMessages:n}=xp(Fm(t.flat()));e&&km(o,hf,e),km(o,pf,Array.isArray(n)?n.length:0),km(o,mf,r?bp(n):at(n))}return o}function Bm(e,t){let n=[],r=e.flat();for(let e of r){let t=e.message?.tool_calls;if(Array.isArray(t)&&t.length>0)n.push(...t);else{let t=e.message?.content;if(Array.isArray(t))for(let e of t){let t=e;t.type===`tool_use`&&n.push(t)}}}n.length>0&&km(t,yf,at(n,String))}function Vm(e,t){if(!e)return;let n=e.tokenUsage,r=e.usage;if(n)Am(t,lf,n.promptTokens),Am(t,uf,n.completionTokens),Am(t,df,n.totalTokens);else if(r){Am(t,lf,r.input_tokens),Am(t,uf,r.output_tokens);let e=Number(r.input_tokens),n=Number(r.output_tokens),i=(Number.isNaN(e)?0:e)+(Number.isNaN(n)?0:n);i>0&&Am(t,df,i),r.cache_creation_input_tokens!==void 0&&Am(t,Cf,r.cache_creation_input_tokens),r.cache_read_input_tokens!==void 0&&Am(t,wf,r.cache_read_input_tokens)}}function Hm(e,t){if(!e)return;let n={};if(Array.isArray(e.generations)){let r=e.generations.flat().map(e=>e.generationInfo?.finish_reason?e.generationInfo.finish_reason:e.generation_info?.finish_reason?e.generation_info.finish_reason:null).filter(e=>typeof e==`string`);if(r.length>0&&km(n,af,at(r,String)),Bm(e.generations,n),t){let t=e.generations.flat().map(e=>e.text??e.message?.content).filter(e=>typeof e==`string`);t.length>0&&km(n,gf,at(t,String))}}Vm(e.llmOutput,n);let r=e.llmOutput,i=e.generations?.[0]?.[0]?.message,a=r?.model_name??r?.model??i?.response_metadata?.model_name;a&&km(n,of,a);let o=r?.id??i?.id;o&&km(n,sf,o);let s=r?.stop_reason??i?.response_metadata?.finish_reason;return s&&km(n,cf,at(s,String)),n}function Um(e){let t={},n=e?.lc_agent_name;return typeof n==`string`&&(t[bf]=n),t}function Wm(e){let t=e?.invocation_params?.tools??e?.options?.tools;if(!Array.isArray(t)||t.length===0)return;let n=t.map(e=>{let t=e.function;return{type:`function`,name:e.name??t?.name??``,description:e.description??t?.description}});return JSON.stringify(n)}function Gm(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.addHandler==`function`&&typeof t.copy==`function`}function Km(e){return typeof e==`object`&&e?.name===`SentryCallbackHandler`}function qm(e){return e.some(Km)}function Jm(e,t){if(!e)return[t];if(Gm(e)){if(qm(e.handlers??[]))return e;let n=e.copy();return n.addHandler(t,!0),n}let n=Array.isArray(e)?e:[e];return qm(n)?e:[...n,t]}function Ym(e={}){let{recordInputs:t,recordOutputs:n}=hp(e),r=gp(e.enableTruncation),i=new Map,a=e=>{let t=i.get(e);t?.isRecording()&&(t.end(),i.delete(e))},o={lc_serializable:!1,lc_namespace:[`langchain_core`,`callbacks`,`sentry`],lc_secrets:void 0,lc_attributes:void 0,lc_aliases:void 0,lc_serializable_keys:void 0,lc_id:[`langchain_core`,`callbacks`,`sentry`],lc_kwargs:{},name:`SentryCallbackHandler`,ignoreLLM:!1,ignoreChain:!1,ignoreAgent:!1,ignoreRetriever:!1,ignoreCustomEvent:!1,raiseError:!1,awaitHandlers:!0,handleLLMStart(e,n,a,o,s,c,l,u){let d=Pm(c),f=Rm(e,n,t,r,d,l),p=f[Jd],m=f[ff];aa({name:`${m} ${p}`,op:`gen_ai.chat`,attributes:{...Um(l),...f,[N]:`gen_ai.chat`}},e=>(i.set(a,e),e))},handleChatModelStart(e,n,a,o,s,c,l,u){let d=Pm(c),f=zm(e,n,t,r,d,l),p=Wm(s);p&&(f[_f]=p);let m=f[Jd],h=f[ff];aa({name:`${h} ${m}`,op:`gen_ai.chat`,attributes:{...Um(l),...f,[N]:`gen_ai.chat`}},e=>(i.set(a,e),e))},handleLLMEnd(e,t,r,o,s){let c=i.get(t);if(c?.isRecording()){let r=Hm(e,n);r&&c.setAttributes(r),a(t)}},handleLLMError(e,t){let n=i.get(t);n?.isRecording()&&(n.setStatus({code:2,message:`internal_error`}),a(t)),L(e,{mechanism:{handled:!1,type:`${Dm}.llm_error_handler`}})},handleChainStart(e,n,r,a,o,s,c,l){if(s?.__sentry_langgraph__)return;let u=l||e.name||`unknown_chain`,d={[P]:`auto.ai.langchain`,"langchain.chain.name":u};t&&(d[`langchain.chain.inputs`]=JSON.stringify(n)),aa({name:`chain ${u}`,op:`gen_ai.invoke_agent`,attributes:{...d,[N]:`gen_ai.invoke_agent`}},e=>(i.set(r,e),e))},handleChainEnd(e,t){let r=i.get(t);r?.isRecording()&&(n&&r.setAttributes({"langchain.chain.outputs":JSON.stringify(e)}),a(t))},handleChainError(e,t){let n=i.get(t);n?.isRecording()&&(n.setStatus({code:2,message:`internal_error`}),a(t)),L(e,{mechanism:{handled:!1,type:`${Dm}.chain_error_handler`}})},handleToolStart(e,n,r,a,o,s,c){if(s?.__sentry_langgraph__)return;let l=c||e.name||`unknown_tool`,u={...Um(s),[P]:Dm,[ff]:`execute_tool`,[kf]:l};t&&(u[Mf]=n),aa({name:`execute_tool ${l}`,op:`gen_ai.execute_tool`,attributes:{...u,[N]:`gen_ai.execute_tool`}},e=>(i.set(r,e),e))},handleToolEnd(e,t){let r=i.get(t);if(r?.isRecording()){if(n){let t=e,n=t&&typeof t==`object`&&`content`in t?t.content:e;r.setAttributes({[Nf]:typeof n==`string`?n:JSON.stringify(n)})}a(t)}},handleToolError(e,t){let n=i.get(t);n?.isRecording()&&(n.setStatus({code:2,message:`internal_error`}),a(t)),L(e,{mechanism:{handled:!1,type:`${Dm}.tool_error_handler`}})},copy(){return o},toJSON(){return{lc:1,type:`not_implemented`,id:o.lc_id}},toJSONNotImplemented(){return{lc:1,type:`not_implemented`,id:o.lc_id}}};return o}var Xm=`auto.ai.langgraph`;function Zm(e){let t=e[0];if(typeof t!=`object`||!t||!(`llm`in t)||!t.llm||typeof t.llm!=`object`)return null;let n=t.llm;return typeof n.modelName!=`string`&&typeof n.model!=`string`?null:n}function Qm(e){let t=e[0];return typeof t==`object`&&t&&`name`in t&&typeof t.name==`string`?t.name:null}function $m(e,t,n){let r=`__sentry_tool_wrapped__`;for(let i of e){if(!i||typeof i!=`object`)continue;let e=i,a=e.invoke;if(typeof a!=`function`||Object.prototype.hasOwnProperty.call(e,r))continue;let o=typeof e.name==`string`?e.name:`unknown_tool`,s=typeof e.description==`string`?e.description:void 0;e.invoke=new Proxy(a,{apply(e,r,i){let a={[P]:Xm,[N]:Of,[ff]:`execute_tool`,[kf]:o,[jf]:`function`},c=i[1]?.metadata?.lc_agent_name??n;typeof c==`string`&&(a[bf]=c),s&&(a[Pf]=s);let l=i[0];if(typeof l==`object`&&l&&(`id`in l&&typeof l.id==`string`&&(a[Af]=l.id),t.recordInputs)){let e=`args`in l&&typeof l.args==`object`?l.args:l;try{a[Mf]=JSON.stringify(e)}catch{}}return ia({op:Of,name:`execute_tool ${o}`,attributes:a},async n=>{try{let a=await Reflect.apply(e,r,i);if(t.recordOutputs)try{let e=a,t=e&&typeof e==`object`&&`content`in e?e.content:a;n.setAttribute(Nf,typeof t==`string`?t:JSON.stringify(t))}catch{}return a}catch(e){throw n.setStatus({code:2,message:`internal_error`}),L(e,{mechanism:{handled:!1,type:`auto.ai.langgraph.error`}}),e}})}}),Object.defineProperty(e,r,{value:!0,enumerable:!1})}return e}function eh(e){if(!e||e.length===0)return null;let t=[];for(let n of e)if(n&&typeof n==`object`){let e=n.tool_calls;e&&Array.isArray(e)&&t.push(...e)}return t.length>0?t:null}function th(e){let t=e,n=0,r=0,i=0;if(t.usage_metadata&&typeof t.usage_metadata==`object`){let e=t.usage_metadata;return typeof e.input_tokens==`number`&&(n=e.input_tokens),typeof e.output_tokens==`number`&&(r=e.output_tokens),typeof e.total_tokens==`number`&&(i=e.total_tokens),{inputTokens:n,outputTokens:r,totalTokens:i}}if(t.response_metadata&&typeof t.response_metadata==`object`){let e=t.response_metadata;if(e.tokenUsage&&typeof e.tokenUsage==`object`){let t=e.tokenUsage;typeof t.promptTokens==`number`&&(n=t.promptTokens),typeof t.completionTokens==`number`&&(r=t.completionTokens),typeof t.totalTokens==`number`&&(i=t.totalTokens)}}return{inputTokens:n,outputTokens:r,totalTokens:i}}function nh(e,t){let n=t;if(n.response_metadata&&typeof n.response_metadata==`object`){let t=n.response_metadata;t.model_name&&typeof t.model_name==`string`&&e.setAttribute(of,t.model_name),t.finish_reason&&typeof t.finish_reason==`string`&&e.setAttribute(af,[t.finish_reason])}}function rh(e){if(!e.builder?.nodes?.tools?.runnable?.tools)return null;let t=e.builder?.nodes?.tools?.runnable?.tools;return!t||!Array.isArray(t)||t.length===0?null:t.map(e=>({name:e.lc_kwargs?.name,description:e.lc_kwargs?.description,schema:e.lc_kwargs?.schema}))}function ih(e,t,n){let r=n?.messages;if(!r||!Array.isArray(r))return;let i=t?.length??0,a=r.length>i?r.slice(i):[];if(a.length===0)return;let o=eh(a);o&&e.setAttribute(yf,JSON.stringify(o));let s=Fm(a);e.setAttribute(gf,JSON.stringify(s));let c=0,l=0,u=0;for(let t of a){let n=th(t);c+=n.inputTokens,l+=n.outputTokens,u+=n.totalTokens,nh(e,t)}c>0&&e.setAttribute(lf,c),l>0&&e.setAttribute(uf,l),u>0&&e.setAttribute(df,u)}var ah=!1,oh=`__sentry_patched__`;function sh(e,t){if(Object.prototype.hasOwnProperty.call(e,oh))return e;let n=Ym(t),r=new Proxy(e,{apply(e,r,i){return ah?Reflect.apply(e,r,i):ia({op:`gen_ai.create_agent`,name:`create_agent`,attributes:{[P]:Xm,[N]:`gen_ai.create_agent`,[ff]:`create_agent`}},a=>{try{let o=Reflect.apply(e,r,i),s=i.length>0?i[0]:{};s?.name&&typeof s.name==`string`&&(a.setAttribute(bf,s.name),a.updateName(`create_agent ${s.name}`));let c=o.invoke;return c&&typeof c==`function`&&(o.invoke=ch(c.bind(o),o,s,t,void 0,n)),o}catch(e){throw a.setStatus({code:2,message:`internal_error`}),L(e,{mechanism:{handled:!1,type:`auto.ai.langgraph.error`}}),e}})}});return Object.defineProperty(r,oh,{value:!0,enumerable:!1}),r}function ch(e,t,n,r,i,a){return new Proxy(e,{apply(e,o,s){let c=i?.modelName??i?.model;return ia({op:`gen_ai.invoke_agent`,name:`invoke_agent`,attributes:{[P]:Xm,[N]:Tf,[ff]:`invoke_agent`}},async i=>{try{let l=n?.name;l&&typeof l==`string`&&(i.setAttribute(xf,l),i.setAttribute(bf,l),i.updateName(`invoke_agent ${l}`)),c&&i.setAttribute(Jd,c);let u=(s.length>1?s[1]:void 0)?.configurable?.thread_id;if(u&&typeof u==`string`&&i.setAttribute(Sf,u),a){let e=s[1]??{};s[1]=e,e.metadata={...e.metadata??{},__sentry_langgraph__:!0,...typeof l==`string`?{lc_agent_name:l}:{}},e.callbacks=Jm(e.callbacks,a)}let d=rh(t);d&&i.setAttribute(_f,JSON.stringify(d));let f=r.recordInputs,p=r.recordOutputs,m=s.length>0?s[0]?.messages??[]:[];if(m&&f){let{systemInstructions:e,filteredMessages:t}=xp(Fm(m));e&&i.setAttribute(hf,e);let n=gp(r.enableTruncation),a=Array.isArray(t)?t.length:0;i.setAttributes({[mf]:n?bp(t):at(t),[pf]:a})}let h=await Reflect.apply(e,o,s);return p&&ih(i,m??null,h),h}catch(e){throw i.setStatus({code:2,message:`internal_error`}),L(e,{mechanism:{handled:!1,type:`auto.ai.langgraph.error`}}),e}})}})}function lh(e,t){if(Object.prototype.hasOwnProperty.call(e,oh))return e;let n=hp(t),r=Ym(n),i=new Proxy(e,{apply(e,t,i){let a=Zm(i),o=Qm(i),s=i[0];s&&Array.isArray(s.tools)&&s.tools.length>0&&$m(s.tools,n,o??void 0),ah=!0;let c;try{c=Reflect.apply(e,t,i)}finally{ah=!1}let l=c.invoke;if(l&&typeof l==`function`){let e={};o&&(e.name=o),c.invoke=ch(l.bind(c),c,e,n,a,r)}return c}});return Object.defineProperty(i,oh,{value:!0,enumerable:!1}),i}function uh(e,t){return e.compile=sh(e.compile,hp(t)),e}function dh(e,t,n){let r=n.getOptions(),i=n.getDsn(),a=r.tunnel,o=Ii(r._metadata),s={sent_at:new Date(He()).toISOString(),...fh(t)&&{trace:t},...o&&{sdk:o},...!!a&&i&&{dsn:tr(i)}},c=n.getDataCollectionOptions().userInfo?`auto`:`never`;return Si(s,[[{type:`span`,item_count:e.length,content_type:`application/vnd.sentry.items.span.v2+json`},{version:2,...xs()&&{ingest_settings:{infer_ip:c,infer_user_agent:c}},items:e}]])}function fh(e){return!!e.trace_id&&!!e.public_key}function ph(e){let t=156;if(t+=e.name.length*2,t+=on(e.attributes),e.links&&e.links.length>0){let n=e.links[0]?.attributes,r=100+(n?on(n):0);t+=r*e.links.length}return t}var mh=1e3,hh=5e6,gh=class{constructor(e,t){this._traceBuckets=new Map,this._client=e;let{maxSpanLimit:n,flushInterval:r,maxTraceWeightInBytes:i}=t??{};this._maxSpanLimit=n&&n>0&&n<=mh?n:mh,this._flushInterval=r&&r>0?r:5e3,this._maxTraceWeight=i&&i>0?i:hh,this._client.on(`flush`,()=>{this.drain()}),this._client.on(`close`,()=>{this._traceBuckets.forEach(e=>{clearTimeout(e.timeout)}),this._traceBuckets.clear()})}add(e){let t=e.trace_id,n=this._traceBuckets.get(t);n||(n={spans:new Set,size:0,timeout:$o(setTimeout(()=>{this.flush(t)},this._flushInterval))},this._traceBuckets.set(t,n)),n.spans.add(e),n.size+=ph(e),(n.spans.size>=this._maxSpanLimit||n.size>=this._maxTraceWeight)&&this.flush(t)}drain(){this._traceBuckets.size&&(r&&x.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((e,t)=>{this.flush(t)}))}flush(e){let t=this._traceBuckets.get(e);if(!t)return;if(!t.spans.size){this._removeTrace(e);return}let n=Array.from(t.spans),i=n[0]?._segmentSpan;if(!i){r&&x.warn(`No segment span reference found on span JSON, cannot compute DSC`),this._removeTrace(e);return}let a=vi(i),o=n.map(e=>{let{_segmentSpan:t,...n}=e;return n}),s=dh(o,a,this._client);r&&x.log(`Sending span envelope for trace ${e} with ${o.length} spans`),this._client.sendEnvelope(s).then(null,e=>{r&&x.error(`Error while sending streamed span envelope:`,e)}),this._removeTrace(e)}_removeTrace(e){let t=this._traceBuckets.get(e);t&&clearTimeout(t.timeout),this._traceBuckets.delete(e)}};function _h(e){if(e!==void 0){if(e>=400&&e<500)return`warning`;if(e>=500)return`error`}}var vh=i;function yh(){return`history`in vh&&!!vh.history}function bh(){if(!(`fetch`in vh))return!1;try{return new Headers,new Request(`data:,`),new Response,!0}catch{return!1}}function xh(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Sh(){if(typeof EdgeRuntime==`string`)return!0;if(!bh())return!1;if(xh(vh.fetch))return!0;let e=!1,t=vh.document;if(t&&typeof t.createElement==`function`)try{let n=t.createElement(`iframe`);n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=xh(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){r&&x.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function Ch(){return`ReportingObserver`in vh}function wh(e,t){let n=`fetch`,r=ce(n,e);return le(n,()=>Eh(void 0,t)),r}function Th(e){let t=`fetch-body-resolved`,n=ce(t,e);return le(t,()=>Eh(Oh)),n}function Eh(e,t=!1){t&&!Sh()||Ne(i,`fetch`,function(t){return function(...n){let r=Error(),{method:a,url:o}=jh(n),s={args:n,fetchData:{method:a,url:o},startTimestamp:O()*1e3,virtualError:r,headers:Mh(n)};return e||ue(`fetch`,{...s}),t.apply(i,n).then(async t=>(e?e(t):ue(`fetch`,{...s,endTimestamp:O()*1e3,response:t}),t),e=>{ue(`fetch`,{...s,endTimestamp:O()*1e3,error:e}),ve(e)&&e.stack===void 0&&(e.stack=r.stack,D(e,`framesToPop`,1));let t=j()?.getOptions().enhanceFetchErrorMessages??`always`;if(t!==!1&&e instanceof TypeError&&(e.message===`Failed to fetch`||e.message===`Load failed`||e.message===`NetworkError when attempting to fetch resource.`))try{let n=new URL(s.fetchData.url).host;t===`always`?e.message=`${e.message} (${n})`:D(e,`__sentry_fetch_url_host__`,n)}catch{}throw e})}})}async function Dh(e,t){if(e?.body){let n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3),a=!0;for(;a;){let e;try{e=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);let{done:i}=await r.read();clearTimeout(e),i&&(t(),a=!1)}catch{a=!1}finally{clearTimeout(e)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function Oh(e){let t;try{t=e.clone()}catch{return}Dh(t,()=>{ue(`fetch-body-resolved`,{endTimestamp:O()*1e3,response:e})})}function kh(e,t){return De(e)&&!!e[t]}function Ah(e){return typeof e==`string`?e:e?kh(e,`url`)?e.url:e.toString?e.toString():``:``}function jh(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:Ah(t),method:kh(n,`method`)?String(n.method).toUpperCase():Me(t)&&kh(t,`method`)?String(t.method).toUpperCase():`GET`}}let t=e[0];return{url:Ah(t),method:kh(t,`method`)?String(t.method).toUpperCase():`GET`}}function Mh(e){let[t,n]=e;try{if(typeof n==`object`&&n&&`headers`in n&&n.headers)return new Headers(n.headers);if(Me(t))return new Headers(t.headers)}catch{}}var Nh=i;function Ph(){try{return Nh.document.location.href}catch{return``}}function Fh(e,t=5){if(!Nh.HTMLElement)return null;let n=e;for(let e=0;e<t;e++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}function Ih(e){let t=e.constructor?.name??``;return t.includes(`OpenAI`)?`openai`:t.includes(`Google`)?`google_genai`:t.includes(`Mistral`)?`mistralai`:t.includes(`Vertex`)?`google_vertexai`:t.includes(`Bedrock`)?`aws_bedrock`:t.includes(`Ollama`)?`ollama`:t.includes(`Cloudflare`)?`cloudflare`:t.includes(`Cohere`)?`cohere`:`langchain`}function Lh(e){let t=e??{},n={[P]:Dm,[N]:Df,[ff]:`embeddings`,[Jd]:t.model??`unknown`};return n[qd]=Ih(t),`dimensions`in t&&(n[rf]=t.dimensions),`encodingFormat`in t&&(n[nf]=t.encodingFormat),n}function Rh(e,t={}){let{recordInputs:n}=hp(t);return new Proxy(e,{apply(e,t,r){let i=Lh(t),a=i[`gen_ai.request.model`]||`unknown`;if(n){let e=r[0];e!=null&&(i[Ef]=typeof e==`string`?e:JSON.stringify(e))}return ia({name:`embeddings ${a}`,op:Df,attributes:i},()=>Reflect.apply(e,t,r).then(void 0,e=>{throw L(e,{mechanism:{handled:!1,type:`auto.ai.langchain`}}),e}))}})}function zh(e,t){let n=e;return typeof n.embedQuery==`function`&&(n.embedQuery=Rh(n.embedQuery,t)),typeof n.embedDocuments==`function`&&(n.embedDocuments=Rh(n.embedDocuments,t)),e}var Bh=i,z=Bh.document,Vh=Bh.navigator,Hh=`Report a Bug`,Uh=`Cancel`,Wh=`Send Bug Report`,Gh=`Confirm`,Kh=`Report a Bug`,qh=`your.email@example.org`,Jh=`Email`,Yh=`What's the bug? What did you expect?`,Xh=`Description`,Zh=`Your Name`,Qh=`Name`,$h=`Thank you for your report!`,eg=`(required)`,tg=`Add a screenshot`,ng=`Remove screenshot`,rg=`Highlight`,ig=`Hide`,ag=`Remove`,og=`Unable to submit feedback with empty message`,sg=`No client setup, cannot send feedback.`,cg=`Unable to determine if Feedback was correctly sent.`,lg=`Unable to send feedback. This could be because this domain is not in your list of allowed domains.`,ug=`Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.`,dg=`widget`,fg=`api`,pg=5e3,mg={ERROR_EMPTY_MESSAGE:og,ERROR_NO_CLIENT:sg,ERROR_TIMEOUT:cg,ERROR_FORBIDDEN:lg,ERROR_GENERIC:ug};function hg(e,t){return t?.[e]??mg[e]}function gg(e,t){return Error(hg(e,t))}var _g=(e,t={includeReplay:!0})=>{let n=t.errorMessages;if(!e.message)throw gg(`ERROR_EMPTY_MESSAGE`,n);let r=j();if(!r)throw gg(`ERROR_NO_CLIENT`,n);e.tags&&Object.keys(e.tags).length&&k().setTags(e.tags);let i=vd({source:fg,url:Ph(),...e},t);return new Promise((e,t)=>{let a=setTimeout(()=>{o(),t(hg(`ERROR_TIMEOUT`,n))},3e4),o=r.on(`afterSendEvent`,(r,s)=>{if(r.event_id===i)return clearTimeout(a),o(),s?.statusCode&&s.statusCode>=200&&s.statusCode<300?e(i):s?.statusCode===403?t(hg(`ERROR_FORBIDDEN`,n)):t(hg(`ERROR_GENERIC`,n))})})},vg=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__;function yg(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Vh.userAgent)||/Macintosh/i.test(Vh.userAgent)&&Vh.maxTouchPoints&&Vh.maxTouchPoints>1||!isSecureContext)}function bg(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen?.(),e.onFormOpen?.()},onFormClose:()=>{t.onFormClose?.(),e.onFormClose?.()},onSubmitSuccess:(n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},onSubmitError:n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},onFormSubmitted:()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function xg(e){let t=z.createElement(`style`);return t.textContent=`
|
|
19
19
|
.widget__actor {
|
|
20
20
|
position: fixed;
|
|
21
21
|
z-index: var(--z-index);
|
|
@@ -103,7 +103,7 @@ ${e===`system`?`
|
|
|
103
103
|
${Ag({...kg,...t})}
|
|
104
104
|
}
|
|
105
105
|
}`:``}
|
|
106
|
-
`,r&&i.setAttribute(`nonce`,r),i}var Mg=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>(({id:r=`sentry-feedback`,autoInject:i=!0,showBranding:a=!0,isEmailRequired:o=!1,isNameRequired:s=!1,showEmail:c=!0,showName:l=!0,enableScreenshot:u=!0,useSentryUser:d={email:`email`,name:`username`},tags:f,styleNonce:p,scriptNonce:m,colorScheme:h=`system`,themeLight:g={},themeDark:_={},addScreenshotButtonLabel:v=tg,cancelButtonLabel:y=Uh,confirmButtonLabel:b=Gh,emailLabel:S=Jh,emailPlaceholder:C=qh,formTitle:w=Kh,isRequiredLabel:T=eg,messageLabel:ee=Xh,messagePlaceholder:te=Yh,nameLabel:ne=Qh,namePlaceholder:re=Zh,removeScreenshotButtonLabel:ie=ng,submitButtonLabel:ae=Wh,successMessageText:oe=$h,triggerLabel:se=Hh,triggerAriaLabel:E=``,highlightToolText:ce=rg,hideToolText:le=ig,removeHighlightText:ue=ag,errorEmptyMessageText:de=og,errorNoClientText:fe=sg,errorTimeoutText:pe=cg,errorForbiddenText:me=lg,errorGenericText:he=ug,onFormOpen:ge,onFormClose:_e,onSubmitSuccess:ve,onSubmitError:ye,onFormSubmitted:be}={})=>{let xe={id:r,autoInject:i,showBranding:a,isEmailRequired:o,isNameRequired:s,showEmail:c,showName:l,enableScreenshot:u,useSentryUser:d,tags:f,styleNonce:p,scriptNonce:m,colorScheme:h,themeDark:_,themeLight:g,triggerLabel:se,triggerAriaLabel:E,cancelButtonLabel:y,submitButtonLabel:ae,confirmButtonLabel:b,formTitle:w,emailLabel:S,emailPlaceholder:C,messageLabel:ee,messagePlaceholder:te,nameLabel:ne,namePlaceholder:re,successMessageText:oe,isRequiredLabel:T,addScreenshotButtonLabel:v,removeScreenshotButtonLabel:ie,highlightToolText:ce,hideToolText:le,removeHighlightText:ue,errorEmptyMessageText:de,errorNoClientText:fe,errorTimeoutText:pe,errorForbiddenText:me,errorGenericText:he,onFormClose:_e,onFormOpen:ge,onSubmitError:ye,onSubmitSuccess:ve,onFormSubmitted:be},Se=null,Ce=null,we=[],Te=e=>{if(!Se){let t=z.createElement(`div`);t.id=String(e.id),z.body.appendChild(t),Se=t.attachShadow({mode:`open`}),Ce=jg(e),Se.appendChild(Ce)}return Se},Ee=async r=>{let i=r.enableScreenshot&&yg(),a,o;try{a=(t?t():await e(`feedbackModalIntegration`,m))(),ls(a)}catch{throw vg&&x.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),Error(`[Feedback] Missing feedback modal integration!`)}try{let t=i?n?n():await e(`feedbackScreenshotIntegration`,m):void 0;t&&(o=t(),ls(o))}catch{vg&&x.error(`[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.`)}let s={ERROR_EMPTY_MESSAGE:r.errorEmptyMessageText,ERROR_NO_CLIENT:r.errorNoClientText,ERROR_TIMEOUT:r.errorTimeoutText,ERROR_FORBIDDEN:r.errorForbiddenText,ERROR_GENERIC:r.errorGenericText},c=(e,t)=>_g(e,{includeReplay:!0,...t,errorMessages:s}),l=a.createDialog({options:{...r,onFormClose:()=>{l?.close(),r.onFormClose?.()},onFormSubmitted:()=>{l?.close(),r.onFormSubmitted?.()}},screenshotIntegration:o,sendFeedback:c,shadow:Te(r)});return l},De=(e,t={})=>{let n=bg(xe,t),r=typeof e==`string`?z.querySelector(e):typeof e.addEventListener==`function`?e:null;if(!r)throw vg&&x.error(`[Feedback] Unable to attach to target element`),Error(`Unable to attach to target element`);let i=null,a=async()=>{i||=await Ee({...n,onFormSubmitted:()=>{i?.removeFromDom(),n.onFormSubmitted?.()}}),i.appendToDom(),i.open()};r.addEventListener(`click`,a);let o=()=>{we=we.filter(e=>e!==o),i?.removeFromDom(),i=null,r.removeEventListener(`click`,a)};return we.push(o),o},Oe=(e={})=>{let t=bg(xe,e),n=Te(t),r=Eg({triggerLabel:t.triggerLabel,triggerAriaLabel:t.triggerAriaLabel,shadow:n,styleNonce:p});return De(r.el,{...t,onFormOpen(){r.hide()},onFormClose(){r.show()},onFormSubmitted(){r.show()}}),r};return{name:`Feedback`,setupOnce(){!ys()||!xe.autoInject||(z.readyState===`loading`?z.addEventListener(`DOMContentLoaded`,()=>Oe().appendToDom()):Oe().appendToDom())},attachTo:De,createWidget(e={}){let t=Oe(bg(xe,e));return t.appendToDom(),t},async createForm(e={}){return Ee(bg(xe,e))},setTheme(e){if(xe.colorScheme=e,Se){let e=jg(xe);Ce?Se.replaceChild(e,Ce):Se.prepend(e),Ce=e}},remove(){Se&&(Se.parentElement?.remove(),Se=null,Ce=null),we.forEach(e=>e()),we=[]}}});function Ng(){return j()?.getIntegrationByName(`Feedback`)}var Pg,B,Fg,Ig,Lg,Rg,zg,Bg={},Vg=[],Hg=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ug=Array.isArray;function Wg(e,t){for(var n in t)e[n]=t[n];return e}function Gg(e){var t=e.parentNode;t&&t.removeChild(e)}function V(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?Pg.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return Kg(e,o,r,i,null)}function Kg(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++Fg,__i:-1,__u:0};return i==null&&B.vnode!=null&&B.vnode(a),a}function qg(e){return e.children}function Jg(e,t){this.props=e,this.context=t}function Yg(e,t){if(t==null)return e.__?Yg(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?Yg(e):null}function Xg(e,t,n){var r,i=e.__v,a=i.__e,o=e.__P;if(o)return(r=Wg({},i)).__v=i.__v+1,B.vnode&&B.vnode(r),c_(o,r,i,e.__n,o.ownerSVGElement!==void 0,32&i.__u?[a]:null,t,a??Yg(i),!!(32&i.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=a&&Zg(r),r}function Zg(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Zg(e)}}function Qg(e){(!e.__d&&(e.__d=!0)&&Ig.push(e)&&!$g.__r++||Lg!==B.debounceRendering)&&((Lg=B.debounceRendering)||Rg)($g)}function $g(){var e,t,n,r=[],i=[];for(Ig.sort(zg);e=Ig.shift();)e.__d&&(n=Ig.length,t=Xg(e,r,i)||t,n===0||Ig.length>n?(l_(r,t,i),i.length=r.length=0,t=void 0,Ig.sort(zg)):t&&B.__c&&B.__c(t,Vg));t&&l_(r,t,i),$g.__r=0}function e_(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g=r&&r.__k||Vg,_=t.length;for(n.__d=c,t_(n,t,g),c=n.__d,d=0;d<_;d++)(p=n.__k[d])!=null&&typeof p!=`boolean`&&typeof p!=`function`&&(f=p.__i===-1?Bg:g[p.__i]||Bg,p.__i=d,c_(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&d_(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),65536&p.__u||f.__k===p.__k?c=n_(p,c,e):typeof p.type==`function`&&p.__d!==void 0?c=p.__d:m&&(c=m.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=c,n.__e=h}function t_(e,t,n){var r,i,a,o,s,c=t.length,l=n.length,u=l,d=0;for(e.__k=[],r=0;r<c;r++)(i=e.__k[r]=(i=t[r])==null||typeof i==`boolean`||typeof i==`function`?null:typeof i==`string`||typeof i==`number`||typeof i==`bigint`||i.constructor==String?Kg(null,i,null,null,i):Ug(i)?Kg(qg,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?Kg(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)==null?(a=n[r])&&a.key==null&&a.__e&&(a.__e==e.__d&&(e.__d=Yg(a)),f_(a,a,!1),n[r]=null,u--):(i.__=e,i.__b=e.__b+1,s=r_(i,n,o=r+d,u),i.__i=s,a=null,s!==-1&&(u--,(a=n[s])&&(a.__u|=131072)),a==null||a.__v===null?(s==-1&&d--,typeof i.type!=`function`&&(i.__u|=65536)):s!==o&&(s===o+1?d++:s>o?u>c-o?d+=s-o:d--:d=s<o&&s==o-1?s-o:0,s!==r+d&&(i.__u|=65536)));if(u)for(r=0;r<l;r++)(a=n[r])!=null&&!(131072&a.__u)&&(a.__e==e.__d&&(e.__d=Yg(a)),f_(a,a))}function n_(e,t,n){var r,i;if(typeof e.type==`function`){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=n_(r[i],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType===8);return t}function r_(e,t,n,r){var i=e.key,a=e.type,o=n-1,s=n+1,c=t[n];if(c===null||c&&i==c.key&&a===c.type)return n;if(r>+(c!=null&&!(131072&c.__u)))for(;o>=0||s<t.length;){if(o>=0){if((c=t[o])&&!(131072&c.__u)&&i==c.key&&a===c.type)return o;o--}if(s<t.length){if((c=t[s])&&!(131072&c.__u)&&i==c.key&&a===c.type)return s;s++}}return-1}function i_(e,t,n){t[0]===`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||Hg.test(t)?n:n+`px`}function a_(e,t,n,r,i){var a;n:if(t===`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||i_(e.style,t,``);if(n)for(t in n)r&&n[t]===r[t]||i_(e.style,t,n[t])}else if(t[0]===`o`&&t[1]===`n`)a=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,`$1`)),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,a?s_:o_,a)):e.removeEventListener(t,a?s_:o_,a);else{if(i)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!==`width`&&t!==`height`&&t!==`href`&&t!==`list`&&t!==`form`&&t!==`tabIndex`&&t!==`download`&&t!==`rowSpan`&&t!==`colSpan`&&t!==`role`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!==`-`?e.removeAttribute(t):e.setAttribute(t,n))}}function o_(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(B.event?B.event(e):e)}}function s_(e){if(this.l)return this.l[e.type+!0](B.event?B.event(e):e)}function c_(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),a=[s=t.__e=n.__e]),(u=B.__b)&&u(t);n:if(typeof T==`function`)try{if(_=t.props,v=(u=T.contextType)&&r[u.__c],y=u?v?v.props.value:u.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:(`prototype`in T&&T.prototype.render?t.__c=d=new T(_,y):(t.__c=d=new Jg(_,y),d.constructor=T,d.render=p_),v&&v.sub(d),d.props=_,d.state||={},d.context=y,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),d.__s??=d.state,T.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Wg({},d.__s)),Wg(d.__s,T.getDerivedStateFromProps(_,d.__s))),p=d.props,m=d.state,d.__v=t,f)T.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(T.getDerivedStateFromProps==null&&_!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(_,y),!d.__e&&(d.shouldComponentUpdate!=null&&!1===d.shouldComponentUpdate(_,d.__s,y)||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=_,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),b=0;b<d._sb.length;b++)d.__h.push(d._sb[b]);d._sb=[],d.__h.length&&o.push(d);break n}d.componentWillUpdate!=null&&d.componentWillUpdate(_,d.__s,y),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,m,h)})}if(d.context=y,d.props=_,d.__P=e,d.__e=!1,x=B.__r,S=0,`prototype`in T&&T.prototype.render){for(d.state=d.__s,d.__d=!1,x&&x(t),u=d.render(d.props,d.state,d.context),C=0;C<d._sb.length;C++)d.__h.push(d._sb[C]);d._sb=[]}else do d.__d=!1,x&&x(t),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++S<25);d.state=d.__s,d.getChildContext!=null&&(r=Wg(Wg({},r),d.getChildContext())),f||d.getSnapshotBeforeUpdate==null||(h=d.getSnapshotBeforeUpdate(p,m)),e_(e,Ug(w=u!=null&&u.type===qg&&u.key==null?u.props.children:u)?w:[w],t,n,r,i,a,o,s,c,l),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),g&&(d.__E=d.__=null)}catch(e){t.__v=null,c||a!=null?(t.__e=s,t.__u|=c?160:32,a[a.indexOf(s)]=null):(t.__e=n.__e,t.__k=n.__k),B.__e(e,t,n)}else a==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=u_(n.__e,t,n,r,i,a,o,c,l);(u=B.diffed)&&u(t)}function l_(e,t,n){for(var r=0;r<n.length;r++)d_(n[r],n[++r],n[++r]);B.__c&&B.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){B.__e(e,t.__v)}})}function u_(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,m,h,g=n.props,_=t.props,v=t.type;if(v===`svg`&&(i=!0),a!=null){for(l=0;l<a.length;l++)if((p=a[l])&&`setAttribute`in p==!!v&&(v?p.localName===v:p.nodeType===3)){e=p,a[l]=null;break}}if(e==null){if(v===null)return document.createTextNode(_);e=i?document.createElementNS(`http://www.w3.org/2000/svg`,v):document.createElement(v,_.is&&_),a=null,s=!1}if(v===null)g===_||s&&e.data===_||(e.data=_);else{if(a&&=Pg.call(e.childNodes),g=n.props||Bg,!s&&a!=null)for(g={},l=0;l<e.attributes.length;l++)g[(p=e.attributes[l]).name]=p.value;for(l in g)p=g[l],l==`children`||(l==`dangerouslySetInnerHTML`?d=p:l===`key`||l in _||a_(e,l,null,p,i));for(l in _)p=_[l],l==`children`?f=p:l==`dangerouslySetInnerHTML`?u=p:l==`value`?m=p:l==`checked`?h=p:l===`key`||s&&typeof p!=`function`||g[l]===p||a_(e,l,p,g[l],i);if(u)s||d&&(u.__html===d.__html||u.__html===e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=``),e_(e,Ug(f)?f:[f],t,n,r,i&&v!==`foreignObject`,a,o,a?a[0]:n.__k&&Yg(n,0),s,c),a!=null)for(l=a.length;l--;)a[l]!=null&&Gg(a[l]);s||(l=`value`,m!==void 0&&(m!==e[l]||v===`progress`&&!m||v===`option`&&m!==g[l])&&a_(e,l,m,g[l],!1),l=`checked`,h!==void 0&&h!==e[l]&&a_(e,l,h,g[l],!1))}return e}function d_(e,t,n){try{typeof e==`function`?e(t):e.current=t}catch(e){B.__e(e,n)}}function f_(e,t,n){var r,i;if(B.unmount&&B.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||d_(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){B.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&f_(r[i],t,n||typeof e.type!=`function`);n||e.__e==null||Gg(e.__e),e.__=e.__e=e.__d=void 0}function p_(e,t,n){return this.constructor(e,n)}function m_(e,t,n){var r,i,a,o;B.__&&B.__(e,t),i=(r=!1)?null:t.__k,a=[],o=[],c_(t,e=t.__k=V(qg,null,[e]),i||Bg,Bg,t.ownerSVGElement!==void 0,i?null:t.firstChild?Pg.call(t.childNodes):null,a,i?i.__e:t.firstChild,r,o),e.__d=void 0,l_(a,e,o)}Pg=Vg.slice,B={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},Fg=0,Jg.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Wg({},this.state);typeof e==`function`&&(e=e(Wg({},n),this.props)),e&&Wg(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Qg(this))},Jg.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Qg(this))},Jg.prototype.render=qg,Ig=[],Rg=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,zg=function(e,t){return e.__v.__b-t.__v.__b},$g.__r=0;var h_,H,g_,__,v_=0,y_=[],b_=[],x_=B,S_=x_.__b,C_=x_.__r,w_=x_.diffed,T_=x_.__c,E_=x_.unmount,D_=x_.__;function O_(e,t){x_.__h&&x_.__h(H,e,v_||t),v_=0;var n=H.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({__V:b_}),n.__[e]}function k_(e){return v_=1,A_(q_,e)}function A_(e,t,n){var r=O_(h_++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):q_(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=H,!H.u)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return!!e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=!1;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),!(!o&&r.__c.props===e)&&(!a||a.call(this,e,t,n))};H.u=!0;var a=H.shouldComponentUpdate,o=H.componentWillUpdate;H.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},H.shouldComponentUpdate=i}return r.__N||r.__}function j_(e,t){var n=O_(h_++,3);!x_.__s&&K_(n.__H,t)&&(n.__=e,n.i=t,H.__H.__h.push(n))}function M_(e,t){var n=O_(h_++,4);!x_.__s&&K_(n.__H,t)&&(n.__=e,n.i=t,H.__h.push(n))}function N_(e){return v_=5,F_(function(){return{current:e}},[])}function P_(e,t,n){v_=6,M_(function(){return typeof e==`function`?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function F_(e,t){var n=O_(h_++,7);return K_(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function I_(e,t){return v_=8,F_(function(){return e},t)}function L_(e){var t=H.context[e.__c],n=O_(h_++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(H)),t.props.value):e.__}function R_(e,t){x_.useDebugValue&&x_.useDebugValue(t?t(e):e)}function z_(e){var t=O_(h_++,10),n=k_();return t.__=e,H.componentDidCatch||=function(e,r){t.__&&t.__(e,r),n[1](e)},[n[0],function(){n[1](void 0)}]}function B_(){var e=O_(h_++,11);if(!e.__){for(var t=H.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||=[0,0];e.__=`P`+n[0]+`-`+n[1]++}return e.__}function V_(){for(var e;e=y_.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(W_),e.__H.__h.forEach(G_),e.__H.__h=[]}catch(t){e.__H.__h=[],x_.__e(t,e.__v)}}x_.__b=function(e){H=null,S_&&S_(e)},x_.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),D_&&D_(e,t)},x_.__r=function(e){C_&&C_(e),h_=0;var t=(H=e.__c).__H;t&&(g_===H?(t.__h=[],H.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=b_,e.__N=e.i=void 0})):(t.__h.forEach(W_),t.__h.forEach(G_),t.__h=[],h_=0)),g_=H},x_.diffed=function(e){w_&&w_(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(y_.push(t)!==1&&__===x_.requestAnimationFrame||((__=x_.requestAnimationFrame)||U_)(V_)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==b_&&(e.__=e.__V),e.i=void 0,e.__V=b_})),g_=H=null},x_.__c=function(e,t){t.some(function(e){try{e.__h.forEach(W_),e.__h=e.__h.filter(function(e){return!e.__||G_(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],x_.__e(n,e.__v)}}),T_&&T_(e,t)},x_.unmount=function(e){E_&&E_(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{W_(e)}catch(e){t=e}}),n.__H=void 0,t&&x_.__e(t,n.__v))};var H_=typeof requestAnimationFrame==`function`;function U_(e){var t,n=function(){clearTimeout(r),H_&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);H_&&(t=requestAnimationFrame(n))}function W_(e){var t=H,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),H=t}function G_(e){var t=H;e.__c=e.__(),H=t}function K_(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function q_(e,t){return typeof t==`function`?t(e):t}var J_=Object.defineProperty({__proto__:null,useCallback:I_,useContext:L_,useDebugValue:R_,useEffect:j_,useErrorBoundary:z_,useId:B_,useImperativeHandle:P_,useLayoutEffect:M_,useMemo:F_,useReducer:A_,useRef:N_,useState:k_},Symbol.toStringTag,{value:`Module`}),Y_=`http://www.w3.org/2000/svg`;function X_(){let e=e=>z.createElementNS(Y_,e),t=Sg(e(`svg`),{width:`32`,height:`30`,viewBox:`0 0 72 66`,fill:`inherit`}),n=Sg(e(`path`),{transform:`translate(11, 11)`,d:`M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z`});return t.appendChild(n),t}function Z_({options:e}){let t=F_(()=>({__html:X_().outerHTML}),[]);return V(`h2`,{class:`dialog__header`},V(`span`,{class:`dialog__title`},e.formTitle),e.showBranding?V(`a`,{class:`brand-link`,target:`_blank`,href:`https://sentry.io/welcome/`,title:`Powered by Sentry`,rel:`noopener noreferrer`,dangerouslySetInnerHTML:t}):null)}function Q_(e,t){let n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}function $_(e,t){let n=e.get(t);return typeof n==`string`?n.trim():``}function ev({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:i,onSubmitSuccess:a,onSubmitError:o,showEmail:s,showName:c,screenshotInput:l}){let{tags:u,addScreenshotButtonLabel:d,removeScreenshotButtonLabel:f,cancelButtonLabel:p,emailLabel:m,emailPlaceholder:h,isEmailRequired:g,isNameRequired:_,messageLabel:v,messagePlaceholder:y,nameLabel:b,namePlaceholder:S,submitButtonLabel:C,isRequiredLabel:w}=e,[T,ee]=k_(!1),[te,ne]=k_(null),[re,ie]=k_(!1),ae=l?.input,[oe,se]=k_(null),E=I_(e=>{se(e),ie(!1)},[]),ce=I_(e=>{let t=Q_(e,{emailLabel:m,isEmailRequired:g,isNameRequired:_,messageLabel:v,nameLabel:b});return t.length>0?ne(`Please enter in the following required fields: ${t.join(`, `)}`):ne(null),t.length===0},[m,g,_,v,b]);return V(`form`,{class:`form`,onSubmit:I_(async e=>{ee(!0);try{if(e.preventDefault(),!(e.target instanceof HTMLFormElement))return;let t=new FormData(e.target),n=await(l&&re?l.value():void 0),r={name:$_(t,`name`),email:$_(t,`email`),message:$_(t,`message`),attachments:n?[n]:void 0};if(!ce(r))return;try{a(r,await i({name:r.name,email:r.email,message:r.message,source:dg,tags:u},{attachments:r.attachments}))}catch(e){vg&&x.error(e);let t=e instanceof Error?e:Error(String(e));ne(t.message),o(t)}}finally{ee(!1)}},[l&&re,a,o])},ae&&re?V(ae,{onError:E}):null,V(`fieldset`,{class:`form__right`,"data-sentry-feedback":!0,disabled:T},V(`div`,{class:`form__top`},te?V(`div`,{class:`form__error-container`},te):null,c?V(`label`,{for:`name`,class:`form__label`},V(tv,{label:b,isRequiredLabel:w,isRequired:_}),V(`input`,{class:`form__input`,defaultValue:n,id:`name`,name:`name`,placeholder:S,required:_,type:`text`})):V(`input`,{"aria-hidden":!0,value:n,name:`name`,type:`hidden`}),s?V(`label`,{for:`email`,class:`form__label`},V(tv,{label:m,isRequiredLabel:w,isRequired:g}),V(`input`,{class:`form__input`,defaultValue:t,id:`email`,name:`email`,placeholder:h,required:g,type:`email`})):V(`input`,{"aria-hidden":!0,value:t,name:`email`,type:`hidden`}),V(`label`,{for:`message`,class:`form__label`},V(tv,{label:v,isRequiredLabel:w,isRequired:!0}),V(`textarea`,{autoFocus:!0,class:`form__input form__input--textarea`,id:`message`,name:`message`,placeholder:y,required:!0,rows:5})),ae?V(`label`,{for:`screenshot`,class:`form__label`},V(`button`,{class:`btn btn--default`,disabled:T,type:`button`,onClick:()=>{se(null),ie(e=>!e)}},re?f:d),oe?V(`div`,{class:`form__error-container`},oe.message):null):null),V(`div`,{class:`btn-group`},V(`button`,{class:`btn btn--primary`,disabled:T,type:`submit`},C),V(`button`,{class:`btn btn--default`,disabled:T,type:`button`,onClick:r},p))))}function tv({label:e,isRequired:t,isRequiredLabel:n}){return V(`span`,{class:`form__label__text`},e,t&&V(`span`,{class:`form__label__text--required`},n))}var nv=16,rv=17,iv=`http://www.w3.org/2000/svg`;function av(){let e=e=>Bh.document.createElementNS(iv,e),t=Sg(e(`svg`),{width:`${nv}`,height:`${rv}`,viewBox:`0 0 ${nv} ${rv}`,fill:`inherit`}),n=Sg(e(`g`),{clipPath:`url(#clip0_57_156)`}),r=Sg(e(`path`),{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z`}),i=Sg(e(`path`),{d:`M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z`});t.appendChild(n).append(i,r);let a=e(`defs`),o=Sg(e(`clipPath`),{id:`clip0_57_156`}),s=Sg(e(`rect`),{width:`${nv}`,height:`${nv}`,fill:`white`,transform:`translate(0 0.5)`});return o.appendChild(s),a.appendChild(o),t.appendChild(a).appendChild(o).appendChild(s),t}function ov({open:e,onFormSubmitted:t,...n}){let r=n.options,i=F_(()=>({__html:av().outerHTML}),[]),[a,o]=k_(null),s=I_(()=>{a&&(clearTimeout(a),o(null)),t()},[a]),c=I_((e,r)=>{n.onSubmitSuccess(e,r),o(setTimeout(()=>{t(),o(null)},pg))},[t]);return V(qg,null,a?V(`div`,{class:`success__position`,onClick:s},V(`div`,{class:`success__content`},r.successMessageText,V(`span`,{class:`success__icon`,dangerouslySetInnerHTML:i}))):V(`dialog`,{class:`dialog`,onClick:r.onFormClose,open:e},V(`div`,{class:`dialog__position`},V(`div`,{class:`dialog__content`,onClick:e=>{e.stopPropagation()}},V(Z_,{options:r}),V(ev,{...n,onSubmitSuccess:c})))))}var sv=`
|
|
106
|
+
`,r&&i.setAttribute(`nonce`,r),i}var Mg=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>(({id:r=`sentry-feedback`,autoInject:i=!0,showBranding:a=!0,isEmailRequired:o=!1,isNameRequired:s=!1,showEmail:c=!0,showName:l=!0,enableScreenshot:u=!0,useSentryUser:d={email:`email`,name:`username`},tags:f,styleNonce:p,scriptNonce:m,colorScheme:h=`system`,themeLight:g={},themeDark:_={},addScreenshotButtonLabel:v=tg,cancelButtonLabel:y=Uh,confirmButtonLabel:b=Gh,emailLabel:S=Jh,emailPlaceholder:C=qh,formTitle:w=Kh,isRequiredLabel:T=eg,messageLabel:ee=Xh,messagePlaceholder:te=Yh,nameLabel:ne=Qh,namePlaceholder:re=Zh,removeScreenshotButtonLabel:ie=ng,submitButtonLabel:ae=Wh,successMessageText:oe=$h,triggerLabel:se=Hh,triggerAriaLabel:E=``,highlightToolText:ce=rg,hideToolText:le=ig,removeHighlightText:ue=ag,errorEmptyMessageText:de=og,errorNoClientText:fe=sg,errorTimeoutText:pe=cg,errorForbiddenText:me=lg,errorGenericText:he=ug,onFormOpen:ge,onFormClose:_e,onSubmitSuccess:ve,onSubmitError:ye,onFormSubmitted:be}={})=>{let xe={id:r,autoInject:i,showBranding:a,isEmailRequired:o,isNameRequired:s,showEmail:c,showName:l,enableScreenshot:u,useSentryUser:d,tags:f,styleNonce:p,scriptNonce:m,colorScheme:h,themeDark:_,themeLight:g,triggerLabel:se,triggerAriaLabel:E,cancelButtonLabel:y,submitButtonLabel:ae,confirmButtonLabel:b,formTitle:w,emailLabel:S,emailPlaceholder:C,messageLabel:ee,messagePlaceholder:te,nameLabel:ne,namePlaceholder:re,successMessageText:oe,isRequiredLabel:T,addScreenshotButtonLabel:v,removeScreenshotButtonLabel:ie,highlightToolText:ce,hideToolText:le,removeHighlightText:ue,errorEmptyMessageText:de,errorNoClientText:fe,errorTimeoutText:pe,errorForbiddenText:me,errorGenericText:he,onFormClose:_e,onFormOpen:ge,onSubmitError:ye,onSubmitSuccess:ve,onFormSubmitted:be},Se=null,Ce=null,we=[],Te=e=>{if(!Se){let t=z.createElement(`div`);t.id=String(e.id),z.body.appendChild(t),Se=t.attachShadow({mode:`open`}),Ce=jg(e),Se.appendChild(Ce)}return Se},Ee=async r=>{let i=r.enableScreenshot&&yg(),a,o;try{a=(t?t():await e(`feedbackModalIntegration`,m))(),ds(a)}catch{throw vg&&x.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),Error(`[Feedback] Missing feedback modal integration!`)}try{let t=i?n?n():await e(`feedbackScreenshotIntegration`,m):void 0;t&&(o=t(),ds(o))}catch{vg&&x.error(`[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.`)}let s={ERROR_EMPTY_MESSAGE:r.errorEmptyMessageText,ERROR_NO_CLIENT:r.errorNoClientText,ERROR_TIMEOUT:r.errorTimeoutText,ERROR_FORBIDDEN:r.errorForbiddenText,ERROR_GENERIC:r.errorGenericText},c=(e,t)=>_g(e,{includeReplay:!0,...t,errorMessages:s}),l=a.createDialog({options:{...r,onFormClose:()=>{l?.close(),r.onFormClose?.()},onFormSubmitted:()=>{l?.close(),r.onFormSubmitted?.()}},screenshotIntegration:o,sendFeedback:c,shadow:Te(r)});return l},De=(e,t={})=>{let n=bg(xe,t),r=typeof e==`string`?z.querySelector(e):typeof e.addEventListener==`function`?e:null;if(!r)throw vg&&x.error(`[Feedback] Unable to attach to target element`),Error(`Unable to attach to target element`);let i=null,a=async()=>{i||=await Ee({...n,onFormSubmitted:()=>{i?.removeFromDom(),n.onFormSubmitted?.()}}),i.appendToDom(),i.open()};r.addEventListener(`click`,a);let o=()=>{we=we.filter(e=>e!==o),i?.removeFromDom(),i=null,r.removeEventListener(`click`,a)};return we.push(o),o},Oe=(e={})=>{let t=bg(xe,e),n=Te(t),r=Eg({triggerLabel:t.triggerLabel,triggerAriaLabel:t.triggerAriaLabel,shadow:n,styleNonce:p});return De(r.el,{...t,onFormOpen(){r.hide()},onFormClose(){r.show()},onFormSubmitted(){r.show()}}),r};return{name:`Feedback`,setupOnce(){!xs()||!xe.autoInject||(z.readyState===`loading`?z.addEventListener(`DOMContentLoaded`,()=>Oe().appendToDom()):Oe().appendToDom())},attachTo:De,createWidget(e={}){let t=Oe(bg(xe,e));return t.appendToDom(),t},async createForm(e={}){return Ee(bg(xe,e))},setTheme(e){if(xe.colorScheme=e,Se){let e=jg(xe);Ce?Se.replaceChild(e,Ce):Se.prepend(e),Ce=e}},remove(){Se&&(Se.parentElement?.remove(),Se=null,Ce=null),we.forEach(e=>e()),we=[]}}});function Ng(){return j()?.getIntegrationByName(`Feedback`)}var Pg,B,Fg,Ig,Lg,Rg,zg,Bg={},Vg=[],Hg=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ug=Array.isArray;function Wg(e,t){for(var n in t)e[n]=t[n];return e}function Gg(e){var t=e.parentNode;t&&t.removeChild(e)}function V(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?Pg.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return Kg(e,o,r,i,null)}function Kg(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++Fg,__i:-1,__u:0};return i==null&&B.vnode!=null&&B.vnode(a),a}function qg(e){return e.children}function Jg(e,t){this.props=e,this.context=t}function Yg(e,t){if(t==null)return e.__?Yg(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?Yg(e):null}function Xg(e,t,n){var r,i=e.__v,a=i.__e,o=e.__P;if(o)return(r=Wg({},i)).__v=i.__v+1,B.vnode&&B.vnode(r),c_(o,r,i,e.__n,o.ownerSVGElement!==void 0,32&i.__u?[a]:null,t,a??Yg(i),!!(32&i.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=a&&Zg(r),r}function Zg(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Zg(e)}}function Qg(e){(!e.__d&&(e.__d=!0)&&Ig.push(e)&&!$g.__r++||Lg!==B.debounceRendering)&&((Lg=B.debounceRendering)||Rg)($g)}function $g(){var e,t,n,r=[],i=[];for(Ig.sort(zg);e=Ig.shift();)e.__d&&(n=Ig.length,t=Xg(e,r,i)||t,n===0||Ig.length>n?(l_(r,t,i),i.length=r.length=0,t=void 0,Ig.sort(zg)):t&&B.__c&&B.__c(t,Vg));t&&l_(r,t,i),$g.__r=0}function e_(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g=r&&r.__k||Vg,_=t.length;for(n.__d=c,t_(n,t,g),c=n.__d,d=0;d<_;d++)(p=n.__k[d])!=null&&typeof p!=`boolean`&&typeof p!=`function`&&(f=p.__i===-1?Bg:g[p.__i]||Bg,p.__i=d,c_(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&d_(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),65536&p.__u||f.__k===p.__k?c=n_(p,c,e):typeof p.type==`function`&&p.__d!==void 0?c=p.__d:m&&(c=m.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=c,n.__e=h}function t_(e,t,n){var r,i,a,o,s,c=t.length,l=n.length,u=l,d=0;for(e.__k=[],r=0;r<c;r++)(i=e.__k[r]=(i=t[r])==null||typeof i==`boolean`||typeof i==`function`?null:typeof i==`string`||typeof i==`number`||typeof i==`bigint`||i.constructor==String?Kg(null,i,null,null,i):Ug(i)?Kg(qg,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?Kg(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)==null?(a=n[r])&&a.key==null&&a.__e&&(a.__e==e.__d&&(e.__d=Yg(a)),f_(a,a,!1),n[r]=null,u--):(i.__=e,i.__b=e.__b+1,s=r_(i,n,o=r+d,u),i.__i=s,a=null,s!==-1&&(u--,(a=n[s])&&(a.__u|=131072)),a==null||a.__v===null?(s==-1&&d--,typeof i.type!=`function`&&(i.__u|=65536)):s!==o&&(s===o+1?d++:s>o?u>c-o?d+=s-o:d--:d=s<o&&s==o-1?s-o:0,s!==r+d&&(i.__u|=65536)));if(u)for(r=0;r<l;r++)(a=n[r])!=null&&!(131072&a.__u)&&(a.__e==e.__d&&(e.__d=Yg(a)),f_(a,a))}function n_(e,t,n){var r,i;if(typeof e.type==`function`){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=n_(r[i],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType===8);return t}function r_(e,t,n,r){var i=e.key,a=e.type,o=n-1,s=n+1,c=t[n];if(c===null||c&&i==c.key&&a===c.type)return n;if(r>+(c!=null&&!(131072&c.__u)))for(;o>=0||s<t.length;){if(o>=0){if((c=t[o])&&!(131072&c.__u)&&i==c.key&&a===c.type)return o;o--}if(s<t.length){if((c=t[s])&&!(131072&c.__u)&&i==c.key&&a===c.type)return s;s++}}return-1}function i_(e,t,n){t[0]===`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||Hg.test(t)?n:n+`px`}function a_(e,t,n,r,i){var a;n:if(t===`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||i_(e.style,t,``);if(n)for(t in n)r&&n[t]===r[t]||i_(e.style,t,n[t])}else if(t[0]===`o`&&t[1]===`n`)a=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,`$1`)),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,a?s_:o_,a)):e.removeEventListener(t,a?s_:o_,a);else{if(i)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!==`width`&&t!==`height`&&t!==`href`&&t!==`list`&&t!==`form`&&t!==`tabIndex`&&t!==`download`&&t!==`rowSpan`&&t!==`colSpan`&&t!==`role`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!==`-`?e.removeAttribute(t):e.setAttribute(t,n))}}function o_(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(B.event?B.event(e):e)}}function s_(e){if(this.l)return this.l[e.type+!0](B.event?B.event(e):e)}function c_(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),a=[s=t.__e=n.__e]),(u=B.__b)&&u(t);n:if(typeof T==`function`)try{if(_=t.props,v=(u=T.contextType)&&r[u.__c],y=u?v?v.props.value:u.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:(`prototype`in T&&T.prototype.render?t.__c=d=new T(_,y):(t.__c=d=new Jg(_,y),d.constructor=T,d.render=p_),v&&v.sub(d),d.props=_,d.state||={},d.context=y,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),d.__s??=d.state,T.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Wg({},d.__s)),Wg(d.__s,T.getDerivedStateFromProps(_,d.__s))),p=d.props,m=d.state,d.__v=t,f)T.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(T.getDerivedStateFromProps==null&&_!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(_,y),!d.__e&&(d.shouldComponentUpdate!=null&&!1===d.shouldComponentUpdate(_,d.__s,y)||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=_,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),b=0;b<d._sb.length;b++)d.__h.push(d._sb[b]);d._sb=[],d.__h.length&&o.push(d);break n}d.componentWillUpdate!=null&&d.componentWillUpdate(_,d.__s,y),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,m,h)})}if(d.context=y,d.props=_,d.__P=e,d.__e=!1,x=B.__r,S=0,`prototype`in T&&T.prototype.render){for(d.state=d.__s,d.__d=!1,x&&x(t),u=d.render(d.props,d.state,d.context),C=0;C<d._sb.length;C++)d.__h.push(d._sb[C]);d._sb=[]}else do d.__d=!1,x&&x(t),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++S<25);d.state=d.__s,d.getChildContext!=null&&(r=Wg(Wg({},r),d.getChildContext())),f||d.getSnapshotBeforeUpdate==null||(h=d.getSnapshotBeforeUpdate(p,m)),e_(e,Ug(w=u!=null&&u.type===qg&&u.key==null?u.props.children:u)?w:[w],t,n,r,i,a,o,s,c,l),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),g&&(d.__E=d.__=null)}catch(e){t.__v=null,c||a!=null?(t.__e=s,t.__u|=c?160:32,a[a.indexOf(s)]=null):(t.__e=n.__e,t.__k=n.__k),B.__e(e,t,n)}else a==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=u_(n.__e,t,n,r,i,a,o,c,l);(u=B.diffed)&&u(t)}function l_(e,t,n){for(var r=0;r<n.length;r++)d_(n[r],n[++r],n[++r]);B.__c&&B.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){B.__e(e,t.__v)}})}function u_(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,m,h,g=n.props,_=t.props,v=t.type;if(v===`svg`&&(i=!0),a!=null){for(l=0;l<a.length;l++)if((p=a[l])&&`setAttribute`in p==!!v&&(v?p.localName===v:p.nodeType===3)){e=p,a[l]=null;break}}if(e==null){if(v===null)return document.createTextNode(_);e=i?document.createElementNS(`http://www.w3.org/2000/svg`,v):document.createElement(v,_.is&&_),a=null,s=!1}if(v===null)g===_||s&&e.data===_||(e.data=_);else{if(a&&=Pg.call(e.childNodes),g=n.props||Bg,!s&&a!=null)for(g={},l=0;l<e.attributes.length;l++)g[(p=e.attributes[l]).name]=p.value;for(l in g)p=g[l],l==`children`||(l==`dangerouslySetInnerHTML`?d=p:l===`key`||l in _||a_(e,l,null,p,i));for(l in _)p=_[l],l==`children`?f=p:l==`dangerouslySetInnerHTML`?u=p:l==`value`?m=p:l==`checked`?h=p:l===`key`||s&&typeof p!=`function`||g[l]===p||a_(e,l,p,g[l],i);if(u)s||d&&(u.__html===d.__html||u.__html===e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=``),e_(e,Ug(f)?f:[f],t,n,r,i&&v!==`foreignObject`,a,o,a?a[0]:n.__k&&Yg(n,0),s,c),a!=null)for(l=a.length;l--;)a[l]!=null&&Gg(a[l]);s||(l=`value`,m!==void 0&&(m!==e[l]||v===`progress`&&!m||v===`option`&&m!==g[l])&&a_(e,l,m,g[l],!1),l=`checked`,h!==void 0&&h!==e[l]&&a_(e,l,h,g[l],!1))}return e}function d_(e,t,n){try{typeof e==`function`?e(t):e.current=t}catch(e){B.__e(e,n)}}function f_(e,t,n){var r,i;if(B.unmount&&B.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||d_(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){B.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&f_(r[i],t,n||typeof e.type!=`function`);n||e.__e==null||Gg(e.__e),e.__=e.__e=e.__d=void 0}function p_(e,t,n){return this.constructor(e,n)}function m_(e,t,n){var r,i,a,o;B.__&&B.__(e,t),i=(r=!1)?null:t.__k,a=[],o=[],c_(t,e=t.__k=V(qg,null,[e]),i||Bg,Bg,t.ownerSVGElement!==void 0,i?null:t.firstChild?Pg.call(t.childNodes):null,a,i?i.__e:t.firstChild,r,o),e.__d=void 0,l_(a,e,o)}Pg=Vg.slice,B={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},Fg=0,Jg.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Wg({},this.state);typeof e==`function`&&(e=e(Wg({},n),this.props)),e&&Wg(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Qg(this))},Jg.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Qg(this))},Jg.prototype.render=qg,Ig=[],Rg=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,zg=function(e,t){return e.__v.__b-t.__v.__b},$g.__r=0;var h_,H,g_,__,v_=0,y_=[],b_=[],x_=B,S_=x_.__b,C_=x_.__r,w_=x_.diffed,T_=x_.__c,E_=x_.unmount,D_=x_.__;function O_(e,t){x_.__h&&x_.__h(H,e,v_||t),v_=0;var n=H.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({__V:b_}),n.__[e]}function k_(e){return v_=1,A_(q_,e)}function A_(e,t,n){var r=O_(h_++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):q_(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=H,!H.u)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return!!e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=!1;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),!(!o&&r.__c.props===e)&&(!a||a.call(this,e,t,n))};H.u=!0;var a=H.shouldComponentUpdate,o=H.componentWillUpdate;H.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},H.shouldComponentUpdate=i}return r.__N||r.__}function j_(e,t){var n=O_(h_++,3);!x_.__s&&K_(n.__H,t)&&(n.__=e,n.i=t,H.__H.__h.push(n))}function M_(e,t){var n=O_(h_++,4);!x_.__s&&K_(n.__H,t)&&(n.__=e,n.i=t,H.__h.push(n))}function N_(e){return v_=5,F_(function(){return{current:e}},[])}function P_(e,t,n){v_=6,M_(function(){return typeof e==`function`?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function F_(e,t){var n=O_(h_++,7);return K_(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function I_(e,t){return v_=8,F_(function(){return e},t)}function L_(e){var t=H.context[e.__c],n=O_(h_++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(H)),t.props.value):e.__}function R_(e,t){x_.useDebugValue&&x_.useDebugValue(t?t(e):e)}function z_(e){var t=O_(h_++,10),n=k_();return t.__=e,H.componentDidCatch||=function(e,r){t.__&&t.__(e,r),n[1](e)},[n[0],function(){n[1](void 0)}]}function B_(){var e=O_(h_++,11);if(!e.__){for(var t=H.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||=[0,0];e.__=`P`+n[0]+`-`+n[1]++}return e.__}function V_(){for(var e;e=y_.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(W_),e.__H.__h.forEach(G_),e.__H.__h=[]}catch(t){e.__H.__h=[],x_.__e(t,e.__v)}}x_.__b=function(e){H=null,S_&&S_(e)},x_.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),D_&&D_(e,t)},x_.__r=function(e){C_&&C_(e),h_=0;var t=(H=e.__c).__H;t&&(g_===H?(t.__h=[],H.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=b_,e.__N=e.i=void 0})):(t.__h.forEach(W_),t.__h.forEach(G_),t.__h=[],h_=0)),g_=H},x_.diffed=function(e){w_&&w_(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(y_.push(t)!==1&&__===x_.requestAnimationFrame||((__=x_.requestAnimationFrame)||U_)(V_)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==b_&&(e.__=e.__V),e.i=void 0,e.__V=b_})),g_=H=null},x_.__c=function(e,t){t.some(function(e){try{e.__h.forEach(W_),e.__h=e.__h.filter(function(e){return!e.__||G_(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],x_.__e(n,e.__v)}}),T_&&T_(e,t)},x_.unmount=function(e){E_&&E_(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{W_(e)}catch(e){t=e}}),n.__H=void 0,t&&x_.__e(t,n.__v))};var H_=typeof requestAnimationFrame==`function`;function U_(e){var t,n=function(){clearTimeout(r),H_&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);H_&&(t=requestAnimationFrame(n))}function W_(e){var t=H,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),H=t}function G_(e){var t=H;e.__c=e.__(),H=t}function K_(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function q_(e,t){return typeof t==`function`?t(e):t}var J_=Object.defineProperty({__proto__:null,useCallback:I_,useContext:L_,useDebugValue:R_,useEffect:j_,useErrorBoundary:z_,useId:B_,useImperativeHandle:P_,useLayoutEffect:M_,useMemo:F_,useReducer:A_,useRef:N_,useState:k_},Symbol.toStringTag,{value:`Module`}),Y_=`http://www.w3.org/2000/svg`;function X_(){let e=e=>z.createElementNS(Y_,e),t=Sg(e(`svg`),{width:`32`,height:`30`,viewBox:`0 0 72 66`,fill:`inherit`}),n=Sg(e(`path`),{transform:`translate(11, 11)`,d:`M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z`});return t.appendChild(n),t}function Z_({options:e}){let t=F_(()=>({__html:X_().outerHTML}),[]);return V(`h2`,{class:`dialog__header`},V(`span`,{class:`dialog__title`},e.formTitle),e.showBranding?V(`a`,{class:`brand-link`,target:`_blank`,href:`https://sentry.io/welcome/`,title:`Powered by Sentry`,rel:`noopener noreferrer`,dangerouslySetInnerHTML:t}):null)}function Q_(e,t){let n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}function $_(e,t){let n=e.get(t);return typeof n==`string`?n.trim():``}function ev({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:i,onSubmitSuccess:a,onSubmitError:o,showEmail:s,showName:c,screenshotInput:l}){let{tags:u,addScreenshotButtonLabel:d,removeScreenshotButtonLabel:f,cancelButtonLabel:p,emailLabel:m,emailPlaceholder:h,isEmailRequired:g,isNameRequired:_,messageLabel:v,messagePlaceholder:y,nameLabel:b,namePlaceholder:S,submitButtonLabel:C,isRequiredLabel:w}=e,[T,ee]=k_(!1),[te,ne]=k_(null),[re,ie]=k_(!1),ae=l?.input,[oe,se]=k_(null),E=I_(e=>{se(e),ie(!1)},[]),ce=I_(e=>{let t=Q_(e,{emailLabel:m,isEmailRequired:g,isNameRequired:_,messageLabel:v,nameLabel:b});return t.length>0?ne(`Please enter in the following required fields: ${t.join(`, `)}`):ne(null),t.length===0},[m,g,_,v,b]);return V(`form`,{class:`form`,onSubmit:I_(async e=>{ee(!0);try{if(e.preventDefault(),!(e.target instanceof HTMLFormElement))return;let t=new FormData(e.target),n=await(l&&re?l.value():void 0),r={name:$_(t,`name`),email:$_(t,`email`),message:$_(t,`message`),attachments:n?[n]:void 0};if(!ce(r))return;try{a(r,await i({name:r.name,email:r.email,message:r.message,source:dg,tags:u},{attachments:r.attachments}))}catch(e){vg&&x.error(e);let t=e instanceof Error?e:Error(String(e));ne(t.message),o(t)}}finally{ee(!1)}},[l&&re,a,o])},ae&&re?V(ae,{onError:E}):null,V(`fieldset`,{class:`form__right`,"data-sentry-feedback":!0,disabled:T},V(`div`,{class:`form__top`},te?V(`div`,{class:`form__error-container`},te):null,c?V(`label`,{for:`name`,class:`form__label`},V(tv,{label:b,isRequiredLabel:w,isRequired:_}),V(`input`,{class:`form__input`,defaultValue:n,id:`name`,name:`name`,placeholder:S,required:_,type:`text`})):V(`input`,{"aria-hidden":!0,value:n,name:`name`,type:`hidden`}),s?V(`label`,{for:`email`,class:`form__label`},V(tv,{label:m,isRequiredLabel:w,isRequired:g}),V(`input`,{class:`form__input`,defaultValue:t,id:`email`,name:`email`,placeholder:h,required:g,type:`email`})):V(`input`,{"aria-hidden":!0,value:t,name:`email`,type:`hidden`}),V(`label`,{for:`message`,class:`form__label`},V(tv,{label:v,isRequiredLabel:w,isRequired:!0}),V(`textarea`,{autoFocus:!0,class:`form__input form__input--textarea`,id:`message`,name:`message`,placeholder:y,required:!0,rows:5})),ae?V(`label`,{for:`screenshot`,class:`form__label`},V(`button`,{class:`btn btn--default`,disabled:T,type:`button`,onClick:()=>{se(null),ie(e=>!e)}},re?f:d),oe?V(`div`,{class:`form__error-container`},oe.message):null):null),V(`div`,{class:`btn-group`},V(`button`,{class:`btn btn--primary`,disabled:T,type:`submit`},C),V(`button`,{class:`btn btn--default`,disabled:T,type:`button`,onClick:r},p))))}function tv({label:e,isRequired:t,isRequiredLabel:n}){return V(`span`,{class:`form__label__text`},e,t&&V(`span`,{class:`form__label__text--required`},n))}var nv=16,rv=17,iv=`http://www.w3.org/2000/svg`;function av(){let e=e=>Bh.document.createElementNS(iv,e),t=Sg(e(`svg`),{width:`${nv}`,height:`${rv}`,viewBox:`0 0 ${nv} ${rv}`,fill:`inherit`}),n=Sg(e(`g`),{clipPath:`url(#clip0_57_156)`}),r=Sg(e(`path`),{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z`}),i=Sg(e(`path`),{d:`M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z`});t.appendChild(n).append(i,r);let a=e(`defs`),o=Sg(e(`clipPath`),{id:`clip0_57_156`}),s=Sg(e(`rect`),{width:`${nv}`,height:`${nv}`,fill:`white`,transform:`translate(0 0.5)`});return o.appendChild(s),a.appendChild(o),t.appendChild(a).appendChild(o).appendChild(s),t}function ov({open:e,onFormSubmitted:t,...n}){let r=n.options,i=F_(()=>({__html:av().outerHTML}),[]),[a,o]=k_(null),s=I_(()=>{a&&(clearTimeout(a),o(null)),t()},[a]),c=I_((e,r)=>{n.onSubmitSuccess(e,r),o(setTimeout(()=>{t(),o(null)},pg))},[t]);return V(qg,null,a?V(`div`,{class:`success__position`,onClick:s},V(`div`,{class:`success__content`},r.successMessageText,V(`span`,{class:`success__icon`,dangerouslySetInnerHTML:i}))):V(`dialog`,{class:`dialog`,onClick:r.onFormClose,open:e},V(`div`,{class:`dialog__position`},V(`div`,{class:`dialog__content`,onClick:e=>{e.stopPropagation()}},V(Z_,{options:r}),V(ev,{...n,onSubmitSuccess:c})))))}var sv=`
|
|
107
107
|
.dialog {
|
|
108
108
|
position: fixed;
|
|
109
109
|
z-index: var(--z-index);
|
|
@@ -393,7 +393,7 @@ ${cv}
|
|
|
393
393
|
${lv}
|
|
394
394
|
${uv}
|
|
395
395
|
${dv}
|
|
396
|
-
`,e&&t.setAttribute(`nonce`,e),t}function pv(){let e=k().getUser(),t=A().getUser(),n=
|
|
396
|
+
`,e&&t.setAttribute(`nonce`,e),t}function pv(){let e=k().getUser(),t=A().getUser(),n=fn().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}var mv=(()=>({name:`FeedbackModal`,setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{let i=r,a=e.useSentryUser,o=pv(),s=z.createElement(`div`),c=fv(e.styleNonce),l=``,u={get el(){return s},appendToDom(){!i.contains(c)&&!i.contains(s)&&(i.appendChild(c),i.appendChild(s))},removeFromDom(){s.remove(),c.remove(),z.body.style.overflow=l},open(){f(!0),e.onFormOpen?.(),j()?.emit(`openFeedbackWidget`),l=z.body.style.overflow,z.body.style.overflow=`hidden`},close(){f(!1),z.body.style.overflow=l}},d=t?.createInput({h:V,hooks:J_,dialog:u,options:e}),f=t=>{m_(V(ov,{options:e,screenshotInput:d,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:String(a&&o?.[a.name]||``),defaultEmail:String(a&&o?.[a.email]||``),onFormClose:()=>{f(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(t,n)=>{f(!1),e.onSubmitSuccess?.(t,n)},onSubmitError:t=>{e.onSubmitError?.(t)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:t}),s)};return u}}));function hv({h:e}){return function(){return e(`svg`,{"data-test-id":`icon-close`,viewBox:`0 0 16 16`,fill:`#2B2233`,height:`25px`,width:`25px`},e(`circle`,{r:`7`,cx:`8`,cy:`8`,fill:`white`}),e(`path`,{strokeWidth:`1.5`,d:`M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM8,1.53A6.47,6.47,0,1,0,14.47,8,6.47,6.47,0,0,0,8,1.53Z`}),e(`path`,{strokeWidth:`1.5`,d:`M5.34,11.41a.71.71,0,0,1-.53-.22.74.74,0,0,1,0-1.06l5.32-5.32a.75.75,0,0,1,1.06,1.06L5.87,11.19A.74.74,0,0,1,5.34,11.41Z`}),e(`path`,{strokeWidth:`1.5`,d:`M10.66,11.41a.74.74,0,0,1-.53-.22L4.81,5.87A.75.75,0,0,1,5.87,4.81l5.32,5.32a.74.74,0,0,1,0,1.06A.71.71,0,0,1,10.66,11.41Z`}))}}function gv(e){let t=z.createElement(`style`),n=`#1A141F`,r=`#302735`;return t.textContent=`
|
|
397
397
|
.editor {
|
|
398
398
|
display: flex;
|
|
399
399
|
flex-grow: 1;
|
|
@@ -485,17 +485,17 @@ ${dv}
|
|
|
485
485
|
.editor__rect:hover button {
|
|
486
486
|
opacity: 1;
|
|
487
487
|
}
|
|
488
|
-
`,e&&t.setAttribute(`nonce`,e),t}function _v({h:e}){return function({action:t,setAction:n,options:r}){return e(`div`,{class:`editor__tool-container`},e(`div`,{class:`editor__tool-bar`},e(`button`,{type:`button`,class:`editor__tool ${t===`highlight`?`editor__tool--active`:``}`,onClick:()=>{n(t===`highlight`?``:`highlight`)}},r.highlightToolText),e(`button`,{type:`button`,class:`editor__tool ${t===`hide`?`editor__tool--active`:``}`,onClick:()=>{n(t===`hide`?``:`hide`)}},r.hideToolText)))}}function vv({hooks:e}){function t(){let[t,n]=e.useState(Bh.devicePixelRatio??1);return e.useEffect(()=>{let e=()=>{n(Bh.devicePixelRatio)},t=matchMedia(`(resolution: ${Bh.devicePixelRatio}dppx)`);return t.addEventListener(`change`,e),()=>{t.removeEventListener(`change`,e)}},[]),t}return function({onBeforeScreenshot:n,onScreenshot:r,onAfterScreenshot:i,onError:a}){let o=t();e.useEffect(()=>{(async()=>{n();let e=await Vh.mediaDevices.getDisplayMedia({video:{width:Bh.innerWidth*o,height:Bh.innerHeight*o},audio:!1,monitorTypeSurfaces:`exclude`,preferCurrentTab:!0,selfBrowserSurface:`include`,surfaceSwitching:`exclude`}),t=z.createElement(`video`);await new Promise((n,i)=>{t.srcObject=e,t.onloadedmetadata=()=>{r(t,o),e.getTracks().forEach(e=>e.stop()),n()},t.play().catch(i)}),i()})().catch(a)},[])}}function yv(e,t,n){switch(e.type){case`highlight`:t.shadowColor=`rgba(0, 0, 0, 0.7)`,t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h);break;case`hide`:t.fillStyle=`rgb(0, 0, 0)`,t.fillRect(e.x,e.y,e.w,e.h);break}}function bv(e,t,n){if(!e)return;let r=e.getContext(`2d`,t);r&&n(e,r)}function xv(e,t){bv(e,{alpha:!0},(e,n)=>{n.drawImage(t,0,0,t.width,t.height,0,0,e.width,e.height)})}function Sv(e,t,n){bv(e,{alpha:!0},(e,r)=>{n.length&&(r.fillStyle=`rgba(0, 0, 0, 0.25)`,r.fillRect(0,0,e.width,e.height)),n.forEach(e=>{yv(e,r,t)})})}function Cv({h:e,hooks:t,outputBuffer:n,dialog:r,options:i}){let a=vv({hooks:t}),o=_v({h:e}),s=hv({h:e}),c={__html:gv(i.styleNonce).innerText},l=r.el.style,u=({screenshot:r})=>{let[a,l]=t.useState(`highlight`),[u,d]=t.useState([]),f=t.useRef(null),p=t.useRef(null),m=t.useRef(null),h=t.useRef(null),[g,_]=t.useState(1),v=t.useMemo(()=>{let e=z.getElementById(i.id);if(!e)return`white`;let t=getComputedStyle(e);return t.getPropertyValue(`--button-primary-background`)||t.getPropertyValue(`--accent-background`)},[i.id]);t.useLayoutEffect(()=>{let e=()=>{let t=f.current;t&&(bv(r.canvas,{alpha:!1},e=>{let n=Math.min(t.clientWidth/e.width,t.clientHeight/e.height);_(n)}),(t.clientHeight===0||t.clientWidth===0)&&setTimeout(e,0))};return e(),Bh.addEventListener(`resize`,e),()=>{Bh.removeEventListener(`resize`,e)}},[r]);let y=t.useCallback((e,t)=>{bv(e,{alpha:!0},(e,n)=>{n.scale(t,t),e.width=r.canvas.width,e.height=r.canvas.height})},[r]);t.useEffect(()=>{y(p.current,r.dpi),xv(p.current,r.canvas)},[r]),t.useEffect(()=>{y(m.current,r.dpi),bv(m.current,{alpha:!0},(e,t)=>{t.clearRect(0,0,e.width,e.height)}),Sv(m.current,v,u)},[u,v]),t.useEffect(()=>{y(n,r.dpi),xv(n,r.canvas),bv(z.createElement(`canvas`),{alpha:!0},(e,t)=>{t.scale(r.dpi,r.dpi),e.width=r.canvas.width,e.height=r.canvas.height,Sv(e,v,u),xv(n,e)})},[u,r,v]);let b=e=>{if(!a||!h.current)return;let t=h.current.getBoundingClientRect(),n={type:a,x:e.offsetX/g,y:e.offsetY/g},r=(e,n)=>{let r=(n.clientX-t.x)/g,i=(n.clientY-t.y)/g;return{type:e.type,x:Math.min(e.x,r),y:Math.min(e.y,i),w:Math.abs(r-e.x),h:Math.abs(i-e.y)}},i=e=>{bv(m.current,{alpha:!0},(e,t)=>{t.clearRect(0,0,e.width,e.height)}),Sv(m.current,v,[...u,r(n,e)])},o=e=>{let t=r(n,e);t.w*g>=1&&t.h*g>=1&&d(e=>[...e,t]),z.removeEventListener(`mousemove`,i),z.removeEventListener(`mouseup`,o)};z.addEventListener(`mousemove`,i),z.addEventListener(`mouseup`,o)},x=t.useCallback(e=>t=>{t.preventDefault(),t.stopPropagation(),d(t=>{let n=[...t];return n.splice(e,1),n})},[]),S={width:`${r.canvas.width*g}px`,height:`${r.canvas.height*g}px`},C=e=>{e.stopPropagation()};return e(`div`,{class:`editor`},e(`style`,{nonce:i.styleNonce,dangerouslySetInnerHTML:c}),e(`div`,{class:`editor__image-container`},e(`div`,{class:`editor__canvas-container`,ref:f},e(`canvas`,{ref:p,id:`background`,style:S}),e(`canvas`,{ref:m,id:`foreground`,style:S}),e(`div`,{ref:h,onMouseDown:b,style:S},u.map((t,n)=>e(`div`,{key:n,class:`editor__rect`,style:{top:`${t.y*g}px`,left:`${t.x*g}px`,width:`${t.w*g}px`,height:`${t.h*g}px`}},e(`button`,{"aria-label":i.removeHighlightText,onClick:x(n),onMouseDown:C,onMouseUp:C,type:`button`},e(s,null))))))),e(o,{options:i,action:a,setAction:l}))};return function({onError:r}){let[i,o]=t.useState();return a({onBeforeScreenshot:t.useCallback(()=>{l.display=`none`},[]),onScreenshot:t.useCallback((e,t)=>{bv(z.createElement(`canvas`),{alpha:!1},(n,r)=>{r.scale(t,t),n.width=e.videoWidth,n.height=e.videoHeight,r.drawImage(e,0,0,n.width,n.height),o({canvas:n,dpi:t})}),n.width=e.videoWidth,n.height=e.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{l.display=`block`},[]),onError:t.useCallback(e=>{l.display=`block`,r(e)},[])}),i?e(u,{screenshot:i}):e(`div`,null)}}var wv=(()=>({name:`FeedbackScreenshot`,setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{let i=z.createElement(`canvas`);return{input:Cv({h:e,hooks:t,outputBuffer:i,dialog:n,options:r}),value:async()=>{let e=await new Promise(e=>{i.toBlob(e,`image/png`)});if(e)return{data:new Uint8Array(await e.arrayBuffer()),filename:`screenshot.png`,contentType:`application/png`}}}}})),U=i,Tv=0;function Ev(){return Tv>0}function Dv(){Tv++,setTimeout(()=>{Tv--})}function Ov(e,t={}){function n(e){return typeof e==`function`}if(!n(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,`__sentry_wrapped__`)){let t=e.__sentry_wrapped__;return typeof t==`function`?t:e}if(Fe(e))return e}catch{return e}let r=function(...n){i._sentryWrappedDepth=(i._sentryWrappedDepth||0)+1;try{let r=n.map(e=>Ov(e,t));return e.apply(this,r)}catch(e){throw Dv(),fn(r=>{r.addEventProcessor(e=>(t.mechanism&&(gt(e,void 0,void 0),_t(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),L(e)}),e}finally{i._sentryWrappedDepth=(i._sentryWrappedDepth||0)-1}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch{}Pe(r,e),D(e,`__sentry_wrapped__`,r);try{Object.getOwnPropertyDescriptor(r,`name`).configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function kv(){let e=Ph(),{referrer:t}=U.document||{},{userAgent:n}=U.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}var Av=[`replayIntegration`,`replayCanvasIntegration`,`feedbackIntegration`,`feedbackModalIntegration`,`feedbackScreenshotIntegration`,`captureConsoleIntegration`,`contextLinesIntegration`,`linkedErrorsIntegration`,`dedupeIntegration`,`extraErrorDataIntegration`,`graphqlClientIntegration`,`httpClientIntegration`,`reportingObserverIntegration`,`rewriteFramesIntegration`,`browserProfilingIntegration`,`moduleMetadataIntegration`,`instrumentAnthropicAiClient`,`instrumentOpenAiClient`,`instrumentGoogleGenAIClient`,`instrumentLangGraph`,`createLangChainCallbackHandler`,`instrumentLangChainEmbeddings`],jv={replayCanvasIntegration:`replay-canvas`,feedbackModalIntegration:`feedback-modal`,feedbackScreenshotIntegration:`feedback-screenshot`};function Mv(e){return jv[e]||e.replace(`Integration`,``).toLowerCase()}var Nv=U;async function Pv(e,t){let n=Av.includes(e)?Mv(e):void 0,r=Nv.Sentry=Nv.Sentry||{};if(!n)throw Error(`Cannot lazy load integration: ${e}`);let i=r[e];if(typeof i==`function`&&!(`_isShim`in i))return i;let a=Fv(n),o=U.document.createElement(`script`);o.src=a,o.crossOrigin=`anonymous`,o.referrerPolicy=`strict-origin`,t&&o.setAttribute(`nonce`,t);let s=new Promise((e,t)=>{o.addEventListener(`load`,()=>e()),o.addEventListener(`error`,t)}),c=U.document.currentScript,l=U.document.body||U.document.head||c?.parentElement;if(l)l.appendChild(o);else throw Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await s}catch{throw Error(`Error when loading integration: ${e}`)}let u=r[e];if(typeof u!=`function`)throw Error(`Could not load integration: ${e}`);return u}function Fv(e){let t=j()?.getOptions()?.cdnBaseUrl||`https://browser.sentry-cdn.com`;return new URL(`/${a}/${e}.min.js`,t).toString()}var Iv=Mg({lazyLoadIntegration:Pv}),Lv=Mg({getModalIntegration:()=>mv,getScreenshotIntegration:()=>wv});function Rv(e,t){let n=Vv(e,t),r={type:Kv(t),value:qv(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function zv(e,t,n,r){let i=j()?.getOptions().normalizeDepth,a=ey(t),o={__serialized__:Qe(t,i)};if(a)return{exception:{values:[Rv(e,a)]},extra:o};let s={exception:{values:[{type:Oe(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:Qv(t,{isUnhandledRejection:r})}]},extra:o};if(n){let t=Vv(e,n);t.length&&(s.exception.values[0].stacktrace={frames:t})}return s}function Bv(e,t){return{exception:{values:[Rv(e,t)]}}}function Vv(e,t){let n=t.stacktrace||t.stack||``,r=Uv(t),i=Wv(t);try{return e(n,r,i)}catch{}return[]}var Hv=/Minified React error #\d+;/i;function Uv(e){return e&&Hv.test(e.message)?1:0}function Wv(e){return typeof e.framesToPop==`number`?e.framesToPop:0}function Gv(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0&&e instanceof WebAssembly.Exception}function Kv(e){let t=e?.name;return!t&&Gv(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function qv(e){let t=e?.message;return Gv(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:`wasm exception`:t?t.error&&typeof t.error.message==`string`?Pl(t.error):Pl(e):`No error message`}function Jv(e,t,n,r){let i=Xv(e,t,n?.syntheticException||void 0,r);return _t(i),i.level=`error`,n?.event_id&&(i.event_id=n.event_id),so(i)}function Yv(e,t,n=`info`,r,i){let a=Zv(e,t,r?.syntheticException||void 0,i);return a.level=n,r?.event_id&&(a.event_id=r.event_id),so(a)}function Xv(e,t,n,r,i){let a;if(be(t)&&t.error)return Bv(e,t.error);if(xe(t)||Se(t)){let i=t;if(`stack`in t){a=Bv(e,t);let i=a.exception?.values?.[0];if(r&&n&&i&&!i.stacktrace){let t=Vv(e,n);t.length&&(i.stacktrace={frames:t},_t(a,{synthetic:!0}))}}else{let t=i.name||(xe(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=Zv(e,o,n,r),gt(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return ve(t)?Bv(e,t):Ee(t)||Oe(t)?(a=zv(e,t,n,i),_t(a,{synthetic:!0}),a):(a=Zv(e,t,n,r),gt(a,`${t}`,void 0),_t(a,{synthetic:!0}),a)}function Zv(e,t,n,r){let i={};if(r&&n){let r=Vv(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),_t(i,{synthetic:!0})}if(we(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function Qv(e,{isUnhandledRejection:t}){let n=Re(e),r=t?`promise rejection`:`exception`;return be(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Oe(e)?`Event \`${$v(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function $v(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function ey(e){return Object.values(e).find(e=>e instanceof Error)}var ty=class extends bc{constructor(e){let t=ny(e);al(t,`browser`,[`browser`],U.SENTRY_SDK_SOURCE||_s()),super(t);let{userInfo:n}=this.getDataCollectionOptions();t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:n?`auto`:`never`,...t._metadata.sdk.settings});let{sendClientReports:r}=this._options;U.document&&U.document.addEventListener(`visibilitychange`,()=>{U.document.visibilityState===`hidden`&&(r&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),n&&this.on(`beforeSendSession`,il)}eventFromException(e,t){return Jv(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return Yv(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)}};function ny(e){return{release:typeof __SENTRY_RELEASE__==`string`?__SENTRY_RELEASE__:U.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var ry=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,W=i,iy=(e,t)=>e>t[1]?`poor`:e>t[0]?`needs-improvement`:`good`,ay=(e,t,n,r)=>{let i,a;return o=>{t.value>=0&&(o||r)&&(a=t.value-(i??0),(a||i===void 0)&&(i=t.value,t.delta=a,t.rating=iy(t.value,n),e(t)))}},oy=(e=!0)=>{let t=W.performance?.getEntriesByType?.(`navigation`)[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},sy=()=>oy()?.activationStart??0;function cy(e,t,n){W.document&&W.addEventListener(e,t,n)}function ly(e,t,n){W.document&&W.removeEventListener(e,t,n)}var uy=-1,dy=new Set,fy=()=>W.document?.visibilityState===`hidden`&&!W.document?.prerendering?0:1/0,py=e=>{if(hy(e)&&uy>-1){if(e.type===`visibilitychange`||e.type===`pagehide`)for(let e of dy)e();isFinite(uy)||(uy=e.type===`visibilitychange`?e.timeStamp:0,ly(`prerenderingchange`,py,!0))}},my=()=>{if(W.document&&uy<0){let e=sy();uy=(W.document.prerendering?void 0:globalThis.performance.getEntriesByType(`visibility-state`).filter(t=>t.name===`hidden`&&t.startTime>e)[0]?.startTime)??fy(),cy(`visibilitychange`,py,!0),cy(`pagehide`,py,!0),cy(`prerenderingchange`,py,!0)}return{get firstHiddenTime(){return uy},onHidden(e){dy.add(e)}}};function hy(e){return e.type===`pagehide`||W.document?.visibilityState===`hidden`}var gy=()=>`v5-${Date.now()}-${Math.floor(Math.random()*8999999999999)+0xe8d4a51000}`,_y=(e,t=-1)=>{let n=oy(),r=`navigate`;return n&&(W.document?.prerendering||sy()>0?r=`prerender`:W.document?.wasDiscarded?r=`restore`:n.type&&(r=n.type.replace(/_/g,`-`))),{name:e,value:t,rating:`good`,delta:0,entries:[],id:gy(),navigationType:r}},vy=new WeakMap;function yy(e,t){try{return vy.get(e)||vy.set(e,new t),vy.get(e)}catch{return new t}}var by=class{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(e){if(e.hadRecentInput)return;let 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)}},xy=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},Sy=e=>{let t=!1;return()=>{t||=(e(),!0)}},Cy=e=>{W.document?.prerendering?addEventListener(`prerenderingchange`,()=>e(),!0):e()},wy=[1800,3e3],Ty=(e,t={})=>{Cy(()=>{let n=my(),r=_y(`FCP`),i,a=xy(`paint`,e=>{for(let t of e)t.name===`first-contentful-paint`&&(a.disconnect(),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-sy(),0),r.entries.push(t),i(!0)))});a&&(i=ay(e,r,wy,t.reportAllChanges))})},Ey=[.1,.25],Dy=(e,t={})=>{Ty(Sy(()=>{let n=_y(`CLS`,0),r,i=my(),a=yy(t,by),o=e=>{for(let t of e)a._processEntry(t);a._sessionValue>n.value&&(n.value=a._sessionValue,n.entries=a._sessionEntries,r())},s=xy(`layout-shift`,o);s&&(r=ay(e,n,Ey,t.reportAllChanges),i.onHidden(()=>{o(s.takeRecords()),r(!0)}),W?.setTimeout?.(r))}))},Oy=0,ky=1/0,Ay=0,jy=e=>{e.forEach(e=>{e.interactionId&&(ky=Math.min(ky,e.interactionId),Ay=Math.max(Ay,e.interactionId),Oy=Ay?(Ay-ky)/7+1:0)})},My,Ny=()=>My?Oy:performance.interactionCount||0,Py=()=>{`interactionCount`in performance||My||(My=xy(`event`,jy,{type:`event`,buffered:!0,durationThreshold:0}))},Fy=10,Iy=0,Ly=()=>Ny()-Iy,Ry=class{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){Iy=Ny(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){let e=Math.min(this._longestInteractionList.length-1,Math.floor(Ly()/50));return this._longestInteractionList[e]}_processEntry(e){if(this._onBeforeProcessingEntry?.(e),!(e.interactionId||e.entryType===`first-input`))return;let t=this._longestInteractionList.at(-1),n=this._longestInteractionMap.get(e.interactionId);if(n||this._longestInteractionList.length<Fy||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>Fy){let e=this._longestInteractionList.splice(Fy);for(let t of e)this._longestInteractionMap.delete(t.id)}this._onAfterProcessingINPCandidate?.(n)}}},zy=e=>{let t=W.requestIdleCallback||W.setTimeout;W.document?.visibilityState===`hidden`?e():(e=Sy(e),cy(`visibilitychange`,e,{once:!0,capture:!0}),cy(`pagehide`,e,{once:!0,capture:!0}),t(()=>{e(),ly(`visibilitychange`,e,{capture:!0}),ly(`pagehide`,e,{capture:!0})}))},By=[200,500],Vy=40,Hy=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&`interactionId`in PerformanceEventTiming.prototype))return;let n=my();Cy(()=>{Py();let r=_y(`INP`),i,a=yy(t,Ry),o=e=>{zy(()=>{for(let t of e)a._processEntry(t);let t=a._estimateP98LongestInteraction();t&&t._latency!==r.value&&(r.value=t._latency,r.entries=t.entries,i())})},s=xy(`event`,o,{durationThreshold:t.durationThreshold??Vy});i=ay(e,r,By,t.reportAllChanges),s&&(s.observe({type:`first-input`,buffered:!0}),n.onHidden(()=>{o(s.takeRecords()),i(!0)}))})},Uy=class{_processEntry(e){this._onBeforeProcessingEntry?.(e)}},Wy=[2500,4e3],Gy=(e,t={})=>{Cy(()=>{let n=my(),r=_y(`LCP`),i,a=yy(t,Uy),o=e=>{t.reportAllChanges||(e=e.slice(-1));for(let t of e)a._processEntry(t),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-sy(),0),r.entries=[t],i())},s=xy(`largest-contentful-paint`,o);if(s){i=ay(e,r,Wy,t.reportAllChanges);let n=Sy(()=>{o(s.takeRecords()),s.disconnect(),i(!0)}),a=e=>{e.isTrusted&&(zy(n),ly(e.type,a,{capture:!0}))};for(let e of[`keydown`,`click`,`visibilitychange`])cy(e,a,{capture:!0})}})},Ky=[800,1800],qy=e=>{W.document?.prerendering?Cy(()=>qy(e)):W.document?.readyState===`complete`?setTimeout(e):addEventListener(`load`,()=>qy(e),!0)},Jy=(e,t={})=>{let n=_y(`TTFB`),r=ay(e,n,Ky,t.reportAllChanges);qy(()=>{let e=oy();e&&(n.value=Math.max(e.responseStart-sy(),0),n.entries=[e],r(!0))})},Yy={},Xy={},Zy,Qy,$y,eb;function tb(e,t=!1){return db(`cls`,e,sb,Zy,t)}function nb(e,t=!1){return db(`lcp`,e,cb,Qy,t)}function rb(e){return db(`ttfb`,e,lb,$y)}function ib(e){return db(`inp`,e,ub,eb)}function ab(e,t){return pb(e,t),Xy[e]||(fb(e),Xy[e]=!0),mb(e,t)}function ob(e,t){let n=Yy[e];if(n?.length)for(let r of n)try{r(t)}catch(t){ry&&x.error(`Error while triggering instrumentation handler.
|
|
488
|
+
`,e&&t.setAttribute(`nonce`,e),t}function _v({h:e}){return function({action:t,setAction:n,options:r}){return e(`div`,{class:`editor__tool-container`},e(`div`,{class:`editor__tool-bar`},e(`button`,{type:`button`,class:`editor__tool ${t===`highlight`?`editor__tool--active`:``}`,onClick:()=>{n(t===`highlight`?``:`highlight`)}},r.highlightToolText),e(`button`,{type:`button`,class:`editor__tool ${t===`hide`?`editor__tool--active`:``}`,onClick:()=>{n(t===`hide`?``:`hide`)}},r.hideToolText)))}}function vv({hooks:e}){function t(){let[t,n]=e.useState(Bh.devicePixelRatio??1);return e.useEffect(()=>{let e=()=>{n(Bh.devicePixelRatio)},t=matchMedia(`(resolution: ${Bh.devicePixelRatio}dppx)`);return t.addEventListener(`change`,e),()=>{t.removeEventListener(`change`,e)}},[]),t}return function({onBeforeScreenshot:n,onScreenshot:r,onAfterScreenshot:i,onError:a}){let o=t();e.useEffect(()=>{(async()=>{n();let e=await Vh.mediaDevices.getDisplayMedia({video:{width:Bh.innerWidth*o,height:Bh.innerHeight*o},audio:!1,monitorTypeSurfaces:`exclude`,preferCurrentTab:!0,selfBrowserSurface:`include`,surfaceSwitching:`exclude`}),t=z.createElement(`video`);await new Promise((n,i)=>{t.srcObject=e,t.onloadedmetadata=()=>{r(t,o),e.getTracks().forEach(e=>e.stop()),n()},t.play().catch(i)}),i()})().catch(a)},[])}}function yv(e,t,n){switch(e.type){case`highlight`:t.shadowColor=`rgba(0, 0, 0, 0.7)`,t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h);break;case`hide`:t.fillStyle=`rgb(0, 0, 0)`,t.fillRect(e.x,e.y,e.w,e.h);break}}function bv(e,t,n){if(!e)return;let r=e.getContext(`2d`,t);r&&n(e,r)}function xv(e,t){bv(e,{alpha:!0},(e,n)=>{n.drawImage(t,0,0,t.width,t.height,0,0,e.width,e.height)})}function Sv(e,t,n){bv(e,{alpha:!0},(e,r)=>{n.length&&(r.fillStyle=`rgba(0, 0, 0, 0.25)`,r.fillRect(0,0,e.width,e.height)),n.forEach(e=>{yv(e,r,t)})})}function Cv({h:e,hooks:t,outputBuffer:n,dialog:r,options:i}){let a=vv({hooks:t}),o=_v({h:e}),s=hv({h:e}),c={__html:gv(i.styleNonce).innerText},l=r.el.style,u=({screenshot:r})=>{let[a,l]=t.useState(`highlight`),[u,d]=t.useState([]),f=t.useRef(null),p=t.useRef(null),m=t.useRef(null),h=t.useRef(null),[g,_]=t.useState(1),v=t.useMemo(()=>{let e=z.getElementById(i.id);if(!e)return`white`;let t=getComputedStyle(e);return t.getPropertyValue(`--button-primary-background`)||t.getPropertyValue(`--accent-background`)},[i.id]);t.useLayoutEffect(()=>{let e=()=>{let t=f.current;t&&(bv(r.canvas,{alpha:!1},e=>{let n=Math.min(t.clientWidth/e.width,t.clientHeight/e.height);_(n)}),(t.clientHeight===0||t.clientWidth===0)&&setTimeout(e,0))};return e(),Bh.addEventListener(`resize`,e),()=>{Bh.removeEventListener(`resize`,e)}},[r]);let y=t.useCallback((e,t)=>{bv(e,{alpha:!0},(e,n)=>{n.scale(t,t),e.width=r.canvas.width,e.height=r.canvas.height})},[r]);t.useEffect(()=>{y(p.current,r.dpi),xv(p.current,r.canvas)},[r]),t.useEffect(()=>{y(m.current,r.dpi),bv(m.current,{alpha:!0},(e,t)=>{t.clearRect(0,0,e.width,e.height)}),Sv(m.current,v,u)},[u,v]),t.useEffect(()=>{y(n,r.dpi),xv(n,r.canvas),bv(z.createElement(`canvas`),{alpha:!0},(e,t)=>{t.scale(r.dpi,r.dpi),e.width=r.canvas.width,e.height=r.canvas.height,Sv(e,v,u),xv(n,e)})},[u,r,v]);let b=e=>{if(!a||!h.current)return;let t=h.current.getBoundingClientRect(),n={type:a,x:e.offsetX/g,y:e.offsetY/g},r=(e,n)=>{let r=(n.clientX-t.x)/g,i=(n.clientY-t.y)/g;return{type:e.type,x:Math.min(e.x,r),y:Math.min(e.y,i),w:Math.abs(r-e.x),h:Math.abs(i-e.y)}},i=e=>{bv(m.current,{alpha:!0},(e,t)=>{t.clearRect(0,0,e.width,e.height)}),Sv(m.current,v,[...u,r(n,e)])},o=e=>{let t=r(n,e);t.w*g>=1&&t.h*g>=1&&d(e=>[...e,t]),z.removeEventListener(`mousemove`,i),z.removeEventListener(`mouseup`,o)};z.addEventListener(`mousemove`,i),z.addEventListener(`mouseup`,o)},x=t.useCallback(e=>t=>{t.preventDefault(),t.stopPropagation(),d(t=>{let n=[...t];return n.splice(e,1),n})},[]),S={width:`${r.canvas.width*g}px`,height:`${r.canvas.height*g}px`},C=e=>{e.stopPropagation()};return e(`div`,{class:`editor`},e(`style`,{nonce:i.styleNonce,dangerouslySetInnerHTML:c}),e(`div`,{class:`editor__image-container`},e(`div`,{class:`editor__canvas-container`,ref:f},e(`canvas`,{ref:p,id:`background`,style:S}),e(`canvas`,{ref:m,id:`foreground`,style:S}),e(`div`,{ref:h,onMouseDown:b,style:S},u.map((t,n)=>e(`div`,{key:n,class:`editor__rect`,style:{top:`${t.y*g}px`,left:`${t.x*g}px`,width:`${t.w*g}px`,height:`${t.h*g}px`}},e(`button`,{"aria-label":i.removeHighlightText,onClick:x(n),onMouseDown:C,onMouseUp:C,type:`button`},e(s,null))))))),e(o,{options:i,action:a,setAction:l}))};return function({onError:r}){let[i,o]=t.useState();return a({onBeforeScreenshot:t.useCallback(()=>{l.display=`none`},[]),onScreenshot:t.useCallback((e,t)=>{bv(z.createElement(`canvas`),{alpha:!1},(n,r)=>{r.scale(t,t),n.width=e.videoWidth,n.height=e.videoHeight,r.drawImage(e,0,0,n.width,n.height),o({canvas:n,dpi:t})}),n.width=e.videoWidth,n.height=e.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{l.display=`block`},[]),onError:t.useCallback(e=>{l.display=`block`,r(e)},[])}),i?e(u,{screenshot:i}):e(`div`,null)}}var wv=(()=>({name:`FeedbackScreenshot`,setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{let i=z.createElement(`canvas`);return{input:Cv({h:e,hooks:t,outputBuffer:i,dialog:n,options:r}),value:async()=>{let e=await new Promise(e=>{i.toBlob(e,`image/png`)});if(e)return{data:new Uint8Array(await e.arrayBuffer()),filename:`screenshot.png`,contentType:`application/png`}}}}})),U=i,Tv=0;function Ev(){return Tv>0}function Dv(){Tv++,setTimeout(()=>{Tv--})}function Ov(e,t={}){function n(e){return typeof e==`function`}if(!n(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,`__sentry_wrapped__`)){let t=e.__sentry_wrapped__;return typeof t==`function`?t:e}if(Fe(e))return e}catch{return e}let r=function(...n){i._sentryWrappedDepth=(i._sentryWrappedDepth||0)+1;try{let r=n.map(e=>Ov(e,t));return e.apply(this,r)}catch(e){throw Dv(),pn(r=>{r.addEventProcessor(e=>(t.mechanism&&(_t(e,void 0,void 0),vt(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),L(e)}),e}finally{i._sentryWrappedDepth=(i._sentryWrappedDepth||0)-1}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch{}Pe(r,e),D(e,`__sentry_wrapped__`,r);try{Object.getOwnPropertyDescriptor(r,`name`).configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function kv(){let e=Ph(),{referrer:t}=U.document||{},{userAgent:n}=U.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}var Av=[`replayIntegration`,`replayCanvasIntegration`,`feedbackIntegration`,`feedbackModalIntegration`,`feedbackScreenshotIntegration`,`captureConsoleIntegration`,`contextLinesIntegration`,`linkedErrorsIntegration`,`dedupeIntegration`,`extraErrorDataIntegration`,`graphqlClientIntegration`,`httpClientIntegration`,`reportingObserverIntegration`,`rewriteFramesIntegration`,`browserProfilingIntegration`,`moduleMetadataIntegration`,`instrumentAnthropicAiClient`,`instrumentOpenAiClient`,`instrumentGoogleGenAIClient`,`instrumentLangGraph`,`createLangChainCallbackHandler`,`instrumentLangChainEmbeddings`],jv={replayCanvasIntegration:`replay-canvas`,feedbackModalIntegration:`feedback-modal`,feedbackScreenshotIntegration:`feedback-screenshot`};function Mv(e){return jv[e]||e.replace(`Integration`,``).toLowerCase()}var Nv=U;async function Pv(e,t){let n=Av.includes(e)?Mv(e):void 0,r=Nv.Sentry=Nv.Sentry||{};if(!n)throw Error(`Cannot lazy load integration: ${e}`);let i=r[e];if(typeof i==`function`&&!(`_isShim`in i))return i;let a=Fv(n),o=U.document.createElement(`script`);o.src=a,o.crossOrigin=`anonymous`,o.referrerPolicy=`strict-origin`,t&&o.setAttribute(`nonce`,t);let s=new Promise((e,t)=>{o.addEventListener(`load`,()=>e()),o.addEventListener(`error`,t)}),c=U.document.currentScript,l=U.document.body||U.document.head||c?.parentElement;if(l)l.appendChild(o);else throw Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await s}catch{throw Error(`Error when loading integration: ${e}`)}let u=r[e];if(typeof u!=`function`)throw Error(`Could not load integration: ${e}`);return u}function Fv(e){let t=j()?.getOptions()?.cdnBaseUrl||`https://browser.sentry-cdn.com`;return new URL(`/${a}/${e}.min.js`,t).toString()}var Iv=Mg({lazyLoadIntegration:Pv}),Lv=Mg({getModalIntegration:()=>mv,getScreenshotIntegration:()=>wv});function Rv(e,t){let n=Vv(e,t),r={type:Kv(t),value:qv(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function zv(e,t,n,r){let i=j()?.getOptions().normalizeDepth,a=ey(t),o={__serialized__:Qe(t,i)};if(a)return{exception:{values:[Rv(e,a)]},extra:o};let s={exception:{values:[{type:Oe(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:Qv(t,{isUnhandledRejection:r})}]},extra:o};if(n){let t=Vv(e,n);t.length&&(s.exception.values[0].stacktrace={frames:t})}return s}function Bv(e,t){return{exception:{values:[Rv(e,t)]}}}function Vv(e,t){let n=t.stacktrace||t.stack||``,r=Uv(t),i=Wv(t);try{return e(n,r,i)}catch{}return[]}var Hv=/Minified React error #\d+;/i;function Uv(e){return e&&Hv.test(e.message)?1:0}function Wv(e){return typeof e.framesToPop==`number`?e.framesToPop:0}function Gv(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0&&e instanceof WebAssembly.Exception}function Kv(e){let t=e?.name;return!t&&Gv(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function qv(e){let t=e?.message;return Gv(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:`wasm exception`:t?t.error&&typeof t.error.message==`string`?Il(t.error):Il(e):`No error message`}function Jv(e,t,n,r){let i=Xv(e,t,n?.syntheticException||void 0,r);return vt(i),i.level=`error`,n?.event_id&&(i.event_id=n.event_id),lo(i)}function Yv(e,t,n=`info`,r,i){let a=Zv(e,t,r?.syntheticException||void 0,i);return a.level=n,r?.event_id&&(a.event_id=r.event_id),lo(a)}function Xv(e,t,n,r,i){let a;if(be(t)&&t.error)return Bv(e,t.error);if(xe(t)||Se(t)){let i=t;if(`stack`in t){a=Bv(e,t);let i=a.exception?.values?.[0];if(r&&n&&i&&!i.stacktrace){let t=Vv(e,n);t.length&&(i.stacktrace={frames:t},vt(a,{synthetic:!0}))}}else{let t=i.name||(xe(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=Zv(e,o,n,r),_t(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return ve(t)?Bv(e,t):Ee(t)||Oe(t)?(a=zv(e,t,n,i),vt(a,{synthetic:!0}),a):(a=Zv(e,t,n,r),_t(a,`${t}`,void 0),vt(a,{synthetic:!0}),a)}function Zv(e,t,n,r){let i={};if(r&&n){let r=Vv(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),vt(i,{synthetic:!0})}if(we(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function Qv(e,{isUnhandledRejection:t}){let n=Re(e),r=t?`promise rejection`:`exception`;return be(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Oe(e)?`Event \`${$v(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function $v(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function ey(e){return Object.values(e).find(e=>e instanceof Error)}var ty=class extends Sc{constructor(e){let t=ny(e);sl(t,`browser`,[`browser`],U.SENTRY_SDK_SOURCE||ys()),super(t);let{userInfo:n}=this.getDataCollectionOptions();t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:n?`auto`:`never`,...t._metadata.sdk.settings});let{sendClientReports:r}=this._options;U.document&&U.document.addEventListener(`visibilitychange`,()=>{U.document.visibilityState===`hidden`&&(r&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),n&&this.on(`beforeSendSession`,ol)}eventFromException(e,t){return Jv(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return Yv(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)}};function ny(e){return{release:typeof __SENTRY_RELEASE__==`string`?__SENTRY_RELEASE__:U.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var ry=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,W=i,iy=(e,t)=>e>t[1]?`poor`:e>t[0]?`needs-improvement`:`good`,ay=(e,t,n,r)=>{let i,a;return o=>{t.value>=0&&(o||r)&&(a=t.value-(i??0),(a||i===void 0)&&(i=t.value,t.delta=a,t.rating=iy(t.value,n),e(t)))}},oy=(e=!0)=>{let t=W.performance?.getEntriesByType?.(`navigation`)[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},sy=()=>oy()?.activationStart??0;function cy(e,t,n){W.document&&W.addEventListener(e,t,n)}function ly(e,t,n){W.document&&W.removeEventListener(e,t,n)}var uy=-1,dy=new Set,fy=()=>W.document?.visibilityState===`hidden`&&!W.document?.prerendering?0:1/0,py=e=>{if(hy(e)&&uy>-1){if(e.type===`visibilitychange`||e.type===`pagehide`)for(let e of dy)e();isFinite(uy)||(uy=e.type===`visibilitychange`?e.timeStamp:0,ly(`prerenderingchange`,py,!0))}},my=()=>{if(W.document&&uy<0){let e=sy();uy=(W.document.prerendering?void 0:globalThis.performance.getEntriesByType(`visibility-state`).filter(t=>t.name===`hidden`&&t.startTime>e)[0]?.startTime)??fy(),cy(`visibilitychange`,py,!0),cy(`pagehide`,py,!0),cy(`prerenderingchange`,py,!0)}return{get firstHiddenTime(){return uy},onHidden(e){dy.add(e)}}};function hy(e){return e.type===`pagehide`||W.document?.visibilityState===`hidden`}var gy=()=>`v5-${Date.now()}-${Math.floor(Math.random()*8999999999999)+0xe8d4a51000}`,_y=(e,t=-1)=>{let n=oy(),r=`navigate`;return n&&(W.document?.prerendering||sy()>0?r=`prerender`:W.document?.wasDiscarded?r=`restore`:n.type&&(r=n.type.replace(/_/g,`-`))),{name:e,value:t,rating:`good`,delta:0,entries:[],id:gy(),navigationType:r}},vy=new WeakMap;function yy(e,t){try{return vy.get(e)||vy.set(e,new t),vy.get(e)}catch{return new t}}var by=class{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(e){if(e.hadRecentInput)return;let 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)}},xy=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},Sy=e=>{let t=!1;return()=>{t||=(e(),!0)}},Cy=e=>{W.document?.prerendering?addEventListener(`prerenderingchange`,()=>e(),!0):e()},wy=[1800,3e3],Ty=(e,t={})=>{Cy(()=>{let n=my(),r=_y(`FCP`),i,a=xy(`paint`,e=>{for(let t of e)t.name===`first-contentful-paint`&&(a.disconnect(),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-sy(),0),r.entries.push(t),i(!0)))});a&&(i=ay(e,r,wy,t.reportAllChanges))})},Ey=[.1,.25],Dy=(e,t={})=>{Ty(Sy(()=>{let n=_y(`CLS`,0),r,i=my(),a=yy(t,by),o=e=>{for(let t of e)a._processEntry(t);a._sessionValue>n.value&&(n.value=a._sessionValue,n.entries=a._sessionEntries,r())},s=xy(`layout-shift`,o);s&&(r=ay(e,n,Ey,t.reportAllChanges),i.onHidden(()=>{o(s.takeRecords()),r(!0)}),W?.setTimeout?.(r))}))},Oy=0,ky=1/0,Ay=0,jy=e=>{e.forEach(e=>{e.interactionId&&(ky=Math.min(ky,e.interactionId),Ay=Math.max(Ay,e.interactionId),Oy=Ay?(Ay-ky)/7+1:0)})},My,Ny=()=>My?Oy:performance.interactionCount||0,Py=()=>{`interactionCount`in performance||My||(My=xy(`event`,jy,{type:`event`,buffered:!0,durationThreshold:0}))},Fy=10,Iy=0,Ly=()=>Ny()-Iy,Ry=class{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){Iy=Ny(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){let e=Math.min(this._longestInteractionList.length-1,Math.floor(Ly()/50));return this._longestInteractionList[e]}_processEntry(e){if(this._onBeforeProcessingEntry?.(e),!(e.interactionId||e.entryType===`first-input`))return;let t=this._longestInteractionList.at(-1),n=this._longestInteractionMap.get(e.interactionId);if(n||this._longestInteractionList.length<Fy||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>Fy){let e=this._longestInteractionList.splice(Fy);for(let t of e)this._longestInteractionMap.delete(t.id)}this._onAfterProcessingINPCandidate?.(n)}}},zy=e=>{let t=W.requestIdleCallback||W.setTimeout;W.document?.visibilityState===`hidden`?e():(e=Sy(e),cy(`visibilitychange`,e,{once:!0,capture:!0}),cy(`pagehide`,e,{once:!0,capture:!0}),t(()=>{e(),ly(`visibilitychange`,e,{capture:!0}),ly(`pagehide`,e,{capture:!0})}))},By=[200,500],Vy=40,Hy=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&`interactionId`in PerformanceEventTiming.prototype))return;let n=my();Cy(()=>{Py();let r=_y(`INP`),i,a=yy(t,Ry),o=e=>{zy(()=>{for(let t of e)a._processEntry(t);let t=a._estimateP98LongestInteraction();t&&t._latency!==r.value&&(r.value=t._latency,r.entries=t.entries,i())})},s=xy(`event`,o,{durationThreshold:t.durationThreshold??Vy});i=ay(e,r,By,t.reportAllChanges),s&&(s.observe({type:`first-input`,buffered:!0}),n.onHidden(()=>{o(s.takeRecords()),i(!0)}))})},Uy=class{_processEntry(e){this._onBeforeProcessingEntry?.(e)}},Wy=[2500,4e3],Gy=(e,t={})=>{Cy(()=>{let n=my(),r=_y(`LCP`),i,a=yy(t,Uy),o=e=>{t.reportAllChanges||(e=e.slice(-1));for(let t of e)a._processEntry(t),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-sy(),0),r.entries=[t],i())},s=xy(`largest-contentful-paint`,o);if(s){i=ay(e,r,Wy,t.reportAllChanges);let n=Sy(()=>{o(s.takeRecords()),s.disconnect(),i(!0)}),a=e=>{e.isTrusted&&(zy(n),ly(e.type,a,{capture:!0}))};for(let e of[`keydown`,`click`,`visibilitychange`])cy(e,a,{capture:!0})}})},Ky=[800,1800],qy=e=>{W.document?.prerendering?Cy(()=>qy(e)):W.document?.readyState===`complete`?setTimeout(e):addEventListener(`load`,()=>qy(e),!0)},Jy=(e,t={})=>{let n=_y(`TTFB`),r=ay(e,n,Ky,t.reportAllChanges);qy(()=>{let e=oy();e&&(n.value=Math.max(e.responseStart-sy(),0),n.entries=[e],r(!0))})},Yy={},Xy={},Zy,Qy,$y,eb;function tb(e,t=!1){return db(`cls`,e,sb,Zy,t)}function nb(e,t=!1){return db(`lcp`,e,cb,Qy,t)}function rb(e){return db(`ttfb`,e,lb,$y)}function ib(e){return db(`inp`,e,ub,eb)}function ab(e,t){return pb(e,t),Xy[e]||(fb(e),Xy[e]=!0),mb(e,t)}function ob(e,t){let n=Yy[e];if(n?.length)for(let r of n)try{r(t)}catch(t){ry&&x.error(`Error while triggering instrumentation handler.
|
|
489
489
|
Type: ${e}
|
|
490
490
|
Name: ${ie(r)}
|
|
491
|
-
Error:`,t)}}function sb(){return Dy(e=>{ob(`cls`,{metric:e}),Zy=e},{reportAllChanges:!0})}function cb(){return Gy(e=>{ob(`lcp`,{metric:e}),Qy=e},{reportAllChanges:!0})}function lb(){return Jy(e=>{ob(`ttfb`,{metric:e}),$y=e})}function ub(){return Hy(e=>{ob(`inp`,{metric:e}),eb=e})}function db(e,t,n,r,i=!1){pb(e,t);let a;return Xy[e]||(a=n(),Xy[e]=!0),r&&t({metric:r}),mb(e,t,i?a:void 0)}function fb(e){let t={};e===`event`&&(t.durationThreshold=0),xy(e,t=>{ob(e,{entries:t})},t)}function pb(e,t){Yy[e]=Yy[e]||[],Yy[e].push(t)}function mb(e,t,n){return()=>{n&&n();let r=Yy[e];if(!r)return;let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function hb(e){return`duration`in e}var gb=80,_b={};try{typeof Node<`u`&&(_b.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,`parentNode`).get),typeof Element<`u`&&(_b.tagName=Object.getOwnPropertyDescriptor(Element.prototype,`tagName`).get,_b.id=Object.getOwnPropertyDescriptor(Element.prototype,`id`).get,_b.className=Object.getOwnPropertyDescriptor(Element.prototype,`className`).get,_b.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<`u`&&(_b.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,`dataset`).get)}catch{}function vb(e,t,n){let r=_b[t];if(r)try{return r.call(e,n)}catch{}let i=e[t];return typeof i==`function`?i.call(e,n):i}function yb(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||gb;for(;n&&i++<5&&(o=bb(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=vb(n,`parentNode`);return r.reverse().join(` > `)}catch{return`<unknown>`}}function bb(e,t){let n=[],r=vb(e,`tagName`);if(!r)return``;if(typeof HTMLElement<`u`&&e instanceof HTMLElement){let t=vb(e,`dataset`);if(t){if(t.sentryComponent)return t.sentryComponent;if(t.sentryElement)return t.sentryElement}}n.push(r.toLowerCase());let i=t?.length?t.filter(t=>vb(e,`getAttribute`,t)).map(t=>[t,vb(e,`getAttribute`,t)]):null;if(i?.length)i.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{let t=vb(e,`id`);t&&n.push(`#${t}`);let r=vb(e,`className`);if(r&&Ce(r)){let e=r.split(/\s+/);for(let t of e)n.push(`.${t}`)}}for(let t of[`aria-label`,`type`,`name`,`title`,`alt`]){let r=vb(e,`getAttribute`,t);r&&n.push(`[${t}="${r}"]`)}return n.join(``)}var xb=e=>{let t=t=>{(t.type===`pagehide`||W.document?.visibilityState===`hidden`)&&e(t)};cy(`visibilitychange`,t,{capture:!0,once:!0}),cy(`pagehide`,t,{capture:!0,once:!0})};function Sb(e){return typeof e==`number`&&isFinite(e)}function Cb(e,t,n,{...r}){let i=F(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime==`function`&&e.updateStartTime(t),sa(e,()=>{let e=ia({startTime:t,...r});return e&&e.end(n),e})}function wb(e){let t=j();if(!t)return;let{name:n,transaction:r,attributes:i,startTime:a}=e,{release:o,environment:s}=t.getOptions(),{userInfo:c}=t.getDataCollectionOptions(),l=t.getIntegrationByName(`Replay`)?.getReplayId(),u=k(),d=u.getUser(),f=d===void 0?void 0:d.email||d.id||d.ip_address,p;try{p=u.getScopeData().contexts.profile.profile_id}catch{}return ia({name:n,attributes:{release:o,environment:s,user:f||void 0,profile_id:p||void 0,replay_id:l||void 0,transaction:r,"user_agent.original":W.navigator?.userAgent,"client.address":c?`{{auto}}`:void 0,...i},startTime:a,experimental:{standalone:!0}})}function Tb(){return W.addEventListener&&W.performance}function G(e){return e/1e3}function Eb(e){let t=`unknown`,n=`unknown`,r=``;for(let i of e){if(i===`/`){[t,n]=e.split(`/`);break}if(!isNaN(Number(i))){t=r===`h`?`http`:r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function Db(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Ob(e,t){let n,r=!1;function i(e){!r&&n&&t(e,n.spanContext().spanId,n),r=!0}xb(()=>{i(`pagehide`)});let a=e.on(`beforeStartNavigationSpan`,(e,t)=>{t?.isRedirect||(i(`navigation`),a(),o())}),o=e.on(`afterStartPageLoadSpan`,e=>{n=e,o()})}function kb(e){let t=0,n;if(!Db(`layout-shift`))return;let r=tb(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&(t=e.value,n=r)},!0);Ob(e,(e,i)=>{Ab(t,n,i,e),r()})}function Ab(e,t,n,r){ry&&x.log(`Sending CLS span (${e})`);let i=t?G((Dt()||0)+t.startTime):O(),a=k().getScopeData().transactionName,o=t?yb(t.sources[0]?.node):`Layout shift`,s={[P]:`auto.http.browser.cls`,[N]:`ui.webvital.cls`,[kn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((e,t)=>{s[`cls.source.${t+1}`]=yb(e.node)});let c=wb({name:o,transaction:a,attributes:s,startTime:i});c&&(c.addEvent(`cls`,{[vn]:``,[yn]:e}),c.end(i))}function jb(e){return e!=null&&e>0&&e<=6e4}function Mb(e){let t=0,n;if(!Db(`largest-contentful-paint`))return;let r=nb(({metric:e})=>{let r=e.entries[e.entries.length-1];!r||!jb(e.value)||(t=e.value,n=r)},!0);Ob(e,(e,i)=>{Nb(t,n,i,e),r()})}function Nb(e,t,n,r){if(!jb(e))return;ry&&x.log(`Sending LCP span (${e})`);let i=G((Dt()||0)+(t?.startTime||0)),a=k().getScopeData().transactionName,o=t?yb(t.element):`Largest contentful paint`,s={[P]:`auto.http.browser.lcp`,[N]:`ui.webvital.lcp`,[kn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(s[`lcp.element`]=yb(t.element)),t.id&&(s[`lcp.id`]=t.id),t.url&&(s[`lcp.url`]=t.url),t.loadTime!=null&&(s[`lcp.loadTime`]=t.loadTime),t.renderTime!=null&&(s[`lcp.renderTime`]=t.renderTime),t.size!=null&&(s[`lcp.size`]=t.size));let c=wb({name:o,transaction:a,attributes:s,startTime:i});c&&(c.addEvent(`lcp`,{[vn]:`millisecond`,[yn]:e}),c.end(i))}function Pb(e){return e&&((Dt()||performance.timeOrigin)+e)/1e3}function Fb(e){let t={};if(e.nextHopProtocol!=null){let{name:n,version:r}=Eb(e.nextHopProtocol);t[`network.protocol.version`]=r,t[`network.protocol.name`]=n}return Dt()||Tb()?.timeOrigin?Ib({...t,"http.request.redirect_start":Pb(e.redirectStart),"http.request.redirect_end":Pb(e.redirectEnd),"http.request.worker_start":Pb(e.workerStart),"http.request.fetch_start":Pb(e.fetchStart),"http.request.domain_lookup_start":Pb(e.domainLookupStart),"http.request.domain_lookup_end":Pb(e.domainLookupEnd),"http.request.connect_start":Pb(e.connectStart),"http.request.secure_connection_start":Pb(e.secureConnectionStart),"http.request.connection_end":Pb(e.connectEnd),"http.request.request_start":Pb(e.requestStart),"http.request.response_start":Pb(e.responseStart),"http.request.response_end":Pb(e.responseEnd),"http.request.time_to_first_byte":e.responseStart==null?void 0:e.responseStart/1e3}):t}function Ib(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!=null))}var Lb=2147483647,Rb=0,zb={},Bb,Vb;function Hb({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){let r=Tb();if(r&&Dt()){r.mark&&W.performance.mark(`sentry-tracing-init`);let i=t?Mb(n):t===!1?qb():void 0,a=e?kb(n):e===!1?Kb():void 0,o=Jb(),s=Yb();return()=>{o(),s(),i?.(),a?.()}}return()=>void 0}function Ub(){ab(`longtask`,({entries:e})=>{let t=zr();if(!t)return;let{op:n,start_timestamp:r}=F(t);for(let i of e){let e=G(Dt()+i.startTime),a=G(i.duration);n===`navigation`&&r&&e<r||Cb(t,e,e+a,{name:`Main UI thread blocked`,op:`ui.long-task`,attributes:{[P]:`auto.ui.browser.metrics`}})}})}function Wb(){new PerformanceObserver(e=>{let t=zr();if(t)for(let n of e.getEntries()){if(!n.scripts[0])continue;let e=G(Dt()+n.startTime),{start_timestamp:r,op:i}=F(t);if(i===`navigation`&&r&&e<r)continue;let a=G(n.duration),o={[P]:`auto.ui.browser.metrics`},{invoker:s,invokerType:c,sourceURL:l,sourceFunctionName:u,sourceCharPosition:d}=n.scripts[0];o[`browser.script.invoker`]=s,o[`browser.script.invoker_type`]=c,l&&(o[`code.filepath`]=l),u&&(o[`code.function`]=u),d!==-1&&(o[`browser.script.source_char_position`]=d),Cb(t,e,e+a,{name:`Main UI thread blocked`,op:`ui.long-animation-frame`,attributes:o})}}).observe({type:`long-animation-frame`,buffered:!0})}function Gb(){ab(`event`,({entries:e})=>{let t=zr();if(t){for(let n of e)if(n.name===`click`){let e=G(Dt()+n.startTime),r=G(n.duration),i={name:yb(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[P]:`auto.ui.browser.metrics`}},a=Fh(n.target);a&&(i.attributes[`ui.component_name`]=a),Cb(t,e,e+r,i)}}})}function Kb(){return tb(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(zb.cls={value:e.value,unit:``},Vb=t)},!0)}function qb(){return nb(({metric:e})=>{let t=e.entries[e.entries.length-1];!t||!jb(e.value)||(zb.lcp={value:e.value,unit:`millisecond`},Bb=t)},!0)}function Jb(){return rb(({metric:e})=>{e.entries[e.entries.length-1]&&(zb.ttfb={value:e.value,unit:`millisecond`})})}function Yb(){return ab(`paint`,({entries:e})=>{let t=my();for(let n of e){let e=n.startTime<t.firstHiddenTime;n.name===`first-paint`&&e&&(zb.fp={value:n.startTime,unit:`millisecond`}),n.name===`first-contentful-paint`&&e&&(zb.fcp={value:n.startTime,unit:`millisecond`})}})}function Xb(e,t){let n=Tb(),r=Dt();if(!n?.getEntries||!r)return;let{spanStreamingEnabled:i,ignorePerformanceApiSpans:a,ignoreResourceSpans:o}=t,s=G(r),c=n.getEntries(),{op:l,start_timestamp:u}=F(e);c.slice(Rb).forEach(t=>{let n=G(t.startTime),r=G(Math.max(0,t.duration));if(!(l===`navigation`&&u&&s+n<u))switch(t.entryType){case`navigation`:nx(e,t,s);break;case`mark`:case`paint`:case`measure`:ex(e,t,n,r,s,a);break;case`resource`:ox(e,t,t.name,n,r,s,o);break}}),Rb=Math.max(c.length-1,0),sx(e,i)}function Zb(e,t){let n=Dt();if(!Tb()?.getEntries||!n){Qb();return}let{spanStreamingEnabled:r,recordClsOnPageloadSpan:i,recordLcpOnPageloadSpan:a}=t,o=G(n);if(F(e).op===`pageload`){if(ux(zb),r){let t=(t,n,r)=>{let i=r??`browser.web_vital.${t}.value`;e.setAttribute(i,n),ry&&x.log(`Setting web vital attribute`,{[i]:n},`on pageload span`)};[`ttfb`,`fp`,`fcp`].forEach(e=>{zb[e]&&t(e,zb[e].value)}),zb[`ttfb.requestTime`]&&t(`ttfb.requestTime`,zb[`ttfb.requestTime`].value,`browser.web_vital.ttfb.request_time`)}else i||delete zb.cls,a||delete zb.lcp,Object.entries(zb).forEach(([t,n])=>{Hi(t,n.value,n.unit,e)}),cx(e,t);e.setAttribute(r?`browser.performance.time_origin`:`performance.timeOrigin`,o),e.setAttribute(r?`browser.performance.navigation.activation_start`:`performance.activationStart`,sy())}Qb()}function Qb(){Bb=void 0,Vb=void 0,zb={}}function $b(e){if(e?.entryType===`measure`)try{return e.detail.devtools.track===`Components ⚛`}catch{return}}function ex(e,t,n,r,i,a){if($b(t)||[`mark`,`measure`].includes(t.entryType)&<(t.name,a))return;let o=oy(!1),s=G(o?o.requestStart:0),c=i+Math.max(n,s),l=i+n,u=l+r,d={[P]:`auto.resource.browser.metrics`};c!==l&&(d[`sentry.browser.measure_happened_before_request`]=!0,d[`sentry.browser.measure_start_time`]=c),tx(d,t),c<=u&&Cb(e,c,u,{name:t.name,op:t.entryType,attributes:d})}function tx(e,t){try{let n=t.detail;if(!n)return;if(typeof n==`object`){for(let[t,r]of Object.entries(n))if(r&&Te(r))e[`sentry.browser.measure.detail.${t}`]=r;else if(r!==void 0)try{e[`sentry.browser.measure.detail.${t}`]=JSON.stringify(r)}catch{}return}if(Te(n)){e[`sentry.browser.measure.detail`]=n;return}try{e[`sentry.browser.measure.detail`]=JSON.stringify(n)}catch{}}catch{}}function nx(e,t,n){[`unloadEvent`,`redirect`,`domContentLoadedEvent`,`loadEvent`,`connect`].forEach(r=>{rx(e,t,r,n)}),rx(e,t,`secureConnection`,n,`TLS/SSL`),rx(e,t,`fetch`,n,`cache`),rx(e,t,`domainLookup`,n,`DNS`),ax(e,t,n)}function rx(e,t,n,r,i=n){let a=t[ix(n)],o=t[`${n}Start`];!o||!a||Cb(e,r+G(o),r+G(a),{op:`browser.${i}`,name:t.name,attributes:{[P]:`auto.ui.browser.metrics`,...n===`redirect`&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function ix(e){return e===`secureConnection`?`connectEnd`:e===`fetch`?`domainLookupStart`:`${e}End`}function ax(e,t,n){let r=n+G(t.requestStart),i=n+G(t.responseEnd),a=n+G(t.responseStart);t.responseEnd&&(Cb(e,r,i,{op:`browser.request`,name:t.name,attributes:{[P]:`auto.ui.browser.metrics`}}),Cb(e,a,i,{op:`browser.response`,name:t.name,attributes:{[P]:`auto.ui.browser.metrics`}}))}function ox(e,t,n,r,i,a,o){if(t.initiatorType===`xmlhttprequest`||t.initiatorType===`fetch`)return;let s=t.initiatorType?`resource.${t.initiatorType}`:`resource.other`;if(o?.includes(s))return;let c={[P]:`auto.resource.browser.metrics`},l=Jc(n);l.protocol&&(c[`url.scheme`]=l.protocol.split(`:`).pop()),l.host&&(c[`server.address`]=l.host),c[`url.same_origin`]=n.includes(W.location.origin),c[An]=n,lx(t,c,[[`responseStatus`,`http.response.status_code`],[`transferSize`,`http.response_transfer_size`],[`encodedBodySize`,`http.response_content_length`],[`decodedBodySize`,`http.decoded_response_content_length`],[`renderBlockingStatus`,`resource.render_blocking_status`],[`deliveryType`,`http.response_delivery_type`]]);let u={...c,...Fb(t)},d=a+r;Cb(e,d,d+i,{name:n.replace(W.location.origin,``),op:s,attributes:u})}function sx(e,t){let n=W.navigator;if(!n)return;let r=n.connection;r&&(r.effectiveType&&e.setAttribute(t?`network.connection.effective_type`:`effectiveConnectionType`,r.effectiveType),r.type&&e.setAttribute(t?`network.connection.type`:`connectionType`,r.type),Sb(r.rtt)&&(t?e.setAttribute(`network.connection.rtt`,r.rtt):F(e).op===`pageload`&&Hi(`connection.rtt`,r.rtt,`millisecond`))),Sb(n.deviceMemory)&&(t?e.setAttribute(`device.memory.estimated_capacity`,n.deviceMemory):e.setAttribute(`deviceMemory`,`${n.deviceMemory} GB`)),Sb(n.hardwareConcurrency)&&(t?e.setAttribute(`device.processor_count`,n.hardwareConcurrency):e.setAttribute(`hardwareConcurrency`,String(n.hardwareConcurrency)))}function cx(e,t){Bb&&t.recordLcpOnPageloadSpan&&(Bb.element&&e.setAttribute(`lcp.element`,yb(Bb.element)),Bb.id&&e.setAttribute(`lcp.id`,Bb.id),Bb.url&&e.setAttribute(`lcp.url`,Bb.url.trim().slice(0,200)),Bb.loadTime!=null&&e.setAttribute(`lcp.loadTime`,Bb.loadTime),Bb.renderTime!=null&&e.setAttribute(`lcp.renderTime`,Bb.renderTime),e.setAttribute(`lcp.size`,Bb.size)),Vb?.sources&&t.recordClsOnPageloadSpan&&Vb.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,yb(t.node)))}function lx(e,t,n){n.forEach(([n,r])=>{let i=e[n];i!=null&&(typeof i==`number`&&i<Lb||typeof i==`string`)&&(t[r]=i)})}function ux(e){let t=oy(!1);if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(e[`ttfb.requestTime`]={value:n-r,unit:`millisecond`})}var dx=`ElementTiming`,fx=R((()=>({name:dx,setup(){!Tb()||!Dt()||ab(`element`,({entries:e})=>{for(let t of e){let e=t;if(!e.identifier)continue;let n=e.identifier,r=e.name,i=e.renderTime,a=e.loadTime,o={"sentry.origin":`auto.ui.browser.element_timing`,"ui.element.identifier":n};r&&(o[`ui.element.paint_type`]=r),e.id&&(o[`ui.element.id`]=e.id),e.element&&(o[`ui.element.type`]=e.element.tagName.toLowerCase()),e.url&&(o[`ui.element.url`]=e.url),e.naturalWidth&&(o[`ui.element.width`]=e.naturalWidth),e.naturalHeight&&(o[`ui.element.height`]=e.naturalHeight),i>0&&Id(`ui.element.render_time`,i,{unit:`millisecond`,attributes:o}),a>0&&Id(`ui.element.load_time`,a,{unit:`millisecond`,attributes:o})}})}}))),px=[],mx=new Map,hx=new Map;function gx(){if(Tb()&&Dt()){let e=vx();return()=>{e()}}return()=>void 0}var _x={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`};function vx(){return ib(yx)}var yx=({metric:e})=>{if(e.value==null)return;let t=G(e.value);if(t>60)return;let n=e.entries.find(t=>t.duration===e.value&&_x[t.name]);if(!n)return;let{interactionId:r}=n,i=_x[n.name],a=G(Dt()+n.startTime),o=zr(),s=o?I(o):void 0,c=r==null?void 0:mx.get(r),l=c?.span||s,u=l?F(l).description:k().getScopeData().transactionName,d=wb({name:c?.elementName||yb(n.target),transaction:u,attributes:{[P]:`auto.http.browser.inp`,[N]:`ui.interaction.${i}`,[kn]:n.duration},startTime:a});d&&(d.addEvent(`inp`,{[vn]:`millisecond`,[yn]:e.value}),d.end(a+t))};function bx(e){return e==null?void 0:mx.get(e)}function xx(){let e=Object.keys(_x);ys()&&e.forEach(e=>{W.addEventListener(e,t,{capture:!0,passive:!0})});function t(e){let t=e.target;if(!t)return;let n=yb(t),r=Math.round(e.timeStamp);if(hx.set(r,n),hx.size>50){let e=hx.keys().next().value;e!==void 0&&hx.delete(e)}}function n(e){let t=Math.round(e.startTime),n=hx.get(t);if(!n)for(let e=-5;e<=5;e++){let r=hx.get(t+e);if(r){n=r;break}}return n||`<unknown>`}let r=({entries:e})=>{let t=zr(),r=t&&I(t);e.forEach(e=>{if(!hb(e))return;let t=e.interactionId;if(t==null||mx.has(t))return;let i=e.target?yb(e.target):n(e);if(px.length>10){let e=px.shift();mx.delete(e)}px.push(t),mx.set(t,{span:r,elementName:i})})};ab(`event`,r),ab(`first-input`,r)}function Sx(e){let{name:t,op:n,origin:r,metricName:i,value:a,attributes:o,parentSpan:s,reportEvent:c,startTime:l,endTime:u}=e,d=k().getScopeData().transactionName,f={[P]:r,[N]:n,[kn]:0,[`browser.web_vital.${i}.value`]:a,[oi]:d,[ri]:d,"user_agent.original":W.navigator?.userAgent,...o};s&&wr(s).attributes?.[`sentry.op`]===`pageload`&&(f[`sentry.pageload.span_id`]=s.spanContext().spanId),c&&(f[`browser.web_vital.${i}.report_event`]=c);let p=ia({name:t,attributes:f,startTime:l,parentSpan:s});p&&p.end(u??l)}function Cx(e){let t=0,n;if(!Db(`largest-contentful-paint`))return;let r=nb(({metric:e})=>{let r=e.entries[e.entries.length-1];!r||!jb(e.value)||(t=e.value,n=r)},!0);Ob(e,(e,i,a)=>{wx(t,n,a,e),r()})}function wx(e,t,n,r){if(!jb(e))return;ry&&x.log(`Sending LCP span (${e})`);let i=Dt()||0,a=G(i),o=G(i+(t?.startTime||0)),s=t?yb(t.element):`Largest contentful paint`,c={};t?.element&&(c[`browser.web_vital.lcp.element`]=yb(t.element)),t?.id&&(c[`browser.web_vital.lcp.id`]=t.id),t?.url&&(c[`browser.web_vital.lcp.url`]=t.url),t?.loadTime!=null&&(c[`browser.web_vital.lcp.load_time`]=t.loadTime),t?.renderTime!=null&&(c[`browser.web_vital.lcp.render_time`]=t.renderTime),t?.size!=null&&(c[`browser.web_vital.lcp.size`]=t.size),Sx({name:s,op:`ui.webvital.lcp`,origin:`auto.http.browser.lcp`,metricName:`lcp`,value:e,attributes:c,parentSpan:n,reportEvent:r,startTime:a,endTime:o})}function Tx(e){let t=0,n;if(!Db(`layout-shift`))return;let r=tb(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&(t=e.value,n=r)},!0);Ob(e,(e,i,a)=>{Ex(t,n,a,e),r()})}function Ex(e,t,n,r){ry&&x.log(`Sending CLS span (${e})`);let i=t?G((Dt()||0)+t.startTime):O(),a=t?yb(t.sources[0]?.node):`Layout shift`,o={};t?.sources&&t.sources.forEach((e,t)=>{o[`browser.web_vital.cls.source.${t+1}`]=yb(e.node)}),Sx({name:a,op:`ui.webvital.cls`,origin:`auto.http.browser.cls`,metricName:`cls`,value:e,attributes:o,parentSpan:n,reportEvent:r,startTime:i})}function Dx(){!Tb()||!Dt()||ib(({metric:e})=>{if(e.value==null||G(e.value)>60)return;let t=e.entries.find(t=>t.duration===e.value&&_x[t.name]);t&&Ox(e.value,t)})}function Ox(e,t){ry&&x.log(`Sending INP span (${e})`);let n=G(Dt()+t.startTime),r=G(e),i=_x[t.name],a=bx(t.interactionId),o=zr(),s=o?I(o):void 0,c=a?.span||s,l=c?wr(c).name:k().getScopeData().transactionName;Sx({name:a?.elementName||yb(t.target),op:`ui.interaction.${i}`,origin:`auto.http.browser.inp`,metricName:`inp`,value:e,attributes:{[kn]:t.duration,[oi]:l,[ri]:l},startTime:n,endTime:n+r,parentSpan:c})}var kx=1e3,Ax,jx,Mx;function Nx(e){ce(`dom`,e),le(`dom`,Px)}function Px(){if(!W.document)return;let e=ue.bind(null,`dom`),t=Lx(e,!0);W.document.addEventListener(`click`,t,!1),W.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=W[t]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(Ne(n,`addEventListener`,function(t){return function(n,r,i){if(n===`click`||n==`keypress`)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){let r=Lx(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),Ne(n,`removeEventListener`,function(e){return function(t,n,r){if(t===`click`||t==`keypress`)try{let 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]),Object.keys(n).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function Fx(e){if(e.type!==jx)return!1;try{if(!e.target||e.target._sentryId!==Mx)return!1}catch{}return!0}function Ix(e,t){return e===`keypress`?!t?.tagName||!(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable):!1}function Lx(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=Rx(n);if(Ix(n.type,r))return;D(n,`_sentryCaptured`,!0),r&&!r._sentryId&&D(r,`_sentryId`,pt());let i=n.type===`keypress`?`input`:n.type;Fx(n)||(e({event:n,name:i,global:t}),jx=n.type,Mx=r?r._sentryId:void 0),clearTimeout(Ax),Ax=W.setTimeout(()=>{Mx=void 0,jx=void 0},kx)}}function Rx(e){try{return e.target}catch{return null}}var zx;function Bx(e){let t=`history`;ce(t,e),le(t,Vx)}function Vx(){if(W.addEventListener(`popstate`,()=>{let e=W.location.href,t=zx;zx=e,t!==e&&ue(`history`,{from:t,to:e})}),!yh())return;function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=zx,i=Hx(String(n));if(zx=i,r===i)return e.apply(this,t);ue(`history`,{from:r,to:i})}return e.apply(this,t)}}Ne(W.history,`pushState`,e),Ne(W.history,`replaceState`,e)}function Hx(e){try{return new URL(e,W.location.origin).toString()}catch{return e}}var Ux={};function Wx(e){let t=Ux[e];if(t)return t;let n=W[e];if(xh(n))return Ux[e]=n.bind(W);let r=W.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){ry&&x.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(Ux[e]=n.bind(W))}function Gx(e){Ux[e]=void 0}function Kx(...e){return Wx(`setTimeout`)(...e)}var qx=`__sentry_xhr_v3__`;function Jx(e){ce(`xhr`,e),le(`xhr`,Yx)}function Yx(){if(!W.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=O()*1e3,a=Ce(n[0])?n[0].toUpperCase():void 0,o=Xx(n[1]);if(!a||!o)return e.apply(t,n);t[qx]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[qx];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}ue(`xhr`,{endTimestamp:O()*1e3,startTimestamp:i,xhr:t,virtualError:r})}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,n){return s(),e.apply(t,n)}}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[qx];return a&&Ce(r)&&Ce(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[qx];return r?(n[0]!==void 0&&(r.body=n[0]),ue(`xhr`,{startTimestamp:O()*1e3,xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function Xx(e){if(Ce(e))return e;try{return e.toString()}catch{}}var Zx=Symbol.for(`sentry__originalRequestBody`);function Qx(e){return new URLSearchParams(e).toString()}function $x(e,t=x){try{if(typeof e==`string`)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Qx(e)];if(!e)return[void 0]}catch(n){return ry&&t.error(n,`Failed to serialize body`,e),[void 0,`BODY_PARSE_ERROR`]}return ry&&t.log(`Skipping network body because of body type`,e),[void 0,`UNPARSEABLE_BODY_TYPE`]}function eS(e=[]){if(e.length>=2&&e[1]&&typeof e[1]==`object`&&`body`in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){let t=e[0][Zx];return t===void 0?void 0:t}}function tS(e){let t;try{t=e.getAllResponseHeaders()}catch(t){return ry&&x.error(t,`Failed to get xhr response headers`,e),{}}return t?t.split(`\r
|
|
492
|
-
`).reduce((e,t)=>{let[n,r]=t.split(`: `);return r&&(e[n.toLowerCase()]=r),e},{}):{}}function nS(e){if(typeof Element>`u`)return!1;try{return e instanceof Element}catch{return!1}}function rS(e){try{return new URL(e,W.location.origin).toString()}catch{return e}}var iS=40;function aS(e,t=Wx(`fetch`)){let n=0,r=0;async function i(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`strict-origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{let n=await t(e.url,o);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get(`X-Sentry-Rate-Limits`),"retry-after":n.headers.get(`Retry-After`)}}}catch(e){throw Gx(`fetch`),e}finally{n-=a,r--}}return Qs(e,i,Ks(e.bufferSize||iS))}var K=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__;function oS(){let e=j();if(!e){K&&x.warn(`No Sentry client available, profiling is not started`);return}if(!e.getIntegrationByName(`BrowserProfiling`)){K&&x.warn(`BrowserProfiling integration is not available`);return}e.emit(`startUIProfiler`)}function sS(){let e=j();if(!e){K&&x.warn(`No Sentry client available, profiling is not started`);return}if(!e.getIntegrationByName(`BrowserProfiling`)){K&&x.warn(`ProfilingIntegration is not available`);return}e.emit(`stopUIProfiler`)}var cS={startProfiler:oS,stopProfiler:sS},lS=10,uS=20,dS=30,fS=40,pS=50;function mS(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?`?`:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var hS=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,gS=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,_S=/\((\S*)(?::(\d+))(?::(\d+))\)/,vS=/at (.+?) ?\(data:(.+?),/,yS=[dS,e=>{let t=e.match(vS);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=hS.exec(e);if(n){let[,e,t,r]=n;return mS(e,`?`,+t,+r)}let r=gS.exec(e);if(r){if(r[2]?.indexOf(`eval`)===0){let e=_S.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=jS(r[1]||`?`,r[2]);return mS(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],bS=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,xS=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,SS=[pS,e=>{let t=bS.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=xS.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]||`?`;return[n,e]=jS(n,e),mS(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],CS=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,wS=[fS,e=>{let t=CS.exec(e);return t?mS(t[2],t[1]||`?`,+t[3],t[4]?+t[4]:void 0):void 0}],TS=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,ES=[lS,e=>{let t=TS.exec(e);return t?mS(t[2],t[3]||`?`,+t[1]):void 0}],DS=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,OS=[uS,e=>{let t=DS.exec(e);return t?mS(t[5],t[3]||t[4]||`?`,+t[1],+t[2]):void 0}],kS=[yS,SS],AS=T(...kS),jS=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?`?`:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function MS(e,{metadata:t,tunnel:n,dsn:r}){return bi({event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:er(r)}},[NS(e)])}function NS(e){return[{type:`user_report`},e]}var PS=1024,FS=`Breadcrumbs`,IS=R(((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:FS,setup(e){t.console&&Ul(zS(e)),t.dom&&Nx(RS(e,t.dom)),t.xhr&&Jx(BS(e)),t.fetch&&wh(VS(e)),t.history&&Bx(HS(e)),t.sentry&&e.on(`beforeSendEvent`,LS(e))}}}));function LS(e){return function(t){j()===e&&ul({category:`sentry.${t.type===`transaction`?`transaction`:`event`}`,event_id:t.event_id,level:t.level,message:ht(t)},{event:t})}}function RS(e,t){return function(n){if(j()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>PS&&(K&&x.warn(`\`dom.maxStringLength\` cannot exceed ${PS}, but a value of ${o} was configured. Sentry will use ${PS} instead.`),o=PS),typeof a==`string`&&(a=[a]);try{let e=n.event,t=US(e)?e.target:e;r=yb(t,{keyAttrs:a,maxStringLength:o}),i=Fh(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),ul(s,{event:n.event,name:n.name,global:n.global})}}function zS(e){return function(t){if(j()!==e)return;let n={category:`console`,data:{arguments:t.args,logger:`console`},level:Gl(t.level),message:st(t.args,` `)};if(t.level===`assert`)if(t.args[0]===!1)n.message=`Assertion failed: ${st(t.args.slice(1),` `)||`console.assert`}`,n.data.arguments=t.args.slice(1);else return;ul(n,{input:t.args,level:t.level})}}function BS(e){return function(t){if(j()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[qx];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:o,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:`xhr`,data:l,type:`http`,level:_h(s)};e.emit(`beforeOutgoingRequestBreadcrumb`,d,u),ul(d,u)}}function VS(e){return function(t){if(j()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method===`POST`))if(t.error){let i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:`fetch`,data:t.fetchData,level:`error`,type:`http`};e.emit(`beforeOutgoingRequestBreadcrumb`,a,i),ul(a,i)}else{let i=t.response,a={...t.fetchData,status_code:i?.status},o={input:t.args,response:i,startTimestamp:n,endTimestamp:r},s={category:`fetch`,data:a,type:`http`,level:_h(a.status_code)};e.emit(`beforeOutgoingRequestBreadcrumb`,s,o),ul(s,o)}}}function HS(e){return function(t){if(j()!==e)return;let n=t.from,r=t.to,i=Jc(U.location.href),a=n?Jc(n):void 0,o=Jc(r);a?.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),ul({category:`navigation`,data:{from:n,to:r}})}}function US(e){return!!e&&!!e.target}var WS=`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`.split(`,`),GS=`BrowserApiErrors`,KS=R(((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:GS,setupOnce(){t.setTimeout&&Ne(U,`setTimeout`,qS),t.setInterval&&Ne(U,`setInterval`,qS),t.requestAnimationFrame&&Ne(U,`requestAnimationFrame`,JS),t.XMLHttpRequest&&`XMLHttpRequest`in U&&Ne(XMLHttpRequest.prototype,`send`,YS);let e=t.eventTarget;e&&(Array.isArray(e)?e:WS).forEach(e=>XS(e,t))}}}));function qS(e){return function(...t){let n=t[0];return t[0]=Ov(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${ie(e)}`}}),e.apply(this,t)}}function JS(e){return function(t){return e.apply(this,[Ov(t,{mechanism:{data:{handler:ie(e)},handled:!1,type:`auto.browser.browserapierrors.requestAnimationFrame`}})])}}function YS(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&Ne(n,e,function(t){let n={mechanism:{data:{handler:ie(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=Fe(t);return r&&(n.mechanism.data.handler=ie(r)),Ov(t,n)})}),e.apply(this,t)}}function XS(e,t){let n=U[e]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(Ne(n,`addEventListener`,function(n){return function(r,i,a){try{ZS(i)&&(i.handleEvent=Ov(i.handleEvent,{mechanism:{data:{handler:ie(i),target:e},handled:!1,type:`auto.browser.browserapierrors.handleEvent`}}))}catch{}return t.unregisterOriginalCallbacks&&QS(this,r,i),n.apply(this,[r,Ov(i,{mechanism:{data:{handler:ie(i),target:e},handled:!1,type:`auto.browser.browserapierrors.addEventListener`}}),a])}}),Ne(n,`removeEventListener`,function(e){return function(t,n,r){try{if(Object.prototype.hasOwnProperty.call(n,`__sentry_wrapped__`)){let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}}catch{}return e.call(this,t,n,r)}}))}function ZS(e){return typeof e.handleEvent==`function`}function QS(e,t,n){e&&typeof e==`object`&&`removeEventListener`in e&&typeof e.removeEventListener==`function`&&e.removeEventListener(t,n)}var $S=R((e={})=>{let t=e.lifecycle??`route`;return{name:`BrowserSession`,setupOnce(){if(U.document===void 0){K&&x.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}qo({ignoreDuration:!0});let e=!1;zy(()=>{e||=(Xo(),!0)});let n=A(),r=n.getUser();n.addScopeListener(t=>{let n=t.getUser();(r?.id!==n?.id||r?.ip_address!==n?.ip_address)&&(r=n,e&&Xo())}),t===`route`&&Bx(({from:t,to:n})=>{t!==n&&(qo({ignoreDuration:!0}),Xo(),e=!0)})}}}),eC=`CultureContext`,tC=R((()=>({name:eC,preprocessEvent(e){let t=nC();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){let t=nC();t&&eo(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})));function nC(){try{let e=U.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var rC=`GlobalHandlers`,iC=R(((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:rC,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(aC(e),uC(`onerror`)),t.onunhandledrejection&&(oC(e),uC(`onunhandledrejection`))}}}));function aC(e){fe(t=>{let{stackParser:n,attachStacktrace:r}=dC();if(j()!==e||Ev())return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=lC(Xv(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,jo(l,{originalException:c,mechanism:{handled:!1,type:`auto.browser.global_handlers.onerror`}})})}function oC(e){he(t=>{let{stackParser:n,attachStacktrace:r}=dC();if(j()!==e||Ev())return;let i=sC(t),a=Te(i)?cC(i):Xv(n,i,void 0,r,!0);a.level=`error`,jo(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.global_handlers.onunhandledrejection`}})})}function sC(e){if(Te(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}function cC(e){return{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function lC(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:fC(t)??Ph(),function:`?`,in_app:!0}),e}function uC(e){K&&x.log(`Global Handler attached: ${e}`)}function dC(){return j()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function fC(e){if(!(!Ce(e)||e.length===0))return e.startsWith(`data:`)?`<${Xc(e,!1)}>`:e}var pC=R(()=>({name:`HttpContext`,preprocessEvent(e){if(!U.navigator&&!U.location&&!U.document)return;let t=kv(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){let t=e.attributes?.[N];if(!U.navigator&&!U.location&&!U.document)return;let n=kv();eo(e,{"url.full":t===`http.client`?void 0:n.url,"http.request.header.user_agent":n.headers[`User-Agent`],"http.request.header.referer":n.headers.Referer})}})),mC=`cause`,hC=5,gC=`LinkedErrors`,_C=R(((e={})=>{let t=e.limit||hC,n=e.key||mC;return{name:gC,preprocessEvent(e,r,i){Ol(Rv,i.getOptions().stackParser,n,t,e,r)}}})),vC=/^HTML(\w*)Element$/;function yC(e){if(typeof window<`u`&&e===window)return`[Window]`;if(typeof document<`u`&&e===document)return`[Document]`;if(nS(e)){let t=bC(e);if(vC.test(t))return`[HTMLElement: ${yb(e)}]`}}function bC(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function xC(){return SC()?(K&&f(()=>{console.error(`[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/`)}),!0):!1}function SC(){if(U.window===void 0)return!1;let e=U;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let t=Ph();return!(U===U.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(t))}function CC(e){return[vl(),ml(),od(),KS(),IS(),iC(),_C(),Xl(),pC(),tC(),$S()]}function wC(e={}){let t=!e.skipBrowserExtensionCheck&&xC(),n=e.defaultIntegrations==null?CC():e.defaultIntegrations,r={...e,enabled:!t&&e.enabled,stackParser:ee(e.stackParser||AS),integrations:as({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||aS};return Xe(yC),Ac(ty,r)}function TC(){}function EC(e){e()}function DC(e={}){let t=U.document,n=t?.head||t?.body;if(!n){K&&x.error(`[showReportDialog] Global document not defined`);return}let r=k(),i=j()?.getDsn();if(!i){K&&x.error(`[showReportDialog] DSN not configured`);return}let a={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||Vo()},o=U.document.createElement(`script`);o.async=!0,o.crossOrigin=`anonymous`,o.src=ns(i,a);let{onLoad:s,onClose:c}=a;if(s&&(o.onload=s),c){let e=t=>{if(t.data===`__sentry_reportdialog_closed__`)try{c()}finally{U.removeEventListener(`message`,e)}};U.addEventListener(`message`,e)}n.appendChild(o)}var OC=i,kC=`ReportingObserver`,AC=new WeakMap,jC=R(((e={})=>{let t=e.types||[`crash`,`deprecation`,`intervention`];function n(e){if(AC.has(j()))for(let t of e)fn(e=>{e.setExtra(`url`,t.url);let n=`ReportingObserver [${t.type}]`,r=`No details available`;if(t.body){let n={};for(let e in t.body)n[e]=t.body[e];if(e.setExtra(`body`,n),t.type===`crash`){let e=t.body;r=[e.crashId||``,e.reason||``].join(` `).trim()||r}else r=t.body.message||r}Ao(`${n}: ${r}`)})}return{name:kC,setupOnce(){Ch()&&new OC.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(e){AC.set(e,!0)}}})),MC=`HttpClient`,NC=R(((e={})=>{let t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:MC,setup(e){VC(e,t),HC(e,t)}}}));function PC(e,t,n,r,i){if(UC(e,n.status,n.url)){let e=GC(t,r),a,o,s,c,l=KC();if(l.requestHeaders!==!1&&(a=Vc(LC(e.headers),l.requestHeaders)),l.responseHeaders!==!1&&(o=Vc(LC(n.headers),l.responseHeaders)),l.cookies!==!1){let t=e.headers.get(`Cookie`)||void 0;if(t){let e=Uc(t,l.cookies);typeof e==`object`&&(s=e)}let r=n.headers.get(`Set-Cookie`)||void 0;if(r){let e=Uc(r,l.cookies);typeof e==`object`&&(c=e)}}jo(WC({url:e.url,method:e.method,status:n.status,requestHeaders:a,responseHeaders:o,requestCookies:s,responseCookies:c,error:i,type:`fetch`}))}}function FC(e,t,n,r,i){if(UC(e,t.status,t.responseURL)){let e,a,o,s=KC();if(s.cookies!==!1)try{let e=t.getResponseHeader(`Set-Cookie`)||t.getResponseHeader(`set-cookie`)||void 0;if(e){let t=Uc(e,s.cookies);typeof t==`object`&&(a=t)}}catch{}if(s.responseHeaders!==!1)try{o=Vc(RC(t),s.responseHeaders)}catch{}s.requestHeaders!==!1&&(e=Vc(r,s.requestHeaders)),jo(WC({url:t.responseURL,method:n,status:t.status,requestHeaders:e,responseHeaders:o,responseCookies:a,error:i,type:`xhr`}))}}function IC(e){if(e){let t=e[`Content-Length`]||e[`content-length`];if(t)return parseInt(t,10)}}function LC(e){let t={};return e.forEach((e,n)=>{t[n]=e}),t}function RC(e){let t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
493
|
-
`).reduce((e,t)=>{let[n,r]=t.split(`: `);return n&&r&&(e[n]=r),e},{}):{}}function zC(e,t){return e.some(e=>typeof e==`string`?t.includes(e):e.test(t))}function BC(e,t){return e.some(e=>typeof e==`number`?e===t:t>=e[0]&&t<=e[1])}function VC(e,t){Sh()&&wh(n=>{if(j()!==e)return;let{response:r,args:i,error:a,virtualError:o}=n,[s,c]=i;r&&PC(t,s,r,c,a||o)},!1)}function HC(e,t){`XMLHttpRequest`in i&&Jx(n=>{if(j()!==e)return;let{error:r,virtualError:i}=n,a=n.xhr,o=a[qx];if(!o)return;let{method:s,request_headers:c}=o;try{FC(t,a,s,c,r||i)}catch(e){K&&x.warn(`Error while extracting response event form XHR response`,e)}})}function UC(e,t,n){return BC(e.failedRequestStatusCodes,t)&&zC(e.failedRequestTargets,n)
|
|
494
|
-
`),`</html>`];return i.forEach(e=>{let n=e.stacktrace;n?.frames&&(n.frames=n.frames.map(e=>QC(e,o,r,t)))}),e}function QC(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||vt(t,e,r),e}var $C=`GraphQLClient`,ew=(e=>({name:$C,setup(t){tw(t,e),nw(t,e)}}));function tw(e,t){e.on(`beforeOutgoingRequestSpan`,(e,n)=>{let r=F(e).data||{};if(r[`sentry.op`]!==`http.client`)return;let i=r[`url.full`]||r[`http.url`]||r.url,a=r[`http.request.method`]||r[`http.method`];if(!Ce(i)||!Ce(a))return;let{endpoints:o}=t,s=lt(i,o),c=iw(n);if(s&&c){let t=cw(c);if(t){let n=rw(t);e.updateName(`${a} ${i} (${n})`),ow(t)&&e.setAttribute(`graphql.document`,t.query),sw(t)&&(e.setAttribute(`graphql.persisted_query.hash.sha256`,t.extensions.persistedQuery.sha256Hash),e.setAttribute(`graphql.persisted_query.version`,t.extensions.persistedQuery.version))}}})}function nw(e,t){e.on(`beforeOutgoingRequestBreadcrumb`,(e,n)=>{let{category:r,type:i,data:a}=e;if(i===`http`&&(r===`fetch`||r===`xhr`)){let e=a?.url,{endpoints:r}=t,i=lt(e,r),o=iw(n);if(i&&a&&o){let e=cw(o);!a.graphql&&e&&(a[`graphql.operation`]=rw(e),ow(e)&&(a[`graphql.document`]=e.query),sw(e)&&(a[`graphql.persisted_query.hash.sha256`]=e.extensions.persistedQuery.sha256Hash,a[`graphql.persisted_query.version`]=e.extensions.persistedQuery.version))}}})}function rw(e){if(sw(e))return`persisted ${e.operationName}`;if(ow(e)){let{query:t,operationName:n}=e,{operationName:r=n,operationType:i}=aw(t);return r?`${i} ${r}`:`${i}`}return`unknown`}function iw(e){let t=`xhr`in e,n;if(t){let t=e.xhr[qx];n=t&&$x(t.body)[0]}else n=$x(eS(e.input))[0];return n}function aw(e){let t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};let i=e.match(n);return i?{operationType:i[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function ow(e){return De(e)&&typeof e.query==`string`}function sw(e){return De(e)&&typeof e.operationName==`string`&&De(e.extensions)&&De(e.extensions.persistedQuery)&&typeof e.extensions.persistedQuery.sha256Hash==`string`&&typeof e.extensions.persistedQuery.version==`number`}function cw(e){try{let t=JSON.parse(e);return ow(t)||sw(t)?t:void 0}catch{return}}var lw=R(ew),uw=R((e={})=>{let t=[`script`];function n(r,i,a=0){if(!r)return;let o=`shadowRoot`in r&&r.shadowRoot?r.shadowRoot.children:r.children;for(let r of o){if(!(r instanceof HTMLElement))continue;let o=Fh(r,1)||void 0,s=r.tagName.toLowerCase();if(t.includes(s))continue;let c=e.onElement?.({element:r,componentName:o,tagName:s,depth:a})||{};if(c===`skip`)continue;if(c===`children`){n(r,i,a+1);continue}let{x:l,y:u,width:d,height:f}=r.getBoundingClientRect(),p={identifier:r.id||void 0,type:o||s,visible:!0,alpha:1,height:f,width:d,x:l,y:u,...c};p.children=[],n(r,p.children,a+1),i.push(p)}}return{name:`ViewHierarchy`,processEvent:(t,r)=>{if(t.type!==void 0||e.shouldAttach?.(t,r)===!1)return t;let i={rendering_system:`DOM`,positioning:`absolute`,windows:[]};n(e.rootElement?.()||U.document.body,i.windows);let a={filename:`view-hierarchy.json`,attachmentType:`event.view_hierarchy`,contentType:`application/json`,data:JSON.stringify(i)};return r.attachments=r.attachments||[],r.attachments.push(a),t}}}),q=i,dw=`sentryReplaySession`,fw=`replay_event`,pw=`Unable to send Replay`,mw=3e5,hw=9e5,gw=5e3,_w=5500,vw=6e4,yw=5e3,bw=3,xw=15e4,Sw=5e3,Cw=3e3,ww=300,Tw=2e7,Ew=4999,Dw=5e4,Ow=36e5,kw=Object.defineProperty,Aw=(e,t,n)=>t in e?kw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jw=(e,t,n)=>Aw(e,typeof t==`symbol`?t:t+``,n),Mw=(e=>(e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`,e))(Mw||{});function Nw(e){return e.nodeType===e.ELEMENT_NODE}function Pw(e){return e?.host?.shadowRoot===e}function Fw(e){return Object.prototype.toString.call(e)===`[object ShadowRoot]`}function Iw(e){return e.includes(` background-clip: text;`)&&!e.includes(` -webkit-background-clip: text;`)&&(e=e.replace(/\sbackground-clip:\s*text;/g,` -webkit-background-clip: text; background-clip: text;`)),e}function Lw(e){let{cssText:t}=e;if(t.split(`"`).length<3)return t;let n=[`@import`,`url(${JSON.stringify(e.href)})`];return e.layerName===``?n.push(`layer`):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(` `)+`;`}function Rw(e){try{let t=e.rules||e.cssRules;return t?Iw(Array.from(t,Bw).join(``)):null}catch{return null}}function zw(e){let t=``;for(let n=0;n<e.style.length;n++){let r=e.style,i=r[n],a=r.getPropertyPriority(i);t+=`${i}:${r.getPropertyValue(i)}${a?` !important`:``};`}return`${e.selectorText} { ${t} }`}function Bw(e){let t;if(Hw(e))try{t=Rw(e.styleSheet)||Lw(e)}catch{}else if(Uw(e)){let t=e.cssText,n=e.selectorText.includes(`:`),r=typeof e.style.all==`string`&&e.style.all;if(r&&(t=zw(e)),n&&(t=Vw(t)),n||r)return t}return t||e.cssText}function Vw(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,`$1\\$2`)}function Hw(e){return`styleSheet`in e}function Uw(e){return`selectorText`in e}var Ww=class{constructor(){jw(this,`idNodeMap`,new Map),jw(this,`nodeMetaMap`,new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Gw(){return new Ww}function Kw({maskInputOptions:e,tagName:t,type:n}){return t===`OPTION`&&(t=`SELECT`),!!(e[t.toLowerCase()]||n&&e[n]||n===`password`||t===`INPUT`&&!n&&e.text)}function qw({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||``;return e?(r&&(i=r(i,t)),`*`.repeat(i.length)):i}function Jw(e){return e.toLowerCase()}function Yw(e){return e.toUpperCase()}var Xw=`__rrweb_original__`;function Zw(e){let t=e.getContext(`2d`);if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){let i=t.getImageData,a=Xw in i?i[Xw]:i;if(new Uint32Array(a.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>e!==0))return!1}return!0}function Qw(e){let t=e.type;return e.hasAttribute(`data-rr-is-password`)?`password`:t?Jw(t):null}function $w(e,t,n){return t===`INPUT`&&(n===`radio`||n===`checkbox`)?e.getAttribute(`value`)||``:e.value}function eT(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}return n.pathname.match(/\.([0-9a-z]+)(?:$)/i)?.[1]??null}var tT={};function nT(e){let t=tT[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement==`function`)try{let t=n.createElement(`iframe`);t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch{}return tT[e]=r.bind(window)}function rT(...e){return nT(`setTimeout`)(...e)}function iT(...e){return nT(`clearTimeout`)(...e)}function aT(e){try{return e.contentDocument}catch{}}function oT(e){try{return e.contentWindow}catch{}}var sT=1,cT=RegExp(`[^a-z0-9-_:]`),lT=-2;function uT(){return sT++}function dT(e){if(e instanceof HTMLFormElement)return`form`;let t=Jw(e.tagName);return cT.test(t)?`div`:t}function fT(e){let t=``;return t=e.indexOf(`//`)>-1?e.split(`/`).slice(0,3).join(`/`):e.split(`/`)[0],t=t.split(`?`)[0],t}var pT,mT,hT=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,gT=/^(?:[a-z+]+:)?\/\//i,_T=/^www\..*/i,vT=/^(data:)([^,]*),(.*)/i;function yT(e,t){if(!e||t.size===0)return e;try{let n=e.split(`;`),r=[];for(let e of n){if(e=e.trim(),!e)continue;let n=e.indexOf(`:`);if(n===-1){r.push(e);continue}let i=e.slice(0,n).trim();t.has(i)||r.push(e)}return r.join(`; `)+(r.length>0&&e.endsWith(`;`)?`;`:``)}catch(t){return console.warn(`Error filtering CSS properties:`,t),e}}function bT(e,t){return(e||``).replace(hT,(e,n,r,i,a,o)=>{let s=r||a||o,c=n||i||``;if(!s)return e;if(gT.test(s)||_T.test(s)||vT.test(s))return`url(${c}${s}${c})`;if(s[0]===`/`)return`url(${c}${fT(t)+s}${c})`;let l=t.split(`/`),u=s.split(`/`);l.pop();for(let e of u)if(e===`.`)continue;else e===`..`?l.pop():l.push(e);return`url(${c}${l.join(`/`)}${c})`})}var xT=/^[^ \t\n\r\u000c]+/,ST=/^[, \t\n\r\u000c]+/;function CT(e,t){if(t.trim()===``)return t;let n=0;function r(e){let r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):``}let i=[];for(;r(ST),!(n>=t.length);){let a=r(xT);if(a.slice(-1)===`,`)a=TT(e,a.substring(0,a.length-1)),i.push(a);else{let r=``;a=TT(e,a);let o=!1;for(;;){let e=t.charAt(n);if(e===``){i.push((a+r).trim());break}else if(o)e===`)`&&(o=!1);else if(e===`,`){n+=1,i.push((a+r).trim());break}else e===`(`&&(o=!0);r+=e,n+=1}}}return i.join(`, `)}var wT=new WeakMap;function TT(e,t){return!t||t.trim()===``?t:DT(e,t)}function ET(e){return!!(e.tagName===`svg`||e.ownerSVGElement)}function DT(e,t){let n=wT.get(e);if(n||(n=e.createElement(`a`),wT.set(e,n)),!t)t=``;else if(t.startsWith(`blob:`)||t.startsWith(`data:`))return t;return n.setAttribute(`href`,t),n.href}function OT(e,t,n,r,i,a,o){if(!r)return r;if(n===`src`||n===`href`&&!(t===`use`&&r[0]===`#`)||n===`xlink:href`&&r[0]!==`#`||n===`background`&&(t===`table`||t===`td`||t===`th`))return TT(e,r);if(n===`srcset`)return CT(e,r);if(n===`style`){let t=bT(r,DT(e));return o&&o.size>0&&(t=yT(t,o)),t}else if(t===`object`&&n===`data`)return TT(e,r);return typeof a==`function`?a(n,r,i):r}function kT(e,t,n){return(e===`video`||e===`audio`)&&t===`autoplay`}function AT(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t==`string`){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function jT(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function MT(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:MT(e.parentNode,t,n,r+1)}function NT(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e==`string`){if(r.matches(`.${e}`))return!0}else if(jT(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function PT(e,t,n,r,i,a){try{let o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName===`INPUT`){let e=o.getAttribute(`autocomplete`);if([`current-password`,`new-password`,`cc-number`,`cc-exp`,`cc-exp-month`,`cc-exp-year`,`cc-csc`].includes(e))return!0}let s=-1,c=-1;if(a){if(c=MT(o,NT(r,i)),c<0)return!0;s=MT(o,NT(t,n),c>=0?c:1/0)}else{if(s=MT(o,NT(t,n)),s<0)return!1;c=MT(o,NT(r,i),s>=0?s:1/0)}return s>=0?c>=0?s<=c:!0:c>=0?!1:!!a}catch{}return!!a}function FT(e,t,n){let r=oT(e);if(!r)return;let i=!1,a;try{a=r.document.readyState}catch{return}if(a!==`complete`){let r=rT(()=>{i||=(t(),!0)},n);e.addEventListener(`load`,()=>{iT(r),i=!0,t()});return}let o=`about:blank`;if(r.location.href!==o||e.src===o||e.src===``)return rT(t,0),e.addEventListener(`load`,t);e.addEventListener(`load`,t)}function IT(e,t,n){let r=!1,i;try{i=e.sheet}catch{i=null}if(i)return;let a=rT(()=>{r||=(t(),!0)},n);e.addEventListener(`load`,()=>{iT(a),r=!0,t()})}function LT(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:m={},maskTextFn:h,maskInputFn:g,dataURLOptions:_={},inlineImages:v,recordCanvas:y,keepIframeSrcFn:b,newlyAddedElement:x=!1,ignoreCSSAttributes:S}=t,C=RT(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode===`CSS1Compat`?{type:Mw.Document,childNodes:[]}:{type:Mw.Document,childNodes:[],compatMode:e.compatMode};case e.DOCUMENT_TYPE_NODE:return{type:Mw.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:C};case e.ELEMENT_NODE:return BT(e,{doc:n,blockClass:i,blockSelector:a,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:m,maskInputFn:g,dataURLOptions:_,inlineImages:v,recordCanvas:y,keepIframeSrcFn:b,newlyAddedElement:x,rootId:C,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,ignoreCSSAttributes:S});case e.TEXT_NODE:return zT(e,{doc:n,maskAllText:s,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:h,maskInputOptions:m,maskInputFn:g,rootId:C});case e.CDATA_SECTION_NODE:return{type:Mw.CDATA,textContent:``,rootId:C};case e.COMMENT_NODE:return{type:Mw.Comment,textContent:e.textContent||``,rootId:C};default:return!1}}function RT(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function zT(e,t){let{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:a,unmaskTextSelector:o,maskTextFn:s,maskInputOptions:c,maskInputFn:l,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName,f=e.textContent,p=d===`STYLE`||void 0,m=d===`SCRIPT`||void 0,h=d===`TEXTAREA`||void 0;if(p&&f){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(f=Rw(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}f=bT(f,DT(t.doc))}m&&(f=`SCRIPT_PLACEHOLDER`);let g=PT(e,r,a,i,o,n);return!p&&!m&&!h&&f&&g&&(f=s?s(f,e.parentElement):f.replace(/[\S]/g,`*`)),h&&f&&(c.textarea||g)&&(f=l?l(f,e.parentNode):f.replace(/[\S]/g,`*`)),d===`OPTION`&&f&&(f=qw({isMasked:PT(e,r,a,i,o,Kw({type:null,tagName:d,maskInputOptions:c})),element:e,value:f,maskInputFn:l})),{type:Mw.Text,textContent:f||``,isStyle:p,rootId:u}}function BT(e,t){let{doc:n,blockClass:r,blockSelector:i,unblockSelector:a,inlineStylesheet:o,maskInputOptions:s={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:h,maskTextClass:g,unmaskTextClass:_,maskTextSelector:v,unmaskTextSelector:y,ignoreCSSAttributes:b}=t,x=AT(e,r,i,a),S=dT(e),C={},w=e.attributes.length;for(let t=0;t<w;t++){let r=e.attributes[t];r.name&&!kT(S,r.name,r.value)&&(C[r.name]=OT(n,S,Jw(r.name),r.value,e,c,b))}if(S===`link`&&o){let t=Array.from(n.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=Rw(t)),r&&(C.rel=null,C.href=null,C.crossorigin=null,C._cssText=bT(r,t.href))}if(S===`style`&&e.sheet&&!(e.innerText||e.textContent||``).trim().length){let t=Rw(e.sheet);t&&(C._cssText=bT(t,DT(n)))}if(S===`input`||S===`textarea`||S===`select`||S===`option`){let t=e,n=Qw(t),r=$w(t,Yw(S),n),i=t.checked;if(n!==`submit`&&n!==`button`&&r){let e=PT(t,g,v,_,y,Kw({type:n,tagName:Yw(S),maskInputOptions:s}));C.value=qw({isMasked:e,element:t,value:r,maskInputFn:l})}i&&(C.checked=i)}if(S===`option`&&(e.selected&&!s.select?C.selected=!0:delete C.selected),S===`canvas`&&f){if(e.__context===`2d`)Zw(e)||(C.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!(`__context`in e)){let t=e.toDataURL(u.type,u.quality),r=n.createElement(`canvas`);r.width=e.width,r.height=e.height,t!==r.toDataURL(u.type,u.quality)&&(C.rr_dataURL=t)}}if(S===`img`&&d){pT||(pT=n.createElement(`canvas`),mT=pT.getContext(`2d`));let t=e,r=t.currentSrc||t.getAttribute(`src`)||`<unknown-src>`,i=t.crossOrigin,a=()=>{t.removeEventListener(`load`,a);try{pT.width=t.naturalWidth,pT.height=t.naturalHeight,mT.drawImage(t,0,0),C.rr_dataURL=pT.toDataURL(u.type,u.quality)}catch(e){if(t.crossOrigin!==`anonymous`){t.crossOrigin=`anonymous`,t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a);return}else console.warn(`Cannot inline img src=${r}! Error: ${e}`)}t.crossOrigin===`anonymous`&&(i?C.crossOrigin=i:t.removeAttribute(`crossorigin`))};t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a)}if((S===`audio`||S===`video`)&&(C.rr_mediaState=e.paused?`paused`:`played`,C.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(C.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(C.rr_scrollTop=e.scrollTop)),x){let{width:t,height:n}=e.getBoundingClientRect();C={class:C.class,rr_width:`${t}px`,rr_height:`${n}px`}}S===`iframe`&&!p(C.src)&&(!x&&!aT(e)&&(C.rr_src=C.src),delete C.src);let T;try{customElements.get(S)&&(T=!0)}catch{}return{type:Mw.Element,tagName:S,attributes:C,childNodes:[],isSVG:ET(e)||void 0,needBlock:x,rootId:h,isCustom:T}}function J(e){return e==null?``:e.toLowerCase()}function VT(e,t){return!!(t.comment&&e.type===Mw.Comment||e.type===Mw.Element&&(t.script&&(e.tagName===`script`||e.tagName===`link`&&(e.attributes.rel===`preload`||e.attributes.rel===`modulepreload`)||e.tagName===`link`&&e.attributes.rel===`prefetch`&&typeof e.attributes.href==`string`&&eT(e.attributes.href)===`js`)||t.headFavicon&&(e.tagName===`link`&&e.attributes.rel===`shortcut icon`||e.tagName===`meta`&&(J(e.attributes.name).match(/^msapplication-tile(image|color)$/)||J(e.attributes.name)===`application-name`||J(e.attributes.rel)===`icon`||J(e.attributes.rel)===`apple-touch-icon`||J(e.attributes.rel)===`shortcut icon`))||e.tagName===`meta`&&(t.headMetaDescKeywords&&J(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(J(e.attributes.property).match(/^(og|twitter|fb):/)||J(e.attributes.name).match(/^(og|twitter):/)||J(e.attributes.name)===`pinterest`)||t.headMetaRobots&&(J(e.attributes.name)===`robots`||J(e.attributes.name)===`googlebot`||J(e.attributes.name)===`bingbot`)||t.headMetaHttpEquiv&&e.attributes[`http-equiv`]!==void 0||t.headMetaAuthorship&&(J(e.attributes.name)===`author`||J(e.attributes.name)===`generator`||J(e.attributes.name)===`framework`||J(e.attributes.name)===`publisher`||J(e.attributes.name)===`progid`||J(e.attributes.property).match(/^article:/)||J(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(J(e.attributes.name)===`google-site-verification`||J(e.attributes.name)===`yandex-verification`||J(e.attributes.name)===`csrf-token`||J(e.attributes.name)===`p:domain_verify`||J(e.attributes.name)===`verify-v1`||J(e.attributes.name)===`verification`||J(e.attributes.name)===`shopify-checkout-api-token`))))}function HT(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:m={},maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y={},inlineImages:b=!1,recordCanvas:x=!1,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w=5e3,onBlockedImageLoad:T,onStylesheetLoad:ee,stylesheetLoadTimeout:te=5e3,keepIframeSrcFn:ne=()=>!1,newlyAddedElement:re=!1,ignoreCSSAttributes:ie}=t,{preserveWhiteSpace:ae=!0}=t,oe=LT(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,maskAllText:s,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,dataURLOptions:y,inlineImages:b,recordCanvas:x,keepIframeSrcFn:ne,newlyAddedElement:re,ignoreCSSAttributes:ie});if(!oe)return console.warn(e,`not serialized`),null;let se;se=r.hasNode(e)?r.getId(e):VT(oe,v)||!ae&&oe.type===Mw.Text&&!oe.isStyle&&!oe.textContent.trim().length?lT:uT();let E=Object.assign(oe,{id:se});if(r.add(e,E),se===lT)return null;S&&S(e);let ce=!f;if(E.type===Mw.Element){ce&&=!E.needBlock;let t=e.shadowRoot;t&&Fw(t)&&(E.isShadowHost=!0)}if((E.type===Mw.Document||E.type===Mw.Element)&&ce){v.headWhitespace&&E.type===Mw.Element&&E.tagName===`head`&&(ae=!1);let t={doc:n,mirror:r,blockClass:i,blockSelector:a,maskAllText:s,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:ae,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onBlockedImageLoad:T,onStylesheetLoad:ee,stylesheetLoadTimeout:te,keepIframeSrcFn:ne,ignoreCSSAttributes:ie},re=e.childNodes?Array.from(e.childNodes):[];for(let e of re){let n=HT(e,t);n&&E.childNodes.push(n)}if(Nw(e)&&e.shadowRoot)for(let n of Array.from(e.shadowRoot.childNodes)){let r=HT(n,t);r&&(Fw(e.shadowRoot)&&(r.isShadow=!0),E.childNodes.push(r))}}if(e.parentNode&&Pw(e.parentNode)&&Fw(e.parentNode)&&(E.isShadow=!0),E.type===Mw.Element&&E.tagName===`iframe`&&!E.needBlock&&FT(e,()=>{let t=aT(e);if(t&&C){let n=HT(t,{doc:t,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:ae,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:ee,stylesheetLoadTimeout:te,keepIframeSrcFn:ne,ignoreCSSAttributes:ie});n&&C(e,n)}},w),E.type===Mw.Element&&E.tagName===`img`&&!e.complete&&E.needBlock){let t=e,n=()=>{if(t.isConnected&&!t.complete&&T)try{let e=t.getBoundingClientRect();e.width>0&&e.height>0&&T(t,E,e)}catch{}t.removeEventListener(`load`,n)};t.isConnected&&t.addEventListener(`load`,n)}return E.type===Mw.Element&&E.tagName===`link`&&typeof E.attributes.rel==`string`&&(E.attributes.rel===`stylesheet`||E.attributes.rel===`preload`&&typeof E.attributes.href==`string`&&eT(E.attributes.href)===`css`)&&IT(e,()=>{if(ee){let t=HT(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:ae,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:ee,stylesheetLoadTimeout:te,keepIframeSrcFn:ne,ignoreCSSAttributes:ie});t&&ee(e,t)}},te),E.type===Mw.Element&&delete E.needBlock,E}function UT(e,t){let{mirror:n=new Ww,blockClass:r=`rr-block`,blockSelector:i=null,unblockSelector:a=null,maskAllText:o=!1,maskTextClass:s=`rr-mask`,unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:m=!1,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOM:v=!1,dataURLOptions:y,preserveWhiteSpace:b,onSerialize:x,onIframeLoad:S,iframeLoadTimeout:C,onBlockedImageLoad:w,onStylesheetLoad:T,stylesheetLoadTimeout:ee,keepIframeSrcFn:te=()=>!1,ignoreCSSAttributes:ne=new Set([])}=t||{};return HT(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,maskAllText:o,maskTextClass:s,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:m===!1?{}:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v===!0||v===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:v===`all`,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:v===!1?{}:v,dataURLOptions:y,inlineImages:f,recordCanvas:p,preserveWhiteSpace:b,onSerialize:x,onIframeLoad:S,iframeLoadTimeout:C,onBlockedImageLoad:w,onStylesheetLoad:T,stylesheetLoadTimeout:ee,keepIframeSrcFn:te,newlyAddedElement:!1,ignoreCSSAttributes:ne})}function WT(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var GT=`Please stop import mirror directly. Instead of that,\r
|
|
491
|
+
Error:`,t)}}function sb(){return Dy(e=>{ob(`cls`,{metric:e}),Zy=e},{reportAllChanges:!0})}function cb(){return Gy(e=>{ob(`lcp`,{metric:e}),Qy=e},{reportAllChanges:!0})}function lb(){return Jy(e=>{ob(`ttfb`,{metric:e}),$y=e})}function ub(){return Hy(e=>{ob(`inp`,{metric:e}),eb=e})}function db(e,t,n,r,i=!1){pb(e,t);let a;return Xy[e]||(a=n(),Xy[e]=!0),r&&t({metric:r}),mb(e,t,i?a:void 0)}function fb(e){let t={};e===`event`&&(t.durationThreshold=0),xy(e,t=>{ob(e,{entries:t})},t)}function pb(e,t){Yy[e]=Yy[e]||[],Yy[e].push(t)}function mb(e,t,n){return()=>{n&&n();let r=Yy[e];if(!r)return;let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function hb(e){return`duration`in e}var gb=80,_b={};try{typeof Node<`u`&&(_b.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,`parentNode`).get),typeof Element<`u`&&(_b.tagName=Object.getOwnPropertyDescriptor(Element.prototype,`tagName`).get,_b.id=Object.getOwnPropertyDescriptor(Element.prototype,`id`).get,_b.className=Object.getOwnPropertyDescriptor(Element.prototype,`className`).get,_b.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<`u`&&(_b.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,`dataset`).get)}catch{}function vb(e,t,n){let r=_b[t];if(r)try{return r.call(e,n)}catch{}let i=e[t];return typeof i==`function`?i.call(e,n):i}function yb(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||gb;for(;n&&i++<5&&(o=bb(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=vb(n,`parentNode`);return r.reverse().join(` > `)}catch{return`<unknown>`}}function bb(e,t){let n=[],r=vb(e,`tagName`);if(!r)return``;if(typeof HTMLElement<`u`&&e instanceof HTMLElement){let t=vb(e,`dataset`);if(t){if(t.sentryComponent)return t.sentryComponent;if(t.sentryElement)return t.sentryElement}}n.push(r.toLowerCase());let i=t?.length?t.filter(t=>vb(e,`getAttribute`,t)).map(t=>[t,vb(e,`getAttribute`,t)]):null;if(i?.length)i.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{let t=vb(e,`id`);t&&n.push(`#${t}`);let r=vb(e,`className`);if(r&&Ce(r)){let e=r.split(/\s+/);for(let t of e)n.push(`.${t}`)}}for(let t of[`aria-label`,`type`,`name`,`title`,`alt`]){let r=vb(e,`getAttribute`,t);r&&n.push(`[${t}="${r}"]`)}return n.join(``)}var xb=e=>{let t=t=>{(t.type===`pagehide`||W.document?.visibilityState===`hidden`)&&e(t)};cy(`visibilitychange`,t,{capture:!0,once:!0}),cy(`pagehide`,t,{capture:!0,once:!0})};function Sb(e){return typeof e==`number`&&isFinite(e)}function Cb(e,t,n,{...r}){let i=F(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime==`function`&&e.updateStartTime(t),la(e,()=>{let e=oa({startTime:t,...r});return e&&e.end(n),e})}function wb(e){let t=j();if(!t)return;let{name:n,transaction:r,attributes:i,startTime:a}=e,{release:o,environment:s}=t.getOptions(),{userInfo:c}=t.getDataCollectionOptions(),l=t.getIntegrationByName(`Replay`)?.getReplayId(),u=k(),d=u.getUser(),f=d===void 0?void 0:d.email||d.id||d.ip_address,p;try{p=u.getScopeData().contexts.profile.profile_id}catch{}return oa({name:n,attributes:{release:o,environment:s,user:f||void 0,profile_id:p||void 0,replay_id:l||void 0,transaction:r,"user_agent.original":W.navigator?.userAgent,"client.address":c?`{{auto}}`:void 0,...i},startTime:a,experimental:{standalone:!0}})}function Tb(){return W.addEventListener&&W.performance}function G(e){return e/1e3}function Eb(e){let t=`unknown`,n=`unknown`,r=``;for(let i of e){if(i===`/`){[t,n]=e.split(`/`);break}if(!isNaN(Number(i))){t=r===`h`?`http`:r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function Db(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Ob(e,t){let n,r=!1;function i(e){!r&&n&&t(e,n.spanContext().spanId,n),r=!0}xb(()=>{i(`pagehide`)});let a=e.on(`beforeStartNavigationSpan`,(e,t)=>{t?.isRedirect||(i(`navigation`),a(),o())}),o=e.on(`afterStartPageLoadSpan`,e=>{n=e,o()})}function kb(e){let t=0,n;if(!Db(`layout-shift`))return;let r=tb(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&(t=e.value,n=r)},!0);Ob(e,(e,i)=>{Ab(t,n,i,e),r()})}function Ab(e,t,n,r){ry&&x.log(`Sending CLS span (${e})`);let i=t?G((Ot()||0)+t.startTime):O(),a=k().getScopeData().transactionName,o=t?yb(t.sources[0]?.node):`Layout shift`,s={[P]:`auto.http.browser.cls`,[N]:`ui.webvital.cls`,[An]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((e,t)=>{s[`cls.source.${t+1}`]=yb(e.node)});let c=wb({name:o,transaction:a,attributes:s,startTime:i});c&&(c.addEvent(`cls`,{[yn]:``,[bn]:e}),c.end(i))}function jb(e){return e!=null&&e>0&&e<=6e4}function Mb(e){let t=0,n;if(!Db(`largest-contentful-paint`))return;let r=nb(({metric:e})=>{let r=e.entries[e.entries.length-1];!r||!jb(e.value)||(t=e.value,n=r)},!0);Ob(e,(e,i)=>{Nb(t,n,i,e),r()})}function Nb(e,t,n,r){if(!jb(e))return;ry&&x.log(`Sending LCP span (${e})`);let i=G((Ot()||0)+(t?.startTime||0)),a=k().getScopeData().transactionName,o=t?yb(t.element):`Largest contentful paint`,s={[P]:`auto.http.browser.lcp`,[N]:`ui.webvital.lcp`,[An]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(s[`lcp.element`]=yb(t.element)),t.id&&(s[`lcp.id`]=t.id),t.url&&(s[`lcp.url`]=t.url),t.loadTime!=null&&(s[`lcp.loadTime`]=t.loadTime),t.renderTime!=null&&(s[`lcp.renderTime`]=t.renderTime),t.size!=null&&(s[`lcp.size`]=t.size));let c=wb({name:o,transaction:a,attributes:s,startTime:i});c&&(c.addEvent(`lcp`,{[yn]:`millisecond`,[bn]:e}),c.end(i))}function Pb(e){return e&&((Ot()||performance.timeOrigin)+e)/1e3}function Fb(e){let t={};if(e.nextHopProtocol!=null){let{name:n,version:r}=Eb(e.nextHopProtocol);t[`network.protocol.version`]=r,t[`network.protocol.name`]=n}return Ot()||Tb()?.timeOrigin?Ib({...t,"http.request.redirect_start":Pb(e.redirectStart),"http.request.redirect_end":Pb(e.redirectEnd),"http.request.worker_start":Pb(e.workerStart),"http.request.fetch_start":Pb(e.fetchStart),"http.request.domain_lookup_start":Pb(e.domainLookupStart),"http.request.domain_lookup_end":Pb(e.domainLookupEnd),"http.request.connect_start":Pb(e.connectStart),"http.request.secure_connection_start":Pb(e.secureConnectionStart),"http.request.connection_end":Pb(e.connectEnd),"http.request.request_start":Pb(e.requestStart),"http.request.response_start":Pb(e.responseStart),"http.request.response_end":Pb(e.responseEnd),"http.request.time_to_first_byte":e.responseStart==null?void 0:e.responseStart/1e3}):t}function Ib(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!=null))}var Lb=2147483647,Rb=0,zb={},Bb,Vb;function Hb({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){let r=Tb();if(r&&Ot()){r.mark&&W.performance.mark(`sentry-tracing-init`);let i=t?Mb(n):t===!1?qb():void 0,a=e?kb(n):e===!1?Kb():void 0,o=Jb(),s=Yb();return()=>{o(),s(),i?.(),a?.()}}return()=>void 0}function Ub(){ab(`longtask`,({entries:e})=>{let t=Br();if(!t)return;let{op:n,start_timestamp:r}=F(t);for(let i of e){let e=G(Ot()+i.startTime),a=G(i.duration);n===`navigation`&&r&&e<r||Cb(t,e,e+a,{name:`Main UI thread blocked`,op:`ui.long-task`,attributes:{[P]:`auto.ui.browser.metrics`}})}})}function Wb(){new PerformanceObserver(e=>{let t=Br();if(t)for(let n of e.getEntries()){if(!n.scripts[0])continue;let e=G(Ot()+n.startTime),{start_timestamp:r,op:i}=F(t);if(i===`navigation`&&r&&e<r)continue;let a=G(n.duration),o={[P]:`auto.ui.browser.metrics`},{invoker:s,invokerType:c,sourceURL:l,sourceFunctionName:u,sourceCharPosition:d}=n.scripts[0];o[`browser.script.invoker`]=s,o[`browser.script.invoker_type`]=c,l&&(o[`code.filepath`]=l),u&&(o[`code.function`]=u),d!==-1&&(o[`browser.script.source_char_position`]=d),Cb(t,e,e+a,{name:`Main UI thread blocked`,op:`ui.long-animation-frame`,attributes:o})}}).observe({type:`long-animation-frame`,buffered:!0})}function Gb(){ab(`event`,({entries:e})=>{let t=Br();if(t){for(let n of e)if(n.name===`click`){let e=G(Ot()+n.startTime),r=G(n.duration),i={name:yb(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[P]:`auto.ui.browser.metrics`}},a=Fh(n.target);a&&(i.attributes[`ui.component_name`]=a),Cb(t,e,e+r,i)}}})}function Kb(){return tb(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(zb.cls={value:e.value,unit:``},Vb=t)},!0)}function qb(){return nb(({metric:e})=>{let t=e.entries[e.entries.length-1];!t||!jb(e.value)||(zb.lcp={value:e.value,unit:`millisecond`},Bb=t)},!0)}function Jb(){return rb(({metric:e})=>{e.entries[e.entries.length-1]&&(zb.ttfb={value:e.value,unit:`millisecond`})})}function Yb(){return ab(`paint`,({entries:e})=>{let t=my();for(let n of e){let e=n.startTime<t.firstHiddenTime;n.name===`first-paint`&&e&&(zb.fp={value:n.startTime,unit:`millisecond`}),n.name===`first-contentful-paint`&&e&&(zb.fcp={value:n.startTime,unit:`millisecond`})}})}function Xb(e,t){let n=Tb(),r=Ot();if(!n?.getEntries||!r)return;let{spanStreamingEnabled:i,ignorePerformanceApiSpans:a,ignoreResourceSpans:o}=t,s=G(r),c=n.getEntries(),{op:l,start_timestamp:u}=F(e);c.slice(Rb).forEach(t=>{let n=G(t.startTime),r=G(Math.max(0,t.duration));if(!(l===`navigation`&&u&&s+n<u))switch(t.entryType){case`navigation`:nx(e,t,s);break;case`mark`:case`paint`:case`measure`:ex(e,t,n,r,s,a);break;case`resource`:ox(e,t,t.name,n,r,s,o);break}}),Rb=Math.max(c.length-1,0),sx(e,i)}function Zb(e,t){let n=Ot();if(!Tb()?.getEntries||!n){Qb();return}let{spanStreamingEnabled:r,recordClsOnPageloadSpan:i,recordLcpOnPageloadSpan:a}=t,o=G(n);if(F(e).op===`pageload`){if(ux(zb),r){let t=(t,n,r)=>{let i=r??`browser.web_vital.${t}.value`;e.setAttribute(i,n),ry&&x.log(`Setting web vital attribute`,{[i]:n},`on pageload span`)};[`ttfb`,`fp`,`fcp`].forEach(e=>{zb[e]&&t(e,zb[e].value)}),zb[`ttfb.requestTime`]&&t(`ttfb.requestTime`,zb[`ttfb.requestTime`].value,`browser.web_vital.ttfb.request_time`)}else i||delete zb.cls,a||delete zb.lcp,Object.entries(zb).forEach(([t,n])=>{Wi(t,n.value,n.unit,e)}),cx(e,t);e.setAttribute(r?`browser.performance.time_origin`:`performance.timeOrigin`,o),e.setAttribute(r?`browser.performance.navigation.activation_start`:`performance.activationStart`,sy())}Qb()}function Qb(){Bb=void 0,Vb=void 0,zb={}}function $b(e){if(e?.entryType===`measure`)try{return e.detail.devtools.track===`Components ⚛`}catch{return}}function ex(e,t,n,r,i,a){if($b(t)||[`mark`,`measure`].includes(t.entryType)&&ut(t.name,a))return;let o=oy(!1),s=G(o?o.requestStart:0),c=i+Math.max(n,s),l=i+n,u=l+r,d={[P]:`auto.resource.browser.metrics`};c!==l&&(d[`sentry.browser.measure_happened_before_request`]=!0,d[`sentry.browser.measure_start_time`]=c),tx(d,t),c<=u&&Cb(e,c,u,{name:t.name,op:t.entryType,attributes:d})}function tx(e,t){try{let n=t.detail;if(!n)return;if(typeof n==`object`){for(let[t,r]of Object.entries(n))if(r&&Te(r))e[`sentry.browser.measure.detail.${t}`]=r;else if(r!==void 0)try{e[`sentry.browser.measure.detail.${t}`]=JSON.stringify(r)}catch{}return}if(Te(n)){e[`sentry.browser.measure.detail`]=n;return}try{e[`sentry.browser.measure.detail`]=JSON.stringify(n)}catch{}}catch{}}function nx(e,t,n){[`unloadEvent`,`redirect`,`domContentLoadedEvent`,`loadEvent`,`connect`].forEach(r=>{rx(e,t,r,n)}),rx(e,t,`secureConnection`,n,`TLS/SSL`),rx(e,t,`fetch`,n,`cache`),rx(e,t,`domainLookup`,n,`DNS`),ax(e,t,n)}function rx(e,t,n,r,i=n){let a=t[ix(n)],o=t[`${n}Start`];!o||!a||Cb(e,r+G(o),r+G(a),{op:`browser.${i}`,name:t.name,attributes:{[P]:`auto.ui.browser.metrics`,...n===`redirect`&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function ix(e){return e===`secureConnection`?`connectEnd`:e===`fetch`?`domainLookupStart`:`${e}End`}function ax(e,t,n){let r=n+G(t.requestStart),i=n+G(t.responseEnd),a=n+G(t.responseStart);t.responseEnd&&(Cb(e,r,i,{op:`browser.request`,name:t.name,attributes:{[P]:`auto.ui.browser.metrics`}}),Cb(e,a,i,{op:`browser.response`,name:t.name,attributes:{[P]:`auto.ui.browser.metrics`}}))}function ox(e,t,n,r,i,a,o){if(t.initiatorType===`xmlhttprequest`||t.initiatorType===`fetch`)return;let s=t.initiatorType?`resource.${t.initiatorType}`:`resource.other`;if(o?.includes(s))return;let c={[P]:`auto.resource.browser.metrics`},l=Xc(n);l.protocol&&(c[`url.scheme`]=l.protocol.split(`:`).pop()),l.host&&(c[`server.address`]=l.host),c[`url.same_origin`]=n.includes(W.location.origin),c[jn]=n,lx(t,c,[[`responseStatus`,`http.response.status_code`],[`transferSize`,`http.response_transfer_size`],[`encodedBodySize`,`http.response_content_length`],[`decodedBodySize`,`http.decoded_response_content_length`],[`renderBlockingStatus`,`resource.render_blocking_status`],[`deliveryType`,`http.response_delivery_type`]]);let u={...c,...Fb(t)},d=a+r;Cb(e,d,d+i,{name:n.replace(W.location.origin,``),op:s,attributes:u})}function sx(e,t){let n=W.navigator;if(!n)return;let r=n.connection;r&&(r.effectiveType&&e.setAttribute(t?`network.connection.effective_type`:`effectiveConnectionType`,r.effectiveType),r.type&&e.setAttribute(t?`network.connection.type`:`connectionType`,r.type),Sb(r.rtt)&&(t?e.setAttribute(`network.connection.rtt`,r.rtt):F(e).op===`pageload`&&Wi(`connection.rtt`,r.rtt,`millisecond`))),Sb(n.deviceMemory)&&(t?e.setAttribute(`device.memory.estimated_capacity`,n.deviceMemory):e.setAttribute(`deviceMemory`,`${n.deviceMemory} GB`)),Sb(n.hardwareConcurrency)&&(t?e.setAttribute(`device.processor_count`,n.hardwareConcurrency):e.setAttribute(`hardwareConcurrency`,String(n.hardwareConcurrency)))}function cx(e,t){Bb&&t.recordLcpOnPageloadSpan&&(Bb.element&&e.setAttribute(`lcp.element`,yb(Bb.element)),Bb.id&&e.setAttribute(`lcp.id`,Bb.id),Bb.url&&e.setAttribute(`lcp.url`,Bb.url.trim().slice(0,200)),Bb.loadTime!=null&&e.setAttribute(`lcp.loadTime`,Bb.loadTime),Bb.renderTime!=null&&e.setAttribute(`lcp.renderTime`,Bb.renderTime),e.setAttribute(`lcp.size`,Bb.size)),Vb?.sources&&t.recordClsOnPageloadSpan&&Vb.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,yb(t.node)))}function lx(e,t,n){n.forEach(([n,r])=>{let i=e[n];i!=null&&(typeof i==`number`&&i<Lb||typeof i==`string`)&&(t[r]=i)})}function ux(e){let t=oy(!1);if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(e[`ttfb.requestTime`]={value:n-r,unit:`millisecond`})}var dx=`ElementTiming`,fx=R((()=>({name:dx,setup(){!Tb()||!Ot()||ab(`element`,({entries:e})=>{for(let t of e){let e=t;if(!e.identifier)continue;let n=e.identifier,r=e.name,i=e.renderTime,a=e.loadTime,o={"sentry.origin":`auto.ui.browser.element_timing`,"ui.element.identifier":n};r&&(o[`ui.element.paint_type`]=r),e.id&&(o[`ui.element.id`]=e.id),e.element&&(o[`ui.element.type`]=e.element.tagName.toLowerCase()),e.url&&(o[`ui.element.url`]=e.url),e.naturalWidth&&(o[`ui.element.width`]=e.naturalWidth),e.naturalHeight&&(o[`ui.element.height`]=e.naturalHeight),i>0&&Rd(`ui.element.render_time`,i,{unit:`millisecond`,attributes:o}),a>0&&Rd(`ui.element.load_time`,a,{unit:`millisecond`,attributes:o})}})}}))),px=[],mx=new Map,hx=new Map;function gx(){if(Tb()&&Ot()){let e=vx();return()=>{e()}}return()=>void 0}var _x={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`};function vx(){return ib(yx)}var yx=({metric:e})=>{if(e.value==null)return;let t=G(e.value);if(t>60)return;let n=e.entries.find(t=>t.duration===e.value&&_x[t.name]);if(!n)return;let{interactionId:r}=n,i=_x[n.name],a=G(Ot()+n.startTime),o=Br(),s=o?I(o):void 0,c=r==null?void 0:mx.get(r),l=c?.span||s,u=l?F(l).description:k().getScopeData().transactionName,d=wb({name:c?.elementName||yb(n.target),transaction:u,attributes:{[P]:`auto.http.browser.inp`,[N]:`ui.interaction.${i}`,[An]:n.duration},startTime:a});d&&(d.addEvent(`inp`,{[yn]:`millisecond`,[bn]:e.value}),d.end(a+t))};function bx(e){return e==null?void 0:mx.get(e)}function xx(){let e=Object.keys(_x);xs()&&e.forEach(e=>{W.addEventListener(e,t,{capture:!0,passive:!0})});function t(e){let t=e.target;if(!t)return;let n=yb(t),r=Math.round(e.timeStamp);if(hx.set(r,n),hx.size>50){let e=hx.keys().next().value;e!==void 0&&hx.delete(e)}}function n(e){let t=Math.round(e.startTime),n=hx.get(t);if(!n)for(let e=-5;e<=5;e++){let r=hx.get(t+e);if(r){n=r;break}}return n||`<unknown>`}let r=({entries:e})=>{let t=Br(),r=t&&I(t);e.forEach(e=>{if(!hb(e))return;let t=e.interactionId;if(t==null||mx.has(t))return;let i=e.target?yb(e.target):n(e);if(px.length>10){let e=px.shift();mx.delete(e)}px.push(t),mx.set(t,{span:r,elementName:i})})};ab(`event`,r),ab(`first-input`,r)}function Sx(e){let{name:t,op:n,origin:r,metricName:i,value:a,attributes:o,parentSpan:s,reportEvent:c,startTime:l,endTime:u}=e,d=k().getScopeData().transactionName,f={[P]:r,[N]:n,[An]:0,[`browser.web_vital.${i}.value`]:a,[ci]:d,[ai]:d,"user_agent.original":W.navigator?.userAgent,...o};s&&Tr(s).attributes?.[`sentry.op`]===`pageload`&&(f[`sentry.pageload.span_id`]=s.spanContext().spanId),c&&(f[`browser.web_vital.${i}.report_event`]=c);let p=oa({name:t,attributes:f,startTime:l,parentSpan:s});p&&p.end(u??l)}function Cx(e){let t=0,n;if(!Db(`largest-contentful-paint`))return;let r=nb(({metric:e})=>{let r=e.entries[e.entries.length-1];!r||!jb(e.value)||(t=e.value,n=r)},!0);Ob(e,(e,i,a)=>{wx(t,n,a,e),r()})}function wx(e,t,n,r){if(!jb(e))return;ry&&x.log(`Sending LCP span (${e})`);let i=Ot()||0,a=G(i),o=G(i+(t?.startTime||0)),s=t?yb(t.element):`Largest contentful paint`,c={};t?.element&&(c[`browser.web_vital.lcp.element`]=yb(t.element)),t?.id&&(c[`browser.web_vital.lcp.id`]=t.id),t?.url&&(c[`browser.web_vital.lcp.url`]=t.url),t?.loadTime!=null&&(c[`browser.web_vital.lcp.load_time`]=t.loadTime),t?.renderTime!=null&&(c[`browser.web_vital.lcp.render_time`]=t.renderTime),t?.size!=null&&(c[`browser.web_vital.lcp.size`]=t.size),Sx({name:s,op:`ui.webvital.lcp`,origin:`auto.http.browser.lcp`,metricName:`lcp`,value:e,attributes:c,parentSpan:n,reportEvent:r,startTime:a,endTime:o})}function Tx(e){let t=0,n;if(!Db(`layout-shift`))return;let r=tb(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&(t=e.value,n=r)},!0);Ob(e,(e,i,a)=>{Ex(t,n,a,e),r()})}function Ex(e,t,n,r){ry&&x.log(`Sending CLS span (${e})`);let i=t?G((Ot()||0)+t.startTime):O(),a=t?yb(t.sources[0]?.node):`Layout shift`,o={};t?.sources&&t.sources.forEach((e,t)=>{o[`browser.web_vital.cls.source.${t+1}`]=yb(e.node)}),Sx({name:a,op:`ui.webvital.cls`,origin:`auto.http.browser.cls`,metricName:`cls`,value:e,attributes:o,parentSpan:n,reportEvent:r,startTime:i})}function Dx(){!Tb()||!Ot()||ib(({metric:e})=>{if(e.value==null||G(e.value)>60)return;let t=e.entries.find(t=>t.duration===e.value&&_x[t.name]);t&&Ox(e.value,t)})}function Ox(e,t){ry&&x.log(`Sending INP span (${e})`);let n=G(Ot()+t.startTime),r=G(e),i=_x[t.name],a=bx(t.interactionId),o=Br(),s=o?I(o):void 0,c=a?.span||s,l=c?Tr(c).name:k().getScopeData().transactionName;Sx({name:a?.elementName||yb(t.target),op:`ui.interaction.${i}`,origin:`auto.http.browser.inp`,metricName:`inp`,value:e,attributes:{[An]:t.duration,[ci]:l,[ai]:l},startTime:n,endTime:n+r,parentSpan:c})}var kx=1e3,Ax,jx,Mx;function Nx(e){ce(`dom`,e),le(`dom`,Px)}function Px(){if(!W.document)return;let e=ue.bind(null,`dom`),t=Lx(e,!0);W.document.addEventListener(`click`,t,!1),W.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=W[t]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(Ne(n,`addEventListener`,function(t){return function(n,r,i){if(n===`click`||n==`keypress`)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){let r=Lx(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),Ne(n,`removeEventListener`,function(e){return function(t,n,r){if(t===`click`||t==`keypress`)try{let 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]),Object.keys(n).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function Fx(e){if(e.type!==jx)return!1;try{if(!e.target||e.target._sentryId!==Mx)return!1}catch{}return!0}function Ix(e,t){return e===`keypress`?!t?.tagName||!(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable):!1}function Lx(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=Rx(n);if(Ix(n.type,r))return;D(n,`_sentryCaptured`,!0),r&&!r._sentryId&&D(r,`_sentryId`,mt());let i=n.type===`keypress`?`input`:n.type;Fx(n)||(e({event:n,name:i,global:t}),jx=n.type,Mx=r?r._sentryId:void 0),clearTimeout(Ax),Ax=W.setTimeout(()=>{Mx=void 0,jx=void 0},kx)}}function Rx(e){try{return e.target}catch{return null}}var zx;function Bx(e){let t=`history`;ce(t,e),le(t,Vx)}function Vx(){if(W.addEventListener(`popstate`,()=>{let e=W.location.href,t=zx;zx=e,t!==e&&ue(`history`,{from:t,to:e})}),!yh())return;function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=zx,i=Hx(String(n));if(zx=i,r===i)return e.apply(this,t);ue(`history`,{from:r,to:i})}return e.apply(this,t)}}Ne(W.history,`pushState`,e),Ne(W.history,`replaceState`,e)}function Hx(e){try{return new URL(e,W.location.origin).toString()}catch{return e}}var Ux={};function Wx(e){let t=Ux[e];if(t)return t;let n=W[e];if(xh(n))return Ux[e]=n.bind(W);let r=W.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){ry&&x.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(Ux[e]=n.bind(W))}function Gx(e){Ux[e]=void 0}function Kx(...e){return Wx(`setTimeout`)(...e)}var qx=`__sentry_xhr_v3__`;function Jx(e){ce(`xhr`,e),le(`xhr`,Yx)}function Yx(){if(!W.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=O()*1e3,a=Ce(n[0])?n[0].toUpperCase():void 0,o=Xx(n[1]);if(!a||!o)return e.apply(t,n);t[qx]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[qx];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}ue(`xhr`,{endTimestamp:O()*1e3,startTimestamp:i,xhr:t,virtualError:r}),t.removeEventListener(`readystatechange`,s)}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,n){return s(),e.apply(t,n)}}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[qx];return a&&Ce(r)&&Ce(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[qx];return r?(n[0]!==void 0&&(r.body=n[0]),ue(`xhr`,{startTimestamp:O()*1e3,xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function Xx(e){if(Ce(e))return e;try{return e.toString()}catch{}}var Zx=Symbol.for(`sentry__originalRequestBody`);function Qx(e){return new URLSearchParams(e).toString()}function $x(e,t=x){try{if(typeof e==`string`)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Qx(e)];if(!e)return[void 0]}catch(n){return ry&&t.error(n,`Failed to serialize body`,e),[void 0,`BODY_PARSE_ERROR`]}return ry&&t.log(`Skipping network body because of body type`,e),[void 0,`UNPARSEABLE_BODY_TYPE`]}function eS(e=[]){if(e.length>=2&&e[1]&&typeof e[1]==`object`&&`body`in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){let t=e[0][Zx];return t===void 0?void 0:t}}function tS(e){let t;try{t=e.getAllResponseHeaders()}catch(t){return ry&&x.error(t,`Failed to get xhr response headers`,e),{}}return t?t.split(`\r
|
|
492
|
+
`).reduce((e,t)=>{let[n,r]=t.split(`: `);return r&&(e[n.toLowerCase()]=r),e},{}):{}}function nS(e){if(typeof Element>`u`)return!1;try{return e instanceof Element}catch{return!1}}function rS(e){try{return new URL(e,W.location.origin).toString()}catch{return e}}var iS=40;function aS(e,t=Wx(`fetch`)){let n=0,r=0;async function i(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`strict-origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{let n=await t(e.url,o);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get(`X-Sentry-Rate-Limits`),"retry-after":n.headers.get(`Retry-After`)}}}catch(e){throw Gx(`fetch`),e}finally{n-=a,r--}}return ec(e,i,Js(e.bufferSize||iS))}var K=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__;function oS(){let e=j();if(!e){K&&x.warn(`No Sentry client available, profiling is not started`);return}if(!e.getIntegrationByName(`BrowserProfiling`)){K&&x.warn(`BrowserProfiling integration is not available`);return}e.emit(`startUIProfiler`)}function sS(){let e=j();if(!e){K&&x.warn(`No Sentry client available, profiling is not started`);return}if(!e.getIntegrationByName(`BrowserProfiling`)){K&&x.warn(`ProfilingIntegration is not available`);return}e.emit(`stopUIProfiler`)}var cS={startProfiler:oS,stopProfiler:sS},lS=10,uS=20,dS=30,fS=40,pS=50;function mS(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?`?`:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var hS=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,gS=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,_S=/\((\S*)(?::(\d+))(?::(\d+))\)/,vS=/at (.+?) ?\(data:(.+?),/,yS=[dS,e=>{let t=e.match(vS);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=hS.exec(e);if(n){let[,e,t,r]=n;return mS(e,`?`,+t,+r)}let r=gS.exec(e);if(r){if(r[2]?.indexOf(`eval`)===0){let e=_S.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=jS(r[1]||`?`,r[2]);return mS(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],bS=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,xS=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,SS=[pS,e=>{let t=bS.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=xS.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]||`?`;return[n,e]=jS(n,e),mS(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],CS=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,wS=[fS,e=>{let t=CS.exec(e);return t?mS(t[2],t[1]||`?`,+t[3],t[4]?+t[4]:void 0):void 0}],TS=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,ES=[lS,e=>{let t=TS.exec(e);return t?mS(t[2],t[3]||`?`,+t[1]):void 0}],DS=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,OS=[uS,e=>{let t=DS.exec(e);return t?mS(t[5],t[3]||t[4]||`?`,+t[1],+t[2]):void 0}],kS=[yS,SS],AS=T(...kS),jS=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?`?`:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function MS(e,{metadata:t,tunnel:n,dsn:r}){return Si({event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:tr(r)}},[NS(e)])}function NS(e){return[{type:`user_report`},e]}var PS=1024,FS=`Breadcrumbs`,IS=R(((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:FS,setup(e){t.console&&Gl(zS(e)),t.dom&&Nx(RS(e,t.dom)),t.xhr&&Jx(BS(e)),t.fetch&&wh(VS(e)),t.history&&Bx(HS(e)),t.sentry&&e.on(`beforeSendEvent`,LS(e))}}}));function LS(e){return function(t){j()===e&&fl({category:`sentry.${t.type===`transaction`?`transaction`:`event`}`,event_id:t.event_id,level:t.level,message:gt(t)},{event:t})}}function RS(e,t){return function(n){if(j()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>PS&&(K&&x.warn(`\`dom.maxStringLength\` cannot exceed ${PS}, but a value of ${o} was configured. Sentry will use ${PS} instead.`),o=PS),typeof a==`string`&&(a=[a]);try{let e=n.event,t=US(e)?e.target:e;r=yb(t,{keyAttrs:a,maxStringLength:o}),i=Fh(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),fl(s,{event:n.event,name:n.name,global:n.global})}}function zS(e){return function(t){if(j()!==e)return;let n={category:`console`,data:{arguments:t.args,logger:`console`},level:ql(t.level),message:ct(t.args,` `)};if(t.level===`assert`)if(t.args[0]===!1)n.message=`Assertion failed: ${ct(t.args.slice(1),` `)||`console.assert`}`,n.data.arguments=t.args.slice(1);else return;fl(n,{input:t.args,level:t.level})}}function BS(e){return function(t){if(j()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[qx];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:o,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:`xhr`,data:l,type:`http`,level:_h(s)};e.emit(`beforeOutgoingRequestBreadcrumb`,d,u),fl(d,u)}}function VS(e){return function(t){if(j()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method===`POST`))if(t.error){let i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:`fetch`,data:t.fetchData,level:`error`,type:`http`};e.emit(`beforeOutgoingRequestBreadcrumb`,a,i),fl(a,i)}else{let i=t.response,a={...t.fetchData,status_code:i?.status},o={input:t.args,response:i,startTimestamp:n,endTimestamp:r},s={category:`fetch`,data:a,type:`http`,level:_h(a.status_code)};e.emit(`beforeOutgoingRequestBreadcrumb`,s,o),fl(s,o)}}}function HS(e){return function(t){if(j()!==e)return;let n=t.from,r=t.to,i=Xc(U.location.href),a=n?Xc(n):void 0,o=Xc(r);a?.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),fl({category:`navigation`,data:{from:n,to:r}})}}function US(e){return!!e&&!!e.target}var WS=`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`.split(`,`),GS=`BrowserApiErrors`,KS=R(((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:GS,setupOnce(){t.setTimeout&&Ne(U,`setTimeout`,qS),t.setInterval&&Ne(U,`setInterval`,qS),t.requestAnimationFrame&&Ne(U,`requestAnimationFrame`,JS),t.XMLHttpRequest&&`XMLHttpRequest`in U&&Ne(XMLHttpRequest.prototype,`send`,YS);let e=t.eventTarget;e&&(Array.isArray(e)?e:WS).forEach(e=>XS(e,t))}}}));function qS(e){return function(...t){let n=t[0];return t[0]=Ov(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${ie(e)}`}}),e.apply(this,t)}}function JS(e){return function(t){return e.apply(this,[Ov(t,{mechanism:{data:{handler:ie(e)},handled:!1,type:`auto.browser.browserapierrors.requestAnimationFrame`}})])}}function YS(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&Ne(n,e,function(t){let n={mechanism:{data:{handler:ie(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=Fe(t);return r&&(n.mechanism.data.handler=ie(r)),Ov(t,n)})}),e.apply(this,t)}}function XS(e,t){let n=U[e]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(Ne(n,`addEventListener`,function(n){return function(r,i,a){try{ZS(i)&&(i.handleEvent=Ov(i.handleEvent,{mechanism:{data:{handler:ie(i),target:e},handled:!1,type:`auto.browser.browserapierrors.handleEvent`}}))}catch{}return t.unregisterOriginalCallbacks&&QS(this,r,i),n.apply(this,[r,Ov(i,{mechanism:{data:{handler:ie(i),target:e},handled:!1,type:`auto.browser.browserapierrors.addEventListener`}}),a])}}),Ne(n,`removeEventListener`,function(e){return function(t,n,r){try{if(Object.prototype.hasOwnProperty.call(n,`__sentry_wrapped__`)){let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}}catch{}return e.call(this,t,n,r)}}))}function ZS(e){return typeof e.handleEvent==`function`}function QS(e,t,n){e&&typeof e==`object`&&`removeEventListener`in e&&typeof e.removeEventListener==`function`&&e.removeEventListener(t,n)}var $S=R((e={})=>{let t=e.lifecycle??`route`;return{name:`BrowserSession`,setupOnce(){if(U.document===void 0){K&&x.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Yo({ignoreDuration:!0});let e=!1;zy(()=>{e||=(Qo(),!0)});let n=A(),r=n.getUser();n.addScopeListener(t=>{let n=t.getUser();(r?.id!==n?.id||r?.ip_address!==n?.ip_address)&&(r=n,e&&Qo())}),t===`route`&&Bx(({from:t,to:n})=>{t!==n&&(Yo({ignoreDuration:!0}),Qo(),e=!0)})}}}),eC=`CultureContext`,tC=R((()=>({name:eC,preprocessEvent(e){let t=nC();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){let t=nC();t&&no(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})));function nC(){try{let e=U.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var rC=`GlobalHandlers`,iC=R(((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:rC,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(aC(e),uC(`onerror`)),t.onunhandledrejection&&(oC(e),uC(`onunhandledrejection`))}}}));function aC(e){fe(t=>{let{stackParser:n,attachStacktrace:r}=dC();if(j()!==e||Ev())return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=lC(Xv(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,No(l,{originalException:c,mechanism:{handled:!1,type:`auto.browser.global_handlers.onerror`}})})}function oC(e){he(t=>{let{stackParser:n,attachStacktrace:r}=dC();if(j()!==e||Ev())return;let i=sC(t),a=Te(i)?cC(i):Xv(n,i,void 0,r,!0);a.level=`error`,No(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.global_handlers.onunhandledrejection`}})})}function sC(e){if(Te(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}function cC(e){return{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function lC(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:fC(t)??Ph(),function:`?`,in_app:!0}),e}function uC(e){K&&x.log(`Global Handler attached: ${e}`)}function dC(){return j()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function fC(e){if(!(!Ce(e)||e.length===0))return e.startsWith(`data:`)?`<${Qc(e,!1)}>`:e}var pC=R(()=>({name:`HttpContext`,preprocessEvent(e){if(!U.navigator&&!U.location&&!U.document)return;let t=kv(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){let t=e.attributes?.[N];if(!U.navigator&&!U.location&&!U.document)return;let n=kv();no(e,{"url.full":t===`http.client`?void 0:n.url,"http.request.header.user_agent":n.headers[`User-Agent`],"http.request.header.referer":n.headers.Referer})}})),mC=`cause`,hC=5,gC=`LinkedErrors`,_C=R(((e={})=>{let t=e.limit||hC,n=e.key||mC;return{name:gC,preprocessEvent(e,r,i){Al(Rv,i.getOptions().stackParser,n,t,e,r)}}})),vC=/^HTML(\w*)Element$/;function yC(e){if(typeof window<`u`&&e===window)return`[Window]`;if(typeof document<`u`&&e===document)return`[Document]`;if(nS(e)){let t=bC(e);if(vC.test(t))return`[HTMLElement: ${yb(e)}]`}}function bC(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function xC(){return SC()?(K&&f(()=>{console.error(`[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/`)}),!0):!1}function SC(){if(U.window===void 0)return!1;let e=U;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let t=Ph();return!(U===U.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(t))}function CC(e){return[bl(),gl(),cd(),KS(),IS(),iC(),_C(),Ql(),pC(),tC(),$S()]}function wC(e={}){let t=!e.skipBrowserExtensionCheck&&xC(),n=e.defaultIntegrations==null?CC():e.defaultIntegrations,r={...e,enabled:!t&&e.enabled,stackParser:ee(e.stackParser||AS),integrations:ss({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||aS};return Xe(yC),Mc(ty,r)}function TC(){}function EC(e){e()}function DC(e={}){let t=U.document,n=t?.head||t?.body;if(!n){K&&x.error(`[showReportDialog] Global document not defined`);return}let r=k(),i=j()?.getDsn();if(!i){K&&x.error(`[showReportDialog] DSN not configured`);return}let a={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||Uo()},o=U.document.createElement(`script`);o.async=!0,o.crossOrigin=`anonymous`,o.src=is(i,a);let{onLoad:s,onClose:c}=a;if(s&&(o.onload=s),c){let e=t=>{if(t.data===`__sentry_reportdialog_closed__`)try{c()}finally{U.removeEventListener(`message`,e)}};U.addEventListener(`message`,e)}n.appendChild(o)}var OC=i,kC=`ReportingObserver`,AC=new WeakMap,jC=R(((e={})=>{let t=e.types||[`crash`,`deprecation`,`intervention`];function n(e){if(AC.has(j()))for(let t of e)pn(e=>{e.setExtra(`url`,t.url);let n=`ReportingObserver [${t.type}]`,r=`No details available`;if(t.body){let n={};for(let e in t.body)n[e]=t.body[e];if(e.setExtra(`body`,n),t.type===`crash`){let e=t.body;r=[e.crashId||``,e.reason||``].join(` `).trim()||r}else r=t.body.message||r}Mo(`${n}: ${r}`)})}return{name:kC,setupOnce(){Ch()&&new OC.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(e){AC.set(e,!0)}}})),MC=`HttpClient`,NC=R(((e={})=>{let t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:MC,setup(e){VC(e,t),HC(e,t)}}}));function PC(e,t,n,r,i){if(UC(e,n.status,n.url)){let e=GC(t,r),a,o,s,c,l=KC();if(l.requestHeaders!==!1&&(a=Uc(LC(e.headers),l.requestHeaders)),l.responseHeaders!==!1&&(o=Uc(LC(n.headers),l.responseHeaders)),l.cookies!==!1){let t=e.headers.get(`Cookie`)||void 0;if(t){let e=Gc(t,l.cookies);typeof e==`object`&&(s=e)}let r=n.headers.get(`Set-Cookie`)||void 0;if(r){let e=Gc(r,l.cookies);typeof e==`object`&&(c=e)}}No(WC({url:e.url,method:e.method,status:n.status,requestHeaders:a,responseHeaders:o,requestCookies:s,responseCookies:c,error:i,type:`fetch`}))}}function FC(e,t,n,r,i){if(UC(e,t.status,t.responseURL)){let e,a,o,s=KC();if(s.cookies!==!1)try{let e=t.getResponseHeader(`Set-Cookie`)||t.getResponseHeader(`set-cookie`)||void 0;if(e){let t=Gc(e,s.cookies);typeof t==`object`&&(a=t)}}catch{}if(s.responseHeaders!==!1)try{o=Uc(RC(t),s.responseHeaders)}catch{}s.requestHeaders!==!1&&(e=Uc(r,s.requestHeaders)),No(WC({url:t.responseURL,method:n,status:t.status,requestHeaders:e,responseHeaders:o,responseCookies:a,error:i,type:`xhr`}))}}function IC(e){if(e){let t=e[`Content-Length`]||e[`content-length`];if(t)return parseInt(t,10)}}function LC(e){let t={};return e.forEach((e,n)=>{t[n]=e}),t}function RC(e){let t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
493
|
+
`).reduce((e,t)=>{let[n,r]=t.split(`: `);return n&&r&&(e[n]=r),e},{}):{}}function zC(e,t){return e.some(e=>typeof e==`string`?t.includes(e):e.test(t))}function BC(e,t){return e.some(e=>typeof e==`number`?e===t:t>=e[0]&&t<=e[1])}function VC(e,t){Sh()&&wh(n=>{if(j()!==e)return;let{response:r,args:i,error:a,virtualError:o}=n,[s,c]=i;r&&PC(t,s,r,c,a||o)},!1)}function HC(e,t){`XMLHttpRequest`in i&&Jx(n=>{if(j()!==e)return;let{error:r,virtualError:i}=n,a=n.xhr,o=a[qx];if(!o)return;let{method:s,request_headers:c}=o;try{FC(t,a,s,c,r||i)}catch(e){K&&x.warn(`Error while extracting response event form XHR response`,e)}})}function UC(e,t,n){return BC(e.failedRequestStatusCodes,t)&&zC(e.failedRequestTargets,n)&&!$c(n,j())}function WC(e){let t=j(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,i=`HTTP Client Error with status code: ${e.status}`,a={message:i,exception:{values:[{type:`Error`,value:i,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:IC(e.responseHeaders)}}};return vt(a,{type:`auto.http.client.${e.type}`,handled:!1}),a}function GC(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function KC(){let e=j();if(!e)return{cookies:!1,requestHeaders:!1,responseHeaders:!1};let t=e.getOptions();if(t.dataCollection==null){let e=!!t.sendDefaultPii;return{cookies:e,requestHeaders:e,responseHeaders:e}}let{cookies:n,httpHeaders:r}=e.getDataCollectionOptions();return{cookies:n,requestHeaders:r.request,responseHeaders:r.response}}var qC=i,JC=7,YC=`ContextLines`,XC=R(((e={})=>({name:YC,processEvent(t,n,r){return ZC(t,e.frameContextLines??r?.getDataCollectionOptions().frameContextLines??JC)}})));function ZC(e,t){let n=qC.document,r=qC.location&&Zc(qC.location.href);if(!n||!r)return e;let i=e.exception?.values;if(!i?.length)return e;let a=n.documentElement.innerHTML;if(!a)return e;let o=[`<!DOCTYPE html>`,`<html>`,...a.split(`
|
|
494
|
+
`),`</html>`];return i.forEach(e=>{let n=e.stacktrace;n?.frames&&(n.frames=n.frames.map(e=>QC(e,o,r,t)))}),e}function QC(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||yt(t,e,r),e}var $C=`GraphQLClient`,ew=(e=>({name:$C,setup(t){tw(t,e),nw(t,e)}}));function tw(e,t){e.on(`beforeOutgoingRequestSpan`,(n,r)=>{let i=F(n).data||{};if(i[`sentry.op`]!==`http.client`)return;let a=i[`url.full`]||i[`http.url`]||i.url,o=i[`http.request.method`]||i[`http.method`];if(!Ce(a)||!Ce(o))return;let{endpoints:s}=t,c=ut(a,s),l=iw(r);if(c&&l){let t=cw(l);if(t){let r=rw(t);n.updateName(`${o} ${a} (${r})`),ow(t)&&e.getDataCollectionOptions().graphQL.document===!0&&n.setAttribute(ei,t.query),sw(t)&&(n.setAttribute(`graphql.persisted_query.hash.sha256`,t.extensions.persistedQuery.sha256Hash),n.setAttribute(`graphql.persisted_query.version`,t.extensions.persistedQuery.version))}}})}function nw(e,t){e.on(`beforeOutgoingRequestBreadcrumb`,(n,r)=>{let{category:i,type:a,data:o}=n;if(a===`http`&&(i===`fetch`||i===`xhr`)){let n=o?.url,{endpoints:i}=t,a=ut(n,i),s=iw(r);if(a&&o&&s){let t=cw(s);!o.graphql&&t&&(o[`graphql.operation`]=rw(t),ow(t)&&e.getDataCollectionOptions().graphQL.document===!0&&(o[ei]=t.query),sw(t)&&(o[`graphql.persisted_query.hash.sha256`]=t.extensions.persistedQuery.sha256Hash,o[`graphql.persisted_query.version`]=t.extensions.persistedQuery.version))}}})}function rw(e){if(sw(e))return`persisted ${e.operationName}`;if(ow(e)){let{query:t,operationName:n}=e,{operationName:r=n,operationType:i}=aw(t);return r?`${i} ${r}`:`${i}`}return`unknown`}function iw(e){let t=`xhr`in e,n;if(t){let t=e.xhr[qx];n=t&&$x(t.body)[0]}else n=$x(eS(e.input))[0];return n}function aw(e){let t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};let i=e.match(n);return i?{operationType:i[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function ow(e){return De(e)&&typeof e.query==`string`}function sw(e){return De(e)&&typeof e.operationName==`string`&&De(e.extensions)&&De(e.extensions.persistedQuery)&&typeof e.extensions.persistedQuery.sha256Hash==`string`&&typeof e.extensions.persistedQuery.version==`number`}function cw(e){try{let t=JSON.parse(e);return ow(t)||sw(t)?t:void 0}catch{return}}var lw=R(ew),uw=R((e={})=>{let t=[`script`];function n(r,i,a=0){if(!r)return;let o=`shadowRoot`in r&&r.shadowRoot?r.shadowRoot.children:r.children;for(let r of o){if(!(r instanceof HTMLElement))continue;let o=Fh(r,1)||void 0,s=r.tagName.toLowerCase();if(t.includes(s))continue;let c=e.onElement?.({element:r,componentName:o,tagName:s,depth:a})||{};if(c===`skip`)continue;if(c===`children`){n(r,i,a+1);continue}let{x:l,y:u,width:d,height:f}=r.getBoundingClientRect(),p={identifier:r.id||void 0,type:o||s,visible:!0,alpha:1,height:f,width:d,x:l,y:u,...c};p.children=[],n(r,p.children,a+1),i.push(p)}}return{name:`ViewHierarchy`,processEvent:(t,r)=>{if(t.type!==void 0||e.shouldAttach?.(t,r)===!1)return t;let i={rendering_system:`DOM`,positioning:`absolute`,windows:[]};n(e.rootElement?.()||U.document.body,i.windows);let a={filename:`view-hierarchy.json`,attachmentType:`event.view_hierarchy`,contentType:`application/json`,data:JSON.stringify(i)};return r.attachments=r.attachments||[],r.attachments.push(a),t}}}),q=i,dw=`sentryReplaySession`,fw=`replay_event`,pw=`Unable to send Replay`,mw=3e5,hw=9e5,gw=5e3,_w=5500,vw=6e4,yw=5e3,bw=3,xw=15e4,Sw=5e3,Cw=3e3,ww=300,Tw=2e7,Ew=4999,Dw=5e4,Ow=36e5,kw=Object.defineProperty,Aw=(e,t,n)=>t in e?kw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jw=(e,t,n)=>Aw(e,typeof t==`symbol`?t:t+``,n),Mw=(e=>(e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`,e))(Mw||{});function Nw(e){return e.nodeType===e.ELEMENT_NODE}function Pw(e){return e?.host?.shadowRoot===e}function Fw(e){return Object.prototype.toString.call(e)===`[object ShadowRoot]`}function Iw(e){return e.includes(` background-clip: text;`)&&!e.includes(` -webkit-background-clip: text;`)&&(e=e.replace(/\sbackground-clip:\s*text;/g,` -webkit-background-clip: text; background-clip: text;`)),e}function Lw(e){let{cssText:t}=e;if(t.split(`"`).length<3)return t;let n=[`@import`,`url(${JSON.stringify(e.href)})`];return e.layerName===``?n.push(`layer`):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(` `)+`;`}function Rw(e){try{let t=e.rules||e.cssRules;return t?Iw(Array.from(t,Bw).join(``)):null}catch{return null}}function zw(e){let t=``;for(let n=0;n<e.style.length;n++){let r=e.style,i=r[n],a=r.getPropertyPriority(i);t+=`${i}:${r.getPropertyValue(i)}${a?` !important`:``};`}return`${e.selectorText} { ${t} }`}function Bw(e){let t;if(Hw(e))try{t=Rw(e.styleSheet)||Lw(e)}catch{}else if(Uw(e)){let t=e.cssText,n=e.selectorText.includes(`:`),r=typeof e.style.all==`string`&&e.style.all;if(r&&(t=zw(e)),n&&(t=Vw(t)),n||r)return t}return t||e.cssText}function Vw(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,`$1\\$2`)}function Hw(e){return`styleSheet`in e}function Uw(e){return`selectorText`in e}var Ww=class{constructor(){jw(this,`idNodeMap`,new Map),jw(this,`nodeMetaMap`,new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Gw(){return new Ww}function Kw({maskInputOptions:e,tagName:t,type:n}){return t===`OPTION`&&(t=`SELECT`),!!(e[t.toLowerCase()]||n&&e[n]||n===`password`||t===`INPUT`&&!n&&e.text)}function qw({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||``;return e?(r&&(i=r(i,t)),`*`.repeat(i.length)):i}function Jw(e){return e.toLowerCase()}function Yw(e){return e.toUpperCase()}var Xw=`__rrweb_original__`;function Zw(e){let t=e.getContext(`2d`);if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){let i=t.getImageData,a=Xw in i?i[Xw]:i;if(new Uint32Array(a.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>e!==0))return!1}return!0}function Qw(e){let t=e.type;return e.hasAttribute(`data-rr-is-password`)?`password`:t?Jw(t):null}function $w(e,t,n){return t===`INPUT`&&(n===`radio`||n===`checkbox`)?e.getAttribute(`value`)||``:e.value}function eT(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}return n.pathname.match(/\.([0-9a-z]+)(?:$)/i)?.[1]??null}var tT={};function nT(e){let t=tT[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement==`function`)try{let t=n.createElement(`iframe`);t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch{}return tT[e]=r.bind(window)}function rT(...e){return nT(`setTimeout`)(...e)}function iT(...e){return nT(`clearTimeout`)(...e)}function aT(e){try{return e.contentDocument}catch{}}function oT(e){try{return e.contentWindow}catch{}}var sT=1,cT=RegExp(`[^a-z0-9-_:]`),lT=-2;function uT(){return sT++}function dT(e){if(e instanceof HTMLFormElement)return`form`;let t=Jw(e.tagName);return cT.test(t)?`div`:t}function fT(e){let t=``;return t=e.indexOf(`//`)>-1?e.split(`/`).slice(0,3).join(`/`):e.split(`/`)[0],t=t.split(`?`)[0],t}var pT,mT,hT=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,gT=/^(?:[a-z+]+:)?\/\//i,_T=/^www\..*/i,vT=/^(data:)([^,]*),(.*)/i;function yT(e,t){if(!e||t.size===0)return e;try{let n=e.split(`;`),r=[];for(let e of n){if(e=e.trim(),!e)continue;let n=e.indexOf(`:`);if(n===-1){r.push(e);continue}let i=e.slice(0,n).trim();t.has(i)||r.push(e)}return r.join(`; `)+(r.length>0&&e.endsWith(`;`)?`;`:``)}catch(t){return console.warn(`Error filtering CSS properties:`,t),e}}function bT(e,t){return(e||``).replace(hT,(e,n,r,i,a,o)=>{let s=r||a||o,c=n||i||``;if(!s)return e;if(gT.test(s)||_T.test(s)||vT.test(s))return`url(${c}${s}${c})`;if(s[0]===`/`)return`url(${c}${fT(t)+s}${c})`;let l=t.split(`/`),u=s.split(`/`);l.pop();for(let e of u)if(e===`.`)continue;else e===`..`?l.pop():l.push(e);return`url(${c}${l.join(`/`)}${c})`})}var xT=/^[^ \t\n\r\u000c]+/,ST=/^[, \t\n\r\u000c]+/;function CT(e,t){if(t.trim()===``)return t;let n=0;function r(e){let r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):``}let i=[];for(;r(ST),!(n>=t.length);){let a=r(xT);if(a.slice(-1)===`,`)a=TT(e,a.substring(0,a.length-1)),i.push(a);else{let r=``;a=TT(e,a);let o=!1;for(;;){let e=t.charAt(n);if(e===``){i.push((a+r).trim());break}else if(o)e===`)`&&(o=!1);else if(e===`,`){n+=1,i.push((a+r).trim());break}else e===`(`&&(o=!0);r+=e,n+=1}}}return i.join(`, `)}var wT=new WeakMap;function TT(e,t){return!t||t.trim()===``?t:DT(e,t)}function ET(e){return!!(e.tagName===`svg`||e.ownerSVGElement)}function DT(e,t){let n=wT.get(e);if(n||(n=e.createElement(`a`),wT.set(e,n)),!t)t=``;else if(t.startsWith(`blob:`)||t.startsWith(`data:`))return t;return n.setAttribute(`href`,t),n.href}function OT(e,t,n,r,i,a,o){if(!r)return r;if(n===`src`||n===`href`&&!(t===`use`&&r[0]===`#`)||n===`xlink:href`&&r[0]!==`#`||n===`background`&&(t===`table`||t===`td`||t===`th`))return TT(e,r);if(n===`srcset`)return CT(e,r);if(n===`style`){let t=bT(r,DT(e));return o&&o.size>0&&(t=yT(t,o)),t}else if(t===`object`&&n===`data`)return TT(e,r);return typeof a==`function`?a(n,r,i):r}function kT(e,t,n){return(e===`video`||e===`audio`)&&t===`autoplay`}function AT(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t==`string`){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function jT(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function MT(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:MT(e.parentNode,t,n,r+1)}function NT(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e==`string`){if(r.matches(`.${e}`))return!0}else if(jT(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function PT(e,t,n,r,i,a){try{let o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName===`INPUT`){let e=o.getAttribute(`autocomplete`);if([`current-password`,`new-password`,`cc-number`,`cc-exp`,`cc-exp-month`,`cc-exp-year`,`cc-csc`].includes(e))return!0}let s=-1,c=-1;if(a){if(c=MT(o,NT(r,i)),c<0)return!0;s=MT(o,NT(t,n),c>=0?c:1/0)}else{if(s=MT(o,NT(t,n)),s<0)return!1;c=MT(o,NT(r,i),s>=0?s:1/0)}return s>=0?c>=0?s<=c:!0:c>=0?!1:!!a}catch{}return!!a}function FT(e,t,n){let r=oT(e);if(!r)return;let i=!1,a;try{a=r.document.readyState}catch{return}if(a!==`complete`){let r=rT(()=>{i||=(t(),!0)},n);e.addEventListener(`load`,()=>{iT(r),i=!0,t()});return}let o=`about:blank`;if(r.location.href!==o||e.src===o||e.src===``)return rT(t,0),e.addEventListener(`load`,t);e.addEventListener(`load`,t)}function IT(e,t,n){let r=!1,i;try{i=e.sheet}catch{i=null}if(i)return;let a=rT(()=>{r||=(t(),!0)},n);e.addEventListener(`load`,()=>{iT(a),r=!0,t()})}function LT(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:m={},maskTextFn:h,maskInputFn:g,dataURLOptions:_={},inlineImages:v,recordCanvas:y,keepIframeSrcFn:b,newlyAddedElement:x=!1,ignoreCSSAttributes:S}=t,C=RT(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode===`CSS1Compat`?{type:Mw.Document,childNodes:[]}:{type:Mw.Document,childNodes:[],compatMode:e.compatMode};case e.DOCUMENT_TYPE_NODE:return{type:Mw.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:C};case e.ELEMENT_NODE:return BT(e,{doc:n,blockClass:i,blockSelector:a,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:m,maskInputFn:g,dataURLOptions:_,inlineImages:v,recordCanvas:y,keepIframeSrcFn:b,newlyAddedElement:x,rootId:C,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,ignoreCSSAttributes:S});case e.TEXT_NODE:return zT(e,{doc:n,maskAllText:s,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:h,maskInputOptions:m,maskInputFn:g,rootId:C});case e.CDATA_SECTION_NODE:return{type:Mw.CDATA,textContent:``,rootId:C};case e.COMMENT_NODE:return{type:Mw.Comment,textContent:e.textContent||``,rootId:C};default:return!1}}function RT(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function zT(e,t){let{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:a,unmaskTextSelector:o,maskTextFn:s,maskInputOptions:c,maskInputFn:l,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName,f=e.textContent,p=d===`STYLE`||void 0,m=d===`SCRIPT`||void 0,h=d===`TEXTAREA`||void 0;if(p&&f){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(f=Rw(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}f=bT(f,DT(t.doc))}m&&(f=`SCRIPT_PLACEHOLDER`);let g=PT(e,r,a,i,o,n);return!p&&!m&&!h&&f&&g&&(f=s?s(f,e.parentElement):f.replace(/[\S]/g,`*`)),h&&f&&(c.textarea||g)&&(f=l?l(f,e.parentNode):f.replace(/[\S]/g,`*`)),d===`OPTION`&&f&&(f=qw({isMasked:PT(e,r,a,i,o,Kw({type:null,tagName:d,maskInputOptions:c})),element:e,value:f,maskInputFn:l})),{type:Mw.Text,textContent:f||``,isStyle:p,rootId:u}}function BT(e,t){let{doc:n,blockClass:r,blockSelector:i,unblockSelector:a,inlineStylesheet:o,maskInputOptions:s={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:h,maskTextClass:g,unmaskTextClass:_,maskTextSelector:v,unmaskTextSelector:y,ignoreCSSAttributes:b}=t,x=AT(e,r,i,a),S=dT(e),C={},w=e.attributes.length;for(let t=0;t<w;t++){let r=e.attributes[t];r.name&&!kT(S,r.name,r.value)&&(C[r.name]=OT(n,S,Jw(r.name),r.value,e,c,b))}if(S===`link`&&o){let t=Array.from(n.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=Rw(t)),r&&(C.rel=null,C.href=null,C.crossorigin=null,C._cssText=bT(r,t.href))}if(S===`style`&&e.sheet&&!(e.innerText||e.textContent||``).trim().length){let t=Rw(e.sheet);t&&(C._cssText=bT(t,DT(n)))}if(S===`input`||S===`textarea`||S===`select`||S===`option`){let t=e,n=Qw(t),r=$w(t,Yw(S),n),i=t.checked;if(n!==`submit`&&n!==`button`&&r){let e=PT(t,g,v,_,y,Kw({type:n,tagName:Yw(S),maskInputOptions:s}));C.value=qw({isMasked:e,element:t,value:r,maskInputFn:l})}i&&(C.checked=i)}if(S===`option`&&(e.selected&&!s.select?C.selected=!0:delete C.selected),S===`canvas`&&f){if(e.__context===`2d`)Zw(e)||(C.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!(`__context`in e)){let t=e.toDataURL(u.type,u.quality),r=n.createElement(`canvas`);r.width=e.width,r.height=e.height,t!==r.toDataURL(u.type,u.quality)&&(C.rr_dataURL=t)}}if(S===`img`&&d){pT||(pT=n.createElement(`canvas`),mT=pT.getContext(`2d`));let t=e,r=t.currentSrc||t.getAttribute(`src`)||`<unknown-src>`,i=t.crossOrigin,a=()=>{t.removeEventListener(`load`,a);try{pT.width=t.naturalWidth,pT.height=t.naturalHeight,mT.drawImage(t,0,0),C.rr_dataURL=pT.toDataURL(u.type,u.quality)}catch(e){if(t.crossOrigin!==`anonymous`){t.crossOrigin=`anonymous`,t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a);return}else console.warn(`Cannot inline img src=${r}! Error: ${e}`)}t.crossOrigin===`anonymous`&&(i?C.crossOrigin=i:t.removeAttribute(`crossorigin`))};t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a)}if((S===`audio`||S===`video`)&&(C.rr_mediaState=e.paused?`paused`:`played`,C.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(C.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(C.rr_scrollTop=e.scrollTop)),x){let{width:t,height:n}=e.getBoundingClientRect();C={class:C.class,rr_width:`${t}px`,rr_height:`${n}px`}}S===`iframe`&&!p(C.src)&&(!x&&!aT(e)&&(C.rr_src=C.src),delete C.src);let T;try{customElements.get(S)&&(T=!0)}catch{}return{type:Mw.Element,tagName:S,attributes:C,childNodes:[],isSVG:ET(e)||void 0,needBlock:x,rootId:h,isCustom:T}}function J(e){return e==null?``:e.toLowerCase()}function VT(e,t){return!!(t.comment&&e.type===Mw.Comment||e.type===Mw.Element&&(t.script&&(e.tagName===`script`||e.tagName===`link`&&(e.attributes.rel===`preload`||e.attributes.rel===`modulepreload`)||e.tagName===`link`&&e.attributes.rel===`prefetch`&&typeof e.attributes.href==`string`&&eT(e.attributes.href)===`js`)||t.headFavicon&&(e.tagName===`link`&&e.attributes.rel===`shortcut icon`||e.tagName===`meta`&&(J(e.attributes.name).match(/^msapplication-tile(image|color)$/)||J(e.attributes.name)===`application-name`||J(e.attributes.rel)===`icon`||J(e.attributes.rel)===`apple-touch-icon`||J(e.attributes.rel)===`shortcut icon`))||e.tagName===`meta`&&(t.headMetaDescKeywords&&J(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(J(e.attributes.property).match(/^(og|twitter|fb):/)||J(e.attributes.name).match(/^(og|twitter):/)||J(e.attributes.name)===`pinterest`)||t.headMetaRobots&&(J(e.attributes.name)===`robots`||J(e.attributes.name)===`googlebot`||J(e.attributes.name)===`bingbot`)||t.headMetaHttpEquiv&&e.attributes[`http-equiv`]!==void 0||t.headMetaAuthorship&&(J(e.attributes.name)===`author`||J(e.attributes.name)===`generator`||J(e.attributes.name)===`framework`||J(e.attributes.name)===`publisher`||J(e.attributes.name)===`progid`||J(e.attributes.property).match(/^article:/)||J(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(J(e.attributes.name)===`google-site-verification`||J(e.attributes.name)===`yandex-verification`||J(e.attributes.name)===`csrf-token`||J(e.attributes.name)===`p:domain_verify`||J(e.attributes.name)===`verify-v1`||J(e.attributes.name)===`verification`||J(e.attributes.name)===`shopify-checkout-api-token`))))}function HT(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:m={},maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y={},inlineImages:b=!1,recordCanvas:x=!1,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w=5e3,onBlockedImageLoad:T,onStylesheetLoad:ee,stylesheetLoadTimeout:te=5e3,keepIframeSrcFn:ne=()=>!1,newlyAddedElement:re=!1,ignoreCSSAttributes:ie}=t,{preserveWhiteSpace:ae=!0}=t,oe=LT(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,maskAllText:s,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,dataURLOptions:y,inlineImages:b,recordCanvas:x,keepIframeSrcFn:ne,newlyAddedElement:re,ignoreCSSAttributes:ie});if(!oe)return console.warn(e,`not serialized`),null;let se;se=r.hasNode(e)?r.getId(e):VT(oe,v)||!ae&&oe.type===Mw.Text&&!oe.isStyle&&!oe.textContent.trim().length?lT:uT();let E=Object.assign(oe,{id:se});if(r.add(e,E),se===lT)return null;S&&S(e);let ce=!f;if(E.type===Mw.Element){ce&&=!E.needBlock;let t=e.shadowRoot;t&&Fw(t)&&(E.isShadowHost=!0)}if((E.type===Mw.Document||E.type===Mw.Element)&&ce){v.headWhitespace&&E.type===Mw.Element&&E.tagName===`head`&&(ae=!1);let t={doc:n,mirror:r,blockClass:i,blockSelector:a,maskAllText:s,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:ae,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onBlockedImageLoad:T,onStylesheetLoad:ee,stylesheetLoadTimeout:te,keepIframeSrcFn:ne,ignoreCSSAttributes:ie},re=e.childNodes?Array.from(e.childNodes):[];for(let e of re){let n=HT(e,t);n&&E.childNodes.push(n)}if(Nw(e)&&e.shadowRoot)for(let n of Array.from(e.shadowRoot.childNodes)){let r=HT(n,t);r&&(Fw(e.shadowRoot)&&(r.isShadow=!0),E.childNodes.push(r))}}if(e.parentNode&&Pw(e.parentNode)&&Fw(e.parentNode)&&(E.isShadow=!0),E.type===Mw.Element&&E.tagName===`iframe`&&!E.needBlock&&FT(e,()=>{let t=aT(e);if(t&&C){let n=HT(t,{doc:t,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:ae,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:ee,stylesheetLoadTimeout:te,keepIframeSrcFn:ne,ignoreCSSAttributes:ie});n&&C(e,n)}},w),E.type===Mw.Element&&E.tagName===`img`&&!e.complete&&E.needBlock){let t=e,n=()=>{if(t.isConnected&&!t.complete&&T)try{let e=t.getBoundingClientRect();e.width>0&&e.height>0&&T(t,E,e)}catch{}t.removeEventListener(`load`,n)};t.isConnected&&t.addEventListener(`load`,n)}return E.type===Mw.Element&&E.tagName===`link`&&typeof E.attributes.rel==`string`&&(E.attributes.rel===`stylesheet`||E.attributes.rel===`preload`&&typeof E.attributes.href==`string`&&eT(E.attributes.href)===`css`)&&IT(e,()=>{if(ee){let t=HT(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:ae,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:ee,stylesheetLoadTimeout:te,keepIframeSrcFn:ne,ignoreCSSAttributes:ie});t&&ee(e,t)}},te),E.type===Mw.Element&&delete E.needBlock,E}function UT(e,t){let{mirror:n=new Ww,blockClass:r=`rr-block`,blockSelector:i=null,unblockSelector:a=null,maskAllText:o=!1,maskTextClass:s=`rr-mask`,unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:m=!1,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOM:v=!1,dataURLOptions:y,preserveWhiteSpace:b,onSerialize:x,onIframeLoad:S,iframeLoadTimeout:C,onBlockedImageLoad:w,onStylesheetLoad:T,stylesheetLoadTimeout:ee,keepIframeSrcFn:te=()=>!1,ignoreCSSAttributes:ne=new Set([])}=t||{};return HT(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,maskAllText:o,maskTextClass:s,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:m===!1?{}:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v===!0||v===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:v===`all`,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:v===!1?{}:v,dataURLOptions:y,inlineImages:f,recordCanvas:p,preserveWhiteSpace:b,onSerialize:x,onIframeLoad:S,iframeLoadTimeout:C,onBlockedImageLoad:w,onStylesheetLoad:T,stylesheetLoadTimeout:ee,keepIframeSrcFn:te,newlyAddedElement:!1,ignoreCSSAttributes:ne})}function WT(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var GT=`Please stop import mirror directly. Instead of that,\r
|
|
495
495
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
496
|
-
or you can use record.mirror to access the mirror instance during recording.`,KT={map:{},getId(){return console.error(GT),-1},getNode(){return console.error(GT),null},removeNodeFromMap(){console.error(GT)},has(){return console.error(GT),!1},reset(){console.error(GT)}};typeof window<`u`&&window.Proxy&&window.Reflect&&(KT=new Proxy(KT,{get(e,t,n){return t===`map`&&console.error(GT),Reflect.get(e,t,n)}}));function qT(e,t,n={}){let r=null,i=0;return function(...a){let o=Date.now();!i&&n.leading===!1&&(i=o);let s=t-(o-i),c=this;s<=0||s>t?(r&&=(yE(r),null),i=o,e.apply(c,a)):!r&&n.trailing!==!1&&(r=vE(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(c,a)},s))}}function JT(e,t,n,r,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){vE(()=>{n.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>JT(e,t,a||{},!0)}function YT(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}var XT=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(XT=()=>new Date().getTime());function ZT(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset===void 0?t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0:e.pageXOffset,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset===void 0?t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0:e.pageYOffset}}function QT(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function $T(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function eE(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function tE(e,t,n,r,i){if(!e)return!1;let a=eE(e);if(!a)return!1;let o=NT(t,n);if(!i){let e=r&&a.matches(r);return o(a)&&!e}let s=MT(a,o),c=-1;return s<0?!1:(r&&(c=MT(a,NT(null,r))),s>-1&&c<0||s<c)}function nE(e,t){return t.getId(e)!==-1}function rE(e,t){return t.getId(e)===lT}function iE(e,t){if(Pw(e))return!1;let n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:!e.parentNode||iE(e.parentNode,t):!0}function aE(e){return!!e.changedTouches}function oE(e=window){`NodeList`in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),`DOMTokenList`in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw TypeError(`1 argument is required`);do if(this===t)return!0;while(t&&=t.parentNode);return!1})}function sE(e,t){return!!(e.nodeName===`IFRAME`&&t.getMeta(e))}function cE(e,t){return!!(e.nodeName===`LINK`&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute(`rel`)===`stylesheet`&&t.getMeta(e))}function lE(e){return!!e?.shadowRoot}var uE=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=t===void 0?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function dE(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function fE(e){let t=e,n;for(;n=dE(t);)t=n;return t}function pE(e){let t=e.ownerDocument;if(!t)return!1;let n=fE(e);return t.contains(n)}function mE(e){let t=e.ownerDocument;return t?t.contains(e)||pE(e):!1}var hE={};function gE(e){let t=hE[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement==`function`)try{let t=n.createElement(`iframe`);t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch{}return hE[e]=r.bind(window)}function _E(...e){return gE(`requestAnimationFrame`)(...e)}function vE(...e){return gE(`setTimeout`)(...e)}function yE(...e){return gE(`clearTimeout`)(...e)}var Y=(e=>(e[e.DomContentLoaded=0]=`DomContentLoaded`,e[e.Load=1]=`Load`,e[e.FullSnapshot=2]=`FullSnapshot`,e[e.IncrementalSnapshot=3]=`IncrementalSnapshot`,e[e.Meta=4]=`Meta`,e[e.Custom=5]=`Custom`,e[e.Plugin=6]=`Plugin`,e))(Y||{}),X=(e=>(e[e.Mutation=0]=`Mutation`,e[e.MouseMove=1]=`MouseMove`,e[e.MouseInteraction=2]=`MouseInteraction`,e[e.Scroll=3]=`Scroll`,e[e.ViewportResize=4]=`ViewportResize`,e[e.Input=5]=`Input`,e[e.TouchMove=6]=`TouchMove`,e[e.MediaInteraction=7]=`MediaInteraction`,e[e.StyleSheetRule=8]=`StyleSheetRule`,e[e.CanvasMutation=9]=`CanvasMutation`,e[e.Font=10]=`Font`,e[e.Log=11]=`Log`,e[e.Drag=12]=`Drag`,e[e.StyleDeclaration=13]=`StyleDeclaration`,e[e.Selection=14]=`Selection`,e[e.AdoptedStyleSheet=15]=`AdoptedStyleSheet`,e[e.CustomElement=16]=`CustomElement`,e))(X||{}),bE=(e=>(e[e.MouseUp=0]=`MouseUp`,e[e.MouseDown=1]=`MouseDown`,e[e.Click=2]=`Click`,e[e.ContextMenu=3]=`ContextMenu`,e[e.DblClick=4]=`DblClick`,e[e.Focus=5]=`Focus`,e[e.Blur=6]=`Blur`,e[e.TouchStart=7]=`TouchStart`,e[e.TouchMove_Departed=8]=`TouchMove_Departed`,e[e.TouchEnd=9]=`TouchEnd`,e[e.TouchCancel=10]=`TouchCancel`,e))(bE||{}),xE=(e=>(e[e.Mouse=0]=`Mouse`,e[e.Pen=1]=`Pen`,e[e.Touch=2]=`Touch`,e))(xE||{}),SE=(e=>(e[e.Play=0]=`Play`,e[e.Pause=1]=`Pause`,e[e.Seeked=2]=`Seeked`,e[e.VolumeChange=3]=`VolumeChange`,e[e.RateChange=4]=`RateChange`,e))(SE||{}),CE;function wE(e){CE=e}function TE(){CE=void 0}for(var Z=e=>CE?((...t)=>{try{return e(...t)}catch(e){if(CE&&CE(e)===!0)return()=>{};throw e}}):e,EE=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,DE=typeof Uint8Array>`u`?[]:new Uint8Array(256),OE=0;OE<EE.length;OE++)DE[EE.charCodeAt(OE)]=OE;var kE=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}};function AE(e){try{return e.contentDocument}catch{}}function jE(e){try{return e.contentWindow}catch{}}var ME=class{constructor(e){this.doc=e,this.unattachedDoc=null}parse(e){return this.parseWithConstructableStylesheet(e)||this.parseWithDetachedElement(e)}parseWithConstructableStylesheet(e){if(typeof CSSStyleSheet>`u`||typeof CSSStyleSheet.prototype.replaceSync!=`function`)return null;try{let t=new CSSStyleSheet;t.replaceSync(`x { ${e} }`);let n=t.cssRules[0];return!n||n.type!==CSSRule.STYLE_RULE?null:n.style}catch{return null}}parseWithDetachedElement(e){let t=this.getUnattachedDoc().createElement(`span`);return t.setAttribute(`style`,e),t.style}getUnattachedDoc(){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}return this.unattachedDoc}};function NE(e){return`__ln`in e}var PE=class{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw Error(`Position outside of list range`);let t=this.head;for(let n=0;n<e;n++)t=t?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&NE(e.previousSibling)){let n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&NE(e.nextSibling)&&e.nextSibling.__ln.previous){let n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},FE=(e,t)=>`${e}@${t}`,IE=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,n=new PE,r=e=>{let t=e,n=lT;for(;n===lT;)t&&=t.nextSibling,n=t&&this.mirror.getId(t);return n},i=i=>{if(!i.parentNode||!mE(i))return;let a=Pw(i.parentNode)?this.mirror.getId(dE(i)):this.mirror.getId(i.parentNode),o=r(i);if(a===-1||o===-1)return n.addNode(i);let s=HT(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{sE(e,this.mirror)&&!tE(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),cE(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),lE(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{if(tE(e,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(e,t);let n=jE(e);n&&this.canvasManager.addWindow(n),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});s&&(e.push({parentId:a,nextId:o,node:s}),t.add(s.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)RE(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||i(e);for(let e of this.addedSet)!BE(this.droppedSet,e)&&!RE(this.removes,e,this.mirror)||BE(this.movedSet,e)?i(e):this.droppedSet.add(e);let a=null;for(;n.length;){let e=null;if(a){let t=this.mirror.getId(a.value.parentNode),n=r(a.value);t!==-1&&n!==-1&&(e=a)}if(!e){let t=n.tail;for(;t;){let n=t;if(t=t.previous,n){let t=this.mirror.getId(n.value.parentNode);if(r(n.value)===-1)continue;if(t!==-1){e=n;break}else{let t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let r=t.parentNode.host;if(this.mirror.getId(r)!==-1){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}a=e.previous,n.removeNode(e.value),i(e.value)}let o={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if(typeof t.style==`string`){let n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split(`var(`).length===t.style.split(`var(`).length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};!o.texts.length&&!o.attributes.length&&!o.removes.length&&!o.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(o))},this.processMutation=e=>{if(!rE(e.target,this.mirror))switch(e.type){case`characterData`:{let t=e.target.textContent;!tE(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:PT(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,eE(e.target)):t.replace(/[\S]/g,`*`):t,node:e.target});break}case`attributes`:{let t=e.target,n=e.attributeName,r=e.target.getAttribute(n);if(n===`value`){let n=Qw(t),i=t.tagName;r=$w(t,i,n);let a=Kw({maskInputOptions:this.maskInputOptions,tagName:i,type:n});r=qw({isMasked:PT(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,a),element:t,value:r,maskInputFn:this.maskInputFn})}if(tE(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let i=this.attributeMap.get(e.target);if(t.tagName===`IFRAME`&&n===`src`&&!this.keepIframeSrcFn(r))if(!AE(t))n=`rr_src`;else return;if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),n===`type`&&t.tagName===`INPUT`&&(e.oldValue||``).toLowerCase()===`password`&&t.setAttribute(`data-rr-is-password`,`true`),!kT(t.tagName,n)&&(i.attributes[n]=OT(this.doc,Jw(t.tagName),Jw(n),r,t,this.maskAttributeFn),n===`style`)){let n=e.oldValue?this.styleDeclarationParser.parse(e.oldValue):null;for(let e of Array.from(t.style)){let r=t.style.getPropertyValue(e),a=t.style.getPropertyPriority(e);r!==(n?.getPropertyValue(e)||``)||a!==(n?.getPropertyPriority(e)||``)?a===``?i.styleDiff[e]=r:i.styleDiff[e]=[r,a]:i._unchangedStyles[e]=[r,a]}if(n)for(let e of Array.from(n))t.style.getPropertyValue(e)===``&&(i.styleDiff[e]=!1)}break}case`childList`:if(tE(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let n=this.mirror.getId(t),r=Pw(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);tE(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||rE(t,this.mirror)||!nE(t,this.mirror)||(this.addedSet.has(t)?(LE(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&n===-1||iE(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[FE(n,r)]?LE(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:Pw(e.target)&&Fw(e.target)?!0:void 0})),this.mapRemoves.push(t))});break}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(rE(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&n!==-1&&(this.movedMap[FE(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);tE(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes&&e.childNodes.forEach(e=>this.genAdds(e)),lE(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}}}init(e){`mutationCb.blockClass.blockSelector.unblockSelector.maskAllText.maskTextClass.unmaskTextClass.maskTextSelector.unmaskTextSelector.inlineStylesheet.maskInputOptions.maskAttributeFn.maskTextFn.maskInputFn.keepIframeSrcFn.recordCanvas.inlineImages.slimDOMOptions.dataURLOptions.doc.mirror.iframeManager.stylesheetManager.shadowDomManager.canvasManager.processedNodeManager.ignoreCSSAttributes`.split(`.`).forEach(t=>{this[t]=e[t]}),this.styleDeclarationParser=new ME(this.doc)}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function LE(e,t){e.delete(t),t.childNodes?.forEach(t=>LE(e,t))}function RE(e,t,n){return e.length!==0&&zE(e,t,n)}function zE(e,t,n){let r=t.parentNode;for(;r;){let t=n.getId(r);if(e.some(e=>e.id===t))return!0;r=r.parentNode}return!1}function BE(e,t){return e.size!==0&&VE(e,t)}function VE(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:VE(e,n):!1}var HE=[];function UE(e){try{if(`composedPath`in e){let t=e.composedPath();if(t.length)return t[0]}else if(`path`in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function WE(e,t){let n=new IE;HE.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver,i=window?.Zone?.__symbol__?.(`MutationObserver`);i&&window[i]&&(r=window[i]);let a=new r(Z(t=>{e.onMutation&&e.onMutation(t)===!1||n.processMutations.bind(n)(t)}));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function GE({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let i=typeof t.mousemove==`number`?t.mousemove:50,a=typeof t.mousemoveCallback==`number`?t.mousemoveCallback:500,o=[],s,c=qT(Z(t=>{let n=Date.now()-s;e(o.map(e=>(e.timeOffset-=n,e)),t),o=[],s=null}),a),l=Z(qT(Z(e=>{let t=UE(e),{clientX:n,clientY:i}=aE(e)?e.changedTouches[0]:e;s||=XT(),o.push({x:n,y:i,id:r.getId(t),timeOffset:XT()-s}),c(typeof DragEvent<`u`&&e instanceof DragEvent?X.Drag:e instanceof MouseEvent?X.MouseMove:X.TouchMove)}),i,{trailing:!1})),u=[WT(`mousemove`,l,n),WT(`touchmove`,l,n),WT(`drag`,l,n)];return Z(()=>{u.forEach(e=>e())})}function KE({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],l=null,u=t=>o=>{let s=UE(o);if(tE(s,r,i,a,!0))return;let c=null,u=t;if(`pointerType`in o){switch(o.pointerType){case`mouse`:c=xE.Mouse;break;case`touch`:c=xE.Touch;break;case`pen`:c=xE.Pen;break}c===xE.Touch?bE[t]===bE.MouseDown?u=`TouchStart`:bE[t]===bE.MouseUp&&(u=`TouchEnd`):xE.Pen}else aE(o)&&(c=xE.Touch);c===null?bE[t]===bE.Click&&(c=l,l=null):(l=c,(u.startsWith(`Touch`)&&c===xE.Touch||u.startsWith(`Mouse`)&&c===xE.Mouse)&&(c=null));let d=aE(o)?o.changedTouches[0]:o;if(!d)return;let f=n.getId(s),{clientX:p,clientY:m}=d;Z(e)({type:bE[u],id:f,x:p,y:m,...c!==null&&{pointerType:c}})};return Object.keys(bE).filter(e=>Number.isNaN(Number(e))&&!e.endsWith(`_Departed`)&&s[e]!==!1).forEach(e=>{let n=Jw(e),r=u(e);if(window.PointerEvent)switch(bE[e]){case bE.MouseDown:case bE.MouseUp:n=n.replace(`mouse`,`pointer`);break;case bE.TouchStart:case bE.TouchEnd:return}c.push(WT(n,r,t))}),Z(()=>{c.forEach(e=>e())})}function qE({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,sampling:o}){return WT(`scroll`,Z(qT(Z(o=>{let s=UE(o);if(!s||tE(s,r,i,a,!0))return;let c=n.getId(s);if(s===t&&t.defaultView){let n=ZT(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:s.scrollLeft,y:s.scrollTop})}),o.scroll||100)),t)}function JE({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return WT(`resize`,Z(qT(Z(()=>{let t=QT(),i=$T();(n!==t||r!==i)&&(e({width:Number(i),height:Number(t)}),n=t,r=i)}),200)),t)}var YE=[`INPUT`,`TEXTAREA`,`SELECT`],XE=new WeakMap;function ZE({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,ignoreClass:o,ignoreSelector:s,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:m,unmaskTextSelector:h}){function g(e){let n=UE(e),u=e.isTrusted,g=n&&Yw(n.tagName);if(g===`OPTION`&&(n=n.parentElement),!n||!g||YE.indexOf(g)<0||tE(n,r,i,a,!0))return;let v=n;if(v.classList.contains(o)||s&&v.matches(s))return;let y=Qw(n),b=$w(v,g,y),x=!1,S=Kw({maskInputOptions:c,tagName:g,type:y}),C=PT(n,f,m,p,h,S);(y===`radio`||y===`checkbox`)&&(x=n.checked),b=qw({isMasked:C,element:n,value:b,maskInputFn:l}),_(n,d?{text:b,isChecked:x,userTriggered:u}:{text:b,isChecked:x});let w=n.name;y===`radio`&&w&&x&&t.querySelectorAll(`input[type="radio"][name="${w}"]`).forEach(e=>{if(e!==n){let t=qw({isMasked:C,element:e,value:$w(e,g,y),maskInputFn:l});_(e,d?{text:t,isChecked:!x,userTriggered:!1}:{text:t,isChecked:!x})}})}function _(t,r){let i=XE.get(t);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){XE.set(t,r);let i=n.getId(t);Z(e)({...r,id:i})}}let v=(u.input===`last`?[`change`]:[`input`,`change`]).map(e=>WT(e,Z(g),t)),y=t.defaultView;if(!y)return()=>{v.forEach(e=>e())};let b=y.Object.getOwnPropertyDescriptor(y.HTMLInputElement.prototype,`value`),x=[[y.HTMLInputElement.prototype,`value`],[y.HTMLInputElement.prototype,`checked`],[y.HTMLSelectElement.prototype,`value`],[y.HTMLTextAreaElement.prototype,`value`],[y.HTMLSelectElement.prototype,`selectedIndex`],[y.HTMLOptionElement.prototype,`selected`]];return b&&b.set&&v.push(...x.map(e=>JT(e[0],e[1],{set(){Z(g)({target:this,isTrusted:!1})}},!1,y))),Z(()=>{v.forEach(e=>e())})}function QE(e){let t=[];function n(e,t){if(cD(`CSSGroupingRule`)&&e.parentRule instanceof CSSGroupingRule||cD(`CSSMediaRule`)&&e.parentRule instanceof CSSMediaRule||cD(`CSSSupportsRule`)&&e.parentRule instanceof CSSSupportsRule||cD(`CSSConditionRule`)&&e.parentRule instanceof CSSConditionRule){let n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){let n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}return n(e,t)}function $E(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function eD({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:Z((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=$E(i,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:s}]}),r.apply(i,a)})});let a=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:Z((r,i,a)=>{let[o]=a,{id:s,styleId:c}=$E(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:o}]}),r.apply(i,a)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:Z((r,i,a)=>{let[o]=a,{id:s,styleId:c}=$E(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replace:o}),r.apply(i,a)})}));let s;r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:Z((r,i,a)=>{let[o]=a,{id:s,styleId:c}=$E(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replaceSync:o}),r.apply(i,a)})}));let c={};lD(`CSSGroupingRule`)?c.CSSGroupingRule=r.CSSGroupingRule:(lD(`CSSMediaRule`)&&(c.CSSMediaRule=r.CSSMediaRule),lD(`CSSConditionRule`)&&(c.CSSConditionRule=r.CSSConditionRule),lD(`CSSSupportsRule`)&&(c.CSSSupportsRule=r.CSSSupportsRule));let l={};return Object.entries(c).forEach(([r,i])=>{l[r]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(l[r].insertRule,{apply:Z((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=$E(i.parentStyleSheet,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:[...QE(i),s||0]}]}),r.apply(i,a)})}),i.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:Z((r,i,a)=>{let[o]=a,{id:s,styleId:c}=$E(i.parentStyleSheet,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:[...QE(i),o]}]}),r.apply(i,a)})})}),Z(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=a,o&&(r.CSSStyleSheet.prototype.replace=o),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule})})}function tD({mirror:e,stylesheetManager:t},n){let r=null;r=n.nodeName===`#document`?e.getId(n):e.getId(n.host);let i=n.nodeName===`#document`?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,a=i?.prototype?Object.getOwnPropertyDescriptor(i?.prototype,`adoptedStyleSheets`):void 0;return r===null||r===-1||!i||!a?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){return a.get?.call(this)},set(e){let n=a.set?.call(this,e);if(r!==null&&r!==-1)try{t.adoptStyleSheets(e,r)}catch{}return n}}),Z(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function nD({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:Z((i,o,s)=>{let[c,l,u]=s;if(n.has(c))return a.apply(o,[c,l,u]);let{id:d,styleId:f}=$E(o.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,set:{property:c,value:l,priority:u},index:QE(o.parentRule)}),i.apply(o,s)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:Z((i,a,s)=>{let[c]=s;if(n.has(c))return o.apply(a,[c]);let{id:l,styleId:u}=$E(a.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||u&&u!==-1)&&e({id:l,styleId:u,remove:{property:c},index:QE(a.parentRule)}),i.apply(a,s)})}),Z(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=o})}function rD({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:a,doc:o}){let s=Z(o=>qT(Z(a=>{let s=UE(a);if(!s||tE(s,t,n,r,!0))return;let{currentTime:c,volume:l,muted:u,playbackRate:d}=s;e({type:o,id:i.getId(s),currentTime:c,volume:l,muted:u,playbackRate:d})}),a.media||500)),c=[WT(`play`,s(SE.Play),o),WT(`pause`,s(SE.Pause),o),WT(`seeked`,s(SE.Seeked),o),WT(`volumechange`,s(SE.VolumeChange),o),WT(`ratechange`,s(SE.RateChange),o)];return Z(()=>{c.forEach(e=>e())})}function iD({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,a=n.FontFace;n.FontFace=function(e,t,n){let r=new a(e,t,n);return i.set(r,{family:e,buffer:typeof t!=`string`,descriptors:n,fontSource:typeof t==`string`?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};let o=YT(t.fonts,`add`,function(t){return function(n){return vE(Z(()=>{let t=i.get(n);t&&(e(t),i.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=a}),r.push(o),Z(()=>{r.forEach(e=>e())})}function aD(e){let{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,selectionCb:o}=e,s=!0,c=Z(()=>{let e=t.getSelection();if(!e||s&&e?.isCollapsed)return;s=e.isCollapsed||!1;let c=[],l=e.rangeCount||0;for(let t=0;t<l;t++){let{startContainer:o,startOffset:s,endContainer:l,endOffset:u}=e.getRangeAt(t);tE(o,r,i,a,!0)||tE(l,r,i,a,!0)||c.push({start:n.getId(o),startOffset:s,end:n.getId(l),endOffset:u})}o({ranges:c})});return c(),WT(`selectionchange`,c)}function oD({doc:e,customElementCb:t}){let n=e.defaultView;return!n||!n.customElements?()=>{}:YT(n.customElements,`define`,function(e){return function(n,r,i){try{t({define:{name:n}})}catch{}return e.apply(this,[n,r,i])}})}function sD(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=WE(e,e.doc));let i=GE(e),a=KE(e),o=qE(e),s=JE(e,{win:n}),c=ZE(e),l=rD(e),u=()=>{},d=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(u=eD(e,{win:n}),d=tD(e,e.doc),f=nD(e,{win:n}),e.collectFonts&&(p=iD(e)));let m=aD(e),h=oD(e),g=[];for(let t of e.plugins)g.push(t.observer(t.callback,n,t.options));return Z(()=>{HE.forEach(e=>e.reset()),r?.disconnect(),i(),a(),o(),s(),c(),l(),u(),d(),f(),p(),m(),h(),g.forEach(e=>e())})}function cD(e){return window[e]!==void 0}function lD(e){return!!(window[e]!==void 0&&window[e].prototype&&`insertRule`in window[e].prototype&&`deleteRule`in window[e].prototype)}var uD=class{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){let i=n||this.getIdToRemoteIdMap(e),a=r||this.getRemoteIdToIdMap(e),o=i.get(t);return o||(o=this.generateIdFn(),i.set(t,o),a.set(o,t)),o}getIds(e,t){let n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}getRemoteId(e,t,n){let r=n||this.getRemoteIdToIdMap(e);return typeof t==`number`?r.get(t)||-1:t}getRemoteIds(e,t){let n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},dD=class{constructor(){this.crossOriginIframeMirror=new uD(uT),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},fD=class{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new uD(uT),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new uD(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener(`message`,this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0);let t=jE(e);t&&this.crossOriginIframeMap.set(t,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&jE(e)?.addEventListener(`message`,this.handleMessage.bind(this)),this.loadListener?.(e);let n=AE(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){let t=e;if(t.data.type!==`rrweb`||t.origin!==t.data.origin||!e.source)return;let n=this.crossOriginIframeMap.get(e.source);if(!n)return;let r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case Y.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:Y.IncrementalSnapshot,data:{source:X.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Y.Meta:case Y.Load:case Y.DomContentLoaded:return!1;case Y.Plugin:return t;case Y.Custom:return this.replaceIds(t.data.payload,e,[`id`,`parentId`,`previousId`,`nextId`]),t;case Y.IncrementalSnapshot:switch(t.data.source){case X.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,[`parentId`,`nextId`,`previousId`]),this.replaceIdOnNode(t.node,e);let n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,[`parentId`,`id`])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,[`id`])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case X.Drag:case X.TouchMove:case X.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case X.ViewportResize:return!1;case X.MediaInteraction:case X.MouseInteraction:case X.Scroll:case X.CanvasMutation:case X.Input:return this.replaceIds(t.data,e,[`id`]),t;case X.StyleSheetRule:case X.StyleDeclaration:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleId`]),t;case X.Font:return t;case X.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,[`start`,`end`])}),t;case X.AdoptedStyleSheet:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleIds`]),t.data.styles?.forEach(t=>{this.replaceStyleIds(t,e,[`styleId`])}),t}}return!1}replace(e,t,n,r){for(let i of r)!Array.isArray(t[i])&&typeof t[i]!=`number`||(Array.isArray(t[i])?t[i]=e.getIds(n,t[i]):t[i]=e.getId(n,t[i]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,[`id`,`rootId`]),`childNodes`in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type!==Mw.Document&&!e.rootId&&(e.rootId=t),`childNodes`in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}},pD=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},mD=class{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Fw(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);let n=WE({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(qE({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),vE(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(tD({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){let t=AE(e),n=jE(e);!t||!n||this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){let n=this;this.restoreHandlers.push(YT(e.prototype,`attachShadow`,function(e){return function(r){let i=e.call(this,r);return this.shadowRoot&&mE(this)&&n.addShadowRoot(this.shadowRoot,t),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}},hD=class{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new uE,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){`_cssText`in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let n={id:t,styleIds:[]},r=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:Bw(e),index:t}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},gD=class{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,_E(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},_D,vD;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement(`iframe`);document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug(`Unable to override Array.from`,e)}var yD=Gw();function bD(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i=`rr-block`,blockSelector:a=null,unblockSelector:o=null,ignoreClass:s=`rr-ignore`,ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u=`rr-mask`,unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:m=!0,maskAllInputs:h,maskInputOptions:g,slimDOMOptions:_,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,maxCanvasSize:x=null,packFn:S,sampling:C={},dataURLOptions:w={},mousemoveWait:T,recordDOM:ee=!0,recordCanvas:te=!1,recordCrossOriginIframes:ne=!1,recordAfter:re=e.recordAfter===`DOMContentLoaded`?e.recordAfter:`load`,userTriggeredOnInput:ie=!1,collectFonts:ae=!1,inlineImages:oe=!1,plugins:se,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:ce=new Set([]),errorHandler:le,onMutation:ue,getCanvasManager:de}=e;wE(le);let fe=!ne||window.parent===window,pe=!1;if(!fe)try{window.parent.document&&(pe=!1)}catch{pe=!0}if(fe&&!t)throw Error(`emit function is required`);if(!fe&&!pe)return()=>{};T!==void 0&&C.mousemove===void 0&&(C.mousemove=T),yD.reset();let me=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:g===void 0?{}:g,he=_===!0||_===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:_===`all`,headMetaDescKeywords:_===`all`}:_||{};oE();let ge,_e=0,ve=e=>{for(let t of se||[])t.eventProcessor&&(e=t.eventProcessor(e));return S&&!pe&&(e=S(e)),e};_D=(e,i)=>{let a=e;if(a.timestamp=XT(),HE[0]?.isFrozen()&&a.type!==Y.FullSnapshot&&!(a.type===Y.IncrementalSnapshot&&a.data.source===X.Mutation)&&HE.forEach(e=>e.unfreeze()),fe)t?.(ve(a),i);else if(pe){let e={type:`rrweb`,event:ve(a),origin:window.location.origin,isCheckout:i};window.parent.postMessage(e,`*`)}if(a.type===Y.FullSnapshot)ge=a,_e=0;else if(a.type===Y.IncrementalSnapshot){if(a.data.source===X.Mutation&&a.data.isAttachIframe)return;_e++;let e=r&&_e>=r,t=n&&ge&&a.timestamp-ge.timestamp>n;(e||t)&&De(!0)}};let ye=e=>{_D({type:Y.IncrementalSnapshot,data:{source:X.Mutation,...e}})},be=e=>_D({type:Y.IncrementalSnapshot,data:{source:X.Scroll,...e}}),xe=e=>_D({type:Y.IncrementalSnapshot,data:{source:X.CanvasMutation,...e}}),Se=new hD({mutationCb:ye,adoptedStyleSheetCb:e=>_D({type:Y.IncrementalSnapshot,data:{source:X.AdoptedStyleSheet,...e}})}),Ce=typeof __RRWEB_EXCLUDE_IFRAME__==`boolean`&&__RRWEB_EXCLUDE_IFRAME__?new dD:new fD({mirror:yD,mutationCb:ye,stylesheetManager:Se,recordCrossOriginIframes:ne,wrappedEmit:_D});for(let e of se||[])e.getMirror&&e.getMirror({nodeMirror:yD,crossOriginIframeMirror:Ce.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ce.crossOriginIframeStyleMirror});let we=new gD,Te=SD(de,{mirror:yD,win:window,mutationCb:e=>_D({type:Y.IncrementalSnapshot,data:{source:X.CanvasMutation,...e}}),recordCanvas:te,blockClass:i,blockSelector:a,unblockSelector:o,maxCanvasSize:x,sampling:C.canvas,dataURLOptions:w,errorHandler:le}),Ee=typeof __RRWEB_EXCLUDE_SHADOW_DOM__==`boolean`&&__RRWEB_EXCLUDE_SHADOW_DOM__?new pD:new mD({mutationCb:ye,scrollCb:be,bypassOptions:{onMutation:ue,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:me,dataURLOptions:w,maskAttributeFn:v,maskTextFn:b,maskInputFn:y,recordCanvas:te,inlineImages:oe,sampling:C,slimDOMOptions:he,iframeManager:Ce,stylesheetManager:Se,canvasManager:Te,keepIframeSrcFn:E,processedNodeManager:we,ignoreCSSAttributes:ce},mirror:yD}),De=(e=!1)=>{if(!ee)return;_D({type:Y.Meta,data:{href:window.location.href,width:$T(),height:QT()}},e),Se.reset(),Ee.init(),HE.forEach(e=>e.lock());let t=UT(document,{mirror:yD,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskAllInputs:me,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,slimDOM:he,dataURLOptions:w,recordCanvas:te,inlineImages:oe,onSerialize:e=>{sE(e,yD)&&Ce.addIframe(e),cE(e,yD)&&Se.trackLinkElement(e),lE(e)&&Ee.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Ce.attachIframe(e,t);let n=jE(e);n&&Te.addWindow(n),Ee.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Se.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{ye({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},keepIframeSrcFn:E,ignoreCSSAttributes:ce});if(!t)return console.warn(`Failed to snapshot the document`);_D({type:Y.FullSnapshot,data:{node:t,initialOffset:ZT(window)}}),HE.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Se.adoptStyleSheets(document.adoptedStyleSheets,yD.getId(document))};vD=De;try{let e=[],t=e=>Z(sD)({onMutation:ue,mutationCb:ye,mousemoveCb:(e,t)=>_D({type:Y.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>_D({type:Y.IncrementalSnapshot,data:{source:X.MouseInteraction,...e}}),scrollCb:be,viewportResizeCb:e=>_D({type:Y.IncrementalSnapshot,data:{source:X.ViewportResize,...e}}),inputCb:e=>_D({type:Y.IncrementalSnapshot,data:{source:X.Input,...e}}),mediaInteractionCb:e=>_D({type:Y.IncrementalSnapshot,data:{source:X.MediaInteraction,...e}}),styleSheetRuleCb:e=>_D({type:Y.IncrementalSnapshot,data:{source:X.StyleSheetRule,...e}}),styleDeclarationCb:e=>_D({type:Y.IncrementalSnapshot,data:{source:X.StyleDeclaration,...e}}),canvasMutationCb:xe,fontCb:e=>_D({type:Y.IncrementalSnapshot,data:{source:X.Font,...e}}),selectionCb:e=>{_D({type:Y.IncrementalSnapshot,data:{source:X.Selection,...e}})},customElementCb:e=>{_D({type:Y.IncrementalSnapshot,data:{source:X.CustomElement,...e}})},blockClass:i,ignoreClass:s,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:me,inlineStylesheet:m,sampling:C,recordDOM:ee,recordCanvas:te,inlineImages:oe,userTriggeredOnInput:ie,collectFonts:ae,doc:e,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,keepIframeSrcFn:E,blockSelector:a,unblockSelector:o,slimDOMOptions:he,dataURLOptions:w,mirror:yD,iframeManager:Ce,stylesheetManager:Se,shadowDomManager:Ee,processedNodeManager:we,canvasManager:Te,ignoreCSSAttributes:ce,plugins:se?.filter(e=>e.observer)?.map(e=>({observer:e.observer,options:e.options,callback:t=>_D({type:Y.Plugin,data:{plugin:e.name,payload:t}})}))||[]},{});Ce.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});let n=()=>{De(),e.push(t(document))};return document.readyState===`interactive`||document.readyState===`complete`?n():(e.push(WT(`DOMContentLoaded`,()=>{_D({type:Y.DomContentLoaded,data:{}}),re===`DOMContentLoaded`&&n()})),e.push(WT(`load`,()=>{_D({type:Y.Load,data:{}}),re===`load`&&n()},window))),()=>{e.forEach(e=>e()),we.destroy(),vD=void 0,TE()}}catch(e){console.warn(e)}}function xD(e){if(!vD)throw Error(`please take full snapshot after start recording`);vD(e)}bD.mirror=yD,bD.takeFullSnapshot=xD;function SD(e,t){try{return e?e(t):new kE}catch{return console.warn(`Unable to initialize CanvasManager`),new kE}}var CD;(function(e){e[e.NotStarted=0]=`NotStarted`,e[e.Running=1]=`Running`,e[e.Stopped=2]=`Stopped`})(CD||={});var wD=3,TD=5;function ED(e){return e>9999999999?e:e*1e3}function DD(e){return e>9999999999?e/1e3:e}function OD(e,t){t.category!==`sentry.transaction`&&([`ui.click`,`ui.input`].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:Y.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:`breadcrumb`,payload:Ze(t,10,1e3)}}),t.category===`console`)))}var kD=`button,a`;function AD(e){return e.closest(kD)||e}function jD(e){let t=MD(e);return!t||!(t instanceof Element)?t:AD(t)}function MD(e){return ND(e)?e.target:e}function ND(e){return De(e)&&`target`in e}var PD;function FD(e){return PD||(PD=[],ID()),PD.push(e),()=>{let t=PD?PD.indexOf(e):-1;t>-1&&PD.splice(t,1)}}function ID(){Ne(q,`open`,function(e){return function(...t){if(PD)try{PD.forEach(e=>e())}catch{}return e.apply(q,t)}})}var LD=new Set([X.Mutation,X.StyleSheetRule,X.StyleDeclaration,X.AdoptedStyleSheet,X.CanvasMutation,X.Selection,X.MediaInteraction]);function RD(e,t,n){e.handleClick(t,n)}var zD=class{constructor(e,t,n=OD){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){let e=FD(()=>{this._lastMutation=UD()});this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(VD(t,this._ignoreSelector)||!HD(e))return;let n={timestamp:DD(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1)||(this._clicks.push(n),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=DD(e)}registerScroll(e=Date.now()){this._lastScroll=DD(e)}registerClick(e){let t=AD(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){let e=[],t=UD();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)});for(let t of e){let e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){let t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,i=!n&&!r,{clickCount:a,clickBreadcrumb:o}=e;if(i){let n=Math.min(e.mutationAfter||this._timeout,this._timeout)*1e3,r=n<this._timeout*1e3?`mutation`:`timeout`,i={type:`default`,message:o.message,timestamp:o.timestamp,category:`ui.slowClickDetected`,data:{...o.data,url:q.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:a||1}};this._addBreadcrumbEvent(t,i);return}if(a>1){let e={type:`default`,message:o.message,timestamp:o.timestamp,category:`ui.multiClick`,data:{...o.data,url:q.location.href,route:t.getCurrentRoute(),clickCount:a,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Kx(()=>this._checkClicks(),1e3)}},BD=[`A`,`BUTTON`,`INPUT`];function VD(e,t){return!!(!BD.includes(e.tagName)||e.tagName===`INPUT`&&![`submit`,`button`].includes(e.getAttribute(`type`)||``)||e.tagName===`A`&&(e.hasAttribute(`download`)||e.hasAttribute(`target`)&&e.getAttribute(`target`)!==`_self`)||t&&e.matches(t))}function HD(e){return!!(e.data&&typeof e.data.nodeId==`number`&&e.timestamp)}function UD(){return Date.now()/1e3}function WD(e,t){try{if(!GD(t))return;let{source:n}=t.data;if(LD.has(n)&&e.registerMutation(t.timestamp),n===X.Scroll&&e.registerScroll(t.timestamp),KD(t)){let{type:n,id:r}=t.data,i=bD.mirror.getNode(r);i instanceof HTMLElement&&n===bE.Click&&e.registerClick(i)}}catch{}}function GD(e){return e.type===wD}function KD(e){return e.data.source===X.MouseInteraction}function qD(e){return{timestamp:Date.now()/1e3,type:`default`,...e}}var JD=(e=>(e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`,e))(JD||{}),YD=new Set([`id`,`class`,`aria-label`,`role`,`name`,`alt`,`title`,`data-test-id`,`data-testid`,`disabled`,`aria-disabled`,`data-sentry-component`]);function XD(e){let t={};!e[`data-sentry-component`]&&e[`data-sentry-element`]&&(e[`data-sentry-component`]=e[`data-sentry-element`]);for(let n in e)if(YD.has(n)){let r=n;(n===`data-testid`||n===`data-test-id`)&&(r=`testId`),t[r]=e[n]}return t}var ZD=e=>t=>{if(!e.isEnabled())return;let n=$D(t);if(!n)return;let r=t.name===`click`,i=r?t.event:void 0;r&&e.clickDetector&&i?.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&RD(e.clickDetector,n,jD(t.event)),OD(e,n)};function QD(e,t){let n=bD.mirror.getId(e),r=n&&bD.mirror.getNode(n),i=r&&bD.mirror.getMeta(r),a=i&&tO(i)?i:null;return{message:t,data:a?{nodeId:n,node:{id:n,tagName:a.tagName,textContent:Array.from(a.childNodes).map(e=>e.type===JD.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(``),attributes:XD(a.attributes)}}:{}}}function $D(e){let{target:t,message:n}=eO(e);return qD({category:`ui.${e.name}`,...QD(t,n)})}function eO(e){let t=e.name===`click`,n,r=null;try{r=t?jD(e.event):MD(e.event),n=yb(r,{maxStringLength:200})||`<unknown>`}catch{n=`<unknown>`}return{target:r,message:n}}function tO(e){return e.type===JD.Element}function nO(e,t){if(!e.isEnabled())return;e.updateUserActivity();let n=rO(t);n&&OD(e,n)}function rO(e){let{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:a,target:o}=e;if(!o||iO(o)||!a)return null;let s=t||r||i,c=a.length===1;if(!s&&c)return null;let l=yb(o,{maxStringLength:200})||`<unknown>`;return qD({category:`ui.keyDown`,message:l,data:{...QD(o,l).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:a}})}function iO(e){return e.tagName===`INPUT`||e.tagName===`TEXTAREA`||e.isContentEditable}var aO={resource:fO,paint:uO,navigation:dO};function oO(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function sO(e){return e.map(cO).filter(Boolean)}function cO(e){let t=aO[e.entryType];return t?t(e):null}function lO(e){return((Dt()||q.performance.timeOrigin)+e)/1e3}function uO(e){let{duration:t,entryType:n,name:r,startTime:i}=e,a=lO(i);return{type:n,name:r,start:a,end:a+t,data:void 0}}function dO(e){let{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:a,encodedBodySize:o,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:f,startTime:p,transferSize:m,type:h}=e;return i===0?null:{type:`${t}.${h}`,start:lO(p),end:lO(a),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:o,duration:i,domInteractive:l,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:a,redirectCount:f}}}function fO(e){let{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:a,decodedBodySize:o,encodedBodySize:s,responseStatus:c,transferSize:l}=e;return[`fetch`,`xmlhttprequest`].includes(n)?null:{type:`${t}.${n}`,start:lO(a),end:lO(i),name:r,data:{size:l,statusCode:c,decodedBodySize:o,encodedBodySize:s}}}function pO(e){let t=e.entries[e.entries.length-1];return _O(e,`largest-contentful-paint`,t?.element?[t.element]:void 0)}function mO(e){return e.sources!==void 0}function hO(e){let t=[],n=[];for(let r of e.entries)if(mO(r)){let e=[];for(let t of r.sources)if(t.node){n.push(t.node);let r=bD.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return _O(e,`cumulative-layout-shift`,n,t)}function gO(e){let t=e.entries[e.entries.length-1];return _O(e,`interaction-to-next-paint`,t?.target?[t.target]:void 0)}function _O(e,t,n,r){let i=e.value,a=e.rating,o=lO(i);return{type:`web-vital`,name:t,start:o,end:o,data:{value:i,size:i,rating:a,nodeIds:n?n.map(e=>bD.mirror.getId(e)):void 0,attributions:r}}}function vO(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}let r=[];return[`navigation`,`paint`,`resource`].forEach(e=>{r.push(ab(e,n))}),r.push(nb(oO(pO,e)),tb(oO(hO,e)),ib(oO(gO,e))),()=>{r.forEach(e=>e())}}var Q=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,yO=`var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});`;function bO(){let e=new Blob([yO]);return URL.createObjectURL(e)}var xO=[`log`,`warn`,`error`],SO=`[Replay] `;function CO(e,t=`info`){ul({category:`console`,data:{logger:`replay`},level:t,message:`${SO}${e}`},{level:t})}function wO(){let e=!1,t=!1,n={exception:()=>void 0,infoTick:()=>void 0,setConfig:n=>{e=!!n.captureExceptions,t=!!n.traceInternals}};return Q?(xO.forEach(e=>{n[e]=(...n)=>{x[e](SO,...n),t&&CO(n.join(``),Gl(e))}}),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),x.error(SO,r),e?L(r,{mechanism:{handled:!0,type:`auto.function.replay.debug`}}):t&&CO(r,`error`)},n.infoTick=(...e)=>{x.log(SO,...e),t&&setTimeout(()=>CO(e[0]),0)}):xO.forEach(e=>{n[e]=()=>void 0}),n}var $=wO(),TO=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Tw}.`)}},EO=class{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return`sync`}destroy(){this.events=[]}async addEvent(e){let t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>Tw)throw new TO;this.events.push(e)}finish(){return new Promise(e=>{let t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=null;for(let{timestamp:t}of this.events)(e===null||t<e)&&(e=t);return e===null?e:ED(e)}},DO=class{constructor(e){this._onMessage=({data:e})=>{let t=e;if(typeof t.id!=`number`)return;let n=this._pending.get(t.id);if(!(!n||n.method!==t.method)){if(this._pending.delete(t.id),!t.success){Q&&$.error(`Error in compression worker: `,t.response),n.reject(Error(`Error in compression worker`));return}n.resolve(t.response)}},this._worker=e,this._id=0,this._pending=new Map,this._worker.addEventListener(`message`,this._onMessage)}ensureReady(){return this._ensureReadyPromise||=new Promise((e,t)=>{this._worker.addEventListener(`message`,({data:n})=>{n.success?e():(Q&&$.warn(`Received worker message with unsuccessful status`,n),t(Error(`Received worker message with unsuccessful status`)))},{once:!0}),this._worker.addEventListener(`error`,e=>{Q&&$.warn(`Failed to load Replay compression worker`,e),t(Error(`Failed to load Replay compression worker: ${e instanceof ErrorEvent&&e.message?e.message:`Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load.`}`))},{once:!0})}),this._ensureReadyPromise}destroy(){Q&&$.log(`Destroying compression worker`),this._worker.removeEventListener(`message`,this._onMessage),this._pending.forEach(e=>e.reject(Error(`Worker destroyed`))),this._pending.clear(),this._worker.terminate()}postMessage(e,t){let n=this._getAndIncrementId();return new Promise((r,i)=>{this._pending.set(n,{method:e,resolve:r,reject:i});try{this._worker.postMessage({id:n,method:e,arg:t})}catch(e){this._pending.delete(n),i(e)}})}_getAndIncrementId(){return this._id++}},OO=class{constructor(e){this._worker=new DO(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return`worker`}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){let t=ED(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);let n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>Tw?Promise.reject(new TO):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage(`clear`).then(null,e=>{Q&&$.exception(e,`Sending "clear" message to worker failed`,e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage(`addEvent`,e)}async _finishRequest(){let e=await this._worker.postMessage(`finish`);return this._earliestTimestamp=null,this._totalSize=0,e}},kO=class{constructor(e){this._fallback=new EO,this._compression=new OO(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){Q&&$.exception(e,`Failed to load the compression worker, falling back to simple buffer`);return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(let t of e)r.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(e){Q&&$.exception(e,`Failed to add events when switching buffers.`)}}};function AO({useCompression:e,workerUrl:t}){if(e&&window.Worker){let e=jO(t);if(e)return e}return Q&&$.log(`Using simple buffer`),new EO}function jO(e){try{let t=e||MO();return t?(Q&&$.log(`Using compression worker${e?` from ${e}`:``}`),new kO(new Worker(t))):void 0}catch(e){Q&&$.exception(e,`Failed to create compression worker`)}}function MO(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>`u`||!__SENTRY_EXCLUDE_REPLAY_WORKER__?bO():``}function NO(){try{return`sessionStorage`in q&&!!q.sessionStorage}catch{return!1}}function PO(e){FO(),e.session=void 0}function FO(){if(NO())try{q.sessionStorage.removeItem(dw)}catch{}}function IO(e){return e!==void 0&&Math.random()<e}function LO(e){if(NO())try{q.sessionStorage.setItem(dw,JSON.stringify(e))}catch{}}function RO(e){let t=Date.now();return{id:e.id||pt(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId,dirty:e.dirty||!1}}function zO(e,t){return IO(e)?`session`:t?`buffer`:!1}function BO({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){let i=RO({sampled:zO(e,t),previousSessionId:r});return n&&LO(i),i}function VO(){if(!NO())return null;try{let e=q.sessionStorage.getItem(dw);if(!e)return null;let t=JSON.parse(e);return Q&&$.infoTick(`Loading existing session`),RO(t)}catch{return null}}function HO(e,t,n=+new Date){return e===null||t===void 0||t<0||t!==0&&e+t<=n}function UO(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return HO(e.started,t,r)||HO(e.lastActivity,n,r)}function WO(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!UO(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled===`buffer`&&e.segmentId===0)}function GO({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){let i=r.stickySession&&VO();return i?WO(i,{sessionIdleExpire:e,maxReplayDuration:t})?(Q&&$.infoTick(`Session in sessionStorage is expired, creating new one...`),BO(r,{previousSessionId:i.id})):i:(Q&&$.infoTick(`Creating new session`),BO(r,{previousSessionId:n}))}function KO(e){return e.type===Y.Custom}function qO(e,t,n){return XO(e,t)?(YO(e,t,n),!0):!1}function JO(e,t,n){return XO(e,t)?YO(e,t,n):Promise.resolve(null)}async function YO(e,t,n){let{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;let i=e.recordingMode===`buffer`;try{n&&i&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);let a=ZO(t,e.getOptions().beforeAddRecordingEvent);return a?await r.addEvent(a):void 0}catch(t){if(!e.isEnabled())return e.handleException(t),null;let n=t&&t instanceof TO,a=n?`eventBufferOverflow`:`eventBufferError`,o=j();if(o){let e=n?`buffer_overflow`:`internal_sdk_error`;o.recordDroppedEvent(e,`replay`)}if(n&&i)return r.clear(),r.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:a})}}function XO(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let n=ED(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(Q&&$.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function ZO(e,t){try{if(typeof t==`function`&&KO(e))return t(e)}catch(e){return Q&&$.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}var QO=100;function $O(e,t,n){let r=e.getContext();t&&r.traceIds.size<QO&&r.traceIds.add(t),n&&r.segmentNames.size<QO&&r.segmentNames.add(n)}function ek(e){return t=>{e.isEnabled()&&$O(e,t.trace_id,t.name||void 0)}}function tk(e){return!e.type}function nk(e){return e.type===`transaction`}function rk(e){return e.type===`replay_event`}function ik(e){return e.type===`feedback`}function ak(e){return(t,n)=>{if(!e.isEnabled()||!tk(t)&&!nk(t))return;let r=n.statusCode;if(!(!r||r<200||r>=300)){if(nk(t)){ok(e,t);return}sk(e,t)}}}function ok(e,t){$O(e,t.contexts?.trace?.trace_id,t.transaction)}function sk(e,t){let n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!==`buffer`||!t.tags?.replayId)return;let{beforeErrorSampling:r}=e.getOptions();typeof r==`function`&&!r(t)||Kx(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}})}function ck(e){return t=>{!e.isEnabled()||!tk(t)||lk(e,t)}}function lk(e,t){let n=t.exception?.values?.[0]?.value;typeof n==`string`&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))&&OD(e,qD({category:`replay.hydrate-error`,data:{url:Ph()}}))}function uk(e){let t=j();t&&t.on(`beforeAddBreadcrumb`,t=>dk(e,t))}function dk(e,t){if(!e.isEnabled()||!mk(t))return;let n=fk(t);n&&OD(e,n)}function fk(e){return!mk(e)||[`fetch`,`xhr`,`sentry.event`,`sentry.transaction`].includes(e.category)||e.category.startsWith(`ui.`)?null:e.category===`console`?pk(e):qD(e)}function pk(e){let t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return qD(e);let n=!1,r=t.map(e=>{if(!e)return e;if(typeof e==`string`)return e.length>Sw?(n=!0,`${e.slice(0,Sw)}\u2026`):e;if(typeof e==`object`)try{let t=Ze(e,7);return JSON.stringify(t).length>Sw?(n=!0,`${JSON.stringify(t,null,2).slice(0,Sw)}\u2026`):t}catch{}return e});return qD({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:[`CONSOLE_ARG_TRUNCATED`]}}:{}}})}function mk(e){return!!e.category}function hk(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function gk(){let e=k().getPropagationContext().dsc;e&&delete e.replay_id;let t=zr();if(t){let e=gi(t);delete e.replay_id}}function _k(e){let t=k().getPropagationContext().dsc;t&&(t.replay_id=e);let n=zr();if(n){let t=gi(n);t.replay_id=e}}function vk(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:Y.Custom,timestamp:t.timestamp*1e3,data:{tag:`breadcrumb`,payload:{timestamp:t.timestamp,type:`default`,category:`sentry.feedback`,data:{feedbackId:t.event_id}}}}),!1):!0)}function yk(e,t){return e.recordingMode!==`buffer`||t.message===pw||!t.exception||t.type?!1:IO(e.getOptions().errorSampleRate)}function bk(e){return Object.assign((t,n)=>{if(e.session&&WO(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&gk(),!e.isEnabled()||e.isPaused())return t;if(rk(t))return delete t.breadcrumbs,t;if(!tk(t)&&!nk(t)&&!ik(t))return t;if(!e.checkAndHandleExpiredSession())return gk(),t;if(ik(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),vk(e,t),t;if(hk(t,n)&&!e.getOptions()._experiments.captureExceptions)return Q&&$.log(`Ignoring error from rrweb internals`,t),null;let r=yk(e,t);if((r||e.recordingMode===`session`)&&(t.tags={...t.tags,replayId:e.getSessionId()}),r&&e.recordingMode===`buffer`&&e.session?.sampled===`buffer`){let t=e.session;t.dirty=!0,e.getOptions().stickySession&&LO(t)}return t},{id:`Replay`})}function xk(e,t){return t.map(({type:t,start:n,end:r,name:i,data:a})=>{let o=e.throttledAddEvent({type:Y.Custom,timestamp:n,data:{tag:`performanceSpan`,payload:{op:t,description:i,startTimestamp:n,endTimestamp:r,data:a}}});return typeof o==`string`?Promise.resolve(null):o})}function Sk(e){let{from:t,to:n}=e,r=Date.now()/1e3;return{type:`navigation.push`,start:r,end:r,name:n,data:{previous:t}}}function Ck(e){return t=>{if(!e.isEnabled())return;let n=Sk(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(xk(e,[n]),!1)))}}function wk(e,t){return Q&&e.getOptions()._experiments.traceInternals?!1:Zc(t,j())}function Tk(e,t){e.isEnabled()&&t!==null&&(wk(e,t.name)||e.addUpdate(()=>(xk(e,[t]),!0)))}function Ek(e){if(!e)return;let t=new TextEncoder;try{if(typeof e==`string`)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){let n=Qx(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function Dk(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function Ok(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let n={...e._meta};return n.warnings=[...n.warnings||[],t],e._meta=n,e}function kk(e,t){if(!t)return null;let{startTimestamp:n,endTimestamp:r,url:i,method:a,statusCode:o,request:s,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:{method:a,statusCode:o,request:s,response:c}}}function Ak(e){return{headers:{},size:e,_meta:{warnings:[`URL_SKIPPED`]}}}function jk(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};let r={headers:e,size:t},{body:i,warnings:a}=Nk(n);return r.body=i,a?.length&&(r._meta={warnings:a}),r}function Mk(e,t){return Object.entries(e).reduce((n,[r,i])=>{let a=r.toLowerCase();return t.includes(a)&&e[r]&&(n[a]=i),n},{})}function Nk(e){if(!e||typeof e!=`string`)return{body:e};let t=e.length>xw,n=Pk(e);if(t){let t=e.slice(0,xw);return n?{body:t,warnings:[`MAYBE_JSON_TRUNCATED`]}:{body:`${t}\u2026`,warnings:[`TEXT_TRUNCATED`]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function Pk(e){let t=e[0],n=e[e.length-1];return t===`[`&&n===`]`||t===`{`&&n===`}`}function Fk(e,t){return lt(Ik(e),t)}function Ik(e,t=q.document.baseURI){if(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(q.location.origin))return e;let n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;let r=n.href;return!e.endsWith(`/`)&&r.endsWith(`/`)?r.slice(0,-1):r}async function Lk(e,t,n){try{let r=kk(`resource.fetch`,await zk(e,t,n));Tk(n.replay,r)}catch(e){Q&&$.exception(e,`Failed to capture fetch breadcrumb`)}}function Rk(e,t){let{input:n,response:r}=t,i=Ek(n?eS(n):void 0),a=r?Dk(r.headers.get(`content-length`)):void 0;i!==void 0&&(e.data.request_body_size=i),a!==void 0&&(e.data.response_body_size=a)}async function zk(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:a=r}=t,{url:o,method:s,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,d=Fk(o,n.networkDetailAllowUrls)&&!Fk(o,n.networkDetailDenyUrls);return{startTimestamp:i,endTimestamp:a,url:o,method:s,statusCode:c,request:d?Bk(n,t.input,l):Ak(l),response:await Vk(d,n,t.response,u)}}function Bk({networkCaptureBodies:e,networkRequestHeaders:t},n,r){let i=n?Gk(n,t):{};if(!e)return jk(i,r,void 0);let[a,o]=$x(eS(n),$),s=jk(i,r,a);return o?Ok(s,o):s}async function Vk(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&i!==void 0)return Ak(i);let a=r?Wk(r.headers,n):{};if(!r||!t&&i!==void 0)return jk(a,i,void 0);let[o,s]=await Uk(r),c=Hk(o,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:a});return s?Ok(c,s):c}function Hk(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{let a=e?.length&&n===void 0?Ek(e):n;return r?t?jk(i,a,e):jk(i,a,void 0):Ak(a)}catch(e){return Q&&$.exception(e,`Failed to serialize response body`),jk(i,n,void 0)}}async function Uk(e){let t=qk(e);if(!t)return[void 0,`BODY_PARSE_ERROR`];try{return[await Jk(t)]}catch(e){return e instanceof Error&&e.message.indexOf(`Timeout`)>-1?(Q&&$.warn(`Parsing text body from response timed out`),[void 0,`BODY_PARSE_TIMEOUT`]):(Q&&$.exception(e,`Failed to get text body from response`),[void 0,`BODY_PARSE_ERROR`])}}function Wk(e,t){let n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function Gk(e,t){return e.length===1&&typeof e[0]!=`string`?Kk(e[0],t):e.length===2?Kk(e[1],t):{}}function Kk(e,t){if(!e)return{};let n=e.headers;return n?n instanceof Headers?Wk(n,t):Array.isArray(n)?{}:Mk(n,t):{}}function qk(e){try{return e.clone()}catch(e){Q&&$.exception(e,`Failed to clone response body`)}}function Jk(e){return new Promise((t,n)=>{let r=Kx(()=>n(Error(`Timeout while trying to read response body`)),500);Yk(e).then(e=>t(e),e=>n(e)).finally(()=>clearTimeout(r))})}async function Yk(e){return await e.text()}async function Xk(e,t,n){try{let r=kk(`resource.xhr`,Qk(e,t,n));Tk(n.replay,r)}catch(e){Q&&$.exception(e,`Failed to capture xhr breadcrumb`)}}function Zk(e,t){let{xhr:n,input:r}=t;if(!n)return;let i=Ek(r),a=n.getResponseHeader(`content-length`)?Dk(n.getResponseHeader(`content-length`)):tA(n.response,n.responseType);i!==void 0&&(e.data.request_body_size=i),a!==void 0&&(e.data.response_body_size=a)}function Qk(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:a=r,input:o,xhr:s}=t,{url:c,method:l,status_code:u=0,request_body_size:d,response_body_size:f}=e.data;if(!c)return null;if(!s||!Fk(c,n.networkDetailAllowUrls)||Fk(c,n.networkDetailDenyUrls))return{startTimestamp:i,endTimestamp:a,url:c,method:l,statusCode:u,request:Ak(d),response:Ak(f)};let p=s[qx],m=p?Mk(p.request_headers,n.networkRequestHeaders):{},h=Mk(tS(s),n.networkResponseHeaders),[g,_]=n.networkCaptureBodies?$x(o,$):[void 0],[v,y]=n.networkCaptureBodies?$k(s):[void 0],b=jk(m,d,g),x=jk(h,f,v);return{startTimestamp:i,endTimestamp:a,url:c,method:l,statusCode:u,request:_?Ok(b,_):b,response:y?Ok(x,y):x}}function $k(e){let t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return eA(e.response,e.responseType)}catch(e){t.push(e)}return Q&&$.warn(`Failed to get xhr response body`,...t),[void 0]}function eA(e,t){try{if(typeof e==`string`)return[e];if(e instanceof Document)return[e.body.outerHTML];if(t===`json`&&De(e))return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return Q&&$.exception(t,`Failed to serialize body`,e),[void 0,`BODY_PARSE_ERROR`]}return Q&&$.log(`Skipping network body because of body type`,e),[void 0,`UNPARSEABLE_BODY_TYPE`]}function tA(e,t){try{return Ek(t===`json`&&De(e)?JSON.stringify(e):e)}catch{return}}function nA(e){let t=j();try{let{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:a,networkResponseHeaders:o}=e.getOptions(),s={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:a,networkResponseHeaders:o};t&&t.on(`beforeAddBreadcrumb`,(e,t)=>rA(s,e,t))}catch{}}function rA(e,t,n){if(t.data)try{iA(t)&&oA(n)&&(Zk(t,n),Xk(t,n,e)),aA(t)&&sA(n)&&(Rk(t,n),Lk(t,n,e))}catch(e){Q&&$.exception(e,`Error when enriching network breadcrumb`)}}function iA(e){return e.category===`xhr`}function aA(e){return e.category===`fetch`}function oA(e){return e?.xhr}function sA(e){return e?.input!==void 0}function cA(e){let t=j();Nx(ZD(e)),Bx(Ck(e)),uk(e),nA(e),Ko(bk(e)),t&&(t.on(`beforeSendEvent`,ck(e)),t.on(`afterSendEvent`,ak(e)),t.on(`createDsc`,t=>{let n=e.getSessionId();n&&e.isEnabled()&&e.recordingMode===`session`&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)}),t.on(`processSegmentSpan`,ek(e)),t.on(`spanStart`,t=>{e.lastActiveSpan=t}),t.on(`spanEnd`,t=>{e.lastActiveSpan=t}),t.on(`beforeSendFeedback`,async(t,n)=>{let r=e.getSessionId();n?.includeReplay&&e.isEnabled()&&r&&t.contexts?.feedback&&(t.contexts.feedback.source===`api`&&await e.sendBufferedReplayOrFlush(),t.contexts.feedback.replay_id=r)}),t.on(`openFeedbackWidget`,async()=>{await e.sendBufferedReplayOrFlush()}))}async function lA(e){try{return Promise.all(xk(e,[uA(q.performance.memory)]))}catch{return[]}}function uA(e){let{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:`memory`,name:`memory`,start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function dA(e,t,n){return Oa(e,t,{...n,setTimeoutImpl:Kx})}var fA=i.navigator;function pA(){return/iPhone|iPad|iPod/i.test(fA?.userAgent??``)||/Macintosh/i.test(fA?.userAgent??``)&&fA?.maxTouchPoints&&fA?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function mA(e){let t=!1;return(n,r)=>{try{if(!e.checkAndHandleExpiredSession()){Q&&$.warn(`Received replay event after session expired.`);return}let i=r||!t;t=!0,hA(n),e.clickDetector&&WD(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode===`buffer`&&i&&e.setInitialState(),!qO(e,n,i))return!0;if(!i)return!1;let t=e.session;if(_A(e,i),e.recordingMode===`buffer`&&t&&e.eventBuffer&&!t.dirty){let n=e.eventBuffer.getEarliestTimestamp();n&&(Q&&$.log(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&LO(t))}return t?.previousSessionId||e.recordingMode===`session`&&e.flush(),!0})}catch(t){e.handleException(t)}}}function hA(e){let t=e.data;if(!(e.type!==Y.IncrementalSnapshot||!t||typeof t!=`object`||!(`source`in t)||t.source!==X.Mutation||!(`attributes`in t)||!Array.isArray(t.attributes)))for(let e of t.attributes){let t=bD.mirror.getNode(e.id),n=t&&bD.mirror.getMeta(t);if(n?.type===JD.Element)for(let[t,r]of Object.entries(e.attributes))r===null?delete n.attributes[t]:n.attributes[t]=r}}function gA(e){let t=e.getOptions();return{type:Y.Custom,timestamp:Date.now(),data:{tag:`options`,payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type===`worker`:!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function _A(e,t){!t||e.session?.segmentId!==0||qO(e,gA(e),!1)}function vA(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function yA(e,t,n,r){return bi(Fi(e,Pi(e),r,n),[[{type:`replay_event`},e],[{type:`replay_recording`,length:typeof t==`string`?new TextEncoder().encode(t).length:t.length},t]])}function bA({recordingData:e,headers:t}){let n,r=`${JSON.stringify(t)}
|
|
497
|
-
`;if(typeof e==`string`)n=`${r}${e}`;else{let t=new TextEncoder().encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}async function xA({client:e,scope:t,replayId:n,event:r}){let i={event_id:n,integrations:typeof e._integrations==`object`&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0};e.emit(`preprocessEvent`,r,i);let a=await yo(e.getOptions(),r,i,t,e,A());if(!a)return null;e.emit(`postprocessEvent`,a,i),a.platform=a.platform||`javascript`;let{name:o,version:s,settings:c}=e.getSdkMetadata()?.sdk||{};return a.sdk={...a.sdk,name:o||`sentry.javascript.unknown`,version:s||`0.0.0`,settings:c},a}async function SA({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:a}){let o=bA({recordingData:e,headers:{segment_id:n}}),{urls:s,errorIds:c,traceIds:l,segmentNames:u,initialTimestamp:d}=r,f=j(),p=k(),m=f?.getTransport(),h=f?.getDsn();if(!f||!m||!h||!a.sampled)return Promise.resolve({});let g=await xA({scope:p,client:f,replayId:t,event:{type:fw,replay_start_timestamp:d/1e3,timestamp:i/1e3,error_ids:c,trace_ids:l,segment_names:u,urls:s,replay_id:t,segment_id:n,replay_type:a.sampled}});if(!g)return f.recordDroppedEvent(`event_processor`,`replay`),Q&&$.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete g.sdkProcessingMetadata;let _=yA(g,o,h,f.getOptions().tunnel),v;try{v=await m.send(_)}catch(e){let t=Error(pw);try{t.cause=e}catch{}throw t}let y=Zs({},v);if(Xs(y,`replay`))throw new wA(y);if(typeof v.statusCode==`number`&&(v.statusCode<200||v.statusCode>=300))throw new CA(v.statusCode);return v}var CA=class extends Error{constructor(e){super(`Transport returned status code ${e}`)}},wA=class extends Error{constructor(e){super(`Rate limit hit`),this.rateLimits=e}},TA=class extends Error{constructor(){super(`Session is too long, not sending replay`)}};async function EA(e,t={count:0,interval:yw}){let{recordingData:n,onError:r}=e;if(n.length)try{return await SA(e),!0}catch(n){if(n instanceof CA||n instanceof wA)throw n;if(Mo(`Replays`,{_retryCount:t.count}),r&&r(n),t.count>=bw){let e=Error(`${pw} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise((n,r)=>{Kx(async()=>{try{await EA(e,t),n(!0)}catch(e){r(e)}},t.interval)})}}var DA=`__THROTTLED`,OA=`__SKIPPED`;function kA(e,t,n){let r=new Map,i=e=>{let t=e-n;r.forEach((e,n)=>{n<t&&r.delete(n)})},a=()=>[...r.values()].reduce((e,t)=>e+t,0),o=!1;return(...n)=>{let s=Math.floor(Date.now()/1e3);if(i(s),a()>=t){let e=o;return o=!0,e?OA:DA}o=!1;let c=r.get(s)||0;return r.set(s,c+1),e(...n)}}var AA=class{constructor({options:e,recordingOptions:t}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode=`session`,this.timeouts={sessionIdlePause:mw,sessionIdleExpire:hw},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,segmentNames:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:``},this._recordingOptions=t,this._options=e,this._debouncedFlush=dA(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=kA((e,t)=>JO(this,e,t),300,5);let{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),i=n?{threshold:Math.min(Cw,n),timeout:n,scrollTimeout:ww,ignoreSelector:r?r.join(`,`):``}:void 0;if(i&&(this.clickDetector=new zD(this,i)),Q){let t=e._experiments;$.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}this._handleVisibilityChange=()=>{q.document.visibilityState===`visible`?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{let e=qD({category:`ui.blur`});this._doChangeToBackgroundTasks(e)},this._handleWindowFocus=()=>{let e=qD({category:`ui.focus`});this._doChangeToForegroundTasks(e)},this._handleKeyboardEvent=e=>{nO(this,e)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){Q&&$.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){let{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;if(this._requiresManualStart=r,!r){if(this._initializeSessionForSampling(e),!this.session){Q&&$.exception(Error(`Unable to initialize and create session`));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled===`buffer`&&this.session.segmentId===0?`buffer`:`session`,Q&&$.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode===`session`){Q&&$.log(`Recording is already in progress`);return}if(this._isEnabled&&this.recordingMode===`buffer`){Q&&$.log("Buffering is in progress, call `flush()` to save the replay");return}Q&&$.infoTick(`Starting replay in session mode`),this._updateUserActivity();let e=GO({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this.recordingMode=`session`,this._initializeRecording()}startBuffering(){if(this._isEnabled){Q&&$.log("Buffering is in progress, call `flush()` to save the replay");return}Q&&$.infoTick(`Starting replay in buffer mode`);let e=GO({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode=`buffer`,this._initializeRecording()}startRecording(){try{let e=this._canvas;this._stopRecording=bD({...this._recordingOptions,...this.recordingMode===`buffer`?{checkoutEveryNms:vw}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:mA(this),...pA(),onMutation:this._onMutationHandler.bind(this),...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&=(this._stopRecording(),void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode=`buffer`;let n=t??`manual`;j()?.emit(`replayEnd`,{sessionId:this.session?.id,reason:n});try{Q&&$.log(`Stopping Replay triggered by ${n}`),gk(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,PO(this)}catch(e){this.handleException(e)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Q&&$.log(`Pausing replay`))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),Q&&$.log(`Resuming replay`))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if(this.recordingMode===`session`)return this.flushImmediate();let t=Date.now();Q&&$.log(`Converting buffer to session`),await this.flushImmediate();let n=this.stopRecording();!e||!n||this.recordingMode!==`session`&&(this.recordingMode=`session`,this.session&&(this.session.dirty=!1,this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession(),_k(this.session.id)),this.startRecording())}addUpdate(e){let t=e();this.recordingMode===`buffer`||!this._isEnabled||t!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode===`buffer`?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(e){if(!(e&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&HO(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled===`session`){this.pause();return}return!!this._checkSession()}setInitialState(){let e=`${q.location.pathname}${q.location.hash}${q.location.search}`,t=`${q.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){let n=this._throttledAddEvent(e,t);if(n===DA){let e=qD({category:`replay.throttled`});this.addUpdate(()=>!qO(this,{type:TD,timestamp:e.timestamp||0,data:{tag:`breadcrumb`,payload:e,metric:!0}}))}return n}getCurrentRoute(){let e=this.lastActiveSpan||zr(),t=e&&I(e),n=(t&&F(t).data||{})[M];if(!(!t||!n||![`route`,`custom`].includes(n)))return F(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=AO({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&j()?.emit(`replayStart`,{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),this.recordingMode===`session`&&this.session&&_k(this.session.id)}_initializeSessionForSampling(e){let t=this._options.errorSampleRate>0,n=GO({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;let e=this.session;return WO(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(e),!1):!0}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:`sessionExpired`}),this.initializeSampling(e.id))}_addListeners(){try{q.document.addEventListener(`visibilitychange`,this._handleVisibilityChange),q.addEventListener(`blur`,this._handleWindowBlur),q.addEventListener(`focus`,this._handleWindowFocus),q.addEventListener(`keydown`,this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||=(cA(this),!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=vO(this)}_removeListeners(){try{q.document.removeEventListener(`visibilitychange`,this._handleVisibilityChange),q.removeEventListener(`blur`,this._handleWindowBlur),q.removeEventListener(`focus`,this._handleWindowFocus),q.removeEventListener(`keydown`,this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}_doChangeToBackgroundTasks(e){if(this.session){if(WO(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){gk();return}e&&this._createCustomBreadcrumb(e),this.conditionalFlush()}}_doChangeToForegroundTasks(e){if(this.session){if(!this.checkAndHandleExpiredSession()){Q&&$.log(`Document has become active, but session has expired`);return}e&&this._createCustomBreadcrumb(e)}}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:Y.Custom,timestamp:e.timestamp||0,data:{tag:`breadcrumb`,payload:e}})})}_addPerformanceEntries(){let e=sO(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){let t=this._context.initialTimestamp/1e3;e=e.filter(e=>e.start>=t)}return Promise.all(xk(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.segmentNames.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart||e.segmentId)return;let n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){let e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),segmentNames:Array.from(this._context.segmentNames),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){let e=this.getSessionId();if(!this.session||!this.eventBuffer||!e){Q&&$.error(`No session or eventBuffer found to flush.`);return}if(await this._addPerformanceEntries(),this.eventBuffer?.hasEvents&&(await lA(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new TA;let n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession(),await EA({replayId:e,recordingData:await this.eventBuffer.finish(),segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:`sendError`});let t=j();if(t){let n;n=e instanceof wA?`ratelimit_backoff`:e instanceof TA?`invalid`:`send_error`,t.recordDroppedEvent(n,`replay`)}}}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession()){Q&&$.error(`Attempting to finish replay event after session expired.`);return}if(!this.session)return;let t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();let r=n<this._options.minReplayDuration,i=n>this._options.maxReplayDuration+5e3;if(r||i){Q&&$.log(`Session duration (${Math.floor(n/1e3)}s) is too ${r?`short`:`long`}, not sending replay.`),r&&this._debouncedFlush();return}let a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&Q&&$.log(`Flushing initial segment without checkout.`);let o=!!this._flushLock;this._flushLock||=this._runFlush();try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,o&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&LO(this.session)}_onMutationHandler(e){let{ignoreMutations:t}=this._options._experiments;if(t?.length&&e.some(e=>{let n=vA(e.target),r=t.join(`,`);return n?.matches(r)}))return!1;let n=e.length,r=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,a=r&&n>r;if(n>i||a){let e=qD({category:`replay.mutations`,data:{count:n,limit:a}});this._createCustomBreadcrumb(e)}return a?(this.stop({reason:`mutationLimit`,forceFlush:this.recordingMode===`session`}),!1):!0}};function jA(e,t){return[...e,...t].join(`,`)}function MA({mask:e,unmask:t,block:n,unblock:r,ignore:i}){return{maskTextSelector:jA(e,[`.sentry-mask`,`[data-sentry-mask]`]),unmaskTextSelector:jA(t,[]),blockSelector:jA(n,[`.sentry-block`,`[data-sentry-block]`,`base`,`iframe[srcdoc]:not([src])`]),unblockSelector:jA(r,[]),ignoreSelector:jA(i,[`.sentry-ignore`,`[data-sentry-ignore]`,`input[type="file"]`])}}function NA({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:a}){if(i.unmaskTextSelector&&e.matches(i.unmaskTextSelector))return a;let o=n.includes(t),s=r&&t===`value`&&e.tagName===`INPUT`&&[`submit`,`button`].includes(e.getAttribute(`type`)||``);return o||s?a.replace(/[\S]/g,`*`):a}var PA=`img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]`,FA=[`content-length`,`content-type`,`accept`],IA=Symbol.for(`sentry__originalRequestBody`),LA=!1,RA=!1;function zA(){if(typeof Request>`u`||RA)return;let e=Request;try{let t=function(t,n){let r=new e(t,n);return n?.body!=null&&(r[IA]=n.body),r};t.prototype=e.prototype,i.Request=t,RA=!0}catch{}}var BA=(e=>new VA(e)),VA=class{constructor({flushMinDelay:e=gw,flushMaxDelay:t=_w,minReplayDuration:n=Ew,maxReplayDuration:r=Ow,stickySession:i=!0,useCompression:a=!0,workerUrl:o,_experiments:s={},maskAllText:c=!0,maskAllInputs:l=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:d=750,mutationLimit:f=1e4,slowClickTimeout:p=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:h=[],networkDetailDenyUrls:g=[],networkCaptureBodies:_=!0,networkRequestHeaders:v=[],networkResponseHeaders:y=[],mask:b=[],maskAttributes:x=[`title`,`placeholder`,`aria-label`],unmask:S=[],block:C=[],unblock:w=[],ignore:T=[],maskFn:ee,beforeAddRecordingEvent:te,beforeErrorSampling:ne,onError:re,attachRawBodyFromRequest:ie=!1}={}){this.name=`Replay`;let ae=MA({mask:b,unmask:S,block:C,unblock:w,ignore:T});if(this._recordingOptions={maskAllInputs:l,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:ee,maskInputFn:ee,maskAttributeFn:(e,t,n)=>NA({maskAttributes:x,maskAllText:c,privacyOptions:ae,key:e,value:t,el:n}),...ae,slimDOMOptions:`all`,inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!s.recordCrossOriginIframes},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,Dw),maxReplayDuration:Math.min(r,Ow),stickySession:i,useCompression:a,workerUrl:o,blockAllMedia:u,maskAllInputs:l,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:f,slowClickTimeout:p,slowClickIgnoreSelectors:m,networkDetailAllowUrls:h,networkDetailDenyUrls:g,networkCaptureBodies:_,networkRequestHeaders:UA(v),networkResponseHeaders:UA(y),beforeAddRecordingEvent:te,beforeErrorSampling:ne,onError:re,attachRawBodyFromRequest:ie,_experiments:s},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${PA}`:PA,this._recordingOptions.ignoreCSSAttributes=new Set([`background-image`])),this._isInitialized&&ys())throw Error(`Multiple Sentry Session Replay instances are not supported`);this._isInitialized=!0}get _isInitialized(){return LA}set _isInitialized(e){LA=e}afterAllSetup(e){!ys()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&zA(),this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode===`session`,reason:`manual`}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(e){if(this._replay?.isEnabled())return this._replay.getSessionId(e)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}processSpan(e){let t=this.getReplayId(!0);t&&(eo(e,{"sentry.replay_id":t}),this.getRecordingMode()===`buffer`&&eo(e,{"sentry._internal.replay_is_buffering":!0}))}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){let t=HA(this._initialOptions,e);this._replay=new AA({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{let t=e.getIntegrationByName(`ReplayCanvas`);if(!t)return;this._replay._canvas=t.getOptions()}catch{}}};function HA(e,t){let n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},i=sr(n.replaysSessionSampleRate),a=sr(n.replaysOnErrorSampleRate);return i==null&&a==null&&f(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(r.sessionSampleRate=i),a!=null&&(r.errorSampleRate=a),r}function UA(e){return[...FA,...e.map(e=>e.toLowerCase())]}function WA(){return j()?.getIntegrationByName(`Replay`)}var GA=Object.defineProperty,KA=(e,t,n)=>t in e?GA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qA=(e,t,n)=>KA(e,typeof t==`symbol`?t:t+``,n),JA=class{constructor(){qA(this,`idNodeMap`,new Map),qA(this,`nodeMetaMap`,new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function YA(){return new JA}function XA(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function ZA(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:ZA(e.parentNode,t,n,r+1)}function QA(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e==`string`){if(r.matches(`.${e}`))return!0}else if(XA(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}var $A=`Please stop import mirror directly. Instead of that,\r
|
|
496
|
+
or you can use record.mirror to access the mirror instance during recording.`,KT={map:{},getId(){return console.error(GT),-1},getNode(){return console.error(GT),null},removeNodeFromMap(){console.error(GT)},has(){return console.error(GT),!1},reset(){console.error(GT)}};typeof window<`u`&&window.Proxy&&window.Reflect&&(KT=new Proxy(KT,{get(e,t,n){return t===`map`&&console.error(GT),Reflect.get(e,t,n)}}));function qT(e,t,n={}){let r=null,i=0;return function(...a){let o=Date.now();!i&&n.leading===!1&&(i=o);let s=t-(o-i),c=this;s<=0||s>t?(r&&=(yE(r),null),i=o,e.apply(c,a)):!r&&n.trailing!==!1&&(r=vE(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(c,a)},s))}}function JT(e,t,n,r,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){vE(()=>{n.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>JT(e,t,a||{},!0)}function YT(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}var XT=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(XT=()=>new Date().getTime());function ZT(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset===void 0?t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0:e.pageXOffset,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset===void 0?t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0:e.pageYOffset}}function QT(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function $T(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function eE(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function tE(e,t,n,r,i){if(!e)return!1;let a=eE(e);if(!a)return!1;let o=NT(t,n);if(!i){let e=r&&a.matches(r);return o(a)&&!e}let s=MT(a,o),c=-1;return s<0?!1:(r&&(c=MT(a,NT(null,r))),s>-1&&c<0||s<c)}function nE(e,t){return t.getId(e)!==-1}function rE(e,t){return t.getId(e)===lT}function iE(e,t){if(Pw(e))return!1;let n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:!e.parentNode||iE(e.parentNode,t):!0}function aE(e){return!!e.changedTouches}function oE(e=window){`NodeList`in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),`DOMTokenList`in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw TypeError(`1 argument is required`);do if(this===t)return!0;while(t&&=t.parentNode);return!1})}function sE(e,t){return!!(e.nodeName===`IFRAME`&&t.getMeta(e))}function cE(e,t){return!!(e.nodeName===`LINK`&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute(`rel`)===`stylesheet`&&t.getMeta(e))}function lE(e){return!!e?.shadowRoot}var uE=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=t===void 0?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function dE(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function fE(e){let t=e,n;for(;n=dE(t);)t=n;return t}function pE(e){let t=e.ownerDocument;if(!t)return!1;let n=fE(e);return t.contains(n)}function mE(e){let t=e.ownerDocument;return t?t.contains(e)||pE(e):!1}var hE={};function gE(e){let t=hE[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement==`function`)try{let t=n.createElement(`iframe`);t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch{}return hE[e]=r.bind(window)}function _E(...e){return gE(`requestAnimationFrame`)(...e)}function vE(...e){return gE(`setTimeout`)(...e)}function yE(...e){return gE(`clearTimeout`)(...e)}var Y=(e=>(e[e.DomContentLoaded=0]=`DomContentLoaded`,e[e.Load=1]=`Load`,e[e.FullSnapshot=2]=`FullSnapshot`,e[e.IncrementalSnapshot=3]=`IncrementalSnapshot`,e[e.Meta=4]=`Meta`,e[e.Custom=5]=`Custom`,e[e.Plugin=6]=`Plugin`,e))(Y||{}),X=(e=>(e[e.Mutation=0]=`Mutation`,e[e.MouseMove=1]=`MouseMove`,e[e.MouseInteraction=2]=`MouseInteraction`,e[e.Scroll=3]=`Scroll`,e[e.ViewportResize=4]=`ViewportResize`,e[e.Input=5]=`Input`,e[e.TouchMove=6]=`TouchMove`,e[e.MediaInteraction=7]=`MediaInteraction`,e[e.StyleSheetRule=8]=`StyleSheetRule`,e[e.CanvasMutation=9]=`CanvasMutation`,e[e.Font=10]=`Font`,e[e.Log=11]=`Log`,e[e.Drag=12]=`Drag`,e[e.StyleDeclaration=13]=`StyleDeclaration`,e[e.Selection=14]=`Selection`,e[e.AdoptedStyleSheet=15]=`AdoptedStyleSheet`,e[e.CustomElement=16]=`CustomElement`,e))(X||{}),bE=(e=>(e[e.MouseUp=0]=`MouseUp`,e[e.MouseDown=1]=`MouseDown`,e[e.Click=2]=`Click`,e[e.ContextMenu=3]=`ContextMenu`,e[e.DblClick=4]=`DblClick`,e[e.Focus=5]=`Focus`,e[e.Blur=6]=`Blur`,e[e.TouchStart=7]=`TouchStart`,e[e.TouchMove_Departed=8]=`TouchMove_Departed`,e[e.TouchEnd=9]=`TouchEnd`,e[e.TouchCancel=10]=`TouchCancel`,e))(bE||{}),xE=(e=>(e[e.Mouse=0]=`Mouse`,e[e.Pen=1]=`Pen`,e[e.Touch=2]=`Touch`,e))(xE||{}),SE=(e=>(e[e.Play=0]=`Play`,e[e.Pause=1]=`Pause`,e[e.Seeked=2]=`Seeked`,e[e.VolumeChange=3]=`VolumeChange`,e[e.RateChange=4]=`RateChange`,e))(SE||{}),CE;function wE(e){CE=e}function TE(){CE=void 0}for(var Z=e=>CE?((...t)=>{try{return e(...t)}catch(e){if(CE&&CE(e)===!0)return()=>{};throw e}}):e,EE=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,DE=typeof Uint8Array>`u`?[]:new Uint8Array(256),OE=0;OE<EE.length;OE++)DE[EE.charCodeAt(OE)]=OE;var kE=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}};function AE(e){try{return e.contentDocument}catch{}}function jE(e){try{return e.contentWindow}catch{}}var ME=class{constructor(e){this.doc=e,this.unattachedDoc=null}parse(e){return this.parseWithConstructableStylesheet(e)||this.parseWithDetachedElement(e)}parseWithConstructableStylesheet(e){if(typeof CSSStyleSheet>`u`||typeof CSSStyleSheet.prototype.replaceSync!=`function`)return null;try{let t=new CSSStyleSheet;t.replaceSync(`x { ${e} }`);let n=t.cssRules[0];return!n||n.type!==CSSRule.STYLE_RULE?null:n.style}catch{return null}}parseWithDetachedElement(e){let t=this.getUnattachedDoc().createElement(`span`);return t.setAttribute(`style`,e),t.style}getUnattachedDoc(){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}return this.unattachedDoc}};function NE(e){return`__ln`in e}var PE=class{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw Error(`Position outside of list range`);let t=this.head;for(let n=0;n<e;n++)t=t?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&NE(e.previousSibling)){let n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&NE(e.nextSibling)&&e.nextSibling.__ln.previous){let n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},FE=(e,t)=>`${e}@${t}`,IE=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,n=new PE,r=e=>{let t=e,n=lT;for(;n===lT;)t&&=t.nextSibling,n=t&&this.mirror.getId(t);return n},i=i=>{if(!i.parentNode||!mE(i))return;let a=Pw(i.parentNode)?this.mirror.getId(dE(i)):this.mirror.getId(i.parentNode),o=r(i);if(a===-1||o===-1)return n.addNode(i);let s=HT(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{sE(e,this.mirror)&&!tE(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),cE(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),lE(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{if(tE(e,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(e,t);let n=jE(e);n&&this.canvasManager.addWindow(n),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});s&&(e.push({parentId:a,nextId:o,node:s}),t.add(s.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)RE(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||i(e);for(let e of this.addedSet)!BE(this.droppedSet,e)&&!RE(this.removes,e,this.mirror)||BE(this.movedSet,e)?i(e):this.droppedSet.add(e);let a=null;for(;n.length;){let e=null;if(a){let t=this.mirror.getId(a.value.parentNode),n=r(a.value);t!==-1&&n!==-1&&(e=a)}if(!e){let t=n.tail;for(;t;){let n=t;if(t=t.previous,n){let t=this.mirror.getId(n.value.parentNode);if(r(n.value)===-1)continue;if(t!==-1){e=n;break}else{let t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let r=t.parentNode.host;if(this.mirror.getId(r)!==-1){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}a=e.previous,n.removeNode(e.value),i(e.value)}let o={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if(typeof t.style==`string`){let n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split(`var(`).length===t.style.split(`var(`).length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};!o.texts.length&&!o.attributes.length&&!o.removes.length&&!o.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(o))},this.processMutation=e=>{if(!rE(e.target,this.mirror))switch(e.type){case`characterData`:{let t=e.target.textContent;!tE(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:PT(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,eE(e.target)):t.replace(/[\S]/g,`*`):t,node:e.target});break}case`attributes`:{let t=e.target,n=e.attributeName,r=e.target.getAttribute(n);if(n===`value`){let n=Qw(t),i=t.tagName;r=$w(t,i,n);let a=Kw({maskInputOptions:this.maskInputOptions,tagName:i,type:n});r=qw({isMasked:PT(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,a),element:t,value:r,maskInputFn:this.maskInputFn})}if(tE(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let i=this.attributeMap.get(e.target);if(t.tagName===`IFRAME`&&n===`src`&&!this.keepIframeSrcFn(r))if(!AE(t))n=`rr_src`;else return;if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),n===`type`&&t.tagName===`INPUT`&&(e.oldValue||``).toLowerCase()===`password`&&t.setAttribute(`data-rr-is-password`,`true`),!kT(t.tagName,n)&&(i.attributes[n]=OT(this.doc,Jw(t.tagName),Jw(n),r,t,this.maskAttributeFn),n===`style`)){let n=e.oldValue?this.styleDeclarationParser.parse(e.oldValue):null;for(let e of Array.from(t.style)){let r=t.style.getPropertyValue(e),a=t.style.getPropertyPriority(e);r!==(n?.getPropertyValue(e)||``)||a!==(n?.getPropertyPriority(e)||``)?a===``?i.styleDiff[e]=r:i.styleDiff[e]=[r,a]:i._unchangedStyles[e]=[r,a]}if(n)for(let e of Array.from(n))t.style.getPropertyValue(e)===``&&(i.styleDiff[e]=!1)}break}case`childList`:if(tE(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let n=this.mirror.getId(t),r=Pw(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);tE(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||rE(t,this.mirror)||!nE(t,this.mirror)||(this.addedSet.has(t)?(LE(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&n===-1||iE(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[FE(n,r)]?LE(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:Pw(e.target)&&Fw(e.target)?!0:void 0})),this.mapRemoves.push(t))});break}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(rE(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&n!==-1&&(this.movedMap[FE(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);tE(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes&&e.childNodes.forEach(e=>this.genAdds(e)),lE(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}}}init(e){`mutationCb.blockClass.blockSelector.unblockSelector.maskAllText.maskTextClass.unmaskTextClass.maskTextSelector.unmaskTextSelector.inlineStylesheet.maskInputOptions.maskAttributeFn.maskTextFn.maskInputFn.keepIframeSrcFn.recordCanvas.inlineImages.slimDOMOptions.dataURLOptions.doc.mirror.iframeManager.stylesheetManager.shadowDomManager.canvasManager.processedNodeManager.ignoreCSSAttributes`.split(`.`).forEach(t=>{this[t]=e[t]}),this.styleDeclarationParser=new ME(this.doc)}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function LE(e,t){e.delete(t),t.childNodes?.forEach(t=>LE(e,t))}function RE(e,t,n){return e.length!==0&&zE(e,t,n)}function zE(e,t,n){let r=t.parentNode;for(;r;){let t=n.getId(r);if(e.some(e=>e.id===t))return!0;r=r.parentNode}return!1}function BE(e,t){return e.size!==0&&VE(e,t)}function VE(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:VE(e,n):!1}var HE=[];function UE(e){try{if(`composedPath`in e){let t=e.composedPath();if(t.length)return t[0]}else if(`path`in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function WE(e,t){let n=new IE;HE.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver,i=window?.Zone?.__symbol__?.(`MutationObserver`);i&&window[i]&&(r=window[i]);let a=new r(Z(t=>{e.onMutation&&e.onMutation(t)===!1||n.processMutations.bind(n)(t)}));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function GE({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let i=typeof t.mousemove==`number`?t.mousemove:50,a=typeof t.mousemoveCallback==`number`?t.mousemoveCallback:500,o=[],s,c=qT(Z(t=>{let n=Date.now()-s;e(o.map(e=>(e.timeOffset-=n,e)),t),o=[],s=null}),a),l=Z(qT(Z(e=>{let t=UE(e),{clientX:n,clientY:i}=aE(e)?e.changedTouches[0]:e;s||=XT(),o.push({x:n,y:i,id:r.getId(t),timeOffset:XT()-s}),c(typeof DragEvent<`u`&&e instanceof DragEvent?X.Drag:e instanceof MouseEvent?X.MouseMove:X.TouchMove)}),i,{trailing:!1})),u=[WT(`mousemove`,l,n),WT(`touchmove`,l,n),WT(`drag`,l,n)];return Z(()=>{u.forEach(e=>e())})}function KE({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],l=null,u=t=>o=>{let s=UE(o);if(tE(s,r,i,a,!0))return;let c=null,u=t;if(`pointerType`in o){switch(o.pointerType){case`mouse`:c=xE.Mouse;break;case`touch`:c=xE.Touch;break;case`pen`:c=xE.Pen;break}c===xE.Touch?bE[t]===bE.MouseDown?u=`TouchStart`:bE[t]===bE.MouseUp&&(u=`TouchEnd`):xE.Pen}else aE(o)&&(c=xE.Touch);c===null?bE[t]===bE.Click&&(c=l,l=null):(l=c,(u.startsWith(`Touch`)&&c===xE.Touch||u.startsWith(`Mouse`)&&c===xE.Mouse)&&(c=null));let d=aE(o)?o.changedTouches[0]:o;if(!d)return;let f=n.getId(s),{clientX:p,clientY:m}=d;Z(e)({type:bE[u],id:f,x:p,y:m,...c!==null&&{pointerType:c}})};return Object.keys(bE).filter(e=>Number.isNaN(Number(e))&&!e.endsWith(`_Departed`)&&s[e]!==!1).forEach(e=>{let n=Jw(e),r=u(e);if(window.PointerEvent)switch(bE[e]){case bE.MouseDown:case bE.MouseUp:n=n.replace(`mouse`,`pointer`);break;case bE.TouchStart:case bE.TouchEnd:return}c.push(WT(n,r,t))}),Z(()=>{c.forEach(e=>e())})}function qE({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,sampling:o}){return WT(`scroll`,Z(qT(Z(o=>{let s=UE(o);if(!s||tE(s,r,i,a,!0))return;let c=n.getId(s);if(s===t&&t.defaultView){let n=ZT(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:s.scrollLeft,y:s.scrollTop})}),o.scroll||100)),t)}function JE({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return WT(`resize`,Z(qT(Z(()=>{let t=QT(),i=$T();(n!==t||r!==i)&&(e({width:Number(i),height:Number(t)}),n=t,r=i)}),200)),t)}var YE=[`INPUT`,`TEXTAREA`,`SELECT`],XE=new WeakMap;function ZE({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,ignoreClass:o,ignoreSelector:s,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:m,unmaskTextSelector:h}){function g(e){let n=UE(e),u=e.isTrusted,g=n&&Yw(n.tagName);if(g===`OPTION`&&(n=n.parentElement),!n||!g||YE.indexOf(g)<0||tE(n,r,i,a,!0))return;let v=n;if(v.classList.contains(o)||s&&v.matches(s))return;let y=Qw(n),b=$w(v,g,y),x=!1,S=Kw({maskInputOptions:c,tagName:g,type:y}),C=PT(n,f,m,p,h,S);(y===`radio`||y===`checkbox`)&&(x=n.checked),b=qw({isMasked:C,element:n,value:b,maskInputFn:l}),_(n,d?{text:b,isChecked:x,userTriggered:u}:{text:b,isChecked:x});let w=n.name;y===`radio`&&w&&x&&t.querySelectorAll(`input[type="radio"][name="${w}"]`).forEach(e=>{if(e!==n){let t=qw({isMasked:C,element:e,value:$w(e,g,y),maskInputFn:l});_(e,d?{text:t,isChecked:!x,userTriggered:!1}:{text:t,isChecked:!x})}})}function _(t,r){let i=XE.get(t);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){XE.set(t,r);let i=n.getId(t);Z(e)({...r,id:i})}}let v=(u.input===`last`?[`change`]:[`input`,`change`]).map(e=>WT(e,Z(g),t)),y=t.defaultView;if(!y)return()=>{v.forEach(e=>e())};let b=y.Object.getOwnPropertyDescriptor(y.HTMLInputElement.prototype,`value`),x=[[y.HTMLInputElement.prototype,`value`],[y.HTMLInputElement.prototype,`checked`],[y.HTMLSelectElement.prototype,`value`],[y.HTMLTextAreaElement.prototype,`value`],[y.HTMLSelectElement.prototype,`selectedIndex`],[y.HTMLOptionElement.prototype,`selected`]];return b&&b.set&&v.push(...x.map(e=>JT(e[0],e[1],{set(){Z(g)({target:this,isTrusted:!1})}},!1,y))),Z(()=>{v.forEach(e=>e())})}function QE(e){let t=[];function n(e,t){if(cD(`CSSGroupingRule`)&&e.parentRule instanceof CSSGroupingRule||cD(`CSSMediaRule`)&&e.parentRule instanceof CSSMediaRule||cD(`CSSSupportsRule`)&&e.parentRule instanceof CSSSupportsRule||cD(`CSSConditionRule`)&&e.parentRule instanceof CSSConditionRule){let n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){let n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}return n(e,t)}function $E(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function eD({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:Z((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=$E(i,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:s}]}),r.apply(i,a)})});let a=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:Z((r,i,a)=>{let[o]=a,{id:s,styleId:c}=$E(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:o}]}),r.apply(i,a)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:Z((r,i,a)=>{let[o]=a,{id:s,styleId:c}=$E(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replace:o}),r.apply(i,a)})}));let s;r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:Z((r,i,a)=>{let[o]=a,{id:s,styleId:c}=$E(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replaceSync:o}),r.apply(i,a)})}));let c={};lD(`CSSGroupingRule`)?c.CSSGroupingRule=r.CSSGroupingRule:(lD(`CSSMediaRule`)&&(c.CSSMediaRule=r.CSSMediaRule),lD(`CSSConditionRule`)&&(c.CSSConditionRule=r.CSSConditionRule),lD(`CSSSupportsRule`)&&(c.CSSSupportsRule=r.CSSSupportsRule));let l={};return Object.entries(c).forEach(([r,i])=>{l[r]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(l[r].insertRule,{apply:Z((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=$E(i.parentStyleSheet,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:[...QE(i),s||0]}]}),r.apply(i,a)})}),i.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:Z((r,i,a)=>{let[o]=a,{id:s,styleId:c}=$E(i.parentStyleSheet,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:[...QE(i),o]}]}),r.apply(i,a)})})}),Z(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=a,o&&(r.CSSStyleSheet.prototype.replace=o),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule})})}function tD({mirror:e,stylesheetManager:t},n){let r=null;r=n.nodeName===`#document`?e.getId(n):e.getId(n.host);let i=n.nodeName===`#document`?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,a=i?.prototype?Object.getOwnPropertyDescriptor(i?.prototype,`adoptedStyleSheets`):void 0;return r===null||r===-1||!i||!a?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){return a.get?.call(this)},set(e){let n=a.set?.call(this,e);if(r!==null&&r!==-1)try{t.adoptStyleSheets(e,r)}catch{}return n}}),Z(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function nD({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:Z((i,o,s)=>{let[c,l,u]=s;if(n.has(c))return a.apply(o,[c,l,u]);let{id:d,styleId:f}=$E(o.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,set:{property:c,value:l,priority:u},index:QE(o.parentRule)}),i.apply(o,s)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:Z((i,a,s)=>{let[c]=s;if(n.has(c))return o.apply(a,[c]);let{id:l,styleId:u}=$E(a.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||u&&u!==-1)&&e({id:l,styleId:u,remove:{property:c},index:QE(a.parentRule)}),i.apply(a,s)})}),Z(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=o})}function rD({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:a,doc:o}){let s=Z(o=>qT(Z(a=>{let s=UE(a);if(!s||tE(s,t,n,r,!0))return;let{currentTime:c,volume:l,muted:u,playbackRate:d}=s;e({type:o,id:i.getId(s),currentTime:c,volume:l,muted:u,playbackRate:d})}),a.media||500)),c=[WT(`play`,s(SE.Play),o),WT(`pause`,s(SE.Pause),o),WT(`seeked`,s(SE.Seeked),o),WT(`volumechange`,s(SE.VolumeChange),o),WT(`ratechange`,s(SE.RateChange),o)];return Z(()=>{c.forEach(e=>e())})}function iD({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,a=n.FontFace;n.FontFace=function(e,t,n){let r=new a(e,t,n);return i.set(r,{family:e,buffer:typeof t!=`string`,descriptors:n,fontSource:typeof t==`string`?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};let o=YT(t.fonts,`add`,function(t){return function(n){return vE(Z(()=>{let t=i.get(n);t&&(e(t),i.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=a}),r.push(o),Z(()=>{r.forEach(e=>e())})}function aD(e){let{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,selectionCb:o}=e,s=!0,c=Z(()=>{let e=t.getSelection();if(!e||s&&e?.isCollapsed)return;s=e.isCollapsed||!1;let c=[],l=e.rangeCount||0;for(let t=0;t<l;t++){let{startContainer:o,startOffset:s,endContainer:l,endOffset:u}=e.getRangeAt(t);tE(o,r,i,a,!0)||tE(l,r,i,a,!0)||c.push({start:n.getId(o),startOffset:s,end:n.getId(l),endOffset:u})}o({ranges:c})});return c(),WT(`selectionchange`,c)}function oD({doc:e,customElementCb:t}){let n=e.defaultView;return!n||!n.customElements?()=>{}:YT(n.customElements,`define`,function(e){return function(n,r,i){try{t({define:{name:n}})}catch{}return e.apply(this,[n,r,i])}})}function sD(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=WE(e,e.doc));let i=GE(e),a=KE(e),o=qE(e),s=JE(e,{win:n}),c=ZE(e),l=rD(e),u=()=>{},d=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(u=eD(e,{win:n}),d=tD(e,e.doc),f=nD(e,{win:n}),e.collectFonts&&(p=iD(e)));let m=aD(e),h=oD(e),g=[];for(let t of e.plugins)g.push(t.observer(t.callback,n,t.options));return Z(()=>{HE.forEach(e=>e.reset()),r?.disconnect(),i(),a(),o(),s(),c(),l(),u(),d(),f(),p(),m(),h(),g.forEach(e=>e())})}function cD(e){return window[e]!==void 0}function lD(e){return!!(window[e]!==void 0&&window[e].prototype&&`insertRule`in window[e].prototype&&`deleteRule`in window[e].prototype)}var uD=class{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){let i=n||this.getIdToRemoteIdMap(e),a=r||this.getRemoteIdToIdMap(e),o=i.get(t);return o||(o=this.generateIdFn(),i.set(t,o),a.set(o,t)),o}getIds(e,t){let n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}getRemoteId(e,t,n){let r=n||this.getRemoteIdToIdMap(e);return typeof t==`number`?r.get(t)||-1:t}getRemoteIds(e,t){let n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},dD=class{constructor(){this.crossOriginIframeMirror=new uD(uT),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},fD=class{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new uD(uT),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new uD(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener(`message`,this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0);let t=jE(e);t&&this.crossOriginIframeMap.set(t,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&jE(e)?.addEventListener(`message`,this.handleMessage.bind(this)),this.loadListener?.(e);let n=AE(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){let t=e;if(t.data.type!==`rrweb`||t.origin!==t.data.origin||!e.source)return;let n=this.crossOriginIframeMap.get(e.source);if(!n)return;let r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case Y.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:Y.IncrementalSnapshot,data:{source:X.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Y.Meta:case Y.Load:case Y.DomContentLoaded:return!1;case Y.Plugin:return t;case Y.Custom:return this.replaceIds(t.data.payload,e,[`id`,`parentId`,`previousId`,`nextId`]),t;case Y.IncrementalSnapshot:switch(t.data.source){case X.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,[`parentId`,`nextId`,`previousId`]),this.replaceIdOnNode(t.node,e);let n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,[`parentId`,`id`])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,[`id`])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case X.Drag:case X.TouchMove:case X.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case X.ViewportResize:return!1;case X.MediaInteraction:case X.MouseInteraction:case X.Scroll:case X.CanvasMutation:case X.Input:return this.replaceIds(t.data,e,[`id`]),t;case X.StyleSheetRule:case X.StyleDeclaration:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleId`]),t;case X.Font:return t;case X.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,[`start`,`end`])}),t;case X.AdoptedStyleSheet:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleIds`]),t.data.styles?.forEach(t=>{this.replaceStyleIds(t,e,[`styleId`])}),t}}return!1}replace(e,t,n,r){for(let i of r)!Array.isArray(t[i])&&typeof t[i]!=`number`||(Array.isArray(t[i])?t[i]=e.getIds(n,t[i]):t[i]=e.getId(n,t[i]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,[`id`,`rootId`]),`childNodes`in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type!==Mw.Document&&!e.rootId&&(e.rootId=t),`childNodes`in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}},pD=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},mD=class{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Fw(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);let n=WE({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(qE({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),vE(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(tD({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){let t=AE(e),n=jE(e);!t||!n||this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){let n=this;this.restoreHandlers.push(YT(e.prototype,`attachShadow`,function(e){return function(r){let i=e.call(this,r);return this.shadowRoot&&mE(this)&&n.addShadowRoot(this.shadowRoot,t),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}},hD=class{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new uE,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){`_cssText`in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let n={id:t,styleIds:[]},r=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:Bw(e),index:t}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},gD=class{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,_E(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},_D,vD;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement(`iframe`);document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug(`Unable to override Array.from`,e)}var yD=Gw();function bD(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i=`rr-block`,blockSelector:a=null,unblockSelector:o=null,ignoreClass:s=`rr-ignore`,ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u=`rr-mask`,unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:m=!0,maskAllInputs:h,maskInputOptions:g,slimDOMOptions:_,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,maxCanvasSize:x=null,packFn:S,sampling:C={},dataURLOptions:w={},mousemoveWait:T,recordDOM:ee=!0,recordCanvas:te=!1,recordCrossOriginIframes:ne=!1,recordAfter:re=e.recordAfter===`DOMContentLoaded`?e.recordAfter:`load`,userTriggeredOnInput:ie=!1,collectFonts:ae=!1,inlineImages:oe=!1,plugins:se,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:ce=new Set([]),errorHandler:le,onMutation:ue,getCanvasManager:de}=e;wE(le);let fe=!ne||window.parent===window,pe=!1;if(!fe)try{window.parent.document&&(pe=!1)}catch{pe=!0}if(fe&&!t)throw Error(`emit function is required`);if(!fe&&!pe)return()=>{};T!==void 0&&C.mousemove===void 0&&(C.mousemove=T),yD.reset();let me=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:g===void 0?{}:g,he=_===!0||_===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:_===`all`,headMetaDescKeywords:_===`all`}:_||{};oE();let ge,_e=0,ve=e=>{for(let t of se||[])t.eventProcessor&&(e=t.eventProcessor(e));return S&&!pe&&(e=S(e)),e};_D=(e,i)=>{let a=e;if(a.timestamp=XT(),HE[0]?.isFrozen()&&a.type!==Y.FullSnapshot&&!(a.type===Y.IncrementalSnapshot&&a.data.source===X.Mutation)&&HE.forEach(e=>e.unfreeze()),fe)t?.(ve(a),i);else if(pe){let e={type:`rrweb`,event:ve(a),origin:window.location.origin,isCheckout:i};window.parent.postMessage(e,`*`)}if(a.type===Y.FullSnapshot)ge=a,_e=0;else if(a.type===Y.IncrementalSnapshot){if(a.data.source===X.Mutation&&a.data.isAttachIframe)return;_e++;let e=r&&_e>=r,t=n&&ge&&a.timestamp-ge.timestamp>n;(e||t)&&De(!0)}};let ye=e=>{_D({type:Y.IncrementalSnapshot,data:{source:X.Mutation,...e}})},be=e=>_D({type:Y.IncrementalSnapshot,data:{source:X.Scroll,...e}}),xe=e=>_D({type:Y.IncrementalSnapshot,data:{source:X.CanvasMutation,...e}}),Se=new hD({mutationCb:ye,adoptedStyleSheetCb:e=>_D({type:Y.IncrementalSnapshot,data:{source:X.AdoptedStyleSheet,...e}})}),Ce=typeof __RRWEB_EXCLUDE_IFRAME__==`boolean`&&__RRWEB_EXCLUDE_IFRAME__?new dD:new fD({mirror:yD,mutationCb:ye,stylesheetManager:Se,recordCrossOriginIframes:ne,wrappedEmit:_D});for(let e of se||[])e.getMirror&&e.getMirror({nodeMirror:yD,crossOriginIframeMirror:Ce.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ce.crossOriginIframeStyleMirror});let we=new gD,Te=SD(de,{mirror:yD,win:window,mutationCb:e=>_D({type:Y.IncrementalSnapshot,data:{source:X.CanvasMutation,...e}}),recordCanvas:te,blockClass:i,blockSelector:a,unblockSelector:o,maxCanvasSize:x,sampling:C.canvas,dataURLOptions:w,errorHandler:le}),Ee=typeof __RRWEB_EXCLUDE_SHADOW_DOM__==`boolean`&&__RRWEB_EXCLUDE_SHADOW_DOM__?new pD:new mD({mutationCb:ye,scrollCb:be,bypassOptions:{onMutation:ue,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:me,dataURLOptions:w,maskAttributeFn:v,maskTextFn:b,maskInputFn:y,recordCanvas:te,inlineImages:oe,sampling:C,slimDOMOptions:he,iframeManager:Ce,stylesheetManager:Se,canvasManager:Te,keepIframeSrcFn:E,processedNodeManager:we,ignoreCSSAttributes:ce},mirror:yD}),De=(e=!1)=>{if(!ee)return;_D({type:Y.Meta,data:{href:window.location.href,width:$T(),height:QT()}},e),Se.reset(),Ee.init(),HE.forEach(e=>e.lock());let t=UT(document,{mirror:yD,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskAllInputs:me,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,slimDOM:he,dataURLOptions:w,recordCanvas:te,inlineImages:oe,onSerialize:e=>{sE(e,yD)&&Ce.addIframe(e),cE(e,yD)&&Se.trackLinkElement(e),lE(e)&&Ee.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Ce.attachIframe(e,t);let n=jE(e);n&&Te.addWindow(n),Ee.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Se.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{ye({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},keepIframeSrcFn:E,ignoreCSSAttributes:ce});if(!t)return console.warn(`Failed to snapshot the document`);_D({type:Y.FullSnapshot,data:{node:t,initialOffset:ZT(window)}}),HE.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Se.adoptStyleSheets(document.adoptedStyleSheets,yD.getId(document))};vD=De;try{let e=[],t=e=>Z(sD)({onMutation:ue,mutationCb:ye,mousemoveCb:(e,t)=>_D({type:Y.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>_D({type:Y.IncrementalSnapshot,data:{source:X.MouseInteraction,...e}}),scrollCb:be,viewportResizeCb:e=>_D({type:Y.IncrementalSnapshot,data:{source:X.ViewportResize,...e}}),inputCb:e=>_D({type:Y.IncrementalSnapshot,data:{source:X.Input,...e}}),mediaInteractionCb:e=>_D({type:Y.IncrementalSnapshot,data:{source:X.MediaInteraction,...e}}),styleSheetRuleCb:e=>_D({type:Y.IncrementalSnapshot,data:{source:X.StyleSheetRule,...e}}),styleDeclarationCb:e=>_D({type:Y.IncrementalSnapshot,data:{source:X.StyleDeclaration,...e}}),canvasMutationCb:xe,fontCb:e=>_D({type:Y.IncrementalSnapshot,data:{source:X.Font,...e}}),selectionCb:e=>{_D({type:Y.IncrementalSnapshot,data:{source:X.Selection,...e}})},customElementCb:e=>{_D({type:Y.IncrementalSnapshot,data:{source:X.CustomElement,...e}})},blockClass:i,ignoreClass:s,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:me,inlineStylesheet:m,sampling:C,recordDOM:ee,recordCanvas:te,inlineImages:oe,userTriggeredOnInput:ie,collectFonts:ae,doc:e,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,keepIframeSrcFn:E,blockSelector:a,unblockSelector:o,slimDOMOptions:he,dataURLOptions:w,mirror:yD,iframeManager:Ce,stylesheetManager:Se,shadowDomManager:Ee,processedNodeManager:we,canvasManager:Te,ignoreCSSAttributes:ce,plugins:se?.filter(e=>e.observer)?.map(e=>({observer:e.observer,options:e.options,callback:t=>_D({type:Y.Plugin,data:{plugin:e.name,payload:t}})}))||[]},{});Ce.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});let n=()=>{De(),e.push(t(document))};return document.readyState===`interactive`||document.readyState===`complete`?n():(e.push(WT(`DOMContentLoaded`,()=>{_D({type:Y.DomContentLoaded,data:{}}),re===`DOMContentLoaded`&&n()})),e.push(WT(`load`,()=>{_D({type:Y.Load,data:{}}),re===`load`&&n()},window))),()=>{e.forEach(e=>e()),we.destroy(),vD=void 0,TE()}}catch(e){console.warn(e)}}function xD(e){if(!vD)throw Error(`please take full snapshot after start recording`);vD(e)}bD.mirror=yD,bD.takeFullSnapshot=xD;function SD(e,t){try{return e?e(t):new kE}catch{return console.warn(`Unable to initialize CanvasManager`),new kE}}var CD;(function(e){e[e.NotStarted=0]=`NotStarted`,e[e.Running=1]=`Running`,e[e.Stopped=2]=`Stopped`})(CD||={});var wD=3,TD=5;function ED(e){return e>9999999999?e:e*1e3}function DD(e){return e>9999999999?e/1e3:e}function OD(e,t){t.category!==`sentry.transaction`&&([`ui.click`,`ui.input`].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:Y.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:`breadcrumb`,payload:Ze(t,10,1e3)}}),t.category===`console`)))}var kD=`button,a`;function AD(e){return e.closest(kD)||e}function jD(e){let t=MD(e);return!t||!(t instanceof Element)?t:AD(t)}function MD(e){return ND(e)?e.target:e}function ND(e){return De(e)&&`target`in e}var PD;function FD(e){return PD||(PD=[],ID()),PD.push(e),()=>{let t=PD?PD.indexOf(e):-1;t>-1&&PD.splice(t,1)}}function ID(){Ne(q,`open`,function(e){return function(...t){if(PD)try{PD.forEach(e=>e())}catch{}return e.apply(q,t)}})}var LD=new Set([X.Mutation,X.StyleSheetRule,X.StyleDeclaration,X.AdoptedStyleSheet,X.CanvasMutation,X.Selection,X.MediaInteraction]);function RD(e,t,n){e.handleClick(t,n)}var zD=class{constructor(e,t,n=OD){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){let e=FD(()=>{this._lastMutation=UD()});this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(VD(t,this._ignoreSelector)||!HD(e))return;let n={timestamp:DD(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1)||(this._clicks.push(n),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=DD(e)}registerScroll(e=Date.now()){this._lastScroll=DD(e)}registerClick(e){let t=AD(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){let e=[],t=UD();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)});for(let t of e){let e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){let t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,i=!n&&!r,{clickCount:a,clickBreadcrumb:o}=e;if(i){let n=Math.min(e.mutationAfter||this._timeout,this._timeout)*1e3,r=n<this._timeout*1e3?`mutation`:`timeout`,i={type:`default`,message:o.message,timestamp:o.timestamp,category:`ui.slowClickDetected`,data:{...o.data,url:q.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:a||1}};this._addBreadcrumbEvent(t,i);return}if(a>1){let e={type:`default`,message:o.message,timestamp:o.timestamp,category:`ui.multiClick`,data:{...o.data,url:q.location.href,route:t.getCurrentRoute(),clickCount:a,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Kx(()=>this._checkClicks(),1e3)}},BD=[`A`,`BUTTON`,`INPUT`];function VD(e,t){return!!(!BD.includes(e.tagName)||e.tagName===`INPUT`&&![`submit`,`button`].includes(e.getAttribute(`type`)||``)||e.tagName===`A`&&(e.hasAttribute(`download`)||e.hasAttribute(`target`)&&e.getAttribute(`target`)!==`_self`)||t&&e.matches(t))}function HD(e){return!!(e.data&&typeof e.data.nodeId==`number`&&e.timestamp)}function UD(){return Date.now()/1e3}function WD(e,t){try{if(!GD(t))return;let{source:n}=t.data;if(LD.has(n)&&e.registerMutation(t.timestamp),n===X.Scroll&&e.registerScroll(t.timestamp),KD(t)){let{type:n,id:r}=t.data,i=bD.mirror.getNode(r);i instanceof HTMLElement&&n===bE.Click&&e.registerClick(i)}}catch{}}function GD(e){return e.type===wD}function KD(e){return e.data.source===X.MouseInteraction}function qD(e){return{timestamp:Date.now()/1e3,type:`default`,...e}}var JD=(e=>(e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`,e))(JD||{}),YD=new Set([`id`,`class`,`aria-label`,`role`,`name`,`alt`,`title`,`data-test-id`,`data-testid`,`disabled`,`aria-disabled`,`data-sentry-component`]);function XD(e){let t={};!e[`data-sentry-component`]&&e[`data-sentry-element`]&&(e[`data-sentry-component`]=e[`data-sentry-element`]);for(let n in e)if(YD.has(n)){let r=n;(n===`data-testid`||n===`data-test-id`)&&(r=`testId`),t[r]=e[n]}return t}var ZD=e=>t=>{if(!e.isEnabled())return;let n=$D(t);if(!n)return;let r=t.name===`click`,i=r?t.event:void 0;r&&e.clickDetector&&i?.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&RD(e.clickDetector,n,jD(t.event)),OD(e,n)};function QD(e,t){let n=bD.mirror.getId(e),r=n&&bD.mirror.getNode(n),i=r&&bD.mirror.getMeta(r),a=i&&tO(i)?i:null;return{message:t,data:a?{nodeId:n,node:{id:n,tagName:a.tagName,textContent:Array.from(a.childNodes).map(e=>e.type===JD.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(``),attributes:XD(a.attributes)}}:{}}}function $D(e){let{target:t,message:n}=eO(e);return qD({category:`ui.${e.name}`,...QD(t,n)})}function eO(e){let t=e.name===`click`,n,r=null;try{r=t?jD(e.event):MD(e.event),n=yb(r,{maxStringLength:200})||`<unknown>`}catch{n=`<unknown>`}return{target:r,message:n}}function tO(e){return e.type===JD.Element}function nO(e,t){if(!e.isEnabled())return;e.updateUserActivity();let n=rO(t);n&&OD(e,n)}function rO(e){let{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:a,target:o}=e;if(!o||iO(o)||!a)return null;let s=t||r||i,c=a.length===1;if(!s&&c)return null;let l=yb(o,{maxStringLength:200})||`<unknown>`;return qD({category:`ui.keyDown`,message:l,data:{...QD(o,l).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:a}})}function iO(e){return e.tagName===`INPUT`||e.tagName===`TEXTAREA`||e.isContentEditable}var aO={resource:fO,paint:uO,navigation:dO};function oO(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function sO(e){return e.map(cO).filter(Boolean)}function cO(e){let t=aO[e.entryType];return t?t(e):null}function lO(e){return((Ot()||q.performance.timeOrigin)+e)/1e3}function uO(e){let{duration:t,entryType:n,name:r,startTime:i}=e,a=lO(i);return{type:n,name:r,start:a,end:a+t,data:void 0}}function dO(e){let{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:a,encodedBodySize:o,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:f,startTime:p,transferSize:m,type:h}=e;return i===0?null:{type:`${t}.${h}`,start:lO(p),end:lO(a),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:o,duration:i,domInteractive:l,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:a,redirectCount:f}}}function fO(e){let{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:a,decodedBodySize:o,encodedBodySize:s,responseStatus:c,transferSize:l}=e;return[`fetch`,`xmlhttprequest`].includes(n)?null:{type:`${t}.${n}`,start:lO(a),end:lO(i),name:r,data:{size:l,statusCode:c,decodedBodySize:o,encodedBodySize:s}}}function pO(e){let t=e.entries[e.entries.length-1];return _O(e,`largest-contentful-paint`,t?.element?[t.element]:void 0)}function mO(e){return e.sources!==void 0}function hO(e){let t=[],n=[];for(let r of e.entries)if(mO(r)){let e=[];for(let t of r.sources)if(t.node){n.push(t.node);let r=bD.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return _O(e,`cumulative-layout-shift`,n,t)}function gO(e){let t=e.entries[e.entries.length-1];return _O(e,`interaction-to-next-paint`,t?.target?[t.target]:void 0)}function _O(e,t,n,r){let i=e.value,a=e.rating,o=lO(i);return{type:`web-vital`,name:t,start:o,end:o,data:{value:i,size:i,rating:a,nodeIds:n?n.map(e=>bD.mirror.getId(e)):void 0,attributions:r}}}function vO(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}let r=[];return[`navigation`,`paint`,`resource`].forEach(e=>{r.push(ab(e,n))}),r.push(nb(oO(pO,e)),tb(oO(hO,e)),ib(oO(gO,e))),()=>{r.forEach(e=>e())}}var Q=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,yO=`var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});`;function bO(){let e=new Blob([yO]);return URL.createObjectURL(e)}var xO=[`log`,`warn`,`error`],SO=`[Replay] `;function CO(e,t=`info`){fl({category:`console`,data:{logger:`replay`},level:t,message:`${SO}${e}`},{level:t})}function wO(){let e=!1,t=!1,n={exception:()=>void 0,infoTick:()=>void 0,setConfig:n=>{e=!!n.captureExceptions,t=!!n.traceInternals}};return Q?(xO.forEach(e=>{n[e]=(...n)=>{x[e](SO,...n),t&&CO(n.join(``),ql(e))}}),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),x.error(SO,r),e?L(r,{mechanism:{handled:!0,type:`auto.function.replay.debug`}}):t&&CO(r,`error`)},n.infoTick=(...e)=>{x.log(SO,...e),t&&setTimeout(()=>CO(e[0]),0)}):xO.forEach(e=>{n[e]=()=>void 0}),n}var $=wO(),TO=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Tw}.`)}},EO=class{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return`sync`}destroy(){this.events=[]}async addEvent(e){let t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>Tw)throw new TO;this.events.push(e)}finish(){return new Promise(e=>{let t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=null;for(let{timestamp:t}of this.events)(e===null||t<e)&&(e=t);return e===null?e:ED(e)}},DO=class{constructor(e){this._onMessage=({data:e})=>{let t=e;if(typeof t.id!=`number`)return;let n=this._pending.get(t.id);if(!(!n||n.method!==t.method)){if(this._pending.delete(t.id),!t.success){Q&&$.error(`Error in compression worker: `,t.response),n.reject(Error(`Error in compression worker`));return}n.resolve(t.response)}},this._worker=e,this._id=0,this._pending=new Map,this._worker.addEventListener(`message`,this._onMessage)}ensureReady(){return this._ensureReadyPromise||=new Promise((e,t)=>{this._worker.addEventListener(`message`,({data:n})=>{n.success?e():(Q&&$.warn(`Received worker message with unsuccessful status`,n),t(Error(`Received worker message with unsuccessful status`)))},{once:!0}),this._worker.addEventListener(`error`,e=>{Q&&$.warn(`Failed to load Replay compression worker`,e),t(Error(`Failed to load Replay compression worker: ${e instanceof ErrorEvent&&e.message?e.message:`Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load.`}`))},{once:!0})}),this._ensureReadyPromise}destroy(){Q&&$.log(`Destroying compression worker`),this._worker.removeEventListener(`message`,this._onMessage),this._pending.forEach(e=>e.reject(Error(`Worker destroyed`))),this._pending.clear(),this._worker.terminate()}postMessage(e,t){let n=this._getAndIncrementId();return new Promise((r,i)=>{this._pending.set(n,{method:e,resolve:r,reject:i});try{this._worker.postMessage({id:n,method:e,arg:t})}catch(e){this._pending.delete(n),i(e)}})}_getAndIncrementId(){return this._id++}},OO=class{constructor(e){this._worker=new DO(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return`worker`}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){let t=ED(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);let n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>Tw?Promise.reject(new TO):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage(`clear`).then(null,e=>{Q&&$.exception(e,`Sending "clear" message to worker failed`,e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage(`addEvent`,e)}async _finishRequest(){let e=await this._worker.postMessage(`finish`);return this._earliestTimestamp=null,this._totalSize=0,e}},kO=class{constructor(e){this._fallback=new EO,this._compression=new OO(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){Q&&$.exception(e,`Failed to load the compression worker, falling back to simple buffer`);return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(let t of e)r.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(e){Q&&$.exception(e,`Failed to add events when switching buffers.`)}}};function AO({useCompression:e,workerUrl:t}){if(e&&window.Worker){let e=jO(t);if(e)return e}return Q&&$.log(`Using simple buffer`),new EO}function jO(e){try{let t=e||MO();return t?(Q&&$.log(`Using compression worker${e?` from ${e}`:``}`),new kO(new Worker(t))):void 0}catch(e){Q&&$.exception(e,`Failed to create compression worker`)}}function MO(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>`u`||!__SENTRY_EXCLUDE_REPLAY_WORKER__?bO():``}function NO(){try{return`sessionStorage`in q&&!!q.sessionStorage}catch{return!1}}function PO(e){FO(),e.session=void 0}function FO(){if(NO())try{q.sessionStorage.removeItem(dw)}catch{}}function IO(e){return e!==void 0&&Math.random()<e}function LO(e){if(NO())try{q.sessionStorage.setItem(dw,JSON.stringify(e))}catch{}}function RO(e){let t=Date.now();return{id:e.id||mt(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId,dirty:e.dirty||!1}}function zO(e,t){return IO(e)?`session`:t?`buffer`:!1}function BO({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){let i=RO({sampled:zO(e,t),previousSessionId:r});return n&&LO(i),i}function VO(){if(!NO())return null;try{let e=q.sessionStorage.getItem(dw);if(!e)return null;let t=JSON.parse(e);return Q&&$.infoTick(`Loading existing session`),RO(t)}catch{return null}}function HO(e,t,n=+new Date){return e===null||t===void 0||t<0||t!==0&&e+t<=n}function UO(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return HO(e.started,t,r)||HO(e.lastActivity,n,r)}function WO(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!UO(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled===`buffer`&&e.segmentId===0)}function GO({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){let i=r.stickySession&&VO();return i?WO(i,{sessionIdleExpire:e,maxReplayDuration:t})?(Q&&$.infoTick(`Session in sessionStorage is expired, creating new one...`),BO(r,{previousSessionId:i.id})):i:(Q&&$.infoTick(`Creating new session`),BO(r,{previousSessionId:n}))}function KO(e){return e.type===Y.Custom}function qO(e,t,n){return XO(e,t)?(YO(e,t,n),!0):!1}function JO(e,t,n){return XO(e,t)?YO(e,t,n):Promise.resolve(null)}async function YO(e,t,n){let{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;let i=e.recordingMode===`buffer`;try{n&&i&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);let a=ZO(t,e.getOptions().beforeAddRecordingEvent);return a?await r.addEvent(a):void 0}catch(t){if(!e.isEnabled())return e.handleException(t),null;let n=t&&t instanceof TO,a=n?`eventBufferOverflow`:`eventBufferError`,o=j();if(o){let e=n?`buffer_overflow`:`internal_sdk_error`;o.recordDroppedEvent(e,`replay`)}if(n&&i)return r.clear(),r.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:a})}}function XO(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let n=ED(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(Q&&$.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function ZO(e,t){try{if(typeof t==`function`&&KO(e))return t(e)}catch(e){return Q&&$.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}var QO=100;function $O(e,t,n){let r=e.getContext();t&&r.traceIds.size<QO&&r.traceIds.add(t),n&&r.segmentNames.size<QO&&r.segmentNames.add(n)}function ek(e){return t=>{e.isEnabled()&&$O(e,t.trace_id,t.name||void 0)}}function tk(e){return!e.type}function nk(e){return e.type===`transaction`}function rk(e){return e.type===`replay_event`}function ik(e){return e.type===`feedback`}function ak(e){return(t,n)=>{if(!e.isEnabled()||!tk(t)&&!nk(t))return;let r=n.statusCode;if(!(!r||r<200||r>=300)){if(nk(t)){ok(e,t);return}sk(e,t)}}}function ok(e,t){$O(e,t.contexts?.trace?.trace_id,t.transaction)}function sk(e,t){let n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!==`buffer`||!t.tags?.replayId)return;let{beforeErrorSampling:r}=e.getOptions();typeof r==`function`&&!r(t)||Kx(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}})}function ck(e){return t=>{!e.isEnabled()||!tk(t)||lk(e,t)}}function lk(e,t){let n=t.exception?.values?.[0]?.value;typeof n==`string`&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))&&OD(e,qD({category:`replay.hydrate-error`,data:{url:Ph()}}))}function uk(e){let t=j();t&&t.on(`beforeAddBreadcrumb`,t=>dk(e,t))}function dk(e,t){if(!e.isEnabled()||!mk(t))return;let n=fk(t);n&&OD(e,n)}function fk(e){return!mk(e)||[`fetch`,`xhr`,`sentry.event`,`sentry.transaction`].includes(e.category)||e.category.startsWith(`ui.`)?null:e.category===`console`?pk(e):qD(e)}function pk(e){let t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return qD(e);let n=!1,r=t.map(e=>{if(!e)return e;if(typeof e==`string`)return e.length>Sw?(n=!0,`${e.slice(0,Sw)}\u2026`):e;if(typeof e==`object`)try{let t=Ze(e,7);return JSON.stringify(t).length>Sw?(n=!0,`${JSON.stringify(t,null,2).slice(0,Sw)}\u2026`):t}catch{}return e});return qD({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:[`CONSOLE_ARG_TRUNCATED`]}}:{}}})}function mk(e){return!!e.category}function hk(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function gk(){let e=k().getPropagationContext().dsc;e&&delete e.replay_id;let t=Br();if(t){let e=vi(t);delete e.replay_id}}function _k(e){let t=k().getPropagationContext().dsc;t&&(t.replay_id=e);let n=Br();if(n){let t=vi(n);t.replay_id=e}}function vk(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:Y.Custom,timestamp:t.timestamp*1e3,data:{tag:`breadcrumb`,payload:{timestamp:t.timestamp,type:`default`,category:`sentry.feedback`,data:{feedbackId:t.event_id}}}}),!1):!0)}function yk(e,t){return e.recordingMode!==`buffer`||t.message===pw||!t.exception||t.type?!1:IO(e.getOptions().errorSampleRate)}function bk(e){return Object.assign((t,n)=>{if(e.session&&WO(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&gk(),!e.isEnabled()||e.isPaused())return t;if(rk(t))return delete t.breadcrumbs,t;if(!tk(t)&&!nk(t)&&!ik(t))return t;if(!e.checkAndHandleExpiredSession())return gk(),t;if(ik(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),vk(e,t),t;if(hk(t,n)&&!e.getOptions()._experiments.captureExceptions)return Q&&$.log(`Ignoring error from rrweb internals`,t),null;let r=yk(e,t);if((r||e.recordingMode===`session`)&&(t.tags={...t.tags,replayId:e.getSessionId()}),r&&e.recordingMode===`buffer`&&e.session?.sampled===`buffer`){let t=e.session;t.dirty=!0,e.getOptions().stickySession&&LO(t)}return t},{id:`Replay`})}function xk(e,t){return t.map(({type:t,start:n,end:r,name:i,data:a})=>{let o=e.throttledAddEvent({type:Y.Custom,timestamp:n,data:{tag:`performanceSpan`,payload:{op:t,description:i,startTimestamp:n,endTimestamp:r,data:a}}});return typeof o==`string`?Promise.resolve(null):o})}function Sk(e){let{from:t,to:n}=e,r=Date.now()/1e3;return{type:`navigation.push`,start:r,end:r,name:n,data:{previous:t}}}function Ck(e){return t=>{if(!e.isEnabled())return;let n=Sk(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(xk(e,[n]),!1)))}}function wk(e,t){return Q&&e.getOptions()._experiments.traceInternals?!1:$c(t,j())}function Tk(e,t){e.isEnabled()&&t!==null&&(wk(e,t.name)||e.addUpdate(()=>(xk(e,[t]),!0)))}function Ek(e){if(!e)return;let t=new TextEncoder;try{if(typeof e==`string`)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){let n=Qx(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function Dk(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function Ok(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let n={...e._meta};return n.warnings=[...n.warnings||[],t],e._meta=n,e}function kk(e,t){if(!t)return null;let{startTimestamp:n,endTimestamp:r,url:i,method:a,statusCode:o,request:s,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:{method:a,statusCode:o,request:s,response:c}}}function Ak(e){return{headers:{},size:e,_meta:{warnings:[`URL_SKIPPED`]}}}function jk(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};let r={headers:e,size:t},{body:i,warnings:a}=Nk(n);return r.body=i,a?.length&&(r._meta={warnings:a}),r}function Mk(e,t){return Object.entries(e).reduce((n,[r,i])=>{let a=r.toLowerCase();return t.includes(a)&&e[r]&&(n[a]=i),n},{})}function Nk(e){if(!e||typeof e!=`string`)return{body:e};let t=e.length>xw,n=Pk(e);if(t){let t=e.slice(0,xw);return n?{body:t,warnings:[`MAYBE_JSON_TRUNCATED`]}:{body:`${t}\u2026`,warnings:[`TEXT_TRUNCATED`]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function Pk(e){let t=e[0],n=e[e.length-1];return t===`[`&&n===`]`||t===`{`&&n===`}`}function Fk(e,t){return ut(Ik(e),t)}function Ik(e,t=q.document.baseURI){if(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(q.location.origin))return e;let n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;let r=n.href;return!e.endsWith(`/`)&&r.endsWith(`/`)?r.slice(0,-1):r}async function Lk(e,t,n){try{let r=kk(`resource.fetch`,await zk(e,t,n));Tk(n.replay,r)}catch(e){Q&&$.exception(e,`Failed to capture fetch breadcrumb`)}}function Rk(e,t){let{input:n,response:r}=t,i=Ek(n?eS(n):void 0),a=r?Dk(r.headers.get(`content-length`)):void 0;i!==void 0&&(e.data.request_body_size=i),a!==void 0&&(e.data.response_body_size=a)}async function zk(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:a=r}=t,{url:o,method:s,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,d=Fk(o,n.networkDetailAllowUrls)&&!Fk(o,n.networkDetailDenyUrls);return{startTimestamp:i,endTimestamp:a,url:o,method:s,statusCode:c,request:d?Bk(n,t.input,l):Ak(l),response:await Vk(d,n,t.response,u)}}function Bk({networkCaptureBodies:e,networkRequestHeaders:t},n,r){let i=n?Gk(n,t):{};if(!e)return jk(i,r,void 0);let[a,o]=$x(eS(n),$),s=jk(i,r,a);return o?Ok(s,o):s}async function Vk(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&i!==void 0)return Ak(i);let a=r?Wk(r.headers,n):{};if(!r||!t&&i!==void 0)return jk(a,i,void 0);let[o,s]=await Uk(r),c=Hk(o,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:a});return s?Ok(c,s):c}function Hk(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{let a=e?.length&&n===void 0?Ek(e):n;return r?t?jk(i,a,e):jk(i,a,void 0):Ak(a)}catch(e){return Q&&$.exception(e,`Failed to serialize response body`),jk(i,n,void 0)}}async function Uk(e){let t=qk(e);if(!t)return[void 0,`BODY_PARSE_ERROR`];try{return[await Jk(t)]}catch(e){return e instanceof Error&&e.message.indexOf(`Timeout`)>-1?(Q&&$.warn(`Parsing text body from response timed out`),[void 0,`BODY_PARSE_TIMEOUT`]):(Q&&$.exception(e,`Failed to get text body from response`),[void 0,`BODY_PARSE_ERROR`])}}function Wk(e,t){let n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function Gk(e,t){return e.length===1&&typeof e[0]!=`string`?Kk(e[0],t):e.length===2?Kk(e[1],t):{}}function Kk(e,t){if(!e)return{};let n=e.headers;return n?n instanceof Headers?Wk(n,t):Array.isArray(n)?{}:Mk(n,t):{}}function qk(e){try{return e.clone()}catch(e){Q&&$.exception(e,`Failed to clone response body`)}}function Jk(e){return new Promise((t,n)=>{let r=Kx(()=>n(Error(`Timeout while trying to read response body`)),500);Yk(e).then(e=>t(e),e=>n(e)).finally(()=>clearTimeout(r))})}async function Yk(e){return await e.text()}async function Xk(e,t,n){try{let r=kk(`resource.xhr`,Qk(e,t,n));Tk(n.replay,r)}catch(e){Q&&$.exception(e,`Failed to capture xhr breadcrumb`)}}function Zk(e,t){let{xhr:n,input:r}=t;if(!n)return;let i=Ek(r),a=n.getResponseHeader(`content-length`)?Dk(n.getResponseHeader(`content-length`)):tA(n.response,n.responseType);i!==void 0&&(e.data.request_body_size=i),a!==void 0&&(e.data.response_body_size=a)}function Qk(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:a=r,input:o,xhr:s}=t,{url:c,method:l,status_code:u=0,request_body_size:d,response_body_size:f}=e.data;if(!c)return null;if(!s||!Fk(c,n.networkDetailAllowUrls)||Fk(c,n.networkDetailDenyUrls))return{startTimestamp:i,endTimestamp:a,url:c,method:l,statusCode:u,request:Ak(d),response:Ak(f)};let p=s[qx],m=p?Mk(p.request_headers,n.networkRequestHeaders):{},h=Mk(tS(s),n.networkResponseHeaders),[g,_]=n.networkCaptureBodies?$x(o,$):[void 0],[v,y]=n.networkCaptureBodies?$k(s):[void 0],b=jk(m,d,g),x=jk(h,f,v);return{startTimestamp:i,endTimestamp:a,url:c,method:l,statusCode:u,request:_?Ok(b,_):b,response:y?Ok(x,y):x}}function $k(e){let t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return eA(e.response,e.responseType)}catch(e){t.push(e)}return Q&&$.warn(`Failed to get xhr response body`,...t),[void 0]}function eA(e,t){try{if(typeof e==`string`)return[e];if(e instanceof Document)return[e.body.outerHTML];if(t===`json`&&De(e))return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return Q&&$.exception(t,`Failed to serialize body`,e),[void 0,`BODY_PARSE_ERROR`]}return Q&&$.log(`Skipping network body because of body type`,e),[void 0,`UNPARSEABLE_BODY_TYPE`]}function tA(e,t){try{return Ek(t===`json`&&De(e)?JSON.stringify(e):e)}catch{return}}function nA(e){let t=j();try{let{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:a,networkResponseHeaders:o}=e.getOptions(),s={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:a,networkResponseHeaders:o};t&&t.on(`beforeAddBreadcrumb`,(e,t)=>rA(s,e,t))}catch{}}function rA(e,t,n){if(t.data)try{iA(t)&&oA(n)&&(Zk(t,n),Xk(t,n,e)),aA(t)&&sA(n)&&(Rk(t,n),Lk(t,n,e))}catch(e){Q&&$.exception(e,`Error when enriching network breadcrumb`)}}function iA(e){return e.category===`xhr`}function aA(e){return e.category===`fetch`}function oA(e){return e?.xhr}function sA(e){return e?.input!==void 0}function cA(e){let t=j();Nx(ZD(e)),Bx(Ck(e)),uk(e),nA(e),Jo(bk(e)),t&&(t.on(`beforeSendEvent`,ck(e)),t.on(`afterSendEvent`,ak(e)),t.on(`createDsc`,t=>{let n=e.getSessionId();n&&e.isEnabled()&&e.recordingMode===`session`&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)}),t.on(`processSegmentSpan`,ek(e)),t.on(`spanStart`,t=>{e.lastActiveSpan=t}),t.on(`spanEnd`,t=>{e.lastActiveSpan=t}),t.on(`beforeSendFeedback`,async(t,n)=>{let r=e.getSessionId();n?.includeReplay&&e.isEnabled()&&r&&t.contexts?.feedback&&(t.contexts.feedback.source===`api`&&await e.sendBufferedReplayOrFlush(),t.contexts.feedback.replay_id=r)}),t.on(`openFeedbackWidget`,async()=>{await e.sendBufferedReplayOrFlush()}))}async function lA(e){try{return Promise.all(xk(e,[uA(q.performance.memory)]))}catch{return[]}}function uA(e){let{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:`memory`,name:`memory`,start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function dA(e,t,n){return Aa(e,t,{...n,setTimeoutImpl:Kx})}var fA=i.navigator;function pA(){return/iPhone|iPad|iPod/i.test(fA?.userAgent??``)||/Macintosh/i.test(fA?.userAgent??``)&&fA?.maxTouchPoints&&fA?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function mA(e){let t=!1;return(n,r)=>{try{if(!e.checkAndHandleExpiredSession()){Q&&$.warn(`Received replay event after session expired.`);return}let i=r||!t;t=!0,hA(n),e.clickDetector&&WD(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode===`buffer`&&i&&e.setInitialState(),!qO(e,n,i))return!0;if(!i)return!1;let t=e.session;if(_A(e,i),e.recordingMode===`buffer`&&t&&e.eventBuffer&&!t.dirty){let n=e.eventBuffer.getEarliestTimestamp();n&&(Q&&$.log(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&LO(t))}return t?.previousSessionId||e.recordingMode===`session`&&e.flush(),!0})}catch(t){e.handleException(t)}}}function hA(e){let t=e.data;if(!(e.type!==Y.IncrementalSnapshot||!t||typeof t!=`object`||!(`source`in t)||t.source!==X.Mutation||!(`attributes`in t)||!Array.isArray(t.attributes)))for(let e of t.attributes){let t=bD.mirror.getNode(e.id),n=t&&bD.mirror.getMeta(t);if(n?.type===JD.Element)for(let[t,r]of Object.entries(e.attributes))r===null?delete n.attributes[t]:n.attributes[t]=r}}function gA(e){let t=e.getOptions();return{type:Y.Custom,timestamp:Date.now(),data:{tag:`options`,payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type===`worker`:!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function _A(e,t){!t||e.session?.segmentId!==0||qO(e,gA(e),!1)}function vA(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function yA(e,t,n,r){return Si(Li(e,Ii(e),r,n),[[{type:`replay_event`},e],[{type:`replay_recording`,length:typeof t==`string`?new TextEncoder().encode(t).length:t.length},t]])}function bA({recordingData:e,headers:t}){let n,r=`${JSON.stringify(t)}
|
|
497
|
+
`;if(typeof e==`string`)n=`${r}${e}`;else{let t=new TextEncoder().encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}async function xA({client:e,scope:t,replayId:n,event:r}){let i={event_id:n,integrations:typeof e._integrations==`object`&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0};e.emit(`preprocessEvent`,r,i);let a=await xo(e.getOptions(),r,i,t,e,A());if(!a)return null;e.emit(`postprocessEvent`,a,i),a.platform=a.platform||`javascript`;let{name:o,version:s,settings:c}=e.getSdkMetadata()?.sdk||{};return a.sdk={...a.sdk,name:o||`sentry.javascript.unknown`,version:s||`0.0.0`,settings:c},a}async function SA({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:a}){let o=bA({recordingData:e,headers:{segment_id:n}}),{urls:s,errorIds:c,traceIds:l,segmentNames:u,initialTimestamp:d}=r,f=j(),p=k(),m=f?.getTransport(),h=f?.getDsn();if(!f||!m||!h||!a.sampled)return Promise.resolve({});let g=await xA({scope:p,client:f,replayId:t,event:{type:fw,replay_start_timestamp:d/1e3,timestamp:i/1e3,error_ids:c,trace_ids:l,segment_names:u,urls:s,replay_id:t,segment_id:n,replay_type:a.sampled}});if(!g)return f.recordDroppedEvent(`event_processor`,`replay`),Q&&$.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete g.sdkProcessingMetadata;let _=yA(g,o,h,f.getOptions().tunnel),v;try{v=await m.send(_)}catch(e){let t=Error(pw);try{t.cause=e}catch{}throw t}let y=$s({},v);if(Qs(y,`replay`))throw new wA(y);if(typeof v.statusCode==`number`&&(v.statusCode<200||v.statusCode>=300))throw new CA(v.statusCode);return v}var CA=class extends Error{constructor(e){super(`Transport returned status code ${e}`)}},wA=class extends Error{constructor(e){super(`Rate limit hit`),this.rateLimits=e}},TA=class extends Error{constructor(){super(`Session is too long, not sending replay`)}};async function EA(e,t={count:0,interval:yw}){let{recordingData:n,onError:r}=e;if(n.length)try{return await SA(e),!0}catch(n){if(n instanceof CA||n instanceof wA)throw n;if(Po(`Replays`,{_retryCount:t.count}),r&&r(n),t.count>=bw){let e=Error(`${pw} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise((n,r)=>{Kx(async()=>{try{await EA(e,t),n(!0)}catch(e){r(e)}},t.interval)})}}var DA=`__THROTTLED`,OA=`__SKIPPED`;function kA(e,t,n){let r=new Map,i=e=>{let t=e-n;r.forEach((e,n)=>{n<t&&r.delete(n)})},a=()=>[...r.values()].reduce((e,t)=>e+t,0),o=!1;return(...n)=>{let s=Math.floor(Date.now()/1e3);if(i(s),a()>=t){let e=o;return o=!0,e?OA:DA}o=!1;let c=r.get(s)||0;return r.set(s,c+1),e(...n)}}var AA=class{constructor({options:e,recordingOptions:t}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode=`session`,this.timeouts={sessionIdlePause:mw,sessionIdleExpire:hw},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,segmentNames:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:``},this._recordingOptions=t,this._options=e,this._debouncedFlush=dA(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=kA((e,t)=>JO(this,e,t),300,5);let{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),i=n?{threshold:Math.min(Cw,n),timeout:n,scrollTimeout:ww,ignoreSelector:r?r.join(`,`):``}:void 0;if(i&&(this.clickDetector=new zD(this,i)),Q){let t=e._experiments;$.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}this._handleVisibilityChange=()=>{q.document.visibilityState===`visible`?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{let e=qD({category:`ui.blur`});this._doChangeToBackgroundTasks(e)},this._handleWindowFocus=()=>{let e=qD({category:`ui.focus`});this._doChangeToForegroundTasks(e)},this._handleKeyboardEvent=e=>{nO(this,e)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){Q&&$.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){let{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;if(this._requiresManualStart=r,!r){if(this._initializeSessionForSampling(e),!this.session){Q&&$.exception(Error(`Unable to initialize and create session`));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled===`buffer`&&this.session.segmentId===0?`buffer`:`session`,Q&&$.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode===`session`){Q&&$.log(`Recording is already in progress`);return}if(this._isEnabled&&this.recordingMode===`buffer`){Q&&$.log("Buffering is in progress, call `flush()` to save the replay");return}Q&&$.infoTick(`Starting replay in session mode`),this._updateUserActivity();let e=GO({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this.recordingMode=`session`,this._initializeRecording()}startBuffering(){if(this._isEnabled){Q&&$.log("Buffering is in progress, call `flush()` to save the replay");return}Q&&$.infoTick(`Starting replay in buffer mode`);let e=GO({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode=`buffer`,this._initializeRecording()}startRecording(){try{let e=this._canvas;this._stopRecording=bD({...this._recordingOptions,...this.recordingMode===`buffer`?{checkoutEveryNms:vw}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:mA(this),...pA(),onMutation:this._onMutationHandler.bind(this),...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&=(this._stopRecording(),void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode=`buffer`;let n=t??`manual`;j()?.emit(`replayEnd`,{sessionId:this.session?.id,reason:n});try{Q&&$.log(`Stopping Replay triggered by ${n}`),gk(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,PO(this)}catch(e){this.handleException(e)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Q&&$.log(`Pausing replay`))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),Q&&$.log(`Resuming replay`))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if(this.recordingMode===`session`)return this.flushImmediate();let t=Date.now();Q&&$.log(`Converting buffer to session`),await this.flushImmediate();let n=this.stopRecording();!e||!n||this.recordingMode!==`session`&&(this.recordingMode=`session`,this.session&&(this.session.dirty=!1,this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession(),_k(this.session.id)),this.startRecording())}addUpdate(e){let t=e();this.recordingMode===`buffer`||!this._isEnabled||t!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode===`buffer`?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(e){if(!(e&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&HO(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled===`session`){this.pause();return}return!!this._checkSession()}setInitialState(){let e=`${q.location.pathname}${q.location.hash}${q.location.search}`,t=`${q.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){let n=this._throttledAddEvent(e,t);if(n===DA){let e=qD({category:`replay.throttled`});this.addUpdate(()=>!qO(this,{type:TD,timestamp:e.timestamp||0,data:{tag:`breadcrumb`,payload:e,metric:!0}}))}return n}getCurrentRoute(){let e=this.lastActiveSpan||Br(),t=e&&I(e),n=(t&&F(t).data||{})[M];if(!(!t||!n||![`route`,`custom`].includes(n)))return F(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=AO({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&j()?.emit(`replayStart`,{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),this.recordingMode===`session`&&this.session&&_k(this.session.id)}_initializeSessionForSampling(e){let t=this._options.errorSampleRate>0,n=GO({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;let e=this.session;return WO(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(e),!1):!0}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:`sessionExpired`}),this.initializeSampling(e.id))}_addListeners(){try{q.document.addEventListener(`visibilitychange`,this._handleVisibilityChange),q.addEventListener(`blur`,this._handleWindowBlur),q.addEventListener(`focus`,this._handleWindowFocus),q.addEventListener(`keydown`,this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||=(cA(this),!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=vO(this)}_removeListeners(){try{q.document.removeEventListener(`visibilitychange`,this._handleVisibilityChange),q.removeEventListener(`blur`,this._handleWindowBlur),q.removeEventListener(`focus`,this._handleWindowFocus),q.removeEventListener(`keydown`,this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}_doChangeToBackgroundTasks(e){if(this.session){if(WO(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){gk();return}e&&this._createCustomBreadcrumb(e),this.conditionalFlush()}}_doChangeToForegroundTasks(e){if(this.session){if(!this.checkAndHandleExpiredSession()){Q&&$.log(`Document has become active, but session has expired`);return}e&&this._createCustomBreadcrumb(e)}}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:Y.Custom,timestamp:e.timestamp||0,data:{tag:`breadcrumb`,payload:e}})})}_addPerformanceEntries(){let e=sO(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){let t=this._context.initialTimestamp/1e3;e=e.filter(e=>e.start>=t)}return Promise.all(xk(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.segmentNames.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart||e.segmentId)return;let n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){let e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),segmentNames:Array.from(this._context.segmentNames),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){let e=this.getSessionId();if(!this.session||!this.eventBuffer||!e){Q&&$.error(`No session or eventBuffer found to flush.`);return}if(await this._addPerformanceEntries(),this.eventBuffer?.hasEvents&&(await lA(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new TA;let n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession(),await EA({replayId:e,recordingData:await this.eventBuffer.finish(),segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:`sendError`});let t=j();if(t){let n;n=e instanceof wA?`ratelimit_backoff`:e instanceof TA?`invalid`:`send_error`,t.recordDroppedEvent(n,`replay`)}}}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession()){Q&&$.error(`Attempting to finish replay event after session expired.`);return}if(!this.session)return;let t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();let r=n<this._options.minReplayDuration,i=n>this._options.maxReplayDuration+5e3;if(r||i){Q&&$.log(`Session duration (${Math.floor(n/1e3)}s) is too ${r?`short`:`long`}, not sending replay.`),r&&this._debouncedFlush();return}let a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&Q&&$.log(`Flushing initial segment without checkout.`);let o=!!this._flushLock;this._flushLock||=this._runFlush();try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,o&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&LO(this.session)}_onMutationHandler(e){let{ignoreMutations:t}=this._options._experiments;if(t?.length&&e.some(e=>{let n=vA(e.target),r=t.join(`,`);return n?.matches(r)}))return!1;let n=e.length,r=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,a=r&&n>r;if(n>i||a){let e=qD({category:`replay.mutations`,data:{count:n,limit:a}});this._createCustomBreadcrumb(e)}return a?(this.stop({reason:`mutationLimit`,forceFlush:this.recordingMode===`session`}),!1):!0}};function jA(e,t){return[...e,...t].join(`,`)}function MA({mask:e,unmask:t,block:n,unblock:r,ignore:i}){return{maskTextSelector:jA(e,[`.sentry-mask`,`[data-sentry-mask]`]),unmaskTextSelector:jA(t,[]),blockSelector:jA(n,[`.sentry-block`,`[data-sentry-block]`,`base`,`iframe[srcdoc]:not([src])`]),unblockSelector:jA(r,[]),ignoreSelector:jA(i,[`.sentry-ignore`,`[data-sentry-ignore]`,`input[type="file"]`])}}function NA({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:a}){if(i.unmaskTextSelector&&e.matches(i.unmaskTextSelector))return a;let o=n.includes(t),s=r&&t===`value`&&e.tagName===`INPUT`&&[`submit`,`button`].includes(e.getAttribute(`type`)||``);return o||s?a.replace(/[\S]/g,`*`):a}var PA=`img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]`,FA=[`content-length`,`content-type`,`accept`],IA=Symbol.for(`sentry__originalRequestBody`),LA=!1,RA=!1;function zA(){if(typeof Request>`u`||RA)return;let e=Request;try{let t=function(t,n){let r=new e(t,n);return n?.body!=null&&(r[IA]=n.body),r};t.prototype=e.prototype,i.Request=t,RA=!0}catch{}}var BA=(e=>new VA(e)),VA=class{constructor({flushMinDelay:e=gw,flushMaxDelay:t=_w,minReplayDuration:n=Ew,maxReplayDuration:r=Ow,stickySession:i=!0,useCompression:a=!0,workerUrl:o,_experiments:s={},maskAllText:c=!0,maskAllInputs:l=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:d=750,mutationLimit:f=1e4,slowClickTimeout:p=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:h=[],networkDetailDenyUrls:g=[],networkCaptureBodies:_=!0,networkRequestHeaders:v=[],networkResponseHeaders:y=[],mask:b=[],maskAttributes:x=[`title`,`placeholder`,`aria-label`],unmask:S=[],block:C=[],unblock:w=[],ignore:T=[],maskFn:ee,beforeAddRecordingEvent:te,beforeErrorSampling:ne,onError:re,attachRawBodyFromRequest:ie=!1}={}){this.name=`Replay`;let ae=MA({mask:b,unmask:S,block:C,unblock:w,ignore:T});if(this._recordingOptions={maskAllInputs:l,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:ee,maskInputFn:ee,maskAttributeFn:(e,t,n)=>NA({maskAttributes:x,maskAllText:c,privacyOptions:ae,key:e,value:t,el:n}),...ae,slimDOMOptions:`all`,inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!s.recordCrossOriginIframes},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,Dw),maxReplayDuration:Math.min(r,Ow),stickySession:i,useCompression:a,workerUrl:o,blockAllMedia:u,maskAllInputs:l,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:f,slowClickTimeout:p,slowClickIgnoreSelectors:m,networkDetailAllowUrls:h,networkDetailDenyUrls:g,networkCaptureBodies:_,networkRequestHeaders:UA(v),networkResponseHeaders:UA(y),beforeAddRecordingEvent:te,beforeErrorSampling:ne,onError:re,attachRawBodyFromRequest:ie,_experiments:s},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${PA}`:PA,this._recordingOptions.ignoreCSSAttributes=new Set([`background-image`])),this._isInitialized&&xs())throw Error(`Multiple Sentry Session Replay instances are not supported`);this._isInitialized=!0}get _isInitialized(){return LA}set _isInitialized(e){LA=e}afterAllSetup(e){!xs()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&zA(),this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode===`session`,reason:`manual`}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(e){if(this._replay?.isEnabled())return this._replay.getSessionId(e)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}processSpan(e){let t=this.getReplayId(!0);t&&(no(e,{"sentry.replay_id":t}),this.getRecordingMode()===`buffer`&&no(e,{"sentry._internal.replay_is_buffering":!0}))}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){let t=HA(this._initialOptions,e);this._replay=new AA({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{let t=e.getIntegrationByName(`ReplayCanvas`);if(!t)return;this._replay._canvas=t.getOptions()}catch{}}};function HA(e,t){let n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},i=cr(n.replaysSessionSampleRate),a=cr(n.replaysOnErrorSampleRate);return i==null&&a==null&&f(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(r.sessionSampleRate=i),a!=null&&(r.errorSampleRate=a),r}function UA(e){return[...FA,...e.map(e=>e.toLowerCase())]}function WA(){return j()?.getIntegrationByName(`Replay`)}var GA=Object.defineProperty,KA=(e,t,n)=>t in e?GA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qA=(e,t,n)=>KA(e,typeof t==`symbol`?t:t+``,n),JA=class{constructor(){qA(this,`idNodeMap`,new Map),qA(this,`nodeMetaMap`,new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function YA(){return new JA}function XA(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function ZA(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:ZA(e.parentNode,t,n,r+1)}function QA(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e==`string`){if(r.matches(`.${e}`))return!0}else if(XA(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}var $A=`Please stop import mirror directly. Instead of that,\r
|
|
498
498
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
499
|
-
or you can use record.mirror to access the mirror instance during recording.`,ej={map:{},getId(){return console.error($A),-1},getNode(){return console.error($A),null},removeNodeFromMap(){console.error($A)},has(){return console.error($A),!1},reset(){console.error($A)}};typeof window<`u`&&window.Proxy&&window.Reflect&&(ej=new Proxy(ej,{get(e,t,n){return t===`map`&&console.error($A),Reflect.get(e,t,n)}}));function tj(e,t,n,r,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){cj(()=>{n.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>tj(e,t,a||{},!0)}function nj(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function rj(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function ij(e,t,n,r,i){if(!e)return!1;let a=rj(e);if(!a)return!1;let o=QA(t,n);if(!i){let e=r&&a.matches(r);return o(a)&&!e}let s=ZA(a,o),c=-1;return s<0?!1:(r&&(c=ZA(a,QA(null,r))),s>-1&&c<0||s<c)}var aj={};function oj(e){let t=aj[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement==`function`)try{let t=n.createElement(`iframe`);t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch{}return aj[e]=r.bind(window)}function sj(...e){return oj(`requestAnimationFrame`)(...e)}function cj(...e){return oj(`setTimeout`)(...e)}var lj=(e=>(e[e[`2D`]=0]=`2D`,e[e.WebGL=1]=`WebGL`,e[e.WebGL2=2]=`WebGL2`,e))(lj||{}),uj;function dj(e){uj=e}for(var fj=e=>uj?((...t)=>{try{return e(...t)}catch(e){if(uj&&uj(e)===!0)return()=>{};throw e}}):e,pj=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,mj=typeof Uint8Array>`u`?[]:new Uint8Array(256),hj=0;hj<pj.length;hj++)mj[pj.charCodeAt(hj)]=hj;var gj=function(e){var t=new Uint8Array(e),n,r=t.length,i=``;for(n=0;n<r;n+=3)i+=pj[t[n]>>2],i+=pj[(t[n]&3)<<4|t[n+1]>>4],i+=pj[(t[n+1]&15)<<2|t[n+2]>>6],i+=pj[t[n+2]&63];return r%3==2?i=i.substring(0,i.length-1)+`=`:r%3==1&&(i=i.substring(0,i.length-2)+`==`),i},_j=new Map;function vj(e,t){let n=_j.get(e);return n||(n=new Map,_j.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var yj=(e,t,n)=>{if(!e||!(Sj(e,t)||typeof e==`object`))return;let r=e.constructor.name,i=vj(n,r),a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a};function bj(e,t,n){if(e instanceof Array)return e.map(e=>bj(e,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:gj(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[bj(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}else if(e instanceof HTMLCanvasElement)return{rr_type:`HTMLImageElement`,src:e.toDataURL()};else if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[bj(e.data,t,n),e.width,e.height]};else if(Sj(e,t)||typeof e==`object`)return{rr_type:e.constructor.name,index:yj(e,t,n)};return e}var xj=(e,t,n)=>e.map(e=>bj(e,t,n)),Sj=(e,t)=>!![`WebGLActiveInfo`,`WebGLBuffer`,`WebGLFramebuffer`,`WebGLProgram`,`WebGLRenderbuffer`,`WebGLShader`,`WebGLShaderPrecisionFormat`,`WebGLTexture`,`WebGLUniformLocation`,`WebGLVertexArrayObject`,`WebGLVertexArrayObjectOES`].filter(e=>typeof t[e]==`function`).find(n=>e instanceof t[n]);function Cj(e,t,n,r,i){let a=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let s of o)try{if(typeof t.CanvasRenderingContext2D.prototype[s]!=`function`)continue;let o=nj(t.CanvasRenderingContext2D.prototype,s,function(a){return function(...o){return ij(this.canvas,n,r,i,!0)||cj(()=>{let n=xj(o,t,this);e(this.canvas,{type:lj[`2D`],property:s,args:n})},0),a.apply(this,o)}});a.push(o)}catch{let n=tj(t.CanvasRenderingContext2D.prototype,s,{set(t){e(this.canvas,{type:lj[`2D`],property:s,args:[t],setter:!0})}});a.push(n)}return()=>{a.forEach(e=>e())}}function wj(e){return e===`experimental-webgl`?`webgl`:e}function Tj(e,t,n,r,i){let a=[];try{let o=nj(e.HTMLCanvasElement.prototype,`getContext`,function(e){return function(a,...o){if(!ij(this,t,n,r,!0)){let e=wj(a);if(`__context`in this||(this.__context=e),i&&[`webgl`,`webgl2`].includes(e))if(o[0]&&typeof o[0]==`object`){let e=o[0];e.preserveDrawingBuffer||=!0}else o.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[a,...o])}});a.push(o)}catch{console.error(`failed to patch HTMLCanvasElement.prototype.getContext`)}return()=>{a.forEach(e=>e())}}function Ej(e,t,n,r,i,a,o,s){let c=[],l=Object.getOwnPropertyNames(e);for(let o of l)if(![`isContextLost`,`canvas`,`drawingBufferWidth`,`drawingBufferHeight`].includes(o))try{if(typeof e[o]!=`function`)continue;let l=nj(e,o,function(e){return function(...c){let l=e.apply(this,c);if(yj(l,s,this),`tagName`in this.canvas&&!ij(this.canvas,r,i,a,!0)){let e=xj(c,s,this),r={type:t,property:o,args:e};n(this.canvas,r)}return l}});c.push(l)}catch{let r=tj(e,o,{set(e){n(this.canvas,{type:t,property:o,args:[e],setter:!0})}});c.push(r)}return c}function Dj(e,t,n,r,i,a){let o=[];return o.push(...Ej(t.WebGLRenderingContext.prototype,lj.WebGL,e,n,r,i,a,t)),t.WebGL2RenderingContext!==void 0&&o.push(...Ej(t.WebGL2RenderingContext.prototype,lj.WebGL2,e,n,r,i,a,t)),()=>{o.forEach(e=>e())}}var Oj=`for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};`;function kj(){let e=new Blob([Oj]);return URL.createObjectURL(e)}var Aj=class{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};let{enableManualSnapshot:t,sampling:n=`all`,win:r,recordCanvas:i,errorHandler:a}=e;e.sampling=n,this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.options=e,a&&dj(a),(i&&typeof n==`number`||t)&&(this.worker=this.initFPSWorker()),this.addWindow(r),!t&&fj(()=>{i&&n===`all`&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),i&&typeof n==`number`&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(e){let{sampling:t=`all`,blockClass:n,blockSelector:r,unblockSelector:i,recordCanvas:a,enableManualSnapshot:o}=this.options;if(!this.windowsSet.has(e)){if(o){this.windowsSet.add(e),this.windows.push(new WeakRef(e));return}fj(()=>{if(a&&t===`all`&&this.initCanvasMutationObserver(e,n,r,i),a&&typeof t==`number`){let t=Tj(e,n,r,i,!0);this.restoreHandlers.push(()=>{t()})}})(),this.windowsSet.add(e),this.windows.push(new WeakRef(e))}}addShadowRoot(e){this.shadowDoms.add(new WeakRef(e))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(e,t){if(t?.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,e);return}sj(t=>this.takeSnapshot(t,!0,e))}initFPSWorker(){let e=new Worker(kj());return e.onmessage=e=>{let t=e.data,{id:n}=t;if(this.snapshotInProgressMap.set(n,!1),!(`base64`in t))return;let{base64:r,type:i,width:a,height:o}=t;this.mutationCb({id:n,type:lj[`2D`],commands:[{property:`clearRect`,args:[0,0,a,o]},{property:`drawImage`,args:[{rr_type:`ImageBitmap`,args:[{rr_type:`Blob`,data:[{rr_type:`ArrayBuffer`,base64:r}],type:i}]},0,0,a,o]}]})},e}initCanvasFPSObserver(){let e;if(!this.windows.length&&!this.shadowDoms.size)return;let t=n=>{this.takeSnapshot(n,!1),e=sj(t)};e=sj(t),this.restoreHandlers.push(()=>{e&&cancelAnimationFrame(e)})}initCanvasMutationObserver(e,t,n,r){let i=Tj(e,t,n,r,!1),a=Cj(this.processMutation.bind(this),e,t,n,r),o=Dj(this.processMutation.bind(this),e,t,n,r,this.mirror);this.restoreHandlers.push(()=>{i(),a(),o()})}getCanvasElements(e,t,n){let r=[],i=i=>{i.querySelectorAll(`canvas`).forEach(i=>{ij(i,e,t,n,!0)||r.push(i)})};for(let e of this.windows){let t=e.deref(),n;try{n=t&&t.document}catch{}n&&i(n)}for(let e of this.shadowDoms){let t=e.deref();t&&i(t)}return r}takeSnapshot(e,t,n){let{sampling:r,blockClass:i,blockSelector:a,unblockSelector:o,dataURLOptions:s,maxCanvasSize:c}=this.options,l=1e3/(r===`all`?2:r||2);return this.lastSnapshotTime&&e-this.lastSnapshotTime<l?!1:(this.lastSnapshotTime=e,(n?[n]:this.getCanvasElements(i,a,o)).forEach(e=>{let n=this.mirror.getId(e);if(!(!this.mirror.hasNode(e)||!e.width||!e.height||this.snapshotInProgressMap.get(n))){if(this.snapshotInProgressMap.set(n,!0),!t&&[`webgl`,`webgl2`].includes(e.__context)){let t=e.getContext(e.__context);t?.getContextAttributes()?.preserveDrawingBuffer===!1&&t.clear(t.COLOR_BUFFER_BIT)}createImageBitmap(e).then(t=>{this.worker?.postMessage({id:n,bitmap:t,width:e.width,height:e.height,dataURLOptions:s,maxCanvasSize:c},[t])}).catch(e=>{fj(()=>{throw this.snapshotInProgressMap.delete(n),e})()})}}),!0)}startPendingCanvasMutationFlusher(){sj(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,sj(e)};sj(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),sj(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||t===-1)return;let r=n.map(e=>{let{type:t,...n}=e;return n}),{type:i}=n[0];this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}};try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement(`iframe`);document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug(`Unable to override Array.from`,e)}YA();var jj;(function(e){e[e.NotStarted=0]=`NotStarted`,e[e.Running=1]=`Running`,e[e.Stopped=2]=`Stopped`})(jj||={});var Mj={low:{sampling:{canvas:1},dataURLOptions:{type:`image/webp`,quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:`image/webp`,quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:`image/webp`,quality:.5}}},Nj=`ReplayCanvas`,Pj=1280,Fj=R(((e={})=>{let[t,n]=e.maxCanvasSize||[],r={quality:e.quality||`medium`,enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Pj):Pj,n?Math.min(n,Pj):Pj]},i,a,o=new Promise(e=>a=e);return{name:Nj,getOptions(){let{quality:e,enableManualSnapshot:t,maxCanvasSize:n}=r;return{enableManualSnapshot:t,recordCanvas:!0,getCanvasManager:e=>{let r=new Aj({...e,enableManualSnapshot:t,maxCanvasSize:n,errorHandler:e=>{try{typeof e==`object`&&(e.__rrweb__=!0)}catch{}}});return i=r,a(r),r},...Mj[e]||Mj.medium}},async snapshot(e,t){(i||await o).snapshot(e,t)}}}));function Ij(e){return e.split(`,`).some(e=>e.trim().startsWith(`sentry-`))}function Lj(e){try{return new URL(e,U.location.origin).href}catch{return}}function Rj(e){return e.entryType===`resource`&&`initiatorType`in e&&typeof e.nextHopProtocol==`string`&&(e.initiatorType===`fetch`||e.initiatorType===`xmlhttprequest`)}function zj(e){try{return new Headers(e)}catch{return}}var Bj={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Vj(e,t){let{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:i,enableHTTPTimings:a,tracePropagationTargets:o,onRequestSpanStart:s,onRequestSpanEnd:c}={...Bj,...t},l=typeof i==`function`?i:e=>!0,u=e=>Wj(e,o),d={},f=e.getOptions().propagateTraceparent;n&&wh(t=>{let n=sd(t,l,u,d,{propagateTraceparent:f,onRequestSpanEnd:c});if(n){let r=Lj(t.fetchData.url),i=r?Jc(r).host:void 0,o=r?Xc(r):void 0;n.setAttributes({"http.url":o,"url.full":o,"server.address":i}),a&&Uj(n,e),s?.(n,{headers:t.headers})}}),r&&Jx(t=>{let n=Gj(t,l,u,d,f,c);n&&(a&&Uj(n,e),s?.(n,{headers:zj(t.xhr.__sentry_xhr_v3__?.request_headers)}))})}var Hj=300;function Uj(e,t){let{url:n}=F(e).data;if(!n||typeof n!=`string`)return;let r=()=>void setTimeout(i);if(Gi(t)){let t=e.end.bind(e);e.end=e=>{let n=e??O(),a=!1,o=()=>{a||(a=!0,setTimeout(i),t(n),clearTimeout(s))};r=o;let s=setTimeout(o,Hj)}}let i=ab(`resource`,({entries:t})=>{t.forEach(t=>{Rj(t)&&t.name.endsWith(n)&&(e.setAttributes(Fb(t)),r())})})}function Wj(e,t){let n=Ph();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}let a=r.origin===i;return t?lt(r.toString(),t)||a&<(r.pathname,t):a}else{let n=!!e.match(/^\/(?!\/)/);return t?lt(e,t):n}}function Gj(e,t,n,r,i,a){let o=e.xhr,s=o?.[qx];if(!o||o.__sentry_own_request__||!s)return;let{url:c,method:l}=s,u=Wr()&&t(c);if(e.endTimestamp){let t=o.__sentry_xhr_span_id__;if(!t)return;let n=r[t];n&&(u&&s.status_code!==void 0&&(Pn(n,s.status_code),n.end(),a?.(n,{headers:zj(tS(o)),error:e.error})),delete r[t]);return}let d=Lj(c),f=Jc(d||c),p=d?Xc(d):void 0,m=Xc(Yc(c)),h=j(),g=!!zr()||!!h&&Gi(h),_=u&&g?ia({name:`${l} ${m}`,attributes:{url:Xc(c),type:`xhr`,"http.method":l,"http.url":p,"url.full":p,"server.address":f?.host,[P]:`auto.http.browser`,[N]:`http.client`,...f?.search&&{"http.query":f?.search},...f?.hash&&{"http.fragment":f?.hash}}}):new Zr;return u&&!g&&h?.recordDroppedEvent(`no_parent_span`,`span`),o.__sentry_xhr_span_id__=_.spanContext().spanId,r[o.__sentry_xhr_span_id__]=_,n(c)&&Kj(o,Wr()&&g?_:void 0,i),h&&h.emit(`beforeOutgoingRequestSpan`,_,e),_}function Kj(e,t,n){let{"sentry-trace":r,baggage:i,traceparent:a}=ol({span:t,propagateTraceparent:n});r&&qj(e,r,i,a)}function qj(e,t,n,r){let i=e.__sentry_xhr_v3__?.request_headers;if(!(i?.[`sentry-trace`]||!e.setRequestHeader))try{if(e.setRequestHeader(`sentry-trace`,t),r&&!i?.traceparent&&e.setRequestHeader(`traceparent`,r),n){let t=i?.baggage;(!t||!Ij(t))&&e.setRequestHeader(`baggage`,n)}}catch{}}var Jj=new WeakMap,Yj=new WeakMap,Xj=9e4,Zj=[`text/event-stream`,`application/x-ndjson`,`application/stream+json`],Qj=R(()=>({name:`FetchStreamPerformance`,setup(){Th(e=>{if(e.response){let t=Jj.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);let n=Yj.get(e.response);n&&clearTimeout(n)}}}),wh(e=>{if(e.endTimestamp&&e.response){let t=e.response.headers?.get(`content-type`)||``;if(e.response.headers?.get(`content-length`)||!Zj.some(e=>t.startsWith(e)))return;let n=e.fetchData?.url||``,r=e.fetchData?.method||`GET`,i=Kc(n),a=ia({name:`${r} ${n.startsWith(`data:`)?Xc(n):i?qc(i):n}`,startTime:e.endTimestamp,attributes:{url:Xc(n),"http.method":r,type:`fetch`,[N]:`http.client.stream`,[P]:`auto.http.browser.stream`}});Jj.set(e.response,a);let o=setTimeout(()=>{a.isRecording()&&a.end()},Xj);Yj.set(e.response,o)}})}})),$j=`WebVitals`,eM=R((e={})=>{let t=new Set(e.ignore??[]);return{name:$j,setup(n){let r=Gi(n),{enableStandaloneClsSpans:i,enableStandaloneLcpSpans:a}=e._experiments??{},o=r||t.has(`cls`)?void 0:i||!1,s=r||t.has(`lcp`)?void 0:a||!1,c=Hb({recordClsStandaloneSpans:o,recordLcpStandaloneSpans:s,client:n}),l=new WeakSet;n.on(`afterStartPageLoadSpan`,e=>{l.add(e)}),n.on(`spanEnd`,e=>{l.delete(e)&&(c(),Zb(e,{recordClsOnPageloadSpan:o===!1,recordLcpOnPageloadSpan:s===!1,spanStreamingEnabled:r}))}),r?(t.has(`lcp`)||Cx(n),t.has(`cls`)||Tx(n),t.has(`inp`)||Dx()):t.has(`inp`)||gx()},afterAllSetup(){t.has(`inp`)||xx()}}});function tM(){U.document?U.document.addEventListener(`visibilitychange`,()=>{let e=zr();if(!e)return;let t=I(e);if(U.document.hidden&&t){let e=`cancelled`,{op:n,status:r}=F(t);K&&x.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()}}):K&&x.warn(`[Tracing] Could not set up background tab detection due to lack of global document`)}var nM=`sentry_previous_trace`,rM=`sentry.previous_trace`;function iM(e,{linkPreviousTrace:t,consistentTraceSampling:n}){let r=t===`session-storage`,i=r?sM():void 0;e.on(`spanStart`,e=>{if(I(e)!==e)return;let t=k().getPropagationContext();i=aM(i,e,t),r&&oM(i)});let a=!0;n&&e.on(`beforeSampling`,e=>{if(!i)return;let t=k(),n=t.getPropagationContext();if(a&&n.parentSpanId){a=!1;return}t.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(i.sampleRate),sampled:String(cM(i.spanContext))},sampleRand:i.sampleRand}),e.parentSampled=cM(i.spanContext),e.parentSampleRate=i.sampleRate,e.spanAttributes={...e.spanAttributes,[gn]:i.sampleRate}})}function aM(e,t,n){let r=F(t);function i(){try{let e=Number(r.data?.[`sentry.sample_rate`]??n.dsc?.sample_rate);return Number.isNaN(e)?0:e}catch{return 0}}let a={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return a;let o=e.spanContext;return o.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=3600&&(K&&x.log(`Adding previous_trace \`${JSON.stringify(o)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:o,attributes:{[jn]:`previous_trace`}}),t.setAttribute(rM,`${o.traceId}-${o.spanId}-${+!!cM(o)}`)),a)}function oM(e){try{U.sessionStorage.setItem(nM,JSON.stringify(e))}catch(e){K&&x.warn(`Could not store previous trace in sessionStorage`,e)}}function sM(){try{let e=U.sessionStorage?.getItem(nM);return JSON.parse(e)}catch{return}}function cM(e){return e.traceFlags===1}var lM=`BrowserTracing`,uM=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function dM(){let e=U.navigator;return e?.userAgent?uM.test(e.userAgent):!1}var fM={...xa,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:`in-memory`,consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...Bj},pM=((e={})=>{`enableElementTiming`in e&&f(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});let t={name:void 0,source:void 0},n=U.document,{enableInp:r,enableLongTask:a,enableLongAnimationFrame:o,_experiments:{enableInteractions:s,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:l},beforeStartSpan:u,idleTimeout:d,finalTimeout:p,childSpanTimeout:m,markBackgroundSpan:h,traceFetch:g,traceXHR:_,trackFetchStreamPerformance:v,shouldCreateSpanForRequest:y,enableHTTPTimings:b,ignoreResourceSpans:S,ignorePerformanceApiSpans:C,instrumentPageLoad:w,instrumentNavigation:T,detectRedirects:ee,linkPreviousTrace:te,consistentTraceSampling:ne,enableReportPageLoaded:re,onRequestSpanStart:ie,onRequestSpanEnd:ae}={...fM,...e},oe=dM(),se,E;function ce(e,r,i=!0,a){let o=r.op===`pageload`,s=r.name,c=u?u(r):r,l=Kc(a||Ph()),f={...l?.pathname&&{"url.path":l.pathname},...l&&!Gc(l)&&{"url.full":l.href},...c.attributes};if(s!==c.name&&(f[M]=`custom`),c.attributes=f,!i){let e=St();ia({...c,startTime:e}).end(e);return}t.name=c.name,t.source=f[M];let h=Ea(c,{idleTimeout:d,finalTimeout:p,childSpanTimeout:m,disableAutoFinish:o,beforeSpanEnd:t=>{Xb(t,{ignoreResourceSpans:S,ignorePerformanceApiSpans:C,spanStreamingEnabled:Gi(e)}),xM(e,void 0);let n=k(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:h.spanContext().traceId,sampled:kr(h),dsc:gi(t)}),o&&(E=void 0)},trimIdleSpanEndTimestamp:!re});o&&re&&(E=h),xM(e,h);function g(){n&&[`interactive`,`complete`].includes(n.readyState)&&(e.emit(`idleSpanEnableAutoFinish`,h),n.removeEventListener(`readystatechange`,g))}o&&!re&&n&&(n.addEventListener(`readystatechange`,g),g())}return{name:lM,setup(e){if(oe){K&&x.log(`[Tracing] Skipping browserTracingIntegration setup for bot user agent.`);return}if(Ur(),o&&i.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes(`long-animation-frame`)?Wb():a&&Ub(),s&&Gb(),ee&&n){let e=()=>{se=O()};addEventListener(`click`,e,{capture:!0}),addEventListener(`keydown`,e,{capture:!0,passive:!0})}function t(){let t=bM(e);t&&!F(t).timestamp&&(K&&x.log(`[Tracing] Finishing current active span with op: ${F(t).op}`),t.setAttribute(_n,`cancelled`),t.end())}e.on(`startNavigationSpan`,(n,r)=>{if(j()!==e)return;if(r?.isRedirect){K&&x.warn(`[Tracing] Detected redirect, navigation span will not be the root span, but a child span.`),ce(e,{op:`navigation.redirect`,...n},!1,r.url);return}se=void 0,t(),A().setPropagationContext({traceId:Nt(),sampleRand:Math.random(),propagationSpanId:Wr()?void 0:Pt()});let i=k();i.setPropagationContext({traceId:Nt(),sampleRand:Math.random(),propagationSpanId:Wr()?void 0:Pt()}),i.setSDKProcessingMetadata({normalizedRequest:void 0}),ce(e,{op:`navigation`,...n,parentSpan:null,forceTransaction:!0},!0,r?.url)}),e.on(`startPageLoadSpan`,(n,r={})=>{if(j()!==e)return;t();let i=ur(r.sentryTrace||gM(`sentry-trace`)||_M(`sentry-trace`),r.baggage||gM(`baggage`)||_M(`baggage`)),a=k();a.setPropagationContext(i),Wr()||(a.getPropagationContext().propagationSpanId=Pt()),a.setSDKProcessingMetadata({normalizedRequest:kv()}),ce(e,{op:`pageload`,...n})}),e.on(`endPageloadSpan`,()=>{re&&E&&(E.setAttribute(_n,`reportPageLoaded`),E.end())})},afterAllSetup(e){if(oe)return;e.addIntegration&&!e.getIntegrationByName?.(`WebVitals`)&&e.addIntegration(eM({ignore:r?[]:[`inp`],_experiments:{enableStandaloneClsSpans:c,enableStandaloneLcpSpans:l}}));let n=Ph();if(te!==`off`&&iM(e,{linkPreviousTrace:te,consistentTraceSampling:ne}),U.location){if(w){let t=Dt();mM(e,{name:U.location.pathname,startTime:t?t/1e3:void 0,attributes:{[M]:`url`,[P]:`auto.pageload.browser`}})}T&&Bx(({to:t,from:r})=>{if(r===void 0&&n?.indexOf(t)!==-1){n=void 0;return}n=void 0;let i=Kc(t),a=bM(e),o=a&&ee&&CM(a,se);hM(e,{name:i?.pathname||U.location.pathname,attributes:{[M]:`url`,[P]:`auto.navigation.browser`}},{url:t,isRedirect:o})})}h&&tM(),s&&vM(e,d,p,m,t),Vj(e,{traceFetch:g,traceXHR:_,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:y,enableHTTPTimings:b,onRequestSpanStart:ie,onRequestSpanEnd:ae}),v&&e.addIntegration(Qj())}}});function mM(e,t,n){e.emit(`startPageLoadSpan`,t,n),k().setTransactionName(t.name);let r=bM(e);return r&&e.emit(`afterStartPageLoadSpan`,r),r}function hM(e,t,n){let{url:r,isRedirect:i}=n||{};e.emit(`beforeStartNavigationSpan`,t,{isRedirect:i,url:r}),e.emit(`startNavigationSpan`,t,{isRedirect:i,url:r});let a=k();return a.setTransactionName(t.name),r&&!i&&a.setSDKProcessingMetadata({normalizedRequest:{...kv(),url:r}}),bM(e)}function gM(e){return(U.document?.querySelector(`meta[name=${e}]`))?.getAttribute(`content`)||void 0}function _M(e){return(U.performance?.getEntriesByType?.(`navigation`)[0])?.serverTiming?.find(t=>t.name===e)?.description}function vM(e,t,n,r,i){let a=U.document,o;a&&addEventListener(`click`,()=>{let a=`ui.action.click`,s=bM(e);if(s){let e=F(s).op;if([`navigation`,`pageload`].includes(e)){K&&x.warn(`[Tracing] Did not create ${a} span because a pageload or navigation span is in progress.`);return}}if(o&&=(o.setAttribute(_n,`interactionInterrupted`),o.end(),void 0),!i.name){K&&x.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}o=Ea({name:i.name,op:a,attributes:{[M]:i.source||`url`}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})},{capture:!0})}var yM=`_sentry_idleSpan`;function bM(e){return e[yM]}function xM(e,t){D(e,yM,t)}var SM=1.5;function CM(e,t){let n=F(e),r=St();return!(r-n.start_timestamp>SM||t&&r-t<=SM)}function wM(e=j()){e?.emit(`endPageloadSpan`)}function TM(e){let t=zr();if(t===e)return;let n=k();e.end=new Proxy(e.end,{apply(e,r,i){return Rt(n,t),Reflect.apply(e,r,i)}}),Rt(n,e)}var EM=R(()=>({name:`SpanStreaming`,beforeSetup(e){let t=e.getOptions();t.traceLifecycle||=(K&&x.log('[SpanStreaming] setting `traceLifecycle` to "stream"'),`stream`)},setup(e){let t=`SpanStreaming integration requires`,n=`Falling back to static trace lifecycle.`,r=e.getOptions();if(!Gi(e)){r.traceLifecycle=`static`,K&&x.warn(`${t} \`traceLifecycle\` to be set to "stream"! ${n}`);return}let i=r.beforeSendSpan;if(i&&!yi(i)){r.traceLifecycle=`static`,K&&x.warn(`${t} a beforeSendSpan callback using \`withStreamedSpan\`! ${n}`);return}let a=new gh(e);e.on(`afterSpanEnd`,t=>{kr(t)&&a.add(Qa(t,e))}),e.on(`afterSegmentSpanEnd`,e=>{let t=e.spanContext().traceId;setTimeout(()=>{a.flush(t)},500)})}}));function DM(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function OM(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=DM(n);return e=>r.then(n=>e(n.transaction(t,`readwrite`).objectStore(t)))}function kM(e){return DM(e.getAllKeys())}function AM(e,t,n){return e(e=>kM(e).then(r=>{if(!(r.length>=n))return e.put(t,Math.max(...r,0)+1),DM(e.transaction)}))}function jM(e,t,n){return e(e=>kM(e).then(r=>{if(!(r.length>=n))return e.put(t,Math.min(...r,0)-1),DM(e.transaction)}))}function MM(e){return e(e=>kM(e).then(t=>{let n=t[0];if(n!=null)return DM(e.get(n)).then(t=>(e.delete(n),DM(e.transaction).then(()=>t)))}))}function NM(e){let t;function n(){return t??=OM(e.dbName||`sentry-offline`,e.storeName||`queue`),t}return{push:async t=>{try{let r=Ei(t);await AM(n(),r,e.maxQueueSize||30)}catch{}},unshift:async t=>{try{let r=Ei(t);await jM(n(),r,e.maxQueueSize||30)}catch{}},shift:async()=>{try{let e=await MM(n());if(e)return Oi(e)}catch{}}}}function PM(e){return t=>{let n=e({...t,createStore:NM});return U.addEventListener(`online`,async e=>{await n.flush()}),n}}function FM(e=aS){return PM(Pc(e))}var IM=1e6,LM=`window`in i&&i.window===i&&typeof importScripts>`u`,RM=`0`,zM=LM?`main`:`worker`,BM=U.navigator,VM=``,HM=``,UM=``,WM=BM?.userAgent||``,GM=``,KM=BM?.language||BM?.languages?.[0]||``;function qM(e){return typeof e==`object`&&!!e&&`getHighEntropyValues`in e}var JM=BM?.userAgentData;qM(JM)&&JM.getHighEntropyValues([`architecture`,`model`,`platform`,`platformVersion`,`fullVersionList`]).then(e=>{if(VM=e.platform||``,UM=e.architecture||``,GM=e.model||``,HM=e.platformVersion||``,e.fullVersionList?.length){let t=e.fullVersionList[e.fullVersionList.length-1];WM=`${t.brand} ${t.version}`}}).catch(e=>void 0);function YM(e){return!(`thread_metadata`in e)}function XM(e){return YM(e)?rN(e):e}function ZM(e){let t=e.contexts?.trace?.trace_id;return typeof t==`string`&&t.length!==32&&K&&x.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t==`string`?t:``}function QM(e,t,n,r){if(r.type!==`transaction`)throw TypeError(`Profiling events may only be attached to transactions, this should never occur.`);if(n==null)throw TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);let i=ZM(r),a=XM(n),o=t||(typeof r.start_timestamp==`number`?r.start_timestamp*1e3:O()*1e3),s=typeof r.timestamp==`number`?r.timestamp*1e3:O()*1e3;return{event_id:e,timestamp:new Date(o).toISOString(),platform:`javascript`,version:`1`,release:r.release||``,environment:r.environment||`production`,runtime:{name:`javascript`,version:U.navigator.userAgent},os:{name:VM,version:HM,build_number:WM},device:{locale:KM,model:GM,manufacturer:WM,architecture:UM,is_emulator:!1},debug_meta:{images:oN(n.resources)},profile:a,transactions:[{name:r.transaction||``,id:r.event_id||pt(),trace_id:i,active_thread_id:RM,relative_start_ns:`0`,relative_end_ns:((s-o)*1e6).toFixed(0)}]}}function $M(e,t,n){if(e==null)throw TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);let r=tN(e),i=t.getOptions(),a=t.getSdkMetadata?.()?.sdk;return{chunk_id:pt(),client_sdk:{name:a?.name??`sentry.javascript.browser`,version:a?.version??`0.0.0`},profiler_id:n||pt(),platform:`javascript`,version:`2`,release:i.release??``,environment:i.environment??`production`,debug_meta:{images:oN(e.resources)},profile:r}}function eN(e){try{if(!e||typeof e!=`object`)return{reason:`chunk is not an object`};let t=e=>typeof e==`string`&&/^[a-f0-9]{32}$/.test(e);if(!t(e.profiler_id))return{reason:`missing or invalid profiler_id`};if(!t(e.chunk_id))return{reason:`missing or invalid chunk_id`};if(!e.client_sdk)return{reason:`missing client_sdk metadata`};let n=e.profile;return n?!Array.isArray(n.frames)||!n.frames.length?{reason:`profile has no frames`}:!Array.isArray(n.stacks)||!n.stacks.length?{reason:`profile has no stacks`}:!Array.isArray(n.samples)||!n.samples.length?{reason:`profile has no samples`}:{valid:!0}:{reason:`missing profile data`}}catch(e){return{reason:`unknown validation error: ${e}`}}}function tN(e){let t=[];for(let n=0;n<e.frames.length;n++){let r=e.frames[n];r&&(t[n]={function:r.name,abs_path:typeof r.resourceId==`number`?e.resources[r.resourceId]:void 0,lineno:r.line,colno:r.column})}let n=[];for(let t=0;t<e.stacks.length;t++){let r=e.stacks[t];if(!r)continue;let i=[],a=r;for(;a;)i.push(a.frameId),a=a.parentId===void 0?void 0:e.stacks[a.parentId];n[t]=i}let r=Dt(),i=typeof performance.timeOrigin==`number`?performance.timeOrigin:r||0,a=i-(r||i),o=[];for(let t=0;t<e.samples.length;t++){let n=e.samples[t];if(!n)continue;let r=(i+(n.timestamp-a))/1e3;o[t]={stack_id:n.stackId??0,thread_id:RM,timestamp:r}}return{frames:t,stacks:n,samples:o,thread_metadata:{[RM]:{name:zM}}}}function nN(e){return F(e).op===`pageload`}function rN(e){let t,n=0,r={samples:[],stacks:[],frames:[],thread_metadata:{[RM]:{name:zM}}},i=e.samples[0];if(!i)return r;let a=i.timestamp,o=Dt(),s=typeof performance.timeOrigin==`number`?performance.timeOrigin:o||0,c=s-(o||s);return e.samples.forEach((i,o)=>{if(i.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[o]={elapsed_since_start_ns:((i.timestamp+c-a)*IM).toFixed(0),stack_id:t,thread_id:RM};return}let s=e.stacks[i.stackId],l=[];for(;s;){l.push(s.frameId);let t=e.frames[s.frameId];t&&r.frames[s.frameId]===void 0&&(r.frames[s.frameId]={function:t.name,abs_path:typeof t.resourceId==`number`?e.resources[t.resourceId]:void 0,lineno:t.line,colno:t.column}),s=s.parentId===void 0?void 0:e.stacks[s.parentId]}let u={elapsed_since_start_ns:((i.timestamp+c-a)*IM).toFixed(0),stack_id:n,thread_id:RM};r.stacks[n]=l,r.samples[o]=u,n++}),r}function iN(e,t){if(!t.length)return e;for(let n of t)e[1].push([{type:`profile`},n]);return e}function aN(e){let t=[];return Si(e,(e,n)=>{if(n===`transaction`)for(let n=1;n<e.length;n++)e[n]?.contexts?.profile?.profile_id&&t.push(e[n])}),t}function oN(e){let t=j()?.getOptions()?.stackParser;return t?vo(t,e):[]}function sN(e){return typeof e!=`number`&&typeof e!=`boolean`||typeof e==`number`&&isNaN(e)?(K&&x.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(K&&x.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function cN(e){return e.samples.length<2?(K&&x.log(`[Profiling] Discarding profile because it contains less than 2 samples`),!1):e.frames.length?!0:(K&&x.log(`[Profiling] Discarding profile because it contains no frames`),!1)}var lN=!1,uN=3e4;function dN(e){return typeof e==`function`}function fN(){let e=U.Profiler;if(!dN(e)){K&&x.log(`[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.`);return}let t=Math.floor(uN/10);try{return new e({sampleInterval:10,maxBufferSize:t})}catch{K&&(x.log(`[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header.`),x.log(`[Profiling] Disabling profiling for current user session.`)),lN=!0}}function pN(e){if(lN)return K&&x.log(`[Profiling] Profiling has been disabled for the duration of the current user session.`),!1;if(!e.isRecording())return K&&x.log(`[Profiling] Discarding profile because root span was not sampled.`),!1;let t=j()?.getOptions();if(!t)return K&&x.log(`[Profiling] Profiling disabled, no options found.`),!1;let n=t.profilesSampleRate;return sN(n)?n?n===!0||Math.random()<n?!0:(K&&x.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(n)})`),!1):(K&&x.log(`[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0`),!1):(K&&x.warn(`[Profiling] Discarding profile because of invalid sample rate.`),!1)}function mN(e){if(lN)return K&&x.log(`[Profiling] Profiling has been disabled for the duration of the current user session as the JS Profiler could not be started.`),!1;if(e.profileLifecycle!==`trace`&&e.profileLifecycle!==`manual`)return K&&x.warn("[Profiling] Session not sampled. Invalid `profileLifecycle` option."),!1;let t=e.profileSessionSampleRate;return sN(t)?t?Math.random()<=t:(K&&x.log(`[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0`),!1):(K&&x.warn(`[Profiling] Discarding profile because of invalid profileSessionSampleRate.`),!1)}function hN(e){return e.profilesSampleRate!==void 0}function gN(e,t,n,r){return cN(n)?QM(e,t,n,r):null}var _N=new Map;function vN(){return _N.size}function yN(e){let t=_N.get(e);return t&&_N.delete(e),t}function bN(e,t){if(_N.set(e,t),_N.size>30){let e=_N.keys().next().value;e!==void 0&&_N.delete(e)}}var xN=new WeakSet;function SN(e){e.setAttribute(`thread.id`,RM),e.setAttribute(`thread.name`,zM)}function CN(e){let t;nN(e)&&(t=O()*1e3);let n=fN();if(!n)return;K&&x.log(`[Profiling] started profiling span: ${F(e).description}`);let r=pt(),i=null;k().setContext(`profile`,{profile_id:r,start_timestamp:t}),xN.add(e),SN(e);async function a(){if(e&&n){if(i){K&&x.log(`[Profiling] profile for:`,F(e).description,`already exists, returning early`);return}return n.stop().then(t=>{if(o&&=(U.clearTimeout(o),void 0),K&&x.log(`[Profiling] stopped profiling of span: ${F(e).description}`),!t){K&&x.log(`[Profiling] profiler returned null profile for: ${F(e).description}`,`this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started`);return}i=t,bN(r,t)}).catch(e=>{K&&x.log(`[Profiling] error while stopping profiler:`,e)})}}let o=U.setTimeout(()=>{K&&x.log(`[Profiling] max profile duration elapsed, stopping profiling for:`,F(e).description),a()},uN),s=e.end.bind(e);function c(){return e?(a().then(()=>{s()},()=>{s()}),e):s()}e.end=c}var wN=6e4,TN=3e5,EN=class{constructor(){this._client=void 0,this._profiler=void 0,this._chunkTimer=void 0,this._profilerId=void 0,this._isRunning=!1,this._sessionSampled=!1,this._lifecycleMode=void 0,this._activeRootSpanIds=new Set,this._rootSpanTimeouts=new Map}initialize(e){let t=e.getOptions().profileLifecycle,n=mN(e.getOptions());K&&x.log(`[Profiling] Initializing profiler (lifecycle='${t}').`),n||K&&x.log(`[Profiling] Session not sampled. Skipping lifecycle profiler initialization.`),this._profilerId=pt(),this._client=e,this._sessionSampled=n,this._lifecycleMode=t,t===`trace`&&this._setupTraceLifecycleListeners(e),e.on(`spanStart`,e=>{this._isRunning&&SN(e)})}start(){if(this._lifecycleMode===`trace`){K&&x.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.');return}if(this._isRunning){K&&x.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op.");return}if(!this._sessionSampled){K&&x.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.");return}this._beginProfiling()}stop(){if(this._lifecycleMode===`trace`){K&&x.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.');return}if(!this._isRunning){K&&x.warn("[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op.");return}this._endProfiling()}notifyRootSpanActive(e){if(this._lifecycleMode!==`trace`||!this._sessionSampled)return;let t=e.spanContext().spanId;if(!t||this._activeRootSpanIds.has(t))return;this._registerTraceRootSpan(t);let n=this._activeRootSpanIds.size;n===1&&(K&&x.log(`[Profiling] Detected already active root span during setup. Active root spans now:`,n),this._beginProfiling()),this._isRunning&&SN(e)}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,K&&x.log(`[Profiling] Started profiling with profiler ID:`,this._profilerId),dn().setContext(`profile`,{profiler_id:this._profilerId}),this._startProfilerInstance(),!this._profiler){K&&x.log(`[Profiling] Failed to start JS Profiler; stopping.`),this._resetProfilerInfo();return}this._startPeriodicChunking()}}_endProfiling(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&=(clearTimeout(this._chunkTimer),void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(e=>{K&&x.error("[Profiling] Failed to collect current profile chunk on `stop()`:",e)}),this._lifecycleMode===`manual`&&dn().setContext(`profile`,{}))}_setupTraceLifecycleListeners(e){e.on(`spanStart`,e=>{if(!this._sessionSampled){K&&x.log(`[Profiling] Span not profiled because of negative sampling decision for user session.`);return}if(e!==I(e))return;if(!e.isRecording()){K&&x.log(`[Profiling] Discarding profile because root span was not sampled.`);return}let t=e.spanContext().spanId;if(!t||this._activeRootSpanIds.has(t))return;this._registerTraceRootSpan(t);let n=this._activeRootSpanIds.size;n===1&&(K&&x.log(`[Profiling] Root span ${t} started. Profiling active while there are active root spans (count=${n}).`),this._beginProfiling())}),e.on(`spanEnd`,e=>{if(!this._sessionSampled)return;let t=e.spanContext().spanId;if(!t||!this._activeRootSpanIds.has(t))return;this._activeRootSpanIds.delete(t);let n=this._activeRootSpanIds.size;K&&x.log(`[Profiling] Root span with ID ${t} ended. Will continue profiling for as long as there are active root spans (currently: ${n}).`),n===0&&(this._collectCurrentChunk().catch(e=>{K&&x.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",e)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,dn().setContext(`profile`,{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(e=>clearTimeout(e)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(e){this._activeRootSpanIds.add(e);let t=setTimeout(()=>this._onRootSpanTimeout(e),TN);this._rootSpanTimeouts.set(e,t)}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;let e=fN();if(!e){K&&x.log(`[Profiling] Failed to start JS Profiler.`);return}this._profiler=e}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(e=>{K&&x.error(`[Profiling] Failed to collect current profile chunk during periodic chunking:`,e)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},wN))}_onRootSpanTimeout(e){this._rootSpanTimeouts.has(e)&&(this._rootSpanTimeouts.delete(e),this._activeRootSpanIds.has(e)&&(K&&x.log(`[Profiling] Reached 5-minute timeout for root span ${e}. You likely started a manual root span that never called \`.end()\`.`),this._activeRootSpanIds.delete(e),this._activeRootSpanIds.size===0&&this._endProfiling()))}async _collectCurrentChunk(){let e=this._profiler;if(this._profiler=void 0,e)try{let t=$M(await e.stop(),this._client,this._profilerId),n=eN(t);if(`reason`in n){K&&x.log(`[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):`,n.reason);return}this._sendProfileChunk(t),K&&x.log(`[Profiling] Collected browser profile chunk.`)}catch(e){K&&x.log(`[Profiling] Error while stopping JS Profiler for chunk:`,e)}}_sendProfileChunk(e){let t=this._client,n=Pi(t.getSdkMetadata?.()),r=t.getDsn(),i=t.getOptions().tunnel,a=bi({event_id:pt(),sent_at:new Date().toISOString(),...n&&{sdk:n},...!!i&&r&&{dsn:er(r)}},[[{type:`profile_chunk`,platform:`javascript`},e]]);t.sendEnvelope(a).then(null,e=>{K&&x.error(`Error while sending profile chunk envelope:`,e)})}},DN=`BrowserProfiling`,ON=R((()=>({name:DN,setup(e){let t=e.getOptions(),n=new EN;if(!hN(t)&&!t.profileLifecycle&&(t.profileLifecycle=`manual`),hN(t)&&!t.profilesSampleRate){K&&x.log(`[Profiling] Profiling disabled, no profiling options found.`);return}let r=zr(),i=r&&I(r);if(hN(t)&&t.profileSessionSampleRate!==void 0&&K&&x.warn("[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled."),hN(t))i&&nN(i)&&pN(i)&&CN(i),e.on(`spanStart`,e=>{let t=I(e);e===t?pN(e)&&CN(e):xN.has(t)&&SN(e)}),e.on(`beforeEnvelope`,e=>{if(!vN())return;let t=aN(e);if(!t.length)return;let n=[];for(let e of t){let t=e?.contexts,r=t?.profile?.profile_id,i=t?.profile?.start_timestamp;if(typeof r!=`string`){K&&x.log(`[Profiling] cannot find profile for a span without a profile context`);continue}if(!r){K&&x.log(`[Profiling] cannot find profile for a span without a profile context`);continue}t?.profile&&delete t.profile;let a=yN(r);if(!a){K&&x.log(`[Profiling] Could not retrieve profile for span: ${r}`);continue}let o=gN(r,i,a,e);o&&n.push(o)}iN(e,n)});else{let r=t.profileLifecycle;if(e.on(`startUIProfiler`,()=>n.start()),e.on(`stopUIProfiler`,()=>n.stop()),r===`manual`)n.initialize(e);else if(r===`trace`){if(!Wr(t)){K&&x.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.");return}n.initialize(e),i&&n.notifyRootSpanActive(i),U.setTimeout(()=>{let e=zr(),t=e&&I(e);t&&n.notifyRootSpanActive(t)},0)}}}}))),kN=`SpotlightBrowser`,AN=[{op:`ui.interaction.click`,name:`#sentry-spotlight`}],jN=((e={})=>{let t=e.sidecarUrl||`http://localhost:8969/stream`;return{name:kN,setup:()=>{K&&x.log(`Using Sidecar URL`,t)},beforeSetup(e){let t=e.getOptions();t.ignoreSpans=[...t.ignoreSpans||[],...AN]},afterAllSetup:e=>{MN(e,t)}}});function MN(e,t){let n=Wx(`fetch`),r=0;e.on(`beforeEnvelope`,e=>{if(r>3){x.warn(`[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:`,r);return}n(t,{method:`POST`,body:Ei(e),headers:{"Content-Type":`application/x-sentry-envelope`},mode:`cors`}).then(e=>{e.status>=200&&e.status<400&&(r=0)},e=>{r++,x.error(`Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/`,e)})})}var NN=R(jN),PN=R(()=>({name:`LaunchDarkly`,processEvent(e,t,n){return Qu(e)}}));function FN(){return{name:`sentry-flag-auditor`,type:`flag-used`,synchronous:!0,method:(e,t,n)=>{$u(e,t.value),td(e,t.value)}}}var IN=R(()=>({name:`OpenFeature`,processEvent(e,t,n){return Qu(e)}})),LN=class{after(e,t){$u(t.flagKey,t.value),td(t.flagKey,t.value)}error(e,t,n){$u(e.flagKey,e.defaultValue),td(e.flagKey,e.defaultValue)}},RN=R(({featureFlagClientClass:e})=>({name:`Unleash`,setupOnce(){let t=e.prototype;Ne(t,`isEnabled`,zN)},processEvent(e,t,n){return Qu(e)}}));function zN(e){return function(...t){let n=t[0],r=e.apply(this,t);return typeof n==`string`&&typeof r==`boolean`?($u(n,r),td(n,r)):K&&x.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}var BN=(({growthbookClass:e})=>rd({growthbookClass:e})),VN=R(({featureFlagClient:e})=>({name:`Statsig`,setup(t){e.on(`gate_evaluation`,e=>{$u(e.gate.name,e.gate.value),td(e.gate.name,e.gate.value)})},processEvent(e,t,n){return Qu(e)}}));async function HN(){let e=j();if(!e)return`no-client-active`;if(!e.getDsn())return`no-dsn-configured`;let t=e.getOptions().tunnel||`https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7`;try{await ca(()=>fetch(t,{body:`{}`,method:`POST`,mode:`cors`,credentials:`omit`}))}catch{return`sentry-unreachable`}}var UN=`WebWorker`,WN=R(({worker:e})=>({name:UN,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(e=>GN(e))},addWorker:e=>GN(e)}));function GN(e){e.addEventListener(`message`,e=>{if(JN(e.data)){if(e.stopImmediatePropagation(),e.data._sentryDebugIds&&(K&&x.log(`Sentry debugId web worker message received`,e.data),U._sentryDebugIds={...e.data._sentryDebugIds,...U._sentryDebugIds}),e.data._sentryModuleMetadata&&(K&&x.log(`Sentry module metadata web worker message received`,e.data),U._sentryModuleMetadata={...e.data._sentryModuleMetadata,...U._sentryModuleMetadata}),e.data._sentryWasmImages){K&&x.log(`Sentry WASM images web worker message received`,e.data);let t=U._sentryWasmImages||[],n=e.data._sentryWasmImages.filter(e=>Ee(e)&&typeof e.code_file==`string`&&!t.some(t=>t.code_file===e.code_file));U._sentryWasmImages=[...t,...n]}e.data._sentryWorkerError&&(K&&x.log(`Sentry worker rejection message received`,e.data._sentryWorkerError),KN(e.data._sentryWorkerError))}})}function KN(e){let t=j();if(!t)return;let n=t.getOptions().stackParser,r=t.getOptions().attachStacktrace,i=e.reason,a=Te(i)?cC(i):Xv(n,i,void 0,r,!0);a.level=`error`,e.filename&&(a.contexts={...a.contexts,worker:{filename:e.filename}}),jo(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.web_worker.onunhandledrejection`}}),K&&x.log(`Captured worker unhandled rejection`,i)}function qN({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0}),e.addEventListener(`unhandledrejection`,t=>{let n={reason:sC(t),filename:e.location?.href};e.postMessage({_sentryMessage:!0,_sentryWorkerError:n}),K&&x.log(`[Sentry Worker] Forwarding unhandled rejection to parent`,n)}),K&&x.log(`[Sentry Worker] Registered worker with unhandled rejection handling`)}function JN(e){if(!Ee(e)||e._sentryMessage!==!0)return!1;let t=`_sentryDebugIds`in e,n=`_sentryModuleMetadata`in e,r=`_sentryWorkerError`in e,i=`_sentryWasmImages`in e;return!(!t&&!n&&!r&&!i||t&&!(Ee(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!(Ee(e._sentryModuleMetadata)||e._sentryModuleMetadata===void 0)||r&&!Ee(e._sentryWorkerError)||i&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(e=>Ee(e)&&typeof e.code_file==`string`)))}var YN=e(n());function XN(e){return Ee(e)&&`nativeEvent`in e&&`preventDefault`in e&&`stopPropagation`in e}function ZN(e){let t={...e};al(t,`react`),Mo(`react`,{version:YN.version});let n=wC(t);return Xe(QN),n}function QN(e){return XN(e)?`[SyntheticEvent]`:yC(e)}function $N(e){let t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function eP(e,t){let n=new WeakSet;function r(e,t){if(!n.has(e)){if(e.cause)return n.add(e),r(e.cause,t);e.cause=t}}r(e,t)}function tP(e,{componentStack:t},n){if($N(YN.version)&&ve(e)&&t){let n=Error(e.message);n.name=`React ErrorBoundary ${e.name}`,n.stack=t,eP(e,n)}return L(e,n)}function nP(e){return(t,n)=>{let r=!!e,i=tP(t,n,{mechanism:{handled:r,type:`auto.function.react.error_handler`}});r&&e(t,n,i)}}var rP=`ui.react.render`,iP=`ui.react.update`,aP=`ui.react.mount`,oP={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},sP={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},cP={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},lP={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},uP=Symbol.for(`react.forward_ref`),dP=Symbol.for(`react.memo`);function fP(e){return typeof e==`object`&&!!e&&e.$$typeof===dP}var pP={};pP[uP]=cP,pP[dP]=lP;function mP(e){if(fP(e))return lP;let t=e.$$typeof;return t&&pP[t]||oP}var hP=Object.defineProperty.bind(Object),gP=Object.getOwnPropertyNames.bind(Object),_P=Object.getOwnPropertySymbols?.bind(Object),vP=Object.getOwnPropertyDescriptor.bind(Object),yP=Object.getPrototypeOf.bind(Object),bP=Object.prototype;function xP(e,t,n){if(typeof t!=`string`){if(bP){let n=yP(t);n&&n!==bP&&xP(e,n)}let n=gP(t);_P&&(n=n.concat(_P(t)));let r=mP(e),i=mP(t);for(let a of n)if(!sP[a]&&!i?.[a]&&!r?.[a]&&!vP(e,a)){let n=vP(t,a);if(n)try{hP(e,a,n)}catch{}}}return e}var SP=class extends YN.Component{constructor(e){super(e);let{name:t,disabled:n=!1}=this.props;n||(this._mountSpan=ia({name:`<${t}>`,onlyIfParent:!0,op:aP,attributes:{[P]:`auto.ui.react.profiler`,"ui.component_name":t}}))}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:e,includeUpdates:t=!0}){if(t&&this._mountSpan&&e!==this.props.updateProps){let t=Object.keys(e).filter(t=>e[t]!==this.props.updateProps[t]);if(t.length>0){let e=O();this._updateSpan=sa(this._mountSpan,()=>ia({name:`<${this.props.name}>`,onlyIfParent:!0,op:iP,startTime:e,attributes:{[P]:`auto.ui.react.profiler`,"ui.component_name":this.props.name,"ui.react.changed_props":t}}))}}return!0}componentDidUpdate(){this._updateSpan&&=(this._updateSpan.end(),void 0)}componentWillUnmount(){let e=O(),{name:t,includeRender:n=!0}=this.props;if(this._mountSpan&&n){let n=F(this._mountSpan).timestamp;sa(this._mountSpan,()=>{let r=ia({onlyIfParent:!0,name:`<${t}>`,op:rP,startTime:n,attributes:{[P]:`auto.ui.react.profiler`,"ui.component_name":t}});r&&r.end(e)})}}render(){return this.props.children}};Object.assign(SP,{defaultProps:{disabled:!1,includeRender:!0,includeUpdates:!0}});function CP(e,t){let n=t?.name||e.displayName||e.name||`unknown`,r=r=>YN.createElement(SP,{...t,name:n,updateProps:r},YN.createElement(e,{...r}));return r.displayName=`profiler(${n})`,xP(r,e),r}function wP(e,t={disabled:!1,hasRenderSpan:!0}){let[n]=YN.useState(()=>{if(!t?.disabled)return ia({name:`<${e}>`,onlyIfParent:!0,op:aP,attributes:{[P]:`auto.ui.react.profiler`,"ui.component_name":e}})});YN.useEffect(()=>(n&&n.end(),()=>{if(n&&t.hasRenderSpan){let t=F(n).timestamp,r=O(),i=ia({name:`<${e}>`,onlyIfParent:!0,op:rP,startTime:t,attributes:{[P]:`auto.ui.react.profiler`,"ui.component_name":e}});i&&i.end(r)}}),[])}var TP=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,EP={componentStack:null,error:null,eventId:null},DP=class extends YN.Component{constructor(e){super(e),this.state=EP,this._openFallbackReportDialog=!0;let t=j();t&&e.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=t.on(`afterSendEvent`,t=>{!t.type&&this._lastEventId&&t.event_id===this._lastEventId&&DC({...e.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(e,t){let{componentStack:n}=t,{beforeCapture:r,onError:i,showDialog:a,dialogOptions:o}=this.props;fn(s=>{r&&r(s,e,n);let c=tP(e,t,{mechanism:{handled:this.props.handled==null?!!this.props.fallback:this.props.handled,type:`auto.function.react.error_boundary`}});i&&i(e,n,c),a&&(this._lastEventId=c,this._openFallbackReportDialog&&DC({...o,eventId:c})),this.setState({error:e,componentStack:n,eventId:c})})}componentDidMount(){let{onMount:e}=this.props;e&&e()}componentWillUnmount(){let{error:e,componentStack:t,eventId:n}=this.state,{onUnmount:r}=this.props;r&&(this.state===EP?r(null,null,null):r(e,t,n)),this._cleanupHook&&=(this._cleanupHook(),void 0)}resetErrorBoundary(){let{onReset:e}=this.props,{error:t,componentStack:n,eventId:r}=this.state;e&&e(t,n,r),this.setState(EP)}render(){let{fallback:e,children:t}=this.props,n=this.state;if(n.componentStack===null)return typeof t==`function`?t():t;let r=typeof e==`function`?YN.createElement(e,{error:n.error,componentStack:n.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:n.eventId}):e;return YN.isValidElement(r)?r:(e&&TP&&x.warn(`fallback did not produce a valid ReactElement`),null)}};function OP(e,t){let n=e.displayName||e.name||`unknown`,r=YN.memo(n=>YN.createElement(DP,{...t},YN.createElement(e,{...n})));return r.displayName=`errorBoundary(${n})`,xP(r,e),r}var kP=`redux.action`,AP=`info`,jP={attachReduxState:!0,actionTransformer:e=>e,stateTransformer:e=>e||null};function MP(e){let t={...jP,...e};return e=>(n,r)=>{t.attachReduxState&&dn().addEventProcessor((e,t)=>{try{e.type===void 0&&e.contexts.state.state.type===`redux`&&(t.attachments=[...t.attachments||[],{filename:`redux_state.json`,data:JSON.stringify(e.contexts.state.state.value)}])}catch{}return e});function i(e){return(n,r)=>{let i=e(n,r),a=k(),o=t.actionTransformer(r);o!=null&&ul({category:kP,data:o,type:AP});let s=t.stateTransformer(i);if(s!=null){let e=j()?.getOptions()?.normalizeDepth||3,t={state:{type:`redux`,value:s}};Ke(t,3+e),a.setContext(`state`,t)}else a.setContext(`state`,null);let{configureScopeWithState:c}=t;return typeof c==`function`&&c(a,i),i}}let a=e(i(n),r);return a.replaceReducer=new Proxy(a.replaceReducer,{apply:function(e,t,n){e.apply(t,[i(n[0])])}}),a}}function NP(e){let t=pM({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,match:i,instrumentPageLoad:a=!0,instrumentNavigation:o=!0}=e;return{...t,afterAllSetup(e){t.afterAllSetup(e),a&&U.location&&PP(r,U.location,i,(t,n=`url`)=>{mM(e,{name:t,attributes:{[N]:`pageload`,[P]:`auto.pageload.react.reactrouter_v3`,[M]:n,...n===`route`&&{"url.template":t}}})}),o&&n.listen&&n.listen(t=>{(t.action===`PUSH`||t.action===`POP`)&&PP(r,t,i,(t,n=`url`)=>{hM(e,{name:t,attributes:{[N]:`navigation`,[P]:`auto.navigation.react.reactrouter_v3`,[M]:n,...n===`route`&&{"url.template":t}}})})})}}}function PP(e,t,n,r){let i=t.pathname;n({location:t,routes:e},(e,t,n)=>{if(e||!n)return r(i);let a=FP(n.routes||[]);return a.length===0||a===`/*`?r(i):(i=a,r(i,`route`))})}function FP(e){if(!Array.isArray(e)||e.length===0)return``;let t=e.filter(e=>!!e.path),n=-1;for(let e=t.length-1;e>=0;e--)if(t[e].path?.startsWith(`/`)){n=e;break}return t.slice(n).reduce((e,{path:t})=>`${e}${e===`/`||e===``?t:`/${t}`}`,``)}function IP(e,t={}){let n=e,r=pM({...t,instrumentNavigation:!1,instrumentPageLoad:!1}),{instrumentPageLoad:i=!0,instrumentNavigation:a=!0}=t;return{...r,afterAllSetup(e){r.afterAllSetup(e);let t=(e,t)=>{let r=n.matchRoutes(e,t,{preload:!1,throwOnError:!1}),i=r[r.length-1];return i?.routeId===`__root__`?void 0:i},o=(e,t,r,i)=>{e.updateName(t?t.routeId:i),e.setAttribute(M,t?`route`:`url`),e.setAttributes({...t&&{"url.template":t.routeId},...RP(n,r),...zP(t)})},s=U.location;if(i&&s){let r=t(s.pathname,n.options.parseSearch(s.search)),i=mM(e,{name:r?r.routeId:s.pathname,attributes:{[N]:`pageload`,[P]:`auto.pageload.react.tanstack_router`,[M]:r?`route`:`url`,...r&&{"url.template":r.routeId},...zP(r)}}),a=n.subscribe(`onResolved`,e=>{if(a(),!i)return;let{toLocation:n}=e,r=t(n.pathname,n.search);o(i,r,n,n.pathname)})}if(a){let r;n.subscribe(`onBeforeLoad`,i=>{let{toLocation:a,fromLocation:s}=i;if(!s||a.state===s.state)return;let c=t(a.pathname,a.search),l=U.location?.pathname||a.pathname;if(r){o(r,c,a,l);return}r=hM(e,{name:c?c.routeId:l,attributes:{[N]:`navigation`,[P]:`auto.navigation.react.tanstack_router`,[M]:c?`route`:`url`,...c&&{"url.template":c.routeId},...zP(c)}},{url:LP(n,a)})}),n.subscribe(`onResolved`,e=>{let n=r;if(r=void 0,!n)return;let{toLocation:i}=e,a=t(i.pathname,i.search);a&&o(n,a,i,U.location?.pathname||i.pathname)})}}}}function LP(e,t){let n=e.options.stringifySearch?.(t.search)??``;return rS(`${t.pathname}${n&&n!==`?`?n:``}`)}function RP(e,t){let n=LP(e,t);return{[ci]:t.pathname,[si]:n}}function zP(e){if(!e)return{};let t={};return Object.entries(e.params).forEach(([e,n])=>{t[`url.path.params.${e}`]=n,t[li.replace(`<key>`,e)]=n,t[$r.replace(`<key>`,e)]=n}),t}function BP(e){let t=pM({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:i,instrumentPageLoad:a=!0,instrumentNavigation:o=!0}=e;return{...t,afterAllSetup(e){t.afterAllSetup(e),HP(e,a,o,n,`reactrouter_v4`,r,i)}}}function VP(e){let t=pM({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:i,instrumentPageLoad:a=!0,instrumentNavigation:o=!0}=e;return{...t,afterAllSetup(e){t.afterAllSetup(e),HP(e,a,o,n,`reactrouter_v5`,r,i)}}}function HP(e,t,n,r,i,a=[],o){function s(){if(r.location)return r.location.pathname;if(U.location)return U.location.pathname}function c(e){if(a.length===0||!o)return[e,`url`];let t=UP(a,e,o);for(let e of t)if(e.match.isExact)return[e.match.path,`route`];return[e,`url`]}if(t){let t=s();if(t){let[n,r]=c(t);mM(e,{name:n,attributes:{[N]:`pageload`,[P]:`auto.pageload.react.${i}`,[M]:r,...r===`route`&&{"url.template":n}}})}}n&&r.listen&&r.listen((t,n)=>{if(n&&(n===`PUSH`||n===`POP`)){let[n,r]=c(t.pathname);hM(e,{name:n,attributes:{[N]:`navigation`,[P]:`auto.navigation.react.${i}`,[M]:r,...r===`route`&&{"url.template":n}}})}})}function UP(e,t,n,r=[]){return e.some(e=>{let i=e.path?n(t,e):r.length?r[r.length-1].match:WP(t);return i&&(r.push({route:e,match:i}),e.routes&&UP(e.routes,t,n,r)),!!i}),r}function WP(e){return{path:`/`,url:`/`,params:{},isExact:e===`/`}}function GP(e){let t=e.displayName||e.name,n=t=>{if(t?.computedMatch?.isExact){let e=t.computedMatch.path,n=KP();k().setTransactionName(e),n&&(n.updateName(e),n.setAttributes({[M]:`route`,[ui]:e}))}return YN.createElement(e,{...t})};return n.displayName=`sentryRoute(${t})`,xP(n,e),n}function KP(){let e=zr(),t=e&&I(e);if(!t)return;let n=F(t).op;return n===`navigation`||n===`pageload`?t:void 0}function qP(e,t){if(!t||t===`/`||!e.toLowerCase().startsWith(t.toLowerCase()))return e;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?e:e.slice(n)||`/`}var JP=new WeakMap;function YP(e,t,n){if(!e||!t?.length)return null;let r=n?qP(e,n):e,i=JP.get(t);i||(i=aF(t),JP.set(t,i),TP&&x.log(`[React Router] Sorted route manifest by specificity:`,i.length,`patterns`));for(let e of i)if(XP(r,e))return TP&&x.log(`[React Router] Matched pathname`,r,`to pattern`,e),e;return TP&&x.log(`[React Router] No manifest match found for pathname:`,r),null}function XP(e,t){if(t===`/`)return e===`/`||e===``;let n=QP(e),r=QP(t);if(r.length>0&&r[r.length-1]===`*`){let e=r.slice(0,-1);if(n.length<e.length)return!1;for(let[t,r]of e.entries())if(!ZP(n[t],r))return!1;return!0}if(n.length!==r.length)return!1;for(let[e,t]of r.entries())if(!ZP(n[e],t))return!1;return!0}function ZP(e,t){return e===void 0||t===void 0?!1:$P.test(t)?!0:e===t}function QP(e){return e.split(`/`).filter(Boolean)}var $P=/^:[\w-]+$/,eF=10,tF=3,nF=1,rF=-2;function iF(e){let t=e.split(`/`),n=t.length;t.includes(`*`)&&(n+=rF);for(let e of t)if(e===`*`)continue;else $P.test(e)?n+=tF:e===``?n+=nF:n+=eF;return n}function aF(e){return[...e].sort((e,t)=>{let n=iF(e);return iF(t)-n})}var oF,sF=!1,cF=[],lF=10;function uF(e,t){let n={};return cF.length>=lF&&(TP&&x.warn(`[React Router] Navigation context stack overflow - removing oldest context`),cF.shift()),cF.push({token:n,targetPath:e,span:t}),n}function dF(e){cF[cF.length-1]?.token===e&&cF.pop()}function fF(){let e=cF.length;return e>0?cF[e-1]??null:null}function pF(e,t=!1){oF=e,sF=t}function mF(e){return gF(e.route.path||``)}function hF(e){return e.params[`*`]||``}function gF(e){return e[e.length-1]===`*`?e.slice(0,-1):e}function _F(e){return e[e.length-1]===`/`?e.slice(0,-1):e}function vF(e){return e.endsWith(`*`)}function yF(e){return e.includes(`/*`)||e.endsWith(`*`)}function bF(e,t){return vF(e)&&!!t.route.children?.length||!1}function xF(e){return!!(!e.children&&e.element&&e.path?.endsWith(`/*`))}function SF(e,t,n){let r=e&&e.length>0?e:sF?qP(t,n):t,i=r.slice(-2)===`/*`?r.slice(0,-2):r;return i.length>1&&i[i.length-1]===`/`&&(i=i.slice(0,-1)),[i,`route`]}function CF(e){return e.split(/\\?\//).filter(e=>e.length>0&&e!==`,`).length}function wF(e){return e[0]===`/`?e:`/${e}`}function TF(e,t){let n=oF(e,t);if(!n||n.length===0)return``;for(let r of n)if(r.route.path&&r.route.path!==`*`){let n=mF(r),i=qP(t.pathname,wF(r.pathnameBase));return t.pathname===i?_F(i):_F(_F(n||``)+wF(TF(e.filter(e=>e!==r.route),{pathname:i})))}return``}function EF(e,t){let n=oF(t,e);if(n){for(let e of n)if(xF(e.route)&&hF(e))return!0}return!1}function DF(e,t){return sF?qP(e.pathname,t):e.pathname||``}function OF(e,t,n,r=``){if(!e||e.length===0)return[sF?qP(t.pathname,r):t.pathname,`url`];if(!n)return[DF(t,r),`url`];let i=``;for(let e of n){let n=e.route;if(!n)continue;if(n.index)return SF(i,e.pathname,r);let a=n.path;if(!a||bF(a,e))continue;let o=a[0]===`/`||i[i.length-1]===`/`?a:`/${a}`;if(i=_F(i)+wF(o),_F(t.pathname)===_F(r+e.pathname))return CF(i)!==CF(e.pathname)&&!vF(i)?[(sF?``:r)+o,`route`]:(bF(i,e)&&(i=i.slice(0,-1)),[(sF?``:r)+i,`route`])}return[DF(t,r),`url`]}function kF(e,t,n,r,i=``,a,o){if(o&&a&&a.length>0){let t=YP(e.pathname,a,i);if(t)return[(sF?``:i)+t,`route`]}let s,c=`url`,l=EF(e,n);return l&&(s=wF(TF(n,e)),c=`route`),(!l||!s)&&([s,c]=OF(t,e,r,i)),[s||e.pathname,c]}function AF(){let e=zr(),t=e?I(e):void 0;if(!t)return;let n=F(t).op;return n===`navigation`||n===`pageload`?t:void 0}function jF(){let e=fF();if(e)return e.targetPath?{pathname:e.targetPath,search:``,hash:``,state:null,key:`default`}:null;if(U!==void 0)try{let e=U.location;if(e)return{pathname:e.pathname,search:e.search||``,hash:e.hash||``,state:null,key:`default`}}catch{TP&&x.warn(`[React Router] Could not access window.location`)}return null}function MF(){let e=fF();return e?e.span:AF()}function NF(e,t,n,r){let i=new Proxy(e,{apply(e,i,a){let o=jF(),s=MF(),c=e.apply(i,a);return PF(c,t,n,r,o,s),c}});return D(i,`__sentry_proxied__`,!0),i}function PF(e,t,n,r,i,a){Ae(e)?e.then(e=>{Array.isArray(e)&&r(e,t,i??void 0,a)}).catch(e=>{TP&&x.warn(`Error resolving async handler '${n}' for route`,t,e)}):Array.isArray(e)&&r(e,t,i??void 0,a)}function FF(e,t){if(e.handle&&typeof e.handle==`object`)for(let n of Object.keys(e.handle)){let r=e.handle[n];typeof r==`function`&&!r.__sentry_proxied__&&(e.handle[n]=NF(r,e,n,t))}if(Array.isArray(e.children))for(let n of e.children)FF(n,t)}var IF,LF,RF,zF,BF,VF=!1,HF=3e3,UF,WF=``,GF=new WeakSet,KF=U?.document?YN.useLayoutEffect:YN.useEffect,qF=new WeakMap,JF=new Set,YF=new WeakMap,XF=new WeakMap;function ZF(e){return U?.requestAnimationFrame?U.requestAnimationFrame(e):setTimeout(e,0)}function QF(e){U?.cancelAnimationFrame?U.cancelAnimationFrame(e):clearTimeout(e)}function $F(e){return`${e.pathname}${e.search||``}${e.hash||``}`}function eI(e){return e.includes(`:`)||e.includes(`*`)}function tI(e,t,n,r){if(!e)return{skip:!1,shouldUpdate:!1};if(e.locationKey===t&&(e.isPlaceholder||!r)){let t=!!e.routeName&&yF(e.routeName),r=yF(n),i=!!e.routeName&&eI(e.routeName),a=eI(n),o=t&&!r,s=!i&&a,c=n!==e.routeName&&n.length>(e.routeName?.length||0)&&!r;return{skip:!0,shouldUpdate:!!(e.routeName&&(o||s||c))}}return{skip:!1,shouldUpdate:!1}}function nI(e,t){let n=t.children||[],r=e.filter(e=>!n.some(t=>t===e||e.path&&t.path===e.path||e.id&&t.id===e.id));r.length>0&&(t.children=[...n,...r])}function rI(e,t){let n=YF.get(e);n||(n=new Set,YF.set(e,n)),n.add(t),t.finally(()=>{let n=YF.get(e);n&&n.delete(t)})}function iI(e){rI(e,new Promise(t=>{XF.set(e,t)}))}function aI(e){let t=XF.get(e);t&&(t(),XF.delete(e),e.__sentry_may_have_lazy_routes__&&=!1)}function oI(e,t,n=null,r){e.forEach(e=>{JF.add(e),VF&&FF(e,oI)}),t&&nI(e,t);let i=r??AF();if(i){let e=F(i);if(e.timestamp){TP&&x.warn(`[React Router] Lazy handler resolved after span ended - skipping update`);return}let t=e.op,a=n;if(!a&&!r&&U!==void 0){let e=U.location;e?.pathname&&(a={pathname:e.pathname})}a&&(t===`pageload`?_I({activeRootSpan:i,location:{pathname:a.pathname},routes:Array.from(JF),allRoutes:Array.from(JF)}):t===`navigation`&&sI(i,a,Array.from(JF),!1,BF))}}function sI(e,t,n,r=!1,i){let a=F(e),o=a.description,s=e?.__sentry_navigation_name_set__,c=o&&yF(o);if((!s||r||c)&&!a.timestamp){let[r,l]=kF(t,n,n,i(n,t)||[],WF,UF,VF),u=a.data?.[M];r&&(!o||!s&&(u!==`route`||l===`route`)||u!==`route`&&l===`route`||u===`route`&&l===`route`&&c)&&(e.updateName(r),e.setAttribute(M,l),l===`route`&&e.setAttribute(ui,r),!yF(r)&&l===`route`&&D(e,`__sentry_navigation_name_set__`,!0))}}function cI(e,t,n,r,i){let a=!1,o=!!i&&F(i).op===`pageload`,s=!1,c=null,l=null;e.subscribe(e=>{if(!a){let t=AF();t&&F(t).op===`pageload`?o=!0:o&&(e.historyAction===`POP`&&!s?s=!0:a=!0)}if(e.historyAction===`PUSH`||e.historyAction===`POP`&&a){let i=$F(e.location),a=()=>{l!==i&&(l=i,c=null,mI({location:e.location,routes:t,navigationType:e.historyAction,version:n,basename:r,allRoutes:Array.from(JF)}))};e.navigation.state===`idle`?(c!==null&&(QF(c),c=null),a()):(l!==i&&(l=null),c!==null&&QF(c),c=ZF(a))}})}function lI(e,t){return!IF||!LF||!RF||!BF?(TP&&x.warn(`reactRouter${t?`V${t}`:``}Instrumentation was unable to wrap the \`createRouter\` function because of one or more missing parameters.`),e):function(n,r){if(hI(n),VF)for(let e of n)FF(e,oI);let i=AF();r&&`patchRoutesOnNavigation`in r&&typeof r.patchRoutesOnNavigation==`function`&&i&&(D(i,`__sentry_may_have_lazy_routes__`,!0),iI(i));let a=e(n,pI(r,!1,i)),o=r?.basename;return a.state.historyAction===`POP`&&i&&_I({activeRootSpan:i,location:a.state.location,routes:n,basename:o,allRoutes:Array.from(JF)}),WF=o||``,cI(a,n,t,o,i),a}}function uI(e,t){return!IF||!LF||!RF||!BF?(TP&&x.warn(`reactRouter${t?`V${t}`:``}Instrumentation was unable to wrap the \`createMemoryRouter\` function because of one or more missing parameters.`),e):function(n,r){if(hI(n),VF)for(let e of n)FF(e,oI);let i=AF();r&&`patchRoutesOnNavigation`in r&&typeof r.patchRoutesOnNavigation==`function`&&i&&(D(i,`__sentry_may_have_lazy_routes__`,!0),iI(i));let a=e(n,pI(r,!0,i)),o=r?.basename,s,c=r?.initialEntries,l=r?.initialIndex,u=c?.length===1,d=l!==void 0&&c?.[l];s=u?c[0]:d?c[l]:void 0;let f=s?typeof s==`string`?{pathname:s}:s:a.state.location,p=AF();return a.state.historyAction===`POP`&&p&&_I({activeRootSpan:p,location:f,routes:n,basename:o,allRoutes:Array.from(JF)}),WF=o||``,cI(a,n,t,o,p),a}}function dI(e,t){let n=pM({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:r,useLocation:i,useNavigationType:a,createRoutesFromChildren:o,matchRoutes:s,stripBasename:c,enableAsyncRouteHandlers:l=!1,instrumentPageLoad:u=!0,instrumentNavigation:d=!0,lazyRouteTimeout:f,lazyRouteManifest:p}=e;return{...n,setup(t){n.setup(t);let u=e.finalTimeout??3e4,d=(e.idleTimeout??1e3)*3,m=f??d;m===1/0?(HF=u,TP&&x.log(`[React Router] lazyRouteTimeout set to Infinity, capping at finalTimeout:`,u,`ms to prevent indefinite hangs`)):Number.isNaN(m)?(TP&&x.warn(`[React Router] lazyRouteTimeout must be a number, falling back to default:`,d),HF=d):m<0?(TP&&x.warn(`[React Router] lazyRouteTimeout must be non-negative or Infinity, got:`,m,`falling back to:`,d),HF=d):HF=m,IF=r,LF=i,RF=a,BF=s,zF=o,VF=l,UF=p,pF(s,c||!1)},afterAllSetup(e){n.afterAllSetup(e);let r=U.location?.pathname;u&&r&&mM(e,{name:r,attributes:{[M]:`url`,[N]:`pageload`,[P]:`auto.pageload.react.reactrouter${t?`_v${t}`:``}`}}),d&&GF.add(e)}}}function fI(e,t){if(!IF||!LF||!RF||!BF)return TP&&x.warn("reactRouterV6Instrumentation was unable to wrap `useRoutes` because of one or more missing parameters."),e;let n=n=>{let r=YN.useRef(!0),{routes:i,locationArg:a}=n,o=e(i,a),s=LF(),c=RF(),l=typeof a==`string`||a?.pathname?a:s;return KF(()=>{let e=typeof l==`string`?{pathname:l}:l;r.current?(hI(i),_I({activeRootSpan:AF(),location:e,routes:i,allRoutes:Array.from(JF)}),r.current=!1):mI({location:e,routes:i,navigationType:c,version:t,allRoutes:Array.from(JF)})},[c,l]),o};return(e,t)=>YN.createElement(n,{routes:e,locationArg:t})}function pI(e,t=!1,n){if(!e||!(`patchRoutesOnNavigation`in e)||typeof e.patchRoutesOnNavigation!=`function`)return e||{};let r=e.patchRoutesOnNavigation;return{...e,patchRoutesOnNavigation:async e=>{let i=e?.path,a=AF()??n;if(!t){let t=e?.patch,n=e?.matches;t&&(e.patch=(e,r)=>{if(hI(r),n&&n.length>0){let t=n[n.length-1]?.route;if(t){let n=Array.from(JF).find(n=>{let r=n.id!==void 0&&n.id===e,i=n===t,a=n.path!==void 0&&t.path!==void 0&&n.path===t.path;return r||i||a});n&&nI(r,n)}}let o=a?F(a):void 0;return i&&a&&o&&!o.timestamp&&o.op===`navigation`&&sI(a,{pathname:i,search:``,hash:``,state:null,key:`default`},Array.from(JF),!0,BF),t(e,r)})}let o=(async()=>{let t=uF(i,a),n;try{n=await r(e)}finally{dF(t),a&&aI(a)}let o=a?F(a):void 0;if(a&&o&&!o.timestamp&&o.op===`navigation`){let e=i;e&&sI(a,{pathname:e,search:``,hash:``,state:null,key:`default`},Array.from(JF),!1,BF)}return n})();return a&&rI(a,o),o}}}function mI(e){let{location:t,routes:n,navigationType:r,version:i,matches:a,basename:o,allRoutes:s}=e,c=Array.isArray(a)?a:BF(s||n,t,o),l=j();if(!l||!GF.has(l))return;let u=AF();if(!(u&&F(u).op===`pageload`&&r===`POP`)&&(r===`PUSH`||r===`POP`)&&c){let[e,r]=kF(t,s||n,s||n,c,o,UF,VF),a=$F(t),u=qF.get(l),{skip:d,shouldUpdate:f}=tI(u,a,e,u&&!u.isPlaceholder?!!F(u.span).timestamp:!1);if(d){if(f&&u){let t=u.routeName;u.isPlaceholder?(u.routeName=e,TP&&x.log(`[Tracing] Updated placeholder navigation name from "${t}" to "${e}" (will apply to real span)`)):(u.span.updateName(e),u.span.setAttribute(M,r),r===`route`&&u.span.setAttribute(ui,e),D(u.span,`__sentry_navigation_name_set__`,!0),u.routeName=e,TP&&x.log(`[Tracing] Updated navigation span name from "${t}" to "${e}"`))}else TP&&x.log(`[Tracing] Skipping duplicate navigation for location: ${a}`);return}let p={span:{end:()=>{}},routeName:e,pathname:t.pathname,locationKey:a,isPlaceholder:!0};qF.set(l,p);let m;try{m=hM(l,{name:p.routeName,attributes:{[M]:r,[N]:`navigation`,[P]:`auto.navigation.react.reactrouter${i?`_v${i}`:``}`,...r===`route`&&{"url.template":p.routeName}}})}catch(e){throw qF.delete(l),e}m?(qF.set(l,{span:m,routeName:p.routeName,pathname:t.pathname,locationKey:a}),bI(m,t,n,o,`navigation`)):qF.delete(l)}}function hI(e){e.forEach(e=>{gI(e).forEach(e=>{JF.add(e)})})}function gI(e,t=new Set){return t.has(e)||(t.add(e),e.children&&!e.index&&e.children.forEach(e=>{gI(e,t).forEach(e=>{t.add(e)})})),t}function _I({activeRootSpan:e,location:t,routes:n,matches:r,basename:i,allRoutes:a}){let o=Array.isArray(r)?r:BF(a||n,t,i);if(o){let[r,s]=kF(t,a||n,a||n,o,i,UF,VF);k().setTransactionName(r||`/`),e&&(e.updateName(r),e.setAttribute(M,s),s===`route`&&e.setAttribute(ui,r),bI(e,t,n,i,`pageload`))}else e&&bI(e,t,n,i,`pageload`)}function vI(e,t,n,r,i=!1){return n?!!(!e&&i||e&&yF(e)&&r===`route`&&!yF(n)||t!==`route`&&r===`route`):!1}function yI(e,t,n,r,i,a,o,s){try{let c=t.data?.[M];if(c===`route`&&n&&!yF(n))return;let l=Array.from(s),u=l.length>0?l:i,d=BF(u,r,a);if(!d)return;let[f,p]=kF(r,u,u,d,a,UF,VF),m=vI(n,c,f,p,!0),h=o===`pageload`||!t.timestamp;m&&h&&(e.updateName(f),e.setAttribute(M,p),p===`route`&&e.setAttribute(ui,f))}catch(e){TP&&x.warn(`Error updating span details before ending: ${e}`)}}function bI(e,t,n,r,i){let a=`__sentry_${i}_end_patched__`;if(e?.[a]||!e.end)return;let o=e.end.bind(e),s=!1;e.end=function(...a){if(s)return;s=!0;let c=a.length>0?a[0]:Date.now()/1e3,l=F(e),u=l.description,d=l.data?.[M],f=()=>{let t=j();if(t&&i===`navigation`){let n=qF.get(t);n&&n.span===e&&qF.delete(t)}},p=YF.get(e),m=e.__sentry_may_have_lazy_routes__;if((p&&p.size>0||m)&&u&&(yF(u)||d!==`route`)){if(HF===0){yI(e,l,u,t,n,r,i,JF),f(),o(c);return}let a=new Promise(e=>setTimeout(e,HF)),s;if(p&&p.size>0){let e=Promise.allSettled(p).then(()=>{});s=HF===1/0?e:Promise.race([e,a])}else s=a;s.then(()=>{let a=F(e);yI(e,a,a.description,t,n,r,i,JF),f(),o(c)}).catch(()=>{f(),o(c)});return}yI(e,l,u,t,n,r,i,JF),f(),o(c)},D(e,a,!0)}function xI(e,t){if(!IF||!LF||!RF||!zF||!BF)return TP&&x.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.
|
|
500
|
-
useEffect: ${
|
|
501
|
-
createRoutesFromChildren: ${
|
|
499
|
+
or you can use record.mirror to access the mirror instance during recording.`,ej={map:{},getId(){return console.error($A),-1},getNode(){return console.error($A),null},removeNodeFromMap(){console.error($A)},has(){return console.error($A),!1},reset(){console.error($A)}};typeof window<`u`&&window.Proxy&&window.Reflect&&(ej=new Proxy(ej,{get(e,t,n){return t===`map`&&console.error($A),Reflect.get(e,t,n)}}));function tj(e,t,n,r,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){cj(()=>{n.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>tj(e,t,a||{},!0)}function nj(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function rj(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function ij(e,t,n,r,i){if(!e)return!1;let a=rj(e);if(!a)return!1;let o=QA(t,n);if(!i){let e=r&&a.matches(r);return o(a)&&!e}let s=ZA(a,o),c=-1;return s<0?!1:(r&&(c=ZA(a,QA(null,r))),s>-1&&c<0||s<c)}var aj={};function oj(e){let t=aj[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement==`function`)try{let t=n.createElement(`iframe`);t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch{}return aj[e]=r.bind(window)}function sj(...e){return oj(`requestAnimationFrame`)(...e)}function cj(...e){return oj(`setTimeout`)(...e)}var lj=(e=>(e[e[`2D`]=0]=`2D`,e[e.WebGL=1]=`WebGL`,e[e.WebGL2=2]=`WebGL2`,e))(lj||{}),uj;function dj(e){uj=e}for(var fj=e=>uj?((...t)=>{try{return e(...t)}catch(e){if(uj&&uj(e)===!0)return()=>{};throw e}}):e,pj=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,mj=typeof Uint8Array>`u`?[]:new Uint8Array(256),hj=0;hj<pj.length;hj++)mj[pj.charCodeAt(hj)]=hj;var gj=function(e){var t=new Uint8Array(e),n,r=t.length,i=``;for(n=0;n<r;n+=3)i+=pj[t[n]>>2],i+=pj[(t[n]&3)<<4|t[n+1]>>4],i+=pj[(t[n+1]&15)<<2|t[n+2]>>6],i+=pj[t[n+2]&63];return r%3==2?i=i.substring(0,i.length-1)+`=`:r%3==1&&(i=i.substring(0,i.length-2)+`==`),i},_j=new Map;function vj(e,t){let n=_j.get(e);return n||(n=new Map,_j.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var yj=(e,t,n)=>{if(!e||!(Sj(e,t)||typeof e==`object`))return;let r=e.constructor.name,i=vj(n,r),a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a};function bj(e,t,n){if(e instanceof Array)return e.map(e=>bj(e,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:gj(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[bj(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}else if(e instanceof HTMLCanvasElement)return{rr_type:`HTMLImageElement`,src:e.toDataURL()};else if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[bj(e.data,t,n),e.width,e.height]};else if(Sj(e,t)||typeof e==`object`)return{rr_type:e.constructor.name,index:yj(e,t,n)};return e}var xj=(e,t,n)=>e.map(e=>bj(e,t,n)),Sj=(e,t)=>!![`WebGLActiveInfo`,`WebGLBuffer`,`WebGLFramebuffer`,`WebGLProgram`,`WebGLRenderbuffer`,`WebGLShader`,`WebGLShaderPrecisionFormat`,`WebGLTexture`,`WebGLUniformLocation`,`WebGLVertexArrayObject`,`WebGLVertexArrayObjectOES`].filter(e=>typeof t[e]==`function`).find(n=>e instanceof t[n]);function Cj(e,t,n,r,i){let a=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let s of o)try{if(typeof t.CanvasRenderingContext2D.prototype[s]!=`function`)continue;let o=nj(t.CanvasRenderingContext2D.prototype,s,function(a){return function(...o){return ij(this.canvas,n,r,i,!0)||cj(()=>{let n=xj(o,t,this);e(this.canvas,{type:lj[`2D`],property:s,args:n})},0),a.apply(this,o)}});a.push(o)}catch{let n=tj(t.CanvasRenderingContext2D.prototype,s,{set(t){e(this.canvas,{type:lj[`2D`],property:s,args:[t],setter:!0})}});a.push(n)}return()=>{a.forEach(e=>e())}}function wj(e){return e===`experimental-webgl`?`webgl`:e}function Tj(e,t,n,r,i){let a=[];try{let o=nj(e.HTMLCanvasElement.prototype,`getContext`,function(e){return function(a,...o){if(!ij(this,t,n,r,!0)){let e=wj(a);if(`__context`in this||(this.__context=e),i&&[`webgl`,`webgl2`].includes(e))if(o[0]&&typeof o[0]==`object`){let e=o[0];e.preserveDrawingBuffer||=!0}else o.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[a,...o])}});a.push(o)}catch{console.error(`failed to patch HTMLCanvasElement.prototype.getContext`)}return()=>{a.forEach(e=>e())}}function Ej(e,t,n,r,i,a,o,s){let c=[],l=Object.getOwnPropertyNames(e);for(let o of l)if(![`isContextLost`,`canvas`,`drawingBufferWidth`,`drawingBufferHeight`].includes(o))try{if(typeof e[o]!=`function`)continue;let l=nj(e,o,function(e){return function(...c){let l=e.apply(this,c);if(yj(l,s,this),`tagName`in this.canvas&&!ij(this.canvas,r,i,a,!0)){let e=xj(c,s,this),r={type:t,property:o,args:e};n(this.canvas,r)}return l}});c.push(l)}catch{let r=tj(e,o,{set(e){n(this.canvas,{type:t,property:o,args:[e],setter:!0})}});c.push(r)}return c}function Dj(e,t,n,r,i,a){let o=[];return o.push(...Ej(t.WebGLRenderingContext.prototype,lj.WebGL,e,n,r,i,a,t)),t.WebGL2RenderingContext!==void 0&&o.push(...Ej(t.WebGL2RenderingContext.prototype,lj.WebGL2,e,n,r,i,a,t)),()=>{o.forEach(e=>e())}}var Oj=`for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};`;function kj(){let e=new Blob([Oj]);return URL.createObjectURL(e)}var Aj=class{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};let{enableManualSnapshot:t,sampling:n=`all`,win:r,recordCanvas:i,errorHandler:a}=e;e.sampling=n,this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.options=e,a&&dj(a),(i&&typeof n==`number`||t)&&(this.worker=this.initFPSWorker()),this.addWindow(r),!t&&fj(()=>{i&&n===`all`&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),i&&typeof n==`number`&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(e){let{sampling:t=`all`,blockClass:n,blockSelector:r,unblockSelector:i,recordCanvas:a,enableManualSnapshot:o}=this.options;if(!this.windowsSet.has(e)){if(o){this.windowsSet.add(e),this.windows.push(new WeakRef(e));return}fj(()=>{if(a&&t===`all`&&this.initCanvasMutationObserver(e,n,r,i),a&&typeof t==`number`){let t=Tj(e,n,r,i,!0);this.restoreHandlers.push(()=>{t()})}})(),this.windowsSet.add(e),this.windows.push(new WeakRef(e))}}addShadowRoot(e){this.shadowDoms.add(new WeakRef(e))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(e,t){if(t?.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,e);return}sj(t=>this.takeSnapshot(t,!0,e))}initFPSWorker(){let e=new Worker(kj());return e.onmessage=e=>{let t=e.data,{id:n}=t;if(this.snapshotInProgressMap.set(n,!1),!(`base64`in t))return;let{base64:r,type:i,width:a,height:o}=t;this.mutationCb({id:n,type:lj[`2D`],commands:[{property:`clearRect`,args:[0,0,a,o]},{property:`drawImage`,args:[{rr_type:`ImageBitmap`,args:[{rr_type:`Blob`,data:[{rr_type:`ArrayBuffer`,base64:r}],type:i}]},0,0,a,o]}]})},e}initCanvasFPSObserver(){let e;if(!this.windows.length&&!this.shadowDoms.size)return;let t=n=>{this.takeSnapshot(n,!1),e=sj(t)};e=sj(t),this.restoreHandlers.push(()=>{e&&cancelAnimationFrame(e)})}initCanvasMutationObserver(e,t,n,r){let i=Tj(e,t,n,r,!1),a=Cj(this.processMutation.bind(this),e,t,n,r),o=Dj(this.processMutation.bind(this),e,t,n,r,this.mirror);this.restoreHandlers.push(()=>{i(),a(),o()})}getCanvasElements(e,t,n){let r=[],i=i=>{i.querySelectorAll(`canvas`).forEach(i=>{ij(i,e,t,n,!0)||r.push(i)})};for(let e of this.windows){let t=e.deref(),n;try{n=t&&t.document}catch{}n&&i(n)}for(let e of this.shadowDoms){let t=e.deref();t&&i(t)}return r}takeSnapshot(e,t,n){let{sampling:r,blockClass:i,blockSelector:a,unblockSelector:o,dataURLOptions:s,maxCanvasSize:c}=this.options,l=1e3/(r===`all`?2:r||2);return this.lastSnapshotTime&&e-this.lastSnapshotTime<l?!1:(this.lastSnapshotTime=e,(n?[n]:this.getCanvasElements(i,a,o)).forEach(e=>{let n=this.mirror.getId(e);if(!(!this.mirror.hasNode(e)||!e.width||!e.height||this.snapshotInProgressMap.get(n))){if(this.snapshotInProgressMap.set(n,!0),!t&&[`webgl`,`webgl2`].includes(e.__context)){let t=e.getContext(e.__context);t?.getContextAttributes()?.preserveDrawingBuffer===!1&&t.clear(t.COLOR_BUFFER_BIT)}createImageBitmap(e).then(t=>{this.worker?.postMessage({id:n,bitmap:t,width:e.width,height:e.height,dataURLOptions:s,maxCanvasSize:c},[t])}).catch(e=>{fj(()=>{throw this.snapshotInProgressMap.delete(n),e})()})}}),!0)}startPendingCanvasMutationFlusher(){sj(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,sj(e)};sj(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),sj(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||t===-1)return;let r=n.map(e=>{let{type:t,...n}=e;return n}),{type:i}=n[0];this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}};try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement(`iframe`);document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug(`Unable to override Array.from`,e)}YA();var jj;(function(e){e[e.NotStarted=0]=`NotStarted`,e[e.Running=1]=`Running`,e[e.Stopped=2]=`Stopped`})(jj||={});var Mj={low:{sampling:{canvas:1},dataURLOptions:{type:`image/webp`,quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:`image/webp`,quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:`image/webp`,quality:.5}}},Nj=`ReplayCanvas`,Pj=1280,Fj=R(((e={})=>{let[t,n]=e.maxCanvasSize||[],r={quality:e.quality||`medium`,enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Pj):Pj,n?Math.min(n,Pj):Pj]},i,a,o=new Promise(e=>a=e);return{name:Nj,getOptions(){let{quality:e,enableManualSnapshot:t,maxCanvasSize:n}=r;return{enableManualSnapshot:t,recordCanvas:!0,getCanvasManager:e=>{let r=new Aj({...e,enableManualSnapshot:t,maxCanvasSize:n,errorHandler:e=>{try{typeof e==`object`&&(e.__rrweb__=!0)}catch{}}});return i=r,a(r),r},...Mj[e]||Mj.medium}},async snapshot(e,t){(i||await o).snapshot(e,t)}}}));function Ij(e){return e.split(`,`).some(e=>e.trim().startsWith(`sentry-`))}function Lj(e){try{return new URL(e,U.location.origin).href}catch{return}}function Rj(e){return e.entryType===`resource`&&`initiatorType`in e&&typeof e.nextHopProtocol==`string`&&(e.initiatorType===`fetch`||e.initiatorType===`xmlhttprequest`)}function zj(e){try{return new Headers(e)}catch{return}}var Bj={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Vj(e,t){let{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:i,enableHTTPTimings:a,tracePropagationTargets:o,onRequestSpanStart:s,onRequestSpanEnd:c}={...Bj,...t},l=typeof i==`function`?i:e=>!0,u=e=>Wj(e,o),d={},f=e.getOptions().propagateTraceparent;n&&wh(t=>{let n=ld(t,l,u,d,{propagateTraceparent:f,onRequestSpanEnd:c});if(n){let r=Lj(t.fetchData.url),i=r?Xc(r).host:void 0,o=r?Qc(r):void 0;n.setAttributes({"http.url":o,"url.full":o,"server.address":i}),a&&Uj(n,e),s?.(n,{headers:t.headers})}}),r&&Jx(t=>{let n=Gj(t,l,u,d,f,c);n&&(a&&Uj(n,e),s?.(n,{headers:zj(t.xhr.__sentry_xhr_v3__?.request_headers)}))})}var Hj=300;function Uj(e,t){let{url:n}=F(e).data;if(!n||typeof n!=`string`)return;let r=()=>void setTimeout(i);if(qi(t)){let t=e.end.bind(e);e.end=e=>{let n=e??O(),a=!1,o=()=>{a||(a=!0,setTimeout(i),t(n),clearTimeout(s))};r=o;let s=setTimeout(o,Hj)}}let i=ab(`resource`,({entries:t})=>{t.forEach(t=>{Rj(t)&&t.name.endsWith(n)&&(e.setAttributes(Fb(t)),r())})})}function Wj(e,t){let n=Ph();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}let a=r.origin===i;return t?ut(r.toString(),t)||a&&ut(r.pathname,t):a}else{let n=!!e.match(/^\/(?!\/)/);return t?ut(e,t):n}}function Gj(e,t,n,r,i,a){let o=e.xhr,s=o?.[qx];if(!o||o.__sentry_own_request__||!s)return;let{url:c,method:l}=s,u=Gr()&&t(c);if(e.endTimestamp){let t=o.__sentry_xhr_span_id__;if(!t)return;let n=r[t];n&&(u&&s.status_code!==void 0&&(Fn(n,s.status_code),n.end(),a?.(n,{headers:zj(tS(o)),error:e.error})),delete r[t]);return}let d=Lj(c),f=Xc(d||c),p=d?Qc(d):void 0,m=Qc(Zc(c)),h=j(),g=!!Br(),_=g||!!h&&qi(h),v=u&&_?oa({name:`${l} ${m}`,attributes:{url:Qc(c),type:`xhr`,"http.method":l,"http.url":p,"url.full":p,"server.address":f?.host,[P]:`auto.http.browser`,[N]:`http.client`,...f?.search&&{"http.query":f?.search},...f?.hash&&{"http.fragment":f?.hash}}}):new Qr,y=Sa(v)&&g?void 0:v;return u&&!_&&h?.recordDroppedEvent(`no_parent_span`,`span`),o.__sentry_xhr_span_id__=v.spanContext().spanId,r[o.__sentry_xhr_span_id__]=v,n(c)&&Kj(o,Gr()&&_?y:void 0,i),h&&h.emit(`beforeOutgoingRequestSpan`,v,e),v}function Kj(e,t,n){let{"sentry-trace":r,baggage:i,traceparent:a}=cl({span:t,propagateTraceparent:n});r&&qj(e,r,i,a)}function qj(e,t,n,r){let i=e.__sentry_xhr_v3__?.request_headers;if(!(i?.[`sentry-trace`]||!e.setRequestHeader))try{if(e.setRequestHeader(`sentry-trace`,t),r&&!i?.traceparent&&e.setRequestHeader(`traceparent`,r),n){let t=i?.baggage;(!t||!Ij(t))&&e.setRequestHeader(`baggage`,n)}}catch{}}var Jj=new WeakMap,Yj=new WeakMap,Xj=9e4,Zj=[`text/event-stream`,`application/x-ndjson`,`application/stream+json`],Qj=R(()=>({name:`FetchStreamPerformance`,setup(){Th(e=>{if(e.response){let t=Jj.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);let n=Yj.get(e.response);n&&clearTimeout(n)}}}),wh(e=>{if(e.endTimestamp&&e.response){let t=e.response.headers?.get(`content-type`)||``;if(e.response.headers?.get(`content-length`)||!Zj.some(e=>t.startsWith(e)))return;let n=e.fetchData?.url||``,r=e.fetchData?.method||`GET`,i=Jc(n),a=oa({name:`${r} ${n.startsWith(`data:`)?Qc(n):i?Yc(i):n}`,startTime:e.endTimestamp,attributes:{url:Qc(n),"http.method":r,type:`fetch`,[N]:`http.client.stream`,[P]:`auto.http.browser.stream`}});Jj.set(e.response,a);let o=setTimeout(()=>{a.isRecording()&&a.end()},Xj);Yj.set(e.response,o)}})}})),$j=`WebVitals`,eM=R((e={})=>{let t=new Set(e.ignore??[]);return{name:$j,setup(n){let r=qi(n),{enableStandaloneClsSpans:i,enableStandaloneLcpSpans:a}=e._experiments??{},o=r||t.has(`cls`)?void 0:i||!1,s=r||t.has(`lcp`)?void 0:a||!1,c=Hb({recordClsStandaloneSpans:o,recordLcpStandaloneSpans:s,client:n}),l=new WeakSet;n.on(`afterStartPageLoadSpan`,e=>{l.add(e)}),n.on(`spanEnd`,e=>{l.delete(e)&&(c(),Zb(e,{recordClsOnPageloadSpan:o===!1,recordLcpOnPageloadSpan:s===!1,spanStreamingEnabled:r}))}),r?(t.has(`lcp`)||Cx(n),t.has(`cls`)||Tx(n),t.has(`inp`)||Dx()):t.has(`inp`)||gx()},afterAllSetup(){t.has(`inp`)||xx()}}});function tM(){U.document?U.document.addEventListener(`visibilitychange`,()=>{let e=Br();if(!e)return;let t=I(e);if(U.document.hidden&&t){let e=`cancelled`,{op:n,status:r}=F(t);K&&x.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()}}):K&&x.warn(`[Tracing] Could not set up background tab detection due to lack of global document`)}var nM=`sentry_previous_trace`,rM=`sentry.previous_trace`;function iM(e,{linkPreviousTrace:t,consistentTraceSampling:n}){let r=t===`session-storage`,i=r?sM():void 0;e.on(`spanStart`,e=>{if(I(e)!==e)return;let t=k().getPropagationContext();i=aM(i,e,t),r&&oM(i)});let a=!0;n&&e.on(`beforeSampling`,e=>{if(!i)return;let t=k(),n=t.getPropagationContext();if(a&&n.parentSpanId){a=!1;return}t.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(i.sampleRate),sampled:String(cM(i.spanContext))},sampleRand:i.sampleRand}),e.parentSampled=cM(i.spanContext),e.parentSampleRate=i.sampleRate,e.spanAttributes={...e.spanAttributes,[_n]:i.sampleRate}})}function aM(e,t,n){let r=F(t);function i(){try{let e=Number(r.data?.[`sentry.sample_rate`]??n.dsc?.sample_rate);return Number.isNaN(e)?0:e}catch{return 0}}let a={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return a;let o=e.spanContext;return o.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=3600&&(K&&x.log(`Adding previous_trace \`${JSON.stringify(o)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:o,attributes:{[Mn]:`previous_trace`}}),t.setAttribute(rM,`${o.traceId}-${o.spanId}-${+!!cM(o)}`)),a)}function oM(e){try{U.sessionStorage.setItem(nM,JSON.stringify(e))}catch(e){K&&x.warn(`Could not store previous trace in sessionStorage`,e)}}function sM(){try{let e=U.sessionStorage?.getItem(nM);return JSON.parse(e)}catch{return}}function cM(e){return e.traceFlags===1}var lM=`BrowserTracing`,uM=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function dM(){let e=U.navigator;return e?.userAgent?uM.test(e.userAgent):!1}var fM={...Ca,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:`in-memory`,consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...Bj},pM=((e={})=>{`enableElementTiming`in e&&f(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});let t={name:void 0,source:void 0},n=U.document,{enableInp:r,enableLongTask:a,enableLongAnimationFrame:o,_experiments:{enableInteractions:s,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:l},beforeStartSpan:u,idleTimeout:d,finalTimeout:p,childSpanTimeout:m,markBackgroundSpan:h,traceFetch:g,traceXHR:_,trackFetchStreamPerformance:v,shouldCreateSpanForRequest:y,enableHTTPTimings:b,ignoreResourceSpans:S,ignorePerformanceApiSpans:C,instrumentPageLoad:w,instrumentNavigation:T,detectRedirects:ee,linkPreviousTrace:te,consistentTraceSampling:ne,enableReportPageLoaded:re,onRequestSpanStart:ie,onRequestSpanEnd:ae}={...fM,...e},oe=dM(),se,E;function ce(e,r,i=!0,a){let o=r.op===`pageload`,s=r.name,c=u?u(r):r,l=Jc(a||Ph()),f={...l?.pathname&&{"url.path":l.pathname},...l&&!qc(l)&&{"url.full":l.href},...c.attributes};if(s!==c.name&&(f[M]=`custom`),c.attributes=f,!i){let e=Ct();oa({...c,startTime:e}).end(e);return}t.name=c.name,t.source=f[M];let h=Oa(c,{idleTimeout:d,finalTimeout:p,childSpanTimeout:m,disableAutoFinish:o,beforeSpanEnd:t=>{Xb(t,{ignoreResourceSpans:S,ignorePerformanceApiSpans:C,spanStreamingEnabled:qi(e)}),xM(e,void 0);let n=k(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:h.spanContext().traceId,sampled:Ar(h),dsc:vi(t)}),o&&(E=void 0)},trimIdleSpanEndTimestamp:!re});o&&re&&(E=h),xM(e,h);function g(){n&&[`interactive`,`complete`].includes(n.readyState)&&(e.emit(`idleSpanEnableAutoFinish`,h),n.removeEventListener(`readystatechange`,g))}o&&!re&&n&&(n.addEventListener(`readystatechange`,g),g())}return{name:lM,setup(e){if(oe){K&&x.log(`[Tracing] Skipping browserTracingIntegration setup for bot user agent.`);return}if(Wr(),o&&i.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes(`long-animation-frame`)?Wb():a&&Ub(),s&&Gb(),ee&&n){let e=()=>{se=O()};addEventListener(`click`,e,{capture:!0}),addEventListener(`keydown`,e,{capture:!0,passive:!0})}function t(){let t=bM(e);t&&!F(t).timestamp&&(K&&x.log(`[Tracing] Finishing current active span with op: ${F(t).op}`),t.setAttribute(vn,`cancelled`),t.end())}e.on(`startNavigationSpan`,(n,r)=>{if(j()!==e)return;if(r?.isRedirect){K&&x.warn(`[Tracing] Detected redirect, navigation span will not be the root span, but a child span.`),ce(e,{op:`navigation.redirect`,...n},!1,r.url);return}se=void 0,t(),A().setPropagationContext({traceId:Pt(),sampleRand:Math.random(),propagationSpanId:Gr()?void 0:Ft()});let i=k();i.setPropagationContext({traceId:Pt(),sampleRand:Math.random(),propagationSpanId:Gr()?void 0:Ft()}),i.setSDKProcessingMetadata({normalizedRequest:void 0}),ce(e,{op:`navigation`,...n,parentSpan:null,forceTransaction:!0},!0,r?.url)}),e.on(`startPageLoadSpan`,(n,r={})=>{if(j()!==e)return;t();let i=dr(r.sentryTrace||gM(`sentry-trace`)||_M(`sentry-trace`),r.baggage||gM(`baggage`)||_M(`baggage`)),a=k();a.setPropagationContext(i),Gr()||(a.getPropagationContext().propagationSpanId=Ft()),a.setSDKProcessingMetadata({normalizedRequest:kv()}),ce(e,{op:`pageload`,...n})}),e.on(`endPageloadSpan`,()=>{re&&E&&(E.setAttribute(vn,`reportPageLoaded`),E.end())})},afterAllSetup(e){if(oe)return;e.addIntegration&&!e.getIntegrationByName?.(`WebVitals`)&&e.addIntegration(eM({ignore:r?[]:[`inp`],_experiments:{enableStandaloneClsSpans:c,enableStandaloneLcpSpans:l}}));let n=Ph();if(te!==`off`&&iM(e,{linkPreviousTrace:te,consistentTraceSampling:ne}),U.location){if(w){let t=Ot();mM(e,{name:U.location.pathname,startTime:t?t/1e3:void 0,attributes:{[M]:`url`,[P]:`auto.pageload.browser`}})}T&&Bx(({to:t,from:r})=>{if(r===void 0&&n?.indexOf(t)!==-1){n=void 0;return}n=void 0;let i=Jc(t),a=bM(e),o=a&&ee&&CM(a,se);hM(e,{name:i?.pathname||U.location.pathname,attributes:{[M]:`url`,[P]:`auto.navigation.browser`}},{url:t,isRedirect:o})})}h&&tM(),s&&vM(e,d,p,m,t),Vj(e,{traceFetch:g,traceXHR:_,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:y,enableHTTPTimings:b,onRequestSpanStart:ie,onRequestSpanEnd:ae}),v&&e.addIntegration(Qj())}}});function mM(e,t,n){e.emit(`startPageLoadSpan`,t,n),k().setTransactionName(t.name);let r=bM(e);return r&&e.emit(`afterStartPageLoadSpan`,r),r}function hM(e,t,n){let{url:r,isRedirect:i}=n||{};e.emit(`beforeStartNavigationSpan`,t,{isRedirect:i,url:r}),e.emit(`startNavigationSpan`,t,{isRedirect:i,url:r});let a=k();return a.setTransactionName(t.name),r&&!i&&a.setSDKProcessingMetadata({normalizedRequest:{...kv(),url:r}}),bM(e)}function gM(e){return(U.document?.querySelector(`meta[name=${e}]`))?.getAttribute(`content`)||void 0}function _M(e){return(U.performance?.getEntriesByType?.(`navigation`)[0])?.serverTiming?.find(t=>t.name===e)?.description}function vM(e,t,n,r,i){let a=U.document,o;a&&addEventListener(`click`,()=>{let a=`ui.action.click`,s=bM(e);if(s){let e=F(s).op;if([`navigation`,`pageload`].includes(e)){K&&x.warn(`[Tracing] Did not create ${a} span because a pageload or navigation span is in progress.`);return}}if(o&&=(o.setAttribute(vn,`interactionInterrupted`),o.end(),void 0),!i.name){K&&x.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}o=Oa({name:i.name,op:a,attributes:{[M]:i.source||`url`}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})},{capture:!0})}var yM=`_sentry_idleSpan`;function bM(e){return e[yM]}function xM(e,t){D(e,yM,t)}var SM=1.5;function CM(e,t){let n=F(e),r=Ct();return!(r-n.start_timestamp>SM||t&&r-t<=SM)}function wM(e=j()){e?.emit(`endPageloadSpan`)}function TM(e){let t=Br();if(t===e)return;let n=k();e.end=new Proxy(e.end,{apply(e,r,i){return zt(n,t),Reflect.apply(e,r,i)}}),zt(n,e)}var EM=R(()=>({name:`SpanStreaming`,beforeSetup(e){let t=e.getOptions();t.traceLifecycle||=(K&&x.log('[SpanStreaming] setting `traceLifecycle` to "stream"'),`stream`)},setup(e){let t=`SpanStreaming integration requires`,n=`Falling back to static trace lifecycle.`,r=e.getOptions();if(!qi(e)){r.traceLifecycle=`static`,K&&x.warn(`${t} \`traceLifecycle\` to be set to "stream"! ${n}`);return}let i=r.beforeSendSpan;if(i&&!xi(i)){r.traceLifecycle=`static`,K&&x.warn(`${t} a beforeSendSpan callback using \`withStreamedSpan\`! ${n}`);return}let a=new gh(e);e.on(`afterSpanEnd`,t=>{Ar(t)&&a.add(eo(t,e))}),e.on(`afterSegmentSpanEnd`,e=>{let t=e.spanContext().traceId;setTimeout(()=>{a.flush(t)},500)})}}));function DM(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function OM(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=DM(n);return e=>r.then(n=>e(n.transaction(t,`readwrite`).objectStore(t)))}function kM(e){return DM(e.getAllKeys())}function AM(e,t,n){return e(e=>kM(e).then(r=>{if(!(r.length>=n))return e.put(t,Math.max(...r,0)+1),DM(e.transaction)}))}function jM(e,t,n){return e(e=>kM(e).then(r=>{if(!(r.length>=n))return e.put(t,Math.min(...r,0)-1),DM(e.transaction)}))}function MM(e){return e(e=>kM(e).then(t=>{let n=t[0];if(n!=null)return DM(e.get(n)).then(t=>(e.delete(n),DM(e.transaction).then(()=>t)))}))}function NM(e){let t;function n(){return t??=OM(e.dbName||`sentry-offline`,e.storeName||`queue`),t}return{push:async t=>{try{let r=Oi(t);await AM(n(),r,e.maxQueueSize||30)}catch{}},unshift:async t=>{try{let r=Oi(t);await jM(n(),r,e.maxQueueSize||30)}catch{}},shift:async()=>{try{let e=await MM(n());if(e)return Ai(e)}catch{}}}}function PM(e){return t=>{let n=e({...t,createStore:NM});return U.addEventListener(`online`,async e=>{await n.flush()}),n}}function FM(e=aS){return PM(Ic(e))}var IM=1e6,LM=`window`in i&&i.window===i&&typeof importScripts>`u`,RM=`0`,zM=LM?`main`:`worker`,BM=U.navigator,VM=``,HM=``,UM=``,WM=BM?.userAgent||``,GM=``,KM=BM?.language||BM?.languages?.[0]||``;function qM(e){return typeof e==`object`&&!!e&&`getHighEntropyValues`in e}var JM=BM?.userAgentData;qM(JM)&&JM.getHighEntropyValues([`architecture`,`model`,`platform`,`platformVersion`,`fullVersionList`]).then(e=>{if(VM=e.platform||``,UM=e.architecture||``,GM=e.model||``,HM=e.platformVersion||``,e.fullVersionList?.length){let t=e.fullVersionList[e.fullVersionList.length-1];WM=`${t.brand} ${t.version}`}}).catch(e=>void 0);function YM(e){return!(`thread_metadata`in e)}function XM(e){return YM(e)?rN(e):e}function ZM(e){let t=e.contexts?.trace?.trace_id;return typeof t==`string`&&t.length!==32&&K&&x.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t==`string`?t:``}function QM(e,t,n,r){if(r.type!==`transaction`)throw TypeError(`Profiling events may only be attached to transactions, this should never occur.`);if(n==null)throw TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);let i=ZM(r),a=XM(n),o=t||(typeof r.start_timestamp==`number`?r.start_timestamp*1e3:O()*1e3),s=typeof r.timestamp==`number`?r.timestamp*1e3:O()*1e3;return{event_id:e,timestamp:new Date(o).toISOString(),platform:`javascript`,version:`1`,release:r.release||``,environment:r.environment||`production`,runtime:{name:`javascript`,version:U.navigator.userAgent},os:{name:VM,version:HM,build_number:WM},device:{locale:KM,model:GM,manufacturer:WM,architecture:UM,is_emulator:!1},debug_meta:{images:oN(n.resources)},profile:a,transactions:[{name:r.transaction||``,id:r.event_id||mt(),trace_id:i,active_thread_id:RM,relative_start_ns:`0`,relative_end_ns:((s-o)*1e6).toFixed(0)}]}}function $M(e,t,n){if(e==null)throw TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);let r=tN(e),i=t.getOptions(),a=t.getSdkMetadata?.()?.sdk;return{chunk_id:mt(),client_sdk:{name:a?.name??`sentry.javascript.browser`,version:a?.version??`0.0.0`},profiler_id:n||mt(),platform:`javascript`,version:`2`,release:i.release??``,environment:i.environment??`production`,debug_meta:{images:oN(e.resources)},profile:r}}function eN(e){try{if(!e||typeof e!=`object`)return{reason:`chunk is not an object`};let t=e=>typeof e==`string`&&/^[a-f0-9]{32}$/.test(e);if(!t(e.profiler_id))return{reason:`missing or invalid profiler_id`};if(!t(e.chunk_id))return{reason:`missing or invalid chunk_id`};if(!e.client_sdk)return{reason:`missing client_sdk metadata`};let n=e.profile;return n?!Array.isArray(n.frames)||!n.frames.length?{reason:`profile has no frames`}:!Array.isArray(n.stacks)||!n.stacks.length?{reason:`profile has no stacks`}:!Array.isArray(n.samples)||!n.samples.length?{reason:`profile has no samples`}:{valid:!0}:{reason:`missing profile data`}}catch(e){return{reason:`unknown validation error: ${e}`}}}function tN(e){let t=[];for(let n=0;n<e.frames.length;n++){let r=e.frames[n];r&&(t[n]={function:r.name,abs_path:typeof r.resourceId==`number`?e.resources[r.resourceId]:void 0,lineno:r.line,colno:r.column})}let n=[];for(let t=0;t<e.stacks.length;t++){let r=e.stacks[t];if(!r)continue;let i=[],a=r;for(;a;)i.push(a.frameId),a=a.parentId===void 0?void 0:e.stacks[a.parentId];n[t]=i}let r=Ot(),i=typeof performance.timeOrigin==`number`?performance.timeOrigin:r||0,a=i-(r||i),o=[];for(let t=0;t<e.samples.length;t++){let n=e.samples[t];if(!n)continue;let r=(i+(n.timestamp-a))/1e3;o[t]={stack_id:n.stackId??0,thread_id:RM,timestamp:r}}return{frames:t,stacks:n,samples:o,thread_metadata:{[RM]:{name:zM}}}}function nN(e){return F(e).op===`pageload`}function rN(e){let t,n=0,r={samples:[],stacks:[],frames:[],thread_metadata:{[RM]:{name:zM}}},i=e.samples[0];if(!i)return r;let a=i.timestamp,o=Ot(),s=typeof performance.timeOrigin==`number`?performance.timeOrigin:o||0,c=s-(o||s);return e.samples.forEach((i,o)=>{if(i.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[o]={elapsed_since_start_ns:((i.timestamp+c-a)*IM).toFixed(0),stack_id:t,thread_id:RM};return}let s=e.stacks[i.stackId],l=[];for(;s;){l.push(s.frameId);let t=e.frames[s.frameId];t&&r.frames[s.frameId]===void 0&&(r.frames[s.frameId]={function:t.name,abs_path:typeof t.resourceId==`number`?e.resources[t.resourceId]:void 0,lineno:t.line,colno:t.column}),s=s.parentId===void 0?void 0:e.stacks[s.parentId]}let u={elapsed_since_start_ns:((i.timestamp+c-a)*IM).toFixed(0),stack_id:n,thread_id:RM};r.stacks[n]=l,r.samples[o]=u,n++}),r}function iN(e,t){if(!t.length)return e;for(let n of t)e[1].push([{type:`profile`},n]);return e}function aN(e){let t=[];return wi(e,(e,n)=>{if(n===`transaction`)for(let n=1;n<e.length;n++)e[n]?.contexts?.profile?.profile_id&&t.push(e[n])}),t}function oN(e){let t=j()?.getOptions()?.stackParser;return t?bo(t,e):[]}function sN(e){return typeof e!=`number`&&typeof e!=`boolean`||typeof e==`number`&&isNaN(e)?(K&&x.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(K&&x.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function cN(e){return e.samples.length<2?(K&&x.log(`[Profiling] Discarding profile because it contains less than 2 samples`),!1):e.frames.length?!0:(K&&x.log(`[Profiling] Discarding profile because it contains no frames`),!1)}var lN=!1,uN=3e4;function dN(e){return typeof e==`function`}function fN(){let e=U.Profiler;if(!dN(e)){K&&x.log(`[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.`);return}let t=Math.floor(uN/10);try{return new e({sampleInterval:10,maxBufferSize:t})}catch{K&&(x.log(`[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header.`),x.log(`[Profiling] Disabling profiling for current user session.`)),lN=!0}}function pN(e){if(lN)return K&&x.log(`[Profiling] Profiling has been disabled for the duration of the current user session.`),!1;if(!e.isRecording())return K&&x.log(`[Profiling] Discarding profile because root span was not sampled.`),!1;let t=j()?.getOptions();if(!t)return K&&x.log(`[Profiling] Profiling disabled, no options found.`),!1;let n=t.profilesSampleRate;return sN(n)?n?n===!0||Math.random()<n?!0:(K&&x.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(n)})`),!1):(K&&x.log(`[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0`),!1):(K&&x.warn(`[Profiling] Discarding profile because of invalid sample rate.`),!1)}function mN(e){if(lN)return K&&x.log(`[Profiling] Profiling has been disabled for the duration of the current user session as the JS Profiler could not be started.`),!1;if(e.profileLifecycle!==`trace`&&e.profileLifecycle!==`manual`)return K&&x.warn("[Profiling] Session not sampled. Invalid `profileLifecycle` option."),!1;let t=e.profileSessionSampleRate;return sN(t)?t?Math.random()<=t:(K&&x.log(`[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0`),!1):(K&&x.warn(`[Profiling] Discarding profile because of invalid profileSessionSampleRate.`),!1)}function hN(e){return e.profilesSampleRate!==void 0}function gN(e,t,n,r){return cN(n)?QM(e,t,n,r):null}var _N=new Map;function vN(){return _N.size}function yN(e){let t=_N.get(e);return t&&_N.delete(e),t}function bN(e,t){if(_N.set(e,t),_N.size>30){let e=_N.keys().next().value;e!==void 0&&_N.delete(e)}}var xN=new WeakSet;function SN(e){e.setAttribute(`thread.id`,RM),e.setAttribute(`thread.name`,zM)}function CN(e){let t;nN(e)&&(t=O()*1e3);let n=fN();if(!n)return;K&&x.log(`[Profiling] started profiling span: ${F(e).description}`);let r=mt(),i=null;k().setContext(`profile`,{profile_id:r,start_timestamp:t}),xN.add(e),SN(e);async function a(){if(e&&n){if(i){K&&x.log(`[Profiling] profile for:`,F(e).description,`already exists, returning early`);return}return n.stop().then(t=>{if(o&&=(U.clearTimeout(o),void 0),K&&x.log(`[Profiling] stopped profiling of span: ${F(e).description}`),!t){K&&x.log(`[Profiling] profiler returned null profile for: ${F(e).description}`,`this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started`);return}i=t,bN(r,t)}).catch(e=>{K&&x.log(`[Profiling] error while stopping profiler:`,e)})}}let o=U.setTimeout(()=>{K&&x.log(`[Profiling] max profile duration elapsed, stopping profiling for:`,F(e).description),a()},uN),s=e.end.bind(e);function c(){return e?(a().then(()=>{s()},()=>{s()}),e):s()}e.end=c}var wN=6e4,TN=3e5,EN=class{constructor(){this._client=void 0,this._profiler=void 0,this._chunkTimer=void 0,this._profilerId=void 0,this._isRunning=!1,this._sessionSampled=!1,this._lifecycleMode=void 0,this._activeRootSpanIds=new Set,this._rootSpanTimeouts=new Map}initialize(e){let t=e.getOptions().profileLifecycle,n=mN(e.getOptions());K&&x.log(`[Profiling] Initializing profiler (lifecycle='${t}').`),n||K&&x.log(`[Profiling] Session not sampled. Skipping lifecycle profiler initialization.`),this._profilerId=mt(),this._client=e,this._sessionSampled=n,this._lifecycleMode=t,t===`trace`&&this._setupTraceLifecycleListeners(e),e.on(`spanStart`,e=>{this._isRunning&&SN(e)})}start(){if(this._lifecycleMode===`trace`){K&&x.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.');return}if(this._isRunning){K&&x.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op.");return}if(!this._sessionSampled){K&&x.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.");return}this._beginProfiling()}stop(){if(this._lifecycleMode===`trace`){K&&x.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.');return}if(!this._isRunning){K&&x.warn("[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op.");return}this._endProfiling()}notifyRootSpanActive(e){if(this._lifecycleMode!==`trace`||!this._sessionSampled)return;let t=e.spanContext().spanId;if(!t||this._activeRootSpanIds.has(t))return;this._registerTraceRootSpan(t);let n=this._activeRootSpanIds.size;n===1&&(K&&x.log(`[Profiling] Detected already active root span during setup. Active root spans now:`,n),this._beginProfiling()),this._isRunning&&SN(e)}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,K&&x.log(`[Profiling] Started profiling with profiler ID:`,this._profilerId),fn().setContext(`profile`,{profiler_id:this._profilerId}),this._startProfilerInstance(),!this._profiler){K&&x.log(`[Profiling] Failed to start JS Profiler; stopping.`),this._resetProfilerInfo();return}this._startPeriodicChunking()}}_endProfiling(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&=(clearTimeout(this._chunkTimer),void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(e=>{K&&x.error("[Profiling] Failed to collect current profile chunk on `stop()`:",e)}),this._lifecycleMode===`manual`&&fn().setContext(`profile`,{}))}_setupTraceLifecycleListeners(e){e.on(`spanStart`,e=>{if(!this._sessionSampled){K&&x.log(`[Profiling] Span not profiled because of negative sampling decision for user session.`);return}if(e!==I(e))return;if(!e.isRecording()){K&&x.log(`[Profiling] Discarding profile because root span was not sampled.`);return}let t=e.spanContext().spanId;if(!t||this._activeRootSpanIds.has(t))return;this._registerTraceRootSpan(t);let n=this._activeRootSpanIds.size;n===1&&(K&&x.log(`[Profiling] Root span ${t} started. Profiling active while there are active root spans (count=${n}).`),this._beginProfiling())}),e.on(`spanEnd`,e=>{if(!this._sessionSampled)return;let t=e.spanContext().spanId;if(!t||!this._activeRootSpanIds.has(t))return;this._activeRootSpanIds.delete(t);let n=this._activeRootSpanIds.size;K&&x.log(`[Profiling] Root span with ID ${t} ended. Will continue profiling for as long as there are active root spans (currently: ${n}).`),n===0&&(this._collectCurrentChunk().catch(e=>{K&&x.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",e)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,fn().setContext(`profile`,{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(e=>clearTimeout(e)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(e){this._activeRootSpanIds.add(e);let t=setTimeout(()=>this._onRootSpanTimeout(e),TN);this._rootSpanTimeouts.set(e,t)}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;let e=fN();if(!e){K&&x.log(`[Profiling] Failed to start JS Profiler.`);return}this._profiler=e}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(e=>{K&&x.error(`[Profiling] Failed to collect current profile chunk during periodic chunking:`,e)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},wN))}_onRootSpanTimeout(e){this._rootSpanTimeouts.has(e)&&(this._rootSpanTimeouts.delete(e),this._activeRootSpanIds.has(e)&&(K&&x.log(`[Profiling] Reached 5-minute timeout for root span ${e}. You likely started a manual root span that never called \`.end()\`.`),this._activeRootSpanIds.delete(e),this._activeRootSpanIds.size===0&&this._endProfiling()))}async _collectCurrentChunk(){let e=this._profiler;if(this._profiler=void 0,e)try{let t=$M(await e.stop(),this._client,this._profilerId),n=eN(t);if(`reason`in n){K&&x.log(`[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):`,n.reason);return}this._sendProfileChunk(t),K&&x.log(`[Profiling] Collected browser profile chunk.`)}catch(e){K&&x.log(`[Profiling] Error while stopping JS Profiler for chunk:`,e)}}_sendProfileChunk(e){let t=this._client,n=Ii(t.getSdkMetadata?.()),r=t.getDsn(),i=t.getOptions().tunnel,a=Si({event_id:mt(),sent_at:new Date().toISOString(),...n&&{sdk:n},...!!i&&r&&{dsn:tr(r)}},[[{type:`profile_chunk`,platform:`javascript`},e]]);t.sendEnvelope(a).then(null,e=>{K&&x.error(`Error while sending profile chunk envelope:`,e)})}},DN=`BrowserProfiling`,ON=R((()=>({name:DN,setup(e){let t=e.getOptions(),n=new EN;if(!hN(t)&&!t.profileLifecycle&&(t.profileLifecycle=`manual`),hN(t)&&!t.profilesSampleRate){K&&x.log(`[Profiling] Profiling disabled, no profiling options found.`);return}let r=Br(),i=r&&I(r);if(hN(t)&&t.profileSessionSampleRate!==void 0&&K&&x.warn("[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled."),hN(t))i&&nN(i)&&pN(i)&&CN(i),e.on(`spanStart`,e=>{let t=I(e);e===t?pN(e)&&CN(e):xN.has(t)&&SN(e)}),e.on(`beforeEnvelope`,e=>{if(!vN())return;let t=aN(e);if(!t.length)return;let n=[];for(let e of t){let t=e?.contexts,r=t?.profile?.profile_id,i=t?.profile?.start_timestamp;if(typeof r!=`string`){K&&x.log(`[Profiling] cannot find profile for a span without a profile context`);continue}if(!r){K&&x.log(`[Profiling] cannot find profile for a span without a profile context`);continue}t?.profile&&delete t.profile;let a=yN(r);if(!a){K&&x.log(`[Profiling] Could not retrieve profile for span: ${r}`);continue}let o=gN(r,i,a,e);o&&n.push(o)}iN(e,n)});else{let r=t.profileLifecycle;if(e.on(`startUIProfiler`,()=>n.start()),e.on(`stopUIProfiler`,()=>n.stop()),r===`manual`)n.initialize(e);else if(r===`trace`){if(!Gr(t)){K&&x.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.");return}n.initialize(e),i&&n.notifyRootSpanActive(i),U.setTimeout(()=>{let e=Br(),t=e&&I(e);t&&n.notifyRootSpanActive(t)},0)}}}}))),kN=`SpotlightBrowser`,AN=[{op:`ui.interaction.click`,name:`#sentry-spotlight`}],jN=((e={})=>{let t=e.sidecarUrl||`http://localhost:8969/stream`;return{name:kN,setup:()=>{K&&x.log(`Using Sidecar URL`,t)},beforeSetup(e){let t=e.getOptions();t.ignoreSpans=[...t.ignoreSpans||[],...AN]},afterAllSetup:e=>{MN(e,t)}}});function MN(e,t){let n=Wx(`fetch`),r=0;e.on(`beforeEnvelope`,e=>{if(r>3){x.warn(`[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:`,r);return}n(t,{method:`POST`,body:Oi(e),headers:{"Content-Type":`application/x-sentry-envelope`},mode:`cors`}).then(e=>{e.status>=200&&e.status<400&&(r=0)},e=>{r++,x.error(`Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/`,e)})})}var NN=R(jN),PN=R(()=>({name:`LaunchDarkly`,processEvent(e,t,n){return ed(e)}}));function FN(){return{name:`sentry-flag-auditor`,type:`flag-used`,synchronous:!0,method:(e,t,n)=>{td(e,t.value),rd(e,t.value)}}}var IN=R(()=>({name:`OpenFeature`,processEvent(e,t,n){return ed(e)}})),LN=class{after(e,t){td(t.flagKey,t.value),rd(t.flagKey,t.value)}error(e,t,n){td(e.flagKey,e.defaultValue),rd(e.flagKey,e.defaultValue)}},RN=R(({featureFlagClientClass:e})=>({name:`Unleash`,setupOnce(){let t=e.prototype;Ne(t,`isEnabled`,zN)},processEvent(e,t,n){return ed(e)}}));function zN(e){return function(...t){let n=t[0],r=e.apply(this,t);return typeof n==`string`&&typeof r==`boolean`?(td(n,r),rd(n,r)):K&&x.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}var BN=(({growthbookClass:e})=>ad({growthbookClass:e})),VN=R(({featureFlagClient:e})=>({name:`Statsig`,setup(t){e.on(`gate_evaluation`,e=>{td(e.gate.name,e.gate.value),rd(e.gate.name,e.gate.value)})},processEvent(e,t,n){return ed(e)}}));async function HN(){let e=j();if(!e)return`no-client-active`;if(!e.getDsn())return`no-dsn-configured`;let t=e.getOptions().tunnel||`https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7`;try{await ua(()=>fetch(t,{body:`{}`,method:`POST`,mode:`cors`,credentials:`omit`}))}catch{return`sentry-unreachable`}}var UN=`WebWorker`,WN=R(({worker:e})=>({name:UN,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(e=>GN(e))},addWorker:e=>GN(e)}));function GN(e){e.addEventListener(`message`,e=>{if(JN(e.data)){if(e.stopImmediatePropagation(),e.data._sentryDebugIds&&(K&&x.log(`Sentry debugId web worker message received`,e.data),U._sentryDebugIds={...e.data._sentryDebugIds,...U._sentryDebugIds}),e.data._sentryModuleMetadata&&(K&&x.log(`Sentry module metadata web worker message received`,e.data),U._sentryModuleMetadata={...e.data._sentryModuleMetadata,...U._sentryModuleMetadata}),e.data._sentryWasmImages){K&&x.log(`Sentry WASM images web worker message received`,e.data);let t=U._sentryWasmImages||[],n=e.data._sentryWasmImages.filter(e=>Ee(e)&&typeof e.code_file==`string`&&!t.some(t=>t.code_file===e.code_file));U._sentryWasmImages=[...t,...n]}e.data._sentryWorkerError&&(K&&x.log(`Sentry worker rejection message received`,e.data._sentryWorkerError),KN(e.data._sentryWorkerError))}})}function KN(e){let t=j();if(!t)return;let n=t.getOptions().stackParser,r=t.getOptions().attachStacktrace,i=e.reason,a=Te(i)?cC(i):Xv(n,i,void 0,r,!0);a.level=`error`,e.filename&&(a.contexts={...a.contexts,worker:{filename:e.filename}}),No(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.web_worker.onunhandledrejection`}}),K&&x.log(`Captured worker unhandled rejection`,i)}function qN({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0}),e.addEventListener(`unhandledrejection`,t=>{let n={reason:sC(t),filename:e.location?.href};e.postMessage({_sentryMessage:!0,_sentryWorkerError:n}),K&&x.log(`[Sentry Worker] Forwarding unhandled rejection to parent`,n)}),K&&x.log(`[Sentry Worker] Registered worker with unhandled rejection handling`)}function JN(e){if(!Ee(e)||e._sentryMessage!==!0)return!1;let t=`_sentryDebugIds`in e,n=`_sentryModuleMetadata`in e,r=`_sentryWorkerError`in e,i=`_sentryWasmImages`in e;return!(!t&&!n&&!r&&!i||t&&!(Ee(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!(Ee(e._sentryModuleMetadata)||e._sentryModuleMetadata===void 0)||r&&!Ee(e._sentryWorkerError)||i&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(e=>Ee(e)&&typeof e.code_file==`string`)))}var YN=e(n());function XN(e){return Ee(e)&&`nativeEvent`in e&&`preventDefault`in e&&`stopPropagation`in e}function ZN(e){let t={...e};sl(t,`react`),Po(`react`,{version:YN.version});let n=wC(t);return Xe(QN),n}function QN(e){return XN(e)?`[SyntheticEvent]`:yC(e)}function $N(e){let t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function eP(e,t){let n=new WeakSet;function r(e,t){if(!n.has(e)){if(e.cause)return n.add(e),r(e.cause,t);e.cause=t}}r(e,t)}function tP(e,{componentStack:t},n){if($N(YN.version)&&ve(e)&&t){let n=Error(e.message);n.name=`React ErrorBoundary ${e.name}`,n.stack=t,eP(e,n)}return L(e,n)}function nP(e){return(t,n)=>{let r=!!e,i=tP(t,n,{mechanism:{handled:r,type:`auto.function.react.error_handler`}});r&&e(t,n,i)}}var rP=`ui.react.render`,iP=`ui.react.update`,aP=`ui.react.mount`,oP={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},sP={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},cP={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},lP={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},uP=Symbol.for(`react.forward_ref`),dP=Symbol.for(`react.memo`);function fP(e){return typeof e==`object`&&!!e&&e.$$typeof===dP}var pP={};pP[uP]=cP,pP[dP]=lP;function mP(e){if(fP(e))return lP;let t=e.$$typeof;return t&&pP[t]||oP}var hP=Object.defineProperty.bind(Object),gP=Object.getOwnPropertyNames.bind(Object),_P=Object.getOwnPropertySymbols?.bind(Object),vP=Object.getOwnPropertyDescriptor.bind(Object),yP=Object.getPrototypeOf.bind(Object),bP=Object.prototype;function xP(e,t,n){if(typeof t!=`string`){if(bP){let n=yP(t);n&&n!==bP&&xP(e,n)}let n=gP(t);_P&&(n=n.concat(_P(t)));let r=mP(e),i=mP(t);for(let a of n)if(!sP[a]&&!i?.[a]&&!r?.[a]&&!vP(e,a)){let n=vP(t,a);if(n)try{hP(e,a,n)}catch{}}}return e}var SP=class extends YN.Component{constructor(e){super(e);let{name:t,disabled:n=!1}=this.props;n||(this._mountSpan=oa({name:`<${t}>`,onlyIfParent:!0,op:aP,attributes:{[P]:`auto.ui.react.profiler`,"ui.component_name":t}}))}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:e,includeUpdates:t=!0}){if(t&&this._mountSpan&&e!==this.props.updateProps){let t=Object.keys(e).filter(t=>e[t]!==this.props.updateProps[t]);if(t.length>0){let e=O();this._updateSpan=la(this._mountSpan,()=>oa({name:`<${this.props.name}>`,onlyIfParent:!0,op:iP,startTime:e,attributes:{[P]:`auto.ui.react.profiler`,"ui.component_name":this.props.name,"ui.react.changed_props":t}}))}}return!0}componentDidUpdate(){this._updateSpan&&=(this._updateSpan.end(),void 0)}componentWillUnmount(){let e=O(),{name:t,includeRender:n=!0}=this.props;if(this._mountSpan&&n){let n=F(this._mountSpan).timestamp;la(this._mountSpan,()=>{let r=oa({onlyIfParent:!0,name:`<${t}>`,op:rP,startTime:n,attributes:{[P]:`auto.ui.react.profiler`,"ui.component_name":t}});r&&r.end(e)})}}render(){return this.props.children}};Object.assign(SP,{defaultProps:{disabled:!1,includeRender:!0,includeUpdates:!0}});function CP(e,t){let n=t?.name||e.displayName||e.name||`unknown`,r=r=>YN.createElement(SP,{...t,name:n,updateProps:r},YN.createElement(e,{...r}));return r.displayName=`profiler(${n})`,xP(r,e),r}function wP(e,t={disabled:!1,hasRenderSpan:!0}){let[n]=YN.useState(()=>{if(!t?.disabled)return oa({name:`<${e}>`,onlyIfParent:!0,op:aP,attributes:{[P]:`auto.ui.react.profiler`,"ui.component_name":e}})});YN.useEffect(()=>(n&&n.end(),()=>{if(n&&t.hasRenderSpan){let t=F(n).timestamp,r=O(),i=oa({name:`<${e}>`,onlyIfParent:!0,op:rP,startTime:t,attributes:{[P]:`auto.ui.react.profiler`,"ui.component_name":e}});i&&i.end(r)}}),[])}var TP=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,EP={componentStack:null,error:null,eventId:null},DP=class extends YN.Component{constructor(e){super(e),this.state=EP,this._openFallbackReportDialog=!0;let t=j();t&&e.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=t.on(`afterSendEvent`,t=>{!t.type&&this._lastEventId&&t.event_id===this._lastEventId&&DC({...e.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(e,t){let{componentStack:n}=t,{beforeCapture:r,onError:i,showDialog:a,dialogOptions:o}=this.props;pn(s=>{r&&r(s,e,n);let c=tP(e,t,{mechanism:{handled:this.props.handled==null?!!this.props.fallback:this.props.handled,type:`auto.function.react.error_boundary`}});i&&i(e,n,c),a&&(this._lastEventId=c,this._openFallbackReportDialog&&DC({...o,eventId:c})),this.setState({error:e,componentStack:n,eventId:c})})}componentDidMount(){let{onMount:e}=this.props;e&&e()}componentWillUnmount(){let{error:e,componentStack:t,eventId:n}=this.state,{onUnmount:r}=this.props;r&&(this.state===EP?r(null,null,null):r(e,t,n)),this._cleanupHook&&=(this._cleanupHook(),void 0)}resetErrorBoundary(){let{onReset:e}=this.props,{error:t,componentStack:n,eventId:r}=this.state;e&&e(t,n,r),this.setState(EP)}render(){let{fallback:e,children:t}=this.props,n=this.state;if(n.componentStack===null)return typeof t==`function`?t():t;let r=typeof e==`function`?YN.createElement(e,{error:n.error,componentStack:n.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:n.eventId}):e;return YN.isValidElement(r)?r:(e&&TP&&x.warn(`fallback did not produce a valid ReactElement`),null)}};function OP(e,t){let n=e.displayName||e.name||`unknown`,r=YN.memo(n=>YN.createElement(DP,{...t},YN.createElement(e,{...n})));return r.displayName=`errorBoundary(${n})`,xP(r,e),r}var kP=`redux.action`,AP=`info`,jP={attachReduxState:!0,actionTransformer:e=>e,stateTransformer:e=>e||null};function MP(e){let t={...jP,...e};return e=>(n,r)=>{t.attachReduxState&&fn().addEventProcessor((e,t)=>{try{e.type===void 0&&e.contexts.state.state.type===`redux`&&(t.attachments=[...t.attachments||[],{filename:`redux_state.json`,data:JSON.stringify(e.contexts.state.state.value)}])}catch{}return e});function i(e){return(n,r)=>{let i=e(n,r),a=k(),o=t.actionTransformer(r);o!=null&&fl({category:kP,data:o,type:AP});let s=t.stateTransformer(i);if(s!=null){let e=j()?.getOptions()?.normalizeDepth||3,t={state:{type:`redux`,value:s}};Ke(t,3+e),a.setContext(`state`,t)}else a.setContext(`state`,null);let{configureScopeWithState:c}=t;return typeof c==`function`&&c(a,i),i}}let a=e(i(n),r);return a.replaceReducer=new Proxy(a.replaceReducer,{apply:function(e,t,n){e.apply(t,[i(n[0])])}}),a}}function NP(e){let t=pM({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,match:i,instrumentPageLoad:a=!0,instrumentNavigation:o=!0}=e;return{...t,afterAllSetup(e){t.afterAllSetup(e),a&&U.location&&PP(r,U.location,i,(t,n=`url`)=>{mM(e,{name:t,attributes:{[N]:`pageload`,[P]:`auto.pageload.react.reactrouter_v3`,[M]:n,...n===`route`&&{"url.template":t}}})}),o&&n.listen&&n.listen(t=>{(t.action===`PUSH`||t.action===`POP`)&&PP(r,t,i,(t,n=`url`)=>{hM(e,{name:t,attributes:{[N]:`navigation`,[P]:`auto.navigation.react.reactrouter_v3`,[M]:n,...n===`route`&&{"url.template":t}}})})})}}}function PP(e,t,n,r){let i=t.pathname;n({location:t,routes:e},(e,t,n)=>{if(e||!n)return r(i);let a=FP(n.routes||[]);return a.length===0||a===`/*`?r(i):(i=a,r(i,`route`))})}function FP(e){if(!Array.isArray(e)||e.length===0)return``;let t=e.filter(e=>!!e.path),n=-1;for(let e=t.length-1;e>=0;e--)if(t[e].path?.startsWith(`/`)){n=e;break}return t.slice(n).reduce((e,{path:t})=>`${e}${e===`/`||e===``?t:`/${t}`}`,``)}function IP(e,t={}){let n=e,r=pM({...t,instrumentNavigation:!1,instrumentPageLoad:!1}),{instrumentPageLoad:i=!0,instrumentNavigation:a=!0}=t;return{...r,afterAllSetup(e){r.afterAllSetup(e);let t=(e,t)=>{let r=n.matchRoutes(e,t,{preload:!1,throwOnError:!1}),i=r[r.length-1];return i?.routeId===`__root__`?void 0:i},o=(e,t,r,i)=>{e.updateName(t?t.routeId:i),e.setAttribute(M,t?`route`:`url`),e.setAttributes({...t&&{"url.template":t.routeId},...RP(n,r),...zP(t)})},s=U.location;if(i&&s){let r=t(s.pathname,n.options.parseSearch(s.search)),i=mM(e,{name:r?r.routeId:s.pathname,attributes:{[N]:`pageload`,[P]:`auto.pageload.react.tanstack_router`,[M]:r?`route`:`url`,...r&&{"url.template":r.routeId},...zP(r)}}),a=n.subscribe(`onResolved`,e=>{if(a(),!i)return;let{toLocation:n}=e,r=t(n.pathname,n.search);o(i,r,n,n.pathname)})}if(a){let r;n.subscribe(`onBeforeLoad`,i=>{let{toLocation:a,fromLocation:s}=i;if(!s||a.state===s.state)return;let c=t(a.pathname,a.search),l=U.location?.pathname||a.pathname;if(r){o(r,c,a,l);return}r=hM(e,{name:c?c.routeId:l,attributes:{[N]:`navigation`,[P]:`auto.navigation.react.tanstack_router`,[M]:c?`route`:`url`,...c&&{"url.template":c.routeId},...zP(c)}},{url:LP(n,a)})}),n.subscribe(`onResolved`,e=>{let n=r;if(r=void 0,!n)return;let{toLocation:i}=e,a=t(i.pathname,i.search);a&&o(n,a,i,U.location?.pathname||i.pathname)})}}}}function LP(e,t){let n=e.options.stringifySearch?.(t.search)??``;return rS(`${t.pathname}${n&&n!==`?`?n:``}`)}function RP(e,t){let n=LP(e,t);return{[ui]:t.pathname,[li]:n}}function zP(e){if(!e)return{};let t={};return Object.entries(e.params).forEach(([e,n])=>{t[`url.path.params.${e}`]=n,t[di.replace(`<key>`,e)]=n,t[ti.replace(`<key>`,e)]=n}),t}function BP(e){let t=pM({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:i,instrumentPageLoad:a=!0,instrumentNavigation:o=!0}=e;return{...t,afterAllSetup(e){t.afterAllSetup(e),HP(e,a,o,n,`reactrouter_v4`,r,i)}}}function VP(e){let t=pM({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:i,instrumentPageLoad:a=!0,instrumentNavigation:o=!0}=e;return{...t,afterAllSetup(e){t.afterAllSetup(e),HP(e,a,o,n,`reactrouter_v5`,r,i)}}}function HP(e,t,n,r,i,a=[],o){function s(){if(r.location)return r.location.pathname;if(U.location)return U.location.pathname}function c(e){if(a.length===0||!o)return[e,`url`];let t=UP(a,e,o);for(let e of t)if(e.match.isExact)return[e.match.path,`route`];return[e,`url`]}if(t){let t=s();if(t){let[n,r]=c(t);mM(e,{name:n,attributes:{[N]:`pageload`,[P]:`auto.pageload.react.${i}`,[M]:r,...r===`route`&&{"url.template":n}}})}}n&&r.listen&&r.listen((t,n)=>{if(n&&(n===`PUSH`||n===`POP`)){let[n,r]=c(t.pathname);hM(e,{name:n,attributes:{[N]:`navigation`,[P]:`auto.navigation.react.${i}`,[M]:r,...r===`route`&&{"url.template":n}}})}})}function UP(e,t,n,r=[]){return e.some(e=>{let i=e.path?n(t,e):r.length?r[r.length-1].match:WP(t);return i&&(r.push({route:e,match:i}),e.routes&&UP(e.routes,t,n,r)),!!i}),r}function WP(e){return{path:`/`,url:`/`,params:{},isExact:e===`/`}}function GP(e){let t=e.displayName||e.name,n=t=>{if(t?.computedMatch?.isExact){let e=t.computedMatch.path,n=KP();k().setTransactionName(e),n&&(n.updateName(e),n.setAttributes({[M]:`route`,[fi]:e}))}return YN.createElement(e,{...t})};return n.displayName=`sentryRoute(${t})`,xP(n,e),n}function KP(){let e=Br(),t=e&&I(e);if(!t)return;let n=F(t).op;return n===`navigation`||n===`pageload`?t:void 0}function qP(e,t){if(!t||t===`/`||!e.toLowerCase().startsWith(t.toLowerCase()))return e;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?e:e.slice(n)||`/`}var JP=new WeakMap;function YP(e,t,n){if(!e||!t?.length)return null;let r=n?qP(e,n):e,i=JP.get(t);i||(i=aF(t),JP.set(t,i),TP&&x.log(`[React Router] Sorted route manifest by specificity:`,i.length,`patterns`));for(let e of i)if(XP(r,e))return TP&&x.log(`[React Router] Matched pathname`,r,`to pattern`,e),e;return TP&&x.log(`[React Router] No manifest match found for pathname:`,r),null}function XP(e,t){if(t===`/`)return e===`/`||e===``;let n=QP(e),r=QP(t);if(r.length>0&&r[r.length-1]===`*`){let e=r.slice(0,-1);if(n.length<e.length)return!1;for(let[t,r]of e.entries())if(!ZP(n[t],r))return!1;return!0}if(n.length!==r.length)return!1;for(let[e,t]of r.entries())if(!ZP(n[e],t))return!1;return!0}function ZP(e,t){return e===void 0||t===void 0?!1:$P.test(t)?!0:e===t}function QP(e){return e.split(`/`).filter(Boolean)}var $P=/^:[\w-]+$/,eF=10,tF=3,nF=1,rF=-2;function iF(e){let t=e.split(`/`),n=t.length;t.includes(`*`)&&(n+=rF);for(let e of t)if(e===`*`)continue;else $P.test(e)?n+=tF:e===``?n+=nF:n+=eF;return n}function aF(e){return[...e].sort((e,t)=>{let n=iF(e);return iF(t)-n})}var oF,sF=!1,cF=[],lF=10;function uF(e,t){let n={};return cF.length>=lF&&(TP&&x.warn(`[React Router] Navigation context stack overflow - removing oldest context`),cF.shift()),cF.push({token:n,targetPath:e,span:t}),n}function dF(e){cF[cF.length-1]?.token===e&&cF.pop()}function fF(){let e=cF.length;return e>0?cF[e-1]??null:null}function pF(e,t=!1){oF=e,sF=t}function mF(e){return gF(e.route.path||``)}function hF(e){return e.params[`*`]||``}function gF(e){return e[e.length-1]===`*`?e.slice(0,-1):e}function _F(e){return e[e.length-1]===`/`?e.slice(0,-1):e}function vF(e){return e.endsWith(`*`)}function yF(e){return e.includes(`/*`)||e.endsWith(`*`)}function bF(e,t){return vF(e)&&!!t.route.children?.length||!1}function xF(e){return!!(!e.children&&e.element&&e.path?.endsWith(`/*`))}function SF(e,t,n){let r=e&&e.length>0?e:sF?qP(t,n):t,i=r.slice(-2)===`/*`?r.slice(0,-2):r;return i.length>1&&i[i.length-1]===`/`&&(i=i.slice(0,-1)),[i,`route`]}function CF(e){return e.split(/\\?\//).filter(e=>e.length>0&&e!==`,`).length}function wF(e){return e[0]===`/`?e:`/${e}`}function TF(e,t){let n=oF(e,t);if(!n||n.length===0)return``;for(let r of n)if(r.route.path&&r.route.path!==`*`){let n=mF(r),i=qP(t.pathname,wF(r.pathnameBase));return t.pathname===i?_F(i):_F(_F(n||``)+wF(TF(e.filter(e=>e!==r.route),{pathname:i})))}return``}function EF(e,t,n){let r=t.filter(xF);if(!r.length)return;let i=oF(r,e),a=i?.[i.length-1];if(!a||!hF(a))return;let o=_F(gF(a.route.path||``));if(!o)return;let s=wF(o),c=o.split(`/`)[0],l=c?.startsWith(`:`)&&n?.split(`/`).includes(c);if(n===s||n?.startsWith(`${s}/`)||l)return;let u=qP(e.pathname,wF(a.pathnameBase))||`/`,d=TF(t.filter(e=>e!==a.route),{pathname:u});return d?wF(`${o}${wF(d)}`):void 0}function DF(e,t){let n=oF(t,e);if(n){for(let e of n)if(xF(e.route)&&hF(e))return!0}return!1}function OF(e,t){return sF?qP(e.pathname,t):e.pathname||``}function kF(e,t,n,r=``){if(!e||e.length===0)return[sF?qP(t.pathname,r):t.pathname,`url`];if(!n)return[OF(t,r),`url`];let i=``;for(let e of n){let n=e.route;if(!n)continue;if(n.index)return SF(i,e.pathname,r);let a=n.path;if(!a||bF(a,e))continue;let o=a[0]===`/`||i[i.length-1]===`/`?a:`/${a}`;if(i=_F(i)+wF(o),_F(t.pathname)===_F(r+e.pathname))return CF(i)!==CF(e.pathname)&&!vF(i)?[(sF?``:r)+o,`route`]:(bF(i,e)&&(i=i.slice(0,-1)),[(sF?``:r)+i,`route`])}return[OF(t,r),`url`]}function AF(e,t,n,r,i=``,a,o){if(o&&a&&a.length>0){let t=YP(e.pathname,a,i);if(t)return[(sF?``:i)+t,`route`]}let s,c=`url`,l=DF(e,n);l&&(s=wF(TF(n,e)),c=`route`),(!l||!s)&&([s,c]=kF(t,e,r,i));let u=EF(e,n,s);return u?[u,`route`]:[s||e.pathname,c]}function jF(){let e=Br(),t=e?I(e):void 0;if(!t)return;let n=F(t).op;return n===`navigation`||n===`pageload`?t:void 0}function MF(){let e=fF();if(e)return e.targetPath?{pathname:e.targetPath,search:``,hash:``,state:null,key:`default`}:null;if(U!==void 0)try{let e=U.location;if(e)return{pathname:e.pathname,search:e.search||``,hash:e.hash||``,state:null,key:`default`}}catch{TP&&x.warn(`[React Router] Could not access window.location`)}return null}function NF(){let e=fF();return e?e.span:jF()}function PF(e,t,n,r){let i=new Proxy(e,{apply(e,i,a){let o=MF(),s=NF(),c=e.apply(i,a);return FF(c,t,n,r,o,s),c}});return D(i,`__sentry_proxied__`,!0),i}function FF(e,t,n,r,i,a){Ae(e)?e.then(e=>{Array.isArray(e)&&r(e,t,i??void 0,a)}).catch(e=>{TP&&x.warn(`Error resolving async handler '${n}' for route`,t,e)}):Array.isArray(e)&&r(e,t,i??void 0,a)}function IF(e,t){if(e.handle&&typeof e.handle==`object`)for(let n of Object.keys(e.handle)){let r=e.handle[n];typeof r==`function`&&!r.__sentry_proxied__&&(e.handle[n]=PF(r,e,n,t))}if(Array.isArray(e.children))for(let n of e.children)IF(n,t)}var LF,RF,zF,BF,VF,HF=!1,UF=3e3,WF,GF=``,KF=new WeakSet,qF=U?.document?YN.useLayoutEffect:YN.useEffect,JF=new WeakMap,YF=new Set,XF=new WeakMap,ZF=new WeakMap;function QF(e){return U?.requestAnimationFrame?U.requestAnimationFrame(e):setTimeout(e,0)}function $F(e){U?.cancelAnimationFrame?U.cancelAnimationFrame(e):clearTimeout(e)}function eI(e){return`${e.pathname}${e.search||``}${e.hash||``}`}function tI(e){return e.includes(`:`)||e.includes(`*`)}function nI(e,t,n,r){if(!e)return{skip:!1,shouldUpdate:!1};if(e.locationKey===t&&(e.isPlaceholder||!r)){let t=!!e.routeName&&yF(e.routeName),r=yF(n),i=!!e.routeName&&tI(e.routeName),a=tI(n),o=t&&!r,s=!i&&a,c=n!==e.routeName&&n.length>(e.routeName?.length||0)&&!r;return{skip:!0,shouldUpdate:!!(e.routeName&&(o||s||c))}}return{skip:!1,shouldUpdate:!1}}function rI(e,t){let n=t.children||[],r=e.filter(e=>!n.some(t=>t===e||e.path&&t.path===e.path||e.id&&t.id===e.id));r.length>0&&(t.children=[...n,...r])}function iI(e,t){let n=XF.get(e);n||(n=new Set,XF.set(e,n)),n.add(t),t.finally(()=>{let n=XF.get(e);n&&n.delete(t)})}function aI(e){iI(e,new Promise(t=>{ZF.set(e,t)}))}function oI(e){let t=ZF.get(e);t&&(t(),ZF.delete(e),e.__sentry_may_have_lazy_routes__&&=!1)}function sI(e,t,n=null,r){e.forEach(e=>{YF.add(e),HF&&IF(e,sI)}),t&&rI(e,t);let i=r??jF();if(i){let e=F(i);if(e.timestamp){TP&&x.warn(`[React Router] Lazy handler resolved after span ended - skipping update`);return}let t=e.op,a=n;if(!a&&!r&&U!==void 0){let e=U.location;e?.pathname&&(a={pathname:e.pathname})}a&&(t===`pageload`?vI({activeRootSpan:i,location:{pathname:a.pathname},routes:Array.from(YF),allRoutes:Array.from(YF)}):t===`navigation`&&cI(i,a,Array.from(YF),!1,VF))}}function cI(e,t,n,r=!1,i){let a=F(e),o=a.description,s=e?.__sentry_navigation_name_set__,c=o&&yF(o);if((!s||r||c)&&!a.timestamp){let[r,l]=AF(t,n,n,i(n,t)||[],GF,WF,HF),u=a.data?.[M];r&&(!o||!s&&(u!==`route`||l===`route`)||u!==`route`&&l===`route`||u===`route`&&l===`route`&&c)&&(e.updateName(r),e.setAttribute(M,l),l===`route`&&e.setAttribute(fi,r),!yF(r)&&l===`route`&&D(e,`__sentry_navigation_name_set__`,!0))}}function lI(e,t,n,r,i){let a=!1,o=!!i&&F(i).op===`pageload`,s=!1,c=null,l=null;e.subscribe(e=>{if(!a){let t=jF();t&&F(t).op===`pageload`?o=!0:o&&(e.historyAction===`POP`&&!s?s=!0:a=!0)}if(e.historyAction===`PUSH`||e.historyAction===`POP`&&a){let i=eI(e.location),a=()=>{l!==i&&(l=i,c=null,hI({location:e.location,routes:t,navigationType:e.historyAction,version:n,basename:r,allRoutes:Array.from(YF)}))};e.navigation.state===`idle`?(c!==null&&($F(c),c=null),a()):(l!==i&&(l=null),c!==null&&$F(c),c=QF(a))}})}function uI(e,t){return!LF||!RF||!zF||!VF?(TP&&x.warn(`reactRouter${t?`V${t}`:``}Instrumentation was unable to wrap the \`createRouter\` function because of one or more missing parameters.`),e):function(n,r){if(gI(n),HF)for(let e of n)IF(e,sI);let i=jF();r&&`patchRoutesOnNavigation`in r&&typeof r.patchRoutesOnNavigation==`function`&&i&&(D(i,`__sentry_may_have_lazy_routes__`,!0),aI(i));let a=e(n,mI(r,!1,i)),o=r?.basename;return a.state.historyAction===`POP`&&i&&vI({activeRootSpan:i,location:a.state.location,routes:n,basename:o,allRoutes:Array.from(YF)}),GF=o||``,lI(a,n,t,o,i),a}}function dI(e,t){return!LF||!RF||!zF||!VF?(TP&&x.warn(`reactRouter${t?`V${t}`:``}Instrumentation was unable to wrap the \`createMemoryRouter\` function because of one or more missing parameters.`),e):function(n,r){if(gI(n),HF)for(let e of n)IF(e,sI);let i=jF();r&&`patchRoutesOnNavigation`in r&&typeof r.patchRoutesOnNavigation==`function`&&i&&(D(i,`__sentry_may_have_lazy_routes__`,!0),aI(i));let a=e(n,mI(r,!0,i)),o=r?.basename,s,c=r?.initialEntries,l=r?.initialIndex,u=c?.length===1,d=l!==void 0&&c?.[l];s=u?c[0]:d?c[l]:void 0;let f=s?typeof s==`string`?{pathname:s}:s:a.state.location,p=jF();return a.state.historyAction===`POP`&&p&&vI({activeRootSpan:p,location:f,routes:n,basename:o,allRoutes:Array.from(YF)}),GF=o||``,lI(a,n,t,o,p),a}}function fI(e,t){let n=pM({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:r,useLocation:i,useNavigationType:a,createRoutesFromChildren:o,matchRoutes:s,stripBasename:c,enableAsyncRouteHandlers:l=!1,instrumentPageLoad:u=!0,instrumentNavigation:d=!0,lazyRouteTimeout:f,lazyRouteManifest:p}=e;return{...n,setup(t){n.setup(t);let u=e.finalTimeout??3e4,d=(e.idleTimeout??1e3)*3,m=f??d;m===1/0?(UF=u,TP&&x.log(`[React Router] lazyRouteTimeout set to Infinity, capping at finalTimeout:`,u,`ms to prevent indefinite hangs`)):Number.isNaN(m)?(TP&&x.warn(`[React Router] lazyRouteTimeout must be a number, falling back to default:`,d),UF=d):m<0?(TP&&x.warn(`[React Router] lazyRouteTimeout must be non-negative or Infinity, got:`,m,`falling back to:`,d),UF=d):UF=m,LF=r,RF=i,zF=a,VF=s,BF=o,HF=l,WF=p,pF(s,c||!1)},afterAllSetup(e){n.afterAllSetup(e);let r=U.location?.pathname;u&&r&&mM(e,{name:r,attributes:{[M]:`url`,[N]:`pageload`,[P]:`auto.pageload.react.reactrouter${t?`_v${t}`:``}`}}),d&&KF.add(e)}}}function pI(e,t){if(!LF||!RF||!zF||!VF)return TP&&x.warn("reactRouterV6Instrumentation was unable to wrap `useRoutes` because of one or more missing parameters."),e;let n=n=>{let r=YN.useRef(!0),{routes:i,locationArg:a}=n,o=e(i,a),s=RF(),c=zF(),l=typeof a==`string`||a?.pathname?a:s;return qF(()=>{let e=typeof l==`string`?{pathname:l}:l;r.current?(gI(i),vI({activeRootSpan:jF(),location:e,routes:i,allRoutes:Array.from(YF)}),r.current=!1):hI({location:e,routes:i,navigationType:c,version:t,allRoutes:Array.from(YF)})},[c,l]),o};return(e,t)=>YN.createElement(n,{routes:e,locationArg:t})}function mI(e,t=!1,n){if(!e||!(`patchRoutesOnNavigation`in e)||typeof e.patchRoutesOnNavigation!=`function`)return e||{};let r=e.patchRoutesOnNavigation;return{...e,patchRoutesOnNavigation:async e=>{let i=e?.path,a=jF()??n;if(!t){let t=e?.patch,n=e?.matches;t&&(e.patch=(e,r)=>{if(gI(r),n&&n.length>0){let t=n[n.length-1]?.route;if(t){let n=Array.from(YF).find(n=>{let r=n.id!==void 0&&n.id===e,i=n===t,a=n.path!==void 0&&t.path!==void 0&&n.path===t.path;return r||i||a});n&&rI(r,n)}}let o=a?F(a):void 0;return i&&a&&o&&!o.timestamp&&o.op===`navigation`&&cI(a,{pathname:i,search:``,hash:``,state:null,key:`default`},Array.from(YF),!0,VF),t(e,r)})}let o=(async()=>{let t=uF(i,a),n;try{n=await r(e)}finally{dF(t),a&&oI(a)}let o=a?F(a):void 0;if(a&&o&&!o.timestamp&&o.op===`navigation`){let e=i;e&&cI(a,{pathname:e,search:``,hash:``,state:null,key:`default`},Array.from(YF),!1,VF)}return n})();return a&&iI(a,o),o}}}function hI(e){let{location:t,routes:n,navigationType:r,version:i,matches:a,basename:o,allRoutes:s}=e,c=Array.isArray(a)?a:VF(s||n,t,o),l=j();if(!l||!KF.has(l))return;let u=jF();if(!(u&&F(u).op===`pageload`&&r===`POP`)&&(r===`PUSH`||r===`POP`)&&c){let[e,r]=AF(t,s||n,s||n,c,o,WF,HF),a=eI(t),u=JF.get(l),{skip:d,shouldUpdate:f}=nI(u,a,e,u&&!u.isPlaceholder?!!F(u.span).timestamp:!1);if(d){if(f&&u){let t=u.routeName;u.isPlaceholder?(u.routeName=e,TP&&x.log(`[Tracing] Updated placeholder navigation name from "${t}" to "${e}" (will apply to real span)`)):(u.span.updateName(e),u.span.setAttribute(M,r),r===`route`&&u.span.setAttribute(fi,e),D(u.span,`__sentry_navigation_name_set__`,!0),u.routeName=e,TP&&x.log(`[Tracing] Updated navigation span name from "${t}" to "${e}"`))}else TP&&x.log(`[Tracing] Skipping duplicate navigation for location: ${a}`);return}let p={span:{end:()=>{}},routeName:e,pathname:t.pathname,locationKey:a,isPlaceholder:!0};JF.set(l,p);let m;try{m=hM(l,{name:p.routeName,attributes:{[M]:r,[N]:`navigation`,[P]:`auto.navigation.react.reactrouter${i?`_v${i}`:``}`,...r===`route`&&{"url.template":p.routeName}}})}catch(e){throw JF.delete(l),e}m?(JF.set(l,{span:m,routeName:p.routeName,pathname:t.pathname,locationKey:a}),xI(m,t,n,o,`navigation`)):JF.delete(l)}}function gI(e){e.forEach(e=>{_I(e).forEach(e=>{YF.add(e)})})}function _I(e,t=new Set){return t.has(e)||(t.add(e),e.children&&!e.index&&e.children.forEach(e=>{_I(e,t).forEach(e=>{t.add(e)})})),t}function vI({activeRootSpan:e,location:t,routes:n,matches:r,basename:i,allRoutes:a}){let o=Array.isArray(r)?r:VF(a||n,t,i);if(o){let[r,s]=AF(t,a||n,a||n,o,i,WF,HF);k().setTransactionName(r||`/`),e&&(e.updateName(r),e.setAttribute(M,s),s===`route`&&e.setAttribute(fi,r),xI(e,t,n,i,`pageload`))}else e&&xI(e,t,n,i,`pageload`)}function yI(e,t,n,r,i=!1){return n?!!(!e&&i||e&&yF(e)&&r===`route`&&!yF(n)||t!==`route`&&r===`route`):!1}function bI(e,t,n,r,i,a,o,s){try{let c=t.data?.[M];if(c===`route`&&n&&!yF(n))return;let l=Array.from(s),u=l.length>0?l:i,d=VF(u,r,a);if(!d)return;let[f,p]=AF(r,u,u,d,a,WF,HF),m=yI(n,c,f,p,!0),h=o===`pageload`||!t.timestamp;m&&h&&(e.updateName(f),e.setAttribute(M,p),p===`route`&&e.setAttribute(fi,f))}catch(e){TP&&x.warn(`Error updating span details before ending: ${e}`)}}function xI(e,t,n,r,i){let a=`__sentry_${i}_end_patched__`;if(e?.[a]||!e.end)return;let o=e.end.bind(e),s=!1;e.end=function(...a){if(s)return;s=!0;let c=a.length>0?a[0]:Date.now()/1e3,l=F(e),u=l.description,d=l.data?.[M],f=()=>{let t=j();if(t&&i===`navigation`){let n=JF.get(t);n&&n.span===e&&JF.delete(t)}},p=XF.get(e),m=e.__sentry_may_have_lazy_routes__;if((p&&p.size>0||m)&&u&&(yF(u)||d!==`route`)){if(UF===0){bI(e,l,u,t,n,r,i,YF),f(),o(c);return}let a=new Promise(e=>setTimeout(e,UF)),s;if(p&&p.size>0){let e=Promise.allSettled(p).then(()=>{});s=UF===1/0?e:Promise.race([e,a])}else s=a;s.then(()=>{let a=F(e);bI(e,a,a.description,t,n,r,i,YF),f(),o(c)}).catch(()=>{f(),o(c)});return}bI(e,l,u,t,n,r,i,YF),f(),o(c)},D(e,a,!0)}function SI(e,t){if(!LF||!RF||!zF||!BF||!VF)return TP&&x.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.
|
|
500
|
+
useEffect: ${LF}. useLocation: ${RF}. useNavigationType: ${zF}.
|
|
501
|
+
createRoutesFromChildren: ${BF}. matchRoutes: ${VF}.`),e;let n=n=>{let r=YN.useRef(!0),i=RF(),a=zF();return qF(()=>{let e=BF(n.children);r.current?(gI(e),vI({activeRootSpan:jF(),location:i,routes:e,allRoutes:Array.from(YF)}),r.current=!1):hI({location:i,routes:e,navigationType:a,version:t,allRoutes:Array.from(YF)})},[i,a]),YN.createElement(e,{...n})};return xP(n,e),n}function CI(e){return fI(e,`6`)}function wI(e){return pI(e,`6`)}function TI(e){return uI(e,`6`)}function EI(e){return dI(e,`6`)}function DI(e){return SI(e,`6`)}function OI(e){return fI(e,`7`)}function kI(e){return SI(e,`7`)}function AI(e){return uI(e,`7`)}function jI(e){return dI(e,`7`)}function MI(e){return pI(e,`7`)}function NI(e){return fI(e,``)}function PI(e){return SI(e,``)}function FI(e){return uI(e,``)}function II(e){return dI(e,``)}function LI(e){return pI(e,``)}var RI=t({BrowserClient:()=>ty,ErrorBoundary:()=>DP,MULTIPLEXED_TRANSPORT_EXTRA_KEY:()=>Lc,OpenFeatureIntegrationHook:()=>LN,Profiler:()=>SP,SDK_VERSION:()=>a,SEMANTIC_ATTRIBUTE_SENTRY_OP:()=>N,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:()=>P,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:()=>gn,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:()=>M,Scope:()=>Ht,WINDOW:()=>U,addBreadcrumb:()=>fl,addEventProcessor:()=>Jo,addIntegration:()=>ds,bindScopeToEmitter:()=>Ia,breadcrumbsIntegration:()=>IS,browserApiErrorsIntegration:()=>KS,browserProfilingIntegration:()=>ON,browserSessionIntegration:()=>$S,browserTracingIntegration:()=>pM,buildLaunchDarklyFlagUsedHandler:()=>FN,captureConsoleIntegration:()=>Yl,captureEvent:()=>No,captureException:()=>L,captureFeedback:()=>vd,captureMessage:()=>Mo,captureReactException:()=>tP,captureSession:()=>Qo,chromeStackLineParser:()=>yS,close:()=>Go,consoleLoggingIntegration:()=>Nd,contextLinesIntegration:()=>XC,continueTrace:()=>ca,createConsolaReporter:()=>Bd,createLangChainCallbackHandler:()=>Ym,createReduxEnhancer:()=>MP,createTransport:()=>ec,createUserFeedbackEnvelope:()=>MS,cultureContextIntegration:()=>tC,dedupeIntegration:()=>Ql,defaultRequestInstrumentationOptions:()=>Bj,defaultStackLineParsers:()=>kS,defaultStackParser:()=>AS,diagnoseSdkConnectivity:()=>HN,elementTimingIntegration:()=>fx,endSession:()=>Xo,eventFiltersIntegration:()=>yl,eventFromException:()=>Jv,eventFromMessage:()=>Yv,exceptionFromError:()=>Rv,extraErrorDataIntegration:()=>ou,featureFlagsIntegration:()=>id,feedbackAsyncIntegration:()=>Iv,feedbackIntegration:()=>Lv,feedbackSyncIntegration:()=>Lv,fetchStreamPerformanceIntegration:()=>Qj,flush:()=>Wo,forceLoad:()=>TC,functionToStringIntegration:()=>gl,geckoStackLineParser:()=>SS,getAbsoluteUrl:()=>rS,getActiveSpan:()=>Br,getClient:()=>j,getCurrentScope:()=>k,getDefaultIntegrations:()=>CC,getFeedback:()=>Ng,getGlobalScope:()=>fn,getIsolationScope:()=>A,getReplay:()=>WA,getRootSpan:()=>I,getSpanDescendants:()=>Rr,getSpanStatusFromHttpCode:()=>Pn,getTraceData:()=>cl,globalHandlersIntegration:()=>iC,graphqlClientIntegration:()=>lw,growthbookIntegration:()=>BN,httpClientIntegration:()=>NC,httpContextIntegration:()=>pC,inboundFiltersIntegration:()=>bl,init:()=>ZN,instrumentAnthropicAiClient:()=>um,instrumentCreateReactAgent:()=>lh,instrumentGoogleGenAIClient:()=>Em,instrumentLangChainEmbeddings:()=>zh,instrumentLangGraph:()=>uh,instrumentOpenAiClient:()=>Bp,instrumentOutgoingRequests:()=>Vj,instrumentSupabaseClient:()=>Pu,isBotUserAgent:()=>dM,isEnabled:()=>qo,isInitialized:()=>Ko,lastEventId:()=>Uo,launchDarklyIntegration:()=>PN,lazyLoadIntegration:()=>Pv,linkedErrorsIntegration:()=>_C,logger:()=>yd,makeBrowserOfflineTransport:()=>FM,makeFetchTransport:()=>aS,makeMultiplexedTransport:()=>Vc,metrics:()=>Pd,moduleMetadataIntegration:()=>Ul,normalizeStringifyValue:()=>yC,onLoad:()=>EC,openFeatureIntegration:()=>IN,opera10StackLineParser:()=>ES,opera11StackLineParser:()=>OS,parameterize:()=>il,reactErrorHandler:()=>nP,reactRouterBrowserTracingIntegration:()=>NI,reactRouterV3BrowserTracingIntegration:()=>NP,reactRouterV4BrowserTracingIntegration:()=>BP,reactRouterV5BrowserTracingIntegration:()=>VP,reactRouterV6BrowserTracingIntegration:()=>CI,reactRouterV7BrowserTracingIntegration:()=>OI,registerSpanErrorInstrumentation:()=>Wr,registerWebWorker:()=>qN,replayCanvasIntegration:()=>Fj,replayIntegration:()=>BA,reportPageLoaded:()=>wM,reportingObserverIntegration:()=>jC,rewriteFramesIntegration:()=>_u,sendFeedback:()=>_g,setActiveSpanInBrowser:()=>TM,setAttribute:()=>Bo,setAttributes:()=>zo,setContext:()=>Po,setConversationId:()=>Ho,setCurrentClient:()=>Nc,setExtra:()=>Io,setExtras:()=>Fo,setHttpStatus:()=>Fn,setMeasurement:()=>Wi,setTag:()=>Ro,setTags:()=>Lo,setUser:()=>Vo,showReportDialog:()=>DC,spanStreamingIntegration:()=>EM,spanToBaggageHeader:()=>yi,spanToJSON:()=>F,spanToTraceHeader:()=>yr,spotlightBrowserIntegration:()=>NN,startBrowserTracingNavigationSpan:()=>hM,startBrowserTracingPageLoadSpan:()=>mM,startInactiveSpan:()=>oa,startNewTrace:()=>fa,startSession:()=>Yo,startSpan:()=>ia,startSpanManual:()=>aa,statsigIntegration:()=>VN,supabaseIntegration:()=>Lu,suppressTracing:()=>ua,tanstackRouterBrowserTracingIntegration:()=>IP,thirdPartyErrorFilterIntegration:()=>Ku,uiProfiler:()=>cS,unleashIntegration:()=>RN,updateSpanName:()=>Hr,useProfiler:()=>wP,viewHierarchyIntegration:()=>uw,webVitalsIntegration:()=>eM,webWorkerIntegration:()=>WN,winjsStackLineParser:()=>wS,withActiveSpan:()=>la,withErrorBoundary:()=>OP,withIsolationScope:()=>mn,withProfiler:()=>CP,withScope:()=>pn,withSentryReactRouterV6Routing:()=>DI,withSentryReactRouterV7Routing:()=>kI,withSentryRouting:()=>GP,withStreamedSpan:()=>bi,wrapCreateBrowserRouter:()=>FI,wrapCreateBrowserRouterV6:()=>TI,wrapCreateBrowserRouterV7:()=>AI,wrapCreateMemoryRouter:()=>II,wrapCreateMemoryRouterV6:()=>EI,wrapCreateMemoryRouterV7:()=>jI,wrapReactRouterRouting:()=>PI,wrapUseRoutes:()=>LI,wrapUseRoutesV6:()=>wI,wrapUseRoutesV7:()=>MI,zodErrorsIntegration:()=>Gu});export{RI as t};
|