1import{z as e,T as o}from"./index-C_oSc_qP.js";import{startSpan as n,init as t,browserTracingIntegration as r}from"./index-DhmtBasA.js";import{a as i,s as a}from"./exports-C9FZZXUj.js";import"./vendor-react-BH6F5oQJ.js";import"./vendor-ui-B4WC06Sp.js";import"./vendor-icons-CaI5__By.js";import"./vendor-query-CC4VRGyP.js";import"./vendor-supabase-COwyE4EW.js";const l=[/Object Not Found Matching Id:\d+, MethodName:update, ParamCount:\d+/],d=[/Failed to fetch dynamically imported module/i,/error loading dynamically imported module/i,/Importing a module script failed/i,/Unable to preload CSS/i],c="delphi:anonymous-id";const s=()=>{if("undefined"==typeof window)return;try{t({dsn:"https://f686c8430b8b2ebe53d9931739b2973e@o4511994826653696.ingest.us.sentry.io/4511994835435520",integrations:[r()],tracesSampleRate:.1,tracePropagationTargets:["localhost",/^\//,/^https:\/\/delphigrc\.org/,/^https:\/\/.*\.supabase\.co/],environment:"production",release:"cc92968",ignoreErrors:[...l],beforeSend(n,t){var r,i,a,l,c,s,m,u,p,v,g,y,f,h,w,_,S,x,b,I,E;try{(null==(i=null==(r=n.exception)?void 0:r.values)?void 0:i.some(e=>{return!!(o=e.value)&&d.some(e=>e.test(o));var o}))&&(n.tags={...n.tags,chunk_load_error:"true"},n.contexts={...n.contexts,chunk_load:{already_reloaded:o(),online:navigator.onLine,referrer:document.referrer||null,pathname:window.location.pathname}});if(null==(l=null==(a=n.exception)?void 0:a.values)?void 0:l.some(e=>{const o=e.value||"",n=e.type||"",t=["418","423","425"].some(e=>o.includes(`error #${e}`)||o.includes(`invariant=${e}`)),r=["Hydration failed","hydration mismatch","did not match","Text content does not match","suppressHydrationWarning"].some(e=>o.toLowerCase().includes(e.toLowerCase()));return t||r||"HydrationError"===n})){const o=window.location.pathname.includes("/research/")||window.location.pathname.includes("/publications/")||window.location.pathname.includes("/articles/");n.tags={...n.tags,error_type:"hydration_error",critical:"true",page_type:o?"publication":"other"}
1,n.contexts={...n.contexts,hydration:{url:window.location.href,pathname:window.location.pathname,referrer:document.referrer,user_agent:navigator.userAgent,is_ssr:void 0!==window.__INITIAL_STATE__,render_mode:"csr",...o&&{publication_context:{page_type:"publication",url_segments:window.location.pathname.split("/").filter(Boolean),search_params:window.location.search,came_from_external:!document.referrer.includes(window.location.hostname),likely_deep_link:document.referrer&&(document.referrer.includes("google.com")||document.referrer.includes("bing.com")||document.referrer.includes("search"))}}},performance:{navigation_type:null==(c=performance.navigation)?void 0:c.type,memory:null==(s=performance.memory)?void 0:s.usedJSHeapSize,timing:{dom_content_loaded:(null==(m=performance.timing)?void 0:m.domContentLoadedEventEnd)-(null==(u=performance.timing)?void 0:u.navigationStart),load_complete:(null==(p=performance.timing)?void 0:p.loadEventEnd)-(null==(v=performance.timing)?void 0:v.navigationStart)}}},n.fingerprint=o?["hydration-error","publication-page",(null==(f=null==(y=null==(g=n.exception)?void 0:g.values)?void 0:y[0])?void 0:f.type)||"unknown"]:["hydration-error",(null==(_=null==(w=null==(h=n.exception)?void 0:h.values)?void 0:w[0])?void 0:_.type)||"unknown"],n.level="error",e("ð¨ Hydration Error Detected:",{message:null==(b=null==(x=null==(S=n.exception)?void 0:S.values)?void 0:x[0])?void 0:b.value,url:window.location.href,timestamp:(new Date).toISOString()})}else n.contexts&&(n.contexts.performance={navigation_type:null==(I=performance.navigation)?void 0:I.type,memory:null==(E=performance.memory)?void 0:E.usedJSHeapSize})}catch(j){e("Sentry beforeSend error:",j)}return n}})}catch(i){}const n=function(){try{const e=localStorage.getItem(c);if(e)return e;const o="function"==typeof(null==crypto?void 0:crypto.randomUUID)?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`;return localStorage.setItem(c,o),o}catch{return}}();n&&a({id:n})},m=(e,o)=>{try{n({name:e,op:"navigation"},e=>{null==e||e.setAttribute("navigation.type",o),null==e||e.setAttribute("page_load_time",performance.now())})}catch{}},u=(e,o)=>{if("undefined"!=typeof window)try{i(new Error(`Hydration Error: ${e}`),{level:"error",tags:{error_type:"hydration_error",critical:"true"},contexts:{hydration:{url:window.location.href,pathname:window.location.pathname,custom_context:o||{},timestamp:(new Date).toISOString()}},fingerprint:["hydration-error","manual",e]})}catch(n){}};export{s as initSentry,u as reportHydrationError,m as trackRouteNavigation};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.