System.register(["./index-legacy.js"],(function(t,o){"use strict";var e;return{setters:[t=>{e=t.d}],execute:function(){t("Q",((t,...o)=>new Promise(((e,r)=>{t(...o,(t=>{e(t)}))}))));const o=function(t){let o=t.toLowerCase(),e="";if(/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(o)){if(4===o.length){let t="#";for(var r=1;r<4;r+=1)t+=o.slice(r,r+1).concat(o.slice(r,r+1));o=t}const t=[];for(r=1;r<7;r+=2)t.push(parseInt("0x"+o.slice(r,r+2)));return e="rgb("+t.join(",")+")",{rgb:e,rgbStr:t.join(","),r:t[0],g:t[1],b:t[2]}}return e="无效",{rgb:e}};t("u",e({id:"global",state:()=>({chatQWeb:null,activityColor:"",loadTranslations:{},AssistantType:{UOS_AI:1,UOS_SYSTEM_ASSISTANT:2,DEEPIN_SYSTEM_ASSISTANT:3,PERSONAL_KNOWLEDGE_ASSISTANT:4,PLUGIN_ASSISTANT:256},ChatAction:{ChatTextPlain:0,ChatFunctionCall:1,ChatText2Image:2},ExtentionType:{None:0,Conversation:1,DocSummary:2,WordSelectionLable:3,PerView:4,PromptTag:5,PictureId:6,LikeOrNot:7},DocParsingStatusType:{Success:0,MoreOneError:1,SuffixError:2,NoDocError:3,ExceedSize:4},QuestionAiAction:1,LikeOrNot:{NONE:-1,LIKE:1,DISLIKE:2,EMPTY: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)`)},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,o){console.log("pixelSize : ",o),document.documentElement.style.fontSize=o+"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)}}}))}}}));
