@zero-library/common 3.1.7 → 3.2.1

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,722 @@ 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
+ htmlPreviewTitle: "HTML \u9884\u89C8",
1332
+ previewImageAlt: "\u9884\u89C8\u56FE\u7247",
1333
+ previewNotSupported: "\u6682\u4E0D\u652F\u6301 {{suffix}} \u6587\u4EF6\u7684\u9884\u89C8",
1334
+ previewNotSupportedDownload: "{{suffix}} \u6587\u4EF6\u6682\u4E0D\u652F\u6301\u5728\u7EBF\u9884\u89C8\uFF0C\u8BF7\u4E0B\u8F7D\u6253\u5F00",
1335
+ previewGenerating: "\u9884\u89C8\u6587\u4EF6\u6B63\u5728\u751F\u6210\u4E2D...",
1336
+ audioNotSupported: "\u60A8\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 audio \u6807\u7B7E\u3002",
1337
+ videoNotSupported: "\u60A8\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 video \u6807\u7B7E\u3002",
1338
+ requestFailedWithStatus: "\u8BF7\u6C42\u5931\u8D25\uFF0C\u72B6\u6001\u7801: {{status}}",
1339
+ emptyResponse: "\u8FD4\u56DE\u5185\u5BB9\u4E3A\u7A7A",
1340
+ loadFileFailed: "\u52A0\u8F7D\u6587\u4EF6\u5931\u8D25",
1341
+ fileParseFailed: "\u52A0\u8F7D\u6216\u89E3\u6790\u6587\u4EF6\u5931\u8D25",
1342
+ fileUrlInvalid: "\u6587\u4EF6\u5730\u5740\u9519\u8BEF",
1343
+ htmlParseFailed: "\u52A0\u8F7D\u6216\u89E3\u6790 HTML \u5931\u8D25",
1344
+ docLoadFailed: "\u6587\u6863\u52A0\u8F7D\u5931\u8D25",
1345
+ pdfLoadFailed: "PDF \u52A0\u8F7D\u5931\u8D25",
1346
+ pdfParseFailed: "\u52A0\u8F7D\u6216\u89E3\u6790 pdf \u5931\u8D25",
1347
+ pdfUrlInvalid: "pdf\u5730\u5740\u9519\u8BEF",
1348
+ pdfPasswordInvalid: "\u5BC6\u7801\u65E0\u6548\u3002\u8BF7\u518D\u8BD5\u4E00\u6B21\uFF01",
1349
+ pdfPasswordPlaceholder: "\u8BF7\u8F93\u5165\u5BC6\u7801",
1350
+ pdfSubmit: "\u63D0 \u4EA4",
1351
+ pdfInvalidOrDamaged: "\u6587\u4EF6\u65E0\u6548\u6216\u5DF2\u635F\u574F",
1352
+ pdfFileNotFound: "\u6587\u4EF6\u4E0D\u5B58\u5728",
1353
+ pdfUnexpectedResponse: "\u610F\u5916\u7684\u670D\u52A1\u5668\u54CD\u5E94",
1354
+ pdfLoadDocumentFailed: "\u65E0\u6CD5\u52A0\u8F7D\u6587\u6863",
1355
+ zoomOut: "\u7F29\u5C0F",
1356
+ zoomIn: "\u653E\u5927",
1357
+ zoomReset: "\u8FD8\u539F",
1358
+ fitWidth: "\u9002\u5E94\u5BBD\u5EA6"
1359
+ },
1360
+ // MarkdownEditor 富文本编辑器
1361
+ markdownEditor: {
1362
+ mainArea: "\u4E3B\u5185\u5BB9\u533A\u57DF\uFF0C\u5F00\u59CB\u8F93\u5165\u6587\u672C...",
1363
+ unknown: "\u672A\u77E5",
1364
+ // 工具栏
1365
+ toolbar: {
1366
+ toolbarAria: "\u7F16\u8F91\u5668\u5DE5\u5177\u680F",
1367
+ quote: "\u5F15\u7528\u9009\u4E2D\u6587\u672C",
1368
+ annotation: "\u6279\u6CE8",
1369
+ excerpt: "\u6458\u5F55\u7B14\u8BB0",
1370
+ undo: "\u64A4\u9500",
1371
+ redo: "\u91CD\u505A",
1372
+ alignLeft: "\u5DE6\u5BF9\u9F50",
1373
+ alignCenter: "\u5C45\u4E2D\u5BF9\u9F50",
1374
+ alignRight: "\u53F3\u5BF9\u9F50",
1375
+ alignJustify: "\u4E24\u7AEF\u5BF9\u9F50",
1376
+ bold: "\u7C97\u4F53",
1377
+ italic: "\u659C\u4F53",
1378
+ underline: "\u4E0B\u5212\u7EBF",
1379
+ strike: "\u5220\u9664\u7EBF",
1380
+ code: "\u4EE3\u7801",
1381
+ superscript: "\u4E0A\u89D2\u6807",
1382
+ subscript: "\u4E0B\u89D2\u6807",
1383
+ bulletList: "\u65E0\u5E8F\u5217\u8868",
1384
+ orderedList: "\u6709\u5E8F\u5217\u8868",
1385
+ taskList: "\u4EFB\u52A1\u5217\u8868",
1386
+ listOptions: "\u5217\u8868\u9009\u9879",
1387
+ list: "\u5217\u8868",
1388
+ blockquote: "\u5F15\u7528\u5757",
1389
+ codeBlock: "\u4EE3\u7801\u5757",
1390
+ heading: "\u6807\u9898",
1391
+ headingLevel: "\u6807\u9898 {{level}}",
1392
+ addImage: "\u6DFB\u52A0\u56FE\u7247",
1393
+ link: "\u94FE\u63A5",
1394
+ linkPlaceholder: "\u7C98\u8D34\u94FE\u63A5...",
1395
+ applyLink: "\u5E94\u7528\u94FE\u63A5",
1396
+ openInNewWindow: "\u5728\u65B0\u7A97\u53E3\u4E2D\u6253\u5F00",
1397
+ removeLink: "\u79FB\u9664\u94FE\u63A5"
1398
+ },
1399
+ // 高亮 / 背景色
1400
+ highlight: {
1401
+ toggle: "\u5207\u6362\u9AD8\u4EAE\u663E\u793A ({{color}})",
1402
+ label: "\u80CC\u666F\u8272",
1403
+ textLabel: "\u6587\u672C\u80CC\u666F\u8272",
1404
+ colorOptionAria: "{{label}} \u9AD8\u4EAE\u989C\u8272",
1405
+ removeBackground: "\u79FB\u9664\u80CC\u666F",
1406
+ removeHighlight: "\u79FB\u9664\u9AD8\u4EAE",
1407
+ default: "\u9ED8\u8BA4\u80CC\u666F",
1408
+ gray: "\u7070\u8272\u80CC\u666F",
1409
+ brown: "\u68D5\u8272\u80CC\u666F",
1410
+ orange: "\u6A59\u8272\u80CC\u666F",
1411
+ yellow: "\u9EC4\u8272\u80CC\u666F",
1412
+ green: "\u7EFF\u8272\u80CC\u666F",
1413
+ blue: "\u84DD\u8272\u80CC\u666F",
1414
+ purple: "\u7D2B\u8272\u80CC\u666F",
1415
+ pink: "\u7C89\u8272\u80CC\u666F",
1416
+ red: "\u7EA2\u8272\u80CC\u666F"
1417
+ },
1418
+ // 批注
1419
+ annotation: {
1420
+ title: "\u6279\u6CE8",
1421
+ list: "\u6279\u6CE8\u5217\u8868",
1422
+ add: "\u6DFB\u52A0\u6279\u6CE8",
1423
+ content: "\u6279\u6CE8\u5185\u5BB9",
1424
+ required: "\u8BF7\u8F93\u5165\u6279\u6CE8\u5185\u5BB9",
1425
+ maxLength: "\u6279\u6CE8\u5185\u5BB9\u4E0D\u80FD\u8D85\u8FC7500\u4E2A\u5B57\u7B26",
1426
+ placeholder: "\u8BF7\u8F93\u5165\u60A8\u7684\u6279\u6CE8\u5185\u5BB9...",
1427
+ edit: "\u7F16\u8F91\u6279\u6CE8",
1428
+ delete: "\u5220\u9664\u6279\u6CE8",
1429
+ confirmDelete: "\u786E\u8BA4\u5220\u9664\u5F53\u524D\u6279\u6CE8\u5417?",
1430
+ empty: "\u6682\u65E0\u6279\u6CE8"
1431
+ },
1432
+ // 摘录
1433
+ collection: {
1434
+ title: "\u6458\u5F55",
1435
+ list: "\u6458\u5F55\u5217\u8868",
1436
+ delete: "\u5220\u9664\u6458\u5F55",
1437
+ confirmDelete: "\u786E\u8BA4\u5220\u9664\u5F53\u524D\u6458\u5F55\u5417?",
1438
+ empty: "\u6682\u65E0\u6458\u5F55"
1439
+ },
1440
+ // 文件 / 图片上传
1441
+ themeToggle: {
1442
+ switchToLight: "\u5207\u6362\u5230\u6D45\u8272\u6A21\u5F0F",
1443
+ switchToDark: "\u5207\u6362\u5230\u6DF1\u8272\u6A21\u5F0F"
1444
+ },
1445
+ upload: {
1446
+ clickToUpload: "\u70B9\u51FB\u4E0A\u4F20",
1447
+ dragAndDrop: "\u6216\u62D6\u62FD\u5230\u6B64\u5904",
1448
+ maxFileHint: "\u6700\u591A {{limit}} \u4E2A\u6587\u4EF6\uFF0C\u6BCF\u4E2A {{size}}MB",
1449
+ noFile: "\u672A\u63D0\u4F9B\u6587\u4EF6",
1450
+ canceled: "\u4E0A\u4F20\u5DF2\u53D6\u6D88",
1451
+ fileSizeExceeded: "\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u6700\u5927\u9650\u5236 ({{max}}MB)",
1452
+ undefined: "\u4E0A\u4F20\u529F\u80FD\u672A\u5B9A\u4E49",
1453
+ failedNoUrl: "\u4E0A\u4F20\u5931\u8D25\uFF1A\u672A\u8FD4\u56DEURL",
1454
+ failed: "\u4E0A\u4F20\u5931\u8D25",
1455
+ noFileToUpload: "\u6CA1\u6709\u6587\u4EF6\u53EF\u4E0A\u4F20",
1456
+ maxFileCount: "\u6700\u591A\u5141\u8BB8\u4E0A\u4F20 {{limit}} \u4E2A\u6587\u4EF6"
1457
+ }
1458
+ }
1459
+ };
1460
+
1461
+ // src/i18n/en-US.ts
1462
+ var commonEnUS = {
1463
+ common: {
1464
+ copySuccess: "Copied successfully",
1465
+ confirm: "OK",
1466
+ cancel: "Cancel",
1467
+ download: "Download",
1468
+ save: "Save",
1469
+ defaultFileName: "file",
1470
+ defaultTitle: "Notice",
1471
+ loading: "Loading...",
1472
+ // Shared keys (extracted from duplicates ≥ 3)
1473
+ enter: "Enter App",
1474
+ applicationCenter: "App Center",
1475
+ subscribeSuccess: "Subscribed successfully",
1476
+ subscribeConfirm: "Subscribe to {{name}}?",
1477
+ installConfirm: "{{action}} {{name}}?",
1478
+ prompt: "Prompt",
1479
+ dynamicNews: "Activity Feed",
1480
+ noDynamicNews: "No recent activity"
1481
+ },
1482
+ request: {
1483
+ networkError: "Network error, please check your connection",
1484
+ requestError: "Request error!"
1485
+ },
1486
+ pattern: {
1487
+ mobileInvalid: "Invalid phone number!",
1488
+ phoneInvalid: "Invalid phone number!",
1489
+ taxNoInvalid: "Invalid tax number!",
1490
+ bankCardInvalid: "Invalid bank card number!",
1491
+ idCardInvalid: "Invalid ID card number!",
1492
+ numberInvalid: "Invalid format, please re-enter!",
1493
+ smsCodeInvalid: "SMS code must be 6 digits",
1494
+ emailInvalid: "Invalid email format!",
1495
+ addressInvalid: "Must contain one of: street, road, village, town, etc.",
1496
+ passwordInvalid: "Password must be 8-26 characters with letters and numbers",
1497
+ phoneOrMobileInvalid: "Invalid contact number",
1498
+ lessThan: "Cannot be less than {{value}}",
1499
+ lessThanOrEqual: "Cannot be less than or equal to {{value}}",
1500
+ greaterThan: "Cannot be greater than {{value}}",
1501
+ greaterThanOrEqual: "Cannot be greater than or equal to {{value}}",
1502
+ totalLengthExceed: "Total digits cannot exceed {{length}}",
1503
+ integerLengthExceed: "Integer digits cannot exceed {{length}}",
1504
+ decimalLengthExceed: "Decimal digits cannot exceed {{length}}",
1505
+ maxEmailsExceed: "Maximum {{max}} emails allowed"
1506
+ },
1507
+ date: {
1508
+ yearMonthFormat: "YYYY-MM",
1509
+ yearMonthDayFormat: "YYYY-MM-DD"
1510
+ },
1511
+ speechButton: {
1512
+ notSupported: "Speech recognition is not supported in this browser",
1513
+ permissionDenied: "Microphone permission denied",
1514
+ stop: "Stop Recording",
1515
+ start: "Click to Start Recording"
1516
+ },
1517
+ microApp: {
1518
+ loading: "Loading..."
1519
+ },
1520
+ iframe: {
1521
+ loading: "Loading..."
1522
+ },
1523
+ lazyComponent: {
1524
+ unknownType: "Unknown type: {{type}}",
1525
+ componentLoading: "Loading component..."
1526
+ },
1527
+ filePreview: {
1528
+ title: "File Preview",
1529
+ closePreview: "Close preview",
1530
+ htmlPreviewTitle: "HTML Preview",
1531
+ previewImageAlt: "Preview image",
1532
+ previewNotSupported: "Preview of {{suffix}} files is not supported",
1533
+ previewNotSupportedDownload: "{{suffix}} files cannot be previewed online, please download and open",
1534
+ previewGenerating: "Preview file is being generated...",
1535
+ audioNotSupported: "Your browser does not support the audio tag.",
1536
+ videoNotSupported: "Your browser does not support the video tag.",
1537
+ requestFailedWithStatus: "Request failed, status code: {{status}}",
1538
+ emptyResponse: "Response content is empty",
1539
+ loadFileFailed: "Failed to load file",
1540
+ fileParseFailed: "Failed to load or parse file",
1541
+ fileUrlInvalid: "Invalid file URL",
1542
+ htmlParseFailed: "Failed to load or parse HTML",
1543
+ docLoadFailed: "Failed to load document",
1544
+ pdfLoadFailed: "Failed to load PDF",
1545
+ pdfParseFailed: "Failed to load or parse PDF",
1546
+ pdfUrlInvalid: "Invalid PDF URL",
1547
+ pdfPasswordInvalid: "Invalid password. Please try again!",
1548
+ pdfPasswordPlaceholder: "Please enter password",
1549
+ pdfSubmit: "Submit",
1550
+ pdfInvalidOrDamaged: "File is invalid or damaged",
1551
+ pdfFileNotFound: "File not found",
1552
+ pdfUnexpectedResponse: "Unexpected server response",
1553
+ pdfLoadDocumentFailed: "Unable to load document",
1554
+ zoomOut: "Zoom out",
1555
+ zoomIn: "Zoom in",
1556
+ zoomReset: "Reset",
1557
+ fitWidth: "Fit width"
1558
+ },
1559
+ markdownEditor: {
1560
+ mainArea: "Main content area, start typing...",
1561
+ unknown: "Unknown",
1562
+ toolbar: {
1563
+ toolbarAria: "Editor toolbar",
1564
+ quote: "Quote Selected Text",
1565
+ annotation: "Annotate",
1566
+ excerpt: "Excerpt Note",
1567
+ undo: "Undo",
1568
+ redo: "Redo",
1569
+ alignLeft: "Align Left",
1570
+ alignCenter: "Align Center",
1571
+ alignRight: "Align Right",
1572
+ alignJustify: "Justify",
1573
+ bold: "Bold",
1574
+ italic: "Italic",
1575
+ underline: "Underline",
1576
+ strike: "Strikethrough",
1577
+ code: "Code",
1578
+ superscript: "Superscript",
1579
+ subscript: "Subscript",
1580
+ bulletList: "Bullet List",
1581
+ orderedList: "Numbered List",
1582
+ taskList: "Task List",
1583
+ listOptions: "List Options",
1584
+ list: "List",
1585
+ blockquote: "Blockquote",
1586
+ codeBlock: "Code Block",
1587
+ heading: "Heading",
1588
+ headingLevel: "Heading {{level}}",
1589
+ addImage: "Add Image",
1590
+ link: "Link",
1591
+ linkPlaceholder: "Paste link...",
1592
+ applyLink: "Apply Link",
1593
+ openInNewWindow: "Open in New Window",
1594
+ removeLink: "Remove Link"
1595
+ },
1596
+ highlight: {
1597
+ toggle: "Toggle highlight ({{color}})",
1598
+ label: "Background color",
1599
+ textLabel: "Text background color",
1600
+ colorOptionAria: "{{label}} highlight color",
1601
+ removeBackground: "Remove background",
1602
+ removeHighlight: "Remove highlight",
1603
+ default: "Default background",
1604
+ gray: "Gray background",
1605
+ brown: "Brown background",
1606
+ orange: "Orange background",
1607
+ yellow: "Yellow background",
1608
+ green: "Green background",
1609
+ blue: "Blue background",
1610
+ purple: "Purple background",
1611
+ pink: "Pink background",
1612
+ red: "Red background"
1613
+ },
1614
+ annotation: {
1615
+ title: "Annotations",
1616
+ list: "Annotations",
1617
+ add: "Add Annotation",
1618
+ content: "Annotation content",
1619
+ required: "Please enter annotation content",
1620
+ maxLength: "Annotation content cannot exceed 500 characters",
1621
+ placeholder: "Please enter your annotation...",
1622
+ edit: "Edit Annotation",
1623
+ delete: "Delete annotation",
1624
+ confirmDelete: "Delete this annotation?",
1625
+ empty: "No annotations"
1626
+ },
1627
+ collection: {
1628
+ title: "Excerpts",
1629
+ list: "Excerpts",
1630
+ delete: "Delete excerpt",
1631
+ confirmDelete: "Delete this excerpt?",
1632
+ empty: "No excerpts"
1633
+ },
1634
+ themeToggle: {
1635
+ switchToLight: "Switch to light mode",
1636
+ switchToDark: "Switch to dark mode"
1637
+ },
1638
+ upload: {
1639
+ clickToUpload: "Click to upload",
1640
+ dragAndDrop: "or drag and drop",
1641
+ maxFileHint: "Maximum {{limit}} files, {{size}}MB each",
1642
+ noFile: "No file provided",
1643
+ canceled: "Upload canceled",
1644
+ fileSizeExceeded: "File size exceeds the maximum limit ({{max}}MB)",
1645
+ undefined: "Upload function is not defined",
1646
+ failedNoUrl: "Upload failed: no URL returned",
1647
+ failed: "Upload failed",
1648
+ noFileToUpload: "No file to upload",
1649
+ maxFileCount: "A maximum of {{limit}} files can be uploaded"
1650
+ }
1651
+ }
1652
+ };
1653
+
1654
+ // src/i18n/ja-JP.ts
1655
+ var commonJaJP = {
1656
+ // 共通文案
1657
+ common: {
1658
+ copySuccess: "\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F",
1659
+ confirm: "OK",
1660
+ cancel: "\u30AD\u30E3\u30F3\u30BB\u30EB",
1661
+ download: "\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9",
1662
+ save: "\u4FDD\u5B58",
1663
+ defaultFileName: "\u30D5\u30A1\u30A4\u30EB",
1664
+ defaultTitle: "\u30D2\u30F3\u30C8",
1665
+ loading: "\u8AAD\u307F\u8FBC\u307F\u4E2D...",
1666
+ // 共通キー(3回以上重複のため抽出)
1667
+ enter: "\u30A2\u30D7\u30EA\u306B\u5165\u308B",
1668
+ applicationCenter: "\u30A2\u30D7\u30EA\u30BB\u30F3\u30BF\u30FC",
1669
+ subscribeSuccess: "\u30B5\u30D6\u30B9\u30AF\u6210\u529F",
1670
+ subscribeConfirm: "{{name}}\u3092\u30B5\u30D6\u30B9\u30AF\u3057\u307E\u3059\u304B\uFF1F",
1671
+ installConfirm: "{{name}}\u3092{{action}}\u3057\u307E\u3059\u304B\uFF1F",
1672
+ prompt: "\u30D2\u30F3\u30C8",
1673
+ dynamicNews: "\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",
1674
+ noDynamicNews: "\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u306A\u3057"
1675
+ },
1676
+ // utils/request.ts
1677
+ request: {
1678
+ 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",
1679
+ requestError: "\u30EA\u30AF\u30A8\u30B9\u30C8\u30A8\u30E9\u30FC\uFF01"
1680
+ },
1681
+ // utils/pattern.ts — バリデーションメッセージ
1682
+ pattern: {
1683
+ mobileInvalid: "\u643A\u5E2F\u96FB\u8A71\u756A\u53F7\u306E\u5F62\u5F0F\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093\uFF01",
1684
+ phoneInvalid: "\u96FB\u8A71\u756A\u53F7\u306E\u5F62\u5F0F\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093\uFF01",
1685
+ taxNoInvalid: "\u7A0E\u756A\u53F7\u306E\u5F62\u5F0F\u306B\u8AA4\u308A\u304C\u3042\u308A\u307E\u3059\uFF01",
1686
+ bankCardInvalid: "\u9280\u884C\u30AB\u30FC\u30C9\u756A\u53F7\u306E\u5F62\u5F0F\u306B\u8AA4\u308A\u304C\u3042\u308A\u307E\u3059\uFF01",
1687
+ idCardInvalid: "\u8EAB\u5206\u8A3C\u660E\u66F8\u756A\u53F7\u306E\u5F62\u5F0F\u306B\u8AA4\u308A\u304C\u3042\u308A\u307E\u3059\uFF01",
1688
+ numberInvalid: "\u5F62\u5F0F\u306B\u8AA4\u308A\u304C\u3042\u308A\u307E\u3059\u3002\u518D\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\uFF01",
1689
+ smsCodeInvalid: "\u8A8D\u8A3C\u30B3\u30FC\u30C9\u306F6\u6841\u306E\u6570\u5B57\u3067\u3059",
1690
+ emailInvalid: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u306E\u5F62\u5F0F\u306B\u8AA4\u308A\u304C\u3042\u308A\u307E\u3059\uFF01",
1691
+ 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",
1692
+ passwordInvalid: "\u30D1\u30B9\u30EF\u30FC\u30C9\u306F8\u301C26\u6587\u5B57\u306E\u82F1\u6570\u5B57\u306E\u7D44\u307F\u5408\u308F\u305B\u3067\u3059",
1693
+ phoneOrMobileInvalid: "\u9023\u7D61\u5148\u96FB\u8A71\u756A\u53F7\u306E\u5F62\u5F0F\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093",
1694
+ // 補間例:{{value}} は実際の値に置換されます
1695
+ lessThan: "{{value}}\u672A\u6E80\u306B\u3067\u304D\u307E\u305B\u3093",
1696
+ lessThanOrEqual: "{{value}}\u4EE5\u4E0B\u306B\u3067\u304D\u307E\u305B\u3093",
1697
+ greaterThan: "{{value}}\u3092\u8D85\u3048\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093",
1698
+ greaterThanOrEqual: "{{value}}\u4EE5\u4E0A\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059",
1699
+ totalLengthExceed: "\u7DCF\u6841\u6570\u306F{{length}}\u6841\u3092\u8D85\u3048\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093",
1700
+ integerLengthExceed: "\u6574\u6570\u90E8\u306F{{length}}\u6841\u3092\u8D85\u3048\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093",
1701
+ decimalLengthExceed: "\u5C0F\u6570\u90E8\u306F{{length}}\u6841\u3092\u8D85\u3048\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093",
1702
+ maxEmailsExceed: "\u6700\u5927{{max}}\u4EF6\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u307E\u3067\u5165\u529B\u3067\u304D\u307E\u3059"
1703
+ },
1704
+ // utils/date.ts
1705
+ date: {
1706
+ yearMonthFormat: "YYYY\u5E74MM\u6708",
1707
+ yearMonthDayFormat: "YYYY\u5E74MM\u6708DD\u65E5"
1708
+ },
1709
+ // SpeechButton 音声ボタン
1710
+ speechButton: {
1711
+ notSupported: "\u73FE\u5728\u306E\u30D6\u30E9\u30A6\u30B6\u306F\u97F3\u58F0\u8A8D\u8B58\u306B\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093",
1712
+ permissionDenied: "\u30DE\u30A4\u30AF\u306E\u6A29\u9650\u304C\u62D2\u5426\u3055\u308C\u307E\u3057\u305F",
1713
+ stop: "\u9332\u97F3\u3092\u505C\u6B62",
1714
+ start: "\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u9332\u97F3\u3092\u958B\u59CB"
1715
+ },
1716
+ // MicroApp / Iframe
1717
+ microApp: {
1718
+ loading: "\u8AAD\u307F\u8FBC\u307F\u4E2D..."
1719
+ },
1720
+ iframe: {
1721
+ loading: "\u8AAD\u307F\u8FBC\u307F\u4E2D..."
1722
+ },
1723
+ // LazyComponent 遅延読み込みコンポーネント
1724
+ lazyComponent: {
1725
+ unknownType: "\u4E0D\u660E\u306A\u30BF\u30A4\u30D7\uFF1A{{type}}",
1726
+ componentLoading: "\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D..."
1727
+ },
1728
+ // File ファイルプレビューコンポーネント群
1729
+ filePreview: {
1730
+ title: "\u30D5\u30A1\u30A4\u30EB\u30D7\u30EC\u30D3\u30E5\u30FC",
1731
+ closePreview: "\u30D7\u30EC\u30D3\u30E5\u30FC\u3092\u9589\u3058\u308B",
1732
+ htmlPreviewTitle: "HTML \u30D7\u30EC\u30D3\u30E5\u30FC",
1733
+ previewImageAlt: "\u30D7\u30EC\u30D3\u30E5\u30FC\u753B\u50CF",
1734
+ previewNotSupported: "{{suffix}}\u30D5\u30A1\u30A4\u30EB\u306E\u30D7\u30EC\u30D3\u30E5\u30FC\u306B\u306F\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093",
1735
+ 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",
1736
+ previewGenerating: "\u30D7\u30EC\u30D3\u30E5\u30FC\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u4E2D...",
1737
+ audioNotSupported: "\u304A\u4F7F\u3044\u306E\u30D6\u30E9\u30A6\u30B6\u306F audio \u30BF\u30B0\u306B\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093\u3002",
1738
+ videoNotSupported: "\u304A\u4F7F\u3044\u306E\u30D6\u30E9\u30A6\u30B6\u306F video \u30BF\u30B0\u306B\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093\u3002",
1739
+ requestFailedWithStatus: "\u30EA\u30AF\u30A8\u30B9\u30C8\u5931\u6557\u3001\u30B9\u30C6\u30FC\u30BF\u30B9\u30B3\u30FC\u30C9: {{status}}",
1740
+ emptyResponse: "\u8FD4\u4FE1\u5185\u5BB9\u304C\u7A7A\u3067\u3059",
1741
+ loadFileFailed: "\u30D5\u30A1\u30A4\u30EB\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
1742
+ fileParseFailed: "\u30D5\u30A1\u30A4\u30EB\u306E\u8AAD\u307F\u8FBC\u307F\u307E\u305F\u306F\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
1743
+ fileUrlInvalid: "\u30D5\u30A1\u30A4\u30EBURL\u304C\u4E0D\u6B63\u3067\u3059",
1744
+ htmlParseFailed: "HTML\u306E\u8AAD\u307F\u8FBC\u307F\u307E\u305F\u306F\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
1745
+ docLoadFailed: "\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
1746
+ pdfLoadFailed: "PDF\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
1747
+ pdfParseFailed: "PDF\u306E\u8AAD\u307F\u8FBC\u307F\u307E\u305F\u306F\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
1748
+ pdfUrlInvalid: "PDF\u306EURL\u304C\u4E0D\u6B63\u3067\u3059",
1749
+ pdfPasswordInvalid: "\u30D1\u30B9\u30EF\u30FC\u30C9\u304C\u7121\u52B9\u3067\u3059\u3002\u3082\u3046\u4E00\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\uFF01",
1750
+ pdfPasswordPlaceholder: "\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",
1751
+ pdfSubmit: "\u9001 \u4FE1",
1752
+ pdfInvalidOrDamaged: "\u30D5\u30A1\u30A4\u30EB\u304C\u7121\u52B9\u307E\u305F\u306F\u7834\u640D\u3057\u3066\u3044\u307E\u3059",
1753
+ pdfFileNotFound: "\u30D5\u30A1\u30A4\u30EB\u304C\u5B58\u5728\u3057\u307E\u305B\u3093",
1754
+ pdfUnexpectedResponse: "\u4E88\u671F\u3057\u306A\u3044\u30B5\u30FC\u30D0\u30FC\u30EC\u30B9\u30DD\u30F3\u30B9",
1755
+ pdfLoadDocumentFailed: "\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093",
1756
+ zoomOut: "\u7E2E\u5C0F",
1757
+ zoomIn: "\u62E1\u5927",
1758
+ zoomReset: "\u5143\u306B\u623B\u3059",
1759
+ fitWidth: "\u5E45\u306B\u5408\u308F\u305B\u308B"
1760
+ },
1761
+ // MarkdownEditor リッチテキストエディタ
1762
+ markdownEditor: {
1763
+ mainArea: "\u30E1\u30A4\u30F3\u30B3\u30F3\u30C6\u30F3\u30C4\u30A8\u30EA\u30A2\u3001\u30C6\u30AD\u30B9\u30C8\u3092\u5165\u529B...",
1764
+ unknown: "\u4E0D\u660E",
1765
+ // ツールバー
1766
+ toolbar: {
1767
+ toolbarAria: "\u30A8\u30C7\u30A3\u30BF\u30FC\u30C4\u30FC\u30EB\u30D0\u30FC",
1768
+ quote: "\u9078\u629E\u30C6\u30AD\u30B9\u30C8\u3092\u5F15\u7528",
1769
+ annotation: "\u6CE8\u91C8",
1770
+ excerpt: "\u629C\u7C8B\u30E1\u30E2",
1771
+ undo: "\u5143\u306B\u623B\u3059",
1772
+ redo: "\u3084\u308A\u76F4\u3059",
1773
+ alignLeft: "\u5DE6\u63C3\u3048",
1774
+ alignCenter: "\u4E2D\u592E\u63C3\u3048",
1775
+ alignRight: "\u53F3\u63C3\u3048",
1776
+ alignJustify: "\u4E21\u7AEF\u63C3\u3048",
1777
+ bold: "\u592A\u5B57",
1778
+ italic: "\u659C\u4F53",
1779
+ underline: "\u4E0B\u7DDA",
1780
+ strike: "\u53D6\u308A\u6D88\u3057\u7DDA",
1781
+ code: "\u30B3\u30FC\u30C9",
1782
+ superscript: "\u4E0A\u4ED8\u304D\u6587\u5B57",
1783
+ subscript: "\u4E0B\u4ED8\u304D\u6587\u5B57",
1784
+ bulletList: "\u7B87\u6761\u66F8\u304D",
1785
+ orderedList: "\u756A\u53F7\u4ED8\u304D\u30EA\u30B9\u30C8",
1786
+ taskList: "\u30BF\u30B9\u30AF\u30EA\u30B9\u30C8",
1787
+ listOptions: "\u30EA\u30B9\u30C8\u30AA\u30D7\u30B7\u30E7\u30F3",
1788
+ list: "\u30EA\u30B9\u30C8",
1789
+ blockquote: "\u5F15\u7528\u30D6\u30ED\u30C3\u30AF",
1790
+ codeBlock: "\u30B3\u30FC\u30C9\u30D6\u30ED\u30C3\u30AF",
1791
+ heading: "\u898B\u51FA\u3057",
1792
+ headingLevel: "\u898B\u51FA\u3057 {{level}}",
1793
+ addImage: "\u753B\u50CF\u3092\u8FFD\u52A0",
1794
+ link: "\u30EA\u30F3\u30AF",
1795
+ linkPlaceholder: "\u30EA\u30F3\u30AF\u3092\u8CBC\u308A\u4ED8\u3051...",
1796
+ applyLink: "\u30EA\u30F3\u30AF\u3092\u9069\u7528",
1797
+ openInNewWindow: "\u65B0\u3057\u3044\u30A6\u30A3\u30F3\u30C9\u30A6\u3067\u958B\u304F",
1798
+ removeLink: "\u30EA\u30F3\u30AF\u3092\u524A\u9664"
1799
+ },
1800
+ // ハイライト / 背景色
1801
+ highlight: {
1802
+ toggle: "\u30CF\u30A4\u30E9\u30A4\u30C8\u8868\u793A\u3092\u5207\u308A\u66FF\u3048 ({{color}})",
1803
+ label: "\u80CC\u666F\u8272",
1804
+ textLabel: "\u30C6\u30AD\u30B9\u30C8\u80CC\u666F\u8272",
1805
+ colorOptionAria: "{{label}} \u306E\u30CF\u30A4\u30E9\u30A4\u30C8\u8272",
1806
+ removeBackground: "\u80CC\u666F\u3092\u524A\u9664",
1807
+ removeHighlight: "\u30CF\u30A4\u30E9\u30A4\u30C8\u3092\u524A\u9664",
1808
+ default: "\u30C7\u30D5\u30A9\u30EB\u30C8\u80CC\u666F",
1809
+ gray: "\u30B0\u30EC\u30FC\u80CC\u666F",
1810
+ brown: "\u30D6\u30E9\u30A6\u30F3\u80CC\u666F",
1811
+ orange: "\u30AA\u30EC\u30F3\u30B8\u80CC\u666F",
1812
+ yellow: "\u30A4\u30A8\u30ED\u30FC\u80CC\u666F",
1813
+ green: "\u30B0\u30EA\u30FC\u30F3\u80CC\u666F",
1814
+ blue: "\u30D6\u30EB\u30FC\u80CC\u666F",
1815
+ purple: "\u30D1\u30FC\u30D7\u30EB\u80CC\u666F",
1816
+ pink: "\u30D4\u30F3\u30AF\u80CC\u666F",
1817
+ red: "\u30EC\u30C3\u30C9\u80CC\u666F"
1818
+ },
1819
+ // 注釈
1820
+ annotation: {
1821
+ title: "\u6CE8\u91C8",
1822
+ list: "\u6CE8\u91C8\u30EA\u30B9\u30C8",
1823
+ add: "\u6CE8\u91C8\u3092\u8FFD\u52A0",
1824
+ content: "\u6CE8\u91C8\u5185\u5BB9",
1825
+ required: "\u6CE8\u91C8\u5185\u5BB9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",
1826
+ maxLength: "\u6CE8\u91C8\u5185\u5BB9\u306F500\u6587\u5B57\u4EE5\u5185\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",
1827
+ placeholder: "\u6CE8\u91C8\u5185\u5BB9\u3092\u5165\u529B...",
1828
+ edit: "\u6CE8\u91C8\u3092\u7DE8\u96C6",
1829
+ delete: "\u6CE8\u91C8\u3092\u524A\u9664",
1830
+ confirmDelete: "\u3053\u306E\u6CE8\u91C8\u3092\u524A\u9664\u3057\u307E\u3059\u304B\uFF1F",
1831
+ empty: "\u6CE8\u91C8\u306F\u3042\u308A\u307E\u305B\u3093"
1832
+ },
1833
+ // 抜粋
1834
+ collection: {
1835
+ title: "\u629C\u7C8B",
1836
+ list: "\u629C\u7C8B\u30EA\u30B9\u30C8",
1837
+ delete: "\u629C\u7C8B\u3092\u524A\u9664",
1838
+ confirmDelete: "\u3053\u306E\u629C\u7C8B\u3092\u524A\u9664\u3057\u307E\u3059\u304B\uFF1F",
1839
+ empty: "\u629C\u7C8B\u306F\u3042\u308A\u307E\u305B\u3093"
1840
+ },
1841
+ // ファイル / 画像アップロード
1842
+ themeToggle: {
1843
+ switchToLight: "\u30E9\u30A4\u30C8\u30E2\u30FC\u30C9\u306B\u5207\u308A\u66FF\u3048",
1844
+ switchToDark: "\u30C0\u30FC\u30AF\u30E2\u30FC\u30C9\u306B\u5207\u308A\u66FF\u3048"
1845
+ },
1846
+ upload: {
1847
+ clickToUpload: "\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9",
1848
+ dragAndDrop: "\u307E\u305F\u306F\u30C9\u30E9\u30C3\u30B0\uFF06\u30C9\u30ED\u30C3\u30D7",
1849
+ maxFileHint: "\u6700\u5927 {{limit}} \u4EF6\u3001\u5404 {{size}}MB \u307E\u3067",
1850
+ noFile: "\u30D5\u30A1\u30A4\u30EB\u304C\u63D0\u4F9B\u3055\u308C\u3066\u3044\u307E\u305B\u3093",
1851
+ canceled: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306F\u30AD\u30E3\u30F3\u30BB\u30EB\u3055\u308C\u307E\u3057\u305F",
1852
+ fileSizeExceeded: "\u30D5\u30A1\u30A4\u30EB\u30B5\u30A4\u30BA\u304C\u6700\u5927\u5236\u9650\u3092\u8D85\u3048\u3066\u3044\u307E\u3059 ({{max}}MB)",
1853
+ undefined: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u6A5F\u80FD\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093",
1854
+ failedNoUrl: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u5931\u6557\uFF1AURL\u304C\u8FD4\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F",
1855
+ failed: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
1856
+ noFileToUpload: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u30D5\u30A1\u30A4\u30EB\u304C\u3042\u308A\u307E\u305B\u3093",
1857
+ maxFileCount: "\u6700\u5927{{limit}}\u4EF6\u307E\u3067\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3067\u304D\u307E\u3059"
1858
+ }
1859
+ }
1860
+ };
1861
+ var antdLocaleMap = {
1862
+ "zh-CN": zhCN,
1863
+ "en-US": enUS,
1864
+ "ja-JP": jaJP
1865
+ };
1866
+ var dayjsLocaleMap = {
1867
+ "zh-CN": "zh-cn",
1868
+ "en-US": "en",
1869
+ "ja-JP": "ja"
1870
+ };
1871
+ var LocaleProvider = ({ children, ...rest }) => {
1872
+ const lang = getLang();
1873
+ dayjs.locale(dayjsLocaleMap[lang]);
1874
+ return /* @__PURE__ */ jsx(ConfigProvider, { locale: antdLocaleMap[lang], ...rest, children });
1875
+ };
1876
+
1877
+ // src/i18n/index.ts
1878
+ var DEFAULT_LNG = "zh-CN";
1879
+ var LANG_KEY = "ns-lang";
1880
+ var langManager = createTokenManager({ key: LANG_KEY });
1881
+ function getLang() {
1882
+ return langManager.get() || DEFAULT_LNG;
1883
+ }
1884
+ var i18n = createInstance({
1885
+ lng: DEFAULT_LNG,
1886
+ fallbackLng: DEFAULT_LNG,
1887
+ defaultNS: NS_COMMON,
1888
+ interpolation: { escapeValue: false },
1889
+ resources: { [DEFAULT_LNG]: { [NS_COMMON]: commonZhCN } }
1890
+ }).use(initReactI18next);
1891
+ void i18n.init();
1892
+ function addBundledResource(lng, ns, res) {
1893
+ if (lng === DEFAULT_LNG && ns === NS_COMMON) return;
1894
+ i18n.addResourceBundle(lng, ns, res, true, true);
1895
+ }
1896
+ function initI18n(options = {}) {
1897
+ const { lng = getLang(), resources } = options;
1898
+ for (const [l, namespaces] of Object.entries(resources ?? {})) {
1899
+ for (const [ns, messages] of Object.entries(namespaces)) {
1900
+ i18n.addResourceBundle(l, ns, messages, true, true);
1901
+ }
1902
+ }
1903
+ switchLang(lng);
1904
+ return i18n;
1905
+ }
1906
+ function switchLang(lng, reload = false) {
1907
+ langManager.set(lng);
1908
+ if (reload) {
1909
+ window?.top?.location.reload();
1910
+ } else {
1911
+ i18n.changeLanguage(lng);
1912
+ }
1913
+ }
1914
+ function useTranslation(namespace) {
1915
+ return useTranslation$1(namespace, { useSuspense: false });
1916
+ }
1917
+ function getI18n() {
1918
+ return i18n;
1919
+ }
1920
+ function t(key, options) {
1921
+ return i18n.t(key, options);
1922
+ }
1923
+
1924
+ // src/components/File/styles.module.less
1925
+ var styles_module_default = {
1926
+ nsPreviewImage: "styles_module_nsPreviewImage",
1927
+ nsPreviewPdf: "styles_module_nsPreviewPdf",
1928
+ pdfToolbar: "styles_module_pdfToolbar",
1929
+ nsPreviewPdfImage: "styles_module_nsPreviewPdfImage",
1930
+ pdfImageNav: "styles_module_pdfImageNav",
1931
+ pdfImageNavItem: "styles_module_pdfImageNavItem",
1932
+ pdfImageNavItemImgWrapper: "styles_module_pdfImageNavItemImgWrapper",
1933
+ pdfImageNavItemActive: "styles_module_pdfImageNavItemActive",
1934
+ pdfImageNavItemImg: "styles_module_pdfImageNavItemImg",
1935
+ pdfImageNavItemTip: "styles_module_pdfImageNavItemTip",
1936
+ pdfImageBody: "styles_module_pdfImageBody",
1937
+ pdfImageBodyToolbar: "styles_module_pdfImageBodyToolbar",
1938
+ pdfImageBodyItem: "styles_module_pdfImageBodyItem",
1939
+ pdfImageBodyItemInnerWrapper: "styles_module_pdfImageBodyItemInnerWrapper",
1940
+ pdfImageBodyItemInner: "styles_module_pdfImageBodyItemInner",
1941
+ pdfImageBodyItemActive: "styles_module_pdfImageBodyItemActive",
1942
+ pdfImageBodyItemImg: "styles_module_pdfImageBodyItemImg",
1943
+ nsPreviewVideo: "styles_module_nsPreviewVideo",
1944
+ nsPreviewAudio: "styles_module_nsPreviewAudio",
1945
+ nsPreviewDocx: "styles_module_nsPreviewDocx",
1946
+ docxToolbar: "styles_module_docxToolbar",
1947
+ docxContent: "styles_module_docxContent",
1948
+ stateBody: "styles_module_stateBody",
1949
+ pdfContainer: "styles_module_pdfContainer",
1950
+ floatingToolbar: "styles_module_floatingToolbar",
1951
+ divider: "styles_module_divider",
1952
+ pdfBody: "styles_module_pdfBody",
1953
+ pdfDocument: "styles_module_pdfDocument",
1954
+ pdfPage: "styles_module_pdfPage"
1955
+ };
1956
+ var AudioPlayer_default = ({ fileUrl }) => {
1957
+ const { t: t2 } = useTranslation(NS_COMMON);
1958
+ return /* @__PURE__ */ jsxs("audio", { controls: true, className: styles_module_default.nsPreviewAudio, children: [
1959
+ /* @__PURE__ */ jsx("source", { src: fileUrl, type: "audio/mpeg" }),
1960
+ t2("filePreview.audioNotSupported")
1961
+ ] }, fileUrl);
1962
+ };
1256
1963
  var DocxPreview_default = ({ fileUrl, scale = 1 }) => {
1964
+ const { t: t2 } = useTranslation(NS_COMMON);
1257
1965
  const containerRef = useRef(null);
1258
1966
  const [zoomRatio, setZoomRatio] = useState(scale);
1259
1967
  useEffect(() => {
@@ -1276,7 +1984,7 @@ var DocxPreview_default = ({ fileUrl, scale = 1 }) => {
1276
1984
  });
1277
1985
  }).catch((err) => {
1278
1986
  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>';
1987
+ if (containerRef.current) containerRef.current.innerHTML = `<p class="text-center">${t2("filePreview.docLoadFailed")}</p>`;
1280
1988
  });
1281
1989
  }, [fileUrl]);
1282
1990
  const zoomIn = () => setZoomRatio((z) => Math.min(z + 0.1, 3));
@@ -1286,9 +1994,9 @@ var DocxPreview_default = ({ fileUrl, scale = 1 }) => {
1286
1994
  };
1287
1995
  return /* @__PURE__ */ jsxs("div", { className: classNames2(styles_module_default.nsPreviewDocx, "height-full", "width-full"), children: [
1288
1996
  /* @__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" })
1997
+ /* @__PURE__ */ jsx(Button, { onClick: zoomOut, icon: /* @__PURE__ */ jsx(MinusCircleOutlined, {}), title: t2("filePreview.zoomOut") }),
1998
+ /* @__PURE__ */ jsx(Button, { onClick: zoomIn, icon: /* @__PURE__ */ jsx(PlusCircleOutlined, {}), title: t2("filePreview.zoomIn") }),
1999
+ /* @__PURE__ */ jsx(Button, { onClick: resetZoom, icon: /* @__PURE__ */ jsx(RedoOutlined, {}), title: t2("filePreview.zoomReset") })
1292
2000
  ] }),
1293
2001
  /* @__PURE__ */ jsx("div", { className: classNames2(styles_module_default.docxContent, "height-full", "scroll-fade-in"), children: /* @__PURE__ */ jsx(
1294
2002
  "div",
@@ -1366,9 +2074,10 @@ var FileIcon_default = ({ suffix, fontSize = 22 }) => {
1366
2074
  return /* @__PURE__ */ jsx("span", { style: styles, children: Icon });
1367
2075
  };
1368
2076
  var VideoPlayer_default = ({ fileUrl }) => {
2077
+ const { t: t2 } = useTranslation(NS_COMMON);
1369
2078
  return /* @__PURE__ */ jsxs("video", { controls: true, className: styles_module_default.nsPreviewVideo, children: [
1370
2079
  /* @__PURE__ */ jsx("source", { src: fileUrl, type: "video/mp4" }),
1371
- "\u60A8\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 video \u6807\u7B7E\u3002"
2080
+ t2("filePreview.videoNotSupported")
1372
2081
  ] }, fileUrl);
1373
2082
  };
1374
2083
 
@@ -1381,6 +2090,7 @@ var baseComponentMap = {
1381
2090
  };
1382
2091
  var lazyCache = /* @__PURE__ */ new Map();
1383
2092
  var LazyComponent_default = ({ type, customComponents, unknownContent, ...rest }) => {
2093
+ const { t: t2 } = useTranslation(NS_COMMON);
1384
2094
  const loader2 = customComponents?.[type] || baseComponentMap[type];
1385
2095
  const LazyComponent = useMemo(() => {
1386
2096
  if (!loader2) return null;
@@ -1390,11 +2100,11 @@ var LazyComponent_default = ({ type, customComponents, unknownContent, ...rest }
1390
2100
  lazyCache.set(type, component);
1391
2101
  return component;
1392
2102
  }, [loader2]);
1393
- if (!LazyComponent) return unknownContent || /* @__PURE__ */ jsx(Alert, { title: `\u672A\u77E5\u7C7B\u578B\uFF1A${type}`, type: "warning" });
2103
+ if (!LazyComponent) return unknownContent || /* @__PURE__ */ jsx(Alert, { title: t2("lazyComponent.unknownType", { type }), type: "warning" });
1394
2104
  return /* @__PURE__ */ jsx(
1395
2105
  Suspense,
1396
2106
  {
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..." }) }),
2107
+ fallback: /* @__PURE__ */ jsx(Skeleton.Node, { active: true, className: styles_module_default2.skeleton, children: /* @__PURE__ */ jsx(Typography.Text, { type: "secondary", children: t2("lazyComponent.componentLoading") }) }),
1398
2108
  children: /* @__PURE__ */ jsx(LazyComponent, { ...rest })
1399
2109
  }
1400
2110
  );
@@ -1506,12 +2216,13 @@ var RenderMarkdown_default = ({ content = "", searchValue, customComponents, ...
1506
2216
  return /* @__PURE__ */ jsx("div", { className: "ns-markdown", children: reactContent });
1507
2217
  };
1508
2218
  var MarkdownPreview_default = ({ fileUrl, searchValue, asPlainText }) => {
2219
+ const { t: t2 } = useTranslation(NS_COMMON);
1509
2220
  const [content, setContent] = useState("");
1510
2221
  const [error, setError] = useState("");
1511
2222
  const fetchMarkdown = async () => {
1512
2223
  const res = await fetch(fileUrl);
1513
2224
  if (res.status !== 200) {
1514
- throw new Error(`\u8BF7\u6C42\u5931\u8D25\uFF0C\u72B6\u6001\u7801: ${res.status}`);
2225
+ throw new Error(t2("filePreview.requestFailedWithStatus", { status: res.status }));
1515
2226
  }
1516
2227
  const buffer = await res.arrayBuffer();
1517
2228
  let markdownText = "";
@@ -1523,7 +2234,7 @@ var MarkdownPreview_default = ({ fileUrl, searchValue, asPlainText }) => {
1523
2234
  markdownText = gbkDecoder.decode(buffer);
1524
2235
  }
1525
2236
  if (!markdownText) {
1526
- throw new Error("\u8FD4\u56DE\u5185\u5BB9\u4E3A\u7A7A");
2237
+ throw new Error(t2("filePreview.emptyResponse"));
1527
2238
  }
1528
2239
  return markdownText;
1529
2240
  };
@@ -1535,10 +2246,10 @@ var MarkdownPreview_default = ({ fileUrl, searchValue, asPlainText }) => {
1535
2246
  const content2 = await fetchMarkdown();
1536
2247
  setContent(content2);
1537
2248
  } catch {
1538
- setError("\u52A0\u8F7D\u6216\u89E3\u6790\u6587\u4EF6\u5931\u8D25");
2249
+ setError(t2("filePreview.fileParseFailed"));
1539
2250
  }
1540
2251
  } else {
1541
- setError("\u6587\u4EF6\u5730\u5740\u9519\u8BEF");
2252
+ setError(t2("filePreview.fileUrlInvalid"));
1542
2253
  }
1543
2254
  };
1544
2255
  useEffect(() => {
@@ -2208,17 +2919,18 @@ var THUMB_IMG_HEIGHT = 514;
2208
2919
  var MAIN_IMG_HEIGHT = 800;
2209
2920
  var MAIN_IMG_WIDTH = 600;
2210
2921
  var PdfImagePreview_default = ({ fileUrl, pageNo, scale = 1, isHasThumbnails = true, onSetPageNo }) => {
2922
+ const { t: t2 } = useTranslation(NS_COMMON);
2211
2923
  const [images, setImages] = useState([]);
2212
2924
  const [currentIndex, setCurrentIndex, getCurrentIndex] = useRefState_default(0);
2213
2925
  const [error, setError] = useState("");
2214
2926
  const fetchPdfImages = async () => {
2215
2927
  const res = await fetch(fileUrl);
2216
2928
  if (res.status !== 200) {
2217
- throw new Error(`\u8BF7\u6C42\u5931\u8D25\uFF0C\u72B6\u6001\u7801: ${res.status}`);
2929
+ throw new Error(t2("filePreview.requestFailedWithStatus", { status: res.status }));
2218
2930
  }
2219
2931
  const { data } = await res.json();
2220
2932
  if (!data?.items?.length) {
2221
- throw new Error("\u8FD4\u56DE\u5185\u5BB9\u4E3A\u7A7A");
2933
+ throw new Error(t2("filePreview.emptyResponse"));
2222
2934
  }
2223
2935
  setImages(data.items);
2224
2936
  };
@@ -2230,10 +2942,10 @@ var PdfImagePreview_default = ({ fileUrl, pageNo, scale = 1, isHasThumbnails = t
2230
2942
  try {
2231
2943
  await fetchPdfImages();
2232
2944
  } catch (error2) {
2233
- setError("\u52A0\u8F7D\u6216\u89E3\u6790 pdf \u5931\u8D25");
2945
+ setError(t2("filePreview.pdfParseFailed"));
2234
2946
  }
2235
2947
  } else {
2236
- setError("pdf\u5730\u5740\u9519\u8BEF");
2948
+ setError(t2("filePreview.pdfUrlInvalid"));
2237
2949
  }
2238
2950
  };
2239
2951
  useEffect(() => {
@@ -2373,9 +3085,9 @@ var PdfImagePreview_default = ({ fileUrl, pageNo, scale = 1, isHasThumbnails = t
2373
3085
  ) }) }),
2374
3086
  /* @__PURE__ */ jsx(Splitter.Panel, { children: /* @__PURE__ */ jsxs("div", { className: classNames2("height-full", styles_module_default.pdfImageBody), children: [
2375
3087
  /* @__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" })
3088
+ /* @__PURE__ */ jsx(Button, { onClick: zoomOut, icon: /* @__PURE__ */ jsx(MinusCircleOutlined, {}), title: t2("filePreview.zoomOut") }),
3089
+ /* @__PURE__ */ jsx(Button, { onClick: zoomIn, icon: /* @__PURE__ */ jsx(PlusCircleOutlined, {}), title: t2("filePreview.zoomIn") }),
3090
+ /* @__PURE__ */ jsx(Button, { onClick: zoomFitWidth, icon: /* @__PURE__ */ jsx(ColumnWidthOutlined, {}), title: t2("filePreview.fitWidth") })
2379
3091
  ] }),
2380
3092
  /* @__PURE__ */ jsx("div", { ref: containerRef, className: "height-full scroll-fade-in", children: /* @__PURE__ */ jsx(
2381
3093
  "div",
@@ -2423,6 +3135,7 @@ var ProtectedView = ({
2423
3135
  verifyPassword,
2424
3136
  onVerifyPasswordEnd
2425
3137
  }) => {
3138
+ const { t: t2 } = useTranslation(NS_COMMON);
2426
3139
  const [form] = Form.useForm();
2427
3140
  const onSubmit = () => {
2428
3141
  form.validateFields().then((values) => {
@@ -2433,10 +3146,10 @@ var ProtectedView = ({
2433
3146
  });
2434
3147
  };
2435
3148
  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" }),
3149
+ passwordStatus === PasswordStatus.WrongPassword && /* @__PURE__ */ jsx(Alert, { title: t2("filePreview.pdfPasswordInvalid"), type: "error" }),
2437
3150
  /* @__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" }) })
3151
+ /* @__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") }) }),
3152
+ /* @__PURE__ */ jsx(Flex, { justify: "center", children: /* @__PURE__ */ jsx(Button, { type: "primary", onClick: onSubmit, children: t2("filePreview.pdfSubmit") }) })
2440
3153
  ] })
2441
3154
  ] }) });
2442
3155
  };
@@ -2455,6 +3168,7 @@ var openLinksNewTabPlugin = () => {
2455
3168
  };
2456
3169
  };
2457
3170
  var PdfPreview_default = ({ password, fileUrl, pageNo = 1, scale = 1, isHasThumbnails = true, onSetPassword, onSetPageNo }) => {
3171
+ const { t: t2 } = useTranslation(NS_COMMON);
2458
3172
  const embedRef = useRef(null);
2459
3173
  const [sizes, setSizes] = useState([0]);
2460
3174
  const [docLoaded, setDocLoaded, getDocLoaded] = useRefState_default(false);
@@ -2528,19 +3242,19 @@ var PdfPreview_default = ({ password, fileUrl, pageNo = 1, scale = 1, isHasThumb
2528
3242
  let message3 = "";
2529
3243
  switch (error.name) {
2530
3244
  case "InvalidPDFException":
2531
- message3 = "\u6587\u4EF6\u65E0\u6548\u6216\u5DF2\u635F\u574F";
3245
+ message3 = t2("filePreview.pdfInvalidOrDamaged");
2532
3246
  break;
2533
3247
  case "MissingPDFException":
2534
- message3 = "\u6587\u4EF6\u4E0D\u5B58\u5728";
3248
+ message3 = t2("filePreview.pdfFileNotFound");
2535
3249
  break;
2536
3250
  case "UnexpectedResponseException":
2537
- message3 = "\u610F\u5916\u7684\u670D\u52A1\u5668\u54CD\u5E94";
3251
+ message3 = t2("filePreview.pdfUnexpectedResponse");
2538
3252
  break;
2539
3253
  // case 'CMapReaderFactory not initialized':
2540
3254
  // message = '字体映射文件加载失败,请刷新页面重试'
2541
3255
  // break
2542
3256
  default:
2543
- message3 = "\u65E0\u6CD5\u52A0\u8F7D\u6587\u6863";
3257
+ message3 = t2("filePreview.pdfLoadDocumentFailed");
2544
3258
  break;
2545
3259
  }
2546
3260
  return /* @__PURE__ */ jsx(Flex, { className: "height-full", justify: "center", align: "center", children: /* @__PURE__ */ jsx(Alert, { title: message3, type: "error", showIcon: true }) });
@@ -2611,6 +3325,7 @@ var PdfPreview_default = ({ password, fileUrl, pageNo = 1, scale = 1, isHasThumb
2611
3325
  ] }) }) });
2612
3326
  };
2613
3327
  var FilePreview_default = ({ suffix, fileUrl, pdfParams, password, searchValue, emptyProps, onSetPassword }) => {
3328
+ const { t: t2 } = useTranslation(NS_COMMON);
2614
3329
  const Preview = useMemo(() => {
2615
3330
  if (!fileUrl) {
2616
3331
  return /* @__PURE__ */ jsx(Empty, { ...emptyProps });
@@ -2620,7 +3335,7 @@ var FilePreview_default = ({ suffix, fileUrl, pdfParams, password, searchValue,
2620
3335
  case "JPG":
2621
3336
  case "JPEG":
2622
3337
  case "GIF":
2623
- return /* @__PURE__ */ jsx(Image$1, { classNames: { root: styles_module_default.nsPreviewImage }, src: fileUrl, alt: "\u9884\u89C8\u56FE\u7247" });
3338
+ return /* @__PURE__ */ jsx(Image$1, { classNames: { root: styles_module_default.nsPreviewImage }, src: fileUrl, alt: t2("filePreview.previewImageAlt") });
2624
3339
  case "PDF":
2625
3340
  return /* @__PURE__ */ jsx(PdfPreview_default, { fileUrl, ...pdfParams, password, onSetPassword });
2626
3341
  case "PDF_IMG":
@@ -2640,11 +3355,25 @@ var FilePreview_default = ({ suffix, fileUrl, pdfParams, password, searchValue,
2640
3355
  case "DOCX":
2641
3356
  return /* @__PURE__ */ jsx(DocxPreview_default, { fileUrl });
2642
3357
  default:
2643
- return /* @__PURE__ */ jsx(Result, { subTitle: `\u6682\u4E0D\u652F\u6301 ${suffix || ""} \u6587\u4EF6\u7684\u9884\u89C8` });
3358
+ return /* @__PURE__ */ jsx(Result, { subTitle: t2("filePreview.previewNotSupported", { suffix: suffix || "" }) });
2644
3359
  }
2645
3360
  }, [suffix, fileUrl, pdfParams]);
2646
3361
  return /* @__PURE__ */ jsx(Flex, { justify: "center", align: "center", className: "height-full", children: Preview });
2647
3362
  };
3363
+ var FilePreviewDrawer_default = ({ open, title, onClose, ...props }) => {
3364
+ const { t: t2 } = useTranslation(NS_COMMON);
3365
+ return /* @__PURE__ */ jsx(
3366
+ Drawer,
3367
+ {
3368
+ title: title || t2("filePreview.title"),
3369
+ push: false,
3370
+ size: "100%",
3371
+ open,
3372
+ onClose,
3373
+ children: /* @__PURE__ */ jsx(FilePreview_default, { ...props })
3374
+ }
3375
+ );
3376
+ };
2648
3377
  loader.config({ monaco });
2649
3378
  var getLanguage = (suffix) => {
2650
3379
  switch (suffix.toLowerCase()) {
@@ -2684,6 +3413,7 @@ var getLanguage = (suffix) => {
2684
3413
  }
2685
3414
  };
2686
3415
  var CodePreview = ({ fileUrl, suffix }) => {
3416
+ const { t: t2 } = useTranslation(NS_COMMON);
2687
3417
  const [content, setContent] = useState("");
2688
3418
  const [error, setError] = useState("");
2689
3419
  const [loading, setLoading] = useState(false);
@@ -2693,7 +3423,7 @@ var CodePreview = ({ fileUrl, suffix }) => {
2693
3423
  };
2694
3424
  const res = await fetch(fileUrl, { headers, signal });
2695
3425
  if (res.status !== 200) {
2696
- throw new Error(`\u8BF7\u6C42\u5931\u8D25\uFF0C\u72B6\u6001\u7801: ${res.status}`);
3426
+ throw new Error(t2("filePreview.requestFailedWithStatus", { status: res.status }));
2697
3427
  }
2698
3428
  const buffer = await res.arrayBuffer();
2699
3429
  let text = "";
@@ -2717,7 +3447,7 @@ var CodePreview = ({ fileUrl, suffix }) => {
2717
3447
  await fetchContent(controller.signal);
2718
3448
  } catch (error2) {
2719
3449
  if (!controller.signal.aborted) {
2720
- setError("\u52A0\u8F7D\u6587\u4EF6\u5931\u8D25");
3450
+ setError(t2("filePreview.loadFileFailed"));
2721
3451
  }
2722
3452
  } finally {
2723
3453
  if (!controller.signal.aborted) {
@@ -2867,6 +3597,7 @@ var PdfPage = React3__default.memo(({ pdf, pageNumber, scale, scrollContainerRef
2867
3597
  );
2868
3598
  });
2869
3599
  var DocumentPreview = ({ fileUrl, previewEnabled = true }) => {
3600
+ const { t: t2 } = useTranslation(NS_COMMON);
2870
3601
  const [loading, setLoading] = useState(false);
2871
3602
  const [pdf, setPdf] = useState(null);
2872
3603
  const [numPages, setNumPages] = useState(0);
@@ -2926,9 +3657,9 @@ var DocumentPreview = ({ fileUrl, previewEnabled = true }) => {
2926
3657
  if (aborted) return;
2927
3658
  const message3 = e?.message;
2928
3659
  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...");
3660
+ setError(t2("filePreview.previewGenerating"));
2930
3661
  } else {
2931
- setError(message3 || "PDF \u52A0\u8F7D\u5931\u8D25");
3662
+ setError(message3 || t2("filePreview.pdfLoadFailed"));
2932
3663
  }
2933
3664
  } finally {
2934
3665
  if (!aborted) {
@@ -3033,7 +3764,7 @@ var DocumentPreview = ({ fileUrl, previewEnabled = true }) => {
3033
3764
  /* @__PURE__ */ jsx(Button, { type: "text", icon: /* @__PURE__ */ jsx(PlusOutlined, {}), size: "small", onClick: onZoomIn, disabled: scale >= MAX_SCALE })
3034
3765
  ] });
3035
3766
  if (!previewEnabled) {
3036
- return /* @__PURE__ */ jsx(Flex, { className: styles_module_default.stateBody, children: "\u5173\u95ED\u9884\u89C8" });
3767
+ return /* @__PURE__ */ jsx(Flex, { className: styles_module_default.stateBody, children: t2("filePreview.closePreview") });
3037
3768
  }
3038
3769
  return /* @__PURE__ */ jsxs("div", { className: styles_module_default.pdfContainer, children: [
3039
3770
  toolbar,
@@ -3042,6 +3773,7 @@ var DocumentPreview = ({ fileUrl, previewEnabled = true }) => {
3042
3773
  };
3043
3774
  var DocumentPreview_default = DocumentPreview;
3044
3775
  var HtmlPreview = ({ fileUrl }) => {
3776
+ const { t: t2 } = useTranslation(NS_COMMON);
3045
3777
  const [content, setContent] = useState("");
3046
3778
  const [error, setError] = useState("");
3047
3779
  const [loading, setLoading] = useState(false);
@@ -3054,7 +3786,7 @@ var HtmlPreview = ({ fileUrl }) => {
3054
3786
  signal
3055
3787
  });
3056
3788
  if (res.status !== 200) {
3057
- throw new Error(`\u8BF7\u6C42\u5931\u8D25\uFF0C\u72B6\u6001\u7801: ${res.status}`);
3789
+ throw new Error(t2("filePreview.requestFailedWithStatus", { status: res.status }));
3058
3790
  }
3059
3791
  const buffer = await res.arrayBuffer();
3060
3792
  let htmlText = "";
@@ -3066,7 +3798,7 @@ var HtmlPreview = ({ fileUrl }) => {
3066
3798
  htmlText = gbkDecoder.decode(buffer);
3067
3799
  }
3068
3800
  if (!htmlText) {
3069
- throw new Error("\u8FD4\u56DE\u5185\u5BB9\u4E3A\u7A7A");
3801
+ throw new Error(t2("filePreview.emptyResponse"));
3070
3802
  }
3071
3803
  setContent(htmlText);
3072
3804
  };
@@ -3081,7 +3813,7 @@ var HtmlPreview = ({ fileUrl }) => {
3081
3813
  await fetchHtml(controller.signal);
3082
3814
  } catch (error2) {
3083
3815
  if (!controller.signal.aborted) {
3084
- setError("\u52A0\u8F7D\u6216\u89E3\u6790 HTML \u5931\u8D25");
3816
+ setError(t2("filePreview.htmlParseFailed"));
3085
3817
  }
3086
3818
  } finally {
3087
3819
  if (!controller.signal.aborted) {
@@ -3101,12 +3833,13 @@ var HtmlPreview = ({ fileUrl }) => {
3101
3833
  srcDoc: content,
3102
3834
  style: { width: "100%", height: "100%", border: "none" },
3103
3835
  sandbox: "allow-scripts allow-same-origin allow-popups allow-forms",
3104
- title: "HTML Preview"
3836
+ title: t2("filePreview.htmlPreviewTitle")
3105
3837
  }
3106
3838
  ) : null });
3107
3839
  };
3108
3840
  var HtmlPreview_default = HtmlPreview;
3109
3841
  var luyaFilePreview_default = ({ suffix, fileUrl, emptyProps, fileName }) => {
3842
+ const { t: t2 } = useTranslation(NS_COMMON);
3110
3843
  const extension = suffix ? suffix : getFileSuffixName(fileName || "");
3111
3844
  const Preview = useMemo(() => {
3112
3845
  if (!fileUrl) {
@@ -3122,7 +3855,7 @@ var luyaFilePreview_default = ({ suffix, fileUrl, emptyProps, fileName }) => {
3122
3855
  case "SVG":
3123
3856
  case "ICO":
3124
3857
  case "TIFF":
3125
- return /* @__PURE__ */ jsx(Image$1, { classNames: { root: styles_module_default.nsPreviewImage }, src: fileUrl, alt: "\u9884\u89C8\u56FE\u7247" });
3858
+ return /* @__PURE__ */ jsx(Image$1, { classNames: { root: styles_module_default.nsPreviewImage }, src: fileUrl, alt: t2("filePreview.previewImageAlt") });
3126
3859
  case "DOC":
3127
3860
  case "DOCX":
3128
3861
  case "PDF":
@@ -3167,30 +3900,18 @@ var luyaFilePreview_default = ({ suffix, fileUrl, emptyProps, fileName }) => {
3167
3900
  case "TXT":
3168
3901
  return /* @__PURE__ */ jsx(MarkdownPreview_default, { fileUrl, asPlainText: true });
3169
3902
  default:
3170
- return /* @__PURE__ */ jsx(Result, { subTitle: `${suffix || ""} \u6587\u4EF6\u6682\u4E0D\u652F\u6301\u5728\u7EBF\u9884\u89C8\uFF0C\u8BF7\u4E0B\u8F7D\u6253\u5F00` });
3903
+ return /* @__PURE__ */ jsx(Result, { subTitle: t2("filePreview.previewNotSupportedDownload", { suffix: suffix || "" }) });
3171
3904
  }
3172
3905
  }, [suffix, fileUrl, fileName]);
3173
3906
  return /* @__PURE__ */ jsx(Flex, { justify: "center", align: "center", className: "height-full p-t-16 p-b-16 p-l-16", children: Preview });
3174
3907
  };
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
3908
 
3189
3909
  // src/components/MicroApp/styles.module.less
3190
3910
  var styles_module_default3 = {
3191
3911
  microApp: "styles_module_microApp"
3192
3912
  };
3193
3913
  var MicroApp_default = ({ name, url, className, onMounted, onError, data, ...rest }) => {
3914
+ const { t: t2 } = useTranslation(NS_COMMON);
3194
3915
  const [loading, setLoading] = useState(false);
3195
3916
  useEffect(() => {
3196
3917
  setLoading(true);
@@ -3205,10 +3926,10 @@ var MicroApp_default = ({ name, url, className, onMounted, onError, data, ...res
3205
3926
  };
3206
3927
  const microAppData = useMemo(() => {
3207
3928
  const parentMainSource = window?.microApp?.getData?.()?.mainSource || [];
3208
- return { mainSource: [...parentMainSource, name], ...data };
3929
+ return { [LANG_KEY]: getLang(), mainSource: [...parentMainSource, name], ...data };
3209
3930
  }, [data, name]);
3210
3931
  const TagName = microApp.tagName || "micro-app";
3211
- return /* @__PURE__ */ jsxCustomEvent(Spin, { spinning: loading, classNames: { root: "full-spin" }, description: "\u52A0\u8F7D\u4E2D..." }, /* @__PURE__ */ jsxCustomEvent(
3932
+ return /* @__PURE__ */ jsxCustomEvent(Spin, { spinning: loading, classNames: { root: "full-spin" }, description: t2("microApp.loading") }, /* @__PURE__ */ jsxCustomEvent(
3212
3933
  TagName,
3213
3934
  {
3214
3935
  name,
@@ -3297,10 +4018,12 @@ var styles_module_default4 = {
3297
4018
  iframe: "styles_module_iframe"
3298
4019
  };
3299
4020
  var Iframe_default = forwardRef(({ defaultMainSource, id, src, className, onLoad }, ref) => {
4021
+ const { t: t2 } = useTranslation(NS_COMMON);
3300
4022
  const [loading, setLoading] = useState(false);
3301
4023
  const finalSrc = useMemo(() => {
3302
- return buildUrlParams({ v: Date.now() }, addUrlLastSlash(setUrlMainSource(src, location.href, defaultMainSource)));
3303
- }, [src]);
4024
+ const baseUrl = addUrlLastSlash(setUrlMainSource(src, location.href, defaultMainSource));
4025
+ return buildUrlParams({ v: Date.now(), [LANG_KEY]: getLang() }, baseUrl);
4026
+ }, [src, defaultMainSource]);
3304
4027
  const onHandleLoad = () => {
3305
4028
  setLoading(false);
3306
4029
  onLoad?.();
@@ -3308,7 +4031,7 @@ var Iframe_default = forwardRef(({ defaultMainSource, id, src, className, onLoad
3308
4031
  useEffect(() => {
3309
4032
  setLoading(true);
3310
4033
  }, [src]);
3311
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Spin, { spinning: loading, classNames: { root: "full-spin" }, description: "\u52A0\u8F7D\u4E2D...", children: /* @__PURE__ */ jsx(
4034
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Spin, { spinning: loading, classNames: { root: "full-spin" }, description: t2("iframe.loading"), children: /* @__PURE__ */ jsx(
3312
4035
  "iframe",
3313
4036
  {
3314
4037
  id,
@@ -3988,24 +4711,37 @@ function useIsBreakpoint(mode = "max", breakpoint = 768) {
3988
4711
  }
3989
4712
  var { TextArea } = Input;
3990
4713
  var AnnotationModal_default = ({ visible, onCancel, onConfirm }) => {
4714
+ const { t: t2 } = useTranslation(NS_COMMON);
3991
4715
  const [form] = Form.useForm();
3992
4716
  const handleOk = async () => {
3993
4717
  const values = await form.validateFields();
3994
4718
  onConfirm(values.content.trim());
3995
4719
  onCancel();
3996
4720
  };
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,
4721
+ return /* @__PURE__ */ jsx(
4722
+ Modal,
3999
4723
  {
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 })
4724
+ title: t2("markdownEditor.annotation.add"),
4725
+ open: visible,
4726
+ onOk: handleOk,
4727
+ onCancel,
4728
+ destroyOnHidden: true,
4729
+ okText: t2("common.confirm"),
4730
+ cancelText: t2("common.cancel"),
4731
+ children: /* @__PURE__ */ jsx(Form, { form, layout: "vertical", children: /* @__PURE__ */ jsx(
4732
+ Form.Item,
4733
+ {
4734
+ name: "content",
4735
+ label: t2("markdownEditor.annotation.content"),
4736
+ rules: [
4737
+ { whitespace: true, required: true, message: t2("markdownEditor.annotation.required") },
4738
+ { max: 500, message: t2("markdownEditor.annotation.maxLength") }
4739
+ ],
4740
+ children: /* @__PURE__ */ jsx(TextArea, { rows: 4, placeholder: t2("markdownEditor.annotation.placeholder"), showCount: true, maxLength: 500 })
4741
+ }
4742
+ ) })
4007
4743
  }
4008
- ) }) });
4744
+ );
4009
4745
  };
4010
4746
 
4011
4747
  // src/components/MarkdownEditor/annotation/constant.ts
@@ -4030,6 +4766,7 @@ var AnnotationSidebar_default = ({
4030
4766
  annotationConfig,
4031
4767
  onClose
4032
4768
  }) => {
4769
+ const { t: t2 } = useTranslation(NS_COMMON);
4033
4770
  const [form] = Form.useForm();
4034
4771
  const [editingId, setEditingId] = useState();
4035
4772
  const itemRefs = useRef({});
@@ -4066,7 +4803,7 @@ var AnnotationSidebar_default = ({
4066
4803
  /* @__PURE__ */ jsxs(Space, { children: [
4067
4804
  /* @__PURE__ */ jsx(MessageOutlined, {}),
4068
4805
  /* @__PURE__ */ jsxs("span", { children: [
4069
- "\u6279\u6CE8",
4806
+ t2("markdownEditor.annotation.title"),
4070
4807
  annotations.length > 0 && `\uFF08${annotations.length}\uFF09`
4071
4808
  ] })
4072
4809
  ] }),
@@ -4101,15 +4838,15 @@ var AnnotationSidebar_default = ({
4101
4838
  {
4102
4839
  name: "content",
4103
4840
  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" }
4841
+ { whitespace: true, required: true, message: t2("markdownEditor.annotation.required") },
4842
+ { max: 500, message: t2("markdownEditor.annotation.maxLength") }
4106
4843
  ],
4107
- children: /* @__PURE__ */ jsx(TextArea2, { autoFocus: true, rows: 2, placeholder: "\u8BF7\u8F93\u5165\u60A8\u7684\u6279\u6CE8\u5185\u5BB9...", showCount: true, maxLength: 500 })
4844
+ children: /* @__PURE__ */ jsx(TextArea2, { autoFocus: true, rows: 2, placeholder: t2("markdownEditor.annotation.placeholder"), showCount: true, maxLength: 500 })
4108
4845
  }
4109
4846
  ) }),
4110
4847
  /* @__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" })
4848
+ /* @__PURE__ */ jsx(Button, { size: "small", type: "primary", onClick: handleSaveEdit, children: t2("common.save") }),
4849
+ /* @__PURE__ */ jsx(Button, { size: "small", onClick: handleCancelEdit, children: t2("common.cancel") })
4113
4850
  ] })
4114
4851
  ] }) : /* @__PURE__ */ jsxs(Flex, { gap: 8, vertical: true, children: [
4115
4852
  /* @__PURE__ */ jsx(Text2, { children: annotation.content }),
@@ -4119,7 +4856,7 @@ var AnnotationSidebar_default = ({
4119
4856
  {
4120
4857
  type: "text",
4121
4858
  size: "small",
4122
- title: "\u7F16\u8F91\u6279\u6CE8",
4859
+ title: t2("markdownEditor.annotation.edit"),
4123
4860
  icon: /* @__PURE__ */ jsx(EditOutlined, {}),
4124
4861
  onClick: (e) => {
4125
4862
  handleEdit(annotation);
@@ -4129,12 +4866,12 @@ var AnnotationSidebar_default = ({
4129
4866
  /* @__PURE__ */ jsx(
4130
4867
  Popconfirm,
4131
4868
  {
4132
- title: "\u63D0\u793A",
4133
- okText: "\u786E\u5B9A",
4134
- cancelText: "\u53D6\u6D88",
4135
- description: "\u786E\u8BA4\u5220\u9664\u5F53\u524D\u6279\u6CE8\u5417?",
4869
+ title: t2("common.defaultTitle"),
4870
+ okText: t2("common.confirm"),
4871
+ cancelText: t2("common.cancel"),
4872
+ description: t2("markdownEditor.annotation.confirmDelete"),
4136
4873
  onConfirm: () => onDeleteAnnotation(annotation[ANNOTATION_ATTRS[0]]),
4137
- children: /* @__PURE__ */ jsx(Button, { type: "text", size: "small", title: "\u5220\u9664\u6279\u6CE8", icon: /* @__PURE__ */ jsx(DeleteOutlined, {}) })
4874
+ children: /* @__PURE__ */ jsx(Button, { type: "text", size: "small", title: t2("markdownEditor.annotation.delete"), icon: /* @__PURE__ */ jsx(DeleteOutlined, {}) })
4138
4875
  }
4139
4876
  )
4140
4877
  ] })
@@ -4143,7 +4880,7 @@ var AnnotationSidebar_default = ({
4143
4880
  }
4144
4881
  )
4145
4882
  }
4146
- ) : /* @__PURE__ */ jsx(Flex, { vertical: true, justify: "center", align: "center", className: "height-full", children: /* @__PURE__ */ jsx(Empty, { description: "\u6682\u65E0\u6279\u6CE8" }) })
4883
+ ) : /* @__PURE__ */ jsx(Flex, { vertical: true, justify: "center", align: "center", className: "height-full", children: /* @__PURE__ */ jsx(Empty, { description: t2("markdownEditor.annotation.empty") }) })
4147
4884
  }
4148
4885
  );
4149
4886
  const container = annotationConfig?.getContainer?.();
@@ -4428,7 +5165,7 @@ var useAnnotations = (annotationConfig) => {
4428
5165
  const id = genNonDuplicateID();
4429
5166
  editor.current.chain().focus().setMark(ANNOTATION_KEY, {
4430
5167
  "annotation-id": id,
4431
- "user-name": annotationConfig?.user?.name || "\u672A\u77E5",
5168
+ "user-name": annotationConfig?.user?.name || t("markdownEditor.unknown"),
4432
5169
  "user-id": annotationConfig?.user.id || "0000",
4433
5170
  "update-time": getTimestamp(),
4434
5171
  content
@@ -4710,6 +5447,7 @@ var collectionSidebar_default = ({
4710
5447
  collectionConfig,
4711
5448
  onClose
4712
5449
  }) => {
5450
+ const { t: t2 } = useTranslation(NS_COMMON);
4713
5451
  const itemRefs = useRef({});
4714
5452
  useEffect(() => {
4715
5453
  if (selectedCollectionId) {
@@ -4731,7 +5469,7 @@ var collectionSidebar_default = ({
4731
5469
  /* @__PURE__ */ jsxs(Space, { children: [
4732
5470
  /* @__PURE__ */ jsx(BookOutlined, {}),
4733
5471
  /* @__PURE__ */ jsxs("span", { children: [
4734
- "\u6458\u5F55",
5472
+ t2("markdownEditor.collection.title"),
4735
5473
  collections.length > 0 && `\uFF08${collections.length}\uFF09`
4736
5474
  ] })
4737
5475
  ] }),
@@ -4774,12 +5512,12 @@ var collectionSidebar_default = ({
4774
5512
  !disabled && selectedCollectionId === collection[COLLECTION_ATTRS[0]] && /* @__PURE__ */ jsx(Space, { children: /* @__PURE__ */ jsx(
4775
5513
  Popconfirm,
4776
5514
  {
4777
- title: "\u63D0\u793A",
4778
- okText: "\u786E\u5B9A",
4779
- cancelText: "\u53D6\u6D88",
4780
- description: "\u786E\u8BA4\u5220\u9664\u5F53\u524D\u6458\u5F55\u5417?",
5515
+ title: t2("common.defaultTitle"),
5516
+ okText: t2("common.confirm"),
5517
+ cancelText: t2("common.cancel"),
5518
+ description: t2("markdownEditor.collection.confirmDelete"),
4781
5519
  onConfirm: () => onDeleteCollection(collection[COLLECTION_ATTRS[0]]),
4782
- children: /* @__PURE__ */ jsx(Button, { type: "text", size: "small", title: "\u5220\u9664\u6458\u5F55", icon: /* @__PURE__ */ jsx(DeleteOutlined, {}) })
5520
+ children: /* @__PURE__ */ jsx(Button, { type: "text", size: "small", title: t2("markdownEditor.collection.delete"), icon: /* @__PURE__ */ jsx(DeleteOutlined, {}) })
4783
5521
  }
4784
5522
  ) })
4785
5523
  ] })
@@ -4788,7 +5526,7 @@ var collectionSidebar_default = ({
4788
5526
  );
4789
5527
  }
4790
5528
  }
4791
- ) : /* @__PURE__ */ jsx(Flex, { vertical: true, justify: "center", align: "center", className: "height-full", children: /* @__PURE__ */ jsx(Empty, { description: "\u6682\u65E0\u6458\u5F55" }) })
5529
+ ) : /* @__PURE__ */ jsx(Flex, { vertical: true, justify: "center", align: "center", className: "height-full", children: /* @__PURE__ */ jsx(Empty, { description: t2("markdownEditor.collection.empty") }) })
4792
5530
  }
4793
5531
  );
4794
5532
  const container = collectionConfig?.getContainer?.();
@@ -4829,7 +5567,7 @@ var useCollections = (collectionConfig) => {
4829
5567
  }
4830
5568
  editor.current.chain().focus().setMark(COLLECTION_KEY, {
4831
5569
  "collection-id": remoteId,
4832
- "user-name": collectionConfig?.user?.name || "\u672A\u77E5",
5570
+ "user-name": collectionConfig?.user?.name || t("markdownEditor.unknown"),
4833
5571
  "user-id": collectionConfig?.user.id || "0000",
4834
5572
  "update-time": getTimestamp(),
4835
5573
  "page-no": pageIndex
@@ -5289,13 +6027,14 @@ var Toolbar = forwardRef(
5289
6027
  ({ children, className, variant = "fixed", ...props }, ref) => {
5290
6028
  const toolbarRef = useRef(null);
5291
6029
  const composedRef = useComposedRef(toolbarRef, ref);
6030
+ const { t: t2 } = useTranslation(NS_COMMON);
5292
6031
  useToolbarNavigation(toolbarRef);
5293
6032
  return /* @__PURE__ */ jsx(
5294
6033
  "div",
5295
6034
  {
5296
6035
  ref: composedRef,
5297
6036
  role: "toolbar",
5298
- "aria-label": "toolbar",
6037
+ "aria-label": t2("markdownEditor.toolbar.toolbarAria"),
5299
6038
  "data-variant": variant,
5300
6039
  className: cn("tiptap-toolbar", className),
5301
6040
  ...props,
@@ -5378,6 +6117,7 @@ var BlockquoteButton = forwardRef(
5378
6117
  hideWhenUnavailable,
5379
6118
  onToggled
5380
6119
  });
6120
+ const { t: t2 } = useTranslation(NS_COMMON);
5381
6121
  const handleClick = useCallback(
5382
6122
  (event) => {
5383
6123
  onClick?.(event);
@@ -5401,7 +6141,7 @@ var BlockquoteButton = forwardRef(
5401
6141
  "data-disabled": !canToggle3,
5402
6142
  "aria-label": label,
5403
6143
  "aria-pressed": isActive,
5404
- tooltip: "\u5F15\u7528\u5757",
6144
+ tooltip: t2("markdownEditor.toolbar.blockquote"),
5405
6145
  onClick: handleClick,
5406
6146
  ...buttonProps,
5407
6147
  ref,
@@ -5569,7 +6309,7 @@ function useBlockquote(config) {
5569
6309
  isActive,
5570
6310
  handleToggle,
5571
6311
  canToggle: canToggle3,
5572
- label: "\u5F15\u7528\u5757",
6312
+ label: t("markdownEditor.toolbar.blockquote"),
5573
6313
  shortcutKeys: BLOCKQUOTE_SHORTCUT_KEY,
5574
6314
  Icon: BlockquoteIcon
5575
6315
  };
@@ -5604,6 +6344,7 @@ var CodeBlockButton = forwardRef(
5604
6344
  hideWhenUnavailable,
5605
6345
  onToggled
5606
6346
  });
6347
+ const { t: t2 } = useTranslation(NS_COMMON);
5607
6348
  const handleClick = useCallback(
5608
6349
  (event) => {
5609
6350
  onClick?.(event);
@@ -5627,7 +6368,7 @@ var CodeBlockButton = forwardRef(
5627
6368
  tabIndex: -1,
5628
6369
  "aria-label": label,
5629
6370
  "aria-pressed": isActive,
5630
- tooltip: "\u4EE3\u7801\u5757",
6371
+ tooltip: t2("markdownEditor.toolbar.codeBlock"),
5631
6372
  onClick: handleClick,
5632
6373
  ...buttonProps,
5633
6374
  ref,
@@ -5786,7 +6527,7 @@ function useCodeBlock(config) {
5786
6527
  isActive,
5787
6528
  handleToggle,
5788
6529
  canToggle: canToggleState,
5789
- label: "\u4EE3\u7801\u5757",
6530
+ label: t("markdownEditor.toolbar.codeBlock"),
5790
6531
  shortcutKeys: CODE_BLOCK_SHORTCUT_KEY,
5791
6532
  Icon: CodeBlockIcon
5792
6533
  };
@@ -5947,6 +6688,7 @@ var ColorHighlightButton = forwardRef(
5947
6688
  style,
5948
6689
  ...buttonProps
5949
6690
  }, ref) => {
6691
+ const { t: t2 } = useTranslation(NS_COMMON);
5950
6692
  const { editor } = useTiptapEditor(providedEditor);
5951
6693
  const {
5952
6694
  isVisible,
@@ -5958,7 +6700,7 @@ var ColorHighlightButton = forwardRef(
5958
6700
  } = useColorHighlight({
5959
6701
  editor,
5960
6702
  highlightColor,
5961
- label: text || `\u5207\u6362\u9AD8\u4EAE\u663E\u793A (${highlightColor})`,
6703
+ label: text || t2("markdownEditor.highlight.toggle", { color: highlightColor }),
5962
6704
  hideWhenUnavailable,
5963
6705
  mode,
5964
6706
  onApplied
@@ -6017,52 +6759,52 @@ ColorHighlightButton.displayName = "ColorHighlightButton";
6017
6759
  var COLOR_HIGHLIGHT_SHORTCUT_KEY = "mod+shift+h";
6018
6760
  var HIGHLIGHT_COLORS = [
6019
6761
  {
6020
- label: "\u9ED8\u8BA4\u80CC\u666F",
6762
+ labelKey: "markdownEditor.highlight.default",
6021
6763
  value: "var(--tt-bg-color)",
6022
6764
  border: "var(--tt-bg-color-contrast)"
6023
6765
  },
6024
6766
  {
6025
- label: "\u7070\u8272\u80CC\u666F",
6767
+ labelKey: "markdownEditor.highlight.gray",
6026
6768
  value: "var(--tt-color-highlight-gray)",
6027
6769
  border: "var(--tt-color-highlight-gray-contrast)"
6028
6770
  },
6029
6771
  {
6030
- label: "\u68D5\u8272\u80CC\u666F",
6772
+ labelKey: "markdownEditor.highlight.brown",
6031
6773
  value: "var(--tt-color-highlight-brown)",
6032
6774
  border: "var(--tt-color-highlight-brown-contrast)"
6033
6775
  },
6034
6776
  {
6035
- label: "\u6A59\u8272\u80CC\u666F",
6777
+ labelKey: "markdownEditor.highlight.orange",
6036
6778
  value: "var(--tt-color-highlight-orange)",
6037
6779
  border: "var(--tt-color-highlight-orange-contrast)"
6038
6780
  },
6039
6781
  {
6040
- label: "\u9EC4\u8272\u80CC\u666F",
6782
+ labelKey: "markdownEditor.highlight.yellow",
6041
6783
  value: "var(--tt-color-highlight-yellow)",
6042
6784
  border: "var(--tt-color-highlight-yellow-contrast)"
6043
6785
  },
6044
6786
  {
6045
- label: "\u7EFF\u8272\u80CC\u666F",
6787
+ labelKey: "markdownEditor.highlight.green",
6046
6788
  value: "var(--tt-color-highlight-green)",
6047
6789
  border: "var(--tt-color-highlight-green-contrast)"
6048
6790
  },
6049
6791
  {
6050
- label: "\u84DD\u8272\u80CC\u666F",
6792
+ labelKey: "markdownEditor.highlight.blue",
6051
6793
  value: "var(--tt-color-highlight-blue)",
6052
6794
  border: "var(--tt-color-highlight-blue-contrast)"
6053
6795
  },
6054
6796
  {
6055
- label: "\u7D2B\u8272\u80CC\u666F",
6797
+ labelKey: "markdownEditor.highlight.purple",
6056
6798
  value: "var(--tt-color-highlight-purple)",
6057
6799
  border: "var(--tt-color-highlight-purple-contrast)"
6058
6800
  },
6059
6801
  {
6060
- label: "\u7C89\u8272\u80CC\u666F",
6802
+ labelKey: "markdownEditor.highlight.pink",
6061
6803
  value: "var(--tt-color-highlight-pink)",
6062
6804
  border: "var(--tt-color-highlight-pink-contrast)"
6063
6805
  },
6064
6806
  {
6065
- label: "\u7EA2\u8272\u80CC\u666F",
6807
+ labelKey: "markdownEditor.highlight.red",
6066
6808
  value: "var(--tt-color-highlight-red)",
6067
6809
  border: "var(--tt-color-highlight-red-contrast)"
6068
6810
  }
@@ -6188,7 +6930,7 @@ function useColorHighlight(config) {
6188
6930
  const handleRemoveHighlight = useCallback(() => {
6189
6931
  const success = removeHighlight(editor, mode);
6190
6932
  if (success) {
6191
- onApplied?.({ color: "", label: "\u79FB\u9664\u80CC\u666F", mode });
6933
+ onApplied?.({ color: "", label: t("markdownEditor.highlight.removeBackground"), mode });
6192
6934
  }
6193
6935
  return success;
6194
6936
  }, [editor, onApplied, mode]);
@@ -6210,28 +6952,31 @@ function useColorHighlight(config) {
6210
6952
  handleColorHighlight,
6211
6953
  handleRemoveHighlight,
6212
6954
  canColorHighlight: canColorHighlightState,
6213
- label: label || `\u80CC\u666F\u8272`,
6955
+ label: label || t("markdownEditor.highlight.label"),
6214
6956
  shortcutKeys: COLOR_HIGHLIGHT_SHORTCUT_KEY,
6215
6957
  Icon: HighlighterIcon,
6216
6958
  mode
6217
6959
  };
6218
6960
  }
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
- ));
6961
+ var ColorHighlightPopoverButton = forwardRef(({ className, children, ...props }, ref) => {
6962
+ const { t: t2 } = useTranslation(NS_COMMON);
6963
+ return /* @__PURE__ */ jsx(
6964
+ Button7,
6965
+ {
6966
+ type: "button",
6967
+ className,
6968
+ "data-style": "ghost",
6969
+ "data-appearance": "default",
6970
+ role: "button",
6971
+ tabIndex: -1,
6972
+ "aria-label": t2("markdownEditor.highlight.textLabel"),
6973
+ tooltip: t2("markdownEditor.highlight.label"),
6974
+ ref,
6975
+ ...props,
6976
+ children: children ?? /* @__PURE__ */ jsx(HighlighterIcon, { className: "tiptap-button-icon" })
6977
+ }
6978
+ );
6979
+ });
6235
6980
  ColorHighlightPopoverButton.displayName = "ColorHighlightPopoverButton";
6236
6981
  function ColorHighlightPopoverContent({
6237
6982
  editor,
@@ -6246,9 +6991,10 @@ function ColorHighlightPopoverContent({
6246
6991
  const { handleRemoveHighlight } = useColorHighlight({ editor });
6247
6992
  const isMobile = useIsBreakpoint();
6248
6993
  const containerRef = useRef(null);
6994
+ const { t: t2 } = useTranslation(NS_COMMON);
6249
6995
  const menuItems = useMemo(
6250
- () => [...colors, { label: "\u79FB\u9664\u9AD8\u4EAE", value: "none" }],
6251
- [colors]
6996
+ () => [...colors.map((c) => ({ ...c, label: t2(c.labelKey) })), { label: t2("markdownEditor.highlight.removeHighlight"), value: "none" }],
6997
+ [colors, t2]
6252
6998
  );
6253
6999
  const { selectedIndex } = useMenuNavigation({
6254
7000
  containerRef,
@@ -6277,8 +7023,8 @@ function ColorHighlightPopoverContent({
6277
7023
  {
6278
7024
  editor,
6279
7025
  highlightColor: color.value,
6280
- tooltip: color.label,
6281
- "aria-label": `${color.label} highlight color`,
7026
+ tooltip: t2(color.labelKey),
7027
+ "aria-label": t2("markdownEditor.highlight.colorOptionAria", { label: t2(color.labelKey) }),
6282
7028
  tabIndex: index === selectedIndex ? 0 : -1,
6283
7029
  "data-highlighted": selectedIndex === index
6284
7030
  },
@@ -6289,8 +7035,8 @@ function ColorHighlightPopoverContent({
6289
7035
  Button7,
6290
7036
  {
6291
7037
  onClick: handleRemoveHighlight,
6292
- "aria-label": "\u79FB\u9664\u80CC\u666F",
6293
- tooltip: "\u79FB\u9664\u80CC\u666F",
7038
+ "aria-label": t2("markdownEditor.highlight.removeBackground"),
7039
+ tooltip: t2("markdownEditor.highlight.removeBackground"),
6294
7040
  tabIndex: selectedIndex === colors.length ? 0 : -1,
6295
7041
  type: "button",
6296
7042
  role: "menuitem",
@@ -6316,6 +7062,7 @@ function ColorHighlightPopover({
6316
7062
  onApplied,
6317
7063
  ...props
6318
7064
  }) {
7065
+ const { t: t2 } = useTranslation(NS_COMMON);
6319
7066
  const { editor } = useTiptapEditor(providedEditor);
6320
7067
  const [isOpen, setIsOpen] = useState(false);
6321
7068
  const { isVisible, canColorHighlight: canColorHighlight2, isActive, label, Icon } = useColorHighlight({
@@ -6338,7 +7085,7 @@ function ColorHighlightPopover({
6338
7085
  children: /* @__PURE__ */ jsx(Icon, { className: "tiptap-button-icon" })
6339
7086
  }
6340
7087
  ) }),
6341
- /* @__PURE__ */ jsx(PopoverContent, { "aria-label": "\u80CC\u666F\u8272", children: /* @__PURE__ */ jsx(ColorHighlightPopoverContent, { editor, colors }) })
7088
+ /* @__PURE__ */ jsx(PopoverContent, { "aria-label": t2("markdownEditor.highlight.label"), children: /* @__PURE__ */ jsx(ColorHighlightPopoverContent, { editor, colors }) })
6342
7089
  ] });
6343
7090
  }
6344
7091
  var ChevronDownIcon = memo(({ className, ...props }) => {
@@ -6821,6 +7568,7 @@ var HeadingDropdownMenu = forwardRef(
6821
7568
  }, ref) => {
6822
7569
  const { editor } = useTiptapEditor(providedEditor);
6823
7570
  const [isOpen, setIsOpen] = useState(false);
7571
+ const { t: t2 } = useTranslation(NS_COMMON);
6824
7572
  const { isVisible, isActive, canToggle: canToggle3, Icon } = useHeadingDropdownMenu({
6825
7573
  editor,
6826
7574
  levels,
@@ -6848,9 +7596,9 @@ var HeadingDropdownMenu = forwardRef(
6848
7596
  tabIndex: -1,
6849
7597
  disabled: !canToggle3,
6850
7598
  "data-disabled": !canToggle3,
6851
- "aria-label": "Format text as heading",
7599
+ "aria-label": t2("markdownEditor.toolbar.heading"),
6852
7600
  "aria-pressed": isActive,
6853
- tooltip: "\u6807\u9898",
7601
+ tooltip: t2("markdownEditor.toolbar.heading"),
6854
7602
  ...buttonProps,
6855
7603
  ref,
6856
7604
  children: [
@@ -6864,10 +7612,10 @@ var HeadingDropdownMenu = forwardRef(
6864
7612
  {
6865
7613
  editor,
6866
7614
  level,
6867
- text: `\u6807\u9898 ${level}`,
7615
+ text: t2("markdownEditor.toolbar.headingLevel", { level }),
6868
7616
  showTooltip: false
6869
7617
  }
6870
- ) }, `\u6807\u9898 ${level}`)) }) }) }) })
7618
+ ) }, level)) }) }) }) })
6871
7619
  ] });
6872
7620
  }
6873
7621
  );
@@ -6930,7 +7678,7 @@ function useHeadingDropdownMenu(config) {
6930
7678
  isActive,
6931
7679
  canToggle: canToggleState,
6932
7680
  levels,
6933
- label: "\u6807\u9898",
7681
+ label: t("markdownEditor.toolbar.heading"),
6934
7682
  Icon: activeLevel ? headingIcons[activeLevel] : HeadingIcon
6935
7683
  };
6936
7684
  }
@@ -7056,6 +7804,7 @@ function InputGroup({
7056
7804
  }
7057
7805
  var LinkButton = forwardRef(
7058
7806
  ({ className, children, ...props }, ref) => {
7807
+ const { t: t2 } = useTranslation(NS_COMMON);
7059
7808
  return /* @__PURE__ */ jsx(
7060
7809
  Button7,
7061
7810
  {
@@ -7064,8 +7813,8 @@ var LinkButton = forwardRef(
7064
7813
  "data-style": "ghost",
7065
7814
  role: "button",
7066
7815
  tabIndex: -1,
7067
- "aria-label": "\u94FE\u63A5",
7068
- tooltip: "\u94FE\u63A5",
7816
+ "aria-label": t2("markdownEditor.toolbar.link"),
7817
+ tooltip: t2("markdownEditor.toolbar.link"),
7069
7818
  ref,
7070
7819
  ...props,
7071
7820
  children: children || /* @__PURE__ */ jsx(LinkIcon, { className: "tiptap-button-icon" })
@@ -7083,6 +7832,7 @@ var LinkMain = ({
7083
7832
  isActive
7084
7833
  }) => {
7085
7834
  const isMobile = useIsBreakpoint();
7835
+ const { t: t2 } = useTranslation(NS_COMMON);
7086
7836
  const handleKeyDown = (event) => {
7087
7837
  if (event.key === "Enter") {
7088
7838
  event.preventDefault();
@@ -7106,7 +7856,7 @@ var LinkMain = ({
7106
7856
  Input4,
7107
7857
  {
7108
7858
  type: "url",
7109
- placeholder: "\u7C98\u8D34\u94FE\u63A5...",
7859
+ placeholder: t2("markdownEditor.toolbar.linkPlaceholder"),
7110
7860
  value: url,
7111
7861
  onChange: (e) => setUrl(e.target.value),
7112
7862
  onKeyDown: handleKeyDown,
@@ -7121,7 +7871,7 @@ var LinkMain = ({
7121
7871
  {
7122
7872
  type: "button",
7123
7873
  onClick: setLink,
7124
- title: "\u5E94\u7528\u94FE\u63A5",
7874
+ title: t2("markdownEditor.toolbar.applyLink"),
7125
7875
  disabled: !url && !isActive,
7126
7876
  "data-style": "ghost",
7127
7877
  children: /* @__PURE__ */ jsx(CornerDownLeftIcon, { className: "tiptap-button-icon" })
@@ -7134,7 +7884,7 @@ var LinkMain = ({
7134
7884
  {
7135
7885
  type: "button",
7136
7886
  onClick: openLink,
7137
- title: "\u5728\u65B0\u7A97\u53E3\u4E2D\u6253\u5F00",
7887
+ title: t2("markdownEditor.toolbar.openInNewWindow"),
7138
7888
  disabled: !url && !isActive,
7139
7889
  "data-style": "ghost",
7140
7890
  children: /* @__PURE__ */ jsx(ExternalLinkIcon, { className: "tiptap-button-icon" })
@@ -7145,7 +7895,7 @@ var LinkMain = ({
7145
7895
  {
7146
7896
  type: "button",
7147
7897
  onClick: removeLink,
7148
- title: "\u79FB\u9664\u94FE\u63A5",
7898
+ title: t2("markdownEditor.toolbar.removeLink"),
7149
7899
  disabled: !url && !isActive,
7150
7900
  "data-style": "ghost",
7151
7901
  children: /* @__PURE__ */ jsx(TrashIcon, { className: "tiptap-button-icon" })
@@ -7659,10 +8409,10 @@ var listIcons = {
7659
8409
  orderedList: ListOrderedIcon,
7660
8410
  taskList: ListTodoIcon
7661
8411
  };
7662
- var listLabels = {
7663
- bulletList: "\u65E0\u5E8F\u5217\u8868",
7664
- orderedList: "\u6709\u5E8F\u5217\u8868",
7665
- taskList: "\u4EFB\u52A1\u5217\u8868"
8412
+ var listLabelKeys = {
8413
+ bulletList: "markdownEditor.toolbar.bulletList",
8414
+ orderedList: "markdownEditor.toolbar.orderedList",
8415
+ taskList: "markdownEditor.toolbar.taskList"
7666
8416
  };
7667
8417
  var LIST_SHORTCUT_KEYS = {
7668
8418
  bulletList: "mod+shift+8",
@@ -7809,24 +8559,24 @@ function useList(config) {
7809
8559
  isActive,
7810
8560
  handleToggle,
7811
8561
  canToggle: canToggle3,
7812
- label: listLabels[type],
8562
+ label: t(listLabelKeys[type]),
7813
8563
  shortcutKeys: LIST_SHORTCUT_KEYS[type],
7814
8564
  Icon: listIcons[type]
7815
8565
  };
7816
8566
  }
7817
8567
  var listOptions = [
7818
8568
  {
7819
- label: "\u65E0\u5E8F\u5217\u8868",
8569
+ labelKey: "markdownEditor.toolbar.bulletList",
7820
8570
  type: "bulletList",
7821
8571
  icon: ListIcon
7822
8572
  },
7823
8573
  {
7824
- label: "\u6709\u5E8F\u5217\u8868",
8574
+ labelKey: "markdownEditor.toolbar.orderedList",
7825
8575
  type: "orderedList",
7826
8576
  icon: ListOrderedIcon
7827
8577
  },
7828
8578
  {
7829
- label: "\u4EFB\u52A1\u5217\u8868",
8579
+ labelKey: "markdownEditor.toolbar.taskList",
7830
8580
  type: "taskList",
7831
8581
  icon: ListTodoIcon
7832
8582
  }
@@ -7867,7 +8617,13 @@ function useListDropdownMenu(config) {
7867
8617
  const { editor } = useTiptapEditor(providedEditor);
7868
8618
  const [isVisible, setIsVisible] = useState(true);
7869
8619
  const listInSchema = types.some((type) => isNodeInSchema(type, editor));
7870
- const filteredLists = useMemo(() => getFilteredListOptions(types), [types]);
8620
+ const filteredLists = useMemo(
8621
+ () => getFilteredListOptions(types).map((option) => ({
8622
+ ...option,
8623
+ label: t(option.labelKey)
8624
+ })),
8625
+ [types]
8626
+ );
7871
8627
  const canToggleAny = canToggleAnyList(editor, types);
7872
8628
  const isAnyActive = isAnyListActive(editor, types);
7873
8629
  const activeType = getActiveListType(editor, types);
@@ -7897,7 +8653,7 @@ function useListDropdownMenu(config) {
7897
8653
  canToggle: canToggleAny,
7898
8654
  types,
7899
8655
  filteredLists,
7900
- label: "List",
8656
+ label: t("markdownEditor.toolbar.list"),
7901
8657
  Icon: activeList ? listIcons[activeList.type] : ListIcon
7902
8658
  };
7903
8659
  }
@@ -7911,6 +8667,7 @@ function ListDropdownMenu({
7911
8667
  }) {
7912
8668
  const { editor } = useTiptapEditor(providedEditor);
7913
8669
  const [isOpen, setIsOpen] = useState(false);
8670
+ const { t: t2 } = useTranslation(NS_COMMON);
7914
8671
  const { filteredLists, canToggle: canToggle3, isActive, isVisible, Icon } = useListDropdownMenu({
7915
8672
  editor,
7916
8673
  types,
@@ -7937,8 +8694,8 @@ function ListDropdownMenu({
7937
8694
  tabIndex: -1,
7938
8695
  disabled: !canToggle3,
7939
8696
  "data-disabled": !canToggle3,
7940
- "aria-label": "\u5217\u8868\u9009\u9879",
7941
- tooltip: "\u5217\u8868",
8697
+ "aria-label": t2("markdownEditor.toolbar.listOptions"),
8698
+ tooltip: t2("markdownEditor.toolbar.list"),
7942
8699
  ...props,
7943
8700
  children: [
7944
8701
  /* @__PURE__ */ jsx(Icon, { className: "tiptap-button-icon" }),
@@ -8274,14 +9031,14 @@ var MARK_SHORTCUT_KEYS = {
8274
9031
  superscript: "mod+.",
8275
9032
  subscript: "mod+,"
8276
9033
  };
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"
9034
+ var MARK_ACTION_LABEL_KEYS = {
9035
+ bold: "markdownEditor.toolbar.bold",
9036
+ italic: "markdownEditor.toolbar.italic",
9037
+ underline: "markdownEditor.toolbar.underline",
9038
+ strike: "markdownEditor.toolbar.strike",
9039
+ code: "markdownEditor.toolbar.code",
9040
+ superscript: "markdownEditor.toolbar.superscript",
9041
+ subscript: "markdownEditor.toolbar.subscript"
8285
9042
  };
8286
9043
  function canToggleMark(editor, type) {
8287
9044
  if (!editor || !editor.isEditable) return false;
@@ -8308,7 +9065,8 @@ function shouldShowButton6(props) {
8308
9065
  return true;
8309
9066
  }
8310
9067
  function getFormattedMarkName(type) {
8311
- return MARK_ACTION_LABELS[type] || type.charAt(0).toUpperCase() + type.slice(1);
9068
+ const labelKey = MARK_ACTION_LABEL_KEYS[type];
9069
+ return labelKey ? t(labelKey) : type.charAt(0).toUpperCase() + type.slice(1);
8312
9070
  }
8313
9071
  function useMark(config) {
8314
9072
  const {
@@ -8618,11 +9376,11 @@ var textAlignIcons = {
8618
9376
  right: AlignRightIcon,
8619
9377
  justify: AlignJustifyIcon
8620
9378
  };
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"
9379
+ var textAlignLabelKeys = {
9380
+ left: "markdownEditor.toolbar.alignLeft",
9381
+ center: "markdownEditor.toolbar.alignCenter",
9382
+ right: "markdownEditor.toolbar.alignRight",
9383
+ justify: "markdownEditor.toolbar.alignJustify"
8626
9384
  };
8627
9385
  function canSetTextAlign(editor, align) {
8628
9386
  if (!editor || !editor.isEditable) return false;
@@ -8690,7 +9448,7 @@ function useTextAlign(config) {
8690
9448
  isActive,
8691
9449
  handleTextAlign,
8692
9450
  canAlign,
8693
- label: textAlignLabels[align],
9451
+ label: t(textAlignLabelKeys[align]),
8694
9452
  shortcutKeys: TEXT_ALIGN_SHORTCUT_KEYS[align],
8695
9453
  Icon: textAlignIcons[align]
8696
9454
  };
@@ -8815,9 +9573,9 @@ var UNDO_REDO_SHORTCUT_KEYS = {
8815
9573
  undo: "mod+z",
8816
9574
  redo: "mod+shift+z"
8817
9575
  };
8818
- var historyActionLabels = {
8819
- undo: "\u64A4\u9500",
8820
- redo: "\u91CD\u505A"
9576
+ var historyActionLabelKeys = {
9577
+ undo: "markdownEditor.toolbar.undo",
9578
+ redo: "markdownEditor.toolbar.redo"
8821
9579
  };
8822
9580
  var historyIcons = {
8823
9581
  undo: Undo2Icon,
@@ -8875,7 +9633,7 @@ function useUndoRedo(config) {
8875
9633
  isVisible,
8876
9634
  handleAction,
8877
9635
  canExecute,
8878
- label: historyActionLabels[action],
9636
+ label: t(historyActionLabelKeys[action]),
8879
9637
  shortcutKeys: UNDO_REDO_SHORTCUT_KEYS[action],
8880
9638
  Icon: historyIcons[action]
8881
9639
  };
@@ -9138,6 +9896,7 @@ var MainToolbarContent = ({
9138
9896
  isMobile,
9139
9897
  isBubble
9140
9898
  }) => {
9899
+ const { t: t2 } = useTranslation(NS_COMMON);
9141
9900
  return /* @__PURE__ */ jsxs(Fragment, { children: [
9142
9901
  /* @__PURE__ */ jsx(Spacer, {}),
9143
9902
  !isBubble && tools.includes("undo-redo") && /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -9147,9 +9906,9 @@ var MainToolbarContent = ({
9147
9906
  ] }),
9148
9907
  /* @__PURE__ */ jsx(ToolbarSeparator, {})
9149
9908
  ] }),
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" }) }),
9909
+ onQuote && /* @__PURE__ */ jsx(ToolbarGroup, { children: /* @__PURE__ */ jsx(SelectButton, { icon: /* @__PURE__ */ jsx(QuoteIcon, {}), tooltip: t2("markdownEditor.toolbar.quote"), onClick: onQuote, children: t2("markdownEditor.toolbar.quote") }) }),
9910
+ onCreateAnnotation && /* @__PURE__ */ jsx(ToolbarGroup, { children: /* @__PURE__ */ jsx(SelectButton, { icon: /* @__PURE__ */ jsx(MessageOutlined, {}), tooltip: t2("markdownEditor.toolbar.annotation"), onClick: onCreateAnnotation, children: t2("markdownEditor.toolbar.annotation") }) }),
9911
+ 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
9912
  (tools.includes("heading") || tools.includes("list") || tools.includes("block")) && /* @__PURE__ */ jsxs(Fragment, { children: [
9154
9913
  /* @__PURE__ */ jsxs(ToolbarGroup, { children: [
9155
9914
  tools.includes("heading") && /* @__PURE__ */ jsx(HeadingDropdownMenu, { levels: [1, 2, 3, 4], portal: isMobile }),
@@ -9390,9 +10149,9 @@ var SearchAndReplace = Extension.create({
9390
10149
  addProseMirrorPlugins() {
9391
10150
  const editor = this.editor;
9392
10151
  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;
10152
+ const setLastSearchTerm = (t2) => editor.storage.searchAndReplace.lastSearchTerm = t2;
10153
+ const setLastCaseSensitive = (t2) => editor.storage.searchAndReplace.lastCaseSensitive = t2;
10154
+ const setLastResultIndex = (t2) => editor.storage.searchAndReplace.lastResultIndex = t2;
9396
10155
  return [
9397
10156
  new Plugin({
9398
10157
  key: searchAndReplacePluginKey,
@@ -9493,6 +10252,7 @@ var MarkdownEditor_default = forwardRef(
9493
10252
  collectionConfig,
9494
10253
  pageNoConfig
9495
10254
  }, ref) => {
10255
+ const { t: t2 } = useTranslation(NS_COMMON);
9496
10256
  const isMobile = useIsBreakpoint();
9497
10257
  const lastContentRef = useRef("");
9498
10258
  const { setPageNoEditor, onPageChange } = usePageNo(pageNoConfig);
@@ -9529,7 +10289,7 @@ var MarkdownEditor_default = forwardRef(
9529
10289
  autocomplete: "off",
9530
10290
  autocorrect: "off",
9531
10291
  autocapitalize: "off",
9532
- "aria-label": "\u4E3B\u5185\u5BB9\u533A\u57DF\uFF0C\u5F00\u59CB\u8F93\u5165\u6587\u672C..."
10292
+ "aria-label": t2("markdownEditor.mainArea")
9533
10293
  }
9534
10294
  },
9535
10295
  extensions: [
@@ -9690,7 +10450,7 @@ var MarkdownEditor_default = forwardRef(
9690
10450
  Button,
9691
10451
  {
9692
10452
  size: "small",
9693
- title: "\u6279\u6CE8\u5217\u8868",
10453
+ title: t2("markdownEditor.annotation.list"),
9694
10454
  icon: /* @__PURE__ */ jsx(MessageOutlined, {}),
9695
10455
  color: "primary",
9696
10456
  variant: "text",
@@ -9702,15 +10462,15 @@ var MarkdownEditor_default = forwardRef(
9702
10462
  {
9703
10463
  style: { gap: "2px" },
9704
10464
  size: "small",
9705
- title: "\u6458\u5F55\u5217\u8868",
10465
+ title: t2("markdownEditor.collection.list"),
9706
10466
  icon: /* @__PURE__ */ jsx(BookOutlined, {}),
9707
10467
  color: "primary",
9708
10468
  variant: "text",
9709
10469
  onClick: () => setShowCollection(!showCollection),
9710
- children: "\u6458\u5F55"
10470
+ children: t2("markdownEditor.collection.title")
9711
10471
  }
9712
10472
  ),
9713
- onDownloadFile && /* @__PURE__ */ jsx(Button, { size: "small", color: "primary", variant: "text", onClick: downloadFile2, children: "\u4E0B\u8F7D" }),
10473
+ onDownloadFile && /* @__PURE__ */ jsx(Button, { size: "small", color: "primary", variant: "text", onClick: downloadFile2, children: t2("common.download") }),
9714
10474
  extraNav
9715
10475
  ] })
9716
10476
  ] }),
@@ -9867,6 +10627,6 @@ var UserAvatar_default = ({ size, avatarSrc, userName }) => {
9867
10627
  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
10628
  };
9869
10629
 
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 };
10630
+ 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
10631
  //# sourceMappingURL=index.esm.js.map
9872
10632
  //# sourceMappingURL=index.esm.js.map