@das-fed/upf-ui 6.4.0-dev.216 → 6.4.0-dev.218
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/package.json +5 -5
- package/packages/business-components/ai-panel/{index-BgyMyjJo.js → index-BybM3Q9u.js} +700 -711
- package/packages/business-components/ai-panel/index-BybM3Q9u.js.gz +0 -0
- package/packages/business-components/ai-panel/index-CgWRv2Ge.js +142 -0
- package/packages/business-components/ai-panel/index-CgWRv2Ge.js.gz +0 -0
- package/packages/business-components/ai-panel/{index-Bw7rNZmA.js → index-CwdJKHy0.js} +9 -9
- package/packages/business-components/ai-panel/index-CwdJKHy0.js.gz +0 -0
- package/packages/business-components/ai-panel/index.js +1 -1
- package/packages/business-components/device-panel/index.js +8773 -8873
- package/packages/business-components/device-panel/index.js.gz +0 -0
- package/packages/business-components/echarts/index.js +2049 -2056
- package/packages/business-components/echarts/index.js.gz +0 -0
- package/packages/business-components/process-configuration/index.js +50 -50
- package/packages/business-components/process-configuration/index.js.gz +0 -0
- package/packages/business-components/process-form/index.js +149 -149
- package/packages/business-components/process-form/index.js.gz +0 -0
- package/packages/business-components/process-search-form/index.js +60 -60
- package/packages/business-components/process-search-form/index.js.gz +0 -0
- package/packages/business-components/process-table/index.js +128 -130
- package/packages/business-components/process-table/index.js.gz +0 -0
- package/packages/business-components/urgent-panel/index.js +896 -904
- package/packages/business-components/urgent-panel/index.js.gz +0 -0
- package/packages/business-components/user-org-dialog/index.js +246 -249
- package/packages/business-components/user-org-dialog/index.js.gz +0 -0
- package/packages/business-components/video-dialog/index.js +0 -1
- package/packages/business-components/video-dialog/index.js.gz +0 -0
- package/packages/components/autocomplete/index.js +6 -12
- package/packages/components/autocomplete/index.js.gz +0 -0
- package/packages/components/calendar/index.js +104 -104
- package/packages/components/calendar/index.js.gz +0 -0
- package/packages/components/cascader/index.js +27 -27
- package/packages/components/cascader/index.js.gz +0 -0
- package/packages/components/checkbox/index.js +54 -54
- package/packages/components/checkbox/index.js.gz +0 -0
- package/packages/components/date-picker/index.js +459 -459
- package/packages/components/date-picker/index.js.gz +0 -0
- package/packages/components/dimple-layout/index.js +61 -63
- package/packages/components/dimple-layout/index.js.gz +0 -0
- package/packages/components/dropdown/index.js +22 -23
- package/packages/components/dropdown/index.js.gz +0 -0
- package/packages/components/edit-table/index.js +223 -224
- package/packages/components/edit-table/index.js.gz +0 -0
- package/packages/components/error-overlay-model/index.js +42 -44
- package/packages/components/error-overlay-model/index.js.gz +0 -0
- package/packages/components/form-item/index.js +63 -67
- package/packages/components/form-item/index.js.gz +0 -0
- package/packages/components/image-viewer/index.js +32 -32
- package/packages/components/image-viewer/index.js.gz +0 -0
- package/packages/components/input/index.d.ts +4264 -0
- package/packages/components/input/index.js +51 -51
- package/packages/components/input/index.js.gz +0 -0
- package/packages/components/input/src/index.vue.d.ts +1432 -0
- package/packages/components/input-number/index.js +44 -44
- package/packages/components/input-number/index.js.gz +0 -0
- package/packages/components/live-player/index.js +832 -834
- package/packages/components/live-player/index.js.gz +0 -0
- package/packages/components/map/index.js +431 -437
- package/packages/components/map/index.js.gz +0 -0
- package/packages/components/menu-aside/index.js +1 -1
- package/packages/components/menu-aside/index.js.gz +0 -0
- package/packages/components/message/index.js +6 -6
- package/packages/components/message/index.js.gz +0 -0
- package/packages/components/radio-tabs/index.js +33 -33
- package/packages/components/radio-tabs/index.js.gz +0 -0
- package/packages/components/rich-editor/index.js +4556 -4586
- package/packages/components/rich-editor/index.js.gz +0 -0
- package/packages/components/scrollbar/index.js +135 -135
- package/packages/components/scrollbar/index.js.gz +0 -0
- package/packages/components/search/index.js +2 -2
- package/packages/components/search/index.js.gz +0 -0
- package/packages/components/select/index.js +92 -92
- package/packages/components/select/index.js.gz +0 -0
- package/packages/components/select-list/index.js +6 -10
- package/packages/components/select-list/index.js.gz +0 -0
- package/packages/components/special-range-picker-month/index.js +14 -16
- package/packages/components/special-range-picker-month/index.js.gz +0 -0
- package/packages/components/special-range-picker-year/index.js +51 -53
- package/packages/components/special-range-picker-year/index.js.gz +0 -0
- package/packages/components/spin/index.js +35 -35
- package/packages/components/spin/index.js.gz +0 -0
- package/packages/components/split-panel/index.js +101 -102
- package/packages/components/split-panel/index.js.gz +0 -0
- package/packages/components/table/index.js +599 -604
- package/packages/components/table/index.js.gz +0 -0
- package/packages/components/time-line/index.js +1 -1
- package/packages/components/time-line/index.js.gz +0 -0
- package/packages/components/tree/index.js +173 -182
- package/packages/components/tree/index.js.gz +0 -0
- package/packages/components/tree-select/index.js +81 -81
- package/packages/components/tree-select/index.js.gz +0 -0
- package/packages/components/tree-table/index.js +2 -2
- package/packages/components/tree-table/index.js.gz +0 -0
- package/packages/components/tree-v2/index.js +1208 -1240
- package/packages/components/tree-v2/index.js.gz +0 -0
- package/packages/components/virtual-tree/src/App.vue.d.ts +3974 -0
- package/packages/components/virtual-tree/src/type.d.ts +43 -0
- package/packages/business-components/ai-panel/index-B4pMosXu.js +0 -143
- package/packages/business-components/ai-panel/index-B4pMosXu.js.gz +0 -0
- package/packages/business-components/ai-panel/index-BgyMyjJo.js.gz +0 -0
- package/packages/business-components/ai-panel/index-Bw7rNZmA.js.gz +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineAsyncComponent as ot, ref as
|
|
1
|
+
import { defineAsyncComponent as ot, ref as T, watch as bu, h as it, reactive as ct, defineComponent as ou, onMounted as qu, openBlock as w, createElementBlock as q, createElementVNode as g, toDisplayString as V, computed as su, createVNode as j, unref as C, createCommentVNode as $, normalizeClass as Ju, createBlock as X, withCtx as J, Fragment as Nu, renderList as Qu, withDirectives as Au, withKeys as Jt, vModelText as Qt, withModifiers as Fe, vShow as Hu, onBeforeUnmount as at, resolveDirective as Wt, nextTick as Ae, Transition as Xt, normalizeStyle as Yt } from "vue";
|
|
2
2
|
import { withInstall as u0 } from "@das-fed/upf-utils/with-install/index";
|
|
3
3
|
import { useRoute as e0 } from "vue-router";
|
|
4
4
|
import { DasIconClose2 as t0 } from "@das-fed/upf-ui/packages/icons/close-2/index";
|
|
@@ -19,7 +19,7 @@ import { DasIconUnflod as pt } from "@das-fed/upf-ui/packages/icons/unflod/index
|
|
|
19
19
|
import { DasIconZhongxinshengcheng as a0 } from "@das-fed/upf-ui/packages/icons/zhongxinshengcheng/index";
|
|
20
20
|
import { DasIconFuzhineirong as s0 } from "@das-fed/upf-ui/packages/icons/fuzhineirong/index";
|
|
21
21
|
import { DasIconYuyin as l0 } from "@das-fed/upf-ui/packages/icons/yuyin/index";
|
|
22
|
-
import { DasMessage as
|
|
22
|
+
import { DasMessage as Re } from "@das-fed/upf-ui/packages/components/message/index";
|
|
23
23
|
import { DasIconFasong as d0 } from "@das-fed/upf-ui/packages/icons/fasong/index";
|
|
24
24
|
import { DasIconShendusikao as f0 } from "@das-fed/upf-ui/packages/icons/shendusikao/index";
|
|
25
25
|
import { DasIconHuidaodibu as h0 } from "@das-fed/upf-ui/packages/icons/huidaodibu/index";
|
|
@@ -29,7 +29,7 @@ import { DasIconSelect2 as b0 } from "@das-fed/upf-ui/packages/icons/select2/ind
|
|
|
29
29
|
import { DasPopover as m0 } from "@das-fed/upf-ui/packages/components/popover/index";
|
|
30
30
|
import { DasTree as x0 } from "@das-fed/upf-ui/packages/components/tree/index";
|
|
31
31
|
import { vDasLoading as bt } from "@das-fed/upf-ui/packages/components/loading/index";
|
|
32
|
-
import { createService as mt, iotMinio as xt, knowledgeBase as
|
|
32
|
+
import { createService as mt, iotMinio as xt, knowledgeBase as Pu } from "@das-fed/upf-utils/api-services";
|
|
33
33
|
import { DasIconLianjie as _0 } from "@das-fed/upf-ui/packages/icons/lianjie/index";
|
|
34
34
|
import { DasIconQingkong as g0 } from "@das-fed/upf-ui/packages/icons/qingkong/index";
|
|
35
35
|
import { DasIconDelete as k0 } from "@das-fed/upf-ui/packages/icons/delete/index";
|
|
@@ -44,8 +44,8 @@ let $u = (u = 21) => {
|
|
|
44
44
|
}
|
|
45
45
|
return e;
|
|
46
46
|
};
|
|
47
|
-
const v0 = ot(() => import("./index-
|
|
48
|
-
const u =
|
|
47
|
+
const v0 = ot(() => import("./index-CgWRv2Ge.js")), D0 = () => {
|
|
48
|
+
const u = T(), e = T(!1);
|
|
49
49
|
let t = !1;
|
|
50
50
|
const n = (c) => {
|
|
51
51
|
e.value && (t = c, e.value = !1);
|
|
@@ -106,7 +106,7 @@ const _t = () => sessionStorage.getItem("deepseekConfig") ? JSON.parse(sessionSt
|
|
|
106
106
|
x.searchType == "0" && (e.appDeepseek = x.deepseek), x.searchType == "1" && (e.knowDeepseek = x.deepseek), x.searchType == "2" && (e.networkDeepseek = x.deepseek), sessionStorage.setItem("deepseekConfig", JSON.stringify(e));
|
|
107
107
|
}, Vu = () => {
|
|
108
108
|
const u = _t();
|
|
109
|
-
x.searchType == "0" && (x.deepseek = u.appDeepseek), x.searchType == "1" && (x.deepseek = u.knowDeepseek), x.searchType == "2" && (x.deepseek = u.networkDeepseek)
|
|
109
|
+
x.searchType == "0" && (x.deepseek = u.appDeepseek), x.searchType == "1" && (x.deepseek = u.knowDeepseek), x.searchType == "2" && (x.deepseek = u.networkDeepseek);
|
|
110
110
|
};
|
|
111
111
|
var tu = function(u, e) {
|
|
112
112
|
if (!(this instanceof tu))
|
|
@@ -123,7 +123,7 @@ var tu = function(u, e) {
|
|
|
123
123
|
}, this.dispatchEvent = function(t) {
|
|
124
124
|
if (!t)
|
|
125
125
|
return !0;
|
|
126
|
-
this.debug
|
|
126
|
+
this.debug, t.source = this;
|
|
127
127
|
const n = "on" + t.type;
|
|
128
128
|
return this.hasOwnProperty(n) && (this[n].call(this, t), t.defaultPrevented) ? !1 : this.listeners[t.type] ? this.listeners[t.type].every(function(r) {
|
|
129
129
|
return r(t), !t.defaultPrevented;
|
|
@@ -156,7 +156,7 @@ var tu = function(u, e) {
|
|
|
156
156
|
}, this._parseEventChunk = function(t) {
|
|
157
157
|
if (!t || t.length === 0)
|
|
158
158
|
return null;
|
|
159
|
-
this.debug
|
|
159
|
+
this.debug;
|
|
160
160
|
const n = { id: null, retry: null, data: null, event: null };
|
|
161
161
|
t.split(/\n|\r\n|\r/).forEach((function(o) {
|
|
162
162
|
const c = o.indexOf(this.FIELD_SEPARATOR);
|
|
@@ -209,14 +209,14 @@ const F0 = { class: "das-ai-use-chat-content" }, w0 = {
|
|
|
209
209
|
},
|
|
210
210
|
emits: ["click"],
|
|
211
211
|
setup(u, { emit: e }) {
|
|
212
|
-
const t =
|
|
212
|
+
const t = T();
|
|
213
213
|
return qu(() => {
|
|
214
|
-
}), (n, r) => (
|
|
214
|
+
}), (n, r) => (w(), q("div", {
|
|
215
215
|
ref_key: "userChatRef",
|
|
216
216
|
ref: t,
|
|
217
217
|
class: "das-ai-use-chat"
|
|
218
218
|
}, [
|
|
219
|
-
|
|
219
|
+
g("div", F0, V(n.item.content), 1)
|
|
220
220
|
], 512));
|
|
221
221
|
}
|
|
222
222
|
}), iu = (u, e) => {
|
|
@@ -264,37 +264,37 @@ var kt = { exports: {} };
|
|
|
264
264
|
return !1;
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
|
-
var
|
|
268
|
-
var
|
|
269
|
-
return d("cut"),
|
|
270
|
-
},
|
|
271
|
-
function
|
|
272
|
-
var
|
|
273
|
-
|
|
267
|
+
var A = function(S) {
|
|
268
|
+
var F = h()(S);
|
|
269
|
+
return d("cut"), F;
|
|
270
|
+
}, y = A;
|
|
271
|
+
function v(L) {
|
|
272
|
+
var S = document.documentElement.getAttribute("dir") === "rtl", F = document.createElement("textarea");
|
|
273
|
+
F.style.fontSize = "12pt", F.style.border = "0", F.style.padding = "0", F.style.margin = "0", F.style.position = "absolute", F.style[S ? "right" : "left"] = "-9999px";
|
|
274
274
|
var O = window.pageYOffset || document.documentElement.scrollTop;
|
|
275
|
-
return
|
|
275
|
+
return F.style.top = "".concat(O, "px"), F.setAttribute("readonly", ""), F.value = L, F;
|
|
276
276
|
}
|
|
277
|
-
var
|
|
278
|
-
var O =
|
|
279
|
-
|
|
277
|
+
var k = function(S, F) {
|
|
278
|
+
var O = v(S);
|
|
279
|
+
F.container.appendChild(O);
|
|
280
280
|
var N = h()(O);
|
|
281
281
|
return d("copy"), O.remove(), N;
|
|
282
|
-
}, p = function(
|
|
283
|
-
var
|
|
282
|
+
}, p = function(S) {
|
|
283
|
+
var F = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
284
284
|
container: document.body
|
|
285
285
|
}, O = "";
|
|
286
|
-
return typeof
|
|
286
|
+
return typeof S == "string" ? O = k(S, F) : S instanceof HTMLInputElement && !["text", "search", "url", "tel", "password"].includes(S == null ? void 0 : S.type) ? O = k(S.value, F) : (O = h()(S), d("copy")), O;
|
|
287
287
|
}, b = p;
|
|
288
288
|
function m(L) {
|
|
289
289
|
"@babel/helpers - typeof";
|
|
290
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? m = function(
|
|
291
|
-
return typeof
|
|
292
|
-
} : m = function(
|
|
293
|
-
return
|
|
290
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? m = function(F) {
|
|
291
|
+
return typeof F;
|
|
292
|
+
} : m = function(F) {
|
|
293
|
+
return F && typeof Symbol == "function" && F.constructor === Symbol && F !== Symbol.prototype ? "symbol" : typeof F;
|
|
294
294
|
}, m(L);
|
|
295
295
|
}
|
|
296
|
-
var
|
|
297
|
-
var
|
|
296
|
+
var M = function() {
|
|
297
|
+
var S = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, F = S.action, O = F === void 0 ? "copy" : F, N = S.container, H = S.target, eu = S.text;
|
|
298
298
|
if (O !== "copy" && O !== "cut")
|
|
299
299
|
throw new Error('Invalid "action" value, use either "copy" or "cut"');
|
|
300
300
|
if (H !== void 0)
|
|
@@ -310,57 +310,57 @@ var kt = { exports: {} };
|
|
|
310
310
|
container: N
|
|
311
311
|
});
|
|
312
312
|
if (H)
|
|
313
|
-
return O === "cut" ?
|
|
313
|
+
return O === "cut" ? y(H) : b(H, {
|
|
314
314
|
container: N
|
|
315
315
|
});
|
|
316
|
-
}, E =
|
|
317
|
-
function
|
|
316
|
+
}, E = M;
|
|
317
|
+
function P(L) {
|
|
318
318
|
"@babel/helpers - typeof";
|
|
319
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
320
|
-
return typeof
|
|
321
|
-
} :
|
|
322
|
-
return
|
|
323
|
-
},
|
|
319
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? P = function(F) {
|
|
320
|
+
return typeof F;
|
|
321
|
+
} : P = function(F) {
|
|
322
|
+
return F && typeof Symbol == "function" && F.constructor === Symbol && F !== Symbol.prototype ? "symbol" : typeof F;
|
|
323
|
+
}, P(L);
|
|
324
324
|
}
|
|
325
|
-
function
|
|
326
|
-
if (!(L instanceof
|
|
325
|
+
function R(L, S) {
|
|
326
|
+
if (!(L instanceof S))
|
|
327
327
|
throw new TypeError("Cannot call a class as a function");
|
|
328
328
|
}
|
|
329
|
-
function K(L,
|
|
330
|
-
for (var
|
|
331
|
-
var O =
|
|
329
|
+
function K(L, S) {
|
|
330
|
+
for (var F = 0; F < S.length; F++) {
|
|
331
|
+
var O = S[F];
|
|
332
332
|
O.enumerable = O.enumerable || !1, O.configurable = !0, "value" in O && (O.writable = !0), Object.defineProperty(L, O.key, O);
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
|
-
function du(L,
|
|
336
|
-
return K(L.prototype,
|
|
335
|
+
function du(L, S, F) {
|
|
336
|
+
return K(L.prototype, S), K(L, F), L;
|
|
337
337
|
}
|
|
338
|
-
function _u(L,
|
|
339
|
-
if (typeof
|
|
338
|
+
function _u(L, S) {
|
|
339
|
+
if (typeof S != "function" && S !== null)
|
|
340
340
|
throw new TypeError("Super expression must either be null or a function");
|
|
341
|
-
L.prototype = Object.create(
|
|
341
|
+
L.prototype = Object.create(S && S.prototype, { constructor: { value: L, writable: !0, configurable: !0 } }), S && gu(L, S);
|
|
342
342
|
}
|
|
343
|
-
function gu(L,
|
|
343
|
+
function gu(L, S) {
|
|
344
344
|
return gu = Object.setPrototypeOf || function(O, N) {
|
|
345
345
|
return O.__proto__ = N, O;
|
|
346
|
-
}, gu(L,
|
|
346
|
+
}, gu(L, S);
|
|
347
347
|
}
|
|
348
|
-
function
|
|
349
|
-
var
|
|
348
|
+
function wu(L) {
|
|
349
|
+
var S = ue();
|
|
350
350
|
return function() {
|
|
351
|
-
var O =
|
|
352
|
-
if (
|
|
353
|
-
var H =
|
|
351
|
+
var O = zu(L), N;
|
|
352
|
+
if (S) {
|
|
353
|
+
var H = zu(this).constructor;
|
|
354
354
|
N = Reflect.construct(O, arguments, H);
|
|
355
355
|
} else
|
|
356
356
|
N = O.apply(this, arguments);
|
|
357
357
|
return fu(this, N);
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
|
-
function fu(L,
|
|
361
|
-
return
|
|
360
|
+
function fu(L, S) {
|
|
361
|
+
return S && (P(S) === "object" || typeof S == "function") ? S : Su(L);
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function Su(L) {
|
|
364
364
|
if (L === void 0)
|
|
365
365
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
366
366
|
return L;
|
|
@@ -375,28 +375,28 @@ var kt = { exports: {} };
|
|
|
375
375
|
return !1;
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
|
-
function
|
|
379
|
-
return
|
|
380
|
-
return
|
|
381
|
-
},
|
|
378
|
+
function zu(L) {
|
|
379
|
+
return zu = Object.setPrototypeOf ? Object.getPrototypeOf : function(F) {
|
|
380
|
+
return F.__proto__ || Object.getPrototypeOf(F);
|
|
381
|
+
}, zu(L);
|
|
382
382
|
}
|
|
383
|
-
function ju(L,
|
|
384
|
-
var
|
|
385
|
-
if (
|
|
386
|
-
return
|
|
383
|
+
function ju(L, S) {
|
|
384
|
+
var F = "data-clipboard-".concat(L);
|
|
385
|
+
if (S.hasAttribute(F))
|
|
386
|
+
return S.getAttribute(F);
|
|
387
387
|
}
|
|
388
|
-
var
|
|
389
|
-
_u(
|
|
390
|
-
var
|
|
391
|
-
function
|
|
388
|
+
var Iu = /* @__PURE__ */ function(L) {
|
|
389
|
+
_u(F, L);
|
|
390
|
+
var S = wu(F);
|
|
391
|
+
function F(O, N) {
|
|
392
392
|
var H;
|
|
393
|
-
return
|
|
393
|
+
return R(this, F), H = S.call(this), H.resolveOptions(N), H.listenClick(O), H;
|
|
394
394
|
}
|
|
395
|
-
return du(
|
|
395
|
+
return du(F, [{
|
|
396
396
|
key: "resolveOptions",
|
|
397
397
|
value: function() {
|
|
398
398
|
var N = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
399
|
-
this.action = typeof N.action == "function" ? N.action : this.defaultAction, this.target = typeof N.target == "function" ? N.target : this.defaultTarget, this.text = typeof N.text == "function" ? N.text : this.defaultText, this.container =
|
|
399
|
+
this.action = typeof N.action == "function" ? N.action : this.defaultAction, this.target = typeof N.target == "function" ? N.target : this.defaultTarget, this.text = typeof N.text == "function" ? N.text : this.defaultText, this.container = P(N.container) === "object" ? N.container : document.body;
|
|
400
400
|
}
|
|
401
401
|
/**
|
|
402
402
|
* Adds a click event listener to the passed trigger.
|
|
@@ -491,7 +491,7 @@ var kt = { exports: {} };
|
|
|
491
491
|
}, {
|
|
492
492
|
key: "cut",
|
|
493
493
|
value: function(N) {
|
|
494
|
-
return
|
|
494
|
+
return y(N);
|
|
495
495
|
}
|
|
496
496
|
/**
|
|
497
497
|
* Returns the support of the given action, or all actions if no action is
|
|
@@ -506,8 +506,8 @@ var kt = { exports: {} };
|
|
|
506
506
|
eu = eu && !!document.queryCommandSupported(Eu);
|
|
507
507
|
}), eu;
|
|
508
508
|
}
|
|
509
|
-
}]),
|
|
510
|
-
}(s()), fe =
|
|
509
|
+
}]), F;
|
|
510
|
+
}(s()), fe = Iu;
|
|
511
511
|
}
|
|
512
512
|
),
|
|
513
513
|
/***/
|
|
@@ -534,22 +534,22 @@ var kt = { exports: {} };
|
|
|
534
534
|
/***/
|
|
535
535
|
function(o, c, i) {
|
|
536
536
|
var a = i(828);
|
|
537
|
-
function s(_, h, d,
|
|
538
|
-
var
|
|
539
|
-
return _.addEventListener(d,
|
|
537
|
+
function s(_, h, d, A, y) {
|
|
538
|
+
var v = f.apply(this, arguments);
|
|
539
|
+
return _.addEventListener(d, v, y), {
|
|
540
540
|
destroy: function() {
|
|
541
|
-
_.removeEventListener(d,
|
|
541
|
+
_.removeEventListener(d, v, y);
|
|
542
542
|
}
|
|
543
543
|
};
|
|
544
544
|
}
|
|
545
|
-
function l(_, h, d,
|
|
546
|
-
return typeof _.addEventListener == "function" ? s.apply(null, arguments) : typeof d == "function" ? s.bind(null, document).apply(null, arguments) : (typeof _ == "string" && (_ = document.querySelectorAll(_)), Array.prototype.map.call(_, function(
|
|
547
|
-
return s(
|
|
545
|
+
function l(_, h, d, A, y) {
|
|
546
|
+
return typeof _.addEventListener == "function" ? s.apply(null, arguments) : typeof d == "function" ? s.bind(null, document).apply(null, arguments) : (typeof _ == "string" && (_ = document.querySelectorAll(_)), Array.prototype.map.call(_, function(v) {
|
|
547
|
+
return s(v, h, d, A, y);
|
|
548
548
|
}));
|
|
549
549
|
}
|
|
550
|
-
function f(_, h, d,
|
|
551
|
-
return function(
|
|
552
|
-
|
|
550
|
+
function f(_, h, d, A) {
|
|
551
|
+
return function(y) {
|
|
552
|
+
y.delegateTarget = a(y.target, h), y.delegateTarget && A.call(_, y);
|
|
553
553
|
};
|
|
554
554
|
}
|
|
555
555
|
o.exports = l;
|
|
@@ -577,41 +577,41 @@ var kt = { exports: {} };
|
|
|
577
577
|
/***/
|
|
578
578
|
function(o, c, i) {
|
|
579
579
|
var a = i(879), s = i(438);
|
|
580
|
-
function l(d,
|
|
581
|
-
if (!d && !
|
|
580
|
+
function l(d, A, y) {
|
|
581
|
+
if (!d && !A && !y)
|
|
582
582
|
throw new Error("Missing required arguments");
|
|
583
|
-
if (!a.string(
|
|
583
|
+
if (!a.string(A))
|
|
584
584
|
throw new TypeError("Second argument must be a String");
|
|
585
|
-
if (!a.fn(
|
|
585
|
+
if (!a.fn(y))
|
|
586
586
|
throw new TypeError("Third argument must be a Function");
|
|
587
587
|
if (a.node(d))
|
|
588
|
-
return f(d,
|
|
588
|
+
return f(d, A, y);
|
|
589
589
|
if (a.nodeList(d))
|
|
590
|
-
return _(d,
|
|
590
|
+
return _(d, A, y);
|
|
591
591
|
if (a.string(d))
|
|
592
|
-
return h(d,
|
|
592
|
+
return h(d, A, y);
|
|
593
593
|
throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");
|
|
594
594
|
}
|
|
595
|
-
function f(d,
|
|
596
|
-
return d.addEventListener(
|
|
595
|
+
function f(d, A, y) {
|
|
596
|
+
return d.addEventListener(A, y), {
|
|
597
597
|
destroy: function() {
|
|
598
|
-
d.removeEventListener(
|
|
598
|
+
d.removeEventListener(A, y);
|
|
599
599
|
}
|
|
600
600
|
};
|
|
601
601
|
}
|
|
602
|
-
function _(d,
|
|
603
|
-
return Array.prototype.forEach.call(d, function(
|
|
604
|
-
|
|
602
|
+
function _(d, A, y) {
|
|
603
|
+
return Array.prototype.forEach.call(d, function(v) {
|
|
604
|
+
v.addEventListener(A, y);
|
|
605
605
|
}), {
|
|
606
606
|
destroy: function() {
|
|
607
|
-
Array.prototype.forEach.call(d, function(
|
|
608
|
-
|
|
607
|
+
Array.prototype.forEach.call(d, function(v) {
|
|
608
|
+
v.removeEventListener(A, y);
|
|
609
609
|
});
|
|
610
610
|
}
|
|
611
611
|
};
|
|
612
612
|
}
|
|
613
|
-
function h(d,
|
|
614
|
-
return s(document.body, d,
|
|
613
|
+
function h(d, A, y) {
|
|
614
|
+
return s(document.body, d, A, y);
|
|
615
615
|
}
|
|
616
616
|
o.exports = l;
|
|
617
617
|
}
|
|
@@ -845,7 +845,7 @@ function ze(u) {
|
|
|
845
845
|
function oe() {
|
|
846
846
|
this.protocol = null, this.slashes = null, this.auth = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.pathname = null;
|
|
847
847
|
}
|
|
848
|
-
const q0 = /^([a-z0-9.+-]+:)/i,
|
|
848
|
+
const q0 = /^([a-z0-9.+-]+:)/i, P0 = /:[0-9]*$/, R0 = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, j0 = ["<", ">", '"', "`", " ", "\r", `
|
|
849
849
|
`, " "], H0 = ["{", "}", "|", "\\", "^", "`"].concat(j0), $0 = ["'"].concat(H0), $e = ["%", "/", "?", ";", "#"].concat($0), Ve = ["/", "?", "#"], V0 = 255, Ue = /^[+a-z0-9A-Z_-]{0,63}$/, U0 = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, Ze = {
|
|
850
850
|
javascript: !0,
|
|
851
851
|
"javascript:": !0
|
|
@@ -869,7 +869,7 @@ function Ie(u, e) {
|
|
|
869
869
|
oe.prototype.parse = function(u, e) {
|
|
870
870
|
let t, n, r, o = u;
|
|
871
871
|
if (o = o.trim(), !e && u.split("#").length === 1) {
|
|
872
|
-
const s =
|
|
872
|
+
const s = R0.exec(o);
|
|
873
873
|
if (s)
|
|
874
874
|
return this.pathname = s[1], s[2] && (this.search = s[2]), this;
|
|
875
875
|
}
|
|
@@ -888,14 +888,14 @@ oe.prototype.parse = function(u, e) {
|
|
|
888
888
|
const h = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
889
889
|
if (!h) {
|
|
890
890
|
const d = this.hostname.split(/\./);
|
|
891
|
-
for (let
|
|
892
|
-
const
|
|
893
|
-
if (
|
|
894
|
-
let
|
|
895
|
-
for (let p = 0, b =
|
|
896
|
-
|
|
897
|
-
if (!
|
|
898
|
-
const p = d.slice(0,
|
|
891
|
+
for (let A = 0, y = d.length; A < y; A++) {
|
|
892
|
+
const v = d[A];
|
|
893
|
+
if (v && !v.match(Ue)) {
|
|
894
|
+
let k = "";
|
|
895
|
+
for (let p = 0, b = v.length; p < b; p++)
|
|
896
|
+
v.charCodeAt(p) > 127 ? k += "x" : k += v[p];
|
|
897
|
+
if (!k.match(Ue)) {
|
|
898
|
+
const p = d.slice(0, A), b = d.slice(A + 1), m = v.match(U0);
|
|
899
899
|
m && (p.push(m[1]), b.unshift(m[2])), b.length && (o = b.join(".") + o), this.hostname = p.join(".");
|
|
900
900
|
break;
|
|
901
901
|
}
|
|
@@ -910,7 +910,7 @@ oe.prototype.parse = function(u, e) {
|
|
|
910
910
|
return a !== -1 && (this.search = o.substr(a), o = o.slice(0, a)), o && (this.pathname = o), Ge[t] && this.hostname && !this.pathname && (this.pathname = ""), this;
|
|
911
911
|
};
|
|
912
912
|
oe.prototype.parseHost = function(u) {
|
|
913
|
-
let e =
|
|
913
|
+
let e = P0.exec(u);
|
|
914
914
|
e && (e = e[0], e !== ":" && (this.port = e.substr(1)), u = u.substr(0, u.length - e.length)), u && (this.hostname = u);
|
|
915
915
|
};
|
|
916
916
|
const Z0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -976,42 +976,42 @@ function Y0(u) {
|
|
|
976
976
|
var e;
|
|
977
977
|
return u >= 55296 && u <= 57343 || u > 1114111 ? 65533 : (e = W0.get(u)) !== null && e !== void 0 ? e : u;
|
|
978
978
|
}
|
|
979
|
-
var
|
|
979
|
+
var W;
|
|
980
980
|
(function(u) {
|
|
981
981
|
u[u.NUM = 35] = "NUM", u[u.SEMI = 59] = "SEMI", u[u.EQUALS = 61] = "EQUALS", u[u.ZERO = 48] = "ZERO", u[u.NINE = 57] = "NINE", u[u.LOWER_A = 97] = "LOWER_A", u[u.LOWER_F = 102] = "LOWER_F", u[u.LOWER_X = 120] = "LOWER_X", u[u.LOWER_Z = 122] = "LOWER_Z", u[u.UPPER_A = 65] = "UPPER_A", u[u.UPPER_F = 70] = "UPPER_F", u[u.UPPER_Z = 90] = "UPPER_Z";
|
|
982
|
-
})(
|
|
982
|
+
})(W || (W = {}));
|
|
983
983
|
const un = 32;
|
|
984
984
|
var Cu;
|
|
985
985
|
(function(u) {
|
|
986
986
|
u[u.VALUE_LENGTH = 49152] = "VALUE_LENGTH", u[u.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", u[u.JUMP_TABLE = 127] = "JUMP_TABLE";
|
|
987
987
|
})(Cu || (Cu = {}));
|
|
988
988
|
function Ce(u) {
|
|
989
|
-
return u >=
|
|
989
|
+
return u >= W.ZERO && u <= W.NINE;
|
|
990
990
|
}
|
|
991
991
|
function en(u) {
|
|
992
|
-
return u >=
|
|
992
|
+
return u >= W.UPPER_A && u <= W.UPPER_F || u >= W.LOWER_A && u <= W.LOWER_F;
|
|
993
993
|
}
|
|
994
994
|
function tn(u) {
|
|
995
|
-
return u >=
|
|
995
|
+
return u >= W.UPPER_A && u <= W.UPPER_Z || u >= W.LOWER_A && u <= W.LOWER_Z || Ce(u);
|
|
996
996
|
}
|
|
997
997
|
function nn(u) {
|
|
998
|
-
return u ===
|
|
998
|
+
return u === W.EQUALS || tn(u);
|
|
999
999
|
}
|
|
1000
|
-
var
|
|
1000
|
+
var Q;
|
|
1001
1001
|
(function(u) {
|
|
1002
1002
|
u[u.EntityStart = 0] = "EntityStart", u[u.NumericStart = 1] = "NumericStart", u[u.NumericDecimal = 2] = "NumericDecimal", u[u.NumericHex = 3] = "NumericHex", u[u.NamedEntity = 4] = "NamedEntity";
|
|
1003
|
-
})(
|
|
1003
|
+
})(Q || (Q = {}));
|
|
1004
1004
|
var yu;
|
|
1005
1005
|
(function(u) {
|
|
1006
1006
|
u[u.Legacy = 0] = "Legacy", u[u.Strict = 1] = "Strict", u[u.Attribute = 2] = "Attribute";
|
|
1007
1007
|
})(yu || (yu = {}));
|
|
1008
1008
|
class rn {
|
|
1009
1009
|
constructor(e, t, n) {
|
|
1010
|
-
this.decodeTree = e, this.emitCodePoint = t, this.errors = n, this.state =
|
|
1010
|
+
this.decodeTree = e, this.emitCodePoint = t, this.errors = n, this.state = Q.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = yu.Strict;
|
|
1011
1011
|
}
|
|
1012
1012
|
/** Resets the instance to make it reusable. */
|
|
1013
1013
|
startEntity(e) {
|
|
1014
|
-
this.decodeMode = e, this.state =
|
|
1014
|
+
this.decodeMode = e, this.state = Q.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1;
|
|
1015
1015
|
}
|
|
1016
1016
|
/**
|
|
1017
1017
|
* Write an entity to the decoder. This can be called multiple times with partial entities.
|
|
@@ -1026,15 +1026,15 @@ class rn {
|
|
|
1026
1026
|
*/
|
|
1027
1027
|
write(e, t) {
|
|
1028
1028
|
switch (this.state) {
|
|
1029
|
-
case
|
|
1030
|
-
return e.charCodeAt(t) ===
|
|
1031
|
-
case
|
|
1029
|
+
case Q.EntityStart:
|
|
1030
|
+
return e.charCodeAt(t) === W.NUM ? (this.state = Q.NumericStart, this.consumed += 1, this.stateNumericStart(e, t + 1)) : (this.state = Q.NamedEntity, this.stateNamedEntity(e, t));
|
|
1031
|
+
case Q.NumericStart:
|
|
1032
1032
|
return this.stateNumericStart(e, t);
|
|
1033
|
-
case
|
|
1033
|
+
case Q.NumericDecimal:
|
|
1034
1034
|
return this.stateNumericDecimal(e, t);
|
|
1035
|
-
case
|
|
1035
|
+
case Q.NumericHex:
|
|
1036
1036
|
return this.stateNumericHex(e, t);
|
|
1037
|
-
case
|
|
1037
|
+
case Q.NamedEntity:
|
|
1038
1038
|
return this.stateNamedEntity(e, t);
|
|
1039
1039
|
}
|
|
1040
1040
|
}
|
|
@@ -1048,7 +1048,7 @@ class rn {
|
|
|
1048
1048
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
1049
1049
|
*/
|
|
1050
1050
|
stateNumericStart(e, t) {
|
|
1051
|
-
return t >= e.length ? -1 : (e.charCodeAt(t) | un) ===
|
|
1051
|
+
return t >= e.length ? -1 : (e.charCodeAt(t) | un) === W.LOWER_X ? (this.state = Q.NumericHex, this.consumed += 1, this.stateNumericHex(e, t + 1)) : (this.state = Q.NumericDecimal, this.stateNumericDecimal(e, t));
|
|
1052
1052
|
}
|
|
1053
1053
|
addToNumericResult(e, t, n, r) {
|
|
1054
1054
|
if (t !== n) {
|
|
@@ -1113,11 +1113,11 @@ class rn {
|
|
|
1113
1113
|
var n;
|
|
1114
1114
|
if (this.consumed <= t)
|
|
1115
1115
|
return (n = this.errors) === null || n === void 0 || n.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
1116
|
-
if (e ===
|
|
1116
|
+
if (e === W.SEMI)
|
|
1117
1117
|
this.consumed += 1;
|
|
1118
1118
|
else if (this.decodeMode === yu.Strict)
|
|
1119
1119
|
return 0;
|
|
1120
|
-
return this.emitCodePoint(Y0(this.result), this.consumed), this.errors && (e !==
|
|
1120
|
+
return this.emitCodePoint(Y0(this.result), this.consumed), this.errors && (e !== W.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
|
|
1121
1121
|
}
|
|
1122
1122
|
/**
|
|
1123
1123
|
* Parses a named entity.
|
|
@@ -1139,7 +1139,7 @@ class rn {
|
|
|
1139
1139
|
(o === 0 || // And there should be no invalid characters.
|
|
1140
1140
|
nn(c)) ? 0 : this.emitNotTerminatedNamedEntity();
|
|
1141
1141
|
if (r = n[this.treeIndex], o = (r & Cu.VALUE_LENGTH) >> 14, o !== 0) {
|
|
1142
|
-
if (c ===
|
|
1142
|
+
if (c === W.SEMI)
|
|
1143
1143
|
return this.emitNamedEntityData(this.treeIndex, o, this.consumed + this.excess);
|
|
1144
1144
|
this.decodeMode !== yu.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
|
|
1145
1145
|
}
|
|
@@ -1179,15 +1179,15 @@ class rn {
|
|
|
1179
1179
|
end() {
|
|
1180
1180
|
var e;
|
|
1181
1181
|
switch (this.state) {
|
|
1182
|
-
case
|
|
1182
|
+
case Q.NamedEntity:
|
|
1183
1183
|
return this.result !== 0 && (this.decodeMode !== yu.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
|
|
1184
|
-
case
|
|
1184
|
+
case Q.NumericDecimal:
|
|
1185
1185
|
return this.emitNumericEntity(0, 2);
|
|
1186
|
-
case
|
|
1186
|
+
case Q.NumericHex:
|
|
1187
1187
|
return this.emitNumericEntity(0, 3);
|
|
1188
|
-
case
|
|
1188
|
+
case Q.NumericStart:
|
|
1189
1189
|
return (e = this.errors) === null || e === void 0 || e.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
1190
|
-
case
|
|
1190
|
+
case Q.EntityStart:
|
|
1191
1191
|
return 0;
|
|
1192
1192
|
}
|
|
1193
1193
|
}
|
|
@@ -1307,7 +1307,7 @@ const kn = /[.?*+^$[\]\\(){}|-]/g;
|
|
|
1307
1307
|
function yn(u) {
|
|
1308
1308
|
return u.replace(kn, "\\$&");
|
|
1309
1309
|
}
|
|
1310
|
-
function
|
|
1310
|
+
function Z(u) {
|
|
1311
1311
|
switch (u) {
|
|
1312
1312
|
case 9:
|
|
1313
1313
|
case 32:
|
|
@@ -1389,7 +1389,7 @@ const An = { mdurl: Z0, ucmicro: K0 }, Cn = /* @__PURE__ */ Object.freeze(/* @__
|
|
|
1389
1389
|
has: ln,
|
|
1390
1390
|
isMdAsciiPunct: Gu,
|
|
1391
1391
|
isPunctChar: Zu,
|
|
1392
|
-
isSpace:
|
|
1392
|
+
isSpace: Z,
|
|
1393
1393
|
isString: Me,
|
|
1394
1394
|
isValidEntityCode: Oe,
|
|
1395
1395
|
isWhiteSpace: Uu,
|
|
@@ -1551,10 +1551,10 @@ mu.html_block = function(u, e) {
|
|
|
1551
1551
|
mu.html_inline = function(u, e) {
|
|
1552
1552
|
return u[e].content;
|
|
1553
1553
|
};
|
|
1554
|
-
function
|
|
1554
|
+
function Ru() {
|
|
1555
1555
|
this.rules = ae({}, mu);
|
|
1556
1556
|
}
|
|
1557
|
-
|
|
1557
|
+
Ru.prototype.renderAttrs = function(e) {
|
|
1558
1558
|
let t, n, r;
|
|
1559
1559
|
if (!e.attrs)
|
|
1560
1560
|
return "";
|
|
@@ -1562,7 +1562,7 @@ Pu.prototype.renderAttrs = function(e) {
|
|
|
1562
1562
|
r += " " + Du(e.attrs[t][0]) + '="' + Du(e.attrs[t][1]) + '"';
|
|
1563
1563
|
return r;
|
|
1564
1564
|
};
|
|
1565
|
-
|
|
1565
|
+
Ru.prototype.renderToken = function(e, t, n) {
|
|
1566
1566
|
const r = e[t];
|
|
1567
1567
|
let o = "";
|
|
1568
1568
|
if (r.hidden)
|
|
@@ -1577,7 +1577,7 @@ Pu.prototype.renderToken = function(e, t, n) {
|
|
|
1577
1577
|
return o += c ? `>
|
|
1578
1578
|
` : ">", o;
|
|
1579
1579
|
};
|
|
1580
|
-
|
|
1580
|
+
Ru.prototype.renderInline = function(u, e, t) {
|
|
1581
1581
|
let n = "";
|
|
1582
1582
|
const r = this.rules;
|
|
1583
1583
|
for (let o = 0, c = u.length; o < c; o++) {
|
|
@@ -1586,7 +1586,7 @@ Pu.prototype.renderInline = function(u, e, t) {
|
|
|
1586
1586
|
}
|
|
1587
1587
|
return n;
|
|
1588
1588
|
};
|
|
1589
|
-
|
|
1589
|
+
Ru.prototype.renderInlineAsText = function(u, e, t) {
|
|
1590
1590
|
let n = "";
|
|
1591
1591
|
for (let r = 0, o = u.length; r < o; r++)
|
|
1592
1592
|
switch (u[r].type) {
|
|
@@ -1608,7 +1608,7 @@ Pu.prototype.renderInlineAsText = function(u, e, t) {
|
|
|
1608
1608
|
}
|
|
1609
1609
|
return n;
|
|
1610
1610
|
};
|
|
1611
|
-
|
|
1611
|
+
Ru.prototype.render = function(u, e, t) {
|
|
1612
1612
|
let n = "";
|
|
1613
1613
|
const r = this.rules;
|
|
1614
1614
|
for (let o = 0, c = u.length; o < c; o++) {
|
|
@@ -1785,20 +1785,20 @@ function Nn(u) {
|
|
|
1785
1785
|
let f = i.level, _ = 0;
|
|
1786
1786
|
s.length > 0 && s[0].index === 0 && c > 0 && r[c - 1].type === "text_special" && (s = s.slice(1));
|
|
1787
1787
|
for (let h = 0; h < s.length; h++) {
|
|
1788
|
-
const d = s[h].url,
|
|
1789
|
-
if (!u.md.validateLink(
|
|
1788
|
+
const d = s[h].url, A = u.md.normalizeLink(d);
|
|
1789
|
+
if (!u.md.validateLink(A))
|
|
1790
1790
|
continue;
|
|
1791
|
-
let
|
|
1792
|
-
s[h].schema ? s[h].schema === "mailto:" && !/^mailto:/i.test(
|
|
1793
|
-
const
|
|
1794
|
-
if (
|
|
1791
|
+
let y = s[h].text;
|
|
1792
|
+
s[h].schema ? s[h].schema === "mailto:" && !/^mailto:/i.test(y) ? y = u.md.normalizeLinkText("mailto:" + y).replace(/^mailto:/, "") : y = u.md.normalizeLinkText(y) : y = u.md.normalizeLinkText("http://" + y).replace(/^http:\/\//, "");
|
|
1793
|
+
const v = s[h].index;
|
|
1794
|
+
if (v > _) {
|
|
1795
1795
|
const m = new u.Token("text", "", 0);
|
|
1796
|
-
m.content = a.slice(_,
|
|
1796
|
+
m.content = a.slice(_, v), m.level = f, l.push(m);
|
|
1797
1797
|
}
|
|
1798
|
-
const
|
|
1799
|
-
|
|
1798
|
+
const k = new u.Token("link_open", "a", 1);
|
|
1799
|
+
k.attrs = [["href", A]], k.level = f++, k.markup = "linkify", k.info = "auto", l.push(k);
|
|
1800
1800
|
const p = new u.Token("text", "", 0);
|
|
1801
|
-
p.content =
|
|
1801
|
+
p.content = y, p.level = f, l.push(p);
|
|
1802
1802
|
const b = new u.Token("link_close", "a", -1);
|
|
1803
1803
|
b.level = --f, b.markup = "linkify", b.info = "auto", l.push(b), _ = s[h].lastIndex;
|
|
1804
1804
|
}
|
|
@@ -1816,14 +1816,14 @@ const zt = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/, Ln = /\((c|tm|r)\)/i, Bn = /\((c|tm|r
|
|
|
1816
1816
|
r: "®",
|
|
1817
1817
|
tm: "™"
|
|
1818
1818
|
};
|
|
1819
|
-
function
|
|
1819
|
+
function Pn(u, e) {
|
|
1820
1820
|
return qn[e.toLowerCase()];
|
|
1821
1821
|
}
|
|
1822
|
-
function
|
|
1822
|
+
function Rn(u) {
|
|
1823
1823
|
let e = 0;
|
|
1824
1824
|
for (let t = u.length - 1; t >= 0; t--) {
|
|
1825
1825
|
const n = u[t];
|
|
1826
|
-
n.type === "text" && !e && (n.content = n.content.replace(Bn,
|
|
1826
|
+
n.type === "text" && !e && (n.content = n.content.replace(Bn, Pn)), n.type === "link_open" && n.info === "auto" && e--, n.type === "link_close" && n.info === "auto" && e++;
|
|
1827
1827
|
}
|
|
1828
1828
|
}
|
|
1829
1829
|
function jn(u) {
|
|
@@ -1837,7 +1837,7 @@ function Hn(u) {
|
|
|
1837
1837
|
let e;
|
|
1838
1838
|
if (u.md.options.typographer)
|
|
1839
1839
|
for (e = u.tokens.length - 1; e >= 0; e--)
|
|
1840
|
-
u.tokens[e].type === "inline" && (Ln.test(u.tokens[e].content) &&
|
|
1840
|
+
u.tokens[e].type === "inline" && (Ln.test(u.tokens[e].content) && Rn(u.tokens[e].children), zt.test(u.tokens[e].content) && jn(u.tokens[e].children));
|
|
1841
1841
|
}
|
|
1842
1842
|
const $n = /['"]/, Ke = /['"]/g, Je = "’";
|
|
1843
1843
|
function ee(u, e, t) {
|
|
@@ -1871,17 +1871,17 @@ function Vn(u, e) {
|
|
|
1871
1871
|
d = u[t].content.charCodeAt(u[t].content.length - 1);
|
|
1872
1872
|
break;
|
|
1873
1873
|
}
|
|
1874
|
-
let
|
|
1874
|
+
let A = 32;
|
|
1875
1875
|
if (a < s)
|
|
1876
|
-
|
|
1876
|
+
A = i.charCodeAt(a);
|
|
1877
1877
|
else
|
|
1878
1878
|
for (t = r + 1; t < u.length && !(u[t].type === "softbreak" || u[t].type === "hardbreak"); t++)
|
|
1879
1879
|
if (u[t].content) {
|
|
1880
|
-
|
|
1880
|
+
A = u[t].content.charCodeAt(0);
|
|
1881
1881
|
break;
|
|
1882
1882
|
}
|
|
1883
|
-
const
|
|
1884
|
-
if (p ? f = !1 :
|
|
1883
|
+
const y = Gu(d) || Zu(String.fromCharCode(d)), v = Gu(A) || Zu(String.fromCharCode(A)), k = Uu(d), p = Uu(A);
|
|
1884
|
+
if (p ? f = !1 : v && (k || y || (f = !1)), k ? _ = !1 : y && (p || v || (_ = !1)), A === 34 && l[0] === '"' && d >= 48 && d <= 57 && (_ = f = !1), f && _ && (f = y, _ = v), !f && !_) {
|
|
1885
1885
|
h && (o.content = ee(o.content, l.index, Je));
|
|
1886
1886
|
continue;
|
|
1887
1887
|
}
|
|
@@ -1892,12 +1892,12 @@ function Vn(u, e) {
|
|
|
1892
1892
|
break;
|
|
1893
1893
|
if (b.single === h && n[t].level === c) {
|
|
1894
1894
|
b = n[t];
|
|
1895
|
-
let m,
|
|
1896
|
-
h ? (m = e.md.options.quotes[2],
|
|
1895
|
+
let m, M;
|
|
1896
|
+
h ? (m = e.md.options.quotes[2], M = e.md.options.quotes[3]) : (m = e.md.options.quotes[0], M = e.md.options.quotes[1]), o.content = ee(o.content, l.index, M), u[b.token].content = ee(
|
|
1897
1897
|
u[b.token].content,
|
|
1898
1898
|
b.pos,
|
|
1899
1899
|
m
|
|
1900
|
-
), a +=
|
|
1900
|
+
), a += M.length - 1, b.token === r && (a += m.length - 1), i = o.content, s = i.length, n.length = t;
|
|
1901
1901
|
continue u;
|
|
1902
1902
|
}
|
|
1903
1903
|
}
|
|
@@ -1956,7 +1956,7 @@ function xu(u, e, t, n) {
|
|
|
1956
1956
|
for (let o = 0, c = 0, i = 0, a = 0, s = r.length, l = !1; c < s; c++) {
|
|
1957
1957
|
const f = r.charCodeAt(c);
|
|
1958
1958
|
if (!l)
|
|
1959
|
-
if (
|
|
1959
|
+
if (Z(f)) {
|
|
1960
1960
|
i++, f === 9 ? a += 4 - a % 4 : a++;
|
|
1961
1961
|
continue;
|
|
1962
1962
|
} else
|
|
@@ -1980,7 +1980,7 @@ xu.prototype.skipEmptyLines = function(e) {
|
|
|
1980
1980
|
xu.prototype.skipSpaces = function(e) {
|
|
1981
1981
|
for (let t = this.src.length; e < t; e++) {
|
|
1982
1982
|
const n = this.src.charCodeAt(e);
|
|
1983
|
-
if (!
|
|
1983
|
+
if (!Z(n))
|
|
1984
1984
|
break;
|
|
1985
1985
|
}
|
|
1986
1986
|
return e;
|
|
@@ -1989,7 +1989,7 @@ xu.prototype.skipSpacesBack = function(e, t) {
|
|
|
1989
1989
|
if (e <= t)
|
|
1990
1990
|
return e;
|
|
1991
1991
|
for (; e > t; )
|
|
1992
|
-
if (!
|
|
1992
|
+
if (!Z(this.src.charCodeAt(--e)))
|
|
1993
1993
|
return e + 1;
|
|
1994
1994
|
return e;
|
|
1995
1995
|
};
|
|
@@ -2016,7 +2016,7 @@ xu.prototype.getLines = function(e, t, n, r) {
|
|
|
2016
2016
|
let l = s, f;
|
|
2017
2017
|
for (i + 1 < t || r ? f = this.eMarks[i] + 1 : f = this.eMarks[i]; l < f && a < n; ) {
|
|
2018
2018
|
const _ = this.src.charCodeAt(l);
|
|
2019
|
-
if (
|
|
2019
|
+
if (Z(_))
|
|
2020
2020
|
_ === 9 ? a += 4 - (a + this.bsCount[i]) % 4 : a++;
|
|
2021
2021
|
else if (l - s < this.tShift[i])
|
|
2022
2022
|
a++;
|
|
@@ -2054,11 +2054,11 @@ function Kn(u, e, t, n) {
|
|
|
2054
2054
|
if (c !== 124 && c !== 45 && c !== 58 || o >= u.eMarks[r])
|
|
2055
2055
|
return !1;
|
|
2056
2056
|
const i = u.src.charCodeAt(o++);
|
|
2057
|
-
if (i !== 124 && i !== 45 && i !== 58 && !
|
|
2057
|
+
if (i !== 124 && i !== 45 && i !== 58 && !Z(i) || c === 45 && Z(i))
|
|
2058
2058
|
return !1;
|
|
2059
2059
|
for (; o < u.eMarks[r]; ) {
|
|
2060
2060
|
const b = u.src.charCodeAt(o);
|
|
2061
|
-
if (b !== 124 && b !== 45 && b !== 58 && !
|
|
2061
|
+
if (b !== 124 && b !== 45 && b !== 58 && !Z(b))
|
|
2062
2062
|
return !1;
|
|
2063
2063
|
o++;
|
|
2064
2064
|
}
|
|
@@ -2085,44 +2085,44 @@ function Kn(u, e, t, n) {
|
|
|
2085
2085
|
return !0;
|
|
2086
2086
|
const _ = u.parentType;
|
|
2087
2087
|
u.parentType = "table";
|
|
2088
|
-
const h = u.md.block.ruler.getRules("blockquote"), d = u.push("table_open", "table", 1),
|
|
2089
|
-
d.map =
|
|
2090
|
-
const
|
|
2091
|
-
A.map = [e, e + 1];
|
|
2092
|
-
const y = u.push("tr_open", "tr", 1);
|
|
2088
|
+
const h = u.md.block.ruler.getRules("blockquote"), d = u.push("table_open", "table", 1), A = [e, 0];
|
|
2089
|
+
d.map = A;
|
|
2090
|
+
const y = u.push("thead_open", "thead", 1);
|
|
2093
2091
|
y.map = [e, e + 1];
|
|
2092
|
+
const v = u.push("tr_open", "tr", 1);
|
|
2093
|
+
v.map = [e, e + 1];
|
|
2094
2094
|
for (let b = 0; b < s.length; b++) {
|
|
2095
2095
|
const m = u.push("th_open", "th", 1);
|
|
2096
2096
|
l[b] && (m.attrs = [["style", "text-align:" + l[b]]]);
|
|
2097
|
-
const
|
|
2098
|
-
|
|
2097
|
+
const M = u.push("inline", "", 0);
|
|
2098
|
+
M.content = s[b].trim(), M.children = [], u.push("th_close", "th", -1);
|
|
2099
2099
|
}
|
|
2100
2100
|
u.push("tr_close", "tr", -1), u.push("thead_close", "thead", -1);
|
|
2101
|
-
let
|
|
2101
|
+
let k, p = 0;
|
|
2102
2102
|
for (r = e + 2; r < t && !(u.sCount[r] < u.blkIndent); r++) {
|
|
2103
2103
|
let b = !1;
|
|
2104
|
-
for (let
|
|
2105
|
-
if (h[
|
|
2104
|
+
for (let M = 0, E = h.length; M < E; M++)
|
|
2105
|
+
if (h[M](u, r, t, !0)) {
|
|
2106
2106
|
b = !0;
|
|
2107
2107
|
break;
|
|
2108
2108
|
}
|
|
2109
2109
|
if (b || (a = xe(u, r).trim(), !a) || u.sCount[r] - u.blkIndent >= 4 || (s = Qe(a), s.length && s[0] === "" && s.shift(), s.length && s[s.length - 1] === "" && s.pop(), p += f - s.length, p > Gn))
|
|
2110
2110
|
break;
|
|
2111
2111
|
if (r === e + 2) {
|
|
2112
|
-
const
|
|
2113
|
-
|
|
2112
|
+
const M = u.push("tbody_open", "tbody", 1);
|
|
2113
|
+
M.map = k = [e + 2, 0];
|
|
2114
2114
|
}
|
|
2115
2115
|
const m = u.push("tr_open", "tr", 1);
|
|
2116
2116
|
m.map = [r, r + 1];
|
|
2117
|
-
for (let
|
|
2117
|
+
for (let M = 0; M < f; M++) {
|
|
2118
2118
|
const E = u.push("td_open", "td", 1);
|
|
2119
|
-
l[
|
|
2120
|
-
const
|
|
2121
|
-
|
|
2119
|
+
l[M] && (E.attrs = [["style", "text-align:" + l[M]]]);
|
|
2120
|
+
const P = u.push("inline", "", 0);
|
|
2121
|
+
P.content = s[M] ? s[M].trim() : "", P.children = [], u.push("td_close", "td", -1);
|
|
2122
2122
|
}
|
|
2123
2123
|
u.push("tr_close", "tr", -1);
|
|
2124
2124
|
}
|
|
2125
|
-
return
|
|
2125
|
+
return k && (u.push("tbody_close", "tbody", -1), k[1] = r), u.push("table_close", "table", -1), A[1] = r, u.parentType = _, u.line = r, !0;
|
|
2126
2126
|
}
|
|
2127
2127
|
function Jn(u, e, t) {
|
|
2128
2128
|
if (u.sCount[e] - u.blkIndent < 4)
|
|
@@ -2186,24 +2186,24 @@ function Wn(u, e, t, n) {
|
|
|
2186
2186
|
if (r = u.bMarks[d] + u.tShift[d], o = u.eMarks[d], r >= o)
|
|
2187
2187
|
break;
|
|
2188
2188
|
if (u.src.charCodeAt(r++) === 62 && !p) {
|
|
2189
|
-
let m = u.sCount[d] + 1,
|
|
2190
|
-
u.src.charCodeAt(r) === 32 ? (r++, m++, E = !1,
|
|
2191
|
-
let
|
|
2189
|
+
let m = u.sCount[d] + 1, M, E;
|
|
2190
|
+
u.src.charCodeAt(r) === 32 ? (r++, m++, E = !1, M = !0) : u.src.charCodeAt(r) === 9 ? (M = !0, (u.bsCount[d] + m) % 4 === 3 ? (r++, m++, E = !1) : E = !0) : M = !1;
|
|
2191
|
+
let P = m;
|
|
2192
2192
|
for (i.push(u.bMarks[d]), u.bMarks[d] = r; r < o; ) {
|
|
2193
|
-
const
|
|
2194
|
-
if (
|
|
2195
|
-
|
|
2193
|
+
const R = u.src.charCodeAt(r);
|
|
2194
|
+
if (Z(R))
|
|
2195
|
+
R === 9 ? P += 4 - (P + u.bsCount[d] + (E ? 1 : 0)) % 4 : P++;
|
|
2196
2196
|
else
|
|
2197
2197
|
break;
|
|
2198
2198
|
r++;
|
|
2199
2199
|
}
|
|
2200
|
-
h = r >= o, a.push(u.bsCount[d]), u.bsCount[d] = u.sCount[d] + 1 + (
|
|
2200
|
+
h = r >= o, a.push(u.bsCount[d]), u.bsCount[d] = u.sCount[d] + 1 + (M ? 1 : 0), s.push(u.sCount[d]), u.sCount[d] = P - m, l.push(u.tShift[d]), u.tShift[d] = r - u.bMarks[d];
|
|
2201
2201
|
continue;
|
|
2202
2202
|
}
|
|
2203
2203
|
if (h)
|
|
2204
2204
|
break;
|
|
2205
2205
|
let b = !1;
|
|
2206
|
-
for (let m = 0,
|
|
2206
|
+
for (let m = 0, M = f.length; m < M; m++)
|
|
2207
2207
|
if (f[m](u, d, t, !0)) {
|
|
2208
2208
|
b = !0;
|
|
2209
2209
|
break;
|
|
@@ -2214,17 +2214,17 @@ function Wn(u, e, t, n) {
|
|
|
2214
2214
|
}
|
|
2215
2215
|
i.push(u.bMarks[d]), a.push(u.bsCount[d]), l.push(u.tShift[d]), s.push(u.sCount[d]), u.sCount[d] = -1;
|
|
2216
2216
|
}
|
|
2217
|
-
const
|
|
2217
|
+
const A = u.blkIndent;
|
|
2218
2218
|
u.blkIndent = 0;
|
|
2219
|
-
const
|
|
2220
|
-
|
|
2221
|
-
const
|
|
2222
|
-
|
|
2223
|
-
const
|
|
2224
|
-
|
|
2219
|
+
const y = u.push("blockquote_open", "blockquote", 1);
|
|
2220
|
+
y.markup = ">";
|
|
2221
|
+
const v = [e, 0];
|
|
2222
|
+
y.map = v, u.md.block.tokenize(u, e, d);
|
|
2223
|
+
const k = u.push("blockquote_close", "blockquote", -1);
|
|
2224
|
+
k.markup = ">", u.lineMax = c, u.parentType = _, v[1] = u.line;
|
|
2225
2225
|
for (let p = 0; p < l.length; p++)
|
|
2226
2226
|
u.bMarks[p + e] = i[p], u.tShift[p + e] = l[p], u.sCount[p + e] = s[p], u.bsCount[p + e] = a[p];
|
|
2227
|
-
return u.blkIndent =
|
|
2227
|
+
return u.blkIndent = A, !0;
|
|
2228
2228
|
}
|
|
2229
2229
|
function Xn(u, e, t, n) {
|
|
2230
2230
|
const r = u.eMarks[e];
|
|
@@ -2237,7 +2237,7 @@ function Xn(u, e, t, n) {
|
|
|
2237
2237
|
let i = 1;
|
|
2238
2238
|
for (; o < r; ) {
|
|
2239
2239
|
const s = u.src.charCodeAt(o++);
|
|
2240
|
-
if (s !== c && !
|
|
2240
|
+
if (s !== c && !Z(s))
|
|
2241
2241
|
return !1;
|
|
2242
2242
|
s === c && i++;
|
|
2243
2243
|
}
|
|
@@ -2257,7 +2257,7 @@ function We(u, e) {
|
|
|
2257
2257
|
return -1;
|
|
2258
2258
|
if (n < t) {
|
|
2259
2259
|
const o = u.src.charCodeAt(n);
|
|
2260
|
-
if (!
|
|
2260
|
+
if (!Z(o))
|
|
2261
2261
|
return -1;
|
|
2262
2262
|
}
|
|
2263
2263
|
return n;
|
|
@@ -2282,7 +2282,7 @@ function Xe(u, e) {
|
|
|
2282
2282
|
break;
|
|
2283
2283
|
return -1;
|
|
2284
2284
|
}
|
|
2285
|
-
return r < n && (o = u.src.charCodeAt(r), !
|
|
2285
|
+
return r < n && (o = u.src.charCodeAt(r), !Z(o)) ? -1 : r;
|
|
2286
2286
|
}
|
|
2287
2287
|
function Yn(u, e) {
|
|
2288
2288
|
const t = u.level + 2;
|
|
@@ -2306,12 +2306,12 @@ function ur(u, e, t, n) {
|
|
|
2306
2306
|
return !1;
|
|
2307
2307
|
if (n)
|
|
2308
2308
|
return !0;
|
|
2309
|
-
const d = u.src.charCodeAt(h - 1),
|
|
2309
|
+
const d = u.src.charCodeAt(h - 1), A = u.tokens.length;
|
|
2310
2310
|
f ? (i = u.push("ordered_list_open", "ol", 1), _ !== 1 && (i.attrs = [["start", _]])) : i = u.push("bullet_list_open", "ul", 1);
|
|
2311
|
-
const
|
|
2312
|
-
i.map =
|
|
2313
|
-
let
|
|
2314
|
-
const
|
|
2311
|
+
const y = [a, 0];
|
|
2312
|
+
i.map = y, i.markup = String.fromCharCode(d);
|
|
2313
|
+
let v = !1;
|
|
2314
|
+
const k = u.md.block.ruler.getRules("list"), p = u.parentType;
|
|
2315
2315
|
for (u.parentType = "list"; a < t; ) {
|
|
2316
2316
|
o = h, r = u.eMarks[a];
|
|
2317
2317
|
const b = u.sCount[a] + h - (u.bMarks[a] + u.tShift[a]);
|
|
@@ -2326,23 +2326,23 @@ function ur(u, e, t, n) {
|
|
|
2326
2326
|
break;
|
|
2327
2327
|
o++;
|
|
2328
2328
|
}
|
|
2329
|
-
const
|
|
2329
|
+
const M = o;
|
|
2330
2330
|
let E;
|
|
2331
|
-
|
|
2332
|
-
const
|
|
2331
|
+
M >= r ? E = 1 : E = m - b, E > 4 && (E = 1);
|
|
2332
|
+
const P = b + E;
|
|
2333
2333
|
i = u.push("list_item_open", "li", 1), i.markup = String.fromCharCode(d);
|
|
2334
|
-
const
|
|
2335
|
-
i.map =
|
|
2334
|
+
const R = [a, 0];
|
|
2335
|
+
i.map = R, f && (i.info = u.src.slice(c, h - 1));
|
|
2336
2336
|
const K = u.tight, du = u.tShift[a], _u = u.sCount[a], gu = u.listIndent;
|
|
2337
|
-
if (u.listIndent = u.blkIndent, u.blkIndent =
|
|
2337
|
+
if (u.listIndent = u.blkIndent, u.blkIndent = P, u.tight = !0, u.tShift[a] = M - u.bMarks[a], u.sCount[a] = m, M >= r && u.isEmpty(a + 1) ? u.line = Math.min(u.line + 2, t) : u.md.block.tokenize(u, a, t, !0), (!u.tight || v) && (s = !1), v = u.line - a > 1 && u.isEmpty(u.line - 1), u.blkIndent = u.listIndent, u.listIndent = gu, u.tShift[a] = du, u.sCount[a] = _u, u.tight = K, i = u.push("list_item_close", "li", -1), i.markup = String.fromCharCode(d), a = u.line, R[1] = a, a >= t || u.sCount[a] < u.blkIndent || u.sCount[a] - u.blkIndent >= 4)
|
|
2338
2338
|
break;
|
|
2339
|
-
let
|
|
2340
|
-
for (let fu = 0,
|
|
2341
|
-
if (
|
|
2342
|
-
|
|
2339
|
+
let wu = !1;
|
|
2340
|
+
for (let fu = 0, Su = k.length; fu < Su; fu++)
|
|
2341
|
+
if (k[fu](u, a, t, !0)) {
|
|
2342
|
+
wu = !0;
|
|
2343
2343
|
break;
|
|
2344
2344
|
}
|
|
2345
|
-
if (
|
|
2345
|
+
if (wu)
|
|
2346
2346
|
break;
|
|
2347
2347
|
if (f) {
|
|
2348
2348
|
if (h = Xe(u, a), h < 0)
|
|
@@ -2353,46 +2353,46 @@ function ur(u, e, t, n) {
|
|
|
2353
2353
|
if (d !== u.src.charCodeAt(h - 1))
|
|
2354
2354
|
break;
|
|
2355
2355
|
}
|
|
2356
|
-
return f ? i = u.push("ordered_list_close", "ol", -1) : i = u.push("bullet_list_close", "ul", -1), i.markup = String.fromCharCode(d),
|
|
2356
|
+
return f ? i = u.push("ordered_list_close", "ol", -1) : i = u.push("bullet_list_close", "ul", -1), i.markup = String.fromCharCode(d), y[1] = a, u.line = a, u.parentType = p, s && Yn(u, A), !0;
|
|
2357
2357
|
}
|
|
2358
2358
|
function er(u, e, t, n) {
|
|
2359
2359
|
let r = u.bMarks[e] + u.tShift[e], o = u.eMarks[e], c = e + 1;
|
|
2360
2360
|
if (u.sCount[e] - u.blkIndent >= 4 || u.src.charCodeAt(r) !== 91)
|
|
2361
2361
|
return !1;
|
|
2362
|
-
function i(
|
|
2362
|
+
function i(k) {
|
|
2363
2363
|
const p = u.lineMax;
|
|
2364
|
-
if (
|
|
2364
|
+
if (k >= p || u.isEmpty(k))
|
|
2365
2365
|
return null;
|
|
2366
2366
|
let b = !1;
|
|
2367
|
-
if (u.sCount[
|
|
2368
|
-
const E = u.md.block.ruler.getRules("reference"),
|
|
2367
|
+
if (u.sCount[k] - u.blkIndent > 3 && (b = !0), u.sCount[k] < 0 && (b = !0), !b) {
|
|
2368
|
+
const E = u.md.block.ruler.getRules("reference"), P = u.parentType;
|
|
2369
2369
|
u.parentType = "reference";
|
|
2370
|
-
let
|
|
2370
|
+
let R = !1;
|
|
2371
2371
|
for (let K = 0, du = E.length; K < du; K++)
|
|
2372
|
-
if (E[K](u,
|
|
2373
|
-
|
|
2372
|
+
if (E[K](u, k, p, !0)) {
|
|
2373
|
+
R = !0;
|
|
2374
2374
|
break;
|
|
2375
2375
|
}
|
|
2376
|
-
if (u.parentType =
|
|
2376
|
+
if (u.parentType = P, R)
|
|
2377
2377
|
return null;
|
|
2378
2378
|
}
|
|
2379
|
-
const m = u.bMarks[
|
|
2380
|
-
return u.src.slice(m,
|
|
2379
|
+
const m = u.bMarks[k] + u.tShift[k], M = u.eMarks[k];
|
|
2380
|
+
return u.src.slice(m, M + 1);
|
|
2381
2381
|
}
|
|
2382
2382
|
let a = u.src.slice(r, o + 1);
|
|
2383
2383
|
o = a.length;
|
|
2384
2384
|
let s = -1;
|
|
2385
2385
|
for (r = 1; r < o; r++) {
|
|
2386
|
-
const
|
|
2387
|
-
if (
|
|
2386
|
+
const k = a.charCodeAt(r);
|
|
2387
|
+
if (k === 91)
|
|
2388
2388
|
return !1;
|
|
2389
|
-
if (
|
|
2389
|
+
if (k === 93) {
|
|
2390
2390
|
s = r;
|
|
2391
2391
|
break;
|
|
2392
|
-
} else if (
|
|
2392
|
+
} else if (k === 10) {
|
|
2393
2393
|
const p = i(c);
|
|
2394
2394
|
p !== null && (a += p, o = a.length, c++);
|
|
2395
|
-
} else if (
|
|
2395
|
+
} else if (k === 92 && (r++, r < o && a.charCodeAt(r) === 10)) {
|
|
2396
2396
|
const p = i(c);
|
|
2397
2397
|
p !== null && (a += p, o = a.length, c++);
|
|
2398
2398
|
}
|
|
@@ -2400,11 +2400,11 @@ function er(u, e, t, n) {
|
|
|
2400
2400
|
if (s < 0 || a.charCodeAt(s + 1) !== 58)
|
|
2401
2401
|
return !1;
|
|
2402
2402
|
for (r = s + 2; r < o; r++) {
|
|
2403
|
-
const
|
|
2404
|
-
if (
|
|
2403
|
+
const k = a.charCodeAt(r);
|
|
2404
|
+
if (k === 10) {
|
|
2405
2405
|
const p = i(c);
|
|
2406
2406
|
p !== null && (a += p, o = a.length, c++);
|
|
2407
|
-
} else if (!
|
|
2407
|
+
} else if (!Z(k)) break;
|
|
2408
2408
|
}
|
|
2409
2409
|
const l = u.md.helpers.parseLinkDestination(a, r, o);
|
|
2410
2410
|
if (!l.ok)
|
|
@@ -2415,36 +2415,36 @@ function er(u, e, t, n) {
|
|
|
2415
2415
|
r = l.pos;
|
|
2416
2416
|
const _ = r, h = c, d = r;
|
|
2417
2417
|
for (; r < o; r++) {
|
|
2418
|
-
const
|
|
2419
|
-
if (
|
|
2418
|
+
const k = a.charCodeAt(r);
|
|
2419
|
+
if (k === 10) {
|
|
2420
2420
|
const p = i(c);
|
|
2421
2421
|
p !== null && (a += p, o = a.length, c++);
|
|
2422
|
-
} else if (!
|
|
2422
|
+
} else if (!Z(k)) break;
|
|
2423
2423
|
}
|
|
2424
|
-
let
|
|
2425
|
-
for (;
|
|
2426
|
-
const
|
|
2427
|
-
if (
|
|
2428
|
-
a +=
|
|
2424
|
+
let A = u.md.helpers.parseLinkTitle(a, r, o);
|
|
2425
|
+
for (; A.can_continue; ) {
|
|
2426
|
+
const k = i(c);
|
|
2427
|
+
if (k === null) break;
|
|
2428
|
+
a += k, r = o, o = a.length, c++, A = u.md.helpers.parseLinkTitle(a, r, o, A);
|
|
2429
2429
|
}
|
|
2430
|
-
let
|
|
2431
|
-
for (r < o && d !== r &&
|
|
2432
|
-
const
|
|
2433
|
-
if (!
|
|
2430
|
+
let y;
|
|
2431
|
+
for (r < o && d !== r && A.ok ? (y = A.str, r = A.pos) : (y = "", r = _, c = h); r < o; ) {
|
|
2432
|
+
const k = a.charCodeAt(r);
|
|
2433
|
+
if (!Z(k))
|
|
2434
2434
|
break;
|
|
2435
2435
|
r++;
|
|
2436
2436
|
}
|
|
2437
|
-
if (r < o && a.charCodeAt(r) !== 10 &&
|
|
2438
|
-
for (
|
|
2439
|
-
const
|
|
2440
|
-
if (!
|
|
2437
|
+
if (r < o && a.charCodeAt(r) !== 10 && y)
|
|
2438
|
+
for (y = "", r = _, c = h; r < o; ) {
|
|
2439
|
+
const k = a.charCodeAt(r);
|
|
2440
|
+
if (!Z(k))
|
|
2441
2441
|
break;
|
|
2442
2442
|
r++;
|
|
2443
2443
|
}
|
|
2444
2444
|
if (r < o && a.charCodeAt(r) !== 10)
|
|
2445
2445
|
return !1;
|
|
2446
|
-
const
|
|
2447
|
-
return
|
|
2446
|
+
const v = se(a.slice(1, s));
|
|
2447
|
+
return v ? (n || (typeof u.env.references > "u" && (u.env.references = {}), typeof u.env.references[v] > "u" && (u.env.references[v] = { title: y, href: f }), u.line = c), !0) : !1;
|
|
2448
2448
|
}
|
|
2449
2449
|
const tr = [
|
|
2450
2450
|
"address",
|
|
@@ -2551,13 +2551,13 @@ function mr(u, e, t, n) {
|
|
|
2551
2551
|
let i = 1;
|
|
2552
2552
|
for (c = u.src.charCodeAt(++r); c === 35 && r < o && i <= 6; )
|
|
2553
2553
|
i++, c = u.src.charCodeAt(++r);
|
|
2554
|
-
if (i > 6 || r < o && !
|
|
2554
|
+
if (i > 6 || r < o && !Z(c))
|
|
2555
2555
|
return !1;
|
|
2556
2556
|
if (n)
|
|
2557
2557
|
return !0;
|
|
2558
2558
|
o = u.skipSpacesBack(o, r);
|
|
2559
2559
|
const a = u.skipCharsBack(o, 35, r);
|
|
2560
|
-
a > r &&
|
|
2560
|
+
a > r && Z(u.src.charCodeAt(a - 1)) && (o = a), u.line = e + 1;
|
|
2561
2561
|
const s = u.push("heading_open", "h" + String(i), 1);
|
|
2562
2562
|
s.markup = "########".slice(0, i), s.map = [e, u.line];
|
|
2563
2563
|
const l = u.push("inline", "", 0);
|
|
@@ -2772,7 +2772,7 @@ function Cr(u, e) {
|
|
|
2772
2772
|
u.pending = u.pending.slice(0, -1), u.push("softbreak", "br", 0);
|
|
2773
2773
|
else
|
|
2774
2774
|
u.push("softbreak", "br", 0);
|
|
2775
|
-
for (t++; t < r &&
|
|
2775
|
+
for (t++; t < r && Z(u.src.charCodeAt(t)); )
|
|
2776
2776
|
t++;
|
|
2777
2777
|
return u.pos = t, !0;
|
|
2778
2778
|
}
|
|
@@ -2788,7 +2788,7 @@ function vr(u, e) {
|
|
|
2788
2788
|
if (u.src.charCodeAt(t) !== 92 || (t++, t >= n)) return !1;
|
|
2789
2789
|
let r = u.src.charCodeAt(t);
|
|
2790
2790
|
if (r === 10) {
|
|
2791
|
-
for (e || u.push("hardbreak", "br", 0), t++; t < n && (r = u.src.charCodeAt(t), !!
|
|
2791
|
+
for (e || u.push("hardbreak", "br", 0), t++; t < n && (r = u.src.charCodeAt(t), !!Z(r)); )
|
|
2792
2792
|
t++;
|
|
2793
2793
|
return u.pos = t, !0;
|
|
2794
2794
|
}
|
|
@@ -2946,15 +2946,15 @@ function zr(u, e) {
|
|
|
2946
2946
|
return !1;
|
|
2947
2947
|
let d = h + 1;
|
|
2948
2948
|
if (d < f && u.src.charCodeAt(d) === 40) {
|
|
2949
|
-
for (s = !1, d++; d < f && (t = u.src.charCodeAt(d), !(!
|
|
2949
|
+
for (s = !1, d++; d < f && (t = u.src.charCodeAt(d), !(!Z(t) && t !== 10)); d++)
|
|
2950
2950
|
;
|
|
2951
2951
|
if (d >= f)
|
|
2952
2952
|
return !1;
|
|
2953
2953
|
if (a = d, r = u.md.helpers.parseLinkDestination(u.src, d, u.posMax), r.ok) {
|
|
2954
|
-
for (c = u.md.normalizeLink(r.str), u.md.validateLink(c) ? d = r.pos : c = "", a = d; d < f && (t = u.src.charCodeAt(d), !(!
|
|
2954
|
+
for (c = u.md.normalizeLink(r.str), u.md.validateLink(c) ? d = r.pos : c = "", a = d; d < f && (t = u.src.charCodeAt(d), !(!Z(t) && t !== 10)); d++)
|
|
2955
2955
|
;
|
|
2956
2956
|
if (r = u.md.helpers.parseLinkTitle(u.src, d, u.posMax), d < f && a !== d && r.ok)
|
|
2957
|
-
for (i = r.str, d = r.pos; d < f && (t = u.src.charCodeAt(d), !(!
|
|
2957
|
+
for (i = r.str, d = r.pos; d < f && (t = u.src.charCodeAt(d), !(!Z(t) && t !== 10)); d++)
|
|
2958
2958
|
;
|
|
2959
2959
|
}
|
|
2960
2960
|
(d >= f || u.src.charCodeAt(d) !== 41) && (s = !0), d++;
|
|
@@ -2968,8 +2968,8 @@ function zr(u, e) {
|
|
|
2968
2968
|
}
|
|
2969
2969
|
if (!e) {
|
|
2970
2970
|
u.pos = _, u.posMax = h;
|
|
2971
|
-
const
|
|
2972
|
-
|
|
2971
|
+
const A = u.push("link_open", "a", 1), y = [["href", c]];
|
|
2972
|
+
A.attrs = y, i && y.push(["title", i]), u.linkLevel++, u.md.inline.tokenize(u), u.linkLevel--, u.push("link_close", "a", -1);
|
|
2973
2973
|
}
|
|
2974
2974
|
return u.pos = d, u.posMax = f, !0;
|
|
2975
2975
|
}
|
|
@@ -2982,14 +2982,14 @@ function Ir(u, e) {
|
|
|
2982
2982
|
if (d < 0)
|
|
2983
2983
|
return !1;
|
|
2984
2984
|
if (o = d + 1, o < _ && u.src.charCodeAt(o) === 40) {
|
|
2985
|
-
for (o++; o < _ && (t = u.src.charCodeAt(o), !(!
|
|
2985
|
+
for (o++; o < _ && (t = u.src.charCodeAt(o), !(!Z(t) && t !== 10)); o++)
|
|
2986
2986
|
;
|
|
2987
2987
|
if (o >= _)
|
|
2988
2988
|
return !1;
|
|
2989
|
-
for (s = o, i = u.md.helpers.parseLinkDestination(u.src, o, u.posMax), i.ok && (l = u.md.normalizeLink(i.str), u.md.validateLink(l) ? o = i.pos : l = ""), s = o; o < _ && (t = u.src.charCodeAt(o), !(!
|
|
2989
|
+
for (s = o, i = u.md.helpers.parseLinkDestination(u.src, o, u.posMax), i.ok && (l = u.md.normalizeLink(i.str), u.md.validateLink(l) ? o = i.pos : l = ""), s = o; o < _ && (t = u.src.charCodeAt(o), !(!Z(t) && t !== 10)); o++)
|
|
2990
2990
|
;
|
|
2991
2991
|
if (i = u.md.helpers.parseLinkTitle(u.src, o, u.posMax), o < _ && s !== o && i.ok)
|
|
2992
|
-
for (a = i.str, o = i.pos; o < _ && (t = u.src.charCodeAt(o), !(!
|
|
2992
|
+
for (a = i.str, o = i.pos; o < _ && (t = u.src.charCodeAt(o), !(!Z(t) && t !== 10)); o++)
|
|
2993
2993
|
;
|
|
2994
2994
|
else
|
|
2995
2995
|
a = "";
|
|
@@ -3005,15 +3005,15 @@ function Ir(u, e) {
|
|
|
3005
3005
|
}
|
|
3006
3006
|
if (!e) {
|
|
3007
3007
|
n = u.src.slice(h, d);
|
|
3008
|
-
const
|
|
3008
|
+
const A = [];
|
|
3009
3009
|
u.md.inline.parse(
|
|
3010
3010
|
n,
|
|
3011
3011
|
u.md,
|
|
3012
3012
|
u.env,
|
|
3013
|
-
|
|
3013
|
+
A
|
|
3014
3014
|
);
|
|
3015
|
-
const
|
|
3016
|
-
|
|
3015
|
+
const y = u.push("image", "img", 0), v = [["src", l], ["alt", ""]];
|
|
3016
|
+
y.attrs = v, y.children = A, y.content = n, a && v.push(["title", a]);
|
|
3017
3017
|
}
|
|
3018
3018
|
return u.pos = o, u.posMax = _, !0;
|
|
3019
3019
|
}
|
|
@@ -3088,12 +3088,12 @@ function qr(u, e) {
|
|
|
3088
3088
|
}
|
|
3089
3089
|
return u.pos += o[0].length, !0;
|
|
3090
3090
|
}
|
|
3091
|
-
const
|
|
3091
|
+
const Pr = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i, Rr = /^&([a-z][a-z0-9]{1,31});/i;
|
|
3092
3092
|
function jr(u, e) {
|
|
3093
3093
|
const t = u.pos, n = u.posMax;
|
|
3094
3094
|
if (u.src.charCodeAt(t) !== 38 || t + 1 >= n) return !1;
|
|
3095
3095
|
if (u.src.charCodeAt(t + 1) === 35) {
|
|
3096
|
-
const o = u.src.slice(t).match(
|
|
3096
|
+
const o = u.src.slice(t).match(Pr);
|
|
3097
3097
|
if (o) {
|
|
3098
3098
|
if (!e) {
|
|
3099
3099
|
const c = o[1][0].toLowerCase() === "x" ? parseInt(o[1].slice(1), 16) : parseInt(o[1], 10), i = u.push("text_special", "", 0);
|
|
@@ -3102,7 +3102,7 @@ function jr(u, e) {
|
|
|
3102
3102
|
return u.pos += o[0].length, !0;
|
|
3103
3103
|
}
|
|
3104
3104
|
} else {
|
|
3105
|
-
const o = u.src.slice(t).match(
|
|
3105
|
+
const o = u.src.slice(t).match(Rr);
|
|
3106
3106
|
if (o) {
|
|
3107
3107
|
const c = Et(o[0]);
|
|
3108
3108
|
if (c !== o[0]) {
|
|
@@ -3441,14 +3441,14 @@ function ao(u, e) {
|
|
|
3441
3441
|
t[n] = e(u[n]);
|
|
3442
3442
|
return t;
|
|
3443
3443
|
}
|
|
3444
|
-
function
|
|
3444
|
+
function Pt(u, e) {
|
|
3445
3445
|
const t = u.split("@");
|
|
3446
3446
|
let n = "";
|
|
3447
3447
|
t.length > 1 && (n = t[0] + "@", u = t[1]), u = u.replace(io, ".");
|
|
3448
3448
|
const r = u.split("."), o = ao(r, e).join(".");
|
|
3449
3449
|
return n + o;
|
|
3450
3450
|
}
|
|
3451
|
-
function
|
|
3451
|
+
function Rt(u) {
|
|
3452
3452
|
const e = [];
|
|
3453
3453
|
let t = 0;
|
|
3454
3454
|
const n = u.length;
|
|
@@ -3495,7 +3495,7 @@ const so = (u) => String.fromCodePoint(...u), lo = function(u) {
|
|
|
3495
3495
|
return String.fromCodePoint(...e);
|
|
3496
3496
|
}, $t = function(u) {
|
|
3497
3497
|
const e = [];
|
|
3498
|
-
u =
|
|
3498
|
+
u = Rt(u);
|
|
3499
3499
|
const t = u.length;
|
|
3500
3500
|
let n = Bt, r = 0, o = Lt;
|
|
3501
3501
|
for (const a of u)
|
|
@@ -3515,10 +3515,10 @@ const so = (u) => String.fromCodePoint(...u), lo = function(u) {
|
|
|
3515
3515
|
const h = _ <= o ? Be : _ >= o + Ku ? Ku : _ - o;
|
|
3516
3516
|
if (f < h)
|
|
3517
3517
|
break;
|
|
3518
|
-
const d = f - h,
|
|
3518
|
+
const d = f - h, A = hu - h;
|
|
3519
3519
|
e.push(
|
|
3520
|
-
ye(rt(h + d %
|
|
3521
|
-
), f = pu(d /
|
|
3520
|
+
ye(rt(h + d % A, 0))
|
|
3521
|
+
), f = pu(d / A);
|
|
3522
3522
|
}
|
|
3523
3523
|
e.push(ye(rt(f, 0))), o = jt(r, s, i === c), r = 0, ++i;
|
|
3524
3524
|
}
|
|
@@ -3526,11 +3526,11 @@ const so = (u) => String.fromCodePoint(...u), lo = function(u) {
|
|
|
3526
3526
|
}
|
|
3527
3527
|
return e.join("");
|
|
3528
3528
|
}, fo = function(u) {
|
|
3529
|
-
return
|
|
3529
|
+
return Pt(u, function(e) {
|
|
3530
3530
|
return ro.test(e) ? Ht(e.slice(4).toLowerCase()) : e;
|
|
3531
3531
|
});
|
|
3532
3532
|
}, ho = function(u) {
|
|
3533
|
-
return
|
|
3533
|
+
return Pt(u, function(e) {
|
|
3534
3534
|
return oo.test(e) ? "xn--" + $t(e) : e;
|
|
3535
3535
|
});
|
|
3536
3536
|
}, Vt = {
|
|
@@ -3548,7 +3548,7 @@ const so = (u) => String.fromCodePoint(...u), lo = function(u) {
|
|
|
3548
3548
|
* @type Object
|
|
3549
3549
|
*/
|
|
3550
3550
|
ucs2: {
|
|
3551
|
-
decode:
|
|
3551
|
+
decode: Rt,
|
|
3552
3552
|
encode: so
|
|
3553
3553
|
},
|
|
3554
3554
|
decode: Ht,
|
|
@@ -3751,7 +3751,7 @@ function Ao(u) {
|
|
|
3751
3751
|
function ru(u, e) {
|
|
3752
3752
|
if (!(this instanceof ru))
|
|
3753
3753
|
return new ru(u, e);
|
|
3754
|
-
e || Me(u) || (e = u || {}, u = "default"), this.inline = new Yu(), this.block = new le(), this.core = new Ne(), this.renderer = new
|
|
3754
|
+
e || Me(u) || (e = u || {}, u = "default"), this.inline = new Yu(), this.block = new le(), this.core = new Ne(), this.renderer = new Ru(), this.linkify = new nu(), this.validateLink = ko, this.normalizeLink = yo, this.normalizeLinkText = Ao, this.utils = Cn, this.helpers = ae({}, Fn), this.options = {}, this.configure(u), e && this.set(e);
|
|
3755
3755
|
}
|
|
3756
3756
|
ru.prototype.set = function(u) {
|
|
3757
3757
|
return ae(this.options, u), this;
|
|
@@ -3830,7 +3830,7 @@ const Co = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
3830
3830
|
class: "das-ai-chat-loading"
|
|
3831
3831
|
}, qo = {
|
|
3832
3832
|
name: "aiChat"
|
|
3833
|
-
},
|
|
3833
|
+
}, Po = /* @__PURE__ */ ou({
|
|
3834
3834
|
...qo,
|
|
3835
3835
|
props: {
|
|
3836
3836
|
item: { default: {} },
|
|
@@ -3838,7 +3838,7 @@ const Co = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
3838
3838
|
},
|
|
3839
3839
|
emits: ["aiChatEmit"],
|
|
3840
3840
|
setup(u, { emit: e }) {
|
|
3841
|
-
const t = u, n =
|
|
3841
|
+
const t = u, n = T(""), r = T(""), o = e, c = new ru(), i = T(), a = su(() => t.item.content), s = su(() => t.item.think), { toClipboard: l } = N0();
|
|
3842
3842
|
bu(
|
|
3843
3843
|
() => a.value,
|
|
3844
3844
|
(p, b) => {
|
|
@@ -3860,21 +3860,21 @@ const Co = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
3860
3860
|
},
|
|
3861
3861
|
{ immediate: !0 }
|
|
3862
3862
|
);
|
|
3863
|
-
const f =
|
|
3863
|
+
const f = T(!0), _ = su(() => t.item.file && t.item.file.length ? I("引用$0篇资料作为参考", t.item.file.length) : ""), h = su(() => t.item.loading && !n.value ? I("思考中…") : t.item.thinkTime ? I("已深度思考(用时$0秒)", t.item.thinkTime) : I("已深度思考")), d = su(() => !n.value && !r.value), A = () => {
|
|
3864
3864
|
var p, b, m;
|
|
3865
3865
|
return ((p = t.item) == null ? void 0 : p.audioStatus) == "normal" ? I("语音朗读") : ((b = t.item) == null ? void 0 : b.audioStatus) == "generated" || ((m = t.item) == null ? void 0 : m.audioStatus) == "loading" ? I("停止朗读") : I("语音朗读");
|
|
3866
|
-
},
|
|
3866
|
+
}, y = () => {
|
|
3867
3867
|
var p;
|
|
3868
3868
|
try {
|
|
3869
3869
|
if (!n.value) return;
|
|
3870
3870
|
const b = (p = i.value.textContent) == null ? void 0 : p.replace(/^\s*[\r\n]/gm, "");
|
|
3871
|
-
|
|
3871
|
+
l(b), Re.success(I("复制成功"));
|
|
3872
3872
|
} catch {
|
|
3873
|
-
|
|
3873
|
+
Re.error(I("复制失败"));
|
|
3874
3874
|
}
|
|
3875
|
-
},
|
|
3875
|
+
}, v = (p) => {
|
|
3876
3876
|
if (p == "copy") {
|
|
3877
|
-
|
|
3877
|
+
y();
|
|
3878
3878
|
return;
|
|
3879
3879
|
}
|
|
3880
3880
|
if (p == "saveKnowledgebase") {
|
|
@@ -3892,74 +3892,74 @@ const Co = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
3892
3892
|
return;
|
|
3893
3893
|
}
|
|
3894
3894
|
o("aiChatEmit", p, t.item);
|
|
3895
|
-
},
|
|
3896
|
-
|
|
3895
|
+
}, k = () => {
|
|
3896
|
+
o("aiChatEmit", "reference", t.item);
|
|
3897
3897
|
};
|
|
3898
|
-
return (p, b) => (
|
|
3899
|
-
|
|
3900
|
-
_.value ? (
|
|
3898
|
+
return (p, b) => (w(), q("div", vo, [
|
|
3899
|
+
g("div", Do, [
|
|
3900
|
+
_.value ? (w(), q("div", {
|
|
3901
3901
|
key: 0,
|
|
3902
|
-
onClick:
|
|
3902
|
+
onClick: k,
|
|
3903
3903
|
class: "das-ai-reference-content-line"
|
|
3904
3904
|
}, [
|
|
3905
|
-
|
|
3906
|
-
j(
|
|
3905
|
+
g("span", Eo, V(_.value), 1),
|
|
3906
|
+
j(C(ft), {
|
|
3907
3907
|
size: "medium",
|
|
3908
3908
|
iconColor: "#999999"
|
|
3909
3909
|
})
|
|
3910
3910
|
])) : $("", !0)
|
|
3911
3911
|
]),
|
|
3912
|
-
|
|
3913
|
-
!p.item.loading && d.value && !p.item.file.length ? (
|
|
3914
|
-
r.value ? (
|
|
3912
|
+
g("div", Fo, [
|
|
3913
|
+
!p.item.loading && d.value && !p.item.file.length ? (w(), q("div", wo, V(C(I)("已暂停生成")), 1)) : $("", !0),
|
|
3914
|
+
r.value ? (w(), q("div", {
|
|
3915
3915
|
key: 1,
|
|
3916
3916
|
class: Ju(["das-ai-think-markdown-box", { "hide-think": !f.value }])
|
|
3917
3917
|
}, [
|
|
3918
|
-
|
|
3918
|
+
g("div", {
|
|
3919
3919
|
onClick: b[0] || (b[0] = (m) => f.value = !f.value),
|
|
3920
3920
|
class: "think-line"
|
|
3921
3921
|
}, [
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
f.value ? $("", !0) : (
|
|
3922
|
+
g("div", So, V(h.value), 1),
|
|
3923
|
+
g("div", zo, [
|
|
3924
|
+
f.value ? $("", !0) : (w(), X(C(ht), {
|
|
3925
3925
|
key: 0,
|
|
3926
3926
|
size: "medium",
|
|
3927
3927
|
iconColor: "#999999"
|
|
3928
3928
|
})),
|
|
3929
|
-
f.value ? (
|
|
3929
|
+
f.value ? (w(), X(C(pt), {
|
|
3930
3930
|
key: 1,
|
|
3931
3931
|
size: "medium",
|
|
3932
3932
|
iconColor: "#999999"
|
|
3933
3933
|
})) : $("", !0)
|
|
3934
3934
|
])
|
|
3935
3935
|
]),
|
|
3936
|
-
|
|
3936
|
+
g("div", {
|
|
3937
3937
|
class: "das-ai-think-markdown",
|
|
3938
3938
|
innerHTML: r.value
|
|
3939
3939
|
}, null, 8, Io)
|
|
3940
3940
|
], 2)) : $("", !0),
|
|
3941
|
-
n.value ? (
|
|
3941
|
+
n.value ? (w(), q("div", {
|
|
3942
3942
|
key: 2,
|
|
3943
3943
|
ref_key: "chatMarkdownRef",
|
|
3944
3944
|
ref: i,
|
|
3945
3945
|
class: "das-ai-chat-markdown",
|
|
3946
3946
|
innerHTML: n.value
|
|
3947
3947
|
}, null, 8, To)) : $("", !0),
|
|
3948
|
-
p.isNew && !p.item.loading ? (
|
|
3949
|
-
p.isNew ? (
|
|
3948
|
+
p.isNew && !p.item.loading ? (w(), q("div", Mo, [
|
|
3949
|
+
p.isNew ? (w(), X(C(vu), {
|
|
3950
3950
|
key: 0,
|
|
3951
3951
|
placement: "top",
|
|
3952
3952
|
type: "button"
|
|
3953
3953
|
}, {
|
|
3954
3954
|
content: J(() => [
|
|
3955
|
-
|
|
3955
|
+
g("div", null, V(C(I)("重新生成")), 1)
|
|
3956
3956
|
]),
|
|
3957
3957
|
default: J(() => [
|
|
3958
|
-
|
|
3959
|
-
onClick: b[1] || (b[1] = (m) =>
|
|
3958
|
+
g("div", {
|
|
3959
|
+
onClick: b[1] || (b[1] = (m) => v("regenerate")),
|
|
3960
3960
|
class: "chat-opt-box"
|
|
3961
3961
|
}, [
|
|
3962
|
-
j(
|
|
3962
|
+
j(C(a0), {
|
|
3963
3963
|
size: "medium",
|
|
3964
3964
|
iconColor: "#666666"
|
|
3965
3965
|
})
|
|
@@ -3967,19 +3967,19 @@ const Co = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
3967
3967
|
]),
|
|
3968
3968
|
_: 1
|
|
3969
3969
|
})) : $("", !0),
|
|
3970
|
-
j(
|
|
3970
|
+
j(C(vu), {
|
|
3971
3971
|
placement: "top",
|
|
3972
3972
|
type: "button"
|
|
3973
3973
|
}, {
|
|
3974
3974
|
content: J(() => [
|
|
3975
|
-
|
|
3975
|
+
g("div", null, V(C(I)("复制")), 1)
|
|
3976
3976
|
]),
|
|
3977
3977
|
default: J(() => [
|
|
3978
|
-
|
|
3979
|
-
onClick: b[2] || (b[2] = (m) =>
|
|
3978
|
+
g("div", {
|
|
3979
|
+
onClick: b[2] || (b[2] = (m) => v("copy")),
|
|
3980
3980
|
class: "chat-opt-box"
|
|
3981
3981
|
}, [
|
|
3982
|
-
j(
|
|
3982
|
+
j(C(s0), {
|
|
3983
3983
|
size: "medium",
|
|
3984
3984
|
iconColor: "#666666"
|
|
3985
3985
|
})
|
|
@@ -3987,46 +3987,46 @@ const Co = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
3987
3987
|
]),
|
|
3988
3988
|
_: 1
|
|
3989
3989
|
}),
|
|
3990
|
-
j(
|
|
3990
|
+
j(C(vu), {
|
|
3991
3991
|
placement: "top",
|
|
3992
3992
|
type: "button"
|
|
3993
3993
|
}, {
|
|
3994
3994
|
content: J(() => [
|
|
3995
|
-
|
|
3995
|
+
g("div", null, V(A()), 1)
|
|
3996
3996
|
]),
|
|
3997
3997
|
default: J(() => [
|
|
3998
|
-
|
|
3999
|
-
onClick: b[3] || (b[3] = (m) =>
|
|
3998
|
+
g("div", {
|
|
3999
|
+
onClick: b[3] || (b[3] = (m) => v("play")),
|
|
4000
4000
|
class: "chat-opt-box"
|
|
4001
4001
|
}, [
|
|
4002
|
-
p.item.audioStatus == "normal" ? (
|
|
4002
|
+
p.item.audioStatus == "normal" ? (w(), X(C(l0), {
|
|
4003
4003
|
key: 0,
|
|
4004
4004
|
size: "medium",
|
|
4005
4005
|
iconColor: "#666666"
|
|
4006
4006
|
})) : $("", !0),
|
|
4007
|
-
p.item.audioStatus == "generated" ? (
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4007
|
+
p.item.audioStatus == "generated" ? (w(), q("div", Oo, b[4] || (b[4] = [
|
|
4008
|
+
g("span", null, null, -1),
|
|
4009
|
+
g("span", null, null, -1),
|
|
4010
|
+
g("span", null, null, -1),
|
|
4011
|
+
g("span", null, null, -1)
|
|
4012
4012
|
]))) : $("", !0),
|
|
4013
|
-
p.item.audioStatus == "loading" ? (
|
|
4014
|
-
|
|
4013
|
+
p.item.audioStatus == "loading" ? (w(), q("div", No, [
|
|
4014
|
+
g("img", { src: C(Co) }, null, 8, Lo)
|
|
4015
4015
|
])) : $("", !0)
|
|
4016
4016
|
])
|
|
4017
4017
|
]),
|
|
4018
4018
|
_: 1
|
|
4019
4019
|
})
|
|
4020
4020
|
])) : $("", !0),
|
|
4021
|
-
p.item.loading && d.value && !p.item.file.length ? (
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4021
|
+
p.item.loading && d.value && !p.item.file.length ? (w(), q("div", Bo, b[5] || (b[5] = [
|
|
4022
|
+
g("span", null, null, -1),
|
|
4023
|
+
g("span", null, null, -1),
|
|
4024
|
+
g("span", null, null, -1)
|
|
4025
4025
|
]))) : $("", !0)
|
|
4026
4026
|
])
|
|
4027
4027
|
]));
|
|
4028
4028
|
}
|
|
4029
|
-
}),
|
|
4029
|
+
}), Ro = /* @__PURE__ */ iu(Po, [["__scopeId", "data-v-4de37bc5"]]), jo = { class: "das-ai-chat-container" }, Ho = {
|
|
4030
4030
|
name: "chat"
|
|
4031
4031
|
}, $o = /* @__PURE__ */ ou({
|
|
4032
4032
|
...Ho,
|
|
@@ -4039,17 +4039,17 @@ const Co = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4039
4039
|
let a = !0;
|
|
4040
4040
|
return n.value.length > 1 && (a = n.value[n.value.length - 1].id == i.id), a;
|
|
4041
4041
|
}, o = e, c = (i, a) => {
|
|
4042
|
-
|
|
4042
|
+
o("chatEmit", i, a);
|
|
4043
4043
|
};
|
|
4044
|
-
return (i, a) => (
|
|
4045
|
-
(
|
|
4044
|
+
return (i, a) => (w(), q("div", jo, [
|
|
4045
|
+
(w(!0), q(Nu, null, Qu(i.chartList, (s) => (w(), q(Nu, {
|
|
4046
4046
|
key: s.id
|
|
4047
4047
|
}, [
|
|
4048
|
-
s.role == "user" ? (
|
|
4048
|
+
s.role == "user" ? (w(), X(z0, {
|
|
4049
4049
|
key: 0,
|
|
4050
4050
|
item: s
|
|
4051
4051
|
}, null, 8, ["item"])) : $("", !0),
|
|
4052
|
-
s.role == "ai" ? (
|
|
4052
|
+
s.role == "ai" ? (w(), X(Ro, {
|
|
4053
4053
|
key: 1,
|
|
4054
4054
|
onAiChatEmit: c,
|
|
4055
4055
|
isNew: r(s),
|
|
@@ -4066,16 +4066,16 @@ const Co = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4066
4066
|
const e = () => {
|
|
4067
4067
|
x.deepseek = !x.deepseek, gt();
|
|
4068
4068
|
};
|
|
4069
|
-
return (t, n) => (
|
|
4070
|
-
|
|
4071
|
-
class: Ju(["int-opt-box", { actived:
|
|
4069
|
+
return (t, n) => (w(), q("div", Uo, [
|
|
4070
|
+
g("div", {
|
|
4071
|
+
class: Ju(["int-opt-box", { actived: C(x).deepseek }]),
|
|
4072
4072
|
onClick: e
|
|
4073
4073
|
}, [
|
|
4074
|
-
j(
|
|
4074
|
+
j(C(f0), {
|
|
4075
4075
|
size: "medium",
|
|
4076
|
-
iconColor:
|
|
4076
|
+
iconColor: C(x).deepseek ? "#5582F3" : "#212121"
|
|
4077
4077
|
}, null, 8, ["iconColor"]),
|
|
4078
|
-
|
|
4078
|
+
g("span", Zo, V(C(I)("深度思考")), 1)
|
|
4079
4079
|
], 2)
|
|
4080
4080
|
]));
|
|
4081
4081
|
}
|
|
@@ -4088,7 +4088,7 @@ const Co = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4088
4088
|
},
|
|
4089
4089
|
emits: ["senderEmit"],
|
|
4090
4090
|
setup(u, { emit: e }) {
|
|
4091
|
-
const t = u, n = e, r =
|
|
4091
|
+
const t = u, n = e, r = T(null), o = su(() => !x.senderValue), c = su(() => {
|
|
4092
4092
|
if (x.loading)
|
|
4093
4093
|
return I("回答中...");
|
|
4094
4094
|
if (t.isNew) {
|
|
@@ -4101,37 +4101,35 @@ const Co = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4101
4101
|
var h;
|
|
4102
4102
|
(h = r.value) == null || h.focus();
|
|
4103
4103
|
}, a = (h) => {
|
|
4104
|
-
console.log("changeFn", h, h.value);
|
|
4105
4104
|
};
|
|
4106
4105
|
bu(
|
|
4107
4106
|
() => x.senderValue,
|
|
4108
4107
|
(h) => {
|
|
4109
|
-
|
|
4108
|
+
!h && r.value && (r.value.style.height = "21px");
|
|
4110
4109
|
}
|
|
4111
4110
|
);
|
|
4112
4111
|
const s = (h) => {
|
|
4113
|
-
console.log("inputFn", h);
|
|
4114
4112
|
const d = h.target;
|
|
4115
|
-
d.style.height = "auto", d.style.height = d.scrollHeight + "px"
|
|
4113
|
+
d.style.height = "auto", d.style.height = d.scrollHeight + "px";
|
|
4116
4114
|
}, l = () => {
|
|
4117
4115
|
}, f = (h) => {
|
|
4118
|
-
|
|
4116
|
+
h.preventDefault(), !(x.senderValue && !x.senderValue.trim()) && (n("senderEmit", "sender", x.senderValue), x.senderValue = "");
|
|
4119
4117
|
}, _ = () => {
|
|
4120
4118
|
n("senderEmit", "stopMsg");
|
|
4121
4119
|
};
|
|
4122
|
-
return (h, d) => (
|
|
4123
|
-
|
|
4124
|
-
|
|
4120
|
+
return (h, d) => (w(), q("div", Qo, [
|
|
4121
|
+
g("div", Wo, [
|
|
4122
|
+
g("div", {
|
|
4125
4123
|
onClick: i,
|
|
4126
4124
|
class: "focus-mask-top"
|
|
4127
4125
|
}),
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
Au(
|
|
4126
|
+
g("div", Xo, [
|
|
4127
|
+
g("div", Yo, [
|
|
4128
|
+
g("div", ui, [
|
|
4129
|
+
Au(g("textarea", {
|
|
4132
4130
|
class: "das-ai-textarea",
|
|
4133
4131
|
onKeydown: Jt(f, ["enter"]),
|
|
4134
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
4132
|
+
"onUpdate:modelValue": d[0] || (d[0] = (A) => C(x).senderValue = A),
|
|
4135
4133
|
placeholder: c.value,
|
|
4136
4134
|
rows: "8",
|
|
4137
4135
|
maxlength: "512",
|
|
@@ -4140,36 +4138,36 @@ const Co = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4140
4138
|
onFocus: l,
|
|
4141
4139
|
onInput: s,
|
|
4142
4140
|
onChange: a,
|
|
4143
|
-
disabled:
|
|
4141
|
+
disabled: C(x).loading
|
|
4144
4142
|
}, null, 40, ei), [
|
|
4145
|
-
[Qt,
|
|
4143
|
+
[Qt, C(x).senderValue]
|
|
4146
4144
|
]),
|
|
4147
|
-
|
|
4145
|
+
g("div", ti, V(C(x).senderValue), 1)
|
|
4148
4146
|
])
|
|
4149
4147
|
]),
|
|
4150
|
-
|
|
4151
|
-
|
|
4148
|
+
g("div", ni, [
|
|
4149
|
+
g("div", {
|
|
4152
4150
|
onClick: i,
|
|
4153
4151
|
class: "focus-mask-bottom"
|
|
4154
4152
|
}),
|
|
4155
4153
|
j(Jo),
|
|
4156
|
-
|
|
4157
|
-
|
|
4154
|
+
g("div", ri, [
|
|
4155
|
+
C(x).loading ? $("", !0) : (w(), q("div", {
|
|
4158
4156
|
key: 0,
|
|
4159
4157
|
onClick: f,
|
|
4160
4158
|
class: Ju(["int-opt-right-icon", { disabled: o.value }])
|
|
4161
4159
|
}, [
|
|
4162
|
-
j(
|
|
4160
|
+
j(C(d0), {
|
|
4163
4161
|
customSize: "12px",
|
|
4164
4162
|
iconColor: o.value ? "#fafafa" : "#fff"
|
|
4165
4163
|
}, null, 8, ["iconColor"])
|
|
4166
4164
|
], 2)),
|
|
4167
|
-
|
|
4165
|
+
C(x).loading ? (w(), q("div", {
|
|
4168
4166
|
key: 1,
|
|
4169
4167
|
onClick: Fe(_, ["stop"]),
|
|
4170
4168
|
class: "loading-btn"
|
|
4171
4169
|
}, d[1] || (d[1] = [
|
|
4172
|
-
|
|
4170
|
+
g("div", { class: "loading-btn-con" }, null, -1)
|
|
4173
4171
|
]))) : $("", !0)
|
|
4174
4172
|
])
|
|
4175
4173
|
])
|
|
@@ -4189,23 +4187,23 @@ const Co = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4189
4187
|
const t = e, n = (r) => {
|
|
4190
4188
|
t("addNewEmit", r);
|
|
4191
4189
|
};
|
|
4192
|
-
return (r, o) => (
|
|
4193
|
-
|
|
4190
|
+
return (r, o) => (w(), q("div", ai, [
|
|
4191
|
+
g("div", {
|
|
4194
4192
|
class: "add-box",
|
|
4195
4193
|
onClick: o[0] || (o[0] = (c) => n("addNew"))
|
|
4196
4194
|
}, [
|
|
4197
|
-
j(
|
|
4195
|
+
j(C(p0), {
|
|
4198
4196
|
size: "medium",
|
|
4199
4197
|
iconColor: "#333333"
|
|
4200
4198
|
}),
|
|
4201
|
-
|
|
4199
|
+
g("span", si, V(C(I)("开启新对话")), 1)
|
|
4202
4200
|
]),
|
|
4203
|
-
|
|
4201
|
+
C(x).showScrollBom ? (w(), q("div", {
|
|
4204
4202
|
key: 0,
|
|
4205
4203
|
class: "scroll-opt-box",
|
|
4206
4204
|
onClick: o[1] || (o[1] = (c) => n("scrollBom"))
|
|
4207
4205
|
}, [
|
|
4208
|
-
j(
|
|
4206
|
+
j(C(h0), {
|
|
4209
4207
|
size: "large",
|
|
4210
4208
|
iconColor: "#333333"
|
|
4211
4209
|
})
|
|
@@ -4228,28 +4226,28 @@ const Co = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4228
4226
|
t("click", r);
|
|
4229
4227
|
};
|
|
4230
4228
|
return qu(() => {
|
|
4231
|
-
}), (r, o) => (
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
r.list.length ? (
|
|
4235
|
-
(
|
|
4229
|
+
}), (r, o) => (w(), q("div", hi, [
|
|
4230
|
+
g("div", pi, V(C(I)("嗨!我是AI助手")), 1),
|
|
4231
|
+
g("div", bi, V(C(I)("我可以帮你分析,写报告,调节设备,预订会议室,请把你的任务交给我吧~")), 1),
|
|
4232
|
+
r.list.length ? (w(), q("div", mi, V(C(I)("你可以这样说")), 1)) : $("", !0),
|
|
4233
|
+
(w(!0), q(Nu, null, Qu(r.list, (c) => (w(), q("div", {
|
|
4236
4234
|
onClick: (i) => n(c),
|
|
4237
4235
|
class: "das-ai-prompt-item"
|
|
4238
4236
|
}, V(c.text), 9, xi))), 256))
|
|
4239
4237
|
]));
|
|
4240
4238
|
}
|
|
4241
|
-
}), ki = /* @__PURE__ */ iu(gi, [["__scopeId", "data-v-2a2b79c7"]]), Zt = "v1",
|
|
4239
|
+
}), ki = /* @__PURE__ */ iu(gi, [["__scopeId", "data-v-2a2b79c7"]]), Zt = "v1", Fu = mt(`/api/llm/knowledge/${Zt}`), yi = mt(`/api/llm/vector/${Zt}`);
|
|
4242
4240
|
xt.get("token");
|
|
4243
4241
|
xt.post("putObject");
|
|
4244
|
-
const Ai = yi.get("/large-model/general-question"), Ci =
|
|
4245
|
-
|
|
4246
|
-
const Ma =
|
|
4247
|
-
|
|
4248
|
-
|
|
4242
|
+
const Ai = yi.get("/large-model/general-question"), Ci = Fu.post("/chat/stop"), vi = Fu.post("/chat/save-knowledge"), Di = Fu.get("/chat"), Ei = Fu.get("/chat/chat-details"), Fi = Fu.delete("/chat/delete-by-user"), wi = Fu.delete("/chat"), Si = Fu.get("/chat/delete-by-query-id");
|
|
4243
|
+
Pu.post("/file");
|
|
4244
|
+
const Ma = Pu.post("/file/save-file"), zi = Pu.get("/folder"), Ii = Pu.post("/folder/listAllByCondition");
|
|
4245
|
+
Pu.post("/folder/lazy-tree");
|
|
4246
|
+
Pu.post("/folder/tree-search");
|
|
4249
4247
|
const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-text-box" }, Oi = { class: "das-ai-select-text" }, Ni = { class: "das-ai-select-box" }, Li = {
|
|
4250
4248
|
key: 0,
|
|
4251
4249
|
class: "das-ai-select-text"
|
|
4252
|
-
}, Bi = { class: "das-ai-type-list" }, qi = ["onClick"],
|
|
4250
|
+
}, Bi = { class: "das-ai-type-list" }, qi = ["onClick"], Pi = { class: "das-ai-type-icon" }, Ri = { class: "das-ai-type-box" }, ji = { class: "das-ai-type-name" }, Hi = { class: "das-ai-type-desc" }, $i = ["onClick"], Vi = { class: "das-ai-type-tree" }, Ui = {
|
|
4253
4251
|
name: "selectType"
|
|
4254
4252
|
}, Zi = /* @__PURE__ */ ou({
|
|
4255
4253
|
...Ui,
|
|
@@ -4258,7 +4256,7 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4258
4256
|
},
|
|
4259
4257
|
emits: ["back"],
|
|
4260
4258
|
setup(u, { emit: e }) {
|
|
4261
|
-
const t =
|
|
4259
|
+
const t = T(!1), n = T(!1), r = T(!1), o = T({
|
|
4262
4260
|
modifiers: [
|
|
4263
4261
|
{
|
|
4264
4262
|
name: "offset",
|
|
@@ -4267,22 +4265,21 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4267
4265
|
}
|
|
4268
4266
|
}
|
|
4269
4267
|
]
|
|
4270
|
-
}), c =
|
|
4268
|
+
}), c = T([
|
|
4271
4269
|
{ id: "1", name: I("知识库"), desc: I("选择在某个知识库中搜索"), icon: "knowOpen" },
|
|
4272
4270
|
{ id: "0", name: I("物联应用"), desc: I("在权限范围内的应用中搜索"), icon: "yingyong" },
|
|
4273
4271
|
{ id: "2", name: I("全网"), desc: I("在整个大模型中搜索"), icon: "intnet" }
|
|
4274
|
-
]), i =
|
|
4272
|
+
]), i = T(!1), a = T([]), s = T(""), l = T(""), f = e, _ = () => {
|
|
4275
4273
|
f("back");
|
|
4276
|
-
}, h = su(() => c.value.find((E) => E.id === x.searchType)), d = su(() => x.searchType == "1" ? I("基于知识库") : x.searchType == "0" ? I("基于物联应用") : x.searchType == "2" ? I("基于全网") : I("基于全部")),
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
console.log("nodeClick", E), l.value = E.id, x.folderId = E.id == x.allKnowId ? "" : E.id, x.folderName = x.folderId ? E.folderName : "", console.log("nodeClick2", x.folderId), r.value = !1, n.value = !1;
|
|
4274
|
+
}, h = su(() => c.value.find((E) => E.id === x.searchType)), d = su(() => x.searchType == "1" ? I("基于知识库") : x.searchType == "0" ? I("基于物联应用") : x.searchType == "2" ? I("基于全网") : I("基于全部")), A = su(() => x.folderId && x.folderName ? x.folderName : I("选择在某个知识库中搜索")), y = (E) => {
|
|
4275
|
+
}, v = (E) => {
|
|
4276
|
+
r.value = !1;
|
|
4277
|
+
}, k = (E) => {
|
|
4278
|
+
l.value = E.id, x.folderId = E.id == x.allKnowId ? "" : E.id, x.folderName = x.folderId ? E.folderName : "", r.value = !1, n.value = !1;
|
|
4282
4279
|
}, p = (E) => {
|
|
4283
4280
|
x.searchType = E.id, Vu(), l.value = x.folderId ? x.folderId : x.allKnowId, r.value = !0, m();
|
|
4284
4281
|
}, b = async (E) => {
|
|
4285
|
-
x.searchType = E.id, n.value = !1, Vu()
|
|
4282
|
+
x.searchType = E.id, n.value = !1, Vu();
|
|
4286
4283
|
}, m = async () => {
|
|
4287
4284
|
const E = {
|
|
4288
4285
|
folderName: "",
|
|
@@ -4292,60 +4289,60 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4292
4289
|
// 是否排除内置文件夹 默认不排除
|
|
4293
4290
|
};
|
|
4294
4291
|
i.value = !0;
|
|
4295
|
-
const [
|
|
4296
|
-
if (i.value = !1,
|
|
4292
|
+
const [P, R] = await Ii(E).run();
|
|
4293
|
+
if (i.value = !1, P)
|
|
4297
4294
|
return;
|
|
4298
|
-
let K =
|
|
4299
|
-
|
|
4295
|
+
let K = R;
|
|
4296
|
+
K && K.length ? (K = [
|
|
4300
4297
|
{
|
|
4301
4298
|
disabled: !1,
|
|
4302
4299
|
authority: !0,
|
|
4303
4300
|
id: x.allKnowId,
|
|
4304
4301
|
folderName: I("全部"),
|
|
4305
|
-
childFolderList:
|
|
4302
|
+
childFolderList: R,
|
|
4306
4303
|
folderPath: x.allKnowId,
|
|
4307
4304
|
pathName: I("全部")
|
|
4308
4305
|
}
|
|
4309
4306
|
], K.forEach((du) => {
|
|
4310
|
-
|
|
4311
|
-
})) : (l.value = "", x.folderId = "", x.folderName = ""),
|
|
4312
|
-
},
|
|
4313
|
-
E.disabled = !E.authority, E.path =
|
|
4314
|
-
|
|
4307
|
+
M(du);
|
|
4308
|
+
})) : (l.value = "", x.folderId = "", x.folderName = ""), a.value = K;
|
|
4309
|
+
}, M = (E, P, R) => {
|
|
4310
|
+
E.disabled = !E.authority, E.path = P ? P + `/${E.id}` : E.id, E.pathName = R ? R + `/${E.folderName}` : E.folderName, x.folderId && x.folderId == E.id && !E.authority && (x.folderId = "", x.folderName = "", l.value = ""), E.childFolderList && E.childFolderList.length && E.childFolderList.forEach((K) => {
|
|
4311
|
+
M(K, E.path, E.pathName);
|
|
4315
4312
|
});
|
|
4316
4313
|
};
|
|
4317
|
-
return (E,
|
|
4318
|
-
Au(
|
|
4319
|
-
j(
|
|
4314
|
+
return (E, P) => (w(), q("div", Ti, [
|
|
4315
|
+
Au(g("div", Mi, [
|
|
4316
|
+
j(C(Se), {
|
|
4320
4317
|
onClick: _,
|
|
4321
4318
|
size: "large",
|
|
4322
4319
|
iconColor: "#666666"
|
|
4323
4320
|
}),
|
|
4324
|
-
|
|
4321
|
+
g("div", Oi, V(d.value), 1)
|
|
4325
4322
|
], 512), [
|
|
4326
4323
|
[Hu, E.listLength]
|
|
4327
4324
|
]),
|
|
4328
|
-
j(
|
|
4325
|
+
j(C(m0), {
|
|
4329
4326
|
popperClass: "das-ai-select-popover",
|
|
4330
4327
|
"popper-options": o.value,
|
|
4331
4328
|
"show-arrow": !1,
|
|
4332
4329
|
width: 428,
|
|
4333
4330
|
trigger: "click",
|
|
4334
4331
|
visible: n.value,
|
|
4335
|
-
"onUpdate:visible":
|
|
4332
|
+
"onUpdate:visible": P[2] || (P[2] = (R) => n.value = R),
|
|
4336
4333
|
disabled: t.value,
|
|
4337
|
-
onShow:
|
|
4338
|
-
onHide:
|
|
4334
|
+
onShow: y,
|
|
4335
|
+
onHide: v
|
|
4339
4336
|
}, {
|
|
4340
4337
|
reference: J(() => [
|
|
4341
|
-
Au(
|
|
4342
|
-
h.value ? (
|
|
4343
|
-
n.value ? (
|
|
4338
|
+
Au(g("div", Ni, [
|
|
4339
|
+
h.value ? (w(), q("span", Li, V(h.value.name), 1)) : $("", !0),
|
|
4340
|
+
n.value ? (w(), X(C(pt), {
|
|
4344
4341
|
key: 1,
|
|
4345
4342
|
size: "mini",
|
|
4346
4343
|
iconColor: "#666666"
|
|
4347
4344
|
})) : $("", !0),
|
|
4348
|
-
n.value ? $("", !0) : (
|
|
4345
|
+
n.value ? $("", !0) : (w(), X(C(ht), {
|
|
4349
4346
|
key: 2,
|
|
4350
4347
|
size: "mini",
|
|
4351
4348
|
iconColor: "#666666"
|
|
@@ -4355,28 +4352,28 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4355
4352
|
])
|
|
4356
4353
|
]),
|
|
4357
4354
|
default: J(() => [
|
|
4358
|
-
Au(
|
|
4359
|
-
(
|
|
4360
|
-
onClick: (K) => b(
|
|
4361
|
-
class: Ju(["das-ai-type-item", { selected:
|
|
4355
|
+
Au(g("div", Bi, [
|
|
4356
|
+
(w(!0), q(Nu, null, Qu(c.value, (R) => (w(), q("div", {
|
|
4357
|
+
onClick: (K) => b(R),
|
|
4358
|
+
class: Ju(["das-ai-type-item", { selected: C(x).searchType == R.id }])
|
|
4362
4359
|
}, [
|
|
4363
|
-
|
|
4364
|
-
|
|
4360
|
+
g("div", Pi, [
|
|
4361
|
+
C(x).searchType == R.id ? (w(), X(C(b0), {
|
|
4365
4362
|
key: 0,
|
|
4366
4363
|
customSize: "18px",
|
|
4367
4364
|
iconColor: "#FFFFFF"
|
|
4368
4365
|
})) : $("", !0)
|
|
4369
4366
|
]),
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4367
|
+
g("div", Ri, [
|
|
4368
|
+
g("div", ji, V(R.name), 1),
|
|
4369
|
+
g("div", Hi, V(R.id == 1 ? A.value : R.desc), 1)
|
|
4373
4370
|
]),
|
|
4374
|
-
|
|
4371
|
+
R.id == "1" ? (w(), q("div", {
|
|
4375
4372
|
key: 0,
|
|
4376
|
-
onClick: Fe((K) => p(
|
|
4373
|
+
onClick: Fe((K) => p(R), ["stop"]),
|
|
4377
4374
|
class: "know-entry"
|
|
4378
4375
|
}, [
|
|
4379
|
-
j(
|
|
4376
|
+
j(C(ft), {
|
|
4380
4377
|
customSize: "18px",
|
|
4381
4378
|
iconColor: "#666666"
|
|
4382
4379
|
})
|
|
@@ -4385,23 +4382,23 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4385
4382
|
], 512), [
|
|
4386
4383
|
[Hu, !r.value]
|
|
4387
4384
|
]),
|
|
4388
|
-
Au((
|
|
4389
|
-
j(
|
|
4385
|
+
Au((w(), q("div", Vi, [
|
|
4386
|
+
j(C(x0), {
|
|
4390
4387
|
ref: "folderTreeRef",
|
|
4391
4388
|
data: a.value,
|
|
4392
4389
|
isFilter: "",
|
|
4393
4390
|
"node-key": "id",
|
|
4394
4391
|
isEllipsis: "",
|
|
4395
4392
|
props: { label: "folderName", children: "childFolderList" },
|
|
4396
|
-
inputOptions: { placeholder:
|
|
4393
|
+
inputOptions: { placeholder: C(I)("搜索文件夹名称") },
|
|
4397
4394
|
modelValue: l.value,
|
|
4398
|
-
"onUpdate:modelValue":
|
|
4395
|
+
"onUpdate:modelValue": P[0] || (P[0] = (R) => l.value = R),
|
|
4399
4396
|
"filter-value": s.value,
|
|
4400
|
-
"onUpdate:filterValue":
|
|
4401
|
-
onNodeClick:
|
|
4397
|
+
"onUpdate:filterValue": P[1] || (P[1] = (R) => s.value = R),
|
|
4398
|
+
onNodeClick: k
|
|
4402
4399
|
}, null, 8, ["data", "inputOptions", "modelValue", "filter-value"])
|
|
4403
4400
|
])), [
|
|
4404
|
-
[
|
|
4401
|
+
[C(bt), i.value],
|
|
4405
4402
|
[Hu, r.value]
|
|
4406
4403
|
])
|
|
4407
4404
|
]),
|
|
@@ -4422,8 +4419,8 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4422
4419
|
emits: ["back", "preview", "toApp"],
|
|
4423
4420
|
setup(u, { emit: e }) {
|
|
4424
4421
|
const t = e;
|
|
4425
|
-
|
|
4426
|
-
const n =
|
|
4422
|
+
T();
|
|
4423
|
+
const n = T(-1), r = T([]), o = () => {
|
|
4427
4424
|
t("back");
|
|
4428
4425
|
};
|
|
4429
4426
|
qu(() => {
|
|
@@ -4432,38 +4429,38 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4432
4429
|
const s = `${st().baseURL}/oss/`;
|
|
4433
4430
|
return a.includes(s);
|
|
4434
4431
|
}, i = (a, s) => {
|
|
4435
|
-
if (
|
|
4432
|
+
if (n.value = s, r.value.includes(s) || r.value.push(s), a.type == "url") {
|
|
4436
4433
|
a.webUrl && t("toApp", a.webUrl);
|
|
4437
4434
|
return;
|
|
4438
4435
|
}
|
|
4439
4436
|
c(a.url) ? t("preview", a.url) : window.open(a.url, "_blank");
|
|
4440
4437
|
};
|
|
4441
|
-
return (a, s) => (
|
|
4442
|
-
|
|
4443
|
-
j(
|
|
4438
|
+
return (a, s) => (w(), q("div", Ki, [
|
|
4439
|
+
g("div", Ji, [
|
|
4440
|
+
j(C(Se), {
|
|
4444
4441
|
onClick: o,
|
|
4445
4442
|
size: "large",
|
|
4446
4443
|
iconColor: "#666666"
|
|
4447
4444
|
}),
|
|
4448
|
-
|
|
4445
|
+
g("span", Qi, V(C(I)("参考内容(共$0条)", a.item.file.length)), 1)
|
|
4449
4446
|
]),
|
|
4450
|
-
|
|
4451
|
-
j(
|
|
4447
|
+
g("div", Wi, [
|
|
4448
|
+
j(C(we), null, {
|
|
4452
4449
|
default: J(() => [
|
|
4453
|
-
|
|
4454
|
-
(
|
|
4450
|
+
g("div", Xi, [
|
|
4451
|
+
(w(!0), q(Nu, null, Qu(a.item.file, (l, f) => (w(), q("div", {
|
|
4455
4452
|
onClick: (_) => i(l, f),
|
|
4456
4453
|
class: Ju(["reference-file-item", { current: n.value == f, selected: r.value.includes(f) }])
|
|
4457
4454
|
}, [
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
j(
|
|
4455
|
+
g("div", uc, [
|
|
4456
|
+
g("span", ec, V(f + 1) + ".", 1),
|
|
4457
|
+
j(C(_0), {
|
|
4461
4458
|
size: "mini",
|
|
4462
4459
|
iconColor: "inherit"
|
|
4463
4460
|
}),
|
|
4464
|
-
|
|
4461
|
+
g("span", tc, V(l.name), 1)
|
|
4465
4462
|
]),
|
|
4466
|
-
|
|
4463
|
+
g("div", nc, V(l.summary), 1)
|
|
4467
4464
|
], 10, Yi))), 256))
|
|
4468
4465
|
])
|
|
4469
4466
|
]),
|
|
@@ -4472,8 +4469,8 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4472
4469
|
])
|
|
4473
4470
|
]));
|
|
4474
4471
|
}
|
|
4475
|
-
}), ic = /* @__PURE__ */ iu(oc, [["__scopeId", "data-v-2c238a27"]]), cc = ot(() => import("./index-
|
|
4476
|
-
const u =
|
|
4472
|
+
}), ic = /* @__PURE__ */ iu(oc, [["__scopeId", "data-v-2c238a27"]]), cc = ot(() => import("./index-CwdJKHy0.js")), ac = () => {
|
|
4473
|
+
const u = T(null), e = T(!1);
|
|
4477
4474
|
let t = "", n = "";
|
|
4478
4475
|
return {
|
|
4479
4476
|
deletaDialogVue: () => it(cc, {
|
|
@@ -4513,37 +4510,34 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4513
4510
|
},
|
|
4514
4511
|
emits: ["back", "record"],
|
|
4515
4512
|
setup(u, { emit: e }) {
|
|
4516
|
-
const t =
|
|
4513
|
+
const t = T(!1), { deletaDialogVue: n, showDeleteDialog: r } = ac(), o = T([]), c = e, i = () => {
|
|
4517
4514
|
c("back");
|
|
4518
|
-
}, a = (
|
|
4519
|
-
let p =
|
|
4515
|
+
}, a = (k) => {
|
|
4516
|
+
let p = k.replace(/^(#+)\s/gm, "");
|
|
4520
4517
|
return p = p.replace(/^([-*+]|\d+\.)\s/gm, ""), p = p.replace(/([*_]{1,2})(.*?)\1/g, "$2"), p = p.replace(/```[\s\S]*?```/g, ""), p = p.replace(/`(.*?)`/g, "$1"), p = p.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1"), p = p.replace(/!\[([^\]]+)\]\([^)]+\)/g, "$1"), p = p.replace(/<[^>]*>/g, ""), p;
|
|
4521
|
-
}, s = (
|
|
4518
|
+
}, s = (k) => {
|
|
4522
4519
|
const p = document.querySelector("#history-dialogue-scrollbox .das-ai-wrap-class");
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
console.log("scrollFn2", m, p.scrollHeight, p.clientHeight), m <= 20 && !t.value && l.value < f.value && (l.value = l.value + 1, h());
|
|
4526
|
-
}, l = M(1), f = M(1), _ = M(20), h = async () => {
|
|
4520
|
+
p.scrollHeight - p.clientHeight - k.scrollTop <= 20 && !t.value && l.value < f.value && (l.value = l.value + 1, h());
|
|
4521
|
+
}, l = T(1), f = T(1), _ = T(20), h = async () => {
|
|
4527
4522
|
t.value = !0;
|
|
4528
|
-
const
|
|
4523
|
+
const k = {
|
|
4529
4524
|
pageIndex: l.value,
|
|
4530
4525
|
pageSize: _.value
|
|
4531
|
-
}, [p, b] = await Di(
|
|
4532
|
-
t.value = !1,
|
|
4526
|
+
}, [p, b] = await Di(k).run();
|
|
4527
|
+
t.value = !1, !p && (b.data && b.data.length && b.data.forEach((m) => {
|
|
4533
4528
|
m.time = m.createdAt ? dt(m.createdAt).format("YYYY-MM-DD HH:mm:ss") : "", m.answerText = m.answer ? a(m.answer) : "";
|
|
4534
4529
|
}), l.value == 1 ? o.value = b.data : o.value = o.value.concat(b.data), f.value = b.totalPage);
|
|
4535
|
-
}, d = (
|
|
4536
|
-
c("record",
|
|
4537
|
-
},
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
if (b) {
|
|
4530
|
+
}, d = (k) => k.searchType == 0 ? I("物联应用") : k.searchType == 1 ? I("知识库") : k.searchType == 2 ? I("全网") : I("全部"), A = async (k) => {
|
|
4531
|
+
c("record", k);
|
|
4532
|
+
}, y = async (k) => {
|
|
4533
|
+
await r(I("删除后,该会话将不可恢复,")), k.id, t.value = !0;
|
|
4534
|
+
const [p, b] = await wi({ id: k.id }).run();
|
|
4535
|
+
if (p) {
|
|
4542
4536
|
t.value = !1;
|
|
4543
4537
|
return;
|
|
4544
4538
|
}
|
|
4545
|
-
|
|
4546
|
-
},
|
|
4539
|
+
h();
|
|
4540
|
+
}, v = async (k) => {
|
|
4547
4541
|
if (!o.value.length) return;
|
|
4548
4542
|
await r(I("清空后,所有历史将无法找回,")), t.value = !0;
|
|
4549
4543
|
const [p, b] = await Fi().run();
|
|
@@ -4551,30 +4545,30 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4551
4545
|
t.value = !1;
|
|
4552
4546
|
return;
|
|
4553
4547
|
}
|
|
4554
|
-
|
|
4548
|
+
h();
|
|
4555
4549
|
};
|
|
4556
4550
|
return qu(() => {
|
|
4557
4551
|
h();
|
|
4558
|
-
}), (
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
j(
|
|
4552
|
+
}), (k, p) => Au((w(), q("div", sc, [
|
|
4553
|
+
g("div", lc, [
|
|
4554
|
+
g("div", dc, [
|
|
4555
|
+
j(C(Se), {
|
|
4562
4556
|
onClick: i,
|
|
4563
4557
|
size: "large",
|
|
4564
4558
|
iconColor: "#666666"
|
|
4565
4559
|
}),
|
|
4566
|
-
|
|
4560
|
+
g("span", fc, V(C(I)("历史会话")), 1)
|
|
4567
4561
|
]),
|
|
4568
|
-
j(
|
|
4562
|
+
j(C(vu), {
|
|
4569
4563
|
placement: "top",
|
|
4570
4564
|
type: "button"
|
|
4571
4565
|
}, {
|
|
4572
4566
|
content: J(() => [
|
|
4573
|
-
|
|
4567
|
+
g("div", null, V(C(I)("清空")), 1)
|
|
4574
4568
|
]),
|
|
4575
4569
|
default: J(() => [
|
|
4576
|
-
j(
|
|
4577
|
-
onClick:
|
|
4570
|
+
j(C(g0), {
|
|
4571
|
+
onClick: v,
|
|
4578
4572
|
size: "large",
|
|
4579
4573
|
iconColor: "#666666"
|
|
4580
4574
|
})
|
|
@@ -4582,39 +4576,39 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4582
4576
|
_: 1
|
|
4583
4577
|
})
|
|
4584
4578
|
]),
|
|
4585
|
-
|
|
4586
|
-
j(
|
|
4579
|
+
g("div", hc, [
|
|
4580
|
+
j(C(we), {
|
|
4587
4581
|
"wrap-class": "das-ai-wrap-class",
|
|
4588
4582
|
onScroll: s
|
|
4589
4583
|
}, {
|
|
4590
4584
|
default: J(() => [
|
|
4591
|
-
o.value.length ? (
|
|
4592
|
-
(
|
|
4585
|
+
o.value.length ? (w(), q("div", pc, [
|
|
4586
|
+
(w(!0), q(Nu, null, Qu(o.value, (b, m) => (w(), q("div", {
|
|
4593
4587
|
class: "history-dialogue-item",
|
|
4594
|
-
onClick: (
|
|
4588
|
+
onClick: (M) => A(b)
|
|
4595
4589
|
}, [
|
|
4596
|
-
|
|
4597
|
-
j(
|
|
4590
|
+
g("div", mc, V(b.title), 1),
|
|
4591
|
+
j(C(vu), {
|
|
4598
4592
|
placement: "top-start",
|
|
4599
4593
|
disabled: !0,
|
|
4600
4594
|
text: b.answerText,
|
|
4601
4595
|
row: "2"
|
|
4602
4596
|
}, null, 8, ["text"]),
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4597
|
+
g("div", xc, [
|
|
4598
|
+
g("div", _c, [
|
|
4599
|
+
g("div", gc, V(d(b)), 1),
|
|
4600
|
+
g("span", null, V(b.time), 1)
|
|
4607
4601
|
]),
|
|
4608
|
-
j(
|
|
4602
|
+
j(C(vu), {
|
|
4609
4603
|
placement: "top",
|
|
4610
4604
|
type: "button"
|
|
4611
4605
|
}, {
|
|
4612
4606
|
content: J(() => [
|
|
4613
|
-
|
|
4607
|
+
g("div", null, V(C(I)("删除")), 1)
|
|
4614
4608
|
]),
|
|
4615
4609
|
default: J(() => [
|
|
4616
|
-
j(
|
|
4617
|
-
onClick: Fe((
|
|
4610
|
+
j(C(k0), {
|
|
4611
|
+
onClick: Fe((M) => y(b), ["stop"]),
|
|
4618
4612
|
size: "medium",
|
|
4619
4613
|
iconColor: "#666666"
|
|
4620
4614
|
}, null, 8, ["onClick"])
|
|
@@ -4623,14 +4617,14 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4623
4617
|
}, 1024)
|
|
4624
4618
|
])
|
|
4625
4619
|
], 8, bc))), 256))
|
|
4626
|
-
])) : (
|
|
4620
|
+
])) : (w(), X(C(y0), { key: 0 }))
|
|
4627
4621
|
]),
|
|
4628
4622
|
_: 1
|
|
4629
4623
|
})
|
|
4630
4624
|
]),
|
|
4631
|
-
j(
|
|
4625
|
+
j(C(n))
|
|
4632
4626
|
])), [
|
|
4633
|
-
[
|
|
4627
|
+
[C(bt), t.value]
|
|
4634
4628
|
]);
|
|
4635
4629
|
}
|
|
4636
4630
|
}), Ac = /* @__PURE__ */ iu(yc, [["__scopeId", "data-v-4c2d27ea"]]);
|
|
@@ -4707,75 +4701,73 @@ function Ee(u, e) {
|
|
|
4707
4701
|
var vc = Ee(Cc, { path: "/" });
|
|
4708
4702
|
const Dc = () => {
|
|
4709
4703
|
let u = 0, e = -1, t = [], n = "", r = -1, o = !1, c = "", i = "";
|
|
4710
|
-
const a =
|
|
4711
|
-
const
|
|
4712
|
-
return
|
|
4713
|
-
}, h = (
|
|
4714
|
-
if (
|
|
4715
|
-
|
|
4704
|
+
const a = T(!1), s = T(), l = T(!1), f = T(""), _ = () => {
|
|
4705
|
+
const v = re() ? re() : vc.get("accessToken"), k = lt().id, p = {};
|
|
4706
|
+
return v && (p.token = v), k && (p.project = k), p;
|
|
4707
|
+
}, h = (v = 0, k, p) => {
|
|
4708
|
+
if (n = k, r == 1 && v == 1 && i) {
|
|
4709
|
+
i.send(JSON.stringify({ text: p, taskId: c, taskType: v, overFlag: !n.loading, ..._() }));
|
|
4716
4710
|
return;
|
|
4717
4711
|
}
|
|
4718
4712
|
n.audioStatus = "generated", i = new A0({
|
|
4719
4713
|
url: "/socket/api/speech/v1/tts",
|
|
4720
4714
|
reconnectWhenClose: !0,
|
|
4721
4715
|
opened: () => {
|
|
4722
|
-
c = $u(),
|
|
4716
|
+
c = $u(), v == 0 && i.send(JSON.stringify({ text: n.content, taskId: c, taskType: v, ..._() })), v == 1 && i.send(JSON.stringify({ text: n.content, taskId: c, taskType: v, overFlag: !n.loading, ..._() })), r = v;
|
|
4723
4717
|
},
|
|
4724
4718
|
message: async (b) => {
|
|
4725
|
-
if (
|
|
4719
|
+
if ((b == null ? void 0 : b.taskId) == c) {
|
|
4726
4720
|
if (!(b != null && b.baseData)) return;
|
|
4727
|
-
b != null && b.baseData && t.push(b == null ? void 0 : b.baseData), r == 1 && (o = b.overFlag), e < 0 && (r == 0 && (u = b.totalCount, e = 0, n.audioStatus = "loading", f.value = `data:audio/mpeg;base64,${b == null ? void 0 : b.baseData}`, l.value = !0,
|
|
4721
|
+
b != null && b.baseData && t.push(b == null ? void 0 : b.baseData), r == 1 && (o = b.overFlag), e < 0 && (r == 0 && (u = b.totalCount, e = 0, n.audioStatus = "loading", f.value = `data:audio/mpeg;base64,${b == null ? void 0 : b.baseData}`, l.value = !0, y()), r == 1 && x.autoAudio && (e = 0, n.audioStatus = "loading", f.value = `data:audio/mpeg;base64,${b == null ? void 0 : b.baseData}`, l.value = !0, n.havePlayAutoAudio = !0, y())), a.value && (a.value = !1);
|
|
4728
4722
|
}
|
|
4729
4723
|
},
|
|
4730
4724
|
error: (b) => {
|
|
4731
4725
|
d();
|
|
4732
4726
|
},
|
|
4733
4727
|
close: (b) => {
|
|
4734
|
-
console.log("close", b);
|
|
4735
4728
|
}
|
|
4736
4729
|
});
|
|
4737
4730
|
}, d = () => {
|
|
4738
|
-
var
|
|
4739
|
-
|
|
4740
|
-
},
|
|
4731
|
+
var v;
|
|
4732
|
+
r = -1, e = -1, u = 0, o = !1, t = [], i && i.disconnect(), i = "", (v = s.value) == null || v.pause(), f.value = "", a.value = !1, l.value = !1, n && (n.audioStatus = "normal", n = "");
|
|
4733
|
+
}, A = () => {
|
|
4741
4734
|
if (r == 0) {
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
console.log("播发下一个片段", y), e++, f.value = `data:audio/mpeg;base64,${t[e]}`;
|
|
4735
|
+
const v = e + 1;
|
|
4736
|
+
if (v < u)
|
|
4737
|
+
if (t[v]) {
|
|
4738
|
+
e++, f.value = `data:audio/mpeg;base64,${t[e]}`;
|
|
4747
4739
|
return;
|
|
4748
4740
|
} else {
|
|
4749
|
-
a.value = !0, bu(a, (
|
|
4750
|
-
|
|
4741
|
+
a.value = !0, bu(a, (k) => {
|
|
4742
|
+
A();
|
|
4751
4743
|
});
|
|
4752
4744
|
return;
|
|
4753
4745
|
}
|
|
4754
|
-
|
|
4746
|
+
d();
|
|
4755
4747
|
}
|
|
4756
4748
|
if (r == 1) {
|
|
4757
4749
|
if (o) {
|
|
4758
4750
|
if (e++, t[e]) {
|
|
4759
|
-
|
|
4751
|
+
f.value = `data:audio/mpeg;base64,${t[e]}`;
|
|
4760
4752
|
return;
|
|
4761
4753
|
}
|
|
4762
4754
|
} else {
|
|
4763
|
-
const
|
|
4764
|
-
if (t[
|
|
4765
|
-
e++,
|
|
4755
|
+
const v = e + 1;
|
|
4756
|
+
if (t[v]) {
|
|
4757
|
+
e++, f.value = `data:audio/mpeg;base64,${t[e]}`;
|
|
4766
4758
|
return;
|
|
4767
4759
|
} else {
|
|
4768
|
-
a.value = !0, bu(a, (
|
|
4769
|
-
|
|
4760
|
+
a.value = !0, bu(a, (k) => {
|
|
4761
|
+
A();
|
|
4770
4762
|
});
|
|
4771
4763
|
return;
|
|
4772
4764
|
}
|
|
4773
4765
|
}
|
|
4774
|
-
|
|
4766
|
+
d();
|
|
4775
4767
|
}
|
|
4776
|
-
},
|
|
4777
|
-
|
|
4778
|
-
|
|
4768
|
+
}, y = () => {
|
|
4769
|
+
s.value.onended = function() {
|
|
4770
|
+
A();
|
|
4779
4771
|
};
|
|
4780
4772
|
};
|
|
4781
4773
|
return {
|
|
@@ -4799,28 +4791,28 @@ const Dc = () => {
|
|
|
4799
4791
|
__name: "index",
|
|
4800
4792
|
emits: ["toApp"],
|
|
4801
4793
|
setup(u, { expose: e, emit: t }) {
|
|
4802
|
-
const n = t, r =
|
|
4794
|
+
const n = t, r = T(0), o = T(0), c = T(""), i = T(), a = T(""), s = T(null), l = T(!1), f = T(null), _ = T([
|
|
4803
4795
|
{ id: "1", text: I("介绍达实公司及核心产品") },
|
|
4804
4796
|
{ id: "2", text: I("介绍达实公司行业案例") },
|
|
4805
4797
|
{ id: "3", text: I("预订上午9:00的会议室") }
|
|
4806
|
-
]), h =
|
|
4807
|
-
let
|
|
4798
|
+
]), h = T({}), d = T([]), A = T(["A100", "A002", "A003", "A005"]), y = T(!1), v = T(!1), { folderDialogVue: k, showFolderDialog: p } = D0(), { aiAudioRef: b, isAudioplay: m, audioSrc: M, playAudio: E, pauseAudio: P } = Dc();
|
|
4799
|
+
let R = 0;
|
|
4808
4800
|
qu(() => {
|
|
4809
4801
|
gt(!0), Vu(), du();
|
|
4810
4802
|
}), at(() => {
|
|
4811
|
-
|
|
4803
|
+
pe(), P();
|
|
4812
4804
|
});
|
|
4813
4805
|
const K = () => {
|
|
4814
|
-
|
|
4806
|
+
P();
|
|
4815
4807
|
};
|
|
4816
4808
|
bu(
|
|
4817
4809
|
() => x.loading,
|
|
4818
|
-
(
|
|
4810
|
+
(z) => {
|
|
4819
4811
|
s.value && (s.value.loading = x.loading);
|
|
4820
4812
|
}
|
|
4821
4813
|
), bu(
|
|
4822
4814
|
() => x.searchType,
|
|
4823
|
-
(
|
|
4815
|
+
(z) => {
|
|
4824
4816
|
du();
|
|
4825
4817
|
}
|
|
4826
4818
|
);
|
|
@@ -4830,30 +4822,30 @@ const Dc = () => {
|
|
|
4830
4822
|
_.value = h[`${x.searchType}`];
|
|
4831
4823
|
return;
|
|
4832
4824
|
}
|
|
4833
|
-
const [
|
|
4834
|
-
|
|
4825
|
+
const [z, D] = await Ai({ type: x.searchType }, { ignoreErrorMessage: !0 }).run();
|
|
4826
|
+
z || D && (h[`${x.searchType}`] = D.map((G) => ({
|
|
4835
4827
|
id: $u(),
|
|
4836
|
-
text:
|
|
4828
|
+
text: G
|
|
4837
4829
|
})), _.value = h[`${x.searchType}`]);
|
|
4838
4830
|
}, _u = () => {
|
|
4839
4831
|
Ae(() => {
|
|
4840
|
-
if (
|
|
4841
|
-
const
|
|
4842
|
-
|
|
4832
|
+
if (v.value) return;
|
|
4833
|
+
const z = document.querySelector("#das-ai-chat-scrollbox .das-ai-wrap-class");
|
|
4834
|
+
z && (y.value = !0, z.scrollTop = z.scrollHeight, r.value = z.scrollHeight - z.clientHeight);
|
|
4843
4835
|
});
|
|
4844
4836
|
};
|
|
4845
4837
|
let gu = "";
|
|
4846
|
-
const
|
|
4838
|
+
const wu = () => {
|
|
4847
4839
|
gu && clearTimeout(gu), gu = setTimeout(() => {
|
|
4848
|
-
|
|
4840
|
+
v.value = !1;
|
|
4849
4841
|
}, 2e3);
|
|
4850
|
-
}, fu = (
|
|
4851
|
-
if (
|
|
4842
|
+
}, fu = (z) => {
|
|
4843
|
+
if (r.value <= 0) {
|
|
4852
4844
|
const D = document.querySelector("#das-ai-chat-scrollbox .das-ai-wrap-class");
|
|
4853
4845
|
r.value = D.scrollHeight - D.clientHeight;
|
|
4854
4846
|
}
|
|
4855
|
-
x.showScrollBom = r.value -
|
|
4856
|
-
},
|
|
4847
|
+
x.showScrollBom = r.value - z.scrollTop > 50, y.value || (v.value = !0, wu()), y.value = !1;
|
|
4848
|
+
}, Su = () => ({
|
|
4857
4849
|
id: $u(),
|
|
4858
4850
|
role: "user",
|
|
4859
4851
|
content: ""
|
|
@@ -4873,23 +4865,23 @@ const Dc = () => {
|
|
|
4873
4865
|
thinkTime: 0,
|
|
4874
4866
|
file: [],
|
|
4875
4867
|
urls: []
|
|
4876
|
-
}),
|
|
4868
|
+
}), zu = async (z) => {
|
|
4877
4869
|
a.value = "", l.value = !0;
|
|
4878
|
-
const [D,
|
|
4879
|
-
if (
|
|
4880
|
-
if (
|
|
4881
|
-
const
|
|
4870
|
+
const [D, G] = await Ei({ chatId: z.id }).run();
|
|
4871
|
+
if (!D)
|
|
4872
|
+
if (G) {
|
|
4873
|
+
const Y = [];
|
|
4882
4874
|
let B = "", cu = "", au = "";
|
|
4883
|
-
|
|
4884
|
-
B || (B = U.chat_id), cu || (cu = U.searchType), au || (au = U.fold_id), U.fromType == 0 &&
|
|
4885
|
-
...
|
|
4875
|
+
G && !G.status && G.forEach((U) => {
|
|
4876
|
+
B || (B = U.chat_id), cu || (cu = U.searchType), au || (au = U.fold_id), U.fromType == 0 && Y.push({
|
|
4877
|
+
...Su(),
|
|
4886
4878
|
content: U.content
|
|
4887
|
-
}), U.fromType == 1 && (U.files || (U.files = []), U.urls || (U.urls = []), U.urls.length && (U.urls = U.urls.map((
|
|
4888
|
-
name:
|
|
4889
|
-
appUrl:
|
|
4890
|
-
webUrl:
|
|
4879
|
+
}), U.fromType == 1 && (U.files || (U.files = []), U.urls || (U.urls = []), U.urls.length && (U.urls = U.urls.map((Tu) => ({
|
|
4880
|
+
name: Tu.name,
|
|
4881
|
+
appUrl: Tu.app_url,
|
|
4882
|
+
webUrl: Tu.web_url,
|
|
4891
4883
|
type: "url"
|
|
4892
|
-
})), U.files.unshift(...U.urls)),
|
|
4884
|
+
})), U.files.unshift(...U.urls)), Y.push({
|
|
4893
4885
|
...ue(),
|
|
4894
4886
|
content: U.content,
|
|
4895
4887
|
think: U.think,
|
|
@@ -4898,76 +4890,73 @@ const Dc = () => {
|
|
|
4898
4890
|
saved: U.knowledge_type == "1",
|
|
4899
4891
|
queryId: U.QueryId,
|
|
4900
4892
|
intention: U.intention,
|
|
4901
|
-
showSave: !
|
|
4893
|
+
showSave: !A.value.includes(U.intention)
|
|
4902
4894
|
}));
|
|
4903
|
-
}),
|
|
4895
|
+
}), Iu(), d.value = Y, o.value = B, x.searchType = cu || "1", cu == "1" && (x.folderId = au, au ? ju(au) : x.folderName = ""), Vu(), _u(), l.value = !1;
|
|
4904
4896
|
} else
|
|
4905
4897
|
l.value = !1;
|
|
4906
|
-
}, ju = async (
|
|
4907
|
-
if (!
|
|
4908
|
-
const [D,
|
|
4909
|
-
|
|
4910
|
-
},
|
|
4911
|
-
|
|
4912
|
-
}, fe = (
|
|
4913
|
-
|
|
4898
|
+
}, ju = async (z) => {
|
|
4899
|
+
if (!z) return;
|
|
4900
|
+
const [D, G] = await zi({ id: z }).run();
|
|
4901
|
+
D || G && (x.folderName = G.folderName);
|
|
4902
|
+
}, Iu = () => {
|
|
4903
|
+
f.value = null, x.loading = !1, P(), r.value = 0, d.value = [], s.value = null, y.value = !1, v.value = !1, o.value = null, E0();
|
|
4904
|
+
}, fe = (z) => {
|
|
4905
|
+
z == "addNew" && Iu(), z == "scrollBom" && (v.value = !1, _u());
|
|
4914
4906
|
}, L = () => {
|
|
4915
|
-
x.autoAudio = !x.autoAudio, x.autoAudio ||
|
|
4916
|
-
},
|
|
4917
|
-
|
|
4918
|
-
},
|
|
4919
|
-
if (
|
|
4907
|
+
x.autoAudio = !x.autoAudio, x.autoAudio || P();
|
|
4908
|
+
}, S = (z) => {
|
|
4909
|
+
F("sender", z.text);
|
|
4910
|
+
}, F = async (z, D) => {
|
|
4911
|
+
if (z == "sender") {
|
|
4920
4912
|
if (x.loading) return;
|
|
4921
|
-
|
|
4922
|
-
const
|
|
4923
|
-
...
|
|
4913
|
+
P(), v.value = !1;
|
|
4914
|
+
const G = {
|
|
4915
|
+
...Su(),
|
|
4924
4916
|
content: D
|
|
4925
|
-
},
|
|
4917
|
+
}, Y = {
|
|
4926
4918
|
...ue(),
|
|
4927
4919
|
loading: !0
|
|
4928
4920
|
};
|
|
4929
|
-
d.value.push(
|
|
4921
|
+
d.value.push(G), d.value.push(Y), s.value = Y, Pe(D);
|
|
4930
4922
|
}
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
}, O = async (F, D) => {
|
|
4936
|
-
var Z, Q;
|
|
4937
|
-
if (console.log("chatEmitFn", F, D), F == "regenerate" && D) {
|
|
4923
|
+
z == "stopMsg" && pe(), z == "upload" && await p();
|
|
4924
|
+
}, O = async (z, D) => {
|
|
4925
|
+
var G, Y;
|
|
4926
|
+
if (z == "regenerate" && D) {
|
|
4938
4927
|
if (x.loading) return;
|
|
4939
|
-
if (
|
|
4940
|
-
const au = { queryId: D.queryId }, [U,
|
|
4941
|
-
if (
|
|
4928
|
+
if (P(), D.queryId) {
|
|
4929
|
+
const au = { queryId: D.queryId }, [U, Tu] = await Si(au).run();
|
|
4930
|
+
if (U) return;
|
|
4942
4931
|
}
|
|
4943
4932
|
D.queryId = "", D.think = "", D.thinkTime = 0, D.intention = "", D.content = "", D.audioStatus = "normal", D.file = [], D.urls = [], D.havePlayAutoAudio = !1, D.saved = !1, D.loading = !0, s.value = D;
|
|
4944
|
-
const B = d.value.findIndex((au) => au.id == D.id), cu = (
|
|
4945
|
-
|
|
4933
|
+
const B = d.value.findIndex((au) => au.id == D.id), cu = (G = d.value[B - 1]) == null ? void 0 : G.content;
|
|
4934
|
+
Pe(cu);
|
|
4946
4935
|
}
|
|
4947
|
-
if (
|
|
4948
|
-
const B = D.item, cu = d.value.findIndex((
|
|
4936
|
+
if (z == "saveKnowledgebase") {
|
|
4937
|
+
const B = D.item, cu = d.value.findIndex((Tu) => Tu.id == B.id), au = (Y = d.value[cu - 1]) == null ? void 0 : Y.content;
|
|
4938
|
+
await p({
|
|
4949
4939
|
currentItem: B,
|
|
4950
4940
|
sendVal: au.slice(0, 20),
|
|
4951
4941
|
// 知识库标题限制长度
|
|
4952
4942
|
dom: D.dom
|
|
4953
|
-
});
|
|
4954
|
-
console.log("senderEmit-upload", U), U && (B.saved = !0, B.queryId && vi({ QueryId: B.queryId }).run());
|
|
4943
|
+
}) && (B.saved = !0, B.queryId && vi({ QueryId: B.queryId }).run());
|
|
4955
4944
|
}
|
|
4956
|
-
|
|
4957
|
-
}, N = (
|
|
4958
|
-
n("toApp",
|
|
4959
|
-
}, H = (
|
|
4960
|
-
c.value =
|
|
4945
|
+
z == "reference" && (s.value = D, a.value = "reference"), z == "play" && (D.data.audioStatus == "normal" ? (P(), E(0, D.data)) : (s.value && (s.value.audioStatus = "normal"), P())), z == "preview" && H(D);
|
|
4946
|
+
}, N = (z) => {
|
|
4947
|
+
n("toApp", z);
|
|
4948
|
+
}, H = (z) => {
|
|
4949
|
+
c.value = z, Ae(() => {
|
|
4961
4950
|
var D;
|
|
4962
4951
|
(D = i.value) == null || D.preview();
|
|
4963
4952
|
});
|
|
4964
|
-
}, eu = (
|
|
4965
|
-
|
|
4953
|
+
}, eu = (z) => {
|
|
4954
|
+
P(), a.value = "history";
|
|
4966
4955
|
}, Eu = () => {
|
|
4967
4956
|
a.value = "";
|
|
4968
|
-
}, qe = (
|
|
4957
|
+
}, qe = (z) => {
|
|
4969
4958
|
const D = {
|
|
4970
|
-
query:
|
|
4959
|
+
query: z,
|
|
4971
4960
|
deepThinkFlag: x.deepseek ? "1" : "0",
|
|
4972
4961
|
// project: getProjectInfo().id,
|
|
4973
4962
|
isInnerSearch: "0",
|
|
@@ -4977,56 +4966,56 @@ const Dc = () => {
|
|
|
4977
4966
|
isGlobalSearch: "0"
|
|
4978
4967
|
//是否搜索全网(0否1是)
|
|
4979
4968
|
};
|
|
4980
|
-
return o.value || (o.value = (/* @__PURE__ */ new Date()).getTime()), D.chatId = o.value, x.searchType == "0" && (D.isInnerSearch = "1"), x.searchType == "1" && (D.isKnowledgeSearch = "1", D.foldId = x.folderId == x.allKnowId ? "" : x.folderId), x.searchType == "2" && (D.isGlobalSearch = "1"),
|
|
4969
|
+
return o.value || (o.value = (/* @__PURE__ */ new Date()).getTime()), D.chatId = o.value, x.searchType == "0" && (D.isInnerSearch = "1"), x.searchType == "1" && (D.isKnowledgeSearch = "1", D.foldId = x.folderId == x.allKnowId ? "" : x.folderId), x.searchType == "2" && (D.isGlobalSearch = "1"), JSON.stringify(D);
|
|
4981
4970
|
}, Gt = () => {
|
|
4982
|
-
const
|
|
4971
|
+
const z = {
|
|
4983
4972
|
// Authorization: `Bearer ${getToken()}`,
|
|
4984
4973
|
"Content-Type": "application/json",
|
|
4985
4974
|
Timezone: dt.tz.guess()
|
|
4986
4975
|
};
|
|
4987
|
-
return re() && (
|
|
4976
|
+
return re() && (z.Authorization = `Bearer ${re()}`), z;
|
|
4988
4977
|
};
|
|
4989
4978
|
let he = "";
|
|
4990
|
-
const
|
|
4979
|
+
const Pe = (z) => {
|
|
4991
4980
|
x.loading = !0, _u();
|
|
4992
4981
|
const D = new tu(`${st().baseURL}${Lc}?project=${lt().id}`, {
|
|
4993
4982
|
method: "POST",
|
|
4994
4983
|
// 使用 POST 请求
|
|
4995
4984
|
headers: Gt(),
|
|
4996
|
-
payload: qe(
|
|
4985
|
+
payload: qe(z),
|
|
4997
4986
|
// POST 请求体
|
|
4998
4987
|
//重连时间间隔,单位:毫秒,默认45000毫秒,这里设置为10分钟
|
|
4999
4988
|
heartbeatTimeout: 10 * 60 * 1e3
|
|
5000
4989
|
});
|
|
5001
4990
|
he = $u();
|
|
5002
|
-
const
|
|
5003
|
-
D.onmessage = (
|
|
5004
|
-
if (
|
|
5005
|
-
if (
|
|
5006
|
-
D.close(),
|
|
4991
|
+
const G = he;
|
|
4992
|
+
D.onmessage = (Y) => {
|
|
4993
|
+
if (G != he) return;
|
|
4994
|
+
if (Y.data == "[DONE]") {
|
|
4995
|
+
D.close(), x.loading = !1, s.value.loading = !1, x.autoAudio && s.value.content && s.value.audioStatus != "normal" && E(1, s.value, ""), _u();
|
|
5007
4996
|
return;
|
|
5008
4997
|
}
|
|
5009
|
-
const B = JSON.parse(
|
|
5010
|
-
if (s.value.intention || (s.value.intention = B.intention, s.value.showSave = !
|
|
5011
|
-
if (
|
|
5012
|
-
const cu = (/* @__PURE__ */ new Date()).getTime() -
|
|
5013
|
-
|
|
4998
|
+
const B = JSON.parse(Y.data);
|
|
4999
|
+
if (s.value.intention || (s.value.intention = B.intention, s.value.showSave = !A.value.includes(B.intention)), B.type == "queryId" && (s.value.queryId || (s.value.queryId = B.content)), B.type == "think" && (s.value.think || (R = (/* @__PURE__ */ new Date()).getTime()), s.value.think = s.value.think + B.content), B.type == "text") {
|
|
5000
|
+
if (R && s.value.think && !s.value.content) {
|
|
5001
|
+
const cu = (/* @__PURE__ */ new Date()).getTime() - R;
|
|
5002
|
+
R = 0, s.value.thinkTime = parseInt(`${cu / 1e3}`);
|
|
5014
5003
|
}
|
|
5015
|
-
s.value.content = s.value.content + B.content, s.value.showSave, x.autoAudio && (
|
|
5004
|
+
s.value.content = s.value.content + B.content, s.value.showSave, x.autoAudio && (s.value.audioStatus == "normal" ? E(1, s.value, s.value.content) : E(1, s.value, B.content));
|
|
5016
5005
|
}
|
|
5017
5006
|
B.type == "file" && s.value.file.push(B), B.type == "url" && (B.webUrl && (B.webUrl = decodeURIComponent(B.webUrl)), B.name = B.content, s.value.file.push(B), s.value.urls.push(B)), _u();
|
|
5018
|
-
}, D.onerror = (
|
|
5019
|
-
|
|
5007
|
+
}, D.onerror = (Y) => {
|
|
5008
|
+
D.close(), x.loading = !1, s.value.content = I("连接错误");
|
|
5020
5009
|
}, f.value = D;
|
|
5021
5010
|
}, pe = () => {
|
|
5022
|
-
var
|
|
5023
|
-
if ((
|
|
5024
|
-
const D = (/* @__PURE__ */ new Date()).getTime() -
|
|
5025
|
-
|
|
5011
|
+
var z;
|
|
5012
|
+
if ((z = f.value) == null || z.close(), x.loading = !1, Kt(), s.value && (s.value.loading = !1, s.value.think && !s.value.thinkTime)) {
|
|
5013
|
+
const D = (/* @__PURE__ */ new Date()).getTime() - R;
|
|
5014
|
+
R = 0, s.value.thinkTime = parseInt(`${D / 1e3}`);
|
|
5026
5015
|
}
|
|
5027
5016
|
}, Kt = async () => {
|
|
5028
5017
|
if (s.value && s.value.loading && s.value.queryId && s.value.content) {
|
|
5029
|
-
let
|
|
5018
|
+
let z = s.value.file ? s.value.file.filter((B) => B.type != "url") : [];
|
|
5030
5019
|
const D = {
|
|
5031
5020
|
chat_id: o.value,
|
|
5032
5021
|
//会话id
|
|
@@ -5049,7 +5038,7 @@ const Dc = () => {
|
|
|
5049
5038
|
web_url: B.webUrl
|
|
5050
5039
|
})) : [],
|
|
5051
5040
|
//
|
|
5052
|
-
files:
|
|
5041
|
+
files: z.map((B) => ({
|
|
5053
5042
|
name: B.name,
|
|
5054
5043
|
summary: B.summary,
|
|
5055
5044
|
url: B.url
|
|
@@ -5057,70 +5046,70 @@ const Dc = () => {
|
|
|
5057
5046
|
//
|
|
5058
5047
|
};
|
|
5059
5048
|
D.searchType == "1" && (D.fold_id = x.folderId == x.allKnowId ? "" : x.folderId);
|
|
5060
|
-
const [
|
|
5061
|
-
if (
|
|
5049
|
+
const [G, Y] = await Ci(D).run();
|
|
5050
|
+
if (G) return;
|
|
5062
5051
|
}
|
|
5063
5052
|
};
|
|
5064
5053
|
return e({
|
|
5065
|
-
senderVal: (
|
|
5066
|
-
x.senderValue = `${x.senderValue}${
|
|
5054
|
+
senderVal: (z) => {
|
|
5055
|
+
x.senderValue = `${x.senderValue}${z}`;
|
|
5067
5056
|
},
|
|
5068
5057
|
outSendMsg: () => {
|
|
5069
|
-
x.senderValue &&
|
|
5058
|
+
x.senderValue && F("sender", x.senderValue);
|
|
5070
5059
|
},
|
|
5071
5060
|
hideFn: K,
|
|
5072
5061
|
playAudioFn: () => {
|
|
5073
|
-
const
|
|
5062
|
+
const z = d.value.findLastIndex((G) => G.role == "ai"), D = d.value[z] ? d.value[z] : null;
|
|
5074
5063
|
D && E(0, D);
|
|
5075
5064
|
},
|
|
5076
|
-
pauseAudio:
|
|
5065
|
+
pauseAudio: P,
|
|
5077
5066
|
stopMsg: pe,
|
|
5078
|
-
openNewChat:
|
|
5079
|
-
}), (
|
|
5080
|
-
const
|
|
5081
|
-
return Au((
|
|
5082
|
-
a.value ? (
|
|
5083
|
-
a.value == "reference" ? (
|
|
5067
|
+
openNewChat: Iu
|
|
5068
|
+
}), (z, D) => {
|
|
5069
|
+
const G = Wt("dasLoading");
|
|
5070
|
+
return Au((w(), q("div", Ec, [
|
|
5071
|
+
a.value ? (w(), q("div", Fc, [
|
|
5072
|
+
a.value == "reference" ? (w(), X(ic, {
|
|
5084
5073
|
key: 0,
|
|
5085
5074
|
item: s.value,
|
|
5086
5075
|
onPreview: H,
|
|
5087
5076
|
onBack: Eu,
|
|
5088
5077
|
onToApp: N
|
|
5089
5078
|
}, null, 8, ["item"])) : $("", !0),
|
|
5090
|
-
a.value == "history" ? (
|
|
5079
|
+
a.value == "history" ? (w(), X(Ac, {
|
|
5091
5080
|
key: 1,
|
|
5092
5081
|
chatId: o.value,
|
|
5093
|
-
onRecord:
|
|
5082
|
+
onRecord: zu,
|
|
5094
5083
|
onBack: Eu
|
|
5095
5084
|
}, null, 8, ["chatId"])) : $("", !0)
|
|
5096
5085
|
])) : $("", !0),
|
|
5097
|
-
|
|
5098
|
-
|
|
5086
|
+
g("div", wc, [
|
|
5087
|
+
g("div", Sc, [
|
|
5099
5088
|
j(Gi, {
|
|
5100
|
-
onBack:
|
|
5089
|
+
onBack: Iu,
|
|
5101
5090
|
listLength: d.value.length
|
|
5102
5091
|
}, null, 8, ["listLength"])
|
|
5103
5092
|
]),
|
|
5104
|
-
|
|
5105
|
-
j(
|
|
5093
|
+
g("div", zc, [
|
|
5094
|
+
j(C(vu), {
|
|
5106
5095
|
placement: "top",
|
|
5107
5096
|
type: "button"
|
|
5108
5097
|
}, {
|
|
5109
5098
|
content: J(() => [
|
|
5110
|
-
|
|
5099
|
+
g("div", null, V(C(I)("自动播报")), 1)
|
|
5111
5100
|
]),
|
|
5112
5101
|
default: J(() => [
|
|
5113
|
-
|
|
5102
|
+
g("div", {
|
|
5114
5103
|
onClick: L,
|
|
5115
5104
|
style: { "margin-right": "16px" },
|
|
5116
5105
|
class: "ai-top-right-icon"
|
|
5117
5106
|
}, [
|
|
5118
|
-
|
|
5107
|
+
C(x).autoAudio ? (w(), X(C(r0), {
|
|
5119
5108
|
key: 0,
|
|
5120
5109
|
customSize: "20",
|
|
5121
5110
|
iconColor: "#006DF1"
|
|
5122
5111
|
})) : $("", !0),
|
|
5123
|
-
|
|
5112
|
+
C(x).autoAudio ? $("", !0) : (w(), X(C(o0), {
|
|
5124
5113
|
key: 1,
|
|
5125
5114
|
customSize: "20",
|
|
5126
5115
|
iconColor: "#333333"
|
|
@@ -5129,19 +5118,19 @@ const Dc = () => {
|
|
|
5129
5118
|
]),
|
|
5130
5119
|
_: 1
|
|
5131
5120
|
}),
|
|
5132
|
-
j(
|
|
5121
|
+
j(C(vu), {
|
|
5133
5122
|
placement: "top",
|
|
5134
5123
|
type: "button"
|
|
5135
5124
|
}, {
|
|
5136
5125
|
content: J(() => [
|
|
5137
|
-
|
|
5126
|
+
g("div", null, V(C(I)("历史会话")), 1)
|
|
5138
5127
|
]),
|
|
5139
5128
|
default: J(() => [
|
|
5140
|
-
|
|
5129
|
+
g("div", {
|
|
5141
5130
|
onClick: eu,
|
|
5142
5131
|
class: "ai-top-right-icon"
|
|
5143
5132
|
}, [
|
|
5144
|
-
j(
|
|
5133
|
+
j(C(i0), {
|
|
5145
5134
|
customSize: "20",
|
|
5146
5135
|
iconColor: "#666666"
|
|
5147
5136
|
})
|
|
@@ -5151,8 +5140,8 @@ const Dc = () => {
|
|
|
5151
5140
|
})
|
|
5152
5141
|
])
|
|
5153
5142
|
]),
|
|
5154
|
-
d.value.length ? (
|
|
5155
|
-
j(
|
|
5143
|
+
d.value.length ? (w(), q("div", Ic, [
|
|
5144
|
+
j(C(we), {
|
|
5156
5145
|
"wrap-class": "das-ai-wrap-class",
|
|
5157
5146
|
onScroll: fu
|
|
5158
5147
|
}, {
|
|
@@ -5165,59 +5154,59 @@ const Dc = () => {
|
|
|
5165
5154
|
_: 1
|
|
5166
5155
|
})
|
|
5167
5156
|
])) : $("", !0),
|
|
5168
|
-
d.value.length ? $("", !0) : (
|
|
5157
|
+
d.value.length ? $("", !0) : (w(), X(ki, {
|
|
5169
5158
|
key: 2,
|
|
5170
5159
|
list: _.value,
|
|
5171
|
-
onClick:
|
|
5160
|
+
onClick: S
|
|
5172
5161
|
}, null, 8, ["list"])),
|
|
5173
|
-
d.value.length ? (
|
|
5174
|
-
D[0] || (D[0] =
|
|
5162
|
+
d.value.length ? (w(), q("div", Tc, [
|
|
5163
|
+
D[0] || (D[0] = g("div", { class: "chat-new-top-mask" }, null, -1)),
|
|
5175
5164
|
j(fi, { onAddNewEmit: fe })
|
|
5176
5165
|
])) : $("", !0),
|
|
5177
|
-
|
|
5178
|
-
|
|
5166
|
+
g("div", Mc, [
|
|
5167
|
+
g("div", Oc, [
|
|
5179
5168
|
j(ci, {
|
|
5180
5169
|
isNew: !d.value.length,
|
|
5181
|
-
onSenderEmit:
|
|
5170
|
+
onSenderEmit: F
|
|
5182
5171
|
}, null, 8, ["isNew"])
|
|
5183
5172
|
]),
|
|
5184
|
-
D[1] || (D[1] =
|
|
5173
|
+
D[1] || (D[1] = g("div", { class: "das-ai-chat-input-tip" }, null, -1))
|
|
5185
5174
|
]),
|
|
5186
|
-
j(
|
|
5187
|
-
j(
|
|
5175
|
+
j(C(k)),
|
|
5176
|
+
j(C(c0), {
|
|
5188
5177
|
ref_key: "dasPreviewRef",
|
|
5189
5178
|
ref: i,
|
|
5190
5179
|
"file-url": c.value
|
|
5191
5180
|
}, null, 8, ["file-url"]),
|
|
5192
|
-
|
|
5193
|
-
src:
|
|
5181
|
+
g("audio", {
|
|
5182
|
+
src: C(M),
|
|
5194
5183
|
class: "ai-audio-class",
|
|
5195
5184
|
ref_key: "aiAudioRef",
|
|
5196
5185
|
ref: b,
|
|
5197
|
-
muted: !
|
|
5186
|
+
muted: !C(m),
|
|
5198
5187
|
autoplay: ""
|
|
5199
5188
|
}, null, 8, Nc)
|
|
5200
5189
|
])), [
|
|
5201
|
-
[
|
|
5190
|
+
[G, l.value]
|
|
5202
5191
|
]);
|
|
5203
5192
|
};
|
|
5204
5193
|
}
|
|
5205
|
-
}), qc = /* @__PURE__ */ iu(Bc, [["__scopeId", "data-v-2d50bbce"]]),
|
|
5194
|
+
}), qc = /* @__PURE__ */ iu(Bc, [["__scopeId", "data-v-2d50bbce"]]), Pc = { class: "das-ai-panel-div 2" }, Rc = { class: "das-ai-panel-coantainer-header" }, jc = { class: "das-ai-panel-header-title" }, Hc = { class: "das-ai-panel-coantainer-body" }, $c = /* @__PURE__ */ ou({
|
|
5206
5195
|
__name: "index",
|
|
5207
5196
|
emits: ["confirm", "toApp", "getStatus"],
|
|
5208
5197
|
setup(u, { expose: e, emit: t }) {
|
|
5209
|
-
const n = t, r = e0(), o =
|
|
5198
|
+
const n = t, r = e0(), o = T(), c = T(0), i = T(), a = T(!1);
|
|
5210
5199
|
bu(
|
|
5211
5200
|
() => r == null ? void 0 : r.path,
|
|
5212
|
-
(m,
|
|
5213
|
-
|
|
5201
|
+
(m, M) => {
|
|
5202
|
+
f();
|
|
5214
5203
|
}
|
|
5215
5204
|
), qu(() => {
|
|
5216
5205
|
setTimeout(() => {
|
|
5217
5206
|
Ae(() => {
|
|
5218
5207
|
let m = document.getElementsByClassName("das-web-app-header")[0];
|
|
5219
|
-
m && (c.value = m.clientHeight), m && !i.value && (i.value = C0((
|
|
5220
|
-
c.value =
|
|
5208
|
+
m && (c.value = m.clientHeight), m && !i.value && (i.value = C0((M) => {
|
|
5209
|
+
c.value = M.height;
|
|
5221
5210
|
}, m));
|
|
5222
5211
|
});
|
|
5223
5212
|
}, 1e3);
|
|
@@ -5226,7 +5215,7 @@ const Dc = () => {
|
|
|
5226
5215
|
(m = i.value) == null || m.disconnect(), i.value = null;
|
|
5227
5216
|
});
|
|
5228
5217
|
const s = (m) => {
|
|
5229
|
-
|
|
5218
|
+
n("toApp", m);
|
|
5230
5219
|
}, l = () => {
|
|
5231
5220
|
a.value || (a.value = !0, n("getStatus", !0));
|
|
5232
5221
|
}, f = () => {
|
|
@@ -5261,34 +5250,34 @@ const Dc = () => {
|
|
|
5261
5250
|
(m = o.value) == null || m.outSendMsg();
|
|
5262
5251
|
},
|
|
5263
5252
|
senderVal: (m) => {
|
|
5264
|
-
var
|
|
5265
|
-
(
|
|
5253
|
+
var M;
|
|
5254
|
+
(M = o.value) == null || M.senderVal(m);
|
|
5266
5255
|
},
|
|
5267
5256
|
clearSenderVal: () => {
|
|
5268
5257
|
x.senderValue = "";
|
|
5269
5258
|
},
|
|
5270
5259
|
openPanel: l,
|
|
5271
5260
|
closePanel: f
|
|
5272
|
-
}), (m,
|
|
5261
|
+
}), (m, M) => (w(), q("div", Pc, [
|
|
5273
5262
|
j(Xt, { name: "das-ai-panel" }, {
|
|
5274
5263
|
default: J(() => [
|
|
5275
|
-
Au(
|
|
5264
|
+
Au(g("div", {
|
|
5276
5265
|
class: "das-ai-panel-coantainer",
|
|
5277
5266
|
style: Yt({ top: `${c.value}px` })
|
|
5278
5267
|
}, [
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5268
|
+
g("div", Rc, [
|
|
5269
|
+
g("div", jc, V(C(I)("AI助手")), 1),
|
|
5270
|
+
g("div", {
|
|
5282
5271
|
onClick: f,
|
|
5283
5272
|
class: "das-ai-panel-header-close"
|
|
5284
5273
|
}, [
|
|
5285
|
-
j(
|
|
5274
|
+
j(C(t0), {
|
|
5286
5275
|
size: "medium",
|
|
5287
5276
|
iconColor: "#666666"
|
|
5288
5277
|
})
|
|
5289
5278
|
])
|
|
5290
5279
|
]),
|
|
5291
|
-
|
|
5280
|
+
g("div", Hc, [
|
|
5292
5281
|
j(qc, {
|
|
5293
5282
|
ref_key: "dasAiVueRef",
|
|
5294
5283
|
ref: o,
|
|
@@ -5398,7 +5387,7 @@ const Dc = () => {
|
|
|
5398
5387
|
}
|
|
5399
5388
|
};
|
|
5400
5389
|
n0(Uc);
|
|
5401
|
-
const Oa = () =>
|
|
5390
|
+
const Oa = () => T(null), Na = u0(Vc);
|
|
5402
5391
|
export {
|
|
5403
5392
|
Na as D,
|
|
5404
5393
|
iu as _,
|