From 6bc51d7fbceca12b3ff3db5c5541daf5c5fa54dd Mon Sep 17 00:00:00 2001 From: fishjar Date: Fri, 12 Apr 2024 06:41:51 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20fishjar/?= =?UTF-8?q?kiss-translator@7379ff8d1528afed736e1c600d7f160beedc3671=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kiss-translator-ios-safari.user.js | 47 +++++++++++++++--------------- kiss-translator.user.js | 47 +++++++++++++++--------------- main.js | 8 ++--- manifest.firefox.json | 2 +- manifest.json | 2 +- options.js | 41 +++++++++++++------------- version.txt | 2 +- 7 files changed, 76 insertions(+), 73 deletions(-) diff --git a/kiss-translator-ios-safari.user.js b/kiss-translator-ios-safari.user.js index fee7840..2802d87 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 1.8.5 +// @version 1.8.6 // @description A simple bilingual translation extension & Greasemonkey script (一个简约的双语对照翻译扩展 & 油猴脚本) // @author Gabe // @homepageURL https://github.com/fishjar/kiss-translator @@ -18542,9 +18542,9 @@ fixerFunc:GLOBAL_KEY// 修复函数 ;// CONCATENATED MODULE: ./src/config/app.js const APP_NAME="KISS Translator".trim().split(/\s+/).join("-");const APP_LCNAME=APP_NAME.toLowerCase(); ;// CONCATENATED MODULE: ./src/config/i18n.js -const UI_LANGS=(/* unused pure expression or super */ null && ([["en","English"],["zh","中文"]]));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="/// \u81EA\u5B9A\u4E49\u7FFB\u8BD1\u6E90\u63A5\u53E3\u8BF4\u660E\n\n// \u8BF7\u6C42\uFF08Request\uFF09\u6570\u636E\u5C06\u6309\u4E0B\u9762\u89C4\u8303\u53D1\u9001\n{\n url: {{YOUR_URL}},\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{YOUR_KEY}}\",\n },\n body: {\n text: \"\", // \u9700\u8981\u7FFB\u8BD1\u7684\u6587\u5B57\n from: \"\", // \u6E90\u8BED\u8A00\uFF0C\u53EF\u80FD\u4E3A\u7A7A\uFF0C\u8868\u793A\u9700\u8981\u63A5\u53E3\u81EA\u52A8\u8BC6\u522B\u8BED\u8A00\n to: \"\", // \u76EE\u6807\u8BED\u8A00\n }\n}\n\n// \u8FD4\u56DE\uFF08Response\uFF09\u6570\u636E\u9700\u7B26\u5408\u4E0B\u9762\u7684JSON\u89C4\u8303\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// \u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u5982\u4E0B\n".concat(customApiLangs,"\n");const customApiHelpEN="/// Custom translation source interface description\n\n// Request data will be sent according to the following specifications\n{\n url: {{YOUR_URL}},\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{YOUR_KEY}}\",\n },\n body: {\n text: \"\", // text to be translated\n from: \"\", // Source language, may be empty\n to: \"\", // Target language\n }\n}\n\n// The returned data must conform to the following JSON specification\n{\n text: \"\", // translated text\n from: \"\", // Recognized source language\n to: \"\", // Target language (optional)\n}\n\n// The supported language codes are as follows\n".concat(customApiLangs,"\n");const I18N={app_name:{zh:"\u7B80\u7EA6\u7FFB\u8BD1",en:"KISS Translator"},translate:{zh:"\u7FFB\u8BD1",en:"Translate"},custom_api_help:{zh:customApiHelpZH,en:customApiHelpEN},translate_alt:{zh:"\u7FFB\u8BD1",en:"Translate"},basic_setting:{zh:"\u57FA\u672C\u8BBE\u7F6E",en:"Basic Setting"},rules_setting:{zh:"\u89C4\u5219\u8BBE\u7F6E",en:"Rules Setting"},apis_setting:{zh:"\u63A5\u53E3\u8BBE\u7F6E",en:"Apis Setting"},sync_setting:{zh:"\u540C\u6B65\u8BBE\u7F6E",en:"Sync Setting"},patch_setting:{zh:"\u8865\u4E01\u8BBE\u7F6E",en:"Patch Setting"},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."},inject_webfix:{zh:"\u6CE8\u5165\u4FEE\u590D\u8865\u4E01",en:"Inject Webfix"},about:{zh:"\u5173\u4E8E",en:"About"},about_md:{zh:"README.md",en:"README.en.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.")},ui_lang:{zh:"\u754C\u9762\u8BED\u8A00",en:"Interface Language"},fetch_limit:{zh:"\u6700\u5927\u5E76\u53D1\u8BF7\u6C42\u6570\u91CF (1-100)",en:"Maximum Number Of Concurrent Requests (1-100)"},fetch_interval:{zh:"\u6BCF\u6B21\u8BF7\u6C42\u95F4\u9694\u65F6\u95F4 (0-5000ms)",en:"Time Between Requests (0-5000ms)"},translate_interval:{zh:"\u91CD\u65B0\u7FFB\u8BD1\u95F4\u9694\u65F6\u95F4 (100-5000ms)",en:"Retranslation Interval (100-5000ms)"},min_translate_length:{zh:"\u6700\u5C0F\u7FFB\u8BD1\u5B57\u7B26\u6570 (1-100)",en:"Minimum number Of Translated Characters (1-100)"},max_translate_length:{zh:"\u6700\u5927\u7FFB\u8BD1\u5B57\u7B26\u6570 (100-10000)",en:"Maximum number Of Translated Characters (100-10000)"},num_of_newline_characters:{zh:"\u6362\u884C\u5B57\u7B26\u6570 (1-1000)",en:"Number of Newline Characters (1-1000)"},translate_service:{zh:"\u7FFB\u8BD1\u670D\u52A1",en:"Translate Service"},translate_timing:{zh:"\u7FFB\u8BD1\u65F6\u673A",en:"Translate Timing"},mk_pagescroll:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u7FFB\u8BD1\uFF08\u63A8\u8350\uFF09",en:"Rolling Loading (Suggested)"},mk_pageopen:{zh:"\u9875\u9762\u6253\u5F00\u5168\u90E8\u7FFB\u8BD1",en:"Page Open"},mk_mouseover:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover"},mk_ctrlKey:{zh:"Control + \u9F20\u6807\u60AC\u505C",en:"Control + Mouseover"},mk_shiftKey:{zh:"Shift + \u9F20\u6807\u60AC\u505C",en:"Shift + Mouseover"},mk_altKey:{zh:"Alt + \u9F20\u6807\u60AC\u505C",en:"Alt + Mouseover"},from_lang:{zh:"\u539F\u6587\u8BED\u8A00",en:"Source Language"},to_lang:{zh:"\u76EE\u6807\u8BED\u8A00",en:"Target Language"},to_lang2:{zh:"\u7B2C\u4E8C\u76EE\u6807\u8BED\u8A00",en:"Target Language 2"},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."},text_style:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style"},text_style_alt:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style"},bg_color:{zh:"\u6837\u5F0F\u989C\u8272",en:"Style Color"},remain_unchanged:{zh:"\u4FDD\u7559\u4E0D\u53D8",en:"Remain Unchanged"},google_api:{zh:"\u8C37\u6B4C\u7FFB\u8BD1\u63A5\u53E3",en:"Google Translate API"},default_selector:{zh:"\u9ED8\u8BA4\u9009\u62E9\u5668",en:"Default selector"},selector_rules:{zh:"\u9009\u62E9\u5668\u89C4\u5219",en:"Selector Rules"},save:{zh:"\u4FDD\u5B58",en:"Save"},edit:{zh:"\u7F16\u8F91",en:"Edit"},cancel:{zh:"\u53D6\u6D88",en:"Cancel"},delete:{zh:"\u5220\u9664",en:"Delete"},reset:{zh:"\u91CD\u7F6E",en:"Reset"},add:{zh:"\u6DFB\u52A0",en:"Add"},inject_rules:{zh:"\u6CE8\u5165\u8BA2\u9605\u89C4\u5219",en:"Inject Subscribe Rules"},personal_rules:{zh:"\u4E2A\u4EBA\u89C4\u5219",en:"Rules"},subscribe_rules:{zh:"\u8BA2\u9605\u89C4\u5219",en:"Subscribe"},overwrite_subscribe_rules:{zh:"\u8986\u5199\u8BA2\u9605\u89C4\u5219",en:"Overwrite"},subscribe_url:{zh:"\u8BA2\u9605\u5730\u5740",en:"Subscribe URL"},rules_warn_1:{zh:"1\u3001\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u4E00\u76F4\u751F\u6548\uFF0C\u9009\u62E9\u201C\u6CE8\u5165\u8BA2\u9605\u89C4\u5219\u201D\u540E\uFF0C\u201C\u8BA2\u9605\u89C4\u5219\u201D\u624D\u4F1A\u751F\u6548\u3002",en:"1. The \"Personal Rules\" are always in effect. After selecting \"Inject Subscription Rules\", the \"Subscription Rules\" will take effect."},rules_warn_2:{zh:"2\u3001\u201C\u8BA2\u9605\u89C4\u5219\u201D\u7684\u6CE8\u5165\u4F4D\u7F6E\u662F\u5012\u6570\u7B2C\u4E8C\u7684\u4F4D\u7F6E\uFF0C\u56E0\u6B64\u9664\u5168\u5C40\u89C4\u5219(*)\u5916\uFF0C\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u4F18\u5148\u7EA7\u6BD4\u201C\u8BA2\u9605\u89C4\u5219\u201D\u9AD8\uFF0C\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u586B\u5199\u540C\u6837\u7684\u7F51\u5740\u4F1A\u8986\u76D6\u201D\u8BA2\u9605\u89C4\u5219\u201C\u7684\u6761\u76EE\u3002",en:"2. The injection position of \"Subscription Rules\" is the penultimate position. Therefore, except for the global rules (*), the priority of \"Personal Rules\" is higher than that of \"Subscription Rules\". Filling in the same url in \"Personal Rules\" will overwrite \"Subscription Rules\" entry."},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."},sync_warn:{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."},about_sync_api:{zh:"\u67E5\u770B\u5173\u4E8E\u6570\u636E\u540C\u6B65\u63A5\u53E3\u90E8\u7F72",en:"View About Data Synchronization Interface Deployment"},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"},style_none:{zh:"\u65E0",en:"None"},under_line:{zh:"\u4E0B\u5212\u76F4\u7EBF",en:"Underline"},dot_line:{zh:"\u4E0B\u5212\u70B9\u72B6\u7EBF",en:"Dotted Underline"},dash_line:{zh:"\u4E0B\u5212\u865A\u7EBF",en:"Dashed Underline"},wavy_line:{zh:"\u4E0B\u5212\u6CE2\u6D6A\u7EBF",en:"Wavy Underline"},fuzzy:{zh:"\u6A21\u7CCA",en:"Fuzzy"},highlight:{zh:"\u9AD8\u4EAE",en:"Highlight"},blockquote:{zh:"\u5F15\u7528",en:"Blockquote"},diy_style:{zh:"\u81EA\u5B9A\u4E49\u6837\u5F0F",en:"Custom Style"},diy_style_helper:{zh:"\u9075\u5FAA\u201CCSS\u201D\u7684\u8BED\u6CD5",en:"Follow the syntax of \"CSS\""},setting:{zh:"\u8BBE\u7F6E",en:"Setting"},pattern:{zh:"\u5339\u914D\u7F51\u5740",en:"URL pattern"},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 \",\"."},selector_helper:{zh:"1\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u30022\u3001\u591A\u4E2ACSS\u9009\u62E9\u5668\u4E4B\u95F4\u7528\u201C;\u201D\u9694\u5F00\u30023\u3001\u201Cshadow root\u201D\u9009\u62E9\u5668\u548C\u5185\u90E8\u9009\u62E9\u5668\u7528\u201C>>>\u201D\u9694\u5F00\u3002",en:"1. Follow CSS selector syntax. 2. Separate multiple CSS selectors with \";\". 3. The \"shadow root\" selector and the internal selector are separated by \">>>\"."},translate_switch:{zh:"\u5F00\u542F\u7FFB\u8BD1",en:"Translate Switch"},default_enabled:{zh:"\u9ED8\u8BA4\u5F00\u542F",en:"Enabled"},default_disabled:{zh:"\u9ED8\u8BA4\u5173\u95ED",en:"Disabled"},selector:{zh:"\u9009\u62E9\u5668",en:"Selector"},keep_selector:{zh:"\u4FDD\u7559\u5143\u7D20\u9009\u62E9\u5668",en:"Keep unchanged selector"},keep_selector_helper:{zh:"1\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u30022\u3001\u5B50\u5143\u7D20\u9009\u62E9\u5668\u7528\u201C>>>\u201D\u9694\u5F00\u3002",en:"1. Follow CSS selector syntax. 2. Sub-element selectors are separated by \">>>\"."},terms:{zh:"\u4E13\u4E1A\u672F\u8BED",en:"Terms"},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."},selector_style:{zh:"\u9009\u62E9\u5668\u8282\u70B9\u6837\u5F0F",en:"Selector Style"},selector_style_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u4E0D\u4F1A\u79FB\u9664\u3002",en:"It is injected when translation is turned on and will not be removed when translation is turned off."},selector_parent_style:{zh:"\u9009\u62E9\u5668\u7236\u8282\u70B9\u6837\u5F0F",en:"Selector Parent Style"},inject_js:{zh:"\u6CE8\u5165JS",en:"Inject JS"},inject_js_helper:{zh:"1\u3001\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\u8FD0\u884C\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u79FB\u9664\u30022\u3001\u968F\u7740\u9875\u9762\u53D8\u5316\uFF0C\u53EF\u80FD\u4F1A\u591A\u6B21\u6CE8\u5165\u8FD0\u884C\u3002",en:"1. Inject and run when translation is turned on, and removed when translation is turned off. 2. As the page changes, it may be injected and run multiple times."},inject_css:{zh:"\u6CE8\u5165CSS",en:"Inject CSS"},inject_css_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u5C06\u79FB\u9664\u3002",en:"Injected when translation is enabled and removed when translation is disabled."},root_selector:{zh:"\u6839\u9009\u62E9\u5668",en:"Root Selector"},fixer_function:{zh:"\u4FEE\u590D\u51FD\u6570",en:"Fixer Function"},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

."},import:{zh:"\u5BFC\u5165",en:"Import"},export:{zh:"\u5BFC\u51FA",en:"Export"},error_cant_be_blank:{zh:"\u4E0D\u80FD\u4E3A\u7A7A",en:"Can not be blank"},error_duplicate_values:{zh:"\u5B58\u5728\u91CD\u590D\u7684\u503C",en:"There are duplicate values"},error_wrong_file_type:{zh:"\u9519\u8BEF\u7684\u6587\u4EF6\u7C7B\u578B",en:"Wrong file type"},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."},deepl_api:{zh:"DeepL \u63A5\u53E3",en:"DeepL API"},deepl_key:{zh:"DeepL \u5BC6\u94A5",en:"DeepL Key"},openai_api:{zh:"OpenAI \u63A5\u53E3",en:"OpenAI API"},openai_key:{zh:"OpenAI \u5BC6\u94A5",en:"OpenAI Key"},openai_model:{zh:"OpenAI \u6A21\u578B",en:"OpenAI Model"},openai_prompt:{zh:"OpenAI \u63D0\u793A\u8BCD",en:"OpenAI Prompt"},if_clear_cache:{zh:"\u662F\u5426\u6E05\u9664\u7F13\u5B58",en:"Whether clear cache"},clear_cache_never:{zh:"\u4E0D\u6E05\u9664\u7F13\u5B58",en:"Never clear cache"},clear_cache_restart:{zh:"\u91CD\u542F\u6D4F\u89C8\u5668\u65F6\u6E05\u9664\u7F13\u5B58",en:"Clear cache when restarting browser"},data_sync_type:{zh:"\u6570\u636E\u540C\u6B65\u65B9\u5F0F",en:"Data Sync Type"},data_sync_url:{zh:"\u6570\u636E\u540C\u6B65\u63A5\u53E3",en:"Data Sync API"},data_sync_user:{zh:"\u6570\u636E\u540C\u6B65\u8D26\u6237",en:"Data Sync User"},data_sync_key:{zh:"\u6570\u636E\u540C\u6B65\u5BC6\u94A5",en:"Data Sync Key"},sync_now:{zh:"\u7ACB\u5373\u540C\u6B65",en:"Sync Now"},sync_success:{zh:"\u540C\u6B65\u6210\u529F\uFF01",en:"Sync Success"},sync_failed:{zh:"\u540C\u6B65\u5931\u8D25\uFF01",en:"Sync Error"},error_got_some_wrong:{zh:"\u62B1\u6B49\uFF0C\u51FA\u9519\u4E86\uFF01",en:"Sorry, something went wrong!"},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"},click_test:{zh:"\u70B9\u51FB\u6D4B\u8BD5",en:"Click Test"},test_success:{zh:"\u6D4B\u8BD5\u6210\u529F",en:"Test success"},test_failed:{zh:"\u6D4B\u8BD5\u5931\u8D25",en:"Test failed"},clear_all_cache_now:{zh:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u7F13\u5B58",en:"Clear all cache now"},clear_cache:{zh:"\u6E05\u9664\u7F13\u5B58",en:"Clear Cache"},clear_success:{zh:"\u6E05\u9664\u6210\u529F",en:"Clear success"},clear_failed:{zh:"\u6E05\u9664\u5931\u8D25",en:"Clear failed"},share:{zh:"\u5206\u4EAB",en:"Share"},clear_all:{zh:"\u6E05\u7A7A",en:"Clear All"},help:{zh:"\u6C42\u52A9",en:"Help"},restore_default:{zh:"\u6062\u590D\u9ED8\u8BA4",en:"Restore Default"},shortcuts_setting:{zh:"\u5FEB\u6377\u952E\u8BBE\u7F6E",en:"Shortcuts Setting"},toggle_translate_shortcut:{zh:"\"\u5F00\u542F\u7FFB\u8BD1\"\u5FEB\u6377\u952E",en:"\"Toggle Translate\" Shortcut"},toggle_style_shortcut:{zh:"\"\u5207\u6362\u6837\u5F0F\"\u5FEB\u6377\u952E",en:"\"Toggle Style\" Shortcut"},toggle_popup_shortcut:{zh:"\"\u6253\u5F00\u5F39\u7A97\"\u5FEB\u6377\u952E",en:"\"Open Popup\" Shortcut"},open_setting_shortcut:{zh:"\"\u6253\u5F00\u8BBE\u7F6E\"\u5FEB\u6377\u952E",en:"\"Open Setting\" Shortcut"},hide_fab_button:{zh:"\u9690\u85CF\u60AC\u6D6E\u6309\u94AE",en:"Hide Fab Button"},hide_tran_button:{zh:"\u9690\u85CF\u7FFB\u8BD1\u6309\u94AE",en:"Hide Translate Button"},hide_click_away:{zh:"\u70B9\u51FB\u5916\u90E8\u5173\u95ED\u5F39\u7A97",en:"Click outside to close the pop-up window"},show:{zh:"\u663E\u793A",en:"Show"},hide:{zh:"\u9690\u85CF",en:"Hide"},save_rule:{zh:"\u4FDD\u5B58\u89C4\u5219",en:"Save Rule"},global_rule:{zh:"\u5168\u5C40\u89C4\u5219",en:"Global Rule"},input_translate:{zh:"\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation"},use_input_box_translation:{zh:"\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation"},input_selector:{zh:"\u8F93\u5165\u6846\u9009\u62E9\u5668",en:"Input Selector"},input_selector_helper:{zh:"\u7528\u4E8E\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",en:"Used for input box translation."},trigger_trans_shortcut:{zh:"\u89E6\u53D1\u7FFB\u8BD1\u5FEB\u6377\u952E",en:"Trigger Translation Shortcut Keys"},trigger_trans_shortcut_help:{zh:"\u9ED8\u8BA4\u4E3A\u5355\u51FB\u201CAltLeft+KeyI\u201D",en:"Default is \"AltLeft+KeyI\""},shortcut_press_count:{zh:"\u5FEB\u6377\u952E\u8FDE\u51FB\u6B21\u6570",en:"Shortcut Press Number"},combo_timeout:{zh:"\u8FDE\u51FB\u8D85\u65F6\u65F6\u95F4 (10-1000ms)",en:"Combo Timeout (10-1000ms)"},input_trans_start_sign:{zh:"\u7FFB\u8BD1\u8D77\u59CB\u6807\u8BC6",en:"Translation Start Sign"},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\""},detect_lang_remote:{zh:"\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B",en:"Remote language detection"},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."},disable:{zh:"\u7981\u7528",en:"Disable"},enable:{zh:"\u542F\u7528",en:"Enable"},selection_translate:{zh:"\u5212\u8BCD\u7FFB\u8BD1",en:"Selection Translate"},toggle_selection_translate:{zh:"\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"Use Selection Translate"},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"},tranbtn_offset_x:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBX\uFF080-100\uFF09",en:"Translate Button Offset X (0-100)"},tranbtn_offset_y:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBY\uFF080-100\uFF09",en:"Translate Button Offset Y (0-100)"},translated_text:{zh:"\u8BD1\u6587",en:"Translated Text"},original_text:{zh:"\u539F\u6587",en:"Original Text"},favorite_words:{zh:"\u6536\u85CF\u8BCD\u6C47",en:"Favorite Words"},touch_setting:{zh:"\u89E6\u5C4F\u8BBE\u7F6E",en:"Touch Setting"},touch_translate_shortcut:{zh:"\u89E6\u5C4F\u7FFB\u8BD1\u5FEB\u6377\u65B9\u5F0F",en:"Touch Translate Shortcut"},touch_tap_0:{zh:"\u7981\u7528",en:"Disable"},touch_tap_2:{zh:"\u53CC\u6307\u8F7B\u89E6",en:"Two finger tap"},touch_tap_3:{zh:"\u4E09\u6307\u8F7B\u89E6",en:"Three finger tap"},touch_tap_4:{zh:"\u56DB\u6307\u8F7B\u89E6",en:"Four finger tap"},translate_blacklist:{zh:"\u7981\u7528\u7FFB\u8BD1\u540D\u5355",en:"Translate Blacklist"},disabled_csplist:{zh:"\u7981\u7528CSP\u540D\u5355",en:"Disabled CSP List"},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."},skip_langs:{zh:"\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",en:"Disable Languages"},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."},context_menus:{zh:"\u53F3\u952E\u83DC\u5355",en:"Context Menus"},hide_context_menus:{zh:"\u9690\u85CF\u53F3\u952E\u83DC\u5355",en:"Hide Context Menus"},simple_context_menus:{zh:"\u7B80\u5355\u53F3\u952E\u83DC\u5355",en:"Simple_context_menus Context Menus"},secondary_context_menus:{zh:"\u4E8C\u7EA7\u53F3\u952E\u83DC\u5355",en:"Secondary Context Menus"},mulkeys_help:{zh:"\u652F\u6301\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\u591A\u4E2AKEY\u8F6E\u8BE2\u8C03\u7528\u3002",en:"Supports multiple KEY polling calls separated by newlines or English commas \",\"."},translation_element_tag:{zh:"\u8BD1\u6587\u5143\u7D20\u6807\u7B7E",en:"Translation Element Tag"},show_only_translations:{zh:"\u4EC5\u663E\u793A\u8BD1\u6587",en:"Show Only Translations"},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."},translate_page_title:{zh:"\u662F\u5426\u7FFB\u8BD1\u9875\u9762\u6807\u9898",en:"Translate Page Title"},more:{zh:"\u66F4\u591A",en:"More"},fixer_selector:{zh:"\u7F51\u9875\u4FEE\u590D\u9009\u62E9\u5668",en:"Fixer Selector"}}; +const UI_LANGS=(/* unused pure expression or super */ null && ([["en","English"],["zh","中文"]]));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="/// \u81EA\u5B9A\u4E49\u7FFB\u8BD1\u6E90\u63A5\u53E3\u8BF4\u660E\n\n// \u8BF7\u6C42\uFF08Request\uFF09\u6570\u636E\u5C06\u6309\u4E0B\u9762\u89C4\u8303\u53D1\u9001\n{\n url: {{YOUR_URL}},\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{YOUR_KEY}}\",\n },\n body: {\n text: \"\", // \u9700\u8981\u7FFB\u8BD1\u7684\u6587\u5B57\n from: \"\", // \u6E90\u8BED\u8A00\uFF0C\u53EF\u80FD\u4E3A\u7A7A\uFF0C\u8868\u793A\u9700\u8981\u63A5\u53E3\u81EA\u52A8\u8BC6\u522B\u8BED\u8A00\n to: \"\", // \u76EE\u6807\u8BED\u8A00\n }\n}\n\n// \u8FD4\u56DE\uFF08Response\uFF09\u6570\u636E\u9700\u7B26\u5408\u4E0B\u9762\u7684JSON\u89C4\u8303\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// \u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u5982\u4E0B\n".concat(customApiLangs,"\n");const customApiHelpEN="/// Custom translation source interface description\n\n// Request data will be sent according to the following specifications\n{\n url: {{YOUR_URL}},\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{YOUR_KEY}}\",\n },\n body: {\n text: \"\", // text to be translated\n from: \"\", // Source language, may be empty\n to: \"\", // Target language\n }\n}\n\n// The returned data must conform to the following JSON specification\n{\n text: \"\", // translated text\n from: \"\", // Recognized source language\n to: \"\", // Target language (optional)\n}\n\n// The supported language codes are as follows\n".concat(customApiLangs,"\n");const I18N={app_name:{zh:"\u7B80\u7EA6\u7FFB\u8BD1",en:"KISS Translator"},translate:{zh:"\u7FFB\u8BD1",en:"Translate"},custom_api_help:{zh:customApiHelpZH,en:customApiHelpEN},translate_alt:{zh:"\u7FFB\u8BD1",en:"Translate"},basic_setting:{zh:"\u57FA\u672C\u8BBE\u7F6E",en:"Basic Setting"},rules_setting:{zh:"\u89C4\u5219\u8BBE\u7F6E",en:"Rules Setting"},apis_setting:{zh:"\u63A5\u53E3\u8BBE\u7F6E",en:"Apis Setting"},sync_setting:{zh:"\u540C\u6B65\u8BBE\u7F6E",en:"Sync Setting"},patch_setting:{zh:"\u8865\u4E01\u8BBE\u7F6E",en:"Patch Setting"},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."},inject_webfix:{zh:"\u6CE8\u5165\u4FEE\u590D\u8865\u4E01",en:"Inject Webfix"},about:{zh:"\u5173\u4E8E",en:"About"},about_md:{zh:"README.md",en:"README.en.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.")},ui_lang:{zh:"\u754C\u9762\u8BED\u8A00",en:"Interface Language"},fetch_limit:{zh:"\u6700\u5927\u5E76\u53D1\u8BF7\u6C42\u6570\u91CF (1-100)",en:"Maximum Number Of Concurrent Requests (1-100)"},fetch_interval:{zh:"\u6BCF\u6B21\u8BF7\u6C42\u95F4\u9694\u65F6\u95F4 (0-5000ms)",en:"Time Between Requests (0-5000ms)"},translate_interval:{zh:"\u91CD\u65B0\u7FFB\u8BD1\u95F4\u9694\u65F6\u95F4 (100-5000ms)",en:"Retranslation Interval (100-5000ms)"},min_translate_length:{zh:"\u6700\u5C0F\u7FFB\u8BD1\u5B57\u7B26\u6570 (1-100)",en:"Minimum number Of Translated Characters (1-100)"},max_translate_length:{zh:"\u6700\u5927\u7FFB\u8BD1\u5B57\u7B26\u6570 (100-10000)",en:"Maximum number Of Translated Characters (100-10000)"},num_of_newline_characters:{zh:"\u6362\u884C\u5B57\u7B26\u6570 (1-1000)",en:"Number of Newline Characters (1-1000)"},translate_service:{zh:"\u7FFB\u8BD1\u670D\u52A1",en:"Translate Service"},translate_timing:{zh:"\u7FFB\u8BD1\u65F6\u673A",en:"Translate Timing"},mk_pagescroll:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u7FFB\u8BD1\uFF08\u63A8\u8350\uFF09",en:"Rolling Loading (Suggested)"},mk_pageopen:{zh:"\u9875\u9762\u6253\u5F00\u5168\u90E8\u7FFB\u8BD1",en:"Page Open"},mk_mouseover:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover"},mk_ctrlKey:{zh:"Control + \u9F20\u6807\u60AC\u505C",en:"Control + Mouseover"},mk_shiftKey:{zh:"Shift + \u9F20\u6807\u60AC\u505C",en:"Shift + Mouseover"},mk_altKey:{zh:"Alt + \u9F20\u6807\u60AC\u505C",en:"Alt + Mouseover"},from_lang:{zh:"\u539F\u6587\u8BED\u8A00",en:"Source Language"},to_lang:{zh:"\u76EE\u6807\u8BED\u8A00",en:"Target Language"},to_lang2:{zh:"\u7B2C\u4E8C\u76EE\u6807\u8BED\u8A00",en:"Target Language 2"},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."},text_style:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style"},text_style_alt:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style"},bg_color:{zh:"\u6837\u5F0F\u989C\u8272",en:"Style Color"},remain_unchanged:{zh:"\u4FDD\u7559\u4E0D\u53D8",en:"Remain Unchanged"},google_api:{zh:"\u8C37\u6B4C\u7FFB\u8BD1\u63A5\u53E3",en:"Google Translate API"},default_selector:{zh:"\u9ED8\u8BA4\u9009\u62E9\u5668",en:"Default selector"},selector_rules:{zh:"\u9009\u62E9\u5668\u89C4\u5219",en:"Selector Rules"},save:{zh:"\u4FDD\u5B58",en:"Save"},edit:{zh:"\u7F16\u8F91",en:"Edit"},cancel:{zh:"\u53D6\u6D88",en:"Cancel"},delete:{zh:"\u5220\u9664",en:"Delete"},reset:{zh:"\u91CD\u7F6E",en:"Reset"},add:{zh:"\u6DFB\u52A0",en:"Add"},inject_rules:{zh:"\u6CE8\u5165\u8BA2\u9605\u89C4\u5219",en:"Inject Subscribe Rules"},personal_rules:{zh:"\u4E2A\u4EBA\u89C4\u5219",en:"Rules"},subscribe_rules:{zh:"\u8BA2\u9605\u89C4\u5219",en:"Subscribe"},overwrite_subscribe_rules:{zh:"\u8986\u5199\u8BA2\u9605\u89C4\u5219",en:"Overwrite"},subscribe_url:{zh:"\u8BA2\u9605\u5730\u5740",en:"Subscribe URL"},rules_warn_1:{zh:"1\u3001\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u4E00\u76F4\u751F\u6548\uFF0C\u9009\u62E9\u201C\u6CE8\u5165\u8BA2\u9605\u89C4\u5219\u201D\u540E\uFF0C\u201C\u8BA2\u9605\u89C4\u5219\u201D\u624D\u4F1A\u751F\u6548\u3002",en:"1. The \"Personal Rules\" are always in effect. After selecting \"Inject Subscription Rules\", the \"Subscription Rules\" will take effect."},rules_warn_2:{zh:"2\u3001\u201C\u8BA2\u9605\u89C4\u5219\u201D\u7684\u6CE8\u5165\u4F4D\u7F6E\u662F\u5012\u6570\u7B2C\u4E8C\u7684\u4F4D\u7F6E\uFF0C\u56E0\u6B64\u9664\u5168\u5C40\u89C4\u5219(*)\u5916\uFF0C\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u4F18\u5148\u7EA7\u6BD4\u201C\u8BA2\u9605\u89C4\u5219\u201D\u9AD8\uFF0C\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u586B\u5199\u540C\u6837\u7684\u7F51\u5740\u4F1A\u8986\u76D6\u201D\u8BA2\u9605\u89C4\u5219\u201C\u7684\u6761\u76EE\u3002",en:"2. The injection position of \"Subscription Rules\" is the penultimate position. Therefore, except for the global rules (*), the priority of \"Personal Rules\" is higher than that of \"Subscription Rules\". Filling in the same url in \"Personal Rules\" will overwrite \"Subscription Rules\" entry."},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."},sync_warn:{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."},about_sync_api:{zh:"\u67E5\u770B\u5173\u4E8E\u6570\u636E\u540C\u6B65\u63A5\u53E3\u90E8\u7F72",en:"View About Data Synchronization Interface Deployment"},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"},style_none:{zh:"\u65E0",en:"None"},under_line:{zh:"\u4E0B\u5212\u76F4\u7EBF",en:"Underline"},dot_line:{zh:"\u4E0B\u5212\u70B9\u72B6\u7EBF",en:"Dotted Underline"},dash_line:{zh:"\u4E0B\u5212\u865A\u7EBF",en:"Dashed Underline"},wavy_line:{zh:"\u4E0B\u5212\u6CE2\u6D6A\u7EBF",en:"Wavy Underline"},fuzzy:{zh:"\u6A21\u7CCA",en:"Fuzzy"},highlight:{zh:"\u9AD8\u4EAE",en:"Highlight"},blockquote:{zh:"\u5F15\u7528",en:"Blockquote"},diy_style:{zh:"\u81EA\u5B9A\u4E49\u6837\u5F0F",en:"Custom Style"},diy_style_helper:{zh:"\u9075\u5FAA\u201CCSS\u201D\u7684\u8BED\u6CD5",en:"Follow the syntax of \"CSS\""},setting:{zh:"\u8BBE\u7F6E",en:"Setting"},pattern:{zh:"\u5339\u914D\u7F51\u5740",en:"URL pattern"},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 \",\"."},selector_helper:{zh:"1\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u30022\u3001\u591A\u4E2ACSS\u9009\u62E9\u5668\u4E4B\u95F4\u7528\u201C;\u201D\u9694\u5F00\u30023\u3001\u201Cshadow root\u201D\u9009\u62E9\u5668\u548C\u5185\u90E8\u9009\u62E9\u5668\u7528\u201C>>>\u201D\u9694\u5F00\u3002",en:"1. Follow CSS selector syntax. 2. Separate multiple CSS selectors with \";\". 3. The \"shadow root\" selector and the internal selector are separated by \">>>\"."},translate_switch:{zh:"\u5F00\u542F\u7FFB\u8BD1",en:"Translate Switch"},default_enabled:{zh:"\u9ED8\u8BA4\u5F00\u542F",en:"Enabled"},default_disabled:{zh:"\u9ED8\u8BA4\u5173\u95ED",en:"Disabled"},selector:{zh:"\u9009\u62E9\u5668",en:"Selector"},keep_selector:{zh:"\u4FDD\u7559\u5143\u7D20\u9009\u62E9\u5668",en:"Keep unchanged selector"},keep_selector_helper:{zh:"1\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u30022\u3001\u5B50\u5143\u7D20\u9009\u62E9\u5668\u7528\u201C>>>\u201D\u9694\u5F00\u3002",en:"1. Follow CSS selector syntax. 2. Sub-element selectors are separated by \">>>\"."},terms:{zh:"\u4E13\u4E1A\u672F\u8BED",en:"Terms"},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."},selector_style:{zh:"\u9009\u62E9\u5668\u8282\u70B9\u6837\u5F0F",en:"Selector Style"},selector_style_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u4E0D\u4F1A\u79FB\u9664\u3002",en:"It is injected when translation is turned on and will not be removed when translation is turned off."},selector_parent_style:{zh:"\u9009\u62E9\u5668\u7236\u8282\u70B9\u6837\u5F0F",en:"Selector Parent Style"},inject_js:{zh:"\u6CE8\u5165JS",en:"Inject JS"},inject_js_helper:{zh:"1\u3001\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\u8FD0\u884C\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u79FB\u9664\u30022\u3001\u968F\u7740\u9875\u9762\u53D8\u5316\uFF0C\u53EF\u80FD\u4F1A\u591A\u6B21\u6CE8\u5165\u8FD0\u884C\u3002",en:"1. Inject and run when translation is turned on, and removed when translation is turned off. 2. As the page changes, it may be injected and run multiple times."},inject_css:{zh:"\u6CE8\u5165CSS",en:"Inject CSS"},inject_css_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u5C06\u79FB\u9664\u3002",en:"Injected when translation is enabled and removed when translation is disabled."},root_selector:{zh:"\u6839\u9009\u62E9\u5668",en:"Root Selector"},fixer_function:{zh:"\u4FEE\u590D\u51FD\u6570",en:"Fixer Function"},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

."},import:{zh:"\u5BFC\u5165",en:"Import"},export:{zh:"\u5BFC\u51FA",en:"Export"},error_cant_be_blank:{zh:"\u4E0D\u80FD\u4E3A\u7A7A",en:"Can not be blank"},error_duplicate_values:{zh:"\u5B58\u5728\u91CD\u590D\u7684\u503C",en:"There are duplicate values"},error_wrong_file_type:{zh:"\u9519\u8BEF\u7684\u6587\u4EF6\u7C7B\u578B",en:"Wrong file type"},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."},deepl_api:{zh:"DeepL \u63A5\u53E3",en:"DeepL API"},deepl_key:{zh:"DeepL \u5BC6\u94A5",en:"DeepL Key"},openai_api:{zh:"OpenAI \u63A5\u53E3",en:"OpenAI API"},openai_key:{zh:"OpenAI \u5BC6\u94A5",en:"OpenAI Key"},openai_model:{zh:"OpenAI \u6A21\u578B",en:"OpenAI Model"},openai_prompt:{zh:"OpenAI \u63D0\u793A\u8BCD",en:"OpenAI Prompt"},if_clear_cache:{zh:"\u662F\u5426\u6E05\u9664\u7F13\u5B58",en:"Whether clear cache"},clear_cache_never:{zh:"\u4E0D\u6E05\u9664\u7F13\u5B58",en:"Never clear cache"},clear_cache_restart:{zh:"\u91CD\u542F\u6D4F\u89C8\u5668\u65F6\u6E05\u9664\u7F13\u5B58",en:"Clear cache when restarting browser"},data_sync_type:{zh:"\u6570\u636E\u540C\u6B65\u65B9\u5F0F",en:"Data Sync Type"},data_sync_url:{zh:"\u6570\u636E\u540C\u6B65\u63A5\u53E3",en:"Data Sync API"},data_sync_user:{zh:"\u6570\u636E\u540C\u6B65\u8D26\u6237",en:"Data Sync User"},data_sync_key:{zh:"\u6570\u636E\u540C\u6B65\u5BC6\u94A5",en:"Data Sync Key"},sync_now:{zh:"\u7ACB\u5373\u540C\u6B65",en:"Sync Now"},sync_success:{zh:"\u540C\u6B65\u6210\u529F\uFF01",en:"Sync Success"},sync_failed:{zh:"\u540C\u6B65\u5931\u8D25\uFF01",en:"Sync Error"},error_got_some_wrong:{zh:"\u62B1\u6B49\uFF0C\u51FA\u9519\u4E86\uFF01",en:"Sorry, something went wrong!"},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"},click_test:{zh:"\u70B9\u51FB\u6D4B\u8BD5",en:"Click Test"},test_success:{zh:"\u6D4B\u8BD5\u6210\u529F",en:"Test success"},test_failed:{zh:"\u6D4B\u8BD5\u5931\u8D25",en:"Test failed"},clear_all_cache_now:{zh:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u7F13\u5B58",en:"Clear all cache now"},clear_cache:{zh:"\u6E05\u9664\u7F13\u5B58",en:"Clear Cache"},clear_success:{zh:"\u6E05\u9664\u6210\u529F",en:"Clear success"},clear_failed:{zh:"\u6E05\u9664\u5931\u8D25",en:"Clear failed"},share:{zh:"\u5206\u4EAB",en:"Share"},clear_all:{zh:"\u6E05\u7A7A",en:"Clear All"},help:{zh:"\u6C42\u52A9",en:"Help"},restore_default:{zh:"\u6062\u590D\u9ED8\u8BA4",en:"Restore Default"},shortcuts_setting:{zh:"\u5FEB\u6377\u952E\u8BBE\u7F6E",en:"Shortcuts Setting"},toggle_translate_shortcut:{zh:"\"\u5F00\u542F\u7FFB\u8BD1\"\u5FEB\u6377\u952E",en:"\"Toggle Translate\" Shortcut"},toggle_style_shortcut:{zh:"\"\u5207\u6362\u6837\u5F0F\"\u5FEB\u6377\u952E",en:"\"Toggle Style\" Shortcut"},toggle_popup_shortcut:{zh:"\"\u6253\u5F00\u5F39\u7A97\"\u5FEB\u6377\u952E",en:"\"Open Popup\" Shortcut"},open_setting_shortcut:{zh:"\"\u6253\u5F00\u8BBE\u7F6E\"\u5FEB\u6377\u952E",en:"\"Open Setting\" Shortcut"},hide_fab_button:{zh:"\u9690\u85CF\u60AC\u6D6E\u6309\u94AE",en:"Hide Fab Button"},hide_tran_button:{zh:"\u9690\u85CF\u7FFB\u8BD1\u6309\u94AE",en:"Hide Translate Button"},hide_click_away:{zh:"\u70B9\u51FB\u5916\u90E8\u5173\u95ED\u5F39\u7A97",en:"Click outside to close the pop-up window"},show:{zh:"\u663E\u793A",en:"Show"},hide:{zh:"\u9690\u85CF",en:"Hide"},save_rule:{zh:"\u4FDD\u5B58\u89C4\u5219",en:"Save Rule"},global_rule:{zh:"\u5168\u5C40\u89C4\u5219",en:"Global Rule"},input_translate:{zh:"\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation"},use_input_box_translation:{zh:"\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation"},input_selector:{zh:"\u8F93\u5165\u6846\u9009\u62E9\u5668",en:"Input Selector"},input_selector_helper:{zh:"\u7528\u4E8E\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",en:"Used for input box translation."},trigger_trans_shortcut:{zh:"\u89E6\u53D1\u7FFB\u8BD1\u5FEB\u6377\u952E",en:"Trigger Translation Shortcut Keys"},trigger_trans_shortcut_help:{zh:"\u9ED8\u8BA4\u4E3A\u5355\u51FB\u201CAltLeft+KeyI\u201D",en:"Default is \"AltLeft+KeyI\""},shortcut_press_count:{zh:"\u5FEB\u6377\u952E\u8FDE\u51FB\u6B21\u6570",en:"Shortcut Press Number"},combo_timeout:{zh:"\u8FDE\u51FB\u8D85\u65F6\u65F6\u95F4 (10-1000ms)",en:"Combo Timeout (10-1000ms)"},input_trans_start_sign:{zh:"\u7FFB\u8BD1\u8D77\u59CB\u6807\u8BC6",en:"Translation Start Sign"},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\""},detect_lang_remote:{zh:"\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B",en:"Remote language detection"},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."},disable:{zh:"\u7981\u7528",en:"Disable"},enable:{zh:"\u542F\u7528",en:"Enable"},selection_translate:{zh:"\u5212\u8BCD\u7FFB\u8BD1",en:"Selection Translate"},toggle_selection_translate:{zh:"\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"Use Selection Translate"},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"},tranbtn_offset_x:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBX\uFF080-100\uFF09",en:"Translate Button Offset X (0-100)"},tranbtn_offset_y:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBY\uFF080-100\uFF09",en:"Translate Button Offset Y (0-100)"},translated_text:{zh:"\u8BD1\u6587",en:"Translated Text"},original_text:{zh:"\u539F\u6587",en:"Original Text"},favorite_words:{zh:"\u6536\u85CF\u8BCD\u6C47",en:"Favorite Words"},touch_setting:{zh:"\u89E6\u5C4F\u8BBE\u7F6E",en:"Touch Setting"},touch_translate_shortcut:{zh:"\u89E6\u5C4F\u7FFB\u8BD1\u5FEB\u6377\u65B9\u5F0F",en:"Touch Translate Shortcut"},touch_tap_0:{zh:"\u7981\u7528",en:"Disable"},touch_tap_2:{zh:"\u53CC\u6307\u8F7B\u89E6",en:"Two finger tap"},touch_tap_3:{zh:"\u4E09\u6307\u8F7B\u89E6",en:"Three finger tap"},touch_tap_4:{zh:"\u56DB\u6307\u8F7B\u89E6",en:"Four finger tap"},translate_blacklist:{zh:"\u7981\u7528\u7FFB\u8BD1\u540D\u5355",en:"Translate Blacklist"},disabled_csplist:{zh:"\u7981\u7528CSP\u540D\u5355",en:"Disabled CSP List"},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."},skip_langs:{zh:"\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",en:"Disable Languages"},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."},context_menus:{zh:"\u53F3\u952E\u83DC\u5355",en:"Context Menus"},hide_context_menus:{zh:"\u9690\u85CF\u53F3\u952E\u83DC\u5355",en:"Hide Context Menus"},simple_context_menus:{zh:"\u7B80\u5355\u53F3\u952E\u83DC\u5355",en:"Simple_context_menus Context Menus"},secondary_context_menus:{zh:"\u4E8C\u7EA7\u53F3\u952E\u83DC\u5355",en:"Secondary Context Menus"},mulkeys_help:{zh:"\u652F\u6301\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\u591A\u4E2AKEY\u8F6E\u8BE2\u8C03\u7528\u3002",en:"Supports multiple KEY polling calls separated by newlines or English commas \",\"."},translation_element_tag:{zh:"\u8BD1\u6587\u5143\u7D20\u6807\u7B7E",en:"Translation Element Tag"},show_only_translations:{zh:"\u4EC5\u663E\u793A\u8BD1\u6587",en:"Show Only Translations"},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."},translate_page_title:{zh:"\u662F\u5426\u7FFB\u8BD1\u9875\u9762\u6807\u9898",en:"Translate Page Title"},more:{zh:"\u66F4\u591A",en:"More"},fixer_selector:{zh:"\u7F51\u9875\u4FEE\u590D\u9009\u62E9\u5668",en:"Fixer Selector"},reg_niutrans:{zh:"\u83B7\u53D6\u5C0F\u725B\u7FFB\u8BD1\u5BC6\u94A5",en:"Get NiuTrans APIKey"}}; ;// CONCATENATED MODULE: ./src/config/index.js -const STOKEY_MSAUTH="".concat(APP_NAME,"_msauth");const STOKEY_BDAUTH="".concat(APP_NAME,"_bdauth");const config_STOKEY_SETTING="".concat(APP_NAME,"_setting");const config_STOKEY_RULES="".concat(APP_NAME,"_rules");const STOKEY_WORDS="".concat(APP_NAME,"_words");const config_STOKEY_SYNC="".concat(APP_NAME,"_sync");const config_STOKEY_FAB="".concat(APP_NAME,"_fab");const config_STOKEY_RULESCACHE_PREFIX="".concat(APP_NAME,"_rulescache_");const CMD_TOGGLE_TRANSLATE="toggleTranslate";const CMD_TOGGLE_STYLE="toggleStyle";const CMD_OPEN_OPTIONS="openOptions";const CMD_OPEN_TRANBOX="openTranbox";const CLIENT_WEB="web";const CLIENT_CHROME="chrome";const CLIENT_EDGE="edge";const CLIENT_FIREFOX="firefox";const CLIENT_USERSCRIPT="userscript";const CLIENT_EXTS=[CLIENT_CHROME,CLIENT_EDGE,CLIENT_FIREFOX];const KV_RULES_KEY="kiss-rules.json";const KV_WORDS_KEY="kiss-words.json";const config_KV_RULES_SHARE_KEY="kiss-rules-share.json";const KV_SETTING_KEY="kiss-setting.json";const KV_SALT_SYNC="KISS-Translator-SYNC";const config_KV_SALT_SHARE="KISS-Translator-SHARE";const CACHE_NAME="".concat(APP_NAME,"_cache");const MSG_FETCH="fetch";const MSG_FETCH_LIMIT="fetch_limit";const MSG_FETCH_CLEAR="fetch_clear";const MSG_OPEN_OPTIONS="open_options";const MSG_SAVE_RULE="save_rule";const MSG_TRANS_TOGGLE="trans_toggle";const MSG_TRANS_TOGGLE_STYLE="trans_toggle_style";const MSG_OPEN_TRANBOX="open_tranbox";const MSG_TRANS_GETRULE="trans_getrule";const MSG_TRANS_PUTRULE="trans_putrule";const MSG_TRANS_CURRULE="trans_currule";const MSG_CONTEXT_MENUS="context_menus";const MSG_COMMAND_SHORTCUTS="command_shortcuts";const MSG_INJECT_JS="inject_js";const MSG_INJECT_CSS="inject_css";const MSG_UPDATE_CSP="update_csp";const THEME_LIGHT="light";const THEME_DARK="dark";const URL_KISS_WORKER="https://github.com/fishjar/kiss-worker";const URL_KISS_PROXY="https://github.com/fishjar/kiss-proxy";const URL_KISS_RULES="https://github.com/fishjar/kiss-rules";const URL_KISS_RULES_NEW_ISSUE="https://github.com/fishjar/kiss-rules/issues/new";const config_URL_RAW_PREFIX="https://raw.githubusercontent.com/fishjar/kiss-translator/master";const URL_CACHE_TRAN="https://".concat(APP_LCNAME,"/translate");const URL_MICROSOFT_TRAN="https://api-edge.cognitive.microsofttranslator.com/translate";const URL_MICROSOFT_AUTH="https://edge.microsoft.com/translate/auth";const URL_BAIDU_LANGDETECT="https://fanyi.baidu.com/langdetect";const URL_BAIDU_SUGGEST="https://fanyi.baidu.com/sug";const URL_BAIDU_TTS="https://fanyi.baidu.com/gettts";const URL_BAIDU_WEB="https://fanyi.baidu.com/";const URL_BAIDU_TRANSAPI="https://fanyi.baidu.com/transapi";const config_URL_BAIDU_TRANSAPI_V2="https://fanyi.baidu.com/v2transapi";const URL_DEEPLFREE_TRAN="https://www2.deepl.com/jsonrpc";const config_URL_TENCENT_TRANSMART="https://transmart.qq.com/api/imt";const OPT_TRANS_GOOGLE="Google";const OPT_TRANS_MICROSOFT="Microsoft";const OPT_TRANS_DEEPL="DeepL";const OPT_TRANS_DEEPLX="DeepLX";const OPT_TRANS_DEEPLFREE="DeepLFree";const OPT_TRANS_BAIDU="Baidu";const OPT_TRANS_TENCENT="Tencent";const OPT_TRANS_OPENAI="OpenAI";const OPT_TRANS_GEMINI="Gemini";const OPT_TRANS_CLOUDFLAREAI="CloudflareAI";const OPT_TRANS_CUSTOMIZE="Custom";const OPT_TRANS_CUSTOMIZE_2="Custom2";const OPT_TRANS_CUSTOMIZE_3="Custom3";const OPT_TRANS_CUSTOMIZE_4="Custom4";const OPT_TRANS_CUSTOMIZE_5="Custom5";const OPT_TRANS_ALL=[OPT_TRANS_GOOGLE,OPT_TRANS_MICROSOFT,OPT_TRANS_BAIDU,OPT_TRANS_TENCENT,OPT_TRANS_DEEPL,OPT_TRANS_DEEPLFREE,OPT_TRANS_DEEPLX,OPT_TRANS_OPENAI,OPT_TRANS_GEMINI,OPT_TRANS_CLOUDFLAREAI,OPT_TRANS_CUSTOMIZE,OPT_TRANS_CUSTOMIZE_2,OPT_TRANS_CUSTOMIZE_3,OPT_TRANS_CUSTOMIZE_4,OPT_TRANS_CUSTOMIZE_5];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_FROM=[["auto","Auto-detect"],...OPT_LANGS_TO];const OPT_LANGS_SPECIAL={[OPT_TRANS_GOOGLE]:new Map(OPT_LANGS_FROM.map(_ref=>{let[key]=_ref;return[key,key];})),[OPT_TRANS_MICROSOFT]:new Map([...OPT_LANGS_FROM.map(_ref2=>{let[key]=_ref2;return[key,key];}),["auto",""],["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[OPT_TRANS_DEEPL]:new Map([...OPT_LANGS_FROM.map(_ref3=>{let[key]=_ref3;return[key,key.toUpperCase()];}),["auto",""],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLFREE]:new Map([...OPT_LANGS_FROM.map(_ref4=>{let[key]=_ref4;return[key,key.toUpperCase()];}),["auto","auto"],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLX]:new Map([...OPT_LANGS_FROM.map(_ref5=>{let[key]=_ref5;return[key,key.toUpperCase()];}),["auto",""],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_BAIDU]:new Map([...OPT_LANGS_FROM.map(_ref6=>{let[key]=_ref6;return[key,key];}),["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]:new Map(OPT_LANGS_FROM.map(_ref7=>{let[key,val]=_ref7;return[key,val.split(" - ")[0]];})),[OPT_TRANS_GEMINI]:new Map(OPT_LANGS_FROM.map(_ref8=>{let[key,val]=_ref8;return[key,val.split(" - ")[0]];})),[OPT_TRANS_CLOUDFLAREAI]:new Map([["auto",""],["zh-CN","chinese"],["zh-TW","chinese"],["en","english"],["ar","arabic"],["de","german"],["ru","russian"],["fr","french"],["pt","portuguese"],["ja","japanese"],["es","spanish"],["hi","hindi"]]),[OPT_TRANS_CUSTOMIZE]:new Map([...OPT_LANGS_FROM.map(_ref9=>{let[key]=_ref9;return[key,key];}),["auto",""]])};const OPT_LANGS_LIST=OPT_LANGS_TO.map(_ref10=>{let[lang]=_ref10;return lang;});const OPT_LANGS_BAIDU=new Map(Array.from(OPT_LANGS_SPECIAL[OPT_TRANS_BAIDU].entries()).map(_ref11=>{let[k,v]=_ref11;return[v,k];}));const config_OPT_LANGS_TENCENT=new Map(Array.from(OPT_LANGS_SPECIAL[OPT_TRANS_TENCENT].entries()).map(_ref12=>{let[k,v]=_ref12;return[v,k];}));config_OPT_LANGS_TENCENT.set("zh","zh-CN");const OPT_STYLE_NONE="style_none";// 无 +const STOKEY_MSAUTH="".concat(APP_NAME,"_msauth");const STOKEY_BDAUTH="".concat(APP_NAME,"_bdauth");const config_STOKEY_SETTING="".concat(APP_NAME,"_setting");const config_STOKEY_RULES="".concat(APP_NAME,"_rules");const STOKEY_WORDS="".concat(APP_NAME,"_words");const config_STOKEY_SYNC="".concat(APP_NAME,"_sync");const config_STOKEY_FAB="".concat(APP_NAME,"_fab");const config_STOKEY_RULESCACHE_PREFIX="".concat(APP_NAME,"_rulescache_");const CMD_TOGGLE_TRANSLATE="toggleTranslate";const CMD_TOGGLE_STYLE="toggleStyle";const CMD_OPEN_OPTIONS="openOptions";const CMD_OPEN_TRANBOX="openTranbox";const CLIENT_WEB="web";const CLIENT_CHROME="chrome";const CLIENT_EDGE="edge";const CLIENT_FIREFOX="firefox";const CLIENT_USERSCRIPT="userscript";const CLIENT_EXTS=[CLIENT_CHROME,CLIENT_EDGE,CLIENT_FIREFOX];const KV_RULES_KEY="kiss-rules.json";const KV_WORDS_KEY="kiss-words.json";const config_KV_RULES_SHARE_KEY="kiss-rules-share.json";const KV_SETTING_KEY="kiss-setting.json";const KV_SALT_SYNC="KISS-Translator-SYNC";const config_KV_SALT_SHARE="KISS-Translator-SHARE";const CACHE_NAME="".concat(APP_NAME,"_cache");const MSG_FETCH="fetch";const MSG_FETCH_LIMIT="fetch_limit";const MSG_FETCH_CLEAR="fetch_clear";const MSG_OPEN_OPTIONS="open_options";const MSG_SAVE_RULE="save_rule";const MSG_TRANS_TOGGLE="trans_toggle";const MSG_TRANS_TOGGLE_STYLE="trans_toggle_style";const MSG_OPEN_TRANBOX="open_tranbox";const MSG_TRANS_GETRULE="trans_getrule";const MSG_TRANS_PUTRULE="trans_putrule";const MSG_TRANS_CURRULE="trans_currule";const MSG_CONTEXT_MENUS="context_menus";const MSG_COMMAND_SHORTCUTS="command_shortcuts";const MSG_INJECT_JS="inject_js";const MSG_INJECT_CSS="inject_css";const MSG_UPDATE_CSP="update_csp";const THEME_LIGHT="light";const THEME_DARK="dark";const URL_KISS_WORKER="https://github.com/fishjar/kiss-worker";const URL_KISS_PROXY="https://github.com/fishjar/kiss-proxy";const URL_KISS_RULES="https://github.com/fishjar/kiss-rules";const URL_KISS_RULES_NEW_ISSUE="https://github.com/fishjar/kiss-rules/issues/new";const config_URL_RAW_PREFIX="https://raw.githubusercontent.com/fishjar/kiss-translator/master";const URL_CACHE_TRAN="https://".concat(APP_LCNAME,"/translate");const URL_MICROSOFT_TRAN="https://api-edge.cognitive.microsofttranslator.com/translate";const URL_MICROSOFT_AUTH="https://edge.microsoft.com/translate/auth";const URL_BAIDU_LANGDETECT="https://fanyi.baidu.com/langdetect";const URL_BAIDU_SUGGEST="https://fanyi.baidu.com/sug";const URL_BAIDU_TTS="https://fanyi.baidu.com/gettts";const URL_BAIDU_WEB="https://fanyi.baidu.com/";const URL_BAIDU_TRANSAPI="https://fanyi.baidu.com/transapi";const config_URL_BAIDU_TRANSAPI_V2="https://fanyi.baidu.com/v2transapi";const URL_DEEPLFREE_TRAN="https://www2.deepl.com/jsonrpc";const config_URL_TENCENT_TRANSMART="https://transmart.qq.com/api/imt";const URL_NIUTRANS_REG="https://niutrans.com/login?active=3&userSource=kiss-translator";const DEFAULT_USER_AGENT="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36";const OPT_TRANS_GOOGLE="Google";const OPT_TRANS_MICROSOFT="Microsoft";const OPT_TRANS_DEEPL="DeepL";const OPT_TRANS_DEEPLX="DeepLX";const OPT_TRANS_DEEPLFREE="DeepLFree";const OPT_TRANS_NIUTRANS="NiuTrans";const OPT_TRANS_BAIDU="Baidu";const OPT_TRANS_TENCENT="Tencent";const OPT_TRANS_OPENAI="OpenAI";const OPT_TRANS_GEMINI="Gemini";const OPT_TRANS_CLOUDFLAREAI="CloudflareAI";const OPT_TRANS_CUSTOMIZE="Custom";const OPT_TRANS_CUSTOMIZE_2="Custom2";const OPT_TRANS_CUSTOMIZE_3="Custom3";const OPT_TRANS_CUSTOMIZE_4="Custom4";const OPT_TRANS_CUSTOMIZE_5="Custom5";const OPT_TRANS_ALL=[OPT_TRANS_GOOGLE,OPT_TRANS_MICROSOFT,OPT_TRANS_BAIDU,OPT_TRANS_TENCENT,OPT_TRANS_DEEPL,OPT_TRANS_DEEPLFREE,OPT_TRANS_DEEPLX,OPT_TRANS_NIUTRANS,OPT_TRANS_OPENAI,OPT_TRANS_GEMINI,OPT_TRANS_CLOUDFLAREAI,OPT_TRANS_CUSTOMIZE,OPT_TRANS_CUSTOMIZE_2,OPT_TRANS_CUSTOMIZE_3,OPT_TRANS_CUSTOMIZE_4,OPT_TRANS_CUSTOMIZE_5];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_FROM=[["auto","Auto-detect"],...OPT_LANGS_TO];const OPT_LANGS_SPECIAL={[OPT_TRANS_GOOGLE]:new Map(OPT_LANGS_FROM.map(_ref=>{let[key]=_ref;return[key,key];})),[OPT_TRANS_MICROSOFT]:new Map([...OPT_LANGS_FROM.map(_ref2=>{let[key]=_ref2;return[key,key];}),["auto",""],["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[OPT_TRANS_DEEPL]:new Map([...OPT_LANGS_FROM.map(_ref3=>{let[key]=_ref3;return[key,key.toUpperCase()];}),["auto",""],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLFREE]:new Map([...OPT_LANGS_FROM.map(_ref4=>{let[key]=_ref4;return[key,key.toUpperCase()];}),["auto","auto"],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLX]:new Map([...OPT_LANGS_FROM.map(_ref5=>{let[key]=_ref5;return[key,key.toUpperCase()];}),["auto",""],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_NIUTRANS]:new Map([...OPT_LANGS_FROM.map(_ref6=>{let[key]=_ref6;return[key,key];}),["auto","auto"],["zh-CN","zh"],["zh-TW","cht"]]),[OPT_TRANS_BAIDU]:new Map([...OPT_LANGS_FROM.map(_ref7=>{let[key]=_ref7;return[key,key];}),["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]:new Map(OPT_LANGS_FROM.map(_ref8=>{let[key,val]=_ref8;return[key,val.split(" - ")[0]];})),[OPT_TRANS_GEMINI]:new Map(OPT_LANGS_FROM.map(_ref9=>{let[key,val]=_ref9;return[key,val.split(" - ")[0]];})),[OPT_TRANS_CLOUDFLAREAI]:new Map([["auto",""],["zh-CN","chinese"],["zh-TW","chinese"],["en","english"],["ar","arabic"],["de","german"],["ru","russian"],["fr","french"],["pt","portuguese"],["ja","japanese"],["es","spanish"],["hi","hindi"]]),[OPT_TRANS_CUSTOMIZE]:new Map([...OPT_LANGS_FROM.map(_ref10=>{let[key]=_ref10;return[key,key];}),["auto",""]]),[OPT_TRANS_CUSTOMIZE_2]:new Map([...OPT_LANGS_FROM.map(_ref11=>{let[key]=_ref11;return[key,key];}),["auto",""]]),[OPT_TRANS_CUSTOMIZE_3]:new Map([...OPT_LANGS_FROM.map(_ref12=>{let[key]=_ref12;return[key,key];}),["auto",""]]),[OPT_TRANS_CUSTOMIZE_4]:new Map([...OPT_LANGS_FROM.map(_ref13=>{let[key]=_ref13;return[key,key];}),["auto",""]]),[OPT_TRANS_CUSTOMIZE_5]:new Map([...OPT_LANGS_FROM.map(_ref14=>{let[key]=_ref14;return[key,key];}),["auto",""]])};const OPT_LANGS_LIST=OPT_LANGS_TO.map(_ref15=>{let[lang]=_ref15;return lang;});const OPT_LANGS_BAIDU=new Map(Array.from(OPT_LANGS_SPECIAL[OPT_TRANS_BAIDU].entries()).map(_ref16=>{let[k,v]=_ref16;return[v,k];}));const config_OPT_LANGS_TENCENT=new Map(Array.from(OPT_LANGS_SPECIAL[OPT_TRANS_TENCENT].entries()).map(_ref17=>{let[k,v]=_ref17;return[v,k];}));config_OPT_LANGS_TENCENT.set("zh","zh-CN");const OPT_STYLE_NONE="style_none";// 无 const OPT_STYLE_LINE="under_line";// 下划线 const OPT_STYLE_DOTLINE="dot_line";// 点状线 const OPT_STYLE_DASHLINE="dash_line";// 虚线 @@ -18593,7 +18593,7 @@ hideClickAway:false// 是否点击外部关闭弹窗 const DEFAULT_SUBRULES_LIST=[{url:"https://fishjar.github.io/kiss-rules/kiss-rules.json",selected:false},{url:"https://fishjar.github.io/kiss-rules/kiss-rules-on.json",selected:true},{url:"https://fishjar.github.io/kiss-rules/kiss-rules-off.json",selected:false}];// 翻译接口 const defaultCustomApi={url:"",key:"",fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL};const DEFAULT_TRANS_APIS={[OPT_TRANS_GOOGLE]:{url:"https://translate.googleapis.com/translate_a/single",key:"",fetchLimit:DEFAULT_FETCH_LIMIT,// 最大任务数量 fetchInterval:DEFAULT_FETCH_INTERVAL// 任务间隔时间 -},[OPT_TRANS_MICROSOFT]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_BAIDU]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_TENCENT]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_DEEPL]:{url:"https://api-free.deepl.com/v2/translate",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_DEEPLFREE]:{fetchLimit:1,fetchInterval:500},[OPT_TRANS_DEEPLX]:{url:"http://localhost:1188/translate",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_OPENAI]:{url:"https://api.openai.com/v1/chat/completions",key:"",model:"gpt-4",prompt:"You will be provided with a sentence in ".concat(PROMPT_PLACE_FROM,", and your task is to translate it into ").concat(PROMPT_PLACE_TO,"."),fetchLimit:1,fetchInterval:500},[OPT_TRANS_GEMINI]:{url:"https://generativelanguage.googleapis.com/v1/models",key:"",model:"gemini-pro",prompt:"Translate the following text from ".concat(PROMPT_PLACE_FROM," to ").concat(PROMPT_PLACE_TO,":\n\n").concat(PROMPT_PLACE_TEXT),fetchLimit:1,fetchInterval:500},[OPT_TRANS_CLOUDFLAREAI]:{url:"https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/run/@cf/meta/m2m100-1.2b",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_CUSTOMIZE]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_2]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_3]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_4]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_5]:defaultCustomApi};// 默认快捷键 +},[OPT_TRANS_MICROSOFT]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_BAIDU]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_TENCENT]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_DEEPL]:{url:"https://api-free.deepl.com/v2/translate",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_DEEPLFREE]:{fetchLimit:1,fetchInterval:500},[OPT_TRANS_DEEPLX]:{url:"http://localhost:1188/translate",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_NIUTRANS]:{url:"https://api.niutrans.com/NiuTransServer/translation",key:"",dictNo:"",memoryNo:"",fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_OPENAI]:{url:"https://api.openai.com/v1/chat/completions",key:"",model:"gpt-4",prompt:"You will be provided with a sentence in ".concat(PROMPT_PLACE_FROM,", and your task is to translate it into ").concat(PROMPT_PLACE_TO,"."),fetchLimit:1,fetchInterval:500},[OPT_TRANS_GEMINI]:{url:"https://generativelanguage.googleapis.com/v1/models",key:"",model:"gemini-pro",prompt:"Translate the following text from ".concat(PROMPT_PLACE_FROM," to ").concat(PROMPT_PLACE_TO,":\n\n").concat(PROMPT_PLACE_TEXT),fetchLimit:1,fetchInterval:500},[OPT_TRANS_CLOUDFLAREAI]:{url:"https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/run/@cf/meta/m2m100-1.2b",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_CUSTOMIZE]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_2]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_3]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_4]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_5]:defaultCustomApi};// 默认快捷键 const OPT_SHORTCUT_TRANSLATE="toggleTranslate";const OPT_SHORTCUT_STYLE="toggleStyle";const OPT_SHORTCUT_POPUP="togglePopup";const OPT_SHORTCUT_SETTING="openSetting";const DEFAULT_SHORTCUTS={[OPT_SHORTCUT_TRANSLATE]:["AltLeft","KeyQ"],[OPT_SHORTCUT_STYLE]:["AltLeft","KeyC"],[OPT_SHORTCUT_POPUP]:["AltLeft","KeyK"],[OPT_SHORTCUT_SETTING]:["AltLeft","KeyO"]};const TRANS_MIN_LENGTH=5;// 最短翻译长度 const TRANS_MAX_LENGTH=5000;// 最长翻译长度 const TRANS_NEWLINE_LENGTH=20;// 换行字符数 @@ -19246,7 +19246,8 @@ store=await getToken();await setBdauth(store);return store;};};const bdAuth=_bdA * 失效作废 * @param {*} param0 * @returns - */const genBaiduV2=async _ref=>{let{text,from,to}=_ref;const{token,gtk}=await bdAuth();const sign=getSign(text,gtk);const data={from,to,query:text,simple_means_flag:3,sign,token,domain:"common",ts:Date.now()};const input="".concat(URL_BAIDU_TRANSAPI_V2,"?from=").concat(from,"&to=").concat(to);const init={headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},method:"POST",body:queryString.stringify(data)};return[input,init];};const genBaidu=async _ref2=>{let{text,from,to}=_ref2;const data={from,to,query:text,source:"txt"};const init={headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},method:"POST",body:query_string.stringify(data)};return[URL_BAIDU_TRANSAPI,init];}; + */const genBaiduV2=async _ref=>{let{text,from,to}=_ref;const{token,gtk}=await bdAuth();const sign=getSign(text,gtk);const data={from,to,query:text,simple_means_flag:3,sign,token,domain:"common",ts:Date.now()};const input="".concat(URL_BAIDU_TRANSAPI_V2,"?from=").concat(from,"&to=").concat(to);const init={headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},method:"POST",body:queryString.stringify(data)};return[input,init];};const genBaidu=async _ref2=>{let{text,from,to}=_ref2;const data={from,to,query:text,source:"txt"};const init={headers:{// Origin: "https://fanyi.baidu.com", +"content-type":"application/x-www-form-urlencoded; charset=UTF-8","User-Agent":DEFAULT_USER_AGENT},method:"POST",body:query_string.stringify(data)};return[URL_BAIDU_TRANSAPI,init];}; ;// CONCATENATED MODULE: ./src/libs/req.js const keyMap=new Map();// 轮询key const keyPick=function(translator){var _keyMap$get;let key=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";const keys=key.split(/\n|,/).map(item=>item.trim()).filter(Boolean);if(keys.length===0){return"";}const preIndex=(_keyMap$get=keyMap.get(translator))!==null&&_keyMap$get!==void 0?_keyMap$get:-1;const curIndex=(preIndex+1)%keys.length;keyMap.set(translator,curIndex);return keys[curIndex];};/** @@ -19254,14 +19255,14 @@ const keyPick=function(translator){var _keyMap$get;let key=arguments.length>1&&a * @param {*} request * @returns */const newCacheReq=async(input,init)=>{let request=new Request(input,init);if(request.method!=="GET"){const body=await request.text();const cacheUrl=new URL(request.url);cacheUrl.pathname+=body;request=new Request(cacheUrl.toString(),{method:"GET"});}return request;};const genGoogle=_ref=>{let{text,from,to,url,key}=_ref;const params={client:"gtx",dt:"t",dj:1,ie:"UTF-8",sl:from,tl:to,q:text};const input="".concat(url,"?").concat(query_string.stringify(params));const init={headers:{"Content-type":"application/json"}};if(key){init.headers.Authorization="Bearer ".concat(key);}return[input,init];};const genMicrosoft=async _ref2=>{let{text,from,to}=_ref2;const[token]=await msAuth();const params={from,to,"api-version":"3.0"};const input="".concat(URL_MICROSOFT_TRAN,"?").concat(query_string.stringify(params));const init={headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(token)},method:"POST",body:JSON.stringify([{Text:text}])};return[input,init];};const genDeepl=_ref3=>{let{text,from,to,url,key}=_ref3;const data={text:[text],target_lang:to,source_lang:from// split_sentences: "0", -};const init={headers:{"Content-type":"application/json",Authorization:"DeepL-Auth-Key ".concat(key)},method:"POST",body:JSON.stringify(data)};return[url,init];};const genDeeplX=_ref4=>{let{text,from,to,url,key}=_ref4;const data={text,target_lang:to,source_lang:from};const init={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify(data)};if(key){init.headers.Authorization="Bearer ".concat(key);}return[url,init];};const genTencent=_ref5=>{let{text,from,to}=_ref5;const data={header:{fn:"auto_translation_block"},source:{text_block:text,lang:from},target:{lang:to}};const init={headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify(data)};return[config_URL_TENCENT_TRANSMART,init];};const genOpenAI=_ref6=>{let{text,from,to,url,key,prompt,model}=_ref6;prompt=prompt.replaceAll(PROMPT_PLACE_FROM,from).replaceAll(PROMPT_PLACE_TO,to);const data={model,messages:[{role:"system",content:prompt},{role:"user",content:text}],temperature:0,max_tokens:256};const init={headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(key),// OpenAI +};const init={headers:{"Content-type":"application/json",Authorization:"DeepL-Auth-Key ".concat(key)},method:"POST",body:JSON.stringify(data)};return[url,init];};const genDeeplX=_ref4=>{let{text,from,to,url,key}=_ref4;const data={text,target_lang:to,source_lang:from};const init={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify(data)};if(key){init.headers.Authorization="Bearer ".concat(key);}return[url,init];};const genNiuTrans=_ref5=>{let{text,from,to,url,key,dictNo,memoryNo}=_ref5;const data={from,to,apikey:key,src_text:text,dictNo,memoryNo};const init={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify(data)};return[url,init];};const genTencent=_ref6=>{let{text,from,to}=_ref6;const data={header:{fn:"auto_translation_block"},source:{text_block:text,lang:from},target:{lang:to}};const init={headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify(data)};return[config_URL_TENCENT_TRANSMART,init];};const genOpenAI=_ref7=>{let{text,from,to,url,key,prompt,model}=_ref7;prompt=prompt.replaceAll(PROMPT_PLACE_FROM,from).replaceAll(PROMPT_PLACE_TO,to);const data={model,messages:[{role:"system",content:prompt},{role:"user",content:text}],temperature:0,max_tokens:256};const init={headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(key),// OpenAI "api-key":key// Azure OpenAI -},method:"POST",body:JSON.stringify(data)};return[url,init];};const genGemini=_ref7=>{let{text,from,to,url,key,prompt,model}=_ref7;prompt=prompt.replaceAll(PROMPT_PLACE_FROM,from).replaceAll(PROMPT_PLACE_TO,to).replaceAll(PROMPT_PLACE_TEXT,text);const data={contents:[{// role: "user", -parts:[{text:prompt}]}]};const input="".concat(url,"/").concat(model,":generateContent?key=").concat(key);const init={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify(data)};return[input,init];};const genCloudflareAI=_ref8=>{let{text,from,to,url,key}=_ref8;const data={text,source_lang:from,target_lang:to};const init={headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(key)},method:"POST",body:JSON.stringify(data)};return[url,init];};const genCustom=_ref9=>{let{text,from,to,url,key}=_ref9;const data={text,from,to};const init={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify(data)};if(key){init.headers.Authorization="Bearer ".concat(key);}return[url,init];};/** +},method:"POST",body:JSON.stringify(data)};return[url,init];};const genGemini=_ref8=>{let{text,from,to,url,key,prompt,model}=_ref8;prompt=prompt.replaceAll(PROMPT_PLACE_FROM,from).replaceAll(PROMPT_PLACE_TO,to).replaceAll(PROMPT_PLACE_TEXT,text);const data={contents:[{// role: "user", +parts:[{text:prompt}]}]};const input="".concat(url,"/").concat(model,":generateContent?key=").concat(key);const init={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify(data)};return[input,init];};const genCloudflareAI=_ref9=>{let{text,from,to,url,key}=_ref9;const data={text,source_lang:from,target_lang:to};const init={headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(key)},method:"POST",body:JSON.stringify(data)};return[url,init];};const genCustom=_ref10=>{let{text,from,to,url,key}=_ref10;const data={text,from,to};const init={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify(data)};if(key){init.headers.Authorization="Bearer ".concat(key);}return[url,init];};/** * 构造翻译接口 request * @param {*} * @returns - */const newTransReq=(_ref10,apiSetting)=>{let{translator,text,from,to}=_ref10;const args={text,from,to,...apiSetting};switch(translator){case OPT_TRANS_DEEPL:case OPT_TRANS_OPENAI:case OPT_TRANS_GEMINI:case OPT_TRANS_CLOUDFLAREAI:args.key=keyPick(translator,args.key);break;default:}switch(translator){case OPT_TRANS_GOOGLE:return genGoogle(args);case OPT_TRANS_MICROSOFT:return genMicrosoft(args);case OPT_TRANS_DEEPL:return genDeepl(args);case OPT_TRANS_DEEPLFREE:return genDeeplFree(args);case OPT_TRANS_DEEPLX:return genDeeplX(args);case OPT_TRANS_BAIDU:return genBaidu(args);case OPT_TRANS_TENCENT:return genTencent(args);case OPT_TRANS_OPENAI:return genOpenAI(args);case OPT_TRANS_GEMINI:return genGemini(args);case OPT_TRANS_CLOUDFLAREAI:return genCloudflareAI(args);case OPT_TRANS_CUSTOMIZE:return genCustom(args);default:throw new Error("[trans] translator: ".concat(translator," not support"));}}; + */const newTransReq=(_ref11,apiSetting)=>{let{translator,text,from,to}=_ref11;const args={text,from,to,...apiSetting};switch(translator){case OPT_TRANS_DEEPL:case OPT_TRANS_OPENAI:case OPT_TRANS_GEMINI:case OPT_TRANS_CLOUDFLAREAI:case OPT_TRANS_NIUTRANS:args.key=keyPick(translator,args.key);break;default:}switch(translator){case OPT_TRANS_GOOGLE:return genGoogle(args);case OPT_TRANS_MICROSOFT:return genMicrosoft(args);case OPT_TRANS_DEEPL:return genDeepl(args);case OPT_TRANS_DEEPLFREE:return genDeeplFree(args);case OPT_TRANS_DEEPLX:return genDeeplX(args);case OPT_TRANS_NIUTRANS:return genNiuTrans(args);case OPT_TRANS_BAIDU:return genBaidu(args);case OPT_TRANS_TENCENT:return genTencent(args);case OPT_TRANS_OPENAI:return genOpenAI(args);case OPT_TRANS_GEMINI:return genGemini(args);case OPT_TRANS_CLOUDFLAREAI:return genCloudflareAI(args);case OPT_TRANS_CUSTOMIZE:case OPT_TRANS_CUSTOMIZE_2:case OPT_TRANS_CUSTOMIZE_3:case OPT_TRANS_CUSTOMIZE_4:case OPT_TRANS_CUSTOMIZE_5:return genCustom(args);default:throw new Error("[trans] translator: ".concat(translator," not support"));}}; ;// CONCATENATED MODULE: ./src/libs/utils.js /** * 限制数字大小 @@ -19326,7 +19327,7 @@ parts:[{text:prompt}]}]};const input="".concat(url,"/").concat(model,":generateC * @param {*} str * @param {*} sign * @returns - */const matchInputStr=(str,sign)=>{let reg=/\/([\w-]+)\s+([^]+)/;switch(sign){case"//":reg=/\/\/([\w-]+)\s+([^]+)/;break;case"\\":reg=/\\([\w-]+)\s+([^]+)/;break;case"\\\\":reg=/\\\\([\w-]+)\s+([^]+)/;break;case">":reg=/>([\w-]+)\s+([^]+)/;break;case">>":reg=/>>([\w-]+)\s+([^]+)/;break;default:}return str.match(reg);};/** + */const matchInputStr=(str,sign)=>{switch(sign){case"//":return str.match(/\/\/([\w-]+)\s+([^]+)/);case"\\":return str.match(/\\([\w-]+)\s+([^]+)/);case"\\\\":return str.match(/\\\\([\w-]+)\s+([^]+)/);case">":return str.match(/>([\w-]+)\s+([^]+)/);case">>":return str.match(/>>([\w-]+)\s+([^]+)/);default:}return str.match(/\/([\w-]+)\s+([^]+)/);};/** * 判断是否英文单词 * @param {*} str * @returns @@ -19356,8 +19357,8 @@ const connects=((_info=info)===null||_info===void 0?void 0:(_info$script=_info.s * @param {*} opts * @returns */const fetchData=async function(input){let{useCache,usePool,transOpts,apiSetting,...init}=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};const cacheReq=await newCacheReq(input,init);let res;// 查询缓存 -if(useCache){try{const cache=await caches.open(CACHE_NAME);res=await cache.match(cacheReq);}catch(err){log_kissLog(err,"cache match");}}if(!res){var _res;// 发送请求 -if(usePool){res=await fetchPool.push({input,init,transOpts,apiSetting});}else{res=await fetchApi({input,init,transOpts,apiSetting});}if(!((_res=res)!==null&&_res!==void 0&&_res.ok)){var _res$headers$get;const msg={url:input,status:res.status};if((_res$headers$get=res.headers.get("Content-Type"))!==null&&_res$headers$get!==void 0&&_res$headers$get.includes("json")){msg.response=await res.json();}throw new Error(JSON.stringify(msg));}// 插入缓存 +if(useCache){try{const cache=await caches.open(CACHE_NAME);res=await cache.match(cacheReq);}catch(err){log_kissLog(err,"cache match");}}if(!res){// 发送请求 +if(usePool){res=await fetchPool.push({input,init,transOpts,apiSetting});}else{res=await fetchApi({input,init,transOpts,apiSetting});}if(!res){throw new Error("Unknow error");}else if(!res.ok){var _res$headers$get;const msg={url:res.url,status:res.status};if((_res$headers$get=res.headers.get("Content-Type"))!==null&&_res$headers$get!==void 0&&_res$headers$get.includes("json")){msg.response=await res.json();}throw new Error(JSON.stringify(msg));}// 插入缓存 if(useCache){try{const cache=await caches.open(CACHE_NAME);await cache.put(cacheReq,res.clone());}catch(err){log_kissLog(err,"cache put");}}}const contentType=res.headers.get("Content-Type");if(contentType!==null&&contentType!==void 0&&contentType.includes("json")){return await res.json();}else if(contentType!==null&&contentType!==void 0&&contentType.includes("audio")){const blob=await res.blob();return await blobToBase64(blob);}return await res.text();};/** * fetch 兼容性封装 * @param {*} input @@ -19407,9 +19408,9 @@ return await fetchData(input,opts);};/** * @param {*} param0 * @returns */const apiTranslate=async _ref=>{var _OPT_LANGS_SPECIAL$tr,_res$result,_res$result2,_res$choices,_res$candidates,_res$result3;let{translator,text,fromLang,toLang,apiSetting={},useCache=true,usePool=true}=_ref;let trText="";let isSame=false;if(!text){return[trText,true];}const from=(_OPT_LANGS_SPECIAL$tr=OPT_LANGS_SPECIAL[translator].get(fromLang))!==null&&_OPT_LANGS_SPECIAL$tr!==void 0?_OPT_LANGS_SPECIAL$tr:OPT_LANGS_SPECIAL[translator].get("auto");const to=OPT_LANGS_SPECIAL[translator].get(toLang);if(!to){console.log("[trans] target lang: ".concat(toLang," not support"));return[trText,isSame];}// 版本号一/二位升级,旧缓存失效 -const[v1,v2]="1.8.5".split(".");const cacheOpts={translator,text,fromLang,toLang,version:[v1,v2].join(".")};const transOpts={translator,text,from,to};const res=await fetch_fetchPolyfill("".concat(URL_CACHE_TRAN,"?").concat(query_string.stringify(cacheOpts)),{useCache,usePool,transOpts,apiSetting});switch(translator){case OPT_TRANS_GOOGLE:trText=res.sentences.map(item=>item.trans).join(" ");isSame=to===res.src;break;case OPT_TRANS_MICROSOFT:trText=res.map(item=>item.translations.map(item=>item.text).join(" ")).join(" ");isSame=text===trText;break;case OPT_TRANS_DEEPL:trText=res.translations.map(item=>item.text).join(" ");isSame=to===res.translations[0].detected_source_language;break;case OPT_TRANS_DEEPLFREE:trText=(_res$result=res.result)===null||_res$result===void 0?void 0:_res$result.texts.map(item=>item.text).join(" ");isSame=to===((_res$result2=res.result)===null||_res$result2===void 0?void 0:_res$result2.lang);break;case OPT_TRANS_DEEPLX:trText=res.data;isSame=to===res.source_lang;break;case OPT_TRANS_BAIDU:// trText = res.trans_result?.data.map((item) => item.dst).join(" "); +const[v1,v2]="1.8.6".split(".");const cacheOpts={translator,text,fromLang,toLang,version:[v1,v2].join(".")};const transOpts={translator,text,from,to};const res=await fetch_fetchPolyfill("".concat(URL_CACHE_TRAN,"?").concat(query_string.stringify(cacheOpts)),{useCache,usePool,transOpts,apiSetting});switch(translator){case OPT_TRANS_GOOGLE:trText=res.sentences.map(item=>item.trans).join(" ");isSame=to===res.src;break;case OPT_TRANS_MICROSOFT:trText=res.map(item=>item.translations.map(item=>item.text).join(" ")).join(" ");isSame=text===trText;break;case OPT_TRANS_DEEPL:trText=res.translations.map(item=>item.text).join(" ");isSame=to===res.translations[0].detected_source_language;break;case OPT_TRANS_DEEPLFREE:trText=(_res$result=res.result)===null||_res$result===void 0?void 0:_res$result.texts.map(item=>item.text).join(" ");isSame=to===((_res$result2=res.result)===null||_res$result2===void 0?void 0:_res$result2.lang);break;case OPT_TRANS_DEEPLX:trText=res.data;isSame=to===res.source_lang;break;case OPT_TRANS_NIUTRANS:const json=JSON.parse(res);if(json.error_msg){throw new Error(json.error_msg);}trText=json.tgt_text;isSame=to===json.from;break;case OPT_TRANS_BAIDU:// trText = res.trans_result?.data.map((item) => item.dst).join(" "); // isSame = res.trans_result?.to === res.trans_result?.from; -if(res.type===1){trText=Object.keys(JSON.parse(res.result).content[0].mean[0].cont)[0];isSame=to===res.from;}else if(res.type===2){trText=res.data.map(item=>item.dst).join(" ");isSame=to===res.from;}break;case OPT_TRANS_TENCENT:trText=res.auto_translation;isSame=text===trText;break;case OPT_TRANS_OPENAI:trText=res===null||res===void 0?void 0:(_res$choices=res.choices)===null||_res$choices===void 0?void 0:_res$choices.map(item=>item.message.content).join(" ");isSame=text===trText;break;case OPT_TRANS_GEMINI:trText=res===null||res===void 0?void 0:(_res$candidates=res.candidates)===null||_res$candidates===void 0?void 0:_res$candidates.map(item=>{var _item$content;return(_item$content=item.content)===null||_item$content===void 0?void 0:_item$content.parts.map(item=>item.text).join(" ");}).join(" ");isSame=text===trText;break;case OPT_TRANS_CLOUDFLAREAI:trText=res===null||res===void 0?void 0:(_res$result3=res.result)===null||_res$result3===void 0?void 0:_res$result3.translated_text;isSame=text===trText;break;case OPT_TRANS_CUSTOMIZE:trText=res.text;isSame=to===res.from;break;default:}return[trText,isSame,res];}; +if(res.type===1){trText=Object.keys(JSON.parse(res.result).content[0].mean[0].cont)[0];isSame=to===res.from;}else if(res.type===2){trText=res.data.map(item=>item.dst).join(" ");isSame=to===res.from;}break;case OPT_TRANS_TENCENT:trText=res.auto_translation;isSame=text===trText;break;case OPT_TRANS_OPENAI:trText=res===null||res===void 0?void 0:(_res$choices=res.choices)===null||_res$choices===void 0?void 0:_res$choices.map(item=>item.message.content).join(" ");isSame=text===trText;break;case OPT_TRANS_GEMINI:trText=res===null||res===void 0?void 0:(_res$candidates=res.candidates)===null||_res$candidates===void 0?void 0:_res$candidates.map(item=>{var _item$content;return(_item$content=item.content)===null||_item$content===void 0?void 0:_item$content.parts.map(item=>item.text).join(" ");}).join(" ");isSame=text===trText;break;case OPT_TRANS_CLOUDFLAREAI:trText=res===null||res===void 0?void 0:(_res$result3=res.result)===null||_res$result3===void 0?void 0:_res$result3.translated_text;isSame=text===trText;break;case OPT_TRANS_CUSTOMIZE:case OPT_TRANS_CUSTOMIZE_2:case OPT_TRANS_CUSTOMIZE_3:case OPT_TRANS_CUSTOMIZE_4:case OPT_TRANS_CUSTOMIZE_5:trText=res.text;isSame=to===res.from;break;default:}return[trText,isSame,res];}; ;// CONCATENATED MODULE: ./node_modules/.pnpm/webdav@5.3.0/node_modules/webdav/dist/web/index.js /*! For license information please see index.js.LICENSE.txt */ var t = { @@ -22222,7 +22223,7 @@ var web_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":"1.8.5","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE2":"https://kiss-translator.rayjar.com/options","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_LOGOURL2":"https://kiss-translator.rayjar.com/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off.json","REACT_APP_VERSIONFILE":"https://fishjar.github.io/kiss-translator/version.txt","REACT_APP_VERSIONFILE2":"https://kiss-translator.rayjar.com/version.txt","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_DOWNLOADURL2":"https://kiss-translator.rayjar.com/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL2":"https://kiss-translator.rayjar.com/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":"1.8.5","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE2":"https://kiss-translator.rayjar.com/options","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_LOGOURL2":"https://kiss-translator.rayjar.com/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off.json","REACT_APP_VERSIONFILE":"https://fishjar.github.io/kiss-translator/version.txt","REACT_APP_VERSIONFILE2":"https://kiss-translator.rayjar.com/version.txt","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_DOWNLOADURL2":"https://kiss-translator.rayjar.com/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL2":"https://kiss-translator.rayjar.com/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":"1.8.5","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE2":"https://kiss-translator.rayjar.com/options","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_LOGOURL2":"https://kiss-translator.rayjar.com/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off.json","REACT_APP_VERSIONFILE":"https://fishjar.github.io/kiss-translator/version.txt","REACT_APP_VERSIONFILE2":"https://kiss-translator.rayjar.com/version.txt","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_DOWNLOADURL2":"https://kiss-translator.rayjar.com/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL2":"https://kiss-translator.rayjar.com/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":"1.8.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.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off.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":"1.8.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.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off.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":"1.8.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.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off.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; @@ -32305,7 +32306,7 @@ var DarkMode = __webpack_require__(6560); ;// CONCATENATED MODULE: ./src/views/Options/DarkModeButton.js function DarkModeButton(){const{darkMode,toggleDarkMode}=useDarkMode();return/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{onClick:toggleDarkMode,color:"inherit",children:darkMode?/*#__PURE__*/(0,jsx_runtime.jsx)(LightMode/* default */.Z,{}):/*#__PURE__*/(0,jsx_runtime.jsx)(DarkMode/* default */.Z,{})});} ;// CONCATENATED MODULE: ./src/views/Popup/Header.js -function Header(_ref){let{setShowPopup}=_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("1.8.5")})]}),setShowPopup?/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{onClick:()=>{setShowPopup(false);},children:/*#__PURE__*/(0,jsx_runtime.jsx)(Close/* default */.Z,{})}):/*#__PURE__*/(0,jsx_runtime.jsx)(DarkModeButton,{})]});} +function Header(_ref){let{setShowPopup}=_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("1.8.6")})]}),setShowPopup?/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{onClick:()=>{setShowPopup(false);},children:/*#__PURE__*/(0,jsx_runtime.jsx)(Close/* default */.Z,{})}):/*#__PURE__*/(0,jsx_runtime.jsx)(DarkModeButton,{})]});} ;// CONCATENATED MODULE: ./src/libs/iframe.js const isIframe=window.self!==window.top;const sendIframeMsg=(action,args)=>{document.querySelectorAll("iframe").forEach(iframe=>{iframe.contentWindow.postMessage({action,args},"*");});};const sendParentMsg=(action,args)=>{window.parent.postMessage({action,args},"*");}; ;// CONCATENATED MODULE: ./src/libs/subRules.js @@ -32392,7 +32393,7 @@ function LoadingIcon(){return/*#__PURE__*/(0,jsx_runtime.jsx)("span",{style:{dis * @param {*} rule * @param {*} setting * @returns - */function useTranslate(q,rule,setting){const[text,setText]=(0,react.useState)("");const[loading,setLoading]=(0,react.useState)(false);const[sameLang,setSamelang]=(0,react.useState)(false);const{translator,fromLang,toLang,detectRemote,skipLangs=[]}=rule;(0,react.useEffect)(()=>{(async()=>{try{setLoading(true);if(!q.replace(/\[(\d+)\]/g,"").trim()){setText(q);setSamelang(false);return;}const deLang=await tryDetectLang(q,detectRemote==="true");if(deLang&&(toLang.includes(deLang)||skipLangs.includes(deLang))){setSamelang(true);}else{var _setting$transApis;const[trText,isSame]=await apiTranslate({translator,text:q,fromLang,toLang,apiSetting:((_setting$transApis=setting.transApis)===null||_setting$transApis===void 0?void 0:_setting$transApis[translator])||DEFAULT_TRANS_APIS[translator]});setText(trText);setSamelang(isSame);}}catch(err){log_kissLog(err,"translate");}finally{setLoading(false);}})();},[q,translator,fromLang,toLang,detectRemote,skipLangs,setting]);return{text,sameLang,loading};} + */function useTranslate(q,rule,setting){const[text,setText]=(0,react.useState)("");const[loading,setLoading]=(0,react.useState)(false);const[sameLang,setSamelang]=(0,react.useState)(false);const{translator,fromLang,toLang,detectRemote,skipLangs=[]}=rule;(0,react.useEffect)(()=>{(async()=>{try{setLoading(true);if(!q.replace(/\[(\d+)\]/g,"").trim()){setText(q);setSamelang(false);return;}const deLang=await tryDetectLang(q,detectRemote==="true");if(deLang&&(toLang.includes(deLang)||skipLangs.includes(deLang))){setSamelang(true);}else{const[trText,isSame]=await apiTranslate({translator,text:q,fromLang,toLang,apiSetting:{...DEFAULT_TRANS_APIS[translator],...(setting.transApis[translator]||{})}});setText(trText);setSamelang(isSame);}}catch(err){log_kissLog(err,"translate");}finally{setLoading(false);}})();},[q,translator,fromLang,toLang,detectRemote,skipLangs,setting]);return{text,sameLang,loading};} ;// CONCATENATED MODULE: ./src/views/Content/index.js var Content_templateObject,Content_templateObject2,Content_templateObject3,Content_templateObject4,_templateObject5;const LINE_STYLES={[OPT_STYLE_LINE]:"solid",[OPT_STYLE_DOTLINE]:"dotted",[OPT_STYLE_DASHLINE]:"dashed",[OPT_STYLE_WAVYLINE]:"wavy"};const StyledSpan=(0,styled/* default */.ZP)("span")(Content_templateObject||(Content_templateObject=_taggedTemplateLiteral(["\n ","\n"])),_ref=>{let{textStyle,textDiyStyle,bgColor}=_ref;switch(textStyle){case OPT_STYLE_LINE:// 下划线 case OPT_STYLE_DOTLINE:// 点状线 @@ -32472,7 +32473,7 @@ return this._rule;}set rule(rule){// console.log("set rule", rule); this._rule=rule;// 广播消息 const eventName=this._eventName;window.dispatchEvent(new CustomEvent(eventName,{detail:{action:MSG_TRANS_CURRULE,args:rule}}));}} ;// CONCATENATED MODULE: ./src/views/Selection/TranBtn.js -function TranBtn(_ref){let{onClick,position,tranboxSetting}=_ref;const left=position.x+tranboxSetting.btnOffsetX;const top=position.y+tranboxSetting.btnOffsetY;const touchProps=isMobile?{onTouchEnd:onClick}:{onMouseUp:onClick};return/*#__PURE__*/(0,jsx_runtime.jsx)("div",{style:{cursor:"pointer",position:"absolute",left,top,zIndex:2147483647},...touchProps,children:/*#__PURE__*/(0,jsx_runtime.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 32 32",version:"1.1",children:[/*#__PURE__*/(0,jsx_runtime.jsx)("path",{d:"M0 0 C10.56 0 21.12 0 32 0 C32 10.56 32 21.12 32 32 C21.44 32 10.88 32 0 32 C0 21.44 0 10.88 0 0 Z ",fill:"#209CEE",transform:"translate(0,0)"}),/*#__PURE__*/(0,jsx_runtime.jsx)("path",{d:"M0 0 C0.66 0 1.32 0 2 0 C2 2.97 2 5.94 2 9 C2.969375 8.2575 3.93875 7.515 4.9375 6.75 C5.48277344 6.33234375 6.02804688 5.9146875 6.58984375 5.484375 C8.39053593 3.83283924 8.39053593 3.83283924 9 0 C13.95 0 18.9 0 24 0 C24 0.99 24 1.98 24 3 C22.68 3 21.36 3 20 3 C20 9.27 20 15.54 20 22 C19.01 22 18.02 22 17 22 C17 15.73 17 9.46 17 3 C15.35 3 13.7 3 12 3 C11.731875 3.598125 11.46375 4.19625 11.1875 4.8125 C10.01506533 6.97224808 8.80630718 8.35790256 7 10 C8.01790655 12.27071461 8.77442829 13.80784632 10.6875 15.4375 C11.120625 15.953125 11.55375 16.46875 12 17 C11.6875 19.6875 11.6875 19.6875 11 22 C10.34 22 9.68 22 9 22 C8.773125 21.236875 8.54625 20.47375 8.3125 19.6875 C6.73268318 16.45263699 5.16717283 15.58358642 2 14 C2 16.64 2 19.28 2 22 C1.34 22 0.68 22 0 22 C0 14.74 0 7.48 0 0 Z ",fill:"#E9F5FD",transform:"translate(4,5)"})]})});} +function TranBtn(_ref){let{onClick,position,tranboxSetting}=_ref;const left=position.x+tranboxSetting.btnOffsetX;const top=position.y+tranboxSetting.btnOffsetY;const touchProps=isMobile?{onTouchEnd:onClick}:{onMouseUp:onClick};return/*#__PURE__*/(0,jsx_runtime.jsx)("div",{style:{cursor:"pointer",position:"absolute",left,top,zIndex:2147483647},...touchProps,children:/*#__PURE__*/(0,jsx_runtime.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:isMobile?"32":"20",height:isMobile?"32":"20",viewBox:"0 0 32 32",version:"1.1",children:[/*#__PURE__*/(0,jsx_runtime.jsx)("path",{d:"M0 0 C10.56 0 21.12 0 32 0 C32 10.56 32 21.12 32 32 C21.44 32 10.88 32 0 32 C0 21.44 0 10.88 0 0 Z ",fill:"#209CEE",transform:"translate(0,0)"}),/*#__PURE__*/(0,jsx_runtime.jsx)("path",{d:"M0 0 C0.66 0 1.32 0 2 0 C2 2.97 2 5.94 2 9 C2.969375 8.2575 3.93875 7.515 4.9375 6.75 C5.48277344 6.33234375 6.02804688 5.9146875 6.58984375 5.484375 C8.39053593 3.83283924 8.39053593 3.83283924 9 0 C13.95 0 18.9 0 24 0 C24 0.99 24 1.98 24 3 C22.68 3 21.36 3 20 3 C20 9.27 20 15.54 20 22 C19.01 22 18.02 22 17 22 C17 15.73 17 9.46 17 3 C15.35 3 13.7 3 12 3 C11.731875 3.598125 11.46375 4.19625 11.1875 4.8125 C10.01506533 6.97224808 8.80630718 8.35790256 7 10 C8.01790655 12.27071461 8.77442829 13.80784632 10.6875 15.4375 C11.120625 15.953125 11.55375 16.46875 12 17 C11.6875 19.6875 11.6875 19.6875 11 22 C10.34 22 9.68 22 9 22 C8.773125 21.236875 8.54625 20.47375 8.3125 19.6875 C6.73268318 16.45263699 5.16717283 15.58358642 2 14 C2 16.64 2 19.28 2 22 C1.34 22 0.68 22 0 22 C0 14.74 0 7.48 0 0 Z ",fill:"#E9F5FD",transform:"translate(4,5)"})]})});} ;// CONCATENATED MODULE: ./src/views/Selection/DraggableResizable.js function Pointer(_ref){let{direction,size,setSize,position,setPosition,children,minSize,maxSize,...props}=_ref;const[origin,setOrigin]=(0,react.useState)(null);function handlePointerDown(e){!isMobile&&e.target.setPointerCapture(e.pointerId);const{clientX,clientY}=isMobile?e.targetTouches[0]:e;setOrigin({x:position.x,y:position.y,w:size.w,h:size.h,clientX,clientY});}function handlePointerMove(e){const{clientX,clientY}=isMobile?e.targetTouches[0]:e;if(origin){const dx=clientX-origin.clientX;const dy=clientY-origin.clientY;let x=position.x;let y=position.y;let w=size.w;let h=size.h;switch(direction){case"Header":x=origin.x+dx;y=origin.y+dy;break;case"TopLeft":x=origin.x+dx;y=origin.y+dy;w=origin.w-dx;h=origin.h-dy;break;case"Top":y=origin.y+dy;h=origin.h-dy;break;case"TopRight":y=origin.y+dy;w=origin.w+dx;h=origin.h-dy;break;case"Left":x=origin.x+dx;w=origin.w-dx;break;case"Right":w=origin.w+dx;break;case"BottomLeft":x=origin.x+dx;w=origin.w-dx;h=origin.h+dy;break;case"Bottom":h=origin.h+dy;break;case"BottomRight":w=origin.w+dx;h=origin.h+dy;break;default:}if(wmaxSize.w){w=maxSize.w;x=position.x;}if(hmaxSize.h){h=maxSize.h;y=position.y;}setPosition({x,y});setSize({w,h});}}function handlePointerUp(e){e.stopPropagation();setOrigin(null);}const touchProps=isMobile?{onTouchStart:handlePointerDown,onTouchMove:handlePointerMove,onTouchEnd:handlePointerUp}:{onPointerDown:handlePointerDown,onPointerMove:handlePointerMove,onPointerUp:handlePointerUp};return/*#__PURE__*/(0,jsx_runtime.jsx)("div",{...props,...touchProps,children:children});}function DraggableResizable(_ref2){let{header,children,defaultPosition={x:0,y:0},defaultSize={w:600,h:400},minSize={w:300,h:200},maxSize={w:1200,h:1200},onChangeSize,onChangePosition,...props}=_ref2;const lineWidth=4;const[position,setPosition]=(0,react.useState)(defaultPosition);const[size,setSize]=(0,react.useState)(defaultSize);const opts={size,setSize,position,setPosition,minSize,maxSize};(0,react.useEffect)(()=>{onChangeSize&&onChangeSize(size);},[size,onChangeSize]);(0,react.useEffect)(()=>{onChangePosition&&onChangePosition(position);},[position,onChangePosition]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(Box_Box,{style:{touchAction:"none",position:"fixed",left:position.x,top:position.y,display:"grid",gridTemplateColumns:"".concat(lineWidth*2,"px auto ").concat(lineWidth*2,"px"),gridTemplateRows:"".concat(lineWidth*2,"px auto ").concat(lineWidth*2,"px"),zIndex:2147483647},...props,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Pointer,{direction:"TopLeft",style:{transform:"translate(".concat(lineWidth,"px, ").concat(lineWidth,"px)"),cursor:"nw-resize"},...opts}),/*#__PURE__*/(0,jsx_runtime.jsx)(Pointer,{direction:"Top",style:{margin:"0 ".concat(lineWidth,"px"),transform:"translate(0px, ".concat(lineWidth,"px)"),cursor:"row-resize"},...opts}),/*#__PURE__*/(0,jsx_runtime.jsx)(Pointer,{direction:"TopRight",style:{transform:"translate(-".concat(lineWidth,"px, ").concat(lineWidth,"px)"),cursor:"ne-resize"},...opts}),/*#__PURE__*/(0,jsx_runtime.jsx)(Pointer,{direction:"Left",style:{margin:"".concat(lineWidth,"px 0"),transform:"translate(".concat(lineWidth,"px, 0px)"),cursor:"col-resize"},...opts}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Paper_Paper,{elevation:4,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Pointer,{direction:"Header",style:{cursor:"move"},...opts,children:header}),/*#__PURE__*/(0,jsx_runtime.jsx)("div",{style:{width:size.w,height:size.h,overflow:"hidden auto"},children:children})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(Pointer,{direction:"Right",style:{margin:"".concat(lineWidth,"px 0"),transform:"translate(-".concat(lineWidth,"px, 0px)"),cursor:"col-resize"},...opts}),/*#__PURE__*/(0,jsx_runtime.jsx)(Pointer,{direction:"BottomLeft",style:{transform:"translate(".concat(lineWidth,"px, -").concat(lineWidth,"px)"),cursor:"ne-resize"},...opts}),/*#__PURE__*/(0,jsx_runtime.jsx)(Pointer,{direction:"Bottom",style:{margin:"0 ".concat(lineWidth,"px"),transform:"translate(0px, -".concat(lineWidth,"px)"),cursor:"row-resize"},...opts}),/*#__PURE__*/(0,jsx_runtime.jsx)(Pointer,{direction:"BottomRight",style:{transform:"translate(-".concat(lineWidth,"px, -").concat(lineWidth,"px)"),cursor:"nw-resize"},...opts})]});} ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+material@5.14.10_@emotion+react@11.11.1_@emotion+styled@11.11.0_@types+react@18.2.67_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/Grid/GridContext.js @@ -33455,8 +33456,8 @@ function TranForm(_ref){let{text,setText,tranboxSetting,transApis}=_ref;const i1 ;// CONCATENATED MODULE: ./src/views/Selection/index.js function Slection(_ref){let{contextMenuType,tranboxSetting,transApis}=_ref;const boxWidth=limitNumber(window.innerWidth,300,600);const boxHeight=limitNumber(window.innerHeight,200,400);const[showBox,setShowBox]=(0,react.useState)(false);const[showBtn,setShowBtn]=(0,react.useState)(false);const[selectedText,setSelText]=(0,react.useState)("");const[text,setText]=(0,react.useState)("");const[position,setPosition]=(0,react.useState)({x:0,y:0});const[boxSize,setBoxSize]=(0,react.useState)({w:boxWidth,h:boxHeight});const[boxPosition,setBoxPosition]=(0,react.useState)({x:(window.innerWidth-boxWidth)/2,y:(window.innerHeight-boxHeight)/2});const handleClick=e=>{e.stopPropagation();setShowBtn(false);setText(selectedText);setShowBox(true);};const handleTranbox=(0,react.useCallback)(()=>{var _window$getSelection,_window$getSelection$;setShowBtn(false);const selectedText=((_window$getSelection=window.getSelection())===null||_window$getSelection===void 0?void 0:(_window$getSelection$=_window$getSelection.toString())===null||_window$getSelection$===void 0?void 0:_window$getSelection$.trim())||"";if(!selectedText){setShowBox(pre=>!pre);return;}setSelText(selectedText);setText(selectedText);setShowBox(true);},[]);(0,react.useEffect)(()=>{async function handleMouseup(e){var _window$getSelection2,_window$getSelection3;e.stopPropagation();await sleep(10);const selectedText=((_window$getSelection2=window.getSelection())===null||_window$getSelection2===void 0?void 0:(_window$getSelection3=_window$getSelection2.toString())===null||_window$getSelection3===void 0?void 0:_window$getSelection3.trim())||"";setSelText(selectedText);if(!selectedText){setShowBtn(false);return;}const{pageX,pageY}=isMobile?e.changedTouches[0]:e;!tranboxSetting.hideTranBtn&&setShowBtn(true);// setPosition({ x: e.clientX, y: e.clientY }); setPosition({x:pageX,y:pageY});}// todo: mobile support -window.addEventListener("mouseup",handleMouseup);// window.addEventListener(isMobile ? "touchend" : "mouseup", handleMouseup); -return()=>{window.removeEventListener(isMobile?"touchend":"mouseup",handleMouseup);};},[tranboxSetting.hideTranBtn]);(0,react.useEffect)(()=>{if(isExt){return;}const clearShortcut=shortcutRegister(tranboxSetting.tranboxShortcut||DEFAULT_TRANBOX_SHORTCUT,handleTranbox);return()=>{clearShortcut();};},[tranboxSetting.tranboxShortcut,handleTranbox]);(0,react.useEffect)(()=>{window.addEventListener(MSG_OPEN_TRANBOX,handleTranbox);return()=>{window.removeEventListener(MSG_OPEN_TRANBOX,handleTranbox);};},[handleTranbox]);(0,react.useEffect)(()=>{if(!isGm){return;}// 注册菜单 +// window.addEventListener("mouseup", handleMouseup); +window.addEventListener(isMobile?"touchend":"mouseup",handleMouseup);return()=>{window.removeEventListener(isMobile?"touchend":"mouseup",handleMouseup);};},[tranboxSetting.hideTranBtn]);(0,react.useEffect)(()=>{if(isExt){return;}const clearShortcut=shortcutRegister(tranboxSetting.tranboxShortcut||DEFAULT_TRANBOX_SHORTCUT,handleTranbox);return()=>{clearShortcut();};},[tranboxSetting.tranboxShortcut,handleTranbox]);(0,react.useEffect)(()=>{window.addEventListener(MSG_OPEN_TRANBOX,handleTranbox);return()=>{window.removeEventListener(MSG_OPEN_TRANBOX,handleTranbox);};},[handleTranbox]);(0,react.useEffect)(()=>{if(!isGm){return;}// 注册菜单 try{const menuCommandIds=[];contextMenuType!==0&&menuCommandIds.push(GM.registerMenuCommand("Translate Selected Text",event=>{handleTranbox();},"S"));return()=>{menuCommandIds.forEach(id=>{GM.unregisterMenuCommand(id);});};}catch(err){log_kissLog(err,"registerMenuCommand");}},[handleTranbox,contextMenuType]);(0,react.useEffect)(()=>{if(tranboxSetting.hideClickAway){const handleHideBox=()=>{setShowBox(false);};window.addEventListener("click",handleHideBox);return()=>{window.removeEventListener("click",handleHideBox);};}},[tranboxSetting.hideClickAway]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[showBox&&/*#__PURE__*/(0,jsx_runtime.jsx)(TranBox,{text:text,setText:setText,boxSize:boxSize,setBoxSize:setBoxSize,boxPosition:boxPosition,setBoxPosition:setBoxPosition,tranboxSetting:tranboxSetting,transApis:transApis,setShowBox:setShowBox}),showBtn&&/*#__PURE__*/(0,jsx_runtime.jsx)(TranBtn,{position:position,tranboxSetting:tranboxSetting,onClick:handleClick})]});} ;// CONCATENATED MODULE: ./src/libs/touch.js function touchTapListener(fn,touchsLength){const handleTouchend=e=>{if(e.touches.length===touchsLength){fn();}};document.addEventListener("touchstart",handleTouchend);return()=>{document.removeEventListener("touchstart",handleTouchend);};} @@ -33464,7 +33465,7 @@ function touchTapListener(fn,touchsLength){const handleTouchend=e=>{if(e.touches 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:"1.8.5",eventName:ping};};/** + */const injectScript=ping=>{window.APP_INFO={name:"KISS Translator",version:"1.8.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接口的请求 @@ -33487,7 +33488,7 @@ if(getNodeText(node).startsWith(initText)){pasteContentCommand(node,trText);awai ;// 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:"1.8.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:"1.8.6"};}else{const ping=utils_genEventName();window.addEventListener(ping,handlePing);// window.eval(`(${injectScript})("${ping}")`); // eslint-disable-line const script=document.createElement("script");script.textContent="(".concat(injectScript,")(\"").concat(ping,"\")");document.head.append(script);}}/** * 插件监听后端事件 * @param {*} translator @@ -33512,7 +33513,7 @@ const script=document.createElement("script");script.textContent="(".concat(inje */function touchOperation(translator){const{touchTranslate=2}=translator.setting;if(touchTranslate===0){return;}const handleTap=debounce(()=>{translator.toggle();sendIframeMsg(MSG_TRANS_TOGGLE);});touchTapListener(handleTap,touchTranslate);}/** * 入口函数 */async function common_run(){let isUserscript=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;try{const href=document.location.href;// 设置页面 -if(isUserscript&&(href.includes("http://localhost:3000/options.html")||href.includes("https://fishjar.github.io/kiss-translator/options.html")||href.includes("https://kiss-translator.rayjar.com/options"))){runSettingPage();return;}// 读取设置信息 +if(isUserscript&&(href.includes("http://localhost:3000/options.html")||href.includes("https://fishjar.github.io/kiss-translator/options.html"))){runSettingPage();return;}// 读取设置信息 const setting=await getSettingWithDefault();// 黑名单 if(isInBlacklist(href,setting)){return;}// 翻译网页 const rule=await matchRule(href,setting);const translator=new Translator(rule,setting);// 适配iframe diff --git a/kiss-translator.user.js b/kiss-translator.user.js index 265f5db..958647c 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 1.8.5 +// @version 1.8.6 // @description A simple bilingual translation extension & Greasemonkey script (一个简约的双语对照翻译扩展 & 油猴脚本) // @author Gabe // @homepageURL https://github.com/fishjar/kiss-translator @@ -18542,9 +18542,9 @@ fixerFunc:GLOBAL_KEY// 修复函数 ;// CONCATENATED MODULE: ./src/config/app.js const APP_NAME="KISS Translator".trim().split(/\s+/).join("-");const APP_LCNAME=APP_NAME.toLowerCase(); ;// CONCATENATED MODULE: ./src/config/i18n.js -const UI_LANGS=(/* unused pure expression or super */ null && ([["en","English"],["zh","中文"]]));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="/// \u81EA\u5B9A\u4E49\u7FFB\u8BD1\u6E90\u63A5\u53E3\u8BF4\u660E\n\n// \u8BF7\u6C42\uFF08Request\uFF09\u6570\u636E\u5C06\u6309\u4E0B\u9762\u89C4\u8303\u53D1\u9001\n{\n url: {{YOUR_URL}},\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{YOUR_KEY}}\",\n },\n body: {\n text: \"\", // \u9700\u8981\u7FFB\u8BD1\u7684\u6587\u5B57\n from: \"\", // \u6E90\u8BED\u8A00\uFF0C\u53EF\u80FD\u4E3A\u7A7A\uFF0C\u8868\u793A\u9700\u8981\u63A5\u53E3\u81EA\u52A8\u8BC6\u522B\u8BED\u8A00\n to: \"\", // \u76EE\u6807\u8BED\u8A00\n }\n}\n\n// \u8FD4\u56DE\uFF08Response\uFF09\u6570\u636E\u9700\u7B26\u5408\u4E0B\u9762\u7684JSON\u89C4\u8303\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// \u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u5982\u4E0B\n".concat(customApiLangs,"\n");const customApiHelpEN="/// Custom translation source interface description\n\n// Request data will be sent according to the following specifications\n{\n url: {{YOUR_URL}},\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{YOUR_KEY}}\",\n },\n body: {\n text: \"\", // text to be translated\n from: \"\", // Source language, may be empty\n to: \"\", // Target language\n }\n}\n\n// The returned data must conform to the following JSON specification\n{\n text: \"\", // translated text\n from: \"\", // Recognized source language\n to: \"\", // Target language (optional)\n}\n\n// The supported language codes are as follows\n".concat(customApiLangs,"\n");const I18N={app_name:{zh:"\u7B80\u7EA6\u7FFB\u8BD1",en:"KISS Translator"},translate:{zh:"\u7FFB\u8BD1",en:"Translate"},custom_api_help:{zh:customApiHelpZH,en:customApiHelpEN},translate_alt:{zh:"\u7FFB\u8BD1",en:"Translate"},basic_setting:{zh:"\u57FA\u672C\u8BBE\u7F6E",en:"Basic Setting"},rules_setting:{zh:"\u89C4\u5219\u8BBE\u7F6E",en:"Rules Setting"},apis_setting:{zh:"\u63A5\u53E3\u8BBE\u7F6E",en:"Apis Setting"},sync_setting:{zh:"\u540C\u6B65\u8BBE\u7F6E",en:"Sync Setting"},patch_setting:{zh:"\u8865\u4E01\u8BBE\u7F6E",en:"Patch Setting"},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."},inject_webfix:{zh:"\u6CE8\u5165\u4FEE\u590D\u8865\u4E01",en:"Inject Webfix"},about:{zh:"\u5173\u4E8E",en:"About"},about_md:{zh:"README.md",en:"README.en.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.")},ui_lang:{zh:"\u754C\u9762\u8BED\u8A00",en:"Interface Language"},fetch_limit:{zh:"\u6700\u5927\u5E76\u53D1\u8BF7\u6C42\u6570\u91CF (1-100)",en:"Maximum Number Of Concurrent Requests (1-100)"},fetch_interval:{zh:"\u6BCF\u6B21\u8BF7\u6C42\u95F4\u9694\u65F6\u95F4 (0-5000ms)",en:"Time Between Requests (0-5000ms)"},translate_interval:{zh:"\u91CD\u65B0\u7FFB\u8BD1\u95F4\u9694\u65F6\u95F4 (100-5000ms)",en:"Retranslation Interval (100-5000ms)"},min_translate_length:{zh:"\u6700\u5C0F\u7FFB\u8BD1\u5B57\u7B26\u6570 (1-100)",en:"Minimum number Of Translated Characters (1-100)"},max_translate_length:{zh:"\u6700\u5927\u7FFB\u8BD1\u5B57\u7B26\u6570 (100-10000)",en:"Maximum number Of Translated Characters (100-10000)"},num_of_newline_characters:{zh:"\u6362\u884C\u5B57\u7B26\u6570 (1-1000)",en:"Number of Newline Characters (1-1000)"},translate_service:{zh:"\u7FFB\u8BD1\u670D\u52A1",en:"Translate Service"},translate_timing:{zh:"\u7FFB\u8BD1\u65F6\u673A",en:"Translate Timing"},mk_pagescroll:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u7FFB\u8BD1\uFF08\u63A8\u8350\uFF09",en:"Rolling Loading (Suggested)"},mk_pageopen:{zh:"\u9875\u9762\u6253\u5F00\u5168\u90E8\u7FFB\u8BD1",en:"Page Open"},mk_mouseover:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover"},mk_ctrlKey:{zh:"Control + \u9F20\u6807\u60AC\u505C",en:"Control + Mouseover"},mk_shiftKey:{zh:"Shift + \u9F20\u6807\u60AC\u505C",en:"Shift + Mouseover"},mk_altKey:{zh:"Alt + \u9F20\u6807\u60AC\u505C",en:"Alt + Mouseover"},from_lang:{zh:"\u539F\u6587\u8BED\u8A00",en:"Source Language"},to_lang:{zh:"\u76EE\u6807\u8BED\u8A00",en:"Target Language"},to_lang2:{zh:"\u7B2C\u4E8C\u76EE\u6807\u8BED\u8A00",en:"Target Language 2"},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."},text_style:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style"},text_style_alt:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style"},bg_color:{zh:"\u6837\u5F0F\u989C\u8272",en:"Style Color"},remain_unchanged:{zh:"\u4FDD\u7559\u4E0D\u53D8",en:"Remain Unchanged"},google_api:{zh:"\u8C37\u6B4C\u7FFB\u8BD1\u63A5\u53E3",en:"Google Translate API"},default_selector:{zh:"\u9ED8\u8BA4\u9009\u62E9\u5668",en:"Default selector"},selector_rules:{zh:"\u9009\u62E9\u5668\u89C4\u5219",en:"Selector Rules"},save:{zh:"\u4FDD\u5B58",en:"Save"},edit:{zh:"\u7F16\u8F91",en:"Edit"},cancel:{zh:"\u53D6\u6D88",en:"Cancel"},delete:{zh:"\u5220\u9664",en:"Delete"},reset:{zh:"\u91CD\u7F6E",en:"Reset"},add:{zh:"\u6DFB\u52A0",en:"Add"},inject_rules:{zh:"\u6CE8\u5165\u8BA2\u9605\u89C4\u5219",en:"Inject Subscribe Rules"},personal_rules:{zh:"\u4E2A\u4EBA\u89C4\u5219",en:"Rules"},subscribe_rules:{zh:"\u8BA2\u9605\u89C4\u5219",en:"Subscribe"},overwrite_subscribe_rules:{zh:"\u8986\u5199\u8BA2\u9605\u89C4\u5219",en:"Overwrite"},subscribe_url:{zh:"\u8BA2\u9605\u5730\u5740",en:"Subscribe URL"},rules_warn_1:{zh:"1\u3001\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u4E00\u76F4\u751F\u6548\uFF0C\u9009\u62E9\u201C\u6CE8\u5165\u8BA2\u9605\u89C4\u5219\u201D\u540E\uFF0C\u201C\u8BA2\u9605\u89C4\u5219\u201D\u624D\u4F1A\u751F\u6548\u3002",en:"1. The \"Personal Rules\" are always in effect. After selecting \"Inject Subscription Rules\", the \"Subscription Rules\" will take effect."},rules_warn_2:{zh:"2\u3001\u201C\u8BA2\u9605\u89C4\u5219\u201D\u7684\u6CE8\u5165\u4F4D\u7F6E\u662F\u5012\u6570\u7B2C\u4E8C\u7684\u4F4D\u7F6E\uFF0C\u56E0\u6B64\u9664\u5168\u5C40\u89C4\u5219(*)\u5916\uFF0C\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u4F18\u5148\u7EA7\u6BD4\u201C\u8BA2\u9605\u89C4\u5219\u201D\u9AD8\uFF0C\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u586B\u5199\u540C\u6837\u7684\u7F51\u5740\u4F1A\u8986\u76D6\u201D\u8BA2\u9605\u89C4\u5219\u201C\u7684\u6761\u76EE\u3002",en:"2. The injection position of \"Subscription Rules\" is the penultimate position. Therefore, except for the global rules (*), the priority of \"Personal Rules\" is higher than that of \"Subscription Rules\". Filling in the same url in \"Personal Rules\" will overwrite \"Subscription Rules\" entry."},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."},sync_warn:{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."},about_sync_api:{zh:"\u67E5\u770B\u5173\u4E8E\u6570\u636E\u540C\u6B65\u63A5\u53E3\u90E8\u7F72",en:"View About Data Synchronization Interface Deployment"},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"},style_none:{zh:"\u65E0",en:"None"},under_line:{zh:"\u4E0B\u5212\u76F4\u7EBF",en:"Underline"},dot_line:{zh:"\u4E0B\u5212\u70B9\u72B6\u7EBF",en:"Dotted Underline"},dash_line:{zh:"\u4E0B\u5212\u865A\u7EBF",en:"Dashed Underline"},wavy_line:{zh:"\u4E0B\u5212\u6CE2\u6D6A\u7EBF",en:"Wavy Underline"},fuzzy:{zh:"\u6A21\u7CCA",en:"Fuzzy"},highlight:{zh:"\u9AD8\u4EAE",en:"Highlight"},blockquote:{zh:"\u5F15\u7528",en:"Blockquote"},diy_style:{zh:"\u81EA\u5B9A\u4E49\u6837\u5F0F",en:"Custom Style"},diy_style_helper:{zh:"\u9075\u5FAA\u201CCSS\u201D\u7684\u8BED\u6CD5",en:"Follow the syntax of \"CSS\""},setting:{zh:"\u8BBE\u7F6E",en:"Setting"},pattern:{zh:"\u5339\u914D\u7F51\u5740",en:"URL pattern"},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 \",\"."},selector_helper:{zh:"1\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u30022\u3001\u591A\u4E2ACSS\u9009\u62E9\u5668\u4E4B\u95F4\u7528\u201C;\u201D\u9694\u5F00\u30023\u3001\u201Cshadow root\u201D\u9009\u62E9\u5668\u548C\u5185\u90E8\u9009\u62E9\u5668\u7528\u201C>>>\u201D\u9694\u5F00\u3002",en:"1. Follow CSS selector syntax. 2. Separate multiple CSS selectors with \";\". 3. The \"shadow root\" selector and the internal selector are separated by \">>>\"."},translate_switch:{zh:"\u5F00\u542F\u7FFB\u8BD1",en:"Translate Switch"},default_enabled:{zh:"\u9ED8\u8BA4\u5F00\u542F",en:"Enabled"},default_disabled:{zh:"\u9ED8\u8BA4\u5173\u95ED",en:"Disabled"},selector:{zh:"\u9009\u62E9\u5668",en:"Selector"},keep_selector:{zh:"\u4FDD\u7559\u5143\u7D20\u9009\u62E9\u5668",en:"Keep unchanged selector"},keep_selector_helper:{zh:"1\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u30022\u3001\u5B50\u5143\u7D20\u9009\u62E9\u5668\u7528\u201C>>>\u201D\u9694\u5F00\u3002",en:"1. Follow CSS selector syntax. 2. Sub-element selectors are separated by \">>>\"."},terms:{zh:"\u4E13\u4E1A\u672F\u8BED",en:"Terms"},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."},selector_style:{zh:"\u9009\u62E9\u5668\u8282\u70B9\u6837\u5F0F",en:"Selector Style"},selector_style_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u4E0D\u4F1A\u79FB\u9664\u3002",en:"It is injected when translation is turned on and will not be removed when translation is turned off."},selector_parent_style:{zh:"\u9009\u62E9\u5668\u7236\u8282\u70B9\u6837\u5F0F",en:"Selector Parent Style"},inject_js:{zh:"\u6CE8\u5165JS",en:"Inject JS"},inject_js_helper:{zh:"1\u3001\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\u8FD0\u884C\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u79FB\u9664\u30022\u3001\u968F\u7740\u9875\u9762\u53D8\u5316\uFF0C\u53EF\u80FD\u4F1A\u591A\u6B21\u6CE8\u5165\u8FD0\u884C\u3002",en:"1. Inject and run when translation is turned on, and removed when translation is turned off. 2. As the page changes, it may be injected and run multiple times."},inject_css:{zh:"\u6CE8\u5165CSS",en:"Inject CSS"},inject_css_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u5C06\u79FB\u9664\u3002",en:"Injected when translation is enabled and removed when translation is disabled."},root_selector:{zh:"\u6839\u9009\u62E9\u5668",en:"Root Selector"},fixer_function:{zh:"\u4FEE\u590D\u51FD\u6570",en:"Fixer Function"},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

."},import:{zh:"\u5BFC\u5165",en:"Import"},export:{zh:"\u5BFC\u51FA",en:"Export"},error_cant_be_blank:{zh:"\u4E0D\u80FD\u4E3A\u7A7A",en:"Can not be blank"},error_duplicate_values:{zh:"\u5B58\u5728\u91CD\u590D\u7684\u503C",en:"There are duplicate values"},error_wrong_file_type:{zh:"\u9519\u8BEF\u7684\u6587\u4EF6\u7C7B\u578B",en:"Wrong file type"},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."},deepl_api:{zh:"DeepL \u63A5\u53E3",en:"DeepL API"},deepl_key:{zh:"DeepL \u5BC6\u94A5",en:"DeepL Key"},openai_api:{zh:"OpenAI \u63A5\u53E3",en:"OpenAI API"},openai_key:{zh:"OpenAI \u5BC6\u94A5",en:"OpenAI Key"},openai_model:{zh:"OpenAI \u6A21\u578B",en:"OpenAI Model"},openai_prompt:{zh:"OpenAI \u63D0\u793A\u8BCD",en:"OpenAI Prompt"},if_clear_cache:{zh:"\u662F\u5426\u6E05\u9664\u7F13\u5B58",en:"Whether clear cache"},clear_cache_never:{zh:"\u4E0D\u6E05\u9664\u7F13\u5B58",en:"Never clear cache"},clear_cache_restart:{zh:"\u91CD\u542F\u6D4F\u89C8\u5668\u65F6\u6E05\u9664\u7F13\u5B58",en:"Clear cache when restarting browser"},data_sync_type:{zh:"\u6570\u636E\u540C\u6B65\u65B9\u5F0F",en:"Data Sync Type"},data_sync_url:{zh:"\u6570\u636E\u540C\u6B65\u63A5\u53E3",en:"Data Sync API"},data_sync_user:{zh:"\u6570\u636E\u540C\u6B65\u8D26\u6237",en:"Data Sync User"},data_sync_key:{zh:"\u6570\u636E\u540C\u6B65\u5BC6\u94A5",en:"Data Sync Key"},sync_now:{zh:"\u7ACB\u5373\u540C\u6B65",en:"Sync Now"},sync_success:{zh:"\u540C\u6B65\u6210\u529F\uFF01",en:"Sync Success"},sync_failed:{zh:"\u540C\u6B65\u5931\u8D25\uFF01",en:"Sync Error"},error_got_some_wrong:{zh:"\u62B1\u6B49\uFF0C\u51FA\u9519\u4E86\uFF01",en:"Sorry, something went wrong!"},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"},click_test:{zh:"\u70B9\u51FB\u6D4B\u8BD5",en:"Click Test"},test_success:{zh:"\u6D4B\u8BD5\u6210\u529F",en:"Test success"},test_failed:{zh:"\u6D4B\u8BD5\u5931\u8D25",en:"Test failed"},clear_all_cache_now:{zh:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u7F13\u5B58",en:"Clear all cache now"},clear_cache:{zh:"\u6E05\u9664\u7F13\u5B58",en:"Clear Cache"},clear_success:{zh:"\u6E05\u9664\u6210\u529F",en:"Clear success"},clear_failed:{zh:"\u6E05\u9664\u5931\u8D25",en:"Clear failed"},share:{zh:"\u5206\u4EAB",en:"Share"},clear_all:{zh:"\u6E05\u7A7A",en:"Clear All"},help:{zh:"\u6C42\u52A9",en:"Help"},restore_default:{zh:"\u6062\u590D\u9ED8\u8BA4",en:"Restore Default"},shortcuts_setting:{zh:"\u5FEB\u6377\u952E\u8BBE\u7F6E",en:"Shortcuts Setting"},toggle_translate_shortcut:{zh:"\"\u5F00\u542F\u7FFB\u8BD1\"\u5FEB\u6377\u952E",en:"\"Toggle Translate\" Shortcut"},toggle_style_shortcut:{zh:"\"\u5207\u6362\u6837\u5F0F\"\u5FEB\u6377\u952E",en:"\"Toggle Style\" Shortcut"},toggle_popup_shortcut:{zh:"\"\u6253\u5F00\u5F39\u7A97\"\u5FEB\u6377\u952E",en:"\"Open Popup\" Shortcut"},open_setting_shortcut:{zh:"\"\u6253\u5F00\u8BBE\u7F6E\"\u5FEB\u6377\u952E",en:"\"Open Setting\" Shortcut"},hide_fab_button:{zh:"\u9690\u85CF\u60AC\u6D6E\u6309\u94AE",en:"Hide Fab Button"},hide_tran_button:{zh:"\u9690\u85CF\u7FFB\u8BD1\u6309\u94AE",en:"Hide Translate Button"},hide_click_away:{zh:"\u70B9\u51FB\u5916\u90E8\u5173\u95ED\u5F39\u7A97",en:"Click outside to close the pop-up window"},show:{zh:"\u663E\u793A",en:"Show"},hide:{zh:"\u9690\u85CF",en:"Hide"},save_rule:{zh:"\u4FDD\u5B58\u89C4\u5219",en:"Save Rule"},global_rule:{zh:"\u5168\u5C40\u89C4\u5219",en:"Global Rule"},input_translate:{zh:"\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation"},use_input_box_translation:{zh:"\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation"},input_selector:{zh:"\u8F93\u5165\u6846\u9009\u62E9\u5668",en:"Input Selector"},input_selector_helper:{zh:"\u7528\u4E8E\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",en:"Used for input box translation."},trigger_trans_shortcut:{zh:"\u89E6\u53D1\u7FFB\u8BD1\u5FEB\u6377\u952E",en:"Trigger Translation Shortcut Keys"},trigger_trans_shortcut_help:{zh:"\u9ED8\u8BA4\u4E3A\u5355\u51FB\u201CAltLeft+KeyI\u201D",en:"Default is \"AltLeft+KeyI\""},shortcut_press_count:{zh:"\u5FEB\u6377\u952E\u8FDE\u51FB\u6B21\u6570",en:"Shortcut Press Number"},combo_timeout:{zh:"\u8FDE\u51FB\u8D85\u65F6\u65F6\u95F4 (10-1000ms)",en:"Combo Timeout (10-1000ms)"},input_trans_start_sign:{zh:"\u7FFB\u8BD1\u8D77\u59CB\u6807\u8BC6",en:"Translation Start Sign"},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\""},detect_lang_remote:{zh:"\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B",en:"Remote language detection"},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."},disable:{zh:"\u7981\u7528",en:"Disable"},enable:{zh:"\u542F\u7528",en:"Enable"},selection_translate:{zh:"\u5212\u8BCD\u7FFB\u8BD1",en:"Selection Translate"},toggle_selection_translate:{zh:"\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"Use Selection Translate"},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"},tranbtn_offset_x:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBX\uFF080-100\uFF09",en:"Translate Button Offset X (0-100)"},tranbtn_offset_y:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBY\uFF080-100\uFF09",en:"Translate Button Offset Y (0-100)"},translated_text:{zh:"\u8BD1\u6587",en:"Translated Text"},original_text:{zh:"\u539F\u6587",en:"Original Text"},favorite_words:{zh:"\u6536\u85CF\u8BCD\u6C47",en:"Favorite Words"},touch_setting:{zh:"\u89E6\u5C4F\u8BBE\u7F6E",en:"Touch Setting"},touch_translate_shortcut:{zh:"\u89E6\u5C4F\u7FFB\u8BD1\u5FEB\u6377\u65B9\u5F0F",en:"Touch Translate Shortcut"},touch_tap_0:{zh:"\u7981\u7528",en:"Disable"},touch_tap_2:{zh:"\u53CC\u6307\u8F7B\u89E6",en:"Two finger tap"},touch_tap_3:{zh:"\u4E09\u6307\u8F7B\u89E6",en:"Three finger tap"},touch_tap_4:{zh:"\u56DB\u6307\u8F7B\u89E6",en:"Four finger tap"},translate_blacklist:{zh:"\u7981\u7528\u7FFB\u8BD1\u540D\u5355",en:"Translate Blacklist"},disabled_csplist:{zh:"\u7981\u7528CSP\u540D\u5355",en:"Disabled CSP List"},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."},skip_langs:{zh:"\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",en:"Disable Languages"},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."},context_menus:{zh:"\u53F3\u952E\u83DC\u5355",en:"Context Menus"},hide_context_menus:{zh:"\u9690\u85CF\u53F3\u952E\u83DC\u5355",en:"Hide Context Menus"},simple_context_menus:{zh:"\u7B80\u5355\u53F3\u952E\u83DC\u5355",en:"Simple_context_menus Context Menus"},secondary_context_menus:{zh:"\u4E8C\u7EA7\u53F3\u952E\u83DC\u5355",en:"Secondary Context Menus"},mulkeys_help:{zh:"\u652F\u6301\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\u591A\u4E2AKEY\u8F6E\u8BE2\u8C03\u7528\u3002",en:"Supports multiple KEY polling calls separated by newlines or English commas \",\"."},translation_element_tag:{zh:"\u8BD1\u6587\u5143\u7D20\u6807\u7B7E",en:"Translation Element Tag"},show_only_translations:{zh:"\u4EC5\u663E\u793A\u8BD1\u6587",en:"Show Only Translations"},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."},translate_page_title:{zh:"\u662F\u5426\u7FFB\u8BD1\u9875\u9762\u6807\u9898",en:"Translate Page Title"},more:{zh:"\u66F4\u591A",en:"More"},fixer_selector:{zh:"\u7F51\u9875\u4FEE\u590D\u9009\u62E9\u5668",en:"Fixer Selector"}}; +const UI_LANGS=(/* unused pure expression or super */ null && ([["en","English"],["zh","中文"]]));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="/// \u81EA\u5B9A\u4E49\u7FFB\u8BD1\u6E90\u63A5\u53E3\u8BF4\u660E\n\n// \u8BF7\u6C42\uFF08Request\uFF09\u6570\u636E\u5C06\u6309\u4E0B\u9762\u89C4\u8303\u53D1\u9001\n{\n url: {{YOUR_URL}},\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{YOUR_KEY}}\",\n },\n body: {\n text: \"\", // \u9700\u8981\u7FFB\u8BD1\u7684\u6587\u5B57\n from: \"\", // \u6E90\u8BED\u8A00\uFF0C\u53EF\u80FD\u4E3A\u7A7A\uFF0C\u8868\u793A\u9700\u8981\u63A5\u53E3\u81EA\u52A8\u8BC6\u522B\u8BED\u8A00\n to: \"\", // \u76EE\u6807\u8BED\u8A00\n }\n}\n\n// \u8FD4\u56DE\uFF08Response\uFF09\u6570\u636E\u9700\u7B26\u5408\u4E0B\u9762\u7684JSON\u89C4\u8303\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// \u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u5982\u4E0B\n".concat(customApiLangs,"\n");const customApiHelpEN="/// Custom translation source interface description\n\n// Request data will be sent according to the following specifications\n{\n url: {{YOUR_URL}},\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{YOUR_KEY}}\",\n },\n body: {\n text: \"\", // text to be translated\n from: \"\", // Source language, may be empty\n to: \"\", // Target language\n }\n}\n\n// The returned data must conform to the following JSON specification\n{\n text: \"\", // translated text\n from: \"\", // Recognized source language\n to: \"\", // Target language (optional)\n}\n\n// The supported language codes are as follows\n".concat(customApiLangs,"\n");const I18N={app_name:{zh:"\u7B80\u7EA6\u7FFB\u8BD1",en:"KISS Translator"},translate:{zh:"\u7FFB\u8BD1",en:"Translate"},custom_api_help:{zh:customApiHelpZH,en:customApiHelpEN},translate_alt:{zh:"\u7FFB\u8BD1",en:"Translate"},basic_setting:{zh:"\u57FA\u672C\u8BBE\u7F6E",en:"Basic Setting"},rules_setting:{zh:"\u89C4\u5219\u8BBE\u7F6E",en:"Rules Setting"},apis_setting:{zh:"\u63A5\u53E3\u8BBE\u7F6E",en:"Apis Setting"},sync_setting:{zh:"\u540C\u6B65\u8BBE\u7F6E",en:"Sync Setting"},patch_setting:{zh:"\u8865\u4E01\u8BBE\u7F6E",en:"Patch Setting"},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."},inject_webfix:{zh:"\u6CE8\u5165\u4FEE\u590D\u8865\u4E01",en:"Inject Webfix"},about:{zh:"\u5173\u4E8E",en:"About"},about_md:{zh:"README.md",en:"README.en.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.")},ui_lang:{zh:"\u754C\u9762\u8BED\u8A00",en:"Interface Language"},fetch_limit:{zh:"\u6700\u5927\u5E76\u53D1\u8BF7\u6C42\u6570\u91CF (1-100)",en:"Maximum Number Of Concurrent Requests (1-100)"},fetch_interval:{zh:"\u6BCF\u6B21\u8BF7\u6C42\u95F4\u9694\u65F6\u95F4 (0-5000ms)",en:"Time Between Requests (0-5000ms)"},translate_interval:{zh:"\u91CD\u65B0\u7FFB\u8BD1\u95F4\u9694\u65F6\u95F4 (100-5000ms)",en:"Retranslation Interval (100-5000ms)"},min_translate_length:{zh:"\u6700\u5C0F\u7FFB\u8BD1\u5B57\u7B26\u6570 (1-100)",en:"Minimum number Of Translated Characters (1-100)"},max_translate_length:{zh:"\u6700\u5927\u7FFB\u8BD1\u5B57\u7B26\u6570 (100-10000)",en:"Maximum number Of Translated Characters (100-10000)"},num_of_newline_characters:{zh:"\u6362\u884C\u5B57\u7B26\u6570 (1-1000)",en:"Number of Newline Characters (1-1000)"},translate_service:{zh:"\u7FFB\u8BD1\u670D\u52A1",en:"Translate Service"},translate_timing:{zh:"\u7FFB\u8BD1\u65F6\u673A",en:"Translate Timing"},mk_pagescroll:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u7FFB\u8BD1\uFF08\u63A8\u8350\uFF09",en:"Rolling Loading (Suggested)"},mk_pageopen:{zh:"\u9875\u9762\u6253\u5F00\u5168\u90E8\u7FFB\u8BD1",en:"Page Open"},mk_mouseover:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover"},mk_ctrlKey:{zh:"Control + \u9F20\u6807\u60AC\u505C",en:"Control + Mouseover"},mk_shiftKey:{zh:"Shift + \u9F20\u6807\u60AC\u505C",en:"Shift + Mouseover"},mk_altKey:{zh:"Alt + \u9F20\u6807\u60AC\u505C",en:"Alt + Mouseover"},from_lang:{zh:"\u539F\u6587\u8BED\u8A00",en:"Source Language"},to_lang:{zh:"\u76EE\u6807\u8BED\u8A00",en:"Target Language"},to_lang2:{zh:"\u7B2C\u4E8C\u76EE\u6807\u8BED\u8A00",en:"Target Language 2"},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."},text_style:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style"},text_style_alt:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style"},bg_color:{zh:"\u6837\u5F0F\u989C\u8272",en:"Style Color"},remain_unchanged:{zh:"\u4FDD\u7559\u4E0D\u53D8",en:"Remain Unchanged"},google_api:{zh:"\u8C37\u6B4C\u7FFB\u8BD1\u63A5\u53E3",en:"Google Translate API"},default_selector:{zh:"\u9ED8\u8BA4\u9009\u62E9\u5668",en:"Default selector"},selector_rules:{zh:"\u9009\u62E9\u5668\u89C4\u5219",en:"Selector Rules"},save:{zh:"\u4FDD\u5B58",en:"Save"},edit:{zh:"\u7F16\u8F91",en:"Edit"},cancel:{zh:"\u53D6\u6D88",en:"Cancel"},delete:{zh:"\u5220\u9664",en:"Delete"},reset:{zh:"\u91CD\u7F6E",en:"Reset"},add:{zh:"\u6DFB\u52A0",en:"Add"},inject_rules:{zh:"\u6CE8\u5165\u8BA2\u9605\u89C4\u5219",en:"Inject Subscribe Rules"},personal_rules:{zh:"\u4E2A\u4EBA\u89C4\u5219",en:"Rules"},subscribe_rules:{zh:"\u8BA2\u9605\u89C4\u5219",en:"Subscribe"},overwrite_subscribe_rules:{zh:"\u8986\u5199\u8BA2\u9605\u89C4\u5219",en:"Overwrite"},subscribe_url:{zh:"\u8BA2\u9605\u5730\u5740",en:"Subscribe URL"},rules_warn_1:{zh:"1\u3001\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u4E00\u76F4\u751F\u6548\uFF0C\u9009\u62E9\u201C\u6CE8\u5165\u8BA2\u9605\u89C4\u5219\u201D\u540E\uFF0C\u201C\u8BA2\u9605\u89C4\u5219\u201D\u624D\u4F1A\u751F\u6548\u3002",en:"1. The \"Personal Rules\" are always in effect. After selecting \"Inject Subscription Rules\", the \"Subscription Rules\" will take effect."},rules_warn_2:{zh:"2\u3001\u201C\u8BA2\u9605\u89C4\u5219\u201D\u7684\u6CE8\u5165\u4F4D\u7F6E\u662F\u5012\u6570\u7B2C\u4E8C\u7684\u4F4D\u7F6E\uFF0C\u56E0\u6B64\u9664\u5168\u5C40\u89C4\u5219(*)\u5916\uFF0C\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u4F18\u5148\u7EA7\u6BD4\u201C\u8BA2\u9605\u89C4\u5219\u201D\u9AD8\uFF0C\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u586B\u5199\u540C\u6837\u7684\u7F51\u5740\u4F1A\u8986\u76D6\u201D\u8BA2\u9605\u89C4\u5219\u201C\u7684\u6761\u76EE\u3002",en:"2. The injection position of \"Subscription Rules\" is the penultimate position. Therefore, except for the global rules (*), the priority of \"Personal Rules\" is higher than that of \"Subscription Rules\". Filling in the same url in \"Personal Rules\" will overwrite \"Subscription Rules\" entry."},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."},sync_warn:{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."},about_sync_api:{zh:"\u67E5\u770B\u5173\u4E8E\u6570\u636E\u540C\u6B65\u63A5\u53E3\u90E8\u7F72",en:"View About Data Synchronization Interface Deployment"},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"},style_none:{zh:"\u65E0",en:"None"},under_line:{zh:"\u4E0B\u5212\u76F4\u7EBF",en:"Underline"},dot_line:{zh:"\u4E0B\u5212\u70B9\u72B6\u7EBF",en:"Dotted Underline"},dash_line:{zh:"\u4E0B\u5212\u865A\u7EBF",en:"Dashed Underline"},wavy_line:{zh:"\u4E0B\u5212\u6CE2\u6D6A\u7EBF",en:"Wavy Underline"},fuzzy:{zh:"\u6A21\u7CCA",en:"Fuzzy"},highlight:{zh:"\u9AD8\u4EAE",en:"Highlight"},blockquote:{zh:"\u5F15\u7528",en:"Blockquote"},diy_style:{zh:"\u81EA\u5B9A\u4E49\u6837\u5F0F",en:"Custom Style"},diy_style_helper:{zh:"\u9075\u5FAA\u201CCSS\u201D\u7684\u8BED\u6CD5",en:"Follow the syntax of \"CSS\""},setting:{zh:"\u8BBE\u7F6E",en:"Setting"},pattern:{zh:"\u5339\u914D\u7F51\u5740",en:"URL pattern"},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 \",\"."},selector_helper:{zh:"1\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u30022\u3001\u591A\u4E2ACSS\u9009\u62E9\u5668\u4E4B\u95F4\u7528\u201C;\u201D\u9694\u5F00\u30023\u3001\u201Cshadow root\u201D\u9009\u62E9\u5668\u548C\u5185\u90E8\u9009\u62E9\u5668\u7528\u201C>>>\u201D\u9694\u5F00\u3002",en:"1. Follow CSS selector syntax. 2. Separate multiple CSS selectors with \";\". 3. The \"shadow root\" selector and the internal selector are separated by \">>>\"."},translate_switch:{zh:"\u5F00\u542F\u7FFB\u8BD1",en:"Translate Switch"},default_enabled:{zh:"\u9ED8\u8BA4\u5F00\u542F",en:"Enabled"},default_disabled:{zh:"\u9ED8\u8BA4\u5173\u95ED",en:"Disabled"},selector:{zh:"\u9009\u62E9\u5668",en:"Selector"},keep_selector:{zh:"\u4FDD\u7559\u5143\u7D20\u9009\u62E9\u5668",en:"Keep unchanged selector"},keep_selector_helper:{zh:"1\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u30022\u3001\u5B50\u5143\u7D20\u9009\u62E9\u5668\u7528\u201C>>>\u201D\u9694\u5F00\u3002",en:"1. Follow CSS selector syntax. 2. Sub-element selectors are separated by \">>>\"."},terms:{zh:"\u4E13\u4E1A\u672F\u8BED",en:"Terms"},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."},selector_style:{zh:"\u9009\u62E9\u5668\u8282\u70B9\u6837\u5F0F",en:"Selector Style"},selector_style_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u4E0D\u4F1A\u79FB\u9664\u3002",en:"It is injected when translation is turned on and will not be removed when translation is turned off."},selector_parent_style:{zh:"\u9009\u62E9\u5668\u7236\u8282\u70B9\u6837\u5F0F",en:"Selector Parent Style"},inject_js:{zh:"\u6CE8\u5165JS",en:"Inject JS"},inject_js_helper:{zh:"1\u3001\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\u8FD0\u884C\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u79FB\u9664\u30022\u3001\u968F\u7740\u9875\u9762\u53D8\u5316\uFF0C\u53EF\u80FD\u4F1A\u591A\u6B21\u6CE8\u5165\u8FD0\u884C\u3002",en:"1. Inject and run when translation is turned on, and removed when translation is turned off. 2. As the page changes, it may be injected and run multiple times."},inject_css:{zh:"\u6CE8\u5165CSS",en:"Inject CSS"},inject_css_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u5C06\u79FB\u9664\u3002",en:"Injected when translation is enabled and removed when translation is disabled."},root_selector:{zh:"\u6839\u9009\u62E9\u5668",en:"Root Selector"},fixer_function:{zh:"\u4FEE\u590D\u51FD\u6570",en:"Fixer Function"},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

."},import:{zh:"\u5BFC\u5165",en:"Import"},export:{zh:"\u5BFC\u51FA",en:"Export"},error_cant_be_blank:{zh:"\u4E0D\u80FD\u4E3A\u7A7A",en:"Can not be blank"},error_duplicate_values:{zh:"\u5B58\u5728\u91CD\u590D\u7684\u503C",en:"There are duplicate values"},error_wrong_file_type:{zh:"\u9519\u8BEF\u7684\u6587\u4EF6\u7C7B\u578B",en:"Wrong file type"},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."},deepl_api:{zh:"DeepL \u63A5\u53E3",en:"DeepL API"},deepl_key:{zh:"DeepL \u5BC6\u94A5",en:"DeepL Key"},openai_api:{zh:"OpenAI \u63A5\u53E3",en:"OpenAI API"},openai_key:{zh:"OpenAI \u5BC6\u94A5",en:"OpenAI Key"},openai_model:{zh:"OpenAI \u6A21\u578B",en:"OpenAI Model"},openai_prompt:{zh:"OpenAI \u63D0\u793A\u8BCD",en:"OpenAI Prompt"},if_clear_cache:{zh:"\u662F\u5426\u6E05\u9664\u7F13\u5B58",en:"Whether clear cache"},clear_cache_never:{zh:"\u4E0D\u6E05\u9664\u7F13\u5B58",en:"Never clear cache"},clear_cache_restart:{zh:"\u91CD\u542F\u6D4F\u89C8\u5668\u65F6\u6E05\u9664\u7F13\u5B58",en:"Clear cache when restarting browser"},data_sync_type:{zh:"\u6570\u636E\u540C\u6B65\u65B9\u5F0F",en:"Data Sync Type"},data_sync_url:{zh:"\u6570\u636E\u540C\u6B65\u63A5\u53E3",en:"Data Sync API"},data_sync_user:{zh:"\u6570\u636E\u540C\u6B65\u8D26\u6237",en:"Data Sync User"},data_sync_key:{zh:"\u6570\u636E\u540C\u6B65\u5BC6\u94A5",en:"Data Sync Key"},sync_now:{zh:"\u7ACB\u5373\u540C\u6B65",en:"Sync Now"},sync_success:{zh:"\u540C\u6B65\u6210\u529F\uFF01",en:"Sync Success"},sync_failed:{zh:"\u540C\u6B65\u5931\u8D25\uFF01",en:"Sync Error"},error_got_some_wrong:{zh:"\u62B1\u6B49\uFF0C\u51FA\u9519\u4E86\uFF01",en:"Sorry, something went wrong!"},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"},click_test:{zh:"\u70B9\u51FB\u6D4B\u8BD5",en:"Click Test"},test_success:{zh:"\u6D4B\u8BD5\u6210\u529F",en:"Test success"},test_failed:{zh:"\u6D4B\u8BD5\u5931\u8D25",en:"Test failed"},clear_all_cache_now:{zh:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u7F13\u5B58",en:"Clear all cache now"},clear_cache:{zh:"\u6E05\u9664\u7F13\u5B58",en:"Clear Cache"},clear_success:{zh:"\u6E05\u9664\u6210\u529F",en:"Clear success"},clear_failed:{zh:"\u6E05\u9664\u5931\u8D25",en:"Clear failed"},share:{zh:"\u5206\u4EAB",en:"Share"},clear_all:{zh:"\u6E05\u7A7A",en:"Clear All"},help:{zh:"\u6C42\u52A9",en:"Help"},restore_default:{zh:"\u6062\u590D\u9ED8\u8BA4",en:"Restore Default"},shortcuts_setting:{zh:"\u5FEB\u6377\u952E\u8BBE\u7F6E",en:"Shortcuts Setting"},toggle_translate_shortcut:{zh:"\"\u5F00\u542F\u7FFB\u8BD1\"\u5FEB\u6377\u952E",en:"\"Toggle Translate\" Shortcut"},toggle_style_shortcut:{zh:"\"\u5207\u6362\u6837\u5F0F\"\u5FEB\u6377\u952E",en:"\"Toggle Style\" Shortcut"},toggle_popup_shortcut:{zh:"\"\u6253\u5F00\u5F39\u7A97\"\u5FEB\u6377\u952E",en:"\"Open Popup\" Shortcut"},open_setting_shortcut:{zh:"\"\u6253\u5F00\u8BBE\u7F6E\"\u5FEB\u6377\u952E",en:"\"Open Setting\" Shortcut"},hide_fab_button:{zh:"\u9690\u85CF\u60AC\u6D6E\u6309\u94AE",en:"Hide Fab Button"},hide_tran_button:{zh:"\u9690\u85CF\u7FFB\u8BD1\u6309\u94AE",en:"Hide Translate Button"},hide_click_away:{zh:"\u70B9\u51FB\u5916\u90E8\u5173\u95ED\u5F39\u7A97",en:"Click outside to close the pop-up window"},show:{zh:"\u663E\u793A",en:"Show"},hide:{zh:"\u9690\u85CF",en:"Hide"},save_rule:{zh:"\u4FDD\u5B58\u89C4\u5219",en:"Save Rule"},global_rule:{zh:"\u5168\u5C40\u89C4\u5219",en:"Global Rule"},input_translate:{zh:"\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation"},use_input_box_translation:{zh:"\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation"},input_selector:{zh:"\u8F93\u5165\u6846\u9009\u62E9\u5668",en:"Input Selector"},input_selector_helper:{zh:"\u7528\u4E8E\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",en:"Used for input box translation."},trigger_trans_shortcut:{zh:"\u89E6\u53D1\u7FFB\u8BD1\u5FEB\u6377\u952E",en:"Trigger Translation Shortcut Keys"},trigger_trans_shortcut_help:{zh:"\u9ED8\u8BA4\u4E3A\u5355\u51FB\u201CAltLeft+KeyI\u201D",en:"Default is \"AltLeft+KeyI\""},shortcut_press_count:{zh:"\u5FEB\u6377\u952E\u8FDE\u51FB\u6B21\u6570",en:"Shortcut Press Number"},combo_timeout:{zh:"\u8FDE\u51FB\u8D85\u65F6\u65F6\u95F4 (10-1000ms)",en:"Combo Timeout (10-1000ms)"},input_trans_start_sign:{zh:"\u7FFB\u8BD1\u8D77\u59CB\u6807\u8BC6",en:"Translation Start Sign"},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\""},detect_lang_remote:{zh:"\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B",en:"Remote language detection"},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."},disable:{zh:"\u7981\u7528",en:"Disable"},enable:{zh:"\u542F\u7528",en:"Enable"},selection_translate:{zh:"\u5212\u8BCD\u7FFB\u8BD1",en:"Selection Translate"},toggle_selection_translate:{zh:"\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"Use Selection Translate"},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"},tranbtn_offset_x:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBX\uFF080-100\uFF09",en:"Translate Button Offset X (0-100)"},tranbtn_offset_y:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBY\uFF080-100\uFF09",en:"Translate Button Offset Y (0-100)"},translated_text:{zh:"\u8BD1\u6587",en:"Translated Text"},original_text:{zh:"\u539F\u6587",en:"Original Text"},favorite_words:{zh:"\u6536\u85CF\u8BCD\u6C47",en:"Favorite Words"},touch_setting:{zh:"\u89E6\u5C4F\u8BBE\u7F6E",en:"Touch Setting"},touch_translate_shortcut:{zh:"\u89E6\u5C4F\u7FFB\u8BD1\u5FEB\u6377\u65B9\u5F0F",en:"Touch Translate Shortcut"},touch_tap_0:{zh:"\u7981\u7528",en:"Disable"},touch_tap_2:{zh:"\u53CC\u6307\u8F7B\u89E6",en:"Two finger tap"},touch_tap_3:{zh:"\u4E09\u6307\u8F7B\u89E6",en:"Three finger tap"},touch_tap_4:{zh:"\u56DB\u6307\u8F7B\u89E6",en:"Four finger tap"},translate_blacklist:{zh:"\u7981\u7528\u7FFB\u8BD1\u540D\u5355",en:"Translate Blacklist"},disabled_csplist:{zh:"\u7981\u7528CSP\u540D\u5355",en:"Disabled CSP List"},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."},skip_langs:{zh:"\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",en:"Disable Languages"},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."},context_menus:{zh:"\u53F3\u952E\u83DC\u5355",en:"Context Menus"},hide_context_menus:{zh:"\u9690\u85CF\u53F3\u952E\u83DC\u5355",en:"Hide Context Menus"},simple_context_menus:{zh:"\u7B80\u5355\u53F3\u952E\u83DC\u5355",en:"Simple_context_menus Context Menus"},secondary_context_menus:{zh:"\u4E8C\u7EA7\u53F3\u952E\u83DC\u5355",en:"Secondary Context Menus"},mulkeys_help:{zh:"\u652F\u6301\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\u591A\u4E2AKEY\u8F6E\u8BE2\u8C03\u7528\u3002",en:"Supports multiple KEY polling calls separated by newlines or English commas \",\"."},translation_element_tag:{zh:"\u8BD1\u6587\u5143\u7D20\u6807\u7B7E",en:"Translation Element Tag"},show_only_translations:{zh:"\u4EC5\u663E\u793A\u8BD1\u6587",en:"Show Only Translations"},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."},translate_page_title:{zh:"\u662F\u5426\u7FFB\u8BD1\u9875\u9762\u6807\u9898",en:"Translate Page Title"},more:{zh:"\u66F4\u591A",en:"More"},fixer_selector:{zh:"\u7F51\u9875\u4FEE\u590D\u9009\u62E9\u5668",en:"Fixer Selector"},reg_niutrans:{zh:"\u83B7\u53D6\u5C0F\u725B\u7FFB\u8BD1\u5BC6\u94A5",en:"Get NiuTrans APIKey"}}; ;// CONCATENATED MODULE: ./src/config/index.js -const STOKEY_MSAUTH="".concat(APP_NAME,"_msauth");const STOKEY_BDAUTH="".concat(APP_NAME,"_bdauth");const config_STOKEY_SETTING="".concat(APP_NAME,"_setting");const config_STOKEY_RULES="".concat(APP_NAME,"_rules");const STOKEY_WORDS="".concat(APP_NAME,"_words");const config_STOKEY_SYNC="".concat(APP_NAME,"_sync");const config_STOKEY_FAB="".concat(APP_NAME,"_fab");const config_STOKEY_RULESCACHE_PREFIX="".concat(APP_NAME,"_rulescache_");const CMD_TOGGLE_TRANSLATE="toggleTranslate";const CMD_TOGGLE_STYLE="toggleStyle";const CMD_OPEN_OPTIONS="openOptions";const CMD_OPEN_TRANBOX="openTranbox";const CLIENT_WEB="web";const CLIENT_CHROME="chrome";const CLIENT_EDGE="edge";const CLIENT_FIREFOX="firefox";const CLIENT_USERSCRIPT="userscript";const CLIENT_EXTS=[CLIENT_CHROME,CLIENT_EDGE,CLIENT_FIREFOX];const KV_RULES_KEY="kiss-rules.json";const KV_WORDS_KEY="kiss-words.json";const config_KV_RULES_SHARE_KEY="kiss-rules-share.json";const KV_SETTING_KEY="kiss-setting.json";const KV_SALT_SYNC="KISS-Translator-SYNC";const config_KV_SALT_SHARE="KISS-Translator-SHARE";const CACHE_NAME="".concat(APP_NAME,"_cache");const MSG_FETCH="fetch";const MSG_FETCH_LIMIT="fetch_limit";const MSG_FETCH_CLEAR="fetch_clear";const MSG_OPEN_OPTIONS="open_options";const MSG_SAVE_RULE="save_rule";const MSG_TRANS_TOGGLE="trans_toggle";const MSG_TRANS_TOGGLE_STYLE="trans_toggle_style";const MSG_OPEN_TRANBOX="open_tranbox";const MSG_TRANS_GETRULE="trans_getrule";const MSG_TRANS_PUTRULE="trans_putrule";const MSG_TRANS_CURRULE="trans_currule";const MSG_CONTEXT_MENUS="context_menus";const MSG_COMMAND_SHORTCUTS="command_shortcuts";const MSG_INJECT_JS="inject_js";const MSG_INJECT_CSS="inject_css";const MSG_UPDATE_CSP="update_csp";const THEME_LIGHT="light";const THEME_DARK="dark";const URL_KISS_WORKER="https://github.com/fishjar/kiss-worker";const URL_KISS_PROXY="https://github.com/fishjar/kiss-proxy";const URL_KISS_RULES="https://github.com/fishjar/kiss-rules";const URL_KISS_RULES_NEW_ISSUE="https://github.com/fishjar/kiss-rules/issues/new";const config_URL_RAW_PREFIX="https://raw.githubusercontent.com/fishjar/kiss-translator/master";const URL_CACHE_TRAN="https://".concat(APP_LCNAME,"/translate");const URL_MICROSOFT_TRAN="https://api-edge.cognitive.microsofttranslator.com/translate";const URL_MICROSOFT_AUTH="https://edge.microsoft.com/translate/auth";const URL_BAIDU_LANGDETECT="https://fanyi.baidu.com/langdetect";const URL_BAIDU_SUGGEST="https://fanyi.baidu.com/sug";const URL_BAIDU_TTS="https://fanyi.baidu.com/gettts";const URL_BAIDU_WEB="https://fanyi.baidu.com/";const URL_BAIDU_TRANSAPI="https://fanyi.baidu.com/transapi";const config_URL_BAIDU_TRANSAPI_V2="https://fanyi.baidu.com/v2transapi";const URL_DEEPLFREE_TRAN="https://www2.deepl.com/jsonrpc";const config_URL_TENCENT_TRANSMART="https://transmart.qq.com/api/imt";const OPT_TRANS_GOOGLE="Google";const OPT_TRANS_MICROSOFT="Microsoft";const OPT_TRANS_DEEPL="DeepL";const OPT_TRANS_DEEPLX="DeepLX";const OPT_TRANS_DEEPLFREE="DeepLFree";const OPT_TRANS_BAIDU="Baidu";const OPT_TRANS_TENCENT="Tencent";const OPT_TRANS_OPENAI="OpenAI";const OPT_TRANS_GEMINI="Gemini";const OPT_TRANS_CLOUDFLAREAI="CloudflareAI";const OPT_TRANS_CUSTOMIZE="Custom";const OPT_TRANS_CUSTOMIZE_2="Custom2";const OPT_TRANS_CUSTOMIZE_3="Custom3";const OPT_TRANS_CUSTOMIZE_4="Custom4";const OPT_TRANS_CUSTOMIZE_5="Custom5";const OPT_TRANS_ALL=[OPT_TRANS_GOOGLE,OPT_TRANS_MICROSOFT,OPT_TRANS_BAIDU,OPT_TRANS_TENCENT,OPT_TRANS_DEEPL,OPT_TRANS_DEEPLFREE,OPT_TRANS_DEEPLX,OPT_TRANS_OPENAI,OPT_TRANS_GEMINI,OPT_TRANS_CLOUDFLAREAI,OPT_TRANS_CUSTOMIZE,OPT_TRANS_CUSTOMIZE_2,OPT_TRANS_CUSTOMIZE_3,OPT_TRANS_CUSTOMIZE_4,OPT_TRANS_CUSTOMIZE_5];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_FROM=[["auto","Auto-detect"],...OPT_LANGS_TO];const OPT_LANGS_SPECIAL={[OPT_TRANS_GOOGLE]:new Map(OPT_LANGS_FROM.map(_ref=>{let[key]=_ref;return[key,key];})),[OPT_TRANS_MICROSOFT]:new Map([...OPT_LANGS_FROM.map(_ref2=>{let[key]=_ref2;return[key,key];}),["auto",""],["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[OPT_TRANS_DEEPL]:new Map([...OPT_LANGS_FROM.map(_ref3=>{let[key]=_ref3;return[key,key.toUpperCase()];}),["auto",""],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLFREE]:new Map([...OPT_LANGS_FROM.map(_ref4=>{let[key]=_ref4;return[key,key.toUpperCase()];}),["auto","auto"],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLX]:new Map([...OPT_LANGS_FROM.map(_ref5=>{let[key]=_ref5;return[key,key.toUpperCase()];}),["auto",""],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_BAIDU]:new Map([...OPT_LANGS_FROM.map(_ref6=>{let[key]=_ref6;return[key,key];}),["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]:new Map(OPT_LANGS_FROM.map(_ref7=>{let[key,val]=_ref7;return[key,val.split(" - ")[0]];})),[OPT_TRANS_GEMINI]:new Map(OPT_LANGS_FROM.map(_ref8=>{let[key,val]=_ref8;return[key,val.split(" - ")[0]];})),[OPT_TRANS_CLOUDFLAREAI]:new Map([["auto",""],["zh-CN","chinese"],["zh-TW","chinese"],["en","english"],["ar","arabic"],["de","german"],["ru","russian"],["fr","french"],["pt","portuguese"],["ja","japanese"],["es","spanish"],["hi","hindi"]]),[OPT_TRANS_CUSTOMIZE]:new Map([...OPT_LANGS_FROM.map(_ref9=>{let[key]=_ref9;return[key,key];}),["auto",""]])};const OPT_LANGS_LIST=OPT_LANGS_TO.map(_ref10=>{let[lang]=_ref10;return lang;});const OPT_LANGS_BAIDU=new Map(Array.from(OPT_LANGS_SPECIAL[OPT_TRANS_BAIDU].entries()).map(_ref11=>{let[k,v]=_ref11;return[v,k];}));const config_OPT_LANGS_TENCENT=new Map(Array.from(OPT_LANGS_SPECIAL[OPT_TRANS_TENCENT].entries()).map(_ref12=>{let[k,v]=_ref12;return[v,k];}));config_OPT_LANGS_TENCENT.set("zh","zh-CN");const OPT_STYLE_NONE="style_none";// 无 +const STOKEY_MSAUTH="".concat(APP_NAME,"_msauth");const STOKEY_BDAUTH="".concat(APP_NAME,"_bdauth");const config_STOKEY_SETTING="".concat(APP_NAME,"_setting");const config_STOKEY_RULES="".concat(APP_NAME,"_rules");const STOKEY_WORDS="".concat(APP_NAME,"_words");const config_STOKEY_SYNC="".concat(APP_NAME,"_sync");const config_STOKEY_FAB="".concat(APP_NAME,"_fab");const config_STOKEY_RULESCACHE_PREFIX="".concat(APP_NAME,"_rulescache_");const CMD_TOGGLE_TRANSLATE="toggleTranslate";const CMD_TOGGLE_STYLE="toggleStyle";const CMD_OPEN_OPTIONS="openOptions";const CMD_OPEN_TRANBOX="openTranbox";const CLIENT_WEB="web";const CLIENT_CHROME="chrome";const CLIENT_EDGE="edge";const CLIENT_FIREFOX="firefox";const CLIENT_USERSCRIPT="userscript";const CLIENT_EXTS=[CLIENT_CHROME,CLIENT_EDGE,CLIENT_FIREFOX];const KV_RULES_KEY="kiss-rules.json";const KV_WORDS_KEY="kiss-words.json";const config_KV_RULES_SHARE_KEY="kiss-rules-share.json";const KV_SETTING_KEY="kiss-setting.json";const KV_SALT_SYNC="KISS-Translator-SYNC";const config_KV_SALT_SHARE="KISS-Translator-SHARE";const CACHE_NAME="".concat(APP_NAME,"_cache");const MSG_FETCH="fetch";const MSG_FETCH_LIMIT="fetch_limit";const MSG_FETCH_CLEAR="fetch_clear";const MSG_OPEN_OPTIONS="open_options";const MSG_SAVE_RULE="save_rule";const MSG_TRANS_TOGGLE="trans_toggle";const MSG_TRANS_TOGGLE_STYLE="trans_toggle_style";const MSG_OPEN_TRANBOX="open_tranbox";const MSG_TRANS_GETRULE="trans_getrule";const MSG_TRANS_PUTRULE="trans_putrule";const MSG_TRANS_CURRULE="trans_currule";const MSG_CONTEXT_MENUS="context_menus";const MSG_COMMAND_SHORTCUTS="command_shortcuts";const MSG_INJECT_JS="inject_js";const MSG_INJECT_CSS="inject_css";const MSG_UPDATE_CSP="update_csp";const THEME_LIGHT="light";const THEME_DARK="dark";const URL_KISS_WORKER="https://github.com/fishjar/kiss-worker";const URL_KISS_PROXY="https://github.com/fishjar/kiss-proxy";const URL_KISS_RULES="https://github.com/fishjar/kiss-rules";const URL_KISS_RULES_NEW_ISSUE="https://github.com/fishjar/kiss-rules/issues/new";const config_URL_RAW_PREFIX="https://raw.githubusercontent.com/fishjar/kiss-translator/master";const URL_CACHE_TRAN="https://".concat(APP_LCNAME,"/translate");const URL_MICROSOFT_TRAN="https://api-edge.cognitive.microsofttranslator.com/translate";const URL_MICROSOFT_AUTH="https://edge.microsoft.com/translate/auth";const URL_BAIDU_LANGDETECT="https://fanyi.baidu.com/langdetect";const URL_BAIDU_SUGGEST="https://fanyi.baidu.com/sug";const URL_BAIDU_TTS="https://fanyi.baidu.com/gettts";const URL_BAIDU_WEB="https://fanyi.baidu.com/";const URL_BAIDU_TRANSAPI="https://fanyi.baidu.com/transapi";const config_URL_BAIDU_TRANSAPI_V2="https://fanyi.baidu.com/v2transapi";const URL_DEEPLFREE_TRAN="https://www2.deepl.com/jsonrpc";const config_URL_TENCENT_TRANSMART="https://transmart.qq.com/api/imt";const URL_NIUTRANS_REG="https://niutrans.com/login?active=3&userSource=kiss-translator";const DEFAULT_USER_AGENT="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36";const OPT_TRANS_GOOGLE="Google";const OPT_TRANS_MICROSOFT="Microsoft";const OPT_TRANS_DEEPL="DeepL";const OPT_TRANS_DEEPLX="DeepLX";const OPT_TRANS_DEEPLFREE="DeepLFree";const OPT_TRANS_NIUTRANS="NiuTrans";const OPT_TRANS_BAIDU="Baidu";const OPT_TRANS_TENCENT="Tencent";const OPT_TRANS_OPENAI="OpenAI";const OPT_TRANS_GEMINI="Gemini";const OPT_TRANS_CLOUDFLAREAI="CloudflareAI";const OPT_TRANS_CUSTOMIZE="Custom";const OPT_TRANS_CUSTOMIZE_2="Custom2";const OPT_TRANS_CUSTOMIZE_3="Custom3";const OPT_TRANS_CUSTOMIZE_4="Custom4";const OPT_TRANS_CUSTOMIZE_5="Custom5";const OPT_TRANS_ALL=[OPT_TRANS_GOOGLE,OPT_TRANS_MICROSOFT,OPT_TRANS_BAIDU,OPT_TRANS_TENCENT,OPT_TRANS_DEEPL,OPT_TRANS_DEEPLFREE,OPT_TRANS_DEEPLX,OPT_TRANS_NIUTRANS,OPT_TRANS_OPENAI,OPT_TRANS_GEMINI,OPT_TRANS_CLOUDFLAREAI,OPT_TRANS_CUSTOMIZE,OPT_TRANS_CUSTOMIZE_2,OPT_TRANS_CUSTOMIZE_3,OPT_TRANS_CUSTOMIZE_4,OPT_TRANS_CUSTOMIZE_5];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_FROM=[["auto","Auto-detect"],...OPT_LANGS_TO];const OPT_LANGS_SPECIAL={[OPT_TRANS_GOOGLE]:new Map(OPT_LANGS_FROM.map(_ref=>{let[key]=_ref;return[key,key];})),[OPT_TRANS_MICROSOFT]:new Map([...OPT_LANGS_FROM.map(_ref2=>{let[key]=_ref2;return[key,key];}),["auto",""],["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[OPT_TRANS_DEEPL]:new Map([...OPT_LANGS_FROM.map(_ref3=>{let[key]=_ref3;return[key,key.toUpperCase()];}),["auto",""],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLFREE]:new Map([...OPT_LANGS_FROM.map(_ref4=>{let[key]=_ref4;return[key,key.toUpperCase()];}),["auto","auto"],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLX]:new Map([...OPT_LANGS_FROM.map(_ref5=>{let[key]=_ref5;return[key,key.toUpperCase()];}),["auto",""],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_NIUTRANS]:new Map([...OPT_LANGS_FROM.map(_ref6=>{let[key]=_ref6;return[key,key];}),["auto","auto"],["zh-CN","zh"],["zh-TW","cht"]]),[OPT_TRANS_BAIDU]:new Map([...OPT_LANGS_FROM.map(_ref7=>{let[key]=_ref7;return[key,key];}),["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]:new Map(OPT_LANGS_FROM.map(_ref8=>{let[key,val]=_ref8;return[key,val.split(" - ")[0]];})),[OPT_TRANS_GEMINI]:new Map(OPT_LANGS_FROM.map(_ref9=>{let[key,val]=_ref9;return[key,val.split(" - ")[0]];})),[OPT_TRANS_CLOUDFLAREAI]:new Map([["auto",""],["zh-CN","chinese"],["zh-TW","chinese"],["en","english"],["ar","arabic"],["de","german"],["ru","russian"],["fr","french"],["pt","portuguese"],["ja","japanese"],["es","spanish"],["hi","hindi"]]),[OPT_TRANS_CUSTOMIZE]:new Map([...OPT_LANGS_FROM.map(_ref10=>{let[key]=_ref10;return[key,key];}),["auto",""]]),[OPT_TRANS_CUSTOMIZE_2]:new Map([...OPT_LANGS_FROM.map(_ref11=>{let[key]=_ref11;return[key,key];}),["auto",""]]),[OPT_TRANS_CUSTOMIZE_3]:new Map([...OPT_LANGS_FROM.map(_ref12=>{let[key]=_ref12;return[key,key];}),["auto",""]]),[OPT_TRANS_CUSTOMIZE_4]:new Map([...OPT_LANGS_FROM.map(_ref13=>{let[key]=_ref13;return[key,key];}),["auto",""]]),[OPT_TRANS_CUSTOMIZE_5]:new Map([...OPT_LANGS_FROM.map(_ref14=>{let[key]=_ref14;return[key,key];}),["auto",""]])};const OPT_LANGS_LIST=OPT_LANGS_TO.map(_ref15=>{let[lang]=_ref15;return lang;});const OPT_LANGS_BAIDU=new Map(Array.from(OPT_LANGS_SPECIAL[OPT_TRANS_BAIDU].entries()).map(_ref16=>{let[k,v]=_ref16;return[v,k];}));const config_OPT_LANGS_TENCENT=new Map(Array.from(OPT_LANGS_SPECIAL[OPT_TRANS_TENCENT].entries()).map(_ref17=>{let[k,v]=_ref17;return[v,k];}));config_OPT_LANGS_TENCENT.set("zh","zh-CN");const OPT_STYLE_NONE="style_none";// 无 const OPT_STYLE_LINE="under_line";// 下划线 const OPT_STYLE_DOTLINE="dot_line";// 点状线 const OPT_STYLE_DASHLINE="dash_line";// 虚线 @@ -18593,7 +18593,7 @@ hideClickAway:false// 是否点击外部关闭弹窗 const DEFAULT_SUBRULES_LIST=[{url:"https://fishjar.github.io/kiss-rules/kiss-rules.json",selected:false},{url:"https://fishjar.github.io/kiss-rules/kiss-rules-on.json",selected:true},{url:"https://fishjar.github.io/kiss-rules/kiss-rules-off.json",selected:false}];// 翻译接口 const defaultCustomApi={url:"",key:"",fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL};const DEFAULT_TRANS_APIS={[OPT_TRANS_GOOGLE]:{url:"https://translate.googleapis.com/translate_a/single",key:"",fetchLimit:DEFAULT_FETCH_LIMIT,// 最大任务数量 fetchInterval:DEFAULT_FETCH_INTERVAL// 任务间隔时间 -},[OPT_TRANS_MICROSOFT]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_BAIDU]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_TENCENT]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_DEEPL]:{url:"https://api-free.deepl.com/v2/translate",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_DEEPLFREE]:{fetchLimit:1,fetchInterval:500},[OPT_TRANS_DEEPLX]:{url:"http://localhost:1188/translate",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_OPENAI]:{url:"https://api.openai.com/v1/chat/completions",key:"",model:"gpt-4",prompt:"You will be provided with a sentence in ".concat(PROMPT_PLACE_FROM,", and your task is to translate it into ").concat(PROMPT_PLACE_TO,"."),fetchLimit:1,fetchInterval:500},[OPT_TRANS_GEMINI]:{url:"https://generativelanguage.googleapis.com/v1/models",key:"",model:"gemini-pro",prompt:"Translate the following text from ".concat(PROMPT_PLACE_FROM," to ").concat(PROMPT_PLACE_TO,":\n\n").concat(PROMPT_PLACE_TEXT),fetchLimit:1,fetchInterval:500},[OPT_TRANS_CLOUDFLAREAI]:{url:"https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/run/@cf/meta/m2m100-1.2b",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_CUSTOMIZE]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_2]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_3]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_4]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_5]:defaultCustomApi};// 默认快捷键 +},[OPT_TRANS_MICROSOFT]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_BAIDU]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_TENCENT]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_DEEPL]:{url:"https://api-free.deepl.com/v2/translate",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_DEEPLFREE]:{fetchLimit:1,fetchInterval:500},[OPT_TRANS_DEEPLX]:{url:"http://localhost:1188/translate",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_NIUTRANS]:{url:"https://api.niutrans.com/NiuTransServer/translation",key:"",dictNo:"",memoryNo:"",fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_OPENAI]:{url:"https://api.openai.com/v1/chat/completions",key:"",model:"gpt-4",prompt:"You will be provided with a sentence in ".concat(PROMPT_PLACE_FROM,", and your task is to translate it into ").concat(PROMPT_PLACE_TO,"."),fetchLimit:1,fetchInterval:500},[OPT_TRANS_GEMINI]:{url:"https://generativelanguage.googleapis.com/v1/models",key:"",model:"gemini-pro",prompt:"Translate the following text from ".concat(PROMPT_PLACE_FROM," to ").concat(PROMPT_PLACE_TO,":\n\n").concat(PROMPT_PLACE_TEXT),fetchLimit:1,fetchInterval:500},[OPT_TRANS_CLOUDFLAREAI]:{url:"https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/run/@cf/meta/m2m100-1.2b",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_CUSTOMIZE]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_2]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_3]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_4]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_5]:defaultCustomApi};// 默认快捷键 const OPT_SHORTCUT_TRANSLATE="toggleTranslate";const OPT_SHORTCUT_STYLE="toggleStyle";const OPT_SHORTCUT_POPUP="togglePopup";const OPT_SHORTCUT_SETTING="openSetting";const DEFAULT_SHORTCUTS={[OPT_SHORTCUT_TRANSLATE]:["AltLeft","KeyQ"],[OPT_SHORTCUT_STYLE]:["AltLeft","KeyC"],[OPT_SHORTCUT_POPUP]:["AltLeft","KeyK"],[OPT_SHORTCUT_SETTING]:["AltLeft","KeyO"]};const TRANS_MIN_LENGTH=5;// 最短翻译长度 const TRANS_MAX_LENGTH=5000;// 最长翻译长度 const TRANS_NEWLINE_LENGTH=20;// 换行字符数 @@ -19246,7 +19246,8 @@ store=await getToken();await setBdauth(store);return store;};};const bdAuth=_bdA * 失效作废 * @param {*} param0 * @returns - */const genBaiduV2=async _ref=>{let{text,from,to}=_ref;const{token,gtk}=await bdAuth();const sign=getSign(text,gtk);const data={from,to,query:text,simple_means_flag:3,sign,token,domain:"common",ts:Date.now()};const input="".concat(URL_BAIDU_TRANSAPI_V2,"?from=").concat(from,"&to=").concat(to);const init={headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},method:"POST",body:queryString.stringify(data)};return[input,init];};const genBaidu=async _ref2=>{let{text,from,to}=_ref2;const data={from,to,query:text,source:"txt"};const init={headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},method:"POST",body:query_string.stringify(data)};return[URL_BAIDU_TRANSAPI,init];}; + */const genBaiduV2=async _ref=>{let{text,from,to}=_ref;const{token,gtk}=await bdAuth();const sign=getSign(text,gtk);const data={from,to,query:text,simple_means_flag:3,sign,token,domain:"common",ts:Date.now()};const input="".concat(URL_BAIDU_TRANSAPI_V2,"?from=").concat(from,"&to=").concat(to);const init={headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},method:"POST",body:queryString.stringify(data)};return[input,init];};const genBaidu=async _ref2=>{let{text,from,to}=_ref2;const data={from,to,query:text,source:"txt"};const init={headers:{// Origin: "https://fanyi.baidu.com", +"content-type":"application/x-www-form-urlencoded; charset=UTF-8","User-Agent":DEFAULT_USER_AGENT},method:"POST",body:query_string.stringify(data)};return[URL_BAIDU_TRANSAPI,init];}; ;// CONCATENATED MODULE: ./src/libs/req.js const keyMap=new Map();// 轮询key const keyPick=function(translator){var _keyMap$get;let key=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";const keys=key.split(/\n|,/).map(item=>item.trim()).filter(Boolean);if(keys.length===0){return"";}const preIndex=(_keyMap$get=keyMap.get(translator))!==null&&_keyMap$get!==void 0?_keyMap$get:-1;const curIndex=(preIndex+1)%keys.length;keyMap.set(translator,curIndex);return keys[curIndex];};/** @@ -19254,14 +19255,14 @@ const keyPick=function(translator){var _keyMap$get;let key=arguments.length>1&&a * @param {*} request * @returns */const newCacheReq=async(input,init)=>{let request=new Request(input,init);if(request.method!=="GET"){const body=await request.text();const cacheUrl=new URL(request.url);cacheUrl.pathname+=body;request=new Request(cacheUrl.toString(),{method:"GET"});}return request;};const genGoogle=_ref=>{let{text,from,to,url,key}=_ref;const params={client:"gtx",dt:"t",dj:1,ie:"UTF-8",sl:from,tl:to,q:text};const input="".concat(url,"?").concat(query_string.stringify(params));const init={headers:{"Content-type":"application/json"}};if(key){init.headers.Authorization="Bearer ".concat(key);}return[input,init];};const genMicrosoft=async _ref2=>{let{text,from,to}=_ref2;const[token]=await msAuth();const params={from,to,"api-version":"3.0"};const input="".concat(URL_MICROSOFT_TRAN,"?").concat(query_string.stringify(params));const init={headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(token)},method:"POST",body:JSON.stringify([{Text:text}])};return[input,init];};const genDeepl=_ref3=>{let{text,from,to,url,key}=_ref3;const data={text:[text],target_lang:to,source_lang:from// split_sentences: "0", -};const init={headers:{"Content-type":"application/json",Authorization:"DeepL-Auth-Key ".concat(key)},method:"POST",body:JSON.stringify(data)};return[url,init];};const genDeeplX=_ref4=>{let{text,from,to,url,key}=_ref4;const data={text,target_lang:to,source_lang:from};const init={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify(data)};if(key){init.headers.Authorization="Bearer ".concat(key);}return[url,init];};const genTencent=_ref5=>{let{text,from,to}=_ref5;const data={header:{fn:"auto_translation_block"},source:{text_block:text,lang:from},target:{lang:to}};const init={headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify(data)};return[config_URL_TENCENT_TRANSMART,init];};const genOpenAI=_ref6=>{let{text,from,to,url,key,prompt,model}=_ref6;prompt=prompt.replaceAll(PROMPT_PLACE_FROM,from).replaceAll(PROMPT_PLACE_TO,to);const data={model,messages:[{role:"system",content:prompt},{role:"user",content:text}],temperature:0,max_tokens:256};const init={headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(key),// OpenAI +};const init={headers:{"Content-type":"application/json",Authorization:"DeepL-Auth-Key ".concat(key)},method:"POST",body:JSON.stringify(data)};return[url,init];};const genDeeplX=_ref4=>{let{text,from,to,url,key}=_ref4;const data={text,target_lang:to,source_lang:from};const init={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify(data)};if(key){init.headers.Authorization="Bearer ".concat(key);}return[url,init];};const genNiuTrans=_ref5=>{let{text,from,to,url,key,dictNo,memoryNo}=_ref5;const data={from,to,apikey:key,src_text:text,dictNo,memoryNo};const init={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify(data)};return[url,init];};const genTencent=_ref6=>{let{text,from,to}=_ref6;const data={header:{fn:"auto_translation_block"},source:{text_block:text,lang:from},target:{lang:to}};const init={headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify(data)};return[config_URL_TENCENT_TRANSMART,init];};const genOpenAI=_ref7=>{let{text,from,to,url,key,prompt,model}=_ref7;prompt=prompt.replaceAll(PROMPT_PLACE_FROM,from).replaceAll(PROMPT_PLACE_TO,to);const data={model,messages:[{role:"system",content:prompt},{role:"user",content:text}],temperature:0,max_tokens:256};const init={headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(key),// OpenAI "api-key":key// Azure OpenAI -},method:"POST",body:JSON.stringify(data)};return[url,init];};const genGemini=_ref7=>{let{text,from,to,url,key,prompt,model}=_ref7;prompt=prompt.replaceAll(PROMPT_PLACE_FROM,from).replaceAll(PROMPT_PLACE_TO,to).replaceAll(PROMPT_PLACE_TEXT,text);const data={contents:[{// role: "user", -parts:[{text:prompt}]}]};const input="".concat(url,"/").concat(model,":generateContent?key=").concat(key);const init={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify(data)};return[input,init];};const genCloudflareAI=_ref8=>{let{text,from,to,url,key}=_ref8;const data={text,source_lang:from,target_lang:to};const init={headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(key)},method:"POST",body:JSON.stringify(data)};return[url,init];};const genCustom=_ref9=>{let{text,from,to,url,key}=_ref9;const data={text,from,to};const init={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify(data)};if(key){init.headers.Authorization="Bearer ".concat(key);}return[url,init];};/** +},method:"POST",body:JSON.stringify(data)};return[url,init];};const genGemini=_ref8=>{let{text,from,to,url,key,prompt,model}=_ref8;prompt=prompt.replaceAll(PROMPT_PLACE_FROM,from).replaceAll(PROMPT_PLACE_TO,to).replaceAll(PROMPT_PLACE_TEXT,text);const data={contents:[{// role: "user", +parts:[{text:prompt}]}]};const input="".concat(url,"/").concat(model,":generateContent?key=").concat(key);const init={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify(data)};return[input,init];};const genCloudflareAI=_ref9=>{let{text,from,to,url,key}=_ref9;const data={text,source_lang:from,target_lang:to};const init={headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(key)},method:"POST",body:JSON.stringify(data)};return[url,init];};const genCustom=_ref10=>{let{text,from,to,url,key}=_ref10;const data={text,from,to};const init={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify(data)};if(key){init.headers.Authorization="Bearer ".concat(key);}return[url,init];};/** * 构造翻译接口 request * @param {*} * @returns - */const newTransReq=(_ref10,apiSetting)=>{let{translator,text,from,to}=_ref10;const args={text,from,to,...apiSetting};switch(translator){case OPT_TRANS_DEEPL:case OPT_TRANS_OPENAI:case OPT_TRANS_GEMINI:case OPT_TRANS_CLOUDFLAREAI:args.key=keyPick(translator,args.key);break;default:}switch(translator){case OPT_TRANS_GOOGLE:return genGoogle(args);case OPT_TRANS_MICROSOFT:return genMicrosoft(args);case OPT_TRANS_DEEPL:return genDeepl(args);case OPT_TRANS_DEEPLFREE:return genDeeplFree(args);case OPT_TRANS_DEEPLX:return genDeeplX(args);case OPT_TRANS_BAIDU:return genBaidu(args);case OPT_TRANS_TENCENT:return genTencent(args);case OPT_TRANS_OPENAI:return genOpenAI(args);case OPT_TRANS_GEMINI:return genGemini(args);case OPT_TRANS_CLOUDFLAREAI:return genCloudflareAI(args);case OPT_TRANS_CUSTOMIZE:return genCustom(args);default:throw new Error("[trans] translator: ".concat(translator," not support"));}}; + */const newTransReq=(_ref11,apiSetting)=>{let{translator,text,from,to}=_ref11;const args={text,from,to,...apiSetting};switch(translator){case OPT_TRANS_DEEPL:case OPT_TRANS_OPENAI:case OPT_TRANS_GEMINI:case OPT_TRANS_CLOUDFLAREAI:case OPT_TRANS_NIUTRANS:args.key=keyPick(translator,args.key);break;default:}switch(translator){case OPT_TRANS_GOOGLE:return genGoogle(args);case OPT_TRANS_MICROSOFT:return genMicrosoft(args);case OPT_TRANS_DEEPL:return genDeepl(args);case OPT_TRANS_DEEPLFREE:return genDeeplFree(args);case OPT_TRANS_DEEPLX:return genDeeplX(args);case OPT_TRANS_NIUTRANS:return genNiuTrans(args);case OPT_TRANS_BAIDU:return genBaidu(args);case OPT_TRANS_TENCENT:return genTencent(args);case OPT_TRANS_OPENAI:return genOpenAI(args);case OPT_TRANS_GEMINI:return genGemini(args);case OPT_TRANS_CLOUDFLAREAI:return genCloudflareAI(args);case OPT_TRANS_CUSTOMIZE:case OPT_TRANS_CUSTOMIZE_2:case OPT_TRANS_CUSTOMIZE_3:case OPT_TRANS_CUSTOMIZE_4:case OPT_TRANS_CUSTOMIZE_5:return genCustom(args);default:throw new Error("[trans] translator: ".concat(translator," not support"));}}; ;// CONCATENATED MODULE: ./src/libs/utils.js /** * 限制数字大小 @@ -19326,7 +19327,7 @@ parts:[{text:prompt}]}]};const input="".concat(url,"/").concat(model,":generateC * @param {*} str * @param {*} sign * @returns - */const matchInputStr=(str,sign)=>{let reg=/\/([\w-]+)\s+([^]+)/;switch(sign){case"//":reg=/\/\/([\w-]+)\s+([^]+)/;break;case"\\":reg=/\\([\w-]+)\s+([^]+)/;break;case"\\\\":reg=/\\\\([\w-]+)\s+([^]+)/;break;case">":reg=/>([\w-]+)\s+([^]+)/;break;case">>":reg=/>>([\w-]+)\s+([^]+)/;break;default:}return str.match(reg);};/** + */const matchInputStr=(str,sign)=>{switch(sign){case"//":return str.match(/\/\/([\w-]+)\s+([^]+)/);case"\\":return str.match(/\\([\w-]+)\s+([^]+)/);case"\\\\":return str.match(/\\\\([\w-]+)\s+([^]+)/);case">":return str.match(/>([\w-]+)\s+([^]+)/);case">>":return str.match(/>>([\w-]+)\s+([^]+)/);default:}return str.match(/\/([\w-]+)\s+([^]+)/);};/** * 判断是否英文单词 * @param {*} str * @returns @@ -19356,8 +19357,8 @@ const connects=((_info=info)===null||_info===void 0?void 0:(_info$script=_info.s * @param {*} opts * @returns */const fetchData=async function(input){let{useCache,usePool,transOpts,apiSetting,...init}=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};const cacheReq=await newCacheReq(input,init);let res;// 查询缓存 -if(useCache){try{const cache=await caches.open(CACHE_NAME);res=await cache.match(cacheReq);}catch(err){log_kissLog(err,"cache match");}}if(!res){var _res;// 发送请求 -if(usePool){res=await fetchPool.push({input,init,transOpts,apiSetting});}else{res=await fetchApi({input,init,transOpts,apiSetting});}if(!((_res=res)!==null&&_res!==void 0&&_res.ok)){var _res$headers$get;const msg={url:input,status:res.status};if((_res$headers$get=res.headers.get("Content-Type"))!==null&&_res$headers$get!==void 0&&_res$headers$get.includes("json")){msg.response=await res.json();}throw new Error(JSON.stringify(msg));}// 插入缓存 +if(useCache){try{const cache=await caches.open(CACHE_NAME);res=await cache.match(cacheReq);}catch(err){log_kissLog(err,"cache match");}}if(!res){// 发送请求 +if(usePool){res=await fetchPool.push({input,init,transOpts,apiSetting});}else{res=await fetchApi({input,init,transOpts,apiSetting});}if(!res){throw new Error("Unknow error");}else if(!res.ok){var _res$headers$get;const msg={url:res.url,status:res.status};if((_res$headers$get=res.headers.get("Content-Type"))!==null&&_res$headers$get!==void 0&&_res$headers$get.includes("json")){msg.response=await res.json();}throw new Error(JSON.stringify(msg));}// 插入缓存 if(useCache){try{const cache=await caches.open(CACHE_NAME);await cache.put(cacheReq,res.clone());}catch(err){log_kissLog(err,"cache put");}}}const contentType=res.headers.get("Content-Type");if(contentType!==null&&contentType!==void 0&&contentType.includes("json")){return await res.json();}else if(contentType!==null&&contentType!==void 0&&contentType.includes("audio")){const blob=await res.blob();return await blobToBase64(blob);}return await res.text();};/** * fetch 兼容性封装 * @param {*} input @@ -19407,9 +19408,9 @@ return await fetchData(input,opts);};/** * @param {*} param0 * @returns */const apiTranslate=async _ref=>{var _OPT_LANGS_SPECIAL$tr,_res$result,_res$result2,_res$choices,_res$candidates,_res$result3;let{translator,text,fromLang,toLang,apiSetting={},useCache=true,usePool=true}=_ref;let trText="";let isSame=false;if(!text){return[trText,true];}const from=(_OPT_LANGS_SPECIAL$tr=OPT_LANGS_SPECIAL[translator].get(fromLang))!==null&&_OPT_LANGS_SPECIAL$tr!==void 0?_OPT_LANGS_SPECIAL$tr:OPT_LANGS_SPECIAL[translator].get("auto");const to=OPT_LANGS_SPECIAL[translator].get(toLang);if(!to){console.log("[trans] target lang: ".concat(toLang," not support"));return[trText,isSame];}// 版本号一/二位升级,旧缓存失效 -const[v1,v2]="1.8.5".split(".");const cacheOpts={translator,text,fromLang,toLang,version:[v1,v2].join(".")};const transOpts={translator,text,from,to};const res=await fetch_fetchPolyfill("".concat(URL_CACHE_TRAN,"?").concat(query_string.stringify(cacheOpts)),{useCache,usePool,transOpts,apiSetting});switch(translator){case OPT_TRANS_GOOGLE:trText=res.sentences.map(item=>item.trans).join(" ");isSame=to===res.src;break;case OPT_TRANS_MICROSOFT:trText=res.map(item=>item.translations.map(item=>item.text).join(" ")).join(" ");isSame=text===trText;break;case OPT_TRANS_DEEPL:trText=res.translations.map(item=>item.text).join(" ");isSame=to===res.translations[0].detected_source_language;break;case OPT_TRANS_DEEPLFREE:trText=(_res$result=res.result)===null||_res$result===void 0?void 0:_res$result.texts.map(item=>item.text).join(" ");isSame=to===((_res$result2=res.result)===null||_res$result2===void 0?void 0:_res$result2.lang);break;case OPT_TRANS_DEEPLX:trText=res.data;isSame=to===res.source_lang;break;case OPT_TRANS_BAIDU:// trText = res.trans_result?.data.map((item) => item.dst).join(" "); +const[v1,v2]="1.8.6".split(".");const cacheOpts={translator,text,fromLang,toLang,version:[v1,v2].join(".")};const transOpts={translator,text,from,to};const res=await fetch_fetchPolyfill("".concat(URL_CACHE_TRAN,"?").concat(query_string.stringify(cacheOpts)),{useCache,usePool,transOpts,apiSetting});switch(translator){case OPT_TRANS_GOOGLE:trText=res.sentences.map(item=>item.trans).join(" ");isSame=to===res.src;break;case OPT_TRANS_MICROSOFT:trText=res.map(item=>item.translations.map(item=>item.text).join(" ")).join(" ");isSame=text===trText;break;case OPT_TRANS_DEEPL:trText=res.translations.map(item=>item.text).join(" ");isSame=to===res.translations[0].detected_source_language;break;case OPT_TRANS_DEEPLFREE:trText=(_res$result=res.result)===null||_res$result===void 0?void 0:_res$result.texts.map(item=>item.text).join(" ");isSame=to===((_res$result2=res.result)===null||_res$result2===void 0?void 0:_res$result2.lang);break;case OPT_TRANS_DEEPLX:trText=res.data;isSame=to===res.source_lang;break;case OPT_TRANS_NIUTRANS:const json=JSON.parse(res);if(json.error_msg){throw new Error(json.error_msg);}trText=json.tgt_text;isSame=to===json.from;break;case OPT_TRANS_BAIDU:// trText = res.trans_result?.data.map((item) => item.dst).join(" "); // isSame = res.trans_result?.to === res.trans_result?.from; -if(res.type===1){trText=Object.keys(JSON.parse(res.result).content[0].mean[0].cont)[0];isSame=to===res.from;}else if(res.type===2){trText=res.data.map(item=>item.dst).join(" ");isSame=to===res.from;}break;case OPT_TRANS_TENCENT:trText=res.auto_translation;isSame=text===trText;break;case OPT_TRANS_OPENAI:trText=res===null||res===void 0?void 0:(_res$choices=res.choices)===null||_res$choices===void 0?void 0:_res$choices.map(item=>item.message.content).join(" ");isSame=text===trText;break;case OPT_TRANS_GEMINI:trText=res===null||res===void 0?void 0:(_res$candidates=res.candidates)===null||_res$candidates===void 0?void 0:_res$candidates.map(item=>{var _item$content;return(_item$content=item.content)===null||_item$content===void 0?void 0:_item$content.parts.map(item=>item.text).join(" ");}).join(" ");isSame=text===trText;break;case OPT_TRANS_CLOUDFLAREAI:trText=res===null||res===void 0?void 0:(_res$result3=res.result)===null||_res$result3===void 0?void 0:_res$result3.translated_text;isSame=text===trText;break;case OPT_TRANS_CUSTOMIZE:trText=res.text;isSame=to===res.from;break;default:}return[trText,isSame,res];}; +if(res.type===1){trText=Object.keys(JSON.parse(res.result).content[0].mean[0].cont)[0];isSame=to===res.from;}else if(res.type===2){trText=res.data.map(item=>item.dst).join(" ");isSame=to===res.from;}break;case OPT_TRANS_TENCENT:trText=res.auto_translation;isSame=text===trText;break;case OPT_TRANS_OPENAI:trText=res===null||res===void 0?void 0:(_res$choices=res.choices)===null||_res$choices===void 0?void 0:_res$choices.map(item=>item.message.content).join(" ");isSame=text===trText;break;case OPT_TRANS_GEMINI:trText=res===null||res===void 0?void 0:(_res$candidates=res.candidates)===null||_res$candidates===void 0?void 0:_res$candidates.map(item=>{var _item$content;return(_item$content=item.content)===null||_item$content===void 0?void 0:_item$content.parts.map(item=>item.text).join(" ");}).join(" ");isSame=text===trText;break;case OPT_TRANS_CLOUDFLAREAI:trText=res===null||res===void 0?void 0:(_res$result3=res.result)===null||_res$result3===void 0?void 0:_res$result3.translated_text;isSame=text===trText;break;case OPT_TRANS_CUSTOMIZE:case OPT_TRANS_CUSTOMIZE_2:case OPT_TRANS_CUSTOMIZE_3:case OPT_TRANS_CUSTOMIZE_4:case OPT_TRANS_CUSTOMIZE_5:trText=res.text;isSame=to===res.from;break;default:}return[trText,isSame,res];}; ;// CONCATENATED MODULE: ./node_modules/.pnpm/webdav@5.3.0/node_modules/webdav/dist/web/index.js /*! For license information please see index.js.LICENSE.txt */ var t = { @@ -22222,7 +22223,7 @@ var web_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":"1.8.5","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE2":"https://kiss-translator.rayjar.com/options","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_LOGOURL2":"https://kiss-translator.rayjar.com/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off.json","REACT_APP_VERSIONFILE":"https://fishjar.github.io/kiss-translator/version.txt","REACT_APP_VERSIONFILE2":"https://kiss-translator.rayjar.com/version.txt","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_DOWNLOADURL2":"https://kiss-translator.rayjar.com/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL2":"https://kiss-translator.rayjar.com/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":"1.8.5","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE2":"https://kiss-translator.rayjar.com/options","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_LOGOURL2":"https://kiss-translator.rayjar.com/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off.json","REACT_APP_VERSIONFILE":"https://fishjar.github.io/kiss-translator/version.txt","REACT_APP_VERSIONFILE2":"https://kiss-translator.rayjar.com/version.txt","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_DOWNLOADURL2":"https://kiss-translator.rayjar.com/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL2":"https://kiss-translator.rayjar.com/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":"1.8.5","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE2":"https://kiss-translator.rayjar.com/options","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_LOGOURL2":"https://kiss-translator.rayjar.com/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off.json","REACT_APP_VERSIONFILE":"https://fishjar.github.io/kiss-translator/version.txt","REACT_APP_VERSIONFILE2":"https://kiss-translator.rayjar.com/version.txt","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_DOWNLOADURL2":"https://kiss-translator.rayjar.com/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL2":"https://kiss-translator.rayjar.com/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":"1.8.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.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off.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":"1.8.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.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off.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":"1.8.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.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off.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; @@ -32305,7 +32306,7 @@ var DarkMode = __webpack_require__(6560); ;// CONCATENATED MODULE: ./src/views/Options/DarkModeButton.js function DarkModeButton(){const{darkMode,toggleDarkMode}=useDarkMode();return/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{onClick:toggleDarkMode,color:"inherit",children:darkMode?/*#__PURE__*/(0,jsx_runtime.jsx)(LightMode/* default */.Z,{}):/*#__PURE__*/(0,jsx_runtime.jsx)(DarkMode/* default */.Z,{})});} ;// CONCATENATED MODULE: ./src/views/Popup/Header.js -function Header(_ref){let{setShowPopup}=_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("1.8.5")})]}),setShowPopup?/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{onClick:()=>{setShowPopup(false);},children:/*#__PURE__*/(0,jsx_runtime.jsx)(Close/* default */.Z,{})}):/*#__PURE__*/(0,jsx_runtime.jsx)(DarkModeButton,{})]});} +function Header(_ref){let{setShowPopup}=_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("1.8.6")})]}),setShowPopup?/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{onClick:()=>{setShowPopup(false);},children:/*#__PURE__*/(0,jsx_runtime.jsx)(Close/* default */.Z,{})}):/*#__PURE__*/(0,jsx_runtime.jsx)(DarkModeButton,{})]});} ;// CONCATENATED MODULE: ./src/libs/iframe.js const isIframe=window.self!==window.top;const sendIframeMsg=(action,args)=>{document.querySelectorAll("iframe").forEach(iframe=>{iframe.contentWindow.postMessage({action,args},"*");});};const sendParentMsg=(action,args)=>{window.parent.postMessage({action,args},"*");}; ;// CONCATENATED MODULE: ./src/libs/subRules.js @@ -32392,7 +32393,7 @@ function LoadingIcon(){return/*#__PURE__*/(0,jsx_runtime.jsx)("span",{style:{dis * @param {*} rule * @param {*} setting * @returns - */function useTranslate(q,rule,setting){const[text,setText]=(0,react.useState)("");const[loading,setLoading]=(0,react.useState)(false);const[sameLang,setSamelang]=(0,react.useState)(false);const{translator,fromLang,toLang,detectRemote,skipLangs=[]}=rule;(0,react.useEffect)(()=>{(async()=>{try{setLoading(true);if(!q.replace(/\[(\d+)\]/g,"").trim()){setText(q);setSamelang(false);return;}const deLang=await tryDetectLang(q,detectRemote==="true");if(deLang&&(toLang.includes(deLang)||skipLangs.includes(deLang))){setSamelang(true);}else{var _setting$transApis;const[trText,isSame]=await apiTranslate({translator,text:q,fromLang,toLang,apiSetting:((_setting$transApis=setting.transApis)===null||_setting$transApis===void 0?void 0:_setting$transApis[translator])||DEFAULT_TRANS_APIS[translator]});setText(trText);setSamelang(isSame);}}catch(err){log_kissLog(err,"translate");}finally{setLoading(false);}})();},[q,translator,fromLang,toLang,detectRemote,skipLangs,setting]);return{text,sameLang,loading};} + */function useTranslate(q,rule,setting){const[text,setText]=(0,react.useState)("");const[loading,setLoading]=(0,react.useState)(false);const[sameLang,setSamelang]=(0,react.useState)(false);const{translator,fromLang,toLang,detectRemote,skipLangs=[]}=rule;(0,react.useEffect)(()=>{(async()=>{try{setLoading(true);if(!q.replace(/\[(\d+)\]/g,"").trim()){setText(q);setSamelang(false);return;}const deLang=await tryDetectLang(q,detectRemote==="true");if(deLang&&(toLang.includes(deLang)||skipLangs.includes(deLang))){setSamelang(true);}else{const[trText,isSame]=await apiTranslate({translator,text:q,fromLang,toLang,apiSetting:{...DEFAULT_TRANS_APIS[translator],...(setting.transApis[translator]||{})}});setText(trText);setSamelang(isSame);}}catch(err){log_kissLog(err,"translate");}finally{setLoading(false);}})();},[q,translator,fromLang,toLang,detectRemote,skipLangs,setting]);return{text,sameLang,loading};} ;// CONCATENATED MODULE: ./src/views/Content/index.js var Content_templateObject,Content_templateObject2,Content_templateObject3,Content_templateObject4,_templateObject5;const LINE_STYLES={[OPT_STYLE_LINE]:"solid",[OPT_STYLE_DOTLINE]:"dotted",[OPT_STYLE_DASHLINE]:"dashed",[OPT_STYLE_WAVYLINE]:"wavy"};const StyledSpan=(0,styled/* default */.ZP)("span")(Content_templateObject||(Content_templateObject=_taggedTemplateLiteral(["\n ","\n"])),_ref=>{let{textStyle,textDiyStyle,bgColor}=_ref;switch(textStyle){case OPT_STYLE_LINE:// 下划线 case OPT_STYLE_DOTLINE:// 点状线 @@ -32472,7 +32473,7 @@ return this._rule;}set rule(rule){// console.log("set rule", rule); this._rule=rule;// 广播消息 const eventName=this._eventName;window.dispatchEvent(new CustomEvent(eventName,{detail:{action:MSG_TRANS_CURRULE,args:rule}}));}} ;// CONCATENATED MODULE: ./src/views/Selection/TranBtn.js -function TranBtn(_ref){let{onClick,position,tranboxSetting}=_ref;const left=position.x+tranboxSetting.btnOffsetX;const top=position.y+tranboxSetting.btnOffsetY;const touchProps=isMobile?{onTouchEnd:onClick}:{onMouseUp:onClick};return/*#__PURE__*/(0,jsx_runtime.jsx)("div",{style:{cursor:"pointer",position:"absolute",left,top,zIndex:2147483647},...touchProps,children:/*#__PURE__*/(0,jsx_runtime.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 32 32",version:"1.1",children:[/*#__PURE__*/(0,jsx_runtime.jsx)("path",{d:"M0 0 C10.56 0 21.12 0 32 0 C32 10.56 32 21.12 32 32 C21.44 32 10.88 32 0 32 C0 21.44 0 10.88 0 0 Z ",fill:"#209CEE",transform:"translate(0,0)"}),/*#__PURE__*/(0,jsx_runtime.jsx)("path",{d:"M0 0 C0.66 0 1.32 0 2 0 C2 2.97 2 5.94 2 9 C2.969375 8.2575 3.93875 7.515 4.9375 6.75 C5.48277344 6.33234375 6.02804688 5.9146875 6.58984375 5.484375 C8.39053593 3.83283924 8.39053593 3.83283924 9 0 C13.95 0 18.9 0 24 0 C24 0.99 24 1.98 24 3 C22.68 3 21.36 3 20 3 C20 9.27 20 15.54 20 22 C19.01 22 18.02 22 17 22 C17 15.73 17 9.46 17 3 C15.35 3 13.7 3 12 3 C11.731875 3.598125 11.46375 4.19625 11.1875 4.8125 C10.01506533 6.97224808 8.80630718 8.35790256 7 10 C8.01790655 12.27071461 8.77442829 13.80784632 10.6875 15.4375 C11.120625 15.953125 11.55375 16.46875 12 17 C11.6875 19.6875 11.6875 19.6875 11 22 C10.34 22 9.68 22 9 22 C8.773125 21.236875 8.54625 20.47375 8.3125 19.6875 C6.73268318 16.45263699 5.16717283 15.58358642 2 14 C2 16.64 2 19.28 2 22 C1.34 22 0.68 22 0 22 C0 14.74 0 7.48 0 0 Z ",fill:"#E9F5FD",transform:"translate(4,5)"})]})});} +function TranBtn(_ref){let{onClick,position,tranboxSetting}=_ref;const left=position.x+tranboxSetting.btnOffsetX;const top=position.y+tranboxSetting.btnOffsetY;const touchProps=isMobile?{onTouchEnd:onClick}:{onMouseUp:onClick};return/*#__PURE__*/(0,jsx_runtime.jsx)("div",{style:{cursor:"pointer",position:"absolute",left,top,zIndex:2147483647},...touchProps,children:/*#__PURE__*/(0,jsx_runtime.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:isMobile?"32":"20",height:isMobile?"32":"20",viewBox:"0 0 32 32",version:"1.1",children:[/*#__PURE__*/(0,jsx_runtime.jsx)("path",{d:"M0 0 C10.56 0 21.12 0 32 0 C32 10.56 32 21.12 32 32 C21.44 32 10.88 32 0 32 C0 21.44 0 10.88 0 0 Z ",fill:"#209CEE",transform:"translate(0,0)"}),/*#__PURE__*/(0,jsx_runtime.jsx)("path",{d:"M0 0 C0.66 0 1.32 0 2 0 C2 2.97 2 5.94 2 9 C2.969375 8.2575 3.93875 7.515 4.9375 6.75 C5.48277344 6.33234375 6.02804688 5.9146875 6.58984375 5.484375 C8.39053593 3.83283924 8.39053593 3.83283924 9 0 C13.95 0 18.9 0 24 0 C24 0.99 24 1.98 24 3 C22.68 3 21.36 3 20 3 C20 9.27 20 15.54 20 22 C19.01 22 18.02 22 17 22 C17 15.73 17 9.46 17 3 C15.35 3 13.7 3 12 3 C11.731875 3.598125 11.46375 4.19625 11.1875 4.8125 C10.01506533 6.97224808 8.80630718 8.35790256 7 10 C8.01790655 12.27071461 8.77442829 13.80784632 10.6875 15.4375 C11.120625 15.953125 11.55375 16.46875 12 17 C11.6875 19.6875 11.6875 19.6875 11 22 C10.34 22 9.68 22 9 22 C8.773125 21.236875 8.54625 20.47375 8.3125 19.6875 C6.73268318 16.45263699 5.16717283 15.58358642 2 14 C2 16.64 2 19.28 2 22 C1.34 22 0.68 22 0 22 C0 14.74 0 7.48 0 0 Z ",fill:"#E9F5FD",transform:"translate(4,5)"})]})});} ;// CONCATENATED MODULE: ./src/views/Selection/DraggableResizable.js function Pointer(_ref){let{direction,size,setSize,position,setPosition,children,minSize,maxSize,...props}=_ref;const[origin,setOrigin]=(0,react.useState)(null);function handlePointerDown(e){!isMobile&&e.target.setPointerCapture(e.pointerId);const{clientX,clientY}=isMobile?e.targetTouches[0]:e;setOrigin({x:position.x,y:position.y,w:size.w,h:size.h,clientX,clientY});}function handlePointerMove(e){const{clientX,clientY}=isMobile?e.targetTouches[0]:e;if(origin){const dx=clientX-origin.clientX;const dy=clientY-origin.clientY;let x=position.x;let y=position.y;let w=size.w;let h=size.h;switch(direction){case"Header":x=origin.x+dx;y=origin.y+dy;break;case"TopLeft":x=origin.x+dx;y=origin.y+dy;w=origin.w-dx;h=origin.h-dy;break;case"Top":y=origin.y+dy;h=origin.h-dy;break;case"TopRight":y=origin.y+dy;w=origin.w+dx;h=origin.h-dy;break;case"Left":x=origin.x+dx;w=origin.w-dx;break;case"Right":w=origin.w+dx;break;case"BottomLeft":x=origin.x+dx;w=origin.w-dx;h=origin.h+dy;break;case"Bottom":h=origin.h+dy;break;case"BottomRight":w=origin.w+dx;h=origin.h+dy;break;default:}if(wmaxSize.w){w=maxSize.w;x=position.x;}if(hmaxSize.h){h=maxSize.h;y=position.y;}setPosition({x,y});setSize({w,h});}}function handlePointerUp(e){e.stopPropagation();setOrigin(null);}const touchProps=isMobile?{onTouchStart:handlePointerDown,onTouchMove:handlePointerMove,onTouchEnd:handlePointerUp}:{onPointerDown:handlePointerDown,onPointerMove:handlePointerMove,onPointerUp:handlePointerUp};return/*#__PURE__*/(0,jsx_runtime.jsx)("div",{...props,...touchProps,children:children});}function DraggableResizable(_ref2){let{header,children,defaultPosition={x:0,y:0},defaultSize={w:600,h:400},minSize={w:300,h:200},maxSize={w:1200,h:1200},onChangeSize,onChangePosition,...props}=_ref2;const lineWidth=4;const[position,setPosition]=(0,react.useState)(defaultPosition);const[size,setSize]=(0,react.useState)(defaultSize);const opts={size,setSize,position,setPosition,minSize,maxSize};(0,react.useEffect)(()=>{onChangeSize&&onChangeSize(size);},[size,onChangeSize]);(0,react.useEffect)(()=>{onChangePosition&&onChangePosition(position);},[position,onChangePosition]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(Box_Box,{style:{touchAction:"none",position:"fixed",left:position.x,top:position.y,display:"grid",gridTemplateColumns:"".concat(lineWidth*2,"px auto ").concat(lineWidth*2,"px"),gridTemplateRows:"".concat(lineWidth*2,"px auto ").concat(lineWidth*2,"px"),zIndex:2147483647},...props,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Pointer,{direction:"TopLeft",style:{transform:"translate(".concat(lineWidth,"px, ").concat(lineWidth,"px)"),cursor:"nw-resize"},...opts}),/*#__PURE__*/(0,jsx_runtime.jsx)(Pointer,{direction:"Top",style:{margin:"0 ".concat(lineWidth,"px"),transform:"translate(0px, ".concat(lineWidth,"px)"),cursor:"row-resize"},...opts}),/*#__PURE__*/(0,jsx_runtime.jsx)(Pointer,{direction:"TopRight",style:{transform:"translate(-".concat(lineWidth,"px, ").concat(lineWidth,"px)"),cursor:"ne-resize"},...opts}),/*#__PURE__*/(0,jsx_runtime.jsx)(Pointer,{direction:"Left",style:{margin:"".concat(lineWidth,"px 0"),transform:"translate(".concat(lineWidth,"px, 0px)"),cursor:"col-resize"},...opts}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Paper_Paper,{elevation:4,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Pointer,{direction:"Header",style:{cursor:"move"},...opts,children:header}),/*#__PURE__*/(0,jsx_runtime.jsx)("div",{style:{width:size.w,height:size.h,overflow:"hidden auto"},children:children})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(Pointer,{direction:"Right",style:{margin:"".concat(lineWidth,"px 0"),transform:"translate(-".concat(lineWidth,"px, 0px)"),cursor:"col-resize"},...opts}),/*#__PURE__*/(0,jsx_runtime.jsx)(Pointer,{direction:"BottomLeft",style:{transform:"translate(".concat(lineWidth,"px, -").concat(lineWidth,"px)"),cursor:"ne-resize"},...opts}),/*#__PURE__*/(0,jsx_runtime.jsx)(Pointer,{direction:"Bottom",style:{margin:"0 ".concat(lineWidth,"px"),transform:"translate(0px, -".concat(lineWidth,"px)"),cursor:"row-resize"},...opts}),/*#__PURE__*/(0,jsx_runtime.jsx)(Pointer,{direction:"BottomRight",style:{transform:"translate(-".concat(lineWidth,"px, -").concat(lineWidth,"px)"),cursor:"nw-resize"},...opts})]});} ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+material@5.14.10_@emotion+react@11.11.1_@emotion+styled@11.11.0_@types+react@18.2.67_react-dom@18.2.0_react@18.2.0/node_modules/@mui/material/Grid/GridContext.js @@ -33455,8 +33456,8 @@ function TranForm(_ref){let{text,setText,tranboxSetting,transApis}=_ref;const i1 ;// CONCATENATED MODULE: ./src/views/Selection/index.js function Slection(_ref){let{contextMenuType,tranboxSetting,transApis}=_ref;const boxWidth=limitNumber(window.innerWidth,300,600);const boxHeight=limitNumber(window.innerHeight,200,400);const[showBox,setShowBox]=(0,react.useState)(false);const[showBtn,setShowBtn]=(0,react.useState)(false);const[selectedText,setSelText]=(0,react.useState)("");const[text,setText]=(0,react.useState)("");const[position,setPosition]=(0,react.useState)({x:0,y:0});const[boxSize,setBoxSize]=(0,react.useState)({w:boxWidth,h:boxHeight});const[boxPosition,setBoxPosition]=(0,react.useState)({x:(window.innerWidth-boxWidth)/2,y:(window.innerHeight-boxHeight)/2});const handleClick=e=>{e.stopPropagation();setShowBtn(false);setText(selectedText);setShowBox(true);};const handleTranbox=(0,react.useCallback)(()=>{var _window$getSelection,_window$getSelection$;setShowBtn(false);const selectedText=((_window$getSelection=window.getSelection())===null||_window$getSelection===void 0?void 0:(_window$getSelection$=_window$getSelection.toString())===null||_window$getSelection$===void 0?void 0:_window$getSelection$.trim())||"";if(!selectedText){setShowBox(pre=>!pre);return;}setSelText(selectedText);setText(selectedText);setShowBox(true);},[]);(0,react.useEffect)(()=>{async function handleMouseup(e){var _window$getSelection2,_window$getSelection3;e.stopPropagation();await sleep(10);const selectedText=((_window$getSelection2=window.getSelection())===null||_window$getSelection2===void 0?void 0:(_window$getSelection3=_window$getSelection2.toString())===null||_window$getSelection3===void 0?void 0:_window$getSelection3.trim())||"";setSelText(selectedText);if(!selectedText){setShowBtn(false);return;}const{pageX,pageY}=isMobile?e.changedTouches[0]:e;!tranboxSetting.hideTranBtn&&setShowBtn(true);// setPosition({ x: e.clientX, y: e.clientY }); setPosition({x:pageX,y:pageY});}// todo: mobile support -window.addEventListener("mouseup",handleMouseup);// window.addEventListener(isMobile ? "touchend" : "mouseup", handleMouseup); -return()=>{window.removeEventListener(isMobile?"touchend":"mouseup",handleMouseup);};},[tranboxSetting.hideTranBtn]);(0,react.useEffect)(()=>{if(isExt){return;}const clearShortcut=shortcutRegister(tranboxSetting.tranboxShortcut||DEFAULT_TRANBOX_SHORTCUT,handleTranbox);return()=>{clearShortcut();};},[tranboxSetting.tranboxShortcut,handleTranbox]);(0,react.useEffect)(()=>{window.addEventListener(MSG_OPEN_TRANBOX,handleTranbox);return()=>{window.removeEventListener(MSG_OPEN_TRANBOX,handleTranbox);};},[handleTranbox]);(0,react.useEffect)(()=>{if(!isGm){return;}// 注册菜单 +// window.addEventListener("mouseup", handleMouseup); +window.addEventListener(isMobile?"touchend":"mouseup",handleMouseup);return()=>{window.removeEventListener(isMobile?"touchend":"mouseup",handleMouseup);};},[tranboxSetting.hideTranBtn]);(0,react.useEffect)(()=>{if(isExt){return;}const clearShortcut=shortcutRegister(tranboxSetting.tranboxShortcut||DEFAULT_TRANBOX_SHORTCUT,handleTranbox);return()=>{clearShortcut();};},[tranboxSetting.tranboxShortcut,handleTranbox]);(0,react.useEffect)(()=>{window.addEventListener(MSG_OPEN_TRANBOX,handleTranbox);return()=>{window.removeEventListener(MSG_OPEN_TRANBOX,handleTranbox);};},[handleTranbox]);(0,react.useEffect)(()=>{if(!isGm){return;}// 注册菜单 try{const menuCommandIds=[];contextMenuType!==0&&menuCommandIds.push(GM.registerMenuCommand("Translate Selected Text",event=>{handleTranbox();},"S"));return()=>{menuCommandIds.forEach(id=>{GM.unregisterMenuCommand(id);});};}catch(err){log_kissLog(err,"registerMenuCommand");}},[handleTranbox,contextMenuType]);(0,react.useEffect)(()=>{if(tranboxSetting.hideClickAway){const handleHideBox=()=>{setShowBox(false);};window.addEventListener("click",handleHideBox);return()=>{window.removeEventListener("click",handleHideBox);};}},[tranboxSetting.hideClickAway]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[showBox&&/*#__PURE__*/(0,jsx_runtime.jsx)(TranBox,{text:text,setText:setText,boxSize:boxSize,setBoxSize:setBoxSize,boxPosition:boxPosition,setBoxPosition:setBoxPosition,tranboxSetting:tranboxSetting,transApis:transApis,setShowBox:setShowBox}),showBtn&&/*#__PURE__*/(0,jsx_runtime.jsx)(TranBtn,{position:position,tranboxSetting:tranboxSetting,onClick:handleClick})]});} ;// CONCATENATED MODULE: ./src/libs/touch.js function touchTapListener(fn,touchsLength){const handleTouchend=e=>{if(e.touches.length===touchsLength){fn();}};document.addEventListener("touchstart",handleTouchend);return()=>{document.removeEventListener("touchstart",handleTouchend);};} @@ -33464,7 +33465,7 @@ function touchTapListener(fn,touchsLength){const handleTouchend=e=>{if(e.touches 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:"1.8.5",eventName:ping};};/** + */const injectScript=ping=>{window.APP_INFO={name:"KISS Translator",version:"1.8.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接口的请求 @@ -33487,7 +33488,7 @@ if(getNodeText(node).startsWith(initText)){pasteContentCommand(node,trText);awai ;// 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:"1.8.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:"1.8.6"};}else{const ping=utils_genEventName();window.addEventListener(ping,handlePing);// window.eval(`(${injectScript})("${ping}")`); // eslint-disable-line const script=document.createElement("script");script.textContent="(".concat(injectScript,")(\"").concat(ping,"\")");document.head.append(script);}}/** * 插件监听后端事件 * @param {*} translator @@ -33512,7 +33513,7 @@ const script=document.createElement("script");script.textContent="(".concat(inje */function touchOperation(translator){const{touchTranslate=2}=translator.setting;if(touchTranslate===0){return;}const handleTap=debounce(()=>{translator.toggle();sendIframeMsg(MSG_TRANS_TOGGLE);});touchTapListener(handleTap,touchTranslate);}/** * 入口函数 */async function common_run(){let isUserscript=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;try{const href=document.location.href;// 设置页面 -if(isUserscript&&(href.includes("http://localhost:3000/options.html")||href.includes("https://fishjar.github.io/kiss-translator/options.html")||href.includes("https://kiss-translator.rayjar.com/options"))){runSettingPage();return;}// 读取设置信息 +if(isUserscript&&(href.includes("http://localhost:3000/options.html")||href.includes("https://fishjar.github.io/kiss-translator/options.html"))){runSettingPage();return;}// 读取设置信息 const setting=await getSettingWithDefault();// 黑名单 if(isInBlacklist(href,setting)){return;}// 翻译网页 const rule=await matchRule(href,setting);const translator=new Translator(rule,setting);// 适配iframe diff --git a/main.js b/main.js index 8e60f71..e1aa1a2 100644 --- a/main.js +++ b/main.js @@ -33587,9 +33587,9 @@ fixerFunc:GLOBAL_KEY// 修复函数 ;// CONCATENATED MODULE: ./src/config/app.js const APP_NAME="KISS Translator".trim().split(/\s+/).join("-");const APP_LCNAME=APP_NAME.toLowerCase(); ;// CONCATENATED MODULE: ./src/config/i18n.js -const UI_LANGS=(/* unused pure expression or super */ null && ([["en","English"],["zh","中文"]]));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="/// \u81EA\u5B9A\u4E49\u7FFB\u8BD1\u6E90\u63A5\u53E3\u8BF4\u660E\n\n// \u8BF7\u6C42\uFF08Request\uFF09\u6570\u636E\u5C06\u6309\u4E0B\u9762\u89C4\u8303\u53D1\u9001\n{\n url: {{YOUR_URL}},\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{YOUR_KEY}}\",\n },\n body: {\n text: \"\", // \u9700\u8981\u7FFB\u8BD1\u7684\u6587\u5B57\n from: \"\", // \u6E90\u8BED\u8A00\uFF0C\u53EF\u80FD\u4E3A\u7A7A\uFF0C\u8868\u793A\u9700\u8981\u63A5\u53E3\u81EA\u52A8\u8BC6\u522B\u8BED\u8A00\n to: \"\", // \u76EE\u6807\u8BED\u8A00\n }\n}\n\n// \u8FD4\u56DE\uFF08Response\uFF09\u6570\u636E\u9700\u7B26\u5408\u4E0B\u9762\u7684JSON\u89C4\u8303\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// \u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u5982\u4E0B\n".concat(customApiLangs,"\n");const customApiHelpEN="/// Custom translation source interface description\n\n// Request data will be sent according to the following specifications\n{\n url: {{YOUR_URL}},\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{YOUR_KEY}}\",\n },\n body: {\n text: \"\", // text to be translated\n from: \"\", // Source language, may be empty\n to: \"\", // Target language\n }\n}\n\n// The returned data must conform to the following JSON specification\n{\n text: \"\", // translated text\n from: \"\", // Recognized source language\n to: \"\", // Target language (optional)\n}\n\n// The supported language codes are as follows\n".concat(customApiLangs,"\n");const I18N={app_name:{zh:"\u7B80\u7EA6\u7FFB\u8BD1",en:"KISS Translator"},translate:{zh:"\u7FFB\u8BD1",en:"Translate"},custom_api_help:{zh:customApiHelpZH,en:customApiHelpEN},translate_alt:{zh:"\u7FFB\u8BD1",en:"Translate"},basic_setting:{zh:"\u57FA\u672C\u8BBE\u7F6E",en:"Basic Setting"},rules_setting:{zh:"\u89C4\u5219\u8BBE\u7F6E",en:"Rules Setting"},apis_setting:{zh:"\u63A5\u53E3\u8BBE\u7F6E",en:"Apis Setting"},sync_setting:{zh:"\u540C\u6B65\u8BBE\u7F6E",en:"Sync Setting"},patch_setting:{zh:"\u8865\u4E01\u8BBE\u7F6E",en:"Patch Setting"},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."},inject_webfix:{zh:"\u6CE8\u5165\u4FEE\u590D\u8865\u4E01",en:"Inject Webfix"},about:{zh:"\u5173\u4E8E",en:"About"},about_md:{zh:"README.md",en:"README.en.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.")},ui_lang:{zh:"\u754C\u9762\u8BED\u8A00",en:"Interface Language"},fetch_limit:{zh:"\u6700\u5927\u5E76\u53D1\u8BF7\u6C42\u6570\u91CF (1-100)",en:"Maximum Number Of Concurrent Requests (1-100)"},fetch_interval:{zh:"\u6BCF\u6B21\u8BF7\u6C42\u95F4\u9694\u65F6\u95F4 (0-5000ms)",en:"Time Between Requests (0-5000ms)"},translate_interval:{zh:"\u91CD\u65B0\u7FFB\u8BD1\u95F4\u9694\u65F6\u95F4 (100-5000ms)",en:"Retranslation Interval (100-5000ms)"},min_translate_length:{zh:"\u6700\u5C0F\u7FFB\u8BD1\u5B57\u7B26\u6570 (1-100)",en:"Minimum number Of Translated Characters (1-100)"},max_translate_length:{zh:"\u6700\u5927\u7FFB\u8BD1\u5B57\u7B26\u6570 (100-10000)",en:"Maximum number Of Translated Characters (100-10000)"},num_of_newline_characters:{zh:"\u6362\u884C\u5B57\u7B26\u6570 (1-1000)",en:"Number of Newline Characters (1-1000)"},translate_service:{zh:"\u7FFB\u8BD1\u670D\u52A1",en:"Translate Service"},translate_timing:{zh:"\u7FFB\u8BD1\u65F6\u673A",en:"Translate Timing"},mk_pagescroll:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u7FFB\u8BD1\uFF08\u63A8\u8350\uFF09",en:"Rolling Loading (Suggested)"},mk_pageopen:{zh:"\u9875\u9762\u6253\u5F00\u5168\u90E8\u7FFB\u8BD1",en:"Page Open"},mk_mouseover:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover"},mk_ctrlKey:{zh:"Control + \u9F20\u6807\u60AC\u505C",en:"Control + Mouseover"},mk_shiftKey:{zh:"Shift + \u9F20\u6807\u60AC\u505C",en:"Shift + Mouseover"},mk_altKey:{zh:"Alt + \u9F20\u6807\u60AC\u505C",en:"Alt + Mouseover"},from_lang:{zh:"\u539F\u6587\u8BED\u8A00",en:"Source Language"},to_lang:{zh:"\u76EE\u6807\u8BED\u8A00",en:"Target Language"},to_lang2:{zh:"\u7B2C\u4E8C\u76EE\u6807\u8BED\u8A00",en:"Target Language 2"},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."},text_style:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style"},text_style_alt:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style"},bg_color:{zh:"\u6837\u5F0F\u989C\u8272",en:"Style Color"},remain_unchanged:{zh:"\u4FDD\u7559\u4E0D\u53D8",en:"Remain Unchanged"},google_api:{zh:"\u8C37\u6B4C\u7FFB\u8BD1\u63A5\u53E3",en:"Google Translate API"},default_selector:{zh:"\u9ED8\u8BA4\u9009\u62E9\u5668",en:"Default selector"},selector_rules:{zh:"\u9009\u62E9\u5668\u89C4\u5219",en:"Selector Rules"},save:{zh:"\u4FDD\u5B58",en:"Save"},edit:{zh:"\u7F16\u8F91",en:"Edit"},cancel:{zh:"\u53D6\u6D88",en:"Cancel"},delete:{zh:"\u5220\u9664",en:"Delete"},reset:{zh:"\u91CD\u7F6E",en:"Reset"},add:{zh:"\u6DFB\u52A0",en:"Add"},inject_rules:{zh:"\u6CE8\u5165\u8BA2\u9605\u89C4\u5219",en:"Inject Subscribe Rules"},personal_rules:{zh:"\u4E2A\u4EBA\u89C4\u5219",en:"Rules"},subscribe_rules:{zh:"\u8BA2\u9605\u89C4\u5219",en:"Subscribe"},overwrite_subscribe_rules:{zh:"\u8986\u5199\u8BA2\u9605\u89C4\u5219",en:"Overwrite"},subscribe_url:{zh:"\u8BA2\u9605\u5730\u5740",en:"Subscribe URL"},rules_warn_1:{zh:"1\u3001\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u4E00\u76F4\u751F\u6548\uFF0C\u9009\u62E9\u201C\u6CE8\u5165\u8BA2\u9605\u89C4\u5219\u201D\u540E\uFF0C\u201C\u8BA2\u9605\u89C4\u5219\u201D\u624D\u4F1A\u751F\u6548\u3002",en:"1. The \"Personal Rules\" are always in effect. After selecting \"Inject Subscription Rules\", the \"Subscription Rules\" will take effect."},rules_warn_2:{zh:"2\u3001\u201C\u8BA2\u9605\u89C4\u5219\u201D\u7684\u6CE8\u5165\u4F4D\u7F6E\u662F\u5012\u6570\u7B2C\u4E8C\u7684\u4F4D\u7F6E\uFF0C\u56E0\u6B64\u9664\u5168\u5C40\u89C4\u5219(*)\u5916\uFF0C\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u4F18\u5148\u7EA7\u6BD4\u201C\u8BA2\u9605\u89C4\u5219\u201D\u9AD8\uFF0C\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u586B\u5199\u540C\u6837\u7684\u7F51\u5740\u4F1A\u8986\u76D6\u201D\u8BA2\u9605\u89C4\u5219\u201C\u7684\u6761\u76EE\u3002",en:"2. The injection position of \"Subscription Rules\" is the penultimate position. Therefore, except for the global rules (*), the priority of \"Personal Rules\" is higher than that of \"Subscription Rules\". Filling in the same url in \"Personal Rules\" will overwrite \"Subscription Rules\" entry."},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."},sync_warn:{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."},about_sync_api:{zh:"\u67E5\u770B\u5173\u4E8E\u6570\u636E\u540C\u6B65\u63A5\u53E3\u90E8\u7F72",en:"View About Data Synchronization Interface Deployment"},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"},style_none:{zh:"\u65E0",en:"None"},under_line:{zh:"\u4E0B\u5212\u76F4\u7EBF",en:"Underline"},dot_line:{zh:"\u4E0B\u5212\u70B9\u72B6\u7EBF",en:"Dotted Underline"},dash_line:{zh:"\u4E0B\u5212\u865A\u7EBF",en:"Dashed Underline"},wavy_line:{zh:"\u4E0B\u5212\u6CE2\u6D6A\u7EBF",en:"Wavy Underline"},fuzzy:{zh:"\u6A21\u7CCA",en:"Fuzzy"},highlight:{zh:"\u9AD8\u4EAE",en:"Highlight"},blockquote:{zh:"\u5F15\u7528",en:"Blockquote"},diy_style:{zh:"\u81EA\u5B9A\u4E49\u6837\u5F0F",en:"Custom Style"},diy_style_helper:{zh:"\u9075\u5FAA\u201CCSS\u201D\u7684\u8BED\u6CD5",en:"Follow the syntax of \"CSS\""},setting:{zh:"\u8BBE\u7F6E",en:"Setting"},pattern:{zh:"\u5339\u914D\u7F51\u5740",en:"URL pattern"},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 \",\"."},selector_helper:{zh:"1\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u30022\u3001\u591A\u4E2ACSS\u9009\u62E9\u5668\u4E4B\u95F4\u7528\u201C;\u201D\u9694\u5F00\u30023\u3001\u201Cshadow root\u201D\u9009\u62E9\u5668\u548C\u5185\u90E8\u9009\u62E9\u5668\u7528\u201C>>>\u201D\u9694\u5F00\u3002",en:"1. Follow CSS selector syntax. 2. Separate multiple CSS selectors with \";\". 3. The \"shadow root\" selector and the internal selector are separated by \">>>\"."},translate_switch:{zh:"\u5F00\u542F\u7FFB\u8BD1",en:"Translate Switch"},default_enabled:{zh:"\u9ED8\u8BA4\u5F00\u542F",en:"Enabled"},default_disabled:{zh:"\u9ED8\u8BA4\u5173\u95ED",en:"Disabled"},selector:{zh:"\u9009\u62E9\u5668",en:"Selector"},keep_selector:{zh:"\u4FDD\u7559\u5143\u7D20\u9009\u62E9\u5668",en:"Keep unchanged selector"},keep_selector_helper:{zh:"1\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u30022\u3001\u5B50\u5143\u7D20\u9009\u62E9\u5668\u7528\u201C>>>\u201D\u9694\u5F00\u3002",en:"1. Follow CSS selector syntax. 2. Sub-element selectors are separated by \">>>\"."},terms:{zh:"\u4E13\u4E1A\u672F\u8BED",en:"Terms"},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."},selector_style:{zh:"\u9009\u62E9\u5668\u8282\u70B9\u6837\u5F0F",en:"Selector Style"},selector_style_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u4E0D\u4F1A\u79FB\u9664\u3002",en:"It is injected when translation is turned on and will not be removed when translation is turned off."},selector_parent_style:{zh:"\u9009\u62E9\u5668\u7236\u8282\u70B9\u6837\u5F0F",en:"Selector Parent Style"},inject_js:{zh:"\u6CE8\u5165JS",en:"Inject JS"},inject_js_helper:{zh:"1\u3001\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\u8FD0\u884C\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u79FB\u9664\u30022\u3001\u968F\u7740\u9875\u9762\u53D8\u5316\uFF0C\u53EF\u80FD\u4F1A\u591A\u6B21\u6CE8\u5165\u8FD0\u884C\u3002",en:"1. Inject and run when translation is turned on, and removed when translation is turned off. 2. As the page changes, it may be injected and run multiple times."},inject_css:{zh:"\u6CE8\u5165CSS",en:"Inject CSS"},inject_css_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u5C06\u79FB\u9664\u3002",en:"Injected when translation is enabled and removed when translation is disabled."},root_selector:{zh:"\u6839\u9009\u62E9\u5668",en:"Root Selector"},fixer_function:{zh:"\u4FEE\u590D\u51FD\u6570",en:"Fixer Function"},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

."},import:{zh:"\u5BFC\u5165",en:"Import"},export:{zh:"\u5BFC\u51FA",en:"Export"},error_cant_be_blank:{zh:"\u4E0D\u80FD\u4E3A\u7A7A",en:"Can not be blank"},error_duplicate_values:{zh:"\u5B58\u5728\u91CD\u590D\u7684\u503C",en:"There are duplicate values"},error_wrong_file_type:{zh:"\u9519\u8BEF\u7684\u6587\u4EF6\u7C7B\u578B",en:"Wrong file type"},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."},deepl_api:{zh:"DeepL \u63A5\u53E3",en:"DeepL API"},deepl_key:{zh:"DeepL \u5BC6\u94A5",en:"DeepL Key"},openai_api:{zh:"OpenAI \u63A5\u53E3",en:"OpenAI API"},openai_key:{zh:"OpenAI \u5BC6\u94A5",en:"OpenAI Key"},openai_model:{zh:"OpenAI \u6A21\u578B",en:"OpenAI Model"},openai_prompt:{zh:"OpenAI \u63D0\u793A\u8BCD",en:"OpenAI Prompt"},if_clear_cache:{zh:"\u662F\u5426\u6E05\u9664\u7F13\u5B58",en:"Whether clear cache"},clear_cache_never:{zh:"\u4E0D\u6E05\u9664\u7F13\u5B58",en:"Never clear cache"},clear_cache_restart:{zh:"\u91CD\u542F\u6D4F\u89C8\u5668\u65F6\u6E05\u9664\u7F13\u5B58",en:"Clear cache when restarting browser"},data_sync_type:{zh:"\u6570\u636E\u540C\u6B65\u65B9\u5F0F",en:"Data Sync Type"},data_sync_url:{zh:"\u6570\u636E\u540C\u6B65\u63A5\u53E3",en:"Data Sync API"},data_sync_user:{zh:"\u6570\u636E\u540C\u6B65\u8D26\u6237",en:"Data Sync User"},data_sync_key:{zh:"\u6570\u636E\u540C\u6B65\u5BC6\u94A5",en:"Data Sync Key"},sync_now:{zh:"\u7ACB\u5373\u540C\u6B65",en:"Sync Now"},sync_success:{zh:"\u540C\u6B65\u6210\u529F\uFF01",en:"Sync Success"},sync_failed:{zh:"\u540C\u6B65\u5931\u8D25\uFF01",en:"Sync Error"},error_got_some_wrong:{zh:"\u62B1\u6B49\uFF0C\u51FA\u9519\u4E86\uFF01",en:"Sorry, something went wrong!"},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"},click_test:{zh:"\u70B9\u51FB\u6D4B\u8BD5",en:"Click Test"},test_success:{zh:"\u6D4B\u8BD5\u6210\u529F",en:"Test success"},test_failed:{zh:"\u6D4B\u8BD5\u5931\u8D25",en:"Test failed"},clear_all_cache_now:{zh:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u7F13\u5B58",en:"Clear all cache now"},clear_cache:{zh:"\u6E05\u9664\u7F13\u5B58",en:"Clear Cache"},clear_success:{zh:"\u6E05\u9664\u6210\u529F",en:"Clear success"},clear_failed:{zh:"\u6E05\u9664\u5931\u8D25",en:"Clear failed"},share:{zh:"\u5206\u4EAB",en:"Share"},clear_all:{zh:"\u6E05\u7A7A",en:"Clear All"},help:{zh:"\u6C42\u52A9",en:"Help"},restore_default:{zh:"\u6062\u590D\u9ED8\u8BA4",en:"Restore Default"},shortcuts_setting:{zh:"\u5FEB\u6377\u952E\u8BBE\u7F6E",en:"Shortcuts Setting"},toggle_translate_shortcut:{zh:"\"\u5F00\u542F\u7FFB\u8BD1\"\u5FEB\u6377\u952E",en:"\"Toggle Translate\" Shortcut"},toggle_style_shortcut:{zh:"\"\u5207\u6362\u6837\u5F0F\"\u5FEB\u6377\u952E",en:"\"Toggle Style\" Shortcut"},toggle_popup_shortcut:{zh:"\"\u6253\u5F00\u5F39\u7A97\"\u5FEB\u6377\u952E",en:"\"Open Popup\" Shortcut"},open_setting_shortcut:{zh:"\"\u6253\u5F00\u8BBE\u7F6E\"\u5FEB\u6377\u952E",en:"\"Open Setting\" Shortcut"},hide_fab_button:{zh:"\u9690\u85CF\u60AC\u6D6E\u6309\u94AE",en:"Hide Fab Button"},hide_tran_button:{zh:"\u9690\u85CF\u7FFB\u8BD1\u6309\u94AE",en:"Hide Translate Button"},hide_click_away:{zh:"\u70B9\u51FB\u5916\u90E8\u5173\u95ED\u5F39\u7A97",en:"Click outside to close the pop-up window"},show:{zh:"\u663E\u793A",en:"Show"},hide:{zh:"\u9690\u85CF",en:"Hide"},save_rule:{zh:"\u4FDD\u5B58\u89C4\u5219",en:"Save Rule"},global_rule:{zh:"\u5168\u5C40\u89C4\u5219",en:"Global Rule"},input_translate:{zh:"\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation"},use_input_box_translation:{zh:"\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation"},input_selector:{zh:"\u8F93\u5165\u6846\u9009\u62E9\u5668",en:"Input Selector"},input_selector_helper:{zh:"\u7528\u4E8E\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",en:"Used for input box translation."},trigger_trans_shortcut:{zh:"\u89E6\u53D1\u7FFB\u8BD1\u5FEB\u6377\u952E",en:"Trigger Translation Shortcut Keys"},trigger_trans_shortcut_help:{zh:"\u9ED8\u8BA4\u4E3A\u5355\u51FB\u201CAltLeft+KeyI\u201D",en:"Default is \"AltLeft+KeyI\""},shortcut_press_count:{zh:"\u5FEB\u6377\u952E\u8FDE\u51FB\u6B21\u6570",en:"Shortcut Press Number"},combo_timeout:{zh:"\u8FDE\u51FB\u8D85\u65F6\u65F6\u95F4 (10-1000ms)",en:"Combo Timeout (10-1000ms)"},input_trans_start_sign:{zh:"\u7FFB\u8BD1\u8D77\u59CB\u6807\u8BC6",en:"Translation Start Sign"},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\""},detect_lang_remote:{zh:"\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B",en:"Remote language detection"},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."},disable:{zh:"\u7981\u7528",en:"Disable"},enable:{zh:"\u542F\u7528",en:"Enable"},selection_translate:{zh:"\u5212\u8BCD\u7FFB\u8BD1",en:"Selection Translate"},toggle_selection_translate:{zh:"\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"Use Selection Translate"},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"},tranbtn_offset_x:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBX\uFF080-100\uFF09",en:"Translate Button Offset X (0-100)"},tranbtn_offset_y:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBY\uFF080-100\uFF09",en:"Translate Button Offset Y (0-100)"},translated_text:{zh:"\u8BD1\u6587",en:"Translated Text"},original_text:{zh:"\u539F\u6587",en:"Original Text"},favorite_words:{zh:"\u6536\u85CF\u8BCD\u6C47",en:"Favorite Words"},touch_setting:{zh:"\u89E6\u5C4F\u8BBE\u7F6E",en:"Touch Setting"},touch_translate_shortcut:{zh:"\u89E6\u5C4F\u7FFB\u8BD1\u5FEB\u6377\u65B9\u5F0F",en:"Touch Translate Shortcut"},touch_tap_0:{zh:"\u7981\u7528",en:"Disable"},touch_tap_2:{zh:"\u53CC\u6307\u8F7B\u89E6",en:"Two finger tap"},touch_tap_3:{zh:"\u4E09\u6307\u8F7B\u89E6",en:"Three finger tap"},touch_tap_4:{zh:"\u56DB\u6307\u8F7B\u89E6",en:"Four finger tap"},translate_blacklist:{zh:"\u7981\u7528\u7FFB\u8BD1\u540D\u5355",en:"Translate Blacklist"},disabled_csplist:{zh:"\u7981\u7528CSP\u540D\u5355",en:"Disabled CSP List"},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."},skip_langs:{zh:"\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",en:"Disable Languages"},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."},context_menus:{zh:"\u53F3\u952E\u83DC\u5355",en:"Context Menus"},hide_context_menus:{zh:"\u9690\u85CF\u53F3\u952E\u83DC\u5355",en:"Hide Context Menus"},simple_context_menus:{zh:"\u7B80\u5355\u53F3\u952E\u83DC\u5355",en:"Simple_context_menus Context Menus"},secondary_context_menus:{zh:"\u4E8C\u7EA7\u53F3\u952E\u83DC\u5355",en:"Secondary Context Menus"},mulkeys_help:{zh:"\u652F\u6301\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\u591A\u4E2AKEY\u8F6E\u8BE2\u8C03\u7528\u3002",en:"Supports multiple KEY polling calls separated by newlines or English commas \",\"."},translation_element_tag:{zh:"\u8BD1\u6587\u5143\u7D20\u6807\u7B7E",en:"Translation Element Tag"},show_only_translations:{zh:"\u4EC5\u663E\u793A\u8BD1\u6587",en:"Show Only Translations"},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."},translate_page_title:{zh:"\u662F\u5426\u7FFB\u8BD1\u9875\u9762\u6807\u9898",en:"Translate Page Title"},more:{zh:"\u66F4\u591A",en:"More"},fixer_selector:{zh:"\u7F51\u9875\u4FEE\u590D\u9009\u62E9\u5668",en:"Fixer Selector"}}; +const UI_LANGS=(/* unused pure expression or super */ null && ([["en","English"],["zh","中文"]]));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="/// \u81EA\u5B9A\u4E49\u7FFB\u8BD1\u6E90\u63A5\u53E3\u8BF4\u660E\n\n// \u8BF7\u6C42\uFF08Request\uFF09\u6570\u636E\u5C06\u6309\u4E0B\u9762\u89C4\u8303\u53D1\u9001\n{\n url: {{YOUR_URL}},\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{YOUR_KEY}}\",\n },\n body: {\n text: \"\", // \u9700\u8981\u7FFB\u8BD1\u7684\u6587\u5B57\n from: \"\", // \u6E90\u8BED\u8A00\uFF0C\u53EF\u80FD\u4E3A\u7A7A\uFF0C\u8868\u793A\u9700\u8981\u63A5\u53E3\u81EA\u52A8\u8BC6\u522B\u8BED\u8A00\n to: \"\", // \u76EE\u6807\u8BED\u8A00\n }\n}\n\n// \u8FD4\u56DE\uFF08Response\uFF09\u6570\u636E\u9700\u7B26\u5408\u4E0B\u9762\u7684JSON\u89C4\u8303\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// \u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u5982\u4E0B\n".concat(customApiLangs,"\n");const customApiHelpEN="/// Custom translation source interface description\n\n// Request data will be sent according to the following specifications\n{\n url: {{YOUR_URL}},\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{YOUR_KEY}}\",\n },\n body: {\n text: \"\", // text to be translated\n from: \"\", // Source language, may be empty\n to: \"\", // Target language\n }\n}\n\n// The returned data must conform to the following JSON specification\n{\n text: \"\", // translated text\n from: \"\", // Recognized source language\n to: \"\", // Target language (optional)\n}\n\n// The supported language codes are as follows\n".concat(customApiLangs,"\n");const I18N={app_name:{zh:"\u7B80\u7EA6\u7FFB\u8BD1",en:"KISS Translator"},translate:{zh:"\u7FFB\u8BD1",en:"Translate"},custom_api_help:{zh:customApiHelpZH,en:customApiHelpEN},translate_alt:{zh:"\u7FFB\u8BD1",en:"Translate"},basic_setting:{zh:"\u57FA\u672C\u8BBE\u7F6E",en:"Basic Setting"},rules_setting:{zh:"\u89C4\u5219\u8BBE\u7F6E",en:"Rules Setting"},apis_setting:{zh:"\u63A5\u53E3\u8BBE\u7F6E",en:"Apis Setting"},sync_setting:{zh:"\u540C\u6B65\u8BBE\u7F6E",en:"Sync Setting"},patch_setting:{zh:"\u8865\u4E01\u8BBE\u7F6E",en:"Patch Setting"},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."},inject_webfix:{zh:"\u6CE8\u5165\u4FEE\u590D\u8865\u4E01",en:"Inject Webfix"},about:{zh:"\u5173\u4E8E",en:"About"},about_md:{zh:"README.md",en:"README.en.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.")},ui_lang:{zh:"\u754C\u9762\u8BED\u8A00",en:"Interface Language"},fetch_limit:{zh:"\u6700\u5927\u5E76\u53D1\u8BF7\u6C42\u6570\u91CF (1-100)",en:"Maximum Number Of Concurrent Requests (1-100)"},fetch_interval:{zh:"\u6BCF\u6B21\u8BF7\u6C42\u95F4\u9694\u65F6\u95F4 (0-5000ms)",en:"Time Between Requests (0-5000ms)"},translate_interval:{zh:"\u91CD\u65B0\u7FFB\u8BD1\u95F4\u9694\u65F6\u95F4 (100-5000ms)",en:"Retranslation Interval (100-5000ms)"},min_translate_length:{zh:"\u6700\u5C0F\u7FFB\u8BD1\u5B57\u7B26\u6570 (1-100)",en:"Minimum number Of Translated Characters (1-100)"},max_translate_length:{zh:"\u6700\u5927\u7FFB\u8BD1\u5B57\u7B26\u6570 (100-10000)",en:"Maximum number Of Translated Characters (100-10000)"},num_of_newline_characters:{zh:"\u6362\u884C\u5B57\u7B26\u6570 (1-1000)",en:"Number of Newline Characters (1-1000)"},translate_service:{zh:"\u7FFB\u8BD1\u670D\u52A1",en:"Translate Service"},translate_timing:{zh:"\u7FFB\u8BD1\u65F6\u673A",en:"Translate Timing"},mk_pagescroll:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u7FFB\u8BD1\uFF08\u63A8\u8350\uFF09",en:"Rolling Loading (Suggested)"},mk_pageopen:{zh:"\u9875\u9762\u6253\u5F00\u5168\u90E8\u7FFB\u8BD1",en:"Page Open"},mk_mouseover:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover"},mk_ctrlKey:{zh:"Control + \u9F20\u6807\u60AC\u505C",en:"Control + Mouseover"},mk_shiftKey:{zh:"Shift + \u9F20\u6807\u60AC\u505C",en:"Shift + Mouseover"},mk_altKey:{zh:"Alt + \u9F20\u6807\u60AC\u505C",en:"Alt + Mouseover"},from_lang:{zh:"\u539F\u6587\u8BED\u8A00",en:"Source Language"},to_lang:{zh:"\u76EE\u6807\u8BED\u8A00",en:"Target Language"},to_lang2:{zh:"\u7B2C\u4E8C\u76EE\u6807\u8BED\u8A00",en:"Target Language 2"},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."},text_style:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style"},text_style_alt:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style"},bg_color:{zh:"\u6837\u5F0F\u989C\u8272",en:"Style Color"},remain_unchanged:{zh:"\u4FDD\u7559\u4E0D\u53D8",en:"Remain Unchanged"},google_api:{zh:"\u8C37\u6B4C\u7FFB\u8BD1\u63A5\u53E3",en:"Google Translate API"},default_selector:{zh:"\u9ED8\u8BA4\u9009\u62E9\u5668",en:"Default selector"},selector_rules:{zh:"\u9009\u62E9\u5668\u89C4\u5219",en:"Selector Rules"},save:{zh:"\u4FDD\u5B58",en:"Save"},edit:{zh:"\u7F16\u8F91",en:"Edit"},cancel:{zh:"\u53D6\u6D88",en:"Cancel"},delete:{zh:"\u5220\u9664",en:"Delete"},reset:{zh:"\u91CD\u7F6E",en:"Reset"},add:{zh:"\u6DFB\u52A0",en:"Add"},inject_rules:{zh:"\u6CE8\u5165\u8BA2\u9605\u89C4\u5219",en:"Inject Subscribe Rules"},personal_rules:{zh:"\u4E2A\u4EBA\u89C4\u5219",en:"Rules"},subscribe_rules:{zh:"\u8BA2\u9605\u89C4\u5219",en:"Subscribe"},overwrite_subscribe_rules:{zh:"\u8986\u5199\u8BA2\u9605\u89C4\u5219",en:"Overwrite"},subscribe_url:{zh:"\u8BA2\u9605\u5730\u5740",en:"Subscribe URL"},rules_warn_1:{zh:"1\u3001\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u4E00\u76F4\u751F\u6548\uFF0C\u9009\u62E9\u201C\u6CE8\u5165\u8BA2\u9605\u89C4\u5219\u201D\u540E\uFF0C\u201C\u8BA2\u9605\u89C4\u5219\u201D\u624D\u4F1A\u751F\u6548\u3002",en:"1. The \"Personal Rules\" are always in effect. After selecting \"Inject Subscription Rules\", the \"Subscription Rules\" will take effect."},rules_warn_2:{zh:"2\u3001\u201C\u8BA2\u9605\u89C4\u5219\u201D\u7684\u6CE8\u5165\u4F4D\u7F6E\u662F\u5012\u6570\u7B2C\u4E8C\u7684\u4F4D\u7F6E\uFF0C\u56E0\u6B64\u9664\u5168\u5C40\u89C4\u5219(*)\u5916\uFF0C\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u4F18\u5148\u7EA7\u6BD4\u201C\u8BA2\u9605\u89C4\u5219\u201D\u9AD8\uFF0C\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u586B\u5199\u540C\u6837\u7684\u7F51\u5740\u4F1A\u8986\u76D6\u201D\u8BA2\u9605\u89C4\u5219\u201C\u7684\u6761\u76EE\u3002",en:"2. The injection position of \"Subscription Rules\" is the penultimate position. Therefore, except for the global rules (*), the priority of \"Personal Rules\" is higher than that of \"Subscription Rules\". Filling in the same url in \"Personal Rules\" will overwrite \"Subscription Rules\" entry."},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."},sync_warn:{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."},about_sync_api:{zh:"\u67E5\u770B\u5173\u4E8E\u6570\u636E\u540C\u6B65\u63A5\u53E3\u90E8\u7F72",en:"View About Data Synchronization Interface Deployment"},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"},style_none:{zh:"\u65E0",en:"None"},under_line:{zh:"\u4E0B\u5212\u76F4\u7EBF",en:"Underline"},dot_line:{zh:"\u4E0B\u5212\u70B9\u72B6\u7EBF",en:"Dotted Underline"},dash_line:{zh:"\u4E0B\u5212\u865A\u7EBF",en:"Dashed Underline"},wavy_line:{zh:"\u4E0B\u5212\u6CE2\u6D6A\u7EBF",en:"Wavy Underline"},fuzzy:{zh:"\u6A21\u7CCA",en:"Fuzzy"},highlight:{zh:"\u9AD8\u4EAE",en:"Highlight"},blockquote:{zh:"\u5F15\u7528",en:"Blockquote"},diy_style:{zh:"\u81EA\u5B9A\u4E49\u6837\u5F0F",en:"Custom Style"},diy_style_helper:{zh:"\u9075\u5FAA\u201CCSS\u201D\u7684\u8BED\u6CD5",en:"Follow the syntax of \"CSS\""},setting:{zh:"\u8BBE\u7F6E",en:"Setting"},pattern:{zh:"\u5339\u914D\u7F51\u5740",en:"URL pattern"},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 \",\"."},selector_helper:{zh:"1\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u30022\u3001\u591A\u4E2ACSS\u9009\u62E9\u5668\u4E4B\u95F4\u7528\u201C;\u201D\u9694\u5F00\u30023\u3001\u201Cshadow root\u201D\u9009\u62E9\u5668\u548C\u5185\u90E8\u9009\u62E9\u5668\u7528\u201C>>>\u201D\u9694\u5F00\u3002",en:"1. Follow CSS selector syntax. 2. Separate multiple CSS selectors with \";\". 3. The \"shadow root\" selector and the internal selector are separated by \">>>\"."},translate_switch:{zh:"\u5F00\u542F\u7FFB\u8BD1",en:"Translate Switch"},default_enabled:{zh:"\u9ED8\u8BA4\u5F00\u542F",en:"Enabled"},default_disabled:{zh:"\u9ED8\u8BA4\u5173\u95ED",en:"Disabled"},selector:{zh:"\u9009\u62E9\u5668",en:"Selector"},keep_selector:{zh:"\u4FDD\u7559\u5143\u7D20\u9009\u62E9\u5668",en:"Keep unchanged selector"},keep_selector_helper:{zh:"1\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u30022\u3001\u5B50\u5143\u7D20\u9009\u62E9\u5668\u7528\u201C>>>\u201D\u9694\u5F00\u3002",en:"1. Follow CSS selector syntax. 2. Sub-element selectors are separated by \">>>\"."},terms:{zh:"\u4E13\u4E1A\u672F\u8BED",en:"Terms"},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."},selector_style:{zh:"\u9009\u62E9\u5668\u8282\u70B9\u6837\u5F0F",en:"Selector Style"},selector_style_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u4E0D\u4F1A\u79FB\u9664\u3002",en:"It is injected when translation is turned on and will not be removed when translation is turned off."},selector_parent_style:{zh:"\u9009\u62E9\u5668\u7236\u8282\u70B9\u6837\u5F0F",en:"Selector Parent Style"},inject_js:{zh:"\u6CE8\u5165JS",en:"Inject JS"},inject_js_helper:{zh:"1\u3001\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\u8FD0\u884C\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u79FB\u9664\u30022\u3001\u968F\u7740\u9875\u9762\u53D8\u5316\uFF0C\u53EF\u80FD\u4F1A\u591A\u6B21\u6CE8\u5165\u8FD0\u884C\u3002",en:"1. Inject and run when translation is turned on, and removed when translation is turned off. 2. As the page changes, it may be injected and run multiple times."},inject_css:{zh:"\u6CE8\u5165CSS",en:"Inject CSS"},inject_css_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u5C06\u79FB\u9664\u3002",en:"Injected when translation is enabled and removed when translation is disabled."},root_selector:{zh:"\u6839\u9009\u62E9\u5668",en:"Root Selector"},fixer_function:{zh:"\u4FEE\u590D\u51FD\u6570",en:"Fixer Function"},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

."},import:{zh:"\u5BFC\u5165",en:"Import"},export:{zh:"\u5BFC\u51FA",en:"Export"},error_cant_be_blank:{zh:"\u4E0D\u80FD\u4E3A\u7A7A",en:"Can not be blank"},error_duplicate_values:{zh:"\u5B58\u5728\u91CD\u590D\u7684\u503C",en:"There are duplicate values"},error_wrong_file_type:{zh:"\u9519\u8BEF\u7684\u6587\u4EF6\u7C7B\u578B",en:"Wrong file type"},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."},deepl_api:{zh:"DeepL \u63A5\u53E3",en:"DeepL API"},deepl_key:{zh:"DeepL \u5BC6\u94A5",en:"DeepL Key"},openai_api:{zh:"OpenAI \u63A5\u53E3",en:"OpenAI API"},openai_key:{zh:"OpenAI \u5BC6\u94A5",en:"OpenAI Key"},openai_model:{zh:"OpenAI \u6A21\u578B",en:"OpenAI Model"},openai_prompt:{zh:"OpenAI \u63D0\u793A\u8BCD",en:"OpenAI Prompt"},if_clear_cache:{zh:"\u662F\u5426\u6E05\u9664\u7F13\u5B58",en:"Whether clear cache"},clear_cache_never:{zh:"\u4E0D\u6E05\u9664\u7F13\u5B58",en:"Never clear cache"},clear_cache_restart:{zh:"\u91CD\u542F\u6D4F\u89C8\u5668\u65F6\u6E05\u9664\u7F13\u5B58",en:"Clear cache when restarting browser"},data_sync_type:{zh:"\u6570\u636E\u540C\u6B65\u65B9\u5F0F",en:"Data Sync Type"},data_sync_url:{zh:"\u6570\u636E\u540C\u6B65\u63A5\u53E3",en:"Data Sync API"},data_sync_user:{zh:"\u6570\u636E\u540C\u6B65\u8D26\u6237",en:"Data Sync User"},data_sync_key:{zh:"\u6570\u636E\u540C\u6B65\u5BC6\u94A5",en:"Data Sync Key"},sync_now:{zh:"\u7ACB\u5373\u540C\u6B65",en:"Sync Now"},sync_success:{zh:"\u540C\u6B65\u6210\u529F\uFF01",en:"Sync Success"},sync_failed:{zh:"\u540C\u6B65\u5931\u8D25\uFF01",en:"Sync Error"},error_got_some_wrong:{zh:"\u62B1\u6B49\uFF0C\u51FA\u9519\u4E86\uFF01",en:"Sorry, something went wrong!"},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"},click_test:{zh:"\u70B9\u51FB\u6D4B\u8BD5",en:"Click Test"},test_success:{zh:"\u6D4B\u8BD5\u6210\u529F",en:"Test success"},test_failed:{zh:"\u6D4B\u8BD5\u5931\u8D25",en:"Test failed"},clear_all_cache_now:{zh:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u7F13\u5B58",en:"Clear all cache now"},clear_cache:{zh:"\u6E05\u9664\u7F13\u5B58",en:"Clear Cache"},clear_success:{zh:"\u6E05\u9664\u6210\u529F",en:"Clear success"},clear_failed:{zh:"\u6E05\u9664\u5931\u8D25",en:"Clear failed"},share:{zh:"\u5206\u4EAB",en:"Share"},clear_all:{zh:"\u6E05\u7A7A",en:"Clear All"},help:{zh:"\u6C42\u52A9",en:"Help"},restore_default:{zh:"\u6062\u590D\u9ED8\u8BA4",en:"Restore Default"},shortcuts_setting:{zh:"\u5FEB\u6377\u952E\u8BBE\u7F6E",en:"Shortcuts Setting"},toggle_translate_shortcut:{zh:"\"\u5F00\u542F\u7FFB\u8BD1\"\u5FEB\u6377\u952E",en:"\"Toggle Translate\" Shortcut"},toggle_style_shortcut:{zh:"\"\u5207\u6362\u6837\u5F0F\"\u5FEB\u6377\u952E",en:"\"Toggle Style\" Shortcut"},toggle_popup_shortcut:{zh:"\"\u6253\u5F00\u5F39\u7A97\"\u5FEB\u6377\u952E",en:"\"Open Popup\" Shortcut"},open_setting_shortcut:{zh:"\"\u6253\u5F00\u8BBE\u7F6E\"\u5FEB\u6377\u952E",en:"\"Open Setting\" Shortcut"},hide_fab_button:{zh:"\u9690\u85CF\u60AC\u6D6E\u6309\u94AE",en:"Hide Fab Button"},hide_tran_button:{zh:"\u9690\u85CF\u7FFB\u8BD1\u6309\u94AE",en:"Hide Translate Button"},hide_click_away:{zh:"\u70B9\u51FB\u5916\u90E8\u5173\u95ED\u5F39\u7A97",en:"Click outside to close the pop-up window"},show:{zh:"\u663E\u793A",en:"Show"},hide:{zh:"\u9690\u85CF",en:"Hide"},save_rule:{zh:"\u4FDD\u5B58\u89C4\u5219",en:"Save Rule"},global_rule:{zh:"\u5168\u5C40\u89C4\u5219",en:"Global Rule"},input_translate:{zh:"\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation"},use_input_box_translation:{zh:"\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation"},input_selector:{zh:"\u8F93\u5165\u6846\u9009\u62E9\u5668",en:"Input Selector"},input_selector_helper:{zh:"\u7528\u4E8E\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",en:"Used for input box translation."},trigger_trans_shortcut:{zh:"\u89E6\u53D1\u7FFB\u8BD1\u5FEB\u6377\u952E",en:"Trigger Translation Shortcut Keys"},trigger_trans_shortcut_help:{zh:"\u9ED8\u8BA4\u4E3A\u5355\u51FB\u201CAltLeft+KeyI\u201D",en:"Default is \"AltLeft+KeyI\""},shortcut_press_count:{zh:"\u5FEB\u6377\u952E\u8FDE\u51FB\u6B21\u6570",en:"Shortcut Press Number"},combo_timeout:{zh:"\u8FDE\u51FB\u8D85\u65F6\u65F6\u95F4 (10-1000ms)",en:"Combo Timeout (10-1000ms)"},input_trans_start_sign:{zh:"\u7FFB\u8BD1\u8D77\u59CB\u6807\u8BC6",en:"Translation Start Sign"},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\""},detect_lang_remote:{zh:"\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B",en:"Remote language detection"},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."},disable:{zh:"\u7981\u7528",en:"Disable"},enable:{zh:"\u542F\u7528",en:"Enable"},selection_translate:{zh:"\u5212\u8BCD\u7FFB\u8BD1",en:"Selection Translate"},toggle_selection_translate:{zh:"\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"Use Selection Translate"},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"},tranbtn_offset_x:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBX\uFF080-100\uFF09",en:"Translate Button Offset X (0-100)"},tranbtn_offset_y:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBY\uFF080-100\uFF09",en:"Translate Button Offset Y (0-100)"},translated_text:{zh:"\u8BD1\u6587",en:"Translated Text"},original_text:{zh:"\u539F\u6587",en:"Original Text"},favorite_words:{zh:"\u6536\u85CF\u8BCD\u6C47",en:"Favorite Words"},touch_setting:{zh:"\u89E6\u5C4F\u8BBE\u7F6E",en:"Touch Setting"},touch_translate_shortcut:{zh:"\u89E6\u5C4F\u7FFB\u8BD1\u5FEB\u6377\u65B9\u5F0F",en:"Touch Translate Shortcut"},touch_tap_0:{zh:"\u7981\u7528",en:"Disable"},touch_tap_2:{zh:"\u53CC\u6307\u8F7B\u89E6",en:"Two finger tap"},touch_tap_3:{zh:"\u4E09\u6307\u8F7B\u89E6",en:"Three finger tap"},touch_tap_4:{zh:"\u56DB\u6307\u8F7B\u89E6",en:"Four finger tap"},translate_blacklist:{zh:"\u7981\u7528\u7FFB\u8BD1\u540D\u5355",en:"Translate Blacklist"},disabled_csplist:{zh:"\u7981\u7528CSP\u540D\u5355",en:"Disabled CSP List"},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."},skip_langs:{zh:"\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",en:"Disable Languages"},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."},context_menus:{zh:"\u53F3\u952E\u83DC\u5355",en:"Context Menus"},hide_context_menus:{zh:"\u9690\u85CF\u53F3\u952E\u83DC\u5355",en:"Hide Context Menus"},simple_context_menus:{zh:"\u7B80\u5355\u53F3\u952E\u83DC\u5355",en:"Simple_context_menus Context Menus"},secondary_context_menus:{zh:"\u4E8C\u7EA7\u53F3\u952E\u83DC\u5355",en:"Secondary Context Menus"},mulkeys_help:{zh:"\u652F\u6301\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\u591A\u4E2AKEY\u8F6E\u8BE2\u8C03\u7528\u3002",en:"Supports multiple KEY polling calls separated by newlines or English commas \",\"."},translation_element_tag:{zh:"\u8BD1\u6587\u5143\u7D20\u6807\u7B7E",en:"Translation Element Tag"},show_only_translations:{zh:"\u4EC5\u663E\u793A\u8BD1\u6587",en:"Show Only Translations"},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."},translate_page_title:{zh:"\u662F\u5426\u7FFB\u8BD1\u9875\u9762\u6807\u9898",en:"Translate Page Title"},more:{zh:"\u66F4\u591A",en:"More"},fixer_selector:{zh:"\u7F51\u9875\u4FEE\u590D\u9009\u62E9\u5668",en:"Fixer Selector"},reg_niutrans:{zh:"\u83B7\u53D6\u5C0F\u725B\u7FFB\u8BD1\u5BC6\u94A5",en:"Get NiuTrans APIKey"}}; ;// CONCATENATED MODULE: ./src/config/index.js -const STOKEY_MSAUTH="".concat(APP_NAME,"_msauth");const STOKEY_BDAUTH="".concat(APP_NAME,"_bdauth");const STOKEY_SETTING="".concat(APP_NAME,"_setting");const STOKEY_RULES="".concat(APP_NAME,"_rules");const STOKEY_WORDS="".concat(APP_NAME,"_words");const STOKEY_SYNC="".concat(APP_NAME,"_sync");const STOKEY_FAB="".concat(APP_NAME,"_fab");const STOKEY_RULESCACHE_PREFIX="".concat(APP_NAME,"_rulescache_");const CMD_TOGGLE_TRANSLATE="toggleTranslate";const CMD_TOGGLE_STYLE="toggleStyle";const CMD_OPEN_OPTIONS="openOptions";const CMD_OPEN_TRANBOX="openTranbox";const CLIENT_WEB="web";const CLIENT_CHROME="chrome";const CLIENT_EDGE="edge";const CLIENT_FIREFOX="firefox";const CLIENT_USERSCRIPT="userscript";const CLIENT_EXTS=[CLIENT_CHROME,CLIENT_EDGE,CLIENT_FIREFOX];const KV_RULES_KEY="kiss-rules.json";const KV_WORDS_KEY="kiss-words.json";const KV_RULES_SHARE_KEY="kiss-rules-share.json";const KV_SETTING_KEY="kiss-setting.json";const KV_SALT_SYNC="KISS-Translator-SYNC";const KV_SALT_SHARE="KISS-Translator-SHARE";const CACHE_NAME="".concat(APP_NAME,"_cache");const MSG_FETCH="fetch";const MSG_FETCH_LIMIT="fetch_limit";const MSG_FETCH_CLEAR="fetch_clear";const MSG_OPEN_OPTIONS="open_options";const MSG_SAVE_RULE="save_rule";const MSG_TRANS_TOGGLE="trans_toggle";const MSG_TRANS_TOGGLE_STYLE="trans_toggle_style";const MSG_OPEN_TRANBOX="open_tranbox";const MSG_TRANS_GETRULE="trans_getrule";const MSG_TRANS_PUTRULE="trans_putrule";const MSG_TRANS_CURRULE="trans_currule";const MSG_CONTEXT_MENUS="context_menus";const MSG_COMMAND_SHORTCUTS="command_shortcuts";const MSG_INJECT_JS="inject_js";const MSG_INJECT_CSS="inject_css";const MSG_UPDATE_CSP="update_csp";const THEME_LIGHT="light";const THEME_DARK="dark";const URL_KISS_WORKER="https://github.com/fishjar/kiss-worker";const URL_KISS_PROXY="https://github.com/fishjar/kiss-proxy";const URL_KISS_RULES="https://github.com/fishjar/kiss-rules";const URL_KISS_RULES_NEW_ISSUE="https://github.com/fishjar/kiss-rules/issues/new";const URL_RAW_PREFIX="https://raw.githubusercontent.com/fishjar/kiss-translator/master";const URL_CACHE_TRAN="https://".concat(APP_LCNAME,"/translate");const URL_MICROSOFT_TRAN="https://api-edge.cognitive.microsofttranslator.com/translate";const URL_MICROSOFT_AUTH="https://edge.microsoft.com/translate/auth";const URL_BAIDU_LANGDETECT="https://fanyi.baidu.com/langdetect";const URL_BAIDU_SUGGEST="https://fanyi.baidu.com/sug";const URL_BAIDU_TTS="https://fanyi.baidu.com/gettts";const URL_BAIDU_WEB="https://fanyi.baidu.com/";const URL_BAIDU_TRANSAPI="https://fanyi.baidu.com/transapi";const URL_BAIDU_TRANSAPI_V2="https://fanyi.baidu.com/v2transapi";const URL_DEEPLFREE_TRAN="https://www2.deepl.com/jsonrpc";const URL_TENCENT_TRANSMART="https://transmart.qq.com/api/imt";const OPT_TRANS_GOOGLE="Google";const OPT_TRANS_MICROSOFT="Microsoft";const OPT_TRANS_DEEPL="DeepL";const OPT_TRANS_DEEPLX="DeepLX";const OPT_TRANS_DEEPLFREE="DeepLFree";const OPT_TRANS_BAIDU="Baidu";const OPT_TRANS_TENCENT="Tencent";const OPT_TRANS_OPENAI="OpenAI";const OPT_TRANS_GEMINI="Gemini";const OPT_TRANS_CLOUDFLAREAI="CloudflareAI";const OPT_TRANS_CUSTOMIZE="Custom";const OPT_TRANS_CUSTOMIZE_2="Custom2";const OPT_TRANS_CUSTOMIZE_3="Custom3";const OPT_TRANS_CUSTOMIZE_4="Custom4";const OPT_TRANS_CUSTOMIZE_5="Custom5";const OPT_TRANS_ALL=[OPT_TRANS_GOOGLE,OPT_TRANS_MICROSOFT,OPT_TRANS_BAIDU,OPT_TRANS_TENCENT,OPT_TRANS_DEEPL,OPT_TRANS_DEEPLFREE,OPT_TRANS_DEEPLX,OPT_TRANS_OPENAI,OPT_TRANS_GEMINI,OPT_TRANS_CLOUDFLAREAI,OPT_TRANS_CUSTOMIZE,OPT_TRANS_CUSTOMIZE_2,OPT_TRANS_CUSTOMIZE_3,OPT_TRANS_CUSTOMIZE_4,OPT_TRANS_CUSTOMIZE_5];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_FROM=[["auto","Auto-detect"],...OPT_LANGS_TO];const OPT_LANGS_SPECIAL={[OPT_TRANS_GOOGLE]:new Map(OPT_LANGS_FROM.map(_ref=>{let[key]=_ref;return[key,key];})),[OPT_TRANS_MICROSOFT]:new Map([...OPT_LANGS_FROM.map(_ref2=>{let[key]=_ref2;return[key,key];}),["auto",""],["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[OPT_TRANS_DEEPL]:new Map([...OPT_LANGS_FROM.map(_ref3=>{let[key]=_ref3;return[key,key.toUpperCase()];}),["auto",""],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLFREE]:new Map([...OPT_LANGS_FROM.map(_ref4=>{let[key]=_ref4;return[key,key.toUpperCase()];}),["auto","auto"],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLX]:new Map([...OPT_LANGS_FROM.map(_ref5=>{let[key]=_ref5;return[key,key.toUpperCase()];}),["auto",""],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_BAIDU]:new Map([...OPT_LANGS_FROM.map(_ref6=>{let[key]=_ref6;return[key,key];}),["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]:new Map(OPT_LANGS_FROM.map(_ref7=>{let[key,val]=_ref7;return[key,val.split(" - ")[0]];})),[OPT_TRANS_GEMINI]:new Map(OPT_LANGS_FROM.map(_ref8=>{let[key,val]=_ref8;return[key,val.split(" - ")[0]];})),[OPT_TRANS_CLOUDFLAREAI]:new Map([["auto",""],["zh-CN","chinese"],["zh-TW","chinese"],["en","english"],["ar","arabic"],["de","german"],["ru","russian"],["fr","french"],["pt","portuguese"],["ja","japanese"],["es","spanish"],["hi","hindi"]]),[OPT_TRANS_CUSTOMIZE]:new Map([...OPT_LANGS_FROM.map(_ref9=>{let[key]=_ref9;return[key,key];}),["auto",""]])};const OPT_LANGS_LIST=OPT_LANGS_TO.map(_ref10=>{let[lang]=_ref10;return lang;});const OPT_LANGS_BAIDU=new Map(Array.from(OPT_LANGS_SPECIAL[OPT_TRANS_BAIDU].entries()).map(_ref11=>{let[k,v]=_ref11;return[v,k];}));const OPT_LANGS_TENCENT=new Map(Array.from(OPT_LANGS_SPECIAL[OPT_TRANS_TENCENT].entries()).map(_ref12=>{let[k,v]=_ref12;return[v,k];}));OPT_LANGS_TENCENT.set("zh","zh-CN");const OPT_STYLE_NONE="style_none";// 无 +const STOKEY_MSAUTH="".concat(APP_NAME,"_msauth");const STOKEY_BDAUTH="".concat(APP_NAME,"_bdauth");const STOKEY_SETTING="".concat(APP_NAME,"_setting");const STOKEY_RULES="".concat(APP_NAME,"_rules");const STOKEY_WORDS="".concat(APP_NAME,"_words");const STOKEY_SYNC="".concat(APP_NAME,"_sync");const STOKEY_FAB="".concat(APP_NAME,"_fab");const STOKEY_RULESCACHE_PREFIX="".concat(APP_NAME,"_rulescache_");const CMD_TOGGLE_TRANSLATE="toggleTranslate";const CMD_TOGGLE_STYLE="toggleStyle";const CMD_OPEN_OPTIONS="openOptions";const CMD_OPEN_TRANBOX="openTranbox";const CLIENT_WEB="web";const CLIENT_CHROME="chrome";const CLIENT_EDGE="edge";const CLIENT_FIREFOX="firefox";const CLIENT_USERSCRIPT="userscript";const CLIENT_EXTS=[CLIENT_CHROME,CLIENT_EDGE,CLIENT_FIREFOX];const KV_RULES_KEY="kiss-rules.json";const KV_WORDS_KEY="kiss-words.json";const KV_RULES_SHARE_KEY="kiss-rules-share.json";const KV_SETTING_KEY="kiss-setting.json";const KV_SALT_SYNC="KISS-Translator-SYNC";const KV_SALT_SHARE="KISS-Translator-SHARE";const CACHE_NAME="".concat(APP_NAME,"_cache");const MSG_FETCH="fetch";const MSG_FETCH_LIMIT="fetch_limit";const MSG_FETCH_CLEAR="fetch_clear";const MSG_OPEN_OPTIONS="open_options";const MSG_SAVE_RULE="save_rule";const MSG_TRANS_TOGGLE="trans_toggle";const MSG_TRANS_TOGGLE_STYLE="trans_toggle_style";const MSG_OPEN_TRANBOX="open_tranbox";const MSG_TRANS_GETRULE="trans_getrule";const MSG_TRANS_PUTRULE="trans_putrule";const MSG_TRANS_CURRULE="trans_currule";const MSG_CONTEXT_MENUS="context_menus";const MSG_COMMAND_SHORTCUTS="command_shortcuts";const MSG_INJECT_JS="inject_js";const MSG_INJECT_CSS="inject_css";const MSG_UPDATE_CSP="update_csp";const THEME_LIGHT="light";const THEME_DARK="dark";const URL_KISS_WORKER="https://github.com/fishjar/kiss-worker";const URL_KISS_PROXY="https://github.com/fishjar/kiss-proxy";const URL_KISS_RULES="https://github.com/fishjar/kiss-rules";const URL_KISS_RULES_NEW_ISSUE="https://github.com/fishjar/kiss-rules/issues/new";const URL_RAW_PREFIX="https://raw.githubusercontent.com/fishjar/kiss-translator/master";const URL_CACHE_TRAN="https://".concat(APP_LCNAME,"/translate");const URL_MICROSOFT_TRAN="https://api-edge.cognitive.microsofttranslator.com/translate";const URL_MICROSOFT_AUTH="https://edge.microsoft.com/translate/auth";const URL_BAIDU_LANGDETECT="https://fanyi.baidu.com/langdetect";const URL_BAIDU_SUGGEST="https://fanyi.baidu.com/sug";const URL_BAIDU_TTS="https://fanyi.baidu.com/gettts";const URL_BAIDU_WEB="https://fanyi.baidu.com/";const URL_BAIDU_TRANSAPI="https://fanyi.baidu.com/transapi";const URL_BAIDU_TRANSAPI_V2="https://fanyi.baidu.com/v2transapi";const URL_DEEPLFREE_TRAN="https://www2.deepl.com/jsonrpc";const URL_TENCENT_TRANSMART="https://transmart.qq.com/api/imt";const URL_NIUTRANS_REG="https://niutrans.com/login?active=3&userSource=kiss-translator";const DEFAULT_USER_AGENT="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36";const OPT_TRANS_GOOGLE="Google";const OPT_TRANS_MICROSOFT="Microsoft";const OPT_TRANS_DEEPL="DeepL";const OPT_TRANS_DEEPLX="DeepLX";const OPT_TRANS_DEEPLFREE="DeepLFree";const OPT_TRANS_NIUTRANS="NiuTrans";const OPT_TRANS_BAIDU="Baidu";const OPT_TRANS_TENCENT="Tencent";const OPT_TRANS_OPENAI="OpenAI";const OPT_TRANS_GEMINI="Gemini";const OPT_TRANS_CLOUDFLAREAI="CloudflareAI";const OPT_TRANS_CUSTOMIZE="Custom";const OPT_TRANS_CUSTOMIZE_2="Custom2";const OPT_TRANS_CUSTOMIZE_3="Custom3";const OPT_TRANS_CUSTOMIZE_4="Custom4";const OPT_TRANS_CUSTOMIZE_5="Custom5";const OPT_TRANS_ALL=[OPT_TRANS_GOOGLE,OPT_TRANS_MICROSOFT,OPT_TRANS_BAIDU,OPT_TRANS_TENCENT,OPT_TRANS_DEEPL,OPT_TRANS_DEEPLFREE,OPT_TRANS_DEEPLX,OPT_TRANS_NIUTRANS,OPT_TRANS_OPENAI,OPT_TRANS_GEMINI,OPT_TRANS_CLOUDFLAREAI,OPT_TRANS_CUSTOMIZE,OPT_TRANS_CUSTOMIZE_2,OPT_TRANS_CUSTOMIZE_3,OPT_TRANS_CUSTOMIZE_4,OPT_TRANS_CUSTOMIZE_5];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_FROM=[["auto","Auto-detect"],...OPT_LANGS_TO];const OPT_LANGS_SPECIAL={[OPT_TRANS_GOOGLE]:new Map(OPT_LANGS_FROM.map(_ref=>{let[key]=_ref;return[key,key];})),[OPT_TRANS_MICROSOFT]:new Map([...OPT_LANGS_FROM.map(_ref2=>{let[key]=_ref2;return[key,key];}),["auto",""],["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[OPT_TRANS_DEEPL]:new Map([...OPT_LANGS_FROM.map(_ref3=>{let[key]=_ref3;return[key,key.toUpperCase()];}),["auto",""],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLFREE]:new Map([...OPT_LANGS_FROM.map(_ref4=>{let[key]=_ref4;return[key,key.toUpperCase()];}),["auto","auto"],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLX]:new Map([...OPT_LANGS_FROM.map(_ref5=>{let[key]=_ref5;return[key,key.toUpperCase()];}),["auto",""],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_NIUTRANS]:new Map([...OPT_LANGS_FROM.map(_ref6=>{let[key]=_ref6;return[key,key];}),["auto","auto"],["zh-CN","zh"],["zh-TW","cht"]]),[OPT_TRANS_BAIDU]:new Map([...OPT_LANGS_FROM.map(_ref7=>{let[key]=_ref7;return[key,key];}),["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]:new Map(OPT_LANGS_FROM.map(_ref8=>{let[key,val]=_ref8;return[key,val.split(" - ")[0]];})),[OPT_TRANS_GEMINI]:new Map(OPT_LANGS_FROM.map(_ref9=>{let[key,val]=_ref9;return[key,val.split(" - ")[0]];})),[OPT_TRANS_CLOUDFLAREAI]:new Map([["auto",""],["zh-CN","chinese"],["zh-TW","chinese"],["en","english"],["ar","arabic"],["de","german"],["ru","russian"],["fr","french"],["pt","portuguese"],["ja","japanese"],["es","spanish"],["hi","hindi"]]),[OPT_TRANS_CUSTOMIZE]:new Map([...OPT_LANGS_FROM.map(_ref10=>{let[key]=_ref10;return[key,key];}),["auto",""]]),[OPT_TRANS_CUSTOMIZE_2]:new Map([...OPT_LANGS_FROM.map(_ref11=>{let[key]=_ref11;return[key,key];}),["auto",""]]),[OPT_TRANS_CUSTOMIZE_3]:new Map([...OPT_LANGS_FROM.map(_ref12=>{let[key]=_ref12;return[key,key];}),["auto",""]]),[OPT_TRANS_CUSTOMIZE_4]:new Map([...OPT_LANGS_FROM.map(_ref13=>{let[key]=_ref13;return[key,key];}),["auto",""]]),[OPT_TRANS_CUSTOMIZE_5]:new Map([...OPT_LANGS_FROM.map(_ref14=>{let[key]=_ref14;return[key,key];}),["auto",""]])};const OPT_LANGS_LIST=OPT_LANGS_TO.map(_ref15=>{let[lang]=_ref15;return lang;});const OPT_LANGS_BAIDU=new Map(Array.from(OPT_LANGS_SPECIAL[OPT_TRANS_BAIDU].entries()).map(_ref16=>{let[k,v]=_ref16;return[v,k];}));const OPT_LANGS_TENCENT=new Map(Array.from(OPT_LANGS_SPECIAL[OPT_TRANS_TENCENT].entries()).map(_ref17=>{let[k,v]=_ref17;return[v,k];}));OPT_LANGS_TENCENT.set("zh","zh-CN");const OPT_STYLE_NONE="style_none";// 无 const OPT_STYLE_LINE="under_line";// 下划线 const OPT_STYLE_DOTLINE="dot_line";// 点状线 const OPT_STYLE_DASHLINE="dash_line";// 虚线 @@ -33638,7 +33638,7 @@ hideClickAway:false// 是否点击外部关闭弹窗 const DEFAULT_SUBRULES_LIST=[{url:"https://fishjar.github.io/kiss-rules/kiss-rules.json",selected:false},{url:"https://fishjar.github.io/kiss-rules/kiss-rules-on.json",selected:true},{url:"https://fishjar.github.io/kiss-rules/kiss-rules-off.json",selected:false}];// 翻译接口 const defaultCustomApi={url:"",key:"",fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL};const DEFAULT_TRANS_APIS={[OPT_TRANS_GOOGLE]:{url:"https://translate.googleapis.com/translate_a/single",key:"",fetchLimit:DEFAULT_FETCH_LIMIT,// 最大任务数量 fetchInterval:DEFAULT_FETCH_INTERVAL// 任务间隔时间 -},[OPT_TRANS_MICROSOFT]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_BAIDU]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_TENCENT]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_DEEPL]:{url:"https://api-free.deepl.com/v2/translate",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_DEEPLFREE]:{fetchLimit:1,fetchInterval:500},[OPT_TRANS_DEEPLX]:{url:"http://localhost:1188/translate",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_OPENAI]:{url:"https://api.openai.com/v1/chat/completions",key:"",model:"gpt-4",prompt:"You will be provided with a sentence in ".concat(PROMPT_PLACE_FROM,", and your task is to translate it into ").concat(PROMPT_PLACE_TO,"."),fetchLimit:1,fetchInterval:500},[OPT_TRANS_GEMINI]:{url:"https://generativelanguage.googleapis.com/v1/models",key:"",model:"gemini-pro",prompt:"Translate the following text from ".concat(PROMPT_PLACE_FROM," to ").concat(PROMPT_PLACE_TO,":\n\n").concat(PROMPT_PLACE_TEXT),fetchLimit:1,fetchInterval:500},[OPT_TRANS_CLOUDFLAREAI]:{url:"https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/run/@cf/meta/m2m100-1.2b",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_CUSTOMIZE]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_2]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_3]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_4]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_5]:defaultCustomApi};// 默认快捷键 +},[OPT_TRANS_MICROSOFT]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_BAIDU]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_TENCENT]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_DEEPL]:{url:"https://api-free.deepl.com/v2/translate",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_DEEPLFREE]:{fetchLimit:1,fetchInterval:500},[OPT_TRANS_DEEPLX]:{url:"http://localhost:1188/translate",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_NIUTRANS]:{url:"https://api.niutrans.com/NiuTransServer/translation",key:"",dictNo:"",memoryNo:"",fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_OPENAI]:{url:"https://api.openai.com/v1/chat/completions",key:"",model:"gpt-4",prompt:"You will be provided with a sentence in ".concat(PROMPT_PLACE_FROM,", and your task is to translate it into ").concat(PROMPT_PLACE_TO,"."),fetchLimit:1,fetchInterval:500},[OPT_TRANS_GEMINI]:{url:"https://generativelanguage.googleapis.com/v1/models",key:"",model:"gemini-pro",prompt:"Translate the following text from ".concat(PROMPT_PLACE_FROM," to ").concat(PROMPT_PLACE_TO,":\n\n").concat(PROMPT_PLACE_TEXT),fetchLimit:1,fetchInterval:500},[OPT_TRANS_CLOUDFLAREAI]:{url:"https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/run/@cf/meta/m2m100-1.2b",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_CUSTOMIZE]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_2]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_3]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_4]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_5]:defaultCustomApi};// 默认快捷键 const OPT_SHORTCUT_TRANSLATE="toggleTranslate";const OPT_SHORTCUT_STYLE="toggleStyle";const OPT_SHORTCUT_POPUP="togglePopup";const OPT_SHORTCUT_SETTING="openSetting";const DEFAULT_SHORTCUTS={[OPT_SHORTCUT_TRANSLATE]:["AltLeft","KeyQ"],[OPT_SHORTCUT_STYLE]:["AltLeft","KeyC"],[OPT_SHORTCUT_POPUP]:["AltLeft","KeyK"],[OPT_SHORTCUT_SETTING]:["AltLeft","KeyO"]};const TRANS_MIN_LENGTH=5;// 最短翻译长度 const TRANS_MAX_LENGTH=5000;// 最长翻译长度 const TRANS_NEWLINE_LENGTH=20;// 换行字符数 @@ -33678,7 +33678,7 @@ subRulesSyncAt:0,// 订阅规则同步时间 dataCaches:{}// 缓存同步时间 }; ;// CONCATENATED MODULE: ./src/index.js -function App(){var _I18N$about_md;const[lang,setLang]=(0,react.useState)("zh");const[data,loading,error]=useFetch("".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("1.8.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?error.message: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]=useFetch("".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("1.8.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?error.message: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 ec19946..fb111fc 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": "1.8.5", + "version": "1.8.6", "default_locale": "en", "author": "Gabe", "homepage_url": "https://github.com/fishjar/kiss-translator", diff --git a/manifest.json b/manifest.json index edba233..c63d66a 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "__MSG_app_name__", "description": "__MSG_app_description__", - "version": "1.8.5", + "version": "1.8.6", "default_locale": "en", "author": "Gabe", "homepage_url": "https://github.com/fishjar/kiss-translator", diff --git a/options.js b/options.js index db3278c..e9997d6 100644 --- a/options.js +++ b/options.js @@ -41409,9 +41409,9 @@ fixerFunc:rules_GLOBAL_KEY// 修复函数 ;// CONCATENATED MODULE: ./src/config/app.js const APP_NAME="KISS Translator".trim().split(/\s+/).join("-");const APP_LCNAME=APP_NAME.toLowerCase(); ;// CONCATENATED MODULE: ./src/config/i18n.js -const UI_LANGS=[["en","English"],["zh","中文"]];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="/// \u81EA\u5B9A\u4E49\u7FFB\u8BD1\u6E90\u63A5\u53E3\u8BF4\u660E\n\n// \u8BF7\u6C42\uFF08Request\uFF09\u6570\u636E\u5C06\u6309\u4E0B\u9762\u89C4\u8303\u53D1\u9001\n{\n url: {{YOUR_URL}},\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{YOUR_KEY}}\",\n },\n body: {\n text: \"\", // \u9700\u8981\u7FFB\u8BD1\u7684\u6587\u5B57\n from: \"\", // \u6E90\u8BED\u8A00\uFF0C\u53EF\u80FD\u4E3A\u7A7A\uFF0C\u8868\u793A\u9700\u8981\u63A5\u53E3\u81EA\u52A8\u8BC6\u522B\u8BED\u8A00\n to: \"\", // \u76EE\u6807\u8BED\u8A00\n }\n}\n\n// \u8FD4\u56DE\uFF08Response\uFF09\u6570\u636E\u9700\u7B26\u5408\u4E0B\u9762\u7684JSON\u89C4\u8303\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// \u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u5982\u4E0B\n".concat(customApiLangs,"\n");const customApiHelpEN="/// Custom translation source interface description\n\n// Request data will be sent according to the following specifications\n{\n url: {{YOUR_URL}},\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{YOUR_KEY}}\",\n },\n body: {\n text: \"\", // text to be translated\n from: \"\", // Source language, may be empty\n to: \"\", // Target language\n }\n}\n\n// The returned data must conform to the following JSON specification\n{\n text: \"\", // translated text\n from: \"\", // Recognized source language\n to: \"\", // Target language (optional)\n}\n\n// The supported language codes are as follows\n".concat(customApiLangs,"\n");const I18N={app_name:{zh:"\u7B80\u7EA6\u7FFB\u8BD1",en:"KISS Translator"},translate:{zh:"\u7FFB\u8BD1",en:"Translate"},custom_api_help:{zh:customApiHelpZH,en:customApiHelpEN},translate_alt:{zh:"\u7FFB\u8BD1",en:"Translate"},basic_setting:{zh:"\u57FA\u672C\u8BBE\u7F6E",en:"Basic Setting"},rules_setting:{zh:"\u89C4\u5219\u8BBE\u7F6E",en:"Rules Setting"},apis_setting:{zh:"\u63A5\u53E3\u8BBE\u7F6E",en:"Apis Setting"},sync_setting:{zh:"\u540C\u6B65\u8BBE\u7F6E",en:"Sync Setting"},patch_setting:{zh:"\u8865\u4E01\u8BBE\u7F6E",en:"Patch Setting"},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."},inject_webfix:{zh:"\u6CE8\u5165\u4FEE\u590D\u8865\u4E01",en:"Inject Webfix"},about:{zh:"\u5173\u4E8E",en:"About"},about_md:{zh:"README.md",en:"README.en.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.")},ui_lang:{zh:"\u754C\u9762\u8BED\u8A00",en:"Interface Language"},fetch_limit:{zh:"\u6700\u5927\u5E76\u53D1\u8BF7\u6C42\u6570\u91CF (1-100)",en:"Maximum Number Of Concurrent Requests (1-100)"},fetch_interval:{zh:"\u6BCF\u6B21\u8BF7\u6C42\u95F4\u9694\u65F6\u95F4 (0-5000ms)",en:"Time Between Requests (0-5000ms)"},translate_interval:{zh:"\u91CD\u65B0\u7FFB\u8BD1\u95F4\u9694\u65F6\u95F4 (100-5000ms)",en:"Retranslation Interval (100-5000ms)"},min_translate_length:{zh:"\u6700\u5C0F\u7FFB\u8BD1\u5B57\u7B26\u6570 (1-100)",en:"Minimum number Of Translated Characters (1-100)"},max_translate_length:{zh:"\u6700\u5927\u7FFB\u8BD1\u5B57\u7B26\u6570 (100-10000)",en:"Maximum number Of Translated Characters (100-10000)"},num_of_newline_characters:{zh:"\u6362\u884C\u5B57\u7B26\u6570 (1-1000)",en:"Number of Newline Characters (1-1000)"},translate_service:{zh:"\u7FFB\u8BD1\u670D\u52A1",en:"Translate Service"},translate_timing:{zh:"\u7FFB\u8BD1\u65F6\u673A",en:"Translate Timing"},mk_pagescroll:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u7FFB\u8BD1\uFF08\u63A8\u8350\uFF09",en:"Rolling Loading (Suggested)"},mk_pageopen:{zh:"\u9875\u9762\u6253\u5F00\u5168\u90E8\u7FFB\u8BD1",en:"Page Open"},mk_mouseover:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover"},mk_ctrlKey:{zh:"Control + \u9F20\u6807\u60AC\u505C",en:"Control + Mouseover"},mk_shiftKey:{zh:"Shift + \u9F20\u6807\u60AC\u505C",en:"Shift + Mouseover"},mk_altKey:{zh:"Alt + \u9F20\u6807\u60AC\u505C",en:"Alt + Mouseover"},from_lang:{zh:"\u539F\u6587\u8BED\u8A00",en:"Source Language"},to_lang:{zh:"\u76EE\u6807\u8BED\u8A00",en:"Target Language"},to_lang2:{zh:"\u7B2C\u4E8C\u76EE\u6807\u8BED\u8A00",en:"Target Language 2"},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."},text_style:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style"},text_style_alt:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style"},bg_color:{zh:"\u6837\u5F0F\u989C\u8272",en:"Style Color"},remain_unchanged:{zh:"\u4FDD\u7559\u4E0D\u53D8",en:"Remain Unchanged"},google_api:{zh:"\u8C37\u6B4C\u7FFB\u8BD1\u63A5\u53E3",en:"Google Translate API"},default_selector:{zh:"\u9ED8\u8BA4\u9009\u62E9\u5668",en:"Default selector"},selector_rules:{zh:"\u9009\u62E9\u5668\u89C4\u5219",en:"Selector Rules"},save:{zh:"\u4FDD\u5B58",en:"Save"},edit:{zh:"\u7F16\u8F91",en:"Edit"},cancel:{zh:"\u53D6\u6D88",en:"Cancel"},delete:{zh:"\u5220\u9664",en:"Delete"},reset:{zh:"\u91CD\u7F6E",en:"Reset"},add:{zh:"\u6DFB\u52A0",en:"Add"},inject_rules:{zh:"\u6CE8\u5165\u8BA2\u9605\u89C4\u5219",en:"Inject Subscribe Rules"},personal_rules:{zh:"\u4E2A\u4EBA\u89C4\u5219",en:"Rules"},subscribe_rules:{zh:"\u8BA2\u9605\u89C4\u5219",en:"Subscribe"},overwrite_subscribe_rules:{zh:"\u8986\u5199\u8BA2\u9605\u89C4\u5219",en:"Overwrite"},subscribe_url:{zh:"\u8BA2\u9605\u5730\u5740",en:"Subscribe URL"},rules_warn_1:{zh:"1\u3001\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u4E00\u76F4\u751F\u6548\uFF0C\u9009\u62E9\u201C\u6CE8\u5165\u8BA2\u9605\u89C4\u5219\u201D\u540E\uFF0C\u201C\u8BA2\u9605\u89C4\u5219\u201D\u624D\u4F1A\u751F\u6548\u3002",en:"1. The \"Personal Rules\" are always in effect. After selecting \"Inject Subscription Rules\", the \"Subscription Rules\" will take effect."},rules_warn_2:{zh:"2\u3001\u201C\u8BA2\u9605\u89C4\u5219\u201D\u7684\u6CE8\u5165\u4F4D\u7F6E\u662F\u5012\u6570\u7B2C\u4E8C\u7684\u4F4D\u7F6E\uFF0C\u56E0\u6B64\u9664\u5168\u5C40\u89C4\u5219(*)\u5916\uFF0C\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u4F18\u5148\u7EA7\u6BD4\u201C\u8BA2\u9605\u89C4\u5219\u201D\u9AD8\uFF0C\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u586B\u5199\u540C\u6837\u7684\u7F51\u5740\u4F1A\u8986\u76D6\u201D\u8BA2\u9605\u89C4\u5219\u201C\u7684\u6761\u76EE\u3002",en:"2. The injection position of \"Subscription Rules\" is the penultimate position. Therefore, except for the global rules (*), the priority of \"Personal Rules\" is higher than that of \"Subscription Rules\". Filling in the same url in \"Personal Rules\" will overwrite \"Subscription Rules\" entry."},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."},sync_warn:{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."},about_sync_api:{zh:"\u67E5\u770B\u5173\u4E8E\u6570\u636E\u540C\u6B65\u63A5\u53E3\u90E8\u7F72",en:"View About Data Synchronization Interface Deployment"},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"},style_none:{zh:"\u65E0",en:"None"},under_line:{zh:"\u4E0B\u5212\u76F4\u7EBF",en:"Underline"},dot_line:{zh:"\u4E0B\u5212\u70B9\u72B6\u7EBF",en:"Dotted Underline"},dash_line:{zh:"\u4E0B\u5212\u865A\u7EBF",en:"Dashed Underline"},wavy_line:{zh:"\u4E0B\u5212\u6CE2\u6D6A\u7EBF",en:"Wavy Underline"},fuzzy:{zh:"\u6A21\u7CCA",en:"Fuzzy"},highlight:{zh:"\u9AD8\u4EAE",en:"Highlight"},blockquote:{zh:"\u5F15\u7528",en:"Blockquote"},diy_style:{zh:"\u81EA\u5B9A\u4E49\u6837\u5F0F",en:"Custom Style"},diy_style_helper:{zh:"\u9075\u5FAA\u201CCSS\u201D\u7684\u8BED\u6CD5",en:"Follow the syntax of \"CSS\""},setting:{zh:"\u8BBE\u7F6E",en:"Setting"},pattern:{zh:"\u5339\u914D\u7F51\u5740",en:"URL pattern"},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 \",\"."},selector_helper:{zh:"1\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u30022\u3001\u591A\u4E2ACSS\u9009\u62E9\u5668\u4E4B\u95F4\u7528\u201C;\u201D\u9694\u5F00\u30023\u3001\u201Cshadow root\u201D\u9009\u62E9\u5668\u548C\u5185\u90E8\u9009\u62E9\u5668\u7528\u201C>>>\u201D\u9694\u5F00\u3002",en:"1. Follow CSS selector syntax. 2. Separate multiple CSS selectors with \";\". 3. The \"shadow root\" selector and the internal selector are separated by \">>>\"."},translate_switch:{zh:"\u5F00\u542F\u7FFB\u8BD1",en:"Translate Switch"},default_enabled:{zh:"\u9ED8\u8BA4\u5F00\u542F",en:"Enabled"},default_disabled:{zh:"\u9ED8\u8BA4\u5173\u95ED",en:"Disabled"},selector:{zh:"\u9009\u62E9\u5668",en:"Selector"},keep_selector:{zh:"\u4FDD\u7559\u5143\u7D20\u9009\u62E9\u5668",en:"Keep unchanged selector"},keep_selector_helper:{zh:"1\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u30022\u3001\u5B50\u5143\u7D20\u9009\u62E9\u5668\u7528\u201C>>>\u201D\u9694\u5F00\u3002",en:"1. Follow CSS selector syntax. 2. Sub-element selectors are separated by \">>>\"."},terms:{zh:"\u4E13\u4E1A\u672F\u8BED",en:"Terms"},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."},selector_style:{zh:"\u9009\u62E9\u5668\u8282\u70B9\u6837\u5F0F",en:"Selector Style"},selector_style_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u4E0D\u4F1A\u79FB\u9664\u3002",en:"It is injected when translation is turned on and will not be removed when translation is turned off."},selector_parent_style:{zh:"\u9009\u62E9\u5668\u7236\u8282\u70B9\u6837\u5F0F",en:"Selector Parent Style"},inject_js:{zh:"\u6CE8\u5165JS",en:"Inject JS"},inject_js_helper:{zh:"1\u3001\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\u8FD0\u884C\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u79FB\u9664\u30022\u3001\u968F\u7740\u9875\u9762\u53D8\u5316\uFF0C\u53EF\u80FD\u4F1A\u591A\u6B21\u6CE8\u5165\u8FD0\u884C\u3002",en:"1. Inject and run when translation is turned on, and removed when translation is turned off. 2. As the page changes, it may be injected and run multiple times."},inject_css:{zh:"\u6CE8\u5165CSS",en:"Inject CSS"},inject_css_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u5C06\u79FB\u9664\u3002",en:"Injected when translation is enabled and removed when translation is disabled."},root_selector:{zh:"\u6839\u9009\u62E9\u5668",en:"Root Selector"},fixer_function:{zh:"\u4FEE\u590D\u51FD\u6570",en:"Fixer Function"},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

."},import:{zh:"\u5BFC\u5165",en:"Import"},export:{zh:"\u5BFC\u51FA",en:"Export"},error_cant_be_blank:{zh:"\u4E0D\u80FD\u4E3A\u7A7A",en:"Can not be blank"},error_duplicate_values:{zh:"\u5B58\u5728\u91CD\u590D\u7684\u503C",en:"There are duplicate values"},error_wrong_file_type:{zh:"\u9519\u8BEF\u7684\u6587\u4EF6\u7C7B\u578B",en:"Wrong file type"},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."},deepl_api:{zh:"DeepL \u63A5\u53E3",en:"DeepL API"},deepl_key:{zh:"DeepL \u5BC6\u94A5",en:"DeepL Key"},openai_api:{zh:"OpenAI \u63A5\u53E3",en:"OpenAI API"},openai_key:{zh:"OpenAI \u5BC6\u94A5",en:"OpenAI Key"},openai_model:{zh:"OpenAI \u6A21\u578B",en:"OpenAI Model"},openai_prompt:{zh:"OpenAI \u63D0\u793A\u8BCD",en:"OpenAI Prompt"},if_clear_cache:{zh:"\u662F\u5426\u6E05\u9664\u7F13\u5B58",en:"Whether clear cache"},clear_cache_never:{zh:"\u4E0D\u6E05\u9664\u7F13\u5B58",en:"Never clear cache"},clear_cache_restart:{zh:"\u91CD\u542F\u6D4F\u89C8\u5668\u65F6\u6E05\u9664\u7F13\u5B58",en:"Clear cache when restarting browser"},data_sync_type:{zh:"\u6570\u636E\u540C\u6B65\u65B9\u5F0F",en:"Data Sync Type"},data_sync_url:{zh:"\u6570\u636E\u540C\u6B65\u63A5\u53E3",en:"Data Sync API"},data_sync_user:{zh:"\u6570\u636E\u540C\u6B65\u8D26\u6237",en:"Data Sync User"},data_sync_key:{zh:"\u6570\u636E\u540C\u6B65\u5BC6\u94A5",en:"Data Sync Key"},sync_now:{zh:"\u7ACB\u5373\u540C\u6B65",en:"Sync Now"},sync_success:{zh:"\u540C\u6B65\u6210\u529F\uFF01",en:"Sync Success"},sync_failed:{zh:"\u540C\u6B65\u5931\u8D25\uFF01",en:"Sync Error"},error_got_some_wrong:{zh:"\u62B1\u6B49\uFF0C\u51FA\u9519\u4E86\uFF01",en:"Sorry, something went wrong!"},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"},click_test:{zh:"\u70B9\u51FB\u6D4B\u8BD5",en:"Click Test"},test_success:{zh:"\u6D4B\u8BD5\u6210\u529F",en:"Test success"},test_failed:{zh:"\u6D4B\u8BD5\u5931\u8D25",en:"Test failed"},clear_all_cache_now:{zh:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u7F13\u5B58",en:"Clear all cache now"},clear_cache:{zh:"\u6E05\u9664\u7F13\u5B58",en:"Clear Cache"},clear_success:{zh:"\u6E05\u9664\u6210\u529F",en:"Clear success"},clear_failed:{zh:"\u6E05\u9664\u5931\u8D25",en:"Clear failed"},share:{zh:"\u5206\u4EAB",en:"Share"},clear_all:{zh:"\u6E05\u7A7A",en:"Clear All"},help:{zh:"\u6C42\u52A9",en:"Help"},restore_default:{zh:"\u6062\u590D\u9ED8\u8BA4",en:"Restore Default"},shortcuts_setting:{zh:"\u5FEB\u6377\u952E\u8BBE\u7F6E",en:"Shortcuts Setting"},toggle_translate_shortcut:{zh:"\"\u5F00\u542F\u7FFB\u8BD1\"\u5FEB\u6377\u952E",en:"\"Toggle Translate\" Shortcut"},toggle_style_shortcut:{zh:"\"\u5207\u6362\u6837\u5F0F\"\u5FEB\u6377\u952E",en:"\"Toggle Style\" Shortcut"},toggle_popup_shortcut:{zh:"\"\u6253\u5F00\u5F39\u7A97\"\u5FEB\u6377\u952E",en:"\"Open Popup\" Shortcut"},open_setting_shortcut:{zh:"\"\u6253\u5F00\u8BBE\u7F6E\"\u5FEB\u6377\u952E",en:"\"Open Setting\" Shortcut"},hide_fab_button:{zh:"\u9690\u85CF\u60AC\u6D6E\u6309\u94AE",en:"Hide Fab Button"},hide_tran_button:{zh:"\u9690\u85CF\u7FFB\u8BD1\u6309\u94AE",en:"Hide Translate Button"},hide_click_away:{zh:"\u70B9\u51FB\u5916\u90E8\u5173\u95ED\u5F39\u7A97",en:"Click outside to close the pop-up window"},show:{zh:"\u663E\u793A",en:"Show"},hide:{zh:"\u9690\u85CF",en:"Hide"},save_rule:{zh:"\u4FDD\u5B58\u89C4\u5219",en:"Save Rule"},global_rule:{zh:"\u5168\u5C40\u89C4\u5219",en:"Global Rule"},input_translate:{zh:"\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation"},use_input_box_translation:{zh:"\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation"},input_selector:{zh:"\u8F93\u5165\u6846\u9009\u62E9\u5668",en:"Input Selector"},input_selector_helper:{zh:"\u7528\u4E8E\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",en:"Used for input box translation."},trigger_trans_shortcut:{zh:"\u89E6\u53D1\u7FFB\u8BD1\u5FEB\u6377\u952E",en:"Trigger Translation Shortcut Keys"},trigger_trans_shortcut_help:{zh:"\u9ED8\u8BA4\u4E3A\u5355\u51FB\u201CAltLeft+KeyI\u201D",en:"Default is \"AltLeft+KeyI\""},shortcut_press_count:{zh:"\u5FEB\u6377\u952E\u8FDE\u51FB\u6B21\u6570",en:"Shortcut Press Number"},combo_timeout:{zh:"\u8FDE\u51FB\u8D85\u65F6\u65F6\u95F4 (10-1000ms)",en:"Combo Timeout (10-1000ms)"},input_trans_start_sign:{zh:"\u7FFB\u8BD1\u8D77\u59CB\u6807\u8BC6",en:"Translation Start Sign"},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\""},detect_lang_remote:{zh:"\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B",en:"Remote language detection"},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."},disable:{zh:"\u7981\u7528",en:"Disable"},enable:{zh:"\u542F\u7528",en:"Enable"},selection_translate:{zh:"\u5212\u8BCD\u7FFB\u8BD1",en:"Selection Translate"},toggle_selection_translate:{zh:"\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"Use Selection Translate"},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"},tranbtn_offset_x:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBX\uFF080-100\uFF09",en:"Translate Button Offset X (0-100)"},tranbtn_offset_y:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBY\uFF080-100\uFF09",en:"Translate Button Offset Y (0-100)"},translated_text:{zh:"\u8BD1\u6587",en:"Translated Text"},original_text:{zh:"\u539F\u6587",en:"Original Text"},favorite_words:{zh:"\u6536\u85CF\u8BCD\u6C47",en:"Favorite Words"},touch_setting:{zh:"\u89E6\u5C4F\u8BBE\u7F6E",en:"Touch Setting"},touch_translate_shortcut:{zh:"\u89E6\u5C4F\u7FFB\u8BD1\u5FEB\u6377\u65B9\u5F0F",en:"Touch Translate Shortcut"},touch_tap_0:{zh:"\u7981\u7528",en:"Disable"},touch_tap_2:{zh:"\u53CC\u6307\u8F7B\u89E6",en:"Two finger tap"},touch_tap_3:{zh:"\u4E09\u6307\u8F7B\u89E6",en:"Three finger tap"},touch_tap_4:{zh:"\u56DB\u6307\u8F7B\u89E6",en:"Four finger tap"},translate_blacklist:{zh:"\u7981\u7528\u7FFB\u8BD1\u540D\u5355",en:"Translate Blacklist"},disabled_csplist:{zh:"\u7981\u7528CSP\u540D\u5355",en:"Disabled CSP List"},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."},skip_langs:{zh:"\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",en:"Disable Languages"},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."},context_menus:{zh:"\u53F3\u952E\u83DC\u5355",en:"Context Menus"},hide_context_menus:{zh:"\u9690\u85CF\u53F3\u952E\u83DC\u5355",en:"Hide Context Menus"},simple_context_menus:{zh:"\u7B80\u5355\u53F3\u952E\u83DC\u5355",en:"Simple_context_menus Context Menus"},secondary_context_menus:{zh:"\u4E8C\u7EA7\u53F3\u952E\u83DC\u5355",en:"Secondary Context Menus"},mulkeys_help:{zh:"\u652F\u6301\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\u591A\u4E2AKEY\u8F6E\u8BE2\u8C03\u7528\u3002",en:"Supports multiple KEY polling calls separated by newlines or English commas \",\"."},translation_element_tag:{zh:"\u8BD1\u6587\u5143\u7D20\u6807\u7B7E",en:"Translation Element Tag"},show_only_translations:{zh:"\u4EC5\u663E\u793A\u8BD1\u6587",en:"Show Only Translations"},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."},translate_page_title:{zh:"\u662F\u5426\u7FFB\u8BD1\u9875\u9762\u6807\u9898",en:"Translate Page Title"},more:{zh:"\u66F4\u591A",en:"More"},fixer_selector:{zh:"\u7F51\u9875\u4FEE\u590D\u9009\u62E9\u5668",en:"Fixer Selector"}}; +const UI_LANGS=[["en","English"],["zh","中文"]];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="/// \u81EA\u5B9A\u4E49\u7FFB\u8BD1\u6E90\u63A5\u53E3\u8BF4\u660E\n\n// \u8BF7\u6C42\uFF08Request\uFF09\u6570\u636E\u5C06\u6309\u4E0B\u9762\u89C4\u8303\u53D1\u9001\n{\n url: {{YOUR_URL}},\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{YOUR_KEY}}\",\n },\n body: {\n text: \"\", // \u9700\u8981\u7FFB\u8BD1\u7684\u6587\u5B57\n from: \"\", // \u6E90\u8BED\u8A00\uFF0C\u53EF\u80FD\u4E3A\u7A7A\uFF0C\u8868\u793A\u9700\u8981\u63A5\u53E3\u81EA\u52A8\u8BC6\u522B\u8BED\u8A00\n to: \"\", // \u76EE\u6807\u8BED\u8A00\n }\n}\n\n// \u8FD4\u56DE\uFF08Response\uFF09\u6570\u636E\u9700\u7B26\u5408\u4E0B\u9762\u7684JSON\u89C4\u8303\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// \u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u5982\u4E0B\n".concat(customApiLangs,"\n");const customApiHelpEN="/// Custom translation source interface description\n\n// Request data will be sent according to the following specifications\n{\n url: {{YOUR_URL}},\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json\",\n \"Authorization\": \"Bearer {{YOUR_KEY}}\",\n },\n body: {\n text: \"\", // text to be translated\n from: \"\", // Source language, may be empty\n to: \"\", // Target language\n }\n}\n\n// The returned data must conform to the following JSON specification\n{\n text: \"\", // translated text\n from: \"\", // Recognized source language\n to: \"\", // Target language (optional)\n}\n\n// The supported language codes are as follows\n".concat(customApiLangs,"\n");const I18N={app_name:{zh:"\u7B80\u7EA6\u7FFB\u8BD1",en:"KISS Translator"},translate:{zh:"\u7FFB\u8BD1",en:"Translate"},custom_api_help:{zh:customApiHelpZH,en:customApiHelpEN},translate_alt:{zh:"\u7FFB\u8BD1",en:"Translate"},basic_setting:{zh:"\u57FA\u672C\u8BBE\u7F6E",en:"Basic Setting"},rules_setting:{zh:"\u89C4\u5219\u8BBE\u7F6E",en:"Rules Setting"},apis_setting:{zh:"\u63A5\u53E3\u8BBE\u7F6E",en:"Apis Setting"},sync_setting:{zh:"\u540C\u6B65\u8BBE\u7F6E",en:"Sync Setting"},patch_setting:{zh:"\u8865\u4E01\u8BBE\u7F6E",en:"Patch Setting"},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."},inject_webfix:{zh:"\u6CE8\u5165\u4FEE\u590D\u8865\u4E01",en:"Inject Webfix"},about:{zh:"\u5173\u4E8E",en:"About"},about_md:{zh:"README.md",en:"README.en.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.")},ui_lang:{zh:"\u754C\u9762\u8BED\u8A00",en:"Interface Language"},fetch_limit:{zh:"\u6700\u5927\u5E76\u53D1\u8BF7\u6C42\u6570\u91CF (1-100)",en:"Maximum Number Of Concurrent Requests (1-100)"},fetch_interval:{zh:"\u6BCF\u6B21\u8BF7\u6C42\u95F4\u9694\u65F6\u95F4 (0-5000ms)",en:"Time Between Requests (0-5000ms)"},translate_interval:{zh:"\u91CD\u65B0\u7FFB\u8BD1\u95F4\u9694\u65F6\u95F4 (100-5000ms)",en:"Retranslation Interval (100-5000ms)"},min_translate_length:{zh:"\u6700\u5C0F\u7FFB\u8BD1\u5B57\u7B26\u6570 (1-100)",en:"Minimum number Of Translated Characters (1-100)"},max_translate_length:{zh:"\u6700\u5927\u7FFB\u8BD1\u5B57\u7B26\u6570 (100-10000)",en:"Maximum number Of Translated Characters (100-10000)"},num_of_newline_characters:{zh:"\u6362\u884C\u5B57\u7B26\u6570 (1-1000)",en:"Number of Newline Characters (1-1000)"},translate_service:{zh:"\u7FFB\u8BD1\u670D\u52A1",en:"Translate Service"},translate_timing:{zh:"\u7FFB\u8BD1\u65F6\u673A",en:"Translate Timing"},mk_pagescroll:{zh:"\u6EDA\u52A8\u52A0\u8F7D\u7FFB\u8BD1\uFF08\u63A8\u8350\uFF09",en:"Rolling Loading (Suggested)"},mk_pageopen:{zh:"\u9875\u9762\u6253\u5F00\u5168\u90E8\u7FFB\u8BD1",en:"Page Open"},mk_mouseover:{zh:"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1",en:"Mouseover"},mk_ctrlKey:{zh:"Control + \u9F20\u6807\u60AC\u505C",en:"Control + Mouseover"},mk_shiftKey:{zh:"Shift + \u9F20\u6807\u60AC\u505C",en:"Shift + Mouseover"},mk_altKey:{zh:"Alt + \u9F20\u6807\u60AC\u505C",en:"Alt + Mouseover"},from_lang:{zh:"\u539F\u6587\u8BED\u8A00",en:"Source Language"},to_lang:{zh:"\u76EE\u6807\u8BED\u8A00",en:"Target Language"},to_lang2:{zh:"\u7B2C\u4E8C\u76EE\u6807\u8BED\u8A00",en:"Target Language 2"},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."},text_style:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style"},text_style_alt:{zh:"\u8BD1\u6587\u6837\u5F0F",en:"Text Style"},bg_color:{zh:"\u6837\u5F0F\u989C\u8272",en:"Style Color"},remain_unchanged:{zh:"\u4FDD\u7559\u4E0D\u53D8",en:"Remain Unchanged"},google_api:{zh:"\u8C37\u6B4C\u7FFB\u8BD1\u63A5\u53E3",en:"Google Translate API"},default_selector:{zh:"\u9ED8\u8BA4\u9009\u62E9\u5668",en:"Default selector"},selector_rules:{zh:"\u9009\u62E9\u5668\u89C4\u5219",en:"Selector Rules"},save:{zh:"\u4FDD\u5B58",en:"Save"},edit:{zh:"\u7F16\u8F91",en:"Edit"},cancel:{zh:"\u53D6\u6D88",en:"Cancel"},delete:{zh:"\u5220\u9664",en:"Delete"},reset:{zh:"\u91CD\u7F6E",en:"Reset"},add:{zh:"\u6DFB\u52A0",en:"Add"},inject_rules:{zh:"\u6CE8\u5165\u8BA2\u9605\u89C4\u5219",en:"Inject Subscribe Rules"},personal_rules:{zh:"\u4E2A\u4EBA\u89C4\u5219",en:"Rules"},subscribe_rules:{zh:"\u8BA2\u9605\u89C4\u5219",en:"Subscribe"},overwrite_subscribe_rules:{zh:"\u8986\u5199\u8BA2\u9605\u89C4\u5219",en:"Overwrite"},subscribe_url:{zh:"\u8BA2\u9605\u5730\u5740",en:"Subscribe URL"},rules_warn_1:{zh:"1\u3001\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u4E00\u76F4\u751F\u6548\uFF0C\u9009\u62E9\u201C\u6CE8\u5165\u8BA2\u9605\u89C4\u5219\u201D\u540E\uFF0C\u201C\u8BA2\u9605\u89C4\u5219\u201D\u624D\u4F1A\u751F\u6548\u3002",en:"1. The \"Personal Rules\" are always in effect. After selecting \"Inject Subscription Rules\", the \"Subscription Rules\" will take effect."},rules_warn_2:{zh:"2\u3001\u201C\u8BA2\u9605\u89C4\u5219\u201D\u7684\u6CE8\u5165\u4F4D\u7F6E\u662F\u5012\u6570\u7B2C\u4E8C\u7684\u4F4D\u7F6E\uFF0C\u56E0\u6B64\u9664\u5168\u5C40\u89C4\u5219(*)\u5916\uFF0C\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u4F18\u5148\u7EA7\u6BD4\u201C\u8BA2\u9605\u89C4\u5219\u201D\u9AD8\uFF0C\u201C\u4E2A\u4EBA\u89C4\u5219\u201D\u586B\u5199\u540C\u6837\u7684\u7F51\u5740\u4F1A\u8986\u76D6\u201D\u8BA2\u9605\u89C4\u5219\u201C\u7684\u6761\u76EE\u3002",en:"2. The injection position of \"Subscription Rules\" is the penultimate position. Therefore, except for the global rules (*), the priority of \"Personal Rules\" is higher than that of \"Subscription Rules\". Filling in the same url in \"Personal Rules\" will overwrite \"Subscription Rules\" entry."},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."},sync_warn:{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."},about_sync_api:{zh:"\u67E5\u770B\u5173\u4E8E\u6570\u636E\u540C\u6B65\u63A5\u53E3\u90E8\u7F72",en:"View About Data Synchronization Interface Deployment"},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"},style_none:{zh:"\u65E0",en:"None"},under_line:{zh:"\u4E0B\u5212\u76F4\u7EBF",en:"Underline"},dot_line:{zh:"\u4E0B\u5212\u70B9\u72B6\u7EBF",en:"Dotted Underline"},dash_line:{zh:"\u4E0B\u5212\u865A\u7EBF",en:"Dashed Underline"},wavy_line:{zh:"\u4E0B\u5212\u6CE2\u6D6A\u7EBF",en:"Wavy Underline"},fuzzy:{zh:"\u6A21\u7CCA",en:"Fuzzy"},highlight:{zh:"\u9AD8\u4EAE",en:"Highlight"},blockquote:{zh:"\u5F15\u7528",en:"Blockquote"},diy_style:{zh:"\u81EA\u5B9A\u4E49\u6837\u5F0F",en:"Custom Style"},diy_style_helper:{zh:"\u9075\u5FAA\u201CCSS\u201D\u7684\u8BED\u6CD5",en:"Follow the syntax of \"CSS\""},setting:{zh:"\u8BBE\u7F6E",en:"Setting"},pattern:{zh:"\u5339\u914D\u7F51\u5740",en:"URL pattern"},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 \",\"."},selector_helper:{zh:"1\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u30022\u3001\u591A\u4E2ACSS\u9009\u62E9\u5668\u4E4B\u95F4\u7528\u201C;\u201D\u9694\u5F00\u30023\u3001\u201Cshadow root\u201D\u9009\u62E9\u5668\u548C\u5185\u90E8\u9009\u62E9\u5668\u7528\u201C>>>\u201D\u9694\u5F00\u3002",en:"1. Follow CSS selector syntax. 2. Separate multiple CSS selectors with \";\". 3. The \"shadow root\" selector and the internal selector are separated by \">>>\"."},translate_switch:{zh:"\u5F00\u542F\u7FFB\u8BD1",en:"Translate Switch"},default_enabled:{zh:"\u9ED8\u8BA4\u5F00\u542F",en:"Enabled"},default_disabled:{zh:"\u9ED8\u8BA4\u5173\u95ED",en:"Disabled"},selector:{zh:"\u9009\u62E9\u5668",en:"Selector"},keep_selector:{zh:"\u4FDD\u7559\u5143\u7D20\u9009\u62E9\u5668",en:"Keep unchanged selector"},keep_selector_helper:{zh:"1\u3001\u9075\u5FAACSS\u9009\u62E9\u5668\u8BED\u6CD5\u30022\u3001\u5B50\u5143\u7D20\u9009\u62E9\u5668\u7528\u201C>>>\u201D\u9694\u5F00\u3002",en:"1. Follow CSS selector syntax. 2. Sub-element selectors are separated by \">>>\"."},terms:{zh:"\u4E13\u4E1A\u672F\u8BED",en:"Terms"},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."},selector_style:{zh:"\u9009\u62E9\u5668\u8282\u70B9\u6837\u5F0F",en:"Selector Style"},selector_style_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u4E0D\u4F1A\u79FB\u9664\u3002",en:"It is injected when translation is turned on and will not be removed when translation is turned off."},selector_parent_style:{zh:"\u9009\u62E9\u5668\u7236\u8282\u70B9\u6837\u5F0F",en:"Selector Parent Style"},inject_js:{zh:"\u6CE8\u5165JS",en:"Inject JS"},inject_js_helper:{zh:"1\u3001\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\u8FD0\u884C\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u79FB\u9664\u30022\u3001\u968F\u7740\u9875\u9762\u53D8\u5316\uFF0C\u53EF\u80FD\u4F1A\u591A\u6B21\u6CE8\u5165\u8FD0\u884C\u3002",en:"1. Inject and run when translation is turned on, and removed when translation is turned off. 2. As the page changes, it may be injected and run multiple times."},inject_css:{zh:"\u6CE8\u5165CSS",en:"Inject CSS"},inject_css_helper:{zh:"\u5F00\u542F\u7FFB\u8BD1\u65F6\u6CE8\u5165\uFF0C\u5173\u95ED\u7FFB\u8BD1\u65F6\u5C06\u79FB\u9664\u3002",en:"Injected when translation is enabled and removed when translation is disabled."},root_selector:{zh:"\u6839\u9009\u62E9\u5668",en:"Root Selector"},fixer_function:{zh:"\u4FEE\u590D\u51FD\u6570",en:"Fixer Function"},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

."},import:{zh:"\u5BFC\u5165",en:"Import"},export:{zh:"\u5BFC\u51FA",en:"Export"},error_cant_be_blank:{zh:"\u4E0D\u80FD\u4E3A\u7A7A",en:"Can not be blank"},error_duplicate_values:{zh:"\u5B58\u5728\u91CD\u590D\u7684\u503C",en:"There are duplicate values"},error_wrong_file_type:{zh:"\u9519\u8BEF\u7684\u6587\u4EF6\u7C7B\u578B",en:"Wrong file type"},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."},deepl_api:{zh:"DeepL \u63A5\u53E3",en:"DeepL API"},deepl_key:{zh:"DeepL \u5BC6\u94A5",en:"DeepL Key"},openai_api:{zh:"OpenAI \u63A5\u53E3",en:"OpenAI API"},openai_key:{zh:"OpenAI \u5BC6\u94A5",en:"OpenAI Key"},openai_model:{zh:"OpenAI \u6A21\u578B",en:"OpenAI Model"},openai_prompt:{zh:"OpenAI \u63D0\u793A\u8BCD",en:"OpenAI Prompt"},if_clear_cache:{zh:"\u662F\u5426\u6E05\u9664\u7F13\u5B58",en:"Whether clear cache"},clear_cache_never:{zh:"\u4E0D\u6E05\u9664\u7F13\u5B58",en:"Never clear cache"},clear_cache_restart:{zh:"\u91CD\u542F\u6D4F\u89C8\u5668\u65F6\u6E05\u9664\u7F13\u5B58",en:"Clear cache when restarting browser"},data_sync_type:{zh:"\u6570\u636E\u540C\u6B65\u65B9\u5F0F",en:"Data Sync Type"},data_sync_url:{zh:"\u6570\u636E\u540C\u6B65\u63A5\u53E3",en:"Data Sync API"},data_sync_user:{zh:"\u6570\u636E\u540C\u6B65\u8D26\u6237",en:"Data Sync User"},data_sync_key:{zh:"\u6570\u636E\u540C\u6B65\u5BC6\u94A5",en:"Data Sync Key"},sync_now:{zh:"\u7ACB\u5373\u540C\u6B65",en:"Sync Now"},sync_success:{zh:"\u540C\u6B65\u6210\u529F\uFF01",en:"Sync Success"},sync_failed:{zh:"\u540C\u6B65\u5931\u8D25\uFF01",en:"Sync Error"},error_got_some_wrong:{zh:"\u62B1\u6B49\uFF0C\u51FA\u9519\u4E86\uFF01",en:"Sorry, something went wrong!"},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"},click_test:{zh:"\u70B9\u51FB\u6D4B\u8BD5",en:"Click Test"},test_success:{zh:"\u6D4B\u8BD5\u6210\u529F",en:"Test success"},test_failed:{zh:"\u6D4B\u8BD5\u5931\u8D25",en:"Test failed"},clear_all_cache_now:{zh:"\u7ACB\u5373\u6E05\u9664\u5168\u90E8\u7F13\u5B58",en:"Clear all cache now"},clear_cache:{zh:"\u6E05\u9664\u7F13\u5B58",en:"Clear Cache"},clear_success:{zh:"\u6E05\u9664\u6210\u529F",en:"Clear success"},clear_failed:{zh:"\u6E05\u9664\u5931\u8D25",en:"Clear failed"},share:{zh:"\u5206\u4EAB",en:"Share"},clear_all:{zh:"\u6E05\u7A7A",en:"Clear All"},help:{zh:"\u6C42\u52A9",en:"Help"},restore_default:{zh:"\u6062\u590D\u9ED8\u8BA4",en:"Restore Default"},shortcuts_setting:{zh:"\u5FEB\u6377\u952E\u8BBE\u7F6E",en:"Shortcuts Setting"},toggle_translate_shortcut:{zh:"\"\u5F00\u542F\u7FFB\u8BD1\"\u5FEB\u6377\u952E",en:"\"Toggle Translate\" Shortcut"},toggle_style_shortcut:{zh:"\"\u5207\u6362\u6837\u5F0F\"\u5FEB\u6377\u952E",en:"\"Toggle Style\" Shortcut"},toggle_popup_shortcut:{zh:"\"\u6253\u5F00\u5F39\u7A97\"\u5FEB\u6377\u952E",en:"\"Open Popup\" Shortcut"},open_setting_shortcut:{zh:"\"\u6253\u5F00\u8BBE\u7F6E\"\u5FEB\u6377\u952E",en:"\"Open Setting\" Shortcut"},hide_fab_button:{zh:"\u9690\u85CF\u60AC\u6D6E\u6309\u94AE",en:"Hide Fab Button"},hide_tran_button:{zh:"\u9690\u85CF\u7FFB\u8BD1\u6309\u94AE",en:"Hide Translate Button"},hide_click_away:{zh:"\u70B9\u51FB\u5916\u90E8\u5173\u95ED\u5F39\u7A97",en:"Click outside to close the pop-up window"},show:{zh:"\u663E\u793A",en:"Show"},hide:{zh:"\u9690\u85CF",en:"Hide"},save_rule:{zh:"\u4FDD\u5B58\u89C4\u5219",en:"Save Rule"},global_rule:{zh:"\u5168\u5C40\u89C4\u5219",en:"Global Rule"},input_translate:{zh:"\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation"},use_input_box_translation:{zh:"\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",en:"Input Box Translation"},input_selector:{zh:"\u8F93\u5165\u6846\u9009\u62E9\u5668",en:"Input Selector"},input_selector_helper:{zh:"\u7528\u4E8E\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",en:"Used for input box translation."},trigger_trans_shortcut:{zh:"\u89E6\u53D1\u7FFB\u8BD1\u5FEB\u6377\u952E",en:"Trigger Translation Shortcut Keys"},trigger_trans_shortcut_help:{zh:"\u9ED8\u8BA4\u4E3A\u5355\u51FB\u201CAltLeft+KeyI\u201D",en:"Default is \"AltLeft+KeyI\""},shortcut_press_count:{zh:"\u5FEB\u6377\u952E\u8FDE\u51FB\u6B21\u6570",en:"Shortcut Press Number"},combo_timeout:{zh:"\u8FDE\u51FB\u8D85\u65F6\u65F6\u95F4 (10-1000ms)",en:"Combo Timeout (10-1000ms)"},input_trans_start_sign:{zh:"\u7FFB\u8BD1\u8D77\u59CB\u6807\u8BC6",en:"Translation Start Sign"},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\""},detect_lang_remote:{zh:"\u8FDC\u7A0B\u8BED\u8A00\u68C0\u6D4B",en:"Remote language detection"},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."},disable:{zh:"\u7981\u7528",en:"Disable"},enable:{zh:"\u542F\u7528",en:"Enable"},selection_translate:{zh:"\u5212\u8BCD\u7FFB\u8BD1",en:"Selection Translate"},toggle_selection_translate:{zh:"\u542F\u7528\u5212\u8BCD\u7FFB\u8BD1",en:"Use Selection Translate"},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"},tranbtn_offset_x:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBX\uFF080-100\uFF09",en:"Translate Button Offset X (0-100)"},tranbtn_offset_y:{zh:"\u7FFB\u8BD1\u6309\u94AE\u504F\u79FBY\uFF080-100\uFF09",en:"Translate Button Offset Y (0-100)"},translated_text:{zh:"\u8BD1\u6587",en:"Translated Text"},original_text:{zh:"\u539F\u6587",en:"Original Text"},favorite_words:{zh:"\u6536\u85CF\u8BCD\u6C47",en:"Favorite Words"},touch_setting:{zh:"\u89E6\u5C4F\u8BBE\u7F6E",en:"Touch Setting"},touch_translate_shortcut:{zh:"\u89E6\u5C4F\u7FFB\u8BD1\u5FEB\u6377\u65B9\u5F0F",en:"Touch Translate Shortcut"},touch_tap_0:{zh:"\u7981\u7528",en:"Disable"},touch_tap_2:{zh:"\u53CC\u6307\u8F7B\u89E6",en:"Two finger tap"},touch_tap_3:{zh:"\u4E09\u6307\u8F7B\u89E6",en:"Three finger tap"},touch_tap_4:{zh:"\u56DB\u6307\u8F7B\u89E6",en:"Four finger tap"},translate_blacklist:{zh:"\u7981\u7528\u7FFB\u8BD1\u540D\u5355",en:"Translate Blacklist"},disabled_csplist:{zh:"\u7981\u7528CSP\u540D\u5355",en:"Disabled CSP List"},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."},skip_langs:{zh:"\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",en:"Disable Languages"},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."},context_menus:{zh:"\u53F3\u952E\u83DC\u5355",en:"Context Menus"},hide_context_menus:{zh:"\u9690\u85CF\u53F3\u952E\u83DC\u5355",en:"Hide Context Menus"},simple_context_menus:{zh:"\u7B80\u5355\u53F3\u952E\u83DC\u5355",en:"Simple_context_menus Context Menus"},secondary_context_menus:{zh:"\u4E8C\u7EA7\u53F3\u952E\u83DC\u5355",en:"Secondary Context Menus"},mulkeys_help:{zh:"\u652F\u6301\u7528\u6362\u884C\u6216\u82F1\u6587\u9017\u53F7\u201C,\u201D\u5206\u9694\u591A\u4E2AKEY\u8F6E\u8BE2\u8C03\u7528\u3002",en:"Supports multiple KEY polling calls separated by newlines or English commas \",\"."},translation_element_tag:{zh:"\u8BD1\u6587\u5143\u7D20\u6807\u7B7E",en:"Translation Element Tag"},show_only_translations:{zh:"\u4EC5\u663E\u793A\u8BD1\u6587",en:"Show Only Translations"},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."},translate_page_title:{zh:"\u662F\u5426\u7FFB\u8BD1\u9875\u9762\u6807\u9898",en:"Translate Page Title"},more:{zh:"\u66F4\u591A",en:"More"},fixer_selector:{zh:"\u7F51\u9875\u4FEE\u590D\u9009\u62E9\u5668",en:"Fixer Selector"},reg_niutrans:{zh:"\u83B7\u53D6\u5C0F\u725B\u7FFB\u8BD1\u5BC6\u94A5",en:"Get NiuTrans APIKey"}}; ;// CONCATENATED MODULE: ./src/config/index.js -const STOKEY_MSAUTH="".concat(APP_NAME,"_msauth");const STOKEY_BDAUTH="".concat(APP_NAME,"_bdauth");const config_STOKEY_SETTING="".concat(APP_NAME,"_setting");const config_STOKEY_RULES="".concat(APP_NAME,"_rules");const STOKEY_WORDS="".concat(APP_NAME,"_words");const config_STOKEY_SYNC="".concat(APP_NAME,"_sync");const config_STOKEY_FAB="".concat(APP_NAME,"_fab");const config_STOKEY_RULESCACHE_PREFIX="".concat(APP_NAME,"_rulescache_");const CMD_TOGGLE_TRANSLATE="toggleTranslate";const CMD_TOGGLE_STYLE="toggleStyle";const CMD_OPEN_OPTIONS="openOptions";const CMD_OPEN_TRANBOX="openTranbox";const CLIENT_WEB="web";const CLIENT_CHROME="chrome";const CLIENT_EDGE="edge";const CLIENT_FIREFOX="firefox";const CLIENT_USERSCRIPT="userscript";const CLIENT_EXTS=[CLIENT_CHROME,CLIENT_EDGE,CLIENT_FIREFOX];const KV_RULES_KEY="kiss-rules.json";const KV_WORDS_KEY="kiss-words.json";const KV_RULES_SHARE_KEY="kiss-rules-share.json";const KV_SETTING_KEY="kiss-setting.json";const KV_SALT_SYNC="KISS-Translator-SYNC";const KV_SALT_SHARE="KISS-Translator-SHARE";const CACHE_NAME="".concat(APP_NAME,"_cache");const MSG_FETCH="fetch";const config_MSG_FETCH_LIMIT="fetch_limit";const config_MSG_FETCH_CLEAR="fetch_clear";const MSG_OPEN_OPTIONS="open_options";const MSG_SAVE_RULE="save_rule";const MSG_TRANS_TOGGLE="trans_toggle";const MSG_TRANS_TOGGLE_STYLE="trans_toggle_style";const MSG_OPEN_TRANBOX="open_tranbox";const MSG_TRANS_GETRULE="trans_getrule";const MSG_TRANS_PUTRULE="trans_putrule";const MSG_TRANS_CURRULE="trans_currule";const MSG_CONTEXT_MENUS="context_menus";const MSG_COMMAND_SHORTCUTS="command_shortcuts";const MSG_INJECT_JS="inject_js";const MSG_INJECT_CSS="inject_css";const MSG_UPDATE_CSP="update_csp";const THEME_LIGHT="light";const THEME_DARK="dark";const URL_KISS_WORKER="https://github.com/fishjar/kiss-worker";const URL_KISS_PROXY="https://github.com/fishjar/kiss-proxy";const URL_KISS_RULES="https://github.com/fishjar/kiss-rules";const URL_KISS_RULES_NEW_ISSUE="https://github.com/fishjar/kiss-rules/issues/new";const URL_RAW_PREFIX="https://raw.githubusercontent.com/fishjar/kiss-translator/master";const URL_CACHE_TRAN="https://".concat(APP_LCNAME,"/translate");const URL_MICROSOFT_TRAN="https://api-edge.cognitive.microsofttranslator.com/translate";const URL_MICROSOFT_AUTH="https://edge.microsoft.com/translate/auth";const config_URL_BAIDU_LANGDETECT="https://fanyi.baidu.com/langdetect";const config_URL_BAIDU_SUGGEST="https://fanyi.baidu.com/sug";const URL_BAIDU_TTS="https://fanyi.baidu.com/gettts";const URL_BAIDU_WEB="https://fanyi.baidu.com/";const URL_BAIDU_TRANSAPI="https://fanyi.baidu.com/transapi";const config_URL_BAIDU_TRANSAPI_V2="https://fanyi.baidu.com/v2transapi";const URL_DEEPLFREE_TRAN="https://www2.deepl.com/jsonrpc";const config_URL_TENCENT_TRANSMART="https://transmart.qq.com/api/imt";const OPT_TRANS_GOOGLE="Google";const OPT_TRANS_MICROSOFT="Microsoft";const OPT_TRANS_DEEPL="DeepL";const OPT_TRANS_DEEPLX="DeepLX";const OPT_TRANS_DEEPLFREE="DeepLFree";const OPT_TRANS_BAIDU="Baidu";const OPT_TRANS_TENCENT="Tencent";const OPT_TRANS_OPENAI="OpenAI";const OPT_TRANS_GEMINI="Gemini";const OPT_TRANS_CLOUDFLAREAI="CloudflareAI";const OPT_TRANS_CUSTOMIZE="Custom";const OPT_TRANS_CUSTOMIZE_2="Custom2";const OPT_TRANS_CUSTOMIZE_3="Custom3";const OPT_TRANS_CUSTOMIZE_4="Custom4";const OPT_TRANS_CUSTOMIZE_5="Custom5";const OPT_TRANS_ALL=[OPT_TRANS_GOOGLE,OPT_TRANS_MICROSOFT,OPT_TRANS_BAIDU,OPT_TRANS_TENCENT,OPT_TRANS_DEEPL,OPT_TRANS_DEEPLFREE,OPT_TRANS_DEEPLX,OPT_TRANS_OPENAI,OPT_TRANS_GEMINI,OPT_TRANS_CLOUDFLAREAI,OPT_TRANS_CUSTOMIZE,OPT_TRANS_CUSTOMIZE_2,OPT_TRANS_CUSTOMIZE_3,OPT_TRANS_CUSTOMIZE_4,OPT_TRANS_CUSTOMIZE_5];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_FROM=[["auto","Auto-detect"],...OPT_LANGS_TO];const OPT_LANGS_SPECIAL={[OPT_TRANS_GOOGLE]:new Map(OPT_LANGS_FROM.map(_ref=>{let[key]=_ref;return[key,key];})),[OPT_TRANS_MICROSOFT]:new Map([...OPT_LANGS_FROM.map(_ref2=>{let[key]=_ref2;return[key,key];}),["auto",""],["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[OPT_TRANS_DEEPL]:new Map([...OPT_LANGS_FROM.map(_ref3=>{let[key]=_ref3;return[key,key.toUpperCase()];}),["auto",""],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLFREE]:new Map([...OPT_LANGS_FROM.map(_ref4=>{let[key]=_ref4;return[key,key.toUpperCase()];}),["auto","auto"],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLX]:new Map([...OPT_LANGS_FROM.map(_ref5=>{let[key]=_ref5;return[key,key.toUpperCase()];}),["auto",""],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_BAIDU]:new Map([...OPT_LANGS_FROM.map(_ref6=>{let[key]=_ref6;return[key,key];}),["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]:new Map(OPT_LANGS_FROM.map(_ref7=>{let[key,val]=_ref7;return[key,val.split(" - ")[0]];})),[OPT_TRANS_GEMINI]:new Map(OPT_LANGS_FROM.map(_ref8=>{let[key,val]=_ref8;return[key,val.split(" - ")[0]];})),[OPT_TRANS_CLOUDFLAREAI]:new Map([["auto",""],["zh-CN","chinese"],["zh-TW","chinese"],["en","english"],["ar","arabic"],["de","german"],["ru","russian"],["fr","french"],["pt","portuguese"],["ja","japanese"],["es","spanish"],["hi","hindi"]]),[OPT_TRANS_CUSTOMIZE]:new Map([...OPT_LANGS_FROM.map(_ref9=>{let[key]=_ref9;return[key,key];}),["auto",""]])};const OPT_LANGS_LIST=OPT_LANGS_TO.map(_ref10=>{let[lang]=_ref10;return lang;});const config_OPT_LANGS_BAIDU=new Map(Array.from(OPT_LANGS_SPECIAL[OPT_TRANS_BAIDU].entries()).map(_ref11=>{let[k,v]=_ref11;return[v,k];}));const config_OPT_LANGS_TENCENT=new Map(Array.from(OPT_LANGS_SPECIAL[OPT_TRANS_TENCENT].entries()).map(_ref12=>{let[k,v]=_ref12;return[v,k];}));config_OPT_LANGS_TENCENT.set("zh","zh-CN");const OPT_STYLE_NONE="style_none";// 无 +const STOKEY_MSAUTH="".concat(APP_NAME,"_msauth");const STOKEY_BDAUTH="".concat(APP_NAME,"_bdauth");const config_STOKEY_SETTING="".concat(APP_NAME,"_setting");const config_STOKEY_RULES="".concat(APP_NAME,"_rules");const STOKEY_WORDS="".concat(APP_NAME,"_words");const config_STOKEY_SYNC="".concat(APP_NAME,"_sync");const config_STOKEY_FAB="".concat(APP_NAME,"_fab");const config_STOKEY_RULESCACHE_PREFIX="".concat(APP_NAME,"_rulescache_");const CMD_TOGGLE_TRANSLATE="toggleTranslate";const CMD_TOGGLE_STYLE="toggleStyle";const CMD_OPEN_OPTIONS="openOptions";const CMD_OPEN_TRANBOX="openTranbox";const CLIENT_WEB="web";const CLIENT_CHROME="chrome";const CLIENT_EDGE="edge";const CLIENT_FIREFOX="firefox";const CLIENT_USERSCRIPT="userscript";const CLIENT_EXTS=[CLIENT_CHROME,CLIENT_EDGE,CLIENT_FIREFOX];const KV_RULES_KEY="kiss-rules.json";const KV_WORDS_KEY="kiss-words.json";const KV_RULES_SHARE_KEY="kiss-rules-share.json";const KV_SETTING_KEY="kiss-setting.json";const KV_SALT_SYNC="KISS-Translator-SYNC";const KV_SALT_SHARE="KISS-Translator-SHARE";const CACHE_NAME="".concat(APP_NAME,"_cache");const MSG_FETCH="fetch";const config_MSG_FETCH_LIMIT="fetch_limit";const config_MSG_FETCH_CLEAR="fetch_clear";const MSG_OPEN_OPTIONS="open_options";const MSG_SAVE_RULE="save_rule";const MSG_TRANS_TOGGLE="trans_toggle";const MSG_TRANS_TOGGLE_STYLE="trans_toggle_style";const MSG_OPEN_TRANBOX="open_tranbox";const MSG_TRANS_GETRULE="trans_getrule";const MSG_TRANS_PUTRULE="trans_putrule";const MSG_TRANS_CURRULE="trans_currule";const MSG_CONTEXT_MENUS="context_menus";const MSG_COMMAND_SHORTCUTS="command_shortcuts";const MSG_INJECT_JS="inject_js";const MSG_INJECT_CSS="inject_css";const MSG_UPDATE_CSP="update_csp";const THEME_LIGHT="light";const THEME_DARK="dark";const URL_KISS_WORKER="https://github.com/fishjar/kiss-worker";const URL_KISS_PROXY="https://github.com/fishjar/kiss-proxy";const URL_KISS_RULES="https://github.com/fishjar/kiss-rules";const URL_KISS_RULES_NEW_ISSUE="https://github.com/fishjar/kiss-rules/issues/new";const URL_RAW_PREFIX="https://raw.githubusercontent.com/fishjar/kiss-translator/master";const URL_CACHE_TRAN="https://".concat(APP_LCNAME,"/translate");const URL_MICROSOFT_TRAN="https://api-edge.cognitive.microsofttranslator.com/translate";const URL_MICROSOFT_AUTH="https://edge.microsoft.com/translate/auth";const config_URL_BAIDU_LANGDETECT="https://fanyi.baidu.com/langdetect";const config_URL_BAIDU_SUGGEST="https://fanyi.baidu.com/sug";const URL_BAIDU_TTS="https://fanyi.baidu.com/gettts";const URL_BAIDU_WEB="https://fanyi.baidu.com/";const URL_BAIDU_TRANSAPI="https://fanyi.baidu.com/transapi";const config_URL_BAIDU_TRANSAPI_V2="https://fanyi.baidu.com/v2transapi";const URL_DEEPLFREE_TRAN="https://www2.deepl.com/jsonrpc";const config_URL_TENCENT_TRANSMART="https://transmart.qq.com/api/imt";const URL_NIUTRANS_REG="https://niutrans.com/login?active=3&userSource=kiss-translator";const DEFAULT_USER_AGENT="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36";const OPT_TRANS_GOOGLE="Google";const OPT_TRANS_MICROSOFT="Microsoft";const OPT_TRANS_DEEPL="DeepL";const OPT_TRANS_DEEPLX="DeepLX";const OPT_TRANS_DEEPLFREE="DeepLFree";const OPT_TRANS_NIUTRANS="NiuTrans";const OPT_TRANS_BAIDU="Baidu";const OPT_TRANS_TENCENT="Tencent";const OPT_TRANS_OPENAI="OpenAI";const OPT_TRANS_GEMINI="Gemini";const OPT_TRANS_CLOUDFLAREAI="CloudflareAI";const OPT_TRANS_CUSTOMIZE="Custom";const OPT_TRANS_CUSTOMIZE_2="Custom2";const OPT_TRANS_CUSTOMIZE_3="Custom3";const OPT_TRANS_CUSTOMIZE_4="Custom4";const OPT_TRANS_CUSTOMIZE_5="Custom5";const OPT_TRANS_ALL=[OPT_TRANS_GOOGLE,OPT_TRANS_MICROSOFT,OPT_TRANS_BAIDU,OPT_TRANS_TENCENT,OPT_TRANS_DEEPL,OPT_TRANS_DEEPLFREE,OPT_TRANS_DEEPLX,OPT_TRANS_NIUTRANS,OPT_TRANS_OPENAI,OPT_TRANS_GEMINI,OPT_TRANS_CLOUDFLAREAI,OPT_TRANS_CUSTOMIZE,OPT_TRANS_CUSTOMIZE_2,OPT_TRANS_CUSTOMIZE_3,OPT_TRANS_CUSTOMIZE_4,OPT_TRANS_CUSTOMIZE_5];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_FROM=[["auto","Auto-detect"],...OPT_LANGS_TO];const OPT_LANGS_SPECIAL={[OPT_TRANS_GOOGLE]:new Map(OPT_LANGS_FROM.map(_ref=>{let[key]=_ref;return[key,key];})),[OPT_TRANS_MICROSOFT]:new Map([...OPT_LANGS_FROM.map(_ref2=>{let[key]=_ref2;return[key,key];}),["auto",""],["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[OPT_TRANS_DEEPL]:new Map([...OPT_LANGS_FROM.map(_ref3=>{let[key]=_ref3;return[key,key.toUpperCase()];}),["auto",""],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLFREE]:new Map([...OPT_LANGS_FROM.map(_ref4=>{let[key]=_ref4;return[key,key.toUpperCase()];}),["auto","auto"],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_DEEPLX]:new Map([...OPT_LANGS_FROM.map(_ref5=>{let[key]=_ref5;return[key,key.toUpperCase()];}),["auto",""],["zh-CN","ZH"],["zh-TW","ZH"]]),[OPT_TRANS_NIUTRANS]:new Map([...OPT_LANGS_FROM.map(_ref6=>{let[key]=_ref6;return[key,key];}),["auto","auto"],["zh-CN","zh"],["zh-TW","cht"]]),[OPT_TRANS_BAIDU]:new Map([...OPT_LANGS_FROM.map(_ref7=>{let[key]=_ref7;return[key,key];}),["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]:new Map(OPT_LANGS_FROM.map(_ref8=>{let[key,val]=_ref8;return[key,val.split(" - ")[0]];})),[OPT_TRANS_GEMINI]:new Map(OPT_LANGS_FROM.map(_ref9=>{let[key,val]=_ref9;return[key,val.split(" - ")[0]];})),[OPT_TRANS_CLOUDFLAREAI]:new Map([["auto",""],["zh-CN","chinese"],["zh-TW","chinese"],["en","english"],["ar","arabic"],["de","german"],["ru","russian"],["fr","french"],["pt","portuguese"],["ja","japanese"],["es","spanish"],["hi","hindi"]]),[OPT_TRANS_CUSTOMIZE]:new Map([...OPT_LANGS_FROM.map(_ref10=>{let[key]=_ref10;return[key,key];}),["auto",""]]),[OPT_TRANS_CUSTOMIZE_2]:new Map([...OPT_LANGS_FROM.map(_ref11=>{let[key]=_ref11;return[key,key];}),["auto",""]]),[OPT_TRANS_CUSTOMIZE_3]:new Map([...OPT_LANGS_FROM.map(_ref12=>{let[key]=_ref12;return[key,key];}),["auto",""]]),[OPT_TRANS_CUSTOMIZE_4]:new Map([...OPT_LANGS_FROM.map(_ref13=>{let[key]=_ref13;return[key,key];}),["auto",""]]),[OPT_TRANS_CUSTOMIZE_5]:new Map([...OPT_LANGS_FROM.map(_ref14=>{let[key]=_ref14;return[key,key];}),["auto",""]])};const OPT_LANGS_LIST=OPT_LANGS_TO.map(_ref15=>{let[lang]=_ref15;return lang;});const config_OPT_LANGS_BAIDU=new Map(Array.from(OPT_LANGS_SPECIAL[OPT_TRANS_BAIDU].entries()).map(_ref16=>{let[k,v]=_ref16;return[v,k];}));const config_OPT_LANGS_TENCENT=new Map(Array.from(OPT_LANGS_SPECIAL[OPT_TRANS_TENCENT].entries()).map(_ref17=>{let[k,v]=_ref17;return[v,k];}));config_OPT_LANGS_TENCENT.set("zh","zh-CN");const OPT_STYLE_NONE="style_none";// 无 const OPT_STYLE_LINE="under_line";// 下划线 const OPT_STYLE_DOTLINE="dot_line";// 点状线 const OPT_STYLE_DASHLINE="dash_line";// 虚线 @@ -41460,7 +41460,7 @@ hideClickAway:false// 是否点击外部关闭弹窗 const DEFAULT_SUBRULES_LIST=[{url:"https://fishjar.github.io/kiss-rules/kiss-rules.json",selected:false},{url:"https://fishjar.github.io/kiss-rules/kiss-rules-on.json",selected:true},{url:"https://fishjar.github.io/kiss-rules/kiss-rules-off.json",selected:false}];// 翻译接口 const defaultCustomApi={url:"",key:"",fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL};const DEFAULT_TRANS_APIS={[OPT_TRANS_GOOGLE]:{url:"https://translate.googleapis.com/translate_a/single",key:"",fetchLimit:DEFAULT_FETCH_LIMIT,// 最大任务数量 fetchInterval:DEFAULT_FETCH_INTERVAL// 任务间隔时间 -},[OPT_TRANS_MICROSOFT]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_BAIDU]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_TENCENT]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_DEEPL]:{url:"https://api-free.deepl.com/v2/translate",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_DEEPLFREE]:{fetchLimit:1,fetchInterval:500},[OPT_TRANS_DEEPLX]:{url:"http://localhost:1188/translate",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_OPENAI]:{url:"https://api.openai.com/v1/chat/completions",key:"",model:"gpt-4",prompt:"You will be provided with a sentence in ".concat(PROMPT_PLACE_FROM,", and your task is to translate it into ").concat(PROMPT_PLACE_TO,"."),fetchLimit:1,fetchInterval:500},[OPT_TRANS_GEMINI]:{url:"https://generativelanguage.googleapis.com/v1/models",key:"",model:"gemini-pro",prompt:"Translate the following text from ".concat(PROMPT_PLACE_FROM," to ").concat(PROMPT_PLACE_TO,":\n\n").concat(PROMPT_PLACE_TEXT),fetchLimit:1,fetchInterval:500},[OPT_TRANS_CLOUDFLAREAI]:{url:"https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/run/@cf/meta/m2m100-1.2b",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_CUSTOMIZE]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_2]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_3]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_4]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_5]:defaultCustomApi};// 默认快捷键 +},[OPT_TRANS_MICROSOFT]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_BAIDU]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_TENCENT]:{fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_DEEPL]:{url:"https://api-free.deepl.com/v2/translate",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_DEEPLFREE]:{fetchLimit:1,fetchInterval:500},[OPT_TRANS_DEEPLX]:{url:"http://localhost:1188/translate",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_NIUTRANS]:{url:"https://api.niutrans.com/NiuTransServer/translation",key:"",dictNo:"",memoryNo:"",fetchLimit:DEFAULT_FETCH_LIMIT,fetchInterval:DEFAULT_FETCH_INTERVAL},[OPT_TRANS_OPENAI]:{url:"https://api.openai.com/v1/chat/completions",key:"",model:"gpt-4",prompt:"You will be provided with a sentence in ".concat(PROMPT_PLACE_FROM,", and your task is to translate it into ").concat(PROMPT_PLACE_TO,"."),fetchLimit:1,fetchInterval:500},[OPT_TRANS_GEMINI]:{url:"https://generativelanguage.googleapis.com/v1/models",key:"",model:"gemini-pro",prompt:"Translate the following text from ".concat(PROMPT_PLACE_FROM," to ").concat(PROMPT_PLACE_TO,":\n\n").concat(PROMPT_PLACE_TEXT),fetchLimit:1,fetchInterval:500},[OPT_TRANS_CLOUDFLAREAI]:{url:"https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/run/@cf/meta/m2m100-1.2b",key:"",fetchLimit:1,fetchInterval:500},[OPT_TRANS_CUSTOMIZE]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_2]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_3]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_4]:defaultCustomApi,[OPT_TRANS_CUSTOMIZE_5]:defaultCustomApi};// 默认快捷键 const OPT_SHORTCUT_TRANSLATE="toggleTranslate";const OPT_SHORTCUT_STYLE="toggleStyle";const OPT_SHORTCUT_POPUP="togglePopup";const OPT_SHORTCUT_SETTING="openSetting";const DEFAULT_SHORTCUTS={[OPT_SHORTCUT_TRANSLATE]:["AltLeft","KeyQ"],[OPT_SHORTCUT_STYLE]:["AltLeft","KeyC"],[OPT_SHORTCUT_POPUP]:["AltLeft","KeyK"],[OPT_SHORTCUT_SETTING]:["AltLeft","KeyO"]};const TRANS_MIN_LENGTH=5;// 最短翻译长度 const TRANS_MAX_LENGTH=5000;// 最长翻译长度 const TRANS_NEWLINE_LENGTH=20;// 换行字符数 @@ -42113,7 +42113,8 @@ store=await getToken();await setBdauth(store);return store;};};const bdAuth=_bdA * 失效作废 * @param {*} param0 * @returns - */const genBaiduV2=async _ref=>{let{text,from,to}=_ref;const{token,gtk}=await bdAuth();const sign=getSign(text,gtk);const data={from,to,query:text,simple_means_flag:3,sign,token,domain:"common",ts:Date.now()};const input="".concat(URL_BAIDU_TRANSAPI_V2,"?from=").concat(from,"&to=").concat(to);const init={headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},method:"POST",body:queryString.stringify(data)};return[input,init];};const genBaidu=async _ref2=>{let{text,from,to}=_ref2;const data={from,to,query:text,source:"txt"};const init={headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},method:"POST",body:query_string.stringify(data)};return[URL_BAIDU_TRANSAPI,init];}; + */const genBaiduV2=async _ref=>{let{text,from,to}=_ref;const{token,gtk}=await bdAuth();const sign=getSign(text,gtk);const data={from,to,query:text,simple_means_flag:3,sign,token,domain:"common",ts:Date.now()};const input="".concat(URL_BAIDU_TRANSAPI_V2,"?from=").concat(from,"&to=").concat(to);const init={headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},method:"POST",body:queryString.stringify(data)};return[input,init];};const genBaidu=async _ref2=>{let{text,from,to}=_ref2;const data={from,to,query:text,source:"txt"};const init={headers:{// Origin: "https://fanyi.baidu.com", +"content-type":"application/x-www-form-urlencoded; charset=UTF-8","User-Agent":DEFAULT_USER_AGENT},method:"POST",body:query_string.stringify(data)};return[URL_BAIDU_TRANSAPI,init];}; ;// CONCATENATED MODULE: ./src/libs/req.js const keyMap=new Map();// 轮询key const keyPick=function(translator){var _keyMap$get;let key=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";const keys=key.split(/\n|,/).map(item=>item.trim()).filter(Boolean);if(keys.length===0){return"";}const preIndex=(_keyMap$get=keyMap.get(translator))!==null&&_keyMap$get!==void 0?_keyMap$get:-1;const curIndex=(preIndex+1)%keys.length;keyMap.set(translator,curIndex);return keys[curIndex];};/** @@ -42121,14 +42122,14 @@ const keyPick=function(translator){var _keyMap$get;let key=arguments.length>1&&a * @param {*} request * @returns */const newCacheReq=async(input,init)=>{let request=new Request(input,init);if(request.method!=="GET"){const body=await request.text();const cacheUrl=new URL(request.url);cacheUrl.pathname+=body;request=new Request(cacheUrl.toString(),{method:"GET"});}return request;};const genGoogle=_ref=>{let{text,from,to,url,key}=_ref;const params={client:"gtx",dt:"t",dj:1,ie:"UTF-8",sl:from,tl:to,q:text};const input="".concat(url,"?").concat(query_string.stringify(params));const init={headers:{"Content-type":"application/json"}};if(key){init.headers.Authorization="Bearer ".concat(key);}return[input,init];};const genMicrosoft=async _ref2=>{let{text,from,to}=_ref2;const[token]=await msAuth();const params={from,to,"api-version":"3.0"};const input="".concat(URL_MICROSOFT_TRAN,"?").concat(query_string.stringify(params));const init={headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(token)},method:"POST",body:JSON.stringify([{Text:text}])};return[input,init];};const genDeepl=_ref3=>{let{text,from,to,url,key}=_ref3;const data={text:[text],target_lang:to,source_lang:from// split_sentences: "0", -};const init={headers:{"Content-type":"application/json",Authorization:"DeepL-Auth-Key ".concat(key)},method:"POST",body:JSON.stringify(data)};return[url,init];};const genDeeplX=_ref4=>{let{text,from,to,url,key}=_ref4;const data={text,target_lang:to,source_lang:from};const init={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify(data)};if(key){init.headers.Authorization="Bearer ".concat(key);}return[url,init];};const genTencent=_ref5=>{let{text,from,to}=_ref5;const data={header:{fn:"auto_translation_block"},source:{text_block:text,lang:from},target:{lang:to}};const init={headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify(data)};return[config_URL_TENCENT_TRANSMART,init];};const genOpenAI=_ref6=>{let{text,from,to,url,key,prompt,model}=_ref6;prompt=prompt.replaceAll(PROMPT_PLACE_FROM,from).replaceAll(PROMPT_PLACE_TO,to);const data={model,messages:[{role:"system",content:prompt},{role:"user",content:text}],temperature:0,max_tokens:256};const init={headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(key),// OpenAI +};const init={headers:{"Content-type":"application/json",Authorization:"DeepL-Auth-Key ".concat(key)},method:"POST",body:JSON.stringify(data)};return[url,init];};const genDeeplX=_ref4=>{let{text,from,to,url,key}=_ref4;const data={text,target_lang:to,source_lang:from};const init={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify(data)};if(key){init.headers.Authorization="Bearer ".concat(key);}return[url,init];};const genNiuTrans=_ref5=>{let{text,from,to,url,key,dictNo,memoryNo}=_ref5;const data={from,to,apikey:key,src_text:text,dictNo,memoryNo};const init={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify(data)};return[url,init];};const genTencent=_ref6=>{let{text,from,to}=_ref6;const data={header:{fn:"auto_translation_block"},source:{text_block:text,lang:from},target:{lang:to}};const init={headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify(data)};return[config_URL_TENCENT_TRANSMART,init];};const genOpenAI=_ref7=>{let{text,from,to,url,key,prompt,model}=_ref7;prompt=prompt.replaceAll(PROMPT_PLACE_FROM,from).replaceAll(PROMPT_PLACE_TO,to);const data={model,messages:[{role:"system",content:prompt},{role:"user",content:text}],temperature:0,max_tokens:256};const init={headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(key),// OpenAI "api-key":key// Azure OpenAI -},method:"POST",body:JSON.stringify(data)};return[url,init];};const genGemini=_ref7=>{let{text,from,to,url,key,prompt,model}=_ref7;prompt=prompt.replaceAll(PROMPT_PLACE_FROM,from).replaceAll(PROMPT_PLACE_TO,to).replaceAll(PROMPT_PLACE_TEXT,text);const data={contents:[{// role: "user", -parts:[{text:prompt}]}]};const input="".concat(url,"/").concat(model,":generateContent?key=").concat(key);const init={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify(data)};return[input,init];};const genCloudflareAI=_ref8=>{let{text,from,to,url,key}=_ref8;const data={text,source_lang:from,target_lang:to};const init={headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(key)},method:"POST",body:JSON.stringify(data)};return[url,init];};const genCustom=_ref9=>{let{text,from,to,url,key}=_ref9;const data={text,from,to};const init={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify(data)};if(key){init.headers.Authorization="Bearer ".concat(key);}return[url,init];};/** +},method:"POST",body:JSON.stringify(data)};return[url,init];};const genGemini=_ref8=>{let{text,from,to,url,key,prompt,model}=_ref8;prompt=prompt.replaceAll(PROMPT_PLACE_FROM,from).replaceAll(PROMPT_PLACE_TO,to).replaceAll(PROMPT_PLACE_TEXT,text);const data={contents:[{// role: "user", +parts:[{text:prompt}]}]};const input="".concat(url,"/").concat(model,":generateContent?key=").concat(key);const init={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify(data)};return[input,init];};const genCloudflareAI=_ref9=>{let{text,from,to,url,key}=_ref9;const data={text,source_lang:from,target_lang:to};const init={headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(key)},method:"POST",body:JSON.stringify(data)};return[url,init];};const genCustom=_ref10=>{let{text,from,to,url,key}=_ref10;const data={text,from,to};const init={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify(data)};if(key){init.headers.Authorization="Bearer ".concat(key);}return[url,init];};/** * 构造翻译接口 request * @param {*} * @returns - */const newTransReq=(_ref10,apiSetting)=>{let{translator,text,from,to}=_ref10;const args={text,from,to,...apiSetting};switch(translator){case OPT_TRANS_DEEPL:case OPT_TRANS_OPENAI:case OPT_TRANS_GEMINI:case OPT_TRANS_CLOUDFLAREAI:args.key=keyPick(translator,args.key);break;default:}switch(translator){case OPT_TRANS_GOOGLE:return genGoogle(args);case OPT_TRANS_MICROSOFT:return genMicrosoft(args);case OPT_TRANS_DEEPL:return genDeepl(args);case OPT_TRANS_DEEPLFREE:return genDeeplFree(args);case OPT_TRANS_DEEPLX:return genDeeplX(args);case OPT_TRANS_BAIDU:return genBaidu(args);case OPT_TRANS_TENCENT:return genTencent(args);case OPT_TRANS_OPENAI:return genOpenAI(args);case OPT_TRANS_GEMINI:return genGemini(args);case OPT_TRANS_CLOUDFLAREAI:return genCloudflareAI(args);case OPT_TRANS_CUSTOMIZE:return genCustom(args);default:throw new Error("[trans] translator: ".concat(translator," not support"));}}; + */const newTransReq=(_ref11,apiSetting)=>{let{translator,text,from,to}=_ref11;const args={text,from,to,...apiSetting};switch(translator){case OPT_TRANS_DEEPL:case OPT_TRANS_OPENAI:case OPT_TRANS_GEMINI:case OPT_TRANS_CLOUDFLAREAI:case OPT_TRANS_NIUTRANS:args.key=keyPick(translator,args.key);break;default:}switch(translator){case OPT_TRANS_GOOGLE:return genGoogle(args);case OPT_TRANS_MICROSOFT:return genMicrosoft(args);case OPT_TRANS_DEEPL:return genDeepl(args);case OPT_TRANS_DEEPLFREE:return genDeeplFree(args);case OPT_TRANS_DEEPLX:return genDeeplX(args);case OPT_TRANS_NIUTRANS:return genNiuTrans(args);case OPT_TRANS_BAIDU:return genBaidu(args);case OPT_TRANS_TENCENT:return genTencent(args);case OPT_TRANS_OPENAI:return genOpenAI(args);case OPT_TRANS_GEMINI:return genGemini(args);case OPT_TRANS_CLOUDFLAREAI:return genCloudflareAI(args);case OPT_TRANS_CUSTOMIZE:case OPT_TRANS_CUSTOMIZE_2:case OPT_TRANS_CUSTOMIZE_3:case OPT_TRANS_CUSTOMIZE_4:case OPT_TRANS_CUSTOMIZE_5:return genCustom(args);default:throw new Error("[trans] translator: ".concat(translator," not support"));}}; ;// CONCATENATED MODULE: ./src/libs/utils.js /** * 限制数字大小 @@ -42193,7 +42194,7 @@ parts:[{text:prompt}]}]};const input="".concat(url,"/").concat(model,":generateC * @param {*} str * @param {*} sign * @returns - */const matchInputStr=(str,sign)=>{let reg=/\/([\w-]+)\s+([^]+)/;switch(sign){case"//":reg=/\/\/([\w-]+)\s+([^]+)/;break;case"\\":reg=/\\([\w-]+)\s+([^]+)/;break;case"\\\\":reg=/\\\\([\w-]+)\s+([^]+)/;break;case">":reg=/>([\w-]+)\s+([^]+)/;break;case">>":reg=/>>([\w-]+)\s+([^]+)/;break;default:}return str.match(reg);};/** + */const matchInputStr=(str,sign)=>{switch(sign){case"//":return str.match(/\/\/([\w-]+)\s+([^]+)/);case"\\":return str.match(/\\([\w-]+)\s+([^]+)/);case"\\\\":return str.match(/\\\\([\w-]+)\s+([^]+)/);case">":return str.match(/>([\w-]+)\s+([^]+)/);case">>":return str.match(/>>([\w-]+)\s+([^]+)/);default:}return str.match(/\/([\w-]+)\s+([^]+)/);};/** * 判断是否英文单词 * @param {*} str * @returns @@ -42223,8 +42224,8 @@ const connects=((_info=info)===null||_info===void 0?void 0:(_info$script=_info.s * @param {*} opts * @returns */const fetchData=async function(input){let{useCache,usePool,transOpts,apiSetting,...init}=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};const cacheReq=await newCacheReq(input,init);let res;// 查询缓存 -if(useCache){try{const cache=await caches.open(CACHE_NAME);res=await cache.match(cacheReq);}catch(err){log_kissLog(err,"cache match");}}if(!res){var _res;// 发送请求 -if(usePool){res=await fetchPool.push({input,init,transOpts,apiSetting});}else{res=await fetchApi({input,init,transOpts,apiSetting});}if(!((_res=res)!==null&&_res!==void 0&&_res.ok)){var _res$headers$get;const msg={url:input,status:res.status};if((_res$headers$get=res.headers.get("Content-Type"))!==null&&_res$headers$get!==void 0&&_res$headers$get.includes("json")){msg.response=await res.json();}throw new Error(JSON.stringify(msg));}// 插入缓存 +if(useCache){try{const cache=await caches.open(CACHE_NAME);res=await cache.match(cacheReq);}catch(err){log_kissLog(err,"cache match");}}if(!res){// 发送请求 +if(usePool){res=await fetchPool.push({input,init,transOpts,apiSetting});}else{res=await fetchApi({input,init,transOpts,apiSetting});}if(!res){throw new Error("Unknow error");}else if(!res.ok){var _res$headers$get;const msg={url:res.url,status:res.status};if((_res$headers$get=res.headers.get("Content-Type"))!==null&&_res$headers$get!==void 0&&_res$headers$get.includes("json")){msg.response=await res.json();}throw new Error(JSON.stringify(msg));}// 插入缓存 if(useCache){try{const cache=await caches.open(CACHE_NAME);await cache.put(cacheReq,res.clone());}catch(err){log_kissLog(err,"cache put");}}}const contentType=res.headers.get("Content-Type");if(contentType!==null&&contentType!==void 0&&contentType.includes("json")){return await res.json();}else if(contentType!==null&&contentType!==void 0&&contentType.includes("audio")){const blob=await res.blob();return await blobToBase64(blob);}return await res.text();};/** * fetch 兼容性封装 * @param {*} input @@ -42274,9 +42275,9 @@ return await fetchData(input,opts);};/** * @param {*} param0 * @returns */const apiTranslate=async _ref=>{var _OPT_LANGS_SPECIAL$tr,_res$result,_res$result2,_res$choices,_res$candidates,_res$result3;let{translator,text,fromLang,toLang,apiSetting={},useCache=true,usePool=true}=_ref;let trText="";let isSame=false;if(!text){return[trText,true];}const from=(_OPT_LANGS_SPECIAL$tr=OPT_LANGS_SPECIAL[translator].get(fromLang))!==null&&_OPT_LANGS_SPECIAL$tr!==void 0?_OPT_LANGS_SPECIAL$tr:OPT_LANGS_SPECIAL[translator].get("auto");const to=OPT_LANGS_SPECIAL[translator].get(toLang);if(!to){console.log("[trans] target lang: ".concat(toLang," not support"));return[trText,isSame];}// 版本号一/二位升级,旧缓存失效 -const[v1,v2]="1.8.5".split(".");const cacheOpts={translator,text,fromLang,toLang,version:[v1,v2].join(".")};const transOpts={translator,text,from,to};const res=await fetch_fetchPolyfill("".concat(URL_CACHE_TRAN,"?").concat(query_string.stringify(cacheOpts)),{useCache,usePool,transOpts,apiSetting});switch(translator){case OPT_TRANS_GOOGLE:trText=res.sentences.map(item=>item.trans).join(" ");isSame=to===res.src;break;case OPT_TRANS_MICROSOFT:trText=res.map(item=>item.translations.map(item=>item.text).join(" ")).join(" ");isSame=text===trText;break;case OPT_TRANS_DEEPL:trText=res.translations.map(item=>item.text).join(" ");isSame=to===res.translations[0].detected_source_language;break;case OPT_TRANS_DEEPLFREE:trText=(_res$result=res.result)===null||_res$result===void 0?void 0:_res$result.texts.map(item=>item.text).join(" ");isSame=to===((_res$result2=res.result)===null||_res$result2===void 0?void 0:_res$result2.lang);break;case OPT_TRANS_DEEPLX:trText=res.data;isSame=to===res.source_lang;break;case OPT_TRANS_BAIDU:// trText = res.trans_result?.data.map((item) => item.dst).join(" "); +const[v1,v2]="1.8.6".split(".");const cacheOpts={translator,text,fromLang,toLang,version:[v1,v2].join(".")};const transOpts={translator,text,from,to};const res=await fetch_fetchPolyfill("".concat(URL_CACHE_TRAN,"?").concat(query_string.stringify(cacheOpts)),{useCache,usePool,transOpts,apiSetting});switch(translator){case OPT_TRANS_GOOGLE:trText=res.sentences.map(item=>item.trans).join(" ");isSame=to===res.src;break;case OPT_TRANS_MICROSOFT:trText=res.map(item=>item.translations.map(item=>item.text).join(" ")).join(" ");isSame=text===trText;break;case OPT_TRANS_DEEPL:trText=res.translations.map(item=>item.text).join(" ");isSame=to===res.translations[0].detected_source_language;break;case OPT_TRANS_DEEPLFREE:trText=(_res$result=res.result)===null||_res$result===void 0?void 0:_res$result.texts.map(item=>item.text).join(" ");isSame=to===((_res$result2=res.result)===null||_res$result2===void 0?void 0:_res$result2.lang);break;case OPT_TRANS_DEEPLX:trText=res.data;isSame=to===res.source_lang;break;case OPT_TRANS_NIUTRANS:const json=JSON.parse(res);if(json.error_msg){throw new Error(json.error_msg);}trText=json.tgt_text;isSame=to===json.from;break;case OPT_TRANS_BAIDU:// trText = res.trans_result?.data.map((item) => item.dst).join(" "); // isSame = res.trans_result?.to === res.trans_result?.from; -if(res.type===1){trText=Object.keys(JSON.parse(res.result).content[0].mean[0].cont)[0];isSame=to===res.from;}else if(res.type===2){trText=res.data.map(item=>item.dst).join(" ");isSame=to===res.from;}break;case OPT_TRANS_TENCENT:trText=res.auto_translation;isSame=text===trText;break;case OPT_TRANS_OPENAI:trText=res===null||res===void 0?void 0:(_res$choices=res.choices)===null||_res$choices===void 0?void 0:_res$choices.map(item=>item.message.content).join(" ");isSame=text===trText;break;case OPT_TRANS_GEMINI:trText=res===null||res===void 0?void 0:(_res$candidates=res.candidates)===null||_res$candidates===void 0?void 0:_res$candidates.map(item=>{var _item$content;return(_item$content=item.content)===null||_item$content===void 0?void 0:_item$content.parts.map(item=>item.text).join(" ");}).join(" ");isSame=text===trText;break;case OPT_TRANS_CLOUDFLAREAI:trText=res===null||res===void 0?void 0:(_res$result3=res.result)===null||_res$result3===void 0?void 0:_res$result3.translated_text;isSame=text===trText;break;case OPT_TRANS_CUSTOMIZE:trText=res.text;isSame=to===res.from;break;default:}return[trText,isSame,res];}; +if(res.type===1){trText=Object.keys(JSON.parse(res.result).content[0].mean[0].cont)[0];isSame=to===res.from;}else if(res.type===2){trText=res.data.map(item=>item.dst).join(" ");isSame=to===res.from;}break;case OPT_TRANS_TENCENT:trText=res.auto_translation;isSame=text===trText;break;case OPT_TRANS_OPENAI:trText=res===null||res===void 0?void 0:(_res$choices=res.choices)===null||_res$choices===void 0?void 0:_res$choices.map(item=>item.message.content).join(" ");isSame=text===trText;break;case OPT_TRANS_GEMINI:trText=res===null||res===void 0?void 0:(_res$candidates=res.candidates)===null||_res$candidates===void 0?void 0:_res$candidates.map(item=>{var _item$content;return(_item$content=item.content)===null||_item$content===void 0?void 0:_item$content.parts.map(item=>item.text).join(" ");}).join(" ");isSame=text===trText;break;case OPT_TRANS_CLOUDFLAREAI:trText=res===null||res===void 0?void 0:(_res$result3=res.result)===null||_res$result3===void 0?void 0:_res$result3.translated_text;isSame=text===trText;break;case OPT_TRANS_CUSTOMIZE:case OPT_TRANS_CUSTOMIZE_2:case OPT_TRANS_CUSTOMIZE_3:case OPT_TRANS_CUSTOMIZE_4:case OPT_TRANS_CUSTOMIZE_5:trText=res.text;isSame=to===res.from;break;default:}return[trText,isSame,res];}; ;// CONCATENATED MODULE: ./node_modules/.pnpm/webdav@5.3.0/node_modules/webdav/dist/web/index.js /*! For license information please see index.js.LICENSE.txt */ var t = { @@ -45089,7 +45090,7 @@ var web_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":"1.8.5","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE2":"https://kiss-translator.rayjar.com/options","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_LOGOURL2":"https://kiss-translator.rayjar.com/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off.json","REACT_APP_VERSIONFILE":"https://fishjar.github.io/kiss-translator/version.txt","REACT_APP_VERSIONFILE2":"https://kiss-translator.rayjar.com/version.txt","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_DOWNLOADURL2":"https://kiss-translator.rayjar.com/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL2":"https://kiss-translator.rayjar.com/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":"1.8.5","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE2":"https://kiss-translator.rayjar.com/options","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_LOGOURL2":"https://kiss-translator.rayjar.com/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off.json","REACT_APP_VERSIONFILE":"https://fishjar.github.io/kiss-translator/version.txt","REACT_APP_VERSIONFILE2":"https://kiss-translator.rayjar.com/version.txt","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_DOWNLOADURL2":"https://kiss-translator.rayjar.com/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL2":"https://kiss-translator.rayjar.com/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":"1.8.5","REACT_APP_HOMEPAGE":"https://github.com/fishjar/kiss-translator","REACT_APP_OPTIONSPAGE":"https://fishjar.github.io/kiss-translator/options.html","REACT_APP_OPTIONSPAGE2":"https://kiss-translator.rayjar.com/options","REACT_APP_OPTIONSPAGE_DEV":"http://localhost:3000/options.html","REACT_APP_LOGOURL":"https://fishjar.github.io/kiss-translator/images/logo192.png","REACT_APP_LOGOURL2":"https://kiss-translator.rayjar.com/images/logo192.png","REACT_APP_RULESURL":"https://fishjar.github.io/kiss-rules/kiss-rules.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off.json","REACT_APP_VERSIONFILE":"https://fishjar.github.io/kiss-translator/version.txt","REACT_APP_VERSIONFILE2":"https://kiss-translator.rayjar.com/version.txt","REACT_APP_USERSCRIPT_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator.user.js","REACT_APP_USERSCRIPT_DOWNLOADURL2":"https://kiss-translator.rayjar.com/kiss-translator.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL":"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js","REACT_APP_USERSCRIPT_IOS_DOWNLOADURL2":"https://kiss-translator.rayjar.com/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":"1.8.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.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off.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":"1.8.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.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off.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":"1.8.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.json","REACT_APP_RULESURL_ON":"https://fishjar.github.io/kiss-rules/kiss-rules-on.json","REACT_APP_RULESURL_OFF":"https://fishjar.github.io/kiss-rules/kiss-rules-off.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; @@ -61137,7 +61138,7 @@ var DarkMode = __webpack_require__(6560); ;// CONCATENATED MODULE: ./src/views/Options/DarkModeButton.js function DarkModeButton(){const{darkMode,toggleDarkMode}=useDarkMode();return/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{onClick:toggleDarkMode,color:"inherit",children:darkMode?/*#__PURE__*/(0,jsx_runtime.jsx)(LightMode/* default */.Z,{}):/*#__PURE__*/(0,jsx_runtime.jsx)(DarkMode/* 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("1.8.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("1.8.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},children:/*#__PURE__*/(0,jsx_runtime.jsx)(Outlet,{})})]})]});} ;// CONCATENATED MODULE: ./src/views/Options/SyncSetting.js @@ -61510,18 +61511,18 @@ Divider.muiSkipListHighlight = true; 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:"1.8.5",eventName:ping};};/** + */const injectScript=ping=>{window.APP_INFO={name:"KISS Translator",version:"1.8.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接口的请求 * @param {*} param0 */const handlePing=async e=>{const{action,args,pong}=e.detail;let res;try{switch(action){case MSG_GM_xmlHttpRequest:const{input,init}=args;res=await fetchGM(input,init);break;case MSG_GM_setValue:const{key,val}=args;await GM.setValue(key,val);res=val;break;case MSG_GM_getValue:res=await GM.getValue(args.key);break;case MSG_GM_deleteValue:await GM.deleteValue(args.key);res="ok";break;case MSG_GM_info:res=GM.info;break;default:throw new Error("message action is unavailable: ".concat(action));}window.dispatchEvent(new CustomEvent(pong,{detail:{data:res}}));}catch(err){window.dispatchEvent(new CustomEvent(pong,{detail:{error:err.message}}));}}; ;// CONCATENATED MODULE: ./src/hooks/Api.js -function useApi(translator){const{setting,updateSetting}=useSetting();const transApis=(setting===null||setting===void 0?void 0:setting.transApis)||DEFAULT_TRANS_APIS;const updateApi=(0,react.useCallback)(async obj=>{const api=transApis[translator]||{};Object.assign(transApis,{[translator]:{...api,...obj}});await updateSetting({transApis});},[translator,transApis,updateSetting]);const resetApi=(0,react.useCallback)(async()=>{Object.assign(transApis,{[translator]:DEFAULT_TRANS_APIS[translator]});await updateSetting({transApis});},[translator,transApis,updateSetting]);return{api:transApis[translator]||{},updateApi,resetApi};} +function useApi(translator){const{setting,updateSetting}=useSetting();const transApis=(setting===null||setting===void 0?void 0:setting.transApis)||DEFAULT_TRANS_APIS;const updateApi=(0,react.useCallback)(async obj=>{const api={...DEFAULT_TRANS_APIS[translator],...(transApis[translator]||{})};Object.assign(transApis,{[translator]:{...api,...obj}});await updateSetting({transApis});},[translator,transApis,updateSetting]);const resetApi=(0,react.useCallback)(async()=>{Object.assign(transApis,{[translator]:DEFAULT_TRANS_APIS[translator]});await updateSetting({transApis});},[translator,transApis,updateSetting]);return{api:{...DEFAULT_TRANS_APIS[translator],...(transApis[translator]||{})},updateApi,resetApi};} ;// CONCATENATED MODULE: ./src/views/Options/Apis.js function TestButton(_ref){let{translator,api}=_ref;const i18n=useI18n();const alert=useAlert();const[loading,setLoading]=(0,react.useState)(false);const handleApiTest=async()=>{try{setLoading(true);const[text]=await apiTranslate({translator,text:"hello world",fromLang:"en",toLang:"zh-CN",apiSetting:api,useCache:false});if(!text){throw new Error("empty reault");}alert.success(i18n("test_success"));}catch(err){// alert.error(`${i18n("test_failed")}: ${err.message}`); let msg=err.message;try{msg=JSON.stringify(JSON.parse(err.message),null,2);}catch(err){// skip -}alert.error(/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)("div",{children:i18n("test_failed")}),/*#__PURE__*/(0,jsx_runtime.jsx)("pre",{style:{maxWidth:400,overflow:"auto"},children:msg})]}));}finally{setLoading(false);}};if(loading){return/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{size:16});}return/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"contained",onClick:handleApiTest,children:i18n("click_test")});}function ApiFields(_ref2){let{translator}=_ref2;const i18n=useI18n();const{api,updateApi,resetApi}=useApi(translator);const{url="",key="",model="",prompt="",fetchLimit=DEFAULT_FETCH_LIMIT,fetchInterval=DEFAULT_FETCH_INTERVAL}=api;const handleChange=e=>{let{name,value}=e.target;switch(name){case"fetchLimit":value=limitNumber(value,1,100);break;case"fetchInterval":value=limitNumber(value,0,5000);break;default:}updateApi({[name]:value});};const buildinTranslators=[OPT_TRANS_MICROSOFT,OPT_TRANS_DEEPLFREE,OPT_TRANS_BAIDU,OPT_TRANS_TENCENT];const mulkeysTranslators=[OPT_TRANS_DEEPL,OPT_TRANS_OPENAI,OPT_TRANS_GEMINI,OPT_TRANS_CLOUDFLAREAI];return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[!buildinTranslators.includes(translator)&&/*#__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}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"KEY",name:"key",value:key,onChange:handleChange,multiline:mulkeysTranslators.includes(translator),helperText:mulkeysTranslators.includes(translator)?i18n("mulkeys_help"):""})]}),(translator===OPT_TRANS_OPENAI||translator===OPT_TRANS_GEMINI)&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"MODEL",name:"model",value:model,onChange:handleChange}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"PROMPT",name:"prompt",value:prompt,onChange:handleChange,multiline:true})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("fetch_limit"),type:"number",name:"fetchLimit",value:fetchLimit,onChange:handleChange}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("fetch_interval"),type:"number",name:"fetchInterval",value:fetchInterval,onChange:handleChange}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TestButton,{translator:translator,api:api}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"outlined",onClick:()=>{resetApi();},children:i18n("restore_default")})]}),translator.startsWith(OPT_TRANS_CUSTOMIZE)&&/*#__PURE__*/(0,jsx_runtime.jsx)("pre",{children:i18n("custom_api_help")})]});}function ApiAccordion(_ref3){let{translator}=_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,{children:translator})}),/*#__PURE__*/(0,jsx_runtime.jsx)(AccordionDetails_AccordionDetails,{children:expanded&&/*#__PURE__*/(0,jsx_runtime.jsx)(ApiFields,{translator:translator})})]});}function Apis(){const i18n=useI18n();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:/*#__PURE__*/(0,jsx_runtime.jsx)(material_Link_Link,{href:URL_KISS_PROXY,target:"_blank",children:i18n("about_api_proxy")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:OPT_TRANS_ALL.map(translator=>/*#__PURE__*/(0,jsx_runtime.jsx)(ApiAccordion,{translator:translator},translator))})]})});} +}alert.error(/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)("div",{children:i18n("test_failed")}),msg===err.message?/*#__PURE__*/(0,jsx_runtime.jsx)("div",{style:{maxWidth:400},children:msg}):/*#__PURE__*/(0,jsx_runtime.jsx)("pre",{style:{maxWidth:400,overflow:"auto"},children:msg})]}));}finally{setLoading(false);}};if(loading){return/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{size:16});}return/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"contained",onClick:handleApiTest,children:i18n("click_test")});}function ApiFields(_ref2){let{translator}=_ref2;const i18n=useI18n();const{api,updateApi,resetApi}=useApi(translator);const{url="",key="",model="",prompt="",fetchLimit=DEFAULT_FETCH_LIMIT,fetchInterval=DEFAULT_FETCH_INTERVAL,dictNo="",memoryNo=""}=api;const handleChange=e=>{let{name,value}=e.target;switch(name){case"fetchLimit":value=limitNumber(value,1,100);break;case"fetchInterval":value=limitNumber(value,0,5000);break;default:}updateApi({[name]:value});};const buildinTranslators=[OPT_TRANS_MICROSOFT,OPT_TRANS_DEEPLFREE,OPT_TRANS_BAIDU,OPT_TRANS_TENCENT];const mulkeysTranslators=[OPT_TRANS_DEEPL,OPT_TRANS_OPENAI,OPT_TRANS_GEMINI,OPT_TRANS_CLOUDFLAREAI,OPT_TRANS_NIUTRANS];const keyHelper=translator===OPT_TRANS_NIUTRANS?/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[i18n("mulkeys_help"),/*#__PURE__*/(0,jsx_runtime.jsx)(material_Link_Link,{href:URL_NIUTRANS_REG,target:"_blank",children:i18n("reg_niutrans")})]}):mulkeysTranslators.includes(translator)?i18n("mulkeys_help"):"";return/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{spacing:3,children:[!buildinTranslators.includes(translator)&&/*#__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}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"KEY",name:"key",value:key,onChange:handleChange,multiline:mulkeysTranslators.includes(translator),helperText:keyHelper})]}),(translator===OPT_TRANS_OPENAI||translator===OPT_TRANS_GEMINI)&&/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"MODEL",name:"model",value:model,onChange:handleChange}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:"PROMPT",name:"prompt",value:prompt,onChange:handleChange,multiline:true})]}),translator===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})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("fetch_limit"),type:"number",name:"fetchLimit",value:fetchLimit,onChange:handleChange}),/*#__PURE__*/(0,jsx_runtime.jsx)(TextField_TextField,{size:"small",label:i18n("fetch_interval"),type:"number",name:"fetchInterval",value:fetchInterval,onChange:handleChange}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Stack_Stack,{direction:"row",spacing:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(TestButton,{translator:translator,api:api}),/*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button,{size:"small",variant:"outlined",onClick:()=>{resetApi();},children:i18n("restore_default")})]}),translator.startsWith(OPT_TRANS_CUSTOMIZE)&&/*#__PURE__*/(0,jsx_runtime.jsx)("pre",{children:i18n("custom_api_help")})]});}function ApiAccordion(_ref3){let{translator}=_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,{children:translator})}),/*#__PURE__*/(0,jsx_runtime.jsx)(AccordionDetails_AccordionDetails,{children:expanded&&/*#__PURE__*/(0,jsx_runtime.jsx)(ApiFields,{translator:translator})})]});}function Apis(){const i18n=useI18n();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:/*#__PURE__*/(0,jsx_runtime.jsx)(material_Link_Link,{href:URL_KISS_PROXY,target:"_blank",children:i18n("about_api_proxy")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{children:OPT_TRANS_ALL.map(translator=>/*#__PURE__*/(0,jsx_runtime.jsx)(ApiAccordion,{translator:translator},translator))})]})});} ;// CONCATENATED MODULE: ./src/hooks/InputRule.js function useInputRule(){const{setting,updateSetting}=useSetting();const inputRule=(setting===null||setting===void 0?void 0:setting.inputRule)||DEFAULT_INPUT_RULE;const updateInputRule=(0,react.useCallback)(async obj=>{Object.assign(inputRule,obj);await updateSetting({inputRule});},[inputRule,updateSetting]);return{inputRule,updateInputRule};} ;// CONCATENATED MODULE: ./src/views/Options/InputSetting.js @@ -61561,9 +61562,9 @@ function DictField(_ref){let{word}=_ref;const[dictResult,setDictResult]=(0,react ;// 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!=="1.8.5"){setError("The version of the local script(v".concat(version,") is not the latest version(v").concat("1.8.5","). \u672C\u5730\u811A\u672C\u4E4B\u7248\u672C(v").concat(version,")\u975E\u6700\u65B0\u7248(v").concat("1.8.5",")\u3002"));return;}if(eventName){// 注入GM接口 +if(version!=="1.8.6"){setError("The version of the local script(v".concat(version,") is not the latest version(v").concat("1.8.6","). \u672C\u5730\u811A\u672C\u4E4B\u7248\u672C(v").concat(version,")\u975E\u6700\u65B0\u7248(v").concat("1.8.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("1.8.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.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("1.8.5")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{})]});}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)(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:"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:"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("1.8.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.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("1.8.6")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{})]});}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)(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:"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:"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 ff2fd4f..9eadd6b 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.8.5 \ No newline at end of file +1.8.6 \ No newline at end of file