import{r as L,b as vi,a1 as Ei,F as O,j as m,aC as T,aD as v,aE as Si,z as bi,c as Ti,K as Ge,i as xi,U as Ri}from"./vendor-CT-JknSv.chunk.js";import{i as q,l as re,aE as Ci,aF as wi,c6 as gr,cI as Di,cy as ki,bO as Ni,cv as Ui,G as Bi,aD as bn,k as Tn,aA as Ii,y as Oi,bH as Yi,j as ye,r as he,cm as xn,a0 as Rn,aN as $i,Y as Cn,cG as Gi}from"./index-DDZqnj79.js";import{E as wn}from"./ExternalRedirect-BqsmRQpQ.chunk.js";const Pi=5e3,ji=Math.floor(Math.random()*100);function fu(e,{enabled:t=!0,condition:n,onFinish:r}){const[i,s]=L.useState(!1),[a,o]=L.useState(0),c=vi(),l=async()=>{await c.invalidateQueries(e);const u=c.getQueryData(e);if(n(u)===!0){r&&r(),s(!0);return}o(a+1)};L.useEffect(()=>{let u;if(t&&!i){const p=a*200,h=Ei(p+a*ji,0,Pi);u=setTimeout(()=>{l()},h)}return()=>clearTimeout(u)},[t,i,a])}function H(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Li({title:e,period:t,provider:n,...r}){let i;return t==="monthly"?i=" Monthly":t==="yearly"?i=" Yearly":t==="unlimited"&&(i=" Lifetime"),(n==="curiositystream"||n==="nebula-invite"||n==="stripe-gift"||i&&e.endsWith(i))&&(i=""),O("div",{css:{fontSize:"17px",lineHeight:"22px",color:q.label},...r,children:[m("span",{css:{fontWeight:re.weight.semibold},children:e}),i&&m("span",{css:{fontWeight:re.weight.book},children:i})]})}function Dn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function kn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Dn(Object(n),!0).forEach(function(r){yr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ot(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ot=function(t){return typeof t}:ot=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ot(e)}function yr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vr(e,t){return Ai(e)||Mi(e,t)||Hi(e,t)||qi()}function Ai(e){if(Array.isArray(e))return e}function Mi(e,t){var n=e&&(typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"]);if(n!=null){var r=[],i=!0,s=!1,a,o;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(c){s=!0,o=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw o}}return r}}function Hi(e,t){if(e){if(typeof e=="string")return Nn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nn(e,t)}}function Nn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qi(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var j=function(t,n,r){var i=!!r,s=v.useRef(r);v.useEffect(function(){s.current=r},[r]),v.useEffect(function(){if(!i||!t)return function(){};var a=function(){s.current&&s.current.apply(s,arguments)};return t.on(n,a),function(){t.off(n,a)}},[i,n,t,s])},It=function(t){var n=v.useRef(t);return v.useEffect(function(){n.current=t},[t]),n.current},Re=function(t){return t!==null&&ot(t)==="object"},Fi=function(t){return Re(t)&&typeof t.then=="function"},zi=function(t){return Re(t)&&typeof t.elements=="function"&&typeof t.createToken=="function"&&typeof t.createPaymentMethod=="function"&&typeof t.confirmCardPayment=="function"},Un="[object Object]",Wi=function e(t,n){if(!Re(t)||!Re(n))return t===n;var r=Array.isArray(t),i=Array.isArray(n);if(r!==i)return!1;var s=Object.prototype.toString.call(t)===Un,a=Object.prototype.toString.call(n)===Un;if(s!==a)return!1;if(!s&&!r)return t===n;var o=Object.keys(t),c=Object.keys(n);if(o.length!==c.length)return!1;for(var l={},u=0;u<o.length;u+=1)l[o[u]]=!0;for(var p=0;p<c.length;p+=1)l[c[p]]=!0;var h=Object.keys(l);if(h.length!==o.length)return!1;var _=t,f=n,g=function(C){return e(_[C],f[C])};return h.every(g)},Er=function(t,n,r){return Re(t)?Object.keys(t).reduce(function(i,s){var a=!Re(n)||!Wi(t[s],n[s]);return r.includes(s)?(a&&console.warn("Unsupported prop change: options.".concat(s," is not a mutable property.")),i):a?kn(kn({},i||{}),{},yr({},s,t[s])):i},null):null},Sr="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",Bn=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Sr;if(t===null||zi(t))return t;throw new Error(n)},Vi=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Sr;if(Fi(t))return{tag:"async",stripePromise:Promise.resolve(t).then(function(i){return Bn(i,n)})};var r=Bn(t,n);return r===null?{tag:"empty"}:{tag:"sync",stripe:r}},Ji=function(t){!t||!t._registerWrapper||!t.registerAppInfo||(t._registerWrapper({name:"react-stripe-js",version:"2.7.0"}),t.registerAppInfo({name:"react-stripe-js",version:"2.7.0",url:"https://stripe.com/docs/stripe-js/react"}))},_t=v.createContext(null);_t.displayName="ElementsContext";var br=function(t,n){if(!t)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(n," in an <Elements> provider."));return t},Ki=function(t){var n=t.stripe,r=t.options,i=t.children,s=v.useMemo(function(){return Vi(n)},[n]),a=v.useState(function(){return{stripe:s.tag==="sync"?s.stripe:null,elements:s.tag==="sync"?s.stripe.elements(r):null}}),o=vr(a,2),c=o[0],l=o[1];v.useEffect(function(){var h=!0,_=function(g){l(function(y){return y.stripe?y:{stripe:g,elements:g.elements(r)}})};return s.tag==="async"&&!c.stripe?s.stripePromise.then(function(f){f&&h&&_(f)}):s.tag==="sync"&&!c.stripe&&_(s.stripe),function(){h=!1}},[s,c,r]);var u=It(n);v.useEffect(function(){u!==null&&u!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[u,n]);var p=It(r);return v.useEffect(function(){if(c.elements){var h=Er(r,p,["clientSecret","fonts"]);h&&c.elements.update(h)}},[r,p,c.elements]),v.useEffect(function(){Ji(c.stripe)},[c.stripe]),v.createElement(_t.Provider,{value:c},i)};Ki.propTypes={stripe:T.any,options:T.object};var Xi=function(t){var n=v.useContext(_t);return br(n,t)},mu=function(){var t=Xi("calls useElements()"),n=t.elements;return n};T.func.isRequired;var Tr=v.createContext(null);Tr.displayName="CustomCheckoutSdkContext";var Qi=function(t,n){if(!t)throw new Error("Could not find CustomCheckoutProvider context; You need to wrap the part of your app that ".concat(n," in an <CustomCheckoutProvider> provider."));return t},Zi=v.createContext(null);Zi.displayName="CustomCheckoutContext";T.any,T.shape({clientSecret:T.string.isRequired,elementsOptions:T.object}).isRequired;var Ot=function(t){var n=v.useContext(Tr),r=v.useContext(_t);if(n&&r)throw new Error("You cannot wrap the part of your app that ".concat(t," in both <CustomCheckoutProvider> and <Elements> providers."));return n?Qi(n,t):br(r,t)},es=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},N=function(t,n){var r="".concat(es(t),"Element"),i=function(c){var l=c.id,u=c.className,p=c.options,h=p===void 0?{}:p,_=c.onBlur,f=c.onFocus,g=c.onReady,y=c.onChange,C=c.onEscape,R=c.onClick,G=c.onLoadError,z=c.onLoaderStart,te=c.onNetworksChange,pe=c.onConfirm,me=c.onCancel,b=c.onShippingAddressChange,A=c.onShippingRateChange,P=Ot("mounts <".concat(r,">")),M="elements"in P?P.elements:null,K="customCheckoutSdk"in P?P.customCheckoutSdk:null,de=v.useState(null),ge=vr(de,2),Y=ge[0],yi=ge[1],se=v.useRef(null),Rt=v.useRef(null);j(Y,"blur",_),j(Y,"focus",f),j(Y,"escape",C),j(Y,"click",R),j(Y,"loaderror",G),j(Y,"loaderstart",z),j(Y,"networkschange",te),j(Y,"confirm",pe),j(Y,"cancel",me),j(Y,"shippingaddresschange",b),j(Y,"shippingratechange",A),j(Y,"change",y);var Ct;g&&(t==="expressCheckout"?Ct=g:Ct=function(){g(Y)}),j(Y,"ready",Ct),v.useLayoutEffect(function(){if(se.current===null&&Rt.current!==null&&(M||K)){var W=null;K?W=K.createElement(t,h):M&&(W=M.create(t,h)),se.current=W,yi(W),W&&W.mount(Rt.current)}},[M,K,h]);var Sn=It(h);return v.useEffect(function(){if(se.current){var W=Er(h,Sn,["paymentRequest"]);W&&se.current.update(W)}},[h,Sn]),v.useLayoutEffect(function(){return function(){if(se.current&&typeof se.current.destroy=="function")try{se.current.destroy(),se.current=null}catch{}}},[]),v.createElement("div",{id:l,className:u,ref:Rt})},s=function(c){Ot("mounts <".concat(r,">"));var l=c.id,u=c.className;return v.createElement("div",{id:l,className:u})},a=n?s:i;return a.propTypes={id:T.string,className:T.string,onChange:T.func,onBlur:T.func,onFocus:T.func,onReady:T.func,onEscape:T.func,onClick:T.func,onLoadError:T.func,onLoaderStart:T.func,onNetworksChange:T.func,onConfirm:T.func,onCancel:T.func,onShippingAddressChange:T.func,onShippingRateChange:T.func,options:T.object},a.displayName=r,a.__elementType=t,a},U=typeof window>"u",ts=v.createContext(null);ts.displayName="EmbeddedCheckoutProviderContext";var gu=function(){var t=Ot("calls useStripe()"),n=t.stripe;return n};N("auBankAccount",U);N("card",U);N("cardNumber",U);N("cardExpiry",U);N("cardCvc",U);N("fpxBank",U);N("iban",U);N("idealBank",U);N("p24Bank",U);N("epsBank",U);var yu=N("payment",U);N("expressCheckout",U);N("paymentRequestButton",U);N("linkAuthentication",U);var vu=N("address",U);N("shippingAddress",U);N("paymentMethodMessaging",U);N("affirmMessage",U);N("afterpayClearpayMessage",U);var xr="https://js.stripe.com/v3",ns=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,In="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",rs=function(){for(var t=document.querySelectorAll('script[src^="'.concat(xr,'"]')),n=0;n<t.length;n++){var r=t[n];if(ns.test(r.src))return r}return null},On=function(t){var n="",r=document.createElement("script");r.src="".concat(xr).concat(n);var i=document.head||document.body;if(!i)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return i.appendChild(r),r},is=function(t,n){!t||!t._registerWrapper||t._registerWrapper({name:"stripe-js",version:"3.4.1",startTime:n})},Ie=null,We=null,Ve=null,ss=function(t){return function(){t(new Error("Failed to load Stripe.js"))}},as=function(t,n){return function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))}},os=function(t){return Ie!==null?Ie:(Ie=new Promise(function(n,r){if(typeof window>"u"||typeof document>"u"){n(null);return}if(window.Stripe&&t&&console.warn(In),window.Stripe){n(window.Stripe);return}try{var i=rs();if(i&&t)console.warn(In);else if(!i)i=On(t);else if(i&&Ve!==null&&We!==null){var s;i.removeEventListener("load",Ve),i.removeEventListener("error",We),(s=i.parentNode)===null||s===void 0||s.removeChild(i),i=On(t)}Ve=as(n,r),We=ss(r),i.addEventListener("load",Ve),i.addEventListener("error",We)}catch(a){r(a);return}}),Ie.catch(function(n){return Ie=null,Promise.reject(n)}))},cs=function(t,n,r){if(t===null)return null;var i=t.apply(void 0,n);return is(i,r),i},Oe,Rr=!1,Cr=function(){return Oe||(Oe=os(null).catch(function(t){return Oe=null,Promise.reject(t)}),Oe)};Promise.resolve().then(function(){return Cr()}).catch(function(e){Rr||console.warn(e)});var Eu=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];Rr=!0;var i=Date.now();return Cr().then(function(s){return cs(s,n,i)})};const us=L.createContext(null);function Su(){const e=L.useContext(us);if(!e)throw new Error("usePaymentIntentContext must be used within a PaymentIntentContext.Provider");return e}var ls=Object.defineProperty,wr=(e,t)=>{for(var n in t)ls(e,n,{get:t[n],enumerable:!0})};function ps(e){return Object.entries(e).filter(([,t])=>t||t===!1).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(String(n))}`).join("&")}function Dr(e){let t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function kr(e){return e||document.head}var ds="hCaptcha-script",Nr="hCaptchaOnLoad",Yt="script-error",Se="@hCaptcha/loader",Ur=Object.prototype.toString;function Br(e){switch(Ur.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return ie(e,Error)}}function Ue(e,t){return Ur.call(e)===`[object ${t}]`}function tn(e){return Ue(e,"ErrorEvent")}function Yn(e){return Ue(e,"DOMError")}function hs(e){return Ue(e,"DOMException")}function ue(e){return Ue(e,"String")}function Ir(e){return e===null||typeof e!="object"&&typeof e!="function"}function Ce(e){return Ue(e,"Object")}function ft(e){return typeof Event<"u"&&ie(e,Event)}function _s(e){return typeof Element<"u"&&ie(e,Element)}function fs(e){return Ue(e,"RegExp")}function nn(e){return!!(e&&e.then&&typeof e.then=="function")}function ms(e){return Ce(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Or(e){return typeof e=="number"&&e!==e}function ie(e,t){try{return e instanceof t}catch{return!1}}function Yr(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function Te(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function $n(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let i=e[r];try{Yr(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function gs(e,t,n=!1){return ue(e)?fs(t)?t.test(e):ue(t)?n?e===t:e.includes(t):!1:!1}function Ae(e,t=[],n=!1){return t.some(r=>gs(e,r,n))}function ys(e,t,n=250,r,i,s,a){if(!s.exception||!s.exception.values||!a||!ie(a.originalException,Error))return;let o=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;o&&(s.exception.values=vs($t(e,t,i,a.originalException,r,s.exception.values,o,0),n))}function $t(e,t,n,r,i,s,a,o){if(s.length>=n+1)return s;let c=[...s];if(ie(r[i],Error)){Gn(a,o);let l=e(t,r[i]),u=c.length;Pn(l,i,u,o),c=$t(e,t,n,r[i],i,[l,...c],l,u)}return Array.isArray(r.errors)&&r.errors.forEach((l,u)=>{if(ie(l,Error)){Gn(a,o);let p=e(t,l),h=c.length;Pn(p,`errors[${u}]`,h,o),c=$t(e,t,n,l,i,[p,...c],p,h)}}),c}function Gn(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,is_exception_group:!0,exception_id:t}}function Pn(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function vs(e,t){return e.map(n=>(n.value&&(n.value=Te(n.value,t)),n))}function Je(e){return e&&e.Math==Math?e:void 0}var D=typeof globalThis=="object"&&Je(globalThis)||typeof window=="object"&&Je(window)||typeof self=="object"&&Je(self)||typeof global=="object"&&Je(global)||function(){return this}()||{};function Me(){return D}function $r(e,t,n){let r=n||D,i=r.__SENTRY__=r.__SENTRY__||{};return i[e]||(i[e]=t())}var ct=Me(),Es=80;function we(e,t={}){try{let n=e,r=5,i=[],s=0,a=0,o=" > ",c=o.length,l,u=Array.isArray(t)?t:t.keyAttrs,p=!Array.isArray(t)&&t.maxStringLength||Es;for(;n&&s++<r&&(l=Ss(n,u),!(l==="html"||s>1&&a+i.length*c+l.length>=p));)i.push(l),a+=l.length,n=n.parentNode;return i.reverse().join(o)}catch{return"<unknown>"}}function Ss(e,t){let n=e,r=[],i,s,a,o,c;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());let l=t&&t.length?t.filter(p=>n.getAttribute(p)).map(p=>[p,n.getAttribute(p)]):null;if(l&&l.length)l.forEach(p=>{r.push(`[${p[0]}="${p[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&ue(i))for(s=i.split(/\s+/),c=0;c<s.length;c++)r.push(`.${s[c]}`);let u=["aria-label","type","name","title","alt"];for(c=0;c<u.length;c++)a=u[c],o=n.getAttribute(a),o&&r.push(`[${a}="${o}"]`);return r.join("")}function bs(){try{return ct.document.location.href}catch{return""}}function Ts(e){return ct.document&&ct.document.querySelector?ct.document.querySelector(e):null}var xs="Sentry Logger ",Gt=["debug","info","warn","error","log","assert","trace"],pt={};function Gr(e){if(!("console"in D))return e();let t=D.console,n={},r=Object.keys(pt);r.forEach(i=>{let s=pt[i];n[i]=t[i],t[i]=s});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function Rs(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1}};return typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?Gt.forEach(n=>{t[n]=(...r)=>{e&&Gr(()=>{D.console[n](`${xs}[${n}]:`,...r)})}}):Gt.forEach(n=>{t[n]=()=>{}}),t}var d=Rs(),Cs=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function ws(e){return e==="http"||e==="https"}function mt(e,t=!1){let{host:n,path:r,pass:i,port:s,projectId:a,protocol:o,publicKey:c}=e;return`${o}://${c}${t&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${a}`}function Ds(e){let t=Cs.exec(e);if(!t){console.error(`Invalid Sentry Dsn: ${e}`);return}let[n,r,i="",s,a="",o]=t.slice(1),c="",l=o,u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){let p=l.match(/^\d+/);p&&(l=p[0])}return Pr({host:s,pass:i,path:c,projectId:l,port:a,protocol:n,publicKey:r})}function Pr(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function ks(e){if(!(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__))return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(d.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?ws(r)?t&&isNaN(parseInt(t,10))?(d.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(d.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(d.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Ns(e){let t=typeof e=="string"?Ds(e):Pr(e);if(!(!t||!ks(t)))return t}var Z=class extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}};function I(e,t,n){if(!(t in e))return;let r=e[t],i=n(r);typeof i=="function"&&jr(i,r),e[t]=i}function rn(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function jr(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,rn(e,"__sentry_original__",t)}catch{}}function sn(e){return e.__sentry_original__}function Us(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Lr(e){if(Br(e))return{message:e.message,name:e.name,stack:e.stack,...Ln(e)};if(ft(e)){let t={type:e.type,target:jn(e.target),currentTarget:jn(e.currentTarget),...Ln(e)};return typeof CustomEvent<"u"&&ie(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function jn(e){try{return _s(e)?we(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Ln(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function Bs(e,t=40){let n=Object.keys(Lr(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Te(n[0],t);for(let r=n.length;r>0;r--){let i=n.slice(0,r).join(", ");if(!(i.length>t))return r===n.length?i:Te(i,t)}return""}function ce(e){return Pt(e,new Map)}function Pt(e,t){if(Ce(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let i of Object.keys(e))typeof e[i]<"u"&&(r[i]=Pt(e[i],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(i=>{r.push(Pt(i,t))}),r}return e}var Ar=50,An=/\(error: (.*)\)/,Mn=/captureMessage|captureException/;function Is(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{let i=[],s=n.split(` `);for(let a=r;a<s.length;a++){let o=s[a];if(o.length>1024)continue;let c=An.test(o)?o.replace(An,"$1"):o;if(!c.match(/\S*Error: /)){for(let l of t){let u=l(c);if(u){i.push(u);break}}if(i.length>=Ar)break}}return Os(i)}}function Os(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),Mn.test(t[t.length-1].function||"")&&(t.pop(),Mn.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,Ar).map(n=>({...n,filename:n.filename||t[t.length-1].filename,function:n.function||"?"}))}var wt="<anonymous>";function le(e){try{return!e||typeof e!="function"?wt:e.name||wt}catch{return wt}}var jt=Me();function Ys(){if(!("fetch"in jt))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Lt(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function $s(){if(!Ys())return!1;if(Lt(jt.fetch))return!0;let e=!1,t=jt.document;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Lt(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}var Ke=Me();function Gs(){let e=Ke.chrome,t=e&&e.app&&e.app.runtime,n="history"in Ke&&!!Ke.history.pushState&&!!Ke.history.replaceState;return!t&&n}var B=Me(),be="__sentry_xhr_v2__",Pe={},Hn={};function Ps(e){if(!Hn[e])switch(Hn[e]=!0,e){case"console":js();break;case"dom":Ws();break;case"xhr":Ms();break;case"fetch":Ls();break;case"history":Hs();break;case"error":Vs();break;case"unhandledrejection":Js();break;default:(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn("unknown instrumentation type:",e);return}}function F(e,t){Pe[e]=Pe[e]||[],Pe[e].push(t),Ps(e)}function J(e,t){if(!(!e||!Pe[e]))for(let n of Pe[e]||[])try{n(t)}catch(r){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.error(`Error while triggering instrumentation handler. Type: ${e} Name: ${le(n)} Error:`,r)}}function js(){"console"in D&&Gt.forEach(function(e){e in D.console&&I(D.console,e,function(t){return pt[e]=t,function(...n){J("console",{args:n,level:e});let r=pt[e];r&&r.apply(D.console,n)}})})}function Ls(){$s()&&I(D,"fetch",function(e){return function(...t){let{method:n,url:r}=As(t),i={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return J("fetch",{...i}),e.apply(D,t).then(s=>(J("fetch",{...i,endTimestamp:Date.now(),response:s}),s),s=>{throw J("fetch",{...i,endTimestamp:Date.now(),error:s}),s})}})}function At(e,t){return!!e&&typeof e=="object"&&!!e[t]}function qn(e){return typeof e=="string"?e:e?At(e,"url")?e.url:e.toString?e.toString():"":""}function As(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[n,r]=e;return{url:qn(n),method:At(r,"method")?String(r.method).toUpperCase():"GET"}}let t=e[0];return{url:qn(t),method:At(t,"method")?String(t.method).toUpperCase():"GET"}}function Ms(){if(!B.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;I(e,"open",function(t){return function(...n){let r=n[1],i=this[be]={method:ue(n[0])?n[0].toUpperCase():n[0],url:n[1],request_headers:{}};ue(r)&&i.method==="POST"&&r.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let s=()=>{let a=this[be];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}J("xhr",{args:n,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?I(this,"onreadystatechange",function(a){return function(...o){return s(),a.apply(this,o)}}):this.addEventListener("readystatechange",s),I(this,"setRequestHeader",function(a){return function(...o){let[c,l]=o,u=this[be];return u&&(u.request_headers[c.toLowerCase()]=l),a.apply(this,o)}}),t.apply(this,n)}}),I(e,"send",function(t){return function(...n){let r=this[be];return r&&n[0]!==void 0&&(r.body=n[0]),J("xhr",{args:n,startTimestamp:Date.now(),xhr:this}),t.apply(this,n)}})}var Xe;function Hs(){if(!Gs())return;let e=B.onpopstate;B.onpopstate=function(...n){let r=B.location.href,i=Xe;if(Xe=r,J("history",{from:i,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){let i=r.length>2?r[2]:void 0;if(i){let s=Xe,a=String(i);Xe=a,J("history",{from:s,to:a})}return n.apply(this,r)}}I(B.history,"pushState",t),I(B.history,"replaceState",t)}var qs=1e3,Qe,Ze;function Fs(e,t){if(!e||e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch{}return!1}function zs(e){if(e.type!=="keypress")return!1;try{let t=e.target;if(!t||!t.tagName)return!0;if(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)return!1}catch{}return!0}function Fn(e,t=!1){return n=>{if(!n||Ze===n||zs(n))return;let r=n.type==="keypress"?"input":n.type;Qe===void 0?(e({event:n,name:r,global:t}),Ze=n):Fs(Ze,n)&&(e({event:n,name:r,global:t}),Ze=n),clearTimeout(Qe),Qe=B.setTimeout(()=>{Qe=void 0},qs)}}function Ws(){if(!B.document)return;let e=J.bind(null,"dom"),t=Fn(e,!0);B.document.addEventListener("click",t,!1),B.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{let r=B[n]&&B[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(I(r,"addEventListener",function(i){return function(s,a,o){if(s==="click"||s=="keypress")try{let c=this,l=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},u=l[s]=l[s]||{refCount:0};if(!u.handler){let p=Fn(e);u.handler=p,i.call(this,s,p,o)}u.refCount++}catch{}return i.call(this,s,a,o)}}),I(r,"removeEventListener",function(i){return function(s,a,o){if(s==="click"||s=="keypress")try{let c=this,l=c.__sentry_instrumentation_handlers__||{},u=l[s];u&&(u.refCount--,u.refCount<=0&&(i.call(this,s,u.handler,o),u.handler=void 0,delete l[s]),Object.keys(l).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,a,o)}}))})}var et=null;function Vs(){et=B.onerror,B.onerror=function(e,t,n,r,i){return J("error",{column:r,error:i,line:n,msg:e,url:t}),et&&!et.__SENTRY_LOADER__?et.apply(this,arguments):!1},B.onerror.__SENTRY_INSTRUMENTED__=!0}var tt=null;function Js(){tt=B.onunhandledrejection,B.onunhandledrejection=function(e){return J("unhandledrejection",e),tt&&!tt.__SENTRY_LOADER__?tt.apply(this,arguments):!0},B.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Ks(){let e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(i){if(e)return t.has(i)?!0:(t.add(i),!1);for(let s=0;s<t.length;s++)if(t[s]===i)return!0;return t.push(i),!1}function r(i){if(e)t.delete(i);else for(let s=0;s<t.length;s++)if(t[s]===i){t.splice(s,1);break}}return[n,r]}function $(){let e=D,t=e.crypto||e.msCrypto,n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>t.getRandomValues(new Uint8Array(1))[0])}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function Mr(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function oe(e){let{message:t,event_id:n}=e;if(t)return t;let r=Mr(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Mt(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=t||""),s.type||(s.type="Error")}function Le(e,t){let n=Mr(e);if(!n)return;let r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&"data"in t){let s={...i&&i.data,...t.data};n.mechanism.data=s}}function zn(e){if(e&&e.__sentry_captured__)return!0;try{rn(e,"__sentry_captured__",!0)}catch{}return!1}function Xs(e){return Array.isArray(e)?e:[e]}function Qs(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Zs(){return"npm"}function ea(){return!Qs()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function ta(e,t){return e.require(t)}function ae(e,t=100,n=1/0){try{return Ht("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Hr(e,t=3,n=100*1024){let r=ae(e,t);return sa(r)>n?Hr(e,t-1,n):r}function Ht(e,t,n=1/0,r=1/0,i=Ks()){let[s,a]=i;if(t==null||["number","boolean","string"].includes(typeof t)&&!Or(t))return t;let o=na(e,t);if(!o.startsWith("[object "))return o;if(t.__sentry_skip_normalization__)return t;let c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return o.replace("object ","");if(s(t))return"[Circular ~]";let l=t;if(l&&typeof l.toJSON=="function")try{let _=l.toJSON();return Ht("",_,c-1,r,i)}catch{}let u=Array.isArray(t)?[]:{},p=0,h=Lr(t);for(let _ in h){if(!Object.prototype.hasOwnProperty.call(h,_))continue;if(p>=r){u[_]="[MaxProperties ~]";break}let f=h[_];u[_]=Ht(_,f,c-1,r,i),p++}return a(t),u}function na(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Yr(t))return"[VueViewModel]";if(ms(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${le(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=ra(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function ra(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function ia(e){return~-encodeURI(e).split(/%..|./).length}function sa(e){return ia(JSON.stringify(e))}var ne;(function(e){e[e.PENDING=0]="PENDING";let t=1;e[e.RESOLVED=t]="RESOLVED";let n=2;e[e.REJECTED=n]="REJECTED"})(ne||(ne={}));function _e(e){return new V(t=>{t(e)})}function an(e){return new V((t,n)=>{n(e)})}var V=class{constructor(e){V.prototype.__init.call(this),V.prototype.__init2.call(this),V.prototype.__init3.call(this),V.prototype.__init4.call(this),this._state=ne.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(t){this._reject(t)}}then(e,t){return new V((n,r)=>{this._handlers.push([!1,i=>{if(!e)n(i);else try{n(e(i))}catch(s){r(s)}},i=>{if(!t)r(i);else try{n(t(i))}catch(s){r(s)}}]),this._executeHandlers()})}catch(e){return this.then(t=>t,e)}finally(e){return new V((t,n)=>{let r,i;return this.then(s=>{i=!1,r=s,e&&e()},s=>{i=!0,r=s,e&&e()}).then(()=>{if(i){n(r);return}t(r)})})}__init(){this._resolve=e=>{this._setResult(ne.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(ne.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{if(this._state===ne.PENDING){if(nn(t)){t.then(this._resolve,this._reject);return}this._state=e,this._value=t,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===ne.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(t=>{t[0]||(this._state===ne.RESOLVED&&t[1](this._value),this._state===ne.REJECTED&&t[2](this._value),t[0]=!0)})}}};function aa(e){let t=[];function n(){return e===void 0||t.length<e}function r(a){return t.splice(t.indexOf(a),1)[0]}function i(a){if(!n())return an(new Z("Not adding Promise because buffer limit was reached."));let o=a();return t.indexOf(o)===-1&&t.push(o),o.then(()=>r(o)).then(null,()=>r(o).then(null,()=>{})),o}function s(a){return new V((o,c)=>{let l=t.length;if(!l)return o(!0);let u=setTimeout(()=>{a&&a>0&&o(!1)},a);t.forEach(p=>{_e(p).then(()=>{--l||(clearTimeout(u),o(!0))},c)})})}return{$:t,add:i,drain:s}}function Dt(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}var oa=["fatal","error","warning","log","info","debug"];function ca(e){return e==="warn"?"warning":oa.includes(e)?e:"log"}var qr=Me(),qt={nowSeconds:()=>Date.now()/1e3};function ua(){let{performance:e}=qr;if(!e||!e.now)return;let t=Date.now()-e.now();return{now:()=>e.now(),timeOrigin:t}}function la(){try{return ta(module,"perf_hooks").performance}catch{return}}var kt=ea()?la():ua(),Wn=kt===void 0?qt:{nowSeconds:()=>(kt.timeOrigin+kt.now())/1e3},gt=qt.nowSeconds.bind(qt),fe=Wn.nowSeconds.bind(Wn),ee=(()=>{let{performance:e}=qr;if(!e||!e.now)return;let t=3600*1e3,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,s=i<t,a=e.timing&&e.timing.navigationStart,o=typeof a=="number"?Math.abs(a+n-r):t,c=o<t;return s||c?i<=o?e.timeOrigin:a:r})(),Ft="baggage",Fr="sentry-",pa=/^sentry-/,da=8192;function ha(e){if(!ue(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((r,i)=>{let s=Vn(i);return{...r,...s}},{});else{if(!e)return;t=Vn(e)}let n=Object.entries(t).reduce((r,[i,s])=>{if(i.match(pa)){let a=i.slice(Fr.length);r[a]=s}return r},{});if(Object.keys(n).length>0)return n}function zt(e){if(!e)return;let t=Object.entries(e).reduce((n,[r,i])=>(i&&(n[`${Fr}${r}`]=i),n),{});return _a(t)}function Vn(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(t[n]=r,t),{})}function _a(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],i)=>{let s=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,a=i===0?s:`${t},${s}`;return a.length>da?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):a},"")}var fa=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function ma(e){if(!e)return;let t=e.match(fa);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function ga(e,t){let n=ma(e),r=ha(t),{traceId:i,parentSpanId:s,parentSampled:a}=n||{},o={traceId:i||$(),spanId:$().substring(16),sampled:a};return s&&(o.parentSpanId=s),r&&(o.dsc=r),{traceparentData:n,dynamicSamplingContext:r,propagationContext:o}}function on(e=$(),t=$().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function He(e,t=[]){return[e,t]}function ya(e,t){let[n,r]=e;return[n,[...r,t]]}function Jn(e,t){let n=e[1];for(let r of n){let i=r[0].type;if(t(r,i))return!0}return!1}function Wt(e,t){return(t||new TextEncoder).encode(e)}function va(e,t){let[n,r]=e,i=JSON.stringify(n);function s(a){typeof i=="string"?i=typeof a=="string"?i+a:[Wt(i,t),a]:i.push(typeof a=="string"?Wt(a,t):a)}for(let a of r){let[o,c]=a;if(s(` ${JSON.stringify(o)} `),typeof c=="string"||c instanceof Uint8Array)s(c);else{let l;try{l=JSON.stringify(c)}catch{l=JSON.stringify(ae(c))}s(l)}}return typeof i=="string"?i:Ea(i)}function Ea(e){let t=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(t),r=0;for(let i of e)n.set(i,r),r+=i.length;return n}function Sa(e,t){let n=typeof e.data=="string"?Wt(e.data,t):e.data;return[ce({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}var ba={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function Kn(e){return ba[e]}function zr(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function Ta(e,t,n,r){let i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:mt(r)},...i&&{trace:ce({...i})}}}function xa(e,t,n){let r=[{type:"client_report"},{timestamp:gt(),discarded_events:e}];return He(t?{dsn:t}:{},[r])}function Ra(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function Ca(e,t){return e[t]||e.all||0}function wa(e,t,n=Date.now()){return Ca(e,t)>n}function Da(e,{statusCode:t,headers:n},r=Date.now()){let i={...e},s=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(s)for(let o of s.trim().split(",")){let[c,l]=o.split(":",2),u=parseInt(c,10),p=(isNaN(u)?60:u)*1e3;if(!l)i.all=r+p;else for(let h of l.split(";"))i[h]=r+p}else a?i.all=r+Ra(a,r):t===429&&(i.all=r+60*1e3);return i}var cn="production";function un(){return $r("globalEventProcessors",()=>[])}function ka(e){un().push(e)}function dt(e,t,n,r=0){return new V((i,s)=>{let a=e[r];if(t===null||typeof a!="function")i(t);else{let o=a({...t},n);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&a.id&&o===null&&d.log(`Event processor "${a.id}" dropped event`),nn(o)?o.then(c=>dt(e,c,n,r+1).then(i)).then(null,s):dt(e,o,n,r+1).then(i).then(null,s)}})}function Na(e){let t=fe(),n={sid:$(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Ba(n)};return e&&De(n,e),n}function De(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||fe(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:$()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Ua(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),De(e,n)}function Ba(e){return ce({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}var Ia=100,xe=class{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Xn()}static clone(e){let t=new xe;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags={...e._tags},t._extra={...e._extra},t._contexts={...e._contexts},t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments],t._sdkProcessingMetadata={...e._sdkProcessingMetadata},t._propagationContext={...e._propagationContext}),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&De(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if(typeof e=="function"){let t=e(this);return t instanceof xe?t:this}return e instanceof xe?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession),e._propagationContext&&(this._propagationContext=e._propagationContext)):Ce(e)&&(e=e,this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.propagationContext)),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._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=Xn(),this}addBreadcrumb(e,t){let n=typeof t=="number"?t:Ia;if(n<=0)return this;let r={timestamp:gt(),...e},i=this._breadcrumbs;return i.push(r),this._breadcrumbs=i.length>n?i.slice(-n):i,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}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={},n){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};let s=this._span.transaction;if(s){e.sdkProcessingMetadata={dynamicSamplingContext:s.getDynamicSamplingContext(),...e.sdkProcessingMetadata};let a=s.name;a&&(e.tags={transaction:a,...e.tags})}}this._applyFingerprint(e);let r=this._getBreadcrumbs(),i=[...e.breadcrumbs||[],...r];return e.breadcrumbs=i.length>0?i:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata,propagationContext:this._propagationContext},dt([...n||[],...un(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}_getBreadcrumbs(){return this._breadcrumbs}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Xs(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}};function Xn(){return{traceId:$(),spanId:$().substring(16)}}var Wr=4,Oa=100,ln=class{constructor(e,t=new xe,n=Wr){this._version=n,this._stack=[{scope:t}],e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){let t=this.getStackTop();t.client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){let e=xe.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(e){let t=this.pushScope();try{e(t)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){let n=this._lastEventId=t&&t.event_id?t.event_id:$(),r=new Error("Sentry syntheticException");return this._withClient((i,s)=>{i.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},s)}),n}captureMessage(e,t,n){let r=this._lastEventId=n&&n.event_id?n.event_id:$(),i=new Error(e);return this._withClient((s,a)=>{s.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},a)}),r}captureEvent(e,t){let n=t&&t.event_id?t.event_id:$();return e.type||(this._lastEventId=n),this._withClient((r,i)=>{r.captureEvent(e,{...t,event_id:n},i)}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){let{scope:n,client:r}=this.getStackTop();if(!r)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:s=Oa}=r.getOptions&&r.getOptions()||{};if(s<=0)return;let a={timestamp:gt(),...e},o=i?Gr(()=>i(a,t)):a;o!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",o,t),n.addBreadcrumb(o,s))}setUser(e){this.getScope().setUser(e)}setTags(e){this.getScope().setTags(e)}setExtras(e){this.getScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t)}configureScope(e){let{scope:t,client:n}=this.getStackTop();n&&e(t)}run(e){let t=Qn(this);try{e(this)}finally{Qn(t)}}getIntegration(e){let t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){let n=this._callExtensionMethod("startTransaction",e,t);if((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&!n){let r=this.getClient();console.warn(r?`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init': Sentry.addTracingExtensions(); Sentry.init({...}); `:"Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")}return n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){let e=this.getStackTop().scope,t=e.getSession();t&&Ua(t),this._sendSessionUpdate(),e.setSession()}startSession(e){let{scope:t,client:n}=this.getStackTop(),{release:r,environment:i=cn}=n&&n.getOptions()||{},{userAgent:s}=D.navigator||{},a=Na({release:r,environment:i,user:t.getUser(),...s&&{userAgent:s},...e}),o=t.getSession&&t.getSession();return o&&o.status==="ok"&&De(o,{status:"exited"}),this.endSession(),t.setSession(a),a}shouldSendDefaultPii(){let e=this.getClient(),t=e&&e.getOptions();return!!(t&&t.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_withClient(e){let{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e,...t){let n=qe().__SENTRY__;if(n&&n.extensions&&typeof n.extensions[e]=="function")return n.extensions[e].apply(this,t);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn(`Extension method ${e} couldn't be found, doing nothing.`)}};function qe(){return D.__SENTRY__=D.__SENTRY__||{extensions:{},hub:void 0},D}function Qn(e){let t=qe(),n=Vt(t);return Vr(t,e),n}function k(){let e=qe();if(e.__SENTRY__&&e.__SENTRY__.acs){let t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return Ya(e)}function Ya(e=qe()){return(!$a(e)||Vt(e).isOlderThan(Wr))&&Vr(e,new ln),Vt(e)}function $a(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function Vt(e){return $r("hub",()=>new ln,e)}function Vr(e,t){if(!e)return!1;let n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}function pn(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=k().getClient(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function Fe(e){return k().getScope().getTransaction()}var Zn=!1;function Ga(){Zn||(Zn=!0,F("error",Jt),F("unhandledrejection",Jt))}function Jt(){let e=Fe();if(e){let t="internal_error";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}Jt.tag="sentry_tracingErrorCallback";var Jr=class{constructor(e=1e3){this._maxlen=e,this.spans=[]}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}},Kr=class{constructor(e={}){this.traceId=e.traceId||$(),this.spanId=e.spanId||$().substring(16),this.startTimestamp=e.startTimestamp||fe(),this.tags=e.tags||{},this.data=e.data||{},this.instrumenter=e.instrumenter||"sentry",this.origin=e.origin||"manual",e.parentSpanId&&(this.parentSpanId=e.parentSpanId),"sampled"in e&&(this.sampled=e.sampled),e.op&&(this.op=e.op),e.description&&(this.description=e.description),e.name&&(this.description=e.name),e.status&&(this.status=e.status),e.endTimestamp&&(this.endTimestamp=e.endTimestamp)}get name(){return this.description||""}set name(e){this.setName(e)}startChild(e){let t=new Kr({...e,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});if(t.spanRecorder=this.spanRecorder,t.spanRecorder&&t.spanRecorder.add(t),t.transaction=this.transaction,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&t.transaction){let n=e&&e.op||"< unknown op >",r=t.transaction.name||"< unknown name >",i=t.transaction.spanId,s=`[Tracing] Starting '${n}' span on transaction '${r}' (${i}).`;t.transaction.metadata.spanMetadata[t.spanId]={logMessage:s},d.log(s)}return t}setTag(e,t){return this.tags={...this.tags,[e]:t},this}setData(e,t){return this.data={...this.data,[e]:t},this}setStatus(e){return this.status=e,this}setHttpStatus(e){this.setTag("http.status_code",String(e)),this.setData("http.response.status_code",e);let t=Pa(e);return t!=="unknown_error"&&this.setStatus(t),this}setName(e){this.description=e}isSuccess(){return this.status==="ok"}finish(e){if((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){let{logMessage:t}=this.transaction.metadata.spanMetadata[this.spanId];t&&d.log(t.replace("Starting","Finishing"))}this.endTimestamp=typeof e=="number"?e:fe()}toTraceparent(){return on(this.traceId,this.spanId,this.sampled)}toContext(){return ce({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(e){return this.data=e.data||{},this.description=e.description,this.endTimestamp=e.endTimestamp,this.op=e.op,this.parentSpanId=e.parentSpanId,this.sampled=e.sampled,this.spanId=e.spanId||this.spanId,this.startTimestamp=e.startTimestamp||this.startTimestamp,this.status=e.status,this.tags=e.tags||{},this.traceId=e.traceId||this.traceId,this}getTraceContext(){return ce({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return ce({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId,origin:this.origin})}};function Pa(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}function yt(e,t,n){let r=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:s}=n&&n.getUser()||{},a=ce({environment:r.environment||cn,release:r.release,user_segment:s,public_key:i,trace_id:e});return t.emit&&t.emit("createDsc",a),a}var Xr=class extends Kr{constructor(e,t){super(e),delete this.description,this._measurements={},this._contexts={},this._hub=t||k(),this._name=e.name||"",this.metadata={source:"custom",...e.metadata,spanMetadata:{}},this._trimEnd=e.trimEnd,this.transaction=this;let n=this.metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(e){this.setName(e)}setName(e,t="custom"){this._name=e,this.metadata.source=t}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new Jr(e)),this.spanRecorder.add(this)}setContext(e,t){t===null?delete this._contexts[e]:this._contexts[e]=t}setMeasurement(e,t,n=""){this._measurements[e]={value:t,unit:n}}setMetadata(e){this.metadata={...this.metadata,...e}}finish(e){let t=this._finishTransaction(e);if(t)return this._hub.captureEvent(t)}toContext(){let e=super.toContext();return ce({...e,name:this.name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this.name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;let e=this._hub||k(),t=e.getClient();if(!t)return{};let n=e.getScope(),r=yt(this.traceId,t,n),i=this.metadata.sampleRate;i!==void 0&&(r.sample_rate=`${i}`);let s=this.metadata.source;return s&&s!=="url"&&(r.transaction=this.name),this.sampled!==void 0&&(r.sampled=String(this.sampled)),r}setHub(e){this._hub=e}_finishTransaction(e){if(this.endTimestamp!==void 0)return;this.name||((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(e);let t=this._hub.getClient();if(t&&t.emit&&t.emit("finishTransaction",this),this.sampled!==!0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","transaction");return}let n=this.spanRecorder?this.spanRecorder.spans.filter(s=>s!==this&&s.endTimestamp):[];this._trimEnd&&n.length>0&&(this.endTimestamp=n.reduce((s,a)=>s.endTimestamp&&a.endTimestamp?s.endTimestamp>a.endTimestamp?s:a:s).endTimestamp);let r=this.metadata,i={contexts:{...this._contexts,trace:this.getTraceContext()},spans:n,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...r,dynamicSamplingContext:this.getDynamicSamplingContext()},...r.source&&{transaction_info:{source:r.source}}};return Object.keys(this._measurements).length>0&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),i.measurements=this._measurements),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),i}},ut={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},ja="finishReason",ve=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"],La=class extends Jr{constructor(e,t,n,r){super(r),this._pushActivity=e,this._popActivity=t,this.transactionSpanId=n}add(e){e.spanId!==this.transactionSpanId&&(e.finish=t=>{e.endTimestamp=typeof t=="number"?t:fe(),this._popActivity(e.spanId)},e.endTimestamp===void 0&&this._pushActivity(e.spanId)),super.add(e)}},Aa=class extends Xr{constructor(e,t,n=ut.idleTimeout,r=ut.finalTimeout,i=ut.heartbeatInterval,s=!1){super(e,t),this._idleHub=t,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=i,this._onScope=s,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=ve[4],s&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),t.configureScope(a=>a.setSpan(this))),this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=ve[3],this.finish())},this._finalTimeout)}finish(e=fe()){if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setTag(ja,this._finishReason),this.spanRecorder){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("[Tracing] finishing IdleTransaction",new Date(e*1e3).toISOString(),this.op);for(let t of this._beforeFinishCallbacks)t(this,e);this.spanRecorder.spans=this.spanRecorder.spans.filter(t=>{if(t.spanId===this.spanId)return!0;t.endTimestamp||(t.endTimestamp=e,t.setStatus("cancelled"),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(t,void 0,2)));let n=t.startTimestamp<e,r=(this._finalTimeout+this._idleTimeout)/1e3,i=t.endTimestamp-this.startTimestamp<r;if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){let s=JSON.stringify(t,void 0,2);n?i||d.log("[Tracing] discarding Span since it finished after Transaction final timeout",s):d.log("[Tracing] discarding Span since it happened after Transaction was finished",s)}return n&&i}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("[Tracing] flushing IdleTransaction")}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("[Tracing] No active IdleTransaction");if(this._onScope){let t=this._idleHub.getScope();t.getTransaction()===this&&t.setSpan(void 0)}return super.finish(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){if(!this.spanRecorder){let t=r=>{this._finished||this._pushActivity(r)},n=r=>{this._finished||this._popActivity(r)};this.spanRecorder=new La(t,n,this.spanId,e),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:t}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=t===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=ve[5],this.finish(e)))}setFinishReason(e){this._finishReason=e}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=ve[1],this.finish(e))},this._idleTimeout)}_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=!0,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log(`[Tracing] popActivity ${e}`),delete this.activities[e],(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){let t=fe();this._idleTimeoutCanceledPermanently?(this._finishReason=ve[5],this.finish(t)):this._restartIdleTimeout(t+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;let e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=ve[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}};function Ma(){let e=this.getScope().getSpan();return e?{"sentry-trace":e.toTraceparent()}:{}}function Qr(e,t,n){if(!pn(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setMetadata({sampleRate:Number(e.sampled)}),e;let r;return typeof t.tracesSampler=="function"?(r=t.tracesSampler(n),e.setMetadata({sampleRate:Number(r)})):n.parentSampled!==void 0?r=n.parentSampled:typeof t.tracesSampleRate<"u"?(r=t.tracesSampleRate,e.setMetadata({sampleRate:Number(r)})):(r=1,e.setMetadata({sampleRate:r})),Ha(r)?r?(e.sampled=Math.random()<r,e.sampled?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log(`[Tracing] starting ${e.op} transaction - ${e.name}`),e):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),e)):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),e.sampled=!1,e):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1,e)}function Ha(e){return Or(e)||!(typeof e=="number"||typeof e=="boolean")?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e<0||e>1?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function qa(e,t){let n=this.getClient(),r=n&&n.getOptions()||{},i=r.instrumenter||"sentry",s=e.instrumenter||"sentry";i!==s&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.error(`A transaction was started with instrumenter=\`${s}\`, but the SDK is configured with the \`${i}\` instrumenter. The transaction will not be sampled. Please use the ${i} instrumentation to start transactions.`),e.sampled=!1);let a=new Xr(e,this);return a=Qr(a,r,{parentSampled:e.parentSampled,transactionContext:e,...t}),a.sampled&&a.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",a),a}function er(e,t,n,r,i,s,a){let o=e.getClient(),c=o&&o.getOptions()||{},l=new Aa(t,e,n,r,a,i);return l=Qr(l,c,{parentSampled:t.parentSampled,transactionContext:t,...s}),l.sampled&&l.initSpanRecorder(c._experiments&&c._experiments.maxSpans),o&&o.emit&&o.emit("startTransaction",l),l}function Fa(){let e=qe();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=qa),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=Ma),Ga())}function za(e,t){return k().captureException(e,{captureContext:t})}function Wa(e){k().withScope(e)}var Va="7";function Ja(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Ka(e){return`${Ja(e)}${e.projectId}/envelope/`}function Xa(e,t){return Us({sentry_key:e.publicKey,sentry_version:Va,...t&&{sentry_client:`${t.name}/${t.version}`}})}function Qa(e,t={}){let n=typeof t=="string"?t:t.tunnel,r=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${Ka(e)}?${Xa(e,r)}`}function Za(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function eo(e,t,n,r){let i=zr(n),s={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:mt(t)}},a="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return He(s,[a])}function to(e,t,n,r){let i=zr(n),s=e.type&&e.type!=="replay_event"?e.type:"event";Za(e,n&&n.sdk);let a=Ta(e,i,r,t);return delete e.sdkProcessingMetadata,He(a,[[{type:s},e]])}var tr=[];function no(e,t){let n={};return t.forEach(r=>{r&&Zr(e,r,n)}),n}function Zr(e,t,n){if(n[t.name]=t,tr.indexOf(t.name)===-1&&(t.setupOnce(ka,k),tr.push(t.name)),e.on&&typeof t.preprocessEvent=="function"){let r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,s)=>r(i,s,e))}if(e.addEventProcessor&&typeof t.processEvent=="function"){let r=t.processEvent.bind(t),i=Object.assign((s,a)=>r(s,a,e),{id:t.name});e.addEventProcessor(i)}(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log(`Integration installed: ${t.name}`)}function ro(e,t,n,r,i){let{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,o={...t,event_id:t.event_id||n.event_id||$(),timestamp:t.timestamp||gt()},c=n.integrations||e.integrations.map(h=>h.name);io(o,e),oo(o,c),t.type===void 0&&so(o,e.stackParser);let l=r;n.captureContext&&(l=xe.clone(l).update(n.captureContext));let u=_e(o),p=i&&i.getEventProcessors?i.getEventProcessors():[];if(l){if(l.getAttachments){let h=[...n.attachments||[],...l.getAttachments()];h.length&&(n.attachments=h)}u=l.applyToEvent(o,n,p)}else u=dt([...p,...un()],o,n);return u.then(h=>(h&&ao(h),typeof s=="number"&&s>0?co(h,s,a):h))}function io(e,t){let{environment:n,release:r,dist:i,maxValueLength:s=250}=t;"environment"in e||(e.environment="environment"in t?n:cn),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=Te(e.message,s));let a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=Te(a.value,s));let o=e.request;o&&o.url&&(o.url=Te(o.url,s))}var nr=new WeakMap;function so(e,t){let n=D._sentryDebugIds;if(!n)return;let r,i=nr.get(t);i?r=i:(r=new Map,nr.set(t,r));let s=Object.keys(n).reduce((a,o)=>{let c,l=r.get(o);l?c=l:(c=t(o),r.set(o,c));for(let u=c.length-1;u>=0;u--){let p=c[u];if(p.filename){a[p.filename]=n[o];break}}return a},{});try{e.exception.values.forEach(a=>{a.stacktrace.frames.forEach(o=>{o.filename&&(o.debug_id=s[o.filename])})})}catch{}}function ao(e){let t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.keys(t).forEach(r=>{n.push({type:"sourcemap",code_file:r,debug_id:t[r]})})}function oo(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function co(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:ae(i.data,t,n)}}))},...e.user&&{user:ae(e.user,t,n)},...e.contexts&&{contexts:ae(e.contexts,t,n)},...e.extra&&{extra:ae(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=ae(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>(i.data&&(i.data=ae(i.data,t,n)),i))),r}var rr="Not capturing exception because it's already been captured.",uo=class{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Ns(e.dsn):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn("No DSN provided, client will not send events."),this._dsn){let t=Qa(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,n){if(zn(e)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log(rr);return}let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then(i=>this._captureEvent(i,t,n)).then(i=>{r=i})),r}captureMessage(e,t,n,r){let i=n&&n.event_id,s=Ir(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(s.then(a=>this._captureEvent(a,n,r)).then(a=>{i=a})),i}captureEvent(e,t,n){if(t&&t.originalException&&zn(t.originalException)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log(rr);return}let r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then(i=>{r=i})),r}captureSession(e){typeof e.release!="string"?(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),De(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let t=this._transport;return t?this._isClientDoneProcessing(e).then(n=>t.flush(e).then(r=>n&&r)):_e(!0)}close(e){return this.flush(e).then(t=>(this.getOptions().enabled=!1,t))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(e){(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&(this._integrations=no(this,this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){Zr(this,e,this._integrations)}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=to(e,this._dsn,this._options._metadata,this._options.tunnel);for(let i of t.attachments||[])n=ya(n,Sa(i,this._options.transportOptions&&this._options.transportOptions.textEncoder));let r=this._sendEnvelope(n);r&&r.then(i=>this.emit("afterSendEvent",e,i),null)}sendSession(e){let t=eo(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){let r=`${e}:${t}`;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log(`Adding outcome: "${r}"`),this._outcomes[r]=this._outcomes[r]+1||1}}on(e,t){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t)}emit(e,...t){this._hooks[e]&&this._hooks[e].forEach(n=>n(...t))}_updateSessionFromEvent(e,t){let n=!1,r=!1,i=t.exception&&t.exception.values;if(i){r=!0;for(let a of i){let o=a.mechanism;if(o&&o.handled===!1){n=!0;break}}}let s=e.status==="ok";(s&&e.errors===0||s&&n)&&(De(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new V(t=>{let n=0,r=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),t(!0)):(n+=r,e&&n>=e&&(clearInterval(i),t(!1)))},r)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n){let r=this.getOptions(),i=Object.keys(this._integrations);return!t.integrations&&i.length>0&&(t.integrations=i),this.emit("preprocessEvent",e,t),ro(r,e,t,n,this).then(s=>{if(s===null)return s;let{propagationContext:a}=s.sdkProcessingMetadata||{};if(!(s.contexts&&s.contexts.trace)&&a){let{traceId:o,spanId:c,parentSpanId:l,dsc:u}=a;s.contexts={trace:{trace_id:o,span_id:c,parent_span_id:l},...s.contexts};let p=u||yt(o,this,n);s.sdkProcessingMetadata={dynamicSamplingContext:p,...s.sdkProcessingMetadata}}return s})}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(r=>r.event_id,r=>{if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){let i=r;i.logLevel==="log"?d.log(i.message):d.warn(i)}})}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:i}=r,s=ti(e),a=ei(e),o=e.type||"error",c=`before send for type \`${o}\``;if(a&&typeof i=="number"&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",e),an(new Z(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let l=o==="replay_event"?"replay":o;return this._prepareEvent(e,t,n).then(u=>{if(u===null)throw this.recordDroppedEvent("event_processor",l,e),new Z("An event processor returned `null`, will not send event.","log");if(t.data&&t.data.__sentry__===!0)return u;let p=po(r,u,t);return lo(p,c)}).then(u=>{if(u===null)throw this.recordDroppedEvent("before_send",l,e),new Z(`${c} returned \`null\`, will not send event.`,"log");let p=n&&n.getSession();!s&&p&&this._updateSessionFromEvent(p,u);let h=u.transaction_info;if(s&&h&&u.transaction!==e.transaction){let _="custom";u.transaction_info={...h,source:_}}return this.sendEvent(u,t),u}).then(null,u=>{throw u instanceof Z?u:(this.captureException(u,{data:{__sentry__:!0},originalException:u}),new Z(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. Reason: ${u}`))})}_process(e){this._numProcessing++,e.then(t=>(this._numProcessing--,t),t=>(this._numProcessing--,t))}_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,t=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.error("Error while sending event:",t)});(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.error("Transport disabled")}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(t=>{let[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}})}};function lo(e,t){let n=`${t} must return \`null\` or a valid event.`;if(nn(e))return e.then(r=>{if(!Ce(r)&&r!==null)throw new Z(n);return r},r=>{throw new Z(`${t} rejected with ${r}`)});if(!Ce(e)&&e!==null)throw new Z(n);return e}function po(e,t,n){let{beforeSend:r,beforeSendTransaction:i}=e;return ei(t)&&r?r(t,n):ti(t)&&i?i(t,n):t}function ei(e){return e.type===void 0}function ti(e){return e.type==="transaction"}var ho=30;function _o(e,t,n=aa(e.bufferSize||ho)){let r={},i=a=>n.drain(a);function s(a){let o=[];if(Jn(a,(p,h)=>{let _=Kn(h);if(wa(r,_)){let f=ir(p,h);e.recordDroppedEvent("ratelimit_backoff",_,f)}else o.push(p)}),o.length===0)return _e();let c=He(a[0],o),l=p=>{Jn(c,(h,_)=>{let f=ir(h,_);e.recordDroppedEvent(p,Kn(_),f)})},u=()=>t({body:va(c,e.textEncoder)}).then(p=>(p.statusCode!==void 0&&(p.statusCode<200||p.statusCode>=300)&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn(`Sentry responded with status code ${p.statusCode} to sent event.`),r=Da(r,p),p),p=>{throw l("network_error"),p});return n.add(u).then(p=>p,p=>{if(p instanceof Z)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.error("Skipped sending event because buffer is full."),l("queue_overflow"),_e();throw p})}return s.__sentry__baseTransport__=!0,{send:s,flush:i}}function ir(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}var sr="7.73.0",ni={};wr(ni,{FunctionToString:()=>dn,InboundFilters:()=>hn});var ar,dn=class{static __initStatic(){this.id="FunctionToString"}constructor(){this.name=dn.id}setupOnce(){ar=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=sn(this)||this;return ar.apply(t,e)}}catch{}}};dn.__initStatic();var fo=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],mo=[/^.*healthcheck.*$/,/^.*healthy.*$/,/^.*live.*$/,/^.*ready.*$/,/^.*heartbeat.*$/,/^.*\/health$/,/^.*\/healthz$/],hn=class{static __initStatic(){this.id="InboundFilters"}constructor(e={}){this.name=hn.id,this._options=e}setupOnce(e,t){}processEvent(e,t,n){let r=n.getOptions(),i=go(this._options,r);return yo(e,i)?null:e}};hn.__initStatic();function go(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:fo],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:mo],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function yo(e,t){return t.ignoreInternal&&xo(e)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn(`Event dropped due to being internal Sentry Error. Event: ${oe(e)}`),!0):vo(e,t.ignoreErrors)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn(`Event dropped due to being matched by \`ignoreErrors\` option. Event: ${oe(e)}`),!0):Eo(e,t.ignoreTransactions)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. Event: ${oe(e)}`),!0):So(e,t.denyUrls)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn(`Event dropped due to being matched by \`denyUrls\` option. Event: ${oe(e)}. Url: ${ht(e)}`),!0):bo(e,t.allowUrls)?!1:((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn(`Event dropped due to not being matched by \`allowUrls\` option. Event: ${oe(e)}. Url: ${ht(e)}`),!0)}function vo(e,t){return e.type||!t||!t.length?!1:To(e).some(n=>Ae(n,t))}function Eo(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;let n=e.transaction;return n?Ae(n,t):!1}function So(e,t){if(!t||!t.length)return!1;let n=ht(e);return n?Ae(n,t):!1}function bo(e,t){if(!t||!t.length)return!0;let n=ht(e);return n?Ae(n,t):!0}function To(e){let t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&t.length===0&&d.error(`Could not extract message for event ${oe(e)}`),t}function xo(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function Ro(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function ht(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?Ro(t):null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.error(`Cannot extract url for event ${oe(e)}`),null}}var S=D,Kt=0;function ri(){return Kt>0}function Co(){Kt++,setTimeout(()=>{Kt--})}function ke(e,t={},n){if(typeof e!="function")return e;try{let i=e.__sentry_wrapped__;if(i)return i;if(sn(e))return e}catch{return e}let r=function(){let i=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let s=i.map(a=>ke(a,t));return e.apply(this,s)}catch(s){throw Co(),Wa(a=>{a.addEventProcessor(o=>(t.mechanism&&(Mt(o,void 0),Le(o,t.mechanism)),o.extra={...o.extra,arguments:i},o)),za(s)}),s}};try{for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}jr(r,e),rn(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function ii(e,t){let n=_n(e,t),r={type:t&&t.name,value:No(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function wo(e,t,n,r){let i=k().getClient(),s=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:ft(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Io(t,{isUnhandledRejection:r})}]},extra:{__serialized__:Hr(t,s)}};if(n){let o=_n(e,n);o.length&&(a.exception.values[0].stacktrace={frames:o})}return a}function Nt(e,t){return{exception:{values:[ii(e,t)]}}}function _n(e,t){let n=t.stacktrace||t.stack||"",r=ko(t);try{return e(n,r)}catch{}return[]}var Do=/Minified React error #\d+;/i;function ko(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(Do.test(e.message))return 1}return 0}function No(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function Uo(e,t,n,r){let i=n&&n.syntheticException||void 0,s=fn(e,t,i,r);return Le(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),_e(s)}function Bo(e,t,n="info",r,i){let s=r&&r.syntheticException||void 0,a=Xt(e,t,s,i);return a.level=n,r&&r.event_id&&(a.event_id=r.event_id),_e(a)}function fn(e,t,n,r,i){let s;if(tn(t)&&t.error)return Nt(e,t.error);if(Yn(t)||hs(t)){let a=t;if("stack"in t)s=Nt(e,t);else{let o=a.name||(Yn(a)?"DOMError":"DOMException"),c=a.message?`${o}: ${a.message}`:o;s=Xt(e,c,n,r),Mt(s,c)}return"code"in a&&(s.tags={...s.tags,"DOMException.code":`${a.code}`}),s}return Br(t)?Nt(e,t):Ce(t)||ft(t)?(s=wo(e,t,n,i),Le(s,{synthetic:!0}),s):(s=Xt(e,t,n,r),Mt(s,`${t}`),Le(s,{synthetic:!0}),s)}function Xt(e,t,n,r){let i={message:t};if(r&&n){let s=_n(e,n);s.length&&(i.exception={values:[{value:t,stacktrace:{frames:s}}]})}return i}function Io(e,{isUnhandledRejection:t}){let n=Bs(e),r=t?"promise rejection":"exception";return tn(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:ft(e)?`Event \`${Oo(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Oo(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Yo(e,{metadata:t,tunnel:n,dsn:r}){let i={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:mt(r)}},s=$o(e);return He(i,[s])}function $o(e){return[{type:"user_report"},e]}var Go=class extends uo{constructor(e){let t=S.SENTRY_SDK_SOURCE||Zs();e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${t}:@sentry/browser`,version:sr}],version:sr},super(e),e.sendClientReports&&S.document&&S.document.addEventListener("visibilitychange",()=>{S.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,t){return Uo(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return Bo(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn("SDK not enabled, will not capture user feedback.");return}let t=Yo(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("No outcomes to send");return}if(!this._dsn){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("No dsn provided, will not send outcomes");return}(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("Sending outcomes:",e);let t=xa(e,this._options.tunnel&&mt(this._dsn));this._sendEnvelope(t)}},$e;function Po(){if($e)return $e;if(Lt(S.fetch))return $e=S.fetch.bind(S);let e=S.document,t=S.fetch;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return $e=t.bind(S)}function jo(){$e=void 0}function Lo(e,t=Po()){let n=0,r=0;function i(s){let a=s.body.length;n+=a,r++;let o={body:s.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,o).then(c=>(n-=a,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 jo(),n-=a,r--,an(c)}}return _o(e,i)}var vt="?",Ao=30,Mo=40,Ho=50;function mn(e,t,n,r){let i={filename:e,function:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var qo=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Fo=/\((\S*)(?::(\d+))(?::(\d+))\)/,zo=e=>{let t=qo.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){let i=Fo.exec(t[2]);i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3])}let[n,r]=si(t[1]||vt,t[2]);return mn(r,n,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},Wo=[Ao,zo],Vo=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Jo=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ko=e=>{let t=Vo.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=Jo.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let n=t[3],r=t[1]||vt;return[r,n]=si(r,n),mn(n,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Xo=[Ho,Ko],Qo=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Zo=e=>{let t=Qo.exec(e);return t?mn(t[2],t[1]||vt,+t[3],t[4]?+t[4]:void 0):void 0},ec=[Mo,Zo],tc=[Wo,Xo,ec],nc=Is(...tc),si=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:vt,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Be=class{static __initStatic(){this.id="GlobalHandlers"}constructor(e){this.name=Be.id,this._options={onerror:!0,onunhandledrejection:!0,...e},this._installFunc={onerror:rc,onunhandledrejection:ic}}setupOnce(){Error.stackTraceLimit=50;let e=this._options;for(let t in e){let n=this._installFunc[t];n&&e[t]&&(oc(t),n(),this._installFunc[t]=void 0)}}};Be.__initStatic();function rc(){F("error",e=>{let[t,n,r]=ci();if(!t.getIntegration(Be))return;let{msg:i,url:s,line:a,column:o,error:c}=e;if(ri()||c&&c.__sentry_own_request__)return;let l=c===void 0&&ue(i)?ac(i,s,a,o):ai(fn(n,c||i,void 0,r,!1),s,a,o);l.level="error",oi(t,c,l,"onerror")})}function ic(){F("unhandledrejection",e=>{let[t,n,r]=ci();if(!t.getIntegration(Be))return;let i=e;try{"reason"in e?i=e.reason:"detail"in e&&"reason"in e.detail&&(i=e.detail.reason)}catch{}if(ri()||i&&i.__sentry_own_request__)return!0;let s=Ir(i)?sc(i):fn(n,i,void 0,r,!0);s.level="error",oi(t,i,s,"onunhandledrejection")})}function sc(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function ac(e,t,n,r){let i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,s=tn(e)?e.message:e,a="Error",o=s.match(i);return o&&(a=o[1],s=o[2]),ai({exception:{values:[{type:a,value:s}]}},t,n,r)}function ai(e,t,n,r){let i=e.exception=e.exception||{},s=i.values=i.values||[],a=s[0]=s[0]||{},o=a.stacktrace=a.stacktrace||{},c=o.frames=o.frames||[],l=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,p=ue(t)&&t.length>0?t:bs();return c.length===0&&c.push({colno:l,filename:p,function:"?",in_app:!0,lineno:u}),e}function oc(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log(`Global Handler attached: ${e}`)}function oi(e,t,n,r){Le(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function ci(){let e=k(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}var cc=["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"],gn=class{static __initStatic(){this.id="TryCatch"}constructor(e){this.name=gn.id,this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){this._options.setTimeout&&I(S,"setTimeout",or),this._options.setInterval&&I(S,"setInterval",or),this._options.requestAnimationFrame&&I(S,"requestAnimationFrame",uc),this._options.XMLHttpRequest&&"XMLHttpRequest"in S&&I(XMLHttpRequest.prototype,"send",lc);let e=this._options.eventTarget;e&&(Array.isArray(e)?e:cc).forEach(pc)}};gn.__initStatic();function or(e){return function(...t){let n=t[0];return t[0]=ke(n,{mechanism:{data:{function:le(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function uc(e){return function(t){return e.apply(this,[ke(t,{mechanism:{data:{function:"requestAnimationFrame",handler:le(e)},handled:!1,type:"instrument"}})])}}function lc(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(r=>{r in n&&typeof n[r]=="function"&&I(n,r,function(i){let s={mechanism:{data:{function:r,handler:le(i)},handled:!1,type:"instrument"}},a=sn(i);return a&&(s.mechanism.data.handler=le(a)),ke(i,s)})}),e.apply(this,t)}}function pc(e){let t=S,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(I(n,"addEventListener",function(r){return function(i,s,a){try{typeof s.handleEvent=="function"&&(s.handleEvent=ke(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:le(s),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,ke(s,{mechanism:{data:{function:"addEventListener",handler:le(s),target:e},handled:!1,type:"instrument"}}),a])}}),I(n,"removeEventListener",function(r){return function(i,s,a){let o=s;try{let c=o&&o.__sentry_wrapped__;c&&r.call(this,i,c,a)}catch{}return r.call(this,i,o,a)}}))}var nt=1024,Et=class{static __initStatic(){this.id="Breadcrumbs"}constructor(e){this.name=Et.id,this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){if(this.options.console&&F("console",_c),this.options.dom&&F("dom",hc(this.options.dom)),this.options.xhr&&F("xhr",fc),this.options.fetch&&F("fetch",mc),this.options.history&&F("history",gc),this.options.sentry){let e=k().getClient();e&&e.on&&e.on("beforeSendEvent",dc)}}};Et.__initStatic();function dc(e){k().addBreadcrumb({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:oe(e)},{event:e})}function hc(e){function t(n){let r,i=typeof e=="object"?e.serializeAttribute:void 0,s=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;s&&s>nt&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn(`\`dom.maxStringLength\` cannot exceed ${nt}, but a value of ${s} was configured. Sentry will use ${nt} instead.`),s=nt),typeof i=="string"&&(i=[i]);try{let a=n.event;r=yc(a)?we(a.target,{keyAttrs:i,maxStringLength:s}):we(a,{keyAttrs:i,maxStringLength:s})}catch{r="<unknown>"}r.length!==0&&k().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return t}function _c(e){let t={category:"console",data:{arguments:e.args,logger:"console"},level:ca(e.level),message:$n(e.args," ")};if(e.level==="assert")if(e.args[0]===!1)t.message=`Assertion failed: ${$n(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1);else return;k().addBreadcrumb(t,{input:e.args,level:e.level})}function fc(e){let{startTimestamp:t,endTimestamp:n}=e,r=e.xhr[be];if(!t||!n||!r)return;let{method:i,url:s,status_code:a,body:o}=r,c={method:i,url:s,status_code:a},l={xhr:e.xhr,input:o,startTimestamp:t,endTimestamp:n};k().addBreadcrumb({category:"xhr",data:c,type:"http"},l)}function mc(e){let{startTimestamp:t,endTimestamp:n}=e;if(n&&!(e.fetchData.url.match(/sentry_key/)&&e.fetchData.method==="POST"))if(e.error){let r=e.fetchData,i={data:e.error,input:e.args,startTimestamp:t,endTimestamp:n};k().addBreadcrumb({category:"fetch",data:r,level:"error",type:"http"},i)}else{let r={...e.fetchData,status_code:e.response&&e.response.status},i={input:e.args,response:e.response,startTimestamp:t,endTimestamp:n};k().addBreadcrumb({category:"fetch",data:r,type:"http"},i)}}function gc(e){let t=e.from,n=e.to,r=Dt(S.location.href),i=Dt(t),s=Dt(n);i.path||(i=r),r.protocol===s.protocol&&r.host===s.host&&(n=s.relative),r.protocol===i.protocol&&r.host===i.host&&(t=i.relative),k().addBreadcrumb({category:"navigation",data:{from:t,to:n}})}function yc(e){return!!e&&!!e.target}var vc="cause",Ec=5,St=class{static __initStatic(){this.id="LinkedErrors"}constructor(e={}){this.name=St.id,this._key=e.key||vc,this._limit=e.limit||Ec}setupOnce(){}preprocessEvent(e,t,n){let r=n.getOptions();ys(ii,r.stackParser,r.maxValueLength,this._key,this._limit,e,t)}};St.__initStatic();var bt=class{static __initStatic(){this.id="HttpContext"}constructor(){this.name=bt.id}setupOnce(){}preprocessEvent(e){if(!S.navigator&&!S.location&&!S.document)return;let t=e.request&&e.request.url||S.location&&S.location.href,{referrer:n}=S.document||{},{userAgent:r}=S.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},s={...e.request,...t&&{url:t},headers:i};e.request=s}};bt.__initStatic();var Tt=class{static __initStatic(){this.id="Dedupe"}constructor(){this.name=Tt.id}setupOnce(e,t){}processEvent(e){if(e.type)return e;try{if(Sc(e,this._previousEvent))return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return this._previousEvent=e}};Tt.__initStatic();function Sc(e,t){return t?!!(bc(e,t)||Tc(e,t)):!1}function bc(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!li(e,t)||!ui(e,t))}function Tc(e,t){let n=cr(t),r=cr(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!li(e,t)||!ui(e,t))}function ui(e,t){let n=ur(e),r=ur(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){let s=r[i],a=n[i];if(s.filename!==a.filename||s.lineno!==a.lineno||s.colno!==a.colno||s.function!==a.function)return!1}return!0}function li(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function cr(e){return e.exception&&e.exception.values&&e.exception.values[0]}function ur(e){let t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}var pi={};wr(pi,{Breadcrumbs:()=>Et,Dedupe:()=>Tt,GlobalHandlers:()=>Be,HttpContext:()=>bt,LinkedErrors:()=>St,TryCatch:()=>gn});var E=D;function xc(){E&&E.document?E.document.addEventListener("visibilitychange",()=>{let e=Fe();if(E.document.hidden&&e){let t="cancelled";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${e.op}`),e.status||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.finish()}}):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var yn=(e,t,n)=>{let r,i;return s=>{t.value>=0&&(s||n)&&(i=t.value-(r||0),(i||r===void 0)&&(r=t.value,t.delta=i,e(t)))}},Rc=()=>`v3-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`,Cc=()=>{let e=E.performance.timing,t=E.performance.navigation.type,n={entryType:"navigation",startTime:0,type:t==2?"back_forward":t===1?"reload":"navigate"};for(let r in e)r!=="navigationStart"&&r!=="toJSON"&&(n[r]=Math.max(e[r]-e.navigationStart,0));return n},di=()=>E.__WEB_VITALS_POLYFILL__?E.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||Cc()):E.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],hi=()=>{let e=di();return e&&e.activationStart||0},vn=(e,t)=>{let n=di(),r="navigate";return n&&(E.document.prerendering||hi()>0?r="prerender":r=n.type.replace(/_/g,"-")),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:Rc(),navigationType:r}},ze=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(i=>{t(i.getEntries())});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},xt=(e,t)=>{let n=r=>{(r.type==="pagehide"||E.document.visibilityState==="hidden")&&(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},wc=e=>{let t=vn("CLS",0),n,r=0,i=[],s=o=>{o.forEach(c=>{if(!c.hadRecentInput){let l=i[0],u=i[i.length-1];r&&i.length!==0&&c.startTime-u.startTime<1e3&&c.startTime-l.startTime<5e3?(r+=c.value,i.push(c)):(r=c.value,i=[c]),r>t.value&&(t.value=r,t.entries=i,n&&n())}})},a=ze("layout-shift",s);if(a){n=yn(e,t);let o=()=>{s(a.takeRecords()),n(!0)};return xt(o),o}},lt=-1,Dc=()=>E.document.visibilityState==="hidden"&&!E.document.prerendering?0:1/0,kc=()=>{xt(({timeStamp:e})=>{lt=e},!0)},En=()=>(lt<0&&(lt=Dc(),kc()),{get firstHiddenTime(){return lt}}),Nc=e=>{let t=En(),n=vn("FID"),r,i=o=>{o.startTime<t.firstHiddenTime&&(n.value=o.processingStart-o.startTime,n.entries.push(o),r(!0))},s=o=>{o.forEach(i)},a=ze("first-input",s);r=yn(e,n),a&&xt(()=>{s(a.takeRecords()),a.disconnect()},!0)},lr={},Uc=e=>{let t=En(),n=vn("LCP"),r,i=a=>{let o=a[a.length-1];if(o){let c=Math.max(o.startTime-hi(),0);c<t.firstHiddenTime&&(n.value=c,n.entries=[o],r())}},s=ze("largest-contentful-paint",i);if(s){r=yn(e,n);let a=()=>{lr[n.id]||(i(s.takeRecords()),s.disconnect(),lr[n.id]=!0,r(!0))};return["keydown","click"].forEach(o=>{addEventListener(o,a,{once:!0,capture:!0})}),xt(a,!0),a}};function Ut(e){return typeof e=="number"&&isFinite(e)}function Ne(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}function w(e){return e/1e3}function _i(){return E&&E.addEventListener&&E.performance}var pr=0,x={},Q,je;function Bc(){let e=_i();if(e&&ee){e.mark&&E.performance.mark("sentry-tracing-init"),Gc();let t=Yc(),n=$c();return()=>{t&&t(),n&&n()}}return()=>{}}function Ic(){ze("longtask",e=>{for(let t of e){let n=Fe();if(!n)return;let r=w(ee+t.startTime),i=w(t.duration);n.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+i})}})}function Oc(){ze("event",e=>{for(let t of e){let n=Fe();if(!n)return;if(t.name==="click"){let r=w(ee+t.startTime),i=w(t.duration);n.startChild({description:we(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+i})}}},{durationThreshold:0})}function Yc(){return wc(e=>{let t=e.entries.pop();t&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("[Measurements] Adding CLS"),x.cls={value:e.value,unit:""},je=t)})}function $c(){return Uc(e=>{let t=e.entries.pop();t&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("[Measurements] Adding LCP"),x.lcp={value:e.value,unit:"millisecond"},Q=t)})}function Gc(){Nc(e=>{let t=e.entries.pop();if(!t)return;let n=w(ee),r=w(t.startTime);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("[Measurements] Adding FID"),x.fid={value:e.value,unit:"millisecond"},x["mark.fid"]={value:n+r,unit:"second"}})}function Pc(e){let t=_i();if(!t||!E.performance.getEntries||!ee)return;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("[Tracing] Adding & adjusting spans using Performance API");let n=w(ee),r=t.getEntries(),i,s;if(r.slice(pr).forEach(a=>{let o=w(a.startTime),c=w(a.duration);if(!(e.op==="navigation"&&n+o<e.startTimestamp))switch(a.entryType){case"navigation":{Lc(e,a,n),i=n+w(a.responseStart),s=n+w(a.requestStart);break}case"mark":case"paint":case"measure":{jc(e,a,o,c,n);let l=En(),u=a.startTime<l.firstHiddenTime;a.name==="first-paint"&&u&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("[Measurements] Adding FP"),x.fp={value:a.startTime,unit:"millisecond"}),a.name==="first-contentful-paint"&&u&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("[Measurements] Adding FCP"),x.fcp={value:a.startTime,unit:"millisecond"});break}case"resource":{let l=a.name.replace(E.location.origin,"");Mc(e,a,l,o,c,n);break}}}),pr=Math.max(r.length-1,0),Hc(e),e.op==="pageload"){typeof i=="number"&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("[Measurements] Adding TTFB"),x.ttfb={value:(i-e.startTimestamp)*1e3,unit:"millisecond"},typeof s=="number"&&s<=i&&(x["ttfb.requestTime"]={value:(i-s)*1e3,unit:"millisecond"})),["fcp","fp","lcp"].forEach(o=>{if(!x[o]||n>=e.startTimestamp)return;let c=x[o].value,l=n+w(c),u=Math.abs((l-e.startTimestamp)*1e3),p=u-c;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log(`[Measurements] Normalized ${o} from ${c} to ${u} (${p})`),x[o].value=u});let a=x["mark.fid"];a&&x.fid&&(Ne(e,{description:"first input delay",endTimestamp:a.value+w(x.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:a.value}),delete x["mark.fid"]),"fcp"in x||delete x.cls,Object.keys(x).forEach(o=>{e.setMeasurement(o,x[o].value,x[o].unit)}),qc(e)}Q=void 0,je=void 0,x={}}function jc(e,t,n,r,i){let s=i+n,a=s+r;return Ne(e,{description:t.name,endTimestamp:a,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:s}),s}function Lc(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{rt(e,t,r,n)}),rt(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),rt(e,t,"fetch",n,"cache","domainLookupStart"),rt(e,t,"domainLookup",n,"DNS"),Ac(e,t,n)}function rt(e,t,n,r,i,s){let a=s?t[s]:t[`${n}End`],o=t[`${n}Start`];!o||!a||Ne(e,{op:"browser",origin:"auto.browser.browser.metrics",description:i||n,startTimestamp:r+w(o),endTimestamp:r+w(a)})}function Ac(e,t,n){Ne(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+w(t.requestStart),endTimestamp:n+w(t.responseEnd)}),Ne(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+w(t.responseStart),endTimestamp:n+w(t.responseEnd)})}function Mc(e,t,n,r,i,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;let a={};"transferSize"in t&&(a["http.response_transfer_size"]=t.transferSize),"encodedBodySize"in t&&(a["http.response_content_length"]=t.encodedBodySize),"decodedBodySize"in t&&(a["http.decoded_response_content_length"]=t.decodedBodySize),"renderBlockingStatus"in t&&(a["resource.render_blocking_status"]=t.renderBlockingStatus);let o=s+r,c=o+i;Ne(e,{description:n,endTimestamp:c,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:o,data:a})}function Hc(e){let t=E.navigator;if(!t)return;let n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),Ut(n.rtt)&&(x["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Ut(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),Ut(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}function qc(e){Q&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("[Measurements] Adding LCP Data"),Q.element&&e.setTag("lcp.element",we(Q.element)),Q.id&&e.setTag("lcp.id",Q.id),Q.url&&e.setTag("lcp.url",Q.url.trim().slice(0,200)),e.setTag("lcp.size",Q.size)),je&&je.sources&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("[Measurements] Adding CLS Data"),je.sources.forEach((t,n)=>e.setTag(`cls.source.${n+1}`,we(t.node))))}var Qt=["localhost",/^\/(?!\/)/],Zt={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:Qt,tracePropagationTargets:Qt};function Fc(e){let{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:i,shouldCreateSpanForRequest:s,enableHTTPTimings:a}={traceFetch:Zt.traceFetch,traceXHR:Zt.traceXHR,...e},o=typeof s=="function"?s:u=>!0,c=u=>Jc(u,r||i),l={};t&&F("fetch",u=>{let p=Kc(u,o,c,l);a&&p&&dr(p)}),n&&F("xhr",u=>{let p=Qc(u,o,c,l);a&&p&&dr(p)})}function zc(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function dr(e){let t=e.data.url,n=new PerformanceObserver(r=>{r.getEntries().forEach(i=>{zc(i)&&i.name.endsWith(t)&&(Vc(i).forEach(s=>e.setData(...s)),n.disconnect())})});n.observe({entryTypes:["resource"]})}function Wc(e){let t="unknown",n="unknown",r="";for(let i of e){if(i==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(i))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function X(e=0){return((ee||performance.timeOrigin)+e)/1e3}function Vc(e){let{name:t,version:n}=Wc(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),ee?[...r,["http.request.redirect_start",X(e.redirectStart)],["http.request.fetch_start",X(e.fetchStart)],["http.request.domain_lookup_start",X(e.domainLookupStart)],["http.request.domain_lookup_end",X(e.domainLookupEnd)],["http.request.connect_start",X(e.connectStart)],["http.request.secure_connection_start",X(e.secureConnectionStart)],["http.request.connection_end",X(e.connectEnd)],["http.request.request_start",X(e.requestStart)],["http.request.response_start",X(e.responseStart)],["http.request.response_end",X(e.responseEnd)]]:r}function Jc(e,t){return Ae(e,t||Qt)}function Kc(e,t,n,r){if(!pn()||!e.fetchData)return;let i=t(e.fetchData.url);if(e.endTimestamp&&i){let h=e.fetchData.__span;if(!h)return;let _=r[h];if(_){if(e.response){_.setHttpStatus(e.response.status);let f=e.response&&e.response.headers&&e.response.headers.get("content-length"),g=parseInt(f);g>0&&_.setData("http.response_content_length",g)}else e.error&&_.setStatus("internal_error");_.finish(),delete r[h]}return}let s=k(),a=s.getScope(),o=s.getClient(),c=a.getSpan(),{method:l,url:u}=e.fetchData,p=i&&c?c.startChild({data:{url:u,type:"fetch","http.method":l},description:`${l} ${u}`,op:"http.client",origin:"auto.http.browser"}):void 0;if(p&&(e.fetchData.__span=p.spanId,r[p.spanId]=p),n(e.fetchData.url)&&o){let h=e.args[0];e.args[1]=e.args[1]||{};let _=e.args[1];_.headers=Xc(h,o,a,_,p)}return p}function Xc(e,t,n,r,i){let s=i||n.getSpan(),a=s&&s.transaction,{traceId:o,sampled:c,dsc:l}=n.getPropagationContext(),u=s?s.toTraceparent():on(o,void 0,c),p=a?a.getDynamicSamplingContext():l||yt(o,t,n),h=zt(p),_=typeof Request<"u"&&ie(e,Request)?e.headers:r.headers;if(_)if(typeof Headers<"u"&&ie(_,Headers)){let f=new Headers(_);return f.append("sentry-trace",u),h&&f.append(Ft,h),f}else if(Array.isArray(_)){let f=[..._,["sentry-trace",u]];return h&&f.push([Ft,h]),f}else{let f="baggage"in _?_.baggage:void 0,g=[];return Array.isArray(f)?g.push(...f):f&&g.push(f),h&&g.push(h),{..._,"sentry-trace":u,baggage:g.length>0?g.join(","):void 0}}else return{"sentry-trace":u,baggage:h}}function Qc(e,t,n,r){let i=e.xhr,s=i&&i[be];if(!pn()||i&&i.__sentry_own_request__||!i||!s)return;let a=t(s.url);if(e.endTimestamp&&a){let p=i.__sentry_xhr_span_id__;if(!p)return;let h=r[p];h&&(h.setHttpStatus(s.status_code),h.finish(),delete r[p]);return}let o=k(),c=o.getScope(),l=c.getSpan(),u=a&&l?l.startChild({data:{...s.data,type:"xhr","http.method":s.method,url:s.url},description:`${s.method} ${s.url}`,op:"http.client",origin:"auto.http.browser"}):void 0;if(u&&(i.__sentry_xhr_span_id__=u.spanId,r[i.__sentry_xhr_span_id__]=u),i.setRequestHeader&&n(s.url))if(u){let p=u&&u.transaction,h=p&&p.getDynamicSamplingContext(),_=zt(h);hr(i,u.toTraceparent(),_)}else{let p=o.getClient(),{traceId:h,sampled:_,dsc:f}=c.getPropagationContext(),g=on(h,void 0,_),y=f||(p?yt(h,p,c):void 0),C=zt(y);hr(i,g,C)}return u}function hr(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(Ft,n)}catch{}}function Zc(e,t=!0,n=!0){if(!E||!E.location){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn("Could not initialize routing instrumentation due to invalid location");return}let r=E.location.href,i;t&&(i=e({name:E.location.pathname,startTimestamp:ee?ee/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&F("history",({to:s,from:a})=>{if(a===void 0&&r&&r.indexOf(s)!==-1){r=void 0;return}a!==s&&(r=void 0,i&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log(`[Tracing] Finishing current transaction with op: ${i.op}`),i.finish()),i=e({name:E.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}var eu="BrowserTracing",tu={...ut,markBackgroundTransactions:!0,routingInstrumentation:Zc,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...Zt},nu=class{constructor(e){this.name=eu,this._hasSetTracePropagationTargets=!1,Fa(),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&(this._hasSetTracePropagationTargets=!!(e&&(e.tracePropagationTargets||e.tracingOrigins))),this.options={...tu,...e},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),e&&!e.tracePropagationTargets&&e.tracingOrigins&&(this.options.tracePropagationTargets=e.tracingOrigins),this._collectWebVitals=Bc(),this.options.enableLongTask&&Ic(),this.options._experiments.enableInteractions&&Oc()}setupOnce(e,t){this._getCurrentHub=t;let n=t().getClient(),r=n&&n.getOptions(),{routingInstrumentation:i,startTransactionOnLocationChange:s,startTransactionOnPageLoad:a,markBackgroundTransactions:o,traceFetch:c,traceXHR:l,shouldCreateSpanForRequest:u,enableHTTPTimings:p,_experiments:h}=this.options,_=r&&r.tracePropagationTargets,f=_||this.options.tracePropagationTargets;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&this._hasSetTracePropagationTargets&&_&&d.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),i(g=>{let y=this._createRouteTransaction(g);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(y,g,t),y},a,s),o&&xc(),h.enableInteractions&&this._registerInteractionListener(),Fc({traceFetch:c,traceXHR:l,tracePropagationTargets:f,shouldCreateSpanForRequest:u,enableHTTPTimings:p})}_createRouteTransaction(e){if(!this._getCurrentHub){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn(`[Tracing] Did not create ${e.op} transaction because _getCurrentHub is invalid.`);return}let t=this._getCurrentHub(),{beforeNavigate:n,idleTimeout:r,finalTimeout:i,heartbeatInterval:s}=this.options,a=e.op==="pageload",o=a?_r("sentry-trace"):"",c=a?_r("baggage"):"",{traceparentData:l,dynamicSamplingContext:u,propagationContext:p}=ga(o,c),h={...e,...l,metadata:{...e.metadata,dynamicSamplingContext:l&&!u?{}:u},trimEnd:!0},_=typeof n=="function"?n(h):h,f=_===void 0?{...h,sampled:!1}:_;f.metadata=f.name!==h.name?{...f.metadata,source:"custom"}:f.metadata,this._latestRouteName=f.name,this._latestRouteSource=f.metadata&&f.metadata.source,f.sampled===!1&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log(`[Tracing] Will not send ${f.op} transaction because of beforeNavigate.`),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log(`[Tracing] Starting ${f.op} transaction on scope`);let{location:g}=E,y=er(t,f,r,i,!0,{location:g},s),C=t.getScope();return a&&l?C.setPropagationContext(p):C.setPropagationContext({traceId:y.traceId,spanId:y.spanId,parentSpanId:y.parentSpanId,sampled:y.sampled}),y.registerBeforeFinishCallback(R=>{this._collectWebVitals(),Pc(R)}),y}_registerInteractionListener(){let e,t=()=>{let{idleTimeout:n,finalTimeout:r,heartbeatInterval:i}=this.options,s="ui.action.click",a=Fe();if(a&&a.op&&["navigation","pageload"].includes(a.op)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn(`[Tracing] Did not create ${s} transaction because a pageload or navigation transaction is in progress.`);return}if(e&&(e.setFinishReason("interactionInterrupted"),e.finish(),e=void 0),!this._getCurrentHub){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn(`[Tracing] Did not create ${s} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRouteName){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn(`[Tracing] Did not create ${s} transaction because _latestRouteName is missing.`);return}let o=this._getCurrentHub(),{location:c}=E,l={name:this._latestRouteName,op:s,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}};e=er(o,l,n,r,!0,{location:c},i)};["click"].forEach(n=>{addEventListener(n,t,{once:!1,capture:!0})})}};function _r(e){let t=Ts(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}var fi={};S.Sentry&&S.Sentry.Integrations&&(fi=S.Sentry.Integrations);({...fi,...ni,...pi});var ru="https://d233059272824702afc8c43834c4912d@sentry.hcaptcha.com/6",it=null;function mi(e,t){if(e===!1)return Bt(e);if(it)return Bt(it,t);let n=new Go({dsn:ru,transport:Lo,stackParser:nc,integrations:[new Et,new Be,new St,new Tt,new bt,new nu]});return it=new ln(n),Bt(it,t)}function Bt(e,t={key:"source",value:"@hCaptcha/loader"}){return{addBreadcrumb:n=>{e&&e.addBreadcrumb(n)},captureMessage:n=>{e&&e.withScope(function(r){r.setTag(t.key,t.value),e.captureMessage(n)})},captureException:n=>{e&&e.withScope(function(r){r.setTag(t.key,t.value),e.captureEvent({message:Yt,level:"error",extra:n})})}}}function iu({scriptLocation:e,query:t,loadAsync:n=!0,crossOrigin:r,apihost:i="https://js.hcaptcha.com",cleanup:s=!0}={}){let a=kr(e),o=Dr(a);return new Promise((c,l)=>{let u=o.document.createElement("script");u.id=ds,u.src=`${i}/1/api.js?onload=${Nr}`,u.crossOrigin=r,u.async=n;let p=(h,_)=>{try{s&&a.removeChild(u),_(h)}catch(f){l(f)}};u.onload=h=>p(h,c),u.onerror=h=>p(h,l),u.src+=t!==""?`&${t}`:"",a.appendChild(u)})}var st=[];function su(e={cleanup:!0},t){try{t.addBreadcrumb({category:Se,message:"hCaptcha loader params",data:e});let n=kr(e.scriptLocation),r=Dr(n),i=st.find(({scope:a})=>a===r.window);if(i)return t.addBreadcrumb({category:Se,message:"hCaptcha already loaded"}),i.promise;let s=new Promise(async(a,o)=>{try{r.window[Nr]=()=>{t.addBreadcrumb({category:Se,message:"hCaptcha script called onload function"}),a(r.window.hcaptcha)};let c=ps({custom:e.custom,render:e.render,sentry:e.sentry,assethost:e.assethost,imghost:e.imghost,reportapi:e.reportapi,endpoint:e.endpoint,host:e.host,recaptchacompat:e.recaptchacompat,hl:e.hl});await iu({query:c,...e}),t.addBreadcrumb({category:Se,message:"hCaptcha loaded",data:i})}catch(c){t.addBreadcrumb({category:Se,message:"hCaptcha failed to load",data:c});let l=st.findIndex(u=>u.scope===r.window);l!==-1&&st.splice(l,1),t.captureException(c),o(new Error(Yt))}});return st.push({promise:s,scope:r.window}),s}catch(n){return t.captureException(n),Promise.reject(new Error(Yt))}}async function gi(e,t=0){let n=t<2?"Retry loading hCaptcha Api":"Exceeded maximum retries",r=mi(e.sentry);try{return await su(e,r)}catch(i){return r.addBreadcrumb({SENTRY_SOURCE:Se,message:n,data:{error:i}}),t>=2?(r.captureException(i),Promise.reject(i)):(t+=1,gi(e,t))}}async function au(e){return await gi(e)}function fr(e){var t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function mr(e){return e||document.head}var Ee={key:"source",value:"@hCaptcha/react"},Ye={mounted:"hCaptcha component mounted",expired:"hCaptcha expired",unmounted:"hCaptcha component unmounted",reset:"hCaptcha reset",removed:"hCaptcha removed"},ou=function(e){Si(t,e);function t(r){var i;return i=e.call(this,r)||this,i._hcaptcha=void 0,i.renderCaptcha=i.renderCaptcha.bind(H(i)),i.resetCaptcha=i.resetCaptcha.bind(H(i)),i.removeCaptcha=i.removeCaptcha.bind(H(i)),i.isReady=i.isReady.bind(H(i)),i.loadCaptcha=i.loadCaptcha.bind(H(i)),i.handleOnLoad=i.handleOnLoad.bind(H(i)),i.handleSubmit=i.handleSubmit.bind(H(i)),i.handleExpire=i.handleExpire.bind(H(i)),i.handleError=i.handleError.bind(H(i)),i.handleOpen=i.handleOpen.bind(H(i)),i.handleClose=i.handleClose.bind(H(i)),i.handleChallengeExpired=i.handleChallengeExpired.bind(H(i)),i.ref=L.createRef(),i.apiScriptRequested=!1,i.sentryHub=null,i.state={isApiReady:!1,isRemoved:!1,elementId:r.id,captchaId:""},i}var n=t.prototype;return n.componentDidMount=function(){var i=this,s=mr(this.props.scriptLocation),a=fr(s);this._hcaptcha=a.window.hcaptcha||void 0;var o=typeof this._hcaptcha<"u";if(this.sentryHub=mi(this.props.sentry,Ee),this.sentryHub.addBreadcrumb({category:Ee.value,message:Ye.mounted}),o){this.setState({isApiReady:!0},function(){i.renderCaptcha()});return}this.loadCaptcha()},n.componentWillUnmount=function(){var i=this.state.captchaId,s=this._hcaptcha;this.isReady()&&(s.reset(i),s.remove(i),this.sentryHub.addBreadcrumb({category:Ee.value,message:Ye.unmounted}))},n.shouldComponentUpdate=function(i,s){return!(this.state.isApiReady!==s.isApiReady||this.state.isRemoved!==s.isRemoved)},n.componentDidUpdate=function(i){var s=this,a=["sitekey","size","theme","tabindex","languageOverride","endpoint"],o=a.every(function(c){return i[c]===s.props[c]});o||this.removeCaptcha(function(){s.renderCaptcha()})},n.loadCaptcha=function(){if(!this.apiScriptRequested){var i=this.props,s=i.apihost,a=i.assethost,o=i.endpoint,c=i.host,l=i.imghost,u=i.languageOverride,p=i.reCaptchaCompat,h=i.reportapi,_=i.sentry,f=i.custom,g=i.loadAsync,y=i.scriptLocation,C=i.cleanup,R=C===void 0?!0:C,G={render:"explicit",apihost:s,assethost:a,endpoint:o,hl:u,host:c,imghost:l,recaptchacompat:p===!1?"off":null,reportapi:h,sentry:_,custom:f,loadAsync:g,scriptLocation:y,cleanup:R};au(G).then(this.handleOnLoad,this.handleError).catch(this.handleError),this.apiScriptRequested=!0}},n.renderCaptcha=function(i){var s=this.state.isApiReady;if(s){var a=Object.assign({"open-callback":this.handleOpen,"close-callback":this.handleClose,"error-callback":this.handleError,"chalexpired-callback":this.handleChallengeExpired,"expired-callback":this.handleExpire,callback:this.handleSubmit},this.props,{hl:this.props.hl||this.props.languageOverride,languageOverride:void 0}),o=this._hcaptcha,c=o.render(this.ref.current,a);this.setState({isRemoved:!1,captchaId:c},function(){i&&i()})}},n.resetCaptcha=function(){var i=this.state.captchaId,s=this._hcaptcha;this.isReady()&&(s.reset(i),this.sentryHub.addBreadcrumb({category:Ee.value,message:Ye.reset}))},n.removeCaptcha=function(i){var s=this.state.captchaId,a=this._hcaptcha;this.isReady()&&(this.setState({isRemoved:!0},function(){a.remove(s),i&&i()}),this.sentryHub.addBreadcrumb({category:Ee.value,message:Ye.removed}))},n.handleOnLoad=function(){var i=this;this.setState({isApiReady:!0},function(){try{var s=mr(i.props.scriptLocation),a=fr(s);i._hcaptcha=a.window.hcaptcha,i.renderCaptcha(function(){var o=i.props.onLoad;o&&o()})}catch(o){i.sentryHub.captureException(o)}})},n.handleSubmit=function(i){var s=this.props.onVerify,a=this.state,o=a.isRemoved,c=a.captchaId,l=this._hcaptcha;if(!(typeof l>"u"||o)){var u=l.getResponse(c),p=l.getRespKey(c);s&&s(u,p)}},n.handleExpire=function(){var i=this.props.onExpire,s=this.state.captchaId,a=this._hcaptcha;this.isReady()&&(a.reset(s),i&&i(),this.sentryHub.addBreadcrumb({category:Ee.value,message:Ye.expired}))},n.handleError=function(i){var s=this.props.onError,a=this.state.captchaId,o=this._hcaptcha;this.isReady()&&o.reset(a),s&&s(i)},n.isReady=function(){var i=this.state,s=i.isApiReady,a=i.isRemoved;return s&&!a},n.handleOpen=function(){!this.isReady()||!this.props.onOpen||this.props.onOpen()},n.handleClose=function(){!this.isReady()||!this.props.onClose||this.props.onClose()},n.handleChallengeExpired=function(){!this.isReady()||!this.props.onChalExpired||this.props.onChalExpired()},n.execute=function(i){i===void 0&&(i=null);try{var s=this.state.captchaId,a=this._hcaptcha;return this.isReady()?(i&&typeof i!="object"&&(i=null),a.execute(s,i)):void 0}catch(o){this.sentryHub.captureException(o)}},n.setData=function(i){var s=this.state.captchaId,a=this._hcaptcha;this.isReady()&&(i&&typeof i!="object"&&(i=null),a.setData(s,i))},n.getResponse=function(){var i=this._hcaptcha;return i.getResponse(this.state.captchaId)},n.getRespKey=function(){var i=this._hcaptcha;return i.getRespKey(this.state.captchaId)},n.render=function(){var i=this.state.elementId;return L.createElement("div",{ref:this.ref,id:i})},t}(L.Component);function bu({productId:e}){var me;const t=Ci("hcaptcha"),{notify:n}=wi(),i=(me=Ti().location.state)==null?void 0:me.returnTo,s=L.useRef(null),[a,o]=L.useState(),{availablePlans:c,error:l,isInitialLoading:u}=gr({includeRenewsOn:!0}),p=b=>{var P,M,K,de;if(!xi(b))return;let A=`Failed to create payment: ${b.message}`;((P=b.response)==null?void 0:P.data.details)==="Can't create a subscription without a verified email."?A="You must verify your email address before subscribing to Nebula.":((M=b.response)==null?void 0:M.data.details)==="Plan does not exist"?A="The product you selected is no longer available for purchase.":typeof((K=b.response)==null?void 0:K.data.captcha_response)=="string"?A=b.response.data.captcha_response:typeof((de=b.response)==null?void 0:de.data.details)=="string"&&(A=b.response.data.details),n(A,{type:"error"})},{mutate:h,isLoading:_,data:f}=Di({onError:p}),{mutate:g,isLoading:y,data:C}=ki({onError:p}),R=L.useMemo(()=>cu(c,b=>b.product_id===e),[c,e]),G=t&&(R==null?void 0:R.period)!=="unlimited",z=G&&a===void 0;L.useEffect(()=>{if(!z)return;let b;const A=()=>{var P,M;(P=s.current)!=null&&P.isReady()?(b=void 0,(M=s.current)==null||M.execute()):b=requestAnimationFrame(A)};return A(),()=>{b!==void 0&&cancelAnimationFrame(b)}},[z]);const te=L.useMemo(()=>{var b;return new URL(`/join${Ni({step:"success",returnTo:i?i.pathname+((b=i.search)!=null?b:""):void 0})}`,Ui())},[i]);if(u)return null;const pe=G?m(uu,{}):null;return l?m(Bi,{error:l}):C!=null&&C.checkout_session_url?m(wn,{to:C.checkout_session_url}):f!=null&&f.checkout_session_url?m(wn,{to:f.checkout_session_url}):O(Ge,{children:[R?m(Ge,{children:z?O(Ge,{children:[m(ou,{sitekey:"354de187-a0de-4b6a-8b99-7812224ecef4",ref:s,size:"invisible",onVerify:b=>o(b),onError:()=>{o("")},onClose:()=>{o("")}}),m(bn,{size:"jumbo",disabled:!0,children:"Verifying..."})]}):m(bn,{size:"jumbo",onClick:()=>{R.period==="unlimited"?g({product_id:R.product_id,success_url:te.toString()}):h({plan_id:R.product_id,success_url:te.toString(),captcha_response:a})},disabled:y||_,children:"Proceed to payment"})}):null,z?pe:null]})}function cu(e,t){for(const n of e)for(const r of n.products)if(t(r))return r}function uu(){return O("div",{css:lu.wrapper,children:["This site is protected by hCaptcha and its"," ",m(Tn,{to:"https://www.hcaptcha.com/privacy",children:"Privacy Policy"})," and"," ",m(Tn,{to:"https://www.hcaptcha.com/terms",children:"Terms of Service"})," apply."]})}const lu={wrapper:bi({marginTop:"24px",fontSize:"11px",lineHeight:"14px",color:q.label400,textAlign:"center",a:{textDecoration:"underline",color:"unset",":hover":{color:"unset"}}})};function en(e,t){return t==="usd"?`$${e}`:`${e}${t}`}function pu(e,t){for(const n of e)for(const r of n.products)if(t(r))return r}function Tu({plan:e,product:t,proratedPrice:n,setShowChange:r,deferredStartDate:i,showYourSubscriptionTitle:s=!1,isCurrentlySubscribedToCS:a}){var K,de;const{user:o}=Ii(),{getThemeData:c}=Oi(),{availablePlans:l}=Yi(),u=pu(l,ge=>ge.period===(t==null?void 0:t.period)),{currentSubscriptions:p,prepaidPendingSubscriptions:h}=gr(),_=p.some(ge=>ge.product.product_id===t.product_id),f=Ri(h),{title:g}=e,{period:y,renews_on:C}=t;let R;y==="yearly"?R="/year":y==="monthly"?R="/month":y==="unlimited"&&(R="");const G=(K=u==null?void 0:u.price)!=null?K:t.price;let z=0;o!=null&&o.promotion&&o.promotion.discounted_plan.stripe_id===t.product_id&&(z=Number(G)-((de=o==null?void 0:o.promotion)==null?void 0:de.discounted_plan.amount_in_cents)/100);const te=n||t.price,pe=Number(G)-Number(te),me=c({light:{backgroundColor:ye.neutral0},dark:{backgroundColor:ye.neutral900}}),b=!!n&&n!==G,A=a&&G!==te,P=a&&y==="yearly",M=G!==te&&!n&&!z&&!a;return O("div",{css:{backgroundColor:q.secondarySystemBackground,borderRadius:"32px",marginBottom:"32px",padding:"28px 20px 20px 20px",[he]:{padding:"20px 16px 20px 20px"}},children:[s?m("h1",{css:{fontSize:"24px",lineHeight:"28px",fontWeight:re.weight.semibold,color:q.label,marginBottom:"30px",[he]:{fontSize:"21px"}},children:"Your subscription"}):null,O("div",{css:{marginBottom:12},children:[O(xn,{css:{justifyContent:"flex-start",marginBottom:12,padding:"0 16px",[he]:{flexDirection:"row"}},children:[m(Li,{title:g,period:y,css:{display:"grid",gridTemplateColumns:"auto 1fr",flexDirection:"row",fontSize:"18px",lineHeight:"22px",color:q.label,gap:"5px",marginRight:"7px"}}),m("button",{type:"button","aria-label":"Change selected payment plan",onClick:()=>{r(!0)},css:{color:ye.blue400,cursor:"pointer",[Rn]:{"&:hover":{color:ye.blue600}},verticalAlign:"bottom",fontWeight:re.weight.semibold,fontSize:"15px",lineHeight:"20px",[he]:{display:"none"}},children:"Change"}),O("div",{css:{display:"flex",flexDirection:"row",fontSize:"17px",lineHeight:"22px",color:q.label,marginLeft:"auto"},children:[m("strong",{children:en(G,t.currency)}),R]})]}),O(xn,{css:{justifyContent:"flex-start",fontSize:"12px",padding:"0 16px",[he]:{flexDirection:"row",paddingTop:"2px"}},children:[z?m(at,{message:"Creator code discount",product:t,discountAmount:z,periodString:R}):null,b?m(at,{message:"Credit for time remaining on your current subscription",product:t,discountAmount:pe}):null,A?m(at,{message:"Unbundle Discount",product:t,discountAmount:pe,periodString:R}):null,M?m(at,{message:"Discount",product:t,discountAmount:pe,periodString:R}):null]}),m("button",{type:"button","aria-label":"Change selected payment plan",onClick:()=>{r(!0)},css:{color:ye.blue400,cursor:"pointer",[Rn]:{"&:hover":{color:ye.blue600}},verticalAlign:"bottom",fontWeight:re.weight.semibold,fontSize:"15px",lineHeight:"20px",display:"none",[he]:{padding:"0 16px",display:"block"}},children:"Change"})]}),O("div",{css:{display:"flex",justifyContent:"space-between",backgroundColor:me.backgroundColor,borderRadius:$i,padding:16},children:[O("div",{children:[m("p",{css:{color:q.label,fontWeight:re.weight.semibold},children:_||f?"Total":"Total due today"}),m("p",{css:{fontSize:"12px",fontWeight:re.weight.book,color:q.label400},children:m("span",{children:f&&y!=="unlimited"?`Starts after your ${f.title} expires`:i&&y!=="unlimited"?O(Ge,{children:["Starts"," ",m(Cn,{value:i,format:"short_textdate"})]}):C&&y!=="unlimited"?O(Ge,{children:["Renews ",m(Cn,{value:C,format:"short_textdate"})]}):P?"Renews one year after your Curiosity Stream bundle expires*":"Starts today"})})]}),O("p",{children:[m("span",{css:{fontSize:"11px",fontWeight:re.weight.book,color:q.label300,marginRight:"10px",lineHeight:"18px"},children:t.currency.toUpperCase()}),m("strong",{css:{fontSize:"18px",lineHeight:"18px"},children:en(te,t.currency)})]})]}),m(Gi,{promotion:o==null?void 0:o.promotion,message:"Your subscription directly supports",css:{background:"none",marginLeft:0,marginTop:"21px",marginBottom:0,padding:"0 16px",[he]:{marginTop:"10px"}}}),P?m("p",{css:{position:"relative",marginLeft:"16px",marginRight:"16px",marginTop:"16px",color:q.label400,fontSize:"12px",lineHeight:"16px","&:before":{content:'"*"',position:"absolute",left:"-1.5ch"}},children:"Renewal date will be calculated once we receive a deactivation from Curiosity Stream for your current bundle."}):null]})}function at({message:e,discountAmount:t,product:n,periodString:r}){return O("div",{css:{display:"flex",color:q.label,justifyContent:"space-between",width:"100%"},children:[m("p",{css:{fontSize:"14px",fontWeight:re.weight.book},children:e}),O("p",{css:{fontSize:"12px",lineHeight:"22px",color:q.label,whiteSpace:"nowrap"},children:["−",en(t.toFixed(2),n.currency),r]})]})}export{vu as A,Ki as E,us as P,Li as S,mu as a,Su as b,yu as c,fu as d,Tu as e,bu as f,en as g,Eu as l,gu as u};