diff --git a/kiss-translator-ios-safari.user.js b/kiss-translator-ios-safari.user.js index a1d4242..00a3beb 100644 --- a/kiss-translator-ios-safari.user.js +++ b/kiss-translator-ios-safari.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name KISS Translator // @namespace https://github.com/fishjar/kiss-translator -// @version 2.0.5 +// @version 2.0.6 // @description A simple bilingual translation extension & Greasemonkey script (一个简约的双语对照翻译扩展 & 油猴脚本) // @author Gabe // @homepageURL https://github.com/fishjar/kiss-translator @@ -29407,7 +29407,7 @@ __webpack_require__.d(base_namespaceObject, { }); ;// CONCATENATED MODULE: ./src/config/app.js -const APP_NAME="KISS Translator".trim().split(/\s+/).join("-");const APP_LCNAME=APP_NAME.toLowerCase();const APP_UPNAME=APP_NAME.toUpperCase();const APP_CONSTS={fabID:"".concat(APP_LCNAME,"-fab"),boxID:"".concat(APP_LCNAME,"-box"),popupID:"".concat(APP_LCNAME,"-popup")};const APP_VERSION="2.0.5".split(".");const THEME_LIGHT="light";const THEME_DARK="dark"; +const APP_NAME="KISS Translator".trim().split(/\s+/).join("-");const APP_LCNAME=APP_NAME.toLowerCase();const APP_UPNAME=APP_NAME.toUpperCase();const APP_CONSTS={fabID:"".concat(APP_LCNAME,"-fab"),boxID:"".concat(APP_LCNAME,"-box"),popupID:"".concat(APP_LCNAME,"-popup")};const APP_VERSION="2.0.6".split(".");const THEME_LIGHT="light";const THEME_DARK="dark"; ;// CONCATENATED MODULE: ./src/config/api.js const DEFAULT_HTTP_TIMEOUT=10000;// 调用超时时间 const DEFAULT_FETCH_LIMIT=10;// 默认最大任务数量 @@ -29445,7 +29445,7 @@ context:new Set([OPT_TRANS_OPENAI,OPT_TRANS_GEMINI,OPT_TRANS_GEMINI_2,OPT_TRANS_ "transcreation",// 创译风格 "machine-like",// 机器风格 "concise"// 简明风格 -];const BUILTIN_PLACEHOLDERS=["{ }","{{ }}","[ ]","[[ ]]"];const BUILTIN_PLACETAGS=["i","a","b","x"];const OPT_LANGS_TO=[["en","English - English"],["zh-CN","Simplified Chinese - 简体中文"],["zh-TW","Traditional Chinese - 繁體中文"],["ar","Arabic - العربية"],["bg","Bulgarian - Български"],["ca","Catalan - Català"],["hr","Croatian - Hrvatski"],["cs","Czech - Čeština"],["da","Danish - Dansk"],["nl","Dutch - Nederlands"],["fi","Finnish - Suomi"],["fr","French - Français"],["de","German - Deutsch"],["el","Greek - Ελληνικά"],["hi","Hindi - हिन्दी"],["hu","Hungarian - Magyar"],["id","Indonesian - Indonesia"],["it","Italian - Italiano"],["ja","Japanese - 日本語"],["ko","Korean - 한국어"],["ms","Malay - Melayu"],["mt","Maltese - Malti"],["nb","Norwegian - Norsk Bokmål"],["pl","Polish - Polski"],["pt","Portuguese - Português"],["ro","Romanian - Română"],["ru","Russian - Русский"],["sk","Slovak - Slovenčina"],["sl","Slovenian - Slovenščina"],["es","Spanish - Español"],["sv","Swedish - Svenska"],["ta","Tamil - தமிழ்"],["te","Telugu - తెలుగు"],["th","Thai - ไทย"],["tr","Turkish - Türkçe"],["uk","Ukrainian - Українська"],["vi","Vietnamese - Tiếng Việt"]];const OPT_LANGS_LIST=OPT_LANGS_TO.map(_ref=>{let[lang]=_ref;return lang;});const OPT_LANGS_FROM=[["auto","Auto-detect"],...OPT_LANGS_TO];const OPT_LANGS_MAP=new Map(OPT_LANGS_TO);// CODE->名称 +];const BUILTIN_PLACEHOLDERS=["{ }","{{ }}","[ ]","[[ ]]"];const BUILTIN_PLACETAGS=["i","a","b","x"];const OPT_LANGS_TO=[["en","English - English"],["zh-CN","Simplified Chinese - 简体中文"],["zh-TW","Traditional Chinese - 繁體中文"],["ar","Arabic - العربية"],["bg","Bulgarian - Български"],["ca","Catalan - Català"],["hr","Croatian - Hrvatski"],["cs","Czech - Čeština"],["da","Danish - Dansk"],["nl","Dutch - Nederlands"],["fa","Persian - فارسی"],["fi","Finnish - Suomi"],["fr","French - Français"],["de","German - Deutsch"],["el","Greek - Ελληνικά"],["hi","Hindi - हिन्दी"],["hu","Hungarian - Magyar"],["id","Indonesian - Indonesia"],["it","Italian - Italiano"],["ja","Japanese - 日本語"],["ko","Korean - 한국어"],["ms","Malay - Melayu"],["mt","Maltese - Malti"],["nb","Norwegian - Norsk Bokmål"],["pl","Polish - Polski"],["pt","Portuguese - Português"],["ro","Romanian - Română"],["ru","Russian - Русский"],["sk","Slovak - Slovenčina"],["sl","Slovenian - Slovenščina"],["es","Spanish - Español"],["sv","Swedish - Svenska"],["ta","Tamil - தமிழ்"],["te","Telugu - తెలుగు"],["th","Thai - ไทย"],["tr","Turkish - Türkçe"],["uk","Ukrainian - Українська"],["vi","Vietnamese - Tiếng Việt"]];const OPT_LANGS_LIST=OPT_LANGS_TO.map(_ref=>{let[lang]=_ref;return lang;});const OPT_LANGS_FROM=[["auto","Auto-detect"],...OPT_LANGS_TO];const OPT_LANGS_MAP=new Map(OPT_LANGS_TO);// CODE->名称 const OPT_LANGS_SPEC_NAME=new Map(OPT_LANGS_FROM.map(_ref2=>{let[key,val]=_ref2;return[key,val.split(" - ")[0]];}));const OPT_LANGS_SPEC_DEFAULT=new Map(OPT_LANGS_FROM.map(_ref3=>{let[key]=_ref3;return[key,key];}));const OPT_LANGS_SPEC_DEFAULT_UC=new Map(OPT_LANGS_FROM.map(_ref4=>{let[key]=_ref4;return[key,key.toUpperCase()];}));const OPT_LANGS_TO_SPEC={[OPT_TRANS_BUILTINAI]:new Map([...OPT_LANGS_SPEC_DEFAULT,["zh-CN","zh"],["zh-TW","zh"]]),[OPT_TRANS_GOOGLE]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_GOOGLE_2]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_MICROSOFT]:new Map([...OPT_LANGS_SPEC_DEFAULT,["auto",""],["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[OPT_TRANS_AZUREAI]:new Map([...OPT_LANGS_SPEC_DEFAULT,["auto",""],["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[OPT_TRANS_DEEPL]:new Map([...OPT_LANGS_SPEC_DEFAULT_UC,["auto",""],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLFREE]:new Map([...OPT_LANGS_SPEC_DEFAULT_UC,["auto","auto"],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLX]:new Map([...OPT_LANGS_SPEC_DEFAULT_UC,["auto","auto"],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_NIUTRANS]:new Map([...OPT_LANGS_SPEC_DEFAULT,["auto","auto"],["zh-CN","zh"],["zh-TW","cht"]]),[OPT_TRANS_VOLCENGINE]:new Map([...OPT_LANGS_SPEC_DEFAULT,["auto","auto"],["zh-CN","zh"],["zh-TW","zh-Hant"]]),[OPT_TRANS_BAIDU]:new Map([...OPT_LANGS_SPEC_DEFAULT,["zh-CN","zh"],["zh-TW","cht"],["ar","ara"],["bg","bul"],["ca","cat"],["hr","hrv"],["da","dan"],["fi","fin"],["fr","fra"],["hi","mai"],["ja","jp"],["ko","kor"],["ms","may"],["mt","mlt"],["nb","nor"],["ro","rom"],["ru","ru"],["sl","slo"],["es","spa"],["sv","swe"],["ta","tam"],["te","tel"],["uk","ukr"],["vi","vie"]]),[OPT_TRANS_TENCENT]:new Map([["auto","auto"],["zh-CN","zh"],["zh-TW","zh"],["en","en"],["ar","ar"],["de","de"],["ru","ru"],["fr","fr"],["fi","fil"],["ko","ko"],["ms","ms"],["pt","pt"],["ja","ja"],["th","th"],["tr","tr"],["es","es"],["it","it"],["hi","hi"],["id","id"],["vi","vi"]]),[OPT_TRANS_OPENAI]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_GEMINI]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_GEMINI_2]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_CLAUDE]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_OLLAMA]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_OPENROUTER]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_CLOUDFLAREAI]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_CUSTOMIZE]:OPT_LANGS_SPEC_DEFAULT};const specToCode=m=>new Map(Array.from(m.entries()).map(_ref5=>{let[k,v]=_ref5;if(v===""){return["auto","auto"];}if(v==="zh"||v==="ZH"){return[v,"zh-CN"];}return[v,k];}));// 名称->CODE const OPT_LANGS_TO_CODE={};Object.entries(OPT_LANGS_TO_SPEC).forEach(_ref6=>{let[t,m]=_ref6;OPT_LANGS_TO_CODE[t]=specToCode(m);});const defaultNobatchPrompt="You are a professional, authentic machine translation engine.";const defaultNobatchUserPrompt="Translate the following source text from ".concat(INPUT_PLACE_FROM," to ").concat(INPUT_PLACE_TO,". Output translation directly without any additional text.\n\nSource Text: ").concat(INPUT_PLACE_TEXT,"\n\nTranslated Text:");const defaultSystemPrompt="Act as a translation API. Output a single raw JSON object only. No extra text or fences.\n\nInput:\n{\"targetLanguage\":\"\",\"title\":\"\",\"description\":\"\",\"segments\":[{\"id\":1,\"text\":\"...\"}],\"glossary\":{\"sourceTerm\":\"targetTerm\"},\"tone\":\"\"}\n\nOutput:\n{\"translations\":[{\"id\":1,\"text\":\"...\",\"sourceLanguage\":\"\"}]}\n\nRules:\n1. Use title/description for context only; do not output them.\n2. Keep id, order, and count of segments.\n3. Preserve whitespace, HTML entities, and all HTML-like tags (e.g., , ). Translate inner text only.\n4. Highest priority: Follow 'glossary'. Use value for translation; if value is \"\", keep the key.\n5. Do not translate: content in ,
, text enclosed in backticks, or placeholders like {1}, {{1}}, [1], [[1]].\n6.  Apply the specified tone to the translation.\n7.  Detect sourceLanguage for each segment.\n8.  Return empty or unchanged inputs as is.\n\nExample:\nInput: {\"targetLanguage\":\"zh-CN\",\"segments\":[{\"id\":1,\"text\":\"A React component.\"}],\"glossary\":{\"component\":\"\u7EC4\u4EF6\",\"React\":\"\"}}\nOutput: {\"translations\":[{\"id\":1,\"text\":\"\u4E00\u4E2AReact\u7EC4\u4EF6\",\"sourceLanguage\":\"en\"}]}\n\nFail-safe: On any error, return {\"translations\":[]}.";// const defaultSubtitlePrompt = `Goal: Convert raw subtitle event JSON into a clean, sentence-based JSON array.
 // Output (valid JSON array, output ONLY this array):
@@ -29474,7 +29474,7 @@ customHeader:"",customBody:"",reqHook:"",// request 钩子函数
 resHook:"",// response 钩子函数
 fetchLimit:DEFAULT_FETCH_LIMIT,// 最大请求数量
 fetchInterval:DEFAULT_FETCH_INTERVAL,// 请求间隔时间
-httpTimeout:DEFAULT_HTTP_TIMEOUT*30,// 请求超时时间
+httpTimeout:DEFAULT_HTTP_TIMEOUT*3,// 请求超时时间
 batchInterval:DEFAULT_BATCH_INTERVAL,// 批处理请求间隔时间
 batchSize:DEFAULT_BATCH_SIZE,// 每次最多发送段落数量
 batchLength:DEFAULT_BATCH_LENGTH,// 每次发送最大文字数量
@@ -29487,24 +29487,31 @@ isDisabled:false,// 是否不显示,
 region:""// Azure 专用
 };const defaultApiOpts={[OPT_TRANS_BUILTINAI]:defaultApi,[OPT_TRANS_GOOGLE]:{...defaultApi,url:"https://translate.googleapis.com/translate_a/single"},[OPT_TRANS_GOOGLE_2]:{...defaultApi,url:"https://translate-pa.googleapis.com/v1/translateHtml",key:"AIzaSyATBXajvzQLTDHEQbcpq0Ihe0vWDHmO520",useBatchFetch:true},[OPT_TRANS_MICROSOFT]:{...defaultApi,useBatchFetch:true},[OPT_TRANS_AZUREAI]:{...defaultApi,url:"https://api.cognitive.microsofttranslator.com/translate?api-version=3.0",useBatchFetch:true},[OPT_TRANS_BAIDU]:{...defaultApi},[OPT_TRANS_TENCENT]:{...defaultApi,useBatchFetch:true},[OPT_TRANS_VOLCENGINE]:{...defaultApi},[OPT_TRANS_DEEPL]:{...defaultApi,url:"https://api-free.deepl.com/v2/translate",useBatchFetch:true},[OPT_TRANS_DEEPLFREE]:{...defaultApi,fetchLimit:1},[OPT_TRANS_DEEPLX]:{...defaultApi,url:"http://localhost:1188/translate"},[OPT_TRANS_NIUTRANS]:{...defaultApi,url:"https://api.niutrans.com/NiuTransServer/translation",dictNo:"",memoryNo:""},[OPT_TRANS_OPENAI]:{...defaultApi,url:"https://api.openai.com/v1/chat/completions",model:"gpt-4",useBatchFetch:true},[OPT_TRANS_GEMINI]:{...defaultApi,url:"https://generativelanguage.googleapis.com/v1/models/".concat(INPUT_PLACE_MODEL,":generateContent?key=").concat(INPUT_PLACE_KEY),model:"gemini-2.5-flash",useBatchFetch:true},[OPT_TRANS_GEMINI_2]:{...defaultApi,url:"https://generativelanguage.googleapis.com/v1beta/openai/chat/completions",model:"gemini-2.0-flash",useBatchFetch:true},[OPT_TRANS_CLAUDE]:{...defaultApi,url:"https://api.anthropic.com/v1/messages",model:"claude-3-haiku-20240307",useBatchFetch:true},[OPT_TRANS_CLOUDFLAREAI]:{...defaultApi,url:"https://api.cloudflare.com/client/v4/accounts/{{ACCOUNT_ID}}/ai/run/@cf/meta/m2m100-1.2b"},[OPT_TRANS_OLLAMA]:{...defaultApi,url:"http://localhost:11434/v1/chat/completions",model:"llama3.1",useBatchFetch:true},[OPT_TRANS_OPENROUTER]:{...defaultApi,url:"https://openrouter.ai/api/v1/chat/completions",model:"openai/gpt-4o",useBatchFetch:true},[OPT_TRANS_CUSTOMIZE]:{...defaultApi,url:"https://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN",reqHook:defaultRequestHook,resHook:defaultResponseHook}};// 内置翻译接口列表(带参数)
 const DEFAULT_API_LIST=OPT_ALL_TRANS_TYPES.map(apiType=>({...defaultApiOpts[apiType],apiSlug:apiType,apiName:apiType,apiType}));const DEFAULT_API_TYPE=OPT_TRANS_MICROSOFT;const DEFAULT_API_SETTING=DEFAULT_API_LIST.find(a=>a.apiType===DEFAULT_API_TYPE);
-;// CONCATENATED MODULE: ./src/config/rules.js
-const GLOBAL_KEY="*";const REMAIN_KEY="-";const SHADOW_KEY=">>>";const DEFAULT_COLOR="#209CEE";// 默认高亮背景色/线条颜色
-const DEFAULT_TRANS_TAG="font";const DEFAULT_SELECT_STYLE="-webkit-line-clamp: unset; max-height: none; height: auto;";const OPT_STYLE_NONE="style_none";// 无
+;// CONCATENATED MODULE: ./src/config/styles.js
+const OPT_STYLE_NONE="style_none";// 无
 const OPT_STYLE_LINE="under_line";// 下划线
 const OPT_STYLE_DOTLINE="dot_line";// 点状线
 const OPT_STYLE_DASHLINE="dash_line";// 虚线
+const OPT_STYLE_DASHLINE_BOLD="dash_line_bold";// 虚线加粗
 const OPT_STYLE_DASHBOX="dash_box";// 虚线框
+const OPT_STYLE_DASHBOX_BOLD="dash_box_bold";// 虚线框加粗
 const OPT_STYLE_WAVYLINE="wavy_line";// 波浪线
+const OPT_STYLE_WAVYLINE_BOLD="wavy_line_bold";// 波浪线加粗
+const OPT_STYLE_MARKER="marker";// 马克笔
+const OPT_STYLE_GRADIENT_MARKER="gradient_marker";// 渐变马克笔
 const OPT_STYLE_FUZZY="fuzzy";// 模糊
 const OPT_STYLE_HIGHLIGHT="highlight";// 高亮
 const OPT_STYLE_BLOCKQUOTE="blockquote";// 引用
 const OPT_STYLE_GRADIENT="gradient";// 渐变
 const OPT_STYLE_BLINK="blink";// 闪现
 const OPT_STYLE_GLOW="glow";// 发光
-const OPT_STYLE_DIY="diy_style";// 自定义样式
-const OPT_STYLE_ALL=[OPT_STYLE_NONE,OPT_STYLE_LINE,OPT_STYLE_DOTLINE,OPT_STYLE_DASHLINE,OPT_STYLE_WAVYLINE,OPT_STYLE_DASHBOX,OPT_STYLE_FUZZY,OPT_STYLE_HIGHLIGHT,OPT_STYLE_BLOCKQUOTE,OPT_STYLE_GRADIENT,OPT_STYLE_BLINK,OPT_STYLE_GLOW,OPT_STYLE_DIY];const OPT_STYLE_USE_COLOR=[OPT_STYLE_LINE,OPT_STYLE_DOTLINE,OPT_STYLE_DASHLINE,OPT_STYLE_DASHBOX,OPT_STYLE_WAVYLINE,OPT_STYLE_HIGHLIGHT,OPT_STYLE_BLOCKQUOTE];const OPT_TIMING_PAGESCROLL="mk_pagescroll";// 滚动加载翻译
+const OPT_STYLE_COLORFUL="colorful";// 多彩
+const OPT_STYLE_ALL=[OPT_STYLE_NONE,OPT_STYLE_LINE,OPT_STYLE_DOTLINE,OPT_STYLE_DASHLINE,OPT_STYLE_DASHLINE_BOLD,OPT_STYLE_WAVYLINE,OPT_STYLE_WAVYLINE_BOLD,OPT_STYLE_DASHBOX,OPT_STYLE_DASHBOX_BOLD,OPT_STYLE_MARKER,OPT_STYLE_GRADIENT_MARKER,OPT_STYLE_FUZZY,OPT_STYLE_HIGHLIGHT,OPT_STYLE_BLOCKQUOTE,OPT_STYLE_GRADIENT,OPT_STYLE_BLINK,OPT_STYLE_GLOW,OPT_STYLE_COLORFUL];const DEFAULT_CUSTOM_STYLES=[{styleSlug:"custom",styleName:"Custom Style",styleCode:"color: #209CEE;"}];
+;// CONCATENATED MODULE: ./src/config/rules.js
+const GLOBAL_KEY="*";const REMAIN_KEY="-";const SHADOW_KEY=">>>";const DEFAULT_COLOR="#209CEE";// 默认高亮背景色/线条颜色
+const DEFAULT_TRANS_TAG="font";const DEFAULT_SELECT_STYLE="-webkit-line-clamp: unset; max-height: none; height: auto;";const OPT_TIMING_PAGESCROLL="mk_pagescroll";// 滚动加载翻译
 const OPT_TIMING_PAGEOPEN="mk_pageopen";// 直接翻译到底
-const OPT_TIMING_MOUSEOVER="mk_mouseover";const OPT_TIMING_CONTROL="mk_ctrlKey";const OPT_TIMING_SHIFT="mk_shiftKey";const OPT_TIMING_ALT="mk_altKey";const OPT_TIMING_ALL=[OPT_TIMING_PAGESCROLL,OPT_TIMING_PAGEOPEN,OPT_TIMING_MOUSEOVER,OPT_TIMING_CONTROL,OPT_TIMING_SHIFT,OPT_TIMING_ALT];const OPT_SPLIT_PARAGRAPH_DISABLE="split_disable";const OPT_SPLIT_PARAGRAPH_TEXTLENGTH="split_textlength";const OPT_SPLIT_PARAGRAPH_PUNCTUATION="split_punctuation";const OPT_SPLIT_PARAGRAPH_ALL=[OPT_SPLIT_PARAGRAPH_DISABLE,OPT_SPLIT_PARAGRAPH_PUNCTUATION,OPT_SPLIT_PARAGRAPH_TEXTLENGTH];const OPT_HIGHLIGHT_WORDS_DISABLE="highlight_disable";const OPT_HIGHLIGHT_WORDS_BEFORETRANS="highlight_beforetrans";const OPT_HIGHLIGHT_WORDS_AFTERTRANS="highlight_aftertrans";const OPT_HIGHLIGHT_WORDS_ALL=[OPT_HIGHLIGHT_WORDS_DISABLE,OPT_HIGHLIGHT_WORDS_BEFORETRANS,OPT_HIGHLIGHT_WORDS_AFTERTRANS];const DEFAULT_DIY_STYLE="color: #333;\nbackground: linear-gradient(\n  45deg,\n  LightGreen 20%,\n  LightPink 20% 40%,\n  LightSalmon 40% 60%,\n  LightSeaGreen 60% 80%,\n  LightSkyBlue 80%\n);\n&:hover {\n  color: #111;\n};";const DEFAULT_SELECTOR="h1, h2, h3, h4, h5, h6, li, p, dd, blockquote, figcaption, label, legend";const DEFAULT_IGNORE_SELECTOR="button, footer, pre, mark, nav";const DEFAULT_KEEP_SELECTOR="code, cite, math, .math, a:has(code)";const DEFAULT_RULE={pattern:"",// 匹配网址
+const OPT_TIMING_MOUSEOVER="mk_mouseover";const OPT_TIMING_CONTROL="mk_ctrlKey";const OPT_TIMING_SHIFT="mk_shiftKey";const OPT_TIMING_ALT="mk_altKey";const OPT_TIMING_ALL=[OPT_TIMING_PAGESCROLL,OPT_TIMING_PAGEOPEN,OPT_TIMING_MOUSEOVER,OPT_TIMING_CONTROL,OPT_TIMING_SHIFT,OPT_TIMING_ALT];const OPT_SPLIT_PARAGRAPH_DISABLE="split_disable";const OPT_SPLIT_PARAGRAPH_TEXTLENGTH="split_textlength";const OPT_SPLIT_PARAGRAPH_PUNCTUATION="split_punctuation";const OPT_SPLIT_PARAGRAPH_ALL=[OPT_SPLIT_PARAGRAPH_DISABLE,OPT_SPLIT_PARAGRAPH_PUNCTUATION,OPT_SPLIT_PARAGRAPH_TEXTLENGTH];const OPT_HIGHLIGHT_WORDS_DISABLE="highlight_disable";const OPT_HIGHLIGHT_WORDS_BEFORETRANS="highlight_beforetrans";const OPT_HIGHLIGHT_WORDS_AFTERTRANS="highlight_aftertrans";const OPT_HIGHLIGHT_WORDS_ALL=[OPT_HIGHLIGHT_WORDS_DISABLE,OPT_HIGHLIGHT_WORDS_BEFORETRANS,OPT_HIGHLIGHT_WORDS_AFTERTRANS];const DEFAULT_SELECTOR="h1, h2, h3, h4, h5, h6, li, p, dd, blockquote, figcaption, label, legend";const DEFAULT_IGNORE_SELECTOR="button, footer, pre, mark, nav";const DEFAULT_KEEP_SELECTOR="code, cite, math, .math, a:has(code)";const DEFAULT_RULE={pattern:"",// 匹配网址
 selector:"",// 选择器
 keepSelector:"",// 保留元素选择器
 terms:"",// 专业术语
@@ -29514,8 +29521,9 @@ fromLang:GLOBAL_KEY,// 源语言
 toLang:GLOBAL_KEY,// 目标语言
 textStyle:GLOBAL_KEY,// 译文样式
 transOpen:GLOBAL_KEY,// 开启翻译
-bgColor:"",// 译文颜色
-textDiyStyle:"",// 自定义译文样式
+// bgColor: "", // 译文颜色 (作废)
+// textDiyStyle: "", // 自定义译文样式 (作废)
+textExtStyle:"",// 译文附加样式
 termsStyle:"",// 专业术语样式
 highlightStyle:"",// 高亮词汇样式
 selectStyle:"",// 选择器节点样式
@@ -29554,8 +29562,9 @@ fromLang:"auto",// 源语言
 toLang:"zh-CN",// 目标语言
 textStyle:OPT_STYLE_NONE,// 译文样式
 transOpen:"false",// 开启翻译
-bgColor:"",// 译文颜色
-textDiyStyle:DEFAULT_DIY_STYLE,// 自定义译文样式
+// bgColor: DEFAULT_COLOR, // 译文颜色 (作废)
+// textDiyStyle: DEFAULT_DIY_STYLE, // 自定义译文样式 (作废)
+textExtStyle:"",// 译文附加样式
 termsStyle:"font-weight: bold;",// 专业术语样式
 highlightStyle:"color: red;",// 高亮词汇样式
 selectStyle:DEFAULT_SELECT_STYLE,// 选择器节点样式
@@ -29583,11 +29592,11 @@ ignoreSelector:DEFAULT_IGNORE_SELECTOR,// 不翻译的选择器
 splitParagraph:OPT_SPLIT_PARAGRAPH_DISABLE,// 切分段落
 splitLength:100,// 切分段落长度
 highlightWords:OPT_HIGHLIGHT_WORDS_DISABLE// 高亮词汇
-};const rules_DEFAULT_RULES=[GLOBLA_RULE];const DEFAULT_OW_RULE={apiSlug:REMAIN_KEY,fromLang:REMAIN_KEY,toLang:REMAIN_KEY,textStyle:REMAIN_KEY,transOpen:REMAIN_KEY,bgColor:"",textDiyStyle:DEFAULT_DIY_STYLE};// todo: 校验几个内置规则
+};const rules_DEFAULT_RULES=[GLOBLA_RULE];// todo: 校验几个内置规则
 const RULES_MAP={// "www.google.com/search": {
 //   rootsSelector: `#rcnt`,
 // },
-"en.wikipedia.org":{ignoreSelector:".button, code, footer, form, mark, pre, .mwe-math-element, .mw-editsection"},"news.ycombinator.com":{selector:"p, .titleline, .commtext, .hn-item-title, .hn-comment-text, .hn-story-title",keepSelector:"code, img, svg, pre, .sitebit",ignoreSelector:"button, code, footer, form, header, mark, nav, pre, .reply",autoScan:"false"},"twitter.com, https://x.com":{selector:"[data-testid='tweetText']",keepSelector:"img, svg, a, span:has(a), div:has(a)",ignoreSelector:"button, [data-testid='videoPlayer'], [role='group']",autoScan:"false"},"www.youtube.com/live_chat":{rootsSelector:"div#items",selector:"span.yt-live-chat-text-message-renderer",autoScan:"false"},"www.youtube.com":{rootsSelector:"ytd-page-manager",ignoreSelector:"aside, button, footer, form, header, pre, mark, nav, #player, #container, .caption-window, .ytp-settings-menu"},"web.telegram.org":{autoScan:"false",selector:".text-content, .embedded-text-wrapper",rootsSelector:".Transition"}};const rules_BUILTIN_RULES=Object.entries(RULES_MAP).map(_ref=>{let[pattern,rule]=_ref;return{// ...DEFAULT_RULE,
+"en.wikipedia.org":{ignoreSelector:".button, code, footer, form, mark, pre, .mwe-math-element, .mw-editsection"},"news.ycombinator.com":{selector:"p, .titleline, .commtext, .hn-item-title, .hn-comment-text, .hn-story-title",keepSelector:"code, img, svg, pre, .sitebit",ignoreSelector:"button, code, footer, form, header, mark, nav, pre, .reply",autoScan:"false"},"twitter.com, https://x.com":{selector:"[data-testid='tweetText'], [data-testid='twitter-article-title'], .public-DraftStyleDefault-block",keepSelector:"img, svg, a, span:has(a), div:has(a)",ignoreSelector:"button, [data-testid='videoPlayer'], [role='group']",autoScan:"false"},"www.youtube.com/live_chat":{rootsSelector:"div#items",selector:"span.yt-live-chat-text-message-renderer",autoScan:"false"},"www.youtube.com":{rootsSelector:"ytd-page-manager",ignoreSelector:"aside, button, footer, form, header, pre, mark, nav, #player, #container, .caption-window, .ytp-settings-menu"},"web.telegram.org":{autoScan:"false",selector:".text-content, .embedded-text-wrapper",rootsSelector:".Transition"}};const rules_BUILTIN_RULES=Object.entries(RULES_MAP).map(_ref=>{let[pattern,rule]=_ref;return{// ...DEFAULT_RULE,
 ...rule,pattern};});
 ;// CONCATENATED MODULE: ./src/libs/log.js
 // 定义日志级别
@@ -29659,7 +29668,7 @@ triggerMode:OPT_TRANBOX_TRIGGER_CLICK,// 触发翻译方式
 // extStyles: "", // 附加样式
 enDict:OPT_DICT_BING,// 英文词典
 enSug:OPT_SUG_YOUDAO// 英文建议
-};const SUBTITLE_WINDOW_STYLE="padding: 0.5em 1em;\nbackground-color: rgba(0, 0, 0, 0.5);\ncolor: white;\nline-height: 1.3;\ntext-shadow: 1px 1px 2px black;\ndisplay: inline-block";const SUBTITLE_ORIGIN_STYLE="font-size: clamp(1.5rem, 3cqw, 3rem);";const SUBTITLE_TRANSLATION_STYLE="font-size: clamp(1.5rem, 3cqw, 3rem);";const DEFAULT_SUBTITLE_SETTING={enabled:true,// 是否开启
+};const SUBTITLE_WINDOW_STYLE="padding: 0.5em 1em;\nbackground-color: rgba(0, 0, 0, 0.5);\ncolor: white;\nline-height: 1.3;\ntext-shadow: 1px 1px 2px black;\ndisplay: inline-block";const SUBTITLE_ORIGIN_STYLE="font-size: clamp(1rem, 2cqw, 3rem);";const SUBTITLE_TRANSLATION_STYLE="font-size: clamp(1rem, 2cqw, 3rem);";const DEFAULT_SUBTITLE_SETTING={enabled:true,// 是否开启
 apiSlug:OPT_TRANS_MICROSOFT,segSlug:"-",// AI智能断句
 chunkLength:1000,// AI处理切割长度
 // fromLang: "en",
@@ -29706,10 +29715,11 @@ preInit:true,// 是否预加载脚本
 transAllnow:false,// 是否立即全部翻译
 subtitleSetting:DEFAULT_SUBTITLE_SETTING,// 字幕设置
 logLevel:LogLevel.INFO.value,// 日志级别
-rootMargin:500// 提前触发翻译
+rootMargin:500,// 提前触发翻译
+customStyles:DEFAULT_CUSTOM_STYLES// 自定义样式列表
 };
 ;// CONCATENATED MODULE: ./src/config/i18n.js
-const UI_LANGS=(/* unused pure expression or super */ null && ([["en","English"],["zh","简体中文"],["zh_TW","繁體中文"]]));const customApiLangs="[\"en\", \"English - English\"],\n[\"zh-CN\", \"Simplified Chinese - \u7B80\u4F53\u4E2D\u6587\"],\n[\"zh-TW\", \"Traditional Chinese - \u7E41\u9AD4\u4E2D\u6587\"],\n[\"ar\", \"Arabic - \u0627\u0644\u0639\u0631\u0628\u064A\u0629\"],\n[\"bg\", \"Bulgarian - \u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438\"],\n[\"ca\", \"Catalan - Catal\xE0\"],\n[\"hr\", \"Croatian - Hrvatski\"],\n[\"cs\", \"Czech - \u010Ce\u0161tina\"],\n[\"da\", \"Danish - Dansk\"],\n[\"nl\", \"Dutch - Nederlands\"],\n[\"fi\", \"Finnish - Suomi\"],\n[\"fr\", \"French - Fran\xE7ais\"],\n[\"de\", \"German - Deutsch\"],\n[\"el\", \"Greek - \u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC\"],\n[\"hi\", \"Hindi - \u0939\u093F\u0928\u094D\u0926\u0940\"],\n[\"hu\", \"Hungarian - Magyar\"],\n[\"id\", \"Indonesian - Indonesia\"],\n[\"it\", \"Italian - Italiano\"],\n[\"ja\", \"Japanese - \u65E5\u672C\u8A9E\"],\n[\"ko\", \"Korean - \uD55C\uAD6D\uC5B4\"],\n[\"ms\", \"Malay - Melayu\"],\n[\"mt\", \"Maltese - Malti\"],\n[\"nb\", \"Norwegian - Norsk Bokm\xE5l\"],\n[\"pl\", \"Polish - Polski\"],\n[\"pt\", \"Portuguese - Portugu\xEAs\"],\n[\"ro\", \"Romanian - Rom\xE2n\u0103\"],\n[\"ru\", \"Russian - \u0420\u0443\u0441\u0441\u043A\u0438\u0439\"],\n[\"sk\", \"Slovak - Sloven\u010Dina\"],\n[\"sl\", \"Slovenian - Sloven\u0161\u010Dina\"],\n[\"es\", \"Spanish - Espa\xF1ol\"],\n[\"sv\", \"Swedish - Svenska\"],\n[\"ta\", \"Tamil - \u0BA4\u0BAE\u0BBF\u0BB4\u0BCD\"],\n[\"te\", \"Telugu - \u0C24\u0C46\u0C32\u0C41\u0C17\u0C41\"],\n[\"th\", \"Thai - \u0E44\u0E17\u0E22\"],\n[\"tr\", \"Turkish - T\xFCrk\xE7e\"],\n[\"uk\", \"Ukrainian - \u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430\"],\n[\"vi\", \"Vietnamese - Ti\u1EBFng Vi\u1EC7t\"],\n";const customApiHelpZH="// \u8BF7\u6C42\u6570\u636E\u9ED8\u8BA4\u683C\u5F0F\n{\n  \"url\": \"{{url}}\",\n  \"method\": \"POST\",\n  \"headers\": {\n    \"Content-type\": \"application/json\",\n    \"Authorization\": \"Bearer {{key}}\"\n  },\n  \"body\": {\n    \"text\": \"{{text}}\", // \u5F85\u7FFB\u8BD1\u6587\u5B57\n    \"from\": \"{{from}}\", // \u6587\u5B57\u7684\u8BED\u8A00\uFF08\u53EF\u80FD\u4E3A\u7A7A\uFF09\n    \"to\": \"{{to}}\",     // \u76EE\u6807\u8BED\u8A00\n  },\n}\n\n\n// \u8FD4\u56DE\u6570\u636E\u9ED8\u8BA4\u683C\u5F0F\n{\n  text: \"\", // \u7FFB\u8BD1\u540E\u7684\u6587\u5B57\n  from: \"\", // \u8BC6\u522B\u7684\u6E90\u8BED\u8A00\n  to: \"\",   // \u76EE\u6807\u8BED\u8A00\uFF08\u53EF\u9009\uFF09\n}\n\n\n// Hook \u8303\u4F8B\n// URL\nhttps://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN\n\n// Request Hook\n(text, from, to, url, key) => [url, {\n  headers: {\n      \"Content-type\": \"application/json\",\n  },\n  method: \"GET\",\n  body: null,\n}]\n\n// Response Hook\n// \u5176\u4E2D\u8FD4\u56DE\u6570\u7EC4\u7B2C\u4E00\u4E2A\u503C\u8868\u793A\u8BD1\u6587\u5B57\u7B26\u4E32\uFF0C\u7B2C\u4E8C\u4E2A\u503C\u4E3A\u5E03\u5C14\u503C\uFF0C\u8868\u793A\u539F\u6587\u8BED\u8A00\u4E0E\u76EE\u6807\u8BED\u8A00\u662F\u5426\u76F8\u540C\n(res, text, from, to) => [res.sentences.map((item) => item.trans).join(\" \"), to === res.src]\n\n\n// \u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u5982\u4E0B\n".concat(customApiLangs,"\n");const customApiHelpEN="// Default request\n{\n  \"url\": \"{{url}}\",\n  \"method\": \"POST\",\n  \"headers\": {\n    \"Content-type\": \"application/json\",\n    \"Authorization\": \"Bearer {{key}}\"\n  },\n  \"body\": {\n    \"text\": \"{{text}}\", // Text to be translated\n    \"from\": \"{{from}}\", // The language of the text (may be empty)\n    \"to\": \"{{to}}\",     // Target language\n  },\n}\n\n\n// Default response\n{\n  text: \"\", // translated text\n  from: \"\", // Recognized source language\n  to: \"\",   // Target language (optional)\n}\n\n\n/// Hook Example\n// URL\nhttps://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN\n\n// Request Hook\n(text, from, to, url, key) => [url, {\n  headers: {\n      \"Content-type\": \"application/json\",\n  },\n  method: \"GET\",\n  body: null,\n}]\n\n// Response Hook\n// In the returned array, the first value is the translated string, while the second value is a boolean\n// that indicates whether the source language is the same as the target language.\n(res, text, from, to) => [res.sentences.map((item) => item.trans).join(\" \"), to === res.src]\n\n\n// The supported language codes are as follows\n".concat(customApiLangs,"\n");const requestHookHelperZH="1\u3001\u7B2C\u4E00\u4E2A\u53C2\u6570\u5305\u542B\u5982\u4E0B\u5B57\u6BB5\uFF1A'texts', 'from', 'to', 'url', 'key', 'model', 'systemPrompt', ...\n2\u3001\u8FD4\u56DE\u503C\u5FC5\u987B\u662F\u5305\u542B\u4EE5\u4E0B\u5B57\u6BB5\u7684\u5BF9\u8C61\uFF1A 'url', 'body', 'headers', 'method'\n3\u3001\u5982\u8FD4\u56DE\u7A7A\u503C\uFF0C\u5219hook\u51FD\u6570\u4E0D\u4F1A\u4EA7\u751F\u4EFB\u4F55\u6548\u679C\u3002\n\n// \u793A\u4F8B\nasync (args, { url, body, headers, userMsg, method } = {}) => {\n  return { url, body, headers, userMsg, method };\n}";const requestHookHelperEN="1. The first parameter contains the following fields: 'texts', 'from', 'to', 'url', 'key', 'model', 'systemPrompt', ...\n2. The return value must be an object containing the following fields: 'url', 'body', 'headers', 'method'\n3. If a null value is returned, the hook function will have no effect.\n\n// Example\nasync (args, { url, body, headers, userMsg, method } = {}) => {\n  return { url, body, headers, userMsg, method };\n}";const responsetHookHelperZH="1\u3001\u7B2C\u4E00\u4E2A\u53C2\u6570\u5305\u542B\u5982\u4E0B\u5B57\u6BB5\uFF1A'res', ...\n2\u3001\u8FD4\u56DE\u503C\u5FC5\u987B\u662F\u5305\u542B\u4EE5\u4E0B\u5B57\u6BB5\u7684\u5BF9\u8C61\uFF1A 'translations'\n  \uFF08'translations' \u5E94\u4E3A\u4E00\u4E2A\u4E8C\u7EF4\u6570\u7EC4\uFF1A[[\u8BD1\u6587, \u539F\u6587\u8BED\u8A00]]\uFF09\n3\u3001\u5982\u8FD4\u56DE\u7A7A\u503C\uFF0C\u5219hook\u51FD\u6570\u4E0D\u4F1A\u4EA7\u751F\u4EFB\u4F55\u6548\u679C\u3002\n\n// \u793A\u4F8B\nasync ({ res, ...args }) => {\n  const translations = [[\"\u4F60\u597D\", \"en\"]];\n  const modelMsg = {}; // \u7528\u4E8EAI\u4E0A\u4E0B\u6587\n  return { translations, modelMsg };\n}";const responsetHookHelperEN="1. The first parameter contains the following fields: 'res', ...\n2. The return value must be an object containing the following fields: 'translations'\n  ('translations' should be a two-dimensional array: [[translation, source language]]).\n3. If a null value is returned, the hook function will have no effect.\n\n// Example\nasync ({ res, ...args }) => {\n  const translations = [[\"\u4F60\u597D\", \"en\"]];\n  const modelMsg = {}; // For AI context\n  return { translations, modelMsg };\n}";const I18N={app_name:{zh:"\u7B80\u7EA6\u7FFB\u8BD1",en:"KISS Translator",zh_TW:"\u7C21\u7D04\u7FFB\u8B6F"},translate:{zh:"\u7FFB\u8BD1",en:"Translate",zh_TW:"\u7FFB\u8B6F"},custom_api_help:{zh:customApiHelpZH,en:customApiHelpEN,zh_TW:customApiHelpZH},request_hook_helper:{zh:requestHookHelperZH,en:requestHookHelperEN,zh_TW:requestHookHelperZH},response_hook_helper:{zh:responsetHookHelperZH,en:responsetHookHelperEN,zh_TW:responsetHookHelperZH},translate_alt:{zh:"\u7FFB\u8BD1",en:"Translate",zh_TW:"\u7FFB\u8B6F"},basic_setting:{zh:"\u57FA\u672C\u8BBE\u7F6E",en:"Basic Setting",zh_TW:"\u57FA\u672C\u8A2D\u5B9A"},rules_setting:{zh:"\u89C4\u5219\u8BBE\u7F6E",en:"Rules Setting",zh_TW:"\u898F\u5247\u8A2D\u5B9A"},apis_setting:{zh:"\u63A5\u53E3\u8BBE\u7F6E",en:"Apis Setting",zh_TW:"API\u8A2D\u5B9A"},sync_setting:{zh:"\u540C\u6B65\u8BBE\u7F6E",en:"Sync Setting",zh_TW:"\u540C\u6B65\u8A2D\u5B9A"},patch_setting:{zh:"\u8865\u4E01\u8BBE\u7F6E",en:"Patch Setting",zh_TW:"\u4FEE\u88DC\u8A2D\u5B9A"},patch_setting_help:{zh:"\u9488\u5BF9\u4E00\u4E9B\u7279\u6B8A\u7F51\u7AD9\u7684\u4FEE\u6B63\u811A\u672C\uFF0C\u4EE5\u4FBF\u7FFB\u8BD1\u8F6F\u4EF6\u5F97\u5230\u66F4\u597D\u7684\u5C55\u793A\u6548\u679C\u3002",en:"Corrected scripts for some special websites so that the translation software can get better display results.",zh_TW:"\u91DD\u5C0D\u67D0\u4E9B\u7279\u6B8A\u7DB2\u7AD9\u7684\u4FEE\u6B63\u8173\u672C\uFF0C\u8B93\u7FFB\u8B6F\u8EDF\u9AD4\u6709\u66F4\u597D\u7684\u986F\u793A\u6548\u679C\u3002"},inject_webfix:{zh:"\u6CE8\u5165\u4FEE\u590D\u8865\u4E01",en:"Inject Webfix",zh_TW:"\u6CE8\u5165\u4FEE\u6B63\u88DC\u4E01"},about:{zh:"\u5173\u4E8E",en:"About",zh_TW:"\u95DC\u65BC"},about_md:{zh:"README.md",en:"README.en.md",zh_TW:"README.md"},about_md_local:{zh:"\u8BF7 [\u70B9\u51FB\u8FD9\u91CC](".concat("https://github.com/fishjar/kiss-translator",") \u67E5\u770B\u8BE6\u60C5\u3002"),en:"Please [click here](".concat("https://github.com/fishjar/kiss-translator",") for details."),zh_TW:"\u8ACB\u3010\u9EDE\u9019\u88E1\u3011\u67E5\u770B\u8A73\u7D30\u5167\u5BB9\u3002"},ui_lang:{zh:"\u754C\u9762\u8BED\u8A00",en:"Interface Language",zh_TW:"\u4ECB\u9762\u8A9E\u8A00"},fetch_limit:{zh:"\u6700\u5927\u5E76\u53D1\u8BF7\u6C42\u6570\u91CF (1-100)",en:"Maximum Number Of Concurrent Requests (1-100)",zh_TW:"\u6700\u5927\u540C\u6642\u8ACB\u6C42\u6578\u91CF (1-100)"},if_think:{zh:"\u542F\u7528\u6216\u7981\u7528\u6A21\u578B\u7684\u6DF1\u5EA6\u601D\u8003\u80FD\u529B",en:"Enable or disable the model\u2019s thinking behavior ",zh_TW:"\u555F\u7528\u6216\u505C\u7528\u6A21\u578B\u7684\u6DF1\u5EA6\u601D\u8003\u80FD\u529B"},think:{zh:"\u542F\u7528\u6DF1\u5EA6\u601D\u8003",en:"enable thinking",zh_TW:"\u555F\u7528\u6DF1\u5EA6\u601D\u8003"},nothink:{zh:"\u7981\u7528\u6DF1\u5EA6\u601D\u8003",en:"disable thinking",zh_TW:"\u505C\u7528\u6DF1\u5EA6\u601D\u8003"},think_ignore:{zh:"\u5FFD\u7565\u4EE5\u4E0B\u6A21\u578B\u7684\u8F93\u51FA,\u9017\u53F7(,)\u5206\u5272,\u5F53\u6A21\u578B\u652F\u6301\u601D\u8003\u4F46ollama\u4E0D\u652F\u6301\u65F6\u9700\u8981\u586B\u5199\u672C\u53C2\u6570",en:"Ignore the  block for the following models, comma (,) separated",zh_TW:"\u5FFD\u7565\u4EE5\u4E0B\u6A21\u578B\u7684  \u8F38\u51FA\uFF0C\u4EE5\u9017\u865F (,) \u5206\u9694\uFF1B\u7576\u6A21\u578B\u652F\u63F4\u601D\u8003\u4F46 ollama \u4E0D\u652F\u63F4\u6642\u9700\u8981\u586B\u5BEB\u6B64\u53C3\u6578"},fetch_interval:{zh:"\u6BCF\u6B21\u8BF7\u6C42\u95F4\u9694\u65F6\u95F4 (0-5000ms)",en:"Time Between Requests (0-5000ms)",zh_TW:"\u6BCF\u6B21\u8ACB\u6C42\u9593\u9694\u6642\u9593 (0-5000ms)"},translate_interval:{zh:"\u7FFB\u8BD1\u95F4\u9694\u65F6\u95F4 (10-2000ms)",en:"Translation Interval (10-2000ms)",zh_TW:"\u7FFB\u8B6F\u9593\u9694\u6642\u9593 (10-2000ms)"},http_timeout:{zh:"\u8BF7\u6C42\u8D85\u65F6\u65F6\u95F4 (5000-60000ms)",en:"Request Timeout Time (5000-60000ms)",zh_TW:"\u8ACB\u6C42\u903E\u6642\u6642\u9593 (5000-60000ms)"},custom_header:{zh:"\u81EA\u5B9A\u4E49Header\u53C2\u6570",en:"Custom Header Params"},custom_header_help:{zh:"\u4F7F\u7528JSON\u683C\u5F0F\uFF0C\u4F8B\u5982 \"User-Agent\": \"Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0\"",en:"Use JSON format, for example \"User-Agent\": \"Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0\""},custom_body:{zh:"\u81EA\u5B9A\u4E49Body\u53C2\u6570",en:"Custom Body Params"},custom_body_help:{zh:"\u4F7F\u7528JSON\u683C\u5F0F\uFF0C\u4F8B\u5982 \"top_p\": 0.7",en:"Use JSON format, for example \"top_p\": 0.7"},min_translate_length:{zh:"\u6700\u5C0F\u7FFB\u8BD1\u5B57\u7B26\u6570 (1-100)",en:"Minimum number Of Translated Characters (1-100)",zh_TW:"\u6700\u5C0F\u7FFB\u8B6F\u5B57\u5143\u6578 (1-100)"},max_translate_length:{zh:"\u6700\u5927\u7FFB\u8BD1\u5B57\u7B26\u6570 (100-100000)",en:"Maximum number Of Translated Characters (100-100000)",zh_TW:"\u6700\u5927\u7FFB\u8B6F\u5B57\u5143\u6578 (100-100000)"},num_of_newline_characters:{zh:"\u6362\u884C\u5B57\u7B26\u6570 (1-1000)",en:"Number of Newline Characters (1-1000)",zh_TW:"\u63DB\u884C\u5B57\u5143\u6578 (1-1000)"},translate_service:{zh:"\u7FFB\u8BD1\u670D\u52A1",en:"Translate Service",zh_TW:"\u7FFB\u8B6F\u670D\u52D9"},translate_service_multiple:{zh:"\u7FFB\u8BD1\u670D\u52A1 (\u652F\u6301\u591A\u9009)",en:"Translation service (multiple supported)",zh_TW:"\u7FFB\u8B6F\u670D\u52D9 (\u652F\u63F4\u591A\u9078)"},translate_timing:{zh:"\u7FFB\u8BD1\u65F6\u673A",en:"Translate Timing",zh_TW:"\u7FFB\u8B6F\u6642\u6A5F"},mk_pagescroll:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u7FFB\u8BD1\uFF08\u63A8\u8350\uFF09",en:"Rolling Loading (Suggested)",zh_TW:"\u6EFE\u52D5\u8F09\u5165\u7FFB\u8B6F\uFF08\u5EFA\u8B70\uFF09"},mk_pageopen:{zh:"\u7ACB\u5373\u5168\u90E8\u7FFB\u8BD1",en:"Translate all now",zh_TW:"\u7ACB\u5373\u5168\u90E8\u7FFB\u8B6F"},mk_mouseover:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},mk_ctrlKey:{zh:"Control + \u9F20\u6807\u60AC\u505C",en:"Control + Mouseover",zh_TW:"Control + \u6ED1\u9F20\u61F8\u505C"},mk_shiftKey:{zh:"Shift + \u9F20\u6807\u60AC\u505C",en:"Shift + Mouseover",zh_TW:"Shift + \u6ED1\u9F20\u61F8\u505C"},mk_altKey:{zh:"Alt + \u9F20\u6807\u60AC\u505C",en:"Alt + Mouseover",zh_TW:"Alt + \u6ED1\u9F20\u61F8\u505C"},from_lang:{zh:"\u539F\u6587\u8BED\u8A00",en:"Source Language",zh_TW:"\u539F\u6587\u8A9E\u8A00"},to_lang:{zh:"\u76EE\u6807\u8BED\u8A00",en:"Target Language",zh_TW:"\u76EE\u6A19\u8A9E\u8A00"},to_lang2:{zh:"\u7B2C\u4E8C\u76EE\u6807\u8BED\u8A00",en:"Target Language 2",zh_TW:"\u7B2C\u4E8C\u76EE\u6A19\u8A9E\u8A00"},to_lang2_helper:{zh:"\u8BBE\u5B9A\u540E\uFF0C\u4E0E\u76EE\u6807\u8BED\u8A00\u4EA7\u751F\u4E92\u8BD1\u6548\u679C\uFF0C\u4F46\u4F9D\u8D56\u8FDC\u7A0B\u8BED\u8A00\u8BC6\u522B\u3002",en:"After setting, it will produce mutual translation effect with the target language, but it relies on remote language recognition.",zh_TW:"\u8A2D\u5B9A\u5F8C\u6703\u8207\u76EE\u6A19\u8A9E\u8A00\u4E92\u8B6F\uFF0C\u4F46\u4F9D\u8CF4\u9060\u7AEF\u8A9E\u8A00\u8B58\u5225\u3002"},text_style:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},text_style_alt:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},bg_color:{zh:"\u6837\u5F0F\u989C\u8272",en:"Style Color",zh_TW:"\u6A23\u5F0F\u984F\u8272"},remain_unchanged:{zh:"\u4FDD\u7559\u4E0D\u53D8",en:"Remain Unchanged",zh_TW:"\u4FDD\u7559\u4E0D\u8B8A"},google_api:{zh:"\u8C37\u6B4C\u7FFB\u8BD1\u63A5\u53E3",en:"Google Translate API",zh_TW:"Google \u7FFB\u8B6F\u4ECB\u9762"},default_selector:{zh:"\u9ED8\u8BA4\u9009\u62E9\u5668",en:"Default selector",zh_TW:"\u9810\u8A2D\u9078\u64C7\u5668"},selector_rules:{zh:"\u9009\u62E9\u5668\u89C4\u5219",en:"Selector Rules",zh_TW:"\u9078\u64C7\u5668\u898F\u5247"},save:{zh:"\u4FDD\u5B58",en:"Save",zh_TW:"\u5132\u5B58"},edit:{zh:"\u7F16\u8F91",en:"Edit",zh_TW:"\u7DE8\u8F2F"},cancel:{zh:"\u53D6\u6D88",en:"Cancel",zh_TW:"\u53D6\u6D88"},delete:{zh:"\u5220\u9664",en:"Delete",zh_TW:"\u522A\u9664"},reset:{zh:"\u91CD\u7F6E",en:"Reset",zh_TW:"\u91CD\u8A2D"},add:{zh:"\u6DFB\u52A0",en:"Add",zh_TW:"\u65B0\u589E"},inject_rules:{zh:"\u6CE8\u5165\u8BA2\u9605\u89C4\u5219",en:"Inject Subscribe Rules",zh_TW:"\u6CE8\u5165\u8A02\u95B1\u898F\u5247"},personal_rules:{zh:"\u4E2A\u4EBA\u89C4\u5219",en:"Rules",zh_TW:"\u500B\u4EBA\u898F\u5247"},subscribe_rules:{zh:"\u8BA2\u9605\u89C4\u5219",en:"Subscribe",zh_TW:"\u8A02\u95B1\u898F\u5247"},overwrite_subscribe_rules:{zh:"\u8986\u5199\u8BA2\u9605\u89C4\u5219",en:"Overwrite",zh_TW:"\u8986\u5BEB\u8A02\u95B1\u898F\u5247"},subscribe_url:{zh:"\u8BA2\u9605\u5730\u5740",en:"Subscribe URL",zh_TW:"\u8A02\u95B1\u7DB2\u5740"},rules_warn_1:{zh:"1\u3001\u89C4\u5219\u751F\u6548\u7684\u4F18\u5148\u7EA7\u4F9D\u6B21\u4E3A\uFF1A\u4E2A\u4EBA\u89C4\u5219 > \u8BA2\u9605\u89C4\u5219 > \u5168\u5C40\u89C4\u5219\u3002\"\u5168\u5C40\u89C4\u5219\"\u76F8\u5F53\u4E8E\u515C\u5E95\u89C4\u5219\u3002",en:"1. The priority of rules is: personal rules > subscription rules > global rules. \"Global rules\" are like a fallback rule.",zh_TW:"1.\u898F\u5247\u751F\u6548\u7684\u512A\u5148\u9806\u5E8F\u4F9D\u5E8F\u70BA\uFF1A\u500B\u4EBA\u898F\u5247 > \u8A02\u95B1\u898F\u5247 > \u5168\u57DF\u898F\u5247\u3002 \"\u5168\u57DF\u898F\u5247\"\u76F8\u7576\u65BC\u515C\u5E95\u898F\u5247\u3002"},rules_warn_2:{zh:"2\u3001\u201C\u8BA2\u9605\u89C4\u5219\u201D\u9009\u62E9\u6CE8\u5165\u540E\u624D\u4F1A\u751F\u6548\u3002",en:"2. \"Subscription rules\" will take effect only after injection is selected.",zh_TW:"2\u3001\u300C\u8A02\u95B1\u898F\u5247\u300D\u9078\u64C7\u6CE8\u5165\u5F8C\u624D\u6703\u751F\u6548\u3002"},rules_warn_3:{zh:"3\u3001\u5173\u4E8E\u89C4\u5219\u586B\u5199\uFF1A\u8F93\u5165\u6846\u7559\u7A7A\u6216\u4E0B\u62C9\u6846\u9009\u201C*\u201D\u8868\u793A\u91C7\u7528\u5168\u5C40\u89C4\u5219\u3002",en:"3. Regarding filling in the rules: Leave the input box blank or select \"*\" in the drop-down box to use global rule.",zh_TW:"3. \u898F\u5247\u586B\u5BEB\u8AAA\u660E\uFF1A\u8F38\u5165\u6846\u7559\u7A7A\u6216\u4E0B\u62C9\u9078\u64C7\u300C*\u300D\u8868\u793A\u4F7F\u7528\u5168\u57DF\u898F\u5247\u3002"},sync_warn:{zh:"\u6D89\u53CA\u9690\u79C1\u6570\u636E\u7684\u540C\u6B65\u8BF7\u8C28\u614E\u9009\u62E9\u7B2C\u4E09\u65B9\u540C\u6B65\u670D\u52A1\uFF0C\u5EFA\u8BAE\u81EA\u884C\u642D\u5EFA kiss-worker \u6216 WebDAV \u670D\u52A1\u3002",en:"When synchronizing data that involves privacy, please be cautious about choosing third-party sync services. It is recommended to set up your own sync service using kiss-worker or WebDAV.",zh_TW:"\u540C\u6B65\u6D89\u53CA\u96B1\u79C1\u8CC7\u6599\u6642\uFF0C\u8ACB\u8B39\u614E\u9078\u64C7\u7B2C\u4E09\u65B9\u540C\u6B65\u670D\u52D9\uFF1B\u5EFA\u8B70\u81EA\u5EFA kiss-worker \u6216 WebDAV \u670D\u52D9\u3002"},sync_warn_2:{zh:"\u5982\u679C\u670D\u52A1\u5668\u5B58\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u540C\u6B65\u7684\u6570\u636E\uFF0C\u7B2C\u4E00\u6B21\u540C\u6B65\u5C06\u76F4\u63A5\u8986\u76D6\u672C\u5730\u914D\u7F6E\uFF0C\u540E\u9762\u5219\u6839\u636E\u4FEE\u6539\u65F6\u95F4\uFF0C\u65B0\u7684\u8986\u76D6\u65E7\u7684\u3002",en:"If the server has data synchronized by other clients, the first synchronization will directly overwrite the local configuration, and later, according to the modification time, the new one will overwrite the old one.",zh_TW:"\u82E5\u4F3A\u670D\u5668\u4E0A\u5B58\u5728\u5176\u4ED6\u7528\u6236\u7AEF\u540C\u6B65\u7684\u8CC7\u6599\uFF0C\u7B2C\u4E00\u6B21\u540C\u6B65\u6703\u76F4\u63A5\u8986\u84CB\u672C\u6A5F\u8A2D\u5B9A\uFF1B\u4E4B\u5F8C\u5247\u4F9D\u4FEE\u6539\u6642\u9593\uFF0C\u7531\u65B0\u7684\u8986\u84CB\u820A\u7684\u3002"},about_sync_api:{zh:"\u81EA\u5EFAkiss-wroker\u6570\u636E\u540C\u6B65\u670D\u52A1",en:"Self-hosting a Kiss-worker data sync service",zh_TW:"\u81EA\u5EFA kiss-wroker \u8CC7\u6599\u540C\u6B65\u670D\u52D9"},about_api:{zh:"1\u3001\u5176\u4E2D BuiltinAI \u4E3A\u6D4F\u89C8\u5668\u5185\u7F6EAI\u7FFB\u8BD1\uFF0C\u76EE\u524D\u4EC5 Chrome 138 \u53CA\u4EE5\u4E0A\u7248\u672C\u5F97\u5230\u652F\u6301\u3002",en:"1. BuiltinAI is the browser's built-in AI translation, which is currently only supported by Chrome 138 and above.",zh_TW:"1.\u5176\u4E2D BuiltinAI \u70BA\u700F\u89BD\u5668\u5167\u5EFAAI\u7FFB\u8B6F\uFF0C\u76EE\u524D\u50C5 Chrome 138 \u4EE5\u4E0A\u7248\u672C\u652F\u63F4\u3002"},about_api_2:{zh:"2\u3001\u5927\u90E8\u5206AI\u63A5\u53E3\u90FD\u4E0EOpenAI\u517C\u5BB9\uFF0C\u56E0\u6B64\u9009\u62E9\u6DFB\u52A0OpenAI\u7C7B\u578B\u5373\u53EF\u3002",en:"2. Most AI interfaces are compatible with OpenAI, so just choose to add the OpenAI type.",zh_TW:"2.\u5927\u90E8\u5206AI\u4ECB\u9762\u90FD\u8207OpenAI\u76F8\u5BB9\uFF0C\u56E0\u6B64\u9078\u64C7\u65B0\u589EOpenAI\u985E\u578B\u5373\u53EF\u3002"},about_api_3:{zh:"3\u3001\u6682\u672A\u5217\u51FA\u7684\u63A5\u53E3\uFF0C\u7406\u8BBA\u4E0A\u90FD\u53EF\u4EE5\u901A\u8FC7\u81EA\u5B9A\u4E49\u63A5\u53E3 (Custom) \u7684\u5F62\u5F0F\u652F\u6301\u3002",en:"3. Interfaces that have not yet been launched can theoretically be supported through custom interfaces.",zh_TW:"3\u3001\u66AB\u672A\u5217\u51FA\u7684\u4ECB\u9762\uFF0C\u7406\u8AD6\u4E0A\u90FD\u53EF\u900F\u904E\u81EA\u8A02\u4ECB\u9762  (Custom)  \u7684\u5F62\u5F0F\u652F\u63F4\u3002"},about_api_proxy:{zh:"\u67E5\u770B\u81EA\u5EFA\u4E00\u4E2A\u7FFB\u8BD1\u63A5\u53E3\u4EE3\u7406",en:"Check out the self-built translation interface proxy",zh_TW:"\u67E5\u770B\u5982\u4F55\u81EA\u5EFA\u7FFB\u8B6F\u4ECB\u9762 Proxy"},setting_helper:{zh:"\u65B0\u65E7\u914D\u7F6E\u5E76\u4E0D\u517C\u5BB9\uFF0C\u5BFC\u51FA\u7684\u65E7\u7248\u914D\u7F6E\uFF0C\u52FF\u518D\u6B21\u5BFC\u5165\u3002",en:"The old and new configurations are not compatible. Do not import the exported old configuration again.",zh_TW:"\u65B0\u820A\u914D\u7F6E\u4E26\u4E0D\u76F8\u5BB9\uFF0C\u532F\u51FA\u7684\u820A\u7248\u914D\u7F6E\uFF0C\u52FF\u518D\u6B21\u532F\u5165\u3002"},style_none:{zh:"\u65E0",en:"None",zh_TW:"\u7121"},under_line:{zh:"\u4E0B\u5212\u76F4\u7EBF",en:"Underline",zh_TW:"\u4E0B\u5283\u76F4\u7DDA"},dot_line:{zh:"\u4E0B\u5212\u70B9\u72B6\u7EBF",en:"Dotted Underline",zh_TW:"\u4E0B\u5283\u9EDE\u72C0\u7DDA"},dash_line:{zh:"\u4E0B\u5212\u865A\u7EBF",en:"Dashed Underline",zh_TW:"\u4E0B\u5283\u865B\u7DDA"},dash_box:{zh:"\u865A\u7EBF\u6846",en:"Dashed Box"},wavy_line:{zh:"\u4E0B\u5212\u6CE2\u6D6A\u7EBF",en:"Wavy Underline",zh_TW:"\u4E0B\u5283\u6CE2\u6D6A\u7DDA"},fuzzy:{zh:"\u6A21\u7CCA",en:"Fuzzy",zh_TW:"\u6A21\u7CCA"},highlight:{zh:"\u9AD8\u4EAE",en:"Highlight",zh_TW:"\u53CD\u767D\u6A19\u793A"},blockquote:{zh:"\u5F15\u7528",en:"Blockquote",zh_TW:"\u5F15\u7528"},gradient:{zh:"\u6E10\u53D8",en:"Gradient",zh_TW:"\u6F38\u8B8A"},blink:{zh:"\u95EA\u73B0",en:"Blink",zh_TW:"\u9583\u73FE"},glow:{zh:"\u53D1\u5149",en:"Glow",zh_TW:"\u767C\u5149"},diy_style:{zh:"\u81EA\u5B9A\u4E49\u6837\u5F0F",en:"Custom Style",zh_TW:"\u81EA\u8A02\u6A23\u5F0F"},diy_style_helper:{zh:"\u9075\u5FAA\u201CCSS\u201D\u7684\u8BED\u6CD5",en:"Follow the syntax of \"CSS\"",zh_TW:"\u9075\u5FAA CSS \u8A9E\u6CD5"},setting:{zh:"\u8BBE\u7F6E",en:"Setting",zh_TW:"\u8A2D\u5B9A"},pattern:{zh:"\u5339\u914D\u7F51\u5740",en:"URL pattern",zh_TW:"\u5339\u914D\u7DB2\u5740"},pattern_helper:{zh:"1\u3001\u652F\u6301\u661F\u53F7(*)\u901A\u914D\u7B26\u30022\u3001\u591A\u4E2AURL\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\u3002",en:"1. Supports the asterisk (*) wildcard character. 2. Separate multiple URLs with newlines or English commas \",\".",zh_TW:"1. \u652F\u63F4\u661F\u865F (*) \u842C\u7528\u5B57\u5143\u30022. \u591A\u500B URL \u8ACB\u4EE5\u63DB\u884C\u6216\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u3002"},selector_helper:{zh:"1\u3001\u9700\u8981\u7FFB\u8BD1\u7684\u76EE\u6807\u5143\u7D20\u30022\u3001\u5F00\u542F\u81EA\u52A8\u626B\u63CF\u9875\u9762\u540E\uFF0C\u672C\u8BBE\u7F6E\u65E0\u6548\u30023\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. The target element to be translated. 2. This setting is invalid when automatic page scanning is enabled. 3. Follow the CSS selector syntax.",zh_TW:"1\u3001\u9700\u8981\u7FFB\u8B6F\u7684\u76EE\u6A19\u5143\u7D20\u3002 2.\u958B\u555F\u81EA\u52D5\u6383\u63CF\u9801\u9762\u5F8C\uFF0C\u672C\u8A2D\u5B9A\u7121\u6548\u3002 3.\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},translate_switch:{zh:"\u5F00\u542F\u7FFB\u8BD1",en:"Translate Switch",zh_TW:"\u958B\u555F\u7FFB\u8B6F"},default_enabled:{zh:"\u9ED8\u8BA4\u5F00\u542F",en:"Enabled",zh_TW:"\u9810\u8A2D\u958B\u555F"},default_disabled:{zh:"\u9ED8\u8BA4\u5173\u95ED",en:"Disabled",zh_TW:"\u9810\u8A2D\u95DC\u9589"},selector:{zh:"\u9009\u62E9\u5668",en:"Selector",zh_TW:"\u9078\u64C7\u5668"},target_selector:{zh:"\u76EE\u6807\u5143\u7D20\u9009\u62E9\u5668",en:"Target element selector",zh_TW:"\u76EE\u6A19\u5143\u7D20\u9078\u64C7\u5668"},keep_selector:{zh:"\u4FDD\u7559\u5143\u7D20\u9009\u62E9\u5668",en:"Keep unchanged selector",zh_TW:"\u4FDD\u7559\u5143\u7D20\u9078\u64C7\u5668"},keep_selector_helper:{zh:"1\u3001\u76EE\u6807\u5143\u7D20\u4E0B\u9762\u9700\u8981\u539F\u6837\u4FDD\u7559\u7684\u5B50\u8282\u70B9\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. The child nodes under the target element need to remain intact. 2. Follow the CSS selector syntax.",zh_TW:"1. \u76EE\u6A19\u5143\u7D20\u4E0B\u7684\u5B50\u7BC0\u9EDE\u9700\u8981\u4FDD\u6301\u539F\u6A23\u3002 2. \u9075\u5FAA CSS \u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},root_selector:{zh:"\u6839\u8282\u70B9\u9009\u62E9\u5668",en:"Root node selector",zh_TW:"\u6839\u7BC0\u9EDE\u9078\u64C7\u5668"},root_selector_helper:{zh:"1\u3001\u7528\u4E8E\u7F29\u5C0F\u9875\u9762\u7FFB\u8BD1\u8303\u56F4\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. Used to narrow the translation scope of the page. 2. Follow the CSS selector syntax.",zh_TW:"1.\u7528\u65BC\u7E2E\u5C0F\u9801\u9762\u7FFB\u8B6F\u7BC4\u570D\u3002 2\u3001\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},ignore_selector:{zh:"\u4E0D\u7FFB\u8BD1\u8282\u70B9\u9009\u62E9\u5668",en:"Ignore node selectors",zh_TW:"\u4E0D\u7FFB\u8B6F\u7BC0\u9EDE\u9078\u64C7\u5668"},ignore_selector_helper:{zh:"1\u3001\u9700\u8981\u5FFD\u7565\u7684\u8282\u70B9\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. Nodes to be ignored. 2. Follow CSS selector syntax.",zh_TW:"1\u3001\u9700\u8981\u5FFD\u7565\u7684\u7BC0\u9EDE\u3002 2\u3001\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},terms:{zh:"\u4E13\u4E1A\u672F\u8BED",en:"Terms",zh_TW:"\u5C08\u696D\u8853\u8A9E"},terms_helper:{zh:"1\u3001\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\uFF0C\u65E0\u9700\u659C\u6746\uFF0C\u4E0D\u652F\u6301\u4FEE\u9970\u7B26\u30022\u3001\u591A\u6761\u672F\u8BED\u7528\u6362\u884C\u6216\u5206\u53F7\u201C;\u201D\u9694\u5F00\u30023\u3001\u672F\u8BED\u548C\u8BD1\u6587\u7528\u82F1\u6587\u9017\u53F7\u201C,\u201D\u9694\u5F00\u30024\u3001\u6CA1\u6709\u8BD1\u6587\u89C6\u4E3A\u4E0D\u7FFB\u8BD1\u672F\u8BED\u3002",en:"1. Supports regular expression matching, no slash required, and no modifiers are supported. 2. Separate multiple terms with newlines or semicolons \";\". 3. Terms and translations are separated by English commas \",\". 4. If there is no translation, the term will be deemed not to be translated.",zh_TW:"1. \u652F\u63F4\u6B63\u5247\u8868\u9054\u5F0F\u6BD4\u5C0D\uFF0C\u7121\u9700\u659C\u7DDA\uFF0C\u4E14\u4E0D\u652F\u63F4\u4FEE\u98FE\u7B26\u30022. \u591A\u689D\u8853\u8A9E\u4EE5\u63DB\u884C\u6216\u5206\u865F\u300C;\u300D\u5206\u9694\u30023. \u8853\u8A9E\u8207\u8B6F\u6587\u4EE5\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u30024. \u7121\u8B6F\u6587\u8005\u8996\u70BA\u4E0D\u7FFB\u8B6F\u8A72\u8853\u8A9E\u3002"},ai_terms:{zh:"AI\u4E13\u4E1A\u672F\u8BED",en:"AI Terms",zh_TW:"AI\u5C08\u696D\u8853\u8A9E"},ai_terms_helper:{zh:"1\u3001AI\u667A\u80FD\u66FF\u6362\uFF0C\u4E0D\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\u30022\u3001\u591A\u6761\u672F\u8BED\u7528\u6362\u884C\u6216\u5206\u53F7\u201C;\u201D\u9694\u5F00\u30023\u3001\u672F\u8BED\u548C\u8BD1\u6587\u7528\u82F1\u6587\u9017\u53F7\u201C,\u201D\u9694\u5F00\u30024\u3001\u6CA1\u6709\u8BD1\u6587\u89C6\u4E3A\u4E0D\u7FFB\u8BD1\u672F\u8BED\u3002",en:"1. AI intelligent replacement does not support regular expressions.2. Separate multiple terms with newlines or semicolons \";\". 3. Terms and translations are separated by English commas \",\". 4. If there is no translation, the term will be deemed not to be translated.",zh_TW:"1.AI\u667A\u80FD\u66FF\u63DB\uFF0C\u4E0D\u652F\u63F4\u6B63\u898F\u8868\u793A\u5F0F\u30022. \u591A\u689D\u8853\u8A9E\u4EE5\u63DB\u884C\u6216\u5206\u865F\u300C;\u300D\u5206\u9694\u30023. \u8853\u8A9E\u8207\u8B6F\u6587\u4EE5\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u30024. \u7121\u8B6F\u6587\u8005\u8996\u70BA\u4E0D\u7FFB\u8B6F\u8A72\u8853\u8A9E\u3002"},selector_style:{zh:"\u9009\u62E9\u5668\u8282\u70B9\u6837\u5F0F",en:"Selector Style",zh_TW:"\u9078\u64C7\u5668\u7BC0\u9EDE\u6A23\u5F0F"},terms_style:{zh:"\u4E13\u4E1A\u672F\u8BED\u6837\u5F0F",en:"Terms Style",zh_TW:"\u5C08\u696D\u8853\u8A9E\u6A23\u5F0F"},highlight_style:{zh:"\u8BCD\u6C47\u9AD8\u4EAE\u6837\u5F0F",en:"Fav Words highlight style",zh_TW:"\u8A5E\u5F59\u9AD8\u4EAE\u6A23\u5F0F"},selector_style_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\u3002",en:"It is injected when translation is turned on.",zh_TW:"\u5728\u958B\u555F\u7FFB\u8B6F\u6642\u6CE8\u5165\u3002"},selector_parent_style:{zh:"\u9009\u62E9\u5668\u7236\u8282\u70B9\u6837\u5F0F",en:"Parent Selector Style",zh_TW:"\u9078\u64C7\u5668\u7236\u7BC0\u9EDE\u6A23\u5F0F"},selector_grand_style:{zh:"\u9009\u62E9\u5668\u7956\u8282\u70B9\u6837\u5F0F",en:"Grand Selector Style",zh_TW:"\u9078\u64C7\u5668\u7956\u7BC0\u9EDE\u6A23\u5F0F"},inject_js:{zh:"\u6CE8\u5165JS",en:"Inject JS",zh_TW:"\u6CE8\u5165 JS"},inject_js_helper:{zh:"\u9884\u52A0\u8F7D\u65F6\u6CE8\u5165\uFF0C\u4E00\u4E2A\u9875\u9762\u4EC5\u8FD0\u884C\u4E00\u6B21\u3002\u5185\u7F6E\u5168\u5C40\u5BF9\u8C61 KT: {\n      apiTranslate,\n      apiDectect,\n      apiSetting,\n      apisMap,\n      toLang,\n      docInfo,\n      glossary,\n    }",en:"Injected during preload, runs only once per page. Built-in global object KT: {\n      apiTranslate,\n      apiDectect,\n      apiSetting,\n      apisMap,\n      toLang,\n      docInfo,\n      glossary,\n    }",zh_TW:"\u9810\u5148\u8F09\u5165\u6642\u6CE8\u5165\uFF0C\u4E00\u500B\u9801\u9762\u50C5\u904B\u884C\u4E00\u6B21\u3002\u5167\u5EFA\u5168\u57DF\u7269\u4EF6 KT: {\n      apiTranslate,\n      apiDectect,\n      apiSetting,\n      apisMap,\n      toLang,\n      docInfo,\n      glossary,\n    }"},inject_css:{zh:"\u6CE8\u5165CSS",en:"Inject CSS",zh_TW:"\u6CE8\u5165 CSS"},inject_css_helper:{zh:"\u521D\u59CB\u5316\u65F6\u6CE8\u5165\u8FD0\u884C\uFF0C\u4E00\u4E2A\u9875\u9762\u4EC5\u8FD0\u884C\u4E00\u6B21\u3002",en:"Injected and run at initialization, and only run once per page.",zh_TW:"\u521D\u59CB\u5316\u6642\u6CE8\u5165\u904B\u884C\uFF0C\u4E00\u500B\u9801\u9762\u50C5\u904B\u884C\u4E00\u6B21\u3002"},fixer_function:{zh:"\u4FEE\u590D\u51FD\u6570",en:"Fixer Function",zh_TW:"\u4FEE\u5FA9\u51FD\u5F0F"},fixer_function_helper:{zh:"1\u3001br\u662F\u5C06
\u6362\u884C\u66FF\u6362\u6210

\u30022\u3001bn\u662F\u5C06\\n\u6362\u884C\u66FF\u6362\u6210

\u30023\u3001brToDiv\u548CbnToDiv\u662F\u66FF\u6362\u6210

\u3002",en:"1. br replaces
line breaks with

. 2. bn replaces \\n newline with

. 3. brToDiv and bnToDiv are replaced with

.",zh_TW:"1. br \u6703\u5C07
\u63DB\u884C\u66FF\u63DB\u70BA

\u30022. bn \u6703\u5C07 \\n \u63DB\u884C\u66FF\u63DB\u70BA

\u30023. brToDiv \u8207 bnToDiv \u6703\u66FF\u63DB\u70BA

\u3002"},import:{zh:"\u5BFC\u5165",en:"Import",zh_TW:"\u532F\u5165"},export:{zh:"\u5BFC\u51FA",en:"Export",zh_TW:"\u532F\u51FA"},export_translation:{zh:"\u5BFC\u51FA\u91CA\u4E49",en:"Export Translation",zh_TW:"\u532F\u51FA\u91CB\u7FA9"},error_cant_be_blank:{zh:"\u4E0D\u80FD\u4E3A\u7A7A",en:"Can not be blank",zh_TW:"\u4E0D\u53EF\u70BA\u7A7A"},error_duplicate_values:{zh:"\u5B58\u5728\u91CD\u590D\u7684\u503C",en:"There are duplicate values",zh_TW:"\u5B58\u5728\u91CD\u8907\u7684\u503C"},error_wrong_file_type:{zh:"\u9519\u8BEF\u7684\u6587\u4EF6\u7C7B\u578B",en:"Wrong file type",zh_TW:"\u6A94\u6848\u985E\u578B\u932F\u8AA4"},error_fetch_url:{zh:"\u8BF7\u68C0\u67E5url\u5730\u5740\u662F\u5426\u6B63\u786E\u6216\u7A0D\u540E\u518D\u8BD5\u3002",en:"Please check if the url address is correct or try again later.",zh_TW:"\u8ACB\u6AA2\u67E5 URL \u662F\u5426\u6B63\u78BA\u6216\u7A0D\u5F8C\u518D\u8A66\u3002"},deepl_api:{zh:"DeepL \u63A5\u53E3",en:"DeepL API",zh_TW:"DeepL \u4ECB\u9762"},deepl_key:{zh:"DeepL \u5BC6\u94A5",en:"DeepL Key",zh_TW:"DeepL \u91D1\u9470"},openai_api:{zh:"OpenAI \u63A5\u53E3",en:"OpenAI API",zh_TW:"OpenAI \u4ECB\u9762"},openai_key:{zh:"OpenAI \u5BC6\u94A5",en:"OpenAI Key",zh_TW:"OpenAI \u91D1\u9470"},openai_model:{zh:"OpenAI \u6A21\u578B",en:"OpenAI Model",zh_TW:"OpenAI \u6A21\u578B"},openai_prompt:{zh:"OpenAI \u63D0\u793A\u8BCD",en:"OpenAI Prompt",zh_TW:"OpenAI \u63D0\u793A\u8A5E"},if_clear_cache:{zh:"\u662F\u5426\u6E05\u9664\u7F13\u5B58\uFF08\u9ED8\u8BA4\u7F13\u5B587\u5929\uFF09",en:"Whether clear cache (Default cache is 7 days)",zh_TW:"\u662F\u5426\u6E05\u9664\u5FEB\u53D6\uFF08\u9810\u8A2D\u5FEB\u53D67\u5929\uFF09"},clear_cache_never:{zh:"\u4E0D\u6E05\u9664\u7F13\u5B58",en:"Never clear cache",zh_TW:"\u4E0D\u6E05\u9664\u5FEB\u53D6"},clear_cache_restart:{zh:"\u91CD\u542F\u6D4F\u89C8\u5668\u65F6\u6E05\u9664\u7F13\u5B58",en:"Clear cache when restarting browser",zh_TW:"\u91CD\u65B0\u555F\u52D5\u700F\u89BD\u5668\u6642\u6E05\u9664\u5FEB\u53D6"},data_sync_type:{zh:"\u6570\u636E\u540C\u6B65\u65B9\u5F0F",en:"Data Sync Type",zh_TW:"\u8CC7\u6599\u540C\u6B65\u65B9\u5F0F"},data_sync_url:{zh:"\u6570\u636E\u540C\u6B65\u63A5\u53E3",en:"Data Sync API",zh_TW:"\u8CC7\u6599\u540C\u6B65\u4ECB\u9762"},data_sync_user:{zh:"\u6570\u636E\u540C\u6B65\u8D26\u6237",en:"Data Sync User",zh_TW:"\u8CC7\u6599\u540C\u6B65\u5E33\u865F"},data_sync_key:{zh:"\u6570\u636E\u540C\u6B65\u5BC6\u94A5",en:"Data Sync Key",zh_TW:"\u8CC7\u6599\u540C\u6B65\u91D1\u9470"},sync_now:{zh:"\u7ACB\u5373\u540C\u6B65",en:"Sync Now",zh_TW:"\u7ACB\u5373\u540C\u6B65"},sync_success:{zh:"\u540C\u6B65\u6210\u529F\uFF01",en:"Sync Success",zh_TW:"\u540C\u6B65\u6210\u529F\uFF01"},sync_failed:{zh:"\u540C\u6B65\u5931\u8D25\uFF01",en:"Sync Error",zh_TW:"\u540C\u6B65\u5931\u6557\uFF01"},error_got_some_wrong:{zh:"\u62B1\u6B49\uFF0C\u51FA\u9519\u4E86\uFF01",en:"Sorry, something went wrong!",zh_TW:"\u62B1\u6B49\uFF0C\u767C\u751F\u932F\u8AA4\uFF01"},error_sync_setting:{zh:"\u60A8\u7684\u540C\u6B65\u7C7B\u578B\u5FC5\u987B\u4E3A\u201CKISS-Worker\u201D\uFF0C\u4E14\u9700\u586B\u5199\u5B8C\u6574",en:"Your sync type must be \"KISS-Worker\" and must be filled in completely",zh_TW:"\u60A8\u7684\u540C\u6B65\u578B\u614B\u5FC5\u9808\u70BA\u300CKISS-Worker\u300D\uFF0C\u4E14\u9700\u586B\u5BEB\u5B8C\u6574\u3002"},click_test:{zh:"\u70B9\u51FB\u6D4B\u8BD5",en:"Click Test",zh_TW:"\u9EDE\u64CA\u6E2C\u8A66"},test_success:{zh:"\u6D4B\u8BD5\u6210\u529F",en:"Test success",zh_TW:"\u6E2C\u8A66\u6210\u529F"},test_failed:{zh:"\u6D4B\u8BD5\u5931\u8D25",en:"Test failed",zh_TW:"\u6E2C\u8A66\u5931\u6557"},clear_all_cache_now:{zh:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u7F13\u5B58",en:"Clear all cache now",zh_TW:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u5FEB\u53D6"},clear_cache:{zh:"\u6E05\u9664\u7F13\u5B58",en:"Clear Cache",zh_TW:"\u6E05\u9664\u5FEB\u53D6"},clear_success:{zh:"\u6E05\u9664\u6210\u529F",en:"Clear success",zh_TW:"\u6E05\u9664\u6210\u529F"},clear_failed:{zh:"\u6E05\u9664\u5931\u8D25",en:"Clear failed",zh_TW:"\u6E05\u9664\u5931\u6557"},share:{zh:"\u5206\u4EAB",en:"Share",zh_TW:"\u5206\u4EAB"},clear_all:{zh:"\u6E05\u7A7A",en:"Clear All",zh_TW:"\u6E05\u7A7A"},help:{zh:"\u6C42\u52A9",en:"Help",zh_TW:"\u6C42\u52A9"},restore_default:{zh:"\u6062\u590D\u9ED8\u8BA4",en:"Restore Default",zh_TW:"\u6062\u5FA9\u9810\u8A2D"},shortcuts_setting:{zh:"\u5FEB\u6377\u952E\u8BBE\u7F6E",en:"Shortcuts Setting",zh_TW:"\u5FEB\u6377\u9375\u8A2D\u5B9A"},toggle_translate_shortcut:{zh:"\"\u5F00\u542F\u7FFB\u8BD1\"\u5FEB\u6377\u952E",en:"\"Toggle Translate\" Shortcut",zh_TW:"\u300C\u958B\u555F\u7FFB\u8B6F\u300D\u5FEB\u6377\u9375"},toggle_style_shortcut:{zh:"\"\u5207\u6362\u6837\u5F0F\"\u5FEB\u6377\u952E",en:"\"Toggle Style\" Shortcut",zh_TW:"\u300C\u5207\u63DB\u6A23\u5F0F\u300D\u5FEB\u6377\u9375"},toggle_popup_shortcut:{zh:"\"\u6253\u5F00\u5F39\u7A97\"\u5FEB\u6377\u952E",en:"\"Open Popup\" Shortcut",zh_TW:"\u300C\u958B\u555F\u5F48\u7A97\u300D\u5FEB\u6377\u9375"},open_setting_shortcut:{zh:"\"\u6253\u5F00\u8BBE\u7F6E\"\u5FEB\u6377\u952E",en:"\"Open Setting\" Shortcut",zh_TW:"\u300C\u958B\u555F\u8A2D\u5B9A\u300D\u5FEB\u6377\u9375"},hide_fab_button:{zh:"\u9690\u85CF\u60AC\u6D6E\u6309\u94AE",en:"Hide Fab Button",zh_TW:"\u96B1\u85CF\u61F8\u6D6E\u6309\u9215"},fab_click_action:{zh:"\u5355\u51FB\u60AC\u6D6E\u6309\u94AE\u52A8\u4F5C",en:"Single Click Fab Action",zh_TW:"\u55AE\u64CA\u61F8\u6D6E\u6309\u94AE\u52D5\u4F5C"},fab_click_menu:{zh:"\u5F39\u51FA\u83DC\u5355",en:"Popup Menu",zh_TW:"\u5F48\u51FA\u9078\u55AE"},fab_click_translate:{zh:"\u76F4\u63A5\u7FFB\u8BD1",en:"Translate",zh_TW:"\u76F4\u63A5\u7FFB\u8B6F"},hide_tran_button:{zh:"\u9690\u85CF\u7FFB\u8BD1\u6309\u94AE",en:"Hide Translate Button",zh_TW:"\u96B1\u85CF\u7FFB\u8B6F\u6309\u9215"},hide_click_away:{zh:"\u70B9\u51FB\u5916\u90E8\u5173\u95ED\u5F39\u7A97",en:"Click outside to close the pop-up window",zh_TW:"\u9EDE\u64CA\u5916\u90E8\u95DC\u9589\u5F48\u7A97"},use_simple_style:{zh:"\u4F7F\u7528\u7B80\u6D01\u754C\u9762",en:"Use a simple interface",zh_TW:"\u4F7F\u7528\u7C21\u6F54\u4ECB\u9762"},show:{zh:"\u663E\u793A",en:"Show",zh_TW:"\u986F\u793A"},hide:{zh:"\u9690\u85CF",en:"Hide",zh_TW:"\u96B1\u85CF"},save_rule:{zh:"\u4FDD\u5B58\u89C4\u5219",en:"Save Rule",zh_TW:"\u5132\u5B58\u898F\u5247"},global_rule:{zh:"\u5168\u5C40\u89C4\u5219",en:"Global Rule",zh_TW:"\u5168\u57DF\u898F\u5247"},input_translate:{zh:"\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation",zh_TW:"\u8F38\u5165\u6846\u7FFB\u8B6F"},use_input_box_translation:{zh:"\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation",zh_TW:"\u555F\u7528\u8F38\u5165\u6846\u7FFB\u8B6F"},input_selector:{zh:"\u8F93\u5165\u6846\u9009\u62E9\u5668",en:"Input Selector",zh_TW:"\u8F38\u5165\u6846\u9078\u64C7\u5668"},input_selector_helper:{zh:"\u7528\u4E8E\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",en:"Used for input box translation.",zh_TW:"\u7528\u65BC\u8F38\u5165\u6846\u7FFB\u8B6F\u3002"},trigger_trans_shortcut:{zh:"\u89E6\u53D1\u7FFB\u8BD1\u5FEB\u6377\u952E",en:"Trigger Translation Shortcut Keys",zh_TW:"\u89F8\u767C\u7FFB\u8B6F\u5FEB\u6377\u9375"},trigger_trans_shortcut_help:{zh:"\u9ED8\u8BA4\u4E3A\u5355\u51FB\u201CAltLeft+KeyI\u201D",en:"Default is \"AltLeft+KeyI\"",zh_TW:"\u9810\u8A2D\u70BA\u6309\u4E0B\u300CAltLeft+KeyI\u300D"},shortcut_press_count:{zh:"\u5FEB\u6377\u952E\u8FDE\u51FB\u6B21\u6570",en:"Shortcut Press Number",zh_TW:"\u5FEB\u6377\u9375\u9023\u64CA\u6B21\u6578"},combo_timeout:{zh:"\u8FDE\u51FB\u8D85\u65F6\u65F6\u95F4 (10-1000ms)",en:"Combo Timeout (10-1000ms)",zh_TW:"\u9023\u64CA\u903E\u6642 (10-1000ms)"},input_trans_start_sign:{zh:"\u7FFB\u8BD1\u8D77\u59CB\u6807\u8BC6",en:"Translation Start Sign",zh_TW:"\u7FFB\u8B6F\u8D77\u59CB\u6A19\u8A18"},input_trans_start_sign_help:{zh:"\u6807\u8BC6\u540E\u9762\u53EF\u4EE5\u52A0\u76EE\u6807\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1A \u201C/en \u4F60\u597D\u201D\u3001\u201C/zh hello\u201D",en:"The target language code can be added after the sign, such as: \"/en \u4F60\u597D\", \"/zh hello\"",zh_TW:"\u6A19\u8A18\u5F8C\u53EF\u52A0\u4E0A\u76EE\u6A19\u8A9E\u8A00\u4EE3\u78BC\uFF0C\u4F8B\u5982\uFF1A\u300C/en \u4F60\u597D\u300D\u3001\u300C/zh hello\u300D"},detect_lang_remote:{zh:"\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B",en:"Remote language detection",zh_TW:"\u9060\u7AEF\u8A9E\u8A00\u5075\u6E2C"},detect_lang_remote_help:{zh:"\u542F\u7528\u540E\u68C0\u6D4B\u51C6\u786E\u5EA6\u589E\u52A0\uFF0C\u4F46\u4F1A\u964D\u4F4E\u7FFB\u8BD1\u901F\u5EA6\uFF0C\u8BF7\u914C\u60C5\u5F00\u542F",en:"After enabling, the detection accuracy will increase, but it will reduce the translation speed. Please enable it as appropriate.",zh_TW:"\u555F\u7528\u5F8C\u53EF\u63D0\u5347\u5075\u6E2C\u6E96\u78BA\u5EA6\uFF0C\u4F46\u6703\u964D\u4F4E\u7FFB\u8B6F\u901F\u5EA6\uFF0C\u8ACB\u8996\u9700\u8981\u958B\u555F\u3002"},detect_lang_service:{zh:"\u8BED\u8A00\u68C0\u6D4B\u670D\u52A1",en:"Language detect service",zh_TW:"\u8A9E\u8A00\u6AA2\u6E2C\u670D\u52D9"},disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},enable:{zh:"\u542F\u7528",en:"Enable",zh_TW:"\u555F\u7528"},selection_translate:{zh:"\u5212\u8BCD\u7FFB\u8BD1",en:"Selection Translate",zh_TW:"\u5283\u8A5E\u7FFB\u8B6F"},toggle_selection_translate:{zh:"\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"Use Selection Translate",zh_TW:"\u555F\u7528\u5283\u8A5E\u7FFB\u8B6F"},trigger_tranbox_shortcut:{zh:"\u663E\u793A\u7FFB\u8BD1\u6846/\u7FFB\u8BD1\u9009\u4E2D\u6587\u5B57\u5FEB\u6377\u952E",en:"Open Translate Popup/Translate Selected Shortcut",zh_TW:"\u986F\u793A\u7FFB\u8B6F\u6846\uFF0F\u7FFB\u8B6F\u9078\u4E2D\u6587\u5B57\u5FEB\u6377\u9375"},tranbtn_offset_x:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBX\uFF08\xB1200\uFF09",en:"Translate Button Offset X (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6309\u9215\u4F4D\u79FB X\uFF08\xB1200\uFF09"},tranbtn_offset_y:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBY\uFF08\xB1200\uFF09",en:"Translate Button Offset Y (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6309\u9215\u4F4D\u79FB Y\uFF08\xB1200\uFF09"},tranbox_offset_x:{zh:"\u7FFB\u8BD1\u6846\u504F\u79FBX\uFF08\xB1200\uFF09",en:"Translate Box Offset X (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6846\u4F4D\u79FB X\uFF08\xB1200\uFF09"},tranbox_offset_y:{zh:"\u7FFB\u8BD1\u6846\u504F\u79FBY\uFF08\xB1200\uFF09",en:"Translate Box Offset Y (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6846\u4F4D\u79FB Y\uFF08\xB1200\uFF09"},translated_text:{zh:"\u8BD1\u6587",en:"Translated Text",zh_TW:"\u8B6F\u6587"},original_text:{zh:"\u539F\u6587",en:"Original Text",zh_TW:"\u539F\u6587"},favorite_words:{zh:"\u6536\u85CF\u8BCD\u6C47",en:"Favorite Words",zh_TW:"\u6536\u85CF\u8A5E\u5F59"},touch_setting:{zh:"\u89E6\u5C4F\u8BBE\u7F6E",en:"Touch Setting",zh_TW:"\u89F8\u63A7\u8A2D\u5B9A"},touch_translate_shortcut:{zh:"\u89E6\u5C4F\u7FFB\u8BD1\u5FEB\u6377\u65B9\u5F0F (\u652F\u6301\u591A\u9009)",en:"Touch Translate Shortcut (multiple supported)",zh_TW:"\u89F8\u63A7\u7FFB\u8B6F\u6377\u5F91 (\u652F\u63F4\u591A\u9078)"},touch_tap_0:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},touch_tap_2:{zh:"\u53CC\u6307\u8F7B\u89E6",en:"Two finger tap",zh_TW:"\u96D9\u6307\u8F15\u89F8"},touch_tap_3:{zh:"\u4E09\u6307\u8F7B\u89E6",en:"Three finger tap",zh_TW:"\u4E09\u6307\u8F15\u89F8"},touch_tap_4:{zh:"\u56DB\u6307\u8F7B\u89E6",en:"Four finger tap",zh_TW:"\u56DB\u6307\u8F15\u89F8"},touch_tap_5:{zh:"\u5355\u6307\u53CC\u51FB",en:"Double-click",zh_TW:"\u55AE\u6307\u96D9\u64CA"},touch_tap_6:{zh:"\u5355\u6307\u4E09\u51FB",en:"Triple-click",zh_TW:"\u55AE\u6307\u4E09\u64CA"},touch_tap_7:{zh:"\u53CC\u6307\u53CC\u51FB",en:"Two-finger double-click",zh_TW:"\u96D9\u6307\u96D9\u64CA"},translate_blacklist:{zh:"\u7981\u7528\u7FFB\u8BD1\u540D\u5355",en:"Translate Blacklist",zh_TW:"\u505C\u7528\u7FFB\u8B6F\u540D\u55AE"},disabled_orilist:{zh:"\u7981\u7528Origin\u540D\u5355",en:"Disabled Origin List",zh_TW:"\u505C\u7528 Origin \u540D\u55AE"},disabled_csplist:{zh:"\u7981\u7528CSP\u540D\u5355",en:"Disabled CSP List",zh_TW:"\u505C\u7528 CSP \u540D\u55AE"},disabled_csplist_helper:{zh:"3\u3001\u901A\u8FC7\u8C03\u6574CSP\u7B56\u7565\uFF0C\u4F7F\u5F97\u67D0\u4E9B\u9875\u9762\u80FD\u591F\u6CE8\u5165JS/CSS/Media\uFF0C\u8BF7\u8C28\u614E\u4F7F\u7528\uFF0C\u9664\u975E\u60A8\u5DF2\u77E5\u6653\u76F8\u5173\u98CE\u9669\u3002",en:"3. By adjusting the CSP policy, some pages can inject JS/CSS/Media. Please use it with caution unless you are aware of the related risks.",zh_TW:"3. \u900F\u904E\u8ABF\u6574 CSP \u653F\u7B56\uFF0C\u4F7F\u90E8\u5206\u9801\u9762\u53EF\u6CE8\u5165 JS/CSS/Media\u3002\u8ACB\u8B39\u614E\u4F7F\u7528\uFF0C\u9664\u975E\u60A8\u5DF2\u77E5\u6089\u76F8\u95DC\u98A8\u96AA\u3002"},skip_langs:{zh:"\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",en:"Disable Languages",zh_TW:"\u4E0D\u7FFB\u8B6F\u7684\u8A9E\u8A00"},skip_langs_helper:{zh:"\u6B64\u529F\u80FD\u4F9D\u8D56\u51C6\u786E\u7684\u8BED\u8A00\u68C0\u6D4B\uFF0C\u5EFA\u8BAE\u542F\u7528\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B\u3002",en:"This feature relies on accurate language detection. It is recommended to enable remote language detection.",zh_TW:"\u6B64\u529F\u80FD\u4EF0\u8CF4\u6E96\u78BA\u7684\u8A9E\u8A00\u5075\u6E2C\uFF0C\u5EFA\u8B70\u555F\u7528\u9060\u7AEF\u8A9E\u8A00\u5075\u6E2C\u3002"},context_menus:{zh:"\u53F3\u952E\u83DC\u5355",en:"Context Menus",zh_TW:"\u53F3\u9375\u9078\u55AE"},hide_context_menus:{zh:"\u9690\u85CF\u53F3\u952E\u83DC\u5355",en:"Hide Context Menus",zh_TW:"\u96B1\u85CF\u53F3\u9375\u9078\u55AE"},simple_context_menus:{zh:"\u7B80\u5355\u53F3\u952E\u83DC\u5355",en:"Simple_context_menus Context Menus",zh_TW:"\u7C21\u6613\u53F3\u9375\u9078\u55AE"},secondary_context_menus:{zh:"\u4E8C\u7EA7\u53F3\u952E\u83DC\u5355",en:"Secondary Context Menus",zh_TW:"\u6B21\u7D1A\u53F3\u9375\u9078\u55AE"},mulkeys_help:{zh:"\u652F\u6301\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\uFF0C\u8F6E\u8BE2\u8C03\u7528\u3002",en:"Supports polling calls separated by newlines or English commas \",\".",zh_TW:"\u652F\u63F4\u4EE5\u63DB\u884C\u6216\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\uFF0C\u8F2A\u8A62\u547C\u53EB\u3002"},translation_element_tag:{zh:"\u8BD1\u6587\u5143\u7D20\u6807\u7B7E",en:"Translation Element Tag",zh_TW:"\u8B6F\u6587\u5143\u7D20\u6A19\u7C64"},show_only_translations:{zh:"\u4EC5\u663E\u793A\u8BD1\u6587",en:"Show Only Translations",zh_TW:"\u50C5\u986F\u793A\u8B6F\u6587"},show_only_translations_help:{zh:"\u975E\u5B8C\u7F8E\u5B9E\u73B0\uFF0C\u67D0\u4E9B\u9875\u9762\u53EF\u80FD\u6709\u6837\u5F0F\u7B49\u95EE\u9898\u3002",en:"It is not a perfect implementation and some pages may have style issues.",zh_TW:"\u6B64\u70BA\u975E\u5B8C\u7F8E\u5BE6\u4F5C\uFF0C\u90E8\u5206\u9801\u9762\u53EF\u80FD\u51FA\u73FE\u6A23\u5F0F\u7B49\u554F\u984C\u3002"},translate_page_title:{zh:"\u662F\u5426\u7FFB\u8BD1\u9875\u9762\u6807\u9898",en:"Translate Page Title",zh_TW:"\u662F\u5426\u7FFB\u8B6F\u9801\u9762\u6A19\u984C"},more:{zh:"\u66F4\u591A",en:"More",zh_TW:"\u66F4\u591A"},less:{zh:"\u66F4\u5C11",en:"Less",zh_TW:"\u66F4\u5C11"},fixer_selector:{zh:"\u7F51\u9875\u4FEE\u590D\u9009\u62E9\u5668",en:"Fixer Selector",zh_TW:"\u7DB2\u9801\u4FEE\u5FA9\u9078\u64C7\u5668"},reg_niutrans:{zh:"\u83B7\u53D6\u5C0F\u725B\u7FFB\u8BD1\u5BC6\u94A5\u3010\u7B80\u7EA6\u7FFB\u8BD1\u4E13\u5C5E\u65B0\u7528\u6237\u6CE8\u518C\u8D60\u9001300\u4E07\u5B57\u7B26\u3011",en:"Get NiuTrans APIKey [KISS Translator Exclusive New User Registration Free 3 Million Characters]",zh_TW:"\u53D6\u5F97\u5C0F\u725B\u7FFB\u8B6F\u91D1\u9470\u3010\u7C21\u7D04\u7FFB\u8B6F\u5C08\u5C6C\u65B0\u7528\u6236\u8A3B\u518A\u8D08\u9001 300 \u842C\u5B57\u5143\u3011"},trigger_mode:{zh:"\u89E6\u53D1\u65B9\u5F0F",en:"Trigger Mode",zh_TW:"\u89F8\u767C\u65B9\u5F0F"},trigger_click:{zh:"\u70B9\u51FB\u89E6\u53D1",en:"Click Trigger",zh_TW:"\u9EDE\u64CA\u89F8\u767C"},trigger_hover:{zh:"\u9F20\u6807\u60AC\u505C\u89E6\u53D1",en:"Hover Trigger",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u89F8\u767C"},trigger_select:{zh:"\u9009\u4E2D\u89E6\u53D1",en:"Select Trigger",zh_TW:"\u9078\u53D6\u89F8\u767C"},extend_styles:{zh:"\u9644\u52A0\u6837\u5F0F",en:"Extend Styles",zh_TW:"\u9644\u52A0\u6A23\u5F0F"},custom_option:{zh:"\u81EA\u5B9A\u4E49\u9009\u9879",en:"Custom Option",zh_TW:"\u81EA\u8A02\u9078\u9805"},translate_selected_text:{zh:"\u7FFB\u8BD1\u9009\u4E2D\u6587\u5B57",en:"Translate Selected Text",zh_TW:"\u7FFB\u8B6F\u9078\u53D6\u6587\u5B57"},toggle_style:{zh:"\u5207\u6362\u6837\u5F0F",en:"Toggle Style",zh_TW:"\u5207\u63DB\u6A23\u5F0F"},open_menu:{zh:"\u6253\u5F00\u5F39\u7A97\u83DC\u5355",en:"Open Popup Menu",zh_TW:"\u958B\u555F\u5F48\u7A97\u9078\u55AE"},open_setting:{zh:"\u6253\u5F00\u8BBE\u7F6E",en:"Open Setting",zh_TW:"\u958B\u555F\u8A2D\u5B9A"},follow_selection:{zh:"\u7FFB\u8BD1\u6846\u8DDF\u968F\u9009\u4E2D\u6587\u672C",en:"Transbox Follow Selection",zh_TW:"\u7FFB\u8B6F\u6846\u8DDF\u96A8\u9078\u53D6\u6587\u5B57"},tranbox_auto_height:{zh:"\u7FFB\u8BD1\u6846\u81EA\u9002\u5E94\u9AD8\u5EA6",en:"Translation box adaptive height",zh_TW:"\u7FFB\u8B6F\u6846\u81EA\u9069\u61C9\u9AD8\u5EA6"},translate_start_hook:{zh:"\u7FFB\u8BD1\u5F00\u59CB\u94A9\u5B50\u51FD\u6570",en:"Translate Start Hook",zh_TW:"\u7FFB\u8B6F\u958B\u59CB Hook"},translate_start_hook_helper:{zh:"\u7FFB\u8BD1\u524D\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}",en:"Run before translation, input parameters are: {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}",zh_TW:"\u7FFB\u8B6F\u524D\u6642\u904B\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}"},translate_end_hook:{zh:"\u7FFB\u8BD1\u5B8C\u6210\u94A9\u5B50\u51FD\u6570",en:"Translate End Hook",zh_TW:"\u7FFB\u8B6F\u5B8C\u6210 Hook"},translate_end_hook_helper:{zh:"\u7FFB\u8BD1\u5B8C\u6210\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A ({hostNode, parentNode, nodes, wrapperNode, innerNode})",en:"Run when translation is complete, input parameters are: ({hostNode, parentNode, nodes, wrapperNode, innerNode})",zh_TW:"\u7FFB\u8B6F\u5B8C\u6210\u6642\u904B\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A ({hostNode, parentNode, nodes, wrapperNode, innerNode})"},translate_remove_hook:{zh:"\u7FFB\u8BD1\u79FB\u9664\u94A9\u5B50\u51FD\u6570",en:"Translate Removed Hook",zh_TW:"\u7FFB\u8B6F\u79FB\u9664 Hook"},translate_remove_hook_helper:{zh:"\u7FFB\u8BD1\u79FB\u9664\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A \u7FFB\u8BD1\u8282\u70B9\u3002",en:"Run when translation is removed, the input parameters are: translation node.",zh_TW:"\u79FB\u9664\u7FFB\u8B6F\u6642\u57F7\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A\u7FFB\u8B6F\u7BC0\u9EDE\u3002"},english_dict:{zh:"\u82F1\u6587\u8BCD\u5178",en:"English Dictionary",zh_TW:"\u82F1\u6587\u5B57\u5178"},english_suggest:{zh:"\u82F1\u6587\u5EFA\u8BAE",en:"English Suggest",zh_TW:"\u82F1\u6587\u5EFA\u8B70"},api_name:{zh:"\u63A5\u53E3\u540D\u79F0",en:"API Name",zh_TW:"\u4ECB\u9762\u540D\u7A31"},is_disabled:{zh:"\u662F\u5426\u7981\u7528",en:"Is Disabled",zh_TW:"\u662F\u5426\u505C\u7528"},translate_selected:{zh:"\u662F\u5426\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"If translate selected",zh_TW:"\u662F\u5426\u555F\u7528\u5283\u8A5E\u7FFB\u8B6F"},use_batch_fetch:{zh:"\u662F\u5426\u805A\u5408\u53D1\u9001\u7FFB\u8BD1\u8BF7\u6C42",en:"Whether to aggregate and send translation requests",zh_TW:"\u662F\u5426\u805A\u5408\u767C\u9001\u7FFB\u8B6F\u8ACB\u6C42"},batch_interval:{zh:"\u805A\u5408\u8BF7\u6C42\u7B49\u5F85\u65F6\u95F4(100-10000)",en:"Aggregation request waiting time (100-10000)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u7B49\u5F85\u6642\u9593(100-10000)"},batch_size:{zh:"\u805A\u5408\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570(1-100)",en:"Maximum number of paragraphs in an aggregation request (1-100)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u6700\u5927\u6BB5\u843D\u6578(1-100)"},batch_length:{zh:"\u805A\u5408\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6(1000-100000)",en:"Maximum text length for aggregation requests (1000-100000)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u6700\u5927\u6587\u5B57\u9577\u5EA6(1000-100000)"},use_context:{zh:"\u662F\u5426\u542F\u7528\u667A\u80FD\u4E0A\u4E0B\u6587",en:"Whether to enable AI context",zh_TW:"\u662F\u5426\u555F\u7528\u667A\u6167\u4E0A\u4E0B\u6587"},context_size:{zh:"\u4E0A\u4E0B\u6587\u4F1A\u8BDD\u6570\u91CF(1-20)",en:"Number of context sessions(1-20)",zh_TW:"\u4E0A\u4E0B\u6587\u6703\u8A71\u6578\u91CF(1-20)"},auto_scan_page:{zh:"\u81EA\u52A8\u626B\u63CF\u9875\u9762",en:"Auto scan page",zh_TW:"\u81EA\u52D5\u6383\u63CF\u9801\u9762"},has_rich_text:{zh:"\u542F\u7528\u5BCC\u6587\u672C\u7FFB\u8BD1",en:"Enable rich text translation",zh_TW:"\u555F\u7528\u5BCC\u6587\u672C\u7FFB\u8B6F"},has_shadowroot:{zh:"\u626B\u63CFShadowroot",en:"Scan Shadowroot",zh_TW:"\u6383\u63CFShadowroot"},mousehover_translate:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover Translation",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},use_mousehover_translation:{zh:"\u542F\u7528\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Enable mouseover translation",zh_TW:"\u555F\u7528\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},selected_translation_alert:{zh:"\u5212\u8BCD\u7FFB\u8BD1\u7684\u5F00\u542F\u548C\u5173\u95ED\u8BF7\u5230\u201C\u89C4\u5219\u8BBE\u7F6E\u201D\u91CC\u9762\u8BBE\u7F6E\u3002",en:"To turn selected translation on or off, please go to \"Rule Settings\".",zh_TW:"\u5283\u8A5E\u7FFB\u8B6F\u7684\u958B\u555F\u548C\u95DC\u9589\u8ACB\u5230\u300C\u898F\u5247\u8A2D\u5B9A\u300D\u88E1\u9762\u8A2D\u5B9A\u3002"},mousehover_key_help:{zh:"\u5F53\u5FEB\u6377\u952E\u7F6E\u7A7A\u65F6\u8868\u793A\u9F20\u6807\u60AC\u505C\u76F4\u63A5\u7FFB\u8BD1",en:"When the shortcut key is empty, it means that the mouse hovers to translate directly",zh_TW:"\u7576\u5FEB\u6377\u9375\u7F6E\u7A7A\u6642\u8868\u793A\u6ED1\u9F20\u61F8\u505C\u76F4\u63A5\u7FFB\u8B6F"},autoscan_alt:{zh:"\u81EA\u52A8\u626B\u63CF",en:"Auto Scan",zh_TW:"\u81EA\u52D5\u6383\u63CF"},shadowroot_alt:{zh:"ShadowRoot",en:"ShadowRoot",zh_TW:"ShadowRoot"},richtext_alt:{zh:"\u4FDD\u7559\u5BCC\u6587\u672C",en:"Rich Text",zh_TW:"\u4FDD\u7559\u5BCC\u6587\u672C"},transonly_alt:{zh:"\u9690\u85CF\u539F\u6587",en:"Hide Original",zh_TW:"\u96B1\u85CF\u539F\u6587"},confirm_title:{zh:"\u786E\u8BA4",en:"Confirm",zh_TW:"\u78BA\u8A8D"},confirm_message:{zh:"\u786E\u5B9A\u64CD\u4F5C\u5417\uFF1F",en:"Are you sure you want to proceed?",zh_TW:"\u78BA\u5B9A\u64CD\u4F5C\u55CE\uFF1F"},confirm_action:{zh:"\u786E\u5B9A",en:"Confirm",zh_TW:"\u78BA\u5B9A"},cancel_action:{zh:"\u53D6\u6D88",en:"Cancel",zh_TW:"\u53D6\u6D88"},pls_press_shortcut:{zh:"\u8BF7\u6309\u4E0B\u5FEB\u6377\u952E\u7EC4\u5408",en:"Please press the shortcut key combination",zh_TW:"\u8ACB\u6309\u4E0B\u5FEB\u901F\u9375\u7D44\u5408"},load_setting_err:{zh:"\u6570\u636E\u52A0\u8F7D\u51FA\u9519\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u6216\u5378\u8F7D\u540E\u91CD\u65B0\u5B89\u88C5\u3002",en:"Please press the shortcut key combination",zh_TW:"\u8ACB\u6309\u4E0B\u5FEB\u901F\u9375\u7D44\u5408"},translation_style:{zh:"\u7FFB\u8BD1\u98CE\u683C",en:"Translation style",zh_TW:"\u7FFB\u8B6F\u98A8\u683C"},placeholder:{zh:"\u5360\u4F4D\u7B26",en:"Placeholder",zh_TW:"\u4F54\u4F4D\u7B26"},tag_name:{zh:"\u5360\u4F4D\u6807\u7B7E\u540D",en:"Placeholder tag name",zh_TW:"\u4F54\u4F4D\u6A19\u540D"},system_prompt_helper:{zh:"\u5728\u672A\u5B8C\u5168\u7406\u89E3\u9ED8\u8BA4Prompt\u7684\u60C5\u51B5\u4E0B\uFF0C\u8BF7\u52FF\u968F\u610F\u4FEE\u6539\uFF0C\u5426\u5219\u53EF\u80FD\u65E0\u6CD5\u5DE5\u4F5C\u3002",en:"Do not modify the default prompt without fully understanding it, otherwise it may not work.",zh_TW:"\u5728\u672A\u5B8C\u5168\u7406\u89E3\u9810\u8A2DPrompt\u7684\u60C5\u6CC1\u4E0B\uFF0C\u8ACB\u52FF\u96A8\u610F\u4FEE\u6539\uFF0C\u5426\u5247\u53EF\u80FD\u7121\u6CD5\u904B\u4F5C\u3002"},if_pre_init:{zh:"\u662F\u5426\u9884\u521D\u59CB\u5316",en:"Whether to pre-initialize",zh_TW:"\u662F\u5426\u9810\u521D\u59CB\u5316"},export_old:{zh:"\u5BFC\u51FA\u65E7\u7248",en:"Export old version",zh_TW:"\u532F\u51FA\u820A\u7248"},favorite_words_helper:{zh:"\u5BFC\u5165\u8BCD\u6C47\u8BF7\u4F7F\u7528txt\u6587\u4EF6\uFF0C\u6BCF\u4E00\u884C\u4E00\u4E2A\u5355\u8BCD\u3002",en:"To import vocabulary, please use a txt file with one word per line.",zh_TW:"\u532F\u5165\u8A5E\u5F59\u8ACB\u4F7F\u7528txt\u6587\u4EF6\uFF0C\u6BCF\u4E00\u884C\u4E00\u500B\u55AE\u5B57\u3002"},btn_tip_click_away:{zh:"\u5931\u7126\u9690\u85CF/\u663E\u793A",en:"Loss of focus hide/show",zh_TW:"\u5931\u7126\u96B1\u85CF/\u986F\u793A"},btn_tip_follow_selection:{zh:"\u8DDF\u968F/\u56FA\u5B9A\u6A21\u5F0F",en:"Follow/Fixed Mode",zh_TW:"\u8DDF\u96A8/\u56FA\u5B9A\u6A21\u5F0F"},btn_tip_simple_style:{zh:"\u8FF7\u4F60/\u5E38\u89C4\u6A21\u5F0F",en:"Mini/Regular Mode",zh_TW:"\u8FF7\u4F60/\u5E38\u898F\u6A21\u5F0F"},api_placeholder:{zh:"\u5360\u4F4D\u7B26",en:"Placeholder",zh_TW:"\u4F54\u4F4D\u7B26"},api_placetag:{zh:"\u5360\u4F4D\u6807\u7B7E",en:"Placeholder tags",zh_TW:"\u4F54\u4F4D\u6A19"},detected_lang:{zh:"\u8BED\u8A00\u68C0\u6D4B",en:"Language detection",zh_TW:"\u8A9E\u8A00\u5075\u6E2C"},detected_result:{zh:"\u68C0\u6D4B\u7ED3\u679C",en:"Detect result",zh_TW:"\u6AA2\u6E2C\u7D50\u679C"},subtitle_translate:{zh:"\u5B57\u5E55\u7FFB\u8BD1",en:"Subtitle translate",zh_TW:"\u5B57\u5E55\u7FFB\u8B6F"},toggle_subtitle_translate:{zh:"\u542F\u7528\u5B57\u5E55\u7FFB\u8BD1",en:"Enable subtitle translation",zh_TW:"\u555F\u7528\u5B57\u5E55\u7FFB\u8B6F"},is_bilingual_view:{zh:"\u53CC\u8BED\u663E\u793A",en:"Enable bilingual display",zh_TW:"\u96D9\u8A9E\u986F\u793A"},is_skip_ad:{zh:"\u662F\u5426\u5FEB\u8FDB\u5E7F\u544A",en:"Should I fast forward to the ad?",zh_TW:"\u662F\u5426\u5FEB\u8F49\u5EE3\u544A"},background_styles:{zh:"\u80CC\u666F\u6837\u5F0F",en:"DBackground Style",zh_TW:"\u80CC\u666F\u6A23\u5F0F"},origin_styles:{zh:"\u539F\u6587\u6837\u5F0F",en:"Original style",zh_TW:"\u539F\u6587\u6A23\u5F0F"},translation_styles:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Translation style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},ai_segmentation:{zh:"AI\u667A\u80FD\u65AD\u53E5",en:"AI intelligent punctuation",zh_TW:"AI\u667A\u6167\u65B7\u53E5"},ai_chunk_length:{zh:"AI\u5904\u7406\u5207\u5272\u957F\u5EA6(200-20000)",en:"AI processing chunk length(200-20000)",zh_TW:"AI\u5904\u7406\u5207\u5272\u957F\u5EA6(200-20000)"},subtitle_helper_1:{zh:"1\u3001\u76EE\u524D\u4EC5\u652F\u6301Youtube\u684C\u9762\u7F51\u7AD9\u3002",en:"1. Currently only supports Youtube desktop website.",zh_TW:"1.\u76EE\u524D\u50C5\u652F\u63F4Youtube\u684C\u9762\u7DB2\u7AD9\uFF0C\u4E14\u50C5\u652F\u63F4\u700F\u89BD\u5668\u64F4\u5145\u529F\u80FD\u3002"},subtitle_helper_2:{zh:"2\u3001\u63D2\u4EF6\u5185\u7F6E\u57FA\u7840\u7684\u5B57\u5E55\u5408\u5E76\u3001\u65AD\u53E5\u7B97\u6CD5\uFF0C\u53EF\u6EE1\u8DB3\u5927\u90E8\u5206\u60C5\u51B5\u3002",en:"2. The plug-in has built-in basic subtitle merging and sentence segmentation algorithms, which can meet most situations.",zh_TW:"2.\u63D2\u4EF6\u5167\u5EFA\u57FA\u790E\u7684\u5B57\u5E55\u5408\u4F75\u3001\u65B7\u53E5\u6F14\u7B97\u6CD5\uFF0C\u53EF\u6EFF\u8DB3\u5927\u90E8\u5206\u60C5\u6CC1\u3002"},subtitle_helper_3:{zh:"3\u3001\u4EA6\u53EF\u4EE5\u542F\u7528AI\u667A\u80FD\u65AD\u53E5\uFF0C\u4F46\u9700\u8003\u8651\u5207\u5272\u957F\u5EA6\u53CAAI\u63A5\u53E3\u80FD\u529B\uFF0C\u53EF\u80FD\u5904\u7406\u65F6\u95F4\u4F1A\u5F88\u957F\uFF0C\u751A\u81F3\u5904\u7406\u5931\u8D25\uFF0C\u5BFC\u81F4\u65E0\u6CD5\u770B\u5230\u5B57\u5E55\u3002",en:"3. You can also enable AI intelligent segmentation, but you need to consider the segmentation length and AI interface capabilities. The processing time may be very long or even fail, resulting in the inability to see subtitles.",zh_TW:"3.\u4EA6\u53EF\u555F\u7528AI\u667A\u80FD\u65B7\u53E5\uFF0C\u4F46\u9700\u8003\u616E\u5207\u5272\u9577\u5EA6\u53CAAI\u4ECB\u9762\u80FD\u529B\uFF0C\u53EF\u80FD\u8655\u7406\u6642\u9593\u6703\u5F88\u9577\uFF0C\u751A\u81F3\u8655\u7406\u5931\u6557\uFF0C\u5C0E\u81F4\u7121\u6CD5\u770B\u5230\u5B57\u5E55\u3002"},default_styles_example:{zh:"\u9ED8\u8BA4\u6837\u5F0F\u53C2\u8003\uFF1A",en:"Default styles reference:",zh_TW:"\u8A8D\u6A23\u5F0F\u53C3\u8003\uFF1A"},subtitle_load_succeed:{zh:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u6210\u529F\uFF01",en:"Bilingual subtitles loaded successfully!",zh_TW:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u6210\u529F\uFF01"},subtitle_load_failed:{zh:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u5931\u8D25\uFF01",en:"Failed to load bilingual subtitles!",zh_TW:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u5931\u8D25\uFF01"},try_get_subtitle_data:{zh:"\u5C1D\u8BD5\u83B7\u53D6\u5B57\u5E55\u6570\u636E\uFF0C\u8BF7\u7A0D\u5019...",en:"Trying to get subtitle data, please wait...",zh_TW:"\u5C1D\u8BD5\u83B7\u53D6\u5B57\u5E55\u6570\u636E\uFF0C\u8BF7\u7A0D\u5019..."},subtitle_data_processing:{zh:"\u5B57\u5E55\u6570\u636E\u5904\u7406\u4E2D...",en:"Subtitle data processing...",zh_TW:"\u5B57\u5E55\u6570\u636E\u5904\u7406\u4E2D..."},starting_to_process_subtitle:{zh:"\u5F00\u59CB\u5904\u7406\u5B57\u5E55\u6570\u636E...",en:"Starting to process subtitle data...",zh_TW:"\u5F00\u59CB\u5904\u7406\u5B57\u5E55\u6570\u636E..."},subtitle_data_is_ready:{zh:"\u5B57\u5E55\u6570\u636E\u5DF2\u51C6\u5907\u5C31\u7EEA\uFF0C\u8BF7\u70B9\u51FBKT\u6309\u94AE\u52A0\u8F7D",en:"The subtitle data is ready, please click the KT button to load it",zh_TW:"\u5B57\u5E55\u8CC7\u6599\u5DF2\u6E96\u5099\u5C31\u7DD2\uFF0C\u8ACB\u9EDE\u64CAKT\u6309\u9215\u52A0\u8F09"},log_level:{zh:"\u65E5\u5FD7\u7EA7\u522B",en:"Log Level",zh_TW:"\u65E5\u8A8C\u7B49\u7D1A"},goto_custom_api_example:{zh:"\u70B9\u51FB\u67E5\u770B\u3010\u81EA\u5B9A\u4E49\u63A5\u53E3\u793A\u4F8B\u3011",en:"Click to view [Custom Interface Example]",zh_TW:"\u9EDE\u9078\u67E5\u770B\u3010\u81EA\u8A02\u4ECB\u9762\u7BC4\u4F8B\u3011"},split_paragraph:{zh:"\u5207\u5206\u957F\u6BB5\u843D",en:"Split long paragraph",zh_TW:"\u5207\u5206\u9577\u6BB5\u843D"},split_length:{zh:"\u5207\u5206\u957F\u5EA6 (0-10000)",en:"Segmentation length(0-10000)",zh_TW:"\u5207\u5206\u9577\u5EA6(0-10000)"},highlight_words:{zh:"\u9AD8\u4EAE\u6536\u85CF\u8BCD\u6C47",en:"Highlight favorite words",zh_TW:"\u9AD8\u4EAE\u6536\u85CF\u8A5E\u5F59"},split_disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},split_textlength:{zh:"\u6309\u7167\u957F\u5EA6\u5207\u5206",en:"Split by length",zh_TW:"\u4F9D\u9577\u5EA6\u5207\u5206"},split_punctuation:{zh:"\u6309\u7167\u53E5\u5B50\u5207\u5206",en:"Split by sentence",zh_TW:"\u6309\u7167\u53E5\u5B50\u5207\u5206"},highlight_disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},highlight_beforetrans:{zh:"\u7FFB\u8BD1\u524D\u9AD8\u4EAE",en:"Highlight before translation",zh_TW:"\u7FFB\u8B6F\u524D\u9AD8\u4EAE"},highlight_aftertrans:{zh:"\u7FFB\u8BD1\u540E\u9AD8\u4EAE",en:"Highlight after translation",zh_TW:"\u7FFB\u8B6F\u5F8C\u9AD8\u4EAE"},pagescroll_root_margin:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u63D0\u524D\u89E6\u53D1 (0-10000px)",en:"Early triggering of scroll loading (0-10000px)",zh_TW:"\u6EFE\u52D5\u8F09\u5165\u63D0\u524D\u89F8\u767C (0-10000px)"}};const newI18n=lang=>key=>{var _I18N$key;return((_I18N$key=I18N[key])===null||_I18N$key===void 0?void 0:_I18N$key[lang])||"";}; +const UI_LANGS=(/* unused pure expression or super */ null && ([["en","English"],["zh","简体中文"],["zh_TW","繁體中文"]]));const customApiLangs="[\"en\", \"English - English\"],\n[\"zh-CN\", \"Simplified Chinese - \u7B80\u4F53\u4E2D\u6587\"],\n[\"zh-TW\", \"Traditional Chinese - \u7E41\u9AD4\u4E2D\u6587\"],\n[\"ar\", \"Arabic - \u0627\u0644\u0639\u0631\u0628\u064A\u0629\"],\n[\"bg\", \"Bulgarian - \u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438\"],\n[\"ca\", \"Catalan - Catal\xE0\"],\n[\"hr\", \"Croatian - Hrvatski\"],\n[\"cs\", \"Czech - \u010Ce\u0161tina\"],\n[\"da\", \"Danish - Dansk\"],\n[\"nl\", \"Dutch - Nederlands\"],\n[\"fi\", \"Finnish - Suomi\"],\n[\"fr\", \"French - Fran\xE7ais\"],\n[\"de\", \"German - Deutsch\"],\n[\"el\", \"Greek - \u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC\"],\n[\"hi\", \"Hindi - \u0939\u093F\u0928\u094D\u0926\u0940\"],\n[\"hu\", \"Hungarian - Magyar\"],\n[\"id\", \"Indonesian - Indonesia\"],\n[\"it\", \"Italian - Italiano\"],\n[\"ja\", \"Japanese - \u65E5\u672C\u8A9E\"],\n[\"ko\", \"Korean - \uD55C\uAD6D\uC5B4\"],\n[\"ms\", \"Malay - Melayu\"],\n[\"mt\", \"Maltese - Malti\"],\n[\"nb\", \"Norwegian - Norsk Bokm\xE5l\"],\n[\"pl\", \"Polish - Polski\"],\n[\"pt\", \"Portuguese - Portugu\xEAs\"],\n[\"ro\", \"Romanian - Rom\xE2n\u0103\"],\n[\"ru\", \"Russian - \u0420\u0443\u0441\u0441\u043A\u0438\u0439\"],\n[\"sk\", \"Slovak - Sloven\u010Dina\"],\n[\"sl\", \"Slovenian - Sloven\u0161\u010Dina\"],\n[\"es\", \"Spanish - Espa\xF1ol\"],\n[\"sv\", \"Swedish - Svenska\"],\n[\"ta\", \"Tamil - \u0BA4\u0BAE\u0BBF\u0BB4\u0BCD\"],\n[\"te\", \"Telugu - \u0C24\u0C46\u0C32\u0C41\u0C17\u0C41\"],\n[\"th\", \"Thai - \u0E44\u0E17\u0E22\"],\n[\"tr\", \"Turkish - T\xFCrk\xE7e\"],\n[\"uk\", \"Ukrainian - \u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430\"],\n[\"vi\", \"Vietnamese - Ti\u1EBFng Vi\u1EC7t\"],\n";const customApiHelpZH="// \u8BF7\u6C42\u6570\u636E\u9ED8\u8BA4\u683C\u5F0F\n{\n \"url\": \"{{url}}\",\n \"method\": \"POST\",\n \"headers\": {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{key}}\"\n },\n \"body\": {\n \"text\": \"{{text}}\", // \u5F85\u7FFB\u8BD1\u6587\u5B57\n \"from\": \"{{from}}\", // \u6587\u5B57\u7684\u8BED\u8A00\uFF08\u53EF\u80FD\u4E3A\u7A7A\uFF09\n \"to\": \"{{to}}\", // \u76EE\u6807\u8BED\u8A00\n },\n}\n\n\n// \u8FD4\u56DE\u6570\u636E\u9ED8\u8BA4\u683C\u5F0F\n{\n text: \"\", // \u7FFB\u8BD1\u540E\u7684\u6587\u5B57\n from: \"\", // \u8BC6\u522B\u7684\u6E90\u8BED\u8A00\n to: \"\", // \u76EE\u6807\u8BED\u8A00\uFF08\u53EF\u9009\uFF09\n}\n\n\n// Hook \u8303\u4F8B\n// URL\nhttps://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN\n\n// Request Hook\n(text, from, to, url, key) => [url, {\n headers: {\n \"Content-type\": \"application/json\",\n },\n method: \"GET\",\n body: null,\n}]\n\n// Response Hook\n// \u5176\u4E2D\u8FD4\u56DE\u6570\u7EC4\u7B2C\u4E00\u4E2A\u503C\u8868\u793A\u8BD1\u6587\u5B57\u7B26\u4E32\uFF0C\u7B2C\u4E8C\u4E2A\u503C\u4E3A\u5E03\u5C14\u503C\uFF0C\u8868\u793A\u539F\u6587\u8BED\u8A00\u4E0E\u76EE\u6807\u8BED\u8A00\u662F\u5426\u76F8\u540C\n(res, text, from, to) => [res.sentences.map((item) => item.trans).join(\" \"), to === res.src]\n\n\n// \u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u5982\u4E0B\n".concat(customApiLangs,"\n");const customApiHelpEN="// Default request\n{\n \"url\": \"{{url}}\",\n \"method\": \"POST\",\n \"headers\": {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{key}}\"\n },\n \"body\": {\n \"text\": \"{{text}}\", // Text to be translated\n \"from\": \"{{from}}\", // The language of the text (may be empty)\n \"to\": \"{{to}}\", // Target language\n },\n}\n\n\n// Default response\n{\n text: \"\", // translated text\n from: \"\", // Recognized source language\n to: \"\", // Target language (optional)\n}\n\n\n/// Hook Example\n// URL\nhttps://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN\n\n// Request Hook\n(text, from, to, url, key) => [url, {\n headers: {\n \"Content-type\": \"application/json\",\n },\n method: \"GET\",\n body: null,\n}]\n\n// Response Hook\n// In the returned array, the first value is the translated string, while the second value is a boolean\n// that indicates whether the source language is the same as the target language.\n(res, text, from, to) => [res.sentences.map((item) => item.trans).join(\" \"), to === res.src]\n\n\n// The supported language codes are as follows\n".concat(customApiLangs,"\n");const requestHookHelperZH="1\u3001\u7B2C\u4E00\u4E2A\u53C2\u6570\u5305\u542B\u5982\u4E0B\u5B57\u6BB5\uFF1A'texts', 'from', 'to', 'url', 'key', 'model', 'systemPrompt', ...\n2\u3001\u8FD4\u56DE\u503C\u5FC5\u987B\u662F\u5305\u542B\u4EE5\u4E0B\u5B57\u6BB5\u7684\u5BF9\u8C61\uFF1A 'url', 'body', 'headers', 'method'\n3\u3001\u5982\u8FD4\u56DE\u7A7A\u503C\uFF0C\u5219hook\u51FD\u6570\u4E0D\u4F1A\u4EA7\u751F\u4EFB\u4F55\u6548\u679C\u3002\n\n// \u793A\u4F8B\nasync (args, { url, body, headers, userMsg, method } = {}) => {\n return { url, body, headers, userMsg, method };\n}";const requestHookHelperEN="1. The first parameter contains the following fields: 'texts', 'from', 'to', 'url', 'key', 'model', 'systemPrompt', ...\n2. The return value must be an object containing the following fields: 'url', 'body', 'headers', 'method'\n3. If a null value is returned, the hook function will have no effect.\n\n// Example\nasync (args, { url, body, headers, userMsg, method } = {}) => {\n return { url, body, headers, userMsg, method };\n}";const responsetHookHelperZH="1\u3001\u7B2C\u4E00\u4E2A\u53C2\u6570\u5305\u542B\u5982\u4E0B\u5B57\u6BB5\uFF1A'res', ...\n2\u3001\u8FD4\u56DE\u503C\u5FC5\u987B\u662F\u5305\u542B\u4EE5\u4E0B\u5B57\u6BB5\u7684\u5BF9\u8C61\uFF1A 'translations'\n \uFF08'translations' \u5E94\u4E3A\u4E00\u4E2A\u4E8C\u7EF4\u6570\u7EC4\uFF1A[[\u8BD1\u6587, \u539F\u6587\u8BED\u8A00]]\uFF09\n3\u3001\u5982\u8FD4\u56DE\u7A7A\u503C\uFF0C\u5219hook\u51FD\u6570\u4E0D\u4F1A\u4EA7\u751F\u4EFB\u4F55\u6548\u679C\u3002\n\n// \u793A\u4F8B\nasync ({ res, ...args }) => {\n const translations = [[\"\u4F60\u597D\", \"en\"]];\n const modelMsg = {}; // \u7528\u4E8EAI\u4E0A\u4E0B\u6587\n return { translations, modelMsg };\n}";const responsetHookHelperEN="1. The first parameter contains the following fields: 'res', ...\n2. The return value must be an object containing the following fields: 'translations'\n ('translations' should be a two-dimensional array: [[translation, source language]]).\n3. If a null value is returned, the hook function will have no effect.\n\n// Example\nasync ({ res, ...args }) => {\n const translations = [[\"\u4F60\u597D\", \"en\"]];\n const modelMsg = {}; // For AI context\n return { translations, modelMsg };\n}";const I18N={app_name:{zh:"\u7B80\u7EA6\u7FFB\u8BD1",en:"KISS Translator",zh_TW:"\u7C21\u7D04\u7FFB\u8B6F"},translate:{zh:"\u7FFB\u8BD1",en:"Translate",zh_TW:"\u7FFB\u8B6F"},custom_api_help:{zh:customApiHelpZH,en:customApiHelpEN,zh_TW:customApiHelpZH},request_hook_helper:{zh:requestHookHelperZH,en:requestHookHelperEN,zh_TW:requestHookHelperZH},response_hook_helper:{zh:responsetHookHelperZH,en:responsetHookHelperEN,zh_TW:responsetHookHelperZH},translate_alt:{zh:"\u7FFB\u8BD1",en:"Translate",zh_TW:"\u7FFB\u8B6F"},basic_setting:{zh:"\u57FA\u672C\u8BBE\u7F6E",en:"Basic Setting",zh_TW:"\u57FA\u672C\u8A2D\u5B9A"},rules_setting:{zh:"\u89C4\u5219\u8BBE\u7F6E",en:"Rules Setting",zh_TW:"\u898F\u5247\u8A2D\u5B9A"},apis_setting:{zh:"\u63A5\u53E3\u8BBE\u7F6E",en:"Apis Setting",zh_TW:"API\u8A2D\u5B9A"},sync_setting:{zh:"\u540C\u6B65\u8BBE\u7F6E",en:"Sync Setting",zh_TW:"\u540C\u6B65\u8A2D\u5B9A"},patch_setting:{zh:"\u8865\u4E01\u8BBE\u7F6E",en:"Patch Setting",zh_TW:"\u4FEE\u88DC\u8A2D\u5B9A"},patch_setting_help:{zh:"\u9488\u5BF9\u4E00\u4E9B\u7279\u6B8A\u7F51\u7AD9\u7684\u4FEE\u6B63\u811A\u672C\uFF0C\u4EE5\u4FBF\u7FFB\u8BD1\u8F6F\u4EF6\u5F97\u5230\u66F4\u597D\u7684\u5C55\u793A\u6548\u679C\u3002",en:"Corrected scripts for some special websites so that the translation software can get better display results.",zh_TW:"\u91DD\u5C0D\u67D0\u4E9B\u7279\u6B8A\u7DB2\u7AD9\u7684\u4FEE\u6B63\u8173\u672C\uFF0C\u8B93\u7FFB\u8B6F\u8EDF\u9AD4\u6709\u66F4\u597D\u7684\u986F\u793A\u6548\u679C\u3002"},inject_webfix:{zh:"\u6CE8\u5165\u4FEE\u590D\u8865\u4E01",en:"Inject Webfix",zh_TW:"\u6CE8\u5165\u4FEE\u6B63\u88DC\u4E01"},about:{zh:"\u5173\u4E8E",en:"About",zh_TW:"\u95DC\u65BC"},about_md:{zh:"README.md",en:"README.en.md",zh_TW:"README.md"},about_md_local:{zh:"\u8BF7 [\u70B9\u51FB\u8FD9\u91CC](".concat("https://github.com/fishjar/kiss-translator",") \u67E5\u770B\u8BE6\u60C5\u3002"),en:"Please [click here](".concat("https://github.com/fishjar/kiss-translator",") for details."),zh_TW:"\u8ACB\u3010\u9EDE\u9019\u88E1\u3011\u67E5\u770B\u8A73\u7D30\u5167\u5BB9\u3002"},ui_lang:{zh:"\u754C\u9762\u8BED\u8A00",en:"Interface Language",zh_TW:"\u4ECB\u9762\u8A9E\u8A00"},fetch_limit:{zh:"\u6700\u5927\u5E76\u53D1\u8BF7\u6C42\u6570\u91CF (1-100)",en:"Maximum Number Of Concurrent Requests (1-100)",zh_TW:"\u6700\u5927\u540C\u6642\u8ACB\u6C42\u6578\u91CF (1-100)"},if_think:{zh:"\u542F\u7528\u6216\u7981\u7528\u6A21\u578B\u7684\u6DF1\u5EA6\u601D\u8003\u80FD\u529B",en:"Enable or disable the model\u2019s thinking behavior ",zh_TW:"\u555F\u7528\u6216\u505C\u7528\u6A21\u578B\u7684\u6DF1\u5EA6\u601D\u8003\u80FD\u529B"},think:{zh:"\u542F\u7528\u6DF1\u5EA6\u601D\u8003",en:"enable thinking",zh_TW:"\u555F\u7528\u6DF1\u5EA6\u601D\u8003"},nothink:{zh:"\u7981\u7528\u6DF1\u5EA6\u601D\u8003",en:"disable thinking",zh_TW:"\u505C\u7528\u6DF1\u5EA6\u601D\u8003"},think_ignore:{zh:"\u5FFD\u7565\u4EE5\u4E0B\u6A21\u578B\u7684\u8F93\u51FA,\u9017\u53F7(,)\u5206\u5272,\u5F53\u6A21\u578B\u652F\u6301\u601D\u8003\u4F46ollama\u4E0D\u652F\u6301\u65F6\u9700\u8981\u586B\u5199\u672C\u53C2\u6570",en:"Ignore the block for the following models, comma (,) separated",zh_TW:"\u5FFD\u7565\u4EE5\u4E0B\u6A21\u578B\u7684 \u8F38\u51FA\uFF0C\u4EE5\u9017\u865F (,) \u5206\u9694\uFF1B\u7576\u6A21\u578B\u652F\u63F4\u601D\u8003\u4F46 ollama \u4E0D\u652F\u63F4\u6642\u9700\u8981\u586B\u5BEB\u6B64\u53C3\u6578"},fetch_interval:{zh:"\u6BCF\u6B21\u8BF7\u6C42\u95F4\u9694\u65F6\u95F4 (0-5000ms)",en:"Time Between Requests (0-5000ms)",zh_TW:"\u6BCF\u6B21\u8ACB\u6C42\u9593\u9694\u6642\u9593 (0-5000ms)"},translate_interval:{zh:"\u7FFB\u8BD1\u95F4\u9694\u65F6\u95F4 (10-2000ms)",en:"Translation Interval (10-2000ms)",zh_TW:"\u7FFB\u8B6F\u9593\u9694\u6642\u9593 (10-2000ms)"},http_timeout:{zh:"\u8BF7\u6C42\u8D85\u65F6\u65F6\u95F4 (5000-60000ms)",en:"Request Timeout Time (5000-60000ms)",zh_TW:"\u8ACB\u6C42\u903E\u6642\u6642\u9593 (5000-60000ms)"},custom_header:{zh:"\u81EA\u5B9A\u4E49Header\u53C2\u6570",en:"Custom Header Params"},custom_header_help:{zh:"\u4F7F\u7528JSON\u683C\u5F0F\uFF0C\u4F8B\u5982 \"User-Agent\": \"Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0\"",en:"Use JSON format, for example \"User-Agent\": \"Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0\""},custom_body:{zh:"\u81EA\u5B9A\u4E49Body\u53C2\u6570",en:"Custom Body Params"},custom_body_help:{zh:"\u4F7F\u7528JSON\u683C\u5F0F\uFF0C\u4F8B\u5982 \"top_p\": 0.7",en:"Use JSON format, for example \"top_p\": 0.7"},min_translate_length:{zh:"\u6700\u5C0F\u7FFB\u8BD1\u5B57\u7B26\u6570 (1-100)",en:"Minimum number Of Translated Characters (1-100)",zh_TW:"\u6700\u5C0F\u7FFB\u8B6F\u5B57\u5143\u6578 (1-100)"},max_translate_length:{zh:"\u6700\u5927\u7FFB\u8BD1\u5B57\u7B26\u6570 (100-100000)",en:"Maximum number Of Translated Characters (100-100000)",zh_TW:"\u6700\u5927\u7FFB\u8B6F\u5B57\u5143\u6578 (100-100000)"},num_of_newline_characters:{zh:"\u6362\u884C\u5B57\u7B26\u6570 (1-1000)",en:"Number of Newline Characters (1-1000)",zh_TW:"\u63DB\u884C\u5B57\u5143\u6578 (1-1000)"},translate_service:{zh:"\u7FFB\u8BD1\u670D\u52A1",en:"Translate Service",zh_TW:"\u7FFB\u8B6F\u670D\u52D9"},translate_service_multiple:{zh:"\u7FFB\u8BD1\u670D\u52A1 (\u652F\u6301\u591A\u9009)",en:"Translation service (multiple supported)",zh_TW:"\u7FFB\u8B6F\u670D\u52D9 (\u652F\u63F4\u591A\u9078)"},translate_timing:{zh:"\u7FFB\u8BD1\u65F6\u673A",en:"Translate Timing",zh_TW:"\u7FFB\u8B6F\u6642\u6A5F"},mk_pagescroll:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u7FFB\u8BD1\uFF08\u63A8\u8350\uFF09",en:"Rolling Loading (Suggested)",zh_TW:"\u6EFE\u52D5\u8F09\u5165\u7FFB\u8B6F\uFF08\u5EFA\u8B70\uFF09"},mk_pageopen:{zh:"\u7ACB\u5373\u5168\u90E8\u7FFB\u8BD1",en:"Translate all now",zh_TW:"\u7ACB\u5373\u5168\u90E8\u7FFB\u8B6F"},mk_mouseover:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},mk_ctrlKey:{zh:"Control + \u9F20\u6807\u60AC\u505C",en:"Control + Mouseover",zh_TW:"Control + \u6ED1\u9F20\u61F8\u505C"},mk_shiftKey:{zh:"Shift + \u9F20\u6807\u60AC\u505C",en:"Shift + Mouseover",zh_TW:"Shift + \u6ED1\u9F20\u61F8\u505C"},mk_altKey:{zh:"Alt + \u9F20\u6807\u60AC\u505C",en:"Alt + Mouseover",zh_TW:"Alt + \u6ED1\u9F20\u61F8\u505C"},from_lang:{zh:"\u539F\u6587\u8BED\u8A00",en:"Source Language",zh_TW:"\u539F\u6587\u8A9E\u8A00"},to_lang:{zh:"\u76EE\u6807\u8BED\u8A00",en:"Target Language",zh_TW:"\u76EE\u6A19\u8A9E\u8A00"},to_lang2:{zh:"\u7B2C\u4E8C\u76EE\u6807\u8BED\u8A00",en:"Target Language 2",zh_TW:"\u7B2C\u4E8C\u76EE\u6A19\u8A9E\u8A00"},to_lang2_helper:{zh:"\u8BBE\u5B9A\u540E\uFF0C\u4E0E\u76EE\u6807\u8BED\u8A00\u4EA7\u751F\u4E92\u8BD1\u6548\u679C\uFF0C\u4F46\u4F9D\u8D56\u8FDC\u7A0B\u8BED\u8A00\u8BC6\u522B\u3002",en:"After setting, it will produce mutual translation effect with the target language, but it relies on remote language recognition.",zh_TW:"\u8A2D\u5B9A\u5F8C\u6703\u8207\u76EE\u6A19\u8A9E\u8A00\u4E92\u8B6F\uFF0C\u4F46\u4F9D\u8CF4\u9060\u7AEF\u8A9E\u8A00\u8B58\u5225\u3002"},text_style:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},text_style_alt:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},bg_color:{zh:"\u6837\u5F0F\u989C\u8272",en:"Style Color",zh_TW:"\u6A23\u5F0F\u984F\u8272"},remain_unchanged:{zh:"\u4FDD\u7559\u4E0D\u53D8",en:"Remain Unchanged",zh_TW:"\u4FDD\u7559\u4E0D\u8B8A"},google_api:{zh:"\u8C37\u6B4C\u7FFB\u8BD1\u63A5\u53E3",en:"Google Translate API",zh_TW:"Google \u7FFB\u8B6F\u4ECB\u9762"},default_selector:{zh:"\u9ED8\u8BA4\u9009\u62E9\u5668",en:"Default selector",zh_TW:"\u9810\u8A2D\u9078\u64C7\u5668"},selector_rules:{zh:"\u9009\u62E9\u5668\u89C4\u5219",en:"Selector Rules",zh_TW:"\u9078\u64C7\u5668\u898F\u5247"},save:{zh:"\u4FDD\u5B58",en:"Save",zh_TW:"\u5132\u5B58"},edit:{zh:"\u7F16\u8F91",en:"Edit",zh_TW:"\u7DE8\u8F2F"},cancel:{zh:"\u53D6\u6D88",en:"Cancel",zh_TW:"\u53D6\u6D88"},delete:{zh:"\u5220\u9664",en:"Delete",zh_TW:"\u522A\u9664"},reset:{zh:"\u91CD\u7F6E",en:"Reset",zh_TW:"\u91CD\u8A2D"},add:{zh:"\u6DFB\u52A0",en:"Add",zh_TW:"\u65B0\u589E"},inject_rules:{zh:"\u6CE8\u5165\u8BA2\u9605\u89C4\u5219",en:"Inject Subscribe Rules",zh_TW:"\u6CE8\u5165\u8A02\u95B1\u898F\u5247"},personal_rules:{zh:"\u4E2A\u4EBA\u89C4\u5219",en:"Rules",zh_TW:"\u500B\u4EBA\u898F\u5247"},subscribe_rules:{zh:"\u8BA2\u9605\u89C4\u5219",en:"Subscribe",zh_TW:"\u8A02\u95B1\u898F\u5247"},overwrite_subscribe_rules:{zh:"\u8986\u5199\u8BA2\u9605\u89C4\u5219",en:"Overwrite",zh_TW:"\u8986\u5BEB\u8A02\u95B1\u898F\u5247"},subscribe_url:{zh:"\u8BA2\u9605\u5730\u5740",en:"Subscribe URL",zh_TW:"\u8A02\u95B1\u7DB2\u5740"},rules_warn_1:{zh:"1\u3001\u89C4\u5219\u751F\u6548\u7684\u4F18\u5148\u7EA7\u4F9D\u6B21\u4E3A\uFF1A\u4E2A\u4EBA\u89C4\u5219 > \u8BA2\u9605\u89C4\u5219 > \u5168\u5C40\u89C4\u5219\u3002\"\u5168\u5C40\u89C4\u5219\"\u76F8\u5F53\u4E8E\u515C\u5E95\u89C4\u5219\u3002",en:"1. The priority of rules is: personal rules > subscription rules > global rules. \"Global rules\" are like a fallback rule.",zh_TW:"1.\u898F\u5247\u751F\u6548\u7684\u512A\u5148\u9806\u5E8F\u4F9D\u5E8F\u70BA\uFF1A\u500B\u4EBA\u898F\u5247 > \u8A02\u95B1\u898F\u5247 > \u5168\u57DF\u898F\u5247\u3002 \"\u5168\u57DF\u898F\u5247\"\u76F8\u7576\u65BC\u515C\u5E95\u898F\u5247\u3002"},rules_warn_2:{zh:"2\u3001\u201C\u8BA2\u9605\u89C4\u5219\u201D\u9009\u62E9\u6CE8\u5165\u540E\u624D\u4F1A\u751F\u6548\u3002",en:"2. \"Subscription rules\" will take effect only after injection is selected.",zh_TW:"2\u3001\u300C\u8A02\u95B1\u898F\u5247\u300D\u9078\u64C7\u6CE8\u5165\u5F8C\u624D\u6703\u751F\u6548\u3002"},rules_warn_3:{zh:"3\u3001\u5173\u4E8E\u89C4\u5219\u586B\u5199\uFF1A\u8F93\u5165\u6846\u7559\u7A7A\u6216\u4E0B\u62C9\u6846\u9009\u201C*\u201D\u8868\u793A\u91C7\u7528\u5168\u5C40\u89C4\u5219\u3002",en:"3. Regarding filling in the rules: Leave the input box blank or select \"*\" in the drop-down box to use global rule.",zh_TW:"3. \u898F\u5247\u586B\u5BEB\u8AAA\u660E\uFF1A\u8F38\u5165\u6846\u7559\u7A7A\u6216\u4E0B\u62C9\u9078\u64C7\u300C*\u300D\u8868\u793A\u4F7F\u7528\u5168\u57DF\u898F\u5247\u3002"},sync_warn:{zh:"\u6D89\u53CA\u9690\u79C1\u6570\u636E\u7684\u540C\u6B65\u8BF7\u8C28\u614E\u9009\u62E9\u7B2C\u4E09\u65B9\u540C\u6B65\u670D\u52A1\uFF0C\u5EFA\u8BAE\u81EA\u884C\u642D\u5EFA kiss-worker \u6216 WebDAV \u670D\u52A1\u3002",en:"When synchronizing data that involves privacy, please be cautious about choosing third-party sync services. It is recommended to set up your own sync service using kiss-worker or WebDAV.",zh_TW:"\u540C\u6B65\u6D89\u53CA\u96B1\u79C1\u8CC7\u6599\u6642\uFF0C\u8ACB\u8B39\u614E\u9078\u64C7\u7B2C\u4E09\u65B9\u540C\u6B65\u670D\u52D9\uFF1B\u5EFA\u8B70\u81EA\u5EFA kiss-worker \u6216 WebDAV \u670D\u52D9\u3002"},sync_warn_2:{zh:"\u5982\u679C\u670D\u52A1\u5668\u5B58\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u540C\u6B65\u7684\u6570\u636E\uFF0C\u7B2C\u4E00\u6B21\u540C\u6B65\u5C06\u76F4\u63A5\u8986\u76D6\u672C\u5730\u914D\u7F6E\uFF0C\u540E\u9762\u5219\u6839\u636E\u4FEE\u6539\u65F6\u95F4\uFF0C\u65B0\u7684\u8986\u76D6\u65E7\u7684\u3002",en:"If the server has data synchronized by other clients, the first synchronization will directly overwrite the local configuration, and later, according to the modification time, the new one will overwrite the old one.",zh_TW:"\u82E5\u4F3A\u670D\u5668\u4E0A\u5B58\u5728\u5176\u4ED6\u7528\u6236\u7AEF\u540C\u6B65\u7684\u8CC7\u6599\uFF0C\u7B2C\u4E00\u6B21\u540C\u6B65\u6703\u76F4\u63A5\u8986\u84CB\u672C\u6A5F\u8A2D\u5B9A\uFF1B\u4E4B\u5F8C\u5247\u4F9D\u4FEE\u6539\u6642\u9593\uFF0C\u7531\u65B0\u7684\u8986\u84CB\u820A\u7684\u3002"},about_sync_api:{zh:"\u81EA\u5EFAkiss-wroker\u6570\u636E\u540C\u6B65\u670D\u52A1",en:"Self-hosting a Kiss-worker data sync service",zh_TW:"\u81EA\u5EFA kiss-wroker \u8CC7\u6599\u540C\u6B65\u670D\u52D9"},about_api:{zh:"1\u3001\u5176\u4E2D BuiltinAI \u4E3A\u6D4F\u89C8\u5668\u5185\u7F6EAI\u7FFB\u8BD1\uFF0C\u76EE\u524D\u4EC5 Chrome 138 \u53CA\u4EE5\u4E0A\u7248\u672C\u5F97\u5230\u652F\u6301\u3002",en:"1. BuiltinAI is the browser's built-in AI translation, which is currently only supported by Chrome 138 and above.",zh_TW:"1.\u5176\u4E2D BuiltinAI \u70BA\u700F\u89BD\u5668\u5167\u5EFAAI\u7FFB\u8B6F\uFF0C\u76EE\u524D\u50C5 Chrome 138 \u4EE5\u4E0A\u7248\u672C\u652F\u63F4\u3002"},about_api_2:{zh:"2\u3001\u5927\u90E8\u5206AI\u63A5\u53E3\u90FD\u4E0EOpenAI\u517C\u5BB9\uFF0C\u56E0\u6B64\u9009\u62E9\u6DFB\u52A0OpenAI\u7C7B\u578B\u5373\u53EF\u3002It should be noted that Prompt has two types: batch translation and nobatch translation. Not all interfaces support batch translation.",en:"2. Most AI interfaces are compatible with OpenAI, so just choose to add the OpenAI type.",zh_TW:"2.\u5927\u90E8\u5206AI\u4ECB\u9762\u90FD\u8207OpenAI\u76F8\u5BB9\uFF0C\u56E0\u6B64\u9078\u64C7\u65B0\u589EOpenAI\u985E\u578B\u5373\u53EF\u3002\u8981\u6CE8\u610F\u7684\u662FPrompt\u5206\u805A\u5408\u7FFB\u8B6F\u548C\u975E\u805A\u5408\u7FFB\u8B6F\u5169\u7A2E\uFF0C\u4E0D\u662F\u6240\u6709\u4ECB\u9762\u90FD\u652F\u63F4\u805A\u5408\u7FFB\u8B6F\u3002"},about_api_3:{zh:"3\u3001\u6682\u672A\u5217\u51FA\u7684\u63A5\u53E3\uFF0C\u7406\u8BBA\u4E0A\u90FD\u53EF\u4EE5\u901A\u8FC7\u81EA\u5B9A\u4E49\u63A5\u53E3 (Custom) \u7684\u5F62\u5F0F\u652F\u6301\u3002",en:"3. Interfaces that have not yet been launched can theoretically be supported through custom interfaces.",zh_TW:"3\u3001\u66AB\u672A\u5217\u51FA\u7684\u4ECB\u9762\uFF0C\u7406\u8AD6\u4E0A\u90FD\u53EF\u900F\u904E\u81EA\u8A02\u4ECB\u9762 (Custom) \u7684\u5F62\u5F0F\u652F\u63F4\u3002"},about_api_proxy:{zh:"\u67E5\u770B\u81EA\u5EFA\u4E00\u4E2A\u7FFB\u8BD1\u63A5\u53E3\u4EE3\u7406",en:"Check out the self-built translation interface proxy",zh_TW:"\u67E5\u770B\u5982\u4F55\u81EA\u5EFA\u7FFB\u8B6F\u4ECB\u9762 Proxy"},setting_helper:{zh:"\u65B0\u65E7\u914D\u7F6E\u5E76\u4E0D\u517C\u5BB9\uFF0C\u5BFC\u51FA\u7684\u65E7\u7248\u914D\u7F6E\uFF0C\u52FF\u518D\u6B21\u5BFC\u5165\u3002",en:"The old and new configurations are not compatible. Do not import the exported old configuration again.",zh_TW:"\u65B0\u820A\u914D\u7F6E\u4E26\u4E0D\u76F8\u5BB9\uFF0C\u532F\u51FA\u7684\u820A\u7248\u914D\u7F6E\uFF0C\u52FF\u518D\u6B21\u532F\u5165\u3002"},style_none:{zh:"\u65E0",en:"None",zh_TW:"\u7121"},under_line:{zh:"\u4E0B\u5212\u76F4\u7EBF",en:"Underline",zh_TW:"\u4E0B\u5283\u76F4\u7DDA"},dot_line:{zh:"\u4E0B\u5212\u70B9\u72B6\u7EBF",en:"Dotted Underline",zh_TW:"\u4E0B\u5283\u9EDE\u72C0\u7DDA"},dash_line:{zh:"\u4E0B\u5212\u865A\u7EBF",en:"Dashed Underline",zh_TW:"\u4E0B\u5283\u865B\u7DDA"},dash_box:{zh:"\u865A\u7EBF\u6846",en:"Dashed Box"},dash_line_bold:{zh:"\u4E0B\u5212\u865A\u7EBF\u52A0\u7C97",en:"Dashed Underline Bold",zh_TW:"\u4E0B\u5283\u865B\u7DDA"},dash_box_bold:{zh:"\u865A\u7EBF\u6846\u52A0\u7C97",en:"Dashed Box Bold",zh_TW:"\u865B\u7DDA\u6846\u52A0\u7C97"},marker:{zh:"\u9A6C\u514B\u7B14",en:"Marker",zh_TW:"\u99AC\u514B\u7B46"},gradient_marker:{zh:"\u6E10\u53D8\u9A6C\u514B\u7B14",en:"Gradient Marker",zh_TW:"\u6F38\u5C64\u99AC\u514B\u7B46"},wavy_line:{zh:"\u4E0B\u5212\u6CE2\u6D6A\u7EBF",en:"Wavy Underline",zh_TW:"\u4E0B\u5283\u6CE2\u6D6A\u7DDA"},wavy_line_bold:{zh:"\u4E0B\u5212\u6CE2\u6D6A\u7EBF\u52A0\u7C97",en:"Wavy Underline Bold",zh_TW:"\u4E0B\u5283\u6CE2\u6D6A\u7DDA\u52A0\u7C97"},fuzzy:{zh:"\u6A21\u7CCA",en:"Fuzzy",zh_TW:"\u6A21\u7CCA"},highlight:{zh:"\u9AD8\u4EAE",en:"Highlight",zh_TW:"\u53CD\u767D\u6A19\u793A"},blockquote:{zh:"\u5F15\u7528",en:"Blockquote",zh_TW:"\u5F15\u7528"},gradient:{zh:"\u6E10\u53D8",en:"Gradient",zh_TW:"\u6F38\u8B8A"},blink:{zh:"\u95EA\u73B0",en:"Blink",zh_TW:"\u9583\u73FE"},glow:{zh:"\u53D1\u5149",en:"Glow",zh_TW:"\u767C\u5149"},colorful:{zh:"\u591A\u5F69",en:"Colorful",zh_TW:"\u591A\u5F69"},setting:{zh:"\u8BBE\u7F6E",en:"Setting",zh_TW:"\u8A2D\u5B9A"},pattern:{zh:"\u5339\u914D\u7F51\u5740",en:"URL pattern",zh_TW:"\u5339\u914D\u7DB2\u5740"},pattern_helper:{zh:"1\u3001\u652F\u6301\u661F\u53F7(*)\u901A\u914D\u7B26\u30022\u3001\u591A\u4E2AURL\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\u3002",en:"1. Supports the asterisk (*) wildcard character. 2. Separate multiple URLs with newlines or English commas \",\".",zh_TW:"1. \u652F\u63F4\u661F\u865F (*) \u842C\u7528\u5B57\u5143\u30022. \u591A\u500B URL \u8ACB\u4EE5\u63DB\u884C\u6216\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u3002"},selector_helper:{zh:"1\u3001\u9700\u8981\u7FFB\u8BD1\u7684\u76EE\u6807\u5143\u7D20\u30022\u3001\u5F00\u542F\u81EA\u52A8\u626B\u63CF\u9875\u9762\u540E\uFF0C\u672C\u8BBE\u7F6E\u65E0\u6548\u30023\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. The target element to be translated. 2. This setting is invalid when automatic page scanning is enabled. 3. Follow the CSS selector syntax.",zh_TW:"1\u3001\u9700\u8981\u7FFB\u8B6F\u7684\u76EE\u6A19\u5143\u7D20\u3002 2.\u958B\u555F\u81EA\u52D5\u6383\u63CF\u9801\u9762\u5F8C\uFF0C\u672C\u8A2D\u5B9A\u7121\u6548\u3002 3.\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},translate_switch:{zh:"\u5F00\u542F\u7FFB\u8BD1",en:"Translate Switch",zh_TW:"\u958B\u555F\u7FFB\u8B6F"},default_enabled:{zh:"\u9ED8\u8BA4\u5F00\u542F",en:"Enabled",zh_TW:"\u9810\u8A2D\u958B\u555F"},default_disabled:{zh:"\u9ED8\u8BA4\u5173\u95ED",en:"Disabled",zh_TW:"\u9810\u8A2D\u95DC\u9589"},selector:{zh:"\u9009\u62E9\u5668",en:"Selector",zh_TW:"\u9078\u64C7\u5668"},target_selector:{zh:"\u76EE\u6807\u5143\u7D20\u9009\u62E9\u5668",en:"Target element selector",zh_TW:"\u76EE\u6A19\u5143\u7D20\u9078\u64C7\u5668"},keep_selector:{zh:"\u4FDD\u7559\u5143\u7D20\u9009\u62E9\u5668",en:"Keep unchanged selector",zh_TW:"\u4FDD\u7559\u5143\u7D20\u9078\u64C7\u5668"},keep_selector_helper:{zh:"1\u3001\u76EE\u6807\u5143\u7D20\u4E0B\u9762\u9700\u8981\u539F\u6837\u4FDD\u7559\u7684\u5B50\u8282\u70B9\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. The child nodes under the target element need to remain intact. 2. Follow the CSS selector syntax.",zh_TW:"1. \u76EE\u6A19\u5143\u7D20\u4E0B\u7684\u5B50\u7BC0\u9EDE\u9700\u8981\u4FDD\u6301\u539F\u6A23\u3002 2. \u9075\u5FAA CSS \u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},root_selector:{zh:"\u6839\u8282\u70B9\u9009\u62E9\u5668",en:"Root node selector",zh_TW:"\u6839\u7BC0\u9EDE\u9078\u64C7\u5668"},root_selector_helper:{zh:"1\u3001\u7528\u4E8E\u7F29\u5C0F\u9875\u9762\u7FFB\u8BD1\u8303\u56F4\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. Used to narrow the translation scope of the page. 2. Follow the CSS selector syntax.",zh_TW:"1.\u7528\u65BC\u7E2E\u5C0F\u9801\u9762\u7FFB\u8B6F\u7BC4\u570D\u3002 2\u3001\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},ignore_selector:{zh:"\u4E0D\u7FFB\u8BD1\u8282\u70B9\u9009\u62E9\u5668",en:"Ignore node selectors",zh_TW:"\u4E0D\u7FFB\u8B6F\u7BC0\u9EDE\u9078\u64C7\u5668"},ignore_selector_helper:{zh:"1\u3001\u9700\u8981\u5FFD\u7565\u7684\u8282\u70B9\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. Nodes to be ignored. 2. Follow CSS selector syntax.",zh_TW:"1\u3001\u9700\u8981\u5FFD\u7565\u7684\u7BC0\u9EDE\u3002 2\u3001\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},terms:{zh:"\u4E13\u4E1A\u672F\u8BED",en:"Terms",zh_TW:"\u5C08\u696D\u8853\u8A9E"},terms_helper:{zh:"1\u3001\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\uFF0C\u65E0\u9700\u659C\u6746\uFF0C\u4E0D\u652F\u6301\u4FEE\u9970\u7B26\u30022\u3001\u591A\u6761\u672F\u8BED\u7528\u6362\u884C\u6216\u5206\u53F7\u201C;\u201D\u9694\u5F00\u30023\u3001\u672F\u8BED\u548C\u8BD1\u6587\u7528\u82F1\u6587\u9017\u53F7\u201C,\u201D\u9694\u5F00\u30024\u3001\u6CA1\u6709\u8BD1\u6587\u89C6\u4E3A\u4E0D\u7FFB\u8BD1\u672F\u8BED\u3002",en:"1. Supports regular expression matching, no slash required, and no modifiers are supported. 2. Separate multiple terms with newlines or semicolons \";\". 3. Terms and translations are separated by English commas \",\". 4. If there is no translation, the term will be deemed not to be translated.",zh_TW:"1. \u652F\u63F4\u6B63\u5247\u8868\u9054\u5F0F\u6BD4\u5C0D\uFF0C\u7121\u9700\u659C\u7DDA\uFF0C\u4E14\u4E0D\u652F\u63F4\u4FEE\u98FE\u7B26\u30022. \u591A\u689D\u8853\u8A9E\u4EE5\u63DB\u884C\u6216\u5206\u865F\u300C;\u300D\u5206\u9694\u30023. \u8853\u8A9E\u8207\u8B6F\u6587\u4EE5\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u30024. \u7121\u8B6F\u6587\u8005\u8996\u70BA\u4E0D\u7FFB\u8B6F\u8A72\u8853\u8A9E\u3002"},ai_terms:{zh:"AI\u4E13\u4E1A\u672F\u8BED",en:"AI Terms",zh_TW:"AI\u5C08\u696D\u8853\u8A9E"},ai_terms_helper:{zh:"1\u3001AI\u667A\u80FD\u66FF\u6362\uFF0C\u4E0D\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\u30022\u3001\u591A\u6761\u672F\u8BED\u7528\u6362\u884C\u6216\u5206\u53F7\u201C;\u201D\u9694\u5F00\u30023\u3001\u672F\u8BED\u548C\u8BD1\u6587\u7528\u82F1\u6587\u9017\u53F7\u201C,\u201D\u9694\u5F00\u30024\u3001\u6CA1\u6709\u8BD1\u6587\u89C6\u4E3A\u4E0D\u7FFB\u8BD1\u672F\u8BED\u3002",en:"1. AI intelligent replacement does not support regular expressions.2. Separate multiple terms with newlines or semicolons \";\". 3. Terms and translations are separated by English commas \",\". 4. If there is no translation, the term will be deemed not to be translated.",zh_TW:"1.AI\u667A\u80FD\u66FF\u63DB\uFF0C\u4E0D\u652F\u63F4\u6B63\u898F\u8868\u793A\u5F0F\u30022. \u591A\u689D\u8853\u8A9E\u4EE5\u63DB\u884C\u6216\u5206\u865F\u300C;\u300D\u5206\u9694\u30023. \u8853\u8A9E\u8207\u8B6F\u6587\u4EE5\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u30024. \u7121\u8B6F\u6587\u8005\u8996\u70BA\u4E0D\u7FFB\u8B6F\u8A72\u8853\u8A9E\u3002"},text_ext_style:{zh:"\u8BD1\u6587\u9644\u52A0\u6837\u5F0F",en:"Translation additional styles",zh_TW:"\u8B6F\u6587\u9644\u52A0\u6A23\u5F0F"},selector_style:{zh:"\u9009\u62E9\u5668\u8282\u70B9\u6837\u5F0F",en:"Selector Style",zh_TW:"\u9078\u64C7\u5668\u7BC0\u9EDE\u6A23\u5F0F"},terms_style:{zh:"\u4E13\u4E1A\u672F\u8BED\u6837\u5F0F",en:"Terms Style",zh_TW:"\u5C08\u696D\u8853\u8A9E\u6A23\u5F0F"},highlight_style:{zh:"\u8BCD\u6C47\u9AD8\u4EAE\u6837\u5F0F",en:"Fav Words highlight style",zh_TW:"\u8A5E\u5F59\u9AD8\u4EAE\u6A23\u5F0F"},selector_style_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\u3002",en:"It is injected when translation is turned on.",zh_TW:"\u5728\u958B\u555F\u7FFB\u8B6F\u6642\u6CE8\u5165\u3002"},selector_parent_style:{zh:"\u9009\u62E9\u5668\u7236\u8282\u70B9\u6837\u5F0F",en:"Parent Selector Style",zh_TW:"\u9078\u64C7\u5668\u7236\u7BC0\u9EDE\u6A23\u5F0F"},selector_grand_style:{zh:"\u9009\u62E9\u5668\u7956\u8282\u70B9\u6837\u5F0F",en:"Grand Selector Style",zh_TW:"\u9078\u64C7\u5668\u7956\u7BC0\u9EDE\u6A23\u5F0F"},inject_js:{zh:"\u6CE8\u5165JS",en:"Inject JS",zh_TW:"\u6CE8\u5165 JS"},inject_js_helper:{zh:"\u9884\u52A0\u8F7D\u65F6\u6CE8\u5165\uFF0C\u4E00\u4E2A\u9875\u9762\u4EC5\u8FD0\u884C\u4E00\u6B21\u3002\u5185\u7F6E\u5168\u5C40\u5BF9\u8C61 KT: {\n apiTranslate,\n apiDectect,\n apiSetting,\n apisMap,\n toLang,\n docInfo,\n glossary,\n }",en:"Injected during preload, runs only once per page. Built-in global object KT: {\n apiTranslate,\n apiDectect,\n apiSetting,\n apisMap,\n toLang,\n docInfo,\n glossary,\n }",zh_TW:"\u9810\u5148\u8F09\u5165\u6642\u6CE8\u5165\uFF0C\u4E00\u500B\u9801\u9762\u50C5\u904B\u884C\u4E00\u6B21\u3002\u5167\u5EFA\u5168\u57DF\u7269\u4EF6 KT: {\n apiTranslate,\n apiDectect,\n apiSetting,\n apisMap,\n toLang,\n docInfo,\n glossary,\n }"},inject_css:{zh:"\u6CE8\u5165CSS",en:"Inject CSS",zh_TW:"\u6CE8\u5165 CSS"},inject_css_helper:{zh:"\u521D\u59CB\u5316\u65F6\u6CE8\u5165\u8FD0\u884C\uFF0C\u4E00\u4E2A\u9875\u9762\u4EC5\u8FD0\u884C\u4E00\u6B21\u3002",en:"Injected and run at initialization, and only run once per page.",zh_TW:"\u521D\u59CB\u5316\u6642\u6CE8\u5165\u904B\u884C\uFF0C\u4E00\u500B\u9801\u9762\u50C5\u904B\u884C\u4E00\u6B21\u3002"},fixer_function:{zh:"\u4FEE\u590D\u51FD\u6570",en:"Fixer Function",zh_TW:"\u4FEE\u5FA9\u51FD\u5F0F"},fixer_function_helper:{zh:"1\u3001br\u662F\u5C06
\u6362\u884C\u66FF\u6362\u6210

\u30022\u3001bn\u662F\u5C06\\n\u6362\u884C\u66FF\u6362\u6210

\u30023\u3001brToDiv\u548CbnToDiv\u662F\u66FF\u6362\u6210

\u3002",en:"1. br replaces
line breaks with

. 2. bn replaces \\n newline with

. 3. brToDiv and bnToDiv are replaced with

.",zh_TW:"1. br \u6703\u5C07
\u63DB\u884C\u66FF\u63DB\u70BA

\u30022. bn \u6703\u5C07 \\n \u63DB\u884C\u66FF\u63DB\u70BA

\u30023. brToDiv \u8207 bnToDiv \u6703\u66FF\u63DB\u70BA

\u3002"},import:{zh:"\u5BFC\u5165",en:"Import",zh_TW:"\u532F\u5165"},export:{zh:"\u5BFC\u51FA",en:"Export",zh_TW:"\u532F\u51FA"},export_translation:{zh:"\u5BFC\u51FA\u91CA\u4E49",en:"Export Translation",zh_TW:"\u532F\u51FA\u91CB\u7FA9"},error_cant_be_blank:{zh:"\u4E0D\u80FD\u4E3A\u7A7A",en:"Can not be blank",zh_TW:"\u4E0D\u53EF\u70BA\u7A7A"},error_duplicate_values:{zh:"\u5B58\u5728\u91CD\u590D\u7684\u503C",en:"There are duplicate values",zh_TW:"\u5B58\u5728\u91CD\u8907\u7684\u503C"},error_wrong_file_type:{zh:"\u9519\u8BEF\u7684\u6587\u4EF6\u7C7B\u578B",en:"Wrong file type",zh_TW:"\u6A94\u6848\u985E\u578B\u932F\u8AA4"},error_fetch_url:{zh:"\u8BF7\u68C0\u67E5url\u5730\u5740\u662F\u5426\u6B63\u786E\u6216\u7A0D\u540E\u518D\u8BD5\u3002",en:"Please check if the url address is correct or try again later.",zh_TW:"\u8ACB\u6AA2\u67E5 URL \u662F\u5426\u6B63\u78BA\u6216\u7A0D\u5F8C\u518D\u8A66\u3002"},deepl_api:{zh:"DeepL \u63A5\u53E3",en:"DeepL API",zh_TW:"DeepL \u4ECB\u9762"},deepl_key:{zh:"DeepL \u5BC6\u94A5",en:"DeepL Key",zh_TW:"DeepL \u91D1\u9470"},openai_api:{zh:"OpenAI \u63A5\u53E3",en:"OpenAI API",zh_TW:"OpenAI \u4ECB\u9762"},openai_key:{zh:"OpenAI \u5BC6\u94A5",en:"OpenAI Key",zh_TW:"OpenAI \u91D1\u9470"},openai_model:{zh:"OpenAI \u6A21\u578B",en:"OpenAI Model",zh_TW:"OpenAI \u6A21\u578B"},openai_prompt:{zh:"OpenAI \u63D0\u793A\u8BCD",en:"OpenAI Prompt",zh_TW:"OpenAI \u63D0\u793A\u8A5E"},if_clear_cache:{zh:"\u662F\u5426\u6E05\u9664\u7F13\u5B58\uFF08\u9ED8\u8BA4\u7F13\u5B587\u5929\uFF09",en:"Whether clear cache (Default cache is 7 days)",zh_TW:"\u662F\u5426\u6E05\u9664\u5FEB\u53D6\uFF08\u9810\u8A2D\u5FEB\u53D67\u5929\uFF09"},clear_cache_never:{zh:"\u4E0D\u6E05\u9664\u7F13\u5B58",en:"Never clear cache",zh_TW:"\u4E0D\u6E05\u9664\u5FEB\u53D6"},clear_cache_restart:{zh:"\u91CD\u542F\u6D4F\u89C8\u5668\u65F6\u6E05\u9664\u7F13\u5B58",en:"Clear cache when restarting browser",zh_TW:"\u91CD\u65B0\u555F\u52D5\u700F\u89BD\u5668\u6642\u6E05\u9664\u5FEB\u53D6"},data_sync_type:{zh:"\u6570\u636E\u540C\u6B65\u65B9\u5F0F",en:"Data Sync Type",zh_TW:"\u8CC7\u6599\u540C\u6B65\u65B9\u5F0F"},data_sync_url:{zh:"\u6570\u636E\u540C\u6B65\u63A5\u53E3",en:"Data Sync API",zh_TW:"\u8CC7\u6599\u540C\u6B65\u4ECB\u9762"},data_sync_user:{zh:"\u6570\u636E\u540C\u6B65\u8D26\u6237",en:"Data Sync User",zh_TW:"\u8CC7\u6599\u540C\u6B65\u5E33\u865F"},data_sync_key:{zh:"\u6570\u636E\u540C\u6B65\u5BC6\u94A5",en:"Data Sync Key",zh_TW:"\u8CC7\u6599\u540C\u6B65\u91D1\u9470"},sync_now:{zh:"\u7ACB\u5373\u540C\u6B65",en:"Sync Now",zh_TW:"\u7ACB\u5373\u540C\u6B65"},sync_success:{zh:"\u540C\u6B65\u6210\u529F\uFF01",en:"Sync Success",zh_TW:"\u540C\u6B65\u6210\u529F\uFF01"},sync_failed:{zh:"\u540C\u6B65\u5931\u8D25\uFF01",en:"Sync Error",zh_TW:"\u540C\u6B65\u5931\u6557\uFF01"},error_got_some_wrong:{zh:"\u62B1\u6B49\uFF0C\u51FA\u9519\u4E86\uFF01",en:"Sorry, something went wrong!",zh_TW:"\u62B1\u6B49\uFF0C\u767C\u751F\u932F\u8AA4\uFF01"},error_sync_setting:{zh:"\u60A8\u7684\u540C\u6B65\u7C7B\u578B\u5FC5\u987B\u4E3A\u201CKISS-Worker\u201D\uFF0C\u4E14\u9700\u586B\u5199\u5B8C\u6574",en:"Your sync type must be \"KISS-Worker\" and must be filled in completely",zh_TW:"\u60A8\u7684\u540C\u6B65\u578B\u614B\u5FC5\u9808\u70BA\u300CKISS-Worker\u300D\uFF0C\u4E14\u9700\u586B\u5BEB\u5B8C\u6574\u3002"},click_test:{zh:"\u70B9\u51FB\u6D4B\u8BD5",en:"Click Test",zh_TW:"\u9EDE\u64CA\u6E2C\u8A66"},test_success:{zh:"\u6D4B\u8BD5\u6210\u529F",en:"Test success",zh_TW:"\u6E2C\u8A66\u6210\u529F"},test_failed:{zh:"\u6D4B\u8BD5\u5931\u8D25",en:"Test failed",zh_TW:"\u6E2C\u8A66\u5931\u6557"},clear_all_cache_now:{zh:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u7F13\u5B58",en:"Clear all cache now",zh_TW:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u5FEB\u53D6"},clear_cache:{zh:"\u6E05\u9664\u7F13\u5B58",en:"Clear Cache",zh_TW:"\u6E05\u9664\u5FEB\u53D6"},clear_success:{zh:"\u6E05\u9664\u6210\u529F",en:"Clear success",zh_TW:"\u6E05\u9664\u6210\u529F"},clear_failed:{zh:"\u6E05\u9664\u5931\u8D25",en:"Clear failed",zh_TW:"\u6E05\u9664\u5931\u6557"},share:{zh:"\u5206\u4EAB",en:"Share",zh_TW:"\u5206\u4EAB"},clear_all:{zh:"\u6E05\u7A7A",en:"Clear All",zh_TW:"\u6E05\u7A7A"},help:{zh:"\u6C42\u52A9",en:"Help",zh_TW:"\u6C42\u52A9"},restore_default:{zh:"\u6062\u590D\u9ED8\u8BA4",en:"Restore Default",zh_TW:"\u6062\u5FA9\u9810\u8A2D"},shortcuts_setting:{zh:"\u5FEB\u6377\u952E\u8BBE\u7F6E",en:"Shortcuts Setting",zh_TW:"\u5FEB\u6377\u9375\u8A2D\u5B9A"},toggle_translate_shortcut:{zh:"\"\u5F00\u542F\u7FFB\u8BD1\"\u5FEB\u6377\u952E",en:"\"Toggle Translate\" Shortcut",zh_TW:"\u300C\u958B\u555F\u7FFB\u8B6F\u300D\u5FEB\u6377\u9375"},toggle_style_shortcut:{zh:"\"\u5207\u6362\u6837\u5F0F\"\u5FEB\u6377\u952E",en:"\"Toggle Style\" Shortcut",zh_TW:"\u300C\u5207\u63DB\u6A23\u5F0F\u300D\u5FEB\u6377\u9375"},toggle_popup_shortcut:{zh:"\"\u6253\u5F00\u5F39\u7A97\"\u5FEB\u6377\u952E",en:"\"Open Popup\" Shortcut",zh_TW:"\u300C\u958B\u555F\u5F48\u7A97\u300D\u5FEB\u6377\u9375"},open_setting_shortcut:{zh:"\"\u6253\u5F00\u8BBE\u7F6E\"\u5FEB\u6377\u952E",en:"\"Open Setting\" Shortcut",zh_TW:"\u300C\u958B\u555F\u8A2D\u5B9A\u300D\u5FEB\u6377\u9375"},hide_fab_button:{zh:"\u9690\u85CF\u60AC\u6D6E\u6309\u94AE",en:"Hide Fab Button",zh_TW:"\u96B1\u85CF\u61F8\u6D6E\u6309\u9215"},fab_click_action:{zh:"\u5355\u51FB\u60AC\u6D6E\u6309\u94AE\u52A8\u4F5C",en:"Single Click Fab Action",zh_TW:"\u55AE\u64CA\u61F8\u6D6E\u6309\u94AE\u52D5\u4F5C"},fab_click_menu:{zh:"\u5F39\u51FA\u83DC\u5355",en:"Popup Menu",zh_TW:"\u5F48\u51FA\u9078\u55AE"},fab_click_translate:{zh:"\u76F4\u63A5\u7FFB\u8BD1",en:"Translate",zh_TW:"\u76F4\u63A5\u7FFB\u8B6F"},hide_tran_button:{zh:"\u9690\u85CF\u7FFB\u8BD1\u6309\u94AE",en:"Hide Translate Button",zh_TW:"\u96B1\u85CF\u7FFB\u8B6F\u6309\u9215"},hide_click_away:{zh:"\u70B9\u51FB\u5916\u90E8\u5173\u95ED\u5F39\u7A97",en:"Click outside to close the pop-up window",zh_TW:"\u9EDE\u64CA\u5916\u90E8\u95DC\u9589\u5F48\u7A97"},use_simple_style:{zh:"\u4F7F\u7528\u7B80\u6D01\u754C\u9762",en:"Use a simple interface",zh_TW:"\u4F7F\u7528\u7C21\u6F54\u4ECB\u9762"},show:{zh:"\u663E\u793A",en:"Show",zh_TW:"\u986F\u793A"},hide:{zh:"\u9690\u85CF",en:"Hide",zh_TW:"\u96B1\u85CF"},save_rule:{zh:"\u4FDD\u5B58\u89C4\u5219",en:"Save Rule",zh_TW:"\u5132\u5B58\u898F\u5247"},global_rule:{zh:"\u5168\u5C40\u89C4\u5219",en:"Global Rule",zh_TW:"\u5168\u57DF\u898F\u5247"},input_translate:{zh:"\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation",zh_TW:"\u8F38\u5165\u6846\u7FFB\u8B6F"},use_input_box_translation:{zh:"\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation",zh_TW:"\u555F\u7528\u8F38\u5165\u6846\u7FFB\u8B6F"},input_selector:{zh:"\u8F93\u5165\u6846\u9009\u62E9\u5668",en:"Input Selector",zh_TW:"\u8F38\u5165\u6846\u9078\u64C7\u5668"},input_selector_helper:{zh:"\u7528\u4E8E\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",en:"Used for input box translation.",zh_TW:"\u7528\u65BC\u8F38\u5165\u6846\u7FFB\u8B6F\u3002"},trigger_trans_shortcut:{zh:"\u89E6\u53D1\u7FFB\u8BD1\u5FEB\u6377\u952E",en:"Trigger Translation Shortcut Keys",zh_TW:"\u89F8\u767C\u7FFB\u8B6F\u5FEB\u6377\u9375"},trigger_trans_shortcut_help:{zh:"\u9ED8\u8BA4\u4E3A\u5355\u51FB\u201CAltLeft+KeyI\u201D",en:"Default is \"AltLeft+KeyI\"",zh_TW:"\u9810\u8A2D\u70BA\u6309\u4E0B\u300CAltLeft+KeyI\u300D"},shortcut_press_count:{zh:"\u5FEB\u6377\u952E\u8FDE\u51FB\u6B21\u6570",en:"Shortcut Press Number",zh_TW:"\u5FEB\u6377\u9375\u9023\u64CA\u6B21\u6578"},combo_timeout:{zh:"\u8FDE\u51FB\u8D85\u65F6\u65F6\u95F4 (10-1000ms)",en:"Combo Timeout (10-1000ms)",zh_TW:"\u9023\u64CA\u903E\u6642 (10-1000ms)"},input_trans_start_sign:{zh:"\u7FFB\u8BD1\u8D77\u59CB\u6807\u8BC6",en:"Translation Start Sign",zh_TW:"\u7FFB\u8B6F\u8D77\u59CB\u6A19\u8A18"},input_trans_start_sign_help:{zh:"\u6807\u8BC6\u540E\u9762\u53EF\u4EE5\u52A0\u76EE\u6807\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1A \u201C/en \u4F60\u597D\u201D\u3001\u201C/zh hello\u201D",en:"The target language code can be added after the sign, such as: \"/en \u4F60\u597D\", \"/zh hello\"",zh_TW:"\u6A19\u8A18\u5F8C\u53EF\u52A0\u4E0A\u76EE\u6A19\u8A9E\u8A00\u4EE3\u78BC\uFF0C\u4F8B\u5982\uFF1A\u300C/en \u4F60\u597D\u300D\u3001\u300C/zh hello\u300D"},detect_lang_remote:{zh:"\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B",en:"Remote language detection",zh_TW:"\u9060\u7AEF\u8A9E\u8A00\u5075\u6E2C"},detect_lang_remote_help:{zh:"\u542F\u7528\u540E\u68C0\u6D4B\u51C6\u786E\u5EA6\u589E\u52A0\uFF0C\u4F46\u4F1A\u964D\u4F4E\u7FFB\u8BD1\u901F\u5EA6\uFF0C\u8BF7\u914C\u60C5\u5F00\u542F",en:"After enabling, the detection accuracy will increase, but it will reduce the translation speed. Please enable it as appropriate.",zh_TW:"\u555F\u7528\u5F8C\u53EF\u63D0\u5347\u5075\u6E2C\u6E96\u78BA\u5EA6\uFF0C\u4F46\u6703\u964D\u4F4E\u7FFB\u8B6F\u901F\u5EA6\uFF0C\u8ACB\u8996\u9700\u8981\u958B\u555F\u3002"},detect_lang_service:{zh:"\u8BED\u8A00\u68C0\u6D4B\u670D\u52A1",en:"Language detect service",zh_TW:"\u8A9E\u8A00\u6AA2\u6E2C\u670D\u52D9"},disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},enable:{zh:"\u542F\u7528",en:"Enable",zh_TW:"\u555F\u7528"},selection_translate:{zh:"\u5212\u8BCD\u7FFB\u8BD1",en:"Selection Translation",zh_TW:"\u5283\u8A5E\u7FFB\u8B6F"},toggle_selection_translate:{zh:"\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"Use Selection Translate",zh_TW:"\u555F\u7528\u5283\u8A5E\u7FFB\u8B6F"},trigger_tranbox_shortcut:{zh:"\u663E\u793A\u7FFB\u8BD1\u6846/\u7FFB\u8BD1\u9009\u4E2D\u6587\u5B57\u5FEB\u6377\u952E",en:"Open Translate Popup/Translate Selected Shortcut",zh_TW:"\u986F\u793A\u7FFB\u8B6F\u6846\uFF0F\u7FFB\u8B6F\u9078\u4E2D\u6587\u5B57\u5FEB\u6377\u9375"},tranbtn_offset_x:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBX\uFF08\xB1200\uFF09",en:"Translate Button Offset X (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6309\u9215\u4F4D\u79FB X\uFF08\xB1200\uFF09"},tranbtn_offset_y:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBY\uFF08\xB1200\uFF09",en:"Translate Button Offset Y (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6309\u9215\u4F4D\u79FB Y\uFF08\xB1200\uFF09"},tranbox_offset_x:{zh:"\u7FFB\u8BD1\u6846\u504F\u79FBX\uFF08\xB1200\uFF09",en:"Translate Box Offset X (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6846\u4F4D\u79FB X\uFF08\xB1200\uFF09"},tranbox_offset_y:{zh:"\u7FFB\u8BD1\u6846\u504F\u79FBY\uFF08\xB1200\uFF09",en:"Translate Box Offset Y (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6846\u4F4D\u79FB Y\uFF08\xB1200\uFF09"},translated_text:{zh:"\u8BD1\u6587",en:"Translated Text",zh_TW:"\u8B6F\u6587"},original_text:{zh:"\u539F\u6587",en:"Original Text",zh_TW:"\u539F\u6587"},favorite_words:{zh:"\u6536\u85CF\u8BCD\u6C47",en:"Favorite Words",zh_TW:"\u6536\u85CF\u8A5E\u5F59"},touch_setting:{zh:"\u89E6\u5C4F\u8BBE\u7F6E",en:"Touch Setting",zh_TW:"\u89F8\u63A7\u8A2D\u5B9A"},touch_translate_shortcut:{zh:"\u89E6\u5C4F\u7FFB\u8BD1\u5FEB\u6377\u65B9\u5F0F (\u652F\u6301\u591A\u9009)",en:"Touch Translate Shortcut (multiple supported)",zh_TW:"\u89F8\u63A7\u7FFB\u8B6F\u6377\u5F91 (\u652F\u63F4\u591A\u9078)"},touch_tap_0:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},touch_tap_2:{zh:"\u53CC\u6307\u8F7B\u89E6",en:"Two finger tap",zh_TW:"\u96D9\u6307\u8F15\u89F8"},touch_tap_3:{zh:"\u4E09\u6307\u8F7B\u89E6",en:"Three finger tap",zh_TW:"\u4E09\u6307\u8F15\u89F8"},touch_tap_4:{zh:"\u56DB\u6307\u8F7B\u89E6",en:"Four finger tap",zh_TW:"\u56DB\u6307\u8F15\u89F8"},touch_tap_5:{zh:"\u5355\u6307\u53CC\u51FB",en:"Double-click",zh_TW:"\u55AE\u6307\u96D9\u64CA"},touch_tap_6:{zh:"\u5355\u6307\u4E09\u51FB",en:"Triple-click",zh_TW:"\u55AE\u6307\u4E09\u64CA"},touch_tap_7:{zh:"\u53CC\u6307\u53CC\u51FB",en:"Two-finger double-click",zh_TW:"\u96D9\u6307\u96D9\u64CA"},translate_blacklist:{zh:"\u7981\u7528\u7FFB\u8BD1\u540D\u5355",en:"Translate Blacklist",zh_TW:"\u505C\u7528\u7FFB\u8B6F\u540D\u55AE"},disabled_orilist:{zh:"\u7981\u7528Origin\u540D\u5355",en:"Disabled Origin List",zh_TW:"\u505C\u7528 Origin \u540D\u55AE"},disabled_csplist:{zh:"\u7981\u7528CSP\u540D\u5355",en:"Disabled CSP List",zh_TW:"\u505C\u7528 CSP \u540D\u55AE"},disabled_csplist_helper:{zh:"3\u3001\u901A\u8FC7\u8C03\u6574CSP\u7B56\u7565\uFF0C\u4F7F\u5F97\u67D0\u4E9B\u9875\u9762\u80FD\u591F\u6CE8\u5165JS/CSS/Media\uFF0C\u8BF7\u8C28\u614E\u4F7F\u7528\uFF0C\u9664\u975E\u60A8\u5DF2\u77E5\u6653\u76F8\u5173\u98CE\u9669\u3002",en:"3. By adjusting the CSP policy, some pages can inject JS/CSS/Media. Please use it with caution unless you are aware of the related risks.",zh_TW:"3. \u900F\u904E\u8ABF\u6574 CSP \u653F\u7B56\uFF0C\u4F7F\u90E8\u5206\u9801\u9762\u53EF\u6CE8\u5165 JS/CSS/Media\u3002\u8ACB\u8B39\u614E\u4F7F\u7528\uFF0C\u9664\u975E\u60A8\u5DF2\u77E5\u6089\u76F8\u95DC\u98A8\u96AA\u3002"},skip_langs:{zh:"\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",en:"Disable Languages",zh_TW:"\u4E0D\u7FFB\u8B6F\u7684\u8A9E\u8A00"},skip_langs_helper:{zh:"\u6B64\u529F\u80FD\u4F9D\u8D56\u51C6\u786E\u7684\u8BED\u8A00\u68C0\u6D4B\uFF0C\u5EFA\u8BAE\u542F\u7528\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B\u3002",en:"This feature relies on accurate language detection. It is recommended to enable remote language detection.",zh_TW:"\u6B64\u529F\u80FD\u4EF0\u8CF4\u6E96\u78BA\u7684\u8A9E\u8A00\u5075\u6E2C\uFF0C\u5EFA\u8B70\u555F\u7528\u9060\u7AEF\u8A9E\u8A00\u5075\u6E2C\u3002"},context_menus:{zh:"\u53F3\u952E\u83DC\u5355",en:"Context Menus",zh_TW:"\u53F3\u9375\u9078\u55AE"},hide_context_menus:{zh:"\u9690\u85CF\u53F3\u952E\u83DC\u5355",en:"Hide Context Menus",zh_TW:"\u96B1\u85CF\u53F3\u9375\u9078\u55AE"},simple_context_menus:{zh:"\u7B80\u5355\u53F3\u952E\u83DC\u5355",en:"Simple_context_menus Context Menus",zh_TW:"\u7C21\u6613\u53F3\u9375\u9078\u55AE"},secondary_context_menus:{zh:"\u4E8C\u7EA7\u53F3\u952E\u83DC\u5355",en:"Secondary Context Menus",zh_TW:"\u6B21\u7D1A\u53F3\u9375\u9078\u55AE"},mulkeys_help:{zh:"\u652F\u6301\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\uFF0C\u8F6E\u8BE2\u8C03\u7528\u3002",en:"Supports polling calls separated by newlines or English commas \",\".",zh_TW:"\u652F\u63F4\u4EE5\u63DB\u884C\u6216\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\uFF0C\u8F2A\u8A62\u547C\u53EB\u3002"},translation_element_tag:{zh:"\u8BD1\u6587\u5143\u7D20\u6807\u7B7E",en:"Translation Element Tag",zh_TW:"\u8B6F\u6587\u5143\u7D20\u6A19\u7C64"},show_only_translations:{zh:"\u4EC5\u663E\u793A\u8BD1\u6587",en:"Show Only Translations",zh_TW:"\u50C5\u986F\u793A\u8B6F\u6587"},show_only_translations_help:{zh:"\u975E\u5B8C\u7F8E\u5B9E\u73B0\uFF0C\u67D0\u4E9B\u9875\u9762\u53EF\u80FD\u6709\u6837\u5F0F\u7B49\u95EE\u9898\u3002",en:"It is not a perfect implementation and some pages may have style issues.",zh_TW:"\u6B64\u70BA\u975E\u5B8C\u7F8E\u5BE6\u4F5C\uFF0C\u90E8\u5206\u9801\u9762\u53EF\u80FD\u51FA\u73FE\u6A23\u5F0F\u7B49\u554F\u984C\u3002"},translate_page_title:{zh:"\u662F\u5426\u7FFB\u8BD1\u9875\u9762\u6807\u9898",en:"Translate Page Title",zh_TW:"\u662F\u5426\u7FFB\u8B6F\u9801\u9762\u6A19\u984C"},more:{zh:"\u66F4\u591A",en:"More",zh_TW:"\u66F4\u591A"},less:{zh:"\u66F4\u5C11",en:"Less",zh_TW:"\u66F4\u5C11"},fixer_selector:{zh:"\u7F51\u9875\u4FEE\u590D\u9009\u62E9\u5668",en:"Fixer Selector",zh_TW:"\u7DB2\u9801\u4FEE\u5FA9\u9078\u64C7\u5668"},reg_niutrans:{zh:"\u83B7\u53D6\u5C0F\u725B\u7FFB\u8BD1\u5BC6\u94A5\u3010\u7B80\u7EA6\u7FFB\u8BD1\u4E13\u5C5E\u65B0\u7528\u6237\u6CE8\u518C\u8D60\u9001300\u4E07\u5B57\u7B26\u3011",en:"Get NiuTrans APIKey [KISS Translator Exclusive New User Registration Free 3 Million Characters]",zh_TW:"\u53D6\u5F97\u5C0F\u725B\u7FFB\u8B6F\u91D1\u9470\u3010\u7C21\u7D04\u7FFB\u8B6F\u5C08\u5C6C\u65B0\u7528\u6236\u8A3B\u518A\u8D08\u9001 300 \u842C\u5B57\u5143\u3011"},trigger_mode:{zh:"\u89E6\u53D1\u65B9\u5F0F",en:"Trigger Mode",zh_TW:"\u89F8\u767C\u65B9\u5F0F"},trigger_click:{zh:"\u70B9\u51FB\u89E6\u53D1",en:"Click Trigger",zh_TW:"\u9EDE\u64CA\u89F8\u767C"},trigger_hover:{zh:"\u9F20\u6807\u60AC\u505C\u89E6\u53D1",en:"Hover Trigger",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u89F8\u767C"},trigger_select:{zh:"\u9009\u4E2D\u89E6\u53D1",en:"Select Trigger",zh_TW:"\u9078\u53D6\u89F8\u767C"},extend_styles:{zh:"\u9644\u52A0\u6837\u5F0F",en:"Extend Styles",zh_TW:"\u9644\u52A0\u6A23\u5F0F"},custom_option:{zh:"\u81EA\u5B9A\u4E49\u9009\u9879",en:"Custom Option",zh_TW:"\u81EA\u8A02\u9078\u9805"},translate_selected_text:{zh:"\u7FFB\u8BD1\u9009\u4E2D\u6587\u5B57",en:"Translate Selected Text",zh_TW:"\u7FFB\u8B6F\u9078\u53D6\u6587\u5B57"},toggle_style:{zh:"\u5207\u6362\u6837\u5F0F",en:"Toggle Style",zh_TW:"\u5207\u63DB\u6A23\u5F0F"},open_menu:{zh:"\u6253\u5F00\u5F39\u7A97\u83DC\u5355",en:"Open Popup Menu",zh_TW:"\u958B\u555F\u5F48\u7A97\u9078\u55AE"},open_setting:{zh:"\u6253\u5F00\u8BBE\u7F6E",en:"Open Setting",zh_TW:"\u958B\u555F\u8A2D\u5B9A"},follow_selection:{zh:"\u7FFB\u8BD1\u6846\u8DDF\u968F\u9009\u4E2D\u6587\u672C",en:"Transbox Follow Selection",zh_TW:"\u7FFB\u8B6F\u6846\u8DDF\u96A8\u9078\u53D6\u6587\u5B57"},tranbox_auto_height:{zh:"\u7FFB\u8BD1\u6846\u81EA\u9002\u5E94\u9AD8\u5EA6",en:"Translation box adaptive height",zh_TW:"\u7FFB\u8B6F\u6846\u81EA\u9069\u61C9\u9AD8\u5EA6"},translate_start_hook:{zh:"\u7FFB\u8BD1\u5F00\u59CB\u94A9\u5B50\u51FD\u6570",en:"Translate Start Hook",zh_TW:"\u7FFB\u8B6F\u958B\u59CB Hook"},translate_start_hook_helper:{zh:"\u7FFB\u8BD1\u524D\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}",en:"Run before translation, input parameters are: {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}",zh_TW:"\u7FFB\u8B6F\u524D\u6642\u904B\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}"},translate_end_hook:{zh:"\u7FFB\u8BD1\u5B8C\u6210\u94A9\u5B50\u51FD\u6570",en:"Translate End Hook",zh_TW:"\u7FFB\u8B6F\u5B8C\u6210 Hook"},translate_end_hook_helper:{zh:"\u7FFB\u8BD1\u5B8C\u6210\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A ({hostNode, parentNode, nodes, wrapperNode, innerNode})",en:"Run when translation is complete, input parameters are: ({hostNode, parentNode, nodes, wrapperNode, innerNode})",zh_TW:"\u7FFB\u8B6F\u5B8C\u6210\u6642\u904B\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A ({hostNode, parentNode, nodes, wrapperNode, innerNode})"},translate_remove_hook:{zh:"\u7FFB\u8BD1\u79FB\u9664\u94A9\u5B50\u51FD\u6570",en:"Translate Removed Hook",zh_TW:"\u7FFB\u8B6F\u79FB\u9664 Hook"},translate_remove_hook_helper:{zh:"\u7FFB\u8BD1\u79FB\u9664\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A \u7FFB\u8BD1\u8282\u70B9\u3002",en:"Run when translation is removed, the input parameters are: translation node.",zh_TW:"\u79FB\u9664\u7FFB\u8B6F\u6642\u57F7\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A\u7FFB\u8B6F\u7BC0\u9EDE\u3002"},english_dict:{zh:"\u82F1\u6587\u8BCD\u5178",en:"English Dictionary",zh_TW:"\u82F1\u6587\u5B57\u5178"},english_suggest:{zh:"\u82F1\u6587\u5EFA\u8BAE",en:"English Suggest",zh_TW:"\u82F1\u6587\u5EFA\u8B70"},api_name:{zh:"\u63A5\u53E3\u540D\u79F0",en:"API Name",zh_TW:"\u4ECB\u9762\u540D\u7A31"},is_disabled:{zh:"\u662F\u5426\u7981\u7528",en:"Is Disabled",zh_TW:"\u662F\u5426\u505C\u7528"},translate_selected:{zh:"\u662F\u5426\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"If translate selected",zh_TW:"\u662F\u5426\u555F\u7528\u5283\u8A5E\u7FFB\u8B6F"},use_batch_fetch:{zh:"\u662F\u5426\u805A\u5408\u53D1\u9001\u7FFB\u8BD1\u8BF7\u6C42",en:"Whether to aggregate and send translation requests",zh_TW:"\u662F\u5426\u805A\u5408\u767C\u9001\u7FFB\u8B6F\u8ACB\u6C42"},batch_interval:{zh:"\u805A\u5408\u8BF7\u6C42\u7B49\u5F85\u65F6\u95F4(100-10000)",en:"Aggregation request waiting time (100-10000)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u7B49\u5F85\u6642\u9593(100-10000)"},batch_size:{zh:"\u805A\u5408\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570(1-100)",en:"Maximum number of paragraphs in an aggregation request (1-100)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u6700\u5927\u6BB5\u843D\u6578(1-100)"},batch_length:{zh:"\u805A\u5408\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6(1000-100000)",en:"Maximum text length for aggregation requests (1000-100000)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u6700\u5927\u6587\u5B57\u9577\u5EA6(1000-100000)"},use_context:{zh:"\u662F\u5426\u542F\u7528\u667A\u80FD\u4E0A\u4E0B\u6587",en:"Whether to enable AI context",zh_TW:"\u662F\u5426\u555F\u7528\u667A\u6167\u4E0A\u4E0B\u6587"},context_size:{zh:"\u4E0A\u4E0B\u6587\u4F1A\u8BDD\u6570\u91CF(1-20)",en:"Number of context sessions(1-20)",zh_TW:"\u4E0A\u4E0B\u6587\u6703\u8A71\u6578\u91CF(1-20)"},auto_scan_page:{zh:"\u81EA\u52A8\u626B\u63CF\u9875\u9762",en:"Auto scan page",zh_TW:"\u81EA\u52D5\u6383\u63CF\u9801\u9762"},has_rich_text:{zh:"\u542F\u7528\u5BCC\u6587\u672C\u7FFB\u8BD1",en:"Enable rich text translation",zh_TW:"\u555F\u7528\u5BCC\u6587\u672C\u7FFB\u8B6F"},has_shadowroot:{zh:"\u626B\u63CFShadowroot",en:"Scan Shadowroot",zh_TW:"\u6383\u63CFShadowroot"},mousehover_translate:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover Translation",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},use_mousehover_translation:{zh:"\u542F\u7528\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Enable mouseover translation",zh_TW:"\u555F\u7528\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},selected_translation_alert:{zh:"\u5212\u8BCD\u7FFB\u8BD1\u7684\u5F00\u542F\u548C\u5173\u95ED\u8BF7\u5230\u201C\u89C4\u5219\u8BBE\u7F6E\u201D\u91CC\u9762\u8BBE\u7F6E\u3002",en:"To turn selected translation on or off, please go to \"Rule Settings\".",zh_TW:"\u5283\u8A5E\u7FFB\u8B6F\u7684\u958B\u555F\u548C\u95DC\u9589\u8ACB\u5230\u300C\u898F\u5247\u8A2D\u5B9A\u300D\u88E1\u9762\u8A2D\u5B9A\u3002"},mousehover_key_help:{zh:"\u5F53\u5FEB\u6377\u952E\u7F6E\u7A7A\u65F6\u8868\u793A\u9F20\u6807\u60AC\u505C\u76F4\u63A5\u7FFB\u8BD1",en:"When the shortcut key is empty, it means that the mouse hovers to translate directly",zh_TW:"\u7576\u5FEB\u6377\u9375\u7F6E\u7A7A\u6642\u8868\u793A\u6ED1\u9F20\u61F8\u505C\u76F4\u63A5\u7FFB\u8B6F"},autoscan_alt:{zh:"\u81EA\u52A8\u626B\u63CF",en:"Auto Scan",zh_TW:"\u81EA\u52D5\u6383\u63CF"},shadowroot_alt:{zh:"ShadowRoot",en:"ShadowRoot",zh_TW:"ShadowRoot"},richtext_alt:{zh:"\u4FDD\u7559\u5BCC\u6587\u672C",en:"Rich Text",zh_TW:"\u4FDD\u7559\u5BCC\u6587\u672C"},transonly_alt:{zh:"\u9690\u85CF\u539F\u6587",en:"Hide Original",zh_TW:"\u96B1\u85CF\u539F\u6587"},confirm_title:{zh:"\u786E\u8BA4",en:"Confirm",zh_TW:"\u78BA\u8A8D"},confirm_message:{zh:"\u786E\u5B9A\u64CD\u4F5C\u5417\uFF1F",en:"Are you sure you want to proceed?",zh_TW:"\u78BA\u5B9A\u64CD\u4F5C\u55CE\uFF1F"},confirm_action:{zh:"\u786E\u5B9A",en:"Confirm",zh_TW:"\u78BA\u5B9A"},cancel_action:{zh:"\u53D6\u6D88",en:"Cancel",zh_TW:"\u53D6\u6D88"},pls_press_shortcut:{zh:"\u8BF7\u6309\u4E0B\u5FEB\u6377\u952E\u7EC4\u5408",en:"Please press the shortcut key combination",zh_TW:"\u8ACB\u6309\u4E0B\u5FEB\u901F\u9375\u7D44\u5408"},load_setting_err:{zh:"\u6570\u636E\u52A0\u8F7D\u51FA\u9519\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u6216\u5378\u8F7D\u540E\u91CD\u65B0\u5B89\u88C5\u3002",en:"Please press the shortcut key combination",zh_TW:"\u8ACB\u6309\u4E0B\u5FEB\u901F\u9375\u7D44\u5408"},translation_style:{zh:"\u7FFB\u8BD1\u98CE\u683C",en:"Translation style",zh_TW:"\u7FFB\u8B6F\u98A8\u683C"},placeholder:{zh:"\u5360\u4F4D\u7B26",en:"Placeholder",zh_TW:"\u4F54\u4F4D\u7B26"},tag_name:{zh:"\u5360\u4F4D\u6807\u7B7E\u540D",en:"Placeholder tag name",zh_TW:"\u4F54\u4F4D\u6A19\u540D"},system_prompt_helper:{zh:"\u5728\u672A\u5B8C\u5168\u7406\u89E3\u9ED8\u8BA4Prompt\u7684\u60C5\u51B5\u4E0B\uFF0C\u8BF7\u52FF\u968F\u610F\u4FEE\u6539\uFF0C\u5426\u5219\u53EF\u80FD\u65E0\u6CD5\u5DE5\u4F5C\u3002",en:"Do not modify the default prompt without fully understanding it, otherwise it may not work.",zh_TW:"\u5728\u672A\u5B8C\u5168\u7406\u89E3\u9810\u8A2DPrompt\u7684\u60C5\u6CC1\u4E0B\uFF0C\u8ACB\u52FF\u96A8\u610F\u4FEE\u6539\uFF0C\u5426\u5247\u53EF\u80FD\u7121\u6CD5\u904B\u4F5C\u3002"},if_pre_init:{zh:"\u662F\u5426\u9884\u521D\u59CB\u5316",en:"Whether to pre-initialize",zh_TW:"\u662F\u5426\u9810\u521D\u59CB\u5316"},export_old:{zh:"\u5BFC\u51FA\u65E7\u7248",en:"Export old version",zh_TW:"\u532F\u51FA\u820A\u7248"},favorite_words_helper:{zh:"\u5BFC\u5165\u8BCD\u6C47\u8BF7\u4F7F\u7528txt\u6587\u4EF6\uFF0C\u6BCF\u4E00\u884C\u4E00\u4E2A\u5355\u8BCD\u3002",en:"To import vocabulary, please use a txt file with one word per line.",zh_TW:"\u532F\u5165\u8A5E\u5F59\u8ACB\u4F7F\u7528txt\u6587\u4EF6\uFF0C\u6BCF\u4E00\u884C\u4E00\u500B\u55AE\u5B57\u3002"},btn_tip_click_away:{zh:"\u5931\u7126\u9690\u85CF/\u663E\u793A",en:"Loss of focus hide/show",zh_TW:"\u5931\u7126\u96B1\u85CF/\u986F\u793A"},btn_tip_follow_selection:{zh:"\u8DDF\u968F/\u56FA\u5B9A\u6A21\u5F0F",en:"Follow/Fixed Mode",zh_TW:"\u8DDF\u96A8/\u56FA\u5B9A\u6A21\u5F0F"},btn_tip_simple_style:{zh:"\u8FF7\u4F60/\u5E38\u89C4\u6A21\u5F0F",en:"Mini/Regular Mode",zh_TW:"\u8FF7\u4F60/\u5E38\u898F\u6A21\u5F0F"},api_placeholder:{zh:"\u5360\u4F4D\u7B26",en:"Placeholder",zh_TW:"\u4F54\u4F4D\u7B26"},api_placetag:{zh:"\u5360\u4F4D\u6807\u7B7E",en:"Placeholder tags",zh_TW:"\u4F54\u4F4D\u6A19"},detected_lang:{zh:"\u8BED\u8A00\u68C0\u6D4B",en:"Language detection",zh_TW:"\u8A9E\u8A00\u5075\u6E2C"},detected_result:{zh:"\u68C0\u6D4B\u7ED3\u679C",en:"Detect result",zh_TW:"\u6AA2\u6E2C\u7D50\u679C"},subtitle_translate:{zh:"\u5B57\u5E55\u7FFB\u8BD1",en:"Subtitle translation",zh_TW:"\u5B57\u5E55\u7FFB\u8B6F"},toggle_subtitle_translate:{zh:"\u542F\u7528\u5B57\u5E55\u7FFB\u8BD1",en:"Enable subtitle translation",zh_TW:"\u555F\u7528\u5B57\u5E55\u7FFB\u8B6F"},is_bilingual_view:{zh:"\u53CC\u8BED\u663E\u793A",en:"Enable bilingual display",zh_TW:"\u96D9\u8A9E\u986F\u793A"},is_skip_ad:{zh:"\u662F\u5426\u5FEB\u8FDB\u5E7F\u544A",en:"Should I fast forward to the ad?",zh_TW:"\u662F\u5426\u5FEB\u8F49\u5EE3\u544A"},background_styles:{zh:"\u80CC\u666F\u6837\u5F0F",en:"DBackground Style",zh_TW:"\u80CC\u666F\u6A23\u5F0F"},origin_styles:{zh:"\u539F\u6587\u6837\u5F0F",en:"Original style",zh_TW:"\u539F\u6587\u6A23\u5F0F"},translation_styles:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Translation style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},ai_segmentation:{zh:"AI\u667A\u80FD\u65AD\u53E5",en:"AI intelligent punctuation",zh_TW:"AI\u667A\u6167\u65B7\u53E5"},ai_chunk_length:{zh:"AI\u5904\u7406\u5207\u5272\u957F\u5EA6(200-20000)",en:"AI processing chunk length(200-20000)",zh_TW:"AI\u5904\u7406\u5207\u5272\u957F\u5EA6(200-20000)"},subtitle_helper_1:{zh:"1\u3001\u76EE\u524D\u4EC5\u652F\u6301Youtube\u684C\u9762\u7F51\u7AD9\u3002",en:"1. Currently only supports Youtube desktop website.",zh_TW:"1.\u76EE\u524D\u50C5\u652F\u63F4Youtube\u684C\u9762\u7DB2\u7AD9\uFF0C\u4E14\u50C5\u652F\u63F4\u700F\u89BD\u5668\u64F4\u5145\u529F\u80FD\u3002"},subtitle_helper_2:{zh:"2\u3001\u63D2\u4EF6\u5185\u7F6E\u57FA\u7840\u7684\u5B57\u5E55\u5408\u5E76\u3001\u65AD\u53E5\u7B97\u6CD5\uFF0C\u53EF\u6EE1\u8DB3\u5927\u90E8\u5206\u60C5\u51B5\u3002",en:"2. The plug-in has built-in basic subtitle merging and sentence segmentation algorithms, which can meet most situations.",zh_TW:"2.\u63D2\u4EF6\u5167\u5EFA\u57FA\u790E\u7684\u5B57\u5E55\u5408\u4F75\u3001\u65B7\u53E5\u6F14\u7B97\u6CD5\uFF0C\u53EF\u6EFF\u8DB3\u5927\u90E8\u5206\u60C5\u6CC1\u3002"},subtitle_helper_3:{zh:"3\u3001\u4EA6\u53EF\u4EE5\u542F\u7528AI\u667A\u80FD\u65AD\u53E5\uFF0C\u4F46\u9700\u8003\u8651\u5207\u5272\u957F\u5EA6\u53CAAI\u63A5\u53E3\u80FD\u529B\uFF0C\u53EF\u80FD\u5904\u7406\u65F6\u95F4\u4F1A\u5F88\u957F\uFF0C\u751A\u81F3\u5904\u7406\u5931\u8D25\uFF0C\u5BFC\u81F4\u65E0\u6CD5\u770B\u5230\u5B57\u5E55\u3002",en:"3. You can also enable AI intelligent segmentation, but you need to consider the segmentation length and AI interface capabilities. The processing time may be very long or even fail, resulting in the inability to see subtitles.",zh_TW:"3.\u4EA6\u53EF\u555F\u7528AI\u667A\u80FD\u65B7\u53E5\uFF0C\u4F46\u9700\u8003\u616E\u5207\u5272\u9577\u5EA6\u53CAAI\u4ECB\u9762\u80FD\u529B\uFF0C\u53EF\u80FD\u8655\u7406\u6642\u9593\u6703\u5F88\u9577\uFF0C\u751A\u81F3\u8655\u7406\u5931\u6557\uFF0C\u5C0E\u81F4\u7121\u6CD5\u770B\u5230\u5B57\u5E55\u3002"},default_styles_example:{zh:"\u9ED8\u8BA4\u6837\u5F0F\u53C2\u8003\uFF1A",en:"Default styles reference:",zh_TW:"\u8A8D\u6A23\u5F0F\u53C3\u8003\uFF1A"},subtitle_load_succeed:{zh:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u6210\u529F\uFF01",en:"Bilingual subtitles loaded successfully!",zh_TW:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u6210\u529F\uFF01"},subtitle_load_failed:{zh:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u5931\u8D25\uFF01",en:"Failed to load bilingual subtitles!",zh_TW:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u5931\u8D25\uFF01"},try_get_subtitle_data:{zh:"\u5C1D\u8BD5\u83B7\u53D6\u5B57\u5E55\u6570\u636E\uFF0C\u8BF7\u7A0D\u5019...",en:"Trying to get subtitle data, please wait...",zh_TW:"\u5C1D\u8BD5\u83B7\u53D6\u5B57\u5E55\u6570\u636E\uFF0C\u8BF7\u7A0D\u5019..."},subtitle_data_processing:{zh:"\u5B57\u5E55\u6570\u636E\u5904\u7406\u4E2D...",en:"Subtitle data processing...",zh_TW:"\u5B57\u5E55\u6570\u636E\u5904\u7406\u4E2D..."},starting_to_process_subtitle:{zh:"\u5F00\u59CB\u5904\u7406\u5B57\u5E55\u6570\u636E...",en:"Starting to process subtitle data...",zh_TW:"\u5F00\u59CB\u5904\u7406\u5B57\u5E55\u6570\u636E..."},subtitle_data_is_ready:{zh:"\u5B57\u5E55\u6570\u636E\u5DF2\u51C6\u5907\u5C31\u7EEA\uFF0C\u8BF7\u70B9\u51FBKT\u6309\u94AE\u52A0\u8F7D",en:"The subtitle data is ready, please click the KT button to load it",zh_TW:"\u5B57\u5E55\u8CC7\u6599\u5DF2\u6E96\u5099\u5C31\u7DD2\uFF0C\u8ACB\u9EDE\u64CAKT\u6309\u9215\u52A0\u8F09"},log_level:{zh:"\u65E5\u5FD7\u7EA7\u522B",en:"Log Level",zh_TW:"\u65E5\u8A8C\u7B49\u7D1A"},goto_custom_api_example:{zh:"\u70B9\u51FB\u67E5\u770B\u3010\u81EA\u5B9A\u4E49\u63A5\u53E3\u793A\u4F8B\u3011",en:"Click to view [Custom Interface Example]",zh_TW:"\u9EDE\u9078\u67E5\u770B\u3010\u81EA\u8A02\u4ECB\u9762\u7BC4\u4F8B\u3011"},split_paragraph:{zh:"\u5207\u5206\u957F\u6BB5\u843D",en:"Split long paragraph",zh_TW:"\u5207\u5206\u9577\u6BB5\u843D"},split_length:{zh:"\u5207\u5206\u957F\u5EA6 (0-10000)",en:"Segmentation length(0-10000)",zh_TW:"\u5207\u5206\u9577\u5EA6(0-10000)"},highlight_words:{zh:"\u9AD8\u4EAE\u6536\u85CF\u8BCD\u6C47",en:"Highlight favorite words",zh_TW:"\u9AD8\u4EAE\u6536\u85CF\u8A5E\u5F59"},split_disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},split_textlength:{zh:"\u6309\u7167\u957F\u5EA6\u5207\u5206",en:"Split by length",zh_TW:"\u4F9D\u9577\u5EA6\u5207\u5206"},split_punctuation:{zh:"\u6309\u7167\u53E5\u5B50\u5207\u5206",en:"Split by sentence",zh_TW:"\u6309\u7167\u53E5\u5B50\u5207\u5206"},highlight_disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},highlight_beforetrans:{zh:"\u7FFB\u8BD1\u524D\u9AD8\u4EAE",en:"Highlight before translation",zh_TW:"\u7FFB\u8B6F\u524D\u9AD8\u4EAE"},highlight_aftertrans:{zh:"\u7FFB\u8BD1\u540E\u9AD8\u4EAE",en:"Highlight after translation",zh_TW:"\u7FFB\u8B6F\u5F8C\u9AD8\u4EAE"},pagescroll_root_margin:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u63D0\u524D\u89E6\u53D1 (0-10000px)",en:"Early triggering of scroll loading (0-10000px)",zh_TW:"\u6EFE\u52D5\u8F09\u5165\u63D0\u524D\u89F8\u767C (0-10000px)"},styles_setting:{zh:"\u6837\u5F0F\u8BBE\u7F6E",en:"Style Setting",zh_TW:"\u6A23\u5F0F\u8A2D\u5B9A"},style_name:{zh:"\u6837\u5F0F\u540D\u79F0",en:"Style Name",zh_TW:"\u6A23\u5F0F\u540D\u7A31"},style_code:{zh:"\u6837\u5F0F\u4EE3\u7801",en:"Style Code",zh_TW:"\u6A23\u5F0F\u7A0B\u5F0F\u78BC"}};const newI18n=lang=>key=>{var _I18N$key;return((_I18N$key=I18N[key])===null||_I18N$key===void 0?void 0:_I18N$key[lang])||"";}; ;// CONCATENATED MODULE: ./src/config/storage.js const KV_RULES_KEY="kiss-rules_v".concat(APP_VERSION[0],".json");const storage_KV_WORDS_KEY="kiss-words.json";const storage_KV_RULES_SHARE_KEY="kiss-rules-share_v".concat(APP_VERSION[0],".json");const storage_KV_SETTING_KEY="kiss-setting_v".concat(APP_VERSION[0],".json");const KV_SALT_SYNC="KISS-Translator-SYNC";const storage_KV_SALT_SHARE="KISS-Translator-SHARE";const STOKEY_MSAUTH="".concat(APP_NAME,"_msauth");const storage_STOKEY_BDAUTH="".concat(APP_NAME,"_bdauth");const storage_STOKEY_SETTING_OLD="".concat(APP_NAME,"_setting");const storage_STOKEY_RULES_OLD="".concat(APP_NAME,"_rules");const storage_STOKEY_SETTING="".concat(APP_NAME,"_setting_v").concat(APP_VERSION[0]);const storage_STOKEY_RULES="".concat(APP_NAME,"_rules_v").concat(APP_VERSION[0]);const storage_STOKEY_WORDS="".concat(APP_NAME,"_words");const storage_STOKEY_SYNC="".concat(APP_NAME,"_sync");const storage_STOKEY_FAB="".concat(APP_NAME,"_fab");const STOKEY_TRANBOX="".concat(APP_NAME,"_tranbox");const storage_STOKEY_RULESCACHE_PREFIX="".concat(APP_NAME,"_rulescache_");const CACHE_NAME="".concat(APP_NAME,"_cache");const DEFAULT_CACHE_TIMEOUT=3600*24*7;// 缓存超时时间(7天) ;// CONCATENATED MODULE: ./src/config/url.js @@ -29753,10 +29763,11 @@ const client="userscript";const isExt=CLIENT_EXTS.includes(client);const isGm=cl * @returns */const debounce=function(func){let delay=arguments.length>1&&arguments[1]!==undefined?arguments[1]:200;let timer=null;return function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}timer&&clearTimeout(timer);timer=setTimeout(()=>{func(...args);clearTimeout(timer);timer=null;},delay);};};/** * 节流函数 - * @param {*} func - * @param {*} delay - * @returns - */const throttle=function(func){let delay=arguments.length>1&&arguments[1]!==undefined?arguments[1]:200;let timer=null;let cache=null;return function(){for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2];}if(!timer){func(...args);cache=null;timer=setTimeout(()=>{if(cache){func(...cache);cache=null;}clearTimeout(timer);timer=null;},delay);}else{cache=args;}};};/** + * @param {Function} func 要执行的函数 + * @param {number} delay 延迟时间 + * @param {object} options 选项 { leading: boolean, trailing: boolean } + * @returns {Function} + */const throttle=function(func,delay){let options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{leading:true,trailing:true};let timeoutId=null;let lastArgs=null;let lastThis=null;let result;let previous=0;function later(){previous=options.leading===false?0:Date.now();timeoutId=null;result=func.apply(lastThis,lastArgs);if(!timeoutId){lastThis=lastArgs=null;}}const throttled=function(){const now=Date.now();if(!previous&&options.leading===false){previous=now;}const remaining=delay-(now-previous);for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2];}lastArgs=args;lastThis=this;if(remaining<=0||remaining>delay){if(timeoutId){clearTimeout(timeoutId);timeoutId=null;}previous=now;result=func.apply(lastThis,lastArgs);if(!timeoutId){lastThis=lastArgs=null;}}else if(!timeoutId&&options.trailing!==false){timeoutId=setTimeout(later,remaining);}return result;};throttled.cancel=()=>{clearTimeout(timeoutId);previous=0;timeoutId=null;lastThis=lastArgs=null;};return throttled;};/** * 判断字符串全是某个字符 * @param {*} s * @param {*} c @@ -30016,7 +30027,7 @@ return fnPolyfill({fn:fetchHandle,input,init,opts});}; const MSG_GM_xmlHttpRequest="xmlHttpRequest";const MSG_GM_setValue="setValue";const MSG_GM_getValue="getValue";const MSG_GM_deleteValue="deleteValue";const MSG_GM_info="info";/** * 注入页面的脚本,请求并接受GM接口信息 * @param {*} param0 - */const injectScript=ping=>{window.APP_INFO={name:"KISS Translator",version:"2.0.5",eventName:ping};};/** + */const injectScript=ping=>{window.APP_INFO={name:"KISS Translator",version:"2.0.6",eventName:ping};};/** * 适配GM脚本 */const adaptScript=ping=>{const promiseGM=function(action,args){let timeout=arguments.length>2&&arguments[2]!==undefined?arguments[2]:5000;return new Promise((resolve,reject)=>{const pong=genEventName();const handleEvent=e=>{window.removeEventListener(pong,handleEvent);const{data,error}=e.detail;if(error){reject(new Error(error));}else{resolve(data);}};window.addEventListener(pong,handleEvent);window.dispatchEvent(new CustomEvent(ping,{detail:{action,args,pong}}));setTimeout(()=>{window.removeEventListener(pong,handleEvent);reject(new Error("timeout"));},timeout);});};window.KISS_GM={fetch:(input,init)=>promiseGM(MSG_GM_xmlHttpRequest,{input,init}),setValue:(key,val)=>promiseGM(MSG_GM_setValue,{key,val}),getValue:key=>promiseGM(MSG_GM_getValue,{key}),deleteValue:key=>promiseGM(MSG_GM_deleteValue,{key}),getInfo:async()=>{if(!window.GM_info){window.GM_info=await promiseGM(MSG_GM_info);}return window.GM_info;}};};/** * 监听并回应页面对GM接口的请求 @@ -30570,7 +30581,23 @@ sandBox:true}); ;// CONCATENATED MODULE: ./src/apis/history.js const historyMap=new Map();const MsgHistory=function(){let maxSize=arguments.length>0&&arguments[0]!==undefined?arguments[0]:DEFAULT_CONTEXT_SIZE;const messages=[];const add=function(){for(var _len=arguments.length,msgs=new Array(_len),_key=0;_key<_len;_key++){msgs[_key]=arguments[_key];}messages.push(...msgs.filter(Boolean));const extra=messages.length-maxSize;if(extra>0){messages.splice(0,extra);}};const getAll=()=>{return[...messages];};const clear=()=>{messages.length=0;};return{add,getAll,clear};};const getMsgHistory=(apiSlug,maxSize)=>{if(historyMap.has(apiSlug)){return historyMap.get(apiSlug);}const msgHistory=MsgHistory(maxSize);historyMap.set(apiSlug,msgHistory);return msgHistory;}; ;// CONCATENATED MODULE: ./src/subtitle/vtt.js -function millisecondsStringToNumber(msString){const cleanString=msString.trim();const milliseconds=parseInt(cleanString,10);if(isNaN(milliseconds)){return 0;}return milliseconds;}function parseBilingualVtt(vttText){const cleanText=vttText.replace(/^\uFEFF/,"").trim();const cues=cleanText.split(/\n\n+/);const result=[];for(const cue of cues){if(!cue.includes("-->"))continue;const lines=cue.split("\n");const timestampLineIndex=lines.findIndex(line=>line.includes("-->"));if(timestampLineIndex===-1)continue;const[startTimeString,endTimeString]=lines[timestampLineIndex].split(" --> ");const textLines=lines.slice(timestampLineIndex+1);if(startTimeString&&endTimeString&&textLines.length>0){const originalText=textLines[0].trim();const translatedText=(textLines[1]||"").trim();result.push({start:millisecondsStringToNumber(startTimeString),end:millisecondsStringToNumber(endTimeString),text:originalText,translation:translatedText});}}return result;} +/** + * 将多种格式的VTT时间戳字符串转换为毫秒数。 + * 兼容以下格式: + * - mmm (e.g., "291040") + * - MM:SS (e.g., "00:03") + * - HH:MM:SS (e.g., "01:02:03") + * - MM:SS.mmm (e.g., "00:07.980") + * - HH:MM:SS.mmm (e.g., "01:02:03.456") + * - MM:SS:mmm (e.g., "00:07:536") + * + * @param {string} timestamp - VTT时间戳字符串. + * @returns {number} - 转换后的总毫秒数. + */function parseTimestampToMilliseconds(timestamp){const ts=timestamp.trim();if(!ts.includes(":")&&!ts.includes(".")){return parseInt(ts,10)||0;}let timePart=ts;let msPart="0";if(ts.includes(".")){const parts=ts.split(".");timePart=parts[0];msPart=parts[1];}else{const colonParts=ts.split(":");if(colonParts.length>1&&colonParts[colonParts.length-1].length===3){msPart=colonParts.pop();timePart=colonParts.join(":");}}const timeComponents=timePart.split(":").map(p=>parseInt(p,10)||0);let hours=0,minutes=0,seconds=0;if(timeComponents.length===3){[hours,minutes,seconds]=timeComponents;}else if(timeComponents.length===2){[minutes,seconds]=timeComponents;}else if(timeComponents.length===1){[seconds]=timeComponents;}const milliseconds=parseInt(msPart.padEnd(3,"0"),10)||0;return(hours*3600+minutes*60+seconds)*1000+milliseconds;}/** + * 解析包含双语字幕的VTT文件内容。 + * @param {string} vttText - VTT文件的文本内容。 + * @returns {Array} 一个包含字幕对象的数组,每个对象包含 start, end, text, 和 translation. + */function parseBilingualVtt(vttText){const cleanText=vttText.replace(/^\uFEFF/,"").trim();if(!cleanText){return[];}const cues=cleanText.split(/\n\n+/);const result=[];const startIndex=cues[0].toUpperCase().includes("WEBVTT")?1:0;for(let i=startIndex;i"))continue;const lines=cue.split("\n");const timestampLineIndex=lines.findIndex(line=>line.includes("-->"));if(timestampLineIndex===-1)continue;const[startTimeString,endTimeString]=lines[timestampLineIndex].split("-->");const textLines=lines.slice(timestampLineIndex+1);if(startTimeString&&endTimeString&&textLines.length>0){var _textLines$,_textLines$2;const originalText=((_textLines$=textLines[0])===null||_textLines$===void 0?void 0:_textLines$.trim())||"";const translatedText=((_textLines$2=textLines[1])===null||_textLines$2===void 0?void 0:_textLines$2.trim())||"";result.push({start:parseTimestampToMilliseconds(startTimeString),end:parseTimestampToMilliseconds(endTimeString),text:originalText,translation:translatedText});}}return result;} ;// CONCATENATED MODULE: ./src/apis/trans.js const keyMap=new Map();const urlMap=new Map();// 轮询key/url const keyPick=function(apiSlug){var _cacheMap$get;let key=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";let cacheMap=arguments.length>2?arguments[2]:undefined;const keys=key.split(/\n|,/).map(item=>item.trim()).filter(Boolean);if(keys.length===0){return"";}const preIndex=(_cacheMap$get=cacheMap.get(apiSlug))!==null&&_cacheMap$get!==void 0?_cacheMap$get:-1;const curIndex=(preIndex+1)%keys.length;cacheMap.set(apiSlug,curIndex);return keys[curIndex];};const genSystemPrompt=_ref=>{let{systemPrompt,from,to}=_ref;return systemPrompt.replaceAll(INPUT_PLACE_FROM,from).replaceAll(INPUT_PLACE_TO,to);};const genUserPrompt=_ref2=>{let{nobatchUserPrompt,useBatchFetch,tone,glossary={},from,to,texts,docInfo}=_ref2;if(useBatchFetch){return JSON.stringify({targetLanguage:to,title:docInfo.title,description:docInfo.description,segments:texts.map((text,i)=>({id:i,text})),glossary,tone});}return nobatchUserPrompt.replaceAll(INPUT_PLACE_FROM,from).replaceAll(INPUT_PLACE_TO,to).replaceAll(INPUT_PLACE_TEXT,texts[0]);};const parseAIRes=function(raw){let useBatchFetch=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;if(!raw){return[];}if(!useBatchFetch){return[[raw]];}try{const jsonString=extractJson(raw);if(!jsonString)return[];const data=JSON.parse(jsonString);if(Array.isArray(data.translations)){// todo: 考虑序号id可能会打乱 @@ -30598,7 +30625,7 @@ stream:false};const headers={"Content-type":"application/json"};if(key){headers. */const genTransReq=async _ref21=>{let{reqHook,...args}=_ref21;const{apiType,apiSlug,key,systemPrompt,// userPrompt, nobatchPrompt=defaultNobatchPrompt,nobatchUserPrompt=defaultNobatchUserPrompt,useBatchFetch,from,to,texts,docInfo,glossary,customHeader,customBody,events}=args;if(API_SPE_TYPES.mulkeys.has(apiType)){args.key=keyPick(apiSlug,key,keyMap);}if(apiType===OPT_TRANS_DEEPLX){args.url=keyPick(apiSlug,args.url,urlMap);}if(API_SPE_TYPES.ai.has(apiType)){args.systemPrompt=genSystemPrompt({systemPrompt:useBatchFetch?systemPrompt:nobatchPrompt,from,to});args.userPrompt=!!events?JSON.stringify(events):genUserPrompt({nobatchUserPrompt,useBatchFetch,from,to,texts,docInfo,glossary});}const{url="",body=null,headers={},userMsg=null,method="POST"}=genReqFuncs[apiType](args);// 合并用户自定义headers和body if(customHeader!==null&&customHeader!==void 0&&customHeader.trim()){Object.assign(headers,parseJsonObj(customHeader));}if(customBody!==null&&customBody!==void 0&&customBody.trim()){Object.assign(body,parseJsonObj(customBody));}// 执行 request hook -if(reqHook!==null&&reqHook!==void 0&&reqHook.trim()&&!events){try{interpreter.run("exports.reqHook = ".concat(reqHook));const hookResult=await interpreter.exports.reqHook({...args,defaultSystemPrompt: defaultSystemPrompt,defaultSubtitlePrompt: defaultSubtitlePrompt},{url,body,headers,userMsg,method});if(hookResult&&hookResult.url){return genInit(hookResult);}}catch(err){log_kissLog("run req hook",err);}}return genInit({url,body,headers,userMsg,method});};/** +if(reqHook!==null&&reqHook!==void 0&&reqHook.trim()&&!events){try{interpreter.run("exports.reqHook = ".concat(reqHook));const hookResult=await interpreter.exports.reqHook({...args,defaultSystemPrompt: defaultSystemPrompt,defaultSubtitlePrompt: defaultSubtitlePrompt,defaultNobatchPrompt: defaultNobatchPrompt,defaultNobatchUserPrompt: defaultNobatchUserPrompt},{url,body,headers,userMsg,method});if(hookResult&&hookResult.url){return genInit(hookResult);}}catch(err){log_kissLog("run req hook",err);}}return genInit({url,body,headers,userMsg,method});};/** * 解析翻译接口返回数据 * @param {*} res * @param {*} param3 @@ -30707,7 +30734,7 @@ keyfrom:"webdict"});const init={headers:{accept:"application/json, text/plain, * * @param {*} param0 * @returns */const apiTranslate=async _ref2=>{let{text,fromLang="auto",toLang,apiSetting=DEFAULT_API_SETTING,docInfo={},glossary={},useCache=true,usePool=true}=_ref2;if(!text){throw new Error("The text cannot be empty.");}const{apiType,apiSlug,useBatchFetch}=apiSetting;const langMap=OPT_LANGS_TO_SPEC[apiType]||OPT_LANGS_SPEC_DEFAULT;const from=langMap.get(fromLang);const to=langMap.get(toLang);if(!to){throw new Error("The target lang: ".concat(toLang," not support"));}// todo: 优化缓存失效因素 -const[v1,v2]="2.0.5".split(".");const cacheOpts={apiSlug,text,fromLang,toLang,version:[v1,v2].join(".")};const cacheInput="".concat(URL_CACHE_TRAN,"?").concat(query_string.stringify(cacheOpts));// 查询缓存数据 +const[v1,v2]="2.0.6".split(".");const cacheOpts={apiSlug,text,fromLang,toLang,version:[v1,v2].join(".")};const cacheInput="".concat(URL_CACHE_TRAN,"?").concat(query_string.stringify(cacheOpts));// 查询缓存数据 if(useCache){const cache=await getHttpCachePolyfill(cacheInput);if(cache!==null&&cache!==void 0&&cache.trText){return cache;}}// 请求接口数据 let tranlation=[];if(apiType===OPT_TRANS_BUILTINAI){tranlation=await apiBuiltinAITranslate({text,from,to,apiSetting});}else if(useBatchFetch&&API_SPE_TYPES.batch.has(apiType)){const{apiSlug,batchInterval,batchSize,batchLength}=apiSetting;const key="".concat(apiSlug,"_").concat(fromLang,"_").concat(toLang);const queue=getBatchQueue(key,handleTranslate,{batchInterval,batchSize,batchLength});tranlation=await queue.addTask(text,{from,to,fromLang,toLang,langMap,docInfo,glossary,apiSetting,usePool});}else{[tranlation]=await handleTranslate([text],{from,to,fromLang,toLang,langMap,docInfo,glossary,apiSetting,usePool});}let trText="";let srLang="";let srCode="";if(Array.isArray(tranlation)){[trText,srLang=""]=tranlation;if(srLang){srCode=OPT_LANGS_TO_CODE[apiType].get(srLang)||"";}}else if(typeof tranlation==="string"){trText=tranlation;}if(!trText){throw new Error("tanslate api got empty trtext");}const isSame=fromLang==="auto"&&srLang===to;// 插入缓存 if(useCache){putHttpCachePolyfill(cacheInput,null,{trText,isSame,srLang,srCode});}return{trText,srLang,srCode,isSame};};// 字幕处理/翻译 @@ -33547,7 +33574,7 @@ var n = {}; return t.length === e && "." !== t && ".." !== t; }; }, - te = "object" === ("undefined" == typeof process ? "undefined" : Nt(process)) && process ? "object" === Nt(({"NODE_ENV":"production","PUBLIC_URL":"","WDS_SOCKET_HOST":undefined,"WDS_SOCKET_PATH":undefined,"WDS_SOCKET_PORT":undefined,"FAST_REFRESH":true,"REACT_APP_CLIENT":"userscript","REACT_APP_NAME":"KISS Translator","REACT_APP_NAME_CN":"简约翻译","REACT_APP_VERSION":"2.0.5","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js"})) && ({"NODE_ENV":"production","PUBLIC_URL":"","WDS_SOCKET_HOST":undefined,"WDS_SOCKET_PATH":undefined,"WDS_SOCKET_PORT":undefined,"FAST_REFRESH":true,"REACT_APP_CLIENT":"userscript","REACT_APP_NAME":"KISS Translator","REACT_APP_NAME_CN":"简约翻译","REACT_APP_VERSION":"2.0.5","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js"}) && ({"NODE_ENV":"production","PUBLIC_URL":"","WDS_SOCKET_HOST":undefined,"WDS_SOCKET_PATH":undefined,"WDS_SOCKET_PORT":undefined,"FAST_REFRESH":true,"REACT_APP_CLIENT":"userscript","REACT_APP_NAME":"KISS Translator","REACT_APP_NAME_CN":"简约翻译","REACT_APP_VERSION":"2.0.5","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js"}).__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix"; + te = "object" === ("undefined" == typeof process ? "undefined" : Nt(process)) && process ? "object" === Nt(({"NODE_ENV":"production","PUBLIC_URL":"","WDS_SOCKET_HOST":undefined,"WDS_SOCKET_PATH":undefined,"WDS_SOCKET_PORT":undefined,"FAST_REFRESH":true,"REACT_APP_CLIENT":"userscript","REACT_APP_NAME":"KISS Translator","REACT_APP_NAME_CN":"简约翻译","REACT_APP_VERSION":"2.0.6","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js"})) && ({"NODE_ENV":"production","PUBLIC_URL":"","WDS_SOCKET_HOST":undefined,"WDS_SOCKET_PATH":undefined,"WDS_SOCKET_PORT":undefined,"FAST_REFRESH":true,"REACT_APP_CLIENT":"userscript","REACT_APP_NAME":"KISS Translator","REACT_APP_NAME_CN":"简约翻译","REACT_APP_VERSION":"2.0.6","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js"}) && ({"NODE_ENV":"production","PUBLIC_URL":"","WDS_SOCKET_HOST":undefined,"WDS_SOCKET_PATH":undefined,"WDS_SOCKET_PORT":undefined,"FAST_REFRESH":true,"REACT_APP_CLIENT":"userscript","REACT_APP_NAME":"KISS Translator","REACT_APP_NAME_CN":"简约翻译","REACT_APP_VERSION":"2.0.6","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js"}).__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix"; It.sep = "win32" === te ? "\\" : "/"; var ee = Symbol("globstar **"); It.GLOBSTAR = ee; @@ -35345,40 +35372,23 @@ return;}let{updateAt=0,syncAt=0}=syncMeta[key]||{};if(syncAt===0){updateAt=0;// * @returns */const syncSettingAndRules=async()=>{await syncSetting();await syncRules();await syncWords();};const trySyncSettingAndRules=async()=>{await trySyncSetting();await trySyncRules();await trySyncWords();}; ;// CONCATENATED MODULE: ./src/libs/rules.js -// import { FIXER_ALL } from "./webfix"; /** * 根据href匹配规则 * @param {*} rules * @param {string} href * @returns - */const matchRule=async(href,_ref)=>{let{injectRules,subrulesList}=_ref;const rules=await getRulesWithDefault();if(injectRules){try{const selectedSub=subrulesList.find(item=>item.selected);if(selectedSub!==null&&selectedSub!==void 0&&selectedSub.url){const subRules=await loadOrFetchSubRules(selectedSub.url);rules.splice(-1,0,...subRules);}}catch(err){log_kissLog("load injectRules",err);}}const rule=rules.find(r=>r.pattern.split(",").some(p=>isMatch(href,p.trim())));const globalRule={...GLOBLA_RULE,...(rules.find(r=>r.pattern===GLOBAL_KEY)||{})};if(!rule){return globalRule;}["selector","keepSelector","rootsSelector","ignoreSelector","terms","aiTerms","termsStyle","highlightStyle","selectStyle","parentStyle","grandStyle","injectJs",// "injectCss", -// "fixerSelector", + */const matchRule=async(href,_ref)=>{let{injectRules,subrulesList}=_ref;const rules=await getRulesWithDefault();if(injectRules){try{const selectedSub=subrulesList.find(item=>item.selected);if(selectedSub!==null&&selectedSub!==void 0&&selectedSub.url){const subRules=await loadOrFetchSubRules(selectedSub.url);rules.splice(-1,0,...subRules);}}catch(err){log_kissLog("load injectRules",err);}}const rule=rules.find(r=>r.pattern.split(",").some(p=>isMatch(href,p.trim())));const globalRule={...GLOBLA_RULE,...(rules.find(r=>r.pattern===GLOBAL_KEY)||{})};if(!rule){return globalRule;}["selector","keepSelector","rootsSelector","ignoreSelector","terms","aiTerms","termsStyle","highlightStyle","textExtStyle","selectStyle","parentStyle","grandStyle","injectJs",// "injectCss", "transStartHook","transEndHook"// "transRemoveHook", -].forEach(key=>{var _rule$key;if(!((_rule$key=rule[key])!==null&&_rule$key!==void 0&&_rule$key.trim())){rule[key]=globalRule[key];}});["apiSlug","fromLang","toLang","transOpen","transOnly",// "transTiming", -"autoScan","hasRichText","hasShadowroot","transTag","transTitle",// "detectRemote", -// "fixerFunc", -"splitParagraph","highlightWords"].forEach(key=>{if(!rule[key]||rule[key]===GLOBAL_KEY){rule[key]=globalRule[key];}});["splitLength"].forEach(key=>{if(!rule[key]){rule[key]=globalRule[key];}});// if (!rule.skipLangs || rule.skipLangs.length === 0) { -// rule.skipLangs = globalRule.skipLangs; -// } -if(!rule.textStyle||rule.textStyle===GLOBAL_KEY){rule.textStyle=globalRule.textStyle;rule.bgColor=globalRule.bgColor;rule.textDiyStyle=globalRule.textDiyStyle;}else{var _rule$bgColor,_rule$textDiyStyle;rule.bgColor=((_rule$bgColor=rule.bgColor)===null||_rule$bgColor===void 0?void 0:_rule$bgColor.trim())||globalRule.bgColor;rule.textDiyStyle=((_rule$textDiyStyle=rule.textDiyStyle)===null||_rule$textDiyStyle===void 0?void 0:_rule$textDiyStyle.trim())||globalRule.textDiyStyle;}return rule;};/** +].forEach(key=>{var _rule$key;if(!((_rule$key=rule[key])!==null&&_rule$key!==void 0&&_rule$key.trim())){rule[key]=globalRule[key];}});["apiSlug","fromLang","toLang","transOpen","transOnly","autoScan","hasRichText","hasShadowroot","transTag","transTitle","splitParagraph","highlightWords","textStyle"].forEach(key=>{if(!rule[key]||rule[key]===GLOBAL_KEY){rule[key]=globalRule[key];}});["splitLength"].forEach(key=>{if(!rule[key]){rule[key]=globalRule[key];}});return rule;};/** * 检查过滤rules * @param {*} rules * @returns - */const checkRules=rules=>{if(type(rules)==="string"){rules=JSON.parse(rules);}if(type(rules)!=="array"){throw new Error("data error");}const fromLangs=OPT_LANGS_FROM.map(item=>item[0]);const toLangs=OPT_LANGS_TO.map(item=>item[0]);const patternSet=new Set();rules=rules.filter(rule=>type(rule)==="object").filter(_ref2=>{let{pattern}=_ref2;if(type(pattern)!=="string"||patternSet.has(pattern.trim())){return false;}patternSet.add(pattern.trim());return true;}).map(_ref3=>{let{pattern,selector,keepSelector,rootsSelector,ignoreSelector,terms,aiTerms,termsStyle,highlightStyle,selectStyle,parentStyle,grandStyle,injectJs,// injectCss, -apiSlug,fromLang,toLang,textStyle,transOpen,bgColor,textDiyStyle,transOnly,autoScan,hasRichText,hasShadowroot,// transTiming, -transTag,transTitle,// detectRemote, -// skipLangs, -// fixerSelector, -// fixerFunc, -transStartHook,transEndHook,// transRemoveHook, -splitParagraph,splitLength,highlightWords}=_ref3;return{pattern:pattern.trim(),selector:type(selector)==="string"?selector:"",keepSelector:type(keepSelector)==="string"?keepSelector:"",rootsSelector:type(rootsSelector)==="string"?rootsSelector:"",ignoreSelector:type(ignoreSelector)==="string"?ignoreSelector:"",terms:type(terms)==="string"?terms:"",aiTerms:type(aiTerms)==="string"?aiTerms:"",termsStyle:type(termsStyle)==="string"?termsStyle:"",highlightStyle:type(highlightStyle)==="string"?highlightStyle:"",selectStyle:type(selectStyle)==="string"?selectStyle:"",parentStyle:type(parentStyle)==="string"?parentStyle:"",grandStyle:type(grandStyle)==="string"?grandStyle:"",injectJs:type(injectJs)==="string"?injectJs:"",// injectCss: type(injectCss) === "string" ? injectCss : "", -bgColor:type(bgColor)==="string"?bgColor:"",textDiyStyle:type(textDiyStyle)==="string"?textDiyStyle:"",apiSlug:type(apiSlug)==="string"&&apiSlug.trim()!==""?apiSlug.trim():GLOBAL_KEY,fromLang:matchValue([GLOBAL_KEY,...fromLangs],fromLang),toLang:matchValue([GLOBAL_KEY,...toLangs],toLang),textStyle:matchValue([GLOBAL_KEY,...OPT_STYLE_ALL],textStyle),transOpen:matchValue([GLOBAL_KEY,"true","false"],transOpen),transOnly:matchValue([GLOBAL_KEY,"true","false"],transOnly),autoScan:matchValue([GLOBAL_KEY,"true","false"],autoScan),hasRichText:matchValue([GLOBAL_KEY,"true","false"],hasRichText),hasShadowroot:matchValue([GLOBAL_KEY,"true","false"],hasShadowroot),// transTiming: matchValue([GLOBAL_KEY, ...OPT_TIMING_ALL], transTiming), -transTag:matchValue([GLOBAL_KEY,"span","font"],transTag),transTitle:matchValue([GLOBAL_KEY,"true","false"],transTitle),// detectRemote: matchValue([GLOBAL_KEY, "true", "false"], detectRemote), -// skipLangs: type(skipLangs) === "array" ? skipLangs : [], -// fixerSelector: type(fixerSelector) === "string" ? fixerSelector : "", -transStartHook:type(transStartHook)==="string"?transStartHook:"",transEndHook:type(transEndHook)==="string"?transEndHook:"",// transRemoveHook: + */const checkRules=rules=>{if(type(rules)==="string"){rules=JSON.parse(rules);}if(type(rules)!=="array"){throw new Error("data error");}const fromLangs=OPT_LANGS_FROM.map(item=>item[0]);const toLangs=OPT_LANGS_TO.map(item=>item[0]);const patternSet=new Set();rules=rules.filter(rule=>type(rule)==="object").filter(_ref2=>{let{pattern}=_ref2;if(type(pattern)!=="string"||patternSet.has(pattern.trim())){return false;}patternSet.add(pattern.trim());return true;}).map(_ref3=>{let{pattern,selector,keepSelector,rootsSelector,ignoreSelector,terms,aiTerms,termsStyle,highlightStyle,textExtStyle,selectStyle,parentStyle,grandStyle,injectJs,// injectCss, +apiSlug,fromLang,toLang,textStyle,transOpen,transOnly,autoScan,hasRichText,hasShadowroot,transTag,transTitle,transStartHook,transEndHook,// transRemoveHook, +splitParagraph,splitLength,highlightWords}=_ref3;return{pattern:pattern.trim(),selector:type(selector)==="string"?selector:"",keepSelector:type(keepSelector)==="string"?keepSelector:"",rootsSelector:type(rootsSelector)==="string"?rootsSelector:"",ignoreSelector:type(ignoreSelector)==="string"?ignoreSelector:"",terms:type(terms)==="string"?terms:"",aiTerms:type(aiTerms)==="string"?aiTerms:"",termsStyle:type(termsStyle)==="string"?termsStyle:"",highlightStyle:type(highlightStyle)==="string"?highlightStyle:"",textExtStyle:type(textExtStyle)==="string"?textExtStyle:"",selectStyle:type(selectStyle)==="string"?selectStyle:"",parentStyle:type(parentStyle)==="string"?parentStyle:"",grandStyle:type(grandStyle)==="string"?grandStyle:"",injectJs:type(injectJs)==="string"?injectJs:"",// injectCss: type(injectCss) === "string" ? injectCss : "", +apiSlug:type(apiSlug)==="string"&&apiSlug.trim()!==""?apiSlug.trim():GLOBAL_KEY,fromLang:matchValue([GLOBAL_KEY,...fromLangs],fromLang),toLang:matchValue([GLOBAL_KEY,...toLangs],toLang),// textStyle: matchValue([GLOBAL_KEY, ...OPT_STYLE_ALL], textStyle), +textStyle:type(textStyle)==="string"&&textStyle.trim()!==""?textStyle.trim():GLOBAL_KEY,transOpen:matchValue([GLOBAL_KEY,"true","false"],transOpen),transOnly:matchValue([GLOBAL_KEY,"true","false"],transOnly),autoScan:matchValue([GLOBAL_KEY,"true","false"],autoScan),hasRichText:matchValue([GLOBAL_KEY,"true","false"],hasRichText),hasShadowroot:matchValue([GLOBAL_KEY,"true","false"],hasShadowroot),transTag:matchValue([GLOBAL_KEY,"span","font"],transTag),transTitle:matchValue([GLOBAL_KEY,"true","false"],transTitle),transStartHook:type(transStartHook)==="string"?transStartHook:"",transEndHook:type(transEndHook)==="string"?transEndHook:"",// transRemoveHook: // type(transRemoveHook) === "string" ? transRemoveHook : "", -// fixerFunc: matchValue([GLOBAL_KEY, ...FIXER_ALL], fixerFunc), splitParagraph:matchValue([GLOBAL_KEY,...OPT_SPLIT_PARAGRAPH_ALL],splitParagraph),splitLength:Number.isInteger(splitLength)?splitLength:0,highlightWords:matchValue([GLOBAL_KEY,...OPT_HIGHLIGHT_WORDS_ALL],highlightWords)};});return rules;};/** * 保存或更新rule * @param {*} curRule @@ -35394,7 +35404,7 @@ splitParagraph:matchValue([GLOBAL_KEY,...OPT_SPLIT_PARAGRAPH_ALL],splitParagraph /** * @class BilingualSubtitleManager * @description 负责在视频上显示和翻译字幕的核心逻辑 - */var _videoEl=/*#__PURE__*/_classPrivateFieldKey("videoEl");var _formattedSubtitles=/*#__PURE__*/_classPrivateFieldKey("formattedSubtitles");var _captionWindowEl=/*#__PURE__*/_classPrivateFieldKey("captionWindowEl");var _paperEl=/*#__PURE__*/_classPrivateFieldKey("paperEl");var _currentSubtitleIndex=/*#__PURE__*/_classPrivateFieldKey("currentSubtitleIndex");var _preTranslateSeconds=/*#__PURE__*/_classPrivateFieldKey("preTranslateSeconds");var _setting=/*#__PURE__*/_classPrivateFieldKey("setting");var _isAdPlaying=/*#__PURE__*/_classPrivateFieldKey("isAdPlaying");var _createCaptionWindow=/*#__PURE__*/_classPrivateFieldKey("createCaptionWindow");var _enableDragging=/*#__PURE__*/_classPrivateFieldKey("enableDragging");var _attachEventListeners=/*#__PURE__*/_classPrivateFieldKey("attachEventListeners");var _removeEventListeners=/*#__PURE__*/_classPrivateFieldKey("removeEventListeners");var _findSubtitleIndexForTime=/*#__PURE__*/_classPrivateFieldKey("findSubtitleIndexForTime");var _updateCaptionDisplay=/*#__PURE__*/_classPrivateFieldKey("updateCaptionDisplay");var _triggerTranslations=/*#__PURE__*/_classPrivateFieldKey("triggerTranslations");var _translateAndStore=/*#__PURE__*/_classPrivateFieldKey("translateAndStore");class BilingualSubtitleManager{/** + */var _videoEl=/*#__PURE__*/_classPrivateFieldKey("videoEl");var _formattedSubtitles=/*#__PURE__*/_classPrivateFieldKey("formattedSubtitles");var _captionWindowEl=/*#__PURE__*/_classPrivateFieldKey("captionWindowEl");var _paperEl=/*#__PURE__*/_classPrivateFieldKey("paperEl");var _currentSubtitleIndex=/*#__PURE__*/_classPrivateFieldKey("currentSubtitleIndex");var _preTranslateSeconds=/*#__PURE__*/_classPrivateFieldKey("preTranslateSeconds");var _throttleSeconds=/*#__PURE__*/_classPrivateFieldKey("throttleSeconds");var _setting=/*#__PURE__*/_classPrivateFieldKey("setting");var _isAdPlaying=/*#__PURE__*/_classPrivateFieldKey("isAdPlaying");var _throttledTriggerTranslations=/*#__PURE__*/_classPrivateFieldKey("throttledTriggerTranslations");var _createCaptionWindow=/*#__PURE__*/_classPrivateFieldKey("createCaptionWindow");var _enableDragging=/*#__PURE__*/_classPrivateFieldKey("enableDragging");var _attachEventListeners=/*#__PURE__*/_classPrivateFieldKey("attachEventListeners");var _removeEventListeners=/*#__PURE__*/_classPrivateFieldKey("removeEventListeners");var _findSubtitleIndexForTime=/*#__PURE__*/_classPrivateFieldKey("findSubtitleIndexForTime");var _updateCaptionDisplay=/*#__PURE__*/_classPrivateFieldKey("updateCaptionDisplay");var _triggerTranslations=/*#__PURE__*/_classPrivateFieldKey("triggerTranslations");var _translateAndStore=/*#__PURE__*/_classPrivateFieldKey("translateAndStore");class BilingualSubtitleManager{/** * @param {object} options * @param {HTMLVideoElement} options.videoEl - 页面上的 video 元素。 * @param {Array} options.formattedSubtitles - 已格式化好的字幕数组。 @@ -35420,20 +35430,20 @@ splitParagraph:matchValue([GLOBAL_KEY,...OPT_SPLIT_PARAGRAPH_ALL],splitParagraph * 为指定的元素启用垂直拖动功能。 */Object.defineProperty(this,_enableDragging,{value:_enableDragging2});/** * 创建并配置用于显示字幕的 DOM 元素。 - */Object.defineProperty(this,_createCaptionWindow,{value:_createCaptionWindow2});Object.defineProperty(this,_videoEl,{writable:true,value:void 0});Object.defineProperty(this,_formattedSubtitles,{writable:true,value:[]});Object.defineProperty(this,_captionWindowEl,{writable:true,value:null});Object.defineProperty(this,_paperEl,{writable:true,value:null});Object.defineProperty(this,_currentSubtitleIndex,{writable:true,value:-1});Object.defineProperty(this,_preTranslateSeconds,{writable:true,value:100});Object.defineProperty(this,_setting,{writable:true,value:{}});Object.defineProperty(this,_isAdPlaying,{writable:true,value:false});_classPrivateFieldBase(this,_setting)[_setting]=setting;_classPrivateFieldBase(this,_videoEl)[_videoEl]=videoEl;_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles]=formattedSubtitles;this.onTimeUpdate=this.onTimeUpdate.bind(this);this.onSeek=this.onSeek.bind(this);}/** + */Object.defineProperty(this,_createCaptionWindow,{value:_createCaptionWindow2});Object.defineProperty(this,_videoEl,{writable:true,value:void 0});Object.defineProperty(this,_formattedSubtitles,{writable:true,value:[]});Object.defineProperty(this,_captionWindowEl,{writable:true,value:null});Object.defineProperty(this,_paperEl,{writable:true,value:null});Object.defineProperty(this,_currentSubtitleIndex,{writable:true,value:-1});Object.defineProperty(this,_preTranslateSeconds,{writable:true,value:90});Object.defineProperty(this,_throttleSeconds,{writable:true,value:30});Object.defineProperty(this,_setting,{writable:true,value:{}});Object.defineProperty(this,_isAdPlaying,{writable:true,value:false});Object.defineProperty(this,_throttledTriggerTranslations,{writable:true,value:void 0});_classPrivateFieldBase(this,_setting)[_setting]=setting;_classPrivateFieldBase(this,_videoEl)[_videoEl]=videoEl;_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles]=formattedSubtitles;this.onTimeUpdate=this.onTimeUpdate.bind(this);this.onSeek=this.onSeek.bind(this);_classPrivateFieldBase(this,_throttledTriggerTranslations)[_throttledTriggerTranslations]=throttle(_classPrivateFieldBase(this,_triggerTranslations)[_triggerTranslations].bind(this),_classPrivateFieldBase(this,_throttleSeconds)[_throttleSeconds]*1000);}/** * 启动字幕显示和翻译。 */start(){if(_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles].length===0){logger.warn("Bilingual Subtitles: No subtitles to display.");return;}logger.info("Bilingual Subtitle Manager: Starting...");_classPrivateFieldBase(this,_createCaptionWindow)[_createCaptionWindow]();_classPrivateFieldBase(this,_attachEventListeners)[_attachEventListeners]();this.onTimeUpdate();}/** * 销毁实例,清理资源。 - */destroy(){var _classPrivateFieldLoo,_classPrivateFieldLoo2,_classPrivateFieldLoo3;logger.info("Bilingual Subtitle Manager: Destroying...");_classPrivateFieldBase(this,_removeEventListeners)[_removeEventListeners]();(_classPrivateFieldLoo=_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl])===null||_classPrivateFieldLoo===void 0?void 0:(_classPrivateFieldLoo2=_classPrivateFieldLoo.parentElement)===null||_classPrivateFieldLoo2===void 0?void 0:(_classPrivateFieldLoo3=_classPrivateFieldLoo2.parentElement)===null||_classPrivateFieldLoo3===void 0?void 0:_classPrivateFieldLoo3.remove();_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles]=[];}/** + */destroy(){var _classPrivateFieldLoo,_classPrivateFieldLoo2,_classPrivateFieldLoo3,_classPrivateFieldLoo4;logger.info("Bilingual Subtitle Manager: Destroying...");_classPrivateFieldBase(this,_removeEventListeners)[_removeEventListeners]();(_classPrivateFieldLoo=_classPrivateFieldBase(this,_throttledTriggerTranslations)[_throttledTriggerTranslations])===null||_classPrivateFieldLoo===void 0?void 0:_classPrivateFieldLoo.cancel();(_classPrivateFieldLoo2=_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl])===null||_classPrivateFieldLoo2===void 0?void 0:(_classPrivateFieldLoo3=_classPrivateFieldLoo2.parentElement)===null||_classPrivateFieldLoo3===void 0?void 0:(_classPrivateFieldLoo4=_classPrivateFieldLoo3.parentElement)===null||_classPrivateFieldLoo4===void 0?void 0:_classPrivateFieldLoo4.remove();_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles]=[];}/** * 更新广告播放状态。 */setIsAdPlaying(isPlaying){_classPrivateFieldBase(this,_isAdPlaying)[_isAdPlaying]=isPlaying;this.onTimeUpdate();}/** * 视频播放时间更新时的回调,负责更新字幕和触发预翻译。 - */onTimeUpdate(){const currentTimeMs=_classPrivateFieldBase(this,_videoEl)[_videoEl].currentTime*1000;const subtitleIndex=_classPrivateFieldBase(this,_findSubtitleIndexForTime)[_findSubtitleIndexForTime](currentTimeMs);if(subtitleIndex!==_classPrivateFieldBase(this,_currentSubtitleIndex)[_currentSubtitleIndex]){_classPrivateFieldBase(this,_currentSubtitleIndex)[_currentSubtitleIndex]=subtitleIndex;const subtitle=subtitleIndex!==-1?_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles][subtitleIndex]:null;_classPrivateFieldBase(this,_updateCaptionDisplay)[_updateCaptionDisplay](subtitle);}_classPrivateFieldBase(this,_triggerTranslations)[_triggerTranslations](currentTimeMs);}/** + */onTimeUpdate(){const currentTimeMs=_classPrivateFieldBase(this,_videoEl)[_videoEl].currentTime*1000;const subtitleIndex=_classPrivateFieldBase(this,_findSubtitleIndexForTime)[_findSubtitleIndexForTime](currentTimeMs);if(subtitleIndex!==_classPrivateFieldBase(this,_currentSubtitleIndex)[_currentSubtitleIndex]){_classPrivateFieldBase(this,_currentSubtitleIndex)[_currentSubtitleIndex]=subtitleIndex;const subtitle=subtitleIndex!==-1?_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles][subtitleIndex]:null;_classPrivateFieldBase(this,_updateCaptionDisplay)[_updateCaptionDisplay](subtitle);}_classPrivateFieldBase(this,_throttledTriggerTranslations)[_throttledTriggerTranslations](currentTimeMs);}/** * 用户拖动进度条后的回调。 - */onSeek(){_classPrivateFieldBase(this,_currentSubtitleIndex)[_currentSubtitleIndex]=-1;this.onTimeUpdate();}/** + */onSeek(){_classPrivateFieldBase(this,_currentSubtitleIndex)[_currentSubtitleIndex]=-1;_classPrivateFieldBase(this,_throttledTriggerTranslations)[_throttledTriggerTranslations].cancel();this.onTimeUpdate();}/** * 追加新的字幕 * @param {Array} newSubtitlesChunk - 新的、要追加的字幕数据块。 - */appendSubtitles(newSubtitlesChunk){if(!newSubtitlesChunk||newSubtitlesChunk.length===0){return;}logger.info("Bilingual Subtitle Manager: Appending ".concat(newSubtitlesChunk.length," new subtitles..."));_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles].push(...newSubtitlesChunk);_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles].sort((a,b)=>a.start-b.start);_classPrivateFieldBase(this,_currentSubtitleIndex)[_currentSubtitleIndex]=-1;this.onTimeUpdate();}}function _createCaptionWindow2(){var _classPrivateFieldLoo4;const container=document.createElement("div");container.className="kiss-caption-container notranslate";Object.assign(container.style,{position:"absolute",width:"100%",height:"100%",left:"0",top:"0",pointerEvents:"none"});const paper=document.createElement("div");paper.className="kiss-caption-paper";Object.assign(paper.style,{position:"absolute",width:"80%",left:"50%",bottom:"10%",transform:"translateX(-50%)",textAlign:"center",containerType:"inline-size",zIndex:"2147483647",pointerEvents:"auto",display:"none"});_classPrivateFieldBase(this,_paperEl)[_paperEl]=paper;_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl]=document.createElement("div");_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].className="kiss-caption-window";_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].style.cssText=_classPrivateFieldBase(this,_setting)[_setting].windowStyle;_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].style.pointerEvents="auto";_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].style.cursor="grab";_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].style.opacity="1";_classPrivateFieldBase(this,_paperEl)[_paperEl].appendChild(_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl]);container.appendChild(_classPrivateFieldBase(this,_paperEl)[_paperEl]);const videoContainer=(_classPrivateFieldLoo4=_classPrivateFieldBase(this,_videoEl)[_videoEl].parentElement)===null||_classPrivateFieldLoo4===void 0?void 0:_classPrivateFieldLoo4.parentElement;if(!videoContainer){logger.warn("could not find videoContainer");return;}videoContainer.style.position="relative";videoContainer.appendChild(container);_classPrivateFieldBase(this,_enableDragging)[_enableDragging](_classPrivateFieldBase(this,_paperEl)[_paperEl],container,_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl]);}function _enableDragging2(dragElement,boundaryContainer,handleElement){let isDragging=false;let startY;let initialBottom;let dragElementHeight;const onDragStart=e=>{if(e.type==="mousedown"&&e.button!==0)return;e.preventDefault();isDragging=true;handleElement.style.cursor="grabbing";startY=e.type==="touchstart"?e.touches[0].clientY:e.clientY;initialBottom=boundaryContainer.getBoundingClientRect().bottom-dragElement.getBoundingClientRect().bottom;dragElementHeight=dragElement.offsetHeight;document.addEventListener("mousemove",onDragMove,{capture:true});document.addEventListener("touchmove",onDragMove,{capture:true,passive:false});document.addEventListener("mouseup",onDragEnd,{capture:true});document.addEventListener("touchend",onDragEnd,{capture:true});};const onDragMove=e=>{if(!isDragging)return;e.preventDefault();const currentY=e.type==="touchmove"?e.touches[0].clientY:e.clientY;const deltaY=currentY-startY;let newBottom=initialBottom-deltaY;const containerHeight=boundaryContainer.clientHeight;newBottom=Math.max(0,newBottom);newBottom=Math.min(containerHeight-dragElementHeight,newBottom);if(dragElementHeight>containerHeight){newBottom=Math.max(0,newBottom);}dragElement.style.bottom="".concat(newBottom,"px");};const onDragEnd=e=>{if(!isDragging)return;e.preventDefault();isDragging=false;handleElement.style.cursor="grab";document.removeEventListener("mousemove",onDragMove,{capture:true});document.removeEventListener("touchmove",onDragMove,{capture:true});document.removeEventListener("mouseup",onDragEnd,{capture:true});document.removeEventListener("touchend",onDragEnd,{capture:true});const finalBottomPx=dragElement.style.bottom;setTimeout(()=>{dragElement.style.bottom=finalBottomPx;},50);};handleElement.addEventListener("mousedown",onDragStart);handleElement.addEventListener("touchstart",onDragStart,{passive:false});}function _attachEventListeners2(){_classPrivateFieldBase(this,_videoEl)[_videoEl].addEventListener("timeupdate",this.onTimeUpdate);_classPrivateFieldBase(this,_videoEl)[_videoEl].addEventListener("seeked",this.onSeek);}function _removeEventListeners2(){_classPrivateFieldBase(this,_videoEl)[_videoEl].removeEventListener("timeupdate",this.onTimeUpdate);_classPrivateFieldBase(this,_videoEl)[_videoEl].removeEventListener("seeked",this.onSeek);}function _findSubtitleIndexForTime2(currentTimeMs){return _classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles].findIndex(sub=>currentTimeMs>=sub.start&¤tTimeMs<=sub.end);}function _updateCaptionDisplay2(subtitle){if(!_classPrivateFieldBase(this,_paperEl)[_paperEl]||!_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl])return;if(_classPrivateFieldBase(this,_isAdPlaying)[_isAdPlaying]){_classPrivateFieldBase(this,_paperEl)[_paperEl].style.display="none";return;}if(subtitle){const p1=document.createElement("p");p1.style.cssText=_classPrivateFieldBase(this,_setting)[_setting].originStyle;p1.textContent=truncateWords(subtitle.text);const p2=document.createElement("p");p2.style.cssText=_classPrivateFieldBase(this,_setting)[_setting].translationStyle;p2.textContent=truncateWords(subtitle.translation)||"...";if(_classPrivateFieldBase(this,_setting)[_setting].isBilingual){_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].replaceChildren(p1,p2);}else{_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].replaceChildren(p2);}_classPrivateFieldBase(this,_paperEl)[_paperEl].style.display="block";}else{_classPrivateFieldBase(this,_paperEl)[_paperEl].style.display="none";}}function _triggerTranslations2(currentTimeMs){const lookAheadMs=_classPrivateFieldBase(this,_preTranslateSeconds)[_preTranslateSeconds]*1000;for(const sub of _classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles]){const isCurrent=sub.start<=currentTimeMs&&sub.end>=currentTimeMs;const isUpcoming=sub.start>currentTimeMs&&sub.start<=currentTimeMs+lookAheadMs;const needsTranslation=!sub.translation&&!sub.isTranslating;if((isCurrent||isUpcoming)&&needsTranslation){_classPrivateFieldBase(this,_translateAndStore)[_translateAndStore](sub);}}}async function _translateAndStore2(subtitle){subtitle.isTranslating=true;try{const{fromLang,toLang,apiSetting}=_classPrivateFieldBase(this,_setting)[_setting];const{trText}=await apiTranslate({text:subtitle.text,fromLang,toLang,apiSetting});subtitle.translation=trText;}catch(error){logger.info("Translation failed for:",subtitle.text,error);subtitle.translation="[Translation failed]";}finally{subtitle.isTranslating=false;const currentSubtitleIndexNow=_classPrivateFieldBase(this,_findSubtitleIndexForTime)[_findSubtitleIndexForTime](_classPrivateFieldBase(this,_videoEl)[_videoEl].currentTime*1000);if(_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles][currentSubtitleIndexNow]===subtitle){_classPrivateFieldBase(this,_updateCaptionDisplay)[_updateCaptionDisplay](subtitle);}}} + */appendSubtitles(newSubtitlesChunk){if(!newSubtitlesChunk||newSubtitlesChunk.length===0){return;}logger.info("Bilingual Subtitle Manager: Appending ".concat(newSubtitlesChunk.length," new subtitles..."));_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles].push(...newSubtitlesChunk);_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles].sort((a,b)=>a.start-b.start);_classPrivateFieldBase(this,_currentSubtitleIndex)[_currentSubtitleIndex]=-1;this.onTimeUpdate();}}function _createCaptionWindow2(){var _classPrivateFieldLoo5;const container=document.createElement("div");container.className="kiss-caption-container notranslate";Object.assign(container.style,{position:"absolute",width:"100%",height:"100%",left:"0",top:"0",pointerEvents:"none"});const paper=document.createElement("div");paper.className="kiss-caption-paper";Object.assign(paper.style,{position:"absolute",width:"80%",left:"50%",bottom:"10%",transform:"translateX(-50%)",textAlign:"center",containerType:"inline-size",zIndex:"2147483647",pointerEvents:"auto",display:"none"});_classPrivateFieldBase(this,_paperEl)[_paperEl]=paper;_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl]=document.createElement("div");_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].className="kiss-caption-window";_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].style.cssText=_classPrivateFieldBase(this,_setting)[_setting].windowStyle;_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].style.pointerEvents="auto";_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].style.cursor="grab";_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].style.opacity="1";_classPrivateFieldBase(this,_paperEl)[_paperEl].appendChild(_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl]);container.appendChild(_classPrivateFieldBase(this,_paperEl)[_paperEl]);const videoContainer=(_classPrivateFieldLoo5=_classPrivateFieldBase(this,_videoEl)[_videoEl].parentElement)===null||_classPrivateFieldLoo5===void 0?void 0:_classPrivateFieldLoo5.parentElement;if(!videoContainer){logger.warn("could not find videoContainer");return;}videoContainer.style.position="relative";videoContainer.appendChild(container);_classPrivateFieldBase(this,_enableDragging)[_enableDragging](_classPrivateFieldBase(this,_paperEl)[_paperEl],container,_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl]);}function _enableDragging2(dragElement,boundaryContainer,handleElement){let isDragging=false;let startY;let initialBottom;let dragElementHeight;const onDragStart=e=>{if(e.type==="mousedown"&&e.button!==0)return;e.preventDefault();isDragging=true;handleElement.style.cursor="grabbing";startY=e.type==="touchstart"?e.touches[0].clientY:e.clientY;initialBottom=boundaryContainer.getBoundingClientRect().bottom-dragElement.getBoundingClientRect().bottom;dragElementHeight=dragElement.offsetHeight;document.addEventListener("mousemove",onDragMove,{capture:true});document.addEventListener("touchmove",onDragMove,{capture:true,passive:false});document.addEventListener("mouseup",onDragEnd,{capture:true});document.addEventListener("touchend",onDragEnd,{capture:true});};const onDragMove=e=>{if(!isDragging)return;e.preventDefault();const currentY=e.type==="touchmove"?e.touches[0].clientY:e.clientY;const deltaY=currentY-startY;let newBottom=initialBottom-deltaY;const containerHeight=boundaryContainer.clientHeight;newBottom=Math.max(0,newBottom);newBottom=Math.min(containerHeight-dragElementHeight,newBottom);if(dragElementHeight>containerHeight){newBottom=Math.max(0,newBottom);}dragElement.style.bottom="".concat(newBottom,"px");};const onDragEnd=e=>{if(!isDragging)return;e.preventDefault();isDragging=false;handleElement.style.cursor="grab";document.removeEventListener("mousemove",onDragMove,{capture:true});document.removeEventListener("touchmove",onDragMove,{capture:true});document.removeEventListener("mouseup",onDragEnd,{capture:true});document.removeEventListener("touchend",onDragEnd,{capture:true});const finalBottomPx=dragElement.style.bottom;setTimeout(()=>{dragElement.style.bottom=finalBottomPx;},50);};handleElement.addEventListener("mousedown",onDragStart);handleElement.addEventListener("touchstart",onDragStart,{passive:false});}function _attachEventListeners2(){_classPrivateFieldBase(this,_videoEl)[_videoEl].addEventListener("timeupdate",this.onTimeUpdate);_classPrivateFieldBase(this,_videoEl)[_videoEl].addEventListener("seeked",this.onSeek);}function _removeEventListeners2(){_classPrivateFieldBase(this,_videoEl)[_videoEl].removeEventListener("timeupdate",this.onTimeUpdate);_classPrivateFieldBase(this,_videoEl)[_videoEl].removeEventListener("seeked",this.onSeek);}function _findSubtitleIndexForTime2(currentTimeMs){return _classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles].findIndex(sub=>currentTimeMs>=sub.start&¤tTimeMs<=sub.end);}function _updateCaptionDisplay2(subtitle){if(!_classPrivateFieldBase(this,_paperEl)[_paperEl]||!_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl])return;if(_classPrivateFieldBase(this,_isAdPlaying)[_isAdPlaying]){_classPrivateFieldBase(this,_paperEl)[_paperEl].style.display="none";return;}if(subtitle){const p1=document.createElement("p");p1.style.cssText=_classPrivateFieldBase(this,_setting)[_setting].originStyle;p1.textContent=truncateWords(subtitle.text);const p2=document.createElement("p");p2.style.cssText=_classPrivateFieldBase(this,_setting)[_setting].translationStyle;p2.textContent=truncateWords(subtitle.translation)||"...";if(_classPrivateFieldBase(this,_setting)[_setting].isBilingual){_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].replaceChildren(p1,p2);}else{_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].replaceChildren(p2);}_classPrivateFieldBase(this,_paperEl)[_paperEl].style.display="block";}else{_classPrivateFieldBase(this,_paperEl)[_paperEl].style.display="none";}}function _triggerTranslations2(currentTimeMs){const lookAheadMs=_classPrivateFieldBase(this,_preTranslateSeconds)[_preTranslateSeconds]*1000;for(const sub of _classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles]){const isCurrent=sub.start<=currentTimeMs&&sub.end>=currentTimeMs;const isUpcoming=sub.start>currentTimeMs&&sub.start<=currentTimeMs+lookAheadMs;const needsTranslation=!sub.translation&&!sub.isTranslating;if((isCurrent||isUpcoming)&&needsTranslation){_classPrivateFieldBase(this,_translateAndStore)[_translateAndStore](sub);}}}async function _translateAndStore2(subtitle){subtitle.isTranslating=true;try{const{fromLang,toLang,apiSetting}=_classPrivateFieldBase(this,_setting)[_setting];const{trText}=await apiTranslate({text:subtitle.text,fromLang,toLang,apiSetting});subtitle.translation=trText;}catch(error){logger.info("Translation failed for:",subtitle.text,error);subtitle.translation="[Translation failed]";}finally{subtitle.isTranslating=false;const currentSubtitleIndexNow=_classPrivateFieldBase(this,_findSubtitleIndexForTime)[_findSubtitleIndexForTime](_classPrivateFieldBase(this,_videoEl)[_videoEl].currentTime*1000);if(_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles][currentSubtitleIndexNow]===subtitle){_classPrivateFieldBase(this,_updateCaptionDisplay)[_updateCaptionDisplay](subtitle);}}} ;// CONCATENATED MODULE: ./src/libs/svg.js const loadingSvg="\n \n \n \n \n \n \n \n \n \n\n";function createSVGElement(tag,attributes){const svgNS="http://www.w3.org/2000/svg";const el=document.createElementNS(svgNS,tag);for(const key in attributes){el.setAttribute(key,attributes[key]);}return el;}/** * 创建loding动画 @@ -35453,7 +35463,7 @@ if(videoEl&&skipAd){videoEl.playbackRate=16;videoEl.currentTime=videoEl.duration "lo",// 老挝文 "km",// 高棉文 "my"// 缅文 -];if(noSpaceLanguages.some(l=>lang===null||lang===void 0?void 0:lang.startsWith(l))){const subtitles=[];let currentLine=null;const MAX_LENGTH=100;for(const segment of flatEvents){if(segment.text){if(!currentLine){currentLine={text:segment.text,start:segment.start,end:segment.end};}else{currentLine.text+=segment.text;currentLine.end=segment.end;}if(currentLine.text.length>=MAX_LENGTH){subtitles.push(currentLine);currentLine=null;}}else{if(currentLine){subtitles.push(currentLine);currentLine=null;}}}if(currentLine){subtitles.push(currentLine);}return subtitles;}let subtitles=_classPrivateFieldBase(this,_processSubtitles)[_processSubtitles]({flatEvents});const isPoor=_classPrivateFieldBase(this,_isQualityPoor)[_isQualityPoor](subtitles);logger.debug("Youtube Provider: isQualityPoor",{isPoor,subtitles});if(isPoor){subtitles=_classPrivateFieldBase(this,_processSubtitles)[_processSubtitles]({flatEvents,usePause:true});}return subtitles;}function _isQualityPoor2(lines){let lengthThreshold=arguments.length>1&&arguments[1]!==undefined?arguments[1]:250;let percentageThreshold=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0.2;if(lines.length===0)return false;const longLinesCount=lines.filter(line=>line.text.length>lengthThreshold).length;return longLinesCount/lines.length>percentageThreshold;}function _processSubtitles2(){let{flatEvents,usePause=false,timeout=1000,maxWords=15}=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};const groupedPauseWords={1:new Set(["actually","also","although","and","anyway","as","basically","because","but","eventually","frankly","honestly","hopefully","however","if","instead","it's","just","let's","like","literally","maybe","meanwhile","nevertheless","nonetheless","now","okay","or","otherwise","perhaps","personally","probably","right","since","so","suddenly","that's","then","there's","therefore","though","thus","unless","until","well","while"]),2:new Set(["after all","at first","at least","even if","even though","for example","for instance","i believe","i guess","i mean","i suppose","i think","in fact","in the end","of course","then again","to be fair","you know","you see"]),3:new Set(["as a result","by the way","in other words","in that case","in this case","to be clear","to be honest"])};const sentences=[];let currentBuffer=[];let bufferWordCount=0;const flushBuffer=()=>{if(currentBuffer.length>0){sentences.push({text:currentBuffer.map(s=>s.text).join(" ").trim(),start:currentBuffer[0].start,end:currentBuffer[currentBuffer.length-1].end});}currentBuffer=[];bufferWordCount=0;};flatEvents.forEach(segment=>{if(!segment.text)return;const lastSegment=currentBuffer[currentBuffer.length-1];if(lastSegment){const isEndOfSentence=/[.?!…\])]$/.test(lastSegment.text);const isPauseOfSentence=/[,]$/.test(lastSegment.text);const isTimeout=segment.start-lastSegment.end>timeout;const isWordLimitExceeded=(usePause||isPauseOfSentence)&&bufferWordCount>=maxWords;const startsWithSign=/^[[(♪]/.test(segment.text);const startsWithPauseWord=usePause&&groupedPauseWords["1"].has(segment.text.toLowerCase().split(" ")[0])&¤tBuffer.length>1;if(isEndOfSentence||isTimeout||isWordLimitExceeded||startsWithSign||startsWithPauseWord){flushBuffer();}}currentBuffer.push(segment);bufferWordCount+=segment.text.split(/\s+/).length;});flushBuffer();return sentences;}function _flatEvents2(){let events=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];const segments=[];let buffer=null;events.forEach(_ref3=>{let{segs=[],tStartMs=0,dDurationMs=0}=_ref3;segs.forEach((_ref4,j)=>{let{utf8="",tOffsetMs=0}=_ref4;const text=utf8.trim().replace(/\s+/g," ");const start=tStartMs+tOffsetMs;if(buffer){if(!buffer.end||buffer.end>start){buffer.end=start;}segments.push(buffer);buffer=null;}buffer={text,start};if(j===segs.length-1){buffer.end=tStartMs+dDurationMs;}});});segments.push(buffer);return segments;}function _splitEventsIntoChunks2(flatEvents){let chunkLength=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1000;if(!flatEvents||flatEvents.length===0){return[];}const eventChunks=[];let currentChunk=[];let currentChunkTextLength=0;const MAX_CHUNK_LENGTH=chunkLength+500;const PAUSE_THRESHOLD_MS=1000;for(let i=0;i=MAX_CHUNK_LENGTH){shouldSplit=true;}else if(currentChunkTextLength>=chunkLength){const isEndOfSentence=/[.?!…\])]$/.test(event.text);const nextEvent=flatEvents[i+1];const pauseDuration=nextEvent.start-event.end;if(isEndOfSentence||pauseDuration>PAUSE_THRESHOLD_MS){shouldSplit=true;}}if(shouldSplit){eventChunks.push(currentChunk);currentChunk=[];currentChunkTextLength=0;}}if(currentChunk.length>0){eventChunks.push(currentChunk);}return eventChunks;}async function _processRemainingChunksAsync2(_ref5){let{chunks,videoId,fromLang,toLang,segApiSetting}=_ref5;logger.info("Youtube Provider: Starting for ".concat(chunks.length," chunks."));for(let i=0;i ").concat((_chunkEvents=chunkEvents[chunkEvents.length-1])===null||_chunkEvents===void 0?void 0:_chunkEvents.start));let subtitlesForThisChunk=[];try{const aiSubtitles=await _classPrivateFieldBase(this,_aiSegment)[_aiSegment]({videoId,chunkEvents,fromLang,toLang,segApiSetting});if((aiSubtitles===null||aiSubtitles===void 0?void 0:aiSubtitles.length)>0){subtitlesForThisChunk=aiSubtitles;}else{logger.info("Youtube Provider: AI segmentation for chunk ".concat(chunkNum," returned no data."));subtitlesForThisChunk=_classPrivateFieldBase(this,_formatSubtitles)[_formatSubtitles](chunkEvents,fromLang);}}catch(chunkError){subtitlesForThisChunk=_classPrivateFieldBase(this,_formatSubtitles)[_formatSubtitles](chunkEvents,fromLang);}if(_classPrivateFieldBase(this,_getVideoId)[_getVideoId]()!==videoId){logger.info("Youtube Provider: videoId changed!");break;}if(subtitlesForThisChunk.length>0&&_classPrivateFieldBase(this,_managerInstance)[_managerInstance]){logger.info("Youtube Provider: Appending ".concat(subtitlesForThisChunk.length," subtitles from chunk ").concat(chunkNum,"."));_classPrivateFieldBase(this,_managerInstance)[_managerInstance].appendSubtitles(subtitlesForThisChunk);}else{logger.info("Youtube Provider: Chunk ".concat(chunkNum," no subtitles."));}await sleep(randomBetween(500,1000));}logger.info("Youtube Provider: All subtitle chunks processed.");}function _createNotificationElement2(){var _videoEl$parentElemen;const notificationEl=document.createElement("div");notificationEl.className="kiss-notification";Object.assign(notificationEl.style,{position:"absolute",top:"40%",left:"50%",transform:"translateX(-50%)",background:"rgba(0,0,0,0.7)",color:"red",padding:"0.5em 1em",borderRadius:"4px",zIndex:"2147483647",opacity:"0",transition:"opacity 0.3s ease-in-out",pointerEvents:"none",fontSize:"2em",width:"50%",textAlign:"center"});const videoEl=_classPrivateFieldBase(this,YouTubeCaptionProvider_videoEl)[YouTubeCaptionProvider_videoEl];const videoContainer=videoEl===null||videoEl===void 0?void 0:(_videoEl$parentElemen=videoEl.parentElement)===null||_videoEl$parentElemen===void 0?void 0:_videoEl$parentElemen.parentElement;if(videoContainer){videoContainer.appendChild(notificationEl);_classPrivateFieldBase(this,_notificationEl)[_notificationEl]=notificationEl;}}function _showNotification2(message){let duration=arguments.length>1&&arguments[1]!==undefined?arguments[1]:2000;if(!_classPrivateFieldBase(this,_notificationEl)[_notificationEl])_classPrivateFieldBase(this,_createNotificationElement)[_createNotificationElement]();_classPrivateFieldBase(this,_notificationEl)[_notificationEl].textContent=message;_classPrivateFieldBase(this,_notificationEl)[_notificationEl].style.opacity="1";clearTimeout(_classPrivateFieldBase(this,_notificationTimeout)[_notificationTimeout]);_classPrivateFieldBase(this,_notificationTimeout)[_notificationTimeout]=setTimeout(()=>{_classPrivateFieldBase(this,_notificationEl)[_notificationEl].style.opacity="0";},duration);}const YouTubeInitializer=(()=>{let initialized=false;return async setting=>{if(initialized){return;}initialized=true;logger.info("Bilingual Subtitle Extension: Initializing...");const provider=new YouTubeCaptionProvider(setting);provider.initialize();};})(); +];if(noSpaceLanguages.some(l=>lang===null||lang===void 0?void 0:lang.startsWith(l))){const subtitles=[];let currentLine=null;const MAX_LENGTH=100;for(const segment of flatEvents){if(segment.text){if(!currentLine){currentLine={text:segment.text,start:segment.start,end:segment.end};}else{currentLine.text+=segment.text;currentLine.end=segment.end;}if(currentLine.text.length>=MAX_LENGTH){subtitles.push(currentLine);currentLine=null;}}else{if(currentLine){subtitles.push(currentLine);currentLine=null;}}}if(currentLine){subtitles.push(currentLine);}return subtitles;}let subtitles=_classPrivateFieldBase(this,_processSubtitles)[_processSubtitles]({flatEvents});const isPoor=_classPrivateFieldBase(this,_isQualityPoor)[_isQualityPoor](subtitles);logger.debug("Youtube Provider: isQualityPoor",{isPoor,subtitles});if(isPoor){subtitles=_classPrivateFieldBase(this,_processSubtitles)[_processSubtitles]({flatEvents,usePause:true});}return subtitles;}function _isQualityPoor2(lines){let lengthThreshold=arguments.length>1&&arguments[1]!==undefined?arguments[1]:250;let percentageThreshold=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0.2;if(lines.length===0)return false;const longLinesCount=lines.filter(line=>line.text.length>lengthThreshold).length;return longLinesCount/lines.length>percentageThreshold;}function _processSubtitles2(){let{flatEvents,usePause=false,timeout=1000,maxWords=15}=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};const groupedPauseWords={1:new Set(["actually","also","although","and","anyway","as","basically","because","but","eventually","frankly","honestly","hopefully","however","if","instead","it's","just","let's","like","literally","maybe","meanwhile","nevertheless","nonetheless","now","okay","or","otherwise","perhaps","personally","probably","right","since","so","suddenly","that's","then","there's","therefore","though","thus","unless","until","well","while"]),2:new Set(["after all","at first","at least","even if","even though","for example","for instance","i believe","i guess","i mean","i suppose","i think","in fact","in the end","of course","then again","to be fair","you know","you see"]),3:new Set(["as a result","by the way","in other words","in that case","in this case","to be clear","to be honest"])};const sentences=[];let currentBuffer=[];let bufferWordCount=0;const flushBuffer=()=>{if(currentBuffer.length>0){sentences.push({text:currentBuffer.map(s=>s.text).join(" ").trim(),start:currentBuffer[0].start,end:currentBuffer[currentBuffer.length-1].end});}currentBuffer=[];bufferWordCount=0;};flatEvents.forEach(segment=>{if(!segment.text)return;const lastSegment=currentBuffer[currentBuffer.length-1];if(lastSegment){const isEndOfSentence=/[.?!…\])]$/.test(lastSegment.text);const isPauseOfSentence=/[,]$/.test(lastSegment.text);const isTimeout=segment.start-lastSegment.end>timeout;const isWordLimitExceeded=(usePause||isPauseOfSentence)&&bufferWordCount>=maxWords;const startsWithSign=/^[[(♪]/.test(segment.text);const startsWithPauseWord=usePause&&groupedPauseWords["1"].has(segment.text.toLowerCase().split(" ")[0])&¤tBuffer.length>1;if(isEndOfSentence||isTimeout||isWordLimitExceeded||startsWithSign||startsWithPauseWord){flushBuffer();}}currentBuffer.push(segment);bufferWordCount+=segment.text.split(/\s+/).length;});flushBuffer();return sentences;}function _flatEvents2(){let events=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];const segments=[];let buffer=null;events.forEach(_ref3=>{let{segs=[],tStartMs=0,dDurationMs=0}=_ref3;segs.forEach((_ref4,j)=>{let{utf8="",tOffsetMs=0}=_ref4;const text=utf8.trim().replace(/\s+/g," ");const start=tStartMs+tOffsetMs;if(buffer){if(!buffer.end||buffer.end>start){buffer.end=start;}segments.push(buffer);buffer=null;}buffer={text,start};if(j===segs.length-1){buffer.end=tStartMs+dDurationMs;}});});segments.push(buffer);return segments;}function _splitEventsIntoChunks2(flatEvents){let chunkLength=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1000;if(!flatEvents||flatEvents.length===0){return[];}const eventChunks=[];let currentChunk=[];let currentChunkTextLength=0;const MAX_CHUNK_LENGTH=chunkLength+500;const PAUSE_THRESHOLD_MS=1000;for(let i=0;i=MAX_CHUNK_LENGTH){shouldSplit=true;}else if(currentChunkTextLength>=chunkLength){const isEndOfSentence=/[.?!…\])]$/.test(event.text);const nextEvent=flatEvents[i+1];const pauseDuration=nextEvent.start-event.end;if(isEndOfSentence||pauseDuration>PAUSE_THRESHOLD_MS){shouldSplit=true;}}if(shouldSplit){eventChunks.push(currentChunk);currentChunk=[];currentChunkTextLength=0;}}if(currentChunk.length>0){eventChunks.push(currentChunk);}return eventChunks;}async function _processRemainingChunksAsync2(_ref5){let{chunks,videoId,fromLang,toLang,segApiSetting}=_ref5;logger.info("Youtube Provider: Starting for ".concat(chunks.length," chunks."));for(let i=0;i ").concat((_chunkEvents=chunkEvents[chunkEvents.length-1])===null||_chunkEvents===void 0?void 0:_chunkEvents.start));let subtitlesForThisChunk=[];try{const aiSubtitles=await _classPrivateFieldBase(this,_aiSegment)[_aiSegment]({videoId,chunkEvents,fromLang,toLang,segApiSetting});if((aiSubtitles===null||aiSubtitles===void 0?void 0:aiSubtitles.length)>0){subtitlesForThisChunk=aiSubtitles;}else{logger.info("Youtube Provider: AI segmentation for chunk ".concat(chunkNum," returned no data."));subtitlesForThisChunk=_classPrivateFieldBase(this,_formatSubtitles)[_formatSubtitles](chunkEvents,fromLang);}}catch(chunkError){subtitlesForThisChunk=_classPrivateFieldBase(this,_formatSubtitles)[_formatSubtitles](chunkEvents,fromLang);}if(_classPrivateFieldBase(this,_getVideoId)[_getVideoId]()!==videoId){logger.info("Youtube Provider: videoId changed!");break;}if(subtitlesForThisChunk.length>0&&_classPrivateFieldBase(this,_managerInstance)[_managerInstance]){logger.info("Youtube Provider: Appending ".concat(subtitlesForThisChunk.length," subtitles from chunk ").concat(chunkNum,"."));_classPrivateFieldBase(this,_subtitles)[_subtitles].push(subtitlesForThisChunk);_classPrivateFieldBase(this,_managerInstance)[_managerInstance].appendSubtitles(subtitlesForThisChunk);}else{logger.info("Youtube Provider: Chunk ".concat(chunkNum," no subtitles."));}await sleep(randomBetween(500,1000));}logger.info("Youtube Provider: All subtitle chunks processed.");}function _createNotificationElement2(){var _videoEl$parentElemen;const notificationEl=document.createElement("div");notificationEl.className="kiss-notification";Object.assign(notificationEl.style,{position:"absolute",top:"40%",left:"50%",transform:"translateX(-50%)",background:"rgba(0,0,0,0.7)",color:"red",padding:"0.5em 1em",borderRadius:"4px",zIndex:"2147483647",opacity:"0",transition:"opacity 0.3s ease-in-out",pointerEvents:"none",fontSize:"2em",width:"50%",textAlign:"center"});const videoEl=_classPrivateFieldBase(this,YouTubeCaptionProvider_videoEl)[YouTubeCaptionProvider_videoEl];const videoContainer=videoEl===null||videoEl===void 0?void 0:(_videoEl$parentElemen=videoEl.parentElement)===null||_videoEl$parentElemen===void 0?void 0:_videoEl$parentElemen.parentElement;if(videoContainer){videoContainer.appendChild(notificationEl);_classPrivateFieldBase(this,_notificationEl)[_notificationEl]=notificationEl;}}function _showNotification2(message){let duration=arguments.length>1&&arguments[1]!==undefined?arguments[1]:2000;if(!_classPrivateFieldBase(this,_notificationEl)[_notificationEl])_classPrivateFieldBase(this,_createNotificationElement)[_createNotificationElement]();_classPrivateFieldBase(this,_notificationEl)[_notificationEl].textContent=message;_classPrivateFieldBase(this,_notificationEl)[_notificationEl].style.opacity="1";clearTimeout(_classPrivateFieldBase(this,_notificationTimeout)[_notificationTimeout]);_classPrivateFieldBase(this,_notificationTimeout)[_notificationTimeout]=setTimeout(()=>{_classPrivateFieldBase(this,_notificationEl)[_notificationEl].style.opacity="0";},duration);}const YouTubeInitializer=(()=>{let initialized=false;return async setting=>{if(initialized){return;}initialized=true;logger.info("Bilingual Subtitle Extension: Initializing...");const provider=new YouTubeCaptionProvider(setting);provider.initialize();};})(); ;// CONCATENATED MODULE: ./src/libs/trustedTypes.js const trustedTypesHelper=(()=>{const POLICY_NAME="kiss-translator-policy";let policy=null;if(globalThis.trustedTypes&&globalThis.trustedTypes.createPolicy){try{policy=globalThis.trustedTypes.createPolicy(POLICY_NAME,{createHTML:string=>string,createScript:string=>string,createScriptURL:string=>string});}catch(err){if(err.message.includes("already exists")){policy=globalThis.trustedTypes.policies.get(POLICY_NAME);}else{logger.info("cont create Trusted Types",err);}}}return{createHTML:htmlString=>{return policy?policy.createHTML(htmlString):htmlString;},createScript:scriptString=>{return policy?policy.createScript(scriptString):scriptString;},createScriptURL:urlString=>{return policy?policy.createScriptURL(urlString):urlString;},isEnabled:()=>policy!==null};})(); ;// CONCATENATED MODULE: ./src/libs/injector.js @@ -36479,20 +36489,25 @@ var _createEmotion = createEmotion({ cache = _createEmotion.cache; ;// CONCATENATED MODULE: ./src/libs/style.js -var _templateObject,_templateObject2,_templateObject3,_templateObject4;const gradientFlow=keyframes(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n to {\n background-position: 200% center;\n }\n"])));const blink=keyframes(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n"])));const glow=keyframes(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n from {\n text-shadow: 0 0 10px #fff, \n 0 0 20px #fff, \n 0 0 30px #0073e6, \n 0 0 40px #0073e6;\n }\n to {\n text-shadow: 0 0 20px #fff, \n 0 0 30px #ff4da6, \n 0 0 40px #ff4da6, \n 0 0 50px #ff4da6;\n }\n"])));const genLineStyle=(style,color)=>"\n text-decoration-line: underline;\n text-decoration-style: ".concat(style,";\n text-decoration-color: ").concat(color,";\n text-decoration-thickness: 2px;\n text-underline-offset: 0.3em;\n -webkit-text-decoration-line: underline;\n -webkit-text-decoration-style: ").concat(style,";\n -webkit-text-decoration-color: ").concat(color,";\n -webkit-text-decoration-thickness: 2px;\n -webkit-text-underline-offset: 0.3em;\n\n /* opacity: 0.8;\n -webkit-opacity: 0.8;\n &:hover {\n opacity: 1;\n -webkit-opacity: 1;\n } */\n");const genStyles=function(){let{textDiyStyle=DEFAULT_DIY_STYLE,bgColor=DEFAULT_COLOR}=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return{// 无样式 +var _templateObject,_templateObject2,_templateObject3,_templateObject4;const gradientFlow=keyframes(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n to {\n background-position: 200% center;\n }\n"])));const blink=keyframes(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n"])));const glow=keyframes(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n from {\n text-shadow: 0 0 10px #fff, \n 0 0 20px #fff, \n 0 0 30px #0073e6, \n 0 0 40px #0073e6;\n }\n to {\n text-shadow: 0 0 20px #fff, \n 0 0 30px #ff4da6, \n 0 0 40px #ff4da6, \n 0 0 50px #ff4da6;\n }\n"])));const genLineStyle=function(style,color){let thickness=arguments.length>2&&arguments[2]!==undefined?arguments[2]:1;return"\n text-decoration-line: underline;\n text-decoration-style: ".concat(style,";\n text-decoration-color: ").concat(color,";\n text-decoration-thickness: ").concat(thickness,"px;\n text-underline-offset: 0.3em;\n -webkit-text-decoration-line: underline;\n -webkit-text-decoration-style: ").concat(style,";\n -webkit-text-decoration-color: ").concat(color,";\n -webkit-text-decoration-thickness: 1px;\n -webkit-text-underline-offset: 0.3em;\n\n opacity: 0.8;\n -webkit-opacity: 0.8;\n &:hover {\n opacity: 1;\n -webkit-opacity: 1;\n }\n");};const genBuiltinStyles=function(){let color=arguments.length>0&&arguments[0]!==undefined?arguments[0]:DEFAULT_COLOR;return{// 无样式 [OPT_STYLE_NONE]:"",// 下划线 -[OPT_STYLE_LINE]:genLineStyle("solid",bgColor),// 点状线 -[OPT_STYLE_DOTLINE]:genLineStyle("dotted",bgColor),// 虚线 -[OPT_STYLE_DASHLINE]:genLineStyle("dashed",bgColor),// 波浪线 -[OPT_STYLE_WAVYLINE]:genLineStyle("wavy",bgColor),// 虚线框 -[OPT_STYLE_DASHBOX]:"\n border: 2px dashed ".concat(bgColor||DEFAULT_COLOR,";\n display: block;\n padding: 0.2em 0.4em;\n box-sizing: border-box;\n "),// 模糊 +[OPT_STYLE_LINE]:genLineStyle("solid",color),// 点状线 +[OPT_STYLE_DOTLINE]:genLineStyle("dotted",color),// 虚线 +[OPT_STYLE_DASHLINE]:genLineStyle("dashed",color),// 虚线加粗 +[OPT_STYLE_DASHLINE_BOLD]:genLineStyle("dashed",color,2),// 波浪线 +[OPT_STYLE_WAVYLINE]:genLineStyle("wavy",color),// 波浪线加粗 +[OPT_STYLE_WAVYLINE_BOLD]:genLineStyle("wavy",color,2),// 虚线框 +[OPT_STYLE_DASHBOX]:"\n border: 1px dashed ".concat(color,";\n display: block;\n padding: 0.2em 0.3em;\n box-sizing: border-box;\n "),// 虚线框加粗 +[OPT_STYLE_DASHBOX_BOLD]:"\n border: 2px dashed ".concat(color,";\n display: block;\n padding: 0.2em 0.3em;\n box-sizing: border-box;\n "),// 马克笔 +[OPT_STYLE_MARKER]:"\n background: linear-gradient(to top, ".concat(color," 50%, transparent 50%);\n "),// 渐变马克笔 +[OPT_STYLE_GRADIENT_MARKER]:"\n background: linear-gradient(to top, transparent, ".concat(color," 20%, transparent 60%);\n "),// 模糊 [OPT_STYLE_FUZZY]:"\n filter: blur(0.2em);\n -webkit-filter: blur(0.2em);\n &:hover {\n filter: none;\n -webkit-filter: none;\n }\n ",// 高亮 -[OPT_STYLE_HIGHLIGHT]:"\n color: #fff;\n background-color: ".concat(bgColor||DEFAULT_COLOR,";\n "),// 引用 -[OPT_STYLE_BLOCKQUOTE]:"\n opacity: 0.8;\n -webkit-opacity: 0.8;\n display: block;\n padding: 0.25em 0.5em;\n border-left: 0.5em solid ".concat(bgColor||DEFAULT_COLOR,";\n background: rgb(32, 156, 238, 0.2);\n &:hover {\n opacity: 1;\n -webkit-opacity: 1;\n }\n "),// 渐变 +[OPT_STYLE_HIGHLIGHT]:"\n color: #fff;\n background-color: ".concat(color,";\n "),// 引用 +[OPT_STYLE_BLOCKQUOTE]:"\n opacity: 0.8;\n -webkit-opacity: 0.8;\n display: block;\n padding: 0.25em 0.5em;\n border-left: 0.25em solid ".concat(color,";\n background: rgb(32, 156, 238, 0.2);\n &:hover {\n opacity: 1;\n -webkit-opacity: 1;\n }\n "),// 渐变 [OPT_STYLE_GRADIENT]:"\n background-image: linear-gradient(\n 90deg,\n #3b82f6,\n #9333ea,\n #ec4899,\n #3b82f6\n );\n background-size: 200% auto;\n color: transparent;\n -webkit-background-clip: text;\n background-clip: text;\n animation: ".concat(gradientFlow," 4s linear infinite;\n "),// 闪现 [OPT_STYLE_BLINK]:"\n animation: ".concat(blink," 1s infinite;\n "),// 发光 -[OPT_STYLE_GLOW]:"\n animation: ".concat(glow," 2s ease-in-out infinite alternate;\n "),// 自定义 -[OPT_STYLE_DIY]:"\n".concat(textDiyStyle,"\n")};};const genTextClass=_ref=>{let{textDiyStyle,bgColor=DEFAULT_COLOR}=_ref;const styles=genStyles({textDiyStyle,bgColor});const textClass={};let textStyles="";Object.entries(styles).forEach(_ref2=>{let[k,v]=_ref2;textClass[k]=css(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n ","\n "])),v);});Object.entries(styles).forEach(_ref3=>{let[k,v]=_ref3;textStyles+="\n .".concat(textClass[k]," {\n ").concat(v,"\n }\n ");});return[textClass,textStyles];};const defaultStyles=genStyles(); +[OPT_STYLE_GLOW]:"\n animation: ".concat(glow," 2s ease-in-out infinite alternate;\n "),// 多彩 +[OPT_STYLE_COLORFUL]:"\n color: #333;\n background: linear-gradient(\n 45deg,\n LightGreen 20%,\n LightPink 20% 40%,\n LightSalmon 40% 60%,\n LightSeaGreen 60% 80%,\n LightSkyBlue 80%\n );\n &:hover {\n color: #111;\n };\n "};};const genTextClass=function(){let customStyles=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];const styles=genBuiltinStyles();customStyles.forEach(style=>{styles[style.styleSlug]=style.styleCode;});const textClass={};let textStyles="";Object.entries(styles).forEach(_ref=>{let[k,v]=_ref;textClass[k]=css(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n ","\n "])),v);});Object.entries(styles).forEach(_ref2=>{let[k,v]=_ref2;textStyles+="\n .".concat(textClass[k]," {\n ").concat(v,"\n }\n ");});return[textClass,textStyles];};const builtinStylesMap=genBuiltinStyles(); ;// CONCATENATED MODULE: ./src/libs/shortcut.js /** * 键盘快捷键监听器 @@ -36654,7 +36669,7 @@ updateRule(newRule){let hasChanged=false;let needsRescan=false;for(const key in // ); return _classPrivateFieldBase(this,_apisMap)[_apisMap].get(_classPrivateFieldBase(this,_rule)[_rule].apiSlug)||DEFAULT_API_SETTING;}function _get_placeholder(){const[startDelimiter,endDelimiter]=_classPrivateFieldBase(this,_apiSetting)[_apiSetting].placeholder.split(" ");return{startDelimiter,endDelimiter,tagName:_classPrivateFieldBase(this,_apiSetting)[_apiSetting].placetag};}function _run2(){if(_classPrivateFieldBase(this,_rule)[_rule].transOpen==="true"){this.enable();}else if(_classPrivateFieldBase(this,translator_setting)[translator_setting].preInit){_classPrivateFieldBase(this,_init)[_init]();}}function _init2(){_classPrivateFieldBase(this,_isInitialized)[_isInitialized]=true;// 注入JS/CSS _classPrivateFieldBase(this,_initInjector)[_initInjector]();// 查找根节点并扫描 -document.querySelectorAll(_classPrivateFieldBase(this,_rule)[_rule].rootsSelector||"body").forEach(root=>{_classPrivateFieldBase(this,_startObserveRoot)[_startObserveRoot](root);});if(_classPrivateFieldBase(this,_rule)[_rule].hasShadowroot==="true"){_classPrivateFieldBase(this,_attachShadowRootListener)[_attachShadowRootListener]();_classPrivateFieldBase(this,_findAndObserveShadowRoot)[_findAndObserveShadowRoot]();}}function _handleWindowMessage2(event){var _event$data;if(((_event$data=event.data)===null||_event$data===void 0?void 0:_event$data.type)==="KISS_SHADOW_ROOT_CREATED"){_classPrivateFieldBase(this,_debouncedFindShadowRoot)[_debouncedFindShadowRoot]();}}function _attachShadowRootListener2(){if(!_classPrivateFieldBase(this,_isShadowRootJsInjected)[_isShadowRootJsInjected]){const id="kiss-translator-inject-shadowroot-js";injectJs(INJECTOR.shadowroot,id);_classPrivateFieldBase(this,_isShadowRootJsInjected)[_isShadowRootJsInjected]=true;}window.addEventListener("message",_classPrivateFieldBase(this,_windowMessageHandler)[_windowMessageHandler]);}function _removeShadowRootListener2(){window.removeEventListener("message",_classPrivateFieldBase(this,_windowMessageHandler)[_windowMessageHandler]);}function _findAndObserveShadowRoot2(){try{_classPrivateFieldBase(this,_findAllShadowRoots)[_findAllShadowRoots]().forEach(shadowRoot=>{_classPrivateFieldBase(this,_startObserveShadowRoot)[_startObserveShadowRoot](shadowRoot);});}catch(err){log_kissLog("findAllShadowRoots",err);}}function _createPlaceholderRegex2(){const escapedStart=_class.escapeRegex(_classPrivateFieldBase(this,_placeholder)[_placeholder].startDelimiter);const escapedEnd=_class.escapeRegex(_classPrivateFieldBase(this,_placeholder)[_placeholder].endDelimiter);const patternString="(".concat(escapedStart,"\\d+").concat(escapedEnd,"|<\\/?\\w+\\d+>)");const flags="g";return new RegExp(patternString,flags);}function _createTextStyles2(){const[textClass,textStyles]=genTextClass({..._classPrivateFieldBase(this,_rule)[_rule]});const textSheet=new CSSStyleSheet();textSheet.replaceSync(textStyles);_classPrivateFieldBase(this,_textClass)[_textClass]=textClass;_classPrivateFieldBase(this,_textSheet)[_textSheet]=textSheet;}function _injectSheet2(shadowRoot){if(!shadowRoot.adoptedStyleSheets.includes(_classPrivateFieldBase(this,_textSheet)[_textSheet])){shadowRoot.adoptedStyleSheets=[...shadowRoot.adoptedStyleSheets,_classPrivateFieldBase(this,_textSheet)[_textSheet]];}}function _parseTerms2(termsString){_classPrivateFieldBase(this,_termValues)[_termValues]=[];_classPrivateFieldBase(this,_combinedTermsRegex)[_combinedTermsRegex]=null;if(!termsString||typeof termsString!=="string")return;const termPatterns=[];const lines=termsString.split(/\n|;/);// 按换行或分号分割 +document.querySelectorAll(_classPrivateFieldBase(this,_rule)[_rule].rootsSelector||"body").forEach(root=>{_classPrivateFieldBase(this,_startObserveRoot)[_startObserveRoot](root);});if(_classPrivateFieldBase(this,_rule)[_rule].hasShadowroot==="true"){_classPrivateFieldBase(this,_attachShadowRootListener)[_attachShadowRootListener]();_classPrivateFieldBase(this,_findAndObserveShadowRoot)[_findAndObserveShadowRoot]();}}function _handleWindowMessage2(event){var _event$data;if(((_event$data=event.data)===null||_event$data===void 0?void 0:_event$data.type)==="KISS_SHADOW_ROOT_CREATED"){_classPrivateFieldBase(this,_debouncedFindShadowRoot)[_debouncedFindShadowRoot]();}}function _attachShadowRootListener2(){if(!_classPrivateFieldBase(this,_isShadowRootJsInjected)[_isShadowRootJsInjected]){const id="kiss-translator-inject-shadowroot-js";injectJs(INJECTOR.shadowroot,id);_classPrivateFieldBase(this,_isShadowRootJsInjected)[_isShadowRootJsInjected]=true;}window.addEventListener("message",_classPrivateFieldBase(this,_windowMessageHandler)[_windowMessageHandler]);}function _removeShadowRootListener2(){window.removeEventListener("message",_classPrivateFieldBase(this,_windowMessageHandler)[_windowMessageHandler]);}function _findAndObserveShadowRoot2(){try{_classPrivateFieldBase(this,_findAllShadowRoots)[_findAllShadowRoots]().forEach(shadowRoot=>{_classPrivateFieldBase(this,_startObserveShadowRoot)[_startObserveShadowRoot](shadowRoot);});}catch(err){log_kissLog("findAllShadowRoots",err);}}function _createPlaceholderRegex2(){const escapedStart=_class.escapeRegex(_classPrivateFieldBase(this,_placeholder)[_placeholder].startDelimiter);const escapedEnd=_class.escapeRegex(_classPrivateFieldBase(this,_placeholder)[_placeholder].endDelimiter);const patternString="(".concat(escapedStart,"\\d+").concat(escapedEnd,"|<\\/?\\w+\\d+>)");const flags="g";return new RegExp(patternString,flags);}function _createTextStyles2(){const[textClass,textStyles]=genTextClass(_classPrivateFieldBase(this,translator_setting)[translator_setting].customStyles);const textSheet=new CSSStyleSheet();textSheet.replaceSync(textStyles);_classPrivateFieldBase(this,_textClass)[_textClass]=textClass;_classPrivateFieldBase(this,_textSheet)[_textSheet]=textSheet;}function _injectSheet2(shadowRoot){if(!shadowRoot.adoptedStyleSheets.includes(_classPrivateFieldBase(this,_textSheet)[_textSheet])){shadowRoot.adoptedStyleSheets=[...shadowRoot.adoptedStyleSheets,_classPrivateFieldBase(this,_textSheet)[_textSheet]];}}function _parseTerms2(termsString){_classPrivateFieldBase(this,_termValues)[_termValues]=[];_classPrivateFieldBase(this,_combinedTermsRegex)[_combinedTermsRegex]=null;if(!termsString||typeof termsString!=="string")return;const termPatterns=[];const lines=termsString.split(/\n|;/);// 按换行或分号分割 for(const line of lines){const trimmedLine=line.trim();if(!trimmedLine)continue;let lastCommaIndex=trimmedLine.lastIndexOf(",");if(lastCommaIndex===-1){lastCommaIndex=trimmedLine.length;}const key=trimmedLine.substring(0,lastCommaIndex).trim();const value=trimmedLine.substring(lastCommaIndex+1).trim();if(key){try{new RegExp(key);termPatterns.push("(".concat(key,")"));_classPrivateFieldBase(this,_termValues)[_termValues].push(value);}catch(err){log_kissLog("Invalid RegExp for term: \"".concat(key,"\""),err);}}}if(termPatterns.length>0){_classPrivateFieldBase(this,_combinedTermsRegex)[_combinedTermsRegex]=new RegExp(termPatterns.join("|"),"g");}}function _parseAITerms2(termsString){if(!termsString||typeof termsString!=="string")return;try{_classPrivateFieldBase(this,_glossary)[_glossary]=Object.fromEntries(termsString.split(/\n|;/).map(line=>{const[k="",v=""]=line.split(",").map(s=>s.trim());return[k,v];}).filter(_ref2=>{let[k]=_ref2;return k;}));}catch(err){log_kissLog("parse aiterms",err);}}function _getDocDescription2(){try{const meta=document.querySelector('meta[name="description"]');const description=(meta===null||meta===void 0?void 0:meta.getAttribute("content"))||"";return truncateWords(description);}catch(err){log_kissLog("get description",err);}return"";}function _createIntersectionObserver2(){const{transInterval,rootMargin=500}=_classPrivateFieldBase(this,translator_setting)[translator_setting];const pending=new Set();const flush=debounce(()=>{pending.forEach(node=>_classPrivateFieldBase(this,_performSyncNode)[_performSyncNode](node));pending.clear();},transInterval);return new IntersectionObserver(entries=>{entries.forEach(entry=>{if(entry.isIntersecting){_classPrivateFieldBase(this,_viewNodes)[_viewNodes].add(entry.target);pending.add(entry.target);flush();}else{_classPrivateFieldBase(this,_viewNodes)[_viewNodes].delete(entry.target);}});},{threshold:0.01,rootMargin:"".concat(rootMargin,"px 0px ").concat(rootMargin,"px 0px")});}function _createMutationObserver2(){return new MutationObserver(mutations=>{for(const mutation of mutations){var _mutation$nextSibling;if(_classPrivateFieldBase(this,_skipMoNodes)[_skipMoNodes].has(mutation.target)||((_mutation$nextSibling=mutation.nextSibling)===null||_mutation$nextSibling===void 0?void 0:_mutation$nextSibling.tagName)===_classPrivateFieldBase(this,_translationTagName)[_translationTagName]){continue;}if(mutation.type==="characterData"){if(mutation.oldValue!==mutation.target.nodeValue&&!_classPrivateFieldBase(this,_combinedSkipsRegex)[_combinedSkipsRegex].test(mutation.target.nodeValue)){_classPrivateFieldBase(this,_queueForRescan)[_queueForRescan](mutation.target.parentElement);}}else if(mutation.type==="childList"){let nodes=new Set();let hasText=false;mutation.addedNodes.forEach(node=>{if(_classPrivateFieldBase(this,_skipMoNodes)[_skipMoNodes].has(node)||node.nodeName===_classPrivateFieldBase(this,_translationTagName)[_translationTagName]){return;}if(node.nodeType===Node.TEXT_NODE){hasText=true;}else if(_class.isElementOrFragment(node)){nodes.add(node);}});if(hasText){_classPrivateFieldBase(this,_queueForRescan)[_queueForRescan](mutation.target);}else{nodes.forEach(node=>_classPrivateFieldBase(this,_queueForRescan)[_queueForRescan](node));}}}});}function _createDebounceMouseMover2(){return debounce(targetNode=>{const startNode=targetNode;let foundNode=null;while(targetNode&&targetNode!==document.body){if(_classPrivateFieldBase(this,_observedNodes)[_observedNodes].has(targetNode)){foundNode=targetNode;break;}targetNode=targetNode.parentElement;}_classPrivateFieldBase(this,_hoveredNode)[_hoveredNode]=foundNode||startNode;const{mouseHoverKey}=_classPrivateFieldBase(this,translator_setting)[translator_setting].mouseHoverSetting;if(mouseHoverKey.length===0&&!_classPrivateFieldBase(this,_isInitialized)[_isInitialized]){_classPrivateFieldBase(this,_init)[_init]();}if(mouseHoverKey.length===0&&foundNode){_classPrivateFieldBase(this,_processNode)[_processNode](foundNode);}},100);}function _handleMouseMove2(event){let targetNode=event.composedPath()[0];_classPrivateFieldBase(this,_dmm)[_dmm](targetNode);}function _handleKeyDown2(){if(!_classPrivateFieldBase(this,_isInitialized)[_isInitialized]){_classPrivateFieldBase(this,_init)[_init]();}let targetNode=_classPrivateFieldBase(this,_hoveredNode)[_hoveredNode];if(!targetNode||!_classPrivateFieldBase(this,_observedNodes)[_observedNodes].has(targetNode))return;_classPrivateFieldBase(this,_toggleTargetNode)[_toggleTargetNode](targetNode);}function _toggleTargetNode2(targetNode){if(_classPrivateFieldBase(this,_processedNodes)[_processedNodes].has(targetNode)){_classPrivateFieldBase(this,_cleanupDirectTranslations)[_cleanupDirectTranslations](targetNode);}else{_classPrivateFieldBase(this,_processNode)[_processNode](targetNode);}}function _findAllShadowRoots2(){let root=arguments.length>0&&arguments[0]!==undefined?arguments[0]:document.body;let results=arguments.length>1&&arguments[1]!==undefined?arguments[1]:new Set();// const start = performance.now(); try{const walker=document.createTreeWalker(root,NodeFilter.SHOW_ELEMENT);while(walker.nextNode()){const node=walker.currentNode;if(node.shadowRoot){results.add(node.shadowRoot);_classPrivateFieldBase(this,_findAllShadowRoots)[_findAllShadowRoots](node.shadowRoot,results);}}}catch(err){log_kissLog("无法访问某个 shadowRoot",err);}// const end = performance.now(); // const duration = end - start; @@ -36676,12 +36691,13 @@ const newTextNode=document.createTextNode(fragment);_classPrivateFieldBase(this, if(trimmedText.length<_classPrivateFieldBase(this,translator_setting)[translator_setting].minLength||trimmedText.length>_classPrivateFieldBase(this,translator_setting)[translator_setting].maxLength){return true;}// 单个非字母数字字符。 if(trimmedText.length===1&&!trimmedText.match(/[a-zA-Z]/)){return true;}// 只是一个数字 if(!isNaN(parseFloat(trimmedText))&&isFinite(trimmedText)){return true;}// 正则匹配 -if(_classPrivateFieldBase(this,_combinedSkipsRegex)[_combinedSkipsRegex].test(trimmedText)){return true;}return false;}async function _translateNodeGroup2(nodes,hostNode,deLang){const{transTag,textStyle,transEndHook,transOnly,termsStyle,selectStyle,parentStyle,grandStyle,// detectRemote, +if(_classPrivateFieldBase(this,_combinedSkipsRegex)[_combinedSkipsRegex].test(trimmedText)){return true;}return false;}async function _translateNodeGroup2(nodes,hostNode,deLang){const{transTag,textStyle,transEndHook,transOnly,termsStyle,textExtStyle,selectStyle,parentStyle,grandStyle,// detectRemote, // toLang, // skipLangs = [], highlightWords}=_classPrivateFieldBase(this,_rule)[_rule];const{newlineLength// langDetector, }=_classPrivateFieldBase(this,translator_setting)[translator_setting];const parentNode=hostNode.parentElement;const hideOrigin=transOnly==="true";try{const[processedString,placeholderMap]=_classPrivateFieldBase(this,_serializeForTranslation)[_serializeForTranslation](nodes,termsStyle);// console.log("processedString", processedString); -if(_classPrivateFieldBase(this,_isInvalidText)[_isInvalidText](processedString))return;const wrapper=document.createElement(_classPrivateFieldBase(this,_translationTagName)[_translationTagName]);wrapper.className=_class.KISS_CLASS.warpper;if(processedString.length>newlineLength){const br=document.createElement("br");br.hidden=hideOrigin;wrapper.appendChild(br);}const inner=document.createElement(transTag);inner.className="".concat(_class.KISS_CLASS.inner," ").concat(_classPrivateFieldBase(this,_textClass)[_textClass][textStyle]);inner.appendChild(createLoadingSVG());wrapper.appendChild(inner);nodes[nodes.length-1].after(wrapper);const currentRunId=_classPrivateFieldBase(this,_runId)[_runId];const{trText:translatedText,isSame:isSameLang}=await _classPrivateFieldBase(this,_translateFetch)[_translateFetch](processedString,deLang);if(_classPrivateFieldBase(this,_runId)[_runId]!==currentRunId){throw new Error("Request terminated");}if(!translatedText||isSameLang){wrapper.remove();return;}const htmlString=_classPrivateFieldBase(this,_restoreFromTranslation)[_restoreFromTranslation](translatedText,placeholderMap);const trustedHTML=trustedTypesHelper.createHTML(htmlString);// const parser = new DOMParser(); +if(_classPrivateFieldBase(this,_isInvalidText)[_isInvalidText](processedString))return;const wrapper=document.createElement(_classPrivateFieldBase(this,_translationTagName)[_translationTagName]);wrapper.className=_class.KISS_CLASS.warpper;if(processedString.length>newlineLength){const br=document.createElement("br");br.hidden=hideOrigin;wrapper.appendChild(br);}const inner=document.createElement(transTag);inner.className="".concat(_class.KISS_CLASS.inner," ").concat(_classPrivateFieldBase(this,_textClass)[_textClass][textStyle]||"");if(textExtStyle!==null&&textExtStyle!==void 0&&textExtStyle.trim()){inner.style.cssText=textExtStyle;// 附加内联样式 +}inner.appendChild(createLoadingSVG());wrapper.appendChild(inner);nodes[nodes.length-1].after(wrapper);const currentRunId=_classPrivateFieldBase(this,_runId)[_runId];const{trText:translatedText,isSame:isSameLang}=await _classPrivateFieldBase(this,_translateFetch)[_translateFetch](processedString,deLang);if(_classPrivateFieldBase(this,_runId)[_runId]!==currentRunId){throw new Error("Request terminated");}if(!translatedText||isSameLang){wrapper.remove();return;}const htmlString=_classPrivateFieldBase(this,_restoreFromTranslation)[_restoreFromTranslation](translatedText,placeholderMap);const trustedHTML=trustedTypesHelper.createHTML(htmlString);// const parser = new DOMParser(); // const doc = parser.parseFromString(trustedHTML, "text/html"); // const innerElement = doc.body.firstChild; // inner.replaceChildren(innerElement); @@ -36697,7 +36713,7 @@ if(node.nodeType===Node.TEXT_NODE){let text=node.textContent;// 专业术语替 if(_classPrivateFieldBase(this,_combinedTermsRegex)[_combinedTermsRegex]){_classPrivateFieldBase(this,_combinedTermsRegex)[_combinedTermsRegex].lastIndex=0;text=text.replace(_classPrivateFieldBase(this,_combinedTermsRegex)[_combinedTermsRegex],function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}const groups=args.slice(1,-2);const matchedIndex=groups.findIndex(group=>group!==undefined);const fullMatch=args[0];const termValue=_classPrivateFieldBase(_this,_termValues)[_termValues][matchedIndex];return pushReplace("").concat(termValue||fullMatch,""));});}return text;}// 元素节点 if(node.nodeType===Node.ELEMENT_NODE){if(_classPrivateFieldBase(this,_rule)[_rule].hasRichText==="true"&&_class.TAGS.REPLACE.has(node.tagName)||node.matches(_classPrivateFieldBase(this,_rule)[_rule].keepSelector)||// node.matches(this.#ignoreSelector) || !node.textContent.trim()){if(node.tagName==="IMG"||node.tagName==="SVG"){node.style.width="".concat(node.offsetWidth,"px");node.style.height="".concat(node.offsetHeight,"px");}return pushReplace(node.outerHTML);}let innerContent="";node.childNodes.forEach(child=>{innerContent+=traverse(child);});if(_classPrivateFieldBase(this,_rule)[_rule].hasRichText==="true"&&_class.TAGS.WARP.has(node.tagName)){wrapCounter++;const startPlaceholder="<".concat(_classPrivateFieldBase(this,_placeholder)[_placeholder].tagName).concat(wrapCounter,">");const endPlaceholder="");placeholderMap.set(startPlaceholder,buildOpeningTag(node));placeholderMap.set(endPlaceholder,""));return"".concat(startPlaceholder).concat(innerContent).concat(endPlaceholder);}return innerContent;}return"";};function buildOpeningTag(node){const escapeAttr=str=>str.replace(/"/g,""");let tag="<".concat(node.tagName.toLowerCase());for(const attr of node.attributes){tag+=" ".concat(attr.name,"=\"").concat(escapeAttr(attr.value),"\"");}tag+=">";return tag;}const processedString=nodes.map(traverse).join("").trim();return[processedString,placeholderMap];}function _restoreFromTranslation2(translatedText,placeholderMap){if(!placeholderMap.size){return translatedText;}if(!translatedText)return"";return translatedText.replace(_classPrivateFieldBase(this,_placeholderRegex)[_placeholderRegex],match=>placeholderMap.get(match)||match);}function _translateFetch2(text){let deLang=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";const{toLang,transStartHook}=_classPrivateFieldBase(this,_rule)[_rule];const fromLang=deLang||_classPrivateFieldBase(this,_rule)[_rule].fromLang;const apiSetting={..._classPrivateFieldBase(this,_apiSetting)[_apiSetting]};const docInfo={..._classPrivateFieldBase(this,_docInfo)[_docInfo]};const glossary={..._classPrivateFieldBase(this,_glossary)[_glossary]};const apisMap=_classPrivateFieldBase(this,_apisMap)[_apisMap];const args={text,fromLang,toLang,apiSetting,docInfo,glossary};// 翻译开始钩子函数 -if(transStartHook!==null&&transStartHook!==void 0&&transStartHook.trim()){try{interpreter.run("exports.transStartHook = ".concat(transStartHook));const hookResult=interpreter.exports.transStartHook({...args,apisMap});if(hookResult){Object.assign(args,...hookResult);}}catch(err){log_kissLog("transStartHook",err);}}return apiTranslate(args);}function _findTranslationWrappers2(parentNode){return parentNode.querySelectorAll(":scope > ".concat(APP_LCNAME));}function _cleanupAllNodes2(){_classPrivateFieldBase(this,_rootNodes)[_rootNodes].forEach(root=>_classPrivateFieldBase(this,_cleanupAllTranslations)[_cleanupAllTranslations](root));}function _cleanupAllTranslations2(root){root.querySelectorAll(APP_LCNAME).forEach(el=>_classPrivateFieldBase(this,_removeTranslationElement)[_removeTranslationElement](el));}function _cleanupDirectTranslations2(node){_classPrivateFieldBase(this,_findTranslationWrappers)[_findTranslationWrappers](node).forEach(el=>{_classPrivateFieldBase(this,_removeTranslationElement)[_removeTranslationElement](el);});}function _removeTranslationElement2(el){const parentElement=el.parentElement;_classPrivateFieldBase(this,_processedNodes)[_processedNodes].delete(parentElement);// 如果是仅显示译文模式,先恢复原文 +if(transStartHook!==null&&transStartHook!==void 0&&transStartHook.trim()){try{interpreter.run("exports.transStartHook = ".concat(transStartHook));const hookResult=interpreter.exports.transStartHook({...args,apisMap});if(hookResult){Object.assign(args,hookResult);}}catch(err){log_kissLog("transStartHook",err);}}return apiTranslate(args);}function _findTranslationWrappers2(parentNode){return parentNode.querySelectorAll(":scope > ".concat(APP_LCNAME));}function _cleanupAllNodes2(){_classPrivateFieldBase(this,_rootNodes)[_rootNodes].forEach(root=>_classPrivateFieldBase(this,_cleanupAllTranslations)[_cleanupAllTranslations](root));}function _cleanupAllTranslations2(root){root.querySelectorAll(APP_LCNAME).forEach(el=>_classPrivateFieldBase(this,_removeTranslationElement)[_removeTranslationElement](el));}function _cleanupDirectTranslations2(node){_classPrivateFieldBase(this,_findTranslationWrappers)[_findTranslationWrappers](node).forEach(el=>{_classPrivateFieldBase(this,_removeTranslationElement)[_removeTranslationElement](el);});}function _removeTranslationElement2(el){const parentElement=el.parentElement;_classPrivateFieldBase(this,_processedNodes)[_processedNodes].delete(parentElement);// 如果是仅显示译文模式,先恢复原文 const{nodes,isHide}=_classPrivateFieldBase(this,_translationNodes)[_translationNodes].get(el)||{};if(isHide){_classPrivateFieldBase(this,_restoreOriginal)[_restoreOriginal](el,nodes);}_classPrivateFieldBase(this,_translationNodes)[_translationNodes].delete(el);el.remove();// todo: 可能不应深度清除 if(_classPrivateFieldBase(this,_rule)[_rule].highlightWords===OPT_HIGHLIGHT_WORDS_AFTERTRANS){_classPrivateFieldBase(this,_removeHighlights)[_removeHighlights](parentElement);}_classPrivateFieldBase(this,_removeBrTags)[_removeBrTags](parentElement);}function _restoreOriginal2(el,nodes){if(nodes){const frag=document.createDocumentFragment();nodes.forEach(n=>frag.appendChild(n));const parent=el.parentElement;parent===null||parent===void 0?void 0:parent.insertBefore(frag,el);}}function _removeNodes2(nodes){if(nodes){const frag=document.createDocumentFragment();nodes.forEach(n=>frag.appendChild(n));}}function _toggleTranslationOnly2(node,transOnly){_classPrivateFieldBase(this,_findTranslationWrappers)[_findTranslationWrappers](node).forEach(el=>{const br=el.querySelector(":scope > br");const{nodes}=_classPrivateFieldBase(this,_translationNodes)[_translationNodes].get(el)||{};if(transOnly==="true"){// 双语变为仅译文 if(br)br.hidden=true;_classPrivateFieldBase(this,_removeNodes)[_removeNodes](nodes);_classPrivateFieldBase(this,_translationNodes)[_translationNodes].set(el,{nodes,isHide:true});}else{// 仅译文变为双语 @@ -39330,7 +39346,7 @@ Divider.muiSkipListHighlight = true; false ? 0 : void 0; /* harmony default export */ const Divider_Divider = (Divider); ;// CONCATENATED MODULE: ./src/hooks/Loading.js -function Loading(){return/*#__PURE__*/(0,jsx_runtime.jsxs)("center",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Divider_Divider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Link_Link,{href:"https://github.com/fishjar/kiss-translator",children:"KISS Translator v".concat("2.0.5")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{})]});} +function Loading(){return/*#__PURE__*/(0,jsx_runtime.jsxs)("center",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Divider_Divider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Link_Link,{href:"https://github.com/fishjar/kiss-translator",children:"KISS Translator v".concat("2.0.6")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{})]});} ;// CONCATENATED MODULE: ./src/hooks/Setting.js const SettingContext=/*#__PURE__*/(0,react.createContext)({setting:setting_DEFAULT_SETTING,updateSetting:()=>{},reloadSetting:()=>{}});function SettingProvider(_ref){let{children}=_ref;const{data:setting,isLoading,update,reload}=useStorage(storage_STOKEY_SETTING,setting_DEFAULT_SETTING,storage_KV_SETTING_KEY);(0,react.useEffect)(()=>{if(typeof(setting===null||setting===void 0?void 0:setting.darkMode)==="boolean"){update(currentSetting=>({...currentSetting,darkMode:currentSetting.darkMode?"dark":"light"}));}},[setting===null||setting===void 0?void 0:setting.darkMode,update]);(0,react.useEffect)(()=>{(async()=>{try{logger.setLevel(setting===null||setting===void 0?void 0:setting.logLevel);if(isExt){await sendBgMsg(MSG_SET_LOGLEVEL,setting===null||setting===void 0?void 0:setting.logLevel);}}catch(error){logger.error("Failed to fetch log level, using default.",error);}})();},[setting]);const updateSetting=(0,react.useCallback)(objOrFn=>{update(objOrFn);debounceSyncMeta(storage_KV_SETTING_KEY);},[update]);const updateChild=(0,react.useCallback)(key=>async obj=>{updateSetting(prev=>({...prev,[key]:{...((prev===null||prev===void 0?void 0:prev[key])||{}),...obj}}));},[updateSetting]);const value=(0,react.useMemo)(()=>({setting,updateSetting,updateChild,reloadSetting:reload}),[setting,updateSetting,updateChild,reload]);if(isLoading){return/*#__PURE__*/(0,jsx_runtime.jsx)(Loading,{});}if(!setting){/*#__PURE__*/(0,jsx_runtime.jsx)("center",{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Alert_Alert,{severity:"error",sx:{maxWidth:600,margin:"60px auto"},children:[/*#__PURE__*/(0,jsx_runtime.jsx)("p",{children:"\u6570\u636E\u52A0\u8F7D\u51FA\u9519\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u6216\u5378\u8F7D\u540E\u91CD\u65B0\u5B89\u88C5\u3002"}),/*#__PURE__*/(0,jsx_runtime.jsx)("p",{children:"Data loading error, please refresh the page or uninstall and reinstall."})]})});}return/*#__PURE__*/(0,jsx_runtime.jsx)(SettingContext.Provider,{value:value,children:children});}/** * 设置 hook @@ -39665,9 +39681,8 @@ function CssBaseline(inProps) { * mui 主题配置 * @param {*} param0 * @returns - */function Theme(_ref){let{children,options,styles}=_ref;const{darkMode}=useDarkMode();const[systemMode,setSystemMode]=(0,react.useState)(THEME_LIGHT);(0,react.useEffect)(()=>{if(typeof window.matchMedia!=="function"){return;}const mediaQuery=window.matchMedia("(prefers-color-scheme: dark)");const handleChange=()=>{setSystemMode(mediaQuery.matches?THEME_DARK:THEME_LIGHT);};handleChange();// Set initial value -mediaQuery.addEventListener("change",handleChange);return()=>mediaQuery.removeEventListener("change",handleChange);},[]);const theme=(0,react.useMemo)(()=>{let htmlFontSize=16;try{const s=window.getComputedStyle(document.body.parentNode).fontSize;const fontSize=parseInt(s.replace("px",""));if(fontSize>0&&fontSize<1000){htmlFontSize=fontSize;}}catch(err){// -}const isDarkMode=darkMode==="dark"||darkMode==="auto"&&systemMode===THEME_DARK;return (0,createTheme/* default */.Z)({palette:{mode:isDarkMode?THEME_DARK:THEME_LIGHT},typography:{htmlFontSize},...options});},[darkMode,options,systemMode]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(styles_ThemeProvider_ThemeProvider,{theme:theme,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(CssBaseline_CssBaseline,{}),/*#__PURE__*/(0,jsx_runtime.jsx)(material_GlobalStyles_GlobalStyles,{styles:styles}),children]});} + */function Theme(_ref){let{children,options={},styles={}}=_ref;const{darkMode}=useDarkMode();const[systemMode,setSystemMode]=(0,react.useState)(THEME_LIGHT);(0,react.useEffect)(()=>{if(typeof window.matchMedia!=="function"){return;}const mediaQuery=window.matchMedia("(prefers-color-scheme: dark)");const handleChange=()=>{setSystemMode(mediaQuery.matches?THEME_DARK:THEME_LIGHT);};handleChange();// Set initial value +mediaQuery.addEventListener("change",handleChange);return()=>mediaQuery.removeEventListener("change",handleChange);},[]);const theme=(0,react.useMemo)(()=>{const isDarkMode=darkMode==="dark"||darkMode==="auto"&&systemMode===THEME_DARK;return (0,createTheme/* default */.Z)({palette:{mode:isDarkMode?THEME_DARK:THEME_LIGHT},typography:{htmlFontSize:document.documentElement.style.fontSize?"16px":16},...options});},[darkMode,options,systemMode]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(styles_ThemeProvider_ThemeProvider,{theme:theme,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(CssBaseline_CssBaseline,{}),/*#__PURE__*/(0,jsx_runtime.jsx)(material_GlobalStyles_GlobalStyles,{styles:styles}),children]});} // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+styled-engine@5.15.14_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@e_38b353972d011fd8524090cbc8c519bf/node_modules/@mui/styled-engine/index.js + 5 modules var styled_engine = __webpack_require__(5190); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js @@ -46903,7 +46918,7 @@ function SugBaidu(_ref){let{text}=_ref;const{loading,error,data}=useAsyncNow(api function TranForm(_ref){let{text,setText,apiSlugs:initApiSlugs,fromLang:initFromLang,toLang:initToLang,toLang2:initToLang2,transApis,simpleStyle=false,langDetector:initLangDetector="-",enDict:initEnDict="-",enSug:initEnSug="-",isPlaygound=false}=_ref;const i18n=useI18n();const[editMode,setEditMode]=(0,react.useState)(false);const[editText,setEditText]=(0,react.useState)(text);const[apiSlugs,setApiSlugs]=(0,react.useState)(initApiSlugs);const[fromLang,setFromLang]=(0,react.useState)(initFromLang);const[toLang,setToLang]=(0,react.useState)(initToLang);const[toLang2,setToLang2]=(0,react.useState)(initToLang2);const[langDetector,setLangDetector]=(0,react.useState)(initLangDetector);const[enDict,setEnDict]=(0,react.useState)(initEnDict);const[enSug,setEnSug]=(0,react.useState)(initEnSug);const[deLang,setDeLang]=(0,react.useState)("");const[deLoading,setDeLoading]=(0,react.useState)(false);(0,react.useEffect)(()=>{if(!editMode){setEditText(text);}},[text,editMode]);(0,react.useEffect)(()=>{if(!text.trim()){setDeLang("");return;}(async()=>{try{setDeLoading(true);const deLang=await tryDetectLang(text,langDetector);if(deLang){setDeLang(deLang);}}catch(err){log_kissLog("tranbox: detect lang",err);}finally{setDeLoading(false);}})();},[text,langDetector,setDeLang,setDeLoading]);// todo: 语言变化后,realToLang引发二次翻译请求 const realToLang=(0,react.useMemo)(()=>{if(fromLang==="auto"&&toLang!==toLang2&&toLang2!=="-"&&deLang===toLang){return toLang2;}return toLang;},[fromLang,toLang,toLang2,deLang]);const optApis=(0,react.useMemo)(()=>transApis.filter(api=>!api.isDisabled).map(api=>({key:api.apiSlug,name:api.apiName||api.apiSlug})),[transApis]);const isWord=(0,react.useMemo)(()=>isValidWord(text),[text]);const xs=(0,react.useMemo)(()=>isPlaygound?3:4,[isPlaygound]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:simpleStyle?1:2,children:[!simpleStyle&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{multiple:true,MenuProps:{disablePortal:!isPlaygound}},fullWidth:true,size:"small",value:apiSlugs,name:"apiSlugs",label:i18n("translate_service_multiple"),onChange:e=>{setApiSlugs(e.target.value);},children:optApis.map(_ref2=>{let{key,name}=_ref2;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:key,children:name},key);})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:!isPlaygound}},fullWidth:true,size:"small",name:"fromLang",value:fromLang,label:i18n("from_lang"),onChange:e=>{setFromLang(e.target.value);},children:OPT_LANGS_FROM.map(_ref3=>{let[lang,name]=_ref3;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:!isPlaygound}},fullWidth:true,size:"small",name:"toLang",value:toLang,label:i18n("to_lang"),onChange:e=>{setToLang(e.target.value);},children:OPT_LANGS_TO.map(_ref4=>{let[lang,name]=_ref4;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})})}),isPlaygound&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:!isPlaygound}},fullWidth:true,size:"small",name:"toLang2",value:toLang2,label:i18n("to_lang2"),onChange:e=>{setToLang2(e.target.value);},children:OPT_LANGS_TO.map(_ref5=>{let[lang,name]=_ref5;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:!isPlaygound}},fullWidth:true,size:"small",name:"enDict",value:enDict,label:i18n("english_dict"),onChange:e=>{setEnDict(e.target.value);},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"-",children:i18n("disable")}),OPT_DICT_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:item},item))]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:!isPlaygound}},fullWidth:true,size:"small",name:"enSug",value:enSug,label:i18n("english_suggest"),onChange:e=>{setEnSug(e.target.value);},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"-",children:i18n("disable")}),OPT_SUG_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:item},item))]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:!isPlaygound}},fullWidth:true,size:"small",name:"langDetector",value:langDetector,label:i18n("detected_lang"),onChange:e=>{setLangDetector(e.target.value);},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"-",children:i18n("disable")}),OPT_LANGDETECTOR_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:item},item))]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{fullWidth:true,size:"small",name:"deLang",value:deLang&&OPT_LANGS_MAP.get(deLang),label:i18n("detected_result"),disabled:true,InputProps:{startAdornment:deLoading?/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{size:16}):null}})})]})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("original_text"),fullWidth:true,multiline:true,minRows:isPlaygound?2:1,maxRows:10,value:editText,onChange:e=>{setEditText(e.target.value);},onFocus:()=>{setEditMode(true);},onBlur:()=>{setEditMode(false);setText(editText.trim());},InputProps:{endAdornment:/*#__PURE__*/(0,jsx_runtime.jsx)(Stack_Stack,{direction:"row",sx:{position:"absolute",right:0,top:0},children:editMode?/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",onClick:e=>{e.stopPropagation();setEditMode(false);setText(editText.trim());},children:/*#__PURE__*/(0,jsx_runtime.jsx)(Done/* default */.Z,{fontSize:"inherit"})}):/*#__PURE__*/(0,jsx_runtime.jsx)(CopyBtn,{text:text})})}})})]}),apiSlugs.map(slug=>/*#__PURE__*/(0,jsx_runtime.jsx)(TranCont,{text:text,fromLang:fromLang,toLang:realToLang,simpleStyle:simpleStyle,apiSlug:slug,transApis:transApis},slug)),isWord&&OPT_DICT_MAP.has(enDict)&&/*#__PURE__*/(0,jsx_runtime.jsx)(DictCont,{text:text,enDict:enDict}),isWord&&OPT_SUG_MAP.has(enSug)&&/*#__PURE__*/(0,jsx_runtime.jsx)(SugCont,{text:text,enSug:enSug})]});} ;// CONCATENATED MODULE: ./src/views/Selection/TranBox.js -function Header(_ref){let{setShowBox,simpleStyle,setSimpleStyle,hideClickAway,setHideClickAway,followSelection,setFollowSelection,mouseHover}=_ref;const i18n=useI18n();if(!isMobile&&simpleStyle&&!mouseHover){return;}return/*#__PURE__*/(0,jsx_runtime.jsxs)(Box_Box,{onMouseUp:e=>e.stopPropagation(),onTouchEnd:e=>e.stopPropagation(),children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(DragIndicator/* default */.Z,{fontSize:"small"}),/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{variant:"body2",sx:{userSelect:"none",WebkitUserSelect:"none",fontWeight:"bold"},children:"".concat("KISS Translator"," v").concat("2.0.5")})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",title:i18n("btn_tip_click_away"),onClick:()=>{setHideClickAway(pre=>!pre);},children:hideClickAway?/*#__PURE__*/(0,jsx_runtime.jsx)(LockOpen/* default */.Z,{fontSize:"small"}):/*#__PURE__*/(0,jsx_runtime.jsx)(Lock/* default */.Z,{fontSize:"small"})}),/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",title:i18n("btn_tip_follow_selection"),onClick:()=>{setFollowSelection(pre=>!pre);},children:followSelection?/*#__PURE__*/(0,jsx_runtime.jsx)(PushPinOutlined/* default */.Z,{fontSize:"small"}):/*#__PURE__*/(0,jsx_runtime.jsx)(PushPin/* default */.Z,{fontSize:"small"})}),/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",title:i18n("btn_tip_simple_style"),onClick:()=>{setSimpleStyle(pre=>!pre);},children:simpleStyle?/*#__PURE__*/(0,jsx_runtime.jsx)(UnfoldMore/* default */.Z,{fontSize:"small"}):/*#__PURE__*/(0,jsx_runtime.jsx)(UnfoldLess/* default */.Z,{fontSize:"small"})}),/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",onClick:()=>{setShowBox(false);},children:/*#__PURE__*/(0,jsx_runtime.jsx)(icons_material_Close/* default */.Z,{fontSize:"small"})})]})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(Divider_Divider,{})]});}function TranBox(_ref2){let{showBox,text,setText,setShowBox,tranboxSetting:{enDict,enSug,apiSlugs,fromLang,toLang,toLang2,autoHeight},transApis,boxSize,setBoxSize,boxPosition,setBoxPosition,simpleStyle,setSimpleStyle,hideClickAway,setHideClickAway,followSelection,setFollowSelection,extStyles="",langDetector}=_ref2;const[mouseHover,setMouseHover]=(0,react.useState)(false);// todo: 这里的 SettingProvider 不应和 background 的共用 +function Header(_ref){let{setShowBox,simpleStyle,setSimpleStyle,hideClickAway,setHideClickAway,followSelection,setFollowSelection,mouseHover}=_ref;const i18n=useI18n();if(!isMobile&&simpleStyle&&!mouseHover){return;}return/*#__PURE__*/(0,jsx_runtime.jsxs)(Box_Box,{onMouseUp:e=>e.stopPropagation(),onTouchEnd:e=>e.stopPropagation(),children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(DragIndicator/* default */.Z,{fontSize:"small"}),/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{variant:"body2",sx:{userSelect:"none",WebkitUserSelect:"none",fontWeight:"bold"},children:"".concat("KISS Translator"," v").concat("2.0.6")})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",title:i18n("btn_tip_click_away"),onClick:()=>{setHideClickAway(pre=>!pre);},children:hideClickAway?/*#__PURE__*/(0,jsx_runtime.jsx)(LockOpen/* default */.Z,{fontSize:"small"}):/*#__PURE__*/(0,jsx_runtime.jsx)(Lock/* default */.Z,{fontSize:"small"})}),/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",title:i18n("btn_tip_follow_selection"),onClick:()=>{setFollowSelection(pre=>!pre);},children:followSelection?/*#__PURE__*/(0,jsx_runtime.jsx)(PushPinOutlined/* default */.Z,{fontSize:"small"}):/*#__PURE__*/(0,jsx_runtime.jsx)(PushPin/* default */.Z,{fontSize:"small"})}),/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",title:i18n("btn_tip_simple_style"),onClick:()=>{setSimpleStyle(pre=>!pre);},children:simpleStyle?/*#__PURE__*/(0,jsx_runtime.jsx)(UnfoldMore/* default */.Z,{fontSize:"small"}):/*#__PURE__*/(0,jsx_runtime.jsx)(UnfoldLess/* default */.Z,{fontSize:"small"})}),/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",onClick:()=>{setShowBox(false);},children:/*#__PURE__*/(0,jsx_runtime.jsx)(icons_material_Close/* default */.Z,{fontSize:"small"})})]})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(Divider_Divider,{})]});}function TranBox(_ref2){let{showBox,text,setText,setShowBox,tranboxSetting:{enDict,enSug,apiSlugs,fromLang,toLang,toLang2,autoHeight},transApis,boxSize,setBoxSize,boxPosition,setBoxPosition,simpleStyle,setSimpleStyle,hideClickAway,setHideClickAway,followSelection,setFollowSelection,extStyles="",langDetector}=_ref2;const[mouseHover,setMouseHover]=(0,react.useState)(false);// todo: 这里的 SettingProvider 不应和 background 的共用 return/*#__PURE__*/(0,jsx_runtime.jsx)(SettingProvider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Theme,{styles:extStyles,children:showBox&&/*#__PURE__*/(0,jsx_runtime.jsx)(DraggableResizable,{position:boxPosition,size:boxSize,setSize:setBoxSize,setPosition:setBoxPosition,autoHeight:autoHeight,header:/*#__PURE__*/(0,jsx_runtime.jsx)(Header,{setShowBox:setShowBox,simpleStyle:simpleStyle,setSimpleStyle:setSimpleStyle,hideClickAway:hideClickAway,setHideClickAway:setHideClickAway,followSelection:followSelection,setFollowSelection:setFollowSelection,mouseHover:mouseHover}),onClick:e=>e.stopPropagation(),onMouseEnter:()=>setMouseHover(true),onMouseLeave:()=>setMouseHover(false),children:/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{sx:{p:simpleStyle?1:2},children:/*#__PURE__*/(0,jsx_runtime.jsx)(TranForm,{text:text,setText:setText,apiSlugs:apiSlugs,fromLang:fromLang,toLang:toLang,toLang2:toLang2,transApis:transApis,simpleStyle:simpleStyle,langDetector:langDetector,enDict:enDict,enSug:enSug})})})})});} ;// CONCATENATED MODULE: ./src/views/Selection/index.js function Slection(_ref){let{contextMenuType,tranboxSetting,transApis,uiLang,langDetector}=_ref;const{hideTranBtn=false,simpleStyle:initSimpleStyle=false,hideClickAway:initHideClickAway=false,followSelection:initFollowMouse=false,tranboxShortcut=DEFAULT_TRANBOX_SHORTCUT,triggerMode=OPT_TRANBOX_TRIGGER_CLICK,// extStyles, @@ -46914,11 +46929,11 @@ window.addEventListener(isMobile?"touchend":"mouseup",handleMouseup);return()=>{ try{const menuCommandIds=[];contextMenuType!==0&&menuCommandIds.push(GM.registerMenuCommand(langMap("translate_selected_text"),event=>{handleTranbox();},"S"));return()=>{menuCommandIds.forEach(id=>{GM.unregisterMenuCommand(id);});};}catch(err){log_kissLog("registerMenuCommand",err);}},[handleTranbox,contextMenuType,langMap]);(0,react.useEffect)(()=>{if(hideClickAway){const handleHideBox=()=>{setShowBox(false);};window.addEventListener("click",handleHideBox);return()=>{window.removeEventListener("click",handleHideBox);};}},[hideClickAway]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TranBox,{showBox:showBox,text:text,setText:setText,boxSize:boxSize,setBoxSize:setBoxSize,boxPosition:boxPosition,setBoxPosition:setBoxPosition,tranboxSetting:tranboxSetting,transApis:transApis,setShowBox:setShowBox,simpleStyle:simpleStyle,setSimpleStyle:setSimpleStyle,hideClickAway:hideClickAway,setHideClickAway:setHideClickAway,followSelection:followSelection,setFollowSelection:setFollowSelection// extStyles={extStyles} ,langDetector:langDetector}),showBtn&&/*#__PURE__*/(0,jsx_runtime.jsx)(TranBtn,{position:position,btnOffsetX:btnOffsetX,btnOffsetY:btnOffsetY,btnEvent:btnEvent,onTrigger:e=>{e.stopPropagation();handleTrigger();}})]});} ;// CONCATENATED MODULE: ./src/libs/tranbox.js -var _container=/*#__PURE__*/_classPrivateFieldKey("container");var _reactRoot=/*#__PURE__*/_classPrivateFieldKey("reactRoot");var _shadowContainer=/*#__PURE__*/_classPrivateFieldKey("shadowContainer");var _props=/*#__PURE__*/_classPrivateFieldKey("props");class TransboxManager{constructor(){let initialProps=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};Object.defineProperty(this,_container,{writable:true,value:null});Object.defineProperty(this,_reactRoot,{writable:true,value:null});Object.defineProperty(this,_shadowContainer,{writable:true,value:null});Object.defineProperty(this,_props,{writable:true,value:{}});_classPrivateFieldBase(this,_props)[_props]=initialProps;const{tranboxSetting=DEFAULT_TRANBOX_SETTING}=_classPrivateFieldBase(this,_props)[_props];if(tranboxSetting!==null&&tranboxSetting!==void 0&&tranboxSetting.transOpen){this.enable();}}isEnabled(){return!!_classPrivateFieldBase(this,_container)[_container]&&document.body.parentElement.contains(_classPrivateFieldBase(this,_container)[_container]);}enable(){if(!this.isEnabled()){_classPrivateFieldBase(this,_container)[_container]=document.createElement("div");_classPrivateFieldBase(this,_container)[_container].id=APP_CONSTS.boxID;_classPrivateFieldBase(this,_container)[_container].className="notranslate";_classPrivateFieldBase(this,_container)[_container].style.cssText="font-size: 0; width: 0; height: 0; border: 0; padding: 0; margin: 0;";document.body.parentElement.appendChild(_classPrivateFieldBase(this,_container)[_container]);_classPrivateFieldBase(this,_shadowContainer)[_shadowContainer]=_classPrivateFieldBase(this,_container)[_container].attachShadow({mode:"closed"});const emotionRoot=document.createElement("style");const shadowRootElement=document.createElement("div");shadowRootElement.className="".concat(APP_CONSTS.boxID,"_warpper notranslate");_classPrivateFieldBase(this,_shadowContainer)[_shadowContainer].appendChild(emotionRoot);_classPrivateFieldBase(this,_shadowContainer)[_shadowContainer].appendChild(shadowRootElement);const cache=(0,emotion_cache_browser_esm/* default */.Z)({key:APP_CONSTS.boxID,prepend:true,container:emotionRoot});_classPrivateFieldBase(this,_reactRoot)[_reactRoot]=react_dom_client.createRoot(shadowRootElement);this.CacheProvider=_ref=>{let{children}=_ref;return/*#__PURE__*/(0,jsx_runtime.jsx)(emotion_element_c39617d8_browser_esm.C,{value:cache,children:children});};}const AppProvider=this.CacheProvider;_classPrivateFieldBase(this,_reactRoot)[_reactRoot].render(/*#__PURE__*/(0,jsx_runtime.jsx)(react.StrictMode,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(AppProvider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Slection,{..._classPrivateFieldBase(this,_props)[_props]})})}));}disable(){if(!this.isEnabled()||!_classPrivateFieldBase(this,_reactRoot)[_reactRoot]){return;}_classPrivateFieldBase(this,_reactRoot)[_reactRoot].unmount();_classPrivateFieldBase(this,_container)[_container].remove();_classPrivateFieldBase(this,_container)[_container]=null;_classPrivateFieldBase(this,_reactRoot)[_reactRoot]=null;_classPrivateFieldBase(this,_shadowContainer)[_shadowContainer]=null;this.CacheProvider=null;}toggle(){if(this.isEnabled()){this.disable();}else{this.enable();}}update(newProps){_classPrivateFieldBase(this,_props)[_props]={..._classPrivateFieldBase(this,_props)[_props],...newProps};if(this.isEnabled()){var _classPrivateFieldLoo;if(!((_classPrivateFieldLoo=_classPrivateFieldBase(this,_props)[_props].tranboxSetting)!==null&&_classPrivateFieldLoo!==void 0&&_classPrivateFieldLoo.transOpen)){this.disable();}else{this.enable();}}}} +var _container=/*#__PURE__*/_classPrivateFieldKey("container");var _reactRoot=/*#__PURE__*/_classPrivateFieldKey("reactRoot");var _shadowContainer=/*#__PURE__*/_classPrivateFieldKey("shadowContainer");var _props=/*#__PURE__*/_classPrivateFieldKey("props");class TransboxManager{constructor(){let initialProps=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};Object.defineProperty(this,_container,{writable:true,value:null});Object.defineProperty(this,_reactRoot,{writable:true,value:null});Object.defineProperty(this,_shadowContainer,{writable:true,value:null});Object.defineProperty(this,_props,{writable:true,value:{}});_classPrivateFieldBase(this,_props)[_props]=initialProps;const{tranboxSetting=DEFAULT_TRANBOX_SETTING}=_classPrivateFieldBase(this,_props)[_props];if(tranboxSetting!==null&&tranboxSetting!==void 0&&tranboxSetting.transOpen){this.enable();}}isEnabled(){return!!_classPrivateFieldBase(this,_container)[_container]&&document.body.contains(_classPrivateFieldBase(this,_container)[_container]);}enable(){if(!this.isEnabled()){_classPrivateFieldBase(this,_container)[_container]=document.createElement("div");_classPrivateFieldBase(this,_container)[_container].id=APP_CONSTS.boxID;_classPrivateFieldBase(this,_container)[_container].className="notranslate";document.body.appendChild(_classPrivateFieldBase(this,_container)[_container]);_classPrivateFieldBase(this,_shadowContainer)[_shadowContainer]=_classPrivateFieldBase(this,_container)[_container].attachShadow({mode:"open"});const shadowRootElement=document.createElement("div");shadowRootElement.className="".concat(APP_CONSTS.boxID,"_wrapper notranslate");_classPrivateFieldBase(this,_shadowContainer)[_shadowContainer].appendChild(shadowRootElement);const cache=(0,emotion_cache_browser_esm/* default */.Z)({key:APP_CONSTS.boxID,prepend:true,container:_classPrivateFieldBase(this,_shadowContainer)[_shadowContainer]});_classPrivateFieldBase(this,_reactRoot)[_reactRoot]=react_dom_client.createRoot(shadowRootElement);_classPrivateFieldBase(this,_reactRoot)[_reactRoot].render(/*#__PURE__*/(0,jsx_runtime.jsx)(react.StrictMode,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(emotion_element_c39617d8_browser_esm.C,{value:cache,children:/*#__PURE__*/(0,jsx_runtime.jsx)(Slection,{..._classPrivateFieldBase(this,_props)[_props]})})}));}}disable(){if(!this.isEnabled()||!_classPrivateFieldBase(this,_reactRoot)[_reactRoot]){return;}_classPrivateFieldBase(this,_reactRoot)[_reactRoot].unmount();_classPrivateFieldBase(this,_container)[_container].remove();_classPrivateFieldBase(this,_container)[_container]=null;_classPrivateFieldBase(this,_reactRoot)[_reactRoot]=null;_classPrivateFieldBase(this,_shadowContainer)[_shadowContainer]=null;}toggle(){if(this.isEnabled()){this.disable();}else{this.enable();}}update(newProps){_classPrivateFieldBase(this,_props)[_props]={..._classPrivateFieldBase(this,_props)[_props],...newProps};if(this.isEnabled()){var _classPrivateFieldLoo;if(!((_classPrivateFieldLoo=_classPrivateFieldBase(this,_props)[_props].tranboxSetting)!==null&&_classPrivateFieldLoo!==void 0&&_classPrivateFieldLoo.transOpen)){this.disable();}else{this.enable();}}}} ;// CONCATENATED MODULE: ./src/libs/touch.js function touchTapListener(fn){let options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};const config={taps:2,fingers:1,delay:300,...options};let maxTouches=0;let tapCount=0;let tapTimer=null;const handleTouchStart=e=>{maxTouches=Math.max(maxTouches,e.touches.length);};const handleTouchend=e=>{if(e.touches.length===0){if(maxTouches===config.fingers){tapCount++;clearTimeout(tapTimer);if(tapCount===config.taps){fn(e);tapCount=0;}else{tapTimer=setTimeout(()=>{tapCount=0;},config.delay);}}else{tapCount=0;clearTimeout(tapTimer);}maxTouches=0;}};document.addEventListener("touchstart",handleTouchStart,{passive:true});document.addEventListener("touchend",handleTouchend,{passive:true});return()=>{clearTimeout(tapTimer);document.removeEventListener("touchstart",handleTouchStart);document.removeEventListener("touchend",handleTouchend);};} ;// CONCATENATED MODULE: ./src/libs/shadowDomManager.js -var _hostElement=/*#__PURE__*/_classPrivateFieldKey("hostElement");var shadowDomManager_reactRoot=/*#__PURE__*/_classPrivateFieldKey("reactRoot");var _isVisible=/*#__PURE__*/_classPrivateFieldKey("isVisible");var _isProcessing=/*#__PURE__*/_classPrivateFieldKey("isProcessing");var _mount=/*#__PURE__*/_classPrivateFieldKey("mount");class ShadowDomManager{constructor(_ref){let{id,className="",reactComponent,props:_props={}}=_ref;Object.defineProperty(this,_mount,{value:_mount2});Object.defineProperty(this,_hostElement,{writable:true,value:null});Object.defineProperty(this,shadowDomManager_reactRoot,{writable:true,value:null});Object.defineProperty(this,_isVisible,{writable:true,value:false});Object.defineProperty(this,_isProcessing,{writable:true,value:false});if(!id||!reactComponent){throw new Error("ID and a React Component must be provided.");}this._id=id;this._className=className;this._ReactComponent=reactComponent;this._props=_props;}get isVisible(){return _classPrivateFieldBase(this,_isVisible)[_isVisible];}show(props){if(_classPrivateFieldBase(this,_isVisible)[_isVisible]||_classPrivateFieldBase(this,_isProcessing)[_isProcessing]){return;}if(!_classPrivateFieldBase(this,_hostElement)[_hostElement]){_classPrivateFieldBase(this,_isProcessing)[_isProcessing]=true;try{_classPrivateFieldBase(this,_mount)[_mount](props||this._props);}catch(error){logger.warn("Failed to mount component with id \"".concat(this._id,"\":"),error);_classPrivateFieldBase(this,_isProcessing)[_isProcessing]=false;return;}finally{_classPrivateFieldBase(this,_isProcessing)[_isProcessing]=false;}}_classPrivateFieldBase(this,_hostElement)[_hostElement].style.display="";_classPrivateFieldBase(this,_isVisible)[_isVisible]=true;}hide(){if(!_classPrivateFieldBase(this,_isVisible)[_isVisible]||!_classPrivateFieldBase(this,_hostElement)[_hostElement]){return;}_classPrivateFieldBase(this,_hostElement)[_hostElement].style.display="none";_classPrivateFieldBase(this,_isVisible)[_isVisible]=false;}destroy(){if(!_classPrivateFieldBase(this,_hostElement)[_hostElement]){return;}_classPrivateFieldBase(this,_isProcessing)[_isProcessing]=true;if(_classPrivateFieldBase(this,shadowDomManager_reactRoot)[shadowDomManager_reactRoot]){_classPrivateFieldBase(this,shadowDomManager_reactRoot)[shadowDomManager_reactRoot].unmount();}_classPrivateFieldBase(this,_hostElement)[_hostElement].remove();_classPrivateFieldBase(this,_hostElement)[_hostElement]=null;_classPrivateFieldBase(this,shadowDomManager_reactRoot)[shadowDomManager_reactRoot]=null;_classPrivateFieldBase(this,_isVisible)[_isVisible]=false;_classPrivateFieldBase(this,_isProcessing)[_isProcessing]=false;logger.info("Component with id \"".concat(this._id,"\" has been destroyed."));}toggle(props){if(_classPrivateFieldBase(this,_isVisible)[_isVisible]){this.hide();}else{this.show(props||this._props);}}}function _mount2(props){const host=document.createElement("div");host.id=this._id;if(this._className){host.className=this._className;}host.style.display="none";document.body.parentElement.appendChild(host);_classPrivateFieldBase(this,_hostElement)[_hostElement]=host;const shadowContainer=host.attachShadow({mode:"closed"});const emotionRoot=document.createElement("style");const appRoot=document.createElement("div");appRoot.className="".concat(this._id,"_wrapper");shadowContainer.appendChild(emotionRoot);shadowContainer.appendChild(appRoot);const cache=(0,emotion_cache_browser_esm/* default */.Z)({key:this._id,prepend:true,container:emotionRoot});const enhancedProps={...props,onClose:this.hide.bind(this)};const ComponentToRender=this._ReactComponent;_classPrivateFieldBase(this,shadowDomManager_reactRoot)[shadowDomManager_reactRoot]=react_dom_client.createRoot(appRoot);_classPrivateFieldBase(this,shadowDomManager_reactRoot)[shadowDomManager_reactRoot].render(/*#__PURE__*/(0,jsx_runtime.jsx)(react.StrictMode,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(emotion_element_c39617d8_browser_esm.C,{value:cache,children:/*#__PURE__*/(0,jsx_runtime.jsx)(ComponentToRender,{...enhancedProps})})}));} +var _hostElement=/*#__PURE__*/_classPrivateFieldKey("hostElement");var shadowDomManager_reactRoot=/*#__PURE__*/_classPrivateFieldKey("reactRoot");var _isVisible=/*#__PURE__*/_classPrivateFieldKey("isVisible");var _isProcessing=/*#__PURE__*/_classPrivateFieldKey("isProcessing");var _mount=/*#__PURE__*/_classPrivateFieldKey("mount");class ShadowDomManager{constructor(_ref){let{id,className="",reactComponent,props:_props={}}=_ref;Object.defineProperty(this,_mount,{value:_mount2});Object.defineProperty(this,_hostElement,{writable:true,value:null});Object.defineProperty(this,shadowDomManager_reactRoot,{writable:true,value:null});Object.defineProperty(this,_isVisible,{writable:true,value:false});Object.defineProperty(this,_isProcessing,{writable:true,value:false});if(!id||!reactComponent){throw new Error("ID and a React Component must be provided.");}this._id=id;this._className=className;this._ReactComponent=reactComponent;this._props=_props;}get isVisible(){return _classPrivateFieldBase(this,_isVisible)[_isVisible];}show(props){if(_classPrivateFieldBase(this,_isVisible)[_isVisible]||_classPrivateFieldBase(this,_isProcessing)[_isProcessing]){return;}if(!_classPrivateFieldBase(this,_hostElement)[_hostElement]){_classPrivateFieldBase(this,_isProcessing)[_isProcessing]=true;try{_classPrivateFieldBase(this,_mount)[_mount](props||this._props);}catch(error){logger.warn("Failed to mount component with id \"".concat(this._id,"\":"),error);_classPrivateFieldBase(this,_isProcessing)[_isProcessing]=false;return;}finally{_classPrivateFieldBase(this,_isProcessing)[_isProcessing]=false;}}_classPrivateFieldBase(this,_hostElement)[_hostElement].style.display="";_classPrivateFieldBase(this,_isVisible)[_isVisible]=true;}hide(){if(!_classPrivateFieldBase(this,_isVisible)[_isVisible]||!_classPrivateFieldBase(this,_hostElement)[_hostElement]){return;}_classPrivateFieldBase(this,_hostElement)[_hostElement].style.display="none";_classPrivateFieldBase(this,_isVisible)[_isVisible]=false;}destroy(){if(!_classPrivateFieldBase(this,_hostElement)[_hostElement]){return;}_classPrivateFieldBase(this,_isProcessing)[_isProcessing]=true;if(_classPrivateFieldBase(this,shadowDomManager_reactRoot)[shadowDomManager_reactRoot]){_classPrivateFieldBase(this,shadowDomManager_reactRoot)[shadowDomManager_reactRoot].unmount();}_classPrivateFieldBase(this,_hostElement)[_hostElement].remove();_classPrivateFieldBase(this,_hostElement)[_hostElement]=null;_classPrivateFieldBase(this,shadowDomManager_reactRoot)[shadowDomManager_reactRoot]=null;_classPrivateFieldBase(this,_isVisible)[_isVisible]=false;_classPrivateFieldBase(this,_isProcessing)[_isProcessing]=false;logger.info("Component with id \"".concat(this._id,"\" has been destroyed."));}toggle(props){if(_classPrivateFieldBase(this,_isVisible)[_isVisible]){this.hide();}else{this.show(props||this._props);}}}function _mount2(props){const host=document.createElement("div");host.id=this._id;if(this._className){host.className=this._className;}document.body.appendChild(host);_classPrivateFieldBase(this,_hostElement)[_hostElement]=host;const shadowContainer=host.attachShadow({mode:"open"});const appRoot=document.createElement("div");appRoot.className="".concat(this._id,"_wrapper");shadowContainer.appendChild(appRoot);const cache=(0,emotion_cache_browser_esm/* default */.Z)({key:this._id,prepend:true,container:shadowContainer});const enhancedProps={...props,onClose:this.hide.bind(this)};const ComponentToRender=this._ReactComponent;_classPrivateFieldBase(this,shadowDomManager_reactRoot)[shadowDomManager_reactRoot]=react_dom_client.createRoot(appRoot);_classPrivateFieldBase(this,shadowDomManager_reactRoot)[shadowDomManager_reactRoot].render(/*#__PURE__*/(0,jsx_runtime.jsx)(react.StrictMode,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(emotion_element_c39617d8_browser_esm.C,{value:cache,children:/*#__PURE__*/(0,jsx_runtime.jsx)(ComponentToRender,{...enhancedProps})})}));} ;// CONCATENATED MODULE: ./src/views/Action/Draggable.js const getEdgePosition=_ref=>{let{x:left,y:top,width,height,windowWidth,windowHeight,hover}=_ref;const right=windowWidth-left-width;const bottom=windowHeight-top-height;const min=Math.min(left,top,right,bottom);switch(min){case right:left=hover?windowWidth-width:windowWidth-width/2;break;case left:left=hover?0:-width/2;break;case bottom:top=hover?windowHeight-height:windowHeight-height/2;break;default:top=hover?0:-height/2;}return{x:left,y:top};};function DraggableWrapper(_ref2){let{children,usePaper,...props}=_ref2;if(usePaper){return/*#__PURE__*/(0,jsx_runtime.jsx)(Paper_Paper,{...props,elevation:4,children:children});}return/*#__PURE__*/(0,jsx_runtime.jsx)("div",{...props,children:children});}function Draggable(_ref3){let{windowSize:{w:windowWidth,h:windowHeight},width,height,left,top,show=true,snapEdge,onStart,onMove,handler,children,usePaper}=_ref3;const[hover,setHover]=(0,react.useState)(false);const[origin,setOrigin]=(0,react.useState)(null);const[position,setPosition]=(0,react.useState)({x:left,y:top});const setFabPosition=(0,react.useMemo)(()=>debounce(putFab,500),[]);const handlePointerDown=e=>{!isMobile&&e.target.setPointerCapture(e.pointerId);onStart&&onStart();const{x,y}=position;const{clientX,clientY}=isMobile?e.targetTouches[0]:e;setOrigin({x,y,clientX,clientY});};const handlePointerMove=e=>{onMove&&onMove();const{clientX,clientY}=isMobile?e.targetTouches[0]:e;if(origin){const dx=clientX-origin.clientX;const dy=clientY-origin.clientY;let x=origin.x+dx;let y=origin.y+dy;x=limitNumber(x,-width/2,windowWidth-width/2);y=limitNumber(y,0,windowHeight-height/2);setPosition({x,y});}};const handlePointerUp=e=>{e.stopPropagation();setOrigin(null);};const handleClick=e=>{e.stopPropagation();};const handleMouseEnter=e=>{e.stopPropagation();setHover(true);};const handleMouseLeave=e=>{e.stopPropagation();setHover(false);};(0,react.useEffect)(()=>{if(!snapEdge||!!origin){return;}setPosition(pre=>{const edgePosition=getEdgePosition({...pre,width,height,windowWidth,windowHeight,hover});setFabPosition(edgePosition);return edgePosition;});},[origin,hover,width,height,windowWidth,windowHeight,snapEdge,setFabPosition]);const opacity=(0,react.useMemo)(()=>{if(snapEdge){return hover||origin?1:0.2;}return origin?0.8:1;},[origin,snapEdge,hover]);const touchProps=isMobile?{onTouchStart:handlePointerDown,onTouchMove:handlePointerMove,onTouchEnd:handlePointerUp}:{onPointerDown:handlePointerDown,onPointerMove:handlePointerMove,onPointerUp:handlePointerUp};return/*#__PURE__*/(0,jsx_runtime.jsxs)(DraggableWrapper,{usePaper:usePaper,style:{opacity,position:"fixed",left:position.x,top:position.y,zIndex:2147483647,display:show?"block":"none"},onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,onClick:handleClick,children:[/*#__PURE__*/(0,jsx_runtime.jsx)("div",{style:{touchAction:"none"},...touchProps,children:handler}),/*#__PURE__*/(0,jsx_runtime.jsx)("div",{children:children})]});} // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+icons-material@5.15.15_@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@1_1e29dcefa4691dc57f2acd9f73947cfd/node_modules/@mui/icons-material/Home.js @@ -46932,7 +46947,7 @@ var BrightnessAuto = __webpack_require__(5538); ;// CONCATENATED MODULE: ./src/views/Options/DarkModeButton.js function DarkModeButton(){const{darkMode,toggleDarkMode}=useDarkMode();return/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{sx:{ml:1},onClick:toggleDarkMode,color:"inherit",children:darkMode==="dark"?/*#__PURE__*/(0,jsx_runtime.jsx)(DarkMode/* default */.Z,{}):darkMode==="light"?/*#__PURE__*/(0,jsx_runtime.jsx)(LightMode/* default */.Z,{}):/*#__PURE__*/(0,jsx_runtime.jsx)(BrightnessAuto/* default */.Z,{})});} ;// CONCATENATED MODULE: ./src/views/Popup/Header.js -function Header_Header(_ref){let{onClose}=_ref;const handleHomepage=()=>{window.open("https://github.com/fishjar/kiss-translator","_blank");};return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",justifyContent:"flex-start",alignItems:"center",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{onClick:handleHomepage,children:/*#__PURE__*/(0,jsx_runtime.jsx)(Home/* default */.Z,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{component:"div",sx:{userSelect:"none",WebkitUserSelect:"none",fontWeight:"bold"},children:"".concat("KISS Translator"," v").concat("2.0.5")})]}),onClose?/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{onClick:()=>{onClose();},children:/*#__PURE__*/(0,jsx_runtime.jsx)(icons_material_Close/* default */.Z,{})}):/*#__PURE__*/(0,jsx_runtime.jsx)(DarkModeButton,{})]});} +function Header_Header(_ref){let{onClose}=_ref;const handleHomepage=()=>{window.open("https://github.com/fishjar/kiss-translator","_blank");};return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",justifyContent:"flex-start",alignItems:"center",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{onClick:handleHomepage,children:/*#__PURE__*/(0,jsx_runtime.jsx)(Home/* default */.Z,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{component:"div",sx:{userSelect:"none",WebkitUserSelect:"none",fontWeight:"bold"},children:"".concat("KISS Translator"," v").concat("2.0.6")})]}),onClose?/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{onClick:()=>{onClose();},children:/*#__PURE__*/(0,jsx_runtime.jsx)(icons_material_Close/* default */.Z,{})}):/*#__PURE__*/(0,jsx_runtime.jsx)(DarkModeButton,{})]});} ;// CONCATENATED MODULE: ./src/hooks/WindowSize.js function useWindowSize(){const[windowSize,setWindowSize]=(0,react.useState)({w:window.innerWidth,h:window.innerHeight});const debounceWindowResize=useDebouncedCallback(()=>{setWindowSize({w:window.innerWidth,h:window.innerHeight});},200);(0,react.useEffect)(()=>{debounceWindowResize();window.addEventListener("resize",debounceWindowResize);return()=>{window.removeEventListener("resize",debounceWindowResize);};},[debounceWindowResize]);return windowSize;}/* harmony default export */ const WindowSize = (useWindowSize); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/FormControlLabel/formControlLabelClasses.js @@ -47895,8 +47910,10 @@ const Button = /*#__PURE__*/react.forwardRef(function Button(inProps, ref) { }); false ? 0 : void 0; /* harmony default export */ const Button_Button = (Button); +;// CONCATENATED MODULE: ./src/hooks/CustomStyles.js +function useStyleState(){const{setting,updateSetting}=useSetting();const customStyles=(setting===null||setting===void 0?void 0:setting.customStyles)||[];return{customStyles,updateSetting};}function useStyleList(){const{customStyles,updateSetting}=useStyleState();const addStyle=(0,react.useCallback)(()=>{const defaultStyle=DEFAULT_CUSTOM_STYLES[0];const uuid=crypto.randomUUID();const styleSlug="custom_".concat(crypto.randomUUID());const styleName="Style_".concat(uuid.slice(0,8));const newStyle={...defaultStyle,styleSlug,styleName};updateSetting(prev=>({...prev,customStyles:[...((prev===null||prev===void 0?void 0:prev.customStyles)||[]),newStyle]}));},[updateSetting]);const deleteStyle=(0,react.useCallback)(styleSlug=>{updateSetting(prev=>({...prev,customStyles:((prev===null||prev===void 0?void 0:prev.customStyles)||[]).filter(item=>item.styleSlug!==styleSlug)}));},[updateSetting]);const updateStyle=(0,react.useCallback)((styleSlug,updateData)=>{updateSetting(prev=>({...prev,customStyles:((prev===null||prev===void 0?void 0:prev.customStyles)||[]).map(item=>item.styleSlug===styleSlug?{...item,...updateData}:item)}));},[updateSetting]);return{customStyles,addStyle,deleteStyle,updateStyle};}function useAllTextStyles(){const{customStyles}=useStyleList();const i18n=useI18n();const builtinStyles=(0,react.useMemo)(()=>OPT_STYLE_ALL.map(styleSlug=>({styleSlug,styleName:i18n(styleSlug),styleCode:builtinStylesMap[styleSlug]||""})),[i18n]);const allTextStyles=(0,react.useMemo)(()=>{return[...builtinStyles,...customStyles];},[builtinStyles,customStyles]);return{builtinStyles,customStyles,allTextStyles};} ;// CONCATENATED MODULE: ./src/views/Popup/PopupCont.js -function PopupCont(_ref){let{rule,setting,setRule,setSetting,handleOpenSetting,processActions,isContent=false}=_ref;const i18n=useI18n();const[commands,setCommands]=(0,react.useState)({});const handleTransToggle=async e=>{try{setRule({...rule,transOpen:e.target.checked?"true":"false"});if(!processActions){await sendTabMsg(MSG_TRANS_TOGGLE);}else{processActions({action:MSG_TRANS_TOGGLE});}}catch(err){log_kissLog("toggle trans",err);}};const handleTransboxToggle=async e=>{try{setSetting(pre=>({...pre,tranboxSetting:{...pre.tranboxSetting,transOpen:e.target.checked}}));if(!processActions){await sendTabMsg(MSG_TRANSBOX_TOGGLE);}else{processActions({action:MSG_TRANSBOX_TOGGLE});}}catch(err){log_kissLog("toggle transbox",err);}};const handleMousehoverToggle=async e=>{try{setSetting(pre=>({...pre,mouseHoverSetting:{...pre.mouseHoverSetting,useMouseHover:e.target.checked}}));if(!processActions){await sendTabMsg(MSG_MOUSEHOVER_TOGGLE);}else{processActions({action:MSG_MOUSEHOVER_TOGGLE});}}catch(err){log_kissLog("toggle mousehover",err);}};const handleInputTransToggle=async e=>{try{setSetting(pre=>({...pre,inputRule:{...pre.inputRule,transOpen:e.target.checked}}));if(!processActions){await sendTabMsg(MSG_TRANSINPUT_TOGGLE);}else{processActions({action:MSG_TRANSINPUT_TOGGLE});}}catch(err){log_kissLog("toggle inputtrans",err);}};const handleChange=async e=>{try{const{name,value}=e.target;setRule(pre=>({...pre,[name]:value}));if(!processActions){await sendTabMsg(MSG_TRANS_PUTRULE,{[name]:value});}else{processActions({action:MSG_TRANS_PUTRULE,args:{[name]:value}});}}catch(err){log_kissLog("update rule",err);}};const handleClearCache=()=>{tryClearCaches();};const handleSaveRule=async()=>{try{let href="";if(!isContent){const tab=await getCurTab();href=tab.url;}else{var _window$location;href=(_window$location=window.location)===null||_window$location===void 0?void 0:_window$location.href;}if(!href||typeof href!=="string"){return;}const pattern=parseUrlPattern(href);const curRule={...rule,pattern};if(isExt&&isContent){sendBgMsg(MSG_SAVE_RULE,curRule);}else{saveRule(curRule);}}catch(err){log_kissLog("save rule",err);}};(0,react.useEffect)(()=>{(async()=>{try{const commands={};if(isExt){const res=await sendBgMsg(MSG_COMMAND_SHORTCUTS);res.forEach(_ref2=>{let{name,shortcut}=_ref2;commands[name]=shortcut;});}else{const shortcuts=setting.shortcuts;if(shortcuts){Object.entries(shortcuts).forEach(_ref3=>{let[key,val]=_ref3;commands[key]=val.join("+");});}}setCommands(commands);}catch(err){log_kissLog("query cmds",err);}})();},[setting.shortcuts]);const optApis=(0,react.useMemo)(()=>setting.transApis.filter(api=>!api.isDisabled).map(api=>({key:api.apiSlug,name:api.apiName||api.apiSlug})),[setting.transApis]);const tranboxEnabled=setting.tranboxSetting.transOpen;const mouseHoverEnabled=setting.mouseHoverSetting.useMouseHover;const inputTransEnabled=setting.inputRule.transOpen;const{transOpen,apiSlug,fromLang,toLang,textStyle,autoScan,transOnly,hasRichText,hasShadowroot}=rule;return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{sx:{p:2},spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,columns:12,spacing:1,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{checked:transOpen==="true",onChange:handleTransToggle}),label:commands["toggleTranslate"]?"".concat(i18n("translate_alt"),"(").concat(commands["toggleTranslate"],")"):i18n("translate_alt")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"autoScan",value:autoScan==="true"?"false":"true",checked:autoScan==="true",onChange:handleChange}),label:i18n("autoscan_alt")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"hasShadowroot",value:hasShadowroot==="true"?"false":"true",checked:hasShadowroot==="true",onChange:handleChange}),label:i18n("shadowroot_alt")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"hasRichText",value:hasRichText==="true"?"false":"true",checked:hasRichText==="true",onChange:handleChange}),label:i18n("richtext_alt")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"transOnly",value:transOnly==="true"?"false":"true",checked:transOnly==="true",onChange:handleChange}),label:i18n("transonly_alt")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"tranboxEnabled",value:!tranboxEnabled,checked:tranboxEnabled,onChange:handleTransboxToggle}),label:i18n("selection_translate")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"mouseHoverEnabled",value:!mouseHoverEnabled,checked:mouseHoverEnabled,onChange:handleMousehoverToggle}),label:i18n("mousehover_translate")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"inputTransEnabled",value:!inputTransEnabled,checked:inputTransEnabled,onChange:handleInputTransToggle}),label:i18n("input_translate")})})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:true}},size:"small",value:apiSlug,name:"apiSlug",label:i18n("translate_service"),onChange:handleChange,children:optApis.map(_ref4=>{let{key,name}=_ref4;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:key,children:name},key);})}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:true}},size:"small",value:fromLang,name:"fromLang",label:i18n("from_lang"),onChange:handleChange,children:OPT_LANGS_FROM.map(_ref5=>{let[lang,name]=_ref5;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:true}},size:"small",value:toLang,name:"toLang",label:i18n("to_lang"),onChange:handleChange,children:OPT_LANGS_TO.map(_ref6=>{let[lang,name]=_ref6;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:true}},size:"small",value:textStyle,name:"textStyle",label:commands["toggleStyle"]?"".concat(i18n("text_style_alt"),"(").concat(commands["toggleStyle"],")"):i18n("text_style_alt"),onChange:handleChange,children:OPT_STYLE_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:i18n(item)},item))}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{variant:"text",onClick:handleSaveRule,children:i18n("save_rule")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{variant:"text",onClick:handleClearCache,children:i18n("clear_cache")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{variant:"text",onClick:handleOpenSetting,children:i18n("setting")})]})]});} +function PopupCont(_ref){let{rule,setting,setRule,setSetting,handleOpenSetting,processActions,isContent=false}=_ref;const i18n=useI18n();const[commands,setCommands]=(0,react.useState)({});const{allTextStyles}=useAllTextStyles();const handleTransToggle=async e=>{try{setRule({...rule,transOpen:e.target.checked?"true":"false"});if(!processActions){await sendTabMsg(MSG_TRANS_TOGGLE);}else{processActions({action:MSG_TRANS_TOGGLE});}}catch(err){log_kissLog("toggle trans",err);}};const handleTransboxToggle=async e=>{try{setSetting(pre=>({...pre,tranboxSetting:{...pre.tranboxSetting,transOpen:e.target.checked}}));if(!processActions){await sendTabMsg(MSG_TRANSBOX_TOGGLE);}else{processActions({action:MSG_TRANSBOX_TOGGLE});}}catch(err){log_kissLog("toggle transbox",err);}};const handleMousehoverToggle=async e=>{try{setSetting(pre=>({...pre,mouseHoverSetting:{...pre.mouseHoverSetting,useMouseHover:e.target.checked}}));if(!processActions){await sendTabMsg(MSG_MOUSEHOVER_TOGGLE);}else{processActions({action:MSG_MOUSEHOVER_TOGGLE});}}catch(err){log_kissLog("toggle mousehover",err);}};const handleInputTransToggle=async e=>{try{setSetting(pre=>({...pre,inputRule:{...pre.inputRule,transOpen:e.target.checked}}));if(!processActions){await sendTabMsg(MSG_TRANSINPUT_TOGGLE);}else{processActions({action:MSG_TRANSINPUT_TOGGLE});}}catch(err){log_kissLog("toggle inputtrans",err);}};const handleChange=async e=>{try{const{name,value}=e.target;setRule(pre=>({...pre,[name]:value}));if(!processActions){await sendTabMsg(MSG_TRANS_PUTRULE,{[name]:value});}else{processActions({action:MSG_TRANS_PUTRULE,args:{[name]:value}});}}catch(err){log_kissLog("update rule",err);}};const handleClearCache=()=>{tryClearCaches();};const handleSaveRule=async()=>{try{let href="";if(!isContent){const tab=await getCurTab();href=tab.url;}else{var _window$location;href=(_window$location=window.location)===null||_window$location===void 0?void 0:_window$location.href;}if(!href||typeof href!=="string"){return;}const pattern=parseUrlPattern(href);const curRule={...rule,pattern};if(isExt&&isContent){sendBgMsg(MSG_SAVE_RULE,curRule);}else{saveRule(curRule);}}catch(err){log_kissLog("save rule",err);}};(0,react.useEffect)(()=>{(async()=>{try{const commands={};if(isExt){const res=await sendBgMsg(MSG_COMMAND_SHORTCUTS);res.forEach(_ref2=>{let{name,shortcut}=_ref2;commands[name]=shortcut;});}else{const shortcuts=setting.shortcuts;if(shortcuts){Object.entries(shortcuts).forEach(_ref3=>{let[key,val]=_ref3;commands[key]=val.join("+");});}}setCommands(commands);}catch(err){log_kissLog("query cmds",err);}})();},[setting.shortcuts]);const optApis=(0,react.useMemo)(()=>setting.transApis.filter(api=>!api.isDisabled).map(api=>({key:api.apiSlug,name:api.apiName||api.apiSlug})),[setting.transApis]);const tranboxEnabled=setting.tranboxSetting.transOpen;const mouseHoverEnabled=setting.mouseHoverSetting.useMouseHover;const inputTransEnabled=setting.inputRule.transOpen;const{transOpen,apiSlug,fromLang,toLang,textStyle,autoScan,transOnly,hasRichText,hasShadowroot}=rule;return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{sx:{p:2},spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,columns:12,spacing:1,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{checked:transOpen==="true",onChange:handleTransToggle}),label:commands["toggleTranslate"]?"".concat(i18n("translate_alt"),"(").concat(commands["toggleTranslate"],")"):i18n("translate_alt")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"autoScan",value:autoScan==="true"?"false":"true",checked:autoScan==="true",onChange:handleChange}),label:i18n("autoscan_alt")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"hasShadowroot",value:hasShadowroot==="true"?"false":"true",checked:hasShadowroot==="true",onChange:handleChange}),label:i18n("shadowroot_alt")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"hasRichText",value:hasRichText==="true"?"false":"true",checked:hasRichText==="true",onChange:handleChange}),label:i18n("richtext_alt")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"transOnly",value:transOnly==="true"?"false":"true",checked:transOnly==="true",onChange:handleChange}),label:i18n("transonly_alt")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"tranboxEnabled",value:!tranboxEnabled,checked:tranboxEnabled,onChange:handleTransboxToggle}),label:i18n("selection_translate")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"mouseHoverEnabled",value:!mouseHoverEnabled,checked:mouseHoverEnabled,onChange:handleMousehoverToggle}),label:i18n("mousehover_translate")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"inputTransEnabled",value:!inputTransEnabled,checked:inputTransEnabled,onChange:handleInputTransToggle}),label:i18n("input_translate")})})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:true}},size:"small",value:apiSlug,name:"apiSlug",label:i18n("translate_service"),onChange:handleChange,children:optApis.map(_ref4=>{let{key,name}=_ref4;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:key,children:name},key);})}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:true}},size:"small",value:fromLang,name:"fromLang",label:i18n("from_lang"),onChange:handleChange,children:OPT_LANGS_FROM.map(_ref5=>{let[lang,name]=_ref5;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:true}},size:"small",value:toLang,name:"toLang",label:i18n("to_lang"),onChange:handleChange,children:OPT_LANGS_TO.map(_ref6=>{let[lang,name]=_ref6;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:true}},size:"small",value:textStyle,name:"textStyle",label:commands["toggleStyle"]?"".concat(i18n("text_style_alt"),"(").concat(commands["toggleStyle"],")"):i18n("text_style_alt"),onChange:handleChange,children:allTextStyles.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item.styleSlug,children:item.styleName},item.styleSlug))}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{variant:"text",onClick:handleSaveRule,children:i18n("save_rule")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{variant:"text",onClick:handleClearCache,children:i18n("clear_cache")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{variant:"text",onClick:handleOpenSetting,children:i18n("setting")})]})]});} ;// CONCATENATED MODULE: ./src/views/Action/index.js function Action(_ref){let{translator,processActions}=_ref;const[showPopup,setShowPopup]=(0,react.useState)(true);const[rule,setRule]=(0,react.useState)(translator.rule);const[setting,setSetting]=(0,react.useState)(translator.setting);const windowSize=WindowSize();const handleOpenSetting=(0,react.useCallback)(()=>{if(isExt){sendBgMsg(MSG_OPEN_OPTIONS);}else{window.open("https://fishjar.github.io/kiss-translator/options.html","_blank");}},[]);(0,react.useEffect)(()=>{const handleWindowClick=()=>{setShowPopup(false);};window.addEventListener("click",handleWindowClick);return()=>{window.removeEventListener("click",handleWindowClick);};},[]);(0,react.useEffect)(()=>{const handleStatusUpdate=event=>{var _event$detail;if(((_event$detail=event.detail)===null||_event$detail===void 0?void 0:_event$detail.action)===MSG_POPUP_TOGGLE){setShowPopup(pre=>!pre);}};document.addEventListener(EVENT_KISS,handleStatusUpdate);return()=>{document.removeEventListener(EVENT_KISS,handleStatusUpdate);};},[]);(0,react.useEffect)(()=>{if(showPopup){setRule(translator.rule);setSetting(translator.setting);}},[showPopup,translator]);const popProps=(0,react.useMemo)(()=>{const width=Math.min(windowSize.w,360);const height=Math.min(windowSize.h,442);const left=(windowSize.w-width)/2;const top=(windowSize.h-height)/2;return{windowSize,width,height,left,top};},[windowSize]);return/*#__PURE__*/(0,jsx_runtime.jsx)(SettingProvider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Theme,{children:showPopup&&/*#__PURE__*/(0,jsx_runtime.jsx)(Draggable,{...popProps,usePaper:true,handler:/*#__PURE__*/(0,jsx_runtime.jsxs)(Box_Box,{style:{cursor:"move"},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Header_Header,{onClose:()=>{setShowPopup(false);}}),/*#__PURE__*/(0,jsx_runtime.jsx)(Divider_Divider,{})]}),children:/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{width:360,children:/*#__PURE__*/(0,jsx_runtime.jsx)(PopupCont,{rule:rule,setting:setting,setRule:setRule,setSetting:setSetting,handleOpenSetting:handleOpenSetting,processActions:processActions,isContent:true})})},"pop")})});} ;// CONCATENATED MODULE: ./src/libs/popupManager.js @@ -48095,7 +48112,7 @@ if(globalThis.GM&&_classPrivateFieldBase(this,_menuCommandIds)[_menuCommandIds]. ;// CONCATENATED MODULE: ./src/common.js /** * 油猴脚本设置页面 - */function runSettingPage(){var _GM,_GM$info,_GM$info$script,_GM$info$script$grant;if((_GM=GM)!==null&&_GM!==void 0&&(_GM$info=_GM.info)!==null&&_GM$info!==void 0&&(_GM$info$script=_GM$info.script)!==null&&_GM$info$script!==void 0&&(_GM$info$script$grant=_GM$info$script.grant)!==null&&_GM$info$script$grant!==void 0&&_GM$info$script$grant.includes("unsafeWindow")){unsafeWindow.GM=GM;unsafeWindow.APP_INFO={name:"KISS Translator",version:"2.0.5"};}else{const ping=utils_genEventName();window.addEventListener(ping,handlePing);// window.eval(`(${injectScript})("${ping}")`); // eslint-disable-line + */function runSettingPage(){var _GM,_GM$info,_GM$info$script,_GM$info$script$grant;if((_GM=GM)!==null&&_GM!==void 0&&(_GM$info=_GM.info)!==null&&_GM$info!==void 0&&(_GM$info$script=_GM$info.script)!==null&&_GM$info$script!==void 0&&(_GM$info$script$grant=_GM$info$script.grant)!==null&&_GM$info$script$grant!==void 0&&_GM$info$script$grant.includes("unsafeWindow")){unsafeWindow.GM=GM;unsafeWindow.APP_INFO={name:"KISS Translator",version:"2.0.6"};}else{const ping=utils_genEventName();window.addEventListener(ping,handlePing);// window.eval(`(${injectScript})("${ping}")`); // eslint-disable-line injectInlineJs("(".concat(injectScript,")(\"").concat(ping,"\")"),"kiss-translator-options-injector");}}/** * 显示错误信息到页面顶部 * @param {*} message diff --git a/kiss-translator-rules.json b/kiss-translator-rules.json index 425fae1..5de705f 100644 --- a/kiss-translator-rules.json +++ b/kiss-translator-rules.json @@ -11,7 +11,7 @@ "pattern": "news.ycombinator.com" }, { - "selector": "[data-testid='tweetText']", + "selector": "[data-testid='tweetText'], [data-testid='twitter-article-title'], .public-DraftStyleDefault-block", "keepSelector": "img, svg, a, span:has(a), div:has(a)", "ignoreSelector": "button, [data-testid='videoPlayer'], [role='group']", "autoScan": "false", diff --git a/kiss-translator.user.js b/kiss-translator.user.js index 2e4829a..27b8ee3 100644 --- a/kiss-translator.user.js +++ b/kiss-translator.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name KISS Translator // @namespace https://github.com/fishjar/kiss-translator -// @version 2.0.5 +// @version 2.0.6 // @description A simple bilingual translation extension & Greasemonkey script (一个简约的双语对照翻译扩展 & 油猴脚本) // @author Gabe // @homepageURL https://github.com/fishjar/kiss-translator @@ -29407,7 +29407,7 @@ __webpack_require__.d(base_namespaceObject, { }); ;// CONCATENATED MODULE: ./src/config/app.js -const APP_NAME="KISS Translator".trim().split(/\s+/).join("-");const APP_LCNAME=APP_NAME.toLowerCase();const APP_UPNAME=APP_NAME.toUpperCase();const APP_CONSTS={fabID:"".concat(APP_LCNAME,"-fab"),boxID:"".concat(APP_LCNAME,"-box"),popupID:"".concat(APP_LCNAME,"-popup")};const APP_VERSION="2.0.5".split(".");const THEME_LIGHT="light";const THEME_DARK="dark"; +const APP_NAME="KISS Translator".trim().split(/\s+/).join("-");const APP_LCNAME=APP_NAME.toLowerCase();const APP_UPNAME=APP_NAME.toUpperCase();const APP_CONSTS={fabID:"".concat(APP_LCNAME,"-fab"),boxID:"".concat(APP_LCNAME,"-box"),popupID:"".concat(APP_LCNAME,"-popup")};const APP_VERSION="2.0.6".split(".");const THEME_LIGHT="light";const THEME_DARK="dark"; ;// CONCATENATED MODULE: ./src/config/api.js const DEFAULT_HTTP_TIMEOUT=10000;// 调用超时时间 const DEFAULT_FETCH_LIMIT=10;// 默认最大任务数量 @@ -29445,7 +29445,7 @@ context:new Set([OPT_TRANS_OPENAI,OPT_TRANS_GEMINI,OPT_TRANS_GEMINI_2,OPT_TRANS_ "transcreation",// 创译风格 "machine-like",// 机器风格 "concise"// 简明风格 -];const BUILTIN_PLACEHOLDERS=["{ }","{{ }}","[ ]","[[ ]]"];const BUILTIN_PLACETAGS=["i","a","b","x"];const OPT_LANGS_TO=[["en","English - English"],["zh-CN","Simplified Chinese - 简体中文"],["zh-TW","Traditional Chinese - 繁體中文"],["ar","Arabic - العربية"],["bg","Bulgarian - Български"],["ca","Catalan - Català"],["hr","Croatian - Hrvatski"],["cs","Czech - Čeština"],["da","Danish - Dansk"],["nl","Dutch - Nederlands"],["fi","Finnish - Suomi"],["fr","French - Français"],["de","German - Deutsch"],["el","Greek - Ελληνικά"],["hi","Hindi - हिन्दी"],["hu","Hungarian - Magyar"],["id","Indonesian - Indonesia"],["it","Italian - Italiano"],["ja","Japanese - 日本語"],["ko","Korean - 한국어"],["ms","Malay - Melayu"],["mt","Maltese - Malti"],["nb","Norwegian - Norsk Bokmål"],["pl","Polish - Polski"],["pt","Portuguese - Português"],["ro","Romanian - Română"],["ru","Russian - Русский"],["sk","Slovak - Slovenčina"],["sl","Slovenian - Slovenščina"],["es","Spanish - Español"],["sv","Swedish - Svenska"],["ta","Tamil - தமிழ்"],["te","Telugu - తెలుగు"],["th","Thai - ไทย"],["tr","Turkish - Türkçe"],["uk","Ukrainian - Українська"],["vi","Vietnamese - Tiếng Việt"]];const OPT_LANGS_LIST=OPT_LANGS_TO.map(_ref=>{let[lang]=_ref;return lang;});const OPT_LANGS_FROM=[["auto","Auto-detect"],...OPT_LANGS_TO];const OPT_LANGS_MAP=new Map(OPT_LANGS_TO);// CODE->名称 +];const BUILTIN_PLACEHOLDERS=["{ }","{{ }}","[ ]","[[ ]]"];const BUILTIN_PLACETAGS=["i","a","b","x"];const OPT_LANGS_TO=[["en","English - English"],["zh-CN","Simplified Chinese - 简体中文"],["zh-TW","Traditional Chinese - 繁體中文"],["ar","Arabic - العربية"],["bg","Bulgarian - Български"],["ca","Catalan - Català"],["hr","Croatian - Hrvatski"],["cs","Czech - Čeština"],["da","Danish - Dansk"],["nl","Dutch - Nederlands"],["fa","Persian - فارسی"],["fi","Finnish - Suomi"],["fr","French - Français"],["de","German - Deutsch"],["el","Greek - Ελληνικά"],["hi","Hindi - हिन्दी"],["hu","Hungarian - Magyar"],["id","Indonesian - Indonesia"],["it","Italian - Italiano"],["ja","Japanese - 日本語"],["ko","Korean - 한국어"],["ms","Malay - Melayu"],["mt","Maltese - Malti"],["nb","Norwegian - Norsk Bokmål"],["pl","Polish - Polski"],["pt","Portuguese - Português"],["ro","Romanian - Română"],["ru","Russian - Русский"],["sk","Slovak - Slovenčina"],["sl","Slovenian - Slovenščina"],["es","Spanish - Español"],["sv","Swedish - Svenska"],["ta","Tamil - தமிழ்"],["te","Telugu - తెలుగు"],["th","Thai - ไทย"],["tr","Turkish - Türkçe"],["uk","Ukrainian - Українська"],["vi","Vietnamese - Tiếng Việt"]];const OPT_LANGS_LIST=OPT_LANGS_TO.map(_ref=>{let[lang]=_ref;return lang;});const OPT_LANGS_FROM=[["auto","Auto-detect"],...OPT_LANGS_TO];const OPT_LANGS_MAP=new Map(OPT_LANGS_TO);// CODE->名称 const OPT_LANGS_SPEC_NAME=new Map(OPT_LANGS_FROM.map(_ref2=>{let[key,val]=_ref2;return[key,val.split(" - ")[0]];}));const OPT_LANGS_SPEC_DEFAULT=new Map(OPT_LANGS_FROM.map(_ref3=>{let[key]=_ref3;return[key,key];}));const OPT_LANGS_SPEC_DEFAULT_UC=new Map(OPT_LANGS_FROM.map(_ref4=>{let[key]=_ref4;return[key,key.toUpperCase()];}));const OPT_LANGS_TO_SPEC={[OPT_TRANS_BUILTINAI]:new Map([...OPT_LANGS_SPEC_DEFAULT,["zh-CN","zh"],["zh-TW","zh"]]),[OPT_TRANS_GOOGLE]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_GOOGLE_2]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_MICROSOFT]:new Map([...OPT_LANGS_SPEC_DEFAULT,["auto",""],["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[OPT_TRANS_AZUREAI]:new Map([...OPT_LANGS_SPEC_DEFAULT,["auto",""],["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[OPT_TRANS_DEEPL]:new Map([...OPT_LANGS_SPEC_DEFAULT_UC,["auto",""],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLFREE]:new Map([...OPT_LANGS_SPEC_DEFAULT_UC,["auto","auto"],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLX]:new Map([...OPT_LANGS_SPEC_DEFAULT_UC,["auto","auto"],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_NIUTRANS]:new Map([...OPT_LANGS_SPEC_DEFAULT,["auto","auto"],["zh-CN","zh"],["zh-TW","cht"]]),[OPT_TRANS_VOLCENGINE]:new Map([...OPT_LANGS_SPEC_DEFAULT,["auto","auto"],["zh-CN","zh"],["zh-TW","zh-Hant"]]),[OPT_TRANS_BAIDU]:new Map([...OPT_LANGS_SPEC_DEFAULT,["zh-CN","zh"],["zh-TW","cht"],["ar","ara"],["bg","bul"],["ca","cat"],["hr","hrv"],["da","dan"],["fi","fin"],["fr","fra"],["hi","mai"],["ja","jp"],["ko","kor"],["ms","may"],["mt","mlt"],["nb","nor"],["ro","rom"],["ru","ru"],["sl","slo"],["es","spa"],["sv","swe"],["ta","tam"],["te","tel"],["uk","ukr"],["vi","vie"]]),[OPT_TRANS_TENCENT]:new Map([["auto","auto"],["zh-CN","zh"],["zh-TW","zh"],["en","en"],["ar","ar"],["de","de"],["ru","ru"],["fr","fr"],["fi","fil"],["ko","ko"],["ms","ms"],["pt","pt"],["ja","ja"],["th","th"],["tr","tr"],["es","es"],["it","it"],["hi","hi"],["id","id"],["vi","vi"]]),[OPT_TRANS_OPENAI]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_GEMINI]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_GEMINI_2]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_CLAUDE]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_OLLAMA]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_OPENROUTER]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_CLOUDFLAREAI]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_CUSTOMIZE]:OPT_LANGS_SPEC_DEFAULT};const specToCode=m=>new Map(Array.from(m.entries()).map(_ref5=>{let[k,v]=_ref5;if(v===""){return["auto","auto"];}if(v==="zh"||v==="ZH"){return[v,"zh-CN"];}return[v,k];}));// 名称->CODE const OPT_LANGS_TO_CODE={};Object.entries(OPT_LANGS_TO_SPEC).forEach(_ref6=>{let[t,m]=_ref6;OPT_LANGS_TO_CODE[t]=specToCode(m);});const defaultNobatchPrompt="You are a professional, authentic machine translation engine.";const defaultNobatchUserPrompt="Translate the following source text from ".concat(INPUT_PLACE_FROM," to ").concat(INPUT_PLACE_TO,". Output translation directly without any additional text.\n\nSource Text: ").concat(INPUT_PLACE_TEXT,"\n\nTranslated Text:");const defaultSystemPrompt="Act as a translation API. Output a single raw JSON object only. No extra text or fences.\n\nInput:\n{\"targetLanguage\":\"\",\"title\":\"\",\"description\":\"\",\"segments\":[{\"id\":1,\"text\":\"...\"}],\"glossary\":{\"sourceTerm\":\"targetTerm\"},\"tone\":\"\"}\n\nOutput:\n{\"translations\":[{\"id\":1,\"text\":\"...\",\"sourceLanguage\":\"\"}]}\n\nRules:\n1. Use title/description for context only; do not output them.\n2. Keep id, order, and count of segments.\n3. Preserve whitespace, HTML entities, and all HTML-like tags (e.g., , ). Translate inner text only.\n4. Highest priority: Follow 'glossary'. Use value for translation; if value is \"\", keep the key.\n5. Do not translate: content in ,
, text enclosed in backticks, or placeholders like {1}, {{1}}, [1], [[1]].\n6.  Apply the specified tone to the translation.\n7.  Detect sourceLanguage for each segment.\n8.  Return empty or unchanged inputs as is.\n\nExample:\nInput: {\"targetLanguage\":\"zh-CN\",\"segments\":[{\"id\":1,\"text\":\"A React component.\"}],\"glossary\":{\"component\":\"\u7EC4\u4EF6\",\"React\":\"\"}}\nOutput: {\"translations\":[{\"id\":1,\"text\":\"\u4E00\u4E2AReact\u7EC4\u4EF6\",\"sourceLanguage\":\"en\"}]}\n\nFail-safe: On any error, return {\"translations\":[]}.";// const defaultSubtitlePrompt = `Goal: Convert raw subtitle event JSON into a clean, sentence-based JSON array.
 // Output (valid JSON array, output ONLY this array):
@@ -29474,7 +29474,7 @@ customHeader:"",customBody:"",reqHook:"",// request 钩子函数
 resHook:"",// response 钩子函数
 fetchLimit:DEFAULT_FETCH_LIMIT,// 最大请求数量
 fetchInterval:DEFAULT_FETCH_INTERVAL,// 请求间隔时间
-httpTimeout:DEFAULT_HTTP_TIMEOUT*30,// 请求超时时间
+httpTimeout:DEFAULT_HTTP_TIMEOUT*3,// 请求超时时间
 batchInterval:DEFAULT_BATCH_INTERVAL,// 批处理请求间隔时间
 batchSize:DEFAULT_BATCH_SIZE,// 每次最多发送段落数量
 batchLength:DEFAULT_BATCH_LENGTH,// 每次发送最大文字数量
@@ -29487,24 +29487,31 @@ isDisabled:false,// 是否不显示,
 region:""// Azure 专用
 };const defaultApiOpts={[OPT_TRANS_BUILTINAI]:defaultApi,[OPT_TRANS_GOOGLE]:{...defaultApi,url:"https://translate.googleapis.com/translate_a/single"},[OPT_TRANS_GOOGLE_2]:{...defaultApi,url:"https://translate-pa.googleapis.com/v1/translateHtml",key:"AIzaSyATBXajvzQLTDHEQbcpq0Ihe0vWDHmO520",useBatchFetch:true},[OPT_TRANS_MICROSOFT]:{...defaultApi,useBatchFetch:true},[OPT_TRANS_AZUREAI]:{...defaultApi,url:"https://api.cognitive.microsofttranslator.com/translate?api-version=3.0",useBatchFetch:true},[OPT_TRANS_BAIDU]:{...defaultApi},[OPT_TRANS_TENCENT]:{...defaultApi,useBatchFetch:true},[OPT_TRANS_VOLCENGINE]:{...defaultApi},[OPT_TRANS_DEEPL]:{...defaultApi,url:"https://api-free.deepl.com/v2/translate",useBatchFetch:true},[OPT_TRANS_DEEPLFREE]:{...defaultApi,fetchLimit:1},[OPT_TRANS_DEEPLX]:{...defaultApi,url:"http://localhost:1188/translate"},[OPT_TRANS_NIUTRANS]:{...defaultApi,url:"https://api.niutrans.com/NiuTransServer/translation",dictNo:"",memoryNo:""},[OPT_TRANS_OPENAI]:{...defaultApi,url:"https://api.openai.com/v1/chat/completions",model:"gpt-4",useBatchFetch:true},[OPT_TRANS_GEMINI]:{...defaultApi,url:"https://generativelanguage.googleapis.com/v1/models/".concat(INPUT_PLACE_MODEL,":generateContent?key=").concat(INPUT_PLACE_KEY),model:"gemini-2.5-flash",useBatchFetch:true},[OPT_TRANS_GEMINI_2]:{...defaultApi,url:"https://generativelanguage.googleapis.com/v1beta/openai/chat/completions",model:"gemini-2.0-flash",useBatchFetch:true},[OPT_TRANS_CLAUDE]:{...defaultApi,url:"https://api.anthropic.com/v1/messages",model:"claude-3-haiku-20240307",useBatchFetch:true},[OPT_TRANS_CLOUDFLAREAI]:{...defaultApi,url:"https://api.cloudflare.com/client/v4/accounts/{{ACCOUNT_ID}}/ai/run/@cf/meta/m2m100-1.2b"},[OPT_TRANS_OLLAMA]:{...defaultApi,url:"http://localhost:11434/v1/chat/completions",model:"llama3.1",useBatchFetch:true},[OPT_TRANS_OPENROUTER]:{...defaultApi,url:"https://openrouter.ai/api/v1/chat/completions",model:"openai/gpt-4o",useBatchFetch:true},[OPT_TRANS_CUSTOMIZE]:{...defaultApi,url:"https://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN",reqHook:defaultRequestHook,resHook:defaultResponseHook}};// 内置翻译接口列表(带参数)
 const DEFAULT_API_LIST=OPT_ALL_TRANS_TYPES.map(apiType=>({...defaultApiOpts[apiType],apiSlug:apiType,apiName:apiType,apiType}));const DEFAULT_API_TYPE=OPT_TRANS_MICROSOFT;const DEFAULT_API_SETTING=DEFAULT_API_LIST.find(a=>a.apiType===DEFAULT_API_TYPE);
-;// CONCATENATED MODULE: ./src/config/rules.js
-const GLOBAL_KEY="*";const REMAIN_KEY="-";const SHADOW_KEY=">>>";const DEFAULT_COLOR="#209CEE";// 默认高亮背景色/线条颜色
-const DEFAULT_TRANS_TAG="font";const DEFAULT_SELECT_STYLE="-webkit-line-clamp: unset; max-height: none; height: auto;";const OPT_STYLE_NONE="style_none";// 无
+;// CONCATENATED MODULE: ./src/config/styles.js
+const OPT_STYLE_NONE="style_none";// 无
 const OPT_STYLE_LINE="under_line";// 下划线
 const OPT_STYLE_DOTLINE="dot_line";// 点状线
 const OPT_STYLE_DASHLINE="dash_line";// 虚线
+const OPT_STYLE_DASHLINE_BOLD="dash_line_bold";// 虚线加粗
 const OPT_STYLE_DASHBOX="dash_box";// 虚线框
+const OPT_STYLE_DASHBOX_BOLD="dash_box_bold";// 虚线框加粗
 const OPT_STYLE_WAVYLINE="wavy_line";// 波浪线
+const OPT_STYLE_WAVYLINE_BOLD="wavy_line_bold";// 波浪线加粗
+const OPT_STYLE_MARKER="marker";// 马克笔
+const OPT_STYLE_GRADIENT_MARKER="gradient_marker";// 渐变马克笔
 const OPT_STYLE_FUZZY="fuzzy";// 模糊
 const OPT_STYLE_HIGHLIGHT="highlight";// 高亮
 const OPT_STYLE_BLOCKQUOTE="blockquote";// 引用
 const OPT_STYLE_GRADIENT="gradient";// 渐变
 const OPT_STYLE_BLINK="blink";// 闪现
 const OPT_STYLE_GLOW="glow";// 发光
-const OPT_STYLE_DIY="diy_style";// 自定义样式
-const OPT_STYLE_ALL=[OPT_STYLE_NONE,OPT_STYLE_LINE,OPT_STYLE_DOTLINE,OPT_STYLE_DASHLINE,OPT_STYLE_WAVYLINE,OPT_STYLE_DASHBOX,OPT_STYLE_FUZZY,OPT_STYLE_HIGHLIGHT,OPT_STYLE_BLOCKQUOTE,OPT_STYLE_GRADIENT,OPT_STYLE_BLINK,OPT_STYLE_GLOW,OPT_STYLE_DIY];const OPT_STYLE_USE_COLOR=[OPT_STYLE_LINE,OPT_STYLE_DOTLINE,OPT_STYLE_DASHLINE,OPT_STYLE_DASHBOX,OPT_STYLE_WAVYLINE,OPT_STYLE_HIGHLIGHT,OPT_STYLE_BLOCKQUOTE];const OPT_TIMING_PAGESCROLL="mk_pagescroll";// 滚动加载翻译
+const OPT_STYLE_COLORFUL="colorful";// 多彩
+const OPT_STYLE_ALL=[OPT_STYLE_NONE,OPT_STYLE_LINE,OPT_STYLE_DOTLINE,OPT_STYLE_DASHLINE,OPT_STYLE_DASHLINE_BOLD,OPT_STYLE_WAVYLINE,OPT_STYLE_WAVYLINE_BOLD,OPT_STYLE_DASHBOX,OPT_STYLE_DASHBOX_BOLD,OPT_STYLE_MARKER,OPT_STYLE_GRADIENT_MARKER,OPT_STYLE_FUZZY,OPT_STYLE_HIGHLIGHT,OPT_STYLE_BLOCKQUOTE,OPT_STYLE_GRADIENT,OPT_STYLE_BLINK,OPT_STYLE_GLOW,OPT_STYLE_COLORFUL];const DEFAULT_CUSTOM_STYLES=[{styleSlug:"custom",styleName:"Custom Style",styleCode:"color: #209CEE;"}];
+;// CONCATENATED MODULE: ./src/config/rules.js
+const GLOBAL_KEY="*";const REMAIN_KEY="-";const SHADOW_KEY=">>>";const DEFAULT_COLOR="#209CEE";// 默认高亮背景色/线条颜色
+const DEFAULT_TRANS_TAG="font";const DEFAULT_SELECT_STYLE="-webkit-line-clamp: unset; max-height: none; height: auto;";const OPT_TIMING_PAGESCROLL="mk_pagescroll";// 滚动加载翻译
 const OPT_TIMING_PAGEOPEN="mk_pageopen";// 直接翻译到底
-const OPT_TIMING_MOUSEOVER="mk_mouseover";const OPT_TIMING_CONTROL="mk_ctrlKey";const OPT_TIMING_SHIFT="mk_shiftKey";const OPT_TIMING_ALT="mk_altKey";const OPT_TIMING_ALL=[OPT_TIMING_PAGESCROLL,OPT_TIMING_PAGEOPEN,OPT_TIMING_MOUSEOVER,OPT_TIMING_CONTROL,OPT_TIMING_SHIFT,OPT_TIMING_ALT];const OPT_SPLIT_PARAGRAPH_DISABLE="split_disable";const OPT_SPLIT_PARAGRAPH_TEXTLENGTH="split_textlength";const OPT_SPLIT_PARAGRAPH_PUNCTUATION="split_punctuation";const OPT_SPLIT_PARAGRAPH_ALL=[OPT_SPLIT_PARAGRAPH_DISABLE,OPT_SPLIT_PARAGRAPH_PUNCTUATION,OPT_SPLIT_PARAGRAPH_TEXTLENGTH];const OPT_HIGHLIGHT_WORDS_DISABLE="highlight_disable";const OPT_HIGHLIGHT_WORDS_BEFORETRANS="highlight_beforetrans";const OPT_HIGHLIGHT_WORDS_AFTERTRANS="highlight_aftertrans";const OPT_HIGHLIGHT_WORDS_ALL=[OPT_HIGHLIGHT_WORDS_DISABLE,OPT_HIGHLIGHT_WORDS_BEFORETRANS,OPT_HIGHLIGHT_WORDS_AFTERTRANS];const DEFAULT_DIY_STYLE="color: #333;\nbackground: linear-gradient(\n  45deg,\n  LightGreen 20%,\n  LightPink 20% 40%,\n  LightSalmon 40% 60%,\n  LightSeaGreen 60% 80%,\n  LightSkyBlue 80%\n);\n&:hover {\n  color: #111;\n};";const DEFAULT_SELECTOR="h1, h2, h3, h4, h5, h6, li, p, dd, blockquote, figcaption, label, legend";const DEFAULT_IGNORE_SELECTOR="button, footer, pre, mark, nav";const DEFAULT_KEEP_SELECTOR="code, cite, math, .math, a:has(code)";const DEFAULT_RULE={pattern:"",// 匹配网址
+const OPT_TIMING_MOUSEOVER="mk_mouseover";const OPT_TIMING_CONTROL="mk_ctrlKey";const OPT_TIMING_SHIFT="mk_shiftKey";const OPT_TIMING_ALT="mk_altKey";const OPT_TIMING_ALL=[OPT_TIMING_PAGESCROLL,OPT_TIMING_PAGEOPEN,OPT_TIMING_MOUSEOVER,OPT_TIMING_CONTROL,OPT_TIMING_SHIFT,OPT_TIMING_ALT];const OPT_SPLIT_PARAGRAPH_DISABLE="split_disable";const OPT_SPLIT_PARAGRAPH_TEXTLENGTH="split_textlength";const OPT_SPLIT_PARAGRAPH_PUNCTUATION="split_punctuation";const OPT_SPLIT_PARAGRAPH_ALL=[OPT_SPLIT_PARAGRAPH_DISABLE,OPT_SPLIT_PARAGRAPH_PUNCTUATION,OPT_SPLIT_PARAGRAPH_TEXTLENGTH];const OPT_HIGHLIGHT_WORDS_DISABLE="highlight_disable";const OPT_HIGHLIGHT_WORDS_BEFORETRANS="highlight_beforetrans";const OPT_HIGHLIGHT_WORDS_AFTERTRANS="highlight_aftertrans";const OPT_HIGHLIGHT_WORDS_ALL=[OPT_HIGHLIGHT_WORDS_DISABLE,OPT_HIGHLIGHT_WORDS_BEFORETRANS,OPT_HIGHLIGHT_WORDS_AFTERTRANS];const DEFAULT_SELECTOR="h1, h2, h3, h4, h5, h6, li, p, dd, blockquote, figcaption, label, legend";const DEFAULT_IGNORE_SELECTOR="button, footer, pre, mark, nav";const DEFAULT_KEEP_SELECTOR="code, cite, math, .math, a:has(code)";const DEFAULT_RULE={pattern:"",// 匹配网址
 selector:"",// 选择器
 keepSelector:"",// 保留元素选择器
 terms:"",// 专业术语
@@ -29514,8 +29521,9 @@ fromLang:GLOBAL_KEY,// 源语言
 toLang:GLOBAL_KEY,// 目标语言
 textStyle:GLOBAL_KEY,// 译文样式
 transOpen:GLOBAL_KEY,// 开启翻译
-bgColor:"",// 译文颜色
-textDiyStyle:"",// 自定义译文样式
+// bgColor: "", // 译文颜色 (作废)
+// textDiyStyle: "", // 自定义译文样式 (作废)
+textExtStyle:"",// 译文附加样式
 termsStyle:"",// 专业术语样式
 highlightStyle:"",// 高亮词汇样式
 selectStyle:"",// 选择器节点样式
@@ -29554,8 +29562,9 @@ fromLang:"auto",// 源语言
 toLang:"zh-CN",// 目标语言
 textStyle:OPT_STYLE_NONE,// 译文样式
 transOpen:"false",// 开启翻译
-bgColor:"",// 译文颜色
-textDiyStyle:DEFAULT_DIY_STYLE,// 自定义译文样式
+// bgColor: DEFAULT_COLOR, // 译文颜色 (作废)
+// textDiyStyle: DEFAULT_DIY_STYLE, // 自定义译文样式 (作废)
+textExtStyle:"",// 译文附加样式
 termsStyle:"font-weight: bold;",// 专业术语样式
 highlightStyle:"color: red;",// 高亮词汇样式
 selectStyle:DEFAULT_SELECT_STYLE,// 选择器节点样式
@@ -29583,11 +29592,11 @@ ignoreSelector:DEFAULT_IGNORE_SELECTOR,// 不翻译的选择器
 splitParagraph:OPT_SPLIT_PARAGRAPH_DISABLE,// 切分段落
 splitLength:100,// 切分段落长度
 highlightWords:OPT_HIGHLIGHT_WORDS_DISABLE// 高亮词汇
-};const rules_DEFAULT_RULES=[GLOBLA_RULE];const DEFAULT_OW_RULE={apiSlug:REMAIN_KEY,fromLang:REMAIN_KEY,toLang:REMAIN_KEY,textStyle:REMAIN_KEY,transOpen:REMAIN_KEY,bgColor:"",textDiyStyle:DEFAULT_DIY_STYLE};// todo: 校验几个内置规则
+};const rules_DEFAULT_RULES=[GLOBLA_RULE];// todo: 校验几个内置规则
 const RULES_MAP={// "www.google.com/search": {
 //   rootsSelector: `#rcnt`,
 // },
-"en.wikipedia.org":{ignoreSelector:".button, code, footer, form, mark, pre, .mwe-math-element, .mw-editsection"},"news.ycombinator.com":{selector:"p, .titleline, .commtext, .hn-item-title, .hn-comment-text, .hn-story-title",keepSelector:"code, img, svg, pre, .sitebit",ignoreSelector:"button, code, footer, form, header, mark, nav, pre, .reply",autoScan:"false"},"twitter.com, https://x.com":{selector:"[data-testid='tweetText']",keepSelector:"img, svg, a, span:has(a), div:has(a)",ignoreSelector:"button, [data-testid='videoPlayer'], [role='group']",autoScan:"false"},"www.youtube.com/live_chat":{rootsSelector:"div#items",selector:"span.yt-live-chat-text-message-renderer",autoScan:"false"},"www.youtube.com":{rootsSelector:"ytd-page-manager",ignoreSelector:"aside, button, footer, form, header, pre, mark, nav, #player, #container, .caption-window, .ytp-settings-menu"},"web.telegram.org":{autoScan:"false",selector:".text-content, .embedded-text-wrapper",rootsSelector:".Transition"}};const rules_BUILTIN_RULES=Object.entries(RULES_MAP).map(_ref=>{let[pattern,rule]=_ref;return{// ...DEFAULT_RULE,
+"en.wikipedia.org":{ignoreSelector:".button, code, footer, form, mark, pre, .mwe-math-element, .mw-editsection"},"news.ycombinator.com":{selector:"p, .titleline, .commtext, .hn-item-title, .hn-comment-text, .hn-story-title",keepSelector:"code, img, svg, pre, .sitebit",ignoreSelector:"button, code, footer, form, header, mark, nav, pre, .reply",autoScan:"false"},"twitter.com, https://x.com":{selector:"[data-testid='tweetText'], [data-testid='twitter-article-title'], .public-DraftStyleDefault-block",keepSelector:"img, svg, a, span:has(a), div:has(a)",ignoreSelector:"button, [data-testid='videoPlayer'], [role='group']",autoScan:"false"},"www.youtube.com/live_chat":{rootsSelector:"div#items",selector:"span.yt-live-chat-text-message-renderer",autoScan:"false"},"www.youtube.com":{rootsSelector:"ytd-page-manager",ignoreSelector:"aside, button, footer, form, header, pre, mark, nav, #player, #container, .caption-window, .ytp-settings-menu"},"web.telegram.org":{autoScan:"false",selector:".text-content, .embedded-text-wrapper",rootsSelector:".Transition"}};const rules_BUILTIN_RULES=Object.entries(RULES_MAP).map(_ref=>{let[pattern,rule]=_ref;return{// ...DEFAULT_RULE,
 ...rule,pattern};});
 ;// CONCATENATED MODULE: ./src/libs/log.js
 // 定义日志级别
@@ -29659,7 +29668,7 @@ triggerMode:OPT_TRANBOX_TRIGGER_CLICK,// 触发翻译方式
 // extStyles: "", // 附加样式
 enDict:OPT_DICT_BING,// 英文词典
 enSug:OPT_SUG_YOUDAO// 英文建议
-};const SUBTITLE_WINDOW_STYLE="padding: 0.5em 1em;\nbackground-color: rgba(0, 0, 0, 0.5);\ncolor: white;\nline-height: 1.3;\ntext-shadow: 1px 1px 2px black;\ndisplay: inline-block";const SUBTITLE_ORIGIN_STYLE="font-size: clamp(1.5rem, 3cqw, 3rem);";const SUBTITLE_TRANSLATION_STYLE="font-size: clamp(1.5rem, 3cqw, 3rem);";const DEFAULT_SUBTITLE_SETTING={enabled:true,// 是否开启
+};const SUBTITLE_WINDOW_STYLE="padding: 0.5em 1em;\nbackground-color: rgba(0, 0, 0, 0.5);\ncolor: white;\nline-height: 1.3;\ntext-shadow: 1px 1px 2px black;\ndisplay: inline-block";const SUBTITLE_ORIGIN_STYLE="font-size: clamp(1rem, 2cqw, 3rem);";const SUBTITLE_TRANSLATION_STYLE="font-size: clamp(1rem, 2cqw, 3rem);";const DEFAULT_SUBTITLE_SETTING={enabled:true,// 是否开启
 apiSlug:OPT_TRANS_MICROSOFT,segSlug:"-",// AI智能断句
 chunkLength:1000,// AI处理切割长度
 // fromLang: "en",
@@ -29706,10 +29715,11 @@ preInit:true,// 是否预加载脚本
 transAllnow:false,// 是否立即全部翻译
 subtitleSetting:DEFAULT_SUBTITLE_SETTING,// 字幕设置
 logLevel:LogLevel.INFO.value,// 日志级别
-rootMargin:500// 提前触发翻译
+rootMargin:500,// 提前触发翻译
+customStyles:DEFAULT_CUSTOM_STYLES// 自定义样式列表
 };
 ;// CONCATENATED MODULE: ./src/config/i18n.js
-const UI_LANGS=(/* unused pure expression or super */ null && ([["en","English"],["zh","简体中文"],["zh_TW","繁體中文"]]));const customApiLangs="[\"en\", \"English - English\"],\n[\"zh-CN\", \"Simplified Chinese - \u7B80\u4F53\u4E2D\u6587\"],\n[\"zh-TW\", \"Traditional Chinese - \u7E41\u9AD4\u4E2D\u6587\"],\n[\"ar\", \"Arabic - \u0627\u0644\u0639\u0631\u0628\u064A\u0629\"],\n[\"bg\", \"Bulgarian - \u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438\"],\n[\"ca\", \"Catalan - Catal\xE0\"],\n[\"hr\", \"Croatian - Hrvatski\"],\n[\"cs\", \"Czech - \u010Ce\u0161tina\"],\n[\"da\", \"Danish - Dansk\"],\n[\"nl\", \"Dutch - Nederlands\"],\n[\"fi\", \"Finnish - Suomi\"],\n[\"fr\", \"French - Fran\xE7ais\"],\n[\"de\", \"German - Deutsch\"],\n[\"el\", \"Greek - \u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC\"],\n[\"hi\", \"Hindi - \u0939\u093F\u0928\u094D\u0926\u0940\"],\n[\"hu\", \"Hungarian - Magyar\"],\n[\"id\", \"Indonesian - Indonesia\"],\n[\"it\", \"Italian - Italiano\"],\n[\"ja\", \"Japanese - \u65E5\u672C\u8A9E\"],\n[\"ko\", \"Korean - \uD55C\uAD6D\uC5B4\"],\n[\"ms\", \"Malay - Melayu\"],\n[\"mt\", \"Maltese - Malti\"],\n[\"nb\", \"Norwegian - Norsk Bokm\xE5l\"],\n[\"pl\", \"Polish - Polski\"],\n[\"pt\", \"Portuguese - Portugu\xEAs\"],\n[\"ro\", \"Romanian - Rom\xE2n\u0103\"],\n[\"ru\", \"Russian - \u0420\u0443\u0441\u0441\u043A\u0438\u0439\"],\n[\"sk\", \"Slovak - Sloven\u010Dina\"],\n[\"sl\", \"Slovenian - Sloven\u0161\u010Dina\"],\n[\"es\", \"Spanish - Espa\xF1ol\"],\n[\"sv\", \"Swedish - Svenska\"],\n[\"ta\", \"Tamil - \u0BA4\u0BAE\u0BBF\u0BB4\u0BCD\"],\n[\"te\", \"Telugu - \u0C24\u0C46\u0C32\u0C41\u0C17\u0C41\"],\n[\"th\", \"Thai - \u0E44\u0E17\u0E22\"],\n[\"tr\", \"Turkish - T\xFCrk\xE7e\"],\n[\"uk\", \"Ukrainian - \u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430\"],\n[\"vi\", \"Vietnamese - Ti\u1EBFng Vi\u1EC7t\"],\n";const customApiHelpZH="// \u8BF7\u6C42\u6570\u636E\u9ED8\u8BA4\u683C\u5F0F\n{\n  \"url\": \"{{url}}\",\n  \"method\": \"POST\",\n  \"headers\": {\n    \"Content-type\": \"application/json\",\n    \"Authorization\": \"Bearer {{key}}\"\n  },\n  \"body\": {\n    \"text\": \"{{text}}\", // \u5F85\u7FFB\u8BD1\u6587\u5B57\n    \"from\": \"{{from}}\", // \u6587\u5B57\u7684\u8BED\u8A00\uFF08\u53EF\u80FD\u4E3A\u7A7A\uFF09\n    \"to\": \"{{to}}\",     // \u76EE\u6807\u8BED\u8A00\n  },\n}\n\n\n// \u8FD4\u56DE\u6570\u636E\u9ED8\u8BA4\u683C\u5F0F\n{\n  text: \"\", // \u7FFB\u8BD1\u540E\u7684\u6587\u5B57\n  from: \"\", // \u8BC6\u522B\u7684\u6E90\u8BED\u8A00\n  to: \"\",   // \u76EE\u6807\u8BED\u8A00\uFF08\u53EF\u9009\uFF09\n}\n\n\n// Hook \u8303\u4F8B\n// URL\nhttps://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN\n\n// Request Hook\n(text, from, to, url, key) => [url, {\n  headers: {\n      \"Content-type\": \"application/json\",\n  },\n  method: \"GET\",\n  body: null,\n}]\n\n// Response Hook\n// \u5176\u4E2D\u8FD4\u56DE\u6570\u7EC4\u7B2C\u4E00\u4E2A\u503C\u8868\u793A\u8BD1\u6587\u5B57\u7B26\u4E32\uFF0C\u7B2C\u4E8C\u4E2A\u503C\u4E3A\u5E03\u5C14\u503C\uFF0C\u8868\u793A\u539F\u6587\u8BED\u8A00\u4E0E\u76EE\u6807\u8BED\u8A00\u662F\u5426\u76F8\u540C\n(res, text, from, to) => [res.sentences.map((item) => item.trans).join(\" \"), to === res.src]\n\n\n// \u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u5982\u4E0B\n".concat(customApiLangs,"\n");const customApiHelpEN="// Default request\n{\n  \"url\": \"{{url}}\",\n  \"method\": \"POST\",\n  \"headers\": {\n    \"Content-type\": \"application/json\",\n    \"Authorization\": \"Bearer {{key}}\"\n  },\n  \"body\": {\n    \"text\": \"{{text}}\", // Text to be translated\n    \"from\": \"{{from}}\", // The language of the text (may be empty)\n    \"to\": \"{{to}}\",     // Target language\n  },\n}\n\n\n// Default response\n{\n  text: \"\", // translated text\n  from: \"\", // Recognized source language\n  to: \"\",   // Target language (optional)\n}\n\n\n/// Hook Example\n// URL\nhttps://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN\n\n// Request Hook\n(text, from, to, url, key) => [url, {\n  headers: {\n      \"Content-type\": \"application/json\",\n  },\n  method: \"GET\",\n  body: null,\n}]\n\n// Response Hook\n// In the returned array, the first value is the translated string, while the second value is a boolean\n// that indicates whether the source language is the same as the target language.\n(res, text, from, to) => [res.sentences.map((item) => item.trans).join(\" \"), to === res.src]\n\n\n// The supported language codes are as follows\n".concat(customApiLangs,"\n");const requestHookHelperZH="1\u3001\u7B2C\u4E00\u4E2A\u53C2\u6570\u5305\u542B\u5982\u4E0B\u5B57\u6BB5\uFF1A'texts', 'from', 'to', 'url', 'key', 'model', 'systemPrompt', ...\n2\u3001\u8FD4\u56DE\u503C\u5FC5\u987B\u662F\u5305\u542B\u4EE5\u4E0B\u5B57\u6BB5\u7684\u5BF9\u8C61\uFF1A 'url', 'body', 'headers', 'method'\n3\u3001\u5982\u8FD4\u56DE\u7A7A\u503C\uFF0C\u5219hook\u51FD\u6570\u4E0D\u4F1A\u4EA7\u751F\u4EFB\u4F55\u6548\u679C\u3002\n\n// \u793A\u4F8B\nasync (args, { url, body, headers, userMsg, method } = {}) => {\n  return { url, body, headers, userMsg, method };\n}";const requestHookHelperEN="1. The first parameter contains the following fields: 'texts', 'from', 'to', 'url', 'key', 'model', 'systemPrompt', ...\n2. The return value must be an object containing the following fields: 'url', 'body', 'headers', 'method'\n3. If a null value is returned, the hook function will have no effect.\n\n// Example\nasync (args, { url, body, headers, userMsg, method } = {}) => {\n  return { url, body, headers, userMsg, method };\n}";const responsetHookHelperZH="1\u3001\u7B2C\u4E00\u4E2A\u53C2\u6570\u5305\u542B\u5982\u4E0B\u5B57\u6BB5\uFF1A'res', ...\n2\u3001\u8FD4\u56DE\u503C\u5FC5\u987B\u662F\u5305\u542B\u4EE5\u4E0B\u5B57\u6BB5\u7684\u5BF9\u8C61\uFF1A 'translations'\n  \uFF08'translations' \u5E94\u4E3A\u4E00\u4E2A\u4E8C\u7EF4\u6570\u7EC4\uFF1A[[\u8BD1\u6587, \u539F\u6587\u8BED\u8A00]]\uFF09\n3\u3001\u5982\u8FD4\u56DE\u7A7A\u503C\uFF0C\u5219hook\u51FD\u6570\u4E0D\u4F1A\u4EA7\u751F\u4EFB\u4F55\u6548\u679C\u3002\n\n// \u793A\u4F8B\nasync ({ res, ...args }) => {\n  const translations = [[\"\u4F60\u597D\", \"en\"]];\n  const modelMsg = {}; // \u7528\u4E8EAI\u4E0A\u4E0B\u6587\n  return { translations, modelMsg };\n}";const responsetHookHelperEN="1. The first parameter contains the following fields: 'res', ...\n2. The return value must be an object containing the following fields: 'translations'\n  ('translations' should be a two-dimensional array: [[translation, source language]]).\n3. If a null value is returned, the hook function will have no effect.\n\n// Example\nasync ({ res, ...args }) => {\n  const translations = [[\"\u4F60\u597D\", \"en\"]];\n  const modelMsg = {}; // For AI context\n  return { translations, modelMsg };\n}";const I18N={app_name:{zh:"\u7B80\u7EA6\u7FFB\u8BD1",en:"KISS Translator",zh_TW:"\u7C21\u7D04\u7FFB\u8B6F"},translate:{zh:"\u7FFB\u8BD1",en:"Translate",zh_TW:"\u7FFB\u8B6F"},custom_api_help:{zh:customApiHelpZH,en:customApiHelpEN,zh_TW:customApiHelpZH},request_hook_helper:{zh:requestHookHelperZH,en:requestHookHelperEN,zh_TW:requestHookHelperZH},response_hook_helper:{zh:responsetHookHelperZH,en:responsetHookHelperEN,zh_TW:responsetHookHelperZH},translate_alt:{zh:"\u7FFB\u8BD1",en:"Translate",zh_TW:"\u7FFB\u8B6F"},basic_setting:{zh:"\u57FA\u672C\u8BBE\u7F6E",en:"Basic Setting",zh_TW:"\u57FA\u672C\u8A2D\u5B9A"},rules_setting:{zh:"\u89C4\u5219\u8BBE\u7F6E",en:"Rules Setting",zh_TW:"\u898F\u5247\u8A2D\u5B9A"},apis_setting:{zh:"\u63A5\u53E3\u8BBE\u7F6E",en:"Apis Setting",zh_TW:"API\u8A2D\u5B9A"},sync_setting:{zh:"\u540C\u6B65\u8BBE\u7F6E",en:"Sync Setting",zh_TW:"\u540C\u6B65\u8A2D\u5B9A"},patch_setting:{zh:"\u8865\u4E01\u8BBE\u7F6E",en:"Patch Setting",zh_TW:"\u4FEE\u88DC\u8A2D\u5B9A"},patch_setting_help:{zh:"\u9488\u5BF9\u4E00\u4E9B\u7279\u6B8A\u7F51\u7AD9\u7684\u4FEE\u6B63\u811A\u672C\uFF0C\u4EE5\u4FBF\u7FFB\u8BD1\u8F6F\u4EF6\u5F97\u5230\u66F4\u597D\u7684\u5C55\u793A\u6548\u679C\u3002",en:"Corrected scripts for some special websites so that the translation software can get better display results.",zh_TW:"\u91DD\u5C0D\u67D0\u4E9B\u7279\u6B8A\u7DB2\u7AD9\u7684\u4FEE\u6B63\u8173\u672C\uFF0C\u8B93\u7FFB\u8B6F\u8EDF\u9AD4\u6709\u66F4\u597D\u7684\u986F\u793A\u6548\u679C\u3002"},inject_webfix:{zh:"\u6CE8\u5165\u4FEE\u590D\u8865\u4E01",en:"Inject Webfix",zh_TW:"\u6CE8\u5165\u4FEE\u6B63\u88DC\u4E01"},about:{zh:"\u5173\u4E8E",en:"About",zh_TW:"\u95DC\u65BC"},about_md:{zh:"README.md",en:"README.en.md",zh_TW:"README.md"},about_md_local:{zh:"\u8BF7 [\u70B9\u51FB\u8FD9\u91CC](".concat("https://github.com/fishjar/kiss-translator",") \u67E5\u770B\u8BE6\u60C5\u3002"),en:"Please [click here](".concat("https://github.com/fishjar/kiss-translator",") for details."),zh_TW:"\u8ACB\u3010\u9EDE\u9019\u88E1\u3011\u67E5\u770B\u8A73\u7D30\u5167\u5BB9\u3002"},ui_lang:{zh:"\u754C\u9762\u8BED\u8A00",en:"Interface Language",zh_TW:"\u4ECB\u9762\u8A9E\u8A00"},fetch_limit:{zh:"\u6700\u5927\u5E76\u53D1\u8BF7\u6C42\u6570\u91CF (1-100)",en:"Maximum Number Of Concurrent Requests (1-100)",zh_TW:"\u6700\u5927\u540C\u6642\u8ACB\u6C42\u6578\u91CF (1-100)"},if_think:{zh:"\u542F\u7528\u6216\u7981\u7528\u6A21\u578B\u7684\u6DF1\u5EA6\u601D\u8003\u80FD\u529B",en:"Enable or disable the model\u2019s thinking behavior ",zh_TW:"\u555F\u7528\u6216\u505C\u7528\u6A21\u578B\u7684\u6DF1\u5EA6\u601D\u8003\u80FD\u529B"},think:{zh:"\u542F\u7528\u6DF1\u5EA6\u601D\u8003",en:"enable thinking",zh_TW:"\u555F\u7528\u6DF1\u5EA6\u601D\u8003"},nothink:{zh:"\u7981\u7528\u6DF1\u5EA6\u601D\u8003",en:"disable thinking",zh_TW:"\u505C\u7528\u6DF1\u5EA6\u601D\u8003"},think_ignore:{zh:"\u5FFD\u7565\u4EE5\u4E0B\u6A21\u578B\u7684\u8F93\u51FA,\u9017\u53F7(,)\u5206\u5272,\u5F53\u6A21\u578B\u652F\u6301\u601D\u8003\u4F46ollama\u4E0D\u652F\u6301\u65F6\u9700\u8981\u586B\u5199\u672C\u53C2\u6570",en:"Ignore the  block for the following models, comma (,) separated",zh_TW:"\u5FFD\u7565\u4EE5\u4E0B\u6A21\u578B\u7684  \u8F38\u51FA\uFF0C\u4EE5\u9017\u865F (,) \u5206\u9694\uFF1B\u7576\u6A21\u578B\u652F\u63F4\u601D\u8003\u4F46 ollama \u4E0D\u652F\u63F4\u6642\u9700\u8981\u586B\u5BEB\u6B64\u53C3\u6578"},fetch_interval:{zh:"\u6BCF\u6B21\u8BF7\u6C42\u95F4\u9694\u65F6\u95F4 (0-5000ms)",en:"Time Between Requests (0-5000ms)",zh_TW:"\u6BCF\u6B21\u8ACB\u6C42\u9593\u9694\u6642\u9593 (0-5000ms)"},translate_interval:{zh:"\u7FFB\u8BD1\u95F4\u9694\u65F6\u95F4 (10-2000ms)",en:"Translation Interval (10-2000ms)",zh_TW:"\u7FFB\u8B6F\u9593\u9694\u6642\u9593 (10-2000ms)"},http_timeout:{zh:"\u8BF7\u6C42\u8D85\u65F6\u65F6\u95F4 (5000-60000ms)",en:"Request Timeout Time (5000-60000ms)",zh_TW:"\u8ACB\u6C42\u903E\u6642\u6642\u9593 (5000-60000ms)"},custom_header:{zh:"\u81EA\u5B9A\u4E49Header\u53C2\u6570",en:"Custom Header Params"},custom_header_help:{zh:"\u4F7F\u7528JSON\u683C\u5F0F\uFF0C\u4F8B\u5982 \"User-Agent\": \"Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0\"",en:"Use JSON format, for example \"User-Agent\": \"Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0\""},custom_body:{zh:"\u81EA\u5B9A\u4E49Body\u53C2\u6570",en:"Custom Body Params"},custom_body_help:{zh:"\u4F7F\u7528JSON\u683C\u5F0F\uFF0C\u4F8B\u5982 \"top_p\": 0.7",en:"Use JSON format, for example \"top_p\": 0.7"},min_translate_length:{zh:"\u6700\u5C0F\u7FFB\u8BD1\u5B57\u7B26\u6570 (1-100)",en:"Minimum number Of Translated Characters (1-100)",zh_TW:"\u6700\u5C0F\u7FFB\u8B6F\u5B57\u5143\u6578 (1-100)"},max_translate_length:{zh:"\u6700\u5927\u7FFB\u8BD1\u5B57\u7B26\u6570 (100-100000)",en:"Maximum number Of Translated Characters (100-100000)",zh_TW:"\u6700\u5927\u7FFB\u8B6F\u5B57\u5143\u6578 (100-100000)"},num_of_newline_characters:{zh:"\u6362\u884C\u5B57\u7B26\u6570 (1-1000)",en:"Number of Newline Characters (1-1000)",zh_TW:"\u63DB\u884C\u5B57\u5143\u6578 (1-1000)"},translate_service:{zh:"\u7FFB\u8BD1\u670D\u52A1",en:"Translate Service",zh_TW:"\u7FFB\u8B6F\u670D\u52D9"},translate_service_multiple:{zh:"\u7FFB\u8BD1\u670D\u52A1 (\u652F\u6301\u591A\u9009)",en:"Translation service (multiple supported)",zh_TW:"\u7FFB\u8B6F\u670D\u52D9 (\u652F\u63F4\u591A\u9078)"},translate_timing:{zh:"\u7FFB\u8BD1\u65F6\u673A",en:"Translate Timing",zh_TW:"\u7FFB\u8B6F\u6642\u6A5F"},mk_pagescroll:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u7FFB\u8BD1\uFF08\u63A8\u8350\uFF09",en:"Rolling Loading (Suggested)",zh_TW:"\u6EFE\u52D5\u8F09\u5165\u7FFB\u8B6F\uFF08\u5EFA\u8B70\uFF09"},mk_pageopen:{zh:"\u7ACB\u5373\u5168\u90E8\u7FFB\u8BD1",en:"Translate all now",zh_TW:"\u7ACB\u5373\u5168\u90E8\u7FFB\u8B6F"},mk_mouseover:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},mk_ctrlKey:{zh:"Control + \u9F20\u6807\u60AC\u505C",en:"Control + Mouseover",zh_TW:"Control + \u6ED1\u9F20\u61F8\u505C"},mk_shiftKey:{zh:"Shift + \u9F20\u6807\u60AC\u505C",en:"Shift + Mouseover",zh_TW:"Shift + \u6ED1\u9F20\u61F8\u505C"},mk_altKey:{zh:"Alt + \u9F20\u6807\u60AC\u505C",en:"Alt + Mouseover",zh_TW:"Alt + \u6ED1\u9F20\u61F8\u505C"},from_lang:{zh:"\u539F\u6587\u8BED\u8A00",en:"Source Language",zh_TW:"\u539F\u6587\u8A9E\u8A00"},to_lang:{zh:"\u76EE\u6807\u8BED\u8A00",en:"Target Language",zh_TW:"\u76EE\u6A19\u8A9E\u8A00"},to_lang2:{zh:"\u7B2C\u4E8C\u76EE\u6807\u8BED\u8A00",en:"Target Language 2",zh_TW:"\u7B2C\u4E8C\u76EE\u6A19\u8A9E\u8A00"},to_lang2_helper:{zh:"\u8BBE\u5B9A\u540E\uFF0C\u4E0E\u76EE\u6807\u8BED\u8A00\u4EA7\u751F\u4E92\u8BD1\u6548\u679C\uFF0C\u4F46\u4F9D\u8D56\u8FDC\u7A0B\u8BED\u8A00\u8BC6\u522B\u3002",en:"After setting, it will produce mutual translation effect with the target language, but it relies on remote language recognition.",zh_TW:"\u8A2D\u5B9A\u5F8C\u6703\u8207\u76EE\u6A19\u8A9E\u8A00\u4E92\u8B6F\uFF0C\u4F46\u4F9D\u8CF4\u9060\u7AEF\u8A9E\u8A00\u8B58\u5225\u3002"},text_style:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},text_style_alt:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},bg_color:{zh:"\u6837\u5F0F\u989C\u8272",en:"Style Color",zh_TW:"\u6A23\u5F0F\u984F\u8272"},remain_unchanged:{zh:"\u4FDD\u7559\u4E0D\u53D8",en:"Remain Unchanged",zh_TW:"\u4FDD\u7559\u4E0D\u8B8A"},google_api:{zh:"\u8C37\u6B4C\u7FFB\u8BD1\u63A5\u53E3",en:"Google Translate API",zh_TW:"Google \u7FFB\u8B6F\u4ECB\u9762"},default_selector:{zh:"\u9ED8\u8BA4\u9009\u62E9\u5668",en:"Default selector",zh_TW:"\u9810\u8A2D\u9078\u64C7\u5668"},selector_rules:{zh:"\u9009\u62E9\u5668\u89C4\u5219",en:"Selector Rules",zh_TW:"\u9078\u64C7\u5668\u898F\u5247"},save:{zh:"\u4FDD\u5B58",en:"Save",zh_TW:"\u5132\u5B58"},edit:{zh:"\u7F16\u8F91",en:"Edit",zh_TW:"\u7DE8\u8F2F"},cancel:{zh:"\u53D6\u6D88",en:"Cancel",zh_TW:"\u53D6\u6D88"},delete:{zh:"\u5220\u9664",en:"Delete",zh_TW:"\u522A\u9664"},reset:{zh:"\u91CD\u7F6E",en:"Reset",zh_TW:"\u91CD\u8A2D"},add:{zh:"\u6DFB\u52A0",en:"Add",zh_TW:"\u65B0\u589E"},inject_rules:{zh:"\u6CE8\u5165\u8BA2\u9605\u89C4\u5219",en:"Inject Subscribe Rules",zh_TW:"\u6CE8\u5165\u8A02\u95B1\u898F\u5247"},personal_rules:{zh:"\u4E2A\u4EBA\u89C4\u5219",en:"Rules",zh_TW:"\u500B\u4EBA\u898F\u5247"},subscribe_rules:{zh:"\u8BA2\u9605\u89C4\u5219",en:"Subscribe",zh_TW:"\u8A02\u95B1\u898F\u5247"},overwrite_subscribe_rules:{zh:"\u8986\u5199\u8BA2\u9605\u89C4\u5219",en:"Overwrite",zh_TW:"\u8986\u5BEB\u8A02\u95B1\u898F\u5247"},subscribe_url:{zh:"\u8BA2\u9605\u5730\u5740",en:"Subscribe URL",zh_TW:"\u8A02\u95B1\u7DB2\u5740"},rules_warn_1:{zh:"1\u3001\u89C4\u5219\u751F\u6548\u7684\u4F18\u5148\u7EA7\u4F9D\u6B21\u4E3A\uFF1A\u4E2A\u4EBA\u89C4\u5219 > \u8BA2\u9605\u89C4\u5219 > \u5168\u5C40\u89C4\u5219\u3002\"\u5168\u5C40\u89C4\u5219\"\u76F8\u5F53\u4E8E\u515C\u5E95\u89C4\u5219\u3002",en:"1. The priority of rules is: personal rules > subscription rules > global rules. \"Global rules\" are like a fallback rule.",zh_TW:"1.\u898F\u5247\u751F\u6548\u7684\u512A\u5148\u9806\u5E8F\u4F9D\u5E8F\u70BA\uFF1A\u500B\u4EBA\u898F\u5247 > \u8A02\u95B1\u898F\u5247 > \u5168\u57DF\u898F\u5247\u3002 \"\u5168\u57DF\u898F\u5247\"\u76F8\u7576\u65BC\u515C\u5E95\u898F\u5247\u3002"},rules_warn_2:{zh:"2\u3001\u201C\u8BA2\u9605\u89C4\u5219\u201D\u9009\u62E9\u6CE8\u5165\u540E\u624D\u4F1A\u751F\u6548\u3002",en:"2. \"Subscription rules\" will take effect only after injection is selected.",zh_TW:"2\u3001\u300C\u8A02\u95B1\u898F\u5247\u300D\u9078\u64C7\u6CE8\u5165\u5F8C\u624D\u6703\u751F\u6548\u3002"},rules_warn_3:{zh:"3\u3001\u5173\u4E8E\u89C4\u5219\u586B\u5199\uFF1A\u8F93\u5165\u6846\u7559\u7A7A\u6216\u4E0B\u62C9\u6846\u9009\u201C*\u201D\u8868\u793A\u91C7\u7528\u5168\u5C40\u89C4\u5219\u3002",en:"3. Regarding filling in the rules: Leave the input box blank or select \"*\" in the drop-down box to use global rule.",zh_TW:"3. \u898F\u5247\u586B\u5BEB\u8AAA\u660E\uFF1A\u8F38\u5165\u6846\u7559\u7A7A\u6216\u4E0B\u62C9\u9078\u64C7\u300C*\u300D\u8868\u793A\u4F7F\u7528\u5168\u57DF\u898F\u5247\u3002"},sync_warn:{zh:"\u6D89\u53CA\u9690\u79C1\u6570\u636E\u7684\u540C\u6B65\u8BF7\u8C28\u614E\u9009\u62E9\u7B2C\u4E09\u65B9\u540C\u6B65\u670D\u52A1\uFF0C\u5EFA\u8BAE\u81EA\u884C\u642D\u5EFA kiss-worker \u6216 WebDAV \u670D\u52A1\u3002",en:"When synchronizing data that involves privacy, please be cautious about choosing third-party sync services. It is recommended to set up your own sync service using kiss-worker or WebDAV.",zh_TW:"\u540C\u6B65\u6D89\u53CA\u96B1\u79C1\u8CC7\u6599\u6642\uFF0C\u8ACB\u8B39\u614E\u9078\u64C7\u7B2C\u4E09\u65B9\u540C\u6B65\u670D\u52D9\uFF1B\u5EFA\u8B70\u81EA\u5EFA kiss-worker \u6216 WebDAV \u670D\u52D9\u3002"},sync_warn_2:{zh:"\u5982\u679C\u670D\u52A1\u5668\u5B58\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u540C\u6B65\u7684\u6570\u636E\uFF0C\u7B2C\u4E00\u6B21\u540C\u6B65\u5C06\u76F4\u63A5\u8986\u76D6\u672C\u5730\u914D\u7F6E\uFF0C\u540E\u9762\u5219\u6839\u636E\u4FEE\u6539\u65F6\u95F4\uFF0C\u65B0\u7684\u8986\u76D6\u65E7\u7684\u3002",en:"If the server has data synchronized by other clients, the first synchronization will directly overwrite the local configuration, and later, according to the modification time, the new one will overwrite the old one.",zh_TW:"\u82E5\u4F3A\u670D\u5668\u4E0A\u5B58\u5728\u5176\u4ED6\u7528\u6236\u7AEF\u540C\u6B65\u7684\u8CC7\u6599\uFF0C\u7B2C\u4E00\u6B21\u540C\u6B65\u6703\u76F4\u63A5\u8986\u84CB\u672C\u6A5F\u8A2D\u5B9A\uFF1B\u4E4B\u5F8C\u5247\u4F9D\u4FEE\u6539\u6642\u9593\uFF0C\u7531\u65B0\u7684\u8986\u84CB\u820A\u7684\u3002"},about_sync_api:{zh:"\u81EA\u5EFAkiss-wroker\u6570\u636E\u540C\u6B65\u670D\u52A1",en:"Self-hosting a Kiss-worker data sync service",zh_TW:"\u81EA\u5EFA kiss-wroker \u8CC7\u6599\u540C\u6B65\u670D\u52D9"},about_api:{zh:"1\u3001\u5176\u4E2D BuiltinAI \u4E3A\u6D4F\u89C8\u5668\u5185\u7F6EAI\u7FFB\u8BD1\uFF0C\u76EE\u524D\u4EC5 Chrome 138 \u53CA\u4EE5\u4E0A\u7248\u672C\u5F97\u5230\u652F\u6301\u3002",en:"1. BuiltinAI is the browser's built-in AI translation, which is currently only supported by Chrome 138 and above.",zh_TW:"1.\u5176\u4E2D BuiltinAI \u70BA\u700F\u89BD\u5668\u5167\u5EFAAI\u7FFB\u8B6F\uFF0C\u76EE\u524D\u50C5 Chrome 138 \u4EE5\u4E0A\u7248\u672C\u652F\u63F4\u3002"},about_api_2:{zh:"2\u3001\u5927\u90E8\u5206AI\u63A5\u53E3\u90FD\u4E0EOpenAI\u517C\u5BB9\uFF0C\u56E0\u6B64\u9009\u62E9\u6DFB\u52A0OpenAI\u7C7B\u578B\u5373\u53EF\u3002",en:"2. Most AI interfaces are compatible with OpenAI, so just choose to add the OpenAI type.",zh_TW:"2.\u5927\u90E8\u5206AI\u4ECB\u9762\u90FD\u8207OpenAI\u76F8\u5BB9\uFF0C\u56E0\u6B64\u9078\u64C7\u65B0\u589EOpenAI\u985E\u578B\u5373\u53EF\u3002"},about_api_3:{zh:"3\u3001\u6682\u672A\u5217\u51FA\u7684\u63A5\u53E3\uFF0C\u7406\u8BBA\u4E0A\u90FD\u53EF\u4EE5\u901A\u8FC7\u81EA\u5B9A\u4E49\u63A5\u53E3 (Custom) \u7684\u5F62\u5F0F\u652F\u6301\u3002",en:"3. Interfaces that have not yet been launched can theoretically be supported through custom interfaces.",zh_TW:"3\u3001\u66AB\u672A\u5217\u51FA\u7684\u4ECB\u9762\uFF0C\u7406\u8AD6\u4E0A\u90FD\u53EF\u900F\u904E\u81EA\u8A02\u4ECB\u9762  (Custom)  \u7684\u5F62\u5F0F\u652F\u63F4\u3002"},about_api_proxy:{zh:"\u67E5\u770B\u81EA\u5EFA\u4E00\u4E2A\u7FFB\u8BD1\u63A5\u53E3\u4EE3\u7406",en:"Check out the self-built translation interface proxy",zh_TW:"\u67E5\u770B\u5982\u4F55\u81EA\u5EFA\u7FFB\u8B6F\u4ECB\u9762 Proxy"},setting_helper:{zh:"\u65B0\u65E7\u914D\u7F6E\u5E76\u4E0D\u517C\u5BB9\uFF0C\u5BFC\u51FA\u7684\u65E7\u7248\u914D\u7F6E\uFF0C\u52FF\u518D\u6B21\u5BFC\u5165\u3002",en:"The old and new configurations are not compatible. Do not import the exported old configuration again.",zh_TW:"\u65B0\u820A\u914D\u7F6E\u4E26\u4E0D\u76F8\u5BB9\uFF0C\u532F\u51FA\u7684\u820A\u7248\u914D\u7F6E\uFF0C\u52FF\u518D\u6B21\u532F\u5165\u3002"},style_none:{zh:"\u65E0",en:"None",zh_TW:"\u7121"},under_line:{zh:"\u4E0B\u5212\u76F4\u7EBF",en:"Underline",zh_TW:"\u4E0B\u5283\u76F4\u7DDA"},dot_line:{zh:"\u4E0B\u5212\u70B9\u72B6\u7EBF",en:"Dotted Underline",zh_TW:"\u4E0B\u5283\u9EDE\u72C0\u7DDA"},dash_line:{zh:"\u4E0B\u5212\u865A\u7EBF",en:"Dashed Underline",zh_TW:"\u4E0B\u5283\u865B\u7DDA"},dash_box:{zh:"\u865A\u7EBF\u6846",en:"Dashed Box"},wavy_line:{zh:"\u4E0B\u5212\u6CE2\u6D6A\u7EBF",en:"Wavy Underline",zh_TW:"\u4E0B\u5283\u6CE2\u6D6A\u7DDA"},fuzzy:{zh:"\u6A21\u7CCA",en:"Fuzzy",zh_TW:"\u6A21\u7CCA"},highlight:{zh:"\u9AD8\u4EAE",en:"Highlight",zh_TW:"\u53CD\u767D\u6A19\u793A"},blockquote:{zh:"\u5F15\u7528",en:"Blockquote",zh_TW:"\u5F15\u7528"},gradient:{zh:"\u6E10\u53D8",en:"Gradient",zh_TW:"\u6F38\u8B8A"},blink:{zh:"\u95EA\u73B0",en:"Blink",zh_TW:"\u9583\u73FE"},glow:{zh:"\u53D1\u5149",en:"Glow",zh_TW:"\u767C\u5149"},diy_style:{zh:"\u81EA\u5B9A\u4E49\u6837\u5F0F",en:"Custom Style",zh_TW:"\u81EA\u8A02\u6A23\u5F0F"},diy_style_helper:{zh:"\u9075\u5FAA\u201CCSS\u201D\u7684\u8BED\u6CD5",en:"Follow the syntax of \"CSS\"",zh_TW:"\u9075\u5FAA CSS \u8A9E\u6CD5"},setting:{zh:"\u8BBE\u7F6E",en:"Setting",zh_TW:"\u8A2D\u5B9A"},pattern:{zh:"\u5339\u914D\u7F51\u5740",en:"URL pattern",zh_TW:"\u5339\u914D\u7DB2\u5740"},pattern_helper:{zh:"1\u3001\u652F\u6301\u661F\u53F7(*)\u901A\u914D\u7B26\u30022\u3001\u591A\u4E2AURL\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\u3002",en:"1. Supports the asterisk (*) wildcard character. 2. Separate multiple URLs with newlines or English commas \",\".",zh_TW:"1. \u652F\u63F4\u661F\u865F (*) \u842C\u7528\u5B57\u5143\u30022. \u591A\u500B URL \u8ACB\u4EE5\u63DB\u884C\u6216\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u3002"},selector_helper:{zh:"1\u3001\u9700\u8981\u7FFB\u8BD1\u7684\u76EE\u6807\u5143\u7D20\u30022\u3001\u5F00\u542F\u81EA\u52A8\u626B\u63CF\u9875\u9762\u540E\uFF0C\u672C\u8BBE\u7F6E\u65E0\u6548\u30023\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. The target element to be translated. 2. This setting is invalid when automatic page scanning is enabled. 3. Follow the CSS selector syntax.",zh_TW:"1\u3001\u9700\u8981\u7FFB\u8B6F\u7684\u76EE\u6A19\u5143\u7D20\u3002 2.\u958B\u555F\u81EA\u52D5\u6383\u63CF\u9801\u9762\u5F8C\uFF0C\u672C\u8A2D\u5B9A\u7121\u6548\u3002 3.\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},translate_switch:{zh:"\u5F00\u542F\u7FFB\u8BD1",en:"Translate Switch",zh_TW:"\u958B\u555F\u7FFB\u8B6F"},default_enabled:{zh:"\u9ED8\u8BA4\u5F00\u542F",en:"Enabled",zh_TW:"\u9810\u8A2D\u958B\u555F"},default_disabled:{zh:"\u9ED8\u8BA4\u5173\u95ED",en:"Disabled",zh_TW:"\u9810\u8A2D\u95DC\u9589"},selector:{zh:"\u9009\u62E9\u5668",en:"Selector",zh_TW:"\u9078\u64C7\u5668"},target_selector:{zh:"\u76EE\u6807\u5143\u7D20\u9009\u62E9\u5668",en:"Target element selector",zh_TW:"\u76EE\u6A19\u5143\u7D20\u9078\u64C7\u5668"},keep_selector:{zh:"\u4FDD\u7559\u5143\u7D20\u9009\u62E9\u5668",en:"Keep unchanged selector",zh_TW:"\u4FDD\u7559\u5143\u7D20\u9078\u64C7\u5668"},keep_selector_helper:{zh:"1\u3001\u76EE\u6807\u5143\u7D20\u4E0B\u9762\u9700\u8981\u539F\u6837\u4FDD\u7559\u7684\u5B50\u8282\u70B9\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. The child nodes under the target element need to remain intact. 2. Follow the CSS selector syntax.",zh_TW:"1. \u76EE\u6A19\u5143\u7D20\u4E0B\u7684\u5B50\u7BC0\u9EDE\u9700\u8981\u4FDD\u6301\u539F\u6A23\u3002 2. \u9075\u5FAA CSS \u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},root_selector:{zh:"\u6839\u8282\u70B9\u9009\u62E9\u5668",en:"Root node selector",zh_TW:"\u6839\u7BC0\u9EDE\u9078\u64C7\u5668"},root_selector_helper:{zh:"1\u3001\u7528\u4E8E\u7F29\u5C0F\u9875\u9762\u7FFB\u8BD1\u8303\u56F4\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. Used to narrow the translation scope of the page. 2. Follow the CSS selector syntax.",zh_TW:"1.\u7528\u65BC\u7E2E\u5C0F\u9801\u9762\u7FFB\u8B6F\u7BC4\u570D\u3002 2\u3001\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},ignore_selector:{zh:"\u4E0D\u7FFB\u8BD1\u8282\u70B9\u9009\u62E9\u5668",en:"Ignore node selectors",zh_TW:"\u4E0D\u7FFB\u8B6F\u7BC0\u9EDE\u9078\u64C7\u5668"},ignore_selector_helper:{zh:"1\u3001\u9700\u8981\u5FFD\u7565\u7684\u8282\u70B9\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. Nodes to be ignored. 2. Follow CSS selector syntax.",zh_TW:"1\u3001\u9700\u8981\u5FFD\u7565\u7684\u7BC0\u9EDE\u3002 2\u3001\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},terms:{zh:"\u4E13\u4E1A\u672F\u8BED",en:"Terms",zh_TW:"\u5C08\u696D\u8853\u8A9E"},terms_helper:{zh:"1\u3001\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\uFF0C\u65E0\u9700\u659C\u6746\uFF0C\u4E0D\u652F\u6301\u4FEE\u9970\u7B26\u30022\u3001\u591A\u6761\u672F\u8BED\u7528\u6362\u884C\u6216\u5206\u53F7\u201C;\u201D\u9694\u5F00\u30023\u3001\u672F\u8BED\u548C\u8BD1\u6587\u7528\u82F1\u6587\u9017\u53F7\u201C,\u201D\u9694\u5F00\u30024\u3001\u6CA1\u6709\u8BD1\u6587\u89C6\u4E3A\u4E0D\u7FFB\u8BD1\u672F\u8BED\u3002",en:"1. Supports regular expression matching, no slash required, and no modifiers are supported. 2. Separate multiple terms with newlines or semicolons \";\". 3. Terms and translations are separated by English commas \",\". 4. If there is no translation, the term will be deemed not to be translated.",zh_TW:"1. \u652F\u63F4\u6B63\u5247\u8868\u9054\u5F0F\u6BD4\u5C0D\uFF0C\u7121\u9700\u659C\u7DDA\uFF0C\u4E14\u4E0D\u652F\u63F4\u4FEE\u98FE\u7B26\u30022. \u591A\u689D\u8853\u8A9E\u4EE5\u63DB\u884C\u6216\u5206\u865F\u300C;\u300D\u5206\u9694\u30023. \u8853\u8A9E\u8207\u8B6F\u6587\u4EE5\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u30024. \u7121\u8B6F\u6587\u8005\u8996\u70BA\u4E0D\u7FFB\u8B6F\u8A72\u8853\u8A9E\u3002"},ai_terms:{zh:"AI\u4E13\u4E1A\u672F\u8BED",en:"AI Terms",zh_TW:"AI\u5C08\u696D\u8853\u8A9E"},ai_terms_helper:{zh:"1\u3001AI\u667A\u80FD\u66FF\u6362\uFF0C\u4E0D\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\u30022\u3001\u591A\u6761\u672F\u8BED\u7528\u6362\u884C\u6216\u5206\u53F7\u201C;\u201D\u9694\u5F00\u30023\u3001\u672F\u8BED\u548C\u8BD1\u6587\u7528\u82F1\u6587\u9017\u53F7\u201C,\u201D\u9694\u5F00\u30024\u3001\u6CA1\u6709\u8BD1\u6587\u89C6\u4E3A\u4E0D\u7FFB\u8BD1\u672F\u8BED\u3002",en:"1. AI intelligent replacement does not support regular expressions.2. Separate multiple terms with newlines or semicolons \";\". 3. Terms and translations are separated by English commas \",\". 4. If there is no translation, the term will be deemed not to be translated.",zh_TW:"1.AI\u667A\u80FD\u66FF\u63DB\uFF0C\u4E0D\u652F\u63F4\u6B63\u898F\u8868\u793A\u5F0F\u30022. \u591A\u689D\u8853\u8A9E\u4EE5\u63DB\u884C\u6216\u5206\u865F\u300C;\u300D\u5206\u9694\u30023. \u8853\u8A9E\u8207\u8B6F\u6587\u4EE5\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u30024. \u7121\u8B6F\u6587\u8005\u8996\u70BA\u4E0D\u7FFB\u8B6F\u8A72\u8853\u8A9E\u3002"},selector_style:{zh:"\u9009\u62E9\u5668\u8282\u70B9\u6837\u5F0F",en:"Selector Style",zh_TW:"\u9078\u64C7\u5668\u7BC0\u9EDE\u6A23\u5F0F"},terms_style:{zh:"\u4E13\u4E1A\u672F\u8BED\u6837\u5F0F",en:"Terms Style",zh_TW:"\u5C08\u696D\u8853\u8A9E\u6A23\u5F0F"},highlight_style:{zh:"\u8BCD\u6C47\u9AD8\u4EAE\u6837\u5F0F",en:"Fav Words highlight style",zh_TW:"\u8A5E\u5F59\u9AD8\u4EAE\u6A23\u5F0F"},selector_style_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\u3002",en:"It is injected when translation is turned on.",zh_TW:"\u5728\u958B\u555F\u7FFB\u8B6F\u6642\u6CE8\u5165\u3002"},selector_parent_style:{zh:"\u9009\u62E9\u5668\u7236\u8282\u70B9\u6837\u5F0F",en:"Parent Selector Style",zh_TW:"\u9078\u64C7\u5668\u7236\u7BC0\u9EDE\u6A23\u5F0F"},selector_grand_style:{zh:"\u9009\u62E9\u5668\u7956\u8282\u70B9\u6837\u5F0F",en:"Grand Selector Style",zh_TW:"\u9078\u64C7\u5668\u7956\u7BC0\u9EDE\u6A23\u5F0F"},inject_js:{zh:"\u6CE8\u5165JS",en:"Inject JS",zh_TW:"\u6CE8\u5165 JS"},inject_js_helper:{zh:"\u9884\u52A0\u8F7D\u65F6\u6CE8\u5165\uFF0C\u4E00\u4E2A\u9875\u9762\u4EC5\u8FD0\u884C\u4E00\u6B21\u3002\u5185\u7F6E\u5168\u5C40\u5BF9\u8C61 KT: {\n      apiTranslate,\n      apiDectect,\n      apiSetting,\n      apisMap,\n      toLang,\n      docInfo,\n      glossary,\n    }",en:"Injected during preload, runs only once per page. Built-in global object KT: {\n      apiTranslate,\n      apiDectect,\n      apiSetting,\n      apisMap,\n      toLang,\n      docInfo,\n      glossary,\n    }",zh_TW:"\u9810\u5148\u8F09\u5165\u6642\u6CE8\u5165\uFF0C\u4E00\u500B\u9801\u9762\u50C5\u904B\u884C\u4E00\u6B21\u3002\u5167\u5EFA\u5168\u57DF\u7269\u4EF6 KT: {\n      apiTranslate,\n      apiDectect,\n      apiSetting,\n      apisMap,\n      toLang,\n      docInfo,\n      glossary,\n    }"},inject_css:{zh:"\u6CE8\u5165CSS",en:"Inject CSS",zh_TW:"\u6CE8\u5165 CSS"},inject_css_helper:{zh:"\u521D\u59CB\u5316\u65F6\u6CE8\u5165\u8FD0\u884C\uFF0C\u4E00\u4E2A\u9875\u9762\u4EC5\u8FD0\u884C\u4E00\u6B21\u3002",en:"Injected and run at initialization, and only run once per page.",zh_TW:"\u521D\u59CB\u5316\u6642\u6CE8\u5165\u904B\u884C\uFF0C\u4E00\u500B\u9801\u9762\u50C5\u904B\u884C\u4E00\u6B21\u3002"},fixer_function:{zh:"\u4FEE\u590D\u51FD\u6570",en:"Fixer Function",zh_TW:"\u4FEE\u5FA9\u51FD\u5F0F"},fixer_function_helper:{zh:"1\u3001br\u662F\u5C06
\u6362\u884C\u66FF\u6362\u6210

\u30022\u3001bn\u662F\u5C06\\n\u6362\u884C\u66FF\u6362\u6210

\u30023\u3001brToDiv\u548CbnToDiv\u662F\u66FF\u6362\u6210

\u3002",en:"1. br replaces
line breaks with

. 2. bn replaces \\n newline with

. 3. brToDiv and bnToDiv are replaced with

.",zh_TW:"1. br \u6703\u5C07
\u63DB\u884C\u66FF\u63DB\u70BA

\u30022. bn \u6703\u5C07 \\n \u63DB\u884C\u66FF\u63DB\u70BA

\u30023. brToDiv \u8207 bnToDiv \u6703\u66FF\u63DB\u70BA

\u3002"},import:{zh:"\u5BFC\u5165",en:"Import",zh_TW:"\u532F\u5165"},export:{zh:"\u5BFC\u51FA",en:"Export",zh_TW:"\u532F\u51FA"},export_translation:{zh:"\u5BFC\u51FA\u91CA\u4E49",en:"Export Translation",zh_TW:"\u532F\u51FA\u91CB\u7FA9"},error_cant_be_blank:{zh:"\u4E0D\u80FD\u4E3A\u7A7A",en:"Can not be blank",zh_TW:"\u4E0D\u53EF\u70BA\u7A7A"},error_duplicate_values:{zh:"\u5B58\u5728\u91CD\u590D\u7684\u503C",en:"There are duplicate values",zh_TW:"\u5B58\u5728\u91CD\u8907\u7684\u503C"},error_wrong_file_type:{zh:"\u9519\u8BEF\u7684\u6587\u4EF6\u7C7B\u578B",en:"Wrong file type",zh_TW:"\u6A94\u6848\u985E\u578B\u932F\u8AA4"},error_fetch_url:{zh:"\u8BF7\u68C0\u67E5url\u5730\u5740\u662F\u5426\u6B63\u786E\u6216\u7A0D\u540E\u518D\u8BD5\u3002",en:"Please check if the url address is correct or try again later.",zh_TW:"\u8ACB\u6AA2\u67E5 URL \u662F\u5426\u6B63\u78BA\u6216\u7A0D\u5F8C\u518D\u8A66\u3002"},deepl_api:{zh:"DeepL \u63A5\u53E3",en:"DeepL API",zh_TW:"DeepL \u4ECB\u9762"},deepl_key:{zh:"DeepL \u5BC6\u94A5",en:"DeepL Key",zh_TW:"DeepL \u91D1\u9470"},openai_api:{zh:"OpenAI \u63A5\u53E3",en:"OpenAI API",zh_TW:"OpenAI \u4ECB\u9762"},openai_key:{zh:"OpenAI \u5BC6\u94A5",en:"OpenAI Key",zh_TW:"OpenAI \u91D1\u9470"},openai_model:{zh:"OpenAI \u6A21\u578B",en:"OpenAI Model",zh_TW:"OpenAI \u6A21\u578B"},openai_prompt:{zh:"OpenAI \u63D0\u793A\u8BCD",en:"OpenAI Prompt",zh_TW:"OpenAI \u63D0\u793A\u8A5E"},if_clear_cache:{zh:"\u662F\u5426\u6E05\u9664\u7F13\u5B58\uFF08\u9ED8\u8BA4\u7F13\u5B587\u5929\uFF09",en:"Whether clear cache (Default cache is 7 days)",zh_TW:"\u662F\u5426\u6E05\u9664\u5FEB\u53D6\uFF08\u9810\u8A2D\u5FEB\u53D67\u5929\uFF09"},clear_cache_never:{zh:"\u4E0D\u6E05\u9664\u7F13\u5B58",en:"Never clear cache",zh_TW:"\u4E0D\u6E05\u9664\u5FEB\u53D6"},clear_cache_restart:{zh:"\u91CD\u542F\u6D4F\u89C8\u5668\u65F6\u6E05\u9664\u7F13\u5B58",en:"Clear cache when restarting browser",zh_TW:"\u91CD\u65B0\u555F\u52D5\u700F\u89BD\u5668\u6642\u6E05\u9664\u5FEB\u53D6"},data_sync_type:{zh:"\u6570\u636E\u540C\u6B65\u65B9\u5F0F",en:"Data Sync Type",zh_TW:"\u8CC7\u6599\u540C\u6B65\u65B9\u5F0F"},data_sync_url:{zh:"\u6570\u636E\u540C\u6B65\u63A5\u53E3",en:"Data Sync API",zh_TW:"\u8CC7\u6599\u540C\u6B65\u4ECB\u9762"},data_sync_user:{zh:"\u6570\u636E\u540C\u6B65\u8D26\u6237",en:"Data Sync User",zh_TW:"\u8CC7\u6599\u540C\u6B65\u5E33\u865F"},data_sync_key:{zh:"\u6570\u636E\u540C\u6B65\u5BC6\u94A5",en:"Data Sync Key",zh_TW:"\u8CC7\u6599\u540C\u6B65\u91D1\u9470"},sync_now:{zh:"\u7ACB\u5373\u540C\u6B65",en:"Sync Now",zh_TW:"\u7ACB\u5373\u540C\u6B65"},sync_success:{zh:"\u540C\u6B65\u6210\u529F\uFF01",en:"Sync Success",zh_TW:"\u540C\u6B65\u6210\u529F\uFF01"},sync_failed:{zh:"\u540C\u6B65\u5931\u8D25\uFF01",en:"Sync Error",zh_TW:"\u540C\u6B65\u5931\u6557\uFF01"},error_got_some_wrong:{zh:"\u62B1\u6B49\uFF0C\u51FA\u9519\u4E86\uFF01",en:"Sorry, something went wrong!",zh_TW:"\u62B1\u6B49\uFF0C\u767C\u751F\u932F\u8AA4\uFF01"},error_sync_setting:{zh:"\u60A8\u7684\u540C\u6B65\u7C7B\u578B\u5FC5\u987B\u4E3A\u201CKISS-Worker\u201D\uFF0C\u4E14\u9700\u586B\u5199\u5B8C\u6574",en:"Your sync type must be \"KISS-Worker\" and must be filled in completely",zh_TW:"\u60A8\u7684\u540C\u6B65\u578B\u614B\u5FC5\u9808\u70BA\u300CKISS-Worker\u300D\uFF0C\u4E14\u9700\u586B\u5BEB\u5B8C\u6574\u3002"},click_test:{zh:"\u70B9\u51FB\u6D4B\u8BD5",en:"Click Test",zh_TW:"\u9EDE\u64CA\u6E2C\u8A66"},test_success:{zh:"\u6D4B\u8BD5\u6210\u529F",en:"Test success",zh_TW:"\u6E2C\u8A66\u6210\u529F"},test_failed:{zh:"\u6D4B\u8BD5\u5931\u8D25",en:"Test failed",zh_TW:"\u6E2C\u8A66\u5931\u6557"},clear_all_cache_now:{zh:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u7F13\u5B58",en:"Clear all cache now",zh_TW:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u5FEB\u53D6"},clear_cache:{zh:"\u6E05\u9664\u7F13\u5B58",en:"Clear Cache",zh_TW:"\u6E05\u9664\u5FEB\u53D6"},clear_success:{zh:"\u6E05\u9664\u6210\u529F",en:"Clear success",zh_TW:"\u6E05\u9664\u6210\u529F"},clear_failed:{zh:"\u6E05\u9664\u5931\u8D25",en:"Clear failed",zh_TW:"\u6E05\u9664\u5931\u6557"},share:{zh:"\u5206\u4EAB",en:"Share",zh_TW:"\u5206\u4EAB"},clear_all:{zh:"\u6E05\u7A7A",en:"Clear All",zh_TW:"\u6E05\u7A7A"},help:{zh:"\u6C42\u52A9",en:"Help",zh_TW:"\u6C42\u52A9"},restore_default:{zh:"\u6062\u590D\u9ED8\u8BA4",en:"Restore Default",zh_TW:"\u6062\u5FA9\u9810\u8A2D"},shortcuts_setting:{zh:"\u5FEB\u6377\u952E\u8BBE\u7F6E",en:"Shortcuts Setting",zh_TW:"\u5FEB\u6377\u9375\u8A2D\u5B9A"},toggle_translate_shortcut:{zh:"\"\u5F00\u542F\u7FFB\u8BD1\"\u5FEB\u6377\u952E",en:"\"Toggle Translate\" Shortcut",zh_TW:"\u300C\u958B\u555F\u7FFB\u8B6F\u300D\u5FEB\u6377\u9375"},toggle_style_shortcut:{zh:"\"\u5207\u6362\u6837\u5F0F\"\u5FEB\u6377\u952E",en:"\"Toggle Style\" Shortcut",zh_TW:"\u300C\u5207\u63DB\u6A23\u5F0F\u300D\u5FEB\u6377\u9375"},toggle_popup_shortcut:{zh:"\"\u6253\u5F00\u5F39\u7A97\"\u5FEB\u6377\u952E",en:"\"Open Popup\" Shortcut",zh_TW:"\u300C\u958B\u555F\u5F48\u7A97\u300D\u5FEB\u6377\u9375"},open_setting_shortcut:{zh:"\"\u6253\u5F00\u8BBE\u7F6E\"\u5FEB\u6377\u952E",en:"\"Open Setting\" Shortcut",zh_TW:"\u300C\u958B\u555F\u8A2D\u5B9A\u300D\u5FEB\u6377\u9375"},hide_fab_button:{zh:"\u9690\u85CF\u60AC\u6D6E\u6309\u94AE",en:"Hide Fab Button",zh_TW:"\u96B1\u85CF\u61F8\u6D6E\u6309\u9215"},fab_click_action:{zh:"\u5355\u51FB\u60AC\u6D6E\u6309\u94AE\u52A8\u4F5C",en:"Single Click Fab Action",zh_TW:"\u55AE\u64CA\u61F8\u6D6E\u6309\u94AE\u52D5\u4F5C"},fab_click_menu:{zh:"\u5F39\u51FA\u83DC\u5355",en:"Popup Menu",zh_TW:"\u5F48\u51FA\u9078\u55AE"},fab_click_translate:{zh:"\u76F4\u63A5\u7FFB\u8BD1",en:"Translate",zh_TW:"\u76F4\u63A5\u7FFB\u8B6F"},hide_tran_button:{zh:"\u9690\u85CF\u7FFB\u8BD1\u6309\u94AE",en:"Hide Translate Button",zh_TW:"\u96B1\u85CF\u7FFB\u8B6F\u6309\u9215"},hide_click_away:{zh:"\u70B9\u51FB\u5916\u90E8\u5173\u95ED\u5F39\u7A97",en:"Click outside to close the pop-up window",zh_TW:"\u9EDE\u64CA\u5916\u90E8\u95DC\u9589\u5F48\u7A97"},use_simple_style:{zh:"\u4F7F\u7528\u7B80\u6D01\u754C\u9762",en:"Use a simple interface",zh_TW:"\u4F7F\u7528\u7C21\u6F54\u4ECB\u9762"},show:{zh:"\u663E\u793A",en:"Show",zh_TW:"\u986F\u793A"},hide:{zh:"\u9690\u85CF",en:"Hide",zh_TW:"\u96B1\u85CF"},save_rule:{zh:"\u4FDD\u5B58\u89C4\u5219",en:"Save Rule",zh_TW:"\u5132\u5B58\u898F\u5247"},global_rule:{zh:"\u5168\u5C40\u89C4\u5219",en:"Global Rule",zh_TW:"\u5168\u57DF\u898F\u5247"},input_translate:{zh:"\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation",zh_TW:"\u8F38\u5165\u6846\u7FFB\u8B6F"},use_input_box_translation:{zh:"\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation",zh_TW:"\u555F\u7528\u8F38\u5165\u6846\u7FFB\u8B6F"},input_selector:{zh:"\u8F93\u5165\u6846\u9009\u62E9\u5668",en:"Input Selector",zh_TW:"\u8F38\u5165\u6846\u9078\u64C7\u5668"},input_selector_helper:{zh:"\u7528\u4E8E\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",en:"Used for input box translation.",zh_TW:"\u7528\u65BC\u8F38\u5165\u6846\u7FFB\u8B6F\u3002"},trigger_trans_shortcut:{zh:"\u89E6\u53D1\u7FFB\u8BD1\u5FEB\u6377\u952E",en:"Trigger Translation Shortcut Keys",zh_TW:"\u89F8\u767C\u7FFB\u8B6F\u5FEB\u6377\u9375"},trigger_trans_shortcut_help:{zh:"\u9ED8\u8BA4\u4E3A\u5355\u51FB\u201CAltLeft+KeyI\u201D",en:"Default is \"AltLeft+KeyI\"",zh_TW:"\u9810\u8A2D\u70BA\u6309\u4E0B\u300CAltLeft+KeyI\u300D"},shortcut_press_count:{zh:"\u5FEB\u6377\u952E\u8FDE\u51FB\u6B21\u6570",en:"Shortcut Press Number",zh_TW:"\u5FEB\u6377\u9375\u9023\u64CA\u6B21\u6578"},combo_timeout:{zh:"\u8FDE\u51FB\u8D85\u65F6\u65F6\u95F4 (10-1000ms)",en:"Combo Timeout (10-1000ms)",zh_TW:"\u9023\u64CA\u903E\u6642 (10-1000ms)"},input_trans_start_sign:{zh:"\u7FFB\u8BD1\u8D77\u59CB\u6807\u8BC6",en:"Translation Start Sign",zh_TW:"\u7FFB\u8B6F\u8D77\u59CB\u6A19\u8A18"},input_trans_start_sign_help:{zh:"\u6807\u8BC6\u540E\u9762\u53EF\u4EE5\u52A0\u76EE\u6807\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1A \u201C/en \u4F60\u597D\u201D\u3001\u201C/zh hello\u201D",en:"The target language code can be added after the sign, such as: \"/en \u4F60\u597D\", \"/zh hello\"",zh_TW:"\u6A19\u8A18\u5F8C\u53EF\u52A0\u4E0A\u76EE\u6A19\u8A9E\u8A00\u4EE3\u78BC\uFF0C\u4F8B\u5982\uFF1A\u300C/en \u4F60\u597D\u300D\u3001\u300C/zh hello\u300D"},detect_lang_remote:{zh:"\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B",en:"Remote language detection",zh_TW:"\u9060\u7AEF\u8A9E\u8A00\u5075\u6E2C"},detect_lang_remote_help:{zh:"\u542F\u7528\u540E\u68C0\u6D4B\u51C6\u786E\u5EA6\u589E\u52A0\uFF0C\u4F46\u4F1A\u964D\u4F4E\u7FFB\u8BD1\u901F\u5EA6\uFF0C\u8BF7\u914C\u60C5\u5F00\u542F",en:"After enabling, the detection accuracy will increase, but it will reduce the translation speed. Please enable it as appropriate.",zh_TW:"\u555F\u7528\u5F8C\u53EF\u63D0\u5347\u5075\u6E2C\u6E96\u78BA\u5EA6\uFF0C\u4F46\u6703\u964D\u4F4E\u7FFB\u8B6F\u901F\u5EA6\uFF0C\u8ACB\u8996\u9700\u8981\u958B\u555F\u3002"},detect_lang_service:{zh:"\u8BED\u8A00\u68C0\u6D4B\u670D\u52A1",en:"Language detect service",zh_TW:"\u8A9E\u8A00\u6AA2\u6E2C\u670D\u52D9"},disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},enable:{zh:"\u542F\u7528",en:"Enable",zh_TW:"\u555F\u7528"},selection_translate:{zh:"\u5212\u8BCD\u7FFB\u8BD1",en:"Selection Translate",zh_TW:"\u5283\u8A5E\u7FFB\u8B6F"},toggle_selection_translate:{zh:"\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"Use Selection Translate",zh_TW:"\u555F\u7528\u5283\u8A5E\u7FFB\u8B6F"},trigger_tranbox_shortcut:{zh:"\u663E\u793A\u7FFB\u8BD1\u6846/\u7FFB\u8BD1\u9009\u4E2D\u6587\u5B57\u5FEB\u6377\u952E",en:"Open Translate Popup/Translate Selected Shortcut",zh_TW:"\u986F\u793A\u7FFB\u8B6F\u6846\uFF0F\u7FFB\u8B6F\u9078\u4E2D\u6587\u5B57\u5FEB\u6377\u9375"},tranbtn_offset_x:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBX\uFF08\xB1200\uFF09",en:"Translate Button Offset X (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6309\u9215\u4F4D\u79FB X\uFF08\xB1200\uFF09"},tranbtn_offset_y:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBY\uFF08\xB1200\uFF09",en:"Translate Button Offset Y (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6309\u9215\u4F4D\u79FB Y\uFF08\xB1200\uFF09"},tranbox_offset_x:{zh:"\u7FFB\u8BD1\u6846\u504F\u79FBX\uFF08\xB1200\uFF09",en:"Translate Box Offset X (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6846\u4F4D\u79FB X\uFF08\xB1200\uFF09"},tranbox_offset_y:{zh:"\u7FFB\u8BD1\u6846\u504F\u79FBY\uFF08\xB1200\uFF09",en:"Translate Box Offset Y (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6846\u4F4D\u79FB Y\uFF08\xB1200\uFF09"},translated_text:{zh:"\u8BD1\u6587",en:"Translated Text",zh_TW:"\u8B6F\u6587"},original_text:{zh:"\u539F\u6587",en:"Original Text",zh_TW:"\u539F\u6587"},favorite_words:{zh:"\u6536\u85CF\u8BCD\u6C47",en:"Favorite Words",zh_TW:"\u6536\u85CF\u8A5E\u5F59"},touch_setting:{zh:"\u89E6\u5C4F\u8BBE\u7F6E",en:"Touch Setting",zh_TW:"\u89F8\u63A7\u8A2D\u5B9A"},touch_translate_shortcut:{zh:"\u89E6\u5C4F\u7FFB\u8BD1\u5FEB\u6377\u65B9\u5F0F (\u652F\u6301\u591A\u9009)",en:"Touch Translate Shortcut (multiple supported)",zh_TW:"\u89F8\u63A7\u7FFB\u8B6F\u6377\u5F91 (\u652F\u63F4\u591A\u9078)"},touch_tap_0:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},touch_tap_2:{zh:"\u53CC\u6307\u8F7B\u89E6",en:"Two finger tap",zh_TW:"\u96D9\u6307\u8F15\u89F8"},touch_tap_3:{zh:"\u4E09\u6307\u8F7B\u89E6",en:"Three finger tap",zh_TW:"\u4E09\u6307\u8F15\u89F8"},touch_tap_4:{zh:"\u56DB\u6307\u8F7B\u89E6",en:"Four finger tap",zh_TW:"\u56DB\u6307\u8F15\u89F8"},touch_tap_5:{zh:"\u5355\u6307\u53CC\u51FB",en:"Double-click",zh_TW:"\u55AE\u6307\u96D9\u64CA"},touch_tap_6:{zh:"\u5355\u6307\u4E09\u51FB",en:"Triple-click",zh_TW:"\u55AE\u6307\u4E09\u64CA"},touch_tap_7:{zh:"\u53CC\u6307\u53CC\u51FB",en:"Two-finger double-click",zh_TW:"\u96D9\u6307\u96D9\u64CA"},translate_blacklist:{zh:"\u7981\u7528\u7FFB\u8BD1\u540D\u5355",en:"Translate Blacklist",zh_TW:"\u505C\u7528\u7FFB\u8B6F\u540D\u55AE"},disabled_orilist:{zh:"\u7981\u7528Origin\u540D\u5355",en:"Disabled Origin List",zh_TW:"\u505C\u7528 Origin \u540D\u55AE"},disabled_csplist:{zh:"\u7981\u7528CSP\u540D\u5355",en:"Disabled CSP List",zh_TW:"\u505C\u7528 CSP \u540D\u55AE"},disabled_csplist_helper:{zh:"3\u3001\u901A\u8FC7\u8C03\u6574CSP\u7B56\u7565\uFF0C\u4F7F\u5F97\u67D0\u4E9B\u9875\u9762\u80FD\u591F\u6CE8\u5165JS/CSS/Media\uFF0C\u8BF7\u8C28\u614E\u4F7F\u7528\uFF0C\u9664\u975E\u60A8\u5DF2\u77E5\u6653\u76F8\u5173\u98CE\u9669\u3002",en:"3. By adjusting the CSP policy, some pages can inject JS/CSS/Media. Please use it with caution unless you are aware of the related risks.",zh_TW:"3. \u900F\u904E\u8ABF\u6574 CSP \u653F\u7B56\uFF0C\u4F7F\u90E8\u5206\u9801\u9762\u53EF\u6CE8\u5165 JS/CSS/Media\u3002\u8ACB\u8B39\u614E\u4F7F\u7528\uFF0C\u9664\u975E\u60A8\u5DF2\u77E5\u6089\u76F8\u95DC\u98A8\u96AA\u3002"},skip_langs:{zh:"\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",en:"Disable Languages",zh_TW:"\u4E0D\u7FFB\u8B6F\u7684\u8A9E\u8A00"},skip_langs_helper:{zh:"\u6B64\u529F\u80FD\u4F9D\u8D56\u51C6\u786E\u7684\u8BED\u8A00\u68C0\u6D4B\uFF0C\u5EFA\u8BAE\u542F\u7528\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B\u3002",en:"This feature relies on accurate language detection. It is recommended to enable remote language detection.",zh_TW:"\u6B64\u529F\u80FD\u4EF0\u8CF4\u6E96\u78BA\u7684\u8A9E\u8A00\u5075\u6E2C\uFF0C\u5EFA\u8B70\u555F\u7528\u9060\u7AEF\u8A9E\u8A00\u5075\u6E2C\u3002"},context_menus:{zh:"\u53F3\u952E\u83DC\u5355",en:"Context Menus",zh_TW:"\u53F3\u9375\u9078\u55AE"},hide_context_menus:{zh:"\u9690\u85CF\u53F3\u952E\u83DC\u5355",en:"Hide Context Menus",zh_TW:"\u96B1\u85CF\u53F3\u9375\u9078\u55AE"},simple_context_menus:{zh:"\u7B80\u5355\u53F3\u952E\u83DC\u5355",en:"Simple_context_menus Context Menus",zh_TW:"\u7C21\u6613\u53F3\u9375\u9078\u55AE"},secondary_context_menus:{zh:"\u4E8C\u7EA7\u53F3\u952E\u83DC\u5355",en:"Secondary Context Menus",zh_TW:"\u6B21\u7D1A\u53F3\u9375\u9078\u55AE"},mulkeys_help:{zh:"\u652F\u6301\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\uFF0C\u8F6E\u8BE2\u8C03\u7528\u3002",en:"Supports polling calls separated by newlines or English commas \",\".",zh_TW:"\u652F\u63F4\u4EE5\u63DB\u884C\u6216\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\uFF0C\u8F2A\u8A62\u547C\u53EB\u3002"},translation_element_tag:{zh:"\u8BD1\u6587\u5143\u7D20\u6807\u7B7E",en:"Translation Element Tag",zh_TW:"\u8B6F\u6587\u5143\u7D20\u6A19\u7C64"},show_only_translations:{zh:"\u4EC5\u663E\u793A\u8BD1\u6587",en:"Show Only Translations",zh_TW:"\u50C5\u986F\u793A\u8B6F\u6587"},show_only_translations_help:{zh:"\u975E\u5B8C\u7F8E\u5B9E\u73B0\uFF0C\u67D0\u4E9B\u9875\u9762\u53EF\u80FD\u6709\u6837\u5F0F\u7B49\u95EE\u9898\u3002",en:"It is not a perfect implementation and some pages may have style issues.",zh_TW:"\u6B64\u70BA\u975E\u5B8C\u7F8E\u5BE6\u4F5C\uFF0C\u90E8\u5206\u9801\u9762\u53EF\u80FD\u51FA\u73FE\u6A23\u5F0F\u7B49\u554F\u984C\u3002"},translate_page_title:{zh:"\u662F\u5426\u7FFB\u8BD1\u9875\u9762\u6807\u9898",en:"Translate Page Title",zh_TW:"\u662F\u5426\u7FFB\u8B6F\u9801\u9762\u6A19\u984C"},more:{zh:"\u66F4\u591A",en:"More",zh_TW:"\u66F4\u591A"},less:{zh:"\u66F4\u5C11",en:"Less",zh_TW:"\u66F4\u5C11"},fixer_selector:{zh:"\u7F51\u9875\u4FEE\u590D\u9009\u62E9\u5668",en:"Fixer Selector",zh_TW:"\u7DB2\u9801\u4FEE\u5FA9\u9078\u64C7\u5668"},reg_niutrans:{zh:"\u83B7\u53D6\u5C0F\u725B\u7FFB\u8BD1\u5BC6\u94A5\u3010\u7B80\u7EA6\u7FFB\u8BD1\u4E13\u5C5E\u65B0\u7528\u6237\u6CE8\u518C\u8D60\u9001300\u4E07\u5B57\u7B26\u3011",en:"Get NiuTrans APIKey [KISS Translator Exclusive New User Registration Free 3 Million Characters]",zh_TW:"\u53D6\u5F97\u5C0F\u725B\u7FFB\u8B6F\u91D1\u9470\u3010\u7C21\u7D04\u7FFB\u8B6F\u5C08\u5C6C\u65B0\u7528\u6236\u8A3B\u518A\u8D08\u9001 300 \u842C\u5B57\u5143\u3011"},trigger_mode:{zh:"\u89E6\u53D1\u65B9\u5F0F",en:"Trigger Mode",zh_TW:"\u89F8\u767C\u65B9\u5F0F"},trigger_click:{zh:"\u70B9\u51FB\u89E6\u53D1",en:"Click Trigger",zh_TW:"\u9EDE\u64CA\u89F8\u767C"},trigger_hover:{zh:"\u9F20\u6807\u60AC\u505C\u89E6\u53D1",en:"Hover Trigger",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u89F8\u767C"},trigger_select:{zh:"\u9009\u4E2D\u89E6\u53D1",en:"Select Trigger",zh_TW:"\u9078\u53D6\u89F8\u767C"},extend_styles:{zh:"\u9644\u52A0\u6837\u5F0F",en:"Extend Styles",zh_TW:"\u9644\u52A0\u6A23\u5F0F"},custom_option:{zh:"\u81EA\u5B9A\u4E49\u9009\u9879",en:"Custom Option",zh_TW:"\u81EA\u8A02\u9078\u9805"},translate_selected_text:{zh:"\u7FFB\u8BD1\u9009\u4E2D\u6587\u5B57",en:"Translate Selected Text",zh_TW:"\u7FFB\u8B6F\u9078\u53D6\u6587\u5B57"},toggle_style:{zh:"\u5207\u6362\u6837\u5F0F",en:"Toggle Style",zh_TW:"\u5207\u63DB\u6A23\u5F0F"},open_menu:{zh:"\u6253\u5F00\u5F39\u7A97\u83DC\u5355",en:"Open Popup Menu",zh_TW:"\u958B\u555F\u5F48\u7A97\u9078\u55AE"},open_setting:{zh:"\u6253\u5F00\u8BBE\u7F6E",en:"Open Setting",zh_TW:"\u958B\u555F\u8A2D\u5B9A"},follow_selection:{zh:"\u7FFB\u8BD1\u6846\u8DDF\u968F\u9009\u4E2D\u6587\u672C",en:"Transbox Follow Selection",zh_TW:"\u7FFB\u8B6F\u6846\u8DDF\u96A8\u9078\u53D6\u6587\u5B57"},tranbox_auto_height:{zh:"\u7FFB\u8BD1\u6846\u81EA\u9002\u5E94\u9AD8\u5EA6",en:"Translation box adaptive height",zh_TW:"\u7FFB\u8B6F\u6846\u81EA\u9069\u61C9\u9AD8\u5EA6"},translate_start_hook:{zh:"\u7FFB\u8BD1\u5F00\u59CB\u94A9\u5B50\u51FD\u6570",en:"Translate Start Hook",zh_TW:"\u7FFB\u8B6F\u958B\u59CB Hook"},translate_start_hook_helper:{zh:"\u7FFB\u8BD1\u524D\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}",en:"Run before translation, input parameters are: {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}",zh_TW:"\u7FFB\u8B6F\u524D\u6642\u904B\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}"},translate_end_hook:{zh:"\u7FFB\u8BD1\u5B8C\u6210\u94A9\u5B50\u51FD\u6570",en:"Translate End Hook",zh_TW:"\u7FFB\u8B6F\u5B8C\u6210 Hook"},translate_end_hook_helper:{zh:"\u7FFB\u8BD1\u5B8C\u6210\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A ({hostNode, parentNode, nodes, wrapperNode, innerNode})",en:"Run when translation is complete, input parameters are: ({hostNode, parentNode, nodes, wrapperNode, innerNode})",zh_TW:"\u7FFB\u8B6F\u5B8C\u6210\u6642\u904B\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A ({hostNode, parentNode, nodes, wrapperNode, innerNode})"},translate_remove_hook:{zh:"\u7FFB\u8BD1\u79FB\u9664\u94A9\u5B50\u51FD\u6570",en:"Translate Removed Hook",zh_TW:"\u7FFB\u8B6F\u79FB\u9664 Hook"},translate_remove_hook_helper:{zh:"\u7FFB\u8BD1\u79FB\u9664\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A \u7FFB\u8BD1\u8282\u70B9\u3002",en:"Run when translation is removed, the input parameters are: translation node.",zh_TW:"\u79FB\u9664\u7FFB\u8B6F\u6642\u57F7\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A\u7FFB\u8B6F\u7BC0\u9EDE\u3002"},english_dict:{zh:"\u82F1\u6587\u8BCD\u5178",en:"English Dictionary",zh_TW:"\u82F1\u6587\u5B57\u5178"},english_suggest:{zh:"\u82F1\u6587\u5EFA\u8BAE",en:"English Suggest",zh_TW:"\u82F1\u6587\u5EFA\u8B70"},api_name:{zh:"\u63A5\u53E3\u540D\u79F0",en:"API Name",zh_TW:"\u4ECB\u9762\u540D\u7A31"},is_disabled:{zh:"\u662F\u5426\u7981\u7528",en:"Is Disabled",zh_TW:"\u662F\u5426\u505C\u7528"},translate_selected:{zh:"\u662F\u5426\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"If translate selected",zh_TW:"\u662F\u5426\u555F\u7528\u5283\u8A5E\u7FFB\u8B6F"},use_batch_fetch:{zh:"\u662F\u5426\u805A\u5408\u53D1\u9001\u7FFB\u8BD1\u8BF7\u6C42",en:"Whether to aggregate and send translation requests",zh_TW:"\u662F\u5426\u805A\u5408\u767C\u9001\u7FFB\u8B6F\u8ACB\u6C42"},batch_interval:{zh:"\u805A\u5408\u8BF7\u6C42\u7B49\u5F85\u65F6\u95F4(100-10000)",en:"Aggregation request waiting time (100-10000)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u7B49\u5F85\u6642\u9593(100-10000)"},batch_size:{zh:"\u805A\u5408\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570(1-100)",en:"Maximum number of paragraphs in an aggregation request (1-100)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u6700\u5927\u6BB5\u843D\u6578(1-100)"},batch_length:{zh:"\u805A\u5408\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6(1000-100000)",en:"Maximum text length for aggregation requests (1000-100000)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u6700\u5927\u6587\u5B57\u9577\u5EA6(1000-100000)"},use_context:{zh:"\u662F\u5426\u542F\u7528\u667A\u80FD\u4E0A\u4E0B\u6587",en:"Whether to enable AI context",zh_TW:"\u662F\u5426\u555F\u7528\u667A\u6167\u4E0A\u4E0B\u6587"},context_size:{zh:"\u4E0A\u4E0B\u6587\u4F1A\u8BDD\u6570\u91CF(1-20)",en:"Number of context sessions(1-20)",zh_TW:"\u4E0A\u4E0B\u6587\u6703\u8A71\u6578\u91CF(1-20)"},auto_scan_page:{zh:"\u81EA\u52A8\u626B\u63CF\u9875\u9762",en:"Auto scan page",zh_TW:"\u81EA\u52D5\u6383\u63CF\u9801\u9762"},has_rich_text:{zh:"\u542F\u7528\u5BCC\u6587\u672C\u7FFB\u8BD1",en:"Enable rich text translation",zh_TW:"\u555F\u7528\u5BCC\u6587\u672C\u7FFB\u8B6F"},has_shadowroot:{zh:"\u626B\u63CFShadowroot",en:"Scan Shadowroot",zh_TW:"\u6383\u63CFShadowroot"},mousehover_translate:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover Translation",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},use_mousehover_translation:{zh:"\u542F\u7528\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Enable mouseover translation",zh_TW:"\u555F\u7528\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},selected_translation_alert:{zh:"\u5212\u8BCD\u7FFB\u8BD1\u7684\u5F00\u542F\u548C\u5173\u95ED\u8BF7\u5230\u201C\u89C4\u5219\u8BBE\u7F6E\u201D\u91CC\u9762\u8BBE\u7F6E\u3002",en:"To turn selected translation on or off, please go to \"Rule Settings\".",zh_TW:"\u5283\u8A5E\u7FFB\u8B6F\u7684\u958B\u555F\u548C\u95DC\u9589\u8ACB\u5230\u300C\u898F\u5247\u8A2D\u5B9A\u300D\u88E1\u9762\u8A2D\u5B9A\u3002"},mousehover_key_help:{zh:"\u5F53\u5FEB\u6377\u952E\u7F6E\u7A7A\u65F6\u8868\u793A\u9F20\u6807\u60AC\u505C\u76F4\u63A5\u7FFB\u8BD1",en:"When the shortcut key is empty, it means that the mouse hovers to translate directly",zh_TW:"\u7576\u5FEB\u6377\u9375\u7F6E\u7A7A\u6642\u8868\u793A\u6ED1\u9F20\u61F8\u505C\u76F4\u63A5\u7FFB\u8B6F"},autoscan_alt:{zh:"\u81EA\u52A8\u626B\u63CF",en:"Auto Scan",zh_TW:"\u81EA\u52D5\u6383\u63CF"},shadowroot_alt:{zh:"ShadowRoot",en:"ShadowRoot",zh_TW:"ShadowRoot"},richtext_alt:{zh:"\u4FDD\u7559\u5BCC\u6587\u672C",en:"Rich Text",zh_TW:"\u4FDD\u7559\u5BCC\u6587\u672C"},transonly_alt:{zh:"\u9690\u85CF\u539F\u6587",en:"Hide Original",zh_TW:"\u96B1\u85CF\u539F\u6587"},confirm_title:{zh:"\u786E\u8BA4",en:"Confirm",zh_TW:"\u78BA\u8A8D"},confirm_message:{zh:"\u786E\u5B9A\u64CD\u4F5C\u5417\uFF1F",en:"Are you sure you want to proceed?",zh_TW:"\u78BA\u5B9A\u64CD\u4F5C\u55CE\uFF1F"},confirm_action:{zh:"\u786E\u5B9A",en:"Confirm",zh_TW:"\u78BA\u5B9A"},cancel_action:{zh:"\u53D6\u6D88",en:"Cancel",zh_TW:"\u53D6\u6D88"},pls_press_shortcut:{zh:"\u8BF7\u6309\u4E0B\u5FEB\u6377\u952E\u7EC4\u5408",en:"Please press the shortcut key combination",zh_TW:"\u8ACB\u6309\u4E0B\u5FEB\u901F\u9375\u7D44\u5408"},load_setting_err:{zh:"\u6570\u636E\u52A0\u8F7D\u51FA\u9519\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u6216\u5378\u8F7D\u540E\u91CD\u65B0\u5B89\u88C5\u3002",en:"Please press the shortcut key combination",zh_TW:"\u8ACB\u6309\u4E0B\u5FEB\u901F\u9375\u7D44\u5408"},translation_style:{zh:"\u7FFB\u8BD1\u98CE\u683C",en:"Translation style",zh_TW:"\u7FFB\u8B6F\u98A8\u683C"},placeholder:{zh:"\u5360\u4F4D\u7B26",en:"Placeholder",zh_TW:"\u4F54\u4F4D\u7B26"},tag_name:{zh:"\u5360\u4F4D\u6807\u7B7E\u540D",en:"Placeholder tag name",zh_TW:"\u4F54\u4F4D\u6A19\u540D"},system_prompt_helper:{zh:"\u5728\u672A\u5B8C\u5168\u7406\u89E3\u9ED8\u8BA4Prompt\u7684\u60C5\u51B5\u4E0B\uFF0C\u8BF7\u52FF\u968F\u610F\u4FEE\u6539\uFF0C\u5426\u5219\u53EF\u80FD\u65E0\u6CD5\u5DE5\u4F5C\u3002",en:"Do not modify the default prompt without fully understanding it, otherwise it may not work.",zh_TW:"\u5728\u672A\u5B8C\u5168\u7406\u89E3\u9810\u8A2DPrompt\u7684\u60C5\u6CC1\u4E0B\uFF0C\u8ACB\u52FF\u96A8\u610F\u4FEE\u6539\uFF0C\u5426\u5247\u53EF\u80FD\u7121\u6CD5\u904B\u4F5C\u3002"},if_pre_init:{zh:"\u662F\u5426\u9884\u521D\u59CB\u5316",en:"Whether to pre-initialize",zh_TW:"\u662F\u5426\u9810\u521D\u59CB\u5316"},export_old:{zh:"\u5BFC\u51FA\u65E7\u7248",en:"Export old version",zh_TW:"\u532F\u51FA\u820A\u7248"},favorite_words_helper:{zh:"\u5BFC\u5165\u8BCD\u6C47\u8BF7\u4F7F\u7528txt\u6587\u4EF6\uFF0C\u6BCF\u4E00\u884C\u4E00\u4E2A\u5355\u8BCD\u3002",en:"To import vocabulary, please use a txt file with one word per line.",zh_TW:"\u532F\u5165\u8A5E\u5F59\u8ACB\u4F7F\u7528txt\u6587\u4EF6\uFF0C\u6BCF\u4E00\u884C\u4E00\u500B\u55AE\u5B57\u3002"},btn_tip_click_away:{zh:"\u5931\u7126\u9690\u85CF/\u663E\u793A",en:"Loss of focus hide/show",zh_TW:"\u5931\u7126\u96B1\u85CF/\u986F\u793A"},btn_tip_follow_selection:{zh:"\u8DDF\u968F/\u56FA\u5B9A\u6A21\u5F0F",en:"Follow/Fixed Mode",zh_TW:"\u8DDF\u96A8/\u56FA\u5B9A\u6A21\u5F0F"},btn_tip_simple_style:{zh:"\u8FF7\u4F60/\u5E38\u89C4\u6A21\u5F0F",en:"Mini/Regular Mode",zh_TW:"\u8FF7\u4F60/\u5E38\u898F\u6A21\u5F0F"},api_placeholder:{zh:"\u5360\u4F4D\u7B26",en:"Placeholder",zh_TW:"\u4F54\u4F4D\u7B26"},api_placetag:{zh:"\u5360\u4F4D\u6807\u7B7E",en:"Placeholder tags",zh_TW:"\u4F54\u4F4D\u6A19"},detected_lang:{zh:"\u8BED\u8A00\u68C0\u6D4B",en:"Language detection",zh_TW:"\u8A9E\u8A00\u5075\u6E2C"},detected_result:{zh:"\u68C0\u6D4B\u7ED3\u679C",en:"Detect result",zh_TW:"\u6AA2\u6E2C\u7D50\u679C"},subtitle_translate:{zh:"\u5B57\u5E55\u7FFB\u8BD1",en:"Subtitle translate",zh_TW:"\u5B57\u5E55\u7FFB\u8B6F"},toggle_subtitle_translate:{zh:"\u542F\u7528\u5B57\u5E55\u7FFB\u8BD1",en:"Enable subtitle translation",zh_TW:"\u555F\u7528\u5B57\u5E55\u7FFB\u8B6F"},is_bilingual_view:{zh:"\u53CC\u8BED\u663E\u793A",en:"Enable bilingual display",zh_TW:"\u96D9\u8A9E\u986F\u793A"},is_skip_ad:{zh:"\u662F\u5426\u5FEB\u8FDB\u5E7F\u544A",en:"Should I fast forward to the ad?",zh_TW:"\u662F\u5426\u5FEB\u8F49\u5EE3\u544A"},background_styles:{zh:"\u80CC\u666F\u6837\u5F0F",en:"DBackground Style",zh_TW:"\u80CC\u666F\u6A23\u5F0F"},origin_styles:{zh:"\u539F\u6587\u6837\u5F0F",en:"Original style",zh_TW:"\u539F\u6587\u6A23\u5F0F"},translation_styles:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Translation style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},ai_segmentation:{zh:"AI\u667A\u80FD\u65AD\u53E5",en:"AI intelligent punctuation",zh_TW:"AI\u667A\u6167\u65B7\u53E5"},ai_chunk_length:{zh:"AI\u5904\u7406\u5207\u5272\u957F\u5EA6(200-20000)",en:"AI processing chunk length(200-20000)",zh_TW:"AI\u5904\u7406\u5207\u5272\u957F\u5EA6(200-20000)"},subtitle_helper_1:{zh:"1\u3001\u76EE\u524D\u4EC5\u652F\u6301Youtube\u684C\u9762\u7F51\u7AD9\u3002",en:"1. Currently only supports Youtube desktop website.",zh_TW:"1.\u76EE\u524D\u50C5\u652F\u63F4Youtube\u684C\u9762\u7DB2\u7AD9\uFF0C\u4E14\u50C5\u652F\u63F4\u700F\u89BD\u5668\u64F4\u5145\u529F\u80FD\u3002"},subtitle_helper_2:{zh:"2\u3001\u63D2\u4EF6\u5185\u7F6E\u57FA\u7840\u7684\u5B57\u5E55\u5408\u5E76\u3001\u65AD\u53E5\u7B97\u6CD5\uFF0C\u53EF\u6EE1\u8DB3\u5927\u90E8\u5206\u60C5\u51B5\u3002",en:"2. The plug-in has built-in basic subtitle merging and sentence segmentation algorithms, which can meet most situations.",zh_TW:"2.\u63D2\u4EF6\u5167\u5EFA\u57FA\u790E\u7684\u5B57\u5E55\u5408\u4F75\u3001\u65B7\u53E5\u6F14\u7B97\u6CD5\uFF0C\u53EF\u6EFF\u8DB3\u5927\u90E8\u5206\u60C5\u6CC1\u3002"},subtitle_helper_3:{zh:"3\u3001\u4EA6\u53EF\u4EE5\u542F\u7528AI\u667A\u80FD\u65AD\u53E5\uFF0C\u4F46\u9700\u8003\u8651\u5207\u5272\u957F\u5EA6\u53CAAI\u63A5\u53E3\u80FD\u529B\uFF0C\u53EF\u80FD\u5904\u7406\u65F6\u95F4\u4F1A\u5F88\u957F\uFF0C\u751A\u81F3\u5904\u7406\u5931\u8D25\uFF0C\u5BFC\u81F4\u65E0\u6CD5\u770B\u5230\u5B57\u5E55\u3002",en:"3. You can also enable AI intelligent segmentation, but you need to consider the segmentation length and AI interface capabilities. The processing time may be very long or even fail, resulting in the inability to see subtitles.",zh_TW:"3.\u4EA6\u53EF\u555F\u7528AI\u667A\u80FD\u65B7\u53E5\uFF0C\u4F46\u9700\u8003\u616E\u5207\u5272\u9577\u5EA6\u53CAAI\u4ECB\u9762\u80FD\u529B\uFF0C\u53EF\u80FD\u8655\u7406\u6642\u9593\u6703\u5F88\u9577\uFF0C\u751A\u81F3\u8655\u7406\u5931\u6557\uFF0C\u5C0E\u81F4\u7121\u6CD5\u770B\u5230\u5B57\u5E55\u3002"},default_styles_example:{zh:"\u9ED8\u8BA4\u6837\u5F0F\u53C2\u8003\uFF1A",en:"Default styles reference:",zh_TW:"\u8A8D\u6A23\u5F0F\u53C3\u8003\uFF1A"},subtitle_load_succeed:{zh:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u6210\u529F\uFF01",en:"Bilingual subtitles loaded successfully!",zh_TW:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u6210\u529F\uFF01"},subtitle_load_failed:{zh:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u5931\u8D25\uFF01",en:"Failed to load bilingual subtitles!",zh_TW:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u5931\u8D25\uFF01"},try_get_subtitle_data:{zh:"\u5C1D\u8BD5\u83B7\u53D6\u5B57\u5E55\u6570\u636E\uFF0C\u8BF7\u7A0D\u5019...",en:"Trying to get subtitle data, please wait...",zh_TW:"\u5C1D\u8BD5\u83B7\u53D6\u5B57\u5E55\u6570\u636E\uFF0C\u8BF7\u7A0D\u5019..."},subtitle_data_processing:{zh:"\u5B57\u5E55\u6570\u636E\u5904\u7406\u4E2D...",en:"Subtitle data processing...",zh_TW:"\u5B57\u5E55\u6570\u636E\u5904\u7406\u4E2D..."},starting_to_process_subtitle:{zh:"\u5F00\u59CB\u5904\u7406\u5B57\u5E55\u6570\u636E...",en:"Starting to process subtitle data...",zh_TW:"\u5F00\u59CB\u5904\u7406\u5B57\u5E55\u6570\u636E..."},subtitle_data_is_ready:{zh:"\u5B57\u5E55\u6570\u636E\u5DF2\u51C6\u5907\u5C31\u7EEA\uFF0C\u8BF7\u70B9\u51FBKT\u6309\u94AE\u52A0\u8F7D",en:"The subtitle data is ready, please click the KT button to load it",zh_TW:"\u5B57\u5E55\u8CC7\u6599\u5DF2\u6E96\u5099\u5C31\u7DD2\uFF0C\u8ACB\u9EDE\u64CAKT\u6309\u9215\u52A0\u8F09"},log_level:{zh:"\u65E5\u5FD7\u7EA7\u522B",en:"Log Level",zh_TW:"\u65E5\u8A8C\u7B49\u7D1A"},goto_custom_api_example:{zh:"\u70B9\u51FB\u67E5\u770B\u3010\u81EA\u5B9A\u4E49\u63A5\u53E3\u793A\u4F8B\u3011",en:"Click to view [Custom Interface Example]",zh_TW:"\u9EDE\u9078\u67E5\u770B\u3010\u81EA\u8A02\u4ECB\u9762\u7BC4\u4F8B\u3011"},split_paragraph:{zh:"\u5207\u5206\u957F\u6BB5\u843D",en:"Split long paragraph",zh_TW:"\u5207\u5206\u9577\u6BB5\u843D"},split_length:{zh:"\u5207\u5206\u957F\u5EA6 (0-10000)",en:"Segmentation length(0-10000)",zh_TW:"\u5207\u5206\u9577\u5EA6(0-10000)"},highlight_words:{zh:"\u9AD8\u4EAE\u6536\u85CF\u8BCD\u6C47",en:"Highlight favorite words",zh_TW:"\u9AD8\u4EAE\u6536\u85CF\u8A5E\u5F59"},split_disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},split_textlength:{zh:"\u6309\u7167\u957F\u5EA6\u5207\u5206",en:"Split by length",zh_TW:"\u4F9D\u9577\u5EA6\u5207\u5206"},split_punctuation:{zh:"\u6309\u7167\u53E5\u5B50\u5207\u5206",en:"Split by sentence",zh_TW:"\u6309\u7167\u53E5\u5B50\u5207\u5206"},highlight_disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},highlight_beforetrans:{zh:"\u7FFB\u8BD1\u524D\u9AD8\u4EAE",en:"Highlight before translation",zh_TW:"\u7FFB\u8B6F\u524D\u9AD8\u4EAE"},highlight_aftertrans:{zh:"\u7FFB\u8BD1\u540E\u9AD8\u4EAE",en:"Highlight after translation",zh_TW:"\u7FFB\u8B6F\u5F8C\u9AD8\u4EAE"},pagescroll_root_margin:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u63D0\u524D\u89E6\u53D1 (0-10000px)",en:"Early triggering of scroll loading (0-10000px)",zh_TW:"\u6EFE\u52D5\u8F09\u5165\u63D0\u524D\u89F8\u767C (0-10000px)"}};const newI18n=lang=>key=>{var _I18N$key;return((_I18N$key=I18N[key])===null||_I18N$key===void 0?void 0:_I18N$key[lang])||"";}; +const UI_LANGS=(/* unused pure expression or super */ null && ([["en","English"],["zh","简体中文"],["zh_TW","繁體中文"]]));const customApiLangs="[\"en\", \"English - English\"],\n[\"zh-CN\", \"Simplified Chinese - \u7B80\u4F53\u4E2D\u6587\"],\n[\"zh-TW\", \"Traditional Chinese - \u7E41\u9AD4\u4E2D\u6587\"],\n[\"ar\", \"Arabic - \u0627\u0644\u0639\u0631\u0628\u064A\u0629\"],\n[\"bg\", \"Bulgarian - \u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438\"],\n[\"ca\", \"Catalan - Catal\xE0\"],\n[\"hr\", \"Croatian - Hrvatski\"],\n[\"cs\", \"Czech - \u010Ce\u0161tina\"],\n[\"da\", \"Danish - Dansk\"],\n[\"nl\", \"Dutch - Nederlands\"],\n[\"fi\", \"Finnish - Suomi\"],\n[\"fr\", \"French - Fran\xE7ais\"],\n[\"de\", \"German - Deutsch\"],\n[\"el\", \"Greek - \u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC\"],\n[\"hi\", \"Hindi - \u0939\u093F\u0928\u094D\u0926\u0940\"],\n[\"hu\", \"Hungarian - Magyar\"],\n[\"id\", \"Indonesian - Indonesia\"],\n[\"it\", \"Italian - Italiano\"],\n[\"ja\", \"Japanese - \u65E5\u672C\u8A9E\"],\n[\"ko\", \"Korean - \uD55C\uAD6D\uC5B4\"],\n[\"ms\", \"Malay - Melayu\"],\n[\"mt\", \"Maltese - Malti\"],\n[\"nb\", \"Norwegian - Norsk Bokm\xE5l\"],\n[\"pl\", \"Polish - Polski\"],\n[\"pt\", \"Portuguese - Portugu\xEAs\"],\n[\"ro\", \"Romanian - Rom\xE2n\u0103\"],\n[\"ru\", \"Russian - \u0420\u0443\u0441\u0441\u043A\u0438\u0439\"],\n[\"sk\", \"Slovak - Sloven\u010Dina\"],\n[\"sl\", \"Slovenian - Sloven\u0161\u010Dina\"],\n[\"es\", \"Spanish - Espa\xF1ol\"],\n[\"sv\", \"Swedish - Svenska\"],\n[\"ta\", \"Tamil - \u0BA4\u0BAE\u0BBF\u0BB4\u0BCD\"],\n[\"te\", \"Telugu - \u0C24\u0C46\u0C32\u0C41\u0C17\u0C41\"],\n[\"th\", \"Thai - \u0E44\u0E17\u0E22\"],\n[\"tr\", \"Turkish - T\xFCrk\xE7e\"],\n[\"uk\", \"Ukrainian - \u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430\"],\n[\"vi\", \"Vietnamese - Ti\u1EBFng Vi\u1EC7t\"],\n";const customApiHelpZH="// \u8BF7\u6C42\u6570\u636E\u9ED8\u8BA4\u683C\u5F0F\n{\n \"url\": \"{{url}}\",\n \"method\": \"POST\",\n \"headers\": {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{key}}\"\n },\n \"body\": {\n \"text\": \"{{text}}\", // \u5F85\u7FFB\u8BD1\u6587\u5B57\n \"from\": \"{{from}}\", // \u6587\u5B57\u7684\u8BED\u8A00\uFF08\u53EF\u80FD\u4E3A\u7A7A\uFF09\n \"to\": \"{{to}}\", // \u76EE\u6807\u8BED\u8A00\n },\n}\n\n\n// \u8FD4\u56DE\u6570\u636E\u9ED8\u8BA4\u683C\u5F0F\n{\n text: \"\", // \u7FFB\u8BD1\u540E\u7684\u6587\u5B57\n from: \"\", // \u8BC6\u522B\u7684\u6E90\u8BED\u8A00\n to: \"\", // \u76EE\u6807\u8BED\u8A00\uFF08\u53EF\u9009\uFF09\n}\n\n\n// Hook \u8303\u4F8B\n// URL\nhttps://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN\n\n// Request Hook\n(text, from, to, url, key) => [url, {\n headers: {\n \"Content-type\": \"application/json\",\n },\n method: \"GET\",\n body: null,\n}]\n\n// Response Hook\n// \u5176\u4E2D\u8FD4\u56DE\u6570\u7EC4\u7B2C\u4E00\u4E2A\u503C\u8868\u793A\u8BD1\u6587\u5B57\u7B26\u4E32\uFF0C\u7B2C\u4E8C\u4E2A\u503C\u4E3A\u5E03\u5C14\u503C\uFF0C\u8868\u793A\u539F\u6587\u8BED\u8A00\u4E0E\u76EE\u6807\u8BED\u8A00\u662F\u5426\u76F8\u540C\n(res, text, from, to) => [res.sentences.map((item) => item.trans).join(\" \"), to === res.src]\n\n\n// \u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u5982\u4E0B\n".concat(customApiLangs,"\n");const customApiHelpEN="// Default request\n{\n \"url\": \"{{url}}\",\n \"method\": \"POST\",\n \"headers\": {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{key}}\"\n },\n \"body\": {\n \"text\": \"{{text}}\", // Text to be translated\n \"from\": \"{{from}}\", // The language of the text (may be empty)\n \"to\": \"{{to}}\", // Target language\n },\n}\n\n\n// Default response\n{\n text: \"\", // translated text\n from: \"\", // Recognized source language\n to: \"\", // Target language (optional)\n}\n\n\n/// Hook Example\n// URL\nhttps://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN\n\n// Request Hook\n(text, from, to, url, key) => [url, {\n headers: {\n \"Content-type\": \"application/json\",\n },\n method: \"GET\",\n body: null,\n}]\n\n// Response Hook\n// In the returned array, the first value is the translated string, while the second value is a boolean\n// that indicates whether the source language is the same as the target language.\n(res, text, from, to) => [res.sentences.map((item) => item.trans).join(\" \"), to === res.src]\n\n\n// The supported language codes are as follows\n".concat(customApiLangs,"\n");const requestHookHelperZH="1\u3001\u7B2C\u4E00\u4E2A\u53C2\u6570\u5305\u542B\u5982\u4E0B\u5B57\u6BB5\uFF1A'texts', 'from', 'to', 'url', 'key', 'model', 'systemPrompt', ...\n2\u3001\u8FD4\u56DE\u503C\u5FC5\u987B\u662F\u5305\u542B\u4EE5\u4E0B\u5B57\u6BB5\u7684\u5BF9\u8C61\uFF1A 'url', 'body', 'headers', 'method'\n3\u3001\u5982\u8FD4\u56DE\u7A7A\u503C\uFF0C\u5219hook\u51FD\u6570\u4E0D\u4F1A\u4EA7\u751F\u4EFB\u4F55\u6548\u679C\u3002\n\n// \u793A\u4F8B\nasync (args, { url, body, headers, userMsg, method } = {}) => {\n return { url, body, headers, userMsg, method };\n}";const requestHookHelperEN="1. The first parameter contains the following fields: 'texts', 'from', 'to', 'url', 'key', 'model', 'systemPrompt', ...\n2. The return value must be an object containing the following fields: 'url', 'body', 'headers', 'method'\n3. If a null value is returned, the hook function will have no effect.\n\n// Example\nasync (args, { url, body, headers, userMsg, method } = {}) => {\n return { url, body, headers, userMsg, method };\n}";const responsetHookHelperZH="1\u3001\u7B2C\u4E00\u4E2A\u53C2\u6570\u5305\u542B\u5982\u4E0B\u5B57\u6BB5\uFF1A'res', ...\n2\u3001\u8FD4\u56DE\u503C\u5FC5\u987B\u662F\u5305\u542B\u4EE5\u4E0B\u5B57\u6BB5\u7684\u5BF9\u8C61\uFF1A 'translations'\n \uFF08'translations' \u5E94\u4E3A\u4E00\u4E2A\u4E8C\u7EF4\u6570\u7EC4\uFF1A[[\u8BD1\u6587, \u539F\u6587\u8BED\u8A00]]\uFF09\n3\u3001\u5982\u8FD4\u56DE\u7A7A\u503C\uFF0C\u5219hook\u51FD\u6570\u4E0D\u4F1A\u4EA7\u751F\u4EFB\u4F55\u6548\u679C\u3002\n\n// \u793A\u4F8B\nasync ({ res, ...args }) => {\n const translations = [[\"\u4F60\u597D\", \"en\"]];\n const modelMsg = {}; // \u7528\u4E8EAI\u4E0A\u4E0B\u6587\n return { translations, modelMsg };\n}";const responsetHookHelperEN="1. The first parameter contains the following fields: 'res', ...\n2. The return value must be an object containing the following fields: 'translations'\n ('translations' should be a two-dimensional array: [[translation, source language]]).\n3. If a null value is returned, the hook function will have no effect.\n\n// Example\nasync ({ res, ...args }) => {\n const translations = [[\"\u4F60\u597D\", \"en\"]];\n const modelMsg = {}; // For AI context\n return { translations, modelMsg };\n}";const I18N={app_name:{zh:"\u7B80\u7EA6\u7FFB\u8BD1",en:"KISS Translator",zh_TW:"\u7C21\u7D04\u7FFB\u8B6F"},translate:{zh:"\u7FFB\u8BD1",en:"Translate",zh_TW:"\u7FFB\u8B6F"},custom_api_help:{zh:customApiHelpZH,en:customApiHelpEN,zh_TW:customApiHelpZH},request_hook_helper:{zh:requestHookHelperZH,en:requestHookHelperEN,zh_TW:requestHookHelperZH},response_hook_helper:{zh:responsetHookHelperZH,en:responsetHookHelperEN,zh_TW:responsetHookHelperZH},translate_alt:{zh:"\u7FFB\u8BD1",en:"Translate",zh_TW:"\u7FFB\u8B6F"},basic_setting:{zh:"\u57FA\u672C\u8BBE\u7F6E",en:"Basic Setting",zh_TW:"\u57FA\u672C\u8A2D\u5B9A"},rules_setting:{zh:"\u89C4\u5219\u8BBE\u7F6E",en:"Rules Setting",zh_TW:"\u898F\u5247\u8A2D\u5B9A"},apis_setting:{zh:"\u63A5\u53E3\u8BBE\u7F6E",en:"Apis Setting",zh_TW:"API\u8A2D\u5B9A"},sync_setting:{zh:"\u540C\u6B65\u8BBE\u7F6E",en:"Sync Setting",zh_TW:"\u540C\u6B65\u8A2D\u5B9A"},patch_setting:{zh:"\u8865\u4E01\u8BBE\u7F6E",en:"Patch Setting",zh_TW:"\u4FEE\u88DC\u8A2D\u5B9A"},patch_setting_help:{zh:"\u9488\u5BF9\u4E00\u4E9B\u7279\u6B8A\u7F51\u7AD9\u7684\u4FEE\u6B63\u811A\u672C\uFF0C\u4EE5\u4FBF\u7FFB\u8BD1\u8F6F\u4EF6\u5F97\u5230\u66F4\u597D\u7684\u5C55\u793A\u6548\u679C\u3002",en:"Corrected scripts for some special websites so that the translation software can get better display results.",zh_TW:"\u91DD\u5C0D\u67D0\u4E9B\u7279\u6B8A\u7DB2\u7AD9\u7684\u4FEE\u6B63\u8173\u672C\uFF0C\u8B93\u7FFB\u8B6F\u8EDF\u9AD4\u6709\u66F4\u597D\u7684\u986F\u793A\u6548\u679C\u3002"},inject_webfix:{zh:"\u6CE8\u5165\u4FEE\u590D\u8865\u4E01",en:"Inject Webfix",zh_TW:"\u6CE8\u5165\u4FEE\u6B63\u88DC\u4E01"},about:{zh:"\u5173\u4E8E",en:"About",zh_TW:"\u95DC\u65BC"},about_md:{zh:"README.md",en:"README.en.md",zh_TW:"README.md"},about_md_local:{zh:"\u8BF7 [\u70B9\u51FB\u8FD9\u91CC](".concat("https://github.com/fishjar/kiss-translator",") \u67E5\u770B\u8BE6\u60C5\u3002"),en:"Please [click here](".concat("https://github.com/fishjar/kiss-translator",") for details."),zh_TW:"\u8ACB\u3010\u9EDE\u9019\u88E1\u3011\u67E5\u770B\u8A73\u7D30\u5167\u5BB9\u3002"},ui_lang:{zh:"\u754C\u9762\u8BED\u8A00",en:"Interface Language",zh_TW:"\u4ECB\u9762\u8A9E\u8A00"},fetch_limit:{zh:"\u6700\u5927\u5E76\u53D1\u8BF7\u6C42\u6570\u91CF (1-100)",en:"Maximum Number Of Concurrent Requests (1-100)",zh_TW:"\u6700\u5927\u540C\u6642\u8ACB\u6C42\u6578\u91CF (1-100)"},if_think:{zh:"\u542F\u7528\u6216\u7981\u7528\u6A21\u578B\u7684\u6DF1\u5EA6\u601D\u8003\u80FD\u529B",en:"Enable or disable the model\u2019s thinking behavior ",zh_TW:"\u555F\u7528\u6216\u505C\u7528\u6A21\u578B\u7684\u6DF1\u5EA6\u601D\u8003\u80FD\u529B"},think:{zh:"\u542F\u7528\u6DF1\u5EA6\u601D\u8003",en:"enable thinking",zh_TW:"\u555F\u7528\u6DF1\u5EA6\u601D\u8003"},nothink:{zh:"\u7981\u7528\u6DF1\u5EA6\u601D\u8003",en:"disable thinking",zh_TW:"\u505C\u7528\u6DF1\u5EA6\u601D\u8003"},think_ignore:{zh:"\u5FFD\u7565\u4EE5\u4E0B\u6A21\u578B\u7684\u8F93\u51FA,\u9017\u53F7(,)\u5206\u5272,\u5F53\u6A21\u578B\u652F\u6301\u601D\u8003\u4F46ollama\u4E0D\u652F\u6301\u65F6\u9700\u8981\u586B\u5199\u672C\u53C2\u6570",en:"Ignore the block for the following models, comma (,) separated",zh_TW:"\u5FFD\u7565\u4EE5\u4E0B\u6A21\u578B\u7684 \u8F38\u51FA\uFF0C\u4EE5\u9017\u865F (,) \u5206\u9694\uFF1B\u7576\u6A21\u578B\u652F\u63F4\u601D\u8003\u4F46 ollama \u4E0D\u652F\u63F4\u6642\u9700\u8981\u586B\u5BEB\u6B64\u53C3\u6578"},fetch_interval:{zh:"\u6BCF\u6B21\u8BF7\u6C42\u95F4\u9694\u65F6\u95F4 (0-5000ms)",en:"Time Between Requests (0-5000ms)",zh_TW:"\u6BCF\u6B21\u8ACB\u6C42\u9593\u9694\u6642\u9593 (0-5000ms)"},translate_interval:{zh:"\u7FFB\u8BD1\u95F4\u9694\u65F6\u95F4 (10-2000ms)",en:"Translation Interval (10-2000ms)",zh_TW:"\u7FFB\u8B6F\u9593\u9694\u6642\u9593 (10-2000ms)"},http_timeout:{zh:"\u8BF7\u6C42\u8D85\u65F6\u65F6\u95F4 (5000-60000ms)",en:"Request Timeout Time (5000-60000ms)",zh_TW:"\u8ACB\u6C42\u903E\u6642\u6642\u9593 (5000-60000ms)"},custom_header:{zh:"\u81EA\u5B9A\u4E49Header\u53C2\u6570",en:"Custom Header Params"},custom_header_help:{zh:"\u4F7F\u7528JSON\u683C\u5F0F\uFF0C\u4F8B\u5982 \"User-Agent\": \"Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0\"",en:"Use JSON format, for example \"User-Agent\": \"Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0\""},custom_body:{zh:"\u81EA\u5B9A\u4E49Body\u53C2\u6570",en:"Custom Body Params"},custom_body_help:{zh:"\u4F7F\u7528JSON\u683C\u5F0F\uFF0C\u4F8B\u5982 \"top_p\": 0.7",en:"Use JSON format, for example \"top_p\": 0.7"},min_translate_length:{zh:"\u6700\u5C0F\u7FFB\u8BD1\u5B57\u7B26\u6570 (1-100)",en:"Minimum number Of Translated Characters (1-100)",zh_TW:"\u6700\u5C0F\u7FFB\u8B6F\u5B57\u5143\u6578 (1-100)"},max_translate_length:{zh:"\u6700\u5927\u7FFB\u8BD1\u5B57\u7B26\u6570 (100-100000)",en:"Maximum number Of Translated Characters (100-100000)",zh_TW:"\u6700\u5927\u7FFB\u8B6F\u5B57\u5143\u6578 (100-100000)"},num_of_newline_characters:{zh:"\u6362\u884C\u5B57\u7B26\u6570 (1-1000)",en:"Number of Newline Characters (1-1000)",zh_TW:"\u63DB\u884C\u5B57\u5143\u6578 (1-1000)"},translate_service:{zh:"\u7FFB\u8BD1\u670D\u52A1",en:"Translate Service",zh_TW:"\u7FFB\u8B6F\u670D\u52D9"},translate_service_multiple:{zh:"\u7FFB\u8BD1\u670D\u52A1 (\u652F\u6301\u591A\u9009)",en:"Translation service (multiple supported)",zh_TW:"\u7FFB\u8B6F\u670D\u52D9 (\u652F\u63F4\u591A\u9078)"},translate_timing:{zh:"\u7FFB\u8BD1\u65F6\u673A",en:"Translate Timing",zh_TW:"\u7FFB\u8B6F\u6642\u6A5F"},mk_pagescroll:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u7FFB\u8BD1\uFF08\u63A8\u8350\uFF09",en:"Rolling Loading (Suggested)",zh_TW:"\u6EFE\u52D5\u8F09\u5165\u7FFB\u8B6F\uFF08\u5EFA\u8B70\uFF09"},mk_pageopen:{zh:"\u7ACB\u5373\u5168\u90E8\u7FFB\u8BD1",en:"Translate all now",zh_TW:"\u7ACB\u5373\u5168\u90E8\u7FFB\u8B6F"},mk_mouseover:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},mk_ctrlKey:{zh:"Control + \u9F20\u6807\u60AC\u505C",en:"Control + Mouseover",zh_TW:"Control + \u6ED1\u9F20\u61F8\u505C"},mk_shiftKey:{zh:"Shift + \u9F20\u6807\u60AC\u505C",en:"Shift + Mouseover",zh_TW:"Shift + \u6ED1\u9F20\u61F8\u505C"},mk_altKey:{zh:"Alt + \u9F20\u6807\u60AC\u505C",en:"Alt + Mouseover",zh_TW:"Alt + \u6ED1\u9F20\u61F8\u505C"},from_lang:{zh:"\u539F\u6587\u8BED\u8A00",en:"Source Language",zh_TW:"\u539F\u6587\u8A9E\u8A00"},to_lang:{zh:"\u76EE\u6807\u8BED\u8A00",en:"Target Language",zh_TW:"\u76EE\u6A19\u8A9E\u8A00"},to_lang2:{zh:"\u7B2C\u4E8C\u76EE\u6807\u8BED\u8A00",en:"Target Language 2",zh_TW:"\u7B2C\u4E8C\u76EE\u6A19\u8A9E\u8A00"},to_lang2_helper:{zh:"\u8BBE\u5B9A\u540E\uFF0C\u4E0E\u76EE\u6807\u8BED\u8A00\u4EA7\u751F\u4E92\u8BD1\u6548\u679C\uFF0C\u4F46\u4F9D\u8D56\u8FDC\u7A0B\u8BED\u8A00\u8BC6\u522B\u3002",en:"After setting, it will produce mutual translation effect with the target language, but it relies on remote language recognition.",zh_TW:"\u8A2D\u5B9A\u5F8C\u6703\u8207\u76EE\u6A19\u8A9E\u8A00\u4E92\u8B6F\uFF0C\u4F46\u4F9D\u8CF4\u9060\u7AEF\u8A9E\u8A00\u8B58\u5225\u3002"},text_style:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},text_style_alt:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},bg_color:{zh:"\u6837\u5F0F\u989C\u8272",en:"Style Color",zh_TW:"\u6A23\u5F0F\u984F\u8272"},remain_unchanged:{zh:"\u4FDD\u7559\u4E0D\u53D8",en:"Remain Unchanged",zh_TW:"\u4FDD\u7559\u4E0D\u8B8A"},google_api:{zh:"\u8C37\u6B4C\u7FFB\u8BD1\u63A5\u53E3",en:"Google Translate API",zh_TW:"Google \u7FFB\u8B6F\u4ECB\u9762"},default_selector:{zh:"\u9ED8\u8BA4\u9009\u62E9\u5668",en:"Default selector",zh_TW:"\u9810\u8A2D\u9078\u64C7\u5668"},selector_rules:{zh:"\u9009\u62E9\u5668\u89C4\u5219",en:"Selector Rules",zh_TW:"\u9078\u64C7\u5668\u898F\u5247"},save:{zh:"\u4FDD\u5B58",en:"Save",zh_TW:"\u5132\u5B58"},edit:{zh:"\u7F16\u8F91",en:"Edit",zh_TW:"\u7DE8\u8F2F"},cancel:{zh:"\u53D6\u6D88",en:"Cancel",zh_TW:"\u53D6\u6D88"},delete:{zh:"\u5220\u9664",en:"Delete",zh_TW:"\u522A\u9664"},reset:{zh:"\u91CD\u7F6E",en:"Reset",zh_TW:"\u91CD\u8A2D"},add:{zh:"\u6DFB\u52A0",en:"Add",zh_TW:"\u65B0\u589E"},inject_rules:{zh:"\u6CE8\u5165\u8BA2\u9605\u89C4\u5219",en:"Inject Subscribe Rules",zh_TW:"\u6CE8\u5165\u8A02\u95B1\u898F\u5247"},personal_rules:{zh:"\u4E2A\u4EBA\u89C4\u5219",en:"Rules",zh_TW:"\u500B\u4EBA\u898F\u5247"},subscribe_rules:{zh:"\u8BA2\u9605\u89C4\u5219",en:"Subscribe",zh_TW:"\u8A02\u95B1\u898F\u5247"},overwrite_subscribe_rules:{zh:"\u8986\u5199\u8BA2\u9605\u89C4\u5219",en:"Overwrite",zh_TW:"\u8986\u5BEB\u8A02\u95B1\u898F\u5247"},subscribe_url:{zh:"\u8BA2\u9605\u5730\u5740",en:"Subscribe URL",zh_TW:"\u8A02\u95B1\u7DB2\u5740"},rules_warn_1:{zh:"1\u3001\u89C4\u5219\u751F\u6548\u7684\u4F18\u5148\u7EA7\u4F9D\u6B21\u4E3A\uFF1A\u4E2A\u4EBA\u89C4\u5219 > \u8BA2\u9605\u89C4\u5219 > \u5168\u5C40\u89C4\u5219\u3002\"\u5168\u5C40\u89C4\u5219\"\u76F8\u5F53\u4E8E\u515C\u5E95\u89C4\u5219\u3002",en:"1. The priority of rules is: personal rules > subscription rules > global rules. \"Global rules\" are like a fallback rule.",zh_TW:"1.\u898F\u5247\u751F\u6548\u7684\u512A\u5148\u9806\u5E8F\u4F9D\u5E8F\u70BA\uFF1A\u500B\u4EBA\u898F\u5247 > \u8A02\u95B1\u898F\u5247 > \u5168\u57DF\u898F\u5247\u3002 \"\u5168\u57DF\u898F\u5247\"\u76F8\u7576\u65BC\u515C\u5E95\u898F\u5247\u3002"},rules_warn_2:{zh:"2\u3001\u201C\u8BA2\u9605\u89C4\u5219\u201D\u9009\u62E9\u6CE8\u5165\u540E\u624D\u4F1A\u751F\u6548\u3002",en:"2. \"Subscription rules\" will take effect only after injection is selected.",zh_TW:"2\u3001\u300C\u8A02\u95B1\u898F\u5247\u300D\u9078\u64C7\u6CE8\u5165\u5F8C\u624D\u6703\u751F\u6548\u3002"},rules_warn_3:{zh:"3\u3001\u5173\u4E8E\u89C4\u5219\u586B\u5199\uFF1A\u8F93\u5165\u6846\u7559\u7A7A\u6216\u4E0B\u62C9\u6846\u9009\u201C*\u201D\u8868\u793A\u91C7\u7528\u5168\u5C40\u89C4\u5219\u3002",en:"3. Regarding filling in the rules: Leave the input box blank or select \"*\" in the drop-down box to use global rule.",zh_TW:"3. \u898F\u5247\u586B\u5BEB\u8AAA\u660E\uFF1A\u8F38\u5165\u6846\u7559\u7A7A\u6216\u4E0B\u62C9\u9078\u64C7\u300C*\u300D\u8868\u793A\u4F7F\u7528\u5168\u57DF\u898F\u5247\u3002"},sync_warn:{zh:"\u6D89\u53CA\u9690\u79C1\u6570\u636E\u7684\u540C\u6B65\u8BF7\u8C28\u614E\u9009\u62E9\u7B2C\u4E09\u65B9\u540C\u6B65\u670D\u52A1\uFF0C\u5EFA\u8BAE\u81EA\u884C\u642D\u5EFA kiss-worker \u6216 WebDAV \u670D\u52A1\u3002",en:"When synchronizing data that involves privacy, please be cautious about choosing third-party sync services. It is recommended to set up your own sync service using kiss-worker or WebDAV.",zh_TW:"\u540C\u6B65\u6D89\u53CA\u96B1\u79C1\u8CC7\u6599\u6642\uFF0C\u8ACB\u8B39\u614E\u9078\u64C7\u7B2C\u4E09\u65B9\u540C\u6B65\u670D\u52D9\uFF1B\u5EFA\u8B70\u81EA\u5EFA kiss-worker \u6216 WebDAV \u670D\u52D9\u3002"},sync_warn_2:{zh:"\u5982\u679C\u670D\u52A1\u5668\u5B58\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u540C\u6B65\u7684\u6570\u636E\uFF0C\u7B2C\u4E00\u6B21\u540C\u6B65\u5C06\u76F4\u63A5\u8986\u76D6\u672C\u5730\u914D\u7F6E\uFF0C\u540E\u9762\u5219\u6839\u636E\u4FEE\u6539\u65F6\u95F4\uFF0C\u65B0\u7684\u8986\u76D6\u65E7\u7684\u3002",en:"If the server has data synchronized by other clients, the first synchronization will directly overwrite the local configuration, and later, according to the modification time, the new one will overwrite the old one.",zh_TW:"\u82E5\u4F3A\u670D\u5668\u4E0A\u5B58\u5728\u5176\u4ED6\u7528\u6236\u7AEF\u540C\u6B65\u7684\u8CC7\u6599\uFF0C\u7B2C\u4E00\u6B21\u540C\u6B65\u6703\u76F4\u63A5\u8986\u84CB\u672C\u6A5F\u8A2D\u5B9A\uFF1B\u4E4B\u5F8C\u5247\u4F9D\u4FEE\u6539\u6642\u9593\uFF0C\u7531\u65B0\u7684\u8986\u84CB\u820A\u7684\u3002"},about_sync_api:{zh:"\u81EA\u5EFAkiss-wroker\u6570\u636E\u540C\u6B65\u670D\u52A1",en:"Self-hosting a Kiss-worker data sync service",zh_TW:"\u81EA\u5EFA kiss-wroker \u8CC7\u6599\u540C\u6B65\u670D\u52D9"},about_api:{zh:"1\u3001\u5176\u4E2D BuiltinAI \u4E3A\u6D4F\u89C8\u5668\u5185\u7F6EAI\u7FFB\u8BD1\uFF0C\u76EE\u524D\u4EC5 Chrome 138 \u53CA\u4EE5\u4E0A\u7248\u672C\u5F97\u5230\u652F\u6301\u3002",en:"1. BuiltinAI is the browser's built-in AI translation, which is currently only supported by Chrome 138 and above.",zh_TW:"1.\u5176\u4E2D BuiltinAI \u70BA\u700F\u89BD\u5668\u5167\u5EFAAI\u7FFB\u8B6F\uFF0C\u76EE\u524D\u50C5 Chrome 138 \u4EE5\u4E0A\u7248\u672C\u652F\u63F4\u3002"},about_api_2:{zh:"2\u3001\u5927\u90E8\u5206AI\u63A5\u53E3\u90FD\u4E0EOpenAI\u517C\u5BB9\uFF0C\u56E0\u6B64\u9009\u62E9\u6DFB\u52A0OpenAI\u7C7B\u578B\u5373\u53EF\u3002It should be noted that Prompt has two types: batch translation and nobatch translation. Not all interfaces support batch translation.",en:"2. Most AI interfaces are compatible with OpenAI, so just choose to add the OpenAI type.",zh_TW:"2.\u5927\u90E8\u5206AI\u4ECB\u9762\u90FD\u8207OpenAI\u76F8\u5BB9\uFF0C\u56E0\u6B64\u9078\u64C7\u65B0\u589EOpenAI\u985E\u578B\u5373\u53EF\u3002\u8981\u6CE8\u610F\u7684\u662FPrompt\u5206\u805A\u5408\u7FFB\u8B6F\u548C\u975E\u805A\u5408\u7FFB\u8B6F\u5169\u7A2E\uFF0C\u4E0D\u662F\u6240\u6709\u4ECB\u9762\u90FD\u652F\u63F4\u805A\u5408\u7FFB\u8B6F\u3002"},about_api_3:{zh:"3\u3001\u6682\u672A\u5217\u51FA\u7684\u63A5\u53E3\uFF0C\u7406\u8BBA\u4E0A\u90FD\u53EF\u4EE5\u901A\u8FC7\u81EA\u5B9A\u4E49\u63A5\u53E3 (Custom) \u7684\u5F62\u5F0F\u652F\u6301\u3002",en:"3. Interfaces that have not yet been launched can theoretically be supported through custom interfaces.",zh_TW:"3\u3001\u66AB\u672A\u5217\u51FA\u7684\u4ECB\u9762\uFF0C\u7406\u8AD6\u4E0A\u90FD\u53EF\u900F\u904E\u81EA\u8A02\u4ECB\u9762 (Custom) \u7684\u5F62\u5F0F\u652F\u63F4\u3002"},about_api_proxy:{zh:"\u67E5\u770B\u81EA\u5EFA\u4E00\u4E2A\u7FFB\u8BD1\u63A5\u53E3\u4EE3\u7406",en:"Check out the self-built translation interface proxy",zh_TW:"\u67E5\u770B\u5982\u4F55\u81EA\u5EFA\u7FFB\u8B6F\u4ECB\u9762 Proxy"},setting_helper:{zh:"\u65B0\u65E7\u914D\u7F6E\u5E76\u4E0D\u517C\u5BB9\uFF0C\u5BFC\u51FA\u7684\u65E7\u7248\u914D\u7F6E\uFF0C\u52FF\u518D\u6B21\u5BFC\u5165\u3002",en:"The old and new configurations are not compatible. Do not import the exported old configuration again.",zh_TW:"\u65B0\u820A\u914D\u7F6E\u4E26\u4E0D\u76F8\u5BB9\uFF0C\u532F\u51FA\u7684\u820A\u7248\u914D\u7F6E\uFF0C\u52FF\u518D\u6B21\u532F\u5165\u3002"},style_none:{zh:"\u65E0",en:"None",zh_TW:"\u7121"},under_line:{zh:"\u4E0B\u5212\u76F4\u7EBF",en:"Underline",zh_TW:"\u4E0B\u5283\u76F4\u7DDA"},dot_line:{zh:"\u4E0B\u5212\u70B9\u72B6\u7EBF",en:"Dotted Underline",zh_TW:"\u4E0B\u5283\u9EDE\u72C0\u7DDA"},dash_line:{zh:"\u4E0B\u5212\u865A\u7EBF",en:"Dashed Underline",zh_TW:"\u4E0B\u5283\u865B\u7DDA"},dash_box:{zh:"\u865A\u7EBF\u6846",en:"Dashed Box"},dash_line_bold:{zh:"\u4E0B\u5212\u865A\u7EBF\u52A0\u7C97",en:"Dashed Underline Bold",zh_TW:"\u4E0B\u5283\u865B\u7DDA"},dash_box_bold:{zh:"\u865A\u7EBF\u6846\u52A0\u7C97",en:"Dashed Box Bold",zh_TW:"\u865B\u7DDA\u6846\u52A0\u7C97"},marker:{zh:"\u9A6C\u514B\u7B14",en:"Marker",zh_TW:"\u99AC\u514B\u7B46"},gradient_marker:{zh:"\u6E10\u53D8\u9A6C\u514B\u7B14",en:"Gradient Marker",zh_TW:"\u6F38\u5C64\u99AC\u514B\u7B46"},wavy_line:{zh:"\u4E0B\u5212\u6CE2\u6D6A\u7EBF",en:"Wavy Underline",zh_TW:"\u4E0B\u5283\u6CE2\u6D6A\u7DDA"},wavy_line_bold:{zh:"\u4E0B\u5212\u6CE2\u6D6A\u7EBF\u52A0\u7C97",en:"Wavy Underline Bold",zh_TW:"\u4E0B\u5283\u6CE2\u6D6A\u7DDA\u52A0\u7C97"},fuzzy:{zh:"\u6A21\u7CCA",en:"Fuzzy",zh_TW:"\u6A21\u7CCA"},highlight:{zh:"\u9AD8\u4EAE",en:"Highlight",zh_TW:"\u53CD\u767D\u6A19\u793A"},blockquote:{zh:"\u5F15\u7528",en:"Blockquote",zh_TW:"\u5F15\u7528"},gradient:{zh:"\u6E10\u53D8",en:"Gradient",zh_TW:"\u6F38\u8B8A"},blink:{zh:"\u95EA\u73B0",en:"Blink",zh_TW:"\u9583\u73FE"},glow:{zh:"\u53D1\u5149",en:"Glow",zh_TW:"\u767C\u5149"},colorful:{zh:"\u591A\u5F69",en:"Colorful",zh_TW:"\u591A\u5F69"},setting:{zh:"\u8BBE\u7F6E",en:"Setting",zh_TW:"\u8A2D\u5B9A"},pattern:{zh:"\u5339\u914D\u7F51\u5740",en:"URL pattern",zh_TW:"\u5339\u914D\u7DB2\u5740"},pattern_helper:{zh:"1\u3001\u652F\u6301\u661F\u53F7(*)\u901A\u914D\u7B26\u30022\u3001\u591A\u4E2AURL\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\u3002",en:"1. Supports the asterisk (*) wildcard character. 2. Separate multiple URLs with newlines or English commas \",\".",zh_TW:"1. \u652F\u63F4\u661F\u865F (*) \u842C\u7528\u5B57\u5143\u30022. \u591A\u500B URL \u8ACB\u4EE5\u63DB\u884C\u6216\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u3002"},selector_helper:{zh:"1\u3001\u9700\u8981\u7FFB\u8BD1\u7684\u76EE\u6807\u5143\u7D20\u30022\u3001\u5F00\u542F\u81EA\u52A8\u626B\u63CF\u9875\u9762\u540E\uFF0C\u672C\u8BBE\u7F6E\u65E0\u6548\u30023\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. The target element to be translated. 2. This setting is invalid when automatic page scanning is enabled. 3. Follow the CSS selector syntax.",zh_TW:"1\u3001\u9700\u8981\u7FFB\u8B6F\u7684\u76EE\u6A19\u5143\u7D20\u3002 2.\u958B\u555F\u81EA\u52D5\u6383\u63CF\u9801\u9762\u5F8C\uFF0C\u672C\u8A2D\u5B9A\u7121\u6548\u3002 3.\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},translate_switch:{zh:"\u5F00\u542F\u7FFB\u8BD1",en:"Translate Switch",zh_TW:"\u958B\u555F\u7FFB\u8B6F"},default_enabled:{zh:"\u9ED8\u8BA4\u5F00\u542F",en:"Enabled",zh_TW:"\u9810\u8A2D\u958B\u555F"},default_disabled:{zh:"\u9ED8\u8BA4\u5173\u95ED",en:"Disabled",zh_TW:"\u9810\u8A2D\u95DC\u9589"},selector:{zh:"\u9009\u62E9\u5668",en:"Selector",zh_TW:"\u9078\u64C7\u5668"},target_selector:{zh:"\u76EE\u6807\u5143\u7D20\u9009\u62E9\u5668",en:"Target element selector",zh_TW:"\u76EE\u6A19\u5143\u7D20\u9078\u64C7\u5668"},keep_selector:{zh:"\u4FDD\u7559\u5143\u7D20\u9009\u62E9\u5668",en:"Keep unchanged selector",zh_TW:"\u4FDD\u7559\u5143\u7D20\u9078\u64C7\u5668"},keep_selector_helper:{zh:"1\u3001\u76EE\u6807\u5143\u7D20\u4E0B\u9762\u9700\u8981\u539F\u6837\u4FDD\u7559\u7684\u5B50\u8282\u70B9\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. The child nodes under the target element need to remain intact. 2. Follow the CSS selector syntax.",zh_TW:"1. \u76EE\u6A19\u5143\u7D20\u4E0B\u7684\u5B50\u7BC0\u9EDE\u9700\u8981\u4FDD\u6301\u539F\u6A23\u3002 2. \u9075\u5FAA CSS \u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},root_selector:{zh:"\u6839\u8282\u70B9\u9009\u62E9\u5668",en:"Root node selector",zh_TW:"\u6839\u7BC0\u9EDE\u9078\u64C7\u5668"},root_selector_helper:{zh:"1\u3001\u7528\u4E8E\u7F29\u5C0F\u9875\u9762\u7FFB\u8BD1\u8303\u56F4\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. Used to narrow the translation scope of the page. 2. Follow the CSS selector syntax.",zh_TW:"1.\u7528\u65BC\u7E2E\u5C0F\u9801\u9762\u7FFB\u8B6F\u7BC4\u570D\u3002 2\u3001\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},ignore_selector:{zh:"\u4E0D\u7FFB\u8BD1\u8282\u70B9\u9009\u62E9\u5668",en:"Ignore node selectors",zh_TW:"\u4E0D\u7FFB\u8B6F\u7BC0\u9EDE\u9078\u64C7\u5668"},ignore_selector_helper:{zh:"1\u3001\u9700\u8981\u5FFD\u7565\u7684\u8282\u70B9\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. Nodes to be ignored. 2. Follow CSS selector syntax.",zh_TW:"1\u3001\u9700\u8981\u5FFD\u7565\u7684\u7BC0\u9EDE\u3002 2\u3001\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},terms:{zh:"\u4E13\u4E1A\u672F\u8BED",en:"Terms",zh_TW:"\u5C08\u696D\u8853\u8A9E"},terms_helper:{zh:"1\u3001\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\uFF0C\u65E0\u9700\u659C\u6746\uFF0C\u4E0D\u652F\u6301\u4FEE\u9970\u7B26\u30022\u3001\u591A\u6761\u672F\u8BED\u7528\u6362\u884C\u6216\u5206\u53F7\u201C;\u201D\u9694\u5F00\u30023\u3001\u672F\u8BED\u548C\u8BD1\u6587\u7528\u82F1\u6587\u9017\u53F7\u201C,\u201D\u9694\u5F00\u30024\u3001\u6CA1\u6709\u8BD1\u6587\u89C6\u4E3A\u4E0D\u7FFB\u8BD1\u672F\u8BED\u3002",en:"1. Supports regular expression matching, no slash required, and no modifiers are supported. 2. Separate multiple terms with newlines or semicolons \";\". 3. Terms and translations are separated by English commas \",\". 4. If there is no translation, the term will be deemed not to be translated.",zh_TW:"1. \u652F\u63F4\u6B63\u5247\u8868\u9054\u5F0F\u6BD4\u5C0D\uFF0C\u7121\u9700\u659C\u7DDA\uFF0C\u4E14\u4E0D\u652F\u63F4\u4FEE\u98FE\u7B26\u30022. \u591A\u689D\u8853\u8A9E\u4EE5\u63DB\u884C\u6216\u5206\u865F\u300C;\u300D\u5206\u9694\u30023. \u8853\u8A9E\u8207\u8B6F\u6587\u4EE5\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u30024. \u7121\u8B6F\u6587\u8005\u8996\u70BA\u4E0D\u7FFB\u8B6F\u8A72\u8853\u8A9E\u3002"},ai_terms:{zh:"AI\u4E13\u4E1A\u672F\u8BED",en:"AI Terms",zh_TW:"AI\u5C08\u696D\u8853\u8A9E"},ai_terms_helper:{zh:"1\u3001AI\u667A\u80FD\u66FF\u6362\uFF0C\u4E0D\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\u30022\u3001\u591A\u6761\u672F\u8BED\u7528\u6362\u884C\u6216\u5206\u53F7\u201C;\u201D\u9694\u5F00\u30023\u3001\u672F\u8BED\u548C\u8BD1\u6587\u7528\u82F1\u6587\u9017\u53F7\u201C,\u201D\u9694\u5F00\u30024\u3001\u6CA1\u6709\u8BD1\u6587\u89C6\u4E3A\u4E0D\u7FFB\u8BD1\u672F\u8BED\u3002",en:"1. AI intelligent replacement does not support regular expressions.2. Separate multiple terms with newlines or semicolons \";\". 3. Terms and translations are separated by English commas \",\". 4. If there is no translation, the term will be deemed not to be translated.",zh_TW:"1.AI\u667A\u80FD\u66FF\u63DB\uFF0C\u4E0D\u652F\u63F4\u6B63\u898F\u8868\u793A\u5F0F\u30022. \u591A\u689D\u8853\u8A9E\u4EE5\u63DB\u884C\u6216\u5206\u865F\u300C;\u300D\u5206\u9694\u30023. \u8853\u8A9E\u8207\u8B6F\u6587\u4EE5\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u30024. \u7121\u8B6F\u6587\u8005\u8996\u70BA\u4E0D\u7FFB\u8B6F\u8A72\u8853\u8A9E\u3002"},text_ext_style:{zh:"\u8BD1\u6587\u9644\u52A0\u6837\u5F0F",en:"Translation additional styles",zh_TW:"\u8B6F\u6587\u9644\u52A0\u6A23\u5F0F"},selector_style:{zh:"\u9009\u62E9\u5668\u8282\u70B9\u6837\u5F0F",en:"Selector Style",zh_TW:"\u9078\u64C7\u5668\u7BC0\u9EDE\u6A23\u5F0F"},terms_style:{zh:"\u4E13\u4E1A\u672F\u8BED\u6837\u5F0F",en:"Terms Style",zh_TW:"\u5C08\u696D\u8853\u8A9E\u6A23\u5F0F"},highlight_style:{zh:"\u8BCD\u6C47\u9AD8\u4EAE\u6837\u5F0F",en:"Fav Words highlight style",zh_TW:"\u8A5E\u5F59\u9AD8\u4EAE\u6A23\u5F0F"},selector_style_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\u3002",en:"It is injected when translation is turned on.",zh_TW:"\u5728\u958B\u555F\u7FFB\u8B6F\u6642\u6CE8\u5165\u3002"},selector_parent_style:{zh:"\u9009\u62E9\u5668\u7236\u8282\u70B9\u6837\u5F0F",en:"Parent Selector Style",zh_TW:"\u9078\u64C7\u5668\u7236\u7BC0\u9EDE\u6A23\u5F0F"},selector_grand_style:{zh:"\u9009\u62E9\u5668\u7956\u8282\u70B9\u6837\u5F0F",en:"Grand Selector Style",zh_TW:"\u9078\u64C7\u5668\u7956\u7BC0\u9EDE\u6A23\u5F0F"},inject_js:{zh:"\u6CE8\u5165JS",en:"Inject JS",zh_TW:"\u6CE8\u5165 JS"},inject_js_helper:{zh:"\u9884\u52A0\u8F7D\u65F6\u6CE8\u5165\uFF0C\u4E00\u4E2A\u9875\u9762\u4EC5\u8FD0\u884C\u4E00\u6B21\u3002\u5185\u7F6E\u5168\u5C40\u5BF9\u8C61 KT: {\n apiTranslate,\n apiDectect,\n apiSetting,\n apisMap,\n toLang,\n docInfo,\n glossary,\n }",en:"Injected during preload, runs only once per page. Built-in global object KT: {\n apiTranslate,\n apiDectect,\n apiSetting,\n apisMap,\n toLang,\n docInfo,\n glossary,\n }",zh_TW:"\u9810\u5148\u8F09\u5165\u6642\u6CE8\u5165\uFF0C\u4E00\u500B\u9801\u9762\u50C5\u904B\u884C\u4E00\u6B21\u3002\u5167\u5EFA\u5168\u57DF\u7269\u4EF6 KT: {\n apiTranslate,\n apiDectect,\n apiSetting,\n apisMap,\n toLang,\n docInfo,\n glossary,\n }"},inject_css:{zh:"\u6CE8\u5165CSS",en:"Inject CSS",zh_TW:"\u6CE8\u5165 CSS"},inject_css_helper:{zh:"\u521D\u59CB\u5316\u65F6\u6CE8\u5165\u8FD0\u884C\uFF0C\u4E00\u4E2A\u9875\u9762\u4EC5\u8FD0\u884C\u4E00\u6B21\u3002",en:"Injected and run at initialization, and only run once per page.",zh_TW:"\u521D\u59CB\u5316\u6642\u6CE8\u5165\u904B\u884C\uFF0C\u4E00\u500B\u9801\u9762\u50C5\u904B\u884C\u4E00\u6B21\u3002"},fixer_function:{zh:"\u4FEE\u590D\u51FD\u6570",en:"Fixer Function",zh_TW:"\u4FEE\u5FA9\u51FD\u5F0F"},fixer_function_helper:{zh:"1\u3001br\u662F\u5C06
\u6362\u884C\u66FF\u6362\u6210

\u30022\u3001bn\u662F\u5C06\\n\u6362\u884C\u66FF\u6362\u6210

\u30023\u3001brToDiv\u548CbnToDiv\u662F\u66FF\u6362\u6210

\u3002",en:"1. br replaces
line breaks with

. 2. bn replaces \\n newline with

. 3. brToDiv and bnToDiv are replaced with

.",zh_TW:"1. br \u6703\u5C07
\u63DB\u884C\u66FF\u63DB\u70BA

\u30022. bn \u6703\u5C07 \\n \u63DB\u884C\u66FF\u63DB\u70BA

\u30023. brToDiv \u8207 bnToDiv \u6703\u66FF\u63DB\u70BA

\u3002"},import:{zh:"\u5BFC\u5165",en:"Import",zh_TW:"\u532F\u5165"},export:{zh:"\u5BFC\u51FA",en:"Export",zh_TW:"\u532F\u51FA"},export_translation:{zh:"\u5BFC\u51FA\u91CA\u4E49",en:"Export Translation",zh_TW:"\u532F\u51FA\u91CB\u7FA9"},error_cant_be_blank:{zh:"\u4E0D\u80FD\u4E3A\u7A7A",en:"Can not be blank",zh_TW:"\u4E0D\u53EF\u70BA\u7A7A"},error_duplicate_values:{zh:"\u5B58\u5728\u91CD\u590D\u7684\u503C",en:"There are duplicate values",zh_TW:"\u5B58\u5728\u91CD\u8907\u7684\u503C"},error_wrong_file_type:{zh:"\u9519\u8BEF\u7684\u6587\u4EF6\u7C7B\u578B",en:"Wrong file type",zh_TW:"\u6A94\u6848\u985E\u578B\u932F\u8AA4"},error_fetch_url:{zh:"\u8BF7\u68C0\u67E5url\u5730\u5740\u662F\u5426\u6B63\u786E\u6216\u7A0D\u540E\u518D\u8BD5\u3002",en:"Please check if the url address is correct or try again later.",zh_TW:"\u8ACB\u6AA2\u67E5 URL \u662F\u5426\u6B63\u78BA\u6216\u7A0D\u5F8C\u518D\u8A66\u3002"},deepl_api:{zh:"DeepL \u63A5\u53E3",en:"DeepL API",zh_TW:"DeepL \u4ECB\u9762"},deepl_key:{zh:"DeepL \u5BC6\u94A5",en:"DeepL Key",zh_TW:"DeepL \u91D1\u9470"},openai_api:{zh:"OpenAI \u63A5\u53E3",en:"OpenAI API",zh_TW:"OpenAI \u4ECB\u9762"},openai_key:{zh:"OpenAI \u5BC6\u94A5",en:"OpenAI Key",zh_TW:"OpenAI \u91D1\u9470"},openai_model:{zh:"OpenAI \u6A21\u578B",en:"OpenAI Model",zh_TW:"OpenAI \u6A21\u578B"},openai_prompt:{zh:"OpenAI \u63D0\u793A\u8BCD",en:"OpenAI Prompt",zh_TW:"OpenAI \u63D0\u793A\u8A5E"},if_clear_cache:{zh:"\u662F\u5426\u6E05\u9664\u7F13\u5B58\uFF08\u9ED8\u8BA4\u7F13\u5B587\u5929\uFF09",en:"Whether clear cache (Default cache is 7 days)",zh_TW:"\u662F\u5426\u6E05\u9664\u5FEB\u53D6\uFF08\u9810\u8A2D\u5FEB\u53D67\u5929\uFF09"},clear_cache_never:{zh:"\u4E0D\u6E05\u9664\u7F13\u5B58",en:"Never clear cache",zh_TW:"\u4E0D\u6E05\u9664\u5FEB\u53D6"},clear_cache_restart:{zh:"\u91CD\u542F\u6D4F\u89C8\u5668\u65F6\u6E05\u9664\u7F13\u5B58",en:"Clear cache when restarting browser",zh_TW:"\u91CD\u65B0\u555F\u52D5\u700F\u89BD\u5668\u6642\u6E05\u9664\u5FEB\u53D6"},data_sync_type:{zh:"\u6570\u636E\u540C\u6B65\u65B9\u5F0F",en:"Data Sync Type",zh_TW:"\u8CC7\u6599\u540C\u6B65\u65B9\u5F0F"},data_sync_url:{zh:"\u6570\u636E\u540C\u6B65\u63A5\u53E3",en:"Data Sync API",zh_TW:"\u8CC7\u6599\u540C\u6B65\u4ECB\u9762"},data_sync_user:{zh:"\u6570\u636E\u540C\u6B65\u8D26\u6237",en:"Data Sync User",zh_TW:"\u8CC7\u6599\u540C\u6B65\u5E33\u865F"},data_sync_key:{zh:"\u6570\u636E\u540C\u6B65\u5BC6\u94A5",en:"Data Sync Key",zh_TW:"\u8CC7\u6599\u540C\u6B65\u91D1\u9470"},sync_now:{zh:"\u7ACB\u5373\u540C\u6B65",en:"Sync Now",zh_TW:"\u7ACB\u5373\u540C\u6B65"},sync_success:{zh:"\u540C\u6B65\u6210\u529F\uFF01",en:"Sync Success",zh_TW:"\u540C\u6B65\u6210\u529F\uFF01"},sync_failed:{zh:"\u540C\u6B65\u5931\u8D25\uFF01",en:"Sync Error",zh_TW:"\u540C\u6B65\u5931\u6557\uFF01"},error_got_some_wrong:{zh:"\u62B1\u6B49\uFF0C\u51FA\u9519\u4E86\uFF01",en:"Sorry, something went wrong!",zh_TW:"\u62B1\u6B49\uFF0C\u767C\u751F\u932F\u8AA4\uFF01"},error_sync_setting:{zh:"\u60A8\u7684\u540C\u6B65\u7C7B\u578B\u5FC5\u987B\u4E3A\u201CKISS-Worker\u201D\uFF0C\u4E14\u9700\u586B\u5199\u5B8C\u6574",en:"Your sync type must be \"KISS-Worker\" and must be filled in completely",zh_TW:"\u60A8\u7684\u540C\u6B65\u578B\u614B\u5FC5\u9808\u70BA\u300CKISS-Worker\u300D\uFF0C\u4E14\u9700\u586B\u5BEB\u5B8C\u6574\u3002"},click_test:{zh:"\u70B9\u51FB\u6D4B\u8BD5",en:"Click Test",zh_TW:"\u9EDE\u64CA\u6E2C\u8A66"},test_success:{zh:"\u6D4B\u8BD5\u6210\u529F",en:"Test success",zh_TW:"\u6E2C\u8A66\u6210\u529F"},test_failed:{zh:"\u6D4B\u8BD5\u5931\u8D25",en:"Test failed",zh_TW:"\u6E2C\u8A66\u5931\u6557"},clear_all_cache_now:{zh:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u7F13\u5B58",en:"Clear all cache now",zh_TW:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u5FEB\u53D6"},clear_cache:{zh:"\u6E05\u9664\u7F13\u5B58",en:"Clear Cache",zh_TW:"\u6E05\u9664\u5FEB\u53D6"},clear_success:{zh:"\u6E05\u9664\u6210\u529F",en:"Clear success",zh_TW:"\u6E05\u9664\u6210\u529F"},clear_failed:{zh:"\u6E05\u9664\u5931\u8D25",en:"Clear failed",zh_TW:"\u6E05\u9664\u5931\u6557"},share:{zh:"\u5206\u4EAB",en:"Share",zh_TW:"\u5206\u4EAB"},clear_all:{zh:"\u6E05\u7A7A",en:"Clear All",zh_TW:"\u6E05\u7A7A"},help:{zh:"\u6C42\u52A9",en:"Help",zh_TW:"\u6C42\u52A9"},restore_default:{zh:"\u6062\u590D\u9ED8\u8BA4",en:"Restore Default",zh_TW:"\u6062\u5FA9\u9810\u8A2D"},shortcuts_setting:{zh:"\u5FEB\u6377\u952E\u8BBE\u7F6E",en:"Shortcuts Setting",zh_TW:"\u5FEB\u6377\u9375\u8A2D\u5B9A"},toggle_translate_shortcut:{zh:"\"\u5F00\u542F\u7FFB\u8BD1\"\u5FEB\u6377\u952E",en:"\"Toggle Translate\" Shortcut",zh_TW:"\u300C\u958B\u555F\u7FFB\u8B6F\u300D\u5FEB\u6377\u9375"},toggle_style_shortcut:{zh:"\"\u5207\u6362\u6837\u5F0F\"\u5FEB\u6377\u952E",en:"\"Toggle Style\" Shortcut",zh_TW:"\u300C\u5207\u63DB\u6A23\u5F0F\u300D\u5FEB\u6377\u9375"},toggle_popup_shortcut:{zh:"\"\u6253\u5F00\u5F39\u7A97\"\u5FEB\u6377\u952E",en:"\"Open Popup\" Shortcut",zh_TW:"\u300C\u958B\u555F\u5F48\u7A97\u300D\u5FEB\u6377\u9375"},open_setting_shortcut:{zh:"\"\u6253\u5F00\u8BBE\u7F6E\"\u5FEB\u6377\u952E",en:"\"Open Setting\" Shortcut",zh_TW:"\u300C\u958B\u555F\u8A2D\u5B9A\u300D\u5FEB\u6377\u9375"},hide_fab_button:{zh:"\u9690\u85CF\u60AC\u6D6E\u6309\u94AE",en:"Hide Fab Button",zh_TW:"\u96B1\u85CF\u61F8\u6D6E\u6309\u9215"},fab_click_action:{zh:"\u5355\u51FB\u60AC\u6D6E\u6309\u94AE\u52A8\u4F5C",en:"Single Click Fab Action",zh_TW:"\u55AE\u64CA\u61F8\u6D6E\u6309\u94AE\u52D5\u4F5C"},fab_click_menu:{zh:"\u5F39\u51FA\u83DC\u5355",en:"Popup Menu",zh_TW:"\u5F48\u51FA\u9078\u55AE"},fab_click_translate:{zh:"\u76F4\u63A5\u7FFB\u8BD1",en:"Translate",zh_TW:"\u76F4\u63A5\u7FFB\u8B6F"},hide_tran_button:{zh:"\u9690\u85CF\u7FFB\u8BD1\u6309\u94AE",en:"Hide Translate Button",zh_TW:"\u96B1\u85CF\u7FFB\u8B6F\u6309\u9215"},hide_click_away:{zh:"\u70B9\u51FB\u5916\u90E8\u5173\u95ED\u5F39\u7A97",en:"Click outside to close the pop-up window",zh_TW:"\u9EDE\u64CA\u5916\u90E8\u95DC\u9589\u5F48\u7A97"},use_simple_style:{zh:"\u4F7F\u7528\u7B80\u6D01\u754C\u9762",en:"Use a simple interface",zh_TW:"\u4F7F\u7528\u7C21\u6F54\u4ECB\u9762"},show:{zh:"\u663E\u793A",en:"Show",zh_TW:"\u986F\u793A"},hide:{zh:"\u9690\u85CF",en:"Hide",zh_TW:"\u96B1\u85CF"},save_rule:{zh:"\u4FDD\u5B58\u89C4\u5219",en:"Save Rule",zh_TW:"\u5132\u5B58\u898F\u5247"},global_rule:{zh:"\u5168\u5C40\u89C4\u5219",en:"Global Rule",zh_TW:"\u5168\u57DF\u898F\u5247"},input_translate:{zh:"\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation",zh_TW:"\u8F38\u5165\u6846\u7FFB\u8B6F"},use_input_box_translation:{zh:"\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation",zh_TW:"\u555F\u7528\u8F38\u5165\u6846\u7FFB\u8B6F"},input_selector:{zh:"\u8F93\u5165\u6846\u9009\u62E9\u5668",en:"Input Selector",zh_TW:"\u8F38\u5165\u6846\u9078\u64C7\u5668"},input_selector_helper:{zh:"\u7528\u4E8E\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",en:"Used for input box translation.",zh_TW:"\u7528\u65BC\u8F38\u5165\u6846\u7FFB\u8B6F\u3002"},trigger_trans_shortcut:{zh:"\u89E6\u53D1\u7FFB\u8BD1\u5FEB\u6377\u952E",en:"Trigger Translation Shortcut Keys",zh_TW:"\u89F8\u767C\u7FFB\u8B6F\u5FEB\u6377\u9375"},trigger_trans_shortcut_help:{zh:"\u9ED8\u8BA4\u4E3A\u5355\u51FB\u201CAltLeft+KeyI\u201D",en:"Default is \"AltLeft+KeyI\"",zh_TW:"\u9810\u8A2D\u70BA\u6309\u4E0B\u300CAltLeft+KeyI\u300D"},shortcut_press_count:{zh:"\u5FEB\u6377\u952E\u8FDE\u51FB\u6B21\u6570",en:"Shortcut Press Number",zh_TW:"\u5FEB\u6377\u9375\u9023\u64CA\u6B21\u6578"},combo_timeout:{zh:"\u8FDE\u51FB\u8D85\u65F6\u65F6\u95F4 (10-1000ms)",en:"Combo Timeout (10-1000ms)",zh_TW:"\u9023\u64CA\u903E\u6642 (10-1000ms)"},input_trans_start_sign:{zh:"\u7FFB\u8BD1\u8D77\u59CB\u6807\u8BC6",en:"Translation Start Sign",zh_TW:"\u7FFB\u8B6F\u8D77\u59CB\u6A19\u8A18"},input_trans_start_sign_help:{zh:"\u6807\u8BC6\u540E\u9762\u53EF\u4EE5\u52A0\u76EE\u6807\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1A \u201C/en \u4F60\u597D\u201D\u3001\u201C/zh hello\u201D",en:"The target language code can be added after the sign, such as: \"/en \u4F60\u597D\", \"/zh hello\"",zh_TW:"\u6A19\u8A18\u5F8C\u53EF\u52A0\u4E0A\u76EE\u6A19\u8A9E\u8A00\u4EE3\u78BC\uFF0C\u4F8B\u5982\uFF1A\u300C/en \u4F60\u597D\u300D\u3001\u300C/zh hello\u300D"},detect_lang_remote:{zh:"\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B",en:"Remote language detection",zh_TW:"\u9060\u7AEF\u8A9E\u8A00\u5075\u6E2C"},detect_lang_remote_help:{zh:"\u542F\u7528\u540E\u68C0\u6D4B\u51C6\u786E\u5EA6\u589E\u52A0\uFF0C\u4F46\u4F1A\u964D\u4F4E\u7FFB\u8BD1\u901F\u5EA6\uFF0C\u8BF7\u914C\u60C5\u5F00\u542F",en:"After enabling, the detection accuracy will increase, but it will reduce the translation speed. Please enable it as appropriate.",zh_TW:"\u555F\u7528\u5F8C\u53EF\u63D0\u5347\u5075\u6E2C\u6E96\u78BA\u5EA6\uFF0C\u4F46\u6703\u964D\u4F4E\u7FFB\u8B6F\u901F\u5EA6\uFF0C\u8ACB\u8996\u9700\u8981\u958B\u555F\u3002"},detect_lang_service:{zh:"\u8BED\u8A00\u68C0\u6D4B\u670D\u52A1",en:"Language detect service",zh_TW:"\u8A9E\u8A00\u6AA2\u6E2C\u670D\u52D9"},disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},enable:{zh:"\u542F\u7528",en:"Enable",zh_TW:"\u555F\u7528"},selection_translate:{zh:"\u5212\u8BCD\u7FFB\u8BD1",en:"Selection Translation",zh_TW:"\u5283\u8A5E\u7FFB\u8B6F"},toggle_selection_translate:{zh:"\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"Use Selection Translate",zh_TW:"\u555F\u7528\u5283\u8A5E\u7FFB\u8B6F"},trigger_tranbox_shortcut:{zh:"\u663E\u793A\u7FFB\u8BD1\u6846/\u7FFB\u8BD1\u9009\u4E2D\u6587\u5B57\u5FEB\u6377\u952E",en:"Open Translate Popup/Translate Selected Shortcut",zh_TW:"\u986F\u793A\u7FFB\u8B6F\u6846\uFF0F\u7FFB\u8B6F\u9078\u4E2D\u6587\u5B57\u5FEB\u6377\u9375"},tranbtn_offset_x:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBX\uFF08\xB1200\uFF09",en:"Translate Button Offset X (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6309\u9215\u4F4D\u79FB X\uFF08\xB1200\uFF09"},tranbtn_offset_y:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBY\uFF08\xB1200\uFF09",en:"Translate Button Offset Y (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6309\u9215\u4F4D\u79FB Y\uFF08\xB1200\uFF09"},tranbox_offset_x:{zh:"\u7FFB\u8BD1\u6846\u504F\u79FBX\uFF08\xB1200\uFF09",en:"Translate Box Offset X (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6846\u4F4D\u79FB X\uFF08\xB1200\uFF09"},tranbox_offset_y:{zh:"\u7FFB\u8BD1\u6846\u504F\u79FBY\uFF08\xB1200\uFF09",en:"Translate Box Offset Y (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6846\u4F4D\u79FB Y\uFF08\xB1200\uFF09"},translated_text:{zh:"\u8BD1\u6587",en:"Translated Text",zh_TW:"\u8B6F\u6587"},original_text:{zh:"\u539F\u6587",en:"Original Text",zh_TW:"\u539F\u6587"},favorite_words:{zh:"\u6536\u85CF\u8BCD\u6C47",en:"Favorite Words",zh_TW:"\u6536\u85CF\u8A5E\u5F59"},touch_setting:{zh:"\u89E6\u5C4F\u8BBE\u7F6E",en:"Touch Setting",zh_TW:"\u89F8\u63A7\u8A2D\u5B9A"},touch_translate_shortcut:{zh:"\u89E6\u5C4F\u7FFB\u8BD1\u5FEB\u6377\u65B9\u5F0F (\u652F\u6301\u591A\u9009)",en:"Touch Translate Shortcut (multiple supported)",zh_TW:"\u89F8\u63A7\u7FFB\u8B6F\u6377\u5F91 (\u652F\u63F4\u591A\u9078)"},touch_tap_0:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},touch_tap_2:{zh:"\u53CC\u6307\u8F7B\u89E6",en:"Two finger tap",zh_TW:"\u96D9\u6307\u8F15\u89F8"},touch_tap_3:{zh:"\u4E09\u6307\u8F7B\u89E6",en:"Three finger tap",zh_TW:"\u4E09\u6307\u8F15\u89F8"},touch_tap_4:{zh:"\u56DB\u6307\u8F7B\u89E6",en:"Four finger tap",zh_TW:"\u56DB\u6307\u8F15\u89F8"},touch_tap_5:{zh:"\u5355\u6307\u53CC\u51FB",en:"Double-click",zh_TW:"\u55AE\u6307\u96D9\u64CA"},touch_tap_6:{zh:"\u5355\u6307\u4E09\u51FB",en:"Triple-click",zh_TW:"\u55AE\u6307\u4E09\u64CA"},touch_tap_7:{zh:"\u53CC\u6307\u53CC\u51FB",en:"Two-finger double-click",zh_TW:"\u96D9\u6307\u96D9\u64CA"},translate_blacklist:{zh:"\u7981\u7528\u7FFB\u8BD1\u540D\u5355",en:"Translate Blacklist",zh_TW:"\u505C\u7528\u7FFB\u8B6F\u540D\u55AE"},disabled_orilist:{zh:"\u7981\u7528Origin\u540D\u5355",en:"Disabled Origin List",zh_TW:"\u505C\u7528 Origin \u540D\u55AE"},disabled_csplist:{zh:"\u7981\u7528CSP\u540D\u5355",en:"Disabled CSP List",zh_TW:"\u505C\u7528 CSP \u540D\u55AE"},disabled_csplist_helper:{zh:"3\u3001\u901A\u8FC7\u8C03\u6574CSP\u7B56\u7565\uFF0C\u4F7F\u5F97\u67D0\u4E9B\u9875\u9762\u80FD\u591F\u6CE8\u5165JS/CSS/Media\uFF0C\u8BF7\u8C28\u614E\u4F7F\u7528\uFF0C\u9664\u975E\u60A8\u5DF2\u77E5\u6653\u76F8\u5173\u98CE\u9669\u3002",en:"3. By adjusting the CSP policy, some pages can inject JS/CSS/Media. Please use it with caution unless you are aware of the related risks.",zh_TW:"3. \u900F\u904E\u8ABF\u6574 CSP \u653F\u7B56\uFF0C\u4F7F\u90E8\u5206\u9801\u9762\u53EF\u6CE8\u5165 JS/CSS/Media\u3002\u8ACB\u8B39\u614E\u4F7F\u7528\uFF0C\u9664\u975E\u60A8\u5DF2\u77E5\u6089\u76F8\u95DC\u98A8\u96AA\u3002"},skip_langs:{zh:"\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",en:"Disable Languages",zh_TW:"\u4E0D\u7FFB\u8B6F\u7684\u8A9E\u8A00"},skip_langs_helper:{zh:"\u6B64\u529F\u80FD\u4F9D\u8D56\u51C6\u786E\u7684\u8BED\u8A00\u68C0\u6D4B\uFF0C\u5EFA\u8BAE\u542F\u7528\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B\u3002",en:"This feature relies on accurate language detection. It is recommended to enable remote language detection.",zh_TW:"\u6B64\u529F\u80FD\u4EF0\u8CF4\u6E96\u78BA\u7684\u8A9E\u8A00\u5075\u6E2C\uFF0C\u5EFA\u8B70\u555F\u7528\u9060\u7AEF\u8A9E\u8A00\u5075\u6E2C\u3002"},context_menus:{zh:"\u53F3\u952E\u83DC\u5355",en:"Context Menus",zh_TW:"\u53F3\u9375\u9078\u55AE"},hide_context_menus:{zh:"\u9690\u85CF\u53F3\u952E\u83DC\u5355",en:"Hide Context Menus",zh_TW:"\u96B1\u85CF\u53F3\u9375\u9078\u55AE"},simple_context_menus:{zh:"\u7B80\u5355\u53F3\u952E\u83DC\u5355",en:"Simple_context_menus Context Menus",zh_TW:"\u7C21\u6613\u53F3\u9375\u9078\u55AE"},secondary_context_menus:{zh:"\u4E8C\u7EA7\u53F3\u952E\u83DC\u5355",en:"Secondary Context Menus",zh_TW:"\u6B21\u7D1A\u53F3\u9375\u9078\u55AE"},mulkeys_help:{zh:"\u652F\u6301\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\uFF0C\u8F6E\u8BE2\u8C03\u7528\u3002",en:"Supports polling calls separated by newlines or English commas \",\".",zh_TW:"\u652F\u63F4\u4EE5\u63DB\u884C\u6216\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\uFF0C\u8F2A\u8A62\u547C\u53EB\u3002"},translation_element_tag:{zh:"\u8BD1\u6587\u5143\u7D20\u6807\u7B7E",en:"Translation Element Tag",zh_TW:"\u8B6F\u6587\u5143\u7D20\u6A19\u7C64"},show_only_translations:{zh:"\u4EC5\u663E\u793A\u8BD1\u6587",en:"Show Only Translations",zh_TW:"\u50C5\u986F\u793A\u8B6F\u6587"},show_only_translations_help:{zh:"\u975E\u5B8C\u7F8E\u5B9E\u73B0\uFF0C\u67D0\u4E9B\u9875\u9762\u53EF\u80FD\u6709\u6837\u5F0F\u7B49\u95EE\u9898\u3002",en:"It is not a perfect implementation and some pages may have style issues.",zh_TW:"\u6B64\u70BA\u975E\u5B8C\u7F8E\u5BE6\u4F5C\uFF0C\u90E8\u5206\u9801\u9762\u53EF\u80FD\u51FA\u73FE\u6A23\u5F0F\u7B49\u554F\u984C\u3002"},translate_page_title:{zh:"\u662F\u5426\u7FFB\u8BD1\u9875\u9762\u6807\u9898",en:"Translate Page Title",zh_TW:"\u662F\u5426\u7FFB\u8B6F\u9801\u9762\u6A19\u984C"},more:{zh:"\u66F4\u591A",en:"More",zh_TW:"\u66F4\u591A"},less:{zh:"\u66F4\u5C11",en:"Less",zh_TW:"\u66F4\u5C11"},fixer_selector:{zh:"\u7F51\u9875\u4FEE\u590D\u9009\u62E9\u5668",en:"Fixer Selector",zh_TW:"\u7DB2\u9801\u4FEE\u5FA9\u9078\u64C7\u5668"},reg_niutrans:{zh:"\u83B7\u53D6\u5C0F\u725B\u7FFB\u8BD1\u5BC6\u94A5\u3010\u7B80\u7EA6\u7FFB\u8BD1\u4E13\u5C5E\u65B0\u7528\u6237\u6CE8\u518C\u8D60\u9001300\u4E07\u5B57\u7B26\u3011",en:"Get NiuTrans APIKey [KISS Translator Exclusive New User Registration Free 3 Million Characters]",zh_TW:"\u53D6\u5F97\u5C0F\u725B\u7FFB\u8B6F\u91D1\u9470\u3010\u7C21\u7D04\u7FFB\u8B6F\u5C08\u5C6C\u65B0\u7528\u6236\u8A3B\u518A\u8D08\u9001 300 \u842C\u5B57\u5143\u3011"},trigger_mode:{zh:"\u89E6\u53D1\u65B9\u5F0F",en:"Trigger Mode",zh_TW:"\u89F8\u767C\u65B9\u5F0F"},trigger_click:{zh:"\u70B9\u51FB\u89E6\u53D1",en:"Click Trigger",zh_TW:"\u9EDE\u64CA\u89F8\u767C"},trigger_hover:{zh:"\u9F20\u6807\u60AC\u505C\u89E6\u53D1",en:"Hover Trigger",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u89F8\u767C"},trigger_select:{zh:"\u9009\u4E2D\u89E6\u53D1",en:"Select Trigger",zh_TW:"\u9078\u53D6\u89F8\u767C"},extend_styles:{zh:"\u9644\u52A0\u6837\u5F0F",en:"Extend Styles",zh_TW:"\u9644\u52A0\u6A23\u5F0F"},custom_option:{zh:"\u81EA\u5B9A\u4E49\u9009\u9879",en:"Custom Option",zh_TW:"\u81EA\u8A02\u9078\u9805"},translate_selected_text:{zh:"\u7FFB\u8BD1\u9009\u4E2D\u6587\u5B57",en:"Translate Selected Text",zh_TW:"\u7FFB\u8B6F\u9078\u53D6\u6587\u5B57"},toggle_style:{zh:"\u5207\u6362\u6837\u5F0F",en:"Toggle Style",zh_TW:"\u5207\u63DB\u6A23\u5F0F"},open_menu:{zh:"\u6253\u5F00\u5F39\u7A97\u83DC\u5355",en:"Open Popup Menu",zh_TW:"\u958B\u555F\u5F48\u7A97\u9078\u55AE"},open_setting:{zh:"\u6253\u5F00\u8BBE\u7F6E",en:"Open Setting",zh_TW:"\u958B\u555F\u8A2D\u5B9A"},follow_selection:{zh:"\u7FFB\u8BD1\u6846\u8DDF\u968F\u9009\u4E2D\u6587\u672C",en:"Transbox Follow Selection",zh_TW:"\u7FFB\u8B6F\u6846\u8DDF\u96A8\u9078\u53D6\u6587\u5B57"},tranbox_auto_height:{zh:"\u7FFB\u8BD1\u6846\u81EA\u9002\u5E94\u9AD8\u5EA6",en:"Translation box adaptive height",zh_TW:"\u7FFB\u8B6F\u6846\u81EA\u9069\u61C9\u9AD8\u5EA6"},translate_start_hook:{zh:"\u7FFB\u8BD1\u5F00\u59CB\u94A9\u5B50\u51FD\u6570",en:"Translate Start Hook",zh_TW:"\u7FFB\u8B6F\u958B\u59CB Hook"},translate_start_hook_helper:{zh:"\u7FFB\u8BD1\u524D\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}",en:"Run before translation, input parameters are: {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}",zh_TW:"\u7FFB\u8B6F\u524D\u6642\u904B\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}"},translate_end_hook:{zh:"\u7FFB\u8BD1\u5B8C\u6210\u94A9\u5B50\u51FD\u6570",en:"Translate End Hook",zh_TW:"\u7FFB\u8B6F\u5B8C\u6210 Hook"},translate_end_hook_helper:{zh:"\u7FFB\u8BD1\u5B8C\u6210\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A ({hostNode, parentNode, nodes, wrapperNode, innerNode})",en:"Run when translation is complete, input parameters are: ({hostNode, parentNode, nodes, wrapperNode, innerNode})",zh_TW:"\u7FFB\u8B6F\u5B8C\u6210\u6642\u904B\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A ({hostNode, parentNode, nodes, wrapperNode, innerNode})"},translate_remove_hook:{zh:"\u7FFB\u8BD1\u79FB\u9664\u94A9\u5B50\u51FD\u6570",en:"Translate Removed Hook",zh_TW:"\u7FFB\u8B6F\u79FB\u9664 Hook"},translate_remove_hook_helper:{zh:"\u7FFB\u8BD1\u79FB\u9664\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A \u7FFB\u8BD1\u8282\u70B9\u3002",en:"Run when translation is removed, the input parameters are: translation node.",zh_TW:"\u79FB\u9664\u7FFB\u8B6F\u6642\u57F7\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A\u7FFB\u8B6F\u7BC0\u9EDE\u3002"},english_dict:{zh:"\u82F1\u6587\u8BCD\u5178",en:"English Dictionary",zh_TW:"\u82F1\u6587\u5B57\u5178"},english_suggest:{zh:"\u82F1\u6587\u5EFA\u8BAE",en:"English Suggest",zh_TW:"\u82F1\u6587\u5EFA\u8B70"},api_name:{zh:"\u63A5\u53E3\u540D\u79F0",en:"API Name",zh_TW:"\u4ECB\u9762\u540D\u7A31"},is_disabled:{zh:"\u662F\u5426\u7981\u7528",en:"Is Disabled",zh_TW:"\u662F\u5426\u505C\u7528"},translate_selected:{zh:"\u662F\u5426\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"If translate selected",zh_TW:"\u662F\u5426\u555F\u7528\u5283\u8A5E\u7FFB\u8B6F"},use_batch_fetch:{zh:"\u662F\u5426\u805A\u5408\u53D1\u9001\u7FFB\u8BD1\u8BF7\u6C42",en:"Whether to aggregate and send translation requests",zh_TW:"\u662F\u5426\u805A\u5408\u767C\u9001\u7FFB\u8B6F\u8ACB\u6C42"},batch_interval:{zh:"\u805A\u5408\u8BF7\u6C42\u7B49\u5F85\u65F6\u95F4(100-10000)",en:"Aggregation request waiting time (100-10000)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u7B49\u5F85\u6642\u9593(100-10000)"},batch_size:{zh:"\u805A\u5408\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570(1-100)",en:"Maximum number of paragraphs in an aggregation request (1-100)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u6700\u5927\u6BB5\u843D\u6578(1-100)"},batch_length:{zh:"\u805A\u5408\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6(1000-100000)",en:"Maximum text length for aggregation requests (1000-100000)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u6700\u5927\u6587\u5B57\u9577\u5EA6(1000-100000)"},use_context:{zh:"\u662F\u5426\u542F\u7528\u667A\u80FD\u4E0A\u4E0B\u6587",en:"Whether to enable AI context",zh_TW:"\u662F\u5426\u555F\u7528\u667A\u6167\u4E0A\u4E0B\u6587"},context_size:{zh:"\u4E0A\u4E0B\u6587\u4F1A\u8BDD\u6570\u91CF(1-20)",en:"Number of context sessions(1-20)",zh_TW:"\u4E0A\u4E0B\u6587\u6703\u8A71\u6578\u91CF(1-20)"},auto_scan_page:{zh:"\u81EA\u52A8\u626B\u63CF\u9875\u9762",en:"Auto scan page",zh_TW:"\u81EA\u52D5\u6383\u63CF\u9801\u9762"},has_rich_text:{zh:"\u542F\u7528\u5BCC\u6587\u672C\u7FFB\u8BD1",en:"Enable rich text translation",zh_TW:"\u555F\u7528\u5BCC\u6587\u672C\u7FFB\u8B6F"},has_shadowroot:{zh:"\u626B\u63CFShadowroot",en:"Scan Shadowroot",zh_TW:"\u6383\u63CFShadowroot"},mousehover_translate:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover Translation",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},use_mousehover_translation:{zh:"\u542F\u7528\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Enable mouseover translation",zh_TW:"\u555F\u7528\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},selected_translation_alert:{zh:"\u5212\u8BCD\u7FFB\u8BD1\u7684\u5F00\u542F\u548C\u5173\u95ED\u8BF7\u5230\u201C\u89C4\u5219\u8BBE\u7F6E\u201D\u91CC\u9762\u8BBE\u7F6E\u3002",en:"To turn selected translation on or off, please go to \"Rule Settings\".",zh_TW:"\u5283\u8A5E\u7FFB\u8B6F\u7684\u958B\u555F\u548C\u95DC\u9589\u8ACB\u5230\u300C\u898F\u5247\u8A2D\u5B9A\u300D\u88E1\u9762\u8A2D\u5B9A\u3002"},mousehover_key_help:{zh:"\u5F53\u5FEB\u6377\u952E\u7F6E\u7A7A\u65F6\u8868\u793A\u9F20\u6807\u60AC\u505C\u76F4\u63A5\u7FFB\u8BD1",en:"When the shortcut key is empty, it means that the mouse hovers to translate directly",zh_TW:"\u7576\u5FEB\u6377\u9375\u7F6E\u7A7A\u6642\u8868\u793A\u6ED1\u9F20\u61F8\u505C\u76F4\u63A5\u7FFB\u8B6F"},autoscan_alt:{zh:"\u81EA\u52A8\u626B\u63CF",en:"Auto Scan",zh_TW:"\u81EA\u52D5\u6383\u63CF"},shadowroot_alt:{zh:"ShadowRoot",en:"ShadowRoot",zh_TW:"ShadowRoot"},richtext_alt:{zh:"\u4FDD\u7559\u5BCC\u6587\u672C",en:"Rich Text",zh_TW:"\u4FDD\u7559\u5BCC\u6587\u672C"},transonly_alt:{zh:"\u9690\u85CF\u539F\u6587",en:"Hide Original",zh_TW:"\u96B1\u85CF\u539F\u6587"},confirm_title:{zh:"\u786E\u8BA4",en:"Confirm",zh_TW:"\u78BA\u8A8D"},confirm_message:{zh:"\u786E\u5B9A\u64CD\u4F5C\u5417\uFF1F",en:"Are you sure you want to proceed?",zh_TW:"\u78BA\u5B9A\u64CD\u4F5C\u55CE\uFF1F"},confirm_action:{zh:"\u786E\u5B9A",en:"Confirm",zh_TW:"\u78BA\u5B9A"},cancel_action:{zh:"\u53D6\u6D88",en:"Cancel",zh_TW:"\u53D6\u6D88"},pls_press_shortcut:{zh:"\u8BF7\u6309\u4E0B\u5FEB\u6377\u952E\u7EC4\u5408",en:"Please press the shortcut key combination",zh_TW:"\u8ACB\u6309\u4E0B\u5FEB\u901F\u9375\u7D44\u5408"},load_setting_err:{zh:"\u6570\u636E\u52A0\u8F7D\u51FA\u9519\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u6216\u5378\u8F7D\u540E\u91CD\u65B0\u5B89\u88C5\u3002",en:"Please press the shortcut key combination",zh_TW:"\u8ACB\u6309\u4E0B\u5FEB\u901F\u9375\u7D44\u5408"},translation_style:{zh:"\u7FFB\u8BD1\u98CE\u683C",en:"Translation style",zh_TW:"\u7FFB\u8B6F\u98A8\u683C"},placeholder:{zh:"\u5360\u4F4D\u7B26",en:"Placeholder",zh_TW:"\u4F54\u4F4D\u7B26"},tag_name:{zh:"\u5360\u4F4D\u6807\u7B7E\u540D",en:"Placeholder tag name",zh_TW:"\u4F54\u4F4D\u6A19\u540D"},system_prompt_helper:{zh:"\u5728\u672A\u5B8C\u5168\u7406\u89E3\u9ED8\u8BA4Prompt\u7684\u60C5\u51B5\u4E0B\uFF0C\u8BF7\u52FF\u968F\u610F\u4FEE\u6539\uFF0C\u5426\u5219\u53EF\u80FD\u65E0\u6CD5\u5DE5\u4F5C\u3002",en:"Do not modify the default prompt without fully understanding it, otherwise it may not work.",zh_TW:"\u5728\u672A\u5B8C\u5168\u7406\u89E3\u9810\u8A2DPrompt\u7684\u60C5\u6CC1\u4E0B\uFF0C\u8ACB\u52FF\u96A8\u610F\u4FEE\u6539\uFF0C\u5426\u5247\u53EF\u80FD\u7121\u6CD5\u904B\u4F5C\u3002"},if_pre_init:{zh:"\u662F\u5426\u9884\u521D\u59CB\u5316",en:"Whether to pre-initialize",zh_TW:"\u662F\u5426\u9810\u521D\u59CB\u5316"},export_old:{zh:"\u5BFC\u51FA\u65E7\u7248",en:"Export old version",zh_TW:"\u532F\u51FA\u820A\u7248"},favorite_words_helper:{zh:"\u5BFC\u5165\u8BCD\u6C47\u8BF7\u4F7F\u7528txt\u6587\u4EF6\uFF0C\u6BCF\u4E00\u884C\u4E00\u4E2A\u5355\u8BCD\u3002",en:"To import vocabulary, please use a txt file with one word per line.",zh_TW:"\u532F\u5165\u8A5E\u5F59\u8ACB\u4F7F\u7528txt\u6587\u4EF6\uFF0C\u6BCF\u4E00\u884C\u4E00\u500B\u55AE\u5B57\u3002"},btn_tip_click_away:{zh:"\u5931\u7126\u9690\u85CF/\u663E\u793A",en:"Loss of focus hide/show",zh_TW:"\u5931\u7126\u96B1\u85CF/\u986F\u793A"},btn_tip_follow_selection:{zh:"\u8DDF\u968F/\u56FA\u5B9A\u6A21\u5F0F",en:"Follow/Fixed Mode",zh_TW:"\u8DDF\u96A8/\u56FA\u5B9A\u6A21\u5F0F"},btn_tip_simple_style:{zh:"\u8FF7\u4F60/\u5E38\u89C4\u6A21\u5F0F",en:"Mini/Regular Mode",zh_TW:"\u8FF7\u4F60/\u5E38\u898F\u6A21\u5F0F"},api_placeholder:{zh:"\u5360\u4F4D\u7B26",en:"Placeholder",zh_TW:"\u4F54\u4F4D\u7B26"},api_placetag:{zh:"\u5360\u4F4D\u6807\u7B7E",en:"Placeholder tags",zh_TW:"\u4F54\u4F4D\u6A19"},detected_lang:{zh:"\u8BED\u8A00\u68C0\u6D4B",en:"Language detection",zh_TW:"\u8A9E\u8A00\u5075\u6E2C"},detected_result:{zh:"\u68C0\u6D4B\u7ED3\u679C",en:"Detect result",zh_TW:"\u6AA2\u6E2C\u7D50\u679C"},subtitle_translate:{zh:"\u5B57\u5E55\u7FFB\u8BD1",en:"Subtitle translation",zh_TW:"\u5B57\u5E55\u7FFB\u8B6F"},toggle_subtitle_translate:{zh:"\u542F\u7528\u5B57\u5E55\u7FFB\u8BD1",en:"Enable subtitle translation",zh_TW:"\u555F\u7528\u5B57\u5E55\u7FFB\u8B6F"},is_bilingual_view:{zh:"\u53CC\u8BED\u663E\u793A",en:"Enable bilingual display",zh_TW:"\u96D9\u8A9E\u986F\u793A"},is_skip_ad:{zh:"\u662F\u5426\u5FEB\u8FDB\u5E7F\u544A",en:"Should I fast forward to the ad?",zh_TW:"\u662F\u5426\u5FEB\u8F49\u5EE3\u544A"},background_styles:{zh:"\u80CC\u666F\u6837\u5F0F",en:"DBackground Style",zh_TW:"\u80CC\u666F\u6A23\u5F0F"},origin_styles:{zh:"\u539F\u6587\u6837\u5F0F",en:"Original style",zh_TW:"\u539F\u6587\u6A23\u5F0F"},translation_styles:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Translation style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},ai_segmentation:{zh:"AI\u667A\u80FD\u65AD\u53E5",en:"AI intelligent punctuation",zh_TW:"AI\u667A\u6167\u65B7\u53E5"},ai_chunk_length:{zh:"AI\u5904\u7406\u5207\u5272\u957F\u5EA6(200-20000)",en:"AI processing chunk length(200-20000)",zh_TW:"AI\u5904\u7406\u5207\u5272\u957F\u5EA6(200-20000)"},subtitle_helper_1:{zh:"1\u3001\u76EE\u524D\u4EC5\u652F\u6301Youtube\u684C\u9762\u7F51\u7AD9\u3002",en:"1. Currently only supports Youtube desktop website.",zh_TW:"1.\u76EE\u524D\u50C5\u652F\u63F4Youtube\u684C\u9762\u7DB2\u7AD9\uFF0C\u4E14\u50C5\u652F\u63F4\u700F\u89BD\u5668\u64F4\u5145\u529F\u80FD\u3002"},subtitle_helper_2:{zh:"2\u3001\u63D2\u4EF6\u5185\u7F6E\u57FA\u7840\u7684\u5B57\u5E55\u5408\u5E76\u3001\u65AD\u53E5\u7B97\u6CD5\uFF0C\u53EF\u6EE1\u8DB3\u5927\u90E8\u5206\u60C5\u51B5\u3002",en:"2. The plug-in has built-in basic subtitle merging and sentence segmentation algorithms, which can meet most situations.",zh_TW:"2.\u63D2\u4EF6\u5167\u5EFA\u57FA\u790E\u7684\u5B57\u5E55\u5408\u4F75\u3001\u65B7\u53E5\u6F14\u7B97\u6CD5\uFF0C\u53EF\u6EFF\u8DB3\u5927\u90E8\u5206\u60C5\u6CC1\u3002"},subtitle_helper_3:{zh:"3\u3001\u4EA6\u53EF\u4EE5\u542F\u7528AI\u667A\u80FD\u65AD\u53E5\uFF0C\u4F46\u9700\u8003\u8651\u5207\u5272\u957F\u5EA6\u53CAAI\u63A5\u53E3\u80FD\u529B\uFF0C\u53EF\u80FD\u5904\u7406\u65F6\u95F4\u4F1A\u5F88\u957F\uFF0C\u751A\u81F3\u5904\u7406\u5931\u8D25\uFF0C\u5BFC\u81F4\u65E0\u6CD5\u770B\u5230\u5B57\u5E55\u3002",en:"3. You can also enable AI intelligent segmentation, but you need to consider the segmentation length and AI interface capabilities. The processing time may be very long or even fail, resulting in the inability to see subtitles.",zh_TW:"3.\u4EA6\u53EF\u555F\u7528AI\u667A\u80FD\u65B7\u53E5\uFF0C\u4F46\u9700\u8003\u616E\u5207\u5272\u9577\u5EA6\u53CAAI\u4ECB\u9762\u80FD\u529B\uFF0C\u53EF\u80FD\u8655\u7406\u6642\u9593\u6703\u5F88\u9577\uFF0C\u751A\u81F3\u8655\u7406\u5931\u6557\uFF0C\u5C0E\u81F4\u7121\u6CD5\u770B\u5230\u5B57\u5E55\u3002"},default_styles_example:{zh:"\u9ED8\u8BA4\u6837\u5F0F\u53C2\u8003\uFF1A",en:"Default styles reference:",zh_TW:"\u8A8D\u6A23\u5F0F\u53C3\u8003\uFF1A"},subtitle_load_succeed:{zh:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u6210\u529F\uFF01",en:"Bilingual subtitles loaded successfully!",zh_TW:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u6210\u529F\uFF01"},subtitle_load_failed:{zh:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u5931\u8D25\uFF01",en:"Failed to load bilingual subtitles!",zh_TW:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u5931\u8D25\uFF01"},try_get_subtitle_data:{zh:"\u5C1D\u8BD5\u83B7\u53D6\u5B57\u5E55\u6570\u636E\uFF0C\u8BF7\u7A0D\u5019...",en:"Trying to get subtitle data, please wait...",zh_TW:"\u5C1D\u8BD5\u83B7\u53D6\u5B57\u5E55\u6570\u636E\uFF0C\u8BF7\u7A0D\u5019..."},subtitle_data_processing:{zh:"\u5B57\u5E55\u6570\u636E\u5904\u7406\u4E2D...",en:"Subtitle data processing...",zh_TW:"\u5B57\u5E55\u6570\u636E\u5904\u7406\u4E2D..."},starting_to_process_subtitle:{zh:"\u5F00\u59CB\u5904\u7406\u5B57\u5E55\u6570\u636E...",en:"Starting to process subtitle data...",zh_TW:"\u5F00\u59CB\u5904\u7406\u5B57\u5E55\u6570\u636E..."},subtitle_data_is_ready:{zh:"\u5B57\u5E55\u6570\u636E\u5DF2\u51C6\u5907\u5C31\u7EEA\uFF0C\u8BF7\u70B9\u51FBKT\u6309\u94AE\u52A0\u8F7D",en:"The subtitle data is ready, please click the KT button to load it",zh_TW:"\u5B57\u5E55\u8CC7\u6599\u5DF2\u6E96\u5099\u5C31\u7DD2\uFF0C\u8ACB\u9EDE\u64CAKT\u6309\u9215\u52A0\u8F09"},log_level:{zh:"\u65E5\u5FD7\u7EA7\u522B",en:"Log Level",zh_TW:"\u65E5\u8A8C\u7B49\u7D1A"},goto_custom_api_example:{zh:"\u70B9\u51FB\u67E5\u770B\u3010\u81EA\u5B9A\u4E49\u63A5\u53E3\u793A\u4F8B\u3011",en:"Click to view [Custom Interface Example]",zh_TW:"\u9EDE\u9078\u67E5\u770B\u3010\u81EA\u8A02\u4ECB\u9762\u7BC4\u4F8B\u3011"},split_paragraph:{zh:"\u5207\u5206\u957F\u6BB5\u843D",en:"Split long paragraph",zh_TW:"\u5207\u5206\u9577\u6BB5\u843D"},split_length:{zh:"\u5207\u5206\u957F\u5EA6 (0-10000)",en:"Segmentation length(0-10000)",zh_TW:"\u5207\u5206\u9577\u5EA6(0-10000)"},highlight_words:{zh:"\u9AD8\u4EAE\u6536\u85CF\u8BCD\u6C47",en:"Highlight favorite words",zh_TW:"\u9AD8\u4EAE\u6536\u85CF\u8A5E\u5F59"},split_disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},split_textlength:{zh:"\u6309\u7167\u957F\u5EA6\u5207\u5206",en:"Split by length",zh_TW:"\u4F9D\u9577\u5EA6\u5207\u5206"},split_punctuation:{zh:"\u6309\u7167\u53E5\u5B50\u5207\u5206",en:"Split by sentence",zh_TW:"\u6309\u7167\u53E5\u5B50\u5207\u5206"},highlight_disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},highlight_beforetrans:{zh:"\u7FFB\u8BD1\u524D\u9AD8\u4EAE",en:"Highlight before translation",zh_TW:"\u7FFB\u8B6F\u524D\u9AD8\u4EAE"},highlight_aftertrans:{zh:"\u7FFB\u8BD1\u540E\u9AD8\u4EAE",en:"Highlight after translation",zh_TW:"\u7FFB\u8B6F\u5F8C\u9AD8\u4EAE"},pagescroll_root_margin:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u63D0\u524D\u89E6\u53D1 (0-10000px)",en:"Early triggering of scroll loading (0-10000px)",zh_TW:"\u6EFE\u52D5\u8F09\u5165\u63D0\u524D\u89F8\u767C (0-10000px)"},styles_setting:{zh:"\u6837\u5F0F\u8BBE\u7F6E",en:"Style Setting",zh_TW:"\u6A23\u5F0F\u8A2D\u5B9A"},style_name:{zh:"\u6837\u5F0F\u540D\u79F0",en:"Style Name",zh_TW:"\u6A23\u5F0F\u540D\u7A31"},style_code:{zh:"\u6837\u5F0F\u4EE3\u7801",en:"Style Code",zh_TW:"\u6A23\u5F0F\u7A0B\u5F0F\u78BC"}};const newI18n=lang=>key=>{var _I18N$key;return((_I18N$key=I18N[key])===null||_I18N$key===void 0?void 0:_I18N$key[lang])||"";}; ;// CONCATENATED MODULE: ./src/config/storage.js const KV_RULES_KEY="kiss-rules_v".concat(APP_VERSION[0],".json");const storage_KV_WORDS_KEY="kiss-words.json";const storage_KV_RULES_SHARE_KEY="kiss-rules-share_v".concat(APP_VERSION[0],".json");const storage_KV_SETTING_KEY="kiss-setting_v".concat(APP_VERSION[0],".json");const KV_SALT_SYNC="KISS-Translator-SYNC";const storage_KV_SALT_SHARE="KISS-Translator-SHARE";const STOKEY_MSAUTH="".concat(APP_NAME,"_msauth");const storage_STOKEY_BDAUTH="".concat(APP_NAME,"_bdauth");const storage_STOKEY_SETTING_OLD="".concat(APP_NAME,"_setting");const storage_STOKEY_RULES_OLD="".concat(APP_NAME,"_rules");const storage_STOKEY_SETTING="".concat(APP_NAME,"_setting_v").concat(APP_VERSION[0]);const storage_STOKEY_RULES="".concat(APP_NAME,"_rules_v").concat(APP_VERSION[0]);const storage_STOKEY_WORDS="".concat(APP_NAME,"_words");const storage_STOKEY_SYNC="".concat(APP_NAME,"_sync");const storage_STOKEY_FAB="".concat(APP_NAME,"_fab");const STOKEY_TRANBOX="".concat(APP_NAME,"_tranbox");const storage_STOKEY_RULESCACHE_PREFIX="".concat(APP_NAME,"_rulescache_");const CACHE_NAME="".concat(APP_NAME,"_cache");const DEFAULT_CACHE_TIMEOUT=3600*24*7;// 缓存超时时间(7天) ;// CONCATENATED MODULE: ./src/config/url.js @@ -29753,10 +29763,11 @@ const client="userscript";const isExt=CLIENT_EXTS.includes(client);const isGm=cl * @returns */const debounce=function(func){let delay=arguments.length>1&&arguments[1]!==undefined?arguments[1]:200;let timer=null;return function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}timer&&clearTimeout(timer);timer=setTimeout(()=>{func(...args);clearTimeout(timer);timer=null;},delay);};};/** * 节流函数 - * @param {*} func - * @param {*} delay - * @returns - */const throttle=function(func){let delay=arguments.length>1&&arguments[1]!==undefined?arguments[1]:200;let timer=null;let cache=null;return function(){for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2];}if(!timer){func(...args);cache=null;timer=setTimeout(()=>{if(cache){func(...cache);cache=null;}clearTimeout(timer);timer=null;},delay);}else{cache=args;}};};/** + * @param {Function} func 要执行的函数 + * @param {number} delay 延迟时间 + * @param {object} options 选项 { leading: boolean, trailing: boolean } + * @returns {Function} + */const throttle=function(func,delay){let options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{leading:true,trailing:true};let timeoutId=null;let lastArgs=null;let lastThis=null;let result;let previous=0;function later(){previous=options.leading===false?0:Date.now();timeoutId=null;result=func.apply(lastThis,lastArgs);if(!timeoutId){lastThis=lastArgs=null;}}const throttled=function(){const now=Date.now();if(!previous&&options.leading===false){previous=now;}const remaining=delay-(now-previous);for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2];}lastArgs=args;lastThis=this;if(remaining<=0||remaining>delay){if(timeoutId){clearTimeout(timeoutId);timeoutId=null;}previous=now;result=func.apply(lastThis,lastArgs);if(!timeoutId){lastThis=lastArgs=null;}}else if(!timeoutId&&options.trailing!==false){timeoutId=setTimeout(later,remaining);}return result;};throttled.cancel=()=>{clearTimeout(timeoutId);previous=0;timeoutId=null;lastThis=lastArgs=null;};return throttled;};/** * 判断字符串全是某个字符 * @param {*} s * @param {*} c @@ -30016,7 +30027,7 @@ return fnPolyfill({fn:fetchHandle,input,init,opts});}; const MSG_GM_xmlHttpRequest="xmlHttpRequest";const MSG_GM_setValue="setValue";const MSG_GM_getValue="getValue";const MSG_GM_deleteValue="deleteValue";const MSG_GM_info="info";/** * 注入页面的脚本,请求并接受GM接口信息 * @param {*} param0 - */const injectScript=ping=>{window.APP_INFO={name:"KISS Translator",version:"2.0.5",eventName:ping};};/** + */const injectScript=ping=>{window.APP_INFO={name:"KISS Translator",version:"2.0.6",eventName:ping};};/** * 适配GM脚本 */const adaptScript=ping=>{const promiseGM=function(action,args){let timeout=arguments.length>2&&arguments[2]!==undefined?arguments[2]:5000;return new Promise((resolve,reject)=>{const pong=genEventName();const handleEvent=e=>{window.removeEventListener(pong,handleEvent);const{data,error}=e.detail;if(error){reject(new Error(error));}else{resolve(data);}};window.addEventListener(pong,handleEvent);window.dispatchEvent(new CustomEvent(ping,{detail:{action,args,pong}}));setTimeout(()=>{window.removeEventListener(pong,handleEvent);reject(new Error("timeout"));},timeout);});};window.KISS_GM={fetch:(input,init)=>promiseGM(MSG_GM_xmlHttpRequest,{input,init}),setValue:(key,val)=>promiseGM(MSG_GM_setValue,{key,val}),getValue:key=>promiseGM(MSG_GM_getValue,{key}),deleteValue:key=>promiseGM(MSG_GM_deleteValue,{key}),getInfo:async()=>{if(!window.GM_info){window.GM_info=await promiseGM(MSG_GM_info);}return window.GM_info;}};};/** * 监听并回应页面对GM接口的请求 @@ -30570,7 +30581,23 @@ sandBox:true}); ;// CONCATENATED MODULE: ./src/apis/history.js const historyMap=new Map();const MsgHistory=function(){let maxSize=arguments.length>0&&arguments[0]!==undefined?arguments[0]:DEFAULT_CONTEXT_SIZE;const messages=[];const add=function(){for(var _len=arguments.length,msgs=new Array(_len),_key=0;_key<_len;_key++){msgs[_key]=arguments[_key];}messages.push(...msgs.filter(Boolean));const extra=messages.length-maxSize;if(extra>0){messages.splice(0,extra);}};const getAll=()=>{return[...messages];};const clear=()=>{messages.length=0;};return{add,getAll,clear};};const getMsgHistory=(apiSlug,maxSize)=>{if(historyMap.has(apiSlug)){return historyMap.get(apiSlug);}const msgHistory=MsgHistory(maxSize);historyMap.set(apiSlug,msgHistory);return msgHistory;}; ;// CONCATENATED MODULE: ./src/subtitle/vtt.js -function millisecondsStringToNumber(msString){const cleanString=msString.trim();const milliseconds=parseInt(cleanString,10);if(isNaN(milliseconds)){return 0;}return milliseconds;}function parseBilingualVtt(vttText){const cleanText=vttText.replace(/^\uFEFF/,"").trim();const cues=cleanText.split(/\n\n+/);const result=[];for(const cue of cues){if(!cue.includes("-->"))continue;const lines=cue.split("\n");const timestampLineIndex=lines.findIndex(line=>line.includes("-->"));if(timestampLineIndex===-1)continue;const[startTimeString,endTimeString]=lines[timestampLineIndex].split(" --> ");const textLines=lines.slice(timestampLineIndex+1);if(startTimeString&&endTimeString&&textLines.length>0){const originalText=textLines[0].trim();const translatedText=(textLines[1]||"").trim();result.push({start:millisecondsStringToNumber(startTimeString),end:millisecondsStringToNumber(endTimeString),text:originalText,translation:translatedText});}}return result;} +/** + * 将多种格式的VTT时间戳字符串转换为毫秒数。 + * 兼容以下格式: + * - mmm (e.g., "291040") + * - MM:SS (e.g., "00:03") + * - HH:MM:SS (e.g., "01:02:03") + * - MM:SS.mmm (e.g., "00:07.980") + * - HH:MM:SS.mmm (e.g., "01:02:03.456") + * - MM:SS:mmm (e.g., "00:07:536") + * + * @param {string} timestamp - VTT时间戳字符串. + * @returns {number} - 转换后的总毫秒数. + */function parseTimestampToMilliseconds(timestamp){const ts=timestamp.trim();if(!ts.includes(":")&&!ts.includes(".")){return parseInt(ts,10)||0;}let timePart=ts;let msPart="0";if(ts.includes(".")){const parts=ts.split(".");timePart=parts[0];msPart=parts[1];}else{const colonParts=ts.split(":");if(colonParts.length>1&&colonParts[colonParts.length-1].length===3){msPart=colonParts.pop();timePart=colonParts.join(":");}}const timeComponents=timePart.split(":").map(p=>parseInt(p,10)||0);let hours=0,minutes=0,seconds=0;if(timeComponents.length===3){[hours,minutes,seconds]=timeComponents;}else if(timeComponents.length===2){[minutes,seconds]=timeComponents;}else if(timeComponents.length===1){[seconds]=timeComponents;}const milliseconds=parseInt(msPart.padEnd(3,"0"),10)||0;return(hours*3600+minutes*60+seconds)*1000+milliseconds;}/** + * 解析包含双语字幕的VTT文件内容。 + * @param {string} vttText - VTT文件的文本内容。 + * @returns {Array} 一个包含字幕对象的数组,每个对象包含 start, end, text, 和 translation. + */function parseBilingualVtt(vttText){const cleanText=vttText.replace(/^\uFEFF/,"").trim();if(!cleanText){return[];}const cues=cleanText.split(/\n\n+/);const result=[];const startIndex=cues[0].toUpperCase().includes("WEBVTT")?1:0;for(let i=startIndex;i"))continue;const lines=cue.split("\n");const timestampLineIndex=lines.findIndex(line=>line.includes("-->"));if(timestampLineIndex===-1)continue;const[startTimeString,endTimeString]=lines[timestampLineIndex].split("-->");const textLines=lines.slice(timestampLineIndex+1);if(startTimeString&&endTimeString&&textLines.length>0){var _textLines$,_textLines$2;const originalText=((_textLines$=textLines[0])===null||_textLines$===void 0?void 0:_textLines$.trim())||"";const translatedText=((_textLines$2=textLines[1])===null||_textLines$2===void 0?void 0:_textLines$2.trim())||"";result.push({start:parseTimestampToMilliseconds(startTimeString),end:parseTimestampToMilliseconds(endTimeString),text:originalText,translation:translatedText});}}return result;} ;// CONCATENATED MODULE: ./src/apis/trans.js const keyMap=new Map();const urlMap=new Map();// 轮询key/url const keyPick=function(apiSlug){var _cacheMap$get;let key=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";let cacheMap=arguments.length>2?arguments[2]:undefined;const keys=key.split(/\n|,/).map(item=>item.trim()).filter(Boolean);if(keys.length===0){return"";}const preIndex=(_cacheMap$get=cacheMap.get(apiSlug))!==null&&_cacheMap$get!==void 0?_cacheMap$get:-1;const curIndex=(preIndex+1)%keys.length;cacheMap.set(apiSlug,curIndex);return keys[curIndex];};const genSystemPrompt=_ref=>{let{systemPrompt,from,to}=_ref;return systemPrompt.replaceAll(INPUT_PLACE_FROM,from).replaceAll(INPUT_PLACE_TO,to);};const genUserPrompt=_ref2=>{let{nobatchUserPrompt,useBatchFetch,tone,glossary={},from,to,texts,docInfo}=_ref2;if(useBatchFetch){return JSON.stringify({targetLanguage:to,title:docInfo.title,description:docInfo.description,segments:texts.map((text,i)=>({id:i,text})),glossary,tone});}return nobatchUserPrompt.replaceAll(INPUT_PLACE_FROM,from).replaceAll(INPUT_PLACE_TO,to).replaceAll(INPUT_PLACE_TEXT,texts[0]);};const parseAIRes=function(raw){let useBatchFetch=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;if(!raw){return[];}if(!useBatchFetch){return[[raw]];}try{const jsonString=extractJson(raw);if(!jsonString)return[];const data=JSON.parse(jsonString);if(Array.isArray(data.translations)){// todo: 考虑序号id可能会打乱 @@ -30598,7 +30625,7 @@ stream:false};const headers={"Content-type":"application/json"};if(key){headers. */const genTransReq=async _ref21=>{let{reqHook,...args}=_ref21;const{apiType,apiSlug,key,systemPrompt,// userPrompt, nobatchPrompt=defaultNobatchPrompt,nobatchUserPrompt=defaultNobatchUserPrompt,useBatchFetch,from,to,texts,docInfo,glossary,customHeader,customBody,events}=args;if(API_SPE_TYPES.mulkeys.has(apiType)){args.key=keyPick(apiSlug,key,keyMap);}if(apiType===OPT_TRANS_DEEPLX){args.url=keyPick(apiSlug,args.url,urlMap);}if(API_SPE_TYPES.ai.has(apiType)){args.systemPrompt=genSystemPrompt({systemPrompt:useBatchFetch?systemPrompt:nobatchPrompt,from,to});args.userPrompt=!!events?JSON.stringify(events):genUserPrompt({nobatchUserPrompt,useBatchFetch,from,to,texts,docInfo,glossary});}const{url="",body=null,headers={},userMsg=null,method="POST"}=genReqFuncs[apiType](args);// 合并用户自定义headers和body if(customHeader!==null&&customHeader!==void 0&&customHeader.trim()){Object.assign(headers,parseJsonObj(customHeader));}if(customBody!==null&&customBody!==void 0&&customBody.trim()){Object.assign(body,parseJsonObj(customBody));}// 执行 request hook -if(reqHook!==null&&reqHook!==void 0&&reqHook.trim()&&!events){try{interpreter.run("exports.reqHook = ".concat(reqHook));const hookResult=await interpreter.exports.reqHook({...args,defaultSystemPrompt: defaultSystemPrompt,defaultSubtitlePrompt: defaultSubtitlePrompt},{url,body,headers,userMsg,method});if(hookResult&&hookResult.url){return genInit(hookResult);}}catch(err){log_kissLog("run req hook",err);}}return genInit({url,body,headers,userMsg,method});};/** +if(reqHook!==null&&reqHook!==void 0&&reqHook.trim()&&!events){try{interpreter.run("exports.reqHook = ".concat(reqHook));const hookResult=await interpreter.exports.reqHook({...args,defaultSystemPrompt: defaultSystemPrompt,defaultSubtitlePrompt: defaultSubtitlePrompt,defaultNobatchPrompt: defaultNobatchPrompt,defaultNobatchUserPrompt: defaultNobatchUserPrompt},{url,body,headers,userMsg,method});if(hookResult&&hookResult.url){return genInit(hookResult);}}catch(err){log_kissLog("run req hook",err);}}return genInit({url,body,headers,userMsg,method});};/** * 解析翻译接口返回数据 * @param {*} res * @param {*} param3 @@ -30707,7 +30734,7 @@ keyfrom:"webdict"});const init={headers:{accept:"application/json, text/plain, * * @param {*} param0 * @returns */const apiTranslate=async _ref2=>{let{text,fromLang="auto",toLang,apiSetting=DEFAULT_API_SETTING,docInfo={},glossary={},useCache=true,usePool=true}=_ref2;if(!text){throw new Error("The text cannot be empty.");}const{apiType,apiSlug,useBatchFetch}=apiSetting;const langMap=OPT_LANGS_TO_SPEC[apiType]||OPT_LANGS_SPEC_DEFAULT;const from=langMap.get(fromLang);const to=langMap.get(toLang);if(!to){throw new Error("The target lang: ".concat(toLang," not support"));}// todo: 优化缓存失效因素 -const[v1,v2]="2.0.5".split(".");const cacheOpts={apiSlug,text,fromLang,toLang,version:[v1,v2].join(".")};const cacheInput="".concat(URL_CACHE_TRAN,"?").concat(query_string.stringify(cacheOpts));// 查询缓存数据 +const[v1,v2]="2.0.6".split(".");const cacheOpts={apiSlug,text,fromLang,toLang,version:[v1,v2].join(".")};const cacheInput="".concat(URL_CACHE_TRAN,"?").concat(query_string.stringify(cacheOpts));// 查询缓存数据 if(useCache){const cache=await getHttpCachePolyfill(cacheInput);if(cache!==null&&cache!==void 0&&cache.trText){return cache;}}// 请求接口数据 let tranlation=[];if(apiType===OPT_TRANS_BUILTINAI){tranlation=await apiBuiltinAITranslate({text,from,to,apiSetting});}else if(useBatchFetch&&API_SPE_TYPES.batch.has(apiType)){const{apiSlug,batchInterval,batchSize,batchLength}=apiSetting;const key="".concat(apiSlug,"_").concat(fromLang,"_").concat(toLang);const queue=getBatchQueue(key,handleTranslate,{batchInterval,batchSize,batchLength});tranlation=await queue.addTask(text,{from,to,fromLang,toLang,langMap,docInfo,glossary,apiSetting,usePool});}else{[tranlation]=await handleTranslate([text],{from,to,fromLang,toLang,langMap,docInfo,glossary,apiSetting,usePool});}let trText="";let srLang="";let srCode="";if(Array.isArray(tranlation)){[trText,srLang=""]=tranlation;if(srLang){srCode=OPT_LANGS_TO_CODE[apiType].get(srLang)||"";}}else if(typeof tranlation==="string"){trText=tranlation;}if(!trText){throw new Error("tanslate api got empty trtext");}const isSame=fromLang==="auto"&&srLang===to;// 插入缓存 if(useCache){putHttpCachePolyfill(cacheInput,null,{trText,isSame,srLang,srCode});}return{trText,srLang,srCode,isSame};};// 字幕处理/翻译 @@ -33547,7 +33574,7 @@ var n = {}; return t.length === e && "." !== t && ".." !== t; }; }, - te = "object" === ("undefined" == typeof process ? "undefined" : Nt(process)) && process ? "object" === Nt(({"NODE_ENV":"production","PUBLIC_URL":"","WDS_SOCKET_HOST":undefined,"WDS_SOCKET_PATH":undefined,"WDS_SOCKET_PORT":undefined,"FAST_REFRESH":true,"REACT_APP_CLIENT":"userscript","REACT_APP_NAME":"KISS Translator","REACT_APP_NAME_CN":"简约翻译","REACT_APP_VERSION":"2.0.5","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js"})) && ({"NODE_ENV":"production","PUBLIC_URL":"","WDS_SOCKET_HOST":undefined,"WDS_SOCKET_PATH":undefined,"WDS_SOCKET_PORT":undefined,"FAST_REFRESH":true,"REACT_APP_CLIENT":"userscript","REACT_APP_NAME":"KISS Translator","REACT_APP_NAME_CN":"简约翻译","REACT_APP_VERSION":"2.0.5","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js"}) && ({"NODE_ENV":"production","PUBLIC_URL":"","WDS_SOCKET_HOST":undefined,"WDS_SOCKET_PATH":undefined,"WDS_SOCKET_PORT":undefined,"FAST_REFRESH":true,"REACT_APP_CLIENT":"userscript","REACT_APP_NAME":"KISS Translator","REACT_APP_NAME_CN":"简约翻译","REACT_APP_VERSION":"2.0.5","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js"}).__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix"; + te = "object" === ("undefined" == typeof process ? "undefined" : Nt(process)) && process ? "object" === Nt(({"NODE_ENV":"production","PUBLIC_URL":"","WDS_SOCKET_HOST":undefined,"WDS_SOCKET_PATH":undefined,"WDS_SOCKET_PORT":undefined,"FAST_REFRESH":true,"REACT_APP_CLIENT":"userscript","REACT_APP_NAME":"KISS Translator","REACT_APP_NAME_CN":"简约翻译","REACT_APP_VERSION":"2.0.6","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js"})) && ({"NODE_ENV":"production","PUBLIC_URL":"","WDS_SOCKET_HOST":undefined,"WDS_SOCKET_PATH":undefined,"WDS_SOCKET_PORT":undefined,"FAST_REFRESH":true,"REACT_APP_CLIENT":"userscript","REACT_APP_NAME":"KISS Translator","REACT_APP_NAME_CN":"简约翻译","REACT_APP_VERSION":"2.0.6","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js"}) && ({"NODE_ENV":"production","PUBLIC_URL":"","WDS_SOCKET_HOST":undefined,"WDS_SOCKET_PATH":undefined,"WDS_SOCKET_PORT":undefined,"FAST_REFRESH":true,"REACT_APP_CLIENT":"userscript","REACT_APP_NAME":"KISS Translator","REACT_APP_NAME_CN":"简约翻译","REACT_APP_VERSION":"2.0.6","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js"}).__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix"; It.sep = "win32" === te ? "\\" : "/"; var ee = Symbol("globstar **"); It.GLOBSTAR = ee; @@ -35345,40 +35372,23 @@ return;}let{updateAt=0,syncAt=0}=syncMeta[key]||{};if(syncAt===0){updateAt=0;// * @returns */const syncSettingAndRules=async()=>{await syncSetting();await syncRules();await syncWords();};const trySyncSettingAndRules=async()=>{await trySyncSetting();await trySyncRules();await trySyncWords();}; ;// CONCATENATED MODULE: ./src/libs/rules.js -// import { FIXER_ALL } from "./webfix"; /** * 根据href匹配规则 * @param {*} rules * @param {string} href * @returns - */const matchRule=async(href,_ref)=>{let{injectRules,subrulesList}=_ref;const rules=await getRulesWithDefault();if(injectRules){try{const selectedSub=subrulesList.find(item=>item.selected);if(selectedSub!==null&&selectedSub!==void 0&&selectedSub.url){const subRules=await loadOrFetchSubRules(selectedSub.url);rules.splice(-1,0,...subRules);}}catch(err){log_kissLog("load injectRules",err);}}const rule=rules.find(r=>r.pattern.split(",").some(p=>isMatch(href,p.trim())));const globalRule={...GLOBLA_RULE,...(rules.find(r=>r.pattern===GLOBAL_KEY)||{})};if(!rule){return globalRule;}["selector","keepSelector","rootsSelector","ignoreSelector","terms","aiTerms","termsStyle","highlightStyle","selectStyle","parentStyle","grandStyle","injectJs",// "injectCss", -// "fixerSelector", + */const matchRule=async(href,_ref)=>{let{injectRules,subrulesList}=_ref;const rules=await getRulesWithDefault();if(injectRules){try{const selectedSub=subrulesList.find(item=>item.selected);if(selectedSub!==null&&selectedSub!==void 0&&selectedSub.url){const subRules=await loadOrFetchSubRules(selectedSub.url);rules.splice(-1,0,...subRules);}}catch(err){log_kissLog("load injectRules",err);}}const rule=rules.find(r=>r.pattern.split(",").some(p=>isMatch(href,p.trim())));const globalRule={...GLOBLA_RULE,...(rules.find(r=>r.pattern===GLOBAL_KEY)||{})};if(!rule){return globalRule;}["selector","keepSelector","rootsSelector","ignoreSelector","terms","aiTerms","termsStyle","highlightStyle","textExtStyle","selectStyle","parentStyle","grandStyle","injectJs",// "injectCss", "transStartHook","transEndHook"// "transRemoveHook", -].forEach(key=>{var _rule$key;if(!((_rule$key=rule[key])!==null&&_rule$key!==void 0&&_rule$key.trim())){rule[key]=globalRule[key];}});["apiSlug","fromLang","toLang","transOpen","transOnly",// "transTiming", -"autoScan","hasRichText","hasShadowroot","transTag","transTitle",// "detectRemote", -// "fixerFunc", -"splitParagraph","highlightWords"].forEach(key=>{if(!rule[key]||rule[key]===GLOBAL_KEY){rule[key]=globalRule[key];}});["splitLength"].forEach(key=>{if(!rule[key]){rule[key]=globalRule[key];}});// if (!rule.skipLangs || rule.skipLangs.length === 0) { -// rule.skipLangs = globalRule.skipLangs; -// } -if(!rule.textStyle||rule.textStyle===GLOBAL_KEY){rule.textStyle=globalRule.textStyle;rule.bgColor=globalRule.bgColor;rule.textDiyStyle=globalRule.textDiyStyle;}else{var _rule$bgColor,_rule$textDiyStyle;rule.bgColor=((_rule$bgColor=rule.bgColor)===null||_rule$bgColor===void 0?void 0:_rule$bgColor.trim())||globalRule.bgColor;rule.textDiyStyle=((_rule$textDiyStyle=rule.textDiyStyle)===null||_rule$textDiyStyle===void 0?void 0:_rule$textDiyStyle.trim())||globalRule.textDiyStyle;}return rule;};/** +].forEach(key=>{var _rule$key;if(!((_rule$key=rule[key])!==null&&_rule$key!==void 0&&_rule$key.trim())){rule[key]=globalRule[key];}});["apiSlug","fromLang","toLang","transOpen","transOnly","autoScan","hasRichText","hasShadowroot","transTag","transTitle","splitParagraph","highlightWords","textStyle"].forEach(key=>{if(!rule[key]||rule[key]===GLOBAL_KEY){rule[key]=globalRule[key];}});["splitLength"].forEach(key=>{if(!rule[key]){rule[key]=globalRule[key];}});return rule;};/** * 检查过滤rules * @param {*} rules * @returns - */const checkRules=rules=>{if(type(rules)==="string"){rules=JSON.parse(rules);}if(type(rules)!=="array"){throw new Error("data error");}const fromLangs=OPT_LANGS_FROM.map(item=>item[0]);const toLangs=OPT_LANGS_TO.map(item=>item[0]);const patternSet=new Set();rules=rules.filter(rule=>type(rule)==="object").filter(_ref2=>{let{pattern}=_ref2;if(type(pattern)!=="string"||patternSet.has(pattern.trim())){return false;}patternSet.add(pattern.trim());return true;}).map(_ref3=>{let{pattern,selector,keepSelector,rootsSelector,ignoreSelector,terms,aiTerms,termsStyle,highlightStyle,selectStyle,parentStyle,grandStyle,injectJs,// injectCss, -apiSlug,fromLang,toLang,textStyle,transOpen,bgColor,textDiyStyle,transOnly,autoScan,hasRichText,hasShadowroot,// transTiming, -transTag,transTitle,// detectRemote, -// skipLangs, -// fixerSelector, -// fixerFunc, -transStartHook,transEndHook,// transRemoveHook, -splitParagraph,splitLength,highlightWords}=_ref3;return{pattern:pattern.trim(),selector:type(selector)==="string"?selector:"",keepSelector:type(keepSelector)==="string"?keepSelector:"",rootsSelector:type(rootsSelector)==="string"?rootsSelector:"",ignoreSelector:type(ignoreSelector)==="string"?ignoreSelector:"",terms:type(terms)==="string"?terms:"",aiTerms:type(aiTerms)==="string"?aiTerms:"",termsStyle:type(termsStyle)==="string"?termsStyle:"",highlightStyle:type(highlightStyle)==="string"?highlightStyle:"",selectStyle:type(selectStyle)==="string"?selectStyle:"",parentStyle:type(parentStyle)==="string"?parentStyle:"",grandStyle:type(grandStyle)==="string"?grandStyle:"",injectJs:type(injectJs)==="string"?injectJs:"",// injectCss: type(injectCss) === "string" ? injectCss : "", -bgColor:type(bgColor)==="string"?bgColor:"",textDiyStyle:type(textDiyStyle)==="string"?textDiyStyle:"",apiSlug:type(apiSlug)==="string"&&apiSlug.trim()!==""?apiSlug.trim():GLOBAL_KEY,fromLang:matchValue([GLOBAL_KEY,...fromLangs],fromLang),toLang:matchValue([GLOBAL_KEY,...toLangs],toLang),textStyle:matchValue([GLOBAL_KEY,...OPT_STYLE_ALL],textStyle),transOpen:matchValue([GLOBAL_KEY,"true","false"],transOpen),transOnly:matchValue([GLOBAL_KEY,"true","false"],transOnly),autoScan:matchValue([GLOBAL_KEY,"true","false"],autoScan),hasRichText:matchValue([GLOBAL_KEY,"true","false"],hasRichText),hasShadowroot:matchValue([GLOBAL_KEY,"true","false"],hasShadowroot),// transTiming: matchValue([GLOBAL_KEY, ...OPT_TIMING_ALL], transTiming), -transTag:matchValue([GLOBAL_KEY,"span","font"],transTag),transTitle:matchValue([GLOBAL_KEY,"true","false"],transTitle),// detectRemote: matchValue([GLOBAL_KEY, "true", "false"], detectRemote), -// skipLangs: type(skipLangs) === "array" ? skipLangs : [], -// fixerSelector: type(fixerSelector) === "string" ? fixerSelector : "", -transStartHook:type(transStartHook)==="string"?transStartHook:"",transEndHook:type(transEndHook)==="string"?transEndHook:"",// transRemoveHook: + */const checkRules=rules=>{if(type(rules)==="string"){rules=JSON.parse(rules);}if(type(rules)!=="array"){throw new Error("data error");}const fromLangs=OPT_LANGS_FROM.map(item=>item[0]);const toLangs=OPT_LANGS_TO.map(item=>item[0]);const patternSet=new Set();rules=rules.filter(rule=>type(rule)==="object").filter(_ref2=>{let{pattern}=_ref2;if(type(pattern)!=="string"||patternSet.has(pattern.trim())){return false;}patternSet.add(pattern.trim());return true;}).map(_ref3=>{let{pattern,selector,keepSelector,rootsSelector,ignoreSelector,terms,aiTerms,termsStyle,highlightStyle,textExtStyle,selectStyle,parentStyle,grandStyle,injectJs,// injectCss, +apiSlug,fromLang,toLang,textStyle,transOpen,transOnly,autoScan,hasRichText,hasShadowroot,transTag,transTitle,transStartHook,transEndHook,// transRemoveHook, +splitParagraph,splitLength,highlightWords}=_ref3;return{pattern:pattern.trim(),selector:type(selector)==="string"?selector:"",keepSelector:type(keepSelector)==="string"?keepSelector:"",rootsSelector:type(rootsSelector)==="string"?rootsSelector:"",ignoreSelector:type(ignoreSelector)==="string"?ignoreSelector:"",terms:type(terms)==="string"?terms:"",aiTerms:type(aiTerms)==="string"?aiTerms:"",termsStyle:type(termsStyle)==="string"?termsStyle:"",highlightStyle:type(highlightStyle)==="string"?highlightStyle:"",textExtStyle:type(textExtStyle)==="string"?textExtStyle:"",selectStyle:type(selectStyle)==="string"?selectStyle:"",parentStyle:type(parentStyle)==="string"?parentStyle:"",grandStyle:type(grandStyle)==="string"?grandStyle:"",injectJs:type(injectJs)==="string"?injectJs:"",// injectCss: type(injectCss) === "string" ? injectCss : "", +apiSlug:type(apiSlug)==="string"&&apiSlug.trim()!==""?apiSlug.trim():GLOBAL_KEY,fromLang:matchValue([GLOBAL_KEY,...fromLangs],fromLang),toLang:matchValue([GLOBAL_KEY,...toLangs],toLang),// textStyle: matchValue([GLOBAL_KEY, ...OPT_STYLE_ALL], textStyle), +textStyle:type(textStyle)==="string"&&textStyle.trim()!==""?textStyle.trim():GLOBAL_KEY,transOpen:matchValue([GLOBAL_KEY,"true","false"],transOpen),transOnly:matchValue([GLOBAL_KEY,"true","false"],transOnly),autoScan:matchValue([GLOBAL_KEY,"true","false"],autoScan),hasRichText:matchValue([GLOBAL_KEY,"true","false"],hasRichText),hasShadowroot:matchValue([GLOBAL_KEY,"true","false"],hasShadowroot),transTag:matchValue([GLOBAL_KEY,"span","font"],transTag),transTitle:matchValue([GLOBAL_KEY,"true","false"],transTitle),transStartHook:type(transStartHook)==="string"?transStartHook:"",transEndHook:type(transEndHook)==="string"?transEndHook:"",// transRemoveHook: // type(transRemoveHook) === "string" ? transRemoveHook : "", -// fixerFunc: matchValue([GLOBAL_KEY, ...FIXER_ALL], fixerFunc), splitParagraph:matchValue([GLOBAL_KEY,...OPT_SPLIT_PARAGRAPH_ALL],splitParagraph),splitLength:Number.isInteger(splitLength)?splitLength:0,highlightWords:matchValue([GLOBAL_KEY,...OPT_HIGHLIGHT_WORDS_ALL],highlightWords)};});return rules;};/** * 保存或更新rule * @param {*} curRule @@ -35394,7 +35404,7 @@ splitParagraph:matchValue([GLOBAL_KEY,...OPT_SPLIT_PARAGRAPH_ALL],splitParagraph /** * @class BilingualSubtitleManager * @description 负责在视频上显示和翻译字幕的核心逻辑 - */var _videoEl=/*#__PURE__*/_classPrivateFieldKey("videoEl");var _formattedSubtitles=/*#__PURE__*/_classPrivateFieldKey("formattedSubtitles");var _captionWindowEl=/*#__PURE__*/_classPrivateFieldKey("captionWindowEl");var _paperEl=/*#__PURE__*/_classPrivateFieldKey("paperEl");var _currentSubtitleIndex=/*#__PURE__*/_classPrivateFieldKey("currentSubtitleIndex");var _preTranslateSeconds=/*#__PURE__*/_classPrivateFieldKey("preTranslateSeconds");var _setting=/*#__PURE__*/_classPrivateFieldKey("setting");var _isAdPlaying=/*#__PURE__*/_classPrivateFieldKey("isAdPlaying");var _createCaptionWindow=/*#__PURE__*/_classPrivateFieldKey("createCaptionWindow");var _enableDragging=/*#__PURE__*/_classPrivateFieldKey("enableDragging");var _attachEventListeners=/*#__PURE__*/_classPrivateFieldKey("attachEventListeners");var _removeEventListeners=/*#__PURE__*/_classPrivateFieldKey("removeEventListeners");var _findSubtitleIndexForTime=/*#__PURE__*/_classPrivateFieldKey("findSubtitleIndexForTime");var _updateCaptionDisplay=/*#__PURE__*/_classPrivateFieldKey("updateCaptionDisplay");var _triggerTranslations=/*#__PURE__*/_classPrivateFieldKey("triggerTranslations");var _translateAndStore=/*#__PURE__*/_classPrivateFieldKey("translateAndStore");class BilingualSubtitleManager{/** + */var _videoEl=/*#__PURE__*/_classPrivateFieldKey("videoEl");var _formattedSubtitles=/*#__PURE__*/_classPrivateFieldKey("formattedSubtitles");var _captionWindowEl=/*#__PURE__*/_classPrivateFieldKey("captionWindowEl");var _paperEl=/*#__PURE__*/_classPrivateFieldKey("paperEl");var _currentSubtitleIndex=/*#__PURE__*/_classPrivateFieldKey("currentSubtitleIndex");var _preTranslateSeconds=/*#__PURE__*/_classPrivateFieldKey("preTranslateSeconds");var _throttleSeconds=/*#__PURE__*/_classPrivateFieldKey("throttleSeconds");var _setting=/*#__PURE__*/_classPrivateFieldKey("setting");var _isAdPlaying=/*#__PURE__*/_classPrivateFieldKey("isAdPlaying");var _throttledTriggerTranslations=/*#__PURE__*/_classPrivateFieldKey("throttledTriggerTranslations");var _createCaptionWindow=/*#__PURE__*/_classPrivateFieldKey("createCaptionWindow");var _enableDragging=/*#__PURE__*/_classPrivateFieldKey("enableDragging");var _attachEventListeners=/*#__PURE__*/_classPrivateFieldKey("attachEventListeners");var _removeEventListeners=/*#__PURE__*/_classPrivateFieldKey("removeEventListeners");var _findSubtitleIndexForTime=/*#__PURE__*/_classPrivateFieldKey("findSubtitleIndexForTime");var _updateCaptionDisplay=/*#__PURE__*/_classPrivateFieldKey("updateCaptionDisplay");var _triggerTranslations=/*#__PURE__*/_classPrivateFieldKey("triggerTranslations");var _translateAndStore=/*#__PURE__*/_classPrivateFieldKey("translateAndStore");class BilingualSubtitleManager{/** * @param {object} options * @param {HTMLVideoElement} options.videoEl - 页面上的 video 元素。 * @param {Array} options.formattedSubtitles - 已格式化好的字幕数组。 @@ -35420,20 +35430,20 @@ splitParagraph:matchValue([GLOBAL_KEY,...OPT_SPLIT_PARAGRAPH_ALL],splitParagraph * 为指定的元素启用垂直拖动功能。 */Object.defineProperty(this,_enableDragging,{value:_enableDragging2});/** * 创建并配置用于显示字幕的 DOM 元素。 - */Object.defineProperty(this,_createCaptionWindow,{value:_createCaptionWindow2});Object.defineProperty(this,_videoEl,{writable:true,value:void 0});Object.defineProperty(this,_formattedSubtitles,{writable:true,value:[]});Object.defineProperty(this,_captionWindowEl,{writable:true,value:null});Object.defineProperty(this,_paperEl,{writable:true,value:null});Object.defineProperty(this,_currentSubtitleIndex,{writable:true,value:-1});Object.defineProperty(this,_preTranslateSeconds,{writable:true,value:100});Object.defineProperty(this,_setting,{writable:true,value:{}});Object.defineProperty(this,_isAdPlaying,{writable:true,value:false});_classPrivateFieldBase(this,_setting)[_setting]=setting;_classPrivateFieldBase(this,_videoEl)[_videoEl]=videoEl;_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles]=formattedSubtitles;this.onTimeUpdate=this.onTimeUpdate.bind(this);this.onSeek=this.onSeek.bind(this);}/** + */Object.defineProperty(this,_createCaptionWindow,{value:_createCaptionWindow2});Object.defineProperty(this,_videoEl,{writable:true,value:void 0});Object.defineProperty(this,_formattedSubtitles,{writable:true,value:[]});Object.defineProperty(this,_captionWindowEl,{writable:true,value:null});Object.defineProperty(this,_paperEl,{writable:true,value:null});Object.defineProperty(this,_currentSubtitleIndex,{writable:true,value:-1});Object.defineProperty(this,_preTranslateSeconds,{writable:true,value:90});Object.defineProperty(this,_throttleSeconds,{writable:true,value:30});Object.defineProperty(this,_setting,{writable:true,value:{}});Object.defineProperty(this,_isAdPlaying,{writable:true,value:false});Object.defineProperty(this,_throttledTriggerTranslations,{writable:true,value:void 0});_classPrivateFieldBase(this,_setting)[_setting]=setting;_classPrivateFieldBase(this,_videoEl)[_videoEl]=videoEl;_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles]=formattedSubtitles;this.onTimeUpdate=this.onTimeUpdate.bind(this);this.onSeek=this.onSeek.bind(this);_classPrivateFieldBase(this,_throttledTriggerTranslations)[_throttledTriggerTranslations]=throttle(_classPrivateFieldBase(this,_triggerTranslations)[_triggerTranslations].bind(this),_classPrivateFieldBase(this,_throttleSeconds)[_throttleSeconds]*1000);}/** * 启动字幕显示和翻译。 */start(){if(_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles].length===0){logger.warn("Bilingual Subtitles: No subtitles to display.");return;}logger.info("Bilingual Subtitle Manager: Starting...");_classPrivateFieldBase(this,_createCaptionWindow)[_createCaptionWindow]();_classPrivateFieldBase(this,_attachEventListeners)[_attachEventListeners]();this.onTimeUpdate();}/** * 销毁实例,清理资源。 - */destroy(){var _classPrivateFieldLoo,_classPrivateFieldLoo2,_classPrivateFieldLoo3;logger.info("Bilingual Subtitle Manager: Destroying...");_classPrivateFieldBase(this,_removeEventListeners)[_removeEventListeners]();(_classPrivateFieldLoo=_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl])===null||_classPrivateFieldLoo===void 0?void 0:(_classPrivateFieldLoo2=_classPrivateFieldLoo.parentElement)===null||_classPrivateFieldLoo2===void 0?void 0:(_classPrivateFieldLoo3=_classPrivateFieldLoo2.parentElement)===null||_classPrivateFieldLoo3===void 0?void 0:_classPrivateFieldLoo3.remove();_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles]=[];}/** + */destroy(){var _classPrivateFieldLoo,_classPrivateFieldLoo2,_classPrivateFieldLoo3,_classPrivateFieldLoo4;logger.info("Bilingual Subtitle Manager: Destroying...");_classPrivateFieldBase(this,_removeEventListeners)[_removeEventListeners]();(_classPrivateFieldLoo=_classPrivateFieldBase(this,_throttledTriggerTranslations)[_throttledTriggerTranslations])===null||_classPrivateFieldLoo===void 0?void 0:_classPrivateFieldLoo.cancel();(_classPrivateFieldLoo2=_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl])===null||_classPrivateFieldLoo2===void 0?void 0:(_classPrivateFieldLoo3=_classPrivateFieldLoo2.parentElement)===null||_classPrivateFieldLoo3===void 0?void 0:(_classPrivateFieldLoo4=_classPrivateFieldLoo3.parentElement)===null||_classPrivateFieldLoo4===void 0?void 0:_classPrivateFieldLoo4.remove();_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles]=[];}/** * 更新广告播放状态。 */setIsAdPlaying(isPlaying){_classPrivateFieldBase(this,_isAdPlaying)[_isAdPlaying]=isPlaying;this.onTimeUpdate();}/** * 视频播放时间更新时的回调,负责更新字幕和触发预翻译。 - */onTimeUpdate(){const currentTimeMs=_classPrivateFieldBase(this,_videoEl)[_videoEl].currentTime*1000;const subtitleIndex=_classPrivateFieldBase(this,_findSubtitleIndexForTime)[_findSubtitleIndexForTime](currentTimeMs);if(subtitleIndex!==_classPrivateFieldBase(this,_currentSubtitleIndex)[_currentSubtitleIndex]){_classPrivateFieldBase(this,_currentSubtitleIndex)[_currentSubtitleIndex]=subtitleIndex;const subtitle=subtitleIndex!==-1?_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles][subtitleIndex]:null;_classPrivateFieldBase(this,_updateCaptionDisplay)[_updateCaptionDisplay](subtitle);}_classPrivateFieldBase(this,_triggerTranslations)[_triggerTranslations](currentTimeMs);}/** + */onTimeUpdate(){const currentTimeMs=_classPrivateFieldBase(this,_videoEl)[_videoEl].currentTime*1000;const subtitleIndex=_classPrivateFieldBase(this,_findSubtitleIndexForTime)[_findSubtitleIndexForTime](currentTimeMs);if(subtitleIndex!==_classPrivateFieldBase(this,_currentSubtitleIndex)[_currentSubtitleIndex]){_classPrivateFieldBase(this,_currentSubtitleIndex)[_currentSubtitleIndex]=subtitleIndex;const subtitle=subtitleIndex!==-1?_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles][subtitleIndex]:null;_classPrivateFieldBase(this,_updateCaptionDisplay)[_updateCaptionDisplay](subtitle);}_classPrivateFieldBase(this,_throttledTriggerTranslations)[_throttledTriggerTranslations](currentTimeMs);}/** * 用户拖动进度条后的回调。 - */onSeek(){_classPrivateFieldBase(this,_currentSubtitleIndex)[_currentSubtitleIndex]=-1;this.onTimeUpdate();}/** + */onSeek(){_classPrivateFieldBase(this,_currentSubtitleIndex)[_currentSubtitleIndex]=-1;_classPrivateFieldBase(this,_throttledTriggerTranslations)[_throttledTriggerTranslations].cancel();this.onTimeUpdate();}/** * 追加新的字幕 * @param {Array} newSubtitlesChunk - 新的、要追加的字幕数据块。 - */appendSubtitles(newSubtitlesChunk){if(!newSubtitlesChunk||newSubtitlesChunk.length===0){return;}logger.info("Bilingual Subtitle Manager: Appending ".concat(newSubtitlesChunk.length," new subtitles..."));_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles].push(...newSubtitlesChunk);_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles].sort((a,b)=>a.start-b.start);_classPrivateFieldBase(this,_currentSubtitleIndex)[_currentSubtitleIndex]=-1;this.onTimeUpdate();}}function _createCaptionWindow2(){var _classPrivateFieldLoo4;const container=document.createElement("div");container.className="kiss-caption-container notranslate";Object.assign(container.style,{position:"absolute",width:"100%",height:"100%",left:"0",top:"0",pointerEvents:"none"});const paper=document.createElement("div");paper.className="kiss-caption-paper";Object.assign(paper.style,{position:"absolute",width:"80%",left:"50%",bottom:"10%",transform:"translateX(-50%)",textAlign:"center",containerType:"inline-size",zIndex:"2147483647",pointerEvents:"auto",display:"none"});_classPrivateFieldBase(this,_paperEl)[_paperEl]=paper;_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl]=document.createElement("div");_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].className="kiss-caption-window";_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].style.cssText=_classPrivateFieldBase(this,_setting)[_setting].windowStyle;_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].style.pointerEvents="auto";_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].style.cursor="grab";_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].style.opacity="1";_classPrivateFieldBase(this,_paperEl)[_paperEl].appendChild(_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl]);container.appendChild(_classPrivateFieldBase(this,_paperEl)[_paperEl]);const videoContainer=(_classPrivateFieldLoo4=_classPrivateFieldBase(this,_videoEl)[_videoEl].parentElement)===null||_classPrivateFieldLoo4===void 0?void 0:_classPrivateFieldLoo4.parentElement;if(!videoContainer){logger.warn("could not find videoContainer");return;}videoContainer.style.position="relative";videoContainer.appendChild(container);_classPrivateFieldBase(this,_enableDragging)[_enableDragging](_classPrivateFieldBase(this,_paperEl)[_paperEl],container,_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl]);}function _enableDragging2(dragElement,boundaryContainer,handleElement){let isDragging=false;let startY;let initialBottom;let dragElementHeight;const onDragStart=e=>{if(e.type==="mousedown"&&e.button!==0)return;e.preventDefault();isDragging=true;handleElement.style.cursor="grabbing";startY=e.type==="touchstart"?e.touches[0].clientY:e.clientY;initialBottom=boundaryContainer.getBoundingClientRect().bottom-dragElement.getBoundingClientRect().bottom;dragElementHeight=dragElement.offsetHeight;document.addEventListener("mousemove",onDragMove,{capture:true});document.addEventListener("touchmove",onDragMove,{capture:true,passive:false});document.addEventListener("mouseup",onDragEnd,{capture:true});document.addEventListener("touchend",onDragEnd,{capture:true});};const onDragMove=e=>{if(!isDragging)return;e.preventDefault();const currentY=e.type==="touchmove"?e.touches[0].clientY:e.clientY;const deltaY=currentY-startY;let newBottom=initialBottom-deltaY;const containerHeight=boundaryContainer.clientHeight;newBottom=Math.max(0,newBottom);newBottom=Math.min(containerHeight-dragElementHeight,newBottom);if(dragElementHeight>containerHeight){newBottom=Math.max(0,newBottom);}dragElement.style.bottom="".concat(newBottom,"px");};const onDragEnd=e=>{if(!isDragging)return;e.preventDefault();isDragging=false;handleElement.style.cursor="grab";document.removeEventListener("mousemove",onDragMove,{capture:true});document.removeEventListener("touchmove",onDragMove,{capture:true});document.removeEventListener("mouseup",onDragEnd,{capture:true});document.removeEventListener("touchend",onDragEnd,{capture:true});const finalBottomPx=dragElement.style.bottom;setTimeout(()=>{dragElement.style.bottom=finalBottomPx;},50);};handleElement.addEventListener("mousedown",onDragStart);handleElement.addEventListener("touchstart",onDragStart,{passive:false});}function _attachEventListeners2(){_classPrivateFieldBase(this,_videoEl)[_videoEl].addEventListener("timeupdate",this.onTimeUpdate);_classPrivateFieldBase(this,_videoEl)[_videoEl].addEventListener("seeked",this.onSeek);}function _removeEventListeners2(){_classPrivateFieldBase(this,_videoEl)[_videoEl].removeEventListener("timeupdate",this.onTimeUpdate);_classPrivateFieldBase(this,_videoEl)[_videoEl].removeEventListener("seeked",this.onSeek);}function _findSubtitleIndexForTime2(currentTimeMs){return _classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles].findIndex(sub=>currentTimeMs>=sub.start&¤tTimeMs<=sub.end);}function _updateCaptionDisplay2(subtitle){if(!_classPrivateFieldBase(this,_paperEl)[_paperEl]||!_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl])return;if(_classPrivateFieldBase(this,_isAdPlaying)[_isAdPlaying]){_classPrivateFieldBase(this,_paperEl)[_paperEl].style.display="none";return;}if(subtitle){const p1=document.createElement("p");p1.style.cssText=_classPrivateFieldBase(this,_setting)[_setting].originStyle;p1.textContent=truncateWords(subtitle.text);const p2=document.createElement("p");p2.style.cssText=_classPrivateFieldBase(this,_setting)[_setting].translationStyle;p2.textContent=truncateWords(subtitle.translation)||"...";if(_classPrivateFieldBase(this,_setting)[_setting].isBilingual){_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].replaceChildren(p1,p2);}else{_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].replaceChildren(p2);}_classPrivateFieldBase(this,_paperEl)[_paperEl].style.display="block";}else{_classPrivateFieldBase(this,_paperEl)[_paperEl].style.display="none";}}function _triggerTranslations2(currentTimeMs){const lookAheadMs=_classPrivateFieldBase(this,_preTranslateSeconds)[_preTranslateSeconds]*1000;for(const sub of _classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles]){const isCurrent=sub.start<=currentTimeMs&&sub.end>=currentTimeMs;const isUpcoming=sub.start>currentTimeMs&&sub.start<=currentTimeMs+lookAheadMs;const needsTranslation=!sub.translation&&!sub.isTranslating;if((isCurrent||isUpcoming)&&needsTranslation){_classPrivateFieldBase(this,_translateAndStore)[_translateAndStore](sub);}}}async function _translateAndStore2(subtitle){subtitle.isTranslating=true;try{const{fromLang,toLang,apiSetting}=_classPrivateFieldBase(this,_setting)[_setting];const{trText}=await apiTranslate({text:subtitle.text,fromLang,toLang,apiSetting});subtitle.translation=trText;}catch(error){logger.info("Translation failed for:",subtitle.text,error);subtitle.translation="[Translation failed]";}finally{subtitle.isTranslating=false;const currentSubtitleIndexNow=_classPrivateFieldBase(this,_findSubtitleIndexForTime)[_findSubtitleIndexForTime](_classPrivateFieldBase(this,_videoEl)[_videoEl].currentTime*1000);if(_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles][currentSubtitleIndexNow]===subtitle){_classPrivateFieldBase(this,_updateCaptionDisplay)[_updateCaptionDisplay](subtitle);}}} + */appendSubtitles(newSubtitlesChunk){if(!newSubtitlesChunk||newSubtitlesChunk.length===0){return;}logger.info("Bilingual Subtitle Manager: Appending ".concat(newSubtitlesChunk.length," new subtitles..."));_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles].push(...newSubtitlesChunk);_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles].sort((a,b)=>a.start-b.start);_classPrivateFieldBase(this,_currentSubtitleIndex)[_currentSubtitleIndex]=-1;this.onTimeUpdate();}}function _createCaptionWindow2(){var _classPrivateFieldLoo5;const container=document.createElement("div");container.className="kiss-caption-container notranslate";Object.assign(container.style,{position:"absolute",width:"100%",height:"100%",left:"0",top:"0",pointerEvents:"none"});const paper=document.createElement("div");paper.className="kiss-caption-paper";Object.assign(paper.style,{position:"absolute",width:"80%",left:"50%",bottom:"10%",transform:"translateX(-50%)",textAlign:"center",containerType:"inline-size",zIndex:"2147483647",pointerEvents:"auto",display:"none"});_classPrivateFieldBase(this,_paperEl)[_paperEl]=paper;_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl]=document.createElement("div");_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].className="kiss-caption-window";_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].style.cssText=_classPrivateFieldBase(this,_setting)[_setting].windowStyle;_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].style.pointerEvents="auto";_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].style.cursor="grab";_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].style.opacity="1";_classPrivateFieldBase(this,_paperEl)[_paperEl].appendChild(_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl]);container.appendChild(_classPrivateFieldBase(this,_paperEl)[_paperEl]);const videoContainer=(_classPrivateFieldLoo5=_classPrivateFieldBase(this,_videoEl)[_videoEl].parentElement)===null||_classPrivateFieldLoo5===void 0?void 0:_classPrivateFieldLoo5.parentElement;if(!videoContainer){logger.warn("could not find videoContainer");return;}videoContainer.style.position="relative";videoContainer.appendChild(container);_classPrivateFieldBase(this,_enableDragging)[_enableDragging](_classPrivateFieldBase(this,_paperEl)[_paperEl],container,_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl]);}function _enableDragging2(dragElement,boundaryContainer,handleElement){let isDragging=false;let startY;let initialBottom;let dragElementHeight;const onDragStart=e=>{if(e.type==="mousedown"&&e.button!==0)return;e.preventDefault();isDragging=true;handleElement.style.cursor="grabbing";startY=e.type==="touchstart"?e.touches[0].clientY:e.clientY;initialBottom=boundaryContainer.getBoundingClientRect().bottom-dragElement.getBoundingClientRect().bottom;dragElementHeight=dragElement.offsetHeight;document.addEventListener("mousemove",onDragMove,{capture:true});document.addEventListener("touchmove",onDragMove,{capture:true,passive:false});document.addEventListener("mouseup",onDragEnd,{capture:true});document.addEventListener("touchend",onDragEnd,{capture:true});};const onDragMove=e=>{if(!isDragging)return;e.preventDefault();const currentY=e.type==="touchmove"?e.touches[0].clientY:e.clientY;const deltaY=currentY-startY;let newBottom=initialBottom-deltaY;const containerHeight=boundaryContainer.clientHeight;newBottom=Math.max(0,newBottom);newBottom=Math.min(containerHeight-dragElementHeight,newBottom);if(dragElementHeight>containerHeight){newBottom=Math.max(0,newBottom);}dragElement.style.bottom="".concat(newBottom,"px");};const onDragEnd=e=>{if(!isDragging)return;e.preventDefault();isDragging=false;handleElement.style.cursor="grab";document.removeEventListener("mousemove",onDragMove,{capture:true});document.removeEventListener("touchmove",onDragMove,{capture:true});document.removeEventListener("mouseup",onDragEnd,{capture:true});document.removeEventListener("touchend",onDragEnd,{capture:true});const finalBottomPx=dragElement.style.bottom;setTimeout(()=>{dragElement.style.bottom=finalBottomPx;},50);};handleElement.addEventListener("mousedown",onDragStart);handleElement.addEventListener("touchstart",onDragStart,{passive:false});}function _attachEventListeners2(){_classPrivateFieldBase(this,_videoEl)[_videoEl].addEventListener("timeupdate",this.onTimeUpdate);_classPrivateFieldBase(this,_videoEl)[_videoEl].addEventListener("seeked",this.onSeek);}function _removeEventListeners2(){_classPrivateFieldBase(this,_videoEl)[_videoEl].removeEventListener("timeupdate",this.onTimeUpdate);_classPrivateFieldBase(this,_videoEl)[_videoEl].removeEventListener("seeked",this.onSeek);}function _findSubtitleIndexForTime2(currentTimeMs){return _classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles].findIndex(sub=>currentTimeMs>=sub.start&¤tTimeMs<=sub.end);}function _updateCaptionDisplay2(subtitle){if(!_classPrivateFieldBase(this,_paperEl)[_paperEl]||!_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl])return;if(_classPrivateFieldBase(this,_isAdPlaying)[_isAdPlaying]){_classPrivateFieldBase(this,_paperEl)[_paperEl].style.display="none";return;}if(subtitle){const p1=document.createElement("p");p1.style.cssText=_classPrivateFieldBase(this,_setting)[_setting].originStyle;p1.textContent=truncateWords(subtitle.text);const p2=document.createElement("p");p2.style.cssText=_classPrivateFieldBase(this,_setting)[_setting].translationStyle;p2.textContent=truncateWords(subtitle.translation)||"...";if(_classPrivateFieldBase(this,_setting)[_setting].isBilingual){_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].replaceChildren(p1,p2);}else{_classPrivateFieldBase(this,_captionWindowEl)[_captionWindowEl].replaceChildren(p2);}_classPrivateFieldBase(this,_paperEl)[_paperEl].style.display="block";}else{_classPrivateFieldBase(this,_paperEl)[_paperEl].style.display="none";}}function _triggerTranslations2(currentTimeMs){const lookAheadMs=_classPrivateFieldBase(this,_preTranslateSeconds)[_preTranslateSeconds]*1000;for(const sub of _classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles]){const isCurrent=sub.start<=currentTimeMs&&sub.end>=currentTimeMs;const isUpcoming=sub.start>currentTimeMs&&sub.start<=currentTimeMs+lookAheadMs;const needsTranslation=!sub.translation&&!sub.isTranslating;if((isCurrent||isUpcoming)&&needsTranslation){_classPrivateFieldBase(this,_translateAndStore)[_translateAndStore](sub);}}}async function _translateAndStore2(subtitle){subtitle.isTranslating=true;try{const{fromLang,toLang,apiSetting}=_classPrivateFieldBase(this,_setting)[_setting];const{trText}=await apiTranslate({text:subtitle.text,fromLang,toLang,apiSetting});subtitle.translation=trText;}catch(error){logger.info("Translation failed for:",subtitle.text,error);subtitle.translation="[Translation failed]";}finally{subtitle.isTranslating=false;const currentSubtitleIndexNow=_classPrivateFieldBase(this,_findSubtitleIndexForTime)[_findSubtitleIndexForTime](_classPrivateFieldBase(this,_videoEl)[_videoEl].currentTime*1000);if(_classPrivateFieldBase(this,_formattedSubtitles)[_formattedSubtitles][currentSubtitleIndexNow]===subtitle){_classPrivateFieldBase(this,_updateCaptionDisplay)[_updateCaptionDisplay](subtitle);}}} ;// CONCATENATED MODULE: ./src/libs/svg.js const loadingSvg="\n \n \n \n \n \n \n \n \n \n\n";function createSVGElement(tag,attributes){const svgNS="http://www.w3.org/2000/svg";const el=document.createElementNS(svgNS,tag);for(const key in attributes){el.setAttribute(key,attributes[key]);}return el;}/** * 创建loding动画 @@ -35453,7 +35463,7 @@ if(videoEl&&skipAd){videoEl.playbackRate=16;videoEl.currentTime=videoEl.duration "lo",// 老挝文 "km",// 高棉文 "my"// 缅文 -];if(noSpaceLanguages.some(l=>lang===null||lang===void 0?void 0:lang.startsWith(l))){const subtitles=[];let currentLine=null;const MAX_LENGTH=100;for(const segment of flatEvents){if(segment.text){if(!currentLine){currentLine={text:segment.text,start:segment.start,end:segment.end};}else{currentLine.text+=segment.text;currentLine.end=segment.end;}if(currentLine.text.length>=MAX_LENGTH){subtitles.push(currentLine);currentLine=null;}}else{if(currentLine){subtitles.push(currentLine);currentLine=null;}}}if(currentLine){subtitles.push(currentLine);}return subtitles;}let subtitles=_classPrivateFieldBase(this,_processSubtitles)[_processSubtitles]({flatEvents});const isPoor=_classPrivateFieldBase(this,_isQualityPoor)[_isQualityPoor](subtitles);logger.debug("Youtube Provider: isQualityPoor",{isPoor,subtitles});if(isPoor){subtitles=_classPrivateFieldBase(this,_processSubtitles)[_processSubtitles]({flatEvents,usePause:true});}return subtitles;}function _isQualityPoor2(lines){let lengthThreshold=arguments.length>1&&arguments[1]!==undefined?arguments[1]:250;let percentageThreshold=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0.2;if(lines.length===0)return false;const longLinesCount=lines.filter(line=>line.text.length>lengthThreshold).length;return longLinesCount/lines.length>percentageThreshold;}function _processSubtitles2(){let{flatEvents,usePause=false,timeout=1000,maxWords=15}=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};const groupedPauseWords={1:new Set(["actually","also","although","and","anyway","as","basically","because","but","eventually","frankly","honestly","hopefully","however","if","instead","it's","just","let's","like","literally","maybe","meanwhile","nevertheless","nonetheless","now","okay","or","otherwise","perhaps","personally","probably","right","since","so","suddenly","that's","then","there's","therefore","though","thus","unless","until","well","while"]),2:new Set(["after all","at first","at least","even if","even though","for example","for instance","i believe","i guess","i mean","i suppose","i think","in fact","in the end","of course","then again","to be fair","you know","you see"]),3:new Set(["as a result","by the way","in other words","in that case","in this case","to be clear","to be honest"])};const sentences=[];let currentBuffer=[];let bufferWordCount=0;const flushBuffer=()=>{if(currentBuffer.length>0){sentences.push({text:currentBuffer.map(s=>s.text).join(" ").trim(),start:currentBuffer[0].start,end:currentBuffer[currentBuffer.length-1].end});}currentBuffer=[];bufferWordCount=0;};flatEvents.forEach(segment=>{if(!segment.text)return;const lastSegment=currentBuffer[currentBuffer.length-1];if(lastSegment){const isEndOfSentence=/[.?!…\])]$/.test(lastSegment.text);const isPauseOfSentence=/[,]$/.test(lastSegment.text);const isTimeout=segment.start-lastSegment.end>timeout;const isWordLimitExceeded=(usePause||isPauseOfSentence)&&bufferWordCount>=maxWords;const startsWithSign=/^[[(♪]/.test(segment.text);const startsWithPauseWord=usePause&&groupedPauseWords["1"].has(segment.text.toLowerCase().split(" ")[0])&¤tBuffer.length>1;if(isEndOfSentence||isTimeout||isWordLimitExceeded||startsWithSign||startsWithPauseWord){flushBuffer();}}currentBuffer.push(segment);bufferWordCount+=segment.text.split(/\s+/).length;});flushBuffer();return sentences;}function _flatEvents2(){let events=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];const segments=[];let buffer=null;events.forEach(_ref3=>{let{segs=[],tStartMs=0,dDurationMs=0}=_ref3;segs.forEach((_ref4,j)=>{let{utf8="",tOffsetMs=0}=_ref4;const text=utf8.trim().replace(/\s+/g," ");const start=tStartMs+tOffsetMs;if(buffer){if(!buffer.end||buffer.end>start){buffer.end=start;}segments.push(buffer);buffer=null;}buffer={text,start};if(j===segs.length-1){buffer.end=tStartMs+dDurationMs;}});});segments.push(buffer);return segments;}function _splitEventsIntoChunks2(flatEvents){let chunkLength=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1000;if(!flatEvents||flatEvents.length===0){return[];}const eventChunks=[];let currentChunk=[];let currentChunkTextLength=0;const MAX_CHUNK_LENGTH=chunkLength+500;const PAUSE_THRESHOLD_MS=1000;for(let i=0;i=MAX_CHUNK_LENGTH){shouldSplit=true;}else if(currentChunkTextLength>=chunkLength){const isEndOfSentence=/[.?!…\])]$/.test(event.text);const nextEvent=flatEvents[i+1];const pauseDuration=nextEvent.start-event.end;if(isEndOfSentence||pauseDuration>PAUSE_THRESHOLD_MS){shouldSplit=true;}}if(shouldSplit){eventChunks.push(currentChunk);currentChunk=[];currentChunkTextLength=0;}}if(currentChunk.length>0){eventChunks.push(currentChunk);}return eventChunks;}async function _processRemainingChunksAsync2(_ref5){let{chunks,videoId,fromLang,toLang,segApiSetting}=_ref5;logger.info("Youtube Provider: Starting for ".concat(chunks.length," chunks."));for(let i=0;i ").concat((_chunkEvents=chunkEvents[chunkEvents.length-1])===null||_chunkEvents===void 0?void 0:_chunkEvents.start));let subtitlesForThisChunk=[];try{const aiSubtitles=await _classPrivateFieldBase(this,_aiSegment)[_aiSegment]({videoId,chunkEvents,fromLang,toLang,segApiSetting});if((aiSubtitles===null||aiSubtitles===void 0?void 0:aiSubtitles.length)>0){subtitlesForThisChunk=aiSubtitles;}else{logger.info("Youtube Provider: AI segmentation for chunk ".concat(chunkNum," returned no data."));subtitlesForThisChunk=_classPrivateFieldBase(this,_formatSubtitles)[_formatSubtitles](chunkEvents,fromLang);}}catch(chunkError){subtitlesForThisChunk=_classPrivateFieldBase(this,_formatSubtitles)[_formatSubtitles](chunkEvents,fromLang);}if(_classPrivateFieldBase(this,_getVideoId)[_getVideoId]()!==videoId){logger.info("Youtube Provider: videoId changed!");break;}if(subtitlesForThisChunk.length>0&&_classPrivateFieldBase(this,_managerInstance)[_managerInstance]){logger.info("Youtube Provider: Appending ".concat(subtitlesForThisChunk.length," subtitles from chunk ").concat(chunkNum,"."));_classPrivateFieldBase(this,_managerInstance)[_managerInstance].appendSubtitles(subtitlesForThisChunk);}else{logger.info("Youtube Provider: Chunk ".concat(chunkNum," no subtitles."));}await sleep(randomBetween(500,1000));}logger.info("Youtube Provider: All subtitle chunks processed.");}function _createNotificationElement2(){var _videoEl$parentElemen;const notificationEl=document.createElement("div");notificationEl.className="kiss-notification";Object.assign(notificationEl.style,{position:"absolute",top:"40%",left:"50%",transform:"translateX(-50%)",background:"rgba(0,0,0,0.7)",color:"red",padding:"0.5em 1em",borderRadius:"4px",zIndex:"2147483647",opacity:"0",transition:"opacity 0.3s ease-in-out",pointerEvents:"none",fontSize:"2em",width:"50%",textAlign:"center"});const videoEl=_classPrivateFieldBase(this,YouTubeCaptionProvider_videoEl)[YouTubeCaptionProvider_videoEl];const videoContainer=videoEl===null||videoEl===void 0?void 0:(_videoEl$parentElemen=videoEl.parentElement)===null||_videoEl$parentElemen===void 0?void 0:_videoEl$parentElemen.parentElement;if(videoContainer){videoContainer.appendChild(notificationEl);_classPrivateFieldBase(this,_notificationEl)[_notificationEl]=notificationEl;}}function _showNotification2(message){let duration=arguments.length>1&&arguments[1]!==undefined?arguments[1]:2000;if(!_classPrivateFieldBase(this,_notificationEl)[_notificationEl])_classPrivateFieldBase(this,_createNotificationElement)[_createNotificationElement]();_classPrivateFieldBase(this,_notificationEl)[_notificationEl].textContent=message;_classPrivateFieldBase(this,_notificationEl)[_notificationEl].style.opacity="1";clearTimeout(_classPrivateFieldBase(this,_notificationTimeout)[_notificationTimeout]);_classPrivateFieldBase(this,_notificationTimeout)[_notificationTimeout]=setTimeout(()=>{_classPrivateFieldBase(this,_notificationEl)[_notificationEl].style.opacity="0";},duration);}const YouTubeInitializer=(()=>{let initialized=false;return async setting=>{if(initialized){return;}initialized=true;logger.info("Bilingual Subtitle Extension: Initializing...");const provider=new YouTubeCaptionProvider(setting);provider.initialize();};})(); +];if(noSpaceLanguages.some(l=>lang===null||lang===void 0?void 0:lang.startsWith(l))){const subtitles=[];let currentLine=null;const MAX_LENGTH=100;for(const segment of flatEvents){if(segment.text){if(!currentLine){currentLine={text:segment.text,start:segment.start,end:segment.end};}else{currentLine.text+=segment.text;currentLine.end=segment.end;}if(currentLine.text.length>=MAX_LENGTH){subtitles.push(currentLine);currentLine=null;}}else{if(currentLine){subtitles.push(currentLine);currentLine=null;}}}if(currentLine){subtitles.push(currentLine);}return subtitles;}let subtitles=_classPrivateFieldBase(this,_processSubtitles)[_processSubtitles]({flatEvents});const isPoor=_classPrivateFieldBase(this,_isQualityPoor)[_isQualityPoor](subtitles);logger.debug("Youtube Provider: isQualityPoor",{isPoor,subtitles});if(isPoor){subtitles=_classPrivateFieldBase(this,_processSubtitles)[_processSubtitles]({flatEvents,usePause:true});}return subtitles;}function _isQualityPoor2(lines){let lengthThreshold=arguments.length>1&&arguments[1]!==undefined?arguments[1]:250;let percentageThreshold=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0.2;if(lines.length===0)return false;const longLinesCount=lines.filter(line=>line.text.length>lengthThreshold).length;return longLinesCount/lines.length>percentageThreshold;}function _processSubtitles2(){let{flatEvents,usePause=false,timeout=1000,maxWords=15}=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};const groupedPauseWords={1:new Set(["actually","also","although","and","anyway","as","basically","because","but","eventually","frankly","honestly","hopefully","however","if","instead","it's","just","let's","like","literally","maybe","meanwhile","nevertheless","nonetheless","now","okay","or","otherwise","perhaps","personally","probably","right","since","so","suddenly","that's","then","there's","therefore","though","thus","unless","until","well","while"]),2:new Set(["after all","at first","at least","even if","even though","for example","for instance","i believe","i guess","i mean","i suppose","i think","in fact","in the end","of course","then again","to be fair","you know","you see"]),3:new Set(["as a result","by the way","in other words","in that case","in this case","to be clear","to be honest"])};const sentences=[];let currentBuffer=[];let bufferWordCount=0;const flushBuffer=()=>{if(currentBuffer.length>0){sentences.push({text:currentBuffer.map(s=>s.text).join(" ").trim(),start:currentBuffer[0].start,end:currentBuffer[currentBuffer.length-1].end});}currentBuffer=[];bufferWordCount=0;};flatEvents.forEach(segment=>{if(!segment.text)return;const lastSegment=currentBuffer[currentBuffer.length-1];if(lastSegment){const isEndOfSentence=/[.?!…\])]$/.test(lastSegment.text);const isPauseOfSentence=/[,]$/.test(lastSegment.text);const isTimeout=segment.start-lastSegment.end>timeout;const isWordLimitExceeded=(usePause||isPauseOfSentence)&&bufferWordCount>=maxWords;const startsWithSign=/^[[(♪]/.test(segment.text);const startsWithPauseWord=usePause&&groupedPauseWords["1"].has(segment.text.toLowerCase().split(" ")[0])&¤tBuffer.length>1;if(isEndOfSentence||isTimeout||isWordLimitExceeded||startsWithSign||startsWithPauseWord){flushBuffer();}}currentBuffer.push(segment);bufferWordCount+=segment.text.split(/\s+/).length;});flushBuffer();return sentences;}function _flatEvents2(){let events=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];const segments=[];let buffer=null;events.forEach(_ref3=>{let{segs=[],tStartMs=0,dDurationMs=0}=_ref3;segs.forEach((_ref4,j)=>{let{utf8="",tOffsetMs=0}=_ref4;const text=utf8.trim().replace(/\s+/g," ");const start=tStartMs+tOffsetMs;if(buffer){if(!buffer.end||buffer.end>start){buffer.end=start;}segments.push(buffer);buffer=null;}buffer={text,start};if(j===segs.length-1){buffer.end=tStartMs+dDurationMs;}});});segments.push(buffer);return segments;}function _splitEventsIntoChunks2(flatEvents){let chunkLength=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1000;if(!flatEvents||flatEvents.length===0){return[];}const eventChunks=[];let currentChunk=[];let currentChunkTextLength=0;const MAX_CHUNK_LENGTH=chunkLength+500;const PAUSE_THRESHOLD_MS=1000;for(let i=0;i=MAX_CHUNK_LENGTH){shouldSplit=true;}else if(currentChunkTextLength>=chunkLength){const isEndOfSentence=/[.?!…\])]$/.test(event.text);const nextEvent=flatEvents[i+1];const pauseDuration=nextEvent.start-event.end;if(isEndOfSentence||pauseDuration>PAUSE_THRESHOLD_MS){shouldSplit=true;}}if(shouldSplit){eventChunks.push(currentChunk);currentChunk=[];currentChunkTextLength=0;}}if(currentChunk.length>0){eventChunks.push(currentChunk);}return eventChunks;}async function _processRemainingChunksAsync2(_ref5){let{chunks,videoId,fromLang,toLang,segApiSetting}=_ref5;logger.info("Youtube Provider: Starting for ".concat(chunks.length," chunks."));for(let i=0;i ").concat((_chunkEvents=chunkEvents[chunkEvents.length-1])===null||_chunkEvents===void 0?void 0:_chunkEvents.start));let subtitlesForThisChunk=[];try{const aiSubtitles=await _classPrivateFieldBase(this,_aiSegment)[_aiSegment]({videoId,chunkEvents,fromLang,toLang,segApiSetting});if((aiSubtitles===null||aiSubtitles===void 0?void 0:aiSubtitles.length)>0){subtitlesForThisChunk=aiSubtitles;}else{logger.info("Youtube Provider: AI segmentation for chunk ".concat(chunkNum," returned no data."));subtitlesForThisChunk=_classPrivateFieldBase(this,_formatSubtitles)[_formatSubtitles](chunkEvents,fromLang);}}catch(chunkError){subtitlesForThisChunk=_classPrivateFieldBase(this,_formatSubtitles)[_formatSubtitles](chunkEvents,fromLang);}if(_classPrivateFieldBase(this,_getVideoId)[_getVideoId]()!==videoId){logger.info("Youtube Provider: videoId changed!");break;}if(subtitlesForThisChunk.length>0&&_classPrivateFieldBase(this,_managerInstance)[_managerInstance]){logger.info("Youtube Provider: Appending ".concat(subtitlesForThisChunk.length," subtitles from chunk ").concat(chunkNum,"."));_classPrivateFieldBase(this,_subtitles)[_subtitles].push(subtitlesForThisChunk);_classPrivateFieldBase(this,_managerInstance)[_managerInstance].appendSubtitles(subtitlesForThisChunk);}else{logger.info("Youtube Provider: Chunk ".concat(chunkNum," no subtitles."));}await sleep(randomBetween(500,1000));}logger.info("Youtube Provider: All subtitle chunks processed.");}function _createNotificationElement2(){var _videoEl$parentElemen;const notificationEl=document.createElement("div");notificationEl.className="kiss-notification";Object.assign(notificationEl.style,{position:"absolute",top:"40%",left:"50%",transform:"translateX(-50%)",background:"rgba(0,0,0,0.7)",color:"red",padding:"0.5em 1em",borderRadius:"4px",zIndex:"2147483647",opacity:"0",transition:"opacity 0.3s ease-in-out",pointerEvents:"none",fontSize:"2em",width:"50%",textAlign:"center"});const videoEl=_classPrivateFieldBase(this,YouTubeCaptionProvider_videoEl)[YouTubeCaptionProvider_videoEl];const videoContainer=videoEl===null||videoEl===void 0?void 0:(_videoEl$parentElemen=videoEl.parentElement)===null||_videoEl$parentElemen===void 0?void 0:_videoEl$parentElemen.parentElement;if(videoContainer){videoContainer.appendChild(notificationEl);_classPrivateFieldBase(this,_notificationEl)[_notificationEl]=notificationEl;}}function _showNotification2(message){let duration=arguments.length>1&&arguments[1]!==undefined?arguments[1]:2000;if(!_classPrivateFieldBase(this,_notificationEl)[_notificationEl])_classPrivateFieldBase(this,_createNotificationElement)[_createNotificationElement]();_classPrivateFieldBase(this,_notificationEl)[_notificationEl].textContent=message;_classPrivateFieldBase(this,_notificationEl)[_notificationEl].style.opacity="1";clearTimeout(_classPrivateFieldBase(this,_notificationTimeout)[_notificationTimeout]);_classPrivateFieldBase(this,_notificationTimeout)[_notificationTimeout]=setTimeout(()=>{_classPrivateFieldBase(this,_notificationEl)[_notificationEl].style.opacity="0";},duration);}const YouTubeInitializer=(()=>{let initialized=false;return async setting=>{if(initialized){return;}initialized=true;logger.info("Bilingual Subtitle Extension: Initializing...");const provider=new YouTubeCaptionProvider(setting);provider.initialize();};})(); ;// CONCATENATED MODULE: ./src/libs/trustedTypes.js const trustedTypesHelper=(()=>{const POLICY_NAME="kiss-translator-policy";let policy=null;if(globalThis.trustedTypes&&globalThis.trustedTypes.createPolicy){try{policy=globalThis.trustedTypes.createPolicy(POLICY_NAME,{createHTML:string=>string,createScript:string=>string,createScriptURL:string=>string});}catch(err){if(err.message.includes("already exists")){policy=globalThis.trustedTypes.policies.get(POLICY_NAME);}else{logger.info("cont create Trusted Types",err);}}}return{createHTML:htmlString=>{return policy?policy.createHTML(htmlString):htmlString;},createScript:scriptString=>{return policy?policy.createScript(scriptString):scriptString;},createScriptURL:urlString=>{return policy?policy.createScriptURL(urlString):urlString;},isEnabled:()=>policy!==null};})(); ;// CONCATENATED MODULE: ./src/libs/injector.js @@ -36479,20 +36489,25 @@ var _createEmotion = createEmotion({ cache = _createEmotion.cache; ;// CONCATENATED MODULE: ./src/libs/style.js -var _templateObject,_templateObject2,_templateObject3,_templateObject4;const gradientFlow=keyframes(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n to {\n background-position: 200% center;\n }\n"])));const blink=keyframes(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n"])));const glow=keyframes(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n from {\n text-shadow: 0 0 10px #fff, \n 0 0 20px #fff, \n 0 0 30px #0073e6, \n 0 0 40px #0073e6;\n }\n to {\n text-shadow: 0 0 20px #fff, \n 0 0 30px #ff4da6, \n 0 0 40px #ff4da6, \n 0 0 50px #ff4da6;\n }\n"])));const genLineStyle=(style,color)=>"\n text-decoration-line: underline;\n text-decoration-style: ".concat(style,";\n text-decoration-color: ").concat(color,";\n text-decoration-thickness: 2px;\n text-underline-offset: 0.3em;\n -webkit-text-decoration-line: underline;\n -webkit-text-decoration-style: ").concat(style,";\n -webkit-text-decoration-color: ").concat(color,";\n -webkit-text-decoration-thickness: 2px;\n -webkit-text-underline-offset: 0.3em;\n\n /* opacity: 0.8;\n -webkit-opacity: 0.8;\n &:hover {\n opacity: 1;\n -webkit-opacity: 1;\n } */\n");const genStyles=function(){let{textDiyStyle=DEFAULT_DIY_STYLE,bgColor=DEFAULT_COLOR}=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return{// 无样式 +var _templateObject,_templateObject2,_templateObject3,_templateObject4;const gradientFlow=keyframes(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n to {\n background-position: 200% center;\n }\n"])));const blink=keyframes(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n"])));const glow=keyframes(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n from {\n text-shadow: 0 0 10px #fff, \n 0 0 20px #fff, \n 0 0 30px #0073e6, \n 0 0 40px #0073e6;\n }\n to {\n text-shadow: 0 0 20px #fff, \n 0 0 30px #ff4da6, \n 0 0 40px #ff4da6, \n 0 0 50px #ff4da6;\n }\n"])));const genLineStyle=function(style,color){let thickness=arguments.length>2&&arguments[2]!==undefined?arguments[2]:1;return"\n text-decoration-line: underline;\n text-decoration-style: ".concat(style,";\n text-decoration-color: ").concat(color,";\n text-decoration-thickness: ").concat(thickness,"px;\n text-underline-offset: 0.3em;\n -webkit-text-decoration-line: underline;\n -webkit-text-decoration-style: ").concat(style,";\n -webkit-text-decoration-color: ").concat(color,";\n -webkit-text-decoration-thickness: 1px;\n -webkit-text-underline-offset: 0.3em;\n\n opacity: 0.8;\n -webkit-opacity: 0.8;\n &:hover {\n opacity: 1;\n -webkit-opacity: 1;\n }\n");};const genBuiltinStyles=function(){let color=arguments.length>0&&arguments[0]!==undefined?arguments[0]:DEFAULT_COLOR;return{// 无样式 [OPT_STYLE_NONE]:"",// 下划线 -[OPT_STYLE_LINE]:genLineStyle("solid",bgColor),// 点状线 -[OPT_STYLE_DOTLINE]:genLineStyle("dotted",bgColor),// 虚线 -[OPT_STYLE_DASHLINE]:genLineStyle("dashed",bgColor),// 波浪线 -[OPT_STYLE_WAVYLINE]:genLineStyle("wavy",bgColor),// 虚线框 -[OPT_STYLE_DASHBOX]:"\n border: 2px dashed ".concat(bgColor||DEFAULT_COLOR,";\n display: block;\n padding: 0.2em 0.4em;\n box-sizing: border-box;\n "),// 模糊 +[OPT_STYLE_LINE]:genLineStyle("solid",color),// 点状线 +[OPT_STYLE_DOTLINE]:genLineStyle("dotted",color),// 虚线 +[OPT_STYLE_DASHLINE]:genLineStyle("dashed",color),// 虚线加粗 +[OPT_STYLE_DASHLINE_BOLD]:genLineStyle("dashed",color,2),// 波浪线 +[OPT_STYLE_WAVYLINE]:genLineStyle("wavy",color),// 波浪线加粗 +[OPT_STYLE_WAVYLINE_BOLD]:genLineStyle("wavy",color,2),// 虚线框 +[OPT_STYLE_DASHBOX]:"\n border: 1px dashed ".concat(color,";\n display: block;\n padding: 0.2em 0.3em;\n box-sizing: border-box;\n "),// 虚线框加粗 +[OPT_STYLE_DASHBOX_BOLD]:"\n border: 2px dashed ".concat(color,";\n display: block;\n padding: 0.2em 0.3em;\n box-sizing: border-box;\n "),// 马克笔 +[OPT_STYLE_MARKER]:"\n background: linear-gradient(to top, ".concat(color," 50%, transparent 50%);\n "),// 渐变马克笔 +[OPT_STYLE_GRADIENT_MARKER]:"\n background: linear-gradient(to top, transparent, ".concat(color," 20%, transparent 60%);\n "),// 模糊 [OPT_STYLE_FUZZY]:"\n filter: blur(0.2em);\n -webkit-filter: blur(0.2em);\n &:hover {\n filter: none;\n -webkit-filter: none;\n }\n ",// 高亮 -[OPT_STYLE_HIGHLIGHT]:"\n color: #fff;\n background-color: ".concat(bgColor||DEFAULT_COLOR,";\n "),// 引用 -[OPT_STYLE_BLOCKQUOTE]:"\n opacity: 0.8;\n -webkit-opacity: 0.8;\n display: block;\n padding: 0.25em 0.5em;\n border-left: 0.5em solid ".concat(bgColor||DEFAULT_COLOR,";\n background: rgb(32, 156, 238, 0.2);\n &:hover {\n opacity: 1;\n -webkit-opacity: 1;\n }\n "),// 渐变 +[OPT_STYLE_HIGHLIGHT]:"\n color: #fff;\n background-color: ".concat(color,";\n "),// 引用 +[OPT_STYLE_BLOCKQUOTE]:"\n opacity: 0.8;\n -webkit-opacity: 0.8;\n display: block;\n padding: 0.25em 0.5em;\n border-left: 0.25em solid ".concat(color,";\n background: rgb(32, 156, 238, 0.2);\n &:hover {\n opacity: 1;\n -webkit-opacity: 1;\n }\n "),// 渐变 [OPT_STYLE_GRADIENT]:"\n background-image: linear-gradient(\n 90deg,\n #3b82f6,\n #9333ea,\n #ec4899,\n #3b82f6\n );\n background-size: 200% auto;\n color: transparent;\n -webkit-background-clip: text;\n background-clip: text;\n animation: ".concat(gradientFlow," 4s linear infinite;\n "),// 闪现 [OPT_STYLE_BLINK]:"\n animation: ".concat(blink," 1s infinite;\n "),// 发光 -[OPT_STYLE_GLOW]:"\n animation: ".concat(glow," 2s ease-in-out infinite alternate;\n "),// 自定义 -[OPT_STYLE_DIY]:"\n".concat(textDiyStyle,"\n")};};const genTextClass=_ref=>{let{textDiyStyle,bgColor=DEFAULT_COLOR}=_ref;const styles=genStyles({textDiyStyle,bgColor});const textClass={};let textStyles="";Object.entries(styles).forEach(_ref2=>{let[k,v]=_ref2;textClass[k]=css(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n ","\n "])),v);});Object.entries(styles).forEach(_ref3=>{let[k,v]=_ref3;textStyles+="\n .".concat(textClass[k]," {\n ").concat(v,"\n }\n ");});return[textClass,textStyles];};const defaultStyles=genStyles(); +[OPT_STYLE_GLOW]:"\n animation: ".concat(glow," 2s ease-in-out infinite alternate;\n "),// 多彩 +[OPT_STYLE_COLORFUL]:"\n color: #333;\n background: linear-gradient(\n 45deg,\n LightGreen 20%,\n LightPink 20% 40%,\n LightSalmon 40% 60%,\n LightSeaGreen 60% 80%,\n LightSkyBlue 80%\n );\n &:hover {\n color: #111;\n };\n "};};const genTextClass=function(){let customStyles=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];const styles=genBuiltinStyles();customStyles.forEach(style=>{styles[style.styleSlug]=style.styleCode;});const textClass={};let textStyles="";Object.entries(styles).forEach(_ref=>{let[k,v]=_ref;textClass[k]=css(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n ","\n "])),v);});Object.entries(styles).forEach(_ref2=>{let[k,v]=_ref2;textStyles+="\n .".concat(textClass[k]," {\n ").concat(v,"\n }\n ");});return[textClass,textStyles];};const builtinStylesMap=genBuiltinStyles(); ;// CONCATENATED MODULE: ./src/libs/shortcut.js /** * 键盘快捷键监听器 @@ -36654,7 +36669,7 @@ updateRule(newRule){let hasChanged=false;let needsRescan=false;for(const key in // ); return _classPrivateFieldBase(this,_apisMap)[_apisMap].get(_classPrivateFieldBase(this,_rule)[_rule].apiSlug)||DEFAULT_API_SETTING;}function _get_placeholder(){const[startDelimiter,endDelimiter]=_classPrivateFieldBase(this,_apiSetting)[_apiSetting].placeholder.split(" ");return{startDelimiter,endDelimiter,tagName:_classPrivateFieldBase(this,_apiSetting)[_apiSetting].placetag};}function _run2(){if(_classPrivateFieldBase(this,_rule)[_rule].transOpen==="true"){this.enable();}else if(_classPrivateFieldBase(this,translator_setting)[translator_setting].preInit){_classPrivateFieldBase(this,_init)[_init]();}}function _init2(){_classPrivateFieldBase(this,_isInitialized)[_isInitialized]=true;// 注入JS/CSS _classPrivateFieldBase(this,_initInjector)[_initInjector]();// 查找根节点并扫描 -document.querySelectorAll(_classPrivateFieldBase(this,_rule)[_rule].rootsSelector||"body").forEach(root=>{_classPrivateFieldBase(this,_startObserveRoot)[_startObserveRoot](root);});if(_classPrivateFieldBase(this,_rule)[_rule].hasShadowroot==="true"){_classPrivateFieldBase(this,_attachShadowRootListener)[_attachShadowRootListener]();_classPrivateFieldBase(this,_findAndObserveShadowRoot)[_findAndObserveShadowRoot]();}}function _handleWindowMessage2(event){var _event$data;if(((_event$data=event.data)===null||_event$data===void 0?void 0:_event$data.type)==="KISS_SHADOW_ROOT_CREATED"){_classPrivateFieldBase(this,_debouncedFindShadowRoot)[_debouncedFindShadowRoot]();}}function _attachShadowRootListener2(){if(!_classPrivateFieldBase(this,_isShadowRootJsInjected)[_isShadowRootJsInjected]){const id="kiss-translator-inject-shadowroot-js";injectJs(INJECTOR.shadowroot,id);_classPrivateFieldBase(this,_isShadowRootJsInjected)[_isShadowRootJsInjected]=true;}window.addEventListener("message",_classPrivateFieldBase(this,_windowMessageHandler)[_windowMessageHandler]);}function _removeShadowRootListener2(){window.removeEventListener("message",_classPrivateFieldBase(this,_windowMessageHandler)[_windowMessageHandler]);}function _findAndObserveShadowRoot2(){try{_classPrivateFieldBase(this,_findAllShadowRoots)[_findAllShadowRoots]().forEach(shadowRoot=>{_classPrivateFieldBase(this,_startObserveShadowRoot)[_startObserveShadowRoot](shadowRoot);});}catch(err){log_kissLog("findAllShadowRoots",err);}}function _createPlaceholderRegex2(){const escapedStart=_class.escapeRegex(_classPrivateFieldBase(this,_placeholder)[_placeholder].startDelimiter);const escapedEnd=_class.escapeRegex(_classPrivateFieldBase(this,_placeholder)[_placeholder].endDelimiter);const patternString="(".concat(escapedStart,"\\d+").concat(escapedEnd,"|<\\/?\\w+\\d+>)");const flags="g";return new RegExp(patternString,flags);}function _createTextStyles2(){const[textClass,textStyles]=genTextClass({..._classPrivateFieldBase(this,_rule)[_rule]});const textSheet=new CSSStyleSheet();textSheet.replaceSync(textStyles);_classPrivateFieldBase(this,_textClass)[_textClass]=textClass;_classPrivateFieldBase(this,_textSheet)[_textSheet]=textSheet;}function _injectSheet2(shadowRoot){if(!shadowRoot.adoptedStyleSheets.includes(_classPrivateFieldBase(this,_textSheet)[_textSheet])){shadowRoot.adoptedStyleSheets=[...shadowRoot.adoptedStyleSheets,_classPrivateFieldBase(this,_textSheet)[_textSheet]];}}function _parseTerms2(termsString){_classPrivateFieldBase(this,_termValues)[_termValues]=[];_classPrivateFieldBase(this,_combinedTermsRegex)[_combinedTermsRegex]=null;if(!termsString||typeof termsString!=="string")return;const termPatterns=[];const lines=termsString.split(/\n|;/);// 按换行或分号分割 +document.querySelectorAll(_classPrivateFieldBase(this,_rule)[_rule].rootsSelector||"body").forEach(root=>{_classPrivateFieldBase(this,_startObserveRoot)[_startObserveRoot](root);});if(_classPrivateFieldBase(this,_rule)[_rule].hasShadowroot==="true"){_classPrivateFieldBase(this,_attachShadowRootListener)[_attachShadowRootListener]();_classPrivateFieldBase(this,_findAndObserveShadowRoot)[_findAndObserveShadowRoot]();}}function _handleWindowMessage2(event){var _event$data;if(((_event$data=event.data)===null||_event$data===void 0?void 0:_event$data.type)==="KISS_SHADOW_ROOT_CREATED"){_classPrivateFieldBase(this,_debouncedFindShadowRoot)[_debouncedFindShadowRoot]();}}function _attachShadowRootListener2(){if(!_classPrivateFieldBase(this,_isShadowRootJsInjected)[_isShadowRootJsInjected]){const id="kiss-translator-inject-shadowroot-js";injectJs(INJECTOR.shadowroot,id);_classPrivateFieldBase(this,_isShadowRootJsInjected)[_isShadowRootJsInjected]=true;}window.addEventListener("message",_classPrivateFieldBase(this,_windowMessageHandler)[_windowMessageHandler]);}function _removeShadowRootListener2(){window.removeEventListener("message",_classPrivateFieldBase(this,_windowMessageHandler)[_windowMessageHandler]);}function _findAndObserveShadowRoot2(){try{_classPrivateFieldBase(this,_findAllShadowRoots)[_findAllShadowRoots]().forEach(shadowRoot=>{_classPrivateFieldBase(this,_startObserveShadowRoot)[_startObserveShadowRoot](shadowRoot);});}catch(err){log_kissLog("findAllShadowRoots",err);}}function _createPlaceholderRegex2(){const escapedStart=_class.escapeRegex(_classPrivateFieldBase(this,_placeholder)[_placeholder].startDelimiter);const escapedEnd=_class.escapeRegex(_classPrivateFieldBase(this,_placeholder)[_placeholder].endDelimiter);const patternString="(".concat(escapedStart,"\\d+").concat(escapedEnd,"|<\\/?\\w+\\d+>)");const flags="g";return new RegExp(patternString,flags);}function _createTextStyles2(){const[textClass,textStyles]=genTextClass(_classPrivateFieldBase(this,translator_setting)[translator_setting].customStyles);const textSheet=new CSSStyleSheet();textSheet.replaceSync(textStyles);_classPrivateFieldBase(this,_textClass)[_textClass]=textClass;_classPrivateFieldBase(this,_textSheet)[_textSheet]=textSheet;}function _injectSheet2(shadowRoot){if(!shadowRoot.adoptedStyleSheets.includes(_classPrivateFieldBase(this,_textSheet)[_textSheet])){shadowRoot.adoptedStyleSheets=[...shadowRoot.adoptedStyleSheets,_classPrivateFieldBase(this,_textSheet)[_textSheet]];}}function _parseTerms2(termsString){_classPrivateFieldBase(this,_termValues)[_termValues]=[];_classPrivateFieldBase(this,_combinedTermsRegex)[_combinedTermsRegex]=null;if(!termsString||typeof termsString!=="string")return;const termPatterns=[];const lines=termsString.split(/\n|;/);// 按换行或分号分割 for(const line of lines){const trimmedLine=line.trim();if(!trimmedLine)continue;let lastCommaIndex=trimmedLine.lastIndexOf(",");if(lastCommaIndex===-1){lastCommaIndex=trimmedLine.length;}const key=trimmedLine.substring(0,lastCommaIndex).trim();const value=trimmedLine.substring(lastCommaIndex+1).trim();if(key){try{new RegExp(key);termPatterns.push("(".concat(key,")"));_classPrivateFieldBase(this,_termValues)[_termValues].push(value);}catch(err){log_kissLog("Invalid RegExp for term: \"".concat(key,"\""),err);}}}if(termPatterns.length>0){_classPrivateFieldBase(this,_combinedTermsRegex)[_combinedTermsRegex]=new RegExp(termPatterns.join("|"),"g");}}function _parseAITerms2(termsString){if(!termsString||typeof termsString!=="string")return;try{_classPrivateFieldBase(this,_glossary)[_glossary]=Object.fromEntries(termsString.split(/\n|;/).map(line=>{const[k="",v=""]=line.split(",").map(s=>s.trim());return[k,v];}).filter(_ref2=>{let[k]=_ref2;return k;}));}catch(err){log_kissLog("parse aiterms",err);}}function _getDocDescription2(){try{const meta=document.querySelector('meta[name="description"]');const description=(meta===null||meta===void 0?void 0:meta.getAttribute("content"))||"";return truncateWords(description);}catch(err){log_kissLog("get description",err);}return"";}function _createIntersectionObserver2(){const{transInterval,rootMargin=500}=_classPrivateFieldBase(this,translator_setting)[translator_setting];const pending=new Set();const flush=debounce(()=>{pending.forEach(node=>_classPrivateFieldBase(this,_performSyncNode)[_performSyncNode](node));pending.clear();},transInterval);return new IntersectionObserver(entries=>{entries.forEach(entry=>{if(entry.isIntersecting){_classPrivateFieldBase(this,_viewNodes)[_viewNodes].add(entry.target);pending.add(entry.target);flush();}else{_classPrivateFieldBase(this,_viewNodes)[_viewNodes].delete(entry.target);}});},{threshold:0.01,rootMargin:"".concat(rootMargin,"px 0px ").concat(rootMargin,"px 0px")});}function _createMutationObserver2(){return new MutationObserver(mutations=>{for(const mutation of mutations){var _mutation$nextSibling;if(_classPrivateFieldBase(this,_skipMoNodes)[_skipMoNodes].has(mutation.target)||((_mutation$nextSibling=mutation.nextSibling)===null||_mutation$nextSibling===void 0?void 0:_mutation$nextSibling.tagName)===_classPrivateFieldBase(this,_translationTagName)[_translationTagName]){continue;}if(mutation.type==="characterData"){if(mutation.oldValue!==mutation.target.nodeValue&&!_classPrivateFieldBase(this,_combinedSkipsRegex)[_combinedSkipsRegex].test(mutation.target.nodeValue)){_classPrivateFieldBase(this,_queueForRescan)[_queueForRescan](mutation.target.parentElement);}}else if(mutation.type==="childList"){let nodes=new Set();let hasText=false;mutation.addedNodes.forEach(node=>{if(_classPrivateFieldBase(this,_skipMoNodes)[_skipMoNodes].has(node)||node.nodeName===_classPrivateFieldBase(this,_translationTagName)[_translationTagName]){return;}if(node.nodeType===Node.TEXT_NODE){hasText=true;}else if(_class.isElementOrFragment(node)){nodes.add(node);}});if(hasText){_classPrivateFieldBase(this,_queueForRescan)[_queueForRescan](mutation.target);}else{nodes.forEach(node=>_classPrivateFieldBase(this,_queueForRescan)[_queueForRescan](node));}}}});}function _createDebounceMouseMover2(){return debounce(targetNode=>{const startNode=targetNode;let foundNode=null;while(targetNode&&targetNode!==document.body){if(_classPrivateFieldBase(this,_observedNodes)[_observedNodes].has(targetNode)){foundNode=targetNode;break;}targetNode=targetNode.parentElement;}_classPrivateFieldBase(this,_hoveredNode)[_hoveredNode]=foundNode||startNode;const{mouseHoverKey}=_classPrivateFieldBase(this,translator_setting)[translator_setting].mouseHoverSetting;if(mouseHoverKey.length===0&&!_classPrivateFieldBase(this,_isInitialized)[_isInitialized]){_classPrivateFieldBase(this,_init)[_init]();}if(mouseHoverKey.length===0&&foundNode){_classPrivateFieldBase(this,_processNode)[_processNode](foundNode);}},100);}function _handleMouseMove2(event){let targetNode=event.composedPath()[0];_classPrivateFieldBase(this,_dmm)[_dmm](targetNode);}function _handleKeyDown2(){if(!_classPrivateFieldBase(this,_isInitialized)[_isInitialized]){_classPrivateFieldBase(this,_init)[_init]();}let targetNode=_classPrivateFieldBase(this,_hoveredNode)[_hoveredNode];if(!targetNode||!_classPrivateFieldBase(this,_observedNodes)[_observedNodes].has(targetNode))return;_classPrivateFieldBase(this,_toggleTargetNode)[_toggleTargetNode](targetNode);}function _toggleTargetNode2(targetNode){if(_classPrivateFieldBase(this,_processedNodes)[_processedNodes].has(targetNode)){_classPrivateFieldBase(this,_cleanupDirectTranslations)[_cleanupDirectTranslations](targetNode);}else{_classPrivateFieldBase(this,_processNode)[_processNode](targetNode);}}function _findAllShadowRoots2(){let root=arguments.length>0&&arguments[0]!==undefined?arguments[0]:document.body;let results=arguments.length>1&&arguments[1]!==undefined?arguments[1]:new Set();// const start = performance.now(); try{const walker=document.createTreeWalker(root,NodeFilter.SHOW_ELEMENT);while(walker.nextNode()){const node=walker.currentNode;if(node.shadowRoot){results.add(node.shadowRoot);_classPrivateFieldBase(this,_findAllShadowRoots)[_findAllShadowRoots](node.shadowRoot,results);}}}catch(err){log_kissLog("无法访问某个 shadowRoot",err);}// const end = performance.now(); // const duration = end - start; @@ -36676,12 +36691,13 @@ const newTextNode=document.createTextNode(fragment);_classPrivateFieldBase(this, if(trimmedText.length<_classPrivateFieldBase(this,translator_setting)[translator_setting].minLength||trimmedText.length>_classPrivateFieldBase(this,translator_setting)[translator_setting].maxLength){return true;}// 单个非字母数字字符。 if(trimmedText.length===1&&!trimmedText.match(/[a-zA-Z]/)){return true;}// 只是一个数字 if(!isNaN(parseFloat(trimmedText))&&isFinite(trimmedText)){return true;}// 正则匹配 -if(_classPrivateFieldBase(this,_combinedSkipsRegex)[_combinedSkipsRegex].test(trimmedText)){return true;}return false;}async function _translateNodeGroup2(nodes,hostNode,deLang){const{transTag,textStyle,transEndHook,transOnly,termsStyle,selectStyle,parentStyle,grandStyle,// detectRemote, +if(_classPrivateFieldBase(this,_combinedSkipsRegex)[_combinedSkipsRegex].test(trimmedText)){return true;}return false;}async function _translateNodeGroup2(nodes,hostNode,deLang){const{transTag,textStyle,transEndHook,transOnly,termsStyle,textExtStyle,selectStyle,parentStyle,grandStyle,// detectRemote, // toLang, // skipLangs = [], highlightWords}=_classPrivateFieldBase(this,_rule)[_rule];const{newlineLength// langDetector, }=_classPrivateFieldBase(this,translator_setting)[translator_setting];const parentNode=hostNode.parentElement;const hideOrigin=transOnly==="true";try{const[processedString,placeholderMap]=_classPrivateFieldBase(this,_serializeForTranslation)[_serializeForTranslation](nodes,termsStyle);// console.log("processedString", processedString); -if(_classPrivateFieldBase(this,_isInvalidText)[_isInvalidText](processedString))return;const wrapper=document.createElement(_classPrivateFieldBase(this,_translationTagName)[_translationTagName]);wrapper.className=_class.KISS_CLASS.warpper;if(processedString.length>newlineLength){const br=document.createElement("br");br.hidden=hideOrigin;wrapper.appendChild(br);}const inner=document.createElement(transTag);inner.className="".concat(_class.KISS_CLASS.inner," ").concat(_classPrivateFieldBase(this,_textClass)[_textClass][textStyle]);inner.appendChild(createLoadingSVG());wrapper.appendChild(inner);nodes[nodes.length-1].after(wrapper);const currentRunId=_classPrivateFieldBase(this,_runId)[_runId];const{trText:translatedText,isSame:isSameLang}=await _classPrivateFieldBase(this,_translateFetch)[_translateFetch](processedString,deLang);if(_classPrivateFieldBase(this,_runId)[_runId]!==currentRunId){throw new Error("Request terminated");}if(!translatedText||isSameLang){wrapper.remove();return;}const htmlString=_classPrivateFieldBase(this,_restoreFromTranslation)[_restoreFromTranslation](translatedText,placeholderMap);const trustedHTML=trustedTypesHelper.createHTML(htmlString);// const parser = new DOMParser(); +if(_classPrivateFieldBase(this,_isInvalidText)[_isInvalidText](processedString))return;const wrapper=document.createElement(_classPrivateFieldBase(this,_translationTagName)[_translationTagName]);wrapper.className=_class.KISS_CLASS.warpper;if(processedString.length>newlineLength){const br=document.createElement("br");br.hidden=hideOrigin;wrapper.appendChild(br);}const inner=document.createElement(transTag);inner.className="".concat(_class.KISS_CLASS.inner," ").concat(_classPrivateFieldBase(this,_textClass)[_textClass][textStyle]||"");if(textExtStyle!==null&&textExtStyle!==void 0&&textExtStyle.trim()){inner.style.cssText=textExtStyle;// 附加内联样式 +}inner.appendChild(createLoadingSVG());wrapper.appendChild(inner);nodes[nodes.length-1].after(wrapper);const currentRunId=_classPrivateFieldBase(this,_runId)[_runId];const{trText:translatedText,isSame:isSameLang}=await _classPrivateFieldBase(this,_translateFetch)[_translateFetch](processedString,deLang);if(_classPrivateFieldBase(this,_runId)[_runId]!==currentRunId){throw new Error("Request terminated");}if(!translatedText||isSameLang){wrapper.remove();return;}const htmlString=_classPrivateFieldBase(this,_restoreFromTranslation)[_restoreFromTranslation](translatedText,placeholderMap);const trustedHTML=trustedTypesHelper.createHTML(htmlString);// const parser = new DOMParser(); // const doc = parser.parseFromString(trustedHTML, "text/html"); // const innerElement = doc.body.firstChild; // inner.replaceChildren(innerElement); @@ -36697,7 +36713,7 @@ if(node.nodeType===Node.TEXT_NODE){let text=node.textContent;// 专业术语替 if(_classPrivateFieldBase(this,_combinedTermsRegex)[_combinedTermsRegex]){_classPrivateFieldBase(this,_combinedTermsRegex)[_combinedTermsRegex].lastIndex=0;text=text.replace(_classPrivateFieldBase(this,_combinedTermsRegex)[_combinedTermsRegex],function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}const groups=args.slice(1,-2);const matchedIndex=groups.findIndex(group=>group!==undefined);const fullMatch=args[0];const termValue=_classPrivateFieldBase(_this,_termValues)[_termValues][matchedIndex];return pushReplace("").concat(termValue||fullMatch,""));});}return text;}// 元素节点 if(node.nodeType===Node.ELEMENT_NODE){if(_classPrivateFieldBase(this,_rule)[_rule].hasRichText==="true"&&_class.TAGS.REPLACE.has(node.tagName)||node.matches(_classPrivateFieldBase(this,_rule)[_rule].keepSelector)||// node.matches(this.#ignoreSelector) || !node.textContent.trim()){if(node.tagName==="IMG"||node.tagName==="SVG"){node.style.width="".concat(node.offsetWidth,"px");node.style.height="".concat(node.offsetHeight,"px");}return pushReplace(node.outerHTML);}let innerContent="";node.childNodes.forEach(child=>{innerContent+=traverse(child);});if(_classPrivateFieldBase(this,_rule)[_rule].hasRichText==="true"&&_class.TAGS.WARP.has(node.tagName)){wrapCounter++;const startPlaceholder="<".concat(_classPrivateFieldBase(this,_placeholder)[_placeholder].tagName).concat(wrapCounter,">");const endPlaceholder="");placeholderMap.set(startPlaceholder,buildOpeningTag(node));placeholderMap.set(endPlaceholder,""));return"".concat(startPlaceholder).concat(innerContent).concat(endPlaceholder);}return innerContent;}return"";};function buildOpeningTag(node){const escapeAttr=str=>str.replace(/"/g,""");let tag="<".concat(node.tagName.toLowerCase());for(const attr of node.attributes){tag+=" ".concat(attr.name,"=\"").concat(escapeAttr(attr.value),"\"");}tag+=">";return tag;}const processedString=nodes.map(traverse).join("").trim();return[processedString,placeholderMap];}function _restoreFromTranslation2(translatedText,placeholderMap){if(!placeholderMap.size){return translatedText;}if(!translatedText)return"";return translatedText.replace(_classPrivateFieldBase(this,_placeholderRegex)[_placeholderRegex],match=>placeholderMap.get(match)||match);}function _translateFetch2(text){let deLang=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";const{toLang,transStartHook}=_classPrivateFieldBase(this,_rule)[_rule];const fromLang=deLang||_classPrivateFieldBase(this,_rule)[_rule].fromLang;const apiSetting={..._classPrivateFieldBase(this,_apiSetting)[_apiSetting]};const docInfo={..._classPrivateFieldBase(this,_docInfo)[_docInfo]};const glossary={..._classPrivateFieldBase(this,_glossary)[_glossary]};const apisMap=_classPrivateFieldBase(this,_apisMap)[_apisMap];const args={text,fromLang,toLang,apiSetting,docInfo,glossary};// 翻译开始钩子函数 -if(transStartHook!==null&&transStartHook!==void 0&&transStartHook.trim()){try{interpreter.run("exports.transStartHook = ".concat(transStartHook));const hookResult=interpreter.exports.transStartHook({...args,apisMap});if(hookResult){Object.assign(args,...hookResult);}}catch(err){log_kissLog("transStartHook",err);}}return apiTranslate(args);}function _findTranslationWrappers2(parentNode){return parentNode.querySelectorAll(":scope > ".concat(APP_LCNAME));}function _cleanupAllNodes2(){_classPrivateFieldBase(this,_rootNodes)[_rootNodes].forEach(root=>_classPrivateFieldBase(this,_cleanupAllTranslations)[_cleanupAllTranslations](root));}function _cleanupAllTranslations2(root){root.querySelectorAll(APP_LCNAME).forEach(el=>_classPrivateFieldBase(this,_removeTranslationElement)[_removeTranslationElement](el));}function _cleanupDirectTranslations2(node){_classPrivateFieldBase(this,_findTranslationWrappers)[_findTranslationWrappers](node).forEach(el=>{_classPrivateFieldBase(this,_removeTranslationElement)[_removeTranslationElement](el);});}function _removeTranslationElement2(el){const parentElement=el.parentElement;_classPrivateFieldBase(this,_processedNodes)[_processedNodes].delete(parentElement);// 如果是仅显示译文模式,先恢复原文 +if(transStartHook!==null&&transStartHook!==void 0&&transStartHook.trim()){try{interpreter.run("exports.transStartHook = ".concat(transStartHook));const hookResult=interpreter.exports.transStartHook({...args,apisMap});if(hookResult){Object.assign(args,hookResult);}}catch(err){log_kissLog("transStartHook",err);}}return apiTranslate(args);}function _findTranslationWrappers2(parentNode){return parentNode.querySelectorAll(":scope > ".concat(APP_LCNAME));}function _cleanupAllNodes2(){_classPrivateFieldBase(this,_rootNodes)[_rootNodes].forEach(root=>_classPrivateFieldBase(this,_cleanupAllTranslations)[_cleanupAllTranslations](root));}function _cleanupAllTranslations2(root){root.querySelectorAll(APP_LCNAME).forEach(el=>_classPrivateFieldBase(this,_removeTranslationElement)[_removeTranslationElement](el));}function _cleanupDirectTranslations2(node){_classPrivateFieldBase(this,_findTranslationWrappers)[_findTranslationWrappers](node).forEach(el=>{_classPrivateFieldBase(this,_removeTranslationElement)[_removeTranslationElement](el);});}function _removeTranslationElement2(el){const parentElement=el.parentElement;_classPrivateFieldBase(this,_processedNodes)[_processedNodes].delete(parentElement);// 如果是仅显示译文模式,先恢复原文 const{nodes,isHide}=_classPrivateFieldBase(this,_translationNodes)[_translationNodes].get(el)||{};if(isHide){_classPrivateFieldBase(this,_restoreOriginal)[_restoreOriginal](el,nodes);}_classPrivateFieldBase(this,_translationNodes)[_translationNodes].delete(el);el.remove();// todo: 可能不应深度清除 if(_classPrivateFieldBase(this,_rule)[_rule].highlightWords===OPT_HIGHLIGHT_WORDS_AFTERTRANS){_classPrivateFieldBase(this,_removeHighlights)[_removeHighlights](parentElement);}_classPrivateFieldBase(this,_removeBrTags)[_removeBrTags](parentElement);}function _restoreOriginal2(el,nodes){if(nodes){const frag=document.createDocumentFragment();nodes.forEach(n=>frag.appendChild(n));const parent=el.parentElement;parent===null||parent===void 0?void 0:parent.insertBefore(frag,el);}}function _removeNodes2(nodes){if(nodes){const frag=document.createDocumentFragment();nodes.forEach(n=>frag.appendChild(n));}}function _toggleTranslationOnly2(node,transOnly){_classPrivateFieldBase(this,_findTranslationWrappers)[_findTranslationWrappers](node).forEach(el=>{const br=el.querySelector(":scope > br");const{nodes}=_classPrivateFieldBase(this,_translationNodes)[_translationNodes].get(el)||{};if(transOnly==="true"){// 双语变为仅译文 if(br)br.hidden=true;_classPrivateFieldBase(this,_removeNodes)[_removeNodes](nodes);_classPrivateFieldBase(this,_translationNodes)[_translationNodes].set(el,{nodes,isHide:true});}else{// 仅译文变为双语 @@ -39330,7 +39346,7 @@ Divider.muiSkipListHighlight = true; false ? 0 : void 0; /* harmony default export */ const Divider_Divider = (Divider); ;// CONCATENATED MODULE: ./src/hooks/Loading.js -function Loading(){return/*#__PURE__*/(0,jsx_runtime.jsxs)("center",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Divider_Divider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Link_Link,{href:"https://github.com/fishjar/kiss-translator",children:"KISS Translator v".concat("2.0.5")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{})]});} +function Loading(){return/*#__PURE__*/(0,jsx_runtime.jsxs)("center",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Divider_Divider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Link_Link,{href:"https://github.com/fishjar/kiss-translator",children:"KISS Translator v".concat("2.0.6")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{})]});} ;// CONCATENATED MODULE: ./src/hooks/Setting.js const SettingContext=/*#__PURE__*/(0,react.createContext)({setting:setting_DEFAULT_SETTING,updateSetting:()=>{},reloadSetting:()=>{}});function SettingProvider(_ref){let{children}=_ref;const{data:setting,isLoading,update,reload}=useStorage(storage_STOKEY_SETTING,setting_DEFAULT_SETTING,storage_KV_SETTING_KEY);(0,react.useEffect)(()=>{if(typeof(setting===null||setting===void 0?void 0:setting.darkMode)==="boolean"){update(currentSetting=>({...currentSetting,darkMode:currentSetting.darkMode?"dark":"light"}));}},[setting===null||setting===void 0?void 0:setting.darkMode,update]);(0,react.useEffect)(()=>{(async()=>{try{logger.setLevel(setting===null||setting===void 0?void 0:setting.logLevel);if(isExt){await sendBgMsg(MSG_SET_LOGLEVEL,setting===null||setting===void 0?void 0:setting.logLevel);}}catch(error){logger.error("Failed to fetch log level, using default.",error);}})();},[setting]);const updateSetting=(0,react.useCallback)(objOrFn=>{update(objOrFn);debounceSyncMeta(storage_KV_SETTING_KEY);},[update]);const updateChild=(0,react.useCallback)(key=>async obj=>{updateSetting(prev=>({...prev,[key]:{...((prev===null||prev===void 0?void 0:prev[key])||{}),...obj}}));},[updateSetting]);const value=(0,react.useMemo)(()=>({setting,updateSetting,updateChild,reloadSetting:reload}),[setting,updateSetting,updateChild,reload]);if(isLoading){return/*#__PURE__*/(0,jsx_runtime.jsx)(Loading,{});}if(!setting){/*#__PURE__*/(0,jsx_runtime.jsx)("center",{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Alert_Alert,{severity:"error",sx:{maxWidth:600,margin:"60px auto"},children:[/*#__PURE__*/(0,jsx_runtime.jsx)("p",{children:"\u6570\u636E\u52A0\u8F7D\u51FA\u9519\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u6216\u5378\u8F7D\u540E\u91CD\u65B0\u5B89\u88C5\u3002"}),/*#__PURE__*/(0,jsx_runtime.jsx)("p",{children:"Data loading error, please refresh the page or uninstall and reinstall."})]})});}return/*#__PURE__*/(0,jsx_runtime.jsx)(SettingContext.Provider,{value:value,children:children});}/** * 设置 hook @@ -39665,9 +39681,8 @@ function CssBaseline(inProps) { * mui 主题配置 * @param {*} param0 * @returns - */function Theme(_ref){let{children,options,styles}=_ref;const{darkMode}=useDarkMode();const[systemMode,setSystemMode]=(0,react.useState)(THEME_LIGHT);(0,react.useEffect)(()=>{if(typeof window.matchMedia!=="function"){return;}const mediaQuery=window.matchMedia("(prefers-color-scheme: dark)");const handleChange=()=>{setSystemMode(mediaQuery.matches?THEME_DARK:THEME_LIGHT);};handleChange();// Set initial value -mediaQuery.addEventListener("change",handleChange);return()=>mediaQuery.removeEventListener("change",handleChange);},[]);const theme=(0,react.useMemo)(()=>{let htmlFontSize=16;try{const s=window.getComputedStyle(document.body.parentNode).fontSize;const fontSize=parseInt(s.replace("px",""));if(fontSize>0&&fontSize<1000){htmlFontSize=fontSize;}}catch(err){// -}const isDarkMode=darkMode==="dark"||darkMode==="auto"&&systemMode===THEME_DARK;return (0,createTheme/* default */.Z)({palette:{mode:isDarkMode?THEME_DARK:THEME_LIGHT},typography:{htmlFontSize},...options});},[darkMode,options,systemMode]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(styles_ThemeProvider_ThemeProvider,{theme:theme,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(CssBaseline_CssBaseline,{}),/*#__PURE__*/(0,jsx_runtime.jsx)(material_GlobalStyles_GlobalStyles,{styles:styles}),children]});} + */function Theme(_ref){let{children,options={},styles={}}=_ref;const{darkMode}=useDarkMode();const[systemMode,setSystemMode]=(0,react.useState)(THEME_LIGHT);(0,react.useEffect)(()=>{if(typeof window.matchMedia!=="function"){return;}const mediaQuery=window.matchMedia("(prefers-color-scheme: dark)");const handleChange=()=>{setSystemMode(mediaQuery.matches?THEME_DARK:THEME_LIGHT);};handleChange();// Set initial value +mediaQuery.addEventListener("change",handleChange);return()=>mediaQuery.removeEventListener("change",handleChange);},[]);const theme=(0,react.useMemo)(()=>{const isDarkMode=darkMode==="dark"||darkMode==="auto"&&systemMode===THEME_DARK;return (0,createTheme/* default */.Z)({palette:{mode:isDarkMode?THEME_DARK:THEME_LIGHT},typography:{htmlFontSize:document.documentElement.style.fontSize?"16px":16},...options});},[darkMode,options,systemMode]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(styles_ThemeProvider_ThemeProvider,{theme:theme,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(CssBaseline_CssBaseline,{}),/*#__PURE__*/(0,jsx_runtime.jsx)(material_GlobalStyles_GlobalStyles,{styles:styles}),children]});} // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+styled-engine@5.15.14_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@e_38b353972d011fd8524090cbc8c519bf/node_modules/@mui/styled-engine/index.js + 5 modules var styled_engine = __webpack_require__(5190); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js @@ -46903,7 +46918,7 @@ function SugBaidu(_ref){let{text}=_ref;const{loading,error,data}=useAsyncNow(api function TranForm(_ref){let{text,setText,apiSlugs:initApiSlugs,fromLang:initFromLang,toLang:initToLang,toLang2:initToLang2,transApis,simpleStyle=false,langDetector:initLangDetector="-",enDict:initEnDict="-",enSug:initEnSug="-",isPlaygound=false}=_ref;const i18n=useI18n();const[editMode,setEditMode]=(0,react.useState)(false);const[editText,setEditText]=(0,react.useState)(text);const[apiSlugs,setApiSlugs]=(0,react.useState)(initApiSlugs);const[fromLang,setFromLang]=(0,react.useState)(initFromLang);const[toLang,setToLang]=(0,react.useState)(initToLang);const[toLang2,setToLang2]=(0,react.useState)(initToLang2);const[langDetector,setLangDetector]=(0,react.useState)(initLangDetector);const[enDict,setEnDict]=(0,react.useState)(initEnDict);const[enSug,setEnSug]=(0,react.useState)(initEnSug);const[deLang,setDeLang]=(0,react.useState)("");const[deLoading,setDeLoading]=(0,react.useState)(false);(0,react.useEffect)(()=>{if(!editMode){setEditText(text);}},[text,editMode]);(0,react.useEffect)(()=>{if(!text.trim()){setDeLang("");return;}(async()=>{try{setDeLoading(true);const deLang=await tryDetectLang(text,langDetector);if(deLang){setDeLang(deLang);}}catch(err){log_kissLog("tranbox: detect lang",err);}finally{setDeLoading(false);}})();},[text,langDetector,setDeLang,setDeLoading]);// todo: 语言变化后,realToLang引发二次翻译请求 const realToLang=(0,react.useMemo)(()=>{if(fromLang==="auto"&&toLang!==toLang2&&toLang2!=="-"&&deLang===toLang){return toLang2;}return toLang;},[fromLang,toLang,toLang2,deLang]);const optApis=(0,react.useMemo)(()=>transApis.filter(api=>!api.isDisabled).map(api=>({key:api.apiSlug,name:api.apiName||api.apiSlug})),[transApis]);const isWord=(0,react.useMemo)(()=>isValidWord(text),[text]);const xs=(0,react.useMemo)(()=>isPlaygound?3:4,[isPlaygound]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:simpleStyle?1:2,children:[!simpleStyle&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{multiple:true,MenuProps:{disablePortal:!isPlaygound}},fullWidth:true,size:"small",value:apiSlugs,name:"apiSlugs",label:i18n("translate_service_multiple"),onChange:e=>{setApiSlugs(e.target.value);},children:optApis.map(_ref2=>{let{key,name}=_ref2;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:key,children:name},key);})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:!isPlaygound}},fullWidth:true,size:"small",name:"fromLang",value:fromLang,label:i18n("from_lang"),onChange:e=>{setFromLang(e.target.value);},children:OPT_LANGS_FROM.map(_ref3=>{let[lang,name]=_ref3;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:!isPlaygound}},fullWidth:true,size:"small",name:"toLang",value:toLang,label:i18n("to_lang"),onChange:e=>{setToLang(e.target.value);},children:OPT_LANGS_TO.map(_ref4=>{let[lang,name]=_ref4;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})})}),isPlaygound&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:!isPlaygound}},fullWidth:true,size:"small",name:"toLang2",value:toLang2,label:i18n("to_lang2"),onChange:e=>{setToLang2(e.target.value);},children:OPT_LANGS_TO.map(_ref5=>{let[lang,name]=_ref5;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:!isPlaygound}},fullWidth:true,size:"small",name:"enDict",value:enDict,label:i18n("english_dict"),onChange:e=>{setEnDict(e.target.value);},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"-",children:i18n("disable")}),OPT_DICT_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:item},item))]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:!isPlaygound}},fullWidth:true,size:"small",name:"enSug",value:enSug,label:i18n("english_suggest"),onChange:e=>{setEnSug(e.target.value);},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"-",children:i18n("disable")}),OPT_SUG_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:item},item))]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:!isPlaygound}},fullWidth:true,size:"small",name:"langDetector",value:langDetector,label:i18n("detected_lang"),onChange:e=>{setLangDetector(e.target.value);},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"-",children:i18n("disable")}),OPT_LANGDETECTOR_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:item},item))]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{fullWidth:true,size:"small",name:"deLang",value:deLang&&OPT_LANGS_MAP.get(deLang),label:i18n("detected_result"),disabled:true,InputProps:{startAdornment:deLoading?/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{size:16}):null}})})]})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("original_text"),fullWidth:true,multiline:true,minRows:isPlaygound?2:1,maxRows:10,value:editText,onChange:e=>{setEditText(e.target.value);},onFocus:()=>{setEditMode(true);},onBlur:()=>{setEditMode(false);setText(editText.trim());},InputProps:{endAdornment:/*#__PURE__*/(0,jsx_runtime.jsx)(Stack_Stack,{direction:"row",sx:{position:"absolute",right:0,top:0},children:editMode?/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",onClick:e=>{e.stopPropagation();setEditMode(false);setText(editText.trim());},children:/*#__PURE__*/(0,jsx_runtime.jsx)(Done/* default */.Z,{fontSize:"inherit"})}):/*#__PURE__*/(0,jsx_runtime.jsx)(CopyBtn,{text:text})})}})})]}),apiSlugs.map(slug=>/*#__PURE__*/(0,jsx_runtime.jsx)(TranCont,{text:text,fromLang:fromLang,toLang:realToLang,simpleStyle:simpleStyle,apiSlug:slug,transApis:transApis},slug)),isWord&&OPT_DICT_MAP.has(enDict)&&/*#__PURE__*/(0,jsx_runtime.jsx)(DictCont,{text:text,enDict:enDict}),isWord&&OPT_SUG_MAP.has(enSug)&&/*#__PURE__*/(0,jsx_runtime.jsx)(SugCont,{text:text,enSug:enSug})]});} ;// CONCATENATED MODULE: ./src/views/Selection/TranBox.js -function Header(_ref){let{setShowBox,simpleStyle,setSimpleStyle,hideClickAway,setHideClickAway,followSelection,setFollowSelection,mouseHover}=_ref;const i18n=useI18n();if(!isMobile&&simpleStyle&&!mouseHover){return;}return/*#__PURE__*/(0,jsx_runtime.jsxs)(Box_Box,{onMouseUp:e=>e.stopPropagation(),onTouchEnd:e=>e.stopPropagation(),children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(DragIndicator/* default */.Z,{fontSize:"small"}),/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{variant:"body2",sx:{userSelect:"none",WebkitUserSelect:"none",fontWeight:"bold"},children:"".concat("KISS Translator"," v").concat("2.0.5")})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",title:i18n("btn_tip_click_away"),onClick:()=>{setHideClickAway(pre=>!pre);},children:hideClickAway?/*#__PURE__*/(0,jsx_runtime.jsx)(LockOpen/* default */.Z,{fontSize:"small"}):/*#__PURE__*/(0,jsx_runtime.jsx)(Lock/* default */.Z,{fontSize:"small"})}),/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",title:i18n("btn_tip_follow_selection"),onClick:()=>{setFollowSelection(pre=>!pre);},children:followSelection?/*#__PURE__*/(0,jsx_runtime.jsx)(PushPinOutlined/* default */.Z,{fontSize:"small"}):/*#__PURE__*/(0,jsx_runtime.jsx)(PushPin/* default */.Z,{fontSize:"small"})}),/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",title:i18n("btn_tip_simple_style"),onClick:()=>{setSimpleStyle(pre=>!pre);},children:simpleStyle?/*#__PURE__*/(0,jsx_runtime.jsx)(UnfoldMore/* default */.Z,{fontSize:"small"}):/*#__PURE__*/(0,jsx_runtime.jsx)(UnfoldLess/* default */.Z,{fontSize:"small"})}),/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",onClick:()=>{setShowBox(false);},children:/*#__PURE__*/(0,jsx_runtime.jsx)(icons_material_Close/* default */.Z,{fontSize:"small"})})]})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(Divider_Divider,{})]});}function TranBox(_ref2){let{showBox,text,setText,setShowBox,tranboxSetting:{enDict,enSug,apiSlugs,fromLang,toLang,toLang2,autoHeight},transApis,boxSize,setBoxSize,boxPosition,setBoxPosition,simpleStyle,setSimpleStyle,hideClickAway,setHideClickAway,followSelection,setFollowSelection,extStyles="",langDetector}=_ref2;const[mouseHover,setMouseHover]=(0,react.useState)(false);// todo: 这里的 SettingProvider 不应和 background 的共用 +function Header(_ref){let{setShowBox,simpleStyle,setSimpleStyle,hideClickAway,setHideClickAway,followSelection,setFollowSelection,mouseHover}=_ref;const i18n=useI18n();if(!isMobile&&simpleStyle&&!mouseHover){return;}return/*#__PURE__*/(0,jsx_runtime.jsxs)(Box_Box,{onMouseUp:e=>e.stopPropagation(),onTouchEnd:e=>e.stopPropagation(),children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(DragIndicator/* default */.Z,{fontSize:"small"}),/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{variant:"body2",sx:{userSelect:"none",WebkitUserSelect:"none",fontWeight:"bold"},children:"".concat("KISS Translator"," v").concat("2.0.6")})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",title:i18n("btn_tip_click_away"),onClick:()=>{setHideClickAway(pre=>!pre);},children:hideClickAway?/*#__PURE__*/(0,jsx_runtime.jsx)(LockOpen/* default */.Z,{fontSize:"small"}):/*#__PURE__*/(0,jsx_runtime.jsx)(Lock/* default */.Z,{fontSize:"small"})}),/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",title:i18n("btn_tip_follow_selection"),onClick:()=>{setFollowSelection(pre=>!pre);},children:followSelection?/*#__PURE__*/(0,jsx_runtime.jsx)(PushPinOutlined/* default */.Z,{fontSize:"small"}):/*#__PURE__*/(0,jsx_runtime.jsx)(PushPin/* default */.Z,{fontSize:"small"})}),/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",title:i18n("btn_tip_simple_style"),onClick:()=>{setSimpleStyle(pre=>!pre);},children:simpleStyle?/*#__PURE__*/(0,jsx_runtime.jsx)(UnfoldMore/* default */.Z,{fontSize:"small"}):/*#__PURE__*/(0,jsx_runtime.jsx)(UnfoldLess/* default */.Z,{fontSize:"small"})}),/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",onClick:()=>{setShowBox(false);},children:/*#__PURE__*/(0,jsx_runtime.jsx)(icons_material_Close/* default */.Z,{fontSize:"small"})})]})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(Divider_Divider,{})]});}function TranBox(_ref2){let{showBox,text,setText,setShowBox,tranboxSetting:{enDict,enSug,apiSlugs,fromLang,toLang,toLang2,autoHeight},transApis,boxSize,setBoxSize,boxPosition,setBoxPosition,simpleStyle,setSimpleStyle,hideClickAway,setHideClickAway,followSelection,setFollowSelection,extStyles="",langDetector}=_ref2;const[mouseHover,setMouseHover]=(0,react.useState)(false);// todo: 这里的 SettingProvider 不应和 background 的共用 return/*#__PURE__*/(0,jsx_runtime.jsx)(SettingProvider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Theme,{styles:extStyles,children:showBox&&/*#__PURE__*/(0,jsx_runtime.jsx)(DraggableResizable,{position:boxPosition,size:boxSize,setSize:setBoxSize,setPosition:setBoxPosition,autoHeight:autoHeight,header:/*#__PURE__*/(0,jsx_runtime.jsx)(Header,{setShowBox:setShowBox,simpleStyle:simpleStyle,setSimpleStyle:setSimpleStyle,hideClickAway:hideClickAway,setHideClickAway:setHideClickAway,followSelection:followSelection,setFollowSelection:setFollowSelection,mouseHover:mouseHover}),onClick:e=>e.stopPropagation(),onMouseEnter:()=>setMouseHover(true),onMouseLeave:()=>setMouseHover(false),children:/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{sx:{p:simpleStyle?1:2},children:/*#__PURE__*/(0,jsx_runtime.jsx)(TranForm,{text:text,setText:setText,apiSlugs:apiSlugs,fromLang:fromLang,toLang:toLang,toLang2:toLang2,transApis:transApis,simpleStyle:simpleStyle,langDetector:langDetector,enDict:enDict,enSug:enSug})})})})});} ;// CONCATENATED MODULE: ./src/views/Selection/index.js function Slection(_ref){let{contextMenuType,tranboxSetting,transApis,uiLang,langDetector}=_ref;const{hideTranBtn=false,simpleStyle:initSimpleStyle=false,hideClickAway:initHideClickAway=false,followSelection:initFollowMouse=false,tranboxShortcut=DEFAULT_TRANBOX_SHORTCUT,triggerMode=OPT_TRANBOX_TRIGGER_CLICK,// extStyles, @@ -46914,11 +46929,11 @@ window.addEventListener(isMobile?"touchend":"mouseup",handleMouseup);return()=>{ try{const menuCommandIds=[];contextMenuType!==0&&menuCommandIds.push(GM.registerMenuCommand(langMap("translate_selected_text"),event=>{handleTranbox();},"S"));return()=>{menuCommandIds.forEach(id=>{GM.unregisterMenuCommand(id);});};}catch(err){log_kissLog("registerMenuCommand",err);}},[handleTranbox,contextMenuType,langMap]);(0,react.useEffect)(()=>{if(hideClickAway){const handleHideBox=()=>{setShowBox(false);};window.addEventListener("click",handleHideBox);return()=>{window.removeEventListener("click",handleHideBox);};}},[hideClickAway]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TranBox,{showBox:showBox,text:text,setText:setText,boxSize:boxSize,setBoxSize:setBoxSize,boxPosition:boxPosition,setBoxPosition:setBoxPosition,tranboxSetting:tranboxSetting,transApis:transApis,setShowBox:setShowBox,simpleStyle:simpleStyle,setSimpleStyle:setSimpleStyle,hideClickAway:hideClickAway,setHideClickAway:setHideClickAway,followSelection:followSelection,setFollowSelection:setFollowSelection// extStyles={extStyles} ,langDetector:langDetector}),showBtn&&/*#__PURE__*/(0,jsx_runtime.jsx)(TranBtn,{position:position,btnOffsetX:btnOffsetX,btnOffsetY:btnOffsetY,btnEvent:btnEvent,onTrigger:e=>{e.stopPropagation();handleTrigger();}})]});} ;// CONCATENATED MODULE: ./src/libs/tranbox.js -var _container=/*#__PURE__*/_classPrivateFieldKey("container");var _reactRoot=/*#__PURE__*/_classPrivateFieldKey("reactRoot");var _shadowContainer=/*#__PURE__*/_classPrivateFieldKey("shadowContainer");var _props=/*#__PURE__*/_classPrivateFieldKey("props");class TransboxManager{constructor(){let initialProps=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};Object.defineProperty(this,_container,{writable:true,value:null});Object.defineProperty(this,_reactRoot,{writable:true,value:null});Object.defineProperty(this,_shadowContainer,{writable:true,value:null});Object.defineProperty(this,_props,{writable:true,value:{}});_classPrivateFieldBase(this,_props)[_props]=initialProps;const{tranboxSetting=DEFAULT_TRANBOX_SETTING}=_classPrivateFieldBase(this,_props)[_props];if(tranboxSetting!==null&&tranboxSetting!==void 0&&tranboxSetting.transOpen){this.enable();}}isEnabled(){return!!_classPrivateFieldBase(this,_container)[_container]&&document.body.parentElement.contains(_classPrivateFieldBase(this,_container)[_container]);}enable(){if(!this.isEnabled()){_classPrivateFieldBase(this,_container)[_container]=document.createElement("div");_classPrivateFieldBase(this,_container)[_container].id=APP_CONSTS.boxID;_classPrivateFieldBase(this,_container)[_container].className="notranslate";_classPrivateFieldBase(this,_container)[_container].style.cssText="font-size: 0; width: 0; height: 0; border: 0; padding: 0; margin: 0;";document.body.parentElement.appendChild(_classPrivateFieldBase(this,_container)[_container]);_classPrivateFieldBase(this,_shadowContainer)[_shadowContainer]=_classPrivateFieldBase(this,_container)[_container].attachShadow({mode:"closed"});const emotionRoot=document.createElement("style");const shadowRootElement=document.createElement("div");shadowRootElement.className="".concat(APP_CONSTS.boxID,"_warpper notranslate");_classPrivateFieldBase(this,_shadowContainer)[_shadowContainer].appendChild(emotionRoot);_classPrivateFieldBase(this,_shadowContainer)[_shadowContainer].appendChild(shadowRootElement);const cache=(0,emotion_cache_browser_esm/* default */.Z)({key:APP_CONSTS.boxID,prepend:true,container:emotionRoot});_classPrivateFieldBase(this,_reactRoot)[_reactRoot]=react_dom_client.createRoot(shadowRootElement);this.CacheProvider=_ref=>{let{children}=_ref;return/*#__PURE__*/(0,jsx_runtime.jsx)(emotion_element_c39617d8_browser_esm.C,{value:cache,children:children});};}const AppProvider=this.CacheProvider;_classPrivateFieldBase(this,_reactRoot)[_reactRoot].render(/*#__PURE__*/(0,jsx_runtime.jsx)(react.StrictMode,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(AppProvider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Slection,{..._classPrivateFieldBase(this,_props)[_props]})})}));}disable(){if(!this.isEnabled()||!_classPrivateFieldBase(this,_reactRoot)[_reactRoot]){return;}_classPrivateFieldBase(this,_reactRoot)[_reactRoot].unmount();_classPrivateFieldBase(this,_container)[_container].remove();_classPrivateFieldBase(this,_container)[_container]=null;_classPrivateFieldBase(this,_reactRoot)[_reactRoot]=null;_classPrivateFieldBase(this,_shadowContainer)[_shadowContainer]=null;this.CacheProvider=null;}toggle(){if(this.isEnabled()){this.disable();}else{this.enable();}}update(newProps){_classPrivateFieldBase(this,_props)[_props]={..._classPrivateFieldBase(this,_props)[_props],...newProps};if(this.isEnabled()){var _classPrivateFieldLoo;if(!((_classPrivateFieldLoo=_classPrivateFieldBase(this,_props)[_props].tranboxSetting)!==null&&_classPrivateFieldLoo!==void 0&&_classPrivateFieldLoo.transOpen)){this.disable();}else{this.enable();}}}} +var _container=/*#__PURE__*/_classPrivateFieldKey("container");var _reactRoot=/*#__PURE__*/_classPrivateFieldKey("reactRoot");var _shadowContainer=/*#__PURE__*/_classPrivateFieldKey("shadowContainer");var _props=/*#__PURE__*/_classPrivateFieldKey("props");class TransboxManager{constructor(){let initialProps=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};Object.defineProperty(this,_container,{writable:true,value:null});Object.defineProperty(this,_reactRoot,{writable:true,value:null});Object.defineProperty(this,_shadowContainer,{writable:true,value:null});Object.defineProperty(this,_props,{writable:true,value:{}});_classPrivateFieldBase(this,_props)[_props]=initialProps;const{tranboxSetting=DEFAULT_TRANBOX_SETTING}=_classPrivateFieldBase(this,_props)[_props];if(tranboxSetting!==null&&tranboxSetting!==void 0&&tranboxSetting.transOpen){this.enable();}}isEnabled(){return!!_classPrivateFieldBase(this,_container)[_container]&&document.body.contains(_classPrivateFieldBase(this,_container)[_container]);}enable(){if(!this.isEnabled()){_classPrivateFieldBase(this,_container)[_container]=document.createElement("div");_classPrivateFieldBase(this,_container)[_container].id=APP_CONSTS.boxID;_classPrivateFieldBase(this,_container)[_container].className="notranslate";document.body.appendChild(_classPrivateFieldBase(this,_container)[_container]);_classPrivateFieldBase(this,_shadowContainer)[_shadowContainer]=_classPrivateFieldBase(this,_container)[_container].attachShadow({mode:"open"});const shadowRootElement=document.createElement("div");shadowRootElement.className="".concat(APP_CONSTS.boxID,"_wrapper notranslate");_classPrivateFieldBase(this,_shadowContainer)[_shadowContainer].appendChild(shadowRootElement);const cache=(0,emotion_cache_browser_esm/* default */.Z)({key:APP_CONSTS.boxID,prepend:true,container:_classPrivateFieldBase(this,_shadowContainer)[_shadowContainer]});_classPrivateFieldBase(this,_reactRoot)[_reactRoot]=react_dom_client.createRoot(shadowRootElement);_classPrivateFieldBase(this,_reactRoot)[_reactRoot].render(/*#__PURE__*/(0,jsx_runtime.jsx)(react.StrictMode,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(emotion_element_c39617d8_browser_esm.C,{value:cache,children:/*#__PURE__*/(0,jsx_runtime.jsx)(Slection,{..._classPrivateFieldBase(this,_props)[_props]})})}));}}disable(){if(!this.isEnabled()||!_classPrivateFieldBase(this,_reactRoot)[_reactRoot]){return;}_classPrivateFieldBase(this,_reactRoot)[_reactRoot].unmount();_classPrivateFieldBase(this,_container)[_container].remove();_classPrivateFieldBase(this,_container)[_container]=null;_classPrivateFieldBase(this,_reactRoot)[_reactRoot]=null;_classPrivateFieldBase(this,_shadowContainer)[_shadowContainer]=null;}toggle(){if(this.isEnabled()){this.disable();}else{this.enable();}}update(newProps){_classPrivateFieldBase(this,_props)[_props]={..._classPrivateFieldBase(this,_props)[_props],...newProps};if(this.isEnabled()){var _classPrivateFieldLoo;if(!((_classPrivateFieldLoo=_classPrivateFieldBase(this,_props)[_props].tranboxSetting)!==null&&_classPrivateFieldLoo!==void 0&&_classPrivateFieldLoo.transOpen)){this.disable();}else{this.enable();}}}} ;// CONCATENATED MODULE: ./src/libs/touch.js function touchTapListener(fn){let options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};const config={taps:2,fingers:1,delay:300,...options};let maxTouches=0;let tapCount=0;let tapTimer=null;const handleTouchStart=e=>{maxTouches=Math.max(maxTouches,e.touches.length);};const handleTouchend=e=>{if(e.touches.length===0){if(maxTouches===config.fingers){tapCount++;clearTimeout(tapTimer);if(tapCount===config.taps){fn(e);tapCount=0;}else{tapTimer=setTimeout(()=>{tapCount=0;},config.delay);}}else{tapCount=0;clearTimeout(tapTimer);}maxTouches=0;}};document.addEventListener("touchstart",handleTouchStart,{passive:true});document.addEventListener("touchend",handleTouchend,{passive:true});return()=>{clearTimeout(tapTimer);document.removeEventListener("touchstart",handleTouchStart);document.removeEventListener("touchend",handleTouchend);};} ;// CONCATENATED MODULE: ./src/libs/shadowDomManager.js -var _hostElement=/*#__PURE__*/_classPrivateFieldKey("hostElement");var shadowDomManager_reactRoot=/*#__PURE__*/_classPrivateFieldKey("reactRoot");var _isVisible=/*#__PURE__*/_classPrivateFieldKey("isVisible");var _isProcessing=/*#__PURE__*/_classPrivateFieldKey("isProcessing");var _mount=/*#__PURE__*/_classPrivateFieldKey("mount");class ShadowDomManager{constructor(_ref){let{id,className="",reactComponent,props:_props={}}=_ref;Object.defineProperty(this,_mount,{value:_mount2});Object.defineProperty(this,_hostElement,{writable:true,value:null});Object.defineProperty(this,shadowDomManager_reactRoot,{writable:true,value:null});Object.defineProperty(this,_isVisible,{writable:true,value:false});Object.defineProperty(this,_isProcessing,{writable:true,value:false});if(!id||!reactComponent){throw new Error("ID and a React Component must be provided.");}this._id=id;this._className=className;this._ReactComponent=reactComponent;this._props=_props;}get isVisible(){return _classPrivateFieldBase(this,_isVisible)[_isVisible];}show(props){if(_classPrivateFieldBase(this,_isVisible)[_isVisible]||_classPrivateFieldBase(this,_isProcessing)[_isProcessing]){return;}if(!_classPrivateFieldBase(this,_hostElement)[_hostElement]){_classPrivateFieldBase(this,_isProcessing)[_isProcessing]=true;try{_classPrivateFieldBase(this,_mount)[_mount](props||this._props);}catch(error){logger.warn("Failed to mount component with id \"".concat(this._id,"\":"),error);_classPrivateFieldBase(this,_isProcessing)[_isProcessing]=false;return;}finally{_classPrivateFieldBase(this,_isProcessing)[_isProcessing]=false;}}_classPrivateFieldBase(this,_hostElement)[_hostElement].style.display="";_classPrivateFieldBase(this,_isVisible)[_isVisible]=true;}hide(){if(!_classPrivateFieldBase(this,_isVisible)[_isVisible]||!_classPrivateFieldBase(this,_hostElement)[_hostElement]){return;}_classPrivateFieldBase(this,_hostElement)[_hostElement].style.display="none";_classPrivateFieldBase(this,_isVisible)[_isVisible]=false;}destroy(){if(!_classPrivateFieldBase(this,_hostElement)[_hostElement]){return;}_classPrivateFieldBase(this,_isProcessing)[_isProcessing]=true;if(_classPrivateFieldBase(this,shadowDomManager_reactRoot)[shadowDomManager_reactRoot]){_classPrivateFieldBase(this,shadowDomManager_reactRoot)[shadowDomManager_reactRoot].unmount();}_classPrivateFieldBase(this,_hostElement)[_hostElement].remove();_classPrivateFieldBase(this,_hostElement)[_hostElement]=null;_classPrivateFieldBase(this,shadowDomManager_reactRoot)[shadowDomManager_reactRoot]=null;_classPrivateFieldBase(this,_isVisible)[_isVisible]=false;_classPrivateFieldBase(this,_isProcessing)[_isProcessing]=false;logger.info("Component with id \"".concat(this._id,"\" has been destroyed."));}toggle(props){if(_classPrivateFieldBase(this,_isVisible)[_isVisible]){this.hide();}else{this.show(props||this._props);}}}function _mount2(props){const host=document.createElement("div");host.id=this._id;if(this._className){host.className=this._className;}host.style.display="none";document.body.parentElement.appendChild(host);_classPrivateFieldBase(this,_hostElement)[_hostElement]=host;const shadowContainer=host.attachShadow({mode:"closed"});const emotionRoot=document.createElement("style");const appRoot=document.createElement("div");appRoot.className="".concat(this._id,"_wrapper");shadowContainer.appendChild(emotionRoot);shadowContainer.appendChild(appRoot);const cache=(0,emotion_cache_browser_esm/* default */.Z)({key:this._id,prepend:true,container:emotionRoot});const enhancedProps={...props,onClose:this.hide.bind(this)};const ComponentToRender=this._ReactComponent;_classPrivateFieldBase(this,shadowDomManager_reactRoot)[shadowDomManager_reactRoot]=react_dom_client.createRoot(appRoot);_classPrivateFieldBase(this,shadowDomManager_reactRoot)[shadowDomManager_reactRoot].render(/*#__PURE__*/(0,jsx_runtime.jsx)(react.StrictMode,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(emotion_element_c39617d8_browser_esm.C,{value:cache,children:/*#__PURE__*/(0,jsx_runtime.jsx)(ComponentToRender,{...enhancedProps})})}));} +var _hostElement=/*#__PURE__*/_classPrivateFieldKey("hostElement");var shadowDomManager_reactRoot=/*#__PURE__*/_classPrivateFieldKey("reactRoot");var _isVisible=/*#__PURE__*/_classPrivateFieldKey("isVisible");var _isProcessing=/*#__PURE__*/_classPrivateFieldKey("isProcessing");var _mount=/*#__PURE__*/_classPrivateFieldKey("mount");class ShadowDomManager{constructor(_ref){let{id,className="",reactComponent,props:_props={}}=_ref;Object.defineProperty(this,_mount,{value:_mount2});Object.defineProperty(this,_hostElement,{writable:true,value:null});Object.defineProperty(this,shadowDomManager_reactRoot,{writable:true,value:null});Object.defineProperty(this,_isVisible,{writable:true,value:false});Object.defineProperty(this,_isProcessing,{writable:true,value:false});if(!id||!reactComponent){throw new Error("ID and a React Component must be provided.");}this._id=id;this._className=className;this._ReactComponent=reactComponent;this._props=_props;}get isVisible(){return _classPrivateFieldBase(this,_isVisible)[_isVisible];}show(props){if(_classPrivateFieldBase(this,_isVisible)[_isVisible]||_classPrivateFieldBase(this,_isProcessing)[_isProcessing]){return;}if(!_classPrivateFieldBase(this,_hostElement)[_hostElement]){_classPrivateFieldBase(this,_isProcessing)[_isProcessing]=true;try{_classPrivateFieldBase(this,_mount)[_mount](props||this._props);}catch(error){logger.warn("Failed to mount component with id \"".concat(this._id,"\":"),error);_classPrivateFieldBase(this,_isProcessing)[_isProcessing]=false;return;}finally{_classPrivateFieldBase(this,_isProcessing)[_isProcessing]=false;}}_classPrivateFieldBase(this,_hostElement)[_hostElement].style.display="";_classPrivateFieldBase(this,_isVisible)[_isVisible]=true;}hide(){if(!_classPrivateFieldBase(this,_isVisible)[_isVisible]||!_classPrivateFieldBase(this,_hostElement)[_hostElement]){return;}_classPrivateFieldBase(this,_hostElement)[_hostElement].style.display="none";_classPrivateFieldBase(this,_isVisible)[_isVisible]=false;}destroy(){if(!_classPrivateFieldBase(this,_hostElement)[_hostElement]){return;}_classPrivateFieldBase(this,_isProcessing)[_isProcessing]=true;if(_classPrivateFieldBase(this,shadowDomManager_reactRoot)[shadowDomManager_reactRoot]){_classPrivateFieldBase(this,shadowDomManager_reactRoot)[shadowDomManager_reactRoot].unmount();}_classPrivateFieldBase(this,_hostElement)[_hostElement].remove();_classPrivateFieldBase(this,_hostElement)[_hostElement]=null;_classPrivateFieldBase(this,shadowDomManager_reactRoot)[shadowDomManager_reactRoot]=null;_classPrivateFieldBase(this,_isVisible)[_isVisible]=false;_classPrivateFieldBase(this,_isProcessing)[_isProcessing]=false;logger.info("Component with id \"".concat(this._id,"\" has been destroyed."));}toggle(props){if(_classPrivateFieldBase(this,_isVisible)[_isVisible]){this.hide();}else{this.show(props||this._props);}}}function _mount2(props){const host=document.createElement("div");host.id=this._id;if(this._className){host.className=this._className;}document.body.appendChild(host);_classPrivateFieldBase(this,_hostElement)[_hostElement]=host;const shadowContainer=host.attachShadow({mode:"open"});const appRoot=document.createElement("div");appRoot.className="".concat(this._id,"_wrapper");shadowContainer.appendChild(appRoot);const cache=(0,emotion_cache_browser_esm/* default */.Z)({key:this._id,prepend:true,container:shadowContainer});const enhancedProps={...props,onClose:this.hide.bind(this)};const ComponentToRender=this._ReactComponent;_classPrivateFieldBase(this,shadowDomManager_reactRoot)[shadowDomManager_reactRoot]=react_dom_client.createRoot(appRoot);_classPrivateFieldBase(this,shadowDomManager_reactRoot)[shadowDomManager_reactRoot].render(/*#__PURE__*/(0,jsx_runtime.jsx)(react.StrictMode,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(emotion_element_c39617d8_browser_esm.C,{value:cache,children:/*#__PURE__*/(0,jsx_runtime.jsx)(ComponentToRender,{...enhancedProps})})}));} ;// CONCATENATED MODULE: ./src/views/Action/Draggable.js const getEdgePosition=_ref=>{let{x:left,y:top,width,height,windowWidth,windowHeight,hover}=_ref;const right=windowWidth-left-width;const bottom=windowHeight-top-height;const min=Math.min(left,top,right,bottom);switch(min){case right:left=hover?windowWidth-width:windowWidth-width/2;break;case left:left=hover?0:-width/2;break;case bottom:top=hover?windowHeight-height:windowHeight-height/2;break;default:top=hover?0:-height/2;}return{x:left,y:top};};function DraggableWrapper(_ref2){let{children,usePaper,...props}=_ref2;if(usePaper){return/*#__PURE__*/(0,jsx_runtime.jsx)(Paper_Paper,{...props,elevation:4,children:children});}return/*#__PURE__*/(0,jsx_runtime.jsx)("div",{...props,children:children});}function Draggable(_ref3){let{windowSize:{w:windowWidth,h:windowHeight},width,height,left,top,show=true,snapEdge,onStart,onMove,handler,children,usePaper}=_ref3;const[hover,setHover]=(0,react.useState)(false);const[origin,setOrigin]=(0,react.useState)(null);const[position,setPosition]=(0,react.useState)({x:left,y:top});const setFabPosition=(0,react.useMemo)(()=>debounce(putFab,500),[]);const handlePointerDown=e=>{!isMobile&&e.target.setPointerCapture(e.pointerId);onStart&&onStart();const{x,y}=position;const{clientX,clientY}=isMobile?e.targetTouches[0]:e;setOrigin({x,y,clientX,clientY});};const handlePointerMove=e=>{onMove&&onMove();const{clientX,clientY}=isMobile?e.targetTouches[0]:e;if(origin){const dx=clientX-origin.clientX;const dy=clientY-origin.clientY;let x=origin.x+dx;let y=origin.y+dy;x=limitNumber(x,-width/2,windowWidth-width/2);y=limitNumber(y,0,windowHeight-height/2);setPosition({x,y});}};const handlePointerUp=e=>{e.stopPropagation();setOrigin(null);};const handleClick=e=>{e.stopPropagation();};const handleMouseEnter=e=>{e.stopPropagation();setHover(true);};const handleMouseLeave=e=>{e.stopPropagation();setHover(false);};(0,react.useEffect)(()=>{if(!snapEdge||!!origin){return;}setPosition(pre=>{const edgePosition=getEdgePosition({...pre,width,height,windowWidth,windowHeight,hover});setFabPosition(edgePosition);return edgePosition;});},[origin,hover,width,height,windowWidth,windowHeight,snapEdge,setFabPosition]);const opacity=(0,react.useMemo)(()=>{if(snapEdge){return hover||origin?1:0.2;}return origin?0.8:1;},[origin,snapEdge,hover]);const touchProps=isMobile?{onTouchStart:handlePointerDown,onTouchMove:handlePointerMove,onTouchEnd:handlePointerUp}:{onPointerDown:handlePointerDown,onPointerMove:handlePointerMove,onPointerUp:handlePointerUp};return/*#__PURE__*/(0,jsx_runtime.jsxs)(DraggableWrapper,{usePaper:usePaper,style:{opacity,position:"fixed",left:position.x,top:position.y,zIndex:2147483647,display:show?"block":"none"},onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,onClick:handleClick,children:[/*#__PURE__*/(0,jsx_runtime.jsx)("div",{style:{touchAction:"none"},...touchProps,children:handler}),/*#__PURE__*/(0,jsx_runtime.jsx)("div",{children:children})]});} // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+icons-material@5.15.15_@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@1_1e29dcefa4691dc57f2acd9f73947cfd/node_modules/@mui/icons-material/Home.js @@ -46932,7 +46947,7 @@ var BrightnessAuto = __webpack_require__(5538); ;// CONCATENATED MODULE: ./src/views/Options/DarkModeButton.js function DarkModeButton(){const{darkMode,toggleDarkMode}=useDarkMode();return/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{sx:{ml:1},onClick:toggleDarkMode,color:"inherit",children:darkMode==="dark"?/*#__PURE__*/(0,jsx_runtime.jsx)(DarkMode/* default */.Z,{}):darkMode==="light"?/*#__PURE__*/(0,jsx_runtime.jsx)(LightMode/* default */.Z,{}):/*#__PURE__*/(0,jsx_runtime.jsx)(BrightnessAuto/* default */.Z,{})});} ;// CONCATENATED MODULE: ./src/views/Popup/Header.js -function Header_Header(_ref){let{onClose}=_ref;const handleHomepage=()=>{window.open("https://github.com/fishjar/kiss-translator","_blank");};return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",justifyContent:"flex-start",alignItems:"center",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{onClick:handleHomepage,children:/*#__PURE__*/(0,jsx_runtime.jsx)(Home/* default */.Z,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{component:"div",sx:{userSelect:"none",WebkitUserSelect:"none",fontWeight:"bold"},children:"".concat("KISS Translator"," v").concat("2.0.5")})]}),onClose?/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{onClick:()=>{onClose();},children:/*#__PURE__*/(0,jsx_runtime.jsx)(icons_material_Close/* default */.Z,{})}):/*#__PURE__*/(0,jsx_runtime.jsx)(DarkModeButton,{})]});} +function Header_Header(_ref){let{onClose}=_ref;const handleHomepage=()=>{window.open("https://github.com/fishjar/kiss-translator","_blank");};return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",justifyContent:"flex-start",alignItems:"center",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{onClick:handleHomepage,children:/*#__PURE__*/(0,jsx_runtime.jsx)(Home/* default */.Z,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{component:"div",sx:{userSelect:"none",WebkitUserSelect:"none",fontWeight:"bold"},children:"".concat("KISS Translator"," v").concat("2.0.6")})]}),onClose?/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{onClick:()=>{onClose();},children:/*#__PURE__*/(0,jsx_runtime.jsx)(icons_material_Close/* default */.Z,{})}):/*#__PURE__*/(0,jsx_runtime.jsx)(DarkModeButton,{})]});} ;// CONCATENATED MODULE: ./src/hooks/WindowSize.js function useWindowSize(){const[windowSize,setWindowSize]=(0,react.useState)({w:window.innerWidth,h:window.innerHeight});const debounceWindowResize=useDebouncedCallback(()=>{setWindowSize({w:window.innerWidth,h:window.innerHeight});},200);(0,react.useEffect)(()=>{debounceWindowResize();window.addEventListener("resize",debounceWindowResize);return()=>{window.removeEventListener("resize",debounceWindowResize);};},[debounceWindowResize]);return windowSize;}/* harmony default export */ const WindowSize = (useWindowSize); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/FormControlLabel/formControlLabelClasses.js @@ -47895,8 +47910,10 @@ const Button = /*#__PURE__*/react.forwardRef(function Button(inProps, ref) { }); false ? 0 : void 0; /* harmony default export */ const Button_Button = (Button); +;// CONCATENATED MODULE: ./src/hooks/CustomStyles.js +function useStyleState(){const{setting,updateSetting}=useSetting();const customStyles=(setting===null||setting===void 0?void 0:setting.customStyles)||[];return{customStyles,updateSetting};}function useStyleList(){const{customStyles,updateSetting}=useStyleState();const addStyle=(0,react.useCallback)(()=>{const defaultStyle=DEFAULT_CUSTOM_STYLES[0];const uuid=crypto.randomUUID();const styleSlug="custom_".concat(crypto.randomUUID());const styleName="Style_".concat(uuid.slice(0,8));const newStyle={...defaultStyle,styleSlug,styleName};updateSetting(prev=>({...prev,customStyles:[...((prev===null||prev===void 0?void 0:prev.customStyles)||[]),newStyle]}));},[updateSetting]);const deleteStyle=(0,react.useCallback)(styleSlug=>{updateSetting(prev=>({...prev,customStyles:((prev===null||prev===void 0?void 0:prev.customStyles)||[]).filter(item=>item.styleSlug!==styleSlug)}));},[updateSetting]);const updateStyle=(0,react.useCallback)((styleSlug,updateData)=>{updateSetting(prev=>({...prev,customStyles:((prev===null||prev===void 0?void 0:prev.customStyles)||[]).map(item=>item.styleSlug===styleSlug?{...item,...updateData}:item)}));},[updateSetting]);return{customStyles,addStyle,deleteStyle,updateStyle};}function useAllTextStyles(){const{customStyles}=useStyleList();const i18n=useI18n();const builtinStyles=(0,react.useMemo)(()=>OPT_STYLE_ALL.map(styleSlug=>({styleSlug,styleName:i18n(styleSlug),styleCode:builtinStylesMap[styleSlug]||""})),[i18n]);const allTextStyles=(0,react.useMemo)(()=>{return[...builtinStyles,...customStyles];},[builtinStyles,customStyles]);return{builtinStyles,customStyles,allTextStyles};} ;// CONCATENATED MODULE: ./src/views/Popup/PopupCont.js -function PopupCont(_ref){let{rule,setting,setRule,setSetting,handleOpenSetting,processActions,isContent=false}=_ref;const i18n=useI18n();const[commands,setCommands]=(0,react.useState)({});const handleTransToggle=async e=>{try{setRule({...rule,transOpen:e.target.checked?"true":"false"});if(!processActions){await sendTabMsg(MSG_TRANS_TOGGLE);}else{processActions({action:MSG_TRANS_TOGGLE});}}catch(err){log_kissLog("toggle trans",err);}};const handleTransboxToggle=async e=>{try{setSetting(pre=>({...pre,tranboxSetting:{...pre.tranboxSetting,transOpen:e.target.checked}}));if(!processActions){await sendTabMsg(MSG_TRANSBOX_TOGGLE);}else{processActions({action:MSG_TRANSBOX_TOGGLE});}}catch(err){log_kissLog("toggle transbox",err);}};const handleMousehoverToggle=async e=>{try{setSetting(pre=>({...pre,mouseHoverSetting:{...pre.mouseHoverSetting,useMouseHover:e.target.checked}}));if(!processActions){await sendTabMsg(MSG_MOUSEHOVER_TOGGLE);}else{processActions({action:MSG_MOUSEHOVER_TOGGLE});}}catch(err){log_kissLog("toggle mousehover",err);}};const handleInputTransToggle=async e=>{try{setSetting(pre=>({...pre,inputRule:{...pre.inputRule,transOpen:e.target.checked}}));if(!processActions){await sendTabMsg(MSG_TRANSINPUT_TOGGLE);}else{processActions({action:MSG_TRANSINPUT_TOGGLE});}}catch(err){log_kissLog("toggle inputtrans",err);}};const handleChange=async e=>{try{const{name,value}=e.target;setRule(pre=>({...pre,[name]:value}));if(!processActions){await sendTabMsg(MSG_TRANS_PUTRULE,{[name]:value});}else{processActions({action:MSG_TRANS_PUTRULE,args:{[name]:value}});}}catch(err){log_kissLog("update rule",err);}};const handleClearCache=()=>{tryClearCaches();};const handleSaveRule=async()=>{try{let href="";if(!isContent){const tab=await getCurTab();href=tab.url;}else{var _window$location;href=(_window$location=window.location)===null||_window$location===void 0?void 0:_window$location.href;}if(!href||typeof href!=="string"){return;}const pattern=parseUrlPattern(href);const curRule={...rule,pattern};if(isExt&&isContent){sendBgMsg(MSG_SAVE_RULE,curRule);}else{saveRule(curRule);}}catch(err){log_kissLog("save rule",err);}};(0,react.useEffect)(()=>{(async()=>{try{const commands={};if(isExt){const res=await sendBgMsg(MSG_COMMAND_SHORTCUTS);res.forEach(_ref2=>{let{name,shortcut}=_ref2;commands[name]=shortcut;});}else{const shortcuts=setting.shortcuts;if(shortcuts){Object.entries(shortcuts).forEach(_ref3=>{let[key,val]=_ref3;commands[key]=val.join("+");});}}setCommands(commands);}catch(err){log_kissLog("query cmds",err);}})();},[setting.shortcuts]);const optApis=(0,react.useMemo)(()=>setting.transApis.filter(api=>!api.isDisabled).map(api=>({key:api.apiSlug,name:api.apiName||api.apiSlug})),[setting.transApis]);const tranboxEnabled=setting.tranboxSetting.transOpen;const mouseHoverEnabled=setting.mouseHoverSetting.useMouseHover;const inputTransEnabled=setting.inputRule.transOpen;const{transOpen,apiSlug,fromLang,toLang,textStyle,autoScan,transOnly,hasRichText,hasShadowroot}=rule;return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{sx:{p:2},spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,columns:12,spacing:1,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{checked:transOpen==="true",onChange:handleTransToggle}),label:commands["toggleTranslate"]?"".concat(i18n("translate_alt"),"(").concat(commands["toggleTranslate"],")"):i18n("translate_alt")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"autoScan",value:autoScan==="true"?"false":"true",checked:autoScan==="true",onChange:handleChange}),label:i18n("autoscan_alt")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"hasShadowroot",value:hasShadowroot==="true"?"false":"true",checked:hasShadowroot==="true",onChange:handleChange}),label:i18n("shadowroot_alt")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"hasRichText",value:hasRichText==="true"?"false":"true",checked:hasRichText==="true",onChange:handleChange}),label:i18n("richtext_alt")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"transOnly",value:transOnly==="true"?"false":"true",checked:transOnly==="true",onChange:handleChange}),label:i18n("transonly_alt")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"tranboxEnabled",value:!tranboxEnabled,checked:tranboxEnabled,onChange:handleTransboxToggle}),label:i18n("selection_translate")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"mouseHoverEnabled",value:!mouseHoverEnabled,checked:mouseHoverEnabled,onChange:handleMousehoverToggle}),label:i18n("mousehover_translate")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"inputTransEnabled",value:!inputTransEnabled,checked:inputTransEnabled,onChange:handleInputTransToggle}),label:i18n("input_translate")})})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:true}},size:"small",value:apiSlug,name:"apiSlug",label:i18n("translate_service"),onChange:handleChange,children:optApis.map(_ref4=>{let{key,name}=_ref4;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:key,children:name},key);})}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:true}},size:"small",value:fromLang,name:"fromLang",label:i18n("from_lang"),onChange:handleChange,children:OPT_LANGS_FROM.map(_ref5=>{let[lang,name]=_ref5;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:true}},size:"small",value:toLang,name:"toLang",label:i18n("to_lang"),onChange:handleChange,children:OPT_LANGS_TO.map(_ref6=>{let[lang,name]=_ref6;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:true}},size:"small",value:textStyle,name:"textStyle",label:commands["toggleStyle"]?"".concat(i18n("text_style_alt"),"(").concat(commands["toggleStyle"],")"):i18n("text_style_alt"),onChange:handleChange,children:OPT_STYLE_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:i18n(item)},item))}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{variant:"text",onClick:handleSaveRule,children:i18n("save_rule")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{variant:"text",onClick:handleClearCache,children:i18n("clear_cache")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{variant:"text",onClick:handleOpenSetting,children:i18n("setting")})]})]});} +function PopupCont(_ref){let{rule,setting,setRule,setSetting,handleOpenSetting,processActions,isContent=false}=_ref;const i18n=useI18n();const[commands,setCommands]=(0,react.useState)({});const{allTextStyles}=useAllTextStyles();const handleTransToggle=async e=>{try{setRule({...rule,transOpen:e.target.checked?"true":"false"});if(!processActions){await sendTabMsg(MSG_TRANS_TOGGLE);}else{processActions({action:MSG_TRANS_TOGGLE});}}catch(err){log_kissLog("toggle trans",err);}};const handleTransboxToggle=async e=>{try{setSetting(pre=>({...pre,tranboxSetting:{...pre.tranboxSetting,transOpen:e.target.checked}}));if(!processActions){await sendTabMsg(MSG_TRANSBOX_TOGGLE);}else{processActions({action:MSG_TRANSBOX_TOGGLE});}}catch(err){log_kissLog("toggle transbox",err);}};const handleMousehoverToggle=async e=>{try{setSetting(pre=>({...pre,mouseHoverSetting:{...pre.mouseHoverSetting,useMouseHover:e.target.checked}}));if(!processActions){await sendTabMsg(MSG_MOUSEHOVER_TOGGLE);}else{processActions({action:MSG_MOUSEHOVER_TOGGLE});}}catch(err){log_kissLog("toggle mousehover",err);}};const handleInputTransToggle=async e=>{try{setSetting(pre=>({...pre,inputRule:{...pre.inputRule,transOpen:e.target.checked}}));if(!processActions){await sendTabMsg(MSG_TRANSINPUT_TOGGLE);}else{processActions({action:MSG_TRANSINPUT_TOGGLE});}}catch(err){log_kissLog("toggle inputtrans",err);}};const handleChange=async e=>{try{const{name,value}=e.target;setRule(pre=>({...pre,[name]:value}));if(!processActions){await sendTabMsg(MSG_TRANS_PUTRULE,{[name]:value});}else{processActions({action:MSG_TRANS_PUTRULE,args:{[name]:value}});}}catch(err){log_kissLog("update rule",err);}};const handleClearCache=()=>{tryClearCaches();};const handleSaveRule=async()=>{try{let href="";if(!isContent){const tab=await getCurTab();href=tab.url;}else{var _window$location;href=(_window$location=window.location)===null||_window$location===void 0?void 0:_window$location.href;}if(!href||typeof href!=="string"){return;}const pattern=parseUrlPattern(href);const curRule={...rule,pattern};if(isExt&&isContent){sendBgMsg(MSG_SAVE_RULE,curRule);}else{saveRule(curRule);}}catch(err){log_kissLog("save rule",err);}};(0,react.useEffect)(()=>{(async()=>{try{const commands={};if(isExt){const res=await sendBgMsg(MSG_COMMAND_SHORTCUTS);res.forEach(_ref2=>{let{name,shortcut}=_ref2;commands[name]=shortcut;});}else{const shortcuts=setting.shortcuts;if(shortcuts){Object.entries(shortcuts).forEach(_ref3=>{let[key,val]=_ref3;commands[key]=val.join("+");});}}setCommands(commands);}catch(err){log_kissLog("query cmds",err);}})();},[setting.shortcuts]);const optApis=(0,react.useMemo)(()=>setting.transApis.filter(api=>!api.isDisabled).map(api=>({key:api.apiSlug,name:api.apiName||api.apiSlug})),[setting.transApis]);const tranboxEnabled=setting.tranboxSetting.transOpen;const mouseHoverEnabled=setting.mouseHoverSetting.useMouseHover;const inputTransEnabled=setting.inputRule.transOpen;const{transOpen,apiSlug,fromLang,toLang,textStyle,autoScan,transOnly,hasRichText,hasShadowroot}=rule;return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{sx:{p:2},spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,columns:12,spacing:1,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{checked:transOpen==="true",onChange:handleTransToggle}),label:commands["toggleTranslate"]?"".concat(i18n("translate_alt"),"(").concat(commands["toggleTranslate"],")"):i18n("translate_alt")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"autoScan",value:autoScan==="true"?"false":"true",checked:autoScan==="true",onChange:handleChange}),label:i18n("autoscan_alt")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"hasShadowroot",value:hasShadowroot==="true"?"false":"true",checked:hasShadowroot==="true",onChange:handleChange}),label:i18n("shadowroot_alt")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"hasRichText",value:hasRichText==="true"?"false":"true",checked:hasRichText==="true",onChange:handleChange}),label:i18n("richtext_alt")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"transOnly",value:transOnly==="true"?"false":"true",checked:transOnly==="true",onChange:handleChange}),label:i18n("transonly_alt")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"tranboxEnabled",value:!tranboxEnabled,checked:tranboxEnabled,onChange:handleTransboxToggle}),label:i18n("selection_translate")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"mouseHoverEnabled",value:!mouseHoverEnabled,checked:mouseHoverEnabled,onChange:handleMousehoverToggle}),label:i18n("mousehover_translate")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:6,children:/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"inputTransEnabled",value:!inputTransEnabled,checked:inputTransEnabled,onChange:handleInputTransToggle}),label:i18n("input_translate")})})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:true}},size:"small",value:apiSlug,name:"apiSlug",label:i18n("translate_service"),onChange:handleChange,children:optApis.map(_ref4=>{let{key,name}=_ref4;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:key,children:name},key);})}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:true}},size:"small",value:fromLang,name:"fromLang",label:i18n("from_lang"),onChange:handleChange,children:OPT_LANGS_FROM.map(_ref5=>{let[lang,name]=_ref5;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:true}},size:"small",value:toLang,name:"toLang",label:i18n("to_lang"),onChange:handleChange,children:OPT_LANGS_TO.map(_ref6=>{let[lang,name]=_ref6;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:true}},size:"small",value:textStyle,name:"textStyle",label:commands["toggleStyle"]?"".concat(i18n("text_style_alt"),"(").concat(commands["toggleStyle"],")"):i18n("text_style_alt"),onChange:handleChange,children:allTextStyles.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item.styleSlug,children:item.styleName},item.styleSlug))}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{variant:"text",onClick:handleSaveRule,children:i18n("save_rule")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{variant:"text",onClick:handleClearCache,children:i18n("clear_cache")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{variant:"text",onClick:handleOpenSetting,children:i18n("setting")})]})]});} ;// CONCATENATED MODULE: ./src/views/Action/index.js function Action(_ref){let{translator,processActions}=_ref;const[showPopup,setShowPopup]=(0,react.useState)(true);const[rule,setRule]=(0,react.useState)(translator.rule);const[setting,setSetting]=(0,react.useState)(translator.setting);const windowSize=WindowSize();const handleOpenSetting=(0,react.useCallback)(()=>{if(isExt){sendBgMsg(MSG_OPEN_OPTIONS);}else{window.open("https://fishjar.github.io/kiss-translator/options.html","_blank");}},[]);(0,react.useEffect)(()=>{const handleWindowClick=()=>{setShowPopup(false);};window.addEventListener("click",handleWindowClick);return()=>{window.removeEventListener("click",handleWindowClick);};},[]);(0,react.useEffect)(()=>{const handleStatusUpdate=event=>{var _event$detail;if(((_event$detail=event.detail)===null||_event$detail===void 0?void 0:_event$detail.action)===MSG_POPUP_TOGGLE){setShowPopup(pre=>!pre);}};document.addEventListener(EVENT_KISS,handleStatusUpdate);return()=>{document.removeEventListener(EVENT_KISS,handleStatusUpdate);};},[]);(0,react.useEffect)(()=>{if(showPopup){setRule(translator.rule);setSetting(translator.setting);}},[showPopup,translator]);const popProps=(0,react.useMemo)(()=>{const width=Math.min(windowSize.w,360);const height=Math.min(windowSize.h,442);const left=(windowSize.w-width)/2;const top=(windowSize.h-height)/2;return{windowSize,width,height,left,top};},[windowSize]);return/*#__PURE__*/(0,jsx_runtime.jsx)(SettingProvider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Theme,{children:showPopup&&/*#__PURE__*/(0,jsx_runtime.jsx)(Draggable,{...popProps,usePaper:true,handler:/*#__PURE__*/(0,jsx_runtime.jsxs)(Box_Box,{style:{cursor:"move"},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Header_Header,{onClose:()=>{setShowPopup(false);}}),/*#__PURE__*/(0,jsx_runtime.jsx)(Divider_Divider,{})]}),children:/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{width:360,children:/*#__PURE__*/(0,jsx_runtime.jsx)(PopupCont,{rule:rule,setting:setting,setRule:setRule,setSetting:setSetting,handleOpenSetting:handleOpenSetting,processActions:processActions,isContent:true})})},"pop")})});} ;// CONCATENATED MODULE: ./src/libs/popupManager.js @@ -48095,7 +48112,7 @@ if(globalThis.GM&&_classPrivateFieldBase(this,_menuCommandIds)[_menuCommandIds]. ;// CONCATENATED MODULE: ./src/common.js /** * 油猴脚本设置页面 - */function runSettingPage(){var _GM,_GM$info,_GM$info$script,_GM$info$script$grant;if((_GM=GM)!==null&&_GM!==void 0&&(_GM$info=_GM.info)!==null&&_GM$info!==void 0&&(_GM$info$script=_GM$info.script)!==null&&_GM$info$script!==void 0&&(_GM$info$script$grant=_GM$info$script.grant)!==null&&_GM$info$script$grant!==void 0&&_GM$info$script$grant.includes("unsafeWindow")){unsafeWindow.GM=GM;unsafeWindow.APP_INFO={name:"KISS Translator",version:"2.0.5"};}else{const ping=utils_genEventName();window.addEventListener(ping,handlePing);// window.eval(`(${injectScript})("${ping}")`); // eslint-disable-line + */function runSettingPage(){var _GM,_GM$info,_GM$info$script,_GM$info$script$grant;if((_GM=GM)!==null&&_GM!==void 0&&(_GM$info=_GM.info)!==null&&_GM$info!==void 0&&(_GM$info$script=_GM$info.script)!==null&&_GM$info$script!==void 0&&(_GM$info$script$grant=_GM$info$script.grant)!==null&&_GM$info$script$grant!==void 0&&_GM$info$script$grant.includes("unsafeWindow")){unsafeWindow.GM=GM;unsafeWindow.APP_INFO={name:"KISS Translator",version:"2.0.6"};}else{const ping=utils_genEventName();window.addEventListener(ping,handlePing);// window.eval(`(${injectScript})("${ping}")`); // eslint-disable-line injectInlineJs("(".concat(injectScript,")(\"").concat(ping,"\")"),"kiss-translator-options-injector");}}/** * 显示错误信息到页面顶部 * @param {*} message diff --git a/main.js b/main.js index b14b79e..9c3dabb 100644 --- a/main.js +++ b/main.js @@ -34806,7 +34806,7 @@ const Link = /*#__PURE__*/react.forwardRef(function Link(inProps, ref) { const useAsync=()=>{const[data,setData]=(0,react.useState)(null);const[loading,setLoading]=(0,react.useState)(false);const[error,setError]=(0,react.useState)(null);const execute=(0,react.useCallback)(async function(fn){if(!fn){return;}setLoading(true);setError(null);try{for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key];}const res=await fn(...args);setData(res);setLoading(false);return res;}catch(err){setError((err===null||err===void 0?void 0:err.message)||"An unknown error occurred");setLoading(false);// throw err; }},[]);const reset=(0,react.useCallback)(()=>{setData(null);setLoading(false);setError(null);},[]);return{data,loading,error,execute,reset};};const useAsyncNow=(fn,arg)=>{const{execute,...asyncState}=useAsync();useEffect(()=>{if(fn){execute(fn,arg);}},[execute,fn,arg]);return{...asyncState};};const useFetch=()=>{const{execute,...asyncState}=useAsync();const requester=(0,react.useCallback)(async(url,options)=>{var _response$headers$get;const response=await fetch(url,options);if(!response.ok){const errorInfo=await response.text();throw new Error("Request failed: ".concat(response.status," ").concat(response.statusText," - ").concat(errorInfo));}if(response.status===204){return null;}if((_response$headers$get=response.headers.get("Content-Type"))!==null&&_response$headers$get!==void 0&&_response$headers$get.includes("json")){return response.json();}return response.text();},[]);const get=(0,react.useCallback)(async function(url){let options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};try{const result=await execute(requester,url,{...options,method:"GET"});return result;}catch(err){return null;}},[execute,requester]);const post=(0,react.useCallback)(async function(url,body){let options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};try{const result=await execute(requester,url,{...options,method:"POST",headers:{"Content-Type":"application/json",...options.headers},body:JSON.stringify(body)});return result;}catch(err){return null;}},[execute,requester]);const put=(0,react.useCallback)(async function(url,body){let options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};try{const result=await execute(requester,url,{...options,method:"PUT",headers:{"Content-Type":"application/json",...options.headers},body:JSON.stringify(body)});return result;}catch(err){return null;}},[execute,requester]);const del=(0,react.useCallback)(async function(url){let options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};try{const result=await execute(requester,url,{...options,method:"DELETE"});return result;}catch(err){return null;}},[execute,requester]);return{...asyncState,get,post,put,del};};const useGet=url=>{const{get,...fetchState}=useFetch();(0,react.useEffect)(()=>{if(url)get(url);},[url,get]);return{...fetchState};}; ;// CONCATENATED MODULE: ./src/config/app.js -const APP_NAME="KISS Translator".trim().split(/\s+/).join("-");const APP_LCNAME=APP_NAME.toLowerCase();const APP_UPNAME=APP_NAME.toUpperCase();const APP_CONSTS={fabID:"".concat(APP_LCNAME,"-fab"),boxID:"".concat(APP_LCNAME,"-box"),popupID:"".concat(APP_LCNAME,"-popup")};const APP_VERSION="2.0.5".split(".");const THEME_LIGHT="light";const THEME_DARK="dark"; +const APP_NAME="KISS Translator".trim().split(/\s+/).join("-");const APP_LCNAME=APP_NAME.toLowerCase();const APP_UPNAME=APP_NAME.toUpperCase();const APP_CONSTS={fabID:"".concat(APP_LCNAME,"-fab"),boxID:"".concat(APP_LCNAME,"-box"),popupID:"".concat(APP_LCNAME,"-popup")};const APP_VERSION="2.0.6".split(".");const THEME_LIGHT="light";const THEME_DARK="dark"; ;// CONCATENATED MODULE: ./src/config/api.js const DEFAULT_HTTP_TIMEOUT=10000;// 调用超时时间 const DEFAULT_FETCH_LIMIT=10;// 默认最大任务数量 @@ -34844,7 +34844,7 @@ context:new Set([OPT_TRANS_OPENAI,OPT_TRANS_GEMINI,OPT_TRANS_GEMINI_2,OPT_TRANS_ "transcreation",// 创译风格 "machine-like",// 机器风格 "concise"// 简明风格 -];const BUILTIN_PLACEHOLDERS=["{ }","{{ }}","[ ]","[[ ]]"];const BUILTIN_PLACETAGS=["i","a","b","x"];const OPT_LANGS_TO=[["en","English - English"],["zh-CN","Simplified Chinese - 简体中文"],["zh-TW","Traditional Chinese - 繁體中文"],["ar","Arabic - العربية"],["bg","Bulgarian - Български"],["ca","Catalan - Català"],["hr","Croatian - Hrvatski"],["cs","Czech - Čeština"],["da","Danish - Dansk"],["nl","Dutch - Nederlands"],["fi","Finnish - Suomi"],["fr","French - Français"],["de","German - Deutsch"],["el","Greek - Ελληνικά"],["hi","Hindi - हिन्दी"],["hu","Hungarian - Magyar"],["id","Indonesian - Indonesia"],["it","Italian - Italiano"],["ja","Japanese - 日本語"],["ko","Korean - 한국어"],["ms","Malay - Melayu"],["mt","Maltese - Malti"],["nb","Norwegian - Norsk Bokmål"],["pl","Polish - Polski"],["pt","Portuguese - Português"],["ro","Romanian - Română"],["ru","Russian - Русский"],["sk","Slovak - Slovenčina"],["sl","Slovenian - Slovenščina"],["es","Spanish - Español"],["sv","Swedish - Svenska"],["ta","Tamil - தமிழ்"],["te","Telugu - తెలుగు"],["th","Thai - ไทย"],["tr","Turkish - Türkçe"],["uk","Ukrainian - Українська"],["vi","Vietnamese - Tiếng Việt"]];const OPT_LANGS_LIST=OPT_LANGS_TO.map(_ref=>{let[lang]=_ref;return lang;});const OPT_LANGS_FROM=[["auto","Auto-detect"],...OPT_LANGS_TO];const OPT_LANGS_MAP=new Map(OPT_LANGS_TO);// CODE->名称 +];const BUILTIN_PLACEHOLDERS=["{ }","{{ }}","[ ]","[[ ]]"];const BUILTIN_PLACETAGS=["i","a","b","x"];const OPT_LANGS_TO=[["en","English - English"],["zh-CN","Simplified Chinese - 简体中文"],["zh-TW","Traditional Chinese - 繁體中文"],["ar","Arabic - العربية"],["bg","Bulgarian - Български"],["ca","Catalan - Català"],["hr","Croatian - Hrvatski"],["cs","Czech - Čeština"],["da","Danish - Dansk"],["nl","Dutch - Nederlands"],["fa","Persian - فارسی"],["fi","Finnish - Suomi"],["fr","French - Français"],["de","German - Deutsch"],["el","Greek - Ελληνικά"],["hi","Hindi - हिन्दी"],["hu","Hungarian - Magyar"],["id","Indonesian - Indonesia"],["it","Italian - Italiano"],["ja","Japanese - 日本語"],["ko","Korean - 한국어"],["ms","Malay - Melayu"],["mt","Maltese - Malti"],["nb","Norwegian - Norsk Bokmål"],["pl","Polish - Polski"],["pt","Portuguese - Português"],["ro","Romanian - Română"],["ru","Russian - Русский"],["sk","Slovak - Slovenčina"],["sl","Slovenian - Slovenščina"],["es","Spanish - Español"],["sv","Swedish - Svenska"],["ta","Tamil - தமிழ்"],["te","Telugu - తెలుగు"],["th","Thai - ไทย"],["tr","Turkish - Türkçe"],["uk","Ukrainian - Українська"],["vi","Vietnamese - Tiếng Việt"]];const OPT_LANGS_LIST=OPT_LANGS_TO.map(_ref=>{let[lang]=_ref;return lang;});const OPT_LANGS_FROM=[["auto","Auto-detect"],...OPT_LANGS_TO];const OPT_LANGS_MAP=new Map(OPT_LANGS_TO);// CODE->名称 const OPT_LANGS_SPEC_NAME=new Map(OPT_LANGS_FROM.map(_ref2=>{let[key,val]=_ref2;return[key,val.split(" - ")[0]];}));const OPT_LANGS_SPEC_DEFAULT=new Map(OPT_LANGS_FROM.map(_ref3=>{let[key]=_ref3;return[key,key];}));const OPT_LANGS_SPEC_DEFAULT_UC=new Map(OPT_LANGS_FROM.map(_ref4=>{let[key]=_ref4;return[key,key.toUpperCase()];}));const OPT_LANGS_TO_SPEC={[OPT_TRANS_BUILTINAI]:new Map([...OPT_LANGS_SPEC_DEFAULT,["zh-CN","zh"],["zh-TW","zh"]]),[OPT_TRANS_GOOGLE]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_GOOGLE_2]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_MICROSOFT]:new Map([...OPT_LANGS_SPEC_DEFAULT,["auto",""],["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[OPT_TRANS_AZUREAI]:new Map([...OPT_LANGS_SPEC_DEFAULT,["auto",""],["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[OPT_TRANS_DEEPL]:new Map([...OPT_LANGS_SPEC_DEFAULT_UC,["auto",""],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLFREE]:new Map([...OPT_LANGS_SPEC_DEFAULT_UC,["auto","auto"],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLX]:new Map([...OPT_LANGS_SPEC_DEFAULT_UC,["auto","auto"],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_NIUTRANS]:new Map([...OPT_LANGS_SPEC_DEFAULT,["auto","auto"],["zh-CN","zh"],["zh-TW","cht"]]),[OPT_TRANS_VOLCENGINE]:new Map([...OPT_LANGS_SPEC_DEFAULT,["auto","auto"],["zh-CN","zh"],["zh-TW","zh-Hant"]]),[OPT_TRANS_BAIDU]:new Map([...OPT_LANGS_SPEC_DEFAULT,["zh-CN","zh"],["zh-TW","cht"],["ar","ara"],["bg","bul"],["ca","cat"],["hr","hrv"],["da","dan"],["fi","fin"],["fr","fra"],["hi","mai"],["ja","jp"],["ko","kor"],["ms","may"],["mt","mlt"],["nb","nor"],["ro","rom"],["ru","ru"],["sl","slo"],["es","spa"],["sv","swe"],["ta","tam"],["te","tel"],["uk","ukr"],["vi","vie"]]),[OPT_TRANS_TENCENT]:new Map([["auto","auto"],["zh-CN","zh"],["zh-TW","zh"],["en","en"],["ar","ar"],["de","de"],["ru","ru"],["fr","fr"],["fi","fil"],["ko","ko"],["ms","ms"],["pt","pt"],["ja","ja"],["th","th"],["tr","tr"],["es","es"],["it","it"],["hi","hi"],["id","id"],["vi","vi"]]),[OPT_TRANS_OPENAI]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_GEMINI]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_GEMINI_2]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_CLAUDE]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_OLLAMA]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_OPENROUTER]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_CLOUDFLAREAI]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_CUSTOMIZE]:OPT_LANGS_SPEC_DEFAULT};const specToCode=m=>new Map(Array.from(m.entries()).map(_ref5=>{let[k,v]=_ref5;if(v===""){return["auto","auto"];}if(v==="zh"||v==="ZH"){return[v,"zh-CN"];}return[v,k];}));// 名称->CODE const OPT_LANGS_TO_CODE={};Object.entries(OPT_LANGS_TO_SPEC).forEach(_ref6=>{let[t,m]=_ref6;OPT_LANGS_TO_CODE[t]=specToCode(m);});const defaultNobatchPrompt="You are a professional, authentic machine translation engine.";const defaultNobatchUserPrompt="Translate the following source text from ".concat(INPUT_PLACE_FROM," to ").concat(INPUT_PLACE_TO,". Output translation directly without any additional text.\n\nSource Text: ").concat(INPUT_PLACE_TEXT,"\n\nTranslated Text:");const defaultSystemPrompt="Act as a translation API. Output a single raw JSON object only. No extra text or fences.\n\nInput:\n{\"targetLanguage\":\"\",\"title\":\"\",\"description\":\"\",\"segments\":[{\"id\":1,\"text\":\"...\"}],\"glossary\":{\"sourceTerm\":\"targetTerm\"},\"tone\":\"\"}\n\nOutput:\n{\"translations\":[{\"id\":1,\"text\":\"...\",\"sourceLanguage\":\"\"}]}\n\nRules:\n1. Use title/description for context only; do not output them.\n2. Keep id, order, and count of segments.\n3. Preserve whitespace, HTML entities, and all HTML-like tags (e.g., , ). Translate inner text only.\n4. Highest priority: Follow 'glossary'. Use value for translation; if value is \"\", keep the key.\n5. Do not translate: content in ,
, text enclosed in backticks, or placeholders like {1}, {{1}}, [1], [[1]].\n6.  Apply the specified tone to the translation.\n7.  Detect sourceLanguage for each segment.\n8.  Return empty or unchanged inputs as is.\n\nExample:\nInput: {\"targetLanguage\":\"zh-CN\",\"segments\":[{\"id\":1,\"text\":\"A React component.\"}],\"glossary\":{\"component\":\"\u7EC4\u4EF6\",\"React\":\"\"}}\nOutput: {\"translations\":[{\"id\":1,\"text\":\"\u4E00\u4E2AReact\u7EC4\u4EF6\",\"sourceLanguage\":\"en\"}]}\n\nFail-safe: On any error, return {\"translations\":[]}.";// const defaultSubtitlePrompt = `Goal: Convert raw subtitle event JSON into a clean, sentence-based JSON array.
 // Output (valid JSON array, output ONLY this array):
@@ -34873,7 +34873,7 @@ customHeader:"",customBody:"",reqHook:"",// request 钩子函数
 resHook:"",// response 钩子函数
 fetchLimit:DEFAULT_FETCH_LIMIT,// 最大请求数量
 fetchInterval:DEFAULT_FETCH_INTERVAL,// 请求间隔时间
-httpTimeout:DEFAULT_HTTP_TIMEOUT*30,// 请求超时时间
+httpTimeout:DEFAULT_HTTP_TIMEOUT*3,// 请求超时时间
 batchInterval:DEFAULT_BATCH_INTERVAL,// 批处理请求间隔时间
 batchSize:DEFAULT_BATCH_SIZE,// 每次最多发送段落数量
 batchLength:DEFAULT_BATCH_LENGTH,// 每次发送最大文字数量
@@ -34886,24 +34886,31 @@ isDisabled:false,// 是否不显示,
 region:""// Azure 专用
 };const defaultApiOpts={[OPT_TRANS_BUILTINAI]:defaultApi,[OPT_TRANS_GOOGLE]:{...defaultApi,url:"https://translate.googleapis.com/translate_a/single"},[OPT_TRANS_GOOGLE_2]:{...defaultApi,url:"https://translate-pa.googleapis.com/v1/translateHtml",key:"AIzaSyATBXajvzQLTDHEQbcpq0Ihe0vWDHmO520",useBatchFetch:true},[OPT_TRANS_MICROSOFT]:{...defaultApi,useBatchFetch:true},[OPT_TRANS_AZUREAI]:{...defaultApi,url:"https://api.cognitive.microsofttranslator.com/translate?api-version=3.0",useBatchFetch:true},[OPT_TRANS_BAIDU]:{...defaultApi},[OPT_TRANS_TENCENT]:{...defaultApi,useBatchFetch:true},[OPT_TRANS_VOLCENGINE]:{...defaultApi},[OPT_TRANS_DEEPL]:{...defaultApi,url:"https://api-free.deepl.com/v2/translate",useBatchFetch:true},[OPT_TRANS_DEEPLFREE]:{...defaultApi,fetchLimit:1},[OPT_TRANS_DEEPLX]:{...defaultApi,url:"http://localhost:1188/translate"},[OPT_TRANS_NIUTRANS]:{...defaultApi,url:"https://api.niutrans.com/NiuTransServer/translation",dictNo:"",memoryNo:""},[OPT_TRANS_OPENAI]:{...defaultApi,url:"https://api.openai.com/v1/chat/completions",model:"gpt-4",useBatchFetch:true},[OPT_TRANS_GEMINI]:{...defaultApi,url:"https://generativelanguage.googleapis.com/v1/models/".concat(INPUT_PLACE_MODEL,":generateContent?key=").concat(INPUT_PLACE_KEY),model:"gemini-2.5-flash",useBatchFetch:true},[OPT_TRANS_GEMINI_2]:{...defaultApi,url:"https://generativelanguage.googleapis.com/v1beta/openai/chat/completions",model:"gemini-2.0-flash",useBatchFetch:true},[OPT_TRANS_CLAUDE]:{...defaultApi,url:"https://api.anthropic.com/v1/messages",model:"claude-3-haiku-20240307",useBatchFetch:true},[OPT_TRANS_CLOUDFLAREAI]:{...defaultApi,url:"https://api.cloudflare.com/client/v4/accounts/{{ACCOUNT_ID}}/ai/run/@cf/meta/m2m100-1.2b"},[OPT_TRANS_OLLAMA]:{...defaultApi,url:"http://localhost:11434/v1/chat/completions",model:"llama3.1",useBatchFetch:true},[OPT_TRANS_OPENROUTER]:{...defaultApi,url:"https://openrouter.ai/api/v1/chat/completions",model:"openai/gpt-4o",useBatchFetch:true},[OPT_TRANS_CUSTOMIZE]:{...defaultApi,url:"https://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN",reqHook:defaultRequestHook,resHook:defaultResponseHook}};// 内置翻译接口列表(带参数)
 const DEFAULT_API_LIST=OPT_ALL_TRANS_TYPES.map(apiType=>({...defaultApiOpts[apiType],apiSlug:apiType,apiName:apiType,apiType}));const DEFAULT_API_TYPE=OPT_TRANS_MICROSOFT;const DEFAULT_API_SETTING=DEFAULT_API_LIST.find(a=>a.apiType===DEFAULT_API_TYPE);
-;// CONCATENATED MODULE: ./src/config/rules.js
-const GLOBAL_KEY="*";const REMAIN_KEY="-";const SHADOW_KEY=">>>";const DEFAULT_COLOR="#209CEE";// 默认高亮背景色/线条颜色
-const DEFAULT_TRANS_TAG="font";const DEFAULT_SELECT_STYLE="-webkit-line-clamp: unset; max-height: none; height: auto;";const OPT_STYLE_NONE="style_none";// 无
+;// CONCATENATED MODULE: ./src/config/styles.js
+const OPT_STYLE_NONE="style_none";// 无
 const OPT_STYLE_LINE="under_line";// 下划线
 const OPT_STYLE_DOTLINE="dot_line";// 点状线
 const OPT_STYLE_DASHLINE="dash_line";// 虚线
+const OPT_STYLE_DASHLINE_BOLD="dash_line_bold";// 虚线加粗
 const OPT_STYLE_DASHBOX="dash_box";// 虚线框
+const OPT_STYLE_DASHBOX_BOLD="dash_box_bold";// 虚线框加粗
 const OPT_STYLE_WAVYLINE="wavy_line";// 波浪线
+const OPT_STYLE_WAVYLINE_BOLD="wavy_line_bold";// 波浪线加粗
+const OPT_STYLE_MARKER="marker";// 马克笔
+const OPT_STYLE_GRADIENT_MARKER="gradient_marker";// 渐变马克笔
 const OPT_STYLE_FUZZY="fuzzy";// 模糊
 const OPT_STYLE_HIGHLIGHT="highlight";// 高亮
 const OPT_STYLE_BLOCKQUOTE="blockquote";// 引用
 const OPT_STYLE_GRADIENT="gradient";// 渐变
 const OPT_STYLE_BLINK="blink";// 闪现
 const OPT_STYLE_GLOW="glow";// 发光
-const OPT_STYLE_DIY="diy_style";// 自定义样式
-const OPT_STYLE_ALL=[OPT_STYLE_NONE,OPT_STYLE_LINE,OPT_STYLE_DOTLINE,OPT_STYLE_DASHLINE,OPT_STYLE_WAVYLINE,OPT_STYLE_DASHBOX,OPT_STYLE_FUZZY,OPT_STYLE_HIGHLIGHT,OPT_STYLE_BLOCKQUOTE,OPT_STYLE_GRADIENT,OPT_STYLE_BLINK,OPT_STYLE_GLOW,OPT_STYLE_DIY];const OPT_STYLE_USE_COLOR=[OPT_STYLE_LINE,OPT_STYLE_DOTLINE,OPT_STYLE_DASHLINE,OPT_STYLE_DASHBOX,OPT_STYLE_WAVYLINE,OPT_STYLE_HIGHLIGHT,OPT_STYLE_BLOCKQUOTE];const OPT_TIMING_PAGESCROLL="mk_pagescroll";// 滚动加载翻译
+const OPT_STYLE_COLORFUL="colorful";// 多彩
+const OPT_STYLE_ALL=[OPT_STYLE_NONE,OPT_STYLE_LINE,OPT_STYLE_DOTLINE,OPT_STYLE_DASHLINE,OPT_STYLE_DASHLINE_BOLD,OPT_STYLE_WAVYLINE,OPT_STYLE_WAVYLINE_BOLD,OPT_STYLE_DASHBOX,OPT_STYLE_DASHBOX_BOLD,OPT_STYLE_MARKER,OPT_STYLE_GRADIENT_MARKER,OPT_STYLE_FUZZY,OPT_STYLE_HIGHLIGHT,OPT_STYLE_BLOCKQUOTE,OPT_STYLE_GRADIENT,OPT_STYLE_BLINK,OPT_STYLE_GLOW,OPT_STYLE_COLORFUL];const DEFAULT_CUSTOM_STYLES=[{styleSlug:"custom",styleName:"Custom Style",styleCode:"color: #209CEE;"}];
+;// CONCATENATED MODULE: ./src/config/rules.js
+const GLOBAL_KEY="*";const REMAIN_KEY="-";const SHADOW_KEY=">>>";const DEFAULT_COLOR="#209CEE";// 默认高亮背景色/线条颜色
+const DEFAULT_TRANS_TAG="font";const DEFAULT_SELECT_STYLE="-webkit-line-clamp: unset; max-height: none; height: auto;";const OPT_TIMING_PAGESCROLL="mk_pagescroll";// 滚动加载翻译
 const OPT_TIMING_PAGEOPEN="mk_pageopen";// 直接翻译到底
-const OPT_TIMING_MOUSEOVER="mk_mouseover";const OPT_TIMING_CONTROL="mk_ctrlKey";const OPT_TIMING_SHIFT="mk_shiftKey";const OPT_TIMING_ALT="mk_altKey";const OPT_TIMING_ALL=[OPT_TIMING_PAGESCROLL,OPT_TIMING_PAGEOPEN,OPT_TIMING_MOUSEOVER,OPT_TIMING_CONTROL,OPT_TIMING_SHIFT,OPT_TIMING_ALT];const OPT_SPLIT_PARAGRAPH_DISABLE="split_disable";const OPT_SPLIT_PARAGRAPH_TEXTLENGTH="split_textlength";const OPT_SPLIT_PARAGRAPH_PUNCTUATION="split_punctuation";const OPT_SPLIT_PARAGRAPH_ALL=[OPT_SPLIT_PARAGRAPH_DISABLE,OPT_SPLIT_PARAGRAPH_PUNCTUATION,OPT_SPLIT_PARAGRAPH_TEXTLENGTH];const OPT_HIGHLIGHT_WORDS_DISABLE="highlight_disable";const OPT_HIGHLIGHT_WORDS_BEFORETRANS="highlight_beforetrans";const OPT_HIGHLIGHT_WORDS_AFTERTRANS="highlight_aftertrans";const OPT_HIGHLIGHT_WORDS_ALL=[OPT_HIGHLIGHT_WORDS_DISABLE,OPT_HIGHLIGHT_WORDS_BEFORETRANS,OPT_HIGHLIGHT_WORDS_AFTERTRANS];const DEFAULT_DIY_STYLE="color: #333;\nbackground: linear-gradient(\n  45deg,\n  LightGreen 20%,\n  LightPink 20% 40%,\n  LightSalmon 40% 60%,\n  LightSeaGreen 60% 80%,\n  LightSkyBlue 80%\n);\n&:hover {\n  color: #111;\n};";const DEFAULT_SELECTOR="h1, h2, h3, h4, h5, h6, li, p, dd, blockquote, figcaption, label, legend";const DEFAULT_IGNORE_SELECTOR="button, footer, pre, mark, nav";const DEFAULT_KEEP_SELECTOR="code, cite, math, .math, a:has(code)";const DEFAULT_RULE={pattern:"",// 匹配网址
+const OPT_TIMING_MOUSEOVER="mk_mouseover";const OPT_TIMING_CONTROL="mk_ctrlKey";const OPT_TIMING_SHIFT="mk_shiftKey";const OPT_TIMING_ALT="mk_altKey";const OPT_TIMING_ALL=[OPT_TIMING_PAGESCROLL,OPT_TIMING_PAGEOPEN,OPT_TIMING_MOUSEOVER,OPT_TIMING_CONTROL,OPT_TIMING_SHIFT,OPT_TIMING_ALT];const OPT_SPLIT_PARAGRAPH_DISABLE="split_disable";const OPT_SPLIT_PARAGRAPH_TEXTLENGTH="split_textlength";const OPT_SPLIT_PARAGRAPH_PUNCTUATION="split_punctuation";const OPT_SPLIT_PARAGRAPH_ALL=[OPT_SPLIT_PARAGRAPH_DISABLE,OPT_SPLIT_PARAGRAPH_PUNCTUATION,OPT_SPLIT_PARAGRAPH_TEXTLENGTH];const OPT_HIGHLIGHT_WORDS_DISABLE="highlight_disable";const OPT_HIGHLIGHT_WORDS_BEFORETRANS="highlight_beforetrans";const OPT_HIGHLIGHT_WORDS_AFTERTRANS="highlight_aftertrans";const OPT_HIGHLIGHT_WORDS_ALL=[OPT_HIGHLIGHT_WORDS_DISABLE,OPT_HIGHLIGHT_WORDS_BEFORETRANS,OPT_HIGHLIGHT_WORDS_AFTERTRANS];const DEFAULT_SELECTOR="h1, h2, h3, h4, h5, h6, li, p, dd, blockquote, figcaption, label, legend";const DEFAULT_IGNORE_SELECTOR="button, footer, pre, mark, nav";const DEFAULT_KEEP_SELECTOR="code, cite, math, .math, a:has(code)";const DEFAULT_RULE={pattern:"",// 匹配网址
 selector:"",// 选择器
 keepSelector:"",// 保留元素选择器
 terms:"",// 专业术语
@@ -34913,8 +34920,9 @@ fromLang:GLOBAL_KEY,// 源语言
 toLang:GLOBAL_KEY,// 目标语言
 textStyle:GLOBAL_KEY,// 译文样式
 transOpen:GLOBAL_KEY,// 开启翻译
-bgColor:"",// 译文颜色
-textDiyStyle:"",// 自定义译文样式
+// bgColor: "", // 译文颜色 (作废)
+// textDiyStyle: "", // 自定义译文样式 (作废)
+textExtStyle:"",// 译文附加样式
 termsStyle:"",// 专业术语样式
 highlightStyle:"",// 高亮词汇样式
 selectStyle:"",// 选择器节点样式
@@ -34953,8 +34961,9 @@ fromLang:"auto",// 源语言
 toLang:"zh-CN",// 目标语言
 textStyle:OPT_STYLE_NONE,// 译文样式
 transOpen:"false",// 开启翻译
-bgColor:"",// 译文颜色
-textDiyStyle:DEFAULT_DIY_STYLE,// 自定义译文样式
+// bgColor: DEFAULT_COLOR, // 译文颜色 (作废)
+// textDiyStyle: DEFAULT_DIY_STYLE, // 自定义译文样式 (作废)
+textExtStyle:"",// 译文附加样式
 termsStyle:"font-weight: bold;",// 专业术语样式
 highlightStyle:"color: red;",// 高亮词汇样式
 selectStyle:DEFAULT_SELECT_STYLE,// 选择器节点样式
@@ -34982,11 +34991,11 @@ ignoreSelector:DEFAULT_IGNORE_SELECTOR,// 不翻译的选择器
 splitParagraph:OPT_SPLIT_PARAGRAPH_DISABLE,// 切分段落
 splitLength:100,// 切分段落长度
 highlightWords:OPT_HIGHLIGHT_WORDS_DISABLE// 高亮词汇
-};const DEFAULT_RULES=[GLOBLA_RULE];const DEFAULT_OW_RULE={apiSlug:REMAIN_KEY,fromLang:REMAIN_KEY,toLang:REMAIN_KEY,textStyle:REMAIN_KEY,transOpen:REMAIN_KEY,bgColor:"",textDiyStyle:DEFAULT_DIY_STYLE};// todo: 校验几个内置规则
+};const DEFAULT_RULES=[GLOBLA_RULE];// todo: 校验几个内置规则
 const RULES_MAP={// "www.google.com/search": {
 //   rootsSelector: `#rcnt`,
 // },
-"en.wikipedia.org":{ignoreSelector:".button, code, footer, form, mark, pre, .mwe-math-element, .mw-editsection"},"news.ycombinator.com":{selector:"p, .titleline, .commtext, .hn-item-title, .hn-comment-text, .hn-story-title",keepSelector:"code, img, svg, pre, .sitebit",ignoreSelector:"button, code, footer, form, header, mark, nav, pre, .reply",autoScan:"false"},"twitter.com, https://x.com":{selector:"[data-testid='tweetText']",keepSelector:"img, svg, a, span:has(a), div:has(a)",ignoreSelector:"button, [data-testid='videoPlayer'], [role='group']",autoScan:"false"},"www.youtube.com/live_chat":{rootsSelector:"div#items",selector:"span.yt-live-chat-text-message-renderer",autoScan:"false"},"www.youtube.com":{rootsSelector:"ytd-page-manager",ignoreSelector:"aside, button, footer, form, header, pre, mark, nav, #player, #container, .caption-window, .ytp-settings-menu"},"web.telegram.org":{autoScan:"false",selector:".text-content, .embedded-text-wrapper",rootsSelector:".Transition"}};const BUILTIN_RULES=Object.entries(RULES_MAP).map(_ref=>{let[pattern,rule]=_ref;return{// ...DEFAULT_RULE,
+"en.wikipedia.org":{ignoreSelector:".button, code, footer, form, mark, pre, .mwe-math-element, .mw-editsection"},"news.ycombinator.com":{selector:"p, .titleline, .commtext, .hn-item-title, .hn-comment-text, .hn-story-title",keepSelector:"code, img, svg, pre, .sitebit",ignoreSelector:"button, code, footer, form, header, mark, nav, pre, .reply",autoScan:"false"},"twitter.com, https://x.com":{selector:"[data-testid='tweetText'], [data-testid='twitter-article-title'], .public-DraftStyleDefault-block",keepSelector:"img, svg, a, span:has(a), div:has(a)",ignoreSelector:"button, [data-testid='videoPlayer'], [role='group']",autoScan:"false"},"www.youtube.com/live_chat":{rootsSelector:"div#items",selector:"span.yt-live-chat-text-message-renderer",autoScan:"false"},"www.youtube.com":{rootsSelector:"ytd-page-manager",ignoreSelector:"aside, button, footer, form, header, pre, mark, nav, #player, #container, .caption-window, .ytp-settings-menu"},"web.telegram.org":{autoScan:"false",selector:".text-content, .embedded-text-wrapper",rootsSelector:".Transition"}};const BUILTIN_RULES=Object.entries(RULES_MAP).map(_ref=>{let[pattern,rule]=_ref;return{// ...DEFAULT_RULE,
 ...rule,pattern};});
 ;// CONCATENATED MODULE: ./src/libs/log.js
 // 定义日志级别
@@ -35058,7 +35067,7 @@ triggerMode:OPT_TRANBOX_TRIGGER_CLICK,// 触发翻译方式
 // extStyles: "", // 附加样式
 enDict:OPT_DICT_BING,// 英文词典
 enSug:OPT_SUG_YOUDAO// 英文建议
-};const SUBTITLE_WINDOW_STYLE="padding: 0.5em 1em;\nbackground-color: rgba(0, 0, 0, 0.5);\ncolor: white;\nline-height: 1.3;\ntext-shadow: 1px 1px 2px black;\ndisplay: inline-block";const SUBTITLE_ORIGIN_STYLE="font-size: clamp(1.5rem, 3cqw, 3rem);";const SUBTITLE_TRANSLATION_STYLE="font-size: clamp(1.5rem, 3cqw, 3rem);";const DEFAULT_SUBTITLE_SETTING={enabled:true,// 是否开启
+};const SUBTITLE_WINDOW_STYLE="padding: 0.5em 1em;\nbackground-color: rgba(0, 0, 0, 0.5);\ncolor: white;\nline-height: 1.3;\ntext-shadow: 1px 1px 2px black;\ndisplay: inline-block";const SUBTITLE_ORIGIN_STYLE="font-size: clamp(1rem, 2cqw, 3rem);";const SUBTITLE_TRANSLATION_STYLE="font-size: clamp(1rem, 2cqw, 3rem);";const DEFAULT_SUBTITLE_SETTING={enabled:true,// 是否开启
 apiSlug:OPT_TRANS_MICROSOFT,segSlug:"-",// AI智能断句
 chunkLength:1000,// AI处理切割长度
 // fromLang: "en",
@@ -35105,10 +35114,11 @@ preInit:true,// 是否预加载脚本
 transAllnow:false,// 是否立即全部翻译
 subtitleSetting:DEFAULT_SUBTITLE_SETTING,// 字幕设置
 logLevel:LogLevel.INFO.value,// 日志级别
-rootMargin:500// 提前触发翻译
+rootMargin:500,// 提前触发翻译
+customStyles:DEFAULT_CUSTOM_STYLES// 自定义样式列表
 };
 ;// CONCATENATED MODULE: ./src/config/i18n.js
-const UI_LANGS=(/* unused pure expression or super */ null && ([["en","English"],["zh","简体中文"],["zh_TW","繁體中文"]]));const customApiLangs="[\"en\", \"English - English\"],\n[\"zh-CN\", \"Simplified Chinese - \u7B80\u4F53\u4E2D\u6587\"],\n[\"zh-TW\", \"Traditional Chinese - \u7E41\u9AD4\u4E2D\u6587\"],\n[\"ar\", \"Arabic - \u0627\u0644\u0639\u0631\u0628\u064A\u0629\"],\n[\"bg\", \"Bulgarian - \u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438\"],\n[\"ca\", \"Catalan - Catal\xE0\"],\n[\"hr\", \"Croatian - Hrvatski\"],\n[\"cs\", \"Czech - \u010Ce\u0161tina\"],\n[\"da\", \"Danish - Dansk\"],\n[\"nl\", \"Dutch - Nederlands\"],\n[\"fi\", \"Finnish - Suomi\"],\n[\"fr\", \"French - Fran\xE7ais\"],\n[\"de\", \"German - Deutsch\"],\n[\"el\", \"Greek - \u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC\"],\n[\"hi\", \"Hindi - \u0939\u093F\u0928\u094D\u0926\u0940\"],\n[\"hu\", \"Hungarian - Magyar\"],\n[\"id\", \"Indonesian - Indonesia\"],\n[\"it\", \"Italian - Italiano\"],\n[\"ja\", \"Japanese - \u65E5\u672C\u8A9E\"],\n[\"ko\", \"Korean - \uD55C\uAD6D\uC5B4\"],\n[\"ms\", \"Malay - Melayu\"],\n[\"mt\", \"Maltese - Malti\"],\n[\"nb\", \"Norwegian - Norsk Bokm\xE5l\"],\n[\"pl\", \"Polish - Polski\"],\n[\"pt\", \"Portuguese - Portugu\xEAs\"],\n[\"ro\", \"Romanian - Rom\xE2n\u0103\"],\n[\"ru\", \"Russian - \u0420\u0443\u0441\u0441\u043A\u0438\u0439\"],\n[\"sk\", \"Slovak - Sloven\u010Dina\"],\n[\"sl\", \"Slovenian - Sloven\u0161\u010Dina\"],\n[\"es\", \"Spanish - Espa\xF1ol\"],\n[\"sv\", \"Swedish - Svenska\"],\n[\"ta\", \"Tamil - \u0BA4\u0BAE\u0BBF\u0BB4\u0BCD\"],\n[\"te\", \"Telugu - \u0C24\u0C46\u0C32\u0C41\u0C17\u0C41\"],\n[\"th\", \"Thai - \u0E44\u0E17\u0E22\"],\n[\"tr\", \"Turkish - T\xFCrk\xE7e\"],\n[\"uk\", \"Ukrainian - \u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430\"],\n[\"vi\", \"Vietnamese - Ti\u1EBFng Vi\u1EC7t\"],\n";const customApiHelpZH="// \u8BF7\u6C42\u6570\u636E\u9ED8\u8BA4\u683C\u5F0F\n{\n  \"url\": \"{{url}}\",\n  \"method\": \"POST\",\n  \"headers\": {\n    \"Content-type\": \"application/json\",\n    \"Authorization\": \"Bearer {{key}}\"\n  },\n  \"body\": {\n    \"text\": \"{{text}}\", // \u5F85\u7FFB\u8BD1\u6587\u5B57\n    \"from\": \"{{from}}\", // \u6587\u5B57\u7684\u8BED\u8A00\uFF08\u53EF\u80FD\u4E3A\u7A7A\uFF09\n    \"to\": \"{{to}}\",     // \u76EE\u6807\u8BED\u8A00\n  },\n}\n\n\n// \u8FD4\u56DE\u6570\u636E\u9ED8\u8BA4\u683C\u5F0F\n{\n  text: \"\", // \u7FFB\u8BD1\u540E\u7684\u6587\u5B57\n  from: \"\", // \u8BC6\u522B\u7684\u6E90\u8BED\u8A00\n  to: \"\",   // \u76EE\u6807\u8BED\u8A00\uFF08\u53EF\u9009\uFF09\n}\n\n\n// Hook \u8303\u4F8B\n// URL\nhttps://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN\n\n// Request Hook\n(text, from, to, url, key) => [url, {\n  headers: {\n      \"Content-type\": \"application/json\",\n  },\n  method: \"GET\",\n  body: null,\n}]\n\n// Response Hook\n// \u5176\u4E2D\u8FD4\u56DE\u6570\u7EC4\u7B2C\u4E00\u4E2A\u503C\u8868\u793A\u8BD1\u6587\u5B57\u7B26\u4E32\uFF0C\u7B2C\u4E8C\u4E2A\u503C\u4E3A\u5E03\u5C14\u503C\uFF0C\u8868\u793A\u539F\u6587\u8BED\u8A00\u4E0E\u76EE\u6807\u8BED\u8A00\u662F\u5426\u76F8\u540C\n(res, text, from, to) => [res.sentences.map((item) => item.trans).join(\" \"), to === res.src]\n\n\n// \u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u5982\u4E0B\n".concat(customApiLangs,"\n");const customApiHelpEN="// Default request\n{\n  \"url\": \"{{url}}\",\n  \"method\": \"POST\",\n  \"headers\": {\n    \"Content-type\": \"application/json\",\n    \"Authorization\": \"Bearer {{key}}\"\n  },\n  \"body\": {\n    \"text\": \"{{text}}\", // Text to be translated\n    \"from\": \"{{from}}\", // The language of the text (may be empty)\n    \"to\": \"{{to}}\",     // Target language\n  },\n}\n\n\n// Default response\n{\n  text: \"\", // translated text\n  from: \"\", // Recognized source language\n  to: \"\",   // Target language (optional)\n}\n\n\n/// Hook Example\n// URL\nhttps://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN\n\n// Request Hook\n(text, from, to, url, key) => [url, {\n  headers: {\n      \"Content-type\": \"application/json\",\n  },\n  method: \"GET\",\n  body: null,\n}]\n\n// Response Hook\n// In the returned array, the first value is the translated string, while the second value is a boolean\n// that indicates whether the source language is the same as the target language.\n(res, text, from, to) => [res.sentences.map((item) => item.trans).join(\" \"), to === res.src]\n\n\n// The supported language codes are as follows\n".concat(customApiLangs,"\n");const requestHookHelperZH="1\u3001\u7B2C\u4E00\u4E2A\u53C2\u6570\u5305\u542B\u5982\u4E0B\u5B57\u6BB5\uFF1A'texts', 'from', 'to', 'url', 'key', 'model', 'systemPrompt', ...\n2\u3001\u8FD4\u56DE\u503C\u5FC5\u987B\u662F\u5305\u542B\u4EE5\u4E0B\u5B57\u6BB5\u7684\u5BF9\u8C61\uFF1A 'url', 'body', 'headers', 'method'\n3\u3001\u5982\u8FD4\u56DE\u7A7A\u503C\uFF0C\u5219hook\u51FD\u6570\u4E0D\u4F1A\u4EA7\u751F\u4EFB\u4F55\u6548\u679C\u3002\n\n// \u793A\u4F8B\nasync (args, { url, body, headers, userMsg, method } = {}) => {\n  return { url, body, headers, userMsg, method };\n}";const requestHookHelperEN="1. The first parameter contains the following fields: 'texts', 'from', 'to', 'url', 'key', 'model', 'systemPrompt', ...\n2. The return value must be an object containing the following fields: 'url', 'body', 'headers', 'method'\n3. If a null value is returned, the hook function will have no effect.\n\n// Example\nasync (args, { url, body, headers, userMsg, method } = {}) => {\n  return { url, body, headers, userMsg, method };\n}";const responsetHookHelperZH="1\u3001\u7B2C\u4E00\u4E2A\u53C2\u6570\u5305\u542B\u5982\u4E0B\u5B57\u6BB5\uFF1A'res', ...\n2\u3001\u8FD4\u56DE\u503C\u5FC5\u987B\u662F\u5305\u542B\u4EE5\u4E0B\u5B57\u6BB5\u7684\u5BF9\u8C61\uFF1A 'translations'\n  \uFF08'translations' \u5E94\u4E3A\u4E00\u4E2A\u4E8C\u7EF4\u6570\u7EC4\uFF1A[[\u8BD1\u6587, \u539F\u6587\u8BED\u8A00]]\uFF09\n3\u3001\u5982\u8FD4\u56DE\u7A7A\u503C\uFF0C\u5219hook\u51FD\u6570\u4E0D\u4F1A\u4EA7\u751F\u4EFB\u4F55\u6548\u679C\u3002\n\n// \u793A\u4F8B\nasync ({ res, ...args }) => {\n  const translations = [[\"\u4F60\u597D\", \"en\"]];\n  const modelMsg = {}; // \u7528\u4E8EAI\u4E0A\u4E0B\u6587\n  return { translations, modelMsg };\n}";const responsetHookHelperEN="1. The first parameter contains the following fields: 'res', ...\n2. The return value must be an object containing the following fields: 'translations'\n  ('translations' should be a two-dimensional array: [[translation, source language]]).\n3. If a null value is returned, the hook function will have no effect.\n\n// Example\nasync ({ res, ...args }) => {\n  const translations = [[\"\u4F60\u597D\", \"en\"]];\n  const modelMsg = {}; // For AI context\n  return { translations, modelMsg };\n}";const I18N={app_name:{zh:"\u7B80\u7EA6\u7FFB\u8BD1",en:"KISS Translator",zh_TW:"\u7C21\u7D04\u7FFB\u8B6F"},translate:{zh:"\u7FFB\u8BD1",en:"Translate",zh_TW:"\u7FFB\u8B6F"},custom_api_help:{zh:customApiHelpZH,en:customApiHelpEN,zh_TW:customApiHelpZH},request_hook_helper:{zh:requestHookHelperZH,en:requestHookHelperEN,zh_TW:requestHookHelperZH},response_hook_helper:{zh:responsetHookHelperZH,en:responsetHookHelperEN,zh_TW:responsetHookHelperZH},translate_alt:{zh:"\u7FFB\u8BD1",en:"Translate",zh_TW:"\u7FFB\u8B6F"},basic_setting:{zh:"\u57FA\u672C\u8BBE\u7F6E",en:"Basic Setting",zh_TW:"\u57FA\u672C\u8A2D\u5B9A"},rules_setting:{zh:"\u89C4\u5219\u8BBE\u7F6E",en:"Rules Setting",zh_TW:"\u898F\u5247\u8A2D\u5B9A"},apis_setting:{zh:"\u63A5\u53E3\u8BBE\u7F6E",en:"Apis Setting",zh_TW:"API\u8A2D\u5B9A"},sync_setting:{zh:"\u540C\u6B65\u8BBE\u7F6E",en:"Sync Setting",zh_TW:"\u540C\u6B65\u8A2D\u5B9A"},patch_setting:{zh:"\u8865\u4E01\u8BBE\u7F6E",en:"Patch Setting",zh_TW:"\u4FEE\u88DC\u8A2D\u5B9A"},patch_setting_help:{zh:"\u9488\u5BF9\u4E00\u4E9B\u7279\u6B8A\u7F51\u7AD9\u7684\u4FEE\u6B63\u811A\u672C\uFF0C\u4EE5\u4FBF\u7FFB\u8BD1\u8F6F\u4EF6\u5F97\u5230\u66F4\u597D\u7684\u5C55\u793A\u6548\u679C\u3002",en:"Corrected scripts for some special websites so that the translation software can get better display results.",zh_TW:"\u91DD\u5C0D\u67D0\u4E9B\u7279\u6B8A\u7DB2\u7AD9\u7684\u4FEE\u6B63\u8173\u672C\uFF0C\u8B93\u7FFB\u8B6F\u8EDF\u9AD4\u6709\u66F4\u597D\u7684\u986F\u793A\u6548\u679C\u3002"},inject_webfix:{zh:"\u6CE8\u5165\u4FEE\u590D\u8865\u4E01",en:"Inject Webfix",zh_TW:"\u6CE8\u5165\u4FEE\u6B63\u88DC\u4E01"},about:{zh:"\u5173\u4E8E",en:"About",zh_TW:"\u95DC\u65BC"},about_md:{zh:"README.md",en:"README.en.md",zh_TW:"README.md"},about_md_local:{zh:"\u8BF7 [\u70B9\u51FB\u8FD9\u91CC](".concat("https://github.com/fishjar/kiss-translator",") \u67E5\u770B\u8BE6\u60C5\u3002"),en:"Please [click here](".concat("https://github.com/fishjar/kiss-translator",") for details."),zh_TW:"\u8ACB\u3010\u9EDE\u9019\u88E1\u3011\u67E5\u770B\u8A73\u7D30\u5167\u5BB9\u3002"},ui_lang:{zh:"\u754C\u9762\u8BED\u8A00",en:"Interface Language",zh_TW:"\u4ECB\u9762\u8A9E\u8A00"},fetch_limit:{zh:"\u6700\u5927\u5E76\u53D1\u8BF7\u6C42\u6570\u91CF (1-100)",en:"Maximum Number Of Concurrent Requests (1-100)",zh_TW:"\u6700\u5927\u540C\u6642\u8ACB\u6C42\u6578\u91CF (1-100)"},if_think:{zh:"\u542F\u7528\u6216\u7981\u7528\u6A21\u578B\u7684\u6DF1\u5EA6\u601D\u8003\u80FD\u529B",en:"Enable or disable the model\u2019s thinking behavior ",zh_TW:"\u555F\u7528\u6216\u505C\u7528\u6A21\u578B\u7684\u6DF1\u5EA6\u601D\u8003\u80FD\u529B"},think:{zh:"\u542F\u7528\u6DF1\u5EA6\u601D\u8003",en:"enable thinking",zh_TW:"\u555F\u7528\u6DF1\u5EA6\u601D\u8003"},nothink:{zh:"\u7981\u7528\u6DF1\u5EA6\u601D\u8003",en:"disable thinking",zh_TW:"\u505C\u7528\u6DF1\u5EA6\u601D\u8003"},think_ignore:{zh:"\u5FFD\u7565\u4EE5\u4E0B\u6A21\u578B\u7684\u8F93\u51FA,\u9017\u53F7(,)\u5206\u5272,\u5F53\u6A21\u578B\u652F\u6301\u601D\u8003\u4F46ollama\u4E0D\u652F\u6301\u65F6\u9700\u8981\u586B\u5199\u672C\u53C2\u6570",en:"Ignore the  block for the following models, comma (,) separated",zh_TW:"\u5FFD\u7565\u4EE5\u4E0B\u6A21\u578B\u7684  \u8F38\u51FA\uFF0C\u4EE5\u9017\u865F (,) \u5206\u9694\uFF1B\u7576\u6A21\u578B\u652F\u63F4\u601D\u8003\u4F46 ollama \u4E0D\u652F\u63F4\u6642\u9700\u8981\u586B\u5BEB\u6B64\u53C3\u6578"},fetch_interval:{zh:"\u6BCF\u6B21\u8BF7\u6C42\u95F4\u9694\u65F6\u95F4 (0-5000ms)",en:"Time Between Requests (0-5000ms)",zh_TW:"\u6BCF\u6B21\u8ACB\u6C42\u9593\u9694\u6642\u9593 (0-5000ms)"},translate_interval:{zh:"\u7FFB\u8BD1\u95F4\u9694\u65F6\u95F4 (10-2000ms)",en:"Translation Interval (10-2000ms)",zh_TW:"\u7FFB\u8B6F\u9593\u9694\u6642\u9593 (10-2000ms)"},http_timeout:{zh:"\u8BF7\u6C42\u8D85\u65F6\u65F6\u95F4 (5000-60000ms)",en:"Request Timeout Time (5000-60000ms)",zh_TW:"\u8ACB\u6C42\u903E\u6642\u6642\u9593 (5000-60000ms)"},custom_header:{zh:"\u81EA\u5B9A\u4E49Header\u53C2\u6570",en:"Custom Header Params"},custom_header_help:{zh:"\u4F7F\u7528JSON\u683C\u5F0F\uFF0C\u4F8B\u5982 \"User-Agent\": \"Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0\"",en:"Use JSON format, for example \"User-Agent\": \"Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0\""},custom_body:{zh:"\u81EA\u5B9A\u4E49Body\u53C2\u6570",en:"Custom Body Params"},custom_body_help:{zh:"\u4F7F\u7528JSON\u683C\u5F0F\uFF0C\u4F8B\u5982 \"top_p\": 0.7",en:"Use JSON format, for example \"top_p\": 0.7"},min_translate_length:{zh:"\u6700\u5C0F\u7FFB\u8BD1\u5B57\u7B26\u6570 (1-100)",en:"Minimum number Of Translated Characters (1-100)",zh_TW:"\u6700\u5C0F\u7FFB\u8B6F\u5B57\u5143\u6578 (1-100)"},max_translate_length:{zh:"\u6700\u5927\u7FFB\u8BD1\u5B57\u7B26\u6570 (100-100000)",en:"Maximum number Of Translated Characters (100-100000)",zh_TW:"\u6700\u5927\u7FFB\u8B6F\u5B57\u5143\u6578 (100-100000)"},num_of_newline_characters:{zh:"\u6362\u884C\u5B57\u7B26\u6570 (1-1000)",en:"Number of Newline Characters (1-1000)",zh_TW:"\u63DB\u884C\u5B57\u5143\u6578 (1-1000)"},translate_service:{zh:"\u7FFB\u8BD1\u670D\u52A1",en:"Translate Service",zh_TW:"\u7FFB\u8B6F\u670D\u52D9"},translate_service_multiple:{zh:"\u7FFB\u8BD1\u670D\u52A1 (\u652F\u6301\u591A\u9009)",en:"Translation service (multiple supported)",zh_TW:"\u7FFB\u8B6F\u670D\u52D9 (\u652F\u63F4\u591A\u9078)"},translate_timing:{zh:"\u7FFB\u8BD1\u65F6\u673A",en:"Translate Timing",zh_TW:"\u7FFB\u8B6F\u6642\u6A5F"},mk_pagescroll:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u7FFB\u8BD1\uFF08\u63A8\u8350\uFF09",en:"Rolling Loading (Suggested)",zh_TW:"\u6EFE\u52D5\u8F09\u5165\u7FFB\u8B6F\uFF08\u5EFA\u8B70\uFF09"},mk_pageopen:{zh:"\u7ACB\u5373\u5168\u90E8\u7FFB\u8BD1",en:"Translate all now",zh_TW:"\u7ACB\u5373\u5168\u90E8\u7FFB\u8B6F"},mk_mouseover:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},mk_ctrlKey:{zh:"Control + \u9F20\u6807\u60AC\u505C",en:"Control + Mouseover",zh_TW:"Control + \u6ED1\u9F20\u61F8\u505C"},mk_shiftKey:{zh:"Shift + \u9F20\u6807\u60AC\u505C",en:"Shift + Mouseover",zh_TW:"Shift + \u6ED1\u9F20\u61F8\u505C"},mk_altKey:{zh:"Alt + \u9F20\u6807\u60AC\u505C",en:"Alt + Mouseover",zh_TW:"Alt + \u6ED1\u9F20\u61F8\u505C"},from_lang:{zh:"\u539F\u6587\u8BED\u8A00",en:"Source Language",zh_TW:"\u539F\u6587\u8A9E\u8A00"},to_lang:{zh:"\u76EE\u6807\u8BED\u8A00",en:"Target Language",zh_TW:"\u76EE\u6A19\u8A9E\u8A00"},to_lang2:{zh:"\u7B2C\u4E8C\u76EE\u6807\u8BED\u8A00",en:"Target Language 2",zh_TW:"\u7B2C\u4E8C\u76EE\u6A19\u8A9E\u8A00"},to_lang2_helper:{zh:"\u8BBE\u5B9A\u540E\uFF0C\u4E0E\u76EE\u6807\u8BED\u8A00\u4EA7\u751F\u4E92\u8BD1\u6548\u679C\uFF0C\u4F46\u4F9D\u8D56\u8FDC\u7A0B\u8BED\u8A00\u8BC6\u522B\u3002",en:"After setting, it will produce mutual translation effect with the target language, but it relies on remote language recognition.",zh_TW:"\u8A2D\u5B9A\u5F8C\u6703\u8207\u76EE\u6A19\u8A9E\u8A00\u4E92\u8B6F\uFF0C\u4F46\u4F9D\u8CF4\u9060\u7AEF\u8A9E\u8A00\u8B58\u5225\u3002"},text_style:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},text_style_alt:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},bg_color:{zh:"\u6837\u5F0F\u989C\u8272",en:"Style Color",zh_TW:"\u6A23\u5F0F\u984F\u8272"},remain_unchanged:{zh:"\u4FDD\u7559\u4E0D\u53D8",en:"Remain Unchanged",zh_TW:"\u4FDD\u7559\u4E0D\u8B8A"},google_api:{zh:"\u8C37\u6B4C\u7FFB\u8BD1\u63A5\u53E3",en:"Google Translate API",zh_TW:"Google \u7FFB\u8B6F\u4ECB\u9762"},default_selector:{zh:"\u9ED8\u8BA4\u9009\u62E9\u5668",en:"Default selector",zh_TW:"\u9810\u8A2D\u9078\u64C7\u5668"},selector_rules:{zh:"\u9009\u62E9\u5668\u89C4\u5219",en:"Selector Rules",zh_TW:"\u9078\u64C7\u5668\u898F\u5247"},save:{zh:"\u4FDD\u5B58",en:"Save",zh_TW:"\u5132\u5B58"},edit:{zh:"\u7F16\u8F91",en:"Edit",zh_TW:"\u7DE8\u8F2F"},cancel:{zh:"\u53D6\u6D88",en:"Cancel",zh_TW:"\u53D6\u6D88"},delete:{zh:"\u5220\u9664",en:"Delete",zh_TW:"\u522A\u9664"},reset:{zh:"\u91CD\u7F6E",en:"Reset",zh_TW:"\u91CD\u8A2D"},add:{zh:"\u6DFB\u52A0",en:"Add",zh_TW:"\u65B0\u589E"},inject_rules:{zh:"\u6CE8\u5165\u8BA2\u9605\u89C4\u5219",en:"Inject Subscribe Rules",zh_TW:"\u6CE8\u5165\u8A02\u95B1\u898F\u5247"},personal_rules:{zh:"\u4E2A\u4EBA\u89C4\u5219",en:"Rules",zh_TW:"\u500B\u4EBA\u898F\u5247"},subscribe_rules:{zh:"\u8BA2\u9605\u89C4\u5219",en:"Subscribe",zh_TW:"\u8A02\u95B1\u898F\u5247"},overwrite_subscribe_rules:{zh:"\u8986\u5199\u8BA2\u9605\u89C4\u5219",en:"Overwrite",zh_TW:"\u8986\u5BEB\u8A02\u95B1\u898F\u5247"},subscribe_url:{zh:"\u8BA2\u9605\u5730\u5740",en:"Subscribe URL",zh_TW:"\u8A02\u95B1\u7DB2\u5740"},rules_warn_1:{zh:"1\u3001\u89C4\u5219\u751F\u6548\u7684\u4F18\u5148\u7EA7\u4F9D\u6B21\u4E3A\uFF1A\u4E2A\u4EBA\u89C4\u5219 > \u8BA2\u9605\u89C4\u5219 > \u5168\u5C40\u89C4\u5219\u3002\"\u5168\u5C40\u89C4\u5219\"\u76F8\u5F53\u4E8E\u515C\u5E95\u89C4\u5219\u3002",en:"1. The priority of rules is: personal rules > subscription rules > global rules. \"Global rules\" are like a fallback rule.",zh_TW:"1.\u898F\u5247\u751F\u6548\u7684\u512A\u5148\u9806\u5E8F\u4F9D\u5E8F\u70BA\uFF1A\u500B\u4EBA\u898F\u5247 > \u8A02\u95B1\u898F\u5247 > \u5168\u57DF\u898F\u5247\u3002 \"\u5168\u57DF\u898F\u5247\"\u76F8\u7576\u65BC\u515C\u5E95\u898F\u5247\u3002"},rules_warn_2:{zh:"2\u3001\u201C\u8BA2\u9605\u89C4\u5219\u201D\u9009\u62E9\u6CE8\u5165\u540E\u624D\u4F1A\u751F\u6548\u3002",en:"2. \"Subscription rules\" will take effect only after injection is selected.",zh_TW:"2\u3001\u300C\u8A02\u95B1\u898F\u5247\u300D\u9078\u64C7\u6CE8\u5165\u5F8C\u624D\u6703\u751F\u6548\u3002"},rules_warn_3:{zh:"3\u3001\u5173\u4E8E\u89C4\u5219\u586B\u5199\uFF1A\u8F93\u5165\u6846\u7559\u7A7A\u6216\u4E0B\u62C9\u6846\u9009\u201C*\u201D\u8868\u793A\u91C7\u7528\u5168\u5C40\u89C4\u5219\u3002",en:"3. Regarding filling in the rules: Leave the input box blank or select \"*\" in the drop-down box to use global rule.",zh_TW:"3. \u898F\u5247\u586B\u5BEB\u8AAA\u660E\uFF1A\u8F38\u5165\u6846\u7559\u7A7A\u6216\u4E0B\u62C9\u9078\u64C7\u300C*\u300D\u8868\u793A\u4F7F\u7528\u5168\u57DF\u898F\u5247\u3002"},sync_warn:{zh:"\u6D89\u53CA\u9690\u79C1\u6570\u636E\u7684\u540C\u6B65\u8BF7\u8C28\u614E\u9009\u62E9\u7B2C\u4E09\u65B9\u540C\u6B65\u670D\u52A1\uFF0C\u5EFA\u8BAE\u81EA\u884C\u642D\u5EFA kiss-worker \u6216 WebDAV \u670D\u52A1\u3002",en:"When synchronizing data that involves privacy, please be cautious about choosing third-party sync services. It is recommended to set up your own sync service using kiss-worker or WebDAV.",zh_TW:"\u540C\u6B65\u6D89\u53CA\u96B1\u79C1\u8CC7\u6599\u6642\uFF0C\u8ACB\u8B39\u614E\u9078\u64C7\u7B2C\u4E09\u65B9\u540C\u6B65\u670D\u52D9\uFF1B\u5EFA\u8B70\u81EA\u5EFA kiss-worker \u6216 WebDAV \u670D\u52D9\u3002"},sync_warn_2:{zh:"\u5982\u679C\u670D\u52A1\u5668\u5B58\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u540C\u6B65\u7684\u6570\u636E\uFF0C\u7B2C\u4E00\u6B21\u540C\u6B65\u5C06\u76F4\u63A5\u8986\u76D6\u672C\u5730\u914D\u7F6E\uFF0C\u540E\u9762\u5219\u6839\u636E\u4FEE\u6539\u65F6\u95F4\uFF0C\u65B0\u7684\u8986\u76D6\u65E7\u7684\u3002",en:"If the server has data synchronized by other clients, the first synchronization will directly overwrite the local configuration, and later, according to the modification time, the new one will overwrite the old one.",zh_TW:"\u82E5\u4F3A\u670D\u5668\u4E0A\u5B58\u5728\u5176\u4ED6\u7528\u6236\u7AEF\u540C\u6B65\u7684\u8CC7\u6599\uFF0C\u7B2C\u4E00\u6B21\u540C\u6B65\u6703\u76F4\u63A5\u8986\u84CB\u672C\u6A5F\u8A2D\u5B9A\uFF1B\u4E4B\u5F8C\u5247\u4F9D\u4FEE\u6539\u6642\u9593\uFF0C\u7531\u65B0\u7684\u8986\u84CB\u820A\u7684\u3002"},about_sync_api:{zh:"\u81EA\u5EFAkiss-wroker\u6570\u636E\u540C\u6B65\u670D\u52A1",en:"Self-hosting a Kiss-worker data sync service",zh_TW:"\u81EA\u5EFA kiss-wroker \u8CC7\u6599\u540C\u6B65\u670D\u52D9"},about_api:{zh:"1\u3001\u5176\u4E2D BuiltinAI \u4E3A\u6D4F\u89C8\u5668\u5185\u7F6EAI\u7FFB\u8BD1\uFF0C\u76EE\u524D\u4EC5 Chrome 138 \u53CA\u4EE5\u4E0A\u7248\u672C\u5F97\u5230\u652F\u6301\u3002",en:"1. BuiltinAI is the browser's built-in AI translation, which is currently only supported by Chrome 138 and above.",zh_TW:"1.\u5176\u4E2D BuiltinAI \u70BA\u700F\u89BD\u5668\u5167\u5EFAAI\u7FFB\u8B6F\uFF0C\u76EE\u524D\u50C5 Chrome 138 \u4EE5\u4E0A\u7248\u672C\u652F\u63F4\u3002"},about_api_2:{zh:"2\u3001\u5927\u90E8\u5206AI\u63A5\u53E3\u90FD\u4E0EOpenAI\u517C\u5BB9\uFF0C\u56E0\u6B64\u9009\u62E9\u6DFB\u52A0OpenAI\u7C7B\u578B\u5373\u53EF\u3002",en:"2. Most AI interfaces are compatible with OpenAI, so just choose to add the OpenAI type.",zh_TW:"2.\u5927\u90E8\u5206AI\u4ECB\u9762\u90FD\u8207OpenAI\u76F8\u5BB9\uFF0C\u56E0\u6B64\u9078\u64C7\u65B0\u589EOpenAI\u985E\u578B\u5373\u53EF\u3002"},about_api_3:{zh:"3\u3001\u6682\u672A\u5217\u51FA\u7684\u63A5\u53E3\uFF0C\u7406\u8BBA\u4E0A\u90FD\u53EF\u4EE5\u901A\u8FC7\u81EA\u5B9A\u4E49\u63A5\u53E3 (Custom) \u7684\u5F62\u5F0F\u652F\u6301\u3002",en:"3. Interfaces that have not yet been launched can theoretically be supported through custom interfaces.",zh_TW:"3\u3001\u66AB\u672A\u5217\u51FA\u7684\u4ECB\u9762\uFF0C\u7406\u8AD6\u4E0A\u90FD\u53EF\u900F\u904E\u81EA\u8A02\u4ECB\u9762  (Custom)  \u7684\u5F62\u5F0F\u652F\u63F4\u3002"},about_api_proxy:{zh:"\u67E5\u770B\u81EA\u5EFA\u4E00\u4E2A\u7FFB\u8BD1\u63A5\u53E3\u4EE3\u7406",en:"Check out the self-built translation interface proxy",zh_TW:"\u67E5\u770B\u5982\u4F55\u81EA\u5EFA\u7FFB\u8B6F\u4ECB\u9762 Proxy"},setting_helper:{zh:"\u65B0\u65E7\u914D\u7F6E\u5E76\u4E0D\u517C\u5BB9\uFF0C\u5BFC\u51FA\u7684\u65E7\u7248\u914D\u7F6E\uFF0C\u52FF\u518D\u6B21\u5BFC\u5165\u3002",en:"The old and new configurations are not compatible. Do not import the exported old configuration again.",zh_TW:"\u65B0\u820A\u914D\u7F6E\u4E26\u4E0D\u76F8\u5BB9\uFF0C\u532F\u51FA\u7684\u820A\u7248\u914D\u7F6E\uFF0C\u52FF\u518D\u6B21\u532F\u5165\u3002"},style_none:{zh:"\u65E0",en:"None",zh_TW:"\u7121"},under_line:{zh:"\u4E0B\u5212\u76F4\u7EBF",en:"Underline",zh_TW:"\u4E0B\u5283\u76F4\u7DDA"},dot_line:{zh:"\u4E0B\u5212\u70B9\u72B6\u7EBF",en:"Dotted Underline",zh_TW:"\u4E0B\u5283\u9EDE\u72C0\u7DDA"},dash_line:{zh:"\u4E0B\u5212\u865A\u7EBF",en:"Dashed Underline",zh_TW:"\u4E0B\u5283\u865B\u7DDA"},dash_box:{zh:"\u865A\u7EBF\u6846",en:"Dashed Box"},wavy_line:{zh:"\u4E0B\u5212\u6CE2\u6D6A\u7EBF",en:"Wavy Underline",zh_TW:"\u4E0B\u5283\u6CE2\u6D6A\u7DDA"},fuzzy:{zh:"\u6A21\u7CCA",en:"Fuzzy",zh_TW:"\u6A21\u7CCA"},highlight:{zh:"\u9AD8\u4EAE",en:"Highlight",zh_TW:"\u53CD\u767D\u6A19\u793A"},blockquote:{zh:"\u5F15\u7528",en:"Blockquote",zh_TW:"\u5F15\u7528"},gradient:{zh:"\u6E10\u53D8",en:"Gradient",zh_TW:"\u6F38\u8B8A"},blink:{zh:"\u95EA\u73B0",en:"Blink",zh_TW:"\u9583\u73FE"},glow:{zh:"\u53D1\u5149",en:"Glow",zh_TW:"\u767C\u5149"},diy_style:{zh:"\u81EA\u5B9A\u4E49\u6837\u5F0F",en:"Custom Style",zh_TW:"\u81EA\u8A02\u6A23\u5F0F"},diy_style_helper:{zh:"\u9075\u5FAA\u201CCSS\u201D\u7684\u8BED\u6CD5",en:"Follow the syntax of \"CSS\"",zh_TW:"\u9075\u5FAA CSS \u8A9E\u6CD5"},setting:{zh:"\u8BBE\u7F6E",en:"Setting",zh_TW:"\u8A2D\u5B9A"},pattern:{zh:"\u5339\u914D\u7F51\u5740",en:"URL pattern",zh_TW:"\u5339\u914D\u7DB2\u5740"},pattern_helper:{zh:"1\u3001\u652F\u6301\u661F\u53F7(*)\u901A\u914D\u7B26\u30022\u3001\u591A\u4E2AURL\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\u3002",en:"1. Supports the asterisk (*) wildcard character. 2. Separate multiple URLs with newlines or English commas \",\".",zh_TW:"1. \u652F\u63F4\u661F\u865F (*) \u842C\u7528\u5B57\u5143\u30022. \u591A\u500B URL \u8ACB\u4EE5\u63DB\u884C\u6216\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u3002"},selector_helper:{zh:"1\u3001\u9700\u8981\u7FFB\u8BD1\u7684\u76EE\u6807\u5143\u7D20\u30022\u3001\u5F00\u542F\u81EA\u52A8\u626B\u63CF\u9875\u9762\u540E\uFF0C\u672C\u8BBE\u7F6E\u65E0\u6548\u30023\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. The target element to be translated. 2. This setting is invalid when automatic page scanning is enabled. 3. Follow the CSS selector syntax.",zh_TW:"1\u3001\u9700\u8981\u7FFB\u8B6F\u7684\u76EE\u6A19\u5143\u7D20\u3002 2.\u958B\u555F\u81EA\u52D5\u6383\u63CF\u9801\u9762\u5F8C\uFF0C\u672C\u8A2D\u5B9A\u7121\u6548\u3002 3.\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},translate_switch:{zh:"\u5F00\u542F\u7FFB\u8BD1",en:"Translate Switch",zh_TW:"\u958B\u555F\u7FFB\u8B6F"},default_enabled:{zh:"\u9ED8\u8BA4\u5F00\u542F",en:"Enabled",zh_TW:"\u9810\u8A2D\u958B\u555F"},default_disabled:{zh:"\u9ED8\u8BA4\u5173\u95ED",en:"Disabled",zh_TW:"\u9810\u8A2D\u95DC\u9589"},selector:{zh:"\u9009\u62E9\u5668",en:"Selector",zh_TW:"\u9078\u64C7\u5668"},target_selector:{zh:"\u76EE\u6807\u5143\u7D20\u9009\u62E9\u5668",en:"Target element selector",zh_TW:"\u76EE\u6A19\u5143\u7D20\u9078\u64C7\u5668"},keep_selector:{zh:"\u4FDD\u7559\u5143\u7D20\u9009\u62E9\u5668",en:"Keep unchanged selector",zh_TW:"\u4FDD\u7559\u5143\u7D20\u9078\u64C7\u5668"},keep_selector_helper:{zh:"1\u3001\u76EE\u6807\u5143\u7D20\u4E0B\u9762\u9700\u8981\u539F\u6837\u4FDD\u7559\u7684\u5B50\u8282\u70B9\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. The child nodes under the target element need to remain intact. 2. Follow the CSS selector syntax.",zh_TW:"1. \u76EE\u6A19\u5143\u7D20\u4E0B\u7684\u5B50\u7BC0\u9EDE\u9700\u8981\u4FDD\u6301\u539F\u6A23\u3002 2. \u9075\u5FAA CSS \u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},root_selector:{zh:"\u6839\u8282\u70B9\u9009\u62E9\u5668",en:"Root node selector",zh_TW:"\u6839\u7BC0\u9EDE\u9078\u64C7\u5668"},root_selector_helper:{zh:"1\u3001\u7528\u4E8E\u7F29\u5C0F\u9875\u9762\u7FFB\u8BD1\u8303\u56F4\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. Used to narrow the translation scope of the page. 2. Follow the CSS selector syntax.",zh_TW:"1.\u7528\u65BC\u7E2E\u5C0F\u9801\u9762\u7FFB\u8B6F\u7BC4\u570D\u3002 2\u3001\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},ignore_selector:{zh:"\u4E0D\u7FFB\u8BD1\u8282\u70B9\u9009\u62E9\u5668",en:"Ignore node selectors",zh_TW:"\u4E0D\u7FFB\u8B6F\u7BC0\u9EDE\u9078\u64C7\u5668"},ignore_selector_helper:{zh:"1\u3001\u9700\u8981\u5FFD\u7565\u7684\u8282\u70B9\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. Nodes to be ignored. 2. Follow CSS selector syntax.",zh_TW:"1\u3001\u9700\u8981\u5FFD\u7565\u7684\u7BC0\u9EDE\u3002 2\u3001\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},terms:{zh:"\u4E13\u4E1A\u672F\u8BED",en:"Terms",zh_TW:"\u5C08\u696D\u8853\u8A9E"},terms_helper:{zh:"1\u3001\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\uFF0C\u65E0\u9700\u659C\u6746\uFF0C\u4E0D\u652F\u6301\u4FEE\u9970\u7B26\u30022\u3001\u591A\u6761\u672F\u8BED\u7528\u6362\u884C\u6216\u5206\u53F7\u201C;\u201D\u9694\u5F00\u30023\u3001\u672F\u8BED\u548C\u8BD1\u6587\u7528\u82F1\u6587\u9017\u53F7\u201C,\u201D\u9694\u5F00\u30024\u3001\u6CA1\u6709\u8BD1\u6587\u89C6\u4E3A\u4E0D\u7FFB\u8BD1\u672F\u8BED\u3002",en:"1. Supports regular expression matching, no slash required, and no modifiers are supported. 2. Separate multiple terms with newlines or semicolons \";\". 3. Terms and translations are separated by English commas \",\". 4. If there is no translation, the term will be deemed not to be translated.",zh_TW:"1. \u652F\u63F4\u6B63\u5247\u8868\u9054\u5F0F\u6BD4\u5C0D\uFF0C\u7121\u9700\u659C\u7DDA\uFF0C\u4E14\u4E0D\u652F\u63F4\u4FEE\u98FE\u7B26\u30022. \u591A\u689D\u8853\u8A9E\u4EE5\u63DB\u884C\u6216\u5206\u865F\u300C;\u300D\u5206\u9694\u30023. \u8853\u8A9E\u8207\u8B6F\u6587\u4EE5\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u30024. \u7121\u8B6F\u6587\u8005\u8996\u70BA\u4E0D\u7FFB\u8B6F\u8A72\u8853\u8A9E\u3002"},ai_terms:{zh:"AI\u4E13\u4E1A\u672F\u8BED",en:"AI Terms",zh_TW:"AI\u5C08\u696D\u8853\u8A9E"},ai_terms_helper:{zh:"1\u3001AI\u667A\u80FD\u66FF\u6362\uFF0C\u4E0D\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\u30022\u3001\u591A\u6761\u672F\u8BED\u7528\u6362\u884C\u6216\u5206\u53F7\u201C;\u201D\u9694\u5F00\u30023\u3001\u672F\u8BED\u548C\u8BD1\u6587\u7528\u82F1\u6587\u9017\u53F7\u201C,\u201D\u9694\u5F00\u30024\u3001\u6CA1\u6709\u8BD1\u6587\u89C6\u4E3A\u4E0D\u7FFB\u8BD1\u672F\u8BED\u3002",en:"1. AI intelligent replacement does not support regular expressions.2. Separate multiple terms with newlines or semicolons \";\". 3. Terms and translations are separated by English commas \",\". 4. If there is no translation, the term will be deemed not to be translated.",zh_TW:"1.AI\u667A\u80FD\u66FF\u63DB\uFF0C\u4E0D\u652F\u63F4\u6B63\u898F\u8868\u793A\u5F0F\u30022. \u591A\u689D\u8853\u8A9E\u4EE5\u63DB\u884C\u6216\u5206\u865F\u300C;\u300D\u5206\u9694\u30023. \u8853\u8A9E\u8207\u8B6F\u6587\u4EE5\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u30024. \u7121\u8B6F\u6587\u8005\u8996\u70BA\u4E0D\u7FFB\u8B6F\u8A72\u8853\u8A9E\u3002"},selector_style:{zh:"\u9009\u62E9\u5668\u8282\u70B9\u6837\u5F0F",en:"Selector Style",zh_TW:"\u9078\u64C7\u5668\u7BC0\u9EDE\u6A23\u5F0F"},terms_style:{zh:"\u4E13\u4E1A\u672F\u8BED\u6837\u5F0F",en:"Terms Style",zh_TW:"\u5C08\u696D\u8853\u8A9E\u6A23\u5F0F"},highlight_style:{zh:"\u8BCD\u6C47\u9AD8\u4EAE\u6837\u5F0F",en:"Fav Words highlight style",zh_TW:"\u8A5E\u5F59\u9AD8\u4EAE\u6A23\u5F0F"},selector_style_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\u3002",en:"It is injected when translation is turned on.",zh_TW:"\u5728\u958B\u555F\u7FFB\u8B6F\u6642\u6CE8\u5165\u3002"},selector_parent_style:{zh:"\u9009\u62E9\u5668\u7236\u8282\u70B9\u6837\u5F0F",en:"Parent Selector Style",zh_TW:"\u9078\u64C7\u5668\u7236\u7BC0\u9EDE\u6A23\u5F0F"},selector_grand_style:{zh:"\u9009\u62E9\u5668\u7956\u8282\u70B9\u6837\u5F0F",en:"Grand Selector Style",zh_TW:"\u9078\u64C7\u5668\u7956\u7BC0\u9EDE\u6A23\u5F0F"},inject_js:{zh:"\u6CE8\u5165JS",en:"Inject JS",zh_TW:"\u6CE8\u5165 JS"},inject_js_helper:{zh:"\u9884\u52A0\u8F7D\u65F6\u6CE8\u5165\uFF0C\u4E00\u4E2A\u9875\u9762\u4EC5\u8FD0\u884C\u4E00\u6B21\u3002\u5185\u7F6E\u5168\u5C40\u5BF9\u8C61 KT: {\n      apiTranslate,\n      apiDectect,\n      apiSetting,\n      apisMap,\n      toLang,\n      docInfo,\n      glossary,\n    }",en:"Injected during preload, runs only once per page. Built-in global object KT: {\n      apiTranslate,\n      apiDectect,\n      apiSetting,\n      apisMap,\n      toLang,\n      docInfo,\n      glossary,\n    }",zh_TW:"\u9810\u5148\u8F09\u5165\u6642\u6CE8\u5165\uFF0C\u4E00\u500B\u9801\u9762\u50C5\u904B\u884C\u4E00\u6B21\u3002\u5167\u5EFA\u5168\u57DF\u7269\u4EF6 KT: {\n      apiTranslate,\n      apiDectect,\n      apiSetting,\n      apisMap,\n      toLang,\n      docInfo,\n      glossary,\n    }"},inject_css:{zh:"\u6CE8\u5165CSS",en:"Inject CSS",zh_TW:"\u6CE8\u5165 CSS"},inject_css_helper:{zh:"\u521D\u59CB\u5316\u65F6\u6CE8\u5165\u8FD0\u884C\uFF0C\u4E00\u4E2A\u9875\u9762\u4EC5\u8FD0\u884C\u4E00\u6B21\u3002",en:"Injected and run at initialization, and only run once per page.",zh_TW:"\u521D\u59CB\u5316\u6642\u6CE8\u5165\u904B\u884C\uFF0C\u4E00\u500B\u9801\u9762\u50C5\u904B\u884C\u4E00\u6B21\u3002"},fixer_function:{zh:"\u4FEE\u590D\u51FD\u6570",en:"Fixer Function",zh_TW:"\u4FEE\u5FA9\u51FD\u5F0F"},fixer_function_helper:{zh:"1\u3001br\u662F\u5C06
\u6362\u884C\u66FF\u6362\u6210

\u30022\u3001bn\u662F\u5C06\\n\u6362\u884C\u66FF\u6362\u6210

\u30023\u3001brToDiv\u548CbnToDiv\u662F\u66FF\u6362\u6210

\u3002",en:"1. br replaces
line breaks with

. 2. bn replaces \\n newline with

. 3. brToDiv and bnToDiv are replaced with

.",zh_TW:"1. br \u6703\u5C07
\u63DB\u884C\u66FF\u63DB\u70BA

\u30022. bn \u6703\u5C07 \\n \u63DB\u884C\u66FF\u63DB\u70BA

\u30023. brToDiv \u8207 bnToDiv \u6703\u66FF\u63DB\u70BA

\u3002"},import:{zh:"\u5BFC\u5165",en:"Import",zh_TW:"\u532F\u5165"},export:{zh:"\u5BFC\u51FA",en:"Export",zh_TW:"\u532F\u51FA"},export_translation:{zh:"\u5BFC\u51FA\u91CA\u4E49",en:"Export Translation",zh_TW:"\u532F\u51FA\u91CB\u7FA9"},error_cant_be_blank:{zh:"\u4E0D\u80FD\u4E3A\u7A7A",en:"Can not be blank",zh_TW:"\u4E0D\u53EF\u70BA\u7A7A"},error_duplicate_values:{zh:"\u5B58\u5728\u91CD\u590D\u7684\u503C",en:"There are duplicate values",zh_TW:"\u5B58\u5728\u91CD\u8907\u7684\u503C"},error_wrong_file_type:{zh:"\u9519\u8BEF\u7684\u6587\u4EF6\u7C7B\u578B",en:"Wrong file type",zh_TW:"\u6A94\u6848\u985E\u578B\u932F\u8AA4"},error_fetch_url:{zh:"\u8BF7\u68C0\u67E5url\u5730\u5740\u662F\u5426\u6B63\u786E\u6216\u7A0D\u540E\u518D\u8BD5\u3002",en:"Please check if the url address is correct or try again later.",zh_TW:"\u8ACB\u6AA2\u67E5 URL \u662F\u5426\u6B63\u78BA\u6216\u7A0D\u5F8C\u518D\u8A66\u3002"},deepl_api:{zh:"DeepL \u63A5\u53E3",en:"DeepL API",zh_TW:"DeepL \u4ECB\u9762"},deepl_key:{zh:"DeepL \u5BC6\u94A5",en:"DeepL Key",zh_TW:"DeepL \u91D1\u9470"},openai_api:{zh:"OpenAI \u63A5\u53E3",en:"OpenAI API",zh_TW:"OpenAI \u4ECB\u9762"},openai_key:{zh:"OpenAI \u5BC6\u94A5",en:"OpenAI Key",zh_TW:"OpenAI \u91D1\u9470"},openai_model:{zh:"OpenAI \u6A21\u578B",en:"OpenAI Model",zh_TW:"OpenAI \u6A21\u578B"},openai_prompt:{zh:"OpenAI \u63D0\u793A\u8BCD",en:"OpenAI Prompt",zh_TW:"OpenAI \u63D0\u793A\u8A5E"},if_clear_cache:{zh:"\u662F\u5426\u6E05\u9664\u7F13\u5B58\uFF08\u9ED8\u8BA4\u7F13\u5B587\u5929\uFF09",en:"Whether clear cache (Default cache is 7 days)",zh_TW:"\u662F\u5426\u6E05\u9664\u5FEB\u53D6\uFF08\u9810\u8A2D\u5FEB\u53D67\u5929\uFF09"},clear_cache_never:{zh:"\u4E0D\u6E05\u9664\u7F13\u5B58",en:"Never clear cache",zh_TW:"\u4E0D\u6E05\u9664\u5FEB\u53D6"},clear_cache_restart:{zh:"\u91CD\u542F\u6D4F\u89C8\u5668\u65F6\u6E05\u9664\u7F13\u5B58",en:"Clear cache when restarting browser",zh_TW:"\u91CD\u65B0\u555F\u52D5\u700F\u89BD\u5668\u6642\u6E05\u9664\u5FEB\u53D6"},data_sync_type:{zh:"\u6570\u636E\u540C\u6B65\u65B9\u5F0F",en:"Data Sync Type",zh_TW:"\u8CC7\u6599\u540C\u6B65\u65B9\u5F0F"},data_sync_url:{zh:"\u6570\u636E\u540C\u6B65\u63A5\u53E3",en:"Data Sync API",zh_TW:"\u8CC7\u6599\u540C\u6B65\u4ECB\u9762"},data_sync_user:{zh:"\u6570\u636E\u540C\u6B65\u8D26\u6237",en:"Data Sync User",zh_TW:"\u8CC7\u6599\u540C\u6B65\u5E33\u865F"},data_sync_key:{zh:"\u6570\u636E\u540C\u6B65\u5BC6\u94A5",en:"Data Sync Key",zh_TW:"\u8CC7\u6599\u540C\u6B65\u91D1\u9470"},sync_now:{zh:"\u7ACB\u5373\u540C\u6B65",en:"Sync Now",zh_TW:"\u7ACB\u5373\u540C\u6B65"},sync_success:{zh:"\u540C\u6B65\u6210\u529F\uFF01",en:"Sync Success",zh_TW:"\u540C\u6B65\u6210\u529F\uFF01"},sync_failed:{zh:"\u540C\u6B65\u5931\u8D25\uFF01",en:"Sync Error",zh_TW:"\u540C\u6B65\u5931\u6557\uFF01"},error_got_some_wrong:{zh:"\u62B1\u6B49\uFF0C\u51FA\u9519\u4E86\uFF01",en:"Sorry, something went wrong!",zh_TW:"\u62B1\u6B49\uFF0C\u767C\u751F\u932F\u8AA4\uFF01"},error_sync_setting:{zh:"\u60A8\u7684\u540C\u6B65\u7C7B\u578B\u5FC5\u987B\u4E3A\u201CKISS-Worker\u201D\uFF0C\u4E14\u9700\u586B\u5199\u5B8C\u6574",en:"Your sync type must be \"KISS-Worker\" and must be filled in completely",zh_TW:"\u60A8\u7684\u540C\u6B65\u578B\u614B\u5FC5\u9808\u70BA\u300CKISS-Worker\u300D\uFF0C\u4E14\u9700\u586B\u5BEB\u5B8C\u6574\u3002"},click_test:{zh:"\u70B9\u51FB\u6D4B\u8BD5",en:"Click Test",zh_TW:"\u9EDE\u64CA\u6E2C\u8A66"},test_success:{zh:"\u6D4B\u8BD5\u6210\u529F",en:"Test success",zh_TW:"\u6E2C\u8A66\u6210\u529F"},test_failed:{zh:"\u6D4B\u8BD5\u5931\u8D25",en:"Test failed",zh_TW:"\u6E2C\u8A66\u5931\u6557"},clear_all_cache_now:{zh:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u7F13\u5B58",en:"Clear all cache now",zh_TW:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u5FEB\u53D6"},clear_cache:{zh:"\u6E05\u9664\u7F13\u5B58",en:"Clear Cache",zh_TW:"\u6E05\u9664\u5FEB\u53D6"},clear_success:{zh:"\u6E05\u9664\u6210\u529F",en:"Clear success",zh_TW:"\u6E05\u9664\u6210\u529F"},clear_failed:{zh:"\u6E05\u9664\u5931\u8D25",en:"Clear failed",zh_TW:"\u6E05\u9664\u5931\u6557"},share:{zh:"\u5206\u4EAB",en:"Share",zh_TW:"\u5206\u4EAB"},clear_all:{zh:"\u6E05\u7A7A",en:"Clear All",zh_TW:"\u6E05\u7A7A"},help:{zh:"\u6C42\u52A9",en:"Help",zh_TW:"\u6C42\u52A9"},restore_default:{zh:"\u6062\u590D\u9ED8\u8BA4",en:"Restore Default",zh_TW:"\u6062\u5FA9\u9810\u8A2D"},shortcuts_setting:{zh:"\u5FEB\u6377\u952E\u8BBE\u7F6E",en:"Shortcuts Setting",zh_TW:"\u5FEB\u6377\u9375\u8A2D\u5B9A"},toggle_translate_shortcut:{zh:"\"\u5F00\u542F\u7FFB\u8BD1\"\u5FEB\u6377\u952E",en:"\"Toggle Translate\" Shortcut",zh_TW:"\u300C\u958B\u555F\u7FFB\u8B6F\u300D\u5FEB\u6377\u9375"},toggle_style_shortcut:{zh:"\"\u5207\u6362\u6837\u5F0F\"\u5FEB\u6377\u952E",en:"\"Toggle Style\" Shortcut",zh_TW:"\u300C\u5207\u63DB\u6A23\u5F0F\u300D\u5FEB\u6377\u9375"},toggle_popup_shortcut:{zh:"\"\u6253\u5F00\u5F39\u7A97\"\u5FEB\u6377\u952E",en:"\"Open Popup\" Shortcut",zh_TW:"\u300C\u958B\u555F\u5F48\u7A97\u300D\u5FEB\u6377\u9375"},open_setting_shortcut:{zh:"\"\u6253\u5F00\u8BBE\u7F6E\"\u5FEB\u6377\u952E",en:"\"Open Setting\" Shortcut",zh_TW:"\u300C\u958B\u555F\u8A2D\u5B9A\u300D\u5FEB\u6377\u9375"},hide_fab_button:{zh:"\u9690\u85CF\u60AC\u6D6E\u6309\u94AE",en:"Hide Fab Button",zh_TW:"\u96B1\u85CF\u61F8\u6D6E\u6309\u9215"},fab_click_action:{zh:"\u5355\u51FB\u60AC\u6D6E\u6309\u94AE\u52A8\u4F5C",en:"Single Click Fab Action",zh_TW:"\u55AE\u64CA\u61F8\u6D6E\u6309\u94AE\u52D5\u4F5C"},fab_click_menu:{zh:"\u5F39\u51FA\u83DC\u5355",en:"Popup Menu",zh_TW:"\u5F48\u51FA\u9078\u55AE"},fab_click_translate:{zh:"\u76F4\u63A5\u7FFB\u8BD1",en:"Translate",zh_TW:"\u76F4\u63A5\u7FFB\u8B6F"},hide_tran_button:{zh:"\u9690\u85CF\u7FFB\u8BD1\u6309\u94AE",en:"Hide Translate Button",zh_TW:"\u96B1\u85CF\u7FFB\u8B6F\u6309\u9215"},hide_click_away:{zh:"\u70B9\u51FB\u5916\u90E8\u5173\u95ED\u5F39\u7A97",en:"Click outside to close the pop-up window",zh_TW:"\u9EDE\u64CA\u5916\u90E8\u95DC\u9589\u5F48\u7A97"},use_simple_style:{zh:"\u4F7F\u7528\u7B80\u6D01\u754C\u9762",en:"Use a simple interface",zh_TW:"\u4F7F\u7528\u7C21\u6F54\u4ECB\u9762"},show:{zh:"\u663E\u793A",en:"Show",zh_TW:"\u986F\u793A"},hide:{zh:"\u9690\u85CF",en:"Hide",zh_TW:"\u96B1\u85CF"},save_rule:{zh:"\u4FDD\u5B58\u89C4\u5219",en:"Save Rule",zh_TW:"\u5132\u5B58\u898F\u5247"},global_rule:{zh:"\u5168\u5C40\u89C4\u5219",en:"Global Rule",zh_TW:"\u5168\u57DF\u898F\u5247"},input_translate:{zh:"\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation",zh_TW:"\u8F38\u5165\u6846\u7FFB\u8B6F"},use_input_box_translation:{zh:"\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation",zh_TW:"\u555F\u7528\u8F38\u5165\u6846\u7FFB\u8B6F"},input_selector:{zh:"\u8F93\u5165\u6846\u9009\u62E9\u5668",en:"Input Selector",zh_TW:"\u8F38\u5165\u6846\u9078\u64C7\u5668"},input_selector_helper:{zh:"\u7528\u4E8E\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",en:"Used for input box translation.",zh_TW:"\u7528\u65BC\u8F38\u5165\u6846\u7FFB\u8B6F\u3002"},trigger_trans_shortcut:{zh:"\u89E6\u53D1\u7FFB\u8BD1\u5FEB\u6377\u952E",en:"Trigger Translation Shortcut Keys",zh_TW:"\u89F8\u767C\u7FFB\u8B6F\u5FEB\u6377\u9375"},trigger_trans_shortcut_help:{zh:"\u9ED8\u8BA4\u4E3A\u5355\u51FB\u201CAltLeft+KeyI\u201D",en:"Default is \"AltLeft+KeyI\"",zh_TW:"\u9810\u8A2D\u70BA\u6309\u4E0B\u300CAltLeft+KeyI\u300D"},shortcut_press_count:{zh:"\u5FEB\u6377\u952E\u8FDE\u51FB\u6B21\u6570",en:"Shortcut Press Number",zh_TW:"\u5FEB\u6377\u9375\u9023\u64CA\u6B21\u6578"},combo_timeout:{zh:"\u8FDE\u51FB\u8D85\u65F6\u65F6\u95F4 (10-1000ms)",en:"Combo Timeout (10-1000ms)",zh_TW:"\u9023\u64CA\u903E\u6642 (10-1000ms)"},input_trans_start_sign:{zh:"\u7FFB\u8BD1\u8D77\u59CB\u6807\u8BC6",en:"Translation Start Sign",zh_TW:"\u7FFB\u8B6F\u8D77\u59CB\u6A19\u8A18"},input_trans_start_sign_help:{zh:"\u6807\u8BC6\u540E\u9762\u53EF\u4EE5\u52A0\u76EE\u6807\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1A \u201C/en \u4F60\u597D\u201D\u3001\u201C/zh hello\u201D",en:"The target language code can be added after the sign, such as: \"/en \u4F60\u597D\", \"/zh hello\"",zh_TW:"\u6A19\u8A18\u5F8C\u53EF\u52A0\u4E0A\u76EE\u6A19\u8A9E\u8A00\u4EE3\u78BC\uFF0C\u4F8B\u5982\uFF1A\u300C/en \u4F60\u597D\u300D\u3001\u300C/zh hello\u300D"},detect_lang_remote:{zh:"\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B",en:"Remote language detection",zh_TW:"\u9060\u7AEF\u8A9E\u8A00\u5075\u6E2C"},detect_lang_remote_help:{zh:"\u542F\u7528\u540E\u68C0\u6D4B\u51C6\u786E\u5EA6\u589E\u52A0\uFF0C\u4F46\u4F1A\u964D\u4F4E\u7FFB\u8BD1\u901F\u5EA6\uFF0C\u8BF7\u914C\u60C5\u5F00\u542F",en:"After enabling, the detection accuracy will increase, but it will reduce the translation speed. Please enable it as appropriate.",zh_TW:"\u555F\u7528\u5F8C\u53EF\u63D0\u5347\u5075\u6E2C\u6E96\u78BA\u5EA6\uFF0C\u4F46\u6703\u964D\u4F4E\u7FFB\u8B6F\u901F\u5EA6\uFF0C\u8ACB\u8996\u9700\u8981\u958B\u555F\u3002"},detect_lang_service:{zh:"\u8BED\u8A00\u68C0\u6D4B\u670D\u52A1",en:"Language detect service",zh_TW:"\u8A9E\u8A00\u6AA2\u6E2C\u670D\u52D9"},disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},enable:{zh:"\u542F\u7528",en:"Enable",zh_TW:"\u555F\u7528"},selection_translate:{zh:"\u5212\u8BCD\u7FFB\u8BD1",en:"Selection Translate",zh_TW:"\u5283\u8A5E\u7FFB\u8B6F"},toggle_selection_translate:{zh:"\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"Use Selection Translate",zh_TW:"\u555F\u7528\u5283\u8A5E\u7FFB\u8B6F"},trigger_tranbox_shortcut:{zh:"\u663E\u793A\u7FFB\u8BD1\u6846/\u7FFB\u8BD1\u9009\u4E2D\u6587\u5B57\u5FEB\u6377\u952E",en:"Open Translate Popup/Translate Selected Shortcut",zh_TW:"\u986F\u793A\u7FFB\u8B6F\u6846\uFF0F\u7FFB\u8B6F\u9078\u4E2D\u6587\u5B57\u5FEB\u6377\u9375"},tranbtn_offset_x:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBX\uFF08\xB1200\uFF09",en:"Translate Button Offset X (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6309\u9215\u4F4D\u79FB X\uFF08\xB1200\uFF09"},tranbtn_offset_y:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBY\uFF08\xB1200\uFF09",en:"Translate Button Offset Y (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6309\u9215\u4F4D\u79FB Y\uFF08\xB1200\uFF09"},tranbox_offset_x:{zh:"\u7FFB\u8BD1\u6846\u504F\u79FBX\uFF08\xB1200\uFF09",en:"Translate Box Offset X (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6846\u4F4D\u79FB X\uFF08\xB1200\uFF09"},tranbox_offset_y:{zh:"\u7FFB\u8BD1\u6846\u504F\u79FBY\uFF08\xB1200\uFF09",en:"Translate Box Offset Y (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6846\u4F4D\u79FB Y\uFF08\xB1200\uFF09"},translated_text:{zh:"\u8BD1\u6587",en:"Translated Text",zh_TW:"\u8B6F\u6587"},original_text:{zh:"\u539F\u6587",en:"Original Text",zh_TW:"\u539F\u6587"},favorite_words:{zh:"\u6536\u85CF\u8BCD\u6C47",en:"Favorite Words",zh_TW:"\u6536\u85CF\u8A5E\u5F59"},touch_setting:{zh:"\u89E6\u5C4F\u8BBE\u7F6E",en:"Touch Setting",zh_TW:"\u89F8\u63A7\u8A2D\u5B9A"},touch_translate_shortcut:{zh:"\u89E6\u5C4F\u7FFB\u8BD1\u5FEB\u6377\u65B9\u5F0F (\u652F\u6301\u591A\u9009)",en:"Touch Translate Shortcut (multiple supported)",zh_TW:"\u89F8\u63A7\u7FFB\u8B6F\u6377\u5F91 (\u652F\u63F4\u591A\u9078)"},touch_tap_0:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},touch_tap_2:{zh:"\u53CC\u6307\u8F7B\u89E6",en:"Two finger tap",zh_TW:"\u96D9\u6307\u8F15\u89F8"},touch_tap_3:{zh:"\u4E09\u6307\u8F7B\u89E6",en:"Three finger tap",zh_TW:"\u4E09\u6307\u8F15\u89F8"},touch_tap_4:{zh:"\u56DB\u6307\u8F7B\u89E6",en:"Four finger tap",zh_TW:"\u56DB\u6307\u8F15\u89F8"},touch_tap_5:{zh:"\u5355\u6307\u53CC\u51FB",en:"Double-click",zh_TW:"\u55AE\u6307\u96D9\u64CA"},touch_tap_6:{zh:"\u5355\u6307\u4E09\u51FB",en:"Triple-click",zh_TW:"\u55AE\u6307\u4E09\u64CA"},touch_tap_7:{zh:"\u53CC\u6307\u53CC\u51FB",en:"Two-finger double-click",zh_TW:"\u96D9\u6307\u96D9\u64CA"},translate_blacklist:{zh:"\u7981\u7528\u7FFB\u8BD1\u540D\u5355",en:"Translate Blacklist",zh_TW:"\u505C\u7528\u7FFB\u8B6F\u540D\u55AE"},disabled_orilist:{zh:"\u7981\u7528Origin\u540D\u5355",en:"Disabled Origin List",zh_TW:"\u505C\u7528 Origin \u540D\u55AE"},disabled_csplist:{zh:"\u7981\u7528CSP\u540D\u5355",en:"Disabled CSP List",zh_TW:"\u505C\u7528 CSP \u540D\u55AE"},disabled_csplist_helper:{zh:"3\u3001\u901A\u8FC7\u8C03\u6574CSP\u7B56\u7565\uFF0C\u4F7F\u5F97\u67D0\u4E9B\u9875\u9762\u80FD\u591F\u6CE8\u5165JS/CSS/Media\uFF0C\u8BF7\u8C28\u614E\u4F7F\u7528\uFF0C\u9664\u975E\u60A8\u5DF2\u77E5\u6653\u76F8\u5173\u98CE\u9669\u3002",en:"3. By adjusting the CSP policy, some pages can inject JS/CSS/Media. Please use it with caution unless you are aware of the related risks.",zh_TW:"3. \u900F\u904E\u8ABF\u6574 CSP \u653F\u7B56\uFF0C\u4F7F\u90E8\u5206\u9801\u9762\u53EF\u6CE8\u5165 JS/CSS/Media\u3002\u8ACB\u8B39\u614E\u4F7F\u7528\uFF0C\u9664\u975E\u60A8\u5DF2\u77E5\u6089\u76F8\u95DC\u98A8\u96AA\u3002"},skip_langs:{zh:"\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",en:"Disable Languages",zh_TW:"\u4E0D\u7FFB\u8B6F\u7684\u8A9E\u8A00"},skip_langs_helper:{zh:"\u6B64\u529F\u80FD\u4F9D\u8D56\u51C6\u786E\u7684\u8BED\u8A00\u68C0\u6D4B\uFF0C\u5EFA\u8BAE\u542F\u7528\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B\u3002",en:"This feature relies on accurate language detection. It is recommended to enable remote language detection.",zh_TW:"\u6B64\u529F\u80FD\u4EF0\u8CF4\u6E96\u78BA\u7684\u8A9E\u8A00\u5075\u6E2C\uFF0C\u5EFA\u8B70\u555F\u7528\u9060\u7AEF\u8A9E\u8A00\u5075\u6E2C\u3002"},context_menus:{zh:"\u53F3\u952E\u83DC\u5355",en:"Context Menus",zh_TW:"\u53F3\u9375\u9078\u55AE"},hide_context_menus:{zh:"\u9690\u85CF\u53F3\u952E\u83DC\u5355",en:"Hide Context Menus",zh_TW:"\u96B1\u85CF\u53F3\u9375\u9078\u55AE"},simple_context_menus:{zh:"\u7B80\u5355\u53F3\u952E\u83DC\u5355",en:"Simple_context_menus Context Menus",zh_TW:"\u7C21\u6613\u53F3\u9375\u9078\u55AE"},secondary_context_menus:{zh:"\u4E8C\u7EA7\u53F3\u952E\u83DC\u5355",en:"Secondary Context Menus",zh_TW:"\u6B21\u7D1A\u53F3\u9375\u9078\u55AE"},mulkeys_help:{zh:"\u652F\u6301\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\uFF0C\u8F6E\u8BE2\u8C03\u7528\u3002",en:"Supports polling calls separated by newlines or English commas \",\".",zh_TW:"\u652F\u63F4\u4EE5\u63DB\u884C\u6216\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\uFF0C\u8F2A\u8A62\u547C\u53EB\u3002"},translation_element_tag:{zh:"\u8BD1\u6587\u5143\u7D20\u6807\u7B7E",en:"Translation Element Tag",zh_TW:"\u8B6F\u6587\u5143\u7D20\u6A19\u7C64"},show_only_translations:{zh:"\u4EC5\u663E\u793A\u8BD1\u6587",en:"Show Only Translations",zh_TW:"\u50C5\u986F\u793A\u8B6F\u6587"},show_only_translations_help:{zh:"\u975E\u5B8C\u7F8E\u5B9E\u73B0\uFF0C\u67D0\u4E9B\u9875\u9762\u53EF\u80FD\u6709\u6837\u5F0F\u7B49\u95EE\u9898\u3002",en:"It is not a perfect implementation and some pages may have style issues.",zh_TW:"\u6B64\u70BA\u975E\u5B8C\u7F8E\u5BE6\u4F5C\uFF0C\u90E8\u5206\u9801\u9762\u53EF\u80FD\u51FA\u73FE\u6A23\u5F0F\u7B49\u554F\u984C\u3002"},translate_page_title:{zh:"\u662F\u5426\u7FFB\u8BD1\u9875\u9762\u6807\u9898",en:"Translate Page Title",zh_TW:"\u662F\u5426\u7FFB\u8B6F\u9801\u9762\u6A19\u984C"},more:{zh:"\u66F4\u591A",en:"More",zh_TW:"\u66F4\u591A"},less:{zh:"\u66F4\u5C11",en:"Less",zh_TW:"\u66F4\u5C11"},fixer_selector:{zh:"\u7F51\u9875\u4FEE\u590D\u9009\u62E9\u5668",en:"Fixer Selector",zh_TW:"\u7DB2\u9801\u4FEE\u5FA9\u9078\u64C7\u5668"},reg_niutrans:{zh:"\u83B7\u53D6\u5C0F\u725B\u7FFB\u8BD1\u5BC6\u94A5\u3010\u7B80\u7EA6\u7FFB\u8BD1\u4E13\u5C5E\u65B0\u7528\u6237\u6CE8\u518C\u8D60\u9001300\u4E07\u5B57\u7B26\u3011",en:"Get NiuTrans APIKey [KISS Translator Exclusive New User Registration Free 3 Million Characters]",zh_TW:"\u53D6\u5F97\u5C0F\u725B\u7FFB\u8B6F\u91D1\u9470\u3010\u7C21\u7D04\u7FFB\u8B6F\u5C08\u5C6C\u65B0\u7528\u6236\u8A3B\u518A\u8D08\u9001 300 \u842C\u5B57\u5143\u3011"},trigger_mode:{zh:"\u89E6\u53D1\u65B9\u5F0F",en:"Trigger Mode",zh_TW:"\u89F8\u767C\u65B9\u5F0F"},trigger_click:{zh:"\u70B9\u51FB\u89E6\u53D1",en:"Click Trigger",zh_TW:"\u9EDE\u64CA\u89F8\u767C"},trigger_hover:{zh:"\u9F20\u6807\u60AC\u505C\u89E6\u53D1",en:"Hover Trigger",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u89F8\u767C"},trigger_select:{zh:"\u9009\u4E2D\u89E6\u53D1",en:"Select Trigger",zh_TW:"\u9078\u53D6\u89F8\u767C"},extend_styles:{zh:"\u9644\u52A0\u6837\u5F0F",en:"Extend Styles",zh_TW:"\u9644\u52A0\u6A23\u5F0F"},custom_option:{zh:"\u81EA\u5B9A\u4E49\u9009\u9879",en:"Custom Option",zh_TW:"\u81EA\u8A02\u9078\u9805"},translate_selected_text:{zh:"\u7FFB\u8BD1\u9009\u4E2D\u6587\u5B57",en:"Translate Selected Text",zh_TW:"\u7FFB\u8B6F\u9078\u53D6\u6587\u5B57"},toggle_style:{zh:"\u5207\u6362\u6837\u5F0F",en:"Toggle Style",zh_TW:"\u5207\u63DB\u6A23\u5F0F"},open_menu:{zh:"\u6253\u5F00\u5F39\u7A97\u83DC\u5355",en:"Open Popup Menu",zh_TW:"\u958B\u555F\u5F48\u7A97\u9078\u55AE"},open_setting:{zh:"\u6253\u5F00\u8BBE\u7F6E",en:"Open Setting",zh_TW:"\u958B\u555F\u8A2D\u5B9A"},follow_selection:{zh:"\u7FFB\u8BD1\u6846\u8DDF\u968F\u9009\u4E2D\u6587\u672C",en:"Transbox Follow Selection",zh_TW:"\u7FFB\u8B6F\u6846\u8DDF\u96A8\u9078\u53D6\u6587\u5B57"},tranbox_auto_height:{zh:"\u7FFB\u8BD1\u6846\u81EA\u9002\u5E94\u9AD8\u5EA6",en:"Translation box adaptive height",zh_TW:"\u7FFB\u8B6F\u6846\u81EA\u9069\u61C9\u9AD8\u5EA6"},translate_start_hook:{zh:"\u7FFB\u8BD1\u5F00\u59CB\u94A9\u5B50\u51FD\u6570",en:"Translate Start Hook",zh_TW:"\u7FFB\u8B6F\u958B\u59CB Hook"},translate_start_hook_helper:{zh:"\u7FFB\u8BD1\u524D\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}",en:"Run before translation, input parameters are: {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}",zh_TW:"\u7FFB\u8B6F\u524D\u6642\u904B\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}"},translate_end_hook:{zh:"\u7FFB\u8BD1\u5B8C\u6210\u94A9\u5B50\u51FD\u6570",en:"Translate End Hook",zh_TW:"\u7FFB\u8B6F\u5B8C\u6210 Hook"},translate_end_hook_helper:{zh:"\u7FFB\u8BD1\u5B8C\u6210\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A ({hostNode, parentNode, nodes, wrapperNode, innerNode})",en:"Run when translation is complete, input parameters are: ({hostNode, parentNode, nodes, wrapperNode, innerNode})",zh_TW:"\u7FFB\u8B6F\u5B8C\u6210\u6642\u904B\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A ({hostNode, parentNode, nodes, wrapperNode, innerNode})"},translate_remove_hook:{zh:"\u7FFB\u8BD1\u79FB\u9664\u94A9\u5B50\u51FD\u6570",en:"Translate Removed Hook",zh_TW:"\u7FFB\u8B6F\u79FB\u9664 Hook"},translate_remove_hook_helper:{zh:"\u7FFB\u8BD1\u79FB\u9664\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A \u7FFB\u8BD1\u8282\u70B9\u3002",en:"Run when translation is removed, the input parameters are: translation node.",zh_TW:"\u79FB\u9664\u7FFB\u8B6F\u6642\u57F7\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A\u7FFB\u8B6F\u7BC0\u9EDE\u3002"},english_dict:{zh:"\u82F1\u6587\u8BCD\u5178",en:"English Dictionary",zh_TW:"\u82F1\u6587\u5B57\u5178"},english_suggest:{zh:"\u82F1\u6587\u5EFA\u8BAE",en:"English Suggest",zh_TW:"\u82F1\u6587\u5EFA\u8B70"},api_name:{zh:"\u63A5\u53E3\u540D\u79F0",en:"API Name",zh_TW:"\u4ECB\u9762\u540D\u7A31"},is_disabled:{zh:"\u662F\u5426\u7981\u7528",en:"Is Disabled",zh_TW:"\u662F\u5426\u505C\u7528"},translate_selected:{zh:"\u662F\u5426\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"If translate selected",zh_TW:"\u662F\u5426\u555F\u7528\u5283\u8A5E\u7FFB\u8B6F"},use_batch_fetch:{zh:"\u662F\u5426\u805A\u5408\u53D1\u9001\u7FFB\u8BD1\u8BF7\u6C42",en:"Whether to aggregate and send translation requests",zh_TW:"\u662F\u5426\u805A\u5408\u767C\u9001\u7FFB\u8B6F\u8ACB\u6C42"},batch_interval:{zh:"\u805A\u5408\u8BF7\u6C42\u7B49\u5F85\u65F6\u95F4(100-10000)",en:"Aggregation request waiting time (100-10000)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u7B49\u5F85\u6642\u9593(100-10000)"},batch_size:{zh:"\u805A\u5408\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570(1-100)",en:"Maximum number of paragraphs in an aggregation request (1-100)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u6700\u5927\u6BB5\u843D\u6578(1-100)"},batch_length:{zh:"\u805A\u5408\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6(1000-100000)",en:"Maximum text length for aggregation requests (1000-100000)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u6700\u5927\u6587\u5B57\u9577\u5EA6(1000-100000)"},use_context:{zh:"\u662F\u5426\u542F\u7528\u667A\u80FD\u4E0A\u4E0B\u6587",en:"Whether to enable AI context",zh_TW:"\u662F\u5426\u555F\u7528\u667A\u6167\u4E0A\u4E0B\u6587"},context_size:{zh:"\u4E0A\u4E0B\u6587\u4F1A\u8BDD\u6570\u91CF(1-20)",en:"Number of context sessions(1-20)",zh_TW:"\u4E0A\u4E0B\u6587\u6703\u8A71\u6578\u91CF(1-20)"},auto_scan_page:{zh:"\u81EA\u52A8\u626B\u63CF\u9875\u9762",en:"Auto scan page",zh_TW:"\u81EA\u52D5\u6383\u63CF\u9801\u9762"},has_rich_text:{zh:"\u542F\u7528\u5BCC\u6587\u672C\u7FFB\u8BD1",en:"Enable rich text translation",zh_TW:"\u555F\u7528\u5BCC\u6587\u672C\u7FFB\u8B6F"},has_shadowroot:{zh:"\u626B\u63CFShadowroot",en:"Scan Shadowroot",zh_TW:"\u6383\u63CFShadowroot"},mousehover_translate:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover Translation",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},use_mousehover_translation:{zh:"\u542F\u7528\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Enable mouseover translation",zh_TW:"\u555F\u7528\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},selected_translation_alert:{zh:"\u5212\u8BCD\u7FFB\u8BD1\u7684\u5F00\u542F\u548C\u5173\u95ED\u8BF7\u5230\u201C\u89C4\u5219\u8BBE\u7F6E\u201D\u91CC\u9762\u8BBE\u7F6E\u3002",en:"To turn selected translation on or off, please go to \"Rule Settings\".",zh_TW:"\u5283\u8A5E\u7FFB\u8B6F\u7684\u958B\u555F\u548C\u95DC\u9589\u8ACB\u5230\u300C\u898F\u5247\u8A2D\u5B9A\u300D\u88E1\u9762\u8A2D\u5B9A\u3002"},mousehover_key_help:{zh:"\u5F53\u5FEB\u6377\u952E\u7F6E\u7A7A\u65F6\u8868\u793A\u9F20\u6807\u60AC\u505C\u76F4\u63A5\u7FFB\u8BD1",en:"When the shortcut key is empty, it means that the mouse hovers to translate directly",zh_TW:"\u7576\u5FEB\u6377\u9375\u7F6E\u7A7A\u6642\u8868\u793A\u6ED1\u9F20\u61F8\u505C\u76F4\u63A5\u7FFB\u8B6F"},autoscan_alt:{zh:"\u81EA\u52A8\u626B\u63CF",en:"Auto Scan",zh_TW:"\u81EA\u52D5\u6383\u63CF"},shadowroot_alt:{zh:"ShadowRoot",en:"ShadowRoot",zh_TW:"ShadowRoot"},richtext_alt:{zh:"\u4FDD\u7559\u5BCC\u6587\u672C",en:"Rich Text",zh_TW:"\u4FDD\u7559\u5BCC\u6587\u672C"},transonly_alt:{zh:"\u9690\u85CF\u539F\u6587",en:"Hide Original",zh_TW:"\u96B1\u85CF\u539F\u6587"},confirm_title:{zh:"\u786E\u8BA4",en:"Confirm",zh_TW:"\u78BA\u8A8D"},confirm_message:{zh:"\u786E\u5B9A\u64CD\u4F5C\u5417\uFF1F",en:"Are you sure you want to proceed?",zh_TW:"\u78BA\u5B9A\u64CD\u4F5C\u55CE\uFF1F"},confirm_action:{zh:"\u786E\u5B9A",en:"Confirm",zh_TW:"\u78BA\u5B9A"},cancel_action:{zh:"\u53D6\u6D88",en:"Cancel",zh_TW:"\u53D6\u6D88"},pls_press_shortcut:{zh:"\u8BF7\u6309\u4E0B\u5FEB\u6377\u952E\u7EC4\u5408",en:"Please press the shortcut key combination",zh_TW:"\u8ACB\u6309\u4E0B\u5FEB\u901F\u9375\u7D44\u5408"},load_setting_err:{zh:"\u6570\u636E\u52A0\u8F7D\u51FA\u9519\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u6216\u5378\u8F7D\u540E\u91CD\u65B0\u5B89\u88C5\u3002",en:"Please press the shortcut key combination",zh_TW:"\u8ACB\u6309\u4E0B\u5FEB\u901F\u9375\u7D44\u5408"},translation_style:{zh:"\u7FFB\u8BD1\u98CE\u683C",en:"Translation style",zh_TW:"\u7FFB\u8B6F\u98A8\u683C"},placeholder:{zh:"\u5360\u4F4D\u7B26",en:"Placeholder",zh_TW:"\u4F54\u4F4D\u7B26"},tag_name:{zh:"\u5360\u4F4D\u6807\u7B7E\u540D",en:"Placeholder tag name",zh_TW:"\u4F54\u4F4D\u6A19\u540D"},system_prompt_helper:{zh:"\u5728\u672A\u5B8C\u5168\u7406\u89E3\u9ED8\u8BA4Prompt\u7684\u60C5\u51B5\u4E0B\uFF0C\u8BF7\u52FF\u968F\u610F\u4FEE\u6539\uFF0C\u5426\u5219\u53EF\u80FD\u65E0\u6CD5\u5DE5\u4F5C\u3002",en:"Do not modify the default prompt without fully understanding it, otherwise it may not work.",zh_TW:"\u5728\u672A\u5B8C\u5168\u7406\u89E3\u9810\u8A2DPrompt\u7684\u60C5\u6CC1\u4E0B\uFF0C\u8ACB\u52FF\u96A8\u610F\u4FEE\u6539\uFF0C\u5426\u5247\u53EF\u80FD\u7121\u6CD5\u904B\u4F5C\u3002"},if_pre_init:{zh:"\u662F\u5426\u9884\u521D\u59CB\u5316",en:"Whether to pre-initialize",zh_TW:"\u662F\u5426\u9810\u521D\u59CB\u5316"},export_old:{zh:"\u5BFC\u51FA\u65E7\u7248",en:"Export old version",zh_TW:"\u532F\u51FA\u820A\u7248"},favorite_words_helper:{zh:"\u5BFC\u5165\u8BCD\u6C47\u8BF7\u4F7F\u7528txt\u6587\u4EF6\uFF0C\u6BCF\u4E00\u884C\u4E00\u4E2A\u5355\u8BCD\u3002",en:"To import vocabulary, please use a txt file with one word per line.",zh_TW:"\u532F\u5165\u8A5E\u5F59\u8ACB\u4F7F\u7528txt\u6587\u4EF6\uFF0C\u6BCF\u4E00\u884C\u4E00\u500B\u55AE\u5B57\u3002"},btn_tip_click_away:{zh:"\u5931\u7126\u9690\u85CF/\u663E\u793A",en:"Loss of focus hide/show",zh_TW:"\u5931\u7126\u96B1\u85CF/\u986F\u793A"},btn_tip_follow_selection:{zh:"\u8DDF\u968F/\u56FA\u5B9A\u6A21\u5F0F",en:"Follow/Fixed Mode",zh_TW:"\u8DDF\u96A8/\u56FA\u5B9A\u6A21\u5F0F"},btn_tip_simple_style:{zh:"\u8FF7\u4F60/\u5E38\u89C4\u6A21\u5F0F",en:"Mini/Regular Mode",zh_TW:"\u8FF7\u4F60/\u5E38\u898F\u6A21\u5F0F"},api_placeholder:{zh:"\u5360\u4F4D\u7B26",en:"Placeholder",zh_TW:"\u4F54\u4F4D\u7B26"},api_placetag:{zh:"\u5360\u4F4D\u6807\u7B7E",en:"Placeholder tags",zh_TW:"\u4F54\u4F4D\u6A19"},detected_lang:{zh:"\u8BED\u8A00\u68C0\u6D4B",en:"Language detection",zh_TW:"\u8A9E\u8A00\u5075\u6E2C"},detected_result:{zh:"\u68C0\u6D4B\u7ED3\u679C",en:"Detect result",zh_TW:"\u6AA2\u6E2C\u7D50\u679C"},subtitle_translate:{zh:"\u5B57\u5E55\u7FFB\u8BD1",en:"Subtitle translate",zh_TW:"\u5B57\u5E55\u7FFB\u8B6F"},toggle_subtitle_translate:{zh:"\u542F\u7528\u5B57\u5E55\u7FFB\u8BD1",en:"Enable subtitle translation",zh_TW:"\u555F\u7528\u5B57\u5E55\u7FFB\u8B6F"},is_bilingual_view:{zh:"\u53CC\u8BED\u663E\u793A",en:"Enable bilingual display",zh_TW:"\u96D9\u8A9E\u986F\u793A"},is_skip_ad:{zh:"\u662F\u5426\u5FEB\u8FDB\u5E7F\u544A",en:"Should I fast forward to the ad?",zh_TW:"\u662F\u5426\u5FEB\u8F49\u5EE3\u544A"},background_styles:{zh:"\u80CC\u666F\u6837\u5F0F",en:"DBackground Style",zh_TW:"\u80CC\u666F\u6A23\u5F0F"},origin_styles:{zh:"\u539F\u6587\u6837\u5F0F",en:"Original style",zh_TW:"\u539F\u6587\u6A23\u5F0F"},translation_styles:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Translation style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},ai_segmentation:{zh:"AI\u667A\u80FD\u65AD\u53E5",en:"AI intelligent punctuation",zh_TW:"AI\u667A\u6167\u65B7\u53E5"},ai_chunk_length:{zh:"AI\u5904\u7406\u5207\u5272\u957F\u5EA6(200-20000)",en:"AI processing chunk length(200-20000)",zh_TW:"AI\u5904\u7406\u5207\u5272\u957F\u5EA6(200-20000)"},subtitle_helper_1:{zh:"1\u3001\u76EE\u524D\u4EC5\u652F\u6301Youtube\u684C\u9762\u7F51\u7AD9\u3002",en:"1. Currently only supports Youtube desktop website.",zh_TW:"1.\u76EE\u524D\u50C5\u652F\u63F4Youtube\u684C\u9762\u7DB2\u7AD9\uFF0C\u4E14\u50C5\u652F\u63F4\u700F\u89BD\u5668\u64F4\u5145\u529F\u80FD\u3002"},subtitle_helper_2:{zh:"2\u3001\u63D2\u4EF6\u5185\u7F6E\u57FA\u7840\u7684\u5B57\u5E55\u5408\u5E76\u3001\u65AD\u53E5\u7B97\u6CD5\uFF0C\u53EF\u6EE1\u8DB3\u5927\u90E8\u5206\u60C5\u51B5\u3002",en:"2. The plug-in has built-in basic subtitle merging and sentence segmentation algorithms, which can meet most situations.",zh_TW:"2.\u63D2\u4EF6\u5167\u5EFA\u57FA\u790E\u7684\u5B57\u5E55\u5408\u4F75\u3001\u65B7\u53E5\u6F14\u7B97\u6CD5\uFF0C\u53EF\u6EFF\u8DB3\u5927\u90E8\u5206\u60C5\u6CC1\u3002"},subtitle_helper_3:{zh:"3\u3001\u4EA6\u53EF\u4EE5\u542F\u7528AI\u667A\u80FD\u65AD\u53E5\uFF0C\u4F46\u9700\u8003\u8651\u5207\u5272\u957F\u5EA6\u53CAAI\u63A5\u53E3\u80FD\u529B\uFF0C\u53EF\u80FD\u5904\u7406\u65F6\u95F4\u4F1A\u5F88\u957F\uFF0C\u751A\u81F3\u5904\u7406\u5931\u8D25\uFF0C\u5BFC\u81F4\u65E0\u6CD5\u770B\u5230\u5B57\u5E55\u3002",en:"3. You can also enable AI intelligent segmentation, but you need to consider the segmentation length and AI interface capabilities. The processing time may be very long or even fail, resulting in the inability to see subtitles.",zh_TW:"3.\u4EA6\u53EF\u555F\u7528AI\u667A\u80FD\u65B7\u53E5\uFF0C\u4F46\u9700\u8003\u616E\u5207\u5272\u9577\u5EA6\u53CAAI\u4ECB\u9762\u80FD\u529B\uFF0C\u53EF\u80FD\u8655\u7406\u6642\u9593\u6703\u5F88\u9577\uFF0C\u751A\u81F3\u8655\u7406\u5931\u6557\uFF0C\u5C0E\u81F4\u7121\u6CD5\u770B\u5230\u5B57\u5E55\u3002"},default_styles_example:{zh:"\u9ED8\u8BA4\u6837\u5F0F\u53C2\u8003\uFF1A",en:"Default styles reference:",zh_TW:"\u8A8D\u6A23\u5F0F\u53C3\u8003\uFF1A"},subtitle_load_succeed:{zh:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u6210\u529F\uFF01",en:"Bilingual subtitles loaded successfully!",zh_TW:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u6210\u529F\uFF01"},subtitle_load_failed:{zh:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u5931\u8D25\uFF01",en:"Failed to load bilingual subtitles!",zh_TW:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u5931\u8D25\uFF01"},try_get_subtitle_data:{zh:"\u5C1D\u8BD5\u83B7\u53D6\u5B57\u5E55\u6570\u636E\uFF0C\u8BF7\u7A0D\u5019...",en:"Trying to get subtitle data, please wait...",zh_TW:"\u5C1D\u8BD5\u83B7\u53D6\u5B57\u5E55\u6570\u636E\uFF0C\u8BF7\u7A0D\u5019..."},subtitle_data_processing:{zh:"\u5B57\u5E55\u6570\u636E\u5904\u7406\u4E2D...",en:"Subtitle data processing...",zh_TW:"\u5B57\u5E55\u6570\u636E\u5904\u7406\u4E2D..."},starting_to_process_subtitle:{zh:"\u5F00\u59CB\u5904\u7406\u5B57\u5E55\u6570\u636E...",en:"Starting to process subtitle data...",zh_TW:"\u5F00\u59CB\u5904\u7406\u5B57\u5E55\u6570\u636E..."},subtitle_data_is_ready:{zh:"\u5B57\u5E55\u6570\u636E\u5DF2\u51C6\u5907\u5C31\u7EEA\uFF0C\u8BF7\u70B9\u51FBKT\u6309\u94AE\u52A0\u8F7D",en:"The subtitle data is ready, please click the KT button to load it",zh_TW:"\u5B57\u5E55\u8CC7\u6599\u5DF2\u6E96\u5099\u5C31\u7DD2\uFF0C\u8ACB\u9EDE\u64CAKT\u6309\u9215\u52A0\u8F09"},log_level:{zh:"\u65E5\u5FD7\u7EA7\u522B",en:"Log Level",zh_TW:"\u65E5\u8A8C\u7B49\u7D1A"},goto_custom_api_example:{zh:"\u70B9\u51FB\u67E5\u770B\u3010\u81EA\u5B9A\u4E49\u63A5\u53E3\u793A\u4F8B\u3011",en:"Click to view [Custom Interface Example]",zh_TW:"\u9EDE\u9078\u67E5\u770B\u3010\u81EA\u8A02\u4ECB\u9762\u7BC4\u4F8B\u3011"},split_paragraph:{zh:"\u5207\u5206\u957F\u6BB5\u843D",en:"Split long paragraph",zh_TW:"\u5207\u5206\u9577\u6BB5\u843D"},split_length:{zh:"\u5207\u5206\u957F\u5EA6 (0-10000)",en:"Segmentation length(0-10000)",zh_TW:"\u5207\u5206\u9577\u5EA6(0-10000)"},highlight_words:{zh:"\u9AD8\u4EAE\u6536\u85CF\u8BCD\u6C47",en:"Highlight favorite words",zh_TW:"\u9AD8\u4EAE\u6536\u85CF\u8A5E\u5F59"},split_disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},split_textlength:{zh:"\u6309\u7167\u957F\u5EA6\u5207\u5206",en:"Split by length",zh_TW:"\u4F9D\u9577\u5EA6\u5207\u5206"},split_punctuation:{zh:"\u6309\u7167\u53E5\u5B50\u5207\u5206",en:"Split by sentence",zh_TW:"\u6309\u7167\u53E5\u5B50\u5207\u5206"},highlight_disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},highlight_beforetrans:{zh:"\u7FFB\u8BD1\u524D\u9AD8\u4EAE",en:"Highlight before translation",zh_TW:"\u7FFB\u8B6F\u524D\u9AD8\u4EAE"},highlight_aftertrans:{zh:"\u7FFB\u8BD1\u540E\u9AD8\u4EAE",en:"Highlight after translation",zh_TW:"\u7FFB\u8B6F\u5F8C\u9AD8\u4EAE"},pagescroll_root_margin:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u63D0\u524D\u89E6\u53D1 (0-10000px)",en:"Early triggering of scroll loading (0-10000px)",zh_TW:"\u6EFE\u52D5\u8F09\u5165\u63D0\u524D\u89F8\u767C (0-10000px)"}};const newI18n=lang=>key=>{var _I18N$key;return((_I18N$key=I18N[key])===null||_I18N$key===void 0?void 0:_I18N$key[lang])||"";}; +const UI_LANGS=(/* unused pure expression or super */ null && ([["en","English"],["zh","简体中文"],["zh_TW","繁體中文"]]));const customApiLangs="[\"en\", \"English - English\"],\n[\"zh-CN\", \"Simplified Chinese - \u7B80\u4F53\u4E2D\u6587\"],\n[\"zh-TW\", \"Traditional Chinese - \u7E41\u9AD4\u4E2D\u6587\"],\n[\"ar\", \"Arabic - \u0627\u0644\u0639\u0631\u0628\u064A\u0629\"],\n[\"bg\", \"Bulgarian - \u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438\"],\n[\"ca\", \"Catalan - Catal\xE0\"],\n[\"hr\", \"Croatian - Hrvatski\"],\n[\"cs\", \"Czech - \u010Ce\u0161tina\"],\n[\"da\", \"Danish - Dansk\"],\n[\"nl\", \"Dutch - Nederlands\"],\n[\"fi\", \"Finnish - Suomi\"],\n[\"fr\", \"French - Fran\xE7ais\"],\n[\"de\", \"German - Deutsch\"],\n[\"el\", \"Greek - \u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC\"],\n[\"hi\", \"Hindi - \u0939\u093F\u0928\u094D\u0926\u0940\"],\n[\"hu\", \"Hungarian - Magyar\"],\n[\"id\", \"Indonesian - Indonesia\"],\n[\"it\", \"Italian - Italiano\"],\n[\"ja\", \"Japanese - \u65E5\u672C\u8A9E\"],\n[\"ko\", \"Korean - \uD55C\uAD6D\uC5B4\"],\n[\"ms\", \"Malay - Melayu\"],\n[\"mt\", \"Maltese - Malti\"],\n[\"nb\", \"Norwegian - Norsk Bokm\xE5l\"],\n[\"pl\", \"Polish - Polski\"],\n[\"pt\", \"Portuguese - Portugu\xEAs\"],\n[\"ro\", \"Romanian - Rom\xE2n\u0103\"],\n[\"ru\", \"Russian - \u0420\u0443\u0441\u0441\u043A\u0438\u0439\"],\n[\"sk\", \"Slovak - Sloven\u010Dina\"],\n[\"sl\", \"Slovenian - Sloven\u0161\u010Dina\"],\n[\"es\", \"Spanish - Espa\xF1ol\"],\n[\"sv\", \"Swedish - Svenska\"],\n[\"ta\", \"Tamil - \u0BA4\u0BAE\u0BBF\u0BB4\u0BCD\"],\n[\"te\", \"Telugu - \u0C24\u0C46\u0C32\u0C41\u0C17\u0C41\"],\n[\"th\", \"Thai - \u0E44\u0E17\u0E22\"],\n[\"tr\", \"Turkish - T\xFCrk\xE7e\"],\n[\"uk\", \"Ukrainian - \u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430\"],\n[\"vi\", \"Vietnamese - Ti\u1EBFng Vi\u1EC7t\"],\n";const customApiHelpZH="// \u8BF7\u6C42\u6570\u636E\u9ED8\u8BA4\u683C\u5F0F\n{\n \"url\": \"{{url}}\",\n \"method\": \"POST\",\n \"headers\": {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{key}}\"\n },\n \"body\": {\n \"text\": \"{{text}}\", // \u5F85\u7FFB\u8BD1\u6587\u5B57\n \"from\": \"{{from}}\", // \u6587\u5B57\u7684\u8BED\u8A00\uFF08\u53EF\u80FD\u4E3A\u7A7A\uFF09\n \"to\": \"{{to}}\", // \u76EE\u6807\u8BED\u8A00\n },\n}\n\n\n// \u8FD4\u56DE\u6570\u636E\u9ED8\u8BA4\u683C\u5F0F\n{\n text: \"\", // \u7FFB\u8BD1\u540E\u7684\u6587\u5B57\n from: \"\", // \u8BC6\u522B\u7684\u6E90\u8BED\u8A00\n to: \"\", // \u76EE\u6807\u8BED\u8A00\uFF08\u53EF\u9009\uFF09\n}\n\n\n// Hook \u8303\u4F8B\n// URL\nhttps://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN\n\n// Request Hook\n(text, from, to, url, key) => [url, {\n headers: {\n \"Content-type\": \"application/json\",\n },\n method: \"GET\",\n body: null,\n}]\n\n// Response Hook\n// \u5176\u4E2D\u8FD4\u56DE\u6570\u7EC4\u7B2C\u4E00\u4E2A\u503C\u8868\u793A\u8BD1\u6587\u5B57\u7B26\u4E32\uFF0C\u7B2C\u4E8C\u4E2A\u503C\u4E3A\u5E03\u5C14\u503C\uFF0C\u8868\u793A\u539F\u6587\u8BED\u8A00\u4E0E\u76EE\u6807\u8BED\u8A00\u662F\u5426\u76F8\u540C\n(res, text, from, to) => [res.sentences.map((item) => item.trans).join(\" \"), to === res.src]\n\n\n// \u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u5982\u4E0B\n".concat(customApiLangs,"\n");const customApiHelpEN="// Default request\n{\n \"url\": \"{{url}}\",\n \"method\": \"POST\",\n \"headers\": {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{key}}\"\n },\n \"body\": {\n \"text\": \"{{text}}\", // Text to be translated\n \"from\": \"{{from}}\", // The language of the text (may be empty)\n \"to\": \"{{to}}\", // Target language\n },\n}\n\n\n// Default response\n{\n text: \"\", // translated text\n from: \"\", // Recognized source language\n to: \"\", // Target language (optional)\n}\n\n\n/// Hook Example\n// URL\nhttps://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN\n\n// Request Hook\n(text, from, to, url, key) => [url, {\n headers: {\n \"Content-type\": \"application/json\",\n },\n method: \"GET\",\n body: null,\n}]\n\n// Response Hook\n// In the returned array, the first value is the translated string, while the second value is a boolean\n// that indicates whether the source language is the same as the target language.\n(res, text, from, to) => [res.sentences.map((item) => item.trans).join(\" \"), to === res.src]\n\n\n// The supported language codes are as follows\n".concat(customApiLangs,"\n");const requestHookHelperZH="1\u3001\u7B2C\u4E00\u4E2A\u53C2\u6570\u5305\u542B\u5982\u4E0B\u5B57\u6BB5\uFF1A'texts', 'from', 'to', 'url', 'key', 'model', 'systemPrompt', ...\n2\u3001\u8FD4\u56DE\u503C\u5FC5\u987B\u662F\u5305\u542B\u4EE5\u4E0B\u5B57\u6BB5\u7684\u5BF9\u8C61\uFF1A 'url', 'body', 'headers', 'method'\n3\u3001\u5982\u8FD4\u56DE\u7A7A\u503C\uFF0C\u5219hook\u51FD\u6570\u4E0D\u4F1A\u4EA7\u751F\u4EFB\u4F55\u6548\u679C\u3002\n\n// \u793A\u4F8B\nasync (args, { url, body, headers, userMsg, method } = {}) => {\n return { url, body, headers, userMsg, method };\n}";const requestHookHelperEN="1. The first parameter contains the following fields: 'texts', 'from', 'to', 'url', 'key', 'model', 'systemPrompt', ...\n2. The return value must be an object containing the following fields: 'url', 'body', 'headers', 'method'\n3. If a null value is returned, the hook function will have no effect.\n\n// Example\nasync (args, { url, body, headers, userMsg, method } = {}) => {\n return { url, body, headers, userMsg, method };\n}";const responsetHookHelperZH="1\u3001\u7B2C\u4E00\u4E2A\u53C2\u6570\u5305\u542B\u5982\u4E0B\u5B57\u6BB5\uFF1A'res', ...\n2\u3001\u8FD4\u56DE\u503C\u5FC5\u987B\u662F\u5305\u542B\u4EE5\u4E0B\u5B57\u6BB5\u7684\u5BF9\u8C61\uFF1A 'translations'\n \uFF08'translations' \u5E94\u4E3A\u4E00\u4E2A\u4E8C\u7EF4\u6570\u7EC4\uFF1A[[\u8BD1\u6587, \u539F\u6587\u8BED\u8A00]]\uFF09\n3\u3001\u5982\u8FD4\u56DE\u7A7A\u503C\uFF0C\u5219hook\u51FD\u6570\u4E0D\u4F1A\u4EA7\u751F\u4EFB\u4F55\u6548\u679C\u3002\n\n// \u793A\u4F8B\nasync ({ res, ...args }) => {\n const translations = [[\"\u4F60\u597D\", \"en\"]];\n const modelMsg = {}; // \u7528\u4E8EAI\u4E0A\u4E0B\u6587\n return { translations, modelMsg };\n}";const responsetHookHelperEN="1. The first parameter contains the following fields: 'res', ...\n2. The return value must be an object containing the following fields: 'translations'\n ('translations' should be a two-dimensional array: [[translation, source language]]).\n3. If a null value is returned, the hook function will have no effect.\n\n// Example\nasync ({ res, ...args }) => {\n const translations = [[\"\u4F60\u597D\", \"en\"]];\n const modelMsg = {}; // For AI context\n return { translations, modelMsg };\n}";const I18N={app_name:{zh:"\u7B80\u7EA6\u7FFB\u8BD1",en:"KISS Translator",zh_TW:"\u7C21\u7D04\u7FFB\u8B6F"},translate:{zh:"\u7FFB\u8BD1",en:"Translate",zh_TW:"\u7FFB\u8B6F"},custom_api_help:{zh:customApiHelpZH,en:customApiHelpEN,zh_TW:customApiHelpZH},request_hook_helper:{zh:requestHookHelperZH,en:requestHookHelperEN,zh_TW:requestHookHelperZH},response_hook_helper:{zh:responsetHookHelperZH,en:responsetHookHelperEN,zh_TW:responsetHookHelperZH},translate_alt:{zh:"\u7FFB\u8BD1",en:"Translate",zh_TW:"\u7FFB\u8B6F"},basic_setting:{zh:"\u57FA\u672C\u8BBE\u7F6E",en:"Basic Setting",zh_TW:"\u57FA\u672C\u8A2D\u5B9A"},rules_setting:{zh:"\u89C4\u5219\u8BBE\u7F6E",en:"Rules Setting",zh_TW:"\u898F\u5247\u8A2D\u5B9A"},apis_setting:{zh:"\u63A5\u53E3\u8BBE\u7F6E",en:"Apis Setting",zh_TW:"API\u8A2D\u5B9A"},sync_setting:{zh:"\u540C\u6B65\u8BBE\u7F6E",en:"Sync Setting",zh_TW:"\u540C\u6B65\u8A2D\u5B9A"},patch_setting:{zh:"\u8865\u4E01\u8BBE\u7F6E",en:"Patch Setting",zh_TW:"\u4FEE\u88DC\u8A2D\u5B9A"},patch_setting_help:{zh:"\u9488\u5BF9\u4E00\u4E9B\u7279\u6B8A\u7F51\u7AD9\u7684\u4FEE\u6B63\u811A\u672C\uFF0C\u4EE5\u4FBF\u7FFB\u8BD1\u8F6F\u4EF6\u5F97\u5230\u66F4\u597D\u7684\u5C55\u793A\u6548\u679C\u3002",en:"Corrected scripts for some special websites so that the translation software can get better display results.",zh_TW:"\u91DD\u5C0D\u67D0\u4E9B\u7279\u6B8A\u7DB2\u7AD9\u7684\u4FEE\u6B63\u8173\u672C\uFF0C\u8B93\u7FFB\u8B6F\u8EDF\u9AD4\u6709\u66F4\u597D\u7684\u986F\u793A\u6548\u679C\u3002"},inject_webfix:{zh:"\u6CE8\u5165\u4FEE\u590D\u8865\u4E01",en:"Inject Webfix",zh_TW:"\u6CE8\u5165\u4FEE\u6B63\u88DC\u4E01"},about:{zh:"\u5173\u4E8E",en:"About",zh_TW:"\u95DC\u65BC"},about_md:{zh:"README.md",en:"README.en.md",zh_TW:"README.md"},about_md_local:{zh:"\u8BF7 [\u70B9\u51FB\u8FD9\u91CC](".concat("https://github.com/fishjar/kiss-translator",") \u67E5\u770B\u8BE6\u60C5\u3002"),en:"Please [click here](".concat("https://github.com/fishjar/kiss-translator",") for details."),zh_TW:"\u8ACB\u3010\u9EDE\u9019\u88E1\u3011\u67E5\u770B\u8A73\u7D30\u5167\u5BB9\u3002"},ui_lang:{zh:"\u754C\u9762\u8BED\u8A00",en:"Interface Language",zh_TW:"\u4ECB\u9762\u8A9E\u8A00"},fetch_limit:{zh:"\u6700\u5927\u5E76\u53D1\u8BF7\u6C42\u6570\u91CF (1-100)",en:"Maximum Number Of Concurrent Requests (1-100)",zh_TW:"\u6700\u5927\u540C\u6642\u8ACB\u6C42\u6578\u91CF (1-100)"},if_think:{zh:"\u542F\u7528\u6216\u7981\u7528\u6A21\u578B\u7684\u6DF1\u5EA6\u601D\u8003\u80FD\u529B",en:"Enable or disable the model\u2019s thinking behavior ",zh_TW:"\u555F\u7528\u6216\u505C\u7528\u6A21\u578B\u7684\u6DF1\u5EA6\u601D\u8003\u80FD\u529B"},think:{zh:"\u542F\u7528\u6DF1\u5EA6\u601D\u8003",en:"enable thinking",zh_TW:"\u555F\u7528\u6DF1\u5EA6\u601D\u8003"},nothink:{zh:"\u7981\u7528\u6DF1\u5EA6\u601D\u8003",en:"disable thinking",zh_TW:"\u505C\u7528\u6DF1\u5EA6\u601D\u8003"},think_ignore:{zh:"\u5FFD\u7565\u4EE5\u4E0B\u6A21\u578B\u7684\u8F93\u51FA,\u9017\u53F7(,)\u5206\u5272,\u5F53\u6A21\u578B\u652F\u6301\u601D\u8003\u4F46ollama\u4E0D\u652F\u6301\u65F6\u9700\u8981\u586B\u5199\u672C\u53C2\u6570",en:"Ignore the block for the following models, comma (,) separated",zh_TW:"\u5FFD\u7565\u4EE5\u4E0B\u6A21\u578B\u7684 \u8F38\u51FA\uFF0C\u4EE5\u9017\u865F (,) \u5206\u9694\uFF1B\u7576\u6A21\u578B\u652F\u63F4\u601D\u8003\u4F46 ollama \u4E0D\u652F\u63F4\u6642\u9700\u8981\u586B\u5BEB\u6B64\u53C3\u6578"},fetch_interval:{zh:"\u6BCF\u6B21\u8BF7\u6C42\u95F4\u9694\u65F6\u95F4 (0-5000ms)",en:"Time Between Requests (0-5000ms)",zh_TW:"\u6BCF\u6B21\u8ACB\u6C42\u9593\u9694\u6642\u9593 (0-5000ms)"},translate_interval:{zh:"\u7FFB\u8BD1\u95F4\u9694\u65F6\u95F4 (10-2000ms)",en:"Translation Interval (10-2000ms)",zh_TW:"\u7FFB\u8B6F\u9593\u9694\u6642\u9593 (10-2000ms)"},http_timeout:{zh:"\u8BF7\u6C42\u8D85\u65F6\u65F6\u95F4 (5000-60000ms)",en:"Request Timeout Time (5000-60000ms)",zh_TW:"\u8ACB\u6C42\u903E\u6642\u6642\u9593 (5000-60000ms)"},custom_header:{zh:"\u81EA\u5B9A\u4E49Header\u53C2\u6570",en:"Custom Header Params"},custom_header_help:{zh:"\u4F7F\u7528JSON\u683C\u5F0F\uFF0C\u4F8B\u5982 \"User-Agent\": \"Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0\"",en:"Use JSON format, for example \"User-Agent\": \"Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0\""},custom_body:{zh:"\u81EA\u5B9A\u4E49Body\u53C2\u6570",en:"Custom Body Params"},custom_body_help:{zh:"\u4F7F\u7528JSON\u683C\u5F0F\uFF0C\u4F8B\u5982 \"top_p\": 0.7",en:"Use JSON format, for example \"top_p\": 0.7"},min_translate_length:{zh:"\u6700\u5C0F\u7FFB\u8BD1\u5B57\u7B26\u6570 (1-100)",en:"Minimum number Of Translated Characters (1-100)",zh_TW:"\u6700\u5C0F\u7FFB\u8B6F\u5B57\u5143\u6578 (1-100)"},max_translate_length:{zh:"\u6700\u5927\u7FFB\u8BD1\u5B57\u7B26\u6570 (100-100000)",en:"Maximum number Of Translated Characters (100-100000)",zh_TW:"\u6700\u5927\u7FFB\u8B6F\u5B57\u5143\u6578 (100-100000)"},num_of_newline_characters:{zh:"\u6362\u884C\u5B57\u7B26\u6570 (1-1000)",en:"Number of Newline Characters (1-1000)",zh_TW:"\u63DB\u884C\u5B57\u5143\u6578 (1-1000)"},translate_service:{zh:"\u7FFB\u8BD1\u670D\u52A1",en:"Translate Service",zh_TW:"\u7FFB\u8B6F\u670D\u52D9"},translate_service_multiple:{zh:"\u7FFB\u8BD1\u670D\u52A1 (\u652F\u6301\u591A\u9009)",en:"Translation service (multiple supported)",zh_TW:"\u7FFB\u8B6F\u670D\u52D9 (\u652F\u63F4\u591A\u9078)"},translate_timing:{zh:"\u7FFB\u8BD1\u65F6\u673A",en:"Translate Timing",zh_TW:"\u7FFB\u8B6F\u6642\u6A5F"},mk_pagescroll:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u7FFB\u8BD1\uFF08\u63A8\u8350\uFF09",en:"Rolling Loading (Suggested)",zh_TW:"\u6EFE\u52D5\u8F09\u5165\u7FFB\u8B6F\uFF08\u5EFA\u8B70\uFF09"},mk_pageopen:{zh:"\u7ACB\u5373\u5168\u90E8\u7FFB\u8BD1",en:"Translate all now",zh_TW:"\u7ACB\u5373\u5168\u90E8\u7FFB\u8B6F"},mk_mouseover:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},mk_ctrlKey:{zh:"Control + \u9F20\u6807\u60AC\u505C",en:"Control + Mouseover",zh_TW:"Control + \u6ED1\u9F20\u61F8\u505C"},mk_shiftKey:{zh:"Shift + \u9F20\u6807\u60AC\u505C",en:"Shift + Mouseover",zh_TW:"Shift + \u6ED1\u9F20\u61F8\u505C"},mk_altKey:{zh:"Alt + \u9F20\u6807\u60AC\u505C",en:"Alt + Mouseover",zh_TW:"Alt + \u6ED1\u9F20\u61F8\u505C"},from_lang:{zh:"\u539F\u6587\u8BED\u8A00",en:"Source Language",zh_TW:"\u539F\u6587\u8A9E\u8A00"},to_lang:{zh:"\u76EE\u6807\u8BED\u8A00",en:"Target Language",zh_TW:"\u76EE\u6A19\u8A9E\u8A00"},to_lang2:{zh:"\u7B2C\u4E8C\u76EE\u6807\u8BED\u8A00",en:"Target Language 2",zh_TW:"\u7B2C\u4E8C\u76EE\u6A19\u8A9E\u8A00"},to_lang2_helper:{zh:"\u8BBE\u5B9A\u540E\uFF0C\u4E0E\u76EE\u6807\u8BED\u8A00\u4EA7\u751F\u4E92\u8BD1\u6548\u679C\uFF0C\u4F46\u4F9D\u8D56\u8FDC\u7A0B\u8BED\u8A00\u8BC6\u522B\u3002",en:"After setting, it will produce mutual translation effect with the target language, but it relies on remote language recognition.",zh_TW:"\u8A2D\u5B9A\u5F8C\u6703\u8207\u76EE\u6A19\u8A9E\u8A00\u4E92\u8B6F\uFF0C\u4F46\u4F9D\u8CF4\u9060\u7AEF\u8A9E\u8A00\u8B58\u5225\u3002"},text_style:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},text_style_alt:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},bg_color:{zh:"\u6837\u5F0F\u989C\u8272",en:"Style Color",zh_TW:"\u6A23\u5F0F\u984F\u8272"},remain_unchanged:{zh:"\u4FDD\u7559\u4E0D\u53D8",en:"Remain Unchanged",zh_TW:"\u4FDD\u7559\u4E0D\u8B8A"},google_api:{zh:"\u8C37\u6B4C\u7FFB\u8BD1\u63A5\u53E3",en:"Google Translate API",zh_TW:"Google \u7FFB\u8B6F\u4ECB\u9762"},default_selector:{zh:"\u9ED8\u8BA4\u9009\u62E9\u5668",en:"Default selector",zh_TW:"\u9810\u8A2D\u9078\u64C7\u5668"},selector_rules:{zh:"\u9009\u62E9\u5668\u89C4\u5219",en:"Selector Rules",zh_TW:"\u9078\u64C7\u5668\u898F\u5247"},save:{zh:"\u4FDD\u5B58",en:"Save",zh_TW:"\u5132\u5B58"},edit:{zh:"\u7F16\u8F91",en:"Edit",zh_TW:"\u7DE8\u8F2F"},cancel:{zh:"\u53D6\u6D88",en:"Cancel",zh_TW:"\u53D6\u6D88"},delete:{zh:"\u5220\u9664",en:"Delete",zh_TW:"\u522A\u9664"},reset:{zh:"\u91CD\u7F6E",en:"Reset",zh_TW:"\u91CD\u8A2D"},add:{zh:"\u6DFB\u52A0",en:"Add",zh_TW:"\u65B0\u589E"},inject_rules:{zh:"\u6CE8\u5165\u8BA2\u9605\u89C4\u5219",en:"Inject Subscribe Rules",zh_TW:"\u6CE8\u5165\u8A02\u95B1\u898F\u5247"},personal_rules:{zh:"\u4E2A\u4EBA\u89C4\u5219",en:"Rules",zh_TW:"\u500B\u4EBA\u898F\u5247"},subscribe_rules:{zh:"\u8BA2\u9605\u89C4\u5219",en:"Subscribe",zh_TW:"\u8A02\u95B1\u898F\u5247"},overwrite_subscribe_rules:{zh:"\u8986\u5199\u8BA2\u9605\u89C4\u5219",en:"Overwrite",zh_TW:"\u8986\u5BEB\u8A02\u95B1\u898F\u5247"},subscribe_url:{zh:"\u8BA2\u9605\u5730\u5740",en:"Subscribe URL",zh_TW:"\u8A02\u95B1\u7DB2\u5740"},rules_warn_1:{zh:"1\u3001\u89C4\u5219\u751F\u6548\u7684\u4F18\u5148\u7EA7\u4F9D\u6B21\u4E3A\uFF1A\u4E2A\u4EBA\u89C4\u5219 > \u8BA2\u9605\u89C4\u5219 > \u5168\u5C40\u89C4\u5219\u3002\"\u5168\u5C40\u89C4\u5219\"\u76F8\u5F53\u4E8E\u515C\u5E95\u89C4\u5219\u3002",en:"1. The priority of rules is: personal rules > subscription rules > global rules. \"Global rules\" are like a fallback rule.",zh_TW:"1.\u898F\u5247\u751F\u6548\u7684\u512A\u5148\u9806\u5E8F\u4F9D\u5E8F\u70BA\uFF1A\u500B\u4EBA\u898F\u5247 > \u8A02\u95B1\u898F\u5247 > \u5168\u57DF\u898F\u5247\u3002 \"\u5168\u57DF\u898F\u5247\"\u76F8\u7576\u65BC\u515C\u5E95\u898F\u5247\u3002"},rules_warn_2:{zh:"2\u3001\u201C\u8BA2\u9605\u89C4\u5219\u201D\u9009\u62E9\u6CE8\u5165\u540E\u624D\u4F1A\u751F\u6548\u3002",en:"2. \"Subscription rules\" will take effect only after injection is selected.",zh_TW:"2\u3001\u300C\u8A02\u95B1\u898F\u5247\u300D\u9078\u64C7\u6CE8\u5165\u5F8C\u624D\u6703\u751F\u6548\u3002"},rules_warn_3:{zh:"3\u3001\u5173\u4E8E\u89C4\u5219\u586B\u5199\uFF1A\u8F93\u5165\u6846\u7559\u7A7A\u6216\u4E0B\u62C9\u6846\u9009\u201C*\u201D\u8868\u793A\u91C7\u7528\u5168\u5C40\u89C4\u5219\u3002",en:"3. Regarding filling in the rules: Leave the input box blank or select \"*\" in the drop-down box to use global rule.",zh_TW:"3. \u898F\u5247\u586B\u5BEB\u8AAA\u660E\uFF1A\u8F38\u5165\u6846\u7559\u7A7A\u6216\u4E0B\u62C9\u9078\u64C7\u300C*\u300D\u8868\u793A\u4F7F\u7528\u5168\u57DF\u898F\u5247\u3002"},sync_warn:{zh:"\u6D89\u53CA\u9690\u79C1\u6570\u636E\u7684\u540C\u6B65\u8BF7\u8C28\u614E\u9009\u62E9\u7B2C\u4E09\u65B9\u540C\u6B65\u670D\u52A1\uFF0C\u5EFA\u8BAE\u81EA\u884C\u642D\u5EFA kiss-worker \u6216 WebDAV \u670D\u52A1\u3002",en:"When synchronizing data that involves privacy, please be cautious about choosing third-party sync services. It is recommended to set up your own sync service using kiss-worker or WebDAV.",zh_TW:"\u540C\u6B65\u6D89\u53CA\u96B1\u79C1\u8CC7\u6599\u6642\uFF0C\u8ACB\u8B39\u614E\u9078\u64C7\u7B2C\u4E09\u65B9\u540C\u6B65\u670D\u52D9\uFF1B\u5EFA\u8B70\u81EA\u5EFA kiss-worker \u6216 WebDAV \u670D\u52D9\u3002"},sync_warn_2:{zh:"\u5982\u679C\u670D\u52A1\u5668\u5B58\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u540C\u6B65\u7684\u6570\u636E\uFF0C\u7B2C\u4E00\u6B21\u540C\u6B65\u5C06\u76F4\u63A5\u8986\u76D6\u672C\u5730\u914D\u7F6E\uFF0C\u540E\u9762\u5219\u6839\u636E\u4FEE\u6539\u65F6\u95F4\uFF0C\u65B0\u7684\u8986\u76D6\u65E7\u7684\u3002",en:"If the server has data synchronized by other clients, the first synchronization will directly overwrite the local configuration, and later, according to the modification time, the new one will overwrite the old one.",zh_TW:"\u82E5\u4F3A\u670D\u5668\u4E0A\u5B58\u5728\u5176\u4ED6\u7528\u6236\u7AEF\u540C\u6B65\u7684\u8CC7\u6599\uFF0C\u7B2C\u4E00\u6B21\u540C\u6B65\u6703\u76F4\u63A5\u8986\u84CB\u672C\u6A5F\u8A2D\u5B9A\uFF1B\u4E4B\u5F8C\u5247\u4F9D\u4FEE\u6539\u6642\u9593\uFF0C\u7531\u65B0\u7684\u8986\u84CB\u820A\u7684\u3002"},about_sync_api:{zh:"\u81EA\u5EFAkiss-wroker\u6570\u636E\u540C\u6B65\u670D\u52A1",en:"Self-hosting a Kiss-worker data sync service",zh_TW:"\u81EA\u5EFA kiss-wroker \u8CC7\u6599\u540C\u6B65\u670D\u52D9"},about_api:{zh:"1\u3001\u5176\u4E2D BuiltinAI \u4E3A\u6D4F\u89C8\u5668\u5185\u7F6EAI\u7FFB\u8BD1\uFF0C\u76EE\u524D\u4EC5 Chrome 138 \u53CA\u4EE5\u4E0A\u7248\u672C\u5F97\u5230\u652F\u6301\u3002",en:"1. BuiltinAI is the browser's built-in AI translation, which is currently only supported by Chrome 138 and above.",zh_TW:"1.\u5176\u4E2D BuiltinAI \u70BA\u700F\u89BD\u5668\u5167\u5EFAAI\u7FFB\u8B6F\uFF0C\u76EE\u524D\u50C5 Chrome 138 \u4EE5\u4E0A\u7248\u672C\u652F\u63F4\u3002"},about_api_2:{zh:"2\u3001\u5927\u90E8\u5206AI\u63A5\u53E3\u90FD\u4E0EOpenAI\u517C\u5BB9\uFF0C\u56E0\u6B64\u9009\u62E9\u6DFB\u52A0OpenAI\u7C7B\u578B\u5373\u53EF\u3002It should be noted that Prompt has two types: batch translation and nobatch translation. Not all interfaces support batch translation.",en:"2. Most AI interfaces are compatible with OpenAI, so just choose to add the OpenAI type.",zh_TW:"2.\u5927\u90E8\u5206AI\u4ECB\u9762\u90FD\u8207OpenAI\u76F8\u5BB9\uFF0C\u56E0\u6B64\u9078\u64C7\u65B0\u589EOpenAI\u985E\u578B\u5373\u53EF\u3002\u8981\u6CE8\u610F\u7684\u662FPrompt\u5206\u805A\u5408\u7FFB\u8B6F\u548C\u975E\u805A\u5408\u7FFB\u8B6F\u5169\u7A2E\uFF0C\u4E0D\u662F\u6240\u6709\u4ECB\u9762\u90FD\u652F\u63F4\u805A\u5408\u7FFB\u8B6F\u3002"},about_api_3:{zh:"3\u3001\u6682\u672A\u5217\u51FA\u7684\u63A5\u53E3\uFF0C\u7406\u8BBA\u4E0A\u90FD\u53EF\u4EE5\u901A\u8FC7\u81EA\u5B9A\u4E49\u63A5\u53E3 (Custom) \u7684\u5F62\u5F0F\u652F\u6301\u3002",en:"3. Interfaces that have not yet been launched can theoretically be supported through custom interfaces.",zh_TW:"3\u3001\u66AB\u672A\u5217\u51FA\u7684\u4ECB\u9762\uFF0C\u7406\u8AD6\u4E0A\u90FD\u53EF\u900F\u904E\u81EA\u8A02\u4ECB\u9762 (Custom) \u7684\u5F62\u5F0F\u652F\u63F4\u3002"},about_api_proxy:{zh:"\u67E5\u770B\u81EA\u5EFA\u4E00\u4E2A\u7FFB\u8BD1\u63A5\u53E3\u4EE3\u7406",en:"Check out the self-built translation interface proxy",zh_TW:"\u67E5\u770B\u5982\u4F55\u81EA\u5EFA\u7FFB\u8B6F\u4ECB\u9762 Proxy"},setting_helper:{zh:"\u65B0\u65E7\u914D\u7F6E\u5E76\u4E0D\u517C\u5BB9\uFF0C\u5BFC\u51FA\u7684\u65E7\u7248\u914D\u7F6E\uFF0C\u52FF\u518D\u6B21\u5BFC\u5165\u3002",en:"The old and new configurations are not compatible. Do not import the exported old configuration again.",zh_TW:"\u65B0\u820A\u914D\u7F6E\u4E26\u4E0D\u76F8\u5BB9\uFF0C\u532F\u51FA\u7684\u820A\u7248\u914D\u7F6E\uFF0C\u52FF\u518D\u6B21\u532F\u5165\u3002"},style_none:{zh:"\u65E0",en:"None",zh_TW:"\u7121"},under_line:{zh:"\u4E0B\u5212\u76F4\u7EBF",en:"Underline",zh_TW:"\u4E0B\u5283\u76F4\u7DDA"},dot_line:{zh:"\u4E0B\u5212\u70B9\u72B6\u7EBF",en:"Dotted Underline",zh_TW:"\u4E0B\u5283\u9EDE\u72C0\u7DDA"},dash_line:{zh:"\u4E0B\u5212\u865A\u7EBF",en:"Dashed Underline",zh_TW:"\u4E0B\u5283\u865B\u7DDA"},dash_box:{zh:"\u865A\u7EBF\u6846",en:"Dashed Box"},dash_line_bold:{zh:"\u4E0B\u5212\u865A\u7EBF\u52A0\u7C97",en:"Dashed Underline Bold",zh_TW:"\u4E0B\u5283\u865B\u7DDA"},dash_box_bold:{zh:"\u865A\u7EBF\u6846\u52A0\u7C97",en:"Dashed Box Bold",zh_TW:"\u865B\u7DDA\u6846\u52A0\u7C97"},marker:{zh:"\u9A6C\u514B\u7B14",en:"Marker",zh_TW:"\u99AC\u514B\u7B46"},gradient_marker:{zh:"\u6E10\u53D8\u9A6C\u514B\u7B14",en:"Gradient Marker",zh_TW:"\u6F38\u5C64\u99AC\u514B\u7B46"},wavy_line:{zh:"\u4E0B\u5212\u6CE2\u6D6A\u7EBF",en:"Wavy Underline",zh_TW:"\u4E0B\u5283\u6CE2\u6D6A\u7DDA"},wavy_line_bold:{zh:"\u4E0B\u5212\u6CE2\u6D6A\u7EBF\u52A0\u7C97",en:"Wavy Underline Bold",zh_TW:"\u4E0B\u5283\u6CE2\u6D6A\u7DDA\u52A0\u7C97"},fuzzy:{zh:"\u6A21\u7CCA",en:"Fuzzy",zh_TW:"\u6A21\u7CCA"},highlight:{zh:"\u9AD8\u4EAE",en:"Highlight",zh_TW:"\u53CD\u767D\u6A19\u793A"},blockquote:{zh:"\u5F15\u7528",en:"Blockquote",zh_TW:"\u5F15\u7528"},gradient:{zh:"\u6E10\u53D8",en:"Gradient",zh_TW:"\u6F38\u8B8A"},blink:{zh:"\u95EA\u73B0",en:"Blink",zh_TW:"\u9583\u73FE"},glow:{zh:"\u53D1\u5149",en:"Glow",zh_TW:"\u767C\u5149"},colorful:{zh:"\u591A\u5F69",en:"Colorful",zh_TW:"\u591A\u5F69"},setting:{zh:"\u8BBE\u7F6E",en:"Setting",zh_TW:"\u8A2D\u5B9A"},pattern:{zh:"\u5339\u914D\u7F51\u5740",en:"URL pattern",zh_TW:"\u5339\u914D\u7DB2\u5740"},pattern_helper:{zh:"1\u3001\u652F\u6301\u661F\u53F7(*)\u901A\u914D\u7B26\u30022\u3001\u591A\u4E2AURL\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\u3002",en:"1. Supports the asterisk (*) wildcard character. 2. Separate multiple URLs with newlines or English commas \",\".",zh_TW:"1. \u652F\u63F4\u661F\u865F (*) \u842C\u7528\u5B57\u5143\u30022. \u591A\u500B URL \u8ACB\u4EE5\u63DB\u884C\u6216\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u3002"},selector_helper:{zh:"1\u3001\u9700\u8981\u7FFB\u8BD1\u7684\u76EE\u6807\u5143\u7D20\u30022\u3001\u5F00\u542F\u81EA\u52A8\u626B\u63CF\u9875\u9762\u540E\uFF0C\u672C\u8BBE\u7F6E\u65E0\u6548\u30023\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. The target element to be translated. 2. This setting is invalid when automatic page scanning is enabled. 3. Follow the CSS selector syntax.",zh_TW:"1\u3001\u9700\u8981\u7FFB\u8B6F\u7684\u76EE\u6A19\u5143\u7D20\u3002 2.\u958B\u555F\u81EA\u52D5\u6383\u63CF\u9801\u9762\u5F8C\uFF0C\u672C\u8A2D\u5B9A\u7121\u6548\u3002 3.\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},translate_switch:{zh:"\u5F00\u542F\u7FFB\u8BD1",en:"Translate Switch",zh_TW:"\u958B\u555F\u7FFB\u8B6F"},default_enabled:{zh:"\u9ED8\u8BA4\u5F00\u542F",en:"Enabled",zh_TW:"\u9810\u8A2D\u958B\u555F"},default_disabled:{zh:"\u9ED8\u8BA4\u5173\u95ED",en:"Disabled",zh_TW:"\u9810\u8A2D\u95DC\u9589"},selector:{zh:"\u9009\u62E9\u5668",en:"Selector",zh_TW:"\u9078\u64C7\u5668"},target_selector:{zh:"\u76EE\u6807\u5143\u7D20\u9009\u62E9\u5668",en:"Target element selector",zh_TW:"\u76EE\u6A19\u5143\u7D20\u9078\u64C7\u5668"},keep_selector:{zh:"\u4FDD\u7559\u5143\u7D20\u9009\u62E9\u5668",en:"Keep unchanged selector",zh_TW:"\u4FDD\u7559\u5143\u7D20\u9078\u64C7\u5668"},keep_selector_helper:{zh:"1\u3001\u76EE\u6807\u5143\u7D20\u4E0B\u9762\u9700\u8981\u539F\u6837\u4FDD\u7559\u7684\u5B50\u8282\u70B9\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. The child nodes under the target element need to remain intact. 2. Follow the CSS selector syntax.",zh_TW:"1. \u76EE\u6A19\u5143\u7D20\u4E0B\u7684\u5B50\u7BC0\u9EDE\u9700\u8981\u4FDD\u6301\u539F\u6A23\u3002 2. \u9075\u5FAA CSS \u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},root_selector:{zh:"\u6839\u8282\u70B9\u9009\u62E9\u5668",en:"Root node selector",zh_TW:"\u6839\u7BC0\u9EDE\u9078\u64C7\u5668"},root_selector_helper:{zh:"1\u3001\u7528\u4E8E\u7F29\u5C0F\u9875\u9762\u7FFB\u8BD1\u8303\u56F4\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. Used to narrow the translation scope of the page. 2. Follow the CSS selector syntax.",zh_TW:"1.\u7528\u65BC\u7E2E\u5C0F\u9801\u9762\u7FFB\u8B6F\u7BC4\u570D\u3002 2\u3001\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},ignore_selector:{zh:"\u4E0D\u7FFB\u8BD1\u8282\u70B9\u9009\u62E9\u5668",en:"Ignore node selectors",zh_TW:"\u4E0D\u7FFB\u8B6F\u7BC0\u9EDE\u9078\u64C7\u5668"},ignore_selector_helper:{zh:"1\u3001\u9700\u8981\u5FFD\u7565\u7684\u8282\u70B9\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. Nodes to be ignored. 2. Follow CSS selector syntax.",zh_TW:"1\u3001\u9700\u8981\u5FFD\u7565\u7684\u7BC0\u9EDE\u3002 2\u3001\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},terms:{zh:"\u4E13\u4E1A\u672F\u8BED",en:"Terms",zh_TW:"\u5C08\u696D\u8853\u8A9E"},terms_helper:{zh:"1\u3001\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\uFF0C\u65E0\u9700\u659C\u6746\uFF0C\u4E0D\u652F\u6301\u4FEE\u9970\u7B26\u30022\u3001\u591A\u6761\u672F\u8BED\u7528\u6362\u884C\u6216\u5206\u53F7\u201C;\u201D\u9694\u5F00\u30023\u3001\u672F\u8BED\u548C\u8BD1\u6587\u7528\u82F1\u6587\u9017\u53F7\u201C,\u201D\u9694\u5F00\u30024\u3001\u6CA1\u6709\u8BD1\u6587\u89C6\u4E3A\u4E0D\u7FFB\u8BD1\u672F\u8BED\u3002",en:"1. Supports regular expression matching, no slash required, and no modifiers are supported. 2. Separate multiple terms with newlines or semicolons \";\". 3. Terms and translations are separated by English commas \",\". 4. If there is no translation, the term will be deemed not to be translated.",zh_TW:"1. \u652F\u63F4\u6B63\u5247\u8868\u9054\u5F0F\u6BD4\u5C0D\uFF0C\u7121\u9700\u659C\u7DDA\uFF0C\u4E14\u4E0D\u652F\u63F4\u4FEE\u98FE\u7B26\u30022. \u591A\u689D\u8853\u8A9E\u4EE5\u63DB\u884C\u6216\u5206\u865F\u300C;\u300D\u5206\u9694\u30023. \u8853\u8A9E\u8207\u8B6F\u6587\u4EE5\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u30024. \u7121\u8B6F\u6587\u8005\u8996\u70BA\u4E0D\u7FFB\u8B6F\u8A72\u8853\u8A9E\u3002"},ai_terms:{zh:"AI\u4E13\u4E1A\u672F\u8BED",en:"AI Terms",zh_TW:"AI\u5C08\u696D\u8853\u8A9E"},ai_terms_helper:{zh:"1\u3001AI\u667A\u80FD\u66FF\u6362\uFF0C\u4E0D\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\u30022\u3001\u591A\u6761\u672F\u8BED\u7528\u6362\u884C\u6216\u5206\u53F7\u201C;\u201D\u9694\u5F00\u30023\u3001\u672F\u8BED\u548C\u8BD1\u6587\u7528\u82F1\u6587\u9017\u53F7\u201C,\u201D\u9694\u5F00\u30024\u3001\u6CA1\u6709\u8BD1\u6587\u89C6\u4E3A\u4E0D\u7FFB\u8BD1\u672F\u8BED\u3002",en:"1. AI intelligent replacement does not support regular expressions.2. Separate multiple terms with newlines or semicolons \";\". 3. Terms and translations are separated by English commas \",\". 4. If there is no translation, the term will be deemed not to be translated.",zh_TW:"1.AI\u667A\u80FD\u66FF\u63DB\uFF0C\u4E0D\u652F\u63F4\u6B63\u898F\u8868\u793A\u5F0F\u30022. \u591A\u689D\u8853\u8A9E\u4EE5\u63DB\u884C\u6216\u5206\u865F\u300C;\u300D\u5206\u9694\u30023. \u8853\u8A9E\u8207\u8B6F\u6587\u4EE5\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u30024. \u7121\u8B6F\u6587\u8005\u8996\u70BA\u4E0D\u7FFB\u8B6F\u8A72\u8853\u8A9E\u3002"},text_ext_style:{zh:"\u8BD1\u6587\u9644\u52A0\u6837\u5F0F",en:"Translation additional styles",zh_TW:"\u8B6F\u6587\u9644\u52A0\u6A23\u5F0F"},selector_style:{zh:"\u9009\u62E9\u5668\u8282\u70B9\u6837\u5F0F",en:"Selector Style",zh_TW:"\u9078\u64C7\u5668\u7BC0\u9EDE\u6A23\u5F0F"},terms_style:{zh:"\u4E13\u4E1A\u672F\u8BED\u6837\u5F0F",en:"Terms Style",zh_TW:"\u5C08\u696D\u8853\u8A9E\u6A23\u5F0F"},highlight_style:{zh:"\u8BCD\u6C47\u9AD8\u4EAE\u6837\u5F0F",en:"Fav Words highlight style",zh_TW:"\u8A5E\u5F59\u9AD8\u4EAE\u6A23\u5F0F"},selector_style_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\u3002",en:"It is injected when translation is turned on.",zh_TW:"\u5728\u958B\u555F\u7FFB\u8B6F\u6642\u6CE8\u5165\u3002"},selector_parent_style:{zh:"\u9009\u62E9\u5668\u7236\u8282\u70B9\u6837\u5F0F",en:"Parent Selector Style",zh_TW:"\u9078\u64C7\u5668\u7236\u7BC0\u9EDE\u6A23\u5F0F"},selector_grand_style:{zh:"\u9009\u62E9\u5668\u7956\u8282\u70B9\u6837\u5F0F",en:"Grand Selector Style",zh_TW:"\u9078\u64C7\u5668\u7956\u7BC0\u9EDE\u6A23\u5F0F"},inject_js:{zh:"\u6CE8\u5165JS",en:"Inject JS",zh_TW:"\u6CE8\u5165 JS"},inject_js_helper:{zh:"\u9884\u52A0\u8F7D\u65F6\u6CE8\u5165\uFF0C\u4E00\u4E2A\u9875\u9762\u4EC5\u8FD0\u884C\u4E00\u6B21\u3002\u5185\u7F6E\u5168\u5C40\u5BF9\u8C61 KT: {\n apiTranslate,\n apiDectect,\n apiSetting,\n apisMap,\n toLang,\n docInfo,\n glossary,\n }",en:"Injected during preload, runs only once per page. Built-in global object KT: {\n apiTranslate,\n apiDectect,\n apiSetting,\n apisMap,\n toLang,\n docInfo,\n glossary,\n }",zh_TW:"\u9810\u5148\u8F09\u5165\u6642\u6CE8\u5165\uFF0C\u4E00\u500B\u9801\u9762\u50C5\u904B\u884C\u4E00\u6B21\u3002\u5167\u5EFA\u5168\u57DF\u7269\u4EF6 KT: {\n apiTranslate,\n apiDectect,\n apiSetting,\n apisMap,\n toLang,\n docInfo,\n glossary,\n }"},inject_css:{zh:"\u6CE8\u5165CSS",en:"Inject CSS",zh_TW:"\u6CE8\u5165 CSS"},inject_css_helper:{zh:"\u521D\u59CB\u5316\u65F6\u6CE8\u5165\u8FD0\u884C\uFF0C\u4E00\u4E2A\u9875\u9762\u4EC5\u8FD0\u884C\u4E00\u6B21\u3002",en:"Injected and run at initialization, and only run once per page.",zh_TW:"\u521D\u59CB\u5316\u6642\u6CE8\u5165\u904B\u884C\uFF0C\u4E00\u500B\u9801\u9762\u50C5\u904B\u884C\u4E00\u6B21\u3002"},fixer_function:{zh:"\u4FEE\u590D\u51FD\u6570",en:"Fixer Function",zh_TW:"\u4FEE\u5FA9\u51FD\u5F0F"},fixer_function_helper:{zh:"1\u3001br\u662F\u5C06
\u6362\u884C\u66FF\u6362\u6210

\u30022\u3001bn\u662F\u5C06\\n\u6362\u884C\u66FF\u6362\u6210

\u30023\u3001brToDiv\u548CbnToDiv\u662F\u66FF\u6362\u6210

\u3002",en:"1. br replaces
line breaks with

. 2. bn replaces \\n newline with

. 3. brToDiv and bnToDiv are replaced with

.",zh_TW:"1. br \u6703\u5C07
\u63DB\u884C\u66FF\u63DB\u70BA

\u30022. bn \u6703\u5C07 \\n \u63DB\u884C\u66FF\u63DB\u70BA

\u30023. brToDiv \u8207 bnToDiv \u6703\u66FF\u63DB\u70BA

\u3002"},import:{zh:"\u5BFC\u5165",en:"Import",zh_TW:"\u532F\u5165"},export:{zh:"\u5BFC\u51FA",en:"Export",zh_TW:"\u532F\u51FA"},export_translation:{zh:"\u5BFC\u51FA\u91CA\u4E49",en:"Export Translation",zh_TW:"\u532F\u51FA\u91CB\u7FA9"},error_cant_be_blank:{zh:"\u4E0D\u80FD\u4E3A\u7A7A",en:"Can not be blank",zh_TW:"\u4E0D\u53EF\u70BA\u7A7A"},error_duplicate_values:{zh:"\u5B58\u5728\u91CD\u590D\u7684\u503C",en:"There are duplicate values",zh_TW:"\u5B58\u5728\u91CD\u8907\u7684\u503C"},error_wrong_file_type:{zh:"\u9519\u8BEF\u7684\u6587\u4EF6\u7C7B\u578B",en:"Wrong file type",zh_TW:"\u6A94\u6848\u985E\u578B\u932F\u8AA4"},error_fetch_url:{zh:"\u8BF7\u68C0\u67E5url\u5730\u5740\u662F\u5426\u6B63\u786E\u6216\u7A0D\u540E\u518D\u8BD5\u3002",en:"Please check if the url address is correct or try again later.",zh_TW:"\u8ACB\u6AA2\u67E5 URL \u662F\u5426\u6B63\u78BA\u6216\u7A0D\u5F8C\u518D\u8A66\u3002"},deepl_api:{zh:"DeepL \u63A5\u53E3",en:"DeepL API",zh_TW:"DeepL \u4ECB\u9762"},deepl_key:{zh:"DeepL \u5BC6\u94A5",en:"DeepL Key",zh_TW:"DeepL \u91D1\u9470"},openai_api:{zh:"OpenAI \u63A5\u53E3",en:"OpenAI API",zh_TW:"OpenAI \u4ECB\u9762"},openai_key:{zh:"OpenAI \u5BC6\u94A5",en:"OpenAI Key",zh_TW:"OpenAI \u91D1\u9470"},openai_model:{zh:"OpenAI \u6A21\u578B",en:"OpenAI Model",zh_TW:"OpenAI \u6A21\u578B"},openai_prompt:{zh:"OpenAI \u63D0\u793A\u8BCD",en:"OpenAI Prompt",zh_TW:"OpenAI \u63D0\u793A\u8A5E"},if_clear_cache:{zh:"\u662F\u5426\u6E05\u9664\u7F13\u5B58\uFF08\u9ED8\u8BA4\u7F13\u5B587\u5929\uFF09",en:"Whether clear cache (Default cache is 7 days)",zh_TW:"\u662F\u5426\u6E05\u9664\u5FEB\u53D6\uFF08\u9810\u8A2D\u5FEB\u53D67\u5929\uFF09"},clear_cache_never:{zh:"\u4E0D\u6E05\u9664\u7F13\u5B58",en:"Never clear cache",zh_TW:"\u4E0D\u6E05\u9664\u5FEB\u53D6"},clear_cache_restart:{zh:"\u91CD\u542F\u6D4F\u89C8\u5668\u65F6\u6E05\u9664\u7F13\u5B58",en:"Clear cache when restarting browser",zh_TW:"\u91CD\u65B0\u555F\u52D5\u700F\u89BD\u5668\u6642\u6E05\u9664\u5FEB\u53D6"},data_sync_type:{zh:"\u6570\u636E\u540C\u6B65\u65B9\u5F0F",en:"Data Sync Type",zh_TW:"\u8CC7\u6599\u540C\u6B65\u65B9\u5F0F"},data_sync_url:{zh:"\u6570\u636E\u540C\u6B65\u63A5\u53E3",en:"Data Sync API",zh_TW:"\u8CC7\u6599\u540C\u6B65\u4ECB\u9762"},data_sync_user:{zh:"\u6570\u636E\u540C\u6B65\u8D26\u6237",en:"Data Sync User",zh_TW:"\u8CC7\u6599\u540C\u6B65\u5E33\u865F"},data_sync_key:{zh:"\u6570\u636E\u540C\u6B65\u5BC6\u94A5",en:"Data Sync Key",zh_TW:"\u8CC7\u6599\u540C\u6B65\u91D1\u9470"},sync_now:{zh:"\u7ACB\u5373\u540C\u6B65",en:"Sync Now",zh_TW:"\u7ACB\u5373\u540C\u6B65"},sync_success:{zh:"\u540C\u6B65\u6210\u529F\uFF01",en:"Sync Success",zh_TW:"\u540C\u6B65\u6210\u529F\uFF01"},sync_failed:{zh:"\u540C\u6B65\u5931\u8D25\uFF01",en:"Sync Error",zh_TW:"\u540C\u6B65\u5931\u6557\uFF01"},error_got_some_wrong:{zh:"\u62B1\u6B49\uFF0C\u51FA\u9519\u4E86\uFF01",en:"Sorry, something went wrong!",zh_TW:"\u62B1\u6B49\uFF0C\u767C\u751F\u932F\u8AA4\uFF01"},error_sync_setting:{zh:"\u60A8\u7684\u540C\u6B65\u7C7B\u578B\u5FC5\u987B\u4E3A\u201CKISS-Worker\u201D\uFF0C\u4E14\u9700\u586B\u5199\u5B8C\u6574",en:"Your sync type must be \"KISS-Worker\" and must be filled in completely",zh_TW:"\u60A8\u7684\u540C\u6B65\u578B\u614B\u5FC5\u9808\u70BA\u300CKISS-Worker\u300D\uFF0C\u4E14\u9700\u586B\u5BEB\u5B8C\u6574\u3002"},click_test:{zh:"\u70B9\u51FB\u6D4B\u8BD5",en:"Click Test",zh_TW:"\u9EDE\u64CA\u6E2C\u8A66"},test_success:{zh:"\u6D4B\u8BD5\u6210\u529F",en:"Test success",zh_TW:"\u6E2C\u8A66\u6210\u529F"},test_failed:{zh:"\u6D4B\u8BD5\u5931\u8D25",en:"Test failed",zh_TW:"\u6E2C\u8A66\u5931\u6557"},clear_all_cache_now:{zh:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u7F13\u5B58",en:"Clear all cache now",zh_TW:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u5FEB\u53D6"},clear_cache:{zh:"\u6E05\u9664\u7F13\u5B58",en:"Clear Cache",zh_TW:"\u6E05\u9664\u5FEB\u53D6"},clear_success:{zh:"\u6E05\u9664\u6210\u529F",en:"Clear success",zh_TW:"\u6E05\u9664\u6210\u529F"},clear_failed:{zh:"\u6E05\u9664\u5931\u8D25",en:"Clear failed",zh_TW:"\u6E05\u9664\u5931\u6557"},share:{zh:"\u5206\u4EAB",en:"Share",zh_TW:"\u5206\u4EAB"},clear_all:{zh:"\u6E05\u7A7A",en:"Clear All",zh_TW:"\u6E05\u7A7A"},help:{zh:"\u6C42\u52A9",en:"Help",zh_TW:"\u6C42\u52A9"},restore_default:{zh:"\u6062\u590D\u9ED8\u8BA4",en:"Restore Default",zh_TW:"\u6062\u5FA9\u9810\u8A2D"},shortcuts_setting:{zh:"\u5FEB\u6377\u952E\u8BBE\u7F6E",en:"Shortcuts Setting",zh_TW:"\u5FEB\u6377\u9375\u8A2D\u5B9A"},toggle_translate_shortcut:{zh:"\"\u5F00\u542F\u7FFB\u8BD1\"\u5FEB\u6377\u952E",en:"\"Toggle Translate\" Shortcut",zh_TW:"\u300C\u958B\u555F\u7FFB\u8B6F\u300D\u5FEB\u6377\u9375"},toggle_style_shortcut:{zh:"\"\u5207\u6362\u6837\u5F0F\"\u5FEB\u6377\u952E",en:"\"Toggle Style\" Shortcut",zh_TW:"\u300C\u5207\u63DB\u6A23\u5F0F\u300D\u5FEB\u6377\u9375"},toggle_popup_shortcut:{zh:"\"\u6253\u5F00\u5F39\u7A97\"\u5FEB\u6377\u952E",en:"\"Open Popup\" Shortcut",zh_TW:"\u300C\u958B\u555F\u5F48\u7A97\u300D\u5FEB\u6377\u9375"},open_setting_shortcut:{zh:"\"\u6253\u5F00\u8BBE\u7F6E\"\u5FEB\u6377\u952E",en:"\"Open Setting\" Shortcut",zh_TW:"\u300C\u958B\u555F\u8A2D\u5B9A\u300D\u5FEB\u6377\u9375"},hide_fab_button:{zh:"\u9690\u85CF\u60AC\u6D6E\u6309\u94AE",en:"Hide Fab Button",zh_TW:"\u96B1\u85CF\u61F8\u6D6E\u6309\u9215"},fab_click_action:{zh:"\u5355\u51FB\u60AC\u6D6E\u6309\u94AE\u52A8\u4F5C",en:"Single Click Fab Action",zh_TW:"\u55AE\u64CA\u61F8\u6D6E\u6309\u94AE\u52D5\u4F5C"},fab_click_menu:{zh:"\u5F39\u51FA\u83DC\u5355",en:"Popup Menu",zh_TW:"\u5F48\u51FA\u9078\u55AE"},fab_click_translate:{zh:"\u76F4\u63A5\u7FFB\u8BD1",en:"Translate",zh_TW:"\u76F4\u63A5\u7FFB\u8B6F"},hide_tran_button:{zh:"\u9690\u85CF\u7FFB\u8BD1\u6309\u94AE",en:"Hide Translate Button",zh_TW:"\u96B1\u85CF\u7FFB\u8B6F\u6309\u9215"},hide_click_away:{zh:"\u70B9\u51FB\u5916\u90E8\u5173\u95ED\u5F39\u7A97",en:"Click outside to close the pop-up window",zh_TW:"\u9EDE\u64CA\u5916\u90E8\u95DC\u9589\u5F48\u7A97"},use_simple_style:{zh:"\u4F7F\u7528\u7B80\u6D01\u754C\u9762",en:"Use a simple interface",zh_TW:"\u4F7F\u7528\u7C21\u6F54\u4ECB\u9762"},show:{zh:"\u663E\u793A",en:"Show",zh_TW:"\u986F\u793A"},hide:{zh:"\u9690\u85CF",en:"Hide",zh_TW:"\u96B1\u85CF"},save_rule:{zh:"\u4FDD\u5B58\u89C4\u5219",en:"Save Rule",zh_TW:"\u5132\u5B58\u898F\u5247"},global_rule:{zh:"\u5168\u5C40\u89C4\u5219",en:"Global Rule",zh_TW:"\u5168\u57DF\u898F\u5247"},input_translate:{zh:"\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation",zh_TW:"\u8F38\u5165\u6846\u7FFB\u8B6F"},use_input_box_translation:{zh:"\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation",zh_TW:"\u555F\u7528\u8F38\u5165\u6846\u7FFB\u8B6F"},input_selector:{zh:"\u8F93\u5165\u6846\u9009\u62E9\u5668",en:"Input Selector",zh_TW:"\u8F38\u5165\u6846\u9078\u64C7\u5668"},input_selector_helper:{zh:"\u7528\u4E8E\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",en:"Used for input box translation.",zh_TW:"\u7528\u65BC\u8F38\u5165\u6846\u7FFB\u8B6F\u3002"},trigger_trans_shortcut:{zh:"\u89E6\u53D1\u7FFB\u8BD1\u5FEB\u6377\u952E",en:"Trigger Translation Shortcut Keys",zh_TW:"\u89F8\u767C\u7FFB\u8B6F\u5FEB\u6377\u9375"},trigger_trans_shortcut_help:{zh:"\u9ED8\u8BA4\u4E3A\u5355\u51FB\u201CAltLeft+KeyI\u201D",en:"Default is \"AltLeft+KeyI\"",zh_TW:"\u9810\u8A2D\u70BA\u6309\u4E0B\u300CAltLeft+KeyI\u300D"},shortcut_press_count:{zh:"\u5FEB\u6377\u952E\u8FDE\u51FB\u6B21\u6570",en:"Shortcut Press Number",zh_TW:"\u5FEB\u6377\u9375\u9023\u64CA\u6B21\u6578"},combo_timeout:{zh:"\u8FDE\u51FB\u8D85\u65F6\u65F6\u95F4 (10-1000ms)",en:"Combo Timeout (10-1000ms)",zh_TW:"\u9023\u64CA\u903E\u6642 (10-1000ms)"},input_trans_start_sign:{zh:"\u7FFB\u8BD1\u8D77\u59CB\u6807\u8BC6",en:"Translation Start Sign",zh_TW:"\u7FFB\u8B6F\u8D77\u59CB\u6A19\u8A18"},input_trans_start_sign_help:{zh:"\u6807\u8BC6\u540E\u9762\u53EF\u4EE5\u52A0\u76EE\u6807\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1A \u201C/en \u4F60\u597D\u201D\u3001\u201C/zh hello\u201D",en:"The target language code can be added after the sign, such as: \"/en \u4F60\u597D\", \"/zh hello\"",zh_TW:"\u6A19\u8A18\u5F8C\u53EF\u52A0\u4E0A\u76EE\u6A19\u8A9E\u8A00\u4EE3\u78BC\uFF0C\u4F8B\u5982\uFF1A\u300C/en \u4F60\u597D\u300D\u3001\u300C/zh hello\u300D"},detect_lang_remote:{zh:"\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B",en:"Remote language detection",zh_TW:"\u9060\u7AEF\u8A9E\u8A00\u5075\u6E2C"},detect_lang_remote_help:{zh:"\u542F\u7528\u540E\u68C0\u6D4B\u51C6\u786E\u5EA6\u589E\u52A0\uFF0C\u4F46\u4F1A\u964D\u4F4E\u7FFB\u8BD1\u901F\u5EA6\uFF0C\u8BF7\u914C\u60C5\u5F00\u542F",en:"After enabling, the detection accuracy will increase, but it will reduce the translation speed. Please enable it as appropriate.",zh_TW:"\u555F\u7528\u5F8C\u53EF\u63D0\u5347\u5075\u6E2C\u6E96\u78BA\u5EA6\uFF0C\u4F46\u6703\u964D\u4F4E\u7FFB\u8B6F\u901F\u5EA6\uFF0C\u8ACB\u8996\u9700\u8981\u958B\u555F\u3002"},detect_lang_service:{zh:"\u8BED\u8A00\u68C0\u6D4B\u670D\u52A1",en:"Language detect service",zh_TW:"\u8A9E\u8A00\u6AA2\u6E2C\u670D\u52D9"},disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},enable:{zh:"\u542F\u7528",en:"Enable",zh_TW:"\u555F\u7528"},selection_translate:{zh:"\u5212\u8BCD\u7FFB\u8BD1",en:"Selection Translation",zh_TW:"\u5283\u8A5E\u7FFB\u8B6F"},toggle_selection_translate:{zh:"\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"Use Selection Translate",zh_TW:"\u555F\u7528\u5283\u8A5E\u7FFB\u8B6F"},trigger_tranbox_shortcut:{zh:"\u663E\u793A\u7FFB\u8BD1\u6846/\u7FFB\u8BD1\u9009\u4E2D\u6587\u5B57\u5FEB\u6377\u952E",en:"Open Translate Popup/Translate Selected Shortcut",zh_TW:"\u986F\u793A\u7FFB\u8B6F\u6846\uFF0F\u7FFB\u8B6F\u9078\u4E2D\u6587\u5B57\u5FEB\u6377\u9375"},tranbtn_offset_x:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBX\uFF08\xB1200\uFF09",en:"Translate Button Offset X (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6309\u9215\u4F4D\u79FB X\uFF08\xB1200\uFF09"},tranbtn_offset_y:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBY\uFF08\xB1200\uFF09",en:"Translate Button Offset Y (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6309\u9215\u4F4D\u79FB Y\uFF08\xB1200\uFF09"},tranbox_offset_x:{zh:"\u7FFB\u8BD1\u6846\u504F\u79FBX\uFF08\xB1200\uFF09",en:"Translate Box Offset X (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6846\u4F4D\u79FB X\uFF08\xB1200\uFF09"},tranbox_offset_y:{zh:"\u7FFB\u8BD1\u6846\u504F\u79FBY\uFF08\xB1200\uFF09",en:"Translate Box Offset Y (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6846\u4F4D\u79FB Y\uFF08\xB1200\uFF09"},translated_text:{zh:"\u8BD1\u6587",en:"Translated Text",zh_TW:"\u8B6F\u6587"},original_text:{zh:"\u539F\u6587",en:"Original Text",zh_TW:"\u539F\u6587"},favorite_words:{zh:"\u6536\u85CF\u8BCD\u6C47",en:"Favorite Words",zh_TW:"\u6536\u85CF\u8A5E\u5F59"},touch_setting:{zh:"\u89E6\u5C4F\u8BBE\u7F6E",en:"Touch Setting",zh_TW:"\u89F8\u63A7\u8A2D\u5B9A"},touch_translate_shortcut:{zh:"\u89E6\u5C4F\u7FFB\u8BD1\u5FEB\u6377\u65B9\u5F0F (\u652F\u6301\u591A\u9009)",en:"Touch Translate Shortcut (multiple supported)",zh_TW:"\u89F8\u63A7\u7FFB\u8B6F\u6377\u5F91 (\u652F\u63F4\u591A\u9078)"},touch_tap_0:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},touch_tap_2:{zh:"\u53CC\u6307\u8F7B\u89E6",en:"Two finger tap",zh_TW:"\u96D9\u6307\u8F15\u89F8"},touch_tap_3:{zh:"\u4E09\u6307\u8F7B\u89E6",en:"Three finger tap",zh_TW:"\u4E09\u6307\u8F15\u89F8"},touch_tap_4:{zh:"\u56DB\u6307\u8F7B\u89E6",en:"Four finger tap",zh_TW:"\u56DB\u6307\u8F15\u89F8"},touch_tap_5:{zh:"\u5355\u6307\u53CC\u51FB",en:"Double-click",zh_TW:"\u55AE\u6307\u96D9\u64CA"},touch_tap_6:{zh:"\u5355\u6307\u4E09\u51FB",en:"Triple-click",zh_TW:"\u55AE\u6307\u4E09\u64CA"},touch_tap_7:{zh:"\u53CC\u6307\u53CC\u51FB",en:"Two-finger double-click",zh_TW:"\u96D9\u6307\u96D9\u64CA"},translate_blacklist:{zh:"\u7981\u7528\u7FFB\u8BD1\u540D\u5355",en:"Translate Blacklist",zh_TW:"\u505C\u7528\u7FFB\u8B6F\u540D\u55AE"},disabled_orilist:{zh:"\u7981\u7528Origin\u540D\u5355",en:"Disabled Origin List",zh_TW:"\u505C\u7528 Origin \u540D\u55AE"},disabled_csplist:{zh:"\u7981\u7528CSP\u540D\u5355",en:"Disabled CSP List",zh_TW:"\u505C\u7528 CSP \u540D\u55AE"},disabled_csplist_helper:{zh:"3\u3001\u901A\u8FC7\u8C03\u6574CSP\u7B56\u7565\uFF0C\u4F7F\u5F97\u67D0\u4E9B\u9875\u9762\u80FD\u591F\u6CE8\u5165JS/CSS/Media\uFF0C\u8BF7\u8C28\u614E\u4F7F\u7528\uFF0C\u9664\u975E\u60A8\u5DF2\u77E5\u6653\u76F8\u5173\u98CE\u9669\u3002",en:"3. By adjusting the CSP policy, some pages can inject JS/CSS/Media. Please use it with caution unless you are aware of the related risks.",zh_TW:"3. \u900F\u904E\u8ABF\u6574 CSP \u653F\u7B56\uFF0C\u4F7F\u90E8\u5206\u9801\u9762\u53EF\u6CE8\u5165 JS/CSS/Media\u3002\u8ACB\u8B39\u614E\u4F7F\u7528\uFF0C\u9664\u975E\u60A8\u5DF2\u77E5\u6089\u76F8\u95DC\u98A8\u96AA\u3002"},skip_langs:{zh:"\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",en:"Disable Languages",zh_TW:"\u4E0D\u7FFB\u8B6F\u7684\u8A9E\u8A00"},skip_langs_helper:{zh:"\u6B64\u529F\u80FD\u4F9D\u8D56\u51C6\u786E\u7684\u8BED\u8A00\u68C0\u6D4B\uFF0C\u5EFA\u8BAE\u542F\u7528\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B\u3002",en:"This feature relies on accurate language detection. It is recommended to enable remote language detection.",zh_TW:"\u6B64\u529F\u80FD\u4EF0\u8CF4\u6E96\u78BA\u7684\u8A9E\u8A00\u5075\u6E2C\uFF0C\u5EFA\u8B70\u555F\u7528\u9060\u7AEF\u8A9E\u8A00\u5075\u6E2C\u3002"},context_menus:{zh:"\u53F3\u952E\u83DC\u5355",en:"Context Menus",zh_TW:"\u53F3\u9375\u9078\u55AE"},hide_context_menus:{zh:"\u9690\u85CF\u53F3\u952E\u83DC\u5355",en:"Hide Context Menus",zh_TW:"\u96B1\u85CF\u53F3\u9375\u9078\u55AE"},simple_context_menus:{zh:"\u7B80\u5355\u53F3\u952E\u83DC\u5355",en:"Simple_context_menus Context Menus",zh_TW:"\u7C21\u6613\u53F3\u9375\u9078\u55AE"},secondary_context_menus:{zh:"\u4E8C\u7EA7\u53F3\u952E\u83DC\u5355",en:"Secondary Context Menus",zh_TW:"\u6B21\u7D1A\u53F3\u9375\u9078\u55AE"},mulkeys_help:{zh:"\u652F\u6301\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\uFF0C\u8F6E\u8BE2\u8C03\u7528\u3002",en:"Supports polling calls separated by newlines or English commas \",\".",zh_TW:"\u652F\u63F4\u4EE5\u63DB\u884C\u6216\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\uFF0C\u8F2A\u8A62\u547C\u53EB\u3002"},translation_element_tag:{zh:"\u8BD1\u6587\u5143\u7D20\u6807\u7B7E",en:"Translation Element Tag",zh_TW:"\u8B6F\u6587\u5143\u7D20\u6A19\u7C64"},show_only_translations:{zh:"\u4EC5\u663E\u793A\u8BD1\u6587",en:"Show Only Translations",zh_TW:"\u50C5\u986F\u793A\u8B6F\u6587"},show_only_translations_help:{zh:"\u975E\u5B8C\u7F8E\u5B9E\u73B0\uFF0C\u67D0\u4E9B\u9875\u9762\u53EF\u80FD\u6709\u6837\u5F0F\u7B49\u95EE\u9898\u3002",en:"It is not a perfect implementation and some pages may have style issues.",zh_TW:"\u6B64\u70BA\u975E\u5B8C\u7F8E\u5BE6\u4F5C\uFF0C\u90E8\u5206\u9801\u9762\u53EF\u80FD\u51FA\u73FE\u6A23\u5F0F\u7B49\u554F\u984C\u3002"},translate_page_title:{zh:"\u662F\u5426\u7FFB\u8BD1\u9875\u9762\u6807\u9898",en:"Translate Page Title",zh_TW:"\u662F\u5426\u7FFB\u8B6F\u9801\u9762\u6A19\u984C"},more:{zh:"\u66F4\u591A",en:"More",zh_TW:"\u66F4\u591A"},less:{zh:"\u66F4\u5C11",en:"Less",zh_TW:"\u66F4\u5C11"},fixer_selector:{zh:"\u7F51\u9875\u4FEE\u590D\u9009\u62E9\u5668",en:"Fixer Selector",zh_TW:"\u7DB2\u9801\u4FEE\u5FA9\u9078\u64C7\u5668"},reg_niutrans:{zh:"\u83B7\u53D6\u5C0F\u725B\u7FFB\u8BD1\u5BC6\u94A5\u3010\u7B80\u7EA6\u7FFB\u8BD1\u4E13\u5C5E\u65B0\u7528\u6237\u6CE8\u518C\u8D60\u9001300\u4E07\u5B57\u7B26\u3011",en:"Get NiuTrans APIKey [KISS Translator Exclusive New User Registration Free 3 Million Characters]",zh_TW:"\u53D6\u5F97\u5C0F\u725B\u7FFB\u8B6F\u91D1\u9470\u3010\u7C21\u7D04\u7FFB\u8B6F\u5C08\u5C6C\u65B0\u7528\u6236\u8A3B\u518A\u8D08\u9001 300 \u842C\u5B57\u5143\u3011"},trigger_mode:{zh:"\u89E6\u53D1\u65B9\u5F0F",en:"Trigger Mode",zh_TW:"\u89F8\u767C\u65B9\u5F0F"},trigger_click:{zh:"\u70B9\u51FB\u89E6\u53D1",en:"Click Trigger",zh_TW:"\u9EDE\u64CA\u89F8\u767C"},trigger_hover:{zh:"\u9F20\u6807\u60AC\u505C\u89E6\u53D1",en:"Hover Trigger",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u89F8\u767C"},trigger_select:{zh:"\u9009\u4E2D\u89E6\u53D1",en:"Select Trigger",zh_TW:"\u9078\u53D6\u89F8\u767C"},extend_styles:{zh:"\u9644\u52A0\u6837\u5F0F",en:"Extend Styles",zh_TW:"\u9644\u52A0\u6A23\u5F0F"},custom_option:{zh:"\u81EA\u5B9A\u4E49\u9009\u9879",en:"Custom Option",zh_TW:"\u81EA\u8A02\u9078\u9805"},translate_selected_text:{zh:"\u7FFB\u8BD1\u9009\u4E2D\u6587\u5B57",en:"Translate Selected Text",zh_TW:"\u7FFB\u8B6F\u9078\u53D6\u6587\u5B57"},toggle_style:{zh:"\u5207\u6362\u6837\u5F0F",en:"Toggle Style",zh_TW:"\u5207\u63DB\u6A23\u5F0F"},open_menu:{zh:"\u6253\u5F00\u5F39\u7A97\u83DC\u5355",en:"Open Popup Menu",zh_TW:"\u958B\u555F\u5F48\u7A97\u9078\u55AE"},open_setting:{zh:"\u6253\u5F00\u8BBE\u7F6E",en:"Open Setting",zh_TW:"\u958B\u555F\u8A2D\u5B9A"},follow_selection:{zh:"\u7FFB\u8BD1\u6846\u8DDF\u968F\u9009\u4E2D\u6587\u672C",en:"Transbox Follow Selection",zh_TW:"\u7FFB\u8B6F\u6846\u8DDF\u96A8\u9078\u53D6\u6587\u5B57"},tranbox_auto_height:{zh:"\u7FFB\u8BD1\u6846\u81EA\u9002\u5E94\u9AD8\u5EA6",en:"Translation box adaptive height",zh_TW:"\u7FFB\u8B6F\u6846\u81EA\u9069\u61C9\u9AD8\u5EA6"},translate_start_hook:{zh:"\u7FFB\u8BD1\u5F00\u59CB\u94A9\u5B50\u51FD\u6570",en:"Translate Start Hook",zh_TW:"\u7FFB\u8B6F\u958B\u59CB Hook"},translate_start_hook_helper:{zh:"\u7FFB\u8BD1\u524D\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}",en:"Run before translation, input parameters are: {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}",zh_TW:"\u7FFB\u8B6F\u524D\u6642\u904B\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}"},translate_end_hook:{zh:"\u7FFB\u8BD1\u5B8C\u6210\u94A9\u5B50\u51FD\u6570",en:"Translate End Hook",zh_TW:"\u7FFB\u8B6F\u5B8C\u6210 Hook"},translate_end_hook_helper:{zh:"\u7FFB\u8BD1\u5B8C\u6210\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A ({hostNode, parentNode, nodes, wrapperNode, innerNode})",en:"Run when translation is complete, input parameters are: ({hostNode, parentNode, nodes, wrapperNode, innerNode})",zh_TW:"\u7FFB\u8B6F\u5B8C\u6210\u6642\u904B\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A ({hostNode, parentNode, nodes, wrapperNode, innerNode})"},translate_remove_hook:{zh:"\u7FFB\u8BD1\u79FB\u9664\u94A9\u5B50\u51FD\u6570",en:"Translate Removed Hook",zh_TW:"\u7FFB\u8B6F\u79FB\u9664 Hook"},translate_remove_hook_helper:{zh:"\u7FFB\u8BD1\u79FB\u9664\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A \u7FFB\u8BD1\u8282\u70B9\u3002",en:"Run when translation is removed, the input parameters are: translation node.",zh_TW:"\u79FB\u9664\u7FFB\u8B6F\u6642\u57F7\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A\u7FFB\u8B6F\u7BC0\u9EDE\u3002"},english_dict:{zh:"\u82F1\u6587\u8BCD\u5178",en:"English Dictionary",zh_TW:"\u82F1\u6587\u5B57\u5178"},english_suggest:{zh:"\u82F1\u6587\u5EFA\u8BAE",en:"English Suggest",zh_TW:"\u82F1\u6587\u5EFA\u8B70"},api_name:{zh:"\u63A5\u53E3\u540D\u79F0",en:"API Name",zh_TW:"\u4ECB\u9762\u540D\u7A31"},is_disabled:{zh:"\u662F\u5426\u7981\u7528",en:"Is Disabled",zh_TW:"\u662F\u5426\u505C\u7528"},translate_selected:{zh:"\u662F\u5426\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"If translate selected",zh_TW:"\u662F\u5426\u555F\u7528\u5283\u8A5E\u7FFB\u8B6F"},use_batch_fetch:{zh:"\u662F\u5426\u805A\u5408\u53D1\u9001\u7FFB\u8BD1\u8BF7\u6C42",en:"Whether to aggregate and send translation requests",zh_TW:"\u662F\u5426\u805A\u5408\u767C\u9001\u7FFB\u8B6F\u8ACB\u6C42"},batch_interval:{zh:"\u805A\u5408\u8BF7\u6C42\u7B49\u5F85\u65F6\u95F4(100-10000)",en:"Aggregation request waiting time (100-10000)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u7B49\u5F85\u6642\u9593(100-10000)"},batch_size:{zh:"\u805A\u5408\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570(1-100)",en:"Maximum number of paragraphs in an aggregation request (1-100)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u6700\u5927\u6BB5\u843D\u6578(1-100)"},batch_length:{zh:"\u805A\u5408\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6(1000-100000)",en:"Maximum text length for aggregation requests (1000-100000)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u6700\u5927\u6587\u5B57\u9577\u5EA6(1000-100000)"},use_context:{zh:"\u662F\u5426\u542F\u7528\u667A\u80FD\u4E0A\u4E0B\u6587",en:"Whether to enable AI context",zh_TW:"\u662F\u5426\u555F\u7528\u667A\u6167\u4E0A\u4E0B\u6587"},context_size:{zh:"\u4E0A\u4E0B\u6587\u4F1A\u8BDD\u6570\u91CF(1-20)",en:"Number of context sessions(1-20)",zh_TW:"\u4E0A\u4E0B\u6587\u6703\u8A71\u6578\u91CF(1-20)"},auto_scan_page:{zh:"\u81EA\u52A8\u626B\u63CF\u9875\u9762",en:"Auto scan page",zh_TW:"\u81EA\u52D5\u6383\u63CF\u9801\u9762"},has_rich_text:{zh:"\u542F\u7528\u5BCC\u6587\u672C\u7FFB\u8BD1",en:"Enable rich text translation",zh_TW:"\u555F\u7528\u5BCC\u6587\u672C\u7FFB\u8B6F"},has_shadowroot:{zh:"\u626B\u63CFShadowroot",en:"Scan Shadowroot",zh_TW:"\u6383\u63CFShadowroot"},mousehover_translate:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover Translation",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},use_mousehover_translation:{zh:"\u542F\u7528\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Enable mouseover translation",zh_TW:"\u555F\u7528\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},selected_translation_alert:{zh:"\u5212\u8BCD\u7FFB\u8BD1\u7684\u5F00\u542F\u548C\u5173\u95ED\u8BF7\u5230\u201C\u89C4\u5219\u8BBE\u7F6E\u201D\u91CC\u9762\u8BBE\u7F6E\u3002",en:"To turn selected translation on or off, please go to \"Rule Settings\".",zh_TW:"\u5283\u8A5E\u7FFB\u8B6F\u7684\u958B\u555F\u548C\u95DC\u9589\u8ACB\u5230\u300C\u898F\u5247\u8A2D\u5B9A\u300D\u88E1\u9762\u8A2D\u5B9A\u3002"},mousehover_key_help:{zh:"\u5F53\u5FEB\u6377\u952E\u7F6E\u7A7A\u65F6\u8868\u793A\u9F20\u6807\u60AC\u505C\u76F4\u63A5\u7FFB\u8BD1",en:"When the shortcut key is empty, it means that the mouse hovers to translate directly",zh_TW:"\u7576\u5FEB\u6377\u9375\u7F6E\u7A7A\u6642\u8868\u793A\u6ED1\u9F20\u61F8\u505C\u76F4\u63A5\u7FFB\u8B6F"},autoscan_alt:{zh:"\u81EA\u52A8\u626B\u63CF",en:"Auto Scan",zh_TW:"\u81EA\u52D5\u6383\u63CF"},shadowroot_alt:{zh:"ShadowRoot",en:"ShadowRoot",zh_TW:"ShadowRoot"},richtext_alt:{zh:"\u4FDD\u7559\u5BCC\u6587\u672C",en:"Rich Text",zh_TW:"\u4FDD\u7559\u5BCC\u6587\u672C"},transonly_alt:{zh:"\u9690\u85CF\u539F\u6587",en:"Hide Original",zh_TW:"\u96B1\u85CF\u539F\u6587"},confirm_title:{zh:"\u786E\u8BA4",en:"Confirm",zh_TW:"\u78BA\u8A8D"},confirm_message:{zh:"\u786E\u5B9A\u64CD\u4F5C\u5417\uFF1F",en:"Are you sure you want to proceed?",zh_TW:"\u78BA\u5B9A\u64CD\u4F5C\u55CE\uFF1F"},confirm_action:{zh:"\u786E\u5B9A",en:"Confirm",zh_TW:"\u78BA\u5B9A"},cancel_action:{zh:"\u53D6\u6D88",en:"Cancel",zh_TW:"\u53D6\u6D88"},pls_press_shortcut:{zh:"\u8BF7\u6309\u4E0B\u5FEB\u6377\u952E\u7EC4\u5408",en:"Please press the shortcut key combination",zh_TW:"\u8ACB\u6309\u4E0B\u5FEB\u901F\u9375\u7D44\u5408"},load_setting_err:{zh:"\u6570\u636E\u52A0\u8F7D\u51FA\u9519\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u6216\u5378\u8F7D\u540E\u91CD\u65B0\u5B89\u88C5\u3002",en:"Please press the shortcut key combination",zh_TW:"\u8ACB\u6309\u4E0B\u5FEB\u901F\u9375\u7D44\u5408"},translation_style:{zh:"\u7FFB\u8BD1\u98CE\u683C",en:"Translation style",zh_TW:"\u7FFB\u8B6F\u98A8\u683C"},placeholder:{zh:"\u5360\u4F4D\u7B26",en:"Placeholder",zh_TW:"\u4F54\u4F4D\u7B26"},tag_name:{zh:"\u5360\u4F4D\u6807\u7B7E\u540D",en:"Placeholder tag name",zh_TW:"\u4F54\u4F4D\u6A19\u540D"},system_prompt_helper:{zh:"\u5728\u672A\u5B8C\u5168\u7406\u89E3\u9ED8\u8BA4Prompt\u7684\u60C5\u51B5\u4E0B\uFF0C\u8BF7\u52FF\u968F\u610F\u4FEE\u6539\uFF0C\u5426\u5219\u53EF\u80FD\u65E0\u6CD5\u5DE5\u4F5C\u3002",en:"Do not modify the default prompt without fully understanding it, otherwise it may not work.",zh_TW:"\u5728\u672A\u5B8C\u5168\u7406\u89E3\u9810\u8A2DPrompt\u7684\u60C5\u6CC1\u4E0B\uFF0C\u8ACB\u52FF\u96A8\u610F\u4FEE\u6539\uFF0C\u5426\u5247\u53EF\u80FD\u7121\u6CD5\u904B\u4F5C\u3002"},if_pre_init:{zh:"\u662F\u5426\u9884\u521D\u59CB\u5316",en:"Whether to pre-initialize",zh_TW:"\u662F\u5426\u9810\u521D\u59CB\u5316"},export_old:{zh:"\u5BFC\u51FA\u65E7\u7248",en:"Export old version",zh_TW:"\u532F\u51FA\u820A\u7248"},favorite_words_helper:{zh:"\u5BFC\u5165\u8BCD\u6C47\u8BF7\u4F7F\u7528txt\u6587\u4EF6\uFF0C\u6BCF\u4E00\u884C\u4E00\u4E2A\u5355\u8BCD\u3002",en:"To import vocabulary, please use a txt file with one word per line.",zh_TW:"\u532F\u5165\u8A5E\u5F59\u8ACB\u4F7F\u7528txt\u6587\u4EF6\uFF0C\u6BCF\u4E00\u884C\u4E00\u500B\u55AE\u5B57\u3002"},btn_tip_click_away:{zh:"\u5931\u7126\u9690\u85CF/\u663E\u793A",en:"Loss of focus hide/show",zh_TW:"\u5931\u7126\u96B1\u85CF/\u986F\u793A"},btn_tip_follow_selection:{zh:"\u8DDF\u968F/\u56FA\u5B9A\u6A21\u5F0F",en:"Follow/Fixed Mode",zh_TW:"\u8DDF\u96A8/\u56FA\u5B9A\u6A21\u5F0F"},btn_tip_simple_style:{zh:"\u8FF7\u4F60/\u5E38\u89C4\u6A21\u5F0F",en:"Mini/Regular Mode",zh_TW:"\u8FF7\u4F60/\u5E38\u898F\u6A21\u5F0F"},api_placeholder:{zh:"\u5360\u4F4D\u7B26",en:"Placeholder",zh_TW:"\u4F54\u4F4D\u7B26"},api_placetag:{zh:"\u5360\u4F4D\u6807\u7B7E",en:"Placeholder tags",zh_TW:"\u4F54\u4F4D\u6A19"},detected_lang:{zh:"\u8BED\u8A00\u68C0\u6D4B",en:"Language detection",zh_TW:"\u8A9E\u8A00\u5075\u6E2C"},detected_result:{zh:"\u68C0\u6D4B\u7ED3\u679C",en:"Detect result",zh_TW:"\u6AA2\u6E2C\u7D50\u679C"},subtitle_translate:{zh:"\u5B57\u5E55\u7FFB\u8BD1",en:"Subtitle translation",zh_TW:"\u5B57\u5E55\u7FFB\u8B6F"},toggle_subtitle_translate:{zh:"\u542F\u7528\u5B57\u5E55\u7FFB\u8BD1",en:"Enable subtitle translation",zh_TW:"\u555F\u7528\u5B57\u5E55\u7FFB\u8B6F"},is_bilingual_view:{zh:"\u53CC\u8BED\u663E\u793A",en:"Enable bilingual display",zh_TW:"\u96D9\u8A9E\u986F\u793A"},is_skip_ad:{zh:"\u662F\u5426\u5FEB\u8FDB\u5E7F\u544A",en:"Should I fast forward to the ad?",zh_TW:"\u662F\u5426\u5FEB\u8F49\u5EE3\u544A"},background_styles:{zh:"\u80CC\u666F\u6837\u5F0F",en:"DBackground Style",zh_TW:"\u80CC\u666F\u6A23\u5F0F"},origin_styles:{zh:"\u539F\u6587\u6837\u5F0F",en:"Original style",zh_TW:"\u539F\u6587\u6A23\u5F0F"},translation_styles:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Translation style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},ai_segmentation:{zh:"AI\u667A\u80FD\u65AD\u53E5",en:"AI intelligent punctuation",zh_TW:"AI\u667A\u6167\u65B7\u53E5"},ai_chunk_length:{zh:"AI\u5904\u7406\u5207\u5272\u957F\u5EA6(200-20000)",en:"AI processing chunk length(200-20000)",zh_TW:"AI\u5904\u7406\u5207\u5272\u957F\u5EA6(200-20000)"},subtitle_helper_1:{zh:"1\u3001\u76EE\u524D\u4EC5\u652F\u6301Youtube\u684C\u9762\u7F51\u7AD9\u3002",en:"1. Currently only supports Youtube desktop website.",zh_TW:"1.\u76EE\u524D\u50C5\u652F\u63F4Youtube\u684C\u9762\u7DB2\u7AD9\uFF0C\u4E14\u50C5\u652F\u63F4\u700F\u89BD\u5668\u64F4\u5145\u529F\u80FD\u3002"},subtitle_helper_2:{zh:"2\u3001\u63D2\u4EF6\u5185\u7F6E\u57FA\u7840\u7684\u5B57\u5E55\u5408\u5E76\u3001\u65AD\u53E5\u7B97\u6CD5\uFF0C\u53EF\u6EE1\u8DB3\u5927\u90E8\u5206\u60C5\u51B5\u3002",en:"2. The plug-in has built-in basic subtitle merging and sentence segmentation algorithms, which can meet most situations.",zh_TW:"2.\u63D2\u4EF6\u5167\u5EFA\u57FA\u790E\u7684\u5B57\u5E55\u5408\u4F75\u3001\u65B7\u53E5\u6F14\u7B97\u6CD5\uFF0C\u53EF\u6EFF\u8DB3\u5927\u90E8\u5206\u60C5\u6CC1\u3002"},subtitle_helper_3:{zh:"3\u3001\u4EA6\u53EF\u4EE5\u542F\u7528AI\u667A\u80FD\u65AD\u53E5\uFF0C\u4F46\u9700\u8003\u8651\u5207\u5272\u957F\u5EA6\u53CAAI\u63A5\u53E3\u80FD\u529B\uFF0C\u53EF\u80FD\u5904\u7406\u65F6\u95F4\u4F1A\u5F88\u957F\uFF0C\u751A\u81F3\u5904\u7406\u5931\u8D25\uFF0C\u5BFC\u81F4\u65E0\u6CD5\u770B\u5230\u5B57\u5E55\u3002",en:"3. You can also enable AI intelligent segmentation, but you need to consider the segmentation length and AI interface capabilities. The processing time may be very long or even fail, resulting in the inability to see subtitles.",zh_TW:"3.\u4EA6\u53EF\u555F\u7528AI\u667A\u80FD\u65B7\u53E5\uFF0C\u4F46\u9700\u8003\u616E\u5207\u5272\u9577\u5EA6\u53CAAI\u4ECB\u9762\u80FD\u529B\uFF0C\u53EF\u80FD\u8655\u7406\u6642\u9593\u6703\u5F88\u9577\uFF0C\u751A\u81F3\u8655\u7406\u5931\u6557\uFF0C\u5C0E\u81F4\u7121\u6CD5\u770B\u5230\u5B57\u5E55\u3002"},default_styles_example:{zh:"\u9ED8\u8BA4\u6837\u5F0F\u53C2\u8003\uFF1A",en:"Default styles reference:",zh_TW:"\u8A8D\u6A23\u5F0F\u53C3\u8003\uFF1A"},subtitle_load_succeed:{zh:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u6210\u529F\uFF01",en:"Bilingual subtitles loaded successfully!",zh_TW:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u6210\u529F\uFF01"},subtitle_load_failed:{zh:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u5931\u8D25\uFF01",en:"Failed to load bilingual subtitles!",zh_TW:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u5931\u8D25\uFF01"},try_get_subtitle_data:{zh:"\u5C1D\u8BD5\u83B7\u53D6\u5B57\u5E55\u6570\u636E\uFF0C\u8BF7\u7A0D\u5019...",en:"Trying to get subtitle data, please wait...",zh_TW:"\u5C1D\u8BD5\u83B7\u53D6\u5B57\u5E55\u6570\u636E\uFF0C\u8BF7\u7A0D\u5019..."},subtitle_data_processing:{zh:"\u5B57\u5E55\u6570\u636E\u5904\u7406\u4E2D...",en:"Subtitle data processing...",zh_TW:"\u5B57\u5E55\u6570\u636E\u5904\u7406\u4E2D..."},starting_to_process_subtitle:{zh:"\u5F00\u59CB\u5904\u7406\u5B57\u5E55\u6570\u636E...",en:"Starting to process subtitle data...",zh_TW:"\u5F00\u59CB\u5904\u7406\u5B57\u5E55\u6570\u636E..."},subtitle_data_is_ready:{zh:"\u5B57\u5E55\u6570\u636E\u5DF2\u51C6\u5907\u5C31\u7EEA\uFF0C\u8BF7\u70B9\u51FBKT\u6309\u94AE\u52A0\u8F7D",en:"The subtitle data is ready, please click the KT button to load it",zh_TW:"\u5B57\u5E55\u8CC7\u6599\u5DF2\u6E96\u5099\u5C31\u7DD2\uFF0C\u8ACB\u9EDE\u64CAKT\u6309\u9215\u52A0\u8F09"},log_level:{zh:"\u65E5\u5FD7\u7EA7\u522B",en:"Log Level",zh_TW:"\u65E5\u8A8C\u7B49\u7D1A"},goto_custom_api_example:{zh:"\u70B9\u51FB\u67E5\u770B\u3010\u81EA\u5B9A\u4E49\u63A5\u53E3\u793A\u4F8B\u3011",en:"Click to view [Custom Interface Example]",zh_TW:"\u9EDE\u9078\u67E5\u770B\u3010\u81EA\u8A02\u4ECB\u9762\u7BC4\u4F8B\u3011"},split_paragraph:{zh:"\u5207\u5206\u957F\u6BB5\u843D",en:"Split long paragraph",zh_TW:"\u5207\u5206\u9577\u6BB5\u843D"},split_length:{zh:"\u5207\u5206\u957F\u5EA6 (0-10000)",en:"Segmentation length(0-10000)",zh_TW:"\u5207\u5206\u9577\u5EA6(0-10000)"},highlight_words:{zh:"\u9AD8\u4EAE\u6536\u85CF\u8BCD\u6C47",en:"Highlight favorite words",zh_TW:"\u9AD8\u4EAE\u6536\u85CF\u8A5E\u5F59"},split_disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},split_textlength:{zh:"\u6309\u7167\u957F\u5EA6\u5207\u5206",en:"Split by length",zh_TW:"\u4F9D\u9577\u5EA6\u5207\u5206"},split_punctuation:{zh:"\u6309\u7167\u53E5\u5B50\u5207\u5206",en:"Split by sentence",zh_TW:"\u6309\u7167\u53E5\u5B50\u5207\u5206"},highlight_disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},highlight_beforetrans:{zh:"\u7FFB\u8BD1\u524D\u9AD8\u4EAE",en:"Highlight before translation",zh_TW:"\u7FFB\u8B6F\u524D\u9AD8\u4EAE"},highlight_aftertrans:{zh:"\u7FFB\u8BD1\u540E\u9AD8\u4EAE",en:"Highlight after translation",zh_TW:"\u7FFB\u8B6F\u5F8C\u9AD8\u4EAE"},pagescroll_root_margin:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u63D0\u524D\u89E6\u53D1 (0-10000px)",en:"Early triggering of scroll loading (0-10000px)",zh_TW:"\u6EFE\u52D5\u8F09\u5165\u63D0\u524D\u89F8\u767C (0-10000px)"},styles_setting:{zh:"\u6837\u5F0F\u8BBE\u7F6E",en:"Style Setting",zh_TW:"\u6A23\u5F0F\u8A2D\u5B9A"},style_name:{zh:"\u6837\u5F0F\u540D\u79F0",en:"Style Name",zh_TW:"\u6A23\u5F0F\u540D\u7A31"},style_code:{zh:"\u6837\u5F0F\u4EE3\u7801",en:"Style Code",zh_TW:"\u6A23\u5F0F\u7A0B\u5F0F\u78BC"}};const newI18n=lang=>key=>{var _I18N$key;return((_I18N$key=I18N[key])===null||_I18N$key===void 0?void 0:_I18N$key[lang])||"";}; ;// CONCATENATED MODULE: ./src/config/storage.js const KV_RULES_KEY="kiss-rules_v".concat(APP_VERSION[0],".json");const KV_WORDS_KEY="kiss-words.json";const KV_RULES_SHARE_KEY="kiss-rules-share_v".concat(APP_VERSION[0],".json");const KV_SETTING_KEY="kiss-setting_v".concat(APP_VERSION[0],".json");const KV_SALT_SYNC="KISS-Translator-SYNC";const KV_SALT_SHARE="KISS-Translator-SHARE";const STOKEY_MSAUTH="".concat(APP_NAME,"_msauth");const STOKEY_BDAUTH="".concat(APP_NAME,"_bdauth");const STOKEY_SETTING_OLD="".concat(APP_NAME,"_setting");const STOKEY_RULES_OLD="".concat(APP_NAME,"_rules");const STOKEY_SETTING="".concat(APP_NAME,"_setting_v").concat(APP_VERSION[0]);const STOKEY_RULES="".concat(APP_NAME,"_rules_v").concat(APP_VERSION[0]);const STOKEY_WORDS="".concat(APP_NAME,"_words");const STOKEY_SYNC="".concat(APP_NAME,"_sync");const STOKEY_FAB="".concat(APP_NAME,"_fab");const STOKEY_TRANBOX="".concat(APP_NAME,"_tranbox");const STOKEY_RULESCACHE_PREFIX="".concat(APP_NAME,"_rulescache_");const CACHE_NAME="".concat(APP_NAME,"_cache");const DEFAULT_CACHE_TIMEOUT=(/* unused pure expression or super */ null && (3600*24*7));// 缓存超时时间(7天) ;// CONCATENATED MODULE: ./src/config/url.js @@ -35118,7 +35128,7 @@ const CLIENT_WEB="web";const CLIENT_CHROME="chrome";const CLIENT_EDGE="edge";con ;// CONCATENATED MODULE: ./src/config/index.js ;// CONCATENATED MODULE: ./src/index.js -function App(){var _I18N$about_md;const[lang,setLang]=(0,react.useState)("zh");const{data,loading,error}=useGet("".concat(URL_RAW_PREFIX,"/").concat(I18N===null||I18N===void 0?void 0:(_I18N$about_md=I18N["about_md"])===null||_I18N$about_md===void 0?void 0:_I18N$about_md[lang]));return/*#__PURE__*/(0,jsx_runtime.jsxs)(Paper_Paper,{sx:{padding:2,margin:2},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Stack_Stack,{spacing:2,direction:"row",justifyContent:"flex-end",children:/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{variant:"text",onClick:()=>{setLang(pre=>pre==="zh"?"en":"zh");},children:lang==="zh"?"ENGLISH":"中文"})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Divider_Divider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Link_Link,{href:"https://github.com/fishjar/kiss-translator",children:"KISS Translator v".concat("2.0.5")})}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Link_Link,{href:"https://fishjar.github.io/kiss-translator/kiss-translator.user.js",children:"Install/Update Userscript for Tampermonkey/Violentmonkey"}),/*#__PURE__*/(0,jsx_runtime.jsx)(Link_Link,{href:"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js",children:"Install/Update Userscript for iOS Safari"}),/*#__PURE__*/(0,jsx_runtime.jsx)(Link_Link,{href:"https://fishjar.github.io/kiss-translator/options.html",children:"Open Options Page"})]}),loading?/*#__PURE__*/(0,jsx_runtime.jsx)("center",{children:/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{})}):/*#__PURE__*/(0,jsx_runtime.jsx)(ReactMarkdown,{children:error||data})]});}const src_root=client.createRoot(document.getElementById("root"));src_root.render(/*#__PURE__*/(0,jsx_runtime.jsx)(react.StrictMode,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(App,{})})); +function App(){var _I18N$about_md;const[lang,setLang]=(0,react.useState)("zh");const{data,loading,error}=useGet("".concat(URL_RAW_PREFIX,"/").concat(I18N===null||I18N===void 0?void 0:(_I18N$about_md=I18N["about_md"])===null||_I18N$about_md===void 0?void 0:_I18N$about_md[lang]));return/*#__PURE__*/(0,jsx_runtime.jsxs)(Paper_Paper,{sx:{padding:2,margin:2},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Stack_Stack,{spacing:2,direction:"row",justifyContent:"flex-end",children:/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{variant:"text",onClick:()=>{setLang(pre=>pre==="zh"?"en":"zh");},children:lang==="zh"?"ENGLISH":"中文"})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Divider_Divider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Link_Link,{href:"https://github.com/fishjar/kiss-translator",children:"KISS Translator v".concat("2.0.6")})}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Link_Link,{href:"https://fishjar.github.io/kiss-translator/kiss-translator.user.js",children:"Install/Update Userscript for Tampermonkey/Violentmonkey"}),/*#__PURE__*/(0,jsx_runtime.jsx)(Link_Link,{href:"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js",children:"Install/Update Userscript for iOS Safari"}),/*#__PURE__*/(0,jsx_runtime.jsx)(Link_Link,{href:"https://fishjar.github.io/kiss-translator/options.html",children:"Open Options Page"})]}),loading?/*#__PURE__*/(0,jsx_runtime.jsx)("center",{children:/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{})}):/*#__PURE__*/(0,jsx_runtime.jsx)(ReactMarkdown,{children:error||data})]});}const src_root=client.createRoot(document.getElementById("root"));src_root.render(/*#__PURE__*/(0,jsx_runtime.jsx)(react.StrictMode,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(App,{})})); })(); /******/ })() diff --git a/manifest.firefox.json b/manifest.firefox.json index 0cc79ab..9fc75be 100644 --- a/manifest.firefox.json +++ b/manifest.firefox.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "__MSG_app_name__", "description": "__MSG_app_description__", - "version": "2.0.5", + "version": "2.0.6", "default_locale": "en", "author": "Gabe", "homepage_url": "https://github.com/fishjar/kiss-translator", diff --git a/manifest.json b/manifest.json index e8d71e6..4243a96 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "__MSG_app_name__", "description": "__MSG_app_description__", - "version": "2.0.5", + "version": "2.0.6", "default_locale": "en", "author": "Gabe", "homepage_url": "https://github.com/fishjar/kiss-translator", diff --git a/manifest.thunderbird.json b/manifest.thunderbird.json index 77bf09c..a589b46 100644 --- a/manifest.thunderbird.json +++ b/manifest.thunderbird.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "__MSG_app_name__", "description": "__MSG_app_description__", - "version": "2.0.5", + "version": "2.0.6", "default_locale": "en", "author": "Gabe", "homepage_url": "https://github.com/fishjar/kiss-translator", diff --git a/options.js b/options.js index 44f4cab..7347cdc 100644 --- a/options.js +++ b/options.js @@ -2036,6 +2036,27 @@ var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRun /***/ }), +/***/ 3521: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; +var __webpack_unused_export__; + +"use client"; + +var _interopRequireDefault = __webpack_require__(3894); +__webpack_unused_export__ = ({ + value: true +}); +exports.Z = void 0; +var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); +var _jsxRuntime = __webpack_require__(7394); +var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { + d: "M2 20h20v4H2zm3.49-3h2.42l1.27-3.58h5.65L16.09 17h2.42L13.25 3h-2.5zm4.42-5.61 2.03-5.79h.12l2.03 5.79z" +}), 'FormatColorText'); + +/***/ }), + /***/ 3701: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { @@ -55520,7 +55541,7 @@ const Alert = /*#__PURE__*/react.forwardRef(function Alert(inProps, ref) { false ? 0 : void 0; /* harmony default export */ const Alert_Alert = (Alert); ;// CONCATENATED MODULE: ./src/config/app.js -const APP_NAME="KISS Translator".trim().split(/\s+/).join("-");const APP_LCNAME=APP_NAME.toLowerCase();const APP_UPNAME=APP_NAME.toUpperCase();const APP_CONSTS={fabID:"".concat(APP_LCNAME,"-fab"),boxID:"".concat(APP_LCNAME,"-box"),popupID:"".concat(APP_LCNAME,"-popup")};const APP_VERSION="2.0.5".split(".");const THEME_LIGHT="light";const THEME_DARK="dark"; +const APP_NAME="KISS Translator".trim().split(/\s+/).join("-");const APP_LCNAME=APP_NAME.toLowerCase();const APP_UPNAME=APP_NAME.toUpperCase();const APP_CONSTS={fabID:"".concat(APP_LCNAME,"-fab"),boxID:"".concat(APP_LCNAME,"-box"),popupID:"".concat(APP_LCNAME,"-popup")};const APP_VERSION="2.0.6".split(".");const THEME_LIGHT="light";const THEME_DARK="dark"; ;// CONCATENATED MODULE: ./src/config/api.js const DEFAULT_HTTP_TIMEOUT=10000;// 调用超时时间 const DEFAULT_FETCH_LIMIT=10;// 默认最大任务数量 @@ -55558,7 +55579,7 @@ context:new Set([api_OPT_TRANS_OPENAI,api_OPT_TRANS_GEMINI,api_OPT_TRANS_GEMINI_ "transcreation",// 创译风格 "machine-like",// 机器风格 "concise"// 简明风格 -];const BUILTIN_PLACEHOLDERS=["{ }","{{ }}","[ ]","[[ ]]"];const BUILTIN_PLACETAGS=["i","a","b","x"];const OPT_LANGS_TO=[["en","English - English"],["zh-CN","Simplified Chinese - 简体中文"],["zh-TW","Traditional Chinese - 繁體中文"],["ar","Arabic - العربية"],["bg","Bulgarian - Български"],["ca","Catalan - Català"],["hr","Croatian - Hrvatski"],["cs","Czech - Čeština"],["da","Danish - Dansk"],["nl","Dutch - Nederlands"],["fi","Finnish - Suomi"],["fr","French - Français"],["de","German - Deutsch"],["el","Greek - Ελληνικά"],["hi","Hindi - हिन्दी"],["hu","Hungarian - Magyar"],["id","Indonesian - Indonesia"],["it","Italian - Italiano"],["ja","Japanese - 日本語"],["ko","Korean - 한국어"],["ms","Malay - Melayu"],["mt","Maltese - Malti"],["nb","Norwegian - Norsk Bokmål"],["pl","Polish - Polski"],["pt","Portuguese - Português"],["ro","Romanian - Română"],["ru","Russian - Русский"],["sk","Slovak - Slovenčina"],["sl","Slovenian - Slovenščina"],["es","Spanish - Español"],["sv","Swedish - Svenska"],["ta","Tamil - தமிழ்"],["te","Telugu - తెలుగు"],["th","Thai - ไทย"],["tr","Turkish - Türkçe"],["uk","Ukrainian - Українська"],["vi","Vietnamese - Tiếng Việt"]];const OPT_LANGS_LIST=OPT_LANGS_TO.map(_ref=>{let[lang]=_ref;return lang;});const OPT_LANGS_FROM=[["auto","Auto-detect"],...OPT_LANGS_TO];const OPT_LANGS_MAP=new Map(OPT_LANGS_TO);// CODE->名称 +];const BUILTIN_PLACEHOLDERS=["{ }","{{ }}","[ ]","[[ ]]"];const BUILTIN_PLACETAGS=["i","a","b","x"];const OPT_LANGS_TO=[["en","English - English"],["zh-CN","Simplified Chinese - 简体中文"],["zh-TW","Traditional Chinese - 繁體中文"],["ar","Arabic - العربية"],["bg","Bulgarian - Български"],["ca","Catalan - Català"],["hr","Croatian - Hrvatski"],["cs","Czech - Čeština"],["da","Danish - Dansk"],["nl","Dutch - Nederlands"],["fa","Persian - فارسی"],["fi","Finnish - Suomi"],["fr","French - Français"],["de","German - Deutsch"],["el","Greek - Ελληνικά"],["hi","Hindi - हिन्दी"],["hu","Hungarian - Magyar"],["id","Indonesian - Indonesia"],["it","Italian - Italiano"],["ja","Japanese - 日本語"],["ko","Korean - 한국어"],["ms","Malay - Melayu"],["mt","Maltese - Malti"],["nb","Norwegian - Norsk Bokmål"],["pl","Polish - Polski"],["pt","Portuguese - Português"],["ro","Romanian - Română"],["ru","Russian - Русский"],["sk","Slovak - Slovenčina"],["sl","Slovenian - Slovenščina"],["es","Spanish - Español"],["sv","Swedish - Svenska"],["ta","Tamil - தமிழ்"],["te","Telugu - తెలుగు"],["th","Thai - ไทย"],["tr","Turkish - Türkçe"],["uk","Ukrainian - Українська"],["vi","Vietnamese - Tiếng Việt"]];const OPT_LANGS_LIST=OPT_LANGS_TO.map(_ref=>{let[lang]=_ref;return lang;});const OPT_LANGS_FROM=[["auto","Auto-detect"],...OPT_LANGS_TO];const OPT_LANGS_MAP=new Map(OPT_LANGS_TO);// CODE->名称 const OPT_LANGS_SPEC_NAME=new Map(OPT_LANGS_FROM.map(_ref2=>{let[key,val]=_ref2;return[key,val.split(" - ")[0]];}));const OPT_LANGS_SPEC_DEFAULT=new Map(OPT_LANGS_FROM.map(_ref3=>{let[key]=_ref3;return[key,key];}));const OPT_LANGS_SPEC_DEFAULT_UC=new Map(OPT_LANGS_FROM.map(_ref4=>{let[key]=_ref4;return[key,key.toUpperCase()];}));const OPT_LANGS_TO_SPEC={[OPT_TRANS_BUILTINAI]:new Map([...OPT_LANGS_SPEC_DEFAULT,["zh-CN","zh"],["zh-TW","zh"]]),[OPT_TRANS_GOOGLE]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_GOOGLE_2]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_MICROSOFT]:new Map([...OPT_LANGS_SPEC_DEFAULT,["auto",""],["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[OPT_TRANS_AZUREAI]:new Map([...OPT_LANGS_SPEC_DEFAULT,["auto",""],["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[OPT_TRANS_DEEPL]:new Map([...OPT_LANGS_SPEC_DEFAULT_UC,["auto",""],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLFREE]:new Map([...OPT_LANGS_SPEC_DEFAULT_UC,["auto","auto"],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLX]:new Map([...OPT_LANGS_SPEC_DEFAULT_UC,["auto","auto"],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_NIUTRANS]:new Map([...OPT_LANGS_SPEC_DEFAULT,["auto","auto"],["zh-CN","zh"],["zh-TW","cht"]]),[OPT_TRANS_VOLCENGINE]:new Map([...OPT_LANGS_SPEC_DEFAULT,["auto","auto"],["zh-CN","zh"],["zh-TW","zh-Hant"]]),[OPT_TRANS_BAIDU]:new Map([...OPT_LANGS_SPEC_DEFAULT,["zh-CN","zh"],["zh-TW","cht"],["ar","ara"],["bg","bul"],["ca","cat"],["hr","hrv"],["da","dan"],["fi","fin"],["fr","fra"],["hi","mai"],["ja","jp"],["ko","kor"],["ms","may"],["mt","mlt"],["nb","nor"],["ro","rom"],["ru","ru"],["sl","slo"],["es","spa"],["sv","swe"],["ta","tam"],["te","tel"],["uk","ukr"],["vi","vie"]]),[OPT_TRANS_TENCENT]:new Map([["auto","auto"],["zh-CN","zh"],["zh-TW","zh"],["en","en"],["ar","ar"],["de","de"],["ru","ru"],["fr","fr"],["fi","fil"],["ko","ko"],["ms","ms"],["pt","pt"],["ja","ja"],["th","th"],["tr","tr"],["es","es"],["it","it"],["hi","hi"],["id","id"],["vi","vi"]]),[api_OPT_TRANS_OPENAI]:OPT_LANGS_SPEC_DEFAULT,[api_OPT_TRANS_GEMINI]:OPT_LANGS_SPEC_DEFAULT,[api_OPT_TRANS_GEMINI_2]:OPT_LANGS_SPEC_DEFAULT,[api_OPT_TRANS_CLAUDE]:OPT_LANGS_SPEC_DEFAULT,[api_OPT_TRANS_OLLAMA]:OPT_LANGS_SPEC_DEFAULT,[api_OPT_TRANS_OPENROUTER]:OPT_LANGS_SPEC_DEFAULT,[OPT_TRANS_CLOUDFLAREAI]:OPT_LANGS_SPEC_DEFAULT,[api_OPT_TRANS_CUSTOMIZE]:OPT_LANGS_SPEC_DEFAULT};const specToCode=m=>new Map(Array.from(m.entries()).map(_ref5=>{let[k,v]=_ref5;if(v===""){return["auto","auto"];}if(v==="zh"||v==="ZH"){return[v,"zh-CN"];}return[v,k];}));// 名称->CODE const OPT_LANGS_TO_CODE={};Object.entries(OPT_LANGS_TO_SPEC).forEach(_ref6=>{let[t,m]=_ref6;OPT_LANGS_TO_CODE[t]=specToCode(m);});const defaultNobatchPrompt="You are a professional, authentic machine translation engine.";const defaultNobatchUserPrompt="Translate the following source text from ".concat(INPUT_PLACE_FROM," to ").concat(INPUT_PLACE_TO,". Output translation directly without any additional text.\n\nSource Text: ").concat(INPUT_PLACE_TEXT,"\n\nTranslated Text:");const defaultSystemPrompt="Act as a translation API. Output a single raw JSON object only. No extra text or fences.\n\nInput:\n{\"targetLanguage\":\"\",\"title\":\"\",\"description\":\"\",\"segments\":[{\"id\":1,\"text\":\"...\"}],\"glossary\":{\"sourceTerm\":\"targetTerm\"},\"tone\":\"\"}\n\nOutput:\n{\"translations\":[{\"id\":1,\"text\":\"...\",\"sourceLanguage\":\"\"}]}\n\nRules:\n1. Use title/description for context only; do not output them.\n2. Keep id, order, and count of segments.\n3. Preserve whitespace, HTML entities, and all HTML-like tags (e.g., , ). Translate inner text only.\n4. Highest priority: Follow 'glossary'. Use value for translation; if value is \"\", keep the key.\n5. Do not translate: content in ,
, text enclosed in backticks, or placeholders like {1}, {{1}}, [1], [[1]].\n6.  Apply the specified tone to the translation.\n7.  Detect sourceLanguage for each segment.\n8.  Return empty or unchanged inputs as is.\n\nExample:\nInput: {\"targetLanguage\":\"zh-CN\",\"segments\":[{\"id\":1,\"text\":\"A React component.\"}],\"glossary\":{\"component\":\"\u7EC4\u4EF6\",\"React\":\"\"}}\nOutput: {\"translations\":[{\"id\":1,\"text\":\"\u4E00\u4E2AReact\u7EC4\u4EF6\",\"sourceLanguage\":\"en\"}]}\n\nFail-safe: On any error, return {\"translations\":[]}.";// const defaultSubtitlePrompt = `Goal: Convert raw subtitle event JSON into a clean, sentence-based JSON array.
 // Output (valid JSON array, output ONLY this array):
@@ -55587,7 +55608,7 @@ customHeader:"",customBody:"",reqHook:"",// request 钩子函数
 resHook:"",// response 钩子函数
 fetchLimit:DEFAULT_FETCH_LIMIT,// 最大请求数量
 fetchInterval:DEFAULT_FETCH_INTERVAL,// 请求间隔时间
-httpTimeout:DEFAULT_HTTP_TIMEOUT*30,// 请求超时时间
+httpTimeout:DEFAULT_HTTP_TIMEOUT*3,// 请求超时时间
 batchInterval:DEFAULT_BATCH_INTERVAL,// 批处理请求间隔时间
 batchSize:DEFAULT_BATCH_SIZE,// 每次最多发送段落数量
 batchLength:DEFAULT_BATCH_LENGTH,// 每次发送最大文字数量
@@ -55600,24 +55621,31 @@ isDisabled:false,// 是否不显示,
 region:""// Azure 专用
 };const defaultApiOpts={[OPT_TRANS_BUILTINAI]:defaultApi,[OPT_TRANS_GOOGLE]:{...defaultApi,url:"https://translate.googleapis.com/translate_a/single"},[OPT_TRANS_GOOGLE_2]:{...defaultApi,url:"https://translate-pa.googleapis.com/v1/translateHtml",key:"AIzaSyATBXajvzQLTDHEQbcpq0Ihe0vWDHmO520",useBatchFetch:true},[OPT_TRANS_MICROSOFT]:{...defaultApi,useBatchFetch:true},[OPT_TRANS_AZUREAI]:{...defaultApi,url:"https://api.cognitive.microsofttranslator.com/translate?api-version=3.0",useBatchFetch:true},[OPT_TRANS_BAIDU]:{...defaultApi},[OPT_TRANS_TENCENT]:{...defaultApi,useBatchFetch:true},[OPT_TRANS_VOLCENGINE]:{...defaultApi},[OPT_TRANS_DEEPL]:{...defaultApi,url:"https://api-free.deepl.com/v2/translate",useBatchFetch:true},[OPT_TRANS_DEEPLFREE]:{...defaultApi,fetchLimit:1},[OPT_TRANS_DEEPLX]:{...defaultApi,url:"http://localhost:1188/translate"},[OPT_TRANS_NIUTRANS]:{...defaultApi,url:"https://api.niutrans.com/NiuTransServer/translation",dictNo:"",memoryNo:""},[api_OPT_TRANS_OPENAI]:{...defaultApi,url:"https://api.openai.com/v1/chat/completions",model:"gpt-4",useBatchFetch:true},[api_OPT_TRANS_GEMINI]:{...defaultApi,url:"https://generativelanguage.googleapis.com/v1/models/".concat(INPUT_PLACE_MODEL,":generateContent?key=").concat(INPUT_PLACE_KEY),model:"gemini-2.5-flash",useBatchFetch:true},[api_OPT_TRANS_GEMINI_2]:{...defaultApi,url:"https://generativelanguage.googleapis.com/v1beta/openai/chat/completions",model:"gemini-2.0-flash",useBatchFetch:true},[api_OPT_TRANS_CLAUDE]:{...defaultApi,url:"https://api.anthropic.com/v1/messages",model:"claude-3-haiku-20240307",useBatchFetch:true},[OPT_TRANS_CLOUDFLAREAI]:{...defaultApi,url:"https://api.cloudflare.com/client/v4/accounts/{{ACCOUNT_ID}}/ai/run/@cf/meta/m2m100-1.2b"},[api_OPT_TRANS_OLLAMA]:{...defaultApi,url:"http://localhost:11434/v1/chat/completions",model:"llama3.1",useBatchFetch:true},[api_OPT_TRANS_OPENROUTER]:{...defaultApi,url:"https://openrouter.ai/api/v1/chat/completions",model:"openai/gpt-4o",useBatchFetch:true},[api_OPT_TRANS_CUSTOMIZE]:{...defaultApi,url:"https://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN",reqHook:defaultRequestHook,resHook:defaultResponseHook}};// 内置翻译接口列表(带参数)
 const DEFAULT_API_LIST=OPT_ALL_TRANS_TYPES.map(apiType=>({...defaultApiOpts[apiType],apiSlug:apiType,apiName:apiType,apiType}));const DEFAULT_API_TYPE=OPT_TRANS_MICROSOFT;const DEFAULT_API_SETTING=DEFAULT_API_LIST.find(a=>a.apiType===DEFAULT_API_TYPE);
-;// CONCATENATED MODULE: ./src/config/rules.js
-const rules_GLOBAL_KEY="*";const REMAIN_KEY="-";const SHADOW_KEY=">>>";const rules_DEFAULT_COLOR="#209CEE";// 默认高亮背景色/线条颜色
-const DEFAULT_TRANS_TAG="font";const DEFAULT_SELECT_STYLE="-webkit-line-clamp: unset; max-height: none; height: auto;";const OPT_STYLE_NONE="style_none";// 无
+;// CONCATENATED MODULE: ./src/config/styles.js
+const OPT_STYLE_NONE="style_none";// 无
 const OPT_STYLE_LINE="under_line";// 下划线
 const OPT_STYLE_DOTLINE="dot_line";// 点状线
 const OPT_STYLE_DASHLINE="dash_line";// 虚线
+const OPT_STYLE_DASHLINE_BOLD="dash_line_bold";// 虚线加粗
 const OPT_STYLE_DASHBOX="dash_box";// 虚线框
+const OPT_STYLE_DASHBOX_BOLD="dash_box_bold";// 虚线框加粗
 const OPT_STYLE_WAVYLINE="wavy_line";// 波浪线
+const OPT_STYLE_WAVYLINE_BOLD="wavy_line_bold";// 波浪线加粗
+const OPT_STYLE_MARKER="marker";// 马克笔
+const OPT_STYLE_GRADIENT_MARKER="gradient_marker";// 渐变马克笔
 const OPT_STYLE_FUZZY="fuzzy";// 模糊
 const OPT_STYLE_HIGHLIGHT="highlight";// 高亮
 const OPT_STYLE_BLOCKQUOTE="blockquote";// 引用
 const OPT_STYLE_GRADIENT="gradient";// 渐变
 const OPT_STYLE_BLINK="blink";// 闪现
 const OPT_STYLE_GLOW="glow";// 发光
-const OPT_STYLE_DIY="diy_style";// 自定义样式
-const OPT_STYLE_ALL=[OPT_STYLE_NONE,OPT_STYLE_LINE,OPT_STYLE_DOTLINE,OPT_STYLE_DASHLINE,OPT_STYLE_WAVYLINE,OPT_STYLE_DASHBOX,OPT_STYLE_FUZZY,OPT_STYLE_HIGHLIGHT,OPT_STYLE_BLOCKQUOTE,OPT_STYLE_GRADIENT,OPT_STYLE_BLINK,OPT_STYLE_GLOW,OPT_STYLE_DIY];const OPT_STYLE_USE_COLOR=[OPT_STYLE_LINE,OPT_STYLE_DOTLINE,OPT_STYLE_DASHLINE,OPT_STYLE_DASHBOX,OPT_STYLE_WAVYLINE,OPT_STYLE_HIGHLIGHT,OPT_STYLE_BLOCKQUOTE];const OPT_TIMING_PAGESCROLL="mk_pagescroll";// 滚动加载翻译
+const OPT_STYLE_COLORFUL="colorful";// 多彩
+const OPT_STYLE_ALL=[OPT_STYLE_NONE,OPT_STYLE_LINE,OPT_STYLE_DOTLINE,OPT_STYLE_DASHLINE,OPT_STYLE_DASHLINE_BOLD,OPT_STYLE_WAVYLINE,OPT_STYLE_WAVYLINE_BOLD,OPT_STYLE_DASHBOX,OPT_STYLE_DASHBOX_BOLD,OPT_STYLE_MARKER,OPT_STYLE_GRADIENT_MARKER,OPT_STYLE_FUZZY,OPT_STYLE_HIGHLIGHT,OPT_STYLE_BLOCKQUOTE,OPT_STYLE_GRADIENT,OPT_STYLE_BLINK,OPT_STYLE_GLOW,OPT_STYLE_COLORFUL];const DEFAULT_CUSTOM_STYLES=[{styleSlug:"custom",styleName:"Custom Style",styleCode:"color: #209CEE;"}];
+;// CONCATENATED MODULE: ./src/config/rules.js
+const rules_GLOBAL_KEY="*";const REMAIN_KEY="-";const SHADOW_KEY=">>>";const DEFAULT_COLOR="#209CEE";// 默认高亮背景色/线条颜色
+const DEFAULT_TRANS_TAG="font";const DEFAULT_SELECT_STYLE="-webkit-line-clamp: unset; max-height: none; height: auto;";const OPT_TIMING_PAGESCROLL="mk_pagescroll";// 滚动加载翻译
 const OPT_TIMING_PAGEOPEN="mk_pageopen";// 直接翻译到底
-const OPT_TIMING_MOUSEOVER="mk_mouseover";const OPT_TIMING_CONTROL="mk_ctrlKey";const OPT_TIMING_SHIFT="mk_shiftKey";const OPT_TIMING_ALT="mk_altKey";const OPT_TIMING_ALL=[OPT_TIMING_PAGESCROLL,OPT_TIMING_PAGEOPEN,OPT_TIMING_MOUSEOVER,OPT_TIMING_CONTROL,OPT_TIMING_SHIFT,OPT_TIMING_ALT];const OPT_SPLIT_PARAGRAPH_DISABLE="split_disable";const OPT_SPLIT_PARAGRAPH_TEXTLENGTH="split_textlength";const OPT_SPLIT_PARAGRAPH_PUNCTUATION="split_punctuation";const OPT_SPLIT_PARAGRAPH_ALL=[OPT_SPLIT_PARAGRAPH_DISABLE,OPT_SPLIT_PARAGRAPH_PUNCTUATION,OPT_SPLIT_PARAGRAPH_TEXTLENGTH];const OPT_HIGHLIGHT_WORDS_DISABLE="highlight_disable";const OPT_HIGHLIGHT_WORDS_BEFORETRANS="highlight_beforetrans";const OPT_HIGHLIGHT_WORDS_AFTERTRANS="highlight_aftertrans";const OPT_HIGHLIGHT_WORDS_ALL=[OPT_HIGHLIGHT_WORDS_DISABLE,OPT_HIGHLIGHT_WORDS_BEFORETRANS,OPT_HIGHLIGHT_WORDS_AFTERTRANS];const DEFAULT_DIY_STYLE="color: #333;\nbackground: linear-gradient(\n  45deg,\n  LightGreen 20%,\n  LightPink 20% 40%,\n  LightSalmon 40% 60%,\n  LightSeaGreen 60% 80%,\n  LightSkyBlue 80%\n);\n&:hover {\n  color: #111;\n};";const DEFAULT_SELECTOR="h1, h2, h3, h4, h5, h6, li, p, dd, blockquote, figcaption, label, legend";const DEFAULT_IGNORE_SELECTOR="button, footer, pre, mark, nav";const DEFAULT_KEEP_SELECTOR="code, cite, math, .math, a:has(code)";const rules_DEFAULT_RULE={pattern:"",// 匹配网址
+const OPT_TIMING_MOUSEOVER="mk_mouseover";const OPT_TIMING_CONTROL="mk_ctrlKey";const OPT_TIMING_SHIFT="mk_shiftKey";const OPT_TIMING_ALT="mk_altKey";const OPT_TIMING_ALL=[OPT_TIMING_PAGESCROLL,OPT_TIMING_PAGEOPEN,OPT_TIMING_MOUSEOVER,OPT_TIMING_CONTROL,OPT_TIMING_SHIFT,OPT_TIMING_ALT];const OPT_SPLIT_PARAGRAPH_DISABLE="split_disable";const OPT_SPLIT_PARAGRAPH_TEXTLENGTH="split_textlength";const OPT_SPLIT_PARAGRAPH_PUNCTUATION="split_punctuation";const OPT_SPLIT_PARAGRAPH_ALL=[OPT_SPLIT_PARAGRAPH_DISABLE,OPT_SPLIT_PARAGRAPH_PUNCTUATION,OPT_SPLIT_PARAGRAPH_TEXTLENGTH];const OPT_HIGHLIGHT_WORDS_DISABLE="highlight_disable";const OPT_HIGHLIGHT_WORDS_BEFORETRANS="highlight_beforetrans";const OPT_HIGHLIGHT_WORDS_AFTERTRANS="highlight_aftertrans";const OPT_HIGHLIGHT_WORDS_ALL=[OPT_HIGHLIGHT_WORDS_DISABLE,OPT_HIGHLIGHT_WORDS_BEFORETRANS,OPT_HIGHLIGHT_WORDS_AFTERTRANS];const DEFAULT_SELECTOR="h1, h2, h3, h4, h5, h6, li, p, dd, blockquote, figcaption, label, legend";const DEFAULT_IGNORE_SELECTOR="button, footer, pre, mark, nav";const DEFAULT_KEEP_SELECTOR="code, cite, math, .math, a:has(code)";const rules_DEFAULT_RULE={pattern:"",// 匹配网址
 selector:"",// 选择器
 keepSelector:"",// 保留元素选择器
 terms:"",// 专业术语
@@ -55627,8 +55655,9 @@ fromLang:rules_GLOBAL_KEY,// 源语言
 toLang:rules_GLOBAL_KEY,// 目标语言
 textStyle:rules_GLOBAL_KEY,// 译文样式
 transOpen:rules_GLOBAL_KEY,// 开启翻译
-bgColor:"",// 译文颜色
-textDiyStyle:"",// 自定义译文样式
+// bgColor: "", // 译文颜色 (作废)
+// textDiyStyle: "", // 自定义译文样式 (作废)
+textExtStyle:"",// 译文附加样式
 termsStyle:"",// 专业术语样式
 highlightStyle:"",// 高亮词汇样式
 selectStyle:"",// 选择器节点样式
@@ -55667,8 +55696,9 @@ fromLang:"auto",// 源语言
 toLang:"zh-CN",// 目标语言
 textStyle:OPT_STYLE_NONE,// 译文样式
 transOpen:"false",// 开启翻译
-bgColor:"",// 译文颜色
-textDiyStyle:DEFAULT_DIY_STYLE,// 自定义译文样式
+// bgColor: DEFAULT_COLOR, // 译文颜色 (作废)
+// textDiyStyle: DEFAULT_DIY_STYLE, // 自定义译文样式 (作废)
+textExtStyle:"",// 译文附加样式
 termsStyle:"font-weight: bold;",// 专业术语样式
 highlightStyle:"color: red;",// 高亮词汇样式
 selectStyle:DEFAULT_SELECT_STYLE,// 选择器节点样式
@@ -55696,11 +55726,11 @@ ignoreSelector:DEFAULT_IGNORE_SELECTOR,// 不翻译的选择器
 splitParagraph:OPT_SPLIT_PARAGRAPH_DISABLE,// 切分段落
 splitLength:100,// 切分段落长度
 highlightWords:OPT_HIGHLIGHT_WORDS_DISABLE// 高亮词汇
-};const rules_DEFAULT_RULES=[rules_GLOBLA_RULE];const rules_DEFAULT_OW_RULE={apiSlug:REMAIN_KEY,fromLang:REMAIN_KEY,toLang:REMAIN_KEY,textStyle:REMAIN_KEY,transOpen:REMAIN_KEY,bgColor:"",textDiyStyle:DEFAULT_DIY_STYLE};// todo: 校验几个内置规则
+};const rules_DEFAULT_RULES=[rules_GLOBLA_RULE];// todo: 校验几个内置规则
 const RULES_MAP={// "www.google.com/search": {
 //   rootsSelector: `#rcnt`,
 // },
-"en.wikipedia.org":{ignoreSelector:".button, code, footer, form, mark, pre, .mwe-math-element, .mw-editsection"},"news.ycombinator.com":{selector:"p, .titleline, .commtext, .hn-item-title, .hn-comment-text, .hn-story-title",keepSelector:"code, img, svg, pre, .sitebit",ignoreSelector:"button, code, footer, form, header, mark, nav, pre, .reply",autoScan:"false"},"twitter.com, https://x.com":{selector:"[data-testid='tweetText']",keepSelector:"img, svg, a, span:has(a), div:has(a)",ignoreSelector:"button, [data-testid='videoPlayer'], [role='group']",autoScan:"false"},"www.youtube.com/live_chat":{rootsSelector:"div#items",selector:"span.yt-live-chat-text-message-renderer",autoScan:"false"},"www.youtube.com":{rootsSelector:"ytd-page-manager",ignoreSelector:"aside, button, footer, form, header, pre, mark, nav, #player, #container, .caption-window, .ytp-settings-menu"},"web.telegram.org":{autoScan:"false",selector:".text-content, .embedded-text-wrapper",rootsSelector:".Transition"}};const rules_BUILTIN_RULES=Object.entries(RULES_MAP).map(_ref=>{let[pattern,rule]=_ref;return{// ...DEFAULT_RULE,
+"en.wikipedia.org":{ignoreSelector:".button, code, footer, form, mark, pre, .mwe-math-element, .mw-editsection"},"news.ycombinator.com":{selector:"p, .titleline, .commtext, .hn-item-title, .hn-comment-text, .hn-story-title",keepSelector:"code, img, svg, pre, .sitebit",ignoreSelector:"button, code, footer, form, header, mark, nav, pre, .reply",autoScan:"false"},"twitter.com, https://x.com":{selector:"[data-testid='tweetText'], [data-testid='twitter-article-title'], .public-DraftStyleDefault-block",keepSelector:"img, svg, a, span:has(a), div:has(a)",ignoreSelector:"button, [data-testid='videoPlayer'], [role='group']",autoScan:"false"},"www.youtube.com/live_chat":{rootsSelector:"div#items",selector:"span.yt-live-chat-text-message-renderer",autoScan:"false"},"www.youtube.com":{rootsSelector:"ytd-page-manager",ignoreSelector:"aside, button, footer, form, header, pre, mark, nav, #player, #container, .caption-window, .ytp-settings-menu"},"web.telegram.org":{autoScan:"false",selector:".text-content, .embedded-text-wrapper",rootsSelector:".Transition"}};const rules_BUILTIN_RULES=Object.entries(RULES_MAP).map(_ref=>{let[pattern,rule]=_ref;return{// ...DEFAULT_RULE,
 ...rule,pattern};});
 ;// CONCATENATED MODULE: ./src/libs/log.js
 // 定义日志级别
@@ -55772,7 +55802,7 @@ triggerMode:OPT_TRANBOX_TRIGGER_CLICK,// 触发翻译方式
 // extStyles: "", // 附加样式
 enDict:OPT_DICT_BING,// 英文词典
 enSug:OPT_SUG_YOUDAO// 英文建议
-};const SUBTITLE_WINDOW_STYLE="padding: 0.5em 1em;\nbackground-color: rgba(0, 0, 0, 0.5);\ncolor: white;\nline-height: 1.3;\ntext-shadow: 1px 1px 2px black;\ndisplay: inline-block";const SUBTITLE_ORIGIN_STYLE="font-size: clamp(1.5rem, 3cqw, 3rem);";const SUBTITLE_TRANSLATION_STYLE="font-size: clamp(1.5rem, 3cqw, 3rem);";const DEFAULT_SUBTITLE_SETTING={enabled:true,// 是否开启
+};const SUBTITLE_WINDOW_STYLE="padding: 0.5em 1em;\nbackground-color: rgba(0, 0, 0, 0.5);\ncolor: white;\nline-height: 1.3;\ntext-shadow: 1px 1px 2px black;\ndisplay: inline-block";const SUBTITLE_ORIGIN_STYLE="font-size: clamp(1rem, 2cqw, 3rem);";const SUBTITLE_TRANSLATION_STYLE="font-size: clamp(1rem, 2cqw, 3rem);";const DEFAULT_SUBTITLE_SETTING={enabled:true,// 是否开启
 apiSlug:OPT_TRANS_MICROSOFT,segSlug:"-",// AI智能断句
 chunkLength:1000,// AI处理切割长度
 // fromLang: "en",
@@ -55819,10 +55849,11 @@ preInit:true,// 是否预加载脚本
 transAllnow:false,// 是否立即全部翻译
 subtitleSetting:DEFAULT_SUBTITLE_SETTING,// 字幕设置
 logLevel:LogLevel.INFO.value,// 日志级别
-rootMargin:500// 提前触发翻译
+rootMargin:500,// 提前触发翻译
+customStyles:DEFAULT_CUSTOM_STYLES// 自定义样式列表
 };
 ;// CONCATENATED MODULE: ./src/config/i18n.js
-const UI_LANGS=[["en","English"],["zh","简体中文"],["zh_TW","繁體中文"]];const customApiLangs="[\"en\", \"English - English\"],\n[\"zh-CN\", \"Simplified Chinese - \u7B80\u4F53\u4E2D\u6587\"],\n[\"zh-TW\", \"Traditional Chinese - \u7E41\u9AD4\u4E2D\u6587\"],\n[\"ar\", \"Arabic - \u0627\u0644\u0639\u0631\u0628\u064A\u0629\"],\n[\"bg\", \"Bulgarian - \u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438\"],\n[\"ca\", \"Catalan - Catal\xE0\"],\n[\"hr\", \"Croatian - Hrvatski\"],\n[\"cs\", \"Czech - \u010Ce\u0161tina\"],\n[\"da\", \"Danish - Dansk\"],\n[\"nl\", \"Dutch - Nederlands\"],\n[\"fi\", \"Finnish - Suomi\"],\n[\"fr\", \"French - Fran\xE7ais\"],\n[\"de\", \"German - Deutsch\"],\n[\"el\", \"Greek - \u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC\"],\n[\"hi\", \"Hindi - \u0939\u093F\u0928\u094D\u0926\u0940\"],\n[\"hu\", \"Hungarian - Magyar\"],\n[\"id\", \"Indonesian - Indonesia\"],\n[\"it\", \"Italian - Italiano\"],\n[\"ja\", \"Japanese - \u65E5\u672C\u8A9E\"],\n[\"ko\", \"Korean - \uD55C\uAD6D\uC5B4\"],\n[\"ms\", \"Malay - Melayu\"],\n[\"mt\", \"Maltese - Malti\"],\n[\"nb\", \"Norwegian - Norsk Bokm\xE5l\"],\n[\"pl\", \"Polish - Polski\"],\n[\"pt\", \"Portuguese - Portugu\xEAs\"],\n[\"ro\", \"Romanian - Rom\xE2n\u0103\"],\n[\"ru\", \"Russian - \u0420\u0443\u0441\u0441\u043A\u0438\u0439\"],\n[\"sk\", \"Slovak - Sloven\u010Dina\"],\n[\"sl\", \"Slovenian - Sloven\u0161\u010Dina\"],\n[\"es\", \"Spanish - Espa\xF1ol\"],\n[\"sv\", \"Swedish - Svenska\"],\n[\"ta\", \"Tamil - \u0BA4\u0BAE\u0BBF\u0BB4\u0BCD\"],\n[\"te\", \"Telugu - \u0C24\u0C46\u0C32\u0C41\u0C17\u0C41\"],\n[\"th\", \"Thai - \u0E44\u0E17\u0E22\"],\n[\"tr\", \"Turkish - T\xFCrk\xE7e\"],\n[\"uk\", \"Ukrainian - \u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430\"],\n[\"vi\", \"Vietnamese - Ti\u1EBFng Vi\u1EC7t\"],\n";const customApiHelpZH="// \u8BF7\u6C42\u6570\u636E\u9ED8\u8BA4\u683C\u5F0F\n{\n  \"url\": \"{{url}}\",\n  \"method\": \"POST\",\n  \"headers\": {\n    \"Content-type\": \"application/json\",\n    \"Authorization\": \"Bearer {{key}}\"\n  },\n  \"body\": {\n    \"text\": \"{{text}}\", // \u5F85\u7FFB\u8BD1\u6587\u5B57\n    \"from\": \"{{from}}\", // \u6587\u5B57\u7684\u8BED\u8A00\uFF08\u53EF\u80FD\u4E3A\u7A7A\uFF09\n    \"to\": \"{{to}}\",     // \u76EE\u6807\u8BED\u8A00\n  },\n}\n\n\n// \u8FD4\u56DE\u6570\u636E\u9ED8\u8BA4\u683C\u5F0F\n{\n  text: \"\", // \u7FFB\u8BD1\u540E\u7684\u6587\u5B57\n  from: \"\", // \u8BC6\u522B\u7684\u6E90\u8BED\u8A00\n  to: \"\",   // \u76EE\u6807\u8BED\u8A00\uFF08\u53EF\u9009\uFF09\n}\n\n\n// Hook \u8303\u4F8B\n// URL\nhttps://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN\n\n// Request Hook\n(text, from, to, url, key) => [url, {\n  headers: {\n      \"Content-type\": \"application/json\",\n  },\n  method: \"GET\",\n  body: null,\n}]\n\n// Response Hook\n// \u5176\u4E2D\u8FD4\u56DE\u6570\u7EC4\u7B2C\u4E00\u4E2A\u503C\u8868\u793A\u8BD1\u6587\u5B57\u7B26\u4E32\uFF0C\u7B2C\u4E8C\u4E2A\u503C\u4E3A\u5E03\u5C14\u503C\uFF0C\u8868\u793A\u539F\u6587\u8BED\u8A00\u4E0E\u76EE\u6807\u8BED\u8A00\u662F\u5426\u76F8\u540C\n(res, text, from, to) => [res.sentences.map((item) => item.trans).join(\" \"), to === res.src]\n\n\n// \u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u5982\u4E0B\n".concat(customApiLangs,"\n");const customApiHelpEN="// Default request\n{\n  \"url\": \"{{url}}\",\n  \"method\": \"POST\",\n  \"headers\": {\n    \"Content-type\": \"application/json\",\n    \"Authorization\": \"Bearer {{key}}\"\n  },\n  \"body\": {\n    \"text\": \"{{text}}\", // Text to be translated\n    \"from\": \"{{from}}\", // The language of the text (may be empty)\n    \"to\": \"{{to}}\",     // Target language\n  },\n}\n\n\n// Default response\n{\n  text: \"\", // translated text\n  from: \"\", // Recognized source language\n  to: \"\",   // Target language (optional)\n}\n\n\n/// Hook Example\n// URL\nhttps://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN\n\n// Request Hook\n(text, from, to, url, key) => [url, {\n  headers: {\n      \"Content-type\": \"application/json\",\n  },\n  method: \"GET\",\n  body: null,\n}]\n\n// Response Hook\n// In the returned array, the first value is the translated string, while the second value is a boolean\n// that indicates whether the source language is the same as the target language.\n(res, text, from, to) => [res.sentences.map((item) => item.trans).join(\" \"), to === res.src]\n\n\n// The supported language codes are as follows\n".concat(customApiLangs,"\n");const requestHookHelperZH="1\u3001\u7B2C\u4E00\u4E2A\u53C2\u6570\u5305\u542B\u5982\u4E0B\u5B57\u6BB5\uFF1A'texts', 'from', 'to', 'url', 'key', 'model', 'systemPrompt', ...\n2\u3001\u8FD4\u56DE\u503C\u5FC5\u987B\u662F\u5305\u542B\u4EE5\u4E0B\u5B57\u6BB5\u7684\u5BF9\u8C61\uFF1A 'url', 'body', 'headers', 'method'\n3\u3001\u5982\u8FD4\u56DE\u7A7A\u503C\uFF0C\u5219hook\u51FD\u6570\u4E0D\u4F1A\u4EA7\u751F\u4EFB\u4F55\u6548\u679C\u3002\n\n// \u793A\u4F8B\nasync (args, { url, body, headers, userMsg, method } = {}) => {\n  return { url, body, headers, userMsg, method };\n}";const requestHookHelperEN="1. The first parameter contains the following fields: 'texts', 'from', 'to', 'url', 'key', 'model', 'systemPrompt', ...\n2. The return value must be an object containing the following fields: 'url', 'body', 'headers', 'method'\n3. If a null value is returned, the hook function will have no effect.\n\n// Example\nasync (args, { url, body, headers, userMsg, method } = {}) => {\n  return { url, body, headers, userMsg, method };\n}";const responsetHookHelperZH="1\u3001\u7B2C\u4E00\u4E2A\u53C2\u6570\u5305\u542B\u5982\u4E0B\u5B57\u6BB5\uFF1A'res', ...\n2\u3001\u8FD4\u56DE\u503C\u5FC5\u987B\u662F\u5305\u542B\u4EE5\u4E0B\u5B57\u6BB5\u7684\u5BF9\u8C61\uFF1A 'translations'\n  \uFF08'translations' \u5E94\u4E3A\u4E00\u4E2A\u4E8C\u7EF4\u6570\u7EC4\uFF1A[[\u8BD1\u6587, \u539F\u6587\u8BED\u8A00]]\uFF09\n3\u3001\u5982\u8FD4\u56DE\u7A7A\u503C\uFF0C\u5219hook\u51FD\u6570\u4E0D\u4F1A\u4EA7\u751F\u4EFB\u4F55\u6548\u679C\u3002\n\n// \u793A\u4F8B\nasync ({ res, ...args }) => {\n  const translations = [[\"\u4F60\u597D\", \"en\"]];\n  const modelMsg = {}; // \u7528\u4E8EAI\u4E0A\u4E0B\u6587\n  return { translations, modelMsg };\n}";const responsetHookHelperEN="1. The first parameter contains the following fields: 'res', ...\n2. The return value must be an object containing the following fields: 'translations'\n  ('translations' should be a two-dimensional array: [[translation, source language]]).\n3. If a null value is returned, the hook function will have no effect.\n\n// Example\nasync ({ res, ...args }) => {\n  const translations = [[\"\u4F60\u597D\", \"en\"]];\n  const modelMsg = {}; // For AI context\n  return { translations, modelMsg };\n}";const I18N={app_name:{zh:"\u7B80\u7EA6\u7FFB\u8BD1",en:"KISS Translator",zh_TW:"\u7C21\u7D04\u7FFB\u8B6F"},translate:{zh:"\u7FFB\u8BD1",en:"Translate",zh_TW:"\u7FFB\u8B6F"},custom_api_help:{zh:customApiHelpZH,en:customApiHelpEN,zh_TW:customApiHelpZH},request_hook_helper:{zh:requestHookHelperZH,en:requestHookHelperEN,zh_TW:requestHookHelperZH},response_hook_helper:{zh:responsetHookHelperZH,en:responsetHookHelperEN,zh_TW:responsetHookHelperZH},translate_alt:{zh:"\u7FFB\u8BD1",en:"Translate",zh_TW:"\u7FFB\u8B6F"},basic_setting:{zh:"\u57FA\u672C\u8BBE\u7F6E",en:"Basic Setting",zh_TW:"\u57FA\u672C\u8A2D\u5B9A"},rules_setting:{zh:"\u89C4\u5219\u8BBE\u7F6E",en:"Rules Setting",zh_TW:"\u898F\u5247\u8A2D\u5B9A"},apis_setting:{zh:"\u63A5\u53E3\u8BBE\u7F6E",en:"Apis Setting",zh_TW:"API\u8A2D\u5B9A"},sync_setting:{zh:"\u540C\u6B65\u8BBE\u7F6E",en:"Sync Setting",zh_TW:"\u540C\u6B65\u8A2D\u5B9A"},patch_setting:{zh:"\u8865\u4E01\u8BBE\u7F6E",en:"Patch Setting",zh_TW:"\u4FEE\u88DC\u8A2D\u5B9A"},patch_setting_help:{zh:"\u9488\u5BF9\u4E00\u4E9B\u7279\u6B8A\u7F51\u7AD9\u7684\u4FEE\u6B63\u811A\u672C\uFF0C\u4EE5\u4FBF\u7FFB\u8BD1\u8F6F\u4EF6\u5F97\u5230\u66F4\u597D\u7684\u5C55\u793A\u6548\u679C\u3002",en:"Corrected scripts for some special websites so that the translation software can get better display results.",zh_TW:"\u91DD\u5C0D\u67D0\u4E9B\u7279\u6B8A\u7DB2\u7AD9\u7684\u4FEE\u6B63\u8173\u672C\uFF0C\u8B93\u7FFB\u8B6F\u8EDF\u9AD4\u6709\u66F4\u597D\u7684\u986F\u793A\u6548\u679C\u3002"},inject_webfix:{zh:"\u6CE8\u5165\u4FEE\u590D\u8865\u4E01",en:"Inject Webfix",zh_TW:"\u6CE8\u5165\u4FEE\u6B63\u88DC\u4E01"},about:{zh:"\u5173\u4E8E",en:"About",zh_TW:"\u95DC\u65BC"},about_md:{zh:"README.md",en:"README.en.md",zh_TW:"README.md"},about_md_local:{zh:"\u8BF7 [\u70B9\u51FB\u8FD9\u91CC](".concat("https://github.com/fishjar/kiss-translator",") \u67E5\u770B\u8BE6\u60C5\u3002"),en:"Please [click here](".concat("https://github.com/fishjar/kiss-translator",") for details."),zh_TW:"\u8ACB\u3010\u9EDE\u9019\u88E1\u3011\u67E5\u770B\u8A73\u7D30\u5167\u5BB9\u3002"},ui_lang:{zh:"\u754C\u9762\u8BED\u8A00",en:"Interface Language",zh_TW:"\u4ECB\u9762\u8A9E\u8A00"},fetch_limit:{zh:"\u6700\u5927\u5E76\u53D1\u8BF7\u6C42\u6570\u91CF (1-100)",en:"Maximum Number Of Concurrent Requests (1-100)",zh_TW:"\u6700\u5927\u540C\u6642\u8ACB\u6C42\u6578\u91CF (1-100)"},if_think:{zh:"\u542F\u7528\u6216\u7981\u7528\u6A21\u578B\u7684\u6DF1\u5EA6\u601D\u8003\u80FD\u529B",en:"Enable or disable the model\u2019s thinking behavior ",zh_TW:"\u555F\u7528\u6216\u505C\u7528\u6A21\u578B\u7684\u6DF1\u5EA6\u601D\u8003\u80FD\u529B"},think:{zh:"\u542F\u7528\u6DF1\u5EA6\u601D\u8003",en:"enable thinking",zh_TW:"\u555F\u7528\u6DF1\u5EA6\u601D\u8003"},nothink:{zh:"\u7981\u7528\u6DF1\u5EA6\u601D\u8003",en:"disable thinking",zh_TW:"\u505C\u7528\u6DF1\u5EA6\u601D\u8003"},think_ignore:{zh:"\u5FFD\u7565\u4EE5\u4E0B\u6A21\u578B\u7684\u8F93\u51FA,\u9017\u53F7(,)\u5206\u5272,\u5F53\u6A21\u578B\u652F\u6301\u601D\u8003\u4F46ollama\u4E0D\u652F\u6301\u65F6\u9700\u8981\u586B\u5199\u672C\u53C2\u6570",en:"Ignore the  block for the following models, comma (,) separated",zh_TW:"\u5FFD\u7565\u4EE5\u4E0B\u6A21\u578B\u7684  \u8F38\u51FA\uFF0C\u4EE5\u9017\u865F (,) \u5206\u9694\uFF1B\u7576\u6A21\u578B\u652F\u63F4\u601D\u8003\u4F46 ollama \u4E0D\u652F\u63F4\u6642\u9700\u8981\u586B\u5BEB\u6B64\u53C3\u6578"},fetch_interval:{zh:"\u6BCF\u6B21\u8BF7\u6C42\u95F4\u9694\u65F6\u95F4 (0-5000ms)",en:"Time Between Requests (0-5000ms)",zh_TW:"\u6BCF\u6B21\u8ACB\u6C42\u9593\u9694\u6642\u9593 (0-5000ms)"},translate_interval:{zh:"\u7FFB\u8BD1\u95F4\u9694\u65F6\u95F4 (10-2000ms)",en:"Translation Interval (10-2000ms)",zh_TW:"\u7FFB\u8B6F\u9593\u9694\u6642\u9593 (10-2000ms)"},http_timeout:{zh:"\u8BF7\u6C42\u8D85\u65F6\u65F6\u95F4 (5000-60000ms)",en:"Request Timeout Time (5000-60000ms)",zh_TW:"\u8ACB\u6C42\u903E\u6642\u6642\u9593 (5000-60000ms)"},custom_header:{zh:"\u81EA\u5B9A\u4E49Header\u53C2\u6570",en:"Custom Header Params"},custom_header_help:{zh:"\u4F7F\u7528JSON\u683C\u5F0F\uFF0C\u4F8B\u5982 \"User-Agent\": \"Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0\"",en:"Use JSON format, for example \"User-Agent\": \"Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0\""},custom_body:{zh:"\u81EA\u5B9A\u4E49Body\u53C2\u6570",en:"Custom Body Params"},custom_body_help:{zh:"\u4F7F\u7528JSON\u683C\u5F0F\uFF0C\u4F8B\u5982 \"top_p\": 0.7",en:"Use JSON format, for example \"top_p\": 0.7"},min_translate_length:{zh:"\u6700\u5C0F\u7FFB\u8BD1\u5B57\u7B26\u6570 (1-100)",en:"Minimum number Of Translated Characters (1-100)",zh_TW:"\u6700\u5C0F\u7FFB\u8B6F\u5B57\u5143\u6578 (1-100)"},max_translate_length:{zh:"\u6700\u5927\u7FFB\u8BD1\u5B57\u7B26\u6570 (100-100000)",en:"Maximum number Of Translated Characters (100-100000)",zh_TW:"\u6700\u5927\u7FFB\u8B6F\u5B57\u5143\u6578 (100-100000)"},num_of_newline_characters:{zh:"\u6362\u884C\u5B57\u7B26\u6570 (1-1000)",en:"Number of Newline Characters (1-1000)",zh_TW:"\u63DB\u884C\u5B57\u5143\u6578 (1-1000)"},translate_service:{zh:"\u7FFB\u8BD1\u670D\u52A1",en:"Translate Service",zh_TW:"\u7FFB\u8B6F\u670D\u52D9"},translate_service_multiple:{zh:"\u7FFB\u8BD1\u670D\u52A1 (\u652F\u6301\u591A\u9009)",en:"Translation service (multiple supported)",zh_TW:"\u7FFB\u8B6F\u670D\u52D9 (\u652F\u63F4\u591A\u9078)"},translate_timing:{zh:"\u7FFB\u8BD1\u65F6\u673A",en:"Translate Timing",zh_TW:"\u7FFB\u8B6F\u6642\u6A5F"},mk_pagescroll:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u7FFB\u8BD1\uFF08\u63A8\u8350\uFF09",en:"Rolling Loading (Suggested)",zh_TW:"\u6EFE\u52D5\u8F09\u5165\u7FFB\u8B6F\uFF08\u5EFA\u8B70\uFF09"},mk_pageopen:{zh:"\u7ACB\u5373\u5168\u90E8\u7FFB\u8BD1",en:"Translate all now",zh_TW:"\u7ACB\u5373\u5168\u90E8\u7FFB\u8B6F"},mk_mouseover:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},mk_ctrlKey:{zh:"Control + \u9F20\u6807\u60AC\u505C",en:"Control + Mouseover",zh_TW:"Control + \u6ED1\u9F20\u61F8\u505C"},mk_shiftKey:{zh:"Shift + \u9F20\u6807\u60AC\u505C",en:"Shift + Mouseover",zh_TW:"Shift + \u6ED1\u9F20\u61F8\u505C"},mk_altKey:{zh:"Alt + \u9F20\u6807\u60AC\u505C",en:"Alt + Mouseover",zh_TW:"Alt + \u6ED1\u9F20\u61F8\u505C"},from_lang:{zh:"\u539F\u6587\u8BED\u8A00",en:"Source Language",zh_TW:"\u539F\u6587\u8A9E\u8A00"},to_lang:{zh:"\u76EE\u6807\u8BED\u8A00",en:"Target Language",zh_TW:"\u76EE\u6A19\u8A9E\u8A00"},to_lang2:{zh:"\u7B2C\u4E8C\u76EE\u6807\u8BED\u8A00",en:"Target Language 2",zh_TW:"\u7B2C\u4E8C\u76EE\u6A19\u8A9E\u8A00"},to_lang2_helper:{zh:"\u8BBE\u5B9A\u540E\uFF0C\u4E0E\u76EE\u6807\u8BED\u8A00\u4EA7\u751F\u4E92\u8BD1\u6548\u679C\uFF0C\u4F46\u4F9D\u8D56\u8FDC\u7A0B\u8BED\u8A00\u8BC6\u522B\u3002",en:"After setting, it will produce mutual translation effect with the target language, but it relies on remote language recognition.",zh_TW:"\u8A2D\u5B9A\u5F8C\u6703\u8207\u76EE\u6A19\u8A9E\u8A00\u4E92\u8B6F\uFF0C\u4F46\u4F9D\u8CF4\u9060\u7AEF\u8A9E\u8A00\u8B58\u5225\u3002"},text_style:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},text_style_alt:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},bg_color:{zh:"\u6837\u5F0F\u989C\u8272",en:"Style Color",zh_TW:"\u6A23\u5F0F\u984F\u8272"},remain_unchanged:{zh:"\u4FDD\u7559\u4E0D\u53D8",en:"Remain Unchanged",zh_TW:"\u4FDD\u7559\u4E0D\u8B8A"},google_api:{zh:"\u8C37\u6B4C\u7FFB\u8BD1\u63A5\u53E3",en:"Google Translate API",zh_TW:"Google \u7FFB\u8B6F\u4ECB\u9762"},default_selector:{zh:"\u9ED8\u8BA4\u9009\u62E9\u5668",en:"Default selector",zh_TW:"\u9810\u8A2D\u9078\u64C7\u5668"},selector_rules:{zh:"\u9009\u62E9\u5668\u89C4\u5219",en:"Selector Rules",zh_TW:"\u9078\u64C7\u5668\u898F\u5247"},save:{zh:"\u4FDD\u5B58",en:"Save",zh_TW:"\u5132\u5B58"},edit:{zh:"\u7F16\u8F91",en:"Edit",zh_TW:"\u7DE8\u8F2F"},cancel:{zh:"\u53D6\u6D88",en:"Cancel",zh_TW:"\u53D6\u6D88"},delete:{zh:"\u5220\u9664",en:"Delete",zh_TW:"\u522A\u9664"},reset:{zh:"\u91CD\u7F6E",en:"Reset",zh_TW:"\u91CD\u8A2D"},add:{zh:"\u6DFB\u52A0",en:"Add",zh_TW:"\u65B0\u589E"},inject_rules:{zh:"\u6CE8\u5165\u8BA2\u9605\u89C4\u5219",en:"Inject Subscribe Rules",zh_TW:"\u6CE8\u5165\u8A02\u95B1\u898F\u5247"},personal_rules:{zh:"\u4E2A\u4EBA\u89C4\u5219",en:"Rules",zh_TW:"\u500B\u4EBA\u898F\u5247"},subscribe_rules:{zh:"\u8BA2\u9605\u89C4\u5219",en:"Subscribe",zh_TW:"\u8A02\u95B1\u898F\u5247"},overwrite_subscribe_rules:{zh:"\u8986\u5199\u8BA2\u9605\u89C4\u5219",en:"Overwrite",zh_TW:"\u8986\u5BEB\u8A02\u95B1\u898F\u5247"},subscribe_url:{zh:"\u8BA2\u9605\u5730\u5740",en:"Subscribe URL",zh_TW:"\u8A02\u95B1\u7DB2\u5740"},rules_warn_1:{zh:"1\u3001\u89C4\u5219\u751F\u6548\u7684\u4F18\u5148\u7EA7\u4F9D\u6B21\u4E3A\uFF1A\u4E2A\u4EBA\u89C4\u5219 > \u8BA2\u9605\u89C4\u5219 > \u5168\u5C40\u89C4\u5219\u3002\"\u5168\u5C40\u89C4\u5219\"\u76F8\u5F53\u4E8E\u515C\u5E95\u89C4\u5219\u3002",en:"1. The priority of rules is: personal rules > subscription rules > global rules. \"Global rules\" are like a fallback rule.",zh_TW:"1.\u898F\u5247\u751F\u6548\u7684\u512A\u5148\u9806\u5E8F\u4F9D\u5E8F\u70BA\uFF1A\u500B\u4EBA\u898F\u5247 > \u8A02\u95B1\u898F\u5247 > \u5168\u57DF\u898F\u5247\u3002 \"\u5168\u57DF\u898F\u5247\"\u76F8\u7576\u65BC\u515C\u5E95\u898F\u5247\u3002"},rules_warn_2:{zh:"2\u3001\u201C\u8BA2\u9605\u89C4\u5219\u201D\u9009\u62E9\u6CE8\u5165\u540E\u624D\u4F1A\u751F\u6548\u3002",en:"2. \"Subscription rules\" will take effect only after injection is selected.",zh_TW:"2\u3001\u300C\u8A02\u95B1\u898F\u5247\u300D\u9078\u64C7\u6CE8\u5165\u5F8C\u624D\u6703\u751F\u6548\u3002"},rules_warn_3:{zh:"3\u3001\u5173\u4E8E\u89C4\u5219\u586B\u5199\uFF1A\u8F93\u5165\u6846\u7559\u7A7A\u6216\u4E0B\u62C9\u6846\u9009\u201C*\u201D\u8868\u793A\u91C7\u7528\u5168\u5C40\u89C4\u5219\u3002",en:"3. Regarding filling in the rules: Leave the input box blank or select \"*\" in the drop-down box to use global rule.",zh_TW:"3. \u898F\u5247\u586B\u5BEB\u8AAA\u660E\uFF1A\u8F38\u5165\u6846\u7559\u7A7A\u6216\u4E0B\u62C9\u9078\u64C7\u300C*\u300D\u8868\u793A\u4F7F\u7528\u5168\u57DF\u898F\u5247\u3002"},sync_warn:{zh:"\u6D89\u53CA\u9690\u79C1\u6570\u636E\u7684\u540C\u6B65\u8BF7\u8C28\u614E\u9009\u62E9\u7B2C\u4E09\u65B9\u540C\u6B65\u670D\u52A1\uFF0C\u5EFA\u8BAE\u81EA\u884C\u642D\u5EFA kiss-worker \u6216 WebDAV \u670D\u52A1\u3002",en:"When synchronizing data that involves privacy, please be cautious about choosing third-party sync services. It is recommended to set up your own sync service using kiss-worker or WebDAV.",zh_TW:"\u540C\u6B65\u6D89\u53CA\u96B1\u79C1\u8CC7\u6599\u6642\uFF0C\u8ACB\u8B39\u614E\u9078\u64C7\u7B2C\u4E09\u65B9\u540C\u6B65\u670D\u52D9\uFF1B\u5EFA\u8B70\u81EA\u5EFA kiss-worker \u6216 WebDAV \u670D\u52D9\u3002"},sync_warn_2:{zh:"\u5982\u679C\u670D\u52A1\u5668\u5B58\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u540C\u6B65\u7684\u6570\u636E\uFF0C\u7B2C\u4E00\u6B21\u540C\u6B65\u5C06\u76F4\u63A5\u8986\u76D6\u672C\u5730\u914D\u7F6E\uFF0C\u540E\u9762\u5219\u6839\u636E\u4FEE\u6539\u65F6\u95F4\uFF0C\u65B0\u7684\u8986\u76D6\u65E7\u7684\u3002",en:"If the server has data synchronized by other clients, the first synchronization will directly overwrite the local configuration, and later, according to the modification time, the new one will overwrite the old one.",zh_TW:"\u82E5\u4F3A\u670D\u5668\u4E0A\u5B58\u5728\u5176\u4ED6\u7528\u6236\u7AEF\u540C\u6B65\u7684\u8CC7\u6599\uFF0C\u7B2C\u4E00\u6B21\u540C\u6B65\u6703\u76F4\u63A5\u8986\u84CB\u672C\u6A5F\u8A2D\u5B9A\uFF1B\u4E4B\u5F8C\u5247\u4F9D\u4FEE\u6539\u6642\u9593\uFF0C\u7531\u65B0\u7684\u8986\u84CB\u820A\u7684\u3002"},about_sync_api:{zh:"\u81EA\u5EFAkiss-wroker\u6570\u636E\u540C\u6B65\u670D\u52A1",en:"Self-hosting a Kiss-worker data sync service",zh_TW:"\u81EA\u5EFA kiss-wroker \u8CC7\u6599\u540C\u6B65\u670D\u52D9"},about_api:{zh:"1\u3001\u5176\u4E2D BuiltinAI \u4E3A\u6D4F\u89C8\u5668\u5185\u7F6EAI\u7FFB\u8BD1\uFF0C\u76EE\u524D\u4EC5 Chrome 138 \u53CA\u4EE5\u4E0A\u7248\u672C\u5F97\u5230\u652F\u6301\u3002",en:"1. BuiltinAI is the browser's built-in AI translation, which is currently only supported by Chrome 138 and above.",zh_TW:"1.\u5176\u4E2D BuiltinAI \u70BA\u700F\u89BD\u5668\u5167\u5EFAAI\u7FFB\u8B6F\uFF0C\u76EE\u524D\u50C5 Chrome 138 \u4EE5\u4E0A\u7248\u672C\u652F\u63F4\u3002"},about_api_2:{zh:"2\u3001\u5927\u90E8\u5206AI\u63A5\u53E3\u90FD\u4E0EOpenAI\u517C\u5BB9\uFF0C\u56E0\u6B64\u9009\u62E9\u6DFB\u52A0OpenAI\u7C7B\u578B\u5373\u53EF\u3002",en:"2. Most AI interfaces are compatible with OpenAI, so just choose to add the OpenAI type.",zh_TW:"2.\u5927\u90E8\u5206AI\u4ECB\u9762\u90FD\u8207OpenAI\u76F8\u5BB9\uFF0C\u56E0\u6B64\u9078\u64C7\u65B0\u589EOpenAI\u985E\u578B\u5373\u53EF\u3002"},about_api_3:{zh:"3\u3001\u6682\u672A\u5217\u51FA\u7684\u63A5\u53E3\uFF0C\u7406\u8BBA\u4E0A\u90FD\u53EF\u4EE5\u901A\u8FC7\u81EA\u5B9A\u4E49\u63A5\u53E3 (Custom) \u7684\u5F62\u5F0F\u652F\u6301\u3002",en:"3. Interfaces that have not yet been launched can theoretically be supported through custom interfaces.",zh_TW:"3\u3001\u66AB\u672A\u5217\u51FA\u7684\u4ECB\u9762\uFF0C\u7406\u8AD6\u4E0A\u90FD\u53EF\u900F\u904E\u81EA\u8A02\u4ECB\u9762  (Custom)  \u7684\u5F62\u5F0F\u652F\u63F4\u3002"},about_api_proxy:{zh:"\u67E5\u770B\u81EA\u5EFA\u4E00\u4E2A\u7FFB\u8BD1\u63A5\u53E3\u4EE3\u7406",en:"Check out the self-built translation interface proxy",zh_TW:"\u67E5\u770B\u5982\u4F55\u81EA\u5EFA\u7FFB\u8B6F\u4ECB\u9762 Proxy"},setting_helper:{zh:"\u65B0\u65E7\u914D\u7F6E\u5E76\u4E0D\u517C\u5BB9\uFF0C\u5BFC\u51FA\u7684\u65E7\u7248\u914D\u7F6E\uFF0C\u52FF\u518D\u6B21\u5BFC\u5165\u3002",en:"The old and new configurations are not compatible. Do not import the exported old configuration again.",zh_TW:"\u65B0\u820A\u914D\u7F6E\u4E26\u4E0D\u76F8\u5BB9\uFF0C\u532F\u51FA\u7684\u820A\u7248\u914D\u7F6E\uFF0C\u52FF\u518D\u6B21\u532F\u5165\u3002"},style_none:{zh:"\u65E0",en:"None",zh_TW:"\u7121"},under_line:{zh:"\u4E0B\u5212\u76F4\u7EBF",en:"Underline",zh_TW:"\u4E0B\u5283\u76F4\u7DDA"},dot_line:{zh:"\u4E0B\u5212\u70B9\u72B6\u7EBF",en:"Dotted Underline",zh_TW:"\u4E0B\u5283\u9EDE\u72C0\u7DDA"},dash_line:{zh:"\u4E0B\u5212\u865A\u7EBF",en:"Dashed Underline",zh_TW:"\u4E0B\u5283\u865B\u7DDA"},dash_box:{zh:"\u865A\u7EBF\u6846",en:"Dashed Box"},wavy_line:{zh:"\u4E0B\u5212\u6CE2\u6D6A\u7EBF",en:"Wavy Underline",zh_TW:"\u4E0B\u5283\u6CE2\u6D6A\u7DDA"},fuzzy:{zh:"\u6A21\u7CCA",en:"Fuzzy",zh_TW:"\u6A21\u7CCA"},highlight:{zh:"\u9AD8\u4EAE",en:"Highlight",zh_TW:"\u53CD\u767D\u6A19\u793A"},blockquote:{zh:"\u5F15\u7528",en:"Blockquote",zh_TW:"\u5F15\u7528"},gradient:{zh:"\u6E10\u53D8",en:"Gradient",zh_TW:"\u6F38\u8B8A"},blink:{zh:"\u95EA\u73B0",en:"Blink",zh_TW:"\u9583\u73FE"},glow:{zh:"\u53D1\u5149",en:"Glow",zh_TW:"\u767C\u5149"},diy_style:{zh:"\u81EA\u5B9A\u4E49\u6837\u5F0F",en:"Custom Style",zh_TW:"\u81EA\u8A02\u6A23\u5F0F"},diy_style_helper:{zh:"\u9075\u5FAA\u201CCSS\u201D\u7684\u8BED\u6CD5",en:"Follow the syntax of \"CSS\"",zh_TW:"\u9075\u5FAA CSS \u8A9E\u6CD5"},setting:{zh:"\u8BBE\u7F6E",en:"Setting",zh_TW:"\u8A2D\u5B9A"},pattern:{zh:"\u5339\u914D\u7F51\u5740",en:"URL pattern",zh_TW:"\u5339\u914D\u7DB2\u5740"},pattern_helper:{zh:"1\u3001\u652F\u6301\u661F\u53F7(*)\u901A\u914D\u7B26\u30022\u3001\u591A\u4E2AURL\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\u3002",en:"1. Supports the asterisk (*) wildcard character. 2. Separate multiple URLs with newlines or English commas \",\".",zh_TW:"1. \u652F\u63F4\u661F\u865F (*) \u842C\u7528\u5B57\u5143\u30022. \u591A\u500B URL \u8ACB\u4EE5\u63DB\u884C\u6216\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u3002"},selector_helper:{zh:"1\u3001\u9700\u8981\u7FFB\u8BD1\u7684\u76EE\u6807\u5143\u7D20\u30022\u3001\u5F00\u542F\u81EA\u52A8\u626B\u63CF\u9875\u9762\u540E\uFF0C\u672C\u8BBE\u7F6E\u65E0\u6548\u30023\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. The target element to be translated. 2. This setting is invalid when automatic page scanning is enabled. 3. Follow the CSS selector syntax.",zh_TW:"1\u3001\u9700\u8981\u7FFB\u8B6F\u7684\u76EE\u6A19\u5143\u7D20\u3002 2.\u958B\u555F\u81EA\u52D5\u6383\u63CF\u9801\u9762\u5F8C\uFF0C\u672C\u8A2D\u5B9A\u7121\u6548\u3002 3.\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},translate_switch:{zh:"\u5F00\u542F\u7FFB\u8BD1",en:"Translate Switch",zh_TW:"\u958B\u555F\u7FFB\u8B6F"},default_enabled:{zh:"\u9ED8\u8BA4\u5F00\u542F",en:"Enabled",zh_TW:"\u9810\u8A2D\u958B\u555F"},default_disabled:{zh:"\u9ED8\u8BA4\u5173\u95ED",en:"Disabled",zh_TW:"\u9810\u8A2D\u95DC\u9589"},selector:{zh:"\u9009\u62E9\u5668",en:"Selector",zh_TW:"\u9078\u64C7\u5668"},target_selector:{zh:"\u76EE\u6807\u5143\u7D20\u9009\u62E9\u5668",en:"Target element selector",zh_TW:"\u76EE\u6A19\u5143\u7D20\u9078\u64C7\u5668"},keep_selector:{zh:"\u4FDD\u7559\u5143\u7D20\u9009\u62E9\u5668",en:"Keep unchanged selector",zh_TW:"\u4FDD\u7559\u5143\u7D20\u9078\u64C7\u5668"},keep_selector_helper:{zh:"1\u3001\u76EE\u6807\u5143\u7D20\u4E0B\u9762\u9700\u8981\u539F\u6837\u4FDD\u7559\u7684\u5B50\u8282\u70B9\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. The child nodes under the target element need to remain intact. 2. Follow the CSS selector syntax.",zh_TW:"1. \u76EE\u6A19\u5143\u7D20\u4E0B\u7684\u5B50\u7BC0\u9EDE\u9700\u8981\u4FDD\u6301\u539F\u6A23\u3002 2. \u9075\u5FAA CSS \u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},root_selector:{zh:"\u6839\u8282\u70B9\u9009\u62E9\u5668",en:"Root node selector",zh_TW:"\u6839\u7BC0\u9EDE\u9078\u64C7\u5668"},root_selector_helper:{zh:"1\u3001\u7528\u4E8E\u7F29\u5C0F\u9875\u9762\u7FFB\u8BD1\u8303\u56F4\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. Used to narrow the translation scope of the page. 2. Follow the CSS selector syntax.",zh_TW:"1.\u7528\u65BC\u7E2E\u5C0F\u9801\u9762\u7FFB\u8B6F\u7BC4\u570D\u3002 2\u3001\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},ignore_selector:{zh:"\u4E0D\u7FFB\u8BD1\u8282\u70B9\u9009\u62E9\u5668",en:"Ignore node selectors",zh_TW:"\u4E0D\u7FFB\u8B6F\u7BC0\u9EDE\u9078\u64C7\u5668"},ignore_selector_helper:{zh:"1\u3001\u9700\u8981\u5FFD\u7565\u7684\u8282\u70B9\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. Nodes to be ignored. 2. Follow CSS selector syntax.",zh_TW:"1\u3001\u9700\u8981\u5FFD\u7565\u7684\u7BC0\u9EDE\u3002 2\u3001\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},terms:{zh:"\u4E13\u4E1A\u672F\u8BED",en:"Terms",zh_TW:"\u5C08\u696D\u8853\u8A9E"},terms_helper:{zh:"1\u3001\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\uFF0C\u65E0\u9700\u659C\u6746\uFF0C\u4E0D\u652F\u6301\u4FEE\u9970\u7B26\u30022\u3001\u591A\u6761\u672F\u8BED\u7528\u6362\u884C\u6216\u5206\u53F7\u201C;\u201D\u9694\u5F00\u30023\u3001\u672F\u8BED\u548C\u8BD1\u6587\u7528\u82F1\u6587\u9017\u53F7\u201C,\u201D\u9694\u5F00\u30024\u3001\u6CA1\u6709\u8BD1\u6587\u89C6\u4E3A\u4E0D\u7FFB\u8BD1\u672F\u8BED\u3002",en:"1. Supports regular expression matching, no slash required, and no modifiers are supported. 2. Separate multiple terms with newlines or semicolons \";\". 3. Terms and translations are separated by English commas \",\". 4. If there is no translation, the term will be deemed not to be translated.",zh_TW:"1. \u652F\u63F4\u6B63\u5247\u8868\u9054\u5F0F\u6BD4\u5C0D\uFF0C\u7121\u9700\u659C\u7DDA\uFF0C\u4E14\u4E0D\u652F\u63F4\u4FEE\u98FE\u7B26\u30022. \u591A\u689D\u8853\u8A9E\u4EE5\u63DB\u884C\u6216\u5206\u865F\u300C;\u300D\u5206\u9694\u30023. \u8853\u8A9E\u8207\u8B6F\u6587\u4EE5\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u30024. \u7121\u8B6F\u6587\u8005\u8996\u70BA\u4E0D\u7FFB\u8B6F\u8A72\u8853\u8A9E\u3002"},ai_terms:{zh:"AI\u4E13\u4E1A\u672F\u8BED",en:"AI Terms",zh_TW:"AI\u5C08\u696D\u8853\u8A9E"},ai_terms_helper:{zh:"1\u3001AI\u667A\u80FD\u66FF\u6362\uFF0C\u4E0D\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\u30022\u3001\u591A\u6761\u672F\u8BED\u7528\u6362\u884C\u6216\u5206\u53F7\u201C;\u201D\u9694\u5F00\u30023\u3001\u672F\u8BED\u548C\u8BD1\u6587\u7528\u82F1\u6587\u9017\u53F7\u201C,\u201D\u9694\u5F00\u30024\u3001\u6CA1\u6709\u8BD1\u6587\u89C6\u4E3A\u4E0D\u7FFB\u8BD1\u672F\u8BED\u3002",en:"1. AI intelligent replacement does not support regular expressions.2. Separate multiple terms with newlines or semicolons \";\". 3. Terms and translations are separated by English commas \",\". 4. If there is no translation, the term will be deemed not to be translated.",zh_TW:"1.AI\u667A\u80FD\u66FF\u63DB\uFF0C\u4E0D\u652F\u63F4\u6B63\u898F\u8868\u793A\u5F0F\u30022. \u591A\u689D\u8853\u8A9E\u4EE5\u63DB\u884C\u6216\u5206\u865F\u300C;\u300D\u5206\u9694\u30023. \u8853\u8A9E\u8207\u8B6F\u6587\u4EE5\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u30024. \u7121\u8B6F\u6587\u8005\u8996\u70BA\u4E0D\u7FFB\u8B6F\u8A72\u8853\u8A9E\u3002"},selector_style:{zh:"\u9009\u62E9\u5668\u8282\u70B9\u6837\u5F0F",en:"Selector Style",zh_TW:"\u9078\u64C7\u5668\u7BC0\u9EDE\u6A23\u5F0F"},terms_style:{zh:"\u4E13\u4E1A\u672F\u8BED\u6837\u5F0F",en:"Terms Style",zh_TW:"\u5C08\u696D\u8853\u8A9E\u6A23\u5F0F"},highlight_style:{zh:"\u8BCD\u6C47\u9AD8\u4EAE\u6837\u5F0F",en:"Fav Words highlight style",zh_TW:"\u8A5E\u5F59\u9AD8\u4EAE\u6A23\u5F0F"},selector_style_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\u3002",en:"It is injected when translation is turned on.",zh_TW:"\u5728\u958B\u555F\u7FFB\u8B6F\u6642\u6CE8\u5165\u3002"},selector_parent_style:{zh:"\u9009\u62E9\u5668\u7236\u8282\u70B9\u6837\u5F0F",en:"Parent Selector Style",zh_TW:"\u9078\u64C7\u5668\u7236\u7BC0\u9EDE\u6A23\u5F0F"},selector_grand_style:{zh:"\u9009\u62E9\u5668\u7956\u8282\u70B9\u6837\u5F0F",en:"Grand Selector Style",zh_TW:"\u9078\u64C7\u5668\u7956\u7BC0\u9EDE\u6A23\u5F0F"},inject_js:{zh:"\u6CE8\u5165JS",en:"Inject JS",zh_TW:"\u6CE8\u5165 JS"},inject_js_helper:{zh:"\u9884\u52A0\u8F7D\u65F6\u6CE8\u5165\uFF0C\u4E00\u4E2A\u9875\u9762\u4EC5\u8FD0\u884C\u4E00\u6B21\u3002\u5185\u7F6E\u5168\u5C40\u5BF9\u8C61 KT: {\n      apiTranslate,\n      apiDectect,\n      apiSetting,\n      apisMap,\n      toLang,\n      docInfo,\n      glossary,\n    }",en:"Injected during preload, runs only once per page. Built-in global object KT: {\n      apiTranslate,\n      apiDectect,\n      apiSetting,\n      apisMap,\n      toLang,\n      docInfo,\n      glossary,\n    }",zh_TW:"\u9810\u5148\u8F09\u5165\u6642\u6CE8\u5165\uFF0C\u4E00\u500B\u9801\u9762\u50C5\u904B\u884C\u4E00\u6B21\u3002\u5167\u5EFA\u5168\u57DF\u7269\u4EF6 KT: {\n      apiTranslate,\n      apiDectect,\n      apiSetting,\n      apisMap,\n      toLang,\n      docInfo,\n      glossary,\n    }"},inject_css:{zh:"\u6CE8\u5165CSS",en:"Inject CSS",zh_TW:"\u6CE8\u5165 CSS"},inject_css_helper:{zh:"\u521D\u59CB\u5316\u65F6\u6CE8\u5165\u8FD0\u884C\uFF0C\u4E00\u4E2A\u9875\u9762\u4EC5\u8FD0\u884C\u4E00\u6B21\u3002",en:"Injected and run at initialization, and only run once per page.",zh_TW:"\u521D\u59CB\u5316\u6642\u6CE8\u5165\u904B\u884C\uFF0C\u4E00\u500B\u9801\u9762\u50C5\u904B\u884C\u4E00\u6B21\u3002"},fixer_function:{zh:"\u4FEE\u590D\u51FD\u6570",en:"Fixer Function",zh_TW:"\u4FEE\u5FA9\u51FD\u5F0F"},fixer_function_helper:{zh:"1\u3001br\u662F\u5C06
\u6362\u884C\u66FF\u6362\u6210

\u30022\u3001bn\u662F\u5C06\\n\u6362\u884C\u66FF\u6362\u6210

\u30023\u3001brToDiv\u548CbnToDiv\u662F\u66FF\u6362\u6210

\u3002",en:"1. br replaces
line breaks with

. 2. bn replaces \\n newline with

. 3. brToDiv and bnToDiv are replaced with

.",zh_TW:"1. br \u6703\u5C07
\u63DB\u884C\u66FF\u63DB\u70BA

\u30022. bn \u6703\u5C07 \\n \u63DB\u884C\u66FF\u63DB\u70BA

\u30023. brToDiv \u8207 bnToDiv \u6703\u66FF\u63DB\u70BA

\u3002"},import:{zh:"\u5BFC\u5165",en:"Import",zh_TW:"\u532F\u5165"},export:{zh:"\u5BFC\u51FA",en:"Export",zh_TW:"\u532F\u51FA"},export_translation:{zh:"\u5BFC\u51FA\u91CA\u4E49",en:"Export Translation",zh_TW:"\u532F\u51FA\u91CB\u7FA9"},error_cant_be_blank:{zh:"\u4E0D\u80FD\u4E3A\u7A7A",en:"Can not be blank",zh_TW:"\u4E0D\u53EF\u70BA\u7A7A"},error_duplicate_values:{zh:"\u5B58\u5728\u91CD\u590D\u7684\u503C",en:"There are duplicate values",zh_TW:"\u5B58\u5728\u91CD\u8907\u7684\u503C"},error_wrong_file_type:{zh:"\u9519\u8BEF\u7684\u6587\u4EF6\u7C7B\u578B",en:"Wrong file type",zh_TW:"\u6A94\u6848\u985E\u578B\u932F\u8AA4"},error_fetch_url:{zh:"\u8BF7\u68C0\u67E5url\u5730\u5740\u662F\u5426\u6B63\u786E\u6216\u7A0D\u540E\u518D\u8BD5\u3002",en:"Please check if the url address is correct or try again later.",zh_TW:"\u8ACB\u6AA2\u67E5 URL \u662F\u5426\u6B63\u78BA\u6216\u7A0D\u5F8C\u518D\u8A66\u3002"},deepl_api:{zh:"DeepL \u63A5\u53E3",en:"DeepL API",zh_TW:"DeepL \u4ECB\u9762"},deepl_key:{zh:"DeepL \u5BC6\u94A5",en:"DeepL Key",zh_TW:"DeepL \u91D1\u9470"},openai_api:{zh:"OpenAI \u63A5\u53E3",en:"OpenAI API",zh_TW:"OpenAI \u4ECB\u9762"},openai_key:{zh:"OpenAI \u5BC6\u94A5",en:"OpenAI Key",zh_TW:"OpenAI \u91D1\u9470"},openai_model:{zh:"OpenAI \u6A21\u578B",en:"OpenAI Model",zh_TW:"OpenAI \u6A21\u578B"},openai_prompt:{zh:"OpenAI \u63D0\u793A\u8BCD",en:"OpenAI Prompt",zh_TW:"OpenAI \u63D0\u793A\u8A5E"},if_clear_cache:{zh:"\u662F\u5426\u6E05\u9664\u7F13\u5B58\uFF08\u9ED8\u8BA4\u7F13\u5B587\u5929\uFF09",en:"Whether clear cache (Default cache is 7 days)",zh_TW:"\u662F\u5426\u6E05\u9664\u5FEB\u53D6\uFF08\u9810\u8A2D\u5FEB\u53D67\u5929\uFF09"},clear_cache_never:{zh:"\u4E0D\u6E05\u9664\u7F13\u5B58",en:"Never clear cache",zh_TW:"\u4E0D\u6E05\u9664\u5FEB\u53D6"},clear_cache_restart:{zh:"\u91CD\u542F\u6D4F\u89C8\u5668\u65F6\u6E05\u9664\u7F13\u5B58",en:"Clear cache when restarting browser",zh_TW:"\u91CD\u65B0\u555F\u52D5\u700F\u89BD\u5668\u6642\u6E05\u9664\u5FEB\u53D6"},data_sync_type:{zh:"\u6570\u636E\u540C\u6B65\u65B9\u5F0F",en:"Data Sync Type",zh_TW:"\u8CC7\u6599\u540C\u6B65\u65B9\u5F0F"},data_sync_url:{zh:"\u6570\u636E\u540C\u6B65\u63A5\u53E3",en:"Data Sync API",zh_TW:"\u8CC7\u6599\u540C\u6B65\u4ECB\u9762"},data_sync_user:{zh:"\u6570\u636E\u540C\u6B65\u8D26\u6237",en:"Data Sync User",zh_TW:"\u8CC7\u6599\u540C\u6B65\u5E33\u865F"},data_sync_key:{zh:"\u6570\u636E\u540C\u6B65\u5BC6\u94A5",en:"Data Sync Key",zh_TW:"\u8CC7\u6599\u540C\u6B65\u91D1\u9470"},sync_now:{zh:"\u7ACB\u5373\u540C\u6B65",en:"Sync Now",zh_TW:"\u7ACB\u5373\u540C\u6B65"},sync_success:{zh:"\u540C\u6B65\u6210\u529F\uFF01",en:"Sync Success",zh_TW:"\u540C\u6B65\u6210\u529F\uFF01"},sync_failed:{zh:"\u540C\u6B65\u5931\u8D25\uFF01",en:"Sync Error",zh_TW:"\u540C\u6B65\u5931\u6557\uFF01"},error_got_some_wrong:{zh:"\u62B1\u6B49\uFF0C\u51FA\u9519\u4E86\uFF01",en:"Sorry, something went wrong!",zh_TW:"\u62B1\u6B49\uFF0C\u767C\u751F\u932F\u8AA4\uFF01"},error_sync_setting:{zh:"\u60A8\u7684\u540C\u6B65\u7C7B\u578B\u5FC5\u987B\u4E3A\u201CKISS-Worker\u201D\uFF0C\u4E14\u9700\u586B\u5199\u5B8C\u6574",en:"Your sync type must be \"KISS-Worker\" and must be filled in completely",zh_TW:"\u60A8\u7684\u540C\u6B65\u578B\u614B\u5FC5\u9808\u70BA\u300CKISS-Worker\u300D\uFF0C\u4E14\u9700\u586B\u5BEB\u5B8C\u6574\u3002"},click_test:{zh:"\u70B9\u51FB\u6D4B\u8BD5",en:"Click Test",zh_TW:"\u9EDE\u64CA\u6E2C\u8A66"},test_success:{zh:"\u6D4B\u8BD5\u6210\u529F",en:"Test success",zh_TW:"\u6E2C\u8A66\u6210\u529F"},test_failed:{zh:"\u6D4B\u8BD5\u5931\u8D25",en:"Test failed",zh_TW:"\u6E2C\u8A66\u5931\u6557"},clear_all_cache_now:{zh:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u7F13\u5B58",en:"Clear all cache now",zh_TW:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u5FEB\u53D6"},clear_cache:{zh:"\u6E05\u9664\u7F13\u5B58",en:"Clear Cache",zh_TW:"\u6E05\u9664\u5FEB\u53D6"},clear_success:{zh:"\u6E05\u9664\u6210\u529F",en:"Clear success",zh_TW:"\u6E05\u9664\u6210\u529F"},clear_failed:{zh:"\u6E05\u9664\u5931\u8D25",en:"Clear failed",zh_TW:"\u6E05\u9664\u5931\u6557"},share:{zh:"\u5206\u4EAB",en:"Share",zh_TW:"\u5206\u4EAB"},clear_all:{zh:"\u6E05\u7A7A",en:"Clear All",zh_TW:"\u6E05\u7A7A"},help:{zh:"\u6C42\u52A9",en:"Help",zh_TW:"\u6C42\u52A9"},restore_default:{zh:"\u6062\u590D\u9ED8\u8BA4",en:"Restore Default",zh_TW:"\u6062\u5FA9\u9810\u8A2D"},shortcuts_setting:{zh:"\u5FEB\u6377\u952E\u8BBE\u7F6E",en:"Shortcuts Setting",zh_TW:"\u5FEB\u6377\u9375\u8A2D\u5B9A"},toggle_translate_shortcut:{zh:"\"\u5F00\u542F\u7FFB\u8BD1\"\u5FEB\u6377\u952E",en:"\"Toggle Translate\" Shortcut",zh_TW:"\u300C\u958B\u555F\u7FFB\u8B6F\u300D\u5FEB\u6377\u9375"},toggle_style_shortcut:{zh:"\"\u5207\u6362\u6837\u5F0F\"\u5FEB\u6377\u952E",en:"\"Toggle Style\" Shortcut",zh_TW:"\u300C\u5207\u63DB\u6A23\u5F0F\u300D\u5FEB\u6377\u9375"},toggle_popup_shortcut:{zh:"\"\u6253\u5F00\u5F39\u7A97\"\u5FEB\u6377\u952E",en:"\"Open Popup\" Shortcut",zh_TW:"\u300C\u958B\u555F\u5F48\u7A97\u300D\u5FEB\u6377\u9375"},open_setting_shortcut:{zh:"\"\u6253\u5F00\u8BBE\u7F6E\"\u5FEB\u6377\u952E",en:"\"Open Setting\" Shortcut",zh_TW:"\u300C\u958B\u555F\u8A2D\u5B9A\u300D\u5FEB\u6377\u9375"},hide_fab_button:{zh:"\u9690\u85CF\u60AC\u6D6E\u6309\u94AE",en:"Hide Fab Button",zh_TW:"\u96B1\u85CF\u61F8\u6D6E\u6309\u9215"},fab_click_action:{zh:"\u5355\u51FB\u60AC\u6D6E\u6309\u94AE\u52A8\u4F5C",en:"Single Click Fab Action",zh_TW:"\u55AE\u64CA\u61F8\u6D6E\u6309\u94AE\u52D5\u4F5C"},fab_click_menu:{zh:"\u5F39\u51FA\u83DC\u5355",en:"Popup Menu",zh_TW:"\u5F48\u51FA\u9078\u55AE"},fab_click_translate:{zh:"\u76F4\u63A5\u7FFB\u8BD1",en:"Translate",zh_TW:"\u76F4\u63A5\u7FFB\u8B6F"},hide_tran_button:{zh:"\u9690\u85CF\u7FFB\u8BD1\u6309\u94AE",en:"Hide Translate Button",zh_TW:"\u96B1\u85CF\u7FFB\u8B6F\u6309\u9215"},hide_click_away:{zh:"\u70B9\u51FB\u5916\u90E8\u5173\u95ED\u5F39\u7A97",en:"Click outside to close the pop-up window",zh_TW:"\u9EDE\u64CA\u5916\u90E8\u95DC\u9589\u5F48\u7A97"},use_simple_style:{zh:"\u4F7F\u7528\u7B80\u6D01\u754C\u9762",en:"Use a simple interface",zh_TW:"\u4F7F\u7528\u7C21\u6F54\u4ECB\u9762"},show:{zh:"\u663E\u793A",en:"Show",zh_TW:"\u986F\u793A"},hide:{zh:"\u9690\u85CF",en:"Hide",zh_TW:"\u96B1\u85CF"},save_rule:{zh:"\u4FDD\u5B58\u89C4\u5219",en:"Save Rule",zh_TW:"\u5132\u5B58\u898F\u5247"},global_rule:{zh:"\u5168\u5C40\u89C4\u5219",en:"Global Rule",zh_TW:"\u5168\u57DF\u898F\u5247"},input_translate:{zh:"\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation",zh_TW:"\u8F38\u5165\u6846\u7FFB\u8B6F"},use_input_box_translation:{zh:"\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation",zh_TW:"\u555F\u7528\u8F38\u5165\u6846\u7FFB\u8B6F"},input_selector:{zh:"\u8F93\u5165\u6846\u9009\u62E9\u5668",en:"Input Selector",zh_TW:"\u8F38\u5165\u6846\u9078\u64C7\u5668"},input_selector_helper:{zh:"\u7528\u4E8E\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",en:"Used for input box translation.",zh_TW:"\u7528\u65BC\u8F38\u5165\u6846\u7FFB\u8B6F\u3002"},trigger_trans_shortcut:{zh:"\u89E6\u53D1\u7FFB\u8BD1\u5FEB\u6377\u952E",en:"Trigger Translation Shortcut Keys",zh_TW:"\u89F8\u767C\u7FFB\u8B6F\u5FEB\u6377\u9375"},trigger_trans_shortcut_help:{zh:"\u9ED8\u8BA4\u4E3A\u5355\u51FB\u201CAltLeft+KeyI\u201D",en:"Default is \"AltLeft+KeyI\"",zh_TW:"\u9810\u8A2D\u70BA\u6309\u4E0B\u300CAltLeft+KeyI\u300D"},shortcut_press_count:{zh:"\u5FEB\u6377\u952E\u8FDE\u51FB\u6B21\u6570",en:"Shortcut Press Number",zh_TW:"\u5FEB\u6377\u9375\u9023\u64CA\u6B21\u6578"},combo_timeout:{zh:"\u8FDE\u51FB\u8D85\u65F6\u65F6\u95F4 (10-1000ms)",en:"Combo Timeout (10-1000ms)",zh_TW:"\u9023\u64CA\u903E\u6642 (10-1000ms)"},input_trans_start_sign:{zh:"\u7FFB\u8BD1\u8D77\u59CB\u6807\u8BC6",en:"Translation Start Sign",zh_TW:"\u7FFB\u8B6F\u8D77\u59CB\u6A19\u8A18"},input_trans_start_sign_help:{zh:"\u6807\u8BC6\u540E\u9762\u53EF\u4EE5\u52A0\u76EE\u6807\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1A \u201C/en \u4F60\u597D\u201D\u3001\u201C/zh hello\u201D",en:"The target language code can be added after the sign, such as: \"/en \u4F60\u597D\", \"/zh hello\"",zh_TW:"\u6A19\u8A18\u5F8C\u53EF\u52A0\u4E0A\u76EE\u6A19\u8A9E\u8A00\u4EE3\u78BC\uFF0C\u4F8B\u5982\uFF1A\u300C/en \u4F60\u597D\u300D\u3001\u300C/zh hello\u300D"},detect_lang_remote:{zh:"\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B",en:"Remote language detection",zh_TW:"\u9060\u7AEF\u8A9E\u8A00\u5075\u6E2C"},detect_lang_remote_help:{zh:"\u542F\u7528\u540E\u68C0\u6D4B\u51C6\u786E\u5EA6\u589E\u52A0\uFF0C\u4F46\u4F1A\u964D\u4F4E\u7FFB\u8BD1\u901F\u5EA6\uFF0C\u8BF7\u914C\u60C5\u5F00\u542F",en:"After enabling, the detection accuracy will increase, but it will reduce the translation speed. Please enable it as appropriate.",zh_TW:"\u555F\u7528\u5F8C\u53EF\u63D0\u5347\u5075\u6E2C\u6E96\u78BA\u5EA6\uFF0C\u4F46\u6703\u964D\u4F4E\u7FFB\u8B6F\u901F\u5EA6\uFF0C\u8ACB\u8996\u9700\u8981\u958B\u555F\u3002"},detect_lang_service:{zh:"\u8BED\u8A00\u68C0\u6D4B\u670D\u52A1",en:"Language detect service",zh_TW:"\u8A9E\u8A00\u6AA2\u6E2C\u670D\u52D9"},disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},enable:{zh:"\u542F\u7528",en:"Enable",zh_TW:"\u555F\u7528"},selection_translate:{zh:"\u5212\u8BCD\u7FFB\u8BD1",en:"Selection Translate",zh_TW:"\u5283\u8A5E\u7FFB\u8B6F"},toggle_selection_translate:{zh:"\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"Use Selection Translate",zh_TW:"\u555F\u7528\u5283\u8A5E\u7FFB\u8B6F"},trigger_tranbox_shortcut:{zh:"\u663E\u793A\u7FFB\u8BD1\u6846/\u7FFB\u8BD1\u9009\u4E2D\u6587\u5B57\u5FEB\u6377\u952E",en:"Open Translate Popup/Translate Selected Shortcut",zh_TW:"\u986F\u793A\u7FFB\u8B6F\u6846\uFF0F\u7FFB\u8B6F\u9078\u4E2D\u6587\u5B57\u5FEB\u6377\u9375"},tranbtn_offset_x:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBX\uFF08\xB1200\uFF09",en:"Translate Button Offset X (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6309\u9215\u4F4D\u79FB X\uFF08\xB1200\uFF09"},tranbtn_offset_y:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBY\uFF08\xB1200\uFF09",en:"Translate Button Offset Y (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6309\u9215\u4F4D\u79FB Y\uFF08\xB1200\uFF09"},tranbox_offset_x:{zh:"\u7FFB\u8BD1\u6846\u504F\u79FBX\uFF08\xB1200\uFF09",en:"Translate Box Offset X (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6846\u4F4D\u79FB X\uFF08\xB1200\uFF09"},tranbox_offset_y:{zh:"\u7FFB\u8BD1\u6846\u504F\u79FBY\uFF08\xB1200\uFF09",en:"Translate Box Offset Y (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6846\u4F4D\u79FB Y\uFF08\xB1200\uFF09"},translated_text:{zh:"\u8BD1\u6587",en:"Translated Text",zh_TW:"\u8B6F\u6587"},original_text:{zh:"\u539F\u6587",en:"Original Text",zh_TW:"\u539F\u6587"},favorite_words:{zh:"\u6536\u85CF\u8BCD\u6C47",en:"Favorite Words",zh_TW:"\u6536\u85CF\u8A5E\u5F59"},touch_setting:{zh:"\u89E6\u5C4F\u8BBE\u7F6E",en:"Touch Setting",zh_TW:"\u89F8\u63A7\u8A2D\u5B9A"},touch_translate_shortcut:{zh:"\u89E6\u5C4F\u7FFB\u8BD1\u5FEB\u6377\u65B9\u5F0F (\u652F\u6301\u591A\u9009)",en:"Touch Translate Shortcut (multiple supported)",zh_TW:"\u89F8\u63A7\u7FFB\u8B6F\u6377\u5F91 (\u652F\u63F4\u591A\u9078)"},touch_tap_0:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},touch_tap_2:{zh:"\u53CC\u6307\u8F7B\u89E6",en:"Two finger tap",zh_TW:"\u96D9\u6307\u8F15\u89F8"},touch_tap_3:{zh:"\u4E09\u6307\u8F7B\u89E6",en:"Three finger tap",zh_TW:"\u4E09\u6307\u8F15\u89F8"},touch_tap_4:{zh:"\u56DB\u6307\u8F7B\u89E6",en:"Four finger tap",zh_TW:"\u56DB\u6307\u8F15\u89F8"},touch_tap_5:{zh:"\u5355\u6307\u53CC\u51FB",en:"Double-click",zh_TW:"\u55AE\u6307\u96D9\u64CA"},touch_tap_6:{zh:"\u5355\u6307\u4E09\u51FB",en:"Triple-click",zh_TW:"\u55AE\u6307\u4E09\u64CA"},touch_tap_7:{zh:"\u53CC\u6307\u53CC\u51FB",en:"Two-finger double-click",zh_TW:"\u96D9\u6307\u96D9\u64CA"},translate_blacklist:{zh:"\u7981\u7528\u7FFB\u8BD1\u540D\u5355",en:"Translate Blacklist",zh_TW:"\u505C\u7528\u7FFB\u8B6F\u540D\u55AE"},disabled_orilist:{zh:"\u7981\u7528Origin\u540D\u5355",en:"Disabled Origin List",zh_TW:"\u505C\u7528 Origin \u540D\u55AE"},disabled_csplist:{zh:"\u7981\u7528CSP\u540D\u5355",en:"Disabled CSP List",zh_TW:"\u505C\u7528 CSP \u540D\u55AE"},disabled_csplist_helper:{zh:"3\u3001\u901A\u8FC7\u8C03\u6574CSP\u7B56\u7565\uFF0C\u4F7F\u5F97\u67D0\u4E9B\u9875\u9762\u80FD\u591F\u6CE8\u5165JS/CSS/Media\uFF0C\u8BF7\u8C28\u614E\u4F7F\u7528\uFF0C\u9664\u975E\u60A8\u5DF2\u77E5\u6653\u76F8\u5173\u98CE\u9669\u3002",en:"3. By adjusting the CSP policy, some pages can inject JS/CSS/Media. Please use it with caution unless you are aware of the related risks.",zh_TW:"3. \u900F\u904E\u8ABF\u6574 CSP \u653F\u7B56\uFF0C\u4F7F\u90E8\u5206\u9801\u9762\u53EF\u6CE8\u5165 JS/CSS/Media\u3002\u8ACB\u8B39\u614E\u4F7F\u7528\uFF0C\u9664\u975E\u60A8\u5DF2\u77E5\u6089\u76F8\u95DC\u98A8\u96AA\u3002"},skip_langs:{zh:"\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",en:"Disable Languages",zh_TW:"\u4E0D\u7FFB\u8B6F\u7684\u8A9E\u8A00"},skip_langs_helper:{zh:"\u6B64\u529F\u80FD\u4F9D\u8D56\u51C6\u786E\u7684\u8BED\u8A00\u68C0\u6D4B\uFF0C\u5EFA\u8BAE\u542F\u7528\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B\u3002",en:"This feature relies on accurate language detection. It is recommended to enable remote language detection.",zh_TW:"\u6B64\u529F\u80FD\u4EF0\u8CF4\u6E96\u78BA\u7684\u8A9E\u8A00\u5075\u6E2C\uFF0C\u5EFA\u8B70\u555F\u7528\u9060\u7AEF\u8A9E\u8A00\u5075\u6E2C\u3002"},context_menus:{zh:"\u53F3\u952E\u83DC\u5355",en:"Context Menus",zh_TW:"\u53F3\u9375\u9078\u55AE"},hide_context_menus:{zh:"\u9690\u85CF\u53F3\u952E\u83DC\u5355",en:"Hide Context Menus",zh_TW:"\u96B1\u85CF\u53F3\u9375\u9078\u55AE"},simple_context_menus:{zh:"\u7B80\u5355\u53F3\u952E\u83DC\u5355",en:"Simple_context_menus Context Menus",zh_TW:"\u7C21\u6613\u53F3\u9375\u9078\u55AE"},secondary_context_menus:{zh:"\u4E8C\u7EA7\u53F3\u952E\u83DC\u5355",en:"Secondary Context Menus",zh_TW:"\u6B21\u7D1A\u53F3\u9375\u9078\u55AE"},mulkeys_help:{zh:"\u652F\u6301\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\uFF0C\u8F6E\u8BE2\u8C03\u7528\u3002",en:"Supports polling calls separated by newlines or English commas \",\".",zh_TW:"\u652F\u63F4\u4EE5\u63DB\u884C\u6216\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\uFF0C\u8F2A\u8A62\u547C\u53EB\u3002"},translation_element_tag:{zh:"\u8BD1\u6587\u5143\u7D20\u6807\u7B7E",en:"Translation Element Tag",zh_TW:"\u8B6F\u6587\u5143\u7D20\u6A19\u7C64"},show_only_translations:{zh:"\u4EC5\u663E\u793A\u8BD1\u6587",en:"Show Only Translations",zh_TW:"\u50C5\u986F\u793A\u8B6F\u6587"},show_only_translations_help:{zh:"\u975E\u5B8C\u7F8E\u5B9E\u73B0\uFF0C\u67D0\u4E9B\u9875\u9762\u53EF\u80FD\u6709\u6837\u5F0F\u7B49\u95EE\u9898\u3002",en:"It is not a perfect implementation and some pages may have style issues.",zh_TW:"\u6B64\u70BA\u975E\u5B8C\u7F8E\u5BE6\u4F5C\uFF0C\u90E8\u5206\u9801\u9762\u53EF\u80FD\u51FA\u73FE\u6A23\u5F0F\u7B49\u554F\u984C\u3002"},translate_page_title:{zh:"\u662F\u5426\u7FFB\u8BD1\u9875\u9762\u6807\u9898",en:"Translate Page Title",zh_TW:"\u662F\u5426\u7FFB\u8B6F\u9801\u9762\u6A19\u984C"},more:{zh:"\u66F4\u591A",en:"More",zh_TW:"\u66F4\u591A"},less:{zh:"\u66F4\u5C11",en:"Less",zh_TW:"\u66F4\u5C11"},fixer_selector:{zh:"\u7F51\u9875\u4FEE\u590D\u9009\u62E9\u5668",en:"Fixer Selector",zh_TW:"\u7DB2\u9801\u4FEE\u5FA9\u9078\u64C7\u5668"},reg_niutrans:{zh:"\u83B7\u53D6\u5C0F\u725B\u7FFB\u8BD1\u5BC6\u94A5\u3010\u7B80\u7EA6\u7FFB\u8BD1\u4E13\u5C5E\u65B0\u7528\u6237\u6CE8\u518C\u8D60\u9001300\u4E07\u5B57\u7B26\u3011",en:"Get NiuTrans APIKey [KISS Translator Exclusive New User Registration Free 3 Million Characters]",zh_TW:"\u53D6\u5F97\u5C0F\u725B\u7FFB\u8B6F\u91D1\u9470\u3010\u7C21\u7D04\u7FFB\u8B6F\u5C08\u5C6C\u65B0\u7528\u6236\u8A3B\u518A\u8D08\u9001 300 \u842C\u5B57\u5143\u3011"},trigger_mode:{zh:"\u89E6\u53D1\u65B9\u5F0F",en:"Trigger Mode",zh_TW:"\u89F8\u767C\u65B9\u5F0F"},trigger_click:{zh:"\u70B9\u51FB\u89E6\u53D1",en:"Click Trigger",zh_TW:"\u9EDE\u64CA\u89F8\u767C"},trigger_hover:{zh:"\u9F20\u6807\u60AC\u505C\u89E6\u53D1",en:"Hover Trigger",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u89F8\u767C"},trigger_select:{zh:"\u9009\u4E2D\u89E6\u53D1",en:"Select Trigger",zh_TW:"\u9078\u53D6\u89F8\u767C"},extend_styles:{zh:"\u9644\u52A0\u6837\u5F0F",en:"Extend Styles",zh_TW:"\u9644\u52A0\u6A23\u5F0F"},custom_option:{zh:"\u81EA\u5B9A\u4E49\u9009\u9879",en:"Custom Option",zh_TW:"\u81EA\u8A02\u9078\u9805"},translate_selected_text:{zh:"\u7FFB\u8BD1\u9009\u4E2D\u6587\u5B57",en:"Translate Selected Text",zh_TW:"\u7FFB\u8B6F\u9078\u53D6\u6587\u5B57"},toggle_style:{zh:"\u5207\u6362\u6837\u5F0F",en:"Toggle Style",zh_TW:"\u5207\u63DB\u6A23\u5F0F"},open_menu:{zh:"\u6253\u5F00\u5F39\u7A97\u83DC\u5355",en:"Open Popup Menu",zh_TW:"\u958B\u555F\u5F48\u7A97\u9078\u55AE"},open_setting:{zh:"\u6253\u5F00\u8BBE\u7F6E",en:"Open Setting",zh_TW:"\u958B\u555F\u8A2D\u5B9A"},follow_selection:{zh:"\u7FFB\u8BD1\u6846\u8DDF\u968F\u9009\u4E2D\u6587\u672C",en:"Transbox Follow Selection",zh_TW:"\u7FFB\u8B6F\u6846\u8DDF\u96A8\u9078\u53D6\u6587\u5B57"},tranbox_auto_height:{zh:"\u7FFB\u8BD1\u6846\u81EA\u9002\u5E94\u9AD8\u5EA6",en:"Translation box adaptive height",zh_TW:"\u7FFB\u8B6F\u6846\u81EA\u9069\u61C9\u9AD8\u5EA6"},translate_start_hook:{zh:"\u7FFB\u8BD1\u5F00\u59CB\u94A9\u5B50\u51FD\u6570",en:"Translate Start Hook",zh_TW:"\u7FFB\u8B6F\u958B\u59CB Hook"},translate_start_hook_helper:{zh:"\u7FFB\u8BD1\u524D\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}",en:"Run before translation, input parameters are: {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}",zh_TW:"\u7FFB\u8B6F\u524D\u6642\u904B\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}"},translate_end_hook:{zh:"\u7FFB\u8BD1\u5B8C\u6210\u94A9\u5B50\u51FD\u6570",en:"Translate End Hook",zh_TW:"\u7FFB\u8B6F\u5B8C\u6210 Hook"},translate_end_hook_helper:{zh:"\u7FFB\u8BD1\u5B8C\u6210\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A ({hostNode, parentNode, nodes, wrapperNode, innerNode})",en:"Run when translation is complete, input parameters are: ({hostNode, parentNode, nodes, wrapperNode, innerNode})",zh_TW:"\u7FFB\u8B6F\u5B8C\u6210\u6642\u904B\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A ({hostNode, parentNode, nodes, wrapperNode, innerNode})"},translate_remove_hook:{zh:"\u7FFB\u8BD1\u79FB\u9664\u94A9\u5B50\u51FD\u6570",en:"Translate Removed Hook",zh_TW:"\u7FFB\u8B6F\u79FB\u9664 Hook"},translate_remove_hook_helper:{zh:"\u7FFB\u8BD1\u79FB\u9664\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A \u7FFB\u8BD1\u8282\u70B9\u3002",en:"Run when translation is removed, the input parameters are: translation node.",zh_TW:"\u79FB\u9664\u7FFB\u8B6F\u6642\u57F7\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A\u7FFB\u8B6F\u7BC0\u9EDE\u3002"},english_dict:{zh:"\u82F1\u6587\u8BCD\u5178",en:"English Dictionary",zh_TW:"\u82F1\u6587\u5B57\u5178"},english_suggest:{zh:"\u82F1\u6587\u5EFA\u8BAE",en:"English Suggest",zh_TW:"\u82F1\u6587\u5EFA\u8B70"},api_name:{zh:"\u63A5\u53E3\u540D\u79F0",en:"API Name",zh_TW:"\u4ECB\u9762\u540D\u7A31"},is_disabled:{zh:"\u662F\u5426\u7981\u7528",en:"Is Disabled",zh_TW:"\u662F\u5426\u505C\u7528"},translate_selected:{zh:"\u662F\u5426\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"If translate selected",zh_TW:"\u662F\u5426\u555F\u7528\u5283\u8A5E\u7FFB\u8B6F"},use_batch_fetch:{zh:"\u662F\u5426\u805A\u5408\u53D1\u9001\u7FFB\u8BD1\u8BF7\u6C42",en:"Whether to aggregate and send translation requests",zh_TW:"\u662F\u5426\u805A\u5408\u767C\u9001\u7FFB\u8B6F\u8ACB\u6C42"},batch_interval:{zh:"\u805A\u5408\u8BF7\u6C42\u7B49\u5F85\u65F6\u95F4(100-10000)",en:"Aggregation request waiting time (100-10000)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u7B49\u5F85\u6642\u9593(100-10000)"},batch_size:{zh:"\u805A\u5408\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570(1-100)",en:"Maximum number of paragraphs in an aggregation request (1-100)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u6700\u5927\u6BB5\u843D\u6578(1-100)"},batch_length:{zh:"\u805A\u5408\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6(1000-100000)",en:"Maximum text length for aggregation requests (1000-100000)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u6700\u5927\u6587\u5B57\u9577\u5EA6(1000-100000)"},use_context:{zh:"\u662F\u5426\u542F\u7528\u667A\u80FD\u4E0A\u4E0B\u6587",en:"Whether to enable AI context",zh_TW:"\u662F\u5426\u555F\u7528\u667A\u6167\u4E0A\u4E0B\u6587"},context_size:{zh:"\u4E0A\u4E0B\u6587\u4F1A\u8BDD\u6570\u91CF(1-20)",en:"Number of context sessions(1-20)",zh_TW:"\u4E0A\u4E0B\u6587\u6703\u8A71\u6578\u91CF(1-20)"},auto_scan_page:{zh:"\u81EA\u52A8\u626B\u63CF\u9875\u9762",en:"Auto scan page",zh_TW:"\u81EA\u52D5\u6383\u63CF\u9801\u9762"},has_rich_text:{zh:"\u542F\u7528\u5BCC\u6587\u672C\u7FFB\u8BD1",en:"Enable rich text translation",zh_TW:"\u555F\u7528\u5BCC\u6587\u672C\u7FFB\u8B6F"},has_shadowroot:{zh:"\u626B\u63CFShadowroot",en:"Scan Shadowroot",zh_TW:"\u6383\u63CFShadowroot"},mousehover_translate:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover Translation",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},use_mousehover_translation:{zh:"\u542F\u7528\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Enable mouseover translation",zh_TW:"\u555F\u7528\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},selected_translation_alert:{zh:"\u5212\u8BCD\u7FFB\u8BD1\u7684\u5F00\u542F\u548C\u5173\u95ED\u8BF7\u5230\u201C\u89C4\u5219\u8BBE\u7F6E\u201D\u91CC\u9762\u8BBE\u7F6E\u3002",en:"To turn selected translation on or off, please go to \"Rule Settings\".",zh_TW:"\u5283\u8A5E\u7FFB\u8B6F\u7684\u958B\u555F\u548C\u95DC\u9589\u8ACB\u5230\u300C\u898F\u5247\u8A2D\u5B9A\u300D\u88E1\u9762\u8A2D\u5B9A\u3002"},mousehover_key_help:{zh:"\u5F53\u5FEB\u6377\u952E\u7F6E\u7A7A\u65F6\u8868\u793A\u9F20\u6807\u60AC\u505C\u76F4\u63A5\u7FFB\u8BD1",en:"When the shortcut key is empty, it means that the mouse hovers to translate directly",zh_TW:"\u7576\u5FEB\u6377\u9375\u7F6E\u7A7A\u6642\u8868\u793A\u6ED1\u9F20\u61F8\u505C\u76F4\u63A5\u7FFB\u8B6F"},autoscan_alt:{zh:"\u81EA\u52A8\u626B\u63CF",en:"Auto Scan",zh_TW:"\u81EA\u52D5\u6383\u63CF"},shadowroot_alt:{zh:"ShadowRoot",en:"ShadowRoot",zh_TW:"ShadowRoot"},richtext_alt:{zh:"\u4FDD\u7559\u5BCC\u6587\u672C",en:"Rich Text",zh_TW:"\u4FDD\u7559\u5BCC\u6587\u672C"},transonly_alt:{zh:"\u9690\u85CF\u539F\u6587",en:"Hide Original",zh_TW:"\u96B1\u85CF\u539F\u6587"},confirm_title:{zh:"\u786E\u8BA4",en:"Confirm",zh_TW:"\u78BA\u8A8D"},confirm_message:{zh:"\u786E\u5B9A\u64CD\u4F5C\u5417\uFF1F",en:"Are you sure you want to proceed?",zh_TW:"\u78BA\u5B9A\u64CD\u4F5C\u55CE\uFF1F"},confirm_action:{zh:"\u786E\u5B9A",en:"Confirm",zh_TW:"\u78BA\u5B9A"},cancel_action:{zh:"\u53D6\u6D88",en:"Cancel",zh_TW:"\u53D6\u6D88"},pls_press_shortcut:{zh:"\u8BF7\u6309\u4E0B\u5FEB\u6377\u952E\u7EC4\u5408",en:"Please press the shortcut key combination",zh_TW:"\u8ACB\u6309\u4E0B\u5FEB\u901F\u9375\u7D44\u5408"},load_setting_err:{zh:"\u6570\u636E\u52A0\u8F7D\u51FA\u9519\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u6216\u5378\u8F7D\u540E\u91CD\u65B0\u5B89\u88C5\u3002",en:"Please press the shortcut key combination",zh_TW:"\u8ACB\u6309\u4E0B\u5FEB\u901F\u9375\u7D44\u5408"},translation_style:{zh:"\u7FFB\u8BD1\u98CE\u683C",en:"Translation style",zh_TW:"\u7FFB\u8B6F\u98A8\u683C"},placeholder:{zh:"\u5360\u4F4D\u7B26",en:"Placeholder",zh_TW:"\u4F54\u4F4D\u7B26"},tag_name:{zh:"\u5360\u4F4D\u6807\u7B7E\u540D",en:"Placeholder tag name",zh_TW:"\u4F54\u4F4D\u6A19\u540D"},system_prompt_helper:{zh:"\u5728\u672A\u5B8C\u5168\u7406\u89E3\u9ED8\u8BA4Prompt\u7684\u60C5\u51B5\u4E0B\uFF0C\u8BF7\u52FF\u968F\u610F\u4FEE\u6539\uFF0C\u5426\u5219\u53EF\u80FD\u65E0\u6CD5\u5DE5\u4F5C\u3002",en:"Do not modify the default prompt without fully understanding it, otherwise it may not work.",zh_TW:"\u5728\u672A\u5B8C\u5168\u7406\u89E3\u9810\u8A2DPrompt\u7684\u60C5\u6CC1\u4E0B\uFF0C\u8ACB\u52FF\u96A8\u610F\u4FEE\u6539\uFF0C\u5426\u5247\u53EF\u80FD\u7121\u6CD5\u904B\u4F5C\u3002"},if_pre_init:{zh:"\u662F\u5426\u9884\u521D\u59CB\u5316",en:"Whether to pre-initialize",zh_TW:"\u662F\u5426\u9810\u521D\u59CB\u5316"},export_old:{zh:"\u5BFC\u51FA\u65E7\u7248",en:"Export old version",zh_TW:"\u532F\u51FA\u820A\u7248"},favorite_words_helper:{zh:"\u5BFC\u5165\u8BCD\u6C47\u8BF7\u4F7F\u7528txt\u6587\u4EF6\uFF0C\u6BCF\u4E00\u884C\u4E00\u4E2A\u5355\u8BCD\u3002",en:"To import vocabulary, please use a txt file with one word per line.",zh_TW:"\u532F\u5165\u8A5E\u5F59\u8ACB\u4F7F\u7528txt\u6587\u4EF6\uFF0C\u6BCF\u4E00\u884C\u4E00\u500B\u55AE\u5B57\u3002"},btn_tip_click_away:{zh:"\u5931\u7126\u9690\u85CF/\u663E\u793A",en:"Loss of focus hide/show",zh_TW:"\u5931\u7126\u96B1\u85CF/\u986F\u793A"},btn_tip_follow_selection:{zh:"\u8DDF\u968F/\u56FA\u5B9A\u6A21\u5F0F",en:"Follow/Fixed Mode",zh_TW:"\u8DDF\u96A8/\u56FA\u5B9A\u6A21\u5F0F"},btn_tip_simple_style:{zh:"\u8FF7\u4F60/\u5E38\u89C4\u6A21\u5F0F",en:"Mini/Regular Mode",zh_TW:"\u8FF7\u4F60/\u5E38\u898F\u6A21\u5F0F"},api_placeholder:{zh:"\u5360\u4F4D\u7B26",en:"Placeholder",zh_TW:"\u4F54\u4F4D\u7B26"},api_placetag:{zh:"\u5360\u4F4D\u6807\u7B7E",en:"Placeholder tags",zh_TW:"\u4F54\u4F4D\u6A19"},detected_lang:{zh:"\u8BED\u8A00\u68C0\u6D4B",en:"Language detection",zh_TW:"\u8A9E\u8A00\u5075\u6E2C"},detected_result:{zh:"\u68C0\u6D4B\u7ED3\u679C",en:"Detect result",zh_TW:"\u6AA2\u6E2C\u7D50\u679C"},subtitle_translate:{zh:"\u5B57\u5E55\u7FFB\u8BD1",en:"Subtitle translate",zh_TW:"\u5B57\u5E55\u7FFB\u8B6F"},toggle_subtitle_translate:{zh:"\u542F\u7528\u5B57\u5E55\u7FFB\u8BD1",en:"Enable subtitle translation",zh_TW:"\u555F\u7528\u5B57\u5E55\u7FFB\u8B6F"},is_bilingual_view:{zh:"\u53CC\u8BED\u663E\u793A",en:"Enable bilingual display",zh_TW:"\u96D9\u8A9E\u986F\u793A"},is_skip_ad:{zh:"\u662F\u5426\u5FEB\u8FDB\u5E7F\u544A",en:"Should I fast forward to the ad?",zh_TW:"\u662F\u5426\u5FEB\u8F49\u5EE3\u544A"},background_styles:{zh:"\u80CC\u666F\u6837\u5F0F",en:"DBackground Style",zh_TW:"\u80CC\u666F\u6A23\u5F0F"},origin_styles:{zh:"\u539F\u6587\u6837\u5F0F",en:"Original style",zh_TW:"\u539F\u6587\u6A23\u5F0F"},translation_styles:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Translation style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},ai_segmentation:{zh:"AI\u667A\u80FD\u65AD\u53E5",en:"AI intelligent punctuation",zh_TW:"AI\u667A\u6167\u65B7\u53E5"},ai_chunk_length:{zh:"AI\u5904\u7406\u5207\u5272\u957F\u5EA6(200-20000)",en:"AI processing chunk length(200-20000)",zh_TW:"AI\u5904\u7406\u5207\u5272\u957F\u5EA6(200-20000)"},subtitle_helper_1:{zh:"1\u3001\u76EE\u524D\u4EC5\u652F\u6301Youtube\u684C\u9762\u7F51\u7AD9\u3002",en:"1. Currently only supports Youtube desktop website.",zh_TW:"1.\u76EE\u524D\u50C5\u652F\u63F4Youtube\u684C\u9762\u7DB2\u7AD9\uFF0C\u4E14\u50C5\u652F\u63F4\u700F\u89BD\u5668\u64F4\u5145\u529F\u80FD\u3002"},subtitle_helper_2:{zh:"2\u3001\u63D2\u4EF6\u5185\u7F6E\u57FA\u7840\u7684\u5B57\u5E55\u5408\u5E76\u3001\u65AD\u53E5\u7B97\u6CD5\uFF0C\u53EF\u6EE1\u8DB3\u5927\u90E8\u5206\u60C5\u51B5\u3002",en:"2. The plug-in has built-in basic subtitle merging and sentence segmentation algorithms, which can meet most situations.",zh_TW:"2.\u63D2\u4EF6\u5167\u5EFA\u57FA\u790E\u7684\u5B57\u5E55\u5408\u4F75\u3001\u65B7\u53E5\u6F14\u7B97\u6CD5\uFF0C\u53EF\u6EFF\u8DB3\u5927\u90E8\u5206\u60C5\u6CC1\u3002"},subtitle_helper_3:{zh:"3\u3001\u4EA6\u53EF\u4EE5\u542F\u7528AI\u667A\u80FD\u65AD\u53E5\uFF0C\u4F46\u9700\u8003\u8651\u5207\u5272\u957F\u5EA6\u53CAAI\u63A5\u53E3\u80FD\u529B\uFF0C\u53EF\u80FD\u5904\u7406\u65F6\u95F4\u4F1A\u5F88\u957F\uFF0C\u751A\u81F3\u5904\u7406\u5931\u8D25\uFF0C\u5BFC\u81F4\u65E0\u6CD5\u770B\u5230\u5B57\u5E55\u3002",en:"3. You can also enable AI intelligent segmentation, but you need to consider the segmentation length and AI interface capabilities. The processing time may be very long or even fail, resulting in the inability to see subtitles.",zh_TW:"3.\u4EA6\u53EF\u555F\u7528AI\u667A\u80FD\u65B7\u53E5\uFF0C\u4F46\u9700\u8003\u616E\u5207\u5272\u9577\u5EA6\u53CAAI\u4ECB\u9762\u80FD\u529B\uFF0C\u53EF\u80FD\u8655\u7406\u6642\u9593\u6703\u5F88\u9577\uFF0C\u751A\u81F3\u8655\u7406\u5931\u6557\uFF0C\u5C0E\u81F4\u7121\u6CD5\u770B\u5230\u5B57\u5E55\u3002"},default_styles_example:{zh:"\u9ED8\u8BA4\u6837\u5F0F\u53C2\u8003\uFF1A",en:"Default styles reference:",zh_TW:"\u8A8D\u6A23\u5F0F\u53C3\u8003\uFF1A"},subtitle_load_succeed:{zh:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u6210\u529F\uFF01",en:"Bilingual subtitles loaded successfully!",zh_TW:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u6210\u529F\uFF01"},subtitle_load_failed:{zh:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u5931\u8D25\uFF01",en:"Failed to load bilingual subtitles!",zh_TW:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u5931\u8D25\uFF01"},try_get_subtitle_data:{zh:"\u5C1D\u8BD5\u83B7\u53D6\u5B57\u5E55\u6570\u636E\uFF0C\u8BF7\u7A0D\u5019...",en:"Trying to get subtitle data, please wait...",zh_TW:"\u5C1D\u8BD5\u83B7\u53D6\u5B57\u5E55\u6570\u636E\uFF0C\u8BF7\u7A0D\u5019..."},subtitle_data_processing:{zh:"\u5B57\u5E55\u6570\u636E\u5904\u7406\u4E2D...",en:"Subtitle data processing...",zh_TW:"\u5B57\u5E55\u6570\u636E\u5904\u7406\u4E2D..."},starting_to_process_subtitle:{zh:"\u5F00\u59CB\u5904\u7406\u5B57\u5E55\u6570\u636E...",en:"Starting to process subtitle data...",zh_TW:"\u5F00\u59CB\u5904\u7406\u5B57\u5E55\u6570\u636E..."},subtitle_data_is_ready:{zh:"\u5B57\u5E55\u6570\u636E\u5DF2\u51C6\u5907\u5C31\u7EEA\uFF0C\u8BF7\u70B9\u51FBKT\u6309\u94AE\u52A0\u8F7D",en:"The subtitle data is ready, please click the KT button to load it",zh_TW:"\u5B57\u5E55\u8CC7\u6599\u5DF2\u6E96\u5099\u5C31\u7DD2\uFF0C\u8ACB\u9EDE\u64CAKT\u6309\u9215\u52A0\u8F09"},log_level:{zh:"\u65E5\u5FD7\u7EA7\u522B",en:"Log Level",zh_TW:"\u65E5\u8A8C\u7B49\u7D1A"},goto_custom_api_example:{zh:"\u70B9\u51FB\u67E5\u770B\u3010\u81EA\u5B9A\u4E49\u63A5\u53E3\u793A\u4F8B\u3011",en:"Click to view [Custom Interface Example]",zh_TW:"\u9EDE\u9078\u67E5\u770B\u3010\u81EA\u8A02\u4ECB\u9762\u7BC4\u4F8B\u3011"},split_paragraph:{zh:"\u5207\u5206\u957F\u6BB5\u843D",en:"Split long paragraph",zh_TW:"\u5207\u5206\u9577\u6BB5\u843D"},split_length:{zh:"\u5207\u5206\u957F\u5EA6 (0-10000)",en:"Segmentation length(0-10000)",zh_TW:"\u5207\u5206\u9577\u5EA6(0-10000)"},highlight_words:{zh:"\u9AD8\u4EAE\u6536\u85CF\u8BCD\u6C47",en:"Highlight favorite words",zh_TW:"\u9AD8\u4EAE\u6536\u85CF\u8A5E\u5F59"},split_disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},split_textlength:{zh:"\u6309\u7167\u957F\u5EA6\u5207\u5206",en:"Split by length",zh_TW:"\u4F9D\u9577\u5EA6\u5207\u5206"},split_punctuation:{zh:"\u6309\u7167\u53E5\u5B50\u5207\u5206",en:"Split by sentence",zh_TW:"\u6309\u7167\u53E5\u5B50\u5207\u5206"},highlight_disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},highlight_beforetrans:{zh:"\u7FFB\u8BD1\u524D\u9AD8\u4EAE",en:"Highlight before translation",zh_TW:"\u7FFB\u8B6F\u524D\u9AD8\u4EAE"},highlight_aftertrans:{zh:"\u7FFB\u8BD1\u540E\u9AD8\u4EAE",en:"Highlight after translation",zh_TW:"\u7FFB\u8B6F\u5F8C\u9AD8\u4EAE"},pagescroll_root_margin:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u63D0\u524D\u89E6\u53D1 (0-10000px)",en:"Early triggering of scroll loading (0-10000px)",zh_TW:"\u6EFE\u52D5\u8F09\u5165\u63D0\u524D\u89F8\u767C (0-10000px)"}};const newI18n=lang=>key=>{var _I18N$key;return((_I18N$key=I18N[key])===null||_I18N$key===void 0?void 0:_I18N$key[lang])||"";}; +const UI_LANGS=[["en","English"],["zh","简体中文"],["zh_TW","繁體中文"]];const customApiLangs="[\"en\", \"English - English\"],\n[\"zh-CN\", \"Simplified Chinese - \u7B80\u4F53\u4E2D\u6587\"],\n[\"zh-TW\", \"Traditional Chinese - \u7E41\u9AD4\u4E2D\u6587\"],\n[\"ar\", \"Arabic - \u0627\u0644\u0639\u0631\u0628\u064A\u0629\"],\n[\"bg\", \"Bulgarian - \u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438\"],\n[\"ca\", \"Catalan - Catal\xE0\"],\n[\"hr\", \"Croatian - Hrvatski\"],\n[\"cs\", \"Czech - \u010Ce\u0161tina\"],\n[\"da\", \"Danish - Dansk\"],\n[\"nl\", \"Dutch - Nederlands\"],\n[\"fi\", \"Finnish - Suomi\"],\n[\"fr\", \"French - Fran\xE7ais\"],\n[\"de\", \"German - Deutsch\"],\n[\"el\", \"Greek - \u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC\"],\n[\"hi\", \"Hindi - \u0939\u093F\u0928\u094D\u0926\u0940\"],\n[\"hu\", \"Hungarian - Magyar\"],\n[\"id\", \"Indonesian - Indonesia\"],\n[\"it\", \"Italian - Italiano\"],\n[\"ja\", \"Japanese - \u65E5\u672C\u8A9E\"],\n[\"ko\", \"Korean - \uD55C\uAD6D\uC5B4\"],\n[\"ms\", \"Malay - Melayu\"],\n[\"mt\", \"Maltese - Malti\"],\n[\"nb\", \"Norwegian - Norsk Bokm\xE5l\"],\n[\"pl\", \"Polish - Polski\"],\n[\"pt\", \"Portuguese - Portugu\xEAs\"],\n[\"ro\", \"Romanian - Rom\xE2n\u0103\"],\n[\"ru\", \"Russian - \u0420\u0443\u0441\u0441\u043A\u0438\u0439\"],\n[\"sk\", \"Slovak - Sloven\u010Dina\"],\n[\"sl\", \"Slovenian - Sloven\u0161\u010Dina\"],\n[\"es\", \"Spanish - Espa\xF1ol\"],\n[\"sv\", \"Swedish - Svenska\"],\n[\"ta\", \"Tamil - \u0BA4\u0BAE\u0BBF\u0BB4\u0BCD\"],\n[\"te\", \"Telugu - \u0C24\u0C46\u0C32\u0C41\u0C17\u0C41\"],\n[\"th\", \"Thai - \u0E44\u0E17\u0E22\"],\n[\"tr\", \"Turkish - T\xFCrk\xE7e\"],\n[\"uk\", \"Ukrainian - \u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430\"],\n[\"vi\", \"Vietnamese - Ti\u1EBFng Vi\u1EC7t\"],\n";const customApiHelpZH="// \u8BF7\u6C42\u6570\u636E\u9ED8\u8BA4\u683C\u5F0F\n{\n \"url\": \"{{url}}\",\n \"method\": \"POST\",\n \"headers\": {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{key}}\"\n },\n \"body\": {\n \"text\": \"{{text}}\", // \u5F85\u7FFB\u8BD1\u6587\u5B57\n \"from\": \"{{from}}\", // \u6587\u5B57\u7684\u8BED\u8A00\uFF08\u53EF\u80FD\u4E3A\u7A7A\uFF09\n \"to\": \"{{to}}\", // \u76EE\u6807\u8BED\u8A00\n },\n}\n\n\n// \u8FD4\u56DE\u6570\u636E\u9ED8\u8BA4\u683C\u5F0F\n{\n text: \"\", // \u7FFB\u8BD1\u540E\u7684\u6587\u5B57\n from: \"\", // \u8BC6\u522B\u7684\u6E90\u8BED\u8A00\n to: \"\", // \u76EE\u6807\u8BED\u8A00\uFF08\u53EF\u9009\uFF09\n}\n\n\n// Hook \u8303\u4F8B\n// URL\nhttps://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN\n\n// Request Hook\n(text, from, to, url, key) => [url, {\n headers: {\n \"Content-type\": \"application/json\",\n },\n method: \"GET\",\n body: null,\n}]\n\n// Response Hook\n// \u5176\u4E2D\u8FD4\u56DE\u6570\u7EC4\u7B2C\u4E00\u4E2A\u503C\u8868\u793A\u8BD1\u6587\u5B57\u7B26\u4E32\uFF0C\u7B2C\u4E8C\u4E2A\u503C\u4E3A\u5E03\u5C14\u503C\uFF0C\u8868\u793A\u539F\u6587\u8BED\u8A00\u4E0E\u76EE\u6807\u8BED\u8A00\u662F\u5426\u76F8\u540C\n(res, text, from, to) => [res.sentences.map((item) => item.trans).join(\" \"), to === res.src]\n\n\n// \u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u5982\u4E0B\n".concat(customApiLangs,"\n");const customApiHelpEN="// Default request\n{\n \"url\": \"{{url}}\",\n \"method\": \"POST\",\n \"headers\": {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{key}}\"\n },\n \"body\": {\n \"text\": \"{{text}}\", // Text to be translated\n \"from\": \"{{from}}\", // The language of the text (may be empty)\n \"to\": \"{{to}}\", // Target language\n },\n}\n\n\n// Default response\n{\n text: \"\", // translated text\n from: \"\", // Recognized source language\n to: \"\", // Target language (optional)\n}\n\n\n/// Hook Example\n// URL\nhttps://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN\n\n// Request Hook\n(text, from, to, url, key) => [url, {\n headers: {\n \"Content-type\": \"application/json\",\n },\n method: \"GET\",\n body: null,\n}]\n\n// Response Hook\n// In the returned array, the first value is the translated string, while the second value is a boolean\n// that indicates whether the source language is the same as the target language.\n(res, text, from, to) => [res.sentences.map((item) => item.trans).join(\" \"), to === res.src]\n\n\n// The supported language codes are as follows\n".concat(customApiLangs,"\n");const requestHookHelperZH="1\u3001\u7B2C\u4E00\u4E2A\u53C2\u6570\u5305\u542B\u5982\u4E0B\u5B57\u6BB5\uFF1A'texts', 'from', 'to', 'url', 'key', 'model', 'systemPrompt', ...\n2\u3001\u8FD4\u56DE\u503C\u5FC5\u987B\u662F\u5305\u542B\u4EE5\u4E0B\u5B57\u6BB5\u7684\u5BF9\u8C61\uFF1A 'url', 'body', 'headers', 'method'\n3\u3001\u5982\u8FD4\u56DE\u7A7A\u503C\uFF0C\u5219hook\u51FD\u6570\u4E0D\u4F1A\u4EA7\u751F\u4EFB\u4F55\u6548\u679C\u3002\n\n// \u793A\u4F8B\nasync (args, { url, body, headers, userMsg, method } = {}) => {\n return { url, body, headers, userMsg, method };\n}";const requestHookHelperEN="1. The first parameter contains the following fields: 'texts', 'from', 'to', 'url', 'key', 'model', 'systemPrompt', ...\n2. The return value must be an object containing the following fields: 'url', 'body', 'headers', 'method'\n3. If a null value is returned, the hook function will have no effect.\n\n// Example\nasync (args, { url, body, headers, userMsg, method } = {}) => {\n return { url, body, headers, userMsg, method };\n}";const responsetHookHelperZH="1\u3001\u7B2C\u4E00\u4E2A\u53C2\u6570\u5305\u542B\u5982\u4E0B\u5B57\u6BB5\uFF1A'res', ...\n2\u3001\u8FD4\u56DE\u503C\u5FC5\u987B\u662F\u5305\u542B\u4EE5\u4E0B\u5B57\u6BB5\u7684\u5BF9\u8C61\uFF1A 'translations'\n \uFF08'translations' \u5E94\u4E3A\u4E00\u4E2A\u4E8C\u7EF4\u6570\u7EC4\uFF1A[[\u8BD1\u6587, \u539F\u6587\u8BED\u8A00]]\uFF09\n3\u3001\u5982\u8FD4\u56DE\u7A7A\u503C\uFF0C\u5219hook\u51FD\u6570\u4E0D\u4F1A\u4EA7\u751F\u4EFB\u4F55\u6548\u679C\u3002\n\n// \u793A\u4F8B\nasync ({ res, ...args }) => {\n const translations = [[\"\u4F60\u597D\", \"en\"]];\n const modelMsg = {}; // \u7528\u4E8EAI\u4E0A\u4E0B\u6587\n return { translations, modelMsg };\n}";const responsetHookHelperEN="1. The first parameter contains the following fields: 'res', ...\n2. The return value must be an object containing the following fields: 'translations'\n ('translations' should be a two-dimensional array: [[translation, source language]]).\n3. If a null value is returned, the hook function will have no effect.\n\n// Example\nasync ({ res, ...args }) => {\n const translations = [[\"\u4F60\u597D\", \"en\"]];\n const modelMsg = {}; // For AI context\n return { translations, modelMsg };\n}";const I18N={app_name:{zh:"\u7B80\u7EA6\u7FFB\u8BD1",en:"KISS Translator",zh_TW:"\u7C21\u7D04\u7FFB\u8B6F"},translate:{zh:"\u7FFB\u8BD1",en:"Translate",zh_TW:"\u7FFB\u8B6F"},custom_api_help:{zh:customApiHelpZH,en:customApiHelpEN,zh_TW:customApiHelpZH},request_hook_helper:{zh:requestHookHelperZH,en:requestHookHelperEN,zh_TW:requestHookHelperZH},response_hook_helper:{zh:responsetHookHelperZH,en:responsetHookHelperEN,zh_TW:responsetHookHelperZH},translate_alt:{zh:"\u7FFB\u8BD1",en:"Translate",zh_TW:"\u7FFB\u8B6F"},basic_setting:{zh:"\u57FA\u672C\u8BBE\u7F6E",en:"Basic Setting",zh_TW:"\u57FA\u672C\u8A2D\u5B9A"},rules_setting:{zh:"\u89C4\u5219\u8BBE\u7F6E",en:"Rules Setting",zh_TW:"\u898F\u5247\u8A2D\u5B9A"},apis_setting:{zh:"\u63A5\u53E3\u8BBE\u7F6E",en:"Apis Setting",zh_TW:"API\u8A2D\u5B9A"},sync_setting:{zh:"\u540C\u6B65\u8BBE\u7F6E",en:"Sync Setting",zh_TW:"\u540C\u6B65\u8A2D\u5B9A"},patch_setting:{zh:"\u8865\u4E01\u8BBE\u7F6E",en:"Patch Setting",zh_TW:"\u4FEE\u88DC\u8A2D\u5B9A"},patch_setting_help:{zh:"\u9488\u5BF9\u4E00\u4E9B\u7279\u6B8A\u7F51\u7AD9\u7684\u4FEE\u6B63\u811A\u672C\uFF0C\u4EE5\u4FBF\u7FFB\u8BD1\u8F6F\u4EF6\u5F97\u5230\u66F4\u597D\u7684\u5C55\u793A\u6548\u679C\u3002",en:"Corrected scripts for some special websites so that the translation software can get better display results.",zh_TW:"\u91DD\u5C0D\u67D0\u4E9B\u7279\u6B8A\u7DB2\u7AD9\u7684\u4FEE\u6B63\u8173\u672C\uFF0C\u8B93\u7FFB\u8B6F\u8EDF\u9AD4\u6709\u66F4\u597D\u7684\u986F\u793A\u6548\u679C\u3002"},inject_webfix:{zh:"\u6CE8\u5165\u4FEE\u590D\u8865\u4E01",en:"Inject Webfix",zh_TW:"\u6CE8\u5165\u4FEE\u6B63\u88DC\u4E01"},about:{zh:"\u5173\u4E8E",en:"About",zh_TW:"\u95DC\u65BC"},about_md:{zh:"README.md",en:"README.en.md",zh_TW:"README.md"},about_md_local:{zh:"\u8BF7 [\u70B9\u51FB\u8FD9\u91CC](".concat("https://github.com/fishjar/kiss-translator",") \u67E5\u770B\u8BE6\u60C5\u3002"),en:"Please [click here](".concat("https://github.com/fishjar/kiss-translator",") for details."),zh_TW:"\u8ACB\u3010\u9EDE\u9019\u88E1\u3011\u67E5\u770B\u8A73\u7D30\u5167\u5BB9\u3002"},ui_lang:{zh:"\u754C\u9762\u8BED\u8A00",en:"Interface Language",zh_TW:"\u4ECB\u9762\u8A9E\u8A00"},fetch_limit:{zh:"\u6700\u5927\u5E76\u53D1\u8BF7\u6C42\u6570\u91CF (1-100)",en:"Maximum Number Of Concurrent Requests (1-100)",zh_TW:"\u6700\u5927\u540C\u6642\u8ACB\u6C42\u6578\u91CF (1-100)"},if_think:{zh:"\u542F\u7528\u6216\u7981\u7528\u6A21\u578B\u7684\u6DF1\u5EA6\u601D\u8003\u80FD\u529B",en:"Enable or disable the model\u2019s thinking behavior ",zh_TW:"\u555F\u7528\u6216\u505C\u7528\u6A21\u578B\u7684\u6DF1\u5EA6\u601D\u8003\u80FD\u529B"},think:{zh:"\u542F\u7528\u6DF1\u5EA6\u601D\u8003",en:"enable thinking",zh_TW:"\u555F\u7528\u6DF1\u5EA6\u601D\u8003"},nothink:{zh:"\u7981\u7528\u6DF1\u5EA6\u601D\u8003",en:"disable thinking",zh_TW:"\u505C\u7528\u6DF1\u5EA6\u601D\u8003"},think_ignore:{zh:"\u5FFD\u7565\u4EE5\u4E0B\u6A21\u578B\u7684\u8F93\u51FA,\u9017\u53F7(,)\u5206\u5272,\u5F53\u6A21\u578B\u652F\u6301\u601D\u8003\u4F46ollama\u4E0D\u652F\u6301\u65F6\u9700\u8981\u586B\u5199\u672C\u53C2\u6570",en:"Ignore the block for the following models, comma (,) separated",zh_TW:"\u5FFD\u7565\u4EE5\u4E0B\u6A21\u578B\u7684 \u8F38\u51FA\uFF0C\u4EE5\u9017\u865F (,) \u5206\u9694\uFF1B\u7576\u6A21\u578B\u652F\u63F4\u601D\u8003\u4F46 ollama \u4E0D\u652F\u63F4\u6642\u9700\u8981\u586B\u5BEB\u6B64\u53C3\u6578"},fetch_interval:{zh:"\u6BCF\u6B21\u8BF7\u6C42\u95F4\u9694\u65F6\u95F4 (0-5000ms)",en:"Time Between Requests (0-5000ms)",zh_TW:"\u6BCF\u6B21\u8ACB\u6C42\u9593\u9694\u6642\u9593 (0-5000ms)"},translate_interval:{zh:"\u7FFB\u8BD1\u95F4\u9694\u65F6\u95F4 (10-2000ms)",en:"Translation Interval (10-2000ms)",zh_TW:"\u7FFB\u8B6F\u9593\u9694\u6642\u9593 (10-2000ms)"},http_timeout:{zh:"\u8BF7\u6C42\u8D85\u65F6\u65F6\u95F4 (5000-60000ms)",en:"Request Timeout Time (5000-60000ms)",zh_TW:"\u8ACB\u6C42\u903E\u6642\u6642\u9593 (5000-60000ms)"},custom_header:{zh:"\u81EA\u5B9A\u4E49Header\u53C2\u6570",en:"Custom Header Params"},custom_header_help:{zh:"\u4F7F\u7528JSON\u683C\u5F0F\uFF0C\u4F8B\u5982 \"User-Agent\": \"Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0\"",en:"Use JSON format, for example \"User-Agent\": \"Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0\""},custom_body:{zh:"\u81EA\u5B9A\u4E49Body\u53C2\u6570",en:"Custom Body Params"},custom_body_help:{zh:"\u4F7F\u7528JSON\u683C\u5F0F\uFF0C\u4F8B\u5982 \"top_p\": 0.7",en:"Use JSON format, for example \"top_p\": 0.7"},min_translate_length:{zh:"\u6700\u5C0F\u7FFB\u8BD1\u5B57\u7B26\u6570 (1-100)",en:"Minimum number Of Translated Characters (1-100)",zh_TW:"\u6700\u5C0F\u7FFB\u8B6F\u5B57\u5143\u6578 (1-100)"},max_translate_length:{zh:"\u6700\u5927\u7FFB\u8BD1\u5B57\u7B26\u6570 (100-100000)",en:"Maximum number Of Translated Characters (100-100000)",zh_TW:"\u6700\u5927\u7FFB\u8B6F\u5B57\u5143\u6578 (100-100000)"},num_of_newline_characters:{zh:"\u6362\u884C\u5B57\u7B26\u6570 (1-1000)",en:"Number of Newline Characters (1-1000)",zh_TW:"\u63DB\u884C\u5B57\u5143\u6578 (1-1000)"},translate_service:{zh:"\u7FFB\u8BD1\u670D\u52A1",en:"Translate Service",zh_TW:"\u7FFB\u8B6F\u670D\u52D9"},translate_service_multiple:{zh:"\u7FFB\u8BD1\u670D\u52A1 (\u652F\u6301\u591A\u9009)",en:"Translation service (multiple supported)",zh_TW:"\u7FFB\u8B6F\u670D\u52D9 (\u652F\u63F4\u591A\u9078)"},translate_timing:{zh:"\u7FFB\u8BD1\u65F6\u673A",en:"Translate Timing",zh_TW:"\u7FFB\u8B6F\u6642\u6A5F"},mk_pagescroll:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u7FFB\u8BD1\uFF08\u63A8\u8350\uFF09",en:"Rolling Loading (Suggested)",zh_TW:"\u6EFE\u52D5\u8F09\u5165\u7FFB\u8B6F\uFF08\u5EFA\u8B70\uFF09"},mk_pageopen:{zh:"\u7ACB\u5373\u5168\u90E8\u7FFB\u8BD1",en:"Translate all now",zh_TW:"\u7ACB\u5373\u5168\u90E8\u7FFB\u8B6F"},mk_mouseover:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},mk_ctrlKey:{zh:"Control + \u9F20\u6807\u60AC\u505C",en:"Control + Mouseover",zh_TW:"Control + \u6ED1\u9F20\u61F8\u505C"},mk_shiftKey:{zh:"Shift + \u9F20\u6807\u60AC\u505C",en:"Shift + Mouseover",zh_TW:"Shift + \u6ED1\u9F20\u61F8\u505C"},mk_altKey:{zh:"Alt + \u9F20\u6807\u60AC\u505C",en:"Alt + Mouseover",zh_TW:"Alt + \u6ED1\u9F20\u61F8\u505C"},from_lang:{zh:"\u539F\u6587\u8BED\u8A00",en:"Source Language",zh_TW:"\u539F\u6587\u8A9E\u8A00"},to_lang:{zh:"\u76EE\u6807\u8BED\u8A00",en:"Target Language",zh_TW:"\u76EE\u6A19\u8A9E\u8A00"},to_lang2:{zh:"\u7B2C\u4E8C\u76EE\u6807\u8BED\u8A00",en:"Target Language 2",zh_TW:"\u7B2C\u4E8C\u76EE\u6A19\u8A9E\u8A00"},to_lang2_helper:{zh:"\u8BBE\u5B9A\u540E\uFF0C\u4E0E\u76EE\u6807\u8BED\u8A00\u4EA7\u751F\u4E92\u8BD1\u6548\u679C\uFF0C\u4F46\u4F9D\u8D56\u8FDC\u7A0B\u8BED\u8A00\u8BC6\u522B\u3002",en:"After setting, it will produce mutual translation effect with the target language, but it relies on remote language recognition.",zh_TW:"\u8A2D\u5B9A\u5F8C\u6703\u8207\u76EE\u6A19\u8A9E\u8A00\u4E92\u8B6F\uFF0C\u4F46\u4F9D\u8CF4\u9060\u7AEF\u8A9E\u8A00\u8B58\u5225\u3002"},text_style:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},text_style_alt:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},bg_color:{zh:"\u6837\u5F0F\u989C\u8272",en:"Style Color",zh_TW:"\u6A23\u5F0F\u984F\u8272"},remain_unchanged:{zh:"\u4FDD\u7559\u4E0D\u53D8",en:"Remain Unchanged",zh_TW:"\u4FDD\u7559\u4E0D\u8B8A"},google_api:{zh:"\u8C37\u6B4C\u7FFB\u8BD1\u63A5\u53E3",en:"Google Translate API",zh_TW:"Google \u7FFB\u8B6F\u4ECB\u9762"},default_selector:{zh:"\u9ED8\u8BA4\u9009\u62E9\u5668",en:"Default selector",zh_TW:"\u9810\u8A2D\u9078\u64C7\u5668"},selector_rules:{zh:"\u9009\u62E9\u5668\u89C4\u5219",en:"Selector Rules",zh_TW:"\u9078\u64C7\u5668\u898F\u5247"},save:{zh:"\u4FDD\u5B58",en:"Save",zh_TW:"\u5132\u5B58"},edit:{zh:"\u7F16\u8F91",en:"Edit",zh_TW:"\u7DE8\u8F2F"},cancel:{zh:"\u53D6\u6D88",en:"Cancel",zh_TW:"\u53D6\u6D88"},delete:{zh:"\u5220\u9664",en:"Delete",zh_TW:"\u522A\u9664"},reset:{zh:"\u91CD\u7F6E",en:"Reset",zh_TW:"\u91CD\u8A2D"},add:{zh:"\u6DFB\u52A0",en:"Add",zh_TW:"\u65B0\u589E"},inject_rules:{zh:"\u6CE8\u5165\u8BA2\u9605\u89C4\u5219",en:"Inject Subscribe Rules",zh_TW:"\u6CE8\u5165\u8A02\u95B1\u898F\u5247"},personal_rules:{zh:"\u4E2A\u4EBA\u89C4\u5219",en:"Rules",zh_TW:"\u500B\u4EBA\u898F\u5247"},subscribe_rules:{zh:"\u8BA2\u9605\u89C4\u5219",en:"Subscribe",zh_TW:"\u8A02\u95B1\u898F\u5247"},overwrite_subscribe_rules:{zh:"\u8986\u5199\u8BA2\u9605\u89C4\u5219",en:"Overwrite",zh_TW:"\u8986\u5BEB\u8A02\u95B1\u898F\u5247"},subscribe_url:{zh:"\u8BA2\u9605\u5730\u5740",en:"Subscribe URL",zh_TW:"\u8A02\u95B1\u7DB2\u5740"},rules_warn_1:{zh:"1\u3001\u89C4\u5219\u751F\u6548\u7684\u4F18\u5148\u7EA7\u4F9D\u6B21\u4E3A\uFF1A\u4E2A\u4EBA\u89C4\u5219 > \u8BA2\u9605\u89C4\u5219 > \u5168\u5C40\u89C4\u5219\u3002\"\u5168\u5C40\u89C4\u5219\"\u76F8\u5F53\u4E8E\u515C\u5E95\u89C4\u5219\u3002",en:"1. The priority of rules is: personal rules > subscription rules > global rules. \"Global rules\" are like a fallback rule.",zh_TW:"1.\u898F\u5247\u751F\u6548\u7684\u512A\u5148\u9806\u5E8F\u4F9D\u5E8F\u70BA\uFF1A\u500B\u4EBA\u898F\u5247 > \u8A02\u95B1\u898F\u5247 > \u5168\u57DF\u898F\u5247\u3002 \"\u5168\u57DF\u898F\u5247\"\u76F8\u7576\u65BC\u515C\u5E95\u898F\u5247\u3002"},rules_warn_2:{zh:"2\u3001\u201C\u8BA2\u9605\u89C4\u5219\u201D\u9009\u62E9\u6CE8\u5165\u540E\u624D\u4F1A\u751F\u6548\u3002",en:"2. \"Subscription rules\" will take effect only after injection is selected.",zh_TW:"2\u3001\u300C\u8A02\u95B1\u898F\u5247\u300D\u9078\u64C7\u6CE8\u5165\u5F8C\u624D\u6703\u751F\u6548\u3002"},rules_warn_3:{zh:"3\u3001\u5173\u4E8E\u89C4\u5219\u586B\u5199\uFF1A\u8F93\u5165\u6846\u7559\u7A7A\u6216\u4E0B\u62C9\u6846\u9009\u201C*\u201D\u8868\u793A\u91C7\u7528\u5168\u5C40\u89C4\u5219\u3002",en:"3. Regarding filling in the rules: Leave the input box blank or select \"*\" in the drop-down box to use global rule.",zh_TW:"3. \u898F\u5247\u586B\u5BEB\u8AAA\u660E\uFF1A\u8F38\u5165\u6846\u7559\u7A7A\u6216\u4E0B\u62C9\u9078\u64C7\u300C*\u300D\u8868\u793A\u4F7F\u7528\u5168\u57DF\u898F\u5247\u3002"},sync_warn:{zh:"\u6D89\u53CA\u9690\u79C1\u6570\u636E\u7684\u540C\u6B65\u8BF7\u8C28\u614E\u9009\u62E9\u7B2C\u4E09\u65B9\u540C\u6B65\u670D\u52A1\uFF0C\u5EFA\u8BAE\u81EA\u884C\u642D\u5EFA kiss-worker \u6216 WebDAV \u670D\u52A1\u3002",en:"When synchronizing data that involves privacy, please be cautious about choosing third-party sync services. It is recommended to set up your own sync service using kiss-worker or WebDAV.",zh_TW:"\u540C\u6B65\u6D89\u53CA\u96B1\u79C1\u8CC7\u6599\u6642\uFF0C\u8ACB\u8B39\u614E\u9078\u64C7\u7B2C\u4E09\u65B9\u540C\u6B65\u670D\u52D9\uFF1B\u5EFA\u8B70\u81EA\u5EFA kiss-worker \u6216 WebDAV \u670D\u52D9\u3002"},sync_warn_2:{zh:"\u5982\u679C\u670D\u52A1\u5668\u5B58\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u540C\u6B65\u7684\u6570\u636E\uFF0C\u7B2C\u4E00\u6B21\u540C\u6B65\u5C06\u76F4\u63A5\u8986\u76D6\u672C\u5730\u914D\u7F6E\uFF0C\u540E\u9762\u5219\u6839\u636E\u4FEE\u6539\u65F6\u95F4\uFF0C\u65B0\u7684\u8986\u76D6\u65E7\u7684\u3002",en:"If the server has data synchronized by other clients, the first synchronization will directly overwrite the local configuration, and later, according to the modification time, the new one will overwrite the old one.",zh_TW:"\u82E5\u4F3A\u670D\u5668\u4E0A\u5B58\u5728\u5176\u4ED6\u7528\u6236\u7AEF\u540C\u6B65\u7684\u8CC7\u6599\uFF0C\u7B2C\u4E00\u6B21\u540C\u6B65\u6703\u76F4\u63A5\u8986\u84CB\u672C\u6A5F\u8A2D\u5B9A\uFF1B\u4E4B\u5F8C\u5247\u4F9D\u4FEE\u6539\u6642\u9593\uFF0C\u7531\u65B0\u7684\u8986\u84CB\u820A\u7684\u3002"},about_sync_api:{zh:"\u81EA\u5EFAkiss-wroker\u6570\u636E\u540C\u6B65\u670D\u52A1",en:"Self-hosting a Kiss-worker data sync service",zh_TW:"\u81EA\u5EFA kiss-wroker \u8CC7\u6599\u540C\u6B65\u670D\u52D9"},about_api:{zh:"1\u3001\u5176\u4E2D BuiltinAI \u4E3A\u6D4F\u89C8\u5668\u5185\u7F6EAI\u7FFB\u8BD1\uFF0C\u76EE\u524D\u4EC5 Chrome 138 \u53CA\u4EE5\u4E0A\u7248\u672C\u5F97\u5230\u652F\u6301\u3002",en:"1. BuiltinAI is the browser's built-in AI translation, which is currently only supported by Chrome 138 and above.",zh_TW:"1.\u5176\u4E2D BuiltinAI \u70BA\u700F\u89BD\u5668\u5167\u5EFAAI\u7FFB\u8B6F\uFF0C\u76EE\u524D\u50C5 Chrome 138 \u4EE5\u4E0A\u7248\u672C\u652F\u63F4\u3002"},about_api_2:{zh:"2\u3001\u5927\u90E8\u5206AI\u63A5\u53E3\u90FD\u4E0EOpenAI\u517C\u5BB9\uFF0C\u56E0\u6B64\u9009\u62E9\u6DFB\u52A0OpenAI\u7C7B\u578B\u5373\u53EF\u3002It should be noted that Prompt has two types: batch translation and nobatch translation. Not all interfaces support batch translation.",en:"2. Most AI interfaces are compatible with OpenAI, so just choose to add the OpenAI type.",zh_TW:"2.\u5927\u90E8\u5206AI\u4ECB\u9762\u90FD\u8207OpenAI\u76F8\u5BB9\uFF0C\u56E0\u6B64\u9078\u64C7\u65B0\u589EOpenAI\u985E\u578B\u5373\u53EF\u3002\u8981\u6CE8\u610F\u7684\u662FPrompt\u5206\u805A\u5408\u7FFB\u8B6F\u548C\u975E\u805A\u5408\u7FFB\u8B6F\u5169\u7A2E\uFF0C\u4E0D\u662F\u6240\u6709\u4ECB\u9762\u90FD\u652F\u63F4\u805A\u5408\u7FFB\u8B6F\u3002"},about_api_3:{zh:"3\u3001\u6682\u672A\u5217\u51FA\u7684\u63A5\u53E3\uFF0C\u7406\u8BBA\u4E0A\u90FD\u53EF\u4EE5\u901A\u8FC7\u81EA\u5B9A\u4E49\u63A5\u53E3 (Custom) \u7684\u5F62\u5F0F\u652F\u6301\u3002",en:"3. Interfaces that have not yet been launched can theoretically be supported through custom interfaces.",zh_TW:"3\u3001\u66AB\u672A\u5217\u51FA\u7684\u4ECB\u9762\uFF0C\u7406\u8AD6\u4E0A\u90FD\u53EF\u900F\u904E\u81EA\u8A02\u4ECB\u9762 (Custom) \u7684\u5F62\u5F0F\u652F\u63F4\u3002"},about_api_proxy:{zh:"\u67E5\u770B\u81EA\u5EFA\u4E00\u4E2A\u7FFB\u8BD1\u63A5\u53E3\u4EE3\u7406",en:"Check out the self-built translation interface proxy",zh_TW:"\u67E5\u770B\u5982\u4F55\u81EA\u5EFA\u7FFB\u8B6F\u4ECB\u9762 Proxy"},setting_helper:{zh:"\u65B0\u65E7\u914D\u7F6E\u5E76\u4E0D\u517C\u5BB9\uFF0C\u5BFC\u51FA\u7684\u65E7\u7248\u914D\u7F6E\uFF0C\u52FF\u518D\u6B21\u5BFC\u5165\u3002",en:"The old and new configurations are not compatible. Do not import the exported old configuration again.",zh_TW:"\u65B0\u820A\u914D\u7F6E\u4E26\u4E0D\u76F8\u5BB9\uFF0C\u532F\u51FA\u7684\u820A\u7248\u914D\u7F6E\uFF0C\u52FF\u518D\u6B21\u532F\u5165\u3002"},style_none:{zh:"\u65E0",en:"None",zh_TW:"\u7121"},under_line:{zh:"\u4E0B\u5212\u76F4\u7EBF",en:"Underline",zh_TW:"\u4E0B\u5283\u76F4\u7DDA"},dot_line:{zh:"\u4E0B\u5212\u70B9\u72B6\u7EBF",en:"Dotted Underline",zh_TW:"\u4E0B\u5283\u9EDE\u72C0\u7DDA"},dash_line:{zh:"\u4E0B\u5212\u865A\u7EBF",en:"Dashed Underline",zh_TW:"\u4E0B\u5283\u865B\u7DDA"},dash_box:{zh:"\u865A\u7EBF\u6846",en:"Dashed Box"},dash_line_bold:{zh:"\u4E0B\u5212\u865A\u7EBF\u52A0\u7C97",en:"Dashed Underline Bold",zh_TW:"\u4E0B\u5283\u865B\u7DDA"},dash_box_bold:{zh:"\u865A\u7EBF\u6846\u52A0\u7C97",en:"Dashed Box Bold",zh_TW:"\u865B\u7DDA\u6846\u52A0\u7C97"},marker:{zh:"\u9A6C\u514B\u7B14",en:"Marker",zh_TW:"\u99AC\u514B\u7B46"},gradient_marker:{zh:"\u6E10\u53D8\u9A6C\u514B\u7B14",en:"Gradient Marker",zh_TW:"\u6F38\u5C64\u99AC\u514B\u7B46"},wavy_line:{zh:"\u4E0B\u5212\u6CE2\u6D6A\u7EBF",en:"Wavy Underline",zh_TW:"\u4E0B\u5283\u6CE2\u6D6A\u7DDA"},wavy_line_bold:{zh:"\u4E0B\u5212\u6CE2\u6D6A\u7EBF\u52A0\u7C97",en:"Wavy Underline Bold",zh_TW:"\u4E0B\u5283\u6CE2\u6D6A\u7DDA\u52A0\u7C97"},fuzzy:{zh:"\u6A21\u7CCA",en:"Fuzzy",zh_TW:"\u6A21\u7CCA"},highlight:{zh:"\u9AD8\u4EAE",en:"Highlight",zh_TW:"\u53CD\u767D\u6A19\u793A"},blockquote:{zh:"\u5F15\u7528",en:"Blockquote",zh_TW:"\u5F15\u7528"},gradient:{zh:"\u6E10\u53D8",en:"Gradient",zh_TW:"\u6F38\u8B8A"},blink:{zh:"\u95EA\u73B0",en:"Blink",zh_TW:"\u9583\u73FE"},glow:{zh:"\u53D1\u5149",en:"Glow",zh_TW:"\u767C\u5149"},colorful:{zh:"\u591A\u5F69",en:"Colorful",zh_TW:"\u591A\u5F69"},setting:{zh:"\u8BBE\u7F6E",en:"Setting",zh_TW:"\u8A2D\u5B9A"},pattern:{zh:"\u5339\u914D\u7F51\u5740",en:"URL pattern",zh_TW:"\u5339\u914D\u7DB2\u5740"},pattern_helper:{zh:"1\u3001\u652F\u6301\u661F\u53F7(*)\u901A\u914D\u7B26\u30022\u3001\u591A\u4E2AURL\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\u3002",en:"1. Supports the asterisk (*) wildcard character. 2. Separate multiple URLs with newlines or English commas \",\".",zh_TW:"1. \u652F\u63F4\u661F\u865F (*) \u842C\u7528\u5B57\u5143\u30022. \u591A\u500B URL \u8ACB\u4EE5\u63DB\u884C\u6216\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u3002"},selector_helper:{zh:"1\u3001\u9700\u8981\u7FFB\u8BD1\u7684\u76EE\u6807\u5143\u7D20\u30022\u3001\u5F00\u542F\u81EA\u52A8\u626B\u63CF\u9875\u9762\u540E\uFF0C\u672C\u8BBE\u7F6E\u65E0\u6548\u30023\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. The target element to be translated. 2. This setting is invalid when automatic page scanning is enabled. 3. Follow the CSS selector syntax.",zh_TW:"1\u3001\u9700\u8981\u7FFB\u8B6F\u7684\u76EE\u6A19\u5143\u7D20\u3002 2.\u958B\u555F\u81EA\u52D5\u6383\u63CF\u9801\u9762\u5F8C\uFF0C\u672C\u8A2D\u5B9A\u7121\u6548\u3002 3.\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},translate_switch:{zh:"\u5F00\u542F\u7FFB\u8BD1",en:"Translate Switch",zh_TW:"\u958B\u555F\u7FFB\u8B6F"},default_enabled:{zh:"\u9ED8\u8BA4\u5F00\u542F",en:"Enabled",zh_TW:"\u9810\u8A2D\u958B\u555F"},default_disabled:{zh:"\u9ED8\u8BA4\u5173\u95ED",en:"Disabled",zh_TW:"\u9810\u8A2D\u95DC\u9589"},selector:{zh:"\u9009\u62E9\u5668",en:"Selector",zh_TW:"\u9078\u64C7\u5668"},target_selector:{zh:"\u76EE\u6807\u5143\u7D20\u9009\u62E9\u5668",en:"Target element selector",zh_TW:"\u76EE\u6A19\u5143\u7D20\u9078\u64C7\u5668"},keep_selector:{zh:"\u4FDD\u7559\u5143\u7D20\u9009\u62E9\u5668",en:"Keep unchanged selector",zh_TW:"\u4FDD\u7559\u5143\u7D20\u9078\u64C7\u5668"},keep_selector_helper:{zh:"1\u3001\u76EE\u6807\u5143\u7D20\u4E0B\u9762\u9700\u8981\u539F\u6837\u4FDD\u7559\u7684\u5B50\u8282\u70B9\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. The child nodes under the target element need to remain intact. 2. Follow the CSS selector syntax.",zh_TW:"1. \u76EE\u6A19\u5143\u7D20\u4E0B\u7684\u5B50\u7BC0\u9EDE\u9700\u8981\u4FDD\u6301\u539F\u6A23\u3002 2. \u9075\u5FAA CSS \u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},root_selector:{zh:"\u6839\u8282\u70B9\u9009\u62E9\u5668",en:"Root node selector",zh_TW:"\u6839\u7BC0\u9EDE\u9078\u64C7\u5668"},root_selector_helper:{zh:"1\u3001\u7528\u4E8E\u7F29\u5C0F\u9875\u9762\u7FFB\u8BD1\u8303\u56F4\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. Used to narrow the translation scope of the page. 2. Follow the CSS selector syntax.",zh_TW:"1.\u7528\u65BC\u7E2E\u5C0F\u9801\u9762\u7FFB\u8B6F\u7BC4\u570D\u3002 2\u3001\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},ignore_selector:{zh:"\u4E0D\u7FFB\u8BD1\u8282\u70B9\u9009\u62E9\u5668",en:"Ignore node selectors",zh_TW:"\u4E0D\u7FFB\u8B6F\u7BC0\u9EDE\u9078\u64C7\u5668"},ignore_selector_helper:{zh:"1\u3001\u9700\u8981\u5FFD\u7565\u7684\u8282\u70B9\u30022\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u3002",en:"1. Nodes to be ignored. 2. Follow CSS selector syntax.",zh_TW:"1\u3001\u9700\u8981\u5FFD\u7565\u7684\u7BC0\u9EDE\u3002 2\u3001\u9075\u5FAACSS\u9078\u64C7\u5668\u8A9E\u6CD5\u3002"},terms:{zh:"\u4E13\u4E1A\u672F\u8BED",en:"Terms",zh_TW:"\u5C08\u696D\u8853\u8A9E"},terms_helper:{zh:"1\u3001\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\uFF0C\u65E0\u9700\u659C\u6746\uFF0C\u4E0D\u652F\u6301\u4FEE\u9970\u7B26\u30022\u3001\u591A\u6761\u672F\u8BED\u7528\u6362\u884C\u6216\u5206\u53F7\u201C;\u201D\u9694\u5F00\u30023\u3001\u672F\u8BED\u548C\u8BD1\u6587\u7528\u82F1\u6587\u9017\u53F7\u201C,\u201D\u9694\u5F00\u30024\u3001\u6CA1\u6709\u8BD1\u6587\u89C6\u4E3A\u4E0D\u7FFB\u8BD1\u672F\u8BED\u3002",en:"1. Supports regular expression matching, no slash required, and no modifiers are supported. 2. Separate multiple terms with newlines or semicolons \";\". 3. Terms and translations are separated by English commas \",\". 4. If there is no translation, the term will be deemed not to be translated.",zh_TW:"1. \u652F\u63F4\u6B63\u5247\u8868\u9054\u5F0F\u6BD4\u5C0D\uFF0C\u7121\u9700\u659C\u7DDA\uFF0C\u4E14\u4E0D\u652F\u63F4\u4FEE\u98FE\u7B26\u30022. \u591A\u689D\u8853\u8A9E\u4EE5\u63DB\u884C\u6216\u5206\u865F\u300C;\u300D\u5206\u9694\u30023. \u8853\u8A9E\u8207\u8B6F\u6587\u4EE5\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u30024. \u7121\u8B6F\u6587\u8005\u8996\u70BA\u4E0D\u7FFB\u8B6F\u8A72\u8853\u8A9E\u3002"},ai_terms:{zh:"AI\u4E13\u4E1A\u672F\u8BED",en:"AI Terms",zh_TW:"AI\u5C08\u696D\u8853\u8A9E"},ai_terms_helper:{zh:"1\u3001AI\u667A\u80FD\u66FF\u6362\uFF0C\u4E0D\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\u30022\u3001\u591A\u6761\u672F\u8BED\u7528\u6362\u884C\u6216\u5206\u53F7\u201C;\u201D\u9694\u5F00\u30023\u3001\u672F\u8BED\u548C\u8BD1\u6587\u7528\u82F1\u6587\u9017\u53F7\u201C,\u201D\u9694\u5F00\u30024\u3001\u6CA1\u6709\u8BD1\u6587\u89C6\u4E3A\u4E0D\u7FFB\u8BD1\u672F\u8BED\u3002",en:"1. AI intelligent replacement does not support regular expressions.2. Separate multiple terms with newlines or semicolons \";\". 3. Terms and translations are separated by English commas \",\". 4. If there is no translation, the term will be deemed not to be translated.",zh_TW:"1.AI\u667A\u80FD\u66FF\u63DB\uFF0C\u4E0D\u652F\u63F4\u6B63\u898F\u8868\u793A\u5F0F\u30022. \u591A\u689D\u8853\u8A9E\u4EE5\u63DB\u884C\u6216\u5206\u865F\u300C;\u300D\u5206\u9694\u30023. \u8853\u8A9E\u8207\u8B6F\u6587\u4EE5\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\u30024. \u7121\u8B6F\u6587\u8005\u8996\u70BA\u4E0D\u7FFB\u8B6F\u8A72\u8853\u8A9E\u3002"},text_ext_style:{zh:"\u8BD1\u6587\u9644\u52A0\u6837\u5F0F",en:"Translation additional styles",zh_TW:"\u8B6F\u6587\u9644\u52A0\u6A23\u5F0F"},selector_style:{zh:"\u9009\u62E9\u5668\u8282\u70B9\u6837\u5F0F",en:"Selector Style",zh_TW:"\u9078\u64C7\u5668\u7BC0\u9EDE\u6A23\u5F0F"},terms_style:{zh:"\u4E13\u4E1A\u672F\u8BED\u6837\u5F0F",en:"Terms Style",zh_TW:"\u5C08\u696D\u8853\u8A9E\u6A23\u5F0F"},highlight_style:{zh:"\u8BCD\u6C47\u9AD8\u4EAE\u6837\u5F0F",en:"Fav Words highlight style",zh_TW:"\u8A5E\u5F59\u9AD8\u4EAE\u6A23\u5F0F"},selector_style_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\u3002",en:"It is injected when translation is turned on.",zh_TW:"\u5728\u958B\u555F\u7FFB\u8B6F\u6642\u6CE8\u5165\u3002"},selector_parent_style:{zh:"\u9009\u62E9\u5668\u7236\u8282\u70B9\u6837\u5F0F",en:"Parent Selector Style",zh_TW:"\u9078\u64C7\u5668\u7236\u7BC0\u9EDE\u6A23\u5F0F"},selector_grand_style:{zh:"\u9009\u62E9\u5668\u7956\u8282\u70B9\u6837\u5F0F",en:"Grand Selector Style",zh_TW:"\u9078\u64C7\u5668\u7956\u7BC0\u9EDE\u6A23\u5F0F"},inject_js:{zh:"\u6CE8\u5165JS",en:"Inject JS",zh_TW:"\u6CE8\u5165 JS"},inject_js_helper:{zh:"\u9884\u52A0\u8F7D\u65F6\u6CE8\u5165\uFF0C\u4E00\u4E2A\u9875\u9762\u4EC5\u8FD0\u884C\u4E00\u6B21\u3002\u5185\u7F6E\u5168\u5C40\u5BF9\u8C61 KT: {\n apiTranslate,\n apiDectect,\n apiSetting,\n apisMap,\n toLang,\n docInfo,\n glossary,\n }",en:"Injected during preload, runs only once per page. Built-in global object KT: {\n apiTranslate,\n apiDectect,\n apiSetting,\n apisMap,\n toLang,\n docInfo,\n glossary,\n }",zh_TW:"\u9810\u5148\u8F09\u5165\u6642\u6CE8\u5165\uFF0C\u4E00\u500B\u9801\u9762\u50C5\u904B\u884C\u4E00\u6B21\u3002\u5167\u5EFA\u5168\u57DF\u7269\u4EF6 KT: {\n apiTranslate,\n apiDectect,\n apiSetting,\n apisMap,\n toLang,\n docInfo,\n glossary,\n }"},inject_css:{zh:"\u6CE8\u5165CSS",en:"Inject CSS",zh_TW:"\u6CE8\u5165 CSS"},inject_css_helper:{zh:"\u521D\u59CB\u5316\u65F6\u6CE8\u5165\u8FD0\u884C\uFF0C\u4E00\u4E2A\u9875\u9762\u4EC5\u8FD0\u884C\u4E00\u6B21\u3002",en:"Injected and run at initialization, and only run once per page.",zh_TW:"\u521D\u59CB\u5316\u6642\u6CE8\u5165\u904B\u884C\uFF0C\u4E00\u500B\u9801\u9762\u50C5\u904B\u884C\u4E00\u6B21\u3002"},fixer_function:{zh:"\u4FEE\u590D\u51FD\u6570",en:"Fixer Function",zh_TW:"\u4FEE\u5FA9\u51FD\u5F0F"},fixer_function_helper:{zh:"1\u3001br\u662F\u5C06
\u6362\u884C\u66FF\u6362\u6210

\u30022\u3001bn\u662F\u5C06\\n\u6362\u884C\u66FF\u6362\u6210

\u30023\u3001brToDiv\u548CbnToDiv\u662F\u66FF\u6362\u6210

\u3002",en:"1. br replaces
line breaks with

. 2. bn replaces \\n newline with

. 3. brToDiv and bnToDiv are replaced with

.",zh_TW:"1. br \u6703\u5C07
\u63DB\u884C\u66FF\u63DB\u70BA

\u30022. bn \u6703\u5C07 \\n \u63DB\u884C\u66FF\u63DB\u70BA

\u30023. brToDiv \u8207 bnToDiv \u6703\u66FF\u63DB\u70BA

\u3002"},import:{zh:"\u5BFC\u5165",en:"Import",zh_TW:"\u532F\u5165"},export:{zh:"\u5BFC\u51FA",en:"Export",zh_TW:"\u532F\u51FA"},export_translation:{zh:"\u5BFC\u51FA\u91CA\u4E49",en:"Export Translation",zh_TW:"\u532F\u51FA\u91CB\u7FA9"},error_cant_be_blank:{zh:"\u4E0D\u80FD\u4E3A\u7A7A",en:"Can not be blank",zh_TW:"\u4E0D\u53EF\u70BA\u7A7A"},error_duplicate_values:{zh:"\u5B58\u5728\u91CD\u590D\u7684\u503C",en:"There are duplicate values",zh_TW:"\u5B58\u5728\u91CD\u8907\u7684\u503C"},error_wrong_file_type:{zh:"\u9519\u8BEF\u7684\u6587\u4EF6\u7C7B\u578B",en:"Wrong file type",zh_TW:"\u6A94\u6848\u985E\u578B\u932F\u8AA4"},error_fetch_url:{zh:"\u8BF7\u68C0\u67E5url\u5730\u5740\u662F\u5426\u6B63\u786E\u6216\u7A0D\u540E\u518D\u8BD5\u3002",en:"Please check if the url address is correct or try again later.",zh_TW:"\u8ACB\u6AA2\u67E5 URL \u662F\u5426\u6B63\u78BA\u6216\u7A0D\u5F8C\u518D\u8A66\u3002"},deepl_api:{zh:"DeepL \u63A5\u53E3",en:"DeepL API",zh_TW:"DeepL \u4ECB\u9762"},deepl_key:{zh:"DeepL \u5BC6\u94A5",en:"DeepL Key",zh_TW:"DeepL \u91D1\u9470"},openai_api:{zh:"OpenAI \u63A5\u53E3",en:"OpenAI API",zh_TW:"OpenAI \u4ECB\u9762"},openai_key:{zh:"OpenAI \u5BC6\u94A5",en:"OpenAI Key",zh_TW:"OpenAI \u91D1\u9470"},openai_model:{zh:"OpenAI \u6A21\u578B",en:"OpenAI Model",zh_TW:"OpenAI \u6A21\u578B"},openai_prompt:{zh:"OpenAI \u63D0\u793A\u8BCD",en:"OpenAI Prompt",zh_TW:"OpenAI \u63D0\u793A\u8A5E"},if_clear_cache:{zh:"\u662F\u5426\u6E05\u9664\u7F13\u5B58\uFF08\u9ED8\u8BA4\u7F13\u5B587\u5929\uFF09",en:"Whether clear cache (Default cache is 7 days)",zh_TW:"\u662F\u5426\u6E05\u9664\u5FEB\u53D6\uFF08\u9810\u8A2D\u5FEB\u53D67\u5929\uFF09"},clear_cache_never:{zh:"\u4E0D\u6E05\u9664\u7F13\u5B58",en:"Never clear cache",zh_TW:"\u4E0D\u6E05\u9664\u5FEB\u53D6"},clear_cache_restart:{zh:"\u91CD\u542F\u6D4F\u89C8\u5668\u65F6\u6E05\u9664\u7F13\u5B58",en:"Clear cache when restarting browser",zh_TW:"\u91CD\u65B0\u555F\u52D5\u700F\u89BD\u5668\u6642\u6E05\u9664\u5FEB\u53D6"},data_sync_type:{zh:"\u6570\u636E\u540C\u6B65\u65B9\u5F0F",en:"Data Sync Type",zh_TW:"\u8CC7\u6599\u540C\u6B65\u65B9\u5F0F"},data_sync_url:{zh:"\u6570\u636E\u540C\u6B65\u63A5\u53E3",en:"Data Sync API",zh_TW:"\u8CC7\u6599\u540C\u6B65\u4ECB\u9762"},data_sync_user:{zh:"\u6570\u636E\u540C\u6B65\u8D26\u6237",en:"Data Sync User",zh_TW:"\u8CC7\u6599\u540C\u6B65\u5E33\u865F"},data_sync_key:{zh:"\u6570\u636E\u540C\u6B65\u5BC6\u94A5",en:"Data Sync Key",zh_TW:"\u8CC7\u6599\u540C\u6B65\u91D1\u9470"},sync_now:{zh:"\u7ACB\u5373\u540C\u6B65",en:"Sync Now",zh_TW:"\u7ACB\u5373\u540C\u6B65"},sync_success:{zh:"\u540C\u6B65\u6210\u529F\uFF01",en:"Sync Success",zh_TW:"\u540C\u6B65\u6210\u529F\uFF01"},sync_failed:{zh:"\u540C\u6B65\u5931\u8D25\uFF01",en:"Sync Error",zh_TW:"\u540C\u6B65\u5931\u6557\uFF01"},error_got_some_wrong:{zh:"\u62B1\u6B49\uFF0C\u51FA\u9519\u4E86\uFF01",en:"Sorry, something went wrong!",zh_TW:"\u62B1\u6B49\uFF0C\u767C\u751F\u932F\u8AA4\uFF01"},error_sync_setting:{zh:"\u60A8\u7684\u540C\u6B65\u7C7B\u578B\u5FC5\u987B\u4E3A\u201CKISS-Worker\u201D\uFF0C\u4E14\u9700\u586B\u5199\u5B8C\u6574",en:"Your sync type must be \"KISS-Worker\" and must be filled in completely",zh_TW:"\u60A8\u7684\u540C\u6B65\u578B\u614B\u5FC5\u9808\u70BA\u300CKISS-Worker\u300D\uFF0C\u4E14\u9700\u586B\u5BEB\u5B8C\u6574\u3002"},click_test:{zh:"\u70B9\u51FB\u6D4B\u8BD5",en:"Click Test",zh_TW:"\u9EDE\u64CA\u6E2C\u8A66"},test_success:{zh:"\u6D4B\u8BD5\u6210\u529F",en:"Test success",zh_TW:"\u6E2C\u8A66\u6210\u529F"},test_failed:{zh:"\u6D4B\u8BD5\u5931\u8D25",en:"Test failed",zh_TW:"\u6E2C\u8A66\u5931\u6557"},clear_all_cache_now:{zh:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u7F13\u5B58",en:"Clear all cache now",zh_TW:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u5FEB\u53D6"},clear_cache:{zh:"\u6E05\u9664\u7F13\u5B58",en:"Clear Cache",zh_TW:"\u6E05\u9664\u5FEB\u53D6"},clear_success:{zh:"\u6E05\u9664\u6210\u529F",en:"Clear success",zh_TW:"\u6E05\u9664\u6210\u529F"},clear_failed:{zh:"\u6E05\u9664\u5931\u8D25",en:"Clear failed",zh_TW:"\u6E05\u9664\u5931\u6557"},share:{zh:"\u5206\u4EAB",en:"Share",zh_TW:"\u5206\u4EAB"},clear_all:{zh:"\u6E05\u7A7A",en:"Clear All",zh_TW:"\u6E05\u7A7A"},help:{zh:"\u6C42\u52A9",en:"Help",zh_TW:"\u6C42\u52A9"},restore_default:{zh:"\u6062\u590D\u9ED8\u8BA4",en:"Restore Default",zh_TW:"\u6062\u5FA9\u9810\u8A2D"},shortcuts_setting:{zh:"\u5FEB\u6377\u952E\u8BBE\u7F6E",en:"Shortcuts Setting",zh_TW:"\u5FEB\u6377\u9375\u8A2D\u5B9A"},toggle_translate_shortcut:{zh:"\"\u5F00\u542F\u7FFB\u8BD1\"\u5FEB\u6377\u952E",en:"\"Toggle Translate\" Shortcut",zh_TW:"\u300C\u958B\u555F\u7FFB\u8B6F\u300D\u5FEB\u6377\u9375"},toggle_style_shortcut:{zh:"\"\u5207\u6362\u6837\u5F0F\"\u5FEB\u6377\u952E",en:"\"Toggle Style\" Shortcut",zh_TW:"\u300C\u5207\u63DB\u6A23\u5F0F\u300D\u5FEB\u6377\u9375"},toggle_popup_shortcut:{zh:"\"\u6253\u5F00\u5F39\u7A97\"\u5FEB\u6377\u952E",en:"\"Open Popup\" Shortcut",zh_TW:"\u300C\u958B\u555F\u5F48\u7A97\u300D\u5FEB\u6377\u9375"},open_setting_shortcut:{zh:"\"\u6253\u5F00\u8BBE\u7F6E\"\u5FEB\u6377\u952E",en:"\"Open Setting\" Shortcut",zh_TW:"\u300C\u958B\u555F\u8A2D\u5B9A\u300D\u5FEB\u6377\u9375"},hide_fab_button:{zh:"\u9690\u85CF\u60AC\u6D6E\u6309\u94AE",en:"Hide Fab Button",zh_TW:"\u96B1\u85CF\u61F8\u6D6E\u6309\u9215"},fab_click_action:{zh:"\u5355\u51FB\u60AC\u6D6E\u6309\u94AE\u52A8\u4F5C",en:"Single Click Fab Action",zh_TW:"\u55AE\u64CA\u61F8\u6D6E\u6309\u94AE\u52D5\u4F5C"},fab_click_menu:{zh:"\u5F39\u51FA\u83DC\u5355",en:"Popup Menu",zh_TW:"\u5F48\u51FA\u9078\u55AE"},fab_click_translate:{zh:"\u76F4\u63A5\u7FFB\u8BD1",en:"Translate",zh_TW:"\u76F4\u63A5\u7FFB\u8B6F"},hide_tran_button:{zh:"\u9690\u85CF\u7FFB\u8BD1\u6309\u94AE",en:"Hide Translate Button",zh_TW:"\u96B1\u85CF\u7FFB\u8B6F\u6309\u9215"},hide_click_away:{zh:"\u70B9\u51FB\u5916\u90E8\u5173\u95ED\u5F39\u7A97",en:"Click outside to close the pop-up window",zh_TW:"\u9EDE\u64CA\u5916\u90E8\u95DC\u9589\u5F48\u7A97"},use_simple_style:{zh:"\u4F7F\u7528\u7B80\u6D01\u754C\u9762",en:"Use a simple interface",zh_TW:"\u4F7F\u7528\u7C21\u6F54\u4ECB\u9762"},show:{zh:"\u663E\u793A",en:"Show",zh_TW:"\u986F\u793A"},hide:{zh:"\u9690\u85CF",en:"Hide",zh_TW:"\u96B1\u85CF"},save_rule:{zh:"\u4FDD\u5B58\u89C4\u5219",en:"Save Rule",zh_TW:"\u5132\u5B58\u898F\u5247"},global_rule:{zh:"\u5168\u5C40\u89C4\u5219",en:"Global Rule",zh_TW:"\u5168\u57DF\u898F\u5247"},input_translate:{zh:"\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation",zh_TW:"\u8F38\u5165\u6846\u7FFB\u8B6F"},use_input_box_translation:{zh:"\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation",zh_TW:"\u555F\u7528\u8F38\u5165\u6846\u7FFB\u8B6F"},input_selector:{zh:"\u8F93\u5165\u6846\u9009\u62E9\u5668",en:"Input Selector",zh_TW:"\u8F38\u5165\u6846\u9078\u64C7\u5668"},input_selector_helper:{zh:"\u7528\u4E8E\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",en:"Used for input box translation.",zh_TW:"\u7528\u65BC\u8F38\u5165\u6846\u7FFB\u8B6F\u3002"},trigger_trans_shortcut:{zh:"\u89E6\u53D1\u7FFB\u8BD1\u5FEB\u6377\u952E",en:"Trigger Translation Shortcut Keys",zh_TW:"\u89F8\u767C\u7FFB\u8B6F\u5FEB\u6377\u9375"},trigger_trans_shortcut_help:{zh:"\u9ED8\u8BA4\u4E3A\u5355\u51FB\u201CAltLeft+KeyI\u201D",en:"Default is \"AltLeft+KeyI\"",zh_TW:"\u9810\u8A2D\u70BA\u6309\u4E0B\u300CAltLeft+KeyI\u300D"},shortcut_press_count:{zh:"\u5FEB\u6377\u952E\u8FDE\u51FB\u6B21\u6570",en:"Shortcut Press Number",zh_TW:"\u5FEB\u6377\u9375\u9023\u64CA\u6B21\u6578"},combo_timeout:{zh:"\u8FDE\u51FB\u8D85\u65F6\u65F6\u95F4 (10-1000ms)",en:"Combo Timeout (10-1000ms)",zh_TW:"\u9023\u64CA\u903E\u6642 (10-1000ms)"},input_trans_start_sign:{zh:"\u7FFB\u8BD1\u8D77\u59CB\u6807\u8BC6",en:"Translation Start Sign",zh_TW:"\u7FFB\u8B6F\u8D77\u59CB\u6A19\u8A18"},input_trans_start_sign_help:{zh:"\u6807\u8BC6\u540E\u9762\u53EF\u4EE5\u52A0\u76EE\u6807\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1A \u201C/en \u4F60\u597D\u201D\u3001\u201C/zh hello\u201D",en:"The target language code can be added after the sign, such as: \"/en \u4F60\u597D\", \"/zh hello\"",zh_TW:"\u6A19\u8A18\u5F8C\u53EF\u52A0\u4E0A\u76EE\u6A19\u8A9E\u8A00\u4EE3\u78BC\uFF0C\u4F8B\u5982\uFF1A\u300C/en \u4F60\u597D\u300D\u3001\u300C/zh hello\u300D"},detect_lang_remote:{zh:"\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B",en:"Remote language detection",zh_TW:"\u9060\u7AEF\u8A9E\u8A00\u5075\u6E2C"},detect_lang_remote_help:{zh:"\u542F\u7528\u540E\u68C0\u6D4B\u51C6\u786E\u5EA6\u589E\u52A0\uFF0C\u4F46\u4F1A\u964D\u4F4E\u7FFB\u8BD1\u901F\u5EA6\uFF0C\u8BF7\u914C\u60C5\u5F00\u542F",en:"After enabling, the detection accuracy will increase, but it will reduce the translation speed. Please enable it as appropriate.",zh_TW:"\u555F\u7528\u5F8C\u53EF\u63D0\u5347\u5075\u6E2C\u6E96\u78BA\u5EA6\uFF0C\u4F46\u6703\u964D\u4F4E\u7FFB\u8B6F\u901F\u5EA6\uFF0C\u8ACB\u8996\u9700\u8981\u958B\u555F\u3002"},detect_lang_service:{zh:"\u8BED\u8A00\u68C0\u6D4B\u670D\u52A1",en:"Language detect service",zh_TW:"\u8A9E\u8A00\u6AA2\u6E2C\u670D\u52D9"},disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},enable:{zh:"\u542F\u7528",en:"Enable",zh_TW:"\u555F\u7528"},selection_translate:{zh:"\u5212\u8BCD\u7FFB\u8BD1",en:"Selection Translation",zh_TW:"\u5283\u8A5E\u7FFB\u8B6F"},toggle_selection_translate:{zh:"\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"Use Selection Translate",zh_TW:"\u555F\u7528\u5283\u8A5E\u7FFB\u8B6F"},trigger_tranbox_shortcut:{zh:"\u663E\u793A\u7FFB\u8BD1\u6846/\u7FFB\u8BD1\u9009\u4E2D\u6587\u5B57\u5FEB\u6377\u952E",en:"Open Translate Popup/Translate Selected Shortcut",zh_TW:"\u986F\u793A\u7FFB\u8B6F\u6846\uFF0F\u7FFB\u8B6F\u9078\u4E2D\u6587\u5B57\u5FEB\u6377\u9375"},tranbtn_offset_x:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBX\uFF08\xB1200\uFF09",en:"Translate Button Offset X (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6309\u9215\u4F4D\u79FB X\uFF08\xB1200\uFF09"},tranbtn_offset_y:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBY\uFF08\xB1200\uFF09",en:"Translate Button Offset Y (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6309\u9215\u4F4D\u79FB Y\uFF08\xB1200\uFF09"},tranbox_offset_x:{zh:"\u7FFB\u8BD1\u6846\u504F\u79FBX\uFF08\xB1200\uFF09",en:"Translate Box Offset X (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6846\u4F4D\u79FB X\uFF08\xB1200\uFF09"},tranbox_offset_y:{zh:"\u7FFB\u8BD1\u6846\u504F\u79FBY\uFF08\xB1200\uFF09",en:"Translate Box Offset Y (\xB1200)",zh_TW:"\u7FFB\u8B6F\u6846\u4F4D\u79FB Y\uFF08\xB1200\uFF09"},translated_text:{zh:"\u8BD1\u6587",en:"Translated Text",zh_TW:"\u8B6F\u6587"},original_text:{zh:"\u539F\u6587",en:"Original Text",zh_TW:"\u539F\u6587"},favorite_words:{zh:"\u6536\u85CF\u8BCD\u6C47",en:"Favorite Words",zh_TW:"\u6536\u85CF\u8A5E\u5F59"},touch_setting:{zh:"\u89E6\u5C4F\u8BBE\u7F6E",en:"Touch Setting",zh_TW:"\u89F8\u63A7\u8A2D\u5B9A"},touch_translate_shortcut:{zh:"\u89E6\u5C4F\u7FFB\u8BD1\u5FEB\u6377\u65B9\u5F0F (\u652F\u6301\u591A\u9009)",en:"Touch Translate Shortcut (multiple supported)",zh_TW:"\u89F8\u63A7\u7FFB\u8B6F\u6377\u5F91 (\u652F\u63F4\u591A\u9078)"},touch_tap_0:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},touch_tap_2:{zh:"\u53CC\u6307\u8F7B\u89E6",en:"Two finger tap",zh_TW:"\u96D9\u6307\u8F15\u89F8"},touch_tap_3:{zh:"\u4E09\u6307\u8F7B\u89E6",en:"Three finger tap",zh_TW:"\u4E09\u6307\u8F15\u89F8"},touch_tap_4:{zh:"\u56DB\u6307\u8F7B\u89E6",en:"Four finger tap",zh_TW:"\u56DB\u6307\u8F15\u89F8"},touch_tap_5:{zh:"\u5355\u6307\u53CC\u51FB",en:"Double-click",zh_TW:"\u55AE\u6307\u96D9\u64CA"},touch_tap_6:{zh:"\u5355\u6307\u4E09\u51FB",en:"Triple-click",zh_TW:"\u55AE\u6307\u4E09\u64CA"},touch_tap_7:{zh:"\u53CC\u6307\u53CC\u51FB",en:"Two-finger double-click",zh_TW:"\u96D9\u6307\u96D9\u64CA"},translate_blacklist:{zh:"\u7981\u7528\u7FFB\u8BD1\u540D\u5355",en:"Translate Blacklist",zh_TW:"\u505C\u7528\u7FFB\u8B6F\u540D\u55AE"},disabled_orilist:{zh:"\u7981\u7528Origin\u540D\u5355",en:"Disabled Origin List",zh_TW:"\u505C\u7528 Origin \u540D\u55AE"},disabled_csplist:{zh:"\u7981\u7528CSP\u540D\u5355",en:"Disabled CSP List",zh_TW:"\u505C\u7528 CSP \u540D\u55AE"},disabled_csplist_helper:{zh:"3\u3001\u901A\u8FC7\u8C03\u6574CSP\u7B56\u7565\uFF0C\u4F7F\u5F97\u67D0\u4E9B\u9875\u9762\u80FD\u591F\u6CE8\u5165JS/CSS/Media\uFF0C\u8BF7\u8C28\u614E\u4F7F\u7528\uFF0C\u9664\u975E\u60A8\u5DF2\u77E5\u6653\u76F8\u5173\u98CE\u9669\u3002",en:"3. By adjusting the CSP policy, some pages can inject JS/CSS/Media. Please use it with caution unless you are aware of the related risks.",zh_TW:"3. \u900F\u904E\u8ABF\u6574 CSP \u653F\u7B56\uFF0C\u4F7F\u90E8\u5206\u9801\u9762\u53EF\u6CE8\u5165 JS/CSS/Media\u3002\u8ACB\u8B39\u614E\u4F7F\u7528\uFF0C\u9664\u975E\u60A8\u5DF2\u77E5\u6089\u76F8\u95DC\u98A8\u96AA\u3002"},skip_langs:{zh:"\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",en:"Disable Languages",zh_TW:"\u4E0D\u7FFB\u8B6F\u7684\u8A9E\u8A00"},skip_langs_helper:{zh:"\u6B64\u529F\u80FD\u4F9D\u8D56\u51C6\u786E\u7684\u8BED\u8A00\u68C0\u6D4B\uFF0C\u5EFA\u8BAE\u542F\u7528\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B\u3002",en:"This feature relies on accurate language detection. It is recommended to enable remote language detection.",zh_TW:"\u6B64\u529F\u80FD\u4EF0\u8CF4\u6E96\u78BA\u7684\u8A9E\u8A00\u5075\u6E2C\uFF0C\u5EFA\u8B70\u555F\u7528\u9060\u7AEF\u8A9E\u8A00\u5075\u6E2C\u3002"},context_menus:{zh:"\u53F3\u952E\u83DC\u5355",en:"Context Menus",zh_TW:"\u53F3\u9375\u9078\u55AE"},hide_context_menus:{zh:"\u9690\u85CF\u53F3\u952E\u83DC\u5355",en:"Hide Context Menus",zh_TW:"\u96B1\u85CF\u53F3\u9375\u9078\u55AE"},simple_context_menus:{zh:"\u7B80\u5355\u53F3\u952E\u83DC\u5355",en:"Simple_context_menus Context Menus",zh_TW:"\u7C21\u6613\u53F3\u9375\u9078\u55AE"},secondary_context_menus:{zh:"\u4E8C\u7EA7\u53F3\u952E\u83DC\u5355",en:"Secondary Context Menus",zh_TW:"\u6B21\u7D1A\u53F3\u9375\u9078\u55AE"},mulkeys_help:{zh:"\u652F\u6301\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\uFF0C\u8F6E\u8BE2\u8C03\u7528\u3002",en:"Supports polling calls separated by newlines or English commas \",\".",zh_TW:"\u652F\u63F4\u4EE5\u63DB\u884C\u6216\u82F1\u6587\u9017\u865F\u300C,\u300D\u5206\u9694\uFF0C\u8F2A\u8A62\u547C\u53EB\u3002"},translation_element_tag:{zh:"\u8BD1\u6587\u5143\u7D20\u6807\u7B7E",en:"Translation Element Tag",zh_TW:"\u8B6F\u6587\u5143\u7D20\u6A19\u7C64"},show_only_translations:{zh:"\u4EC5\u663E\u793A\u8BD1\u6587",en:"Show Only Translations",zh_TW:"\u50C5\u986F\u793A\u8B6F\u6587"},show_only_translations_help:{zh:"\u975E\u5B8C\u7F8E\u5B9E\u73B0\uFF0C\u67D0\u4E9B\u9875\u9762\u53EF\u80FD\u6709\u6837\u5F0F\u7B49\u95EE\u9898\u3002",en:"It is not a perfect implementation and some pages may have style issues.",zh_TW:"\u6B64\u70BA\u975E\u5B8C\u7F8E\u5BE6\u4F5C\uFF0C\u90E8\u5206\u9801\u9762\u53EF\u80FD\u51FA\u73FE\u6A23\u5F0F\u7B49\u554F\u984C\u3002"},translate_page_title:{zh:"\u662F\u5426\u7FFB\u8BD1\u9875\u9762\u6807\u9898",en:"Translate Page Title",zh_TW:"\u662F\u5426\u7FFB\u8B6F\u9801\u9762\u6A19\u984C"},more:{zh:"\u66F4\u591A",en:"More",zh_TW:"\u66F4\u591A"},less:{zh:"\u66F4\u5C11",en:"Less",zh_TW:"\u66F4\u5C11"},fixer_selector:{zh:"\u7F51\u9875\u4FEE\u590D\u9009\u62E9\u5668",en:"Fixer Selector",zh_TW:"\u7DB2\u9801\u4FEE\u5FA9\u9078\u64C7\u5668"},reg_niutrans:{zh:"\u83B7\u53D6\u5C0F\u725B\u7FFB\u8BD1\u5BC6\u94A5\u3010\u7B80\u7EA6\u7FFB\u8BD1\u4E13\u5C5E\u65B0\u7528\u6237\u6CE8\u518C\u8D60\u9001300\u4E07\u5B57\u7B26\u3011",en:"Get NiuTrans APIKey [KISS Translator Exclusive New User Registration Free 3 Million Characters]",zh_TW:"\u53D6\u5F97\u5C0F\u725B\u7FFB\u8B6F\u91D1\u9470\u3010\u7C21\u7D04\u7FFB\u8B6F\u5C08\u5C6C\u65B0\u7528\u6236\u8A3B\u518A\u8D08\u9001 300 \u842C\u5B57\u5143\u3011"},trigger_mode:{zh:"\u89E6\u53D1\u65B9\u5F0F",en:"Trigger Mode",zh_TW:"\u89F8\u767C\u65B9\u5F0F"},trigger_click:{zh:"\u70B9\u51FB\u89E6\u53D1",en:"Click Trigger",zh_TW:"\u9EDE\u64CA\u89F8\u767C"},trigger_hover:{zh:"\u9F20\u6807\u60AC\u505C\u89E6\u53D1",en:"Hover Trigger",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u89F8\u767C"},trigger_select:{zh:"\u9009\u4E2D\u89E6\u53D1",en:"Select Trigger",zh_TW:"\u9078\u53D6\u89F8\u767C"},extend_styles:{zh:"\u9644\u52A0\u6837\u5F0F",en:"Extend Styles",zh_TW:"\u9644\u52A0\u6A23\u5F0F"},custom_option:{zh:"\u81EA\u5B9A\u4E49\u9009\u9879",en:"Custom Option",zh_TW:"\u81EA\u8A02\u9078\u9805"},translate_selected_text:{zh:"\u7FFB\u8BD1\u9009\u4E2D\u6587\u5B57",en:"Translate Selected Text",zh_TW:"\u7FFB\u8B6F\u9078\u53D6\u6587\u5B57"},toggle_style:{zh:"\u5207\u6362\u6837\u5F0F",en:"Toggle Style",zh_TW:"\u5207\u63DB\u6A23\u5F0F"},open_menu:{zh:"\u6253\u5F00\u5F39\u7A97\u83DC\u5355",en:"Open Popup Menu",zh_TW:"\u958B\u555F\u5F48\u7A97\u9078\u55AE"},open_setting:{zh:"\u6253\u5F00\u8BBE\u7F6E",en:"Open Setting",zh_TW:"\u958B\u555F\u8A2D\u5B9A"},follow_selection:{zh:"\u7FFB\u8BD1\u6846\u8DDF\u968F\u9009\u4E2D\u6587\u672C",en:"Transbox Follow Selection",zh_TW:"\u7FFB\u8B6F\u6846\u8DDF\u96A8\u9078\u53D6\u6587\u5B57"},tranbox_auto_height:{zh:"\u7FFB\u8BD1\u6846\u81EA\u9002\u5E94\u9AD8\u5EA6",en:"Translation box adaptive height",zh_TW:"\u7FFB\u8B6F\u6846\u81EA\u9069\u61C9\u9AD8\u5EA6"},translate_start_hook:{zh:"\u7FFB\u8BD1\u5F00\u59CB\u94A9\u5B50\u51FD\u6570",en:"Translate Start Hook",zh_TW:"\u7FFB\u8B6F\u958B\u59CB Hook"},translate_start_hook_helper:{zh:"\u7FFB\u8BD1\u524D\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}",en:"Run before translation, input parameters are: {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}",zh_TW:"\u7FFB\u8B6F\u524D\u6642\u904B\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}"},translate_end_hook:{zh:"\u7FFB\u8BD1\u5B8C\u6210\u94A9\u5B50\u51FD\u6570",en:"Translate End Hook",zh_TW:"\u7FFB\u8B6F\u5B8C\u6210 Hook"},translate_end_hook_helper:{zh:"\u7FFB\u8BD1\u5B8C\u6210\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A ({hostNode, parentNode, nodes, wrapperNode, innerNode})",en:"Run when translation is complete, input parameters are: ({hostNode, parentNode, nodes, wrapperNode, innerNode})",zh_TW:"\u7FFB\u8B6F\u5B8C\u6210\u6642\u904B\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A ({hostNode, parentNode, nodes, wrapperNode, innerNode})"},translate_remove_hook:{zh:"\u7FFB\u8BD1\u79FB\u9664\u94A9\u5B50\u51FD\u6570",en:"Translate Removed Hook",zh_TW:"\u7FFB\u8B6F\u79FB\u9664 Hook"},translate_remove_hook_helper:{zh:"\u7FFB\u8BD1\u79FB\u9664\u65F6\u8FD0\u884C\uFF0C\u5165\u53C2\u4E3A\uFF1A \u7FFB\u8BD1\u8282\u70B9\u3002",en:"Run when translation is removed, the input parameters are: translation node.",zh_TW:"\u79FB\u9664\u7FFB\u8B6F\u6642\u57F7\u884C\uFF0C\u5165\u53C3\u70BA\uFF1A\u7FFB\u8B6F\u7BC0\u9EDE\u3002"},english_dict:{zh:"\u82F1\u6587\u8BCD\u5178",en:"English Dictionary",zh_TW:"\u82F1\u6587\u5B57\u5178"},english_suggest:{zh:"\u82F1\u6587\u5EFA\u8BAE",en:"English Suggest",zh_TW:"\u82F1\u6587\u5EFA\u8B70"},api_name:{zh:"\u63A5\u53E3\u540D\u79F0",en:"API Name",zh_TW:"\u4ECB\u9762\u540D\u7A31"},is_disabled:{zh:"\u662F\u5426\u7981\u7528",en:"Is Disabled",zh_TW:"\u662F\u5426\u505C\u7528"},translate_selected:{zh:"\u662F\u5426\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"If translate selected",zh_TW:"\u662F\u5426\u555F\u7528\u5283\u8A5E\u7FFB\u8B6F"},use_batch_fetch:{zh:"\u662F\u5426\u805A\u5408\u53D1\u9001\u7FFB\u8BD1\u8BF7\u6C42",en:"Whether to aggregate and send translation requests",zh_TW:"\u662F\u5426\u805A\u5408\u767C\u9001\u7FFB\u8B6F\u8ACB\u6C42"},batch_interval:{zh:"\u805A\u5408\u8BF7\u6C42\u7B49\u5F85\u65F6\u95F4(100-10000)",en:"Aggregation request waiting time (100-10000)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u7B49\u5F85\u6642\u9593(100-10000)"},batch_size:{zh:"\u805A\u5408\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570(1-100)",en:"Maximum number of paragraphs in an aggregation request (1-100)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u6700\u5927\u6BB5\u843D\u6578(1-100)"},batch_length:{zh:"\u805A\u5408\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6(1000-100000)",en:"Maximum text length for aggregation requests (1000-100000)",zh_TW:"\u805A\u5408\u8ACB\u6C42\u6700\u5927\u6587\u5B57\u9577\u5EA6(1000-100000)"},use_context:{zh:"\u662F\u5426\u542F\u7528\u667A\u80FD\u4E0A\u4E0B\u6587",en:"Whether to enable AI context",zh_TW:"\u662F\u5426\u555F\u7528\u667A\u6167\u4E0A\u4E0B\u6587"},context_size:{zh:"\u4E0A\u4E0B\u6587\u4F1A\u8BDD\u6570\u91CF(1-20)",en:"Number of context sessions(1-20)",zh_TW:"\u4E0A\u4E0B\u6587\u6703\u8A71\u6578\u91CF(1-20)"},auto_scan_page:{zh:"\u81EA\u52A8\u626B\u63CF\u9875\u9762",en:"Auto scan page",zh_TW:"\u81EA\u52D5\u6383\u63CF\u9801\u9762"},has_rich_text:{zh:"\u542F\u7528\u5BCC\u6587\u672C\u7FFB\u8BD1",en:"Enable rich text translation",zh_TW:"\u555F\u7528\u5BCC\u6587\u672C\u7FFB\u8B6F"},has_shadowroot:{zh:"\u626B\u63CFShadowroot",en:"Scan Shadowroot",zh_TW:"\u6383\u63CFShadowroot"},mousehover_translate:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover Translation",zh_TW:"\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},use_mousehover_translation:{zh:"\u542F\u7528\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Enable mouseover translation",zh_TW:"\u555F\u7528\u6ED1\u9F20\u61F8\u505C\u7FFB\u8B6F"},selected_translation_alert:{zh:"\u5212\u8BCD\u7FFB\u8BD1\u7684\u5F00\u542F\u548C\u5173\u95ED\u8BF7\u5230\u201C\u89C4\u5219\u8BBE\u7F6E\u201D\u91CC\u9762\u8BBE\u7F6E\u3002",en:"To turn selected translation on or off, please go to \"Rule Settings\".",zh_TW:"\u5283\u8A5E\u7FFB\u8B6F\u7684\u958B\u555F\u548C\u95DC\u9589\u8ACB\u5230\u300C\u898F\u5247\u8A2D\u5B9A\u300D\u88E1\u9762\u8A2D\u5B9A\u3002"},mousehover_key_help:{zh:"\u5F53\u5FEB\u6377\u952E\u7F6E\u7A7A\u65F6\u8868\u793A\u9F20\u6807\u60AC\u505C\u76F4\u63A5\u7FFB\u8BD1",en:"When the shortcut key is empty, it means that the mouse hovers to translate directly",zh_TW:"\u7576\u5FEB\u6377\u9375\u7F6E\u7A7A\u6642\u8868\u793A\u6ED1\u9F20\u61F8\u505C\u76F4\u63A5\u7FFB\u8B6F"},autoscan_alt:{zh:"\u81EA\u52A8\u626B\u63CF",en:"Auto Scan",zh_TW:"\u81EA\u52D5\u6383\u63CF"},shadowroot_alt:{zh:"ShadowRoot",en:"ShadowRoot",zh_TW:"ShadowRoot"},richtext_alt:{zh:"\u4FDD\u7559\u5BCC\u6587\u672C",en:"Rich Text",zh_TW:"\u4FDD\u7559\u5BCC\u6587\u672C"},transonly_alt:{zh:"\u9690\u85CF\u539F\u6587",en:"Hide Original",zh_TW:"\u96B1\u85CF\u539F\u6587"},confirm_title:{zh:"\u786E\u8BA4",en:"Confirm",zh_TW:"\u78BA\u8A8D"},confirm_message:{zh:"\u786E\u5B9A\u64CD\u4F5C\u5417\uFF1F",en:"Are you sure you want to proceed?",zh_TW:"\u78BA\u5B9A\u64CD\u4F5C\u55CE\uFF1F"},confirm_action:{zh:"\u786E\u5B9A",en:"Confirm",zh_TW:"\u78BA\u5B9A"},cancel_action:{zh:"\u53D6\u6D88",en:"Cancel",zh_TW:"\u53D6\u6D88"},pls_press_shortcut:{zh:"\u8BF7\u6309\u4E0B\u5FEB\u6377\u952E\u7EC4\u5408",en:"Please press the shortcut key combination",zh_TW:"\u8ACB\u6309\u4E0B\u5FEB\u901F\u9375\u7D44\u5408"},load_setting_err:{zh:"\u6570\u636E\u52A0\u8F7D\u51FA\u9519\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u6216\u5378\u8F7D\u540E\u91CD\u65B0\u5B89\u88C5\u3002",en:"Please press the shortcut key combination",zh_TW:"\u8ACB\u6309\u4E0B\u5FEB\u901F\u9375\u7D44\u5408"},translation_style:{zh:"\u7FFB\u8BD1\u98CE\u683C",en:"Translation style",zh_TW:"\u7FFB\u8B6F\u98A8\u683C"},placeholder:{zh:"\u5360\u4F4D\u7B26",en:"Placeholder",zh_TW:"\u4F54\u4F4D\u7B26"},tag_name:{zh:"\u5360\u4F4D\u6807\u7B7E\u540D",en:"Placeholder tag name",zh_TW:"\u4F54\u4F4D\u6A19\u540D"},system_prompt_helper:{zh:"\u5728\u672A\u5B8C\u5168\u7406\u89E3\u9ED8\u8BA4Prompt\u7684\u60C5\u51B5\u4E0B\uFF0C\u8BF7\u52FF\u968F\u610F\u4FEE\u6539\uFF0C\u5426\u5219\u53EF\u80FD\u65E0\u6CD5\u5DE5\u4F5C\u3002",en:"Do not modify the default prompt without fully understanding it, otherwise it may not work.",zh_TW:"\u5728\u672A\u5B8C\u5168\u7406\u89E3\u9810\u8A2DPrompt\u7684\u60C5\u6CC1\u4E0B\uFF0C\u8ACB\u52FF\u96A8\u610F\u4FEE\u6539\uFF0C\u5426\u5247\u53EF\u80FD\u7121\u6CD5\u904B\u4F5C\u3002"},if_pre_init:{zh:"\u662F\u5426\u9884\u521D\u59CB\u5316",en:"Whether to pre-initialize",zh_TW:"\u662F\u5426\u9810\u521D\u59CB\u5316"},export_old:{zh:"\u5BFC\u51FA\u65E7\u7248",en:"Export old version",zh_TW:"\u532F\u51FA\u820A\u7248"},favorite_words_helper:{zh:"\u5BFC\u5165\u8BCD\u6C47\u8BF7\u4F7F\u7528txt\u6587\u4EF6\uFF0C\u6BCF\u4E00\u884C\u4E00\u4E2A\u5355\u8BCD\u3002",en:"To import vocabulary, please use a txt file with one word per line.",zh_TW:"\u532F\u5165\u8A5E\u5F59\u8ACB\u4F7F\u7528txt\u6587\u4EF6\uFF0C\u6BCF\u4E00\u884C\u4E00\u500B\u55AE\u5B57\u3002"},btn_tip_click_away:{zh:"\u5931\u7126\u9690\u85CF/\u663E\u793A",en:"Loss of focus hide/show",zh_TW:"\u5931\u7126\u96B1\u85CF/\u986F\u793A"},btn_tip_follow_selection:{zh:"\u8DDF\u968F/\u56FA\u5B9A\u6A21\u5F0F",en:"Follow/Fixed Mode",zh_TW:"\u8DDF\u96A8/\u56FA\u5B9A\u6A21\u5F0F"},btn_tip_simple_style:{zh:"\u8FF7\u4F60/\u5E38\u89C4\u6A21\u5F0F",en:"Mini/Regular Mode",zh_TW:"\u8FF7\u4F60/\u5E38\u898F\u6A21\u5F0F"},api_placeholder:{zh:"\u5360\u4F4D\u7B26",en:"Placeholder",zh_TW:"\u4F54\u4F4D\u7B26"},api_placetag:{zh:"\u5360\u4F4D\u6807\u7B7E",en:"Placeholder tags",zh_TW:"\u4F54\u4F4D\u6A19"},detected_lang:{zh:"\u8BED\u8A00\u68C0\u6D4B",en:"Language detection",zh_TW:"\u8A9E\u8A00\u5075\u6E2C"},detected_result:{zh:"\u68C0\u6D4B\u7ED3\u679C",en:"Detect result",zh_TW:"\u6AA2\u6E2C\u7D50\u679C"},subtitle_translate:{zh:"\u5B57\u5E55\u7FFB\u8BD1",en:"Subtitle translation",zh_TW:"\u5B57\u5E55\u7FFB\u8B6F"},toggle_subtitle_translate:{zh:"\u542F\u7528\u5B57\u5E55\u7FFB\u8BD1",en:"Enable subtitle translation",zh_TW:"\u555F\u7528\u5B57\u5E55\u7FFB\u8B6F"},is_bilingual_view:{zh:"\u53CC\u8BED\u663E\u793A",en:"Enable bilingual display",zh_TW:"\u96D9\u8A9E\u986F\u793A"},is_skip_ad:{zh:"\u662F\u5426\u5FEB\u8FDB\u5E7F\u544A",en:"Should I fast forward to the ad?",zh_TW:"\u662F\u5426\u5FEB\u8F49\u5EE3\u544A"},background_styles:{zh:"\u80CC\u666F\u6837\u5F0F",en:"DBackground Style",zh_TW:"\u80CC\u666F\u6A23\u5F0F"},origin_styles:{zh:"\u539F\u6587\u6837\u5F0F",en:"Original style",zh_TW:"\u539F\u6587\u6A23\u5F0F"},translation_styles:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Translation style",zh_TW:"\u8B6F\u6587\u6A23\u5F0F"},ai_segmentation:{zh:"AI\u667A\u80FD\u65AD\u53E5",en:"AI intelligent punctuation",zh_TW:"AI\u667A\u6167\u65B7\u53E5"},ai_chunk_length:{zh:"AI\u5904\u7406\u5207\u5272\u957F\u5EA6(200-20000)",en:"AI processing chunk length(200-20000)",zh_TW:"AI\u5904\u7406\u5207\u5272\u957F\u5EA6(200-20000)"},subtitle_helper_1:{zh:"1\u3001\u76EE\u524D\u4EC5\u652F\u6301Youtube\u684C\u9762\u7F51\u7AD9\u3002",en:"1. Currently only supports Youtube desktop website.",zh_TW:"1.\u76EE\u524D\u50C5\u652F\u63F4Youtube\u684C\u9762\u7DB2\u7AD9\uFF0C\u4E14\u50C5\u652F\u63F4\u700F\u89BD\u5668\u64F4\u5145\u529F\u80FD\u3002"},subtitle_helper_2:{zh:"2\u3001\u63D2\u4EF6\u5185\u7F6E\u57FA\u7840\u7684\u5B57\u5E55\u5408\u5E76\u3001\u65AD\u53E5\u7B97\u6CD5\uFF0C\u53EF\u6EE1\u8DB3\u5927\u90E8\u5206\u60C5\u51B5\u3002",en:"2. The plug-in has built-in basic subtitle merging and sentence segmentation algorithms, which can meet most situations.",zh_TW:"2.\u63D2\u4EF6\u5167\u5EFA\u57FA\u790E\u7684\u5B57\u5E55\u5408\u4F75\u3001\u65B7\u53E5\u6F14\u7B97\u6CD5\uFF0C\u53EF\u6EFF\u8DB3\u5927\u90E8\u5206\u60C5\u6CC1\u3002"},subtitle_helper_3:{zh:"3\u3001\u4EA6\u53EF\u4EE5\u542F\u7528AI\u667A\u80FD\u65AD\u53E5\uFF0C\u4F46\u9700\u8003\u8651\u5207\u5272\u957F\u5EA6\u53CAAI\u63A5\u53E3\u80FD\u529B\uFF0C\u53EF\u80FD\u5904\u7406\u65F6\u95F4\u4F1A\u5F88\u957F\uFF0C\u751A\u81F3\u5904\u7406\u5931\u8D25\uFF0C\u5BFC\u81F4\u65E0\u6CD5\u770B\u5230\u5B57\u5E55\u3002",en:"3. You can also enable AI intelligent segmentation, but you need to consider the segmentation length and AI interface capabilities. The processing time may be very long or even fail, resulting in the inability to see subtitles.",zh_TW:"3.\u4EA6\u53EF\u555F\u7528AI\u667A\u80FD\u65B7\u53E5\uFF0C\u4F46\u9700\u8003\u616E\u5207\u5272\u9577\u5EA6\u53CAAI\u4ECB\u9762\u80FD\u529B\uFF0C\u53EF\u80FD\u8655\u7406\u6642\u9593\u6703\u5F88\u9577\uFF0C\u751A\u81F3\u8655\u7406\u5931\u6557\uFF0C\u5C0E\u81F4\u7121\u6CD5\u770B\u5230\u5B57\u5E55\u3002"},default_styles_example:{zh:"\u9ED8\u8BA4\u6837\u5F0F\u53C2\u8003\uFF1A",en:"Default styles reference:",zh_TW:"\u8A8D\u6A23\u5F0F\u53C3\u8003\uFF1A"},subtitle_load_succeed:{zh:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u6210\u529F\uFF01",en:"Bilingual subtitles loaded successfully!",zh_TW:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u6210\u529F\uFF01"},subtitle_load_failed:{zh:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u5931\u8D25\uFF01",en:"Failed to load bilingual subtitles!",zh_TW:"\u53CC\u8BED\u5B57\u5E55\u52A0\u8F7D\u5931\u8D25\uFF01"},try_get_subtitle_data:{zh:"\u5C1D\u8BD5\u83B7\u53D6\u5B57\u5E55\u6570\u636E\uFF0C\u8BF7\u7A0D\u5019...",en:"Trying to get subtitle data, please wait...",zh_TW:"\u5C1D\u8BD5\u83B7\u53D6\u5B57\u5E55\u6570\u636E\uFF0C\u8BF7\u7A0D\u5019..."},subtitle_data_processing:{zh:"\u5B57\u5E55\u6570\u636E\u5904\u7406\u4E2D...",en:"Subtitle data processing...",zh_TW:"\u5B57\u5E55\u6570\u636E\u5904\u7406\u4E2D..."},starting_to_process_subtitle:{zh:"\u5F00\u59CB\u5904\u7406\u5B57\u5E55\u6570\u636E...",en:"Starting to process subtitle data...",zh_TW:"\u5F00\u59CB\u5904\u7406\u5B57\u5E55\u6570\u636E..."},subtitle_data_is_ready:{zh:"\u5B57\u5E55\u6570\u636E\u5DF2\u51C6\u5907\u5C31\u7EEA\uFF0C\u8BF7\u70B9\u51FBKT\u6309\u94AE\u52A0\u8F7D",en:"The subtitle data is ready, please click the KT button to load it",zh_TW:"\u5B57\u5E55\u8CC7\u6599\u5DF2\u6E96\u5099\u5C31\u7DD2\uFF0C\u8ACB\u9EDE\u64CAKT\u6309\u9215\u52A0\u8F09"},log_level:{zh:"\u65E5\u5FD7\u7EA7\u522B",en:"Log Level",zh_TW:"\u65E5\u8A8C\u7B49\u7D1A"},goto_custom_api_example:{zh:"\u70B9\u51FB\u67E5\u770B\u3010\u81EA\u5B9A\u4E49\u63A5\u53E3\u793A\u4F8B\u3011",en:"Click to view [Custom Interface Example]",zh_TW:"\u9EDE\u9078\u67E5\u770B\u3010\u81EA\u8A02\u4ECB\u9762\u7BC4\u4F8B\u3011"},split_paragraph:{zh:"\u5207\u5206\u957F\u6BB5\u843D",en:"Split long paragraph",zh_TW:"\u5207\u5206\u9577\u6BB5\u843D"},split_length:{zh:"\u5207\u5206\u957F\u5EA6 (0-10000)",en:"Segmentation length(0-10000)",zh_TW:"\u5207\u5206\u9577\u5EA6(0-10000)"},highlight_words:{zh:"\u9AD8\u4EAE\u6536\u85CF\u8BCD\u6C47",en:"Highlight favorite words",zh_TW:"\u9AD8\u4EAE\u6536\u85CF\u8A5E\u5F59"},split_disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},split_textlength:{zh:"\u6309\u7167\u957F\u5EA6\u5207\u5206",en:"Split by length",zh_TW:"\u4F9D\u9577\u5EA6\u5207\u5206"},split_punctuation:{zh:"\u6309\u7167\u53E5\u5B50\u5207\u5206",en:"Split by sentence",zh_TW:"\u6309\u7167\u53E5\u5B50\u5207\u5206"},highlight_disable:{zh:"\u7981\u7528",en:"Disable",zh_TW:"\u505C\u7528"},highlight_beforetrans:{zh:"\u7FFB\u8BD1\u524D\u9AD8\u4EAE",en:"Highlight before translation",zh_TW:"\u7FFB\u8B6F\u524D\u9AD8\u4EAE"},highlight_aftertrans:{zh:"\u7FFB\u8BD1\u540E\u9AD8\u4EAE",en:"Highlight after translation",zh_TW:"\u7FFB\u8B6F\u5F8C\u9AD8\u4EAE"},pagescroll_root_margin:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u63D0\u524D\u89E6\u53D1 (0-10000px)",en:"Early triggering of scroll loading (0-10000px)",zh_TW:"\u6EFE\u52D5\u8F09\u5165\u63D0\u524D\u89F8\u767C (0-10000px)"},styles_setting:{zh:"\u6837\u5F0F\u8BBE\u7F6E",en:"Style Setting",zh_TW:"\u6A23\u5F0F\u8A2D\u5B9A"},style_name:{zh:"\u6837\u5F0F\u540D\u79F0",en:"Style Name",zh_TW:"\u6A23\u5F0F\u540D\u7A31"},style_code:{zh:"\u6837\u5F0F\u4EE3\u7801",en:"Style Code",zh_TW:"\u6A23\u5F0F\u7A0B\u5F0F\u78BC"}};const newI18n=lang=>key=>{var _I18N$key;return((_I18N$key=I18N[key])===null||_I18N$key===void 0?void 0:_I18N$key[lang])||"";}; ;// CONCATENATED MODULE: ./src/config/storage.js const KV_RULES_KEY="kiss-rules_v".concat(APP_VERSION[0],".json");const KV_WORDS_KEY="kiss-words.json";const KV_RULES_SHARE_KEY="kiss-rules-share_v".concat(APP_VERSION[0],".json");const KV_SETTING_KEY="kiss-setting_v".concat(APP_VERSION[0],".json");const KV_SALT_SYNC="KISS-Translator-SYNC";const KV_SALT_SHARE="KISS-Translator-SHARE";const STOKEY_MSAUTH="".concat(APP_NAME,"_msauth");const storage_STOKEY_BDAUTH="".concat(APP_NAME,"_bdauth");const STOKEY_SETTING_OLD="".concat(APP_NAME,"_setting");const STOKEY_RULES_OLD="".concat(APP_NAME,"_rules");const storage_STOKEY_SETTING="".concat(APP_NAME,"_setting_v").concat(APP_VERSION[0]);const storage_STOKEY_RULES="".concat(APP_NAME,"_rules_v").concat(APP_VERSION[0]);const STOKEY_WORDS="".concat(APP_NAME,"_words");const storage_STOKEY_SYNC="".concat(APP_NAME,"_sync");const storage_STOKEY_FAB="".concat(APP_NAME,"_fab");const storage_STOKEY_TRANBOX="".concat(APP_NAME,"_tranbox");const storage_STOKEY_RULESCACHE_PREFIX="".concat(APP_NAME,"_rulescache_");const storage_CACHE_NAME="".concat(APP_NAME,"_cache");const DEFAULT_CACHE_TIMEOUT=3600*24*7;// 缓存超时时间(7天) ;// CONCATENATED MODULE: ./src/config/url.js @@ -55866,10 +55897,11 @@ const client_client="userscript";const client_isExt=CLIENT_EXTS.includes(client_ * @returns */const debounce=function(func){let delay=arguments.length>1&&arguments[1]!==undefined?arguments[1]:200;let timer=null;return function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}timer&&clearTimeout(timer);timer=setTimeout(()=>{func(...args);clearTimeout(timer);timer=null;},delay);};};/** * 节流函数 - * @param {*} func - * @param {*} delay - * @returns - */const throttle=function(func){let delay=arguments.length>1&&arguments[1]!==undefined?arguments[1]:200;let timer=null;let cache=null;return function(){for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2];}if(!timer){func(...args);cache=null;timer=setTimeout(()=>{if(cache){func(...cache);cache=null;}clearTimeout(timer);timer=null;},delay);}else{cache=args;}};};/** + * @param {Function} func 要执行的函数 + * @param {number} delay 延迟时间 + * @param {object} options 选项 { leading: boolean, trailing: boolean } + * @returns {Function} + */const throttle=function(func,delay){let options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{leading:true,trailing:true};let timeoutId=null;let lastArgs=null;let lastThis=null;let result;let previous=0;function later(){previous=options.leading===false?0:Date.now();timeoutId=null;result=func.apply(lastThis,lastArgs);if(!timeoutId){lastThis=lastArgs=null;}}const throttled=function(){const now=Date.now();if(!previous&&options.leading===false){previous=now;}const remaining=delay-(now-previous);for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2];}lastArgs=args;lastThis=this;if(remaining<=0||remaining>delay){if(timeoutId){clearTimeout(timeoutId);timeoutId=null;}previous=now;result=func.apply(lastThis,lastArgs);if(!timeoutId){lastThis=lastArgs=null;}}else if(!timeoutId&&options.trailing!==false){timeoutId=setTimeout(later,remaining);}return result;};throttled.cancel=()=>{clearTimeout(timeoutId);previous=0;timeoutId=null;lastThis=lastArgs=null;};return throttled;};/** * 判断字符串全是某个字符 * @param {*} s * @param {*} c @@ -56697,7 +56729,7 @@ stream:false};const headers={"Content-type":"application/json"};if(key){headers. */const genTransReq=async _ref21=>{let{reqHook,...args}=_ref21;const{apiType,apiSlug,key,systemPrompt,// userPrompt, nobatchPrompt=defaultNobatchPrompt,nobatchUserPrompt=defaultNobatchUserPrompt,useBatchFetch,from,to,texts,docInfo,glossary,customHeader,customBody,events}=args;if(API_SPE_TYPES.mulkeys.has(apiType)){args.key=keyPick(apiSlug,key,keyMap);}if(apiType===OPT_TRANS_DEEPLX){args.url=keyPick(apiSlug,args.url,urlMap);}if(API_SPE_TYPES.ai.has(apiType)){args.systemPrompt=genSystemPrompt({systemPrompt:useBatchFetch?systemPrompt:nobatchPrompt,from,to});args.userPrompt=!!events?JSON.stringify(events):genUserPrompt({nobatchUserPrompt,useBatchFetch,from,to,texts,docInfo,glossary});}const{url="",body=null,headers={},userMsg=null,method="POST"}=genReqFuncs[apiType](args);// 合并用户自定义headers和body if(customHeader!==null&&customHeader!==void 0&&customHeader.trim()){Object.assign(headers,parseJsonObj(customHeader));}if(customBody!==null&&customBody!==void 0&&customBody.trim()){Object.assign(body,parseJsonObj(customBody));}// 执行 request hook -if(reqHook!==null&&reqHook!==void 0&&reqHook.trim()&&!events){try{interpreter.run("exports.reqHook = ".concat(reqHook));const hookResult=await interpreter.exports.reqHook({...args,defaultSystemPrompt: defaultSystemPrompt,defaultSubtitlePrompt: defaultSubtitlePrompt},{url,body,headers,userMsg,method});if(hookResult&&hookResult.url){return genInit(hookResult);}}catch(err){log_kissLog("run req hook",err);}}return genInit({url,body,headers,userMsg,method});};/** +if(reqHook!==null&&reqHook!==void 0&&reqHook.trim()&&!events){try{interpreter.run("exports.reqHook = ".concat(reqHook));const hookResult=await interpreter.exports.reqHook({...args,defaultSystemPrompt: defaultSystemPrompt,defaultSubtitlePrompt: defaultSubtitlePrompt,defaultNobatchPrompt: defaultNobatchPrompt,defaultNobatchUserPrompt: defaultNobatchUserPrompt},{url,body,headers,userMsg,method});if(hookResult&&hookResult.url){return genInit(hookResult);}}catch(err){log_kissLog("run req hook",err);}}return genInit({url,body,headers,userMsg,method});};/** * 解析翻译接口返回数据 * @param {*} res * @param {*} param3 @@ -56806,7 +56838,7 @@ keyfrom:"webdict"});const init={headers:{accept:"application/json, text/plain, * * @param {*} param0 * @returns */const apiTranslate=async _ref2=>{let{text,fromLang="auto",toLang,apiSetting=DEFAULT_API_SETTING,docInfo={},glossary={},useCache=true,usePool=true}=_ref2;if(!text){throw new Error("The text cannot be empty.");}const{apiType,apiSlug,useBatchFetch}=apiSetting;const langMap=OPT_LANGS_TO_SPEC[apiType]||OPT_LANGS_SPEC_DEFAULT;const from=langMap.get(fromLang);const to=langMap.get(toLang);if(!to){throw new Error("The target lang: ".concat(toLang," not support"));}// todo: 优化缓存失效因素 -const[v1,v2]="2.0.5".split(".");const cacheOpts={apiSlug,text,fromLang,toLang,version:[v1,v2].join(".")};const cacheInput="".concat(URL_CACHE_TRAN,"?").concat(query_string.stringify(cacheOpts));// 查询缓存数据 +const[v1,v2]="2.0.6".split(".");const cacheOpts={apiSlug,text,fromLang,toLang,version:[v1,v2].join(".")};const cacheInput="".concat(URL_CACHE_TRAN,"?").concat(query_string.stringify(cacheOpts));// 查询缓存数据 if(useCache){const cache=await cache_getHttpCachePolyfill(cacheInput);if(cache!==null&&cache!==void 0&&cache.trText){return cache;}}// 请求接口数据 let tranlation=[];if(apiType===OPT_TRANS_BUILTINAI){tranlation=await apiBuiltinAITranslate({text,from,to,apiSetting});}else if(useBatchFetch&&API_SPE_TYPES.batch.has(apiType)){const{apiSlug,batchInterval,batchSize,batchLength}=apiSetting;const key="".concat(apiSlug,"_").concat(fromLang,"_").concat(toLang);const queue=getBatchQueue(key,handleTranslate,{batchInterval,batchSize,batchLength});tranlation=await queue.addTask(text,{from,to,fromLang,toLang,langMap,docInfo,glossary,apiSetting,usePool});}else{[tranlation]=await handleTranslate([text],{from,to,fromLang,toLang,langMap,docInfo,glossary,apiSetting,usePool});}let trText="";let srLang="";let srCode="";if(Array.isArray(tranlation)){[trText,srLang=""]=tranlation;if(srLang){srCode=OPT_LANGS_TO_CODE[apiType].get(srLang)||"";}}else if(typeof tranlation==="string"){trText=tranlation;}if(!trText){throw new Error("tanslate api got empty trtext");}const isSame=fromLang==="auto"&&srLang===to;// 插入缓存 if(useCache){cache_putHttpCachePolyfill(cacheInput,null,{trText,isSame,srLang,srCode});}return{trText,srLang,srCode,isSame};};// 字幕处理/翻译 @@ -59623,7 +59655,7 @@ var n = {}; return t.length === e && "." !== t && ".." !== t; }; }, - te = "object" === ("undefined" == typeof process ? "undefined" : Nt(process)) && process ? "object" === Nt(({"NODE_ENV":"production","PUBLIC_URL":"","WDS_SOCKET_HOST":undefined,"WDS_SOCKET_PATH":undefined,"WDS_SOCKET_PORT":undefined,"FAST_REFRESH":true,"REACT_APP_CLIENT":"userscript","REACT_APP_NAME":"KISS Translator","REACT_APP_NAME_CN":"简约翻译","REACT_APP_VERSION":"2.0.5","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js"})) && ({"NODE_ENV":"production","PUBLIC_URL":"","WDS_SOCKET_HOST":undefined,"WDS_SOCKET_PATH":undefined,"WDS_SOCKET_PORT":undefined,"FAST_REFRESH":true,"REACT_APP_CLIENT":"userscript","REACT_APP_NAME":"KISS Translator","REACT_APP_NAME_CN":"简约翻译","REACT_APP_VERSION":"2.0.5","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js"}) && ({"NODE_ENV":"production","PUBLIC_URL":"","WDS_SOCKET_HOST":undefined,"WDS_SOCKET_PATH":undefined,"WDS_SOCKET_PORT":undefined,"FAST_REFRESH":true,"REACT_APP_CLIENT":"userscript","REACT_APP_NAME":"KISS Translator","REACT_APP_NAME_CN":"简约翻译","REACT_APP_VERSION":"2.0.5","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js"}).__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix"; + te = "object" === ("undefined" == typeof process ? "undefined" : Nt(process)) && process ? "object" === Nt(({"NODE_ENV":"production","PUBLIC_URL":"","WDS_SOCKET_HOST":undefined,"WDS_SOCKET_PATH":undefined,"WDS_SOCKET_PORT":undefined,"FAST_REFRESH":true,"REACT_APP_CLIENT":"userscript","REACT_APP_NAME":"KISS Translator","REACT_APP_NAME_CN":"简约翻译","REACT_APP_VERSION":"2.0.6","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js"})) && ({"NODE_ENV":"production","PUBLIC_URL":"","WDS_SOCKET_HOST":undefined,"WDS_SOCKET_PATH":undefined,"WDS_SOCKET_PORT":undefined,"FAST_REFRESH":true,"REACT_APP_CLIENT":"userscript","REACT_APP_NAME":"KISS Translator","REACT_APP_NAME_CN":"简约翻译","REACT_APP_VERSION":"2.0.6","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js"}) && ({"NODE_ENV":"production","PUBLIC_URL":"","WDS_SOCKET_HOST":undefined,"WDS_SOCKET_PATH":undefined,"WDS_SOCKET_PORT":undefined,"FAST_REFRESH":true,"REACT_APP_CLIENT":"userscript","REACT_APP_NAME":"KISS Translator","REACT_APP_NAME_CN":"简约翻译","REACT_APP_VERSION":"2.0.6","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js"}).__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix"; It.sep = "win32" === te ? "\\" : "/"; var ee = Symbol("globstar **"); It.GLOBSTAR = ee; @@ -62008,12 +62040,12 @@ Divider.muiSkipListHighlight = true; false ? 0 : void 0; /* harmony default export */ const Divider_Divider = (Divider); ;// CONCATENATED MODULE: ./src/hooks/Loading.js -function Loading(){return/*#__PURE__*/(0,jsx_runtime.jsxs)("center",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Divider_Divider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(material_Link_Link,{href:"https://github.com/fishjar/kiss-translator",children:"KISS Translator v".concat("2.0.5")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{})]});} +function Loading(){return/*#__PURE__*/(0,jsx_runtime.jsxs)("center",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Divider_Divider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(material_Link_Link,{href:"https://github.com/fishjar/kiss-translator",children:"KISS Translator v".concat("2.0.6")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{})]});} ;// CONCATENATED MODULE: ./src/hooks/Setting.js const SettingContext=/*#__PURE__*/(0,react.createContext)({setting:setting_DEFAULT_SETTING,updateSetting:()=>{},reloadSetting:()=>{}});function SettingProvider(_ref){let{children}=_ref;const{data:setting,isLoading,update,reload}=useStorage(storage_STOKEY_SETTING,setting_DEFAULT_SETTING,KV_SETTING_KEY);(0,react.useEffect)(()=>{if(typeof(setting===null||setting===void 0?void 0:setting.darkMode)==="boolean"){update(currentSetting=>({...currentSetting,darkMode:currentSetting.darkMode?"dark":"light"}));}},[setting===null||setting===void 0?void 0:setting.darkMode,update]);(0,react.useEffect)(()=>{(async()=>{try{logger.setLevel(setting===null||setting===void 0?void 0:setting.logLevel);if(client_isExt){await msg_sendBgMsg(MSG_SET_LOGLEVEL,setting===null||setting===void 0?void 0:setting.logLevel);}}catch(error){logger.error("Failed to fetch log level, using default.",error);}})();},[setting]);const updateSetting=(0,react.useCallback)(objOrFn=>{update(objOrFn);debounceSyncMeta(KV_SETTING_KEY);},[update]);const updateChild=(0,react.useCallback)(key=>async obj=>{updateSetting(prev=>({...prev,[key]:{...((prev===null||prev===void 0?void 0:prev[key])||{}),...obj}}));},[updateSetting]);const value=(0,react.useMemo)(()=>({setting,updateSetting,updateChild,reloadSetting:reload}),[setting,updateSetting,updateChild,reload]);if(isLoading){return/*#__PURE__*/(0,jsx_runtime.jsx)(Loading,{});}if(!setting){/*#__PURE__*/(0,jsx_runtime.jsx)("center",{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Alert_Alert,{severity:"error",sx:{maxWidth:600,margin:"60px auto"},children:[/*#__PURE__*/(0,jsx_runtime.jsx)("p",{children:"\u6570\u636E\u52A0\u8F7D\u51FA\u9519\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u6216\u5378\u8F7D\u540E\u91CD\u65B0\u5B89\u88C5\u3002"}),/*#__PURE__*/(0,jsx_runtime.jsx)("p",{children:"Data loading error, please refresh the page or uninstall and reinstall."})]})});}return/*#__PURE__*/(0,jsx_runtime.jsx)(SettingContext.Provider,{value:value,children:children});}/** * 设置 hook * @returns - */function Setting_useSetting(){return (0,react.useContext)(SettingContext);} + */function useSetting(){return (0,react.useContext)(SettingContext);} ;// CONCATENATED MODULE: ./src/hooks/Fetch.js const useAsync=()=>{const[data,setData]=(0,react.useState)(null);const[loading,setLoading]=(0,react.useState)(false);const[error,setError]=(0,react.useState)(null);const execute=(0,react.useCallback)(async function(fn){if(!fn){return;}setLoading(true);setError(null);try{for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key];}const res=await fn(...args);setData(res);setLoading(false);return res;}catch(err){setError((err===null||err===void 0?void 0:err.message)||"An unknown error occurred");setLoading(false);// throw err; }},[]);const reset=(0,react.useCallback)(()=>{setData(null);setLoading(false);setError(null);},[]);return{data,loading,error,execute,reset};};const useAsyncNow=(fn,arg)=>{const{execute,...asyncState}=useAsync();(0,react.useEffect)(()=>{if(fn){execute(fn,arg);}},[execute,fn,arg]);return{...asyncState};};const useFetch=()=>{const{execute,...asyncState}=useAsync();const requester=(0,react.useCallback)(async(url,options)=>{var _response$headers$get;const response=await fetch(url,options);if(!response.ok){const errorInfo=await response.text();throw new Error("Request failed: ".concat(response.status," ").concat(response.statusText," - ").concat(errorInfo));}if(response.status===204){return null;}if((_response$headers$get=response.headers.get("Content-Type"))!==null&&_response$headers$get!==void 0&&_response$headers$get.includes("json")){return response.json();}return response.text();},[]);const get=(0,react.useCallback)(async function(url){let options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};try{const result=await execute(requester,url,{...options,method:"GET"});return result;}catch(err){return null;}},[execute,requester]);const post=(0,react.useCallback)(async function(url,body){let options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};try{const result=await execute(requester,url,{...options,method:"POST",headers:{"Content-Type":"application/json",...options.headers},body:JSON.stringify(body)});return result;}catch(err){return null;}},[execute,requester]);const put=(0,react.useCallback)(async function(url,body){let options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};try{const result=await execute(requester,url,{...options,method:"PUT",headers:{"Content-Type":"application/json",...options.headers},body:JSON.stringify(body)});return result;}catch(err){return null;}},[execute,requester]);const del=(0,react.useCallback)(async function(url){let options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};try{const result=await execute(requester,url,{...options,method:"DELETE"});return result;}catch(err){return null;}},[execute,requester]);return{...asyncState,get,post,put,del};};const useGet=url=>{const{get,...fetchState}=useFetch();(0,react.useEffect)(()=>{if(url)get(url);},[url,get]);return{...fetchState};}; @@ -62021,7 +62053,7 @@ const useAsync=()=>{const[data,setData]=(0,react.useState)(null);const[loading,s const getI18n=function(uiLang,key){var _I18N$key$uiLang,_I18N$key;let defaultText=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"";return(_I18N$key$uiLang=I18N===null||I18N===void 0?void 0:(_I18N$key=I18N[key])===null||_I18N$key===void 0?void 0:_I18N$key[uiLang])!==null&&_I18N$key$uiLang!==void 0?_I18N$key$uiLang:defaultText;};const useLangMap=uiLang=>{return function(key){let defaultText=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";return getI18n(uiLang,key,defaultText);};};/** * 多语言 hook * @returns - */const useI18n=()=>{const{setting:{uiLang}}=Setting_useSetting();return useLangMap(uiLang);};const useI18nMd=key=>{const i18n=useI18n();const fileName=i18n(key);const url=fileName?"".concat(URL_RAW_PREFIX,"/").concat(fileName):"";return useGet(url);}; + */const useI18n=()=>{const{setting:{uiLang}}=useSetting();return useLangMap(uiLang);};const useI18nMd=key=>{const i18n=useI18n();const fileName=i18n(key);const url=fileName?"".concat(URL_RAW_PREFIX,"/").concat(fileName):"";return useGet(url);}; ;// CONCATENATED MODULE: ./src/views/Options/About.js function About(){const i18n=useI18n();const{data,loading,error}=useI18nMd("about_md");return/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:loading?/*#__PURE__*/(0,jsx_runtime.jsx)("center",{children:/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{})}):/*#__PURE__*/(0,jsx_runtime.jsx)(ReactMarkdown,{children:error?i18n("about_md_local"):data})});} // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/deepmerge/deepmerge.js @@ -69628,40 +69660,23 @@ await syncAllSubRules(subrulesList);await putSync({subRulesSyncAt:now});}}catch( * @returns */const subRules_loadOrFetchSubRules=async url=>{let rules=await getSubRules(url);if(!rules||rules.length===0){rules=await syncSubRules(url);await updateSyncDataCache(url);}return rules||[];}; ;// CONCATENATED MODULE: ./src/libs/rules.js -// import { FIXER_ALL } from "./webfix"; /** * 根据href匹配规则 * @param {*} rules * @param {string} href * @returns - */const matchRule=async(href,_ref)=>{let{injectRules,subrulesList}=_ref;const rules=await getRulesWithDefault();if(injectRules){try{const selectedSub=subrulesList.find(item=>item.selected);if(selectedSub!==null&&selectedSub!==void 0&&selectedSub.url){const subRules=await loadOrFetchSubRules(selectedSub.url);rules.splice(-1,0,...subRules);}}catch(err){kissLog("load injectRules",err);}}const rule=rules.find(r=>r.pattern.split(",").some(p=>isMatch(href,p.trim())));const globalRule={...GLOBLA_RULE,...(rules.find(r=>r.pattern===GLOBAL_KEY)||{})};if(!rule){return globalRule;}["selector","keepSelector","rootsSelector","ignoreSelector","terms","aiTerms","termsStyle","highlightStyle","selectStyle","parentStyle","grandStyle","injectJs",// "injectCss", -// "fixerSelector", + */const matchRule=async(href,_ref)=>{let{injectRules,subrulesList}=_ref;const rules=await getRulesWithDefault();if(injectRules){try{const selectedSub=subrulesList.find(item=>item.selected);if(selectedSub!==null&&selectedSub!==void 0&&selectedSub.url){const subRules=await loadOrFetchSubRules(selectedSub.url);rules.splice(-1,0,...subRules);}}catch(err){kissLog("load injectRules",err);}}const rule=rules.find(r=>r.pattern.split(",").some(p=>isMatch(href,p.trim())));const globalRule={...GLOBLA_RULE,...(rules.find(r=>r.pattern===GLOBAL_KEY)||{})};if(!rule){return globalRule;}["selector","keepSelector","rootsSelector","ignoreSelector","terms","aiTerms","termsStyle","highlightStyle","textExtStyle","selectStyle","parentStyle","grandStyle","injectJs",// "injectCss", "transStartHook","transEndHook"// "transRemoveHook", -].forEach(key=>{var _rule$key;if(!((_rule$key=rule[key])!==null&&_rule$key!==void 0&&_rule$key.trim())){rule[key]=globalRule[key];}});["apiSlug","fromLang","toLang","transOpen","transOnly",// "transTiming", -"autoScan","hasRichText","hasShadowroot","transTag","transTitle",// "detectRemote", -// "fixerFunc", -"splitParagraph","highlightWords"].forEach(key=>{if(!rule[key]||rule[key]===GLOBAL_KEY){rule[key]=globalRule[key];}});["splitLength"].forEach(key=>{if(!rule[key]){rule[key]=globalRule[key];}});// if (!rule.skipLangs || rule.skipLangs.length === 0) { -// rule.skipLangs = globalRule.skipLangs; -// } -if(!rule.textStyle||rule.textStyle===GLOBAL_KEY){rule.textStyle=globalRule.textStyle;rule.bgColor=globalRule.bgColor;rule.textDiyStyle=globalRule.textDiyStyle;}else{var _rule$bgColor,_rule$textDiyStyle;rule.bgColor=((_rule$bgColor=rule.bgColor)===null||_rule$bgColor===void 0?void 0:_rule$bgColor.trim())||globalRule.bgColor;rule.textDiyStyle=((_rule$textDiyStyle=rule.textDiyStyle)===null||_rule$textDiyStyle===void 0?void 0:_rule$textDiyStyle.trim())||globalRule.textDiyStyle;}return rule;};/** +].forEach(key=>{var _rule$key;if(!((_rule$key=rule[key])!==null&&_rule$key!==void 0&&_rule$key.trim())){rule[key]=globalRule[key];}});["apiSlug","fromLang","toLang","transOpen","transOnly","autoScan","hasRichText","hasShadowroot","transTag","transTitle","splitParagraph","highlightWords","textStyle"].forEach(key=>{if(!rule[key]||rule[key]===GLOBAL_KEY){rule[key]=globalRule[key];}});["splitLength"].forEach(key=>{if(!rule[key]){rule[key]=globalRule[key];}});return rule;};/** * 检查过滤rules * @param {*} rules * @returns - */const checkRules=rules=>{if(type(rules)==="string"){rules=JSON.parse(rules);}if(type(rules)!=="array"){throw new Error("data error");}const fromLangs=OPT_LANGS_FROM.map(item=>item[0]);const toLangs=OPT_LANGS_TO.map(item=>item[0]);const patternSet=new Set();rules=rules.filter(rule=>type(rule)==="object").filter(_ref2=>{let{pattern}=_ref2;if(type(pattern)!=="string"||patternSet.has(pattern.trim())){return false;}patternSet.add(pattern.trim());return true;}).map(_ref3=>{let{pattern,selector,keepSelector,rootsSelector,ignoreSelector,terms,aiTerms,termsStyle,highlightStyle,selectStyle,parentStyle,grandStyle,injectJs,// injectCss, -apiSlug,fromLang,toLang,textStyle,transOpen,bgColor,textDiyStyle,transOnly,autoScan,hasRichText,hasShadowroot,// transTiming, -transTag,transTitle,// detectRemote, -// skipLangs, -// fixerSelector, -// fixerFunc, -transStartHook,transEndHook,// transRemoveHook, -splitParagraph,splitLength,highlightWords}=_ref3;return{pattern:pattern.trim(),selector:type(selector)==="string"?selector:"",keepSelector:type(keepSelector)==="string"?keepSelector:"",rootsSelector:type(rootsSelector)==="string"?rootsSelector:"",ignoreSelector:type(ignoreSelector)==="string"?ignoreSelector:"",terms:type(terms)==="string"?terms:"",aiTerms:type(aiTerms)==="string"?aiTerms:"",termsStyle:type(termsStyle)==="string"?termsStyle:"",highlightStyle:type(highlightStyle)==="string"?highlightStyle:"",selectStyle:type(selectStyle)==="string"?selectStyle:"",parentStyle:type(parentStyle)==="string"?parentStyle:"",grandStyle:type(grandStyle)==="string"?grandStyle:"",injectJs:type(injectJs)==="string"?injectJs:"",// injectCss: type(injectCss) === "string" ? injectCss : "", -bgColor:type(bgColor)==="string"?bgColor:"",textDiyStyle:type(textDiyStyle)==="string"?textDiyStyle:"",apiSlug:type(apiSlug)==="string"&&apiSlug.trim()!==""?apiSlug.trim():rules_GLOBAL_KEY,fromLang:matchValue([rules_GLOBAL_KEY,...fromLangs],fromLang),toLang:matchValue([rules_GLOBAL_KEY,...toLangs],toLang),textStyle:matchValue([rules_GLOBAL_KEY,...OPT_STYLE_ALL],textStyle),transOpen:matchValue([rules_GLOBAL_KEY,"true","false"],transOpen),transOnly:matchValue([rules_GLOBAL_KEY,"true","false"],transOnly),autoScan:matchValue([rules_GLOBAL_KEY,"true","false"],autoScan),hasRichText:matchValue([rules_GLOBAL_KEY,"true","false"],hasRichText),hasShadowroot:matchValue([rules_GLOBAL_KEY,"true","false"],hasShadowroot),// transTiming: matchValue([GLOBAL_KEY, ...OPT_TIMING_ALL], transTiming), -transTag:matchValue([rules_GLOBAL_KEY,"span","font"],transTag),transTitle:matchValue([rules_GLOBAL_KEY,"true","false"],transTitle),// detectRemote: matchValue([GLOBAL_KEY, "true", "false"], detectRemote), -// skipLangs: type(skipLangs) === "array" ? skipLangs : [], -// fixerSelector: type(fixerSelector) === "string" ? fixerSelector : "", -transStartHook:type(transStartHook)==="string"?transStartHook:"",transEndHook:type(transEndHook)==="string"?transEndHook:"",// transRemoveHook: + */const checkRules=rules=>{if(type(rules)==="string"){rules=JSON.parse(rules);}if(type(rules)!=="array"){throw new Error("data error");}const fromLangs=OPT_LANGS_FROM.map(item=>item[0]);const toLangs=OPT_LANGS_TO.map(item=>item[0]);const patternSet=new Set();rules=rules.filter(rule=>type(rule)==="object").filter(_ref2=>{let{pattern}=_ref2;if(type(pattern)!=="string"||patternSet.has(pattern.trim())){return false;}patternSet.add(pattern.trim());return true;}).map(_ref3=>{let{pattern,selector,keepSelector,rootsSelector,ignoreSelector,terms,aiTerms,termsStyle,highlightStyle,textExtStyle,selectStyle,parentStyle,grandStyle,injectJs,// injectCss, +apiSlug,fromLang,toLang,textStyle,transOpen,transOnly,autoScan,hasRichText,hasShadowroot,transTag,transTitle,transStartHook,transEndHook,// transRemoveHook, +splitParagraph,splitLength,highlightWords}=_ref3;return{pattern:pattern.trim(),selector:type(selector)==="string"?selector:"",keepSelector:type(keepSelector)==="string"?keepSelector:"",rootsSelector:type(rootsSelector)==="string"?rootsSelector:"",ignoreSelector:type(ignoreSelector)==="string"?ignoreSelector:"",terms:type(terms)==="string"?terms:"",aiTerms:type(aiTerms)==="string"?aiTerms:"",termsStyle:type(termsStyle)==="string"?termsStyle:"",highlightStyle:type(highlightStyle)==="string"?highlightStyle:"",textExtStyle:type(textExtStyle)==="string"?textExtStyle:"",selectStyle:type(selectStyle)==="string"?selectStyle:"",parentStyle:type(parentStyle)==="string"?parentStyle:"",grandStyle:type(grandStyle)==="string"?grandStyle:"",injectJs:type(injectJs)==="string"?injectJs:"",// injectCss: type(injectCss) === "string" ? injectCss : "", +apiSlug:type(apiSlug)==="string"&&apiSlug.trim()!==""?apiSlug.trim():rules_GLOBAL_KEY,fromLang:matchValue([rules_GLOBAL_KEY,...fromLangs],fromLang),toLang:matchValue([rules_GLOBAL_KEY,...toLangs],toLang),// textStyle: matchValue([GLOBAL_KEY, ...OPT_STYLE_ALL], textStyle), +textStyle:type(textStyle)==="string"&&textStyle.trim()!==""?textStyle.trim():rules_GLOBAL_KEY,transOpen:matchValue([rules_GLOBAL_KEY,"true","false"],transOpen),transOnly:matchValue([rules_GLOBAL_KEY,"true","false"],transOnly),autoScan:matchValue([rules_GLOBAL_KEY,"true","false"],autoScan),hasRichText:matchValue([rules_GLOBAL_KEY,"true","false"],hasRichText),hasShadowroot:matchValue([rules_GLOBAL_KEY,"true","false"],hasShadowroot),transTag:matchValue([rules_GLOBAL_KEY,"span","font"],transTag),transTitle:matchValue([rules_GLOBAL_KEY,"true","false"],transTitle),transStartHook:type(transStartHook)==="string"?transStartHook:"",transEndHook:type(transEndHook)==="string"?transEndHook:"",// transRemoveHook: // type(transRemoveHook) === "string" ? transRemoveHook : "", -// fixerFunc: matchValue([GLOBAL_KEY, ...FIXER_ALL], fixerFunc), splitParagraph:matchValue([rules_GLOBAL_KEY,...OPT_SPLIT_PARAGRAPH_ALL],splitParagraph),splitLength:Number.isInteger(splitLength)?splitLength:0,highlightWords:matchValue([rules_GLOBAL_KEY,...OPT_HIGHLIGHT_WORDS_ALL],highlightWords)};});return rules;};/** * 保存或更新rule * @param {*} curRule @@ -72660,10 +72675,7 @@ var Sync = __webpack_require__(6412); /** * 订阅规则 * @returns - */function useSubRules(){const[loading,setLoading]=(0,react.useState)(false);const[selectedRules,setSelectedRules]=(0,react.useState)([]);const{setting,updateSetting}=Setting_useSetting();const list=(setting===null||setting===void 0?void 0:setting.subrulesList)||DEFAULT_SUBRULES_LIST;const selectedSub=(0,react.useMemo)(()=>list.find(item=>item.selected),[list]);const selectedUrl=selectedSub.url;const selectSub=(0,react.useCallback)(url=>{updateSetting(prev=>({...prev,subrulesList:prev.subrulesList.map(item=>({...item,selected:item.url===url}))}));},[updateSetting]);const addSub=(0,react.useCallback)(url=>{updateSetting(prev=>({...prev,subrulesList:[...prev.subrulesList,{url,selected:false}]}));},[updateSetting]);const delSub=(0,react.useCallback)(url=>{updateSetting(prev=>({...prev,subrulesList:prev.subrulesList.filter(item=>item.url!==url)}));},[updateSetting]);(0,react.useEffect)(()=>{(async()=>{if(selectedUrl){try{setLoading(true);const rules=await subRules_loadOrFetchSubRules(selectedUrl);setSelectedRules(rules);}catch(err){log_kissLog("loadOrFetchSubRules",err);}finally{setLoading(false);}}})();},[selectedUrl]);return{subList:list,selectSub,addSub,delSub,selectedSub,selectedUrl,selectedRules,setSelectedRules,loading};}/** - * 覆写订阅规则 - * @returns - */function useOwSubRule(){const{setting,updateChild}=useSetting();const owSubrule=(setting===null||setting===void 0?void 0:setting.owSubrule)||DEFAULT_OW_RULE;const updateOwSubrule=updateChild("owSubrule");return{owSubrule,updateOwSubrule};} + */function useSubRules(){const[loading,setLoading]=(0,react.useState)(false);const[selectedRules,setSelectedRules]=(0,react.useState)([]);const{setting,updateSetting}=useSetting();const list=(setting===null||setting===void 0?void 0:setting.subrulesList)||DEFAULT_SUBRULES_LIST;const selectedSub=(0,react.useMemo)(()=>list.find(item=>item.selected),[list]);const selectedUrl=selectedSub.url;const selectSub=(0,react.useCallback)(url=>{updateSetting(prev=>({...prev,subrulesList:prev.subrulesList.map(item=>({...item,selected:item.url===url}))}));},[updateSetting]);const addSub=(0,react.useCallback)(url=>{updateSetting(prev=>({...prev,subrulesList:[...prev.subrulesList,{url,selected:false}]}));},[updateSetting]);const delSub=(0,react.useCallback)(url=>{updateSetting(prev=>({...prev,subrulesList:prev.subrulesList.filter(item=>item.url!==url)}));},[updateSetting]);(0,react.useEffect)(()=>{(async()=>{if(selectedUrl){try{setLoading(true);const rules=await subRules_loadOrFetchSubRules(selectedUrl);setSelectedRules(rules);}catch(err){log_kissLog("loadOrFetchSubRules",err);}finally{setLoading(false);}}})();},[selectedUrl]);return{subList:list,selectSub,addSub,delSub,selectedSub,selectedUrl,selectedRules,setSelectedRules,loading};} ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+base@5.0.0-beta.40_@types+react@18.2.79_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@mui/base/ClickAwayListener/ClickAwayListener.js 'use client'; @@ -73469,7 +73481,7 @@ var Save = __webpack_require__(4057); ;// CONCATENATED MODULE: ./src/hooks/ValidationInput.js function ValidationInput(_ref){let{value,onChange,name,min,max,isFloat=false,...props}=_ref;const[localValue,setLocalValue]=(0,react.useState)(value);(0,react.useEffect)(()=>{setLocalValue(value);},[value]);const handleLocalChange=e=>{setLocalValue(e.target.value);};const handleBlur=()=>{const numValue=Number(localValue);if(isNaN(numValue)){setLocalValue(value);return;}const validatedValue=isFloat?limitFloat(numValue,min,max):limitNumber(numValue,min,max);if(validatedValue!==numValue){setLocalValue(validatedValue);}onChange({target:{name:name,value:validatedValue},preventDefault:()=>{}});};return/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{...props,type:"number",name:name,value:localValue,onChange:handleLocalChange,onBlur:handleBlur});}/* harmony default export */ const hooks_ValidationInput = (ValidationInput); ;// CONCATENATED MODULE: ./src/hooks/Api.js -function useApiState(){const{setting,updateSetting}=Setting_useSetting();const transApis=(setting===null||setting===void 0?void 0:setting.transApis)||[];return{transApis,updateSetting};}function useApiList(){const{transApis,updateSetting}=useApiState();(0,react.useEffect)(()=>{const curSlugs=new Set(transApis.map(api=>api.apiSlug));const missApis=DEFAULT_API_LIST.filter(api=>!curSlugs.has(api.apiSlug));if(missApis.length>0){updateSetting(prev=>({...prev,transApis:[...((prev===null||prev===void 0?void 0:prev.transApis)||[]),...missApis]}));}},[transApis,updateSetting]);const userApis=(0,react.useMemo)(()=>transApis.filter(api=>!API_SPE_TYPES.builtin.has(api.apiSlug)).sort((a,b)=>a.apiSlug.localeCompare(b.apiSlug)),[transApis]);const builtinApis=(0,react.useMemo)(()=>transApis.filter(api=>API_SPE_TYPES.builtin.has(api.apiSlug)),[transApis]);const enabledApis=(0,react.useMemo)(()=>transApis.filter(api=>!api.isDisabled),[transApis]);const aiEnabledApis=(0,react.useMemo)(()=>enabledApis.filter(api=>API_SPE_TYPES.ai.has(api.apiType)),[enabledApis]);const addApi=(0,react.useCallback)(apiType=>{const defaultApiOpt=DEFAULT_API_LIST.find(da=>da.apiType===apiType)||{};const uuid=crypto.randomUUID();const apiSlug="".concat(apiType,"_").concat(crypto.randomUUID());const apiName="".concat(apiType,"_").concat(uuid.slice(0,8));const newApi={...defaultApiOpt,apiSlug,apiName,apiType};updateSetting(prev=>({...prev,transApis:[...((prev===null||prev===void 0?void 0:prev.transApis)||[]),newApi]}));},[updateSetting]);const deleteApi=(0,react.useCallback)(apiSlug=>{updateSetting(prev=>({...prev,transApis:((prev===null||prev===void 0?void 0:prev.transApis)||[]).filter(api=>api.apiSlug!==apiSlug)}));},[updateSetting]);return{transApis,userApis,builtinApis,enabledApis,aiEnabledApis,addApi,deleteApi};}function useApiItem(apiSlug){const{transApis,updateSetting}=useApiState();const api=(0,react.useMemo)(()=>transApis.find(a=>a.apiSlug===apiSlug),[transApis,apiSlug]);const update=(0,react.useCallback)(updateData=>{updateSetting(prev=>({...prev,transApis:((prev===null||prev===void 0?void 0:prev.transApis)||[]).map(item=>item.apiSlug===apiSlug?{...item,...updateData,apiSlug}:item)}));},[apiSlug,updateSetting]);const reset=(0,react.useCallback)(()=>{updateSetting(prev=>({...prev,transApis:((prev===null||prev===void 0?void 0:prev.transApis)||[]).map(item=>{if(item.apiSlug===apiSlug){const defaultApiOpt=DEFAULT_API_LIST.find(da=>da.apiType===item.apiType)||{};return{...defaultApiOpt,apiSlug:item.apiSlug,apiName:item.apiName,apiType:item.apiType,key:item.key};}return item;})}));},[apiSlug,updateSetting]);return{api,update,reset};} +function useApiState(){const{setting,updateSetting}=useSetting();const transApis=(setting===null||setting===void 0?void 0:setting.transApis)||[];return{transApis,updateSetting};}function useApiList(){const{transApis,updateSetting}=useApiState();(0,react.useEffect)(()=>{const curSlugs=new Set(transApis.map(api=>api.apiSlug));const missApis=DEFAULT_API_LIST.filter(api=>!curSlugs.has(api.apiSlug));if(missApis.length>0){updateSetting(prev=>({...prev,transApis:[...((prev===null||prev===void 0?void 0:prev.transApis)||[]),...missApis]}));}},[transApis,updateSetting]);const userApis=(0,react.useMemo)(()=>transApis.filter(api=>!API_SPE_TYPES.builtin.has(api.apiSlug)).sort((a,b)=>a.apiSlug.localeCompare(b.apiSlug)),[transApis]);const builtinApis=(0,react.useMemo)(()=>transApis.filter(api=>API_SPE_TYPES.builtin.has(api.apiSlug)),[transApis]);const enabledApis=(0,react.useMemo)(()=>transApis.filter(api=>!api.isDisabled),[transApis]);const aiEnabledApis=(0,react.useMemo)(()=>enabledApis.filter(api=>API_SPE_TYPES.ai.has(api.apiType)),[enabledApis]);const addApi=(0,react.useCallback)(apiType=>{const defaultApiOpt=DEFAULT_API_LIST.find(da=>da.apiType===apiType)||{};const uuid=crypto.randomUUID();const apiSlug="".concat(apiType,"_").concat(crypto.randomUUID());const apiName="".concat(apiType,"_").concat(uuid.slice(0,8));const newApi={...defaultApiOpt,apiSlug,apiName,apiType};updateSetting(prev=>({...prev,transApis:[...((prev===null||prev===void 0?void 0:prev.transApis)||[]),newApi]}));},[updateSetting]);const deleteApi=(0,react.useCallback)(apiSlug=>{updateSetting(prev=>({...prev,transApis:((prev===null||prev===void 0?void 0:prev.transApis)||[]).filter(api=>api.apiSlug!==apiSlug)}));},[updateSetting]);return{transApis,userApis,builtinApis,enabledApis,aiEnabledApis,addApi,deleteApi};}function useApiItem(apiSlug){const{transApis,updateSetting}=useApiState();const api=(0,react.useMemo)(()=>transApis.find(a=>a.apiSlug===apiSlug),[transApis,apiSlug]);const update=(0,react.useCallback)(updateData=>{updateSetting(prev=>({...prev,transApis:((prev===null||prev===void 0?void 0:prev.transApis)||[]).map(item=>item.apiSlug===apiSlug?{...item,...updateData,apiSlug}:item)}));},[apiSlug,updateSetting]);const reset=(0,react.useCallback)(()=>{updateSetting(prev=>({...prev,transApis:((prev===null||prev===void 0?void 0:prev.transApis)||[]).map(item=>{if(item.apiSlug===apiSlug){const defaultApiOpt=DEFAULT_API_LIST.find(da=>da.apiType===item.apiType)||{};return{...defaultApiOpt,apiSlug:item.apiSlug,apiName:item.apiName,apiType:item.apiType,key:item.key};}return item;})}));},[apiSlug,updateSetting]);return{api,update,reset};} // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+icons-material@5.15.15_@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@1_1e29dcefa4691dc57f2acd9f73947cfd/node_modules/@mui/icons-material/ExpandLess.js var ExpandLess = __webpack_require__(1683); ;// CONCATENATED MODULE: ./src/views/Options/ShowMoreButton.js @@ -75052,37 +75064,44 @@ var _createEmotion = createEmotion({ cache = _createEmotion.cache; ;// CONCATENATED MODULE: ./src/libs/style.js -var style_templateObject,style_templateObject2,style_templateObject3,style_templateObject4;const gradientFlow=keyframes(style_templateObject||(style_templateObject=taggedTemplateLiteral_taggedTemplateLiteral(["\n to {\n background-position: 200% center;\n }\n"])));const blink=keyframes(style_templateObject2||(style_templateObject2=taggedTemplateLiteral_taggedTemplateLiteral(["\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n"])));const glow=keyframes(style_templateObject3||(style_templateObject3=taggedTemplateLiteral_taggedTemplateLiteral(["\n from {\n text-shadow: 0 0 10px #fff, \n 0 0 20px #fff, \n 0 0 30px #0073e6, \n 0 0 40px #0073e6;\n }\n to {\n text-shadow: 0 0 20px #fff, \n 0 0 30px #ff4da6, \n 0 0 40px #ff4da6, \n 0 0 50px #ff4da6;\n }\n"])));const genLineStyle=(style,color)=>"\n text-decoration-line: underline;\n text-decoration-style: ".concat(style,";\n text-decoration-color: ").concat(color,";\n text-decoration-thickness: 2px;\n text-underline-offset: 0.3em;\n -webkit-text-decoration-line: underline;\n -webkit-text-decoration-style: ").concat(style,";\n -webkit-text-decoration-color: ").concat(color,";\n -webkit-text-decoration-thickness: 2px;\n -webkit-text-underline-offset: 0.3em;\n\n /* opacity: 0.8;\n -webkit-opacity: 0.8;\n &:hover {\n opacity: 1;\n -webkit-opacity: 1;\n } */\n");const genStyles=function(){let{textDiyStyle=DEFAULT_DIY_STYLE,bgColor=rules_DEFAULT_COLOR}=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return{// 无样式 +var style_templateObject,style_templateObject2,style_templateObject3,style_templateObject4;const gradientFlow=keyframes(style_templateObject||(style_templateObject=taggedTemplateLiteral_taggedTemplateLiteral(["\n to {\n background-position: 200% center;\n }\n"])));const blink=keyframes(style_templateObject2||(style_templateObject2=taggedTemplateLiteral_taggedTemplateLiteral(["\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n"])));const glow=keyframes(style_templateObject3||(style_templateObject3=taggedTemplateLiteral_taggedTemplateLiteral(["\n from {\n text-shadow: 0 0 10px #fff, \n 0 0 20px #fff, \n 0 0 30px #0073e6, \n 0 0 40px #0073e6;\n }\n to {\n text-shadow: 0 0 20px #fff, \n 0 0 30px #ff4da6, \n 0 0 40px #ff4da6, \n 0 0 50px #ff4da6;\n }\n"])));const genLineStyle=function(style,color){let thickness=arguments.length>2&&arguments[2]!==undefined?arguments[2]:1;return"\n text-decoration-line: underline;\n text-decoration-style: ".concat(style,";\n text-decoration-color: ").concat(color,";\n text-decoration-thickness: ").concat(thickness,"px;\n text-underline-offset: 0.3em;\n -webkit-text-decoration-line: underline;\n -webkit-text-decoration-style: ").concat(style,";\n -webkit-text-decoration-color: ").concat(color,";\n -webkit-text-decoration-thickness: 1px;\n -webkit-text-underline-offset: 0.3em;\n\n opacity: 0.8;\n -webkit-opacity: 0.8;\n &:hover {\n opacity: 1;\n -webkit-opacity: 1;\n }\n");};const genBuiltinStyles=function(){let color=arguments.length>0&&arguments[0]!==undefined?arguments[0]:DEFAULT_COLOR;return{// 无样式 [OPT_STYLE_NONE]:"",// 下划线 -[OPT_STYLE_LINE]:genLineStyle("solid",bgColor),// 点状线 -[OPT_STYLE_DOTLINE]:genLineStyle("dotted",bgColor),// 虚线 -[OPT_STYLE_DASHLINE]:genLineStyle("dashed",bgColor),// 波浪线 -[OPT_STYLE_WAVYLINE]:genLineStyle("wavy",bgColor),// 虚线框 -[OPT_STYLE_DASHBOX]:"\n border: 2px dashed ".concat(bgColor||rules_DEFAULT_COLOR,";\n display: block;\n padding: 0.2em 0.4em;\n box-sizing: border-box;\n "),// 模糊 +[OPT_STYLE_LINE]:genLineStyle("solid",color),// 点状线 +[OPT_STYLE_DOTLINE]:genLineStyle("dotted",color),// 虚线 +[OPT_STYLE_DASHLINE]:genLineStyle("dashed",color),// 虚线加粗 +[OPT_STYLE_DASHLINE_BOLD]:genLineStyle("dashed",color,2),// 波浪线 +[OPT_STYLE_WAVYLINE]:genLineStyle("wavy",color),// 波浪线加粗 +[OPT_STYLE_WAVYLINE_BOLD]:genLineStyle("wavy",color,2),// 虚线框 +[OPT_STYLE_DASHBOX]:"\n border: 1px dashed ".concat(color,";\n display: block;\n padding: 0.2em 0.3em;\n box-sizing: border-box;\n "),// 虚线框加粗 +[OPT_STYLE_DASHBOX_BOLD]:"\n border: 2px dashed ".concat(color,";\n display: block;\n padding: 0.2em 0.3em;\n box-sizing: border-box;\n "),// 马克笔 +[OPT_STYLE_MARKER]:"\n background: linear-gradient(to top, ".concat(color," 50%, transparent 50%);\n "),// 渐变马克笔 +[OPT_STYLE_GRADIENT_MARKER]:"\n background: linear-gradient(to top, transparent, ".concat(color," 20%, transparent 60%);\n "),// 模糊 [OPT_STYLE_FUZZY]:"\n filter: blur(0.2em);\n -webkit-filter: blur(0.2em);\n &:hover {\n filter: none;\n -webkit-filter: none;\n }\n ",// 高亮 -[OPT_STYLE_HIGHLIGHT]:"\n color: #fff;\n background-color: ".concat(bgColor||rules_DEFAULT_COLOR,";\n "),// 引用 -[OPT_STYLE_BLOCKQUOTE]:"\n opacity: 0.8;\n -webkit-opacity: 0.8;\n display: block;\n padding: 0.25em 0.5em;\n border-left: 0.5em solid ".concat(bgColor||rules_DEFAULT_COLOR,";\n background: rgb(32, 156, 238, 0.2);\n &:hover {\n opacity: 1;\n -webkit-opacity: 1;\n }\n "),// 渐变 +[OPT_STYLE_HIGHLIGHT]:"\n color: #fff;\n background-color: ".concat(color,";\n "),// 引用 +[OPT_STYLE_BLOCKQUOTE]:"\n opacity: 0.8;\n -webkit-opacity: 0.8;\n display: block;\n padding: 0.25em 0.5em;\n border-left: 0.25em solid ".concat(color,";\n background: rgb(32, 156, 238, 0.2);\n &:hover {\n opacity: 1;\n -webkit-opacity: 1;\n }\n "),// 渐变 [OPT_STYLE_GRADIENT]:"\n background-image: linear-gradient(\n 90deg,\n #3b82f6,\n #9333ea,\n #ec4899,\n #3b82f6\n );\n background-size: 200% auto;\n color: transparent;\n -webkit-background-clip: text;\n background-clip: text;\n animation: ".concat(gradientFlow," 4s linear infinite;\n "),// 闪现 [OPT_STYLE_BLINK]:"\n animation: ".concat(blink," 1s infinite;\n "),// 发光 -[OPT_STYLE_GLOW]:"\n animation: ".concat(glow," 2s ease-in-out infinite alternate;\n "),// 自定义 -[OPT_STYLE_DIY]:"\n".concat(textDiyStyle,"\n")};};const genTextClass=_ref=>{let{textDiyStyle,bgColor=DEFAULT_COLOR}=_ref;const styles=genStyles({textDiyStyle,bgColor});const textClass={};let textStyles="";Object.entries(styles).forEach(_ref2=>{let[k,v]=_ref2;textClass[k]=css(style_templateObject4||(style_templateObject4=_taggedTemplateLiteral(["\n ","\n "])),v);});Object.entries(styles).forEach(_ref3=>{let[k,v]=_ref3;textStyles+="\n .".concat(textClass[k]," {\n ").concat(v,"\n }\n ");});return[textClass,textStyles];};const defaultStyles=genStyles(); +[OPT_STYLE_GLOW]:"\n animation: ".concat(glow," 2s ease-in-out infinite alternate;\n "),// 多彩 +[OPT_STYLE_COLORFUL]:"\n color: #333;\n background: linear-gradient(\n 45deg,\n LightGreen 20%,\n LightPink 20% 40%,\n LightSalmon 40% 60%,\n LightSeaGreen 60% 80%,\n LightSkyBlue 80%\n );\n &:hover {\n color: #111;\n };\n "};};const genTextClass=function(){let customStyles=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];const styles=genBuiltinStyles();customStyles.forEach(style=>{styles[style.styleSlug]=style.styleCode;});const textClass={};let textStyles="";Object.entries(styles).forEach(_ref=>{let[k,v]=_ref;textClass[k]=css(style_templateObject4||(style_templateObject4=_taggedTemplateLiteral(["\n ","\n "])),v);});Object.entries(styles).forEach(_ref2=>{let[k,v]=_ref2;textStyles+="\n .".concat(textClass[k]," {\n ").concat(v,"\n }\n ");});return[textClass,textStyles];};const builtinStylesMap=genBuiltinStyles(); +;// CONCATENATED MODULE: ./src/hooks/CustomStyles.js +function useStyleState(){const{setting,updateSetting}=useSetting();const customStyles=(setting===null||setting===void 0?void 0:setting.customStyles)||[];return{customStyles,updateSetting};}function useStyleList(){const{customStyles,updateSetting}=useStyleState();const addStyle=(0,react.useCallback)(()=>{const defaultStyle=DEFAULT_CUSTOM_STYLES[0];const uuid=crypto.randomUUID();const styleSlug="custom_".concat(crypto.randomUUID());const styleName="Style_".concat(uuid.slice(0,8));const newStyle={...defaultStyle,styleSlug,styleName};updateSetting(prev=>({...prev,customStyles:[...((prev===null||prev===void 0?void 0:prev.customStyles)||[]),newStyle]}));},[updateSetting]);const deleteStyle=(0,react.useCallback)(styleSlug=>{updateSetting(prev=>({...prev,customStyles:((prev===null||prev===void 0?void 0:prev.customStyles)||[]).filter(item=>item.styleSlug!==styleSlug)}));},[updateSetting]);const updateStyle=(0,react.useCallback)((styleSlug,updateData)=>{updateSetting(prev=>({...prev,customStyles:((prev===null||prev===void 0?void 0:prev.customStyles)||[]).map(item=>item.styleSlug===styleSlug?{...item,...updateData}:item)}));},[updateSetting]);return{customStyles,addStyle,deleteStyle,updateStyle};}function useAllTextStyles(){const{customStyles}=useStyleList();const i18n=useI18n();const builtinStyles=(0,react.useMemo)(()=>OPT_STYLE_ALL.map(styleSlug=>({styleSlug,styleName:i18n(styleSlug),styleCode:builtinStylesMap[styleSlug]||""})),[i18n]);const allTextStyles=(0,react.useMemo)(()=>{return[...builtinStyles,...customStyles];},[builtinStyles,customStyles]);return{builtinStyles,customStyles,allTextStyles};} ;// CONCATENATED MODULE: ./src/views/Options/Rules.js -// import OwSubRule from "./OwSubRule"; -const calculateInitialValues=rule=>{const base=(rule===null||rule===void 0?void 0:rule.pattern)==="*"?rules_GLOBLA_RULE:rules_DEFAULT_RULE;return{...base,...(rule||{})};};function RuleFields(_ref){let{rule,rules,setShow,setKeyword}=_ref;const editMode=(0,react.useMemo)(()=>!!rule,[rule]);const i18n=useI18n();const[disabled,setDisabled]=(0,react.useState)(editMode);const[errors,setErrors]=(0,react.useState)({});const[initialFormValues,setInitialFormValues]=(0,react.useState)(()=>calculateInitialValues(rule));const[formValues,setFormValues]=(0,react.useState)(initialFormValues);const[showMore,setShowMore]=(0,react.useState)(!rules);const{enabledApis}=useApiList();(0,react.useEffect)(()=>{const newInitialValues=calculateInitialValues(rule);setInitialFormValues(newInitialValues);setFormValues(newInitialValues);},[rule]);const{pattern,selector,keepSelector="",rootsSelector="",ignoreSelector="",terms="",aiTerms="",termsStyle="",highlightStyle="color: red;",selectStyle="",parentStyle="",grandStyle="",injectJs="",// injectCss = "", -apiSlug,fromLang,toLang,textStyle,transOpen,bgColor,textDiyStyle,transOnly="false",autoScan="true",hasRichText="true",hasShadowroot="false",// transTiming = OPT_TIMING_PAGESCROLL, +const calculateInitialValues=rule=>{const base=(rule===null||rule===void 0?void 0:rule.pattern)==="*"?rules_GLOBLA_RULE:rules_DEFAULT_RULE;return{...base,...(rule||{})};};function RuleFields(_ref){let{rule,rules,setShow,setKeyword}=_ref;const editMode=(0,react.useMemo)(()=>!!rule,[rule]);const i18n=useI18n();const[disabled,setDisabled]=(0,react.useState)(editMode);const[errors,setErrors]=(0,react.useState)({});const[initialFormValues,setInitialFormValues]=(0,react.useState)(()=>calculateInitialValues(rule));const[formValues,setFormValues]=(0,react.useState)(initialFormValues);const[showMore,setShowMore]=(0,react.useState)(!rules);const{enabledApis}=useApiList();const{allTextStyles}=useAllTextStyles();(0,react.useEffect)(()=>{const newInitialValues=calculateInitialValues(rule);setInitialFormValues(newInitialValues);setFormValues(newInitialValues);},[rule]);const{pattern,selector,keepSelector="",rootsSelector="",ignoreSelector="",terms="",aiTerms="",termsStyle="",highlightStyle="color: red;",textExtStyle="",selectStyle="",parentStyle="",grandStyle="",injectJs="",// injectCss = "", +apiSlug,fromLang,toLang,textStyle,transOpen,// bgColor, +// textDiyStyle, +transOnly="false",autoScan="true",hasRichText="true",hasShadowroot="false",// transTiming = OPT_TIMING_PAGESCROLL, transTag=DEFAULT_TRANS_TAG,transTitle="false",// detectRemote = "true", // skipLangs = [], // fixerSelector = "", // fixerFunc = "-", transStartHook="",transEndHook="",// transRemoveHook = "", -splitParagraph=OPT_SPLIT_PARAGRAPH_DISABLE,splitLength=0,highlightWords=OPT_HIGHLIGHT_WORDS_DISABLE}=formValues;const isModified=(0,react.useMemo)(()=>{return JSON.stringify(initialFormValues)!==JSON.stringify(formValues);},[initialFormValues,formValues]);const stylesExample=(0,react.useMemo)(()=>{return Object.entries(defaultStyles).filter(_ref2=>{let[_,v]=_ref2;return v;}).map(_ref3=>{let[k,v]=_ref3;return"".concat(i18n(k),":").concat(v);}).join("\n");},[i18n]);const hasSamePattern=str=>{for(const item of rules.list){if(item.pattern===str&&(rule===null||rule===void 0?void 0:rule.pattern)!==str){return true;}}return false;};const handleFocus=e=>{e.preventDefault();const{name}=e.target;setErrors(pre=>({...pre,[name]:""}));};const handlePatternChange=(0,react.useMemo)(()=>debounce(async patterns=>{setKeyword(patterns.trim());},500),[setKeyword]);const handleChange=e=>{e.preventDefault();const{name,value}=e.target;setFormValues(pre=>({...pre,[name]:value}));if(name==="pattern"&&!editMode){handlePatternChange(value);}};const handleCancel=e=>{e.preventDefault();if(editMode){setDisabled(true);}else{setShow(false);}setErrors({});setFormValues(initialFormValues);};const handleRestore=e=>{e.preventDefault();setFormValues(_ref4=>{let{pattern}=_ref4;return{...(pattern==="*"?rules_GLOBLA_RULE:rules_DEFAULT_RULE),pattern};});};const handleSubmit=e=>{e.preventDefault();const errors={};if(!pattern.trim()){errors.pattern=i18n("error_cant_be_blank");}if(hasSamePattern(pattern)){errors.pattern=i18n("error_duplicate_values");}if(pattern==="*"&&!errors.pattern&&!selector.trim()){errors.selector=i18n("error_cant_be_blank");}if(Object.keys(errors).length>0){setErrors(errors);return;}if(editMode){// 编辑 +splitParagraph=OPT_SPLIT_PARAGRAPH_DISABLE,splitLength=0,highlightWords=OPT_HIGHLIGHT_WORDS_DISABLE}=formValues;const isModified=(0,react.useMemo)(()=>{return JSON.stringify(initialFormValues)!==JSON.stringify(formValues);},[initialFormValues,formValues]);const hasSamePattern=str=>{for(const item of rules.list){if(item.pattern===str&&(rule===null||rule===void 0?void 0:rule.pattern)!==str){return true;}}return false;};const handleFocus=e=>{e.preventDefault();const{name}=e.target;setErrors(pre=>({...pre,[name]:""}));};const handlePatternChange=(0,react.useMemo)(()=>debounce(async patterns=>{setKeyword(patterns.trim());},500),[setKeyword]);const handleChange=e=>{e.preventDefault();const{name,value}=e.target;setFormValues(pre=>({...pre,[name]:value}));if(name==="pattern"&&!editMode){handlePatternChange(value);}};const handleCancel=e=>{e.preventDefault();if(editMode){setDisabled(true);}else{setShow(false);}setErrors({});setFormValues(initialFormValues);};const handleRestore=e=>{e.preventDefault();setFormValues(_ref2=>{let{pattern}=_ref2;return{...(pattern==="*"?rules_GLOBLA_RULE:rules_DEFAULT_RULE),pattern};});};const handleSubmit=e=>{e.preventDefault();const errors={};if(!pattern.trim()){errors.pattern=i18n("error_cant_be_blank");}if(hasSamePattern(pattern)){errors.pattern=i18n("error_duplicate_values");}if(pattern==="*"&&!errors.pattern&&!selector.trim()){errors.selector=i18n("error_cant_be_blank");}if(Object.keys(errors).length>0){setErrors(errors);return;}if(editMode){// 编辑 setDisabled(true);rules.put(rule.pattern,formValues);}else{// 添加 -rules.add(formValues);setShow(false);setFormValues(initialFormValues);}};const GlobalItem=(rule===null||rule===void 0?void 0:rule.pattern)!=="*"&&/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:rules_GLOBAL_KEY,children:rules_GLOBAL_KEY},rules_GLOBAL_KEY);return/*#__PURE__*/(0,jsx_runtime.jsx)("form",{onSubmit:handleSubmit,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("pattern"),error:!!errors.pattern,helperText:errors.pattern||i18n("pattern_helper"),name:"pattern",value:pattern,disabled:(rule===null||rule===void 0?void 0:rule.pattern)==="*"||disabled,onChange:handleChange,onFocus:handleFocus,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("root_selector"),helperText:i18n("root_selector_helper"),name:"rootsSelector",value:rootsSelector,disabled:disabled,onChange:handleChange,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("ignore_selector"),helperText:i18n("ignore_selector_helper"),name:"ignoreSelector",value:ignoreSelector,disabled:disabled,onChange:handleChange,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("target_selector"),error:!!errors.selector,helperText:errors.selector||i18n("selector_helper"),name:"selector",value:selector,disabled:autoScan==="true"||disabled,onChange:handleChange,onFocus:handleFocus,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("keep_selector"),helperText:i18n("keep_selector_helper"),name:"keepSelector",value:keepSelector,disabled:disabled,onChange:handleChange,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"transOpen",value:transOpen,label:i18n("translate_switch"),disabled:disabled,onChange:handleChange,children:[GlobalItem,/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"true",children:i18n("default_enabled")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"false",children:i18n("default_disabled")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"apiSlug",value:apiSlug,label:i18n("translate_service"),disabled:disabled,onChange:handleChange,children:[GlobalItem,enabledApis.map(api=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:api.apiSlug,children:api.apiName},api.apiSlug))]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"fromLang",value:fromLang,label:i18n("from_lang"),disabled:disabled,onChange:handleChange,children:[GlobalItem,OPT_LANGS_FROM.map(_ref5=>{let[lang,name]=_ref5;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"toLang",value:toLang,label:i18n("to_lang"),disabled:disabled,onChange:handleChange,children:[GlobalItem,OPT_LANGS_TO.map(_ref6=>{let[lang,name]=_ref6;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"autoScan",value:autoScan,label:i18n("auto_scan_page"),disabled:disabled,onChange:handleChange,children:[GlobalItem,/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"false",children:i18n("disable")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"true",children:i18n("enable")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"hasRichText",value:hasRichText,label:i18n("has_rich_text"),disabled:disabled,onChange:handleChange,children:[GlobalItem,/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"false",children:i18n("disable")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"true",children:i18n("enable")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"hasShadowroot",value:hasShadowroot,label:i18n("has_shadowroot"),disabled:disabled,onChange:handleChange,children:[GlobalItem,/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"false",children:i18n("disable")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"true",children:i18n("enable")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"transOnly",value:transOnly,label:i18n("show_only_translations"),disabled:disabled,onChange:handleChange,children:[GlobalItem,/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"false",children:i18n("disable")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"true",children:i18n("enable")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"splitParagraph",value:splitParagraph,label:i18n("split_paragraph"),disabled:disabled,onChange:handleChange,children:[GlobalItem,OPT_SPLIT_PARAGRAPH_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:i18n(item)},item))]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{fullWidth:true,size:"small",label:i18n("split_length"),type:"number",name:"splitLength",value:splitLength,disabled:disabled,onChange:handleChange,min:0,max:1000})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"highlightWords",value:highlightWords,label:i18n("highlight_words"),disabled:disabled,onChange:handleChange,children:[GlobalItem,OPT_HIGHLIGHT_WORDS_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:i18n(item)},item))]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"transTitle",value:transTitle,label:i18n("translate_page_title"),disabled:disabled,onChange:handleChange,children:[GlobalItem,/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"false",children:i18n("disable")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"true",children:i18n("enable")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"transTag",value:transTag,label:i18n("translation_element_tag"),disabled:disabled,onChange:handleChange,children:[GlobalItem,/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"span",children:""}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"font",children:""})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"textStyle",value:textStyle,label:i18n("text_style"),disabled:disabled,onChange:handleChange,children:[GlobalItem,OPT_STYLE_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:i18n(item)},item))]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",fullWidth:true,name:"bgColor",value:bgColor,label:i18n("bg_color"),disabled:disabled,onChange:handleChange})})]})}),textStyle===OPT_STYLE_DIY&&/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("diy_style"),FormHelperTextProps:{component:"div"},helperText:/*#__PURE__*/(0,jsx_runtime.jsxs)(Box_Box,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{component:"div",children:i18n("default_styles_example")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{component:"pre",sx:{overflowX:"auto",height:200,resize:"vertical",minHeight:100,margin:0// border: "1px solid #ccc", -},children:stylesExample})]}),name:"textDiyStyle",value:textDiyStyle,disabled:disabled,onChange:handleChange,maxRows:10,multiline:true}),showMore&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("terms"),helperText:i18n("terms_helper"),name:"terms",value:terms,disabled:disabled,onChange:handleChange,multiline:true,maxRows:10}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("ai_terms"),helperText:i18n("ai_terms_helper"),name:"aiTerms",value:aiTerms,disabled:disabled,onChange:handleChange,multiline:true,maxRows:10}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("terms_style"),name:"termsStyle",value:termsStyle,disabled:disabled,onChange:handleChange,maxRows:10,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("highlight_style"),name:"highlightStyle",value:highlightStyle,disabled:disabled,onChange:handleChange,maxRows:10,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("selector_style"),name:"selectStyle",value:selectStyle,disabled:disabled,onChange:handleChange,maxRows:10,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("selector_parent_style"),name:"parentStyle",value:parentStyle,disabled:disabled,onChange:handleChange,maxRows:10,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("selector_grand_style"),name:"grandStyle",value:grandStyle,disabled:disabled,onChange:handleChange,maxRows:10,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("translate_start_hook"),helperText:i18n("translate_start_hook_helper"),name:"transStartHook",value:transStartHook,disabled:disabled,onChange:handleChange,multiline:true,maxRows:10}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("translate_end_hook"),helperText:i18n("translate_end_hook_helper"),name:"transEndHook",value:transEndHook,disabled:disabled,onChange:handleChange,multiline:true,maxRows:10}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("inject_js"),helperText:i18n("inject_js_helper"),name:"injectJs",value:injectJs,disabled:disabled,onChange:handleChange,maxRows:10,multiline:true})]}),rules&&(editMode?/*#__PURE__*/ // 编辑 +rules.add(formValues);setShow(false);setFormValues(initialFormValues);}};const GlobalItem=(rule===null||rule===void 0?void 0:rule.pattern)!=="*"&&/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:rules_GLOBAL_KEY,children:rules_GLOBAL_KEY},rules_GLOBAL_KEY);return/*#__PURE__*/(0,jsx_runtime.jsx)("form",{onSubmit:handleSubmit,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("pattern"),error:!!errors.pattern,helperText:errors.pattern||i18n("pattern_helper"),name:"pattern",value:pattern,disabled:(rule===null||rule===void 0?void 0:rule.pattern)==="*"||disabled,onChange:handleChange,onFocus:handleFocus,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("root_selector"),helperText:i18n("root_selector_helper"),name:"rootsSelector",value:rootsSelector,disabled:disabled,onChange:handleChange,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("ignore_selector"),helperText:i18n("ignore_selector_helper"),name:"ignoreSelector",value:ignoreSelector,disabled:disabled,onChange:handleChange,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("target_selector"),error:!!errors.selector,helperText:errors.selector||i18n("selector_helper"),name:"selector",value:selector,disabled:autoScan==="true"||disabled,onChange:handleChange,onFocus:handleFocus,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("keep_selector"),helperText:i18n("keep_selector_helper"),name:"keepSelector",value:keepSelector,disabled:disabled,onChange:handleChange,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"transOpen",value:transOpen,label:i18n("translate_switch"),disabled:disabled,onChange:handleChange,children:[GlobalItem,/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"true",children:i18n("default_enabled")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"false",children:i18n("default_disabled")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"apiSlug",value:apiSlug,label:i18n("translate_service"),disabled:disabled,onChange:handleChange,children:[GlobalItem,enabledApis.map(api=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:api.apiSlug,children:api.apiName},api.apiSlug))]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"fromLang",value:fromLang,label:i18n("from_lang"),disabled:disabled,onChange:handleChange,children:[GlobalItem,OPT_LANGS_FROM.map(_ref3=>{let[lang,name]=_ref3;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"toLang",value:toLang,label:i18n("to_lang"),disabled:disabled,onChange:handleChange,children:[GlobalItem,OPT_LANGS_TO.map(_ref4=>{let[lang,name]=_ref4;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"autoScan",value:autoScan,label:i18n("auto_scan_page"),disabled:disabled,onChange:handleChange,children:[GlobalItem,/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"false",children:i18n("disable")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"true",children:i18n("enable")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"hasRichText",value:hasRichText,label:i18n("has_rich_text"),disabled:disabled,onChange:handleChange,children:[GlobalItem,/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"false",children:i18n("disable")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"true",children:i18n("enable")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"hasShadowroot",value:hasShadowroot,label:i18n("has_shadowroot"),disabled:disabled,onChange:handleChange,children:[GlobalItem,/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"false",children:i18n("disable")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"true",children:i18n("enable")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"transOnly",value:transOnly,label:i18n("show_only_translations"),disabled:disabled,onChange:handleChange,children:[GlobalItem,/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"false",children:i18n("disable")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"true",children:i18n("enable")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"splitParagraph",value:splitParagraph,label:i18n("split_paragraph"),disabled:disabled,onChange:handleChange,children:[GlobalItem,OPT_SPLIT_PARAGRAPH_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:i18n(item)},item))]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{fullWidth:true,size:"small",label:i18n("split_length"),type:"number",name:"splitLength",value:splitLength,disabled:disabled,onChange:handleChange,min:0,max:1000})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"highlightWords",value:highlightWords,label:i18n("highlight_words"),disabled:disabled,onChange:handleChange,children:[GlobalItem,OPT_HIGHLIGHT_WORDS_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:i18n(item)},item))]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"transTitle",value:transTitle,label:i18n("translate_page_title"),disabled:disabled,onChange:handleChange,children:[GlobalItem,/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"false",children:i18n("disable")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"true",children:i18n("enable")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"transTag",value:transTag,label:i18n("translation_element_tag"),disabled:disabled,onChange:handleChange,children:[GlobalItem,/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"span",children:""}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"font",children:""})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"textStyle",value:textStyle,label:i18n("text_style"),disabled:disabled,onChange:handleChange,children:[GlobalItem,allTextStyles.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item.styleSlug,children:item.styleName},item.styleSlug))]})})]})}),showMore&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("terms"),helperText:i18n("terms_helper"),name:"terms",value:terms,disabled:disabled,onChange:handleChange,multiline:true,maxRows:10}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("ai_terms"),helperText:i18n("ai_terms_helper"),name:"aiTerms",value:aiTerms,disabled:disabled,onChange:handleChange,multiline:true,maxRows:10}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("terms_style"),name:"termsStyle",value:termsStyle,disabled:disabled,onChange:handleChange,maxRows:10,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("highlight_style"),name:"highlightStyle",value:highlightStyle,disabled:disabled,onChange:handleChange,maxRows:10,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("text_ext_style"),name:"textExtStyle",value:textExtStyle,disabled:disabled,onChange:handleChange,maxRows:10,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("selector_style"),name:"selectStyle",value:selectStyle,disabled:disabled,onChange:handleChange,maxRows:10,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("selector_parent_style"),name:"parentStyle",value:parentStyle,disabled:disabled,onChange:handleChange,maxRows:10,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("selector_grand_style"),name:"grandStyle",value:grandStyle,disabled:disabled,onChange:handleChange,maxRows:10,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("translate_start_hook"),helperText:i18n("translate_start_hook_helper"),name:"transStartHook",value:transStartHook,disabled:disabled,onChange:handleChange,multiline:true,maxRows:10}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("translate_end_hook"),helperText:i18n("translate_end_hook_helper"),name:"transEndHook",value:transEndHook,disabled:disabled,onChange:handleChange,multiline:true,maxRows:10}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("inject_js"),helperText:i18n("inject_js_helper"),name:"injectJs",value:injectJs,disabled:disabled,onChange:handleChange,maxRows:10,multiline:true})]}),rules&&(editMode?/*#__PURE__*/ // 编辑 (0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",spacing:2,children:[disabled?/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"contained",onClick:e=>{e.preventDefault();setDisabled(false);},startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Edit/* default */.Z,{}),children:i18n("edit")}),(rule===null||rule===void 0?void 0:rule.pattern)!=="*"&&/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"outlined",onClick:e=>{e.preventDefault();rules.del(rule.pattern);},startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Delete/* default */.Z,{}),children:i18n("delete")})]}):/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"contained",type:"submit",startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Save/* default */.Z,{}),disabled:!isModified,children:i18n("save")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"outlined",onClick:handleCancel,startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Cancel/* default */.Z,{}),children:i18n("cancel")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"outlined",onClick:handleRestore,children:i18n("restore_default")})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(ShowMoreButton,{showMore:showMore,onChange:setShowMore})]}):/*#__PURE__*/ // 添加 -(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"contained",type:"submit",startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Save/* default */.Z,{}),children:i18n("save")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"outlined",onClick:handleCancel,startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Cancel/* default */.Z,{}),children:i18n("cancel")}),/*#__PURE__*/(0,jsx_runtime.jsx)(ShowMoreButton,{showMore:showMore,onChange:setShowMore})]}))]})});}function RuleAccordion(_ref7){let{rule,rules,isExpanded=false}=_ref7;const i18n=useI18n();const[expanded,setExpanded]=(0,react.useState)(isExpanded);const handleChange=e=>{setExpanded(pre=>!pre);};return/*#__PURE__*/(0,jsx_runtime.jsxs)(Accordion_Accordion,{expanded:expanded,onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(AccordionSummary_AccordionSummary,{expandIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(ExpandMore/* default */.Z,{}),children:/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{sx:{opacity:rules?1:0.5,overflowWrap:"anywhere"},children:rule.pattern===rules_GLOBAL_KEY?"[".concat(i18n("global_rule"),"] ").concat(rule.pattern):rule.pattern})}),/*#__PURE__*/(0,jsx_runtime.jsx)(AccordionDetails_AccordionDetails,{children:expanded&&/*#__PURE__*/(0,jsx_runtime.jsx)(RuleFields,{rule:rule,rules:rules})})]});}function ShareButton(_ref8){let{rules,injectRules,selectedUrl}=_ref8;const alert=useAlert();const i18n=useI18n();const handleClick=async()=>{try{const{syncType,syncUrl,syncKey}=await storage_getSyncWithDefault();if(syncType!==OPT_SYNCTYPE_WORKER||!syncUrl||!syncKey){alert.warning(i18n("error_sync_setting"));return;}const shareRules=[...rules.list];if(injectRules){const subRules=await subRules_loadOrFetchSubRules(selectedUrl);shareRules.splice(-1,0,...subRules);}const url=await syncShareRules({rules:shareRules,syncUrl,syncKey});window.open(url,"_blank");}catch(err){alert.warning(i18n("error_got_some_wrong"));log_kissLog("share rules",err);}};return/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"outlined",onClick:handleClick,startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Share/* default */.Z,{}),children:i18n("share")});}function UserRules(_ref9){let{subRules,rules}=_ref9;const i18n=useI18n();const[showAdd,setShowAdd]=(0,react.useState)(false);const{setting,updateSetting}=Setting_useSetting();const[keyword,setKeyword]=(0,react.useState)("");const confirm=useConfirm();const injectRules=!!(setting!==null&&setting!==void 0&&setting.injectRules);const{selectedUrl,selectedRules}=subRules;const handleImport=async data=>{try{await rules.merge(JSON.parse(data));}catch(err){log_kissLog("import rules",err);}};const handleInject=()=>{updateSetting({injectRules:!injectRules});};const handleClearAll=async()=>{const isConfirmed=await confirm({confirmText:i18n("confirm_title"),cancelText:i18n("cancel")});if(isConfirmed){rules.clear();}};(0,react.useEffect)(()=>{if(!showAdd){setKeyword("");}},[showAdd]);if(!rules.list){return;}return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",spacing:2,useFlexGap:true,flexWrap:"wrap",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"contained",disabled:showAdd,onClick:e=>{e.preventDefault();setShowAdd(true);},startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Add/* default */.Z,{}),children:i18n("add")}),/*#__PURE__*/(0,jsx_runtime.jsx)(UploadButton,{text:i18n("import"),handleImport:handleImport}),/*#__PURE__*/(0,jsx_runtime.jsx)(DownloadButton,{handleData:()=>JSON.stringify([...rules.list],null,2),text:i18n("export"),fileName:"kiss-rules_v2_".concat(Date.now(),".json")}),/*#__PURE__*/(0,jsx_runtime.jsx)(DownloadButton,{handleData:async()=>JSON.stringify(await getRulesOld(),null,2),text:i18n("export_old"),fileName:"kiss-rules_v1_".concat(Date.now(),".json")}),/*#__PURE__*/(0,jsx_runtime.jsx)(ShareButton,{rules:rules,injectRules:injectRules,selectedUrl:selectedUrl}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"outlined",onClick:handleClearAll,startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(ClearAll/* default */.Z,{}),children:i18n("clear_all")}),/*#__PURE__*/(0,jsx_runtime.jsx)(HelpButton,{url:URL_KISS_RULES_NEW_ISSUE}),/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",checked:injectRules,onChange:handleInject}),label:i18n("inject_rules")})]}),showAdd&&/*#__PURE__*/(0,jsx_runtime.jsx)(RuleFields,{rules:rules,setShow:setShowAdd,setKeyword:setKeyword}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:rules.list.filter(rule=>rule.pattern!=="*"&&(rule.pattern.includes(keyword)||keyword.includes(rule.pattern))).map(rule=>/*#__PURE__*/(0,jsx_runtime.jsx)(RuleAccordion,{rule:rule,rules:rules},rule.pattern))}),injectRules&&/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:selectedRules.filter(rule=>rule.pattern.includes(keyword)||keyword.includes(rule.pattern)).map(rule=>/*#__PURE__*/(0,jsx_runtime.jsx)(RuleAccordion,{rule:rule},rule.pattern))})]});}function SubRulesItem(_ref10){let{index,url,syncAt,selectedUrl,delSub,setSelectedRules,updateDataCache,deleteDataCache}=_ref10;const[loading,setLoading]=(0,react.useState)(false);const alert=useAlert();const handleDel=async()=>{try{await delSub(url);await delSubRules(url);await deleteDataCache(url);}catch(err){log_kissLog("del subrules",err);}};const handleSync=async()=>{try{setLoading(true);const rules=await syncSubRules(url);if(rules.length>0&&url===selectedUrl){setSelectedRules(rules);}await updateDataCache(url);}catch(err){log_kissLog("sync sub rules",err);alert.error(/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)("p",{children:"Sync Error:"}),/*#__PURE__*/(0,jsx_runtime.jsx)("pre",{children:err.message})]}));}finally{setLoading(false);}};return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{value:url,control:/*#__PURE__*/(0,jsx_runtime.jsx)(Radio_Radio,{}),sx:{overflowWrap:"anywhere"},label:url}),syncAt&&/*#__PURE__*/(0,jsx_runtime.jsxs)("span",{style:{marginLeft:"0.5em",opacity:0.5},children:["[",new Date(syncAt).toLocaleString(),"]"]}),loading?/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{size:16}):/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",onClick:handleSync,children:/*#__PURE__*/(0,jsx_runtime.jsx)(Sync/* default */.Z,{fontSize:"small"})}),index!==0&&selectedUrl!==url&&/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",onClick:handleDel,children:/*#__PURE__*/(0,jsx_runtime.jsx)(Delete/* default */.Z,{fontSize:"small"})})]});}function SubRulesEdit(_ref11){let{subList,addSub,updateDataCache}=_ref11;const i18n=useI18n();const[inputText,setInputText]=(0,react.useState)("");const[inputError,setInputError]=(0,react.useState)("");const[showInput,setShowInput]=(0,react.useState)(false);const[loading,setLoading]=(0,react.useState)(false);const handleCancel=e=>{e.preventDefault();setShowInput(false);setInputText("");setInputError("");};const handleSave=async e=>{e.preventDefault();const url=inputText.trim();if(!url){setInputError(i18n("error_cant_be_blank"));return;}if(subList.some(item=>item.url===url)){setInputError(i18n("error_duplicate_values"));return;}try{setLoading(true);const rules=await syncSubRules(url);if(rules.length===0){throw new Error("empty rules");}await addSub(url);await updateDataCache(url);setShowInput(false);setInputText("");}catch(err){log_kissLog("fetch rules",err);setInputError(i18n("error_fetch_url"));}finally{setLoading(false);}};const handleInput=e=>{e.preventDefault();setInputText(e.target.value);};const handleFocus=e=>{e.preventDefault();setInputError("");};return/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"contained",disabled:showInput,onClick:e=>{e.preventDefault();setShowInput(true);},startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Add/* default */.Z,{}),children:i18n("add")}),/*#__PURE__*/(0,jsx_runtime.jsx)(HelpButton,{url:URL_KISS_RULES_NEW_ISSUE})]}),showInput&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",value:inputText,error:!!inputError,helperText:inputError,onChange:handleInput,onFocus:handleFocus,label:i18n("subscribe_url")}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"contained",onClick:handleSave,disabled:loading,startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Save/* default */.Z,{}),children:i18n("save")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"outlined",onClick:handleCancel,startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Cancel/* default */.Z,{}),children:i18n("cancel")})]})]})]});}function SubRules(_ref12){let{subRules}=_ref12;const{subList,selectSub,addSub,delSub,selectedUrl,selectedRules,setSelectedRules,loading}=subRules;const{dataCaches,updateDataCache,deleteDataCache,reloadSync}=useSyncCaches();const handleSelect=e=>{const url=e.target.value;selectSub(url);};(0,react.useEffect)(()=>{reloadSync();},[selectedRules,reloadSync]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(SubRulesEdit,{subList:subList,addSub:addSub,updateDataCache:updateDataCache}),/*#__PURE__*/(0,jsx_runtime.jsx)(RadioGroup_RadioGroup,{value:selectedUrl,onChange:handleSelect,children:subList.map((item,index)=>/*#__PURE__*/(0,jsx_runtime.jsx)(SubRulesItem,{url:item.url,syncAt:dataCaches[item.url],index:index,selectedUrl:selectedUrl,delSub:delSub,setSelectedRules:setSelectedRules,updateDataCache:updateDataCache,deleteDataCache:deleteDataCache},item.url))}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:loading?/*#__PURE__*/(0,jsx_runtime.jsx)("center",{children:/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{})}):selectedRules.map(rule=>/*#__PURE__*/(0,jsx_runtime.jsx)(RuleAccordion,{rule:rule},rule.pattern))})]});}function GlobalRule(_ref13){let{rules}=_ref13;const globalRule=(0,react.useMemo)(()=>rules.list[rules.list.length-1],[rules.list]);if(!globalRule){return;}return/*#__PURE__*/(0,jsx_runtime.jsx)(Stack_Stack,{spacing:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(RuleAccordion,{rule:globalRule,rules:rules,isExpanded:true},globalRule.pattern)});}function Rules(){const i18n=useI18n();const[activeTab,setActiveTab]=(0,react.useState)(0);const subRules=useSubRules();const rules=useRules();const handleTabChange=(e,newValue)=>{setActiveTab(newValue);};return/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Alert_Alert,{severity:"info",children:[i18n("rules_warn_1"),/*#__PURE__*/(0,jsx_runtime.jsx)("br",{}),i18n("rules_warn_2"),/*#__PURE__*/(0,jsx_runtime.jsx)("br",{}),i18n("rules_warn_3")]}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{sx:{borderBottom:1,borderColor:"divider"},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Tabs_Tabs,{value:activeTab,onChange:handleTabChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Tab_Tab,{label:i18n("global_rule")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Tab_Tab,{label:i18n("personal_rules")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Tab_Tab,{label:i18n("subscribe_rules")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)("div",{hidden:activeTab!==0,children:activeTab===0&&/*#__PURE__*/(0,jsx_runtime.jsx)(GlobalRule,{rules:rules})}),/*#__PURE__*/(0,jsx_runtime.jsx)("div",{hidden:activeTab!==1,children:activeTab===1&&/*#__PURE__*/(0,jsx_runtime.jsx)(UserRules,{subRules:subRules,rules:rules})}),/*#__PURE__*/(0,jsx_runtime.jsx)("div",{hidden:activeTab!==2,children:activeTab===2&&/*#__PURE__*/(0,jsx_runtime.jsx)(SubRules,{subRules:subRules})})]})});} +(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"contained",type:"submit",startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Save/* default */.Z,{}),children:i18n("save")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"outlined",onClick:handleCancel,startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Cancel/* default */.Z,{}),children:i18n("cancel")}),/*#__PURE__*/(0,jsx_runtime.jsx)(ShowMoreButton,{showMore:showMore,onChange:setShowMore})]}))]})});}function RuleAccordion(_ref5){let{rule,rules,isExpanded=false}=_ref5;const i18n=useI18n();const[expanded,setExpanded]=(0,react.useState)(isExpanded);const handleChange=e=>{setExpanded(pre=>!pre);};return/*#__PURE__*/(0,jsx_runtime.jsxs)(Accordion_Accordion,{expanded:expanded,onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(AccordionSummary_AccordionSummary,{expandIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(ExpandMore/* default */.Z,{}),children:/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{sx:{opacity:rules?1:0.5,overflowWrap:"anywhere"},children:rule.pattern===rules_GLOBAL_KEY?"[".concat(i18n("global_rule"),"] ").concat(rule.pattern):rule.pattern})}),/*#__PURE__*/(0,jsx_runtime.jsx)(AccordionDetails_AccordionDetails,{children:expanded&&/*#__PURE__*/(0,jsx_runtime.jsx)(RuleFields,{rule:rule,rules:rules})})]});}function ShareButton(_ref6){let{rules,injectRules,selectedUrl}=_ref6;const alert=useAlert();const i18n=useI18n();const handleClick=async()=>{try{const{syncType,syncUrl,syncKey}=await storage_getSyncWithDefault();if(syncType!==OPT_SYNCTYPE_WORKER||!syncUrl||!syncKey){alert.warning(i18n("error_sync_setting"));return;}const shareRules=[...rules.list];if(injectRules){const subRules=await subRules_loadOrFetchSubRules(selectedUrl);shareRules.splice(-1,0,...subRules);}const url=await syncShareRules({rules:shareRules,syncUrl,syncKey});window.open(url,"_blank");}catch(err){alert.warning(i18n("error_got_some_wrong"));log_kissLog("share rules",err);}};return/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"outlined",onClick:handleClick,startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Share/* default */.Z,{}),children:i18n("share")});}function UserRules(_ref7){let{subRules,rules}=_ref7;const i18n=useI18n();const[showAdd,setShowAdd]=(0,react.useState)(false);const{setting,updateSetting}=useSetting();const[keyword,setKeyword]=(0,react.useState)("");const confirm=useConfirm();const injectRules=!!(setting!==null&&setting!==void 0&&setting.injectRules);const{selectedUrl,selectedRules}=subRules;const handleImport=async data=>{try{await rules.merge(JSON.parse(data));}catch(err){log_kissLog("import rules",err);}};const handleInject=()=>{updateSetting({injectRules:!injectRules});};const handleClearAll=async()=>{const isConfirmed=await confirm({confirmText:i18n("confirm_title"),cancelText:i18n("cancel")});if(isConfirmed){rules.clear();}};(0,react.useEffect)(()=>{if(!showAdd){setKeyword("");}},[showAdd]);if(!rules.list){return;}return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",spacing:2,useFlexGap:true,flexWrap:"wrap",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"contained",disabled:showAdd,onClick:e=>{e.preventDefault();setShowAdd(true);},startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Add/* default */.Z,{}),children:i18n("add")}),/*#__PURE__*/(0,jsx_runtime.jsx)(UploadButton,{text:i18n("import"),handleImport:handleImport}),/*#__PURE__*/(0,jsx_runtime.jsx)(DownloadButton,{handleData:()=>JSON.stringify([...rules.list],null,2),text:i18n("export"),fileName:"kiss-rules_v2_".concat(Date.now(),".json")}),/*#__PURE__*/(0,jsx_runtime.jsx)(DownloadButton,{handleData:async()=>JSON.stringify(await getRulesOld(),null,2),text:i18n("export_old"),fileName:"kiss-rules_v1_".concat(Date.now(),".json")}),/*#__PURE__*/(0,jsx_runtime.jsx)(ShareButton,{rules:rules,injectRules:injectRules,selectedUrl:selectedUrl}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"outlined",onClick:handleClearAll,startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(ClearAll/* default */.Z,{}),children:i18n("clear_all")}),/*#__PURE__*/(0,jsx_runtime.jsx)(HelpButton,{url:URL_KISS_RULES_NEW_ISSUE}),/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",checked:injectRules,onChange:handleInject}),label:i18n("inject_rules")})]}),showAdd&&/*#__PURE__*/(0,jsx_runtime.jsx)(RuleFields,{rules:rules,setShow:setShowAdd,setKeyword:setKeyword}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:rules.list.filter(rule=>rule.pattern!=="*"&&(rule.pattern.includes(keyword)||keyword.includes(rule.pattern))).map(rule=>/*#__PURE__*/(0,jsx_runtime.jsx)(RuleAccordion,{rule:rule,rules:rules},rule.pattern))}),injectRules&&/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:selectedRules.filter(rule=>rule.pattern.includes(keyword)||keyword.includes(rule.pattern)).map(rule=>/*#__PURE__*/(0,jsx_runtime.jsx)(RuleAccordion,{rule:rule},rule.pattern))})]});}function SubRulesItem(_ref8){let{index,url,syncAt,selectedUrl,delSub,setSelectedRules,updateDataCache,deleteDataCache}=_ref8;const[loading,setLoading]=(0,react.useState)(false);const alert=useAlert();const handleDel=async()=>{try{await delSub(url);await delSubRules(url);await deleteDataCache(url);}catch(err){log_kissLog("del subrules",err);}};const handleSync=async()=>{try{setLoading(true);const rules=await syncSubRules(url);if(rules.length>0&&url===selectedUrl){setSelectedRules(rules);}await updateDataCache(url);}catch(err){log_kissLog("sync sub rules",err);alert.error(/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)("p",{children:"Sync Error:"}),/*#__PURE__*/(0,jsx_runtime.jsx)("pre",{children:err.message})]}));}finally{setLoading(false);}};return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{value:url,control:/*#__PURE__*/(0,jsx_runtime.jsx)(Radio_Radio,{}),sx:{overflowWrap:"anywhere"},label:url}),syncAt&&/*#__PURE__*/(0,jsx_runtime.jsxs)("span",{style:{marginLeft:"0.5em",opacity:0.5},children:["[",new Date(syncAt).toLocaleString(),"]"]}),loading?/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{size:16}):/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",onClick:handleSync,children:/*#__PURE__*/(0,jsx_runtime.jsx)(Sync/* default */.Z,{fontSize:"small"})}),index!==0&&selectedUrl!==url&&/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",onClick:handleDel,children:/*#__PURE__*/(0,jsx_runtime.jsx)(Delete/* default */.Z,{fontSize:"small"})})]});}function SubRulesEdit(_ref9){let{subList,addSub,updateDataCache}=_ref9;const i18n=useI18n();const[inputText,setInputText]=(0,react.useState)("");const[inputError,setInputError]=(0,react.useState)("");const[showInput,setShowInput]=(0,react.useState)(false);const[loading,setLoading]=(0,react.useState)(false);const handleCancel=e=>{e.preventDefault();setShowInput(false);setInputText("");setInputError("");};const handleSave=async e=>{e.preventDefault();const url=inputText.trim();if(!url){setInputError(i18n("error_cant_be_blank"));return;}if(subList.some(item=>item.url===url)){setInputError(i18n("error_duplicate_values"));return;}try{setLoading(true);const rules=await syncSubRules(url);if(rules.length===0){throw new Error("empty rules");}await addSub(url);await updateDataCache(url);setShowInput(false);setInputText("");}catch(err){log_kissLog("fetch rules",err);setInputError(i18n("error_fetch_url"));}finally{setLoading(false);}};const handleInput=e=>{e.preventDefault();setInputText(e.target.value);};const handleFocus=e=>{e.preventDefault();setInputError("");};return/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"contained",disabled:showInput,onClick:e=>{e.preventDefault();setShowInput(true);},startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Add/* default */.Z,{}),children:i18n("add")}),/*#__PURE__*/(0,jsx_runtime.jsx)(HelpButton,{url:URL_KISS_RULES_NEW_ISSUE})]}),showInput&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",value:inputText,error:!!inputError,helperText:inputError,onChange:handleInput,onFocus:handleFocus,label:i18n("subscribe_url")}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"contained",onClick:handleSave,disabled:loading,startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Save/* default */.Z,{}),children:i18n("save")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"outlined",onClick:handleCancel,startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Cancel/* default */.Z,{}),children:i18n("cancel")})]})]})]});}function SubRules(_ref10){let{subRules}=_ref10;const{subList,selectSub,addSub,delSub,selectedUrl,selectedRules,setSelectedRules,loading}=subRules;const{dataCaches,updateDataCache,deleteDataCache,reloadSync}=useSyncCaches();const handleSelect=e=>{const url=e.target.value;selectSub(url);};(0,react.useEffect)(()=>{reloadSync();},[selectedRules,reloadSync]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(SubRulesEdit,{subList:subList,addSub:addSub,updateDataCache:updateDataCache}),/*#__PURE__*/(0,jsx_runtime.jsx)(RadioGroup_RadioGroup,{value:selectedUrl,onChange:handleSelect,children:subList.map((item,index)=>/*#__PURE__*/(0,jsx_runtime.jsx)(SubRulesItem,{url:item.url,syncAt:dataCaches[item.url],index:index,selectedUrl:selectedUrl,delSub:delSub,setSelectedRules:setSelectedRules,updateDataCache:updateDataCache,deleteDataCache:deleteDataCache},item.url))}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:loading?/*#__PURE__*/(0,jsx_runtime.jsx)("center",{children:/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{})}):selectedRules.map(rule=>/*#__PURE__*/(0,jsx_runtime.jsx)(RuleAccordion,{rule:rule},rule.pattern))})]});}function GlobalRule(_ref11){let{rules}=_ref11;const globalRule=(0,react.useMemo)(()=>rules.list[rules.list.length-1],[rules.list]);if(!globalRule){return;}return/*#__PURE__*/(0,jsx_runtime.jsx)(Stack_Stack,{spacing:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(RuleAccordion,{rule:globalRule,rules:rules,isExpanded:true},globalRule.pattern)});}function Rules(){const i18n=useI18n();const[activeTab,setActiveTab]=(0,react.useState)(0);const subRules=useSubRules();const rules=useRules();const handleTabChange=(e,newValue)=>{setActiveTab(newValue);};return/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Alert_Alert,{severity:"info",children:[i18n("rules_warn_1"),/*#__PURE__*/(0,jsx_runtime.jsx)("br",{}),i18n("rules_warn_2"),/*#__PURE__*/(0,jsx_runtime.jsx)("br",{}),i18n("rules_warn_3")]}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{sx:{borderBottom:1,borderColor:"divider"},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Tabs_Tabs,{value:activeTab,onChange:handleTabChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Tab_Tab,{label:i18n("global_rule")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Tab_Tab,{label:i18n("personal_rules")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Tab_Tab,{label:i18n("subscribe_rules")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)("div",{hidden:activeTab!==0,children:activeTab===0&&/*#__PURE__*/(0,jsx_runtime.jsx)(GlobalRule,{rules:rules})}),/*#__PURE__*/(0,jsx_runtime.jsx)("div",{hidden:activeTab!==1,children:activeTab===1&&/*#__PURE__*/(0,jsx_runtime.jsx)(UserRules,{subRules:subRules,rules:rules})}),/*#__PURE__*/(0,jsx_runtime.jsx)("div",{hidden:activeTab!==2,children:activeTab===2&&/*#__PURE__*/(0,jsx_runtime.jsx)(SubRules,{subRules:subRules})})]})});} ;// CONCATENATED MODULE: ./src/hooks/Shortcut.js -function useShortcut(action){const{setting,updateSetting}=Setting_useSetting();const shortcuts=(setting===null||setting===void 0?void 0:setting.shortcuts)||DEFAULT_SHORTCUTS;const shortcut=shortcuts[action]||[];const setShortcut=(0,react.useCallback)(val=>{updateSetting(prev=>({...prev,shortcuts:{...((prev===null||prev===void 0?void 0:prev.shortcuts)||{}),[action]:val}}));},[action,updateSetting]);return{shortcut,setShortcut};} +function useShortcut(action){const{setting,updateSetting}=useSetting();const shortcuts=(setting===null||setting===void 0?void 0:setting.shortcuts)||DEFAULT_SHORTCUTS;const shortcut=shortcuts[action]||[];const setShortcut=(0,react.useCallback)(val=>{updateSetting(prev=>({...prev,shortcuts:{...((prev===null||prev===void 0?void 0:prev.shortcuts)||{}),[action]:val}}));},[action,updateSetting]);return{shortcut,setShortcut};} // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+icons-material@5.15.15_@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@1_1e29dcefa4691dc57f2acd9f73947cfd/node_modules/@mui/icons-material/Check.js var Check = __webpack_require__(2433); ;// CONCATENATED MODULE: ./src/libs/shortcut.js @@ -75127,8 +75146,8 @@ const DEFAULT_FAB={};/** * @returns */function useFab(){const{data,update}=useStorage(storage_STOKEY_FAB,DEFAULT_FAB);return{fab:data,updateFab:update};} ;// CONCATENATED MODULE: ./src/views/Options/Setting.js -function ShortcutItem(_ref){let{action,label}=_ref;const{shortcut,setShortcut}=useShortcut(action);return/*#__PURE__*/(0,jsx_runtime.jsx)(ShortcutInput,{value:shortcut,onChange:setShortcut,label:label});}function Settings(){const i18n=useI18n();const{setting,updateSetting}=Setting_useSetting();const alert=useAlert();const{fab,updateFab}=useFab();const handleChange=e=>{e.preventDefault();let{name,value}=e.target;switch(name){case"contextMenuType":client_isExt&&msg_sendBgMsg(MSG_CONTEXT_MENUS,value);break;case"csplist":client_isExt&&msg_sendBgMsg(MSG_UPDATE_CSP,{csplist:value});break;case"orilist":client_isExt&&msg_sendBgMsg(MSG_UPDATE_CSP,{orilist:value});break;default:}updateSetting({[name]:value});};const handleClearCache=()=>{try{caches.delete(storage_CACHE_NAME);alert.success(i18n("clear_success"));}catch(err){log_kissLog("clear cache",err);}};const handleImport=async data=>{try{updateSetting(JSON.parse(data));}catch(err){log_kissLog("import setting",err);}};const{uiLang,minLength,maxLength,clearCache,newlineLength=TRANS_NEWLINE_LENGTH,httpTimeout=DEFAULT_HTTP_TIMEOUT,contextMenuType=1,touchModes=[2],blacklist=DEFAULT_BLACKLIST.join(",\n"),csplist=DEFAULT_CSPLIST.join(",\n"),orilist=DEFAULT_ORILIST.join(",\n"),transInterval=100,langDetector="-",logLevel=1,preInit=true,skipLangs=[],// detectRemote = true, -transAllnow=false,rootMargin=500}=setting;const{isHide=false,fabClickAction=0}=fab||{};return/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Alert_Alert,{severity:"info",children:i18n("setting_helper")}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",spacing:2,useFlexGap:true,flexWrap:"wrap",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(UploadButton,{text:i18n("import"),handleImport:handleImport}),/*#__PURE__*/(0,jsx_runtime.jsx)(DownloadButton,{handleData:()=>JSON.stringify(setting,null,2),text:i18n("export"),fileName:"kiss-setting_v2_".concat(Date.now(),".json")}),/*#__PURE__*/(0,jsx_runtime.jsx)(DownloadButton,{handleData:async()=>JSON.stringify(await getSettingOld(),null,2),text:i18n("export_old"),fileName:"kiss-setting_v1_".concat(Date.now(),".json")})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"uiLang",value:uiLang,label:i18n("ui_lang"),onChange:handleChange,children:UI_LANGS.map(_ref2=>{let[lang,name]=_ref2;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"preInit",value:preInit,label:i18n("if_pre_init"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:true,children:i18n("enable")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:false,children:i18n("disable")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"isHide",value:isHide,label:i18n("hide_fab_button"),onChange:e=>{updateFab({isHide:e.target.value});},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:false,children:i18n("show")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:true,children:i18n("hide")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"fabClickAction",value:fabClickAction,label:i18n("fab_click_action"),onChange:e=>updateFab({fabClickAction:e.target.value}),children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:0,children:i18n("fab_click_menu")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:1,children:i18n("fab_click_translate")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{fullWidth:true,size:"small",label:i18n("min_translate_length"),type:"number",name:"minLength",value:minLength,onChange:handleChange,min:1,max:100})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{fullWidth:true,size:"small",label:i18n("max_translate_length"),type:"number",name:"maxLength",value:maxLength,onChange:handleChange,min:100,max:100000})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{fullWidth:true,size:"small",label:i18n("num_of_newline_characters"),type:"number",name:"newlineLength",value:newlineLength,onChange:handleChange,min:1,max:1000})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{fullWidth:true,size:"small",label:i18n("translate_interval"),type:"number",name:"transInterval",value:transInterval,onChange:handleChange,min:10,max:2000})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{fullWidth:true,size:"small",label:i18n("http_timeout"),type:"number",name:"httpTimeout",value:httpTimeout,onChange:handleChange,min:5000,max:60000})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"touchModes",value:touchModes,label:i18n("touch_translate_shortcut"),onChange:handleChange,SelectProps:{multiple:true},children:[0,2,3,4,5,6,7].map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:i18n("touch_tap_".concat(item))},item))})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"contextMenuType",value:contextMenuType,label:i18n("context_menus"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:0,children:i18n("hide_context_menus")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:1,children:i18n("simple_context_menus")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:2,children:i18n("secondary_context_menus")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"langDetector",value:langDetector,label:i18n("detected_lang"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"-",children:i18n("disable")}),OPT_LANGDETECTOR_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:item},item))]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"transAllnow",value:transAllnow,label:i18n("trigger_mode"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:false,children:i18n("mk_pagescroll")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:true,children:i18n("mk_pageopen")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{fullWidth:true,size:"small",label:i18n("pagescroll_root_margin"),type:"number",name:"rootMargin",value:rootMargin,onChange:handleChange,min:0,max:10000})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"logLevel",value:logLevel,label:i18n("log_level"),onChange:handleChange,children:Object.values(LogLevel).map(_ref3=>{let{value,name}=_ref3;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:value,children:name},value);})})})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,size:"small",label:i18n("skip_langs"),helperText:i18n("skip_langs_helper"),name:"skipLangs",value:skipLangs,onChange:handleChange,SelectProps:{multiple:true},children:OPT_LANGS_TO.map(_ref4=>{let[langKey,langName]=_ref4;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:langKey,children:langName},langKey);})}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("translate_blacklist"),helperText:i18n("pattern_helper"),name:"blacklist",value:blacklist,onChange:handleChange,maxRows:10,multiline:true}),client_isExt?/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"clearCache",value:clearCache,label:i18n("if_clear_cache"),onChange:handleChange,helperText:/*#__PURE__*/(0,jsx_runtime.jsx)(material_Link_Link,{component:"button",onClick:handleClearCache,children:i18n("clear_all_cache_now")}),children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:false,children:i18n("clear_cache_never")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:true,children:i18n("clear_cache_restart")})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("disabled_orilist"),helperText:i18n("pattern_helper"),name:"orilist",value:orilist,onChange:handleChange,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("disabled_csplist"),helperText:i18n("pattern_helper")+" "+i18n("disabled_csplist_helper"),name:"csplist",value:csplist,onChange:handleChange,multiline:true})]}):/*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(ShortcutItem,{action:OPT_SHORTCUT_TRANSLATE,label:i18n("toggle_translate_shortcut")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(ShortcutItem,{action:OPT_SHORTCUT_STYLE,label:i18n("toggle_style_shortcut")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(ShortcutItem,{action:OPT_SHORTCUT_POPUP,label:i18n("toggle_popup_shortcut")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(ShortcutItem,{action:OPT_SHORTCUT_SETTING,label:i18n("open_setting_shortcut")})})]})})})]})});} +function ShortcutItem(_ref){let{action,label}=_ref;const{shortcut,setShortcut}=useShortcut(action);return/*#__PURE__*/(0,jsx_runtime.jsx)(ShortcutInput,{value:shortcut,onChange:setShortcut,label:label});}function Settings(){const i18n=useI18n();const{setting,updateSetting}=useSetting();const alert=useAlert();const{fab,updateFab}=useFab();const handleChange=e=>{e.preventDefault();let{name,value}=e.target;switch(name){case"contextMenuType":client_isExt&&msg_sendBgMsg(MSG_CONTEXT_MENUS,value);break;case"csplist":client_isExt&&msg_sendBgMsg(MSG_UPDATE_CSP,{csplist:value});break;case"orilist":client_isExt&&msg_sendBgMsg(MSG_UPDATE_CSP,{orilist:value});break;default:}updateSetting({[name]:value});};const handleClearCache=()=>{try{caches.delete(storage_CACHE_NAME);alert.success(i18n("clear_success"));}catch(err){log_kissLog("clear cache",err);}};const handleImport=async data=>{try{updateSetting(JSON.parse(data));}catch(err){log_kissLog("import setting",err);}};const{uiLang,minLength,maxLength,clearCache,newlineLength=TRANS_NEWLINE_LENGTH,httpTimeout=DEFAULT_HTTP_TIMEOUT,contextMenuType=1,touchModes=[2],blacklist=DEFAULT_BLACKLIST.join(",\n"),csplist=DEFAULT_CSPLIST.join(",\n"),orilist=DEFAULT_ORILIST.join(",\n"),transInterval=100,langDetector="-",logLevel=1,preInit=true,skipLangs=[],// detectRemote = true, +transAllnow=false,rootMargin=500}=setting;const{isHide=false,fabClickAction=0}=fab||{};return/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Alert_Alert,{severity:"info",children:i18n("setting_helper")}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",spacing:2,useFlexGap:true,flexWrap:"wrap",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(UploadButton,{text:i18n("import"),handleImport:handleImport}),/*#__PURE__*/(0,jsx_runtime.jsx)(DownloadButton,{handleData:()=>JSON.stringify(setting,null,2),text:i18n("export"),fileName:"kiss-setting_v2_".concat(Date.now(),".json")}),/*#__PURE__*/(0,jsx_runtime.jsx)(DownloadButton,{handleData:async()=>JSON.stringify(await getSettingOld(),null,2),text:i18n("export_old"),fileName:"kiss-setting_v1_".concat(Date.now(),".json")})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"uiLang",value:uiLang,label:i18n("ui_lang"),onChange:handleChange,children:UI_LANGS.map(_ref2=>{let[lang,name]=_ref2;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"preInit",value:preInit,label:i18n("if_pre_init"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:true,children:i18n("enable")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:false,children:i18n("disable")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"isHide",value:isHide,label:i18n("hide_fab_button"),onChange:e=>{updateFab({isHide:e.target.value});},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:false,children:i18n("show")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:true,children:i18n("hide")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"fabClickAction",value:fabClickAction,label:i18n("fab_click_action"),onChange:e=>updateFab({fabClickAction:e.target.value}),children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:0,children:i18n("fab_click_menu")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:1,children:i18n("fab_click_translate")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{fullWidth:true,size:"small",label:i18n("min_translate_length"),type:"number",name:"minLength",value:minLength,onChange:handleChange,min:1,max:100})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{fullWidth:true,size:"small",label:i18n("max_translate_length"),type:"number",name:"maxLength",value:maxLength,onChange:handleChange,min:100,max:100000})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{fullWidth:true,size:"small",label:i18n("num_of_newline_characters"),type:"number",name:"newlineLength",value:newlineLength,onChange:handleChange,min:1,max:1000})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{fullWidth:true,size:"small",label:i18n("translate_interval"),type:"number",name:"transInterval",value:transInterval,onChange:handleChange,min:10,max:2000})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{fullWidth:true,size:"small",label:i18n("http_timeout"),type:"number",name:"httpTimeout",value:httpTimeout,onChange:handleChange,min:1000,max:60000})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"touchModes",value:touchModes,label:i18n("touch_translate_shortcut"),onChange:handleChange,SelectProps:{multiple:true},children:[0,2,3,4,5,6,7].map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:i18n("touch_tap_".concat(item))},item))})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"contextMenuType",value:contextMenuType,label:i18n("context_menus"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:0,children:i18n("hide_context_menus")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:1,children:i18n("simple_context_menus")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:2,children:i18n("secondary_context_menus")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"langDetector",value:langDetector,label:i18n("detected_lang"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"-",children:i18n("disable")}),OPT_LANGDETECTOR_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:item},item))]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"transAllnow",value:transAllnow,label:i18n("trigger_mode"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:false,children:i18n("mk_pagescroll")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:true,children:i18n("mk_pageopen")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{fullWidth:true,size:"small",label:i18n("pagescroll_root_margin"),type:"number",name:"rootMargin",value:rootMargin,onChange:handleChange,min:0,max:10000})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"logLevel",value:logLevel,label:i18n("log_level"),onChange:handleChange,children:Object.values(LogLevel).map(_ref3=>{let{value,name}=_ref3;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:value,children:name},value);})})})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,size:"small",label:i18n("skip_langs"),helperText:i18n("skip_langs_helper"),name:"skipLangs",value:skipLangs,onChange:handleChange,SelectProps:{multiple:true},children:OPT_LANGS_TO.map(_ref4=>{let[langKey,langName]=_ref4;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:langKey,children:langName},langKey);})}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("translate_blacklist"),helperText:i18n("pattern_helper"),name:"blacklist",value:blacklist,onChange:handleChange,maxRows:10,multiline:true}),client_isExt?/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"clearCache",value:clearCache,label:i18n("if_clear_cache"),onChange:handleChange,helperText:/*#__PURE__*/(0,jsx_runtime.jsx)(material_Link_Link,{component:"button",onClick:handleClearCache,children:i18n("clear_all_cache_now")}),children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:false,children:i18n("clear_cache_never")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:true,children:i18n("clear_cache_restart")})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("disabled_orilist"),helperText:i18n("pattern_helper"),name:"orilist",value:orilist,onChange:handleChange,multiline:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("disabled_csplist"),helperText:i18n("pattern_helper")+" "+i18n("disabled_csplist_helper"),name:"csplist",value:csplist,onChange:handleChange,multiline:true})]}):/*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(ShortcutItem,{action:OPT_SHORTCUT_TRANSLATE,label:i18n("toggle_translate_shortcut")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(ShortcutItem,{action:OPT_SHORTCUT_STYLE,label:i18n("toggle_style_shortcut")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(ShortcutItem,{action:OPT_SHORTCUT_POPUP,label:i18n("toggle_popup_shortcut")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(ShortcutItem,{action:OPT_SHORTCUT_SETTING,label:i18n("open_setting_shortcut")})})]})})})]})});} // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/useThemeProps/getThemeProps.js var getThemeProps = __webpack_require__(929); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/useThemeWithoutDefault.js @@ -76304,8 +76323,10 @@ var EventNote = __webpack_require__(9779); var Mouse = __webpack_require__(5027); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+icons-material@5.15.15_@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@1_1e29dcefa4691dc57f2acd9f73947cfd/node_modules/@mui/icons-material/Subtitles.js var Subtitles = __webpack_require__(8905); +// EXTERNAL MODULE: ./node_modules/.pnpm/@mui+icons-material@5.15.15_@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@1_1e29dcefa4691dc57f2acd9f73947cfd/node_modules/@mui/icons-material/FormatColorText.js +var FormatColorText = __webpack_require__(3521); ;// CONCATENATED MODULE: ./src/views/Options/Navigator.js -function LinkItem(_ref){let{label,url,icon}=_ref;const match=useMatch(url);return/*#__PURE__*/(0,jsx_runtime.jsxs)(ListItemButton_ListItemButton,{component:NavLink,to:url,selected:!!match,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(ListItemIcon_ListItemIcon,{children:icon}),/*#__PURE__*/(0,jsx_runtime.jsx)(ListItemText_ListItemText,{children:label})]});}function Navigator(props){const i18n=useI18n();const memus=[{id:"basic_setting",label:i18n("basic_setting"),url:"/",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(icons_material_Settings/* default */.Z,{})},{id:"rules_setting",label:i18n("rules_setting"),url:"/rules",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(DesignServices/* default */.Z,{})},{id:"input_translate",label:i18n("input_translate"),url:"/input",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(icons_material_Input/* default */.Z,{})},{id:"selection_translate",label:i18n("selection_translate"),url:"/tranbox",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(SelectAll/* default */.Z,{})},{id:"mousehover_translate",label:i18n("mousehover_translate"),url:"/mousehover",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(Mouse/* default */.Z,{})},{id:"subtitle_translate",label:i18n("subtitle_translate"),url:"/subtitle",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(Subtitles/* default */.Z,{})},{id:"apis_setting",label:i18n("apis_setting"),url:"/apis",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(Api/* default */.Z,{})},{id:"sync",label:i18n("sync_setting"),url:"/sync",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(Sync/* default */.Z,{})},{id:"words",label:i18n("favorite_words"),url:"/words",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(EventNote/* default */.Z,{})},{id:"playground",label:"Playground",url:"/playground",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(EventNote/* default */.Z,{})},{id:"about",label:i18n("about"),url:"/about",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(icons_material_Info/* default */.Z,{})}];return/*#__PURE__*/(0,jsx_runtime.jsxs)(Drawer_Drawer,{...props,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Toolbar_Toolbar,{variant:"dense"}),/*#__PURE__*/(0,jsx_runtime.jsx)(List_List,{component:"nav",children:memus.map(_ref2=>{let{id,label,url,icon}=_ref2;return/*#__PURE__*/(0,jsx_runtime.jsx)(LinkItem,{label:label,url:url,icon:icon},id);})})]});} +function LinkItem(_ref){let{label,url,icon}=_ref;const match=useMatch(url);return/*#__PURE__*/(0,jsx_runtime.jsxs)(ListItemButton_ListItemButton,{component:NavLink,to:url,selected:!!match,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(ListItemIcon_ListItemIcon,{children:icon}),/*#__PURE__*/(0,jsx_runtime.jsx)(ListItemText_ListItemText,{children:label})]});}function Navigator(props){const i18n=useI18n();const memus=[{id:"basic_setting",label:i18n("basic_setting"),url:"/",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(icons_material_Settings/* default */.Z,{})},{id:"rules_setting",label:i18n("rules_setting"),url:"/rules",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(DesignServices/* default */.Z,{})},{id:"apis_setting",label:i18n("apis_setting"),url:"/apis",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(Api/* default */.Z,{})},{id:"styles_setting",label:i18n("styles_setting"),url:"/styles",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(FormatColorText/* default */.Z,{})},{id:"sync",label:i18n("sync_setting"),url:"/sync",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(Sync/* default */.Z,{})},{id:"input_translate",label:i18n("input_translate"),url:"/input",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(icons_material_Input/* default */.Z,{})},{id:"selection_translate",label:i18n("selection_translate"),url:"/tranbox",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(SelectAll/* default */.Z,{})},{id:"mousehover_translate",label:i18n("mousehover_translate"),url:"/mousehover",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(Mouse/* default */.Z,{})},{id:"subtitle_translate",label:i18n("subtitle_translate"),url:"/subtitle",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(Subtitles/* default */.Z,{})},{id:"words",label:i18n("favorite_words"),url:"/words",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(EventNote/* default */.Z,{})},{id:"playground",label:"Playground",url:"/playground",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(EventNote/* default */.Z,{})},{id:"about",label:i18n("about"),url:"/about",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(icons_material_Info/* default */.Z,{})}];return/*#__PURE__*/(0,jsx_runtime.jsxs)(Drawer_Drawer,{...props,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Toolbar_Toolbar,{variant:"dense"}),/*#__PURE__*/(0,jsx_runtime.jsx)(List_List,{component:"nav",children:memus.map(_ref2=>{let{id,label,url,icon}=_ref2;return/*#__PURE__*/(0,jsx_runtime.jsx)(LinkItem,{label:label,url:url,icon:icon},id);})})]});} ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/AppBar/appBarClasses.js @@ -76460,7 +76481,7 @@ var icons_material_Menu = __webpack_require__(6134); /** * 深色模式hook * @returns - */function useDarkMode(){const{setting:{darkMode},updateSetting}=Setting_useSetting();const toggleDarkMode=(0,react.useCallback)(()=>{const nextMode={light:"dark",dark:"auto",auto:"light"};updateSetting({darkMode:nextMode[darkMode]||"light"});},[darkMode,updateSetting]);return{darkMode,toggleDarkMode};} + */function useDarkMode(){const{setting:{darkMode},updateSetting}=useSetting();const toggleDarkMode=(0,react.useCallback)(()=>{const nextMode={light:"dark",dark:"auto",auto:"light"};updateSetting({darkMode:nextMode[darkMode]||"light"});},[darkMode,updateSetting]);return{darkMode,toggleDarkMode};} // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+icons-material@5.15.15_@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@1_1e29dcefa4691dc57f2acd9f73947cfd/node_modules/@mui/icons-material/LightMode.js var LightMode = __webpack_require__(4766); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+icons-material@5.15.15_@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@1_1e29dcefa4691dc57f2acd9f73947cfd/node_modules/@mui/icons-material/DarkMode.js @@ -76470,7 +76491,7 @@ var BrightnessAuto = __webpack_require__(5538); ;// CONCATENATED MODULE: ./src/views/Options/DarkModeButton.js function DarkModeButton(){const{darkMode,toggleDarkMode}=useDarkMode();return/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{sx:{ml:1},onClick:toggleDarkMode,color:"inherit",children:darkMode==="dark"?/*#__PURE__*/(0,jsx_runtime.jsx)(DarkMode/* default */.Z,{}):darkMode==="light"?/*#__PURE__*/(0,jsx_runtime.jsx)(LightMode/* default */.Z,{}):/*#__PURE__*/(0,jsx_runtime.jsx)(BrightnessAuto/* default */.Z,{})});} ;// CONCATENATED MODULE: ./src/views/Options/Header.js -function Header(props){const i18n=useI18n();const{onDrawerToggle}=props;return/*#__PURE__*/(0,jsx_runtime.jsx)(AppBar_AppBar,{color:"primary",position:"sticky",sx:{zIndex:1300},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Toolbar_Toolbar,{variant:"dense",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{sx:{display:{sm:"none",xs:"block"}},children:/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{color:"inherit","aria-label":"open drawer",onClick:onDrawerToggle,edge:"start",children:/*#__PURE__*/(0,jsx_runtime.jsx)(icons_material_Menu/* default */.Z,{})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{component:"div",sx:{flexGrow:1,fontWeight:"bold"},children:/*#__PURE__*/(0,jsx_runtime.jsx)(material_Link_Link,{underline:"none",color:"inherit",href:"https://github.com/fishjar/kiss-translator",target:"_blank",children:"".concat(i18n("app_name")," v").concat("2.0.5")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(DarkModeButton,{})]})});}/* harmony default export */ const Options_Header = (Header); +function Header(props){const i18n=useI18n();const{onDrawerToggle}=props;return/*#__PURE__*/(0,jsx_runtime.jsx)(AppBar_AppBar,{color:"primary",position:"sticky",sx:{zIndex:1300},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Toolbar_Toolbar,{variant:"dense",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{sx:{display:{sm:"none",xs:"block"}},children:/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{color:"inherit","aria-label":"open drawer",onClick:onDrawerToggle,edge:"start",children:/*#__PURE__*/(0,jsx_runtime.jsx)(icons_material_Menu/* default */.Z,{})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{component:"div",sx:{flexGrow:1,fontWeight:"bold"},children:/*#__PURE__*/(0,jsx_runtime.jsx)(material_Link_Link,{underline:"none",color:"inherit",href:"https://github.com/fishjar/kiss-translator",target:"_blank",children:"".concat(i18n("app_name")," v").concat("2.0.6")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(DarkModeButton,{})]})});}/* harmony default export */ const Options_Header = (Header); ;// CONCATENATED MODULE: ./src/views/Options/Layout.js function Layout(){const navWidth=256;const location=dist_useLocation();const theme=useTheme_useTheme();const[open,setOpen]=(0,react.useState)(false);const isSm=useMediaQuery(theme.breakpoints.up("sm"));const handleDrawerToggle=()=>{setOpen(!open);};(0,react.useEffect)(()=>{setOpen(false);},[location]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(Box_Box,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(CssBaseline_CssBaseline,{}),/*#__PURE__*/(0,jsx_runtime.jsx)(Options_Header,{onDrawerToggle:handleDrawerToggle}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Box_Box,{sx:{display:"flex"},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{component:"nav",sx:{width:{sm:navWidth},flexShrink:{sm:0}},children:/*#__PURE__*/(0,jsx_runtime.jsx)(Navigator,{PaperProps:{style:{width:navWidth}},variant:isSm?"permanent":"temporary",open:isSm?true:open,onClose:handleDrawerToggle})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{component:"main",sx:{flex:1,p:2,width:"100%"},children:/*#__PURE__*/(0,jsx_runtime.jsx)(Outlet,{})})]})]});} // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+icons-material@5.15.15_@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@1_1e29dcefa4691dc57f2acd9f73947cfd/node_modules/@mui/icons-material/ContentCopy.js @@ -76478,7 +76499,7 @@ var ContentCopy = __webpack_require__(6409); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+icons-material@5.15.15_@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@1_1e29dcefa4691dc57f2acd9f73947cfd/node_modules/@mui/icons-material/ContentPaste.js var ContentPaste = __webpack_require__(3991); ;// CONCATENATED MODULE: ./src/views/Options/SyncSetting.js -function SyncSetting(){const i18n=useI18n();const{sync,updateSync}=useSync();const alert=useAlert();const[loading,setLoading]=(0,react.useState)(false);const{reloadSetting}=Setting_useSetting();const handleChange=async e=>{e.preventDefault();const{name,value}=e.target;await updateSync({[name]:value});};const handleSyncTest=async e=>{e.preventDefault();try{setLoading(true);await syncSettingAndRules();reloadSetting();alert.success(i18n("sync_success"));}catch(err){log_kissLog("sync all",err);alert.error(i18n("sync_failed"));}finally{setLoading(false);}};const handleGenerateShareString=async()=>{try{const base64Config=btoa(JSON.stringify({syncType:syncType,syncUrl:syncUrl,syncUser:syncUser,syncKey:syncKey}));const shareString="".concat(OPT_SYNCTOKEN_PERFIX).concat(base64Config);await navigator.clipboard.writeText(shareString);log_kissLog("Share string copied to clipboard",shareString);}catch(error){log_kissLog("Failed to copy share string to clipboard",error);}};const handleImportFromClipboard=async()=>{try{const text=await navigator.clipboard.readText();log_kissLog("read_clipboard",text);if(text.startsWith(OPT_SYNCTOKEN_PERFIX)){const base64Config=text.slice(OPT_SYNCTOKEN_PERFIX.length);const jsonString=atob(base64Config);const updatedConfig=JSON.parse(jsonString);if(!OPT_SYNCTYPE_ALL.includes(updatedConfig.syncType)){log_kissLog("error syncType",updatedConfig.syncType);return;}if(updatedConfig.syncUrl){updateSync({syncType:updatedConfig.syncType,syncUrl:updatedConfig.syncUrl,syncUser:updatedConfig.syncUser,syncKey:updatedConfig.syncKey});}else{log_kissLog("Invalid config structure");}}else{log_kissLog("Invalid share string",text);}}catch(error){log_kissLog("Failed to read from clipboard or parse JSON",error);}};if(!sync){return;}const{syncType=OPT_SYNCTYPE_WORKER,syncUrl="",syncUser="",syncKey=""}=sync;return/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Alert_Alert,{severity:"warning",children:i18n("sync_warn")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Alert_Alert,{severity:"warning",children:i18n("sync_warn_2")}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,size:"small",name:"syncType",value:syncType,label:i18n("data_sync_type"),onChange:handleChange,children:OPT_SYNCTYPE_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:item},item))}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("data_sync_url"),name:"syncUrl",value:syncUrl,onChange:handleChange,helperText:syncType===OPT_SYNCTYPE_WORKER&&/*#__PURE__*/(0,jsx_runtime.jsx)(material_Link_Link,{href:URL_KISS_WORKER,target:"_blank",children:i18n("about_sync_api")})}),syncType===OPT_SYNCTYPE_WEBDAV&&/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("data_sync_user"),name:"syncUser",value:syncUser,onChange:handleChange}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",type:"password",label:i18n("data_sync_key"),name:"syncKey",value:syncKey,onChange:handleChange}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",spacing:2,useFlexGap:true,flexWrap:"wrap",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(LoadingButton_LoadingButton,{size:"small",variant:"contained",disabled:!syncUrl||!syncKey||loading,onClick:handleSyncTest,startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Sync/* default */.Z,{}),loading:loading,children:i18n("sync_now")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"outlined",onClick:handleGenerateShareString,startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(ContentCopy/* default */.Z,{}),children:i18n("copy","copy")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{onClick:handleImportFromClipboard,size:"small",variant:"outlined",startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(ContentPaste/* default */.Z,{}),children:i18n("import","import")})]})]})});} +function SyncSetting(){const i18n=useI18n();const{sync,updateSync}=useSync();const alert=useAlert();const[loading,setLoading]=(0,react.useState)(false);const{reloadSetting}=useSetting();const handleChange=async e=>{e.preventDefault();const{name,value}=e.target;await updateSync({[name]:value});};const handleSyncTest=async e=>{e.preventDefault();try{setLoading(true);await syncSettingAndRules();reloadSetting();alert.success(i18n("sync_success"));}catch(err){log_kissLog("sync all",err);alert.error(i18n("sync_failed"));}finally{setLoading(false);}};const handleGenerateShareString=async()=>{try{const base64Config=btoa(JSON.stringify({syncType:syncType,syncUrl:syncUrl,syncUser:syncUser,syncKey:syncKey}));const shareString="".concat(OPT_SYNCTOKEN_PERFIX).concat(base64Config);await navigator.clipboard.writeText(shareString);log_kissLog("Share string copied to clipboard",shareString);}catch(error){log_kissLog("Failed to copy share string to clipboard",error);}};const handleImportFromClipboard=async()=>{try{const text=await navigator.clipboard.readText();log_kissLog("read_clipboard",text);if(text.startsWith(OPT_SYNCTOKEN_PERFIX)){const base64Config=text.slice(OPT_SYNCTOKEN_PERFIX.length);const jsonString=atob(base64Config);const updatedConfig=JSON.parse(jsonString);if(!OPT_SYNCTYPE_ALL.includes(updatedConfig.syncType)){log_kissLog("error syncType",updatedConfig.syncType);return;}if(updatedConfig.syncUrl){updateSync({syncType:updatedConfig.syncType,syncUrl:updatedConfig.syncUrl,syncUser:updatedConfig.syncUser,syncKey:updatedConfig.syncKey});}else{log_kissLog("Invalid config structure");}}else{log_kissLog("Invalid share string",text);}}catch(error){log_kissLog("Failed to read from clipboard or parse JSON",error);}};if(!sync){return;}const{syncType=OPT_SYNCTYPE_WORKER,syncUrl="",syncUser="",syncKey=""}=sync;return/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Alert_Alert,{severity:"warning",children:i18n("sync_warn")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Alert_Alert,{severity:"warning",children:i18n("sync_warn_2")}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,size:"small",name:"syncType",value:syncType,label:i18n("data_sync_type"),onChange:handleChange,children:OPT_SYNCTYPE_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:item},item))}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("data_sync_url"),name:"syncUrl",value:syncUrl,onChange:handleChange,helperText:syncType===OPT_SYNCTYPE_WORKER&&/*#__PURE__*/(0,jsx_runtime.jsx)(material_Link_Link,{href:URL_KISS_WORKER,target:"_blank",children:i18n("about_sync_api")})}),syncType===OPT_SYNCTYPE_WEBDAV&&/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("data_sync_user"),name:"syncUser",value:syncUser,onChange:handleChange}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",type:"password",label:i18n("data_sync_key"),name:"syncKey",value:syncKey,onChange:handleChange}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",spacing:2,useFlexGap:true,flexWrap:"wrap",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(LoadingButton_LoadingButton,{size:"small",variant:"contained",disabled:!syncUrl||!syncKey||loading,onClick:handleSyncTest,startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Sync/* default */.Z,{}),loading:loading,children:i18n("sync_now")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"outlined",onClick:handleGenerateShareString,startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(ContentCopy/* default */.Z,{}),children:i18n("copy","copy")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{onClick:handleImportFromClipboard,size:"small",variant:"outlined",startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(ContentPaste/* default */.Z,{}),children:i18n("import","import")})]})]})});} ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+private-theming@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/private-theming/useTheme/ThemeContext.js const ThemeContext = /*#__PURE__*/react.createContext(null); @@ -76640,14 +76661,13 @@ function styles_ThemeProvider_ThemeProvider(_ref) { * mui 主题配置 * @param {*} param0 * @returns - */function Theme(_ref){let{children,options,styles}=_ref;const{darkMode}=useDarkMode();const[systemMode,setSystemMode]=(0,react.useState)(THEME_LIGHT);(0,react.useEffect)(()=>{if(typeof window.matchMedia!=="function"){return;}const mediaQuery=window.matchMedia("(prefers-color-scheme: dark)");const handleChange=()=>{setSystemMode(mediaQuery.matches?THEME_DARK:THEME_LIGHT);};handleChange();// Set initial value -mediaQuery.addEventListener("change",handleChange);return()=>mediaQuery.removeEventListener("change",handleChange);},[]);const theme=(0,react.useMemo)(()=>{let htmlFontSize=16;try{const s=window.getComputedStyle(document.body.parentNode).fontSize;const fontSize=parseInt(s.replace("px",""));if(fontSize>0&&fontSize<1000){htmlFontSize=fontSize;}}catch(err){// -}const isDarkMode=darkMode==="dark"||darkMode==="auto"&&systemMode===THEME_DARK;return (0,createTheme/* default */.Z)({palette:{mode:isDarkMode?THEME_DARK:THEME_LIGHT},typography:{htmlFontSize},...options});},[darkMode,options,systemMode]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(styles_ThemeProvider_ThemeProvider,{theme:theme,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(CssBaseline_CssBaseline,{}),/*#__PURE__*/(0,jsx_runtime.jsx)(material_GlobalStyles_GlobalStyles,{styles:styles}),children]});} + */function Theme(_ref){let{children,options={},styles={}}=_ref;const{darkMode}=useDarkMode();const[systemMode,setSystemMode]=(0,react.useState)(THEME_LIGHT);(0,react.useEffect)(()=>{if(typeof window.matchMedia!=="function"){return;}const mediaQuery=window.matchMedia("(prefers-color-scheme: dark)");const handleChange=()=>{setSystemMode(mediaQuery.matches?THEME_DARK:THEME_LIGHT);};handleChange();// Set initial value +mediaQuery.addEventListener("change",handleChange);return()=>mediaQuery.removeEventListener("change",handleChange);},[]);const theme=(0,react.useMemo)(()=>{const isDarkMode=darkMode==="dark"||darkMode==="auto"&&systemMode===THEME_DARK;return (0,createTheme/* default */.Z)({palette:{mode:isDarkMode?THEME_DARK:THEME_LIGHT},typography:{htmlFontSize:document.documentElement.style.fontSize?"16px":16},...options});},[darkMode,options,systemMode]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(styles_ThemeProvider_ThemeProvider,{theme:theme,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(CssBaseline_CssBaseline,{}),/*#__PURE__*/(0,jsx_runtime.jsx)(material_GlobalStyles_GlobalStyles,{styles:styles}),children]});} ;// CONCATENATED MODULE: ./src/libs/gm.js const MSG_GM_xmlHttpRequest="xmlHttpRequest";const MSG_GM_setValue="setValue";const MSG_GM_getValue="getValue";const MSG_GM_deleteValue="deleteValue";const MSG_GM_info="info";/** * 注入页面的脚本,请求并接受GM接口信息 * @param {*} param0 - */const injectScript=ping=>{window.APP_INFO={name:"KISS Translator",version:"2.0.5",eventName:ping};};/** + */const injectScript=ping=>{window.APP_INFO={name:"KISS Translator",version:"2.0.6",eventName:ping};};/** * 适配GM脚本 */const adaptScript=ping=>{const promiseGM=function(action,args){let timeout=arguments.length>2&&arguments[2]!==undefined?arguments[2]:5000;return new Promise((resolve,reject)=>{const pong=genEventName();const handleEvent=e=>{window.removeEventListener(pong,handleEvent);const{data,error}=e.detail;if(error){reject(new Error(error));}else{resolve(data);}};window.addEventListener(pong,handleEvent);window.dispatchEvent(new CustomEvent(ping,{detail:{action,args,pong}}));setTimeout(()=>{window.removeEventListener(pong,handleEvent);reject(new Error("timeout"));},timeout);});};window.KISS_GM={fetch:(input,init)=>promiseGM(MSG_GM_xmlHttpRequest,{input,init}),setValue:(key,val)=>promiseGM(MSG_GM_setValue,{key,val}),getValue:key=>promiseGM(MSG_GM_getValue,{key}),deleteValue:key=>promiseGM(MSG_GM_deleteValue,{key}),getInfo:async()=>{if(!window.GM_info){window.GM_info=await promiseGM(MSG_GM_info);}return window.GM_info;}};};/** * 监听并回应页面对GM接口的请求 @@ -81137,13 +81157,13 @@ update(formData);};const handleReset=()=>{reset();};const handleDelete=async()=> customHeader="",customBody="",// think = false, // thinkIgnore = "", fetchLimit=DEFAULT_FETCH_LIMIT,fetchInterval=DEFAULT_FETCH_INTERVAL,httpTimeout=DEFAULT_HTTP_TIMEOUT,dictNo="",memoryNo="",reqHook="",resHook="",temperature=0,maxTokens=20480,apiName="",isDisabled=false,useBatchFetch=false,batchInterval=DEFAULT_BATCH_INTERVAL,batchSize=DEFAULT_BATCH_SIZE,batchLength=DEFAULT_BATCH_LENGTH,useContext=false,contextSize=DEFAULT_CONTEXT_SIZE,tone="neutral",placeholder=BUILTIN_PLACEHOLDERS[0],placetag=BUILTIN_PLACETAGS[0],region=""// aiTerms = false, -}=formData;const keyHelper=(0,react.useMemo)(()=>API_SPE_TYPES.mulkeys.has(apiType)?i18n("mulkeys_help"):"",[apiType,i18n]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("api_name"),name:"apiName",value:apiName,onChange:handleChange}),!API_SPE_TYPES.machine.has(apiType)&&apiType!==OPT_TRANS_BUILTINAI&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"URL",name:"url",value:url,onChange:handleChange,multiline:apiType===OPT_TRANS_DEEPLX,maxRows:10,helperText:apiType===OPT_TRANS_DEEPLX?i18n("mulkeys_help"):""}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"KEY",name:"key",value:key,onChange:handleChange,multiline:API_SPE_TYPES.mulkeys.has(apiType),maxRows:10,helperText:keyHelper})]}),apiType===OPT_TRANS_AZUREAI&&/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"Region",name:"region",value:region,onChange:handleChange}),(API_SPE_TYPES.ai.has(apiType)||apiType===api_OPT_TRANS_CUSTOMIZE)&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",fullWidth:true,label:"MODEL",name:"model",value:model,onChange:handleChange})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(ReusableAutocomplete,{freeSolo:true,size:"small",fullWidth:true,options:BUILTIN_STONES,name:"tone",label:i18n("translation_style"),value:tone,onChange:handleChange})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{size:"small",fullWidth:true,label:"Temperature",type:"number",name:"temperature",value:temperature,onChange:handleChange,min:0.0,max:2.0,isFloat:true})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{size:"small",fullWidth:true,label:"Max Tokens (0-1000000)",type:"number",name:"maxTokens",value:maxTokens,onChange:handleChange,min:0,max:1000000})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3})]})}),useBatchFetch?/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"BATCH SYSTEM PROMPT",name:"systemPrompt",value:systemPrompt,onChange:handleChange,multiline:true,maxRows:10,helperText:i18n("system_prompt_helper")}):/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"SYSTEM PROMPT",name:"nobatchPrompt",value:nobatchPrompt,onChange:handleChange,multiline:true,maxRows:10}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"USER PROMPT",name:"nobatchUserPrompt",value:nobatchUserPrompt,onChange:handleChange,multiline:true,maxRows:10})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"SUBTITLE PROMPT",name:"subtitlePrompt",value:subtitlePrompt,onChange:handleChange,multiline:true,maxRows:10,helperText:i18n("system_prompt_helper")})]}),apiType===OPT_TRANS_NIUTRANS&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"DictNo",name:"dictNo",value:dictNo,onChange:handleChange}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"MemoryNo",name:"memoryNo",value:memoryNo,onChange:handleChange})]}),apiType===api_OPT_TRANS_CUSTOMIZE&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"Request Hook",name:"reqHook",value:reqHook,onChange:handleChange,multiline:true,maxRows:10,FormHelperTextProps:{component:"div"},helperText:/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{component:"pre",sx:{overflowX:"auto"},children:i18n("request_hook_helper")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"Response Hook",name:"resHook",value:resHook,onChange:handleChange,multiline:true,maxRows:10,FormHelperTextProps:{component:"div"},helperText:/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{component:"pre",sx:{overflowX:"auto"},children:i18n("response_hook_helper")})})]}),API_SPE_TYPES.batch.has(api.apiType)&&/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"useBatchFetch",value:useBatchFetch,label:i18n("use_batch_fetch"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:false,children:i18n("disable")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:true,children:i18n("enable")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{size:"small",fullWidth:true,label:i18n("batch_interval"),type:"number",name:"batchInterval",value:batchInterval,onChange:handleChange,min:100,max:10000})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{size:"small",fullWidth:true,label:i18n("batch_size"),type:"number",name:"batchSize",value:batchSize,onChange:handleChange,min:1,max:100})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{size:"small",fullWidth:true,label:i18n("batch_length"),type:"number",name:"batchLength",value:batchLength,onChange:handleChange,min:1000,max:100000})})]})}),API_SPE_TYPES.context.has(api.apiType)&&/*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:[" ",/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"useContext",value:useContext,label:i18n("use_context"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:false,children:i18n("disable")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:true,children:i18n("enable")})]})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:[" ",/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",fullWidth:true,label:i18n("context_size"),type:"number",name:"contextSize",value:contextSize,onChange:handleChange,min:1,max:20})]})]})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{size:"small",fullWidth:true,label:i18n("fetch_limit"),type:"number",name:"fetchLimit",value:fetchLimit,onChange:handleChange,min:1,max:100})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{size:"small",fullWidth:true,label:i18n("fetch_interval"),type:"number",name:"fetchInterval",value:fetchInterval,onChange:handleChange,min:0,max:5000})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{size:"small",fullWidth:true,label:i18n("http_timeout"),type:"number",name:"httpTimeout",value:httpTimeout,onChange:handleChange,min:5000,max:60000})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3})]})}),showMore&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"placeholder",value:placeholder,label:i18n("api_placeholder"),onChange:handleChange,children:BUILTIN_PLACEHOLDERS.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:item},item))})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"placetag",value:placetag,label:i18n("api_placetag"),onChange:handleChange,children:BUILTIN_PLACETAGS.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:"<".concat(item,">")},item))})})]})}),apiType!==OPT_TRANS_BUILTINAI&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[" ",/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("custom_header"),name:"customHeader",value:customHeader,onChange:handleChange,multiline:true,maxRows:10,helperText:i18n("custom_header_help")}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("custom_body"),name:"customBody",value:customBody,onChange:handleChange,multiline:true,maxRows:10,helperText:i18n("custom_body_help")})]}),apiType!==api_OPT_TRANS_CUSTOMIZE&&apiType!==OPT_TRANS_BUILTINAI&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"Request Hook",name:"reqHook",value:reqHook,onChange:handleChange,multiline:true,maxRows:10,FormHelperTextProps:{component:"div"},helperText:/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{component:"pre",sx:{overflowX:"auto"},children:i18n("request_hook_helper")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"Response Hook",name:"resHook",value:resHook,onChange:handleChange,multiline:true,maxRows:10,FormHelperTextProps:{component:"div"},helperText:/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{component:"pre",sx:{overflowX:"auto"},children:i18n("response_hook_helper")})})]})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",spacing:2,useFlexGap:true,flexWrap:"wrap",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"contained",onClick:handleSave,disabled:!isModified,children:i18n("save")}),/*#__PURE__*/(0,jsx_runtime.jsx)(TestButton,{api:formData}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"outlined",onClick:handleReset,children:i18n("restore_default")}),isUserApi&&/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"outlined",color:"error",onClick:handleDelete,children:i18n("delete")}),/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"isDisabled",checked:isDisabled,onChange:handleChange}),label:i18n("is_disabled")}),/*#__PURE__*/(0,jsx_runtime.jsx)(ShowMoreButton,{showMore:showMore,onChange:setShowMore})]})]});}function ApiAccordion(_ref3){let{api,isUserApi,deleteApi}=_ref3;const[expanded,setExpanded]=(0,react.useState)(false);const handleChange=e=>{setExpanded(pre=>!pre);};return/*#__PURE__*/(0,jsx_runtime.jsxs)(Accordion_Accordion,{expanded:expanded,onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(AccordionSummary_AccordionSummary,{expandIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(ExpandMore/* default */.Z,{}),children:/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{sx:{opacity:api.isDisabled?0.5:1,overflowWrap:"anywhere"},children:"[".concat(api.apiType,"] ").concat(api.apiName)})}),/*#__PURE__*/(0,jsx_runtime.jsx)(AccordionDetails_AccordionDetails,{children:expanded&&/*#__PURE__*/(0,jsx_runtime.jsx)(ApiFields,{apiSlug:api.apiSlug,isUserApi:isUserApi,deleteApi:deleteApi})})]});}function Apis(){const i18n=useI18n();const{userApis,builtinApis,addApi,deleteApi}=useApiList();const apiTypes=(0,react.useMemo)(()=>OPT_ALL_TRANS_TYPES.map(type=>({type,label:type})),[]);const[anchorEl,setAnchorEl]=(0,react.useState)(null);const open=Boolean(anchorEl);const handleClick=event=>{setAnchorEl(event.currentTarget);};const handleClose=()=>{setAnchorEl(null);};const handleMenuItemClick=apiType=>{addApi(apiType);handleClose();};return/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Alert_Alert,{severity:"info",children:[i18n("about_api"),/*#__PURE__*/(0,jsx_runtime.jsx)("br",{}),i18n("about_api_2"),/*#__PURE__*/(0,jsx_runtime.jsx)("br",{}),i18n("about_api_3"),/*#__PURE__*/(0,jsx_runtime.jsx)(material_Link_Link,{href:"https://github.com/fishjar/kiss-translator/blob/master/custom-api_v2.md",target:"_blank",children:i18n("goto_custom_api_example")})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Box_Box,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",id:"add-api-button",variant:"contained",onClick:handleClick,"aria-controls":open?"add-api-menu":undefined,"aria-haspopup":"true","aria-expanded":open?"true":undefined,endIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(KeyboardArrowDown/* default */.Z,{}),startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Add/* default */.Z,{}),children:i18n("add")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Menu_Menu,{id:"add-api-menu",anchorEl:anchorEl,open:open,onClose:handleClose,MenuListProps:{"aria-labelledby":"add-api-button"},children:apiTypes.map(apiOption=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{onClick:()=>handleMenuItemClick(apiOption.type),children:apiOption.label},apiOption.type))})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:userApis.map(api=>/*#__PURE__*/(0,jsx_runtime.jsx)(ApiAccordion,{api:api,isUserApi:true,deleteApi:deleteApi},api.apiSlug))}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:builtinApis.map(api=>/*#__PURE__*/(0,jsx_runtime.jsx)(ApiAccordion,{api:api},api.apiSlug))})]})});} +}=formData;const keyHelper=(0,react.useMemo)(()=>API_SPE_TYPES.mulkeys.has(apiType)?i18n("mulkeys_help"):"",[apiType,i18n]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("api_name"),name:"apiName",value:apiName,onChange:handleChange}),!API_SPE_TYPES.machine.has(apiType)&&apiType!==OPT_TRANS_BUILTINAI&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"URL",name:"url",value:url,onChange:handleChange,multiline:apiType===OPT_TRANS_DEEPLX,maxRows:10,helperText:apiType===OPT_TRANS_DEEPLX?i18n("mulkeys_help"):""}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"KEY",name:"key",value:key,onChange:handleChange,multiline:API_SPE_TYPES.mulkeys.has(apiType),maxRows:10,helperText:keyHelper})]}),apiType===OPT_TRANS_AZUREAI&&/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"Region",name:"region",value:region,onChange:handleChange}),(API_SPE_TYPES.ai.has(apiType)||apiType===api_OPT_TRANS_CUSTOMIZE)&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",fullWidth:true,label:"MODEL",name:"model",value:model,onChange:handleChange})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(ReusableAutocomplete,{freeSolo:true,size:"small",fullWidth:true,options:BUILTIN_STONES,name:"tone",label:i18n("translation_style"),value:tone,onChange:handleChange})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{size:"small",fullWidth:true,label:"Temperature",type:"number",name:"temperature",value:temperature,onChange:handleChange,min:0.0,max:2.0,isFloat:true})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{size:"small",fullWidth:true,label:"Max Tokens (0-1000000)",type:"number",name:"maxTokens",value:maxTokens,onChange:handleChange,min:0,max:1000000})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3})]})}),useBatchFetch?/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"BATCH SYSTEM PROMPT",name:"systemPrompt",value:systemPrompt,onChange:handleChange,multiline:true,maxRows:10,helperText:i18n("system_prompt_helper")}):/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"SYSTEM PROMPT",name:"nobatchPrompt",value:nobatchPrompt,onChange:handleChange,multiline:true,maxRows:10}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"USER PROMPT",name:"nobatchUserPrompt",value:nobatchUserPrompt,onChange:handleChange,multiline:true,maxRows:10})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"SUBTITLE PROMPT",name:"subtitlePrompt",value:subtitlePrompt,onChange:handleChange,multiline:true,maxRows:10,helperText:i18n("system_prompt_helper")})]}),apiType===OPT_TRANS_NIUTRANS&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"DictNo",name:"dictNo",value:dictNo,onChange:handleChange}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"MemoryNo",name:"memoryNo",value:memoryNo,onChange:handleChange})]}),apiType===api_OPT_TRANS_CUSTOMIZE&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"Request Hook",name:"reqHook",value:reqHook,onChange:handleChange,multiline:true,maxRows:10,FormHelperTextProps:{component:"div"},helperText:/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{component:"pre",sx:{overflowX:"auto"},children:i18n("request_hook_helper")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"Response Hook",name:"resHook",value:resHook,onChange:handleChange,multiline:true,maxRows:10,FormHelperTextProps:{component:"div"},helperText:/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{component:"pre",sx:{overflowX:"auto"},children:i18n("response_hook_helper")})})]}),API_SPE_TYPES.batch.has(api.apiType)&&/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"useBatchFetch",value:useBatchFetch,label:i18n("use_batch_fetch"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:false,children:i18n("disable")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:true,children:i18n("enable")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{size:"small",fullWidth:true,label:i18n("batch_interval"),type:"number",name:"batchInterval",value:batchInterval,onChange:handleChange,min:100,max:10000})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{size:"small",fullWidth:true,label:i18n("batch_size"),type:"number",name:"batchSize",value:batchSize,onChange:handleChange,min:1,max:100})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{size:"small",fullWidth:true,label:i18n("batch_length"),type:"number",name:"batchLength",value:batchLength,onChange:handleChange,min:1000,max:100000})})]})}),API_SPE_TYPES.context.has(api.apiType)&&/*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:[" ",/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,size:"small",fullWidth:true,name:"useContext",value:useContext,label:i18n("use_context"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:false,children:i18n("disable")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:true,children:i18n("enable")})]})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:[" ",/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",fullWidth:true,label:i18n("context_size"),type:"number",name:"contextSize",value:contextSize,onChange:handleChange,min:1,max:20})]})]})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{size:"small",fullWidth:true,label:i18n("fetch_limit"),type:"number",name:"fetchLimit",value:fetchLimit,onChange:handleChange,min:1,max:100})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{size:"small",fullWidth:true,label:i18n("fetch_interval"),type:"number",name:"fetchInterval",value:fetchInterval,onChange:handleChange,min:0,max:5000})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{size:"small",fullWidth:true,label:i18n("http_timeout"),type:"number",name:"httpTimeout",value:httpTimeout,onChange:handleChange,min:1000,max:60000})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3})]})}),showMore&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"placeholder",value:placeholder,label:i18n("api_placeholder"),onChange:handleChange,children:BUILTIN_PLACEHOLDERS.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:item},item))})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"placetag",value:placetag,label:i18n("api_placetag"),onChange:handleChange,children:BUILTIN_PLACETAGS.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:"<".concat(item,">")},item))})})]})}),apiType!==OPT_TRANS_BUILTINAI&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[" ",/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("custom_header"),name:"customHeader",value:customHeader,onChange:handleChange,multiline:true,maxRows:10,helperText:i18n("custom_header_help")}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("custom_body"),name:"customBody",value:customBody,onChange:handleChange,multiline:true,maxRows:10,helperText:i18n("custom_body_help")})]}),apiType!==api_OPT_TRANS_CUSTOMIZE&&apiType!==OPT_TRANS_BUILTINAI&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"Request Hook",name:"reqHook",value:reqHook,onChange:handleChange,multiline:true,maxRows:10,FormHelperTextProps:{component:"div"},helperText:/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{component:"pre",sx:{overflowX:"auto"},children:i18n("request_hook_helper")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"Response Hook",name:"resHook",value:resHook,onChange:handleChange,multiline:true,maxRows:10,FormHelperTextProps:{component:"div"},helperText:/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{component:"pre",sx:{overflowX:"auto"},children:i18n("response_hook_helper")})})]})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",spacing:2,useFlexGap:true,flexWrap:"wrap",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"contained",onClick:handleSave,disabled:!isModified,children:i18n("save")}),/*#__PURE__*/(0,jsx_runtime.jsx)(TestButton,{api:formData}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"outlined",onClick:handleReset,children:i18n("restore_default")}),isUserApi&&/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"outlined",color:"error",onClick:handleDelete,children:i18n("delete")}),/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"isDisabled",checked:isDisabled,onChange:handleChange}),label:i18n("is_disabled")}),/*#__PURE__*/(0,jsx_runtime.jsx)(ShowMoreButton,{showMore:showMore,onChange:setShowMore})]})]});}function ApiAccordion(_ref3){let{api,isUserApi,deleteApi}=_ref3;const[expanded,setExpanded]=(0,react.useState)(false);const handleChange=e=>{setExpanded(pre=>!pre);};return/*#__PURE__*/(0,jsx_runtime.jsxs)(Accordion_Accordion,{expanded:expanded,onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(AccordionSummary_AccordionSummary,{expandIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(ExpandMore/* default */.Z,{}),children:/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{sx:{opacity:api.isDisabled?0.5:1,overflowWrap:"anywhere"},children:"[".concat(api.apiType,"] ").concat(api.apiName)})}),/*#__PURE__*/(0,jsx_runtime.jsx)(AccordionDetails_AccordionDetails,{children:expanded&&/*#__PURE__*/(0,jsx_runtime.jsx)(ApiFields,{apiSlug:api.apiSlug,isUserApi:isUserApi,deleteApi:deleteApi})})]});}function Apis(){const i18n=useI18n();const{userApis,builtinApis,addApi,deleteApi}=useApiList();const apiTypes=(0,react.useMemo)(()=>OPT_ALL_TRANS_TYPES.map(type=>({type,label:type})),[]);const[anchorEl,setAnchorEl]=(0,react.useState)(null);const open=Boolean(anchorEl);const handleClick=event=>{setAnchorEl(event.currentTarget);};const handleClose=()=>{setAnchorEl(null);};const handleMenuItemClick=apiType=>{addApi(apiType);handleClose();};return/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Alert_Alert,{severity:"info",children:[i18n("about_api"),/*#__PURE__*/(0,jsx_runtime.jsx)("br",{}),i18n("about_api_2"),/*#__PURE__*/(0,jsx_runtime.jsx)("br",{}),i18n("about_api_3"),/*#__PURE__*/(0,jsx_runtime.jsx)(material_Link_Link,{href:"https://github.com/fishjar/kiss-translator/blob/master/custom-api_v2.md",target:"_blank",children:i18n("goto_custom_api_example")})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Box_Box,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",id:"add-api-button",variant:"contained",onClick:handleClick,"aria-controls":open?"add-api-menu":undefined,"aria-haspopup":"true","aria-expanded":open?"true":undefined,endIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(KeyboardArrowDown/* default */.Z,{}),startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Add/* default */.Z,{}),children:i18n("add")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Menu_Menu,{id:"add-api-menu",anchorEl:anchorEl,open:open,onClose:handleClose,MenuListProps:{"aria-labelledby":"add-api-button"},children:apiTypes.map(apiOption=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{onClick:()=>handleMenuItemClick(apiOption.type),children:apiOption.label},apiOption.type))})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:userApis.map(api=>/*#__PURE__*/(0,jsx_runtime.jsx)(ApiAccordion,{api:api,isUserApi:true,deleteApi:deleteApi},api.apiSlug))}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:builtinApis.map(api=>/*#__PURE__*/(0,jsx_runtime.jsx)(ApiAccordion,{api:api},api.apiSlug))})]})});} ;// CONCATENATED MODULE: ./src/hooks/InputRule.js -function useInputRule(){const{setting,updateChild}=Setting_useSetting();const inputRule=(setting===null||setting===void 0?void 0:setting.inputRule)||DEFAULT_INPUT_RULE;const updateInputRule=updateChild("inputRule");return{inputRule,updateInputRule};} +function useInputRule(){const{setting,updateChild}=useSetting();const inputRule=(setting===null||setting===void 0?void 0:setting.inputRule)||DEFAULT_INPUT_RULE;const updateInputRule=updateChild("inputRule");return{inputRule,updateInputRule};} ;// CONCATENATED MODULE: ./src/views/Options/InputSetting.js function InputSetting(){const i18n=useI18n();const{inputRule,updateInputRule}=useInputRule();const{enabledApis}=useApiList();const handleChange=e=>{e.preventDefault();let{name,value}=e.target;updateInputRule({[name]:value});};const handleShortcutInput=(0,react.useCallback)(val=>{updateInputRule({triggerShortcut:val});},[updateInputRule]);const{transOpen,apiSlug,fromLang,toLang,triggerShortcut,triggerCount,triggerTime,transSign}=inputRule;return/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"transOpen",checked:transOpen,onChange:()=>{updateInputRule({transOpen:!transOpen});}}),label:i18n("use_input_box_translation"),sx:{width:"fit-content"}}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"apiSlug",value:apiSlug,label:i18n("translate_service"),onChange:handleChange,children:enabledApis.map(api=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:api.apiSlug,children:api.apiName},api.apiSlug))})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"fromLang",value:fromLang,label:i18n("from_lang"),onChange:handleChange,children:OPT_LANGS_FROM.map(_ref=>{let[lang,name]=_ref;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"toLang",value:toLang,label:i18n("to_lang"),onChange:handleChange,children:OPT_LANGS_TO.map(_ref2=>{let[lang,name]=_ref2;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"transSign",value:transSign,label:i18n("input_trans_start_sign"),onChange:handleChange,helperText:i18n("input_trans_start_sign_help"),children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"",children:i18n("style_none")}),OPT_INPUT_TRANS_SIGNS.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:item},item))]})})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(ShortcutInput,{value:triggerShortcut,onChange:handleShortcutInput,label:i18n("trigger_trans_shortcut"),helperText:i18n("trigger_trans_shortcut_help")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"triggerCount",value:triggerCount,label:i18n("shortcut_press_count"),onChange:handleChange,children:[1,2,3,4,5].map(val=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:val,children:val},val))})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{fullWidth:true,size:"small",label:i18n("combo_timeout"),type:"number",name:"triggerTime",value:triggerTime,onChange:handleChange,min:10,max:1000})})]})})]})});} ;// CONCATENATED MODULE: ./src/hooks/Tranbox.js -function useTranbox(){const{setting,updateChild}=Setting_useSetting();const tranboxSetting=(setting===null||setting===void 0?void 0:setting.tranboxSetting)||DEFAULT_TRANBOX_SETTING;const updateTranbox=updateChild("tranboxSetting");return{tranboxSetting,updateTranbox};} +function useTranbox(){const{setting,updateChild}=useSetting();const tranboxSetting=(setting===null||setting===void 0?void 0:setting.tranboxSetting)||DEFAULT_TRANBOX_SETTING;const updateTranbox=updateChild("tranboxSetting");return{tranboxSetting,updateTranbox};} ;// CONCATENATED MODULE: ./src/views/Options/Tranbox.js function Tranbox(){const i18n=useI18n();const{tranboxSetting,updateTranbox}=useTranbox();const{enabledApis}=useApiList();const handleChange=e=>{e.preventDefault();let{name,value}=e.target;switch(name){case"btnOffsetX":case"btnOffsetY":case"boxOffsetX":case"boxOffsetY":value=limitNumber(value,-200,200);break;default:}updateTranbox({[name]:value});};const handleShortcutInput=(0,react.useCallback)(val=>{updateTranbox({tranboxShortcut:val});},[updateTranbox]);const{transOpen,apiSlugs,fromLang,toLang,toLang2="en",tranboxShortcut,btnOffsetX,btnOffsetY,boxOffsetX=0,boxOffsetY=10,hideTranBtn=false,hideClickAway=false,simpleStyle=false,followSelection=false,autoHeight=false,triggerMode=OPT_TRANBOX_TRIGGER_CLICK,// extStyles = "", enDict=OPT_DICT_BING,enSug=OPT_SUG_YOUDAO}=tranboxSetting;return/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"transOpen",checked:transOpen,onChange:()=>{updateTranbox({transOpen:!transOpen});}}),label:i18n("toggle_selection_translate"),sx:{width:"fit-content"}}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"apiSlugs",value:apiSlugs,label:i18n("translate_service_multiple"),onChange:handleChange,SelectProps:{multiple:true},children:enabledApis.map(api=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:api.apiSlug,children:api.apiName},api.apiSlug))})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{fullWidth:true,select:true,size:"small",name:"fromLang",value:fromLang,label:i18n("from_lang"),onChange:handleChange,children:OPT_LANGS_FROM.map(_ref=>{let[lang,name]=_ref;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{fullWidth:true,select:true,size:"small",name:"toLang",value:toLang,label:i18n("to_lang"),onChange:handleChange,children:OPT_LANGS_TO.map(_ref2=>{let[lang,name]=_ref2;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{fullWidth:true,select:true,size:"small",name:"toLang2",value:toLang2,label:i18n("to_lang2"),helperText:i18n("to_lang2_helper"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"-",children:i18n("disable")}),OPT_LANGS_TO.map(_ref3=>{let[lang,name]=_ref3;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{fullWidth:true,select:true,size:"small",name:"enDict",value:enDict,label:i18n("english_dict"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"-",children:i18n("disable")}),OPT_DICT_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:item},item))]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{fullWidth:true,select:true,size:"small",name:"enSug",value:enSug,label:i18n("english_suggest"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"-",children:i18n("disable")}),OPT_SUG_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:item},item))]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{fullWidth:true,select:true,size:"small",name:"triggerMode",value:triggerMode,label:i18n("trigger_mode"),onChange:handleChange,children:OPT_TRANBOX_TRIGGER_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:i18n("trigger_".concat(item))},item))})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{fullWidth:true,select:true,size:"small",name:"hideTranBtn",value:hideTranBtn,label:i18n("hide_tran_button"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:false,children:i18n("show")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:true,children:i18n("hide")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{fullWidth:true,select:true,size:"small",name:"hideClickAway",value:hideClickAway,label:i18n("hide_click_away"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:false,children:i18n("disable")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:true,children:i18n("enable")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{fullWidth:true,select:true,size:"small",name:"simpleStyle",value:simpleStyle,label:i18n("use_simple_style"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:false,children:i18n("disable")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:true,children:i18n("enable")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{fullWidth:true,select:true,size:"small",name:"followSelection",value:followSelection,label:i18n("follow_selection"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:false,children:i18n("disable")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:true,children:i18n("enable")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{fullWidth:true,size:"small",label:i18n("tranbtn_offset_x"),type:"number",name:"btnOffsetX",value:btnOffsetX,onChange:handleChange,min:-200,max:200})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{fullWidth:true,size:"small",label:i18n("tranbtn_offset_y"),type:"number",name:"btnOffsetY",value:btnOffsetY,onChange:handleChange,min:-200,max:200})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{fullWidth:true,size:"small",label:i18n("tranbox_offset_x"),type:"number",name:"boxOffsetX",value:boxOffsetX,onChange:handleChange,min:-200,max:200})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{fullWidth:true,size:"small",label:i18n("tranbox_offset_y"),type:"number",name:"boxOffsetY",value:boxOffsetY,onChange:handleChange,min:-200,max:200})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{fullWidth:true,select:true,size:"small",name:"autoHeight",value:autoHeight,label:i18n("tranbox_auto_height"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:false,children:i18n("disable")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:true,children:i18n("enable")})]})}),!client_isExt&&/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(ShortcutInput,{value:tranboxShortcut,onChange:handleShortcutInput,label:i18n("trigger_tranbox_shortcut")})})]})})]})});} @@ -81182,7 +81202,7 @@ function DictBody(_ref){let{text,setCopyText,setRealWord,dict}=_ref;const{loadin ;// CONCATENATED MODULE: ./src/views/Selection/SugCont.js function SugBaidu(_ref){let{text}=_ref;const{loading,error,data}=useAsyncNow(apiBaiduSuggest,text);if(loading){return/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{size:16});}if(error){return/*#__PURE__*/(0,jsx_runtime.jsx)(Alert_Alert,{severity:"error",children:error});}if(!data){return null;}return/*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:data.map(_ref2=>{let{k,v}=_ref2;return/*#__PURE__*/(0,jsx_runtime.jsxs)(Typography_Typography,{component:"div",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{children:k}),/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{component:"ul",style:{margin:"0"},children:/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{component:"li",children:v})})]},k);})});}function SugYoudao(_ref3){let{text}=_ref3;const{loading,error,data}=useAsyncNow(apiYoudaoSuggest,text);if(loading){return/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{size:16});}if(error){return/*#__PURE__*/(0,jsx_runtime.jsx)(Alert_Alert,{severity:"error",children:error});}if(!data){return null;}return/*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:data.map(_ref4=>{let{entry,explain}=_ref4;return/*#__PURE__*/(0,jsx_runtime.jsxs)(Typography_Typography,{component:"div",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{children:entry}),/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{component:"ul",style:{margin:"0"},children:/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{component:"li",children:explain})})]},entry);})});}function SugCont(_ref5){let{text,enSug}=_ref5;const sugMap={[OPT_SUG_BAIDU]:/*#__PURE__*/(0,jsx_runtime.jsx)(SugBaidu,{text:text}),[OPT_SUG_YOUDAO]:/*#__PURE__*/(0,jsx_runtime.jsx)(SugYoudao,{text:text})};return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:1,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Divider_Divider,{}),sugMap[enSug]||/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{children:"Sug not support"})]});} ;// CONCATENATED MODULE: ./src/views/Options/FavWords.js -function FavAccordion(_ref){let{word,index}=_ref;const[expanded,setExpanded]=(0,react.useState)(false);const{setting}=Setting_useSetting();const{enDict,enSug}=(setting===null||setting===void 0?void 0:setting.tranboxSetting)||{};const handleChange=e=>{setExpanded(pre=>!pre);};return/*#__PURE__*/(0,jsx_runtime.jsxs)(Accordion_Accordion,{expanded:expanded,onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(AccordionSummary_AccordionSummary,{expandIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(ExpandMore/* default */.Z,{}),children:/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{children:"".concat(index+1,". ").concat(word)})}),/*#__PURE__*/(0,jsx_runtime.jsx)(AccordionDetails_AccordionDetails,{children:expanded&&/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(DictCont,{text:word,enDict:enDict}),/*#__PURE__*/(0,jsx_runtime.jsx)(SugCont,{text:word,enSug:enSug})]})})]});}function FavWords(){const i18n=useI18n();const{favList,wordList,mergeWords,clearWords}=useFavWords();const{setting}=Setting_useSetting();const confirm=useConfirm();const handleImport=data=>{try{const newWords=data.split("\n").map(line=>line.split(",")[0].trim()).filter(isValidWord);mergeWords(newWords);}catch(err){log_kissLog("import rules",err);}};const handleClearWords=async()=>{const isConfirmed=await confirm({confirmText:i18n("confirm_title"),cancelText:i18n("cancel")});if(isConfirmed){clearWords();}};const handleTranslation=async()=>{const{enDict}=setting===null||setting===void 0?void 0:setting.tranboxSetting;const dict=dictHandlers[enDict];if(!dict)return"";const tranList=[];for(const word of wordList){try{const data=await dict.apiFn(word);const title="## ".concat(dict.reWord(data)||word);const tran=dict.toText(data).map(line=>"- ".concat(line)).join("\n");tranList.push([title,tran].join("\n"));}catch(err){log_kissLog("export translation",err);}}return tranList.join("\n\n");};return/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Alert_Alert,{severity:"info",children:i18n("favorite_words_helper")}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",spacing:2,useFlexGap:true,flexWrap:"wrap",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(UploadButton,{text:i18n("import"),handleImport:handleImport,fileType:"text",fileExts:[".txt",".csv"]}),/*#__PURE__*/(0,jsx_runtime.jsx)(DownloadButton,{handleData:()=>wordList.join("\n"),text:i18n("export"),fileName:"kiss-words_".concat(Date.now(),".txt")}),/*#__PURE__*/(0,jsx_runtime.jsx)(DownloadButton,{handleData:handleTranslation,text:i18n("export_translation"),fileName:"kiss-words_".concat(Date.now(),".md")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"outlined",onClick:handleClearWords,startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(ClearAll/* default */.Z,{}),children:i18n("clear_all")})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:favList.map((_ref2,index)=>{let[word,{createdAt}]=_ref2;return/*#__PURE__*/(0,jsx_runtime.jsx)(FavAccordion,{index:index,word:word,createdAt:createdAt},word);})})]})});} +function FavAccordion(_ref){let{word,index}=_ref;const[expanded,setExpanded]=(0,react.useState)(false);const{setting}=useSetting();const{enDict,enSug}=(setting===null||setting===void 0?void 0:setting.tranboxSetting)||{};const handleChange=e=>{setExpanded(pre=>!pre);};return/*#__PURE__*/(0,jsx_runtime.jsxs)(Accordion_Accordion,{expanded:expanded,onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(AccordionSummary_AccordionSummary,{expandIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(ExpandMore/* default */.Z,{}),children:/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{children:"".concat(index+1,". ").concat(word)})}),/*#__PURE__*/(0,jsx_runtime.jsx)(AccordionDetails_AccordionDetails,{children:expanded&&/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(DictCont,{text:word,enDict:enDict}),/*#__PURE__*/(0,jsx_runtime.jsx)(SugCont,{text:word,enSug:enSug})]})})]});}function FavWords(){const i18n=useI18n();const{favList,wordList,mergeWords,clearWords}=useFavWords();const{setting}=useSetting();const confirm=useConfirm();const handleImport=data=>{try{const newWords=data.split("\n").map(line=>line.split(",")[0].trim()).filter(isValidWord);mergeWords(newWords);}catch(err){log_kissLog("import rules",err);}};const handleClearWords=async()=>{const isConfirmed=await confirm({confirmText:i18n("confirm_title"),cancelText:i18n("cancel")});if(isConfirmed){clearWords();}};const handleTranslation=async()=>{const{enDict}=setting===null||setting===void 0?void 0:setting.tranboxSetting;const dict=dictHandlers[enDict];if(!dict)return"";const tranList=[];for(const word of wordList){try{const data=await dict.apiFn(word);const title="## ".concat(dict.reWord(data)||word);const tran=dict.toText(data).map(line=>"- ".concat(line)).join("\n");tranList.push([title,tran].join("\n"));}catch(err){log_kissLog("export translation",err);}}return tranList.join("\n\n");};return/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Alert_Alert,{severity:"info",children:i18n("favorite_words_helper")}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",spacing:2,useFlexGap:true,flexWrap:"wrap",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(UploadButton,{text:i18n("import"),handleImport:handleImport,fileType:"text",fileExts:[".txt",".csv"]}),/*#__PURE__*/(0,jsx_runtime.jsx)(DownloadButton,{handleData:()=>wordList.join("\n"),text:i18n("export"),fileName:"kiss-words_".concat(Date.now(),".txt")}),/*#__PURE__*/(0,jsx_runtime.jsx)(DownloadButton,{handleData:handleTranslation,text:i18n("export_translation"),fileName:"kiss-words_".concat(Date.now(),".md")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"outlined",onClick:handleClearWords,startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(ClearAll/* default */.Z,{}),children:i18n("clear_all")})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:favList.map((_ref2,index)=>{let[word,{createdAt}]=_ref2;return/*#__PURE__*/(0,jsx_runtime.jsx)(FavAccordion,{index:index,word:word,createdAt:createdAt},word);})})]})});} // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+icons-material@5.15.15_@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@1_1e29dcefa4691dc57f2acd9f73947cfd/node_modules/@mui/icons-material/Done.js var Done = __webpack_require__(5813); ;// CONCATENATED MODULE: ./src/views/Selection/TranCont.js @@ -81200,21 +81220,25 @@ if(!deLang){try{var _browser$i18n,_res$languages,_res$languages$;const res=await function TranForm(_ref){let{text,setText,apiSlugs:initApiSlugs,fromLang:initFromLang,toLang:initToLang,toLang2:initToLang2,transApis,simpleStyle=false,langDetector:initLangDetector="-",enDict:initEnDict="-",enSug:initEnSug="-",isPlaygound=false}=_ref;const i18n=useI18n();const[editMode,setEditMode]=(0,react.useState)(false);const[editText,setEditText]=(0,react.useState)(text);const[apiSlugs,setApiSlugs]=(0,react.useState)(initApiSlugs);const[fromLang,setFromLang]=(0,react.useState)(initFromLang);const[toLang,setToLang]=(0,react.useState)(initToLang);const[toLang2,setToLang2]=(0,react.useState)(initToLang2);const[langDetector,setLangDetector]=(0,react.useState)(initLangDetector);const[enDict,setEnDict]=(0,react.useState)(initEnDict);const[enSug,setEnSug]=(0,react.useState)(initEnSug);const[deLang,setDeLang]=(0,react.useState)("");const[deLoading,setDeLoading]=(0,react.useState)(false);(0,react.useEffect)(()=>{if(!editMode){setEditText(text);}},[text,editMode]);(0,react.useEffect)(()=>{if(!text.trim()){setDeLang("");return;}(async()=>{try{setDeLoading(true);const deLang=await tryDetectLang(text,langDetector);if(deLang){setDeLang(deLang);}}catch(err){log_kissLog("tranbox: detect lang",err);}finally{setDeLoading(false);}})();},[text,langDetector,setDeLang,setDeLoading]);// todo: 语言变化后,realToLang引发二次翻译请求 const realToLang=(0,react.useMemo)(()=>{if(fromLang==="auto"&&toLang!==toLang2&&toLang2!=="-"&&deLang===toLang){return toLang2;}return toLang;},[fromLang,toLang,toLang2,deLang]);const optApis=(0,react.useMemo)(()=>transApis.filter(api=>!api.isDisabled).map(api=>({key:api.apiSlug,name:api.apiName||api.apiSlug})),[transApis]);const isWord=(0,react.useMemo)(()=>isValidWord(text),[text]);const xs=(0,react.useMemo)(()=>isPlaygound?3:4,[isPlaygound]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:simpleStyle?1:2,children:[!simpleStyle&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{multiple:true,MenuProps:{disablePortal:!isPlaygound}},fullWidth:true,size:"small",value:apiSlugs,name:"apiSlugs",label:i18n("translate_service_multiple"),onChange:e=>{setApiSlugs(e.target.value);},children:optApis.map(_ref2=>{let{key,name}=_ref2;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:key,children:name},key);})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:!isPlaygound}},fullWidth:true,size:"small",name:"fromLang",value:fromLang,label:i18n("from_lang"),onChange:e=>{setFromLang(e.target.value);},children:OPT_LANGS_FROM.map(_ref3=>{let[lang,name]=_ref3;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:!isPlaygound}},fullWidth:true,size:"small",name:"toLang",value:toLang,label:i18n("to_lang"),onChange:e=>{setToLang(e.target.value);},children:OPT_LANGS_TO.map(_ref4=>{let[lang,name]=_ref4;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})})}),isPlaygound&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:!isPlaygound}},fullWidth:true,size:"small",name:"toLang2",value:toLang2,label:i18n("to_lang2"),onChange:e=>{setToLang2(e.target.value);},children:OPT_LANGS_TO.map(_ref5=>{let[lang,name]=_ref5;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:!isPlaygound}},fullWidth:true,size:"small",name:"enDict",value:enDict,label:i18n("english_dict"),onChange:e=>{setEnDict(e.target.value);},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"-",children:i18n("disable")}),OPT_DICT_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:item},item))]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:!isPlaygound}},fullWidth:true,size:"small",name:"enSug",value:enSug,label:i18n("english_suggest"),onChange:e=>{setEnSug(e.target.value);},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"-",children:i18n("disable")}),OPT_SUG_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:item},item))]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,SelectProps:{MenuProps:{disablePortal:!isPlaygound}},fullWidth:true,size:"small",name:"langDetector",value:langDetector,label:i18n("detected_lang"),onChange:e=>{setLangDetector(e.target.value);},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"-",children:i18n("disable")}),OPT_LANGDETECTOR_ALL.map(item=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:item,children:item},item))]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:xs,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{fullWidth:true,size:"small",name:"deLang",value:deLang&&OPT_LANGS_MAP.get(deLang),label:i18n("detected_result"),disabled:true,InputProps:{startAdornment:deLoading?/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{size:16}):null}})})]})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("original_text"),fullWidth:true,multiline:true,minRows:isPlaygound?2:1,maxRows:10,value:editText,onChange:e=>{setEditText(e.target.value);},onFocus:()=>{setEditMode(true);},onBlur:()=>{setEditMode(false);setText(editText.trim());},InputProps:{endAdornment:/*#__PURE__*/(0,jsx_runtime.jsx)(Stack_Stack,{direction:"row",sx:{position:"absolute",right:0,top:0},children:editMode?/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{size:"small",onClick:e=>{e.stopPropagation();setEditMode(false);setText(editText.trim());},children:/*#__PURE__*/(0,jsx_runtime.jsx)(Done/* default */.Z,{fontSize:"inherit"})}):/*#__PURE__*/(0,jsx_runtime.jsx)(CopyBtn,{text:text})})}})})]}),apiSlugs.map(slug=>/*#__PURE__*/(0,jsx_runtime.jsx)(TranCont,{text:text,fromLang:fromLang,toLang:realToLang,simpleStyle:simpleStyle,apiSlug:slug,transApis:transApis},slug)),isWord&&OPT_DICT_MAP.has(enDict)&&/*#__PURE__*/(0,jsx_runtime.jsx)(DictCont,{text:text,enDict:enDict}),isWord&&OPT_SUG_MAP.has(enSug)&&/*#__PURE__*/(0,jsx_runtime.jsx)(SugCont,{text:text,enSug:enSug})]});} ;// CONCATENATED MODULE: ./src/views/Options/Playground.js -function Playgound(){const[text,setText]=(0,react.useState)("");const{setting}=Setting_useSetting();const{transApis,langDetector,tranboxSetting}=setting||setting_DEFAULT_SETTING;const{apiSlugs,fromLang,toLang,toLang2,enDict,enSug}=tranboxSetting||DEFAULT_TRANBOX_SETTING;return/*#__PURE__*/(0,jsx_runtime.jsx)(TranForm,{text:text,setText:setText,apiSlugs:apiSlugs,fromLang:fromLang,toLang:toLang,toLang2:toLang2,transApis:transApis,simpleStyle:false,langDetector:langDetector,enDict:enDict,enSug:enSug,isPlaygound:true});} +function Playgound(){const[text,setText]=(0,react.useState)("");const{setting}=useSetting();const{transApis,langDetector,tranboxSetting}=setting||setting_DEFAULT_SETTING;const{apiSlugs,fromLang,toLang,toLang2,enDict,enSug}=tranboxSetting||DEFAULT_TRANBOX_SETTING;return/*#__PURE__*/(0,jsx_runtime.jsx)(TranForm,{text:text,setText:setText,apiSlugs:apiSlugs,fromLang:fromLang,toLang:toLang,toLang2:toLang2,transApis:transApis,simpleStyle:false,langDetector:langDetector,enDict:enDict,enSug:enSug,isPlaygound:true});} ;// CONCATENATED MODULE: ./src/hooks/MouseHover.js -function useMouseHoverSetting(){const{setting,updateChild}=Setting_useSetting();const mouseHoverSetting=(setting===null||setting===void 0?void 0:setting.mouseHoverSetting)||DEFAULT_MOUSE_HOVER_SETTING;const updateMouseHoverSetting=updateChild("mouseHoverSetting");return{mouseHoverSetting,updateMouseHoverSetting};} +function useMouseHoverSetting(){const{setting,updateChild}=useSetting();const mouseHoverSetting=(setting===null||setting===void 0?void 0:setting.mouseHoverSetting)||DEFAULT_MOUSE_HOVER_SETTING;const updateMouseHoverSetting=updateChild("mouseHoverSetting");return{mouseHoverSetting,updateMouseHoverSetting};} ;// CONCATENATED MODULE: ./src/views/Options/MouseHover.js function MouseHoverSetting(){const i18n=useI18n();const{mouseHoverSetting,updateMouseHoverSetting}=useMouseHoverSetting();const handleShortcutInput=(0,react.useCallback)(val=>{updateMouseHoverSetting({mouseHoverKey:val});},[updateMouseHoverSetting]);const{useMouseHover=true,mouseHoverKey=DEFAULT_MOUSEHOVER_KEY}=mouseHoverSetting;return/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"useMouseHover",checked:useMouseHover,onChange:()=>{updateMouseHoverSetting({useMouseHover:!useMouseHover});}}),label:i18n("use_mousehover_translation"),sx:{width:"fit-content"}}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{container:true,spacing:2,columns:12,children:/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:4,lg:4,children:/*#__PURE__*/(0,jsx_runtime.jsx)(ShortcutInput,{value:mouseHoverKey,onChange:handleShortcutInput,label:i18n("trigger_trans_shortcut"),helperText:i18n("mousehover_key_help")})})})})]})});} ;// CONCATENATED MODULE: ./src/hooks/Subtitle.js -function useSubtitle(){const{setting,updateChild}=Setting_useSetting();const subtitleSetting=(setting===null||setting===void 0?void 0:setting.subtitleSetting)||DEFAULT_SUBTITLE_SETTING;const updateSubtitle=updateChild("subtitleSetting");return{subtitleSetting,updateSubtitle};} +function useSubtitle(){const{setting,updateChild}=useSetting();const subtitleSetting=(setting===null||setting===void 0?void 0:setting.subtitleSetting)||DEFAULT_SUBTITLE_SETTING;const updateSubtitle=updateChild("subtitleSetting");return{subtitleSetting,updateSubtitle};} ;// CONCATENATED MODULE: ./src/views/Options/Subtitle.js function SubtitleSetting(){const i18n=useI18n();const{subtitleSetting,updateSubtitle}=useSubtitle();const{enabledApis,aiEnabledApis}=useApiList();const handleChange=e=>{e.preventDefault();let{name,value}=e.target;updateSubtitle({[name]:value});};const{enabled,apiSlug,segSlug,chunkLength,toLang,isBilingual,skipAd=false,windowStyle,originStyle,translationStyle}=subtitleSetting;return/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Alert_Alert,{severity:"info",children:[i18n("subtitle_helper_1"),/*#__PURE__*/(0,jsx_runtime.jsx)("br",{}),i18n("subtitle_helper_2"),/*#__PURE__*/(0,jsx_runtime.jsx)("br",{}),i18n("subtitle_helper_3")]}),/*#__PURE__*/(0,jsx_runtime.jsx)(FormControlLabel_FormControlLabel,{control:/*#__PURE__*/(0,jsx_runtime.jsx)(Switch_Switch,{size:"small",name:"enabled",checked:enabled,onChange:()=>{updateSubtitle({enabled:!enabled});}}),label:i18n("toggle_subtitle_translate"),sx:{width:"fit-content"}}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Grid_Grid,{container:true,spacing:2,columns:12,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"apiSlug",value:apiSlug,label:i18n("translate_service"),onChange:handleChange,children:enabledApis.map(api=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:api.apiSlug,children:api.apiName},api.apiSlug))})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{select:true,fullWidth:true,size:"small",name:"segSlug",value:segSlug,label:i18n("ai_segmentation"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:"-",children:i18n("disable")}),aiEnabledApis.map(api=>/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:api.apiSlug,children:api.apiName},api.apiSlug))]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(hooks_ValidationInput,{fullWidth:true,size:"small",label:i18n("ai_chunk_length"),type:"number",name:"chunkLength",value:chunkLength,onChange:handleChange,min:200,max:20000})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{fullWidth:true,select:true,size:"small",name:"toLang",value:toLang,label:i18n("to_lang"),onChange:handleChange,children:OPT_LANGS_TO.map(_ref=>{let[lang,name]=_ref;return/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:lang,children:name},lang);})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{fullWidth:true,select:true,size:"small",name:"isBilingual",value:isBilingual,label:i18n("is_bilingual_view"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:true,children:i18n("enable")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:false,children:i18n("disable")})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Grid_Grid,{item:true,xs:12,sm:12,md:6,lg:3,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(TextField_TextField,{fullWidth:true,select:true,size:"small",name:"skipAd",value:skipAd,label:i18n("is_skip_ad"),onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:true,children:i18n("enable")}),/*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem_MenuItem,{value:false,children:i18n("disable")})]})})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("origin_styles"),name:"originStyle",value:originStyle,onChange:handleChange,maxRows:10,multiline:true,fullWidth:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("translation_styles"),name:"translationStyle",value:translationStyle,onChange:handleChange,maxRows:10,multiline:true,fullWidth:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("background_styles"),name:"windowStyle",value:windowStyle,onChange:handleChange,maxRows:10,multiline:true,fullWidth:true})]})});} +;// CONCATENATED MODULE: ./src/config/quotes.js +const quotes=[{en:"The unexamined life is not worth living.",zh:"未经审视的人生不值得过。"},{en:"I think, therefore I am.",zh:"我思故我在。"},{en:"He who has a why to live for can bear almost any how.",zh:"知道为何而活的人,几乎能忍受任何一种生活。"},{en:"Life is what happens when you're busy making other plans.",zh:"生活就是当你忙着制定其他计划时所发生的事情。"},{en:"Get busy living or get busy dying.",zh:"要么忙着活,要么忙着死。"},{en:"We are what we repeatedly do. Excellence, then, is not an act, but a habit.",zh:"我们由我们反复做的事情构成的。因此,卓越不是一种行为,而是一种习惯。"},{en:"Man is condemned to be free.",zh:"人注定是自由的。"},{en:"To be, or not to be: that is the question.",zh:"生存还是毁灭,这是一个问题。"},{en:"The purpose of life is not to be happy. It is to be useful, to be honorable, to be compassionate, to have it make some difference that you have lived and lived well.",zh:"人生的目的不是快乐,而是有用、高尚、富有同情心,让你活过并且活得好,从而使世界有所不同。"},{en:"Life is 10% what happens to us and 90% how we react to it.",zh:"生活 10% 取决于发生在我们身上的事,90% 取决于我们如何反应。"},{en:"The two most important days in your life are the day you are born and the day you find out why.",zh:"你一生中最重要的两天是:你出生的那天和你明白你为何出生的那天。"},{en:"In three words I can sum up everything I've learned about life: it goes on.",zh:"关于人生,我所学到的一切可以总结为三个词:它在继续。"},{en:"Not all those who wander are lost.",zh:"并非所有流浪者都迷失了方向。"},{en:"Life is simple, but we insist on making it complicated.",zh:"生活本简单,但我们坚持要把它弄复杂。"},{en:"Our life is what our thoughts make it.",zh:"我们的生活是由我们的思想造成的。"},{en:"Find purpose, the means will follow.",zh:"找到目标,方法自会随之而来。"},{en:"The goal of life is living in agreement with nature.",zh:"生活的目标是与自然和谐相处。"},{en:"The only true wisdom is in knowing you know nothing.",zh:"唯一的真正智慧在于知道自己一无所有。"},{en:"Knowledge is power.",zh:"知识就是力量。"},{en:"Knowing yourself is the beginning of all wisdom.",zh:"了解自己是所有智慧的开端。"},{en:"The journey of a thousand miles begins with a single step.",zh:"千里之行,始于足下。"},{en:"The only source of knowledge is experience.",zh:"知识的唯一来源是经验。"},{en:"A fool thinks himself to be wise, but a wise man knows himself to be a fool.",zh:"愚者自以为聪明,智者自知愚蠢。"},{en:"We learn from failure, not from success!",zh:"我们从失败中学习,而不是从成功中!"},{en:"The wise man is one who knows what he does not know.",zh:"智者,知其所不知。"},{en:"To know that we know what we know, and that we do not know what we do not know, that is true knowledge.",zh:"知之为知之,不知为不知,是知也。"},{en:"Curiosity is the wick in the candle of learning.",zh:"好奇心是学习这支蜡烛的灯芯。"},{en:"It is the mark of an educated mind to be able to entertain a thought without accepting it.",zh:"能够容纳一种思想而不同意它,这是一个受过教育的头脑的标志。"},{en:"Never stop questioning.",zh:"永远不要停止提问。"},{en:"The man who asks a question is a fool for a minute, the man who does not ask is a fool for life.",zh:"问问题的人,只傻一分钟;不问的人,傻一生。"},{en:"Wisdom is not a product of schooling but of the lifelong attempt to acquire it.",zh:"智慧不是学校教育的产物,而是终生努力获得的产物。"},{en:"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge.",zh:"知识最大的敌人不是无知,而是自以为拥有知识的幻觉。"},{en:"True wisdom comes to each of us when we realize how little we understand about life, ourselves, and the world around us.",zh:"当我们认识到自己对生命、对自身、对周围世界了解得多么少时,真正的智慧才会降临到我们每个人身上。"},{en:"Beware of false knowledge; it is more dangerous than ignorance.",zh:"谨防虚假的知识;它比无知更危险。"},{en:"What does not kill me makes me stronger.",zh:"杀不死我的,使我更强大。"},{en:"The only constant in life is change.",zh:"生活中唯一不变的就是变化。"},{en:"If you are going through hell, keep going.",zh:"如果你正在经历地狱,那就继续走下去。"},{en:"In the middle of difficulty lies opportunity.",zh:"机会蕴藏在困难之中。"},{en:"It is not the strongest of the species that survive, nor the most intelligent, but the one most responsive to change.",zh:"存活下来的物种不是最强壮的,也不是最聪明的,而是最能适应变化的。"},{en:"We must become the change we wish to see in the world.",zh:"我们必须成为我们希望在世界上看到的改变。"},{en:"A smooth sea never made a skilled sailor.",zh:"平静的大海练不出熟练的水手。"},{en:"Obstacles don't block the path, they are the path.",zh:"障碍不是挡住了路,障碍本身就是路。"},{en:"Fall seven times, stand up eight.",zh:"七次跌倒,八次站起。"},{en:"The art of life lies in a constant readjustment to our surroundings.",zh:"生活的艺术在于不断地调整自己以适应环境。"},{en:"Adversity introduces a man to himself.",zh:"逆境使人认识自己。"},{en:"The wound is the place where the Light enters you.",zh:"伤口是光进入你内心的入口。"},{en:"When we are no longer able to change a situation, we are challenged to change ourselves.",zh:"当我们无法改变现状时,我们就需要改变自己。"},{en:"Be the change you wish to see in the world.",zh:"成为你希望在世界上看到的改变。"},{en:"Do not pray for an easy life, pray for the strength to endure a difficult one.",zh:"不要祈祷生活安逸,要祈祷有力量去忍受艰难的生活。"},{en:"A pessimist sees the difficulty in every opportunity; an optimist sees the opportunity in every difficulty.",zh:"悲观者在每个机会中都看到困难;乐观者在每个困难中都看到机会。"},{en:"It's not what happens to you, but how you react to it that matters.",zh:"重要的不是发生在你身上的事,而是你如何应对它。"},{en:"To love oneself is the beginning of a lifelong romance.",zh:"爱自己是终身浪漫的开始。"},{en:"Love is composed of a single soul inhabiting two bodies.",zh:"爱是栖息于两个身体中的同一个灵魂。"},{en:"Man is the measure of all things.",zh:"人是万物的尺度。"},{en:"The best and most beautiful things in this world cannot be seen or even heard, but must be felt with the heart.",zh:"世界上最好最美的东西是看不见也听不见的,必须用心去感受。"},{en:"Where there is love there is life.",zh:"有爱的地方就有生命。"},{en:"If you want to be loved, be lovable.",zh:"如果你想被爱,就要变得可爱。"},{en:"We are all in the gutter, but some of us are looking at the stars.",zh:"我们都身处沟渠,但仍有人仰望星空。"},{en:"The only thing we have to fear is fear itself.",zh:"我们唯一需要恐惧的就是恐惧本身。"},{en:"Be kind, for everyone you meet is fighting a hard battle.",zh:"要友善,因为你遇到的每个人都在打一场艰苦的战斗。"},{en:"Man is born free, and everywhere he is in chains.",zh:"人生而自由,却无往不在枷锁之中。"},{en:"We love the things we love for what they are.",zh:"我们爱我们所爱之物,只因它们本来的样子。"},{en:"Darkness cannot drive out darkness; only light can do that. Hate cannot drive out hate; only love can do that.",zh:"黑暗无法驱逐黑暗,只有光明可以;仇恨无法驱逐仇恨,只有爱可以。"},{en:"An eye for an eye only ends up making the whole world blind.",zh:"以眼还眼,只会让整个世界都盲目。"},{en:"Hell is other people.",zh:"他人即地狱。"},{en:"You will not be punished for your anger, you will be punished by your anger.",zh:"你不会因为你的愤怒而受到惩罚,你会被你的愤怒所惩罚。"},{en:"To err is human, to forgive divine.",zh:"犯错是人性,宽恕是神性。"},{en:"Man is the only creature who refuses to be what he is.",zh:"人是唯一拒绝承认自己本质的生物。"},{en:"Beauty is in the eye of the beholder.",zh:"情人眼里出西施。"},{en:"All that we see or seem is but a dream within a dream.",zh:"我们所见所感,皆如梦中之梦。"},{en:"Everything you can imagine is real.",zh:"你能想象的一切都是真实的。"},{en:"The map is not the territory.",zh:"地图并非领土。"},{en:"We don't see things as they are, we see them as we are.",zh:"我们看到的不是事物的原貌,而是我们自己的样子。"},{en:"There are two ways to be fooled. One is to believe what isn't true; the other is to refuse to believe what is true.",zh:"被愚弄有两种方式。一种是相信不真实的东西;另一种是拒绝相信真实的东西。"},{en:"Simplicity is the ultimate sophistication.",zh:"简约是极致的复杂。"},{en:"The truth will set you free.",zh:"真相将使你自由。"},{en:"Reality is merely an illusion, albeit a very persistent one.",zh:"现实只是一种幻觉,尽管是一种非常持久的幻觉。"},{en:"What is rational is actual and what is actual is rational.",zh:"凡是合乎理性的东西都是现实的,凡是现实的东西都是合乎理性的。"},{en:"Truth is like the sun. You can shut it out for a time, but it ain't goin' away.",zh:"真相就像太阳。你可以暂时将它遮住,但它不会消失。"},{en:"Everything we hear is an opinion, not a fact. Everything we see is a perspective, not the truth.",zh:"我们听到的一切都只是观点,而非事实。我们看到的一切都只是视角,而非真相。"},{en:"There is no truth. There is only perception.",zh:"没有真相,只有认知。"},{en:"If you look deep enough into anything, you will find mathematics.",zh:"如果你对任何事物看得足够深入,你都会发现数学。"},{en:"The medium is the message.",zh:"媒介即信息。"},{en:"Nothing is true, everything is permitted.",zh:"没有什么是真实的,一切都被允许。"},{en:"We are what we believe we are.",zh:"我们相信自己是什么,我们就是什么。"},{en:"Yesterday is history, tomorrow is a mystery, but today is a gift. That is why it is called the present.",zh:"昨天是历史,明天是谜团,但今天是礼物。这就是为什么它被称为‘现在’(Present)。"},{en:"Time is money.",zh:"时间就是金钱。"},{en:"The only thing necessary for the triumph of evil is for good men to do nothing.",zh:"邪恶得逞的唯一条件是好人袖手旁观。"},{en:"Carpe diem.",zh:"活在当下。"},{en:"Do not dwell in the past, do not dream of the future, concentrate the mind on the present moment.",zh:"不要沉湎于过去,不要幻想未来,集中精神活在当下。"},{en:"The best time to plant a tree was 20 years ago. The second best time is now.",zh:"种树的最佳时机是20年前。其次是现在。"},{en:"Action speaks louder than words.",zh:"事实胜于雄辩。"},{en:"Honesty is the first chapter in the book of wisdom.",zh:"诚实是智慧之书的第一章。"},{en:"Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.",zh:"有两样东西是无限的:宇宙和人类的愚蠢;而且我不太确定宇宙是否无限。"},{en:"You cannot step twice into the same river.",zh:"人不能两次踏进同一条河流。"},{en:"The future belongs to those who believe in the beauty of their dreams.",zh:"未来属于那些相信梦想之美的人。"},{en:"Procrastination is the thief of time.",zh:"拖延是时间的大敌。"},{en:"An investment in knowledge pays the best interest.",zh:"投资知识,收益最佳。"},{en:"I have not failed. I've just found 10,000 ways that won't work.",zh:"我没有失败。我只是找到了一万种行不通的方法。"},{en:"That which is done, is done.",zh:"木已成舟。"}];function getRandomQuote(){const randomIndex=Math.floor(Math.random()*quotes.length);return quotes[randomIndex];} +;// CONCATENATED MODULE: ./src/views/Options/StylesSetting.js +var StylesSetting_templateObject;function StyleFields(_ref){let{customStyle,deleteStyle,updateStyle,isBuiltin}=_ref;const i18n=useI18n();const{setting:{uiLang}}=useSetting();const[formData,setFormData]=(0,react.useState)({});const[isModified,setIsModified]=(0,react.useState)(false);const confirm=useConfirm();(0,react.useEffect)(()=>{if(customStyle){setFormData(customStyle);}},[customStyle]);(0,react.useEffect)(()=>{if(!customStyle)return;const hasChanged=JSON.stringify(customStyle)!==JSON.stringify(formData);setIsModified(hasChanged);},[customStyle,formData]);const handleChange=e=>{e.preventDefault();let{name,value}=e.target;setFormData(prevData=>({...prevData,[name]:value}));};const handleSave=()=>{updateStyle(customStyle.styleSlug,formData);};const handleDelete=async()=>{const isConfirmed=await confirm({confirmText:i18n("delete"),cancelText:i18n("cancel")});if(isConfirmed){deleteStyle(customStyle.styleSlug);}};const{styleName="",styleCode=""}=formData;const textClass=(0,react.useMemo)(()=>emotion_css_esm_css(StylesSetting_templateObject||(StylesSetting_templateObject=taggedTemplateLiteral_taggedTemplateLiteral(["\n ","\n "])),styleCode),[styleCode]);const quote=(0,react.useMemo)(()=>{const q=getRandomQuote();if(uiLang==="en"){return[q.zh,q.en];}return[q.en,q.zh];},[uiLang]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(Box_Box,{children:[quote[0],/*#__PURE__*/(0,jsx_runtime.jsx)("br",{}),/*#__PURE__*/(0,jsx_runtime.jsx)("span",{className:textClass,children:quote[1]})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("style_name"),name:"styleName",value:styleName,onChange:handleChange,disabled:isBuiltin}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("style_code"),name:"styleCode",value:styleCode,onChange:handleChange,multiline:true,maxRows:10,disabled:isBuiltin}),!isBuiltin&&/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",alignItems:"center",spacing:2,useFlexGap:true,flexWrap:"wrap",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"contained",onClick:handleSave,disabled:!isModified,children:i18n("save")}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"outlined",color:"error",onClick:handleDelete,children:i18n("delete")})]})]});}function StyleAccordion(_ref2){let{customStyle,deleteStyle,updateStyle,isBuiltin}=_ref2;const[expanded,setExpanded]=(0,react.useState)(false);const handleChange=e=>{setExpanded(pre=>!pre);};return/*#__PURE__*/(0,jsx_runtime.jsxs)(Accordion_Accordion,{expanded:expanded,onChange:handleChange,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(AccordionSummary_AccordionSummary,{expandIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(ExpandMore/* default */.Z,{}),children:/*#__PURE__*/(0,jsx_runtime.jsx)(Typography_Typography,{sx:{overflowWrap:"anywhere"},children:"".concat(customStyle.styleName)})}),/*#__PURE__*/(0,jsx_runtime.jsx)(AccordionDetails_AccordionDetails,{children:expanded&&/*#__PURE__*/(0,jsx_runtime.jsx)(StyleFields,{customStyle:customStyle,deleteStyle:deleteStyle,updateStyle:updateStyle,isBuiltin:isBuiltin})})]});}function StylesSetting(){const i18n=useI18n();const{customStyles,addStyle,deleteStyle,updateStyle}=useStyleList();const{builtinStyles}=useAllTextStyles();const handleClick=e=>{e.preventDefault();addStyle();};return/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",id:"add-style-button",variant:"contained",onClick:handleClick,startIcon:/*#__PURE__*/(0,jsx_runtime.jsx)(Add/* default */.Z,{}),children:i18n("add")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:customStyles.map(customStyle=>/*#__PURE__*/(0,jsx_runtime.jsx)(StyleAccordion,{customStyle:customStyle,deleteStyle:deleteStyle,updateStyle:updateStyle},customStyle.styleSlug))}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:builtinStyles.map(customStyle=>/*#__PURE__*/(0,jsx_runtime.jsx)(StyleAccordion,{customStyle:customStyle,deleteStyle:deleteStyle,updateStyle:updateStyle,isBuiltin:true},customStyle.styleSlug))})]})});} ;// CONCATENATED MODULE: ./src/views/Options/index.js function Options(){const[error,setError]=(0,react.useState)("");const[ready,setReady]=(0,react.useState)(false);(0,react.useEffect)(()=>{(async()=>{if(isGm){// 等待GM注入 let i=0;for(;;){var _window,_window$APP_INFO;if(((_window=window)===null||_window===void 0?void 0:(_window$APP_INFO=_window.APP_INFO)===null||_window$APP_INFO===void 0?void 0:_window$APP_INFO.name)==="KISS Translator"){const{version,eventName}=window.APP_INFO;// 检查版本是否一致 -if(version!=="2.0.5"){setError("The version of the local script(v".concat(version,") is not the latest version(v").concat("2.0.5","). \u672C\u5730\u811A\u672C\u4E4B\u7248\u672C(v").concat(version,")\u975E\u6700\u65B0\u7248(v").concat("2.0.5",")\u3002"));return;}if(eventName){// 注入GM接口 +if(version!=="2.0.6"){setError("The version of the local script(v".concat(version,") is not the latest version(v").concat("2.0.6","). \u672C\u5730\u811A\u672C\u4E4B\u7248\u672C(v").concat(version,")\u975E\u6700\u65B0\u7248(v").concat("2.0.6",")\u3002"));return;}if(eventName){// 注入GM接口 adaptScript(eventName);}break;}if(++i>8){setError("Time out. Please confirm whether to install or enable KISS Translator GreaseMonkey script? 连接超时,请检查是否安装或启用简约翻译油猴脚本。");return;}await sleep(1000);}}// 同步数据 -await trySyncSettingAndRules();setReady(true);})();},[]);if(error){return/*#__PURE__*/(0,jsx_runtime.jsxs)("center",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Divider_Divider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(material_Link_Link,{href:"https://github.com/fishjar/kiss-translator",children:"KISS Translator v".concat("2.0.5")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Alert_Alert,{severity:"error",children:error}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(material_Link_Link,{href:"https://fishjar.github.io/kiss-translator/kiss-translator.user.js",children:"Install/Update Userscript for Tampermonkey/Violentmonkey"}),/*#__PURE__*/(0,jsx_runtime.jsx)(material_Link_Link,{href:"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js",children:"Install/Update Userscript for iOS Safari"})]})]});}if(!ready){return/*#__PURE__*/(0,jsx_runtime.jsx)(Loading,{});}return/*#__PURE__*/(0,jsx_runtime.jsx)(SettingProvider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Theme,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(AlertProvider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(ConfirmProvider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(HashRouter,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Routes,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Route,{path:"/",element:/*#__PURE__*/(0,jsx_runtime.jsx)(Layout,{}),children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{index:true,element:/*#__PURE__*/(0,jsx_runtime.jsx)(Settings,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"rules",element:/*#__PURE__*/(0,jsx_runtime.jsx)(Rules,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"input",element:/*#__PURE__*/(0,jsx_runtime.jsx)(InputSetting,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"tranbox",element:/*#__PURE__*/(0,jsx_runtime.jsx)(Tranbox,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"mousehover",element:/*#__PURE__*/(0,jsx_runtime.jsx)(MouseHoverSetting,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"subtitle",element:/*#__PURE__*/(0,jsx_runtime.jsx)(SubtitleSetting,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"apis",element:/*#__PURE__*/(0,jsx_runtime.jsx)(Apis,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"sync",element:/*#__PURE__*/(0,jsx_runtime.jsx)(SyncSetting,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"words",element:/*#__PURE__*/(0,jsx_runtime.jsx)(FavWords,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"playground",element:/*#__PURE__*/(0,jsx_runtime.jsx)(Playgound,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"about",element:/*#__PURE__*/(0,jsx_runtime.jsx)(About,{})})]})})})})})})});} +await trySyncSettingAndRules();setReady(true);})();},[]);if(error){return/*#__PURE__*/(0,jsx_runtime.jsxs)("center",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Divider_Divider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(material_Link_Link,{href:"https://github.com/fishjar/kiss-translator",children:"KISS Translator v".concat("2.0.6")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Alert_Alert,{severity:"error",children:error}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(material_Link_Link,{href:"https://fishjar.github.io/kiss-translator/kiss-translator.user.js",children:"Install/Update Userscript for Tampermonkey/Violentmonkey"}),/*#__PURE__*/(0,jsx_runtime.jsx)(material_Link_Link,{href:"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js",children:"Install/Update Userscript for iOS Safari"})]})]});}if(!ready){return/*#__PURE__*/(0,jsx_runtime.jsx)(Loading,{});}return/*#__PURE__*/(0,jsx_runtime.jsx)(SettingProvider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Theme,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(AlertProvider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(ConfirmProvider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(HashRouter,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Routes,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Route,{path:"/",element:/*#__PURE__*/(0,jsx_runtime.jsx)(Layout,{}),children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{index:true,element:/*#__PURE__*/(0,jsx_runtime.jsx)(Settings,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"rules",element:/*#__PURE__*/(0,jsx_runtime.jsx)(Rules,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"styles",element:/*#__PURE__*/(0,jsx_runtime.jsx)(StylesSetting,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"input",element:/*#__PURE__*/(0,jsx_runtime.jsx)(InputSetting,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"tranbox",element:/*#__PURE__*/(0,jsx_runtime.jsx)(Tranbox,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"mousehover",element:/*#__PURE__*/(0,jsx_runtime.jsx)(MouseHoverSetting,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"subtitle",element:/*#__PURE__*/(0,jsx_runtime.jsx)(SubtitleSetting,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"apis",element:/*#__PURE__*/(0,jsx_runtime.jsx)(Apis,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"sync",element:/*#__PURE__*/(0,jsx_runtime.jsx)(SyncSetting,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"words",element:/*#__PURE__*/(0,jsx_runtime.jsx)(FavWords,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"playground",element:/*#__PURE__*/(0,jsx_runtime.jsx)(Playgound,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"about",element:/*#__PURE__*/(0,jsx_runtime.jsx)(About,{})})]})})})})})})});} ;// CONCATENATED MODULE: ./src/options.js const options_root=client.createRoot(document.getElementById("root"));options_root.render(/*#__PURE__*/(0,jsx_runtime.jsx)(react.StrictMode,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Options,{})})); })(); diff --git a/version.txt b/version.txt index b9d2bdf..703cec9 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2.0.5 \ No newline at end of file +2.0.6 \ No newline at end of file