├── .gitignore
├── LICENSE
├── README.md
├── bing_chat.py
├── cookie.json
├── example
├── web.html
├── web2.html
└── web3
│ ├── css
│ ├── litewebchat.css
│ ├── litewebchat.min.css
│ ├── litewebchat_input.min.css
│ └── map
│ │ ├── litewebchat.min.css.map
│ │ └── litewebchat_input.min.css.map
│ ├── html
│ └── index.html
│ ├── images
│ ├── bing.png
│ ├── bing2.png
│ ├── favicon.ico
│ ├── img.jpg
│ └── me.jpg
│ └── js
│ ├── litewebchat_input.min.js
│ └── websocket.js
└── requirements.txt
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | **/.DS_Store
3 | .DS_Store?
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 XiaoXinYo
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## 此仓库不再维护,请前往[Chat-API](https://github.com/XiaoXinYo/Chat-API).
2 | ## 提示
3 | 若报错,请先将EdgeGPT,BingImageCreator更新到最新版本.
4 | ## 介绍
5 | Bing Chat服务端,通过WebSocket/WebAPI实现通讯.
6 | ## 需求
7 | 1. 语言: Python3.8+.
8 | 2. 包: fastapi,uvicorn,asyncio,python-multipart,EdgeGPT,BingImageCreator.
9 | 3. 其他: New Bing账户.
10 | ## 配置
11 | 1. 监听地址和端口分别在第17行和第18行.
12 | 2. Proxy在第19行.
13 | 3. Cookie文件路径在第20行.
14 | ## Cookie
15 | 1. 浏览器安装Cookie-Editor扩展.
16 | 2. 在[https://www.bing.com/chat](https://www.bing.com/chat)页面中点击扩展.
17 | 3. 点击扩展右下角的Export,将复制的内容粘贴到Cookie文件.
18 | ## 参数
19 | ### 请求
20 | 名称|必填|中文名|说明
21 | ---|---|---|---
22 | token|否|令牌|当请求WebAPI时,填则为连续对话,不填则为新对话,值可在响应中获取
23 | style|是|风格|balanced代表平衡,creative代表创造,precise代表精确
24 | question|是|问题|
25 |
26 | 提示: WebSocket发送需JSON格式.
27 | ### 响应(JSON)
28 | 名称|中文名|说明
29 | ---|---|---
30 | code|状态码|
31 | message|消息|
32 | data|数据|
33 | answer|回答|
34 | urls|链接|
35 | done|完成|部分传输是否完成,当为流传输时存在
36 | reset|重置|下次对话是否被重置(code为500时也会被重置)
37 | token|令牌|用于连续对话,当请求WebAPI时存在
38 | ### 整体传输
39 | > 等待Bing Chat响应完后返回.
40 |
41 | #### WebSocket
42 | 连接/ws.
43 | ```
44 | {"code": 200, "message": "success", "data": {"answer": "您好,这是必应。", "urls":[{"title": "The New Bing - Learn More", "url": "https://www.bing.com/new"}], "reset": false}}
45 | ```
46 | #### WebAPI
47 | 1. 请求方式: GET/POST.
48 | 2. 请求地址: /api.
49 | ```
50 | {"code": 200, "message": "success", "data": {"answer": "您好,这是必应。", "urls":[{"title": "The New Bing - Learn More", "url": "https://www.bing.com/new"}], "reset": false, "token": "7953d67b-eac2-457e-a2ee-fedc8ba53599"}}
51 | ```
52 | ### 流传输
53 | > 一部分一部分返回.
54 |
55 | 当部分传输完成时,将会返回整体,url才会有值,done改为true,reset显示为真实值(部分传输过程中无论下次是否被重置都显示为false).
56 | #### WebSocket
57 | WebSocket连接/ws_stream.
58 | ```
59 | {"code": 200, "message": "success", "data": {"answer": "您。", "urls": [], "done": false, "reset": false}}
60 |
61 | {"code": 200, "message": "success", "data": {"answer": "好", "urls": [], "done": false, "reset": false}}
62 |
63 | {"code": 200, "message": "success", "data": {"answer": ",", "urls": [], "done": false, "reset": false}}
64 |
65 | {"code": 200, "message": "success", "data": {"answer": "这。", "urls": [], "done": false, "reset": false}}
66 |
67 | {"code": 200, "message": "success", "data": {"answer": "是", "urls": [], "done": false, "reset": false}}
68 |
69 | {"code": 200, "message": "success", "data": {"answer": "必应", "urls": [], "done": false, "reset": false}}
70 |
71 | {"code": 200, "message": "success", "data": {"answer": "。", "urls": [], "done": false, "reset": false}}
72 |
73 | {"code": 200, "message": "success", "data": {"answer": "您好,这是必应。", "urls": [{"title": "The New Bing - Learn More", "url": "https://www.bing.com/new"}], "done": true, "reset": false}}
74 | ```
75 | #### WebAPI
76 | 1. 请求方式: GET/POST.
77 | 2. 请求地址: /api_stream.
78 | ```
79 | data: {"code": 200, "message": "success", "data": {"answer": "您。", "urls": [], "done": false, "reset": false, "token": "7953d67b-eac2-457e-a2ee-fedc8ba53599"}}
80 |
81 | data: {"code": 200, "message": "success", "data": {"answer": "好", "urls": [], "done": false, "reset": false, "token": "7953d67b-eac2-457e-a2ee-fedc8ba53599"}}
82 |
83 | data: {"code": 200, "message": "success", "data": {"answer": ",", "urls": [], "done": false, "reset": false, "token": "7953d67b-eac2-457e-a2ee-fedc8ba53599"}}
84 |
85 | data: {"code": 200, "message": "success", "data": {"answer": "这。", "urls": [], "done": false, "reset": false, "token": "7953d67b-eac2-457e-a2ee-fedc8ba53599"}}
86 |
87 | data: {"code": 200, "message": "success", "data": {"answer": "是", "urls": [], "done": false, "reset": false, "token": "7953d67b-eac2-457e-a2ee-fedc8ba53599"}}
88 |
89 | data: {"code": 200, "message": "success", "data": {"answer": "必应", "urls": [], "done": false, "reset": false, "token": "7953d67b-eac2-457e-a2ee-fedc8ba53599"}}
90 |
91 | data: {"code": 200, "message": "success", "data": {"answer": "。", "urls": [], "done": false, "reset": false, "token": "7953d67b-eac2-457e-a2ee-fedc8ba53599"}}
92 |
93 | data: {"code": 200, "message": "success", "data": {"answer": "您好,这是必应。", "urls": [{"title": "The New Bing - Learn More", "url": "https://www.bing.com/new"}], "done": true, "reset": false, "token": "7953d67b-eac2-457e-a2ee-fedc8ba53599"}}
94 | ```
95 | ## 图像生成
96 | ### 请求
97 | 1. 方式: GET/POST.
98 | 2. 网址: /image.
99 | 3. 参数:
100 |
101 | 名称|必填|中文名|说明
102 | ---|---|---|---
103 | keyword|是|关键词|仅支持英文
104 | ### 响应
105 | 1. 格式: JSON.
106 | 2. 参数:
107 |
108 | 名称|中文名|说明
109 | ---|---|---
110 | code|状态码|
111 | message|消息|
112 | data|数据|网址
113 | 3. 示例:
114 | ```
115 | {"code": 200, "message": "success", "data": ["https://tse2.mm.bing.net/th/id/OIG.gZ22nCCQkj48ydKsjZKa", "https://tse2.mm.bing.net/th/id/OIG.rAYVVytOqj.ajgCh2ZtZ", "https://tse3.mm.bing.net/th/id/OIG.X8tmgTvvlIwtvSiFyHSE", "https://tse2.mm.bing.net/th/id/OIG.10fmeQUY9GO.wNV5FjzI"]}
116 | ```
117 | ## emm
118 | 1. 页面写的有点丑,有能力的大神,可以pull request一下,如果你有的example也可以提交.
119 | 2. 搭建好建议不要对外开放,因为目前Bing Chat24小时内有次数限制.
120 | 3. 至于反应快慢的问题,要看回答文本的长度,如果文本长度过长,回复时间会比较长.
121 | 4. 关于整体传输和流传输,整体传输由于要等待Bing完全响应才能开始传输,所以时间要久一点。流传输会先返回一部分,所以看起来比较快,但其实最终的完成时间都是一样的.
122 | 5. 连续对话问题:websocket是默认支持连续对话的。对于WebAPI来说,如果需要进行连续对话,首先需要在第一次请求时获取token,然后在后续请求中带上token,就可以实现连续对话了.
--------------------------------------------------------------------------------
/bing_chat.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Author: XiaoXinYo
3 |
4 | from typing import Union, Any, AsyncGenerator
5 | from fastapi import FastAPI, WebSocket, Request, Response
6 | from fastapi.responses import StreamingResponse
7 | from fastapi.middleware.cors import CORSMiddleware
8 | import time
9 | import EdgeGPT
10 | import uuid
11 | import re
12 | import asyncio
13 | import json
14 | import BingImageCreator
15 | import uvicorn
16 |
17 | HOST = '0.0.0.0'
18 | PORT = 5000
19 | PROXY = ''
20 | COOKIE_FILE_PATH = './cookie.json'
21 |
22 | APP = FastAPI()
23 | APP.add_middleware(
24 | CORSMiddleware,
25 | allow_origins=['*'],
26 | allow_credentials=True,
27 | allow_methods=['*'],
28 | allow_headers=['*'],
29 | )
30 | STYLES = ['balanced', 'creative', 'precise']
31 | CHATBOT = {}
32 |
33 | def getTimeStamp() -> str:
34 | return int(time.time())
35 |
36 | def getChatBot(token: str) -> tuple:
37 | global CHATBOT
38 | if token:
39 | if token in CHATBOT:
40 | chatBot = CHATBOT.get(token).get('chatBot')
41 | else:
42 | return token, None
43 | else:
44 | chatBot = EdgeGPT.Chatbot(proxy=PROXY, cookie_path=COOKIE_FILE_PATH)
45 | token = str(uuid.uuid4())
46 | CHATBOT[token] = {}
47 | CHATBOT[token]['chatBot'] = chatBot
48 | CHATBOT[token]['useTimeStamp'] = getTimeStamp()
49 | return token, chatBot
50 |
51 | def getStyleEnum(style: str) -> EdgeGPT.ConversationStyle:
52 | enum = EdgeGPT.ConversationStyle
53 | if style == 'balanced':
54 | enum = enum.balanced
55 | elif style == 'creative':
56 | enum = enum.creative
57 | elif style == 'precise':
58 | enum = enum.precise
59 | return enum
60 |
61 | def getAnswer(data: dict) -> str:
62 | messages = data.get('item').get('messages')
63 | if 'text' in messages[1]:
64 | return messages[1].get('text')
65 | else:
66 | return messages[1].get('adaptiveCards')[0].get('body')[0].get('text')
67 |
68 | def filterAnswer(answer: str) -> str:
69 | answer = re.sub(r'\[\^.*?\^]', '', answer)
70 | return answer
71 |
72 | def getStreamAnswer(data: dict) -> str:
73 | messages = data.get('item').get('messages')
74 | if 'text' in messages[1]:
75 | answer = messages[1].get('text')
76 | else:
77 | answer = messages[1].get('adaptiveCards')[0].get('body')[0].get('text')
78 | answer = filterAnswer(answer)
79 | return answer
80 |
81 | def getUrl(data: dict) -> list:
82 | sourceAttributions = data.get('item').get('messages')[1].get('sourceAttributions')
83 | urls = []
84 | if sourceAttributions:
85 | for sourceAttribution in sourceAttributions:
86 | urls.append({
87 | 'title': sourceAttribution.get('providerDisplayName'),
88 | 'url': sourceAttribution.get('seeMoreUrl')
89 | })
90 | return urls
91 |
92 | def needReset(data: dict, answer: str) -> bool:
93 | maxTimes = data.get('item').get('throttling').get('maxNumUserMessagesInConversation')
94 | nowTimes = data.get('item').get('throttling').get('numUserMessagesInConversation')
95 | errorAnswers = ['I’m still learning', '我还在学习']
96 | if [errorAnswer for errorAnswer in errorAnswers if errorAnswer in answer]:
97 | return True
98 | elif nowTimes == maxTimes:
99 | return True
100 | return False
101 |
102 | async def getrequestParameter(request: Request) -> dict:
103 | data = {}
104 | if request.method == 'GET':
105 | data = request.query_params
106 | elif request.method == 'POST':
107 | data = await request.form()
108 | if not data:
109 | data = await request.json()
110 | return dict(data)
111 |
112 | class GenerateResponse:
113 | TYPE = Union[str, Response]
114 |
115 | def __init__(self):
116 | self.response = {}
117 | self.onlyJSON = False
118 |
119 | def json(self) -> TYPE:
120 | responseJSON = json.dumps(self.response, ensure_ascii=False)
121 | if self.onlyJSON:
122 | return responseJSON
123 | elif self.stream:
124 | return f'data: {responseJSON}\n\n'
125 | return Response(responseJSON, media_type='application/json')
126 |
127 | def error(self, code: int, message: str, onlyJSON: bool=False, stream=False) -> TYPE:
128 | self.response = {
129 | 'code': code,
130 | 'message': message
131 | }
132 | self.onlyJSON = onlyJSON
133 | self.stream = stream
134 | return self.json()
135 |
136 | def success(self, data: Any, onlyJSON: bool=False, stream=False) -> TYPE:
137 | self.response = {
138 | 'code': 200,
139 | 'message': 'success',
140 | 'data': data
141 | }
142 | self.onlyJSON = onlyJSON
143 | self.stream = stream
144 | return self.json()
145 |
146 | async def checkToken() -> None:
147 | global CHATBOT
148 | while True:
149 | for token in CHATBOT.copy():
150 | if getTimeStamp() - CHATBOT[token]['useTimeStamp'] > 5 * 60:
151 | await CHATBOT.get(token).get('chatBot').close()
152 | del CHATBOT[token]
153 | await asyncio.sleep(60)
154 |
155 | @APP.on_event('startup')
156 | async def startup() -> None:
157 | asyncio.get_event_loop().create_task(checkToken())
158 |
159 | @APP.exception_handler(404)
160 | def error404(request: Request, exc: Exception) -> Response:
161 | return GenerateResponse().error(404, '未找到文件')
162 |
163 | @APP.exception_handler(500)
164 | def error500(request: Request, exc: Exception) -> Response:
165 | return GenerateResponse().error(500, '未知错误')
166 |
167 | @APP.websocket('/ws')
168 | async def ws(ws: WebSocket) -> str:
169 | await ws.accept()
170 |
171 | chatBot = EdgeGPT.Chatbot(proxy=PROXY, cookie_path=COOKIE_FILE_PATH)
172 | while True:
173 | try:
174 | parameters = await ws.receive_json()
175 | if not isinstance(parameters, dict):
176 | await ws.send_text(GenerateResponse().error(110, '格式错误', True))
177 | continue
178 | style = parameters.get('style')
179 | question = parameters.get('question')
180 | if not style or not question:
181 | await ws.send_text(GenerateResponse().error(110, '参数不能为空', True))
182 | continue
183 | elif style not in STYLES:
184 | await ws.send_text(GenerateResponse().error(110, 'style不存在', True))
185 | continue
186 |
187 | data = await chatBot.ask(question, conversation_style=getStyleEnum(style))
188 |
189 | if data.get('item').get('result').get('value') == 'Throttled':
190 | await ws.send_text(GenerateResponse().error(120, '已上限,24小时后尝试', True))
191 | continue
192 |
193 | info = {
194 | 'answer': '',
195 | 'urls': [],
196 | 'reset': False
197 | }
198 | answer = getAnswer(data)
199 | answer = filterAnswer(answer)
200 | info['answer'] = answer
201 | info['urls'] = getUrl(data)
202 |
203 | if needReset(data, answer):
204 | await chatBot.reset()
205 | info['reset'] = True
206 |
207 | await ws.send_text(GenerateResponse().success(info, True))
208 | except FileExistsError:
209 | await ws.send_text(GenerateResponse().error(500, '未知错误', True))
210 | await chatBot.reset()
211 |
212 | @APP.route('/api', methods=['GET', 'POST'])
213 | async def api(request: Request) -> Response:
214 | parameters = await getrequestParameter(request)
215 | token = parameters.get('token')
216 | style = parameters.get('style')
217 | question = parameters.get('question')
218 | if not style or not question:
219 | return GenerateResponse().error(110, '参数不能为空')
220 | elif style not in STYLES:
221 | return GenerateResponse().error(110, 'style不存在')
222 |
223 | token, chatBot = getChatBot(token)
224 | if not chatBot:
225 | return GenerateResponse().error(120, 'token不存在')
226 | data = await chatBot.ask(question, conversation_style=getStyleEnum(style))
227 |
228 | if data.get('item').get('result').get('value') == 'Throttled':
229 | return GenerateResponse().error(120, '已上限,24小时后尝试')
230 |
231 | info = {
232 | 'answer': '',
233 | 'urls': [],
234 | 'reset': False,
235 | 'token': token
236 | }
237 | answer = getAnswer(data)
238 | answer = filterAnswer(answer)
239 | info['answer'] = answer
240 | info['urls'] = getUrl(data)
241 |
242 | if needReset(data, answer):
243 | await chatBot.reset()
244 | info['reset'] = True
245 |
246 | return GenerateResponse().success(info)
247 |
248 | @APP.websocket('/ws_stream')
249 | async def wsStream(ws: WebSocket) -> str:
250 | await ws.accept()
251 |
252 | chatBot = EdgeGPT.Chatbot(proxy=PROXY, cookie_path=COOKIE_FILE_PATH)
253 | while True:
254 | try:
255 | parameters = await ws.receive_json()
256 | if not isinstance(parameters, dict):
257 | await ws.send_text(GenerateResponse().error(110, '格式错误', True))
258 | continue
259 | style = parameters.get('style')
260 | question = parameters.get('question')
261 | if not style or not question:
262 | await ws.send_text(GenerateResponse().error(110, '参数不能为空', True))
263 | continue
264 | elif style not in STYLES:
265 | await ws.send_text(GenerateResponse().error(110, 'style不存在', True))
266 | continue
267 |
268 | index = 0
269 | info = {
270 | 'answer': '',
271 | 'urls': [],
272 | 'done': False,
273 | 'reset': False
274 | }
275 | async for final, data in chatBot.ask_stream(question, conversation_style=getStyleEnum(style)):
276 | if not final:
277 | answer = data[index:]
278 | index = len(data)
279 | answer = filterAnswer(answer)
280 | if answer:
281 | info['answer'] = answer
282 | await ws.send_text(GenerateResponse().success(info, True))
283 | else:
284 | if data.get('item').get('result').get('value') == 'Throttled':
285 | await ws.send_text(GenerateResponse().error(120, '已上限,24小时后尝试', True))
286 | break
287 |
288 | messages = data.get('item').get('messages')
289 | info['answer'] = getStreamAnswer(data)
290 | if 'text' not in messages[1]:
291 | await ws.send_text(GenerateResponse().success(info, True))
292 | info['done'] = True
293 | info['urls'] = getUrl(data)
294 |
295 | if needReset(data, answer):
296 | await chatBot.reset()
297 | info['reset'] = True
298 |
299 | await ws.send_text(GenerateResponse().success(info, True))
300 | except Exception:
301 | await ws.send_text(GenerateResponse().error(500, '未知错误', True))
302 | await chatBot.reset()
303 |
304 | @APP.route('/api_stream', methods=['GET', 'POST'])
305 | async def apiStream(request: Request) -> Response:
306 | parameters = await getrequestParameter(request)
307 | token = parameters.get('token')
308 | style = parameters.get('style')
309 | question = parameters.get('question')
310 | if not style or not question:
311 | return GenerateResponse().error(110, '参数不能为空')
312 | elif style not in STYLES:
313 | return GenerateResponse().error(110, 'style不存在')
314 |
315 | token, chatBot = getChatBot(token)
316 | if not chatBot:
317 | return GenerateResponse().error(120, 'token不存在')
318 |
319 | async def generator() -> AsyncGenerator:
320 | index = 0
321 | info = {
322 | 'answer': '',
323 | 'urls': [],
324 | 'done': False,
325 | 'reset': False,
326 | 'token': token
327 | }
328 | async for final, data in chatBot.ask_stream(question, conversation_style=getStyleEnum(style)):
329 | if not final:
330 | answer = data[index:]
331 | index = len(data)
332 | answer = filterAnswer(answer)
333 | if answer:
334 | info['answer'] = answer
335 | yield GenerateResponse().success(info, stream=True)
336 | else:
337 | if data.get('item').get('result').get('value') == 'Throttled':
338 | yield GenerateResponse().error(120, '已上限,24小时后尝试', stream=True)
339 | break
340 |
341 | messages = data.get('item').get('messages')
342 | info['answer'] = getStreamAnswer(data)
343 | if 'text' not in messages[1]:
344 | yield GenerateResponse().success(info, stream=True)
345 | info['done'] = True
346 | info['urls'] = getUrl(data)
347 |
348 | if needReset(data, answer):
349 | await chatBot.reset()
350 | info['reset'] = True
351 |
352 | yield GenerateResponse().success(info, stream=True)
353 |
354 | return StreamingResponse(generator(), media_type='text/event-stream')
355 |
356 | @APP.route('/image', methods=['GET', 'POST'])
357 | async def image(request: Request) -> Response:
358 | keyword = (await getrequestParameter(request)).get('keyword')
359 | if not keyword:
360 | return GenerateResponse().error(110, '参数不能为空')
361 | elif not re.match(r'[a-zA-Z]', keyword):
362 | return GenerateResponse().error(110, '仅支持英文')
363 |
364 | with open(COOKIE_FILE_PATH, encoding='utf-8') as file:
365 | cookies = json.load(file)
366 | for cookie in cookies:
367 | if cookie.get('name') == '_U':
368 | uCookie = cookie.get('value')
369 | break
370 |
371 | return GenerateResponse().success(BingImageCreator.ImageGen(uCookie).get_images(keyword))
372 |
373 | if __name__ == '__main__':
374 | uvicorn.run(APP, host=HOST, port=PORT)
--------------------------------------------------------------------------------
/cookie.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ykaiqx/Bing-Chat/6123e0285ebadddf43954eaa9ec50cf6497aca47/cookie.json
--------------------------------------------------------------------------------
/example/web.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Bing Chat
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
110 |
111 |
--------------------------------------------------------------------------------
/example/web2.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Bing Chat
7 |
8 |
9 |
10 |
11 |
12 |
26 |
27 |
28 |
29 |
39 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
133 |
134 |
480 |
481 |
482 |
483 |
--------------------------------------------------------------------------------
/example/web3/css/litewebchat.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * LiteWebChat_Frame 2.2.1 (https://lab.morfans.cn/LiteWebChat_Frame)
3 | * MorFans Lab(c) 2017-2023
4 | * Licensed under LGPL
5 | */@charset "UTF-8";
6 | /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
7 | /* Document
8 | ========================================================================== */
9 | /**
10 | * 1. Correct the line height in all browsers.
11 | * 2. Prevent adjustments of font size after orientation changes in iOS.
12 | */
13 | html {
14 | line-height: 1.15; /* 1 */
15 | -webkit-text-size-adjust: 100%; /* 2 */
16 | }
17 |
18 | /* Sections
19 | ========================================================================== */
20 | /**
21 | * Remove the margin in all browsers.
22 | */
23 | body {
24 | margin: 0;
25 | }
26 |
27 | /**
28 | * Render the `main` element consistently in IE.
29 | */
30 | main {
31 | display: block;
32 | }
33 |
34 | /**
35 | * Correct the font size and margin on `h1` elements within `section` and
36 | * `article` contexts in Chrome, Firefox, and Safari.
37 | */
38 | h1 {
39 | font-size: 2em;
40 | margin: 0.67em 0;
41 | }
42 |
43 | /* Grouping content
44 | ========================================================================== */
45 | /**
46 | * 1. Add the correct box sizing in Firefox.
47 | * 2. Show the overflow in Edge and IE.
48 | */
49 | hr {
50 | -webkit-box-sizing: content-box;
51 | box-sizing: content-box; /* 1 */
52 | height: 0; /* 1 */
53 | overflow: visible; /* 2 */
54 | }
55 |
56 | /**
57 | * 1. Correct the inheritance and scaling of font size in all browsers.
58 | * 2. Correct the odd `em` font sizing in all browsers.
59 | */
60 | pre {
61 | font-family: monospace, monospace; /* 1 */
62 | font-size: 1em; /* 2 */
63 | }
64 |
65 | /* Text-level semantics
66 | ========================================================================== */
67 | /**
68 | * Remove the gray background on active links in IE 10.
69 | */
70 | a {
71 | background-color: transparent;
72 | }
73 |
74 | /**
75 | * 1. Remove the bottom border in Chrome 57-
76 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
77 | */
78 | abbr[title] {
79 | border-bottom: none; /* 1 */
80 | text-decoration: underline; /* 2 */
81 | -webkit-text-decoration: underline dotted;
82 | text-decoration: underline dotted; /* 2 */
83 | }
84 |
85 | /**
86 | * Add the correct font weight in Chrome, Edge, and Safari.
87 | */
88 | b,
89 | strong {
90 | font-weight: bolder;
91 | }
92 |
93 | /**
94 | * 1. Correct the inheritance and scaling of font size in all browsers.
95 | * 2. Correct the odd `em` font sizing in all browsers.
96 | */
97 | code,
98 | kbd,
99 | samp {
100 | font-family: monospace, monospace; /* 1 */
101 | font-size: 1em; /* 2 */
102 | }
103 |
104 | /**
105 | * Add the correct font size in all browsers.
106 | */
107 | small {
108 | font-size: 80%;
109 | }
110 |
111 | /**
112 | * Prevent `sub` and `sup` elements from affecting the line height in
113 | * all browsers.
114 | */
115 | sub,
116 | sup {
117 | font-size: 75%;
118 | line-height: 0;
119 | position: relative;
120 | vertical-align: baseline;
121 | }
122 |
123 | sub {
124 | bottom: -0.25em;
125 | }
126 |
127 | sup {
128 | top: -0.5em;
129 | }
130 |
131 | /* Embedded content
132 | ========================================================================== */
133 | /**
134 | * Remove the border on images inside links in IE 10.
135 | */
136 | img {
137 | border-style: none;
138 | }
139 |
140 | /* Forms
141 | ========================================================================== */
142 | /**
143 | * 1. Change the font styles in all browsers.
144 | * 2. Remove the margin in Firefox and Safari.
145 | */
146 | button,
147 | input,
148 | optgroup,
149 | select,
150 | textarea {
151 | font-family: inherit; /* 1 */
152 | font-size: 100%; /* 1 */
153 | line-height: 1.15; /* 1 */
154 | margin: 0; /* 2 */
155 | }
156 |
157 | /**
158 | * Show the overflow in IE.
159 | * 1. Show the overflow in Edge.
160 | */
161 | button,
162 | input { /* 1 */
163 | overflow: visible;
164 | }
165 |
166 | /**
167 | * Remove the inheritance of text transform in Edge, Firefox, and IE.
168 | * 1. Remove the inheritance of text transform in Firefox.
169 | */
170 | button,
171 | select { /* 1 */
172 | text-transform: none;
173 | }
174 |
175 | /**
176 | * Correct the inability to style clickable types in iOS and Safari.
177 | */
178 | button,
179 | [type=button],
180 | [type=reset],
181 | [type=submit] {
182 | -webkit-appearance: button;
183 | }
184 |
185 | /**
186 | * Remove the inner border and padding in Firefox.
187 | */
188 | button::-moz-focus-inner,
189 | [type=button]::-moz-focus-inner,
190 | [type=reset]::-moz-focus-inner,
191 | [type=submit]::-moz-focus-inner {
192 | border-style: none;
193 | padding: 0;
194 | }
195 |
196 | /**
197 | * Restore the focus styles unset by the previous rule.
198 | */
199 | button:-moz-focusring,
200 | [type=button]:-moz-focusring,
201 | [type=reset]:-moz-focusring,
202 | [type=submit]:-moz-focusring {
203 | outline: 1px dotted ButtonText;
204 | }
205 |
206 | /**
207 | * Correct the padding in Firefox.
208 | */
209 | fieldset {
210 | padding: 0.35em 0.75em 0.625em;
211 | }
212 |
213 | /**
214 | * 1. Correct the text wrapping in Edge and IE.
215 | * 2. Correct the color inheritance from `fieldset` elements in IE.
216 | * 3. Remove the padding so developers are not caught out when they zero out
217 | * `fieldset` elements in all browsers.
218 | */
219 | legend {
220 | -webkit-box-sizing: border-box;
221 | box-sizing: border-box; /* 1 */
222 | color: inherit; /* 2 */
223 | display: table; /* 1 */
224 | max-width: 100%; /* 1 */
225 | padding: 0; /* 3 */
226 | white-space: normal; /* 1 */
227 | }
228 |
229 | /**
230 | * Add the correct vertical alignment in Chrome, Firefox, and Opera.
231 | */
232 | progress {
233 | vertical-align: baseline;
234 | }
235 |
236 | /**
237 | * Remove the default vertical scrollbar in IE 10+.
238 | */
239 | textarea {
240 | overflow: auto;
241 | }
242 |
243 | /**
244 | * 1. Add the correct box sizing in IE 10.
245 | * 2. Remove the padding in IE 10.
246 | */
247 | [type=checkbox],
248 | [type=radio] {
249 | -webkit-box-sizing: border-box;
250 | box-sizing: border-box; /* 1 */
251 | padding: 0; /* 2 */
252 | }
253 |
254 | /**
255 | * Correct the cursor style of increment and decrement buttons in Chrome.
256 | */
257 | [type=number]::-webkit-inner-spin-button,
258 | [type=number]::-webkit-outer-spin-button {
259 | height: auto;
260 | }
261 |
262 | /**
263 | * 1. Correct the odd appearance in Chrome and Safari.
264 | * 2. Correct the outline style in Safari.
265 | */
266 | [type=search] {
267 | -webkit-appearance: textfield; /* 1 */
268 | outline-offset: -2px; /* 2 */
269 | }
270 |
271 | /**
272 | * Remove the inner padding in Chrome and Safari on macOS.
273 | */
274 | [type=search]::-webkit-search-decoration {
275 | -webkit-appearance: none;
276 | }
277 |
278 | /**
279 | * 1. Correct the inability to style clickable types in iOS and Safari.
280 | * 2. Change font properties to `inherit` in Safari.
281 | */
282 | ::-webkit-file-upload-button {
283 | -webkit-appearance: button; /* 1 */
284 | font: inherit; /* 2 */
285 | }
286 |
287 | /* Interactive
288 | ========================================================================== */
289 | /*
290 | * Add the correct display in Edge, IE 10+, and Firefox.
291 | */
292 | details {
293 | display: block;
294 | }
295 |
296 | /*
297 | * Add the correct display in all browsers.
298 | */
299 | summary {
300 | display: list-item;
301 | }
302 |
303 | /* Misc
304 | ========================================================================== */
305 | /**
306 | * Add the correct display in IE 10+.
307 | */
308 | template {
309 | display: none;
310 | }
311 |
312 | /**
313 | * Add the correct display in IE 10.
314 | */
315 | [hidden] {
316 | display: none;
317 | }
318 |
319 | * {
320 | scrollbar-color: #5c6163 rgba(56, 59, 60, 0.031372549);
321 | }
322 |
323 | /* else broswer */
324 | ::-webkit-scrollbar {
325 | /* 滚动条整体样式 */
326 | width: 7px;
327 | /* 高宽分别对应横竖滚动条的尺寸 */
328 | height: 1px;
329 | }
330 |
331 | ::-webkit-scrollbar-thumb {
332 | /*滚动条里面小方块*/
333 | border-radius: 10px;
334 | background-color: rgba(144, 147, 153, 0.5);
335 | border: 0;
336 | }
337 | [litewebchat-theme=dark] ::-webkit-scrollbar-thumb {
338 | background-color: rgba(84, 91, 95, 0.5);
339 | }
340 |
341 | ::-webkit-scrollbar-track {
342 | /*滚动条里面轨道*/
343 | background: #fff;
344 | min-height: 50%;
345 | min-height: 20px;
346 | }
347 | [litewebchat-theme=dark] ::-webkit-scrollbar-track {
348 | background: rgb(24, 26, 27);
349 | }
350 |
351 | ::-webkit-scrollbar-corner {
352 | background-color: transparent;
353 | }
354 |
355 | ::-moz-selection {
356 | background-color: #1963bd !important;
357 | color: #f8f6f3 !important;
358 | }
359 |
360 | ::selection {
361 | background-color: #1963bd !important;
362 | color: #f8f6f3 !important;
363 | }
364 |
365 | body {
366 | font-family: Helvetica, "PingFang SC", "Microsoft YaHei", sans-serif;
367 | }
368 |
369 | .lite-chatbox {
370 | scroll-behavior: smooth;
371 | padding: 0px;
372 | width: 100%;
373 | position: relative;
374 | font-size: 18px;
375 | background-color: #f8f9fa;
376 | overflow-y: auto;
377 | overflow-x: hidden;
378 | }
379 | .lite-chatbox .tips {
380 | margin: 12px;
381 | text-align: center;
382 | font-size: 12px;
383 | }
384 | .lite-chatbox .tips span {
385 | display: inline-block;
386 | padding: 4px;
387 | background-color: #ccc;
388 | color: #fff;
389 | border-radius: 6px;
390 | }
391 | [litewebchat-theme=dark] .lite-chatbox .tips span {
392 | background-color: rgba(0, 0, 0, 0.3);
393 | }
394 | [litewebchat-theme=dark] .lite-chatbox .tips span {
395 | color: #bec5cc;
396 | }
397 | .lite-chatbox .tips .tips-primary {
398 | background-color: #3986c8;
399 | }
400 | [litewebchat-theme=dark] .lite-chatbox .tips .tips-primary {
401 | background-color: rgb(68, 127, 178);
402 | }
403 | .lite-chatbox .tips .tips-success {
404 | background-color: #49b649;
405 | }
406 | [litewebchat-theme=dark] .lite-chatbox .tips .tips-success {
407 | background-color: rgb(102, 166, 81);
408 | }
409 | .lite-chatbox .tips .tips-info {
410 | background-color: #5bb6d1;
411 | }
412 | [litewebchat-theme=dark] .lite-chatbox .tips .tips-info {
413 | background-color: rgb(63, 136, 158);
414 | }
415 | .lite-chatbox .tips .tips-warning {
416 | background-color: #eea948;
417 | }
418 | [litewebchat-theme=dark] .lite-chatbox .tips .tips-warning {
419 | background-color: rgb(175, 119, 40);
420 | }
421 | .lite-chatbox .tips .tips-danger {
422 | background-color: #e24d48;
423 | }
424 | [litewebchat-theme=dark] .lite-chatbox .tips .tips-danger {
425 | background-color: rgb(173, 53, 49);
426 | }
427 | [litewebchat-theme=dark] .lite-chatbox {
428 | background-color: #131415;
429 | }
430 | .lite-chatbox .cmsg {
431 | position: relative;
432 | margin: 4px 7px;
433 | min-height: 50px;
434 | border: 0;
435 | }
436 | .lite-chatbox .cright {
437 | text-align: right;
438 | margin-left: 64px;
439 | }
440 | .lite-chatbox .cright img.headIcon {
441 | right: 0;
442 | }
443 | .lite-chatbox .cright .name {
444 | margin: 0 48px 2px 0;
445 | }
446 | .lite-chatbox .cright .content {
447 | margin: 0 48px 0 0;
448 | border-radius: 20px 0 20px 20px;
449 | color: white;
450 | background: -o-linear-gradient(70deg, rgba(63, 143, 225, 0.8) 0%, #44d7c9 100%);
451 | background: linear-gradient(20deg, rgba(63, 143, 225, 0.8) 0%, #44d7c9 100%);
452 | -webkit-box-shadow: 5px 5px 15px 0 rgba(102, 102, 102, 0.15);
453 | box-shadow: 5px 5px 15px 0 rgba(102, 102, 102, 0.15);
454 | }
455 | [litewebchat-theme=dark] .lite-chatbox .cright .content {
456 | background: -o-linear-gradient(70deg, rgba(25, 91, 159, 0.8) 0px, rgb(33, 154, 146) 100%);
457 | background: linear-gradient(20deg, rgba(25, 91, 159, 0.8) 0px, rgb(33, 154, 146) 100%);
458 | }
459 | .lite-chatbox .cright .content::after {
460 | left: -12px;
461 | top: 8px;
462 | }
463 | .lite-chatbox .cleft {
464 | text-align: left;
465 | margin-right: 64px;
466 | }
467 | .lite-chatbox .cleft img.headIcon {
468 | left: 0;
469 | }
470 | .lite-chatbox .cleft .name {
471 | margin: 0 0 2px 48px;
472 | }
473 | .lite-chatbox .cleft .content {
474 | margin: 0 0 0 48px;
475 | border-radius: 0 20px 20px 20px;
476 | background: #fff;
477 | color: #373737;
478 | border: 1px solid rgba(0, 0, 0, 0.05);
479 | -webkit-box-shadow: 5px 5px 15px 0 rgba(102, 102, 102, 0.1);
480 | box-shadow: 5px 5px 15px 0 rgba(102, 102, 102, 0.1);
481 | }
482 | [litewebchat-theme=dark] .lite-chatbox .cleft .content {
483 | background: #22242a;
484 | }
485 | [litewebchat-theme=dark] .lite-chatbox .cleft .content {
486 | color: #d4d4d4;
487 | }
488 | .lite-chatbox .cleft .content::after {
489 | left: -12px;
490 | top: 8px;
491 | }
492 | .lite-chatbox img.headIcon {
493 | width: 34px;
494 | height: 34px;
495 | top: 9px;
496 | position: absolute;
497 | }
498 | .lite-chatbox img.radius {
499 | border-radius: 50%;
500 | }
501 | .lite-chatbox .name {
502 | color: #8b8b8b;
503 | font-size: 12px;
504 | display: block;
505 | line-height: 18px;
506 | }
507 | .lite-chatbox .name > span {
508 | vertical-align: middle;
509 | }
510 | .lite-chatbox .name .htitle {
511 | display: inline-block;
512 | padding: 0 3px 0 3px;
513 | background-color: #cccccc;
514 | color: #ffffff;
515 | border-radius: 4px;
516 | margin-right: 4px;
517 | font-size: 11px;
518 | overflow: hidden;
519 | -o-text-overflow: ellipsis;
520 | text-overflow: ellipsis;
521 | white-space: nowrap;
522 | vertical-align: middle;
523 | max-width: 50px;
524 | }
525 | [litewebchat-theme=dark] .lite-chatbox .name .htitle {
526 | background-color: rgb(76, 80, 82);
527 | }
528 | .lite-chatbox .name .htitle.admin {
529 | background-color: #72D6A0;
530 | }
531 | [litewebchat-theme=dark] .lite-chatbox .name .htitle.admin {
532 | background-color: rgb(60, 145, 110);
533 | }
534 | .lite-chatbox .name .htitle.owner {
535 | background-color: #F2BF25;
536 | }
537 | [litewebchat-theme=dark] .lite-chatbox .name .htitle.owner {
538 | background-color: rgb(154, 124, 33);
539 | }
540 | .lite-chatbox .content {
541 | word-break: break-all;
542 | word-wrap: break-word;
543 | text-align: left;
544 | position: relative;
545 | display: inline-block;
546 | font-size: 15px;
547 | padding: 10px 15px;
548 | line-height: 20px;
549 | white-space: pre-wrap;
550 | min-width: 9px;
551 | min-height: 18px;
552 | }
553 | .lite-chatbox .content img {
554 | width: 100%;
555 | height: auto;
556 | }
557 | .lite-chatbox .content a {
558 | color: #0072C1;
559 | margin: 0 5px;
560 | cursor: hand;
561 | }
562 | [litewebchat-theme=dark] .lite-chatbox .content a {
563 | color: #00c3ff;
564 | }
565 | /*# sourceMappingURL=map/litewebchat.css.map */
566 |
--------------------------------------------------------------------------------
/example/web3/css/litewebchat.min.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";/*!
2 | * LiteWebChat_Frame 2.2.1 (https://lab.morfans.cn/LiteWebChat_Frame)
3 | * MorFans Lab(c) 2017-2023
4 | * Licensed under LGPL
5 | *//*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}*{scrollbar-color:#5c6163 rgba(56,59,60,.031372549)}::-webkit-scrollbar{width:7px;height:1px}::-webkit-scrollbar-thumb{border-radius:10px;background-color:rgba(144,147,153,.5);border:0}[litewebchat-theme=dark] ::-webkit-scrollbar-thumb{background-color:rgba(84,91,95,.5)}::-webkit-scrollbar-track{background:#fff;min-height:50%;min-height:20px}[litewebchat-theme=dark] ::-webkit-scrollbar-track{background:#181a1b}::-webkit-scrollbar-corner{background-color:transparent}::-moz-selection{background-color:#1963bd!important;color:#f8f6f3!important}::selection{background-color:#1963bd!important;color:#f8f6f3!important}body{font-family:Helvetica,"PingFang SC","Microsoft YaHei",sans-serif}.lite-chatbox{scroll-behavior:smooth;padding:0;width:100%;position:relative;font-size:18px;background-color:#f8f9fa;overflow-y:auto;overflow-x:hidden}.lite-chatbox .tips{margin:12px;text-align:center;font-size:12px}.lite-chatbox .tips span{display:inline-block;padding:4px;background-color:#ccc;color:#fff;border-radius:6px}[litewebchat-theme=dark] .lite-chatbox .tips span{background-color:rgba(0,0,0,.3)}[litewebchat-theme=dark] .lite-chatbox .tips span{color:#bec5cc}.lite-chatbox .tips .tips-primary{background-color:#3986c8}[litewebchat-theme=dark] .lite-chatbox .tips .tips-primary{background-color:#447fb2}.lite-chatbox .tips .tips-success{background-color:#49b649}[litewebchat-theme=dark] .lite-chatbox .tips .tips-success{background-color:#66a651}.lite-chatbox .tips .tips-info{background-color:#5bb6d1}[litewebchat-theme=dark] .lite-chatbox .tips .tips-info{background-color:#3f889e}.lite-chatbox .tips .tips-warning{background-color:#eea948}[litewebchat-theme=dark] .lite-chatbox .tips .tips-warning{background-color:#af7728}.lite-chatbox .tips .tips-danger{background-color:#e24d48}[litewebchat-theme=dark] .lite-chatbox .tips .tips-danger{background-color:#ad3531}[litewebchat-theme=dark] .lite-chatbox{background-color:#131415}.lite-chatbox .cmsg{position:relative;margin:4px 7px;min-height:50px;border:0}.lite-chatbox .cright{text-align:right;margin-left:64px}.lite-chatbox .cright img.headIcon{right:0}.lite-chatbox .cright .name{margin:0 48px 2px 0}.lite-chatbox .cright .content{margin:0 48px 0 0;border-radius:20px 0 20px 20px;color:#fff;background:-o-linear-gradient(70deg,rgba(63,143,225,.8) 0,#44d7c9 100%);background:linear-gradient(20deg,rgba(63,143,225,.8) 0,#44d7c9 100%);-webkit-box-shadow:5px 5px 15px 0 rgba(102,102,102,.15);box-shadow:5px 5px 15px 0 rgba(102,102,102,.15)}[litewebchat-theme=dark] .lite-chatbox .cright .content{background:-o-linear-gradient(70deg,rgba(25,91,159,.8) 0,#219a92 100%);background:linear-gradient(20deg,rgba(25,91,159,.8) 0,#219a92 100%)}.lite-chatbox .cright .content::after{left:-12px;top:8px}.lite-chatbox .cleft{text-align:left;margin-right:64px}.lite-chatbox .cleft img.headIcon{left:0}.lite-chatbox .cleft .name{margin:0 0 2px 48px}.lite-chatbox .cleft .content{margin:0 0 0 48px;border-radius:0 20px 20px 20px;background:#fff;color:#373737;border:1px solid rgba(0,0,0,.05);-webkit-box-shadow:5px 5px 15px 0 rgba(102,102,102,.1);box-shadow:5px 5px 15px 0 rgba(102,102,102,.1)}[litewebchat-theme=dark] .lite-chatbox .cleft .content{background:#22242a}[litewebchat-theme=dark] .lite-chatbox .cleft .content{color:#d4d4d4}.lite-chatbox .cleft .content::after{left:-12px;top:8px}.lite-chatbox img.headIcon{width:34px;height:34px;top:9px;position:absolute}.lite-chatbox img.radius{border-radius:50%}.lite-chatbox .name{color:#8b8b8b;font-size:12px;display:block;line-height:18px}.lite-chatbox .name>span{vertical-align:middle}.lite-chatbox .name .htitle{display:inline-block;padding:0 3px 0 3px;background-color:#ccc;color:#fff;border-radius:4px;margin-right:4px;font-size:11px;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle;max-width:50px}[litewebchat-theme=dark] .lite-chatbox .name .htitle{background-color:#4c5052}.lite-chatbox .name .htitle.admin{background-color:#72d6a0}[litewebchat-theme=dark] .lite-chatbox .name .htitle.admin{background-color:#3c916e}.lite-chatbox .name .htitle.owner{background-color:#f2bf25}[litewebchat-theme=dark] .lite-chatbox .name .htitle.owner{background-color:#9a7c21}.lite-chatbox .content{word-break:break-all;word-wrap:break-word;text-align:left;position:relative;display:inline-block;font-size:15px;padding:10px 15px;line-height:20px;white-space:pre-wrap;min-width:9px;min-height:18px}.lite-chatbox .content img{width:100%;height:auto}.lite-chatbox .content a{color:#0072c1;margin:0 5px;cursor:hand}[litewebchat-theme=dark] .lite-chatbox .content a{color:#00c3ff}
6 | /*# sourceMappingURL=map/litewebchat.min.css.map */
7 |
--------------------------------------------------------------------------------
/example/web3/css/litewebchat_input.min.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";/*!
2 | * LiteWebChat_Frame 2.2.1 (https://lab.morfans.cn/LiteWebChat_Frame)
3 | * MorFans Lab(c) 2017-2023
4 | * Licensed under LGPL
5 | */.lite-chatbox{height:calc(100% - 150px)}.lite-chatbox>div:last-child{margin-bottom:20px}.lite-chatinput{width:100%;height:150px;position:relative;bottom:0;background-color:#fff}[litewebchat-theme=dark] .lite-chatinput{background-color:#202223}.lite-chatinput img{max-width:150px;max-height:150px;-o-object-fit:contain;object-fit:contain}.lite-chatinput .boundary{cursor:s-resize;margin:0 auto;border-width:1px 0 0 0;border-color:rgba(0,0,0,.2);height:5px;background:#fff}[litewebchat-theme=dark] .lite-chatinput .boundary{background:#202223}.lite-chatinput>.chatinput{position:relative;overflow-y:scroll;width:calc(100% - 6px);margin:auto;height:calc(100% - 75px);border:none;outline:0;resize:none;font-size:18px;color:#373737;word-break:break-all;overflow-wrap:break-word;padding:5px;outline:0}[litewebchat-theme=dark] .lite-chatinput>.chatinput{color:#d4d4d4}.lite-chatinput .send{float:right;padding:4px 20px 4px 20px;margin-right:12px;margin-top:-2px;color:#fff;background:-o-linear-gradient(70deg,rgba(63,143,225,.8) 0,#44d7c9 100%);background:linear-gradient(20deg,rgba(63,143,225,.8) 0,#44d7c9 100%);-webkit-box-shadow:5px 5px 15px 0 rgba(102,102,102,.1);box-shadow:5px 5px 15px 0 rgba(102,102,102,.1);border:none;border-radius:4px;-webkit-transition:all .2s;-o-transition:all .2s;transition:all .2s}[litewebchat-theme=dark] .lite-chatinput .send{background:-o-linear-gradient(70deg,rgba(25,91,159,.8) 0,#219a92 100%);background:linear-gradient(20deg,rgba(25,91,159,.8) 0,#219a92 100%)}.lite-chatinput .send:hover{-webkit-transform:scale(1.1);-ms-transform:scale(1.1);transform:scale(1.1);opacity:.7}.lite-chatinput .send:active{-webkit-transform:scale(.9);-ms-transform:scale(.9);transform:scale(.9);opacity:1}.lite-chatinput .tool-button{padding:0 3px 0 3px;background:0 0;border:none;margin:5px;margin-bottom:0;-webkit-transition:all .2s;-o-transition:all .2s;transition:all .2s}.lite-chatinput .tool-button:hover{-webkit-transform:scale(1.1);-ms-transform:scale(1.1);transform:scale(1.1);opacity:.7}.lite-chatinput .tool-button:active{-webkit-transform:scale(.9);-ms-transform:scale(.9);transform:scale(.9);opacity:1}.lite-chatinput .tool-button path{fill:#8b8799}.lite-chatinput .tool-button svg{width:18px}.lite-chatbox-tool{position:absolute;margin-left:3px;z-index:3}#toolMusk{position:absolute;width:100vw;height:100vh;top:0;left:0;z-index:2}.float-left{float:left}.float-right{float:right}
6 | /*# sourceMappingURL=map/litewebchat_input.min.css.map */
7 |
--------------------------------------------------------------------------------
/example/web3/css/map/litewebchat.min.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["index.css","../../node_modules/normalize.css/normalize.css","components/color-scrollbar/_index.scss","mixin/_theme.scss","index.scss","components/tips/_index.scss","components/color-tips/_index.scss","components/htitle/_index.scss","components/color-htitle/_index.scss"],"names":[],"mappings":"iBAAA;;;;ACAA,4EAUA,KACE,YAAA,KACA,yBAAA,KAUF,KACE,OAAA,EAOF,KACE,QAAA,MAQF,GACE,UAAA,IACA,OAAA,MAAA,EAWF,GACE,mBAAA,YAAA,WAAA,YACA,OAAA,EACA,SAAA,QAQF,IACE,YAAA,SAAA,CAAA,UACA,UAAA,IAUF,EACE,iBAAA,YAQF,YACE,cAAA,KACA,gBAAA,UACA,wBAAA,UAAA,OAAA,gBAAA,UAAA,OAOF,EDNA,OCQE,YAAA,OAQF,KDPA,IACA,KCSE,YAAA,SAAA,CAAA,UACA,UAAA,IAOF,MACE,UAAA,IAQF,IDTA,ICWE,UAAA,IACA,YAAA,EACA,SAAA,SACA,eAAA,SAGF,IACE,OAAA,OAGF,IACE,IAAA,MAUF,IACE,aAAA,KAWF,ODbA,MACA,SACA,OACA,SCeE,YAAA,QACA,UAAA,KACA,YAAA,KACA,OAAA,EAQF,ODdA,MCgBE,SAAA,QAQF,ODfA,OCiBE,eAAA,KDTF,cACA,aACA,cCcA,OAIE,mBAAA,ODVF,gCACA,+BACA,gCCeA,yBAIE,aAAA,KACA,QAAA,EDXF,6BACA,4BACA,6BCgBA,sBAIE,QAAA,IAAA,OAAA,WAOF,SACE,QAAA,MAAA,MAAA,OAUF,OACE,mBAAA,WAAA,WAAA,WACA,MAAA,QACA,QAAA,MACA,UAAA,KACA,QAAA,EACA,YAAA,OAOF,SACE,eAAA,SAOF,SACE,SAAA,KAQF,gBDtBA,aCwBE,mBAAA,WAAA,WAAA,WACA,QAAA,EAOF,yCDtBA,yCCwBE,OAAA,KAQF,cACE,mBAAA,UACA,eAAA,KAOF,yCACE,mBAAA,KAQF,6BACE,mBAAA,OACA,KAAA,QAUF,QACE,QAAA,MAOF,QACE,QAAA,UAUF,SACE,QAAA,KAOF,SACE,QAAA,KCjVF,EAEE,gBAAA,QAAA,0BAIF,oBAEE,MAAA,IAEA,OAAA,IAGF,0BAEE,cAAA,KCjBI,iBAAA,qBDoBJ,OAAA,ECdI,mDACE,iBAAA,kBDgBR,0BCvBM,WAAA,KD0BJ,WAAA,IACA,WAAA,KCrBI,mDACE,WAAA,QDuBR,2BACE,iBAAA,YAGF,iBACE,iBAAA,kBACA,MAAA,kBAFF,YACE,iBAAA,kBACA,MAAA,kBEnCF,KACE,YAAA,SAAA,CAAA,aAAA,CAAA,iBAAA,CAAA,WAGF,cAKE,gBAAA,OAEA,QAAA,EACA,MAAA,KACA,SAAA,SACA,UAAA,KDfI,iBAAA,QCoBF,WAAA,KACA,WAAA,OCfJ,oBACE,OAAA,KACA,WAAA,OACA,UAAA,KAEA,yBACE,QAAA,aACA,QAAA,IFbE,iBAAA,KAAA,MAAA,KEgBF,cAAA,IFVE,kDACE,iBAAA,eADF,kDACE,MAAA,QGFJ,kCHLE,iBAAA,QAMA,2DACE,iBAAA,QGFJ,kCHLE,iBAAA,QAMA,2DACE,iBAAA,QGFJ,+BHLE,iBAAA,QAMA,wDACE,iBAAA,QGFJ,kCHLE,iBAAA,QAMA,2DACE,iBAAA,QGFJ,iCHLE,iBAAA,QAMA,0DACE,iBAAA,QADF,uCACE,iBAAA,QCiBN,oBACE,SAAA,SACA,OAAA,IAAA,IACA,WAAA,KACA,OAAA,EAGF,sBACE,WAAA,MACA,YAAA,KAEA,mCACE,MAAA,EAGF,4BACE,OAAA,EAAA,KAAA,IAAA,EAGF,+BACE,OAAA,EAAA,KAAA,EAAA,EACA,cAAA,KAAA,EAAA,KAAA,KACA,MAAA,KD9CA,WAAA,6DAAA,WAAA,0DCiDA,mBAAA,IAAA,IAAA,KAAA,EAAA,sBAAA,WAAA,IAAA,IAAA,KAAA,EAAA,sBD3CA,wDACE,WAAA,4DAAA,WAAA,yDC4CF,sCACE,KAAA,MACA,IAAA,IAKN,qBACE,WAAA,KACA,aAAA,KAEA,kCACE,KAAA,EAGF,2BACE,OAAA,EAAA,EAAA,IAAA,KAGF,8BACE,OAAA,EAAA,EAAA,EAAA,KACA,cAAA,EAAA,KAAA,KAAA,KDxEA,WAAA,KAAA,MAAA,QC4EA,OAAA,IAAA,MAAA,gBACA,mBAAA,IAAA,IAAA,KAAA,EAAA,qBAAA,WAAA,IAAA,IAAA,KAAA,EAAA,qBDvEA,uDACE,WAAA,QADF,uDACE,MAAA,QCwEF,qCACE,KAAA,MACA,IAAA,IAOJ,2BACE,MAAA,KACA,OAAA,KACA,IAAA,IACA,SAAA,SAIF,yBACE,cAAA,IAWJ,oBACE,MAAA,QACA,UAAA,KACA,QAAA,MACA,YAAA,KGhHJ,yBACE,eAAA,OAIF,4BACE,QAAA,aACA,QAAA,EAAA,IAAA,EAAA,IJPI,iBAAA,KISJ,MAAA,KACA,cAAA,IACA,aAAA,IACA,UAAA,KACA,SAAA,OACA,iBAAA,SAAA,cAAA,SACA,YAAA,OACA,eAAA,OACA,UAAA,KJXI,qDACE,iBAAA,QKLJ,kCLFE,iBAAA,QAMA,2DACE,iBAAA,QKLJ,kCLFE,iBAAA,QAMA,2DACE,iBAAA,QCiHN,uBACE,WAAA,UACA,UAAA,WACA,WAAA,KACA,SAAA,SACA,QAAA,aACA,UAAA,KACA,QAAA,KAAA,KACA,YAAA,KACA,YAAA,SAEA,UAAA,IACA,WAAA,KAGA,2BACE,MAAA,KACA,OAAA,KAIF,yBD7IE,MAAA,QC+IA,OAAA,EAAA,IACA,OAAA,KD1IA,kDACE,MAAA","file":"../litewebchat.min.css","sourcesContent":["/*!\n * LiteWebChat_Frame 2.2.1 (https://lab.morfans.cn/LiteWebChat_Frame)\n * MorFans Lab(c) 2017-2023\n * Licensed under LGPL\n */@charset \"UTF-8\";\n/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n/* Document\n ========================================================================== */\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n/**\n * Remove the margin in all browsers.\n */\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n/**\n * Remove the gray background on active links in IE 10.\n */\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n/**\n * Remove the border on images inside links in IE 10.\n */\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\nbutton,\ninput { /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\nbutton,\nselect { /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\nbutton,\n[type=button],\n[type=reset],\n[type=submit] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\nbutton::-moz-focus-inner,\n[type=button]::-moz-focus-inner,\n[type=reset]::-moz-focus-inner,\n[type=submit]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\nbutton:-moz-focusring,\n[type=button]:-moz-focusring,\n[type=reset]:-moz-focusring,\n[type=submit]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n[type=checkbox],\n[type=radio] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n[type=number]::-webkit-inner-spin-button,\n[type=number]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n[type=search] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n[type=search]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n/**\n * Add the correct display in IE 10+.\n */\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n[hidden] {\n display: none;\n}\n\n* {\n scrollbar-color: #5c6163 rgba(56, 59, 60, 0.031372549);\n}\n\n/* else broswer */\n::-webkit-scrollbar {\n /* 滚动条整体样式 */\n width: 7px;\n /* 高宽分别对应横竖滚动条的尺寸 */\n height: 1px;\n}\n\n::-webkit-scrollbar-thumb {\n /*滚动条里面小方块*/\n border-radius: 10px;\n background-color: rgba(144, 147, 153, 0.5);\n border: 0;\n}\n[litewebchat-theme=dark] ::-webkit-scrollbar-thumb {\n background-color: rgba(84, 91, 95, 0.5);\n}\n\n::-webkit-scrollbar-track {\n /*滚动条里面轨道*/\n background: #fff;\n min-height: 50%;\n min-height: 20px;\n}\n[litewebchat-theme=dark] ::-webkit-scrollbar-track {\n background: rgb(24, 26, 27);\n}\n\n::-webkit-scrollbar-corner {\n background-color: transparent;\n}\n\n::selection {\n background-color: #1963bd !important;\n color: #f8f6f3 !important;\n}\n\nbody {\n font-family: Helvetica, \"PingFang SC\", \"Microsoft YaHei\", sans-serif;\n}\n\n.lite-chatbox {\n scroll-behavior: smooth;\n padding: 0px;\n width: 100%;\n position: relative;\n font-size: 18px;\n background-color: #f8f9fa;\n overflow-y: auto;\n overflow-x: hidden;\n}\n.lite-chatbox .tips {\n margin: 12px;\n text-align: center;\n font-size: 12px;\n}\n.lite-chatbox .tips span {\n display: inline-block;\n padding: 4px;\n background-color: #ccc;\n color: #fff;\n border-radius: 6px;\n}\n[litewebchat-theme=dark] .lite-chatbox .tips span {\n background-color: rgba(0, 0, 0, 0.3);\n}\n[litewebchat-theme=dark] .lite-chatbox .tips span {\n color: #bec5cc;\n}\n.lite-chatbox .tips .tips-primary {\n background-color: #3986c8;\n}\n[litewebchat-theme=dark] .lite-chatbox .tips .tips-primary {\n background-color: rgb(68, 127, 178);\n}\n.lite-chatbox .tips .tips-success {\n background-color: #49b649;\n}\n[litewebchat-theme=dark] .lite-chatbox .tips .tips-success {\n background-color: rgb(102, 166, 81);\n}\n.lite-chatbox .tips .tips-info {\n background-color: #5bb6d1;\n}\n[litewebchat-theme=dark] .lite-chatbox .tips .tips-info {\n background-color: rgb(63, 136, 158);\n}\n.lite-chatbox .tips .tips-warning {\n background-color: #eea948;\n}\n[litewebchat-theme=dark] .lite-chatbox .tips .tips-warning {\n background-color: rgb(175, 119, 40);\n}\n.lite-chatbox .tips .tips-danger {\n background-color: #e24d48;\n}\n[litewebchat-theme=dark] .lite-chatbox .tips .tips-danger {\n background-color: rgb(173, 53, 49);\n}\n[litewebchat-theme=dark] .lite-chatbox {\n background-color: #131415;\n}\n.lite-chatbox .cmsg {\n position: relative;\n margin: 4px 7px;\n min-height: 50px;\n border: 0;\n}\n.lite-chatbox .cright {\n text-align: right;\n margin-left: 64px;\n}\n.lite-chatbox .cright img.headIcon {\n right: 0;\n}\n.lite-chatbox .cright .name {\n margin: 0 48px 2px 0;\n}\n.lite-chatbox .cright .content {\n margin: 0 48px 0 0;\n border-radius: 20px 0 20px 20px;\n color: white;\n background: linear-gradient(20deg, rgba(63, 143, 225, 0.8) 0%, #44d7c9 100%);\n box-shadow: 5px 5px 15px 0 rgba(102, 102, 102, 0.15);\n}\n[litewebchat-theme=dark] .lite-chatbox .cright .content {\n background: linear-gradient(20deg, rgba(25, 91, 159, 0.8) 0px, rgb(33, 154, 146) 100%);\n}\n.lite-chatbox .cright .content::after {\n left: -12px;\n top: 8px;\n}\n.lite-chatbox .cleft {\n text-align: left;\n margin-right: 64px;\n}\n.lite-chatbox .cleft img.headIcon {\n left: 0;\n}\n.lite-chatbox .cleft .name {\n margin: 0 0 2px 48px;\n}\n.lite-chatbox .cleft .content {\n margin: 0 0 0 48px;\n border-radius: 0 20px 20px 20px;\n background: #fff;\n color: #373737;\n border: 1px solid rgba(0, 0, 0, 0.05);\n box-shadow: 5px 5px 15px 0 rgba(102, 102, 102, 0.1);\n}\n[litewebchat-theme=dark] .lite-chatbox .cleft .content {\n background: #22242a;\n}\n[litewebchat-theme=dark] .lite-chatbox .cleft .content {\n color: #d4d4d4;\n}\n.lite-chatbox .cleft .content::after {\n left: -12px;\n top: 8px;\n}\n.lite-chatbox img.headIcon {\n width: 34px;\n height: 34px;\n top: 9px;\n position: absolute;\n}\n.lite-chatbox img.radius {\n border-radius: 50%;\n}\n.lite-chatbox .name {\n color: #8b8b8b;\n font-size: 12px;\n display: block;\n line-height: 18px;\n}\n.lite-chatbox .name > span {\n vertical-align: middle;\n}\n.lite-chatbox .name .htitle {\n display: inline-block;\n padding: 0 3px 0 3px;\n background-color: #cccccc;\n color: #ffffff;\n border-radius: 4px;\n margin-right: 4px;\n font-size: 11px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n vertical-align: middle;\n max-width: 50px;\n}\n[litewebchat-theme=dark] .lite-chatbox .name .htitle {\n background-color: rgb(76, 80, 82);\n}\n.lite-chatbox .name .htitle.admin {\n background-color: #72D6A0;\n}\n[litewebchat-theme=dark] .lite-chatbox .name .htitle.admin {\n background-color: rgb(60, 145, 110);\n}\n.lite-chatbox .name .htitle.owner {\n background-color: #F2BF25;\n}\n[litewebchat-theme=dark] .lite-chatbox .name .htitle.owner {\n background-color: rgb(154, 124, 33);\n}\n.lite-chatbox .content {\n word-break: break-all;\n word-wrap: break-word;\n text-align: left;\n position: relative;\n display: inline-block;\n font-size: 15px;\n padding: 10px 15px;\n line-height: 20px;\n white-space: pre-wrap;\n min-width: 9px;\n min-height: 18px;\n}\n.lite-chatbox .content img {\n width: 100%;\n height: auto;\n}\n.lite-chatbox .content a {\n color: #0072C1;\n margin: 0 5px;\n cursor: hand;\n}\n[litewebchat-theme=dark] .lite-chatbox .content a {\n color: #00c3ff;\n}","/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput { /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect { /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n","// 非 FF 浏览器配色\n$scrollbar-color: (\n light:rgb(144 147 153 / 50%),\n dark:rgb(84 91 95 / 50%)\n);\n$scrollbar-bg-color: (\n light:#fff,\n dark:rgb(24, 26, 27)\n);\n\n* {\n // 默认暗色\n scrollbar-color: #5c6163 #383b3c08;\n}\n\n/* else broswer */\n::-webkit-scrollbar {\n /* 滚动条整体样式 */\n width: 7px;\n /* 高宽分别对应横竖滚动条的尺寸 */\n height: 1px;\n}\n\n::-webkit-scrollbar-thumb {\n /*滚动条里面小方块*/\n border-radius: 10px;\n // background-color: ;\n @include theme('background-color', $scrollbar-color);\n border: 0;\n}\n\n::-webkit-scrollbar-track {\n /*滚动条里面轨道*/\n @include theme('background', $scrollbar-bg-color);\n min-height: 50%;\n min-height: 20px;\n}\n\n::-webkit-scrollbar-corner {\n background-color: transparent;\n}\n\n::selection {\n background-color: #1963bd !important;\n color: #f8f6f3 !important;\n}\n","@mixin theme($key, $map_key) {\n $theme_colors: light,\n dark;\n\n @each $theme in $theme_colors {\n\n @if $theme ==light {\n // default light\n #{$key}: map-get($map: $map_key, $key: $theme);\n }\n\n @else {\n\n // 生成其他\n [litewebchat-theme=#{$theme}] & {\n #{$key}: map-get($map: $map_key, $key: $theme);\n }\n }\n }\n}\n","@import \"normalize.css/normalize\";\n\n@import './mixin/theme';\n\n@import './variable';\n\n// 滚动条着色\n@import './components/color-scrollbar';\n\nbody {\n font-family: Helvetica, \"PingFang SC\", \"Microsoft YaHei\", sans-serif;\n}\n\n.lite-chatbox {\n // 聊天提示\n @import './components/tips';\n @import './components/color-tips';\n\n scroll-behavior: smooth;\n\n padding: 0px;\n width: 100%;\n position: relative;\n font-size: 18px;\n\n @include theme('background-color', $chat-content-bg-color);\n\n overflow: {\n y: auto;\n x: hidden;\n }\n\n .cmsg {\n position: relative;\n margin: 4px 7px;\n min-height: 50px;\n border: 0;\n }\n\n .cright {\n text-align: right;\n margin-left: 64px;\n\n img.headIcon {\n right: 0;\n }\n\n .name {\n margin: 0 48px 2px 0;\n }\n\n .content {\n margin: 0 48px 0 0;\n border-radius: 20px 0 20px 20px;\n color: white;\n @include theme('background', $chat-message-bg-color-me);\n\n box-shadow: 5px 5px 15px 0 rgba(102, 102, 102, 0.15);\n\n &::after {\n left: -12px;\n top: 8px;\n }\n }\n }\n\n .cleft {\n text-align: left;\n margin-right: 64px;\n\n img.headIcon {\n left: 0;\n }\n\n .name {\n margin: 0 0 2px 48px;\n }\n\n .content {\n margin: 0 0 0 48px;\n border-radius: 0 20px 20px 20px;\n @include theme('background', $chat-message-bg-color);\n @include theme('color', $chat-message-color, );\n\n border: 1px solid rgba(0, 0, 0, 0.05);\n box-shadow: 5px 5px 15px 0 rgba(102, 102, 102, 0.1);\n\n &::after {\n left: -12px;\n top: 8px;\n }\n }\n }\n\n // 头像\n img {\n &.headIcon {\n width: 34px;\n height: 34px;\n top: 9px;\n position: absolute;\n }\n\n // 圆形头像\n &.radius {\n border-radius: 50%;\n }\n\n // .cright & {\n // right: 0;\n // }\n\n // end of img\n }\n\n // 昵称\n .name {\n color: #8b8b8b;\n font-size: 12px;\n display: block;\n line-height: 18px;\n\n // 头衔\n @import './components/htitle';\n @import './components/color-htitle';\n // end of .name\n }\n\n .content {\n word-break: break-all;\n word-wrap: break-word;\n text-align: left;\n position: relative;\n display: inline-block;\n font-size: 15px;\n padding: 10px 15px;\n line-height: 20px;\n white-space: pre-wrap;\n // 用于撑开空白消息\n min-width: 9px;\n min-height: 18px;\n\n // 处理图片\n img {\n width: 100%;\n height: auto;\n }\n\n // 超链接\n a {\n @include theme('color', $chat-message-color-herf);\n margin: 0 5px;\n cursor: hand;\n }\n\n // end of .content\n }\n}\n","@import '../../variable/color/tips';\n\n// 聊天 tips 默认配色\n$chat-message-bg-color-tips: (\n light:#ccc,\n dark:rgba(0, 0, 0, 0.3)\n);\n\n$chat-message-color-tips: (\n light:#fff,\n dark:#bec5cc\n);\n\n// 聊天提示条\n.tips {\n margin: 12px;\n text-align: center;\n font-size: 12px;\n\n span {\n display: inline-block;\n padding: 4px;\n @include theme('background-color', $chat-message-bg-color-tips);\n @include theme('color', $chat-message-color-tips);\n border-radius: 6px;\n }\n}\n","// 提示条颜色\n@import '../../variable/color/tips';\n\n$tips-color-map: (\n primary: $chat-message-bg-color-tips-primary,\n success: $chat-message-bg-color-tips-success,\n info: $chat-message-bg-color-tips-info,\n warning: $chat-message-bg-color-tips-warning,\n danger: $chat-message-bg-color-tips-danger\n);\n\n.tips {\n @each $type in map-keys($tips-color-map) {\n .tips-#{$type} {\n @include theme('background-color', map-get($tips-color-map, $type));\n }\n }\n}","@import '../../variable/color/htitle';\n\n$chat-message-bg-color-htitle: (\n light:#cccccc,\n dark:rgb(76, 80, 82)\n);\n\n// 名称与头衔对齐\n>span {\n vertical-align: middle;\n}\n\n// 头衔\n.htitle {\n display: inline-block;\n padding: 0 3px 0 3px;\n @include theme('background-color', $chat-message-bg-color-htitle);\n color: #ffffff;\n border-radius: 4px;\n margin-right: 4px;\n font-size: 11px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n vertical-align: middle;\n max-width: 50px;\n}\n","@import '../../variable/color/htitle';\n\n$htitle-color-map: (\n admin: $chat-message-bg-color-htitle-admin,\n owner: $chat-message-bg-color-htitle-owner\n);\n\n\n.htitle {\n @each $type in map-keys($htitle-color-map) {\n &.#{$type} {\n @include theme('background-color', map-get($htitle-color-map, $type));\n }\n }\n}\n"]}
--------------------------------------------------------------------------------
/example/web3/css/map/litewebchat_input.min.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["chatinput.css","chatinput.scss","mixin/_theme.scss","mixin/_helper.scss"],"names":[],"mappings":"iBAAA;;;;ACMA,cACE,OAAA,mBAGA,6BACE,cAAA,KAKJ,gBACE,MAAA,KACA,OAAA,MACA,SAAA,SACA,OAAA,ECZI,iBAAA,KAMA,yCACE,iBAAA,QDSN,oBACE,UAAA,MACA,WAAA,MACA,cAAA,QAAA,WAAA,QAIF,0BACE,OAAA,SACA,OAAA,EAAA,KACA,aAAA,IAAA,EAAA,EAAA,EACA,aAAA,eACA,OAAA,IC5BE,WAAA,KAMA,mDACE,WAAA,QD0BN,2BACE,SAAA,SACA,WAAA,OAEA,MAAA,iBACA,OAAA,KAEA,OAAA,kBAEA,OAAA,KACA,QAAA,EACA,OAAA,KACA,UAAA,KC7CE,MAAA,QD+CF,WAAA,UACA,cAAA,WACA,QAAA,IACA,QAAA,EC5CE,oDACE,MAAA,QD+CN,sBACE,MAAA,MACA,QAAA,IAAA,KAAA,IAAA,KAGE,aAAA,KACA,WAAA,KAGF,MAAA,KC/DE,WAAA,6DAAA,WAAA,0DDiEF,mBAAA,IAAA,IAAA,KAAA,EAAA,qBAAA,WAAA,IAAA,IAAA,KAAA,EAAA,qBACA,OAAA,KACA,cAAA,IElEF,mBAAA,IAAA,IAAA,cAAA,IAAA,IAAA,WAAA,IAAA,IDKI,+CACE,WAAA,4DAAA,WAAA,yDCJN,4BACE,kBAAA,WAAA,cAAA,WAAA,UAAA,WACA,QAAA,GAGF,6BACE,kBAAA,UAAA,cAAA,UAAA,UAAA,UACA,QAAA,EF8DF,6BACE,QAAA,EAAA,IAAA,EAAA,IACA,WAAA,IACA,OAAA,KACA,OAAA,IACA,cAAA,EE5EF,mBAAA,IAAA,IAAA,cAAA,IAAA,IAAA,WAAA,IAAA,IAEA,mCACE,kBAAA,WAAA,cAAA,WAAA,UAAA,WACA,QAAA,GAGF,oCACE,kBAAA,UAAA,cAAA,UAAA,UAAA,UACA,QAAA,EFsEA,kCACE,KAAA,QAGF,iCACE,MAAA,KAQN,mBAEE,SAAA,SAEA,YAAA,IACA,QAAA,EAIF,UAEE,SAAA,SACA,MAAA,MACA,OAAA,MACA,IAAA,EACA,KAAA,EACA,QAAA,EAGF,YACE,MAAA,KAGF,aACE,MAAA","file":"../litewebchat_input.min.css","sourcesContent":["/*!\n * LiteWebChat_Frame 2.2.1 (https://lab.morfans.cn/LiteWebChat_Frame)\n * MorFans Lab(c) 2017-2023\n * Licensed under LGPL\n */@charset \"UTF-8\";\n.lite-chatbox {\n height: calc(100% - 150px);\n}\n.lite-chatbox > div:last-child {\n margin-bottom: 20px;\n}\n\n.lite-chatinput {\n width: 100%;\n height: 150px;\n position: relative;\n bottom: 0px;\n background-color: #fff;\n}\n[litewebchat-theme=dark] .lite-chatinput {\n background-color: #202223;\n}\n.lite-chatinput img {\n max-width: 150px;\n max-height: 150px;\n object-fit: contain;\n}\n.lite-chatinput .boundary {\n cursor: s-resize;\n margin: 0 auto;\n border-width: 1px 0px 0px 0px;\n border-color: rgba(0, 0, 0, 0.2);\n height: 5px;\n background: #fff;\n}\n[litewebchat-theme=dark] .lite-chatinput .boundary {\n background: #202223;\n}\n.lite-chatinput > .chatinput {\n position: relative;\n overflow-y: scroll;\n /* margin: 0px 3px 0px 3px; */\n width: calc(100% - 6px);\n margin: auto;\n /* width: 100%; */\n height: calc(100% - 75px);\n /* height: 100%; */\n border: none;\n outline: none;\n resize: none;\n font-size: 18px;\n color: #373737;\n word-break: break-all;\n overflow-wrap: break-word;\n padding: 5px;\n outline: none;\n}\n[litewebchat-theme=dark] .lite-chatinput > .chatinput {\n color: #d4d4d4;\n}\n.lite-chatinput .send {\n float: right;\n padding: 4px 20px 4px 20px;\n margin-right: 12px;\n margin-top: -2px;\n color: white;\n background: linear-gradient(20deg, rgba(63, 143, 225, 0.8) 0%, #44d7c9 100%);\n box-shadow: 5px 5px 15px 0 rgba(102, 102, 102, 0.1);\n border: none;\n border-radius: 4px;\n transition: all 0.2s;\n}\n[litewebchat-theme=dark] .lite-chatinput .send {\n background: linear-gradient(20deg, rgba(25, 91, 159, 0.8) 0px, rgb(33, 154, 146) 100%);\n}\n.lite-chatinput .send:hover {\n transform: scale(1.1);\n opacity: 0.7;\n}\n.lite-chatinput .send:active {\n transform: scale(0.9);\n opacity: 1;\n}\n.lite-chatinput .tool-button {\n padding: 0px 3px 0px 3px;\n background: none;\n border: none;\n margin: 5px;\n margin-bottom: 0px;\n transition: all 0.2s;\n}\n.lite-chatinput .tool-button:hover {\n transform: scale(1.1);\n opacity: 0.7;\n}\n.lite-chatinput .tool-button:active {\n transform: scale(0.9);\n opacity: 1;\n}\n.lite-chatinput .tool-button path {\n fill: rgb(139, 135, 153);\n}\n.lite-chatinput .tool-button svg {\n width: 18px;\n}\n\n/* 由功能按钮唤起的功能页面 */\n.lite-chatbox-tool {\n /* border: 5px solid red; */\n position: absolute;\n /* bottom: 20px; */\n margin-left: 3px;\n z-index: 3;\n}\n\n/* 部分功能页面需要用到的遮罩 */\n#toolMusk {\n /* border: 3px solid red; */\n position: absolute;\n width: 100vw;\n height: 100vh;\n top: 0;\n left: 0;\n z-index: 2;\n}\n\n.float-left {\n float: left;\n}\n\n.float-right {\n float: right;\n}","@import './mixin/theme';\n@import './mixin/helper';\n\n@import './variable';\n\n// 聊天区域\n.lite-chatbox {\n height: calc(100% - 150px);\n\n //.lite-chatbox内的最后一条消息的margin-bottom设置为20px,离下面远一点\n >div:last-child {\n margin-bottom: 20px;\n }\n}\n\n// 输入框\n.lite-chatinput {\n width: 100%;\n height: 150px;\n position: relative;\n bottom: 0px;\n @include theme('background-color', $chat-bg-color-input);\n\n // 缩小输入框内的图片,方便编辑\n img {\n max-width: 150px;\n max-height: 150px;\n object-fit: contain;\n }\n\n // 聊天区域和输入框的分界线\n .boundary {\n cursor: s-resize;\n margin: 0 auto;\n border-width: 1px 0px 0px 0px;\n border-color: rgba(0, 0, 0, 0.2);\n height: 5px;\n @include theme('background', $chat-bg-color-input);\n }\n\n // 输入框\n >.chatinput {\n position: relative;\n overflow-y: scroll;\n /* margin: 0px 3px 0px 3px; */\n width: calc(100% - 6px);\n margin: auto;\n /* width: 100%; */\n height: calc(100% - 75px);\n /* height: 100%; */\n border: none;\n outline: none;\n resize: none;\n font-size: 18px;\n @include theme('color', $chat-color-input);\n word-break: break-all;\n overflow-wrap: break-word;\n padding: 5px;\n outline: none;\n }\n\n // 发送按钮\n .send {\n float: right;\n padding: 4px 20px 4px 20px;\n\n margin: {\n right: 12px;\n top: -2px;\n }\n\n color: white;\n @include theme('background', $chat-message-bg-color-me);\n box-shadow: 5px 5px 15px 0 rgba(102, 102, 102, 0.1);\n border: none;\n border-radius: 4px;\n @include push-animate;\n }\n\n // 输入框上方的输入表情等功能按钮\n .tool-button {\n padding: 0px 3px 0px 3px;\n background: none;\n border: none;\n margin: 5px;\n margin-bottom: 0px;\n @include push-animate;\n\n path {\n fill: rgb(139, 135, 153);\n }\n\n svg {\n width: 18px;\n }\n }\n\n // end of.tool-button\n}\n\n/* 由功能按钮唤起的功能页面 */\n.lite-chatbox-tool {\n /* border: 5px solid red; */\n position: absolute;\n /* bottom: 20px; */\n margin-left: 3px;\n z-index: 3;\n}\n\n/* 部分功能页面需要用到的遮罩 */\n#toolMusk {\n /* border: 3px solid red; */\n position: absolute;\n width: 100vw;\n height: 100vh;\n top: 0;\n left: 0;\n z-index: 2;\n}\n\n.float-left {\n float: left;\n}\n\n.float-right {\n float: right;\n}\n","@mixin theme($key, $map_key) {\n $theme_colors: light,\n dark;\n\n @each $theme in $theme_colors {\n\n @if $theme ==light {\n // default light\n #{$key}: map-get($map: $map_key, $key: $theme);\n }\n\n @else {\n\n // 生成其他\n [litewebchat-theme=#{$theme}] & {\n #{$key}: map-get($map: $map_key, $key: $theme);\n }\n }\n }\n}\n","@use \"sass:selector\";\n\n@mixin unify-parent($child) {\n @at-root #{selector.unify(&, $child)} {\n @content;\n }\n}\n\n@mixin push-animate($time: .2, $scaleHover: 1.1, $scalePush: 0.9) {\n transition: all #{$time}s; // 让按下有呼吸感\n\n &:hover {\n transform: scale($scaleHover);\n opacity: .7;\n }\n\n &:active {\n transform: scale($scalePush);\n opacity: 1;\n }\n}\n"]}
--------------------------------------------------------------------------------
/example/web3/html/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | EdgeGPT by Chookyin
10 |
11 |
12 |
13 |
28 |
29 |
30 |
31 |
32 |
33 |
EdgeGPT欢迎回来! 你想要讨论什么?
35 |
36 |
37 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/example/web3/images/bing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ykaiqx/Bing-Chat/6123e0285ebadddf43954eaa9ec50cf6497aca47/example/web3/images/bing.png
--------------------------------------------------------------------------------
/example/web3/images/bing2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ykaiqx/Bing-Chat/6123e0285ebadddf43954eaa9ec50cf6497aca47/example/web3/images/bing2.png
--------------------------------------------------------------------------------
/example/web3/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ykaiqx/Bing-Chat/6123e0285ebadddf43954eaa9ec50cf6497aca47/example/web3/images/favicon.ico
--------------------------------------------------------------------------------
/example/web3/images/img.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ykaiqx/Bing-Chat/6123e0285ebadddf43954eaa9ec50cf6497aca47/example/web3/images/img.jpg
--------------------------------------------------------------------------------
/example/web3/images/me.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ykaiqx/Bing-Chat/6123e0285ebadddf43954eaa9ec50cf6497aca47/example/web3/images/me.jpg
--------------------------------------------------------------------------------
/example/web3/js/litewebchat_input.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * LiteWebChat_Frame 2.2.1 (https://lab.morfans.cn/LiteWebChat_Frame)
3 | * MorFans Lab(c) 2017-2023
4 | * Licensed under LGPL
5 | */"use strict";var upperChild=document.querySelector(".lite-chatbox"),oLine=document.querySelector(".lite-chatinput hr"),downChild=document.querySelector(".lite-chatinput"),downHeight=downChild.clientHeight,upperHeight=upperChild.clientHeight,emojiBtn=document.getElementById("emojiBtn"),imageBtn=document.getElementById("imageBtn"),fileBtn=document.getElementById("fileBtn"),editFullScreen=document.getElementById("editFullScreen"),exitFullScreen=document.getElementById("exitFullScreen"),emojiMart=document.getElementById("emojiMart"),toolMusk=document.getElementById("toolMusk"),sendBtn=document.getElementById("sendBtn"),chatInput=document.querySelector(".lite-chatinput>.chatinput"),pickerOptions={locale:"zh",onEmojiSelect:function(e){emojiMart.style.display="none",toolMusk.style.display="none",insertAtCursor(chatInput,e.native)}},picker=new EmojiMart.Picker(pickerOptions);function insertAtCursor(e,t){var n=e,o=t;if(n.focus(),window.getSelection){var i=window.getSelection();if(i.getRangeAt&&i.rangeCount){(r=i.getRangeAt(0)).deleteContents();var l,a,c=document.createElement("div");c.innerHTML=o;for(var d=document.createDocumentFragment();l=c.firstChild;)a=d.appendChild(l);r.insertNode(d),a&&((r=r.cloneRange()).setStartAfter(a),r.collapse(!0),i.removeAllRanges(),i.addRange(r))}}else if(document.selection&&"Control"!=document.selection.type){var r;n.focus(),(r=document.selection.createRange()).pasteHTML(o),n.focus()}}function addImage(e){new Promise((function(t,n){var o=new FileReader;o.onload=function(e){var t=e.target.result,n=new Image;n.src=t;var o=n.outerHTML;insertAtCursor(chatInput,o)},o.readAsDataURL(e)}))}function inputFile(e){if(console.log(e),null!=e.maxImageSize)var t=e.maxImageSize;else t=-1;if(null!=e.maxImageNumber)var n=e.maxImageNumber;else n=-1;if(e.enable){imageBtn.onclick=function(){var e=document.createElement("input");e.type="file",e.accept="image/*",e.multiple=!0,e.style.display="none",e.onchange=function(){for(var e=chatInput.getElementsByTagName("img").length,i=0;i";
83 | document.getElementById('messagesdiv').appendChild(div);
84 |
85 | let answer_div = document.createElement('div');
86 | answer_div.className = 'cleft cmsg';
87 | answer_div.innerHTML = "
EdgeGPT";
88 | ANSWER_SPAN = document.createElement('span');
89 | ANSWER_SPAN.className = 'content';
90 | ANSWER_SPAN.innerHTML = '正在回复...';
91 | answer_div.appendChild(ANSWER_SPAN);
92 | document.getElementById('messagesdiv').appendChild(answer_div);
93 |
94 | WS.send(JSON.stringify({"style": radioValue, "question": question}));
95 | input.innerHTML = '';
96 | document.getElementById('send').disabled = true;
97 | }
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | fastapi
2 | python-multipart
3 | uvicorn
4 | asyncio
5 | EdgeGPT
6 | BingImageCreator
--------------------------------------------------------------------------------