gitalk-react 1.0.0-beta.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/LICENSE +9 -0
- package/README-zh-CN.md +257 -0
- package/README.md +257 -0
- package/dist/gitalk-dark.css +1 -0
- package/dist/gitalk-light.css +1 -0
- package/dist/gitalk.d.ts +445 -0
- package/dist/gitalk.js +12560 -0
- package/dist/gitalk.umd.cjs +121 -0
- package/lib/assets/arrow-down.svg +1 -0
- package/lib/assets/edit.svg +3 -0
- package/lib/assets/github.svg +3 -0
- package/lib/assets/heart-filled.svg +3 -0
- package/lib/assets/heart.svg +3 -0
- package/lib/assets/reply.svg +3 -0
- package/lib/assets/tip.svg +8 -0
- package/lib/components/action.tsx +21 -0
- package/lib/components/avatar.tsx +42 -0
- package/lib/components/button.tsx +35 -0
- package/lib/components/comment.tsx +153 -0
- package/lib/components/svg.tsx +29 -0
- package/lib/constants/index.ts +43 -0
- package/lib/contexts/I18nContext.ts +18 -0
- package/lib/gitalk.tsx +1231 -0
- package/lib/i18n/de.json +20 -0
- package/lib/i18n/en.json +20 -0
- package/lib/i18n/es-ES.json +20 -0
- package/lib/i18n/fa.json +20 -0
- package/lib/i18n/fr.json +20 -0
- package/lib/i18n/index.ts +40 -0
- package/lib/i18n/ja.json +20 -0
- package/lib/i18n/ko.json +20 -0
- package/lib/i18n/pl.json +21 -0
- package/lib/i18n/ru.json +20 -0
- package/lib/i18n/zh-CN.json +20 -0
- package/lib/i18n/zh-TW.json +20 -0
- package/lib/interfaces/index.ts +30 -0
- package/lib/services/graphql/comment.ts +85 -0
- package/lib/services/request.ts +24 -0
- package/lib/services/user.ts +40 -0
- package/lib/themes/base.scss +592 -0
- package/lib/themes/gitalk-dark.scss +24 -0
- package/lib/themes/gitalk-light.scss +24 -0
- package/lib/utils/compatibility.ts +35 -0
- package/lib/utils/dom.ts +15 -0
- package/lib/utils/logger.ts +56 -0
- package/lib/utils/query.ts +19 -0
- package/package.json +83 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Released under MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 LolipopJ.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README-zh-CN.md
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
[ENGLISH](./README.md) | 简体中文
|
|
2
|
+
|
|
3
|
+
# Gitalk React
|
|
4
|
+
|
|
5
|
+
使用 TypeScript, React 和 Vite 重新实现 [Gitalk](https://github.com/gitalk/gitalk) —— 基于 Github 议题的评论组件。
|
|
6
|
+
|
|
7
|
+
面向现代浏览器开发,专注于减少构建包的体积,提升开发与使用的体验。
|
|
8
|
+
|
|
9
|
+
## 与原版的区别
|
|
10
|
+
|
|
11
|
+
- **不兼容旧版浏览器**:仅保证兼容支持 [ES2020](https://caniuse.com/?feats=mdn-javascript_operators_optional_chaining,mdn-javascript_operators_nullish_coalescing,mdn-javascript_builtins_globalthis,es6-module-dynamic-import,bigint,mdn-javascript_builtins_promise_allsettled,mdn-javascript_builtins_string_matchall,mdn-javascript_statements_export_namespace,mdn-javascript_operators_import_meta) 的现代浏览器。
|
|
12
|
+
- **依赖 React 运行时环境**:`react >= 16.8.0 && react-dom >= 16.8.0`。
|
|
13
|
+
|
|
14
|
+
## 开发中的功能
|
|
15
|
+
|
|
16
|
+
- [ ] Feature: 支持在 Gitalk 编辑自己发表的评论。
|
|
17
|
+
- [ ] refactor: 逐渐移除对非必要三方库的依赖。减少构建包的体积。
|
|
18
|
+
- [ ] test: 添加自动化测试流程。提升项目的健壮性。
|
|
19
|
+
- [ ] chore: 部署预览环境。
|
|
20
|
+
|
|
21
|
+
## 快速开始
|
|
22
|
+
|
|
23
|
+
### 安装
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install gitalk-react
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### 使用
|
|
30
|
+
|
|
31
|
+
在项目中引入 Gitalk 的样式与组件:
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
// 引入浅色模式样式
|
|
35
|
+
import 'gitalk-react/gitalk.css'
|
|
36
|
+
// 或深色模式样式
|
|
37
|
+
import 'gitalk-react/gitalk-dark.css'
|
|
38
|
+
|
|
39
|
+
import Gitalk from 'gitalk-react'
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Gitalk 依赖于 Github OAuth App 实现登录鉴权,您需要首先[注册一个应用](https://github.com/settings/applications/new)。请注意,您必须将站点域名作为 `Authorization callback URL` 字段的值,例如 `https://yourdomain.com/site` 或开发环境下的 `http://localhost:5432`。
|
|
43
|
+
|
|
44
|
+
使用 Gitalk 组件,填写必要的配置项:
|
|
45
|
+
|
|
46
|
+
- `clientId`:Github OAuth App 的 ID。
|
|
47
|
+
- `clientSecret`:Github OAuth App 的 Secret 密钥。
|
|
48
|
+
- `owner`:Github 用户名。
|
|
49
|
+
- `repo`:Github 仓库名。需要是公开的仓库。
|
|
50
|
+
- `admin`:Gitalk 管理员列表,只有列表里的人可以初始化评论议题。可以是 Github 仓库的拥有者和协作者。
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
<Gitalk
|
|
54
|
+
clientID="YOUR_GITHUB_OAUTH_APP_CLIENT_ID"
|
|
55
|
+
clientSecret="YOUR_GITHUB_OAUTH_APP_CLIENT_SECRET"
|
|
56
|
+
owner="GITHUB_REPO_OWNER"
|
|
57
|
+
repo="GITHUB_REPO_NAME"
|
|
58
|
+
admin={['GITHUB_REPO_OWNER', 'GITHUB_REPO_COLLABORATOR']}
|
|
59
|
+
/>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## 配置
|
|
63
|
+
|
|
64
|
+
### clientID `string`
|
|
65
|
+
|
|
66
|
+
**必填项**。Github OAuth App 的 ID。
|
|
67
|
+
|
|
68
|
+
### clientSecret `string`
|
|
69
|
+
|
|
70
|
+
**必填项**。Github OAuth App 的 Secret 密钥。
|
|
71
|
+
|
|
72
|
+
### owner `string`
|
|
73
|
+
|
|
74
|
+
**必填项**。Github 用户名。
|
|
75
|
+
|
|
76
|
+
### repo `string`
|
|
77
|
+
|
|
78
|
+
**必填项**。Github 仓库名。需要是公开的仓库
|
|
79
|
+
|
|
80
|
+
### admin `string[]`
|
|
81
|
+
|
|
82
|
+
**必填项**。Gitalk 管理员列表。可以是 Github 仓库的拥有者和协作者:拥有对此仓库**写权限**的用户。
|
|
83
|
+
|
|
84
|
+
### id `string = location.href`
|
|
85
|
+
|
|
86
|
+
评论议题的唯一标识符,长度不能超过 50。
|
|
87
|
+
|
|
88
|
+
Gitalk 在创建评论议题时,自动将此参数作为评论议题的标签项,并默认通过它来获取评论议题。
|
|
89
|
+
|
|
90
|
+
对于博客等类型的站点,推荐将页面的 `slug` 作为参数。
|
|
91
|
+
|
|
92
|
+
### number `number = -1`
|
|
93
|
+
|
|
94
|
+
评论议题的编号。
|
|
95
|
+
|
|
96
|
+
如果指定了此参数,那么 Gitalk 将通过它来获取评论议题,而非标识符。
|
|
97
|
+
|
|
98
|
+
### labels `string[] = ["Gitalk"]`
|
|
99
|
+
|
|
100
|
+
评论议题的标签。
|
|
101
|
+
|
|
102
|
+
### title `string = document.title`
|
|
103
|
+
|
|
104
|
+
评论议题的标题。
|
|
105
|
+
|
|
106
|
+
### body `string = location.href + meta[name="description"]`
|
|
107
|
+
|
|
108
|
+
评论议题的内容。
|
|
109
|
+
|
|
110
|
+
### language `string = navigator.language`
|
|
111
|
+
|
|
112
|
+
Gitalk 使用的语言。
|
|
113
|
+
|
|
114
|
+
可用的语言包括:`"de" | "en" | "es-ES" | "fa" | "fr" | "ja" | "ko" | "pl" | "ru" | "zh-CN" | "zh-TW"`。
|
|
115
|
+
|
|
116
|
+
### perPage `number = 10`
|
|
117
|
+
|
|
118
|
+
每页加载的评论数,不能超过 100。
|
|
119
|
+
|
|
120
|
+
### pagerDirection `"last" | "first" = "last"`
|
|
121
|
+
|
|
122
|
+
评论排序的方式。`last` 表示按评论创建时间倒叙排列,`first` 表示按评论创建时间正叙排列。
|
|
123
|
+
|
|
124
|
+
### createIssueManually `boolean = true`
|
|
125
|
+
|
|
126
|
+
当评论议题不存在时,Gitalk 将会自动为您创建一个新的评论议题。
|
|
127
|
+
|
|
128
|
+
如果您希望在管理员登录后,手动点击按钮以创建评论议题,则可以将其设置为 `false`。
|
|
129
|
+
|
|
130
|
+
### enableHotKey `boolean = true`
|
|
131
|
+
|
|
132
|
+
是否启用热键 `cmd + enter` 或 `ctrl + enter` 来创建评论。
|
|
133
|
+
|
|
134
|
+
### distractionFreeMode `boolean = false`
|
|
135
|
+
|
|
136
|
+
是否启用仿 Facebook 评论框的全屏遮罩效果。
|
|
137
|
+
|
|
138
|
+
### flipMoveOptions `FlipMove.FlipMoveProps`
|
|
139
|
+
|
|
140
|
+
评论列表的动画效果。
|
|
141
|
+
|
|
142
|
+
默认值,效果[参考](https://github.com/joshwcomeau/react-flip-move/blob/master/documentation/enter_leave_animations.md):
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"staggerDelayBy": 150,
|
|
147
|
+
"appearAnimation": "accordionVertical",
|
|
148
|
+
"enterAnimation": "accordionVertical",
|
|
149
|
+
"leaveAnimation": "accordionVertical"
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### proxy `string = "https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token"`
|
|
154
|
+
|
|
155
|
+
Github OAuth App 鉴权反向代理,支持 CORS。[为什么需要它?](https://github.com/isaacs/github/issues/330)
|
|
156
|
+
|
|
157
|
+
### updateCountCallback `(count: number) => void`
|
|
158
|
+
|
|
159
|
+
评论数量更新的调用的回调方法。
|
|
160
|
+
|
|
161
|
+
### onCreateComment `(comment: CommentType) => void`
|
|
162
|
+
|
|
163
|
+
创建评论**成功时**调用的回调方法。
|
|
164
|
+
|
|
165
|
+
## 主题样式
|
|
166
|
+
|
|
167
|
+
通过设置 CSS 变量,您可以快速地将 Gitalk 的主题颜色修改为适配您站点的样式。
|
|
168
|
+
|
|
169
|
+
当您引入浅色主题 `import 'gitalk-react/gitalk.css'` 时,默认的 CSS 变量如下:
|
|
170
|
+
|
|
171
|
+
```css
|
|
172
|
+
.gt-container {
|
|
173
|
+
--gt-theme-mode: light;
|
|
174
|
+
--gt-color-text: #171717;
|
|
175
|
+
--gt-color-main: #3b82f6;
|
|
176
|
+
--gt-color-main-lighter: rgb(107.7609756098, 161.0975609756, 248.2390243902);
|
|
177
|
+
--gt-color-sub: #a1a1a1;
|
|
178
|
+
--gt-color-loader: #999;
|
|
179
|
+
--gt-color-error: #ff3860;
|
|
180
|
+
--gt-color-hr: #e9e9e9;
|
|
181
|
+
--gt-color-input-border: rgb(0 0 0 / 10%);
|
|
182
|
+
--gt-color-input-bg: #f6f6f6;
|
|
183
|
+
--gt-color-input-bg-lighter: hsl(0, 0%, 146.4705882353%);
|
|
184
|
+
--gt-color-comment-bg: #f9f9f9;
|
|
185
|
+
--gt-color-comment-shadow: rgb(218.4, 218.4, 218.4);
|
|
186
|
+
--gt-color-comment-shadow-admin: rgb(203.1, 203.1, 203.1);
|
|
187
|
+
--gt-color-comment-txt: #333;
|
|
188
|
+
--gt-color-link-active: #333;
|
|
189
|
+
--gt-color-btn: #fff;
|
|
190
|
+
--gt-color-popbg: #fff;
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
引入深色主题 `import 'gitalk-react/gitalk-dark.css'` 时,默认的 CSS 变量如下:
|
|
195
|
+
|
|
196
|
+
```css
|
|
197
|
+
.gt-container {
|
|
198
|
+
--gt-theme-mode: dark;
|
|
199
|
+
--gt-color-text: #e9e9e9;
|
|
200
|
+
--gt-color-main: #6366f1;
|
|
201
|
+
--gt-color-main-lighter: rgb(122.4, 124.95, 243.1);
|
|
202
|
+
--gt-color-sub: #9e9e9e;
|
|
203
|
+
--gt-color-loader: #777;
|
|
204
|
+
--gt-color-error: #ef4444;
|
|
205
|
+
--gt-color-hr: #555;
|
|
206
|
+
--gt-color-input-border: rgb(255 255 255 / 10%);
|
|
207
|
+
--gt-color-input-bg: #212121;
|
|
208
|
+
--gt-color-input-bg-lighter: rgb(48.3, 48.3, 48.3);
|
|
209
|
+
--gt-color-comment-bg: #212121;
|
|
210
|
+
--gt-color-comment-shadow: rgb(78.9, 78.9, 78.9);
|
|
211
|
+
--gt-color-comment-shadow-admin: rgb(94.2, 94.2, 94.2);
|
|
212
|
+
--gt-color-comment-txt: #fafafa;
|
|
213
|
+
--gt-color-link-active: #fafafa;
|
|
214
|
+
--gt-color-btn: #eee;
|
|
215
|
+
--gt-color-popbg: #171717;
|
|
216
|
+
}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
## 开发者
|
|
220
|
+
|
|
221
|
+
在项目根目录新建 `.env.local` 文件,添加开发用环境变量如下:
|
|
222
|
+
|
|
223
|
+
```env
|
|
224
|
+
VITE_CLIENT_ID="YOUR_GITHUB_APP_CLIENT_ID"
|
|
225
|
+
VITE_CLIENT_SECRET="YOUR_GITHUB_APP_CLIENT_SECRET"
|
|
226
|
+
VITE_REPO_OWNER="YOUR_GITHUB_USERNAME"
|
|
227
|
+
VITE_REPO_NAME="YOUR_REPO_NAME"
|
|
228
|
+
VITE_ADMIN='["YOUR_GITHUB_USERNAME"]'
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### 开发
|
|
232
|
+
|
|
233
|
+
在浏览器中调试开发:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
yarn dev
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### 质量检查
|
|
240
|
+
|
|
241
|
+
检查并修复代码的质量与格式问题:
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
yarn lint
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### 构建
|
|
248
|
+
|
|
249
|
+
打包构建组件:
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
yarn build
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
## 许可证
|
|
256
|
+
|
|
257
|
+
[MIT](./LICENSE)
|
package/README.md
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
ENGLISH | [简体中文](./README-zh-CN.md)
|
|
2
|
+
|
|
3
|
+
# Gitalk React
|
|
4
|
+
|
|
5
|
+
Reimplementing [Gitalk](https://github.com/gitalk/gitalk) with TypeScript, React, and Vite — a comment component based on GitHub issues.
|
|
6
|
+
|
|
7
|
+
Developed for modern browsers, focusing on reducing build size and enhancing development and usage experience.
|
|
8
|
+
|
|
9
|
+
## Differences
|
|
10
|
+
|
|
11
|
+
- **Not compatible with older browsers**: Only guarantees compatibility with modern browsers that support [ES2020](https://caniuse.com/?feats=mdn-javascript_operators_optional_chaining,mdn-javascript_operators_nullish_coalescing,mdn-javascript_builtins_globalthis,es6-module-dynamic-import,bigint,mdn-javascript_builtins_promise_allsettled,mdn-javascript_builtins_string_matchall,mdn-javascript_statements_export_namespace,mdn-javascript_operators_import_meta).
|
|
12
|
+
- **Depends on React runtime environment**: `react >= 16.8.0 && react-dom >= 16.8.0`.
|
|
13
|
+
|
|
14
|
+
## Features in Development
|
|
15
|
+
|
|
16
|
+
- [ ] Feature: Support editing comments published by the user in Gitalk.
|
|
17
|
+
- [ ] refactor: Gradually remove dependencies on non-essential third-party libraries to reduce build size.
|
|
18
|
+
- [ ] test: Add automated testing processes to enhance project robustness.
|
|
19
|
+
- [ ] chore: Deploy preview environment.
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
### Installation
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install gitalk-react
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Usage
|
|
30
|
+
|
|
31
|
+
Import styles and component into your project:
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
// Import light mode styles
|
|
35
|
+
import 'gitalk-react/gitalk.css'
|
|
36
|
+
// Or dark mode styles
|
|
37
|
+
import 'gitalk-react/gitalk-dark.css'
|
|
38
|
+
|
|
39
|
+
import Gitalk from 'gitalk-react'
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Gitalk relies on GitHub OAuth App for login authentication; you need to first [register an application](https://github.com/settings/applications/new). Please note that you must set your site domain as the value of the `Authorization callback URL` field, such as `https://yourdomain.com/site` or for development environments `http://localhost:5432`.
|
|
43
|
+
|
|
44
|
+
When using the Gitalk component, fill in the necessary configuration items:
|
|
45
|
+
|
|
46
|
+
- `clientId`: The ID of your GitHub OAuth App.
|
|
47
|
+
- `clientSecret`: The Secret key of your GitHub OAuth App.
|
|
48
|
+
- `owner`: Your GitHub username.
|
|
49
|
+
- `repo`: The name of your GitHub repository. It must be a public repository.
|
|
50
|
+
- `admin`: A list of Gitalk administrators; only those listed can initialize comment topics. This can include the owner and collaborators of the GitHub repository.
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
<Gitalk
|
|
54
|
+
clientID="YOUR_GITHUB_OAUTH_APP_CLIENT_ID"
|
|
55
|
+
clientSecret="YOUR_GITHUB_OAUTH_APP_CLIENT_SECRET"
|
|
56
|
+
owner="GITHUB_REPO_OWNER"
|
|
57
|
+
repo="GITHUB_REPO_NAME"
|
|
58
|
+
admin={['GITHUB_REPO_OWNER', 'GITHUB_REPO_COLLABORATOR']}
|
|
59
|
+
/>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Configuration
|
|
63
|
+
|
|
64
|
+
### clientID `string`
|
|
65
|
+
|
|
66
|
+
**Required**. The ID of your GitHub OAuth App.
|
|
67
|
+
|
|
68
|
+
### clientSecret `string`
|
|
69
|
+
|
|
70
|
+
**Required**. The Secret key of your GitHub OAuth App.
|
|
71
|
+
|
|
72
|
+
### owner `string`
|
|
73
|
+
|
|
74
|
+
**Required**. Your GitHub username.
|
|
75
|
+
|
|
76
|
+
### repo `string`
|
|
77
|
+
|
|
78
|
+
**Required**. The name of your GitHub repository. It must be a public repository.
|
|
79
|
+
|
|
80
|
+
### admin `string[]`
|
|
81
|
+
|
|
82
|
+
**Required**. A list of Gitalk administrators. This can include users who have write access to this repository: owners and collaborators.
|
|
83
|
+
|
|
84
|
+
### id `string = location.href`
|
|
85
|
+
|
|
86
|
+
A unique identifier for the comment topic; length cannot exceed 50 characters.
|
|
87
|
+
|
|
88
|
+
When creating a comment topic, Gitalk automatically uses this parameter as a label item for the comment topic and defaults to fetching comments based on it.
|
|
89
|
+
|
|
90
|
+
For blog-type sites, it is recommended to use the page's slug as this parameter.
|
|
91
|
+
|
|
92
|
+
### number `number = -1`
|
|
93
|
+
|
|
94
|
+
The number of the comment topic.
|
|
95
|
+
|
|
96
|
+
If this parameter is specified, then Gitalk will fetch comments based on it rather than using the identifier.
|
|
97
|
+
|
|
98
|
+
### labels `string[] = ["Gitalk"]`
|
|
99
|
+
|
|
100
|
+
Labels for the comment topic.
|
|
101
|
+
|
|
102
|
+
### title `string = document.title`
|
|
103
|
+
|
|
104
|
+
The title of the comment topic.
|
|
105
|
+
|
|
106
|
+
### body `string = location.href + meta[name="description"]`
|
|
107
|
+
|
|
108
|
+
The content of the comment topic.
|
|
109
|
+
|
|
110
|
+
### language `string = navigator.language`
|
|
111
|
+
|
|
112
|
+
The language used by Gitalk.
|
|
113
|
+
|
|
114
|
+
Available languages include: "de" | "en" | "es-ES" | "fa" | "fr" | "ja" | "ko" | "pl" | "ru" | "zh-CN" | "zh-TW".
|
|
115
|
+
|
|
116
|
+
### perPage `number = 10`
|
|
117
|
+
|
|
118
|
+
The number of comments loaded per page; cannot exceed 100.
|
|
119
|
+
|
|
120
|
+
### pagerDirection `"last" | "first" = "last"`
|
|
121
|
+
|
|
122
|
+
The sorting method for comments. last indicates descending order by creation time, while first indicates ascending order by creation time.
|
|
123
|
+
|
|
124
|
+
### createIssueManually `boolean = true`
|
|
125
|
+
|
|
126
|
+
When a comment topic does not exist, Gitalk will automatically create a new one for you.
|
|
127
|
+
|
|
128
|
+
If you prefer to create a comment topic manually by clicking a button after logging in as an administrator, set this to false.
|
|
129
|
+
|
|
130
|
+
### enableHotKey `boolean = true`
|
|
131
|
+
|
|
132
|
+
Whether to enable hotkeys like cmd + enter or ctrl + enter to create comments.
|
|
133
|
+
|
|
134
|
+
### distractionFreeMode `boolean = false`
|
|
135
|
+
|
|
136
|
+
Whether to enable full-screen overlay effects similar to Facebook's comment box.
|
|
137
|
+
|
|
138
|
+
### flipMoveOptions `FlipMove.FlipMoveProps`
|
|
139
|
+
|
|
140
|
+
Animation effects for the comment list.
|
|
141
|
+
|
|
142
|
+
Default values (referenced effects can be found here):
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"staggerDelayBy": 150,
|
|
147
|
+
"appearAnimation": "accordionVertical",
|
|
148
|
+
"enterAnimation": "accordionVertical",
|
|
149
|
+
"leaveAnimation": "accordionVertical"
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### proxy `string = "https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token"`
|
|
154
|
+
|
|
155
|
+
Reverse proxy for authenticating with Github OAuth App that supports CORS. Why is it needed?
|
|
156
|
+
|
|
157
|
+
### updateCountCallback `(count: number) => void`
|
|
158
|
+
|
|
159
|
+
Callback method invoked when updating the number of comments.
|
|
160
|
+
|
|
161
|
+
### onCreateComment `(comment: CommentType) => void`
|
|
162
|
+
|
|
163
|
+
Callback method invoked when a comment is successfully created.
|
|
164
|
+
|
|
165
|
+
## Theme Styles
|
|
166
|
+
|
|
167
|
+
You can quickly modify Gitalk's theme colors to match your site's style by setting CSS variables.
|
|
168
|
+
|
|
169
|
+
When you import light theme with `import 'gitalk-react/gitalk.css'`, the default CSS variables are as follows:
|
|
170
|
+
|
|
171
|
+
```css
|
|
172
|
+
.gt-container {
|
|
173
|
+
--gt-theme-mode: light;
|
|
174
|
+
--gt-color-text: #171717;
|
|
175
|
+
--gt-color-main: #3b82f6;
|
|
176
|
+
--gt-color-main-lighter: rgb(107.7609756098, 161.0975609756, 248.2390243902);
|
|
177
|
+
--gt-color-sub: #a1a1a1;
|
|
178
|
+
--gt-color-loader: #999;
|
|
179
|
+
--gt-color-error: #ff3860;
|
|
180
|
+
--gt-color-hr: #e9e9e9;
|
|
181
|
+
--gt-color-input-border: rgb(0 0 0 / 10%);
|
|
182
|
+
--gt-color-input-bg: #f6f6f6;
|
|
183
|
+
--gt-color-input-bg-lighter: hsl(0, 0%, 146.4705882353%);
|
|
184
|
+
--gt-color-comment-bg: #f9f9f9;
|
|
185
|
+
--gt-color-comment-shadow: rgb(218.4, 218.4, 218.4);
|
|
186
|
+
--gt-color-comment-shadow-admin: rgb(203.1, 203.1, 203.1);
|
|
187
|
+
--gt-color-comment-txt: #333;
|
|
188
|
+
--gt-color-link-active: #333;
|
|
189
|
+
--gt-color-btn: #fff;
|
|
190
|
+
--gt-color-popbg: #fff;
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
When importing dark theme with `import 'gitalk-react/gitalk-dark.css'`, the default CSS variables are as follows:
|
|
195
|
+
|
|
196
|
+
```css
|
|
197
|
+
.gt-container {
|
|
198
|
+
--gt-theme-mode: dark;
|
|
199
|
+
--gt-color-text: #e9e9e9;
|
|
200
|
+
--gt-color-main: #6366f1;
|
|
201
|
+
--gt-color-main-lighter: rgb(122.4, 124.95, 243.1);
|
|
202
|
+
--gt-color-sub: #9e9e9e;
|
|
203
|
+
--gt-color-loader: #777;
|
|
204
|
+
--gt-color-error: #ef4444;
|
|
205
|
+
--gt-color-hr: #555;
|
|
206
|
+
--gt-color-input-border: rgb(255 255 255 / 10%);
|
|
207
|
+
--gt-color-input-bg: #212121;
|
|
208
|
+
--gt-color-input-bg-lighter: rgb(48.3, 48.3, 48.3);
|
|
209
|
+
--gt-color-comment-bg: #212121;
|
|
210
|
+
--gt-color-comment-shadow: rgb(78.9, 78.9, 78.9);
|
|
211
|
+
--gt-color-comment-shadow-admin: rgb(94.2, 94.2, 94.2);
|
|
212
|
+
--gt-color-comment-txt: #fafafa;
|
|
213
|
+
--gt-color-link-active: #fafafa;
|
|
214
|
+
--gt-color-btn: #eee;
|
|
215
|
+
--gt-color-popbg: #171717;
|
|
216
|
+
}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
## Developer
|
|
220
|
+
|
|
221
|
+
Create a `.env.local` file in your project's root directory and add development environment variables as follows:
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
VITE_CLIENT_ID="YOUR_GITHUB_APP_CLIENT_ID"
|
|
225
|
+
VITE_CLIENT_SECRET="YOUR_GITHUB_APP_CLIENT_SECRET"
|
|
226
|
+
VITE_REPO_OWNER="YOUR_GITHUB_USERNAME"
|
|
227
|
+
VITE_REPO_NAME="YOUR_REPO_NAME"
|
|
228
|
+
VITE_ADMIN='["YOUR_GITHUB_USERNAME"]'
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Development
|
|
232
|
+
|
|
233
|
+
Debug in your browser during development:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
yarn dev
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### Lint
|
|
240
|
+
|
|
241
|
+
Check and fix code quality and formatting issues:
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
yarn lint
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Production
|
|
248
|
+
|
|
249
|
+
Bundle and build components:
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
yarn build
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
## License
|
|
256
|
+
|
|
257
|
+
[MIT](./LICENSE)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.markdown-body{color-scheme:dark;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;margin:0;color:#f0f6fc;background-color:#0d1117;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body .octicon{display:inline-block;fill:currentColor;vertical-align:text-bottom}.markdown-body h1:hover .anchor .octicon-link:before,.markdown-body h2:hover .anchor .octicon-link:before,.markdown-body h3:hover .anchor .octicon-link:before,.markdown-body h4:hover .anchor .octicon-link:before,.markdown-body h5:hover .anchor .octicon-link:before,.markdown-body h6:hover .anchor .octicon-link:before{width:16px;height:16px;content:" ";display:inline-block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>")}.markdown-body details,.markdown-body figcaption,.markdown-body figure{display:block}.markdown-body summary{display:list-item}.markdown-body [hidden]{display:none!important}.markdown-body a{background-color:transparent;color:#4493f8;text-decoration:none}.markdown-body abbr[title]{border-bottom:none;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.markdown-body b,.markdown-body strong{font-weight:600}.markdown-body dfn{font-style:italic}.markdown-body h1{margin:.67em 0;font-weight:600;padding-bottom:.3em;font-size:2em;border-bottom:1px solid #3d444db3}.markdown-body mark{background-color:#bb800926;color:#f0f6fc}.markdown-body small{font-size:90%}.markdown-body sub,.markdown-body sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.markdown-body sub{bottom:-.25em}.markdown-body sup{top:-.5em}.markdown-body img{border-style:none;max-width:100%;box-sizing:content-box}.markdown-body code,.markdown-body kbd,.markdown-body pre,.markdown-body samp{font-family:monospace;font-size:1em}.markdown-body figure{margin:1em 2.5rem}.markdown-body hr{box-sizing:content-box;overflow:hidden;background:transparent;border-bottom:1px solid #3d444db3;height:.25em;padding:0;margin:1.5rem 0;background-color:#3d444d;border:0}.markdown-body input{font:inherit;margin:0;overflow:visible;font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body [type=button],.markdown-body [type=reset],.markdown-body [type=submit]{-webkit-appearance:button;-moz-appearance:button;appearance:button}.markdown-body [type=checkbox],.markdown-body [type=radio]{box-sizing:border-box;padding:0}.markdown-body [type=number]::-webkit-inner-spin-button,.markdown-body [type=number]::-webkit-outer-spin-button{height:auto}.markdown-body [type=search]::-webkit-search-cancel-button,.markdown-body [type=search]::-webkit-search-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}.markdown-body ::-webkit-input-placeholder{color:inherit;opacity:.54}.markdown-body ::-webkit-file-upload-button{-webkit-appearance:button;-moz-appearance:button;appearance:button;font:inherit}.markdown-body a:hover{text-decoration:underline}.markdown-body ::placeholder{color:#9198a1;opacity:1}.markdown-body hr:before{display:table;content:""}.markdown-body hr:after{display:table;clear:both;content:""}.markdown-body table{border-spacing:0;border-collapse:collapse;display:block;width:max-content;max-width:100%;overflow:auto;font-variant:tabular-nums}.markdown-body td,.markdown-body th{padding:0}.markdown-body details summary{cursor:pointer}.markdown-body a:focus,.markdown-body [role=button]:focus,.markdown-body input[type=radio]:focus,.markdown-body input[type=checkbox]:focus{outline:2px solid #1f6feb;outline-offset:-2px;box-shadow:none}.markdown-body a:focus:not(:focus-visible),.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body input[type=radio]:focus:not(:focus-visible),.markdown-body input[type=checkbox]:focus:not(:focus-visible){outline:solid 1px transparent}.markdown-body a:focus-visible,.markdown-body [role=button]:focus-visible,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus-visible{outline:2px solid #1f6feb;outline-offset:-2px;box-shadow:none}.markdown-body a:not([class]):focus,.markdown-body a:not([class]):focus-visible,.markdown-body input[type=radio]:focus,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus,.markdown-body input[type=checkbox]:focus-visible{outline-offset:0}.markdown-body kbd{display:inline-block;padding:.25rem;font:11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;line-height:10px;color:#f0f6fc;vertical-align:middle;background-color:#151b23;border:solid 1px #3d444db3;border-bottom-color:#3d444db3;border-radius:6px;box-shadow:inset 0 -1px #3d444db3}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:1.5rem;margin-bottom:1rem;font-weight:600;line-height:1.25}.markdown-body h2{font-weight:600;padding-bottom:.3em;font-size:1.5em;border-bottom:1px solid #3d444db3}.markdown-body h3{font-weight:600;font-size:1.25em}.markdown-body h4{font-weight:600;font-size:1em}.markdown-body h5{font-weight:600;font-size:.875em}.markdown-body h6{font-weight:600;font-size:.85em;color:#9198a1}.markdown-body p{margin-top:0;margin-bottom:10px}.markdown-body blockquote{margin:0;padding:0 1em;color:#9198a1;border-left:.25em solid #3d444d}.markdown-body ul,.markdown-body ol{margin-top:0;margin-bottom:0;padding-left:2em}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ul ul ol,.markdown-body ul ol ol,.markdown-body ol ul ol,.markdown-body ol ol ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body tt,.markdown-body code,.markdown-body samp{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px}.markdown-body pre{margin-top:0;margin-bottom:0;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;word-wrap:normal}.markdown-body .octicon{display:inline-block;overflow:visible!important;vertical-align:text-bottom;fill:currentColor}.markdown-body input::-webkit-outer-spin-button,.markdown-body input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.markdown-body .mr-2{margin-right:.5rem!important}.markdown-body:before{display:table;content:""}.markdown-body:after{display:table;clear:both;content:""}.markdown-body>*:first-child{margin-top:0!important}.markdown-body>*:last-child{margin-bottom:0!important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body .absent{color:#f85149}.markdown-body .anchor{float:left;padding-right:.25rem;margin-left:-20px;line-height:1}.markdown-body .anchor:focus{outline:none}.markdown-body p,.markdown-body blockquote,.markdown-body ul,.markdown-body ol,.markdown-body dl,.markdown-body table,.markdown-body pre,.markdown-body details{margin-top:0;margin-bottom:1rem}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:#f0f6fc;vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 tt,.markdown-body h1 code,.markdown-body h2 tt,.markdown-body h2 code,.markdown-body h3 tt,.markdown-body h3 code,.markdown-body h4 tt,.markdown-body h4 code,.markdown-body h5 tt,.markdown-body h5 code,.markdown-body h6 tt,.markdown-body h6 code{padding:0 .2em;font-size:inherit}.markdown-body summary h1,.markdown-body summary h2,.markdown-body summary h3,.markdown-body summary h4,.markdown-body summary h5,.markdown-body summary h6{display:inline-block}.markdown-body summary h1 .anchor,.markdown-body summary h2 .anchor,.markdown-body summary h3 .anchor,.markdown-body summary h4 .anchor,.markdown-body summary h5 .anchor,.markdown-body summary h6 .anchor{margin-left:-40px}.markdown-body summary h1,.markdown-body summary h2{padding-bottom:0;border-bottom:0}.markdown-body ul.no-list,.markdown-body ol.no-list{padding:0;list-style-type:none}.markdown-body ol[type="a s"]{list-style-type:lower-alpha}.markdown-body ol[type="A s"]{list-style-type:upper-alpha}.markdown-body ol[type="i s"]{list-style-type:lower-roman}.markdown-body ol[type="I s"]{list-style-type:upper-roman}.markdown-body ol[type="1"]{list-style-type:decimal}.markdown-body div>ol:not([type]){list-style-type:decimal}.markdown-body ul ul,.markdown-body ul ol,.markdown-body ol ol,.markdown-body ol ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:1rem}.markdown-body li+li{margin-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:1rem;font-size:1em;font-style:italic;font-weight:600}.markdown-body dl dd{padding:0 1rem;margin-bottom:1rem}.markdown-body table th{font-weight:600}.markdown-body table th,.markdown-body table td{padding:6px 13px;border:1px solid #3d444d}.markdown-body table td>:last-child{margin-bottom:0}.markdown-body table tr{background-color:#0d1117;border-top:1px solid #3d444db3}.markdown-body table tr:nth-child(2n){background-color:#151b23}.markdown-body table img{background-color:transparent}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body .emoji{max-width:none;vertical-align:text-top;background-color:transparent}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid #3d444d}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:#f0f6fc}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:.2em .4em;margin:0;font-size:85%;white-space:break-spaces;background-color:#656c7633;border-radius:6px}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body samp{font-size:85%}.markdown-body pre code{font-size:100%}.markdown-body pre>code{padding:0;margin:0;word-break:normal;white-space:pre;background:transparent;border:0}.markdown-body .highlight{margin-bottom:1rem}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:1rem;overflow:auto;font-size:85%;line-height:1.45;color:#f0f6fc;background-color:#151b23;border-radius:6px}.markdown-body pre code,.markdown-body pre tt{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:12px;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-num{padding:10px .5rem 9px;text-align:right;background:#0d1117;border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:600;background:#151b23;border-top:0}.markdown-body [data-footnote-ref]:before{content:"["}.markdown-body [data-footnote-ref]:after{content:"]"}.markdown-body .footnotes{font-size:12px;color:#9198a1;border-top:1px solid #3d444d}.markdown-body .footnotes ol{padding-left:1rem}.markdown-body .footnotes ol ul{display:inline-block;padding-left:1rem;margin-top:1rem}.markdown-body .footnotes li{position:relative}.markdown-body .footnotes li:target:before{position:absolute;top:-.5rem;right:-.5rem;bottom:-.5rem;left:-1.5rem;pointer-events:none;content:"";border:2px solid #1f6feb;border-radius:6px}.markdown-body .footnotes li:target{color:#f0f6fc}.markdown-body .footnotes .data-footnote-backref g-emoji{font-family:monospace}.markdown-body body:has(:modal){padding-right:var(--dialog-scrollgutter)!important}.markdown-body .pl-c{color:#9198a1}.markdown-body .pl-c1,.markdown-body .pl-s .pl-v{color:#79c0ff}.markdown-body .pl-e,.markdown-body .pl-en{color:#d2a8ff}.markdown-body .pl-smi,.markdown-body .pl-s .pl-s1{color:#f0f6fc}.markdown-body .pl-ent{color:#7ee787}.markdown-body .pl-k{color:#ff7b72}.markdown-body .pl-s,.markdown-body .pl-pds,.markdown-body .pl-s .pl-pse .pl-s1,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-sr .pl-sra{color:#a5d6ff}.markdown-body .pl-v,.markdown-body .pl-smw{color:#ffa657}.markdown-body .pl-bu{color:#f85149}.markdown-body .pl-ii{color:#f0f6fc;background-color:#8e1519}.markdown-body .pl-c2{color:#f0f6fc;background-color:#b62324}.markdown-body .pl-sr .pl-cce{font-weight:700;color:#7ee787}.markdown-body .pl-ml{color:#f2cc60}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{font-weight:700;color:#1f6feb}.markdown-body .pl-mi{font-style:italic;color:#f0f6fc}.markdown-body .pl-mb{font-weight:700;color:#f0f6fc}.markdown-body .pl-md{color:#ffdcd7;background-color:#67060c}.markdown-body .pl-mi1{color:#aff5b4;background-color:#033a16}.markdown-body .pl-mc{color:#ffdfb6;background-color:#5a1e02}.markdown-body .pl-mi2{color:#f0f6fc;background-color:#1158c7}.markdown-body .pl-mdr{font-weight:700;color:#d2a8ff}.markdown-body .pl-ba{color:#9198a1}.markdown-body .pl-sg{color:#3d444d}.markdown-body .pl-corl{text-decoration:underline;color:#a5d6ff}.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body [role=tabpanel][tabindex="0"]:focus:not(:focus-visible),.markdown-body button:focus:not(:focus-visible),.markdown-body summary:focus:not(:focus-visible),.markdown-body a:focus:not(:focus-visible){outline:none;box-shadow:none}.markdown-body [tabindex="0"]:focus:not(:focus-visible),.markdown-body details-dialog:focus:not(:focus-visible){outline:none}.markdown-body g-emoji{display:inline-block;min-width:1ch;font-family:"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;font-size:1em;font-style:normal!important;font-weight:400;line-height:1;vertical-align:-.075em}.markdown-body g-emoji img{width:1em;height:1em}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item label{font-weight:400}.markdown-body .task-list-item.enabled label{cursor:pointer}.markdown-body .task-list-item+.task-list-item{margin-top:.25rem}.markdown-body .task-list-item .handle{display:none}.markdown-body .task-list-item-checkbox{margin:0 .2em .25em -1.4em;vertical-align:middle}.markdown-body ul:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body ol:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body .contains-task-list:hover .task-list-item-convert-container,.markdown-body .contains-task-list:focus-within .task-list-item-convert-container{display:block;width:auto;height:24px;overflow:visible;clip:auto}.markdown-body ::-webkit-calendar-picker-indicator{filter:invert(50%)}.markdown-body .markdown-alert{padding:.5rem 1rem;margin-bottom:1rem;color:inherit;border-left:.25em solid #3d444d}.markdown-body .markdown-alert>:first-child{margin-top:0}.markdown-body .markdown-alert>:last-child{margin-bottom:0}.markdown-body .markdown-alert .markdown-alert-title{display:flex;font-weight:500;align-items:center;line-height:1}.markdown-body .markdown-alert.markdown-alert-note{border-left-color:#1f6feb}.markdown-body .markdown-alert.markdown-alert-note .markdown-alert-title{color:#4493f8}.markdown-body .markdown-alert.markdown-alert-important{border-left-color:#8957e5}.markdown-body .markdown-alert.markdown-alert-important .markdown-alert-title{color:#ab7df8}.markdown-body .markdown-alert.markdown-alert-warning{border-left-color:#9e6a03}.markdown-body .markdown-alert.markdown-alert-warning .markdown-alert-title{color:#d29922}.markdown-body .markdown-alert.markdown-alert-tip{border-left-color:#238636}.markdown-body .markdown-alert.markdown-alert-tip .markdown-alert-title{color:#3fb950}.markdown-body .markdown-alert.markdown-alert-caution{border-left-color:#da3633}.markdown-body .markdown-alert.markdown-alert-caution .markdown-alert-title{color:#f85149}.markdown-body>*:first-child>.heading-element:first-child{margin-top:0!important}.markdown-body .highlight pre:has(+.zeroclipboard-container){min-height:52px}@keyframes gt-kf-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.gt-container{box-sizing:border-box;font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;font-size:16px;font-weight:400;line-height:1.5;color:var(--gt-color-text);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.gt-container *{box-sizing:border-box}.gt-container a{color:var(--gt-color-main)}.gt-container a:hover{color:var(--gt-color-main-lighter);border-color:var(--gt-color-main-lighter)}.gt-container a.is--active{color:var(--gt-color-link-active);cursor:default}.gt-container a.is--active:hover{color:var(--gt-color-link-active)}.gt-container .hide{display:none}.gt-container .gt-svg{display:inline-block;width:1em;height:1em;vertical-align:sub}.gt-container .gt-svg svg{width:100%;height:100%;fill:var(--gt-color-main)}.gt-container .gt-ico{display:inline-block}.gt-container .gt-ico-text{margin-left:.3125em}.gt-container .gt-ico-github,.gt-container .gt-ico-github .gt-svg{width:100%;height:100%}.gt-container .gt-ico-github svg{fill:var(--gt-color-text)}.gt-container .gt-spinner{position:relative}.gt-container .gt-spinner:before{position:absolute;top:.1875em;box-sizing:border-box;width:.75em;height:.75em;margin-top:-.1875em;margin-left:-.375em;content:"";border:1px solid var(--gt-color-btn);border-top-color:var(--gt-color-main);border-radius:50%;animation:gt-kf-rotate .6s linear infinite}.gt-container .gt-loader{position:relative;display:inline-block;width:1.75em;height:1.75em;font-style:normal;line-height:1.75em;border:1px solid var(--gt-color-loader);border-radius:50%;animation:ease gt-kf-rotate 1.5s infinite}.gt-container .gt-loader:before{position:absolute;top:0;left:50%;display:block;width:.375em;height:.375em;margin-top:-.1875em;margin-left:-.1875em;content:"";background-color:var(--gt-color-loader);border-radius:50%}.gt-container .gt-avatar{display:inline-block;width:3.125em;height:3.125em}@media (max-width: 479px){.gt-container .gt-avatar{width:2em;height:2em}}.gt-container .gt-avatar img{width:100%;height:auto;border-radius:.1875em}.gt-container .gt-avatar-github{width:3em;height:3em;cursor:pointer}@media (max-width: 479px){.gt-container .gt-avatar-github{width:1.875em;height:1.875em}}.gt-container .gt-btn{display:inline-block;padding:.75em 1.25em;font-size:.75em;line-height:1;color:var(--gt-color-btn);white-space:nowrap;text-decoration:none;cursor:pointer;outline:none;background-color:var(--gt-color-main);border:1px solid var(--gt-color-main);border-radius:.3125em;transition:all ease .25s}.gt-container .gt-btn:hover{background-color:var(--gt-color-main-lighter);border-color:var(--gt-color-main-lighter)}.gt-container .gt-btn--secondary{color:var(--gt-color-main-lighter);background-color:transparent;border-color:var(--gt-color-main-lighter)}.gt-container .gt-btn--secondary:hover{color:var(--gt-color-main);background-color:transparent;border-color:var(--gt-color-main)}.gt-container .gt-btn-text{font-weight:400}.gt-container .gt-btn-loading{position:relative;display:inline-block;width:.75em;height:1em;margin-left:.5em;vertical-align:top}.gt-container .gt-btn.is--disable{cursor:not-allowed;opacity:.5}.gt-container .gt-btn-login{margin-right:0}.gt-container .gt-error{margin:.625em;color:var(--gt-color-error);text-align:center}.gt-container .gt-initing{padding:1.25em 0;text-align:center}.gt-container .gt-initing-text{margin:.625em auto;font-size:92%}.gt-container .gt-no-init{padding:1.25em 0;text-align:center}.gt-container .gt-link{border-bottom:1px dotted var(--gt-color-main)}.gt-container .gt-link-counts,.gt-container .gt-link-project{text-decoration:none}.gt-container .gt-meta{position:relative;z-index:10;padding:1em 0;margin:1.25em 0;font-size:1em;border-bottom:1px solid var(--gt-color-hr)}.gt-container .gt-meta:before,.gt-container .gt-meta:after{display:table;content:""}.gt-container .gt-meta:after{clear:both}.gt-container .gt-counts{margin:0 .625em 0 0}.gt-container .gt-user{float:right;margin:0;font-size:92%}.gt-container .gt-user-pic{width:1em;height:1em;margin-right:.5em;vertical-align:top}.gt-container .gt-user-inner{display:inline-block;cursor:pointer}.gt-container .gt-user .gt-ico{margin:0 0 0 .3125em}.gt-container .gt-user .gt-ico svg{fill:var(--gt-color-text)}.gt-container .gt-user .is--poping .gt-ico svg{fill:var(--gt-color-main)}.gt-container .gt-version{margin-left:.375em;color:var(--gt-color-sub)}.gt-container .gt-copyright{padding-top:.5em;margin:0 .9375em .5em;border-top:1px solid var(--gt-color-hr)}.gt-container .gt-popup{position:absolute;top:2.375em;right:0;display:inline-block;padding:.625em 0;font-size:.875em;letter-spacing:.5px;background:var(--gt-color-popbg);border:1px solid var(--gt-color-hr)}.gt-container .gt-popup .gt-action{position:relative;display:block;padding:0 1.125em;margin:.5em 0;text-decoration:none;cursor:pointer}.gt-container .gt-popup .gt-action.is--active:before{position:absolute;top:.4375em;left:.5em;width:.25em;height:.25em;content:"";background:var(--gt-color-main)}.gt-container .gt-header{position:relative;display:flex}.gt-container .gt-header-comment{flex:1;margin-left:1.25em}@media (max-width: 479px){.gt-container .gt-header-comment{margin-left:.875em}}.gt-container .gt-header-textarea{box-sizing:border-box;display:block;width:100%;min-height:5.125em;max-height:15em;padding:.75em;font-size:.875em;color:inherit;word-wrap:break-word;resize:vertical;outline:none;background-color:var(--gt-color-input-bg);border:1px solid var(--gt-color-input-border);border-radius:.3125em;transition:all ease .25s}.gt-container .gt-header-textarea:hover,.gt-container .gt-header-textarea:focus{background-color:var(--gt-color-input-bg-lighter)}.gt-container .gt-header-preview{min-height:5.125em;padding:.75em;background-color:var(--gt-color-input-bg);border:1px solid var(--gt-color-input-border);border-radius:.3125em}.gt-container .gt-header-controls{position:relative;display:flex;align-items:center;margin:.75em 0 0}.gt-container .gt-header-controls-tip{margin-right:auto;font-size:.875em;color:var(--gt-color-main);text-decoration:none}@media (max-width: 479px){.gt-container .gt-header-controls-tip{display:none}}.gt-container .gt-header-controls .gt-btn{margin-left:.75em}@media (max-width: 479px){.gt-container .gt-header-controls .gt-btn{width:100%}.gt-container .gt-header-controls .gt-btn:first-of-type{margin-left:0}}.gt-container .gt-comments{padding-top:1.25em}.gt-container .gt-comments-null{text-align:center}.gt-container .gt-comments-controls{margin:1.25em 0;text-align:center}.gt-container .gt-comment{position:relative;display:flex;padding:.625em 0}.gt-container .gt-comment-content{flex:1;padding:.75em 1em;margin-left:1.25em;overflow:auto;background-color:var(--gt-color-comment-bg);transition:all ease .25s}.gt-container .gt-comment-content:hover{box-shadow:0 .125em 1.5em 0 var(--gt-color-comment-shadow)}@media (max-width: 479px){.gt-container .gt-comment-content{padding:.625em .75em;margin-left:.875em}}.gt-container .gt-comment-header{position:relative;display:flex;margin-bottom:.5em;font-size:.875em}.gt-container .gt-comment-username{font-weight:500;color:var(--gt-color-main);text-decoration:none}.gt-container .gt-comment-username:hover{text-decoration:underline}.gt-container .gt-comment-date{margin-left:.5em;color:var(--gt-color-sub)}.gt-container .gt-comment-actions{display:flex;gap:.75em;margin-left:auto}.gt-container .gt-comment-like,.gt-container .gt-comment-edit,.gt-container .gt-comment-reply{height:1.375em}.gt-container .gt-comment-like:hover,.gt-container .gt-comment-edit:hover,.gt-container .gt-comment-reply:hover{cursor:pointer}.gt-container .gt-comment-body{color:var(--gt-color-comment-txt);background-color:inherit}.gt-container .gt-comment-body .email-hidden-toggle a{display:inline-block;height:.75em;padding:0 .5625em;font-size:.75em;font-weight:600;line-height:.375em;vertical-align:middle;color:#444d56;text-decoration:none;background:#dfe2e5;border-radius:1px}.gt-container .gt-comment-body .email-hidden-toggle a:hover{background-color:#c6cbd1}.gt-container .gt-comment-body .email-hidden-reply{display:none;white-space:pre-wrap}.gt-container .gt-comment-body .email-hidden-reply.expanded{display:block}.gt-container .gt-comment-body .email-hidden-reply .email-signature-reply{padding:0 .9375em;margin:.9375em 0;color:#586069;border-left:.25em solid #dfe2e5}.gt-container .gt-comment-admin .gt-comment-content{box-shadow:0 .125em .75em 0 var(--gt-color-comment-shadow)}.gt-container .gt-comment-admin .gt-comment-content:hover{box-shadow:0 .125em 1.5em 0 var(--gt-color-comment-shadow-admin)}.gt-container:after{position:fixed;top:0;right:0;bottom:100%;left:0;content:"";opacity:0}.gt-container.gt-input-focused{position:relative}.gt-container.gt-input-focused:after{z-index:9999;background:#000;opacity:.6;transition:opacity .3s,bottom 0s}.gt-container.gt-input-focused .gt-header-comment{z-index:10000}.gt-container{--gt-theme-mode: dark;--gt-color-text: #e9e9e9;--gt-color-main: #6366f1;--gt-color-main-lighter: rgb(122.4, 124.95, 243.1);--gt-color-sub: #9e9e9e;--gt-color-loader: #777;--gt-color-error: #ef4444;--gt-color-hr: #555;--gt-color-input-border: rgb(255 255 255 / 10%);--gt-color-input-bg: #212121;--gt-color-input-bg-lighter: rgb(48.3, 48.3, 48.3);--gt-color-comment-bg: #212121;--gt-color-comment-shadow: rgb(78.9, 78.9, 78.9);--gt-color-comment-shadow-admin: rgb(94.2, 94.2, 94.2);--gt-color-comment-txt: #fafafa;--gt-color-link-active: #fafafa;--gt-color-btn: #eee;--gt-color-popbg: #171717}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.markdown-body{color-scheme:light;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;margin:0;color:#1f2328;background-color:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body .octicon{display:inline-block;fill:currentColor;vertical-align:text-bottom}.markdown-body h1:hover .anchor .octicon-link:before,.markdown-body h2:hover .anchor .octicon-link:before,.markdown-body h3:hover .anchor .octicon-link:before,.markdown-body h4:hover .anchor .octicon-link:before,.markdown-body h5:hover .anchor .octicon-link:before,.markdown-body h6:hover .anchor .octicon-link:before{width:16px;height:16px;content:" ";display:inline-block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>")}.markdown-body details,.markdown-body figcaption,.markdown-body figure{display:block}.markdown-body summary{display:list-item}.markdown-body [hidden]{display:none!important}.markdown-body a{background-color:transparent;color:#0969da;text-decoration:none}.markdown-body abbr[title]{border-bottom:none;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.markdown-body b,.markdown-body strong{font-weight:600}.markdown-body dfn{font-style:italic}.markdown-body h1{margin:.67em 0;font-weight:600;padding-bottom:.3em;font-size:2em;border-bottom:1px solid #d1d9e0b3}.markdown-body mark{background-color:#fff8c5;color:#1f2328}.markdown-body small{font-size:90%}.markdown-body sub,.markdown-body sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.markdown-body sub{bottom:-.25em}.markdown-body sup{top:-.5em}.markdown-body img{border-style:none;max-width:100%;box-sizing:content-box}.markdown-body code,.markdown-body kbd,.markdown-body pre,.markdown-body samp{font-family:monospace;font-size:1em}.markdown-body figure{margin:1em 2.5rem}.markdown-body hr{box-sizing:content-box;overflow:hidden;background:transparent;border-bottom:1px solid #d1d9e0b3;height:.25em;padding:0;margin:1.5rem 0;background-color:#d1d9e0;border:0}.markdown-body input{font:inherit;margin:0;overflow:visible;font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body [type=button],.markdown-body [type=reset],.markdown-body [type=submit]{-webkit-appearance:button;-moz-appearance:button;appearance:button}.markdown-body [type=checkbox],.markdown-body [type=radio]{box-sizing:border-box;padding:0}.markdown-body [type=number]::-webkit-inner-spin-button,.markdown-body [type=number]::-webkit-outer-spin-button{height:auto}.markdown-body [type=search]::-webkit-search-cancel-button,.markdown-body [type=search]::-webkit-search-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}.markdown-body ::-webkit-input-placeholder{color:inherit;opacity:.54}.markdown-body ::-webkit-file-upload-button{-webkit-appearance:button;-moz-appearance:button;appearance:button;font:inherit}.markdown-body a:hover{text-decoration:underline}.markdown-body ::placeholder{color:#59636e;opacity:1}.markdown-body hr:before{display:table;content:""}.markdown-body hr:after{display:table;clear:both;content:""}.markdown-body table{border-spacing:0;border-collapse:collapse;display:block;width:max-content;max-width:100%;overflow:auto;font-variant:tabular-nums}.markdown-body td,.markdown-body th{padding:0}.markdown-body details summary{cursor:pointer}.markdown-body a:focus,.markdown-body [role=button]:focus,.markdown-body input[type=radio]:focus,.markdown-body input[type=checkbox]:focus{outline:2px solid #0969da;outline-offset:-2px;box-shadow:none}.markdown-body a:focus:not(:focus-visible),.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body input[type=radio]:focus:not(:focus-visible),.markdown-body input[type=checkbox]:focus:not(:focus-visible){outline:solid 1px transparent}.markdown-body a:focus-visible,.markdown-body [role=button]:focus-visible,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus-visible{outline:2px solid #0969da;outline-offset:-2px;box-shadow:none}.markdown-body a:not([class]):focus,.markdown-body a:not([class]):focus-visible,.markdown-body input[type=radio]:focus,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus,.markdown-body input[type=checkbox]:focus-visible{outline-offset:0}.markdown-body kbd{display:inline-block;padding:.25rem;font:11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;line-height:10px;color:#1f2328;vertical-align:middle;background-color:#f6f8fa;border:solid 1px #d1d9e0b3;border-bottom-color:#d1d9e0b3;border-radius:6px;box-shadow:inset 0 -1px #d1d9e0b3}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:1.5rem;margin-bottom:1rem;font-weight:600;line-height:1.25}.markdown-body h2{font-weight:600;padding-bottom:.3em;font-size:1.5em;border-bottom:1px solid #d1d9e0b3}.markdown-body h3{font-weight:600;font-size:1.25em}.markdown-body h4{font-weight:600;font-size:1em}.markdown-body h5{font-weight:600;font-size:.875em}.markdown-body h6{font-weight:600;font-size:.85em;color:#59636e}.markdown-body p{margin-top:0;margin-bottom:10px}.markdown-body blockquote{margin:0;padding:0 1em;color:#59636e;border-left:.25em solid #d1d9e0}.markdown-body ul,.markdown-body ol{margin-top:0;margin-bottom:0;padding-left:2em}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ul ul ol,.markdown-body ul ol ol,.markdown-body ol ul ol,.markdown-body ol ol ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body tt,.markdown-body code,.markdown-body samp{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px}.markdown-body pre{margin-top:0;margin-bottom:0;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;word-wrap:normal}.markdown-body .octicon{display:inline-block;overflow:visible!important;vertical-align:text-bottom;fill:currentColor}.markdown-body input::-webkit-outer-spin-button,.markdown-body input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.markdown-body .mr-2{margin-right:.5rem!important}.markdown-body:before{display:table;content:""}.markdown-body:after{display:table;clear:both;content:""}.markdown-body>*:first-child{margin-top:0!important}.markdown-body>*:last-child{margin-bottom:0!important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body .absent{color:#d1242f}.markdown-body .anchor{float:left;padding-right:.25rem;margin-left:-20px;line-height:1}.markdown-body .anchor:focus{outline:none}.markdown-body p,.markdown-body blockquote,.markdown-body ul,.markdown-body ol,.markdown-body dl,.markdown-body table,.markdown-body pre,.markdown-body details{margin-top:0;margin-bottom:1rem}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:#1f2328;vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 tt,.markdown-body h1 code,.markdown-body h2 tt,.markdown-body h2 code,.markdown-body h3 tt,.markdown-body h3 code,.markdown-body h4 tt,.markdown-body h4 code,.markdown-body h5 tt,.markdown-body h5 code,.markdown-body h6 tt,.markdown-body h6 code{padding:0 .2em;font-size:inherit}.markdown-body summary h1,.markdown-body summary h2,.markdown-body summary h3,.markdown-body summary h4,.markdown-body summary h5,.markdown-body summary h6{display:inline-block}.markdown-body summary h1 .anchor,.markdown-body summary h2 .anchor,.markdown-body summary h3 .anchor,.markdown-body summary h4 .anchor,.markdown-body summary h5 .anchor,.markdown-body summary h6 .anchor{margin-left:-40px}.markdown-body summary h1,.markdown-body summary h2{padding-bottom:0;border-bottom:0}.markdown-body ul.no-list,.markdown-body ol.no-list{padding:0;list-style-type:none}.markdown-body ol[type="a s"]{list-style-type:lower-alpha}.markdown-body ol[type="A s"]{list-style-type:upper-alpha}.markdown-body ol[type="i s"]{list-style-type:lower-roman}.markdown-body ol[type="I s"]{list-style-type:upper-roman}.markdown-body ol[type="1"]{list-style-type:decimal}.markdown-body div>ol:not([type]){list-style-type:decimal}.markdown-body ul ul,.markdown-body ul ol,.markdown-body ol ol,.markdown-body ol ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:1rem}.markdown-body li+li{margin-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:1rem;font-size:1em;font-style:italic;font-weight:600}.markdown-body dl dd{padding:0 1rem;margin-bottom:1rem}.markdown-body table th{font-weight:600}.markdown-body table th,.markdown-body table td{padding:6px 13px;border:1px solid #d1d9e0}.markdown-body table td>:last-child{margin-bottom:0}.markdown-body table tr{background-color:#fff;border-top:1px solid #d1d9e0b3}.markdown-body table tr:nth-child(2n){background-color:#f6f8fa}.markdown-body table img{background-color:transparent}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body .emoji{max-width:none;vertical-align:text-top;background-color:transparent}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid #d1d9e0}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:#1f2328}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:.2em .4em;margin:0;font-size:85%;white-space:break-spaces;background-color:#818b981f;border-radius:6px}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body samp{font-size:85%}.markdown-body pre code{font-size:100%}.markdown-body pre>code{padding:0;margin:0;word-break:normal;white-space:pre;background:transparent;border:0}.markdown-body .highlight{margin-bottom:1rem}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:1rem;overflow:auto;font-size:85%;line-height:1.45;color:#1f2328;background-color:#f6f8fa;border-radius:6px}.markdown-body pre code,.markdown-body pre tt{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:12px;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-num{padding:10px .5rem 9px;text-align:right;background:#fff;border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:600;background:#f6f8fa;border-top:0}.markdown-body [data-footnote-ref]:before{content:"["}.markdown-body [data-footnote-ref]:after{content:"]"}.markdown-body .footnotes{font-size:12px;color:#59636e;border-top:1px solid #d1d9e0}.markdown-body .footnotes ol{padding-left:1rem}.markdown-body .footnotes ol ul{display:inline-block;padding-left:1rem;margin-top:1rem}.markdown-body .footnotes li{position:relative}.markdown-body .footnotes li:target:before{position:absolute;top:-.5rem;right:-.5rem;bottom:-.5rem;left:-1.5rem;pointer-events:none;content:"";border:2px solid #0969da;border-radius:6px}.markdown-body .footnotes li:target{color:#1f2328}.markdown-body .footnotes .data-footnote-backref g-emoji{font-family:monospace}.markdown-body body:has(:modal){padding-right:var(--dialog-scrollgutter)!important}.markdown-body .pl-c{color:#59636e}.markdown-body .pl-c1,.markdown-body .pl-s .pl-v{color:#0550ae}.markdown-body .pl-e,.markdown-body .pl-en{color:#6639ba}.markdown-body .pl-smi,.markdown-body .pl-s .pl-s1{color:#1f2328}.markdown-body .pl-ent{color:#0550ae}.markdown-body .pl-k{color:#cf222e}.markdown-body .pl-s,.markdown-body .pl-pds,.markdown-body .pl-s .pl-pse .pl-s1,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-sr .pl-sra{color:#0a3069}.markdown-body .pl-v,.markdown-body .pl-smw{color:#953800}.markdown-body .pl-bu{color:#82071e}.markdown-body .pl-ii{color:#f6f8fa;background-color:#82071e}.markdown-body .pl-c2{color:#f6f8fa;background-color:#cf222e}.markdown-body .pl-sr .pl-cce{font-weight:700;color:#116329}.markdown-body .pl-ml{color:#3b2300}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{font-weight:700;color:#0550ae}.markdown-body .pl-mi{font-style:italic;color:#1f2328}.markdown-body .pl-mb{font-weight:700;color:#1f2328}.markdown-body .pl-md{color:#82071e;background-color:#ffebe9}.markdown-body .pl-mi1{color:#116329;background-color:#dafbe1}.markdown-body .pl-mc{color:#953800;background-color:#ffd8b5}.markdown-body .pl-mi2{color:#d1d9e0;background-color:#0550ae}.markdown-body .pl-mdr{font-weight:700;color:#8250df}.markdown-body .pl-ba{color:#59636e}.markdown-body .pl-sg{color:#818b98}.markdown-body .pl-corl{text-decoration:underline;color:#0a3069}.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body [role=tabpanel][tabindex="0"]:focus:not(:focus-visible),.markdown-body button:focus:not(:focus-visible),.markdown-body summary:focus:not(:focus-visible),.markdown-body a:focus:not(:focus-visible){outline:none;box-shadow:none}.markdown-body [tabindex="0"]:focus:not(:focus-visible),.markdown-body details-dialog:focus:not(:focus-visible){outline:none}.markdown-body g-emoji{display:inline-block;min-width:1ch;font-family:"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;font-size:1em;font-style:normal!important;font-weight:400;line-height:1;vertical-align:-.075em}.markdown-body g-emoji img{width:1em;height:1em}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item label{font-weight:400}.markdown-body .task-list-item.enabled label{cursor:pointer}.markdown-body .task-list-item+.task-list-item{margin-top:.25rem}.markdown-body .task-list-item .handle{display:none}.markdown-body .task-list-item-checkbox{margin:0 .2em .25em -1.4em;vertical-align:middle}.markdown-body ul:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body ol:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body .contains-task-list:hover .task-list-item-convert-container,.markdown-body .contains-task-list:focus-within .task-list-item-convert-container{display:block;width:auto;height:24px;overflow:visible;clip:auto}.markdown-body ::-webkit-calendar-picker-indicator{filter:invert(50%)}.markdown-body .markdown-alert{padding:.5rem 1rem;margin-bottom:1rem;color:inherit;border-left:.25em solid #d1d9e0}.markdown-body .markdown-alert>:first-child{margin-top:0}.markdown-body .markdown-alert>:last-child{margin-bottom:0}.markdown-body .markdown-alert .markdown-alert-title{display:flex;font-weight:500;align-items:center;line-height:1}.markdown-body .markdown-alert.markdown-alert-note{border-left-color:#0969da}.markdown-body .markdown-alert.markdown-alert-note .markdown-alert-title{color:#0969da}.markdown-body .markdown-alert.markdown-alert-important{border-left-color:#8250df}.markdown-body .markdown-alert.markdown-alert-important .markdown-alert-title{color:#8250df}.markdown-body .markdown-alert.markdown-alert-warning{border-left-color:#9a6700}.markdown-body .markdown-alert.markdown-alert-warning .markdown-alert-title{color:#9a6700}.markdown-body .markdown-alert.markdown-alert-tip{border-left-color:#1a7f37}.markdown-body .markdown-alert.markdown-alert-tip .markdown-alert-title{color:#1a7f37}.markdown-body .markdown-alert.markdown-alert-caution{border-left-color:#cf222e}.markdown-body .markdown-alert.markdown-alert-caution .markdown-alert-title{color:#d1242f}.markdown-body>*:first-child>.heading-element:first-child{margin-top:0!important}.markdown-body .highlight pre:has(+.zeroclipboard-container){min-height:52px}@keyframes gt-kf-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.gt-container{box-sizing:border-box;font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;font-size:16px;font-weight:400;line-height:1.5;color:var(--gt-color-text);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.gt-container *{box-sizing:border-box}.gt-container a{color:var(--gt-color-main)}.gt-container a:hover{color:var(--gt-color-main-lighter);border-color:var(--gt-color-main-lighter)}.gt-container a.is--active{color:var(--gt-color-link-active);cursor:default}.gt-container a.is--active:hover{color:var(--gt-color-link-active)}.gt-container .hide{display:none}.gt-container .gt-svg{display:inline-block;width:1em;height:1em;vertical-align:sub}.gt-container .gt-svg svg{width:100%;height:100%;fill:var(--gt-color-main)}.gt-container .gt-ico{display:inline-block}.gt-container .gt-ico-text{margin-left:.3125em}.gt-container .gt-ico-github,.gt-container .gt-ico-github .gt-svg{width:100%;height:100%}.gt-container .gt-ico-github svg{fill:var(--gt-color-text)}.gt-container .gt-spinner{position:relative}.gt-container .gt-spinner:before{position:absolute;top:.1875em;box-sizing:border-box;width:.75em;height:.75em;margin-top:-.1875em;margin-left:-.375em;content:"";border:1px solid var(--gt-color-btn);border-top-color:var(--gt-color-main);border-radius:50%;animation:gt-kf-rotate .6s linear infinite}.gt-container .gt-loader{position:relative;display:inline-block;width:1.75em;height:1.75em;font-style:normal;line-height:1.75em;border:1px solid var(--gt-color-loader);border-radius:50%;animation:ease gt-kf-rotate 1.5s infinite}.gt-container .gt-loader:before{position:absolute;top:0;left:50%;display:block;width:.375em;height:.375em;margin-top:-.1875em;margin-left:-.1875em;content:"";background-color:var(--gt-color-loader);border-radius:50%}.gt-container .gt-avatar{display:inline-block;width:3.125em;height:3.125em}@media (max-width: 479px){.gt-container .gt-avatar{width:2em;height:2em}}.gt-container .gt-avatar img{width:100%;height:auto;border-radius:.1875em}.gt-container .gt-avatar-github{width:3em;height:3em;cursor:pointer}@media (max-width: 479px){.gt-container .gt-avatar-github{width:1.875em;height:1.875em}}.gt-container .gt-btn{display:inline-block;padding:.75em 1.25em;font-size:.75em;line-height:1;color:var(--gt-color-btn);white-space:nowrap;text-decoration:none;cursor:pointer;outline:none;background-color:var(--gt-color-main);border:1px solid var(--gt-color-main);border-radius:.3125em;transition:all ease .25s}.gt-container .gt-btn:hover{background-color:var(--gt-color-main-lighter);border-color:var(--gt-color-main-lighter)}.gt-container .gt-btn--secondary{color:var(--gt-color-main-lighter);background-color:transparent;border-color:var(--gt-color-main-lighter)}.gt-container .gt-btn--secondary:hover{color:var(--gt-color-main);background-color:transparent;border-color:var(--gt-color-main)}.gt-container .gt-btn-text{font-weight:400}.gt-container .gt-btn-loading{position:relative;display:inline-block;width:.75em;height:1em;margin-left:.5em;vertical-align:top}.gt-container .gt-btn.is--disable{cursor:not-allowed;opacity:.5}.gt-container .gt-btn-login{margin-right:0}.gt-container .gt-error{margin:.625em;color:var(--gt-color-error);text-align:center}.gt-container .gt-initing{padding:1.25em 0;text-align:center}.gt-container .gt-initing-text{margin:.625em auto;font-size:92%}.gt-container .gt-no-init{padding:1.25em 0;text-align:center}.gt-container .gt-link{border-bottom:1px dotted var(--gt-color-main)}.gt-container .gt-link-counts,.gt-container .gt-link-project{text-decoration:none}.gt-container .gt-meta{position:relative;z-index:10;padding:1em 0;margin:1.25em 0;font-size:1em;border-bottom:1px solid var(--gt-color-hr)}.gt-container .gt-meta:before,.gt-container .gt-meta:after{display:table;content:""}.gt-container .gt-meta:after{clear:both}.gt-container .gt-counts{margin:0 .625em 0 0}.gt-container .gt-user{float:right;margin:0;font-size:92%}.gt-container .gt-user-pic{width:1em;height:1em;margin-right:.5em;vertical-align:top}.gt-container .gt-user-inner{display:inline-block;cursor:pointer}.gt-container .gt-user .gt-ico{margin:0 0 0 .3125em}.gt-container .gt-user .gt-ico svg{fill:var(--gt-color-text)}.gt-container .gt-user .is--poping .gt-ico svg{fill:var(--gt-color-main)}.gt-container .gt-version{margin-left:.375em;color:var(--gt-color-sub)}.gt-container .gt-copyright{padding-top:.5em;margin:0 .9375em .5em;border-top:1px solid var(--gt-color-hr)}.gt-container .gt-popup{position:absolute;top:2.375em;right:0;display:inline-block;padding:.625em 0;font-size:.875em;letter-spacing:.5px;background:var(--gt-color-popbg);border:1px solid var(--gt-color-hr)}.gt-container .gt-popup .gt-action{position:relative;display:block;padding:0 1.125em;margin:.5em 0;text-decoration:none;cursor:pointer}.gt-container .gt-popup .gt-action.is--active:before{position:absolute;top:.4375em;left:.5em;width:.25em;height:.25em;content:"";background:var(--gt-color-main)}.gt-container .gt-header{position:relative;display:flex}.gt-container .gt-header-comment{flex:1;margin-left:1.25em}@media (max-width: 479px){.gt-container .gt-header-comment{margin-left:.875em}}.gt-container .gt-header-textarea{box-sizing:border-box;display:block;width:100%;min-height:5.125em;max-height:15em;padding:.75em;font-size:.875em;color:inherit;word-wrap:break-word;resize:vertical;outline:none;background-color:var(--gt-color-input-bg);border:1px solid var(--gt-color-input-border);border-radius:.3125em;transition:all ease .25s}.gt-container .gt-header-textarea:hover,.gt-container .gt-header-textarea:focus{background-color:var(--gt-color-input-bg-lighter)}.gt-container .gt-header-preview{min-height:5.125em;padding:.75em;background-color:var(--gt-color-input-bg);border:1px solid var(--gt-color-input-border);border-radius:.3125em}.gt-container .gt-header-controls{position:relative;display:flex;align-items:center;margin:.75em 0 0}.gt-container .gt-header-controls-tip{margin-right:auto;font-size:.875em;color:var(--gt-color-main);text-decoration:none}@media (max-width: 479px){.gt-container .gt-header-controls-tip{display:none}}.gt-container .gt-header-controls .gt-btn{margin-left:.75em}@media (max-width: 479px){.gt-container .gt-header-controls .gt-btn{width:100%}.gt-container .gt-header-controls .gt-btn:first-of-type{margin-left:0}}.gt-container .gt-comments{padding-top:1.25em}.gt-container .gt-comments-null{text-align:center}.gt-container .gt-comments-controls{margin:1.25em 0;text-align:center}.gt-container .gt-comment{position:relative;display:flex;padding:.625em 0}.gt-container .gt-comment-content{flex:1;padding:.75em 1em;margin-left:1.25em;overflow:auto;background-color:var(--gt-color-comment-bg);transition:all ease .25s}.gt-container .gt-comment-content:hover{box-shadow:0 .125em 1.5em 0 var(--gt-color-comment-shadow)}@media (max-width: 479px){.gt-container .gt-comment-content{padding:.625em .75em;margin-left:.875em}}.gt-container .gt-comment-header{position:relative;display:flex;margin-bottom:.5em;font-size:.875em}.gt-container .gt-comment-username{font-weight:500;color:var(--gt-color-main);text-decoration:none}.gt-container .gt-comment-username:hover{text-decoration:underline}.gt-container .gt-comment-date{margin-left:.5em;color:var(--gt-color-sub)}.gt-container .gt-comment-actions{display:flex;gap:.75em;margin-left:auto}.gt-container .gt-comment-like,.gt-container .gt-comment-edit,.gt-container .gt-comment-reply{height:1.375em}.gt-container .gt-comment-like:hover,.gt-container .gt-comment-edit:hover,.gt-container .gt-comment-reply:hover{cursor:pointer}.gt-container .gt-comment-body{color:var(--gt-color-comment-txt);background-color:inherit}.gt-container .gt-comment-body .email-hidden-toggle a{display:inline-block;height:.75em;padding:0 .5625em;font-size:.75em;font-weight:600;line-height:.375em;vertical-align:middle;color:#444d56;text-decoration:none;background:#dfe2e5;border-radius:1px}.gt-container .gt-comment-body .email-hidden-toggle a:hover{background-color:#c6cbd1}.gt-container .gt-comment-body .email-hidden-reply{display:none;white-space:pre-wrap}.gt-container .gt-comment-body .email-hidden-reply.expanded{display:block}.gt-container .gt-comment-body .email-hidden-reply .email-signature-reply{padding:0 .9375em;margin:.9375em 0;color:#586069;border-left:.25em solid #dfe2e5}.gt-container .gt-comment-admin .gt-comment-content{box-shadow:0 .125em .75em 0 var(--gt-color-comment-shadow)}.gt-container .gt-comment-admin .gt-comment-content:hover{box-shadow:0 .125em 1.5em 0 var(--gt-color-comment-shadow-admin)}.gt-container:after{position:fixed;top:0;right:0;bottom:100%;left:0;content:"";opacity:0}.gt-container.gt-input-focused{position:relative}.gt-container.gt-input-focused:after{z-index:9999;background:#000;opacity:.6;transition:opacity .3s,bottom 0s}.gt-container.gt-input-focused .gt-header-comment{z-index:10000}.gt-container{--gt-theme-mode: light;--gt-color-text: #171717;--gt-color-main: #3b82f6;--gt-color-main-lighter: rgb(107.7609756098, 161.0975609756, 248.2390243902);--gt-color-sub: #a1a1a1;--gt-color-loader: #999;--gt-color-error: #ff3860;--gt-color-hr: #e9e9e9;--gt-color-input-border: rgb(0 0 0 / 10%);--gt-color-input-bg: #f6f6f6;--gt-color-input-bg-lighter: hsl(0, 0%, 146.4705882353%);--gt-color-comment-bg: #f9f9f9;--gt-color-comment-shadow: rgb(218.4, 218.4, 218.4);--gt-color-comment-shadow-admin: rgb(203.1, 203.1, 203.1);--gt-color-comment-txt: #333;--gt-color-link-active: #333;--gt-color-btn: #fff;--gt-color-popbg: #fff}
|