@zeniai/web-app-ui 5.1.57-prod → 5.1.58-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-Jvk5ZIh7.js +1 -0
- package/dist/assets/AddressScreen-BrRyijJp.js +9 -0
- package/dist/assets/AiCfoScreen-CicMJAHj.js +22 -0
- package/dist/assets/BillPayApprovalRoutes-CDu2EgPZ.js +1 -0
- package/dist/assets/BillPayRoutes-qpaKIKLh.js +119 -0
- package/dist/assets/BusinessVerificationPageScreen-NuRsHlJi.js +9 -0
- package/dist/assets/ChargeCardRoutes-DGkxpdY7.js +71 -0
- package/dist/assets/CompanyPassportScreen-CG5-5eoy.js +1 -0
- package/dist/assets/ConnectionAuthScreen-Bn_8LVY-.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-Bgpl9puf.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-BWH4fb9z.js +23 -0
- package/dist/assets/DashboardRoutes-9HsT8T2z.js +20 -0
- package/dist/assets/DefaultTenantHome-CwgycKYc.js +1 -0
- package/dist/assets/DomesticWireDetailScreen-Dd35H5gU.js +18 -0
- package/dist/assets/DrawerScreen-C5n2KCQV.js +1 -0
- package/dist/assets/EntityDetailRoutes-DLIsh6TE.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-C0zzACQj.js +25 -0
- package/dist/assets/FeaturePreviewScreen-BeSvOfyq.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-QEO5L34X.js +1 -0
- package/dist/assets/MagicLinkRoutes-CWoYIOYU.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-D_t_Me45.js +12 -0
- package/dist/assets/MobileAppDrawer-BG5P4V6f.js +1 -0
- package/dist/assets/NotFoundScreen-DcBza--g.js +1 -0
- package/dist/assets/NotificationRoutes-CQ3pB1c-.js +1 -0
- package/dist/assets/OAuthConsentScreen-rh4Splr8.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-C321jz-9.js +1 -0
- package/dist/assets/PeopleRoutes-tz6kKz-A.js +22 -0
- package/dist/assets/PerformanceRoutes-CeebcaT1.js +1 -0
- package/dist/assets/Preview-Dw6WgJ9D.js +1 -0
- package/dist/assets/QBOConnectionScreen-DmBrRYj5.js +100 -0
- package/dist/assets/ReferralListScreen-Lnl80ls5.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-U1jW3SNW.js +1 -0
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-C7v9N8Xz.js +1 -0
- package/dist/assets/ReimbursementRoutes-CrSmjoHG.js +68 -0
- package/dist/assets/ReportsRoutes-CVQ3KrxC.js +1 -0
- package/dist/assets/RewardsRoutes-CuXw1sC8.js +1 -0
- package/dist/assets/ScreenRoutes-Bm5EazfY.js +2 -0
- package/dist/assets/SettingsRoutes-BdwvZMwv.js +57 -0
- package/dist/assets/SetupPagesScreen-DPjCUjqg.js +29 -0
- package/dist/assets/SignInScreen-C1EKfqaQ.js +1 -0
- package/dist/assets/SignOutScreen-DK40OwVP.js +9 -0
- package/dist/assets/TaskListScreen-d8fI83l2.js +9 -0
- package/dist/assets/TaskRoutes-jKlcwy0X.js +9 -0
- package/dist/assets/TransactionDetailRoutes-CCDdwe13.js +1 -0
- package/dist/assets/TransactionDetailScreen-DmE69GP7.js +5 -0
- package/dist/assets/TransactionListRoutes-BU6W03tb.js +1 -0
- package/dist/assets/TreasuryRoutes-Bm8WTWLC.js +37 -0
- package/dist/assets/VendorsRoutes-B1U9Gev2.js +112 -0
- package/dist/assets/WiseConfirmationScreen-BsEe1BHV.js +12 -0
- package/dist/assets/ZeniAccountRoutes-DjEDHzor.js +57 -0
- package/dist/assets/ZeniAccountStatementScreen-Cu_59prd.js +9 -0
- package/dist/assets/accountMappingHelper-JvNPAAYV.js +1 -0
- package/dist/assets/analytics-wiEk3GGD.js +68 -0
- package/dist/assets/analyticsHelper-CScMfb2z.js +1 -0
- package/dist/assets/core-DUPexJ3H.js +12 -0
- package/dist/assets/decodeURIComponentSafe-jbE9T9Sc.js +1 -0
- package/dist/assets/dnd-O-LDWVRl.js +6 -0
- package/dist/assets/empty-B5snx4g9.js +1 -0
- package/dist/assets/empty-DtHXOIj5.js +1 -0
- package/dist/assets/emptyVideoElement-6tVV7Q67.js +1 -0
- package/dist/assets/epic-DdqgmVvM.js +2 -0
- package/dist/assets/favicon-D56XvgAH.ico +0 -0
- package/dist/assets/getLocaleForTenant-BQer3J3i.js +1 -0
- package/dist/assets/index-B_Z_hpYg.js +75478 -0
- package/dist/assets/index-BhL3T4qt.js +1 -0
- package/dist/assets/index-C4rqoBpF.js +1 -0
- package/dist/assets/index-CFjZqjGQ.js +3385 -0
- package/dist/assets/index-D9U_bKAc.js +1 -0
- package/dist/assets/index-R3FzVapp.js +2 -0
- package/dist/assets/index-R6GjjTB3.css +1 -0
- package/dist/assets/index-fhWfMdvB.js +2 -0
- package/dist/assets/index-iv31G9Nr.js +1 -0
- package/dist/assets/lexical-D7D3BWIv.js +21 -0
- package/dist/assets/liveblocks-CpSeBLzv.js +54 -0
- package/dist/assets/logo192-CqcTe-t4.png +0 -0
- package/dist/assets/lottie-BpJoufaA.js +2 -0
- package/dist/assets/manifest-icT4lOF5.json +49 -0
- package/dist/assets/mui-BYcLUAn-.js +109 -0
- package/dist/assets/pathToGoBack-DOYIxcIl.js +1 -0
- package/dist/assets/pdf--1Oee4-D.js +13 -0
- package/dist/assets/pdf-lib-DIbgSioz.js +39 -0
- package/dist/assets/plaid-DSCHiplf.js +2 -0
- package/dist/assets/pusher-DWPsZ62H.js +1 -0
- package/dist/assets/react-B3g-qTY7.js +22 -0
- package/dist/assets/react-BQJ3WCCJ.js +34 -0
- package/dist/assets/react-BYOk0YaM.js +21 -0
- package/dist/assets/react-C2LzYoMn.js +19 -0
- package/dist/assets/react-CA9dc_Y6.js +17 -0
- package/dist/assets/react-CD_enKrG.js +19 -0
- package/dist/assets/recharts-Dp6Vlg5X.js +65 -0
- package/dist/assets/routePaths-DpeDFIQv.js +1 -0
- package/dist/assets/sentry-BxlhxHUi.js +500 -0
- package/dist/assets/stripe-DMRn4zHo.js +1 -0
- package/dist/assets/url-Cto2mSPb.js +1 -0
- package/dist/assets/url-DLyO75wK.js +6 -0
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-BK9arDN4.js +1 -0
- package/dist/assets/useAskAiCfoHostNavButtonProps-D8UKtiUm.js +1 -0
- package/dist/assets/useDeviceId-6JqjTKKJ.js +13 -0
- package/dist/assets/useInitialThreadRequest-hFu4tb2i.js +1 -0
- package/dist/assets/utils-BI-ymB94.js +36 -0
- package/dist/assets/web-vitals-D_vxw1oG.js +1 -0
- package/dist/assets/withTransactionSidePanel-DXm_Rajk.js +21 -0
- package/dist/assets/zeni-epic-state-DP595dtC.js +13 -0
- package/dist/index.html +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,500 @@
|
|
|
1
|
+
(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="fa57548c-d7b6-44da-9e0b-16a12da8d465",t._sentryDebugIdIdentifier="sentry-dbid-fa57548c-d7b6-44da-9e0b-16a12da8d465")}catch{}})();function Ph(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in t)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(t,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{}).SENTRY_RELEASE={id:"62e7772d79f4ec55d35ed4178c274a09225b0c6c"};var uv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function lv(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function r(){var o=!1;try{o=this instanceof r}catch{}return o?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})}),n}var Va,Ga,Ka={exports:{}},ut={};function Dh(){if(Va)return ut;Va=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),i=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),a=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),l=Symbol.iterator,p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,h={};function g(m,v,N){this.props=m,this.context=v,this.refs=h,this.updater=N||p}function S(){}function w(m,v,N){this.props=m,this.context=v,this.refs=h,this.updater=N||p}g.prototype.isReactComponent={},g.prototype.setState=function(m,v){if(typeof m!="object"&&typeof m!="function"&&m!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,m,v,"setState")},g.prototype.forceUpdate=function(m){this.updater.enqueueForceUpdate(this,m,"forceUpdate")},S.prototype=g.prototype;var k=w.prototype=new S;k.constructor=w,f(k,g.prototype),k.isPureReactComponent=!0;var E=Array.isArray,y=Object.prototype.hasOwnProperty,_={current:null},x={key:!0,ref:!0,__self:!0,__source:!0};function b(m,v,N){var U,B={},F=null,j=null;if(v!=null)for(U in v.ref!==void 0&&(j=v.ref),v.key!==void 0&&(F=""+v.key),v)y.call(v,U)&&!x.hasOwnProperty(U)&&(B[U]=v[U]);var G=arguments.length-2;if(G===1)B.children=N;else if(1<G){for(var K=Array(G),J=0;J<G;J++)K[J]=arguments[J+2];B.children=K}if(m&&m.defaultProps)for(U in G=m.defaultProps)B[U]===void 0&&(B[U]=G[U]);return{$$typeof:t,type:m,key:F,ref:j,props:B,_owner:_.current}}function M(m){return typeof m=="object"&&m!==null&&m.$$typeof===t}var C=/\/+/g;function R(m,v){return typeof m=="object"&&m!==null&&m.key!=null?function(N){var U={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(B){return U[B]})}(""+m.key):v.toString(36)}function T(m,v,N,U,B){var F=typeof m;F!=="undefined"&&F!=="boolean"||(m=null);var j=!1;if(m===null)j=!0;else switch(F){case"string":case"number":j=!0;break;case"object":switch(m.$$typeof){case t:case e:j=!0}}if(j)return B=B(j=m),m=U===""?"."+R(j,0):U,E(B)?(N="",m!=null&&(N=m.replace(C,"$&/")+"/"),T(B,v,N,"",function(J){return J})):B!=null&&(M(B)&&(B=function(J,nt){return{$$typeof:t,type:J.type,key:nt,ref:J.ref,props:J.props,_owner:J._owner}}(B,N+(!B.key||j&&j.key===B.key?"":(""+B.key).replace(C,"$&/")+"/")+m)),v.push(B)),1;if(j=0,U=U===""?".":U+":",E(m))for(var G=0;G<m.length;G++){var K=U+R(F=m[G],G);j+=T(F,v,N,K,B)}else if(K=function(J){return J===null||typeof J!="object"?null:typeof(J=l&&J[l]||J["@@iterator"])=="function"?J:null}(m),typeof K=="function")for(m=K.call(m),G=0;!(F=m.next()).done;)j+=T(F=F.value,v,N,K=U+R(F,G++),B);else if(F==="object")throw v=String(m),Error("Objects are not valid as a React child (found: "+(v==="[object Object]"?"object with keys {"+Object.keys(m).join(", ")+"}":v)+"). If you meant to render a collection of children, use an array instead.");return j}function I(m,v,N){if(m==null)return m;var U=[],B=0;return T(m,U,"","",function(F){return v.call(N,F,B++)}),U}function O(m){if(m._status===-1){var v=m._result;(v=v()).then(function(N){m._status!==0&&m._status!==-1||(m._status=1,m._result=N)},function(N){m._status!==0&&m._status!==-1||(m._status=2,m._result=N)}),m._status===-1&&(m._status=0,m._result=v)}if(m._status===1)return m._result.default;throw m._result}var P={current:null},L={transition:null},$={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:L,ReactCurrentOwner:_};function D(){throw Error("act(...) is not supported in production builds of React.")}return ut.Children={map:I,forEach:function(m,v,N){I(m,function(){v.apply(this,arguments)},N)},count:function(m){var v=0;return I(m,function(){v++}),v},toArray:function(m){return I(m,function(v){return v})||[]},only:function(m){if(!M(m))throw Error("React.Children.only expected to receive a single React element child.");return m}},ut.Component=g,ut.Fragment=n,ut.Profiler=o,ut.PureComponent=w,ut.StrictMode=r,ut.Suspense=a,ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$,ut.act=D,ut.cloneElement=function(m,v,N){if(m==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+m+".");var U=f({},m.props),B=m.key,F=m.ref,j=m._owner;if(v!=null){if(v.ref!==void 0&&(F=v.ref,j=_.current),v.key!==void 0&&(B=""+v.key),m.type&&m.type.defaultProps)var G=m.type.defaultProps;for(K in v)y.call(v,K)&&!x.hasOwnProperty(K)&&(U[K]=v[K]===void 0&&G!==void 0?G[K]:v[K])}var K=arguments.length-2;if(K===1)U.children=N;else if(1<K){G=Array(K);for(var J=0;J<K;J++)G[J]=arguments[J+2];U.children=G}return{$$typeof:t,type:m.type,key:B,ref:F,props:U,_owner:j}},ut.createContext=function(m){return(m={$$typeof:i,_currentValue:m,_currentValue2:m,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:m},m.Consumer=m},ut.createElement=b,ut.createFactory=function(m){var v=b.bind(null,m);return v.type=m,v},ut.createRef=function(){return{current:null}},ut.forwardRef=function(m){return{$$typeof:c,render:m}},ut.isValidElement=M,ut.lazy=function(m){return{$$typeof:d,_payload:{_status:-1,_result:m},_init:O}},ut.memo=function(m,v){return{$$typeof:u,type:m,compare:v===void 0?null:v}},ut.startTransition=function(m){var v=L.transition;L.transition={};try{m()}finally{L.transition=v}},ut.unstable_act=D,ut.useCallback=function(m,v){return P.current.useCallback(m,v)},ut.useContext=function(m){return P.current.useContext(m)},ut.useDebugValue=function(){},ut.useDeferredValue=function(m){return P.current.useDeferredValue(m)},ut.useEffect=function(m,v){return P.current.useEffect(m,v)},ut.useId=function(){return P.current.useId()},ut.useImperativeHandle=function(m,v,N){return P.current.useImperativeHandle(m,v,N)},ut.useInsertionEffect=function(m,v){return P.current.useInsertionEffect(m,v)},ut.useLayoutEffect=function(m,v){return P.current.useLayoutEffect(m,v)},ut.useMemo=function(m,v){return P.current.useMemo(m,v)},ut.useReducer=function(m,v,N){return P.current.useReducer(m,v,N)},ut.useRef=function(m){return P.current.useRef(m)},ut.useState=function(m){return P.current.useState(m)},ut.useSyncExternalStore=function(m,v,N){return P.current.useSyncExternalStore(m,v,N)},ut.useTransition=function(){return P.current.useTransition()},ut.version="18.3.1",ut}function Nh(){return Ga||(Ga=1,Ka.exports=Dh()),Ka.exports}var Pt=Nh();const $h=zl(Pt),dv=Ph({__proto__:null,default:$h},[Pt]),H=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Q=globalThis,Se="9.44.2";function Ee(){return Or(Q),Q}function Or(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||Se,e[Se]=e[Se]||{}}function _r(t,e,n=Q){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[Se]=r[Se]||{};return o[t]||(o[t]=e())}const na=["debug","info","warn","error","log","assert","trace"],Lo={};function qe(t){if(!("console"in Q))return t();const e=Q.console,n={},r=Object.keys(Lo);r.forEach(o=>{const s=Lo[o];n[o]=e[o],e[o]=s});try{return t()}finally{r.forEach(o=>{e[o]=n[o]})}}function Wl(){return ui().enabled}function Is(t,...e){H&&Wl()&&qe(()=>{Q.console[t](`Sentry Logger [${t}]:`,...e)})}function ui(){return H?_r("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const A={enable:function(){ui().enabled=!0},disable:function(){ui().enabled=!1},isEnabled:Wl,log:function(...t){Is("log",...t)},warn:function(...t){Is("warn",...t)},error:function(...t){Is("error",...t)}},le="?",Ja=/\(error: (.*)\)/,Ya=/captureMessage|captureException/;function ql(...t){const e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{const s=[],i=n.split(`
|
|
2
|
+
`);for(let c=r;c<i.length;c++){const a=i[c];if(a.length>1024)continue;const u=Ja.test(a)?a.replace(Ja,"$1"):a;if(!u.match(/\S*Error: /)){for(const d of e){const l=d(u);if(l){s.push(l);break}}if(s.length>=50+o)break}}return function(c){if(!c.length)return[];const a=Array.from(c);return/sentryWrapped/.test(qr(a).function||"")&&a.pop(),a.reverse(),Ya.test(qr(a).function||"")&&(a.pop(),Ya.test(qr(a).function||"")&&a.pop()),a.slice(0,50).map(u=>({...u,filename:u.filename||qr(a).filename,function:u.function||le}))}(s.slice(o))}}function qr(t){return t[t.length-1]||{}}const Xa="<anonymous>";function xe(t){try{return t&&typeof t=="function"&&t.name||Xa}catch{return Xa}}function li(t){const e=t.exception;if(e){const n=[];try{return e.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const fo={},Za={};function Ve(t,e){fo[t]=fo[t]||[],fo[t].push(e)}function Ge(t,e){if(!Za[t]){Za[t]=!0;try{e()}catch(n){H&&A.error(`Error while instrumenting ${t}`,n)}}}function Xt(t,e){const n=t&&fo[t];if(n)for(const r of n)try{r(e)}catch(o){H&&A.error(`Error while triggering instrumentation handler.
|
|
3
|
+
Type: ${t}
|
|
4
|
+
Name: ${xe(r)}
|
|
5
|
+
Error:`,o)}}let Ms=null;function Vl(t){const e="error";Ve(e,t),Ge(e,Fh)}function Fh(){Ms=Q.onerror,Q.onerror=function(t,e,n,r,o){return Xt("error",{column:r,error:o,line:n,msg:t,url:e}),!!Ms&&Ms.apply(this,arguments)},Q.onerror.__SENTRY_INSTRUMENTED__=!0}let Rs=null;function Gl(t){const e="unhandledrejection";Ve(e,t),Ge(e,Uh)}function Uh(){Rs=Q.onunhandledrejection,Q.onunhandledrejection=function(t){return Xt("unhandledrejection",t),!Rs||Rs.apply(this,arguments)},Q.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Kl=Object.prototype.toString;function ye(t){switch(Kl.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Te(t,Error)}}function Qn(t,e){return Kl.call(t)===`[object ${e}]`}function Jl(t){return Qn(t,"ErrorEvent")}function Qa(t){return Qn(t,"DOMError")}function re(t){return Qn(t,"String")}function ls(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function Bn(t){return t===null||ls(t)||typeof t!="object"&&typeof t!="function"}function Ce(t){return Qn(t,"Object")}function ds(t){return typeof Event<"u"&&Te(t,Event)}function Ar(t){return!!(t?.then&&typeof t.then=="function")}function Te(t,e){try{return t instanceof e}catch{return!1}}function Yl(t){return!(typeof t!="object"||t===null||!t.__isVue&&!t._isVue)}function Xl(t){return typeof Request<"u"&&Te(t,Request)}const ra=Q;function Qt(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,o=[];let s=0,i=0;const c=" > ",a=c.length;let u;const d=Array.isArray(e)?e:e.keyAttrs,l=!Array.isArray(e)&&e.maxStringLength||80;for(;n&&s++<r&&(u=Bh(n,d),!(u==="html"||s>1&&i+o.length*a+u.length>=l));)o.push(u),i+=u.length,n=n.parentNode;return o.reverse().join(c)}catch{return"<unknown>"}}function Bh(t,e){const n=t,r=[];if(!n?.tagName)return"";if(ra.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 o=e?.length?e.filter(i=>n.getAttribute(i)).map(i=>[i,n.getAttribute(i)]):null;if(o?.length)o.forEach(i=>{r.push(`[${i[0]}="${i[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const i=n.className;if(i&&re(i)){const c=i.split(/\s+/);for(const a of c)r.push(`.${a}`)}}const s=["aria-label","type","name","title","alt"];for(const i of s){const c=n.getAttribute(i);c&&r.push(`[${i}="${c}"]`)}return r.join("")}function mn(){try{return ra.document.location.href}catch{return""}}function Zl(t){if(!ra.HTMLElement)return null;let e=t;for(let n=0;n<5;n++){if(!e)return null;if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null}function jn(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function Os(t,e){let n=t;const r=n.length;if(r<=150)return n;e>r&&(e=r);let o=Math.max(e-60,0);o<5&&(o=0);let s=Math.min(o+140,r);return s>r-5&&(s=r),s===r&&(o=Math.max(s-140,0)),n=n.slice(o,s),o>0&&(n=`'{snip} ${n}`),s<r&&(n+=" {snip}"),n}function Po(t,e){if(!Array.isArray(t))return"";const n=[];for(let r=0;r<t.length;r++){const o=t[r];try{Yl(o)?n.push("[VueViewModel]"):n.push(String(o))}catch{n.push("[value cannot be serialized]")}}return n.join(e)}function jh(t,e,n=!1){return!!re(t)&&(Qn(e,"RegExp")?e.test(t):!!re(e)&&(n?t===e:t.includes(e)))}function oe(t,e=[],n=!1){return e.some(r=>jh(t,r,n))}function zt(t,e,n){if(!(e in t))return;const r=t[e];if(typeof r!="function")return;const o=n(r);typeof o=="function"&&Ql(o,r);try{t[e]=o}catch{H&&A.log(`Failed to replace method "${e}" in object`,t)}}function qt(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{H&&A.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function Ql(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,qt(t,"__sentry_original__",e)}catch{}}function oa(t){return t.__sentry_original__}function td(t){if(ye(t))return{message:t.message,name:t.name,stack:t.stack,...ec(t)};if(ds(t)){const e={type:t.type,target:tc(t.target),currentTarget:tc(t.currentTarget),...ec(t)};return typeof CustomEvent<"u"&&Te(t,CustomEvent)&&(e.detail=t.detail),e}return t}function tc(t){try{return e=t,typeof Element<"u"&&Te(e,Element)?Qt(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}var e}function ec(t){if(typeof t=="object"&&t!==null){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function Wt(t=function(){const e=Q;return e.crypto||e.msCrypto}()){let e=()=>16*Math.random();try{if(t?.randomUUID)return t.randomUUID().replace(/-/g,"");t?.getRandomValues&&(e=()=>{const n=new Uint8Array(1);return t.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(15&e())>>n/4).toString(16))}function ed(t){return t.exception?.values?.[0]}function Je(t){const{message:e,event_id:n}=t;if(e)return e;const r=ed(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function di(t,e,n){const r=t.exception=t.exception||{},o=r.values=r.values||[],s=o[0]=o[0]||{};s.value||(s.value=e||""),s.type||(s.type="Error")}function Be(t,e){const n=ed(t);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...e},e&&"data"in e){const o={...r?.data,...e.data};n.mechanism.data=o}}function nc(t){if(function(e){try{return e.__sentry_captured__}catch{}}(t))return!0;try{qt(t,"__sentry_captured__",!0)}catch{}return!1}function cn(){return Date.now()/1e3}let rc,As;function xt(){return(rc??(rc=function(){const{performance:t}=Q;if(!t?.now||!t.timeOrigin)return cn;const e=t.timeOrigin;return()=>(e+t.now())/1e3}()))()}function Bt(){return As||(As=function(){const{performance:t}=Q;if(!t?.now)return[void 0,"none"];const e=36e5,n=t.now(),r=Date.now(),o=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,s=o<e,i=t.timing?.navigationStart,c=typeof i=="number"?Math.abs(i+n-r):e;return s||c<e?o<=c?[t.timeOrigin,"timeOrigin"]:[i,"navigationStart"]:[r,"dateNow"]}()),As[0]}function Hh(t){const e=xt(),n={sid:Wt(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(r){return{sid:`${r.sid}`,init:r.init,started:new Date(1e3*r.started).toISOString(),timestamp:new Date(1e3*r.timestamp).toISOString(),status:r.status,errors:r.errors,did:typeof r.did=="number"||typeof r.did=="string"?`${r.did}`:void 0,duration:r.duration,abnormal_mechanism:r.abnormal_mechanism,attrs:{release:r.release,environment:r.environment,ip_address:r.ipAddress,user_agent:r.userAgent}}}(n)};return t&&Hn(n,t),n}function Hn(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||xt(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:Wt()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{const n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function Lr(t,e,n=2){if(!e||typeof e!="object"||n<=0)return e;if(t&&Object.keys(e).length===0)return t;const r={...t};for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=Lr(r[o],e[o],n-1));return r}function Ie(){return Wt()}function Pr(){return Wt().substring(16)}const pi="_sentrySpan";function un(t,e){e?qt(t,pi,e):delete t[pi]}function vr(t){return t[pi]}class se{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:Ie(),sampleRand:Math.random()}}clone(){const e=new se;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,un(e,vr(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Hn(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,n){return this._tags={...this._tags,[e]:n},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,n){return this._extra={...this._extra,[e]:n},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts[e]=n,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const n=typeof e=="function"?e(this):e,r=n instanceof se?n.getScopeData():Ce(n)?e:void 0,{tags:o,extra:s,user:i,contexts:c,level:a,fingerprint:u=[],propagationContext:d}=r||{};return this._tags={...this._tags,...o},this._extra={...this._extra,...s},this._contexts={...this._contexts,...c},i&&Object.keys(i).length&&(this._user=i),a&&(this._level=a),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,un(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Ie(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(e,n){const r=typeof n=="number"?n:100;if(r<=0)return this;const o={timestamp:cn(),...e,message:e.message?jn(e.message,2048):e.message};return this._breadcrumbs.push(o),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(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:vr(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Lr(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){const r=n?.event_id||Wt();if(!this._client)return H&&A.warn("No client configured on scope - will not capture exception!"),r;const o=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:o,...n,event_id:r},this),r}captureMessage(e,n,r){const o=r?.event_id||Wt();if(!this._client)return H&&A.warn("No client configured on scope - will not capture message!"),o;const s=new Error(e);return this._client.captureMessage(e,n,{originalException:e,syntheticException:s,...r,event_id:o},this),o}captureEvent(e,n){const r=n?.event_id||Wt();return this._client?(this._client.captureEvent(e,{...n,event_id:r},this),r):(H&&A.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}class zh{constructor(e,n){let r,o;r=e||new se,o=n||new se,this._stack=[{scope:r}],this._isolationScope=o}withScope(e){const n=this._pushScope();let r;try{r=e(n)}catch(o){throw this._popScope(),o}return Ar(r)?r.then(o=>(this._popScope(),o),o=>{throw this._popScope(),o}):(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 e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function zn(){const t=Or(Ee());return t.stack=t.stack||new zh(_r("defaultCurrentScope",()=>new se),_r("defaultIsolationScope",()=>new se))}function Wh(t){return zn().withScope(t)}function qh(t,e){const n=zn();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function oc(t){return zn().withScope(()=>t(zn().getIsolationScope()))}function je(t){const e=Or(t);return e.acs?e.acs:{withIsolationScope:oc,withScope:Wh,withSetScope:qh,withSetIsolationScope:(n,r)=>oc(r),getCurrentScope:()=>zn().getScope(),getIsolationScope:()=>zn().getIsolationScope()}}function et(){return je(Ee()).getCurrentScope()}function Dt(){return je(Ee()).getIsolationScope()}function br(){return _r("globalScope",()=>new se)}function Gt(...t){const e=je(Ee());if(t.length===2){const[n,r]=t;return n?e.withSetScope(n,r):e.withScope(r)}return e.withScope(t[0])}function W(){return et().getClient()}function nd(t){const e=t.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:o}=e,s={trace_id:n,span_id:o||Pr()};return r&&(s.parent_span_id=r),s}const kt="sentry.source",ps="sentry.sample_rate",rd="sentry.previous_trace_sample_rate",Ot="sentry.op",lt="sentry.origin",Do="sentry.idle_span_finish_reason",Dr="sentry.measurement_unit",Nr="sentry.measurement_value",fi="sentry.custom_span_name",hi="sentry.profile_id",Wn="sentry.exclusive_time",Vh="http.request.method",Gh="url.full",Kh="sentry.link.type";function od(t){if(t<400&&t>=100)return{code:1};if(t>=400&&t<500)switch(t){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(t>=500&&t<600)switch(t){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"unknown_error"}}function Sr(t,e){t.setAttribute("http.response.status_code",e);const n=od(e);n.message!=="unknown_error"&&t.setStatus(n)}const sd="_sentryScope",id="_sentryIsolationScope";function No(t){return{scope:t[sd],isolationScope:t[id]}}const ad="sentry-",Jh=/^sentry-/;function cd(t){const e=function(r){if(!(!r||!re(r)&&!Array.isArray(r)))return Array.isArray(r)?r.reduce((o,s)=>{const i=sc(s);return Object.entries(i).forEach(([c,a])=>{o[c]=a}),o},{}):sc(r)}(t);if(!e)return;const n=Object.entries(e).reduce((r,[o,s])=>(o.match(Jh)&&(r[o.slice(7)]=s),r),{});return Object.keys(n).length>0?n:void 0}function ud(t){if(t)return function(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((n,[r,o],s)=>{const i=`${encodeURIComponent(r)}=${encodeURIComponent(o)}`,c=s===0?i:`${n},${i}`;return c.length>8192?(H&&A.warn(`Not adding key: ${r} with val: ${o} to baggage header due to exceeding baggage size limits.`),n):c},"")}(Object.entries(t).reduce((e,[n,r])=>(r&&(e[`${ad}${n}`]=r),e),{}))}function sc(t){return t.split(",").map(e=>e.split("=").map(n=>{try{return decodeURIComponent(n.trim())}catch{return}})).reduce((e,[n,r])=>(n&&r&&(e[n]=r),e),{})}function ln(t){if(typeof t=="boolean")return Number(t);const e=typeof t=="string"?parseFloat(t):t;return typeof e!="number"||isNaN(e)||e<0||e>1?void 0:e}const ld=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function dd(t,e){const n=function(a){if(!a)return;const u=a.match(ld);if(!u)return;let d;return u[3]==="1"?d=!0:u[3]==="0"&&(d=!1),{traceId:u[1],parentSampled:d,parentSpanId:u[2]}}(t),r=cd(e);if(!n?.traceId)return{traceId:Ie(),sampleRand:Math.random()};const o=function(a,u){const d=ln(u?.sample_rand);if(d!==void 0)return d;const l=ln(u?.sample_rate);return l&&a?.parentSampled!==void 0?a.parentSampled?Math.random()*l:l+Math.random()*(1-l):Math.random()}(n,r);r&&(r.sample_rand=o.toString());const{traceId:s,parentSpanId:i,parentSampled:c}=n;return{traceId:s,parentSpanId:i,sampled:c,dsc:r||{},sampleRand:o}}function pd(t=Ie(),e=Pr(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${t}-${e}${r}`}let ic=!1;function Yh(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:o,parent_span_id:s,status:i,origin:c,links:a}=Z(t);return{parent_span_id:s,span_id:e,trace_id:n,data:r,op:o,status:i,origin:c,links:a}}function fd(t){const{spanId:e,traceId:n,isRemote:r}=t.spanContext(),o=r?e:Z(t).parent_span_id,s=No(t).scope;return{parent_span_id:o,span_id:r?s?.getPropagationContext().propagationSpanId||Pr():e,trace_id:n}}function hd(t){const{traceId:e,spanId:n}=t.spanContext();return pd(e,n,sn(t))}function md(t){return t&&t.length>0?t.map(({context:{spanId:e,traceId:n,traceFlags:r,...o},attributes:s})=>({span_id:e,trace_id:n,sampled:r===1,attributes:s,...o})):void 0}function on(t){return typeof t=="number"?ac(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?ac(t.getTime()):xt()}function ac(t){return t>9999999999?t/1e3:t}function Z(t){if(function(r){return typeof r.getSpanJSON=="function"}(t))return t.getSpanJSON();const{spanId:e,traceId:n}=t.spanContext();if(function(r){const o=r;return!!(o.attributes&&o.startTime&&o.name&&o.endTime&&o.status)}(t)){const{attributes:r,startTime:o,name:s,endTime:i,status:c,links:a}=t;return{span_id:e,trace_id:n,data:r,description:s,parent_span_id:"parentSpanId"in t?t.parentSpanId:"parentSpanContext"in t?t.parentSpanContext?.spanId:void 0,start_timestamp:on(o),timestamp:on(i)||void 0,status:gd(c),op:r[Ot],origin:r[lt],links:md(a)}}return{span_id:e,trace_id:n,start_timestamp:0,data:{}}}function sn(t){const{traceFlags:e}=t.spanContext();return e===1}function gd(t){if(t&&t.code!==0)return t.code===1?"ok":t.message||"unknown_error"}const an="_sentryChildSpans",mi="_sentryRootSpan";function cc(t,e){const n=t[mi]||t;qt(e,mi,n),t[an]?t[an].add(e):qt(t,an,new Set([e]))}function lr(t){const e=new Set;return function n(r){if(!e.has(r)&&sn(r)){e.add(r);const o=r[an]?Array.from(r[an]):[];for(const s of o)n(s)}}(t),Array.from(e)}function At(t){return t[mi]||t}function It(){const t=je(Ee());return t.getActiveSpan?t.getActiveSpan():vr(et())}function gi(){ic||(qe(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),ic=!0)}let uc=!1;function yd(){function t(){const e=It(),n=e&&At(e);if(n){const r="internal_error";H&&A.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:2,message:r})}}uc||(t.tag="sentry_tracingErrorCallback",uc=!0,Vl(t),Gl(t))}function He(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const e=t||W()?.getOptions();return!(!e||e.tracesSampleRate==null&&!e.tracesSampler)}const fs="production",Xh=/^o(\d+)\./,Zh=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function dn(t,e=!1){const{host:n,path:r,pass:o,port:s,projectId:i,protocol:c,publicKey:a}=t;return`${c}://${a}${e&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${i}`}function _d(t){const e=Zh.exec(t);if(!e)return void qe(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});const[n,r,o="",s="",i="",c=""]=e.slice(1);let a="",u=c;const d=u.split("/");if(d.length>1&&(a=d.slice(0,-1).join("/"),u=d.pop()),u){const l=u.match(/^\d+/);l&&(u=l[0])}return vd({host:s,pass:o,path:a,projectId:u,port:i,protocol:n,publicKey:r})}function vd(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function bd(t){const e=typeof t=="string"?_d(t):vd(t);if(e&&function(n){if(!H)return!0;const{port:r,projectId:o,protocol:s}=n;return!(["protocol","publicKey","host","projectId"].find(i=>!n[i]&&(A.error(`Invalid Sentry Dsn: ${i} missing`),!0))||(o.match(/^\d+$/)?function(i){return i==="http"||i==="https"}(s)?r&&isNaN(parseInt(r,10))&&(A.error(`Invalid Sentry Dsn: Invalid port ${r}`),1):(A.error(`Invalid Sentry Dsn: Invalid protocol ${s}`),1):(A.error(`Invalid Sentry Dsn: Invalid projectId ${o}`),1)))}(e))return e}const Sd="_frozenDsc";function ho(t,e){qt(t,Sd,e)}function wd(t,e){const n=e.getOptions(),{publicKey:r,host:o}=e.getDsn()||{};let s;n.orgId?s=String(n.orgId):o&&(s=function(c){return c.match(Xh)?.[1]}(o));const i={environment:n.environment||fs,release:n.release,public_key:r,trace_id:t,org_id:s};return e.emit("createDsc",i),i}function sa(t,e){const n=e.getPropagationContext();return n.dsc||wd(n.traceId,t)}function ie(t){const e=W();if(!e)return{};const n=At(t),r=Z(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o[ps]??o[rd];function c(h){return typeof i!="number"&&typeof i!="string"||(h.sample_rate=`${i}`),h}const a=n[Sd];if(a)return c(a);const u=s?.get("sentry.dsc"),d=u&&cd(u);if(d)return c(d);const l=wd(t.spanContext().traceId,e),p=o[kt],f=r.description;return p!=="url"&&f&&(l.transaction=f),He()&&(l.sampled=String(sn(n)),l.sample_rand=s?.get("sentry.sample_rand")??No(n).scope?.getPropagationContext().sampleRand.toString()),c(l),e.emit("createDsc",l,n),l}class Me{constructor(e={}){this._traceId=e.traceId||Ie(),this._spanId=e.spanId||Pr()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,n){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,n,r){return this}addLink(e){return this}addLinks(e){return this}recordException(e,n){}}const lc=globalThis||self;function Kt(t,e=100,n=1/0){try{return yi("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function kd(t,e=3,n=102400){const r=Kt(t,e);return o=r,function(s){return~-encodeURI(s).split(/%..|./).length}(JSON.stringify(o))>n?kd(t,e-1,n):r;var o}function yi(t,e,n=1/0,r=1/0,o=function(){const s=new WeakSet;function i(a){return!!s.has(a)||(s.add(a),!1)}function c(a){s.delete(a)}return[i,c]}()){const[s,i]=o;if(e==null||["boolean","string"].includes(typeof e)||typeof e=="number"&&Number.isFinite(e))return e;const c=function(f,h){try{if(f==="domain"&&h&&typeof h=="object"&&h._events)return"[Domain]";if(f==="domainEmitter")return"[DomainEmitter]";if(lc!==void 0&&h===lc)return"[Global]";if(typeof window<"u"&&h===window)return"[Window]";if(typeof document<"u"&&h===document)return"[Document]";if(Yl(h))return"[VueViewModel]";if(Ce(g=h)&&"nativeEvent"in g&&"preventDefault"in g&&"stopPropagation"in g)return"[SyntheticEvent]";if(typeof h=="number"&&!Number.isFinite(h))return`[${h}]`;if(typeof h=="function")return`[Function: ${xe(h)}]`;if(typeof h=="symbol")return`[${String(h)}]`;if(typeof h=="bigint")return`[BigInt: ${String(h)}]`;const S=function(w){const k=Object.getPrototypeOf(w);return k?.constructor?k.constructor.name:"null prototype"}(h);return/^HTML(\w*)Element$/.test(S)?`[HTMLElement: ${S}]`:`[object ${S}]`}catch(S){return`**non-serializable** (${S})`}var g}(t,e);if(!c.startsWith("[object "))return c;if(e.__sentry_skip_normalization__)return e;const a=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:n;if(a===0)return c.replace("object ","");if(s(e))return"[Circular ~]";const u=e;if(u&&typeof u.toJSON=="function")try{return yi("",u.toJSON(),a-1,r,o)}catch{}const d=Array.isArray(e)?[]:{};let l=0;const p=td(e);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]=yi(f,h,a-1,r,o),l++}return i(e),d}function we(t,e=[]){return[t,e]}function Qh(t,e){const[n,r]=t;return[n,[...r,e]]}function pn(t,e){const n=t[1];for(const r of n)if(e(r,r[0].type))return!0;return!1}function dc(t,e){return pn(t,(n,r)=>e.includes(r))}function $o(t){const e=Or(Q);return e.encodePolyfill?e.encodePolyfill(t):new TextEncoder().encode(t)}function Fo(t){const[e,n]=t;let r=JSON.stringify(e);function o(s){typeof r=="string"?r=typeof s=="string"?r+s:[$o(r),s]:r.push(typeof s=="string"?$o(s):s)}for(const s of n){const[i,c]=s;if(o(`
|
|
6
|
+
${JSON.stringify(i)}
|
|
7
|
+
`),typeof c=="string"||c instanceof Uint8Array)o(c);else{let a;try{a=JSON.stringify(c)}catch{a=JSON.stringify(Kt(c))}o(a)}}return typeof r=="string"?r:function(s){const i=s.reduce((u,d)=>u+d.length,0),c=new Uint8Array(i);let a=0;for(const u of s)c.set(u,a),a+=u.length;return c}(r)}function tm(t){let e=typeof t=="string"?$o(t):t;function n(i){const c=e.subarray(0,i);return e=e.subarray(i+1),c}function r(){let i=e.indexOf(10);return i<0&&(i=e.length),JSON.parse(function(c){const a=Or(Q);return a.decodePolyfill?a.decodePolyfill(c):new TextDecoder().decode(c)}(n(i)))}const o=r(),s=[];for(;e.length;){const i=r(),c=typeof i.length=="number"?i.length:void 0;s.push([i,c?n(c):r()])}return[o,s]}function em(t){return[{type:"span"},t]}function nm(t){const e=typeof t.data=="string"?$o(t.data):t.data;return[{type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType},e]}const rm={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function pc(t){return rm[t]}function _i(t){if(!t?.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function Ed(t,e,n,r){const o=t.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:dn(r)},...o&&{trace:o}}}function xd(t,e,n,r=It()){const o=r&&At(r);o&&(H&&A.log(`[Measurement] Setting measurement on root span: ${t} = ${e} ${n}`),o.addEvent(t,{[Nr]:e,[Dr]:n}))}function fc(t){if(!t||t.length===0)return;const e={};return t.forEach(n=>{const r=n.attributes||{},o=r[Dr],s=r[Nr];typeof o=="string"&&typeof s=="number"&&(e[n.name]={value:s,unit:o})}),e}class $r{constructor(e={}){this._traceId=e.traceId||Ie(),this._spanId=e.spanId||Pr(),this._startTime=e.startTimestamp||xt(),this._links=e.links,this._attributes={},this.setAttributes({[lt]:"manual",[Ot]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._links?this._links.push(e):this._links=[e],this}addLinks(e){return this._links?this._links.push(...e):this._links=e,this}recordException(e,n){}spanContext(){const{_spanId:e,_traceId:n,_sampled:r}=this;return{spanId:e,traceId:n,traceFlags:r?1:0}}setAttribute(e,n){return n===void 0?delete this._attributes[e]:this._attributes[e]=n,this}setAttributes(e){return Object.keys(e).forEach(n=>this.setAttribute(n,e[n])),this}updateStartTime(e){this._startTime=on(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(kt,"custom"),this}end(e){this._endTime||(this._endTime=on(e),function(n){if(!H)return;const{description:r="< unknown name >",op:o="< unknown op >"}=Z(n),{spanId:s}=n.spanContext(),i=`[Tracing] Finishing "${o}" ${At(n)===n?"root ":""}span "${r}" with ID ${s}`;A.log(i)}(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Ot],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:gd(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[lt],profile_id:this._attributes[hi],exclusive_time:this._attributes[Wn],measurements:fc(this._events),is_segment:this._isStandaloneSpan&&At(this)===this||void 0,segment_id:this._isStandaloneSpan?At(this).spanContext().spanId:void 0,links:md(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,n,r){H&&A.log("[Tracing] Adding an event to span:",e);const o=hc(n)?n:r||xt(),s=hc(n)?{}:n||{},i={name:e,time:on(o),attributes:s};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=W();if(e&&e.emit("spanEnd",this),!(this._isStandaloneSpan||this===At(this)))return;if(this._isStandaloneSpan)return void(this._sampled?function(r){const o=W();if(!o)return;const s=r[1];if(!s||s.length===0)return void o.recordDroppedEvent("before_send","span");o.sendEnvelope(r)}(function(r,o){const s=ie(r[0]),i=o?.getDsn(),c=o?.getOptions().tunnel,a={sent_at:new Date().toISOString(),...function(p){return!!p.trace_id&&!!p.public_key}(s)&&{trace:s},...!!c&&i&&{dsn:dn(i)}},u=o?.getOptions().beforeSendSpan,d=u?p=>{const f=Z(p);return u(f)||(gi(),f)}:Z,l=[];for(const p of r){const f=d(p);f&&l.push(em(f))}return we(a,l)}([this],e)):(H&&A.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span")));const n=this._convertSpanToTransaction();n&&(No(this).scope||et()).captureEvent(n)}_convertSpanToTransaction(){if(!mc(Z(this)))return;this._name||(H&&A.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:e,isolationScope:n}=No(this),r=e?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const o=lr(this).filter(a=>a!==this&&!function(u){return u instanceof $r&&u.isStandaloneSpan()}(a)).map(a=>Z(a)).filter(mc),s=this._attributes[kt];delete this._attributes[fi],o.forEach(a=>{delete a.data[fi]});const i={contexts:{trace:Yh(this)},spans:o.length>1e3?o.sort((a,u)=>a.start_timestamp-u.start_timestamp).slice(0,1e3):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:n,dynamicSamplingContext:ie(this)},request:r,...s&&{transaction_info:{source:s}}},c=fc(this._events);return c&&Object.keys(c).length&&(H&&A.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),i.measurements=c),i}}function hc(t){return t&&typeof t=="number"||t instanceof Date||Array.isArray(t)}function mc(t){return!!(t.start_timestamp&&t.timestamp&&t.span_id&&t.trace_id)}function Cd(t,e,n=()=>{}){let r;try{r=t()}catch(o){throw e(o),n(),o}return function(o,s,i){return Ar(o)?o.then(c=>(i(),c),c=>{throw s(c),i(),c}):(i(),o)}(r,e,n)}const Uo="__SENTRY_SUPPRESS_TRACING__";function hs(t,e){const n=wr();if(n.startSpan)return n.startSpan(t,e);const r=aa(t),{forceTransaction:o,parentSpan:s,scope:i}=t,c=i?.clone();return Gt(c,()=>Td(s)(()=>{const a=et(),u=ca(a,s),d=t.onlyIfParent&&!u?new Me:ia({parentSpan:u,spanArguments:r,forceTransaction:o,scope:a});return un(a,d),Cd(()=>e(d),()=>{const{status:l}=Z(d);!d.isRecording()||l&&l!=="ok"||d.setStatus({code:2,message:"internal_error"})},()=>{d.end()})}))}function Zt(t){const e=wr();if(e.startInactiveSpan)return e.startInactiveSpan(t);const n=aa(t),{forceTransaction:r,parentSpan:o}=t;return(t.scope?s=>Gt(t.scope,s):o!==void 0?s=>fn(o,s):s=>s())(()=>{const s=et(),i=ca(s,o);return t.onlyIfParent&&!i?new Me:ia({parentSpan:i,spanArguments:n,forceTransaction:r,scope:s})})}function fn(t,e){const n=wr();return n.withActiveSpan?n.withActiveSpan(t,e):Gt(r=>(un(r,t||void 0),e(r)))}function ia({parentSpan:t,spanArguments:e,forceTransaction:n,scope:r}){if(!He()){const i=new Me;return(n||!t)&&ho(i,{sampled:"false",sample_rate:"0",transaction:e.name,...ie(i)}),i}const o=Dt();let s;if(t&&!n)s=function(i,c,a){const{spanId:u,traceId:d}=i.spanContext(),l=!c.getScopeData().sdkProcessingMetadata[Uo]&&sn(i),p=l?new $r({...a,parentSpanId:u,traceId:d,sampled:l}):new Me({traceId:d});cc(i,p);const f=W();return f&&(f.emit("spanStart",p),a.endTimestamp&&f.emit("spanEnd",p)),p}(t,r,e),cc(t,s);else if(t){const i=ie(t),{traceId:c,spanId:a}=t.spanContext(),u=sn(t);s=gc({traceId:c,parentSpanId:a,...e},r,u),ho(s,i)}else{const{traceId:i,dsc:c,parentSpanId:a,sampled:u}={...o.getPropagationContext(),...r.getPropagationContext()};s=gc({traceId:i,parentSpanId:a,...e},r,u),c&&ho(s,c)}return function(i){if(!H)return;const{description:c="< unknown name >",op:a="< unknown op >",parent_span_id:u}=Z(i),{spanId:d}=i.spanContext(),l=sn(i),p=At(i),f=p===i,h=`[Tracing] Starting ${l?"sampled":"unsampled"} ${f?"root ":""}span`,g=[`op: ${a}`,`name: ${c}`,`ID: ${d}`];if(u&&g.push(`parent ID: ${u}`),!f){const{op:S,description:w}=Z(p);g.push(`root ID: ${p.spanContext().spanId}`),S&&g.push(`root op: ${S}`),w&&g.push(`root description: ${w}`)}A.log(`${h}
|
|
8
|
+
${g.join(`
|
|
9
|
+
`)}`)}(s),function(i,c,a){i&&(qt(i,id,a),qt(i,sd,c))}(s,r,o),s}function aa(t){const e={isStandalone:(t.experimental||{}).standalone,...t};if(t.startTime){const n={...e};return n.startTimestamp=on(t.startTime),delete n.startTime,n}return e}function wr(){return je(Ee())}function gc(t,e,n){const r=W(),o=r?.getOptions()||{},{name:s=""}=t,i={spanAttributes:{...t.attributes},spanName:s,parentSampled:n};r?.emit("beforeSampling",i,{decision:!1});const c=i.parentSampled??n,a=i.spanAttributes,u=e.getPropagationContext(),[d,l,p]=e.getScopeData().sdkProcessingMetadata[Uo]?[!1]:function(h,g,S){if(!He(h))return[!1];let w,k;typeof h.tracesSampler=="function"?(k=h.tracesSampler({...g,inheritOrSampleWith:_=>typeof g.parentSampleRate=="number"?g.parentSampleRate:typeof g.parentSampled=="boolean"?Number(g.parentSampled):_}),w=!0):g.parentSampled!==void 0?k=g.parentSampled:h.tracesSampleRate!==void 0&&(k=h.tracesSampleRate,w=!0);const E=ln(k);if(E===void 0)return H&&A.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(k)} of type ${JSON.stringify(typeof k)}.`),[!1];if(!E)return H&&A.log("[Tracing] Discarding transaction because "+(typeof h.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,E,w];const y=S<E;return y||H&&A.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(k)})`),[y,E,w]}(o,{name:s,parentSampled:c,attributes:a,parentSampleRate:ln(u.dsc?.sample_rate)},u.sampleRand),f=new $r({...t,attributes:{[kt]:"custom",[ps]:l!==void 0&&p?l:void 0,...a},sampled:d});return!d&&r&&(H&&A.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 ca(t,e){if(e)return e;if(e===null)return;const n=vr(t);if(!n)return;const r=W();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?At(n):n}function Td(t){return t!==void 0?e=>fn(t,e):e=>e()}const mo={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function yc(t,e={}){const n=new Map;let r,o=!1,s="externalFinish",i=!e.disableAutoFinish;const c=[],{idleTimeout:a=mo.idleTimeout,finalTimeout:u=mo.finalTimeout,childSpanTimeout:d=mo.childSpanTimeout,beforeSpanEnd:l}=e,p=W();if(!p||!He()){const y=new Me;return ho(y,{sample_rate:"0",sampled:"false",...ie(y)}),y}const f=et(),h=It(),g=function(y){const _=Zt(y);return un(et(),_),H&&A.log("[Tracing] Started span is an idle span"),_}(t);function S(){r&&(clearTimeout(r),r=void 0)}function w(y){S(),r=setTimeout(()=>{!o&&n.size===0&&i&&(s="idleTimeout",g.end(y))},a)}function k(y){r=setTimeout(()=>{!o&&i&&(s="heartbeatFailed",g.end(y))},d)}function E(y){o=!0,n.clear(),c.forEach(C=>C()),un(f,h);const _=Z(g),{start_timestamp:x}=_;if(!x)return;_.data[Do]||g.setAttribute(Do,s),A.log(`[Tracing] Idle span "${_.op}" finished`);const b=lr(g).filter(C=>C!==g);let M=0;b.forEach(C=>{C.isRecording()&&(C.setStatus({code:2,message:"cancelled"}),C.end(y),H&&A.log("[Tracing] Cancelling span since span ended early",JSON.stringify(C,void 0,2)));const R=Z(C),{timestamp:T=0,start_timestamp:I=0}=R,O=I<=y,P=T-I<=(u+a)/1e3;if(H){const L=JSON.stringify(C,void 0,2);O?P||A.log("[Tracing] Discarding span since it finished after idle span final timeout",L):A.log("[Tracing] Discarding span since it happened after idle span was finished",L)}P&&O||(function(L,$){L[an]&&L[an].delete($)}(g,C),M++)}),M>0&&g.setAttribute("sentry.idle_span_discarded_spans",M)}return g.end=new Proxy(g.end,{apply(y,_,x){if(l&&l(g),_ instanceof Me)return;const[b,...M]=x,C=on(b||xt()),R=lr(g).filter(L=>L!==g);if(!R.length)return E(C),Reflect.apply(y,_,[C,...M]);const T=R.map(L=>Z(L).timestamp).filter(L=>!!L),I=T.length?Math.max(...T):void 0,O=Z(g).start_timestamp,P=Math.min(O?O+u/1e3:1/0,Math.max(O||-1/0,Math.min(C,I||1/0)));return E(P),Reflect.apply(y,_,[P,...M])}}),c.push(p.on("spanStart",y=>{if(!(o||y===g||Z(y).timestamp||y instanceof $r&&y.isStandaloneSpan())){var _;lr(g).includes(y)&&(_=y.spanContext().spanId,S(),n.set(_,!0),k(xt()+d/1e3))}})),c.push(p.on("spanEnd",y=>{var _;o||(_=y.spanContext().spanId,n.has(_)&&n.delete(_),n.size===0&&w(xt()+a/1e3))})),c.push(p.on("idleSpanEnableAutoFinish",y=>{y===g&&(i=!0,w(),n.size&&k())})),e.disableAutoFinish||w(),setTimeout(()=>{o||(g.setStatus({code:2,message:"deadline_exceeded"}),s="finalTimeout",g.end())},u),g}function Re(t){return new ze(e=>{e(t)})}function Bo(t){return new ze((e,n)=>{n(t)})}class ze{constructor(e){this._state=0,this._handlers=[],this._runExecutor(e)}then(e,n){return new ze((r,o)=>{this._handlers.push([!1,s=>{if(e)try{r(e(s))}catch(i){o(i)}else r(s)},s=>{if(n)try{r(n(s))}catch(i){o(i)}else o(s)}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new ze((n,r)=>{let o,s;return this.then(i=>{s=!1,o=i,e&&e()},i=>{s=!0,o=i,e&&e()}).then(()=>{s?r(o):n(o)})})}_executeHandlers(){if(this._state===0)return;const e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===1&&n[1](this._value),this._state===2&&n[2](this._value),n[0]=!0)})}_runExecutor(e){const n=(s,i)=>{this._state===0&&(Ar(i)?i.then(r,o):(this._state=s,this._value=i,this._executeHandlers()))},r=s=>{n(1,s)},o=s=>{n(2,s)};try{e(r,o)}catch(s){o(s)}}}function vi(t,e,n,r=0){return new ze((o,s)=>{const i=t[r];if(e===null||typeof i!="function")o(e);else{const c=i({...e},n);H&&i.id&&c===null&&A.log(`Event processor "${i.id}" dropped event`),Ar(c)?c.then(a=>vi(t,a,n,r+1).then(o)).then(null,s):vi(t,c,n,r+1).then(o).then(null,s)}})}function om(t,e){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=e;(function(i,c){const{extra:a,tags:u,user:d,contexts:l,level:p,transactionName:f}=c;Object.keys(a).length&&(i.extra={...a,...i.extra}),Object.keys(u).length&&(i.tags={...u,...i.tags}),Object.keys(d).length&&(i.user={...d,...i.user}),Object.keys(l).length&&(i.contexts={...l,...i.contexts}),p&&(i.level=p),f&&i.type!=="transaction"&&(i.transaction=f)})(t,e),r&&function(i,c){i.contexts={trace:fd(c),...i.contexts},i.sdkProcessingMetadata={dynamicSamplingContext:ie(c),...i.sdkProcessingMetadata};const a=At(c),u=Z(a).description;u&&!i.transaction&&i.type==="transaction"&&(i.transaction=u)}(t,r),function(i,c){i.fingerprint=i.fingerprint?Array.isArray(i.fingerprint)?i.fingerprint:[i.fingerprint]:[],c&&(i.fingerprint=i.fingerprint.concat(c)),i.fingerprint.length||delete i.fingerprint}(t,n),function(i,c){const a=[...i.breadcrumbs||[],...c];i.breadcrumbs=a.length?a:void 0}(t,o),function(i,c){i.sdkProcessingMetadata={...i.sdkProcessingMetadata,...c}}(t,s)}function jo(t,e){const{extra:n,tags:r,user:o,contexts:s,level:i,sdkProcessingMetadata:c,breadcrumbs:a,fingerprint:u,eventProcessors:d,attachments:l,propagationContext:p,transactionName:f,span:h}=e;Vr(t,"extra",n),Vr(t,"tags",r),Vr(t,"user",o),Vr(t,"contexts",s),t.sdkProcessingMetadata=Lr(t.sdkProcessingMetadata,c,2),i&&(t.level=i),f&&(t.transactionName=f),h&&(t.span=h),a.length&&(t.breadcrumbs=[...t.breadcrumbs,...a]),u.length&&(t.fingerprint=[...t.fingerprint,...u]),d.length&&(t.eventProcessors=[...t.eventProcessors,...d]),l.length&&(t.attachments=[...t.attachments,...l]),t.propagationContext={...t.propagationContext,...p}}function Vr(t,e,n){t[e]=Lr(t[e],n,1)}let Gr,_c,Ls;function Id(t){const e=Q._sentryDebugIds;if(!e)return{};const n=Object.keys(e);return Ls&&n.length===_c||(_c=n.length,Ls=n.reduce((r,o)=>{Gr||(Gr={});const s=Gr[o];if(s)r[s[0]]=s[1];else{const i=t(o);for(let c=i.length-1;c>=0;c--){const a=i[c],u=a?.filename,d=e[o];if(u&&d){r[u]=d,Gr[o]=[u,d];break}}}return r},{})),Ls}function Md(t,e,n,r,o,s){const{normalizeDepth:i=3,normalizeMaxBreadth:c=1e3}=t,a={...e,event_id:e.event_id||n.event_id||Wt(),timestamp:e.timestamp||cn()},u=n.integrations||t.integrations.map(h=>h.name);(function(h,g){const{environment:S,release:w,dist:k,maxValueLength:E=250}=g;h.environment=h.environment||S||fs,!h.release&&w&&(h.release=w),!h.dist&&k&&(h.dist=k);const y=h.request;y?.url&&(y.url=jn(y.url,E))})(a,t),function(h,g){g.length>0&&(h.sdk=h.sdk||{},h.sdk.integrations=[...h.sdk.integrations||[],...g])}(a,u),o&&o.emit("applyFrameMetadata",e),e.type===void 0&&function(h,g){const S=Id(g);h.exception?.values?.forEach(w=>{w.stacktrace?.frames?.forEach(k=>{k.filename&&(k.debug_id=S[k.filename])})})}(a,t.stackParser);const d=function(h,g){if(!g)return h;const S=h?h.clone():new se;return S.update(g),S}(r,n.captureContext);n.mechanism&&Be(a,n.mechanism);const l=o?o.getEventProcessors():[],p=br().getScopeData();s&&jo(p,s.getScopeData()),d&&jo(p,d.getScopeData());const f=[...n.attachments||[],...p.attachments];return f.length&&(n.attachments=f),om(a,p),vi([...l,...p.eventProcessors],a,n).then(h=>(h&&function(g){const S={};if(g.exception?.values?.forEach(k=>{k.stacktrace?.frames?.forEach(E=>{E.debug_id&&(E.abs_path?S[E.abs_path]=E.debug_id:E.filename&&(S[E.filename]=E.debug_id),delete E.debug_id)})}),Object.keys(S).length===0)return;g.debug_meta=g.debug_meta||{},g.debug_meta.images=g.debug_meta.images||[];const w=g.debug_meta.images;Object.entries(S).forEach(([k,E])=>{w.push({type:"sourcemap",code_file:k,debug_id:E})})}(h),typeof i=="number"&&i>0?function(g,S,w){if(!g)return null;const k={...g,...g.breadcrumbs&&{breadcrumbs:g.breadcrumbs.map(E=>({...E,...E.data&&{data:Kt(E.data,S,w)}}))},...g.user&&{user:Kt(g.user,S,w)},...g.contexts&&{contexts:Kt(g.contexts,S,w)},...g.extra&&{extra:Kt(g.extra,S,w)}};return g.contexts?.trace&&k.contexts&&(k.contexts.trace=g.contexts.trace,g.contexts.trace.data&&(k.contexts.trace.data=Kt(g.contexts.trace.data,S,w))),g.spans&&(k.spans=g.spans.map(E=>({...E,...E.data&&{data:Kt(E.data,S,w)}}))),g.contexts?.flags&&k.contexts&&(k.contexts.flags=Kt(g.contexts.flags,3,w)),k}(h,i,c):h))}function sm(t){if(t)return function(e){return e instanceof se||typeof e=="function"}(t)||function(e){return Object.keys(e).some(n=>im.includes(n))}(t)?{captureContext:t}:t}const im=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function We(t,e){return et().captureException(t,sm(e))}function Ho(t,e){const n=typeof e=="string"?e:void 0,r=typeof e!="string"?{captureContext:e}:void 0;return et().captureMessage(t,n,r)}function kr(t,e){return et().captureEvent(t,e)}function ua(t,e){Dt().setContext(t,e)}function am(t,e){Dt().setTag(t,e)}function Rd(){return Dt().lastEventId()}function Od(){const t=W();return t?.getOptions().enabled!==!1&&!!t?.getTransport()}function Ad(t){Dt().addEventProcessor(t)}function bi(t){const e=Dt(),n=et(),{userAgent:r}=Q.navigator||{},o=Hh({user:n.getUser()||e.getUser(),...r&&{userAgent:r},...t}),s=e.getSession();return s?.status==="ok"&&Hn(s,{status:"exited"}),la(),e.setSession(o),o}function la(){const t=Dt(),e=et().getSession()||t.getSession();e&&function(n){let r={};n.status==="ok"&&(r={status:"exited"}),Hn(n,r)}(e),Ld(),t.setSession()}function Ld(){const t=Dt(),e=W(),n=t.getSession();n&&e&&e.captureSession(n)}function Si(t=!1){t?la():Ld()}function Pd(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function Dd(t,e,n){return e||`${function(r){return`${Pd(r)}${r.projectId}/envelope/`}(t)}?${function(r,o){const s={sentry_version:"7"};return r.publicKey&&(s.sentry_key=r.publicKey),o&&(s.sentry_client=`${o.name}/${o.version}`),new URLSearchParams(s).toString()}(t,n)}`}const vc=[];function cm(t){const e=t.defaultIntegrations||[],n=t.integrations;let r;if(e.forEach(o=>{o.isDefaultInstance=!0}),Array.isArray(n))r=[...e,...n];else if(typeof n=="function"){const o=n(e);r=Array.isArray(o)?o:[o]}else r=e;return function(o){const s={};return o.forEach(i=>{const{name:c}=i,a=s[c];a&&!a.isDefaultInstance&&i.isDefaultInstance||(s[c]=i)}),Object.values(s)}(r)}function bc(t,e){for(const n of e)n?.afterAllSetup&&n.afterAllSetup(t)}function Sc(t,e,n){if(n[e.name])H&&A.log(`Integration skipped because it was already installed: ${e.name}`);else{if(n[e.name]=e,vc.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),vc.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){const r=e.preprocessEvent.bind(e);t.on("preprocessEvent",(o,s)=>r(o,s,t))}if(typeof e.processEvent=="function"){const r=e.processEvent.bind(e),o=Object.assign((s,i)=>r(s,i,t),{id:e.name});t.addEventProcessor(o)}H&&A.log(`Integration installed: ${e.name}`)}}function wi(t){const e=W();e?e.addIntegration(t):H&&A.warn(`Cannot add integration "${t.name}" because no SDK Client is available.`)}function Nd(t){const e=[];t.message&&e.push(t.message);try{const n=t.exception.values[t.exception.values.length-1];n?.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`))}catch{}return e}const wc="Not capturing exception because it's already been captured.",kc="Discarded session because of missing or non-string release",$d=Symbol.for("SentryInternalError"),Fd=Symbol.for("SentryDoNotSendEventError");function Kr(t){return{message:t,[$d]:!0}}function Ps(t){return{message:t,[Fd]:!0}}function Ec(t){return!!t&&typeof t=="object"&&$d in t}function xc(t){return!!t&&typeof t=="object"&&Fd in t}class um{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=bd(e.dsn):H&&A.warn("No DSN provided, client will not send events."),this._dsn){const n=Dd(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}}captureException(e,n,r){const o=Wt();if(nc(e))return H&&A.log(wc),o;const s={event_id:o,...n};return this._process(this.eventFromException(e,s).then(i=>this._captureEvent(i,s,r))),s.event_id}captureMessage(e,n,r,o){const s={event_id:Wt(),...r},i=ls(e)?e:String(e),c=Bn(e)?this.eventFromMessage(i,n,s):this.eventFromException(e,s);return this._process(c.then(a=>this._captureEvent(a,s,o))),s.event_id}captureEvent(e,n,r){const o=Wt();if(n?.originalException&&nc(n.originalException))return H&&A.log(wc),o;const s={event_id:o,...n},i=e.sdkProcessingMetadata||{},c=i.capturedSpanScope,a=i.capturedSpanIsolationScope;return this._process(this._captureEvent(e,s,c||r,a)),s.event_id}captureSession(e){this.sendSession(e),Hn(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(e).then(r=>n.flush(e).then(o=>r&&o))):Re(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const n=this._integrations[e.name];Sc(this,e,this._integrations),n||bc(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let r=function(s,i,c,a){const u=_i(c),d=s.type&&s.type!=="replay_event"?s.type:"event";(function(p,f){f&&(p.sdk=p.sdk||{},p.sdk.name=p.sdk.name||f.name,p.sdk.version=p.sdk.version||f.version,p.sdk.integrations=[...p.sdk.integrations||[],...f.integrations||[]],p.sdk.packages=[...p.sdk.packages||[],...f.packages||[]])})(s,c?.sdk);const l=Ed(s,u,a,i);return delete s.sdkProcessingMetadata,we(l,[[{type:d},s]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const s of n.attachments||[])r=Qh(r,nm(s));const o=this.sendEnvelope(r);o&&o.then(s=>this.emit("afterSendEvent",e,s),null)}sendSession(e){const{release:n,environment:r=fs}=this._options;if("aggregates"in e){const s=e.attrs||{};if(!s.release&&!n)return void(H&&A.warn(kc));s.release=s.release||n,s.environment=s.environment||r,e.attrs=s}else{if(!e.release&&!n)return void(H&&A.warn(kc));e.release=e.release||n,e.environment=e.environment||r}this.emit("beforeSendSession",e);const o=function(s,i,c,a){const u=_i(c);return we({sent_at:new Date().toISOString(),...u&&{sdk:u},...!!a&&i&&{dsn:dn(i)}},["aggregates"in s?[{type:"sessions"},s]:[{type:"session"},s.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(e,n,r=1){if(this._options.sendClientReports){const o=`${e}:${n}`;H&&A.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(e,n){const r=this._hooks[e]=this._hooks[e]||[];return r.push(n),()=>{const o=r.indexOf(n);o>-1&&r.splice(o,1)}}emit(e,...n){const r=this._hooks[e];r&&r.forEach(o=>o(...n))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,n=>(H&&A.error("Error while sending envelope:",n),n)):(H&&A.error("Transport disabled"),Re({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(n,r){const o={};return r.forEach(s=>{s&&Sc(n,s,o)}),o}(this,e),bc(this,e)}_updateSessionFromEvent(e,n){let r=n.level==="fatal",o=!1;const s=n.exception?.values;if(s){o=!0;for(const c of s)if(c.mechanism?.handled===!1){r=!0;break}}const i=e.status==="ok";(i&&e.errors===0||i&&r)&&(Hn(e,{...r&&{status:"crashed"},errors:e.errors||Number(o||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new ze(n=>{let r=0;const o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),n(!0)):(r+=1,e&&r>=e&&(clearInterval(o),n(!1)))},1)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,n,r,o){const s=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i?.length&&(n.integrations=i),this.emit("preprocessEvent",e,n),e.type||o.setLastEventId(e.event_id||n.event_id),Md(s,e,n,r,this,o).then(c=>{if(c===null)return c;this.emit("postprocessEvent",c,n),c.contexts={trace:nd(r),...c.contexts};const a=sa(this,r);return c.sdkProcessingMetadata={dynamicSamplingContext:a,...c.sdkProcessingMetadata},c})}_captureEvent(e,n={},r=et(),o=Dt()){return H&&Ds(e)&&A.log(`Captured error event \`${Nd(e)[0]||"<unknown>"}\``),this._processEvent(e,n,r,o).then(s=>s.event_id,s=>{H&&(xc(s)?A.log(s.message):Ec(s)?A.warn(s.message):A.warn(s))})}_processEvent(e,n,r,o){const s=this.getOptions(),{sampleRate:i}=s,c=Cc(e),a=Ds(e),u=e.type||"error",d=`before send for type \`${u}\``,l=i===void 0?void 0:ln(i);if(a&&typeof l=="number"&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error"),Bo(Ps(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));const p=u==="replay_event"?"replay":u;return this._prepareEvent(e,n,r,o).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",p),Ps("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return f;const h=function(g,S,w,k){const{beforeSend:E,beforeSendTransaction:y,beforeSendSpan:_}=S;let x=w;if(Ds(x)&&E)return E(x,k);if(Cc(x)){if(_){const M=_(function(C){const{trace_id:R,parent_span_id:T,span_id:I,status:O,origin:P,data:L,op:$}=C.contexts?.trace??{};return{data:L??{},description:C.transaction,op:$,parent_span_id:T,span_id:I??"",start_timestamp:C.start_timestamp??0,status:O,timestamp:C.timestamp,trace_id:R??"",origin:P,profile_id:L?.[hi],exclusive_time:L?.[Wn],measurements:C.measurements,is_segment:!0}}(x));if(M?x=Lr(w,{type:"transaction",timestamp:(b=M).timestamp,start_timestamp:b.start_timestamp,transaction:b.description,contexts:{trace:{trace_id:b.trace_id,span_id:b.span_id,parent_span_id:b.parent_span_id,op:b.op,status:b.status,origin:b.origin,data:{...b.data,...b.profile_id&&{[hi]:b.profile_id},...b.exclusive_time&&{[Wn]:b.exclusive_time}}}},measurements:b.measurements}):gi(),x.spans){const C=[];for(const R of x.spans){const T=_(R);T?C.push(T):(gi(),C.push(R))}x.spans=C}}if(y){if(x.spans){const M=x.spans.length;x.sdkProcessingMetadata={...w.sdkProcessingMetadata,spanCountBeforeProcessing:M}}return y(x,k)}}var b;return x}(0,s,f,n);return function(g,S){const w=`${S} must return \`null\` or a valid event.`;if(Ar(g))return g.then(k=>{if(!Ce(k)&&k!==null)throw Kr(w);return k},k=>{throw Kr(`${S} rejected with ${k}`)});if(!Ce(g)&&g!==null)throw Kr(w);return g}(h,d)}).then(f=>{if(f===null){if(this.recordDroppedEvent("before_send",p),c){const S=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",S)}throw Ps(`${d} returned \`null\`, will not send event.`)}const h=r.getSession()||o.getSession();if(a&&h&&this._updateSessionFromEvent(h,f),c){const S=(f.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(f.spans?f.spans.length:0);S>0&&this.recordDroppedEvent("before_send","span",S)}const g=f.transaction_info;if(c&&g&&f.transaction!==e.transaction){const S="custom";f.transaction_info={...g,source:S}}return this.sendEvent(f,n),f}).then(null,f=>{throw xc(f)||Ec(f)?f:(this.captureException(f,{data:{__sentry__:!0},originalException:f}),Kr(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
10
|
+
Reason: ${f}`))})}_process(e){this._numProcessing++,e.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([n,r])=>{const[o,s]=n.split(":");return{reason:o,category:s,quantity:r}})}_flushOutcomes(){H&&A.log("Flushing outcomes...");const e=this._clearOutcomes();if(e.length===0)return void(H&&A.log("No outcomes to send"));if(!this._dsn)return void(H&&A.log("No dsn provided, will not send outcomes"));H&&A.log("Sending outcomes:",e);const n=(r=e,we((o=this._options.tunnel&&dn(this._dsn))?{dsn:o}:{},[[{type:"client_report"},{timestamp:cn(),discarded_events:r}]]));var r,o;this.sendEnvelope(n)}}function Ds(t){return t.type===void 0}function Cc(t){return t.type==="transaction"}const lm={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function Ae(t,e,n,r=!0){!n||t[e]&&!r||(t[e]=n)}function dm(t,e){const n=da(),r=Ud(t);r===void 0?n.set(t,[e]):(n.set(t,[...r,e]),r.length>=100&&go(t,r))}function ki(t,e=W(),n=et(),r=dm){if(!e)return void(H&&A.warn("No client available to capture log."));const{release:o,environment:s,enableLogs:i,beforeSendLog:c,_experiments:a}=e.getOptions();if(!(i??a?.enableLogs))return void(H&&A.warn("logging option not enabled, log will not be captured."));const u=c??a?.beforeSendLog,[,d]=function(C,R){return R?Gt(R,()=>{const T=It(),I=T?fd(T):nd(R);return[T?ie(T):sa(C,R),I]}):[void 0,void 0]}(e,n),l={...t.attributes},{user:{id:p,email:f,username:h}}=function(C){const R=br().getScopeData();return jo(R,Dt().getScopeData()),jo(R,C.getScopeData()),R}(n);Ae(l,"user.id",p,!1),Ae(l,"user.email",f,!1),Ae(l,"user.name",h,!1),Ae(l,"sentry.release",o),Ae(l,"sentry.environment",s);const{name:g,version:S}=e.getSdkMetadata()?.sdk??{};Ae(l,"sentry.sdk.name",g),Ae(l,"sentry.sdk.version",S);const w=t.message;if(ls(w)){const{__sentry_template_string__:C,__sentry_template_values__:R=[]}=w;l["sentry.message.template"]=C,R.forEach((T,I)=>{l[`sentry.message.parameter.${I}`]=T})}const k=vr(n);Ae(l,"sentry.trace.parent_span_id",k?.spanContext().spanId);const E={...t,attributes:l};e.emit("beforeCaptureLog",E);const y=u?qe(()=>u(E)):E;if(!y)return e.recordDroppedEvent("before_send","log_item",1),void(H&&A.warn("beforeSendLog returned null, log will not be captured."));const{level:_,message:x,attributes:b={},severityNumber:M}=y;r(e,{timestamp:xt(),level:_,body:x,trace_id:d?.trace_id,severity_number:M??lm[_],attributes:Object.keys(b).reduce((C,R)=>(C[R]=function(T){switch(typeof T){case"number":return Number.isInteger(T)?{value:T,type:"integer"}:{value:T,type:"double"};case"boolean":return{value:T,type:"boolean"};case"string":return{value:T,type:"string"};default:{let I="";try{I=JSON.stringify(T)??""}catch{}return{value:I,type:"string"}}}}(b[R]),C),{})}),e.emit("afterCaptureLog",y)}function go(t,e){const n=e??Ud(t)??[];if(n.length===0)return;const r=t.getOptions(),o=function(s,i,c,a){const u={};return i?.sdk&&(u.sdk={name:i.sdk.name,version:i.sdk.version}),c&&a&&(u.dsn=dn(a)),we(u,[(d=s,[{type:"log",item_count:d.length,content_type:"application/vnd.sentry.items.log+json"},{items:d}])]);var d}(n,r._metadata,r.tunnel,t.getDsn());da().set(t,[]),t.emit("flushLogs"),t.sendEnvelope(o)}function Ud(t){return da().get(t)}function da(){return _r("clientToLogBufferMap",()=>new WeakMap)}function Bd(t){et().setClient(t)}const jd=Symbol.for("SentryBufferFullError");function pm(t){const e=[];function n(r){return e.splice(e.indexOf(r),1)[0]||Promise.resolve(void 0)}return{$:e,add:function(r){if(!(t===void 0||e.length<t))return Bo(jd);const o=r();return e.indexOf(o)===-1&&e.push(o),o.then(()=>n(o)).then(null,()=>n(o).then(null,()=>{})),o},drain:function(r){return new ze((o,s)=>{let i=e.length;if(!i)return o(!0);const c=setTimeout(()=>{r&&r>0&&o(!1)},r);e.forEach(a=>{Re(a).then(()=>{--i||(clearTimeout(c),o(!0))},s)})})}}}function Hd(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${t}`);return isNaN(r)?6e4:r-e}function zd(t,e,n=Date.now()){return function(r,o){return r[o]||r.all||0}(t,e)>n}function Wd(t,{statusCode:e,headers:n},r=Date.now()){const o={...t},s=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(s)for(const c of s.trim().split(",")){const[a,u,,,d]=c.split(":",5),l=parseInt(a,10),p=1e3*(isNaN(l)?60:l);if(u)for(const f of u.split(";"))f==="metric_bucket"&&d&&!d.split(";").includes("custom")||(o[f]=r+p);else o.all=r+p}else i?o.all=r+Hd(i,r):e===429&&(o.all=r+6e4);return o}function qd(t,e,n=pm(t.bufferSize||64)){let r={};return{send:function(o){const s=[];if(pn(o,(a,u)=>{const d=pc(u);zd(r,d)?t.recordDroppedEvent("ratelimit_backoff",d):s.push(a)}),s.length===0)return Re({});const i=we(o[0],s),c=a=>{pn(i,(u,d)=>{t.recordDroppedEvent(a,pc(d))})};return n.add(()=>e({body:Fo(i)}).then(a=>(a.statusCode!==void 0&&(a.statusCode<200||a.statusCode>=300)&&H&&A.warn(`Sentry responded with status code ${a.statusCode} to sent event.`),r=Wd(r,a),a),a=>{throw c("network_error"),H&&A.error("Encountered error running transport request:",a),a})).then(a=>a,a=>{if(a===jd)return H&&A.error("Skipped sending event because buffer is full."),c("queue_overflow"),Re({});throw a})},flush:o=>n.drain(o)}}const Ns=5e3;function fm(t){function e(...n){H&&A.log("[Offline]:",...n)}return n=>{const r=t(n);if(!n.createStore)throw new Error("No `createStore` function was provided");const o=n.createStore(n);let s,i=Ns;function c(d){s&&clearTimeout(s),s=setTimeout(async()=>{s=void 0;const l=await o.shift();l&&(e("Attempting to send previously queued event"),l[0].sent_at=new Date().toISOString(),u(l,!0).catch(p=>{e("Failed to retry sending",p)}))},d),typeof s!="number"&&s.unref&&s.unref()}function a(){s||(c(i),i=Math.min(2*i,36e5))}async function u(d,l=!1){if(!l&&dc(d,["replay_event","replay_recording"]))return await o.push(d),c(100),{};try{if(n.shouldSend&&await n.shouldSend(d)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");const p=await r.send(d);let f=100;if(p){if(p.headers?.["retry-after"])f=Hd(p.headers["retry-after"]);else if(p.headers?.["x-sentry-rate-limits"])f=6e4;else if((p.statusCode||0)>=400)return p}return c(f),i=Ns,p}catch(p){if(await function(f,h,g){return!dc(f,["client_report"])&&(!n.shouldStore||n.shouldStore(f,h,g))}(d,p,i))return l?await o.unshift(d):await o.push(d),a(),e("Error sending. Event queued.",p),{};throw p}}return n.flushAtStartup&&a(),{send:u,flush:d=>(d===void 0&&(i=Ns,c(100)),r.flush(d))}}}function Tc(t,e){let n;return pn(t,(r,o)=>(e.includes(o)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function Vd(t,e){const n=e?.getDsn(),r=e?.getOptions().tunnel;return function(o,s){return!!s&&o.includes(s.host)}(t,n)||function(o,s){return s?Ic(o)===Ic(s):!1}(t,r)}function Ic(t){return t[t.length-1]==="/"?t.slice(0,-1):t}function Gd(t,...e){const n=new String(String.raw(t,...e));return n.__sentry_template_string__=t.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=e,n}const hm=Gd;function mm(t){t.user?.ip_address===void 0&&(t.user={...t.user,ip_address:"{{auto}}"})}function gm(t){"aggregates"in t?t.attrs?.ip_address===void 0&&(t.attrs={...t.attrs,ip_address:"{{auto}}"}):t.ipAddress===void 0&&(t.ipAddress="{{auto}}")}function Kd(t,e,n=[e],r="npm"){const o=t._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${e}`,packages:n.map(s=>({name:`${r}:@sentry/${s}`,version:Se})),version:Se}),t._metadata=o}function pa(t={}){const e=t.client||W();if(!Od()||!e)return{};const n=je(Ee());if(n.getTraceData)return n.getTraceData(t);const r=t.scope||et(),o=t.span||It(),s=o?hd(o):function(c){const{traceId:a,sampled:u,propagationSpanId:d}=c.getPropagationContext();return pd(a,d,u)}(r),i=ud(o?ie(o):sa(e,r));return ld.test(s)?{"sentry-trace":s,baggage:i}:(A.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}const ym=100;function ee(t,e){const n=W(),r=Dt();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=ym}=n.getOptions();if(s<=0)return;const i={timestamp:cn(),...t},c=o?qe(()=>o(i,e)):i;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,e),r.addBreadcrumb(c,s))}let Mc;const Rc=new WeakMap,Jd=()=>({name:"FunctionToString",setupOnce(){Mc=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=oa(this),n=Rc.has(W())&&e!==void 0?e:this;return Mc.apply(n,t)}}catch{}},setup(t){Rc.set(t,!0)}}),_m=[/^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$/],Yd=(t={})=>{let e;return{name:"EventFilters",setup(n){const r=n.getOptions();e=Oc(t,r)},processEvent(n,r,o){if(!e){const s=o.getOptions();e=Oc(t,s)}return function(s,i){if(s.type){if(s.type==="transaction"&&function(c,a){if(!a?.length)return!1;const u=c.transaction;return!!u&&oe(u,a)}(s,i.ignoreTransactions))return H&&A.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
11
|
+
Event: ${Je(s)}`),!0}else{if(function(c,a){return a?.length?Nd(c).some(u=>oe(u,a)):!1}(s,i.ignoreErrors))return H&&A.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
12
|
+
Event: ${Je(s)}`),!0;if(function(c){return c.exception?.values?.length?!c.message&&!c.exception.values.some(a=>a.stacktrace||a.type&&a.type!=="Error"||a.value):!1}(s))return H&&A.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
13
|
+
Event: ${Je(s)}`),!0;if(function(c,a){if(!a?.length)return!1;const u=Jr(c);return!!u&&oe(u,a)}(s,i.denyUrls))return H&&A.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
14
|
+
Event: ${Je(s)}.
|
|
15
|
+
Url: ${Jr(s)}`),!0;if(!function(c,a){if(!a?.length)return!0;const u=Jr(c);return!u||oe(u,a)}(s,i.allowUrls))return H&&A.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
16
|
+
Event: ${Je(s)}.
|
|
17
|
+
Url: ${Jr(s)}`),!0}return!1}(n,e)?null:n}}},Xd=(t={})=>({...Yd(t),name:"InboundFilters"});function Oc(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:_m],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]]}}function Jr(t){try{const e=[...t.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length),n=e?.stacktrace?.frames;return n?function(r=[]){for(let o=r.length-1;o>=0;o--){const s=r[o];if(s&&s.filename!=="<anonymous>"&&s.filename!=="[native code]")return s.filename||null}return null}(n):null}catch{return H&&A.error(`Cannot extract url for event ${Je(t)}`),null}}function vm(t,e,n,r,o,s){if(!o.exception?.values||!s||!Te(s.originalException,Error))return;const i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=Ei(t,e,r,s.originalException,n,o.exception.values,i,0))}function Ei(t,e,n,r,o,s,i,c){if(s.length>=n+1)return s;let a=[...s];if(Te(r[o],Error)){Ac(i,c);const u=t(e,r[o]),d=a.length;Lc(u,o,d,c),a=Ei(t,e,n,r[o],o,[u,...a],u,d)}return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if(Te(u,Error)){Ac(i,c);const l=t(e,u),p=a.length;Lc(l,`errors[${d}]`,p,c),a=Ei(t,e,n,u,o,[l,...a],l,p)}}),a}function Ac(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,...t.type==="AggregateError"&&{is_exception_group:!0},exception_id:e}}function Lc(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}const Pc=new Map,Dc=new Set;function bm(t,e){return function(n){if(Q._sentryModuleMetadata)for(const r of Object.keys(Q._sentryModuleMetadata)){const o=Q._sentryModuleMetadata[r];if(Dc.has(r))continue;Dc.add(r);const s=n(r);for(const i of s.reverse())if(i.filename){Pc.set(i.filename,o);break}}}(t),Pc.get(e)}function Zd(t,e){try{e.exception.values.forEach(n=>{if(n.stacktrace)for(const r of n.stacktrace.frames||[]){if(!r.filename||r.module_metadata)continue;const o=bm(t,r.filename);o&&(r.module_metadata=o)}})}catch{}}function Qd(t){try{t.exception.values.forEach(e=>{if(e.stacktrace)for(const n of e.stacktrace.frames||[])delete n.module_metadata})}catch{}}const Sm=()=>({name:"ModuleMetadata",setup(t){t.on("beforeEnvelope",e=>{pn(e,(n,r)=>{if(r==="event"){const o=Array.isArray(n)?n[1]:void 0;o&&(Qd(o),n[1]=o)}})}),t.on("applyFrameMetadata",e=>{e.type||Zd(t.getOptions().stackParser,e)})}});function fa(t){const e="console";Ve(e,t),Ge(e,wm)}function wm(){"console"in Q&&na.forEach(function(t){t in Q.console&&zt(Q.console,t,function(e){return Lo[t]=e,function(...n){Xt("console",{args:n,level:t}),Lo[t]?.apply(Q.console,n)}})})}function ha(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}const km=(t={})=>{const e=t.levels||na,n=t.handled??!0;return{name:"CaptureConsole",setup(r){"console"in Q&&fa(({args:o,level:s})=>{W()===r&&e.includes(s)&&function(i,c,a){const u={level:ha(c),extra:{arguments:i}};Gt(d=>{if(d.addEventProcessor(p=>(p.logger="console",Be(p,{handled:a,type:"console"}),p)),c==="assert"){if(!i[0]){const p=`Assertion failed: ${Po(i.slice(1)," ")||"console.assert"}`;d.setExtra("arguments",i.slice(1)),Ho(p,u)}return}const l=i.find(p=>p instanceof Error);if(l)return void We(l,u);Ho(Po(i," "),u)})}(o,s,n)})}}},tp=()=>{let t;return{name:"Dedupe",processEvent(e){if(e.type)return e;try{if(function(n,r){return r?!!(function(o,s){const i=o.message,c=s.message;return!(!i&&!c||i&&!c||!i&&c||i!==c||!$c(o,s)||!Nc(o,s))}(n,r)||function(o,s){const i=Fc(s),c=Fc(o);return!(!i||!c||i.type!==c.type||i.value!==c.value||!$c(o,s)||!Nc(o,s))}(n,r)):!1}(e,t))return H&&A.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}};function Nc(t,e){let n=li(t),r=li(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let o=0;o<r.length;o++){const s=r[o],i=n[o];if(s.filename!==i.filename||s.lineno!==i.lineno||s.colno!==i.colno||s.function!==i.function)return!1}return!0}function $c(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join("")===r.join("")}catch{return!1}}function Fc(t){return t.exception?.values?.[0]}const Em=(t={})=>{const{depth:e=3,captureErrorCause:n=!0}=t;return{name:"ExtraErrorData",processEvent(r,o,s){const{maxValueLength:i=250}=s.getOptions();return function(c,a={},u,d,l){if(!a.originalException||!ye(a.originalException))return c;const p=a.originalException.name||a.originalException.constructor.name,f=function(h,g,S){try{const w=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],k={};for(const E of Object.keys(h)){if(w.indexOf(E)!==-1)continue;const y=h[E];k[E]=ye(y)||typeof y=="string"?jn(`${y}`,S):y}if(g&&h.cause!==void 0&&(k.cause=ye(h.cause)?h.cause.toString():h.cause),typeof h.toJSON=="function"){const E=h.toJSON();for(const y of Object.keys(E)){const _=E[y];k[y]=ye(_)?_.toString():_}}return k}catch(w){H&&A.error("Unable to extract extra data from the Error object:",w)}return null}(a.originalException,d,l);if(f){const h={...c.contexts},g=Kt(f,u);return Ce(g)&&(qt(g,"__sentry_skip_normalization__",!0),h[p]=g),{...c,contexts:h}}return c}(r,o,e,n,i)}}},xm=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Uc(...t){let e="",n=!1;for(let r=t.length-1;r>=-1&&!n;r--){const o=r>=0?t[r]:"/";o&&(e=`${o}/${e}`,n=o.charAt(0)==="/")}return e=function(r,o){let s=0;for(let i=r.length-1;i>=0;i--){const c=r[i];c==="."?r.splice(i,1):c===".."?(r.splice(i,1),s++):s&&(r.splice(i,1),s--)}if(o)for(;s--;s)r.unshift("..");return r}(e.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+e||"."}function Bc(t){let e=0;for(;e<t.length&&t[e]==="";e++);let n=t.length-1;for(;n>=0&&t[n]==="";n--);return e>n?[]:t.slice(e,n-e+1)}function Cm(t,e){return function(n){const r=n.length>1024?`<truncated>${n.slice(-1024)}`:n,o=xm.exec(r);return o?o.slice(1):[]}(t)[2]||""}const Tm=(t={})=>{const e=t.root,n=t.prefix||"app:///",r="window"in Q&&!!Q.window,o=t.iteratee||function({isBrowser:s,root:i,prefix:c}){return a=>{if(!a.filename)return a;const u=/^[a-zA-Z]:\\/.test(a.filename)||a.filename.includes("\\")&&!a.filename.includes("/"),d=/^\//.test(a.filename);if(s){if(i){const l=a.filename;l.indexOf(i)===0&&(a.filename=l.replace(i,c))}}else if(u||d){const l=u?a.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):a.filename,p=i?function(f,h){f=Uc(f).slice(1),h=Uc(h).slice(1);const g=Bc(f.split("/")),S=Bc(h.split("/")),w=Math.min(g.length,S.length);let k=w;for(let y=0;y<w;y++)if(g[y]!==S[y]){k=y;break}let E=[];for(let y=k;y<g.length;y++)E.push("..");return E=E.concat(S.slice(k)),E.join("/")}(i,l):Cm(l);a.filename=`${c}${p}`}return a}}({isBrowser:r,root:e,prefix:n});return{name:"RewriteFrames",processEvent(s){let i=s;return s.exception&&Array.isArray(s.exception.values)&&(i=function(c){try{return{...c,exception:{...c.exception,values:c.exception.values.map(a=>{return{...a,...a.stacktrace&&{stacktrace:(u=a.stacktrace,{...u,frames:u?.frames?.map(d=>o(d))})}};var u})}}}catch{return c}}(i)),i}}},Im=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],Mm=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],Rm={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"},ep=["select","insert","upsert","update","delete"];function zo(t){try{t.__SENTRY_INSTRUMENTED__=!0}catch{}}function Wo(t){try{return t.__SENTRY_INSTRUMENTED__}catch{return!1}}function Om(t,e){if(e===""||e==="*")return"select(*)";if(t==="select")return`select(${e})`;if(t==="or"||t.endsWith(".or"))return`${t}${e}`;const[n,...r]=e.split(".");let o;return o=n?.startsWith("fts")?"textSearch":n?.startsWith("plfts")?"textSearch[plain]":n?.startsWith("phfts")?"textSearch[phrase]":n?.startsWith("wfts")?"textSearch[websearch]":n&&Rm[n]||"filter",`${o}(${t}, ${r.join(".")})`}function jc(t,e=!1){return new Proxy(t,{apply:(n,r,o)=>hs({name:`auth ${e?"(admin) ":""}${t.name}`,attributes:{[lt]:"auto.db.supabase",[Ot]:"db","db.system":"postgresql","db.operation":`auth.${e?"admin.":""}${t.name}`}},s=>Reflect.apply(n,r,o).then(i=>(i&&typeof i=="object"&&"error"in i&&i.error?(s.setStatus({code:2}),We(i.error,{mechanism:{handled:!1}})):s.setStatus({code:1}),s.end(),i)).catch(i=>{throw s.setStatus({code:2}),s.end(),We(i,{mechanism:{handled:!1}}),i}).then(...o))})}function Am(t){Wo(t.prototype.from)||(t.prototype.from=new Proxy(t.prototype.from,{apply(e,n,r){const o=Reflect.apply(e,n,r);return function(s){for(const i of ep)Wo(s.prototype[i])||(s.prototype[i]=new Proxy(s.prototype[i],{apply(c,a,u){const d=Reflect.apply(c,a,u),l=d.constructor;return H&&A.log(`Instrumenting ${i} operation's PostgRESTFilterBuilder`),Lm(l),d}}),zo(s.prototype[i]))}(o.constructor),o}}),zo(t.prototype.from))}function Lm(t){Wo(t.prototype.then)||(t.prototype.then=new Proxy(t.prototype.then,{apply(e,n,r){const o=ep,s=n,i=function(f,h={}){switch(f){case"GET":return"select";case"POST":return h.Prefer?.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}(s.method,s.headers);if(!o.includes(i)||!s?.url?.pathname||typeof s.url.pathname!="string")return Reflect.apply(e,n,r);const c=s.url.pathname.split("/"),a=c.length>0?c[c.length-1]:"",u=[];for(const[f,h]of s.url.searchParams.entries())u.push(Om(f,h));const d=Object.create(null);if(Ce(s.body))for(const[f,h]of Object.entries(s.body))d[f]=h;const l=`${i==="select"?"":`${i}${d?"(...) ":""}`}${u.join(" ")} from(${a})`,p={"db.table":a,"db.schema":s.schema,"db.url":s.url.origin,"db.sdk":s.headers["X-Client-Info"],"db.system":"postgresql","db.operation":i,[lt]:"auto.db.supabase",[Ot]:"db"};return u.length&&(p["db.query"]=u),Object.keys(d).length&&(p["db.body"]=d),hs({name:l,attributes:p},f=>Reflect.apply(e,n,[]).then(h=>{if(f&&(h&&typeof h=="object"&&"status"in h&&Sr(f,h.status||500),f.end()),h.error){const w=new Error(h.error.message);h.error.code&&(w.code=h.error.code),h.error.details&&(w.details=h.error.details);const k={};u.length&&(k.query=u),Object.keys(d).length&&(k.body=d),We(w,{contexts:{supabase:k}})}const g={type:"supabase",category:`db.${i}`,message:l},S={};return u.length&&(S.query=u),Object.keys(d).length&&(S.body=d),Object.keys(S).length&&(g.data=S),ee(g),h},h=>{throw f&&(Sr(f,500),f.end()),h}).then(...r))}}),zo(t.prototype.then))}const np=t=>{if(!t)return void(H&&A.warn("Supabase integration was not installed because no Supabase client was provided."));Am(t.constructor===Function?t:t.constructor),function(e){const n=e.auth;if(n&&!Wo(e.auth)){for(const r of Im){const o=n[r];o&&typeof e.auth[r]=="function"&&(e.auth[r]=jc(o))}for(const r of Mm){const o=n.admin[r];o&&typeof e.auth.admin[r]=="function"&&(e.auth.admin[r]=jc(o,!0))}zo(e.auth)}}(t)},Pm=t=>{return e=t.supabaseClient,{setupOnce(){np(e)},name:"Supabase"};var e};function Dm(t){return{...t,path:"path"in t&&Array.isArray(t.path)?t.path.join("."):void 0,keys:"keys"in t?JSON.stringify(t.keys):void 0,unionErrors:"unionErrors"in t?JSON.stringify(t.unionErrors):void 0}}function Nm(t){const e=new Set;for(const r of t.issues){const o=r.path.map(s=>typeof s=="number"?"<array>":s).join(".");o.length>0&&e.add(o)}const n=Array.from(e);if(n.length===0){let r="variable";if(t.issues.length>0){const o=t.issues[0];o!==void 0&&"expected"in o&&typeof o.expected=="string"&&(r=o.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${jn(n.join(", "),100)}`}function $m(t,e=!1,n,r){if(!(n.exception?.values&&r.originalException&&(o=r.originalException,ye(o)&&o.name==="ZodError"&&Array.isArray(o.issues))&&r.originalException.issues.length!==0))return n;var o;try{const s=(e?r.originalException.issues:r.originalException.issues.slice(0,t)).map(Dm);return e&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:s})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:Nm(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":s.slice(0,t)}}}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 Fm=(t={})=>{const e=t.limit??10;return{name:"ZodErrors",processEvent:(n,r)=>$m(e,t.saveZodIssuesAsAttachment,n,r)}},Um=t=>({name:"ThirdPartyErrorsFilter",setup(e){e.on("beforeEnvelope",n=>{pn(n,(r,o)=>{if(o==="event"){const s=Array.isArray(r)?r[1]:void 0;s&&(Qd(s),r[1]=s)}})}),e.on("applyFrameMetadata",n=>{n.type||Zd(e.getOptions().stackParser,n)})},processEvent(e){const n=function(r){const o=li(r);if(o)return o.filter(s=>!!s.filename).map(s=>s.module_metadata?Object.keys(s.module_metadata).filter(i=>i.startsWith(Hc)).map(i=>i.slice(Hc.length)):[])}(e);if(n&&n[t.behaviour==="drop-error-if-contains-third-party-frames"||t.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every"](o=>!o.some(s=>t.filterKeys.includes(s)))){if(t.behaviour==="drop-error-if-contains-third-party-frames"||t.behaviour==="drop-error-if-exclusively-contains-third-party-frames")return null;e.tags={...e.tags,third_party_code:!0}}return e}}),Hc="_sentryBundlerPluginAppKey:",Yr="flag.evaluation.";function Fr(t){const e=et().getScopeData().contexts.flags,n=e?e.values:[];return n.length&&(t.contexts===void 0&&(t.contexts={}),t.contexts.flags={values:[...n]}),t}function Rn(t,e,n=100){const r=et().getScopeData().contexts;r.flags||(r.flags={values:[]}),function(o,s,i,c){if(typeof i!="boolean")return;if(o.length>c)return void(H&&A.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${c}`));const a=o.findIndex(u=>u.flag===s);a!==-1&&o.splice(a,1),o.length===c&&o.shift(),o.push({flag:s,result:i})}(r.flags.values,t,e,n)}function On(t,e,n=10){if(typeof e!="boolean")return;const r=It();if(!r)return;const o=Z(r).data;if(`${Yr}${t}`in o)return void r.setAttribute(`${Yr}${t}`,e);Object.keys(o).filter(s=>s.startsWith(Yr)).length<n&&r.setAttribute(`${Yr}${t}`,e)}const Bm=()=>({name:"FeatureFlags",processEvent:(t,e,n)=>Fr(t),addFeatureFlag(t,e){Rn(t,e),On(t,e)}});function rp(t){return"isRelative"in t}function op(t,e){const n=t.indexOf("://")<=0&&t.indexOf("//")!==0,r=n?"thismessage:/":void 0;try{if("canParse"in URL&&!URL.canParse(t,r))return;const o=new URL(t,r);return n?{isRelative:n,pathname:o.pathname,search:o.search,hash:o.hash}:o}catch{}}function jm(t){if(rp(t))return t.pathname;const e=new URL(t);return e.search="",e.hash="",["80","443"].includes(e.port)&&(e.port=""),e.password&&(e.password="%filtered%"),e.username&&(e.username="%filtered%"),e.toString()}function An(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function sp(t){return t.split(/[?#]/,1)[0]}function Hm(t,e,n,r,o="auto.http.browser"){if(!t.fetchData)return;const{method:s,url:i}=t.fetchData,c=He()&&e(i);if(t.endTimestamp&&c){const l=t.fetchData.__span;if(!l)return;const p=r[l];return void(p&&(function(f,h){if(h.response){Sr(f,h.response.status);const g=h.response?.headers?.get("content-length");if(g){const S=parseInt(g);S>0&&f.setAttribute("http.response_content_length",S)}}else h.error&&f.setStatus({code:2,message:"internal_error"});f.end()}(p,t),delete r[l]))}const a=!!It(),u=c&&a?Zt(function(l,p,f){const h=op(l);return{name:h?`${p} ${jm(h)}`:p,attributes:zm(l,h,p,f)}}(i,s,o)):new Me;if(t.fetchData.__span=u.spanContext().spanId,r[u.spanContext().spanId]=u,n(t.fetchData.url)){const l=t.args[0],p=t.args[1]||{},f=function(h,g,S){const w=pa({span:S}),k=w["sentry-trace"],E=w.baggage;if(!k)return;const y=g.headers||(Xl(h)?h.headers:void 0);if(y){if(function(_){return typeof Headers<"u"&&Te(_,Headers)}(y)){const _=new Headers(y);if(_.get("sentry-trace")||_.set("sentry-trace",k),E){const x=_.get("baggage");x?Xr(x)||_.set("baggage",`${x},${E}`):_.set("baggage",E)}return _}if(Array.isArray(y)){const _=[...y];y.find(b=>b[0]==="sentry-trace")||_.push(["sentry-trace",k]);const x=y.find(b=>b[0]==="baggage"&&Xr(b[1]));return E&&!x&&_.push(["baggage",E]),_}{const _="sentry-trace"in y?y["sentry-trace"]:void 0,x="baggage"in y?y.baggage:void 0,b=x?Array.isArray(x)?[...x]:[x]:[],M=x&&(Array.isArray(x)?x.find(C=>Xr(C)):Xr(x));return E&&!M&&b.push(E),{...y,"sentry-trace":_??k,baggage:b.length>0?b.join(","):void 0}}}return{...w}}(l,p,He()&&a?u:void 0);f&&(t.args[1]=p,p.headers=f)}const d=W();if(d){const l={input:t.args,response:t.response,startTimestamp:t.startTimestamp,endTimestamp:t.endTimestamp};d.emit("beforeOutgoingRequestSpan",u,l)}return u}function Xr(t){return t.split(",").some(e=>e.trim().startsWith(ad))}function zm(t,e,n,r){const o={url:t,type:"fetch","http.method":n,[lt]:r,[Ot]:"http.client"};return e&&(rp(e)||(o["http.url"]=e.href,o["server.address"]=e.host),e.search&&(o["http.query"]=e.search),e.hash&&(o["http.fragment"]=e.hash)),o}function ip(t,e={},n=et()){const{message:r,name:o,email:s,url:i,source:c,associatedEventId:a,tags:u}=t,d={contexts:{feedback:{contact_email:s,name:o,message:r,url:i,source:c,associated_event_id:a}},type:"feedback",level:"info",tags:u},l=n?.getClient()||W();return l&&l.emit("beforeSendFeedback",d,e),n.captureEvent(d,e)}const zc={[lt]:"auto.console.logging"},Wm=(t={})=>{const e=t.levels||na;return{name:"ConsoleLogs",setup(n){const{enableLogs:r,_experiments:o,normalizeDepth:s=3,normalizeMaxBreadth:i=1e3}=n.getOptions();r??o?.enableLogs?fa(({args:c,level:a})=>{if(W()!==n||!e.includes(a))return;if(a==="assert"){if(!c[0]){const d=c.slice(1);ki({level:"error",message:d.length>0?`Assertion failed: ${Wc(d,s,i)}`:"Assertion failed",attributes:zc})}return}const u=a==="log";ki({level:u?"info":a,message:Wc(c,s,i),severityNumber:u?10:void 0,attributes:zc})}):H&&A.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled")}}};function Wc(t,e,n){return"util"in Q&&typeof Q.util.format=="function"?Q.util.format(...t):function(r,o,s){return r.map(i=>Bn(i)?String(i):JSON.stringify(Kt(i,o,s))).join(" ")}(t,e,n)}function qc(t){return t===void 0?void 0:t>=400&&t<500?"warning":t>=500?"error":void 0}const Ln=Q;function xi(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function ap(){if(typeof EdgeRuntime=="string")return!0;if(!function(){if(!("fetch"in Ln))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}())return!1;if(xi(Ln.fetch))return!0;let t=!1;const e=Ln.document;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow?.fetch&&(t=xi(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){H&&A.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function ma(t,e){const n="fetch";Ve(n,t),Ge(n,()=>cp(void 0,e))}function cp(t,e=!1){e&&!ap()||zt(Q,"fetch",function(n){return function(...r){const o=new Error,{method:s,url:i}=function(a){if(a.length===0)return{method:"GET",url:""};if(a.length===2){const[d,l]=a;return{url:Vc(d),method:Ci(l,"method")?String(l.method).toUpperCase():"GET"}}const u=a[0];return{url:Vc(u),method:Ci(u,"method")?String(u.method).toUpperCase():"GET"}}(r),c={args:r,fetchData:{method:s,url:i},startTimestamp:1e3*xt(),virtualError:o,headers:Vm(r)};return t||Xt("fetch",{...c}),n.apply(Q,r).then(async a=>(t?t(a):Xt("fetch",{...c,endTimestamp:1e3*xt(),response:a}),a),a=>{if(Xt("fetch",{...c,endTimestamp:1e3*xt(),error:a}),ye(a)&&a.stack===void 0&&(a.stack=o.stack,qt(a,"framesToPop",1)),a instanceof TypeError&&(a.message==="Failed to fetch"||a.message==="Load failed"||a.message==="NetworkError when attempting to fetch resource."))try{const u=new URL(c.fetchData.url);a.message=`${a.message} (${u.host})`}catch{}throw a})}})}function qm(t){let e;try{e=t.clone()}catch{return}(async function(n,r){if(n?.body){const o=n.body,s=o.getReader(),i=setTimeout(()=>{o.cancel().then(null,()=>{})},9e4);let c=!0;for(;c;){let a;try{a=setTimeout(()=>{o.cancel().then(null,()=>{})},5e3);const{done:u}=await s.read();clearTimeout(a),u&&(r(),c=!1)}catch{c=!1}finally{clearTimeout(a)}}clearTimeout(i),s.releaseLock(),o.cancel().then(null,()=>{})}})(e,()=>{Xt("fetch-body-resolved",{endTimestamp:1e3*xt(),response:t})})}function Ci(t,e){return!!t&&typeof t=="object"&&!!t[e]}function Vc(t){return typeof t=="string"?t:t?Ci(t,"url")?t.url:t.toString?t.toString():"":""}function Vm(t){const[e,n]=t;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(Xl(e))return new Headers(e.headers)}catch{}}function Gm(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var he,me,up={exports:{}},Rt=up.exports={};function Ti(){throw new Error("setTimeout has not been defined")}function Ii(){throw new Error("clearTimeout has not been defined")}function lp(t){if(he===setTimeout)return setTimeout(t,0);if((he===Ti||!he)&&setTimeout)return he=setTimeout,setTimeout(t,0);try{return he(t,0)}catch{try{return he.call(null,t,0)}catch{return he.call(this,t,0)}}}(function(){try{he=typeof setTimeout=="function"?setTimeout:Ti}catch{he=Ti}try{me=typeof clearTimeout=="function"?clearTimeout:Ii}catch{me=Ii}})();var Qe,_e=[],Pn=!1,yo=-1;function Km(){Pn&&Qe&&(Pn=!1,Qe.length?_e=Qe.concat(_e):yo=-1,_e.length&&dp())}function dp(){if(!Pn){var t=lp(Km);Pn=!0;for(var e=_e.length;e;){for(Qe=_e,_e=[];++yo<e;)Qe&&Qe[yo].run();yo=-1,e=_e.length}Qe=null,Pn=!1,function(n){if(me===clearTimeout)return clearTimeout(n);if((me===Ii||!me)&&clearTimeout)return me=clearTimeout,clearTimeout(n);try{return me(n)}catch{try{return me.call(null,n)}catch{return me.call(this,n)}}}(t)}}function Gc(t,e){this.fun=t,this.array=e}function pe(){}Rt.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];_e.push(new Gc(t,e)),_e.length!==1||Pn||lp(dp)},Gc.prototype.run=function(){this.fun.apply(null,this.array)},Rt.title="browser",Rt.browser=!0,Rt.env={},Rt.argv=[],Rt.version="",Rt.versions={},Rt.on=pe,Rt.addListener=pe,Rt.once=pe,Rt.off=pe,Rt.removeListener=pe,Rt.removeAllListeners=pe,Rt.emit=pe,Rt.prependListener=pe,Rt.prependOnceListener=pe,Rt.listeners=function(t){return[]},Rt.binding=function(t){throw new Error("process.binding is not supported")},Rt.cwd=function(){return"/"},Rt.chdir=function(t){throw new Error("process.chdir is not supported")},Rt.umask=function(){return 0};const Kc=Gm(up.exports);function Jm(){return!(typeof __SENTRY_BROWSER_BUNDLE__<"u"&&__SENTRY_BROWSER_BUNDLE__)&&Object.prototype.toString.call(Kc!==void 0?Kc:0)==="[object process]"}function Mi(){return typeof window<"u"&&(!Jm()||function(){return Q.process?.type==="renderer"}())}const ne=Q,yt=ne.document,ar=ne.navigator,pp="Report a Bug",fp=(t,e={includeReplay:!0})=>{if(!t.message)throw new Error("Unable to submit feedback with empty message");const n=W();if(!n)throw new Error("No client setup, cannot send feedback.");t.tags&&Object.keys(t.tags).length&&et().setTags(t.tags);const r=ip({source:"api",url:mn(),...t},e);return new Promise((o,s)=>{const i=setTimeout(()=>s("Unable to determine if Feedback was correctly sent."),3e4),c=n.on("afterSendEvent",(a,u)=>{if(a.event_id===r)return clearTimeout(i),c(),u&&typeof u.statusCode=="number"&&u.statusCode>=200&&u.statusCode<300?o(r):u&&typeof u.statusCode=="number"&&u.statusCode===0?s("Unable to send Feedback. This is because of network issues, or because you are using an ad-blocker."):u&&typeof u.statusCode=="number"&&u.statusCode===403?s("Unable to send Feedback. This could be because this domain is not in your list of allowed domains."):s("Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker")})})},_o=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Zr(t,e){return{...t,...e,tags:{...t.tags,...e.tags},onFormOpen:()=>{e.onFormOpen?.(),t.onFormOpen?.()},onFormClose:()=>{e.onFormClose?.(),t.onFormClose?.()},onSubmitSuccess:(n,r)=>{e.onSubmitSuccess?.(n,r),t.onSubmitSuccess?.(n,r)},onSubmitError:n=>{e.onSubmitError?.(n),t.onSubmitError?.(n)},onFormSubmitted:()=>{e.onFormSubmitted?.(),t.onFormSubmitted?.()},themeDark:{...t.themeDark,...e.themeDark},themeLight:{...t.themeLight,...e.themeLight}}}function Yt(t,e){return Object.entries(e).forEach(([n,r])=>{t.setAttributeNS(null,n,r)}),t}function Ym({triggerLabel:t,triggerAriaLabel:e,shadow:n,styleNonce:r}){const o=yt.createElement("button");if(o.type="button",o.className="widget__actor",o.ariaHidden="false",o.ariaLabel=e||t||pp,o.appendChild(function(){const i=f=>ne.document.createElementNS("http://www.w3.org/2000/svg",f),c=Yt(i("svg"),{width:"20",height:"20",viewBox:"0 0 20 20",fill:"var(--actor-color, var(--foreground))"}),a=Yt(i("g"),{clipPath:"url(#clip0_57_80)"}),u=Yt(i("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"});c.appendChild(a).appendChild(u);const d=i("defs"),l=Yt(i("clipPath"),{id:"clip0_57_80"}),p=Yt(i("rect"),{width:"20",height:"20",fill:"white"});return l.appendChild(p),d.appendChild(l),c.appendChild(d).appendChild(l).appendChild(p),c}()),t){const i=yt.createElement("span");i.appendChild(yt.createTextNode(t)),o.appendChild(i)}const s=function(i){const c=yt.createElement("style");return c.textContent=`
|
|
19
|
+
.widget__actor {
|
|
20
|
+
position: fixed;
|
|
21
|
+
z-index: var(--z-index);
|
|
22
|
+
margin: var(--page-margin);
|
|
23
|
+
inset: var(--actor-inset);
|
|
24
|
+
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: 8px;
|
|
28
|
+
padding: 16px;
|
|
29
|
+
|
|
30
|
+
font-family: inherit;
|
|
31
|
+
font-size: var(--font-size);
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
line-height: 1.14em;
|
|
34
|
+
text-decoration: none;
|
|
35
|
+
|
|
36
|
+
background: var(--actor-background, var(--background));
|
|
37
|
+
border-radius: var(--actor-border-radius, 1.7em/50%);
|
|
38
|
+
border: var(--actor-border, var(--border));
|
|
39
|
+
box-shadow: var(--actor-box-shadow, var(--box-shadow));
|
|
40
|
+
color: var(--actor-color, var(--foreground));
|
|
41
|
+
fill: var(--actor-color, var(--foreground));
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
opacity: 1;
|
|
44
|
+
transition: transform 0.2s ease-in-out;
|
|
45
|
+
transform: translate(0, 0) scale(1);
|
|
46
|
+
}
|
|
47
|
+
.widget__actor[aria-hidden="true"] {
|
|
48
|
+
opacity: 0;
|
|
49
|
+
pointer-events: none;
|
|
50
|
+
visibility: hidden;
|
|
51
|
+
transform: translate(0, 16px) scale(0.98);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.widget__actor:hover {
|
|
55
|
+
background: var(--actor-hover-background, var(--background));
|
|
56
|
+
filter: var(--interactive-filter);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.widget__actor svg {
|
|
60
|
+
width: 1.14em;
|
|
61
|
+
height: 1.14em;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@media (max-width: 600px) {
|
|
65
|
+
.widget__actor span {
|
|
66
|
+
display: none;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
`,i&&c.setAttribute("nonce",i),c}(r);return{el:o,appendToDom(){n.appendChild(s),n.appendChild(o)},removeFromDom(){o.remove(),s.remove()},show(){o.ariaHidden="false"},hide(){o.ariaHidden="true"}}}const hp="rgba(88, 74, 192, 1)",Xm={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:hp,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%)"},Jc={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:hp,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 Yc(t){return`
|
|
70
|
+
--foreground: ${t.foreground};
|
|
71
|
+
--background: ${t.background};
|
|
72
|
+
--accent-foreground: ${t.accentForeground};
|
|
73
|
+
--accent-background: ${t.accentBackground};
|
|
74
|
+
--success-color: ${t.successColor};
|
|
75
|
+
--error-color: ${t.errorColor};
|
|
76
|
+
--border: ${t.border};
|
|
77
|
+
--box-shadow: ${t.boxShadow};
|
|
78
|
+
--outline: ${t.outline};
|
|
79
|
+
--interactive-filter: ${t.interactiveFilter};
|
|
80
|
+
`}const mp=({lazyLoadIntegration:t,getModalIntegration:e,getScreenshotIntegration:n})=>({id:r="sentry-feedback",autoInject:o=!0,showBranding:s=!0,isEmailRequired:i=!1,isNameRequired:c=!1,showEmail:a=!0,showName:u=!0,enableScreenshot:d=!0,useSentryUser:l={email:"email",name:"username"},tags:p,styleNonce:f,scriptNonce:h,colorScheme:g="system",themeLight:S={},themeDark:w={},addScreenshotButtonLabel:k="Add a screenshot",cancelButtonLabel:E="Cancel",confirmButtonLabel:y="Confirm",emailLabel:_="Email",emailPlaceholder:x="your.email@example.org",formTitle:b="Report a Bug",isRequiredLabel:M="(required)",messageLabel:C="Description",messagePlaceholder:R="What's the bug? What did you expect?",nameLabel:T="Name",namePlaceholder:I="Your Name",removeScreenshotButtonLabel:O="Remove screenshot",submitButtonLabel:P="Send Bug Report",successMessageText:L="Thank you for your report!",triggerLabel:$=pp,triggerAriaLabel:D="",onFormOpen:m,onFormClose:v,onSubmitSuccess:N,onSubmitError:U,onFormSubmitted:B}={})=>{const F={id:r,autoInject:o,showBranding:s,isEmailRequired:i,isNameRequired:c,showEmail:a,showName:u,enableScreenshot:d,useSentryUser:l,tags:p,styleNonce:f,scriptNonce:h,colorScheme:g,themeDark:w,themeLight:S,triggerLabel:$,triggerAriaLabel:D,cancelButtonLabel:E,submitButtonLabel:P,confirmButtonLabel:y,formTitle:b,emailLabel:_,emailPlaceholder:x,messageLabel:C,messagePlaceholder:R,nameLabel:T,namePlaceholder:I,successMessageText:L,isRequiredLabel:M,addScreenshotButtonLabel:k,removeScreenshotButtonLabel:O,onFormClose:v,onFormOpen:m,onSubmitError:U,onSubmitSuccess:N,onFormSubmitted:B};let j=null,G=[];const K=ht=>{if(!j){const Mt=yt.createElement("div");Mt.id=String(ht.id),yt.body.appendChild(Mt),j=Mt.attachShadow({mode:"open"}),j.appendChild(function({colorScheme:z,themeDark:V,themeLight:pt,styleNonce:bt}){const Lt=yt.createElement("style");return Lt.textContent=`
|
|
81
|
+
:host {
|
|
82
|
+
--font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;
|
|
83
|
+
--font-size: 14px;
|
|
84
|
+
--z-index: 100000;
|
|
85
|
+
|
|
86
|
+
--page-margin: 16px;
|
|
87
|
+
--inset: auto 0 0 auto;
|
|
88
|
+
--actor-inset: var(--inset);
|
|
89
|
+
|
|
90
|
+
font-family: var(--font-family);
|
|
91
|
+
font-size: var(--font-size);
|
|
92
|
+
|
|
93
|
+
${z!=="system"?"color-scheme: only light;":""}
|
|
94
|
+
|
|
95
|
+
${Yc(z==="dark"?{...Jc,...V}:{...Xm,...pt})}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
${z==="system"?`
|
|
99
|
+
@media (prefers-color-scheme: dark) {
|
|
100
|
+
:host {
|
|
101
|
+
${Yc({...Jc,...V})}
|
|
102
|
+
}
|
|
103
|
+
}`:""}
|
|
104
|
+
}
|
|
105
|
+
`,bt&&Lt.setAttribute("nonce",bt),Lt}(ht))}return j},J=async ht=>{const Mt=ht.enableScreenshot&&!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(ar.userAgent)||/Macintosh/i.test(ar.userAgent)&&ar.maxTouchPoints&&ar.maxTouchPoints>1||!isSecureContext);let z,V;try{z=(e?e():await t("feedbackModalIntegration",h))(),wi(z)}catch{throw _o&&A.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 bt=Mt?n?n():await t("feedbackScreenshotIntegration",h):void 0;bt&&(V=bt(),wi(V))}catch{_o&&A.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const pt=z.createDialog({options:{...ht,onFormClose:()=>{pt?.close(),ht.onFormClose?.()},onFormSubmitted:()=>{pt?.close(),ht.onFormSubmitted?.()}},screenshotIntegration:V,sendFeedback:fp,shadow:K(ht)});return pt},nt=(ht,Mt={})=>{const z=Zr(F,Mt),V=typeof ht=="string"?yt.querySelector(ht):typeof ht.addEventListener=="function"?ht:null;if(!V)throw _o&&A.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let pt=null;const bt=async()=>{pt||(pt=await J({...z,onFormSubmitted:()=>{pt?.removeFromDom(),z.onFormSubmitted?.()}})),pt.appendToDom(),pt.open()};V.addEventListener("click",bt);const Lt=()=>{G=G.filter(Oe=>Oe!==Lt),pt?.removeFromDom(),pt=null,V.removeEventListener("click",bt)};return G.push(Lt),Lt},dt=(ht={})=>{const Mt=Zr(F,ht),z=K(Mt),V=Ym({triggerLabel:Mt.triggerLabel,triggerAriaLabel:Mt.triggerAriaLabel,shadow:z,styleNonce:f});return nt(V.el,{...Mt,onFormOpen(){V.hide()},onFormClose(){V.show()},onFormSubmitted(){V.show()}}),V};return{name:"Feedback",setupOnce(){Mi()&&F.autoInject&&(yt.readyState==="loading"?yt.addEventListener("DOMContentLoaded",()=>dt().appendToDom()):dt().appendToDom())},attachTo:nt,createWidget(ht={}){const Mt=dt(Zr(F,ht));return Mt.appendToDom(),Mt},createForm:async(ht={})=>J(Zr(F,ht)),remove(){j&&(j.parentElement?.remove(),j=null),G.forEach(ht=>ht()),G=[]}}};var ms,vt,gp,Ye,Xc,yp,Ri,Er={},ga=[],Zm=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Oi=Array.isArray;function Ne(t,e){for(var n in e)t[n]=e[n];return t}function _p(t){var e=t.parentNode;e&&e.removeChild(t)}function at(t,e,n){var r,o,s,i={};for(s in e)s=="key"?r=e[s]:s=="ref"?o=e[s]:i[s]=e[s];if(arguments.length>2&&(i.children=arguments.length>3?ms.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(s in t.defaultProps)i[s]===void 0&&(i[s]=t.defaultProps[s]);return vo(t,i,r,o,null)}function vo(t,e,n,r,o){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++gp,__i:-1,__u:0};return o==null&&vt.vnode!=null&&vt.vnode(s),s}function Ur(t){return t.children}function bo(t,e){this.props=t,this.context=e}function qn(t,e){if(e==null)return t.__?qn(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?qn(t):null}function Qm(t,e,n){var r,o=t.__v,s=o.__e,i=t.__P;if(i)return(r=Ne({},o)).__v=o.__v+1,vt.vnode&&vt.vnode(r),ya(i,r,o,t.__n,i.ownerSVGElement!==void 0,32&o.__u?[s]:null,e,s??qn(o),!!(32&o.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=s&&vp(r),r}function vp(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return vp(t)}}function Zc(t){(!t.__d&&(t.__d=!0)&&Ye.push(t)&&!qo.__r++||Xc!==vt.debounceRendering)&&((Xc=vt.debounceRendering)||yp)(qo)}function qo(){var t,e,n,r=[],o=[];for(Ye.sort(Ri);t=Ye.shift();)t.__d&&(n=Ye.length,e=Qm(t,r,o)||e,n===0||Ye.length>n?(Ai(r,e,o),o.length=r.length=0,e=void 0,Ye.sort(Ri)):e&&vt.__c&&vt.__c(e,ga));e&&Ai(r,e,o),qo.__r=0}function Qc(t,e,n,r,o,s,i,c,a,u,d){var l,p,f,h,g,S=r&&r.__k||ga,w=e.length;for(n.__d=a,function(k,E,y){var _,x,b,M,C,R=E.length,T=y.length,I=T,O=0;for(k.__k=[],_=0;_<R;_++)(x=k.__k[_]=(x=E[_])==null||typeof x=="boolean"||typeof x=="function"?null:typeof x=="string"||typeof x=="number"||typeof x=="bigint"||x.constructor==String?vo(null,x,null,null,x):Oi(x)?vo(Ur,{children:x},null,null,null):x.constructor===void 0&&x.__b>0?vo(x.type,x.props,x.key,x.ref?x.ref:null,x.__v):x)!=null?(x.__=k,x.__b=k.__b+1,C=tg(x,y,M=_+O,I),x.__i=C,b=null,C!==-1&&(I--,(b=y[C])&&(b.__u|=131072)),b==null||b.__v===null?(C==-1&&O--,typeof x.type!="function"&&(x.__u|=65536)):C!==M&&(C===M+1?O++:C>M?I>R-M?O+=C-M:O--:O=C<M&&C==M-1?C-M:0,C!==_+O&&(x.__u|=65536))):(b=y[_])&&b.key==null&&b.__e&&(b.__e==k.__d&&(k.__d=qn(b)),Li(b,b,!1),y[_]=null,I--);if(I)for(_=0;_<T;_++)(b=y[_])!=null&&!(131072&b.__u)&&(b.__e==k.__d&&(k.__d=qn(b)),Li(b,b))}(n,e,S),a=n.__d,l=0;l<w;l++)(f=n.__k[l])!=null&&typeof f!="boolean"&&typeof f!="function"&&(p=f.__i===-1?Er:S[f.__i]||Er,f.__i=l,ya(t,f,p,o,s,i,c,a,u,d),h=f.__e,f.ref&&p.ref!=f.ref&&(p.ref&&_a(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?a=bp(f,a,t):typeof f.type=="function"&&f.__d!==void 0?a=f.__d:h&&(a=h.nextSibling),f.__d=void 0,f.__u&=-196609);n.__d=a,n.__e=g}function bp(t,e,n){var r,o;if(typeof t.type=="function"){for(r=t.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=t,e=bp(r[o],e,n));return e}t.__e!=e&&(n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType===8);return e}function tg(t,e,n,r){var o=t.key,s=t.type,i=n-1,c=n+1,a=e[n];if(a===null||a&&o==a.key&&s===a.type)return n;if(r>(a==null||131072&a.__u?0:1))for(;i>=0||c<e.length;){if(i>=0){if((a=e[i])&&!(131072&a.__u)&&o==a.key&&s===a.type)return i;i--}if(c<e.length){if((a=e[c])&&!(131072&a.__u)&&o==a.key&&s===a.type)return c;c++}}return-1}function tu(t,e,n){e[0]==="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Zm.test(e)?n:n+"px"}function Qr(t,e,n,r,o){var s;t:if(e==="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||tu(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||tu(t.style,e,n[e])}else if(e[0]==="o"&&e[1]==="n")s=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?r?n.u=r.u:(n.u=Date.now(),t.addEventListener(e,s?nu:eu,s)):t.removeEventListener(e,s?nu:eu,s);else{if(o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e!=="rowSpan"&&e!=="colSpan"&&e!=="role"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,n))}}function eu(t){if(this.l){var e=this.l[t.type+!1];if(t.t){if(t.t<=e.u)return}else t.t=Date.now();return e(vt.event?vt.event(t):t)}}function nu(t){if(this.l)return this.l[t.type+!0](vt.event?vt.event(t):t)}function ya(t,e,n,r,o,s,i,c,a,u){var d,l,p,f,h,g,S,w,k,E,y,_,x,b,M,C=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(a=!!(32&n.__u),s=[c=e.__e=n.__e]),(d=vt.__b)&&d(e);t:if(typeof C=="function")try{if(w=e.props,k=(d=C.contextType)&&r[d.__c],E=d?k?k.props.value:d.__:r,n.__c?S=(l=e.__c=n.__c).__=l.__E:("prototype"in C&&C.prototype.render?e.__c=l=new C(w,E):(e.__c=l=new bo(w,E),l.constructor=C,l.render=eg),k&&k.sub(l),l.props=w,l.state||(l.state={}),l.context=E,l.__n=r,p=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),C.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Ne({},l.__s)),Ne(l.__s,C.getDerivedStateFromProps(w,l.__s))),f=l.props,h=l.state,l.__v=e,p)C.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(C.getDerivedStateFromProps==null&&w!==f&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(w,E),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(w,l.__s,E)===!1||e.__v===n.__v)){for(e.__v!==n.__v&&(l.props=w,l.state=l.__s,l.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach(function(R){R&&(R.__=e)}),y=0;y<l._sb.length;y++)l.__h.push(l._sb[y]);l._sb=[],l.__h.length&&i.push(l);break t}l.componentWillUpdate!=null&&l.componentWillUpdate(w,l.__s,E),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(f,h,g)})}if(l.context=E,l.props=w,l.__P=t,l.__e=!1,_=vt.__r,x=0,"prototype"in C&&C.prototype.render){for(l.state=l.__s,l.__d=!1,_&&_(e),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,_&&_(e),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++x<25);l.state=l.__s,l.getChildContext!=null&&(r=Ne(Ne({},r),l.getChildContext())),p||l.getSnapshotBeforeUpdate==null||(g=l.getSnapshotBeforeUpdate(f,h)),Qc(t,Oi(M=d!=null&&d.type===Ur&&d.key==null?d.props.children:d)?M:[M],e,n,r,o,s,i,c,a,u),l.base=e.__e,e.__u&=-161,l.__h.length&&i.push(l),S&&(l.__E=l.__=null)}catch(R){e.__v=null,a||s!=null?(e.__e=c,e.__u|=a?160:32,s[s.indexOf(c)]=null):(e.__e=n.__e,e.__k=n.__k),vt.__e(R,e,n)}else s==null&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=function(R,T,I,O,P,L,$,D,m){var v,N,U,B,F,j,G,K=I.props,J=T.props,nt=T.type;if(nt==="svg"&&(P=!0),L!=null){for(v=0;v<L.length;v++)if((F=L[v])&&"setAttribute"in F==!!nt&&(nt?F.localName===nt:F.nodeType===3)){R=F,L[v]=null;break}}if(R==null){if(nt===null)return document.createTextNode(J);R=P?document.createElementNS("http://www.w3.org/2000/svg",nt):document.createElement(nt,J.is&&J),L=null,D=!1}if(nt===null)K===J||D&&R.data===J||(R.data=J);else{if(L=L&&ms.call(R.childNodes),K=I.props||Er,!D&&L!=null)for(K={},v=0;v<R.attributes.length;v++)K[(F=R.attributes[v]).name]=F.value;for(v in K)F=K[v],v=="children"||(v=="dangerouslySetInnerHTML"?U=F:v==="key"||v in J||Qr(R,v,null,F,P));for(v in J)F=J[v],v=="children"?B=F:v=="dangerouslySetInnerHTML"?N=F:v=="value"?j=F:v=="checked"?G=F:v==="key"||D&&typeof F!="function"||K[v]===F||Qr(R,v,F,K[v],P);if(N)D||U&&(N.__html===U.__html||N.__html===R.innerHTML)||(R.innerHTML=N.__html),T.__k=[];else if(U&&(R.innerHTML=""),Qc(R,Oi(B)?B:[B],T,I,O,P&&nt!=="foreignObject",L,$,L?L[0]:I.__k&&qn(I,0),D,m),L!=null)for(v=L.length;v--;)L[v]!=null&&_p(L[v]);D||(v="value",j!==void 0&&(j!==R[v]||nt==="progress"&&!j||nt==="option"&&j!==K[v])&&Qr(R,v,j,K[v],!1),v="checked",G!==void 0&&G!==R[v]&&Qr(R,v,G,K[v],!1))}return R}(n.__e,e,n,r,o,s,i,a,u);(d=vt.diffed)&&d(e)}function Ai(t,e,n){for(var r=0;r<n.length;r++)_a(n[r],n[++r],n[++r]);vt.__c&&vt.__c(e,t),t.some(function(o){try{t=o.__h,o.__h=[],t.some(function(s){s.call(o)})}catch(s){vt.__e(s,o.__v)}})}function _a(t,e,n){try{typeof t=="function"?t(e):t.current=e}catch(r){vt.__e(r,n)}}function Li(t,e,n){var r,o;if(vt.unmount&&vt.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||_a(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){vt.__e(s,e)}r.base=r.__P=null,t.__c=void 0}if(r=t.__k)for(o=0;o<r.length;o++)r[o]&&Li(r[o],e,n||typeof t.type!="function");n||t.__e==null||_p(t.__e),t.__=t.__e=t.__d=void 0}function eg(t,e,n){return this.constructor(t,n)}ms=ga.slice,vt={__e:function(t,e,n,r){for(var o,s,i;e=e.__;)if((o=e.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(t)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(t,r||{}),i=o.__d),i)return o.__E=o}catch(c){t=c}throw t}},gp=0,bo.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ne({},this.state),typeof t=="function"&&(t=t(Ne({},n),this.props)),t&&Ne(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Zc(this))},bo.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Zc(this))},bo.prototype.render=Ur,Ye=[],yp=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ri=function(t,e){return t.__v.__b-e.__v.__b},qo.__r=0;var ve,_t,$s,ru,Vn=0,Sp=[],So=[],Ct=vt,ou=Ct.__b,su=Ct.__r,iu=Ct.diffed,au=Ct.__c,cu=Ct.unmount,uu=Ct.__;function tn(t,e){Ct.__h&&Ct.__h(_t,t,Vn||e),Vn=0;var n=_t.__H||(_t.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:So}),n.__[t]}function en(t){return Vn=1,wp(kp,t)}function wp(t,e,n){var r=tn(ve++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):kp(void 0,e),function(c){var a=r.__N?r.__N[0]:r.__[0],u=r.t(a,c);a!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=_t,!_t.u)){var o=function(c,a,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!s||s.call(this,c,a,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===c)&&(!s||s.call(this,c,a,u))};_t.u=!0;var s=_t.shouldComponentUpdate,i=_t.componentWillUpdate;_t.componentWillUpdate=function(c,a,u){if(this.__e){var d=s;s=void 0,o(c,a,u),s=d}i&&i.call(this,c,a,u)},_t.shouldComponentUpdate=o}return r.__N||r.__}function lu(t,e){var n=tn(ve++,4);!Ct.__s&&va(n.__H,e)&&(n.__=t,n.i=e,_t.__h.push(n))}function xr(t,e){var n=tn(ve++,7);return va(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function Dn(t,e){return Vn=8,xr(function(){return t},e)}function ng(){for(var t;t=Sp.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(wo),t.__H.__h.forEach(Pi),t.__H.__h=[]}catch(e){t.__H.__h=[],Ct.__e(e,t.__v)}}Ct.__b=function(t){_t=null,ou&&ou(t)},Ct.__=function(t,e){e.__k&&e.__k.__m&&(t.__m=e.__k.__m),uu&&uu(t,e)},Ct.__r=function(t){su&&su(t),ve=0;var e=(_t=t.__c).__H;e&&($s===_t?(e.__h=[],_t.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=So,n.__N=n.i=void 0})):(e.__h.forEach(wo),e.__h.forEach(Pi),e.__h=[],ve=0)),$s=_t},Ct.diffed=function(t){iu&&iu(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Sp.push(e)!==1&&ru===Ct.requestAnimationFrame||((ru=Ct.requestAnimationFrame)||rg)(ng)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==So&&(n.__=n.__V),n.i=void 0,n.__V=So})),$s=_t=null},Ct.__c=function(t,e){e.some(function(n){try{n.__h.forEach(wo),n.__h=n.__h.filter(function(r){return!r.__||Pi(r)})}catch(r){e.some(function(o){o.__h&&(o.__h=[])}),e=[],Ct.__e(r,n.__v)}}),au&&au(t,e)},Ct.unmount=function(t){cu&&cu(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{wo(r)}catch(o){e=o}}),n.__H=void 0,e&&Ct.__e(e,n.__v))};var du=typeof requestAnimationFrame=="function";function rg(t){var e,n=function(){clearTimeout(r),du&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);du&&(e=requestAnimationFrame(n))}function wo(t){var e=_t,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),_t=e}function Pi(t){var e=_t;t.__c=t.__(),_t=e}function va(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function kp(t,e){return typeof e=="function"?e(t):e}const og=Object.defineProperty({__proto__:null,useCallback:Dn,useContext:function(t){var e=_t.context[t.__c],n=tn(ve++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(_t)),e.props.value):t.__},useDebugValue:function(t,e){Ct.useDebugValue&&Ct.useDebugValue(e?e(t):t)},useEffect:function(t,e){var n=tn(ve++,3);!Ct.__s&&va(n.__H,e)&&(n.__=t,n.i=e,_t.__H.__h.push(n))},useErrorBoundary:function(t){var e=tn(ve++,10),n=en();return e.__=t,_t.componentDidCatch||(_t.componentDidCatch=function(r,o){e.__&&e.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]},useId:function(){var t=tn(ve++,11);if(!t.__){for(var e=_t.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__},useImperativeHandle:function(t,e,n){Vn=6,lu(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},n==null?n:n.concat(t))},useLayoutEffect:lu,useMemo:xr,useReducer:wp,useRef:function(t){return Vn=5,xr(function(){return{current:t}},[])},useState:en},Symbol.toStringTag,{value:"Module"});function sg(){const t=r=>yt.createElementNS("http://www.w3.org/2000/svg",r),e=Yt(t("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=Yt(t("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 e.appendChild(n),e}function ig({options:t}){const e=xr(()=>({__html:sg().outerHTML}),[]);return at("h2",{class:"dialog__header"},at("span",{class:"dialog__title"},t.formTitle),t.showBranding?at("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:e}):null)}function Fs(t,e){const n=t.get(e);return typeof n=="string"?n.trim():""}function ag({options:t,defaultEmail:e,defaultName:n,onFormClose:r,onSubmit:o,onSubmitSuccess:s,onSubmitError:i,showEmail:c,showName:a,screenshotInput:u}){const{tags:d,addScreenshotButtonLabel:l,removeScreenshotButtonLabel:p,cancelButtonLabel:f,emailLabel:h,emailPlaceholder:g,isEmailRequired:S,isNameRequired:w,messageLabel:k,messagePlaceholder:E,nameLabel:y,namePlaceholder:_,submitButtonLabel:x,isRequiredLabel:b}=t,[M,C]=en(!1),[R,T]=en(null),[I,O]=en(!1),P=u?.input,[L,$]=en(null),D=Dn(N=>{$(N),O(!1)},[]),m=Dn(N=>{const U=function(B,F){const j=[];return F.isNameRequired&&!B.name&&j.push(F.nameLabel),F.isEmailRequired&&!B.email&&j.push(F.emailLabel),B.message||j.push(F.messageLabel),j}(N,{emailLabel:h,isEmailRequired:S,isNameRequired:w,messageLabel:k,nameLabel:y});return U.length>0?T(`Please enter in the following required fields: ${U.join(", ")}`):T(null),U.length===0},[h,S,w,k,y]),v=Dn(async N=>{C(!0);try{if(N.preventDefault(),!(N.target instanceof HTMLFormElement))return;const U=new FormData(N.target),B=await(u&&I?u.value():void 0),F={name:Fs(U,"name"),email:Fs(U,"email"),message:Fs(U,"message"),attachments:B?[B]:void 0};if(!m(F))return;try{const j=await o({name:F.name,email:F.email,message:F.message,source:"widget",tags:d},{attachments:F.attachments});s(F,j)}catch(j){_o&&A.error(j),T(j),i(j)}}finally{C(!1)}},[u&&I,s,i]);return at("form",{class:"form",onSubmit:v},P&&I?at(P,{onError:D}):null,at("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:M},at("div",{class:"form__top"},R?at("div",{class:"form__error-container"},R):null,a?at("label",{for:"name",class:"form__label"},at(Us,{label:y,isRequiredLabel:b,isRequired:w}),at("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:_,required:w,type:"text"})):at("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),c?at("label",{for:"email",class:"form__label"},at(Us,{label:h,isRequiredLabel:b,isRequired:S}),at("input",{class:"form__input",defaultValue:e,id:"email",name:"email",placeholder:g,required:S,type:"email"})):at("input",{"aria-hidden":!0,value:e,name:"email",type:"hidden"}),at("label",{for:"message",class:"form__label"},at(Us,{label:k,isRequiredLabel:b,isRequired:!0}),at("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:E,required:!0,rows:5})),P?at("label",{for:"screenshot",class:"form__label"},at("button",{class:"btn btn--default",disabled:M,type:"button",onClick:()=>{$(null),O(N=>!N)}},I?p:l),L?at("div",{class:"form__error-container"},L.message):null):null),at("div",{class:"btn-group"},at("button",{class:"btn btn--primary",disabled:M,type:"submit"},x),at("button",{class:"btn btn--default",disabled:M,type:"button",onClick:r},f))))}function Us({label:t,isRequired:e,isRequiredLabel:n}){return at("span",{class:"form__label__text"},t,e&&at("span",{class:"form__label__text--required"},n))}function cg(){const t=a=>ne.document.createElementNS("http://www.w3.org/2000/svg",a),e=Yt(t("svg"),{width:"16",height:"17",viewBox:"0 0 16 17",fill:"inherit"}),n=Yt(t("g"),{clipPath:"url(#clip0_57_156)"}),r=Yt(t("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"}),o=Yt(t("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"});e.appendChild(n).append(o,r);const s=t("defs"),i=Yt(t("clipPath"),{id:"clip0_57_156"}),c=Yt(t("rect"),{width:"16",height:"16",fill:"white",transform:"translate(0 0.5)"});return i.appendChild(c),s.appendChild(i),e.appendChild(s).appendChild(i).appendChild(c),e}function ug({open:t,onFormSubmitted:e,...n}){const r=n.options,o=xr(()=>({__html:cg().outerHTML}),[]),[s,i]=en(null),c=Dn(()=>{s&&(clearTimeout(s),i(null)),e()},[s]),a=Dn((u,d)=>{n.onSubmitSuccess(u,d),i(setTimeout(()=>{e(),i(null)},5e3))},[e]);return at(Ur,null,s?at("div",{class:"success__position",onClick:c},at("div",{class:"success__content"},r.successMessageText,at("span",{class:"success__icon",dangerouslySetInnerHTML:o}))):at("dialog",{class:"dialog",onClick:r.onFormClose,open:t},at("div",{class:"dialog__position"},at("div",{class:"dialog__content",onClick:u=>{u.stopPropagation()}},at(ig,{options:r}),at(ag,{...n,onSubmitSuccess:a})))))}const lg=()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:t,screenshotIntegration:e,sendFeedback:n,shadow:r})=>{const o=r,s=t.useSentryUser,i=function(){const f=et().getUser(),h=Dt().getUser(),g=br().getUser();return f&&Object.keys(f).length?f:h&&Object.keys(h).length?h:g}(),c=yt.createElement("div"),a=function(f){const h=yt.createElement("style");return h.textContent=`
|
|
106
|
+
:host {
|
|
107
|
+
--dialog-inset: var(--inset);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
.dialog {
|
|
112
|
+
position: fixed;
|
|
113
|
+
z-index: var(--z-index);
|
|
114
|
+
margin: 0;
|
|
115
|
+
inset: 0;
|
|
116
|
+
|
|
117
|
+
display: flex;
|
|
118
|
+
align-items: center;
|
|
119
|
+
justify-content: center;
|
|
120
|
+
padding: 0;
|
|
121
|
+
height: 100vh;
|
|
122
|
+
width: 100vw;
|
|
123
|
+
|
|
124
|
+
color: var(--dialog-color, var(--foreground));
|
|
125
|
+
fill: var(--dialog-color, var(--foreground));
|
|
126
|
+
line-height: 1.75em;
|
|
127
|
+
|
|
128
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
129
|
+
border: none;
|
|
130
|
+
inset: 0;
|
|
131
|
+
opacity: 1;
|
|
132
|
+
transition: opacity 0.2s ease-in-out;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.dialog__position {
|
|
136
|
+
position: fixed;
|
|
137
|
+
z-index: var(--z-index);
|
|
138
|
+
inset: var(--dialog-inset);
|
|
139
|
+
padding: var(--page-margin);
|
|
140
|
+
display: flex;
|
|
141
|
+
max-height: calc(100vh - (2 * var(--page-margin)));
|
|
142
|
+
}
|
|
143
|
+
@media (max-width: 600px) {
|
|
144
|
+
.dialog__position {
|
|
145
|
+
inset: var(--page-margin);
|
|
146
|
+
padding: 0;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.dialog__position:has(.editor) {
|
|
151
|
+
inset: var(--page-margin);
|
|
152
|
+
padding: 0;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.dialog:not([open]) {
|
|
156
|
+
opacity: 0;
|
|
157
|
+
pointer-events: none;
|
|
158
|
+
visibility: hidden;
|
|
159
|
+
}
|
|
160
|
+
.dialog:not([open]) .dialog__content {
|
|
161
|
+
transform: translate(0, -16px) scale(0.98);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.dialog__content {
|
|
165
|
+
display: flex;
|
|
166
|
+
flex-direction: column;
|
|
167
|
+
gap: 16px;
|
|
168
|
+
padding: var(--dialog-padding, 24px);
|
|
169
|
+
max-width: 100%;
|
|
170
|
+
width: 100%;
|
|
171
|
+
max-height: 100%;
|
|
172
|
+
overflow: auto;
|
|
173
|
+
|
|
174
|
+
background: var(--dialog-background, var(--background));
|
|
175
|
+
border-radius: var(--dialog-border-radius, 20px);
|
|
176
|
+
border: var(--dialog-border, var(--border));
|
|
177
|
+
box-shadow: var(--dialog-box-shadow, var(--box-shadow));
|
|
178
|
+
transform: translate(0, 0) scale(1);
|
|
179
|
+
transition: transform 0.2s ease-in-out;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
.dialog__header {
|
|
185
|
+
display: flex;
|
|
186
|
+
gap: 4px;
|
|
187
|
+
justify-content: space-between;
|
|
188
|
+
font-weight: var(--dialog-header-weight, 600);
|
|
189
|
+
margin: 0;
|
|
190
|
+
}
|
|
191
|
+
.dialog__title {
|
|
192
|
+
align-self: center;
|
|
193
|
+
width: var(--form-width, 272px);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
@media (max-width: 600px) {
|
|
197
|
+
.dialog__title {
|
|
198
|
+
width: auto;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.dialog__position:has(.editor) .dialog__title {
|
|
203
|
+
width: auto;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
.brand-link {
|
|
208
|
+
display: inline-flex;
|
|
209
|
+
}
|
|
210
|
+
.brand-link:focus-visible {
|
|
211
|
+
outline: var(--outline);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
.form {
|
|
216
|
+
display: flex;
|
|
217
|
+
overflow: auto;
|
|
218
|
+
flex-direction: row;
|
|
219
|
+
gap: 16px;
|
|
220
|
+
flex: 1 0;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.form fieldset {
|
|
224
|
+
border: none;
|
|
225
|
+
margin: 0;
|
|
226
|
+
padding: 0;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.form__right {
|
|
230
|
+
flex: 0 0 auto;
|
|
231
|
+
display: flex;
|
|
232
|
+
overflow: auto;
|
|
233
|
+
flex-direction: column;
|
|
234
|
+
justify-content: space-between;
|
|
235
|
+
gap: 20px;
|
|
236
|
+
width: var(--form-width, 100%);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.dialog__position:has(.editor) .form__right {
|
|
240
|
+
width: var(--form-width, 272px);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.form__top {
|
|
244
|
+
display: flex;
|
|
245
|
+
flex-direction: column;
|
|
246
|
+
gap: 8px;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.form__error-container {
|
|
250
|
+
color: var(--error-color);
|
|
251
|
+
fill: var(--error-color);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.form__label {
|
|
255
|
+
display: flex;
|
|
256
|
+
flex-direction: column;
|
|
257
|
+
gap: 4px;
|
|
258
|
+
margin: 0px;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.form__label__text {
|
|
262
|
+
display: flex;
|
|
263
|
+
gap: 4px;
|
|
264
|
+
align-items: center;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.form__label__text--required {
|
|
268
|
+
font-size: 0.85em;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.form__input {
|
|
272
|
+
font-family: inherit;
|
|
273
|
+
line-height: inherit;
|
|
274
|
+
background: transparent;
|
|
275
|
+
box-sizing: border-box;
|
|
276
|
+
border: var(--input-border, var(--border));
|
|
277
|
+
border-radius: var(--input-border-radius, 6px);
|
|
278
|
+
color: var(--input-color, inherit);
|
|
279
|
+
fill: var(--input-color, inherit);
|
|
280
|
+
font-size: var(--input-font-size, inherit);
|
|
281
|
+
font-weight: var(--input-font-weight, 500);
|
|
282
|
+
padding: 6px 12px;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.form__input::placeholder {
|
|
286
|
+
opacity: 0.65;
|
|
287
|
+
color: var(--input-placeholder-color, inherit);
|
|
288
|
+
filter: var(--interactive-filter);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.form__input:focus-visible {
|
|
292
|
+
outline: var(--input-focus-outline, var(--outline));
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.form__input--textarea {
|
|
296
|
+
font-family: inherit;
|
|
297
|
+
resize: vertical;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.error {
|
|
301
|
+
color: var(--error-color);
|
|
302
|
+
fill: var(--error-color);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
.btn-group {
|
|
307
|
+
display: grid;
|
|
308
|
+
gap: 8px;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.btn {
|
|
312
|
+
line-height: inherit;
|
|
313
|
+
border: var(--button-border, var(--border));
|
|
314
|
+
border-radius: var(--button-border-radius, 6px);
|
|
315
|
+
cursor: pointer;
|
|
316
|
+
font-family: inherit;
|
|
317
|
+
font-size: var(--button-font-size, inherit);
|
|
318
|
+
font-weight: var(--button-font-weight, 600);
|
|
319
|
+
padding: var(--button-padding, 6px 16px);
|
|
320
|
+
}
|
|
321
|
+
.btn[disabled] {
|
|
322
|
+
opacity: 0.6;
|
|
323
|
+
pointer-events: none;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.btn--primary {
|
|
327
|
+
color: var(--button-primary-color, var(--accent-foreground));
|
|
328
|
+
fill: var(--button-primary-color, var(--accent-foreground));
|
|
329
|
+
background: var(--button-primary-background, var(--accent-background));
|
|
330
|
+
border: var(--button-primary-border, var(--border));
|
|
331
|
+
border-radius: var(--button-primary-border-radius, 6px);
|
|
332
|
+
font-weight: var(--button-primary-font-weight, 500);
|
|
333
|
+
}
|
|
334
|
+
.btn--primary:hover {
|
|
335
|
+
color: var(--button-primary-hover-color, var(--accent-foreground));
|
|
336
|
+
fill: var(--button-primary-hover-color, var(--accent-foreground));
|
|
337
|
+
background: var(--button-primary-hover-background, var(--accent-background));
|
|
338
|
+
filter: var(--interactive-filter);
|
|
339
|
+
}
|
|
340
|
+
.btn--primary:focus-visible {
|
|
341
|
+
background: var(--button-primary-hover-background, var(--accent-background));
|
|
342
|
+
filter: var(--interactive-filter);
|
|
343
|
+
outline: var(--button-primary-focus-outline, var(--outline));
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.btn--default {
|
|
347
|
+
color: var(--button-color, var(--foreground));
|
|
348
|
+
fill: var(--button-color, var(--foreground));
|
|
349
|
+
background: var(--button-background, var(--background));
|
|
350
|
+
border: var(--button-border, var(--border));
|
|
351
|
+
border-radius: var(--button-border-radius, 6px);
|
|
352
|
+
font-weight: var(--button-font-weight, 500);
|
|
353
|
+
}
|
|
354
|
+
.btn--default:hover {
|
|
355
|
+
color: var(--button-color, var(--foreground));
|
|
356
|
+
fill: var(--button-color, var(--foreground));
|
|
357
|
+
background: var(--button-hover-background, var(--background));
|
|
358
|
+
filter: var(--interactive-filter);
|
|
359
|
+
}
|
|
360
|
+
.btn--default:focus-visible {
|
|
361
|
+
background: var(--button-hover-background, var(--background));
|
|
362
|
+
filter: var(--interactive-filter);
|
|
363
|
+
outline: var(--button-focus-outline, var(--outline));
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
.success__position {
|
|
368
|
+
position: fixed;
|
|
369
|
+
inset: var(--dialog-inset);
|
|
370
|
+
padding: var(--page-margin);
|
|
371
|
+
z-index: var(--z-index);
|
|
372
|
+
}
|
|
373
|
+
.success__content {
|
|
374
|
+
background: var(--success-background, var(--background));
|
|
375
|
+
border: var(--success-border, var(--border));
|
|
376
|
+
border-radius: var(--success-border-radius, 1.7em/50%);
|
|
377
|
+
box-shadow: var(--success-box-shadow, var(--box-shadow));
|
|
378
|
+
font-weight: var(--success-font-weight, 600);
|
|
379
|
+
color: var(--success-color);
|
|
380
|
+
fill: var(--success-color);
|
|
381
|
+
padding: 12px 24px;
|
|
382
|
+
line-height: 1.75em;
|
|
383
|
+
|
|
384
|
+
display: grid;
|
|
385
|
+
align-items: center;
|
|
386
|
+
grid-auto-flow: column;
|
|
387
|
+
gap: 6px;
|
|
388
|
+
cursor: default;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.success__icon {
|
|
392
|
+
display: flex;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
`,f&&h.setAttribute("nonce",f),h}(t.styleNonce);let u="";const d={get el(){return c},appendToDom(){o.contains(a)||o.contains(c)||(o.appendChild(a),o.appendChild(c))},removeFromDom(){c.remove(),a.remove(),yt.body.style.overflow=u},open(){p(!0),t.onFormOpen?.(),W()?.emit("openFeedbackWidget"),u=yt.body.style.overflow,yt.body.style.overflow="hidden"},close(){p(!1),yt.body.style.overflow=u}},l=e?.createInput({h:at,hooks:og,dialog:d,options:t}),p=f=>{(function(h,g){var S,w,k;vt.__&&vt.__(h,g),S=g.__k,w=[],k=[],ya(g,h=g.__k=at(Ur,null,[h]),S||Er,Er,g.ownerSVGElement!==void 0,S?null:g.firstChild?ms.call(g.childNodes):null,w,S?S.__e:g.firstChild,!1,k),h.__d=void 0,Ai(w,h,k)})(at(ug,{options:t,screenshotInput:l,showName:t.showName||t.isNameRequired,showEmail:t.showEmail||t.isEmailRequired,defaultName:s&&i?.[s.name]||"",defaultEmail:s&&i?.[s.email]||"",onFormClose:()=>{p(!1),t.onFormClose?.()},onSubmit:n,onSubmitSuccess:(h,g)=>{p(!1),t.onSubmitSuccess?.(h,g)},onSubmitError:h=>{t.onSubmitError?.(h)},onFormSubmitted:()=>{t.onFormSubmitted?.()},open:f}),c)};return d}});function dg(t){const e=yt.createElement("style"),n="#1A141F",r="#302735";return e.textContent=`
|
|
396
|
+
.editor {
|
|
397
|
+
display: flex;
|
|
398
|
+
flex-grow: 1;
|
|
399
|
+
flex-direction: column;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.editor__image-container {
|
|
403
|
+
justify-items: center;
|
|
404
|
+
padding: 15px;
|
|
405
|
+
position: relative;
|
|
406
|
+
height: 100%;
|
|
407
|
+
border-radius: var(--menu-border-radius, 6px);
|
|
408
|
+
|
|
409
|
+
background-color: ${n};
|
|
410
|
+
background-image: repeating-linear-gradient(
|
|
411
|
+
-145deg,
|
|
412
|
+
transparent,
|
|
413
|
+
transparent 8px,
|
|
414
|
+
${n} 8px,
|
|
415
|
+
${n} 11px
|
|
416
|
+
),
|
|
417
|
+
repeating-linear-gradient(
|
|
418
|
+
-45deg,
|
|
419
|
+
transparent,
|
|
420
|
+
transparent 15px,
|
|
421
|
+
${r} 15px,
|
|
422
|
+
${r} 16px
|
|
423
|
+
);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.editor__canvas-container {
|
|
427
|
+
width: 100%;
|
|
428
|
+
height: 100%;
|
|
429
|
+
position: relative;
|
|
430
|
+
display: flex;
|
|
431
|
+
align-items: center;
|
|
432
|
+
justify-content: center;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.editor__canvas-container > * {
|
|
436
|
+
object-fit: contain;
|
|
437
|
+
position: absolute;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.editor__tool-container {
|
|
441
|
+
padding-top: 8px;
|
|
442
|
+
display: flex;
|
|
443
|
+
justify-content: center;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.editor__tool-bar {
|
|
447
|
+
display: flex;
|
|
448
|
+
gap: 8px;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.editor__tool {
|
|
452
|
+
display: flex;
|
|
453
|
+
padding: 8px 12px;
|
|
454
|
+
justify-content: center;
|
|
455
|
+
align-items: center;
|
|
456
|
+
border: var(--button-border, var(--border));
|
|
457
|
+
border-radius: var(--button-border-radius, 6px);
|
|
458
|
+
background: var(--button-background, var(--background));
|
|
459
|
+
color: var(--button-color, var(--foreground));
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.editor__tool--active {
|
|
463
|
+
background: var(--button-primary-background, var(--accent-background));
|
|
464
|
+
color: var(--button-primary-color, var(--accent-foreground));
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.editor__rect {
|
|
468
|
+
position: absolute;
|
|
469
|
+
z-index: 2;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.editor__rect button {
|
|
473
|
+
opacity: 0;
|
|
474
|
+
position: absolute;
|
|
475
|
+
top: -12px;
|
|
476
|
+
right: -12px;
|
|
477
|
+
cursor: pointer;
|
|
478
|
+
padding: 0;
|
|
479
|
+
z-index: 3;
|
|
480
|
+
border: none;
|
|
481
|
+
background: none;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.editor__rect:hover button {
|
|
485
|
+
opacity: 1;
|
|
486
|
+
}
|
|
487
|
+
`,t&&e.setAttribute("nonce",t),e}function pg({hooks:t}){return function({onBeforeScreenshot:e,onScreenshot:n,onAfterScreenshot:r,onError:o}){const s=function(){const[i,c]=t.useState(ne.devicePixelRatio??1);return t.useEffect(()=>{const a=()=>{c(ne.devicePixelRatio)},u=matchMedia(`(resolution: ${ne.devicePixelRatio}dppx)`);return u.addEventListener("change",a),()=>{u.removeEventListener("change",a)}},[]),i}();t.useEffect(()=>{(async()=>{e();const i=await ar.mediaDevices.getDisplayMedia({video:{width:ne.innerWidth*s,height:ne.innerHeight*s},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),c=yt.createElement("video");await new Promise((a,u)=>{c.srcObject=i,c.onloadedmetadata=()=>{n(c,s),i.getTracks().forEach(d=>d.stop()),a()},c.play().catch(u)}),r()})().catch(o)},[])}}function De(t,e,n){if(!t)return;const r=t.getContext("2d",e);r&&n(t,r)}function Bs(t,e){De(t,{alpha:!0},(n,r)=>{r.drawImage(e,0,0,e.width,e.height,0,0,n.width,n.height)})}function js(t,e,n){De(t,{alpha:!0},(r,o)=>{n.length&&(o.fillStyle="rgba(0, 0, 0, 0.25)",o.fillRect(0,0,r.width,r.height)),n.forEach(s=>{(function(i,c,a){switch(i.type){case"highlight":c.shadowColor="rgba(0, 0, 0, 0.7)",c.shadowBlur=50,c.fillStyle=a,c.fillRect(i.x-1,i.y-1,i.w+2,i.h+2),c.clearRect(i.x,i.y,i.w,i.h);break;case"hide":c.fillStyle="rgb(0, 0, 0)",c.fillRect(i.x,i.y,i.w,i.h)}})(s,o,e)})})}function fg({h:t,hooks:e,outputBuffer:n,dialog:r,options:o}){const s=pg({hooks:e}),i=function({h:l}){return function({action:p,setAction:f}){return l("div",{class:"editor__tool-container"},l("div",{class:"editor__tool-bar"},l("button",{type:"button",class:"editor__tool "+(p==="highlight"?"editor__tool--active":""),onClick:()=>{f(p==="highlight"?"":"highlight")}},"Highlight"),l("button",{type:"button",class:"editor__tool "+(p==="hide"?"editor__tool--active":""),onClick:()=>{f(p==="hide"?"":"hide")}},"Hide")))}}({h:t}),c=function({h:l}){return function(){return l("svg",{"data-test-id":"icon-close",viewBox:"0 0 16 16",fill:"#2B2233",height:"25px",width:"25px"},l("circle",{r:"7",cx:"8",cy:"8",fill:"white"}),l("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"}),l("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"}),l("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"}))}}({h:t}),a={__html:dg(o.styleNonce).innerText},u=r.el.style,d=({screenshot:l})=>{const[p,f]=e.useState("highlight"),[h,g]=e.useState([]),S=e.useRef(null),w=e.useRef(null),k=e.useRef(null),E=e.useRef(null),[y,_]=e.useState(1),x=e.useMemo(()=>{const T=yt.getElementById(o.id);if(!T)return"white";const I=getComputedStyle(T);return I.getPropertyValue("--button-primary-background")||I.getPropertyValue("--accent-background")},[o.id]);e.useLayoutEffect(()=>{const T=()=>{const I=S.current;I&&(De(l.canvas,{alpha:!1},O=>{const P=Math.min(I.clientWidth/O.width,I.clientHeight/O.height);_(P)}),I.clientHeight!==0&&I.clientWidth!==0||setTimeout(T,0))};return T(),ne.addEventListener("resize",T),()=>{ne.removeEventListener("resize",T)}},[l]);const b=e.useCallback((T,I)=>{De(T,{alpha:!0},(O,P)=>{P.scale(I,I),O.width=l.canvas.width,O.height=l.canvas.height})},[l]);e.useEffect(()=>{b(w.current,l.dpi),Bs(w.current,l.canvas)},[l]),e.useEffect(()=>{b(k.current,l.dpi),De(k.current,{alpha:!0},(T,I)=>{I.clearRect(0,0,T.width,T.height)}),js(k.current,x,h)},[h,x]),e.useEffect(()=>{b(n,l.dpi),Bs(n,l.canvas),De(yt.createElement("canvas"),{alpha:!0},(T,I)=>{I.scale(l.dpi,l.dpi),T.width=l.canvas.width,T.height=l.canvas.height,js(T,x,h),Bs(n,T)})},[h,l,x]);const M=e.useCallback(T=>I=>{I.preventDefault(),I.stopPropagation(),g(O=>{const P=[...O];return P.splice(T,1),P})},[]),C={width:l.canvas.width*y+"px",height:l.canvas.height*y+"px"},R=T=>{T.stopPropagation()};return t("div",{class:"editor"},t("style",{nonce:o.styleNonce,dangerouslySetInnerHTML:a}),t("div",{class:"editor__image-container"},t("div",{class:"editor__canvas-container",ref:S},t("canvas",{ref:w,id:"background",style:C}),t("canvas",{ref:k,id:"foreground",style:C}),t("div",{ref:E,onMouseDown:T=>{if(!p||!E.current)return;const I=E.current.getBoundingClientRect(),O={type:p,x:T.offsetX/y,y:T.offsetY/y},P=(D,m)=>{const v=(m.clientX-I.x)/y,N=(m.clientY-I.y)/y;return{type:D.type,x:Math.min(D.x,v),y:Math.min(D.y,N),w:Math.abs(v-D.x),h:Math.abs(N-D.y)}},L=D=>{De(k.current,{alpha:!0},(m,v)=>{v.clearRect(0,0,m.width,m.height)}),js(k.current,x,[...h,P(O,D)])},$=D=>{const m=P(O,D);m.w*y>=1&&m.h*y>=1&&g(v=>[...v,m]),yt.removeEventListener("mousemove",L),yt.removeEventListener("mouseup",$)};yt.addEventListener("mousemove",L),yt.addEventListener("mouseup",$)},style:C},h.map((T,I)=>t("div",{key:I,class:"editor__rect",style:{top:T.y*y+"px",left:T.x*y+"px",width:T.w*y+"px",height:T.h*y+"px"}},t("button",{"aria-label":"Remove",onClick:M(I),onMouseDown:R,onMouseUp:R,type:"button"},t(c,null))))))),t(i,{action:p,setAction:f}))};return function({onError:l}){const[p,f]=e.useState();return s({onBeforeScreenshot:e.useCallback(()=>{u.display="none"},[]),onScreenshot:e.useCallback((h,g)=>{De(yt.createElement("canvas"),{alpha:!1},(S,w)=>{w.scale(g,g),S.width=h.videoWidth,S.height=h.videoHeight,w.drawImage(h,0,0,S.width,S.height),f({canvas:S,dpi:g})}),n.width=h.videoWidth,n.height=h.videoHeight},[]),onAfterScreenshot:e.useCallback(()=>{u.display="block"},[]),onError:e.useCallback(h=>{u.display="block",l(h)},[])}),p?t(d,{screenshot:p}):t("div",null)}}const hg=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:t,hooks:e,dialog:n,options:r})=>{const o=yt.createElement("canvas");return{input:fg({h:t,hooks:e,outputBuffer:o,dialog:n,options:r}),value:async()=>{const s=await new Promise(i=>{o.toBlob(i,"image/png")});if(s)return{data:new Uint8Array(await s.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}}),q=Q;let Di=0;function pu(){return Di>0}function Gn(t,e={}){if(!function(r){return typeof r=="function"}(t))return t;try{const r=t.__sentry_wrapped__;if(r)return typeof r=="function"?r:t;if(oa(t))return t}catch{return t}const n=function(...r){try{const o=r.map(s=>Gn(s,e));return t.apply(this,o)}catch(o){throw Di++,setTimeout(()=>{Di--}),Gt(s=>{s.addEventProcessor(i=>(e.mechanism&&(di(i,void 0),Be(i,e.mechanism)),i.extra={...i.extra,arguments:r},i)),We(o)}),o}};try{for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}catch{}Ql(n,t),qt(t,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>t.name})}catch{}return n}function ba(){const t=mn(),{referrer:e}=q.document||{},{userAgent:n}=q.navigator||{};return{url:t,headers:{...e&&{Referer:e},...n&&{"User-Agent":n}}}}const mg={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"},fu=q;async function Ep(t,e){const n=mg[t],r=fu.Sentry=fu.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${t}`);const o=r[t];if(typeof o=="function"&&!("_isShim"in o))return o;const s=function(l){const p=W(),f=p?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${Se}/${l}.min.js`,f).toString()}(n),i=q.document.createElement("script");i.src=s,i.crossOrigin="anonymous",i.referrerPolicy="strict-origin",e&&i.setAttribute("nonce",e);const c=new Promise((l,p)=>{i.addEventListener("load",()=>l()),i.addEventListener("error",p)}),a=q.document.currentScript,u=q.document.body||q.document.head||a?.parentElement;if(!u)throw new Error(`Could not find parent element to insert lazy-loaded ${t} script`);u.appendChild(i);try{await c}catch{throw new Error(`Error when loading integration: ${t}`)}const d=r[t];if(typeof d!="function")throw new Error(`Could not load integration: ${t}`);return d}const gg=mp({lazyLoadIntegration:Ep}),hu=mp({getModalIntegration:()=>lg,getScreenshotIntegration:()=>hg});function gn(t,e,n,r){ki({level:t,message:e,attributes:n,severityNumber:r})}const yg=Object.freeze(Object.defineProperty({__proto__:null,debug:function(t,e){gn("debug",t,e)},error:function(t,e){gn("error",t,e)},fatal:function(t,e){gn("fatal",t,e)},fmt:hm,info:function(t,e){gn("info",t,e)},trace:function(t,e){gn("trace",t,e)},warn:function(t,e){gn("warn",t,e)}},Symbol.toStringTag,{value:"Module"}));function gs(t,e){const n=Sa(t,e),r={type:bg(e),value:Sg(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function _g(t,e,n,r){const o=W(),s=o?.getOptions().normalizeDepth,i=function(u){for(const d in u)if(Object.prototype.hasOwnProperty.call(u,d)){const l=u[d];if(l instanceof Error)return l}}(e),c={__serialized__:kd(e,s)};if(i)return{exception:{values:[gs(t,i)]},extra:c};const a={exception:{values:[{type:ds(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:wg(e,{isUnhandledRejection:r})}]},extra:c};if(n){const u=Sa(t,n);u.length&&(a.exception.values[0].stacktrace={frames:u})}return a}function Hs(t,e){return{exception:{values:[gs(t,e)]}}}function Sa(t,e){const n=e.stacktrace||e.stack||"",r=function(s){return s&&vg.test(s.message)?1:0}(e),o=function(s){return typeof s.framesToPop=="number"?s.framesToPop:0}(e);try{return t(n,r,o)}catch{}return[]}const vg=/Minified React error #\d+;/i;function xp(t){return typeof WebAssembly<"u"&&WebAssembly.Exception!==void 0&&t instanceof WebAssembly.Exception}function bg(t){const e=t?.name;return!e&&xp(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function Sg(t){const e=t?.message;return xp(t)?Array.isArray(t.message)&&t.message.length==2?t.message[1]:"wasm exception":e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function Cp(t,e,n,r){const o=Ni(t,e,n?.syntheticException||void 0,r);return Be(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),Re(o)}function Tp(t,e,n="info",r,o){const s=$i(t,e,r?.syntheticException||void 0,o);return s.level=n,r?.event_id&&(s.event_id=r.event_id),Re(s)}function Ni(t,e,n,r,o){let s;if(Jl(e)&&e.error)return Hs(t,e.error);if(Qa(e)||Qn(e,"DOMException")){const i=e;if("stack"in e)s=Hs(t,e);else{const c=i.name||(Qa(i)?"DOMError":"DOMException"),a=i.message?`${c}: ${i.message}`:c;s=$i(t,a,n,r),di(s,a)}return"code"in i&&(s.tags={...s.tags,"DOMException.code":`${i.code}`}),s}return ye(e)?Hs(t,e):Ce(e)||ds(e)?(s=_g(t,e,n,o),Be(s,{synthetic:!0}),s):(s=$i(t,e,n,r),di(s,`${e}`),Be(s,{synthetic:!0}),s)}function $i(t,e,n,r){const o={};if(r&&n){const s=Sa(t,n);s.length&&(o.exception={values:[{value:e,stacktrace:{frames:s}}]}),Be(o,{synthetic:!0})}if(ls(e)){const{__sentry_template_string__:s,__sentry_template_values__:i}=e;return o.logentry={message:s,params:i},o}return o.message=e,o}function wg(t,{isUnhandledRejection:e}){const n=function(o,s=40){const i=Object.keys(td(o));i.sort();const c=i[0];if(!c)return"[object has no keys]";if(c.length>=s)return jn(c,s);for(let a=i.length;a>0;a--){const u=i.slice(0,a).join(", ");if(!(u.length>s))return a===i.length?u:jn(u,s)}return""}(t),r=e?"promise rejection":"exception";return Jl(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:ds(t)?`Event \`${function(o){try{const s=Object.getPrototypeOf(o);return s?s.constructor.name:void 0}catch{}}(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}class Ip extends um{constructor(e){const n=(r=e,{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:q.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...r});var r;Kd(n,"browser",["browser"],q.SENTRY_SDK_SOURCE||"npm"),super(n);const{sendDefaultPii:o,sendClientReports:s,enableLogs:i,_experiments:c}=this._options,a=i??c?.enableLogs;q.document&&(s||a)&&q.document.addEventListener("visibilitychange",()=>{q.document.visibilityState==="hidden"&&(s&&this._flushOutcomes(),a&&go(this))}),a&&(this.on("flush",()=>{go(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{go(this)},5e3)})),o&&(this.on("postprocessEvent",mm),this.on("beforeSendSession",gm))}eventFromException(e,n){return Cp(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Tp(this._options.stackParser,e,n,r,this._options.attachStacktrace)}_prepareEvent(e,n,r,o){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r,o)}}const Kn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ot=Q,Jn=(t,e,n,r)=>{let o,s;return i=>{e.value>=0&&(i||r)&&(s=e.value-(o??0),(s||o===void 0)&&(o=e.value,e.delta=s,e.rating=((c,a)=>c>a[1]?"poor":c>a[0]?"needs-improvement":"good")(e.value,n),t(e)))}},Cr=(t=!0)=>{const e=ot.performance?.getEntriesByType?.("navigation")[0];if(!t||e&&e.responseStart>0&&e.responseStart<performance.now())return e},tr=()=>Cr()?.activationStart??0,Yn=(t,e=-1)=>{const n=Cr();let r="navigate";return n&&(ot.document?.prerendering||tr()>0?r="prerender":ot.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},zs=new WeakMap;function wa(t,e){return zs.get(t)||zs.set(t,new e),zs.get(t)}class Vo{constructor(){Vo.prototype.__init.call(this),Vo.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(e){if(e.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&e.startTime-r.startTime<1e3&&e.startTime-n.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),this._onAfterProcessingUnexpectedShift?.(e)}}const hn=(t,e,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(o=>{Promise.resolve().then(()=>{e(o.getEntries())})});return r.observe({type:t,buffered:!0,...n}),r}}catch{}},ys=t=>{let e=!1;return()=>{e||(t(),e=!0)}};let dr=-1;const Go=t=>{ot.document.visibilityState==="hidden"&&dr>-1&&(dr=t.type==="visibilitychange"?t.timeStamp:0,kg())},kg=()=>{removeEventListener("visibilitychange",Go,!0),removeEventListener("prerenderingchange",Go,!0)},_s=()=>{if(ot.document&&dr<0){const t=tr();dr=(ot.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>t)[0]?.startTime)??(ot.document?.visibilityState!=="hidden"||ot.document?.prerendering?1/0:0),addEventListener("visibilitychange",Go,!0),addEventListener("prerenderingchange",Go,!0)}return{get firstHiddenTime(){return dr}}},Br=t=>{ot.document?.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()},Eg=[1800,3e3],xg=[.1,.25],Cg=(t,e={})=>{((n,r={})=>{Br(()=>{const o=_s(),s=Yn("FCP");let i;const c=hn("paint",a=>{for(const u of a)u.name==="first-contentful-paint"&&(c.disconnect(),u.startTime<o.firstHiddenTime&&(s.value=Math.max(u.startTime-tr(),0),s.entries.push(u),i(!0)))});c&&(i=Jn(n,s,Eg,r.reportAllChanges))})})(ys(()=>{const n=Yn("CLS",0);let r;const o=wa(e,Vo),s=c=>{for(const a of c)o._processEntry(a);o._sessionValue>n.value&&(n.value=o._sessionValue,n.entries=o._sessionEntries,r())},i=hn("layout-shift",s);i&&(r=Jn(t,n,xg,e.reportAllChanges),ot.document?.addEventListener("visibilitychange",()=>{ot.document?.visibilityState==="hidden"&&(s(i.takeRecords()),r(!0))}),ot?.setTimeout?.(r))}))},vs=t=>{const e=n=>{n.type!=="pagehide"&&ot.document?.visibilityState!=="hidden"||t(n)};ot.document&&(addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0))},Tg=[100,300];let Mp=0,Ws=1/0,to=0;const Ig=t=>{t.forEach(e=>{e.interactionId&&(Ws=Math.min(Ws,e.interactionId),to=Math.max(to,e.interactionId),Mp=to?(to-Ws)/7+1:0)})};let Fi;const mu=()=>Fi?Mp:performance.interactionCount||0,Mg=()=>{"interactionCount"in performance||Fi||(Fi=hn("event",Ig,{type:"event",buffered:!0,durationThreshold:0}))};let gu=0;class Ko{constructor(){Ko.prototype.__init.call(this),Ko.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){gu=mu(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const e=Math.min(this._longestInteractionList.length-1,Math.floor((mu()-gu)/50));return this._longestInteractionList[e]}_processEntry(e){if(this._onBeforeProcessingEntry?.(e),!e.interactionId&&e.entryType!=="first-input")return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(e.interactionId);if(r||this._longestInteractionList.length<10||e.duration>n._latency){if(r?e.duration>r._latency?(r.entries=[e],r._latency=e.duration):e.duration===r._latency&&e.startTime===r.entries[0].startTime&&r.entries.push(e):(r={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((o,s)=>s._latency-o._latency),this._longestInteractionList.length>10){const o=this._longestInteractionList.splice(10);for(const s of o)this._longestInteractionMap.delete(s.id)}this._onAfterProcessingINPCandidate?.(r)}}}const Rp=t=>{const e=ot.requestIdleCallback||ot.setTimeout;ot.document?.visibilityState==="hidden"?t():(e(t=ys(t)),vs(t))},Rg=[200,500];class Og{_processEntry(e){this._onBeforeProcessingEntry?.(e)}}const Ag=[2500,4e3],Lg=[800,1800],Ui=t=>{ot.document?.prerendering?Br(()=>Ui(t)):ot.document?.readyState!=="complete"?addEventListener("load",()=>Ui(t),!0):setTimeout(t)},pr={},Jo={};let Op,Ap,Lp,Pp,Dp;function ka(t,e=!1){return jr("cls",t,Pg,Op,e)}function Ea(t,e=!1){return jr("lcp",t,Ng,Lp,e)}function Np(t){return jr("fid",t,Dg,Ap)}function $p(t){return jr("inp",t,Fg,Dp)}function Xe(t,e){return Fp(t,e),Jo[t]||(function(n){const r={};n==="event"&&(r.durationThreshold=0),hn(n,o=>{er(n,{entries:o})},r)}(t),Jo[t]=!0),Up(t,e)}function er(t,e){const n=pr[t];if(n?.length)for(const r of n)try{r(e)}catch(o){Kn&&A.error(`Error while triggering instrumentation handler.
|
|
488
|
+
Type: ${t}
|
|
489
|
+
Name: ${xe(r)}
|
|
490
|
+
Error:`,o)}}function Pg(){return Cg(t=>{er("cls",{metric:t}),Op=t},{reportAllChanges:!0})}function Dg(){return((t,e={})=>{Br(()=>{const n=_s(),r=Yn("FID");let o;const s=a=>{a.startTime<n.firstHiddenTime&&(r.value=a.processingStart-a.startTime,r.entries.push(a),o(!0))},i=a=>{a.forEach(s)},c=hn("first-input",i);o=Jn(t,r,Tg,e.reportAllChanges),c&&vs(ys(()=>{i(c.takeRecords()),c.disconnect()}))})})(t=>{er("fid",{metric:t}),Ap=t})}function Ng(){return((t,e={})=>{Br(()=>{const n=_s(),r=Yn("LCP");let o;const s=wa(e,Og),i=a=>{e.reportAllChanges||(a=a.slice(-1));for(const u of a)s._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-tr(),0),r.entries=[u],o())},c=hn("largest-contentful-paint",i);if(c){o=Jn(t,r,Ag,e.reportAllChanges);const a=ys(()=>{i(c.takeRecords()),c.disconnect(),o(!0)});for(const u of["keydown","click","visibilitychange"])ot.document&&addEventListener(u,()=>Rp(a),{capture:!0,once:!0})}})})(t=>{er("lcp",{metric:t}),Lp=t},{reportAllChanges:!0})}function $g(){return((t,e={})=>{const n=Yn("TTFB"),r=Jn(t,n,Lg,e.reportAllChanges);Ui(()=>{const o=Cr();o&&(n.value=Math.max(o.responseStart-tr(),0),n.entries=[o],r(!0))})})(t=>{er("ttfb",{metric:t}),Pp=t})}function Fg(){return((t,e={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&Br(()=>{Mg();const n=Yn("INP");let r;const o=wa(e,Ko),s=c=>{Rp(()=>{for(const u of c)o._processEntry(u);const a=o._estimateP98LongestInteraction();a&&a._latency!==n.value&&(n.value=a._latency,n.entries=a.entries,r())})},i=hn("event",s,{durationThreshold:e.durationThreshold??40});r=Jn(t,n,Rg,e.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),vs(()=>{s(i.takeRecords()),r(!0)}))})})(t=>{er("inp",{metric:t}),Dp=t})}function jr(t,e,n,r,o=!1){let s;return Fp(t,e),Jo[t]||(s=n(),Jo[t]=!0),r&&e({metric:r}),Up(t,e,o?s:void 0)}function Fp(t,e){pr[t]=pr[t]||[],pr[t].push(e)}function Up(t,e,n){return()=>{n&&n();const r=pr[t];if(!r)return;const o=r.indexOf(e);o!==-1&&r.splice(o,1)}}function qs(t){return typeof t=="number"&&isFinite(t)}function ge(t,e,n,{...r}){const o=Z(t).start_timestamp;return o&&o>e&&typeof t.updateStartTime=="function"&&t.updateStartTime(e),fn(t,()=>{const s=Zt({startTime:e,...r});return s&&s.end(n),s})}function xa(t){const e=W();if(!e)return;const{name:n,transaction:r,attributes:o,startTime:s}=t,{release:i,environment:c,sendDefaultPii:a}=e.getOptions(),u=e.getIntegrationByName("Replay"),d=u?.getReplayId(),l=et(),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{}return Zt({name:n,attributes:{release:i,environment:c,user:f||void 0,profile_id:h||void 0,replay_id:d||void 0,transaction:r,"user_agent.original":ot.navigator?.userAgent,"client.address":a?"{{auto}}":void 0,...o},startTime:s,experimental:{standalone:!0}})}function bs(){return ot.addEventListener&&ot.performance}function Et(t){return t/1e3}function Bp(t){let e="unknown",n="unknown",r="";for(const o of t){if(o==="/"){[e,n]=t.split("/");break}if(!isNaN(Number(o))){e=r==="h"?"http":r,n=t.split(r)[1];break}r+=o}return r===t&&(e=r),{name:e,version:n}}function jp(t){try{return PerformanceObserver.supportedEntryTypes.includes(t)}catch{return!1}}function Hp(t,e){let n,r=!1;function o(c){!r&&n&&e(c,n),r=!0}vs(()=>{o("pagehide")});const s=t.on("beforeStartNavigationSpan",(c,a)=>{a?.isRedirect||(o("navigation"),s?.(),i?.())}),i=t.on("afterStartPageLoadSpan",c=>{n=c.spanContext().spanId,i?.()})}function Ug(t){let e,n=0;if(!jp("layout-shift"))return;const r=ka(({metric:o})=>{const s=o.entries[o.entries.length-1];s&&(n=o.value,e=s)},!0);Hp(t,(o,s)=>{(function(i,c,a,u){Kn&&A.log(`Sending CLS span (${i})`);const d=Et((Bt()||0)+(c?.startTime||0)),l=et().getScopeData().transactionName,p=c?Qt(c.sources[0]?.node):"Layout shift",f={[lt]:"auto.http.browser.cls",[Ot]:"ui.webvital.cls",[Wn]:c?.duration||0,"sentry.pageload.span_id":a,"sentry.report_event":u};c?.sources&&c.sources.forEach((g,S)=>{f[`cls.source.${S+1}`]=Qt(g.node)});const h=xa({name:p,transaction:l,attributes:f,startTime:d});h&&(h.addEvent("cls",{[Dr]:"",[Nr]:i}),h.end(d))})(n,e,s,o),r()})}function Bg(t){let e,n=0;if(!jp("largest-contentful-paint"))return;const r=Ea(({metric:o})=>{const s=o.entries[o.entries.length-1];s&&(n=o.value,e=s)},!0);Hp(t,(o,s)=>{(function(i,c,a,u){Kn&&A.log(`Sending LCP span (${i})`);const d=Et((Bt()||0)+(c?.startTime||0)),l=et().getScopeData().transactionName,p=c?Qt(c.element):"Largest contentful paint",f={[lt]:"auto.http.browser.lcp",[Ot]:"ui.webvital.lcp",[Wn]:0,"sentry.pageload.span_id":a,"sentry.report_event":u};c&&(c.element&&(f["lcp.element"]=Qt(c.element)),c.id&&(f["lcp.id"]=c.id),c.url&&(f["lcp.url"]=c.url.trim().slice(0,200)),c.loadTime!=null&&(f["lcp.loadTime"]=c.loadTime),c.renderTime!=null&&(f["lcp.renderTime"]=c.renderTime),c.size!=null&&(f["lcp.size"]=c.size));const h=xa({name:p,transaction:l,attributes:f,startTime:d});h&&(h.addEvent("lcp",{[Dr]:"millisecond",[Nr]:i}),h.end(d))})(n,e,s,o),r()})}let Vt,ko,yu=0,Ft={};function jg({recordClsStandaloneSpans:t,recordLcpStandaloneSpans:e,client:n}){const r=bs();if(r&&Bt()){r.mark&&ot.performance.mark("sentry-tracing-init");const o=Np(({metric:a})=>{const u=a.entries[a.entries.length-1];if(!u)return;const d=Et(Bt()),l=Et(u.startTime);Ft.fid={value:a.value,unit:"millisecond"},Ft["mark.fid"]={value:d+l,unit:"second"}}),s=e?Bg(n):Ea(({metric:a})=>{const u=a.entries[a.entries.length-1];u&&(Ft.lcp={value:a.value,unit:"millisecond"},Vt=u)},!0),i=jr("ttfb",({metric:a})=>{a.entries[a.entries.length-1]&&(Ft.ttfb={value:a.value,unit:"millisecond"})},$g,Pp),c=t?Ug(n):ka(({metric:a})=>{const u=a.entries[a.entries.length-1];u&&(Ft.cls={value:a.value,unit:""},ko=u)},!0);return()=>{o(),s?.(),i(),c?.()}}return()=>{}}function Hg(t,e){const n=bs(),r=Bt();if(!n?.getEntries||!r)return;const o=Et(r),s=n.getEntries(),{op:i,start_timestamp:c}=Z(t);if(s.slice(yu).forEach(a=>{const u=Et(a.startTime),d=Et(Math.max(0,a.duration));if(!(i==="navigation"&&c&&o+u<c))switch(a.entryType){case"navigation":(function(l,p,f){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(h=>{eo(l,p,h,f)}),eo(l,p,"secureConnection",f,"TLS/SSL"),eo(l,p,"fetch",f,"cache"),eo(l,p,"domainLookup",f,"DNS"),function(h,g,S){const w=S+Et(g.requestStart),k=S+Et(g.responseEnd),E=S+Et(g.responseStart);g.responseEnd&&(ge(h,w,k,{op:"browser.request",name:g.name,attributes:{[lt]:"auto.ui.browser.metrics"}}),ge(h,E,k,{op:"browser.response",name:g.name,attributes:{[lt]:"auto.ui.browser.metrics"}}))}(l,p,f)})(t,a,o);break;case"mark":case"paint":case"measure":{(function(f,h,g,S,w,k){if(["mark","measure"].includes(h.entryType)&&oe(h.name,k))return;const E=Cr(!1),y=Et(E?E.requestStart:0),_=w+Math.max(g,y),x=w+g,b=x+S,M={[lt]:"auto.resource.browser.metrics"};_!==x&&(M["sentry.browser.measure_happened_before_request"]=!0,M["sentry.browser.measure_start_time"]=_),function(C,R){try{const T=R.detail;if(!T)return;if(typeof T=="object"){for(const[I,O]of Object.entries(T))if(O&&Bn(O))C[`sentry.browser.measure.detail.${I}`]=O;else if(O!==void 0)try{C[`sentry.browser.measure.detail.${I}`]=JSON.stringify(O)}catch{}return}if(Bn(T))return void(C["sentry.browser.measure.detail"]=T);try{C["sentry.browser.measure.detail"]=JSON.stringify(T)}catch{}}catch{}}(M,h),_<=b&&ge(f,_,b,{name:h.name,op:h.entryType,attributes:M})})(t,a,u,d,o,e.ignorePerformanceApiSpans);const l=_s(),p=a.startTime<l.firstHiddenTime;a.name==="first-paint"&&p&&(Ft.fp={value:a.startTime,unit:"millisecond"}),a.name==="first-contentful-paint"&&p&&(Ft.fcp={value:a.startTime,unit:"millisecond"});break}case"resource":(function(l,p,f,h,g,S,w){if(p.initiatorType==="xmlhttprequest"||p.initiatorType==="fetch")return;const k=p.initiatorType?`resource.${p.initiatorType}`:"resource.other";if(w?.includes(k))return;const E=An(f),y={[lt]:"auto.resource.browser.metrics"};Vs(y,p,"transferSize","http.response_transfer_size"),Vs(y,p,"encodedBodySize","http.response_content_length"),Vs(y,p,"decodedBodySize","http.decoded_response_content_length");const _=p.deliveryType;_!=null&&(y["http.response_delivery_type"]=_);const x=p.renderBlockingStatus;if(x&&(y["resource.render_blocking_status"]=x),E.protocol&&(y["url.scheme"]=E.protocol.split(":").pop()),E.host&&(y["server.address"]=E.host),y["url.same_origin"]=f.includes(ot.location.origin),p.nextHopProtocol!=null){const{name:C,version:R}=Bp(p.nextHopProtocol);y["network.protocol.name"]=C,y["network.protocol.version"]=R}const b=S+h,M=b+g;ge(l,b,M,{name:f.replace(ot.location.origin,""),op:k,attributes:y})})(t,a,a.name,u,d,o,e.ignoreResourceSpans)}}),yu=Math.max(s.length-1,0),function(a){const u=ot.navigator;if(!u)return;const d=u.connection;d&&(d.effectiveType&&a.setAttribute("effectiveConnectionType",d.effectiveType),d.type&&a.setAttribute("connectionType",d.type),qs(d.rtt)&&(Ft["connection.rtt"]={value:d.rtt,unit:"millisecond"})),qs(u.deviceMemory)&&a.setAttribute("deviceMemory",`${u.deviceMemory} GB`),qs(u.hardwareConcurrency)&&a.setAttribute("hardwareConcurrency",String(u.hardwareConcurrency))}(t),i==="pageload"){(function(u){const d=Cr(!1);if(!d)return;const{responseStart:l,requestStart:p}=d;p<=l&&(u["ttfb.requestTime"]={value:l-p,unit:"millisecond"})})(Ft);const a=Ft["mark.fid"];a&&Ft.fid&&(ge(t,a.value,a.value+Et(Ft.fid.value),{name:"first input delay",op:"ui.action",attributes:{[lt]:"auto.ui.browser.metrics"}}),delete Ft["mark.fid"]),e.recordClsOnPageloadSpan||delete Ft.cls,e.recordLcpOnPageloadSpan||delete Ft.lcp,Object.entries(Ft).forEach(([u,d])=>{xd(u,d.value,d.unit)}),t.setAttribute("performance.timeOrigin",o),t.setAttribute("performance.activationStart",tr()),function(u,d){Vt&&d.recordLcpOnPageloadSpan&&(Vt.element&&u.setAttribute("lcp.element",Qt(Vt.element)),Vt.id&&u.setAttribute("lcp.id",Vt.id),Vt.url&&u.setAttribute("lcp.url",Vt.url.trim().slice(0,200)),Vt.loadTime!=null&&u.setAttribute("lcp.loadTime",Vt.loadTime),Vt.renderTime!=null&&u.setAttribute("lcp.renderTime",Vt.renderTime),u.setAttribute("lcp.size",Vt.size)),ko?.sources&&d.recordClsOnPageloadSpan&&ko.sources.forEach((l,p)=>u.setAttribute(`cls.source.${p+1}`,Qt(l.node)))}(t,e)}Vt=void 0,ko=void 0,Ft={}}function eo(t,e,n,r,o=n){const s=function(a){return a==="secureConnection"?"connectEnd":a==="fetch"?"domainLookupStart":`${a}End`}(n),i=e[s],c=e[`${n}Start`];c&&i&&ge(t,r+Et(c),r+Et(i),{op:`browser.${o}`,name:e.name,attributes:{[lt]:"auto.ui.browser.metrics",...n==="redirect"&&e.redirectCount!=null?{"http.redirect_count":e.redirectCount}:{}}})}function Vs(t,e,n,r){const o=e[n];o!=null&&o<2147483647&&(t[r]=o)}const zg=({entries:t})=>{const e=It(),n=e?At(e):void 0,r=n?Z(n).description:et().getScopeData().transactionName;t.forEach(o=>{const s=o;if(!s.identifier)return;const i=s.name,c=s.renderTime,a=s.loadTime,[u,d]=a?[Et(a),"load-time"]:c?[Et(c),"render-time"]:[xt(),"entry-emission"],l=i==="image-paint"?Et(Math.max(0,(c??0)-(a??0))):0,p={[lt]:"auto.ui.browser.elementtiming",[Ot]:"ui.elementtiming",[kt]:"component","sentry.span_start_time_source":d,"sentry.transaction_name":r,"element.id":s.id,"element.type":s.element?.tagName?.toLowerCase()||"unknown","element.size":s.naturalWidth&&s.naturalHeight?`${s.naturalWidth}x${s.naturalHeight}`:void 0,"element.render_time":c,"element.load_time":a,"element.url":s.url||void 0,"element.identifier":s.identifier,"element.paint_type":i};hs({name:`element[${s.identifier}]`,attributes:p,startTime:u,onlyIfParent:!0},f=>{f.end(u+l)})})};let _u,Gs,Ks,no;function zp(t){Ve("dom",t),Ge("dom",Wg)}function Wg(){if(!ot.document)return;const t=Xt.bind(null,"dom"),e=vu(t,!0);ot.document.addEventListener("click",e,!1),ot.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{const r=ot,o=r[n]?.prototype;o?.hasOwnProperty?.("addEventListener")&&(zt(o,"addEventListener",function(s){return function(i,c,a){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=vu(t);d.handler=l,s.call(this,i,l,a)}d.refCount++}catch{}return s.call(this,i,c,a)}}),zt(o,"removeEventListener",function(s){return function(i,c,a){if(i==="click"||i=="keypress")try{const u=this.__sentry_instrumentation_handlers__||{},d=u[i];d&&(d.refCount--,d.refCount<=0&&(s.call(this,i,d.handler,a),d.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return s.call(this,i,c,a)}}))})}function vu(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(s){try{return s.target}catch{return null}}(n);if(function(s,i){return s==="keypress"&&(!i?.tagName||i.tagName!=="INPUT"&&i.tagName!=="TEXTAREA"&&!i.isContentEditable)}(n.type,r))return;qt(n,"_sentryCaptured",!0),r&&!r._sentryId&&qt(r,"_sentryId",Wt());const o=n.type==="keypress"?"input":n.type;(function(s){if(s.type!==Gs)return!1;try{if(!s.target||s.target._sentryId!==Ks)return!1}catch{}return!0})(n)||(t({event:n,name:o,global:e}),Gs=n.type,Ks=r?r._sentryId:void 0),clearTimeout(_u),_u=ot.setTimeout(()=>{Ks=void 0,Gs=void 0},1e3)}}function Ss(t){const e="history";Ve(e,t),Ge(e,qg)}function qg(){function t(e){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const o=no,s=function(i){try{return new URL(i,ot.location.origin).toString()}catch{return i}}(String(r));if(no=s,o===s)return e.apply(this,n);Xt("history",{from:o,to:s})}return e.apply(this,n)}}ot.addEventListener("popstate",()=>{const e=ot.location.href,n=no;no=e,n!==e&&Xt("history",{from:n,to:e})}),"history"in Ln&&Ln.history&&(zt(ot.history,"pushState",t),zt(ot.history,"replaceState",t))}const Eo={};function Ca(t){const e=Eo[t];if(e)return e;let n=ot[t];if(xi(n))return Eo[t]=n.bind(ot);const r=ot.document;if(r&&typeof r.createElement=="function")try{const o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);const s=o.contentWindow;s?.[t]&&(n=s[t]),r.head.removeChild(o)}catch(o){Kn&&A.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,o)}return n&&(Eo[t]=n.bind(ot))}function bu(t){Eo[t]=void 0}function Hr(...t){return Ca("setTimeout")(...t)}const be="__sentry_xhr_v3__";function Ta(t){Ve("xhr",t),Ge("xhr",Vg)}function Vg(){if(!ot.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,n,r){const o=new Error,s=1e3*xt(),i=re(r[0])?r[0].toUpperCase():void 0,c=function(u){if(re(u))return u;try{return u.toString()}catch{}}(r[1]);if(!i||!c)return e.apply(n,r);n[be]={method:i,url:c,request_headers:{}},i==="POST"&&c.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const a=()=>{const u=n[be];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}Xt("xhr",{endTimestamp:1e3*xt(),startTimestamp:s,xhr:n,virtualError:o})}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply:(u,d,l)=>(a(),u.apply(d,l))}):n.addEventListener("readystatechange",a),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,d,l){const[p,f]=l,h=d[be];return h&&re(p)&&re(f)&&(h.request_headers[p.toLowerCase()]=f),u.apply(d,l)}}),e.apply(n,r)}}),t.send=new Proxy(t.send,{apply(e,n,r){const o=n[be];return o?(r[0]!==void 0&&(o.body=r[0]),Xt("xhr",{startTimestamp:1e3*xt(),xhr:n}),e.apply(n,r)):e.apply(n,r)}})}function Wp(t){return new URLSearchParams(t).toString()}function Yo(t,e=A){try{if(typeof t=="string")return[t];if(t instanceof URLSearchParams)return[t.toString()];if(t instanceof FormData)return[Wp(t)];if(!t)return[void 0]}catch(n){return Kn&&e.error(n,"Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return Kn&&e.log("Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Ia(t=[]){if(t.length===2&&typeof t[1]=="object")return t[1].body}const Js=[],xo=new Map;function Gg(){if(bs()&&Bt()){const t=$p(Kg);return()=>{t()}}return()=>{}}const Su={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"},Kg=({metric:t})=>{if(t.value==null)return;const e=Et(t.value);if(e>60)return;const n=t.entries.find(l=>l.duration===t.value&&Su[l.name]);if(!n)return;const{interactionId:r}=n,o=Su[n.name],s=Et(Bt()+n.startTime),i=It(),c=i?At(i):void 0,a=(r!=null?xo.get(r):void 0)||c,u=a?Z(a).description:et().getScopeData().transactionName,d=xa({name:Qt(n.target),transaction:u,attributes:{[lt]:"auto.http.browser.inp",[Ot]:`ui.interaction.${o}`,[Wn]:n.duration},startTime:s});d&&(d.addEvent("inp",{[Dr]:"millisecond",[Nr]:t.value}),d.end(s+e))};function Bi(t,e=Ca("fetch")){let n=0,r=0;return qd(t,function(o){const s=o.body.length;n+=s,r++;const i={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};if(!e)return bu("fetch"),Bo("No fetch implementation available");try{return e(t.url,i).then(c=>(n-=s,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return bu("fetch"),n-=s,r--,Bo(c)}})}function Xn(t,e,n,r){const o={filename:t,function:e==="<anonymous>"?le:e,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}const Jg=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Yg=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Xg=/\((\S*)(?::(\d+))(?::(\d+))\)/,qp=[30,t=>{const e=Jg.exec(t);if(e){const[,r,o,s]=e;return Xn(r,le,+o,+s)}const n=Yg.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){const s=Xg.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}const[r,o]=Jp(n[1]||le,n[2]);return Xn(o,r,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],Zg=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Qg=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Vp=[50,t=>{const e=Zg.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const o=Qg.exec(e[3]);o&&(e[1]=e[1]||"eval",e[3]=o[1],e[4]=o[2],e[5]="")}let n=e[3],r=e[1]||le;return[r,n]=Jp(r,n),Xn(n,r,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],ty=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ey=[40,t=>{const e=ty.exec(t);return e?Xn(e[2],e[1]||le,+e[3],e[4]?+e[4]:void 0):void 0}],ny=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,ry=[10,t=>{const e=ny.exec(t);return e?Xn(e[2],e[3]||le,+e[1]):void 0}],oy=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,sy=[20,t=>{const e=oy.exec(t);return e?Xn(e[5],e[3]||e[4]||le,+e[1],+e[2]):void 0}],Gp=[qp,Vp],Kp=ql(...Gp),Jp=(t,e)=>{const n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:le,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},ct=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,wu=1024,Yp=(t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:"Breadcrumbs",setup(n){e.console&&fa(function(r){return function(o){if(W()!==r)return;const s={category:"console",data:{arguments:o.args,logger:"console"},level:ha(o.level),message:Po(o.args," ")};if(o.level==="assert"){if(o.args[0]!==!1)return;s.message=`Assertion failed: ${Po(o.args.slice(1)," ")||"console.assert"}`,s.data.arguments=o.args.slice(1)}ee(s,{input:o.args,level:o.level})}}(n)),e.dom&&zp(function(r,o){return function(s){if(W()!==r)return;let i,c,a=typeof o=="object"?o.serializeAttribute:void 0,u=typeof o=="object"&&typeof o.maxStringLength=="number"?o.maxStringLength:void 0;u&&u>wu&&(ct&&A.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${u} was configured. Sentry will use 1024 instead.`),u=wu),typeof a=="string"&&(a=[a]);try{const l=s.event,p=function(f){return!!f&&!!f.target}(l)?l.target:l;i=Qt(p,{keyAttrs:a,maxStringLength:u}),c=Zl(p)}catch{i="<unknown>"}if(i.length===0)return;const d={category:`ui.${s.name}`,message:i};c&&(d.data={"ui.component_name":c}),ee(d,{event:s.event,name:s.name,global:s.global})}}(n,e.dom)),e.xhr&&Ta(function(r){return function(o){if(W()!==r)return;const{startTimestamp:s,endTimestamp:i}=o,c=o.xhr[be];if(!s||!i||!c)return;const{method:a,url:u,status_code:d,body:l}=c,p={method:a,url:u,status_code:d},f={xhr:o.xhr,input:l,startTimestamp:s,endTimestamp:i},h={category:"xhr",data:p,type:"http",level:qc(d)};r.emit("beforeOutgoingRequestBreadcrumb",h,f),ee(h,f)}}(n)),e.fetch&&ma(function(r){return function(o){if(W()!==r)return;const{startTimestamp:s,endTimestamp:i}=o;if(i&&(!o.fetchData.url.match(/sentry_key/)||o.fetchData.method!=="POST"))if(o.fetchData.method,o.fetchData.url,o.error){const c=o.fetchData,a={data:o.error,input:o.args,startTimestamp:s,endTimestamp:i},u={category:"fetch",data:c,level:"error",type:"http"};r.emit("beforeOutgoingRequestBreadcrumb",u,a),ee(u,a)}else{const c=o.response,a={...o.fetchData,status_code:c?.status};o.fetchData.request_body_size,o.fetchData.response_body_size;const u={input:o.args,response:c,startTimestamp:s,endTimestamp:i},d={category:"fetch",data:a,type:"http",level:qc(a.status_code)};r.emit("beforeOutgoingRequestBreadcrumb",d,u),ee(d,u)}}}(n)),e.history&&Ss(function(r){return function(o){if(W()!==r)return;let s=o.from,i=o.to;const c=An(q.location.href);let a=s?An(s):void 0;const u=An(i);a?.path||(a=c),c.protocol===u.protocol&&c.host===u.host&&(i=u.relative),c.protocol===a.protocol&&c.host===a.host&&(s=a.relative),ee({category:"navigation",data:{from:s,to:i}})}}(n)),e.sentry&&n.on("beforeSendEvent",function(r){return function(o){W()===r&&ee({category:"sentry."+(o.type==="transaction"?"transaction":"event"),event_id:o.event_id,level:o.level,message:Je(o)},{event:o})}}(n))}}},iy=["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"],Xp=(t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...t};return{name:"BrowserApiErrors",setupOnce(){e.setTimeout&&zt(q,"setTimeout",ku),e.setInterval&&zt(q,"setInterval",ku),e.requestAnimationFrame&&zt(q,"requestAnimationFrame",ay),e.XMLHttpRequest&&"XMLHttpRequest"in q&&zt(XMLHttpRequest.prototype,"send",cy);const n=e.eventTarget;n&&(Array.isArray(n)?n:iy).forEach(r=>function(o,s){const i=q,c=i[o]?.prototype;c?.hasOwnProperty?.("addEventListener")&&(zt(c,"addEventListener",function(a){return function(u,d,l){try{typeof d.handleEvent=="function"&&(d.handleEvent=Gn(d.handleEvent,{mechanism:{data:{function:"handleEvent",handler:xe(d),target:o},handled:!1,type:"instrument"}}))}catch{}return s.unregisterOriginalCallbacks&&function(p,f,h){p&&typeof p=="object"&&"removeEventListener"in p&&typeof p.removeEventListener=="function"&&p.removeEventListener(f,h)}(this,u,d),a.apply(this,[u,Gn(d,{mechanism:{data:{function:"addEventListener",handler:xe(d),target:o},handled:!1,type:"instrument"}}),l])}}),zt(c,"removeEventListener",function(a){return function(u,d,l){try{const p=d.__sentry_wrapped__;p&&a.call(this,u,p,l)}catch{}return a.call(this,u,d,l)}}))}(r,e))}}};function ku(t){return function(...e){const n=e[0];return e[0]=Gn(n,{mechanism:{data:{function:xe(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function ay(t){return function(e){return t.apply(this,[Gn(e,{mechanism:{data:{function:"requestAnimationFrame",handler:xe(t)},handled:!1,type:"instrument"}})])}}function cy(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(r=>{r in n&&typeof n[r]=="function"&&zt(n,r,function(o){const s={mechanism:{data:{function:r,handler:xe(o)},handled:!1,type:"instrument"}},i=oa(o);return i&&(s.mechanism.data.handler=xe(i)),Gn(o,s)})}),t.apply(this,e)}}const Zp=()=>({name:"BrowserSession",setupOnce(){q.document!==void 0?(bi({ignoreDuration:!0}),Si(),Ss(({from:t,to:e})=>{t!==void 0&&t!==e&&(bi({ignoreDuration:!0}),Si())})):ct&&A.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),Qp=(t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(function(r){Vl(o=>{const{stackParser:s,attachStacktrace:i}=xu();if(W()!==r||pu())return;const{msg:c,url:a,line:u,column:d,error:l}=o,p=function(f,h,g,S){const w=f.exception=f.exception||{},k=w.values=w.values||[],E=k[0]=k[0]||{},y=E.stacktrace=E.stacktrace||{},_=y.frames=y.frames||[],x=S,b=g,M=re(h)&&h.length>0?h:mn();return _.length===0&&_.push({colno:x,filename:M,function:le,in_app:!0,lineno:b}),f}(Ni(s,l||c,void 0,i,!1),a,u,d);p.level="error",kr(p,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}(n),Eu("onerror")),e.onunhandledrejection&&(function(r){Gl(o=>{const{stackParser:s,attachStacktrace:i}=xu();if(W()!==r||pu())return;const c=function(u){if(Bn(u))return u;try{if("reason"in u)return u.reason;if("detail"in u&&"reason"in u.detail)return u.detail.reason}catch{}return u}(o),a=Bn(c)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(c)}`}]}}:Ni(s,c,void 0,i,!0);a.level="error",kr(a,{originalException:c,mechanism:{handled:!1,type:"onunhandledrejection"}})})}(n),Eu("onunhandledrejection"))}}};function Eu(t){ct&&A.log(`Global Handler attached: ${t}`)}function xu(){return W()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const tf=()=>({name:"HttpContext",preprocessEvent(t){if(!q.navigator&&!q.location&&!q.document)return;const e=ba(),n={...e.headers,...t.request?.headers};t.request={...e,...t.request,headers:n}}}),ef=(t={})=>{const e=t.limit||5,n=t.key||"cause";return{name:"LinkedErrors",preprocessEvent(r,o,s){vm(gs,s.getOptions().stackParser,n,e,r,o)}}};function uy(){return!!function(){if(q.window===void 0)return!1;const t=q;if(t.nw||!(t.chrome||t.browser)?.runtime?.id)return!1;const n=mn(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(q===q.top&&r.some(o=>n.startsWith(`${o}://`)))}()&&(ct&&qe(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0)}function nf(t){return[Xd(),Jd(),Xp(),Yp(),Qp(),ef(),tp(),tf(),Zp()]}function ly(t={}){const e=!t.skipBrowserExtensionCheck&&uy(),n={...t,enabled:!e&&t.enabled,stackParser:(r=t.stackParser||Kp,Array.isArray(r)?ql(...r):r),integrations:cm({integrations:t.integrations,defaultIntegrations:t.defaultIntegrations==null?nf():t.defaultIntegrations}),transport:t.transport||Bi};var r;return function(o,s){s.debug===!0&&(H?A.enable():qe(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),et().update(s.initialScope);const i=new o(s);return Bd(i),i.init(),i}(Ip,n)}function ji(t={}){const e=q.document,n=e?.head||e?.body;if(!n)return void(ct&&A.error("[showReportDialog] Global document not defined"));const r=et(),o=W(),s=o?.getDsn();if(!s)return void(ct&&A.error("[showReportDialog] DSN not configured"));const i={...t,user:{...r.getUser(),...t.user},eventId:t.eventId||Rd()},c=q.document.createElement("script");c.async=!0,c.crossOrigin="anonymous",c.src=function(d,l){const p=bd(d);if(!p)return"";const f=`${Pd(p)}embed/error-page/`;let h=`dsn=${dn(p)}`;for(const g in l)if(g!=="dsn"&&g!=="onClose")if(g==="user"){const S=l.user;if(!S)continue;S.name&&(h+=`&name=${encodeURIComponent(S.name)}`),S.email&&(h+=`&email=${encodeURIComponent(S.email)}`)}else h+=`&${encodeURIComponent(g)}=${encodeURIComponent(l[g])}`;return`${f}?${h}`}(s,i);const{onLoad:a,onClose:u}=i;if(a&&(c.onload=a),u){const d=l=>{if(l.data==="__sentry_reportdialog_closed__")try{u()}finally{q.removeEventListener("message",d)}};q.addEventListener("message",d)}n.appendChild(c)}const dy=Q,Cu=new WeakMap,py=(t={})=>{const e=t.types||["crash","deprecation","intervention"];function n(r){if(Cu.has(W()))for(const o of r)Gt(s=>{s.setExtra("url",o.url);const i=`ReportingObserver [${o.type}]`;let c="No details available";if(o.body){const a={};for(const u in o.body)a[u]=o.body[u];if(s.setExtra("body",a),o.type==="crash"){const u=o.body;c=[u.crashId||"",u.reason||""].join(" ").trim()||c}else c=o.body.message||c}Ho(`${i}: ${c}`)})}return{name:"ReportingObserver",setupOnce(){"ReportingObserver"in Ln&&new dy.ReportingObserver(n,{buffered:!0,types:e}).observe()},setup(r){Cu.set(r,!0)}}},fy=(t={})=>{const e={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...t};return{name:"HttpClient",setup(n){(function(r,o){ap()&&ma(s=>{if(W()!==r)return;const{response:i,args:c,error:a,virtualError:u}=s,[d,l]=c;i&&function(p,f,h,g,S){if(Iu(p,h.status,h.url)){const w=function(x,b){return!b&&x instanceof Request||x instanceof Request&&x.bodyUsed?x:new Request(x,b)}(f,g);let k,E,y,_;Ru()&&([k,y]=Tu("Cookie",w),[E,_]=Tu("Set-Cookie",h)),kr(Mu({url:w.url,method:w.method,status:h.status,requestHeaders:k,responseHeaders:E,requestCookies:y,responseCookies:_,error:S}))}}(o,d,i,l,a||u)},!1)})(n,e),function(r,o){"XMLHttpRequest"in Q&&Ta(s=>{if(W()!==r)return;const{error:i,virtualError:c}=s,a=s.xhr,u=a[be];if(!u)return;const{method:d,request_headers:l}=u;try{(function(p,f,h,g,S){if(Iu(p,f.status,f.responseURL)){let w,k,E;if(Ru()){try{const y=f.getResponseHeader("Set-Cookie")||f.getResponseHeader("set-cookie")||void 0;y&&(k=rf(y))}catch{}try{E=function(y){const _=y.getAllResponseHeaders();return _?_.split(`\r
|
|
491
|
+
`).reduce((x,b)=>{const[M,C]=b.split(": ");return M&&C&&(x[M]=C),x},{}):{}}(f)}catch{}w=g}kr(Mu({url:f.responseURL,method:h,status:f.status,requestHeaders:w,responseHeaders:E,responseCookies:k,error:S}))}})(o,a,d,l,i||c)}catch(p){ct&&A.warn("Error while extracting response event form XHR response",p)}})}(n,e)}}};function Tu(t,e){const n=function(o){const s={};return o.forEach((i,c)=>{s[c]=i}),s}(e.headers);let r;try{const o=n[t]||n[t.toLowerCase()]||void 0;o&&(r=rf(o))}catch{}return[n,r]}function hy(t){if(t){const e=t["Content-Length"]||t["content-length"];if(e)return parseInt(e,10)}}function rf(t){return t.split("; ").reduce((e,n)=>{const[r,o]=n.split("=");return r&&o&&(e[r]=o),e},{})}function Iu(t,e,n){return function(s,i){return s.some(c=>typeof c=="number"?c===i:i>=c[0]&&i<=c[1])}(t.failedRequestStatusCodes,e)&&(r=t.failedRequestTargets,o=n,r.some(s=>typeof s=="string"?o.includes(s):s.test(o)))&&!Vd(n,W());var r,o}function Mu(t){const e=W(),n=e&&t.error&&t.error instanceof Error?t.error.stack:void 0,r=n&&e?e.getOptions().stackParser(n,0,1):void 0,o=`HTTP Client Error with status code: ${t.status}`,s={message:o,exception:{values:[{type:"Error",value:o,stacktrace:r?{frames:r}:void 0}]},request:{url:t.url,method:t.method,headers:t.requestHeaders,cookies:t.requestCookies},contexts:{response:{status_code:t.status,headers:t.responseHeaders,cookies:t.responseCookies,body_size:hy(t.responseHeaders)}}};return Be(s,{type:"http.client",handled:!1}),s}function Ru(){const t=W();return!!t&&!!t.getOptions().sendDefaultPii}const Ys=Q,my=(t={})=>{const e=t.frameContextLines!=null?t.frameContextLines:7;return{name:"ContextLines",processEvent:n=>function(r,o){const s=Ys.document,i=Ys.location&&sp(Ys.location.href);if(!s||!i)return r;const c=r.exception?.values;if(!c?.length)return r;const a=s.documentElement.innerHTML;if(!a)return r;const u=["<!DOCTYPE html>","<html>",...a.split(`
|
|
492
|
+
`),"</html>"];return c.forEach(d=>{const l=d.stacktrace;l?.frames&&(l.frames=l.frames.map(p=>function(f,h,g,S){return f.filename!==g||!f.lineno||!h.length||function(w,k,E=5){if(k.lineno===void 0)return;const y=w.length,_=Math.max(Math.min(y-1,k.lineno-1),0);k.pre_context=w.slice(Math.max(0,_-E),_).map(b=>Os(b,0));const x=Math.min(y-1,_);k.context_line=Os(w[x],k.colno||0),k.post_context=w.slice(Math.min(_+1,y),_+1+E).map(b=>Os(b,0))}(h,f,S),f}(p,u,i,o)))}),r}(n,e)}};function Ou(t){const{query:e,operationName:n}=t,{operationName:r=n,operationType:o}=function(s){const i=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,c=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,a=s.match(i);if(a)return{operationType:a[1],operationName:a[2]};const u=s.match(c);return u?{operationType:u[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}(e);return r?`${o} ${r}`:`${o}`}function Au(t){let e;if("xhr"in t){const n=t.xhr[be];e=n&&Yo(n.body)[0]}else e=Yo(Ia(t.input))[0];return e}function Lu(t){let e;try{const n=JSON.parse(t);n.query&&(e=n)}finally{return e}}const gy=t=>({name:"GraphQLClient",setup(e){(function(n,r){n.on("beforeOutgoingRequestSpan",(o,s)=>{const i=Z(o).data||{};if(i[Ot]!=="http.client")return;const c=i[Gh]||i["http.url"],a=i[Vh]||i["http.method"];if(!re(c)||!re(a))return;const{endpoints:u}=r,d=oe(c,u),l=Au(s);if(d&&l){const p=Lu(l);if(p){const f=Ou(p);o.updateName(`${a} ${c} (${f})`),o.setAttribute("graphql.document",l)}}})})(e,t),function(n,r){n.on("beforeOutgoingRequestBreadcrumb",(o,s)=>{const{category:i,type:c,data:a}=o;if(c==="http"&&(i==="fetch"||i==="xhr")){const u=a?.url,{endpoints:d}=r,l=oe(u,d),p=Au(s);if(l&&a&&p){const f=Lu(p);if(!a.graphql&&f){const h=Ou(f);a["graphql.document"]=f.query,a["graphql.operation"]=h}}}})}(e,t)}}),wt=Q,Ma="sentryReplaySession",Ra="Unable to send Replay",Pu=15e4,ro=5e3,of=2e7,yy=36e5;var _y=Object.defineProperty,Du=(t,e,n)=>((r,o,s)=>o in r?_y(r,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[o]=s)(t,typeof e!="symbol"?e+"":e,n),Nt=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Nt||{});function fr(t){return t?.host?.shadowRoot===t}function hr(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function Co(t){try{const n=t.rules||t.cssRules;return n?((e=Array.from(n,sf).join("")).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):null}catch{return null}var e}function sf(t){let e;if(function(n){return"styleSheet"in n}(t))try{e=Co(t.styleSheet)||function(n){const{cssText:r}=n;if(r.split('"').length<3)return r;const o=["@import",`url(${JSON.stringify(n.href)})`];return n.layerName===""?o.push("layer"):n.layerName&&o.push(`layer(${n.layerName})`),n.supportsText&&o.push(`supports(${n.supportsText})`),n.media.length&&o.push(n.media.mediaText),o.join(" ")+";"}(t)}catch{}else if(function(n){return"selectorText"in n}(t)){let n=t.cssText;const r=t.selectorText.includes(":"),o=typeof t.style.all=="string"&&t.style.all;if(o&&(n=function(s){let i="";for(let c=0;c<s.style.length;c++){const a=s.style,u=a[c],d=a.getPropertyPriority(u);i+=`${u}:${a.getPropertyValue(u)}${d?" !important":""};`}return`${s.selectorText} { ${i} }`}(t)),r&&(n=function(s){const i=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(i,"$1\\$2")}(n)),r||o)return n}return e||t.cssText}let af=class{constructor(){Du(this,"idNodeMap",new Map),Du(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 e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){const n=e.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,e)}replace(t,e){const n=this.getNode(t);if(n){const r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(e,r)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Xo({maskInputOptions:t,tagName:e,type:n}){return e==="OPTION"&&(e="SELECT"),!!(t[e.toLowerCase()]||n&&t[n]||n==="password"||e==="INPUT"&&!n&&t.text)}function Tr({isMasked:t,element:e,value:n,maskInputFn:r}){let o=n||"";return t?(r&&(o=r(o,e)),"*".repeat(o.length)):o}function Zn(t){return t.toLowerCase()}function Hi(t){return t.toUpperCase()}const Nu="__rrweb_original__";function Oa(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Zn(e):null}function Zo(t,e,n){return e!=="INPUT"||n!=="radio"&&n!=="checkbox"?t.value:t.getAttribute("value")||""}function $u(t,e){let n;try{n=new URL(t,e??window.location.href)}catch{return null}return n.pathname.match(/\.([0-9a-z]+)(?:$)/i)?.[1]??null}const Fu={};function cf(t){const e=Fu[t];if(e)return e;const n=window.document;let r=window[t];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const s=o.contentWindow;s&&s[t]&&(r=s[t]),n.head.removeChild(o)}catch{}return Fu[t]=r.bind(window)}function Xs(...t){return cf("setTimeout")(...t)}function Uu(...t){return cf("clearTimeout")(...t)}function uf(t){try{return t.contentDocument}catch{}}let vy=1;const by=new RegExp("[^a-z0-9-_:]");function Aa(){return vy++}let yn,Bu;const Sy=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,wy=/^(?:[a-z+]+:)?\/\//i,ky=/^www\..*/i,Ey=/^(data:)([^,]*),(.*)/i;function To(t,e){return(t||"").replace(Sy,(n,r,o,s,i,c)=>{const a=o||i||c,u=r||s||"";if(!a)return n;if(wy.test(a)||ky.test(a))return`url(${u}${a}${u})`;if(Ey.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${function(p){let f="";return f=p.indexOf("//")>-1?p.split("/").slice(0,3).join("/"):p.split("/")[0],f=f.split("?")[0],f}(e)+a}${u})`;const d=e.split("/"),l=a.split("/");d.pop();for(const p of l)p!=="."&&(p===".."?d.pop():d.push(p));return`url(${u}${d.join("/")}${u})`})}const xy=/^[^ \t\n\r\u000c]+/,Cy=/^[, \t\n\r\u000c]+/,ju=new WeakMap;function sr(t,e){return e&&e.trim()!==""?Qo(t,e):e}function Ty(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function Qo(t,e){let n=ju.get(t);if(n||(n=t.createElement("a"),ju.set(t,n)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return n.setAttribute("href",e),n.href}function lf(t,e,n,r,o,s){return r&&(n==="src"||n==="href"&&(e!=="use"||r[0]!=="#")||n==="xlink:href"&&r[0]!=="#"?sr(t,r):n!=="background"||e!=="table"&&e!=="td"&&e!=="th"?n==="srcset"?function(i,c){if(c.trim()==="")return c;let a=0;function u(l){let p;const f=l.exec(c.substring(a));return f?(p=f[0],a+=p.length,p):""}const d=[];for(;u(Cy),!(a>=c.length);){let l=u(xy);if(l.slice(-1)===",")l=sr(i,l.substring(0,l.length-1)),d.push(l);else{let p="";l=sr(i,l);let f=!1;for(;;){const h=c.charAt(a);if(h===""){d.push((l+p).trim());break}if(f)h===")"&&(f=!1);else{if(h===","){a+=1,d.push((l+p).trim());break}h==="("&&(f=!0)}p+=h,a+=1}}}return d.join(", ")}(t,r):n==="style"?To(r,Qo(t)):e==="object"&&n==="data"?sr(t,r):typeof s=="function"?s(n,r,o):r:sr(t,r))}function df(t,e,n){return(t==="video"||t==="audio")&&e==="autoplay"}function pf(t,e,n,r){try{if(r&&t.matches(r))return!1;if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let o=t.classList.length;o--;){const s=t.classList[o];if(e.test(s))return!0}if(n)return t.matches(n)}catch{}return!1}function nn(t,e,n=1/0,r=0){return t?t.nodeType!==t.ELEMENT_NODE||r>n?-1:e(t)?r:nn(t.parentNode,e,n,r+1):-1}function Cn(t,e){return n=>{const r=n;if(r===null)return!1;try{if(t){if(typeof t=="string"){if(r.matches(`.${t}`))return!0}else if(function(o,s){for(let i=o.classList.length;i--;){const c=o.classList[i];if(s.test(c))return!0}return!1}(r,t))return!0}return!(!e||!r.matches(e))}catch{return!1}}}function Nn(t,e,n,r,o,s){try{const i=t.nodeType===t.ELEMENT_NODE?t:t.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 c=-1,a=-1;if(s){if(a=nn(i,Cn(r,o)),a<0)return!0;c=nn(i,Cn(e,n),a>=0?a:1/0)}else{if(c=nn(i,Cn(e,n)),c<0)return!1;a=nn(i,Cn(r,o),c>=0?c:1/0)}return c>=0?!(a>=0)||c<=a:!(a>=0)&&!!s}catch{}return!!s}function Iy(t,e){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:c,maskAttributeFn:a,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,inlineStylesheet:f,maskInputOptions:h={},maskTextFn:g,maskInputFn:S,dataURLOptions:w={},inlineImages:k,recordCanvas:E,keepIframeSrcFn:y,newlyAddedElement:_=!1}=e,x=function(b,M){if(!M.hasNode(b))return;const C=M.getId(b);return C===1?void 0:C}(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:Nt.Document,childNodes:[],compatMode:t.compatMode}:{type:Nt.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:Nt.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:x};case t.ELEMENT_NODE:return function(b,M){const{doc:C,blockClass:R,blockSelector:T,unblockSelector:I,inlineStylesheet:O,maskInputOptions:P={},maskAttributeFn:L,maskInputFn:$,dataURLOptions:D={},inlineImages:m,recordCanvas:v,keepIframeSrcFn:N,newlyAddedElement:U=!1,rootId:B,maskTextClass:F,unmaskTextClass:j,maskTextSelector:G,unmaskTextSelector:K}=M,J=pf(b,R,T,I),nt=function(z){if(z instanceof HTMLFormElement)return"form";const V=Zn(z.tagName);return by.test(V)?"div":V}(b);let dt={};const ht=b.attributes.length;for(let z=0;z<ht;z++){const V=b.attributes[z];V.name&&!df(nt,V.name,V.value)&&(dt[V.name]=lf(C,nt,Zn(V.name),V.value,b,L))}if(nt==="link"&&O){const z=Array.from(C.styleSheets).find(pt=>pt.href===b.href);let V=null;z&&(V=Co(z)),V&&(dt.rel=null,dt.href=null,dt.crossorigin=null,dt._cssText=To(V,z.href))}if(nt==="style"&&b.sheet&&!(b.innerText||b.textContent||"").trim().length){const z=Co(b.sheet);z&&(dt._cssText=To(z,Qo(C)))}if(nt==="input"||nt==="textarea"||nt==="select"||nt==="option"){const z=b,V=Oa(z),pt=Zo(z,Hi(nt),V),bt=z.checked;if(V!=="submit"&&V!=="button"&&pt){const Lt=Nn(z,F,G,j,K,Xo({type:V,tagName:Hi(nt),maskInputOptions:P}));dt.value=Tr({isMasked:Lt,element:z,value:pt,maskInputFn:$})}bt&&(dt.checked=bt)}if(nt==="option"&&(b.selected&&!P.select?dt.selected=!0:delete dt.selected),nt==="canvas"&&v){if(b.__context==="2d")(function(z){const V=z.getContext("2d");if(!V)return!0;for(let pt=0;pt<z.width;pt+=50)for(let bt=0;bt<z.height;bt+=50){const Lt=V.getImageData,Oe=Nu in Lt?Lt[Nu]:Lt;if(new Uint32Array(Oe.call(V,pt,bt,Math.min(50,z.width-pt),Math.min(50,z.height-bt)).data.buffer).some(nr=>nr!==0))return!1}return!0})(b)||(dt.rr_dataURL=b.toDataURL(D.type,D.quality));else if(!("__context"in b)){const z=b.toDataURL(D.type,D.quality),V=C.createElement("canvas");V.width=b.width,V.height=b.height,z!==V.toDataURL(D.type,D.quality)&&(dt.rr_dataURL=z)}}if(nt==="img"&&m){yn||(yn=C.createElement("canvas"),Bu=yn.getContext("2d"));const z=b,V=z.currentSrc||z.getAttribute("src")||"<unknown-src>",pt=z.crossOrigin,bt=()=>{z.removeEventListener("load",bt);try{yn.width=z.naturalWidth,yn.height=z.naturalHeight,Bu.drawImage(z,0,0),dt.rr_dataURL=yn.toDataURL(D.type,D.quality)}catch(Lt){if(z.crossOrigin!=="anonymous")return z.crossOrigin="anonymous",void(z.complete&&z.naturalWidth!==0?bt():z.addEventListener("load",bt));console.warn(`Cannot inline img src=${V}! Error: ${Lt}`)}z.crossOrigin==="anonymous"&&(pt?dt.crossOrigin=pt:z.removeAttribute("crossorigin"))};z.complete&&z.naturalWidth!==0?bt():z.addEventListener("load",bt)}if(nt!=="audio"&&nt!=="video"||(dt.rr_mediaState=b.paused?"paused":"played",dt.rr_mediaCurrentTime=b.currentTime),U||(b.scrollLeft&&(dt.rr_scrollLeft=b.scrollLeft),b.scrollTop&&(dt.rr_scrollTop=b.scrollTop)),J){const{width:z,height:V}=b.getBoundingClientRect();dt={class:dt.class,rr_width:`${z}px`,rr_height:`${V}px`}}nt!=="iframe"||N(dt.src)||(J||uf(b)||(dt.rr_src=dt.src),delete dt.src);let Mt;try{customElements.get(nt)&&(Mt=!0)}catch{}return{type:Nt.Element,tagName:nt,attributes:dt,childNodes:[],isSVG:Ty(b)||void 0,needBlock:J,rootId:B,isCustom:Mt}}(t,{doc:n,blockClass:o,blockSelector:s,unblockSelector:i,inlineStylesheet:f,maskAttributeFn:a,maskInputOptions:h,maskInputFn:S,dataURLOptions:w,inlineImages:k,recordCanvas:E,keepIframeSrcFn:y,newlyAddedElement:_,rootId:x,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p});case t.TEXT_NODE:return function(b,M){const{maskAllText:C,maskTextClass:R,unmaskTextClass:T,maskTextSelector:I,unmaskTextSelector:O,maskTextFn:P,maskInputOptions:L,maskInputFn:$,rootId:D}=M,m=b.parentNode&&b.parentNode.tagName;let v=b.textContent;const N=m==="STYLE"||void 0,U=m==="SCRIPT"||void 0,B=m==="TEXTAREA"||void 0;if(N&&v){try{b.nextSibling||b.previousSibling||b.parentNode.sheet?.cssRules&&(v=Co(b.parentNode.sheet))}catch(j){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${j}`,b)}v=To(v,Qo(M.doc))}U&&(v="SCRIPT_PLACEHOLDER");const F=Nn(b,R,I,T,O,C);return N||U||B||!v||!F||(v=P?P(v,b.parentElement):v.replace(/[\S]/g,"*")),B&&v&&(L.textarea||F)&&(v=$?$(v,b.parentNode):v.replace(/[\S]/g,"*")),m==="OPTION"&&v&&(v=Tr({isMasked:Nn(b,R,I,T,O,Xo({type:null,tagName:m,maskInputOptions:L})),element:b,value:v,maskInputFn:$})),{type:Nt.Text,textContent:v||"",isStyle:N,rootId:D}}(t,{doc:n,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,maskTextFn:g,maskInputOptions:h,maskInputFn:S,rootId:x});case t.CDATA_SECTION_NODE:return{type:Nt.CDATA,textContent:"",rootId:x};case t.COMMENT_NODE:return{type:Nt.Comment,textContent:t.textContent||"",rootId:x};default:return!1}}function St(t){return t==null?"":t.toLowerCase()}function Tn(t,e){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:p=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskAttributeFn:g,maskTextFn:S,maskInputFn:w,slimDOMOptions:k,dataURLOptions:E={},inlineImages:y=!1,recordCanvas:_=!1,onSerialize:x,onIframeLoad:b,iframeLoadTimeout:M=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:R=5e3,keepIframeSrcFn:T=()=>!1,newlyAddedElement:I=!1}=e;let{preserveWhiteSpace:O=!0}=e;const P=Iy(t,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:c,unblockSelector:i,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:g,maskTextFn:S,maskInputFn:w,dataURLOptions:E,inlineImages:y,recordCanvas:_,keepIframeSrcFn:T,newlyAddedElement:I});if(!P)return console.warn(t,"not serialized"),null;let L;L=r.hasNode(t)?r.getId(t):!function(m,v){return!!(v.comment&&m.type===Nt.Comment||m.type===Nt.Element&&(v.script&&(m.tagName==="script"||m.tagName==="link"&&(m.attributes.rel==="preload"||m.attributes.rel==="modulepreload")||m.tagName==="link"&&m.attributes.rel==="prefetch"&&typeof m.attributes.href=="string"&&$u(m.attributes.href)==="js")||v.headFavicon&&(m.tagName==="link"&&m.attributes.rel==="shortcut icon"||m.tagName==="meta"&&(St(m.attributes.name).match(/^msapplication-tile(image|color)$/)||St(m.attributes.name)==="application-name"||St(m.attributes.rel)==="icon"||St(m.attributes.rel)==="apple-touch-icon"||St(m.attributes.rel)==="shortcut icon"))||m.tagName==="meta"&&(v.headMetaDescKeywords&&St(m.attributes.name).match(/^description|keywords$/)||v.headMetaSocial&&(St(m.attributes.property).match(/^(og|twitter|fb):/)||St(m.attributes.name).match(/^(og|twitter):/)||St(m.attributes.name)==="pinterest")||v.headMetaRobots&&(St(m.attributes.name)==="robots"||St(m.attributes.name)==="googlebot"||St(m.attributes.name)==="bingbot")||v.headMetaHttpEquiv&&m.attributes["http-equiv"]!==void 0||v.headMetaAuthorship&&(St(m.attributes.name)==="author"||St(m.attributes.name)==="generator"||St(m.attributes.name)==="framework"||St(m.attributes.name)==="publisher"||St(m.attributes.name)==="progid"||St(m.attributes.property).match(/^article:/)||St(m.attributes.property).match(/^product:/))||v.headMetaVerification&&(St(m.attributes.name)==="google-site-verification"||St(m.attributes.name)==="yandex-verification"||St(m.attributes.name)==="csrf-token"||St(m.attributes.name)==="p:domain_verify"||St(m.attributes.name)==="verify-v1"||St(m.attributes.name)==="verification"||St(m.attributes.name)==="shopify-checkout-api-token"))))}(P,k)&&(O||P.type!==Nt.Text||P.isStyle||P.textContent.replace(/^\s+|\s+$/gm,"").length)?Aa():-2;const $=Object.assign(P,{id:L});if(r.add(t,$),L===-2)return null;x&&x(t);let D=!p;if($.type===Nt.Element){D=D&&!$.needBlock,delete $.needBlock;const m=t.shadowRoot;m&&hr(m)&&($.isShadowHost=!0)}if(($.type===Nt.Document||$.type===Nt.Element)&&D){k.headWhitespace&&$.type===Nt.Element&&$.tagName==="head"&&(O=!1);const m={doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:c,unblockSelector:i,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:p,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:g,maskTextFn:S,maskInputFn:w,slimDOMOptions:k,dataURLOptions:E,inlineImages:y,recordCanvas:_,preserveWhiteSpace:O,onSerialize:x,onIframeLoad:b,iframeLoadTimeout:M,onStylesheetLoad:C,stylesheetLoadTimeout:R,keepIframeSrcFn:T};for(const v of Array.from(t.childNodes)){const N=Tn(v,m);N&&$.childNodes.push(N)}if(function(v){return v.nodeType===v.ELEMENT_NODE}(t)&&t.shadowRoot)for(const v of Array.from(t.shadowRoot.childNodes)){const N=Tn(v,m);N&&(hr(t.shadowRoot)&&(N.isShadow=!0),$.childNodes.push(N))}}return t.parentNode&&fr(t.parentNode)&&hr(t.parentNode)&&($.isShadow=!0),$.type!==Nt.Element||$.tagName!=="iframe"||pf(t,o,s,i)||function(m,v,N){const U=m.contentWindow;if(!U)return;let B,F=!1;try{B=U.document.readyState}catch{return}if(B!=="complete"){const G=Xs(()=>{F||(v(),F=!0)},N);return void m.addEventListener("load",()=>{Uu(G),F=!0,v()})}const j="about:blank";if(U.location.href!==j||m.src===j||m.src==="")return Xs(v,0),m.addEventListener("load",v);m.addEventListener("load",v)}(t,()=>{const m=uf(t);if(m&&b){const v=Tn(m,{doc:m,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:g,maskTextFn:S,maskInputFn:w,slimDOMOptions:k,dataURLOptions:E,inlineImages:y,recordCanvas:_,preserveWhiteSpace:O,onSerialize:x,onIframeLoad:b,iframeLoadTimeout:M,onStylesheetLoad:C,stylesheetLoadTimeout:R,keepIframeSrcFn:T});v&&b(t,v)}},M),$.type===Nt.Element&&$.tagName==="link"&&typeof $.attributes.rel=="string"&&($.attributes.rel==="stylesheet"||$.attributes.rel==="preload"&&typeof $.attributes.href=="string"&&$u($.attributes.href)==="css")&&function(m,v,N){let U,B=!1;try{U=m.sheet}catch{return}if(U)return;const F=Xs(()=>{B||(v(),B=!0)},N);m.addEventListener("load",()=>{Uu(F),B=!0,v()})}(t,()=>{if(C){const m=Tn(t,{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:g,maskTextFn:S,maskInputFn:w,slimDOMOptions:k,dataURLOptions:E,inlineImages:y,recordCanvas:_,preserveWhiteSpace:O,onSerialize:x,onIframeLoad:b,iframeLoadTimeout:M,onStylesheetLoad:C,stylesheetLoadTimeout:R,keepIframeSrcFn:T});m&&C(t,m)}},R),$}function Ht(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const vn=`Please stop import mirror directly. Instead of that,\r
|
|
493
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
494
|
+
or you can use record.mirror to access the mirror instance during recording.`;let Hu={map:{},getId:()=>(console.error(vn),-1),getNode:()=>(console.error(vn),null),removeNodeFromMap(){console.error(vn)},has:()=>(console.error(vn),!1),reset(){console.error(vn)}};function cr(t,e,n={}){let r=null,o=0;return function(...s){const i=Date.now();o||n.leading!==!1||(o=i);const c=e-(i-o),a=this;c<=0||c>e?(r&&(function(...u){La("clearTimeout")(...u)}(r),r=null),o=i,t.apply(a,s)):r||n.trailing===!1||(r=ws(()=>{o=n.leading===!1?0:Date.now(),r=null,t.apply(a,s)},c))}}function ff(t,e,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(t,e);return o.Object.defineProperty(t,e,r?n:{set(i){ws(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>ff(t,e,s||{},!0)}function zi(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=o,()=>{t[e]=r}}catch{return()=>{}}}typeof window<"u"&&window.Proxy&&window.Reflect&&(Hu=new Proxy(Hu,{get:(t,e,n)=>(e==="map"&&console.error(vn),Reflect.get(t,e,n))}));let ts=Date.now;function hf(t){const e=t.document;return{left:e.scrollingElement?e.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:e?.documentElement.scrollLeft||e?.body?.parentElement?.scrollLeft||e?.body?.scrollLeft||0,top:e.scrollingElement?e.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:e?.documentElement.scrollTop||e?.body?.parentElement?.scrollTop||e?.body?.scrollTop||0}}function mf(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function gf(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function yf(t){if(!t)return null;try{return t.nodeType===t.ELEMENT_NODE?t:t.parentElement}catch{return null}}function Jt(t,e,n,r,o){if(!t)return!1;const s=yf(t);if(!s)return!1;const i=Cn(e,n);if(!o){const u=r&&s.matches(r);return i(s)&&!u}const c=nn(s,i);let a=-1;return!(c<0)&&(r&&(a=nn(s,Cn(null,r))),c>-1&&a<0||c<a)}function Zs(t,e){return e.getId(t)===-2}function _f(t,e){if(fr(t))return!1;const n=e.getId(t);return!e.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||_f(t.parentNode,e))}function Wi(t){return!!t.changedTouches}function vf(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function bf(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function qi(t){return!!t?.shadowRoot}/[1-9][0-9]{12}/.test(Date.now().toString())||(ts=()=>new Date().getTime());class My{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,n){if(this.has(e))return this.getId(e);let r;return r=n===void 0?this.id++:n,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Sf(t){let e=null;return t.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.getRootNode().host&&(e=t.getRootNode().host),e}function Ry(t){const e=t.ownerDocument;if(!e)return!1;const n=function(r){let o,s=r;for(;o=Sf(s);)s=o;return s}(t);return e.contains(n)}function wf(t){const e=t.ownerDocument;return!!e&&(e.contains(t)||Ry(t))}const zu={};function La(t){const e=zu[t];if(e)return e;const n=window.document;let r=window[t];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const s=o.contentWindow;s&&s[t]&&(r=s[t]),n.head.removeChild(o)}catch{}return zu[t]=r.bind(window)}function ws(...t){return La("setTimeout")(...t)}var it=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(it||{}),tt=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(tt||{}),jt=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(jt||{}),fe=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(fe||{}),bn=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(bn||{});function Pa(t){try{return t.contentDocument}catch{}}function Wu(t){return"__ln"in t}class Oy{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<e;r++)n=n?.next||null;return n}addNode(e){const n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&Wu(e.previousSibling)){const r=e.previousSibling.__ln.next;n.next=r,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(e.nextSibling&&Wu(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;n.previous=r,n.next=e.nextSibling.__ln,e.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(e){const n=e.__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),e.__ln&&delete e.__ln,this.length--)}}const qu=(t,e)=>`${t}@${e}`;class Ay{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],n=new Set,r=new Oy,o=a=>{let u=a,d=-2;for(;d===-2;)u=u&&u.nextSibling,d=u&&this.mirror.getId(u);return d},s=a=>{if(!a.parentNode||!wf(a))return;const u=fr(a.parentNode)?this.mirror.getId(Sf(a)):this.mirror.getId(a.parentNode),d=o(a);if(u===-1||d===-1)return r.addNode(a);const l=Tn(a,{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=>{vf(p,this.mirror)&&!Jt(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(p),bf(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),qi(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,this.doc)},onIframeLoad:(p,f)=>{Jt(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)}});l&&(e.push({parentId:u,nextId:d,node:l}),n.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)Vu(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||s(a);for(const a of this.addedSet)Gu(this.droppedSet,a)||Vu(this.removes,a,this.mirror)?Gu(this.movedSet,a)?s(a):this.droppedSet.add(a):s(a);let i=null;for(;r.length;){let a=null;if(i){const u=this.mirror.getId(i.value.parentNode),d=o(i.value);u!==-1&&d!==-1&&(a=i)}if(!a){let u=r.tail;for(;u;){const d=u;if(u=u.previous,d){const l=this.mirror.getId(d.value.parentNode);if(o(d.value)===-1)continue;if(l!==-1){a=d;break}{const p=d.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const f=p.parentNode.host;if(this.mirror.getId(f)!==-1){a=d;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}i=a.previous,r.removeNode(a.value),s(a.value)}const c={texts:this.texts.map(a=>({id:this.mirror.getId(a.node),value:a.value})).filter(a=>!n.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:u}=a;if(typeof u.style=="string"){const d=JSON.stringify(a.styleDiff),l=JSON.stringify(a._unchangedStyles);d.length<u.style.length&&(d+l).split("var(").length===u.style.split("var(").length&&(u.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:u}}).filter(a=>!n.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};(c.texts.length||c.attributes.length||c.removes.length||c.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(c))},this.processMutation=e=>{if(!Zs(e.target,this.mirror))switch(e.type){case"characterData":{const n=e.target.textContent;Jt(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||n===e.oldValue||this.texts.push({value:Nn(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,yf(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{const n=e.target;let r=e.attributeName,o=e.target.getAttribute(r);if(r==="value"){const i=Oa(n),c=n.tagName;o=Zo(n,c,i);const a=Xo({maskInputOptions:this.maskInputOptions,tagName:c,type:i});o=Tr({isMasked:Nn(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,a),element:n,value:o,maskInputFn:this.maskInputFn})}if(Jt(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===e.oldValue)return;let s=this.attributeMap.get(e.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(o)){if(Pa(n))return;r="rr_src"}if(s||(s={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(e.target,s)),r==="type"&&n.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!df(n.tagName,r)&&(s.attributes[r]=lf(this.doc,Zn(n.tagName),Zn(r),o,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");e.oldValue&&i.setAttribute("style",e.oldValue);for(const c of Array.from(n.style)){const a=n.style.getPropertyValue(c),u=n.style.getPropertyPriority(c);a!==i.style.getPropertyValue(c)||u!==i.style.getPropertyPriority(c)?s.styleDiff[c]=u===""?a:[a,u]:s._unchangedStyles[c]=[a,u]}for(const c of Array.from(i.style))n.style.getPropertyValue(c)===""&&(s.styleDiff[c]=!1)}break}case"childList":if(Jt(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=fr(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);Jt(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Zs(n,this.mirror)||!function(s,i){return i.getId(s)!==-1}(n,this.mirror)||(this.addedSet.has(n)?(Vi(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||_f(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[qu(r,o)]?Vi(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:!(!fr(e.target)||!hr(e.target))||void 0})),this.mapRemoves.push(n))})}},this.genAdds=(e,n)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Zs(e,this.mirror))return;this.movedSet.add(e);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[qu(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Jt(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach(r=>this.genAdds(r)),qi(e)&&e.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=e[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 Vi(t,e){t.delete(e),e.childNodes.forEach(n=>Vi(t,n))}function Vu(t,e,n){return t.length!==0&&function(r,o,s){let i=o.parentNode;for(;i;){const c=s.getId(i);if(r.some(a=>a.id===c))return!0;i=i.parentNode}return!1}(t,e,n)}function Gu(t,e){return t.size!==0&&kf(t,e)}function kf(t,e){const{parentNode:n}=e;return!!n&&(!!t.has(n)||kf(t,n))}let mr;const ft=t=>mr?(...e)=>{try{return t(...e)}catch(n){if(mr&&mr(n)===!0)return()=>{};throw n}}:t,In=[];function Ir(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function Ef(t,e){const n=new Ay;In.push(n),n.init(t);let r=window.MutationObserver||window.__rrMutationObserver;const o=window?.Zone?.__symbol__?.("MutationObserver");o&&window[o]&&(r=window[o]);const s=new r(ft(i=>{t.onMutation&&t.onMutation(i)===!1||n.processMutations.bind(n)(i)}));return s.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Ly({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){if(i.mouseInteraction===!1)return()=>{};const c=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,a=[];let u=null;return Object.keys(jt).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&c[d]!==!1).forEach(d=>{let l=Zn(d);const p=(f=>h=>{const g=Ir(h);if(Jt(g,r,o,s,!0))return;let S=null,w=f;if("pointerType"in h){switch(h.pointerType){case"mouse":S=fe.Mouse;break;case"touch":S=fe.Touch;break;case"pen":S=fe.Pen}S===fe.Touch?jt[f]===jt.MouseDown?w="TouchStart":jt[f]===jt.MouseUp&&(w="TouchEnd"):fe.Pen}else Wi(h)&&(S=fe.Touch);S!==null?(u=S,(w.startsWith("Touch")&&S===fe.Touch||w.startsWith("Mouse")&&S===fe.Mouse)&&(S=null)):jt[f]===jt.Click&&(S=u,u=null);const k=Wi(h)?h.changedTouches[0]:h;if(!k)return;const E=n.getId(g),{clientX:y,clientY:_}=k;ft(t)({type:jt[w],id:E,x:y,y:_,...S!==null&&{pointerType:S}})})(d);if(window.PointerEvent)switch(jt[d]){case jt.MouseDown:case jt.MouseUp:l=l.replace("mouse","pointer");break;case jt.TouchStart:case jt.TouchEnd:return}a.push(Ht(l,p,e))}),ft(()=>{a.forEach(d=>d())})}function xf({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){return Ht("scroll",ft(cr(ft(c=>{const a=Ir(c);if(!a||Jt(a,r,o,s,!0))return;const u=n.getId(a);if(a===e&&e.defaultView){const d=hf(e.defaultView);t({id:u,x:d.left,y:d.top})}else t({id:u,x:a.scrollLeft,y:a.scrollTop})}),i.scroll||100)),e)}const Py=["INPUT","TEXTAREA","SELECT"],Ku=new WeakMap;function Dy({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,ignoreClass:i,ignoreSelector:c,maskInputOptions:a,maskInputFn:u,sampling:d,userTriggeredOnInput:l,maskTextClass:p,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:g}){function S(x){let b=Ir(x);const M=x.isTrusted,C=b&&Hi(b.tagName);if(C==="OPTION"&&(b=b.parentElement),!b||!C||Py.indexOf(C)<0||Jt(b,r,o,s,!0))return;const R=b;if(R.classList.contains(i)||c&&R.matches(c))return;const T=Oa(b);let I=Zo(R,C,T),O=!1;const P=Xo({maskInputOptions:a,tagName:C,type:T}),L=Nn(b,p,h,f,g,P);T!=="radio"&&T!=="checkbox"||(O=b.checked),I=Tr({isMasked:L,element:b,value:I,maskInputFn:u}),w(b,l?{text:I,isChecked:O,userTriggered:M}:{text:I,isChecked:O});const $=b.name;T==="radio"&&$&&O&&e.querySelectorAll(`input[type="radio"][name="${$}"]`).forEach(D=>{if(D!==b){const m=Tr({isMasked:L,element:D,value:Zo(D,C,T),maskInputFn:u});w(D,l?{text:m,isChecked:!O,userTriggered:!1}:{text:m,isChecked:!O})}})}function w(x,b){const M=Ku.get(x);if(!M||M.text!==b.text||M.isChecked!==b.isChecked){Ku.set(x,b);const C=n.getId(x);ft(t)({...b,id:C})}}const k=(d.input==="last"?["change"]:["input","change"]).map(x=>Ht(x,ft(S),e)),E=e.defaultView;if(!E)return()=>{k.forEach(x=>x())};const y=E.Object.getOwnPropertyDescriptor(E.HTMLInputElement.prototype,"value"),_=[[E.HTMLInputElement.prototype,"value"],[E.HTMLInputElement.prototype,"checked"],[E.HTMLSelectElement.prototype,"value"],[E.HTMLTextAreaElement.prototype,"value"],[E.HTMLSelectElement.prototype,"selectedIndex"],[E.HTMLOptionElement.prototype,"selected"]];return y&&y.set&&k.push(..._.map(x=>ff(x[0],x[1],{set(){ft(S)({target:this,isTrusted:!1})}},!1,E))),ft(()=>{k.forEach(x=>x())})}function oo(t){return function(e,n){if(so("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||so("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||so("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||so("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const r=Array.from(e.parentRule.cssRules).indexOf(e);n.unshift(r)}else if(e.parentStyleSheet){const r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);n.unshift(r)}return n}(t,[])}function Le(t,e,n){let r,o;return t?(t.ownerNode?r=e.getId(t.ownerNode):o=n.getId(t),{styleId:o,id:r}):{}}function Cf({mirror:t,stylesheetManager:e},n){let r=null;r=n.nodeName==="#document"?t.getId(n):t.getId(n.host);const o=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,s=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return r!==null&&r!==-1&&o&&s?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return s.get?.call(this)},set(i){const c=s.set?.call(this,i);if(r!==null&&r!==-1)try{e.adoptStyleSheets(i,r)}catch{}return c}}),ft(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})})):()=>{}}function Ny(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};let r;t.recordDOM&&(r=Ef(t,t.doc));const o=function({mousemoveCb:w,sampling:k,doc:E,mirror:y}){if(k.mousemove===!1)return()=>{};const _=typeof k.mousemove=="number"?k.mousemove:50,x=typeof k.mousemoveCallback=="number"?k.mousemoveCallback:500;let b,M=[];const C=cr(ft(I=>{const O=Date.now()-b;w(M.map(P=>(P.timeOffset-=O,P)),I),M=[],b=null}),x),R=ft(cr(ft(I=>{const O=Ir(I),{clientX:P,clientY:L}=Wi(I)?I.changedTouches[0]:I;b||(b=ts()),M.push({x:P,y:L,id:y.getId(O),timeOffset:ts()-b}),C(typeof DragEvent<"u"&&I instanceof DragEvent?tt.Drag:I instanceof MouseEvent?tt.MouseMove:tt.TouchMove)}),_,{trailing:!1})),T=[Ht("mousemove",R,E),Ht("touchmove",R,E),Ht("drag",R,E)];return ft(()=>{T.forEach(I=>I())})}(t),s=Ly(t),i=xf(t),c=function({viewportResizeCb:w},{win:k}){let E=-1,y=-1;return Ht("resize",ft(cr(ft(()=>{const _=mf(),x=gf();E===_&&y===x||(w({width:Number(x),height:Number(_)}),E=_,y=x)}),200)),k)}(t,{win:n}),a=Dy(t),u=function({mediaInteractionCb:w,blockClass:k,blockSelector:E,unblockSelector:y,mirror:_,sampling:x,doc:b}){const M=ft(R=>cr(ft(T=>{const I=Ir(T);if(!I||Jt(I,k,E,y,!0))return;const{currentTime:O,volume:P,muted:L,playbackRate:$}=I;w({type:R,id:_.getId(I),currentTime:O,volume:P,muted:L,playbackRate:$})}),x.media||500)),C=[Ht("play",M(bn.Play),b),Ht("pause",M(bn.Pause),b),Ht("seeked",M(bn.Seeked),b),Ht("volumechange",M(bn.VolumeChange),b),Ht("ratechange",M(bn.RateChange),b)];return ft(()=>{C.forEach(R=>R())})}(t);let d=()=>{},l=()=>{},p=()=>{},f=()=>{};t.recordDOM&&(d=function({styleSheetRuleCb:w,mirror:k,stylesheetManager:E},{win:y}){if(!y.CSSStyleSheet||!y.CSSStyleSheet.prototype)return()=>{};const _=y.CSSStyleSheet.prototype.insertRule;y.CSSStyleSheet.prototype.insertRule=new Proxy(_,{apply:ft((T,I,O)=>{const[P,L]=O,{id:$,styleId:D}=Le(I,k,E.styleMirror);return($&&$!==-1||D&&D!==-1)&&w({id:$,styleId:D,adds:[{rule:P,index:L}]}),T.apply(I,O)})});const x=y.CSSStyleSheet.prototype.deleteRule;let b,M;y.CSSStyleSheet.prototype.deleteRule=new Proxy(x,{apply:ft((T,I,O)=>{const[P]=O,{id:L,styleId:$}=Le(I,k,E.styleMirror);return(L&&L!==-1||$&&$!==-1)&&w({id:L,styleId:$,removes:[{index:P}]}),T.apply(I,O)})}),y.CSSStyleSheet.prototype.replace&&(b=y.CSSStyleSheet.prototype.replace,y.CSSStyleSheet.prototype.replace=new Proxy(b,{apply:ft((T,I,O)=>{const[P]=O,{id:L,styleId:$}=Le(I,k,E.styleMirror);return(L&&L!==-1||$&&$!==-1)&&w({id:L,styleId:$,replace:P}),T.apply(I,O)})})),y.CSSStyleSheet.prototype.replaceSync&&(M=y.CSSStyleSheet.prototype.replaceSync,y.CSSStyleSheet.prototype.replaceSync=new Proxy(M,{apply:ft((T,I,O)=>{const[P]=O,{id:L,styleId:$}=Le(I,k,E.styleMirror);return(L&&L!==-1||$&&$!==-1)&&w({id:L,styleId:$,replaceSync:P}),T.apply(I,O)})}));const C={};io("CSSGroupingRule")?C.CSSGroupingRule=y.CSSGroupingRule:(io("CSSMediaRule")&&(C.CSSMediaRule=y.CSSMediaRule),io("CSSConditionRule")&&(C.CSSConditionRule=y.CSSConditionRule),io("CSSSupportsRule")&&(C.CSSSupportsRule=y.CSSSupportsRule));const R={};return Object.entries(C).forEach(([T,I])=>{R[T]={insertRule:I.prototype.insertRule,deleteRule:I.prototype.deleteRule},I.prototype.insertRule=new Proxy(R[T].insertRule,{apply:ft((O,P,L)=>{const[$,D]=L,{id:m,styleId:v}=Le(P.parentStyleSheet,k,E.styleMirror);return(m&&m!==-1||v&&v!==-1)&&w({id:m,styleId:v,adds:[{rule:$,index:[...oo(P),D||0]}]}),O.apply(P,L)})}),I.prototype.deleteRule=new Proxy(R[T].deleteRule,{apply:ft((O,P,L)=>{const[$]=L,{id:D,styleId:m}=Le(P.parentStyleSheet,k,E.styleMirror);return(D&&D!==-1||m&&m!==-1)&&w({id:D,styleId:m,removes:[{index:[...oo(P),$]}]}),O.apply(P,L)})})}),ft(()=>{y.CSSStyleSheet.prototype.insertRule=_,y.CSSStyleSheet.prototype.deleteRule=x,b&&(y.CSSStyleSheet.prototype.replace=b),M&&(y.CSSStyleSheet.prototype.replaceSync=M),Object.entries(C).forEach(([T,I])=>{I.prototype.insertRule=R[T].insertRule,I.prototype.deleteRule=R[T].deleteRule})})}(t,{win:n}),l=Cf(t,t.doc),p=function({styleDeclarationCb:w,mirror:k,ignoreCSSAttributes:E,stylesheetManager:y},{win:_}){const x=_.CSSStyleDeclaration.prototype.setProperty;_.CSSStyleDeclaration.prototype.setProperty=new Proxy(x,{apply:ft((M,C,R)=>{const[T,I,O]=R;if(E.has(T))return x.apply(C,[T,I,O]);const{id:P,styleId:L}=Le(C.parentRule?.parentStyleSheet,k,y.styleMirror);return(P&&P!==-1||L&&L!==-1)&&w({id:P,styleId:L,set:{property:T,value:I,priority:O},index:oo(C.parentRule)}),M.apply(C,R)})});const b=_.CSSStyleDeclaration.prototype.removeProperty;return _.CSSStyleDeclaration.prototype.removeProperty=new Proxy(b,{apply:ft((M,C,R)=>{const[T]=R;if(E.has(T))return b.apply(C,[T]);const{id:I,styleId:O}=Le(C.parentRule?.parentStyleSheet,k,y.styleMirror);return(I&&I!==-1||O&&O!==-1)&&w({id:I,styleId:O,remove:{property:T},index:oo(C.parentRule)}),M.apply(C,R)})}),ft(()=>{_.CSSStyleDeclaration.prototype.setProperty=x,_.CSSStyleDeclaration.prototype.removeProperty=b})}(t,{win:n}),t.collectFonts&&(f=function({fontCb:w,doc:k}){const E=k.defaultView;if(!E)return()=>{};const y=[],_=new WeakMap,x=E.FontFace;E.FontFace=function(M,C,R){const T=new x(M,C,R);return _.set(T,{family:M,buffer:typeof C!="string",descriptors:R,fontSource:typeof C=="string"?C:JSON.stringify(Array.from(new Uint8Array(C)))}),T};const b=zi(k.fonts,"add",function(M){return function(C){return ws(ft(()=>{const R=_.get(C);R&&(w(R),_.delete(C))}),0),M.apply(this,[C])}});return y.push(()=>{E.FontFace=x}),y.push(b),ft(()=>{y.forEach(M=>M())})}(t)));const h=function(w){const{doc:k,mirror:E,blockClass:y,blockSelector:_,unblockSelector:x,selectionCb:b}=w;let M=!0;const C=ft(()=>{const R=k.getSelection();if(!R||M&&R?.isCollapsed)return;M=R.isCollapsed||!1;const T=[],I=R.rangeCount||0;for(let O=0;O<I;O++){const P=R.getRangeAt(O),{startContainer:L,startOffset:$,endContainer:D,endOffset:m}=P;Jt(L,y,_,x,!0)||Jt(D,y,_,x,!0)||T.push({start:E.getId(L),startOffset:$,end:E.getId(D),endOffset:m})}b({ranges:T})});return C(),Ht("selectionchange",C)}(t),g=function({doc:w,customElementCb:k}){const E=w.defaultView;return E&&E.customElements?zi(E.customElements,"define",function(y){return function(_,x,b){try{k({define:{name:_}})}catch{}return y.apply(this,[_,x,b])}}):()=>{}}(t),S=[];for(const w of t.plugins)S.push(w.observer(w.callback,n,w.options));return ft(()=>{In.forEach(w=>w.reset()),r?.disconnect(),o(),s(),i(),c(),a(),u(),d(),l(),p(),f(),h(),g(),S.forEach(w=>w())})}function so(t){return window[t]!==void 0}function io(t){return!!(window[t]!==void 0&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Gi{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,n,r,o){const s=r||this.getIdToRemoteIdMap(e),i=o||this.getRemoteIdToIdMap(e);let c=s.get(n);return c||(c=this.generateIdFn(),s.set(n,c),i.set(c,n)),c}getIds(e,n){const r=this.getIdToRemoteIdMap(e),o=this.getRemoteIdToIdMap(e);return n.map(s=>this.getId(e,s,r,o))}getRemoteId(e,n,r){const o=r||this.getRemoteIdToIdMap(e);return typeof n!="number"?n:o.get(n)||-1}getRemoteIds(e,n){const r=this.getRemoteIdToIdMap(e);return n.map(o=>this.getRemoteId(e,o,r))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let n=this.iframeIdToRemoteIdMap.get(e);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(e,n)),n}getRemoteIdToIdMap(e){let n=this.iframeRemoteIdToIdMap.get(e);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(e,n)),n}}class $y{constructor(){this.crossOriginIframeMirror=new Gi(Aa),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Fy{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Gi(Aa),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Gi(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,n){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&e.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(e);const r=Pa(e);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(e){const n=e;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!e.source)return;const r=this.crossOriginIframeMap.get(e.source);if(!r)return;const o=this.transformCrossOriginEvent(r,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(e,n){switch(n.type){case it.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(n.data.node,e);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:it.IncrementalSnapshot,data:{source:tt.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case it.Meta:case it.Load:case it.DomContentLoaded:return!1;case it.Plugin:return n;case it.Custom:return this.replaceIds(n.data.payload,e,["id","parentId","previousId","nextId"]),n;case it.IncrementalSnapshot:switch(n.data.source){case tt.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,e);const o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(r.node,o)}),n.data.removes.forEach(r=>{this.replaceIds(r,e,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,e,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,e,["id"])}),n;case tt.Drag:case tt.TouchMove:case tt.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,e,["id"])}),n;case tt.ViewportResize:return!1;case tt.MediaInteraction:case tt.MouseInteraction:case tt.Scroll:case tt.CanvasMutation:case tt.Input:return this.replaceIds(n.data,e,["id"]),n;case tt.StyleSheetRule:case tt.StyleDeclaration:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleId"]),n;case tt.Font:return n;case tt.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,e,["start","end"])}),n;case tt.AdoptedStyleSheet:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,e,["styleId"])}),n}}return!1}replace(e,n,r,o){for(const s of o)(Array.isArray(n[s])||typeof n[s]=="number")&&(Array.isArray(n[s])?n[s]=e.getIds(r,n[s]):n[s]=e.getId(r,n[s]));return n}replaceIds(e,n,r){return this.replace(this.crossOriginIframeMirror,e,n,r)}replaceStyleIds(e,n,r){return this.replace(this.crossOriginIframeStyleMirror,e,n,r)}replaceIdOnNode(e,n){this.replaceIds(e,n,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(e,n){e.type===Nt.Document||e.rootId||(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class Uy{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class By{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,n){if(!hr(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const r=Ef({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(xf({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),ws(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Cf({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){const n=Pa(e),r=function(o){try{return o.contentWindow}catch{}}(e);n&&r&&this.patchAttachShadow(r.Element,n)}patchAttachShadow(e,n){const r=this;this.restoreHandlers.push(zi(e.prototype,"attachShadow",function(o){return function(s){const i=o.call(this,s);return this.shadowRoot&&wf(this)&&r.addShadowRoot(this.shadowRoot,n),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}for(var jy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Hy=typeof Uint8Array>"u"?[]:new Uint8Array(256),ao=0;ao<64;ao++)Hy[jy.charCodeAt(ao)]=ao;class Ju{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class zy{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new My,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,n){if(e.length===0)return;const r={id:n,styleIds:[]},o=[];for(const s of e){let i;this.styleMirror.has(s)?i=this.styleMirror.getId(s):(i=this.styleMirror.add(s),o.push({styleId:i,rules:Array.from(s.rules||CSSRule,(c,a)=>({rule:sf(c),index:a}))})),r.styleIds.push(i)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Wy{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,n){const r=this.nodeMap.get(e);return r&&Array.from(r).some(o=>o!==n)}add(e,n){this.active||(this.active=!0,function(...r){La("requestAnimationFrame")(...r)}(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(n))}destroy(){}}let Tt,es;try{if(Array.from([1],t=>2*t)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=t.contentWindow?.Array.from||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const te=new af;function ke(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:s=null,unblockSelector:i=null,ignoreClass:c="rr-ignore",ignoreSelector:a=null,maskAllText:u=!1,maskTextClass:d="rr-mask",unmaskTextClass:l=null,maskTextSelector:p=null,unmaskTextSelector:f=null,inlineStylesheet:h=!0,maskAllInputs:g,maskInputOptions:S,slimDOMOptions:w,maskAttributeFn:k,maskInputFn:E,maskTextFn:y,maxCanvasSize:_=null,packFn:x,sampling:b={},dataURLOptions:M={},mousemoveWait:C,recordDOM:R=!0,recordCanvas:T=!1,recordCrossOriginIframes:I=!1,recordAfter:O=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:P=!1,collectFonts:L=!1,inlineImages:$=!1,plugins:D,keepIframeSrcFn:m=()=>!1,ignoreCSSAttributes:v=new Set([]),errorHandler:N,onMutation:U,getCanvasManager:B}=t;mr=N;const F=!I||window.parent===window;let j=!1;if(!F)try{window.parent.document&&(j=!1)}catch{j=!0}if(F&&!e)throw new Error("emit function is required");if(!F&&!j)return()=>{};C!==void 0&&b.mousemove===void 0&&(b.mousemove=C),te.reset();const G=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}:S!==void 0?S:{},K=w===!0||w==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:w==="all",headMetaDescKeywords:w==="all"}:w||{};let J;(function(st=window){"NodeList"in st&&!st.NodeList.prototype.forEach&&(st.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in st&&!st.DOMTokenList.prototype.forEach&&(st.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...Ut)=>{let rt=Ut[0];if(!(0 in Ut))throw new TypeError("1 argument is required");do if(this===rt)return!0;while(rt=rt&&rt.parentNode);return!1})})();let nt=0;const dt=st=>{for(const Ut of D||[])Ut.eventProcessor&&(st=Ut.eventProcessor(st));return x&&!j&&(st=x(st)),st};Tt=(st,Ut)=>{const rt=st;if(rt.timestamp=ts(),!In[0]?.isFrozen()||rt.type===it.FullSnapshot||rt.type===it.IncrementalSnapshot&&rt.data.source===tt.Mutation||In.forEach($t=>$t.unfreeze()),F)e?.(dt(rt),Ut);else if(j){const $t={type:"rrweb",event:dt(rt),origin:window.location.origin,isCheckout:Ut};window.parent.postMessage($t,"*")}if(rt.type===it.FullSnapshot)J=rt,nt=0;else if(rt.type===it.IncrementalSnapshot){if(rt.data.source===tt.Mutation&&rt.data.isAttachIframe)return;nt++;const $t=r&&nt>=r,mt=n&&J&&rt.timestamp-J.timestamp>n;($t||mt)&&nr(!0)}};const ht=st=>{Tt({type:it.IncrementalSnapshot,data:{source:tt.Mutation,...st}})},Mt=st=>Tt({type:it.IncrementalSnapshot,data:{source:tt.Scroll,...st}}),z=st=>Tt({type:it.IncrementalSnapshot,data:{source:tt.CanvasMutation,...st}}),V=new zy({mutationCb:ht,adoptedStyleSheetCb:st=>Tt({type:it.IncrementalSnapshot,data:{source:tt.AdoptedStyleSheet,...st}})}),pt=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new $y:new Fy({mirror:te,mutationCb:ht,stylesheetManager:V,recordCrossOriginIframes:I,wrappedEmit:Tt});for(const st of D||[])st.getMirror&&st.getMirror({nodeMirror:te,crossOriginIframeMirror:pt.crossOriginIframeMirror,crossOriginIframeStyleMirror:pt.crossOriginIframeStyleMirror});const bt=new Wy,Lt=function(st,Ut){try{return st?st(Ut):new Ju}catch{return console.warn("Unable to initialize CanvasManager"),new Ju}}(B,{mirror:te,win:window,mutationCb:st=>Tt({type:it.IncrementalSnapshot,data:{source:tt.CanvasMutation,...st}}),recordCanvas:T,blockClass:o,blockSelector:s,unblockSelector:i,maxCanvasSize:_,sampling:b.canvas,dataURLOptions:M,errorHandler:N}),Oe=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Uy:new By({mutationCb:ht,scrollCb:Mt,bypassOptions:{onMutation:U,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:G,dataURLOptions:M,maskAttributeFn:k,maskTextFn:y,maskInputFn:E,recordCanvas:T,inlineImages:$,sampling:b,slimDOMOptions:K,iframeManager:pt,stylesheetManager:V,canvasManager:Lt,keepIframeSrcFn:m,processedNodeManager:bt},mirror:te}),nr=(st=!1)=>{if(!R)return;Tt({type:it.Meta,data:{href:window.location.href,width:gf(),height:mf()}},st),V.reset(),Oe.init(),In.forEach(rt=>rt.lock());const Ut=function(rt,$t){const{mirror:mt=new af,blockClass:rr="rr-block",blockSelector:fh=null,unblockSelector:hh=null,maskAllText:mh=!1,maskTextClass:gh="rr-mask",unmaskTextClass:yh=null,maskTextSelector:_h=null,unmaskTextSelector:vh=null,inlineStylesheet:bh=!0,inlineImages:Sh=!1,recordCanvas:wh=!1,maskAllInputs:Ts=!1,maskAttributeFn:kh,maskTextFn:Eh,maskInputFn:xh,slimDOM:or=!1,dataURLOptions:Ch,preserveWhiteSpace:Th,onSerialize:Ih,onIframeLoad:Mh,iframeLoadTimeout:Rh,onStylesheetLoad:Oh,stylesheetLoadTimeout:Ah,keepIframeSrcFn:Lh=()=>!1}=$t||{};return Tn(rt,{doc:rt,mirror:mt,blockClass:rr,blockSelector:fh,unblockSelector:hh,maskAllText:mh,maskTextClass:gh,unmaskTextClass:yh,maskTextSelector:_h,unmaskTextSelector:vh,skipChild:!1,inlineStylesheet:bh,maskInputOptions:Ts===!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}:Ts===!1?{}:Ts,maskAttributeFn:kh,maskTextFn:Eh,maskInputFn:xh,slimDOMOptions:or===!0||or==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:or==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:or===!1?{}:or,dataURLOptions:Ch,inlineImages:Sh,recordCanvas:wh,preserveWhiteSpace:Th,onSerialize:Ih,onIframeLoad:Mh,iframeLoadTimeout:Rh,onStylesheetLoad:Oh,stylesheetLoadTimeout:Ah,keepIframeSrcFn:Lh,newlyAddedElement:!1})}(document,{mirror:te,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskAllInputs:G,maskAttributeFn:k,maskInputFn:E,maskTextFn:y,slimDOM:K,dataURLOptions:M,recordCanvas:T,inlineImages:$,onSerialize:rt=>{vf(rt,te)&&pt.addIframe(rt),bf(rt,te)&&V.trackLinkElement(rt),qi(rt)&&Oe.addShadowRoot(rt.shadowRoot,document)},onIframeLoad:(rt,$t)=>{pt.attachIframe(rt,$t),rt.contentWindow&&Lt.addWindow(rt.contentWindow),Oe.observeAttachShadow(rt)},onStylesheetLoad:(rt,$t)=>{V.attachLinkElement(rt,$t)},keepIframeSrcFn:m});if(!Ut)return console.warn("Failed to snapshot the document");Tt({type:it.FullSnapshot,data:{node:Ut,initialOffset:hf(window)}}),In.forEach(rt=>rt.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&V.adoptStyleSheets(document.adoptedStyleSheets,te.getId(document))};es=nr;try{const st=[],Ut=$t=>ft(Ny)({onMutation:U,mutationCb:ht,mousemoveCb:(mt,rr)=>Tt({type:it.IncrementalSnapshot,data:{source:rr,positions:mt}}),mouseInteractionCb:mt=>Tt({type:it.IncrementalSnapshot,data:{source:tt.MouseInteraction,...mt}}),scrollCb:Mt,viewportResizeCb:mt=>Tt({type:it.IncrementalSnapshot,data:{source:tt.ViewportResize,...mt}}),inputCb:mt=>Tt({type:it.IncrementalSnapshot,data:{source:tt.Input,...mt}}),mediaInteractionCb:mt=>Tt({type:it.IncrementalSnapshot,data:{source:tt.MediaInteraction,...mt}}),styleSheetRuleCb:mt=>Tt({type:it.IncrementalSnapshot,data:{source:tt.StyleSheetRule,...mt}}),styleDeclarationCb:mt=>Tt({type:it.IncrementalSnapshot,data:{source:tt.StyleDeclaration,...mt}}),canvasMutationCb:z,fontCb:mt=>Tt({type:it.IncrementalSnapshot,data:{source:tt.Font,...mt}}),selectionCb:mt=>{Tt({type:it.IncrementalSnapshot,data:{source:tt.Selection,...mt}})},customElementCb:mt=>{Tt({type:it.IncrementalSnapshot,data:{source:tt.CustomElement,...mt}})},blockClass:o,ignoreClass:c,ignoreSelector:a,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:f,maskInputOptions:G,inlineStylesheet:h,sampling:b,recordDOM:R,recordCanvas:T,inlineImages:$,userTriggeredOnInput:P,collectFonts:L,doc:$t,maskAttributeFn:k,maskInputFn:E,maskTextFn:y,keepIframeSrcFn:m,blockSelector:s,unblockSelector:i,slimDOMOptions:K,dataURLOptions:M,mirror:te,iframeManager:pt,stylesheetManager:V,shadowDomManager:Oe,processedNodeManager:bt,canvasManager:Lt,ignoreCSSAttributes:v,plugins:D?.filter(mt=>mt.observer)?.map(mt=>({observer:mt.observer,options:mt.options,callback:rr=>Tt({type:it.Plugin,data:{plugin:mt.name,payload:rr}})}))||[]},{});pt.addLoadListener($t=>{try{st.push(Ut($t.contentDocument))}catch(mt){console.warn(mt)}});const rt=()=>{nr(),st.push(Ut(document))};return document.readyState==="interactive"||document.readyState==="complete"?rt():(st.push(Ht("DOMContentLoaded",()=>{Tt({type:it.DomContentLoaded,data:{}}),O==="DOMContentLoaded"&&rt()})),st.push(Ht("load",()=>{Tt({type:it.Load,data:{}}),O==="load"&&rt()},window))),()=>{st.forEach($t=>$t()),bt.destroy(),es=void 0,mr=void 0}}catch(st){console.warn(st)}}var Yu,_n;ke.mirror=te,ke.takeFullSnapshot=function(t){if(!es)throw new Error("please take full snapshot after start recording");es(t)},(_n=Yu||(Yu={}))[_n.NotStarted=0]="NotStarted",_n[_n.Running=1]="Running",_n[_n.Stopped=2]="Stopped";function Da(t){return t>9999999999?t:1e3*t}function Qs(t){return t>9999999999?t/1e3:t}function zr(t,e){e.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate(()=>(t.throttledAddEvent({type:it.Custom,timestamp:1e3*(e.timestamp||0),data:{tag:"breadcrumb",payload:Kt(e,10,1e3)}}),e.category==="console")))}function Tf(t){return t.closest("button,a")||t}function Xu(t){const e=If(t);return e&&e instanceof Element?Tf(e):e}function If(t){return function(e){return typeof e=="object"&&!!e&&"target"in e}(t)?t.target:t}let Pe;function qy(t){return Pe||(Pe=[],zt(wt,"open",function(e){return function(...n){if(Pe)try{Pe.forEach(r=>r())}catch{}return e.apply(wt,n)}})),Pe.push(t),()=>{const e=Pe?Pe.indexOf(t):-1;e>-1&&Pe.splice(e,1)}}const Vy=new Set([tt.Mutation,tt.StyleSheetRule,tt.StyleDeclaration,tt.AdoptedStyleSheet,tt.CanvasMutation,tt.Selection,tt.MediaInteraction]);class Gy{constructor(e,n,r=zr){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=e,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const e=qy(()=>{this._lastMutation=Zu()});this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,n){if(function(o,s){return!!(!Ky.includes(o.tagName)||o.tagName==="INPUT"&&!["submit","button"].includes(o.getAttribute("type")||"")||o.tagName==="A"&&(o.hasAttribute("download")||o.hasAttribute("target")&&o.getAttribute("target")!=="_self")||s&&o.matches(s))}(n,this._ignoreSelector)||!function(o){return!(!o.data||typeof o.data.nodeId!="number"||!o.timestamp)}(e))return;const r={timestamp:Qs(e.timestamp),clickBreadcrumb:e,clickCount:0,node:n};this._clicks.some(o=>o.node===r.node&&Math.abs(o.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=Qs(e)}registerScroll(e=Date.now()){this._lastScroll=Qs(e)}registerClick(e){const n=Tf(e);this._handleMultiClick(n)}_handleMultiClick(e){this._getClicks(e).forEach(n=>{n.clickCount++})}_getClicks(e){return this._clicks.filter(n=>n.node===e)}_checkClicks(){const e=[],n=Zu();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&&e.push(r)});for(const r of e){const o=this._clicks.indexOf(r);o>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(o,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const n=this._replay,r=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,o=e.mutationAfter&&e.mutationAfter<=this._threshold,s=!r&&!o,{clickCount:i,clickBreadcrumb:c}=e;if(s){const a=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),u=a<1e3*this._timeout?"mutation":"timeout",d={type:"default",message:c.message,timestamp:c.timestamp,category:"ui.slowClickDetected",data:{...c.data,url:wt.location.href,route:n.getCurrentRoute(),timeAfterClickMs:a,endReason:u,clickCount:i||1}};this._addBreadcrumbEvent(n,d)}else if(i>1){const a={type:"default",message:c.message,timestamp:c.timestamp,category:"ui.multiClick",data:{...c.data,url:wt.location.href,route:n.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(n,a)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Hr(()=>this._checkClicks(),1e3)}}const Ky=["A","BUTTON","INPUT"];function Zu(){return Date.now()/1e3}function Jy(t,e){try{if(!function(r){return r.type===3}(e))return;const{source:n}=e.data;if(Vy.has(n)&&t.registerMutation(e.timestamp),n===tt.Scroll&&t.registerScroll(e.timestamp),function(r){return r.data.source===tt.MouseInteraction}(e)){const{type:r,id:o}=e.data,s=ke.mirror.getNode(o);s instanceof HTMLElement&&r===jt.Click&&t.registerClick(s)}}catch{}}function ce(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var Ki=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Ki||{});const Yy=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Xy(t){const e={};!t["data-sentry-component"]&&t["data-sentry-element"]&&(t["data-sentry-component"]=t["data-sentry-element"]);for(const n in t)if(Yy.has(n)){let r=n;n!=="data-testid"&&n!=="data-test-id"||(r="testId"),e[r]=t[n]}return e}const Zy=t=>e=>{if(!t.isEnabled())return;const n=function(a){const{target:u,message:d}=function(l){const p=l.name==="click";let f,h=null;try{h=p?Xu(l.event):If(l.event),f=Qt(h,{maxStringLength:200})||"<unknown>"}catch{f="<unknown>"}return{target:h,message:f}}(a);return ce({category:`ui.${a.name}`,...Mf(u,d)})}(e);if(!n)return;const r=e.name==="click",o=r?e.event:void 0;var s,i,c;!(r&&t.clickDetector&&o?.target)||o.altKey||o.metaKey||o.ctrlKey||o.shiftKey||(s=t.clickDetector,i=n,c=Xu(e.event),s.handleClick(i,c)),zr(t,n)};function Mf(t,e){const n=ke.mirror.getId(t),r=n&&ke.mirror.getNode(n),o=r&&ke.mirror.getMeta(r),s=o&&function(i){return i.type===Ki.Element}(o)?o:null;return{message:e,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(i=>i.type===Ki.Text&&i.textContent).filter(Boolean).map(i=>i.trim()).join(""),attributes:Xy(s.attributes)}}:{}}}function Qy(t,e){if(!t.isEnabled())return;t.updateUserActivity();const n=function(r){const{metaKey:o,shiftKey:s,ctrlKey:i,altKey:c,key:a,target:u}=r;if(!u||function(h){return h.tagName==="INPUT"||h.tagName==="TEXTAREA"||h.isContentEditable}(u)||!a)return null;const d=o||i||c,l=a.length===1;if(!d&&l)return null;const p=Qt(u,{maxStringLength:200})||"<unknown>",f=Mf(u,p);return ce({category:"ui.keyDown",message:p,data:{...f.data,metaKey:o,shiftKey:s,ctrlKey:i,altKey:c,key:a}})}(e);n&&zr(t,n)}const t_={resource:function(t){const{entryType:e,initiatorType:n,name:r,responseEnd:o,startTime:s,decodedBodySize:i,encodedBodySize:c,responseStatus:a,transferSize:u}=t;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${e}.${n}`,start:Sn(s),end:Sn(o),name:r,data:{size:u,statusCode:a,decodedBodySize:i,encodedBodySize:c}}},paint:function(t){const{duration:e,entryType:n,name:r,startTime:o}=t,s=Sn(o);return{type:n,name:r,start:s,end:s+e,data:void 0}},navigation:function(t){const{entryType:e,name:n,decodedBodySize:r,duration:o,domComplete:s,encodedBodySize:i,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,domInteractive:u,loadEventStart:d,loadEventEnd:l,redirectCount:p,startTime:f,transferSize:h,type:g}=t;return o===0?null:{type:`${e}.${g}`,start:Sn(f),end:Sn(s),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:i,duration:o,domInteractive:u,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,loadEventStart:d,loadEventEnd:l,domComplete:s,redirectCount:p}}}};function co(t,e){return({metric:n})=>{e.replayPerformanceEntries.push(t(n))}}function e_(t){const e=t_[t.entryType];return e?e(t):null}function Sn(t){return((Bt()||wt.performance.timeOrigin)+t)/1e3}function n_(t){const e=t.entries[t.entries.length-1];return ks(t,"largest-contentful-paint",e?.element?[e.element]:void 0)}function r_(t){return t.sources!==void 0}function o_(t){const e=[],n=[];for(const r of t.entries)if(r_(r)){const o=[];for(const s of r.sources)if(s.node){n.push(s.node);const i=ke.mirror.getId(s.node);i&&o.push(i)}e.push({value:r.value,nodeIds:o.length?o:void 0})}return ks(t,"cumulative-layout-shift",n,e)}function s_(t){const e=t.entries[t.entries.length-1];return ks(t,"first-input-delay",e?.target?[e.target]:void 0)}function i_(t){const e=t.entries[t.entries.length-1];return ks(t,"interaction-to-next-paint",e?.target?[e.target]:void 0)}function ks(t,e,n,r){const o=t.value,s=t.rating,i=Sn(o);return{type:"web-vital",name:e,start:i,end:i,data:{value:o,size:o,rating:s,nodeIds:n?n.map(c=>ke.mirror.getId(c)):void 0,attributions:r}}}const Y=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Qu=["log","warn","error"],Io="[Replay] ";function ti(t,e="info"){ee({category:"console",data:{logger:"replay"},level:e,message:`${Io}${t}`},{level:e})}const X=function(){let t=!1,e=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{t=!!r.captureExceptions,e=!!r.traceInternals}};return Y?(Qu.forEach(r=>{n[r]=(...o)=>{A[r](Io,...o),e&&ti(o.join(""),ha(r))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),A.error(Io,r),t?We(r):e&&ti(r,"error")},n.infoTick=(...r)=>{A.log(Io,...r),e&&setTimeout(()=>ti(r[0]),0)}):Qu.forEach(r=>{n[r]=()=>{}}),n}();class Na extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class Rf{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const n=JSON.stringify(e).length;if(this._totalSize+=n,this._totalSize>of)throw new Na;this.events.push(e)}finish(){return new Promise(e=>{const n=this.events;this.clear(),e(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map(n=>n.timestamp).sort()[0];return e?Da(e):null}}class a_{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise((e,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?e():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})})),this._ensureReadyPromise}destroy(){Y&&X.log("Destroying compression worker"),this._worker.terminate()}postMessage(e,n){const r=this._getAndIncrementId();return new Promise((o,s)=>{const i=({data:c})=>{const a=c;if(a.method===e&&a.id===r){if(this._worker.removeEventListener("message",i),!a.success)return Y&&X.error("Error in compression worker: ",a.response),void s(new Error("Error in compression worker"));o(a.response)}};this._worker.addEventListener("message",i),this._worker.postMessage({id:r,method:e,arg:n})})}_getAndIncrementId(){return this._id++}}class c_{constructor(e){this._worker=new a_(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const n=Da(e.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(e);return this._totalSize+=r.length,this._totalSize>of?Promise.reject(new Na):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{Y&&X.exception(e,'Sending "clear" message to worker failed',e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class u_{constructor(e){this._fallback=new Rf,this._compression=new c_(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return void(Y&&X.exception(e,"Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:n,waitForCheckout:r}=this._fallback,o=[];for(const s of e)o.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(o),this._fallback.clear()}catch(s){Y&&X.exception(s,"Failed to add events when switching buffers.")}}}function l_({useCompression:t,workerUrl:e}){if(t&&window.Worker){const n=function(r){try{const o=r||function(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?function(){const i=new Blob(['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});']);return URL.createObjectURL(i)}():""}();if(!o)return;Y&&X.log("Using compression worker"+(r?` from ${r}`:""));const s=new Worker(o);return new u_(s)}catch(o){Y&&X.exception(o,"Failed to create compression worker")}}(e);if(n)return n}return Y&&X.log("Using simple buffer"),new Rf}function $a(){try{return"sessionStorage"in wt&&!!wt.sessionStorage}catch{return!1}}function d_(t){(function(){if($a())try{wt.sessionStorage.removeItem(Ma)}catch{}})(),t.session=void 0}function Of(t){return t!==void 0&&Math.random()<t}function Fa(t){if($a())try{wt.sessionStorage.setItem(Ma,JSON.stringify(t))}catch{}}function Af(t){const e=Date.now();return{id:t.id||Wt(),started:t.started||e,lastActivity:t.lastActivity||e,segmentId:t.segmentId||0,sampled:t.sampled,previousSessionId:t.previousSessionId}}function tl({sessionSampleRate:t,allowBuffering:e,stickySession:n=!1},{previousSessionId:r}={}){const o=function(i,c){return Of(i)?"session":!!c&&"buffer"}(t,e),s=Af({sampled:o,previousSessionId:r});return n&&Fa(s),s}function Ji(t,e,n=+new Date){return t===null||e===void 0||e<0||e!==0&&t+e<=n}function Lf(t,{maxReplayDuration:e,sessionIdleExpire:n,targetTime:r=Date.now()}){return Ji(t.started,e,r)||Ji(t.lastActivity,n,r)}function Pf(t,{sessionIdleExpire:e,maxReplayDuration:n}){return!!Lf(t,{sessionIdleExpire:e,maxReplayDuration:n})&&(t.sampled!=="buffer"||t.segmentId!==0)}function ei({sessionIdleExpire:t,maxReplayDuration:e,previousSessionId:n},r){const o=r.stickySession&&function(){if(!$a())return null;try{const s=wt.sessionStorage.getItem(Ma);if(!s)return null;const i=JSON.parse(s);return Y&&X.infoTick("Loading existing session"),Af(i)}catch{return null}}();return o?Pf(o,{sessionIdleExpire:t,maxReplayDuration:e})?(Y&&X.infoTick("Session in sessionStorage is expired, creating new one..."),tl(r,{previousSessionId:o.id})):o:(Y&&X.infoTick("Creating new session"),tl(r,{previousSessionId:n}))}function Yi(t,e,n){return!!Nf(t,e)&&(Df(t,e,n),!0)}async function Df(t,e,n){const{eventBuffer:r}=t;if(!r||r.waitForCheckout&&!n)return null;const o=t.recordingMode==="buffer";try{n&&o&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const s=function(i,c){try{if(typeof c=="function"&&function(a){return a.type===it.Custom}(i))return c(i)}catch(a){return Y&&X.exception(a,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return i}(e,t.getOptions().beforeAddRecordingEvent);return s?await r.addEvent(s):void 0}catch(s){const i=s&&s instanceof Na,c=i?"addEventSizeExceeded":"addEvent";if(i&&o)return r.clear(),r.waitForCheckout=!0,null;t.handleException(s),await t.stop({reason:c});const a=W();a&&a.recordDroppedEvent("internal_sdk_error","replay")}}function Nf(t,e){if(!t.eventBuffer||t.isPaused()||!t.isEnabled())return!1;const n=Da(e.timestamp);return!(n+t.timeouts.sessionIdlePause<Date.now())&&(!(n>t.getContext().initialTimestamp+t.getOptions().maxReplayDuration)||(Y&&X.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1))}function Ua(t){return!t.type}function Xi(t){return t.type==="transaction"}function el(t){return t.type==="feedback"}function p_(t){return(e,n)=>{if(!t.isEnabled()||!Ua(e)&&!Xi(e))return;const r=n?.statusCode;!r||r<200||r>=300||(Xi(e)?function(o,s){const i=o.getContext();s.contexts?.trace?.trace_id&&i.traceIds.size<100&&i.traceIds.add(s.contexts.trace.trace_id)}(t,e):function(o,s){const i=o.getContext();if(s.event_id&&i.errorIds.size<100&&i.errorIds.add(s.event_id),o.recordingMode!=="buffer"||!s.tags||!s.tags.replayId)return;const{beforeErrorSampling:c}=o.getOptions();typeof c=="function"&&!c(s)||Hr(async()=>{try{await o.sendBufferedReplayOrFlush()}catch(a){o.handleException(a)}})}(t,e))}}function f_(t){return e=>{t.isEnabled()&&Ua(e)&&function(n,r){const o=r.exception?.values?.[0]?.value;typeof o=="string"&&(o.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||o.match(/(does not match server-rendered HTML|Hydration failed because)/i))&&zr(n,ce({category:"replay.hydrate-error",data:{url:mn()}}))}(t,e)}}function h_(t){const e=W();e&&e.on("beforeAddBreadcrumb",n=>function(r,o){if(!r.isEnabled()||!nl(o))return;const s=function(i){return!nl(i)||["fetch","xhr","sentry.event","sentry.transaction"].includes(i.category)||i.category.startsWith("ui.")?null:i.category==="console"?function(c){const a=c.data?.arguments;if(!Array.isArray(a)||a.length===0)return ce(c);let u=!1;const d=a.map(l=>{if(!l)return l;if(typeof l=="string")return l.length>ro?(u=!0,`${l.slice(0,ro)}…`):l;if(typeof l=="object")try{const p=Kt(l,7);return JSON.stringify(p).length>ro?(u=!0,`${JSON.stringify(p,null,2).slice(0,ro)}…`):p}catch{}return l});return ce({...c,data:{...c.data,arguments:d,...u?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(i):ce(i)}(o);s&&zr(r,s)}(t,n))}function nl(t){return!!t.category}function $f(){const t=et().getPropagationContext().dsc;t&&delete t.replay_id;const e=It();e&&delete ie(e).replay_id}function m_(t){return Object.assign((e,n)=>!t.isEnabled()||t.isPaused()?e:function(o){return o.type==="replay_event"}(e)?(delete e.breadcrumbs,e):!Ua(e)&&!Xi(e)&&!el(e)?e:t.checkAndHandleExpiredSession()?el(e)?(t.flush(),e.contexts.feedback.replay_id=t.getSessionId(),function(o,s){o.triggerUserActivity(),o.addUpdate(()=>!s.timestamp||(o.throttledAddEvent({type:it.Custom,timestamp:1e3*s.timestamp,data:{tag:"breadcrumb",payload:{timestamp:s.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:s.event_id}}}}),!1))}(t,e),e):function(o,s){return!(o.type||!o.exception?.values?.length||!s.originalException?.__rrweb__)}(e,n)&&!t.getOptions()._experiments.captureExceptions?(Y&&X.log("Ignoring error from rrweb internals",e),null):((function(o,s){return o.recordingMode==="buffer"&&s.message!==Ra&&!(!s.exception||s.type)&&Of(o.getOptions().errorSampleRate)}(t,e)||t.recordingMode==="session")&&(e.tags={...e.tags,replayId:t.getSessionId()}),e):($f(),e),{id:"Replay"})}function ns(t,e){return e.map(({type:n,start:r,end:o,name:s,data:i})=>{const c=t.throttledAddEvent({type:it.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:s,startTimestamp:r,endTimestamp:o,data:i}}});return typeof c=="string"?Promise.resolve(null):c})}function g_(t){return e=>{if(!t.isEnabled())return;const n=function(r){const{from:o,to:s}=r,i=Date.now()/1e3;return{type:"navigation.push",start:i,end:i,name:s,data:{previous:o}}}(e);n!==null&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate(()=>(ns(t,[n]),!1)))}}function Ff(t,e){t.isEnabled()&&e!==null&&(function(n,r){return(!Y||!n.getOptions()._experiments.traceInternals)&&Vd(r,W())}(t,e.name)||t.addUpdate(()=>(ns(t,[e]),!0)))}function rs(t){if(!t)return;const e=new TextEncoder;try{if(typeof t=="string")return e.encode(t).length;if(t instanceof URLSearchParams)return e.encode(t.toString()).length;if(t instanceof FormData){const n=Wp(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch{}}function Uf(t){if(!t)return;const e=parseInt(t,10);return isNaN(e)?void 0:e}function os(t,e){if(!t)return{headers:{},size:void 0,_meta:{warnings:[e]}};const n={...t._meta},r=n.warnings||[];return n.warnings=[...r,e],t._meta=n,t}function Bf(t,e){if(!e)return null;const{startTimestamp:n,endTimestamp:r,url:o,method:s,statusCode:i,request:c,response:a}=e;return{type:t,start:n/1e3,end:r/1e3,name:o,data:{method:s,statusCode:i,request:c,response:a}}}function gr(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function Ze(t,e,n){if(!e&&Object.keys(t).length===0)return;if(!e)return{headers:t};if(!n)return{headers:t,size:e};const r={headers:t,size:e},{body:o,warnings:s}=function(i){if(!i||typeof i!="string")return{body:i};const c=i.length>Pu,a=function(u){const d=u[0],l=u[u.length-1];return d==="["&&l==="]"||d==="{"&&l==="}"}(i);if(c){const u=i.slice(0,Pu);return a?{body:u,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${u}…`,warnings:["TEXT_TRUNCATED"]}}if(a)try{return{body:JSON.parse(i)}}catch{}return{body:i}}(n);return r.body=o,s?.length&&(r._meta={warnings:s}),r}function Zi(t,e){return Object.entries(t).reduce((n,[r,o])=>{const s=r.toLowerCase();return e.includes(s)&&t[r]&&(n[s]=o),n},{})}function ss(t,e){const n=function(r,o=wt.document.baseURI){if(r.startsWith("http://")||r.startsWith("https://")||r.startsWith(wt.location.origin))return r;const s=new URL(r,o);if(s.origin!==new URL(o).origin)return r;const i=s.href;return!r.endsWith("/")&&i.endsWith("/")?i.slice(0,-1):i}(t);return oe(n,e)}async function y_(t,e,n){try{const r=await async function(s,i,c){const a=Date.now(),{startTimestamp:u=a,endTimestamp:d=a}=i,{url:l,method:p,status_code:f=0,request_body_size:h,response_body_size:g}=s.data,S=ss(l,c.networkDetailAllowUrls)&&!ss(l,c.networkDetailDenyUrls),w=S?function({networkCaptureBodies:E,networkRequestHeaders:y},_,x){const b=_?function(I,O){return I.length===1&&typeof I[0]!="string"?rl(I[0],O):I.length===2?rl(I[1],O):{}}(_,y):{};if(!E)return Ze(b,x,void 0);const M=Ia(_),[C,R]=Yo(M,X),T=Ze(b,x,C);return R?os(T,R):T}(c,i.input,h):gr(h),k=await async function(E,{networkCaptureBodies:y,networkResponseHeaders:_},x,b){if(!E&&b!==void 0)return gr(b);const M=x?jf(x.headers,_):{};if(!x||!y&&b!==void 0)return Ze(M,b,void 0);const[C,R]=await async function(I){const O=function(P){try{return P.clone()}catch(L){Y&&X.exception(L,"Failed to clone response body")}}(I);if(!O)return[void 0,"BODY_PARSE_ERROR"];try{return[await function(L){return new Promise(($,D)=>{const m=Hr(()=>D(new Error("Timeout while trying to read response body")),500);(async function(v){return await v.text()})(L).then(v=>$(v),v=>D(v)).finally(()=>clearTimeout(m))})}(O)]}catch(P){return P instanceof Error&&P.message.indexOf("Timeout")>-1?(Y&&X.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(Y&&X.exception(P,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}(x),T=function(I,{networkCaptureBodies:O,responseBodySize:P,captureDetails:L,headers:$}){try{const D=I?.length&&P===void 0?rs(I):P;return L?Ze($,D,O?I:void 0):gr(D)}catch(D){return Y&&X.exception(D,"Failed to serialize response body"),Ze($,P,void 0)}}(C,{networkCaptureBodies:y,responseBodySize:b,captureDetails:E,headers:M});return R?os(T,R):T}(S,c,i.response,g);return{startTimestamp:u,endTimestamp:d,url:l,method:p,statusCode:f,request:w,response:k}}(t,e,n),o=Bf("resource.fetch",r);Ff(n.replay,o)}catch(r){Y&&X.exception(r,"Failed to capture fetch breadcrumb")}}function jf(t,e){const n={};return e.forEach(r=>{t.get(r)&&(n[r]=t.get(r))}),n}function rl(t,e){if(!t)return{};const n=t.headers;return n?n instanceof Headers?jf(n,e):Array.isArray(n)?{}:Zi(n,e):{}}async function __(t,e,n){try{const r=function(s,i,c){const a=Date.now(),{startTimestamp:u=a,endTimestamp:d=a,input:l,xhr:p}=i,{url:f,method:h,status_code:g=0,request_body_size:S,response_body_size:w}=s.data;if(!f)return null;if(!p||!ss(f,c.networkDetailAllowUrls)||ss(f,c.networkDetailDenyUrls))return{startTimestamp:u,endTimestamp:d,url:f,method:h,statusCode:g,request:gr(S),response:gr(w)};const k=p[be],E=k?Zi(k.request_headers,c.networkRequestHeaders):{},y=Zi(function(T){const I=T.getAllResponseHeaders();return I?I.split(`\r
|
|
495
|
+
`).reduce((O,P)=>{const[L,$]=P.split(": ");return $&&(O[L.toLowerCase()]=$),O},{}):{}}(p),c.networkResponseHeaders),[_,x]=c.networkCaptureBodies?Yo(l,X):[void 0],[b,M]=c.networkCaptureBodies?function(T){const I=[];try{return[T.responseText]}catch(O){I.push(O)}try{return function(O,P){try{if(typeof O=="string")return[O];if(O instanceof Document)return[O.body.outerHTML];if(P==="json"&&O&&typeof O=="object")return[JSON.stringify(O)];if(!O)return[void 0]}catch(L){return Y&&X.exception(L,"Failed to serialize body",O),[void 0,"BODY_PARSE_ERROR"]}return Y&&X.log("Skipping network body because of body type",O),[void 0,"UNPARSEABLE_BODY_TYPE"]}(T.response,T.responseType)}catch(O){I.push(O)}return Y&&X.warn("Failed to get xhr response body",...I),[void 0]}(p):[void 0],C=Ze(E,S,_),R=Ze(y,w,b);return{startTimestamp:u,endTimestamp:d,url:f,method:h,statusCode:g,request:x?os(C,x):C,response:M?os(R,M):R}}(t,e,n),o=Bf("resource.xhr",r);Ff(n.replay,o)}catch(r){Y&&X.exception(r,"Failed to capture xhr breadcrumb")}}function v_(t,e){const{xhr:n,input:r}=e;if(!n)return;const o=rs(r),s=n.getResponseHeader("content-length")?Uf(n.getResponseHeader("content-length")):function(i,c){try{return rs(c==="json"&&i&&typeof i=="object"?JSON.stringify(i):i)}catch{return}}(n.response,n.responseType);o!==void 0&&(t.data.request_body_size=o),s!==void 0&&(t.data.response_body_size=s)}function b_(t){const e=W();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i}=t.getOptions(),c={replay:t,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i};e&&e.on("beforeAddBreadcrumb",(a,u)=>function(d,l,p){if(l.data)try{(function(f){return f.category==="xhr"})(l)&&function(f){return f?.xhr}(p)&&(v_(l,p),__(l,p,d)),function(f){return f.category==="fetch"}(l)&&function(f){return f?.response}(p)&&(function(f,h){const{input:g,response:S}=h,w=rs(g?Ia(g):void 0),k=S?Uf(S.headers.get("content-length")):void 0;w!==void 0&&(f.data.request_body_size=w),k!==void 0&&(f.data.response_body_size=k)}(l,p),y_(l,p,d))}catch(f){Y&&X.exception(f,"Error when enriching network breadcrumb")}}(c,a,u))}catch{}}function S_(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}=t,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}}function w_(t,e,n){return function(r,o,s){let i,c,a;const u=s?.maxWait?Math.max(s.maxWait,o):0,d=s?.setTimeoutImpl||setTimeout;function l(){return p(),i=r(),i}function p(){c!==void 0&&clearTimeout(c),a!==void 0&&clearTimeout(a),c=a=void 0}function f(){return c&&clearTimeout(c),c=d(l,o),u&&a===void 0&&(a=d(l,u)),i}return f.cancel=p,f.flush=function(){return c!==void 0||a!==void 0?l():i},f}(t,e,{...n,setTimeoutImpl:Hr})}const uo=Q.navigator;function k_(t){let e=!1;return(n,r)=>{if(!t.checkAndHandleExpiredSession())return void(Y&&X.warn("Received replay event after session expired."));const o=r||!e;e=!0,t.clickDetector&&Jy(t.clickDetector,n),t.addUpdate(()=>{if(t.recordingMode==="buffer"&&o&&t.setInitialState(),!Yi(t,n,o))return!0;if(!o)return!1;const s=t.session;if(function(i,c){!c||!i.session||i.session.segmentId!==0||Yi(i,function(a){const u=a.getOptions();return{type:it.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:a.isRecordingCanvas(),sessionSampleRate:u.sessionSampleRate,errorSampleRate:u.errorSampleRate,useCompressionOption:u.useCompression,blockAllMedia:u.blockAllMedia,maskAllText:u.maskAllText,maskAllInputs:u.maskAllInputs,useCompression:!!a.eventBuffer&&a.eventBuffer.type==="worker",networkDetailHasUrls:u.networkDetailAllowUrls.length>0,networkCaptureBodies:u.networkCaptureBodies,networkRequestHasHeaders:u.networkRequestHeaders.length>0,networkResponseHasHeaders:u.networkResponseHeaders.length>0}}}}(i),!1)}(t,o),t.recordingMode==="buffer"&&s&&t.eventBuffer){const i=t.eventBuffer.getEarliestTimestamp();i&&(Y&&X.log(`Updating session start time to earliest event in buffer to ${new Date(i)}`),s.started=i,t.getOptions().stickySession&&Fa(s))}return s?.previousSessionId||t.recordingMode==="session"&&t.flush(),!0})}}async function E_({recordingData:t,replayId:e,segmentId:n,eventContext:r,timestamp:o,session:s}){const i=function({recordingData:y,headers:_}){let x;const b=`${JSON.stringify(_)}
|
|
496
|
+
`;if(typeof y=="string")x=`${b}${y}`;else{const M=new TextEncoder().encode(b);x=new Uint8Array(M.length+y.length),x.set(M),x.set(y,M.length)}return x}({recordingData:t,headers:{segment_id:n}}),{urls:c,errorIds:a,traceIds:u,initialTimestamp:d}=r,l=W(),p=et(),f=l?.getTransport(),h=l?.getDsn();if(!(l&&f&&h&&s.sampled))return Re({});const g={type:"replay_event",replay_start_timestamp:d/1e3,timestamp:o/1e3,error_ids:a,trace_ids:u,urls:c,replay_id:e,segment_id:n,replay_type:s.sampled},S=await async function({client:y,scope:_,replayId:x,event:b}){const M={event_id:x,integrations:typeof y._integrations!="object"||y._integrations===null||Array.isArray(y._integrations)?void 0:Object.keys(y._integrations)};y.emit("preprocessEvent",b,M);const C=await Md(y.getOptions(),b,M,_,y,Dt());if(!C)return null;y.emit("postprocessEvent",C,M),C.platform=C.platform||"javascript";const R=y.getSdkMetadata(),{name:T,version:I}=R?.sdk||{};return C.sdk={...C.sdk,name:T||"sentry.javascript.unknown",version:I||"0.0.0"},C}({scope:p,client:l,replayId:e,event:g});if(!S)return l.recordDroppedEvent("event_processor","replay"),Y&&X.log("An event processor returned `null`, will not send event."),Re({});delete S.sdkProcessingMetadata;const w=function(y,_,x,b){return we(Ed(y,_i(y),b,x),[[{type:"replay_event"},y],[{type:"replay_recording",length:typeof _=="string"?new TextEncoder().encode(_).length:_.length},_]])}(S,i,h,l.getOptions().tunnel);let k;try{k=await f.send(w)}catch(y){const _=new Error(Ra);try{_.cause=y}catch{}throw _}if(typeof k.statusCode=="number"&&(k.statusCode<200||k.statusCode>=300))throw new Hf(k.statusCode);const E=Wd({},k);if(zd(E,"replay"))throw new Ba(E);return k}class Hf extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class Ba extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function zf(t,e={count:0,interval:5e3}){const{recordingData:n,onError:r}=t;if(n.length)try{return await E_(t),!0}catch(o){if(o instanceof Hf||o instanceof Ba)throw o;if(ua("Replays",{_retryCount:e.count}),r&&r(o),e.count>=3){const s=new Error(`${Ra} - max retries exceeded`);try{s.cause=o}catch{}throw s}return e.interval*=++e.count,new Promise((s,i)=>{Hr(async()=>{try{await zf(t,e),s(!0)}catch(c){i(c)}},e.interval)})}}const Wf="__THROTTLED";function x_(t,e,n){const r=new Map;let o=!1;return(...s)=>{const i=Math.floor(Date.now()/1e3);if((a=>{const u=a-n;r.forEach((d,l)=>{l<u&&r.delete(l)})})(i),[...r.values()].reduce((a,u)=>a+u,0)>=e){const a=o;return o=!0,a?"__SKIPPED":Wf}o=!1;const c=r.get(i)||0;return r.set(i,c+1),t(...s)}}class C_{constructor({options:e,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},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=e,this._debouncedFlush=w_(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=x_((i,c)=>function(a,u,d){return Nf(a,u)?Df(a,u,d):Promise.resolve(null)}(this,i,c),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:o}=this.getOptions(),s=r?{threshold:Math.min(3e3,r),timeout:r,scrollTimeout:300,ignoreSelector:o?o.join(","):""}:void 0;if(s&&(this.clickDetector=new Gy(this,s)),Y){const i=e._experiments;X.setConfig({captureExceptions:!!i.captureExceptions,traceInternals:!!i.traceInternals})}this._handleVisibilityChange=()=>{wt.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const i=ce({category:"ui.blur"});this._doChangeToBackgroundTasks(i)},this._handleWindowFocus=()=>{const i=ce({category:"ui.focus"});this._doChangeToForegroundTasks(i)},this._handleKeyboardEvent=i=>{Qy(this,i)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){Y&&X.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:n,sessionSampleRate:r}=this._options,o=n<=0&&r<=0;this._requiresManualStart=o,o||(this._initializeSessionForSampling(e),this.session?this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",Y&&X.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording()):Y&&X.exception(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&this.recordingMode==="session")return void(Y&&X.log("Recording is already in progress"));if(this._isEnabled&&this.recordingMode==="buffer")return void(Y&&X.log("Buffering is in progress, call `flush()` to save the replay"));Y&&X.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=ei({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled)return void(Y&&X.log("Buffering is in progress, call `flush()` to save the replay"));Y&&X.infoTick("Starting replay in buffer mode");const e=ei({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=ke({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:6e4}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:k_(this),.../iPhone|iPad|iPod/i.test(uo?.userAgent??"")||/Macintosh/i.test(uo?.userAgent??"")&&uo?.maxTouchPoints&&uo?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{},onMutation:this._onMutationHandler.bind(this),...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{Y&&X.log("Stopping Replay"+(n?` triggered by ${n}`:"")),$f(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,d_(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Y&&X.log("Pausing replay"))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),Y&&X.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();Y&&X.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();e&&r&&this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const n=e();this.recordingMode!=="buffer"&&this._isEnabled&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}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(){return this.session?.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&Ji(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"))return!!this._checkSession();this.pause()}setInitialState(){const e=`${wt.location.pathname}${wt.location.hash}${wt.location.search}`,n=`${wt.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(e,n){const r=this._throttledAddEvent(e,n);if(r===Wf){const o=ce({category:"replay.throttled"});this.addUpdate(()=>!Yi(this,{type:5,timestamp:o.timestamp||0,data:{tag:"breadcrumb",payload:o,metric:!0}}))}return r}getCurrentRoute(){const e=this.lastActiveSpan||It(),n=e&&At(e),r=(n&&Z(n).data||{})[kt];if(n&&r&&["route","custom"].includes(r))return Z(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=l_({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){const n=this._options.errorSampleRate>0,r=ei({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const e=this.session;return!Pf(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{wt.document.addEventListener("visibilitychange",this._handleVisibilityChange),wt.addEventListener("blur",this._handleWindowBlur),wt.addEventListener("focus",this._handleWindowFocus),wt.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(function(e){const n=W();zp(Zy(e)),Ss(g_(e)),h_(e),b_(e),Ad(m_(e)),n&&(n.on("beforeSendEvent",f_(e)),n.on("afterSendEvent",p_(e)),n.on("createDsc",r=>{const o=e.getSessionId();o&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=o)}),n.on("spanStart",r=>{e.lastActiveSpan=r}),n.on("spanEnd",r=>{e.lastActiveSpan=r}),n.on("beforeSendFeedback",async(r,o)=>{const s=e.getSessionId();o?.includeReplay&&e.isEnabled()&&s&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=s)}),n.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=function(e){function n(s){e.performanceEntries.includes(s)||e.performanceEntries.push(s)}function r({entries:s}){s.forEach(n)}const o=[];return["navigation","paint","resource"].forEach(s=>{o.push(Xe(s,r))}),o.push(Ea(co(n_,e)),ka(co(o_,e)),Np(co(s_,e)),$p(co(i_,e))),()=>{o.forEach(s=>s())}}(this)}_removeListeners(){try{wt.document.removeEventListener("visibilitychange",this._handleVisibilityChange),wt.removeEventListener("blur",this._handleWindowBlur),wt.removeEventListener("focus",this._handleWindowFocus),wt.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}_doChangeToBackgroundTasks(e){this.session&&(Lf(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush()))}_doChangeToForegroundTasks(e){this.session&&(this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):Y&&X.log("Document has become active, but session has expired"))}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:it.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=(n=this.performanceEntries,n.map(e_).filter(Boolean)).concat(this.replayPerformanceEntries);var n;if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const r=this._context.initialTimestamp/1e3;e=e.filter(o=>o.start>=r)}return Promise.all(ns(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:n}=this;if(!e||!n||this._requiresManualStart||e.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const e={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(),e}async _runFlush(){const e=this.getSessionId();if(this.session&&this.eventBuffer&&e){if(await this._addPerformanceEntries(),this.eventBuffer?.hasEvents&&(await async function(n){try{return Promise.all(ns(n,[S_(wt.performance.memory)]))}catch{return[]}}(this),this.eventBuffer&&e===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(),o=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await zf({replayId:e,recordingData:s,segmentId:o,eventContext:r,session:this.session,timestamp:n,onError:i=>this.handleException(i)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});const r=W();if(r){const o=n instanceof Ba?"ratelimit_backoff":"send_error";r.recordDroppedEvent(o,"replay")}}}else Y&&X.error("No session or eventBuffer found to flush.")}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(Y&&X.error("Attempting to finish replay event after session expired."));if(!this.session)return;const n=this.session.started,r=Date.now()-n;this._debouncedFlush.cancel();const o=r<this._options.minReplayDuration,s=r>this._options.maxReplayDuration+5e3;if(o||s)return Y&&X.log(`Session duration (${Math.floor(r/1e3)}s) is too ${o?"short":"long"}, not sending replay.`),void(o&&this._debouncedFlush());const i=this.eventBuffer;i&&this.session.segmentId===0&&!i.hasCheckout&&Y&&X.log("Flushing initial segment without checkout.");const c=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(a){this.handleException(a)}finally{this._flushLock=void 0,c&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&Fa(this.session)}_onMutationHandler(e){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&e.some(i=>{const c=function(u){if(!u)return null;try{return u.nodeType===u.ELEMENT_NODE?u:u.parentElement}catch{return null}}(i.target),a=n.join(",");return c?.matches(a)}))return!1;const r=e.length,o=this._options.mutationLimit,s=o&&r>o;if(r>this._options.mutationBreadcrumbLimit||s){const i=ce({category:"replay.mutations",data:{count:r,limit:s}});this._createCustomBreadcrumb(i)}return!s||(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1)}}function ir(t,e){return[...t,...e].join(",")}const ol='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',T_=["content-length","content-type","accept"];let sl=!1;const I_=t=>new M_(t);class M_{constructor({flushMinDelay:e=5e3,flushMaxDelay:n=5500,minReplayDuration:r=4999,maxReplayDuration:o=36e5,stickySession:s=!0,useCompression:i=!0,workerUrl:c,_experiments:a={},maskAllText:u=!0,maskAllInputs:d=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:p=750,mutationLimit:f=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:g=[],networkDetailAllowUrls:S=[],networkDetailDenyUrls:w=[],networkCaptureBodies:k=!0,networkRequestHeaders:E=[],networkResponseHeaders:y=[],mask:_=[],maskAttributes:x=["title","placeholder","aria-label"],unmask:b=[],block:M=[],unblock:C=[],ignore:R=[],maskFn:T,beforeAddRecordingEvent:I,beforeErrorSampling:O,onError:P}={}){this.name="Replay";const L=function({mask:$,unmask:D,block:m,unblock:v,ignore:N}){return{maskTextSelector:ir($,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:ir(D,[]),blockSelector:ir(m,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:ir(v,[]),ignoreSelector:ir(N,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}({mask:_,unmask:b,block:M,unblock:C,ignore:R});if(this._recordingOptions={maskAllInputs:d,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:T,maskInputFn:T,maskAttributeFn:($,D,m)=>function({el:v,key:N,maskAttributes:U,maskAllText:B,privacyOptions:F,value:j}){return B?F.unmaskTextSelector&&v.matches(F.unmaskTextSelector)?j:U.includes(N)||N==="value"&&v.tagName==="INPUT"&&["submit","button"].includes(v.getAttribute("type")||"")?j.replace(/[\S]/g,"*"):j:j}({maskAttributes:x,maskAllText:u,privacyOptions:L,key:$,value:D,el:m}),...L,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:$=>{try{$.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!a.recordCrossOriginIframes},this._initialOptions={flushMinDelay:e,flushMaxDelay:n,minReplayDuration:Math.min(r,15e3),maxReplayDuration:Math.min(o,yy),stickySession:s,useCompression:i,workerUrl:c,blockAllMedia:l,maskAllInputs:d,maskAllText:u,mutationBreadcrumbLimit:p,mutationLimit:f,slowClickTimeout:h,slowClickIgnoreSelectors:g,networkDetailAllowUrls:S,networkDetailDenyUrls:w,networkCaptureBodies:k,networkRequestHeaders:il(E),networkResponseHeaders:il(y),beforeAddRecordingEvent:I,beforeErrorSampling:O,onError:P,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${ol}`:ol),this._isInitialized&&Mi())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return sl}set _isInitialized(e){sl=e}afterAllSetup(e){Mi()&&!this._replay&&(this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(this._replay?.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const n=function(r,o){const s=o.getOptions(),i={sessionSampleRate:0,errorSampleRate:0,...r},c=ln(s.replaysSessionSampleRate),a=ln(s.replaysOnErrorSampleRate);return c==null&&a==null&&qe(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),c!=null&&(i.sessionSampleRate=c),a!=null&&(i.errorSampleRate=a),i}(this._initialOptions,e);this._replay=new C_({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const n=e.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function il(t){return[...T_,...t.map(e=>e.toLowerCase())]}var R_=Object.defineProperty,al=(t,e,n)=>((r,o,s)=>o in r?R_(r,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[o]=s)(t,typeof e!="symbol"?e+"":e,n);class O_{constructor(){al(this,"idNodeMap",new Map),al(this,"nodeMetaMap",new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,n){const r=n.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,n)}replace(e,n){const r=this.getNode(e);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(e,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Qi(t,e,n=1/0,r=0){return t?t.nodeType!==t.ELEMENT_NODE||r>n?-1:e(t)?r:Qi(t.parentNode,e,n,r+1):-1}function cl(t,e){return n=>{const r=n;if(r===null)return!1;try{if(t){if(typeof t=="string"){if(r.matches(`.${t}`))return!0}else if(function(o,s){for(let i=o.classList.length;i--;){const c=o.classList[i];if(s.test(c))return!0}return!1}(r,t))return!0}return!(!e||!r.matches(e))}catch{return!1}}}const wn=`Please stop import mirror directly. Instead of that,\r
|
|
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 ul={map:{},getId:()=>(console.error(wn),-1),getNode:()=>(console.error(wn),null),removeNodeFromMap(){console.error(wn)},has:()=>(console.error(wn),!1),reset(){console.error(wn)}};function ja(t,e,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(t,e);return o.Object.defineProperty(t,e,r?n:{set(i){Vf(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>ja(t,e,s||{},!0)}function Ha(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=o,()=>{t[e]=r}}catch{return()=>{}}}function is(t,e,n,r,o){if(!t)return!1;const s=function(a){if(!a)return null;try{return a.nodeType===a.ELEMENT_NODE?a:a.parentElement}catch{return null}}(t);if(!s)return!1;const i=Qi(s,cl(e,n));let c=-1;return!(i<0)&&(r&&(c=Qi(s,cl(null,r))),i>-1&&c<0||i<c)}typeof window<"u"&&window.Proxy&&window.Reflect&&(ul=new Proxy(ul,{get:(t,e,n)=>(e==="map"&&console.error(wn),Reflect.get(t,e,n))})),Date.now().toString();const ll={};function qf(t){const e=ll[t];if(e)return e;const n=window.document;let r=window[t];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const s=o.contentWindow;s&&s[t]&&(r=s[t]),n.head.removeChild(o)}catch{}return ll[t]=r.bind(window)}function Ke(...t){return qf("requestAnimationFrame")(...t)}function Vf(...t){return qf("setTimeout")(...t)}var kn=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(kn||{});let Mo;const ni=t=>Mo?(...e)=>{try{return t(...e)}catch(n){if(Mo&&Mo(n)===!0)return()=>{};throw n}}:t;for(var ur="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",A_=typeof Uint8Array>"u"?[]:new Uint8Array(256),lo=0;lo<64;lo++)A_[ur.charCodeAt(lo)]=lo;const dl=new Map,Gf=(t,e,n)=>{if(!t||!Jf(t,e)&&typeof t!="object")return;const r=function(s,i){let c=dl.get(s);return c||(c=new Map,dl.set(s,c)),c.has(i)||c.set(i,[]),c.get(i)}(n,t.constructor.name);let o=r.indexOf(t);return o===-1&&(o=r.length,r.push(t)),o};function Ro(t,e,n){if(t instanceof Array)return t.map(r=>Ro(r,e,n));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer)return{rr_type:t.constructor.name,base64:function(r){var o,s=new Uint8Array(r),i=s.length,c="";for(o=0;o<i;o+=3)c+=ur[s[o]>>2],c+=ur[(3&s[o])<<4|s[o+1]>>4],c+=ur[(15&s[o+1])<<2|s[o+2]>>6],c+=ur[63&s[o+2]];return i%3==2?c=c.substring(0,c.length-1)+"=":i%3==1&&(c=c.substring(0,c.length-2)+"=="),c}(t)};if(t instanceof DataView)return{rr_type:t.constructor.name,args:[Ro(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const r=t.constructor.name,{src:o}=t;return{rr_type:r,src:o}}return t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL()}:t instanceof ImageData?{rr_type:t.constructor.name,args:[Ro(t.data,e,n),t.width,t.height]}:Jf(t,e)||typeof t=="object"?{rr_type:t.constructor.name,index:Gf(t,e,n)}:t}const Kf=(t,e,n)=>t.map(r=>Ro(r,e,n)),Jf=(t,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(r=>typeof e[r]=="function").find(r=>t instanceof e[r]);function pl(t,e,n,r,o){const s=[];try{const i=Ha(t.HTMLCanvasElement.prototype,"getContext",function(c){return function(a,...u){if(!is(this,e,n,r)){const d=function(l){return l==="experimental-webgl"?"webgl":l}(a);if("__context"in this||(this.__context=d),o&&["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 c.apply(this,[a,...u])}});s.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(i=>i())}}function fl(t,e,n,r,o,s,i,c){const a=[],u=Object.getOwnPropertyNames(t);for(const d of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(d))try{if(typeof t[d]!="function")continue;const l=Ha(t,d,function(p){return function(...f){const h=p.apply(this,f);if(Gf(h,c,this),"tagName"in this.canvas&&!is(this.canvas,r,o,s)){const g=Kf(f,c,this),S={type:e,property:d,args:g};n(this.canvas,S)}return h}});a.push(l)}catch{const l=ja(t,d,{set(p){n(this.canvas,{type:e,property:d,args:[p],setter:!0})}});a.push(l)}return a}class L_{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(l,p)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(p)};const{sampling:n="all",win:r,blockClass:o,blockSelector:s,unblockSelector:i,maxCanvasSize:c,recordCanvas:a,dataURLOptions:u,errorHandler:d}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.options=e,d&&(Mo=d),(a&&typeof n=="number"||e.enableManualSnapshot)&&(this.worker=this.initFPSWorker()),this.addWindow(r),e.enableManualSnapshot||ni(()=>{a&&n==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),a&&typeof n=="number"&&this.initCanvasFPSObserver(n,o,s,i,c,{dataURLOptions:u})})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(e){const{sampling:n="all",blockClass:r,blockSelector:o,unblockSelector:s,recordCanvas:i,enableManualSnapshot:c}=this.options;if(!this.windowsSet.has(e)){if(c)return this.windowsSet.add(e),void this.windows.push(new WeakRef(e));ni(()=>{if(i&&n==="all"&&this.initCanvasMutationObserver(e,r,o,s),i&&typeof n=="number"){const a=pl(e,r,o,s,!0);this.restoreHandlers.push(()=>{a()})}})(),this.windowsSet.add(e),this.windows.push(new WeakRef(e))}}addShadowRoot(e){this.shadowDoms.add(new WeakRef(e))}resetShadowRoots(){this.shadowDoms=new Set}initFPSWorker(){const e=new Worker(function(){const n=new Blob(['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)}};']);return URL.createObjectURL(n)}());return e.onmessage=n=>{const r=n.data,{id:o}=r;if(this.snapshotInProgressMap.set(o,!1),!("base64"in r))return;const{base64:s,type:i,width:c,height:a}=r;this.mutationCb({id:o,type:kn["2D"],commands:[{property:"clearRect",args:[0,0,c,a]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:s}],type:i}]},0,0,c,a]}]})},e}initCanvasFPSObserver(e,n,r,o,s,i){const c=this.takeSnapshot(!1,e,n,r,o,s,i.dataURLOptions);this.restoreHandlers.push(()=>{cancelAnimationFrame(c)})}initCanvasMutationObserver(e,n,r,o){const s=pl(e,n,r,o,!1),i=function(a,u,d,l,p){const f=[],h=Object.getOwnPropertyNames(u.CanvasRenderingContext2D.prototype);for(const g of h)try{if(typeof u.CanvasRenderingContext2D.prototype[g]!="function")continue;const S=Ha(u.CanvasRenderingContext2D.prototype,g,function(w){return function(...k){return is(this.canvas,d,l,p)||Vf(()=>{const E=Kf(k,u,this);a(this.canvas,{type:kn["2D"],property:g,args:E})},0),w.apply(this,k)}});f.push(S)}catch{const S=ja(u.CanvasRenderingContext2D.prototype,g,{set(w){a(this.canvas,{type:kn["2D"],property:g,args:[w],setter:!0})}});f.push(S)}return()=>{f.forEach(g=>g())}}(this.processMutation.bind(this),e,n,r,o),c=function(a,u,d,l,p){const f=[];return f.push(...fl(u.WebGLRenderingContext.prototype,kn.WebGL,a,d,l,p,0,u)),u.WebGL2RenderingContext!==void 0&&f.push(...fl(u.WebGL2RenderingContext.prototype,kn.WebGL2,a,d,l,p,0,u)),()=>{f.forEach(h=>h())}}(this.processMutation.bind(this),e,n,r,o,this.mirror);this.restoreHandlers.push(()=>{s(),i(),c()})}snapshot(e){const{options:n}=this,r=this.takeSnapshot(!0,n.sampling==="all"?2:n.sampling||2,n.blockClass,n.blockSelector,n.unblockSelector,n.maxCanvasSize,n.dataURLOptions,e);this.restoreHandlers.push(()=>{cancelAnimationFrame(r)})}takeSnapshot(e,n,r,o,s,i,c,a){const u=1e3/n;let d;const l=f=>{if(f)return[f];const h=[],g=S=>{S.querySelectorAll("canvas").forEach(w=>{is(w,r,o,s)||h.push(w)})};for(const S of this.windows){const w=S.deref();let k;try{k=w&&w.document}catch{}k&&g(k)}for(const S of this.shadowDoms){const w=S.deref();w&&g(w)}return h},p=f=>{this.windows.length&&(this.lastSnapshotTime&&f-this.lastSnapshotTime<u?d=Ke(p):(this.lastSnapshotTime=f,l(a).forEach(h=>{if(!this.mirror.hasNode(h))return;const g=this.mirror.getId(h);if(!this.snapshotInProgressMap.get(g)&&h.width&&h.height){if(this.snapshotInProgressMap.set(g,!0),!e&&["webgl","webgl2"].includes(h.__context)){const S=h.getContext(h.__context);S?.getContextAttributes()?.preserveDrawingBuffer===!1&&S.clear(S.COLOR_BUFFER_BIT)}createImageBitmap(h).then(S=>{this.worker?.postMessage({id:g,bitmap:S,width:h.width,height:h.height,dataURLOptions:c,maxCanvasSize:i},[S])}).catch(S=>{ni(()=>{throw S})()})}}),e||(d=Ke(p))))};return d=Ke(p),d}startPendingCanvasMutationFlusher(){Ke(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=n=>{this.rafStamps.latestId=n,Ke(e)};Ke(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),Ke(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||n===-1)return;const o=r.map(i=>{const{type:c,...a}=i;return a}),{type:s}=r[0];this.mutationCb({id:n,type:s,commands:o}),this.pendingCanvasMutations.delete(e)}}try{if(Array.from([1],t=>2*t)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=t.contentWindow?.Array.from||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}var hl;new O_,function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"}(hl||(hl={}));const ml={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}}},po=1280,P_=(t={})=>{const[e,n]=t.maxCanvasSize||[],r={quality:t.quality||"medium",enableManualSnapshot:t.enableManualSnapshot,maxCanvasSize:[e?Math.min(e,po):po,n?Math.min(n,po):po]};let o;const s=new Promise(i=>o=i);return{name:"ReplayCanvas",getOptions(){const{quality:i,enableManualSnapshot:c,maxCanvasSize:a}=r;return{enableManualSnapshot:c,recordCanvas:!0,getCanvasManager:u=>{const d=new L_({...u,enableManualSnapshot:c,maxCanvasSize:a,errorHandler:l=>{try{typeof l=="object"&&(l.__rrweb__=!0)}catch{}}});return o(d),d},...ml[i]||ml.medium}},async snapshot(i){(await s).snapshot(i)}}};function ae(t=0){return((Bt()||performance.timeOrigin)+t)/1e3}const gl=new WeakMap,ri=new Map,za={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Yf(t,e){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:o,shouldCreateSpanForRequest:s,enableHTTPTimings:i,tracePropagationTargets:c,onRequestSpanStart:a}={...za,...e},u=typeof s=="function"?s:p=>!0,d=p=>function(f,h){const g=mn();if(g){let S,w;try{S=new URL(f,g),w=new URL(g).origin}catch{return!1}const k=S.origin===w;return h?oe(S.toString(),h)||k&&oe(S.pathname,h):k}{const S=!!f.match(/^\/(?!\/)/);return h?oe(f,h):S}}(p,c),l={};n&&(t.addEventProcessor(p=>(p.type==="transaction"&&p.spans&&p.spans.forEach(f=>{if(f.op==="http.client"){const h=ri.get(f.span_id);h&&(f.timestamp=h/1e3,ri.delete(f.span_id))}}),p)),o&&function(p){const f="fetch-body-resolved";Ve(f,p),Ge(f,()=>cp(qm))}(p=>{if(p.response){const f=gl.get(p.response);f&&p.endTimestamp&&ri.set(f,p.endTimestamp)}}),ma(p=>{const f=Hm(p,u,d,l);if(p.response&&p.fetchData.__span&&gl.set(p.response,p.fetchData.__span),f){const h=_l(p.fetchData.url),g=h?An(h).host:void 0;f.setAttributes({"http.url":h,"server.address":g}),i&&yl(f),a?.(f,{headers:p.headers})}})),r&&Ta(p=>{const f=function(h,g,S,w){const k=h.xhr,E=k?.[be];if(!k||k.__sentry_own_request__||!E)return;const{url:y,method:_}=E,x=He()&&g(y);if(h.endTimestamp&&x){const O=k.__sentry_xhr_span_id__;if(!O)return;const P=w[O];return void(P&&E.status_code!==void 0&&(Sr(P,E.status_code),P.end(),delete w[O]))}const b=_l(y),M=An(b||y),C=sp(y),R=!!It(),T=x&&R?Zt({name:`${_} ${C}`,attributes:{url:y,type:"xhr","http.method":_,"http.url":b,"server.address":M?.host,[lt]:"auto.http.browser",[Ot]:"http.client",...M?.search&&{"http.query":M?.search},...M?.hash&&{"http.fragment":M?.hash}}}):new Me;k.__sentry_xhr_span_id__=T.spanContext().spanId,w[k.__sentry_xhr_span_id__]=T,S(y)&&function(O,P){const{"sentry-trace":L,baggage:$}=pa({span:P});L&&function(D,m,v){const N=D.__sentry_xhr_v3__?.request_headers;if(!N?.["sentry-trace"])try{if(D.setRequestHeader("sentry-trace",m),v){const U=N?.baggage;U&&U.split(",").some(B=>B.trim().startsWith("sentry-"))||D.setRequestHeader("baggage",v)}}catch{}}(O,L,$)}(k,He()&&R?T:void 0);const I=W();return I&&I.emit("beforeOutgoingRequestSpan",T,h),T}(p,u,d,l);if(f){let h;i&&yl(f);try{h=new Headers(p.xhr.__sentry_xhr_v3__?.request_headers)}catch{}a?.(f,{headers:h})}})}function yl(t){const{url:e}=Z(t).data;if(!e||typeof e!="string")return;const n=Xe("resource",({entries:r})=>{r.forEach(o=>{(function(s){return s.entryType==="resource"&&"initiatorType"in s&&typeof s.nextHopProtocol=="string"&&(s.initiatorType==="fetch"||s.initiatorType==="xmlhttprequest")})(o)&&o.name.endsWith(e)&&(function(s){const i=[];if(s.nextHopProtocol!=null){const{name:c,version:a}=Bp(s.nextHopProtocol);i.push(["network.protocol.version",a],["network.protocol.name",c])}return Bt()?[...i,["http.request.redirect_start",ae(s.redirectStart)],["http.request.fetch_start",ae(s.fetchStart)],["http.request.domain_lookup_start",ae(s.domainLookupStart)],["http.request.domain_lookup_end",ae(s.domainLookupEnd)],["http.request.connect_start",ae(s.connectStart)],["http.request.secure_connection_start",ae(s.secureConnectionStart)],["http.request.connection_end",ae(s.connectEnd)],["http.request.request_start",ae(s.requestStart)],["http.request.response_start",ae(s.responseStart)],["http.request.response_end",ae(s.responseEnd)]]:i}(o).forEach(s=>t.setAttribute(...s)),setTimeout(n))})})}function _l(t){try{return new URL(t,q.location.origin).href}catch{return}}const vl="sentry_previous_trace",D_="sentry.previous_trace";function N_(t,{linkPreviousTrace:e,consistentTraceSampling:n}){const r=e==="session-storage";let o=r?function(){try{const i=q.sessionStorage?.getItem(vl);return JSON.parse(i)}catch{return}}():void 0;t.on("spanStart",i=>{if(At(i)!==i)return;const c=et().getPropagationContext();o=function(a,u,d){const l=Z(u);function p(){try{return Number(d.dsc?.sample_rate)??Number(l.data?.[ps])}catch{return 0}}const f={spanContext:u.spanContext(),startTimestamp:l.start_timestamp,sampleRate:p(),sampleRand:d.sampleRand};if(!a)return f;const h=a.spanContext;return h.traceId===l.trace_id?a:(Date.now()/1e3-a.startTimestamp<=3600&&(ct&&A.log(`Adding previous_trace ${h} link to span ${{op:l.op,...u.spanContext()}}`),u.addLink({context:h,attributes:{[Kh]:"previous_trace"}}),u.setAttribute(D_,`${h.traceId}-${h.spanId}-${oi(h)?1:0}`)),f)}(o,i,c),r&&function(a){try{q.sessionStorage.setItem(vl,JSON.stringify(a))}catch(u){ct&&A.warn("Could not store previous trace in sessionStorage",u)}}(o)});let s=!0;n&&t.on("beforeSampling",i=>{if(!o)return;const c=et(),a=c.getPropagationContext();s&&a.parentSpanId?s=!1:(c.setPropagationContext({...a,dsc:{...a.dsc,sample_rate:String(o.sampleRate),sampled:String(oi(o.spanContext))},sampleRand:o.sampleRand}),i.parentSampled=oi(o.spanContext),i.parentSampleRate=o.sampleRate,i.spanAttributes={...i.spanAttributes,[rd]:o.sampleRate})})}function oi(t){return t.traceFlags===1}const $_={...mo,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,_experiments:{},...za},En=(t={})=>{const e={name:void 0,source:void 0},n=q.document,{enableInp:r,enableElementTiming:o,enableLongTask:s,enableLongAnimationFrame:i,_experiments:{enableInteractions:c,enableStandaloneClsSpans:a,enableStandaloneLcpSpans:u},beforeStartSpan:d,idleTimeout:l,finalTimeout:p,childSpanTimeout:f,markBackgroundSpan:h,traceFetch:g,traceXHR:S,trackFetchStreamPerformance:w,shouldCreateSpanForRequest:k,enableHTTPTimings:E,ignoreResourceSpans:y,ignorePerformanceApiSpans:_,instrumentPageLoad:x,instrumentNavigation:b,detectRedirects:M,linkPreviousTrace:C,consistentTraceSampling:R,onRequestSpanStart:T}={...$_,...t};let I,O;function P(L,$,D=!0){const m=$.op==="pageload",v=d?d($):$,N=v.attributes||{};if($.name!==v.name&&(N[kt]="custom",v.attributes=N),!D){const F=cn();return void Zt({...v,startTime:F}).end(F)}e.name=v.name,e.source=N[kt];const U=yc(v,{idleTimeout:l,finalTimeout:p,childSpanTimeout:f,disableAutoFinish:m,beforeSpanEnd:F=>{I?.(),Hg(F,{recordClsOnPageloadSpan:!a,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:y,ignorePerformanceApiSpans:_}),Sl(L,void 0);const j=et(),G=j.getPropagationContext();j.setPropagationContext({...G,traceId:U.spanContext().traceId,sampled:sn(U),dsc:ie(F)})}});function B(){n&&["interactive","complete"].includes(n.readyState)&&L.emit("idleSpanEnableAutoFinish",U)}Sl(L,U),m&&n&&(n.addEventListener("readystatechange",()=>{B()}),B())}return{name:"BrowserTracing",setup(L){if(yd(),I=jg({recordClsStandaloneSpans:a||!1,recordLcpStandaloneSpans:u||!1,client:L}),r&&Gg(),o&&bs()&&Bt()&&Xe("element",zg),i&&Q.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?new PerformanceObserver(D=>{const m=It();if(m)for(const v of D.getEntries()){if(!v.scripts[0])continue;const N=Et(Bt()+v.startTime),{start_timestamp:U,op:B}=Z(m);if(B==="navigation"&&U&&N<U)continue;const F=Et(v.duration),j={[lt]:"auto.ui.browser.metrics"},G=v.scripts[0],{invoker:K,invokerType:J,sourceURL:nt,sourceFunctionName:dt,sourceCharPosition:ht}=G;j["browser.script.invoker"]=K,j["browser.script.invoker_type"]=J,nt&&(j["code.filepath"]=nt),dt&&(j["code.function"]=dt),ht!==-1&&(j["browser.script.source_char_position"]=ht),ge(m,N,N+F,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:j})}}).observe({type:"long-animation-frame",buffered:!0}):s&&Xe("longtask",({entries:D})=>{const m=It();if(!m)return;const{op:v,start_timestamp:N}=Z(m);for(const U of D){const B=Et(Bt()+U.startTime),F=Et(U.duration);v==="navigation"&&N&&B<N||ge(m,B,B+F,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[lt]:"auto.ui.browser.metrics"}})}}),c&&Xe("event",({entries:D})=>{const m=It();if(m){for(const v of D)if(v.name==="click"){const N=Et(Bt()+v.startTime),U=Et(v.duration),B={name:Qt(v.target),op:`ui.interaction.${v.name}`,startTime:N,attributes:{[lt]:"auto.ui.browser.metrics"}},F=Zl(v.target);F&&(B.attributes["ui.component_name"]=F),ge(m,N,N+U,B)}}}),M&&n){const D=()=>{O=xt()};addEventListener("click",D,{capture:!0}),addEventListener("keydown",D,{capture:!0,passive:!0})}function $(){const D=yr(L);D&&!Z(D).timestamp&&(ct&&A.log(`[Tracing] Finishing current active span with op: ${Z(D).op}`),D.setAttribute(Do,"cancelled"),D.end())}L.on("startNavigationSpan",(D,m)=>{if(W()!==L)return;if(m?.isRedirect)return ct&&A.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),void P(L,{op:"navigation.redirect",...D},!1);$(),Dt().setPropagationContext({traceId:Ie(),sampleRand:Math.random()});const v=et();v.setPropagationContext({traceId:Ie(),sampleRand:Math.random()}),v.setSDKProcessingMetadata({normalizedRequest:void 0}),P(L,{op:"navigation",...D})}),L.on("startPageLoadSpan",(D,m={})=>{if(W()!==L)return;$();const v=dd(m.sentryTrace||bl("sentry-trace"),m.baggage||bl("baggage")),N=et();N.setPropagationContext(v),N.setSDKProcessingMetadata({normalizedRequest:ba()}),P(L,{op:"pageload",...D})})},afterAllSetup(L){let $=mn();if(C!=="off"&&N_(L,{linkPreviousTrace:C,consistentTraceSampling:R}),q.location){if(x){const D=Bt();$n(L,{name:q.location.pathname,startTime:D?D/1e3:void 0,attributes:{[kt]:"url",[lt]:"auto.pageload.browser"}})}b&&Ss(({to:D,from:m})=>{if(m===void 0&&$?.indexOf(D)!==-1)return void($=void 0);$=void 0;const v=op(D),N=yr(L),U=N&&M&&function(B,F){const j=Z(B),G=cn(),K=j.start_timestamp;return!(G-K>wl||F&&G-F<=wl)}(N,O);Fn(L,{name:v?.pathname||q.location.pathname,attributes:{[kt]:"url",[lt]:"auto.navigation.browser"}},{url:D,isRedirect:U})})}h&&(q.document?q.document.addEventListener("visibilitychange",()=>{const D=It();if(!D)return;const m=At(D);if(q.document.hidden&&m){const v="cancelled",{op:N,status:U}=Z(m);ct&&A.log(`[Tracing] Transaction: ${v} -> since tab moved to the background, op: ${N}`),U||m.setStatus({code:2,message:v}),m.setAttribute("sentry.cancellation_reason","document.hidden"),m.end()}}):ct&&A.warn("[Tracing] Could not set up background tab detection due to lack of global document")),c&&function(D,m,v,N,U){const B=q.document;let F;const j=()=>{const G="ui.action.click",K=yr(D);if(K){const J=Z(K).op;if(["navigation","pageload"].includes(J))return void(ct&&A.warn(`[Tracing] Did not create ${G} span because a pageload or navigation span is in progress.`))}F&&(F.setAttribute(Do,"interactionInterrupted"),F.end(),F=void 0),U.name?F=yc({name:U.name,op:G,attributes:{[kt]:U.source||"url"}},{idleTimeout:m,finalTimeout:v,childSpanTimeout:N}):ct&&A.warn(`[Tracing] Did not create ${G} transaction because _latestRouteName is missing.`)};B&&addEventListener("click",j,{capture:!0})}(L,l,p,f,e),r&&function(){const D=({entries:m})=>{const v=It(),N=v&&At(v);m.forEach(U=>{if(!function(F){return"duration"in F}(U)||!N)return;const B=U.interactionId;if(B!=null&&!xo.has(B)){if(Js.length>10){const F=Js.shift();xo.delete(F)}Js.push(B),xo.set(B,N)}})};Xe("event",D),Xe("first-input",D)}(),Yf(L,{traceFetch:g,traceXHR:S,trackFetchStreamPerformance:w,tracePropagationTargets:L.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:k,enableHTTPTimings:E,onRequestSpanStart:T})}}};function $n(t,e,n){t.emit("startPageLoadSpan",e,n),et().setTransactionName(e.name);const r=yr(t);return r&&t.emit("afterStartPageLoadSpan",r),r}function Fn(t,e,n){const{url:r,isRedirect:o}=n||{};t.emit("beforeStartNavigationSpan",e,{isRedirect:o}),t.emit("startNavigationSpan",e,{isRedirect:o});const s=et();return s.setTransactionName(e.name),r&&!o&&s.setSDKProcessingMetadata({normalizedRequest:{...ba(),url:r}}),yr(t)}function bl(t){return q.document?.querySelector(`meta[name=${t}]`)?.getAttribute("content")||void 0}const Xf="_sentry_idleSpan";function yr(t){return t[Xf]}function Sl(t,e){qt(t,Xf,e)}const wl=.3;function xn(t){return new Promise((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)})}function si(t){return xn(t.getAllKeys())}function F_(t){let e;function n(){return e==null&&(e=function(r,o){const s=indexedDB.open(r);s.onupgradeneeded=()=>s.result.createObjectStore(o);const i=xn(s);return c=>i.then(a=>c(a.transaction(o,"readwrite").objectStore(o)))}(t.dbName||"sentry-offline",t.storeName||"queue")),e}return{push:async r=>{try{const o=await Fo(r);await function(s,i,c){return s(a=>si(a).then(u=>{if(!(u.length>=c))return a.put(i,Math.max(...u,0)+1),xn(a.transaction)}))}(n(),o,t.maxQueueSize||30)}catch{}},unshift:async r=>{try{const o=await Fo(r);await function(s,i,c){return s(a=>si(a).then(u=>{if(!(u.length>=c))return a.put(i,Math.min(...u,0)-1),xn(a.transaction)}))}(n(),o,t.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await function(o){return o(s=>si(s).then(i=>{const c=i[0];if(c!=null)return xn(s.get(c)).then(a=>(s.delete(c),xn(s.transaction).then(()=>a)))}))}(n());if(r)return tm(r)}catch{}}}}const kl=1e6,Oo=String(0),U_="main",as=q.navigator;let Zf="",Qf="",th="",ta=as?.userAgent||"",eh="";const B_=as?.language||as?.languages?.[0]||"",El=as?.userAgentData;var ii;function j_(t){return function(e){return!("thread_metadata"in e)}(t)?function(e){let n,r=0;const o={samples:[],stacks:[],frames:[],thread_metadata:{[Oo]:{name:U_}}},s=e.samples[0];if(!s)return o;const i=s.timestamp,c=Bt(),a=typeof performance.timeOrigin=="number"?performance.timeOrigin:c||0,u=a-(c||a);return e.samples.forEach((d,l)=>{if(d.stackId===void 0)return n===void 0&&(n=r,o.stacks[n]=[],r++),void(o.samples[l]={elapsed_since_start_ns:((d.timestamp+u-i)*kl).toFixed(0),stack_id:n,thread_id:Oo});let p=e.stacks[d.stackId];const f=[];for(;p;){f.push(p.frameId);const g=e.frames[p.frameId];g&&o.frames[p.frameId]===void 0&&(o.frames[p.frameId]={function:g.name,abs_path:typeof g.resourceId=="number"?e.resources[g.resourceId]:void 0,lineno:g.line,colno:g.column}),p=p.parentId===void 0?void 0:e.stacks[p.parentId]}const h={elapsed_since_start_ns:((d.timestamp+u-i)*kl).toFixed(0),stack_id:r,thread_id:Oo};o.stacks[r]=f,o.samples[l]=h,r++}),o}(t):t}function H_(t,e,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 o=function(a){const u=a.contexts?.trace?.trace_id;return typeof u=="string"&&u.length!==32&&ct&&A.log(`[Profiling] Invalid traceId: ${u} on profiled event`),typeof u!="string"?"":u}(r),s=j_(n),i=e||(typeof r.start_timestamp=="number"?1e3*r.start_timestamp:1e3*xt()),c=typeof r.timestamp=="number"?1e3*r.timestamp:1e3*xt();return{event_id:t,timestamp:new Date(i).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||fs,runtime:{name:"javascript",version:q.navigator.userAgent},os:{name:Zf,version:Qf,build_number:ta},device:{locale:B_,model:eh,manufacturer:ta,architecture:th,is_emulator:!1},debug_meta:{images:z_(n.resources)},profile:s,transactions:[{name:r.transaction||"",id:r.event_id||Wt(),trace_id:o,active_thread_id:Oo,relative_start_ns:"0",relative_end_ns:(1e6*(c-i)).toFixed(0)}]}}function nh(t){return Z(t).op==="pageload"}function z_(t){const e=W(),n=e?.getOptions(),r=n?.stackParser;return r?function(o,s){const i=Id(o);if(!i)return[];const c=[];for(const a of s)a&&i[a]&&c.push({type:"sourcemap",code_file:a,debug_id:i[a]});return c}(r,t):[]}typeof(ii=El)=="object"&&ii!==null&&"getHighEntropyValues"in ii&&El.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(t=>{if(Zf=t.platform||"",th=t.architecture||"",eh=t.model||"",Qf=t.platformVersion||"",t.fullVersionList?.length){const e=t.fullVersionList[t.fullVersionList.length-1];ta=`${e.brand} ${e.version}`}}).catch(t=>{});let rh=!1;function xl(t){if(rh)return ct&&A.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!t.isRecording())return ct&&A.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const e=W(),n=e?.getOptions();if(!n)return ct&&A.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;if(!(typeof(o=r)!="number"&&typeof o!="boolean"||typeof o=="number"&&isNaN(o)?(ct&&A.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),0):o===!0||o===!1||!(o<0||o>1)||(ct&&A.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${o}.`),0)))return ct&&A.warn("[Profiling] Discarding profile because of invalid sample rate."),!1;var o;return r?r===!0||Math.random()<r||(ct&&A.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(ct&&A.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1)}function W_(t,e,n,r){return function(o){return o.samples.length<2?(ct&&A.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):!!o.frames.length||(ct&&A.log("[Profiling] Discarding profile because it contains no frames"),!1)}(n)?H_(t,e,n,r):null}const rn=new Map;function q_(t){const e=rn.get(t);return e&&rn.delete(t),e}function Cl(t){let e;nh(t)&&(e=1e3*xt());const n=function(){const c=q.Profiler;if(typeof c!="function")return void(ct&&A.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object."));const a=Math.floor(3e3);try{return new c({sampleInterval:10,maxBufferSize:a})}catch{ct&&(A.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),A.log("[Profiling] Disabling profiling for current user session.")),rh=!0}}();if(!n)return;ct&&A.log(`[Profiling] started profiling span: ${Z(t).description}`);const r=Wt();async function o(){if(t&&n)return n.stop().then(c=>{s&&(q.clearTimeout(s),s=void 0),ct&&A.log(`[Profiling] stopped profiling of span: ${Z(t).description}`),c?function(a,u){if(rn.set(a,u),rn.size>30){const d=rn.keys().next().value;rn.delete(d)}}(r,c):ct&&A.log(`[Profiling] profiler returned null profile for: ${Z(t).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started")}).catch(c=>{ct&&A.log("[Profiling] error while stopping profiler:",c)})}et().setContext("profile",{profile_id:r,start_timestamp:e});let s=q.setTimeout(()=>{ct&&A.log("[Profiling] max profile duration elapsed, stopping profiling for:",Z(t).description),o()},3e4);const i=t.end.bind(t);t.end=function(){return t?(o().then(()=>{i()},()=>{i()}),t):i()}}const V_=()=>({name:"BrowserProfiling",setup(t){const e=It(),n=e&&At(e);n&&nh(n)&&xl(n)&&Cl(n),t.on("spanStart",r=>{r===At(r)&&xl(r)&&Cl(r)}),t.on("beforeEnvelope",r=>{if(!rn.size)return;const o=function(i){const c=[];return pn(i,(a,u)=>{if(u==="transaction")for(let d=1;d<a.length;d++)a[d]?.contexts?.profile?.profile_id&&c.push(a[d])}),c}(r);if(!o.length)return;const s=[];for(const i of o){const c=i?.contexts,a=c?.profile?.profile_id,u=c?.profile?.start_timestamp;if(typeof a!="string"){ct&&A.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!a){ct&&A.log("[Profiling] cannot find profile for a span without a profile context");continue}c?.profile&&delete c.profile;const d=q_(a);if(!d){ct&&A.log(`[Profiling] Could not retrieve profile for span: ${a}`);continue}const l=W_(a,u,d,i);l&&s.push(l)}(function(i,c){if(!c.length)return i;for(const a of c)i[1].push([{type:"profile"},a])})(r,s)})}}),G_=(t={})=>{const e=t.sidecarUrl||"http://localhost:8969/stream";return{name:"SpotlightBrowser",setup:()=>{ct&&A.log("Using Sidecar URL",e)},processEvent:n=>function(r){return!!(r.type==="transaction"&&r.spans&&r.contexts?.trace&&r.contexts.trace.op==="ui.action.click"&&r.spans.some(({description:o})=>o?.includes("#sentry-spotlight")))}(n)?null:n,afterAllSetup:n=>{(function(r,o){const s=Ca("fetch");let i=0;r.on("beforeEnvelope",c=>{i>3?A.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",i):s(o,{method:"POST",body:Fo(c),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(a=>{a.status>=200&&a.status<400&&(i=0)},a=>{i++,A.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",a)})})})(n,e)}}},K_=()=>({name:"LaunchDarkly",processEvent:(t,e,n)=>Fr(t)}),J_=()=>({name:"OpenFeature",processEvent:(t,e,n)=>Fr(t)}),Y_=({featureFlagClientClass:t})=>({name:"Unleash",setupOnce(){zt(t.prototype,"isEnabled",X_)},processEvent:(e,n,r)=>Fr(e)});function X_(t){return function(...e){const n=e[0],r=t.apply(this,e);return typeof n=="string"&&typeof r=="boolean"?(Rn(n,r),On(n,r)):ct&&A.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const Z_=({featureFlagClient:t})=>({name:"Statsig",setup(e){t.on("gate_evaluation",n=>{Rn(n.gate.name,n.gate.value),On(n.gate.name,n.gate.value)})},processEvent:(e,n,r)=>Fr(e)}),Q_=({worker:t})=>({name:"WebWorker",setupOnce:()=>{(Array.isArray(t)?t:[t]).forEach(e=>Tl(e))},addWorker:e=>Tl(e)});function Tl(t){t.addEventListener("message",e=>{var n;Ce(n=e.data)&&n._sentryMessage===!0&&"_sentryDebugIds"in n&&(Ce(n._sentryDebugIds)||n._sentryDebugIds===void 0)&&(e.stopImmediatePropagation(),ct&&A.log("Sentry debugId web worker message received",e.data),q._sentryDebugIds={...e.data._sentryDebugIds,...q._sentryDebugIds})})}function tv(t){const e={...t};return Kd(e,"react"),ua("react",{version:Pt.version}),ly(e)}function ea(t,{componentStack:e},n){if(function(r){const o=r.match(/^([^.]+)/);return o!==null&&parseInt(o[0])>=17}(Pt.version)&&ye(t)&&e){const r=new Error(t.message);r.name=`React ErrorBoundary ${t.name}`,r.stack=e,function(o,s){const i=new WeakSet;(function c(a,u){if(!i.has(a))return a.cause?(i.add(a),c(a.cause,u)):void(a.cause=u)})(o,s)}(t,r)}return Gt(r=>(r.setContext("react",{componentStack:e}),We(t,n)))}const oh="ui.react.render",sh="ui.react.mount";var Il,Ml,ai,Rl,Ol={exports:{}},gt={};function ev(){return Ml||(Ml=1,Ol.exports=function(){if(Il)return gt;Il=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,c=t?Symbol.for("react.context"):60110,a=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,l=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,f=t?Symbol.for("react.memo"):60115,h=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,S=t?Symbol.for("react.fundamental"):60117,w=t?Symbol.for("react.responder"):60118,k=t?Symbol.for("react.scope"):60119;function E(_){if(typeof _=="object"&&_!==null){var x=_.$$typeof;switch(x){case e:switch(_=_.type){case a:case u:case r:case s:case o:case l:return _;default:switch(_=_&&_.$$typeof){case c:case d:case h:case f:case i:return _;default:return x}}case n:return x}}}function y(_){return E(_)===u}return gt.AsyncMode=a,gt.ConcurrentMode=u,gt.ContextConsumer=c,gt.ContextProvider=i,gt.Element=e,gt.ForwardRef=d,gt.Fragment=r,gt.Lazy=h,gt.Memo=f,gt.Portal=n,gt.Profiler=s,gt.StrictMode=o,gt.Suspense=l,gt.isAsyncMode=function(_){return y(_)||E(_)===a},gt.isConcurrentMode=y,gt.isContextConsumer=function(_){return E(_)===c},gt.isContextProvider=function(_){return E(_)===i},gt.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===e},gt.isForwardRef=function(_){return E(_)===d},gt.isFragment=function(_){return E(_)===r},gt.isLazy=function(_){return E(_)===h},gt.isMemo=function(_){return E(_)===f},gt.isPortal=function(_){return E(_)===n},gt.isProfiler=function(_){return E(_)===s},gt.isStrictMode=function(_){return E(_)===o},gt.isSuspense=function(_){return E(_)===l},gt.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===r||_===u||_===s||_===o||_===l||_===p||typeof _=="object"&&_!==null&&(_.$$typeof===h||_.$$typeof===f||_.$$typeof===i||_.$$typeof===c||_.$$typeof===d||_.$$typeof===S||_.$$typeof===w||_.$$typeof===k||_.$$typeof===g)},gt.typeOf=E,gt}()),Ol.exports}var nv=function(){if(Rl)return ai;Rl=1;var t=ev(),e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function s(p){return t.isMemo(p)?r:o[p.$$typeof]||e}o[t.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[t.Memo]=r;var i=Object.defineProperty,c=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,l=Object.prototype;return ai=function p(f,h,g){if(typeof h!="string"){if(l){var S=d(h);S&&S!==l&&p(f,S,g)}var w=c(h);a&&(w=w.concat(a(h)));for(var k=s(f),E=s(h),y=0;y<w.length;++y){var _=w[y];if(!(n[_]||g&&g[_]||E&&E[_]||k&&k[_])){var x=u(h,_);try{i(f,_,x)}catch{}}}}return f},ai}();const ih=zl(nv),rv=Object.freeze(Object.defineProperty({__proto__:null,default:ih},Symbol.toStringTag,{value:"Module"})),cs=ih||rv;class Wa extends Pt.Component{constructor(e){super(e);const{name:n,disabled:r=!1}=this.props;r||(this._mountSpan=Zt({name:`<${n}>`,onlyIfParent:!0,op:sh,attributes:{[lt]:"auto.ui.react.profiler","ui.component_name":n}}))}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:e,includeUpdates:n=!0}){if(n&&this._mountSpan&&e!==this.props.updateProps){const r=Object.keys(e).filter(o=>e[o]!==this.props.updateProps[o]);if(r.length>0){const o=xt();this._updateSpan=fn(this._mountSpan,()=>Zt({name:`<${this.props.name}>`,onlyIfParent:!0,op:"ui.react.update",startTime:o,attributes:{[lt]:"auto.ui.react.profiler","ui.component_name":this.props.name,"ui.react.changed_props":r}}))}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.end(),this._updateSpan=void 0)}componentWillUnmount(){const e=xt(),{name:n,includeRender:r=!0}=this.props;if(this._mountSpan&&r){const o=Z(this._mountSpan).timestamp;fn(this._mountSpan,()=>{const s=Zt({onlyIfParent:!0,name:`<${n}>`,op:oh,startTime:o,attributes:{[lt]:"auto.ui.react.profiler","ui.component_name":n}});s&&s.end(e)})}}render(){return this.props.children}}function ov(t,e){const n=e?.name||t.displayName||t.name||"unknown",r=o=>Pt.createElement(Wa,{...e,name:n,updateProps:o},Pt.createElement(t,{...o}));return r.displayName=`profiler(${n})`,cs(r,t),r}Object.assign(Wa,{defaultProps:{disabled:!1,includeRender:!0,includeUpdates:!0}});const Wr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ci={componentStack:null,error:null,eventId:null};class Al extends Pt.Component{constructor(e){super(e),this.state=ci,this._openFallbackReportDialog=!0;const n=W();n&&e.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=n.on("afterSendEvent",r=>{!r.type&&this._lastEventId&&r.event_id===this._lastEventId&&ji({...e.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(e,n){const{componentStack:r}=n,{beforeCapture:o,onError:s,showDialog:i,dialogOptions:c}=this.props;Gt(a=>{o&&o(a,e,r);const u=this.props.handled!=null?this.props.handled:!!this.props.fallback,d=ea(e,n,{mechanism:{handled:u}});s&&s(e,r,d),i&&(this._lastEventId=d,this._openFallbackReportDialog&&ji({...c,eventId:d})),this.setState({error:e,componentStack:r,eventId:d})})}componentDidMount(){const{onMount:e}=this.props;e&&e()}componentWillUnmount(){const{error:e,componentStack:n,eventId:r}=this.state,{onUnmount:o}=this.props;o&&(this.state===ci?o(null,null,null):o(e,n,r)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){const{onReset:e}=this.props,{error:n,componentStack:r,eventId:o}=this.state;e&&e(n,r,o),this.setState(ci)}render(){const{fallback:e,children:n}=this.props,r=this.state;if(r.componentStack===null)return typeof n=="function"?n():n;const o=typeof e=="function"?Pt.createElement(e,{error:r.error,componentStack:r.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:r.eventId}):e;return Pt.isValidElement(o)?o:(e&&Wr&&A.warn("fallback did not produce a valid ReactElement"),null)}}const sv={attachReduxState:!0,actionTransformer:t=>t,stateTransformer:t=>t||null};function Ll(t,e,n,r){let o=e.pathname;n({location:e,routes:t},(s,i,c)=>{if(s||!c)return r(o);const a=function(u){if(!Array.isArray(u)||u.length===0)return"";const d=u.filter(p=>!!p.path);let l=-1;for(let p=d.length-1;p>=0;p--)if(d[p].path?.startsWith("/")){l=p;break}return d.slice(l).reduce((p,{path:f})=>`${p}${p==="/"||p===""?f:`/${f}`}`,"")}(c.routes||[]);return a.length===0||a==="/*"?r(o):(o=a,r(o,"route"))})}function Pl(t){if(!t)return{};const e={};return Object.entries(t.params).forEach(([n,r])=>{e[`url.path.params.${n}`]=r,e[`url.path.parameter.${n}`]=r,e[`params.${n}`]=r}),e}function Dl(t,e,n,r,o,s=[],i){function c(a){if(s.length===0||!i)return[a,"url"];const u=ah(s,a,i);for(const d of u)if(d.match.isExact)return[d.match.path,"route"];return[a,"url"]}if(e){const a=r.location?r.location.pathname:q.location?q.location.pathname:void 0;if(a){const[u,d]=c(a);$n(t,{name:u,attributes:{[Ot]:"pageload",[lt]:`auto.pageload.react.${o}`,[kt]:d}})}}n&&r.listen&&r.listen((a,u)=>{if(u&&(u==="PUSH"||u==="POP")){const[d,l]=c(a.pathname);Fn(t,{name:d,attributes:{[Ot]:"navigation",[lt]:`auto.navigation.react.${o}`,[kt]:l}})}})}function ah(t,e,n,r=[]){return t.some(o=>{const s=o.path?n(e,o):r.length?r[r.length-1].match:function(i){return{path:"/",url:"/",params:{},isExact:i==="/"}}(e);return s&&(r.push({route:o,match:s}),o.routes&&ah(o.routes,e,n,r)),!!s}),r}let $e,Fe,Ue,Ao,de,Mn=!1;const ch=new WeakSet,ue=new Set;function Nl(t,e){return $e&&Fe&&Ue&&de?function(n,r){Es(n);const o=t(n,r),s=r?.basename,i=Cs();return o.state.historyAction==="POP"&&i&&xs(i,o.state.location,n,void 0,s,Array.from(ue)),o.subscribe(c=>{c.historyAction!=="PUSH"&&c.historyAction!=="POP"||(c.navigation.state!=="idle"?requestAnimationFrame(()=>{Mr({location:c.location,routes:n,navigationType:c.historyAction,version:e,basename:s,allRoutes:Array.from(ue)})}):Mr({location:c.location,routes:n,navigationType:c.historyAction,version:e,basename:s,allRoutes:Array.from(ue)}))}),o}:(Wr&&A.warn(`reactRouterV${e}Instrumentation was unable to wrap the \`createRouter\` function because of one or more missing parameters.`),t)}function $l(t,e){return $e&&Fe&&Ue&&de?function(n,r){Es(n);const o=t(n,r),s=r?.basename,i=Cs();let c;const a=r?.initialEntries,u=r?.initialIndex,d=a&&a.length===1,l=u!==void 0&&a&&a[u];c=d?a[0]:l?a[u]:void 0;const p=c?typeof c=="string"?{pathname:c}:c:o.state.location;return o.state.historyAction==="POP"&&i&&xs(i,p,n,void 0,s,Array.from(ue)),o.subscribe(f=>{const h=f.location;f.historyAction!=="PUSH"&&f.historyAction!=="POP"||Mr({location:h,routes:n,navigationType:f.historyAction,version:e,basename:s,allRoutes:Array.from(ue)})}),o}:(Wr&&A.warn(`reactRouterV${e}Instrumentation was unable to wrap the \`createMemoryRouter\` function because of one or more missing parameters.`),t)}function Fl(t,e){const n=En({...t,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:r,useLocation:o,useNavigationType:s,createRoutesFromChildren:i,matchRoutes:c,stripBasename:a,instrumentPageLoad:u=!0,instrumentNavigation:d=!0}=t;return{...n,setup(l){n.setup(l),$e=r,Fe=o,Ue=s,de=c,Ao=i,Mn=a||!1},afterAllSetup(l){n.afterAllSetup(l);const p=q.location?.pathname;u&&p&&$n(l,{name:p,attributes:{[kt]:"url",[Ot]:"pageload",[lt]:`auto.pageload.react.reactrouter_v${e}`}}),d&&ch.add(l)}}}function Ul(t,e){if(!($e&&Fe&&Ue&&de))return Wr&&A.warn("reactRouterV6Instrumentation was unable to wrap `useRoutes` because of one or more missing parameters."),t;const n=r=>{const o=Pt.useRef(!0),{routes:s,locationArg:i}=r,c=t(s,i),a=Fe(),u=Ue(),d=typeof i=="string"||i?.pathname?i:a;return $e(()=>{const l=typeof d=="string"?{pathname:d}:d;o.current?(Es(s),xs(Cs(),l,s,void 0,void 0,Array.from(ue)),o.current=!1):Mr({location:l,routes:s,navigationType:u,version:e,allRoutes:Array.from(ue)})},[u,d]),c};return(r,o)=>Pt.createElement(n,{routes:r,locationArg:o})}function Mr(t){const{location:e,routes:n,navigationType:r,version:o,matches:s,basename:i,allRoutes:c}=t,a=Array.isArray(s)?s:de(n,e,i),u=W();if(u&&ch.has(u)&&(r==="PUSH"||r==="POP")&&a){let d,l="url";const p=lh(e,c||n);p&&(d=Rr(qa(c||n,e)),l="route"),p&&d||([d,l]=ph(n,e,a,i));const f=It();f&&Z(f).op==="navigation"?(f?.updateName(d),f?.setAttribute(kt,l)):Fn(u,{name:d,attributes:{[kt]:l,[Ot]:"navigation",[lt]:`auto.navigation.react.reactrouter_v${o}`}})}}function us(t,e){if(!e||e==="/"||!t.toLowerCase().startsWith(e.toLowerCase()))return t;const n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?t:t.slice(n)||"/"}function iv(t,e,n){const r=t||Mn?us(e,n):e;return[r[r.length-1]==="/"||r.slice(-2)==="/*"?r.slice(0,-1):r,"route"]}function uh(t){return t.endsWith("*")}function Bl(t,e){return uh(t)&&!!e.route.children?.length||!1}function lh(t,e){const n=de(e,t);if(n){for(const o of n)if(!(r=o.route).children&&r.element&&r.path?.endsWith("/*")&&cv(o))return!0}var r;return!1}function Es(t){t.forEach(e=>{dh(e).forEach(n=>{ue.add(n)})})}function dh(t,e=new Set){return e.has(t)||(e.add(t),t.children&&!t.index&&t.children.forEach(n=>{dh(n,e).forEach(r=>{e.add(r)})})),e}function av(t){return(e=t.route.path||"")[e.length-1]==="*"?e.slice(0,-1):e;var e}function cv(t){return t.params["*"]||""}function Un(t){return t[t.length-1]==="/"?t.slice(0,-1):t}function Rr(t){return t[0]==="/"?t:`/${t}`}function qa(t,e){const n=de(t,e);if(!n||n.length===0)return"";for(const r of n)if(r.route.path&&r.route.path!=="*"){const o=av(r),s=us(e.pathname,Rr(r.pathnameBase));return e.pathname===s?Un(s):Un(Un(o||"")+Rr(qa(t.filter(i=>i!==r.route),{pathname:s})))}return""}function ph(t,e,n,r=""){if(!t||t.length===0)return[Mn?us(e.pathname,r):e.pathname,"url"];let o="";if(n)for(const s of n){const i=s.route;if(i){if(i.index)return iv(o,s.pathname,r);const c=i.path;if(c&&!Bl(c,s)){const a=c[0]==="/"||o[o.length-1]==="/"?c:`/${c}`;if(o=Un(o)+Rr(a),Un(e.pathname)===Un(r+s.pathname))return Hl(o)===Hl(s.pathname)||uh(o)?(Bl(o,s)&&(o=o.slice(0,-1)),[(Mn?"":r)+o,"route"]):[(Mn?"":r)+a,"route"]}}}return[Mn?us(e.pathname,r):e.pathname||"/","url"]}function xs(t,e,n,r,o,s){const i=Array.isArray(r)?r:de(s||n,e,o);if(i){let c,a="url";const u=lh(e,s||n);u&&(c=Rr(qa(s||n,e)),a="route"),u&&c||([c,a]=ph(n,e,i,o)),et().setTransactionName(c||"/"),t&&(t.updateName(c),t.setAttribute(kt,a))}}function jl(t,e){if(!($e&&Fe&&Ue&&Ao&&de))return Wr&&A.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.
|
|
499
|
+
useEffect: ${$e}. useLocation: ${Fe}. useNavigationType: ${Ue}.
|
|
500
|
+
createRoutesFromChildren: ${Ao}. matchRoutes: ${de}.`),t;const n=r=>{const o=Pt.useRef(!0),s=Fe(),i=Ue();return $e(()=>{const c=Ao(r.children);o.current?(Es(c),xs(Cs(),s,c,void 0,void 0,Array.from(ue)),o.current=!1):Mr({location:s,routes:c,navigationType:i,version:e,allRoutes:Array.from(ue)})},[s,i]),Pt.createElement(t,{...r})};return cs(n,t),n}function Cs(){const t=It(),e=t?At(t):void 0;if(!e)return;const n=Z(e).op;return n==="navigation"||n==="pageload"?e:void 0}function Hl(t){return t.split(/\\?\//).filter(e=>e.length>0&&e!==",").length}const pv=Object.freeze(Object.defineProperty({__proto__:null,BrowserClient:Ip,ErrorBoundary:Al,OpenFeatureIntegrationHook:class{after(t,e){Rn(e.flagKey,e.value),On(e.flagKey,e.value)}error(t,e,n){Rn(t.flagKey,t.defaultValue),On(t.flagKey,t.defaultValue)}},Profiler:Wa,SDK_VERSION:Se,SEMANTIC_ATTRIBUTE_SENTRY_OP:Ot,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:lt,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:ps,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:kt,Scope:se,WINDOW:q,addBreadcrumb:ee,addEventProcessor:Ad,addIntegration:wi,breadcrumbsIntegration:Yp,browserApiErrorsIntegration:Xp,browserProfilingIntegration:V_,browserSessionIntegration:Zp,browserTracingIntegration:En,buildLaunchDarklyFlagUsedHandler:function(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(t,e,n)=>{Rn(t,e.value),On(t,e.value)}}},captureConsoleIntegration:km,captureEvent:kr,captureException:We,captureFeedback:ip,captureMessage:Ho,captureReactException:ea,captureSession:Si,chromeStackLineParser:qp,close:async function(t){const e=W();return e?e.close(t):(H&&A.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))},consoleLoggingIntegration:Wm,contextLinesIntegration:my,continueTrace:(t,e)=>{const n=je(Ee());if(n.continueTrace)return n.continueTrace(t,e);const{sentryTrace:r,baggage:o}=t;return Gt(s=>{const i=dd(r,o);return s.setPropagationContext(i),e()})},createReduxEnhancer:function(t){const e={...sv,...t};return n=>(r,o)=>{function s(c){return(a,u)=>{const d=c(a,u),l=et(),p=e.actionTransformer(u);p!=null&&ee({category:"redux.action",data:p,type:"info"});const f=e.stateTransformer(d);if(f!=null){const g=W(),S=g?.getOptions(),w={state:{type:"redux",value:f}};qt(w,"__sentry_override_normalization_depth__",3+(S?.normalizeDepth||3)),l.setContext("state",w)}else l.setContext("state",null);const{configureScopeWithState:h}=e;return typeof h=="function"&&h(l,d),d}}e.attachReduxState&&br().addEventProcessor((c,a)=>{try{c.type===void 0&&c.contexts.state.state.type==="redux"&&(a.attachments=[...a.attachments||[],{filename:"redux_state.json",data:JSON.stringify(c.contexts.state.state.value)}])}catch{}return c});const i=n(s(r),o);return i.replaceReducer=new Proxy(i.replaceReducer,{apply:function(c,a,u){c.apply(a,[s(u[0])])}}),i}},createTransport:qd,createUserFeedbackEnvelope:function(t,{metadata:e,tunnel:n,dsn:r}){const o={event_id:t.event_id,sent_at:new Date().toISOString(),...e?.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:dn(r)}};return we(o,[function(i){return[{type:"user_report"},i]}(t)])},dedupeIntegration:tp,defaultRequestInstrumentationOptions:za,defaultStackLineParsers:Gp,defaultStackParser:Kp,diagnoseSdkConnectivity:async function(){const t=W();if(!t)return"no-client-active";if(!t.getDsn())return"no-dsn-configured";try{await 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"}},endSession:la,eventFiltersIntegration:Yd,eventFromException:Cp,eventFromMessage:Tp,exceptionFromError:gs,extraErrorDataIntegration:Em,featureFlagsIntegration:Bm,feedbackAsyncIntegration:gg,feedbackIntegration:hu,feedbackSyncIntegration:hu,flush:async function(t){const e=W();return e?e.flush(t):(H&&A.warn("Cannot flush events. No client defined."),Promise.resolve(!1))},forceLoad:function(){},functionToStringIntegration:Jd,geckoStackLineParser:Vp,getActiveSpan:It,getClient:W,getCurrentScope:et,getDefaultIntegrations:nf,getFeedback:function(){return W()?.getIntegrationByName("Feedback")},getGlobalScope:br,getIsolationScope:Dt,getReplay:function(){return W()?.getIntegrationByName("Replay")},getRootSpan:At,getSpanDescendants:lr,getSpanStatusFromHttpCode:od,getTraceData:pa,globalHandlersIntegration:Qp,graphqlClientIntegration:gy,httpClientIntegration:fy,httpContextIntegration:tf,inboundFiltersIntegration:Xd,init:tv,instrumentOutgoingRequests:Yf,instrumentSupabaseClient:np,isEnabled:Od,isInitialized:function(){return!!W()},lastEventId:Rd,launchDarklyIntegration:K_,lazyLoadIntegration:Ep,linkedErrorsIntegration:ef,logger:yg,makeBrowserOfflineTransport:function(t=Bi){return function(e){return n=>{const r=e({...n,createStore:F_});return q.addEventListener("online",async o=>{await r.flush()}),r}}(fm(t))},makeFetchTransport:Bi,makeMultiplexedTransport:function(t,e){return n=>{const r=t(n),o=new Map;function s(i,c){const a=c?`${i}:${c}`:i;let u=o.get(a);if(!u){const d=_d(i);if(!d)return;const l=Dd(d,n.tunnel);u=c?function(p,f){return h=>{const g=p(h);return{...g,send:async S=>{const w=Tc(S,["event","transaction","profile","replay_event"]);return w&&(w.release=f),g.send(S)}}}}(t,c)({...n,url:l}):t({...n,url:l}),o.set(a,u)}return[i,u]}return{send:async function(i){const c=e({envelope:i,getEvent:function(u){return Tc(i,u?.length?u:["event"])}}).map(u=>typeof u=="string"?s(u,void 0):s(u.dsn,u.release)).filter(u=>!!u),a=c.length?c:[["",r]];return(await Promise.all(a.map(([u,d])=>d.send(function(l,p){return we(p?{...l[0],dsn:p}:l[0],l[1])}(i,u)))))[0]},flush:async function(i){const c=[...o.values(),r];return(await Promise.all(c.map(a=>a.flush(i)))).every(a=>a)}}}},moduleMetadataIntegration:Sm,onLoad:function(t){t()},openFeatureIntegration:J_,opera10StackLineParser:ry,opera11StackLineParser:sy,parameterize:Gd,reactErrorHandler:function(t){return(e,n)=>{const r=ea(e,n);t&&t(e,n,r)}},reactRouterV3BrowserTracingIntegration:function(t){const e=En({...t,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,match:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=t;return{...e,afterAllSetup(c){e.afterAllSetup(c),s&&q.location&&Ll(r,q.location,o,(a,u="url")=>{$n(c,{name:a,attributes:{[Ot]:"pageload",[lt]:"auto.pageload.react.reactrouter_v3",[kt]:u}})}),i&&n.listen&&n.listen(a=>{a.action!=="PUSH"&&a.action!=="POP"||Ll(r,a,o,(u,d="url")=>{Fn(c,{name:u,attributes:{[Ot]:"navigation",[lt]:"auto.navigation.react.reactrouter_v3",[kt]:d}})})})}}},reactRouterV4BrowserTracingIntegration:function(t){const e=En({...t,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=t;return{...e,afterAllSetup(c){e.afterAllSetup(c),Dl(c,s,i,n,"reactrouter_v4",r,o)}}},reactRouterV5BrowserTracingIntegration:function(t){const e=En({...t,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=t;return{...e,afterAllSetup(c){e.afterAllSetup(c),Dl(c,s,i,n,"reactrouter_v5",r,o)}}},reactRouterV6BrowserTracingIntegration:function(t){return Fl(t,"6")},reactRouterV7BrowserTracingIntegration:function(t){return Fl(t,"7")},registerSpanErrorInstrumentation:yd,registerWebWorker:function({self:t}){t.postMessage({_sentryMessage:!0,_sentryDebugIds:t._sentryDebugIds??void 0})},replayCanvasIntegration:P_,replayIntegration:I_,reportingObserverIntegration:py,rewriteFramesIntegration:Tm,sendFeedback:fp,setContext:ua,setCurrentClient:Bd,setExtra:function(t,e){Dt().setExtra(t,e)},setExtras:function(t){Dt().setExtras(t)},setHttpStatus:Sr,setMeasurement:xd,setTag:am,setTags:function(t){Dt().setTags(t)},setUser:function(t){Dt().setUser(t)},showReportDialog:ji,spanToBaggageHeader:function(t){return ud(ie(t))},spanToJSON:Z,spanToTraceHeader:hd,spotlightBrowserIntegration:G_,startBrowserTracingNavigationSpan:Fn,startBrowserTracingPageLoadSpan:$n,startInactiveSpan:Zt,startNewTrace:function(t){return Gt(e=>(e.setPropagationContext({traceId:Ie(),sampleRand:Math.random()}),H&&A.log(`Starting a new trace with id ${e.getPropagationContext().traceId}`),fn(null,t)))},startSession:bi,startSpan:hs,startSpanManual:function(t,e){const n=wr();if(n.startSpanManual)return n.startSpanManual(t,e);const r=aa(t),{forceTransaction:o,parentSpan:s,scope:i}=t,c=i?.clone();return Gt(c,()=>Td(s)(()=>{const a=et(),u=ca(a,s),d=t.onlyIfParent&&!u?new Me:ia({parentSpan:u,spanArguments:r,forceTransaction:o,scope:a});return un(a,d),Cd(()=>e(d,()=>d.end()),()=>{const{status:l}=Z(d);!d.isRecording()||l&&l!=="ok"||d.setStatus({code:2,message:"internal_error"})})}))},statsigIntegration:Z_,supabaseIntegration:Pm,suppressTracing:function(t){const e=wr();return e.suppressTracing?e.suppressTracing(t):Gt(n=>{n.setSDKProcessingMetadata({[Uo]:!0});const r=t();return n.setSDKProcessingMetadata({[Uo]:void 0}),r})},tanstackRouterBrowserTracingIntegration:function(t,e={}){const n=t,r=En({...e,instrumentNavigation:!1,instrumentPageLoad:!1}),{instrumentPageLoad:o=!0,instrumentNavigation:s=!0}=e;return{...r,afterAllSetup(i){r.afterAllSetup(i);const c=q.location;if(o&&c){const a=n.matchRoutes(c.pathname,n.options.parseSearch(c.search),{preload:!1,throwOnError:!1}),u=a[a.length-1];$n(i,{name:u?u.routeId:c.pathname,attributes:{[Ot]:"pageload",[lt]:"auto.pageload.react.tanstack_router",[kt]:u?"route":"url",...Pl(u)}})}s&&n.subscribe("onBeforeNavigate",a=>{if(a.toLocation.state===a.fromLocation?.state)return;const u=n.matchRoutes(a.toLocation.pathname,a.toLocation.search,{preload:!1,throwOnError:!1}),d=u[u.length-1],l=q.location,p=Fn(i,{name:d?d.routeId:l.pathname,attributes:{[Ot]:"navigation",[lt]:"auto.navigation.react.tanstack_router",[kt]:d?"route":"url"}}),f=n.subscribe("onResolved",h=>{if(f(),p){const g=n.matchRoutes(h.toLocation.pathname,h.toLocation.search,{preload:!1,throwOnError:!1}),S=g[g.length-1];S&&(p.updateName(S.routeId),p.setAttribute(kt,"route"),p.setAttributes(Pl(S)))}})})}}},thirdPartyErrorFilterIntegration:Um,unleashIntegration:Y_,updateSpanName:function(t,e){t.updateName(e),t.setAttributes({[kt]:"custom",[fi]:e})},useProfiler:function(t,e={disabled:!1,hasRenderSpan:!0}){const[n]=Pt.useState(()=>{if(!e?.disabled)return Zt({name:`<${t}>`,onlyIfParent:!0,op:sh,attributes:{[lt]:"auto.ui.react.profiler","ui.component_name":t}})});Pt.useEffect(()=>(n&&n.end(),()=>{if(n&&e.hasRenderSpan){const r=Z(n).timestamp,o=xt(),s=Zt({name:`<${t}>`,onlyIfParent:!0,op:oh,startTime:r,attributes:{[lt]:"auto.ui.react.profiler","ui.component_name":t}});s&&s.end(o)}}),[])},webWorkerIntegration:Q_,winjsStackLineParser:ey,withActiveSpan:fn,withErrorBoundary:function(t,e){const n=t.displayName||t.name||"unknown",r=o=>Pt.createElement(Al,{...e},Pt.createElement(t,{...o}));return r.displayName=`errorBoundary(${n})`,cs(r,t),r},withIsolationScope:function(...t){const e=je(Ee());if(t.length===2){const[n,r]=t;return n?e.withSetIsolationScope(n,r):e.withIsolationScope(r)}return e.withIsolationScope(t[0])},withProfiler:ov,withScope:Gt,withSentryReactRouterV6Routing:function(t){return jl(t,"6")},withSentryReactRouterV7Routing:function(t){return jl(t,"7")},withSentryRouting:function(t){const e=t.displayName||t.name,n=r=>{if(r?.computedMatch?.isExact){const o=r.computedMatch.path,s=function(){const i=It(),c=i&&At(i);if(!c)return;const a=Z(c).op;return a==="navigation"||a==="pageload"?c:void 0}();et().setTransactionName(o),s&&(s.updateName(o),s.setAttribute(kt,"route"))}return Pt.createElement(t,{...r})};return n.displayName=`sentryRoute(${e})`,cs(n,t),n},wrapCreateBrowserRouterV6:function(t){return Nl(t,"6")},wrapCreateBrowserRouterV7:function(t){return Nl(t,"7")},wrapCreateMemoryRouterV6:function(t){return $l(t,"6")},wrapCreateMemoryRouterV7:function(t){return $l(t,"7")},wrapUseRoutesV6:function(t){return Ul(t,"6")},wrapUseRoutesV7:function(t){return Ul(t,"7")},zodErrorsIntegration:Fm},Symbol.toStringTag,{value:"Module"}));export{dv as R,pv as S,Pt as a,$h as b,lc as c,lv as d,uv as e,At as f,zl as g,ih as h,ee as i,We as j,tv as k,En as l,V_ as m,I_ as n,am as o,Kc as p,kr as q,Nh as r,Z as s,ov as w};
|