@powerhousedao/connect 4.1.0-dev.109 → 4.1.0-dev.110

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.
Files changed (84) hide show
  1. package/dist/assets/AddDriveModal-GtAcUXPf.js +1 -0
  2. package/dist/assets/ClearStorageModal-CakzAURV.js +1 -0
  3. package/dist/assets/CookiesPolicyModal-55pRf5LP.js +1 -0
  4. package/dist/assets/CreateDocumentModal-DQ_9OpMB.js +1 -0
  5. package/dist/assets/DebugSettingsModal-B5qKxNpB.js +1 -0
  6. package/dist/assets/DeleteDriveModal-CF__nLGk.js +1 -0
  7. package/dist/assets/DeleteItemModal-B8ytKgr5.js +1 -0
  8. package/dist/assets/DisclaimerModal-DhlboKHz.js +1 -0
  9. package/dist/assets/DriveSettingsModal-16QKab_H.js +1 -0
  10. package/dist/assets/ExportDocumentWithErrorsModal-7E4RTlRD.js +1 -0
  11. package/dist/assets/SettingsModal-Dg6xXx0_.js +1 -0
  12. package/dist/assets/UpgradeDriveModal-dyNo3JTB.js +1 -0
  13. package/dist/assets/{design_system-CZfmC8Ij.js → design_system-DzDShHR8.js} +10 -10
  14. package/dist/assets/design_system_connect-Bp19If9R.js +45 -0
  15. package/dist/assets/design_system_ui-PEVS1Y_s.js +1 -0
  16. package/dist/assets/{document_drive-CP6paqKN.js → document_drive-BEIKnuGM.js} +6 -6
  17. package/dist/assets/document_engineering-DWx5hRGL.js +1 -0
  18. package/dist/assets/{document_model-DLxR7ZLO.js → document_model-DXcLJEjZ.js} +3 -3
  19. package/dist/assets/document_model_editor-hhDK55cy.js +23 -0
  20. package/dist/assets/drive_explorer-DRRO99zb.js +2 -0
  21. package/dist/assets/graphql-editor-DEHNUhYc.js +73 -0
  22. package/dist/assets/hooks-C2Y-G872.js +12 -0
  23. package/dist/assets/index-BeXL_K-5.js +18 -0
  24. package/dist/assets/json-editor-k72yFgOL.js +1 -0
  25. package/dist/assets/react/jsx-runtime-DldvXD6N.js +1 -0
  26. package/dist/assets/react-DQSxOgtG.js +1 -0
  27. package/dist/assets/react-dom/client-BVPiT_FE.js +9 -0
  28. package/dist/assets/react-dom-D6zQJsh6.js +1 -0
  29. package/dist/assets/reactor_browser-DBUrxP7P.js +25 -0
  30. package/dist/assets/{sentry_browser-BFJlXALZ.js → sentry_browser-B4YoBIIG.js} +40 -40
  31. package/dist/assets/sentry_react-cODD7zWc.js +3 -0
  32. package/dist/assets/state-schemas-DD7z-FcB.js +2 -0
  33. package/dist/assets/{common-n2B-GsjO.js → tailwind_merge-Dr4f9Rms.js} +1 -1
  34. package/dist/index.html +17 -13
  35. package/lib/package.copy.json +1 -1
  36. package/lib/src/components/app-loader.d.ts.map +1 -1
  37. package/lib/src/components/app-loader.js +1 -1
  38. package/lib/src/components/app-loader.js.map +1 -1
  39. package/lib/src/components/app.d.ts.map +1 -1
  40. package/lib/src/components/app.js +1 -1
  41. package/lib/src/components/app.js.map +1 -1
  42. package/lib/src/components/cookie-banner.d.ts.map +1 -1
  43. package/lib/src/components/cookie-banner.js +1 -1
  44. package/lib/src/components/cookie-banner.js.map +1 -1
  45. package/lib/src/components/login.js.map +1 -1
  46. package/lib/src/components/modal/modals/SettingsModal.d.ts.map +1 -1
  47. package/lib/src/components/modal/modals/SettingsModal.js +1 -1
  48. package/lib/src/components/modal/modals/SettingsModal.js.map +1 -1
  49. package/lib/src/components/sidebar.js.map +1 -1
  50. package/lib/src/pages/content.d.ts.map +1 -1
  51. package/lib/src/pages/content.js +1 -1
  52. package/lib/src/pages/content.js.map +1 -1
  53. package/lib/src/store/editor.d.ts.map +1 -1
  54. package/lib/src/store/editor.js +7 -6
  55. package/lib/src/store/editor.js.map +1 -1
  56. package/lib/tsconfig.tsbuildinfo +1 -1
  57. package/lib/vite.config.d.ts.map +1 -1
  58. package/lib/vite.config.js +12 -3
  59. package/lib/vite.config.js.map +1 -1
  60. package/package.copy.json +1 -1
  61. package/package.json +9 -9
  62. package/dist/assets/AddDriveModal-CPvaNH6Y.js +0 -1
  63. package/dist/assets/ClearStorageModal-YTs1k-Rl.js +0 -1
  64. package/dist/assets/CookiesPolicyModal-DElFJVXD.js +0 -1
  65. package/dist/assets/CreateDocumentModal-C09c_nGK.js +0 -1
  66. package/dist/assets/DebugSettingsModal-Bx9NT9Ky.js +0 -1
  67. package/dist/assets/DeleteDriveModal-Bf1gE91q.js +0 -1
  68. package/dist/assets/DeleteItemModal-CNXFTEYJ.js +0 -1
  69. package/dist/assets/DisclaimerModal-DDEyWnKN.js +0 -1
  70. package/dist/assets/DriveSettingsModal-B18X9rkK.js +0 -1
  71. package/dist/assets/ExportDocumentWithErrorsModal-C6qbJb3Q.js +0 -1
  72. package/dist/assets/SettingsModal-DYv5jD8W.js +0 -1
  73. package/dist/assets/UpgradeDriveModal-Cpk1OypL.js +0 -1
  74. package/dist/assets/common-8r_LaZs4.css +0 -1
  75. package/dist/assets/design_system_connect-DHQbQvgv.js +0 -53
  76. package/dist/assets/document_engineering-DojqH50p.js +0 -1
  77. package/dist/assets/document_model_editor-ButtI7kP.js +0 -2
  78. package/dist/assets/drive_explorer-IB_BS5Au.js +0 -2
  79. package/dist/assets/editor-CgH7LMsL.js +0 -105
  80. package/dist/assets/editor-ClAkqmdQ.js +0 -1
  81. package/dist/assets/index-D7p9xwW5.js +0 -18
  82. package/dist/assets/reactor_browser-BbZdm6Aa.js +0 -25
  83. package/dist/assets/sentry_react-C4W8xEsl.js +0 -3
  84. /package/dist/assets/{virtual_ph_external-packages-CM1tCR4L.js → _virtual_ph_external-packages-CM1tCR4L.js} +0 -0
@@ -1,21 +1,21 @@
1
- function uh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Nl={exports:{}},ye=Nl.exports={},it,at;function si(){throw new Error("setTimeout has not been defined")}function oi(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?it=setTimeout:it=si}catch{it=si}try{typeof clearTimeout=="function"?at=clearTimeout:at=oi}catch{at=oi}})();function Ll(e){if(it===setTimeout)return setTimeout(e,0);if((it===si||!it)&&setTimeout)return it=setTimeout,setTimeout(e,0);try{return it(e,0)}catch{try{return it.call(null,e,0)}catch{return it.call(this,e,0)}}}function lh(e){if(at===clearTimeout)return clearTimeout(e);if((at===oi||!at)&&clearTimeout)return at=clearTimeout,clearTimeout(e);try{return at(e)}catch{try{return at.call(null,e)}catch{return at.call(this,e)}}}var gt=[],An=!1,Zt,as=-1;function dh(){!An||!Zt||(An=!1,Zt.length?gt=Zt.concat(gt):as=-1,gt.length&&Pl())}function Pl(){if(!An){var e=Ll(dh);An=!0;for(var t=gt.length;t;){for(Zt=gt,gt=[];++as<t;)Zt&&Zt[as].run();as=-1,t=gt.length}Zt=null,An=!1,lh(e)}}ye.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];gt.push(new Dl(e,t)),gt.length===1&&!An&&Ll(Pl)};function Dl(e,t){this.fun=e,this.array=t}Dl.prototype.run=function(){this.fun.apply(null,this.array)};ye.title="browser";ye.browser=!0;ye.env={};ye.argv=[];ye.version="";ye.versions={};function Ct(){}ye.on=Ct;ye.addListener=Ct;ye.once=Ct;ye.off=Ct;ye.removeListener=Ct;ye.removeAllListeners=Ct;ye.emit=Ct;ye.prependListener=Ct;ye.prependOnceListener=Ct;ye.listeners=function(e){return[]};ye.binding=function(e){throw new Error("process.binding is not supported")};ye.cwd=function(){return"/"};ye.chdir=function(e){throw new Error("process.chdir is not supported")};ye.umask=function(){return 0};var fh=Nl.exports;const dc=uh(fh),T=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,$=globalThis,Ft="10.23.0";function Rt(){return vr($),$}function vr(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Ft,t[Ft]=t[Ft]||{}}function Vn(e,t,n=$){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[Ft]=r[Ft]||{};return s[e]||(s[e]=t())}const qi=["debug","info","warn","error","log","assert","trace"],ph="Sentry Logger ",ws={};function jt(e){if(!("console"in $))return e();const t=$.console,n={},r=Object.keys(ws);r.forEach(s=>{const o=ws[s];n[s]=t[s],t[s]=o});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function hh(){Vi().enabled=!0}function mh(){Vi().enabled=!1}function Fl(){return Vi().enabled}function gh(...e){Gi("log",...e)}function _h(...e){Gi("warn",...e)}function yh(...e){Gi("error",...e)}function Gi(e,...t){T&&Fl()&&jt(()=>{$.console[e](`${ph}[${e}]:`,...t)})}function Vi(){return T?Vn("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const m={enable:hh,disable:mh,isEnabled:Fl,log:gh,warn:_h,error:yh},$l=50,dt="?",fc=/\(error: (.*)\)/,pc=/captureMessage|captureException/;function Bl(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const o=[],i=n.split(`
2
- `);for(let a=r;a<i.length;a++){let c=i[a];c.length>1024&&(c=c.slice(0,1024));const u=fc.test(c)?c.replace(fc,"$1"):c;if(!u.match(/\S*Error: /)){for(const d of t){const l=d(u);if(l){o.push(l);break}}if(o.length>=$l+s)break}}return bh(o.slice(s))}}function Sh(e){return Array.isArray(e)?Bl(...e):e}function bh(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Wr(t).function||"")&&t.pop(),t.reverse(),pc.test(Wr(t).function||"")&&(t.pop(),pc.test(Wr(t).function||"")&&t.pop()),t.slice(0,$l).map(n=>({...n,filename:n.filename||Wr(t).filename,function:n.function||dt}))}function Wr(e){return e[e.length-1]||{}}const Ao="<anonymous>";function bt(e){try{return!e||typeof e!="function"?Ao:e.name||Ao}catch{return Ao}}function ii(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const cs={},hc={};function zt(e,t){cs[e]=cs[e]||[],cs[e].push(t)}function qt(e,t){if(!hc[e]){hc[e]=!0;try{t()}catch(n){T&&m.error(`Error while instrumenting ${e}`,n)}}}function qe(e,t){const n=e&&cs[e];if(n)for(const r of n)try{r(t)}catch(s){T&&m.error(`Error while triggering instrumentation handler.
1
+ import{p as tc}from"./react-DQSxOgtG.js";const T=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,$=globalThis,Ot="10.23.0";function Tt(){return mr($),$}function mr(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Ot,t[Ot]=t[Ot]||{}}function Un(e,t,n=$){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[Ot]=r[Ot]||{};return s[e]||(s[e]=t())}const Pi=["debug","info","warn","error","log","assert","trace"],Jp="Sentry Logger ",gs={};function $t(e){if(!("console"in $))return e();const t=$.console,n={},r=Object.keys(gs);r.forEach(s=>{const o=gs[s];n[s]=t[s],t[s]=o});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function Kp(){Fi().enabled=!0}function Xp(){Fi().enabled=!1}function Tl(){return Fi().enabled}function Qp(...e){Di("log",...e)}function Zp(...e){Di("warn",...e)}function eh(...e){Di("error",...e)}function Di(e,...t){T&&Tl()&&$t(()=>{$.console[e](`${Jp}[${e}]:`,...t)})}function Fi(){return T?Un("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const m={enable:Kp,disable:Xp,isEnabled:Tl,log:Qp,warn:Zp,error:eh},Il=50,ct="?",nc=/\(error: (.*)\)/,rc=/captureMessage|captureException/;function wl(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const o=[],i=n.split(`
2
+ `);for(let a=r;a<i.length;a++){let c=i[a];c.length>1024&&(c=c.slice(0,1024));const u=nc.test(c)?c.replace(nc,"$1"):c;if(!u.match(/\S*Error: /)){for(const d of t){const l=d(u);if(l){o.push(l);break}}if(o.length>=Il+s)break}}return nh(o.slice(s))}}function th(e){return Array.isArray(e)?wl(...e):e}function nh(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Pr(t).function||"")&&t.pop(),t.reverse(),rc.test(Pr(t).function||"")&&(t.pop(),rc.test(Pr(t).function||"")&&t.pop()),t.slice(0,Il).map(n=>({...n,filename:n.filename||Pr(t).filename,function:n.function||ct}))}function Pr(e){return e[e.length-1]||{}}const Eo="<anonymous>";function gt(e){try{return!e||typeof e!="function"?Eo:e.name||Eo}catch{return Eo}}function Ko(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const es={},sc={};function Bt(e,t){es[e]=es[e]||[],es[e].push(t)}function Ut(e,t){if(!sc[e]){sc[e]=!0;try{t()}catch(n){T&&m.error(`Error while instrumenting ${e}`,n)}}}function ze(e,t){const n=e&&es[e];if(n)for(const r of n)try{r(t)}catch(s){T&&m.error(`Error while triggering instrumentation handler.
3
3
  Type: ${e}
4
- Name: ${bt(r)}
5
- Error:`,s)}}let xo=null;function Ul(e){const t="error";zt(t,e),qt(t,Eh)}function Eh(){xo=$.onerror,$.onerror=function(e,t,n,r,s){return qe("error",{column:r,error:s,line:n,msg:e,url:t}),xo?xo.apply(this,arguments):!1},$.onerror.__SENTRY_INSTRUMENTED__=!0}let Mo=null;function Hl(e){const t="unhandledrejection";zt(t,e),qt(t,vh)}function vh(){Mo=$.onunhandledrejection,$.onunhandledrejection=function(e){return qe("unhandledrejection",e),Mo?Mo.apply(this,arguments):!0},$.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Wl=Object.prototype.toString;function $t(e){switch(Wl.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Et(e,Error)}}function Yn(e,t){return Wl.call(e)===`[object ${t}]`}function jl(e){return Yn(e,"ErrorEvent")}function mc(e){return Yn(e,"DOMError")}function Th(e){return Yn(e,"DOMException")}function Xe(e){return Yn(e,"String")}function no(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Ht(e){return e===null||no(e)||typeof e!="object"&&typeof e!="function"}function ut(e){return Yn(e,"Object")}function ro(e){return typeof Event<"u"&&Et(e,Event)}function wh(e){return typeof Element<"u"&&Et(e,Element)}function Ih(e){return Yn(e,"RegExp")}function Jn(e){return!!(e?.then&&typeof e.then=="function")}function kh(e){return ut(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Et(e,t){try{return e instanceof t}catch{return!1}}function zl(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function ql(e){return typeof Request<"u"&&Et(e,Request)}const Yi=$,Ch=80;function De(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let o=0,i=0;const a=" > ",c=a.length;let u;const d=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||Ch;for(;n&&o++<r&&(u=Rh(n,d),!(u==="html"||o>1&&i+s.length*c+u.length>=l));)s.push(u),i+=u.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function Rh(e,t){const n=e,r=[];if(!n?.tagName)return"";if(Yi.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const s=t?.length?t.filter(i=>n.getAttribute(i)).map(i=>[i,n.getAttribute(i)]):null;if(s?.length)s.forEach(i=>{r.push(`[${i[0]}="${i[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const i=n.className;if(i&&Xe(i)){const a=i.split(/\s+/);for(const c of a)r.push(`.${c}`)}}const o=["aria-label","type","name","title","alt"];for(const i of o){const a=n.getAttribute(i);a&&r.push(`[${i}="${a}"]`)}return r.join("")}function mn(){try{return Yi.document.location.href}catch{return""}}function Gl(e){if(!Yi.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function Mn(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Oo(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let s=Math.max(t-60,0);s<5&&(s=0);let o=Math.min(s+140,r);return o>r-5&&(o=r),o===r&&(s=Math.max(o-140,0)),n=n.slice(s,o),s>0&&(n=`'{snip} ${n}`),o<r&&(n+=" {snip}"),n}function Is(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{zl(s)?n.push("[VueViewModel]"):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function us(e,t,n=!1){return Xe(e)?Ih(t)?t.test(e):Xe(t)?n?e===t:e.includes(t):!1:!1}function Qe(e,t=[],n=!1){return t.some(r=>us(e,r,n))}function ke(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const s=n(r);typeof s=="function"&&Vl(s,r);try{e[t]=s}catch{T&&m.log(`Failed to replace method "${t}" in object`,e)}}function Fe(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{T&&m.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Vl(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Fe(e,"__sentry_original__",t)}catch{}}function Ji(e){return e.__sentry_original__}function Yl(e){if($t(e))return{message:e.message,name:e.name,stack:e.stack,..._c(e)};if(ro(e)){const t={type:e.type,target:gc(e.target),currentTarget:gc(e.currentTarget),..._c(e)};return typeof CustomEvent<"u"&&Et(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function gc(e){try{return wh(e)?De(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function _c(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function Ah(e,t=40){const n=Object.keys(Yl(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return Mn(r,t);for(let s=n.length;s>0;s--){const o=n.slice(0,s).join(", ");if(!(o.length>t))return s===n.length?o:Mn(o,t)}return""}function xh(){const e=$;return e.crypto||e.msCrypto}let No;function Mh(){return Math.random()*16}function ve(e=xh()){try{if(e?.randomUUID)return e.randomUUID().replace(/-/g,"")}catch{}return No||(No="10000000100040008000"+1e11),No.replace(/[018]/g,t=>(t^(Mh()&15)>>t/4).toString(16))}function Jl(e){return e.exception?.values?.[0]}function Xt(e){const{message:t,event_id:n}=e;if(t)return t;const r=Jl(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function ai(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function vt(e,t){const n=Jl(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){const o={...s?.data,...t.data};n.mechanism.data=o}}function Oh(e,t,n=5){if(t.lineno===void 0)return;const r=e.length,s=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,s-n),s).map(i=>Oo(i,0));const o=Math.min(r-1,s);t.context_line=Oo(e[o],t.colno||0),t.post_context=e.slice(Math.min(s+1,r),s+1+n).map(i=>Oo(i,0))}function yc(e){if(Nh(e))return!0;try{Fe(e,"__sentry_captured__",!0)}catch{}return!1}function Nh(e){try{return e.__sentry_captured__}catch{}}const Kl=1e3;function gn(){return Date.now()/Kl}function Lh(){const{performance:e}=$;if(!e?.now||!e.timeOrigin)return gn;const t=e.timeOrigin;return()=>(t+e.now())/Kl}let Sc;function he(){return(Sc??(Sc=Lh()))()}let Lo;function Ph(){const{performance:e}=$;if(!e?.now)return[void 0,"none"];const t=3600*1e3,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=s<t,i=e.timing?.navigationStart,c=typeof i=="number"?Math.abs(i+n-r):t,u=c<t;return o||u?s<=c?[e.timeOrigin,"timeOrigin"]:[i,"navigationStart"]:[r,"dateNow"]}function Ae(){return Lo||(Lo=Ph()),Lo[0]}function Dh(e){const t=he(),n={sid:ve(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>$h(n)};return e&&On(n,e),n}function On(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||he(),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:ve()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Fh(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),On(e,n)}function $h(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 Tr(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=Tr(r[s],t[s],n-1));return r}function ft(){return ve()}function yt(){return ve().substring(16)}const ci="_sentrySpan";function Tt(e,t){t?Fe(e,ci,t):delete e[ci]}function Nn(e){return e[ci]}const Bh=100;class pt{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:ft(),sampleRand:Math.random()}}clone(){const t=new pt;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},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,Tt(t,Nn(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&On(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof pt?n.getScopeData():ut(n)?t:void 0,{tags:s,extra:o,user:i,contexts:a,level:c,fingerprint:u=[],propagationContext:d}=r||{};return this._tags={...this._tags,...s},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),c&&(this._level=c),u.length&&(this._fingerprint=u),d&&(this._propagationContext=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,Tt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:ft(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:Bh;if(r<=0)return this;const s={timestamp:gn(),...t,message:t.message?Mn(t.message,2048):t.message};return this._breadcrumbs.push(s),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),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(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,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:Nn(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Tr(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||ve();if(!this._client)return T&&m.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureMessage(t,n,r){const s=r?.event_id||ve();if(!this._client)return T&&m.warn("No client configured on scope - will not capture message!"),s;const o=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:s},this),s}captureEvent(t,n){const r=n?.event_id||ve();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(T&&m.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function Uh(){return Vn("defaultCurrentScope",()=>new pt)}function Hh(){return Vn("defaultIsolationScope",()=>new pt)}class Wh{constructor(t,n){let r;t?r=t:r=new pt;let s;n?s=n:s=new pt,this._stack=[{scope:r}],this._isolationScope=s}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(s){throw this._popScope(),s}return Jn(r)?r.then(s=>(this._popScope(),s),s=>{throw this._popScope(),s}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Ln(){const e=Rt(),t=vr(e);return t.stack=t.stack||new Wh(Uh(),Hh())}function jh(e){return Ln().withScope(e)}function zh(e,t){const n=Ln();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function bc(e){return Ln().withScope(()=>e(Ln().getIsolationScope()))}function qh(){return{withIsolationScope:bc,withScope:jh,withSetScope:zh,withSetIsolationScope:(e,t)=>bc(t),getCurrentScope:()=>Ln().getScope(),getIsolationScope:()=>Ln().getIsolationScope()}}function Gt(e){const t=vr(e);return t.acs?t.acs:qh()}function q(){const e=Rt();return Gt(e).getCurrentScope()}function Te(){const e=Rt();return Gt(e).getIsolationScope()}function Pn(){return Vn("globalScope",()=>new pt)}function tt(...e){const t=Rt(),n=Gt(t);if(e.length===2){const[r,s]=e;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(e[0])}function VC(...e){const t=Rt(),n=Gt(t);if(e.length===2){const[r,s]=e;return r?n.withSetIsolationScope(r,s):n.withIsolationScope(s)}return n.withIsolationScope(e[0])}function x(){return q().getClient()}function Xl(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=t,o={trace_id:n,span_id:s||yt()};return r&&(o.parent_span_id=r),o}const ze="sentry.source",Ki="sentry.sample_rate",Ql="sentry.previous_trace_sample_rate",Ve="sentry.op",de="sentry.origin",hr="sentry.idle_span_finish_reason",wr="sentry.measurement_unit",Ir="sentry.measurement_value",ui="sentry.custom_span_name",Xi="sentry.profile_id",Kn="sentry.exclusive_time",Gh="http.request.method",Vh="url.full",Yh="sentry.link.type",Jh=0,Qi=1,ne=2;function Kh(e){if(e<400&&e>=100)return{code:Qi};if(e>=400&&e<500)switch(e){case 401:return{code:ne,message:"unauthenticated"};case 403:return{code:ne,message:"permission_denied"};case 404:return{code:ne,message:"not_found"};case 409:return{code:ne,message:"already_exists"};case 413:return{code:ne,message:"failed_precondition"};case 429:return{code:ne,message:"resource_exhausted"};case 499:return{code:ne,message:"cancelled"};default:return{code:ne,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:ne,message:"unimplemented"};case 503:return{code:ne,message:"unavailable"};case 504:return{code:ne,message:"deadline_exceeded"};default:return{code:ne,message:"internal_error"}}return{code:ne,message:"internal_error"}}function ks(e,t){e.setAttribute("http.response.status_code",t);const n=Kh(t);n.message!=="unknown_error"&&e.setStatus(n)}const Zl="_sentryScope",ed="_sentryIsolationScope";function Xh(e){try{const t=$.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function Qh(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}function Zh(e,t,n){e&&(Fe(e,ed,Xh(n)),Fe(e,Zl,t))}function Cs(e){const t=e;return{scope:t[Zl],isolationScope:Qh(t[ed])}}const Zi="sentry-",em=/^sentry-/,tm=8192;function ea(e){const t=nm(e);if(!t)return;const n=Object.entries(t).reduce((r,[s,o])=>{if(s.match(em)){const i=s.slice(Zi.length);r[i]=o}return r},{});if(Object.keys(n).length>0)return n}function td(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${Zi}${r}`]=s),n),{});return rm(t)}function nm(e){if(!(!e||!Xe(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=Ec(n);return Object.entries(r).forEach(([s,o])=>{t[s]=o}),t},{}):Ec(e)}function Ec(e){return e.split(",").map(t=>{const n=t.indexOf("=");if(n===-1)return[];const r=t.slice(0,n),s=t.slice(n+1);return[r,s].map(o=>{try{return decodeURIComponent(o.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function rm(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],s)=>{const o=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,i=s===0?o:`${t},${o}`;return i.length>tm?(T&&m.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):i},"")}const sm=/^o(\d+)\./,om=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function im(e){return e==="http"||e==="https"}function At(e,t=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${i}`}function nd(e){const t=om.exec(e);if(!t){jt(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",o="",i="",a=""]=t.slice(1);let c="",u=a;const d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){const l=u.match(/^\d+/);l&&(u=l[0])}return rd({host:o,pass:s,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function rd(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function am(e){if(!T)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(m.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?im(r)?t&&isNaN(parseInt(t,10))?(m.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(m.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(m.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function cm(e){return e.match(sm)?.[1]}function sd(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=cm(n)),r}function od(e){const t=typeof e=="string"?nd(e):rd(e);if(!(!t||!am(t)))return t}function un(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const id=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function um(e){if(!e)return;const t=e.match(id);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 ad(e,t){const n=um(e),r=ea(t);if(!n?.traceId)return{traceId:ft(),sampleRand:Math.random()};const s=lm(n,r);r&&(r.sample_rand=s.toString());const{traceId:o,parentSpanId:i,parentSampled:a}=n;return{traceId:o,parentSpanId:i,sampled:a,dsc:r||{},sampleRand:s}}function cd(e=ft(),t=yt(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function ud(e=ft(),t=yt(),n){return`00-${e}-${t}-${n?"01":"00"}`}function lm(e,t){const n=un(t?.sample_rand);if(n!==void 0)return n;const r=un(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}function dm(e,t){const n=sd(e);return t&&n&&t!==n?(m.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${n})`),!1):(e.getOptions().strictTraceContinuation||!1)&&(t&&!n||!t&&n)?(m.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}const ld=0,ta=1;let vc=!1;function fm(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:o,status:i,origin:a,links:c}=z(e);return{parent_span_id:o,span_id:t,trace_id:n,data:r,op:s,status:i,origin:a,links:c}}function dd(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),s=r?t:z(e).parent_span_id,o=Cs(e).scope,i=r?o?.getPropagationContext().propagationSpanId||yt():t;return{parent_span_id:s,span_id:i,trace_id:n}}function pm(e){const{traceId:t,spanId:n}=e.spanContext(),r=Vt(e);return cd(t,n,r)}function hm(e){const{traceId:t,spanId:n}=e.spanContext(),r=Vt(e);return ud(t,n,r)}function fd(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...s},attributes:o})=>({span_id:t,trace_id:n,sampled:r===ta,attributes:o,...s}))}function rn(e){return typeof e=="number"?Tc(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Tc(e.getTime()):he()}function Tc(e){return e>9999999999?e/1e3:e}function z(e){if(gm(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(mm(e)){const{attributes:r,startTime:s,name:o,endTime:i,status:a,links:c}=e,u="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:n,data:r,description:o,parent_span_id:u,start_timestamp:rn(s),timestamp:rn(i)||void 0,status:pd(a),op:r[Ve],origin:r[de],links:fd(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function mm(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function gm(e){return typeof e.getSpanJSON=="function"}function Vt(e){const{traceFlags:t}=e.spanContext();return t===ta}function pd(e){if(!(!e||e.code===Jh))return e.code===Qi?"ok":e.message||"internal_error"}const sn="_sentryChildSpans",li="_sentryRootSpan";function hd(e,t){const n=e[li]||e;Fe(t,li,n),e[sn]?e[sn].add(t):Fe(e,sn,new Set([t]))}function _m(e,t){e[sn]&&e[sn].delete(t)}function ls(e){const t=new Set;function n(r){if(!t.has(r)&&Vt(r)){t.add(r);const s=r[sn]?Array.from(r[sn]):[];for(const o of s)n(o)}}return n(e),Array.from(t)}function be(e){return e[li]||e}function Ee(){const e=Rt(),t=Gt(e);return t.getActiveSpan?t.getActiveSpan():Nn(q())}function di(){vc||(jt(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),vc=!0)}function YC(e,t){e.updateName(t),e.setAttributes({[ze]:"custom",[ui]:t})}let wc=!1;function ym(){if(wc)return;function e(){const t=Ee(),n=t&&be(t);if(n){const r="internal_error";T&&m.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:ne,message:r})}}e.tag="sentry_tracingErrorCallback",wc=!0,Ul(e),Hl(e)}function Ge(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||x()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Ic(e){m.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Rs(e,t){if(!t?.length||!e.description)return!1;for(const n of t){if(bm(n)){if(us(e.description,n))return T&&Ic(e),!0;continue}if(!n.name&&!n.op)continue;const r=n.name?us(e.description,n.name):!0,s=n.op?e.op&&us(e.op,n.op):!0;if(r&&s)return T&&Ic(e),!0}return!1}function Sm(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const s of e)s.parent_span_id===r&&(s.parent_span_id=n)}function bm(e){return typeof e=="string"||e instanceof RegExp}const so="production",md="_frozenDsc";function ds(e,t){Fe(e,md,t)}function gd(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s={environment:n.environment||so,release:n.release,public_key:r,trace_id:e,org_id:sd(t)};return t.emit("createDsc",s),s}function na(e,t){const n=t.getPropagationContext();return n.dsc||gd(n.traceId,e)}function et(e){const t=x();if(!t)return{};const n=be(e),r=z(n),s=r.data,o=n.spanContext().traceState,i=o?.get("sentry.sample_rate")??s[Ki]??s[Ql];function a(h){return(typeof i=="number"||typeof i=="string")&&(h.sample_rate=`${i}`),h}const c=n[md];if(c)return a(c);const u=o?.get("sentry.dsc"),d=u&&ea(u);if(d)return a(d);const l=gd(e.spanContext().traceId,t),p=s[ze],f=r.description;return p!=="url"&&f&&(l.transaction=f),Ge()&&(l.sampled=String(Vt(n)),l.sample_rand=o?.get("sentry.sample_rand")??Cs(n).scope?.getPropagationContext().sampleRand.toString()),a(l),t.emit("createDsc",l,n),l}function JC(e){const t=et(e);return td(t)}class wt{constructor(t={}){this._traceId=t.traceId||ft(),this._spanId=t.spanId||yt()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:ld}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function Be(e,t=100,n=1/0){try{return fi("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function _d(e,t=3,n=100*1024){const r=Be(e,t);return wm(r)>n?_d(e,t-1,n):r}function fi(e,t,n=1/0,r=1/0,s=Im()){const[o,i]=s;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=Em(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(o(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const f=u.toJSON();return fi("",f,c-1,r,s)}catch{}const d=Array.isArray(t)?[]:{};let l=0;const p=Yl(t);for(const f in p){if(!Object.prototype.hasOwnProperty.call(p,f))continue;if(l>=r){d[f]="[MaxProperties ~]";break}const h=p[f];d[f]=fi(f,h,c-1,r,s),l++}return i(t),d}function Em(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(zl(t))return"[VueViewModel]";if(kh(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${bt(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=vm(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function vm(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function Tm(e){return~-encodeURI(e).split(/%..|./).length}function wm(e){return Tm(JSON.stringify(e))}function Im(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function nt(e,t=[]){return[e,t]}function km(e,t){const[n,r]=e;return[n,[...r,t]]}function ln(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function kc(e,t){return ln(e,(n,r)=>t.includes(r))}function As(e){const t=vr($);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Cm(e){const t=vr($);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function xs(e){const[t,n]=e;let r=JSON.stringify(t);function s(o){typeof r=="string"?r=typeof o=="string"?r+o:[As(r),o]:r.push(typeof o=="string"?As(o):o)}for(const o of n){const[i,a]=o;if(s(`
4
+ Name: ${gt(r)}
5
+ Error:`,s)}}let vo=null;function kl(e){const t="error";Bt(t,e),Ut(t,rh)}function rh(){vo=$.onerror,$.onerror=function(e,t,n,r,s){return ze("error",{column:r,error:s,line:n,msg:e,url:t}),vo?vo.apply(this,arguments):!1},$.onerror.__SENTRY_INSTRUMENTED__=!0}let To=null;function Cl(e){const t="unhandledrejection";Bt(t,e),Ut(t,sh)}function sh(){To=$.onunhandledrejection,$.onunhandledrejection=function(e){return ze("unhandledrejection",e),To?To.apply(this,arguments):!0},$.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Rl=Object.prototype.toString;function Nt(e){switch(Rl.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return _t(e,Error)}}function Hn(e,t){return Rl.call(e)===`[object ${t}]`}function Al(e){return Hn(e,"ErrorEvent")}function oc(e){return Hn(e,"DOMError")}function oh(e){return Hn(e,"DOMException")}function Ke(e){return Hn(e,"String")}function Ys(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Dt(e){return e===null||Ys(e)||typeof e!="object"&&typeof e!="function"}function it(e){return Hn(e,"Object")}function Js(e){return typeof Event<"u"&&_t(e,Event)}function ih(e){return typeof Element<"u"&&_t(e,Element)}function ah(e){return Hn(e,"RegExp")}function Wn(e){return!!(e?.then&&typeof e.then=="function")}function ch(e){return it(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function _t(e,t){try{return e instanceof t}catch{return!1}}function xl(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function Ml(e){return typeof Request<"u"&&_t(e,Request)}const $i=$,uh=80;function Pe(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let o=0,i=0;const a=" > ",c=a.length;let u;const d=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||uh;for(;n&&o++<r&&(u=lh(n,d),!(u==="html"||o>1&&i+s.length*c+u.length>=l));)s.push(u),i+=u.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function lh(e,t){const n=e,r=[];if(!n?.tagName)return"";if($i.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const s=t?.length?t.filter(i=>n.getAttribute(i)).map(i=>[i,n.getAttribute(i)]):null;if(s?.length)s.forEach(i=>{r.push(`[${i[0]}="${i[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const i=n.className;if(i&&Ke(i)){const a=i.split(/\s+/);for(const c of a)r.push(`.${c}`)}}const o=["aria-label","type","name","title","alt"];for(const i of o){const a=n.getAttribute(i);a&&r.push(`[${i}="${a}"]`)}return r.join("")}function un(){try{return $i.document.location.href}catch{return""}}function Ol(e){if(!$i.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function In(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Io(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let s=Math.max(t-60,0);s<5&&(s=0);let o=Math.min(s+140,r);return o>r-5&&(o=r),o===r&&(s=Math.max(o-140,0)),n=n.slice(s,o),s>0&&(n=`'{snip} ${n}`),o<r&&(n+=" {snip}"),n}function _s(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{xl(s)?n.push("[VueViewModel]"):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function ts(e,t,n=!1){return Ke(e)?ah(t)?t.test(e):Ke(t)?n?e===t:e.includes(t):!1:!1}function Xe(e,t=[],n=!1){return t.some(r=>ts(e,r,n))}function we(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const s=n(r);typeof s=="function"&&Nl(s,r);try{e[t]=s}catch{T&&m.log(`Failed to replace method "${t}" in object`,e)}}function De(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{T&&m.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Nl(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,De(e,"__sentry_original__",t)}catch{}}function Bi(e){return e.__sentry_original__}function Ll(e){if(Nt(e))return{message:e.message,name:e.name,stack:e.stack,...ac(e)};if(Js(e)){const t={type:e.type,target:ic(e.target),currentTarget:ic(e.currentTarget),...ac(e)};return typeof CustomEvent<"u"&&_t(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function ic(e){try{return ih(e)?Pe(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function ac(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function dh(e,t=40){const n=Object.keys(Ll(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return In(r,t);for(let s=n.length;s>0;s--){const o=n.slice(0,s).join(", ");if(!(o.length>t))return s===n.length?o:In(o,t)}return""}function fh(){const e=$;return e.crypto||e.msCrypto}let wo;function ph(){return Math.random()*16}function Ee(e=fh()){try{if(e?.randomUUID)return e.randomUUID().replace(/-/g,"")}catch{}return wo||(wo="10000000100040008000"+1e11),wo.replace(/[018]/g,t=>(t^(ph()&15)>>t/4).toString(16))}function Pl(e){return e.exception?.values?.[0]}function Gt(e){const{message:t,event_id:n}=e;if(t)return t;const r=Pl(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Xo(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function yt(e,t){const n=Pl(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){const o={...s?.data,...t.data};n.mechanism.data=o}}function hh(e,t,n=5){if(t.lineno===void 0)return;const r=e.length,s=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,s-n),s).map(i=>Io(i,0));const o=Math.min(r-1,s);t.context_line=Io(e[o],t.colno||0),t.post_context=e.slice(Math.min(s+1,r),s+1+n).map(i=>Io(i,0))}function cc(e){if(mh(e))return!0;try{De(e,"__sentry_captured__",!0)}catch{}return!1}function mh(e){try{return e.__sentry_captured__}catch{}}const Dl=1e3;function ln(){return Date.now()/Dl}function gh(){const{performance:e}=$;if(!e?.now||!e.timeOrigin)return ln;const t=e.timeOrigin;return()=>(t+e.now())/Dl}let uc;function he(){return(uc??(uc=gh()))()}let ko;function _h(){const{performance:e}=$;if(!e?.now)return[void 0,"none"];const t=3600*1e3,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=s<t,i=e.timing?.navigationStart,c=typeof i=="number"?Math.abs(i+n-r):t,u=c<t;return o||u?s<=c?[e.timeOrigin,"timeOrigin"]:[i,"navigationStart"]:[r,"dateNow"]}function Re(){return ko||(ko=_h()),ko[0]}function yh(e){const t=he(),n={sid:Ee(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>bh(n)};return e&&wn(n,e),n}function wn(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||he(),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:Ee()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Sh(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),wn(e,n)}function bh(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 gr(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=gr(r[s],t[s],n-1));return r}function ut(){return Ee()}function ht(){return Ee().substring(16)}const Qo="_sentrySpan";function St(e,t){t?De(e,Qo,t):delete e[Qo]}function kn(e){return e[Qo]}const Eh=100;class lt{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:ut(),sampleRand:Math.random()}}clone(){const t=new lt;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},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,St(t,kn(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&wn(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof lt?n.getScopeData():it(n)?t:void 0,{tags:s,extra:o,user:i,contexts:a,level:c,fingerprint:u=[],propagationContext:d}=r||{};return this._tags={...this._tags,...s},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),c&&(this._level=c),u.length&&(this._fingerprint=u),d&&(this._propagationContext=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,St(this,void 0),this._attachments=[],this.setPropagationContext({traceId:ut(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:Eh;if(r<=0)return this;const s={timestamp:ln(),...t,message:t.message?In(t.message,2048):t.message};return this._breadcrumbs.push(s),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),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(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,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:kn(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=gr(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||Ee();if(!this._client)return T&&m.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureMessage(t,n,r){const s=r?.event_id||Ee();if(!this._client)return T&&m.warn("No client configured on scope - will not capture message!"),s;const o=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:s},this),s}captureEvent(t,n){const r=n?.event_id||Ee();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(T&&m.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function vh(){return Un("defaultCurrentScope",()=>new lt)}function Th(){return Un("defaultIsolationScope",()=>new lt)}class Ih{constructor(t,n){let r;t?r=t:r=new lt;let s;n?s=n:s=new lt,this._stack=[{scope:r}],this._isolationScope=s}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(s){throw this._popScope(),s}return Wn(r)?r.then(s=>(this._popScope(),s),s=>{throw this._popScope(),s}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Cn(){const e=Tt(),t=mr(e);return t.stack=t.stack||new Ih(vh(),Th())}function wh(e){return Cn().withScope(e)}function kh(e,t){const n=Cn();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function lc(e){return Cn().withScope(()=>e(Cn().getIsolationScope()))}function Ch(){return{withIsolationScope:lc,withScope:wh,withSetScope:kh,withSetIsolationScope:(e,t)=>lc(t),getCurrentScope:()=>Cn().getScope(),getIsolationScope:()=>Cn().getIsolationScope()}}function Ht(e){const t=mr(e);return t.acs?t.acs:Ch()}function q(){const e=Tt();return Ht(e).getCurrentScope()}function ve(){const e=Tt();return Ht(e).getIsolationScope()}function Rn(){return Un("globalScope",()=>new lt)}function et(...e){const t=Tt(),n=Ht(t);if(e.length===2){const[r,s]=e;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(e[0])}function xC(...e){const t=Tt(),n=Ht(t);if(e.length===2){const[r,s]=e;return r?n.withSetIsolationScope(r,s):n.withIsolationScope(s)}return n.withIsolationScope(e[0])}function x(){return q().getClient()}function Fl(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=t,o={trace_id:n,span_id:s||ht()};return r&&(o.parent_span_id=r),o}const je="sentry.source",Ui="sentry.sample_rate",$l="sentry.previous_trace_sample_rate",Ge="sentry.op",de="sentry.origin",ar="sentry.idle_span_finish_reason",_r="sentry.measurement_unit",yr="sentry.measurement_value",Zo="sentry.custom_span_name",Hi="sentry.profile_id",jn="sentry.exclusive_time",Rh="http.request.method",Ah="url.full",xh="sentry.link.type",Mh=0,Wi=1,ne=2;function Oh(e){if(e<400&&e>=100)return{code:Wi};if(e>=400&&e<500)switch(e){case 401:return{code:ne,message:"unauthenticated"};case 403:return{code:ne,message:"permission_denied"};case 404:return{code:ne,message:"not_found"};case 409:return{code:ne,message:"already_exists"};case 413:return{code:ne,message:"failed_precondition"};case 429:return{code:ne,message:"resource_exhausted"};case 499:return{code:ne,message:"cancelled"};default:return{code:ne,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:ne,message:"unimplemented"};case 503:return{code:ne,message:"unavailable"};case 504:return{code:ne,message:"deadline_exceeded"};default:return{code:ne,message:"internal_error"}}return{code:ne,message:"internal_error"}}function ys(e,t){e.setAttribute("http.response.status_code",t);const n=Oh(t);n.message!=="unknown_error"&&e.setStatus(n)}const Bl="_sentryScope",Ul="_sentryIsolationScope";function Nh(e){try{const t=$.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function Lh(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}function Ph(e,t,n){e&&(De(e,Ul,Nh(n)),De(e,Bl,t))}function Ss(e){const t=e;return{scope:t[Bl],isolationScope:Lh(t[Ul])}}const ji="sentry-",Dh=/^sentry-/,Fh=8192;function zi(e){const t=$h(e);if(!t)return;const n=Object.entries(t).reduce((r,[s,o])=>{if(s.match(Dh)){const i=s.slice(ji.length);r[i]=o}return r},{});if(Object.keys(n).length>0)return n}function Hl(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${ji}${r}`]=s),n),{});return Bh(t)}function $h(e){if(!(!e||!Ke(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=dc(n);return Object.entries(r).forEach(([s,o])=>{t[s]=o}),t},{}):dc(e)}function dc(e){return e.split(",").map(t=>{const n=t.indexOf("=");if(n===-1)return[];const r=t.slice(0,n),s=t.slice(n+1);return[r,s].map(o=>{try{return decodeURIComponent(o.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function Bh(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],s)=>{const o=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,i=s===0?o:`${t},${o}`;return i.length>Fh?(T&&m.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):i},"")}const Uh=/^o(\d+)\./,Hh=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Wh(e){return e==="http"||e==="https"}function It(e,t=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${i}`}function Wl(e){const t=Hh.exec(e);if(!t){$t(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",o="",i="",a=""]=t.slice(1);let c="",u=a;const d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){const l=u.match(/^\d+/);l&&(u=l[0])}return jl({host:o,pass:s,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function jl(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function jh(e){if(!T)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(m.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?Wh(r)?t&&isNaN(parseInt(t,10))?(m.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(m.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(m.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function zh(e){return e.match(Uh)?.[1]}function zl(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=zh(n)),r}function ql(e){const t=typeof e=="string"?Wl(e):jl(e);if(!(!t||!jh(t)))return t}function nn(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const Gl=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function qh(e){if(!e)return;const t=e.match(Gl);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 Vl(e,t){const n=qh(e),r=zi(t);if(!n?.traceId)return{traceId:ut(),sampleRand:Math.random()};const s=Gh(n,r);r&&(r.sample_rand=s.toString());const{traceId:o,parentSpanId:i,parentSampled:a}=n;return{traceId:o,parentSpanId:i,sampled:a,dsc:r||{},sampleRand:s}}function Yl(e=ut(),t=ht(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function Jl(e=ut(),t=ht(),n){return`00-${e}-${t}-${n?"01":"00"}`}function Gh(e,t){const n=nn(t?.sample_rand);if(n!==void 0)return n;const r=nn(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}function Vh(e,t){const n=zl(e);return t&&n&&t!==n?(m.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${n})`),!1):(e.getOptions().strictTraceContinuation||!1)&&(t&&!n||!t&&n)?(m.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}const Kl=0,qi=1;let fc=!1;function Yh(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:o,status:i,origin:a,links:c}=z(e);return{parent_span_id:o,span_id:t,trace_id:n,data:r,op:s,status:i,origin:a,links:c}}function Xl(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),s=r?t:z(e).parent_span_id,o=Ss(e).scope,i=r?o?.getPropagationContext().propagationSpanId||ht():t;return{parent_span_id:s,span_id:i,trace_id:n}}function Jh(e){const{traceId:t,spanId:n}=e.spanContext(),r=Wt(e);return Yl(t,n,r)}function Kh(e){const{traceId:t,spanId:n}=e.spanContext(),r=Wt(e);return Jl(t,n,r)}function Ql(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...s},attributes:o})=>({span_id:t,trace_id:n,sampled:r===qi,attributes:o,...s}))}function Xt(e){return typeof e=="number"?pc(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?pc(e.getTime()):he()}function pc(e){return e>9999999999?e/1e3:e}function z(e){if(Qh(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(Xh(e)){const{attributes:r,startTime:s,name:o,endTime:i,status:a,links:c}=e,u="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:n,data:r,description:o,parent_span_id:u,start_timestamp:Xt(s),timestamp:Xt(i)||void 0,status:Zl(a),op:r[Ge],origin:r[de],links:Ql(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Xh(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Qh(e){return typeof e.getSpanJSON=="function"}function Wt(e){const{traceFlags:t}=e.spanContext();return t===qi}function Zl(e){if(!(!e||e.code===Mh))return e.code===Wi?"ok":e.message||"internal_error"}const Qt="_sentryChildSpans",ei="_sentryRootSpan";function ed(e,t){const n=e[ei]||e;De(t,ei,n),e[Qt]?e[Qt].add(t):De(e,Qt,new Set([t]))}function Zh(e,t){e[Qt]&&e[Qt].delete(t)}function ns(e){const t=new Set;function n(r){if(!t.has(r)&&Wt(r)){t.add(r);const s=r[Qt]?Array.from(r[Qt]):[];for(const o of s)n(o)}}return n(e),Array.from(t)}function Se(e){return e[ei]||e}function be(){const e=Tt(),t=Ht(e);return t.getActiveSpan?t.getActiveSpan():kn(q())}function ti(){fc||($t(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),fc=!0)}function MC(e,t){e.updateName(t),e.setAttributes({[je]:"custom",[Zo]:t})}let hc=!1;function em(){if(hc)return;function e(){const t=be(),n=t&&Se(t);if(n){const r="internal_error";T&&m.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:ne,message:r})}}e.tag="sentry_tracingErrorCallback",hc=!0,kl(e),Cl(e)}function qe(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||x()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function mc(e){m.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function bs(e,t){if(!t?.length||!e.description)return!1;for(const n of t){if(nm(n)){if(ts(e.description,n))return T&&mc(e),!0;continue}if(!n.name&&!n.op)continue;const r=n.name?ts(e.description,n.name):!0,s=n.op?e.op&&ts(e.op,n.op):!0;if(r&&s)return T&&mc(e),!0}return!1}function tm(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const s of e)s.parent_span_id===r&&(s.parent_span_id=n)}function nm(e){return typeof e=="string"||e instanceof RegExp}const Ks="production",td="_frozenDsc";function rs(e,t){De(e,td,t)}function nd(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s={environment:n.environment||Ks,release:n.release,public_key:r,trace_id:e,org_id:zl(t)};return t.emit("createDsc",s),s}function Gi(e,t){const n=t.getPropagationContext();return n.dsc||nd(n.traceId,e)}function Ze(e){const t=x();if(!t)return{};const n=Se(e),r=z(n),s=r.data,o=n.spanContext().traceState,i=o?.get("sentry.sample_rate")??s[Ui]??s[$l];function a(h){return(typeof i=="number"||typeof i=="string")&&(h.sample_rate=`${i}`),h}const c=n[td];if(c)return a(c);const u=o?.get("sentry.dsc"),d=u&&zi(u);if(d)return a(d);const l=nd(e.spanContext().traceId,t),p=s[je],f=r.description;return p!=="url"&&f&&(l.transaction=f),qe()&&(l.sampled=String(Wt(n)),l.sample_rand=o?.get("sentry.sample_rand")??Ss(n).scope?.getPropagationContext().sampleRand.toString()),a(l),t.emit("createDsc",l,n),l}function OC(e){const t=Ze(e);return Hl(t)}class bt{constructor(t={}){this._traceId=t.traceId||ut(),this._spanId=t.spanId||ht()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:Kl}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function $e(e,t=100,n=1/0){try{return ni("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function rd(e,t=3,n=100*1024){const r=$e(e,t);return im(r)>n?rd(e,t-1,n):r}function ni(e,t,n=1/0,r=1/0,s=am()){const[o,i]=s;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=rm(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(o(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const f=u.toJSON();return ni("",f,c-1,r,s)}catch{}const d=Array.isArray(t)?[]:{};let l=0;const p=Ll(t);for(const f in p){if(!Object.prototype.hasOwnProperty.call(p,f))continue;if(l>=r){d[f]="[MaxProperties ~]";break}const h=p[f];d[f]=ni(f,h,c-1,r,s),l++}return i(t),d}function rm(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(xl(t))return"[VueViewModel]";if(ch(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${gt(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=sm(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function sm(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function om(e){return~-encodeURI(e).split(/%..|./).length}function im(e){return om(JSON.stringify(e))}function am(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function tt(e,t=[]){return[e,t]}function cm(e,t){const[n,r]=e;return[n,[...r,t]]}function rn(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function gc(e,t){return rn(e,(n,r)=>t.includes(r))}function Es(e){const t=mr($);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function um(e){const t=mr($);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function vs(e){const[t,n]=e;let r=JSON.stringify(t);function s(o){typeof r=="string"?r=typeof o=="string"?r+o:[Es(r),o]:r.push(typeof o=="string"?Es(o):o)}for(const o of n){const[i,a]=o;if(s(`
6
6
  ${JSON.stringify(i)}
7
- `),typeof a=="string"||a instanceof Uint8Array)s(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(Be(a))}s(c)}}return typeof r=="string"?r:Rm(r)}function Rm(e){const t=e.reduce((s,o)=>s+o.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function Am(e){let t=typeof e=="string"?As(e):e;function n(i){const a=t.subarray(0,i);return t=t.subarray(i+1),a}function r(){let i=t.indexOf(10);return i<0&&(i=t.length),JSON.parse(Cm(n(i)))}const s=r(),o=[];for(;t.length;){const i=r(),a=typeof i.length=="number"?i.length:void 0;o.push([i,a?n(a):r()])}return[s,o]}function xm(e){return[{type:"span"},e]}function Mm(e){const t=typeof e.data=="string"?As(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const Om={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item",metric:"metric",trace_metric:"metric"};function Cc(e){return Om[e]}function oo(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function yd(e,t,n,r){const s=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:At(r)},...s&&{trace:s}}}function Nm(e,t){if(!t)return e;const 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 Lm(e,t,n,r){const s=oo(n),o={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:At(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return nt(o,[i])}function Pm(e,t,n,r){const s=oo(n),o=e.type&&e.type!=="replay_event"?e.type:"event";Nm(e,n?.sdk);const i=yd(e,s,r,t);return delete e.sdkProcessingMetadata,nt(i,[[{type:o},e]])}function Dm(e,t){function n(f){return!!f.trace_id&&!!f.public_key}const r=et(e[0]),s=t?.getDsn(),o=t?.getOptions().tunnel,i={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!o&&s&&{dsn:At(s)}},{beforeSendSpan:a,ignoreSpans:c}=t?.getOptions()||{},u=c?.length?e.filter(f=>!Rs(z(f),c)):e,d=e.length-u.length;d&&t?.recordDroppedEvent("before_send","span",d);const l=a?f=>{const h=z(f),g=a(h);return g||(di(),h)}:z,p=[];for(const f of u){const h=l(f);h&&p.push(xm(h))}return nt(i,p)}function Fm(e){if(!T)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=z(e),{spanId:s}=e.spanContext(),o=Vt(e),i=be(e),a=i===e,c=`[Tracing] Starting ${o?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:d,description:l}=z(i);u.push(`root ID: ${i.spanContext().spanId}`),d&&u.push(`root op: ${d}`),l&&u.push(`root description: ${l}`)}m.log(`${c}
7
+ `),typeof a=="string"||a instanceof Uint8Array)s(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify($e(a))}s(c)}}return typeof r=="string"?r:lm(r)}function lm(e){const t=e.reduce((s,o)=>s+o.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function dm(e){let t=typeof e=="string"?Es(e):e;function n(i){const a=t.subarray(0,i);return t=t.subarray(i+1),a}function r(){let i=t.indexOf(10);return i<0&&(i=t.length),JSON.parse(um(n(i)))}const s=r(),o=[];for(;t.length;){const i=r(),a=typeof i.length=="number"?i.length:void 0;o.push([i,a?n(a):r()])}return[s,o]}function fm(e){return[{type:"span"},e]}function pm(e){const t=typeof e.data=="string"?Es(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const hm={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item",metric:"metric",trace_metric:"metric"};function _c(e){return hm[e]}function Xs(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function sd(e,t,n,r){const s=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:It(r)},...s&&{trace:s}}}function mm(e,t){if(!t)return e;const 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 gm(e,t,n,r){const s=Xs(n),o={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:It(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return tt(o,[i])}function _m(e,t,n,r){const s=Xs(n),o=e.type&&e.type!=="replay_event"?e.type:"event";mm(e,n?.sdk);const i=sd(e,s,r,t);return delete e.sdkProcessingMetadata,tt(i,[[{type:o},e]])}function ym(e,t){function n(f){return!!f.trace_id&&!!f.public_key}const r=Ze(e[0]),s=t?.getDsn(),o=t?.getOptions().tunnel,i={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!o&&s&&{dsn:It(s)}},{beforeSendSpan:a,ignoreSpans:c}=t?.getOptions()||{},u=c?.length?e.filter(f=>!bs(z(f),c)):e,d=e.length-u.length;d&&t?.recordDroppedEvent("before_send","span",d);const l=a?f=>{const h=z(f),g=a(h);return g||(ti(),h)}:z,p=[];for(const f of u){const h=l(f);h&&p.push(fm(h))}return tt(i,p)}function Sm(e){if(!T)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=z(e),{spanId:s}=e.spanContext(),o=Wt(e),i=Se(e),a=i===e,c=`[Tracing] Starting ${o?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:d,description:l}=z(i);u.push(`root ID: ${i.spanContext().spanId}`),d&&u.push(`root op: ${d}`),l&&u.push(`root description: ${l}`)}m.log(`${c}
8
8
  ${u.join(`
9
- `)}`)}function $m(e){if(!T)return;const{description:t="< unknown name >",op:n="< unknown op >"}=z(e),{spanId:r}=e.spanContext(),o=be(e)===e,i=`[Tracing] Finishing "${n}" ${o?"root ":""}span "${t}" with ID ${r}`;m.log(i)}function Bm(e,t,n,r=Ee()){const s=r&&be(r);s&&(T&&m.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),s.addEvent(e,{[Ir]:t,[wr]:n}))}function Rc(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},s=r[wr],o=r[Ir];typeof s=="string"&&typeof o=="number"&&(t[n.name]={value:o,unit:s})}),t}const Ac=1e3;class io{constructor(t={}){this._traceId=t.traceId||ft(),this._spanId=t.spanId||yt(),this._startTime=t.startTimestamp||he(),this._links=t.links,this._attributes={},this.setAttributes({[de]:"manual",[Ve]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?ta:ld}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=rn(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(ze,"custom"),this}end(t){this._endTime||(this._endTime=rn(t),$m(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Ve],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:pd(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[de],profile_id:this._attributes[Xi],exclusive_time:this._attributes[Kn],measurements:Rc(this._events),is_segment:this._isStandaloneSpan&&be(this)===this||void 0,segment_id:this._isStandaloneSpan?be(this).spanContext().spanId:void 0,links:fd(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){T&&m.log("[Tracing] Adding an event to span:",t);const s=xc(n)?n:r||he(),o=xc(n)?{}:n||{},i={name:t,time:rn(s),attributes:o};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=x();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===be(this)))return;if(this._isStandaloneSpan){this._sampled?Hm(Dm([this],t)):(T&&m.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(Cs(this).scope||q()).captureEvent(r)}_convertSpanToTransaction(){if(!Mc(z(this)))return;this._name||(T&&m.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=Cs(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const o=ls(this).filter(d=>d!==this&&!Um(d)).map(d=>z(d)).filter(Mc),i=this._attributes[ze];delete this._attributes[ui],o.forEach(d=>{delete d.data[ui]});const a={contexts:{trace:fm(this)},spans:o.length>Ac?o.sort((d,l)=>d.start_timestamp-l.start_timestamp).slice(0,Ac):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:et(this)},request:r,...i&&{transaction_info:{source:i}}},c=Rc(this._events);return c&&Object.keys(c).length&&(T&&m.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),a.measurements=c),a}}function xc(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Mc(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function Um(e){return e instanceof io&&e.isStandaloneSpan()}function Hm(e){const t=x();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function ao(e,t,n=()=>{},r=()=>{}){let s;try{s=e()}catch(o){throw t(o),n(),o}return Wm(s,t,n,r)}function Wm(e,t,n,r){return Jn(e)?e.then(s=>(n(),r(s),s),s=>{throw t(s),n(),s}):(n(),r(e),e)}function jm(e,t,n){if(!Ge(e))return[!1];let r,s;typeof e.tracesSampler=="function"?(s=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),r=!0):t.parentSampled!==void 0?s=t.parentSampled:typeof e.tracesSampleRate<"u"&&(s=e.tracesSampleRate,r=!0);const o=un(s);if(o===void 0)return T&&m.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(s)} of type ${JSON.stringify(typeof s)}.`),[!1];if(!o)return T&&m.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,r];const i=n<o;return i||T&&m.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[i,o,r]}const Ms="__SENTRY_SUPPRESS_TRACING__";function Xn(e,t){const n=kr();if(n.startSpan)return n.startSpan(e,t);const r=sa(e),{forceTransaction:s,parentSpan:o,scope:i}=e,a=i?.clone();return tt(a,()=>Sd(o)(()=>{const u=q(),d=oa(u,o),p=e.onlyIfParent&&!d?new wt:ra({parentSpan:d,spanArguments:r,forceTransaction:s,scope:u});return Tt(u,p),ao(()=>t(p),()=>{const{status:f}=z(p);p.isRecording()&&(!f||f==="ok")&&p.setStatus({code:ne,message:"internal_error"})},()=>{p.end()})}))}function Os(e,t){const n=kr();if(n.startSpanManual)return n.startSpanManual(e,t);const r=sa(e),{forceTransaction:s,parentSpan:o,scope:i}=e,a=i?.clone();return tt(a,()=>Sd(o)(()=>{const u=q(),d=oa(u,o),p=e.onlyIfParent&&!d?new wt:ra({parentSpan:d,spanArguments:r,forceTransaction:s,scope:u});return Tt(u,p),ao(()=>t(p,()=>p.end()),()=>{const{status:f}=z(p);p.isRecording()&&(!f||f==="ok")&&p.setStatus({code:ne,message:"internal_error"})})}))}function Qn(e){const t=kr();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=sa(e),{forceTransaction:r,parentSpan:s}=e;return(e.scope?i=>tt(e.scope,i):s!==void 0?i=>co(s,i):i=>i())(()=>{const i=q(),a=oa(i,s);return e.onlyIfParent&&!a?new wt:ra({parentSpan:a,spanArguments:n,forceTransaction:r,scope:i})})}const KC=(e,t)=>{const n=Rt(),r=Gt(n);if(r.continueTrace)return r.continueTrace(e,t);const{sentryTrace:s,baggage:o}=e,i=x(),a=ea(o);return i&&!dm(i,a?.org_id)?qm(t):tt(c=>{const u=ad(s,o);return c.setPropagationContext(u),t()})};function co(e,t){const n=kr();return n.withActiveSpan?n.withActiveSpan(e,t):tt(r=>(Tt(r,e||void 0),t(r)))}function zm(e){const t=kr();return t.suppressTracing?t.suppressTracing(e):tt(n=>{n.setSDKProcessingMetadata({[Ms]:!0});const r=e();return n.setSDKProcessingMetadata({[Ms]:void 0}),r})}function qm(e){return tt(t=>(t.setPropagationContext({traceId:ft(),sampleRand:Math.random()}),T&&m.log(`Starting a new trace with id ${t.getPropagationContext().traceId}`),co(null,e)))}function ra({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Ge()){const i=new wt;if(n||!e){const a={sampled:"false",sample_rate:"0",transaction:t.name,...et(i)};ds(i,a)}return i}const s=Te();let o;if(e&&!n)o=Gm(e,r,t),hd(e,o);else if(e){const i=et(e),{traceId:a,spanId:c}=e.spanContext(),u=Vt(e);o=Oc({traceId:a,parentSpanId:c,...t},r,u),ds(o,i)}else{const{traceId:i,dsc:a,parentSpanId:c,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};o=Oc({traceId:i,parentSpanId:c,...t},r,u),a&&ds(o,a)}return Fm(o),Zh(o,r,s),o}function sa(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=rn(e.startTime),delete r.startTime,r}return n}function kr(){const e=Rt();return Gt(e)}function Oc(e,t,n){const r=x(),s=r?.getOptions()||{},{name:o=""}=e,i={spanAttributes:{...e.attributes},spanName:o,parentSampled:n};r?.emit("beforeSampling",i,{decision:!1});const a=i.parentSampled??n,c=i.spanAttributes,u=t.getPropagationContext(),[d,l,p]=t.getScopeData().sdkProcessingMetadata[Ms]?[!1]:jm(s,{name:o,parentSampled:a,attributes:c,parentSampleRate:un(u.dsc?.sample_rate)},u.sampleRand),f=new io({...e,attributes:{[ze]:"custom",[Ki]:l!==void 0&&p?l:void 0,...c},sampled:d});return!d&&r&&(T&&m.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",f),f}function Gm(e,t,n){const{spanId:r,traceId:s}=e.spanContext(),o=t.getScopeData().sdkProcessingMetadata[Ms]?!1:Vt(e),i=o?new io({...n,parentSpanId:r,traceId:s,sampled:o}):new wt({traceId:s});hd(e,i);const a=x();return a&&(a.emit("spanStart",i),n.endTimestamp&&a.emit("spanEnd",i)),i}function oa(e,t){if(t)return t;if(t===null)return;const n=Nn(e);if(!n)return;const r=x();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?be(n):n}function Sd(e){return e!==void 0?t=>co(e,t):t=>t()}const fs={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Vm="heartbeatFailed",Ym="idleTimeout",Jm="finalTimeout",Km="externalFinish";function bd(e,t={}){const n=new Map;let r=!1,s,o=Km,i=!t.disableAutoFinish;const a=[],{idleTimeout:c=fs.idleTimeout,finalTimeout:u=fs.finalTimeout,childSpanTimeout:d=fs.childSpanTimeout,beforeSpanEnd:l,trimIdleSpanEndTimestamp:p=!0}=t,f=x();if(!f||!Ge()){const b=new wt,w={sample_rate:"0",sampled:"false",...et(b)};return ds(b,w),b}const h=q(),g=Ee(),_=Xm(e);_.end=new Proxy(_.end,{apply(b,w,E){if(l&&l(_),w instanceof wt)return;const[C,...D]=E,I=C||he(),A=rn(I),G=ls(_).filter(M=>M!==_),K=z(_);if(!G.length||!p)return k(A),Reflect.apply(b,w,[A,...D]);const X=f.getOptions().ignoreSpans,F=G?.reduce((M,J)=>{const se=z(J);return!se.timestamp||X&&Rs(se,X)?M:M?Math.max(M,se.timestamp):se.timestamp},void 0),L=K.start_timestamp,P=Math.min(L?L+u/1e3:1/0,Math.max(L||-1/0,Math.min(A,F||1/0)));return k(P),Reflect.apply(b,w,[P,...D])}});function y(){s&&(clearTimeout(s),s=void 0)}function S(b){y(),s=setTimeout(()=>{!r&&n.size===0&&i&&(o=Ym,_.end(b))},c)}function O(b){s=setTimeout(()=>{!r&&i&&(o=Vm,_.end(b))},d)}function v(b){y(),n.set(b,!0);const w=he();O(w+d/1e3)}function N(b){if(n.has(b)&&n.delete(b),n.size===0){const w=he();S(w+c/1e3)}}function k(b){r=!0,n.clear(),a.forEach(A=>A()),Tt(h,g);const w=z(_),{start_timestamp:E}=w;if(!E)return;w.data[hr]||_.setAttribute(hr,o),m.log(`[Tracing] Idle span "${w.op}" finished`);const D=ls(_).filter(A=>A!==_);let I=0;D.forEach(A=>{A.isRecording()&&(A.setStatus({code:ne,message:"cancelled"}),A.end(b),T&&m.log("[Tracing] Cancelling span since span ended early",JSON.stringify(A,void 0,2)));const G=z(A),{timestamp:K=0,start_timestamp:X=0}=G,F=X<=b,L=(u+c)/1e3,P=K-X<=L;if(T){const M=JSON.stringify(A,void 0,2);F?P||m.log("[Tracing] Discarding span since it finished after idle span final timeout",M):m.log("[Tracing] Discarding span since it happened after idle span was finished",M)}(!P||!F)&&(_m(_,A),I++)}),I>0&&_.setAttribute("sentry.idle_span_discarded_spans",I)}return a.push(f.on("spanStart",b=>{if(r||b===_||z(b).timestamp||b instanceof io&&b.isStandaloneSpan())return;ls(_).includes(b)&&v(b.spanContext().spanId)})),a.push(f.on("spanEnd",b=>{r||N(b.spanContext().spanId)})),a.push(f.on("idleSpanEnableAutoFinish",b=>{b===_&&(i=!0,S(),n.size&&O())})),t.disableAutoFinish||S(),setTimeout(()=>{r||(_.setStatus({code:ne,message:"deadline_exceeded"}),o=Jm,_.end())},u),_}function Xm(e){const t=Qn(e);return Tt(q(),t),T&&m.log("[Tracing] Started span is an idle span"),t}const Po=0,Nc=1,Lc=2;function uo(e){return new mr(t=>{t(e)})}function ia(e){return new mr((t,n)=>{n(e)})}class mr{constructor(t){this._state=Po,this._handlers=[],this._runExecutor(t)}then(t,n){return new mr((r,s)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(i){s(i)}},o=>{if(!n)s(o);else try{r(n(o))}catch(i){s(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new mr((n,r)=>{let s,o;return this.then(i=>{o=!1,s=i,t&&t()},i=>{o=!0,s=i,t&&t()}).then(()=>{if(o){r(s);return}n(s)})})}_executeHandlers(){if(this._state===Po)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Nc&&n[1](this._value),this._state===Lc&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(o,i)=>{if(this._state===Po){if(Jn(i)){i.then(r,s);return}this._state=o,this._value=i,this._executeHandlers()}},r=o=>{n(Nc,o)},s=o=>{n(Lc,o)};try{t(r,s)}catch(o){s(o)}}}function Qm(e,t,n,r=0){try{const s=pi(t,n,e,r);return Jn(s)?s:uo(s)}catch(s){return ia(s)}}function pi(e,t,n,r){const s=n[r];if(!e||!s)return e;const o=s({...e},t);return T&&o===null&&m.log(`Event processor "${s.id||"?"}" dropped event`),Jn(o)?o.then(i=>pi(i,t,n,r+1)):pi(o,t,n,r+1)}function Zm(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=t;eg(e,t),r&&rg(e,r),sg(e,n),tg(e,s),ng(e,o)}function Dn(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:l,propagationContext:p,transactionName:f,span:h}=t;jr(e,"extra",n),jr(e,"tags",r),jr(e,"user",s),jr(e,"contexts",o),e.sdkProcessingMetadata=Tr(e.sdkProcessingMetadata,a,2),i&&(e.level=i),f&&(e.transactionName=f),h&&(e.span=h),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),l.length&&(e.attachments=[...e.attachments,...l]),e.propagationContext={...e.propagationContext,...p}}function jr(e,t,n){e[t]=Tr(e[t],n,1)}function eg(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(s).length&&(e.user={...s,...e.user}),Object.keys(o).length&&(e.contexts={...o,...e.contexts}),i&&(e.level=i),a&&e.type!=="transaction"&&(e.transaction=a)}function tg(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function ng(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function rg(e,t){e.contexts={trace:dd(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:et(t),...e.sdkProcessingMetadata};const n=be(t),r=z(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function sg(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}let Jt,Pc,Dc,Ot;function Ed(e){const t=$._sentryDebugIds,n=$._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],s=n?Object.keys(n):[];if(Ot&&r.length===Pc&&s.length===Dc)return Ot;Pc=r.length,Dc=s.length,Ot={},Jt||(Jt={});const o=(i,a)=>{for(const c of i){const u=a[c],d=Jt?.[c];if(d&&Ot&&u)Ot[d[0]]=u,Jt&&(Jt[c]=[d[0],u]);else if(u){const l=e(c);for(let p=l.length-1;p>=0;p--){const h=l[p]?.filename;if(h&&Ot&&Jt){Ot[h]=u,Jt[c]=[h,u];break}}}}};return t&&o(r,t),n&&o(s,n),Ot}function og(e,t){const n=Ed(e);if(!n)return[];const r=[];for(const s of t)s&&n[s]&&r.push({type:"sourcemap",code_file:s,debug_id:n[s]});return r}function vd(e,t,n,r,s,o){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||ve(),timestamp:t.timestamp||gn()},u=n.integrations||e.integrations.map(_=>_.name);ig(c,e),ug(c,u),s&&s.emit("applyFrameMetadata",t),t.type===void 0&&ag(c,e.stackParser);const d=dg(r,n.captureContext);n.mechanism&&vt(c,n.mechanism);const l=s?s.getEventProcessors():[],p=Pn().getScopeData();if(o){const _=o.getScopeData();Dn(p,_)}if(d){const _=d.getScopeData();Dn(p,_)}const f=[...n.attachments||[],...p.attachments];f.length&&(n.attachments=f),Zm(c,p);const h=[...l,...p.eventProcessors];return Qm(h,c,n).then(_=>(_&&cg(_),typeof i=="number"&&i>0?lg(_,i,a):_))}function ig(e,t){const{environment:n,release:r,dist:s,maxValueLength:o}=t;e.environment=e.environment||n||so,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s);const i=e.request;i?.url&&(i.url=o?Mn(i.url,o):i.url)}function ag(e,t){const n=Ed(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.filename&&(s.debug_id=n[s.filename])})})}function cg(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.debug_id&&(s.abs_path?t[s.abs_path]=s.debug_id:s.filename&&(t[s.filename]=s.debug_id),delete s.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,s])=>{n.push({type:"sourcemap",code_file:r,debug_id:s})})}function ug(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function lg(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(s=>({...s,...s.data&&{data:Be(s.data,t,n)}}))},...e.user&&{user:Be(e.user,t,n)},...e.contexts&&{contexts:Be(e.contexts,t,n)},...e.extra&&{extra:Be(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Be(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(s=>({...s,...s.data&&{data:Be(s.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=Be(e.contexts.flags,3,n)),r}function dg(e,t){if(!t)return e;const n=e?e.clone():new pt;return n.update(t),n}function fg(e){if(e)return pg(e)?{captureContext:e}:mg(e)?{captureContext:e}:e}function pg(e){return e instanceof pt||typeof e=="function"}const hg=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function mg(e){return Object.keys(e).some(t=>hg.includes(t))}function Ce(e,t){return q().captureException(e,fg(t))}function hi(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return q().captureMessage(e,n,r)}function Cr(e,t){return q().captureEvent(e,t)}function gg(e,t){Te().setContext(e,t)}function XC(e){Te().setExtras(e)}function QC(e,t){Te().setExtra(e,t)}function ZC(e){Te().setTags(e)}function eR(e,t){Te().setTag(e,t)}function tR(e){Te().setUser(e)}function _g(){return Te().lastEventId()}async function nR(e){const t=x();return t?t.flush(e):(T&&m.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function rR(e){const t=x();return t?t.close(e):(T&&m.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function sR(){return!!x()}function yg(){const e=x();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function Sg(e){Te().addEventProcessor(e)}function Fc(e){const t=Te(),n=q(),{userAgent:r}=$.navigator||{},s=Dh({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),o=t.getSession();return o?.status==="ok"&&On(o,{status:"exited"}),Td(),t.setSession(s),s}function Td(){const e=Te(),n=q().getSession()||e.getSession();n&&Fh(n),wd(),e.setSession()}function wd(){const e=Te(),t=x(),n=e.getSession();n&&t&&t.captureSession(n)}function $c(e=!1){if(e){Td();return}wd()}const bg="7";function Id(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Eg(e){return`${Id(e)}${e.projectId}/envelope/`}function vg(e,t){const n={sentry_version:bg};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function kd(e,t,n){return t||`${Eg(e)}?${vg(e,n)}`}function Tg(e,t){const n=od(e);if(!n)return"";const r=`${Id(n)}embed/error-page/`;let s=`dsn=${At(n)}`;for(const o in t)if(o!=="dsn"&&o!=="onClose")if(o==="user"){const i=t.user;if(!i)continue;i.name&&(s+=`&name=${encodeURIComponent(i.name)}`),i.email&&(s+=`&email=${encodeURIComponent(i.email)}`)}else s+=`&${encodeURIComponent(o)}=${encodeURIComponent(t[o])}`;return`${r}?${s}`}const Bc=[];function wg(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function Ig(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const s=n(t);r=Array.isArray(s)?s:[s]}else r=t;return wg(r)}function kg(e,t){const n={};return t.forEach(r=>{r&&Cd(e,r,n)}),n}function Uc(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Cd(e,t,n){if(n[t.name]){T&&m.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Bc.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Bc.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,o)=>r(s,o,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((o,i)=>r(o,i,e),{id:t.name});e.addEventProcessor(s)}T&&m.log(`Integration installed: ${t.name}`)}function Hc(e){const t=x();if(!t){T&&m.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function Rd(e,t){return t?tt(t,()=>{const n=Ee(),r=n?dd(n):Xl(t);return[n?et(n):na(e,t),r]}):[void 0,void 0]}const Cg={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function Rg(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function Ag(e,t,n,r){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=At(r)),nt(s,[Rg(e)])}const xg=100;function Mg(e){switch(typeof e){case"number":return Number.isInteger(e)?{value:e,type:"integer"}:{value:e,type:"double"};case"boolean":return{value:e,type:"boolean"};case"string":return{value:e,type:"string"};default:{let t="";try{t=JSON.stringify(e)??""}catch{}return{value:t,type:"string"}}}}function ot(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function Og(e,t){const n=ca(),r=Ad(e);r===void 0?n.set(e,[t]):(n.set(e,[...r,t]),r.length>=xg&&aa(e,r))}function Ns(e,t=q(),n=Og){const r=t?.getClient()??x();if(!r){T&&m.warn("No client available to capture log.");return}const{release:s,environment:o,enableLogs:i=!1,beforeSendLog:a}=r.getOptions();if(!i){T&&m.warn("logging option not enabled, log will not be captured.");return}const[,c]=Rd(r,t),u={...e.attributes},{user:{id:d,email:l,username:p}}=Ng(t);ot(u,"user.id",d,!1),ot(u,"user.email",l,!1),ot(u,"user.name",p,!1),ot(u,"sentry.release",s),ot(u,"sentry.environment",o);const{name:f,version:h}=r.getSdkMetadata()?.sdk??{};ot(u,"sentry.sdk.name",f),ot(u,"sentry.sdk.version",h);const g=r.getIntegrationByName("Replay"),_=g?.getReplayId(!0);ot(u,"sentry.replay_id",_),_&&g?.getRecordingMode()==="buffer"&&ot(u,"sentry._internal.replay_is_buffering",!0);const y=e.message;if(no(y)){const{__sentry_template_string__:C,__sentry_template_values__:D=[]}=y;D?.length&&(u["sentry.message.template"]=C),D.forEach((I,A)=>{u[`sentry.message.parameter.${A}`]=I})}const S=Nn(t);ot(u,"sentry.trace.parent_span_id",S?.spanContext().spanId);const O={...e,attributes:u};r.emit("beforeCaptureLog",O);const v=a?jt(()=>a(O)):O;if(!v){r.recordDroppedEvent("before_send","log_item",1),T&&m.warn("beforeSendLog returned null, log will not be captured.");return}const{level:N,message:k,attributes:b={},severityNumber:w}=v,E={timestamp:he(),level:N,body:k,trace_id:c?.trace_id,severity_number:w??Cg[N],attributes:Object.keys(b).reduce((C,D)=>(C[D]=Mg(b[D]),C),{})};n(r,E),r.emit("afterCaptureLog",v)}function aa(e,t){const n=t??Ad(e)??[];if(n.length===0)return;const r=e.getOptions(),s=Ag(n,r._metadata,r.tunnel,e.getDsn());ca().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(s)}function Ad(e){return ca().get(e)}function Ng(e){const t=Pn().getScopeData();return Dn(t,Te().getScopeData()),Dn(t,e.getScopeData()),t}function ca(){return Vn("clientToLogBufferMap",()=>new WeakMap)}function Lg(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function Pg(e,t,n,r){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=At(r)),nt(s,[Lg(e)])}const Dg=1e3;function Fg(e){switch(typeof e){case"number":return Number.isInteger(e)?{value:e,type:"integer"}:{value:e,type:"double"};case"boolean":return{value:e,type:"boolean"};case"string":return{value:e,type:"string"};default:{let t="";try{t=JSON.stringify(e)??""}catch{}return{value:t,type:"string"}}}}function ht(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function $g(e,t){const n=la(),r=xd(e);r===void 0?n.set(e,[t]):(n.set(e,[...r,t]),r.length>=Dg&&ua(e,r))}function Bg(e,t){const n=t?.scope??q(),r=t?.captureSerializedMetric??$g,s=n?.getClient()??x();if(!s){T&&m.warn("No client available to capture metric.");return}const{release:o,environment:i,_experiments:a}=s.getOptions();if(!a?.enableMetrics){T&&m.warn("metrics option not enabled, metric will not be captured.");return}const[,c]=Rd(s,n),u={...e.attributes},{user:{id:d,email:l,username:p}}=Ug(n);ht(u,"user.id",d,!1),ht(u,"user.email",l,!1),ht(u,"user.name",p,!1),ht(u,"sentry.release",o),ht(u,"sentry.environment",i);const{name:f,version:h}=s.getSdkMetadata()?.sdk??{};ht(u,"sentry.sdk.name",f),ht(u,"sentry.sdk.version",h);const g=s.getIntegrationByName("Replay"),_=g?.getReplayId(!0);ht(u,"sentry.replay_id",_),_&&g?.getRecordingMode()==="buffer"&&ht(u,"sentry._internal.replay_is_buffering",!0);const y={...e,attributes:u},S=a?.beforeSendMetric?a.beforeSendMetric(y):y;if(!S){T&&m.log("`beforeSendMetric` returned `null`, will not send metric.");return}const O={};for(const w in S.attributes)S.attributes[w]!==void 0&&(O[w]=Fg(S.attributes[w]));const v=Nn(n),N=v?v.spanContext().traceId:c?.trace_id,k=v?v.spanContext().spanId:void 0,b={timestamp:he(),trace_id:N,span_id:k,name:S.name,type:S.type,unit:S.unit,value:S.value,attributes:O};T&&m.log("[Metric]",b),r(s,b),s.emit("afterCaptureMetric",y)}function ua(e,t){const n=t??xd(e)??[];if(n.length===0)return;const r=e.getOptions(),s=Pg(n,r._metadata,r.tunnel,e.getDsn());la().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(s)}function xd(e){return la().get(e)}function Ug(e){const t=Pn().getScopeData();return Dn(t,Te().getScopeData()),Dn(t,e.getScopeData()),t}function la(){return Vn("clientToMetricBufferMap",()=>new WeakMap)}function Hg(e,t,n){const r=[{type:"client_report"},{timestamp:gn(),discarded_events:e}];return nt(t?{dsn:t}:{},[r])}function Md(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function Wg(e){const{trace_id:t,parent_span_id:n,span_id:r,status:s,origin:o,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:s,timestamp:e.timestamp,trace_id:t??"",origin:o,profile_id:i?.[Xi],exclusive_time:i?.[Kn],measurements:e.measurements,is_segment:!0}}function jg(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&&{[Xi]:e.profile_id},...e.exclusive_time&&{[Kn]:e.exclusive_time}}}},measurements:e.measurements}}const Wc="Not capturing exception because it's already been captured.",jc="Discarded session because of missing or non-string release",Od=Symbol.for("SentryInternalError"),Nd=Symbol.for("SentryDoNotSendEventError"),zg=5e3;function ps(e){return{message:e,[Od]:!0}}function Do(e){return{message:e,[Nd]:!0}}function zc(e){return!!e&&typeof e=="object"&&Od in e}function qc(e){return!!e&&typeof e=="object"&&Nd in e}function Gc(e,t,n,r,s){let o=0,i;e.on(n,()=>{o=0,clearTimeout(i)}),e.on(t,a=>{o+=r(a),o>=8e5?s(e):(clearTimeout(i),i=setTimeout(()=>{s(e)},zg))}),e.on("flush",()=>{s(e)})}class qg{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=od(t.dsn):T&&m.warn("No DSN provided, client will not send events."),this._dsn){const n=kd(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}this._options.enableLogs&&Gc(this,"afterCaptureLog","flushLogs",Jg,aa),this._options._experiments?.enableMetrics&&Gc(this,"afterCaptureMetric","flushMetrics",Yg,ua)}captureException(t,n,r){const s=ve();if(yc(t))return T&&m.log(Wc),s;const o={event_id:s,...n};return this._process(this.eventFromException(t,o).then(i=>this._captureEvent(i,o,r))),o.event_id}captureMessage(t,n,r,s){const o={event_id:ve(),...r},i=no(t)?t:String(t),a=Ht(t)?this.eventFromMessage(i,n,o):this.eventFromException(t,o);return this._process(a.then(c=>this._captureEvent(c,o,s))),o.event_id}captureEvent(t,n,r){const s=ve();if(n?.originalException&&yc(n.originalException))return T&&m.log(Wc),s;const o={event_id:s,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope;return this._process(this._captureEvent(t,o,a||r,c)),o.event_id}captureSession(t){this.sendSession(t),On(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const n=this._transport;if(!n)return!0;this.emit("flush");const r=await this._isClientDoneProcessing(t),s=await n.flush(t);return r&&s}async close(t){const n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];Cd(this,t,this._integrations),n||Uc(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Pm(t,this._dsn,this._options._metadata,this._options.tunnel);for(const s of n.attachments||[])r=km(r,Mm(s));this.sendEnvelope(r).then(s=>this.emit("afterSendEvent",t,s))}sendSession(t){const{release:n,environment:r=so}=this._options;if("aggregates"in t){const o=t.attrs||{};if(!o.release&&!n){T&&m.warn(jc);return}o.release=o.release||n,o.environment=o.environment||r,t.attrs=o}else{if(!t.release&&!n){T&&m.warn(jc);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const s=Lm(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const s=`${t}:${n}`;T&&m.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,s=(...o)=>n(...o);return r.add(s),()=>{r.delete(s)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(s=>s(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return T&&m.error("Error while sending envelope:",n),{}}return T&&m.error("Transport disabled"),{}}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=kg(this,t),Uc(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",s=!1;const o=n.exception?.values;if(o){s=!0;for(const c of o)if(c.mechanism?.handled===!1){r=!0;break}}const i=t.status==="ok";(i&&t.errors===0||i&&r)&&(On(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s){const o=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i?.length&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),vd(o,t,n,r,this,s).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:Xl(r),...a.contexts};const c=na(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=q(),s=Te()){return T&&mi(t)&&m.log(`Captured error event \`${Md(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,s).then(o=>o.event_id,o=>{T&&(qc(o)?m.log(o.message):zc(o)?m.warn(o.message):m.warn(o))})}_processEvent(t,n,r,s){const o=this.getOptions(),{sampleRate:i}=o,a=Ld(t),c=mi(t),u=t.type||"error",d=`before send for type \`${u}\``,l=typeof i>"u"?void 0:un(i);if(c&&typeof l=="number"&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error"),ia(Do(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));const p=u==="replay_event"?"replay":u;return this._prepareEvent(t,n,r,s).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",p),Do("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return f;const g=Vg(this,o,f,n);return Gg(g,d)}).then(f=>{if(f===null){if(this.recordDroppedEvent("before_send",p),a){const y=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",y)}throw Do(`${d} returned \`null\`, will not send event.`)}const h=r.getSession()||s.getSession();if(c&&h&&this._updateSessionFromEvent(h,f),a){const _=f.sdkProcessingMetadata?.spanCountBeforeProcessing||0,y=f.spans?f.spans.length:0,S=_-y;S>0&&this.recordDroppedEvent("before_send","span",S)}const g=f.transaction_info;if(a&&g&&f.transaction!==t.transaction){const _="custom";f.transaction_info={...g,source:_}}return this.sendEvent(f,n),f}).then(null,f=>{throw qc(f)||zc(f)?f:(this.captureException(f,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:f}),ps(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
10
- Reason: ${f}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[s,o]=n.split(":");return{reason:s,category:o,quantity:r}})}_flushOutcomes(){T&&m.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){T&&m.log("No outcomes to send");return}if(!this._dsn){T&&m.log("No dsn provided, will not send outcomes");return}T&&m.log("Sending outcomes:",t);const n=Hg(t,this._options.tunnel&&At(this._dsn));this.sendEnvelope(n)}}function Gg(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Jn(e))return e.then(r=>{if(!ut(r)&&r!==null)throw ps(n);return r},r=>{throw ps(`${t} rejected with ${r}`)});if(!ut(e)&&e!==null)throw ps(n);return e}function Vg(e,t,n,r){const{beforeSend:s,beforeSendTransaction:o,beforeSendSpan:i,ignoreSpans:a}=t;let c=n;if(mi(c)&&s)return s(c,r);if(Ld(c)){if(i||a){const u=Wg(c);if(a?.length&&Rs(u,a))return null;if(i){const d=i(u);d?c=Tr(n,jg(d)):di()}if(c.spans){const d=[],l=c.spans;for(const f of l){if(a?.length&&Rs(f,a)){Sm(l,f);continue}if(i){const h=i(f);h?d.push(h):(di(),d.push(f))}else d.push(f)}const p=c.spans.length-d.length;p&&e.recordDroppedEvent("before_send","span",p),c.spans=d}}if(o){if(c.spans){const u=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return o(c,r)}}return c}function mi(e){return e.type===void 0}function Ld(e){return e.type==="transaction"}function Yg(e){let t=0;return e.name&&(t+=e.name.length*2),typeof e.value=="string"?t+=e.value.length*2:t+=8,t+Pd(e.attributes)}function Jg(e){let t=0;return e.message&&(t+=e.message.length*2),t+Pd(e.attributes)}function Pd(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*Vc(n[0]):Ht(n)?t+=Vc(n):t+=100}),t}function Vc(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function Kg(e,t){t.debug===!0&&(T?m.enable():jt(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),q().update(t.initialScope);const r=new e(t);return Xg(r),r.init(),r}function Xg(e){q().setClient(e)}const Dd=Symbol.for("SentryBufferFullError");function Fd(e=100){const t=new Set;function n(){return t.size<e}function r(i){t.delete(i)}function s(i){if(!n())return ia(Dd);const a=i();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function o(i){if(!t.size)return uo(!0);const a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return a;const c=[a,new Promise(u=>setTimeout(()=>u(!1),i))];return Promise.race(c)}return{get $(){return Array.from(t)},add:s,drain:o}}const Qg=60*1e3;function $d(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Qg:r-t}function Zg(e,t){return e[t]||e.all||0}function Bd(e,t,n=Date.now()){return Zg(e,t)>n}function Ud(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},o=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(o)for(const a of o.trim().split(",")){const[c,u,,,d]=a.split(":",5),l=parseInt(c,10),p=(isNaN(l)?60:l)*1e3;if(!u)s.all=r+p;else for(const f of u.split(";"))f==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(s[f]=r+p):s[f]=r+p}else i?s.all=r+$d(i,r):t===429&&(s.all=r+60*1e3);return s}const e_=64;function t_(e,t,n=Fd(e.bufferSize||e_)){let r={};const s=i=>n.drain(i);function o(i){const a=[];if(ln(i,(l,p)=>{const f=Cc(p);Bd(r,f)?e.recordDroppedEvent("ratelimit_backoff",f):a.push(l)}),a.length===0)return Promise.resolve({});const c=nt(i[0],a),u=l=>{ln(c,(p,f)=>{e.recordDroppedEvent(l,Cc(f))})},d=()=>t({body:xs(c)}).then(l=>(l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&T&&m.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=Ud(r,l),l),l=>{throw u("network_error"),T&&m.error("Encountered error running transport request:",l),l});return n.add(d).then(l=>l,l=>{if(l===Dd)return T&&m.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw l})}return{send:o,flush:s}}const Fo=100,$o=5e3,n_=36e5;function r_(e){function t(...n){T&&m.log("[Offline]:",...n)}return n=>{const r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");const s=n.createStore(n);let o=$o,i;function a(l,p,f){return kc(l,["client_report"])?!1:n.shouldStore?n.shouldStore(l,p,f):!0}function c(l){i&&clearTimeout(i),i=setTimeout(async()=>{i=void 0;const p=await s.shift();p&&(t("Attempting to send previously queued event"),p[0].sent_at=new Date().toISOString(),d(p,!0).catch(f=>{t("Failed to retry sending",f)}))},l),typeof i!="number"&&i.unref&&i.unref()}function u(){i||(c(o),o=Math.min(o*2,n_))}async function d(l,p=!1){if(!p&&kc(l,["replay_event","replay_recording"]))return await s.push(l),c(Fo),{};try{if(n.shouldSend&&await n.shouldSend(l)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");const f=await r.send(l);let h=Fo;if(f){if(f.headers?.["retry-after"])h=$d(f.headers["retry-after"]);else if(f.headers?.["x-sentry-rate-limits"])h=6e4;else if((f.statusCode||0)>=400)return f}return c(h),o=$o,f}catch(f){if(await a(l,f,o))return p?await s.unshift(l):await s.push(l),u(),t("Error sending. Event queued.",f),{};throw f}}return n.flushAtStartup&&u(),{send:d,flush:l=>(l===void 0&&(o=$o,c(Fo)),r.flush(l))}}}function Hd(e,t){let n;return ln(e,(r,s)=>(t.includes(s)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function s_(e,t){return n=>{const r=e(n);return{...r,send:async s=>{const o=Hd(s,["event","transaction","profile","replay_event"]);return o&&(o.release=t),r.send(s)}}}}function o_(e,t){return nt(t?{...e[0],dsn:t}:e[0],e[1])}function oR(e,t){return n=>{const r=e(n),s=new Map;function o(c,u){const d=u?`${c}:${u}`:c;let l=s.get(d);if(!l){const p=nd(c);if(!p)return;const f=kd(p,n.tunnel);l=u?s_(e,u)({...n,url:f}):e({...n,url:f}),s.set(d,l)}return[c,l]}async function i(c){function u(f){const h=f?.length?f:["event"];return Hd(c,h)}const d=t({envelope:c,getEvent:u}).map(f=>typeof f=="string"?o(f,void 0):o(f.dsn,f.release)).filter(f=>!!f),l=d.length?d:[["",r]];return(await Promise.all(l.map(([f,h])=>h.send(o_(c,f)))))[0]}async function a(c){const u=[...s.values(),r];return(await Promise.all(u.map(l=>l.flush(c)))).every(l=>l)}return{send:i,flush:a}}}const i_="thismessage:/";function da(e){return"isRelative"in e}function fa(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?i_:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const s=new URL(e,r);return n?{isRelative:n,pathname:s.pathname,search:s.search,hash:s.hash}:s}catch{}}function a_(e){if(da(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function on(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Wd(e){return e.split(/[?#]/,1)[0]}function jd(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return u_(e,n)||c_(e,r)}function c_(e,t){return t?Yc(e)===Yc(t):!1}function u_(e,t){const n=fa(e);return!n||da(n)?!1:t?n.host.includes(t.host)&&/(^|&|\?)sentry_key=/.test(n.search):!1}function Yc(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function l_(e,...t){const 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}const d_=l_;function f_(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 p_(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:Ft})),version:Ft}),e._metadata=s}function zd(e={}){const t=e.client||x();if(!yg()||!t)return{};const n=Rt(),r=Gt(n);if(r.getTraceData)return r.getTraceData(e);const s=e.scope||q(),o=e.span||Ee(),i=o?pm(o):h_(s),a=o?et(o):na(t,s),c=td(a);if(!id.test(i))return m.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const d={"sentry-trace":i,baggage:c};if(e.propagateTraceparent){const l=o?hm(o):m_(s);l&&(d.traceparent=l)}return d}function h_(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return cd(t,r,n)}function m_(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return ud(t,r,n)}function g_(e,t,n){let r,s,o;const i=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function c(){return u(),r=e(),r}function u(){s!==void 0&&clearTimeout(s),o!==void 0&&clearTimeout(o),s=o=void 0}function d(){return s!==void 0||o!==void 0?c():r}function l(){return s&&clearTimeout(s),s=a(c,t),i&&o===void 0&&(o=a(c,i)),r}return l.cancel=u,l.flush=d,l}const __=100;function It(e,t){const n=x(),r=Te();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=__}=n.getOptions();if(o<=0)return;const a={timestamp:gn(),...e},c=s?jt(()=>s(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,o))}let Jc;const y_="FunctionToString",Kc=new WeakMap,S_=(()=>({name:y_,setupOnce(){Jc=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Ji(this),n=Kc.has(x())&&t!==void 0?t:this;return Jc.apply(n,e)}}catch{}},setup(e){Kc.set(e,!0)}})),b_=S_,E_=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],v_="EventFilters",T_=(e={})=>{let t;return{name:v_,setup(n){const r=n.getOptions();t=Xc(e,r)},processEvent(n,r,s){if(!t){const o=s.getOptions();t=Xc(e,o)}return I_(n,t)?null:n}}},w_=((e={})=>({...T_(e),name:"InboundFilters"}));function Xc(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:E_],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function I_(e,t){if(e.type){if(e.type==="transaction"&&C_(e,t.ignoreTransactions))return T&&m.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
11
- Event: ${Xt(e)}`),!0}else{if(k_(e,t.ignoreErrors))return T&&m.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
12
- Event: ${Xt(e)}`),!0;if(M_(e))return T&&m.warn(`Event dropped due to not having an error message, error type or stacktrace.
13
- Event: ${Xt(e)}`),!0;if(R_(e,t.denyUrls))return T&&m.warn(`Event dropped due to being matched by \`denyUrls\` option.
14
- Event: ${Xt(e)}.
15
- Url: ${Ls(e)}`),!0;if(!A_(e,t.allowUrls))return T&&m.warn(`Event dropped due to not being matched by \`allowUrls\` option.
16
- Event: ${Xt(e)}.
17
- Url: ${Ls(e)}`),!0}return!1}function k_(e,t){return t?.length?Md(e).some(n=>Qe(n,t)):!1}function C_(e,t){if(!t?.length)return!1;const n=e.transaction;return n?Qe(n,t):!1}function R_(e,t){if(!t?.length)return!1;const n=Ls(e);return n?Qe(n,t):!1}function A_(e,t){if(!t?.length)return!0;const n=Ls(e);return n?Qe(n,t):!0}function x_(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Ls(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?x_(n):null}catch{return T&&m.error(`Cannot extract url for event ${Xt(e)}`),null}}function M_(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function O_(e,t,n,r,s,o){if(!s.exception?.values||!o||!Et(o.originalException,Error))return;const i=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;i&&(s.exception.values=gi(e,t,r,o.originalException,n,s.exception.values,i,0))}function gi(e,t,n,r,s,o,i,a){if(o.length>=n+1)return o;let c=[...o];if(Et(r[s],Error)){Qc(i,a);const u=e(t,r[s]),d=c.length;Zc(u,s,d,a),c=gi(e,t,n,r[s],s,[u,...c],u,d)}return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if(Et(u,Error)){Qc(i,a);const l=e(t,u),p=c.length;Zc(l,`errors[${d}]`,p,a),c=gi(e,t,n,u,s,[l,...c],l,p)}}),c}function Qc(e,t){e.mechanism={handled:!0,type:"auto.core.linked_errors",...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Zc(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}const qd=new Map,eu=new Set;function N_(e){if($._sentryModuleMetadata)for(const t of Object.keys($._sentryModuleMetadata)){const n=$._sentryModuleMetadata[t];if(eu.has(t))continue;eu.add(t);const r=e(t);for(const s of r.reverse())if(s.filename){qd.set(s.filename,n);break}}}function L_(e,t){return N_(e),qd.get(t)}function Gd(e,t){t.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(r=>{if(!r.filename||r.module_metadata)return;const s=L_(e,r.filename);s&&(r.module_metadata=s)})})}function Vd(e){e.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(n=>{delete n.module_metadata})})}const iR=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{ln(t,(n,r)=>{if(r==="event"){const s=Array.isArray(n)?n[1]:void 0;s&&(Vd(s),n[1]=s)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;const n=e.getOptions().stackParser;Gd(n,t)})}});function pa(e){const t="console";zt(t,e),qt(t,P_)}function P_(){"console"in $&&qi.forEach(function(e){e in $.console&&ke($.console,e,function(t){return ws[e]=t,function(...n){qe("console",{args:n,level:e}),ws[e]?.apply($.console,n)}})})}function ha(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const D_="CaptureConsole",F_=((e={})=>{const t=e.levels||qi,n=e.handled??!0;return{name:D_,setup(r){"console"in $&&pa(({args:s,level:o})=>{x()!==r||!t.includes(o)||$_(s,o,n)})}}}),aR=F_;function $_(e,t,n){const r={level:ha(t),extra:{arguments:e}};tt(s=>{if(s.addEventProcessor(a=>(a.logger="console",vt(a,{handled:n,type:"auto.core.capture_console"}),a)),t==="assert"){if(!e[0]){const a=`Assertion failed: ${Is(e.slice(1)," ")||"console.assert"}`;s.setExtra("arguments",e.slice(1)),hi(a,r)}return}const o=e.find(a=>a instanceof Error);if(o){Ce(o,r);return}const i=Is(e," ");hi(i,r)})}const B_="Dedupe",U_=(()=>{let e;return{name:B_,processEvent(t){if(t.type)return t;try{if(W_(t,e))return T&&m.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),H_=U_;function W_(e,t){return t?!!(j_(e,t)||z_(e,t)):!1}function j_(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Jd(e,t)||!Yd(e,t))}function z_(e,t){const n=tu(t),r=tu(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Jd(e,t)||!Yd(e,t))}function Yd(e,t){let n=ii(e),r=ii(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const o=r[s],i=n[s];if(o.filename!==i.filename||o.lineno!==i.lineno||o.colno!==i.colno||o.function!==i.function)return!1}return!0}function Jd(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 tu(e){return e.exception?.values?.[0]}const q_="ExtraErrorData",G_=((e={})=>{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:q_,processEvent(r,s,o){const{maxValueLength:i}=o.getOptions();return V_(r,s,t,n,i)}}}),cR=G_;function V_(e,t={},n,r,s){if(!t.originalException||!$t(t.originalException))return e;const o=t.originalException.name||t.originalException.constructor.name,i=Kd(t.originalException,r,s);if(i){const a={...e.contexts},c=Be(i,n);return ut(c)&&(Fe(c,"__sentry_skip_normalization__",!0),a[o]=c),{...e,contexts:a}}return e}function Kd(e,t,n){try{const r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],s={};for(const o of Object.keys(e)){if(r.indexOf(o)!==-1)continue;const i=e[o];s[o]=$t(i)||typeof i=="string"?n?Mn(`${i}`,n):`${i}`:i}if(t&&e.cause!==void 0)if($t(e.cause)){const o=e.cause.name||e.cause.constructor.name;s.cause={[o]:Kd(e.cause,!1,n)}}else s.cause=e.cause;if(typeof e.toJSON=="function"){const o=e.toJSON();for(const i of Object.keys(o)){const a=o[i];s[i]=$t(a)?a.toString():a}}return s}catch(r){T&&m.error("Unable to extract extra data from the Error object:",r)}return null}function Y_(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const s=e[r];s==="."?e.splice(r,1):s===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}const J_=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function K_(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=J_.exec(t);return n?n.slice(1):[]}function nu(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const s=r>=0?e[r]:"/";s&&(t=`${s}/${t}`,n=s.charAt(0)==="/")}return t=Y_(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function ru(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 X_(e,t){e=nu(e).slice(1),t=nu(t).slice(1);const n=ru(e.split("/")),r=ru(t.split("/")),s=Math.min(n.length,r.length);let o=s;for(let a=0;a<s;a++)if(n[a]!==r[a]){o=a;break}let i=[];for(let a=o;a<n.length;a++)i.push("..");return i=i.concat(r.slice(o)),i.join("/")}function Q_(e,t){return K_(e)[2]||""}const Z_="RewriteFrames",uR=(e={})=>{const t=e.root,n=e.prefix||"app:///",r="window"in $&&!!$.window,s=e.iteratee||ey({isBrowser:r,root:t,prefix:n});function o(a){try{return{...a,exception:{...a.exception,values:a.exception.values.map(c=>({...c,...c.stacktrace&&{stacktrace:i(c.stacktrace)}}))}}}catch{return a}}function i(a){return{...a,frames:a?.frames?.map(c=>s(c))}}return{name:Z_,processEvent(a){let c=a;return a.exception&&Array.isArray(a.exception.values)&&(c=o(c)),c}}};function ey({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;const s=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),o=/^\//.test(r.filename);if(e){if(t){const i=r.filename;i.indexOf(t)===0&&(r.filename=i.replace(t,n))}}else if(s||o){const i=s?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,a=t?X_(t,i):Q_(i);r.filename=`${n}${a}`}return r}}const ty=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],ny=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],ry={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"},Xd=["select","insert","upsert","update","delete"];function lo(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function fo(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function sy(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 oy(e,t){if(t===""||t==="*")return"select(*)";if(e==="select")return`select(${t})`;if(e==="or"||e.endsWith(".or"))return`${e}${t}`;const[n,...r]=t.split(".");let s;return n?.startsWith("fts")?s="textSearch":n?.startsWith("plfts")?s="textSearch[plain]":n?.startsWith("phfts")?s="textSearch[phrase]":n?.startsWith("wfts")?s="textSearch[websearch]":s=n&&ry[n]||"filter",`${s}(${e}, ${r.join(".")})`}function su(e,t=!1){return new Proxy(e,{apply(n,r,s){return Xn({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[de]:"auto.db.supabase",[Ve]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},o=>Reflect.apply(n,r,s).then(i=>(i&&typeof i=="object"&&"error"in i&&i.error?(o.setStatus({code:ne}),Ce(i.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):o.setStatus({code:Qi}),o.end(),i)).catch(i=>{throw o.setStatus({code:ne}),o.end(),Ce(i,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),i}).then(...s))}})}function iy(e){const t=e.auth;if(!(!t||fo(e.auth))){for(const n of ty){const r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=su(r))}for(const n of ny){const r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=su(r,!0))}lo(e.auth)}}function ay(e){fo(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(t,n,r){const s=Reflect.apply(t,n,r),o=s.constructor;return uy(o),s}}),lo(e.prototype.from))}function cy(e){fo(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(t,n,r){const s=Xd,o=n,i=sy(o.method,o.headers);if(!s.includes(i)||!o?.url?.pathname||typeof o.url.pathname!="string")return Reflect.apply(t,n,r);const a=o.url.pathname.split("/"),c=a.length>0?a[a.length-1]:"",u=[];for(const[f,h]of o.url.searchParams.entries())u.push(oy(f,h));const d=Object.create(null);if(ut(o.body))for(const[f,h]of Object.entries(o.body))d[f]=h;const l=`${i==="select"?"":`${i}${d?"(...) ":""}`}${u.join(" ")} from(${c})`,p={"db.table":c,"db.schema":o.schema,"db.url":o.url.origin,"db.sdk":o.headers["X-Client-Info"],"db.system":"postgresql","db.operation":i,[de]:"auto.db.supabase",[Ve]:"db"};return u.length&&(p["db.query"]=u),Object.keys(d).length&&(p["db.body"]=d),Xn({name:l,attributes:p},f=>Reflect.apply(t,n,[]).then(h=>{if(f&&(h&&typeof h=="object"&&"status"in h&&ks(f,h.status||500),f.end()),h.error){const y=new Error(h.error.message);h.error.code&&(y.code=h.error.code),h.error.details&&(y.details=h.error.details);const S={};u.length&&(S.query=u),Object.keys(d).length&&(S.body=d),Ce(y,O=>(O.addEventProcessor(v=>(vt(v,{handled:!1,type:"auto.db.supabase.postgres"}),v)),O.setContext("supabase",S),O))}const g={type:"supabase",category:`db.${i}`,message:l},_={};return u.length&&(_.query=u),Object.keys(d).length&&(_.body=d),Object.keys(_).length&&(g.data=_),It(g),h},h=>{throw f&&(ks(f,500),f.end()),h}).then(...r))}}),lo(e.prototype.then))}function uy(e){for(const t of Xd)fo(e.prototype[t])||(e.prototype[t]=new Proxy(e.prototype[t],{apply(n,r,s){const o=Reflect.apply(n,r,s),i=o.constructor;return T&&m.log(`Instrumenting ${t} operation's PostgRESTFilterBuilder`),cy(i),o}}),lo(e.prototype[t]))}const ly=e=>{if(!e){T&&m.warn("Supabase integration was not installed because no Supabase client was provided.");return}const t=e.constructor===Function?e:e.constructor;ay(t),iy(e)},dy="Supabase",fy=(e=>({setupOnce(){ly(e)},name:dy})),lR=e=>fy(e.supabaseClient),py=10,hy="ZodErrors";function my(e){return $t(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function gy(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 _y(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function yy(e){const t=new Set;for(const r of e.issues){const s=_y(r.path);s.length>0&&t.add(s)}const n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){const s=e.issues[0];s!==void 0&&"expected"in s&&typeof s.expected=="string"&&(r=s.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${Mn(n.join(", "),100)}`}function Sy(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!my(r.originalException)||r.originalException.issues.length===0)return n;try{const o=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(gy);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:o})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:yy(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":o.slice(0,e)}}}catch(s){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:s instanceof Error?`${s.name}: ${s.message}
18
- ${s.stack}`:"unknown"}}}}}const by=((e={})=>{const t=e.limit??py;return{name:hy,processEvent(n,r){return Sy(t,e.saveZodIssuesAsAttachment,n,r)}}}),dR=by,fR=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{ln(n,(r,s)=>{if(s==="event"){const o=Array.isArray(r)?r[1]:void 0;o&&(Vd(o),r[1]=o)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;const r=t.getOptions().stackParser;Gd(r,n)})},processEvent(t){const n=Ey(t);if(n){const r=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(n[r](o=>!o.some(i=>e.filterKeys.includes(i)))){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 Ey(e){const t=ii(e);if(t)return t.filter(n=>!!n.filename&&(n.lineno??n.colno)!=null).map(n=>n.module_metadata?Object.keys(n.module_metadata).filter(r=>r.startsWith(ou)).map(r=>r.slice(ou.length)):[])}const ou="_sentryBundlerPluginAppKey:",vy=100,Ty=10,zr="flag.evaluation.";function Zn(e){const n=q().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function dn(e,t,n=vy){const r=q().getScopeData().contexts;r.flags||(r.flags={values:[]});const s=r.flags.values;wy(s,e,t,n)}function wy(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){T&&m.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}const s=e.findIndex(o=>o.flag===t);s!==-1&&e.splice(s,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function fn(e,t,n=Ty){if(typeof t!="boolean")return;const r=Ee();if(!r)return;const s=z(r).data;if(`${zr}${e}`in s){r.setAttribute(`${zr}${e}`,t);return}Object.keys(s).filter(i=>i.startsWith(zr)).length<n&&r.setAttribute(`${zr}${e}`,t)}const pR=()=>({name:"FeatureFlags",processEvent(e,t,n){return Zn(e)},addFeatureFlag(e,t){dn(e,t),fn(e,t)}}),Iy=({growthbookClass:e})=>({name:"GrowthBook",setupOnce(){const t=e.prototype;typeof t.isOn=="function"&&ke(t,"isOn",iu),typeof t.getFeatureValue=="function"&&ke(t,"getFeatureValue",iu)},processEvent(t,n,r){return Zn(t)}});function iu(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"&&(dn(n,r),fn(n,r)),r}}function ky(e,t,n,r,s){if(!e.fetchData)return;const{method:o,url:i}=e.fetchData,a=Ge()&&t(i);if(e.endTimestamp&&a){const f=e.fetchData.__span;if(!f)return;const h=r[f];h&&(Ay(h,e),Cy(h,e,s),delete r[f]);return}const{spanOrigin:c="auto.http.browser",propagateTraceparent:u=!1}=typeof s=="object"?s:{spanOrigin:s},d=!!Ee(),l=a&&d?Qn(My(i,o,c)):new wt;if(e.fetchData.__span=l.spanContext().spanId,r[l.spanContext().spanId]=l,n(e.fetchData.url)){const f=e.args[0],h=e.args[1]||{},g=Ry(f,h,Ge()&&d?l:void 0,u);g&&(e.args[1]=h,h.headers=g)}const p=x();if(p){const f={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};p.emit("beforeOutgoingRequestSpan",l,f)}return l}function Cy(e,t,n){(typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function Ry(e,t,n,r){const s=zd({span:n,propagateTraceparent:r}),o=s["sentry-trace"],i=s.baggage,a=s.traceparent;if(!o)return;const c=t.headers||(ql(e)?e.headers:void 0);if(c)if(xy(c)){const u=new Headers(c);if(u.get("sentry-trace")||u.set("sentry-trace",o),r&&a&&!u.get("traceparent")&&u.set("traceparent",a),i){const d=u.get("baggage");d?qr(d)||u.set("baggage",`${d},${i}`):u.set("baggage",i)}return u}else if(Array.isArray(c)){const u=[...c];c.find(l=>l[0]==="sentry-trace")||u.push(["sentry-trace",o]),r&&a&&!c.find(l=>l[0]==="traceparent")&&u.push(["traceparent",a]);const d=c.find(l=>l[0]==="baggage"&&qr(l[1]));return i&&!d&&u.push(["baggage",i]),u}else{const u="sentry-trace"in c?c["sentry-trace"]:void 0,d="traceparent"in c?c.traceparent:void 0,l="baggage"in c?c.baggage:void 0,p=l?Array.isArray(l)?[...l]:[l]:[],f=l&&(Array.isArray(l)?l.find(g=>qr(g)):qr(l));i&&!f&&p.push(i);const h={...c,"sentry-trace":u??o,baggage:p.length>0?p.join(","):void 0};return r&&a&&!d&&(h.traceparent=a),h}else return{...s}}function Ay(e,t){if(t.response){ks(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:ne,message:"internal_error"});e.end()}function qr(e){return e.split(",").some(t=>t.trim().startsWith(Zi))}function xy(e){return typeof Headers<"u"&&Et(e,Headers)}function My(e,t,n){const r=fa(e);return{name:r?`${t} ${a_(r)}`:t,attributes:Oy(e,r,t,n)}}function Oy(e,t,n,r){const s={url:e,type:"fetch","http.method":n,[de]:r,[Ve]:"http.client"};return t&&(da(t)||(s["http.url"]=t.href,s["server.address"]=t.host),t.search&&(s["http.query"]=t.search),t.hash&&(s["http.fragment"]=t.hash)),s}function Ny(e,t={},n=q()){const{message:r,name:s,email:o,url:i,source:a,associatedEventId:c,tags:u}=e,d={contexts:{feedback:{contact_email:o,name:s,message:r,url:i,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:u},l=n?.getClient()||x();return l&&l.emit("beforeSendFeedback",d,t),n.captureEvent(d,t)}function er(e,t,n,r,s){Ns({level:e,message:t,attributes:n,severityNumber:s},r)}function Ly(e,t,{scope:n}={}){er("trace",e,t,n)}function Py(e,t,{scope:n}={}){er("debug",e,t,n)}function Dy(e,t,{scope:n}={}){er("info",e,t,n)}function Fy(e,t,{scope:n}={}){er("warn",e,t,n)}function $y(e,t,{scope:n}={}){er("error",e,t,n)}function By(e,t,{scope:n}={}){er("fatal",e,t,n)}const hR=Object.freeze(Object.defineProperty({__proto__:null,debug:Py,error:$y,fatal:By,fmt:d_,info:Dy,trace:Ly,warn:Fy},Symbol.toStringTag,{value:"Module"}));function _i(e,t,n){return"util"in $&&typeof $.util.format=="function"?$.util.format(...e):Uy(e,t,n)}function Uy(e,t,n){return e.map(r=>Ht(r)?String(r):JSON.stringify(Be(r,t,n))).join(" ")}function Hy(e){return/%[sdifocO]/.test(e)}function Wy(e,t){const n={},r=new Array(t.length).fill("{}").join(" ");return n["sentry.message.template"]=`${e} ${r}`,t.forEach((s,o)=>{n[`sentry.message.parameter.${o}`]=s}),n}const jy="ConsoleLogs",au={[de]:"auto.log.console"},zy=((e={})=>{const t=e.levels||qi;return{name:jy,setup(n){const{enableLogs:r,normalizeDepth:s=3,normalizeMaxBreadth:o=1e3}=n.getOptions();if(!r){T&&m.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}pa(({args:i,level:a})=>{if(x()!==n||!t.includes(a))return;const c=i[0],u=i.slice(1);if(a==="assert"){if(!c){const f=u.length>0?`Assertion failed: ${_i(u,s,o)}`:"Assertion failed";Ns({level:"error",message:f,attributes:au})}return}const d=a==="log",l=i.length>1&&typeof i[0]=="string"&&!Hy(i[0]),p={...au,...l?Wy(c,u):{}};Ns({level:d?"info":a,message:_i(i,s,o),severityNumber:d?10:void 0,attributes:p})})}}}),mR=zy;function ma(e,t,n,r){Bg({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function qy(e,t=1,n){ma("counter",e,t,n)}function Gy(e,t,n){ma("gauge",e,t,n)}function Vy(e,t,n){ma("distribution",e,t,n)}const gR=Object.freeze(Object.defineProperty({__proto__:null,count:qy,distribution:Vy,gauge:Gy},Symbol.toStringTag,{value:"Module"})),Yy=["trace","debug","info","warn","error","fatal"];function _R(e={}){const t=new Set(e.levels??Yy),n=e.client;return{log(r){const{type:s,level:o,message:i,args:a,tag:c,date:u,...d}=r,l=n||x();if(!l)return;const p=Xy(s,o);if(!t.has(p))return;const{normalizeDepth:f=3,normalizeMaxBreadth:h=1e3}=l.getOptions(),g=[];i&&g.push(i),a&&a.length>0&&g.push(_i(a,f,h));const _=g.join(" ");d["sentry.origin"]="auto.log.consola",c&&(d["consola.tag"]=c),s&&(d["consola.type"]=s),o!=null&&typeof o=="number"&&(d["consola.level"]=o),Ns({level:p,message:_,attributes:d})}}}const Jy={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"},Ky={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};function Xy(e,t){if(e==="verbose")return"debug";if(e==="silent")return"trace";if(e){const n=Jy[e];if(n)return n}if(typeof t=="number"){const n=Ky[t];if(n)return n}return"info"}const Qy="gen_ai.prompt",ga="gen_ai.system",Ze="gen_ai.request.model",Qd="gen_ai.request.stream",_a="gen_ai.request.temperature",Zd="gen_ai.request.max_tokens",ya="gen_ai.request.frequency_penalty",ef="gen_ai.request.presence_penalty",Sa="gen_ai.request.top_p",tf="gen_ai.request.top_k",tr="gen_ai.response.finish_reasons",Rr="gen_ai.response.model",Ar="gen_ai.response.id",po="gen_ai.usage.input_tokens",ho="gen_ai.usage.output_tokens",mo="gen_ai.usage.total_tokens",ba="gen_ai.operation.name",an="gen_ai.request.messages",lt="gen_ai.response.text",Ea="gen_ai.request.available_tools",go="gen_ai.response.streaming",Yt="gen_ai.response.tool_calls",Zy="openai.response.id",eS="openai.response.model",tS="openai.response.timestamp",nS="openai.usage.completion_tokens",rS="openai.usage.prompt_tokens",cu={CHAT:"chat",RESPONSES:"responses"},uu="anthropic.response.timestamp",sS=2e4,Ps=e=>new TextEncoder().encode(e).length,Ds=e=>Ps(JSON.stringify(e));function nf(e,t){if(Ps(e)<=t)return e;let n=0,r=e.length,s="";for(;n<=r;){const o=Math.floor((n+r)/2),i=e.slice(0,o);Ps(i)<=t?(s=i,n=o+1):r=o-1}return s}function oS(e){return typeof e=="string"?e:e.text}function lu(e,t){return typeof e=="string"?t:{...e,text:t}}function iS(e){return e!==null&&typeof e=="object"&&"content"in e&&typeof e.content=="string"}function aS(e){return e!==null&&typeof e=="object"&&"parts"in e&&Array.isArray(e.parts)&&e.parts.length>0}function cS(e,t){const n={...e,content:""},r=Ds(n),s=t-r;if(s<=0)return[];const o=nf(e.content,s);return[{...e,content:o}]}function uS(e,t){const{parts:n}=e,r=n.map(a=>lu(a,"")),s=Ds({...e,parts:r});let o=t-s;if(o<=0)return[];const i=[];for(const a of n){const c=oS(a),u=Ps(c);if(u<=o)i.push(a),o-=u;else if(i.length===0){const d=nf(c,o);d&&i.push(lu(a,d));break}else break}return i.length>0?[{...e,parts:i}]:[]}function lS(e,t){return!e||typeof e!="object"?[]:iS(e)?cS(e,t):aS(e)?uS(e,t):[]}function dS(e,t){if(!Array.isArray(e)||e.length===0||Ds(e)<=t)return e;const r=e.map(Ds);let s=0,o=e.length;for(let i=e.length-1;i>=0;i--){const a=r[i];if(a&&s+a>t)break;a&&(s+=a),o=i}if(o===e.length){const i=e[e.length-1];return lS(i,t)}return e.slice(o)}function fS(e){return dS(e,sS)}function xr(e){return e.includes("messages")?"messages":e.includes("completions")?"completions":e.includes("models")?"models":e.includes("chat")?"chat":e.split(".").pop()||"unknown"}function Fs(e){return`gen_ai.${xr(e)}`}function rf(e,t){return e?`${e}.${t}`:t}function va(e,t,n,r,s){if(t!==void 0&&e.setAttributes({[po]:t}),n!==void 0&&e.setAttributes({[ho]:n}),t!==void 0||n!==void 0||r!==void 0||s!==void 0){const o=(t??0)+(n??0)+(r??0)+(s??0);e.setAttributes({[mo]:o})}}function cn(e){if(typeof e=="string")return e;if(Array.isArray(e)){const t=fS(e);return JSON.stringify(t)}return JSON.stringify(e)}const pS="OpenAI",hS=["responses.create","chat.completions.create"],mS=["response.output_item.added","response.function_call_arguments.delta","response.function_call_arguments.done","response.output_item.done"],gS=["response.created","response.in_progress","response.failed","response.completed","response.incomplete","response.queued","response.output_text.delta",...mS];function Ta(e){return e.includes("chat.completions")?cu.CHAT:e.includes("responses")?cu.RESPONSES:e.split(".").pop()||"unknown"}function du(e){return`gen_ai.${Ta(e)}`}function _S(e){return hS.includes(e)}function yS(e,t){return e?`${e}.${t}`:t}function SS(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion"}function bS(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="response"}function ES(e){return e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.startsWith("response.")}function vS(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion.chunk"}function wa(e,t,n,r){t!==void 0&&e.setAttributes({[rS]:t,[po]:t}),n!==void 0&&e.setAttributes({[nS]:n,[ho]:n}),r!==void 0&&e.setAttributes({[mo]:r})}function Ia(e,t,n,r){e.setAttributes({[Zy]:t,[Ar]:t}),e.setAttributes({[eS]:n,[Rr]:n}),e.setAttributes({[tS]:new Date(r*1e3).toISOString()})}function TS(e,t){for(const n of e){const r=n.index;if(!(r===void 0||!n.function))if(!(r in t.chatCompletionToolCalls))t.chatCompletionToolCalls[r]={...n,function:{name:n.function.name,arguments:n.function.arguments||""}};else{const s=t.chatCompletionToolCalls[r];n.function.arguments&&s?.function&&(s.function.arguments+=n.function.arguments)}}}function wS(e,t,n){t.responseId=e.id??t.responseId,t.responseModel=e.model??t.responseModel,t.responseTimestamp=e.created??t.responseTimestamp,e.usage&&(t.promptTokens=e.usage.prompt_tokens,t.completionTokens=e.usage.completion_tokens,t.totalTokens=e.usage.total_tokens);for(const r of e.choices??[])n&&(r.delta?.content&&t.responseTexts.push(r.delta.content),r.delta?.tool_calls&&TS(r.delta.tool_calls,t)),r.finish_reason&&t.finishReasons.push(r.finish_reason)}function IS(e,t,n,r){if(!(e&&typeof e=="object")){t.eventTypes.push("unknown:non-object");return}if(e instanceof Error){r.setStatus({code:ne,message:"internal_error"}),Ce(e,{mechanism:{handled:!1,type:"auto.ai.openai.stream-response"}});return}if(!("type"in e))return;const s=e;if(!gS.includes(s.type)){t.eventTypes.push(s.type);return}if(n&&(s.type==="response.output_item.done"&&"item"in s&&t.responsesApiToolCalls.push(s.item),s.type==="response.output_text.delta"&&"delta"in s&&s.delta)){t.responseTexts.push(s.delta);return}if("response"in s){const{response:o}=s;t.responseId=o.id??t.responseId,t.responseModel=o.model??t.responseModel,t.responseTimestamp=o.created_at??t.responseTimestamp,o.usage&&(t.promptTokens=o.usage.input_tokens,t.completionTokens=o.usage.output_tokens,t.totalTokens=o.usage.total_tokens),o.status&&t.finishReasons.push(o.status),n&&o.output_text&&t.responseTexts.push(o.output_text)}}async function*kS(e,t,n){const r={eventTypes:[],responseTexts:[],finishReasons:[],responseId:"",responseModel:"",responseTimestamp:0,promptTokens:void 0,completionTokens:void 0,totalTokens:void 0,chatCompletionToolCalls:{},responsesApiToolCalls:[]};try{for await(const s of e)vS(s)?wS(s,r,n):ES(s)&&IS(s,r,n,t),yield s}finally{Ia(t,r.responseId,r.responseModel,r.responseTimestamp),wa(t,r.promptTokens,r.completionTokens,r.totalTokens),t.setAttributes({[go]:!0}),r.finishReasons.length&&t.setAttributes({[tr]:JSON.stringify(r.finishReasons)}),n&&r.responseTexts.length&&t.setAttributes({[lt]:r.responseTexts.join("")});const o=[...Object.values(r.chatCompletionToolCalls),...r.responsesApiToolCalls];o.length>0&&t.setAttributes({[Yt]:JSON.stringify(o)}),t.end()}}function CS(e,t){const n={[ga]:"openai",[ba]:Ta(t),[de]:"auto.ai.openai"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=e[0],s=Array.isArray(r.tools)?r.tools:[],i=r.web_search_options&&typeof r.web_search_options=="object"?[{type:"web_search_options",...r.web_search_options}]:[],a=[...s,...i];a.length>0&&(n[Ea]=JSON.stringify(a))}if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=e[0];n[Ze]=r.model??"unknown","temperature"in r&&(n[_a]=r.temperature),"top_p"in r&&(n[Sa]=r.top_p),"frequency_penalty"in r&&(n[ya]=r.frequency_penalty),"presence_penalty"in r&&(n[ef]=r.presence_penalty),"stream"in r&&(n[Qd]=r.stream)}else n[Ze]="unknown";return n}function RS(e,t,n){if(Ia(e,t.id,t.model,t.created),t.usage&&wa(e,t.usage.prompt_tokens,t.usage.completion_tokens,t.usage.total_tokens),Array.isArray(t.choices)){const r=t.choices.map(s=>s.finish_reason).filter(s=>s!==null);if(r.length>0&&e.setAttributes({[tr]:JSON.stringify(r)}),n){const s=t.choices.map(o=>o.message?.tool_calls).filter(o=>Array.isArray(o)&&o.length>0).flat();s.length>0&&e.setAttributes({[Yt]:JSON.stringify(s)})}}}function AS(e,t,n){if(Ia(e,t.id,t.model,t.created_at),t.status&&e.setAttributes({[tr]:JSON.stringify([t.status])}),t.usage&&wa(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.total_tokens),n){const r=t;if(Array.isArray(r.output)&&r.output.length>0){const s=r.output.filter(o=>typeof o=="object"&&o!==null&&o.type==="function_call");s.length>0&&e.setAttributes({[Yt]:JSON.stringify(s)})}}}function xS(e,t,n){if(!t||typeof t!="object")return;const r=t;if(SS(r)){if(RS(e,r,n),n&&r.choices?.length){const s=r.choices.map(o=>o.message?.content||"");e.setAttributes({[lt]:JSON.stringify(s)})}}else bS(r)&&(AS(e,r,n),n&&r.output_text&&e.setAttributes({[lt]:r.output_text}))}function fu(e,t){if("messages"in t){const n=cn(t.messages);e.setAttributes({[an]:n})}if("input"in t){const n=cn(t.input);e.setAttributes({[an]:n})}}function MS(){const t=q().getClient(),n=t?.getIntegrationByName(pS),r=n?!!t?.getOptions().sendDefaultPii:!1;return{recordInputs:n?.options?.recordInputs??r,recordOutputs:n?.options?.recordOutputs??r}}function OS(e,t,n,r){return async function(...o){const i=r||MS(),a=CS(o,t),c=a[Ze]||"unknown",u=Ta(t),d=o[0];return d&&typeof d=="object"&&d.stream===!0?Os({name:`${u} ${c} stream-response`,op:du(t),attributes:a},async p=>{try{i.recordInputs&&o[0]&&typeof o[0]=="object"&&fu(p,o[0]);const f=await e.apply(n,o);return kS(f,p,i.recordOutputs??!1)}catch(f){throw p.setStatus({code:ne,message:"internal_error"}),Ce(f,{mechanism:{handled:!1,type:"auto.ai.openai.stream",data:{function:t}}}),p.end(),f}}):Xn({name:`${u} ${c}`,op:du(t),attributes:a},async p=>{try{i.recordInputs&&o[0]&&typeof o[0]=="object"&&fu(p,o[0]);const f=await e.apply(n,o);return xS(p,f,i.recordOutputs),f}catch(f){throw Ce(f,{mechanism:{handled:!1,type:"auto.ai.openai",data:{function:t}}}),f}})}}function sf(e,t="",n){return new Proxy(e,{get(r,s){const o=r[s],i=yS(t,String(s));return typeof o=="function"&&_S(i)?OS(o,i,r,n):typeof o=="function"?o.bind(r):o&&typeof o=="object"?sf(o,i,n):o}})}function yR(e,t){return sf(e,"",t)}function NS(e,t){return"type"in e&&typeof e.type=="string"&&e.type==="error"?(t.setStatus({code:ne,message:e.error?.type??"internal_error"}),Ce(e.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}),!0):!1}function LS(e,t){if(e.type==="message_delta"&&e.usage&&"output_tokens"in e.usage&&typeof e.usage.output_tokens=="number"&&(t.completionTokens=e.usage.output_tokens),e.message){const n=e.message;n.id&&(t.responseId=n.id),n.model&&(t.responseModel=n.model),n.stop_reason&&t.finishReasons.push(n.stop_reason),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 PS(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 DS(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"){const r=t.activeToolBlocks[e.index];r&&r.inputJsonParts.push(e.delta.partial_json)}n&&typeof e.delta.text=="string"&&t.responseTexts.push(e.delta.text)}}function FS(e,t){if(e.type!=="content_block_stop"||typeof e.index!="number")return;const n=t.activeToolBlocks[e.index];if(!n)return;const r=n.inputJsonParts.join("");let s;try{s=r?JSON.parse(r):{}}catch{s={__unparsed:r}}t.toolCalls.push({type:"tool_use",id:n.id,name:n.name,input:s}),delete t.activeToolBlocks[e.index]}function of(e,t,n,r){!(e&&typeof e=="object")||NS(e,r)||(LS(e,t),PS(e,t),DS(e,t,n),FS(e,t))}function $S(e,t,n){t.isRecording()&&(e.responseId&&t.setAttributes({[Ar]:e.responseId}),e.responseModel&&t.setAttributes({[Rr]:e.responseModel}),va(t,e.promptTokens,e.completionTokens,e.cacheCreationInputTokens,e.cacheReadInputTokens),t.setAttributes({[go]:!0}),e.finishReasons.length>0&&t.setAttributes({[tr]:JSON.stringify(e.finishReasons)}),n&&e.responseTexts.length>0&&t.setAttributes({[lt]:e.responseTexts.join("")}),n&&e.toolCalls.length>0&&t.setAttributes({[Yt]:JSON.stringify(e.toolCalls)}),t.end())}async function*BS(e,t,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};try{for await(const s of e)of(s,r,n,t),yield s}finally{r.responseId&&t.setAttributes({[Ar]:r.responseId}),r.responseModel&&t.setAttributes({[Rr]:r.responseModel}),va(t,r.promptTokens,r.completionTokens,r.cacheCreationInputTokens,r.cacheReadInputTokens),t.setAttributes({[go]:!0}),r.finishReasons.length>0&&t.setAttributes({[tr]:JSON.stringify(r.finishReasons)}),n&&r.responseTexts.length>0&&t.setAttributes({[lt]:r.responseTexts.join("")}),n&&r.toolCalls.length>0&&t.setAttributes({[Yt]:JSON.stringify(r.toolCalls)}),t.end()}}function US(e,t,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};return e.on("streamEvent",s=>{of(s,r,n,t)}),e.on("message",()=>{$S(r,t,n)}),e.on("error",s=>{Ce(s,{mechanism:{handled:!1,type:"auto.ai.anthropic.stream_error"}}),t.isRecording()&&(t.setStatus({code:ne,message:"stream_error"}),t.end())}),e}const HS=["messages.create","messages.stream","messages.countTokens","models.get","completions.create","models.retrieve","beta.messages.create"];function WS(e){return HS.includes(e)}function jS(e,t){t.error&&(e.setStatus({code:ne,message:t.error.type||"internal_error"}),Ce(t.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}))}function zS(e,t){const n={[ga]:"anthropic",[ba]:xr(t),[de]:"auto.ai.anthropic"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=e[0];r.tools&&Array.isArray(r.tools)&&(n[Ea]=JSON.stringify(r.tools)),n[Ze]=r.model??"unknown","temperature"in r&&(n[_a]=r.temperature),"top_p"in r&&(n[Sa]=r.top_p),"stream"in r&&(n[Qd]=r.stream),"top_k"in r&&(n[tf]=r.top_k),"frequency_penalty"in r&&(n[ya]=r.frequency_penalty),"max_tokens"in r&&(n[Zd]=r.max_tokens)}else t==="models.retrieve"||t==="models.get"?n[Ze]=e[0]:n[Ze]="unknown";return n}function yi(e,t){if("messages"in t){const n=cn(t.messages);e.setAttributes({[an]:n})}if("input"in t){const n=cn(t.input);e.setAttributes({[an]:n})}"prompt"in t&&e.setAttributes({[Qy]:JSON.stringify(t.prompt)})}function qS(e,t){if("content"in t&&Array.isArray(t.content)){e.setAttributes({[lt]:t.content.map(r=>r.text).filter(r=>!!r).join("")});const n=[];for(const r of t.content)(r.type==="tool_use"||r.type==="server_tool_use")&&n.push(r);n.length>0&&e.setAttributes({[Yt]:JSON.stringify(n)})}"completion"in t&&e.setAttributes({[lt]:t.completion}),"input_tokens"in t&&e.setAttributes({[lt]:JSON.stringify(t.input_tokens)})}function GS(e,t){"id"in t&&"model"in t&&(e.setAttributes({[Ar]:t.id,[Rr]:t.model}),"created"in t&&typeof t.created=="number"&&e.setAttributes({[uu]:new Date(t.created*1e3).toISOString()}),"created_at"in t&&typeof t.created_at=="number"&&e.setAttributes({[uu]:new Date(t.created_at*1e3).toISOString()}),"usage"in t&&t.usage&&va(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens))}function VS(e,t,n){if(!(!t||typeof t!="object")){if("type"in t&&t.type==="error"){jS(e,t);return}n&&qS(e,t),GS(e,t)}}function pu(e,t,n){throw Ce(e,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:n}}}),t.isRecording()&&(t.setStatus({code:ne,message:"internal_error"}),t.end()),e}function YS(e,t,n,r,s,o,i,a,c,u,d){const l=s[Ze]??"unknown",p={name:`${o} ${l} stream-response`,op:Fs(i),attributes:s};return u&&!d?Os(p,async f=>{try{c.recordInputs&&a&&yi(f,a);const h=await e.apply(n,r);return BS(h,f,c.recordOutputs??!1)}catch(h){return pu(h,f,i)}}):Os(p,f=>{try{c.recordInputs&&a&&yi(f,a);const h=t.apply(n,r);return US(h,f,c.recordOutputs??!1)}catch(h){return pu(h,f,i)}})}function JS(e,t,n,r){return new Proxy(e,{apply(s,o,i){const a=zS(i,t),c=a[Ze]??"unknown",u=xr(t),d=typeof i[0]=="object"?i[0]:void 0,l=!!d?.stream,p=t==="messages.stream";return l||p?YS(e,s,n,i,a,u,t,d,r,l,p):Xn({name:`${u} ${c}`,op:Fs(t),attributes:a},f=>(r.recordInputs&&d&&yi(f,d),ao(()=>s.apply(n,i),h=>{Ce(h,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:t}}})},()=>{},h=>VS(f,h,r.recordOutputs))))}})}function af(e,t="",n){return new Proxy(e,{get(r,s){const o=r[s],i=rf(t,String(s));return typeof o=="function"&&WS(i)?JS(o,i,r,n):typeof o=="function"?o.bind(r):o&&typeof o=="object"?af(o,i,n):o}})}function SR(e,t){const n=!!x()?.getOptions().sendDefaultPii,r={recordInputs:n,recordOutputs:n,...t};return af(e,"",r)}const hu=["models.generateContent","models.generateContentStream","chats.create","sendMessage","sendMessageStream"],KS="google_genai",cf="chats.create",XS="chat";function QS(e,t){const n=e?.promptFeedback;if(n?.blockReason){const r=n.blockReasonMessage??n.blockReason;return t.setStatus({code:ne,message:`Content blocked: ${r}`}),Ce(`Content blocked: ${r}`,{mechanism:{handled:!1,type:"auto.ai.google_genai"}}),!0}return!1}function ZS(e,t){typeof e.responseId=="string"&&(t.responseId=e.responseId),typeof e.modelVersion=="string"&&(t.responseModel=e.modelVersion);const 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 eb(e,t,n){Array.isArray(e.functionCalls)&&t.toolCalls.push(...e.functionCalls);for(const r of e.candidates??[]){r?.finishReason&&!t.finishReasons.includes(r.finishReason)&&t.finishReasons.push(r.finishReason);for(const s of r?.content?.parts??[])n&&s.text&&t.responseTexts.push(s.text),s.functionCall&&t.toolCalls.push({type:"function",id:s.functionCall.id,name:s.functionCall.name,arguments:s.functionCall.args})}}function tb(e,t,n,r){!e||QS(e,r)||(ZS(e,t),eb(e,t,n))}async function*nb(e,t,n){const r={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(const s of e)tb(s,r,n,t),yield s}finally{const s={[go]:!0};r.responseId&&(s[Ar]=r.responseId),r.responseModel&&(s[Rr]=r.responseModel),r.promptTokens!==void 0&&(s[po]=r.promptTokens),r.completionTokens!==void 0&&(s[ho]=r.completionTokens),r.totalTokens!==void 0&&(s[mo]=r.totalTokens),r.finishReasons.length&&(s[tr]=JSON.stringify(r.finishReasons)),n&&r.responseTexts.length&&(s[lt]=r.responseTexts.join("")),n&&r.toolCalls.length&&(s[Yt]=JSON.stringify(r.toolCalls)),t.setAttributes(s),t.end()}}function rb(e){if(hu.includes(e))return!0;const t=e.split(".").pop();return hu.includes(t)}function sb(e){return e.includes("Stream")||e.endsWith("generateContentStream")||e.endsWith("sendMessageStream")}function mu(e,t){if("model"in e&&typeof e.model=="string")return e.model;if(t&&typeof t=="object"){const n=t;if("model"in n&&typeof n.model=="string")return n.model;if("modelVersion"in n&&typeof n.modelVersion=="string")return n.modelVersion}return"unknown"}function ob(e){const t={};return"temperature"in e&&typeof e.temperature=="number"&&(t[_a]=e.temperature),"topP"in e&&typeof e.topP=="number"&&(t[Sa]=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[ya]=e.frequencyPenalty),"presencePenalty"in e&&typeof e.presencePenalty=="number"&&(t[ef]=e.presencePenalty),t}function ib(e,t,n){const r={[ga]:KS,[ba]:xr(e),[de]:"auto.ai.google_genai"};if(t){if(r[Ze]=mu(t,n),"config"in t&&typeof t.config=="object"&&t.config){const s=t.config;if(Object.assign(r,ob(s)),"tools"in s&&Array.isArray(s.tools)){const o=s.tools.map(i=>i.functionDeclarations);r[Ea]=JSON.stringify(o)}}}else r[Ze]=mu({},n);return r}function gu(e,t){if("contents"in t){const n=t.contents,r=cn(n);e.setAttributes({[an]:r})}if("message"in t){const n=t.message,r=cn(n);e.setAttributes({[an]:r})}if("history"in t){const n=t.history,r=cn(n);e.setAttributes({[an]:r})}}function ab(e,t,n){if(!(!t||typeof t!="object")){if(t.usageMetadata&&typeof t.usageMetadata=="object"){const r=t.usageMetadata;typeof r.promptTokenCount=="number"&&e.setAttributes({[po]:r.promptTokenCount}),typeof r.candidatesTokenCount=="number"&&e.setAttributes({[ho]:r.candidatesTokenCount}),typeof r.totalTokenCount=="number"&&e.setAttributes({[mo]:r.totalTokenCount})}if(n&&Array.isArray(t.candidates)&&t.candidates.length>0){const r=t.candidates.map(s=>s.content?.parts&&Array.isArray(s.content.parts)?s.content.parts.map(o=>typeof o.text=="string"?o.text:"").filter(o=>o.length>0).join(""):"").filter(s=>s.length>0);r.length>0&&e.setAttributes({[lt]:r.join("")})}if(n&&t.functionCalls){const r=t.functionCalls;Array.isArray(r)&&r.length>0&&e.setAttributes({[Yt]:JSON.stringify(r)})}}}function _u(e,t,n,r){const s=t===cf;return new Proxy(e,{apply(o,i,a){const c=a[0],u=ib(t,c,n),d=u[Ze]??"unknown",l=xr(t);return sb(t)?Os({name:`${l} ${d} stream-response`,op:Fs(t),attributes:u},async p=>{try{r.recordInputs&&c&&gu(p,c);const f=await o.apply(n,a);return nb(f,p,!!r.recordOutputs)}catch(f){throw p.setStatus({code:ne,message:"internal_error"}),Ce(f,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}}),p.end(),f}}):Xn({name:s?`${l} ${d} create`:`${l} ${d}`,op:Fs(t),attributes:u},p=>(r.recordInputs&&c&&gu(p,c),ao(()=>o.apply(n,a),f=>{Ce(f,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}})},()=>{},f=>{s||ab(p,f,r.recordOutputs)})))}})}function Si(e,t="",n){return new Proxy(e,{get:(r,s,o)=>{const i=Reflect.get(r,s,o),a=rf(t,String(s));if(typeof i=="function"&&rb(a)){if(a===cf){const c=_u(i,a,r,n);return function(...d){const l=c(...d);return l&&typeof l=="object"?Si(l,XS,n):l}}return _u(i,a,r,n)}return typeof i=="function"?i.bind(r):i&&typeof i=="object"?Si(i,a,n):i}})}function bR(e,t){const n=!!x()?.getOptions().sendDefaultPii,r={recordInputs:n,recordOutputs:n,...t};return Si(e,"",r)}function uf(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const Fn=$;function cb(){return"history"in Fn&&!!Fn.history}function ub(){if(!("fetch"in Fn))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function bi(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function lf(){if(typeof EdgeRuntime=="string")return!0;if(!ub())return!1;if(bi(Fn.fetch))return!0;let e=!1;const t=Fn.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=bi(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){T&&m.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function lb(){return"ReportingObserver"in Fn}function ka(e,t){const n="fetch";zt(n,e),qt(n,()=>df(void 0,t))}function db(e){const t="fetch-body-resolved";zt(t,e),qt(t,()=>df(pb))}function df(e,t=!1){t&&!lf()||ke($,"fetch",function(n){return function(...r){const s=new Error,{method:o,url:i}=hb(r),a={args:r,fetchData:{method:o,url:i},startTimestamp:he()*1e3,virtualError:s,headers:mb(r)};return e||qe("fetch",{...a}),n.apply($,r).then(async c=>(e?e(c):qe("fetch",{...a,endTimestamp:he()*1e3,response:c}),c),c=>{if(qe("fetch",{...a,endTimestamp:he()*1e3,error:c}),$t(c)&&c.stack===void 0&&(c.stack=s.stack,Fe(c,"framesToPop",1)),c instanceof TypeError&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{const u=new URL(a.fetchData.url);c.message=`${c.message} (${u.host})`}catch{}throw c})}})}async function fb(e,t){if(e?.body){const n=e.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let o=!0;for(;o;){let i;try{i=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(i),a&&(t(),o=!1)}catch{o=!1}finally{clearTimeout(i)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}function pb(e){let t;try{t=e.clone()}catch{return}fb(t,()=>{qe("fetch-body-resolved",{endTimestamp:he()*1e3,response:e})})}function Ei(e,t){return!!e&&typeof e=="object"&&!!e[t]}function yu(e){return typeof e=="string"?e:e?Ei(e,"url")?e.url:e.toString?e.toString():"":""}function hb(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:yu(n),method:Ei(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:yu(t),method:Ei(t,"method")?String(t.method).toUpperCase():"GET"}}function mb(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(ql(t))return new Headers(t.headers)}catch{}}function gb(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function _b(){return"npm"}function yb(){return!gb()&&Object.prototype.toString.call(typeof dc<"u"?dc:0)==="[object process]"}function $s(){return typeof window<"u"&&(!yb()||Sb())}function Sb(){return $.process?.type==="renderer"}const Ke=$,oe=Ke.document,cr=Ke.navigator,ff="Report a Bug",bb="Cancel",Eb="Send Bug Report",vb="Confirm",Tb="Report a Bug",wb="your.email@example.org",Ib="Email",kb="What's the bug? What did you expect?",Cb="Description",Rb="Your Name",Ab="Name",xb="Thank you for your report!",Mb="(required)",Ob="Add a screenshot",Nb="Remove screenshot",Lb="Highlight",Pb="Hide",Db="Remove",Fb="widget",$b="api",Bb=5e3,Ub=(e,t={includeReplay:!0})=>{if(!e.message)throw new Error("Unable to submit feedback with empty message");const n=x();if(!n)throw new Error("No client setup, cannot send feedback.");e.tags&&Object.keys(e.tags).length&&q().setTags(e.tags);const r=Ny({source:$b,url:mn(),...e},t);return new Promise((s,o)=>{const i=setTimeout(()=>o("Unable to determine if Feedback was correctly sent."),3e4),a=n.on("afterSendEvent",(c,u)=>{if(c.event_id===r)return clearTimeout(i),a(),u?.statusCode&&u.statusCode>=200&&u.statusCode<300?s(r):u?.statusCode===403?o("Unable to send feedback. This could be because this domain is not in your list of allowed domains."):o("Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.")})})},hs=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Hb(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(cr.userAgent)||/Macintosh/i.test(cr.userAgent)&&cr.maxTouchPoints&&cr.maxTouchPoints>1||!isSecureContext)}function Gr(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 Wb(e){const t=oe.createElement("style");return t.textContent=`
9
+ `)}`)}function bm(e){if(!T)return;const{description:t="< unknown name >",op:n="< unknown op >"}=z(e),{spanId:r}=e.spanContext(),o=Se(e)===e,i=`[Tracing] Finishing "${n}" ${o?"root ":""}span "${t}" with ID ${r}`;m.log(i)}function Em(e,t,n,r=be()){const s=r&&Se(r);s&&(T&&m.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),s.addEvent(e,{[yr]:t,[_r]:n}))}function yc(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},s=r[_r],o=r[yr];typeof s=="string"&&typeof o=="number"&&(t[n.name]={value:o,unit:s})}),t}const Sc=1e3;class Qs{constructor(t={}){this._traceId=t.traceId||ut(),this._spanId=t.spanId||ht(),this._startTime=t.startTimestamp||he(),this._links=t.links,this._attributes={},this.setAttributes({[de]:"manual",[Ge]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?qi:Kl}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=Xt(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(je,"custom"),this}end(t){this._endTime||(this._endTime=Xt(t),bm(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Ge],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Zl(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[de],profile_id:this._attributes[Hi],exclusive_time:this._attributes[jn],measurements:yc(this._events),is_segment:this._isStandaloneSpan&&Se(this)===this||void 0,segment_id:this._isStandaloneSpan?Se(this).spanContext().spanId:void 0,links:Ql(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){T&&m.log("[Tracing] Adding an event to span:",t);const s=bc(n)?n:r||he(),o=bc(n)?{}:n||{},i={name:t,time:Xt(s),attributes:o};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=x();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===Se(this)))return;if(this._isStandaloneSpan){this._sampled?Tm(ym([this],t)):(T&&m.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(Ss(this).scope||q()).captureEvent(r)}_convertSpanToTransaction(){if(!Ec(z(this)))return;this._name||(T&&m.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=Ss(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const o=ns(this).filter(d=>d!==this&&!vm(d)).map(d=>z(d)).filter(Ec),i=this._attributes[je];delete this._attributes[Zo],o.forEach(d=>{delete d.data[Zo]});const a={contexts:{trace:Yh(this)},spans:o.length>Sc?o.sort((d,l)=>d.start_timestamp-l.start_timestamp).slice(0,Sc):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:Ze(this)},request:r,...i&&{transaction_info:{source:i}}},c=yc(this._events);return c&&Object.keys(c).length&&(T&&m.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),a.measurements=c),a}}function bc(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Ec(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function vm(e){return e instanceof Qs&&e.isStandaloneSpan()}function Tm(e){const t=x();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function Zs(e,t,n=()=>{},r=()=>{}){let s;try{s=e()}catch(o){throw t(o),n(),o}return Im(s,t,n,r)}function Im(e,t,n,r){return Wn(e)?e.then(s=>(n(),r(s),s),s=>{throw t(s),n(),s}):(n(),r(e),e)}function wm(e,t,n){if(!qe(e))return[!1];let r,s;typeof e.tracesSampler=="function"?(s=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),r=!0):t.parentSampled!==void 0?s=t.parentSampled:typeof e.tracesSampleRate<"u"&&(s=e.tracesSampleRate,r=!0);const o=nn(s);if(o===void 0)return T&&m.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(s)} of type ${JSON.stringify(typeof s)}.`),[!1];if(!o)return T&&m.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,r];const i=n<o;return i||T&&m.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[i,o,r]}const Ts="__SENTRY_SUPPRESS_TRACING__";function zn(e,t){const n=Sr();if(n.startSpan)return n.startSpan(e,t);const r=Yi(e),{forceTransaction:s,parentSpan:o,scope:i}=e,a=i?.clone();return et(a,()=>od(o)(()=>{const u=q(),d=Ji(u,o),p=e.onlyIfParent&&!d?new bt:Vi({parentSpan:d,spanArguments:r,forceTransaction:s,scope:u});return St(u,p),Zs(()=>t(p),()=>{const{status:f}=z(p);p.isRecording()&&(!f||f==="ok")&&p.setStatus({code:ne,message:"internal_error"})},()=>{p.end()})}))}function Is(e,t){const n=Sr();if(n.startSpanManual)return n.startSpanManual(e,t);const r=Yi(e),{forceTransaction:s,parentSpan:o,scope:i}=e,a=i?.clone();return et(a,()=>od(o)(()=>{const u=q(),d=Ji(u,o),p=e.onlyIfParent&&!d?new bt:Vi({parentSpan:d,spanArguments:r,forceTransaction:s,scope:u});return St(u,p),Zs(()=>t(p,()=>p.end()),()=>{const{status:f}=z(p);p.isRecording()&&(!f||f==="ok")&&p.setStatus({code:ne,message:"internal_error"})})}))}function qn(e){const t=Sr();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=Yi(e),{forceTransaction:r,parentSpan:s}=e;return(e.scope?i=>et(e.scope,i):s!==void 0?i=>eo(s,i):i=>i())(()=>{const i=q(),a=Ji(i,s);return e.onlyIfParent&&!a?new bt:Vi({parentSpan:a,spanArguments:n,forceTransaction:r,scope:i})})}const NC=(e,t)=>{const n=Tt(),r=Ht(n);if(r.continueTrace)return r.continueTrace(e,t);const{sentryTrace:s,baggage:o}=e,i=x(),a=zi(o);return i&&!Vh(i,a?.org_id)?Cm(t):et(c=>{const u=Vl(s,o);return c.setPropagationContext(u),t()})};function eo(e,t){const n=Sr();return n.withActiveSpan?n.withActiveSpan(e,t):et(r=>(St(r,e||void 0),t(r)))}function km(e){const t=Sr();return t.suppressTracing?t.suppressTracing(e):et(n=>{n.setSDKProcessingMetadata({[Ts]:!0});const r=e();return n.setSDKProcessingMetadata({[Ts]:void 0}),r})}function Cm(e){return et(t=>(t.setPropagationContext({traceId:ut(),sampleRand:Math.random()}),T&&m.log(`Starting a new trace with id ${t.getPropagationContext().traceId}`),eo(null,e)))}function Vi({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!qe()){const i=new bt;if(n||!e){const a={sampled:"false",sample_rate:"0",transaction:t.name,...Ze(i)};rs(i,a)}return i}const s=ve();let o;if(e&&!n)o=Rm(e,r,t),ed(e,o);else if(e){const i=Ze(e),{traceId:a,spanId:c}=e.spanContext(),u=Wt(e);o=vc({traceId:a,parentSpanId:c,...t},r,u),rs(o,i)}else{const{traceId:i,dsc:a,parentSpanId:c,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};o=vc({traceId:i,parentSpanId:c,...t},r,u),a&&rs(o,a)}return Sm(o),Ph(o,r,s),o}function Yi(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=Xt(e.startTime),delete r.startTime,r}return n}function Sr(){const e=Tt();return Ht(e)}function vc(e,t,n){const r=x(),s=r?.getOptions()||{},{name:o=""}=e,i={spanAttributes:{...e.attributes},spanName:o,parentSampled:n};r?.emit("beforeSampling",i,{decision:!1});const a=i.parentSampled??n,c=i.spanAttributes,u=t.getPropagationContext(),[d,l,p]=t.getScopeData().sdkProcessingMetadata[Ts]?[!1]:wm(s,{name:o,parentSampled:a,attributes:c,parentSampleRate:nn(u.dsc?.sample_rate)},u.sampleRand),f=new Qs({...e,attributes:{[je]:"custom",[Ui]:l!==void 0&&p?l:void 0,...c},sampled:d});return!d&&r&&(T&&m.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",f),f}function Rm(e,t,n){const{spanId:r,traceId:s}=e.spanContext(),o=t.getScopeData().sdkProcessingMetadata[Ts]?!1:Wt(e),i=o?new Qs({...n,parentSpanId:r,traceId:s,sampled:o}):new bt({traceId:s});ed(e,i);const a=x();return a&&(a.emit("spanStart",i),n.endTimestamp&&a.emit("spanEnd",i)),i}function Ji(e,t){if(t)return t;if(t===null)return;const n=kn(e);if(!n)return;const r=x();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Se(n):n}function od(e){return e!==void 0?t=>eo(e,t):t=>t()}const ss={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Am="heartbeatFailed",xm="idleTimeout",Mm="finalTimeout",Om="externalFinish";function id(e,t={}){const n=new Map;let r=!1,s,o=Om,i=!t.disableAutoFinish;const a=[],{idleTimeout:c=ss.idleTimeout,finalTimeout:u=ss.finalTimeout,childSpanTimeout:d=ss.childSpanTimeout,beforeSpanEnd:l,trimIdleSpanEndTimestamp:p=!0}=t,f=x();if(!f||!qe()){const b=new bt,I={sample_rate:"0",sampled:"false",...Ze(b)};return rs(b,I),b}const h=q(),g=be(),_=Nm(e);_.end=new Proxy(_.end,{apply(b,I,E){if(l&&l(_),I instanceof bt)return;const[C,...D]=E,w=C||he(),A=Xt(w),G=ns(_).filter(M=>M!==_),K=z(_);if(!G.length||!p)return k(A),Reflect.apply(b,I,[A,...D]);const X=f.getOptions().ignoreSpans,F=G?.reduce((M,J)=>{const se=z(J);return!se.timestamp||X&&bs(se,X)?M:M?Math.max(M,se.timestamp):se.timestamp},void 0),L=K.start_timestamp,P=Math.min(L?L+u/1e3:1/0,Math.max(L||-1/0,Math.min(A,F||1/0)));return k(P),Reflect.apply(b,I,[P,...D])}});function y(){s&&(clearTimeout(s),s=void 0)}function S(b){y(),s=setTimeout(()=>{!r&&n.size===0&&i&&(o=xm,_.end(b))},c)}function O(b){s=setTimeout(()=>{!r&&i&&(o=Am,_.end(b))},d)}function v(b){y(),n.set(b,!0);const I=he();O(I+d/1e3)}function N(b){if(n.has(b)&&n.delete(b),n.size===0){const I=he();S(I+c/1e3)}}function k(b){r=!0,n.clear(),a.forEach(A=>A()),St(h,g);const I=z(_),{start_timestamp:E}=I;if(!E)return;I.data[ar]||_.setAttribute(ar,o),m.log(`[Tracing] Idle span "${I.op}" finished`);const D=ns(_).filter(A=>A!==_);let w=0;D.forEach(A=>{A.isRecording()&&(A.setStatus({code:ne,message:"cancelled"}),A.end(b),T&&m.log("[Tracing] Cancelling span since span ended early",JSON.stringify(A,void 0,2)));const G=z(A),{timestamp:K=0,start_timestamp:X=0}=G,F=X<=b,L=(u+c)/1e3,P=K-X<=L;if(T){const M=JSON.stringify(A,void 0,2);F?P||m.log("[Tracing] Discarding span since it finished after idle span final timeout",M):m.log("[Tracing] Discarding span since it happened after idle span was finished",M)}(!P||!F)&&(Zh(_,A),w++)}),w>0&&_.setAttribute("sentry.idle_span_discarded_spans",w)}return a.push(f.on("spanStart",b=>{if(r||b===_||z(b).timestamp||b instanceof Qs&&b.isStandaloneSpan())return;ns(_).includes(b)&&v(b.spanContext().spanId)})),a.push(f.on("spanEnd",b=>{r||N(b.spanContext().spanId)})),a.push(f.on("idleSpanEnableAutoFinish",b=>{b===_&&(i=!0,S(),n.size&&O())})),t.disableAutoFinish||S(),setTimeout(()=>{r||(_.setStatus({code:ne,message:"deadline_exceeded"}),o=Mm,_.end())},u),_}function Nm(e){const t=qn(e);return St(q(),t),T&&m.log("[Tracing] Started span is an idle span"),t}const Co=0,Tc=1,Ic=2;function to(e){return new cr(t=>{t(e)})}function Ki(e){return new cr((t,n)=>{n(e)})}class cr{constructor(t){this._state=Co,this._handlers=[],this._runExecutor(t)}then(t,n){return new cr((r,s)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(i){s(i)}},o=>{if(!n)s(o);else try{r(n(o))}catch(i){s(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new cr((n,r)=>{let s,o;return this.then(i=>{o=!1,s=i,t&&t()},i=>{o=!0,s=i,t&&t()}).then(()=>{if(o){r(s);return}n(s)})})}_executeHandlers(){if(this._state===Co)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Tc&&n[1](this._value),this._state===Ic&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(o,i)=>{if(this._state===Co){if(Wn(i)){i.then(r,s);return}this._state=o,this._value=i,this._executeHandlers()}},r=o=>{n(Tc,o)},s=o=>{n(Ic,o)};try{t(r,s)}catch(o){s(o)}}}function Lm(e,t,n,r=0){try{const s=ri(t,n,e,r);return Wn(s)?s:to(s)}catch(s){return Ki(s)}}function ri(e,t,n,r){const s=n[r];if(!e||!s)return e;const o=s({...e},t);return T&&o===null&&m.log(`Event processor "${s.id||"?"}" dropped event`),Wn(o)?o.then(i=>ri(i,t,n,r+1)):ri(o,t,n,r+1)}function Pm(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=t;Dm(e,t),r&&Bm(e,r),Um(e,n),Fm(e,s),$m(e,o)}function An(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:l,propagationContext:p,transactionName:f,span:h}=t;Dr(e,"extra",n),Dr(e,"tags",r),Dr(e,"user",s),Dr(e,"contexts",o),e.sdkProcessingMetadata=gr(e.sdkProcessingMetadata,a,2),i&&(e.level=i),f&&(e.transactionName=f),h&&(e.span=h),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),l.length&&(e.attachments=[...e.attachments,...l]),e.propagationContext={...e.propagationContext,...p}}function Dr(e,t,n){e[t]=gr(e[t],n,1)}function Dm(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(s).length&&(e.user={...s,...e.user}),Object.keys(o).length&&(e.contexts={...o,...e.contexts}),i&&(e.level=i),a&&e.type!=="transaction"&&(e.transaction=a)}function Fm(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function $m(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Bm(e,t){e.contexts={trace:Xl(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Ze(t),...e.sdkProcessingMetadata};const n=Se(t),r=z(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function Um(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}let zt,wc,kc,Ct;function ad(e){const t=$._sentryDebugIds,n=$._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],s=n?Object.keys(n):[];if(Ct&&r.length===wc&&s.length===kc)return Ct;wc=r.length,kc=s.length,Ct={},zt||(zt={});const o=(i,a)=>{for(const c of i){const u=a[c],d=zt?.[c];if(d&&Ct&&u)Ct[d[0]]=u,zt&&(zt[c]=[d[0],u]);else if(u){const l=e(c);for(let p=l.length-1;p>=0;p--){const h=l[p]?.filename;if(h&&Ct&&zt){Ct[h]=u,zt[c]=[h,u];break}}}}};return t&&o(r,t),n&&o(s,n),Ct}function Hm(e,t){const n=ad(e);if(!n)return[];const r=[];for(const s of t)s&&n[s]&&r.push({type:"sourcemap",code_file:s,debug_id:n[s]});return r}function cd(e,t,n,r,s,o){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||Ee(),timestamp:t.timestamp||ln()},u=n.integrations||e.integrations.map(_=>_.name);Wm(c,e),qm(c,u),s&&s.emit("applyFrameMetadata",t),t.type===void 0&&jm(c,e.stackParser);const d=Vm(r,n.captureContext);n.mechanism&&yt(c,n.mechanism);const l=s?s.getEventProcessors():[],p=Rn().getScopeData();if(o){const _=o.getScopeData();An(p,_)}if(d){const _=d.getScopeData();An(p,_)}const f=[...n.attachments||[],...p.attachments];f.length&&(n.attachments=f),Pm(c,p);const h=[...l,...p.eventProcessors];return Lm(h,c,n).then(_=>(_&&zm(_),typeof i=="number"&&i>0?Gm(_,i,a):_))}function Wm(e,t){const{environment:n,release:r,dist:s,maxValueLength:o}=t;e.environment=e.environment||n||Ks,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s);const i=e.request;i?.url&&(i.url=o?In(i.url,o):i.url)}function jm(e,t){const n=ad(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.filename&&(s.debug_id=n[s.filename])})})}function zm(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.debug_id&&(s.abs_path?t[s.abs_path]=s.debug_id:s.filename&&(t[s.filename]=s.debug_id),delete s.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,s])=>{n.push({type:"sourcemap",code_file:r,debug_id:s})})}function qm(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Gm(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(s=>({...s,...s.data&&{data:$e(s.data,t,n)}}))},...e.user&&{user:$e(e.user,t,n)},...e.contexts&&{contexts:$e(e.contexts,t,n)},...e.extra&&{extra:$e(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=$e(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(s=>({...s,...s.data&&{data:$e(s.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=$e(e.contexts.flags,3,n)),r}function Vm(e,t){if(!t)return e;const n=e?e.clone():new lt;return n.update(t),n}function Ym(e){if(e)return Jm(e)?{captureContext:e}:Xm(e)?{captureContext:e}:e}function Jm(e){return e instanceof lt||typeof e=="function"}const Km=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Xm(e){return Object.keys(e).some(t=>Km.includes(t))}function ke(e,t){return q().captureException(e,Ym(t))}function si(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return q().captureMessage(e,n,r)}function br(e,t){return q().captureEvent(e,t)}function Qm(e,t){ve().setContext(e,t)}function LC(e){ve().setExtras(e)}function PC(e,t){ve().setExtra(e,t)}function DC(e){ve().setTags(e)}function FC(e,t){ve().setTag(e,t)}function $C(e){ve().setUser(e)}function Zm(){return ve().lastEventId()}async function BC(e){const t=x();return t?t.flush(e):(T&&m.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function UC(e){const t=x();return t?t.close(e):(T&&m.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function HC(){return!!x()}function eg(){const e=x();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function tg(e){ve().addEventProcessor(e)}function Cc(e){const t=ve(),n=q(),{userAgent:r}=$.navigator||{},s=yh({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),o=t.getSession();return o?.status==="ok"&&wn(o,{status:"exited"}),ud(),t.setSession(s),s}function ud(){const e=ve(),n=q().getSession()||e.getSession();n&&Sh(n),ld(),e.setSession()}function ld(){const e=ve(),t=x(),n=e.getSession();n&&t&&t.captureSession(n)}function Rc(e=!1){if(e){ud();return}ld()}const ng="7";function dd(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function rg(e){return`${dd(e)}${e.projectId}/envelope/`}function sg(e,t){const n={sentry_version:ng};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function fd(e,t,n){return t||`${rg(e)}?${sg(e,n)}`}function og(e,t){const n=ql(e);if(!n)return"";const r=`${dd(n)}embed/error-page/`;let s=`dsn=${It(n)}`;for(const o in t)if(o!=="dsn"&&o!=="onClose")if(o==="user"){const i=t.user;if(!i)continue;i.name&&(s+=`&name=${encodeURIComponent(i.name)}`),i.email&&(s+=`&email=${encodeURIComponent(i.email)}`)}else s+=`&${encodeURIComponent(o)}=${encodeURIComponent(t[o])}`;return`${r}?${s}`}const Ac=[];function ig(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function ag(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const s=n(t);r=Array.isArray(s)?s:[s]}else r=t;return ig(r)}function cg(e,t){const n={};return t.forEach(r=>{r&&pd(e,r,n)}),n}function xc(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function pd(e,t,n){if(n[t.name]){T&&m.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Ac.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Ac.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,o)=>r(s,o,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((o,i)=>r(o,i,e),{id:t.name});e.addEventProcessor(s)}T&&m.log(`Integration installed: ${t.name}`)}function Mc(e){const t=x();if(!t){T&&m.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function hd(e,t){return t?et(t,()=>{const n=be(),r=n?Xl(n):Fl(t);return[n?Ze(n):Gi(e,t),r]}):[void 0,void 0]}const ug={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function lg(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function dg(e,t,n,r){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=It(r)),tt(s,[lg(e)])}const fg=100;function pg(e){switch(typeof e){case"number":return Number.isInteger(e)?{value:e,type:"integer"}:{value:e,type:"double"};case"boolean":return{value:e,type:"boolean"};case"string":return{value:e,type:"string"};default:{let t="";try{t=JSON.stringify(e)??""}catch{}return{value:t,type:"string"}}}}function st(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function hg(e,t){const n=Qi(),r=md(e);r===void 0?n.set(e,[t]):(n.set(e,[...r,t]),r.length>=fg&&Xi(e,r))}function ws(e,t=q(),n=hg){const r=t?.getClient()??x();if(!r){T&&m.warn("No client available to capture log.");return}const{release:s,environment:o,enableLogs:i=!1,beforeSendLog:a}=r.getOptions();if(!i){T&&m.warn("logging option not enabled, log will not be captured.");return}const[,c]=hd(r,t),u={...e.attributes},{user:{id:d,email:l,username:p}}=mg(t);st(u,"user.id",d,!1),st(u,"user.email",l,!1),st(u,"user.name",p,!1),st(u,"sentry.release",s),st(u,"sentry.environment",o);const{name:f,version:h}=r.getSdkMetadata()?.sdk??{};st(u,"sentry.sdk.name",f),st(u,"sentry.sdk.version",h);const g=r.getIntegrationByName("Replay"),_=g?.getReplayId(!0);st(u,"sentry.replay_id",_),_&&g?.getRecordingMode()==="buffer"&&st(u,"sentry._internal.replay_is_buffering",!0);const y=e.message;if(Ys(y)){const{__sentry_template_string__:C,__sentry_template_values__:D=[]}=y;D?.length&&(u["sentry.message.template"]=C),D.forEach((w,A)=>{u[`sentry.message.parameter.${A}`]=w})}const S=kn(t);st(u,"sentry.trace.parent_span_id",S?.spanContext().spanId);const O={...e,attributes:u};r.emit("beforeCaptureLog",O);const v=a?$t(()=>a(O)):O;if(!v){r.recordDroppedEvent("before_send","log_item",1),T&&m.warn("beforeSendLog returned null, log will not be captured.");return}const{level:N,message:k,attributes:b={},severityNumber:I}=v,E={timestamp:he(),level:N,body:k,trace_id:c?.trace_id,severity_number:I??ug[N],attributes:Object.keys(b).reduce((C,D)=>(C[D]=pg(b[D]),C),{})};n(r,E),r.emit("afterCaptureLog",v)}function Xi(e,t){const n=t??md(e)??[];if(n.length===0)return;const r=e.getOptions(),s=dg(n,r._metadata,r.tunnel,e.getDsn());Qi().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(s)}function md(e){return Qi().get(e)}function mg(e){const t=Rn().getScopeData();return An(t,ve().getScopeData()),An(t,e.getScopeData()),t}function Qi(){return Un("clientToLogBufferMap",()=>new WeakMap)}function gg(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function _g(e,t,n,r){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=It(r)),tt(s,[gg(e)])}const yg=1e3;function Sg(e){switch(typeof e){case"number":return Number.isInteger(e)?{value:e,type:"integer"}:{value:e,type:"double"};case"boolean":return{value:e,type:"boolean"};case"string":return{value:e,type:"string"};default:{let t="";try{t=JSON.stringify(e)??""}catch{}return{value:t,type:"string"}}}}function dt(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function bg(e,t){const n=ea(),r=gd(e);r===void 0?n.set(e,[t]):(n.set(e,[...r,t]),r.length>=yg&&Zi(e,r))}function Eg(e,t){const n=t?.scope??q(),r=t?.captureSerializedMetric??bg,s=n?.getClient()??x();if(!s){T&&m.warn("No client available to capture metric.");return}const{release:o,environment:i,_experiments:a}=s.getOptions();if(!a?.enableMetrics){T&&m.warn("metrics option not enabled, metric will not be captured.");return}const[,c]=hd(s,n),u={...e.attributes},{user:{id:d,email:l,username:p}}=vg(n);dt(u,"user.id",d,!1),dt(u,"user.email",l,!1),dt(u,"user.name",p,!1),dt(u,"sentry.release",o),dt(u,"sentry.environment",i);const{name:f,version:h}=s.getSdkMetadata()?.sdk??{};dt(u,"sentry.sdk.name",f),dt(u,"sentry.sdk.version",h);const g=s.getIntegrationByName("Replay"),_=g?.getReplayId(!0);dt(u,"sentry.replay_id",_),_&&g?.getRecordingMode()==="buffer"&&dt(u,"sentry._internal.replay_is_buffering",!0);const y={...e,attributes:u},S=a?.beforeSendMetric?a.beforeSendMetric(y):y;if(!S){T&&m.log("`beforeSendMetric` returned `null`, will not send metric.");return}const O={};for(const I in S.attributes)S.attributes[I]!==void 0&&(O[I]=Sg(S.attributes[I]));const v=kn(n),N=v?v.spanContext().traceId:c?.trace_id,k=v?v.spanContext().spanId:void 0,b={timestamp:he(),trace_id:N,span_id:k,name:S.name,type:S.type,unit:S.unit,value:S.value,attributes:O};T&&m.log("[Metric]",b),r(s,b),s.emit("afterCaptureMetric",y)}function Zi(e,t){const n=t??gd(e)??[];if(n.length===0)return;const r=e.getOptions(),s=_g(n,r._metadata,r.tunnel,e.getDsn());ea().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(s)}function gd(e){return ea().get(e)}function vg(e){const t=Rn().getScopeData();return An(t,ve().getScopeData()),An(t,e.getScopeData()),t}function ea(){return Un("clientToMetricBufferMap",()=>new WeakMap)}function Tg(e,t,n){const r=[{type:"client_report"},{timestamp:ln(),discarded_events:e}];return tt(t?{dsn:t}:{},[r])}function _d(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function Ig(e){const{trace_id:t,parent_span_id:n,span_id:r,status:s,origin:o,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:s,timestamp:e.timestamp,trace_id:t??"",origin:o,profile_id:i?.[Hi],exclusive_time:i?.[jn],measurements:e.measurements,is_segment:!0}}function wg(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&&{[Hi]:e.profile_id},...e.exclusive_time&&{[jn]:e.exclusive_time}}}},measurements:e.measurements}}const Oc="Not capturing exception because it's already been captured.",Nc="Discarded session because of missing or non-string release",yd=Symbol.for("SentryInternalError"),Sd=Symbol.for("SentryDoNotSendEventError"),kg=5e3;function os(e){return{message:e,[yd]:!0}}function Ro(e){return{message:e,[Sd]:!0}}function Lc(e){return!!e&&typeof e=="object"&&yd in e}function Pc(e){return!!e&&typeof e=="object"&&Sd in e}function Dc(e,t,n,r,s){let o=0,i;e.on(n,()=>{o=0,clearTimeout(i)}),e.on(t,a=>{o+=r(a),o>=8e5?s(e):(clearTimeout(i),i=setTimeout(()=>{s(e)},kg))}),e.on("flush",()=>{s(e)})}class Cg{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=ql(t.dsn):T&&m.warn("No DSN provided, client will not send events."),this._dsn){const n=fd(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}this._options.enableLogs&&Dc(this,"afterCaptureLog","flushLogs",Mg,Xi),this._options._experiments?.enableMetrics&&Dc(this,"afterCaptureMetric","flushMetrics",xg,Zi)}captureException(t,n,r){const s=Ee();if(cc(t))return T&&m.log(Oc),s;const o={event_id:s,...n};return this._process(this.eventFromException(t,o).then(i=>this._captureEvent(i,o,r))),o.event_id}captureMessage(t,n,r,s){const o={event_id:Ee(),...r},i=Ys(t)?t:String(t),a=Dt(t)?this.eventFromMessage(i,n,o):this.eventFromException(t,o);return this._process(a.then(c=>this._captureEvent(c,o,s))),o.event_id}captureEvent(t,n,r){const s=Ee();if(n?.originalException&&cc(n.originalException))return T&&m.log(Oc),s;const o={event_id:s,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope;return this._process(this._captureEvent(t,o,a||r,c)),o.event_id}captureSession(t){this.sendSession(t),wn(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const n=this._transport;if(!n)return!0;this.emit("flush");const r=await this._isClientDoneProcessing(t),s=await n.flush(t);return r&&s}async close(t){const n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];pd(this,t,this._integrations),n||xc(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=_m(t,this._dsn,this._options._metadata,this._options.tunnel);for(const s of n.attachments||[])r=cm(r,pm(s));this.sendEnvelope(r).then(s=>this.emit("afterSendEvent",t,s))}sendSession(t){const{release:n,environment:r=Ks}=this._options;if("aggregates"in t){const o=t.attrs||{};if(!o.release&&!n){T&&m.warn(Nc);return}o.release=o.release||n,o.environment=o.environment||r,t.attrs=o}else{if(!t.release&&!n){T&&m.warn(Nc);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const s=gm(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const s=`${t}:${n}`;T&&m.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,s=(...o)=>n(...o);return r.add(s),()=>{r.delete(s)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(s=>s(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return T&&m.error("Error while sending envelope:",n),{}}return T&&m.error("Transport disabled"),{}}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=cg(this,t),xc(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",s=!1;const o=n.exception?.values;if(o){s=!0;for(const c of o)if(c.mechanism?.handled===!1){r=!0;break}}const i=t.status==="ok";(i&&t.errors===0||i&&r)&&(wn(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s){const o=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i?.length&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),cd(o,t,n,r,this,s).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:Fl(r),...a.contexts};const c=Gi(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=q(),s=ve()){return T&&oi(t)&&m.log(`Captured error event \`${_d(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,s).then(o=>o.event_id,o=>{T&&(Pc(o)?m.log(o.message):Lc(o)?m.warn(o.message):m.warn(o))})}_processEvent(t,n,r,s){const o=this.getOptions(),{sampleRate:i}=o,a=bd(t),c=oi(t),u=t.type||"error",d=`before send for type \`${u}\``,l=typeof i>"u"?void 0:nn(i);if(c&&typeof l=="number"&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error"),Ki(Ro(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));const p=u==="replay_event"?"replay":u;return this._prepareEvent(t,n,r,s).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",p),Ro("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return f;const g=Ag(this,o,f,n);return Rg(g,d)}).then(f=>{if(f===null){if(this.recordDroppedEvent("before_send",p),a){const y=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",y)}throw Ro(`${d} returned \`null\`, will not send event.`)}const h=r.getSession()||s.getSession();if(c&&h&&this._updateSessionFromEvent(h,f),a){const _=f.sdkProcessingMetadata?.spanCountBeforeProcessing||0,y=f.spans?f.spans.length:0,S=_-y;S>0&&this.recordDroppedEvent("before_send","span",S)}const g=f.transaction_info;if(a&&g&&f.transaction!==t.transaction){const _="custom";f.transaction_info={...g,source:_}}return this.sendEvent(f,n),f}).then(null,f=>{throw Pc(f)||Lc(f)?f:(this.captureException(f,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:f}),os(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
10
+ Reason: ${f}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[s,o]=n.split(":");return{reason:s,category:o,quantity:r}})}_flushOutcomes(){T&&m.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){T&&m.log("No outcomes to send");return}if(!this._dsn){T&&m.log("No dsn provided, will not send outcomes");return}T&&m.log("Sending outcomes:",t);const n=Tg(t,this._options.tunnel&&It(this._dsn));this.sendEnvelope(n)}}function Rg(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Wn(e))return e.then(r=>{if(!it(r)&&r!==null)throw os(n);return r},r=>{throw os(`${t} rejected with ${r}`)});if(!it(e)&&e!==null)throw os(n);return e}function Ag(e,t,n,r){const{beforeSend:s,beforeSendTransaction:o,beforeSendSpan:i,ignoreSpans:a}=t;let c=n;if(oi(c)&&s)return s(c,r);if(bd(c)){if(i||a){const u=Ig(c);if(a?.length&&bs(u,a))return null;if(i){const d=i(u);d?c=gr(n,wg(d)):ti()}if(c.spans){const d=[],l=c.spans;for(const f of l){if(a?.length&&bs(f,a)){tm(l,f);continue}if(i){const h=i(f);h?d.push(h):(ti(),d.push(f))}else d.push(f)}const p=c.spans.length-d.length;p&&e.recordDroppedEvent("before_send","span",p),c.spans=d}}if(o){if(c.spans){const u=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return o(c,r)}}return c}function oi(e){return e.type===void 0}function bd(e){return e.type==="transaction"}function xg(e){let t=0;return e.name&&(t+=e.name.length*2),typeof e.value=="string"?t+=e.value.length*2:t+=8,t+Ed(e.attributes)}function Mg(e){let t=0;return e.message&&(t+=e.message.length*2),t+Ed(e.attributes)}function Ed(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*Fc(n[0]):Dt(n)?t+=Fc(n):t+=100}),t}function Fc(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function Og(e,t){t.debug===!0&&(T?m.enable():$t(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),q().update(t.initialScope);const r=new e(t);return Ng(r),r.init(),r}function Ng(e){q().setClient(e)}const vd=Symbol.for("SentryBufferFullError");function Td(e=100){const t=new Set;function n(){return t.size<e}function r(i){t.delete(i)}function s(i){if(!n())return Ki(vd);const a=i();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function o(i){if(!t.size)return to(!0);const a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return a;const c=[a,new Promise(u=>setTimeout(()=>u(!1),i))];return Promise.race(c)}return{get $(){return Array.from(t)},add:s,drain:o}}const Lg=60*1e3;function Id(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Lg:r-t}function Pg(e,t){return e[t]||e.all||0}function wd(e,t,n=Date.now()){return Pg(e,t)>n}function kd(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},o=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(o)for(const a of o.trim().split(",")){const[c,u,,,d]=a.split(":",5),l=parseInt(c,10),p=(isNaN(l)?60:l)*1e3;if(!u)s.all=r+p;else for(const f of u.split(";"))f==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(s[f]=r+p):s[f]=r+p}else i?s.all=r+Id(i,r):t===429&&(s.all=r+60*1e3);return s}const Dg=64;function Fg(e,t,n=Td(e.bufferSize||Dg)){let r={};const s=i=>n.drain(i);function o(i){const a=[];if(rn(i,(l,p)=>{const f=_c(p);wd(r,f)?e.recordDroppedEvent("ratelimit_backoff",f):a.push(l)}),a.length===0)return Promise.resolve({});const c=tt(i[0],a),u=l=>{rn(c,(p,f)=>{e.recordDroppedEvent(l,_c(f))})},d=()=>t({body:vs(c)}).then(l=>(l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&T&&m.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=kd(r,l),l),l=>{throw u("network_error"),T&&m.error("Encountered error running transport request:",l),l});return n.add(d).then(l=>l,l=>{if(l===vd)return T&&m.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw l})}return{send:o,flush:s}}const Ao=100,xo=5e3,$g=36e5;function Bg(e){function t(...n){T&&m.log("[Offline]:",...n)}return n=>{const r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");const s=n.createStore(n);let o=xo,i;function a(l,p,f){return gc(l,["client_report"])?!1:n.shouldStore?n.shouldStore(l,p,f):!0}function c(l){i&&clearTimeout(i),i=setTimeout(async()=>{i=void 0;const p=await s.shift();p&&(t("Attempting to send previously queued event"),p[0].sent_at=new Date().toISOString(),d(p,!0).catch(f=>{t("Failed to retry sending",f)}))},l),typeof i!="number"&&i.unref&&i.unref()}function u(){i||(c(o),o=Math.min(o*2,$g))}async function d(l,p=!1){if(!p&&gc(l,["replay_event","replay_recording"]))return await s.push(l),c(Ao),{};try{if(n.shouldSend&&await n.shouldSend(l)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");const f=await r.send(l);let h=Ao;if(f){if(f.headers?.["retry-after"])h=Id(f.headers["retry-after"]);else if(f.headers?.["x-sentry-rate-limits"])h=6e4;else if((f.statusCode||0)>=400)return f}return c(h),o=xo,f}catch(f){if(await a(l,f,o))return p?await s.unshift(l):await s.push(l),u(),t("Error sending. Event queued.",f),{};throw f}}return n.flushAtStartup&&u(),{send:d,flush:l=>(l===void 0&&(o=xo,c(Ao)),r.flush(l))}}}function Cd(e,t){let n;return rn(e,(r,s)=>(t.includes(s)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function Ug(e,t){return n=>{const r=e(n);return{...r,send:async s=>{const o=Cd(s,["event","transaction","profile","replay_event"]);return o&&(o.release=t),r.send(s)}}}}function Hg(e,t){return tt(t?{...e[0],dsn:t}:e[0],e[1])}function WC(e,t){return n=>{const r=e(n),s=new Map;function o(c,u){const d=u?`${c}:${u}`:c;let l=s.get(d);if(!l){const p=Wl(c);if(!p)return;const f=fd(p,n.tunnel);l=u?Ug(e,u)({...n,url:f}):e({...n,url:f}),s.set(d,l)}return[c,l]}async function i(c){function u(f){const h=f?.length?f:["event"];return Cd(c,h)}const d=t({envelope:c,getEvent:u}).map(f=>typeof f=="string"?o(f,void 0):o(f.dsn,f.release)).filter(f=>!!f),l=d.length?d:[["",r]];return(await Promise.all(l.map(([f,h])=>h.send(Hg(c,f)))))[0]}async function a(c){const u=[...s.values(),r];return(await Promise.all(u.map(l=>l.flush(c)))).every(l=>l)}return{send:i,flush:a}}}const Wg="thismessage:/";function ta(e){return"isRelative"in e}function na(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?Wg:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const s=new URL(e,r);return n?{isRelative:n,pathname:s.pathname,search:s.search,hash:s.hash}:s}catch{}}function jg(e){if(ta(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function Zt(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Rd(e){return e.split(/[?#]/,1)[0]}function Ad(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return qg(e,n)||zg(e,r)}function zg(e,t){return t?$c(e)===$c(t):!1}function qg(e,t){const n=na(e);return!n||ta(n)?!1:t?n.host.includes(t.host)&&/(^|&|\?)sentry_key=/.test(n.search):!1}function $c(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function Gg(e,...t){const 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}const Vg=Gg;function Yg(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 Jg(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:Ot})),version:Ot}),e._metadata=s}function xd(e={}){const t=e.client||x();if(!eg()||!t)return{};const n=Tt(),r=Ht(n);if(r.getTraceData)return r.getTraceData(e);const s=e.scope||q(),o=e.span||be(),i=o?Jh(o):Kg(s),a=o?Ze(o):Gi(t,s),c=Hl(a);if(!Gl.test(i))return m.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const d={"sentry-trace":i,baggage:c};if(e.propagateTraceparent){const l=o?Kh(o):Xg(s);l&&(d.traceparent=l)}return d}function Kg(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Yl(t,r,n)}function Xg(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Jl(t,r,n)}function Qg(e,t,n){let r,s,o;const i=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function c(){return u(),r=e(),r}function u(){s!==void 0&&clearTimeout(s),o!==void 0&&clearTimeout(o),s=o=void 0}function d(){return s!==void 0||o!==void 0?c():r}function l(){return s&&clearTimeout(s),s=a(c,t),i&&o===void 0&&(o=a(c,i)),r}return l.cancel=u,l.flush=d,l}const Zg=100;function Et(e,t){const n=x(),r=ve();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=Zg}=n.getOptions();if(o<=0)return;const a={timestamp:ln(),...e},c=s?$t(()=>s(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,o))}let Bc;const e_="FunctionToString",Uc=new WeakMap,t_=(()=>({name:e_,setupOnce(){Bc=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Bi(this),n=Uc.has(x())&&t!==void 0?t:this;return Bc.apply(n,e)}}catch{}},setup(e){Uc.set(e,!0)}})),n_=t_,r_=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],s_="EventFilters",o_=(e={})=>{let t;return{name:s_,setup(n){const r=n.getOptions();t=Hc(e,r)},processEvent(n,r,s){if(!t){const o=s.getOptions();t=Hc(e,o)}return a_(n,t)?null:n}}},i_=((e={})=>({...o_(e),name:"InboundFilters"}));function Hc(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:r_],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function a_(e,t){if(e.type){if(e.type==="transaction"&&u_(e,t.ignoreTransactions))return T&&m.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
11
+ Event: ${Gt(e)}`),!0}else{if(c_(e,t.ignoreErrors))return T&&m.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
12
+ Event: ${Gt(e)}`),!0;if(p_(e))return T&&m.warn(`Event dropped due to not having an error message, error type or stacktrace.
13
+ Event: ${Gt(e)}`),!0;if(l_(e,t.denyUrls))return T&&m.warn(`Event dropped due to being matched by \`denyUrls\` option.
14
+ Event: ${Gt(e)}.
15
+ Url: ${ks(e)}`),!0;if(!d_(e,t.allowUrls))return T&&m.warn(`Event dropped due to not being matched by \`allowUrls\` option.
16
+ Event: ${Gt(e)}.
17
+ Url: ${ks(e)}`),!0}return!1}function c_(e,t){return t?.length?_d(e).some(n=>Xe(n,t)):!1}function u_(e,t){if(!t?.length)return!1;const n=e.transaction;return n?Xe(n,t):!1}function l_(e,t){if(!t?.length)return!1;const n=ks(e);return n?Xe(n,t):!1}function d_(e,t){if(!t?.length)return!0;const n=ks(e);return n?Xe(n,t):!0}function f_(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function ks(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?f_(n):null}catch{return T&&m.error(`Cannot extract url for event ${Gt(e)}`),null}}function p_(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function h_(e,t,n,r,s,o){if(!s.exception?.values||!o||!_t(o.originalException,Error))return;const i=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;i&&(s.exception.values=ii(e,t,r,o.originalException,n,s.exception.values,i,0))}function ii(e,t,n,r,s,o,i,a){if(o.length>=n+1)return o;let c=[...o];if(_t(r[s],Error)){Wc(i,a);const u=e(t,r[s]),d=c.length;jc(u,s,d,a),c=ii(e,t,n,r[s],s,[u,...c],u,d)}return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if(_t(u,Error)){Wc(i,a);const l=e(t,u),p=c.length;jc(l,`errors[${d}]`,p,a),c=ii(e,t,n,u,s,[l,...c],l,p)}}),c}function Wc(e,t){e.mechanism={handled:!0,type:"auto.core.linked_errors",...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function jc(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}const Md=new Map,zc=new Set;function m_(e){if($._sentryModuleMetadata)for(const t of Object.keys($._sentryModuleMetadata)){const n=$._sentryModuleMetadata[t];if(zc.has(t))continue;zc.add(t);const r=e(t);for(const s of r.reverse())if(s.filename){Md.set(s.filename,n);break}}}function g_(e,t){return m_(e),Md.get(t)}function Od(e,t){t.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(r=>{if(!r.filename||r.module_metadata)return;const s=g_(e,r.filename);s&&(r.module_metadata=s)})})}function Nd(e){e.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(n=>{delete n.module_metadata})})}const jC=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{rn(t,(n,r)=>{if(r==="event"){const s=Array.isArray(n)?n[1]:void 0;s&&(Nd(s),n[1]=s)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;const n=e.getOptions().stackParser;Od(n,t)})}});function ra(e){const t="console";Bt(t,e),Ut(t,__)}function __(){"console"in $&&Pi.forEach(function(e){e in $.console&&we($.console,e,function(t){return gs[e]=t,function(...n){ze("console",{args:n,level:e}),gs[e]?.apply($.console,n)}})})}function sa(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const y_="CaptureConsole",S_=((e={})=>{const t=e.levels||Pi,n=e.handled??!0;return{name:y_,setup(r){"console"in $&&ra(({args:s,level:o})=>{x()!==r||!t.includes(o)||b_(s,o,n)})}}}),zC=S_;function b_(e,t,n){const r={level:sa(t),extra:{arguments:e}};et(s=>{if(s.addEventProcessor(a=>(a.logger="console",yt(a,{handled:n,type:"auto.core.capture_console"}),a)),t==="assert"){if(!e[0]){const a=`Assertion failed: ${_s(e.slice(1)," ")||"console.assert"}`;s.setExtra("arguments",e.slice(1)),si(a,r)}return}const o=e.find(a=>a instanceof Error);if(o){ke(o,r);return}const i=_s(e," ");si(i,r)})}const E_="Dedupe",v_=(()=>{let e;return{name:E_,processEvent(t){if(t.type)return t;try{if(I_(t,e))return T&&m.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),T_=v_;function I_(e,t){return t?!!(w_(e,t)||k_(e,t)):!1}function w_(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Pd(e,t)||!Ld(e,t))}function k_(e,t){const n=qc(t),r=qc(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Pd(e,t)||!Ld(e,t))}function Ld(e,t){let n=Ko(e),r=Ko(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const o=r[s],i=n[s];if(o.filename!==i.filename||o.lineno!==i.lineno||o.colno!==i.colno||o.function!==i.function)return!1}return!0}function Pd(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 qc(e){return e.exception?.values?.[0]}const C_="ExtraErrorData",R_=((e={})=>{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:C_,processEvent(r,s,o){const{maxValueLength:i}=o.getOptions();return A_(r,s,t,n,i)}}}),qC=R_;function A_(e,t={},n,r,s){if(!t.originalException||!Nt(t.originalException))return e;const o=t.originalException.name||t.originalException.constructor.name,i=Dd(t.originalException,r,s);if(i){const a={...e.contexts},c=$e(i,n);return it(c)&&(De(c,"__sentry_skip_normalization__",!0),a[o]=c),{...e,contexts:a}}return e}function Dd(e,t,n){try{const r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],s={};for(const o of Object.keys(e)){if(r.indexOf(o)!==-1)continue;const i=e[o];s[o]=Nt(i)||typeof i=="string"?n?In(`${i}`,n):`${i}`:i}if(t&&e.cause!==void 0)if(Nt(e.cause)){const o=e.cause.name||e.cause.constructor.name;s.cause={[o]:Dd(e.cause,!1,n)}}else s.cause=e.cause;if(typeof e.toJSON=="function"){const o=e.toJSON();for(const i of Object.keys(o)){const a=o[i];s[i]=Nt(a)?a.toString():a}}return s}catch(r){T&&m.error("Unable to extract extra data from the Error object:",r)}return null}function x_(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const s=e[r];s==="."?e.splice(r,1):s===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}const M_=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function O_(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=M_.exec(t);return n?n.slice(1):[]}function Gc(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const s=r>=0?e[r]:"/";s&&(t=`${s}/${t}`,n=s.charAt(0)==="/")}return t=x_(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function Vc(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 N_(e,t){e=Gc(e).slice(1),t=Gc(t).slice(1);const n=Vc(e.split("/")),r=Vc(t.split("/")),s=Math.min(n.length,r.length);let o=s;for(let a=0;a<s;a++)if(n[a]!==r[a]){o=a;break}let i=[];for(let a=o;a<n.length;a++)i.push("..");return i=i.concat(r.slice(o)),i.join("/")}function L_(e,t){return O_(e)[2]||""}const P_="RewriteFrames",GC=(e={})=>{const t=e.root,n=e.prefix||"app:///",r="window"in $&&!!$.window,s=e.iteratee||D_({isBrowser:r,root:t,prefix:n});function o(a){try{return{...a,exception:{...a.exception,values:a.exception.values.map(c=>({...c,...c.stacktrace&&{stacktrace:i(c.stacktrace)}}))}}}catch{return a}}function i(a){return{...a,frames:a?.frames?.map(c=>s(c))}}return{name:P_,processEvent(a){let c=a;return a.exception&&Array.isArray(a.exception.values)&&(c=o(c)),c}}};function D_({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;const s=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),o=/^\//.test(r.filename);if(e){if(t){const i=r.filename;i.indexOf(t)===0&&(r.filename=i.replace(t,n))}}else if(s||o){const i=s?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,a=t?N_(t,i):L_(i);r.filename=`${n}${a}`}return r}}const F_=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],$_=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],B_={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"},Fd=["select","insert","upsert","update","delete"];function no(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function ro(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function U_(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 H_(e,t){if(t===""||t==="*")return"select(*)";if(e==="select")return`select(${t})`;if(e==="or"||e.endsWith(".or"))return`${e}${t}`;const[n,...r]=t.split(".");let s;return n?.startsWith("fts")?s="textSearch":n?.startsWith("plfts")?s="textSearch[plain]":n?.startsWith("phfts")?s="textSearch[phrase]":n?.startsWith("wfts")?s="textSearch[websearch]":s=n&&B_[n]||"filter",`${s}(${e}, ${r.join(".")})`}function Yc(e,t=!1){return new Proxy(e,{apply(n,r,s){return zn({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[de]:"auto.db.supabase",[Ge]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},o=>Reflect.apply(n,r,s).then(i=>(i&&typeof i=="object"&&"error"in i&&i.error?(o.setStatus({code:ne}),ke(i.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):o.setStatus({code:Wi}),o.end(),i)).catch(i=>{throw o.setStatus({code:ne}),o.end(),ke(i,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),i}).then(...s))}})}function W_(e){const t=e.auth;if(!(!t||ro(e.auth))){for(const n of F_){const r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=Yc(r))}for(const n of $_){const r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=Yc(r,!0))}no(e.auth)}}function j_(e){ro(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(t,n,r){const s=Reflect.apply(t,n,r),o=s.constructor;return q_(o),s}}),no(e.prototype.from))}function z_(e){ro(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(t,n,r){const s=Fd,o=n,i=U_(o.method,o.headers);if(!s.includes(i)||!o?.url?.pathname||typeof o.url.pathname!="string")return Reflect.apply(t,n,r);const a=o.url.pathname.split("/"),c=a.length>0?a[a.length-1]:"",u=[];for(const[f,h]of o.url.searchParams.entries())u.push(H_(f,h));const d=Object.create(null);if(it(o.body))for(const[f,h]of Object.entries(o.body))d[f]=h;const l=`${i==="select"?"":`${i}${d?"(...) ":""}`}${u.join(" ")} from(${c})`,p={"db.table":c,"db.schema":o.schema,"db.url":o.url.origin,"db.sdk":o.headers["X-Client-Info"],"db.system":"postgresql","db.operation":i,[de]:"auto.db.supabase",[Ge]:"db"};return u.length&&(p["db.query"]=u),Object.keys(d).length&&(p["db.body"]=d),zn({name:l,attributes:p},f=>Reflect.apply(t,n,[]).then(h=>{if(f&&(h&&typeof h=="object"&&"status"in h&&ys(f,h.status||500),f.end()),h.error){const y=new Error(h.error.message);h.error.code&&(y.code=h.error.code),h.error.details&&(y.details=h.error.details);const S={};u.length&&(S.query=u),Object.keys(d).length&&(S.body=d),ke(y,O=>(O.addEventProcessor(v=>(yt(v,{handled:!1,type:"auto.db.supabase.postgres"}),v)),O.setContext("supabase",S),O))}const g={type:"supabase",category:`db.${i}`,message:l},_={};return u.length&&(_.query=u),Object.keys(d).length&&(_.body=d),Object.keys(_).length&&(g.data=_),Et(g),h},h=>{throw f&&(ys(f,500),f.end()),h}).then(...r))}}),no(e.prototype.then))}function q_(e){for(const t of Fd)ro(e.prototype[t])||(e.prototype[t]=new Proxy(e.prototype[t],{apply(n,r,s){const o=Reflect.apply(n,r,s),i=o.constructor;return T&&m.log(`Instrumenting ${t} operation's PostgRESTFilterBuilder`),z_(i),o}}),no(e.prototype[t]))}const G_=e=>{if(!e){T&&m.warn("Supabase integration was not installed because no Supabase client was provided.");return}const t=e.constructor===Function?e:e.constructor;j_(t),W_(e)},V_="Supabase",Y_=(e=>({setupOnce(){G_(e)},name:V_})),VC=e=>Y_(e.supabaseClient),J_=10,K_="ZodErrors";function X_(e){return Nt(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function Q_(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 Z_(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function ey(e){const t=new Set;for(const r of e.issues){const s=Z_(r.path);s.length>0&&t.add(s)}const n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){const s=e.issues[0];s!==void 0&&"expected"in s&&typeof s.expected=="string"&&(r=s.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${In(n.join(", "),100)}`}function ty(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!X_(r.originalException)||r.originalException.issues.length===0)return n;try{const o=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(Q_);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:o})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:ey(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":o.slice(0,e)}}}catch(s){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:s instanceof Error?`${s.name}: ${s.message}
18
+ ${s.stack}`:"unknown"}}}}}const ny=((e={})=>{const t=e.limit??J_;return{name:K_,processEvent(n,r){return ty(t,e.saveZodIssuesAsAttachment,n,r)}}}),YC=ny,JC=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{rn(n,(r,s)=>{if(s==="event"){const o=Array.isArray(r)?r[1]:void 0;o&&(Nd(o),r[1]=o)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;const r=t.getOptions().stackParser;Od(r,n)})},processEvent(t){const n=ry(t);if(n){const r=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(n[r](o=>!o.some(i=>e.filterKeys.includes(i)))){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 ry(e){const t=Ko(e);if(t)return t.filter(n=>!!n.filename&&(n.lineno??n.colno)!=null).map(n=>n.module_metadata?Object.keys(n.module_metadata).filter(r=>r.startsWith(Jc)).map(r=>r.slice(Jc.length)):[])}const Jc="_sentryBundlerPluginAppKey:",sy=100,oy=10,Fr="flag.evaluation.";function Gn(e){const n=q().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function sn(e,t,n=sy){const r=q().getScopeData().contexts;r.flags||(r.flags={values:[]});const s=r.flags.values;iy(s,e,t,n)}function iy(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){T&&m.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}const s=e.findIndex(o=>o.flag===t);s!==-1&&e.splice(s,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function on(e,t,n=oy){if(typeof t!="boolean")return;const r=be();if(!r)return;const s=z(r).data;if(`${Fr}${e}`in s){r.setAttribute(`${Fr}${e}`,t);return}Object.keys(s).filter(i=>i.startsWith(Fr)).length<n&&r.setAttribute(`${Fr}${e}`,t)}const KC=()=>({name:"FeatureFlags",processEvent(e,t,n){return Gn(e)},addFeatureFlag(e,t){sn(e,t),on(e,t)}}),ay=({growthbookClass:e})=>({name:"GrowthBook",setupOnce(){const t=e.prototype;typeof t.isOn=="function"&&we(t,"isOn",Kc),typeof t.getFeatureValue=="function"&&we(t,"getFeatureValue",Kc)},processEvent(t,n,r){return Gn(t)}});function Kc(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"&&(sn(n,r),on(n,r)),r}}function cy(e,t,n,r,s){if(!e.fetchData)return;const{method:o,url:i}=e.fetchData,a=qe()&&t(i);if(e.endTimestamp&&a){const f=e.fetchData.__span;if(!f)return;const h=r[f];h&&(dy(h,e),uy(h,e,s),delete r[f]);return}const{spanOrigin:c="auto.http.browser",propagateTraceparent:u=!1}=typeof s=="object"?s:{spanOrigin:s},d=!!be(),l=a&&d?qn(py(i,o,c)):new bt;if(e.fetchData.__span=l.spanContext().spanId,r[l.spanContext().spanId]=l,n(e.fetchData.url)){const f=e.args[0],h=e.args[1]||{},g=ly(f,h,qe()&&d?l:void 0,u);g&&(e.args[1]=h,h.headers=g)}const p=x();if(p){const f={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};p.emit("beforeOutgoingRequestSpan",l,f)}return l}function uy(e,t,n){(typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function ly(e,t,n,r){const s=xd({span:n,propagateTraceparent:r}),o=s["sentry-trace"],i=s.baggage,a=s.traceparent;if(!o)return;const c=t.headers||(Ml(e)?e.headers:void 0);if(c)if(fy(c)){const u=new Headers(c);if(u.get("sentry-trace")||u.set("sentry-trace",o),r&&a&&!u.get("traceparent")&&u.set("traceparent",a),i){const d=u.get("baggage");d?$r(d)||u.set("baggage",`${d},${i}`):u.set("baggage",i)}return u}else if(Array.isArray(c)){const u=[...c];c.find(l=>l[0]==="sentry-trace")||u.push(["sentry-trace",o]),r&&a&&!c.find(l=>l[0]==="traceparent")&&u.push(["traceparent",a]);const d=c.find(l=>l[0]==="baggage"&&$r(l[1]));return i&&!d&&u.push(["baggage",i]),u}else{const u="sentry-trace"in c?c["sentry-trace"]:void 0,d="traceparent"in c?c.traceparent:void 0,l="baggage"in c?c.baggage:void 0,p=l?Array.isArray(l)?[...l]:[l]:[],f=l&&(Array.isArray(l)?l.find(g=>$r(g)):$r(l));i&&!f&&p.push(i);const h={...c,"sentry-trace":u??o,baggage:p.length>0?p.join(","):void 0};return r&&a&&!d&&(h.traceparent=a),h}else return{...s}}function dy(e,t){if(t.response){ys(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:ne,message:"internal_error"});e.end()}function $r(e){return e.split(",").some(t=>t.trim().startsWith(ji))}function fy(e){return typeof Headers<"u"&&_t(e,Headers)}function py(e,t,n){const r=na(e);return{name:r?`${t} ${jg(r)}`:t,attributes:hy(e,r,t,n)}}function hy(e,t,n,r){const s={url:e,type:"fetch","http.method":n,[de]:r,[Ge]:"http.client"};return t&&(ta(t)||(s["http.url"]=t.href,s["server.address"]=t.host),t.search&&(s["http.query"]=t.search),t.hash&&(s["http.fragment"]=t.hash)),s}function my(e,t={},n=q()){const{message:r,name:s,email:o,url:i,source:a,associatedEventId:c,tags:u}=e,d={contexts:{feedback:{contact_email:o,name:s,message:r,url:i,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:u},l=n?.getClient()||x();return l&&l.emit("beforeSendFeedback",d,t),n.captureEvent(d,t)}function Vn(e,t,n,r,s){ws({level:e,message:t,attributes:n,severityNumber:s},r)}function gy(e,t,{scope:n}={}){Vn("trace",e,t,n)}function _y(e,t,{scope:n}={}){Vn("debug",e,t,n)}function yy(e,t,{scope:n}={}){Vn("info",e,t,n)}function Sy(e,t,{scope:n}={}){Vn("warn",e,t,n)}function by(e,t,{scope:n}={}){Vn("error",e,t,n)}function Ey(e,t,{scope:n}={}){Vn("fatal",e,t,n)}const XC=Object.freeze(Object.defineProperty({__proto__:null,debug:_y,error:by,fatal:Ey,fmt:Vg,info:yy,trace:gy,warn:Sy},Symbol.toStringTag,{value:"Module"}));function ai(e,t,n){return"util"in $&&typeof $.util.format=="function"?$.util.format(...e):vy(e,t,n)}function vy(e,t,n){return e.map(r=>Dt(r)?String(r):JSON.stringify($e(r,t,n))).join(" ")}function Ty(e){return/%[sdifocO]/.test(e)}function Iy(e,t){const n={},r=new Array(t.length).fill("{}").join(" ");return n["sentry.message.template"]=`${e} ${r}`,t.forEach((s,o)=>{n[`sentry.message.parameter.${o}`]=s}),n}const wy="ConsoleLogs",Xc={[de]:"auto.log.console"},ky=((e={})=>{const t=e.levels||Pi;return{name:wy,setup(n){const{enableLogs:r,normalizeDepth:s=3,normalizeMaxBreadth:o=1e3}=n.getOptions();if(!r){T&&m.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}ra(({args:i,level:a})=>{if(x()!==n||!t.includes(a))return;const c=i[0],u=i.slice(1);if(a==="assert"){if(!c){const f=u.length>0?`Assertion failed: ${ai(u,s,o)}`:"Assertion failed";ws({level:"error",message:f,attributes:Xc})}return}const d=a==="log",l=i.length>1&&typeof i[0]=="string"&&!Ty(i[0]),p={...Xc,...l?Iy(c,u):{}};ws({level:d?"info":a,message:ai(i,s,o),severityNumber:d?10:void 0,attributes:p})})}}}),QC=ky;function oa(e,t,n,r){Eg({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function Cy(e,t=1,n){oa("counter",e,t,n)}function Ry(e,t,n){oa("gauge",e,t,n)}function Ay(e,t,n){oa("distribution",e,t,n)}const ZC=Object.freeze(Object.defineProperty({__proto__:null,count:Cy,distribution:Ay,gauge:Ry},Symbol.toStringTag,{value:"Module"})),xy=["trace","debug","info","warn","error","fatal"];function eR(e={}){const t=new Set(e.levels??xy),n=e.client;return{log(r){const{type:s,level:o,message:i,args:a,tag:c,date:u,...d}=r,l=n||x();if(!l)return;const p=Ny(s,o);if(!t.has(p))return;const{normalizeDepth:f=3,normalizeMaxBreadth:h=1e3}=l.getOptions(),g=[];i&&g.push(i),a&&a.length>0&&g.push(ai(a,f,h));const _=g.join(" ");d["sentry.origin"]="auto.log.consola",c&&(d["consola.tag"]=c),s&&(d["consola.type"]=s),o!=null&&typeof o=="number"&&(d["consola.level"]=o),ws({level:p,message:_,attributes:d})}}}const My={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"},Oy={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};function Ny(e,t){if(e==="verbose")return"debug";if(e==="silent")return"trace";if(e){const n=My[e];if(n)return n}if(typeof t=="number"){const n=Oy[t];if(n)return n}return"info"}const Ly="gen_ai.prompt",ia="gen_ai.system",Qe="gen_ai.request.model",$d="gen_ai.request.stream",aa="gen_ai.request.temperature",Bd="gen_ai.request.max_tokens",ca="gen_ai.request.frequency_penalty",Ud="gen_ai.request.presence_penalty",ua="gen_ai.request.top_p",Hd="gen_ai.request.top_k",Yn="gen_ai.response.finish_reasons",Er="gen_ai.response.model",vr="gen_ai.response.id",so="gen_ai.usage.input_tokens",oo="gen_ai.usage.output_tokens",io="gen_ai.usage.total_tokens",la="gen_ai.operation.name",en="gen_ai.request.messages",at="gen_ai.response.text",da="gen_ai.request.available_tools",ao="gen_ai.response.streaming",jt="gen_ai.response.tool_calls",Py="openai.response.id",Dy="openai.response.model",Fy="openai.response.timestamp",$y="openai.usage.completion_tokens",By="openai.usage.prompt_tokens",Qc={CHAT:"chat",RESPONSES:"responses"},Zc="anthropic.response.timestamp",Uy=2e4,Cs=e=>new TextEncoder().encode(e).length,Rs=e=>Cs(JSON.stringify(e));function Wd(e,t){if(Cs(e)<=t)return e;let n=0,r=e.length,s="";for(;n<=r;){const o=Math.floor((n+r)/2),i=e.slice(0,o);Cs(i)<=t?(s=i,n=o+1):r=o-1}return s}function Hy(e){return typeof e=="string"?e:e.text}function eu(e,t){return typeof e=="string"?t:{...e,text:t}}function Wy(e){return e!==null&&typeof e=="object"&&"content"in e&&typeof e.content=="string"}function jy(e){return e!==null&&typeof e=="object"&&"parts"in e&&Array.isArray(e.parts)&&e.parts.length>0}function zy(e,t){const n={...e,content:""},r=Rs(n),s=t-r;if(s<=0)return[];const o=Wd(e.content,s);return[{...e,content:o}]}function qy(e,t){const{parts:n}=e,r=n.map(a=>eu(a,"")),s=Rs({...e,parts:r});let o=t-s;if(o<=0)return[];const i=[];for(const a of n){const c=Hy(a),u=Cs(c);if(u<=o)i.push(a),o-=u;else if(i.length===0){const d=Wd(c,o);d&&i.push(eu(a,d));break}else break}return i.length>0?[{...e,parts:i}]:[]}function Gy(e,t){return!e||typeof e!="object"?[]:Wy(e)?zy(e,t):jy(e)?qy(e,t):[]}function Vy(e,t){if(!Array.isArray(e)||e.length===0||Rs(e)<=t)return e;const r=e.map(Rs);let s=0,o=e.length;for(let i=e.length-1;i>=0;i--){const a=r[i];if(a&&s+a>t)break;a&&(s+=a),o=i}if(o===e.length){const i=e[e.length-1];return Gy(i,t)}return e.slice(o)}function Yy(e){return Vy(e,Uy)}function Tr(e){return e.includes("messages")?"messages":e.includes("completions")?"completions":e.includes("models")?"models":e.includes("chat")?"chat":e.split(".").pop()||"unknown"}function As(e){return`gen_ai.${Tr(e)}`}function jd(e,t){return e?`${e}.${t}`:t}function fa(e,t,n,r,s){if(t!==void 0&&e.setAttributes({[so]:t}),n!==void 0&&e.setAttributes({[oo]:n}),t!==void 0||n!==void 0||r!==void 0||s!==void 0){const o=(t??0)+(n??0)+(r??0)+(s??0);e.setAttributes({[io]:o})}}function tn(e){if(typeof e=="string")return e;if(Array.isArray(e)){const t=Yy(e);return JSON.stringify(t)}return JSON.stringify(e)}const Jy="OpenAI",Ky=["responses.create","chat.completions.create"],Xy=["response.output_item.added","response.function_call_arguments.delta","response.function_call_arguments.done","response.output_item.done"],Qy=["response.created","response.in_progress","response.failed","response.completed","response.incomplete","response.queued","response.output_text.delta",...Xy];function pa(e){return e.includes("chat.completions")?Qc.CHAT:e.includes("responses")?Qc.RESPONSES:e.split(".").pop()||"unknown"}function tu(e){return`gen_ai.${pa(e)}`}function Zy(e){return Ky.includes(e)}function eS(e,t){return e?`${e}.${t}`:t}function tS(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion"}function nS(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="response"}function rS(e){return e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.startsWith("response.")}function sS(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion.chunk"}function ha(e,t,n,r){t!==void 0&&e.setAttributes({[By]:t,[so]:t}),n!==void 0&&e.setAttributes({[$y]:n,[oo]:n}),r!==void 0&&e.setAttributes({[io]:r})}function ma(e,t,n,r){e.setAttributes({[Py]:t,[vr]:t}),e.setAttributes({[Dy]:n,[Er]:n}),e.setAttributes({[Fy]:new Date(r*1e3).toISOString()})}function oS(e,t){for(const n of e){const r=n.index;if(!(r===void 0||!n.function))if(!(r in t.chatCompletionToolCalls))t.chatCompletionToolCalls[r]={...n,function:{name:n.function.name,arguments:n.function.arguments||""}};else{const s=t.chatCompletionToolCalls[r];n.function.arguments&&s?.function&&(s.function.arguments+=n.function.arguments)}}}function iS(e,t,n){t.responseId=e.id??t.responseId,t.responseModel=e.model??t.responseModel,t.responseTimestamp=e.created??t.responseTimestamp,e.usage&&(t.promptTokens=e.usage.prompt_tokens,t.completionTokens=e.usage.completion_tokens,t.totalTokens=e.usage.total_tokens);for(const r of e.choices??[])n&&(r.delta?.content&&t.responseTexts.push(r.delta.content),r.delta?.tool_calls&&oS(r.delta.tool_calls,t)),r.finish_reason&&t.finishReasons.push(r.finish_reason)}function aS(e,t,n,r){if(!(e&&typeof e=="object")){t.eventTypes.push("unknown:non-object");return}if(e instanceof Error){r.setStatus({code:ne,message:"internal_error"}),ke(e,{mechanism:{handled:!1,type:"auto.ai.openai.stream-response"}});return}if(!("type"in e))return;const s=e;if(!Qy.includes(s.type)){t.eventTypes.push(s.type);return}if(n&&(s.type==="response.output_item.done"&&"item"in s&&t.responsesApiToolCalls.push(s.item),s.type==="response.output_text.delta"&&"delta"in s&&s.delta)){t.responseTexts.push(s.delta);return}if("response"in s){const{response:o}=s;t.responseId=o.id??t.responseId,t.responseModel=o.model??t.responseModel,t.responseTimestamp=o.created_at??t.responseTimestamp,o.usage&&(t.promptTokens=o.usage.input_tokens,t.completionTokens=o.usage.output_tokens,t.totalTokens=o.usage.total_tokens),o.status&&t.finishReasons.push(o.status),n&&o.output_text&&t.responseTexts.push(o.output_text)}}async function*cS(e,t,n){const r={eventTypes:[],responseTexts:[],finishReasons:[],responseId:"",responseModel:"",responseTimestamp:0,promptTokens:void 0,completionTokens:void 0,totalTokens:void 0,chatCompletionToolCalls:{},responsesApiToolCalls:[]};try{for await(const s of e)sS(s)?iS(s,r,n):rS(s)&&aS(s,r,n,t),yield s}finally{ma(t,r.responseId,r.responseModel,r.responseTimestamp),ha(t,r.promptTokens,r.completionTokens,r.totalTokens),t.setAttributes({[ao]:!0}),r.finishReasons.length&&t.setAttributes({[Yn]:JSON.stringify(r.finishReasons)}),n&&r.responseTexts.length&&t.setAttributes({[at]:r.responseTexts.join("")});const o=[...Object.values(r.chatCompletionToolCalls),...r.responsesApiToolCalls];o.length>0&&t.setAttributes({[jt]:JSON.stringify(o)}),t.end()}}function uS(e,t){const n={[ia]:"openai",[la]:pa(t),[de]:"auto.ai.openai"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=e[0],s=Array.isArray(r.tools)?r.tools:[],i=r.web_search_options&&typeof r.web_search_options=="object"?[{type:"web_search_options",...r.web_search_options}]:[],a=[...s,...i];a.length>0&&(n[da]=JSON.stringify(a))}if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=e[0];n[Qe]=r.model??"unknown","temperature"in r&&(n[aa]=r.temperature),"top_p"in r&&(n[ua]=r.top_p),"frequency_penalty"in r&&(n[ca]=r.frequency_penalty),"presence_penalty"in r&&(n[Ud]=r.presence_penalty),"stream"in r&&(n[$d]=r.stream)}else n[Qe]="unknown";return n}function lS(e,t,n){if(ma(e,t.id,t.model,t.created),t.usage&&ha(e,t.usage.prompt_tokens,t.usage.completion_tokens,t.usage.total_tokens),Array.isArray(t.choices)){const r=t.choices.map(s=>s.finish_reason).filter(s=>s!==null);if(r.length>0&&e.setAttributes({[Yn]:JSON.stringify(r)}),n){const s=t.choices.map(o=>o.message?.tool_calls).filter(o=>Array.isArray(o)&&o.length>0).flat();s.length>0&&e.setAttributes({[jt]:JSON.stringify(s)})}}}function dS(e,t,n){if(ma(e,t.id,t.model,t.created_at),t.status&&e.setAttributes({[Yn]:JSON.stringify([t.status])}),t.usage&&ha(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.total_tokens),n){const r=t;if(Array.isArray(r.output)&&r.output.length>0){const s=r.output.filter(o=>typeof o=="object"&&o!==null&&o.type==="function_call");s.length>0&&e.setAttributes({[jt]:JSON.stringify(s)})}}}function fS(e,t,n){if(!t||typeof t!="object")return;const r=t;if(tS(r)){if(lS(e,r,n),n&&r.choices?.length){const s=r.choices.map(o=>o.message?.content||"");e.setAttributes({[at]:JSON.stringify(s)})}}else nS(r)&&(dS(e,r,n),n&&r.output_text&&e.setAttributes({[at]:r.output_text}))}function nu(e,t){if("messages"in t){const n=tn(t.messages);e.setAttributes({[en]:n})}if("input"in t){const n=tn(t.input);e.setAttributes({[en]:n})}}function pS(){const t=q().getClient(),n=t?.getIntegrationByName(Jy),r=n?!!t?.getOptions().sendDefaultPii:!1;return{recordInputs:n?.options?.recordInputs??r,recordOutputs:n?.options?.recordOutputs??r}}function hS(e,t,n,r){return async function(...o){const i=r||pS(),a=uS(o,t),c=a[Qe]||"unknown",u=pa(t),d=o[0];return d&&typeof d=="object"&&d.stream===!0?Is({name:`${u} ${c} stream-response`,op:tu(t),attributes:a},async p=>{try{i.recordInputs&&o[0]&&typeof o[0]=="object"&&nu(p,o[0]);const f=await e.apply(n,o);return cS(f,p,i.recordOutputs??!1)}catch(f){throw p.setStatus({code:ne,message:"internal_error"}),ke(f,{mechanism:{handled:!1,type:"auto.ai.openai.stream",data:{function:t}}}),p.end(),f}}):zn({name:`${u} ${c}`,op:tu(t),attributes:a},async p=>{try{i.recordInputs&&o[0]&&typeof o[0]=="object"&&nu(p,o[0]);const f=await e.apply(n,o);return fS(p,f,i.recordOutputs),f}catch(f){throw ke(f,{mechanism:{handled:!1,type:"auto.ai.openai",data:{function:t}}}),f}})}}function zd(e,t="",n){return new Proxy(e,{get(r,s){const o=r[s],i=eS(t,String(s));return typeof o=="function"&&Zy(i)?hS(o,i,r,n):typeof o=="function"?o.bind(r):o&&typeof o=="object"?zd(o,i,n):o}})}function tR(e,t){return zd(e,"",t)}function mS(e,t){return"type"in e&&typeof e.type=="string"&&e.type==="error"?(t.setStatus({code:ne,message:e.error?.type??"internal_error"}),ke(e.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}),!0):!1}function gS(e,t){if(e.type==="message_delta"&&e.usage&&"output_tokens"in e.usage&&typeof e.usage.output_tokens=="number"&&(t.completionTokens=e.usage.output_tokens),e.message){const n=e.message;n.id&&(t.responseId=n.id),n.model&&(t.responseModel=n.model),n.stop_reason&&t.finishReasons.push(n.stop_reason),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 _S(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 yS(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"){const r=t.activeToolBlocks[e.index];r&&r.inputJsonParts.push(e.delta.partial_json)}n&&typeof e.delta.text=="string"&&t.responseTexts.push(e.delta.text)}}function SS(e,t){if(e.type!=="content_block_stop"||typeof e.index!="number")return;const n=t.activeToolBlocks[e.index];if(!n)return;const r=n.inputJsonParts.join("");let s;try{s=r?JSON.parse(r):{}}catch{s={__unparsed:r}}t.toolCalls.push({type:"tool_use",id:n.id,name:n.name,input:s}),delete t.activeToolBlocks[e.index]}function qd(e,t,n,r){!(e&&typeof e=="object")||mS(e,r)||(gS(e,t),_S(e,t),yS(e,t,n),SS(e,t))}function bS(e,t,n){t.isRecording()&&(e.responseId&&t.setAttributes({[vr]:e.responseId}),e.responseModel&&t.setAttributes({[Er]:e.responseModel}),fa(t,e.promptTokens,e.completionTokens,e.cacheCreationInputTokens,e.cacheReadInputTokens),t.setAttributes({[ao]:!0}),e.finishReasons.length>0&&t.setAttributes({[Yn]:JSON.stringify(e.finishReasons)}),n&&e.responseTexts.length>0&&t.setAttributes({[at]:e.responseTexts.join("")}),n&&e.toolCalls.length>0&&t.setAttributes({[jt]:JSON.stringify(e.toolCalls)}),t.end())}async function*ES(e,t,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};try{for await(const s of e)qd(s,r,n,t),yield s}finally{r.responseId&&t.setAttributes({[vr]:r.responseId}),r.responseModel&&t.setAttributes({[Er]:r.responseModel}),fa(t,r.promptTokens,r.completionTokens,r.cacheCreationInputTokens,r.cacheReadInputTokens),t.setAttributes({[ao]:!0}),r.finishReasons.length>0&&t.setAttributes({[Yn]:JSON.stringify(r.finishReasons)}),n&&r.responseTexts.length>0&&t.setAttributes({[at]:r.responseTexts.join("")}),n&&r.toolCalls.length>0&&t.setAttributes({[jt]:JSON.stringify(r.toolCalls)}),t.end()}}function vS(e,t,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};return e.on("streamEvent",s=>{qd(s,r,n,t)}),e.on("message",()=>{bS(r,t,n)}),e.on("error",s=>{ke(s,{mechanism:{handled:!1,type:"auto.ai.anthropic.stream_error"}}),t.isRecording()&&(t.setStatus({code:ne,message:"stream_error"}),t.end())}),e}const TS=["messages.create","messages.stream","messages.countTokens","models.get","completions.create","models.retrieve","beta.messages.create"];function IS(e){return TS.includes(e)}function wS(e,t){t.error&&(e.setStatus({code:ne,message:t.error.type||"internal_error"}),ke(t.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}))}function kS(e,t){const n={[ia]:"anthropic",[la]:Tr(t),[de]:"auto.ai.anthropic"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=e[0];r.tools&&Array.isArray(r.tools)&&(n[da]=JSON.stringify(r.tools)),n[Qe]=r.model??"unknown","temperature"in r&&(n[aa]=r.temperature),"top_p"in r&&(n[ua]=r.top_p),"stream"in r&&(n[$d]=r.stream),"top_k"in r&&(n[Hd]=r.top_k),"frequency_penalty"in r&&(n[ca]=r.frequency_penalty),"max_tokens"in r&&(n[Bd]=r.max_tokens)}else t==="models.retrieve"||t==="models.get"?n[Qe]=e[0]:n[Qe]="unknown";return n}function ci(e,t){if("messages"in t){const n=tn(t.messages);e.setAttributes({[en]:n})}if("input"in t){const n=tn(t.input);e.setAttributes({[en]:n})}"prompt"in t&&e.setAttributes({[Ly]:JSON.stringify(t.prompt)})}function CS(e,t){if("content"in t&&Array.isArray(t.content)){e.setAttributes({[at]:t.content.map(r=>r.text).filter(r=>!!r).join("")});const n=[];for(const r of t.content)(r.type==="tool_use"||r.type==="server_tool_use")&&n.push(r);n.length>0&&e.setAttributes({[jt]:JSON.stringify(n)})}"completion"in t&&e.setAttributes({[at]:t.completion}),"input_tokens"in t&&e.setAttributes({[at]:JSON.stringify(t.input_tokens)})}function RS(e,t){"id"in t&&"model"in t&&(e.setAttributes({[vr]:t.id,[Er]:t.model}),"created"in t&&typeof t.created=="number"&&e.setAttributes({[Zc]:new Date(t.created*1e3).toISOString()}),"created_at"in t&&typeof t.created_at=="number"&&e.setAttributes({[Zc]:new Date(t.created_at*1e3).toISOString()}),"usage"in t&&t.usage&&fa(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens))}function AS(e,t,n){if(!(!t||typeof t!="object")){if("type"in t&&t.type==="error"){wS(e,t);return}n&&CS(e,t),RS(e,t)}}function ru(e,t,n){throw ke(e,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:n}}}),t.isRecording()&&(t.setStatus({code:ne,message:"internal_error"}),t.end()),e}function xS(e,t,n,r,s,o,i,a,c,u,d){const l=s[Qe]??"unknown",p={name:`${o} ${l} stream-response`,op:As(i),attributes:s};return u&&!d?Is(p,async f=>{try{c.recordInputs&&a&&ci(f,a);const h=await e.apply(n,r);return ES(h,f,c.recordOutputs??!1)}catch(h){return ru(h,f,i)}}):Is(p,f=>{try{c.recordInputs&&a&&ci(f,a);const h=t.apply(n,r);return vS(h,f,c.recordOutputs??!1)}catch(h){return ru(h,f,i)}})}function MS(e,t,n,r){return new Proxy(e,{apply(s,o,i){const a=kS(i,t),c=a[Qe]??"unknown",u=Tr(t),d=typeof i[0]=="object"?i[0]:void 0,l=!!d?.stream,p=t==="messages.stream";return l||p?xS(e,s,n,i,a,u,t,d,r,l,p):zn({name:`${u} ${c}`,op:As(t),attributes:a},f=>(r.recordInputs&&d&&ci(f,d),Zs(()=>s.apply(n,i),h=>{ke(h,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:t}}})},()=>{},h=>AS(f,h,r.recordOutputs))))}})}function Gd(e,t="",n){return new Proxy(e,{get(r,s){const o=r[s],i=jd(t,String(s));return typeof o=="function"&&IS(i)?MS(o,i,r,n):typeof o=="function"?o.bind(r):o&&typeof o=="object"?Gd(o,i,n):o}})}function nR(e,t){const n=!!x()?.getOptions().sendDefaultPii,r={recordInputs:n,recordOutputs:n,...t};return Gd(e,"",r)}const su=["models.generateContent","models.generateContentStream","chats.create","sendMessage","sendMessageStream"],OS="google_genai",Vd="chats.create",NS="chat";function LS(e,t){const n=e?.promptFeedback;if(n?.blockReason){const r=n.blockReasonMessage??n.blockReason;return t.setStatus({code:ne,message:`Content blocked: ${r}`}),ke(`Content blocked: ${r}`,{mechanism:{handled:!1,type:"auto.ai.google_genai"}}),!0}return!1}function PS(e,t){typeof e.responseId=="string"&&(t.responseId=e.responseId),typeof e.modelVersion=="string"&&(t.responseModel=e.modelVersion);const 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 DS(e,t,n){Array.isArray(e.functionCalls)&&t.toolCalls.push(...e.functionCalls);for(const r of e.candidates??[]){r?.finishReason&&!t.finishReasons.includes(r.finishReason)&&t.finishReasons.push(r.finishReason);for(const s of r?.content?.parts??[])n&&s.text&&t.responseTexts.push(s.text),s.functionCall&&t.toolCalls.push({type:"function",id:s.functionCall.id,name:s.functionCall.name,arguments:s.functionCall.args})}}function FS(e,t,n,r){!e||LS(e,r)||(PS(e,t),DS(e,t,n))}async function*$S(e,t,n){const r={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(const s of e)FS(s,r,n,t),yield s}finally{const s={[ao]:!0};r.responseId&&(s[vr]=r.responseId),r.responseModel&&(s[Er]=r.responseModel),r.promptTokens!==void 0&&(s[so]=r.promptTokens),r.completionTokens!==void 0&&(s[oo]=r.completionTokens),r.totalTokens!==void 0&&(s[io]=r.totalTokens),r.finishReasons.length&&(s[Yn]=JSON.stringify(r.finishReasons)),n&&r.responseTexts.length&&(s[at]=r.responseTexts.join("")),n&&r.toolCalls.length&&(s[jt]=JSON.stringify(r.toolCalls)),t.setAttributes(s),t.end()}}function BS(e){if(su.includes(e))return!0;const t=e.split(".").pop();return su.includes(t)}function US(e){return e.includes("Stream")||e.endsWith("generateContentStream")||e.endsWith("sendMessageStream")}function ou(e,t){if("model"in e&&typeof e.model=="string")return e.model;if(t&&typeof t=="object"){const n=t;if("model"in n&&typeof n.model=="string")return n.model;if("modelVersion"in n&&typeof n.modelVersion=="string")return n.modelVersion}return"unknown"}function HS(e){const t={};return"temperature"in e&&typeof e.temperature=="number"&&(t[aa]=e.temperature),"topP"in e&&typeof e.topP=="number"&&(t[ua]=e.topP),"topK"in e&&typeof e.topK=="number"&&(t[Hd]=e.topK),"maxOutputTokens"in e&&typeof e.maxOutputTokens=="number"&&(t[Bd]=e.maxOutputTokens),"frequencyPenalty"in e&&typeof e.frequencyPenalty=="number"&&(t[ca]=e.frequencyPenalty),"presencePenalty"in e&&typeof e.presencePenalty=="number"&&(t[Ud]=e.presencePenalty),t}function WS(e,t,n){const r={[ia]:OS,[la]:Tr(e),[de]:"auto.ai.google_genai"};if(t){if(r[Qe]=ou(t,n),"config"in t&&typeof t.config=="object"&&t.config){const s=t.config;if(Object.assign(r,HS(s)),"tools"in s&&Array.isArray(s.tools)){const o=s.tools.map(i=>i.functionDeclarations);r[da]=JSON.stringify(o)}}}else r[Qe]=ou({},n);return r}function iu(e,t){if("contents"in t){const n=t.contents,r=tn(n);e.setAttributes({[en]:r})}if("message"in t){const n=t.message,r=tn(n);e.setAttributes({[en]:r})}if("history"in t){const n=t.history,r=tn(n);e.setAttributes({[en]:r})}}function jS(e,t,n){if(!(!t||typeof t!="object")){if(t.usageMetadata&&typeof t.usageMetadata=="object"){const r=t.usageMetadata;typeof r.promptTokenCount=="number"&&e.setAttributes({[so]:r.promptTokenCount}),typeof r.candidatesTokenCount=="number"&&e.setAttributes({[oo]:r.candidatesTokenCount}),typeof r.totalTokenCount=="number"&&e.setAttributes({[io]:r.totalTokenCount})}if(n&&Array.isArray(t.candidates)&&t.candidates.length>0){const r=t.candidates.map(s=>s.content?.parts&&Array.isArray(s.content.parts)?s.content.parts.map(o=>typeof o.text=="string"?o.text:"").filter(o=>o.length>0).join(""):"").filter(s=>s.length>0);r.length>0&&e.setAttributes({[at]:r.join("")})}if(n&&t.functionCalls){const r=t.functionCalls;Array.isArray(r)&&r.length>0&&e.setAttributes({[jt]:JSON.stringify(r)})}}}function au(e,t,n,r){const s=t===Vd;return new Proxy(e,{apply(o,i,a){const c=a[0],u=WS(t,c,n),d=u[Qe]??"unknown",l=Tr(t);return US(t)?Is({name:`${l} ${d} stream-response`,op:As(t),attributes:u},async p=>{try{r.recordInputs&&c&&iu(p,c);const f=await o.apply(n,a);return $S(f,p,!!r.recordOutputs)}catch(f){throw p.setStatus({code:ne,message:"internal_error"}),ke(f,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}}),p.end(),f}}):zn({name:s?`${l} ${d} create`:`${l} ${d}`,op:As(t),attributes:u},p=>(r.recordInputs&&c&&iu(p,c),Zs(()=>o.apply(n,a),f=>{ke(f,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}})},()=>{},f=>{s||jS(p,f,r.recordOutputs)})))}})}function ui(e,t="",n){return new Proxy(e,{get:(r,s,o)=>{const i=Reflect.get(r,s,o),a=jd(t,String(s));if(typeof i=="function"&&BS(a)){if(a===Vd){const c=au(i,a,r,n);return function(...d){const l=c(...d);return l&&typeof l=="object"?ui(l,NS,n):l}}return au(i,a,r,n)}return typeof i=="function"?i.bind(r):i&&typeof i=="object"?ui(i,a,n):i}})}function rR(e,t){const n=!!x()?.getOptions().sendDefaultPii,r={recordInputs:n,recordOutputs:n,...t};return ui(e,"",r)}function Yd(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const xn=$;function zS(){return"history"in xn&&!!xn.history}function qS(){if(!("fetch"in xn))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function li(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Jd(){if(typeof EdgeRuntime=="string")return!0;if(!qS())return!1;if(li(xn.fetch))return!0;let e=!1;const t=xn.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=li(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){T&&m.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function GS(){return"ReportingObserver"in xn}function ga(e,t){const n="fetch";Bt(n,e),Ut(n,()=>Kd(void 0,t))}function VS(e){const t="fetch-body-resolved";Bt(t,e),Ut(t,()=>Kd(JS))}function Kd(e,t=!1){t&&!Jd()||we($,"fetch",function(n){return function(...r){const s=new Error,{method:o,url:i}=KS(r),a={args:r,fetchData:{method:o,url:i},startTimestamp:he()*1e3,virtualError:s,headers:XS(r)};return e||ze("fetch",{...a}),n.apply($,r).then(async c=>(e?e(c):ze("fetch",{...a,endTimestamp:he()*1e3,response:c}),c),c=>{if(ze("fetch",{...a,endTimestamp:he()*1e3,error:c}),Nt(c)&&c.stack===void 0&&(c.stack=s.stack,De(c,"framesToPop",1)),c instanceof TypeError&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{const u=new URL(a.fetchData.url);c.message=`${c.message} (${u.host})`}catch{}throw c})}})}async function YS(e,t){if(e?.body){const n=e.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let o=!0;for(;o;){let i;try{i=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(i),a&&(t(),o=!1)}catch{o=!1}finally{clearTimeout(i)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}function JS(e){let t;try{t=e.clone()}catch{return}YS(t,()=>{ze("fetch-body-resolved",{endTimestamp:he()*1e3,response:e})})}function di(e,t){return!!e&&typeof e=="object"&&!!e[t]}function cu(e){return typeof e=="string"?e:e?di(e,"url")?e.url:e.toString?e.toString():"":""}function KS(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:cu(n),method:di(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:cu(t),method:di(t,"method")?String(t.method).toUpperCase():"GET"}}function XS(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(Ml(t))return new Headers(t.headers)}catch{}}function QS(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function ZS(){return"npm"}function eb(){return!QS()&&Object.prototype.toString.call(typeof tc<"u"?tc:0)==="[object process]"}function xs(){return typeof window<"u"&&(!eb()||tb())}function tb(){return $.process?.type==="renderer"}const Je=$,oe=Je.document,tr=Je.navigator,Xd="Report a Bug",nb="Cancel",rb="Send Bug Report",sb="Confirm",ob="Report a Bug",ib="your.email@example.org",ab="Email",cb="What's the bug? What did you expect?",ub="Description",lb="Your Name",db="Name",fb="Thank you for your report!",pb="(required)",hb="Add a screenshot",mb="Remove screenshot",gb="Highlight",_b="Hide",yb="Remove",Sb="widget",bb="api",Eb=5e3,vb=(e,t={includeReplay:!0})=>{if(!e.message)throw new Error("Unable to submit feedback with empty message");const n=x();if(!n)throw new Error("No client setup, cannot send feedback.");e.tags&&Object.keys(e.tags).length&&q().setTags(e.tags);const r=my({source:bb,url:un(),...e},t);return new Promise((s,o)=>{const i=setTimeout(()=>o("Unable to determine if Feedback was correctly sent."),3e4),a=n.on("afterSendEvent",(c,u)=>{if(c.event_id===r)return clearTimeout(i),a(),u?.statusCode&&u.statusCode>=200&&u.statusCode<300?s(r):u?.statusCode===403?o("Unable to send feedback. This could be because this domain is not in your list of allowed domains."):o("Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.")})})},is=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Tb(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(tr.userAgent)||/Macintosh/i.test(tr.userAgent)&&tr.maxTouchPoints&&tr.maxTouchPoints>1||!isSecureContext)}function Br(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 Ib(e){const t=oe.createElement("style");return t.textContent=`
19
19
  .widget__actor {
20
20
  position: fixed;
21
21
  z-index: var(--z-index);
@@ -66,7 +66,7 @@ ${s.stack}`:"unknown"}}}}}const by=((e={})=>{const t=e.limit??py;return{name:hy,
66
66
  display: none;
67
67
  }
68
68
  }
69
- `,e&&t.setAttribute("nonce",e),t}function He(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}const yn=20,jb="http://www.w3.org/2000/svg";function zb(){const e=a=>Ke.document.createElementNS(jb,a),t=He(e("svg"),{width:`${yn}`,height:`${yn}`,viewBox:`0 0 ${yn} ${yn}`,fill:"var(--actor-color, var(--foreground))"}),n=He(e("g"),{clipPath:"url(#clip0_57_80)"}),r=He(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);const s=e("defs"),o=He(e("clipPath"),{id:"clip0_57_80"}),i=He(e("rect"),{width:`${yn}`,height:`${yn}`,fill:"white"});return o.appendChild(i),s.appendChild(o),t.appendChild(s).appendChild(o).appendChild(i),t}function qb({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){const s=oe.createElement("button");if(s.type="button",s.className="widget__actor",s.ariaHidden="false",s.ariaLabel=t||e||ff,s.appendChild(zb()),e){const i=oe.createElement("span");i.appendChild(oe.createTextNode(e)),s.appendChild(i)}const o=Wb(r);return{el:s,appendToDom(){n.appendChild(o),n.appendChild(s)},removeFromDom(){s.remove(),o.remove()},show(){s.ariaHidden="false"},hide(){s.ariaHidden="true"}}}const pf="rgba(88, 74, 192, 1)",Gb={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:pf,successColor:"#268d75",errorColor:"#df3338",border:"1.5px solid rgba(41, 35, 47, 0.13)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(95%)"},Su={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:pf,successColor:"#2da98c",errorColor:"#f55459",border:"1.5px solid rgba(235, 230, 239, 0.15)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(150%)"};function bu(e){return`
69
+ `,e&&t.setAttribute("nonce",e),t}function Ue(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}const fn=20,wb="http://www.w3.org/2000/svg";function kb(){const e=a=>Je.document.createElementNS(wb,a),t=Ue(e("svg"),{width:`${fn}`,height:`${fn}`,viewBox:`0 0 ${fn} ${fn}`,fill:"var(--actor-color, var(--foreground))"}),n=Ue(e("g"),{clipPath:"url(#clip0_57_80)"}),r=Ue(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);const s=e("defs"),o=Ue(e("clipPath"),{id:"clip0_57_80"}),i=Ue(e("rect"),{width:`${fn}`,height:`${fn}`,fill:"white"});return o.appendChild(i),s.appendChild(o),t.appendChild(s).appendChild(o).appendChild(i),t}function Cb({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){const s=oe.createElement("button");if(s.type="button",s.className="widget__actor",s.ariaHidden="false",s.ariaLabel=t||e||Xd,s.appendChild(kb()),e){const i=oe.createElement("span");i.appendChild(oe.createTextNode(e)),s.appendChild(i)}const o=Ib(r);return{el:s,appendToDom(){n.appendChild(o),n.appendChild(s)},removeFromDom(){s.remove(),o.remove()},show(){s.ariaHidden="false"},hide(){s.ariaHidden="true"}}}const Qd="rgba(88, 74, 192, 1)",Rb={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:Qd,successColor:"#268d75",errorColor:"#df3338",border:"1.5px solid rgba(41, 35, 47, 0.13)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(95%)"},uu={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:Qd,successColor:"#2da98c",errorColor:"#f55459",border:"1.5px solid rgba(235, 230, 239, 0.15)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(150%)"};function lu(e){return`
70
70
  --foreground: ${e.foreground};
71
71
  --background: ${e.background};
72
72
  --accent-foreground: ${e.accentForeground};
@@ -77,7 +77,7 @@ ${s.stack}`:"unknown"}}}}}const by=((e={})=>{const t=e.limit??py;return{name:hy,
77
77
  --box-shadow: ${e.boxShadow};
78
78
  --outline: ${e.outline};
79
79
  --interactive-filter: ${e.interactiveFilter};
80
- `}function Vb({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){const s=oe.createElement("style");return s.textContent=`
80
+ `}function Ab({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){const s=oe.createElement("style");return s.textContent=`
81
81
  :host {
82
82
  --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;
83
83
  --font-size: 14px;
@@ -92,17 +92,17 @@ ${s.stack}`:"unknown"}}}}}const by=((e={})=>{const t=e.limit??py;return{name:hy,
92
92
 
93
93
  ${e!=="system"?"color-scheme: only light;":""}
94
94
 
95
- ${bu(e==="dark"?{...Su,...t}:{...Gb,...n})}
95
+ ${lu(e==="dark"?{...uu,...t}:{...Rb,...n})}
96
96
  }
97
97
 
98
98
  ${e==="system"?`
99
99
  @media (prefers-color-scheme: dark) {
100
100
  :host {
101
- ${bu({...Su,...t})}
101
+ ${lu({...uu,...t})}
102
102
  }
103
103
  }`:""}
104
104
  }
105
- `,r&&s.setAttribute("nonce",r),s}const hf=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>(({id:s="sentry-feedback",autoInject:o=!0,showBranding:i=!0,isEmailRequired:a=!1,isNameRequired:c=!1,showEmail:u=!0,showName:d=!0,enableScreenshot:l=!0,useSentryUser:p={email:"email",name:"username"},tags:f,styleNonce:h,scriptNonce:g,colorScheme:_="system",themeLight:y={},themeDark:S={},addScreenshotButtonLabel:O=Ob,cancelButtonLabel:v=bb,confirmButtonLabel:N=vb,emailLabel:k=Ib,emailPlaceholder:b=wb,formTitle:w=Tb,isRequiredLabel:E=Mb,messageLabel:C=Cb,messagePlaceholder:D=kb,nameLabel:I=Ab,namePlaceholder:A=Rb,removeScreenshotButtonLabel:G=Nb,submitButtonLabel:K=Eb,successMessageText:X=xb,triggerLabel:F=ff,triggerAriaLabel:L="",highlightToolText:P=Lb,hideToolText:M=Pb,removeHighlightText:J=Db,onFormOpen:se,onFormClose:le,onSubmitSuccess:_e,onSubmitError:xe,onFormSubmitted:xt}={})=>{const Me={id:s,autoInject:o,showBranding:i,isEmailRequired:a,isNameRequired:c,showEmail:u,showName:d,enableScreenshot:l,useSentryUser:p,tags:f,styleNonce:h,scriptNonce:g,colorScheme:_,themeDark:S,themeLight:y,triggerLabel:F,triggerAriaLabel:L,cancelButtonLabel:v,submitButtonLabel:K,confirmButtonLabel:N,formTitle:w,emailLabel:k,emailPlaceholder:b,messageLabel:C,messagePlaceholder:D,nameLabel:I,namePlaceholder:A,successMessageText:X,isRequiredLabel:E,addScreenshotButtonLabel:O,removeScreenshotButtonLabel:G,highlightToolText:P,hideToolText:M,removeHighlightText:J,onFormClose:le,onFormOpen:se,onSubmitError:xe,onSubmitSuccess:_e,onFormSubmitted:xt};let Le=null,rt=[];const Mt=re=>{if(!Le){const fe=oe.createElement("div");fe.id=String(re.id),oe.body.appendChild(fe),Le=fe.attachShadow({mode:"open"}),Le.appendChild(Vb(re))}return Le},sr=async re=>{const fe=re.enableScreenshot&&Hb();let We,we;try{We=(t?t():await e("feedbackModalIntegration",g))(),Hc(We)}catch{throw hs&&m.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!")}try{const st=fe?n?n():await e("feedbackScreenshotIntegration",g):void 0;st&&(we=st(),Hc(we))}catch{hs&&m.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const Re=We.createDialog({options:{...re,onFormClose:()=>{Re?.close(),re.onFormClose?.()},onFormSubmitted:()=>{Re?.close(),re.onFormSubmitted?.()}},screenshotIntegration:we,sendFeedback:Ub,shadow:Mt(re)});return Re},Hr=(re,fe={})=>{const We=Gr(Me,fe),we=typeof re=="string"?oe.querySelector(re):typeof re.addEventListener=="function"?re:null;if(!we)throw hs&&m.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let Re=null;const st=async()=>{Re||(Re=await sr({...We,onFormSubmitted:()=>{Re?.removeFromDom(),We.onFormSubmitted?.()}})),Re.appendToDom(),Re.open()};we.addEventListener("click",st);const Q=()=>{rt=rt.filter($e=>$e!==Q),Re?.removeFromDom(),Re=null,we.removeEventListener("click",st)};return rt.push(Q),Q},or=(re={})=>{const fe=Gr(Me,re),We=Mt(fe),we=qb({triggerLabel:fe.triggerLabel,triggerAriaLabel:fe.triggerAriaLabel,shadow:We,styleNonce:h});return Hr(we.el,{...fe,onFormOpen(){we.hide()},onFormClose(){we.show()},onFormSubmitted(){we.show()}}),we};return{name:"Feedback",setupOnce(){!$s()||!Me.autoInject||(oe.readyState==="loading"?oe.addEventListener("DOMContentLoaded",()=>or().appendToDom()):or().appendToDom())},attachTo:Hr,createWidget(re={}){const fe=or(Gr(Me,re));return fe.appendToDom(),fe},async createForm(re={}){return sr(Gr(Me,re))},remove(){Le&&(Le.parentElement?.remove(),Le=null),rt.forEach(re=>re()),rt=[]}}});function ER(){return x()?.getIntegrationByName("Feedback")}var _o,ae,mf,Qt,Eu,gf,vi,gr={},Ca=[],Yb=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ra=Array.isArray;function Dt(e,t){for(var n in t)e[n]=t[n];return e}function _f(e){var t=e.parentNode;t&&t.removeChild(e)}function Y(e,t,n){var r,s,o,i={};for(o in t)o=="key"?r=t[o]:o=="ref"?s=t[o]:i[o]=t[o];if(arguments.length>2&&(i.children=arguments.length>3?_o.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)i[o]===void 0&&(i[o]=e.defaultProps[o]);return ms(e,i,r,s,null)}function ms(e,t,n,r,s){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:s??++mf,__i:-1,__u:0};return s==null&&ae.vnode!=null&&ae.vnode(o),o}function Mr(e){return e.children}function gs(e,t){this.props=e,this.context=t}function $n(e,t){if(t==null)return e.__?$n(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"?$n(e):null}function Jb(e,t,n){var r,s=e.__v,o=s.__e,i=e.__P;if(i)return(r=Dt({},s)).__v=s.__v+1,ae.vnode&&ae.vnode(r),Aa(i,r,s,e.__n,i.ownerSVGElement!==void 0,32&s.__u?[o]:null,t,o??$n(s),!!(32&s.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=o&&yf(r),r}function yf(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 yf(e)}}function vu(e){(!e.__d&&(e.__d=!0)&&Qt.push(e)&&!Bs.__r++||Eu!==ae.debounceRendering)&&((Eu=ae.debounceRendering)||gf)(Bs)}function Bs(){var e,t,n,r=[],s=[];for(Qt.sort(vi);e=Qt.shift();)e.__d&&(n=Qt.length,t=Jb(e,r,s)||t,n===0||Qt.length>n?(Ti(r,t,s),s.length=r.length=0,t=void 0,Qt.sort(vi)):t&&ae.__c&&ae.__c(t,Ca));t&&Ti(r,t,s),Bs.__r=0}function Sf(e,t,n,r,s,o,i,a,c,u,d){var l,p,f,h,g,_=r&&r.__k||Ca,y=t.length;for(n.__d=c,Kb(n,t,_),c=n.__d,l=0;l<y;l++)(f=n.__k[l])!=null&&typeof f!="boolean"&&typeof f!="function"&&(p=f.__i===-1?gr:_[f.__i]||gr,f.__i=l,Aa(e,f,p,s,o,i,a,c,u,d),h=f.__e,f.ref&&p.ref!=f.ref&&(p.ref&&xa(p.ref,null,f),d.push(f.ref,f.__c||h,f)),g==null&&h!=null&&(g=h),65536&f.__u||p.__k===f.__k?c=bf(f,c,e):typeof f.type=="function"&&f.__d!==void 0?c=f.__d:h&&(c=h.nextSibling),f.__d=void 0,f.__u&=-196609);n.__d=c,n.__e=g}function Kb(e,t,n){var r,s,o,i,a,c=t.length,u=n.length,d=u,l=0;for(e.__k=[],r=0;r<c;r++)(s=e.__k[r]=(s=t[r])==null||typeof s=="boolean"||typeof s=="function"?null:typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?ms(null,s,null,null,s):Ra(s)?ms(Mr,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?ms(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s)!=null?(s.__=e,s.__b=e.__b+1,a=Xb(s,n,i=r+l,d),s.__i=a,o=null,a!==-1&&(d--,(o=n[a])&&(o.__u|=131072)),o==null||o.__v===null?(a==-1&&l--,typeof s.type!="function"&&(s.__u|=65536)):a!==i&&(a===i+1?l++:a>i?d>c-i?l+=a-i:l--:l=a<i&&a==i-1?a-i:0,a!==r+l&&(s.__u|=65536))):(o=n[r])&&o.key==null&&o.__e&&(o.__e==e.__d&&(e.__d=$n(o)),wi(o,o,!1),n[r]=null,d--);if(d)for(r=0;r<u;r++)(o=n[r])!=null&&(131072&o.__u)==0&&(o.__e==e.__d&&(e.__d=$n(o)),wi(o,o))}function bf(e,t,n){var r,s;if(typeof e.type=="function"){for(r=e.__k,s=0;r&&s<r.length;s++)r[s]&&(r[s].__=e,t=bf(r[s],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function Xb(e,t,n,r){var s=e.key,o=e.type,i=n-1,a=n+1,c=t[n];if(c===null||c&&s==c.key&&o===c.type)return n;if(r>(c!=null&&(131072&c.__u)==0?1:0))for(;i>=0||a<t.length;){if(i>=0){if((c=t[i])&&(131072&c.__u)==0&&s==c.key&&o===c.type)return i;i--}if(a<t.length){if((c=t[a])&&(131072&c.__u)==0&&s==c.key&&o===c.type)return a;a++}}return-1}function Tu(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Yb.test(t)?n:n+"px"}function Vr(e,t,n,r,s){var o;e: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||Tu(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Tu(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,o?Iu:wu,o)):e.removeEventListener(t,o?Iu:wu,o);else{if(s)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 e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function wu(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(ae.event?ae.event(e):e)}}function Iu(e){if(this.l)return this.l[e.type+!0](ae.event?ae.event(e):e)}function Aa(e,t,n,r,s,o,i,a,c,u){var d,l,p,f,h,g,_,y,S,O,v,N,k,b,w,E=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),o=[a=t.__e=n.__e]),(d=ae.__b)&&d(t);e:if(typeof E=="function")try{if(y=t.props,S=(d=E.contextType)&&r[d.__c],O=d?S?S.props.value:d.__:r,n.__c?_=(l=t.__c=n.__c).__=l.__E:("prototype"in E&&E.prototype.render?t.__c=l=new E(y,O):(t.__c=l=new gs(y,O),l.constructor=E,l.render=Zb),S&&S.sub(l),l.props=y,l.state||(l.state={}),l.context=O,l.__n=r,p=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),E.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Dt({},l.__s)),Dt(l.__s,E.getDerivedStateFromProps(y,l.__s))),f=l.props,h=l.state,l.__v=t,p)E.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(E.getDerivedStateFromProps==null&&y!==f&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(y,O),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(y,l.__s,O)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=y,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(C){C&&(C.__=t)}),v=0;v<l._sb.length;v++)l.__h.push(l._sb[v]);l._sb=[],l.__h.length&&i.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(y,l.__s,O),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(f,h,g)})}if(l.context=O,l.props=y,l.__P=e,l.__e=!1,N=ae.__r,k=0,"prototype"in E&&E.prototype.render){for(l.state=l.__s,l.__d=!1,N&&N(t),d=l.render(l.props,l.state,l.context),b=0;b<l._sb.length;b++)l.__h.push(l._sb[b]);l._sb=[]}else do l.__d=!1,N&&N(t),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++k<25);l.state=l.__s,l.getChildContext!=null&&(r=Dt(Dt({},r),l.getChildContext())),p||l.getSnapshotBeforeUpdate==null||(g=l.getSnapshotBeforeUpdate(f,h)),Sf(e,Ra(w=d!=null&&d.type===Mr&&d.key==null?d.props.children:d)?w:[w],t,n,r,s,o,i,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&i.push(l),_&&(l.__E=l.__=null)}catch(C){t.__v=null,c||o!=null?(t.__e=a,t.__u|=c?160:32,o[o.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),ae.__e(C,t,n)}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Qb(n.__e,t,n,r,s,o,i,c,u);(d=ae.diffed)&&d(t)}function Ti(e,t,n){for(var r=0;r<n.length;r++)xa(n[r],n[++r],n[++r]);ae.__c&&ae.__c(t,e),e.some(function(s){try{e=s.__h,s.__h=[],e.some(function(o){o.call(s)})}catch(o){ae.__e(o,s.__v)}})}function Qb(e,t,n,r,s,o,i,a,c){var u,d,l,p,f,h,g,_=n.props,y=t.props,S=t.type;if(S==="svg"&&(s=!0),o!=null){for(u=0;u<o.length;u++)if((f=o[u])&&"setAttribute"in f==!!S&&(S?f.localName===S:f.nodeType===3)){e=f,o[u]=null;break}}if(e==null){if(S===null)return document.createTextNode(y);e=s?document.createElementNS("http://www.w3.org/2000/svg",S):document.createElement(S,y.is&&y),o=null,a=!1}if(S===null)_===y||a&&e.data===y||(e.data=y);else{if(o=o&&_o.call(e.childNodes),_=n.props||gr,!a&&o!=null)for(_={},u=0;u<e.attributes.length;u++)_[(f=e.attributes[u]).name]=f.value;for(u in _)f=_[u],u=="children"||(u=="dangerouslySetInnerHTML"?l=f:u==="key"||u in y||Vr(e,u,null,f,s));for(u in y)f=y[u],u=="children"?p=f:u=="dangerouslySetInnerHTML"?d=f:u=="value"?h=f:u=="checked"?g=f:u==="key"||a&&typeof f!="function"||_[u]===f||Vr(e,u,f,_[u],s);if(d)a||l&&(d.__html===l.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(l&&(e.innerHTML=""),Sf(e,Ra(p)?p:[p],t,n,r,s&&S!=="foreignObject",o,i,o?o[0]:n.__k&&$n(n,0),a,c),o!=null)for(u=o.length;u--;)o[u]!=null&&_f(o[u]);a||(u="value",h!==void 0&&(h!==e[u]||S==="progress"&&!h||S==="option"&&h!==_[u])&&Vr(e,u,h,_[u],!1),u="checked",g!==void 0&&g!==e[u]&&Vr(e,u,g,_[u],!1))}return e}function xa(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){ae.__e(r,n)}}function wi(e,t,n){var r,s;if(ae.unmount&&ae.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||xa(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){ae.__e(o,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&wi(r[s],t,n||typeof e.type!="function");n||e.__e==null||_f(e.__e),e.__=e.__e=e.__d=void 0}function Zb(e,t,n){return this.constructor(e,n)}function eE(e,t,n){var r,s,o,i;ae.__&&ae.__(e,t),s=(r=!1)?null:t.__k,o=[],i=[],Aa(t,e=t.__k=Y(Mr,null,[e]),s||gr,gr,t.ownerSVGElement!==void 0,s?null:t.firstChild?_o.call(t.childNodes):null,o,s?s.__e:t.firstChild,r,i),e.__d=void 0,Ti(o,e,i)}_o=Ca.slice,ae={__e:function(e,t,n,r){for(var s,o,i;t=t.__;)if((s=t.__c)&&!s.__)try{if((o=s.constructor)&&o.getDerivedStateFromError!=null&&(s.setState(o.getDerivedStateFromError(e)),i=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,r||{}),i=s.__d),i)return s.__E=s}catch(a){e=a}throw e}},mf=0,gs.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Dt({},this.state),typeof e=="function"&&(e=e(Dt({},n),this.props)),e&&Dt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),vu(this))},gs.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),vu(this))},gs.prototype.render=Mr,Qt=[],gf=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,vi=function(e,t){return e.__v.__b-t.__v.__b},Bs.__r=0;var kt,ie,Bo,ku,Bn=0,Ef=[],_s=[],pe=ae,Cu=pe.__b,Ru=pe.__r,Au=pe.diffed,xu=pe.__c,Mu=pe.unmount,Ou=pe.__;function _n(e,t){pe.__h&&pe.__h(ie,e,Bn||t),Bn=0;var n=ie.__H||(ie.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:_s}),n.__[e]}function en(e){return Bn=1,vf(wf,e)}function vf(e,t,n){var r=_n(kt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):wf(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=ie,!ie.u)){var s=function(a,c,u){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(p){return!!p.__c});if(d.every(function(p){return!p.__N}))return!o||o.call(this,a,c,u);var l=!1;return d.forEach(function(p){if(p.__N){var f=p.__[0];p.__=p.__N,p.__N=void 0,f!==p.__[0]&&(l=!0)}}),!(!l&&r.__c.props===a)&&(!o||o.call(this,a,c,u))};ie.u=!0;var o=ie.shouldComponentUpdate,i=ie.componentWillUpdate;ie.componentWillUpdate=function(a,c,u){if(this.__e){var d=o;o=void 0,s(a,c,u),o=d}i&&i.call(this,a,c,u)},ie.shouldComponentUpdate=s}return r.__N||r.__}function tE(e,t){var n=_n(kt++,3);!pe.__s&&Ma(n.__H,t)&&(n.__=e,n.i=t,ie.__H.__h.push(n))}function Tf(e,t){var n=_n(kt++,4);!pe.__s&&Ma(n.__H,t)&&(n.__=e,n.i=t,ie.__h.push(n))}function nE(e){return Bn=5,Or(function(){return{current:e}},[])}function rE(e,t,n){Bn=6,Tf(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 Or(e,t){var n=_n(kt++,7);return Ma(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function xn(e,t){return Bn=8,Or(function(){return e},t)}function sE(e){var t=ie.context[e.__c],n=_n(kt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(ie)),t.props.value):e.__}function oE(e,t){pe.useDebugValue&&pe.useDebugValue(t?t(e):e)}function iE(e){var t=_n(kt++,10),n=en();return t.__=e,ie.componentDidCatch||(ie.componentDidCatch=function(r,s){t.__&&t.__(r,s),n[1](r)}),[n[0],function(){n[1](void 0)}]}function aE(){var e=_n(kt++,11);if(!e.__){for(var t=ie.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function cE(){for(var e;e=Ef.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ys),e.__H.__h.forEach(Ii),e.__H.__h=[]}catch(t){e.__H.__h=[],pe.__e(t,e.__v)}}pe.__b=function(e){ie=null,Cu&&Cu(e)},pe.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ou&&Ou(e,t)},pe.__r=function(e){Ru&&Ru(e),kt=0;var t=(ie=e.__c).__H;t&&(Bo===ie?(t.__h=[],ie.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=_s,n.__N=n.i=void 0})):(t.__h.forEach(ys),t.__h.forEach(Ii),t.__h=[],kt=0)),Bo=ie},pe.diffed=function(e){Au&&Au(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ef.push(t)!==1&&ku===pe.requestAnimationFrame||((ku=pe.requestAnimationFrame)||uE)(cE)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==_s&&(n.__=n.__V),n.i=void 0,n.__V=_s})),Bo=ie=null},pe.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ys),n.__h=n.__h.filter(function(r){return!r.__||Ii(r)})}catch(r){t.some(function(s){s.__h&&(s.__h=[])}),t=[],pe.__e(r,n.__v)}}),xu&&xu(e,t)},pe.unmount=function(e){Mu&&Mu(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ys(r)}catch(s){t=s}}),n.__H=void 0,t&&pe.__e(t,n.__v))};var Nu=typeof requestAnimationFrame=="function";function uE(e){var t,n=function(){clearTimeout(r),Nu&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Nu&&(t=requestAnimationFrame(n))}function ys(e){var t=ie,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),ie=t}function Ii(e){var t=ie;e.__c=e.__(),ie=t}function Ma(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function wf(e,t){return typeof t=="function"?t(e):t}const lE=Object.defineProperty({__proto__:null,useCallback:xn,useContext:sE,useDebugValue:oE,useEffect:tE,useErrorBoundary:iE,useId:aE,useImperativeHandle:rE,useLayoutEffect:Tf,useMemo:Or,useReducer:vf,useRef:nE,useState:en},Symbol.toStringTag,{value:"Module"}),dE="http://www.w3.org/2000/svg";function fE(){const e=r=>oe.createElementNS(dE,r),t=He(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=He(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 pE({options:e}){const t=Or(()=>({__html:fE().outerHTML}),[]);return Y("h2",{class:"dialog__header"},Y("span",{class:"dialog__title"},e.formTitle),e.showBranding?Y("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function hE(e,t){const 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 Uo(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function mE({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:s,onSubmitSuccess:o,onSubmitError:i,showEmail:a,showName:c,screenshotInput:u}){const{tags:d,addScreenshotButtonLabel:l,removeScreenshotButtonLabel:p,cancelButtonLabel:f,emailLabel:h,emailPlaceholder:g,isEmailRequired:_,isNameRequired:y,messageLabel:S,messagePlaceholder:O,nameLabel:v,namePlaceholder:N,submitButtonLabel:k,isRequiredLabel:b}=e,[w,E]=en(!1),[C,D]=en(null),[I,A]=en(!1),G=u?.input,[K,X]=en(null),F=xn(M=>{X(M),A(!1)},[]),L=xn(M=>{const J=hE(M,{emailLabel:h,isEmailRequired:_,isNameRequired:y,messageLabel:S,nameLabel:v});return J.length>0?D(`Please enter in the following required fields: ${J.join(", ")}`):D(null),J.length===0},[h,_,y,S,v]),P=xn(async M=>{E(!0);try{if(M.preventDefault(),!(M.target instanceof HTMLFormElement))return;const J=new FormData(M.target),se=await(u&&I?u.value():void 0),le={name:Uo(J,"name"),email:Uo(J,"email"),message:Uo(J,"message"),attachments:se?[se]:void 0};if(!L(le))return;try{const _e=await s({name:le.name,email:le.email,message:le.message,source:Fb,tags:d},{attachments:le.attachments});o(le,_e)}catch(_e){hs&&m.error(_e),D(_e),i(_e)}}finally{E(!1)}},[u&&I,o,i]);return Y("form",{class:"form",onSubmit:P},G&&I?Y(G,{onError:F}):null,Y("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:w},Y("div",{class:"form__top"},C?Y("div",{class:"form__error-container"},C):null,c?Y("label",{for:"name",class:"form__label"},Y(Ho,{label:v,isRequiredLabel:b,isRequired:y}),Y("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:N,required:y,type:"text"})):Y("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?Y("label",{for:"email",class:"form__label"},Y(Ho,{label:h,isRequiredLabel:b,isRequired:_}),Y("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:g,required:_,type:"email"})):Y("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),Y("label",{for:"message",class:"form__label"},Y(Ho,{label:S,isRequiredLabel:b,isRequired:!0}),Y("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:O,required:!0,rows:5})),G?Y("label",{for:"screenshot",class:"form__label"},Y("button",{class:"btn btn--default",disabled:w,type:"button",onClick:()=>{X(null),A(M=>!M)}},I?p:l),K?Y("div",{class:"form__error-container"},K.message):null):null),Y("div",{class:"btn-group"},Y("button",{class:"btn btn--primary",disabled:w,type:"submit"},k),Y("button",{class:"btn btn--default",disabled:w,type:"button",onClick:r},f))))}function Ho({label:e,isRequired:t,isRequiredLabel:n}){return Y("span",{class:"form__label__text"},e,t&&Y("span",{class:"form__label__text--required"},n))}const Yr=16,Lu=17,gE="http://www.w3.org/2000/svg";function _E(){const e=c=>Ke.document.createElementNS(gE,c),t=He(e("svg"),{width:`${Yr}`,height:`${Lu}`,viewBox:`0 0 ${Yr} ${Lu}`,fill:"inherit"}),n=He(e("g"),{clipPath:"url(#clip0_57_156)"}),r=He(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"}),s=He(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(s,r);const o=e("defs"),i=He(e("clipPath"),{id:"clip0_57_156"}),a=He(e("rect"),{width:`${Yr}`,height:`${Yr}`,fill:"white",transform:"translate(0 0.5)"});return i.appendChild(a),o.appendChild(i),t.appendChild(o).appendChild(i).appendChild(a),t}function yE({open:e,onFormSubmitted:t,...n}){const r=n.options,s=Or(()=>({__html:_E().outerHTML}),[]),[o,i]=en(null),a=xn(()=>{o&&(clearTimeout(o),i(null)),t()},[o]),c=xn((u,d)=>{n.onSubmitSuccess(u,d),i(setTimeout(()=>{t(),i(null)},Bb))},[t]);return Y(Mr,null,o?Y("div",{class:"success__position",onClick:a},Y("div",{class:"success__content"},r.successMessageText,Y("span",{class:"success__icon",dangerouslySetInnerHTML:s}))):Y("dialog",{class:"dialog",onClick:r.onFormClose,open:e},Y("div",{class:"dialog__position"},Y("div",{class:"dialog__content",onClick:u=>{u.stopPropagation()}},Y(pE,{options:r}),Y(mE,{...n,onSubmitSuccess:c})))))}const SE=`
105
+ `,r&&s.setAttribute("nonce",r),s}const Zd=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>(({id:s="sentry-feedback",autoInject:o=!0,showBranding:i=!0,isEmailRequired:a=!1,isNameRequired:c=!1,showEmail:u=!0,showName:d=!0,enableScreenshot:l=!0,useSentryUser:p={email:"email",name:"username"},tags:f,styleNonce:h,scriptNonce:g,colorScheme:_="system",themeLight:y={},themeDark:S={},addScreenshotButtonLabel:O=hb,cancelButtonLabel:v=nb,confirmButtonLabel:N=sb,emailLabel:k=ab,emailPlaceholder:b=ib,formTitle:I=ob,isRequiredLabel:E=pb,messageLabel:C=ub,messagePlaceholder:D=cb,nameLabel:w=db,namePlaceholder:A=lb,removeScreenshotButtonLabel:G=mb,submitButtonLabel:K=rb,successMessageText:X=fb,triggerLabel:F=Xd,triggerAriaLabel:L="",highlightToolText:P=gb,hideToolText:M=_b,removeHighlightText:J=yb,onFormOpen:se,onFormClose:le,onSubmitSuccess:_e,onSubmitError:Ae,onFormSubmitted:wt}={})=>{const xe={id:s,autoInject:o,showBranding:i,isEmailRequired:a,isNameRequired:c,showEmail:u,showName:d,enableScreenshot:l,useSentryUser:p,tags:f,styleNonce:h,scriptNonce:g,colorScheme:_,themeDark:S,themeLight:y,triggerLabel:F,triggerAriaLabel:L,cancelButtonLabel:v,submitButtonLabel:K,confirmButtonLabel:N,formTitle:I,emailLabel:k,emailPlaceholder:b,messageLabel:C,messagePlaceholder:D,nameLabel:w,namePlaceholder:A,successMessageText:X,isRequiredLabel:E,addScreenshotButtonLabel:O,removeScreenshotButtonLabel:G,highlightToolText:P,hideToolText:M,removeHighlightText:J,onFormClose:le,onFormOpen:se,onSubmitError:Ae,onSubmitSuccess:_e,onFormSubmitted:wt};let Ne=null,nt=[];const kt=re=>{if(!Ne){const fe=oe.createElement("div");fe.id=String(re.id),oe.body.appendChild(fe),Ne=fe.attachShadow({mode:"open"}),Ne.appendChild(Ab(re))}return Ne},Xn=async re=>{const fe=re.enableScreenshot&&Tb();let He,Te;try{He=(t?t():await e("feedbackModalIntegration",g))(),Mc(He)}catch{throw is&&m.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!")}try{const rt=fe?n?n():await e("feedbackScreenshotIntegration",g):void 0;rt&&(Te=rt(),Mc(Te))}catch{is&&m.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const Ce=He.createDialog({options:{...re,onFormClose:()=>{Ce?.close(),re.onFormClose?.()},onFormSubmitted:()=>{Ce?.close(),re.onFormSubmitted?.()}},screenshotIntegration:Te,sendFeedback:vb,shadow:kt(re)});return Ce},Lr=(re,fe={})=>{const He=Br(xe,fe),Te=typeof re=="string"?oe.querySelector(re):typeof re.addEventListener=="function"?re:null;if(!Te)throw is&&m.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let Ce=null;const rt=async()=>{Ce||(Ce=await Xn({...He,onFormSubmitted:()=>{Ce?.removeFromDom(),He.onFormSubmitted?.()}})),Ce.appendToDom(),Ce.open()};Te.addEventListener("click",rt);const Q=()=>{nt=nt.filter(Fe=>Fe!==Q),Ce?.removeFromDom(),Ce=null,Te.removeEventListener("click",rt)};return nt.push(Q),Q},Qn=(re={})=>{const fe=Br(xe,re),He=kt(fe),Te=Cb({triggerLabel:fe.triggerLabel,triggerAriaLabel:fe.triggerAriaLabel,shadow:He,styleNonce:h});return Lr(Te.el,{...fe,onFormOpen(){Te.hide()},onFormClose(){Te.show()},onFormSubmitted(){Te.show()}}),Te};return{name:"Feedback",setupOnce(){!xs()||!xe.autoInject||(oe.readyState==="loading"?oe.addEventListener("DOMContentLoaded",()=>Qn().appendToDom()):Qn().appendToDom())},attachTo:Lr,createWidget(re={}){const fe=Qn(Br(xe,re));return fe.appendToDom(),fe},async createForm(re={}){return Xn(Br(xe,re))},remove(){Ne&&(Ne.parentElement?.remove(),Ne=null),nt.forEach(re=>re()),nt=[]}}});function sR(){return x()?.getIntegrationByName("Feedback")}var co,ae,ef,Vt,du,tf,fi,ur={},_a=[],xb=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ya=Array.isArray;function Mt(e,t){for(var n in t)e[n]=t[n];return e}function nf(e){var t=e.parentNode;t&&t.removeChild(e)}function Y(e,t,n){var r,s,o,i={};for(o in t)o=="key"?r=t[o]:o=="ref"?s=t[o]:i[o]=t[o];if(arguments.length>2&&(i.children=arguments.length>3?co.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)i[o]===void 0&&(i[o]=e.defaultProps[o]);return as(e,i,r,s,null)}function as(e,t,n,r,s){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:s??++ef,__i:-1,__u:0};return s==null&&ae.vnode!=null&&ae.vnode(o),o}function Ir(e){return e.children}function cs(e,t){this.props=e,this.context=t}function Mn(e,t){if(t==null)return e.__?Mn(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"?Mn(e):null}function Mb(e,t,n){var r,s=e.__v,o=s.__e,i=e.__P;if(i)return(r=Mt({},s)).__v=s.__v+1,ae.vnode&&ae.vnode(r),Sa(i,r,s,e.__n,i.ownerSVGElement!==void 0,32&s.__u?[o]:null,t,o??Mn(s),!!(32&s.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=o&&rf(r),r}function rf(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 rf(e)}}function fu(e){(!e.__d&&(e.__d=!0)&&Vt.push(e)&&!Ms.__r++||du!==ae.debounceRendering)&&((du=ae.debounceRendering)||tf)(Ms)}function Ms(){var e,t,n,r=[],s=[];for(Vt.sort(fi);e=Vt.shift();)e.__d&&(n=Vt.length,t=Mb(e,r,s)||t,n===0||Vt.length>n?(pi(r,t,s),s.length=r.length=0,t=void 0,Vt.sort(fi)):t&&ae.__c&&ae.__c(t,_a));t&&pi(r,t,s),Ms.__r=0}function sf(e,t,n,r,s,o,i,a,c,u,d){var l,p,f,h,g,_=r&&r.__k||_a,y=t.length;for(n.__d=c,Ob(n,t,_),c=n.__d,l=0;l<y;l++)(f=n.__k[l])!=null&&typeof f!="boolean"&&typeof f!="function"&&(p=f.__i===-1?ur:_[f.__i]||ur,f.__i=l,Sa(e,f,p,s,o,i,a,c,u,d),h=f.__e,f.ref&&p.ref!=f.ref&&(p.ref&&ba(p.ref,null,f),d.push(f.ref,f.__c||h,f)),g==null&&h!=null&&(g=h),65536&f.__u||p.__k===f.__k?c=of(f,c,e):typeof f.type=="function"&&f.__d!==void 0?c=f.__d:h&&(c=h.nextSibling),f.__d=void 0,f.__u&=-196609);n.__d=c,n.__e=g}function Ob(e,t,n){var r,s,o,i,a,c=t.length,u=n.length,d=u,l=0;for(e.__k=[],r=0;r<c;r++)(s=e.__k[r]=(s=t[r])==null||typeof s=="boolean"||typeof s=="function"?null:typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?as(null,s,null,null,s):ya(s)?as(Ir,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?as(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s)!=null?(s.__=e,s.__b=e.__b+1,a=Nb(s,n,i=r+l,d),s.__i=a,o=null,a!==-1&&(d--,(o=n[a])&&(o.__u|=131072)),o==null||o.__v===null?(a==-1&&l--,typeof s.type!="function"&&(s.__u|=65536)):a!==i&&(a===i+1?l++:a>i?d>c-i?l+=a-i:l--:l=a<i&&a==i-1?a-i:0,a!==r+l&&(s.__u|=65536))):(o=n[r])&&o.key==null&&o.__e&&(o.__e==e.__d&&(e.__d=Mn(o)),hi(o,o,!1),n[r]=null,d--);if(d)for(r=0;r<u;r++)(o=n[r])!=null&&(131072&o.__u)==0&&(o.__e==e.__d&&(e.__d=Mn(o)),hi(o,o))}function of(e,t,n){var r,s;if(typeof e.type=="function"){for(r=e.__k,s=0;r&&s<r.length;s++)r[s]&&(r[s].__=e,t=of(r[s],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function Nb(e,t,n,r){var s=e.key,o=e.type,i=n-1,a=n+1,c=t[n];if(c===null||c&&s==c.key&&o===c.type)return n;if(r>(c!=null&&(131072&c.__u)==0?1:0))for(;i>=0||a<t.length;){if(i>=0){if((c=t[i])&&(131072&c.__u)==0&&s==c.key&&o===c.type)return i;i--}if(a<t.length){if((c=t[a])&&(131072&c.__u)==0&&s==c.key&&o===c.type)return a;a++}}return-1}function pu(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||xb.test(t)?n:n+"px"}function Ur(e,t,n,r,s){var o;e: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||pu(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||pu(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,o?mu:hu,o)):e.removeEventListener(t,o?mu:hu,o);else{if(s)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 e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function hu(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(ae.event?ae.event(e):e)}}function mu(e){if(this.l)return this.l[e.type+!0](ae.event?ae.event(e):e)}function Sa(e,t,n,r,s,o,i,a,c,u){var d,l,p,f,h,g,_,y,S,O,v,N,k,b,I,E=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),o=[a=t.__e=n.__e]),(d=ae.__b)&&d(t);e:if(typeof E=="function")try{if(y=t.props,S=(d=E.contextType)&&r[d.__c],O=d?S?S.props.value:d.__:r,n.__c?_=(l=t.__c=n.__c).__=l.__E:("prototype"in E&&E.prototype.render?t.__c=l=new E(y,O):(t.__c=l=new cs(y,O),l.constructor=E,l.render=Pb),S&&S.sub(l),l.props=y,l.state||(l.state={}),l.context=O,l.__n=r,p=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),E.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Mt({},l.__s)),Mt(l.__s,E.getDerivedStateFromProps(y,l.__s))),f=l.props,h=l.state,l.__v=t,p)E.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(E.getDerivedStateFromProps==null&&y!==f&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(y,O),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(y,l.__s,O)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=y,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(C){C&&(C.__=t)}),v=0;v<l._sb.length;v++)l.__h.push(l._sb[v]);l._sb=[],l.__h.length&&i.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(y,l.__s,O),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(f,h,g)})}if(l.context=O,l.props=y,l.__P=e,l.__e=!1,N=ae.__r,k=0,"prototype"in E&&E.prototype.render){for(l.state=l.__s,l.__d=!1,N&&N(t),d=l.render(l.props,l.state,l.context),b=0;b<l._sb.length;b++)l.__h.push(l._sb[b]);l._sb=[]}else do l.__d=!1,N&&N(t),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++k<25);l.state=l.__s,l.getChildContext!=null&&(r=Mt(Mt({},r),l.getChildContext())),p||l.getSnapshotBeforeUpdate==null||(g=l.getSnapshotBeforeUpdate(f,h)),sf(e,ya(I=d!=null&&d.type===Ir&&d.key==null?d.props.children:d)?I:[I],t,n,r,s,o,i,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&i.push(l),_&&(l.__E=l.__=null)}catch(C){t.__v=null,c||o!=null?(t.__e=a,t.__u|=c?160:32,o[o.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),ae.__e(C,t,n)}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Lb(n.__e,t,n,r,s,o,i,c,u);(d=ae.diffed)&&d(t)}function pi(e,t,n){for(var r=0;r<n.length;r++)ba(n[r],n[++r],n[++r]);ae.__c&&ae.__c(t,e),e.some(function(s){try{e=s.__h,s.__h=[],e.some(function(o){o.call(s)})}catch(o){ae.__e(o,s.__v)}})}function Lb(e,t,n,r,s,o,i,a,c){var u,d,l,p,f,h,g,_=n.props,y=t.props,S=t.type;if(S==="svg"&&(s=!0),o!=null){for(u=0;u<o.length;u++)if((f=o[u])&&"setAttribute"in f==!!S&&(S?f.localName===S:f.nodeType===3)){e=f,o[u]=null;break}}if(e==null){if(S===null)return document.createTextNode(y);e=s?document.createElementNS("http://www.w3.org/2000/svg",S):document.createElement(S,y.is&&y),o=null,a=!1}if(S===null)_===y||a&&e.data===y||(e.data=y);else{if(o=o&&co.call(e.childNodes),_=n.props||ur,!a&&o!=null)for(_={},u=0;u<e.attributes.length;u++)_[(f=e.attributes[u]).name]=f.value;for(u in _)f=_[u],u=="children"||(u=="dangerouslySetInnerHTML"?l=f:u==="key"||u in y||Ur(e,u,null,f,s));for(u in y)f=y[u],u=="children"?p=f:u=="dangerouslySetInnerHTML"?d=f:u=="value"?h=f:u=="checked"?g=f:u==="key"||a&&typeof f!="function"||_[u]===f||Ur(e,u,f,_[u],s);if(d)a||l&&(d.__html===l.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(l&&(e.innerHTML=""),sf(e,ya(p)?p:[p],t,n,r,s&&S!=="foreignObject",o,i,o?o[0]:n.__k&&Mn(n,0),a,c),o!=null)for(u=o.length;u--;)o[u]!=null&&nf(o[u]);a||(u="value",h!==void 0&&(h!==e[u]||S==="progress"&&!h||S==="option"&&h!==_[u])&&Ur(e,u,h,_[u],!1),u="checked",g!==void 0&&g!==e[u]&&Ur(e,u,g,_[u],!1))}return e}function ba(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){ae.__e(r,n)}}function hi(e,t,n){var r,s;if(ae.unmount&&ae.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||ba(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){ae.__e(o,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&hi(r[s],t,n||typeof e.type!="function");n||e.__e==null||nf(e.__e),e.__=e.__e=e.__d=void 0}function Pb(e,t,n){return this.constructor(e,n)}function Db(e,t,n){var r,s,o,i;ae.__&&ae.__(e,t),s=(r=!1)?null:t.__k,o=[],i=[],Sa(t,e=t.__k=Y(Ir,null,[e]),s||ur,ur,t.ownerSVGElement!==void 0,s?null:t.firstChild?co.call(t.childNodes):null,o,s?s.__e:t.firstChild,r,i),e.__d=void 0,pi(o,e,i)}co=_a.slice,ae={__e:function(e,t,n,r){for(var s,o,i;t=t.__;)if((s=t.__c)&&!s.__)try{if((o=s.constructor)&&o.getDerivedStateFromError!=null&&(s.setState(o.getDerivedStateFromError(e)),i=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,r||{}),i=s.__d),i)return s.__E=s}catch(a){e=a}throw e}},ef=0,cs.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Mt({},this.state),typeof e=="function"&&(e=e(Mt({},n),this.props)),e&&Mt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),fu(this))},cs.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),fu(this))},cs.prototype.render=Ir,Vt=[],tf=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,fi=function(e,t){return e.__v.__b-t.__v.__b},Ms.__r=0;var vt,ie,Mo,gu,On=0,af=[],us=[],pe=ae,_u=pe.__b,yu=pe.__r,Su=pe.diffed,bu=pe.__c,Eu=pe.unmount,vu=pe.__;function dn(e,t){pe.__h&&pe.__h(ie,e,On||t),On=0;var n=ie.__H||(ie.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:us}),n.__[e]}function Yt(e){return On=1,cf(lf,e)}function cf(e,t,n){var r=dn(vt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):lf(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=ie,!ie.u)){var s=function(a,c,u){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(p){return!!p.__c});if(d.every(function(p){return!p.__N}))return!o||o.call(this,a,c,u);var l=!1;return d.forEach(function(p){if(p.__N){var f=p.__[0];p.__=p.__N,p.__N=void 0,f!==p.__[0]&&(l=!0)}}),!(!l&&r.__c.props===a)&&(!o||o.call(this,a,c,u))};ie.u=!0;var o=ie.shouldComponentUpdate,i=ie.componentWillUpdate;ie.componentWillUpdate=function(a,c,u){if(this.__e){var d=o;o=void 0,s(a,c,u),o=d}i&&i.call(this,a,c,u)},ie.shouldComponentUpdate=s}return r.__N||r.__}function Fb(e,t){var n=dn(vt++,3);!pe.__s&&Ea(n.__H,t)&&(n.__=e,n.i=t,ie.__H.__h.push(n))}function uf(e,t){var n=dn(vt++,4);!pe.__s&&Ea(n.__H,t)&&(n.__=e,n.i=t,ie.__h.push(n))}function $b(e){return On=5,wr(function(){return{current:e}},[])}function Bb(e,t,n){On=6,uf(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 wr(e,t){var n=dn(vt++,7);return Ea(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Tn(e,t){return On=8,wr(function(){return e},t)}function Ub(e){var t=ie.context[e.__c],n=dn(vt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(ie)),t.props.value):e.__}function Hb(e,t){pe.useDebugValue&&pe.useDebugValue(t?t(e):e)}function Wb(e){var t=dn(vt++,10),n=Yt();return t.__=e,ie.componentDidCatch||(ie.componentDidCatch=function(r,s){t.__&&t.__(r,s),n[1](r)}),[n[0],function(){n[1](void 0)}]}function jb(){var e=dn(vt++,11);if(!e.__){for(var t=ie.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function zb(){for(var e;e=af.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ls),e.__H.__h.forEach(mi),e.__H.__h=[]}catch(t){e.__H.__h=[],pe.__e(t,e.__v)}}pe.__b=function(e){ie=null,_u&&_u(e)},pe.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),vu&&vu(e,t)},pe.__r=function(e){yu&&yu(e),vt=0;var t=(ie=e.__c).__H;t&&(Mo===ie?(t.__h=[],ie.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=us,n.__N=n.i=void 0})):(t.__h.forEach(ls),t.__h.forEach(mi),t.__h=[],vt=0)),Mo=ie},pe.diffed=function(e){Su&&Su(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(af.push(t)!==1&&gu===pe.requestAnimationFrame||((gu=pe.requestAnimationFrame)||qb)(zb)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==us&&(n.__=n.__V),n.i=void 0,n.__V=us})),Mo=ie=null},pe.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ls),n.__h=n.__h.filter(function(r){return!r.__||mi(r)})}catch(r){t.some(function(s){s.__h&&(s.__h=[])}),t=[],pe.__e(r,n.__v)}}),bu&&bu(e,t)},pe.unmount=function(e){Eu&&Eu(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ls(r)}catch(s){t=s}}),n.__H=void 0,t&&pe.__e(t,n.__v))};var Tu=typeof requestAnimationFrame=="function";function qb(e){var t,n=function(){clearTimeout(r),Tu&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Tu&&(t=requestAnimationFrame(n))}function ls(e){var t=ie,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),ie=t}function mi(e){var t=ie;e.__c=e.__(),ie=t}function Ea(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function lf(e,t){return typeof t=="function"?t(e):t}const Gb=Object.defineProperty({__proto__:null,useCallback:Tn,useContext:Ub,useDebugValue:Hb,useEffect:Fb,useErrorBoundary:Wb,useId:jb,useImperativeHandle:Bb,useLayoutEffect:uf,useMemo:wr,useReducer:cf,useRef:$b,useState:Yt},Symbol.toStringTag,{value:"Module"}),Vb="http://www.w3.org/2000/svg";function Yb(){const e=r=>oe.createElementNS(Vb,r),t=Ue(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=Ue(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 Jb({options:e}){const t=wr(()=>({__html:Yb().outerHTML}),[]);return Y("h2",{class:"dialog__header"},Y("span",{class:"dialog__title"},e.formTitle),e.showBranding?Y("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function Kb(e,t){const 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 Oo(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function Xb({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:s,onSubmitSuccess:o,onSubmitError:i,showEmail:a,showName:c,screenshotInput:u}){const{tags:d,addScreenshotButtonLabel:l,removeScreenshotButtonLabel:p,cancelButtonLabel:f,emailLabel:h,emailPlaceholder:g,isEmailRequired:_,isNameRequired:y,messageLabel:S,messagePlaceholder:O,nameLabel:v,namePlaceholder:N,submitButtonLabel:k,isRequiredLabel:b}=e,[I,E]=Yt(!1),[C,D]=Yt(null),[w,A]=Yt(!1),G=u?.input,[K,X]=Yt(null),F=Tn(M=>{X(M),A(!1)},[]),L=Tn(M=>{const J=Kb(M,{emailLabel:h,isEmailRequired:_,isNameRequired:y,messageLabel:S,nameLabel:v});return J.length>0?D(`Please enter in the following required fields: ${J.join(", ")}`):D(null),J.length===0},[h,_,y,S,v]),P=Tn(async M=>{E(!0);try{if(M.preventDefault(),!(M.target instanceof HTMLFormElement))return;const J=new FormData(M.target),se=await(u&&w?u.value():void 0),le={name:Oo(J,"name"),email:Oo(J,"email"),message:Oo(J,"message"),attachments:se?[se]:void 0};if(!L(le))return;try{const _e=await s({name:le.name,email:le.email,message:le.message,source:Sb,tags:d},{attachments:le.attachments});o(le,_e)}catch(_e){is&&m.error(_e),D(_e),i(_e)}}finally{E(!1)}},[u&&w,o,i]);return Y("form",{class:"form",onSubmit:P},G&&w?Y(G,{onError:F}):null,Y("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:I},Y("div",{class:"form__top"},C?Y("div",{class:"form__error-container"},C):null,c?Y("label",{for:"name",class:"form__label"},Y(No,{label:v,isRequiredLabel:b,isRequired:y}),Y("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:N,required:y,type:"text"})):Y("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?Y("label",{for:"email",class:"form__label"},Y(No,{label:h,isRequiredLabel:b,isRequired:_}),Y("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:g,required:_,type:"email"})):Y("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),Y("label",{for:"message",class:"form__label"},Y(No,{label:S,isRequiredLabel:b,isRequired:!0}),Y("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:O,required:!0,rows:5})),G?Y("label",{for:"screenshot",class:"form__label"},Y("button",{class:"btn btn--default",disabled:I,type:"button",onClick:()=>{X(null),A(M=>!M)}},w?p:l),K?Y("div",{class:"form__error-container"},K.message):null):null),Y("div",{class:"btn-group"},Y("button",{class:"btn btn--primary",disabled:I,type:"submit"},k),Y("button",{class:"btn btn--default",disabled:I,type:"button",onClick:r},f))))}function No({label:e,isRequired:t,isRequiredLabel:n}){return Y("span",{class:"form__label__text"},e,t&&Y("span",{class:"form__label__text--required"},n))}const Hr=16,Iu=17,Qb="http://www.w3.org/2000/svg";function Zb(){const e=c=>Je.document.createElementNS(Qb,c),t=Ue(e("svg"),{width:`${Hr}`,height:`${Iu}`,viewBox:`0 0 ${Hr} ${Iu}`,fill:"inherit"}),n=Ue(e("g"),{clipPath:"url(#clip0_57_156)"}),r=Ue(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"}),s=Ue(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(s,r);const o=e("defs"),i=Ue(e("clipPath"),{id:"clip0_57_156"}),a=Ue(e("rect"),{width:`${Hr}`,height:`${Hr}`,fill:"white",transform:"translate(0 0.5)"});return i.appendChild(a),o.appendChild(i),t.appendChild(o).appendChild(i).appendChild(a),t}function eE({open:e,onFormSubmitted:t,...n}){const r=n.options,s=wr(()=>({__html:Zb().outerHTML}),[]),[o,i]=Yt(null),a=Tn(()=>{o&&(clearTimeout(o),i(null)),t()},[o]),c=Tn((u,d)=>{n.onSubmitSuccess(u,d),i(setTimeout(()=>{t(),i(null)},Eb))},[t]);return Y(Ir,null,o?Y("div",{class:"success__position",onClick:a},Y("div",{class:"success__content"},r.successMessageText,Y("span",{class:"success__icon",dangerouslySetInnerHTML:s}))):Y("dialog",{class:"dialog",onClick:r.onFormClose,open:e},Y("div",{class:"dialog__position"},Y("div",{class:"dialog__content",onClick:u=>{u.stopPropagation()}},Y(Jb,{options:r}),Y(Xb,{...n,onSubmitSuccess:c})))))}const tE=`
106
106
  .dialog {
107
107
  position: fixed;
108
108
  z-index: var(--z-index);
@@ -174,7 +174,7 @@ ${e==="system"?`
174
174
  transition: transform 0.2s ease-in-out;
175
175
  }
176
176
 
177
- `,bE=`
177
+ `,nE=`
178
178
  .dialog__header {
179
179
  display: flex;
180
180
  gap: 4px;
@@ -204,7 +204,7 @@ ${e==="system"?`
204
204
  .brand-link:focus-visible {
205
205
  outline: var(--outline);
206
206
  }
207
- `,EE=`
207
+ `,rE=`
208
208
  .form {
209
209
  display: flex;
210
210
  overflow: auto;
@@ -294,7 +294,7 @@ ${e==="system"?`
294
294
  color: var(--error-color);
295
295
  fill: var(--error-color);
296
296
  }
297
- `,vE=`
297
+ `,sE=`
298
298
  .btn-group {
299
299
  display: grid;
300
300
  gap: 8px;
@@ -354,7 +354,7 @@ ${e==="system"?`
354
354
  filter: var(--interactive-filter);
355
355
  outline: var(--button-focus-outline, var(--outline));
356
356
  }
357
- `,TE=`
357
+ `,oE=`
358
358
  .success__position {
359
359
  position: fixed;
360
360
  inset: var(--dialog-inset);
@@ -382,17 +382,17 @@ ${e==="system"?`
382
382
  .success__icon {
383
383
  display: flex;
384
384
  }
385
- `;function wE(e){const t=oe.createElement("style");return t.textContent=`
385
+ `;function iE(e){const t=oe.createElement("style");return t.textContent=`
386
386
  :host {
387
387
  --dialog-inset: var(--inset);
388
388
  }
389
389
 
390
- ${SE}
391
- ${bE}
392
- ${EE}
393
- ${vE}
394
- ${TE}
395
- `,e&&t.setAttribute("nonce",e),t}function IE(){const e=q().getUser(),t=Te().getUser(),n=Pn().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}const kE=(()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const s=r,o=e.useSentryUser,i=IE(),a=oe.createElement("div"),c=wE(e.styleNonce);let u="";const d={get el(){return a},appendToDom(){!s.contains(c)&&!s.contains(a)&&(s.appendChild(c),s.appendChild(a))},removeFromDom(){a.remove(),c.remove(),oe.body.style.overflow=u},open(){p(!0),e.onFormOpen?.(),x()?.emit("openFeedbackWidget"),u=oe.body.style.overflow,oe.body.style.overflow="hidden"},close(){p(!1),oe.body.style.overflow=u}},l=t?.createInput({h:Y,hooks:lE,dialog:d,options:e}),p=f=>{eE(Y(yE,{options:e,screenshotInput:l,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:o&&i?.[o.name]||"",defaultEmail:o&&i?.[o.email]||"",onFormClose:()=>{p(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(h,g)=>{p(!1),e.onSubmitSuccess?.(h,g)},onSubmitError:h=>{e.onSubmitError?.(h)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:f}),a)};return d}}));function CE({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 RE(e){const t=oe.createElement("style"),n="#1A141F",r="#302735";return t.textContent=`
390
+ ${tE}
391
+ ${nE}
392
+ ${rE}
393
+ ${sE}
394
+ ${oE}
395
+ `,e&&t.setAttribute("nonce",e),t}function aE(){const e=q().getUser(),t=ve().getUser(),n=Rn().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}const cE=(()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const s=r,o=e.useSentryUser,i=aE(),a=oe.createElement("div"),c=iE(e.styleNonce);let u="";const d={get el(){return a},appendToDom(){!s.contains(c)&&!s.contains(a)&&(s.appendChild(c),s.appendChild(a))},removeFromDom(){a.remove(),c.remove(),oe.body.style.overflow=u},open(){p(!0),e.onFormOpen?.(),x()?.emit("openFeedbackWidget"),u=oe.body.style.overflow,oe.body.style.overflow="hidden"},close(){p(!1),oe.body.style.overflow=u}},l=t?.createInput({h:Y,hooks:Gb,dialog:d,options:e}),p=f=>{Db(Y(eE,{options:e,screenshotInput:l,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:o&&i?.[o.name]||"",defaultEmail:o&&i?.[o.email]||"",onFormClose:()=>{p(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(h,g)=>{p(!1),e.onSubmitSuccess?.(h,g)},onSubmitError:h=>{e.onSubmitError?.(h)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:f}),a)};return d}}));function uE({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 lE(e){const t=oe.createElement("style"),n="#1A141F",r="#302735";return t.textContent=`
396
396
  .editor {
397
397
  display: flex;
398
398
  flex-grow: 1;
@@ -484,15 +484,15 @@ ${TE}
484
484
  .editor__rect:hover button {
485
485
  opacity: 1;
486
486
  }
487
- `,e&&t.setAttribute("nonce",e),t}function AE({h:e}){return function({action:n,setAction:r,options:s}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:`editor__tool ${n==="highlight"?"editor__tool--active":""}`,onClick:()=>{r(n==="highlight"?"":"highlight")}},s.highlightToolText),e("button",{type:"button",class:`editor__tool ${n==="hide"?"editor__tool--active":""}`,onClick:()=>{r(n==="hide"?"":"hide")}},s.hideToolText)))}}function xE({hooks:e}){function t(){const[n,r]=e.useState(Ke.devicePixelRatio??1);return e.useEffect(()=>{const s=()=>{r(Ke.devicePixelRatio)},o=matchMedia(`(resolution: ${Ke.devicePixelRatio}dppx)`);return o.addEventListener("change",s),()=>{o.removeEventListener("change",s)}},[]),n}return function({onBeforeScreenshot:r,onScreenshot:s,onAfterScreenshot:o,onError:i}){const a=t();e.useEffect(()=>{(async()=>{r();const u=await cr.mediaDevices.getDisplayMedia({video:{width:Ke.innerWidth*a,height:Ke.innerHeight*a},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),d=oe.createElement("video");await new Promise((l,p)=>{d.srcObject=u,d.onloadedmetadata=()=>{s(d,a),u.getTracks().forEach(f=>f.stop()),l()},d.play().catch(p)}),o()})().catch(i)},[])}}function ME(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 Nt(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function Wo(e,t){Nt(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function jo(e,t,n){Nt(e,{alpha:!0},(r,s)=>{n.length&&(s.fillStyle="rgba(0, 0, 0, 0.25)",s.fillRect(0,0,r.width,r.height)),n.forEach(o=>{ME(o,s,t)})})}function OE({h:e,hooks:t,outputBuffer:n,dialog:r,options:s}){const o=xE({hooks:t}),i=AE({h:e}),a=CE({h:e}),c={__html:RE(s.styleNonce).innerText},u=r.el.style,d=({screenshot:l})=>{const[p,f]=t.useState("highlight"),[h,g]=t.useState([]),_=t.useRef(null),y=t.useRef(null),S=t.useRef(null),O=t.useRef(null),[v,N]=t.useState(1),k=t.useMemo(()=>{const I=oe.getElementById(s.id);if(!I)return"white";const A=getComputedStyle(I);return A.getPropertyValue("--button-primary-background")||A.getPropertyValue("--accent-background")},[s.id]);t.useLayoutEffect(()=>{const I=()=>{const A=_.current;A&&(Nt(l.canvas,{alpha:!1},G=>{const K=Math.min(A.clientWidth/G.width,A.clientHeight/G.height);N(K)}),(A.clientHeight===0||A.clientWidth===0)&&setTimeout(I,0))};return I(),Ke.addEventListener("resize",I),()=>{Ke.removeEventListener("resize",I)}},[l]);const b=t.useCallback((I,A)=>{Nt(I,{alpha:!0},(G,K)=>{K.scale(A,A),G.width=l.canvas.width,G.height=l.canvas.height})},[l]);t.useEffect(()=>{b(y.current,l.dpi),Wo(y.current,l.canvas)},[l]),t.useEffect(()=>{b(S.current,l.dpi),Nt(S.current,{alpha:!0},(I,A)=>{A.clearRect(0,0,I.width,I.height)}),jo(S.current,k,h)},[h,k]),t.useEffect(()=>{b(n,l.dpi),Wo(n,l.canvas),Nt(oe.createElement("canvas"),{alpha:!0},(I,A)=>{A.scale(l.dpi,l.dpi),I.width=l.canvas.width,I.height=l.canvas.height,jo(I,k,h),Wo(n,I)})},[h,l,k]);const w=I=>{if(!p||!O.current)return;const A=O.current.getBoundingClientRect(),G={type:p,x:I.offsetX/v,y:I.offsetY/v},K=(L,P)=>{const M=(P.clientX-A.x)/v,J=(P.clientY-A.y)/v;return{type:L.type,x:Math.min(L.x,M),y:Math.min(L.y,J),w:Math.abs(M-L.x),h:Math.abs(J-L.y)}},X=L=>{Nt(S.current,{alpha:!0},(P,M)=>{M.clearRect(0,0,P.width,P.height)}),jo(S.current,k,[...h,K(G,L)])},F=L=>{const P=K(G,L);P.w*v>=1&&P.h*v>=1&&g(M=>[...M,P]),oe.removeEventListener("mousemove",X),oe.removeEventListener("mouseup",F)};oe.addEventListener("mousemove",X),oe.addEventListener("mouseup",F)},E=t.useCallback(I=>A=>{A.preventDefault(),A.stopPropagation(),g(G=>{const K=[...G];return K.splice(I,1),K})},[]),C={width:`${l.canvas.width*v}px`,height:`${l.canvas.height*v}px`},D=I=>{I.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:s.styleNonce,dangerouslySetInnerHTML:c}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:_},e("canvas",{ref:y,id:"background",style:C}),e("canvas",{ref:S,id:"foreground",style:C}),e("div",{ref:O,onMouseDown:w,style:C},h.map((I,A)=>e("div",{key:A,class:"editor__rect",style:{top:`${I.y*v}px`,left:`${I.x*v}px`,width:`${I.w*v}px`,height:`${I.h*v}px`}},e("button",{"aria-label":s.removeHighlightText,onClick:E(A),onMouseDown:D,onMouseUp:D,type:"button"},e(a,null))))))),e(i,{options:s,action:p,setAction:f}))};return function({onError:p}){const[f,h]=t.useState();return o({onBeforeScreenshot:t.useCallback(()=>{u.display="none"},[]),onScreenshot:t.useCallback((g,_)=>{Nt(oe.createElement("canvas"),{alpha:!1},(y,S)=>{S.scale(_,_),y.width=g.videoWidth,y.height=g.videoHeight,S.drawImage(g,0,0,y.width,y.height),h({canvas:y,dpi:_})}),n.width=g.videoWidth,n.height=g.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{u.display="block"},[]),onError:t.useCallback(g=>{u.display="block",p(g)},[])}),f?e(d,{screenshot:f}):e("div",null)}}const NE=(()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const s=oe.createElement("canvas");return{input:OE({h:e,hooks:t,outputBuffer:s,dialog:n,options:r}),value:async()=>{const o=await new Promise(i=>{s.toBlob(i,"image/png")});if(o)return{data:new Uint8Array(await o.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}})),B=$;let ki=0;function If(){return ki>0}function LE(){ki++,setTimeout(()=>{ki--})}function Un(e,t={}){function n(s){return typeof s=="function"}if(!n(e))return e;try{const s=e.__sentry_wrapped__;if(s)return typeof s=="function"?s:e;if(Ji(e))return e}catch{return e}const r=function(...s){try{const o=s.map(i=>Un(i,t));return e.apply(this,o)}catch(o){throw LE(),tt(i=>{i.addEventProcessor(a=>(t.mechanism&&(ai(a,void 0),vt(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),Ce(o)}),o}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}Vl(r,e),Fe(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function Oa(){const e=mn(),{referrer:t}=B.document||{},{userAgent:n}=B.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}const PE={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",graphqlClientIntegration:"graphqlclient",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",browserProfilingIntegration:"browserprofiling",moduleMetadataIntegration:"modulemetadata",instrumentAnthropicAiClient:"instrumentanthropicaiclient",instrumentOpenAiClient:"instrumentopenaiclient",instrumentGoogleGenAIClient:"instrumentgooglegenaiclient"},Pu=B;async function DE(e,t){const n=PE[e],r=Pu.Sentry=Pu.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);const s=r[e];if(typeof s=="function"&&!("_isShim"in s))return s;const o=FE(n),i=B.document.createElement("script");i.src=o,i.crossOrigin="anonymous",i.referrerPolicy="strict-origin",t&&i.setAttribute("nonce",t);const a=new Promise((l,p)=>{i.addEventListener("load",()=>l()),i.addEventListener("error",p)}),c=B.document.currentScript,u=B.document.body||B.document.head||c?.parentElement;if(u)u.appendChild(i);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await a}catch{throw new Error(`Error when loading integration: ${e}`)}const d=r[e];if(typeof d!="function")throw new Error(`Could not load integration: ${e}`);return d}function FE(e){const n=x()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${Ft}/${e}.min.js`,n).toString()}const vR=hf({lazyLoadIntegration:DE}),TR=hf({getModalIntegration:()=>kE,getScreenshotIntegration:()=>NE});function Na(e,t){const n=La(e,t),r={type:WE(t),value:jE(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function $E(e,t,n,r){const o=x()?.getOptions().normalizeDepth,i=YE(t),a={__serialized__:_d(t,o)};if(i)return{exception:{values:[Na(e,i)]},extra:a};const c={exception:{values:[{type:ro(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:GE(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=La(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function zo(e,t){return{exception:{values:[Na(e,t)]}}}function La(e,t){const n=t.stacktrace||t.stack||"",r=UE(t),s=HE(t);try{return e(n,r,s)}catch{}return[]}const BE=/Minified React error #\d+;/i;function UE(e){return e&&BE.test(e.message)?1:0}function HE(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function kf(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function WE(e){const t=e?.name;return!t&&kf(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function jE(e){const t=e?.message;return kf(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function zE(e,t,n,r){const s=n?.syntheticException||void 0,o=yo(e,t,s,r);return vt(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),uo(o)}function qE(e,t,n="info",r,s){const o=r?.syntheticException||void 0,i=Ci(e,t,o,s);return i.level=n,r?.event_id&&(i.event_id=r.event_id),uo(i)}function yo(e,t,n,r,s){let o;if(jl(t)&&t.error)return zo(e,t.error);if(mc(t)||Th(t)){const i=t;if("stack"in t)o=zo(e,t);else{const a=i.name||(mc(i)?"DOMError":"DOMException"),c=i.message?`${a}: ${i.message}`:a;o=Ci(e,c,n,r),ai(o,c)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return $t(t)?zo(e,t):ut(t)||ro(t)?(o=$E(e,t,n,s),vt(o,{synthetic:!0}),o):(o=Ci(e,t,n,r),ai(o,`${t}`),vt(o,{synthetic:!0}),o)}function Ci(e,t,n,r){const s={};if(r&&n){const o=La(e,n);o.length&&(s.exception={values:[{value:t,stacktrace:{frames:o}}]}),vt(s,{synthetic:!0})}if(no(t)){const{__sentry_template_string__:o,__sentry_template_values__:i}=t;return s.logentry={message:o,params:i},s}return s.message=t,s}function GE(e,{isUnhandledRejection:t}){const n=Ah(e),r=t?"promise rejection":"exception";return jl(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:ro(e)?`Event \`${VE(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function VE(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function YE(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}class JE extends qg{constructor(t){const n=KE(t),r=B.SENTRY_SDK_SOURCE||_b();p_(n,"browser",["browser"],r),n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:n.sendDefaultPii?"auto":"never",...n._metadata.sdk.settings}),super(n);const{sendDefaultPii:s,sendClientReports:o,enableLogs:i,_experiments:a}=this._options;B.document&&(o||i||a?.enableMetrics)&&B.document.addEventListener("visibilitychange",()=>{B.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),i&&aa(this),a?.enableMetrics&&ua(this))}),s&&this.on("beforeSendSession",f_)}eventFromException(t,n){return zE(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return qE(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,s){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,s)}}function KE(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:B.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const pn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,j=$,XE=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Nr=(e,t,n,r)=>{let s,o;return i=>{t.value>=0&&(i||r)&&(o=t.value-(s??0),(o||s===void 0)&&(s=t.value,t.delta=o,t.rating=XE(t.value,n),e(t)))}},QE=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Lr=(e=!0)=>{const t=j.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},nr=()=>Lr()?.activationStart??0,Pr=(e,t=-1)=>{const n=Lr();let r="navigate";return n&&(j.document?.prerendering||nr()>0?r="prerender":j.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:QE(),navigationType:r}},qo=new WeakMap;function Pa(e,t){return qo.get(e)||qo.set(e,new t),qo.get(e)}class Us{constructor(){Us.prototype.__init.call(this),Us.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}}const rr=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{Promise.resolve().then(()=>{t(s.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},Da=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let ur=-1;const ZE=()=>j.document?.visibilityState==="hidden"&&!j.document?.prerendering?0:1/0,Hs=e=>{j.document.visibilityState==="hidden"&&ur>-1&&(ur=e.type==="visibilitychange"?e.timeStamp:0,tv())},ev=()=>{addEventListener("visibilitychange",Hs,!0),addEventListener("prerenderingchange",Hs,!0)},tv=()=>{removeEventListener("visibilitychange",Hs,!0),removeEventListener("prerenderingchange",Hs,!0)},Fa=()=>{if(j.document&&ur<0){const e=nr();ur=(j.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??ZE(),ev()}return{get firstHiddenTime(){return ur}}},So=e=>{j.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},nv=[1800,3e3],rv=(e,t={})=>{So(()=>{const n=Fa(),r=Pr("FCP");let s;const i=rr("paint",a=>{for(const c of a)c.name==="first-contentful-paint"&&(i.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-nr(),0),r.entries.push(c),s(!0)))});i&&(s=Nr(e,r,nv,t.reportAllChanges))})},sv=[.1,.25],ov=(e,t={})=>{rv(Da(()=>{const n=Pr("CLS",0);let r;const s=Pa(t,Us),o=a=>{for(const c of a)s._processEntry(c);s._sessionValue>n.value&&(n.value=s._sessionValue,n.entries=s._sessionEntries,r())},i=rr("layout-shift",o);i&&(r=Nr(e,n,sv,t.reportAllChanges),j.document?.addEventListener("visibilitychange",()=>{j.document?.visibilityState==="hidden"&&(o(i.takeRecords()),r(!0))}),j?.setTimeout?.(r))}))};let Cf=0,Go=1/0,Jr=0;const iv=e=>{e.forEach(t=>{t.interactionId&&(Go=Math.min(Go,t.interactionId),Jr=Math.max(Jr,t.interactionId),Cf=Jr?(Jr-Go)/7+1:0)})};let Ri;const Rf=()=>Ri?Cf:performance.interactionCount||0,av=()=>{"interactionCount"in performance||Ri||(Ri=rr("event",iv,{type:"event",buffered:!0,durationThreshold:0}))},Vo=10;let Af=0;const cv=()=>Rf()-Af;class Ws{constructor(){Ws.prototype.__init.call(this),Ws.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){Af=Rf(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(cv()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<Vo||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((s,o)=>o._latency-s._latency),this._longestInteractionList.length>Vo){const s=this._longestInteractionList.splice(Vo);for(const o of s)this._longestInteractionMap.delete(o.id)}this._onAfterProcessingINPCandidate?.(r)}}}const $a=e=>{const t=n=>{(n.type==="pagehide"||j.document?.visibilityState==="hidden")&&e(n)};j.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},xf=e=>{const t=j.requestIdleCallback||j.setTimeout;j.document?.visibilityState==="hidden"?e():(e=Da(e),t(e),$a(e))},uv=[200,500],lv=40,dv=(e,t={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&So(()=>{av();const n=Pr("INP");let r;const s=Pa(t,Ws),o=a=>{xf(()=>{for(const u of a)s._processEntry(u);const c=s._estimateP98LongestInteraction();c&&c._latency!==n.value&&(n.value=c._latency,n.entries=c.entries,r())})},i=rr("event",o,{durationThreshold:t.durationThreshold??lv});r=Nr(e,n,uv,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),$a(()=>{o(i.takeRecords()),r(!0)}))})};class fv{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const pv=[2500,4e3],hv=(e,t={})=>{So(()=>{const n=Fa(),r=Pr("LCP");let s;const o=Pa(t,fv),i=c=>{t.reportAllChanges||(c=c.slice(-1));for(const u of c)o._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-nr(),0),r.entries=[u],s())},a=rr("largest-contentful-paint",i);if(a){s=Nr(e,r,pv,t.reportAllChanges);const c=Da(()=>{i(a.takeRecords()),a.disconnect(),s(!0)});for(const u of["keydown","click","visibilitychange"])j.document&&addEventListener(u,()=>xf(c),{capture:!0,once:!0})}})},mv=[800,1800],Ai=e=>{j.document?.prerendering?So(()=>Ai(e)):j.document?.readyState!=="complete"?addEventListener("load",()=>Ai(e),!0):setTimeout(e)},gv=(e,t={})=>{const n=Pr("TTFB"),r=Nr(e,n,mv,t.reportAllChanges);Ai(()=>{const s=Lr();s&&(n.value=Math.max(s.responseStart-nr(),0),n.entries=[s],r(!0))})},lr={},js={};let Mf,Of,Nf,Lf;function Ba(e,t=!1){return bo("cls",e,yv,Mf,t)}function Ua(e,t=!1){return bo("lcp",e,Sv,Of,t)}function _v(e){return bo("ttfb",e,bv,Nf)}function Pf(e){return bo("inp",e,Ev,Lf)}function hn(e,t){return Df(e,t),js[e]||(vv(e),js[e]=!0),Ff(e,t)}function Dr(e,t){const n=lr[e];if(n?.length)for(const r of n)try{r(t)}catch(s){pn&&m.error(`Error while triggering instrumentation handler.
487
+ `,e&&t.setAttribute("nonce",e),t}function dE({h:e}){return function({action:n,setAction:r,options:s}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:`editor__tool ${n==="highlight"?"editor__tool--active":""}`,onClick:()=>{r(n==="highlight"?"":"highlight")}},s.highlightToolText),e("button",{type:"button",class:`editor__tool ${n==="hide"?"editor__tool--active":""}`,onClick:()=>{r(n==="hide"?"":"hide")}},s.hideToolText)))}}function fE({hooks:e}){function t(){const[n,r]=e.useState(Je.devicePixelRatio??1);return e.useEffect(()=>{const s=()=>{r(Je.devicePixelRatio)},o=matchMedia(`(resolution: ${Je.devicePixelRatio}dppx)`);return o.addEventListener("change",s),()=>{o.removeEventListener("change",s)}},[]),n}return function({onBeforeScreenshot:r,onScreenshot:s,onAfterScreenshot:o,onError:i}){const a=t();e.useEffect(()=>{(async()=>{r();const u=await tr.mediaDevices.getDisplayMedia({video:{width:Je.innerWidth*a,height:Je.innerHeight*a},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),d=oe.createElement("video");await new Promise((l,p)=>{d.srcObject=u,d.onloadedmetadata=()=>{s(d,a),u.getTracks().forEach(f=>f.stop()),l()},d.play().catch(p)}),o()})().catch(i)},[])}}function pE(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 Rt(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function Lo(e,t){Rt(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function Po(e,t,n){Rt(e,{alpha:!0},(r,s)=>{n.length&&(s.fillStyle="rgba(0, 0, 0, 0.25)",s.fillRect(0,0,r.width,r.height)),n.forEach(o=>{pE(o,s,t)})})}function hE({h:e,hooks:t,outputBuffer:n,dialog:r,options:s}){const o=fE({hooks:t}),i=dE({h:e}),a=uE({h:e}),c={__html:lE(s.styleNonce).innerText},u=r.el.style,d=({screenshot:l})=>{const[p,f]=t.useState("highlight"),[h,g]=t.useState([]),_=t.useRef(null),y=t.useRef(null),S=t.useRef(null),O=t.useRef(null),[v,N]=t.useState(1),k=t.useMemo(()=>{const w=oe.getElementById(s.id);if(!w)return"white";const A=getComputedStyle(w);return A.getPropertyValue("--button-primary-background")||A.getPropertyValue("--accent-background")},[s.id]);t.useLayoutEffect(()=>{const w=()=>{const A=_.current;A&&(Rt(l.canvas,{alpha:!1},G=>{const K=Math.min(A.clientWidth/G.width,A.clientHeight/G.height);N(K)}),(A.clientHeight===0||A.clientWidth===0)&&setTimeout(w,0))};return w(),Je.addEventListener("resize",w),()=>{Je.removeEventListener("resize",w)}},[l]);const b=t.useCallback((w,A)=>{Rt(w,{alpha:!0},(G,K)=>{K.scale(A,A),G.width=l.canvas.width,G.height=l.canvas.height})},[l]);t.useEffect(()=>{b(y.current,l.dpi),Lo(y.current,l.canvas)},[l]),t.useEffect(()=>{b(S.current,l.dpi),Rt(S.current,{alpha:!0},(w,A)=>{A.clearRect(0,0,w.width,w.height)}),Po(S.current,k,h)},[h,k]),t.useEffect(()=>{b(n,l.dpi),Lo(n,l.canvas),Rt(oe.createElement("canvas"),{alpha:!0},(w,A)=>{A.scale(l.dpi,l.dpi),w.width=l.canvas.width,w.height=l.canvas.height,Po(w,k,h),Lo(n,w)})},[h,l,k]);const I=w=>{if(!p||!O.current)return;const A=O.current.getBoundingClientRect(),G={type:p,x:w.offsetX/v,y:w.offsetY/v},K=(L,P)=>{const M=(P.clientX-A.x)/v,J=(P.clientY-A.y)/v;return{type:L.type,x:Math.min(L.x,M),y:Math.min(L.y,J),w:Math.abs(M-L.x),h:Math.abs(J-L.y)}},X=L=>{Rt(S.current,{alpha:!0},(P,M)=>{M.clearRect(0,0,P.width,P.height)}),Po(S.current,k,[...h,K(G,L)])},F=L=>{const P=K(G,L);P.w*v>=1&&P.h*v>=1&&g(M=>[...M,P]),oe.removeEventListener("mousemove",X),oe.removeEventListener("mouseup",F)};oe.addEventListener("mousemove",X),oe.addEventListener("mouseup",F)},E=t.useCallback(w=>A=>{A.preventDefault(),A.stopPropagation(),g(G=>{const K=[...G];return K.splice(w,1),K})},[]),C={width:`${l.canvas.width*v}px`,height:`${l.canvas.height*v}px`},D=w=>{w.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:s.styleNonce,dangerouslySetInnerHTML:c}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:_},e("canvas",{ref:y,id:"background",style:C}),e("canvas",{ref:S,id:"foreground",style:C}),e("div",{ref:O,onMouseDown:I,style:C},h.map((w,A)=>e("div",{key:A,class:"editor__rect",style:{top:`${w.y*v}px`,left:`${w.x*v}px`,width:`${w.w*v}px`,height:`${w.h*v}px`}},e("button",{"aria-label":s.removeHighlightText,onClick:E(A),onMouseDown:D,onMouseUp:D,type:"button"},e(a,null))))))),e(i,{options:s,action:p,setAction:f}))};return function({onError:p}){const[f,h]=t.useState();return o({onBeforeScreenshot:t.useCallback(()=>{u.display="none"},[]),onScreenshot:t.useCallback((g,_)=>{Rt(oe.createElement("canvas"),{alpha:!1},(y,S)=>{S.scale(_,_),y.width=g.videoWidth,y.height=g.videoHeight,S.drawImage(g,0,0,y.width,y.height),h({canvas:y,dpi:_})}),n.width=g.videoWidth,n.height=g.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{u.display="block"},[]),onError:t.useCallback(g=>{u.display="block",p(g)},[])}),f?e(d,{screenshot:f}):e("div",null)}}const mE=(()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const s=oe.createElement("canvas");return{input:hE({h:e,hooks:t,outputBuffer:s,dialog:n,options:r}),value:async()=>{const o=await new Promise(i=>{s.toBlob(i,"image/png")});if(o)return{data:new Uint8Array(await o.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}})),B=$;let gi=0;function df(){return gi>0}function gE(){gi++,setTimeout(()=>{gi--})}function Nn(e,t={}){function n(s){return typeof s=="function"}if(!n(e))return e;try{const s=e.__sentry_wrapped__;if(s)return typeof s=="function"?s:e;if(Bi(e))return e}catch{return e}const r=function(...s){try{const o=s.map(i=>Nn(i,t));return e.apply(this,o)}catch(o){throw gE(),et(i=>{i.addEventProcessor(a=>(t.mechanism&&(Xo(a,void 0),yt(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),ke(o)}),o}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}Nl(r,e),De(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function va(){const e=un(),{referrer:t}=B.document||{},{userAgent:n}=B.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}const _E={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",graphqlClientIntegration:"graphqlclient",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",browserProfilingIntegration:"browserprofiling",moduleMetadataIntegration:"modulemetadata",instrumentAnthropicAiClient:"instrumentanthropicaiclient",instrumentOpenAiClient:"instrumentopenaiclient",instrumentGoogleGenAIClient:"instrumentgooglegenaiclient"},wu=B;async function yE(e,t){const n=_E[e],r=wu.Sentry=wu.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);const s=r[e];if(typeof s=="function"&&!("_isShim"in s))return s;const o=SE(n),i=B.document.createElement("script");i.src=o,i.crossOrigin="anonymous",i.referrerPolicy="strict-origin",t&&i.setAttribute("nonce",t);const a=new Promise((l,p)=>{i.addEventListener("load",()=>l()),i.addEventListener("error",p)}),c=B.document.currentScript,u=B.document.body||B.document.head||c?.parentElement;if(u)u.appendChild(i);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await a}catch{throw new Error(`Error when loading integration: ${e}`)}const d=r[e];if(typeof d!="function")throw new Error(`Could not load integration: ${e}`);return d}function SE(e){const n=x()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${Ot}/${e}.min.js`,n).toString()}const oR=Zd({lazyLoadIntegration:yE}),iR=Zd({getModalIntegration:()=>cE,getScreenshotIntegration:()=>mE});function Ta(e,t){const n=Ia(e,t),r={type:IE(t),value:wE(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function bE(e,t,n,r){const o=x()?.getOptions().normalizeDepth,i=xE(t),a={__serialized__:rd(t,o)};if(i)return{exception:{values:[Ta(e,i)]},extra:a};const c={exception:{values:[{type:Js(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:RE(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=Ia(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function Do(e,t){return{exception:{values:[Ta(e,t)]}}}function Ia(e,t){const n=t.stacktrace||t.stack||"",r=vE(t),s=TE(t);try{return e(n,r,s)}catch{}return[]}const EE=/Minified React error #\d+;/i;function vE(e){return e&&EE.test(e.message)?1:0}function TE(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function ff(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function IE(e){const t=e?.name;return!t&&ff(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function wE(e){const t=e?.message;return ff(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function kE(e,t,n,r){const s=n?.syntheticException||void 0,o=uo(e,t,s,r);return yt(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),to(o)}function CE(e,t,n="info",r,s){const o=r?.syntheticException||void 0,i=_i(e,t,o,s);return i.level=n,r?.event_id&&(i.event_id=r.event_id),to(i)}function uo(e,t,n,r,s){let o;if(Al(t)&&t.error)return Do(e,t.error);if(oc(t)||oh(t)){const i=t;if("stack"in t)o=Do(e,t);else{const a=i.name||(oc(i)?"DOMError":"DOMException"),c=i.message?`${a}: ${i.message}`:a;o=_i(e,c,n,r),Xo(o,c)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return Nt(t)?Do(e,t):it(t)||Js(t)?(o=bE(e,t,n,s),yt(o,{synthetic:!0}),o):(o=_i(e,t,n,r),Xo(o,`${t}`),yt(o,{synthetic:!0}),o)}function _i(e,t,n,r){const s={};if(r&&n){const o=Ia(e,n);o.length&&(s.exception={values:[{value:t,stacktrace:{frames:o}}]}),yt(s,{synthetic:!0})}if(Ys(t)){const{__sentry_template_string__:o,__sentry_template_values__:i}=t;return s.logentry={message:o,params:i},s}return s.message=t,s}function RE(e,{isUnhandledRejection:t}){const n=dh(e),r=t?"promise rejection":"exception";return Al(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Js(e)?`Event \`${AE(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function AE(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function xE(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}class ME extends Cg{constructor(t){const n=OE(t),r=B.SENTRY_SDK_SOURCE||ZS();Jg(n,"browser",["browser"],r),n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:n.sendDefaultPii?"auto":"never",...n._metadata.sdk.settings}),super(n);const{sendDefaultPii:s,sendClientReports:o,enableLogs:i,_experiments:a}=this._options;B.document&&(o||i||a?.enableMetrics)&&B.document.addEventListener("visibilitychange",()=>{B.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),i&&Xi(this),a?.enableMetrics&&Zi(this))}),s&&this.on("beforeSendSession",Yg)}eventFromException(t,n){return kE(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return CE(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,s){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,s)}}function OE(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:B.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const an=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,j=$,NE=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",kr=(e,t,n,r)=>{let s,o;return i=>{t.value>=0&&(i||r)&&(o=t.value-(s??0),(o||s===void 0)&&(s=t.value,t.delta=o,t.rating=NE(t.value,n),e(t)))}},LE=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Cr=(e=!0)=>{const t=j.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Jn=()=>Cr()?.activationStart??0,Rr=(e,t=-1)=>{const n=Cr();let r="navigate";return n&&(j.document?.prerendering||Jn()>0?r="prerender":j.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:LE(),navigationType:r}},Fo=new WeakMap;function wa(e,t){return Fo.get(e)||Fo.set(e,new t),Fo.get(e)}class Os{constructor(){Os.prototype.__init.call(this),Os.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}}const Kn=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{Promise.resolve().then(()=>{t(s.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},ka=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let nr=-1;const PE=()=>j.document?.visibilityState==="hidden"&&!j.document?.prerendering?0:1/0,Ns=e=>{j.document.visibilityState==="hidden"&&nr>-1&&(nr=e.type==="visibilitychange"?e.timeStamp:0,FE())},DE=()=>{addEventListener("visibilitychange",Ns,!0),addEventListener("prerenderingchange",Ns,!0)},FE=()=>{removeEventListener("visibilitychange",Ns,!0),removeEventListener("prerenderingchange",Ns,!0)},Ca=()=>{if(j.document&&nr<0){const e=Jn();nr=(j.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??PE(),DE()}return{get firstHiddenTime(){return nr}}},lo=e=>{j.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},$E=[1800,3e3],BE=(e,t={})=>{lo(()=>{const n=Ca(),r=Rr("FCP");let s;const i=Kn("paint",a=>{for(const c of a)c.name==="first-contentful-paint"&&(i.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-Jn(),0),r.entries.push(c),s(!0)))});i&&(s=kr(e,r,$E,t.reportAllChanges))})},UE=[.1,.25],HE=(e,t={})=>{BE(ka(()=>{const n=Rr("CLS",0);let r;const s=wa(t,Os),o=a=>{for(const c of a)s._processEntry(c);s._sessionValue>n.value&&(n.value=s._sessionValue,n.entries=s._sessionEntries,r())},i=Kn("layout-shift",o);i&&(r=kr(e,n,UE,t.reportAllChanges),j.document?.addEventListener("visibilitychange",()=>{j.document?.visibilityState==="hidden"&&(o(i.takeRecords()),r(!0))}),j?.setTimeout?.(r))}))};let pf=0,$o=1/0,Wr=0;const WE=e=>{e.forEach(t=>{t.interactionId&&($o=Math.min($o,t.interactionId),Wr=Math.max(Wr,t.interactionId),pf=Wr?(Wr-$o)/7+1:0)})};let yi;const hf=()=>yi?pf:performance.interactionCount||0,jE=()=>{"interactionCount"in performance||yi||(yi=Kn("event",WE,{type:"event",buffered:!0,durationThreshold:0}))},Bo=10;let mf=0;const zE=()=>hf()-mf;class Ls{constructor(){Ls.prototype.__init.call(this),Ls.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){mf=hf(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(zE()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<Bo||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((s,o)=>o._latency-s._latency),this._longestInteractionList.length>Bo){const s=this._longestInteractionList.splice(Bo);for(const o of s)this._longestInteractionMap.delete(o.id)}this._onAfterProcessingINPCandidate?.(r)}}}const Ra=e=>{const t=n=>{(n.type==="pagehide"||j.document?.visibilityState==="hidden")&&e(n)};j.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},gf=e=>{const t=j.requestIdleCallback||j.setTimeout;j.document?.visibilityState==="hidden"?e():(e=ka(e),t(e),Ra(e))},qE=[200,500],GE=40,VE=(e,t={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&lo(()=>{jE();const n=Rr("INP");let r;const s=wa(t,Ls),o=a=>{gf(()=>{for(const u of a)s._processEntry(u);const c=s._estimateP98LongestInteraction();c&&c._latency!==n.value&&(n.value=c._latency,n.entries=c.entries,r())})},i=Kn("event",o,{durationThreshold:t.durationThreshold??GE});r=kr(e,n,qE,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),Ra(()=>{o(i.takeRecords()),r(!0)}))})};class YE{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const JE=[2500,4e3],KE=(e,t={})=>{lo(()=>{const n=Ca(),r=Rr("LCP");let s;const o=wa(t,YE),i=c=>{t.reportAllChanges||(c=c.slice(-1));for(const u of c)o._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-Jn(),0),r.entries=[u],s())},a=Kn("largest-contentful-paint",i);if(a){s=kr(e,r,JE,t.reportAllChanges);const c=ka(()=>{i(a.takeRecords()),a.disconnect(),s(!0)});for(const u of["keydown","click","visibilitychange"])j.document&&addEventListener(u,()=>gf(c),{capture:!0,once:!0})}})},XE=[800,1800],Si=e=>{j.document?.prerendering?lo(()=>Si(e)):j.document?.readyState!=="complete"?addEventListener("load",()=>Si(e),!0):setTimeout(e)},QE=(e,t={})=>{const n=Rr("TTFB"),r=kr(e,n,XE,t.reportAllChanges);Si(()=>{const s=Cr();s&&(n.value=Math.max(s.responseStart-Jn(),0),n.entries=[s],r(!0))})},rr={},Ps={};let _f,yf,Sf,bf;function Aa(e,t=!1){return fo("cls",e,ev,_f,t)}function xa(e,t=!1){return fo("lcp",e,tv,yf,t)}function ZE(e){return fo("ttfb",e,nv,Sf)}function Ef(e){return fo("inp",e,rv,bf)}function cn(e,t){return vf(e,t),Ps[e]||(sv(e),Ps[e]=!0),Tf(e,t)}function Ar(e,t){const n=rr[e];if(n?.length)for(const r of n)try{r(t)}catch(s){an&&m.error(`Error while triggering instrumentation handler.
488
488
  Type: ${e}
489
- Name: ${bt(r)}
490
- Error:`,s)}}function yv(){return ov(e=>{Dr("cls",{metric:e}),Mf=e},{reportAllChanges:!0})}function Sv(){return hv(e=>{Dr("lcp",{metric:e}),Of=e},{reportAllChanges:!0})}function bv(){return gv(e=>{Dr("ttfb",{metric:e}),Nf=e})}function Ev(){return dv(e=>{Dr("inp",{metric:e}),Lf=e})}function bo(e,t,n,r,s=!1){Df(e,t);let o;return js[e]||(o=n(),js[e]=!0),r&&t({metric:r}),Ff(e,t,s?o:void 0)}function vv(e){const t={};e==="event"&&(t.durationThreshold=0),rr(e,n=>{Dr(e,{entries:n})},t)}function Df(e,t){lr[e]=lr[e]||[],lr[e].push(t)}function Ff(e,t,n){return()=>{n&&n();const r=lr[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function Tv(e){return"duration"in e}function Yo(e){return typeof e=="number"&&isFinite(e)}function Wt(e,t,n,{...r}){const s=z(e).start_timestamp;return s&&s>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),co(e,()=>{const o=Qn({startTime:t,...r});return o&&o.end(n),o})}function Ha(e){const t=x();if(!t)return;const{name:n,transaction:r,attributes:s,startTime:o}=e,{release:i,environment:a,sendDefaultPii:c}=t.getOptions(),d=t.getIntegrationByName("Replay")?.getReplayId(),l=q(),p=l.getUser(),f=p!==void 0?p.email||p.id||p.ip_address:void 0;let h;try{h=l.getScopeData().contexts.profile.profile_id}catch{}const g={release:i,environment:a,user:f||void 0,profile_id:h||void 0,replay_id:d||void 0,transaction:r,"user_agent.original":j.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...s};return Qn({name:n,attributes:g,startTime:o,experimental:{standalone:!0}})}function Fr(){return j.addEventListener&&j.performance}function ge(e){return e/1e3}function wv(e){let t="unknown",n="unknown",r="";for(const s of e){if(s==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=s}return r===e&&(t=r),{name:t,version:n}}function $f(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Bf(e,t){let n,r=!1;function s(a){!r&&n&&t(a,n),r=!0}$a(()=>{s("pagehide")});const o=e.on("beforeStartNavigationSpan",(a,c)=>{c?.isRedirect||(s("navigation"),o(),i())}),i=e.on("afterStartPageLoadSpan",a=>{n=a.spanContext().spanId,i()})}function Iv(e){let t=0,n;if(!$f("layout-shift"))return;const r=Ba(({metric:s})=>{const o=s.entries[s.entries.length-1];o&&(t=s.value,n=o)},!0);Bf(e,(s,o)=>{kv(t,n,o,s),r()})}function kv(e,t,n,r){pn&&m.log(`Sending CLS span (${e})`);const s=t?ge((Ae()||0)+t.startTime):he(),o=q().getScopeData().transactionName,i=t?De(t.sources[0]?.node):"Layout shift",a={[de]:"auto.http.browser.cls",[Ve]:"ui.webvital.cls",[Kn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((u,d)=>{a[`cls.source.${d+1}`]=De(u.node)});const c=Ha({name:i,transaction:o,attributes:a,startTime:s});c&&(c.addEvent("cls",{[wr]:"",[Ir]:e}),c.end(s))}function Cv(e){let t=0,n;if(!$f("largest-contentful-paint"))return;const r=Ua(({metric:s})=>{const o=s.entries[s.entries.length-1];o&&(t=s.value,n=o)},!0);Bf(e,(s,o)=>{Rv(t,n,o,s),r()})}function Rv(e,t,n,r){pn&&m.log(`Sending LCP span (${e})`);const s=ge((Ae()||0)+(t?.startTime||0)),o=q().getScopeData().transactionName,i=t?De(t.element):"Largest contentful paint",a={[de]:"auto.http.browser.lcp",[Ve]:"ui.webvital.lcp",[Kn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=De(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url.trim().slice(0,200)),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));const c=Ha({name:i,transaction:o,attributes:a,startTime:s});c&&(c.addEvent("lcp",{[wr]:"millisecond",[Ir]:e}),c.end(s))}function je(e){return e&&((Ae()||performance.timeOrigin)+e)/1e3}function Uf(e){const t={};if(e.nextHopProtocol!=null){const{name:n,version:r}=wv(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return Ae()||Fr()?.timeOrigin?Av({...t,"http.request.redirect_start":je(e.redirectStart),"http.request.redirect_end":je(e.redirectEnd),"http.request.worker_start":je(e.workerStart),"http.request.fetch_start":je(e.fetchStart),"http.request.domain_lookup_start":je(e.domainLookupStart),"http.request.domain_lookup_end":je(e.domainLookupEnd),"http.request.connect_start":je(e.connectStart),"http.request.secure_connection_start":je(e.secureConnectionStart),"http.request.connection_end":je(e.connectEnd),"http.request.request_start":je(e.requestStart),"http.request.response_start":je(e.responseStart),"http.request.response_end":je(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function Av(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const xv=2147483647;let Du=0,Je={},Pe,zs;function Mv({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=Fr();if(r&&Ae()){r.mark&&j.performance.mark("sentry-tracing-init");const s=t?Cv(n):Dv(),o=Fv(),i=e?Iv(n):Pv();return()=>{s?.(),o(),i?.()}}return()=>{}}function Ov(){hn("longtask",({entries:e})=>{const t=Ee();if(!t)return;const{op:n,start_timestamp:r}=z(t);for(const s of e){const o=ge(Ae()+s.startTime),i=ge(s.duration);n==="navigation"&&r&&o<r||Wt(t,o,o+i,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[de]:"auto.ui.browser.metrics"}})}})}function Nv(){new PerformanceObserver(t=>{const n=Ee();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const s=ge(Ae()+r.startTime),{start_timestamp:o,op:i}=z(n);if(i==="navigation"&&o&&s<o)continue;const a=ge(r.duration),c={[de]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:d,invokerType:l,sourceURL:p,sourceFunctionName:f,sourceCharPosition:h}=u;c["browser.script.invoker"]=d,c["browser.script.invoker_type"]=l,p&&(c["code.filepath"]=p),f&&(c["code.function"]=f),h!==-1&&(c["browser.script.source_char_position"]=h),Wt(n,s,s+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function Lv(){hn("event",({entries:e})=>{const t=Ee();if(t){for(const n of e)if(n.name==="click"){const r=ge(Ae()+n.startTime),s=ge(n.duration),o={name:De(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[de]:"auto.ui.browser.metrics"}},i=Gl(n.target);i&&(o.attributes["ui.component_name"]=i),Wt(t,r,r+s,o)}}})}function Pv(){return Ba(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Je.cls={value:e.value,unit:""},zs=t)},!0)}function Dv(){return Ua(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Je.lcp={value:e.value,unit:"millisecond"},Pe=t)},!0)}function Fv(){return _v(({metric:e})=>{e.entries[e.entries.length-1]&&(Je.ttfb={value:e.value,unit:"millisecond"})})}function $v(e,t){const n=Fr(),r=Ae();if(!n?.getEntries||!r)return;const s=ge(r),o=n.getEntries(),{op:i,start_timestamp:a}=z(e);o.slice(Du).forEach(c=>{const u=ge(c.startTime),d=ge(Math.max(0,c.duration));if(!(i==="navigation"&&a&&s+u<a))switch(c.entryType){case"navigation":{Wv(e,c,s);break}case"mark":case"paint":case"measure":{Uv(e,c,u,d,s,t.ignorePerformanceApiSpans);const l=Fa(),p=c.startTime<l.firstHiddenTime;c.name==="first-paint"&&p&&(Je.fp={value:c.startTime,unit:"millisecond"}),c.name==="first-contentful-paint"&&p&&(Je.fcp={value:c.startTime,unit:"millisecond"});break}case"resource":{qv(e,c,c.name,u,d,s,t.ignoreResourceSpans);break}}}),Du=Math.max(o.length-1,0),Gv(e),i==="pageload"&&(Jv(Je),t.recordClsOnPageloadSpan||delete Je.cls,t.recordLcpOnPageloadSpan||delete Je.lcp,Object.entries(Je).forEach(([c,u])=>{Bm(c,u.value,u.unit)}),e.setAttribute("performance.timeOrigin",s),e.setAttribute("performance.activationStart",nr()),Vv(e,t)),Pe=void 0,zs=void 0,Je={}}function Bv(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function Uv(e,t,n,r,s,o){if(Bv(t)||["mark","measure"].includes(t.entryType)&&Qe(t.name,o))return;const i=Lr(!1),a=ge(i?i.requestStart:0),c=s+Math.max(n,a),u=s+n,d=u+r,l={[de]:"auto.resource.browser.metrics"};c!==u&&(l["sentry.browser.measure_happened_before_request"]=!0,l["sentry.browser.measure_start_time"]=c),Hv(l,t),c<=d&&Wt(e,c,d,{name:t.name,op:t.entryType,attributes:l})}function Hv(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,s]of Object.entries(n))if(s&&Ht(s))e[`sentry.browser.measure.detail.${r}`]=s;else if(s!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(s)}catch{}return}if(Ht(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function Wv(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Kr(e,t,r,n)}),Kr(e,t,"secureConnection",n,"TLS/SSL"),Kr(e,t,"fetch",n,"cache"),Kr(e,t,"domainLookup",n,"DNS"),zv(e,t,n)}function Kr(e,t,n,r,s=n){const o=jv(n),i=t[o],a=t[`${n}Start`];!a||!i||Wt(e,r+ge(a),r+ge(i),{op:`browser.${s}`,name:t.name,attributes:{[de]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function jv(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function zv(e,t,n){const r=n+ge(t.requestStart),s=n+ge(t.responseEnd),o=n+ge(t.responseStart);t.responseEnd&&(Wt(e,r,s,{op:"browser.request",name:t.name,attributes:{[de]:"auto.ui.browser.metrics"}}),Wt(e,o,s,{op:"browser.response",name:t.name,attributes:{[de]:"auto.ui.browser.metrics"}}))}function qv(e,t,n,r,s,o,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(i?.includes(a))return;const c={[de]:"auto.resource.browser.metrics"},u=on(n);u.protocol&&(c["url.scheme"]=u.protocol.split(":").pop()),u.host&&(c["server.address"]=u.host),c["url.same_origin"]=n.includes(j.location.origin),Yv(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"]]);const d={...c,...Uf(t)},l=o+r,p=l+s;Wt(e,l,p,{name:n.replace(j.location.origin,""),op:a,attributes:d})}function Gv(e){const t=j.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),Yo(n.rtt)&&(Je["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Yo(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Yo(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function Vv(e,t){Pe&&t.recordLcpOnPageloadSpan&&(Pe.element&&e.setAttribute("lcp.element",De(Pe.element)),Pe.id&&e.setAttribute("lcp.id",Pe.id),Pe.url&&e.setAttribute("lcp.url",Pe.url.trim().slice(0,200)),Pe.loadTime!=null&&e.setAttribute("lcp.loadTime",Pe.loadTime),Pe.renderTime!=null&&e.setAttribute("lcp.renderTime",Pe.renderTime),e.setAttribute("lcp.size",Pe.size)),zs?.sources&&t.recordClsOnPageloadSpan&&zs.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,De(n.node)))}function Yv(e,t,n){n.forEach(([r,s])=>{const o=e[r];o!=null&&(typeof o=="number"&&o<xv||typeof o=="string")&&(t[s]=o)})}function Jv(e){const t=Lr(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function Kv(){return Fr()&&Ae()?hn("element",Xv):()=>{}}const Xv=({entries:e})=>{const t=Ee(),n=t?be(t):void 0,r=n?z(n).description:q().getScopeData().transactionName;e.forEach(s=>{const o=s;if(!o.identifier)return;const i=o.name,a=o.renderTime,c=o.loadTime,[u,d]=c?[ge(c),"load-time"]:a?[ge(a),"render-time"]:[he(),"entry-emission"],l=i==="image-paint"?ge(Math.max(0,(a??0)-(c??0))):0,p={[de]:"auto.ui.browser.elementtiming",[Ve]:"ui.elementtiming",[ze]:"component","sentry.span_start_time_source":d,"sentry.transaction_name":r,"element.id":o.id,"element.type":o.element?.tagName?.toLowerCase()||"unknown","element.size":o.naturalWidth&&o.naturalHeight?`${o.naturalWidth}x${o.naturalHeight}`:void 0,"element.render_time":a,"element.load_time":c,"element.url":o.url||void 0,"element.identifier":o.identifier,"element.paint_type":i};Xn({name:`element[${o.identifier}]`,attributes:p,startTime:u,onlyIfParent:!0},f=>{f.end(u+l)})})},Qv=1e3;let Fu,xi,Mi;function Hf(e){zt("dom",e),qt("dom",Zv)}function Zv(){if(!j.document)return;const e=qe.bind(null,"dom"),t=$u(e,!0);j.document.addEventListener("click",t,!1),j.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const s=j[n]?.prototype;s?.hasOwnProperty?.("addEventListener")&&(ke(s,"addEventListener",function(o){return function(i,a,c){if(i==="click"||i=="keypress")try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=u[i]=u[i]||{refCount:0};if(!d.handler){const l=$u(e);d.handler=l,o.call(this,i,l,c)}d.refCount++}catch{}return o.call(this,i,a,c)}}),ke(s,"removeEventListener",function(o){return function(i,a,c){if(i==="click"||i=="keypress")try{const u=this.__sentry_instrumentation_handlers__||{},d=u[i];d&&(d.refCount--,d.refCount<=0&&(o.call(this,i,d.handler,c),d.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,i,a,c)}}))})}function eT(e){if(e.type!==xi)return!1;try{if(!e.target||e.target._sentryId!==Mi)return!1}catch{}return!0}function tT(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function $u(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=nT(n);if(tT(n.type,r))return;Fe(n,"_sentryCaptured",!0),r&&!r._sentryId&&Fe(r,"_sentryId",ve());const s=n.type==="keypress"?"input":n.type;eT(n)||(e({event:n,name:s,global:t}),xi=n.type,Mi=r?r._sentryId:void 0),clearTimeout(Fu),Fu=j.setTimeout(()=>{Mi=void 0,xi=void 0},Qv)}}function nT(e){try{return e.target}catch{return null}}let Xr;function Eo(e){const t="history";zt(t,e),qt(t,rT)}function rT(){if(j.addEventListener("popstate",()=>{const t=j.location.href,n=Xr;if(Xr=t,n===t)return;qe("history",{from:n,to:t})}),!cb())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const s=Xr,o=sT(String(r));if(Xr=o,s===o)return t.apply(this,n);qe("history",{from:s,to:o})}return t.apply(this,n)}}ke(j.history,"pushState",e),ke(j.history,"replaceState",e)}function sT(e){try{return new URL(e,j.location.origin).toString()}catch{return e}}const Ss={};function Wa(e){const t=Ss[e];if(t)return t;let n=j[e];if(bi(n))return Ss[e]=n.bind(j);const r=j.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const o=s.contentWindow;o?.[e]&&(n=o[e]),r.head.removeChild(s)}catch(s){pn&&m.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(Ss[e]=n.bind(j))}function oT(e){Ss[e]=void 0}function $r(...e){return Wa("setTimeout")(...e)}const _t="__sentry_xhr_v3__";function ja(e){zt("xhr",e),qt("xhr",iT)}function iT(){if(!j.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const s=new Error,o=he()*1e3,i=Xe(r[0])?r[0].toUpperCase():void 0,a=aT(r[1]);if(!i||!a)return t.apply(n,r);n[_t]={method:i,url:a,request_headers:{}},i==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[_t];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const d={endTimestamp:he()*1e3,startTimestamp:o,xhr:n,virtualError:s};qe("xhr",d)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,d,l){return c(),u.apply(d,l)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,d,l){const[p,f]=l,h=d[_t];return h&&Xe(p)&&Xe(f)&&(h.request_headers[p.toLowerCase()]=f),u.apply(d,l)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const s=n[_t];if(!s)return t.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const o={startTimestamp:he()*1e3,xhr:n};return qe("xhr",o),t.apply(n,r)}})}function aT(e){if(Xe(e))return e;try{return e.toString()}catch{}}function Wf(e){return new URLSearchParams(e).toString()}function qs(e,t=m){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Wf(e)];if(!e)return[void 0]}catch(n){return pn&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return pn&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function za(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function jf(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return pn&&m.error(n,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
491
- `).reduce((n,r)=>{const[s,o]=r.split(": ");return o&&(n[s.toLowerCase()]=o),n},{}):{}}const Jo=[],bs=new Map,Sn=new Map,cT=60;function uT(){if(Fr()&&Ae()){const t=lT();return()=>{t()}}return()=>{}}const Oi={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 lT(){return Pf(dT)}const dT=({metric:e})=>{if(e.value==null)return;const t=ge(e.value);if(t>cT)return;const n=e.entries.find(h=>h.duration===e.value&&Oi[h.name]);if(!n)return;const{interactionId:r}=n,s=Oi[n.name],o=ge(Ae()+n.startTime),i=Ee(),a=i?be(i):void 0,c=r!=null?bs.get(r):void 0,u=c?.span||a,d=u?z(u).description:q().getScopeData().transactionName,l=c?.elementName||De(n.target),p={[de]:"auto.http.browser.inp",[Ve]:`ui.interaction.${s}`,[Kn]:n.duration},f=Ha({name:l,transaction:d,attributes:p,startTime:o});f&&(f.addEvent("inp",{[wr]:"millisecond",[Ir]:e.value}),f.end(o+t))};function fT(){const e=Object.keys(Oi);$s()&&e.forEach(s=>{j.addEventListener(s,t,{capture:!0,passive:!0})});function t(s){const o=s.target;if(!o)return;const i=De(o),a=Math.round(s.timeStamp);if(Sn.set(a,i),Sn.size>50){const c=Sn.keys().next().value;c!==void 0&&Sn.delete(c)}}function n(s){const o=Math.round(s.startTime);let i=Sn.get(o);if(!i)for(let a=-5;a<=5;a++){const c=Sn.get(o+a);if(c){i=c;break}}return i||"<unknown>"}const r=({entries:s})=>{const o=Ee(),i=o&&be(o);s.forEach(a=>{if(!Tv(a))return;const c=a.interactionId;if(c==null||bs.has(c))return;const u=a.target?De(a.target):n(a);if(Jo.length>10){const d=Jo.shift();bs.delete(d)}Jo.push(c),bs.set(c,{span:i,elementName:u})})};hn("event",r),hn("first-input",r)}const pT=40;function zf(e,t=Wa("fetch")){let n=0,r=0;async function s(o){const i=o.body.length;n+=i,r++;const a={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const c=await t(e.url,a);return{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}}catch(c){throw oT("fetch"),c}finally{n-=i,r--}}return t_(e,s,Fd(e.bufferSize||pT))}const hT=10,mT=20,gT=30,_T=40,yT=50;function Hn(e,t,n,r){const s={filename:e,function:t==="<anonymous>"?dt:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const ST=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,bT=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ET=/\((\S*)(?::(\d+))(?::(\d+))\)/,vT=/at (.+?) ?\(data:(.+?),/,TT=e=>{const t=e.match(vT);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=ST.exec(e);if(n){const[,s,o,i]=n;return Hn(s,dt,+o,+i)}const r=bT.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const a=ET.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[o,i]=qf(r[1]||dt,r[2]);return Hn(i,o,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},wT=[gT,TT],IT=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,kT=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,CT=e=>{const t=IT.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const o=kT.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],s=t[1]||dt;return[s,r]=qf(s,r),Hn(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},RT=[yT,CT],AT=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,xT=e=>{const t=AT.exec(e);return t?Hn(t[2],t[1]||dt,+t[3],t[4]?+t[4]:void 0):void 0},wR=[_T,xT],MT=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,OT=e=>{const t=MT.exec(e);return t?Hn(t[2],t[3]||dt,+t[1]):void 0},IR=[hT,OT],NT=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,LT=e=>{const t=NT.exec(e);return t?Hn(t[5],t[3]||t[4]||dt,+t[1],+t[2]):void 0},kR=[mT,LT],PT=[wT,RT],DT=Bl(...PT),qf=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:dt,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function CR(e,{metadata:t,tunnel:n,dsn:r}){const s={event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:At(r)}},o=FT(e);return nt(s,[o])}function FT(e){return[{type:"user_report"},e]}const R=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Qr=1024,$T="Breadcrumbs",BT=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:$T,setup(n){t.console&&pa(jT(n)),t.dom&&Hf(WT(n,t.dom)),t.xhr&&ja(zT(n)),t.fetch&&ka(qT(n)),t.history&&Eo(GT(n)),t.sentry&&n.on("beforeSendEvent",HT(n))}}}),UT=BT;function HT(e){return function(n){x()===e&&It({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Xt(n)},{event:n})}}function WT(e,t){return function(r){if(x()!==e)return;let s,o,i=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Qr&&(R&&m.warn(`\`dom.maxStringLength\` cannot exceed ${Qr}, but a value of ${a} was configured. Sentry will use ${Qr} instead.`),a=Qr),typeof i=="string"&&(i=[i]);try{const u=r.event,d=VT(u)?u.target:u;s=De(d,{keyAttrs:i,maxStringLength:a}),o=Gl(d)}catch{s="<unknown>"}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};o&&(c.data={"ui.component_name":o}),It(c,{event:r.event,name:r.name,global:r.global})}}function jT(e){return function(n){if(x()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:ha(n.level),message:Is(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Is(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;It(r,{input:n.args,level:n.level})}}function zT(e){return function(n){if(x()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,o=n.xhr[_t];if(!r||!s||!o)return;const{method:i,url:a,status_code:c,body:u}=o,d={method:i,url:a,status_code:c},l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s},p={category:"xhr",data:d,type:"http",level:uf(c)};e.emit("beforeOutgoingRequestBreadcrumb",p,l),It(p,l)}}function qT(e){return function(n){if(x()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const o=n.fetchData,i={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s},a={category:"fetch",data:o,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,i),It(a,i)}else{const o=n.response,i={...n.fetchData,status_code:o?.status};n.fetchData.request_body_size,n.fetchData.response_body_size,o?.status;const a={input:n.args,response:o,startTimestamp:r,endTimestamp:s},c={category:"fetch",data:i,type:"http",level:uf(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),It(c,a)}}}function GT(e){return function(n){if(x()!==e)return;let r=n.from,s=n.to;const o=on(B.location.href);let i=r?on(r):void 0;const a=on(s);i?.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(s=a.relative),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),It({category:"navigation",data:{from:r,to:s}})}}function VT(e){return!!e&&!!e.target}const YT=["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"],JT="BrowserApiErrors",KT=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:JT,setupOnce(){t.setTimeout&&ke(B,"setTimeout",Bu),t.setInterval&&ke(B,"setInterval",Bu),t.requestAnimationFrame&&ke(B,"requestAnimationFrame",QT),t.XMLHttpRequest&&"XMLHttpRequest"in B&&ke(XMLHttpRequest.prototype,"send",ZT);const n=t.eventTarget;n&&(Array.isArray(n)?n:YT).forEach(s=>e0(s,t))}}}),XT=KT;function Bu(e){return function(...t){const n=t[0];return t[0]=Un(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${bt(e)}`}}),e.apply(this,t)}}function QT(e){return function(t){return e.apply(this,[Un(t,{mechanism:{data:{handler:bt(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function ZT(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&ke(n,s,function(o){const i={mechanism:{data:{handler:bt(o)},handled:!1,type:`auto.browser.browserapierrors.xhr.${s}`}},a=Ji(o);return a&&(i.mechanism.data.handler=bt(a)),Un(o,i)})}),e.apply(this,t)}}function e0(e,t){const r=B[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(ke(r,"addEventListener",function(s){return function(o,i,a){try{t0(i)&&(i.handleEvent=Un(i.handleEvent,{mechanism:{data:{handler:bt(i),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&n0(this,o,i),s.apply(this,[o,Un(i,{mechanism:{data:{handler:bt(i),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),ke(r,"removeEventListener",function(s){return function(o,i,a){try{const c=i.__sentry_wrapped__;c&&s.call(this,o,c,a)}catch{}return s.call(this,o,i,a)}}))}function t0(e){return typeof e.handleEvent=="function"}function n0(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const r0=()=>({name:"BrowserSession",setupOnce(){if(typeof B.document>"u"){R&&m.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Fc({ignoreDuration:!0}),$c(),Eo(({from:e,to:t})=>{e!==void 0&&e!==t&&(Fc({ignoreDuration:!0}),$c())})}}),s0="GlobalHandlers",o0=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:s0,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(a0(n),Uu("onerror")),t.onunhandledrejection&&(c0(n),Uu("onunhandledrejection"))}}}),i0=o0;function a0(e){Ul(t=>{const{stackParser:n,attachStacktrace:r}=Yf();if(x()!==e||If())return;const{msg:s,url:o,line:i,column:a,error:c}=t,u=u0(yo(n,c||s,void 0,r,!1),o,i,a);u.level="error",Cr(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function c0(e){Hl(t=>{const{stackParser:n,attachStacktrace:r}=Yf();if(x()!==e||If())return;const s=Gf(t),o=Ht(s)?Vf(s):yo(n,s,void 0,r,!0);o.level="error",Cr(o,{originalException:s,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function Gf(e){if(Ht(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 Vf(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function u0(e,t,n,r){const s=e.exception=e.exception||{},o=s.values=s.values||[],i=o[0]=o[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[],u=r,d=n,l=l0(t)??mn();return c.length===0&&c.push({colno:u,filename:l,function:dt,in_app:!0,lineno:d}),e}function Uu(e){R&&m.log(`Global Handler attached: ${e}`)}function Yf(){return x()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function l0(e){if(!(!Xe(e)||e.length===0)){if(e.startsWith("data:")){const t=e.match(/^data:([^;]+)/),n=t?t[1]:"text/javascript",r=e.includes("base64,");return`<data:${n}${r?",base64":""}>`}return e.slice(0,1024)}}const d0=()=>({name:"HttpContext",preprocessEvent(e){if(!B.navigator&&!B.location&&!B.document)return;const t=Oa(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}}),f0="cause",p0=5,h0="LinkedErrors",m0=((e={})=>{const t=e.limit||p0,n=e.key||f0;return{name:h0,preprocessEvent(r,s,o){const i=o.getOptions();O_(Na,i.stackParser,n,t,r,s)}}}),g0=m0;function _0(){return y0()?(R&&jt(()=>{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 y0(){if(typeof B.window>"u")return!1;const e=B;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=mn(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(B===B.top&&r.some(o=>n.startsWith(`${o}://`)))}function S0(e){return[w_(),b_(),XT(),UT(),i0(),g0(),H_(),d0(),r0()]}function RR(e={}){const t=!e.skipBrowserExtensionCheck&&_0(),n={...e,enabled:t?!1:e.enabled,stackParser:Sh(e.stackParser||DT),integrations:Ig({integrations:e.integrations,defaultIntegrations:e.defaultIntegrations==null?S0():e.defaultIntegrations}),transport:e.transport||zf};return Kg(JE,n)}function AR(){}function xR(e){e()}function MR(e={}){const t=B.document,n=t?.head||t?.body;if(!n){R&&m.error("[showReportDialog] Global document not defined");return}const r=q(),o=x()?.getDsn();if(!o){R&&m.error("[showReportDialog] DSN not configured");return}const i={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||_g()},a=B.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=Tg(o,i);const{onLoad:c,onClose:u}=i;if(c&&(a.onload=c),u){const d=l=>{if(l.data==="__sentry_reportdialog_closed__")try{u()}finally{B.removeEventListener("message",d)}};B.addEventListener("message",d)}n.appendChild(a)}const b0=$,E0="ReportingObserver",Hu=new WeakMap,v0=((e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(Hu.has(x()))for(const s of r)tt(o=>{o.setExtra("url",s.url);const i=`ReportingObserver [${s.type}]`;let a="No details available";if(s.body){const c={};for(const u in s.body)c[u]=s.body[u];if(o.setExtra("body",c),s.type==="crash"){const u=s.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=s.body.message||a}hi(`${i}: ${a}`)})}return{name:E0,setupOnce(){if(!lb())return;new b0.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){Hu.set(r,!0)}}}),OR=v0,T0="HttpClient",w0=((e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:T0,setup(n){O0(n,t),N0(n,t)}}}),NR=w0;function I0(e,t,n,r,s){if(Kf(e,n.status,n.url)){const o=L0(t,r);let i,a,c,u;Qf()&&([i,c]=Wu("Cookie",o),[a,u]=Wu("Set-Cookie",n));const d=Xf({url:o.url,method:o.method,status:n.status,requestHeaders:i,responseHeaders:a,requestCookies:c,responseCookies:u,error:s,type:"fetch"});Cr(d)}}function Wu(e,t){const n=R0(t.headers);let r;try{const s=n[e]||n[e.toLowerCase()]||void 0;s&&(r=Jf(s))}catch{}return[n,r]}function k0(e,t,n,r,s){if(Kf(e,t.status,t.responseURL)){let o,i,a;if(Qf()){try{const u=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;u&&(i=Jf(u))}catch{}try{a=A0(t)}catch{}o=r}const c=Xf({url:t.responseURL,method:n,status:t.status,requestHeaders:o,responseHeaders:a,responseCookies:i,error:s,type:"xhr"});Cr(c)}}function C0(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function Jf(e){return e.split("; ").reduce((t,n)=>{const[r,s]=n.split("=");return r&&s&&(t[r]=s),t},{})}function R0(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function A0(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
492
- `).reduce((n,r)=>{const[s,o]=r.split(": ");return s&&o&&(n[s]=o),n},{}):{}}function x0(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function M0(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function O0(e,t){lf()&&ka(n=>{if(x()!==e)return;const{response:r,args:s,error:o,virtualError:i}=n,[a,c]=s;r&&I0(t,a,r,c,o||i)},!1)}function N0(e,t){"XMLHttpRequest"in $&&ja(n=>{if(x()!==e)return;const{error:r,virtualError:s}=n,o=n.xhr,i=o[_t];if(!i)return;const{method:a,request_headers:c}=i;try{k0(t,o,a,c,r||s)}catch(u){R&&m.warn("Error while extracting response event form XHR response",u)}})}function Kf(e,t,n){return M0(e.failedRequestStatusCodes,t)&&x0(e.failedRequestTargets,n)&&!jd(n,x())}function Xf(e){const t=x(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,s=`HTTP Client Error with status code: ${e.status}`,o={message:s,exception:{values:[{type:"Error",value:s,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:C0(e.responseHeaders)}}};return vt(o,{type:`auto.http.client.${e.type}`,handled:!1}),o}function L0(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function Qf(){const e=x();return e?!!e.getOptions().sendDefaultPii:!1}const Ko=$,P0=7,D0="ContextLines",F0=((e={})=>{const t=e.frameContextLines!=null?e.frameContextLines:P0;return{name:D0,processEvent(n){return $0(n,t)}}}),LR=F0;function $0(e,t){const n=Ko.document,r=Ko.location&&Wd(Ko.location.href);if(!n||!r)return e;const s=e.exception?.values;if(!s?.length)return e;const o=n.documentElement.innerHTML;if(!o)return e;const i=["<!DOCTYPE html>","<html>",...o.split(`
493
- `),"</html>"];return s.forEach(a=>{const c=a.stacktrace;c?.frames&&(c.frames=c.frames.map(u=>B0(u,i,r,t)))}),e}function B0(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||Oh(t,e,r),e}const U0="GraphQLClient",H0=(e=>({name:U0,setup(t){W0(t,e),j0(t,e)}}));function W0(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const o=z(n).data||{};if(!(o[Ve]==="http.client"))return;const c=o[Vh]||o["http.url"],u=o[Gh]||o["http.method"];if(!Xe(c)||!Xe(u))return;const{endpoints:d}=t,l=Qe(c,d),p=ep(r);if(l&&p){const f=tp(p);if(f){const h=Zf(f);n.updateName(`${u} ${c} (${h})`),n.setAttribute("graphql.document",p)}}})}function j0(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{const{category:s,type:o,data:i}=n;if(o==="http"&&(s==="fetch"||s==="xhr")){const d=i?.url,{endpoints:l}=t,p=Qe(d,l),f=ep(r);if(p&&i&&f){const h=tp(f);if(!i.graphql&&h){const g=Zf(h);i["graphql.document"]=h.query,i["graphql.operation"]=g}}}})}function Zf(e){const{query:t,operationName:n}=e,{operationName:r=n,operationType:s}=z0(t);return r?`${s} ${r}`:`${s}`}function ep(e){const t="xhr"in e;let n;if(t){const r=e.xhr[_t];n=r&&qs(r.body)[0]}else{const r=za(e.input);n=qs(r)[0]}return n}function z0(e){const 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]};const s=e.match(n);return s?{operationType:s[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function tp(e){let t;try{const n=JSON.parse(e);!!n.query&&(t=n)}finally{return t}}const PR=H0,ue=$,qa="sentryReplaySession",q0="replay_event",Ga="Unable to send Replay",G0=3e5,V0=9e5,Y0=5e3,J0=5500,K0=6e4,X0=5e3,Q0=3,ju=15e4,Zr=5e3,Z0=3e3,ew=300,Va=2e7,tw=4999,nw=15e3,zu=36e5;var rw=Object.defineProperty,sw=(e,t,n)=>t in e?rw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qu=(e,t,n)=>sw(e,typeof t!="symbol"?t+"":t,n),Se=(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))(Se||{});function ow(e){return e.nodeType===e.ELEMENT_NODE}function dr(e){return e?.host?.shadowRoot===e}function fr(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 aw(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const 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 Gs(e){try{const t=e.rules||e.cssRules;return t?iw(Array.from(t,np).join("")):null}catch{return null}}function cw(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,s=r[n],o=r.getPropertyPriority(s);t+=`${s}:${r.getPropertyValue(s)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}function np(e){let t;if(lw(e))try{t=Gs(e.styleSheet)||aw(e)}catch{}else if(dw(e)){let n=e.cssText;const r=e.selectorText.includes(":"),s=typeof e.style.all=="string"&&e.style.all;if(s&&(n=cw(e)),r&&(n=uw(n)),r||s)return n}return t||e.cssText}function uw(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function lw(e){return"styleSheet"in e}function dw(e){return"selectorText"in e}let rp=class{constructor(){qu(this,"idNodeMap",new Map),qu(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function fw(){return new rp}function vo({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 _r({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function Wn(e){return e.toLowerCase()}function Ni(e){return e.toUpperCase()}const Gu="__rrweb_original__";function pw(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let s=0;s<e.height;s+=n){const o=t.getImageData,i=Gu in o?o[Gu]:o;if(new Uint32Array(i.call(t,r,s,Math.min(n,e.width-r),Math.min(n,e.height-s)).data.buffer).some(c=>c!==0))return!1}return!0}function Ya(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Wn(t):null}function Vs(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function sp(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}const Vu={};function op(e){const t=Vu[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const o=s.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(s)}catch{}return Vu[e]=r.bind(window)}function Li(...e){return op("setTimeout")(...e)}function ip(...e){return op("clearTimeout")(...e)}function ap(e){try{return e.contentDocument}catch{}}let hw=1;const mw=new RegExp("[^a-z0-9-_:]"),yr=-2;function Ja(){return hw++}function gw(e){if(e instanceof HTMLFormElement)return"form";const t=Wn(e.tagName);return mw.test(t)?"div":t}function _w(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let bn,Yu;const yw=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Sw=/^(?:[a-z+]+:)?\/\//i,bw=/^www\..*/i,Ew=/^(data:)([^,]*),(.*)/i;function Ys(e,t){return(e||"").replace(yw,(n,r,s,o,i,a)=>{const c=s||i||a,u=r||o||"";if(!c)return n;if(Sw.test(c)||bw.test(c))return`url(${u}${c}${u})`;if(Ew.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${_w(t)+c}${u})`;const d=t.split("/"),l=c.split("/");d.pop();for(const p of l)p!=="."&&(p===".."?d.pop():d.push(p));return`url(${u}${d.join("/")}${u})`})}const vw=/^[^ \t\n\r\u000c]+/,Tw=/^[, \t\n\r\u000c]+/;function ww(e,t){if(t.trim()==="")return t;let n=0;function r(o){let i;const a=o.exec(t.substring(n));return a?(i=a[0],n+=i.length,i):""}const s=[];for(;r(Tw),!(n>=t.length);){let o=r(vw);if(o.slice(-1)===",")o=wn(e,o.substring(0,o.length-1)),s.push(o);else{let i="";o=wn(e,o);let a=!1;for(;;){const c=t.charAt(n);if(c===""){s.push((o+i).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,s.push((o+i).trim());break}else c==="("&&(a=!0);i+=c,n+=1}}}return s.join(", ")}const Ju=new WeakMap;function wn(e,t){return!t||t.trim()===""?t:To(e,t)}function Iw(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function To(e,t){let n=Ju.get(e);if(n||(n=e.createElement("a"),Ju.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function cp(e,t,n,r,s,o){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?wn(e,r):n==="srcset"?ww(e,r):n==="style"?Ys(r,To(e)):t==="object"&&n==="data"?wn(e,r):typeof o=="function"?o(n,r,s):r)}function up(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function kw(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 s=e.classList.length;s--;){const o=e.classList[s];if(t.test(o))return!0}if(n)return e.matches(n)}catch{}return!1}function Cw(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function tn(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:tn(e.parentNode,t,n,r+1)}function In(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(Cw(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function jn(e,t,n,r,s,o){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(i===null)return!1;if(i.tagName==="INPUT"){const u=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(o){if(c=tn(i,In(r,s)),c<0)return!0;a=tn(i,In(t,n),c>=0?c:1/0)}else{if(a=tn(i,In(t,n)),a<0)return!1;c=tn(i,In(r,s),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!o}catch{}return!!o}function Rw(e,t,n){const r=e.contentWindow;if(!r)return;let s=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){const a=Li(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{ip(a),s=!0,t()});return}const i="about:blank";if(r.location.href!==i||e.src===i||e.src==="")return Li(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Aw(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;const o=Li(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{ip(o),r=!0,t()})}function xw(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,inlineStylesheet:f,maskInputOptions:h={},maskTextFn:g,maskInputFn:_,dataURLOptions:y={},inlineImages:S,recordCanvas:O,keepIframeSrcFn:v,newlyAddedElement:N=!1}=t,k=Mw(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Se.Document,childNodes:[],compatMode:e.compatMode}:{type:Se.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Se.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return Nw(e,{doc:n,blockClass:s,blockSelector:o,unblockSelector:i,inlineStylesheet:f,maskAttributeFn:c,maskInputOptions:h,maskInputFn:_,dataURLOptions:y,inlineImages:S,recordCanvas:O,keepIframeSrcFn:v,newlyAddedElement:N,rootId:k,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p});case e.TEXT_NODE:return Ow(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,maskTextFn:g,maskInputOptions:h,maskInputFn:_,rootId:k});case e.CDATA_SECTION_NODE:return{type:Se.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:Se.Comment,textContent:e.textContent||"",rootId:k};default:return!1}}function Mw(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function Ow(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:o,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:d}=t,l=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const f=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0,g=l==="TEXTAREA"?!0:void 0;if(f&&p){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(p=Gs(e.parentNode.sheet))}catch(y){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${y}`,e)}p=Ys(p,To(t.doc))}h&&(p="SCRIPT_PLACEHOLDER");const _=jn(e,r,o,s,i,n);if(!f&&!h&&!g&&p&&_&&(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),g&&p&&(c.textarea||_)&&(p=u?u(p,e.parentNode):p.replace(/[\S]/g,"*")),l==="OPTION"&&p){const y=vo({type:null,tagName:l,maskInputOptions:c});p=_r({isMasked:jn(e,r,o,s,i,y),element:e,value:p,maskInputFn:u})}return{type:Se.Text,textContent:p||"",isStyle:f,rootId:d}}function Nw(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:o,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:d={},inlineImages:l,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:h=!1,rootId:g,maskTextClass:_,unmaskTextClass:y,maskTextSelector:S,unmaskTextSelector:O}=t,v=kw(e,r,s,o),N=gw(e);let k={};const b=e.attributes.length;for(let E=0;E<b;E++){const C=e.attributes[E];C.name&&!up(N,C.name,C.value)&&(k[C.name]=cp(n,N,Wn(C.name),C.value,e,c))}if(N==="link"&&i){const E=Array.from(n.styleSheets).find(D=>D.href===e.href);let C=null;E&&(C=Gs(E)),C&&(k.rel=null,k.href=null,k.crossorigin=null,k._cssText=Ys(C,E.href))}if(N==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const E=Gs(e.sheet);E&&(k._cssText=Ys(E,To(n)))}if(N==="input"||N==="textarea"||N==="select"||N==="option"){const E=e,C=Ya(E),D=Vs(E,Ni(N),C),I=E.checked;if(C!=="submit"&&C!=="button"&&D){const A=jn(E,_,S,y,O,vo({type:C,tagName:Ni(N),maskInputOptions:a}));k.value=_r({isMasked:A,element:E,value:D,maskInputFn:u})}I&&(k.checked=I)}if(N==="option"&&(e.selected&&!a.select?k.selected=!0:delete k.selected),N==="canvas"&&p){if(e.__context==="2d")pw(e)||(k.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){const E=e.toDataURL(d.type,d.quality),C=n.createElement("canvas");C.width=e.width,C.height=e.height;const D=C.toDataURL(d.type,d.quality);E!==D&&(k.rr_dataURL=E)}}if(N==="img"&&l){bn||(bn=n.createElement("canvas"),Yu=bn.getContext("2d"));const E=e,C=E.currentSrc||E.getAttribute("src")||"<unknown-src>",D=E.crossOrigin,I=()=>{E.removeEventListener("load",I);try{bn.width=E.naturalWidth,bn.height=E.naturalHeight,Yu.drawImage(E,0,0),k.rr_dataURL=bn.toDataURL(d.type,d.quality)}catch(A){if(E.crossOrigin!=="anonymous"){E.crossOrigin="anonymous",E.complete&&E.naturalWidth!==0?I():E.addEventListener("load",I);return}else console.warn(`Cannot inline img src=${C}! Error: ${A}`)}E.crossOrigin==="anonymous"&&(D?k.crossOrigin=D:E.removeAttribute("crossorigin"))};E.complete&&E.naturalWidth!==0?I():E.addEventListener("load",I)}if((N==="audio"||N==="video")&&(k.rr_mediaState=e.paused?"paused":"played",k.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(k.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(k.rr_scrollTop=e.scrollTop)),v){const{width:E,height:C}=e.getBoundingClientRect();k={class:k.class,rr_width:`${E}px`,rr_height:`${C}px`}}N==="iframe"&&!f(k.src)&&(!v&&!ap(e)&&(k.rr_src=k.src),delete k.src);let w;try{customElements.get(N)&&(w=!0)}catch{}return{type:Se.Element,tagName:N,attributes:k,childNodes:[],isSVG:Iw(e)||void 0,needBlock:v,rootId:g,isCustom:w}}function ce(e){return e==null?"":e.toLowerCase()}function Lw(e,t){if(t.comment&&e.type===Se.Comment)return!0;if(e.type===Se.Element){if(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"&&sp(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(ce(e.attributes.name).match(/^msapplication-tile(image|color)$/)||ce(e.attributes.name)==="application-name"||ce(e.attributes.rel)==="icon"||ce(e.attributes.rel)==="apple-touch-icon"||ce(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&ce(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ce(e.attributes.property).match(/^(og|twitter|fb):/)||ce(e.attributes.name).match(/^(og|twitter):/)||ce(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(ce(e.attributes.name)==="robots"||ce(e.attributes.name)==="googlebot"||ce(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(ce(e.attributes.name)==="author"||ce(e.attributes.name)==="generator"||ce(e.attributes.name)==="framework"||ce(e.attributes.name)==="publisher"||ce(e.attributes.name)==="progid"||ce(e.attributes.property).match(/^article:/)||ce(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(ce(e.attributes.name)==="google-site-verification"||ce(e.attributes.name)==="yandex-verification"||ce(e.attributes.name)==="csrf-token"||ce(e.attributes.name)==="p:domain_verify"||ce(e.attributes.name)==="verify-v1"||ce(e.attributes.name)==="verification"||ce(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function kn(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:p=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskAttributeFn:g,maskTextFn:_,maskInputFn:y,slimDOMOptions:S,dataURLOptions:O={},inlineImages:v=!1,recordCanvas:N=!1,onSerialize:k,onIframeLoad:b,iframeLoadTimeout:w=5e3,onBlockedImageLoad:E,onStylesheetLoad:C,stylesheetLoadTimeout:D=5e3,keepIframeSrcFn:I=()=>!1,newlyAddedElement:A=!1}=t;let{preserveWhiteSpace:G=!0}=t;const K=xw(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:g,maskTextFn:_,maskInputFn:y,dataURLOptions:O,inlineImages:v,recordCanvas:N,keepIframeSrcFn:I,newlyAddedElement:A});if(!K)return console.warn(e,"not serialized"),null;let X;r.hasNode(e)?X=r.getId(e):Lw(K,S)||!G&&K.type===Se.Text&&!K.isStyle&&!K.textContent.replace(/^\s+|\s+$/gm,"").length?X=yr:X=Ja();const F=Object.assign(K,{id:X});if(r.add(e,F),X===yr)return null;k&&k(e);let L=!p;if(F.type===Se.Element){L=L&&!F.needBlock;const P=e.shadowRoot;P&&fr(P)&&(F.isShadowHost=!0)}if((F.type===Se.Document||F.type===Se.Element)&&L){S.headWhitespace&&F.type===Se.Element&&F.tagName==="head"&&(G=!1);const P={doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:p,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:g,maskTextFn:_,maskInputFn:y,slimDOMOptions:S,dataURLOptions:O,inlineImages:v,recordCanvas:N,preserveWhiteSpace:G,onSerialize:k,onIframeLoad:b,iframeLoadTimeout:w,onBlockedImageLoad:E,onStylesheetLoad:C,stylesheetLoadTimeout:D,keepIframeSrcFn:I},M=e.childNodes?Array.from(e.childNodes):[];for(const J of M){const se=kn(J,P);se&&F.childNodes.push(se)}if(ow(e)&&e.shadowRoot)for(const J of Array.from(e.shadowRoot.childNodes)){const se=kn(J,P);se&&(fr(e.shadowRoot)&&(se.isShadow=!0),F.childNodes.push(se))}}if(e.parentNode&&dr(e.parentNode)&&fr(e.parentNode)&&(F.isShadow=!0),F.type===Se.Element&&F.tagName==="iframe"&&!F.needBlock&&Rw(e,()=>{const P=ap(e);if(P&&b){const M=kn(P,{doc:P,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:g,maskTextFn:_,maskInputFn:y,slimDOMOptions:S,dataURLOptions:O,inlineImages:v,recordCanvas:N,preserveWhiteSpace:G,onSerialize:k,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:D,keepIframeSrcFn:I});M&&b(e,M)}},w),F.type===Se.Element&&F.tagName==="img"&&!e.complete&&F.needBlock){const P=e,M=()=>{if(P.isConnected&&!P.complete&&E)try{const J=P.getBoundingClientRect();J.width>0&&J.height>0&&E(P,F,J)}catch{}P.removeEventListener("load",M)};P.isConnected&&P.addEventListener("load",M)}return F.type===Se.Element&&F.tagName==="link"&&typeof F.attributes.rel=="string"&&(F.attributes.rel==="stylesheet"||F.attributes.rel==="preload"&&typeof F.attributes.href=="string"&&sp(F.attributes.href)==="css")&&Aw(e,()=>{if(C){const P=kn(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:g,maskTextFn:_,maskInputFn:y,slimDOMOptions:S,dataURLOptions:O,inlineImages:v,recordCanvas:N,preserveWhiteSpace:G,onSerialize:k,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:D,keepIframeSrcFn:I});P&&C(e,P)}},D),F.type===Se.Element&&delete F.needBlock,F}function Pw(e,t){const{mirror:n=new rp,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:o=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:d=null,inlineStylesheet:l=!0,inlineImages:p=!1,recordCanvas:f=!1,maskAllInputs:h=!1,maskAttributeFn:g,maskTextFn:_,maskInputFn:y,slimDOM:S=!1,dataURLOptions:O,preserveWhiteSpace:v,onSerialize:N,onIframeLoad:k,iframeLoadTimeout:b,onBlockedImageLoad:w,onStylesheetLoad:E,stylesheetLoadTimeout:C,keepIframeSrcFn:D=()=>!1}=t||{};return kn(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:l,maskInputOptions: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}:h===!1?{}:h,maskAttributeFn:g,maskTextFn:_,maskInputFn:y,slimDOMOptions:S===!0||S==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:S==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:S===!1?{}:S,dataURLOptions:O,inlineImages:p,recordCanvas:f,preserveWhiteSpace:v,onSerialize:N,onIframeLoad:k,iframeLoadTimeout:b,onBlockedImageLoad:w,onStylesheetLoad:E,stylesheetLoadTimeout:C,keepIframeSrcFn:D,newlyAddedElement:!1})}function Ne(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const En=`Please stop import mirror directly. Instead of that,\r
489
+ Name: ${gt(r)}
490
+ Error:`,s)}}function ev(){return HE(e=>{Ar("cls",{metric:e}),_f=e},{reportAllChanges:!0})}function tv(){return KE(e=>{Ar("lcp",{metric:e}),yf=e},{reportAllChanges:!0})}function nv(){return QE(e=>{Ar("ttfb",{metric:e}),Sf=e})}function rv(){return VE(e=>{Ar("inp",{metric:e}),bf=e})}function fo(e,t,n,r,s=!1){vf(e,t);let o;return Ps[e]||(o=n(),Ps[e]=!0),r&&t({metric:r}),Tf(e,t,s?o:void 0)}function sv(e){const t={};e==="event"&&(t.durationThreshold=0),Kn(e,n=>{Ar(e,{entries:n})},t)}function vf(e,t){rr[e]=rr[e]||[],rr[e].push(t)}function Tf(e,t,n){return()=>{n&&n();const r=rr[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function ov(e){return"duration"in e}function Uo(e){return typeof e=="number"&&isFinite(e)}function Ft(e,t,n,{...r}){const s=z(e).start_timestamp;return s&&s>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),eo(e,()=>{const o=qn({startTime:t,...r});return o&&o.end(n),o})}function Ma(e){const t=x();if(!t)return;const{name:n,transaction:r,attributes:s,startTime:o}=e,{release:i,environment:a,sendDefaultPii:c}=t.getOptions(),d=t.getIntegrationByName("Replay")?.getReplayId(),l=q(),p=l.getUser(),f=p!==void 0?p.email||p.id||p.ip_address:void 0;let h;try{h=l.getScopeData().contexts.profile.profile_id}catch{}const g={release:i,environment:a,user:f||void 0,profile_id:h||void 0,replay_id:d||void 0,transaction:r,"user_agent.original":j.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...s};return qn({name:n,attributes:g,startTime:o,experimental:{standalone:!0}})}function xr(){return j.addEventListener&&j.performance}function ge(e){return e/1e3}function iv(e){let t="unknown",n="unknown",r="";for(const s of e){if(s==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=s}return r===e&&(t=r),{name:t,version:n}}function If(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function wf(e,t){let n,r=!1;function s(a){!r&&n&&t(a,n),r=!0}Ra(()=>{s("pagehide")});const o=e.on("beforeStartNavigationSpan",(a,c)=>{c?.isRedirect||(s("navigation"),o(),i())}),i=e.on("afterStartPageLoadSpan",a=>{n=a.spanContext().spanId,i()})}function av(e){let t=0,n;if(!If("layout-shift"))return;const r=Aa(({metric:s})=>{const o=s.entries[s.entries.length-1];o&&(t=s.value,n=o)},!0);wf(e,(s,o)=>{cv(t,n,o,s),r()})}function cv(e,t,n,r){an&&m.log(`Sending CLS span (${e})`);const s=t?ge((Re()||0)+t.startTime):he(),o=q().getScopeData().transactionName,i=t?Pe(t.sources[0]?.node):"Layout shift",a={[de]:"auto.http.browser.cls",[Ge]:"ui.webvital.cls",[jn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((u,d)=>{a[`cls.source.${d+1}`]=Pe(u.node)});const c=Ma({name:i,transaction:o,attributes:a,startTime:s});c&&(c.addEvent("cls",{[_r]:"",[yr]:e}),c.end(s))}function uv(e){let t=0,n;if(!If("largest-contentful-paint"))return;const r=xa(({metric:s})=>{const o=s.entries[s.entries.length-1];o&&(t=s.value,n=o)},!0);wf(e,(s,o)=>{lv(t,n,o,s),r()})}function lv(e,t,n,r){an&&m.log(`Sending LCP span (${e})`);const s=ge((Re()||0)+(t?.startTime||0)),o=q().getScopeData().transactionName,i=t?Pe(t.element):"Largest contentful paint",a={[de]:"auto.http.browser.lcp",[Ge]:"ui.webvital.lcp",[jn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=Pe(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url.trim().slice(0,200)),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));const c=Ma({name:i,transaction:o,attributes:a,startTime:s});c&&(c.addEvent("lcp",{[_r]:"millisecond",[yr]:e}),c.end(s))}function We(e){return e&&((Re()||performance.timeOrigin)+e)/1e3}function kf(e){const t={};if(e.nextHopProtocol!=null){const{name:n,version:r}=iv(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return Re()||xr()?.timeOrigin?dv({...t,"http.request.redirect_start":We(e.redirectStart),"http.request.redirect_end":We(e.redirectEnd),"http.request.worker_start":We(e.workerStart),"http.request.fetch_start":We(e.fetchStart),"http.request.domain_lookup_start":We(e.domainLookupStart),"http.request.domain_lookup_end":We(e.domainLookupEnd),"http.request.connect_start":We(e.connectStart),"http.request.secure_connection_start":We(e.secureConnectionStart),"http.request.connection_end":We(e.connectEnd),"http.request.request_start":We(e.requestStart),"http.request.response_start":We(e.responseStart),"http.request.response_end":We(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function dv(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const fv=2147483647;let ku=0,Ye={},Le,Ds;function pv({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=xr();if(r&&Re()){r.mark&&j.performance.mark("sentry-tracing-init");const s=t?uv(n):yv(),o=Sv(),i=e?av(n):_v();return()=>{s?.(),o(),i?.()}}return()=>{}}function hv(){cn("longtask",({entries:e})=>{const t=be();if(!t)return;const{op:n,start_timestamp:r}=z(t);for(const s of e){const o=ge(Re()+s.startTime),i=ge(s.duration);n==="navigation"&&r&&o<r||Ft(t,o,o+i,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[de]:"auto.ui.browser.metrics"}})}})}function mv(){new PerformanceObserver(t=>{const n=be();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const s=ge(Re()+r.startTime),{start_timestamp:o,op:i}=z(n);if(i==="navigation"&&o&&s<o)continue;const a=ge(r.duration),c={[de]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:d,invokerType:l,sourceURL:p,sourceFunctionName:f,sourceCharPosition:h}=u;c["browser.script.invoker"]=d,c["browser.script.invoker_type"]=l,p&&(c["code.filepath"]=p),f&&(c["code.function"]=f),h!==-1&&(c["browser.script.source_char_position"]=h),Ft(n,s,s+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function gv(){cn("event",({entries:e})=>{const t=be();if(t){for(const n of e)if(n.name==="click"){const r=ge(Re()+n.startTime),s=ge(n.duration),o={name:Pe(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[de]:"auto.ui.browser.metrics"}},i=Ol(n.target);i&&(o.attributes["ui.component_name"]=i),Ft(t,r,r+s,o)}}})}function _v(){return Aa(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ye.cls={value:e.value,unit:""},Ds=t)},!0)}function yv(){return xa(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ye.lcp={value:e.value,unit:"millisecond"},Le=t)},!0)}function Sv(){return ZE(({metric:e})=>{e.entries[e.entries.length-1]&&(Ye.ttfb={value:e.value,unit:"millisecond"})})}function bv(e,t){const n=xr(),r=Re();if(!n?.getEntries||!r)return;const s=ge(r),o=n.getEntries(),{op:i,start_timestamp:a}=z(e);o.slice(ku).forEach(c=>{const u=ge(c.startTime),d=ge(Math.max(0,c.duration));if(!(i==="navigation"&&a&&s+u<a))switch(c.entryType){case"navigation":{Iv(e,c,s);break}case"mark":case"paint":case"measure":{vv(e,c,u,d,s,t.ignorePerformanceApiSpans);const l=Ca(),p=c.startTime<l.firstHiddenTime;c.name==="first-paint"&&p&&(Ye.fp={value:c.startTime,unit:"millisecond"}),c.name==="first-contentful-paint"&&p&&(Ye.fcp={value:c.startTime,unit:"millisecond"});break}case"resource":{Cv(e,c,c.name,u,d,s,t.ignoreResourceSpans);break}}}),ku=Math.max(o.length-1,0),Rv(e),i==="pageload"&&(Mv(Ye),t.recordClsOnPageloadSpan||delete Ye.cls,t.recordLcpOnPageloadSpan||delete Ye.lcp,Object.entries(Ye).forEach(([c,u])=>{Em(c,u.value,u.unit)}),e.setAttribute("performance.timeOrigin",s),e.setAttribute("performance.activationStart",Jn()),Av(e,t)),Le=void 0,Ds=void 0,Ye={}}function Ev(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function vv(e,t,n,r,s,o){if(Ev(t)||["mark","measure"].includes(t.entryType)&&Xe(t.name,o))return;const i=Cr(!1),a=ge(i?i.requestStart:0),c=s+Math.max(n,a),u=s+n,d=u+r,l={[de]:"auto.resource.browser.metrics"};c!==u&&(l["sentry.browser.measure_happened_before_request"]=!0,l["sentry.browser.measure_start_time"]=c),Tv(l,t),c<=d&&Ft(e,c,d,{name:t.name,op:t.entryType,attributes:l})}function Tv(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,s]of Object.entries(n))if(s&&Dt(s))e[`sentry.browser.measure.detail.${r}`]=s;else if(s!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(s)}catch{}return}if(Dt(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function Iv(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{jr(e,t,r,n)}),jr(e,t,"secureConnection",n,"TLS/SSL"),jr(e,t,"fetch",n,"cache"),jr(e,t,"domainLookup",n,"DNS"),kv(e,t,n)}function jr(e,t,n,r,s=n){const o=wv(n),i=t[o],a=t[`${n}Start`];!a||!i||Ft(e,r+ge(a),r+ge(i),{op:`browser.${s}`,name:t.name,attributes:{[de]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function wv(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function kv(e,t,n){const r=n+ge(t.requestStart),s=n+ge(t.responseEnd),o=n+ge(t.responseStart);t.responseEnd&&(Ft(e,r,s,{op:"browser.request",name:t.name,attributes:{[de]:"auto.ui.browser.metrics"}}),Ft(e,o,s,{op:"browser.response",name:t.name,attributes:{[de]:"auto.ui.browser.metrics"}}))}function Cv(e,t,n,r,s,o,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(i?.includes(a))return;const c={[de]:"auto.resource.browser.metrics"},u=Zt(n);u.protocol&&(c["url.scheme"]=u.protocol.split(":").pop()),u.host&&(c["server.address"]=u.host),c["url.same_origin"]=n.includes(j.location.origin),xv(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"]]);const d={...c,...kf(t)},l=o+r,p=l+s;Ft(e,l,p,{name:n.replace(j.location.origin,""),op:a,attributes:d})}function Rv(e){const t=j.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),Uo(n.rtt)&&(Ye["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Uo(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Uo(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function Av(e,t){Le&&t.recordLcpOnPageloadSpan&&(Le.element&&e.setAttribute("lcp.element",Pe(Le.element)),Le.id&&e.setAttribute("lcp.id",Le.id),Le.url&&e.setAttribute("lcp.url",Le.url.trim().slice(0,200)),Le.loadTime!=null&&e.setAttribute("lcp.loadTime",Le.loadTime),Le.renderTime!=null&&e.setAttribute("lcp.renderTime",Le.renderTime),e.setAttribute("lcp.size",Le.size)),Ds?.sources&&t.recordClsOnPageloadSpan&&Ds.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,Pe(n.node)))}function xv(e,t,n){n.forEach(([r,s])=>{const o=e[r];o!=null&&(typeof o=="number"&&o<fv||typeof o=="string")&&(t[s]=o)})}function Mv(e){const t=Cr(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function Ov(){return xr()&&Re()?cn("element",Nv):()=>{}}const Nv=({entries:e})=>{const t=be(),n=t?Se(t):void 0,r=n?z(n).description:q().getScopeData().transactionName;e.forEach(s=>{const o=s;if(!o.identifier)return;const i=o.name,a=o.renderTime,c=o.loadTime,[u,d]=c?[ge(c),"load-time"]:a?[ge(a),"render-time"]:[he(),"entry-emission"],l=i==="image-paint"?ge(Math.max(0,(a??0)-(c??0))):0,p={[de]:"auto.ui.browser.elementtiming",[Ge]:"ui.elementtiming",[je]:"component","sentry.span_start_time_source":d,"sentry.transaction_name":r,"element.id":o.id,"element.type":o.element?.tagName?.toLowerCase()||"unknown","element.size":o.naturalWidth&&o.naturalHeight?`${o.naturalWidth}x${o.naturalHeight}`:void 0,"element.render_time":a,"element.load_time":c,"element.url":o.url||void 0,"element.identifier":o.identifier,"element.paint_type":i};zn({name:`element[${o.identifier}]`,attributes:p,startTime:u,onlyIfParent:!0},f=>{f.end(u+l)})})},Lv=1e3;let Cu,bi,Ei;function Cf(e){Bt("dom",e),Ut("dom",Pv)}function Pv(){if(!j.document)return;const e=ze.bind(null,"dom"),t=Ru(e,!0);j.document.addEventListener("click",t,!1),j.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const s=j[n]?.prototype;s?.hasOwnProperty?.("addEventListener")&&(we(s,"addEventListener",function(o){return function(i,a,c){if(i==="click"||i=="keypress")try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=u[i]=u[i]||{refCount:0};if(!d.handler){const l=Ru(e);d.handler=l,o.call(this,i,l,c)}d.refCount++}catch{}return o.call(this,i,a,c)}}),we(s,"removeEventListener",function(o){return function(i,a,c){if(i==="click"||i=="keypress")try{const u=this.__sentry_instrumentation_handlers__||{},d=u[i];d&&(d.refCount--,d.refCount<=0&&(o.call(this,i,d.handler,c),d.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,i,a,c)}}))})}function Dv(e){if(e.type!==bi)return!1;try{if(!e.target||e.target._sentryId!==Ei)return!1}catch{}return!0}function Fv(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function Ru(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=$v(n);if(Fv(n.type,r))return;De(n,"_sentryCaptured",!0),r&&!r._sentryId&&De(r,"_sentryId",Ee());const s=n.type==="keypress"?"input":n.type;Dv(n)||(e({event:n,name:s,global:t}),bi=n.type,Ei=r?r._sentryId:void 0),clearTimeout(Cu),Cu=j.setTimeout(()=>{Ei=void 0,bi=void 0},Lv)}}function $v(e){try{return e.target}catch{return null}}let zr;function po(e){const t="history";Bt(t,e),Ut(t,Bv)}function Bv(){if(j.addEventListener("popstate",()=>{const t=j.location.href,n=zr;if(zr=t,n===t)return;ze("history",{from:n,to:t})}),!zS())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const s=zr,o=Uv(String(r));if(zr=o,s===o)return t.apply(this,n);ze("history",{from:s,to:o})}return t.apply(this,n)}}we(j.history,"pushState",e),we(j.history,"replaceState",e)}function Uv(e){try{return new URL(e,j.location.origin).toString()}catch{return e}}const ds={};function Oa(e){const t=ds[e];if(t)return t;let n=j[e];if(li(n))return ds[e]=n.bind(j);const r=j.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const o=s.contentWindow;o?.[e]&&(n=o[e]),r.head.removeChild(s)}catch(s){an&&m.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(ds[e]=n.bind(j))}function Hv(e){ds[e]=void 0}function Mr(...e){return Oa("setTimeout")(...e)}const pt="__sentry_xhr_v3__";function Na(e){Bt("xhr",e),Ut("xhr",Wv)}function Wv(){if(!j.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const s=new Error,o=he()*1e3,i=Ke(r[0])?r[0].toUpperCase():void 0,a=jv(r[1]);if(!i||!a)return t.apply(n,r);n[pt]={method:i,url:a,request_headers:{}},i==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[pt];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const d={endTimestamp:he()*1e3,startTimestamp:o,xhr:n,virtualError:s};ze("xhr",d)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,d,l){return c(),u.apply(d,l)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,d,l){const[p,f]=l,h=d[pt];return h&&Ke(p)&&Ke(f)&&(h.request_headers[p.toLowerCase()]=f),u.apply(d,l)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const s=n[pt];if(!s)return t.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const o={startTimestamp:he()*1e3,xhr:n};return ze("xhr",o),t.apply(n,r)}})}function jv(e){if(Ke(e))return e;try{return e.toString()}catch{}}function Rf(e){return new URLSearchParams(e).toString()}function Fs(e,t=m){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Rf(e)];if(!e)return[void 0]}catch(n){return an&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return an&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function La(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function Af(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return an&&m.error(n,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
491
+ `).reduce((n,r)=>{const[s,o]=r.split(": ");return o&&(n[s.toLowerCase()]=o),n},{}):{}}const Ho=[],fs=new Map,pn=new Map,zv=60;function qv(){if(xr()&&Re()){const t=Gv();return()=>{t()}}return()=>{}}const vi={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 Gv(){return Ef(Vv)}const Vv=({metric:e})=>{if(e.value==null)return;const t=ge(e.value);if(t>zv)return;const n=e.entries.find(h=>h.duration===e.value&&vi[h.name]);if(!n)return;const{interactionId:r}=n,s=vi[n.name],o=ge(Re()+n.startTime),i=be(),a=i?Se(i):void 0,c=r!=null?fs.get(r):void 0,u=c?.span||a,d=u?z(u).description:q().getScopeData().transactionName,l=c?.elementName||Pe(n.target),p={[de]:"auto.http.browser.inp",[Ge]:`ui.interaction.${s}`,[jn]:n.duration},f=Ma({name:l,transaction:d,attributes:p,startTime:o});f&&(f.addEvent("inp",{[_r]:"millisecond",[yr]:e.value}),f.end(o+t))};function Yv(){const e=Object.keys(vi);xs()&&e.forEach(s=>{j.addEventListener(s,t,{capture:!0,passive:!0})});function t(s){const o=s.target;if(!o)return;const i=Pe(o),a=Math.round(s.timeStamp);if(pn.set(a,i),pn.size>50){const c=pn.keys().next().value;c!==void 0&&pn.delete(c)}}function n(s){const o=Math.round(s.startTime);let i=pn.get(o);if(!i)for(let a=-5;a<=5;a++){const c=pn.get(o+a);if(c){i=c;break}}return i||"<unknown>"}const r=({entries:s})=>{const o=be(),i=o&&Se(o);s.forEach(a=>{if(!ov(a))return;const c=a.interactionId;if(c==null||fs.has(c))return;const u=a.target?Pe(a.target):n(a);if(Ho.length>10){const d=Ho.shift();fs.delete(d)}Ho.push(c),fs.set(c,{span:i,elementName:u})})};cn("event",r),cn("first-input",r)}const Jv=40;function xf(e,t=Oa("fetch")){let n=0,r=0;async function s(o){const i=o.body.length;n+=i,r++;const a={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const c=await t(e.url,a);return{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}}catch(c){throw Hv("fetch"),c}finally{n-=i,r--}}return Fg(e,s,Td(e.bufferSize||Jv))}const Kv=10,Xv=20,Qv=30,Zv=40,eT=50;function Ln(e,t,n,r){const s={filename:e,function:t==="<anonymous>"?ct:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const tT=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,nT=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,rT=/\((\S*)(?::(\d+))(?::(\d+))\)/,sT=/at (.+?) ?\(data:(.+?),/,oT=e=>{const t=e.match(sT);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=tT.exec(e);if(n){const[,s,o,i]=n;return Ln(s,ct,+o,+i)}const r=nT.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const a=rT.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[o,i]=Mf(r[1]||ct,r[2]);return Ln(i,o,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},iT=[Qv,oT],aT=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,cT=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,uT=e=>{const t=aT.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const o=cT.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],s=t[1]||ct;return[s,r]=Mf(s,r),Ln(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},lT=[eT,uT],dT=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,fT=e=>{const t=dT.exec(e);return t?Ln(t[2],t[1]||ct,+t[3],t[4]?+t[4]:void 0):void 0},aR=[Zv,fT],pT=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,hT=e=>{const t=pT.exec(e);return t?Ln(t[2],t[3]||ct,+t[1]):void 0},cR=[Kv,hT],mT=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,gT=e=>{const t=mT.exec(e);return t?Ln(t[5],t[3]||t[4]||ct,+t[1],+t[2]):void 0},uR=[Xv,gT],_T=[iT,lT],yT=wl(..._T),Mf=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:ct,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function lR(e,{metadata:t,tunnel:n,dsn:r}){const s={event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:It(r)}},o=ST(e);return tt(s,[o])}function ST(e){return[{type:"user_report"},e]}const R=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,qr=1024,bT="Breadcrumbs",ET=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:bT,setup(n){t.console&&ra(wT(n)),t.dom&&Cf(IT(n,t.dom)),t.xhr&&Na(kT(n)),t.fetch&&ga(CT(n)),t.history&&po(RT(n)),t.sentry&&n.on("beforeSendEvent",TT(n))}}}),vT=ET;function TT(e){return function(n){x()===e&&Et({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Gt(n)},{event:n})}}function IT(e,t){return function(r){if(x()!==e)return;let s,o,i=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>qr&&(R&&m.warn(`\`dom.maxStringLength\` cannot exceed ${qr}, but a value of ${a} was configured. Sentry will use ${qr} instead.`),a=qr),typeof i=="string"&&(i=[i]);try{const u=r.event,d=AT(u)?u.target:u;s=Pe(d,{keyAttrs:i,maxStringLength:a}),o=Ol(d)}catch{s="<unknown>"}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};o&&(c.data={"ui.component_name":o}),Et(c,{event:r.event,name:r.name,global:r.global})}}function wT(e){return function(n){if(x()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:sa(n.level),message:_s(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${_s(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Et(r,{input:n.args,level:n.level})}}function kT(e){return function(n){if(x()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,o=n.xhr[pt];if(!r||!s||!o)return;const{method:i,url:a,status_code:c,body:u}=o,d={method:i,url:a,status_code:c},l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s},p={category:"xhr",data:d,type:"http",level:Yd(c)};e.emit("beforeOutgoingRequestBreadcrumb",p,l),Et(p,l)}}function CT(e){return function(n){if(x()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const o=n.fetchData,i={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s},a={category:"fetch",data:o,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,i),Et(a,i)}else{const o=n.response,i={...n.fetchData,status_code:o?.status};n.fetchData.request_body_size,n.fetchData.response_body_size,o?.status;const a={input:n.args,response:o,startTimestamp:r,endTimestamp:s},c={category:"fetch",data:i,type:"http",level:Yd(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),Et(c,a)}}}function RT(e){return function(n){if(x()!==e)return;let r=n.from,s=n.to;const o=Zt(B.location.href);let i=r?Zt(r):void 0;const a=Zt(s);i?.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(s=a.relative),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),Et({category:"navigation",data:{from:r,to:s}})}}function AT(e){return!!e&&!!e.target}const xT=["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"],MT="BrowserApiErrors",OT=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:MT,setupOnce(){t.setTimeout&&we(B,"setTimeout",Au),t.setInterval&&we(B,"setInterval",Au),t.requestAnimationFrame&&we(B,"requestAnimationFrame",LT),t.XMLHttpRequest&&"XMLHttpRequest"in B&&we(XMLHttpRequest.prototype,"send",PT);const n=t.eventTarget;n&&(Array.isArray(n)?n:xT).forEach(s=>DT(s,t))}}}),NT=OT;function Au(e){return function(...t){const n=t[0];return t[0]=Nn(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${gt(e)}`}}),e.apply(this,t)}}function LT(e){return function(t){return e.apply(this,[Nn(t,{mechanism:{data:{handler:gt(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function PT(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&we(n,s,function(o){const i={mechanism:{data:{handler:gt(o)},handled:!1,type:`auto.browser.browserapierrors.xhr.${s}`}},a=Bi(o);return a&&(i.mechanism.data.handler=gt(a)),Nn(o,i)})}),e.apply(this,t)}}function DT(e,t){const r=B[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(we(r,"addEventListener",function(s){return function(o,i,a){try{FT(i)&&(i.handleEvent=Nn(i.handleEvent,{mechanism:{data:{handler:gt(i),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&$T(this,o,i),s.apply(this,[o,Nn(i,{mechanism:{data:{handler:gt(i),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),we(r,"removeEventListener",function(s){return function(o,i,a){try{const c=i.__sentry_wrapped__;c&&s.call(this,o,c,a)}catch{}return s.call(this,o,i,a)}}))}function FT(e){return typeof e.handleEvent=="function"}function $T(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const BT=()=>({name:"BrowserSession",setupOnce(){if(typeof B.document>"u"){R&&m.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Cc({ignoreDuration:!0}),Rc(),po(({from:e,to:t})=>{e!==void 0&&e!==t&&(Cc({ignoreDuration:!0}),Rc())})}}),UT="GlobalHandlers",HT=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:UT,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(jT(n),xu("onerror")),t.onunhandledrejection&&(zT(n),xu("onunhandledrejection"))}}}),WT=HT;function jT(e){kl(t=>{const{stackParser:n,attachStacktrace:r}=Lf();if(x()!==e||df())return;const{msg:s,url:o,line:i,column:a,error:c}=t,u=qT(uo(n,c||s,void 0,r,!1),o,i,a);u.level="error",br(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function zT(e){Cl(t=>{const{stackParser:n,attachStacktrace:r}=Lf();if(x()!==e||df())return;const s=Of(t),o=Dt(s)?Nf(s):uo(n,s,void 0,r,!0);o.level="error",br(o,{originalException:s,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function Of(e){if(Dt(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 Nf(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function qT(e,t,n,r){const s=e.exception=e.exception||{},o=s.values=s.values||[],i=o[0]=o[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[],u=r,d=n,l=GT(t)??un();return c.length===0&&c.push({colno:u,filename:l,function:ct,in_app:!0,lineno:d}),e}function xu(e){R&&m.log(`Global Handler attached: ${e}`)}function Lf(){return x()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function GT(e){if(!(!Ke(e)||e.length===0)){if(e.startsWith("data:")){const t=e.match(/^data:([^;]+)/),n=t?t[1]:"text/javascript",r=e.includes("base64,");return`<data:${n}${r?",base64":""}>`}return e.slice(0,1024)}}const VT=()=>({name:"HttpContext",preprocessEvent(e){if(!B.navigator&&!B.location&&!B.document)return;const t=va(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}}),YT="cause",JT=5,KT="LinkedErrors",XT=((e={})=>{const t=e.limit||JT,n=e.key||YT;return{name:KT,preprocessEvent(r,s,o){const i=o.getOptions();h_(Ta,i.stackParser,n,t,r,s)}}}),QT=XT;function ZT(){return e0()?(R&&$t(()=>{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 e0(){if(typeof B.window>"u")return!1;const e=B;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=un(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(B===B.top&&r.some(o=>n.startsWith(`${o}://`)))}function t0(e){return[i_(),n_(),NT(),vT(),WT(),QT(),T_(),VT(),BT()]}function dR(e={}){const t=!e.skipBrowserExtensionCheck&&ZT(),n={...e,enabled:t?!1:e.enabled,stackParser:th(e.stackParser||yT),integrations:ag({integrations:e.integrations,defaultIntegrations:e.defaultIntegrations==null?t0():e.defaultIntegrations}),transport:e.transport||xf};return Og(ME,n)}function fR(){}function pR(e){e()}function hR(e={}){const t=B.document,n=t?.head||t?.body;if(!n){R&&m.error("[showReportDialog] Global document not defined");return}const r=q(),o=x()?.getDsn();if(!o){R&&m.error("[showReportDialog] DSN not configured");return}const i={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||Zm()},a=B.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=og(o,i);const{onLoad:c,onClose:u}=i;if(c&&(a.onload=c),u){const d=l=>{if(l.data==="__sentry_reportdialog_closed__")try{u()}finally{B.removeEventListener("message",d)}};B.addEventListener("message",d)}n.appendChild(a)}const n0=$,r0="ReportingObserver",Mu=new WeakMap,s0=((e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(Mu.has(x()))for(const s of r)et(o=>{o.setExtra("url",s.url);const i=`ReportingObserver [${s.type}]`;let a="No details available";if(s.body){const c={};for(const u in s.body)c[u]=s.body[u];if(o.setExtra("body",c),s.type==="crash"){const u=s.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=s.body.message||a}si(`${i}: ${a}`)})}return{name:r0,setupOnce(){if(!GS())return;new n0.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){Mu.set(r,!0)}}}),mR=s0,o0="HttpClient",i0=((e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:o0,setup(n){h0(n,t),m0(n,t)}}}),gR=i0;function a0(e,t,n,r,s){if(Df(e,n.status,n.url)){const o=g0(t,r);let i,a,c,u;$f()&&([i,c]=Ou("Cookie",o),[a,u]=Ou("Set-Cookie",n));const d=Ff({url:o.url,method:o.method,status:n.status,requestHeaders:i,responseHeaders:a,requestCookies:c,responseCookies:u,error:s,type:"fetch"});br(d)}}function Ou(e,t){const n=l0(t.headers);let r;try{const s=n[e]||n[e.toLowerCase()]||void 0;s&&(r=Pf(s))}catch{}return[n,r]}function c0(e,t,n,r,s){if(Df(e,t.status,t.responseURL)){let o,i,a;if($f()){try{const u=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;u&&(i=Pf(u))}catch{}try{a=d0(t)}catch{}o=r}const c=Ff({url:t.responseURL,method:n,status:t.status,requestHeaders:o,responseHeaders:a,responseCookies:i,error:s,type:"xhr"});br(c)}}function u0(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function Pf(e){return e.split("; ").reduce((t,n)=>{const[r,s]=n.split("=");return r&&s&&(t[r]=s),t},{})}function l0(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function d0(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
492
+ `).reduce((n,r)=>{const[s,o]=r.split(": ");return s&&o&&(n[s]=o),n},{}):{}}function f0(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function p0(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function h0(e,t){Jd()&&ga(n=>{if(x()!==e)return;const{response:r,args:s,error:o,virtualError:i}=n,[a,c]=s;r&&a0(t,a,r,c,o||i)},!1)}function m0(e,t){"XMLHttpRequest"in $&&Na(n=>{if(x()!==e)return;const{error:r,virtualError:s}=n,o=n.xhr,i=o[pt];if(!i)return;const{method:a,request_headers:c}=i;try{c0(t,o,a,c,r||s)}catch(u){R&&m.warn("Error while extracting response event form XHR response",u)}})}function Df(e,t,n){return p0(e.failedRequestStatusCodes,t)&&f0(e.failedRequestTargets,n)&&!Ad(n,x())}function Ff(e){const t=x(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,s=`HTTP Client Error with status code: ${e.status}`,o={message:s,exception:{values:[{type:"Error",value:s,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:u0(e.responseHeaders)}}};return yt(o,{type:`auto.http.client.${e.type}`,handled:!1}),o}function g0(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function $f(){const e=x();return e?!!e.getOptions().sendDefaultPii:!1}const Wo=$,_0=7,y0="ContextLines",S0=((e={})=>{const t=e.frameContextLines!=null?e.frameContextLines:_0;return{name:y0,processEvent(n){return b0(n,t)}}}),_R=S0;function b0(e,t){const n=Wo.document,r=Wo.location&&Rd(Wo.location.href);if(!n||!r)return e;const s=e.exception?.values;if(!s?.length)return e;const o=n.documentElement.innerHTML;if(!o)return e;const i=["<!DOCTYPE html>","<html>",...o.split(`
493
+ `),"</html>"];return s.forEach(a=>{const c=a.stacktrace;c?.frames&&(c.frames=c.frames.map(u=>E0(u,i,r,t)))}),e}function E0(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||hh(t,e,r),e}const v0="GraphQLClient",T0=(e=>({name:v0,setup(t){I0(t,e),w0(t,e)}}));function I0(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const o=z(n).data||{};if(!(o[Ge]==="http.client"))return;const c=o[Ah]||o["http.url"],u=o[Rh]||o["http.method"];if(!Ke(c)||!Ke(u))return;const{endpoints:d}=t,l=Xe(c,d),p=Uf(r);if(l&&p){const f=Hf(p);if(f){const h=Bf(f);n.updateName(`${u} ${c} (${h})`),n.setAttribute("graphql.document",p)}}})}function w0(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{const{category:s,type:o,data:i}=n;if(o==="http"&&(s==="fetch"||s==="xhr")){const d=i?.url,{endpoints:l}=t,p=Xe(d,l),f=Uf(r);if(p&&i&&f){const h=Hf(f);if(!i.graphql&&h){const g=Bf(h);i["graphql.document"]=h.query,i["graphql.operation"]=g}}}})}function Bf(e){const{query:t,operationName:n}=e,{operationName:r=n,operationType:s}=k0(t);return r?`${s} ${r}`:`${s}`}function Uf(e){const t="xhr"in e;let n;if(t){const r=e.xhr[pt];n=r&&Fs(r.body)[0]}else{const r=La(e.input);n=Fs(r)[0]}return n}function k0(e){const 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]};const s=e.match(n);return s?{operationType:s[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function Hf(e){let t;try{const n=JSON.parse(e);!!n.query&&(t=n)}finally{return t}}const yR=T0,ue=$,Pa="sentryReplaySession",C0="replay_event",Da="Unable to send Replay",R0=3e5,A0=9e5,x0=5e3,M0=5500,O0=6e4,N0=5e3,L0=3,Nu=15e4,Gr=5e3,P0=3e3,D0=300,Fa=2e7,F0=4999,$0=15e3,Lu=36e5;var B0=Object.defineProperty,U0=(e,t,n)=>t in e?B0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pu=(e,t,n)=>U0(e,typeof t!="symbol"?t+"":t,n),ye=(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))(ye||{});function H0(e){return e.nodeType===e.ELEMENT_NODE}function sr(e){return e?.host?.shadowRoot===e}function or(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function W0(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 j0(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const 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 $s(e){try{const t=e.rules||e.cssRules;return t?W0(Array.from(t,Wf).join("")):null}catch{return null}}function z0(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,s=r[n],o=r.getPropertyPriority(s);t+=`${s}:${r.getPropertyValue(s)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}function Wf(e){let t;if(G0(e))try{t=$s(e.styleSheet)||j0(e)}catch{}else if(V0(e)){let n=e.cssText;const r=e.selectorText.includes(":"),s=typeof e.style.all=="string"&&e.style.all;if(s&&(n=z0(e)),r&&(n=q0(n)),r||s)return n}return t||e.cssText}function q0(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function G0(e){return"styleSheet"in e}function V0(e){return"selectorText"in e}let jf=class{constructor(){Pu(this,"idNodeMap",new Map),Pu(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Y0(){return new jf}function ho({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 lr({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function Pn(e){return e.toLowerCase()}function Ti(e){return e.toUpperCase()}const Du="__rrweb_original__";function J0(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let s=0;s<e.height;s+=n){const o=t.getImageData,i=Du in o?o[Du]:o;if(new Uint32Array(i.call(t,r,s,Math.min(n,e.width-r),Math.min(n,e.height-s)).data.buffer).some(c=>c!==0))return!1}return!0}function $a(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Pn(t):null}function Bs(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function zf(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}const Fu={};function qf(e){const t=Fu[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const o=s.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(s)}catch{}return Fu[e]=r.bind(window)}function Ii(...e){return qf("setTimeout")(...e)}function Gf(...e){return qf("clearTimeout")(...e)}function Vf(e){try{return e.contentDocument}catch{}}let K0=1;const X0=new RegExp("[^a-z0-9-_:]"),dr=-2;function Ba(){return K0++}function Q0(e){if(e instanceof HTMLFormElement)return"form";const t=Pn(e.tagName);return X0.test(t)?"div":t}function Z0(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let hn,$u;const eI=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,tI=/^(?:[a-z+]+:)?\/\//i,nI=/^www\..*/i,rI=/^(data:)([^,]*),(.*)/i;function Us(e,t){return(e||"").replace(eI,(n,r,s,o,i,a)=>{const c=s||i||a,u=r||o||"";if(!c)return n;if(tI.test(c)||nI.test(c))return`url(${u}${c}${u})`;if(rI.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${Z0(t)+c}${u})`;const d=t.split("/"),l=c.split("/");d.pop();for(const p of l)p!=="."&&(p===".."?d.pop():d.push(p));return`url(${u}${d.join("/")}${u})`})}const sI=/^[^ \t\n\r\u000c]+/,oI=/^[, \t\n\r\u000c]+/;function iI(e,t){if(t.trim()==="")return t;let n=0;function r(o){let i;const a=o.exec(t.substring(n));return a?(i=a[0],n+=i.length,i):""}const s=[];for(;r(oI),!(n>=t.length);){let o=r(sI);if(o.slice(-1)===",")o=yn(e,o.substring(0,o.length-1)),s.push(o);else{let i="";o=yn(e,o);let a=!1;for(;;){const c=t.charAt(n);if(c===""){s.push((o+i).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,s.push((o+i).trim());break}else c==="("&&(a=!0);i+=c,n+=1}}}return s.join(", ")}const Bu=new WeakMap;function yn(e,t){return!t||t.trim()===""?t:mo(e,t)}function aI(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function mo(e,t){let n=Bu.get(e);if(n||(n=e.createElement("a"),Bu.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function Yf(e,t,n,r,s,o){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?yn(e,r):n==="srcset"?iI(e,r):n==="style"?Us(r,mo(e)):t==="object"&&n==="data"?yn(e,r):typeof o=="function"?o(n,r,s):r)}function Jf(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function cI(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 s=e.classList.length;s--;){const o=e.classList[s];if(t.test(o))return!0}if(n)return e.matches(n)}catch{}return!1}function uI(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Jt(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Jt(e.parentNode,t,n,r+1)}function Sn(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(uI(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Dn(e,t,n,r,s,o){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(i===null)return!1;if(i.tagName==="INPUT"){const u=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(o){if(c=Jt(i,Sn(r,s)),c<0)return!0;a=Jt(i,Sn(t,n),c>=0?c:1/0)}else{if(a=Jt(i,Sn(t,n)),a<0)return!1;c=Jt(i,Sn(r,s),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!o}catch{}return!!o}function lI(e,t,n){const r=e.contentWindow;if(!r)return;let s=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){const a=Ii(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{Gf(a),s=!0,t()});return}const i="about:blank";if(r.location.href!==i||e.src===i||e.src==="")return Ii(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function dI(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;const o=Ii(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{Gf(o),r=!0,t()})}function fI(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,inlineStylesheet:f,maskInputOptions:h={},maskTextFn:g,maskInputFn:_,dataURLOptions:y={},inlineImages:S,recordCanvas:O,keepIframeSrcFn:v,newlyAddedElement:N=!1}=t,k=pI(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:ye.Document,childNodes:[],compatMode:e.compatMode}:{type:ye.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:ye.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return mI(e,{doc:n,blockClass:s,blockSelector:o,unblockSelector:i,inlineStylesheet:f,maskAttributeFn:c,maskInputOptions:h,maskInputFn:_,dataURLOptions:y,inlineImages:S,recordCanvas:O,keepIframeSrcFn:v,newlyAddedElement:N,rootId:k,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p});case e.TEXT_NODE:return hI(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,maskTextFn:g,maskInputOptions:h,maskInputFn:_,rootId:k});case e.CDATA_SECTION_NODE:return{type:ye.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:ye.Comment,textContent:e.textContent||"",rootId:k};default:return!1}}function pI(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function hI(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:o,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:d}=t,l=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const f=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0,g=l==="TEXTAREA"?!0:void 0;if(f&&p){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(p=$s(e.parentNode.sheet))}catch(y){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${y}`,e)}p=Us(p,mo(t.doc))}h&&(p="SCRIPT_PLACEHOLDER");const _=Dn(e,r,o,s,i,n);if(!f&&!h&&!g&&p&&_&&(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),g&&p&&(c.textarea||_)&&(p=u?u(p,e.parentNode):p.replace(/[\S]/g,"*")),l==="OPTION"&&p){const y=ho({type:null,tagName:l,maskInputOptions:c});p=lr({isMasked:Dn(e,r,o,s,i,y),element:e,value:p,maskInputFn:u})}return{type:ye.Text,textContent:p||"",isStyle:f,rootId:d}}function mI(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:o,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:d={},inlineImages:l,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:h=!1,rootId:g,maskTextClass:_,unmaskTextClass:y,maskTextSelector:S,unmaskTextSelector:O}=t,v=cI(e,r,s,o),N=Q0(e);let k={};const b=e.attributes.length;for(let E=0;E<b;E++){const C=e.attributes[E];C.name&&!Jf(N,C.name,C.value)&&(k[C.name]=Yf(n,N,Pn(C.name),C.value,e,c))}if(N==="link"&&i){const E=Array.from(n.styleSheets).find(D=>D.href===e.href);let C=null;E&&(C=$s(E)),C&&(k.rel=null,k.href=null,k.crossorigin=null,k._cssText=Us(C,E.href))}if(N==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const E=$s(e.sheet);E&&(k._cssText=Us(E,mo(n)))}if(N==="input"||N==="textarea"||N==="select"||N==="option"){const E=e,C=$a(E),D=Bs(E,Ti(N),C),w=E.checked;if(C!=="submit"&&C!=="button"&&D){const A=Dn(E,_,S,y,O,ho({type:C,tagName:Ti(N),maskInputOptions:a}));k.value=lr({isMasked:A,element:E,value:D,maskInputFn:u})}w&&(k.checked=w)}if(N==="option"&&(e.selected&&!a.select?k.selected=!0:delete k.selected),N==="canvas"&&p){if(e.__context==="2d")J0(e)||(k.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){const E=e.toDataURL(d.type,d.quality),C=n.createElement("canvas");C.width=e.width,C.height=e.height;const D=C.toDataURL(d.type,d.quality);E!==D&&(k.rr_dataURL=E)}}if(N==="img"&&l){hn||(hn=n.createElement("canvas"),$u=hn.getContext("2d"));const E=e,C=E.currentSrc||E.getAttribute("src")||"<unknown-src>",D=E.crossOrigin,w=()=>{E.removeEventListener("load",w);try{hn.width=E.naturalWidth,hn.height=E.naturalHeight,$u.drawImage(E,0,0),k.rr_dataURL=hn.toDataURL(d.type,d.quality)}catch(A){if(E.crossOrigin!=="anonymous"){E.crossOrigin="anonymous",E.complete&&E.naturalWidth!==0?w():E.addEventListener("load",w);return}else console.warn(`Cannot inline img src=${C}! Error: ${A}`)}E.crossOrigin==="anonymous"&&(D?k.crossOrigin=D:E.removeAttribute("crossorigin"))};E.complete&&E.naturalWidth!==0?w():E.addEventListener("load",w)}if((N==="audio"||N==="video")&&(k.rr_mediaState=e.paused?"paused":"played",k.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(k.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(k.rr_scrollTop=e.scrollTop)),v){const{width:E,height:C}=e.getBoundingClientRect();k={class:k.class,rr_width:`${E}px`,rr_height:`${C}px`}}N==="iframe"&&!f(k.src)&&(!v&&!Vf(e)&&(k.rr_src=k.src),delete k.src);let I;try{customElements.get(N)&&(I=!0)}catch{}return{type:ye.Element,tagName:N,attributes:k,childNodes:[],isSVG:aI(e)||void 0,needBlock:v,rootId:g,isCustom:I}}function ce(e){return e==null?"":e.toLowerCase()}function gI(e,t){if(t.comment&&e.type===ye.Comment)return!0;if(e.type===ye.Element){if(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"&&zf(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(ce(e.attributes.name).match(/^msapplication-tile(image|color)$/)||ce(e.attributes.name)==="application-name"||ce(e.attributes.rel)==="icon"||ce(e.attributes.rel)==="apple-touch-icon"||ce(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&ce(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ce(e.attributes.property).match(/^(og|twitter|fb):/)||ce(e.attributes.name).match(/^(og|twitter):/)||ce(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(ce(e.attributes.name)==="robots"||ce(e.attributes.name)==="googlebot"||ce(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(ce(e.attributes.name)==="author"||ce(e.attributes.name)==="generator"||ce(e.attributes.name)==="framework"||ce(e.attributes.name)==="publisher"||ce(e.attributes.name)==="progid"||ce(e.attributes.property).match(/^article:/)||ce(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(ce(e.attributes.name)==="google-site-verification"||ce(e.attributes.name)==="yandex-verification"||ce(e.attributes.name)==="csrf-token"||ce(e.attributes.name)==="p:domain_verify"||ce(e.attributes.name)==="verify-v1"||ce(e.attributes.name)==="verification"||ce(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function bn(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:p=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskAttributeFn:g,maskTextFn:_,maskInputFn:y,slimDOMOptions:S,dataURLOptions:O={},inlineImages:v=!1,recordCanvas:N=!1,onSerialize:k,onIframeLoad:b,iframeLoadTimeout:I=5e3,onBlockedImageLoad:E,onStylesheetLoad:C,stylesheetLoadTimeout:D=5e3,keepIframeSrcFn:w=()=>!1,newlyAddedElement:A=!1}=t;let{preserveWhiteSpace:G=!0}=t;const K=fI(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:g,maskTextFn:_,maskInputFn:y,dataURLOptions:O,inlineImages:v,recordCanvas:N,keepIframeSrcFn:w,newlyAddedElement:A});if(!K)return console.warn(e,"not serialized"),null;let X;r.hasNode(e)?X=r.getId(e):gI(K,S)||!G&&K.type===ye.Text&&!K.isStyle&&!K.textContent.replace(/^\s+|\s+$/gm,"").length?X=dr:X=Ba();const F=Object.assign(K,{id:X});if(r.add(e,F),X===dr)return null;k&&k(e);let L=!p;if(F.type===ye.Element){L=L&&!F.needBlock;const P=e.shadowRoot;P&&or(P)&&(F.isShadowHost=!0)}if((F.type===ye.Document||F.type===ye.Element)&&L){S.headWhitespace&&F.type===ye.Element&&F.tagName==="head"&&(G=!1);const P={doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:p,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:g,maskTextFn:_,maskInputFn:y,slimDOMOptions:S,dataURLOptions:O,inlineImages:v,recordCanvas:N,preserveWhiteSpace:G,onSerialize:k,onIframeLoad:b,iframeLoadTimeout:I,onBlockedImageLoad:E,onStylesheetLoad:C,stylesheetLoadTimeout:D,keepIframeSrcFn:w},M=e.childNodes?Array.from(e.childNodes):[];for(const J of M){const se=bn(J,P);se&&F.childNodes.push(se)}if(H0(e)&&e.shadowRoot)for(const J of Array.from(e.shadowRoot.childNodes)){const se=bn(J,P);se&&(or(e.shadowRoot)&&(se.isShadow=!0),F.childNodes.push(se))}}if(e.parentNode&&sr(e.parentNode)&&or(e.parentNode)&&(F.isShadow=!0),F.type===ye.Element&&F.tagName==="iframe"&&!F.needBlock&&lI(e,()=>{const P=Vf(e);if(P&&b){const M=bn(P,{doc:P,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:g,maskTextFn:_,maskInputFn:y,slimDOMOptions:S,dataURLOptions:O,inlineImages:v,recordCanvas:N,preserveWhiteSpace:G,onSerialize:k,onIframeLoad:b,iframeLoadTimeout:I,onStylesheetLoad:C,stylesheetLoadTimeout:D,keepIframeSrcFn:w});M&&b(e,M)}},I),F.type===ye.Element&&F.tagName==="img"&&!e.complete&&F.needBlock){const P=e,M=()=>{if(P.isConnected&&!P.complete&&E)try{const J=P.getBoundingClientRect();J.width>0&&J.height>0&&E(P,F,J)}catch{}P.removeEventListener("load",M)};P.isConnected&&P.addEventListener("load",M)}return F.type===ye.Element&&F.tagName==="link"&&typeof F.attributes.rel=="string"&&(F.attributes.rel==="stylesheet"||F.attributes.rel==="preload"&&typeof F.attributes.href=="string"&&zf(F.attributes.href)==="css")&&dI(e,()=>{if(C){const P=bn(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:g,maskTextFn:_,maskInputFn:y,slimDOMOptions:S,dataURLOptions:O,inlineImages:v,recordCanvas:N,preserveWhiteSpace:G,onSerialize:k,onIframeLoad:b,iframeLoadTimeout:I,onStylesheetLoad:C,stylesheetLoadTimeout:D,keepIframeSrcFn:w});P&&C(e,P)}},D),F.type===ye.Element&&delete F.needBlock,F}function _I(e,t){const{mirror:n=new jf,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:o=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:d=null,inlineStylesheet:l=!0,inlineImages:p=!1,recordCanvas:f=!1,maskAllInputs:h=!1,maskAttributeFn:g,maskTextFn:_,maskInputFn:y,slimDOM:S=!1,dataURLOptions:O,preserveWhiteSpace:v,onSerialize:N,onIframeLoad:k,iframeLoadTimeout:b,onBlockedImageLoad:I,onStylesheetLoad:E,stylesheetLoadTimeout:C,keepIframeSrcFn:D=()=>!1}=t||{};return bn(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:l,maskInputOptions: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}:h===!1?{}:h,maskAttributeFn:g,maskTextFn:_,maskInputFn:y,slimDOMOptions:S===!0||S==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:S==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:S===!1?{}:S,dataURLOptions:O,inlineImages:p,recordCanvas:f,preserveWhiteSpace:v,onSerialize:N,onIframeLoad:k,iframeLoadTimeout:b,onBlockedImageLoad:I,onStylesheetLoad:E,stylesheetLoadTimeout:C,keepIframeSrcFn:D,newlyAddedElement:!1})}function Oe(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const mn=`Please stop import mirror directly. Instead of that,\r
494
494
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
495
- or you can use record.mirror to access the mirror instance during recording.`;let Ku={map:{},getId(){return console.error(En),-1},getNode(){return console.error(En),null},removeNodeFromMap(){console.error(En)},has(){return console.error(En),!1},reset(){console.error(En)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Ku=new Proxy(Ku,{get(e,t,n){return t==="map"&&console.error(En),Reflect.get(e,t,n)}}));function Sr(e,t,n={}){let r=null,s=0;return function(...o){const i=Date.now();!s&&n.leading===!1&&(s=i);const a=t-(i-s),c=this;a<=0||a>t?(r&&(Ww(r),r=null),s=i,e.apply(c,o)):!r&&n.trailing!==!1&&(r=wo(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(c,o)},a))}}function lp(e,t,n,r,s=window){const o=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(i){wo(()=>{n.set.call(this,i)},0),o&&o.set&&o.set.call(this,i)}}),()=>lp(e,t,o||{},!0)}function Ka(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}let Js=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Js=()=>new Date().getTime());function dp(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function fp(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function pp(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function hp(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Ue(e,t,n,r,s){if(!e)return!1;const o=hp(e);if(!o)return!1;const i=In(t,n);if(!s){const u=r&&o.matches(r);return i(o)&&!u}const a=tn(o,i);let c=-1;return a<0?!1:(r&&(c=tn(o,In(null,r))),a>-1&&c<0?!0:a<c)}function Dw(e,t){return t.getId(e)!==-1}function Xo(e,t){return t.getId(e)===yr}function mp(e,t){if(dr(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?mp(e.parentNode,t):!0:!0}function Pi(e){return!!e.changedTouches}function Fw(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=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function gp(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function _p(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Di(e){return!!e?.shadowRoot}class $w{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function yp(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function Bw(e){let t=e,n;for(;n=yp(t);)t=n;return t}function Uw(e){const t=e.ownerDocument;if(!t)return!1;const n=Bw(e);return t.contains(n)}function Sp(e){const t=e.ownerDocument;return t?t.contains(e)||Uw(e):!1}const Xu={};function Xa(e){const t=Xu[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const o=s.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(s)}catch{}return Xu[e]=r.bind(window)}function Hw(...e){return Xa("requestAnimationFrame")(...e)}function wo(...e){return Xa("setTimeout")(...e)}function Ww(...e){return Xa("clearTimeout")(...e)}var V=(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))(V||{}),W=(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))(W||{}),Oe=(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))(Oe||{}),mt=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(mt||{}),vn=(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))(vn||{});function Qa(e){try{return e.contentDocument}catch{}}function jw(e){try{return e.contentWindow}catch{}}function Qu(e){return"__ln"in e}class zw{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Qu(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&Qu(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Zu=(e,t)=>`${e}@${t}`;class qw{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=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new zw,s=c=>{let u=c,d=yr;for(;d===yr;)u=u&&u.nextSibling,d=u&&this.mirror.getId(u);return d},o=c=>{if(!c.parentNode||!Sp(c))return;const u=dr(c.parentNode)?this.mirror.getId(yp(c)):this.mirror.getId(c.parentNode),d=s(c);if(u===-1||d===-1)return r.addNode(c);const l=kn(c,{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:p=>{gp(p,this.mirror)&&!Ue(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(p),_p(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Di(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(p,f)=>{Ue(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(p,f),p.contentWindow&&this.canvasManager.addWindow(p.contentWindow),this.shadowDomManager.observeAttachShadow(p))},onStylesheetLoad:(p,f)=>{this.stylesheetManager.attachLinkElement(p,f)},onBlockedImageLoad:(p,f,{width:h,height:g})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:f.id,attributes:{style:{width:`${h}px`,height:`${g}px`}}}]})}});l&&(t.push({parentId:u,nextId:d,node:l}),n.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)el(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||o(c);for(const c of this.addedSet)!tl(this.droppedSet,c)&&!el(this.removes,c,this.mirror)||tl(this.movedSet,c)?o(c):this.droppedSet.add(c);let i=null;for(;r.length;){let c=null;if(i){const u=this.mirror.getId(i.value.parentNode),d=s(i.value);u!==-1&&d!==-1&&(c=i)}if(!c){let u=r.tail;for(;u;){const d=u;if(u=u.previous,d){const l=this.mirror.getId(d.value.parentNode);if(s(d.value)===-1)continue;if(l!==-1){c=d;break}else{const f=d.value;if(f.parentNode&&f.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=f.parentNode.host;if(this.mirror.getId(h)!==-1){c=d;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}i=c.previous,r.removeNode(c.value),o(c.value)}const a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:u}=c;if(typeof u.style=="string"){const d=JSON.stringify(c.styleDiff),l=JSON.stringify(c._unchangedStyles);d.length<u.style.length&&(d+l).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))},this.processMutation=t=>{if(!Xo(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Ue(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:jn(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,hp(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,s=t.target.getAttribute(r);if(r==="value"){const i=Ya(n),a=n.tagName;s=Vs(n,a,i);const c=vo({maskInputOptions:this.maskInputOptions,tagName:a,type:i}),u=jn(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);s=_r({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(Ue(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===t.oldValue)return;let o=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!Qa(n))r="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!up(n.tagName,r)&&(o.attributes[r]=cp(this.doc,Wn(n.tagName),Wn(r),s,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const i=this.unattachedDoc.createElement("span");t.oldValue&&i.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==i.style.getPropertyValue(a)||u!==i.style.getPropertyPriority(a)?u===""?o.styleDiff[a]=c:o.styleDiff[a]=[c,u]:o._unchangedStyles[a]=[c,u]}for(const a of Array.from(i.style))n.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}break}case"childList":{if(Ue(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),s=dr(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Ue(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Xo(n,this.mirror)||!Dw(n,this.mirror)||(this.addedSet.has(n)?(Fi(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||mp(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Zu(r,s)]?Fi(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:dr(t.target)&&fr(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Xo(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Zu(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Ue(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(r=>this.genAdds(r)),Di(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["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"].forEach(n=>{this[n]=t[n]})}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 Fi(e,t){e.delete(t),t.childNodes?.forEach(n=>Fi(e,n))}function el(e,t,n){return e.length===0?!1:Gw(e,t,n)}function Gw(e,t,n){let r=t.parentNode;for(;r;){const s=n.getId(r);if(e.some(o=>o.id===s))return!0;r=r.parentNode}return!1}function tl(e,t){return e.size===0?!1:bp(e,t)}function bp(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:bp(e,n):!1}let pr;function Vw(e){pr=e}function Yw(){pr=void 0}const ee=e=>pr?(...n)=>{try{return e(...n)}catch(r){if(pr&&pr(r)===!0)return()=>{};throw r}}:e,Cn=[];function Br(e){try{if("composedPath"in e){const 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 Ep(e,t){const n=new qw;Cn.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=window?.Zone?.__symbol__?.("MutationObserver");s&&window[s]&&(r=window[s]);const o=new r(ee(i=>{e.onMutation&&e.onMutation(i)===!1||n.processMutations.bind(n)(i)}));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function Jw({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const s=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let i=[],a;const c=Sr(ee(l=>{const p=Date.now()-a;e(i.map(f=>(f.timeOffset-=p,f)),l),i=[],a=null}),o),u=ee(Sr(ee(l=>{const p=Br(l),{clientX:f,clientY:h}=Pi(l)?l.changedTouches[0]:l;a||(a=Js()),i.push({x:f,y:h,id:r.getId(p),timeOffset:Js()-a}),c(typeof DragEvent<"u"&&l instanceof DragEvent?W.Drag:l instanceof MouseEvent?W.MouseMove:W.TouchMove)}),s,{trailing:!1})),d=[Ne("mousemove",u,n),Ne("touchmove",u,n),Ne("drag",u,n)];return ee(()=>{d.forEach(l=>l())})}function Kw({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){if(i.mouseInteraction===!1)return()=>{};const a=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,c=[];let u=null;const d=l=>p=>{const f=Br(p);if(Ue(f,r,s,o,!0))return;let h=null,g=l;if("pointerType"in p){switch(p.pointerType){case"mouse":h=mt.Mouse;break;case"touch":h=mt.Touch;break;case"pen":h=mt.Pen;break}h===mt.Touch?Oe[l]===Oe.MouseDown?g="TouchStart":Oe[l]===Oe.MouseUp&&(g="TouchEnd"):mt.Pen}else Pi(p)&&(h=mt.Touch);h!==null?(u=h,(g.startsWith("Touch")&&h===mt.Touch||g.startsWith("Mouse")&&h===mt.Mouse)&&(h=null)):Oe[l]===Oe.Click&&(h=u,u=null);const _=Pi(p)?p.changedTouches[0]:p;if(!_)return;const y=n.getId(f),{clientX:S,clientY:O}=_;ee(e)({type:Oe[g],id:y,x:S,y:O,...h!==null&&{pointerType:h}})};return Object.keys(Oe).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&a[l]!==!1).forEach(l=>{let p=Wn(l);const f=d(l);if(window.PointerEvent)switch(Oe[l]){case Oe.MouseDown:case Oe.MouseUp:p=p.replace("mouse","pointer");break;case Oe.TouchStart:case Oe.TouchEnd:return}c.push(Ne(p,f,t))}),ee(()=>{c.forEach(l=>l())})}function vp({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){const a=ee(Sr(ee(c=>{const u=Br(c);if(!u||Ue(u,r,s,o,!0))return;const d=n.getId(u);if(u===t&&t.defaultView){const l=dp(t.defaultView);e({id:d,x:l.left,y:l.top})}else e({id:d,x:u.scrollLeft,y:u.scrollTop})}),i.scroll||100));return Ne("scroll",a,t)}function Xw({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=ee(Sr(ee(()=>{const o=fp(),i=pp();(n!==o||r!==i)&&(e({width:Number(i),height:Number(o)}),n=o,r=i)}),200));return Ne("resize",s,t)}const Qw=["INPUT","TEXTAREA","SELECT"],nl=new WeakMap;function Zw({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:d,userTriggeredOnInput:l,maskTextClass:p,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:g}){function _(b){let w=Br(b);const E=b.isTrusted,C=w&&Ni(w.tagName);if(C==="OPTION"&&(w=w.parentElement),!w||!C||Qw.indexOf(C)<0||Ue(w,r,s,o,!0))return;const D=w;if(D.classList.contains(i)||a&&D.matches(a))return;const I=Ya(w);let A=Vs(D,C,I),G=!1;const K=vo({maskInputOptions:c,tagName:C,type:I}),X=jn(w,p,h,f,g,K);(I==="radio"||I==="checkbox")&&(G=w.checked),A=_r({isMasked:X,element:w,value:A,maskInputFn:u}),y(w,l?{text:A,isChecked:G,userTriggered:E}:{text:A,isChecked:G});const F=w.name;I==="radio"&&F&&G&&t.querySelectorAll(`input[type="radio"][name="${F}"]`).forEach(L=>{if(L!==w){const P=_r({isMasked:X,element:L,value:Vs(L,C,I),maskInputFn:u});y(L,l?{text:P,isChecked:!G,userTriggered:!1}:{text:P,isChecked:!G})}})}function y(b,w){const E=nl.get(b);if(!E||E.text!==w.text||E.isChecked!==w.isChecked){nl.set(b,w);const C=n.getId(b);ee(e)({...w,id:C})}}const O=(d.input==="last"?["change"]:["input","change"]).map(b=>Ne(b,ee(_),t)),v=t.defaultView;if(!v)return()=>{O.forEach(b=>b())};const N=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),k=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return N&&N.set&&O.push(...k.map(b=>lp(b[0],b[1],{set(){ee(_)({target:this,isTrusted:!1})}},!1,v))),ee(()=>{O.forEach(b=>b())})}function Ks(e){const t=[];function n(r,s){if(es("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||es("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||es("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||es("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const i=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(i)}else if(r.parentStyleSheet){const i=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(i)}return s}return n(e,t)}function Lt(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function eI({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:ee((d,l,p)=>{const[f,h]=p,{id:g,styleId:_}=Lt(l,t,n.styleMirror);return(g&&g!==-1||_&&_!==-1)&&e({id:g,styleId:_,adds:[{rule:f,index:h}]}),d.apply(l,p)})});const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:ee((d,l,p)=>{const[f]=p,{id:h,styleId:g}=Lt(l,t,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,removes:[{index:f}]}),d.apply(l,p)})});let i;r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:ee((d,l,p)=>{const[f]=p,{id:h,styleId:g}=Lt(l,t,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,replace:f}),d.apply(l,p)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:ee((d,l,p)=>{const[f]=p,{id:h,styleId:g}=Lt(l,t,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,replaceSync:f}),d.apply(l,p)})}));const c={};ts("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(ts("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),ts("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),ts("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([d,l])=>{u[d]={insertRule:l.prototype.insertRule,deleteRule:l.prototype.deleteRule},l.prototype.insertRule=new Proxy(u[d].insertRule,{apply:ee((p,f,h)=>{const[g,_]=h,{id:y,styleId:S}=Lt(f.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||S&&S!==-1)&&e({id:y,styleId:S,adds:[{rule:g,index:[...Ks(f),_||0]}]}),p.apply(f,h)})}),l.prototype.deleteRule=new Proxy(u[d].deleteRule,{apply:ee((p,f,h)=>{const[g]=h,{id:_,styleId:y}=Lt(f.parentStyleSheet,t,n.styleMirror);return(_&&_!==-1||y&&y!==-1)&&e({id:_,styleId:y,removes:[{index:[...Ks(f),g]}]}),p.apply(f,h)})})}),ee(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=o,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([d,l])=>{l.prototype.insertRule=u[d].insertRule,l.prototype.deleteRule=u[d].deleteRule})})}function Tp({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const s=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,o=s?.prototype?Object.getOwnPropertyDescriptor(s?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!o?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return o.get?.call(this)},set(i){const a=o.set?.call(this,i);if(r!==null&&r!==-1)try{t.adoptStyleSheets(i,r)}catch{}return a}}),ee(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function tI({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:ee((a,c,u)=>{const[d,l,p]=u;if(n.has(d))return o.apply(c,[d,l,p]);const{id:f,styleId:h}=Lt(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(f&&f!==-1||h&&h!==-1)&&e({id:f,styleId:h,set:{property:d,value:l,priority:p},index:Ks(c.parentRule)}),a.apply(c,u)})});const i=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:ee((a,c,u)=>{const[d]=u;if(n.has(d))return i.apply(c,[d]);const{id:l,styleId:p}=Lt(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||p&&p!==-1)&&e({id:l,styleId:p,remove:{property:d},index:Ks(c.parentRule)}),a.apply(c,u)})}),ee(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=i})}function nI({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:o,doc:i}){const a=ee(u=>Sr(ee(d=>{const l=Br(d);if(!l||Ue(l,t,n,r,!0))return;const{currentTime:p,volume:f,muted:h,playbackRate:g}=l;e({type:u,id:s.getId(l),currentTime:p,volume:f,muted:h,playbackRate:g})}),o.media||500)),c=[Ne("play",a(vn.Play),i),Ne("pause",a(vn.Pause),i),Ne("seeked",a(vn.Seeked),i),Ne("volumechange",a(vn.VolumeChange),i),Ne("ratechange",a(vn.RateChange),i)];return ee(()=>{c.forEach(u=>u())})}function rI({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,o=n.FontFace;n.FontFace=function(c,u,d){const l=new o(c,u,d);return s.set(l,{family:c,buffer:typeof u!="string",descriptors:d,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),l};const i=Ka(t.fonts,"add",function(a){return function(c){return wo(ee(()=>{const u=s.get(c);u&&(e(u),s.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=o}),r.push(i),ee(()=>{r.forEach(a=>a())})}function sI(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,selectionCb:i}=e;let a=!0;const c=ee(()=>{const u=t.getSelection();if(!u||a&&u?.isCollapsed)return;a=u.isCollapsed||!1;const d=[],l=u.rangeCount||0;for(let p=0;p<l;p++){const f=u.getRangeAt(p),{startContainer:h,startOffset:g,endContainer:_,endOffset:y}=f;Ue(h,r,s,o,!0)||Ue(_,r,s,o,!0)||d.push({start:n.getId(h),startOffset:g,end:n.getId(_),endOffset:y})}i({ranges:d})});return c(),Ne("selectionchange",c)}function oI({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Ka(n.customElements,"define",function(s){return function(o,i,a){try{t({define:{name:o}})}catch{}return s.apply(this,[o,i,a])}})}function iI(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=Ep(e,e.doc));const s=Jw(e),o=Kw(e),i=vp(e),a=Xw(e,{win:n}),c=Zw(e),u=nI(e);let d=()=>{},l=()=>{},p=()=>{},f=()=>{};e.recordDOM&&(d=eI(e,{win:n}),l=Tp(e,e.doc),p=tI(e,{win:n}),e.collectFonts&&(f=rI(e)));const h=sI(e),g=oI(e),_=[];for(const y of e.plugins)_.push(y.observer(y.callback,n,y.options));return ee(()=>{Cn.forEach(y=>y.reset()),r?.disconnect(),s(),o(),i(),a(),c(),u(),d(),l(),p(),f(),h(),g(),_.forEach(y=>y())})}function es(e){return typeof window[e]<"u"}function ts(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class $i{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,s){const o=r||this.getIdToRemoteIdMap(t),i=s||this.getRemoteIdToIdMap(t);let a=o.get(n);return a||(a=this.generateIdFn(),o.set(n,a),i.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return n.map(o=>this.getId(t,o,r,s))}getRemoteId(t,n,r){const s=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const o=s.get(n);return o||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(s=>this.getRemoteId(t,s,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class aI{constructor(){this.crossOriginIframeMirror=new $i(Ja),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class cI{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new $i(Ja),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new $i(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&t.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const r=Qa(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const s=this.crossOriginIframeMap.get(t.source);if(!s)return;const o=this.transformCrossOriginEvent(s,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case V.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:V.IncrementalSnapshot,data:{source:W.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case V.Meta:case V.Load:case V.DomContentLoaded:return!1;case V.Plugin:return n;case V.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case V.IncrementalSnapshot:switch(n.data.source){case W.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(r.node,s)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case W.Drag:case W.TouchMove:case W.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case W.ViewportResize:return!1;case W.MediaInteraction:case W.MouseInteraction:case W.Scroll:case W.CanvasMutation:case W.Input:return this.replaceIds(n.data,t,["id"]),n;case W.StyleSheetRule:case W.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case W.Font:return n;case W.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case W.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),n}}return!1}replace(t,n,r,s){for(const o of s)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=t.getIds(r,n[o]):n[o]=t.getId(r,n[o]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==Se.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class uI{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class lI{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!fr(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=Ep({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(vp({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),wo(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(Tp({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=Qa(t),r=jw(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(Ka(t.prototype,"attachShadow",function(s){return function(o){const i=s.call(this,o);return this.shadowRoot&&Sp(this)&&r.addShadowRoot(this.shadowRoot,n),i}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}var rl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dI=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var ns=0;ns<rl.length;ns++)dI[rl.charCodeAt(ns)]=ns;class sl{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class fI{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new $w,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},s=[];for(const o of t){let i;this.styleMirror.has(o)?i=this.styleMirror.getId(o):(i=this.styleMirror.add(o),s.push({styleId:i,rules:Array.from(o.rules||CSSRule,(a,c)=>({rule:np(a),index:c}))})),r.styleIds.push(i)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class pI{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(s=>s!==n)}add(t,n){this.active||(this.active=!0,Hw(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let me,Xs;try{if(Array.from([1],e=>e*2)[0]!==2){const 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)}const Ye=fw();function St(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:o=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:d="rr-mask",unmaskTextClass:l=null,maskTextSelector:p=null,unmaskTextSelector:f=null,inlineStylesheet:h=!0,maskAllInputs:g,maskInputOptions:_,slimDOMOptions:y,maskAttributeFn:S,maskInputFn:O,maskTextFn:v,maxCanvasSize:N=null,packFn:k,sampling:b={},dataURLOptions:w={},mousemoveWait:E,recordDOM:C=!0,recordCanvas:D=!1,recordCrossOriginIframes:I=!1,recordAfter:A=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:G=!1,collectFonts:K=!1,inlineImages:X=!1,plugins:F,keepIframeSrcFn:L=()=>!1,ignoreCSSAttributes:P=new Set([]),errorHandler:M,onMutation:J,getCanvasManager:se}=e;Vw(M);const le=I?window.parent===window:!0;let _e=!1;if(!le)try{window.parent.document&&(_e=!1)}catch{_e=!0}if(le&&!t)throw new Error("emit function is required");if(!le&&!_e)return()=>{};E!==void 0&&b.mousemove===void 0&&(b.mousemove=E),Ye.reset();const xe=g===!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}:_!==void 0?_:{},xt=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:y==="all",headMetaDescKeywords:y==="all"}:y||{};Fw();let Me,Le=0;const rt=Q=>{for(const $e of F||[])$e.eventProcessor&&(Q=$e.eventProcessor(Q));return k&&!_e&&(Q=k(Q)),Q};me=(Q,$e)=>{const Z=Q;if(Z.timestamp=Js(),Cn[0]?.isFrozen()&&Z.type!==V.FullSnapshot&&!(Z.type===V.IncrementalSnapshot&&Z.data.source===W.Mutation)&&Cn.forEach(Ie=>Ie.unfreeze()),le)t?.(rt(Z),$e);else if(_e){const Ie={type:"rrweb",event:rt(Z),origin:window.location.origin,isCheckout:$e};window.parent.postMessage(Ie,"*")}if(Z.type===V.FullSnapshot)Me=Z,Le=0;else if(Z.type===V.IncrementalSnapshot){if(Z.data.source===W.Mutation&&Z.data.isAttachIframe)return;Le++;const Ie=r&&Le>=r,te=n&&Me&&Z.timestamp-Me.timestamp>n;(Ie||te)&&st(!0)}};const Mt=Q=>{me({type:V.IncrementalSnapshot,data:{source:W.Mutation,...Q}})},sr=Q=>me({type:V.IncrementalSnapshot,data:{source:W.Scroll,...Q}}),Hr=Q=>me({type:V.IncrementalSnapshot,data:{source:W.CanvasMutation,...Q}}),or=Q=>me({type:V.IncrementalSnapshot,data:{source:W.AdoptedStyleSheet,...Q}}),re=new fI({mutationCb:Mt,adoptedStyleSheetCb:or}),fe=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new aI:new cI({mirror:Ye,mutationCb:Mt,stylesheetManager:re,recordCrossOriginIframes:I,wrappedEmit:me});for(const Q of F||[])Q.getMirror&&Q.getMirror({nodeMirror:Ye,crossOriginIframeMirror:fe.crossOriginIframeMirror,crossOriginIframeStyleMirror:fe.crossOriginIframeStyleMirror});const We=new pI,we=mI(se,{mirror:Ye,win:window,mutationCb:Q=>me({type:V.IncrementalSnapshot,data:{source:W.CanvasMutation,...Q}}),recordCanvas:D,blockClass:s,blockSelector:o,unblockSelector:i,maxCanvasSize:N,sampling:b.canvas,dataURLOptions:w,errorHandler:M}),Re=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new uI:new lI({mutationCb:Mt,scrollCb:sr,bypassOptions:{onMutation:J,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:xe,dataURLOptions:w,maskAttributeFn:S,maskTextFn:v,maskInputFn:O,recordCanvas:D,inlineImages:X,sampling:b,slimDOMOptions:xt,iframeManager:fe,stylesheetManager:re,canvasManager:we,keepIframeSrcFn:L,processedNodeManager:We},mirror:Ye}),st=(Q=!1)=>{if(!C)return;me({type:V.Meta,data:{href:window.location.href,width:pp(),height:fp()}},Q),re.reset(),Re.init(),Cn.forEach(Z=>Z.lock());const $e=Pw(document,{mirror:Ye,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskAllInputs:xe,maskAttributeFn:S,maskInputFn:O,maskTextFn:v,slimDOM:xt,dataURLOptions:w,recordCanvas:D,inlineImages:X,onSerialize:Z=>{gp(Z,Ye)&&fe.addIframe(Z),_p(Z,Ye)&&re.trackLinkElement(Z),Di(Z)&&Re.addShadowRoot(Z.shadowRoot,document)},onIframeLoad:(Z,Ie)=>{fe.attachIframe(Z,Ie),Z.contentWindow&&we.addWindow(Z.contentWindow),Re.observeAttachShadow(Z)},onStylesheetLoad:(Z,Ie)=>{re.attachLinkElement(Z,Ie)},onBlockedImageLoad:(Z,Ie,{width:te,height:ir})=>{Mt({adds:[],removes:[],texts:[],attributes:[{id:Ie.id,attributes:{style:{width:`${te}px`,height:`${ir}px`}}}]})},keepIframeSrcFn:L});if(!$e)return console.warn("Failed to snapshot the document");me({type:V.FullSnapshot,data:{node:$e,initialOffset:dp(window)}}),Cn.forEach(Z=>Z.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&re.adoptStyleSheets(document.adoptedStyleSheets,Ye.getId(document))};Xs=st;try{const Q=[],$e=Ie=>ee(iI)({onMutation:J,mutationCb:Mt,mousemoveCb:(te,ir)=>me({type:V.IncrementalSnapshot,data:{source:ir,positions:te}}),mouseInteractionCb:te=>me({type:V.IncrementalSnapshot,data:{source:W.MouseInteraction,...te}}),scrollCb:sr,viewportResizeCb:te=>me({type:V.IncrementalSnapshot,data:{source:W.ViewportResize,...te}}),inputCb:te=>me({type:V.IncrementalSnapshot,data:{source:W.Input,...te}}),mediaInteractionCb:te=>me({type:V.IncrementalSnapshot,data:{source:W.MediaInteraction,...te}}),styleSheetRuleCb:te=>me({type:V.IncrementalSnapshot,data:{source:W.StyleSheetRule,...te}}),styleDeclarationCb:te=>me({type:V.IncrementalSnapshot,data:{source:W.StyleDeclaration,...te}}),canvasMutationCb:Hr,fontCb:te=>me({type:V.IncrementalSnapshot,data:{source:W.Font,...te}}),selectionCb:te=>{me({type:V.IncrementalSnapshot,data:{source:W.Selection,...te}})},customElementCb:te=>{me({type:V.IncrementalSnapshot,data:{source:W.CustomElement,...te}})},blockClass:s,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:f,maskInputOptions:xe,inlineStylesheet:h,sampling:b,recordDOM:C,recordCanvas:D,inlineImages:X,userTriggeredOnInput:G,collectFonts:K,doc:Ie,maskAttributeFn:S,maskInputFn:O,maskTextFn:v,keepIframeSrcFn:L,blockSelector:o,unblockSelector:i,slimDOMOptions:xt,dataURLOptions:w,mirror:Ye,iframeManager:fe,stylesheetManager:re,shadowDomManager:Re,processedNodeManager:We,canvasManager:we,ignoreCSSAttributes:P,plugins:F?.filter(te=>te.observer)?.map(te=>({observer:te.observer,options:te.options,callback:ir=>me({type:V.Plugin,data:{plugin:te.name,payload:ir}})}))||[]},{});fe.addLoadListener(Ie=>{try{Q.push($e(Ie.contentDocument))}catch(te){console.warn(te)}});const Z=()=>{st(),Q.push($e(document))};return document.readyState==="interactive"||document.readyState==="complete"?Z():(Q.push(Ne("DOMContentLoaded",()=>{me({type:V.DomContentLoaded,data:{}}),A==="DOMContentLoaded"&&Z()})),Q.push(Ne("load",()=>{me({type:V.Load,data:{}}),A==="load"&&Z()},window))),()=>{Q.forEach(Ie=>Ie()),We.destroy(),Xs=void 0,Yw()}}catch(Q){console.warn(Q)}}function hI(e){if(!Xs)throw new Error("please take full snapshot after start recording");Xs(e)}St.mirror=Ye;St.takeFullSnapshot=hI;function mI(e,t){try{return e?e(t):new sl}catch{return console.warn("Unable to initialize CanvasManager"),new sl}}var ol;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(ol||(ol={}));const gI=3,_I=5;function Za(e){return e>9999999999?e:e*1e3}function Qo(e){return e>9999999999?e/1e3:e}function Ur(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:V.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Be(t,10,1e3)}}),t.category==="console")))}const yI="button,a";function wp(e){return e.closest(yI)||e}function Ip(e){const t=kp(e);return!t||!(t instanceof Element)?t:wp(t)}function kp(e){return SI(e)?e.target:e}function SI(e){return typeof e=="object"&&!!e&&"target"in e}let Pt;function bI(e){return Pt||(Pt=[],EI()),Pt.push(e),()=>{const t=Pt?Pt.indexOf(e):-1;t>-1&&Pt.splice(t,1)}}function EI(){ke(ue,"open",function(e){return function(...t){if(Pt)try{Pt.forEach(n=>n())}catch{}return e.apply(ue,t)}})}const vI=new Set([W.Mutation,W.StyleSheetRule,W.StyleDeclaration,W.AdoptedStyleSheet,W.CanvasMutation,W.Selection,W.MediaInteraction]);function TI(e,t,n){e.handleClick(t,n)}class wI{constructor(t,n,r=Ur){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=bI(()=>{this._lastMutation=il()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(kI(n,this._ignoreSelector)||!CI(t))return;const r={timestamp:Qo(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(s=>s.node===r.node&&Math.abs(s.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Qo(t)}registerScroll(t=Date.now()){this._lastScroll=Qo(t)}registerClick(t){const n=wp(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=il();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,o=!r&&!s,{clickCount:i,clickBreadcrumb:a}=t;if(o){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",d={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:ue.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:i||1}};this._addBreadcrumbEvent(n,d);return}if(i>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:ue.location.href,route:n.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=$r(()=>this._checkClicks(),1e3)}}const II=["A","BUTTON","INPUT"];function kI(e,t){return!!(!II.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 CI(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function il(){return Date.now()/1e3}function RI(e,t){try{if(!AI(t))return;const{source:n}=t.data;if(vI.has(n)&&e.registerMutation(t.timestamp),n===W.Scroll&&e.registerScroll(t.timestamp),xI(t)){const{type:r,id:s}=t.data,o=St.mirror.getNode(s);o instanceof HTMLElement&&r===Oe.Click&&e.registerClick(o)}}catch{}}function AI(e){return e.type===gI}function xI(e){return e.data.source===W.MouseInteraction}function ct(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var ec=(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))(ec||{});const MI=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function OI(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(MI.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const NI=e=>t=>{if(!e.isEnabled())return;const n=LI(t);if(!n)return;const r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&s?.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&TI(e.clickDetector,n,Ip(t.event)),Ur(e,n)};function Cp(e,t){const n=St.mirror.getId(e),r=n&&St.mirror.getNode(n),s=r&&St.mirror.getMeta(r),o=s&&DI(s)?s:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map(i=>i.type===ec.Text&&i.textContent).filter(Boolean).map(i=>i.trim()).join(""),attributes:OI(o.attributes)}}:{}}}function LI(e){const{target:t,message:n}=PI(e);return ct({category:`ui.${e.name}`,...Cp(t,n)})}function PI(e){const t=e.name==="click";let n,r=null;try{r=t?Ip(e.event):kp(e.event),n=De(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function DI(e){return e.type===ec.Element}function FI(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=$I(t);n&&Ur(e,n)}function $I(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o,target:i}=e;if(!i||BI(i)||!o)return null;const a=t||r||s,c=o.length===1;if(!a&&c)return null;const u=De(i,{maxStringLength:200})||"<unknown>",d=Cp(i,u);return ct({category:"ui.keyDown",message:u,data:{...d.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o}})}function BI(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const UI={resource:qI,paint:jI,navigation:zI};function Zo(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function HI(e){return e.map(WI).filter(Boolean)}function WI(e){const t=UI[e.entryType];return t?t(e):null}function zn(e){return((Ae()||ue.performance.timeOrigin)+e)/1e3}function jI(e){const{duration:t,entryType:n,name:r,startTime:s}=e,o=zn(s);return{type:n,name:r,start:o,end:o+t,data:void 0}}function zI(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:o,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:d,loadEventEnd:l,redirectCount:p,startTime:f,transferSize:h,type:g}=e;return s===0?null:{type:`${t}.${g}`,start:zn(f),end:zn(o),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:i,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:d,loadEventEnd:l,domComplete:o,redirectCount:p}}}function qI(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:o,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:zn(o),end:zn(s),name:r,data:{size:u,statusCode:c,decodedBodySize:i,encodedBodySize:a}}}function GI(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return tc(e,"largest-contentful-paint",n)}function VI(e){return e.sources!==void 0}function YI(e){const t=[],n=[];for(const r of e.entries)if(VI(r)){const s=[];for(const o of r.sources)if(o.node){n.push(o.node);const i=St.mirror.getId(o.node);i&&s.push(i)}t.push({value:r.value,nodeIds:s.length?s:void 0})}return tc(e,"cumulative-layout-shift",n,t)}function JI(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return tc(e,"interaction-to-next-paint",n)}function tc(e,t,n,r){const s=e.value,o=e.rating,i=zn(s);return{type:"web-vital",name:t,start:i,end:i,data:{value:s,size:s,rating:o,nodeIds:n?n.map(a=>St.mirror.getId(a)):void 0,attributions:r}}}function KI(e){function t(s){e.performanceEntries.includes(s)||e.performanceEntries.push(s)}function n({entries:s}){s.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(s=>{r.push(hn(s,n))}),r.push(Ua(Zo(GI,e)),Ba(Zo(YI,e)),Pf(Zo(JI,e))),()=>{r.forEach(s=>s())}}const U=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,XI='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 QI(){const e=new Blob([XI]);return URL.createObjectURL(e)}const al=["log","warn","error"],Es="[Replay] ";function ei(e,t="info"){It({category:"console",data:{logger:"replay"},level:t,message:`${Es}${e}`},{level:t})}function ZI(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return U?(al.forEach(r=>{n[r]=(...s)=>{m[r](Es,...s),t&&ei(s.join(""),ha(r))}}),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),m.error(Es,r),e?Ce(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&ei(r,"error")},n.infoTick=(...r)=>{m.log(Es,...r),t&&setTimeout(()=>ei(r[0]),0)}):al.forEach(r=>{n[r]=()=>{}}),n}const H=ZI();class nc extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Va}.`)}}class Rp{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(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>Va)throw new nc;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?Za(t):null}}class ek{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){U&&H.log("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((s,o)=>{const i=({data:a})=>{const c=a;if(c.method===t&&c.id===r){if(this._worker.removeEventListener("message",i),!c.success){U&&H.error("Error in compression worker: ",c.response),o(new Error("Error in compression worker"));return}s(c.response)}};this._worker.addEventListener("message",i),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class tk{constructor(t){this._worker=new ek(t),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(t){const n=Za(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>Va?Promise.reject(new nc):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{U&&H.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class nk{constructor(t){this._fallback=new Rp,this._compression=new tk(t),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(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){U&&H.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,s=[];for(const o of t)s.push(this._compression.addEvent(o));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(s),this._fallback.clear()}catch(o){U&&H.exception(o,"Failed to add events when switching buffers.")}}}function rk({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=sk(t);if(n)return n}return U&&H.log("Using simple buffer"),new Rp}function sk(e){try{const t=e||ok();if(!t)return;U&&H.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new nk(n)}catch(t){U&&H.exception(t,"Failed to create compression worker")}}function ok(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?QI():""}function rc(){try{return"sessionStorage"in ue&&!!ue.sessionStorage}catch{return!1}}function ik(e){ak(),e.session=void 0}function ak(){if(rc())try{ue.sessionStorage.removeItem(qa)}catch{}}function Ap(e){return e===void 0?!1:Math.random()<e}function Io(e){if(rc())try{ue.sessionStorage.setItem(qa,JSON.stringify(e))}catch{}}function xp(e){const t=Date.now(),n=e.id||ve(),r=e.started||t,s=e.lastActivity||t,o=e.segmentId||0,i=e.sampled,a=e.previousSessionId,c=e.dirty||!1;return{id:n,started:r,lastActivity:s,segmentId:o,sampled:i,previousSessionId:a,dirty:c}}function ck(e,t){return Ap(e)?"session":t?"buffer":!1}function cl({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=ck(e,t),o=xp({sampled:s,previousSessionId:r});return n&&Io(o),o}function uk(){if(!rc())return null;try{const e=ue.sessionStorage.getItem(qa);if(!e)return null;const t=JSON.parse(e);return U&&H.infoTick("Loading existing session"),xp(t)}catch{return null}}function Bi(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function Mp(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Bi(e.started,t,r)||Bi(e.lastActivity,n,r)}function Op(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!Mp(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function ti({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const s=r.stickySession&&uk();return s?Op(s,{sessionIdleExpire:e,maxReplayDuration:t})?(U&&H.infoTick("Session in sessionStorage is expired, creating new one..."),cl(r,{previousSessionId:s.id})):s:(U&&H.infoTick("Creating new session"),cl(r,{previousSessionId:n}))}function lk(e){return e.type===V.Custom}function sc(e,t,n){return Lp(e,t)?(Np(e,t,n),!0):!1}function dk(e,t,n){return Lp(e,t)?Np(e,t,n):Promise.resolve(null)}async function Np(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const s=e.recordingMode==="buffer";try{n&&s&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const o=e.getOptions(),i=fk(t,o.beforeAddRecordingEvent);return i?await r.addEvent(i):void 0}catch(o){const i=o&&o instanceof nc,a=i?"addEventSizeExceeded":"addEvent",c=x();if(c){const u=i?"buffer_overflow":"internal_sdk_error";c.recordDroppedEvent(u,"replay")}if(i&&s)return r.clear(),r.waitForCheckout=!0,null;e.handleException(o),await e.stop({reason:a})}}function Lp(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Za(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(U&&H.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function fk(e,t){try{if(typeof t=="function"&&lk(e))return t(e)}catch(n){return U&&H.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function oc(e){return!e.type}function Ui(e){return e.type==="transaction"}function pk(e){return e.type==="replay_event"}function ul(e){return e.type==="feedback"}function hk(e){return(t,n)=>{if(!e.isEnabled()||!oc(t)&&!Ui(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(Ui(t)){mk(e,t);return}gk(e,t)}}}function mk(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function gk(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||$r(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(s){e.handleException(s)}})}function _k(e){return t=>{!e.isEnabled()||!oc(t)||yk(e,t)}}function yk(e,t){const n=t.exception?.values?.[0]?.value;if(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))){const r=ct({category:"replay.hydrate-error",data:{url:mn()}});Ur(e,r)}}function Sk(e){const t=x();t&&t.on("beforeAddBreadcrumb",n=>bk(e,n))}function bk(e,t){if(!e.isEnabled()||!Pp(t))return;const n=Ek(t);n&&Ur(e,n)}function Ek(e){return!Pp(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?vk(e):ct(e)}function vk(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return ct(e);let n=!1;const r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>Zr?(n=!0,`${s.slice(0,Zr)}…`):s;if(typeof s=="object")try{const o=Be(s,7);return JSON.stringify(o).length>Zr?(n=!0,`${JSON.stringify(o,null,2).slice(0,Zr)}…`):o}catch{}return s});return ct({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Pp(e){return!!e.category}function Tk(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function Dp(){const e=q().getPropagationContext().dsc;e&&delete e.replay_id;const t=Ee();if(t){const n=et(t);delete n.replay_id}}function wk(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:V.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 Ik(e,t){return e.recordingMode!=="buffer"||t.message===Ga||!t.exception||t.type?!1:Ap(e.getOptions().errorSampleRate)}function kk(e){return Object.assign((t,n)=>{if(!e.isEnabled()||e.isPaused())return t;if(pk(t))return delete t.breadcrumbs,t;if(!oc(t)&&!Ui(t)&&!ul(t))return t;if(!e.checkAndHandleExpiredSession())return Dp(),t;if(ul(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),wk(e,t),t;if(Tk(t,n)&&!e.getOptions()._experiments.captureExceptions)return U&&H.log("Ignoring error from rrweb internals",t),null;const s=Ik(e,t);if((s||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),s&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){const i=e.session;i.dirty=!0,e.getOptions().stickySession&&Io(i)}return t},{id:"Replay"})}function ko(e,t){return t.map(({type:n,start:r,end:s,name:o,data:i})=>{const a=e.throttledAddEvent({type:V.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:o,startTimestamp:r,endTimestamp:s,data:i}}});return typeof a=="string"?Promise.resolve(null):a})}function Ck(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function Rk(e){return t=>{if(!e.isEnabled())return;const n=Ck(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(ko(e,[n]),!1)))}}function Ak(e,t){return U&&e.getOptions()._experiments.traceInternals?!1:jd(t,x())}function Fp(e,t){e.isEnabled()&&t!==null&&(Ak(e,t.name)||e.addUpdate(()=>(ko(e,[t]),!0)))}function Co(e){if(!e)return;const 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){const n=Wf(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function $p(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Qs(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function Bp(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:o,statusCode:i,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:{method:o,statusCode:i,request:a,response:c}}}function br(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Bt(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:s,warnings:o}=xk(n);return r.body=s,o?.length&&(r._meta={warnings:o}),r}function Hi(e,t){return Object.entries(e).reduce((n,[r,s])=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=s),n},{})}function xk(e){if(!e||typeof e!="string")return{body:e};const t=e.length>ju,n=Mk(e);if(t){const r=e.slice(0,ju);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function Mk(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Zs(e,t){const n=Ok(e);return Qe(n,t)}function Ok(e,t=ue.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(ue.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function Nk(e,t,n){try{const r=await Pk(e,t,n),s=Bp("resource.fetch",r);Fp(n.replay,s)}catch(r){U&&H.exception(r,"Failed to capture fetch breadcrumb")}}function Lk(e,t){const{input:n,response:r}=t,s=n?za(n):void 0,o=Co(s),i=r?$p(r.headers.get("content-length")):void 0;o!==void 0&&(e.data.request_body_size=o),i!==void 0&&(e.data.response_body_size=i)}async function Pk(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r}=t,{url:i,method:a,status_code:c=0,request_body_size:u,response_body_size:d}=e.data,l=Zs(i,n.networkDetailAllowUrls)&&!Zs(i,n.networkDetailDenyUrls),p=l?Dk(n,t.input,u):br(u),f=await Fk(l,n,t.response,d);return{startTimestamp:s,endTimestamp:o,url:i,method:a,statusCode:c,request:p,response:f}}function Dk({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?Uk(n,t):{};if(!e)return Bt(s,r,void 0);const o=za(n),[i,a]=qs(o,H),c=Bt(s,r,i);return a?Qs(c,a):c}async function Fk(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&s!==void 0)return br(s);const o=r?Up(r.headers,n):{};if(!r||!t&&s!==void 0)return Bt(o,s,void 0);const[i,a]=await Bk(r),c=$k(i,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:o});return a?Qs(c,a):c}function $k(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const o=e?.length&&n===void 0?Co(e):n;return r?t?Bt(s,o,e):Bt(s,o,void 0):br(o)}catch(o){return U&&H.exception(o,"Failed to serialize response body"),Bt(s,n,void 0)}}async function Bk(e){const t=Hk(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await Wk(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(U&&H.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(U&&H.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function Up(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function Uk(e,t){return e.length===1&&typeof e[0]!="string"?ll(e[0],t):e.length===2?ll(e[1],t):{}}function ll(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?Up(n,t):Array.isArray(n)?{}:Hi(n,t):{}}function Hk(e){try{return e.clone()}catch(t){U&&H.exception(t,"Failed to clone response body")}}function Wk(e){return new Promise((t,n)=>{const r=$r(()=>n(new Error("Timeout while trying to read response body")),500);jk(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function jk(e){return await e.text()}async function zk(e,t,n){try{const r=Gk(e,t,n),s=Bp("resource.xhr",r);Fp(n.replay,s)}catch(r){U&&H.exception(r,"Failed to capture xhr breadcrumb")}}function qk(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=Co(r),o=n.getResponseHeader("content-length")?$p(n.getResponseHeader("content-length")):Jk(n.response,n.responseType);s!==void 0&&(e.data.request_body_size=s),o!==void 0&&(e.data.response_body_size=o)}function Gk(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r,input:i,xhr:a}=t,{url:c,method:u,status_code:d=0,request_body_size:l,response_body_size:p}=e.data;if(!c)return null;if(!a||!Zs(c,n.networkDetailAllowUrls)||Zs(c,n.networkDetailDenyUrls)){const k=br(l),b=br(p);return{startTimestamp:s,endTimestamp:o,url:c,method:u,statusCode:d,request:k,response:b}}const f=a[_t],h=f?Hi(f.request_headers,n.networkRequestHeaders):{},g=Hi(jf(a),n.networkResponseHeaders),[_,y]=n.networkCaptureBodies?qs(i,H):[void 0],[S,O]=n.networkCaptureBodies?Vk(a):[void 0],v=Bt(h,l,_),N=Bt(g,p,S);return{startTimestamp:s,endTimestamp:o,url:c,method:u,statusCode:d,request:y?Qs(v,y):v,response:O?Qs(N,O):N}}function Vk(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return Yk(e.response,e.responseType)}catch(n){t.push(n)}return U&&H.warn("Failed to get xhr response body",...t),[void 0]}function Yk(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return U&&H.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return U&&H.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Jk(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Co(n)}catch{return}}function Kk(e){const t=x();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:i}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",(c,u)=>Xk(a,c,u))}catch{}}function Xk(e,t,n){if(t.data)try{Qk(t)&&e1(n)&&(qk(t,n),zk(t,n,e)),Zk(t)&&t1(n)&&(Lk(t,n),Nk(t,n,e))}catch(r){U&&H.exception(r,"Error when enriching network breadcrumb")}}function Qk(e){return e.category==="xhr"}function Zk(e){return e.category==="fetch"}function e1(e){return e?.xhr}function t1(e){return e?.response}function n1(e){const t=x();Hf(NI(e)),Eo(Rk(e)),Sk(e),Kk(e);const n=kk(e);Sg(n),t&&(t.on("beforeSendEvent",_k(e)),t.on("afterSendEvent",hk(e)),t.on("createDsc",r=>{const s=e.getSessionId();s&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=s)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,s)=>{const o=e.getSessionId();s?.includeReplay&&e.isEnabled()&&o&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=o)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function r1(e){try{return Promise.all(ko(e,[s1(ue.performance.memory)]))}catch{return[]}}function s1(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function o1(e,t,n){return g_(e,t,{...n,setTimeoutImpl:$r})}const rs=$.navigator;function i1(){return/iPhone|iPad|iPod/i.test(rs?.userAgent??"")||/Macintosh/i.test(rs?.userAgent??"")&&rs?.maxTouchPoints&&rs?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function a1(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){U&&H.warn("Received replay event after session expired.");return}const s=r||!t;t=!0,e.clickDetector&&RI(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!sc(e,n,s))return!0;if(!s)return!1;const o=e.session;if(u1(e,s),e.recordingMode==="buffer"&&o&&e.eventBuffer&&!o.dirty){const i=e.eventBuffer.getEarliestTimestamp();i&&(U&&H.log(`Updating session start time to earliest event in buffer to ${new Date(i)}`),o.started=i,e.getOptions().stickySession&&Io(o))}return o?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function c1(e){const t=e.getOptions();return{type:V.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 u1(e,t){!t||!e.session||e.session.segmentId!==0||sc(e,c1(e),!1)}function l1(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function d1(e,t,n,r){return nt(yd(e,oo(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function f1({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
496
- `;if(typeof e=="string")n=`${r}${e}`;else{const o=new TextEncoder().encode(r);n=new Uint8Array(o.length+e.length),n.set(o),n.set(e,o.length)}return n}async function p1({client:e,scope:t,replayId:n,event:r}){const s=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,o={event_id:n,integrations:s};e.emit("preprocessEvent",r,o);const i=await vd(e.getOptions(),r,o,t,e,Te());if(!i)return null;e.emit("postprocessEvent",i,o),i.platform=i.platform||"javascript";const a=e.getSdkMetadata(),{name:c,version:u,settings:d}=a?.sdk||{};return i.sdk={...i.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0",settings:d},i}async function h1({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:o}){const i=f1({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:d}=r,l=x(),p=q(),f=l?.getTransport(),h=l?.getDsn();if(!l||!f||!h||!o.sampled)return Promise.resolve({});const g={type:q0,replay_start_timestamp:d/1e3,timestamp:s/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:o.sampled},_=await p1({scope:p,client:l,replayId:t,event:g});if(!_)return l.recordDroppedEvent("event_processor","replay"),U&&H.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete _.sdkProcessingMetadata;const y=d1(_,i,h,l.getOptions().tunnel);let S;try{S=await f.send(y)}catch(v){const N=new Error(Ga);try{N.cause=v}catch{}throw N}if(typeof S.statusCode=="number"&&(S.statusCode<200||S.statusCode>=300))throw new Hp(S.statusCode);const O=Ud({},S);if(Bd(O,"replay"))throw new ic(O);return S}class Hp extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class ic extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function Wp(e,t={count:0,interval:X0}){const{recordingData:n,onError:r}=e;if(n.length)try{return await h1(e),!0}catch(s){if(s instanceof Hp||s instanceof ic)throw s;if(gg("Replays",{_retryCount:t.count}),r&&r(s),t.count>=Q0){const o=new Error(`${Ga} - max retries exceeded`);try{o.cause=s}catch{}throw o}return t.interval*=++t.count,new Promise((o,i)=>{$r(async()=>{try{await Wp(e,t),o(!0)}catch(a){i(a)}},t.interval)})}}const jp="__THROTTLED",m1="__SKIPPED";function g1(e,t,n){const r=new Map,s=a=>{const c=a-n;r.forEach((u,d)=>{d<c&&r.delete(d)})},o=()=>[...r.values()].reduce((a,c)=>a+c,0);let i=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(s(c),o()>=t){const d=i;return i=!0,d?m1:jp}i=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class _1{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:G0,sessionIdleExpire:V0},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=o1(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=g1((i,a)=>dk(this,i,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),o=r?{threshold:Math.min(Z0,r),timeout:r,scrollTimeout:ew,ignoreSelector:s?s.join(","):""}:void 0;if(o&&(this.clickDetector=new wI(this,o)),U){const i=t._experiments;H.setConfig({captureExceptions:!!i.captureExceptions,traceInternals:!!i.traceInternals})}this._handleVisibilityChange=()=>{ue.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const i=ct({category:"ui.blur"});this._doChangeToBackgroundTasks(i)},this._handleWindowFocus=()=>{const i=ct({category:"ui.focus"});this._doChangeToForegroundTasks(i)},this._handleKeyboardEvent=i=>{FI(this,i)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){U&&H.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,s=n<=0&&r<=0;if(this._requiresManualStart=s,!s){if(this._initializeSessionForSampling(t),!this.session){U&&H.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",U&&H.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){U&&H.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){U&&H.log("Buffering is in progress, call `flush()` to save the replay");return}U&&H.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=ti({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){U&&H.log("Buffering is in progress, call `flush()` to save the replay");return}U&&H.infoTick("Starting replay in buffer mode");const t=ti({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=St({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:K0}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:a1(this),...i1(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{U&&H.log(`Stopping Replay${n?` triggered by ${n}`:""}`),Dp(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,ik(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),U&&H.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),U&&H.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();U&&H.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode==="buffer"||!this._isEnabled||n!==!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(t){if(!(t&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Bi(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${ue.location.pathname}${ue.location.hash}${ue.location.search}`,n=`${ue.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===jp){const s=ct({category:"replay.throttled"});this.addUpdate(()=>!sc(this,{type:_I,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||Ee(),n=t&&be(t),s=(n&&z(n).data||{})[ze];if(!(!n||!s||!["route","custom"].includes(s)))return z(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=rk({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=ti({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return Op(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{ue.document.addEventListener("visibilitychange",this._handleVisibilityChange),ue.addEventListener("blur",this._handleWindowBlur),ue.addEventListener("focus",this._handleWindowFocus),ue.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(n1(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=KI(this)}_removeListeners(){try{ue.document.removeEventListener("visibilitychange",this._handleVisibilityChange),ue.removeEventListener("blur",this._handleWindowBlur),ue.removeEventListener("focus",this._handleWindowFocus),ue.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||Mp(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){U&&H.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:V.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=HI(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(ko(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){U&&H.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await r1(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await Wp({replayId:t,recordingData:o,segmentId:s,eventContext:r,session:this.session,timestamp:n,onError:i=>this.handleException(i)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});const r=x();if(r){const s=n instanceof ic?"ratelimit_backoff":"send_error";r.recordDroppedEvent(s,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){U&&H.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,s=Date.now()-n;this._debouncedFlush.cancel();const o=s<this._options.minReplayDuration,i=s>this._options.maxReplayDuration+5e3;if(o||i){U&&H.log(`Session duration (${Math.floor(s/1e3)}s) is too ${o?"short":"long"}, not sending replay.`),o&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&U&&H.log("Flushing initial segment without checkout.");const c=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,c&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&Io(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(a=>{const c=l1(a.target),u=n.join(",");return c?.matches(u)}))return!1;const r=t.length,s=this._options.mutationLimit,o=this._options.mutationBreadcrumbLimit,i=s&&r>s;if(r>o||i){const a=ct({category:"replay.mutations",data:{count:r,limit:i}});this._createCustomBreadcrumb(a)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function ar(e,t){return[...e,...t].join(",")}function y1({mask:e,unmask:t,block:n,unblock:r,ignore:s}){const o=["base","iframe[srcdoc]:not([src])"],i=ar(e,[".sentry-mask","[data-sentry-mask]"]),a=ar(t,[]);return{maskTextSelector:i,unmaskTextSelector:a,blockSelector:ar(n,[".sentry-block","[data-sentry-block]",...o]),unblockSelector:ar(r,[]),ignoreSelector:ar(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function S1({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:o}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?o:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o}const dl='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',b1=["content-length","content-type","accept"];let fl=!1;const FR=(e=>new E1(e));class E1{constructor({flushMinDelay:t=Y0,flushMaxDelay:n=J0,minReplayDuration:r=tw,maxReplayDuration:s=zu,stickySession:o=!0,useCompression:i=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:d=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:p=750,mutationLimit:f=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:g=[],networkDetailAllowUrls:_=[],networkDetailDenyUrls:y=[],networkCaptureBodies:S=!0,networkRequestHeaders:O=[],networkResponseHeaders:v=[],mask:N=[],maskAttributes:k=["title","placeholder","aria-label"],unmask:b=[],block:w=[],unblock:E=[],ignore:C=[],maskFn:D,beforeAddRecordingEvent:I,beforeErrorSampling:A,onError:G}={}){this.name="Replay";const K=y1({mask:N,unmask:b,block:w,unblock:E,ignore:C});if(this._recordingOptions={maskAllInputs:d,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:D,maskInputFn:D,maskAttributeFn:(X,F,L)=>S1({maskAttributes:k,maskAllText:u,privacyOptions:K,key:X,value:F,el:L}),...K,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:X=>{try{X.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!c.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,nw),maxReplayDuration:Math.min(s,zu),stickySession:o,useCompression:i,workerUrl:a,blockAllMedia:l,maskAllInputs:d,maskAllText:u,mutationBreadcrumbLimit:p,mutationLimit:f,slowClickTimeout:h,slowClickIgnoreSelectors:g,networkDetailAllowUrls:_,networkDetailDenyUrls:y,networkCaptureBodies:S,networkRequestHeaders:pl(O),networkResponseHeaders:pl(v),beforeAddRecordingEvent:I,beforeErrorSampling:A,onError:G,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${dl}`:dl),this._isInitialized&&$s())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return fl}set _isInitialized(t){fl=t}afterAllSetup(t){!$s()||this._replay||(this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(t){if(this._replay?.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=v1(this._initialOptions,t);this._replay=new _1({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function v1(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},s=un(n.replaysSessionSampleRate),o=un(n.replaysOnErrorSampleRate);return s==null&&o==null&&jt(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),s!=null&&(r.sessionSampleRate=s),o!=null&&(r.errorSampleRate=o),r}function pl(e){return[...b1,...e.map(t=>t.toLowerCase())]}function $R(){return x()?.getIntegrationByName("Replay")}var T1=Object.defineProperty,w1=(e,t,n)=>t in e?T1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hl=(e,t,n)=>w1(e,typeof t!="symbol"?t+"":t,n);class I1{constructor(){hl(this,"idNodeMap",new Map),hl(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function k1(){return new I1}function C1(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Wi(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Wi(e.parentNode,t,n,r+1)}function ml(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(C1(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const Tn=`Please stop import mirror directly. Instead of that,\r
495
+ or you can use record.mirror to access the mirror instance during recording.`;let Uu={map:{},getId(){return console.error(mn),-1},getNode(){return console.error(mn),null},removeNodeFromMap(){console.error(mn)},has(){return console.error(mn),!1},reset(){console.error(mn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Uu=new Proxy(Uu,{get(e,t,n){return t==="map"&&console.error(mn),Reflect.get(e,t,n)}}));function fr(e,t,n={}){let r=null,s=0;return function(...o){const i=Date.now();!s&&n.leading===!1&&(s=i);const a=t-(i-s),c=this;a<=0||a>t?(r&&(II(r),r=null),s=i,e.apply(c,o)):!r&&n.trailing!==!1&&(r=go(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(c,o)},a))}}function Kf(e,t,n,r,s=window){const o=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(i){go(()=>{n.set.call(this,i)},0),o&&o.set&&o.set.call(this,i)}}),()=>Kf(e,t,o||{},!0)}function Ua(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}let Hs=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Hs=()=>new Date().getTime());function Xf(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function Qf(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Zf(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ep(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Be(e,t,n,r,s){if(!e)return!1;const o=ep(e);if(!o)return!1;const i=Sn(t,n);if(!s){const u=r&&o.matches(r);return i(o)&&!u}const a=Jt(o,i);let c=-1;return a<0?!1:(r&&(c=Jt(o,Sn(null,r))),a>-1&&c<0?!0:a<c)}function yI(e,t){return t.getId(e)!==-1}function jo(e,t){return t.getId(e)===dr}function tp(e,t){if(sr(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?tp(e.parentNode,t):!0:!0}function wi(e){return!!e.changedTouches}function SI(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=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function np(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function rp(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function ki(e){return!!e?.shadowRoot}class bI{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function sp(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function EI(e){let t=e,n;for(;n=sp(t);)t=n;return t}function vI(e){const t=e.ownerDocument;if(!t)return!1;const n=EI(e);return t.contains(n)}function op(e){const t=e.ownerDocument;return t?t.contains(e)||vI(e):!1}const Hu={};function Ha(e){const t=Hu[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const o=s.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(s)}catch{}return Hu[e]=r.bind(window)}function TI(...e){return Ha("requestAnimationFrame")(...e)}function go(...e){return Ha("setTimeout")(...e)}function II(...e){return Ha("clearTimeout")(...e)}var V=(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))(V||{}),W=(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))(W||{}),Me=(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))(Me||{}),ft=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ft||{}),gn=(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))(gn||{});function Wa(e){try{return e.contentDocument}catch{}}function wI(e){try{return e.contentWindow}catch{}}function Wu(e){return"__ln"in e}class kI{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Wu(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&Wu(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const ju=(e,t)=>`${e}@${t}`;class CI{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=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new kI,s=c=>{let u=c,d=dr;for(;d===dr;)u=u&&u.nextSibling,d=u&&this.mirror.getId(u);return d},o=c=>{if(!c.parentNode||!op(c))return;const u=sr(c.parentNode)?this.mirror.getId(sp(c)):this.mirror.getId(c.parentNode),d=s(c);if(u===-1||d===-1)return r.addNode(c);const l=bn(c,{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:p=>{np(p,this.mirror)&&!Be(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(p),rp(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),ki(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(p,f)=>{Be(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(p,f),p.contentWindow&&this.canvasManager.addWindow(p.contentWindow),this.shadowDomManager.observeAttachShadow(p))},onStylesheetLoad:(p,f)=>{this.stylesheetManager.attachLinkElement(p,f)},onBlockedImageLoad:(p,f,{width:h,height:g})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:f.id,attributes:{style:{width:`${h}px`,height:`${g}px`}}}]})}});l&&(t.push({parentId:u,nextId:d,node:l}),n.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)zu(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||o(c);for(const c of this.addedSet)!qu(this.droppedSet,c)&&!zu(this.removes,c,this.mirror)||qu(this.movedSet,c)?o(c):this.droppedSet.add(c);let i=null;for(;r.length;){let c=null;if(i){const u=this.mirror.getId(i.value.parentNode),d=s(i.value);u!==-1&&d!==-1&&(c=i)}if(!c){let u=r.tail;for(;u;){const d=u;if(u=u.previous,d){const l=this.mirror.getId(d.value.parentNode);if(s(d.value)===-1)continue;if(l!==-1){c=d;break}else{const f=d.value;if(f.parentNode&&f.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=f.parentNode.host;if(this.mirror.getId(h)!==-1){c=d;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}i=c.previous,r.removeNode(c.value),o(c.value)}const a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:u}=c;if(typeof u.style=="string"){const d=JSON.stringify(c.styleDiff),l=JSON.stringify(c._unchangedStyles);d.length<u.style.length&&(d+l).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))},this.processMutation=t=>{if(!jo(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Be(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Dn(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,ep(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,s=t.target.getAttribute(r);if(r==="value"){const i=$a(n),a=n.tagName;s=Bs(n,a,i);const c=ho({maskInputOptions:this.maskInputOptions,tagName:a,type:i}),u=Dn(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);s=lr({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(Be(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===t.oldValue)return;let o=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!Wa(n))r="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!Jf(n.tagName,r)&&(o.attributes[r]=Yf(this.doc,Pn(n.tagName),Pn(r),s,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const i=this.unattachedDoc.createElement("span");t.oldValue&&i.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==i.style.getPropertyValue(a)||u!==i.style.getPropertyPriority(a)?u===""?o.styleDiff[a]=c:o.styleDiff[a]=[c,u]:o._unchangedStyles[a]=[c,u]}for(const a of Array.from(i.style))n.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}break}case"childList":{if(Be(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),s=sr(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Be(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||jo(n,this.mirror)||!yI(n,this.mirror)||(this.addedSet.has(n)?(Ci(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||tp(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[ju(r,s)]?Ci(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:sr(t.target)&&or(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(jo(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[ju(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Be(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(r=>this.genAdds(r)),ki(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["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"].forEach(n=>{this[n]=t[n]})}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 Ci(e,t){e.delete(t),t.childNodes?.forEach(n=>Ci(e,n))}function zu(e,t,n){return e.length===0?!1:RI(e,t,n)}function RI(e,t,n){let r=t.parentNode;for(;r;){const s=n.getId(r);if(e.some(o=>o.id===s))return!0;r=r.parentNode}return!1}function qu(e,t){return e.size===0?!1:ip(e,t)}function ip(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:ip(e,n):!1}let ir;function AI(e){ir=e}function xI(){ir=void 0}const ee=e=>ir?(...n)=>{try{return e(...n)}catch(r){if(ir&&ir(r)===!0)return()=>{};throw r}}:e,En=[];function Or(e){try{if("composedPath"in e){const 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 ap(e,t){const n=new CI;En.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=window?.Zone?.__symbol__?.("MutationObserver");s&&window[s]&&(r=window[s]);const o=new r(ee(i=>{e.onMutation&&e.onMutation(i)===!1||n.processMutations.bind(n)(i)}));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function MI({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const s=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let i=[],a;const c=fr(ee(l=>{const p=Date.now()-a;e(i.map(f=>(f.timeOffset-=p,f)),l),i=[],a=null}),o),u=ee(fr(ee(l=>{const p=Or(l),{clientX:f,clientY:h}=wi(l)?l.changedTouches[0]:l;a||(a=Hs()),i.push({x:f,y:h,id:r.getId(p),timeOffset:Hs()-a}),c(typeof DragEvent<"u"&&l instanceof DragEvent?W.Drag:l instanceof MouseEvent?W.MouseMove:W.TouchMove)}),s,{trailing:!1})),d=[Oe("mousemove",u,n),Oe("touchmove",u,n),Oe("drag",u,n)];return ee(()=>{d.forEach(l=>l())})}function OI({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){if(i.mouseInteraction===!1)return()=>{};const a=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,c=[];let u=null;const d=l=>p=>{const f=Or(p);if(Be(f,r,s,o,!0))return;let h=null,g=l;if("pointerType"in p){switch(p.pointerType){case"mouse":h=ft.Mouse;break;case"touch":h=ft.Touch;break;case"pen":h=ft.Pen;break}h===ft.Touch?Me[l]===Me.MouseDown?g="TouchStart":Me[l]===Me.MouseUp&&(g="TouchEnd"):ft.Pen}else wi(p)&&(h=ft.Touch);h!==null?(u=h,(g.startsWith("Touch")&&h===ft.Touch||g.startsWith("Mouse")&&h===ft.Mouse)&&(h=null)):Me[l]===Me.Click&&(h=u,u=null);const _=wi(p)?p.changedTouches[0]:p;if(!_)return;const y=n.getId(f),{clientX:S,clientY:O}=_;ee(e)({type:Me[g],id:y,x:S,y:O,...h!==null&&{pointerType:h}})};return Object.keys(Me).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&a[l]!==!1).forEach(l=>{let p=Pn(l);const f=d(l);if(window.PointerEvent)switch(Me[l]){case Me.MouseDown:case Me.MouseUp:p=p.replace("mouse","pointer");break;case Me.TouchStart:case Me.TouchEnd:return}c.push(Oe(p,f,t))}),ee(()=>{c.forEach(l=>l())})}function cp({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){const a=ee(fr(ee(c=>{const u=Or(c);if(!u||Be(u,r,s,o,!0))return;const d=n.getId(u);if(u===t&&t.defaultView){const l=Xf(t.defaultView);e({id:d,x:l.left,y:l.top})}else e({id:d,x:u.scrollLeft,y:u.scrollTop})}),i.scroll||100));return Oe("scroll",a,t)}function NI({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=ee(fr(ee(()=>{const o=Qf(),i=Zf();(n!==o||r!==i)&&(e({width:Number(i),height:Number(o)}),n=o,r=i)}),200));return Oe("resize",s,t)}const LI=["INPUT","TEXTAREA","SELECT"],Gu=new WeakMap;function PI({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:d,userTriggeredOnInput:l,maskTextClass:p,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:g}){function _(b){let I=Or(b);const E=b.isTrusted,C=I&&Ti(I.tagName);if(C==="OPTION"&&(I=I.parentElement),!I||!C||LI.indexOf(C)<0||Be(I,r,s,o,!0))return;const D=I;if(D.classList.contains(i)||a&&D.matches(a))return;const w=$a(I);let A=Bs(D,C,w),G=!1;const K=ho({maskInputOptions:c,tagName:C,type:w}),X=Dn(I,p,h,f,g,K);(w==="radio"||w==="checkbox")&&(G=I.checked),A=lr({isMasked:X,element:I,value:A,maskInputFn:u}),y(I,l?{text:A,isChecked:G,userTriggered:E}:{text:A,isChecked:G});const F=I.name;w==="radio"&&F&&G&&t.querySelectorAll(`input[type="radio"][name="${F}"]`).forEach(L=>{if(L!==I){const P=lr({isMasked:X,element:L,value:Bs(L,C,w),maskInputFn:u});y(L,l?{text:P,isChecked:!G,userTriggered:!1}:{text:P,isChecked:!G})}})}function y(b,I){const E=Gu.get(b);if(!E||E.text!==I.text||E.isChecked!==I.isChecked){Gu.set(b,I);const C=n.getId(b);ee(e)({...I,id:C})}}const O=(d.input==="last"?["change"]:["input","change"]).map(b=>Oe(b,ee(_),t)),v=t.defaultView;if(!v)return()=>{O.forEach(b=>b())};const N=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),k=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return N&&N.set&&O.push(...k.map(b=>Kf(b[0],b[1],{set(){ee(_)({target:this,isTrusted:!1})}},!1,v))),ee(()=>{O.forEach(b=>b())})}function Ws(e){const t=[];function n(r,s){if(Vr("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Vr("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Vr("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Vr("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const i=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(i)}else if(r.parentStyleSheet){const i=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(i)}return s}return n(e,t)}function At(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function DI({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:ee((d,l,p)=>{const[f,h]=p,{id:g,styleId:_}=At(l,t,n.styleMirror);return(g&&g!==-1||_&&_!==-1)&&e({id:g,styleId:_,adds:[{rule:f,index:h}]}),d.apply(l,p)})});const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:ee((d,l,p)=>{const[f]=p,{id:h,styleId:g}=At(l,t,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,removes:[{index:f}]}),d.apply(l,p)})});let i;r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:ee((d,l,p)=>{const[f]=p,{id:h,styleId:g}=At(l,t,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,replace:f}),d.apply(l,p)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:ee((d,l,p)=>{const[f]=p,{id:h,styleId:g}=At(l,t,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,replaceSync:f}),d.apply(l,p)})}));const c={};Yr("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Yr("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Yr("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Yr("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([d,l])=>{u[d]={insertRule:l.prototype.insertRule,deleteRule:l.prototype.deleteRule},l.prototype.insertRule=new Proxy(u[d].insertRule,{apply:ee((p,f,h)=>{const[g,_]=h,{id:y,styleId:S}=At(f.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||S&&S!==-1)&&e({id:y,styleId:S,adds:[{rule:g,index:[...Ws(f),_||0]}]}),p.apply(f,h)})}),l.prototype.deleteRule=new Proxy(u[d].deleteRule,{apply:ee((p,f,h)=>{const[g]=h,{id:_,styleId:y}=At(f.parentStyleSheet,t,n.styleMirror);return(_&&_!==-1||y&&y!==-1)&&e({id:_,styleId:y,removes:[{index:[...Ws(f),g]}]}),p.apply(f,h)})})}),ee(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=o,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([d,l])=>{l.prototype.insertRule=u[d].insertRule,l.prototype.deleteRule=u[d].deleteRule})})}function up({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const s=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,o=s?.prototype?Object.getOwnPropertyDescriptor(s?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!o?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return o.get?.call(this)},set(i){const a=o.set?.call(this,i);if(r!==null&&r!==-1)try{t.adoptStyleSheets(i,r)}catch{}return a}}),ee(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function FI({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:ee((a,c,u)=>{const[d,l,p]=u;if(n.has(d))return o.apply(c,[d,l,p]);const{id:f,styleId:h}=At(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(f&&f!==-1||h&&h!==-1)&&e({id:f,styleId:h,set:{property:d,value:l,priority:p},index:Ws(c.parentRule)}),a.apply(c,u)})});const i=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:ee((a,c,u)=>{const[d]=u;if(n.has(d))return i.apply(c,[d]);const{id:l,styleId:p}=At(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||p&&p!==-1)&&e({id:l,styleId:p,remove:{property:d},index:Ws(c.parentRule)}),a.apply(c,u)})}),ee(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=i})}function $I({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:o,doc:i}){const a=ee(u=>fr(ee(d=>{const l=Or(d);if(!l||Be(l,t,n,r,!0))return;const{currentTime:p,volume:f,muted:h,playbackRate:g}=l;e({type:u,id:s.getId(l),currentTime:p,volume:f,muted:h,playbackRate:g})}),o.media||500)),c=[Oe("play",a(gn.Play),i),Oe("pause",a(gn.Pause),i),Oe("seeked",a(gn.Seeked),i),Oe("volumechange",a(gn.VolumeChange),i),Oe("ratechange",a(gn.RateChange),i)];return ee(()=>{c.forEach(u=>u())})}function BI({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,o=n.FontFace;n.FontFace=function(c,u,d){const l=new o(c,u,d);return s.set(l,{family:c,buffer:typeof u!="string",descriptors:d,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),l};const i=Ua(t.fonts,"add",function(a){return function(c){return go(ee(()=>{const u=s.get(c);u&&(e(u),s.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=o}),r.push(i),ee(()=>{r.forEach(a=>a())})}function UI(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,selectionCb:i}=e;let a=!0;const c=ee(()=>{const u=t.getSelection();if(!u||a&&u?.isCollapsed)return;a=u.isCollapsed||!1;const d=[],l=u.rangeCount||0;for(let p=0;p<l;p++){const f=u.getRangeAt(p),{startContainer:h,startOffset:g,endContainer:_,endOffset:y}=f;Be(h,r,s,o,!0)||Be(_,r,s,o,!0)||d.push({start:n.getId(h),startOffset:g,end:n.getId(_),endOffset:y})}i({ranges:d})});return c(),Oe("selectionchange",c)}function HI({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Ua(n.customElements,"define",function(s){return function(o,i,a){try{t({define:{name:o}})}catch{}return s.apply(this,[o,i,a])}})}function WI(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=ap(e,e.doc));const s=MI(e),o=OI(e),i=cp(e),a=NI(e,{win:n}),c=PI(e),u=$I(e);let d=()=>{},l=()=>{},p=()=>{},f=()=>{};e.recordDOM&&(d=DI(e,{win:n}),l=up(e,e.doc),p=FI(e,{win:n}),e.collectFonts&&(f=BI(e)));const h=UI(e),g=HI(e),_=[];for(const y of e.plugins)_.push(y.observer(y.callback,n,y.options));return ee(()=>{En.forEach(y=>y.reset()),r?.disconnect(),s(),o(),i(),a(),c(),u(),d(),l(),p(),f(),h(),g(),_.forEach(y=>y())})}function Vr(e){return typeof window[e]<"u"}function Yr(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Ri{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,s){const o=r||this.getIdToRemoteIdMap(t),i=s||this.getRemoteIdToIdMap(t);let a=o.get(n);return a||(a=this.generateIdFn(),o.set(n,a),i.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return n.map(o=>this.getId(t,o,r,s))}getRemoteId(t,n,r){const s=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const o=s.get(n);return o||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(s=>this.getRemoteId(t,s,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class jI{constructor(){this.crossOriginIframeMirror=new Ri(Ba),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class zI{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Ri(Ba),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ri(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&t.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const r=Wa(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const s=this.crossOriginIframeMap.get(t.source);if(!s)return;const o=this.transformCrossOriginEvent(s,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case V.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:V.IncrementalSnapshot,data:{source:W.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case V.Meta:case V.Load:case V.DomContentLoaded:return!1;case V.Plugin:return n;case V.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case V.IncrementalSnapshot:switch(n.data.source){case W.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(r.node,s)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case W.Drag:case W.TouchMove:case W.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case W.ViewportResize:return!1;case W.MediaInteraction:case W.MouseInteraction:case W.Scroll:case W.CanvasMutation:case W.Input:return this.replaceIds(n.data,t,["id"]),n;case W.StyleSheetRule:case W.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case W.Font:return n;case W.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case W.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),n}}return!1}replace(t,n,r,s){for(const o of s)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=t.getIds(r,n[o]):n[o]=t.getId(r,n[o]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==ye.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class qI{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class GI{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!or(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=ap({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(cp({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),go(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(up({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=Wa(t),r=wI(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(Ua(t.prototype,"attachShadow",function(s){return function(o){const i=s.call(this,o);return this.shadowRoot&&op(this)&&r.addShadowRoot(this.shadowRoot,n),i}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}var Vu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",VI=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Jr=0;Jr<Vu.length;Jr++)VI[Vu.charCodeAt(Jr)]=Jr;class Yu{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class YI{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new bI,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},s=[];for(const o of t){let i;this.styleMirror.has(o)?i=this.styleMirror.getId(o):(i=this.styleMirror.add(o),s.push({styleId:i,rules:Array.from(o.rules||CSSRule,(a,c)=>({rule:Wf(a),index:c}))})),r.styleIds.push(i)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class JI{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(s=>s!==n)}add(t,n){this.active||(this.active=!0,TI(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let me,js;try{if(Array.from([1],e=>e*2)[0]!==2){const 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)}const Ve=Y0();function mt(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:o=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:d="rr-mask",unmaskTextClass:l=null,maskTextSelector:p=null,unmaskTextSelector:f=null,inlineStylesheet:h=!0,maskAllInputs:g,maskInputOptions:_,slimDOMOptions:y,maskAttributeFn:S,maskInputFn:O,maskTextFn:v,maxCanvasSize:N=null,packFn:k,sampling:b={},dataURLOptions:I={},mousemoveWait:E,recordDOM:C=!0,recordCanvas:D=!1,recordCrossOriginIframes:w=!1,recordAfter:A=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:G=!1,collectFonts:K=!1,inlineImages:X=!1,plugins:F,keepIframeSrcFn:L=()=>!1,ignoreCSSAttributes:P=new Set([]),errorHandler:M,onMutation:J,getCanvasManager:se}=e;AI(M);const le=w?window.parent===window:!0;let _e=!1;if(!le)try{window.parent.document&&(_e=!1)}catch{_e=!0}if(le&&!t)throw new Error("emit function is required");if(!le&&!_e)return()=>{};E!==void 0&&b.mousemove===void 0&&(b.mousemove=E),Ve.reset();const Ae=g===!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}:_!==void 0?_:{},wt=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:y==="all",headMetaDescKeywords:y==="all"}:y||{};SI();let xe,Ne=0;const nt=Q=>{for(const Fe of F||[])Fe.eventProcessor&&(Q=Fe.eventProcessor(Q));return k&&!_e&&(Q=k(Q)),Q};me=(Q,Fe)=>{const Z=Q;if(Z.timestamp=Hs(),En[0]?.isFrozen()&&Z.type!==V.FullSnapshot&&!(Z.type===V.IncrementalSnapshot&&Z.data.source===W.Mutation)&&En.forEach(Ie=>Ie.unfreeze()),le)t?.(nt(Z),Fe);else if(_e){const Ie={type:"rrweb",event:nt(Z),origin:window.location.origin,isCheckout:Fe};window.parent.postMessage(Ie,"*")}if(Z.type===V.FullSnapshot)xe=Z,Ne=0;else if(Z.type===V.IncrementalSnapshot){if(Z.data.source===W.Mutation&&Z.data.isAttachIframe)return;Ne++;const Ie=r&&Ne>=r,te=n&&xe&&Z.timestamp-xe.timestamp>n;(Ie||te)&&rt(!0)}};const kt=Q=>{me({type:V.IncrementalSnapshot,data:{source:W.Mutation,...Q}})},Xn=Q=>me({type:V.IncrementalSnapshot,data:{source:W.Scroll,...Q}}),Lr=Q=>me({type:V.IncrementalSnapshot,data:{source:W.CanvasMutation,...Q}}),Qn=Q=>me({type:V.IncrementalSnapshot,data:{source:W.AdoptedStyleSheet,...Q}}),re=new YI({mutationCb:kt,adoptedStyleSheetCb:Qn}),fe=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new jI:new zI({mirror:Ve,mutationCb:kt,stylesheetManager:re,recordCrossOriginIframes:w,wrappedEmit:me});for(const Q of F||[])Q.getMirror&&Q.getMirror({nodeMirror:Ve,crossOriginIframeMirror:fe.crossOriginIframeMirror,crossOriginIframeStyleMirror:fe.crossOriginIframeStyleMirror});const He=new JI,Te=XI(se,{mirror:Ve,win:window,mutationCb:Q=>me({type:V.IncrementalSnapshot,data:{source:W.CanvasMutation,...Q}}),recordCanvas:D,blockClass:s,blockSelector:o,unblockSelector:i,maxCanvasSize:N,sampling:b.canvas,dataURLOptions:I,errorHandler:M}),Ce=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new qI:new GI({mutationCb:kt,scrollCb:Xn,bypassOptions:{onMutation:J,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:Ae,dataURLOptions:I,maskAttributeFn:S,maskTextFn:v,maskInputFn:O,recordCanvas:D,inlineImages:X,sampling:b,slimDOMOptions:wt,iframeManager:fe,stylesheetManager:re,canvasManager:Te,keepIframeSrcFn:L,processedNodeManager:He},mirror:Ve}),rt=(Q=!1)=>{if(!C)return;me({type:V.Meta,data:{href:window.location.href,width:Zf(),height:Qf()}},Q),re.reset(),Ce.init(),En.forEach(Z=>Z.lock());const Fe=_I(document,{mirror:Ve,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskAllInputs:Ae,maskAttributeFn:S,maskInputFn:O,maskTextFn:v,slimDOM:wt,dataURLOptions:I,recordCanvas:D,inlineImages:X,onSerialize:Z=>{np(Z,Ve)&&fe.addIframe(Z),rp(Z,Ve)&&re.trackLinkElement(Z),ki(Z)&&Ce.addShadowRoot(Z.shadowRoot,document)},onIframeLoad:(Z,Ie)=>{fe.attachIframe(Z,Ie),Z.contentWindow&&Te.addWindow(Z.contentWindow),Ce.observeAttachShadow(Z)},onStylesheetLoad:(Z,Ie)=>{re.attachLinkElement(Z,Ie)},onBlockedImageLoad:(Z,Ie,{width:te,height:Zn})=>{kt({adds:[],removes:[],texts:[],attributes:[{id:Ie.id,attributes:{style:{width:`${te}px`,height:`${Zn}px`}}}]})},keepIframeSrcFn:L});if(!Fe)return console.warn("Failed to snapshot the document");me({type:V.FullSnapshot,data:{node:Fe,initialOffset:Xf(window)}}),En.forEach(Z=>Z.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&re.adoptStyleSheets(document.adoptedStyleSheets,Ve.getId(document))};js=rt;try{const Q=[],Fe=Ie=>ee(WI)({onMutation:J,mutationCb:kt,mousemoveCb:(te,Zn)=>me({type:V.IncrementalSnapshot,data:{source:Zn,positions:te}}),mouseInteractionCb:te=>me({type:V.IncrementalSnapshot,data:{source:W.MouseInteraction,...te}}),scrollCb:Xn,viewportResizeCb:te=>me({type:V.IncrementalSnapshot,data:{source:W.ViewportResize,...te}}),inputCb:te=>me({type:V.IncrementalSnapshot,data:{source:W.Input,...te}}),mediaInteractionCb:te=>me({type:V.IncrementalSnapshot,data:{source:W.MediaInteraction,...te}}),styleSheetRuleCb:te=>me({type:V.IncrementalSnapshot,data:{source:W.StyleSheetRule,...te}}),styleDeclarationCb:te=>me({type:V.IncrementalSnapshot,data:{source:W.StyleDeclaration,...te}}),canvasMutationCb:Lr,fontCb:te=>me({type:V.IncrementalSnapshot,data:{source:W.Font,...te}}),selectionCb:te=>{me({type:V.IncrementalSnapshot,data:{source:W.Selection,...te}})},customElementCb:te=>{me({type:V.IncrementalSnapshot,data:{source:W.CustomElement,...te}})},blockClass:s,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:f,maskInputOptions:Ae,inlineStylesheet:h,sampling:b,recordDOM:C,recordCanvas:D,inlineImages:X,userTriggeredOnInput:G,collectFonts:K,doc:Ie,maskAttributeFn:S,maskInputFn:O,maskTextFn:v,keepIframeSrcFn:L,blockSelector:o,unblockSelector:i,slimDOMOptions:wt,dataURLOptions:I,mirror:Ve,iframeManager:fe,stylesheetManager:re,shadowDomManager:Ce,processedNodeManager:He,canvasManager:Te,ignoreCSSAttributes:P,plugins:F?.filter(te=>te.observer)?.map(te=>({observer:te.observer,options:te.options,callback:Zn=>me({type:V.Plugin,data:{plugin:te.name,payload:Zn}})}))||[]},{});fe.addLoadListener(Ie=>{try{Q.push(Fe(Ie.contentDocument))}catch(te){console.warn(te)}});const Z=()=>{rt(),Q.push(Fe(document))};return document.readyState==="interactive"||document.readyState==="complete"?Z():(Q.push(Oe("DOMContentLoaded",()=>{me({type:V.DomContentLoaded,data:{}}),A==="DOMContentLoaded"&&Z()})),Q.push(Oe("load",()=>{me({type:V.Load,data:{}}),A==="load"&&Z()},window))),()=>{Q.forEach(Ie=>Ie()),He.destroy(),js=void 0,xI()}}catch(Q){console.warn(Q)}}function KI(e){if(!js)throw new Error("please take full snapshot after start recording");js(e)}mt.mirror=Ve;mt.takeFullSnapshot=KI;function XI(e,t){try{return e?e(t):new Yu}catch{return console.warn("Unable to initialize CanvasManager"),new Yu}}var Ju;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Ju||(Ju={}));const QI=3,ZI=5;function ja(e){return e>9999999999?e:e*1e3}function zo(e){return e>9999999999?e/1e3:e}function Nr(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:V.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:$e(t,10,1e3)}}),t.category==="console")))}const ew="button,a";function lp(e){return e.closest(ew)||e}function dp(e){const t=fp(e);return!t||!(t instanceof Element)?t:lp(t)}function fp(e){return tw(e)?e.target:e}function tw(e){return typeof e=="object"&&!!e&&"target"in e}let xt;function nw(e){return xt||(xt=[],rw()),xt.push(e),()=>{const t=xt?xt.indexOf(e):-1;t>-1&&xt.splice(t,1)}}function rw(){we(ue,"open",function(e){return function(...t){if(xt)try{xt.forEach(n=>n())}catch{}return e.apply(ue,t)}})}const sw=new Set([W.Mutation,W.StyleSheetRule,W.StyleDeclaration,W.AdoptedStyleSheet,W.CanvasMutation,W.Selection,W.MediaInteraction]);function ow(e,t,n){e.handleClick(t,n)}class iw{constructor(t,n,r=Nr){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=nw(()=>{this._lastMutation=Ku()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(cw(n,this._ignoreSelector)||!uw(t))return;const r={timestamp:zo(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(s=>s.node===r.node&&Math.abs(s.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=zo(t)}registerScroll(t=Date.now()){this._lastScroll=zo(t)}registerClick(t){const n=lp(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=Ku();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,o=!r&&!s,{clickCount:i,clickBreadcrumb:a}=t;if(o){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",d={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:ue.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:i||1}};this._addBreadcrumbEvent(n,d);return}if(i>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:ue.location.href,route:n.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Mr(()=>this._checkClicks(),1e3)}}const aw=["A","BUTTON","INPUT"];function cw(e,t){return!!(!aw.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 uw(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function Ku(){return Date.now()/1e3}function lw(e,t){try{if(!dw(t))return;const{source:n}=t.data;if(sw.has(n)&&e.registerMutation(t.timestamp),n===W.Scroll&&e.registerScroll(t.timestamp),fw(t)){const{type:r,id:s}=t.data,o=mt.mirror.getNode(s);o instanceof HTMLElement&&r===Me.Click&&e.registerClick(o)}}catch{}}function dw(e){return e.type===QI}function fw(e){return e.data.source===W.MouseInteraction}function ot(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var za=(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))(za||{});const pw=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function hw(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(pw.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const mw=e=>t=>{if(!e.isEnabled())return;const n=gw(t);if(!n)return;const r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&s?.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&ow(e.clickDetector,n,dp(t.event)),Nr(e,n)};function pp(e,t){const n=mt.mirror.getId(e),r=n&&mt.mirror.getNode(n),s=r&&mt.mirror.getMeta(r),o=s&&yw(s)?s:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map(i=>i.type===za.Text&&i.textContent).filter(Boolean).map(i=>i.trim()).join(""),attributes:hw(o.attributes)}}:{}}}function gw(e){const{target:t,message:n}=_w(e);return ot({category:`ui.${e.name}`,...pp(t,n)})}function _w(e){const t=e.name==="click";let n,r=null;try{r=t?dp(e.event):fp(e.event),n=Pe(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function yw(e){return e.type===za.Element}function Sw(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=bw(t);n&&Nr(e,n)}function bw(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o,target:i}=e;if(!i||Ew(i)||!o)return null;const a=t||r||s,c=o.length===1;if(!a&&c)return null;const u=Pe(i,{maxStringLength:200})||"<unknown>",d=pp(i,u);return ot({category:"ui.keyDown",message:u,data:{...d.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o}})}function Ew(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const vw={resource:Cw,paint:ww,navigation:kw};function qo(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function Tw(e){return e.map(Iw).filter(Boolean)}function Iw(e){const t=vw[e.entryType];return t?t(e):null}function Fn(e){return((Re()||ue.performance.timeOrigin)+e)/1e3}function ww(e){const{duration:t,entryType:n,name:r,startTime:s}=e,o=Fn(s);return{type:n,name:r,start:o,end:o+t,data:void 0}}function kw(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:o,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:d,loadEventEnd:l,redirectCount:p,startTime:f,transferSize:h,type:g}=e;return s===0?null:{type:`${t}.${g}`,start:Fn(f),end:Fn(o),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:i,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:d,loadEventEnd:l,domComplete:o,redirectCount:p}}}function Cw(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:o,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Fn(o),end:Fn(s),name:r,data:{size:u,statusCode:c,decodedBodySize:i,encodedBodySize:a}}}function Rw(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return qa(e,"largest-contentful-paint",n)}function Aw(e){return e.sources!==void 0}function xw(e){const t=[],n=[];for(const r of e.entries)if(Aw(r)){const s=[];for(const o of r.sources)if(o.node){n.push(o.node);const i=mt.mirror.getId(o.node);i&&s.push(i)}t.push({value:r.value,nodeIds:s.length?s:void 0})}return qa(e,"cumulative-layout-shift",n,t)}function Mw(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return qa(e,"interaction-to-next-paint",n)}function qa(e,t,n,r){const s=e.value,o=e.rating,i=Fn(s);return{type:"web-vital",name:t,start:i,end:i,data:{value:s,size:s,rating:o,nodeIds:n?n.map(a=>mt.mirror.getId(a)):void 0,attributions:r}}}function Ow(e){function t(s){e.performanceEntries.includes(s)||e.performanceEntries.push(s)}function n({entries:s}){s.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(s=>{r.push(cn(s,n))}),r.push(xa(qo(Rw,e)),Aa(qo(xw,e)),Ef(qo(Mw,e))),()=>{r.forEach(s=>s())}}const U=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Nw='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 Lw(){const e=new Blob([Nw]);return URL.createObjectURL(e)}const Xu=["log","warn","error"],ps="[Replay] ";function Go(e,t="info"){Et({category:"console",data:{logger:"replay"},level:t,message:`${ps}${e}`},{level:t})}function Pw(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return U?(Xu.forEach(r=>{n[r]=(...s)=>{m[r](ps,...s),t&&Go(s.join(""),sa(r))}}),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),m.error(ps,r),e?ke(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&Go(r,"error")},n.infoTick=(...r)=>{m.log(ps,...r),t&&setTimeout(()=>Go(r[0]),0)}):Xu.forEach(r=>{n[r]=()=>{}}),n}const H=Pw();class Ga extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Fa}.`)}}class hp{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(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>Fa)throw new Ga;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?ja(t):null}}class Dw{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){U&&H.log("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((s,o)=>{const i=({data:a})=>{const c=a;if(c.method===t&&c.id===r){if(this._worker.removeEventListener("message",i),!c.success){U&&H.error("Error in compression worker: ",c.response),o(new Error("Error in compression worker"));return}s(c.response)}};this._worker.addEventListener("message",i),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class Fw{constructor(t){this._worker=new Dw(t),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(t){const n=ja(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>Fa?Promise.reject(new Ga):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{U&&H.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class $w{constructor(t){this._fallback=new hp,this._compression=new Fw(t),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(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){U&&H.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,s=[];for(const o of t)s.push(this._compression.addEvent(o));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(s),this._fallback.clear()}catch(o){U&&H.exception(o,"Failed to add events when switching buffers.")}}}function Bw({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=Uw(t);if(n)return n}return U&&H.log("Using simple buffer"),new hp}function Uw(e){try{const t=e||Hw();if(!t)return;U&&H.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new $w(n)}catch(t){U&&H.exception(t,"Failed to create compression worker")}}function Hw(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Lw():""}function Va(){try{return"sessionStorage"in ue&&!!ue.sessionStorage}catch{return!1}}function Ww(e){jw(),e.session=void 0}function jw(){if(Va())try{ue.sessionStorage.removeItem(Pa)}catch{}}function mp(e){return e===void 0?!1:Math.random()<e}function _o(e){if(Va())try{ue.sessionStorage.setItem(Pa,JSON.stringify(e))}catch{}}function gp(e){const t=Date.now(),n=e.id||Ee(),r=e.started||t,s=e.lastActivity||t,o=e.segmentId||0,i=e.sampled,a=e.previousSessionId,c=e.dirty||!1;return{id:n,started:r,lastActivity:s,segmentId:o,sampled:i,previousSessionId:a,dirty:c}}function zw(e,t){return mp(e)?"session":t?"buffer":!1}function Qu({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=zw(e,t),o=gp({sampled:s,previousSessionId:r});return n&&_o(o),o}function qw(){if(!Va())return null;try{const e=ue.sessionStorage.getItem(Pa);if(!e)return null;const t=JSON.parse(e);return U&&H.infoTick("Loading existing session"),gp(t)}catch{return null}}function Ai(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function _p(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Ai(e.started,t,r)||Ai(e.lastActivity,n,r)}function yp(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!_p(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Vo({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const s=r.stickySession&&qw();return s?yp(s,{sessionIdleExpire:e,maxReplayDuration:t})?(U&&H.infoTick("Session in sessionStorage is expired, creating new one..."),Qu(r,{previousSessionId:s.id})):s:(U&&H.infoTick("Creating new session"),Qu(r,{previousSessionId:n}))}function Gw(e){return e.type===V.Custom}function Ya(e,t,n){return bp(e,t)?(Sp(e,t,n),!0):!1}function Vw(e,t,n){return bp(e,t)?Sp(e,t,n):Promise.resolve(null)}async function Sp(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const s=e.recordingMode==="buffer";try{n&&s&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const o=e.getOptions(),i=Yw(t,o.beforeAddRecordingEvent);return i?await r.addEvent(i):void 0}catch(o){const i=o&&o instanceof Ga,a=i?"addEventSizeExceeded":"addEvent",c=x();if(c){const u=i?"buffer_overflow":"internal_sdk_error";c.recordDroppedEvent(u,"replay")}if(i&&s)return r.clear(),r.waitForCheckout=!0,null;e.handleException(o),await e.stop({reason:a})}}function bp(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=ja(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(U&&H.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function Yw(e,t){try{if(typeof t=="function"&&Gw(e))return t(e)}catch(n){return U&&H.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function Ja(e){return!e.type}function xi(e){return e.type==="transaction"}function Jw(e){return e.type==="replay_event"}function Zu(e){return e.type==="feedback"}function Kw(e){return(t,n)=>{if(!e.isEnabled()||!Ja(t)&&!xi(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(xi(t)){Xw(e,t);return}Qw(e,t)}}}function Xw(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function Qw(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||Mr(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(s){e.handleException(s)}})}function Zw(e){return t=>{!e.isEnabled()||!Ja(t)||ek(e,t)}}function ek(e,t){const n=t.exception?.values?.[0]?.value;if(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))){const r=ot({category:"replay.hydrate-error",data:{url:un()}});Nr(e,r)}}function tk(e){const t=x();t&&t.on("beforeAddBreadcrumb",n=>nk(e,n))}function nk(e,t){if(!e.isEnabled()||!Ep(t))return;const n=rk(t);n&&Nr(e,n)}function rk(e){return!Ep(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?sk(e):ot(e)}function sk(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return ot(e);let n=!1;const r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>Gr?(n=!0,`${s.slice(0,Gr)}…`):s;if(typeof s=="object")try{const o=$e(s,7);return JSON.stringify(o).length>Gr?(n=!0,`${JSON.stringify(o,null,2).slice(0,Gr)}…`):o}catch{}return s});return ot({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Ep(e){return!!e.category}function ok(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function vp(){const e=q().getPropagationContext().dsc;e&&delete e.replay_id;const t=be();if(t){const n=Ze(t);delete n.replay_id}}function ik(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:V.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 ak(e,t){return e.recordingMode!=="buffer"||t.message===Da||!t.exception||t.type?!1:mp(e.getOptions().errorSampleRate)}function ck(e){return Object.assign((t,n)=>{if(!e.isEnabled()||e.isPaused())return t;if(Jw(t))return delete t.breadcrumbs,t;if(!Ja(t)&&!xi(t)&&!Zu(t))return t;if(!e.checkAndHandleExpiredSession())return vp(),t;if(Zu(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),ik(e,t),t;if(ok(t,n)&&!e.getOptions()._experiments.captureExceptions)return U&&H.log("Ignoring error from rrweb internals",t),null;const s=ak(e,t);if((s||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),s&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){const i=e.session;i.dirty=!0,e.getOptions().stickySession&&_o(i)}return t},{id:"Replay"})}function yo(e,t){return t.map(({type:n,start:r,end:s,name:o,data:i})=>{const a=e.throttledAddEvent({type:V.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:o,startTimestamp:r,endTimestamp:s,data:i}}});return typeof a=="string"?Promise.resolve(null):a})}function uk(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function lk(e){return t=>{if(!e.isEnabled())return;const n=uk(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(yo(e,[n]),!1)))}}function dk(e,t){return U&&e.getOptions()._experiments.traceInternals?!1:Ad(t,x())}function Tp(e,t){e.isEnabled()&&t!==null&&(dk(e,t.name)||e.addUpdate(()=>(yo(e,[t]),!0)))}function So(e){if(!e)return;const 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){const n=Rf(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function Ip(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function zs(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function wp(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:o,statusCode:i,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:{method:o,statusCode:i,request:a,response:c}}}function pr(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Lt(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:s,warnings:o}=fk(n);return r.body=s,o?.length&&(r._meta={warnings:o}),r}function Mi(e,t){return Object.entries(e).reduce((n,[r,s])=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=s),n},{})}function fk(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Nu,n=pk(e);if(t){const r=e.slice(0,Nu);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function pk(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function qs(e,t){const n=hk(e);return Xe(n,t)}function hk(e,t=ue.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(ue.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function mk(e,t,n){try{const r=await _k(e,t,n),s=wp("resource.fetch",r);Tp(n.replay,s)}catch(r){U&&H.exception(r,"Failed to capture fetch breadcrumb")}}function gk(e,t){const{input:n,response:r}=t,s=n?La(n):void 0,o=So(s),i=r?Ip(r.headers.get("content-length")):void 0;o!==void 0&&(e.data.request_body_size=o),i!==void 0&&(e.data.response_body_size=i)}async function _k(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r}=t,{url:i,method:a,status_code:c=0,request_body_size:u,response_body_size:d}=e.data,l=qs(i,n.networkDetailAllowUrls)&&!qs(i,n.networkDetailDenyUrls),p=l?yk(n,t.input,u):pr(u),f=await Sk(l,n,t.response,d);return{startTimestamp:s,endTimestamp:o,url:i,method:a,statusCode:c,request:p,response:f}}function yk({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?vk(n,t):{};if(!e)return Lt(s,r,void 0);const o=La(n),[i,a]=Fs(o,H),c=Lt(s,r,i);return a?zs(c,a):c}async function Sk(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&s!==void 0)return pr(s);const o=r?kp(r.headers,n):{};if(!r||!t&&s!==void 0)return Lt(o,s,void 0);const[i,a]=await Ek(r),c=bk(i,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:o});return a?zs(c,a):c}function bk(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const o=e?.length&&n===void 0?So(e):n;return r?t?Lt(s,o,e):Lt(s,o,void 0):pr(o)}catch(o){return U&&H.exception(o,"Failed to serialize response body"),Lt(s,n,void 0)}}async function Ek(e){const t=Tk(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await Ik(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(U&&H.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(U&&H.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function kp(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function vk(e,t){return e.length===1&&typeof e[0]!="string"?el(e[0],t):e.length===2?el(e[1],t):{}}function el(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?kp(n,t):Array.isArray(n)?{}:Mi(n,t):{}}function Tk(e){try{return e.clone()}catch(t){U&&H.exception(t,"Failed to clone response body")}}function Ik(e){return new Promise((t,n)=>{const r=Mr(()=>n(new Error("Timeout while trying to read response body")),500);wk(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function wk(e){return await e.text()}async function kk(e,t,n){try{const r=Rk(e,t,n),s=wp("resource.xhr",r);Tp(n.replay,s)}catch(r){U&&H.exception(r,"Failed to capture xhr breadcrumb")}}function Ck(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=So(r),o=n.getResponseHeader("content-length")?Ip(n.getResponseHeader("content-length")):Mk(n.response,n.responseType);s!==void 0&&(e.data.request_body_size=s),o!==void 0&&(e.data.response_body_size=o)}function Rk(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r,input:i,xhr:a}=t,{url:c,method:u,status_code:d=0,request_body_size:l,response_body_size:p}=e.data;if(!c)return null;if(!a||!qs(c,n.networkDetailAllowUrls)||qs(c,n.networkDetailDenyUrls)){const k=pr(l),b=pr(p);return{startTimestamp:s,endTimestamp:o,url:c,method:u,statusCode:d,request:k,response:b}}const f=a[pt],h=f?Mi(f.request_headers,n.networkRequestHeaders):{},g=Mi(Af(a),n.networkResponseHeaders),[_,y]=n.networkCaptureBodies?Fs(i,H):[void 0],[S,O]=n.networkCaptureBodies?Ak(a):[void 0],v=Lt(h,l,_),N=Lt(g,p,S);return{startTimestamp:s,endTimestamp:o,url:c,method:u,statusCode:d,request:y?zs(v,y):v,response:O?zs(N,O):N}}function Ak(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return xk(e.response,e.responseType)}catch(n){t.push(n)}return U&&H.warn("Failed to get xhr response body",...t),[void 0]}function xk(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return U&&H.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return U&&H.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Mk(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return So(n)}catch{return}}function Ok(e){const t=x();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:i}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",(c,u)=>Nk(a,c,u))}catch{}}function Nk(e,t,n){if(t.data)try{Lk(t)&&Dk(n)&&(Ck(t,n),kk(t,n,e)),Pk(t)&&Fk(n)&&(gk(t,n),mk(t,n,e))}catch(r){U&&H.exception(r,"Error when enriching network breadcrumb")}}function Lk(e){return e.category==="xhr"}function Pk(e){return e.category==="fetch"}function Dk(e){return e?.xhr}function Fk(e){return e?.response}function $k(e){const t=x();Cf(mw(e)),po(lk(e)),tk(e),Ok(e);const n=ck(e);tg(n),t&&(t.on("beforeSendEvent",Zw(e)),t.on("afterSendEvent",Kw(e)),t.on("createDsc",r=>{const s=e.getSessionId();s&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=s)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,s)=>{const o=e.getSessionId();s?.includeReplay&&e.isEnabled()&&o&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=o)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function Bk(e){try{return Promise.all(yo(e,[Uk(ue.performance.memory)]))}catch{return[]}}function Uk(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Hk(e,t,n){return Qg(e,t,{...n,setTimeoutImpl:Mr})}const Kr=$.navigator;function Wk(){return/iPhone|iPad|iPod/i.test(Kr?.userAgent??"")||/Macintosh/i.test(Kr?.userAgent??"")&&Kr?.maxTouchPoints&&Kr?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function jk(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){U&&H.warn("Received replay event after session expired.");return}const s=r||!t;t=!0,e.clickDetector&&lw(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!Ya(e,n,s))return!0;if(!s)return!1;const o=e.session;if(qk(e,s),e.recordingMode==="buffer"&&o&&e.eventBuffer&&!o.dirty){const i=e.eventBuffer.getEarliestTimestamp();i&&(U&&H.log(`Updating session start time to earliest event in buffer to ${new Date(i)}`),o.started=i,e.getOptions().stickySession&&_o(o))}return o?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function zk(e){const t=e.getOptions();return{type:V.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 qk(e,t){!t||!e.session||e.session.segmentId!==0||Ya(e,zk(e),!1)}function Gk(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Vk(e,t,n,r){return tt(sd(e,Xs(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function Yk({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
496
+ `;if(typeof e=="string")n=`${r}${e}`;else{const o=new TextEncoder().encode(r);n=new Uint8Array(o.length+e.length),n.set(o),n.set(e,o.length)}return n}async function Jk({client:e,scope:t,replayId:n,event:r}){const s=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,o={event_id:n,integrations:s};e.emit("preprocessEvent",r,o);const i=await cd(e.getOptions(),r,o,t,e,ve());if(!i)return null;e.emit("postprocessEvent",i,o),i.platform=i.platform||"javascript";const a=e.getSdkMetadata(),{name:c,version:u,settings:d}=a?.sdk||{};return i.sdk={...i.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0",settings:d},i}async function Kk({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:o}){const i=Yk({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:d}=r,l=x(),p=q(),f=l?.getTransport(),h=l?.getDsn();if(!l||!f||!h||!o.sampled)return Promise.resolve({});const g={type:C0,replay_start_timestamp:d/1e3,timestamp:s/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:o.sampled},_=await Jk({scope:p,client:l,replayId:t,event:g});if(!_)return l.recordDroppedEvent("event_processor","replay"),U&&H.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete _.sdkProcessingMetadata;const y=Vk(_,i,h,l.getOptions().tunnel);let S;try{S=await f.send(y)}catch(v){const N=new Error(Da);try{N.cause=v}catch{}throw N}if(typeof S.statusCode=="number"&&(S.statusCode<200||S.statusCode>=300))throw new Cp(S.statusCode);const O=kd({},S);if(wd(O,"replay"))throw new Ka(O);return S}class Cp extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Ka extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function Rp(e,t={count:0,interval:N0}){const{recordingData:n,onError:r}=e;if(n.length)try{return await Kk(e),!0}catch(s){if(s instanceof Cp||s instanceof Ka)throw s;if(Qm("Replays",{_retryCount:t.count}),r&&r(s),t.count>=L0){const o=new Error(`${Da} - max retries exceeded`);try{o.cause=s}catch{}throw o}return t.interval*=++t.count,new Promise((o,i)=>{Mr(async()=>{try{await Rp(e,t),o(!0)}catch(a){i(a)}},t.interval)})}}const Ap="__THROTTLED",Xk="__SKIPPED";function Qk(e,t,n){const r=new Map,s=a=>{const c=a-n;r.forEach((u,d)=>{d<c&&r.delete(d)})},o=()=>[...r.values()].reduce((a,c)=>a+c,0);let i=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(s(c),o()>=t){const d=i;return i=!0,d?Xk:Ap}i=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class Zk{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:R0,sessionIdleExpire:A0},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=Hk(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Qk((i,a)=>Vw(this,i,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),o=r?{threshold:Math.min(P0,r),timeout:r,scrollTimeout:D0,ignoreSelector:s?s.join(","):""}:void 0;if(o&&(this.clickDetector=new iw(this,o)),U){const i=t._experiments;H.setConfig({captureExceptions:!!i.captureExceptions,traceInternals:!!i.traceInternals})}this._handleVisibilityChange=()=>{ue.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const i=ot({category:"ui.blur"});this._doChangeToBackgroundTasks(i)},this._handleWindowFocus=()=>{const i=ot({category:"ui.focus"});this._doChangeToForegroundTasks(i)},this._handleKeyboardEvent=i=>{Sw(this,i)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){U&&H.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,s=n<=0&&r<=0;if(this._requiresManualStart=s,!s){if(this._initializeSessionForSampling(t),!this.session){U&&H.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",U&&H.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){U&&H.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){U&&H.log("Buffering is in progress, call `flush()` to save the replay");return}U&&H.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Vo({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){U&&H.log("Buffering is in progress, call `flush()` to save the replay");return}U&&H.infoTick("Starting replay in buffer mode");const t=Vo({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=mt({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:O0}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:jk(this),...Wk(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{U&&H.log(`Stopping Replay${n?` triggered by ${n}`:""}`),vp(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,Ww(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),U&&H.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),U&&H.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();U&&H.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode==="buffer"||!this._isEnabled||n!==!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(t){if(!(t&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Ai(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${ue.location.pathname}${ue.location.hash}${ue.location.search}`,n=`${ue.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===Ap){const s=ot({category:"replay.throttled"});this.addUpdate(()=>!Ya(this,{type:ZI,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||be(),n=t&&Se(t),s=(n&&z(n).data||{})[je];if(!(!n||!s||!["route","custom"].includes(s)))return z(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Bw({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Vo({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return yp(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{ue.document.addEventListener("visibilitychange",this._handleVisibilityChange),ue.addEventListener("blur",this._handleWindowBlur),ue.addEventListener("focus",this._handleWindowFocus),ue.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||($k(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=Ow(this)}_removeListeners(){try{ue.document.removeEventListener("visibilitychange",this._handleVisibilityChange),ue.removeEventListener("blur",this._handleWindowBlur),ue.removeEventListener("focus",this._handleWindowFocus),ue.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||_p(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){U&&H.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:V.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=Tw(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(yo(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){U&&H.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await Bk(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await Rp({replayId:t,recordingData:o,segmentId:s,eventContext:r,session:this.session,timestamp:n,onError:i=>this.handleException(i)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});const r=x();if(r){const s=n instanceof Ka?"ratelimit_backoff":"send_error";r.recordDroppedEvent(s,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){U&&H.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,s=Date.now()-n;this._debouncedFlush.cancel();const o=s<this._options.minReplayDuration,i=s>this._options.maxReplayDuration+5e3;if(o||i){U&&H.log(`Session duration (${Math.floor(s/1e3)}s) is too ${o?"short":"long"}, not sending replay.`),o&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&U&&H.log("Flushing initial segment without checkout.");const c=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,c&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&_o(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(a=>{const c=Gk(a.target),u=n.join(",");return c?.matches(u)}))return!1;const r=t.length,s=this._options.mutationLimit,o=this._options.mutationBreadcrumbLimit,i=s&&r>s;if(r>o||i){const a=ot({category:"replay.mutations",data:{count:r,limit:i}});this._createCustomBreadcrumb(a)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function er(e,t){return[...e,...t].join(",")}function e1({mask:e,unmask:t,block:n,unblock:r,ignore:s}){const o=["base","iframe[srcdoc]:not([src])"],i=er(e,[".sentry-mask","[data-sentry-mask]"]),a=er(t,[]);return{maskTextSelector:i,unmaskTextSelector:a,blockSelector:er(n,[".sentry-block","[data-sentry-block]",...o]),unblockSelector:er(r,[]),ignoreSelector:er(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function t1({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:o}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?o:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o}const tl='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',n1=["content-length","content-type","accept"];let nl=!1;const bR=(e=>new r1(e));class r1{constructor({flushMinDelay:t=x0,flushMaxDelay:n=M0,minReplayDuration:r=F0,maxReplayDuration:s=Lu,stickySession:o=!0,useCompression:i=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:d=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:p=750,mutationLimit:f=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:g=[],networkDetailAllowUrls:_=[],networkDetailDenyUrls:y=[],networkCaptureBodies:S=!0,networkRequestHeaders:O=[],networkResponseHeaders:v=[],mask:N=[],maskAttributes:k=["title","placeholder","aria-label"],unmask:b=[],block:I=[],unblock:E=[],ignore:C=[],maskFn:D,beforeAddRecordingEvent:w,beforeErrorSampling:A,onError:G}={}){this.name="Replay";const K=e1({mask:N,unmask:b,block:I,unblock:E,ignore:C});if(this._recordingOptions={maskAllInputs:d,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:D,maskInputFn:D,maskAttributeFn:(X,F,L)=>t1({maskAttributes:k,maskAllText:u,privacyOptions:K,key:X,value:F,el:L}),...K,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:X=>{try{X.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!c.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,$0),maxReplayDuration:Math.min(s,Lu),stickySession:o,useCompression:i,workerUrl:a,blockAllMedia:l,maskAllInputs:d,maskAllText:u,mutationBreadcrumbLimit:p,mutationLimit:f,slowClickTimeout:h,slowClickIgnoreSelectors:g,networkDetailAllowUrls:_,networkDetailDenyUrls:y,networkCaptureBodies:S,networkRequestHeaders:rl(O),networkResponseHeaders:rl(v),beforeAddRecordingEvent:w,beforeErrorSampling:A,onError:G,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${tl}`:tl),this._isInitialized&&xs())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return nl}set _isInitialized(t){nl=t}afterAllSetup(t){!xs()||this._replay||(this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(t){if(this._replay?.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=s1(this._initialOptions,t);this._replay=new Zk({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function s1(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},s=nn(n.replaysSessionSampleRate),o=nn(n.replaysOnErrorSampleRate);return s==null&&o==null&&$t(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),s!=null&&(r.sessionSampleRate=s),o!=null&&(r.errorSampleRate=o),r}function rl(e){return[...n1,...e.map(t=>t.toLowerCase())]}function ER(){return x()?.getIntegrationByName("Replay")}var o1=Object.defineProperty,i1=(e,t,n)=>t in e?o1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sl=(e,t,n)=>i1(e,typeof t!="symbol"?t+"":t,n);class a1{constructor(){sl(this,"idNodeMap",new Map),sl(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function c1(){return new a1}function u1(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Oi(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Oi(e.parentNode,t,n,r+1)}function ol(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(u1(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const _n=`Please stop import mirror directly. Instead of that,\r
497
497
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
498
- or you can use record.mirror to access the mirror instance during recording.`;let gl={map:{},getId(){return console.error(Tn),-1},getNode(){return console.error(Tn),null},removeNodeFromMap(){console.error(Tn)},has(){return console.error(Tn),!1},reset(){console.error(Tn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(gl=new Proxy(gl,{get(e,t,n){return t==="map"&&console.error(Tn),Reflect.get(e,t,n)}}));function ac(e,t,n,r,s=window){const o=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(i){qp(()=>{n.set.call(this,i)},0),o&&o.set&&o.set.call(this,i)}}),()=>ac(e,t,o||{},!0)}function cc(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function R1(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Ro(e,t,n,r,s){if(!e)return!1;const o=R1(e);if(!o)return!1;const i=ml(t,n),a=Wi(o,i);let c=-1;return a<0?!1:(r&&(c=Wi(o,ml(null,r))),a>-1&&c<0?!0:a<c)}const _l={};function zp(e){const t=_l[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const o=s.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(s)}catch{}return _l[e]=r.bind(window)}function Kt(...e){return zp("requestAnimationFrame")(...e)}function qp(...e){return zp("setTimeout")(...e)}var qn=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(qn||{});let vs;function A1(e){vs=e}const ni=e=>vs?(...n)=>{try{return e(...n)}catch(r){if(vs&&vs(r)===!0)return()=>{};throw r}}:e;var Rn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",x1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var ss=0;ss<Rn.length;ss++)x1[Rn.charCodeAt(ss)]=ss;var M1=function(e){var t=new Uint8Array(e),n,r=t.length,s="";for(n=0;n<r;n+=3)s+=Rn[t[n]>>2],s+=Rn[(t[n]&3)<<4|t[n+1]>>4],s+=Rn[(t[n+1]&15)<<2|t[n+2]>>6],s+=Rn[t[n+2]&63];return r%3===2?s=s.substring(0,s.length-1)+"=":r%3===1&&(s=s.substring(0,s.length-2)+"=="),s};const yl=new Map;function O1(e,t){let n=yl.get(e);return n||(n=new Map,yl.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const Gp=(e,t,n)=>{if(!e||!(Yp(e,t)||typeof e=="object"))return;const r=e.constructor.name,s=O1(n,r);let o=s.indexOf(e);return o===-1&&(o=s.length,s.push(e)),o};function Ts(e,t,n){if(e instanceof Array)return e.map(r=>Ts(r,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){const r=e.constructor.name,s=M1(e);return{rr_type:r,base64:s}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Ts(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:s}=e;return{rr_type:r,src:s}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",s=e.toDataURL();return{rr_type:r,src:s}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Ts(e.data,t,n),e.width,e.height]};if(Yp(e,t)||typeof e=="object"){const r=e.constructor.name,s=Gp(e,t,n);return{rr_type:r,index:s}}}}return e}const Vp=(e,t,n)=>e.map(r=>Ts(r,t,n)),Yp=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof t[s]=="function").find(s=>e instanceof t[s]);function N1(e,t,n,r,s){const o=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of i)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const c=cc(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...d){return Ro(this.canvas,n,r,s,!0)||qp(()=>{const l=Vp(d,t,this);e(this.canvas,{type:qn["2D"],property:a,args:l})},0),u.apply(this,d)}});o.push(c)}catch{const c=ac(t.CanvasRenderingContext2D.prototype,a,{set(u){e(this.canvas,{type:qn["2D"],property:a,args:[u],setter:!0})}});o.push(c)}return()=>{o.forEach(a=>a())}}function L1(e){return e==="experimental-webgl"?"webgl":e}function Sl(e,t,n,r,s){const o=[];try{const i=cc(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!Ro(this,t,n,r,!0)){const d=L1(c);if("__context"in this||(this.__context=d),s&&["webgl","webgl2"].includes(d))if(u[0]&&typeof u[0]=="object"){const l=u[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});o.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(i=>i())}}function bl(e,t,n,r,s,o,i,a){const c=[],u=Object.getOwnPropertyNames(e);for(const d of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(d))try{if(typeof e[d]!="function")continue;const l=cc(e,d,function(p){return function(...f){const h=p.apply(this,f);if(Gp(h,a,this),"tagName"in this.canvas&&!Ro(this.canvas,r,s,o,!0)){const g=Vp(f,a,this),_={type:t,property:d,args:g};n(this.canvas,_)}return h}});c.push(l)}catch{const l=ac(e,d,{set(p){n(this.canvas,{type:t,property:d,args:[p],setter:!0})}});c.push(l)}return c}function P1(e,t,n,r,s,o){const i=[];return i.push(...bl(t.WebGLRenderingContext.prototype,qn.WebGL,e,n,r,s,o,t)),typeof t.WebGL2RenderingContext<"u"&&i.push(...bl(t.WebGL2RenderingContext.prototype,qn.WebGL2,e,n,r,s,o,t)),()=>{i.forEach(a=>a())}}const D1='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 F1(){const e=new Blob([D1]);return URL.createObjectURL(e)}class $1{constructor(t){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=(a,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(c)};const{enableManualSnapshot:n,sampling:r="all",win:s,recordCanvas:o,errorHandler:i}=t;t.sampling=r,this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,i&&A1(i),(o&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(s),!n&&ni(()=>{o&&r==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),o&&typeof r=="number"&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(t=>{try{t()}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(t){const{sampling:n="all",blockClass:r,blockSelector:s,unblockSelector:o,recordCanvas:i,enableManualSnapshot:a}=this.options;if(!this.windowsSet.has(t)){if(a){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}ni(()=>{if(i&&n==="all"&&this.initCanvasMutationObserver(t,r,s,o),i&&typeof n=="number"){const c=Sl(t,r,s,o,!0);this.restoreHandlers.push(()=>{c()})}})(),this.windowsSet.add(t),this.windows.push(new WeakRef(t))}}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(t,n){if(n?.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,t);return}Kt(r=>this.takeSnapshot(r,!0,t))}initFPSWorker(){const t=new Worker(F1());return t.onmessage=n=>{const r=n.data,{id:s}=r;if(this.snapshotInProgressMap.set(s,!1),!("base64"in r))return;const{base64:o,type:i,width:a,height:c}=r;this.mutationCb({id:s,type:qn["2D"],commands:[{property:"clearRect",args:[0,0,a,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:o}],type:i}]},0,0,a,c]}]})},t}initCanvasFPSObserver(){let t;if(!this.windows.length&&!this.shadowDoms.size)return;const n=r=>{this.takeSnapshot(r,!1),t=Kt(n)};t=Kt(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,s){const o=Sl(t,n,r,s,!1),i=N1(this.processMutation.bind(this),t,n,r,s),a=P1(this.processMutation.bind(this),t,n,r,s,this.mirror);this.restoreHandlers.push(()=>{o(),i(),a()})}getCanvasElements(t,n,r){const s=[],o=i=>{i.querySelectorAll("canvas").forEach(a=>{Ro(a,t,n,r)||s.push(a)})};for(const i of this.windows){const a=i.deref();let c;try{c=a&&a.document}catch{}c&&o(c)}for(const i of this.shadowDoms){const a=i.deref();a&&o(a)}return s}takeSnapshot(t,n,r){const{sampling:s,blockClass:o,blockSelector:i,unblockSelector:a,dataURLOptions:c,maxCanvasSize:u}=this.options,l=1e3/(s==="all"?2:s||2);return this.lastSnapshotTime&&t-this.lastSnapshotTime<l?!1:(this.lastSnapshotTime=t,(r?[r]:this.getCanvasElements(o,i,a)).forEach(h=>{const g=this.mirror.getId(h);if(!(!this.mirror.hasNode(h)||!h.width||!h.height||this.snapshotInProgressMap.get(g))){if(this.snapshotInProgressMap.set(g,!0),!n&&["webgl","webgl2"].includes(h.__context)){const _=h.getContext(h.__context);_?.getContextAttributes()?.preserveDrawingBuffer===!1&&_.clear(_.COLOR_BUFFER_BIT)}createImageBitmap(h).then(_=>{this.worker?.postMessage({id:g,bitmap:_,width:h.width,height:h.height,dataURLOptions:c,maxCanvasSize:u},[_])}).catch(_=>{ni(()=>{throw this.snapshotInProgressMap.delete(g),_})()})}}),!0)}startPendingCanvasMutationFlusher(){Kt(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,Kt(t)};Kt(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),Kt(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const s=r.map(i=>{const{type:a,...c}=i;return c}),{type:o}=r[0];this.mutationCb({id:n,type:o,commands:s}),this.pendingCanvasMutations.delete(t)}}try{if(Array.from([1],e=>e*2)[0]!==2){const 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)}k1();var El;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(El||(El={}));const vl={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}}},B1="ReplayCanvas",os=1280,U1=((e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,os):os,n?Math.min(n,os):os]};let s;const o=new Promise(i=>s=i);return{name:B1,getOptions(){const{quality:i,enableManualSnapshot:a,maxCanvasSize:c}=r;return{enableManualSnapshot:a,recordCanvas:!0,getCanvasManager:u=>{const d=new $1({...u,enableManualSnapshot:a,maxCanvasSize:c,errorHandler:l=>{try{typeof l=="object"&&(l.__rrweb__=!0)}catch{}}});return s(d),d},...vl[i]||vl.medium}},async snapshot(i,a){(await o).snapshot(i,a)}}}),BR=U1;function H1(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function Jp(e){try{return new URL(e,B.location.origin).href}catch{return}}function W1(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Kp(e){try{return new Headers(e)}catch{return}}const Tl=new WeakMap,ri=new Map,Xp={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function j1(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:o,enableHTTPTimings:i,tracePropagationTargets:a,onRequestSpanStart:c,onRequestSpanEnd:u}={...Xp,...t},d=typeof o=="function"?o:h=>!0,l=h=>z1(h,a),p={},f=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(h=>(h.type==="transaction"&&h.spans&&h.spans.forEach(g=>{if(g.op==="http.client"){const _=ri.get(g.span_id);_&&(g.timestamp=_/1e3,ri.delete(g.span_id))}}),h)),s&&db(h=>{if(h.response){const g=Tl.get(h.response);g&&h.endTimestamp&&ri.set(g,h.endTimestamp)}}),ka(h=>{const g=ky(h,d,l,p,{propagateTraceparent:f,onRequestSpanEnd:u});if(h.response&&h.fetchData.__span&&Tl.set(h.response,h.fetchData.__span),g){const _=Jp(h.fetchData.url),y=_?on(_).host:void 0;g.setAttributes({"http.url":_,"server.address":y}),i&&wl(g),c?.(g,{headers:h.headers})}})),r&&ja(h=>{const g=q1(h,d,l,p,f,u);g&&(i&&wl(g),c?.(g,{headers:Kp(h.xhr.__sentry_xhr_v3__?.request_headers)}))})}function wl(e){const{url:t}=z(e).data;if(!t||typeof t!="string")return;const n=hn("resource",({entries:r})=>{r.forEach(s=>{W1(s)&&s.name.endsWith(t)&&(e.setAttributes(Uf(s)),setTimeout(n))})})}function z1(e,t){const n=mn();if(n){let r,s;try{r=new URL(e,n),s=new URL(n).origin}catch{return!1}const o=r.origin===s;return t?Qe(r.toString(),t)||o&&Qe(r.pathname,t):o}else{const r=!!e.match(/^\/(?!\/)/);return t?Qe(e,t):r}}function q1(e,t,n,r,s,o){const i=e.xhr,a=i?.[_t];if(!i||i.__sentry_own_request__||!a)return;const{url:c,method:u}=a,d=Ge()&&t(c);if(e.endTimestamp&&d){const y=i.__sentry_xhr_span_id__;if(!y)return;const S=r[y];S&&a.status_code!==void 0&&(ks(S,a.status_code),S.end(),o?.(S,{headers:Kp(jf(i)),error:e.error}),delete r[y]);return}const l=Jp(c),p=on(l||c),f=Wd(c),h=!!Ee(),g=d&&h?Qn({name:`${u} ${f}`,attributes:{url:c,type:"xhr","http.method":u,"http.url":l,"server.address":p?.host,[de]:"auto.http.browser",[Ve]:"http.client",...p?.search&&{"http.query":p?.search},...p?.hash&&{"http.fragment":p?.hash}}}):new wt;i.__sentry_xhr_span_id__=g.spanContext().spanId,r[i.__sentry_xhr_span_id__]=g,n(c)&&G1(i,Ge()&&h?g:void 0,s);const _=x();return _&&_.emit("beforeOutgoingRequestSpan",g,e),g}function G1(e,t,n){const{"sentry-trace":r,baggage:s,traceparent:o}=zd({span:t,propagateTraceparent:n});r&&V1(e,r,s,o)}function V1(e,t,n,r){const s=e.__sentry_xhr_v3__?.request_headers;if(!(s?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!s?.traceparent&&e.setRequestHeader("traceparent",r),n){const o=s?.baggage;(!o||!H1(o))&&e.setRequestHeader("baggage",n)}}catch{}}function Y1(){B.document?B.document.addEventListener("visibilitychange",()=>{const e=Ee();if(!e)return;const t=be(e);if(B.document.hidden&&t){const n="cancelled",{op:r,status:s}=z(t);R&&m.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||t.setStatus({code:ne,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):R&&m.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const J1=3600,Qp="sentry_previous_trace",K1="sentry.previous_trace";function X1(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let s=r?eC():void 0;e.on("spanStart",i=>{if(be(i)!==i)return;const a=q().getPropagationContext();s=Q1(s,i,a),r&&Z1(s)});let o=!0;n&&e.on("beforeSampling",i=>{if(!s)return;const a=q(),c=a.getPropagationContext();if(o&&c.parentSpanId){o=!1;return}a.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(s.sampleRate),sampled:String(ji(s.spanContext))},sampleRand:s.sampleRand}),i.parentSampled=ji(s.spanContext),i.parentSampleRate=s.sampleRate,i.spanAttributes={...i.spanAttributes,[Ql]:s.sampleRate}})}function Q1(e,t,n){const r=z(t);function s(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[Ki])}catch{return 0}}const o={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:s(),sampleRand:n.sampleRand};if(!e)return o;const i=e.spanContext;return i.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=J1&&(R&&m.log(`Adding previous_trace ${i} link to span ${{op:r.op,...t.spanContext()}}`),t.addLink({context:i,attributes:{[Yh]:"previous_trace"}}),t.setAttribute(K1,`${i.traceId}-${i.spanId}-${ji(i)?1:0}`)),o)}function Z1(e){try{B.sessionStorage.setItem(Qp,JSON.stringify(e))}catch(t){R&&m.warn("Could not store previous trace in sessionStorage",t)}}function eC(){try{const e=B.sessionStorage?.getItem(Qp);return JSON.parse(e)}catch{return}}function ji(e){return e.traceFlags===1}const tC="BrowserTracing",nC={...fs,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...Xp},UR=((e={})=>{const t={name:void 0,source:void 0},n=B.document,{enableInp:r,enableElementTiming:s,enableLongTask:o,enableLongAnimationFrame:i,_experiments:{enableInteractions:a,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:u},beforeStartSpan:d,idleTimeout:l,finalTimeout:p,childSpanTimeout:f,markBackgroundSpan:h,traceFetch:g,traceXHR:_,trackFetchStreamPerformance:y,shouldCreateSpanForRequest:S,enableHTTPTimings:O,ignoreResourceSpans:v,ignorePerformanceApiSpans:N,instrumentPageLoad:k,instrumentNavigation:b,detectRedirects:w,linkPreviousTrace:E,consistentTraceSampling:C,enableReportPageLoaded:D,onRequestSpanStart:I,onRequestSpanEnd:A}={...nC,...e};let G,K,X;function F(L,P,M=!0){const J=P.op==="pageload",se=P.name,le=d?d(P):P,_e=le.attributes||{};if(se!==le.name&&(_e[ze]="custom",le.attributes=_e),!M){const Me=gn();Qn({...le,startTime:Me}).end(Me);return}t.name=le.name,t.source=_e[ze];const xe=bd(le,{idleTimeout:l,finalTimeout:p,childSpanTimeout:f,disableAutoFinish:J,beforeSpanEnd:Me=>{G?.(),$v(Me,{recordClsOnPageloadSpan:!c,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:v,ignorePerformanceApiSpans:N}),kl(L,void 0);const Le=q(),rt=Le.getPropagationContext();Le.setPropagationContext({...rt,traceId:xe.spanContext().traceId,sampled:Vt(xe),dsc:et(Me)}),J&&(X=void 0)},trimIdleSpanEndTimestamp:!D});J&&D&&(X=xe),kl(L,xe);function xt(){n&&["interactive","complete"].includes(n.readyState)&&L.emit("idleSpanEnableAutoFinish",xe)}J&&!D&&n&&(n.addEventListener("readystatechange",()=>{xt()}),xt())}return{name:tC,setup(L){if(ym(),G=Mv({recordClsStandaloneSpans:c||!1,recordLcpStandaloneSpans:u||!1,client:L}),r&&uT(),s&&Kv(),i&&$.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?Nv():o&&Ov(),a&&Lv(),w&&n){const M=()=>{K=he()};addEventListener("click",M,{capture:!0}),addEventListener("keydown",M,{capture:!0,passive:!0})}function P(){const M=Er(L);M&&!z(M).timestamp&&(R&&m.log(`[Tracing] Finishing current active span with op: ${z(M).op}`),M.setAttribute(hr,"cancelled"),M.end())}L.on("startNavigationSpan",(M,J)=>{if(x()!==L)return;if(J?.isRedirect){R&&m.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),F(L,{op:"navigation.redirect",...M},!1);return}K=void 0,P(),Te().setPropagationContext({traceId:ft(),sampleRand:Math.random(),propagationSpanId:Ge()?void 0:yt()});const se=q();se.setPropagationContext({traceId:ft(),sampleRand:Math.random(),propagationSpanId:Ge()?void 0:yt()}),se.setSDKProcessingMetadata({normalizedRequest:void 0}),F(L,{op:"navigation",...M,parentSpan:null,forceTransaction:!0})}),L.on("startPageLoadSpan",(M,J={})=>{if(x()!==L)return;P();const se=J.sentryTrace||Il("sentry-trace"),le=J.baggage||Il("baggage"),_e=ad(se,le),xe=q();xe.setPropagationContext(_e),Ge()||(xe.getPropagationContext().propagationSpanId=yt()),xe.setSDKProcessingMetadata({normalizedRequest:Oa()}),F(L,{op:"pageload",...M})}),L.on("endPageloadSpan",()=>{D&&X&&(X.setAttribute(hr,"reportPageLoaded"),X.end())})},afterAllSetup(L){let P=mn();if(E!=="off"&&X1(L,{linkPreviousTrace:E,consistentTraceSampling:C}),B.location){if(k){const M=Ae();rC(L,{name:B.location.pathname,startTime:M?M/1e3:void 0,attributes:{[ze]:"url",[de]:"auto.pageload.browser"}})}b&&Eo(({to:M,from:J})=>{if(J===void 0&&P?.indexOf(M)!==-1){P=void 0;return}P=void 0;const se=fa(M),le=Er(L),_e=le&&w&&iC(le,K);sC(L,{name:se?.pathname||B.location.pathname,attributes:{[ze]:"url",[de]:"auto.navigation.browser"}},{url:M,isRedirect:_e})})}h&&Y1(),a&&oC(L,l,p,f,t),r&&fT(),j1(L,{traceFetch:g,traceXHR:_,trackFetchStreamPerformance:y,tracePropagationTargets:L.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:S,enableHTTPTimings:O,onRequestSpanStart:I,onRequestSpanEnd:A})}}});function rC(e,t,n){e.emit("startPageLoadSpan",t,n),q().setTransactionName(t.name);const r=Er(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function sC(e,t,n){const{url:r,isRedirect:s}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:s}),e.emit("startNavigationSpan",t,{isRedirect:s});const o=q();return o.setTransactionName(t.name),r&&!s&&o.setSDKProcessingMetadata({normalizedRequest:{...Oa(),url:r}}),Er(e)}function Il(e){return B.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function oC(e,t,n,r,s){const o=B.document;let i;const a=()=>{const c="ui.action.click",u=Er(e);if(u){const d=z(u).op;if(["navigation","pageload"].includes(d)){R&&m.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(i&&(i.setAttribute(hr,"interactionInterrupted"),i.end(),i=void 0),!s.name){R&&m.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}i=bd({name:s.name,op:c,attributes:{[ze]:s.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};o&&addEventListener("click",a,{capture:!0})}const Zp="_sentry_idleSpan";function Er(e){return e[Zp]}function kl(e,t){Fe(e,Zp,t)}const Cl=1.5;function iC(e,t){const n=z(e),r=gn(),s=n.start_timestamp;return!(r-s>Cl||t&&r-t<=Cl)}function HR(e=x()){e?.emit("endPageloadSpan")}function WR(e){const t=Ee();if(t===e)return;const n=q();e.end=new Proxy(e.end,{apply(r,s,o){return Tt(n,t),Reflect.apply(r,s,o)}}),Tt(n,e)}function Gn(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function aC(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=Gn(n);return s=>r.then(o=>s(o.transaction(t,"readwrite").objectStore(t)))}function uc(e){return Gn(e.getAllKeys())}function cC(e,t,n){return e(r=>uc(r).then(s=>{if(!(s.length>=n))return r.put(t,Math.max(...s,0)+1),Gn(r.transaction)}))}function uC(e,t,n){return e(r=>uc(r).then(s=>{if(!(s.length>=n))return r.put(t,Math.min(...s,0)-1),Gn(r.transaction)}))}function lC(e){return e(t=>uc(t).then(n=>{const r=n[0];if(r!=null)return Gn(t.get(r)).then(s=>(t.delete(r),Gn(t.transaction).then(()=>s)))}))}function dC(e){let t;function n(){return t==null&&(t=aC(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const s=await xs(r);await cC(n(),s,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{const s=await xs(r);await uC(n(),s,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await lC(n());if(r)return Am(r)}catch{}}}}function fC(e){return t=>{const n=e({...t,createStore:dC});return B.addEventListener("online",async r=>{await n.flush()}),n}}function jR(e=zf){return fC(r_(e))}const Rl=1e6,pC="window"in $&&$.window===$&&typeof importScripts>"u",Ut=String(0),eo=pC?"main":"worker",to=B.navigator;let eh="",th="",nh="",zi=to?.userAgent||"",rh="";const hC=to?.language||to?.languages?.[0]||"";function mC(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const Al=to?.userAgentData;mC(Al)&&Al.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(eh=e.platform||"",nh=e.architecture||"",rh=e.model||"",th=e.platformVersion||"",e.fullVersionList?.length){const t=e.fullVersionList[e.fullVersionList.length-1];zi=`${t.brand} ${t.version}`}}).catch(e=>{});function gC(e){return!("thread_metadata"in e)}function _C(e){return gC(e)?TC(e):e}function yC(e){const t=e.contexts?.trace?.trace_id;return typeof t=="string"&&t.length!==32&&R&&m.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function SC(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const s=yC(r),o=_C(n),i=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:he()*1e3),a=typeof r.timestamp=="number"?r.timestamp*1e3:he()*1e3;return{event_id:e,timestamp:new Date(i).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||so,runtime:{name:"javascript",version:B.navigator.userAgent},os:{name:eh,version:th,build_number:zi},device:{locale:hC,model:rh,manufacturer:zi,architecture:nh,is_emulator:!1},debug_meta:{images:oh(n.resources)},profile:o,transactions:[{name:r.transaction||"",id:r.event_id||ve(),trace_id:s,active_thread_id:Ut,relative_start_ns:"0",relative_end_ns:((a-i)*1e6).toFixed(0)}]}}function bC(e,t,n){if(e==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);const r=vC(e),s=t.getOptions(),o=t.getSdkMetadata?.()?.sdk;return{chunk_id:ve(),client_sdk:{name:o?.name??"sentry.javascript.browser",version:o?.version??"0.0.0"},profiler_id:n||ve(),platform:"javascript",version:"2",release:s.release??"",environment:s.environment??"production",debug_meta:{images:oh(e.resources)},profile:r}}function EC(e){try{if(!e||typeof e!="object")return{reason:"chunk is not an object"};const t=r=>typeof r=="string"&&/^[a-f0-9]{32}$/.test(r);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"};const 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(t){return{reason:`unknown validation error: ${t}`}}}function vC(e){const t=[];for(let a=0;a<e.frames.length;a++){const c=e.frames[a];c&&(t[a]={function:c.name,abs_path:typeof c.resourceId=="number"?e.resources[c.resourceId]:void 0,lineno:c.line,colno:c.column})}const n=[];for(let a=0;a<e.stacks.length;a++){const c=e.stacks[a];if(!c)continue;const u=[];let d=c;for(;d;)u.push(d.frameId),d=d.parentId===void 0?void 0:e.stacks[d.parentId];n[a]=u}const r=Ae(),s=typeof performance.timeOrigin=="number"?performance.timeOrigin:r||0,o=s-(r||s),i=[];for(let a=0;a<e.samples.length;a++){const c=e.samples[a];if(!c)continue;const u=(s+(c.timestamp-o))/1e3;i[a]={stack_id:c.stackId??0,thread_id:Ut,timestamp:u}}return{frames:t,stacks:n,samples:i,thread_metadata:{[Ut]:{name:eo}}}}function sh(e){return z(e).op==="pageload"}function TC(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Ut]:{name:eo}}},s=e.samples[0];if(!s)return r;const o=s.timestamp,i=Ae(),a=typeof performance.timeOrigin=="number"?performance.timeOrigin:i||0,c=a-(i||a);return e.samples.forEach((u,d)=>{if(u.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[d]={elapsed_since_start_ns:((u.timestamp+c-o)*Rl).toFixed(0),stack_id:t,thread_id:Ut};return}let l=e.stacks[u.stackId];const p=[];for(;l;){p.push(l.frameId);const h=e.frames[l.frameId];h&&r.frames[l.frameId]===void 0&&(r.frames[l.frameId]={function:h.name,abs_path:typeof h.resourceId=="number"?e.resources[h.resourceId]:void 0,lineno:h.line,colno:h.column}),l=l.parentId===void 0?void 0:e.stacks[l.parentId]}const f={elapsed_since_start_ns:((u.timestamp+c-o)*Rl).toFixed(0),stack_id:n,thread_id:Ut};r.stacks[n]=p,r.samples[d]=f,n++}),r}function wC(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function IC(e){const t=[];return ln(e,(n,r)=>{if(r==="transaction")for(let s=1;s<n.length;s++)n[s]?.contexts?.profile?.profile_id&&t.push(n[s])}),t}function oh(e){const r=x()?.getOptions()?.stackParser;return r?og(r,e):[]}function ih(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(R&&m.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?(R&&m.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function kC(e){return e.samples.length<2?(R&&m.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(R&&m.log("[Profiling] Discarding profile because it contains no frames"),!1)}let lc=!1;const ah=3e4;function CC(e){return typeof e=="function"}function ch(){const e=B.Profiler;if(!CC(e)){R&&m.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(ah/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{R&&(m.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),m.log("[Profiling] Disabling profiling for current user session.")),lc=!0}}function xl(e){if(lc)return R&&m.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return R&&m.log("[Profiling] Discarding profile because root span was not sampled."),!1;const n=x()?.getOptions();if(!n)return R&&m.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return ih(r)?r?(r===!0?!0:Math.random()<r)?!0:(R&&m.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(R&&m.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(R&&m.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function RC(e){if(lc)return R&&m.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(e.profileLifecycle!=="trace")return!1;const t=e.profileSessionSampleRate;return ih(t)?t?Math.random()<=t:(R&&m.log("[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0"),!1):(R&&m.warn("[Profiling] Discarding profile because of invalid profileSessionSampleRate."),!1)}function is(e){return typeof e.profilesSampleRate<"u"}function AC(e,t,n,r){return kC(n)?SC(e,t,n,r):null}const nn=new Map;function xC(){return nn.size}function MC(e){const t=nn.get(e);return t&&nn.delete(e),t}function OC(e,t){if(nn.set(e,t),nn.size>30){const n=nn.keys().next().value;n!==void 0&&nn.delete(n)}}function NC(e){return!e?.contexts?.profile||!e.contexts||(e.contexts.trace={...e.contexts?.trace??{},data:{...e.contexts?.trace?.data??{},"thread.id":Ut,"thread.name":eo}},e.spans?.forEach(t=>{t.data={...t.data||{},"thread.id":Ut,"thread.name":eo}})),e}const LC=6e4,PC=3e5;class DC{constructor(){this._client=void 0,this._profiler=void 0,this._chunkTimer=void 0,this._activeRootSpanIds=new Set,this._rootSpanTimeouts=new Map,this._profilerId=void 0,this._isRunning=!1,this._sessionSampled=!1}initialize(t,n){this._profilerId=ve(),R&&m.log("[Profiling] Initializing profiler (lifecycle='trace')."),this._client=t,this._sessionSampled=n,t.on("spanStart",r=>{if(!this._sessionSampled){R&&m.log("[Profiling] Session not sampled because of negative sampling decision.");return}if(r!==be(r))return;if(!r.isRecording()){R&&m.log("[Profiling] Discarding profile because root span was not sampled.");return}Pn().setContext("profile",{profiler_id:this._profilerId});const s=r.spanContext().spanId;if(!s||this._activeRootSpanIds.has(s))return;this._activeRootSpanIds.add(s);const o=this._activeRootSpanIds.size,i=setTimeout(()=>{this._onRootSpanTimeout(s)},PC);this._rootSpanTimeouts.set(s,i),o===1&&(R&&m.log(`[Profiling] Root span with ID ${s} started. Will continue profiling for as long as there are active root spans (currently: ${o}).`),this.start())}),t.on("spanEnd",r=>{if(!this._sessionSampled)return;const s=r.spanContext().spanId;if(!s||!this._activeRootSpanIds.has(s))return;this._activeRootSpanIds.delete(s);const o=this._activeRootSpanIds.size;R&&m.log(`[Profiling] Root span with ID ${s} ended. Will continue profiling for as long as there are active root spans (currently: ${o}).`),o===0&&(this._collectCurrentChunk().catch(i=>{R&&m.error("[Profiling] Failed to collect current profile chunk on `spanEnd`:",i)}),this.stop())})}notifyRootSpanActive(t){if(!this._sessionSampled)return;const n=t.spanContext().spanId;if(!n||this._activeRootSpanIds.has(n))return;this._activeRootSpanIds.add(n);const r=this._activeRootSpanIds.size;r===1&&(R&&m.log("[Profiling] Detected already active root span during setup. Active root spans now:",r),this.start())}start(){if(!this._isRunning){if(this._isRunning=!0,R&&m.log("[Profiling] Started profiling with profile ID:",this._profilerId),this._startProfilerInstance(),!this._profiler){R&&m.log("[Profiling] Stopping trace lifecycle profiling."),this._resetProfilerInfo();return}this._startPeriodicChunking()}}stop(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&(clearTimeout(this._chunkTimer),this._chunkTimer=void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(t=>{R&&m.error("[Profiling] Failed to collect current profile chunk on `stop()`:",t)}))}_resetProfilerInfo(){this._isRunning=!1,Pn().setContext("profile",{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(t=>clearTimeout(t)),this._rootSpanTimeouts.clear()}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;const t=ch();if(!t){R&&m.log("[Profiling] Failed to start JS Profiler in trace lifecycle.");return}this._profiler=t}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(t=>{R&&m.error("[Profiling] Failed to collect current profile chunk during periodic chunking:",t)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},LC))}_onRootSpanTimeout(t){if(!this._rootSpanTimeouts.has(t)||(this._rootSpanTimeouts.delete(t),!this._activeRootSpanIds.has(t)))return;R&&m.log(`[Profiling] Reached 5-minute timeout for root span ${t}. You likely started a manual root span that never called \`.end()\`.`),this._activeRootSpanIds.delete(t),this._activeRootSpanIds.size===0&&this.stop()}async _collectCurrentChunk(){const t=this._profiler;if(this._profiler=void 0,!!t)try{const n=await t.stop(),r=bC(n,this._client,this._profilerId),s=EC(r);if("reason"in s){R&&m.log("[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):",s.reason);return}this._sendProfileChunk(r),R&&m.log("[Profiling] Collected browser profile chunk.")}catch(n){R&&m.log("[Profiling] Error while stopping JS Profiler for chunk:",n)}}_sendProfileChunk(t){const n=this._client,r=oo(n.getSdkMetadata?.()),s=n.getDsn(),o=n.getOptions().tunnel,i=nt({event_id:ve(),sent_at:new Date().toISOString(),...r&&{sdk:r},...!!o&&s&&{dsn:At(s)}},[[{type:"profile_chunk"},t]]);n.sendEnvelope(i).then(null,a=>{R&&m.error("Error while sending profile chunk envelope:",a)})}}function Ml(e){let t;sh(e)&&(t=he()*1e3);const n=ch();if(!n)return;R&&m.log(`[Profiling] started profiling span: ${z(e).description}`);const r=ve();let s=null;q().setContext("profile",{profile_id:r,start_timestamp:t});async function o(){if(e&&n){if(s){R&&m.log("[Profiling] profile for:",z(e).description,"already exists, returning early");return}return n.stop().then(u=>{if(i&&(B.clearTimeout(i),i=void 0),R&&m.log(`[Profiling] stopped profiling of span: ${z(e).description}`),!u){R&&m.log(`[Profiling] profiler returned null profile for: ${z(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}s=u,OC(r,u)}).catch(u=>{R&&m.log("[Profiling] error while stopping profiler:",u)})}}let i=B.setTimeout(()=>{R&&m.log("[Profiling] max profile duration elapsed, stopping profiling for:",z(e).description),o()},ah);const a=e.end.bind(e);function c(){return e?(o().then(()=>{a()},()=>{a()}),e):a()}e.end=c}const FC="BrowserProfiling",$C=(()=>({name:FC,setup(e){const t=e.getOptions();if(!is(t)&&!t.profileLifecycle&&(t.profileLifecycle="manual"),is(t)&&!t.profilesSampleRate){R&&m.log("[Profiling] Profiling disabled, no profiling options found.");return}const n=Ee(),r=n&&be(n);if(is(t)&&t.profileSessionSampleRate!==void 0&&R&&m.warn("[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled."),is(t))r&&sh(r)&&xl(r)&&Ml(r),e.on("spanStart",s=>{s===be(s)&&xl(s)&&Ml(s)}),e.on("beforeEnvelope",s=>{if(!xC())return;const o=IC(s);if(!o.length)return;const i=[];for(const a of o){const c=a?.contexts,u=c?.profile?.profile_id,d=c?.profile?.start_timestamp;if(typeof u!="string"){R&&m.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!u){R&&m.log("[Profiling] cannot find profile for a span without a profile context");continue}c?.profile&&delete c.profile;const l=MC(u);if(!l){R&&m.log(`[Profiling] Could not retrieve profile for span: ${u}`);continue}const p=AC(u,d,l,a);p&&i.push(p)}wC(s,i)});else{const s=RC(t);if(s||R&&m.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),t.profileLifecycle==="trace"){if(!Ge(t)){R&&m.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.");return}const i=new DC;i.initialize(e,s),r&&i.notifyRootSpanActive(r),B.setTimeout(()=>{const a=Ee(),c=a&&be(a);c&&i.notifyRootSpanActive(c)},0)}}},processEvent(e){return NC(e)}})),zR=$C,BC="SpotlightBrowser",UC=((e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:BC,setup:()=>{R&&m.log("Using Sidecar URL",t)},processEvent:n=>WC(n)?null:n,afterAllSetup:n=>{HC(n,t)}}});function HC(e,t){const n=Wa("fetch");let r=0;e.on("beforeEnvelope",s=>{if(r>3){m.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:xs(s),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(o=>{o.status>=200&&o.status<400&&(r=0)},o=>{r++,m.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",o)})})}const qR=UC;function WC(e){return!!(e.type==="transaction"&&e.spans&&e.contexts?.trace&&e.contexts.trace.op==="ui.action.click"&&e.spans.some(({description:t})=>t?.includes("#sentry-spotlight")))}const GR=()=>({name:"LaunchDarkly",processEvent(e,t,n){return Zn(e)}});function VR(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{dn(e,t.value),fn(e,t.value)}}}const YR=()=>({name:"OpenFeature",processEvent(e,t,n){return Zn(e)}});class JR{after(t,n){dn(n.flagKey,n.value),fn(n.flagKey,n.value)}error(t,n,r){dn(t.flagKey,t.defaultValue),fn(t.flagKey,t.defaultValue)}}const KR=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;ke(t,"isEnabled",jC)},processEvent(t,n,r){return Zn(t)}});function jC(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(dn(n,r),fn(n,r)):R&&m.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const XR=(({growthbookClass:e})=>Iy({growthbookClass:e})),QR=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{dn(n.gate.name,n.gate.value),fn(n.gate.name,n.gate.value)})},processEvent(t,n,r){return Zn(t)}});async function ZR(){const e=x();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";try{await zm(()=>fetch("https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7",{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}}const zC="WebWorker",eA=({worker:e})=>({name:zC,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>Ol(t))},addWorker:t=>Ol(t)});function Ol(e){e.addEventListener("message",t=>{GC(t.data)&&(t.stopImmediatePropagation(),t.data._sentryDebugIds&&(R&&m.log("Sentry debugId web worker message received",t.data),B._sentryDebugIds={...t.data._sentryDebugIds,...B._sentryDebugIds}),t.data._sentryWorkerError&&(R&&m.log("Sentry worker rejection message received",t.data._sentryWorkerError),qC(t.data._sentryWorkerError)))})}function qC(e){const t=x();if(!t)return;const n=t.getOptions().stackParser,r=t.getOptions().attachStacktrace,s=e.reason,o=Ht(s)?Vf(s):yo(n,s,void 0,r,!0);o.level="error",e.filename&&(o.contexts={...o.contexts,worker:{filename:e.filename}}),Cr(o,{originalException:s,mechanism:{handled:!1,type:"auto.browser.web_worker.onunhandledrejection"}}),R&&m.log("Captured worker unhandled rejection",s)}function tA({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0}),e.addEventListener("unhandledrejection",t=>{const r={reason:Gf(t),filename:e.location?.href};e.postMessage({_sentryMessage:!0,_sentryWorkerError:r}),R&&m.log("[Sentry Worker] Forwarding unhandled rejection to parent",r)}),R&&m.log("[Sentry Worker] Registered worker with unhandled rejection handling")}function GC(e){if(!ut(e)||e._sentryMessage!==!0)return!1;const t="_sentryDebugIds"in e,n="_sentryWorkerError"in e;return!(!t&&!n||t&&!(ut(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!ut(e._sentryWorkerError))}export{ls as $,vR as A,TR as B,Ft as C,Ki as D,pt as E,Sg as F,Hc as G,aR as H,Cr as I,Ny as J,hi as K,$c as L,rR as M,mR as N,KC as O,_R as P,t_ as Q,H_ as R,de as S,Td as T,T_ as U,cR as V,B as W,pR as X,nR as Y,b_ as Z,Te as _,p_ as a,$R as a$,Kh as a0,zd as a1,w_ as a2,SR as a3,bR as a4,yR as a5,ly as a6,yg as a7,sR as a8,_g as a9,dR as aA,JE as aB,zf as aC,wT as aD,PT as aE,DT as aF,RT as aG,IR as aH,kR as aI,wR as aJ,zE as aK,qE as aL,Na as aM,CR as aN,AR as aO,S0 as aP,xR as aQ,UT as aR,i0 as aS,d0 as aT,g0 as aU,XT as aV,DE as aW,OR as aX,NR as aY,LR as aZ,PR as a_,hR as aa,oR as ab,gR as ac,iR as ad,l_ as ae,ym as af,uR as ag,Xg as ah,QC as ai,XC as aj,ks as ak,Bm as al,eR as am,ZC as an,tR as ao,JC as ap,pm as aq,qm as ar,Fc as as,Xn as at,Os as au,lR as av,zm as aw,fR as ax,YC as ay,VC as az,$t as b,FR as b0,BR as b1,ER as b2,Ub as b3,Xp as b4,j1 as b5,HR as b6,WR as b7,jR as b8,zR as b9,qR as ba,r0 as bb,VR as bc,GR as bd,JR as be,YR as bf,KR as bg,XR as bh,QR as bi,ZR as bj,tA as bk,eA as bl,Ce as c,Qn as d,co as e,z as f,x as g,MR as h,RR as i,m as j,Pn as k,q as l,It as m,Fe as n,UR as o,dc as p,rC as q,ze as r,gg as s,he as t,Ve as u,sC as v,tt as w,Ee as x,be as y,Jn as z};
498
+ or you can use record.mirror to access the mirror instance during recording.`;let il={map:{},getId(){return console.error(_n),-1},getNode(){return console.error(_n),null},removeNodeFromMap(){console.error(_n)},has(){return console.error(_n),!1},reset(){console.error(_n)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(il=new Proxy(il,{get(e,t,n){return t==="map"&&console.error(_n),Reflect.get(e,t,n)}}));function Xa(e,t,n,r,s=window){const o=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(i){Mp(()=>{n.set.call(this,i)},0),o&&o.set&&o.set.call(this,i)}}),()=>Xa(e,t,o||{},!0)}function Qa(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function l1(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function bo(e,t,n,r,s){if(!e)return!1;const o=l1(e);if(!o)return!1;const i=ol(t,n),a=Oi(o,i);let c=-1;return a<0?!1:(r&&(c=Oi(o,ol(null,r))),a>-1&&c<0?!0:a<c)}const al={};function xp(e){const t=al[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const o=s.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(s)}catch{}return al[e]=r.bind(window)}function qt(...e){return xp("requestAnimationFrame")(...e)}function Mp(...e){return xp("setTimeout")(...e)}var $n=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))($n||{});let hs;function d1(e){hs=e}const Yo=e=>hs?(...n)=>{try{return e(...n)}catch(r){if(hs&&hs(r)===!0)return()=>{};throw r}}:e;var vn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Xr=0;Xr<vn.length;Xr++)f1[vn.charCodeAt(Xr)]=Xr;var p1=function(e){var t=new Uint8Array(e),n,r=t.length,s="";for(n=0;n<r;n+=3)s+=vn[t[n]>>2],s+=vn[(t[n]&3)<<4|t[n+1]>>4],s+=vn[(t[n+1]&15)<<2|t[n+2]>>6],s+=vn[t[n+2]&63];return r%3===2?s=s.substring(0,s.length-1)+"=":r%3===1&&(s=s.substring(0,s.length-2)+"=="),s};const cl=new Map;function h1(e,t){let n=cl.get(e);return n||(n=new Map,cl.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const Op=(e,t,n)=>{if(!e||!(Lp(e,t)||typeof e=="object"))return;const r=e.constructor.name,s=h1(n,r);let o=s.indexOf(e);return o===-1&&(o=s.length,s.push(e)),o};function ms(e,t,n){if(e instanceof Array)return e.map(r=>ms(r,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){const r=e.constructor.name,s=p1(e);return{rr_type:r,base64:s}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[ms(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:s}=e;return{rr_type:r,src:s}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",s=e.toDataURL();return{rr_type:r,src:s}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[ms(e.data,t,n),e.width,e.height]};if(Lp(e,t)||typeof e=="object"){const r=e.constructor.name,s=Op(e,t,n);return{rr_type:r,index:s}}}}return e}const Np=(e,t,n)=>e.map(r=>ms(r,t,n)),Lp=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof t[s]=="function").find(s=>e instanceof t[s]);function m1(e,t,n,r,s){const o=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of i)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const c=Qa(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...d){return bo(this.canvas,n,r,s,!0)||Mp(()=>{const l=Np(d,t,this);e(this.canvas,{type:$n["2D"],property:a,args:l})},0),u.apply(this,d)}});o.push(c)}catch{const c=Xa(t.CanvasRenderingContext2D.prototype,a,{set(u){e(this.canvas,{type:$n["2D"],property:a,args:[u],setter:!0})}});o.push(c)}return()=>{o.forEach(a=>a())}}function g1(e){return e==="experimental-webgl"?"webgl":e}function ul(e,t,n,r,s){const o=[];try{const i=Qa(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!bo(this,t,n,r,!0)){const d=g1(c);if("__context"in this||(this.__context=d),s&&["webgl","webgl2"].includes(d))if(u[0]&&typeof u[0]=="object"){const l=u[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});o.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(i=>i())}}function ll(e,t,n,r,s,o,i,a){const c=[],u=Object.getOwnPropertyNames(e);for(const d of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(d))try{if(typeof e[d]!="function")continue;const l=Qa(e,d,function(p){return function(...f){const h=p.apply(this,f);if(Op(h,a,this),"tagName"in this.canvas&&!bo(this.canvas,r,s,o,!0)){const g=Np(f,a,this),_={type:t,property:d,args:g};n(this.canvas,_)}return h}});c.push(l)}catch{const l=Xa(e,d,{set(p){n(this.canvas,{type:t,property:d,args:[p],setter:!0})}});c.push(l)}return c}function _1(e,t,n,r,s,o){const i=[];return i.push(...ll(t.WebGLRenderingContext.prototype,$n.WebGL,e,n,r,s,o,t)),typeof t.WebGL2RenderingContext<"u"&&i.push(...ll(t.WebGL2RenderingContext.prototype,$n.WebGL2,e,n,r,s,o,t)),()=>{i.forEach(a=>a())}}const y1='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 S1(){const e=new Blob([y1]);return URL.createObjectURL(e)}class b1{constructor(t){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=(a,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(c)};const{enableManualSnapshot:n,sampling:r="all",win:s,recordCanvas:o,errorHandler:i}=t;t.sampling=r,this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,i&&d1(i),(o&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(s),!n&&Yo(()=>{o&&r==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),o&&typeof r=="number"&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(t=>{try{t()}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(t){const{sampling:n="all",blockClass:r,blockSelector:s,unblockSelector:o,recordCanvas:i,enableManualSnapshot:a}=this.options;if(!this.windowsSet.has(t)){if(a){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}Yo(()=>{if(i&&n==="all"&&this.initCanvasMutationObserver(t,r,s,o),i&&typeof n=="number"){const c=ul(t,r,s,o,!0);this.restoreHandlers.push(()=>{c()})}})(),this.windowsSet.add(t),this.windows.push(new WeakRef(t))}}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(t,n){if(n?.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,t);return}qt(r=>this.takeSnapshot(r,!0,t))}initFPSWorker(){const t=new Worker(S1());return t.onmessage=n=>{const r=n.data,{id:s}=r;if(this.snapshotInProgressMap.set(s,!1),!("base64"in r))return;const{base64:o,type:i,width:a,height:c}=r;this.mutationCb({id:s,type:$n["2D"],commands:[{property:"clearRect",args:[0,0,a,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:o}],type:i}]},0,0,a,c]}]})},t}initCanvasFPSObserver(){let t;if(!this.windows.length&&!this.shadowDoms.size)return;const n=r=>{this.takeSnapshot(r,!1),t=qt(n)};t=qt(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,s){const o=ul(t,n,r,s,!1),i=m1(this.processMutation.bind(this),t,n,r,s),a=_1(this.processMutation.bind(this),t,n,r,s,this.mirror);this.restoreHandlers.push(()=>{o(),i(),a()})}getCanvasElements(t,n,r){const s=[],o=i=>{i.querySelectorAll("canvas").forEach(a=>{bo(a,t,n,r)||s.push(a)})};for(const i of this.windows){const a=i.deref();let c;try{c=a&&a.document}catch{}c&&o(c)}for(const i of this.shadowDoms){const a=i.deref();a&&o(a)}return s}takeSnapshot(t,n,r){const{sampling:s,blockClass:o,blockSelector:i,unblockSelector:a,dataURLOptions:c,maxCanvasSize:u}=this.options,l=1e3/(s==="all"?2:s||2);return this.lastSnapshotTime&&t-this.lastSnapshotTime<l?!1:(this.lastSnapshotTime=t,(r?[r]:this.getCanvasElements(o,i,a)).forEach(h=>{const g=this.mirror.getId(h);if(!(!this.mirror.hasNode(h)||!h.width||!h.height||this.snapshotInProgressMap.get(g))){if(this.snapshotInProgressMap.set(g,!0),!n&&["webgl","webgl2"].includes(h.__context)){const _=h.getContext(h.__context);_?.getContextAttributes()?.preserveDrawingBuffer===!1&&_.clear(_.COLOR_BUFFER_BIT)}createImageBitmap(h).then(_=>{this.worker?.postMessage({id:g,bitmap:_,width:h.width,height:h.height,dataURLOptions:c,maxCanvasSize:u},[_])}).catch(_=>{Yo(()=>{throw this.snapshotInProgressMap.delete(g),_})()})}}),!0)}startPendingCanvasMutationFlusher(){qt(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,qt(t)};qt(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),qt(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const s=r.map(i=>{const{type:a,...c}=i;return c}),{type:o}=r[0];this.mutationCb({id:n,type:o,commands:s}),this.pendingCanvasMutations.delete(t)}}try{if(Array.from([1],e=>e*2)[0]!==2){const 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)}c1();var dl;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(dl||(dl={}));const fl={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}}},E1="ReplayCanvas",Qr=1280,v1=((e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Qr):Qr,n?Math.min(n,Qr):Qr]};let s;const o=new Promise(i=>s=i);return{name:E1,getOptions(){const{quality:i,enableManualSnapshot:a,maxCanvasSize:c}=r;return{enableManualSnapshot:a,recordCanvas:!0,getCanvasManager:u=>{const d=new b1({...u,enableManualSnapshot:a,maxCanvasSize:c,errorHandler:l=>{try{typeof l=="object"&&(l.__rrweb__=!0)}catch{}}});return s(d),d},...fl[i]||fl.medium}},async snapshot(i,a){(await o).snapshot(i,a)}}}),vR=v1;function T1(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function Pp(e){try{return new URL(e,B.location.origin).href}catch{return}}function I1(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Dp(e){try{return new Headers(e)}catch{return}}const pl=new WeakMap,Jo=new Map,Fp={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function w1(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:o,enableHTTPTimings:i,tracePropagationTargets:a,onRequestSpanStart:c,onRequestSpanEnd:u}={...Fp,...t},d=typeof o=="function"?o:h=>!0,l=h=>k1(h,a),p={},f=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(h=>(h.type==="transaction"&&h.spans&&h.spans.forEach(g=>{if(g.op==="http.client"){const _=Jo.get(g.span_id);_&&(g.timestamp=_/1e3,Jo.delete(g.span_id))}}),h)),s&&VS(h=>{if(h.response){const g=pl.get(h.response);g&&h.endTimestamp&&Jo.set(g,h.endTimestamp)}}),ga(h=>{const g=cy(h,d,l,p,{propagateTraceparent:f,onRequestSpanEnd:u});if(h.response&&h.fetchData.__span&&pl.set(h.response,h.fetchData.__span),g){const _=Pp(h.fetchData.url),y=_?Zt(_).host:void 0;g.setAttributes({"http.url":_,"server.address":y}),i&&hl(g),c?.(g,{headers:h.headers})}})),r&&Na(h=>{const g=C1(h,d,l,p,f,u);g&&(i&&hl(g),c?.(g,{headers:Dp(h.xhr.__sentry_xhr_v3__?.request_headers)}))})}function hl(e){const{url:t}=z(e).data;if(!t||typeof t!="string")return;const n=cn("resource",({entries:r})=>{r.forEach(s=>{I1(s)&&s.name.endsWith(t)&&(e.setAttributes(kf(s)),setTimeout(n))})})}function k1(e,t){const n=un();if(n){let r,s;try{r=new URL(e,n),s=new URL(n).origin}catch{return!1}const o=r.origin===s;return t?Xe(r.toString(),t)||o&&Xe(r.pathname,t):o}else{const r=!!e.match(/^\/(?!\/)/);return t?Xe(e,t):r}}function C1(e,t,n,r,s,o){const i=e.xhr,a=i?.[pt];if(!i||i.__sentry_own_request__||!a)return;const{url:c,method:u}=a,d=qe()&&t(c);if(e.endTimestamp&&d){const y=i.__sentry_xhr_span_id__;if(!y)return;const S=r[y];S&&a.status_code!==void 0&&(ys(S,a.status_code),S.end(),o?.(S,{headers:Dp(Af(i)),error:e.error}),delete r[y]);return}const l=Pp(c),p=Zt(l||c),f=Rd(c),h=!!be(),g=d&&h?qn({name:`${u} ${f}`,attributes:{url:c,type:"xhr","http.method":u,"http.url":l,"server.address":p?.host,[de]:"auto.http.browser",[Ge]:"http.client",...p?.search&&{"http.query":p?.search},...p?.hash&&{"http.fragment":p?.hash}}}):new bt;i.__sentry_xhr_span_id__=g.spanContext().spanId,r[i.__sentry_xhr_span_id__]=g,n(c)&&R1(i,qe()&&h?g:void 0,s);const _=x();return _&&_.emit("beforeOutgoingRequestSpan",g,e),g}function R1(e,t,n){const{"sentry-trace":r,baggage:s,traceparent:o}=xd({span:t,propagateTraceparent:n});r&&A1(e,r,s,o)}function A1(e,t,n,r){const s=e.__sentry_xhr_v3__?.request_headers;if(!(s?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!s?.traceparent&&e.setRequestHeader("traceparent",r),n){const o=s?.baggage;(!o||!T1(o))&&e.setRequestHeader("baggage",n)}}catch{}}function x1(){B.document?B.document.addEventListener("visibilitychange",()=>{const e=be();if(!e)return;const t=Se(e);if(B.document.hidden&&t){const n="cancelled",{op:r,status:s}=z(t);R&&m.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||t.setStatus({code:ne,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):R&&m.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const M1=3600,$p="sentry_previous_trace",O1="sentry.previous_trace";function N1(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let s=r?D1():void 0;e.on("spanStart",i=>{if(Se(i)!==i)return;const a=q().getPropagationContext();s=L1(s,i,a),r&&P1(s)});let o=!0;n&&e.on("beforeSampling",i=>{if(!s)return;const a=q(),c=a.getPropagationContext();if(o&&c.parentSpanId){o=!1;return}a.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(s.sampleRate),sampled:String(Ni(s.spanContext))},sampleRand:s.sampleRand}),i.parentSampled=Ni(s.spanContext),i.parentSampleRate=s.sampleRate,i.spanAttributes={...i.spanAttributes,[$l]:s.sampleRate}})}function L1(e,t,n){const r=z(t);function s(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[Ui])}catch{return 0}}const o={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:s(),sampleRand:n.sampleRand};if(!e)return o;const i=e.spanContext;return i.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=M1&&(R&&m.log(`Adding previous_trace ${i} link to span ${{op:r.op,...t.spanContext()}}`),t.addLink({context:i,attributes:{[xh]:"previous_trace"}}),t.setAttribute(O1,`${i.traceId}-${i.spanId}-${Ni(i)?1:0}`)),o)}function P1(e){try{B.sessionStorage.setItem($p,JSON.stringify(e))}catch(t){R&&m.warn("Could not store previous trace in sessionStorage",t)}}function D1(){try{const e=B.sessionStorage?.getItem($p);return JSON.parse(e)}catch{return}}function Ni(e){return e.traceFlags===1}const F1="BrowserTracing",$1={...ss,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...Fp},TR=((e={})=>{const t={name:void 0,source:void 0},n=B.document,{enableInp:r,enableElementTiming:s,enableLongTask:o,enableLongAnimationFrame:i,_experiments:{enableInteractions:a,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:u},beforeStartSpan:d,idleTimeout:l,finalTimeout:p,childSpanTimeout:f,markBackgroundSpan:h,traceFetch:g,traceXHR:_,trackFetchStreamPerformance:y,shouldCreateSpanForRequest:S,enableHTTPTimings:O,ignoreResourceSpans:v,ignorePerformanceApiSpans:N,instrumentPageLoad:k,instrumentNavigation:b,detectRedirects:I,linkPreviousTrace:E,consistentTraceSampling:C,enableReportPageLoaded:D,onRequestSpanStart:w,onRequestSpanEnd:A}={...$1,...e};let G,K,X;function F(L,P,M=!0){const J=P.op==="pageload",se=P.name,le=d?d(P):P,_e=le.attributes||{};if(se!==le.name&&(_e[je]="custom",le.attributes=_e),!M){const xe=ln();qn({...le,startTime:xe}).end(xe);return}t.name=le.name,t.source=_e[je];const Ae=id(le,{idleTimeout:l,finalTimeout:p,childSpanTimeout:f,disableAutoFinish:J,beforeSpanEnd:xe=>{G?.(),bv(xe,{recordClsOnPageloadSpan:!c,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:v,ignorePerformanceApiSpans:N}),gl(L,void 0);const Ne=q(),nt=Ne.getPropagationContext();Ne.setPropagationContext({...nt,traceId:Ae.spanContext().traceId,sampled:Wt(Ae),dsc:Ze(xe)}),J&&(X=void 0)},trimIdleSpanEndTimestamp:!D});J&&D&&(X=Ae),gl(L,Ae);function wt(){n&&["interactive","complete"].includes(n.readyState)&&L.emit("idleSpanEnableAutoFinish",Ae)}J&&!D&&n&&(n.addEventListener("readystatechange",()=>{wt()}),wt())}return{name:F1,setup(L){if(em(),G=pv({recordClsStandaloneSpans:c||!1,recordLcpStandaloneSpans:u||!1,client:L}),r&&qv(),s&&Ov(),i&&$.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?mv():o&&hv(),a&&gv(),I&&n){const M=()=>{K=he()};addEventListener("click",M,{capture:!0}),addEventListener("keydown",M,{capture:!0,passive:!0})}function P(){const M=hr(L);M&&!z(M).timestamp&&(R&&m.log(`[Tracing] Finishing current active span with op: ${z(M).op}`),M.setAttribute(ar,"cancelled"),M.end())}L.on("startNavigationSpan",(M,J)=>{if(x()!==L)return;if(J?.isRedirect){R&&m.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),F(L,{op:"navigation.redirect",...M},!1);return}K=void 0,P(),ve().setPropagationContext({traceId:ut(),sampleRand:Math.random(),propagationSpanId:qe()?void 0:ht()});const se=q();se.setPropagationContext({traceId:ut(),sampleRand:Math.random(),propagationSpanId:qe()?void 0:ht()}),se.setSDKProcessingMetadata({normalizedRequest:void 0}),F(L,{op:"navigation",...M,parentSpan:null,forceTransaction:!0})}),L.on("startPageLoadSpan",(M,J={})=>{if(x()!==L)return;P();const se=J.sentryTrace||ml("sentry-trace"),le=J.baggage||ml("baggage"),_e=Vl(se,le),Ae=q();Ae.setPropagationContext(_e),qe()||(Ae.getPropagationContext().propagationSpanId=ht()),Ae.setSDKProcessingMetadata({normalizedRequest:va()}),F(L,{op:"pageload",...M})}),L.on("endPageloadSpan",()=>{D&&X&&(X.setAttribute(ar,"reportPageLoaded"),X.end())})},afterAllSetup(L){let P=un();if(E!=="off"&&N1(L,{linkPreviousTrace:E,consistentTraceSampling:C}),B.location){if(k){const M=Re();B1(L,{name:B.location.pathname,startTime:M?M/1e3:void 0,attributes:{[je]:"url",[de]:"auto.pageload.browser"}})}b&&po(({to:M,from:J})=>{if(J===void 0&&P?.indexOf(M)!==-1){P=void 0;return}P=void 0;const se=na(M),le=hr(L),_e=le&&I&&W1(le,K);U1(L,{name:se?.pathname||B.location.pathname,attributes:{[je]:"url",[de]:"auto.navigation.browser"}},{url:M,isRedirect:_e})})}h&&x1(),a&&H1(L,l,p,f,t),r&&Yv(),w1(L,{traceFetch:g,traceXHR:_,trackFetchStreamPerformance:y,tracePropagationTargets:L.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:S,enableHTTPTimings:O,onRequestSpanStart:w,onRequestSpanEnd:A})}}});function B1(e,t,n){e.emit("startPageLoadSpan",t,n),q().setTransactionName(t.name);const r=hr(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function U1(e,t,n){const{url:r,isRedirect:s}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:s}),e.emit("startNavigationSpan",t,{isRedirect:s});const o=q();return o.setTransactionName(t.name),r&&!s&&o.setSDKProcessingMetadata({normalizedRequest:{...va(),url:r}}),hr(e)}function ml(e){return B.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function H1(e,t,n,r,s){const o=B.document;let i;const a=()=>{const c="ui.action.click",u=hr(e);if(u){const d=z(u).op;if(["navigation","pageload"].includes(d)){R&&m.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(i&&(i.setAttribute(ar,"interactionInterrupted"),i.end(),i=void 0),!s.name){R&&m.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}i=id({name:s.name,op:c,attributes:{[je]:s.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};o&&addEventListener("click",a,{capture:!0})}const Bp="_sentry_idleSpan";function hr(e){return e[Bp]}function gl(e,t){De(e,Bp,t)}const _l=1.5;function W1(e,t){const n=z(e),r=ln(),s=n.start_timestamp;return!(r-s>_l||t&&r-t<=_l)}function IR(e=x()){e?.emit("endPageloadSpan")}function wR(e){const t=be();if(t===e)return;const n=q();e.end=new Proxy(e.end,{apply(r,s,o){return St(n,t),Reflect.apply(r,s,o)}}),St(n,e)}function Bn(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function j1(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=Bn(n);return s=>r.then(o=>s(o.transaction(t,"readwrite").objectStore(t)))}function Za(e){return Bn(e.getAllKeys())}function z1(e,t,n){return e(r=>Za(r).then(s=>{if(!(s.length>=n))return r.put(t,Math.max(...s,0)+1),Bn(r.transaction)}))}function q1(e,t,n){return e(r=>Za(r).then(s=>{if(!(s.length>=n))return r.put(t,Math.min(...s,0)-1),Bn(r.transaction)}))}function G1(e){return e(t=>Za(t).then(n=>{const r=n[0];if(r!=null)return Bn(t.get(r)).then(s=>(t.delete(r),Bn(t.transaction).then(()=>s)))}))}function V1(e){let t;function n(){return t==null&&(t=j1(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const s=await vs(r);await z1(n(),s,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{const s=await vs(r);await q1(n(),s,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await G1(n());if(r)return dm(r)}catch{}}}}function Y1(e){return t=>{const n=e({...t,createStore:V1});return B.addEventListener("online",async r=>{await n.flush()}),n}}function kR(e=xf){return Y1(Bg(e))}const yl=1e6,J1="window"in $&&$.window===$&&typeof importScripts>"u",Pt=String(0),Gs=J1?"main":"worker",Vs=B.navigator;let Up="",Hp="",Wp="",Li=Vs?.userAgent||"",jp="";const K1=Vs?.language||Vs?.languages?.[0]||"";function X1(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const Sl=Vs?.userAgentData;X1(Sl)&&Sl.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(Up=e.platform||"",Wp=e.architecture||"",jp=e.model||"",Hp=e.platformVersion||"",e.fullVersionList?.length){const t=e.fullVersionList[e.fullVersionList.length-1];Li=`${t.brand} ${t.version}`}}).catch(e=>{});function Q1(e){return!("thread_metadata"in e)}function Z1(e){return Q1(e)?oC(e):e}function eC(e){const t=e.contexts?.trace?.trace_id;return typeof t=="string"&&t.length!==32&&R&&m.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function tC(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const s=eC(r),o=Z1(n),i=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:he()*1e3),a=typeof r.timestamp=="number"?r.timestamp*1e3:he()*1e3;return{event_id:e,timestamp:new Date(i).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||Ks,runtime:{name:"javascript",version:B.navigator.userAgent},os:{name:Up,version:Hp,build_number:Li},device:{locale:K1,model:jp,manufacturer:Li,architecture:Wp,is_emulator:!1},debug_meta:{images:qp(n.resources)},profile:o,transactions:[{name:r.transaction||"",id:r.event_id||Ee(),trace_id:s,active_thread_id:Pt,relative_start_ns:"0",relative_end_ns:((a-i)*1e6).toFixed(0)}]}}function nC(e,t,n){if(e==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);const r=sC(e),s=t.getOptions(),o=t.getSdkMetadata?.()?.sdk;return{chunk_id:Ee(),client_sdk:{name:o?.name??"sentry.javascript.browser",version:o?.version??"0.0.0"},profiler_id:n||Ee(),platform:"javascript",version:"2",release:s.release??"",environment:s.environment??"production",debug_meta:{images:qp(e.resources)},profile:r}}function rC(e){try{if(!e||typeof e!="object")return{reason:"chunk is not an object"};const t=r=>typeof r=="string"&&/^[a-f0-9]{32}$/.test(r);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"};const 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(t){return{reason:`unknown validation error: ${t}`}}}function sC(e){const t=[];for(let a=0;a<e.frames.length;a++){const c=e.frames[a];c&&(t[a]={function:c.name,abs_path:typeof c.resourceId=="number"?e.resources[c.resourceId]:void 0,lineno:c.line,colno:c.column})}const n=[];for(let a=0;a<e.stacks.length;a++){const c=e.stacks[a];if(!c)continue;const u=[];let d=c;for(;d;)u.push(d.frameId),d=d.parentId===void 0?void 0:e.stacks[d.parentId];n[a]=u}const r=Re(),s=typeof performance.timeOrigin=="number"?performance.timeOrigin:r||0,o=s-(r||s),i=[];for(let a=0;a<e.samples.length;a++){const c=e.samples[a];if(!c)continue;const u=(s+(c.timestamp-o))/1e3;i[a]={stack_id:c.stackId??0,thread_id:Pt,timestamp:u}}return{frames:t,stacks:n,samples:i,thread_metadata:{[Pt]:{name:Gs}}}}function zp(e){return z(e).op==="pageload"}function oC(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Pt]:{name:Gs}}},s=e.samples[0];if(!s)return r;const o=s.timestamp,i=Re(),a=typeof performance.timeOrigin=="number"?performance.timeOrigin:i||0,c=a-(i||a);return e.samples.forEach((u,d)=>{if(u.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[d]={elapsed_since_start_ns:((u.timestamp+c-o)*yl).toFixed(0),stack_id:t,thread_id:Pt};return}let l=e.stacks[u.stackId];const p=[];for(;l;){p.push(l.frameId);const h=e.frames[l.frameId];h&&r.frames[l.frameId]===void 0&&(r.frames[l.frameId]={function:h.name,abs_path:typeof h.resourceId=="number"?e.resources[h.resourceId]:void 0,lineno:h.line,colno:h.column}),l=l.parentId===void 0?void 0:e.stacks[l.parentId]}const f={elapsed_since_start_ns:((u.timestamp+c-o)*yl).toFixed(0),stack_id:n,thread_id:Pt};r.stacks[n]=p,r.samples[d]=f,n++}),r}function iC(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function aC(e){const t=[];return rn(e,(n,r)=>{if(r==="transaction")for(let s=1;s<n.length;s++)n[s]?.contexts?.profile?.profile_id&&t.push(n[s])}),t}function qp(e){const r=x()?.getOptions()?.stackParser;return r?Hm(r,e):[]}function Gp(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(R&&m.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?(R&&m.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function cC(e){return e.samples.length<2?(R&&m.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(R&&m.log("[Profiling] Discarding profile because it contains no frames"),!1)}let ec=!1;const Vp=3e4;function uC(e){return typeof e=="function"}function Yp(){const e=B.Profiler;if(!uC(e)){R&&m.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(Vp/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{R&&(m.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),m.log("[Profiling] Disabling profiling for current user session.")),ec=!0}}function bl(e){if(ec)return R&&m.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return R&&m.log("[Profiling] Discarding profile because root span was not sampled."),!1;const n=x()?.getOptions();if(!n)return R&&m.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return Gp(r)?r?(r===!0?!0:Math.random()<r)?!0:(R&&m.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(R&&m.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(R&&m.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function lC(e){if(ec)return R&&m.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(e.profileLifecycle!=="trace")return!1;const t=e.profileSessionSampleRate;return Gp(t)?t?Math.random()<=t:(R&&m.log("[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0"),!1):(R&&m.warn("[Profiling] Discarding profile because of invalid profileSessionSampleRate."),!1)}function Zr(e){return typeof e.profilesSampleRate<"u"}function dC(e,t,n,r){return cC(n)?tC(e,t,n,r):null}const Kt=new Map;function fC(){return Kt.size}function pC(e){const t=Kt.get(e);return t&&Kt.delete(e),t}function hC(e,t){if(Kt.set(e,t),Kt.size>30){const n=Kt.keys().next().value;n!==void 0&&Kt.delete(n)}}function mC(e){return!e?.contexts?.profile||!e.contexts||(e.contexts.trace={...e.contexts?.trace??{},data:{...e.contexts?.trace?.data??{},"thread.id":Pt,"thread.name":Gs}},e.spans?.forEach(t=>{t.data={...t.data||{},"thread.id":Pt,"thread.name":Gs}})),e}const gC=6e4,_C=3e5;class yC{constructor(){this._client=void 0,this._profiler=void 0,this._chunkTimer=void 0,this._activeRootSpanIds=new Set,this._rootSpanTimeouts=new Map,this._profilerId=void 0,this._isRunning=!1,this._sessionSampled=!1}initialize(t,n){this._profilerId=Ee(),R&&m.log("[Profiling] Initializing profiler (lifecycle='trace')."),this._client=t,this._sessionSampled=n,t.on("spanStart",r=>{if(!this._sessionSampled){R&&m.log("[Profiling] Session not sampled because of negative sampling decision.");return}if(r!==Se(r))return;if(!r.isRecording()){R&&m.log("[Profiling] Discarding profile because root span was not sampled.");return}Rn().setContext("profile",{profiler_id:this._profilerId});const s=r.spanContext().spanId;if(!s||this._activeRootSpanIds.has(s))return;this._activeRootSpanIds.add(s);const o=this._activeRootSpanIds.size,i=setTimeout(()=>{this._onRootSpanTimeout(s)},_C);this._rootSpanTimeouts.set(s,i),o===1&&(R&&m.log(`[Profiling] Root span with ID ${s} started. Will continue profiling for as long as there are active root spans (currently: ${o}).`),this.start())}),t.on("spanEnd",r=>{if(!this._sessionSampled)return;const s=r.spanContext().spanId;if(!s||!this._activeRootSpanIds.has(s))return;this._activeRootSpanIds.delete(s);const o=this._activeRootSpanIds.size;R&&m.log(`[Profiling] Root span with ID ${s} ended. Will continue profiling for as long as there are active root spans (currently: ${o}).`),o===0&&(this._collectCurrentChunk().catch(i=>{R&&m.error("[Profiling] Failed to collect current profile chunk on `spanEnd`:",i)}),this.stop())})}notifyRootSpanActive(t){if(!this._sessionSampled)return;const n=t.spanContext().spanId;if(!n||this._activeRootSpanIds.has(n))return;this._activeRootSpanIds.add(n);const r=this._activeRootSpanIds.size;r===1&&(R&&m.log("[Profiling] Detected already active root span during setup. Active root spans now:",r),this.start())}start(){if(!this._isRunning){if(this._isRunning=!0,R&&m.log("[Profiling] Started profiling with profile ID:",this._profilerId),this._startProfilerInstance(),!this._profiler){R&&m.log("[Profiling] Stopping trace lifecycle profiling."),this._resetProfilerInfo();return}this._startPeriodicChunking()}}stop(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&(clearTimeout(this._chunkTimer),this._chunkTimer=void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(t=>{R&&m.error("[Profiling] Failed to collect current profile chunk on `stop()`:",t)}))}_resetProfilerInfo(){this._isRunning=!1,Rn().setContext("profile",{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(t=>clearTimeout(t)),this._rootSpanTimeouts.clear()}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;const t=Yp();if(!t){R&&m.log("[Profiling] Failed to start JS Profiler in trace lifecycle.");return}this._profiler=t}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(t=>{R&&m.error("[Profiling] Failed to collect current profile chunk during periodic chunking:",t)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},gC))}_onRootSpanTimeout(t){if(!this._rootSpanTimeouts.has(t)||(this._rootSpanTimeouts.delete(t),!this._activeRootSpanIds.has(t)))return;R&&m.log(`[Profiling] Reached 5-minute timeout for root span ${t}. You likely started a manual root span that never called \`.end()\`.`),this._activeRootSpanIds.delete(t),this._activeRootSpanIds.size===0&&this.stop()}async _collectCurrentChunk(){const t=this._profiler;if(this._profiler=void 0,!!t)try{const n=await t.stop(),r=nC(n,this._client,this._profilerId),s=rC(r);if("reason"in s){R&&m.log("[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):",s.reason);return}this._sendProfileChunk(r),R&&m.log("[Profiling] Collected browser profile chunk.")}catch(n){R&&m.log("[Profiling] Error while stopping JS Profiler for chunk:",n)}}_sendProfileChunk(t){const n=this._client,r=Xs(n.getSdkMetadata?.()),s=n.getDsn(),o=n.getOptions().tunnel,i=tt({event_id:Ee(),sent_at:new Date().toISOString(),...r&&{sdk:r},...!!o&&s&&{dsn:It(s)}},[[{type:"profile_chunk"},t]]);n.sendEnvelope(i).then(null,a=>{R&&m.error("Error while sending profile chunk envelope:",a)})}}function El(e){let t;zp(e)&&(t=he()*1e3);const n=Yp();if(!n)return;R&&m.log(`[Profiling] started profiling span: ${z(e).description}`);const r=Ee();let s=null;q().setContext("profile",{profile_id:r,start_timestamp:t});async function o(){if(e&&n){if(s){R&&m.log("[Profiling] profile for:",z(e).description,"already exists, returning early");return}return n.stop().then(u=>{if(i&&(B.clearTimeout(i),i=void 0),R&&m.log(`[Profiling] stopped profiling of span: ${z(e).description}`),!u){R&&m.log(`[Profiling] profiler returned null profile for: ${z(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}s=u,hC(r,u)}).catch(u=>{R&&m.log("[Profiling] error while stopping profiler:",u)})}}let i=B.setTimeout(()=>{R&&m.log("[Profiling] max profile duration elapsed, stopping profiling for:",z(e).description),o()},Vp);const a=e.end.bind(e);function c(){return e?(o().then(()=>{a()},()=>{a()}),e):a()}e.end=c}const SC="BrowserProfiling",bC=(()=>({name:SC,setup(e){const t=e.getOptions();if(!Zr(t)&&!t.profileLifecycle&&(t.profileLifecycle="manual"),Zr(t)&&!t.profilesSampleRate){R&&m.log("[Profiling] Profiling disabled, no profiling options found.");return}const n=be(),r=n&&Se(n);if(Zr(t)&&t.profileSessionSampleRate!==void 0&&R&&m.warn("[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled."),Zr(t))r&&zp(r)&&bl(r)&&El(r),e.on("spanStart",s=>{s===Se(s)&&bl(s)&&El(s)}),e.on("beforeEnvelope",s=>{if(!fC())return;const o=aC(s);if(!o.length)return;const i=[];for(const a of o){const c=a?.contexts,u=c?.profile?.profile_id,d=c?.profile?.start_timestamp;if(typeof u!="string"){R&&m.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!u){R&&m.log("[Profiling] cannot find profile for a span without a profile context");continue}c?.profile&&delete c.profile;const l=pC(u);if(!l){R&&m.log(`[Profiling] Could not retrieve profile for span: ${u}`);continue}const p=dC(u,d,l,a);p&&i.push(p)}iC(s,i)});else{const s=lC(t);if(s||R&&m.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),t.profileLifecycle==="trace"){if(!qe(t)){R&&m.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.");return}const i=new yC;i.initialize(e,s),r&&i.notifyRootSpanActive(r),B.setTimeout(()=>{const a=be(),c=a&&Se(a);c&&i.notifyRootSpanActive(c)},0)}}},processEvent(e){return mC(e)}})),CR=bC,EC="SpotlightBrowser",vC=((e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:EC,setup:()=>{R&&m.log("Using Sidecar URL",t)},processEvent:n=>IC(n)?null:n,afterAllSetup:n=>{TC(n,t)}}});function TC(e,t){const n=Oa("fetch");let r=0;e.on("beforeEnvelope",s=>{if(r>3){m.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:vs(s),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(o=>{o.status>=200&&o.status<400&&(r=0)},o=>{r++,m.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",o)})})}const RR=vC;function IC(e){return!!(e.type==="transaction"&&e.spans&&e.contexts?.trace&&e.contexts.trace.op==="ui.action.click"&&e.spans.some(({description:t})=>t?.includes("#sentry-spotlight")))}const AR=()=>({name:"LaunchDarkly",processEvent(e,t,n){return Gn(e)}});function xR(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{sn(e,t.value),on(e,t.value)}}}const MR=()=>({name:"OpenFeature",processEvent(e,t,n){return Gn(e)}});class OR{after(t,n){sn(n.flagKey,n.value),on(n.flagKey,n.value)}error(t,n,r){sn(t.flagKey,t.defaultValue),on(t.flagKey,t.defaultValue)}}const NR=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;we(t,"isEnabled",wC)},processEvent(t,n,r){return Gn(t)}});function wC(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(sn(n,r),on(n,r)):R&&m.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const LR=(({growthbookClass:e})=>ay({growthbookClass:e})),PR=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{sn(n.gate.name,n.gate.value),on(n.gate.name,n.gate.value)})},processEvent(t,n,r){return Gn(t)}});async function DR(){const e=x();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";try{await km(()=>fetch("https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7",{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}}const kC="WebWorker",FR=({worker:e})=>({name:kC,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>vl(t))},addWorker:t=>vl(t)});function vl(e){e.addEventListener("message",t=>{RC(t.data)&&(t.stopImmediatePropagation(),t.data._sentryDebugIds&&(R&&m.log("Sentry debugId web worker message received",t.data),B._sentryDebugIds={...t.data._sentryDebugIds,...B._sentryDebugIds}),t.data._sentryWorkerError&&(R&&m.log("Sentry worker rejection message received",t.data._sentryWorkerError),CC(t.data._sentryWorkerError)))})}function CC(e){const t=x();if(!t)return;const n=t.getOptions().stackParser,r=t.getOptions().attachStacktrace,s=e.reason,o=Dt(s)?Nf(s):uo(n,s,void 0,r,!0);o.level="error",e.filename&&(o.contexts={...o.contexts,worker:{filename:e.filename}}),br(o,{originalException:s,mechanism:{handled:!1,type:"auto.browser.web_worker.onunhandledrejection"}}),R&&m.log("Captured worker unhandled rejection",s)}function $R({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0}),e.addEventListener("unhandledrejection",t=>{const r={reason:Of(t),filename:e.location?.href};e.postMessage({_sentryMessage:!0,_sentryWorkerError:r}),R&&m.log("[Sentry Worker] Forwarding unhandled rejection to parent",r)}),R&&m.log("[Sentry Worker] Registered worker with unhandled rejection handling")}function RC(e){if(!it(e)||e._sentryMessage!==!0)return!1;const t="_sentryDebugIds"in e,n="_sentryWorkerError"in e;return!(!t&&!n||t&&!(it(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!it(e._sentryWorkerError))}export{Oh as $,iR as A,Ot as B,Ui as C,lt as D,tg as E,Mc as F,zC as G,br as H,my as I,si as J,Rc as K,UC as L,QC as M,NC as N,eR as O,Fg as P,T_ as Q,ud as R,de as S,o_ as T,qC as U,KC as V,B as W,BC as X,n_ as Y,ve as Z,ns as _,Jg as a,bR as a$,xd as a0,i_ as a1,nR as a2,rR as a3,tR as a4,G_ as a5,eg as a6,HC as a7,Zm as a8,XC as a9,ME as aA,xf as aB,iT as aC,_T as aD,yT as aE,lT as aF,cR as aG,uR as aH,aR as aI,kE as aJ,CE as aK,Ta as aL,lR as aM,fR as aN,t0 as aO,pR as aP,vT as aQ,WT as aR,VT as aS,QT as aT,NT as aU,yE as aV,mR as aW,gR as aX,_R as aY,yR as aZ,ER as a_,WC as aa,ZC as ab,jC as ac,Gg as ad,em as ae,GC as af,Ng as ag,PC as ah,LC as ai,ys as aj,Em as ak,FC as al,DC as am,$C as an,OC as ao,Jh as ap,Cm as aq,Cc as ar,zn as as,Is as at,VC as au,km as av,JC as aw,MC as ax,xC as ay,YC as az,Nt as b,vR as b0,sR as b1,vb as b2,Fp as b3,w1 as b4,IR as b5,wR as b6,kR as b7,CR as b8,RR as b9,BT as ba,xR as bb,AR as bc,OR as bd,MR as be,NR as bf,LR as bg,PR as bh,DR as bi,$R as bj,FR as bk,ke as c,qn as d,eo as e,z as f,x as g,hR as h,dR as i,m as j,Rn as k,q as l,Et as m,De as n,TR as o,B1 as p,je as q,Ge as r,Qm as s,he as t,U1 as u,be as v,et as w,Se as x,Wn as y,oR as z};