import{getVisitorId as s}from"./visitorId-CTKTALbF.js";import{i as l,b as i,r as c,f as u,s as g,a as f,g as p}from"./vendor-sentry-Ctu4DUyU.js";import"./index-CsRk2AqG.js";import"./vendor-vuetify-BaOIwHiz.js";import"./vendor-vue-wu2SJQxD.js";let t=null;function k(a,o){l({app:a,dsn:"https://dc34ab47426f49c0925445f0d87b7007@report.houlang.cloud/6",sendDefaultPii:!0,integrations:[i({router:o}),c({maskAllText:!1,blockAllMedia:!1}),t=u({autoInject:!1,colorScheme:"system",showBranding:!1,showName:!0,showEmail:!0,isNameRequired:!1,isEmailRequired:!1,useSentryUser:{name:"username",email:"email"},themeDark:{submitBackground:"#6200EA",submitBackgroundHover:"#7C4DFF"},themeLight:{submitBackground:"#6200EA",submitBackgroundHover:"#7C4DFF"}})],tracesSampleRate:1,tracePropagationTargets:["localhost",/^https?:\/\/cs\.(houlang\.cloud|houlangs\.com)/],replaysSessionSampleRate:0,replaysOnErrorSampleRate:0,enableLogs:!0,beforeSend(e){return e}}),s().then(e=>{g({id:e,username:e}),f("fingerprint",e),console.log("Sentry 用户标识已设置:",e)}).catch(e=>{console.warn("设置 Sentry 用户标识失败:",e)}),window.openSentryFeedback=()=>{try{if(!t)return console.warn("Sentry Feedback integration 未初始化"),!1;if(typeof t.createWidget=="function"){const e=t.createWidget();if(e&&typeof e.open=="function")return e.open(),console.log("Sentry Feedback 对话框已打开"),!0}return typeof t.openDialog=="function"?(t.openDialog(),console.log("Sentry Feedback 对话框已打开"),!0):(console.warn("无法找到打开 Feedback 的方法"),console.log("可用方法:",Object.keys(t)),!1)}catch(e){return console.error("打开 Sentry Feedback 时出错:",e),!1}},window.startSentryReplay=()=>{try{const e=p();if(!e)return console.warn("Sentry 客户端未初始化"),!1;const r=(e.getOptions().integrations||[]).find(n=>n&&n.name==="Replay");return r&&typeof r.start=="function"?(r.start(),console.log("Sentry Replay 已手动启动"),!0):(console.warn("无法找到 Sentry Replay integration"),!1)}catch(e){return console.error("启动 Sentry Replay 时出错:",e),!1}}}export{k as initSentry};
