@zero-library/common 3.1.7 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,10 +1,6 @@
1
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import { MessageOutlined, BookOutlined, EditOutlined, DeleteOutlined, CloseOutlined, MinusCircleOutlined, PlusCircleOutlined, RedoOutlined, FileUnknownOutlined, FileZipOutlined, FileMarkdownOutlined, FileGifOutlined, FileImageOutlined, FileJpgOutlined, NotificationOutlined, VideoCameraOutlined, FilePptOutlined, FileExcelOutlined, FileWordOutlined, FilePdfOutlined, FileTextOutlined, ColumnWidthOutlined, LeftOutlined, RightOutlined, MinusOutlined, PlusOutlined } from '@ant-design/icons';
3
- import { Typography, Spin, Input, Tooltip as Tooltip$1, Button, Flex, Form, Card, List, Space, Popconfirm, Empty, Modal, message, Alert, Skeleton, Result, Splitter, Image as Image$1, Drawer, Avatar, notification } from 'antd';
4
- import classNames2 from 'classnames';
5
- import { renderAsync } from 'docx-preview';
6
- import * as React3 from 'react';
7
- import React3__default, { useRef, useState, useEffect, forwardRef, useMemo, useCallback, createContext, isValidElement, version, cloneElement, memo, useImperativeHandle, useContext, Fragment as Fragment$1, lazy, Suspense } from 'react';
1
+ import { createInstance } from 'i18next';
2
+ import { initReactI18next, useTranslation as useTranslation$1 } from 'react-i18next';
3
+ import { Typography, Spin, Input, Tooltip as Tooltip$1, Button, Flex, Form, Card, List, Space, Popconfirm, Empty, Modal, message, ConfigProvider, Alert, Skeleton, Result, Splitter, Image as Image$1, Drawer, Avatar, notification } from 'antd';
8
4
  import copyToClipboard from 'copy-to-clipboard';
9
5
  import AES from 'crypto-js/aes';
10
6
  import encUtf8 from 'crypto-js/enc-utf8';
@@ -20,6 +16,18 @@ import Decimal from 'decimal.js';
20
16
  import dayjs from 'dayjs';
21
17
  import relativeTime from 'dayjs/plugin/relativeTime';
22
18
  import axios from 'axios';
19
+ import enUS from 'antd/locale/en_US';
20
+ import jaJP from 'antd/locale/ja_JP';
21
+ import zhCN from 'antd/locale/zh_CN';
22
+ import 'dayjs/locale/en';
23
+ import 'dayjs/locale/ja';
24
+ import 'dayjs/locale/zh-cn';
25
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
26
+ import { MessageOutlined, BookOutlined, EditOutlined, DeleteOutlined, CloseOutlined, MinusCircleOutlined, PlusCircleOutlined, RedoOutlined, FileUnknownOutlined, FileZipOutlined, FileMarkdownOutlined, FileGifOutlined, FileImageOutlined, FileJpgOutlined, NotificationOutlined, VideoCameraOutlined, FilePptOutlined, FileExcelOutlined, FileWordOutlined, FilePdfOutlined, FileTextOutlined, ColumnWidthOutlined, LeftOutlined, RightOutlined, MinusOutlined, PlusOutlined } from '@ant-design/icons';
27
+ import classNames2 from 'classnames';
28
+ import { renderAsync } from 'docx-preview';
29
+ import * as React3 from 'react';
30
+ import React3__default, { useRef, useState, useEffect, forwardRef, useMemo, useCallback, createContext, isValidElement, version, cloneElement, memo, useImperativeHandle, useContext, Fragment as Fragment$1, lazy, Suspense } from 'react';
23
31
  import markdownItKatex from '@traptitech/markdown-it-katex';
24
32
  import parse from 'html-react-parser';
25
33
  import 'katex/dist/katex.min.css';
@@ -64,44 +72,7 @@ import { useHotkeys } from 'react-hotkeys-hook';
64
72
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
65
73
  import throttle from 'lodash.throttle';
66
74
 
67
- // src/components/File/styles.module.less
68
- var styles_module_default = {
69
- nsPreviewImage: "styles_module_nsPreviewImage",
70
- nsPreviewPdf: "styles_module_nsPreviewPdf",
71
- pdfToolbar: "styles_module_pdfToolbar",
72
- nsPreviewPdfImage: "styles_module_nsPreviewPdfImage",
73
- pdfImageNav: "styles_module_pdfImageNav",
74
- pdfImageNavItem: "styles_module_pdfImageNavItem",
75
- pdfImageNavItemImgWrapper: "styles_module_pdfImageNavItemImgWrapper",
76
- pdfImageNavItemActive: "styles_module_pdfImageNavItemActive",
77
- pdfImageNavItemImg: "styles_module_pdfImageNavItemImg",
78
- pdfImageNavItemTip: "styles_module_pdfImageNavItemTip",
79
- pdfImageBody: "styles_module_pdfImageBody",
80
- pdfImageBodyToolbar: "styles_module_pdfImageBodyToolbar",
81
- pdfImageBodyItem: "styles_module_pdfImageBodyItem",
82
- pdfImageBodyItemInnerWrapper: "styles_module_pdfImageBodyItemInnerWrapper",
83
- pdfImageBodyItemInner: "styles_module_pdfImageBodyItemInner",
84
- pdfImageBodyItemActive: "styles_module_pdfImageBodyItemActive",
85
- pdfImageBodyItemImg: "styles_module_pdfImageBodyItemImg",
86
- nsPreviewVideo: "styles_module_nsPreviewVideo",
87
- nsPreviewAudio: "styles_module_nsPreviewAudio",
88
- nsPreviewDocx: "styles_module_nsPreviewDocx",
89
- docxToolbar: "styles_module_docxToolbar",
90
- docxContent: "styles_module_docxContent",
91
- stateBody: "styles_module_stateBody",
92
- pdfContainer: "styles_module_pdfContainer",
93
- floatingToolbar: "styles_module_floatingToolbar",
94
- divider: "styles_module_divider",
95
- pdfBody: "styles_module_pdfBody",
96
- pdfDocument: "styles_module_pdfDocument",
97
- pdfPage: "styles_module_pdfPage"
98
- };
99
- var AudioPlayer_default = ({ fileUrl }) => {
100
- return /* @__PURE__ */ jsxs("audio", { controls: true, className: styles_module_default.nsPreviewAudio, children: [
101
- /* @__PURE__ */ jsx("source", { src: fileUrl, type: "audio/mpeg" }),
102
- "\u60A8\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 audio \u6807\u7B7E\u3002"
103
- ] }, fileUrl);
104
- };
75
+ // src/i18n/index.ts
105
76
 
106
77
  // src/utils/is.ts
107
78
  var toString = Object.prototype.toString;
@@ -436,7 +407,7 @@ var arrToObj = (arr = [], key) => {
436
407
  });
437
408
  return obj;
438
409
  };
439
- var setInterval2 = (fn, t) => {
410
+ var setInterval2 = (fn, t2) => {
440
411
  let timer = null;
441
412
  let running = true;
442
413
  const loop = () => {
@@ -444,7 +415,7 @@ var setInterval2 = (fn, t) => {
444
415
  if (!running) return;
445
416
  await fn();
446
417
  if (running) loop();
447
- }, t);
418
+ }, t2);
448
419
  };
449
420
  loop();
450
421
  return {
@@ -468,9 +439,9 @@ var genNonDuplicateID = () => {
468
439
  return v.toString(16);
469
440
  });
470
441
  };
471
- var copyText = async (text, prompt = "\u590D\u5236\u6210\u529F") => {
442
+ var copyText = async (text, prompt) => {
472
443
  await copyToClipboard(text);
473
- if (prompt) message.success(prompt);
444
+ if (prompt !== "") message.success(prompt || t("common.copySuccess"));
474
445
  };
475
446
  function formatNumberWithCommas(number) {
476
447
  const numericValue = parseFloat(number);
@@ -557,7 +528,7 @@ var buildUrlParams = (obj, url, format = "repeat") => {
557
528
  };
558
529
  var downloadFile = (url, name) => {
559
530
  const a = document.createElement("a");
560
- a.download = name || "\u6587\u4EF6";
531
+ a.download = name || t("common.defaultFileName");
561
532
  a.href = url;
562
533
  document.body.appendChild(a);
563
534
  a.click();
@@ -914,7 +885,7 @@ var isExpire = (date) => {
914
885
  };
915
886
  var createCachedMessage = () => {
916
887
  const messageCache = {};
917
- return ({ title = "\u63D0\u793A", content, type = "warning", duration = 3, onClose, isCache = true, isOnly = false }) => {
888
+ return ({ title = t("common.defaultTitle"), content, type = "warning", duration = 3, onClose, isCache = true, isOnly = false }) => {
918
889
  if (!content) return;
919
890
  const cacheKey = isOnly ? "unique-message-key" : content;
920
891
  const handleClose = () => {
@@ -958,50 +929,72 @@ var cachedMessage = createCachedMessage();
958
929
  // src/utils/pattern.ts
959
930
  var RegMobile = {
960
931
  pattern: /^1[3-9]\d{9}$/,
961
- message: "\u624B\u673A\u53F7\u683C\u5F0F\u4E0D\u6B63\u786E\uFF01"
932
+ get message() {
933
+ return t("pattern.mobileInvalid");
934
+ }
962
935
  };
963
936
  var RegFixedTelePhone = {
964
937
  pattern: /^0\d{2,3}-\d{7,8}$/,
965
- message: "\u7535\u8BDD\u53F7\u7801\u683C\u5F0F\u4E0D\u6B63\u786E\uFF01"
938
+ get message() {
939
+ return t("pattern.phoneInvalid");
940
+ }
966
941
  };
967
942
  var RegTelePhone = {
968
943
  pattern: /^[\\+\-\\(\\)\\(\\)\d]{1,20}$/,
969
- message: "\u7535\u8BDD\u53F7\u7801\u683C\u5F0F\u4E0D\u6B63\u786E\uFF01"
944
+ get message() {
945
+ return t("pattern.phoneInvalid");
946
+ }
970
947
  };
971
948
  var RegTaxNo = {
972
949
  pattern: /^[A-Z0-9]{15}$|^[A-Z0-9]{18}$|^[A-Z0-9]{20}$/,
973
- message: "\u7A0E\u53F7\u683C\u5F0F\u6709\u8BEF\uFF01"
950
+ get message() {
951
+ return t("pattern.taxNoInvalid");
952
+ }
974
953
  };
975
954
  var RegBankCardNo = {
976
955
  pattern: /^[0-9]*$/,
977
- message: "\u94F6\u884C\u5361\u53F7\u683C\u5F0F\u6709\u8BEF\uFF01"
956
+ get message() {
957
+ return t("pattern.bankCardInvalid");
958
+ }
978
959
  };
979
960
  var RegIdentityCardNo = {
980
961
  pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
981
- message: "\u8EAB\u4EFD\u8BC1\u53F7\u683C\u5F0F\u6709\u8BEF\uFF01"
962
+ get message() {
963
+ return t("pattern.idCardInvalid");
964
+ }
982
965
  };
983
966
  var RegNumNo = {
984
967
  pattern: /^[0-9]*$/,
985
- message: "\u683C\u5F0F\u6709\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165\uFF01"
968
+ get message() {
969
+ return t("pattern.numberInvalid");
970
+ }
986
971
  };
987
972
  var RegSmsCode = {
988
973
  pattern: /^[0-9]{6}$/,
989
- message: "\u9A8C\u8BC1\u7801\u4E3A6\u4F4D\u6570\u5B57"
974
+ get message() {
975
+ return t("pattern.smsCodeInvalid");
976
+ }
990
977
  };
991
978
  var RegEmail = {
992
979
  pattern: /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,
993
- message: "\u90AE\u7BB1\u683C\u5F0F\u6709\u8BEF\uFF01"
980
+ get message() {
981
+ return t("pattern.emailInvalid");
982
+ }
994
983
  };
995
984
  var RegDetailAddress = {
996
985
  pattern: /.*(街|路|村|乡|镇|道|巷|号).*/,
997
- message: "\u5FC5\u987B\u5305\u542B\u201C\u8857\u3001\u8DEF\u3001\u6751\u3001\u4E61\u3001\u9547\u3001\u9053\u3001\u5DF7\u3001\u53F7\u201D\u7B49\u5173\u952E\u8BCD\u4E4B\u4E00"
986
+ get message() {
987
+ return t("pattern.addressInvalid");
988
+ }
998
989
  };
999
990
  var RegPassword = {
1000
991
  pattern: /^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,26}$/,
1001
- message: "\u5BC6\u7801\u4E3A8\u523026\u4F4D\u4E4B\u95F4\u6570\u5B57\u4E0E\u5B57\u6BCD\u7EC4\u5408"
992
+ get message() {
993
+ return t("pattern.passwordInvalid");
994
+ }
1002
995
  };
1003
- var PhoneOrMobileValidator = (errMessage = "\u8054\u7CFB\u7535\u8BDD\u683C\u5F0F\u4E0D\u6B63\u786E") => ({
1004
- validator: (_, value) => !value || RegFixedTelePhone.pattern.test(value) || RegMobile.pattern.test(value) ? Promise.resolve() : Promise.reject(new Error(errMessage))
996
+ var PhoneOrMobileValidator = (errMessage) => ({
997
+ validator: (_, value) => !value || RegFixedTelePhone.pattern.test(value) || RegMobile.pattern.test(value) ? Promise.resolve() : Promise.reject(new Error(errMessage || t("pattern.phoneOrMobileInvalid")))
1005
998
  });
1006
999
  var ThanNumValidator = ({
1007
1000
  min,
@@ -1018,12 +1011,12 @@ var ThanNumValidator = ({
1018
1011
  }
1019
1012
  if (isNumberNoNaN(parseFloat(min))) {
1020
1013
  if (!(Number(value) > Number(min) || equalMin && Number(value) === Number(min))) {
1021
- return Promise.reject(new Error(minErrMessage || errMessage || `\u4E0D\u80FD\u5C0F\u4E8E${equalMin ? "" : "\u7B49\u4E8E"}${min}`));
1014
+ return Promise.reject(new Error(minErrMessage || errMessage || t(equalMin ? "lessThanOrEqual" : "lessThan", { value: min })));
1022
1015
  }
1023
1016
  }
1024
1017
  if (isNumberNoNaN(parseFloat(max))) {
1025
1018
  if (!(Number(value) < Number(max) || equalMax && Number(value) === Number(max))) {
1026
- return Promise.reject(new Error(maxErrMessage || errMessage || `\u4E0D\u80FD\u5927\u4E8E${equalMax ? "" : "\u7B49\u4E8E"}${max}`));
1019
+ return Promise.reject(new Error(maxErrMessage || errMessage || t(equalMax ? "greaterThanOrEqual" : "greaterThan", { value: max })));
1027
1020
  }
1028
1021
  }
1029
1022
  return Promise.resolve();
@@ -1043,17 +1036,17 @@ var ThanNumLengthValidator = ({
1043
1036
  }
1044
1037
  if (isNumber(length)) {
1045
1038
  if (precision(value) > length) {
1046
- return Promise.reject(new Error(lengthErrMessage || `\u603B\u4F4D\u6570\u4E0D\u80FD\u8D85\u8FC7${length}\u4F4D`));
1039
+ return Promise.reject(new Error(lengthErrMessage || t("pattern.totalLengthExceed", { length })));
1047
1040
  }
1048
1041
  }
1049
1042
  if (isNumber(integerLength)) {
1050
1043
  if (precision(value) - decimalPlaces(value) > integerLength) {
1051
- return Promise.reject(new Error(integerLengthErrMessage || `\u6574\u6570\u4F4D\u4E0D\u80FD\u8D85\u8FC7${integerLength}\u4F4D`));
1044
+ return Promise.reject(new Error(integerLengthErrMessage || t("pattern.integerLengthExceed", { length: integerLength })));
1052
1045
  }
1053
1046
  }
1054
1047
  if (isNumber(decimalsLength)) {
1055
1048
  if (decimalPlaces(value) > decimalsLength) {
1056
- return Promise.reject(new Error(decimalsLengthErrMessage || `\u5C0F\u6570\u4F4D\u4E0D\u80FD\u8D85\u8FC7${decimalsLength}\u4F4D`));
1049
+ return Promise.reject(new Error(decimalsLengthErrMessage || t("pattern.decimalLengthExceed", { length: decimalsLength })));
1057
1050
  }
1058
1051
  }
1059
1052
  return Promise.resolve();
@@ -1063,7 +1056,7 @@ var MultiEmailValidator = (max) => ({
1063
1056
  validator: (_, value) => {
1064
1057
  if (value) {
1065
1058
  const emailArr = value.split(",").map((v) => v.trim()).filter((v) => v);
1066
- if (emailArr.length > max) return Promise.reject(new Error(`\u6700\u591A\u8F93\u5165${max}\u4E2A\u90AE\u7BB1`));
1059
+ if (emailArr.length > max) return Promise.reject(new Error(t("pattern.maxEmailsExceed", { max })));
1067
1060
  const noEmailArr = emailArr.filter((email) => !RegEmail.pattern.test(email));
1068
1061
  if (noEmailArr.length) return Promise.reject(new Error(RegEmail.message));
1069
1062
  }
@@ -1131,14 +1124,14 @@ function createRequest(config) {
1131
1124
  return Promise.reject(err);
1132
1125
  }
1133
1126
  if (!err.response) {
1134
- if (showError(err?.config?.showError)) cachedMessage({ content: "\u7F51\u7EDC\u5F02\u5E38\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC", type: "error" });
1127
+ if (showError(err?.config?.showError)) cachedMessage({ content: t("request.networkError"), type: "error" });
1135
1128
  } else {
1136
1129
  switch (err.response?.status) {
1137
1130
  case HttpStatus.UNAUTHORIZED:
1138
1131
  if (showError(err?.config?.showError)) cachedMessage({ content: err.response?.data.message, type: "error" });
1139
1132
  break;
1140
1133
  default:
1141
- if (showError(err?.config?.showError)) cachedMessage({ content: err.response?.data.message || "\u8BF7\u6C42\u9519\u8BEF\uFF01", type: "error" });
1134
+ if (showError(err?.config?.showError)) cachedMessage({ content: err.response?.data.message || t("request.requestError"), type: "error" });
1142
1135
  }
1143
1136
  }
1144
1137
  return Promise.reject(err);
@@ -1253,7 +1246,692 @@ function createTokenManager({ key, storage = localStorage }) {
1253
1246
  clear: tokenManager.clear
1254
1247
  };
1255
1248
  }
1249
+
1250
+ // src/i18n/constants.ts
1251
+ var NS_COMMON = "common";
1252
+
1253
+ // src/i18n/zh-CN.ts
1254
+ var commonZhCN = {
1255
+ // 通用文案
1256
+ common: {
1257
+ copySuccess: "\u590D\u5236\u6210\u529F",
1258
+ confirm: "\u786E\u5B9A",
1259
+ cancel: "\u53D6\u6D88",
1260
+ download: "\u4E0B\u8F7D",
1261
+ save: "\u4FDD\u5B58",
1262
+ defaultFileName: "\u6587\u4EF6",
1263
+ defaultTitle: "\u63D0\u793A",
1264
+ loading: "\u52A0\u8F7D\u4E2D...",
1265
+ // 以下为多模块共用词条(重复3次以上提取至此)
1266
+ enter: "\u8FDB\u5165\u5E94\u7528",
1267
+ applicationCenter: "\u5E94\u7528\u4E2D\u5FC3",
1268
+ subscribeSuccess: "\u8BA2\u9605\u6210\u529F",
1269
+ subscribeConfirm: "\u662F\u5426\u8BA2\u9605{{name}}\uFF1F",
1270
+ installConfirm: "\u662F\u5426{{action}}{{name}}\uFF1F",
1271
+ prompt: "\u63D0\u793A",
1272
+ dynamicNews: "\u52A8\u6001\u6D88\u606F",
1273
+ noDynamicNews: "\u6682\u65E0\u52A8\u6001\u6D88\u606F"
1274
+ },
1275
+ // utils/request.ts
1276
+ request: {
1277
+ networkError: "\u7F51\u7EDC\u5F02\u5E38\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC",
1278
+ requestError: "\u8BF7\u6C42\u9519\u8BEF\uFF01"
1279
+ },
1280
+ // utils/pattern.ts — 验证消息
1281
+ pattern: {
1282
+ mobileInvalid: "\u624B\u673A\u53F7\u683C\u5F0F\u4E0D\u6B63\u786E\uFF01",
1283
+ phoneInvalid: "\u7535\u8BDD\u53F7\u7801\u683C\u5F0F\u4E0D\u6B63\u786E\uFF01",
1284
+ taxNoInvalid: "\u7A0E\u53F7\u683C\u5F0F\u6709\u8BEF\uFF01",
1285
+ bankCardInvalid: "\u94F6\u884C\u5361\u53F7\u683C\u5F0F\u6709\u8BEF\uFF01",
1286
+ idCardInvalid: "\u8EAB\u4EFD\u8BC1\u53F7\u683C\u5F0F\u6709\u8BEF\uFF01",
1287
+ numberInvalid: "\u683C\u5F0F\u6709\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165\uFF01",
1288
+ smsCodeInvalid: "\u9A8C\u8BC1\u7801\u4E3A6\u4F4D\u6570\u5B57",
1289
+ emailInvalid: "\u90AE\u7BB1\u683C\u5F0F\u6709\u8BEF\uFF01",
1290
+ addressInvalid: '\u5FC5\u987B\u5305\u542B"\u8857\u3001\u8DEF\u3001\u6751\u3001\u4E61\u3001\u9547\u3001\u9053\u3001\u5DF7\u3001\u53F7"\u7B49\u5173\u952E\u8BCD\u4E4B\u4E00',
1291
+ passwordInvalid: "\u5BC6\u7801\u4E3A8\u523026\u4F4D\u4E4B\u95F4\u6570\u5B57\u4E0E\u5B57\u6BCD\u7EC4\u5408",
1292
+ phoneOrMobileInvalid: "\u8054\u7CFB\u7535\u8BDD\u683C\u5F0F\u4E0D\u6B63\u786E",
1293
+ // 插值示例:{{value}} 会被替换为实际值
1294
+ lessThan: "\u4E0D\u80FD\u5C0F\u4E8E{{value}}",
1295
+ lessThanOrEqual: "\u4E0D\u80FD\u5C0F\u4E8E\u7B49\u4E8E{{value}}",
1296
+ greaterThan: "\u4E0D\u80FD\u5927\u4E8E{{value}}",
1297
+ greaterThanOrEqual: "\u4E0D\u80FD\u5927\u4E8E\u7B49\u4E8E{{value}}",
1298
+ totalLengthExceed: "\u603B\u4F4D\u6570\u4E0D\u80FD\u8D85\u8FC7{{length}}\u4F4D",
1299
+ integerLengthExceed: "\u6574\u6570\u4F4D\u4E0D\u80FD\u8D85\u8FC7{{length}}\u4F4D",
1300
+ decimalLengthExceed: "\u5C0F\u6570\u4F4D\u4E0D\u80FD\u8D85\u8FC7{{length}}\u4F4D",
1301
+ maxEmailsExceed: "\u6700\u591A\u8F93\u5165{{max}}\u4E2A\u90AE\u7BB1"
1302
+ },
1303
+ // utils/date.ts
1304
+ date: {
1305
+ yearMonthFormat: "YYYY\u5E74MM\u6708",
1306
+ yearMonthDayFormat: "YYYY\u5E74MM\u6708DD\u65E5"
1307
+ },
1308
+ // SpeechButton 语音按钮
1309
+ speechButton: {
1310
+ notSupported: "\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u8BED\u97F3\u8BC6\u522B",
1311
+ permissionDenied: "\u9EA6\u514B\u98CE\u6743\u9650\u5DF2\u62D2\u7EDD",
1312
+ stop: "\u505C\u6B62\u5F55\u97F3",
1313
+ start: "\u70B9\u51FB\u5F00\u59CB\u5F55\u97F3"
1314
+ },
1315
+ // MicroApp / Iframe
1316
+ microApp: {
1317
+ loading: "\u52A0\u8F7D\u4E2D..."
1318
+ },
1319
+ iframe: {
1320
+ loading: "\u52A0\u8F7D\u4E2D..."
1321
+ },
1322
+ // LazyComponent 延时加载组件
1323
+ lazyComponent: {
1324
+ unknownType: "\u672A\u77E5\u7C7B\u578B\uFF1A{{type}}",
1325
+ componentLoading: "\u7EC4\u4EF6\u52A0\u8F7D\u4E2D..."
1326
+ },
1327
+ // File 文件预览组件群
1328
+ filePreview: {
1329
+ title: "\u6587\u4EF6\u9884\u89C8",
1330
+ closePreview: "\u5173\u95ED\u9884\u89C8",
1331
+ previewImageAlt: "\u9884\u89C8\u56FE\u7247",
1332
+ previewNotSupported: "\u6682\u4E0D\u652F\u6301 {{suffix}} \u6587\u4EF6\u7684\u9884\u89C8",
1333
+ previewNotSupportedDownload: "{{suffix}} \u6587\u4EF6\u6682\u4E0D\u652F\u6301\u5728\u7EBF\u9884\u89C8\uFF0C\u8BF7\u4E0B\u8F7D\u6253\u5F00",
1334
+ previewGenerating: "\u9884\u89C8\u6587\u4EF6\u6B63\u5728\u751F\u6210\u4E2D...",
1335
+ audioNotSupported: "\u60A8\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 audio \u6807\u7B7E\u3002",
1336
+ videoNotSupported: "\u60A8\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 video \u6807\u7B7E\u3002",
1337
+ requestFailedWithStatus: "\u8BF7\u6C42\u5931\u8D25\uFF0C\u72B6\u6001\u7801: {{status}}",
1338
+ emptyResponse: "\u8FD4\u56DE\u5185\u5BB9\u4E3A\u7A7A",
1339
+ loadFileFailed: "\u52A0\u8F7D\u6587\u4EF6\u5931\u8D25",
1340
+ fileParseFailed: "\u52A0\u8F7D\u6216\u89E3\u6790\u6587\u4EF6\u5931\u8D25",
1341
+ fileUrlInvalid: "\u6587\u4EF6\u5730\u5740\u9519\u8BEF",
1342
+ htmlParseFailed: "\u52A0\u8F7D\u6216\u89E3\u6790 HTML \u5931\u8D25",
1343
+ docLoadFailed: "\u6587\u6863\u52A0\u8F7D\u5931\u8D25",
1344
+ pdfLoadFailed: "PDF \u52A0\u8F7D\u5931\u8D25",
1345
+ pdfParseFailed: "\u52A0\u8F7D\u6216\u89E3\u6790 pdf \u5931\u8D25",
1346
+ pdfUrlInvalid: "pdf\u5730\u5740\u9519\u8BEF",
1347
+ pdfPasswordInvalid: "\u5BC6\u7801\u65E0\u6548\u3002\u8BF7\u518D\u8BD5\u4E00\u6B21\uFF01",
1348
+ pdfPasswordPlaceholder: "\u8BF7\u8F93\u5165\u5BC6\u7801",
1349
+ pdfSubmit: "\u63D0 \u4EA4",
1350
+ pdfInvalidOrDamaged: "\u6587\u4EF6\u65E0\u6548\u6216\u5DF2\u635F\u574F",
1351
+ pdfFileNotFound: "\u6587\u4EF6\u4E0D\u5B58\u5728",
1352
+ pdfUnexpectedResponse: "\u610F\u5916\u7684\u670D\u52A1\u5668\u54CD\u5E94",
1353
+ pdfLoadDocumentFailed: "\u65E0\u6CD5\u52A0\u8F7D\u6587\u6863",
1354
+ zoomOut: "\u7F29\u5C0F",
1355
+ zoomIn: "\u653E\u5927",
1356
+ zoomReset: "\u8FD8\u539F",
1357
+ fitWidth: "\u9002\u5E94\u5BBD\u5EA6"
1358
+ },
1359
+ // MarkdownEditor 富文本编辑器
1360
+ markdownEditor: {
1361
+ mainArea: "\u4E3B\u5185\u5BB9\u533A\u57DF\uFF0C\u5F00\u59CB\u8F93\u5165\u6587\u672C...",
1362
+ unknown: "\u672A\u77E5",
1363
+ // 工具栏
1364
+ toolbar: {
1365
+ quote: "\u5F15\u7528\u9009\u4E2D\u6587\u672C",
1366
+ annotation: "\u6279\u6CE8",
1367
+ excerpt: "\u6458\u5F55\u7B14\u8BB0",
1368
+ undo: "\u64A4\u9500",
1369
+ redo: "\u91CD\u505A",
1370
+ alignLeft: "\u5DE6\u5BF9\u9F50",
1371
+ alignCenter: "\u5C45\u4E2D\u5BF9\u9F50",
1372
+ alignRight: "\u53F3\u5BF9\u9F50",
1373
+ alignJustify: "\u4E24\u7AEF\u5BF9\u9F50",
1374
+ bold: "\u7C97\u4F53",
1375
+ italic: "\u659C\u4F53",
1376
+ underline: "\u4E0B\u5212\u7EBF",
1377
+ strike: "\u5220\u9664\u7EBF",
1378
+ code: "\u4EE3\u7801",
1379
+ superscript: "\u4E0A\u89D2\u6807",
1380
+ subscript: "\u4E0B\u89D2\u6807",
1381
+ bulletList: "\u65E0\u5E8F\u5217\u8868",
1382
+ orderedList: "\u6709\u5E8F\u5217\u8868",
1383
+ taskList: "\u4EFB\u52A1\u5217\u8868",
1384
+ listOptions: "\u5217\u8868\u9009\u9879",
1385
+ list: "\u5217\u8868",
1386
+ blockquote: "\u5F15\u7528\u5757",
1387
+ codeBlock: "\u4EE3\u7801\u5757",
1388
+ heading: "\u6807\u9898",
1389
+ headingLevel: "\u6807\u9898 {{level}}",
1390
+ addImage: "\u6DFB\u52A0\u56FE\u7247",
1391
+ link: "\u94FE\u63A5",
1392
+ linkPlaceholder: "\u7C98\u8D34\u94FE\u63A5...",
1393
+ applyLink: "\u5E94\u7528\u94FE\u63A5",
1394
+ openInNewWindow: "\u5728\u65B0\u7A97\u53E3\u4E2D\u6253\u5F00",
1395
+ removeLink: "\u79FB\u9664\u94FE\u63A5"
1396
+ },
1397
+ // 高亮 / 背景色
1398
+ highlight: {
1399
+ toggle: "\u5207\u6362\u9AD8\u4EAE\u663E\u793A ({{color}})",
1400
+ label: "\u80CC\u666F\u8272",
1401
+ textLabel: "\u6587\u672C\u80CC\u666F\u8272",
1402
+ removeBackground: "\u79FB\u9664\u80CC\u666F",
1403
+ removeHighlight: "\u79FB\u9664\u9AD8\u4EAE",
1404
+ default: "\u9ED8\u8BA4\u80CC\u666F",
1405
+ gray: "\u7070\u8272\u80CC\u666F",
1406
+ brown: "\u68D5\u8272\u80CC\u666F",
1407
+ orange: "\u6A59\u8272\u80CC\u666F",
1408
+ yellow: "\u9EC4\u8272\u80CC\u666F",
1409
+ green: "\u7EFF\u8272\u80CC\u666F",
1410
+ blue: "\u84DD\u8272\u80CC\u666F",
1411
+ purple: "\u7D2B\u8272\u80CC\u666F",
1412
+ pink: "\u7C89\u8272\u80CC\u666F",
1413
+ red: "\u7EA2\u8272\u80CC\u666F"
1414
+ },
1415
+ // 批注
1416
+ annotation: {
1417
+ title: "\u6279\u6CE8",
1418
+ list: "\u6279\u6CE8\u5217\u8868",
1419
+ add: "\u6DFB\u52A0\u6279\u6CE8",
1420
+ content: "\u6279\u6CE8\u5185\u5BB9",
1421
+ required: "\u8BF7\u8F93\u5165\u6279\u6CE8\u5185\u5BB9",
1422
+ maxLength: "\u6279\u6CE8\u5185\u5BB9\u4E0D\u80FD\u8D85\u8FC7500\u4E2A\u5B57\u7B26",
1423
+ placeholder: "\u8BF7\u8F93\u5165\u60A8\u7684\u6279\u6CE8\u5185\u5BB9...",
1424
+ edit: "\u7F16\u8F91\u6279\u6CE8",
1425
+ delete: "\u5220\u9664\u6279\u6CE8",
1426
+ confirmDelete: "\u786E\u8BA4\u5220\u9664\u5F53\u524D\u6279\u6CE8\u5417?",
1427
+ empty: "\u6682\u65E0\u6279\u6CE8"
1428
+ },
1429
+ // 摘录
1430
+ collection: {
1431
+ title: "\u6458\u5F55",
1432
+ list: "\u6458\u5F55\u5217\u8868",
1433
+ delete: "\u5220\u9664\u6458\u5F55",
1434
+ confirmDelete: "\u786E\u8BA4\u5220\u9664\u5F53\u524D\u6458\u5F55\u5417?",
1435
+ empty: "\u6682\u65E0\u6458\u5F55"
1436
+ },
1437
+ // 文件 / 图片上传
1438
+ upload: {
1439
+ noFile: "\u672A\u63D0\u4F9B\u6587\u4EF6",
1440
+ canceled: "\u4E0A\u4F20\u5DF2\u53D6\u6D88",
1441
+ fileSizeExceeded: "\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u6700\u5927\u9650\u5236 ({{max}}MB)",
1442
+ undefined: "\u4E0A\u4F20\u529F\u80FD\u672A\u5B9A\u4E49",
1443
+ failedNoUrl: "\u4E0A\u4F20\u5931\u8D25\uFF1A\u672A\u8FD4\u56DEURL",
1444
+ failed: "\u4E0A\u4F20\u5931\u8D25",
1445
+ noFileToUpload: "\u6CA1\u6709\u6587\u4EF6\u53EF\u4E0A\u4F20",
1446
+ maxFileCount: "\u6700\u591A\u5141\u8BB8\u4E0A\u4F20 {{limit}} \u4E2A\u6587\u4EF6"
1447
+ }
1448
+ }
1449
+ };
1450
+
1451
+ // src/i18n/en-US.ts
1452
+ var commonEnUS = {
1453
+ common: {
1454
+ copySuccess: "Copied successfully",
1455
+ confirm: "OK",
1456
+ cancel: "Cancel",
1457
+ download: "Download",
1458
+ save: "Save",
1459
+ defaultFileName: "file",
1460
+ defaultTitle: "Notice",
1461
+ loading: "Loading...",
1462
+ // Shared keys (extracted from duplicates ≥ 3)
1463
+ enter: "Enter App",
1464
+ applicationCenter: "App Center",
1465
+ subscribeSuccess: "Subscribed successfully",
1466
+ subscribeConfirm: "Subscribe to {{name}}?",
1467
+ installConfirm: "{{action}} {{name}}?",
1468
+ prompt: "Prompt",
1469
+ dynamicNews: "Activity Feed",
1470
+ noDynamicNews: "No recent activity"
1471
+ },
1472
+ request: {
1473
+ networkError: "Network error, please check your connection",
1474
+ requestError: "Request error!"
1475
+ },
1476
+ pattern: {
1477
+ mobileInvalid: "Invalid phone number!",
1478
+ phoneInvalid: "Invalid phone number!",
1479
+ taxNoInvalid: "Invalid tax number!",
1480
+ bankCardInvalid: "Invalid bank card number!",
1481
+ idCardInvalid: "Invalid ID card number!",
1482
+ numberInvalid: "Invalid format, please re-enter!",
1483
+ smsCodeInvalid: "SMS code must be 6 digits",
1484
+ emailInvalid: "Invalid email format!",
1485
+ addressInvalid: "Must contain one of: street, road, village, town, etc.",
1486
+ passwordInvalid: "Password must be 8-26 characters with letters and numbers",
1487
+ phoneOrMobileInvalid: "Invalid contact number",
1488
+ lessThan: "Cannot be less than {{value}}",
1489
+ lessThanOrEqual: "Cannot be less than or equal to {{value}}",
1490
+ greaterThan: "Cannot be greater than {{value}}",
1491
+ greaterThanOrEqual: "Cannot be greater than or equal to {{value}}",
1492
+ totalLengthExceed: "Total digits cannot exceed {{length}}",
1493
+ integerLengthExceed: "Integer digits cannot exceed {{length}}",
1494
+ decimalLengthExceed: "Decimal digits cannot exceed {{length}}",
1495
+ maxEmailsExceed: "Maximum {{max}} emails allowed"
1496
+ },
1497
+ date: {
1498
+ yearMonthFormat: "YYYY-MM",
1499
+ yearMonthDayFormat: "YYYY-MM-DD"
1500
+ },
1501
+ speechButton: {
1502
+ notSupported: "Speech recognition is not supported in this browser",
1503
+ permissionDenied: "Microphone permission denied",
1504
+ stop: "Stop Recording",
1505
+ start: "Click to Start Recording"
1506
+ },
1507
+ microApp: {
1508
+ loading: "Loading..."
1509
+ },
1510
+ iframe: {
1511
+ loading: "Loading..."
1512
+ },
1513
+ lazyComponent: {
1514
+ unknownType: "Unknown type: {{type}}",
1515
+ componentLoading: "Loading component..."
1516
+ },
1517
+ filePreview: {
1518
+ title: "File Preview",
1519
+ closePreview: "Close preview",
1520
+ previewImageAlt: "Preview image",
1521
+ previewNotSupported: "Preview of {{suffix}} files is not supported",
1522
+ previewNotSupportedDownload: "{{suffix}} files cannot be previewed online, please download and open",
1523
+ previewGenerating: "Preview file is being generated...",
1524
+ audioNotSupported: "Your browser does not support the audio tag.",
1525
+ videoNotSupported: "Your browser does not support the video tag.",
1526
+ requestFailedWithStatus: "Request failed, status code: {{status}}",
1527
+ emptyResponse: "Response content is empty",
1528
+ loadFileFailed: "Failed to load file",
1529
+ fileParseFailed: "Failed to load or parse file",
1530
+ fileUrlInvalid: "Invalid file URL",
1531
+ htmlParseFailed: "Failed to load or parse HTML",
1532
+ docLoadFailed: "Failed to load document",
1533
+ pdfLoadFailed: "Failed to load PDF",
1534
+ pdfParseFailed: "Failed to load or parse PDF",
1535
+ pdfUrlInvalid: "Invalid PDF URL",
1536
+ pdfPasswordInvalid: "Invalid password. Please try again!",
1537
+ pdfPasswordPlaceholder: "Please enter password",
1538
+ pdfSubmit: "Submit",
1539
+ pdfInvalidOrDamaged: "File is invalid or damaged",
1540
+ pdfFileNotFound: "File not found",
1541
+ pdfUnexpectedResponse: "Unexpected server response",
1542
+ pdfLoadDocumentFailed: "Unable to load document",
1543
+ zoomOut: "Zoom out",
1544
+ zoomIn: "Zoom in",
1545
+ zoomReset: "Reset",
1546
+ fitWidth: "Fit width"
1547
+ },
1548
+ markdownEditor: {
1549
+ mainArea: "Main content area, start typing...",
1550
+ unknown: "Unknown",
1551
+ toolbar: {
1552
+ quote: "Quote Selected Text",
1553
+ annotation: "Annotate",
1554
+ excerpt: "Excerpt Note",
1555
+ undo: "Undo",
1556
+ redo: "Redo",
1557
+ alignLeft: "Align Left",
1558
+ alignCenter: "Align Center",
1559
+ alignRight: "Align Right",
1560
+ alignJustify: "Justify",
1561
+ bold: "Bold",
1562
+ italic: "Italic",
1563
+ underline: "Underline",
1564
+ strike: "Strikethrough",
1565
+ code: "Code",
1566
+ superscript: "Superscript",
1567
+ subscript: "Subscript",
1568
+ bulletList: "Bullet List",
1569
+ orderedList: "Numbered List",
1570
+ taskList: "Task List",
1571
+ listOptions: "List Options",
1572
+ list: "List",
1573
+ blockquote: "Blockquote",
1574
+ codeBlock: "Code Block",
1575
+ heading: "Heading",
1576
+ headingLevel: "Heading {{level}}",
1577
+ addImage: "Add Image",
1578
+ link: "Link",
1579
+ linkPlaceholder: "Paste link...",
1580
+ applyLink: "Apply Link",
1581
+ openInNewWindow: "Open in New Window",
1582
+ removeLink: "Remove Link"
1583
+ },
1584
+ highlight: {
1585
+ toggle: "Toggle highlight ({{color}})",
1586
+ label: "Background color",
1587
+ textLabel: "Text background color",
1588
+ removeBackground: "Remove background",
1589
+ removeHighlight: "Remove highlight",
1590
+ default: "Default background",
1591
+ gray: "Gray background",
1592
+ brown: "Brown background",
1593
+ orange: "Orange background",
1594
+ yellow: "Yellow background",
1595
+ green: "Green background",
1596
+ blue: "Blue background",
1597
+ purple: "Purple background",
1598
+ pink: "Pink background",
1599
+ red: "Red background"
1600
+ },
1601
+ annotation: {
1602
+ title: "Annotations",
1603
+ list: "Annotations",
1604
+ add: "Add Annotation",
1605
+ content: "Annotation content",
1606
+ required: "Please enter annotation content",
1607
+ maxLength: "Annotation content cannot exceed 500 characters",
1608
+ placeholder: "Please enter your annotation...",
1609
+ edit: "Edit Annotation",
1610
+ delete: "Delete annotation",
1611
+ confirmDelete: "Delete this annotation?",
1612
+ empty: "No annotations"
1613
+ },
1614
+ collection: {
1615
+ title: "Excerpts",
1616
+ list: "Excerpts",
1617
+ delete: "Delete excerpt",
1618
+ confirmDelete: "Delete this excerpt?",
1619
+ empty: "No excerpts"
1620
+ },
1621
+ upload: {
1622
+ noFile: "No file provided",
1623
+ canceled: "Upload canceled",
1624
+ fileSizeExceeded: "File size exceeds the maximum limit ({{max}}MB)",
1625
+ undefined: "Upload function is not defined",
1626
+ failedNoUrl: "Upload failed: no URL returned",
1627
+ failed: "Upload failed",
1628
+ noFileToUpload: "No file to upload",
1629
+ maxFileCount: "A maximum of {{limit}} files can be uploaded"
1630
+ }
1631
+ }
1632
+ };
1633
+
1634
+ // src/i18n/ja-JP.ts
1635
+ var commonJaJP = {
1636
+ // 共通文案
1637
+ common: {
1638
+ copySuccess: "\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F",
1639
+ confirm: "OK",
1640
+ cancel: "\u30AD\u30E3\u30F3\u30BB\u30EB",
1641
+ download: "\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9",
1642
+ save: "\u4FDD\u5B58",
1643
+ defaultFileName: "\u30D5\u30A1\u30A4\u30EB",
1644
+ defaultTitle: "\u30D2\u30F3\u30C8",
1645
+ loading: "\u8AAD\u307F\u8FBC\u307F\u4E2D...",
1646
+ // 共通キー(3回以上重複のため抽出)
1647
+ enter: "\u30A2\u30D7\u30EA\u306B\u5165\u308B",
1648
+ applicationCenter: "\u30A2\u30D7\u30EA\u30BB\u30F3\u30BF\u30FC",
1649
+ subscribeSuccess: "\u30B5\u30D6\u30B9\u30AF\u6210\u529F",
1650
+ subscribeConfirm: "{{name}}\u3092\u30B5\u30D6\u30B9\u30AF\u3057\u307E\u3059\u304B\uFF1F",
1651
+ installConfirm: "{{name}}\u3092{{action}}\u3057\u307E\u3059\u304B\uFF1F",
1652
+ prompt: "\u30D2\u30F3\u30C8",
1653
+ dynamicNews: "\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",
1654
+ noDynamicNews: "\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u306A\u3057"
1655
+ },
1656
+ // utils/request.ts
1657
+ request: {
1658
+ networkError: "\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044",
1659
+ requestError: "\u30EA\u30AF\u30A8\u30B9\u30C8\u30A8\u30E9\u30FC\uFF01"
1660
+ },
1661
+ // utils/pattern.ts — バリデーションメッセージ
1662
+ pattern: {
1663
+ mobileInvalid: "\u643A\u5E2F\u96FB\u8A71\u756A\u53F7\u306E\u5F62\u5F0F\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093\uFF01",
1664
+ phoneInvalid: "\u96FB\u8A71\u756A\u53F7\u306E\u5F62\u5F0F\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093\uFF01",
1665
+ taxNoInvalid: "\u7A0E\u756A\u53F7\u306E\u5F62\u5F0F\u306B\u8AA4\u308A\u304C\u3042\u308A\u307E\u3059\uFF01",
1666
+ bankCardInvalid: "\u9280\u884C\u30AB\u30FC\u30C9\u756A\u53F7\u306E\u5F62\u5F0F\u306B\u8AA4\u308A\u304C\u3042\u308A\u307E\u3059\uFF01",
1667
+ idCardInvalid: "\u8EAB\u5206\u8A3C\u660E\u66F8\u756A\u53F7\u306E\u5F62\u5F0F\u306B\u8AA4\u308A\u304C\u3042\u308A\u307E\u3059\uFF01",
1668
+ numberInvalid: "\u5F62\u5F0F\u306B\u8AA4\u308A\u304C\u3042\u308A\u307E\u3059\u3002\u518D\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\uFF01",
1669
+ smsCodeInvalid: "\u8A8D\u8A3C\u30B3\u30FC\u30C9\u306F6\u6841\u306E\u6570\u5B57\u3067\u3059",
1670
+ emailInvalid: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u306E\u5F62\u5F0F\u306B\u8AA4\u308A\u304C\u3042\u308A\u307E\u3059\uFF01",
1671
+ addressInvalid: "\u300C\u8857\u300D\u300C\u9053\u8DEF\u300D\u300C\u6751\u300D\u300C\u753A\u300D\u300C\u9053\u300D\u300C\u8DEF\u5730\u300D\u300C\u756A\u53F7\u300D\u306A\u3069\u306E\u30AD\u30FC\u30EF\u30FC\u30C9\u3092\u542B\u3081\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059",
1672
+ passwordInvalid: "\u30D1\u30B9\u30EF\u30FC\u30C9\u306F8\u301C26\u6587\u5B57\u306E\u82F1\u6570\u5B57\u306E\u7D44\u307F\u5408\u308F\u305B\u3067\u3059",
1673
+ phoneOrMobileInvalid: "\u9023\u7D61\u5148\u96FB\u8A71\u756A\u53F7\u306E\u5F62\u5F0F\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093",
1674
+ // 補間例:{{value}} は実際の値に置換されます
1675
+ lessThan: "{{value}}\u672A\u6E80\u306B\u3067\u304D\u307E\u305B\u3093",
1676
+ lessThanOrEqual: "{{value}}\u4EE5\u4E0B\u306B\u3067\u304D\u307E\u305B\u3093",
1677
+ greaterThan: "{{value}}\u3092\u8D85\u3048\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093",
1678
+ greaterThanOrEqual: "{{value}}\u4EE5\u4E0A\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059",
1679
+ totalLengthExceed: "\u7DCF\u6841\u6570\u306F{{length}}\u6841\u3092\u8D85\u3048\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093",
1680
+ integerLengthExceed: "\u6574\u6570\u90E8\u306F{{length}}\u6841\u3092\u8D85\u3048\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093",
1681
+ decimalLengthExceed: "\u5C0F\u6570\u90E8\u306F{{length}}\u6841\u3092\u8D85\u3048\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093",
1682
+ maxEmailsExceed: "\u6700\u5927{{max}}\u4EF6\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u307E\u3067\u5165\u529B\u3067\u304D\u307E\u3059"
1683
+ },
1684
+ // utils/date.ts
1685
+ date: {
1686
+ yearMonthFormat: "YYYY\u5E74MM\u6708",
1687
+ yearMonthDayFormat: "YYYY\u5E74MM\u6708DD\u65E5"
1688
+ },
1689
+ // SpeechButton 音声ボタン
1690
+ speechButton: {
1691
+ notSupported: "\u73FE\u5728\u306E\u30D6\u30E9\u30A6\u30B6\u306F\u97F3\u58F0\u8A8D\u8B58\u306B\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093",
1692
+ permissionDenied: "\u30DE\u30A4\u30AF\u306E\u6A29\u9650\u304C\u62D2\u5426\u3055\u308C\u307E\u3057\u305F",
1693
+ stop: "\u9332\u97F3\u3092\u505C\u6B62",
1694
+ start: "\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u9332\u97F3\u3092\u958B\u59CB"
1695
+ },
1696
+ // MicroApp / Iframe
1697
+ microApp: {
1698
+ loading: "\u8AAD\u307F\u8FBC\u307F\u4E2D..."
1699
+ },
1700
+ iframe: {
1701
+ loading: "\u8AAD\u307F\u8FBC\u307F\u4E2D..."
1702
+ },
1703
+ // LazyComponent 遅延読み込みコンポーネント
1704
+ lazyComponent: {
1705
+ unknownType: "\u4E0D\u660E\u306A\u30BF\u30A4\u30D7\uFF1A{{type}}",
1706
+ componentLoading: "\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D..."
1707
+ },
1708
+ // File ファイルプレビューコンポーネント群
1709
+ filePreview: {
1710
+ title: "\u30D5\u30A1\u30A4\u30EB\u30D7\u30EC\u30D3\u30E5\u30FC",
1711
+ closePreview: "\u30D7\u30EC\u30D3\u30E5\u30FC\u3092\u9589\u3058\u308B",
1712
+ previewImageAlt: "\u30D7\u30EC\u30D3\u30E5\u30FC\u753B\u50CF",
1713
+ previewNotSupported: "{{suffix}}\u30D5\u30A1\u30A4\u30EB\u306E\u30D7\u30EC\u30D3\u30E5\u30FC\u306B\u306F\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093",
1714
+ previewNotSupportedDownload: "{{suffix}}\u30D5\u30A1\u30A4\u30EB\u306F\u30AA\u30F3\u30E9\u30A4\u30F3\u30D7\u30EC\u30D3\u30E5\u30FC\u306B\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093\u3002\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3057\u3066\u958B\u3044\u3066\u304F\u3060\u3055\u3044",
1715
+ previewGenerating: "\u30D7\u30EC\u30D3\u30E5\u30FC\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u4E2D...",
1716
+ audioNotSupported: "\u304A\u4F7F\u3044\u306E\u30D6\u30E9\u30A6\u30B6\u306F audio \u30BF\u30B0\u306B\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093\u3002",
1717
+ videoNotSupported: "\u304A\u4F7F\u3044\u306E\u30D6\u30E9\u30A6\u30B6\u306F video \u30BF\u30B0\u306B\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093\u3002",
1718
+ requestFailedWithStatus: "\u30EA\u30AF\u30A8\u30B9\u30C8\u5931\u6557\u3001\u30B9\u30C6\u30FC\u30BF\u30B9\u30B3\u30FC\u30C9: {{status}}",
1719
+ emptyResponse: "\u8FD4\u4FE1\u5185\u5BB9\u304C\u7A7A\u3067\u3059",
1720
+ loadFileFailed: "\u30D5\u30A1\u30A4\u30EB\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
1721
+ fileParseFailed: "\u30D5\u30A1\u30A4\u30EB\u306E\u8AAD\u307F\u8FBC\u307F\u307E\u305F\u306F\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
1722
+ fileUrlInvalid: "\u30D5\u30A1\u30A4\u30EBURL\u304C\u4E0D\u6B63\u3067\u3059",
1723
+ htmlParseFailed: "HTML\u306E\u8AAD\u307F\u8FBC\u307F\u307E\u305F\u306F\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
1724
+ docLoadFailed: "\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
1725
+ pdfLoadFailed: "PDF\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
1726
+ pdfParseFailed: "PDF\u306E\u8AAD\u307F\u8FBC\u307F\u307E\u305F\u306F\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
1727
+ pdfUrlInvalid: "PDF\u306EURL\u304C\u4E0D\u6B63\u3067\u3059",
1728
+ pdfPasswordInvalid: "\u30D1\u30B9\u30EF\u30FC\u30C9\u304C\u7121\u52B9\u3067\u3059\u3002\u3082\u3046\u4E00\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\uFF01",
1729
+ pdfPasswordPlaceholder: "\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",
1730
+ pdfSubmit: "\u9001 \u4FE1",
1731
+ pdfInvalidOrDamaged: "\u30D5\u30A1\u30A4\u30EB\u304C\u7121\u52B9\u307E\u305F\u306F\u7834\u640D\u3057\u3066\u3044\u307E\u3059",
1732
+ pdfFileNotFound: "\u30D5\u30A1\u30A4\u30EB\u304C\u5B58\u5728\u3057\u307E\u305B\u3093",
1733
+ pdfUnexpectedResponse: "\u4E88\u671F\u3057\u306A\u3044\u30B5\u30FC\u30D0\u30FC\u30EC\u30B9\u30DD\u30F3\u30B9",
1734
+ pdfLoadDocumentFailed: "\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093",
1735
+ zoomOut: "\u7E2E\u5C0F",
1736
+ zoomIn: "\u62E1\u5927",
1737
+ zoomReset: "\u5143\u306B\u623B\u3059",
1738
+ fitWidth: "\u5E45\u306B\u5408\u308F\u305B\u308B"
1739
+ },
1740
+ // MarkdownEditor リッチテキストエディタ
1741
+ markdownEditor: {
1742
+ mainArea: "\u30E1\u30A4\u30F3\u30B3\u30F3\u30C6\u30F3\u30C4\u30A8\u30EA\u30A2\u3001\u30C6\u30AD\u30B9\u30C8\u3092\u5165\u529B...",
1743
+ unknown: "\u4E0D\u660E",
1744
+ // ツールバー
1745
+ toolbar: {
1746
+ quote: "\u9078\u629E\u30C6\u30AD\u30B9\u30C8\u3092\u5F15\u7528",
1747
+ annotation: "\u6CE8\u91C8",
1748
+ excerpt: "\u629C\u7C8B\u30E1\u30E2",
1749
+ undo: "\u5143\u306B\u623B\u3059",
1750
+ redo: "\u3084\u308A\u76F4\u3059",
1751
+ alignLeft: "\u5DE6\u63C3\u3048",
1752
+ alignCenter: "\u4E2D\u592E\u63C3\u3048",
1753
+ alignRight: "\u53F3\u63C3\u3048",
1754
+ alignJustify: "\u4E21\u7AEF\u63C3\u3048",
1755
+ bold: "\u592A\u5B57",
1756
+ italic: "\u659C\u4F53",
1757
+ underline: "\u4E0B\u7DDA",
1758
+ strike: "\u53D6\u308A\u6D88\u3057\u7DDA",
1759
+ code: "\u30B3\u30FC\u30C9",
1760
+ superscript: "\u4E0A\u4ED8\u304D\u6587\u5B57",
1761
+ subscript: "\u4E0B\u4ED8\u304D\u6587\u5B57",
1762
+ bulletList: "\u7B87\u6761\u66F8\u304D",
1763
+ orderedList: "\u756A\u53F7\u4ED8\u304D\u30EA\u30B9\u30C8",
1764
+ taskList: "\u30BF\u30B9\u30AF\u30EA\u30B9\u30C8",
1765
+ listOptions: "\u30EA\u30B9\u30C8\u30AA\u30D7\u30B7\u30E7\u30F3",
1766
+ list: "\u30EA\u30B9\u30C8",
1767
+ blockquote: "\u5F15\u7528\u30D6\u30ED\u30C3\u30AF",
1768
+ codeBlock: "\u30B3\u30FC\u30C9\u30D6\u30ED\u30C3\u30AF",
1769
+ heading: "\u898B\u51FA\u3057",
1770
+ headingLevel: "\u898B\u51FA\u3057 {{level}}",
1771
+ addImage: "\u753B\u50CF\u3092\u8FFD\u52A0",
1772
+ link: "\u30EA\u30F3\u30AF",
1773
+ linkPlaceholder: "\u30EA\u30F3\u30AF\u3092\u8CBC\u308A\u4ED8\u3051...",
1774
+ applyLink: "\u30EA\u30F3\u30AF\u3092\u9069\u7528",
1775
+ openInNewWindow: "\u65B0\u3057\u3044\u30A6\u30A3\u30F3\u30C9\u30A6\u3067\u958B\u304F",
1776
+ removeLink: "\u30EA\u30F3\u30AF\u3092\u524A\u9664"
1777
+ },
1778
+ // ハイライト / 背景色
1779
+ highlight: {
1780
+ toggle: "\u30CF\u30A4\u30E9\u30A4\u30C8\u8868\u793A\u3092\u5207\u308A\u66FF\u3048 ({{color}})",
1781
+ label: "\u80CC\u666F\u8272",
1782
+ textLabel: "\u30C6\u30AD\u30B9\u30C8\u80CC\u666F\u8272",
1783
+ removeBackground: "\u80CC\u666F\u3092\u524A\u9664",
1784
+ removeHighlight: "\u30CF\u30A4\u30E9\u30A4\u30C8\u3092\u524A\u9664",
1785
+ default: "\u30C7\u30D5\u30A9\u30EB\u30C8\u80CC\u666F",
1786
+ gray: "\u30B0\u30EC\u30FC\u80CC\u666F",
1787
+ brown: "\u30D6\u30E9\u30A6\u30F3\u80CC\u666F",
1788
+ orange: "\u30AA\u30EC\u30F3\u30B8\u80CC\u666F",
1789
+ yellow: "\u30A4\u30A8\u30ED\u30FC\u80CC\u666F",
1790
+ green: "\u30B0\u30EA\u30FC\u30F3\u80CC\u666F",
1791
+ blue: "\u30D6\u30EB\u30FC\u80CC\u666F",
1792
+ purple: "\u30D1\u30FC\u30D7\u30EB\u80CC\u666F",
1793
+ pink: "\u30D4\u30F3\u30AF\u80CC\u666F",
1794
+ red: "\u30EC\u30C3\u30C9\u80CC\u666F"
1795
+ },
1796
+ // 注釈
1797
+ annotation: {
1798
+ title: "\u6CE8\u91C8",
1799
+ list: "\u6CE8\u91C8\u30EA\u30B9\u30C8",
1800
+ add: "\u6CE8\u91C8\u3092\u8FFD\u52A0",
1801
+ content: "\u6CE8\u91C8\u5185\u5BB9",
1802
+ required: "\u6CE8\u91C8\u5185\u5BB9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",
1803
+ maxLength: "\u6CE8\u91C8\u5185\u5BB9\u306F500\u6587\u5B57\u4EE5\u5185\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",
1804
+ placeholder: "\u6CE8\u91C8\u5185\u5BB9\u3092\u5165\u529B...",
1805
+ edit: "\u6CE8\u91C8\u3092\u7DE8\u96C6",
1806
+ delete: "\u6CE8\u91C8\u3092\u524A\u9664",
1807
+ confirmDelete: "\u3053\u306E\u6CE8\u91C8\u3092\u524A\u9664\u3057\u307E\u3059\u304B\uFF1F",
1808
+ empty: "\u6CE8\u91C8\u306F\u3042\u308A\u307E\u305B\u3093"
1809
+ },
1810
+ // 抜粋
1811
+ collection: {
1812
+ title: "\u629C\u7C8B",
1813
+ list: "\u629C\u7C8B\u30EA\u30B9\u30C8",
1814
+ delete: "\u629C\u7C8B\u3092\u524A\u9664",
1815
+ confirmDelete: "\u3053\u306E\u629C\u7C8B\u3092\u524A\u9664\u3057\u307E\u3059\u304B\uFF1F",
1816
+ empty: "\u629C\u7C8B\u306F\u3042\u308A\u307E\u305B\u3093"
1817
+ },
1818
+ // ファイル / 画像アップロード
1819
+ upload: {
1820
+ noFile: "\u30D5\u30A1\u30A4\u30EB\u304C\u63D0\u4F9B\u3055\u308C\u3066\u3044\u307E\u305B\u3093",
1821
+ canceled: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306F\u30AD\u30E3\u30F3\u30BB\u30EB\u3055\u308C\u307E\u3057\u305F",
1822
+ fileSizeExceeded: "\u30D5\u30A1\u30A4\u30EB\u30B5\u30A4\u30BA\u304C\u6700\u5927\u5236\u9650\u3092\u8D85\u3048\u3066\u3044\u307E\u3059 ({{max}}MB)",
1823
+ undefined: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u6A5F\u80FD\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093",
1824
+ failedNoUrl: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u5931\u6557\uFF1AURL\u304C\u8FD4\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F",
1825
+ failed: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
1826
+ noFileToUpload: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u30D5\u30A1\u30A4\u30EB\u304C\u3042\u308A\u307E\u305B\u3093",
1827
+ maxFileCount: "\u6700\u5927{{limit}}\u4EF6\u307E\u3067\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3067\u304D\u307E\u3059"
1828
+ }
1829
+ }
1830
+ };
1831
+ var antdLocaleMap = {
1832
+ "zh-CN": zhCN,
1833
+ "en-US": enUS,
1834
+ "ja-JP": jaJP
1835
+ };
1836
+ var dayjsLocaleMap = {
1837
+ "zh-CN": "zh-cn",
1838
+ "en-US": "en",
1839
+ "ja-JP": "ja"
1840
+ };
1841
+ var LocaleProvider = ({ children, ...rest }) => {
1842
+ const lang = getLang();
1843
+ dayjs.locale(dayjsLocaleMap[lang]);
1844
+ return /* @__PURE__ */ jsx(ConfigProvider, { locale: antdLocaleMap[lang], ...rest, children });
1845
+ };
1846
+
1847
+ // src/i18n/index.ts
1848
+ var DEFAULT_LNG = "zh-CN";
1849
+ var LANG_KEY = "ns-lang";
1850
+ var langManager = createTokenManager({ key: LANG_KEY });
1851
+ function getLang() {
1852
+ return langManager.get() || DEFAULT_LNG;
1853
+ }
1854
+ var i18n = createInstance({
1855
+ lng: DEFAULT_LNG,
1856
+ fallbackLng: DEFAULT_LNG,
1857
+ defaultNS: NS_COMMON,
1858
+ interpolation: { escapeValue: false },
1859
+ resources: { [DEFAULT_LNG]: { [NS_COMMON]: commonZhCN } }
1860
+ }).use(initReactI18next);
1861
+ void i18n.init();
1862
+ function addBundledResource(lng, ns, res) {
1863
+ if (lng === DEFAULT_LNG && ns === NS_COMMON) return;
1864
+ i18n.addResourceBundle(lng, ns, res, true, true);
1865
+ }
1866
+ function initI18n(options = {}) {
1867
+ const { lng = getLang(), resources } = options;
1868
+ for (const [l, namespaces] of Object.entries(resources ?? {})) {
1869
+ for (const [ns, messages] of Object.entries(namespaces)) {
1870
+ i18n.addResourceBundle(l, ns, messages, true, true);
1871
+ }
1872
+ }
1873
+ switchLang(lng);
1874
+ return i18n;
1875
+ }
1876
+ function switchLang(lng, reload = false) {
1877
+ langManager.set(lng);
1878
+ if (reload) {
1879
+ window?.top?.location.reload();
1880
+ } else {
1881
+ i18n.changeLanguage(lng);
1882
+ }
1883
+ }
1884
+ function useTranslation(namespace) {
1885
+ return useTranslation$1(namespace, { useSuspense: false });
1886
+ }
1887
+ function getI18n() {
1888
+ return i18n;
1889
+ }
1890
+ function t(key, options) {
1891
+ return i18n.t(key, options);
1892
+ }
1893
+
1894
+ // src/components/File/styles.module.less
1895
+ var styles_module_default = {
1896
+ nsPreviewImage: "styles_module_nsPreviewImage",
1897
+ nsPreviewPdf: "styles_module_nsPreviewPdf",
1898
+ pdfToolbar: "styles_module_pdfToolbar",
1899
+ nsPreviewPdfImage: "styles_module_nsPreviewPdfImage",
1900
+ pdfImageNav: "styles_module_pdfImageNav",
1901
+ pdfImageNavItem: "styles_module_pdfImageNavItem",
1902
+ pdfImageNavItemImgWrapper: "styles_module_pdfImageNavItemImgWrapper",
1903
+ pdfImageNavItemActive: "styles_module_pdfImageNavItemActive",
1904
+ pdfImageNavItemImg: "styles_module_pdfImageNavItemImg",
1905
+ pdfImageNavItemTip: "styles_module_pdfImageNavItemTip",
1906
+ pdfImageBody: "styles_module_pdfImageBody",
1907
+ pdfImageBodyToolbar: "styles_module_pdfImageBodyToolbar",
1908
+ pdfImageBodyItem: "styles_module_pdfImageBodyItem",
1909
+ pdfImageBodyItemInnerWrapper: "styles_module_pdfImageBodyItemInnerWrapper",
1910
+ pdfImageBodyItemInner: "styles_module_pdfImageBodyItemInner",
1911
+ pdfImageBodyItemActive: "styles_module_pdfImageBodyItemActive",
1912
+ pdfImageBodyItemImg: "styles_module_pdfImageBodyItemImg",
1913
+ nsPreviewVideo: "styles_module_nsPreviewVideo",
1914
+ nsPreviewAudio: "styles_module_nsPreviewAudio",
1915
+ nsPreviewDocx: "styles_module_nsPreviewDocx",
1916
+ docxToolbar: "styles_module_docxToolbar",
1917
+ docxContent: "styles_module_docxContent",
1918
+ stateBody: "styles_module_stateBody",
1919
+ pdfContainer: "styles_module_pdfContainer",
1920
+ floatingToolbar: "styles_module_floatingToolbar",
1921
+ divider: "styles_module_divider",
1922
+ pdfBody: "styles_module_pdfBody",
1923
+ pdfDocument: "styles_module_pdfDocument",
1924
+ pdfPage: "styles_module_pdfPage"
1925
+ };
1926
+ var AudioPlayer_default = ({ fileUrl }) => {
1927
+ const { t: t2 } = useTranslation(NS_COMMON);
1928
+ return /* @__PURE__ */ jsxs("audio", { controls: true, className: styles_module_default.nsPreviewAudio, children: [
1929
+ /* @__PURE__ */ jsx("source", { src: fileUrl, type: "audio/mpeg" }),
1930
+ t2("filePreview.audioNotSupported")
1931
+ ] }, fileUrl);
1932
+ };
1256
1933
  var DocxPreview_default = ({ fileUrl, scale = 1 }) => {
1934
+ const { t: t2 } = useTranslation(NS_COMMON);
1257
1935
  const containerRef = useRef(null);
1258
1936
  const [zoomRatio, setZoomRatio] = useState(scale);
1259
1937
  useEffect(() => {
@@ -1276,7 +1954,7 @@ var DocxPreview_default = ({ fileUrl, scale = 1 }) => {
1276
1954
  });
1277
1955
  }).catch((err) => {
1278
1956
  console.error("docx-preview \u6E32\u67D3\u5931\u8D25:", err);
1279
- if (containerRef.current) containerRef.current.innerHTML = '<p class="text-center">\u6587\u6863\u52A0\u8F7D\u5931\u8D25</p>';
1957
+ if (containerRef.current) containerRef.current.innerHTML = `<p class="text-center">${t2("filePreview.docLoadFailed")}</p>`;
1280
1958
  });
1281
1959
  }, [fileUrl]);
1282
1960
  const zoomIn = () => setZoomRatio((z) => Math.min(z + 0.1, 3));
@@ -1286,9 +1964,9 @@ var DocxPreview_default = ({ fileUrl, scale = 1 }) => {
1286
1964
  };
1287
1965
  return /* @__PURE__ */ jsxs("div", { className: classNames2(styles_module_default.nsPreviewDocx, "height-full", "width-full"), children: [
1288
1966
  /* @__PURE__ */ jsxs(Flex, { gap: 6, align: "center", className: styles_module_default.docxToolbar, children: [
1289
- /* @__PURE__ */ jsx(Button, { onClick: zoomOut, icon: /* @__PURE__ */ jsx(MinusCircleOutlined, {}), title: "\u7F29\u5C0F" }),
1290
- /* @__PURE__ */ jsx(Button, { onClick: zoomIn, icon: /* @__PURE__ */ jsx(PlusCircleOutlined, {}), title: "\u653E\u5927" }),
1291
- /* @__PURE__ */ jsx(Button, { onClick: resetZoom, icon: /* @__PURE__ */ jsx(RedoOutlined, {}), title: "\u8FD8\u539F" })
1967
+ /* @__PURE__ */ jsx(Button, { onClick: zoomOut, icon: /* @__PURE__ */ jsx(MinusCircleOutlined, {}), title: t2("filePreview.zoomOut") }),
1968
+ /* @__PURE__ */ jsx(Button, { onClick: zoomIn, icon: /* @__PURE__ */ jsx(PlusCircleOutlined, {}), title: t2("filePreview.zoomIn") }),
1969
+ /* @__PURE__ */ jsx(Button, { onClick: resetZoom, icon: /* @__PURE__ */ jsx(RedoOutlined, {}), title: t2("filePreview.zoomReset") })
1292
1970
  ] }),
1293
1971
  /* @__PURE__ */ jsx("div", { className: classNames2(styles_module_default.docxContent, "height-full", "scroll-fade-in"), children: /* @__PURE__ */ jsx(
1294
1972
  "div",
@@ -1366,9 +2044,10 @@ var FileIcon_default = ({ suffix, fontSize = 22 }) => {
1366
2044
  return /* @__PURE__ */ jsx("span", { style: styles, children: Icon });
1367
2045
  };
1368
2046
  var VideoPlayer_default = ({ fileUrl }) => {
2047
+ const { t: t2 } = useTranslation(NS_COMMON);
1369
2048
  return /* @__PURE__ */ jsxs("video", { controls: true, className: styles_module_default.nsPreviewVideo, children: [
1370
2049
  /* @__PURE__ */ jsx("source", { src: fileUrl, type: "video/mp4" }),
1371
- "\u60A8\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 video \u6807\u7B7E\u3002"
2050
+ t2("filePreview.videoNotSupported")
1372
2051
  ] }, fileUrl);
1373
2052
  };
1374
2053
 
@@ -1381,6 +2060,7 @@ var baseComponentMap = {
1381
2060
  };
1382
2061
  var lazyCache = /* @__PURE__ */ new Map();
1383
2062
  var LazyComponent_default = ({ type, customComponents, unknownContent, ...rest }) => {
2063
+ const { t: t2 } = useTranslation(NS_COMMON);
1384
2064
  const loader2 = customComponents?.[type] || baseComponentMap[type];
1385
2065
  const LazyComponent = useMemo(() => {
1386
2066
  if (!loader2) return null;
@@ -1390,11 +2070,11 @@ var LazyComponent_default = ({ type, customComponents, unknownContent, ...rest }
1390
2070
  lazyCache.set(type, component);
1391
2071
  return component;
1392
2072
  }, [loader2]);
1393
- if (!LazyComponent) return unknownContent || /* @__PURE__ */ jsx(Alert, { title: `\u672A\u77E5\u7C7B\u578B\uFF1A${type}`, type: "warning" });
2073
+ if (!LazyComponent) return unknownContent || /* @__PURE__ */ jsx(Alert, { title: t2("lazyComponent.unknownType", { type }), type: "warning" });
1394
2074
  return /* @__PURE__ */ jsx(
1395
2075
  Suspense,
1396
2076
  {
1397
- fallback: /* @__PURE__ */ jsx(Skeleton.Node, { active: true, className: styles_module_default2.skeleton, children: /* @__PURE__ */ jsx(Typography.Text, { type: "secondary", children: "\u7EC4\u4EF6\u52A0\u8F7D\u4E2D..." }) }),
2077
+ fallback: /* @__PURE__ */ jsx(Skeleton.Node, { active: true, className: styles_module_default2.skeleton, children: /* @__PURE__ */ jsx(Typography.Text, { type: "secondary", children: t2("lazyComponent.componentLoading") }) }),
1398
2078
  children: /* @__PURE__ */ jsx(LazyComponent, { ...rest })
1399
2079
  }
1400
2080
  );
@@ -1506,12 +2186,13 @@ var RenderMarkdown_default = ({ content = "", searchValue, customComponents, ...
1506
2186
  return /* @__PURE__ */ jsx("div", { className: "ns-markdown", children: reactContent });
1507
2187
  };
1508
2188
  var MarkdownPreview_default = ({ fileUrl, searchValue, asPlainText }) => {
2189
+ const { t: t2 } = useTranslation(NS_COMMON);
1509
2190
  const [content, setContent] = useState("");
1510
2191
  const [error, setError] = useState("");
1511
2192
  const fetchMarkdown = async () => {
1512
2193
  const res = await fetch(fileUrl);
1513
2194
  if (res.status !== 200) {
1514
- throw new Error(`\u8BF7\u6C42\u5931\u8D25\uFF0C\u72B6\u6001\u7801: ${res.status}`);
2195
+ throw new Error(t2("filePreview.requestFailedWithStatus", { status: res.status }));
1515
2196
  }
1516
2197
  const buffer = await res.arrayBuffer();
1517
2198
  let markdownText = "";
@@ -1523,7 +2204,7 @@ var MarkdownPreview_default = ({ fileUrl, searchValue, asPlainText }) => {
1523
2204
  markdownText = gbkDecoder.decode(buffer);
1524
2205
  }
1525
2206
  if (!markdownText) {
1526
- throw new Error("\u8FD4\u56DE\u5185\u5BB9\u4E3A\u7A7A");
2207
+ throw new Error(t2("filePreview.emptyResponse"));
1527
2208
  }
1528
2209
  return markdownText;
1529
2210
  };
@@ -1535,10 +2216,10 @@ var MarkdownPreview_default = ({ fileUrl, searchValue, asPlainText }) => {
1535
2216
  const content2 = await fetchMarkdown();
1536
2217
  setContent(content2);
1537
2218
  } catch {
1538
- setError("\u52A0\u8F7D\u6216\u89E3\u6790\u6587\u4EF6\u5931\u8D25");
2219
+ setError(t2("filePreview.fileParseFailed"));
1539
2220
  }
1540
2221
  } else {
1541
- setError("\u6587\u4EF6\u5730\u5740\u9519\u8BEF");
2222
+ setError(t2("filePreview.fileUrlInvalid"));
1542
2223
  }
1543
2224
  };
1544
2225
  useEffect(() => {
@@ -2208,17 +2889,18 @@ var THUMB_IMG_HEIGHT = 514;
2208
2889
  var MAIN_IMG_HEIGHT = 800;
2209
2890
  var MAIN_IMG_WIDTH = 600;
2210
2891
  var PdfImagePreview_default = ({ fileUrl, pageNo, scale = 1, isHasThumbnails = true, onSetPageNo }) => {
2892
+ const { t: t2 } = useTranslation(NS_COMMON);
2211
2893
  const [images, setImages] = useState([]);
2212
2894
  const [currentIndex, setCurrentIndex, getCurrentIndex] = useRefState_default(0);
2213
2895
  const [error, setError] = useState("");
2214
2896
  const fetchPdfImages = async () => {
2215
2897
  const res = await fetch(fileUrl);
2216
2898
  if (res.status !== 200) {
2217
- throw new Error(`\u8BF7\u6C42\u5931\u8D25\uFF0C\u72B6\u6001\u7801: ${res.status}`);
2899
+ throw new Error(t2("filePreview.requestFailedWithStatus", { status: res.status }));
2218
2900
  }
2219
2901
  const { data } = await res.json();
2220
2902
  if (!data?.items?.length) {
2221
- throw new Error("\u8FD4\u56DE\u5185\u5BB9\u4E3A\u7A7A");
2903
+ throw new Error(t2("filePreview.emptyResponse"));
2222
2904
  }
2223
2905
  setImages(data.items);
2224
2906
  };
@@ -2230,10 +2912,10 @@ var PdfImagePreview_default = ({ fileUrl, pageNo, scale = 1, isHasThumbnails = t
2230
2912
  try {
2231
2913
  await fetchPdfImages();
2232
2914
  } catch (error2) {
2233
- setError("\u52A0\u8F7D\u6216\u89E3\u6790 pdf \u5931\u8D25");
2915
+ setError(t2("filePreview.pdfParseFailed"));
2234
2916
  }
2235
2917
  } else {
2236
- setError("pdf\u5730\u5740\u9519\u8BEF");
2918
+ setError(t2("filePreview.pdfUrlInvalid"));
2237
2919
  }
2238
2920
  };
2239
2921
  useEffect(() => {
@@ -2373,9 +3055,9 @@ var PdfImagePreview_default = ({ fileUrl, pageNo, scale = 1, isHasThumbnails = t
2373
3055
  ) }) }),
2374
3056
  /* @__PURE__ */ jsx(Splitter.Panel, { children: /* @__PURE__ */ jsxs("div", { className: classNames2("height-full", styles_module_default.pdfImageBody), children: [
2375
3057
  /* @__PURE__ */ jsxs(Flex, { gap: 6, align: "center", className: styles_module_default.pdfImageBodyToolbar, children: [
2376
- /* @__PURE__ */ jsx(Button, { onClick: zoomOut, icon: /* @__PURE__ */ jsx(MinusCircleOutlined, {}), title: "\u7F29\u5C0F" }),
2377
- /* @__PURE__ */ jsx(Button, { onClick: zoomIn, icon: /* @__PURE__ */ jsx(PlusCircleOutlined, {}), title: "\u653E\u5927" }),
2378
- /* @__PURE__ */ jsx(Button, { onClick: zoomFitWidth, icon: /* @__PURE__ */ jsx(ColumnWidthOutlined, {}), title: "\u9002\u5E94\u5BBD\u5EA6" })
3058
+ /* @__PURE__ */ jsx(Button, { onClick: zoomOut, icon: /* @__PURE__ */ jsx(MinusCircleOutlined, {}), title: t2("filePreview.zoomOut") }),
3059
+ /* @__PURE__ */ jsx(Button, { onClick: zoomIn, icon: /* @__PURE__ */ jsx(PlusCircleOutlined, {}), title: t2("filePreview.zoomIn") }),
3060
+ /* @__PURE__ */ jsx(Button, { onClick: zoomFitWidth, icon: /* @__PURE__ */ jsx(ColumnWidthOutlined, {}), title: t2("filePreview.fitWidth") })
2379
3061
  ] }),
2380
3062
  /* @__PURE__ */ jsx("div", { ref: containerRef, className: "height-full scroll-fade-in", children: /* @__PURE__ */ jsx(
2381
3063
  "div",
@@ -2423,6 +3105,7 @@ var ProtectedView = ({
2423
3105
  verifyPassword,
2424
3106
  onVerifyPasswordEnd
2425
3107
  }) => {
3108
+ const { t: t2 } = useTranslation(NS_COMMON);
2426
3109
  const [form] = Form.useForm();
2427
3110
  const onSubmit = () => {
2428
3111
  form.validateFields().then((values) => {
@@ -2433,10 +3116,10 @@ var ProtectedView = ({
2433
3116
  });
2434
3117
  };
2435
3118
  return /* @__PURE__ */ jsx(Flex, { justify: "center", align: "center", className: "height-full", children: /* @__PURE__ */ jsxs("div", { style: { width: 300 }, children: [
2436
- passwordStatus === PasswordStatus.WrongPassword && /* @__PURE__ */ jsx(Alert, { title: "\u5BC6\u7801\u65E0\u6548\u3002\u8BF7\u518D\u8BD5\u4E00\u6B21\uFF01", type: "error" }),
3119
+ passwordStatus === PasswordStatus.WrongPassword && /* @__PURE__ */ jsx(Alert, { title: t2("filePreview.pdfPasswordInvalid"), type: "error" }),
2437
3120
  /* @__PURE__ */ jsxs(Form, { form, size: "large", className: "m-t-24", children: [
2438
- /* @__PURE__ */ jsx(Form.Item, { name: "password", rules: [{ required: true, message: "\u8BF7\u8F93\u5165\u5BC6\u7801" }], children: /* @__PURE__ */ jsx(Input.Password, { autoComplete: "new-password", placeholder: "\u8BF7\u8F93\u5165\u5BC6\u7801" }) }),
2439
- /* @__PURE__ */ jsx(Flex, { justify: "center", children: /* @__PURE__ */ jsx(Button, { type: "primary", onClick: onSubmit, children: "\u63D0 \u4EA4" }) })
3121
+ /* @__PURE__ */ jsx(Form.Item, { name: "password", rules: [{ required: true, message: t2("filePreview.pdfPasswordPlaceholder") }], children: /* @__PURE__ */ jsx(Input.Password, { autoComplete: "new-password", placeholder: t2("filePreview.pdfPasswordPlaceholder") }) }),
3122
+ /* @__PURE__ */ jsx(Flex, { justify: "center", children: /* @__PURE__ */ jsx(Button, { type: "primary", onClick: onSubmit, children: t2("filePreview.pdfSubmit") }) })
2440
3123
  ] })
2441
3124
  ] }) });
2442
3125
  };
@@ -2455,6 +3138,7 @@ var openLinksNewTabPlugin = () => {
2455
3138
  };
2456
3139
  };
2457
3140
  var PdfPreview_default = ({ password, fileUrl, pageNo = 1, scale = 1, isHasThumbnails = true, onSetPassword, onSetPageNo }) => {
3141
+ const { t: t2 } = useTranslation(NS_COMMON);
2458
3142
  const embedRef = useRef(null);
2459
3143
  const [sizes, setSizes] = useState([0]);
2460
3144
  const [docLoaded, setDocLoaded, getDocLoaded] = useRefState_default(false);
@@ -2528,19 +3212,19 @@ var PdfPreview_default = ({ password, fileUrl, pageNo = 1, scale = 1, isHasThumb
2528
3212
  let message3 = "";
2529
3213
  switch (error.name) {
2530
3214
  case "InvalidPDFException":
2531
- message3 = "\u6587\u4EF6\u65E0\u6548\u6216\u5DF2\u635F\u574F";
3215
+ message3 = t2("filePreview.pdfInvalidOrDamaged");
2532
3216
  break;
2533
3217
  case "MissingPDFException":
2534
- message3 = "\u6587\u4EF6\u4E0D\u5B58\u5728";
3218
+ message3 = t2("filePreview.pdfFileNotFound");
2535
3219
  break;
2536
3220
  case "UnexpectedResponseException":
2537
- message3 = "\u610F\u5916\u7684\u670D\u52A1\u5668\u54CD\u5E94";
3221
+ message3 = t2("filePreview.pdfUnexpectedResponse");
2538
3222
  break;
2539
3223
  // case 'CMapReaderFactory not initialized':
2540
3224
  // message = '字体映射文件加载失败,请刷新页面重试'
2541
3225
  // break
2542
3226
  default:
2543
- message3 = "\u65E0\u6CD5\u52A0\u8F7D\u6587\u6863";
3227
+ message3 = t2("filePreview.pdfLoadDocumentFailed");
2544
3228
  break;
2545
3229
  }
2546
3230
  return /* @__PURE__ */ jsx(Flex, { className: "height-full", justify: "center", align: "center", children: /* @__PURE__ */ jsx(Alert, { title: message3, type: "error", showIcon: true }) });
@@ -2611,6 +3295,7 @@ var PdfPreview_default = ({ password, fileUrl, pageNo = 1, scale = 1, isHasThumb
2611
3295
  ] }) }) });
2612
3296
  };
2613
3297
  var FilePreview_default = ({ suffix, fileUrl, pdfParams, password, searchValue, emptyProps, onSetPassword }) => {
3298
+ const { t: t2 } = useTranslation(NS_COMMON);
2614
3299
  const Preview = useMemo(() => {
2615
3300
  if (!fileUrl) {
2616
3301
  return /* @__PURE__ */ jsx(Empty, { ...emptyProps });
@@ -2620,7 +3305,7 @@ var FilePreview_default = ({ suffix, fileUrl, pdfParams, password, searchValue,
2620
3305
  case "JPG":
2621
3306
  case "JPEG":
2622
3307
  case "GIF":
2623
- return /* @__PURE__ */ jsx(Image$1, { classNames: { root: styles_module_default.nsPreviewImage }, src: fileUrl, alt: "\u9884\u89C8\u56FE\u7247" });
3308
+ return /* @__PURE__ */ jsx(Image$1, { classNames: { root: styles_module_default.nsPreviewImage }, src: fileUrl, alt: t2("filePreview.previewImageAlt") });
2624
3309
  case "PDF":
2625
3310
  return /* @__PURE__ */ jsx(PdfPreview_default, { fileUrl, ...pdfParams, password, onSetPassword });
2626
3311
  case "PDF_IMG":
@@ -2640,11 +3325,25 @@ var FilePreview_default = ({ suffix, fileUrl, pdfParams, password, searchValue,
2640
3325
  case "DOCX":
2641
3326
  return /* @__PURE__ */ jsx(DocxPreview_default, { fileUrl });
2642
3327
  default:
2643
- return /* @__PURE__ */ jsx(Result, { subTitle: `\u6682\u4E0D\u652F\u6301 ${suffix || ""} \u6587\u4EF6\u7684\u9884\u89C8` });
3328
+ return /* @__PURE__ */ jsx(Result, { subTitle: t2("filePreview.previewNotSupported", { suffix: suffix || "" }) });
2644
3329
  }
2645
3330
  }, [suffix, fileUrl, pdfParams]);
2646
3331
  return /* @__PURE__ */ jsx(Flex, { justify: "center", align: "center", className: "height-full", children: Preview });
2647
3332
  };
3333
+ var FilePreviewDrawer_default = ({ open, title, onClose, ...props }) => {
3334
+ const { t: t2 } = useTranslation(NS_COMMON);
3335
+ return /* @__PURE__ */ jsx(
3336
+ Drawer,
3337
+ {
3338
+ title: title || t2("filePreview.title"),
3339
+ push: false,
3340
+ size: "100%",
3341
+ open,
3342
+ onClose,
3343
+ children: /* @__PURE__ */ jsx(FilePreview_default, { ...props })
3344
+ }
3345
+ );
3346
+ };
2648
3347
  loader.config({ monaco });
2649
3348
  var getLanguage = (suffix) => {
2650
3349
  switch (suffix.toLowerCase()) {
@@ -2684,6 +3383,7 @@ var getLanguage = (suffix) => {
2684
3383
  }
2685
3384
  };
2686
3385
  var CodePreview = ({ fileUrl, suffix }) => {
3386
+ const { t: t2 } = useTranslation(NS_COMMON);
2687
3387
  const [content, setContent] = useState("");
2688
3388
  const [error, setError] = useState("");
2689
3389
  const [loading, setLoading] = useState(false);
@@ -2693,7 +3393,7 @@ var CodePreview = ({ fileUrl, suffix }) => {
2693
3393
  };
2694
3394
  const res = await fetch(fileUrl, { headers, signal });
2695
3395
  if (res.status !== 200) {
2696
- throw new Error(`\u8BF7\u6C42\u5931\u8D25\uFF0C\u72B6\u6001\u7801: ${res.status}`);
3396
+ throw new Error(t2("filePreview.requestFailedWithStatus", { status: res.status }));
2697
3397
  }
2698
3398
  const buffer = await res.arrayBuffer();
2699
3399
  let text = "";
@@ -2717,7 +3417,7 @@ var CodePreview = ({ fileUrl, suffix }) => {
2717
3417
  await fetchContent(controller.signal);
2718
3418
  } catch (error2) {
2719
3419
  if (!controller.signal.aborted) {
2720
- setError("\u52A0\u8F7D\u6587\u4EF6\u5931\u8D25");
3420
+ setError(t2("filePreview.loadFileFailed"));
2721
3421
  }
2722
3422
  } finally {
2723
3423
  if (!controller.signal.aborted) {
@@ -2757,7 +3457,7 @@ var CodePreview = ({ fileUrl, suffix }) => {
2757
3457
  var CodePreview_default = CodePreview;
2758
3458
  var { Text } = Typography;
2759
3459
  pdfjsLib.GlobalWorkerOptions.workerSrc = "https://unpkg.com/pdfjs-dist@5.4.296/legacy/build/pdf.worker.min.mjs";
2760
- var MIN_SCALE = 0.1;
3460
+ var MIN_SCALE = 0.6;
2761
3461
  var MAX_SCALE = 1.5;
2762
3462
  var SCALE_STEP = 0.1;
2763
3463
  var PdfPage = React3__default.memo(({ pdf, pageNumber, scale, scrollContainerRef, defaultSize }) => {
@@ -2867,6 +3567,7 @@ var PdfPage = React3__default.memo(({ pdf, pageNumber, scale, scrollContainerRef
2867
3567
  );
2868
3568
  });
2869
3569
  var DocumentPreview = ({ fileUrl, previewEnabled = true }) => {
3570
+ const { t: t2 } = useTranslation(NS_COMMON);
2870
3571
  const [loading, setLoading] = useState(false);
2871
3572
  const [pdf, setPdf] = useState(null);
2872
3573
  const [numPages, setNumPages] = useState(0);
@@ -2926,9 +3627,9 @@ var DocumentPreview = ({ fileUrl, previewEnabled = true }) => {
2926
3627
  if (aborted) return;
2927
3628
  const message3 = e?.message;
2928
3629
  if (typeof message3 === "string" && message3.includes("cancelled")) ; else if (typeof message3 === "string" && message3.includes("(903)")) {
2929
- setError("\u9884\u89C8\u6587\u4EF6\u6B63\u5728\u751F\u6210\u4E2D...");
3630
+ setError(t2("filePreview.previewGenerating"));
2930
3631
  } else {
2931
- setError(message3 || "PDF \u52A0\u8F7D\u5931\u8D25");
3632
+ setError(message3 || t2("filePreview.pdfLoadFailed"));
2932
3633
  }
2933
3634
  } finally {
2934
3635
  if (!aborted) {
@@ -3033,7 +3734,7 @@ var DocumentPreview = ({ fileUrl, previewEnabled = true }) => {
3033
3734
  /* @__PURE__ */ jsx(Button, { type: "text", icon: /* @__PURE__ */ jsx(PlusOutlined, {}), size: "small", onClick: onZoomIn, disabled: scale >= MAX_SCALE })
3034
3735
  ] });
3035
3736
  if (!previewEnabled) {
3036
- return /* @__PURE__ */ jsx(Flex, { className: styles_module_default.stateBody, children: "\u5173\u95ED\u9884\u89C8" });
3737
+ return /* @__PURE__ */ jsx(Flex, { className: styles_module_default.stateBody, children: t2("filePreview.closePreview") });
3037
3738
  }
3038
3739
  return /* @__PURE__ */ jsxs("div", { className: styles_module_default.pdfContainer, children: [
3039
3740
  toolbar,
@@ -3042,6 +3743,7 @@ var DocumentPreview = ({ fileUrl, previewEnabled = true }) => {
3042
3743
  };
3043
3744
  var DocumentPreview_default = DocumentPreview;
3044
3745
  var HtmlPreview = ({ fileUrl }) => {
3746
+ const { t: t2 } = useTranslation(NS_COMMON);
3045
3747
  const [content, setContent] = useState("");
3046
3748
  const [error, setError] = useState("");
3047
3749
  const [loading, setLoading] = useState(false);
@@ -3054,7 +3756,7 @@ var HtmlPreview = ({ fileUrl }) => {
3054
3756
  signal
3055
3757
  });
3056
3758
  if (res.status !== 200) {
3057
- throw new Error(`\u8BF7\u6C42\u5931\u8D25\uFF0C\u72B6\u6001\u7801: ${res.status}`);
3759
+ throw new Error(t2("filePreview.requestFailedWithStatus", { status: res.status }));
3058
3760
  }
3059
3761
  const buffer = await res.arrayBuffer();
3060
3762
  let htmlText = "";
@@ -3066,7 +3768,7 @@ var HtmlPreview = ({ fileUrl }) => {
3066
3768
  htmlText = gbkDecoder.decode(buffer);
3067
3769
  }
3068
3770
  if (!htmlText) {
3069
- throw new Error("\u8FD4\u56DE\u5185\u5BB9\u4E3A\u7A7A");
3771
+ throw new Error(t2("filePreview.emptyResponse"));
3070
3772
  }
3071
3773
  setContent(htmlText);
3072
3774
  };
@@ -3081,7 +3783,7 @@ var HtmlPreview = ({ fileUrl }) => {
3081
3783
  await fetchHtml(controller.signal);
3082
3784
  } catch (error2) {
3083
3785
  if (!controller.signal.aborted) {
3084
- setError("\u52A0\u8F7D\u6216\u89E3\u6790 HTML \u5931\u8D25");
3786
+ setError(t2("filePreview.htmlParseFailed"));
3085
3787
  }
3086
3788
  } finally {
3087
3789
  if (!controller.signal.aborted) {
@@ -3107,6 +3809,7 @@ var HtmlPreview = ({ fileUrl }) => {
3107
3809
  };
3108
3810
  var HtmlPreview_default = HtmlPreview;
3109
3811
  var luyaFilePreview_default = ({ suffix, fileUrl, emptyProps, fileName }) => {
3812
+ const { t: t2 } = useTranslation(NS_COMMON);
3110
3813
  const extension = suffix ? suffix : getFileSuffixName(fileName || "");
3111
3814
  const Preview = useMemo(() => {
3112
3815
  if (!fileUrl) {
@@ -3122,7 +3825,7 @@ var luyaFilePreview_default = ({ suffix, fileUrl, emptyProps, fileName }) => {
3122
3825
  case "SVG":
3123
3826
  case "ICO":
3124
3827
  case "TIFF":
3125
- return /* @__PURE__ */ jsx(Image$1, { classNames: { root: styles_module_default.nsPreviewImage }, src: fileUrl, alt: "\u9884\u89C8\u56FE\u7247" });
3828
+ return /* @__PURE__ */ jsx(Image$1, { classNames: { root: styles_module_default.nsPreviewImage }, src: fileUrl, alt: t2("filePreview.previewImageAlt") });
3126
3829
  case "DOC":
3127
3830
  case "DOCX":
3128
3831
  case "PDF":
@@ -3167,30 +3870,18 @@ var luyaFilePreview_default = ({ suffix, fileUrl, emptyProps, fileName }) => {
3167
3870
  case "TXT":
3168
3871
  return /* @__PURE__ */ jsx(MarkdownPreview_default, { fileUrl, asPlainText: true });
3169
3872
  default:
3170
- return /* @__PURE__ */ jsx(Result, { subTitle: `${suffix || ""} \u6587\u4EF6\u6682\u4E0D\u652F\u6301\u5728\u7EBF\u9884\u89C8\uFF0C\u8BF7\u4E0B\u8F7D\u6253\u5F00` });
3873
+ return /* @__PURE__ */ jsx(Result, { subTitle: t2("filePreview.previewNotSupportedDownload", { suffix: suffix || "" }) });
3171
3874
  }
3172
3875
  }, [suffix, fileUrl, fileName]);
3173
3876
  return /* @__PURE__ */ jsx(Flex, { justify: "center", align: "center", className: "height-full p-t-16 p-b-16 p-l-16", children: Preview });
3174
3877
  };
3175
- var FilePreviewDrawer_default = ({ open, title = "\u6587\u4EF6\u9884\u89C8", onClose, ...props }) => {
3176
- return /* @__PURE__ */ jsx(
3177
- Drawer,
3178
- {
3179
- title,
3180
- push: false,
3181
- size: "100%",
3182
- open,
3183
- onClose,
3184
- children: /* @__PURE__ */ jsx(FilePreview_default, { ...props })
3185
- }
3186
- );
3187
- };
3188
3878
 
3189
3879
  // src/components/MicroApp/styles.module.less
3190
3880
  var styles_module_default3 = {
3191
3881
  microApp: "styles_module_microApp"
3192
3882
  };
3193
3883
  var MicroApp_default = ({ name, url, className, onMounted, onError, data, ...rest }) => {
3884
+ const { t: t2 } = useTranslation(NS_COMMON);
3194
3885
  const [loading, setLoading] = useState(false);
3195
3886
  useEffect(() => {
3196
3887
  setLoading(true);
@@ -3205,10 +3896,10 @@ var MicroApp_default = ({ name, url, className, onMounted, onError, data, ...res
3205
3896
  };
3206
3897
  const microAppData = useMemo(() => {
3207
3898
  const parentMainSource = window?.microApp?.getData?.()?.mainSource || [];
3208
- return { mainSource: [...parentMainSource, name], ...data };
3899
+ return { [LANG_KEY]: getLang(), mainSource: [...parentMainSource, name], ...data };
3209
3900
  }, [data, name]);
3210
3901
  const TagName = microApp.tagName || "micro-app";
3211
- return /* @__PURE__ */ jsxCustomEvent(Spin, { spinning: loading, classNames: { root: "full-spin" }, description: "\u52A0\u8F7D\u4E2D..." }, /* @__PURE__ */ jsxCustomEvent(
3902
+ return /* @__PURE__ */ jsxCustomEvent(Spin, { spinning: loading, classNames: { root: "full-spin" }, description: t2("microApp.loading") }, /* @__PURE__ */ jsxCustomEvent(
3212
3903
  TagName,
3213
3904
  {
3214
3905
  name,
@@ -3297,10 +3988,12 @@ var styles_module_default4 = {
3297
3988
  iframe: "styles_module_iframe"
3298
3989
  };
3299
3990
  var Iframe_default = forwardRef(({ defaultMainSource, id, src, className, onLoad }, ref) => {
3991
+ const { t: t2 } = useTranslation(NS_COMMON);
3300
3992
  const [loading, setLoading] = useState(false);
3301
3993
  const finalSrc = useMemo(() => {
3302
- return buildUrlParams({ v: Date.now() }, addUrlLastSlash(setUrlMainSource(src, location.href, defaultMainSource)));
3303
- }, [src]);
3994
+ const baseUrl = addUrlLastSlash(setUrlMainSource(src, location.href, defaultMainSource));
3995
+ return buildUrlParams({ v: Date.now(), [LANG_KEY]: getLang() }, baseUrl);
3996
+ }, [src, defaultMainSource]);
3304
3997
  const onHandleLoad = () => {
3305
3998
  setLoading(false);
3306
3999
  onLoad?.();
@@ -3308,7 +4001,7 @@ var Iframe_default = forwardRef(({ defaultMainSource, id, src, className, onLoad
3308
4001
  useEffect(() => {
3309
4002
  setLoading(true);
3310
4003
  }, [src]);
3311
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Spin, { spinning: loading, classNames: { root: "full-spin" }, description: "\u52A0\u8F7D\u4E2D...", children: /* @__PURE__ */ jsx(
4004
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Spin, { spinning: loading, classNames: { root: "full-spin" }, description: t2("iframe.loading"), children: /* @__PURE__ */ jsx(
3312
4005
  "iframe",
3313
4006
  {
3314
4007
  id,
@@ -3988,24 +4681,37 @@ function useIsBreakpoint(mode = "max", breakpoint = 768) {
3988
4681
  }
3989
4682
  var { TextArea } = Input;
3990
4683
  var AnnotationModal_default = ({ visible, onCancel, onConfirm }) => {
4684
+ const { t: t2 } = useTranslation(NS_COMMON);
3991
4685
  const [form] = Form.useForm();
3992
4686
  const handleOk = async () => {
3993
4687
  const values = await form.validateFields();
3994
4688
  onConfirm(values.content.trim());
3995
4689
  onCancel();
3996
4690
  };
3997
- return /* @__PURE__ */ jsx(Modal, { title: "\u6DFB\u52A0\u6279\u6CE8", open: visible, onOk: handleOk, onCancel, destroyOnHidden: true, okText: "\u786E\u5B9A", cancelText: "\u53D6\u6D88", children: /* @__PURE__ */ jsx(Form, { form, layout: "vertical", children: /* @__PURE__ */ jsx(
3998
- Form.Item,
4691
+ return /* @__PURE__ */ jsx(
4692
+ Modal,
3999
4693
  {
4000
- name: "content",
4001
- label: "\u6279\u6CE8\u5185\u5BB9",
4002
- rules: [
4003
- { whitespace: true, required: true, message: "\u8BF7\u8F93\u5165\u6279\u6CE8\u5185\u5BB9" },
4004
- { max: 500, message: "\u6279\u6CE8\u5185\u5BB9\u4E0D\u80FD\u8D85\u8FC7500\u4E2A\u5B57\u7B26" }
4005
- ],
4006
- children: /* @__PURE__ */ jsx(TextArea, { rows: 4, placeholder: "\u8BF7\u8F93\u5165\u60A8\u7684\u6279\u6CE8\u5185\u5BB9...", showCount: true, maxLength: 500 })
4694
+ title: t2("markdownEditor.annotation.add"),
4695
+ open: visible,
4696
+ onOk: handleOk,
4697
+ onCancel,
4698
+ destroyOnHidden: true,
4699
+ okText: t2("common.confirm"),
4700
+ cancelText: t2("common.cancel"),
4701
+ children: /* @__PURE__ */ jsx(Form, { form, layout: "vertical", children: /* @__PURE__ */ jsx(
4702
+ Form.Item,
4703
+ {
4704
+ name: "content",
4705
+ label: t2("markdownEditor.annotation.content"),
4706
+ rules: [
4707
+ { whitespace: true, required: true, message: t2("markdownEditor.annotation.required") },
4708
+ { max: 500, message: t2("markdownEditor.annotation.maxLength") }
4709
+ ],
4710
+ children: /* @__PURE__ */ jsx(TextArea, { rows: 4, placeholder: t2("markdownEditor.annotation.placeholder"), showCount: true, maxLength: 500 })
4711
+ }
4712
+ ) })
4007
4713
  }
4008
- ) }) });
4714
+ );
4009
4715
  };
4010
4716
 
4011
4717
  // src/components/MarkdownEditor/annotation/constant.ts
@@ -4030,6 +4736,7 @@ var AnnotationSidebar_default = ({
4030
4736
  annotationConfig,
4031
4737
  onClose
4032
4738
  }) => {
4739
+ const { t: t2 } = useTranslation(NS_COMMON);
4033
4740
  const [form] = Form.useForm();
4034
4741
  const [editingId, setEditingId] = useState();
4035
4742
  const itemRefs = useRef({});
@@ -4066,7 +4773,7 @@ var AnnotationSidebar_default = ({
4066
4773
  /* @__PURE__ */ jsxs(Space, { children: [
4067
4774
  /* @__PURE__ */ jsx(MessageOutlined, {}),
4068
4775
  /* @__PURE__ */ jsxs("span", { children: [
4069
- "\u6279\u6CE8",
4776
+ t2("markdownEditor.annotation.title"),
4070
4777
  annotations.length > 0 && `\uFF08${annotations.length}\uFF09`
4071
4778
  ] })
4072
4779
  ] }),
@@ -4101,15 +4808,15 @@ var AnnotationSidebar_default = ({
4101
4808
  {
4102
4809
  name: "content",
4103
4810
  rules: [
4104
- { whitespace: true, required: true, message: "\u8BF7\u8F93\u5165\u6279\u6CE8\u5185\u5BB9" },
4105
- { max: 500, message: "\u6279\u6CE8\u5185\u5BB9\u4E0D\u80FD\u8D85\u8FC7500\u4E2A\u5B57\u7B26" }
4811
+ { whitespace: true, required: true, message: t2("markdownEditor.annotation.required") },
4812
+ { max: 500, message: t2("markdownEditor.annotation.maxLength") }
4106
4813
  ],
4107
- children: /* @__PURE__ */ jsx(TextArea2, { autoFocus: true, rows: 2, placeholder: "\u8BF7\u8F93\u5165\u60A8\u7684\u6279\u6CE8\u5185\u5BB9...", showCount: true, maxLength: 500 })
4814
+ children: /* @__PURE__ */ jsx(TextArea2, { autoFocus: true, rows: 2, placeholder: t2("markdownEditor.annotation.placeholder"), showCount: true, maxLength: 500 })
4108
4815
  }
4109
4816
  ) }),
4110
4817
  /* @__PURE__ */ jsxs(Space, { children: [
4111
- /* @__PURE__ */ jsx(Button, { size: "small", type: "primary", onClick: handleSaveEdit, children: "\u4FDD\u5B58" }),
4112
- /* @__PURE__ */ jsx(Button, { size: "small", onClick: handleCancelEdit, children: "\u53D6\u6D88" })
4818
+ /* @__PURE__ */ jsx(Button, { size: "small", type: "primary", onClick: handleSaveEdit, children: t2("common.save") }),
4819
+ /* @__PURE__ */ jsx(Button, { size: "small", onClick: handleCancelEdit, children: t2("common.cancel") })
4113
4820
  ] })
4114
4821
  ] }) : /* @__PURE__ */ jsxs(Flex, { gap: 8, vertical: true, children: [
4115
4822
  /* @__PURE__ */ jsx(Text2, { children: annotation.content }),
@@ -4119,7 +4826,7 @@ var AnnotationSidebar_default = ({
4119
4826
  {
4120
4827
  type: "text",
4121
4828
  size: "small",
4122
- title: "\u7F16\u8F91\u6279\u6CE8",
4829
+ title: t2("markdownEditor.annotation.edit"),
4123
4830
  icon: /* @__PURE__ */ jsx(EditOutlined, {}),
4124
4831
  onClick: (e) => {
4125
4832
  handleEdit(annotation);
@@ -4129,12 +4836,12 @@ var AnnotationSidebar_default = ({
4129
4836
  /* @__PURE__ */ jsx(
4130
4837
  Popconfirm,
4131
4838
  {
4132
- title: "\u63D0\u793A",
4133
- okText: "\u786E\u5B9A",
4134
- cancelText: "\u53D6\u6D88",
4135
- description: "\u786E\u8BA4\u5220\u9664\u5F53\u524D\u6279\u6CE8\u5417?",
4839
+ title: t2("common.defaultTitle"),
4840
+ okText: t2("common.confirm"),
4841
+ cancelText: t2("common.cancel"),
4842
+ description: t2("markdownEditor.annotation.confirmDelete"),
4136
4843
  onConfirm: () => onDeleteAnnotation(annotation[ANNOTATION_ATTRS[0]]),
4137
- children: /* @__PURE__ */ jsx(Button, { type: "text", size: "small", title: "\u5220\u9664\u6279\u6CE8", icon: /* @__PURE__ */ jsx(DeleteOutlined, {}) })
4844
+ children: /* @__PURE__ */ jsx(Button, { type: "text", size: "small", title: t2("markdownEditor.annotation.delete"), icon: /* @__PURE__ */ jsx(DeleteOutlined, {}) })
4138
4845
  }
4139
4846
  )
4140
4847
  ] })
@@ -4143,7 +4850,7 @@ var AnnotationSidebar_default = ({
4143
4850
  }
4144
4851
  )
4145
4852
  }
4146
- ) : /* @__PURE__ */ jsx(Flex, { vertical: true, justify: "center", align: "center", className: "height-full", children: /* @__PURE__ */ jsx(Empty, { description: "\u6682\u65E0\u6279\u6CE8" }) })
4853
+ ) : /* @__PURE__ */ jsx(Flex, { vertical: true, justify: "center", align: "center", className: "height-full", children: /* @__PURE__ */ jsx(Empty, { description: t2("markdownEditor.annotation.empty") }) })
4147
4854
  }
4148
4855
  );
4149
4856
  const container = annotationConfig?.getContainer?.();
@@ -4428,7 +5135,7 @@ var useAnnotations = (annotationConfig) => {
4428
5135
  const id = genNonDuplicateID();
4429
5136
  editor.current.chain().focus().setMark(ANNOTATION_KEY, {
4430
5137
  "annotation-id": id,
4431
- "user-name": annotationConfig?.user?.name || "\u672A\u77E5",
5138
+ "user-name": annotationConfig?.user?.name || t("markdownEditor.unknown"),
4432
5139
  "user-id": annotationConfig?.user.id || "0000",
4433
5140
  "update-time": getTimestamp(),
4434
5141
  content
@@ -4710,6 +5417,7 @@ var collectionSidebar_default = ({
4710
5417
  collectionConfig,
4711
5418
  onClose
4712
5419
  }) => {
5420
+ const { t: t2 } = useTranslation(NS_COMMON);
4713
5421
  const itemRefs = useRef({});
4714
5422
  useEffect(() => {
4715
5423
  if (selectedCollectionId) {
@@ -4731,7 +5439,7 @@ var collectionSidebar_default = ({
4731
5439
  /* @__PURE__ */ jsxs(Space, { children: [
4732
5440
  /* @__PURE__ */ jsx(BookOutlined, {}),
4733
5441
  /* @__PURE__ */ jsxs("span", { children: [
4734
- "\u6458\u5F55",
5442
+ t2("markdownEditor.collection.title"),
4735
5443
  collections.length > 0 && `\uFF08${collections.length}\uFF09`
4736
5444
  ] })
4737
5445
  ] }),
@@ -4774,12 +5482,12 @@ var collectionSidebar_default = ({
4774
5482
  !disabled && selectedCollectionId === collection[COLLECTION_ATTRS[0]] && /* @__PURE__ */ jsx(Space, { children: /* @__PURE__ */ jsx(
4775
5483
  Popconfirm,
4776
5484
  {
4777
- title: "\u63D0\u793A",
4778
- okText: "\u786E\u5B9A",
4779
- cancelText: "\u53D6\u6D88",
4780
- description: "\u786E\u8BA4\u5220\u9664\u5F53\u524D\u6458\u5F55\u5417?",
5485
+ title: t2("common.defaultTitle"),
5486
+ okText: t2("common.confirm"),
5487
+ cancelText: t2("common.cancel"),
5488
+ description: t2("markdownEditor.collection.confirmDelete"),
4781
5489
  onConfirm: () => onDeleteCollection(collection[COLLECTION_ATTRS[0]]),
4782
- children: /* @__PURE__ */ jsx(Button, { type: "text", size: "small", title: "\u5220\u9664\u6458\u5F55", icon: /* @__PURE__ */ jsx(DeleteOutlined, {}) })
5490
+ children: /* @__PURE__ */ jsx(Button, { type: "text", size: "small", title: t2("markdownEditor.collection.delete"), icon: /* @__PURE__ */ jsx(DeleteOutlined, {}) })
4783
5491
  }
4784
5492
  ) })
4785
5493
  ] })
@@ -4788,7 +5496,7 @@ var collectionSidebar_default = ({
4788
5496
  );
4789
5497
  }
4790
5498
  }
4791
- ) : /* @__PURE__ */ jsx(Flex, { vertical: true, justify: "center", align: "center", className: "height-full", children: /* @__PURE__ */ jsx(Empty, { description: "\u6682\u65E0\u6458\u5F55" }) })
5499
+ ) : /* @__PURE__ */ jsx(Flex, { vertical: true, justify: "center", align: "center", className: "height-full", children: /* @__PURE__ */ jsx(Empty, { description: t2("markdownEditor.collection.empty") }) })
4792
5500
  }
4793
5501
  );
4794
5502
  const container = collectionConfig?.getContainer?.();
@@ -4829,7 +5537,7 @@ var useCollections = (collectionConfig) => {
4829
5537
  }
4830
5538
  editor.current.chain().focus().setMark(COLLECTION_KEY, {
4831
5539
  "collection-id": remoteId,
4832
- "user-name": collectionConfig?.user?.name || "\u672A\u77E5",
5540
+ "user-name": collectionConfig?.user?.name || t("markdownEditor.unknown"),
4833
5541
  "user-id": collectionConfig?.user.id || "0000",
4834
5542
  "update-time": getTimestamp(),
4835
5543
  "page-no": pageIndex
@@ -5378,6 +6086,7 @@ var BlockquoteButton = forwardRef(
5378
6086
  hideWhenUnavailable,
5379
6087
  onToggled
5380
6088
  });
6089
+ const { t: t2 } = useTranslation(NS_COMMON);
5381
6090
  const handleClick = useCallback(
5382
6091
  (event) => {
5383
6092
  onClick?.(event);
@@ -5401,7 +6110,7 @@ var BlockquoteButton = forwardRef(
5401
6110
  "data-disabled": !canToggle3,
5402
6111
  "aria-label": label,
5403
6112
  "aria-pressed": isActive,
5404
- tooltip: "\u5F15\u7528\u5757",
6113
+ tooltip: t2("markdownEditor.toolbar.blockquote"),
5405
6114
  onClick: handleClick,
5406
6115
  ...buttonProps,
5407
6116
  ref,
@@ -5569,7 +6278,7 @@ function useBlockquote(config) {
5569
6278
  isActive,
5570
6279
  handleToggle,
5571
6280
  canToggle: canToggle3,
5572
- label: "\u5F15\u7528\u5757",
6281
+ label: t("markdownEditor.toolbar.blockquote"),
5573
6282
  shortcutKeys: BLOCKQUOTE_SHORTCUT_KEY,
5574
6283
  Icon: BlockquoteIcon
5575
6284
  };
@@ -5604,6 +6313,7 @@ var CodeBlockButton = forwardRef(
5604
6313
  hideWhenUnavailable,
5605
6314
  onToggled
5606
6315
  });
6316
+ const { t: t2 } = useTranslation(NS_COMMON);
5607
6317
  const handleClick = useCallback(
5608
6318
  (event) => {
5609
6319
  onClick?.(event);
@@ -5627,7 +6337,7 @@ var CodeBlockButton = forwardRef(
5627
6337
  tabIndex: -1,
5628
6338
  "aria-label": label,
5629
6339
  "aria-pressed": isActive,
5630
- tooltip: "\u4EE3\u7801\u5757",
6340
+ tooltip: t2("markdownEditor.toolbar.codeBlock"),
5631
6341
  onClick: handleClick,
5632
6342
  ...buttonProps,
5633
6343
  ref,
@@ -5786,7 +6496,7 @@ function useCodeBlock(config) {
5786
6496
  isActive,
5787
6497
  handleToggle,
5788
6498
  canToggle: canToggleState,
5789
- label: "\u4EE3\u7801\u5757",
6499
+ label: t("markdownEditor.toolbar.codeBlock"),
5790
6500
  shortcutKeys: CODE_BLOCK_SHORTCUT_KEY,
5791
6501
  Icon: CodeBlockIcon
5792
6502
  };
@@ -5947,6 +6657,7 @@ var ColorHighlightButton = forwardRef(
5947
6657
  style,
5948
6658
  ...buttonProps
5949
6659
  }, ref) => {
6660
+ const { t: t2 } = useTranslation(NS_COMMON);
5950
6661
  const { editor } = useTiptapEditor(providedEditor);
5951
6662
  const {
5952
6663
  isVisible,
@@ -5958,7 +6669,7 @@ var ColorHighlightButton = forwardRef(
5958
6669
  } = useColorHighlight({
5959
6670
  editor,
5960
6671
  highlightColor,
5961
- label: text || `\u5207\u6362\u9AD8\u4EAE\u663E\u793A (${highlightColor})`,
6672
+ label: text || t2("markdownEditor.highlight.toggle", { color: highlightColor }),
5962
6673
  hideWhenUnavailable,
5963
6674
  mode,
5964
6675
  onApplied
@@ -6017,52 +6728,52 @@ ColorHighlightButton.displayName = "ColorHighlightButton";
6017
6728
  var COLOR_HIGHLIGHT_SHORTCUT_KEY = "mod+shift+h";
6018
6729
  var HIGHLIGHT_COLORS = [
6019
6730
  {
6020
- label: "\u9ED8\u8BA4\u80CC\u666F",
6731
+ labelKey: "markdownEditor.highlight.default",
6021
6732
  value: "var(--tt-bg-color)",
6022
6733
  border: "var(--tt-bg-color-contrast)"
6023
6734
  },
6024
6735
  {
6025
- label: "\u7070\u8272\u80CC\u666F",
6736
+ labelKey: "markdownEditor.highlight.gray",
6026
6737
  value: "var(--tt-color-highlight-gray)",
6027
6738
  border: "var(--tt-color-highlight-gray-contrast)"
6028
6739
  },
6029
6740
  {
6030
- label: "\u68D5\u8272\u80CC\u666F",
6741
+ labelKey: "markdownEditor.highlight.brown",
6031
6742
  value: "var(--tt-color-highlight-brown)",
6032
6743
  border: "var(--tt-color-highlight-brown-contrast)"
6033
6744
  },
6034
6745
  {
6035
- label: "\u6A59\u8272\u80CC\u666F",
6746
+ labelKey: "markdownEditor.highlight.orange",
6036
6747
  value: "var(--tt-color-highlight-orange)",
6037
6748
  border: "var(--tt-color-highlight-orange-contrast)"
6038
6749
  },
6039
6750
  {
6040
- label: "\u9EC4\u8272\u80CC\u666F",
6751
+ labelKey: "markdownEditor.highlight.yellow",
6041
6752
  value: "var(--tt-color-highlight-yellow)",
6042
6753
  border: "var(--tt-color-highlight-yellow-contrast)"
6043
6754
  },
6044
6755
  {
6045
- label: "\u7EFF\u8272\u80CC\u666F",
6756
+ labelKey: "markdownEditor.highlight.green",
6046
6757
  value: "var(--tt-color-highlight-green)",
6047
6758
  border: "var(--tt-color-highlight-green-contrast)"
6048
6759
  },
6049
6760
  {
6050
- label: "\u84DD\u8272\u80CC\u666F",
6761
+ labelKey: "markdownEditor.highlight.blue",
6051
6762
  value: "var(--tt-color-highlight-blue)",
6052
6763
  border: "var(--tt-color-highlight-blue-contrast)"
6053
6764
  },
6054
6765
  {
6055
- label: "\u7D2B\u8272\u80CC\u666F",
6766
+ labelKey: "markdownEditor.highlight.purple",
6056
6767
  value: "var(--tt-color-highlight-purple)",
6057
6768
  border: "var(--tt-color-highlight-purple-contrast)"
6058
6769
  },
6059
6770
  {
6060
- label: "\u7C89\u8272\u80CC\u666F",
6771
+ labelKey: "markdownEditor.highlight.pink",
6061
6772
  value: "var(--tt-color-highlight-pink)",
6062
6773
  border: "var(--tt-color-highlight-pink-contrast)"
6063
6774
  },
6064
6775
  {
6065
- label: "\u7EA2\u8272\u80CC\u666F",
6776
+ labelKey: "markdownEditor.highlight.red",
6066
6777
  value: "var(--tt-color-highlight-red)",
6067
6778
  border: "var(--tt-color-highlight-red-contrast)"
6068
6779
  }
@@ -6188,7 +6899,7 @@ function useColorHighlight(config) {
6188
6899
  const handleRemoveHighlight = useCallback(() => {
6189
6900
  const success = removeHighlight(editor, mode);
6190
6901
  if (success) {
6191
- onApplied?.({ color: "", label: "\u79FB\u9664\u80CC\u666F", mode });
6902
+ onApplied?.({ color: "", label: t("markdownEditor.highlight.removeBackground"), mode });
6192
6903
  }
6193
6904
  return success;
6194
6905
  }, [editor, onApplied, mode]);
@@ -6210,28 +6921,31 @@ function useColorHighlight(config) {
6210
6921
  handleColorHighlight,
6211
6922
  handleRemoveHighlight,
6212
6923
  canColorHighlight: canColorHighlightState,
6213
- label: label || `\u80CC\u666F\u8272`,
6924
+ label: label || t("markdownEditor.highlight.label"),
6214
6925
  shortcutKeys: COLOR_HIGHLIGHT_SHORTCUT_KEY,
6215
6926
  Icon: HighlighterIcon,
6216
6927
  mode
6217
6928
  };
6218
6929
  }
6219
- var ColorHighlightPopoverButton = forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
6220
- Button7,
6221
- {
6222
- type: "button",
6223
- className,
6224
- "data-style": "ghost",
6225
- "data-appearance": "default",
6226
- role: "button",
6227
- tabIndex: -1,
6228
- "aria-label": "\u6587\u672C\u80CC\u666F\u8272",
6229
- tooltip: "\u80CC\u666F\u8272",
6230
- ref,
6231
- ...props,
6232
- children: children ?? /* @__PURE__ */ jsx(HighlighterIcon, { className: "tiptap-button-icon" })
6233
- }
6234
- ));
6930
+ var ColorHighlightPopoverButton = forwardRef(({ className, children, ...props }, ref) => {
6931
+ const { t: t2 } = useTranslation(NS_COMMON);
6932
+ return /* @__PURE__ */ jsx(
6933
+ Button7,
6934
+ {
6935
+ type: "button",
6936
+ className,
6937
+ "data-style": "ghost",
6938
+ "data-appearance": "default",
6939
+ role: "button",
6940
+ tabIndex: -1,
6941
+ "aria-label": t2("markdownEditor.highlight.textLabel"),
6942
+ tooltip: t2("markdownEditor.highlight.label"),
6943
+ ref,
6944
+ ...props,
6945
+ children: children ?? /* @__PURE__ */ jsx(HighlighterIcon, { className: "tiptap-button-icon" })
6946
+ }
6947
+ );
6948
+ });
6235
6949
  ColorHighlightPopoverButton.displayName = "ColorHighlightPopoverButton";
6236
6950
  function ColorHighlightPopoverContent({
6237
6951
  editor,
@@ -6246,9 +6960,10 @@ function ColorHighlightPopoverContent({
6246
6960
  const { handleRemoveHighlight } = useColorHighlight({ editor });
6247
6961
  const isMobile = useIsBreakpoint();
6248
6962
  const containerRef = useRef(null);
6963
+ const { t: t2 } = useTranslation(NS_COMMON);
6249
6964
  const menuItems = useMemo(
6250
- () => [...colors, { label: "\u79FB\u9664\u9AD8\u4EAE", value: "none" }],
6251
- [colors]
6965
+ () => [...colors.map((c) => ({ ...c, label: t2(c.labelKey) })), { label: t2("markdownEditor.highlight.removeHighlight"), value: "none" }],
6966
+ [colors, t2]
6252
6967
  );
6253
6968
  const { selectedIndex } = useMenuNavigation({
6254
6969
  containerRef,
@@ -6277,8 +6992,8 @@ function ColorHighlightPopoverContent({
6277
6992
  {
6278
6993
  editor,
6279
6994
  highlightColor: color.value,
6280
- tooltip: color.label,
6281
- "aria-label": `${color.label} highlight color`,
6995
+ tooltip: t2(color.labelKey),
6996
+ "aria-label": `${t2(color.labelKey)} highlight color`,
6282
6997
  tabIndex: index === selectedIndex ? 0 : -1,
6283
6998
  "data-highlighted": selectedIndex === index
6284
6999
  },
@@ -6289,8 +7004,8 @@ function ColorHighlightPopoverContent({
6289
7004
  Button7,
6290
7005
  {
6291
7006
  onClick: handleRemoveHighlight,
6292
- "aria-label": "\u79FB\u9664\u80CC\u666F",
6293
- tooltip: "\u79FB\u9664\u80CC\u666F",
7007
+ "aria-label": t2("markdownEditor.highlight.removeBackground"),
7008
+ tooltip: t2("markdownEditor.highlight.removeBackground"),
6294
7009
  tabIndex: selectedIndex === colors.length ? 0 : -1,
6295
7010
  type: "button",
6296
7011
  role: "menuitem",
@@ -6316,6 +7031,7 @@ function ColorHighlightPopover({
6316
7031
  onApplied,
6317
7032
  ...props
6318
7033
  }) {
7034
+ const { t: t2 } = useTranslation(NS_COMMON);
6319
7035
  const { editor } = useTiptapEditor(providedEditor);
6320
7036
  const [isOpen, setIsOpen] = useState(false);
6321
7037
  const { isVisible, canColorHighlight: canColorHighlight2, isActive, label, Icon } = useColorHighlight({
@@ -6338,7 +7054,7 @@ function ColorHighlightPopover({
6338
7054
  children: /* @__PURE__ */ jsx(Icon, { className: "tiptap-button-icon" })
6339
7055
  }
6340
7056
  ) }),
6341
- /* @__PURE__ */ jsx(PopoverContent, { "aria-label": "\u80CC\u666F\u8272", children: /* @__PURE__ */ jsx(ColorHighlightPopoverContent, { editor, colors }) })
7057
+ /* @__PURE__ */ jsx(PopoverContent, { "aria-label": t2("markdownEditor.highlight.label"), children: /* @__PURE__ */ jsx(ColorHighlightPopoverContent, { editor, colors }) })
6342
7058
  ] });
6343
7059
  }
6344
7060
  var ChevronDownIcon = memo(({ className, ...props }) => {
@@ -6821,6 +7537,7 @@ var HeadingDropdownMenu = forwardRef(
6821
7537
  }, ref) => {
6822
7538
  const { editor } = useTiptapEditor(providedEditor);
6823
7539
  const [isOpen, setIsOpen] = useState(false);
7540
+ const { t: t2 } = useTranslation(NS_COMMON);
6824
7541
  const { isVisible, isActive, canToggle: canToggle3, Icon } = useHeadingDropdownMenu({
6825
7542
  editor,
6826
7543
  levels,
@@ -6850,7 +7567,7 @@ var HeadingDropdownMenu = forwardRef(
6850
7567
  "data-disabled": !canToggle3,
6851
7568
  "aria-label": "Format text as heading",
6852
7569
  "aria-pressed": isActive,
6853
- tooltip: "\u6807\u9898",
7570
+ tooltip: t2("markdownEditor.toolbar.heading"),
6854
7571
  ...buttonProps,
6855
7572
  ref,
6856
7573
  children: [
@@ -6864,10 +7581,10 @@ var HeadingDropdownMenu = forwardRef(
6864
7581
  {
6865
7582
  editor,
6866
7583
  level,
6867
- text: `\u6807\u9898 ${level}`,
7584
+ text: t2("markdownEditor.toolbar.headingLevel", { level }),
6868
7585
  showTooltip: false
6869
7586
  }
6870
- ) }, `\u6807\u9898 ${level}`)) }) }) }) })
7587
+ ) }, level)) }) }) }) })
6871
7588
  ] });
6872
7589
  }
6873
7590
  );
@@ -6930,7 +7647,7 @@ function useHeadingDropdownMenu(config) {
6930
7647
  isActive,
6931
7648
  canToggle: canToggleState,
6932
7649
  levels,
6933
- label: "\u6807\u9898",
7650
+ label: t("markdownEditor.toolbar.heading"),
6934
7651
  Icon: activeLevel ? headingIcons[activeLevel] : HeadingIcon
6935
7652
  };
6936
7653
  }
@@ -7056,6 +7773,7 @@ function InputGroup({
7056
7773
  }
7057
7774
  var LinkButton = forwardRef(
7058
7775
  ({ className, children, ...props }, ref) => {
7776
+ const { t: t2 } = useTranslation(NS_COMMON);
7059
7777
  return /* @__PURE__ */ jsx(
7060
7778
  Button7,
7061
7779
  {
@@ -7064,8 +7782,8 @@ var LinkButton = forwardRef(
7064
7782
  "data-style": "ghost",
7065
7783
  role: "button",
7066
7784
  tabIndex: -1,
7067
- "aria-label": "\u94FE\u63A5",
7068
- tooltip: "\u94FE\u63A5",
7785
+ "aria-label": t2("markdownEditor.toolbar.link"),
7786
+ tooltip: t2("markdownEditor.toolbar.link"),
7069
7787
  ref,
7070
7788
  ...props,
7071
7789
  children: children || /* @__PURE__ */ jsx(LinkIcon, { className: "tiptap-button-icon" })
@@ -7083,6 +7801,7 @@ var LinkMain = ({
7083
7801
  isActive
7084
7802
  }) => {
7085
7803
  const isMobile = useIsBreakpoint();
7804
+ const { t: t2 } = useTranslation(NS_COMMON);
7086
7805
  const handleKeyDown = (event) => {
7087
7806
  if (event.key === "Enter") {
7088
7807
  event.preventDefault();
@@ -7106,7 +7825,7 @@ var LinkMain = ({
7106
7825
  Input4,
7107
7826
  {
7108
7827
  type: "url",
7109
- placeholder: "\u7C98\u8D34\u94FE\u63A5...",
7828
+ placeholder: t2("markdownEditor.toolbar.linkPlaceholder"),
7110
7829
  value: url,
7111
7830
  onChange: (e) => setUrl(e.target.value),
7112
7831
  onKeyDown: handleKeyDown,
@@ -7121,7 +7840,7 @@ var LinkMain = ({
7121
7840
  {
7122
7841
  type: "button",
7123
7842
  onClick: setLink,
7124
- title: "\u5E94\u7528\u94FE\u63A5",
7843
+ title: t2("markdownEditor.toolbar.applyLink"),
7125
7844
  disabled: !url && !isActive,
7126
7845
  "data-style": "ghost",
7127
7846
  children: /* @__PURE__ */ jsx(CornerDownLeftIcon, { className: "tiptap-button-icon" })
@@ -7134,7 +7853,7 @@ var LinkMain = ({
7134
7853
  {
7135
7854
  type: "button",
7136
7855
  onClick: openLink,
7137
- title: "\u5728\u65B0\u7A97\u53E3\u4E2D\u6253\u5F00",
7856
+ title: t2("markdownEditor.toolbar.openInNewWindow"),
7138
7857
  disabled: !url && !isActive,
7139
7858
  "data-style": "ghost",
7140
7859
  children: /* @__PURE__ */ jsx(ExternalLinkIcon, { className: "tiptap-button-icon" })
@@ -7145,7 +7864,7 @@ var LinkMain = ({
7145
7864
  {
7146
7865
  type: "button",
7147
7866
  onClick: removeLink,
7148
- title: "\u79FB\u9664\u94FE\u63A5",
7867
+ title: t2("markdownEditor.toolbar.removeLink"),
7149
7868
  disabled: !url && !isActive,
7150
7869
  "data-style": "ghost",
7151
7870
  children: /* @__PURE__ */ jsx(TrashIcon, { className: "tiptap-button-icon" })
@@ -7659,10 +8378,10 @@ var listIcons = {
7659
8378
  orderedList: ListOrderedIcon,
7660
8379
  taskList: ListTodoIcon
7661
8380
  };
7662
- var listLabels = {
7663
- bulletList: "\u65E0\u5E8F\u5217\u8868",
7664
- orderedList: "\u6709\u5E8F\u5217\u8868",
7665
- taskList: "\u4EFB\u52A1\u5217\u8868"
8381
+ var listLabelKeys = {
8382
+ bulletList: "markdownEditor.toolbar.bulletList",
8383
+ orderedList: "markdownEditor.toolbar.orderedList",
8384
+ taskList: "markdownEditor.toolbar.taskList"
7666
8385
  };
7667
8386
  var LIST_SHORTCUT_KEYS = {
7668
8387
  bulletList: "mod+shift+8",
@@ -7809,24 +8528,24 @@ function useList(config) {
7809
8528
  isActive,
7810
8529
  handleToggle,
7811
8530
  canToggle: canToggle3,
7812
- label: listLabels[type],
8531
+ label: t(listLabelKeys[type]),
7813
8532
  shortcutKeys: LIST_SHORTCUT_KEYS[type],
7814
8533
  Icon: listIcons[type]
7815
8534
  };
7816
8535
  }
7817
8536
  var listOptions = [
7818
8537
  {
7819
- label: "\u65E0\u5E8F\u5217\u8868",
8538
+ labelKey: "markdownEditor.toolbar.bulletList",
7820
8539
  type: "bulletList",
7821
8540
  icon: ListIcon
7822
8541
  },
7823
8542
  {
7824
- label: "\u6709\u5E8F\u5217\u8868",
8543
+ labelKey: "markdownEditor.toolbar.orderedList",
7825
8544
  type: "orderedList",
7826
8545
  icon: ListOrderedIcon
7827
8546
  },
7828
8547
  {
7829
- label: "\u4EFB\u52A1\u5217\u8868",
8548
+ labelKey: "markdownEditor.toolbar.taskList",
7830
8549
  type: "taskList",
7831
8550
  icon: ListTodoIcon
7832
8551
  }
@@ -7867,7 +8586,13 @@ function useListDropdownMenu(config) {
7867
8586
  const { editor } = useTiptapEditor(providedEditor);
7868
8587
  const [isVisible, setIsVisible] = useState(true);
7869
8588
  const listInSchema = types.some((type) => isNodeInSchema(type, editor));
7870
- const filteredLists = useMemo(() => getFilteredListOptions(types), [types]);
8589
+ const filteredLists = useMemo(
8590
+ () => getFilteredListOptions(types).map((option) => ({
8591
+ ...option,
8592
+ label: t(option.labelKey)
8593
+ })),
8594
+ [types]
8595
+ );
7871
8596
  const canToggleAny = canToggleAnyList(editor, types);
7872
8597
  const isAnyActive = isAnyListActive(editor, types);
7873
8598
  const activeType = getActiveListType(editor, types);
@@ -7897,7 +8622,7 @@ function useListDropdownMenu(config) {
7897
8622
  canToggle: canToggleAny,
7898
8623
  types,
7899
8624
  filteredLists,
7900
- label: "List",
8625
+ label: t("markdownEditor.toolbar.list"),
7901
8626
  Icon: activeList ? listIcons[activeList.type] : ListIcon
7902
8627
  };
7903
8628
  }
@@ -7911,6 +8636,7 @@ function ListDropdownMenu({
7911
8636
  }) {
7912
8637
  const { editor } = useTiptapEditor(providedEditor);
7913
8638
  const [isOpen, setIsOpen] = useState(false);
8639
+ const { t: t2 } = useTranslation(NS_COMMON);
7914
8640
  const { filteredLists, canToggle: canToggle3, isActive, isVisible, Icon } = useListDropdownMenu({
7915
8641
  editor,
7916
8642
  types,
@@ -7937,8 +8663,8 @@ function ListDropdownMenu({
7937
8663
  tabIndex: -1,
7938
8664
  disabled: !canToggle3,
7939
8665
  "data-disabled": !canToggle3,
7940
- "aria-label": "\u5217\u8868\u9009\u9879",
7941
- tooltip: "\u5217\u8868",
8666
+ "aria-label": t2("markdownEditor.toolbar.listOptions"),
8667
+ tooltip: t2("markdownEditor.toolbar.list"),
7942
8668
  ...props,
7943
8669
  children: [
7944
8670
  /* @__PURE__ */ jsx(Icon, { className: "tiptap-button-icon" }),
@@ -8274,14 +9000,14 @@ var MARK_SHORTCUT_KEYS = {
8274
9000
  superscript: "mod+.",
8275
9001
  subscript: "mod+,"
8276
9002
  };
8277
- var MARK_ACTION_LABELS = {
8278
- bold: "\u7C97\u4F53",
8279
- italic: "\u659C\u4F53",
8280
- underline: "\u4E0B\u5212\u7EBF",
8281
- strike: "\u5220\u9664\u7EBF",
8282
- code: "\u4EE3\u7801",
8283
- superscript: "\u4E0A\u89D2\u6807",
8284
- subscript: "\u4E0B\u89D2\u6807"
9003
+ var MARK_ACTION_LABEL_KEYS = {
9004
+ bold: "markdownEditor.toolbar.bold",
9005
+ italic: "markdownEditor.toolbar.italic",
9006
+ underline: "markdownEditor.toolbar.underline",
9007
+ strike: "markdownEditor.toolbar.strike",
9008
+ code: "markdownEditor.toolbar.code",
9009
+ superscript: "markdownEditor.toolbar.superscript",
9010
+ subscript: "markdownEditor.toolbar.subscript"
8285
9011
  };
8286
9012
  function canToggleMark(editor, type) {
8287
9013
  if (!editor || !editor.isEditable) return false;
@@ -8308,7 +9034,8 @@ function shouldShowButton6(props) {
8308
9034
  return true;
8309
9035
  }
8310
9036
  function getFormattedMarkName(type) {
8311
- return MARK_ACTION_LABELS[type] || type.charAt(0).toUpperCase() + type.slice(1);
9037
+ const labelKey = MARK_ACTION_LABEL_KEYS[type];
9038
+ return labelKey ? t(labelKey) : type.charAt(0).toUpperCase() + type.slice(1);
8312
9039
  }
8313
9040
  function useMark(config) {
8314
9041
  const {
@@ -8618,11 +9345,11 @@ var textAlignIcons = {
8618
9345
  right: AlignRightIcon,
8619
9346
  justify: AlignJustifyIcon
8620
9347
  };
8621
- var textAlignLabels = {
8622
- left: "\u5DE6\u5BF9\u9F50",
8623
- center: "\u5C45\u4E2D\u5BF9\u9F50",
8624
- right: "\u53F3\u5BF9\u9F50",
8625
- justify: "\u4E24\u7AEF\u5BF9\u9F50"
9348
+ var textAlignLabelKeys = {
9349
+ left: "markdownEditor.toolbar.alignLeft",
9350
+ center: "markdownEditor.toolbar.alignCenter",
9351
+ right: "markdownEditor.toolbar.alignRight",
9352
+ justify: "markdownEditor.toolbar.alignJustify"
8626
9353
  };
8627
9354
  function canSetTextAlign(editor, align) {
8628
9355
  if (!editor || !editor.isEditable) return false;
@@ -8690,7 +9417,7 @@ function useTextAlign(config) {
8690
9417
  isActive,
8691
9418
  handleTextAlign,
8692
9419
  canAlign,
8693
- label: textAlignLabels[align],
9420
+ label: t(textAlignLabelKeys[align]),
8694
9421
  shortcutKeys: TEXT_ALIGN_SHORTCUT_KEYS[align],
8695
9422
  Icon: textAlignIcons[align]
8696
9423
  };
@@ -8815,9 +9542,9 @@ var UNDO_REDO_SHORTCUT_KEYS = {
8815
9542
  undo: "mod+z",
8816
9543
  redo: "mod+shift+z"
8817
9544
  };
8818
- var historyActionLabels = {
8819
- undo: "\u64A4\u9500",
8820
- redo: "\u91CD\u505A"
9545
+ var historyActionLabelKeys = {
9546
+ undo: "markdownEditor.toolbar.undo",
9547
+ redo: "markdownEditor.toolbar.redo"
8821
9548
  };
8822
9549
  var historyIcons = {
8823
9550
  undo: Undo2Icon,
@@ -8875,7 +9602,7 @@ function useUndoRedo(config) {
8875
9602
  isVisible,
8876
9603
  handleAction,
8877
9604
  canExecute,
8878
- label: historyActionLabels[action],
9605
+ label: t(historyActionLabelKeys[action]),
8879
9606
  shortcutKeys: UNDO_REDO_SHORTCUT_KEYS[action],
8880
9607
  Icon: historyIcons[action]
8881
9608
  };
@@ -9138,6 +9865,7 @@ var MainToolbarContent = ({
9138
9865
  isMobile,
9139
9866
  isBubble
9140
9867
  }) => {
9868
+ const { t: t2 } = useTranslation(NS_COMMON);
9141
9869
  return /* @__PURE__ */ jsxs(Fragment, { children: [
9142
9870
  /* @__PURE__ */ jsx(Spacer, {}),
9143
9871
  !isBubble && tools.includes("undo-redo") && /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -9147,9 +9875,9 @@ var MainToolbarContent = ({
9147
9875
  ] }),
9148
9876
  /* @__PURE__ */ jsx(ToolbarSeparator, {})
9149
9877
  ] }),
9150
- onQuote && /* @__PURE__ */ jsx(ToolbarGroup, { children: /* @__PURE__ */ jsx(SelectButton, { icon: /* @__PURE__ */ jsx(QuoteIcon, {}), tooltip: "\u5F15\u7528\u9009\u4E2D\u6587\u672C", onClick: onQuote, children: "\u5F15\u7528" }) }),
9151
- onCreateAnnotation && /* @__PURE__ */ jsx(ToolbarGroup, { children: /* @__PURE__ */ jsx(SelectButton, { icon: /* @__PURE__ */ jsx(MessageOutlined, {}), tooltip: "\u6279\u6CE8", onClick: onCreateAnnotation, children: "\u6279\u6CE8" }) }),
9152
- onCreateCollection && /* @__PURE__ */ jsx(ToolbarGroup, { children: /* @__PURE__ */ jsx(SelectButton, { icon: /* @__PURE__ */ jsx(BookOutlined, {}), tooltip: "\u6458\u5F55\u7B14\u8BB0", onClick: onCreateCollection, children: "\u6458\u5F55" }) }),
9878
+ onQuote && /* @__PURE__ */ jsx(ToolbarGroup, { children: /* @__PURE__ */ jsx(SelectButton, { icon: /* @__PURE__ */ jsx(QuoteIcon, {}), tooltip: t2("markdownEditor.toolbar.quote"), onClick: onQuote, children: t2("markdownEditor.toolbar.quote") }) }),
9879
+ onCreateAnnotation && /* @__PURE__ */ jsx(ToolbarGroup, { children: /* @__PURE__ */ jsx(SelectButton, { icon: /* @__PURE__ */ jsx(MessageOutlined, {}), tooltip: t2("markdownEditor.toolbar.annotation"), onClick: onCreateAnnotation, children: t2("markdownEditor.toolbar.annotation") }) }),
9880
+ onCreateCollection && /* @__PURE__ */ jsx(ToolbarGroup, { children: /* @__PURE__ */ jsx(SelectButton, { icon: /* @__PURE__ */ jsx(BookOutlined, {}), tooltip: t2("markdownEditor.toolbar.excerpt"), onClick: onCreateCollection, children: t2("markdownEditor.toolbar.excerpt") }) }),
9153
9881
  (tools.includes("heading") || tools.includes("list") || tools.includes("block")) && /* @__PURE__ */ jsxs(Fragment, { children: [
9154
9882
  /* @__PURE__ */ jsxs(ToolbarGroup, { children: [
9155
9883
  tools.includes("heading") && /* @__PURE__ */ jsx(HeadingDropdownMenu, { levels: [1, 2, 3, 4], portal: isMobile }),
@@ -9390,9 +10118,9 @@ var SearchAndReplace = Extension.create({
9390
10118
  addProseMirrorPlugins() {
9391
10119
  const editor = this.editor;
9392
10120
  const { searchResultClass, disableRegex } = this.options;
9393
- const setLastSearchTerm = (t) => editor.storage.searchAndReplace.lastSearchTerm = t;
9394
- const setLastCaseSensitive = (t) => editor.storage.searchAndReplace.lastCaseSensitive = t;
9395
- const setLastResultIndex = (t) => editor.storage.searchAndReplace.lastResultIndex = t;
10121
+ const setLastSearchTerm = (t2) => editor.storage.searchAndReplace.lastSearchTerm = t2;
10122
+ const setLastCaseSensitive = (t2) => editor.storage.searchAndReplace.lastCaseSensitive = t2;
10123
+ const setLastResultIndex = (t2) => editor.storage.searchAndReplace.lastResultIndex = t2;
9396
10124
  return [
9397
10125
  new Plugin({
9398
10126
  key: searchAndReplacePluginKey,
@@ -9493,6 +10221,7 @@ var MarkdownEditor_default = forwardRef(
9493
10221
  collectionConfig,
9494
10222
  pageNoConfig
9495
10223
  }, ref) => {
10224
+ const { t: t2 } = useTranslation(NS_COMMON);
9496
10225
  const isMobile = useIsBreakpoint();
9497
10226
  const lastContentRef = useRef("");
9498
10227
  const { setPageNoEditor, onPageChange } = usePageNo(pageNoConfig);
@@ -9529,7 +10258,7 @@ var MarkdownEditor_default = forwardRef(
9529
10258
  autocomplete: "off",
9530
10259
  autocorrect: "off",
9531
10260
  autocapitalize: "off",
9532
- "aria-label": "\u4E3B\u5185\u5BB9\u533A\u57DF\uFF0C\u5F00\u59CB\u8F93\u5165\u6587\u672C..."
10261
+ "aria-label": t2("markdownEditor.mainArea")
9533
10262
  }
9534
10263
  },
9535
10264
  extensions: [
@@ -9690,7 +10419,7 @@ var MarkdownEditor_default = forwardRef(
9690
10419
  Button,
9691
10420
  {
9692
10421
  size: "small",
9693
- title: "\u6279\u6CE8\u5217\u8868",
10422
+ title: t2("markdownEditor.annotation.list"),
9694
10423
  icon: /* @__PURE__ */ jsx(MessageOutlined, {}),
9695
10424
  color: "primary",
9696
10425
  variant: "text",
@@ -9702,15 +10431,15 @@ var MarkdownEditor_default = forwardRef(
9702
10431
  {
9703
10432
  style: { gap: "2px" },
9704
10433
  size: "small",
9705
- title: "\u6458\u5F55\u5217\u8868",
10434
+ title: t2("markdownEditor.collection.list"),
9706
10435
  icon: /* @__PURE__ */ jsx(BookOutlined, {}),
9707
10436
  color: "primary",
9708
10437
  variant: "text",
9709
10438
  onClick: () => setShowCollection(!showCollection),
9710
- children: "\u6458\u5F55"
10439
+ children: t2("markdownEditor.collection.title")
9711
10440
  }
9712
10441
  ),
9713
- onDownloadFile && /* @__PURE__ */ jsx(Button, { size: "small", color: "primary", variant: "text", onClick: downloadFile2, children: "\u4E0B\u8F7D" }),
10442
+ onDownloadFile && /* @__PURE__ */ jsx(Button, { size: "small", color: "primary", variant: "text", onClick: downloadFile2, children: t2("common.download") }),
9714
10443
  extraNav
9715
10444
  ] })
9716
10445
  ] }),
@@ -9867,6 +10596,6 @@ var UserAvatar_default = ({ size, avatarSrc, userName }) => {
9867
10596
  return avatarSrc ? /* @__PURE__ */ jsx(Avatar, { size, src: avatarSrc }) : /* @__PURE__ */ jsx(Avatar, { size, className: "cursor-pointer", style: { backgroundColor: "var(--ant-color-primary)" }, children: userName?.slice(0, 1)?.toLocaleUpperCase() });
9868
10597
  };
9869
10598
 
9870
- export { AudioPlayer_default as AudioPlayer, BusinessCode, DEFAULT_DATE_FORMAT, DEFAULT_DATE_TIME_FORMAT, DEFAULT_YEAR_MONTH_DAY_FORMAT, DEFAULT_YEAR_MONTH_FORMAT, DocxPreview_default as DocxPreview, FileIcon_default as FileIcon, FilePreview_default as FilePreview, FilePreviewDrawer_default as FilePreviewDrawer, HttpStatus, Iframe_default as Iframe, LazyComponent_default as LazyComponent, luyaFilePreview_default as LuyaFilePreview, MarkDrawing_default as MarkDrawing, MarkdownEditor_default as MarkdownEditor, MarkdownPreview_default as MarkdownPreview, MicroApp_default as MicroApp, Drawer_default as MicroAppDrawer, Window_default as MicroAppWindow, MultiEmailValidator, PdfImagePreview_default as PdfImagePreview, PdfPreview_default as PdfPreview, PhoneOrMobileValidator, RegBankCardNo, RegDetailAddress, RegEmail, RegFixedTelePhone, RegIdentityCardNo, RegMobile, RegNumNo, RegPassword, RegSmsCode, RegTaxNo, RegTelePhone, RenderMarkdown_default as RenderMarkdown, RenderWrapper_default as RenderWrapper, ThanNumLengthValidator, ThanNumValidator, UserAvatar_default as UserAvatar, VideoPlayer_default as VideoPlayer, absVal, addUrlLastSlash, aesDecrypt, aesEncrypt, arrToObj, buildUrlParams, cachedMessage, calculate, compareNum, convertCurrency, convertNewlineToBr, copyText, createRequest, createSecureManager, createTokenManager, decimalPlaces, deepCopy, deepEqual, deepMerge, dividedBy, downloadFile, emit, emitToChild, executeScript, findTreeNodesByIds, formatDate, formatNumberWithCommas, formatSize, genNonDuplicateID, generateRandomNumbers, getAllUrlParams, getDeviceId, getEndOfTimestamp, getFileName, getFileSuffixName, getRowSpanCount, getStartOfTimestamp, getTimestamp, getWebSocketUrl, htmlToMarkdown, htmlToText, importThirdPartyFile, is, isArray, isBlob, isBoolean, isDate, isDef, isElement, isEmpty, isEmptyObj, isExpire, isExternal, isFunction, isInteger, isJson, isLocalhost, isMap, isNegative, isNull, isNullOrUnDef, isNumber, isNumberNoNaN, isObject, isPromise, isReferenceType, isRegExp, isScriptSafe, isSet, isString, isUnDef, isWindow, markdownToText, minus, objToOptions, plus, precision, processItemList, propsMerge, safeParseJson, setInterval2 as setInterval, setUrlMainSource, shouldRender, times, toFixed, transform, transforms, useAsyncQueue_default as useAsyncQueue, useAutoRefresh_default as useAutoRefresh, useCountDown_default as useCountDown, useCreateValtioContext_default as useCreateValtioContext, useDebounce_default as useDebounce, useDeepEffect_default as useDeepEffect, useIframeRelayBridge_default as useIframeRelayBridge, useRefState_default as useRefState, useSyncInput_default as useSyncInput, useThrottle_default as useThrottle, useWebSocket_default as useWebSocket };
10599
+ export { AudioPlayer_default as AudioPlayer, BusinessCode, DEFAULT_DATE_FORMAT, DEFAULT_DATE_TIME_FORMAT, DEFAULT_YEAR_MONTH_DAY_FORMAT, DEFAULT_YEAR_MONTH_FORMAT, DocxPreview_default as DocxPreview, FileIcon_default as FileIcon, FilePreview_default as FilePreview, FilePreviewDrawer_default as FilePreviewDrawer, HttpStatus, Iframe_default as Iframe, LANG_KEY, LazyComponent_default as LazyComponent, LocaleProvider, luyaFilePreview_default as LuyaFilePreview, MarkDrawing_default as MarkDrawing, MarkdownEditor_default as MarkdownEditor, MarkdownPreview_default as MarkdownPreview, MicroApp_default as MicroApp, Drawer_default as MicroAppDrawer, Window_default as MicroAppWindow, MultiEmailValidator, NS_COMMON, PdfImagePreview_default as PdfImagePreview, PdfPreview_default as PdfPreview, PhoneOrMobileValidator, RegBankCardNo, RegDetailAddress, RegEmail, RegFixedTelePhone, RegIdentityCardNo, RegMobile, RegNumNo, RegPassword, RegSmsCode, RegTaxNo, RegTelePhone, RenderMarkdown_default as RenderMarkdown, RenderWrapper_default as RenderWrapper, ThanNumLengthValidator, ThanNumValidator, UserAvatar_default as UserAvatar, VideoPlayer_default as VideoPlayer, absVal, addBundledResource, addUrlLastSlash, aesDecrypt, aesEncrypt, arrToObj, buildUrlParams, cachedMessage, calculate, commonEnUS, commonJaJP, commonZhCN, compareNum, convertCurrency, convertNewlineToBr, copyText, createRequest, createSecureManager, createTokenManager, decimalPlaces, deepCopy, deepEqual, deepMerge, dividedBy, downloadFile, emit, emitToChild, executeScript, findTreeNodesByIds, formatDate, formatNumberWithCommas, formatSize, genNonDuplicateID, generateRandomNumbers, getAllUrlParams, getDeviceId, getEndOfTimestamp, getFileName, getFileSuffixName, getI18n, getLang, getRowSpanCount, getStartOfTimestamp, getTimestamp, getWebSocketUrl, htmlToMarkdown, htmlToText, importThirdPartyFile, initI18n, is, isArray, isBlob, isBoolean, isDate, isDef, isElement, isEmpty, isEmptyObj, isExpire, isExternal, isFunction, isInteger, isJson, isLocalhost, isMap, isNegative, isNull, isNullOrUnDef, isNumber, isNumberNoNaN, isObject, isPromise, isReferenceType, isRegExp, isScriptSafe, isSet, isString, isUnDef, isWindow, markdownToText, minus, objToOptions, plus, precision, processItemList, propsMerge, safeParseJson, setInterval2 as setInterval, setUrlMainSource, shouldRender, switchLang, t, times, toFixed, transform, transforms, useAsyncQueue_default as useAsyncQueue, useAutoRefresh_default as useAutoRefresh, useCountDown_default as useCountDown, useCreateValtioContext_default as useCreateValtioContext, useDebounce_default as useDebounce, useDeepEffect_default as useDeepEffect, useIframeRelayBridge_default as useIframeRelayBridge, useRefState_default as useRefState, useSyncInput_default as useSyncInput, useThrottle_default as useThrottle, useTranslation, useWebSocket_default as useWebSocket };
9871
10600
  //# sourceMappingURL=index.esm.js.map
9872
10601
  //# sourceMappingURL=index.esm.js.map