import{d as t}from"./index.js";const e=(t,...e)=>new Promise(((o,r)=>{t(...e,(t=>{o(t)}))})),o=function(t){let e=t.toLowerCase(),o="";if(/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(e)){if(4===e.length){let t="#";for(var r=1;r<4;r+=1)t+=e.slice(r,r+1).concat(e.slice(r,r+1));e=t}const t=[];for(r=1;r<7;r+=2)t.push(parseInt("0x"+e.slice(r,r+2)));return o="rgb("+t.join(",")+")",{rgb:o,rgbStr:t.join(","),r:t[0],g:t[1],b:t[2]}}return o="无效",{rgb:o}},r=[{assistantId:5,index:-1},{assistantId:6,index:-1}],n=t({id:"global",state:()=>({chatQWeb:null,activityColor:"",loadTranslations:{},AssistantType:{UOS_AI:1,UOS_SYSTEM_ASSISTANT:2,DEEPIN_SYSTEM_ASSISTANT:3,PERSONAL_KNOWLEDGE_ASSISTANT:4,AI_WRITING_ASSISTANT:5,AI_TEXT_PROCESSING_ASSISTANT:6,AI_TRANSLATION_ASSISTANT:7,PLUGIN_ASSISTANT:256},ChatAction:{ChatNone:-1,ChatTextPlain:0,ChatFunctionCall:1,ChatText2Image:2,ChatTextThink:3,ChatToolUse:4},ExtentionType:{None:0,Conversation:1,DocSummary:2,WordSelectionLable:3,PerView:4,PromptTag:5,PictureId:6,LikeOrNot:7,FunctionButton:8,McpBtnStatus:9},ToolUseStatus:{Calling:0,Completed:1,Failed:2,Canceled:3},DeepSeek_Uos_Free:81,IsDeepThink:!0,IsSearchOnline:!1,IsOpenMcpServer:!1,McpServerList:[],McpServerListCheckedName:[],DefaultAgentName:"default-agent",IsInstallUOSAiAgent:!1,DocParsingStatusType:{Success:0,MoreOneError:1,SuffixError:2,NoDocError:3,ExceedSize:4},QuestionAiAction:1,LikeOrNot:{NONE:-1,LIKE:1,DISLIKE:2,EMPTY:3},CurrentAssistantFunctionButtonActiveIndex:r,LogLevel:{DEBUG:0,INFO:1,WARN:2,CRITICAL:3}}),getters:{},actions:{updateActivityColor(t){console.log(t),this.activityColor=t;const e=o(t).rgbStr;document.body.style.setProperty("--activityColor",t),document.body.style.setProperty("--boxShadow",`rgba(${e},0.3)`),document.body.style.setProperty("--borderColor",`rgba(${e},0.2)`),document.body.style.setProperty("--backgroundColor",`rgba(${e},0.1)`),document.body.style.setProperty("--activityColorHover",`rgba(${e},0.9)`),document.body.style.setProperty("--activityColorPromptTag",`rgba(${e},0.15)`),document.body.style.setProperty("--activityAddNewConversationBtnBgNormal",`rgba(${e},0.1)`),document.body.style.setProperty("--activityAddNewConversationBtnBgHover",`rgba(${e},0.15)`),document.body.style.setProperty("--activityAddNewConversationBtnBgActive",`rgba(${e},0.2)`),document.body.style.setProperty("--activityMcpserverAddConfirmbtnBg",`linear-gradient(rgba(${e}, 1) 0%, rgba(${e}, 1) 100%)`)},updateTheme(t){const e=2===t?"dark":"light";document.querySelector("html").setAttribute("class",e);const r=o(this.activityColor).rgbStr;2==t?document.body.style.setProperty("--activityColorPromptTag",`rgba(${r},0.12)`):document.body.style.setProperty("--activityColorPromptTag",`rgba(${r},0.15)`)},updateFont(t,e){console.log("pixelSize : ",e),document.documentElement.style.fontSize=e+"px",document.documentElement.style.fontFamily=t,document.body.style.setProperty("--font-family",t)},updateMainContentBackgroundColor(t){console.log("updateMainContentBackgroundColor : ",t),document.body.style.setProperty("--main-content-background-color",t)},updateMcpServerList(t){this.McpServerList=t,this.McpServerListCheckedName=this.McpServerList.map((t=>t.name)),this.IsOpenMcpServer=this.McpServerListCheckedName.length>0}}});export{e as Q,n as u};
