@webskill/chatbot 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chatbot.css +4 -0
- package/dist/config.d.ts +104 -0
- package/dist/config.js +144 -0
- package/dist/core-D3Tq37jA.js +3063 -0
- package/dist/core-DBetA176.js +2035 -0
- package/dist/index-B25ux241.d.ts +390 -0
- package/dist/index.d.ts +2 -389
- package/dist/index.js +296 -6151
- package/dist/markdown-4gn774sm.js +280 -0
- package/dist/parse-79VbXLl4.js +642 -0
- package/dist/parse-Cc8nFxir.d.ts +280 -0
- package/dist/tsx-DDiQWvTL.js +28 -0
- package/dist/types-C4dzGOPp.js +511 -0
- package/dist/vite.d.ts +33 -0
- package/dist/vite.js +132 -0
- package/package.json +20 -3
- package/virtual.d.ts +27 -0
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { n as __exportAll } from "./rolldown-runtime-DZ8SGSJo.js";
|
|
2
|
+
import { t as markup } from "./markup-D2NSmoAx.js";
|
|
3
|
+
|
|
4
|
+
//#region ../../node_modules/.pnpm/refractor@5.0.0/node_modules/refractor/lang/markdown.js
|
|
5
|
+
/**
|
|
6
|
+
* @import {Refractor} from '../lib/core.js'
|
|
7
|
+
*/
|
|
8
|
+
var markdown_exports = /* @__PURE__ */ __exportAll({ default: () => markdown });
|
|
9
|
+
markdown.displayName = "markdown";
|
|
10
|
+
markdown.aliases = ["md"];
|
|
11
|
+
/** @param {Refractor} Prism */
|
|
12
|
+
function markdown(Prism) {
|
|
13
|
+
Prism.register(markup);
|
|
14
|
+
(function(Prism) {
|
|
15
|
+
var inner = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;
|
|
16
|
+
/**
|
|
17
|
+
* This function is intended for the creation of the bold or italic pattern.
|
|
18
|
+
*
|
|
19
|
+
* This also adds a lookbehind group to the given pattern to ensure that the pattern is not backslash-escaped.
|
|
20
|
+
*
|
|
21
|
+
* _Note:_ Keep in mind that this adds a capturing group.
|
|
22
|
+
*
|
|
23
|
+
* @param {string} pattern
|
|
24
|
+
* @returns {RegExp}
|
|
25
|
+
*/
|
|
26
|
+
function createInline(pattern) {
|
|
27
|
+
pattern = pattern.replace(/<inner>/g, function() {
|
|
28
|
+
return inner;
|
|
29
|
+
});
|
|
30
|
+
return RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" + pattern + ")");
|
|
31
|
+
}
|
|
32
|
+
var tableCell = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source;
|
|
33
|
+
var tableRow = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g, function() {
|
|
34
|
+
return tableCell;
|
|
35
|
+
});
|
|
36
|
+
var tableLine = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;
|
|
37
|
+
Prism.languages.markdown = Prism.languages.extend("markup", {});
|
|
38
|
+
Prism.languages.insertBefore("markdown", "prolog", {
|
|
39
|
+
"front-matter-block": {
|
|
40
|
+
pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,
|
|
41
|
+
lookbehind: true,
|
|
42
|
+
greedy: true,
|
|
43
|
+
inside: {
|
|
44
|
+
punctuation: /^---|---$/,
|
|
45
|
+
"front-matter": {
|
|
46
|
+
pattern: /\S+(?:\s+\S+)*/,
|
|
47
|
+
alias: ["yaml", "language-yaml"],
|
|
48
|
+
inside: Prism.languages.yaml
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
blockquote: {
|
|
53
|
+
pattern: /^>(?:[\t ]*>)*/m,
|
|
54
|
+
alias: "punctuation"
|
|
55
|
+
},
|
|
56
|
+
table: {
|
|
57
|
+
pattern: RegExp("^" + tableRow + tableLine + "(?:" + tableRow + ")*", "m"),
|
|
58
|
+
inside: {
|
|
59
|
+
"table-data-rows": {
|
|
60
|
+
pattern: RegExp("^(" + tableRow + tableLine + ")(?:" + tableRow + ")*$"),
|
|
61
|
+
lookbehind: true,
|
|
62
|
+
inside: {
|
|
63
|
+
"table-data": {
|
|
64
|
+
pattern: RegExp(tableCell),
|
|
65
|
+
inside: Prism.languages.markdown
|
|
66
|
+
},
|
|
67
|
+
punctuation: /\|/
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"table-line": {
|
|
71
|
+
pattern: RegExp("^(" + tableRow + ")" + tableLine + "$"),
|
|
72
|
+
lookbehind: true,
|
|
73
|
+
inside: { punctuation: /\||:?-{3,}:?/ }
|
|
74
|
+
},
|
|
75
|
+
"table-header-row": {
|
|
76
|
+
pattern: RegExp("^" + tableRow + "$"),
|
|
77
|
+
inside: {
|
|
78
|
+
"table-header": {
|
|
79
|
+
pattern: RegExp(tableCell),
|
|
80
|
+
alias: "important",
|
|
81
|
+
inside: Prism.languages.markdown
|
|
82
|
+
},
|
|
83
|
+
punctuation: /\|/
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
code: [{
|
|
89
|
+
pattern: /((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,
|
|
90
|
+
lookbehind: true,
|
|
91
|
+
alias: "keyword"
|
|
92
|
+
}, {
|
|
93
|
+
pattern: /^```[\s\S]*?^```$/m,
|
|
94
|
+
greedy: true,
|
|
95
|
+
inside: {
|
|
96
|
+
"code-block": {
|
|
97
|
+
pattern: /^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,
|
|
98
|
+
lookbehind: true
|
|
99
|
+
},
|
|
100
|
+
"code-language": {
|
|
101
|
+
pattern: /^(```).+/,
|
|
102
|
+
lookbehind: true
|
|
103
|
+
},
|
|
104
|
+
punctuation: /```/
|
|
105
|
+
}
|
|
106
|
+
}],
|
|
107
|
+
title: [{
|
|
108
|
+
pattern: /\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,
|
|
109
|
+
alias: "important",
|
|
110
|
+
inside: { punctuation: /==+$|--+$/ }
|
|
111
|
+
}, {
|
|
112
|
+
pattern: /(^\s*)#.+/m,
|
|
113
|
+
lookbehind: true,
|
|
114
|
+
alias: "important",
|
|
115
|
+
inside: { punctuation: /^#+|#+$/ }
|
|
116
|
+
}],
|
|
117
|
+
hr: {
|
|
118
|
+
pattern: /(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,
|
|
119
|
+
lookbehind: true,
|
|
120
|
+
alias: "punctuation"
|
|
121
|
+
},
|
|
122
|
+
list: {
|
|
123
|
+
pattern: /(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,
|
|
124
|
+
lookbehind: true,
|
|
125
|
+
alias: "punctuation"
|
|
126
|
+
},
|
|
127
|
+
"url-reference": {
|
|
128
|
+
pattern: /!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,
|
|
129
|
+
inside: {
|
|
130
|
+
variable: {
|
|
131
|
+
pattern: /^(!?\[)[^\]]+/,
|
|
132
|
+
lookbehind: true
|
|
133
|
+
},
|
|
134
|
+
string: /(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,
|
|
135
|
+
punctuation: /^[\[\]!:]|[<>]/
|
|
136
|
+
},
|
|
137
|
+
alias: "url"
|
|
138
|
+
},
|
|
139
|
+
bold: {
|
|
140
|
+
pattern: createInline(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),
|
|
141
|
+
lookbehind: true,
|
|
142
|
+
greedy: true,
|
|
143
|
+
inside: {
|
|
144
|
+
content: {
|
|
145
|
+
pattern: /(^..)[\s\S]+(?=..$)/,
|
|
146
|
+
lookbehind: true,
|
|
147
|
+
inside: {}
|
|
148
|
+
},
|
|
149
|
+
punctuation: /\*\*|__/
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
italic: {
|
|
153
|
+
pattern: createInline(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),
|
|
154
|
+
lookbehind: true,
|
|
155
|
+
greedy: true,
|
|
156
|
+
inside: {
|
|
157
|
+
content: {
|
|
158
|
+
pattern: /(^.)[\s\S]+(?=.$)/,
|
|
159
|
+
lookbehind: true,
|
|
160
|
+
inside: {}
|
|
161
|
+
},
|
|
162
|
+
punctuation: /[*_]/
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
strike: {
|
|
166
|
+
pattern: createInline(/(~~?)(?:(?!~)<inner>)+\2/.source),
|
|
167
|
+
lookbehind: true,
|
|
168
|
+
greedy: true,
|
|
169
|
+
inside: {
|
|
170
|
+
content: {
|
|
171
|
+
pattern: /(^~~?)[\s\S]+(?=\1$)/,
|
|
172
|
+
lookbehind: true,
|
|
173
|
+
inside: {}
|
|
174
|
+
},
|
|
175
|
+
punctuation: /~~?/
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"code-snippet": {
|
|
179
|
+
pattern: /(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,
|
|
180
|
+
lookbehind: true,
|
|
181
|
+
greedy: true,
|
|
182
|
+
alias: ["code", "keyword"]
|
|
183
|
+
},
|
|
184
|
+
url: {
|
|
185
|
+
pattern: createInline(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),
|
|
186
|
+
lookbehind: true,
|
|
187
|
+
greedy: true,
|
|
188
|
+
inside: {
|
|
189
|
+
operator: /^!/,
|
|
190
|
+
content: {
|
|
191
|
+
pattern: /(^\[)[^\]]+(?=\])/,
|
|
192
|
+
lookbehind: true,
|
|
193
|
+
inside: {}
|
|
194
|
+
},
|
|
195
|
+
variable: {
|
|
196
|
+
pattern: /(^\][ \t]?\[)[^\]]+(?=\]$)/,
|
|
197
|
+
lookbehind: true
|
|
198
|
+
},
|
|
199
|
+
url: {
|
|
200
|
+
pattern: /(^\]\()[^\s)]+/,
|
|
201
|
+
lookbehind: true
|
|
202
|
+
},
|
|
203
|
+
string: {
|
|
204
|
+
pattern: /(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,
|
|
205
|
+
lookbehind: true
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
[
|
|
211
|
+
"url",
|
|
212
|
+
"bold",
|
|
213
|
+
"italic",
|
|
214
|
+
"strike"
|
|
215
|
+
].forEach(function(token) {
|
|
216
|
+
[
|
|
217
|
+
"url",
|
|
218
|
+
"bold",
|
|
219
|
+
"italic",
|
|
220
|
+
"strike",
|
|
221
|
+
"code-snippet"
|
|
222
|
+
].forEach(function(inside) {
|
|
223
|
+
if (token !== inside) Prism.languages.markdown[token].inside.content.inside[inside] = Prism.languages.markdown[inside];
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
Prism.hooks.add("after-tokenize", function(env) {
|
|
227
|
+
if (env.language !== "markdown" && env.language !== "md") return;
|
|
228
|
+
function walkTokens(tokens) {
|
|
229
|
+
if (!tokens || typeof tokens === "string") return;
|
|
230
|
+
for (var i = 0, l = tokens.length; i < l; i++) {
|
|
231
|
+
var token = tokens[i];
|
|
232
|
+
if (token.type !== "code") {
|
|
233
|
+
walkTokens(token.content);
|
|
234
|
+
continue;
|
|
235
|
+
}
|
|
236
|
+
var codeLang = token.content[1];
|
|
237
|
+
var codeBlock = token.content[3];
|
|
238
|
+
if (codeLang && codeBlock && codeLang.type === "code-language" && codeBlock.type === "code-block" && typeof codeLang.content === "string") {
|
|
239
|
+
var lang = codeLang.content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp");
|
|
240
|
+
lang = (/[a-z][\w-]*/i.exec(lang) || [""])[0].toLowerCase();
|
|
241
|
+
var alias = "language-" + lang;
|
|
242
|
+
if (!codeBlock.alias) codeBlock.alias = [alias];
|
|
243
|
+
else if (typeof codeBlock.alias === "string") codeBlock.alias = [codeBlock.alias, alias];
|
|
244
|
+
else codeBlock.alias.push(alias);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
walkTokens(env.tokens);
|
|
249
|
+
});
|
|
250
|
+
Prism.hooks.add("wrap", function(env) {
|
|
251
|
+
if (env.type !== "code-block") return;
|
|
252
|
+
var codeLang = "";
|
|
253
|
+
for (var i = 0, l = env.classes.length; i < l; i++) {
|
|
254
|
+
var cls = env.classes[i];
|
|
255
|
+
var match = /language-(.+)/.exec(cls);
|
|
256
|
+
if (match) {
|
|
257
|
+
codeLang = match[1];
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
var grammar = Prism.languages[codeLang];
|
|
262
|
+
if (!grammar) {
|
|
263
|
+
if (codeLang && codeLang !== "none" && Prism.plugins.autoloader) {
|
|
264
|
+
var id = "md-" + (/* @__PURE__ */ new Date()).valueOf() + "-" + Math.floor(Math.random() * 0x2386f26fc10000);
|
|
265
|
+
env.attributes["id"] = id;
|
|
266
|
+
Prism.plugins.autoloader.loadLanguages(codeLang, function() {
|
|
267
|
+
var ele = document.getElementById(id);
|
|
268
|
+
if (ele) ele.innerHTML = Prism.highlight(ele.textContent, Prism.languages[codeLang], codeLang);
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
} else env.content = Prism.highlight(env.content.value, grammar, codeLang);
|
|
272
|
+
});
|
|
273
|
+
RegExp(Prism.languages.markup.tag.pattern.source, "gi");
|
|
274
|
+
String.fromCodePoint || String.fromCharCode;
|
|
275
|
+
Prism.languages.md = Prism.languages.markdown;
|
|
276
|
+
})(Prism);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
//#endregion
|
|
280
|
+
export { markdown_exports as n, markdown as t };
|