@das-fed/upf-ui 6.4.0-dev.215 → 6.4.0-dev.216
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-B4pMosXu.js +143 -0
- package/packages/business-components/ai-panel/index-B4pMosXu.js.gz +0 -0
- package/packages/business-components/ai-panel/{index-BybM3Q9u.js → index-BgyMyjJo.js} +711 -700
- package/packages/business-components/ai-panel/index-BgyMyjJo.js.gz +0 -0
- package/packages/business-components/ai-panel/{index-CwdJKHy0.js → index-Bw7rNZmA.js} +9 -9
- package/packages/business-components/ai-panel/index-Bw7rNZmA.js.gz +0 -0
- package/packages/business-components/ai-panel/index.js +1 -1
- package/packages/business-components/device-panel/index.js +8873 -8773
- package/packages/business-components/device-panel/index.js.gz +0 -0
- package/packages/business-components/echarts/index.js +2056 -2049
- 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 +130 -128
- package/packages/business-components/process-table/index.js.gz +0 -0
- package/packages/business-components/urgent-panel/index.js +904 -896
- package/packages/business-components/urgent-panel/index.js.gz +0 -0
- package/packages/business-components/user-org-dialog/index.js +249 -246
- package/packages/business-components/user-org-dialog/index.js.gz +0 -0
- package/packages/business-components/video-dialog/index.js +1 -0
- package/packages/business-components/video-dialog/index.js.gz +0 -0
- package/packages/components/autocomplete/index.js +12 -6
- 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 +63 -61
- package/packages/components/dimple-layout/index.js.gz +0 -0
- package/packages/components/dropdown/index.js +23 -22
- package/packages/components/dropdown/index.js.gz +0 -0
- package/packages/components/edit-table/index.js +224 -223
- package/packages/components/edit-table/index.js.gz +0 -0
- package/packages/components/error-overlay-model/index.js +44 -42
- package/packages/components/error-overlay-model/index.js.gz +0 -0
- package/packages/components/form-item/index.js +67 -63
- 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.js +51 -51
- package/packages/components/input/index.js.gz +0 -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 +834 -832
- package/packages/components/live-player/index.js.gz +0 -0
- package/packages/components/map/index.js +437 -431
- 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 +4586 -4556
- 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 +10 -6
- package/packages/components/select-list/index.js.gz +0 -0
- package/packages/components/special-range-picker-month/index.js +16 -14
- package/packages/components/special-range-picker-month/index.js.gz +0 -0
- package/packages/components/special-range-picker-year/index.js +53 -51
- 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 +102 -101
- package/packages/components/split-panel/index.js.gz +0 -0
- package/packages/components/table/index.js +604 -599
- 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 +182 -173
- 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 +1240 -1208
- package/packages/components/tree-v2/index.js.gz +0 -0
- package/packages/business-components/ai-panel/index-BybM3Q9u.js.gz +0 -0
- package/packages/business-components/ai-panel/index-CgWRv2Ge.js +0 -142
- package/packages/business-components/ai-panel/index-CgWRv2Ge.js.gz +0 -0
- package/packages/business-components/ai-panel/index-CwdJKHy0.js.gz +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineAsyncComponent as ot, ref as
|
|
1
|
+
import { defineAsyncComponent as ot, ref as M, watch as bu, h as it, reactive as ct, defineComponent as ou, onMounted as qu, openBlock as S, createElementBlock as q, createElementVNode as k, toDisplayString as V, computed as su, createVNode as j, unref as v, createCommentVNode as $, normalizeClass as Ju, createBlock as Y, 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 Pe } 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 Ru } 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-B4pMosXu.js")), D0 = () => {
|
|
48
|
+
const u = M(), e = M(!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), console.log("setDeepseek", u);
|
|
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, t.source = this;
|
|
126
|
+
this.debug && console.debug(t), 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 && console.debug(t);
|
|
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 = M();
|
|
213
213
|
return qu(() => {
|
|
214
|
-
}), (n, r) => (
|
|
214
|
+
}), (n, r) => (S(), q("div", {
|
|
215
215
|
ref_key: "userChatRef",
|
|
216
216
|
ref: t,
|
|
217
217
|
class: "das-ai-use-chat"
|
|
218
218
|
}, [
|
|
219
|
-
|
|
219
|
+
k("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 C = function(z) {
|
|
268
|
+
var w = h()(z);
|
|
269
|
+
return d("cut"), w;
|
|
270
|
+
}, A = C;
|
|
271
|
+
function y(L) {
|
|
272
|
+
var z = document.documentElement.getAttribute("dir") === "rtl", w = document.createElement("textarea");
|
|
273
|
+
w.style.fontSize = "12pt", w.style.border = "0", w.style.padding = "0", w.style.margin = "0", w.style.position = "absolute", w.style[z ? "right" : "left"] = "-9999px";
|
|
274
274
|
var O = window.pageYOffset || document.documentElement.scrollTop;
|
|
275
|
-
return
|
|
275
|
+
return w.style.top = "".concat(O, "px"), w.setAttribute("readonly", ""), w.value = L, w;
|
|
276
276
|
}
|
|
277
|
-
var
|
|
278
|
-
var O =
|
|
279
|
-
|
|
277
|
+
var g = function(z, w) {
|
|
278
|
+
var O = y(z);
|
|
279
|
+
w.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(z) {
|
|
283
|
+
var w = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
284
284
|
container: document.body
|
|
285
285
|
}, O = "";
|
|
286
|
-
return typeof
|
|
286
|
+
return typeof z == "string" ? O = g(z, w) : z instanceof HTMLInputElement && !["text", "search", "url", "tel", "password"].includes(z == null ? void 0 : z.type) ? O = g(z.value, w) : (O = h()(z), 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(w) {
|
|
291
|
+
return typeof w;
|
|
292
|
+
} : m = function(w) {
|
|
293
|
+
return w && typeof Symbol == "function" && w.constructor === Symbol && w !== Symbol.prototype ? "symbol" : typeof w;
|
|
294
294
|
}, m(L);
|
|
295
295
|
}
|
|
296
|
-
var
|
|
297
|
-
var
|
|
296
|
+
var T = function() {
|
|
297
|
+
var z = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, w = z.action, O = w === void 0 ? "copy" : w, N = z.container, H = z.target, eu = z.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" ? A(H) : b(H, {
|
|
314
314
|
container: N
|
|
315
315
|
});
|
|
316
|
-
}, E =
|
|
317
|
-
function
|
|
316
|
+
}, E = T;
|
|
317
|
+
function R(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" ? R = function(w) {
|
|
320
|
+
return typeof w;
|
|
321
|
+
} : R = function(w) {
|
|
322
|
+
return w && typeof Symbol == "function" && w.constructor === Symbol && w !== Symbol.prototype ? "symbol" : typeof w;
|
|
323
|
+
}, R(L);
|
|
324
324
|
}
|
|
325
|
-
function
|
|
326
|
-
if (!(L instanceof
|
|
325
|
+
function P(L, z) {
|
|
326
|
+
if (!(L instanceof z))
|
|
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, z) {
|
|
330
|
+
for (var w = 0; w < z.length; w++) {
|
|
331
|
+
var O = z[w];
|
|
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, z, w) {
|
|
336
|
+
return K(L.prototype, z), K(L, w), L;
|
|
337
337
|
}
|
|
338
|
-
function _u(L,
|
|
339
|
-
if (typeof
|
|
338
|
+
function _u(L, z) {
|
|
339
|
+
if (typeof z != "function" && z !== 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(z && z.prototype, { constructor: { value: L, writable: !0, configurable: !0 } }), z && gu(L, z);
|
|
342
342
|
}
|
|
343
|
-
function gu(L,
|
|
343
|
+
function gu(L, z) {
|
|
344
344
|
return gu = Object.setPrototypeOf || function(O, N) {
|
|
345
345
|
return O.__proto__ = N, O;
|
|
346
|
-
}, gu(L,
|
|
346
|
+
}, gu(L, z);
|
|
347
347
|
}
|
|
348
|
-
function
|
|
349
|
-
var
|
|
348
|
+
function Su(L) {
|
|
349
|
+
var z = ue();
|
|
350
350
|
return function() {
|
|
351
|
-
var O =
|
|
352
|
-
if (
|
|
353
|
-
var H =
|
|
351
|
+
var O = Iu(L), N;
|
|
352
|
+
if (z) {
|
|
353
|
+
var H = Iu(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, z) {
|
|
361
|
+
return z && (R(z) === "object" || typeof z == "function") ? z : zu(L);
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function zu(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 Iu(L) {
|
|
379
|
+
return Iu = Object.setPrototypeOf ? Object.getPrototypeOf : function(w) {
|
|
380
|
+
return w.__proto__ || Object.getPrototypeOf(w);
|
|
381
|
+
}, Iu(L);
|
|
382
382
|
}
|
|
383
|
-
function ju(L,
|
|
384
|
-
var
|
|
385
|
-
if (
|
|
386
|
-
return
|
|
383
|
+
function ju(L, z) {
|
|
384
|
+
var w = "data-clipboard-".concat(L);
|
|
385
|
+
if (z.hasAttribute(w))
|
|
386
|
+
return z.getAttribute(w);
|
|
387
387
|
}
|
|
388
|
-
var
|
|
389
|
-
_u(
|
|
390
|
-
var
|
|
391
|
-
function
|
|
388
|
+
var Tu = /* @__PURE__ */ function(L) {
|
|
389
|
+
_u(w, L);
|
|
390
|
+
var z = Su(w);
|
|
391
|
+
function w(O, N) {
|
|
392
392
|
var H;
|
|
393
|
-
return
|
|
393
|
+
return P(this, w), H = z.call(this), H.resolveOptions(N), H.listenClick(O), H;
|
|
394
394
|
}
|
|
395
|
-
return du(
|
|
395
|
+
return du(w, [{
|
|
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 = R(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 A(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
|
+
}]), w;
|
|
510
|
+
}(s()), fe = Tu;
|
|
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, C, A) {
|
|
538
|
+
var y = f.apply(this, arguments);
|
|
539
|
+
return _.addEventListener(d, y, A), {
|
|
540
540
|
destroy: function() {
|
|
541
|
-
_.removeEventListener(d,
|
|
541
|
+
_.removeEventListener(d, y, A);
|
|
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, C, A) {
|
|
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(y) {
|
|
547
|
+
return s(y, h, d, C, A);
|
|
548
548
|
}));
|
|
549
549
|
}
|
|
550
|
-
function f(_, h, d,
|
|
551
|
-
return function(
|
|
552
|
-
|
|
550
|
+
function f(_, h, d, C) {
|
|
551
|
+
return function(A) {
|
|
552
|
+
A.delegateTarget = a(A.target, h), A.delegateTarget && C.call(_, A);
|
|
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, C, A) {
|
|
581
|
+
if (!d && !C && !A)
|
|
582
582
|
throw new Error("Missing required arguments");
|
|
583
|
-
if (!a.string(
|
|
583
|
+
if (!a.string(C))
|
|
584
584
|
throw new TypeError("Second argument must be a String");
|
|
585
|
-
if (!a.fn(
|
|
585
|
+
if (!a.fn(A))
|
|
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, C, A);
|
|
589
589
|
if (a.nodeList(d))
|
|
590
|
-
return _(d,
|
|
590
|
+
return _(d, C, A);
|
|
591
591
|
if (a.string(d))
|
|
592
|
-
return h(d,
|
|
592
|
+
return h(d, C, A);
|
|
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, C, A) {
|
|
596
|
+
return d.addEventListener(C, A), {
|
|
597
597
|
destroy: function() {
|
|
598
|
-
d.removeEventListener(
|
|
598
|
+
d.removeEventListener(C, A);
|
|
599
599
|
}
|
|
600
600
|
};
|
|
601
601
|
}
|
|
602
|
-
function _(d,
|
|
603
|
-
return Array.prototype.forEach.call(d, function(
|
|
604
|
-
|
|
602
|
+
function _(d, C, A) {
|
|
603
|
+
return Array.prototype.forEach.call(d, function(y) {
|
|
604
|
+
y.addEventListener(C, A);
|
|
605
605
|
}), {
|
|
606
606
|
destroy: function() {
|
|
607
|
-
Array.prototype.forEach.call(d, function(
|
|
608
|
-
|
|
607
|
+
Array.prototype.forEach.call(d, function(y) {
|
|
608
|
+
y.removeEventListener(C, A);
|
|
609
609
|
});
|
|
610
610
|
}
|
|
611
611
|
};
|
|
612
612
|
}
|
|
613
|
-
function h(d,
|
|
614
|
-
return s(document.body, d,
|
|
613
|
+
function h(d, C, A) {
|
|
614
|
+
return s(document.body, d, C, A);
|
|
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, R0 = /:[0-9]*$/, P0 = /^(\/\/?(?!\/)[^\?\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 = P0.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 C = 0, A = d.length; C < A; C++) {
|
|
892
|
+
const y = d[C];
|
|
893
|
+
if (y && !y.match(Ue)) {
|
|
894
|
+
let g = "";
|
|
895
|
+
for (let p = 0, b = y.length; p < b; p++)
|
|
896
|
+
y.charCodeAt(p) > 127 ? g += "x" : g += y[p];
|
|
897
|
+
if (!g.match(Ue)) {
|
|
898
|
+
const p = d.slice(0, C), b = d.slice(C + 1), m = y.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 = R0.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 X;
|
|
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
|
+
})(X || (X = {}));
|
|
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 >= X.ZERO && u <= X.NINE;
|
|
990
990
|
}
|
|
991
991
|
function en(u) {
|
|
992
|
-
return u >=
|
|
992
|
+
return u >= X.UPPER_A && u <= X.UPPER_F || u >= X.LOWER_A && u <= X.LOWER_F;
|
|
993
993
|
}
|
|
994
994
|
function tn(u) {
|
|
995
|
-
return u >=
|
|
995
|
+
return u >= X.UPPER_A && u <= X.UPPER_Z || u >= X.LOWER_A && u <= X.LOWER_Z || Ce(u);
|
|
996
996
|
}
|
|
997
997
|
function nn(u) {
|
|
998
|
-
return u ===
|
|
998
|
+
return u === X.EQUALS || tn(u);
|
|
999
999
|
}
|
|
1000
|
-
var
|
|
1000
|
+
var W;
|
|
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
|
+
})(W || (W = {}));
|
|
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 = W.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 = W.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 W.EntityStart:
|
|
1030
|
+
return e.charCodeAt(t) === X.NUM ? (this.state = W.NumericStart, this.consumed += 1, this.stateNumericStart(e, t + 1)) : (this.state = W.NamedEntity, this.stateNamedEntity(e, t));
|
|
1031
|
+
case W.NumericStart:
|
|
1032
1032
|
return this.stateNumericStart(e, t);
|
|
1033
|
-
case
|
|
1033
|
+
case W.NumericDecimal:
|
|
1034
1034
|
return this.stateNumericDecimal(e, t);
|
|
1035
|
-
case
|
|
1035
|
+
case W.NumericHex:
|
|
1036
1036
|
return this.stateNumericHex(e, t);
|
|
1037
|
-
case
|
|
1037
|
+
case W.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) === X.LOWER_X ? (this.state = W.NumericHex, this.consumed += 1, this.stateNumericHex(e, t + 1)) : (this.state = W.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 === X.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 !== X.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 === X.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 W.NamedEntity:
|
|
1183
1183
|
return this.result !== 0 && (this.decodeMode !== yu.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
|
|
1184
|
-
case
|
|
1184
|
+
case W.NumericDecimal:
|
|
1185
1185
|
return this.emitNumericEntity(0, 2);
|
|
1186
|
-
case
|
|
1186
|
+
case W.NumericHex:
|
|
1187
1187
|
return this.emitNumericEntity(0, 3);
|
|
1188
|
-
case
|
|
1188
|
+
case W.NumericStart:
|
|
1189
1189
|
return (e = this.errors) === null || e === void 0 || e.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
1190
|
-
case
|
|
1190
|
+
case W.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 G(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: G,
|
|
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 Pu() {
|
|
1555
1555
|
this.rules = ae({}, mu);
|
|
1556
1556
|
}
|
|
1557
|
-
|
|
1557
|
+
Pu.prototype.renderAttrs = function(e) {
|
|
1558
1558
|
let t, n, r;
|
|
1559
1559
|
if (!e.attrs)
|
|
1560
1560
|
return "";
|
|
@@ -1562,7 +1562,7 @@ Ru.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
|
+
Pu.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 @@ Ru.prototype.renderToken = function(e, t, n) {
|
|
|
1577
1577
|
return o += c ? `>
|
|
1578
1578
|
` : ">", o;
|
|
1579
1579
|
};
|
|
1580
|
-
|
|
1580
|
+
Pu.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 @@ Ru.prototype.renderInline = function(u, e, t) {
|
|
|
1586
1586
|
}
|
|
1587
1587
|
return n;
|
|
1588
1588
|
};
|
|
1589
|
-
|
|
1589
|
+
Pu.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 @@ Ru.prototype.renderInlineAsText = function(u, e, t) {
|
|
|
1608
1608
|
}
|
|
1609
1609
|
return n;
|
|
1610
1610
|
};
|
|
1611
|
-
|
|
1611
|
+
Pu.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, C = u.md.normalizeLink(d);
|
|
1789
|
+
if (!u.md.validateLink(C))
|
|
1790
1790
|
continue;
|
|
1791
|
-
let
|
|
1792
|
-
s[h].schema ? s[h].schema === "mailto:" && !/^mailto:/i.test(
|
|
1793
|
-
const
|
|
1794
|
-
if (
|
|
1791
|
+
let A = s[h].text;
|
|
1792
|
+
s[h].schema ? s[h].schema === "mailto:" && !/^mailto:/i.test(A) ? A = u.md.normalizeLinkText("mailto:" + A).replace(/^mailto:/, "") : A = u.md.normalizeLinkText(A) : A = u.md.normalizeLinkText("http://" + A).replace(/^http:\/\//, "");
|
|
1793
|
+
const y = s[h].index;
|
|
1794
|
+
if (y > _) {
|
|
1795
1795
|
const m = new u.Token("text", "", 0);
|
|
1796
|
-
m.content = a.slice(_,
|
|
1796
|
+
m.content = a.slice(_, y), m.level = f, l.push(m);
|
|
1797
1797
|
}
|
|
1798
|
-
const
|
|
1799
|
-
|
|
1798
|
+
const g = new u.Token("link_open", "a", 1);
|
|
1799
|
+
g.attrs = [["href", C]], g.level = f++, g.markup = "linkify", g.info = "auto", l.push(g);
|
|
1800
1800
|
const p = new u.Token("text", "", 0);
|
|
1801
|
-
p.content =
|
|
1801
|
+
p.content = A, 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 Rn(u, e) {
|
|
1820
1820
|
return qn[e.toLowerCase()];
|
|
1821
1821
|
}
|
|
1822
|
-
function
|
|
1822
|
+
function Pn(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, Rn)), 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) && Pn(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 C = 32;
|
|
1875
1875
|
if (a < s)
|
|
1876
|
-
|
|
1876
|
+
C = 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
|
+
C = u[t].content.charCodeAt(0);
|
|
1881
1881
|
break;
|
|
1882
1882
|
}
|
|
1883
|
-
const
|
|
1884
|
-
if (p ? f = !1 :
|
|
1883
|
+
const A = Gu(d) || Zu(String.fromCharCode(d)), y = Gu(C) || Zu(String.fromCharCode(C)), g = Uu(d), p = Uu(C);
|
|
1884
|
+
if (p ? f = !1 : y && (g || A || (f = !1)), g ? _ = !1 : A && (p || y || (_ = !1)), C === 34 && l[0] === '"' && d >= 48 && d <= 57 && (_ = f = !1), f && _ && (f = A, _ = y), !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, T;
|
|
1896
|
+
h ? (m = e.md.options.quotes[2], T = e.md.options.quotes[3]) : (m = e.md.options.quotes[0], T = e.md.options.quotes[1]), o.content = ee(o.content, l.index, T), u[b.token].content = ee(
|
|
1897
1897
|
u[b.token].content,
|
|
1898
1898
|
b.pos,
|
|
1899
1899
|
m
|
|
1900
|
-
), a +=
|
|
1900
|
+
), a += T.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 (G(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 (!G(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 (!G(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 (G(_))
|
|
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 && !G(i) || c === 45 && G(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 && !G(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
|
|
2088
|
+
const h = u.md.block.ruler.getRules("blockquote"), d = u.push("table_open", "table", 1), C = [e, 0];
|
|
2089
|
+
d.map = C;
|
|
2090
|
+
const A = u.push("thead_open", "thead", 1);
|
|
2091
|
+
A.map = [e, e + 1];
|
|
2092
|
+
const y = u.push("tr_open", "tr", 1);
|
|
2091
2093
|
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 T = u.push("inline", "", 0);
|
|
2098
|
+
T.content = s[b].trim(), T.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 g, 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 T = 0, E = h.length; T < E; T++)
|
|
2105
|
+
if (h[T](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 T = u.push("tbody_open", "tbody", 1);
|
|
2113
|
+
T.map = g = [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 T = 0; T < f; T++) {
|
|
2118
2118
|
const E = u.push("td_open", "td", 1);
|
|
2119
|
-
l[
|
|
2120
|
-
const
|
|
2121
|
-
|
|
2119
|
+
l[T] && (E.attrs = [["style", "text-align:" + l[T]]]);
|
|
2120
|
+
const R = u.push("inline", "", 0);
|
|
2121
|
+
R.content = s[T] ? s[T].trim() : "", R.children = [], u.push("td_close", "td", -1);
|
|
2122
2122
|
}
|
|
2123
2123
|
u.push("tr_close", "tr", -1);
|
|
2124
2124
|
}
|
|
2125
|
-
return
|
|
2125
|
+
return g && (u.push("tbody_close", "tbody", -1), g[1] = r), u.push("table_close", "table", -1), C[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, T, E;
|
|
2190
|
+
u.src.charCodeAt(r) === 32 ? (r++, m++, E = !1, T = !0) : u.src.charCodeAt(r) === 9 ? (T = !0, (u.bsCount[d] + m) % 4 === 3 ? (r++, m++, E = !1) : E = !0) : T = !1;
|
|
2191
|
+
let R = m;
|
|
2192
2192
|
for (i.push(u.bMarks[d]), u.bMarks[d] = r; r < o; ) {
|
|
2193
|
-
const
|
|
2194
|
-
if (
|
|
2195
|
-
|
|
2193
|
+
const P = u.src.charCodeAt(r);
|
|
2194
|
+
if (G(P))
|
|
2195
|
+
P === 9 ? R += 4 - (R + u.bsCount[d] + (E ? 1 : 0)) % 4 : R++;
|
|
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 + (T ? 1 : 0), s.push(u.sCount[d]), u.sCount[d] = R - 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, T = f.length; m < T; 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 C = u.blkIndent;
|
|
2218
2218
|
u.blkIndent = 0;
|
|
2219
|
-
const
|
|
2220
|
-
|
|
2221
|
-
const
|
|
2222
|
-
|
|
2223
|
-
const
|
|
2224
|
-
|
|
2219
|
+
const A = u.push("blockquote_open", "blockquote", 1);
|
|
2220
|
+
A.markup = ">";
|
|
2221
|
+
const y = [e, 0];
|
|
2222
|
+
A.map = y, u.md.block.tokenize(u, e, d);
|
|
2223
|
+
const g = u.push("blockquote_close", "blockquote", -1);
|
|
2224
|
+
g.markup = ">", u.lineMax = c, u.parentType = _, y[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 = C, !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 && !G(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 (!G(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), !G(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), C = 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 A = [a, 0];
|
|
2312
|
+
i.map = A, i.markup = String.fromCharCode(d);
|
|
2313
|
+
let y = !1;
|
|
2314
|
+
const g = 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 T = o;
|
|
2330
2330
|
let E;
|
|
2331
|
-
|
|
2332
|
-
const
|
|
2331
|
+
T >= r ? E = 1 : E = m - b, E > 4 && (E = 1);
|
|
2332
|
+
const R = b + E;
|
|
2333
2333
|
i = u.push("list_item_open", "li", 1), i.markup = String.fromCharCode(d);
|
|
2334
|
-
const
|
|
2335
|
-
i.map =
|
|
2334
|
+
const P = [a, 0];
|
|
2335
|
+
i.map = P, 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 = R, u.tight = !0, u.tShift[a] = T - u.bMarks[a], u.sCount[a] = m, T >= r && u.isEmpty(a + 1) ? u.line = Math.min(u.line + 2, t) : u.md.block.tokenize(u, a, t, !0), (!u.tight || y) && (s = !1), y = 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, P[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 Su = !1;
|
|
2340
|
+
for (let fu = 0, zu = g.length; fu < zu; fu++)
|
|
2341
|
+
if (g[fu](u, a, t, !0)) {
|
|
2342
|
+
Su = !0;
|
|
2343
2343
|
break;
|
|
2344
2344
|
}
|
|
2345
|
-
if (
|
|
2345
|
+
if (Su)
|
|
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), A[1] = a, u.line = a, u.parentType = p, s && Yn(u, C), !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(g) {
|
|
2363
2363
|
const p = u.lineMax;
|
|
2364
|
-
if (
|
|
2364
|
+
if (g >= p || u.isEmpty(g))
|
|
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[g] - u.blkIndent > 3 && (b = !0), u.sCount[g] < 0 && (b = !0), !b) {
|
|
2368
|
+
const E = u.md.block.ruler.getRules("reference"), R = u.parentType;
|
|
2369
2369
|
u.parentType = "reference";
|
|
2370
|
-
let
|
|
2370
|
+
let P = !1;
|
|
2371
2371
|
for (let K = 0, du = E.length; K < du; K++)
|
|
2372
|
-
if (E[K](u,
|
|
2373
|
-
|
|
2372
|
+
if (E[K](u, g, p, !0)) {
|
|
2373
|
+
P = !0;
|
|
2374
2374
|
break;
|
|
2375
2375
|
}
|
|
2376
|
-
if (u.parentType =
|
|
2376
|
+
if (u.parentType = R, P)
|
|
2377
2377
|
return null;
|
|
2378
2378
|
}
|
|
2379
|
-
const m = u.bMarks[
|
|
2380
|
-
return u.src.slice(m,
|
|
2379
|
+
const m = u.bMarks[g] + u.tShift[g], T = u.eMarks[g];
|
|
2380
|
+
return u.src.slice(m, T + 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 g = a.charCodeAt(r);
|
|
2387
|
+
if (g === 91)
|
|
2388
2388
|
return !1;
|
|
2389
|
-
if (
|
|
2389
|
+
if (g === 93) {
|
|
2390
2390
|
s = r;
|
|
2391
2391
|
break;
|
|
2392
|
-
} else if (
|
|
2392
|
+
} else if (g === 10) {
|
|
2393
2393
|
const p = i(c);
|
|
2394
2394
|
p !== null && (a += p, o = a.length, c++);
|
|
2395
|
-
} else if (
|
|
2395
|
+
} else if (g === 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 g = a.charCodeAt(r);
|
|
2404
|
+
if (g === 10) {
|
|
2405
2405
|
const p = i(c);
|
|
2406
2406
|
p !== null && (a += p, o = a.length, c++);
|
|
2407
|
-
} else if (!
|
|
2407
|
+
} else if (!G(g)) 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 g = a.charCodeAt(r);
|
|
2419
|
+
if (g === 10) {
|
|
2420
2420
|
const p = i(c);
|
|
2421
2421
|
p !== null && (a += p, o = a.length, c++);
|
|
2422
|
-
} else if (!
|
|
2422
|
+
} else if (!G(g)) break;
|
|
2423
2423
|
}
|
|
2424
|
-
let
|
|
2425
|
-
for (;
|
|
2426
|
-
const
|
|
2427
|
-
if (
|
|
2428
|
-
a +=
|
|
2424
|
+
let C = u.md.helpers.parseLinkTitle(a, r, o);
|
|
2425
|
+
for (; C.can_continue; ) {
|
|
2426
|
+
const g = i(c);
|
|
2427
|
+
if (g === null) break;
|
|
2428
|
+
a += g, r = o, o = a.length, c++, C = u.md.helpers.parseLinkTitle(a, r, o, C);
|
|
2429
2429
|
}
|
|
2430
|
-
let
|
|
2431
|
-
for (r < o && d !== r &&
|
|
2432
|
-
const
|
|
2433
|
-
if (!
|
|
2430
|
+
let A;
|
|
2431
|
+
for (r < o && d !== r && C.ok ? (A = C.str, r = C.pos) : (A = "", r = _, c = h); r < o; ) {
|
|
2432
|
+
const g = a.charCodeAt(r);
|
|
2433
|
+
if (!G(g))
|
|
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 && A)
|
|
2438
|
+
for (A = "", r = _, c = h; r < o; ) {
|
|
2439
|
+
const g = a.charCodeAt(r);
|
|
2440
|
+
if (!G(g))
|
|
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 y = se(a.slice(1, s));
|
|
2447
|
+
return y ? (n || (typeof u.env.references > "u" && (u.env.references = {}), typeof u.env.references[y] > "u" && (u.env.references[y] = { title: A, 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 && !G(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 && G(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 && G(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), !!G(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), !(!G(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), !(!G(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), !(!G(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 C = u.push("link_open", "a", 1), A = [["href", c]];
|
|
2972
|
+
C.attrs = A, i && A.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), !(!G(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), !(!G(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), !(!G(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 C = [];
|
|
3009
3009
|
u.md.inline.parse(
|
|
3010
3010
|
n,
|
|
3011
3011
|
u.md,
|
|
3012
3012
|
u.env,
|
|
3013
|
-
|
|
3013
|
+
C
|
|
3014
3014
|
);
|
|
3015
|
-
const
|
|
3016
|
-
|
|
3015
|
+
const A = u.push("image", "img", 0), y = [["src", l], ["alt", ""]];
|
|
3016
|
+
A.attrs = y, A.children = C, A.content = n, a && y.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 Rr = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i, Pr = /^&([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(Rr);
|
|
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(Pr);
|
|
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 Rt(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 Pt(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 = Pt(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, C = hu - h;
|
|
3519
3519
|
e.push(
|
|
3520
|
-
ye(rt(h + d %
|
|
3521
|
-
), f = pu(d /
|
|
3520
|
+
ye(rt(h + d % C, 0))
|
|
3521
|
+
), f = pu(d / C);
|
|
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 Rt(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 Rt(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: Pt,
|
|
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 Pu(), 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
|
+
}, Ro = /* @__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 = M(""), r = M(""), o = e, c = new ru(), i = M(), 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 = M(!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), C = () => {
|
|
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
|
+
}, A = () => {
|
|
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
|
-
l(b),
|
|
3871
|
+
console.log("text", b), l(b), Pe.success(I("复制成功"));
|
|
3872
3872
|
} catch {
|
|
3873
|
-
|
|
3873
|
+
Pe.error(I("复制失败"));
|
|
3874
3874
|
}
|
|
3875
|
-
},
|
|
3875
|
+
}, y = (p) => {
|
|
3876
3876
|
if (p == "copy") {
|
|
3877
|
-
|
|
3877
|
+
A();
|
|
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
|
-
o("aiChatEmit", "reference", t.item);
|
|
3895
|
+
}, g = () => {
|
|
3896
|
+
console.log("toReference"), o("aiChatEmit", "reference", t.item);
|
|
3897
3897
|
};
|
|
3898
|
-
return (p, b) => (
|
|
3899
|
-
|
|
3900
|
-
_.value ? (
|
|
3898
|
+
return (p, b) => (S(), q("div", vo, [
|
|
3899
|
+
k("div", Do, [
|
|
3900
|
+
_.value ? (S(), q("div", {
|
|
3901
3901
|
key: 0,
|
|
3902
|
-
onClick:
|
|
3902
|
+
onClick: g,
|
|
3903
3903
|
class: "das-ai-reference-content-line"
|
|
3904
3904
|
}, [
|
|
3905
|
-
|
|
3906
|
-
j(
|
|
3905
|
+
k("span", Eo, V(_.value), 1),
|
|
3906
|
+
j(v(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
|
+
k("div", Fo, [
|
|
3913
|
+
!p.item.loading && d.value && !p.item.file.length ? (S(), q("div", wo, V(v(I)("已暂停生成")), 1)) : $("", !0),
|
|
3914
|
+
r.value ? (S(), q("div", {
|
|
3915
3915
|
key: 1,
|
|
3916
3916
|
class: Ju(["das-ai-think-markdown-box", { "hide-think": !f.value }])
|
|
3917
3917
|
}, [
|
|
3918
|
-
|
|
3918
|
+
k("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
|
+
k("div", So, V(h.value), 1),
|
|
3923
|
+
k("div", zo, [
|
|
3924
|
+
f.value ? $("", !0) : (S(), Y(v(ht), {
|
|
3925
3925
|
key: 0,
|
|
3926
3926
|
size: "medium",
|
|
3927
3927
|
iconColor: "#999999"
|
|
3928
3928
|
})),
|
|
3929
|
-
f.value ? (
|
|
3929
|
+
f.value ? (S(), Y(v(pt), {
|
|
3930
3930
|
key: 1,
|
|
3931
3931
|
size: "medium",
|
|
3932
3932
|
iconColor: "#999999"
|
|
3933
3933
|
})) : $("", !0)
|
|
3934
3934
|
])
|
|
3935
3935
|
]),
|
|
3936
|
-
|
|
3936
|
+
k("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 ? (S(), 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 ? (S(), q("div", Mo, [
|
|
3949
|
+
p.isNew ? (S(), Y(v(vu), {
|
|
3950
3950
|
key: 0,
|
|
3951
3951
|
placement: "top",
|
|
3952
3952
|
type: "button"
|
|
3953
3953
|
}, {
|
|
3954
3954
|
content: J(() => [
|
|
3955
|
-
|
|
3955
|
+
k("div", null, V(v(I)("重新生成")), 1)
|
|
3956
3956
|
]),
|
|
3957
3957
|
default: J(() => [
|
|
3958
|
-
|
|
3959
|
-
onClick: b[1] || (b[1] = (m) =>
|
|
3958
|
+
k("div", {
|
|
3959
|
+
onClick: b[1] || (b[1] = (m) => y("regenerate")),
|
|
3960
3960
|
class: "chat-opt-box"
|
|
3961
3961
|
}, [
|
|
3962
|
-
j(
|
|
3962
|
+
j(v(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(v(vu), {
|
|
3971
3971
|
placement: "top",
|
|
3972
3972
|
type: "button"
|
|
3973
3973
|
}, {
|
|
3974
3974
|
content: J(() => [
|
|
3975
|
-
|
|
3975
|
+
k("div", null, V(v(I)("复制")), 1)
|
|
3976
3976
|
]),
|
|
3977
3977
|
default: J(() => [
|
|
3978
|
-
|
|
3979
|
-
onClick: b[2] || (b[2] = (m) =>
|
|
3978
|
+
k("div", {
|
|
3979
|
+
onClick: b[2] || (b[2] = (m) => y("copy")),
|
|
3980
3980
|
class: "chat-opt-box"
|
|
3981
3981
|
}, [
|
|
3982
|
-
j(
|
|
3982
|
+
j(v(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(v(vu), {
|
|
3991
3991
|
placement: "top",
|
|
3992
3992
|
type: "button"
|
|
3993
3993
|
}, {
|
|
3994
3994
|
content: J(() => [
|
|
3995
|
-
|
|
3995
|
+
k("div", null, V(C()), 1)
|
|
3996
3996
|
]),
|
|
3997
3997
|
default: J(() => [
|
|
3998
|
-
|
|
3999
|
-
onClick: b[3] || (b[3] = (m) =>
|
|
3998
|
+
k("div", {
|
|
3999
|
+
onClick: b[3] || (b[3] = (m) => y("play")),
|
|
4000
4000
|
class: "chat-opt-box"
|
|
4001
4001
|
}, [
|
|
4002
|
-
p.item.audioStatus == "normal" ? (
|
|
4002
|
+
p.item.audioStatus == "normal" ? (S(), Y(v(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" ? (S(), q("div", Oo, b[4] || (b[4] = [
|
|
4008
|
+
k("span", null, null, -1),
|
|
4009
|
+
k("span", null, null, -1),
|
|
4010
|
+
k("span", null, null, -1),
|
|
4011
|
+
k("span", null, null, -1)
|
|
4012
4012
|
]))) : $("", !0),
|
|
4013
|
-
p.item.audioStatus == "loading" ? (
|
|
4014
|
-
|
|
4013
|
+
p.item.audioStatus == "loading" ? (S(), q("div", No, [
|
|
4014
|
+
k("img", { src: v(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 ? (S(), q("div", Bo, b[5] || (b[5] = [
|
|
4022
|
+
k("span", null, null, -1),
|
|
4023
|
+
k("span", null, null, -1),
|
|
4024
|
+
k("span", null, null, -1)
|
|
4025
4025
|
]))) : $("", !0)
|
|
4026
4026
|
])
|
|
4027
4027
|
]));
|
|
4028
4028
|
}
|
|
4029
|
-
}),
|
|
4029
|
+
}), Po = /* @__PURE__ */ iu(Ro, [["__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
|
-
o("chatEmit", i, a);
|
|
4042
|
+
console.log("chatEmit11", i, a), o("chatEmit", i, a);
|
|
4043
4043
|
};
|
|
4044
|
-
return (i, a) => (
|
|
4045
|
-
(
|
|
4044
|
+
return (i, a) => (S(), q("div", jo, [
|
|
4045
|
+
(S(!0), q(Nu, null, Qu(i.chartList, (s) => (S(), q(Nu, {
|
|
4046
4046
|
key: s.id
|
|
4047
4047
|
}, [
|
|
4048
|
-
s.role == "user" ? (
|
|
4048
|
+
s.role == "user" ? (S(), Y(z0, {
|
|
4049
4049
|
key: 0,
|
|
4050
4050
|
item: s
|
|
4051
4051
|
}, null, 8, ["item"])) : $("", !0),
|
|
4052
|
-
s.role == "ai" ? (
|
|
4052
|
+
s.role == "ai" ? (S(), Y(Po, {
|
|
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) => (S(), q("div", Uo, [
|
|
4070
|
+
k("div", {
|
|
4071
|
+
class: Ju(["int-opt-box", { actived: v(x).deepseek }]),
|
|
4072
4072
|
onClick: e
|
|
4073
4073
|
}, [
|
|
4074
|
-
j(
|
|
4074
|
+
j(v(f0), {
|
|
4075
4075
|
size: "medium",
|
|
4076
|
-
iconColor:
|
|
4076
|
+
iconColor: v(x).deepseek ? "#5582F3" : "#212121"
|
|
4077
4077
|
}, null, 8, ["iconColor"]),
|
|
4078
|
-
|
|
4078
|
+
k("span", Zo, V(v(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 = M(null), o = su(() => !x.senderValue), c = su(() => {
|
|
4092
4092
|
if (x.loading)
|
|
4093
4093
|
return I("回答中...");
|
|
4094
4094
|
if (t.isNew) {
|
|
@@ -4101,35 +4101,37 @@ 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);
|
|
4104
4105
|
};
|
|
4105
4106
|
bu(
|
|
4106
4107
|
() => x.senderValue,
|
|
4107
4108
|
(h) => {
|
|
4108
|
-
!h && r.value && (r.value.style.height = "21px");
|
|
4109
|
+
console.log("senderValue", h), !h && r.value && (r.value.style.height = "21px", console.log("senderValue2", r.value));
|
|
4109
4110
|
}
|
|
4110
4111
|
);
|
|
4111
4112
|
const s = (h) => {
|
|
4113
|
+
console.log("inputFn", h);
|
|
4112
4114
|
const d = h.target;
|
|
4113
|
-
d.style.height = "auto", d.style.height = d.scrollHeight + "px";
|
|
4115
|
+
d.style.height = "auto", d.style.height = d.scrollHeight + "px", console.log("inputFn2", d.scrollHeight);
|
|
4114
4116
|
}, l = () => {
|
|
4115
4117
|
}, f = (h) => {
|
|
4116
|
-
h.preventDefault(), !(x.senderValue && !x.senderValue.trim()) && (n("senderEmit", "sender", x.senderValue), x.senderValue = "");
|
|
4118
|
+
console.log("enterFn", h, x.senderValue), h.preventDefault(), !(x.senderValue && !x.senderValue.trim()) && (n("senderEmit", "sender", x.senderValue), x.senderValue = "");
|
|
4117
4119
|
}, _ = () => {
|
|
4118
4120
|
n("senderEmit", "stopMsg");
|
|
4119
4121
|
};
|
|
4120
|
-
return (h, d) => (
|
|
4121
|
-
|
|
4122
|
-
|
|
4122
|
+
return (h, d) => (S(), q("div", Qo, [
|
|
4123
|
+
k("div", Wo, [
|
|
4124
|
+
k("div", {
|
|
4123
4125
|
onClick: i,
|
|
4124
4126
|
class: "focus-mask-top"
|
|
4125
4127
|
}),
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
Au(
|
|
4128
|
+
k("div", Xo, [
|
|
4129
|
+
k("div", Yo, [
|
|
4130
|
+
k("div", ui, [
|
|
4131
|
+
Au(k("textarea", {
|
|
4130
4132
|
class: "das-ai-textarea",
|
|
4131
4133
|
onKeydown: Jt(f, ["enter"]),
|
|
4132
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
4134
|
+
"onUpdate:modelValue": d[0] || (d[0] = (C) => v(x).senderValue = C),
|
|
4133
4135
|
placeholder: c.value,
|
|
4134
4136
|
rows: "8",
|
|
4135
4137
|
maxlength: "512",
|
|
@@ -4138,36 +4140,36 @@ const Co = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4138
4140
|
onFocus: l,
|
|
4139
4141
|
onInput: s,
|
|
4140
4142
|
onChange: a,
|
|
4141
|
-
disabled:
|
|
4143
|
+
disabled: v(x).loading
|
|
4142
4144
|
}, null, 40, ei), [
|
|
4143
|
-
[Qt,
|
|
4145
|
+
[Qt, v(x).senderValue]
|
|
4144
4146
|
]),
|
|
4145
|
-
|
|
4147
|
+
k("div", ti, V(v(x).senderValue), 1)
|
|
4146
4148
|
])
|
|
4147
4149
|
]),
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
+
k("div", ni, [
|
|
4151
|
+
k("div", {
|
|
4150
4152
|
onClick: i,
|
|
4151
4153
|
class: "focus-mask-bottom"
|
|
4152
4154
|
}),
|
|
4153
4155
|
j(Jo),
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
+
k("div", ri, [
|
|
4157
|
+
v(x).loading ? $("", !0) : (S(), q("div", {
|
|
4156
4158
|
key: 0,
|
|
4157
4159
|
onClick: f,
|
|
4158
4160
|
class: Ju(["int-opt-right-icon", { disabled: o.value }])
|
|
4159
4161
|
}, [
|
|
4160
|
-
j(
|
|
4162
|
+
j(v(d0), {
|
|
4161
4163
|
customSize: "12px",
|
|
4162
4164
|
iconColor: o.value ? "#fafafa" : "#fff"
|
|
4163
4165
|
}, null, 8, ["iconColor"])
|
|
4164
4166
|
], 2)),
|
|
4165
|
-
|
|
4167
|
+
v(x).loading ? (S(), q("div", {
|
|
4166
4168
|
key: 1,
|
|
4167
4169
|
onClick: Fe(_, ["stop"]),
|
|
4168
4170
|
class: "loading-btn"
|
|
4169
4171
|
}, d[1] || (d[1] = [
|
|
4170
|
-
|
|
4172
|
+
k("div", { class: "loading-btn-con" }, null, -1)
|
|
4171
4173
|
]))) : $("", !0)
|
|
4172
4174
|
])
|
|
4173
4175
|
])
|
|
@@ -4187,23 +4189,23 @@ const Co = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4187
4189
|
const t = e, n = (r) => {
|
|
4188
4190
|
t("addNewEmit", r);
|
|
4189
4191
|
};
|
|
4190
|
-
return (r, o) => (
|
|
4191
|
-
|
|
4192
|
+
return (r, o) => (S(), q("div", ai, [
|
|
4193
|
+
k("div", {
|
|
4192
4194
|
class: "add-box",
|
|
4193
4195
|
onClick: o[0] || (o[0] = (c) => n("addNew"))
|
|
4194
4196
|
}, [
|
|
4195
|
-
j(
|
|
4197
|
+
j(v(p0), {
|
|
4196
4198
|
size: "medium",
|
|
4197
4199
|
iconColor: "#333333"
|
|
4198
4200
|
}),
|
|
4199
|
-
|
|
4201
|
+
k("span", si, V(v(I)("开启新对话")), 1)
|
|
4200
4202
|
]),
|
|
4201
|
-
|
|
4203
|
+
v(x).showScrollBom ? (S(), q("div", {
|
|
4202
4204
|
key: 0,
|
|
4203
4205
|
class: "scroll-opt-box",
|
|
4204
4206
|
onClick: o[1] || (o[1] = (c) => n("scrollBom"))
|
|
4205
4207
|
}, [
|
|
4206
|
-
j(
|
|
4208
|
+
j(v(h0), {
|
|
4207
4209
|
size: "large",
|
|
4208
4210
|
iconColor: "#333333"
|
|
4209
4211
|
})
|
|
@@ -4226,28 +4228,28 @@ const Co = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4226
4228
|
t("click", r);
|
|
4227
4229
|
};
|
|
4228
4230
|
return qu(() => {
|
|
4229
|
-
}), (r, o) => (
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
r.list.length ? (
|
|
4233
|
-
(
|
|
4231
|
+
}), (r, o) => (S(), q("div", hi, [
|
|
4232
|
+
k("div", pi, V(v(I)("嗨!我是AI助手")), 1),
|
|
4233
|
+
k("div", bi, V(v(I)("我可以帮你分析,写报告,调节设备,预订会议室,请把你的任务交给我吧~")), 1),
|
|
4234
|
+
r.list.length ? (S(), q("div", mi, V(v(I)("你可以这样说")), 1)) : $("", !0),
|
|
4235
|
+
(S(!0), q(Nu, null, Qu(r.list, (c) => (S(), q("div", {
|
|
4234
4236
|
onClick: (i) => n(c),
|
|
4235
4237
|
class: "das-ai-prompt-item"
|
|
4236
4238
|
}, V(c.text), 9, xi))), 256))
|
|
4237
4239
|
]));
|
|
4238
4240
|
}
|
|
4239
|
-
}), ki = /* @__PURE__ */ iu(gi, [["__scopeId", "data-v-2a2b79c7"]]), Zt = "v1",
|
|
4241
|
+
}), ki = /* @__PURE__ */ iu(gi, [["__scopeId", "data-v-2a2b79c7"]]), Zt = "v1", wu = mt(`/api/llm/knowledge/${Zt}`), yi = mt(`/api/llm/vector/${Zt}`);
|
|
4240
4242
|
xt.get("token");
|
|
4241
4243
|
xt.post("putObject");
|
|
4242
|
-
const Ai = yi.get("/large-model/general-question"), Ci =
|
|
4243
|
-
|
|
4244
|
-
const Ma =
|
|
4245
|
-
|
|
4246
|
-
|
|
4244
|
+
const Ai = yi.get("/large-model/general-question"), Ci = wu.post("/chat/stop"), vi = wu.post("/chat/save-knowledge"), Di = wu.get("/chat"), Ei = wu.get("/chat/chat-details"), Fi = wu.delete("/chat/delete-by-user"), wi = wu.delete("/chat"), Si = wu.get("/chat/delete-by-query-id");
|
|
4245
|
+
Ru.post("/file");
|
|
4246
|
+
const Ma = Ru.post("/file/save-file"), zi = Ru.get("/folder"), Ii = Ru.post("/folder/listAllByCondition");
|
|
4247
|
+
Ru.post("/folder/lazy-tree");
|
|
4248
|
+
Ru.post("/folder/tree-search");
|
|
4247
4249
|
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 = {
|
|
4248
4250
|
key: 0,
|
|
4249
4251
|
class: "das-ai-select-text"
|
|
4250
|
-
}, Bi = { class: "das-ai-type-list" }, qi = ["onClick"],
|
|
4252
|
+
}, Bi = { class: "das-ai-type-list" }, qi = ["onClick"], Ri = { class: "das-ai-type-icon" }, Pi = { 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 = {
|
|
4251
4253
|
name: "selectType"
|
|
4252
4254
|
}, Zi = /* @__PURE__ */ ou({
|
|
4253
4255
|
...Ui,
|
|
@@ -4256,7 +4258,7 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4256
4258
|
},
|
|
4257
4259
|
emits: ["back"],
|
|
4258
4260
|
setup(u, { emit: e }) {
|
|
4259
|
-
const t =
|
|
4261
|
+
const t = M(!1), n = M(!1), r = M(!1), o = M({
|
|
4260
4262
|
modifiers: [
|
|
4261
4263
|
{
|
|
4262
4264
|
name: "offset",
|
|
@@ -4265,21 +4267,22 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4265
4267
|
}
|
|
4266
4268
|
}
|
|
4267
4269
|
]
|
|
4268
|
-
}), c =
|
|
4270
|
+
}), c = M([
|
|
4269
4271
|
{ id: "1", name: I("知识库"), desc: I("选择在某个知识库中搜索"), icon: "knowOpen" },
|
|
4270
4272
|
{ id: "0", name: I("物联应用"), desc: I("在权限范围内的应用中搜索"), icon: "yingyong" },
|
|
4271
4273
|
{ id: "2", name: I("全网"), desc: I("在整个大模型中搜索"), icon: "intnet" }
|
|
4272
|
-
]), i =
|
|
4274
|
+
]), i = M(!1), a = M([]), s = M(""), l = M(""), f = e, _ = () => {
|
|
4273
4275
|
f("back");
|
|
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("基于全部")),
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
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("基于全部")), C = su(() => x.folderId && x.folderName ? x.folderName : I("选择在某个知识库中搜索")), A = (E) => {
|
|
4277
|
+
console.log("popoverShow", E);
|
|
4278
|
+
}, y = (E) => {
|
|
4279
|
+
console.log("popoverHide", E), r.value = !1;
|
|
4280
|
+
}, g = (E) => {
|
|
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;
|
|
4279
4282
|
}, p = (E) => {
|
|
4280
4283
|
x.searchType = E.id, Vu(), l.value = x.folderId ? x.folderId : x.allKnowId, r.value = !0, m();
|
|
4281
4284
|
}, b = async (E) => {
|
|
4282
|
-
x.searchType = E.id, n.value = !1, Vu();
|
|
4285
|
+
x.searchType = E.id, n.value = !1, Vu(), console.log("clickType", E);
|
|
4283
4286
|
}, m = async () => {
|
|
4284
4287
|
const E = {
|
|
4285
4288
|
folderName: "",
|
|
@@ -4289,60 +4292,60 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4289
4292
|
// 是否排除内置文件夹 默认不排除
|
|
4290
4293
|
};
|
|
4291
4294
|
i.value = !0;
|
|
4292
|
-
const [
|
|
4293
|
-
if (i.value = !1,
|
|
4295
|
+
const [R, P] = await Ii(E).run();
|
|
4296
|
+
if (i.value = !1, R)
|
|
4294
4297
|
return;
|
|
4295
|
-
let K =
|
|
4296
|
-
K && K.length ? (K = [
|
|
4298
|
+
let K = P;
|
|
4299
|
+
console.log("getTreeData", K), K && K.length ? (K = [
|
|
4297
4300
|
{
|
|
4298
4301
|
disabled: !1,
|
|
4299
4302
|
authority: !0,
|
|
4300
4303
|
id: x.allKnowId,
|
|
4301
4304
|
folderName: I("全部"),
|
|
4302
|
-
childFolderList:
|
|
4305
|
+
childFolderList: P,
|
|
4303
4306
|
folderPath: x.allKnowId,
|
|
4304
4307
|
pathName: I("全部")
|
|
4305
4308
|
}
|
|
4306
4309
|
], K.forEach((du) => {
|
|
4307
|
-
|
|
4308
|
-
})) : (l.value = "", x.folderId = "", x.folderName = ""), a.value = K;
|
|
4309
|
-
},
|
|
4310
|
-
E.disabled = !E.authority, E.path =
|
|
4311
|
-
|
|
4310
|
+
T(du);
|
|
4311
|
+
})) : (l.value = "", x.folderId = "", x.folderName = ""), console.log("treedata", K), a.value = K;
|
|
4312
|
+
}, T = (E, R, P) => {
|
|
4313
|
+
E.disabled = !E.authority, E.path = R ? R + `/${E.id}` : E.id, E.pathName = P ? P + `/${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) => {
|
|
4314
|
+
T(K, E.path, E.pathName);
|
|
4312
4315
|
});
|
|
4313
4316
|
};
|
|
4314
|
-
return (E,
|
|
4315
|
-
Au(
|
|
4316
|
-
j(
|
|
4317
|
+
return (E, R) => (S(), q("div", Ti, [
|
|
4318
|
+
Au(k("div", Mi, [
|
|
4319
|
+
j(v(Se), {
|
|
4317
4320
|
onClick: _,
|
|
4318
4321
|
size: "large",
|
|
4319
4322
|
iconColor: "#666666"
|
|
4320
4323
|
}),
|
|
4321
|
-
|
|
4324
|
+
k("div", Oi, V(d.value), 1)
|
|
4322
4325
|
], 512), [
|
|
4323
4326
|
[Hu, E.listLength]
|
|
4324
4327
|
]),
|
|
4325
|
-
j(
|
|
4328
|
+
j(v(m0), {
|
|
4326
4329
|
popperClass: "das-ai-select-popover",
|
|
4327
4330
|
"popper-options": o.value,
|
|
4328
4331
|
"show-arrow": !1,
|
|
4329
4332
|
width: 428,
|
|
4330
4333
|
trigger: "click",
|
|
4331
4334
|
visible: n.value,
|
|
4332
|
-
"onUpdate:visible":
|
|
4335
|
+
"onUpdate:visible": R[2] || (R[2] = (P) => n.value = P),
|
|
4333
4336
|
disabled: t.value,
|
|
4334
|
-
onShow:
|
|
4335
|
-
onHide:
|
|
4337
|
+
onShow: A,
|
|
4338
|
+
onHide: y
|
|
4336
4339
|
}, {
|
|
4337
4340
|
reference: J(() => [
|
|
4338
|
-
Au(
|
|
4339
|
-
h.value ? (
|
|
4340
|
-
n.value ? (
|
|
4341
|
+
Au(k("div", Ni, [
|
|
4342
|
+
h.value ? (S(), q("span", Li, V(h.value.name), 1)) : $("", !0),
|
|
4343
|
+
n.value ? (S(), Y(v(pt), {
|
|
4341
4344
|
key: 1,
|
|
4342
4345
|
size: "mini",
|
|
4343
4346
|
iconColor: "#666666"
|
|
4344
4347
|
})) : $("", !0),
|
|
4345
|
-
n.value ? $("", !0) : (
|
|
4348
|
+
n.value ? $("", !0) : (S(), Y(v(ht), {
|
|
4346
4349
|
key: 2,
|
|
4347
4350
|
size: "mini",
|
|
4348
4351
|
iconColor: "#666666"
|
|
@@ -4352,28 +4355,28 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4352
4355
|
])
|
|
4353
4356
|
]),
|
|
4354
4357
|
default: J(() => [
|
|
4355
|
-
Au(
|
|
4356
|
-
(
|
|
4357
|
-
onClick: (K) => b(
|
|
4358
|
-
class: Ju(["das-ai-type-item", { selected:
|
|
4358
|
+
Au(k("div", Bi, [
|
|
4359
|
+
(S(!0), q(Nu, null, Qu(c.value, (P) => (S(), q("div", {
|
|
4360
|
+
onClick: (K) => b(P),
|
|
4361
|
+
class: Ju(["das-ai-type-item", { selected: v(x).searchType == P.id }])
|
|
4359
4362
|
}, [
|
|
4360
|
-
|
|
4361
|
-
|
|
4363
|
+
k("div", Ri, [
|
|
4364
|
+
v(x).searchType == P.id ? (S(), Y(v(b0), {
|
|
4362
4365
|
key: 0,
|
|
4363
4366
|
customSize: "18px",
|
|
4364
4367
|
iconColor: "#FFFFFF"
|
|
4365
4368
|
})) : $("", !0)
|
|
4366
4369
|
]),
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
+
k("div", Pi, [
|
|
4371
|
+
k("div", ji, V(P.name), 1),
|
|
4372
|
+
k("div", Hi, V(P.id == 1 ? C.value : P.desc), 1)
|
|
4370
4373
|
]),
|
|
4371
|
-
|
|
4374
|
+
P.id == "1" ? (S(), q("div", {
|
|
4372
4375
|
key: 0,
|
|
4373
|
-
onClick: Fe((K) => p(
|
|
4376
|
+
onClick: Fe((K) => p(P), ["stop"]),
|
|
4374
4377
|
class: "know-entry"
|
|
4375
4378
|
}, [
|
|
4376
|
-
j(
|
|
4379
|
+
j(v(ft), {
|
|
4377
4380
|
customSize: "18px",
|
|
4378
4381
|
iconColor: "#666666"
|
|
4379
4382
|
})
|
|
@@ -4382,23 +4385,23 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4382
4385
|
], 512), [
|
|
4383
4386
|
[Hu, !r.value]
|
|
4384
4387
|
]),
|
|
4385
|
-
Au((
|
|
4386
|
-
j(
|
|
4388
|
+
Au((S(), q("div", Vi, [
|
|
4389
|
+
j(v(x0), {
|
|
4387
4390
|
ref: "folderTreeRef",
|
|
4388
4391
|
data: a.value,
|
|
4389
4392
|
isFilter: "",
|
|
4390
4393
|
"node-key": "id",
|
|
4391
4394
|
isEllipsis: "",
|
|
4392
4395
|
props: { label: "folderName", children: "childFolderList" },
|
|
4393
|
-
inputOptions: { placeholder:
|
|
4396
|
+
inputOptions: { placeholder: v(I)("搜索文件夹名称") },
|
|
4394
4397
|
modelValue: l.value,
|
|
4395
|
-
"onUpdate:modelValue":
|
|
4398
|
+
"onUpdate:modelValue": R[0] || (R[0] = (P) => l.value = P),
|
|
4396
4399
|
"filter-value": s.value,
|
|
4397
|
-
"onUpdate:filterValue":
|
|
4398
|
-
onNodeClick:
|
|
4400
|
+
"onUpdate:filterValue": R[1] || (R[1] = (P) => s.value = P),
|
|
4401
|
+
onNodeClick: g
|
|
4399
4402
|
}, null, 8, ["data", "inputOptions", "modelValue", "filter-value"])
|
|
4400
4403
|
])), [
|
|
4401
|
-
[
|
|
4404
|
+
[v(bt), i.value],
|
|
4402
4405
|
[Hu, r.value]
|
|
4403
4406
|
])
|
|
4404
4407
|
]),
|
|
@@ -4419,8 +4422,8 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4419
4422
|
emits: ["back", "preview", "toApp"],
|
|
4420
4423
|
setup(u, { emit: e }) {
|
|
4421
4424
|
const t = e;
|
|
4422
|
-
|
|
4423
|
-
const n =
|
|
4425
|
+
M();
|
|
4426
|
+
const n = M(-1), r = M([]), o = () => {
|
|
4424
4427
|
t("back");
|
|
4425
4428
|
};
|
|
4426
4429
|
qu(() => {
|
|
@@ -4429,38 +4432,38 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4429
4432
|
const s = `${st().baseURL}/oss/`;
|
|
4430
4433
|
return a.includes(s);
|
|
4431
4434
|
}, i = (a, s) => {
|
|
4432
|
-
if (n.value = s, r.value.includes(s) || r.value.push(s), a.type == "url") {
|
|
4435
|
+
if (console.log("downflie", a), n.value = s, r.value.includes(s) || r.value.push(s), a.type == "url") {
|
|
4433
4436
|
a.webUrl && t("toApp", a.webUrl);
|
|
4434
4437
|
return;
|
|
4435
4438
|
}
|
|
4436
4439
|
c(a.url) ? t("preview", a.url) : window.open(a.url, "_blank");
|
|
4437
4440
|
};
|
|
4438
|
-
return (a, s) => (
|
|
4439
|
-
|
|
4440
|
-
j(
|
|
4441
|
+
return (a, s) => (S(), q("div", Ki, [
|
|
4442
|
+
k("div", Ji, [
|
|
4443
|
+
j(v(Se), {
|
|
4441
4444
|
onClick: o,
|
|
4442
4445
|
size: "large",
|
|
4443
4446
|
iconColor: "#666666"
|
|
4444
4447
|
}),
|
|
4445
|
-
|
|
4448
|
+
k("span", Qi, V(v(I)("参考内容(共$0条)", a.item.file.length)), 1)
|
|
4446
4449
|
]),
|
|
4447
|
-
|
|
4448
|
-
j(
|
|
4450
|
+
k("div", Wi, [
|
|
4451
|
+
j(v(we), null, {
|
|
4449
4452
|
default: J(() => [
|
|
4450
|
-
|
|
4451
|
-
(
|
|
4453
|
+
k("div", Xi, [
|
|
4454
|
+
(S(!0), q(Nu, null, Qu(a.item.file, (l, f) => (S(), q("div", {
|
|
4452
4455
|
onClick: (_) => i(l, f),
|
|
4453
4456
|
class: Ju(["reference-file-item", { current: n.value == f, selected: r.value.includes(f) }])
|
|
4454
4457
|
}, [
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
j(
|
|
4458
|
+
k("div", uc, [
|
|
4459
|
+
k("span", ec, V(f + 1) + ".", 1),
|
|
4460
|
+
j(v(_0), {
|
|
4458
4461
|
size: "mini",
|
|
4459
4462
|
iconColor: "inherit"
|
|
4460
4463
|
}),
|
|
4461
|
-
|
|
4464
|
+
k("span", tc, V(l.name), 1)
|
|
4462
4465
|
]),
|
|
4463
|
-
|
|
4466
|
+
k("div", nc, V(l.summary), 1)
|
|
4464
4467
|
], 10, Yi))), 256))
|
|
4465
4468
|
])
|
|
4466
4469
|
]),
|
|
@@ -4469,8 +4472,8 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4469
4472
|
])
|
|
4470
4473
|
]));
|
|
4471
4474
|
}
|
|
4472
|
-
}), ic = /* @__PURE__ */ iu(oc, [["__scopeId", "data-v-2c238a27"]]), cc = ot(() => import("./index-
|
|
4473
|
-
const u =
|
|
4475
|
+
}), ic = /* @__PURE__ */ iu(oc, [["__scopeId", "data-v-2c238a27"]]), cc = ot(() => import("./index-Bw7rNZmA.js")), ac = () => {
|
|
4476
|
+
const u = M(null), e = M(!1);
|
|
4474
4477
|
let t = "", n = "";
|
|
4475
4478
|
return {
|
|
4476
4479
|
deletaDialogVue: () => it(cc, {
|
|
@@ -4510,34 +4513,37 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4510
4513
|
},
|
|
4511
4514
|
emits: ["back", "record"],
|
|
4512
4515
|
setup(u, { emit: e }) {
|
|
4513
|
-
const t =
|
|
4516
|
+
const t = M(!1), { deletaDialogVue: n, showDeleteDialog: r } = ac(), o = M([]), c = e, i = () => {
|
|
4514
4517
|
c("back");
|
|
4515
|
-
}, a = (
|
|
4516
|
-
let p =
|
|
4518
|
+
}, a = (g) => {
|
|
4519
|
+
let p = g.replace(/^(#+)\s/gm, "");
|
|
4517
4520
|
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;
|
|
4518
|
-
}, s = (
|
|
4521
|
+
}, s = (g) => {
|
|
4519
4522
|
const p = document.querySelector("#history-dialogue-scrollbox .das-ai-wrap-class");
|
|
4520
|
-
|
|
4521
|
-
|
|
4523
|
+
console.log("scrollFn", g);
|
|
4524
|
+
const m = p.scrollHeight - p.clientHeight - g.scrollTop;
|
|
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 () => {
|
|
4522
4527
|
t.value = !0;
|
|
4523
|
-
const
|
|
4528
|
+
const g = {
|
|
4524
4529
|
pageIndex: l.value,
|
|
4525
4530
|
pageSize: _.value
|
|
4526
|
-
}, [p, b] = await Di(
|
|
4527
|
-
t.value = !1, !p && (b.data && b.data.length && b.data.forEach((m) => {
|
|
4531
|
+
}, [p, b] = await Di(g).run();
|
|
4532
|
+
t.value = !1, console.log("getRecordListApi", b, p), !p && (b.data && b.data.length && b.data.forEach((m) => {
|
|
4528
4533
|
m.time = m.createdAt ? dt(m.createdAt).format("YYYY-MM-DD HH:mm:ss") : "", m.answerText = m.answer ? a(m.answer) : "";
|
|
4529
4534
|
}), l.value == 1 ? o.value = b.data : o.value = o.value.concat(b.data), f.value = b.totalPage);
|
|
4530
|
-
}, d = (
|
|
4531
|
-
c("record",
|
|
4532
|
-
},
|
|
4533
|
-
await r(I("删除后,该会话将不可恢复,"))
|
|
4534
|
-
|
|
4535
|
-
|
|
4535
|
+
}, d = (g) => g.searchType == 0 ? I("物联应用") : g.searchType == 1 ? I("知识库") : g.searchType == 2 ? I("全网") : I("全部"), C = async (g) => {
|
|
4536
|
+
c("record", g);
|
|
4537
|
+
}, A = async (g) => {
|
|
4538
|
+
const p = await r(I("删除后,该会话将不可恢复,"));
|
|
4539
|
+
console.log("deleteItem", p, g), g.id, t.value = !0;
|
|
4540
|
+
const [b, m] = await wi({ id: g.id }).run();
|
|
4541
|
+
if (b) {
|
|
4536
4542
|
t.value = !1;
|
|
4537
4543
|
return;
|
|
4538
4544
|
}
|
|
4539
|
-
h();
|
|
4540
|
-
},
|
|
4545
|
+
console.log("deleteRecordApi", b, m), h();
|
|
4546
|
+
}, y = async (g) => {
|
|
4541
4547
|
if (!o.value.length) return;
|
|
4542
4548
|
await r(I("清空后,所有历史将无法找回,")), t.value = !0;
|
|
4543
4549
|
const [p, b] = await Fi().run();
|
|
@@ -4545,30 +4551,30 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4545
4551
|
t.value = !1;
|
|
4546
4552
|
return;
|
|
4547
4553
|
}
|
|
4548
|
-
h();
|
|
4554
|
+
console.log("deleteAllRecordApi", p, b), h();
|
|
4549
4555
|
};
|
|
4550
4556
|
return qu(() => {
|
|
4551
4557
|
h();
|
|
4552
|
-
}), (
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
j(
|
|
4558
|
+
}), (g, p) => Au((S(), q("div", sc, [
|
|
4559
|
+
k("div", lc, [
|
|
4560
|
+
k("div", dc, [
|
|
4561
|
+
j(v(Se), {
|
|
4556
4562
|
onClick: i,
|
|
4557
4563
|
size: "large",
|
|
4558
4564
|
iconColor: "#666666"
|
|
4559
4565
|
}),
|
|
4560
|
-
|
|
4566
|
+
k("span", fc, V(v(I)("历史会话")), 1)
|
|
4561
4567
|
]),
|
|
4562
|
-
j(
|
|
4568
|
+
j(v(vu), {
|
|
4563
4569
|
placement: "top",
|
|
4564
4570
|
type: "button"
|
|
4565
4571
|
}, {
|
|
4566
4572
|
content: J(() => [
|
|
4567
|
-
|
|
4573
|
+
k("div", null, V(v(I)("清空")), 1)
|
|
4568
4574
|
]),
|
|
4569
4575
|
default: J(() => [
|
|
4570
|
-
j(
|
|
4571
|
-
onClick:
|
|
4576
|
+
j(v(g0), {
|
|
4577
|
+
onClick: y,
|
|
4572
4578
|
size: "large",
|
|
4573
4579
|
iconColor: "#666666"
|
|
4574
4580
|
})
|
|
@@ -4576,39 +4582,39 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4576
4582
|
_: 1
|
|
4577
4583
|
})
|
|
4578
4584
|
]),
|
|
4579
|
-
|
|
4580
|
-
j(
|
|
4585
|
+
k("div", hc, [
|
|
4586
|
+
j(v(we), {
|
|
4581
4587
|
"wrap-class": "das-ai-wrap-class",
|
|
4582
4588
|
onScroll: s
|
|
4583
4589
|
}, {
|
|
4584
4590
|
default: J(() => [
|
|
4585
|
-
o.value.length ? (
|
|
4586
|
-
(
|
|
4591
|
+
o.value.length ? (S(), q("div", pc, [
|
|
4592
|
+
(S(!0), q(Nu, null, Qu(o.value, (b, m) => (S(), q("div", {
|
|
4587
4593
|
class: "history-dialogue-item",
|
|
4588
|
-
onClick: (
|
|
4594
|
+
onClick: (T) => C(b)
|
|
4589
4595
|
}, [
|
|
4590
|
-
|
|
4591
|
-
j(
|
|
4596
|
+
k("div", mc, V(b.title), 1),
|
|
4597
|
+
j(v(vu), {
|
|
4592
4598
|
placement: "top-start",
|
|
4593
4599
|
disabled: !0,
|
|
4594
4600
|
text: b.answerText,
|
|
4595
4601
|
row: "2"
|
|
4596
4602
|
}, null, 8, ["text"]),
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4603
|
+
k("div", xc, [
|
|
4604
|
+
k("div", _c, [
|
|
4605
|
+
k("div", gc, V(d(b)), 1),
|
|
4606
|
+
k("span", null, V(b.time), 1)
|
|
4601
4607
|
]),
|
|
4602
|
-
j(
|
|
4608
|
+
j(v(vu), {
|
|
4603
4609
|
placement: "top",
|
|
4604
4610
|
type: "button"
|
|
4605
4611
|
}, {
|
|
4606
4612
|
content: J(() => [
|
|
4607
|
-
|
|
4613
|
+
k("div", null, V(v(I)("删除")), 1)
|
|
4608
4614
|
]),
|
|
4609
4615
|
default: J(() => [
|
|
4610
|
-
j(
|
|
4611
|
-
onClick: Fe((
|
|
4616
|
+
j(v(k0), {
|
|
4617
|
+
onClick: Fe((T) => A(b), ["stop"]),
|
|
4612
4618
|
size: "medium",
|
|
4613
4619
|
iconColor: "#666666"
|
|
4614
4620
|
}, null, 8, ["onClick"])
|
|
@@ -4617,14 +4623,14 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4617
4623
|
}, 1024)
|
|
4618
4624
|
])
|
|
4619
4625
|
], 8, bc))), 256))
|
|
4620
|
-
])) : (
|
|
4626
|
+
])) : (S(), Y(v(y0), { key: 0 }))
|
|
4621
4627
|
]),
|
|
4622
4628
|
_: 1
|
|
4623
4629
|
})
|
|
4624
4630
|
]),
|
|
4625
|
-
j(
|
|
4631
|
+
j(v(n))
|
|
4626
4632
|
])), [
|
|
4627
|
-
[
|
|
4633
|
+
[v(bt), t.value]
|
|
4628
4634
|
]);
|
|
4629
4635
|
}
|
|
4630
4636
|
}), Ac = /* @__PURE__ */ iu(yc, [["__scopeId", "data-v-4c2d27ea"]]);
|
|
@@ -4701,73 +4707,75 @@ function Ee(u, e) {
|
|
|
4701
4707
|
var vc = Ee(Cc, { path: "/" });
|
|
4702
4708
|
const Dc = () => {
|
|
4703
4709
|
let u = 0, e = -1, t = [], n = "", r = -1, o = !1, c = "", i = "";
|
|
4704
|
-
const a =
|
|
4705
|
-
const
|
|
4706
|
-
return
|
|
4707
|
-
}, h = (
|
|
4708
|
-
if (n =
|
|
4709
|
-
i.send(JSON.stringify({ text: p, taskId: c, taskType:
|
|
4710
|
+
const a = M(!1), s = M(), l = M(!1), f = M(""), _ = () => {
|
|
4711
|
+
const y = re() ? re() : vc.get("accessToken"), g = lt().id, p = {};
|
|
4712
|
+
return y && (p.token = y), g && (p.project = g), console.log("getObj", p), p;
|
|
4713
|
+
}, h = (y = 0, g, p) => {
|
|
4714
|
+
if (console.log("playAudio", y, g, p), n = g, r == 1 && y == 1 && i) {
|
|
4715
|
+
console.log("playAudio2", y, n.loading, p), i.send(JSON.stringify({ text: p, taskId: c, taskType: y, overFlag: !n.loading, ..._() }));
|
|
4710
4716
|
return;
|
|
4711
4717
|
}
|
|
4712
4718
|
n.audioStatus = "generated", i = new A0({
|
|
4713
4719
|
url: "/socket/api/speech/v1/tts",
|
|
4714
4720
|
reconnectWhenClose: !0,
|
|
4715
4721
|
opened: () => {
|
|
4716
|
-
c = $u(),
|
|
4722
|
+
c = $u(), console.log("opened", y), y == 0 && i.send(JSON.stringify({ text: n.content, taskId: c, taskType: y, ..._() })), y == 1 && i.send(JSON.stringify({ text: n.content, taskId: c, taskType: y, overFlag: !n.loading, ..._() })), r = y;
|
|
4717
4723
|
},
|
|
4718
4724
|
message: async (b) => {
|
|
4719
|
-
if ((b == null ? void 0 : b.taskId) == c) {
|
|
4725
|
+
if (console.log("message", b), (b == null ? void 0 : b.taskId) == c) {
|
|
4720
4726
|
if (!(b != null && b.baseData)) return;
|
|
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,
|
|
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, A()), 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, A())), a.value && (a.value = !1);
|
|
4722
4728
|
}
|
|
4723
4729
|
},
|
|
4724
4730
|
error: (b) => {
|
|
4725
4731
|
d();
|
|
4726
4732
|
},
|
|
4727
4733
|
close: (b) => {
|
|
4734
|
+
console.log("close", b);
|
|
4728
4735
|
}
|
|
4729
4736
|
});
|
|
4730
4737
|
}, d = () => {
|
|
4731
|
-
var
|
|
4732
|
-
r = -1, e = -1, u = 0, o = !1, t = [], i && i.disconnect(), i = "", (
|
|
4733
|
-
},
|
|
4738
|
+
var y;
|
|
4739
|
+
console.log("pauseAudio", n), r = -1, e = -1, u = 0, o = !1, t = [], i && i.disconnect(), i = "", (y = s.value) == null || y.pause(), f.value = "", a.value = !1, l.value = !1, n && (n.audioStatus = "normal", n = "");
|
|
4740
|
+
}, C = () => {
|
|
4734
4741
|
if (r == 0) {
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4742
|
+
console.log("整体转换", e);
|
|
4743
|
+
const y = e + 1;
|
|
4744
|
+
if (y < u)
|
|
4745
|
+
if (t[y]) {
|
|
4746
|
+
console.log("播发下一个片段", y), e++, f.value = `data:audio/mpeg;base64,${t[e]}`;
|
|
4739
4747
|
return;
|
|
4740
4748
|
} else {
|
|
4741
|
-
a.value = !0, bu(a, (
|
|
4742
|
-
|
|
4749
|
+
a.value = !0, bu(a, (g) => {
|
|
4750
|
+
console.log("watch-播发下一个片段", g, e), C();
|
|
4743
4751
|
});
|
|
4744
4752
|
return;
|
|
4745
4753
|
}
|
|
4746
|
-
d();
|
|
4754
|
+
console.log("最终音频播放完成1"), d();
|
|
4747
4755
|
}
|
|
4748
4756
|
if (r == 1) {
|
|
4749
4757
|
if (o) {
|
|
4750
4758
|
if (e++, t[e]) {
|
|
4751
|
-
f.value = `data:audio/mpeg;base64,${t[e]}`;
|
|
4759
|
+
console.log("播发下一个片段", e), f.value = `data:audio/mpeg;base64,${t[e]}`;
|
|
4752
4760
|
return;
|
|
4753
4761
|
}
|
|
4754
4762
|
} else {
|
|
4755
|
-
const
|
|
4756
|
-
if (t[
|
|
4757
|
-
e++, f.value = `data:audio/mpeg;base64,${t[e]}`;
|
|
4763
|
+
const y = e + 1;
|
|
4764
|
+
if (t[y]) {
|
|
4765
|
+
e++, console.log("播发下一个片段", e), f.value = `data:audio/mpeg;base64,${t[e]}`;
|
|
4758
4766
|
return;
|
|
4759
4767
|
} else {
|
|
4760
|
-
a.value = !0, bu(a, (
|
|
4761
|
-
|
|
4768
|
+
a.value = !0, bu(a, (g) => {
|
|
4769
|
+
console.log("watch-播发下一个片段", g, e), C();
|
|
4762
4770
|
});
|
|
4763
4771
|
return;
|
|
4764
4772
|
}
|
|
4765
4773
|
}
|
|
4766
|
-
d();
|
|
4774
|
+
console.log("最终音频播放完成2"), d();
|
|
4767
4775
|
}
|
|
4768
|
-
},
|
|
4769
|
-
s.value.onended = function() {
|
|
4770
|
-
|
|
4776
|
+
}, A = () => {
|
|
4777
|
+
console.log("audioAlarmRef", s.value), s.value.onended = function() {
|
|
4778
|
+
console.log("音频播放完成"), C();
|
|
4771
4779
|
};
|
|
4772
4780
|
};
|
|
4773
4781
|
return {
|
|
@@ -4791,28 +4799,28 @@ const Dc = () => {
|
|
|
4791
4799
|
__name: "index",
|
|
4792
4800
|
emits: ["toApp"],
|
|
4793
4801
|
setup(u, { expose: e, emit: t }) {
|
|
4794
|
-
const n = t, r =
|
|
4802
|
+
const n = t, r = M(0), o = M(0), c = M(""), i = M(), a = M(""), s = M(null), l = M(!1), f = M(null), _ = M([
|
|
4795
4803
|
{ id: "1", text: I("介绍达实公司及核心产品") },
|
|
4796
4804
|
{ id: "2", text: I("介绍达实公司行业案例") },
|
|
4797
4805
|
{ id: "3", text: I("预订上午9:00的会议室") }
|
|
4798
|
-
]), h =
|
|
4799
|
-
let
|
|
4806
|
+
]), h = M({}), d = M([]), C = M(["A100", "A002", "A003", "A005"]), A = M(!1), y = M(!1), { folderDialogVue: g, showFolderDialog: p } = D0(), { aiAudioRef: b, isAudioplay: m, audioSrc: T, playAudio: E, pauseAudio: R } = Dc();
|
|
4807
|
+
let P = 0;
|
|
4800
4808
|
qu(() => {
|
|
4801
4809
|
gt(!0), Vu(), du();
|
|
4802
4810
|
}), at(() => {
|
|
4803
|
-
pe(),
|
|
4811
|
+
console.log("ai-onBeforeUnmount"), pe(), R();
|
|
4804
4812
|
});
|
|
4805
4813
|
const K = () => {
|
|
4806
|
-
|
|
4814
|
+
R(), console.log("onDeactivated");
|
|
4807
4815
|
};
|
|
4808
4816
|
bu(
|
|
4809
4817
|
() => x.loading,
|
|
4810
|
-
(
|
|
4818
|
+
(F) => {
|
|
4811
4819
|
s.value && (s.value.loading = x.loading);
|
|
4812
4820
|
}
|
|
4813
4821
|
), bu(
|
|
4814
4822
|
() => x.searchType,
|
|
4815
|
-
(
|
|
4823
|
+
(F) => {
|
|
4816
4824
|
du();
|
|
4817
4825
|
}
|
|
4818
4826
|
);
|
|
@@ -4822,30 +4830,30 @@ const Dc = () => {
|
|
|
4822
4830
|
_.value = h[`${x.searchType}`];
|
|
4823
4831
|
return;
|
|
4824
4832
|
}
|
|
4825
|
-
const [
|
|
4826
|
-
|
|
4833
|
+
const [F, D] = await Ai({ type: x.searchType }, { ignoreErrorMessage: !0 }).run();
|
|
4834
|
+
console.log("getGeneralQuestionApi", F, D), !F && D && (h[`${x.searchType}`] = D.map((Z) => ({
|
|
4827
4835
|
id: $u(),
|
|
4828
|
-
text:
|
|
4836
|
+
text: Z
|
|
4829
4837
|
})), _.value = h[`${x.searchType}`]);
|
|
4830
4838
|
}, _u = () => {
|
|
4831
4839
|
Ae(() => {
|
|
4832
|
-
if (
|
|
4833
|
-
const
|
|
4834
|
-
|
|
4840
|
+
if (console.log("scrollTopDown", y.value), y.value) return;
|
|
4841
|
+
const F = document.querySelector("#das-ai-chat-scrollbox .das-ai-wrap-class");
|
|
4842
|
+
F && (A.value = !0, F.scrollTop = F.scrollHeight, r.value = F.scrollHeight - F.clientHeight);
|
|
4835
4843
|
});
|
|
4836
4844
|
};
|
|
4837
4845
|
let gu = "";
|
|
4838
|
-
const
|
|
4846
|
+
const Su = () => {
|
|
4839
4847
|
gu && clearTimeout(gu), gu = setTimeout(() => {
|
|
4840
|
-
|
|
4848
|
+
y.value = !1;
|
|
4841
4849
|
}, 2e3);
|
|
4842
|
-
}, fu = (
|
|
4843
|
-
if (r.value <= 0) {
|
|
4850
|
+
}, fu = (F) => {
|
|
4851
|
+
if (console.log("scrollFn", F, r.value), r.value <= 0) {
|
|
4844
4852
|
const D = document.querySelector("#das-ai-chat-scrollbox .das-ai-wrap-class");
|
|
4845
4853
|
r.value = D.scrollHeight - D.clientHeight;
|
|
4846
4854
|
}
|
|
4847
|
-
x.showScrollBom = r.value -
|
|
4848
|
-
},
|
|
4855
|
+
x.showScrollBom = r.value - F.scrollTop > 50, A.value || (y.value = !0, Su()), A.value = !1;
|
|
4856
|
+
}, zu = () => ({
|
|
4849
4857
|
id: $u(),
|
|
4850
4858
|
role: "user",
|
|
4851
4859
|
content: ""
|
|
@@ -4865,23 +4873,23 @@ const Dc = () => {
|
|
|
4865
4873
|
thinkTime: 0,
|
|
4866
4874
|
file: [],
|
|
4867
4875
|
urls: []
|
|
4868
|
-
}),
|
|
4876
|
+
}), Iu = async (F) => {
|
|
4869
4877
|
a.value = "", l.value = !0;
|
|
4870
|
-
const [D,
|
|
4871
|
-
if (!D)
|
|
4872
|
-
if (
|
|
4873
|
-
const
|
|
4878
|
+
const [D, Z] = await Ei({ chatId: F.id }).run();
|
|
4879
|
+
if (console.log("getRecordListApi", Z, D), !D)
|
|
4880
|
+
if (Z) {
|
|
4881
|
+
const Q = [];
|
|
4874
4882
|
let B = "", cu = "", au = "";
|
|
4875
|
-
|
|
4876
|
-
B || (B = U.chat_id), cu || (cu = U.searchType), au || (au = U.fold_id), U.fromType == 0 &&
|
|
4877
|
-
...
|
|
4883
|
+
Z && !Z.status && Z.forEach((U) => {
|
|
4884
|
+
B || (B = U.chat_id), cu || (cu = U.searchType), au || (au = U.fold_id), U.fromType == 0 && Q.push({
|
|
4885
|
+
...zu(),
|
|
4878
4886
|
content: U.content
|
|
4879
|
-
}), U.fromType == 1 && (U.files || (U.files = []), U.urls || (U.urls = []), U.urls.length && (U.urls = U.urls.map((
|
|
4880
|
-
name:
|
|
4881
|
-
appUrl:
|
|
4882
|
-
webUrl:
|
|
4887
|
+
}), U.fromType == 1 && (U.files || (U.files = []), U.urls || (U.urls = []), U.urls.length && (U.urls = U.urls.map((Fu) => ({
|
|
4888
|
+
name: Fu.name,
|
|
4889
|
+
appUrl: Fu.app_url,
|
|
4890
|
+
webUrl: Fu.web_url,
|
|
4883
4891
|
type: "url"
|
|
4884
|
-
})), U.files.unshift(...U.urls)),
|
|
4892
|
+
})), U.files.unshift(...U.urls)), Q.push({
|
|
4885
4893
|
...ue(),
|
|
4886
4894
|
content: U.content,
|
|
4887
4895
|
think: U.think,
|
|
@@ -4890,73 +4898,76 @@ const Dc = () => {
|
|
|
4890
4898
|
saved: U.knowledge_type == "1",
|
|
4891
4899
|
queryId: U.QueryId,
|
|
4892
4900
|
intention: U.intention,
|
|
4893
|
-
showSave: !
|
|
4901
|
+
showSave: !C.value.includes(U.intention)
|
|
4894
4902
|
}));
|
|
4895
|
-
}),
|
|
4903
|
+
}), console.log("arr", Q), Tu(), d.value = Q, o.value = B, x.searchType = cu || "1", cu == "1" && (x.folderId = au, au ? ju(au) : x.folderName = ""), Vu(), _u(), l.value = !1;
|
|
4896
4904
|
} else
|
|
4897
4905
|
l.value = !1;
|
|
4898
|
-
}, ju = async (
|
|
4899
|
-
if (!
|
|
4900
|
-
const [D,
|
|
4901
|
-
D
|
|
4902
|
-
},
|
|
4903
|
-
f.value = null, x.loading = !1,
|
|
4904
|
-
}, fe = (
|
|
4905
|
-
|
|
4906
|
+
}, ju = async (F) => {
|
|
4907
|
+
if (!F) return;
|
|
4908
|
+
const [D, Z] = await zi({ id: F }).run();
|
|
4909
|
+
console.log("getFolderDetailApi", D, Z), !D && Z && (x.folderName = Z.folderName);
|
|
4910
|
+
}, Tu = () => {
|
|
4911
|
+
console.log("openNewChat"), f.value = null, x.loading = !1, R(), r.value = 0, d.value = [], s.value = null, A.value = !1, y.value = !1, o.value = null, E0();
|
|
4912
|
+
}, fe = (F) => {
|
|
4913
|
+
console.log("addNewEmit", F), F == "addNew" && Tu(), F == "scrollBom" && (y.value = !1, _u());
|
|
4906
4914
|
}, L = () => {
|
|
4907
|
-
x.autoAudio = !x.autoAudio, x.autoAudio ||
|
|
4908
|
-
},
|
|
4909
|
-
|
|
4910
|
-
},
|
|
4911
|
-
if (
|
|
4915
|
+
x.autoAudio = !x.autoAudio, x.autoAudio || R();
|
|
4916
|
+
}, z = (F) => {
|
|
4917
|
+
w("sender", F.text);
|
|
4918
|
+
}, w = async (F, D) => {
|
|
4919
|
+
if (console.log("sender", F, D), F == "sender") {
|
|
4912
4920
|
if (x.loading) return;
|
|
4913
|
-
|
|
4914
|
-
const
|
|
4915
|
-
...
|
|
4921
|
+
R(), y.value = !1;
|
|
4922
|
+
const Z = {
|
|
4923
|
+
...zu(),
|
|
4916
4924
|
content: D
|
|
4917
|
-
},
|
|
4925
|
+
}, Q = {
|
|
4918
4926
|
...ue(),
|
|
4919
4927
|
loading: !0
|
|
4920
4928
|
};
|
|
4921
|
-
d.value.push(
|
|
4929
|
+
d.value.push(Z), d.value.push(Q), s.value = Q, Re(D);
|
|
4922
4930
|
}
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4931
|
+
if (F == "stopMsg" && pe(), F == "upload") {
|
|
4932
|
+
const Z = await p();
|
|
4933
|
+
console.log("senderEmit-upload", Z);
|
|
4934
|
+
}
|
|
4935
|
+
}, O = async (F, D) => {
|
|
4936
|
+
var Z, Q;
|
|
4937
|
+
if (console.log("chatEmitFn", F, D), F == "regenerate" && D) {
|
|
4927
4938
|
if (x.loading) return;
|
|
4928
|
-
if (
|
|
4929
|
-
const au = { queryId: D.queryId }, [U,
|
|
4930
|
-
if (U) return;
|
|
4939
|
+
if (R(), D.queryId) {
|
|
4940
|
+
const au = { queryId: D.queryId }, [U, Fu] = await Si(au).run();
|
|
4941
|
+
if (console.log("deleteChatByIddApi", U, Fu), U) return;
|
|
4931
4942
|
}
|
|
4932
4943
|
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;
|
|
4933
|
-
const B = d.value.findIndex((au) => au.id == D.id), cu = (
|
|
4934
|
-
|
|
4944
|
+
const B = d.value.findIndex((au) => au.id == D.id), cu = (Z = d.value[B - 1]) == null ? void 0 : Z.content;
|
|
4945
|
+
Re(cu);
|
|
4935
4946
|
}
|
|
4936
|
-
if (
|
|
4937
|
-
const B = D.item, cu = d.value.findIndex((
|
|
4938
|
-
await p({
|
|
4947
|
+
if (F == "saveKnowledgebase") {
|
|
4948
|
+
const B = D.item, cu = d.value.findIndex((Fu) => Fu.id == B.id), au = (Q = d.value[cu - 1]) == null ? void 0 : Q.content, U = await p({
|
|
4939
4949
|
currentItem: B,
|
|
4940
4950
|
sendVal: au.slice(0, 20),
|
|
4941
4951
|
// 知识库标题限制长度
|
|
4942
4952
|
dom: D.dom
|
|
4943
|
-
})
|
|
4953
|
+
});
|
|
4954
|
+
console.log("senderEmit-upload", U), U && (B.saved = !0, B.queryId && vi({ QueryId: B.queryId }).run());
|
|
4944
4955
|
}
|
|
4945
|
-
|
|
4946
|
-
}, N = (
|
|
4947
|
-
n("toApp",
|
|
4948
|
-
}, H = (
|
|
4949
|
-
c.value =
|
|
4956
|
+
F == "reference" && (s.value = D, a.value = "reference"), F == "play" && (D.data.audioStatus == "normal" ? (R(), E(0, D.data)) : (s.value && (s.value.audioStatus = "normal"), R())), F == "preview" && H(D);
|
|
4957
|
+
}, N = (F) => {
|
|
4958
|
+
n("toApp", F);
|
|
4959
|
+
}, H = (F) => {
|
|
4960
|
+
c.value = F, console.log("preview", i.value), Ae(() => {
|
|
4950
4961
|
var D;
|
|
4951
4962
|
(D = i.value) == null || D.preview();
|
|
4952
4963
|
});
|
|
4953
|
-
}, eu = (
|
|
4954
|
-
|
|
4964
|
+
}, eu = (F) => {
|
|
4965
|
+
console.log("toRecord2", F), R(), a.value = "history";
|
|
4955
4966
|
}, Eu = () => {
|
|
4956
4967
|
a.value = "";
|
|
4957
|
-
}, qe = (
|
|
4968
|
+
}, qe = (F) => {
|
|
4958
4969
|
const D = {
|
|
4959
|
-
query:
|
|
4970
|
+
query: F,
|
|
4960
4971
|
deepThinkFlag: x.deepseek ? "1" : "0",
|
|
4961
4972
|
// project: getProjectInfo().id,
|
|
4962
4973
|
isInnerSearch: "0",
|
|
@@ -4966,56 +4977,56 @@ const Dc = () => {
|
|
|
4966
4977
|
isGlobalSearch: "0"
|
|
4967
4978
|
//是否搜索全网(0否1是)
|
|
4968
4979
|
};
|
|
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);
|
|
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"), console.log("getPayload", D), JSON.stringify(D);
|
|
4970
4981
|
}, Gt = () => {
|
|
4971
|
-
const
|
|
4982
|
+
const F = {
|
|
4972
4983
|
// Authorization: `Bearer ${getToken()}`,
|
|
4973
4984
|
"Content-Type": "application/json",
|
|
4974
4985
|
Timezone: dt.tz.guess()
|
|
4975
4986
|
};
|
|
4976
|
-
return re() && (
|
|
4987
|
+
return re() && (F.Authorization = `Bearer ${re()}`), F;
|
|
4977
4988
|
};
|
|
4978
4989
|
let he = "";
|
|
4979
|
-
const
|
|
4990
|
+
const Re = (F) => {
|
|
4980
4991
|
x.loading = !0, _u();
|
|
4981
4992
|
const D = new tu(`${st().baseURL}${Lc}?project=${lt().id}`, {
|
|
4982
4993
|
method: "POST",
|
|
4983
4994
|
// 使用 POST 请求
|
|
4984
4995
|
headers: Gt(),
|
|
4985
|
-
payload: qe(
|
|
4996
|
+
payload: qe(F),
|
|
4986
4997
|
// POST 请求体
|
|
4987
4998
|
//重连时间间隔,单位:毫秒,默认45000毫秒,这里设置为10分钟
|
|
4988
4999
|
heartbeatTimeout: 10 * 60 * 1e3
|
|
4989
5000
|
});
|
|
4990
5001
|
he = $u();
|
|
4991
|
-
const
|
|
4992
|
-
D.onmessage = (
|
|
4993
|
-
if (
|
|
4994
|
-
if (
|
|
4995
|
-
D.close(), x.loading = !1, s.value.loading = !1, x.autoAudio && s.value.content && s.value.audioStatus != "normal" && E(1, s.value, ""), _u();
|
|
5002
|
+
const Z = he;
|
|
5003
|
+
D.onmessage = (Q) => {
|
|
5004
|
+
if (console.log("sseSource-onmessage", Q), Z != he) return;
|
|
5005
|
+
if (Q.data == "[DONE]") {
|
|
5006
|
+
D.close(), console.log("currentItem.value.content", s.value), x.loading = !1, s.value.loading = !1, x.autoAudio && s.value.content && s.value.audioStatus != "normal" && E(1, s.value, ""), _u();
|
|
4996
5007
|
return;
|
|
4997
5008
|
}
|
|
4998
|
-
const B = JSON.parse(
|
|
4999
|
-
if (s.value.intention || (s.value.intention = B.intention, s.value.showSave = !
|
|
5000
|
-
if (
|
|
5001
|
-
const cu = (/* @__PURE__ */ new Date()).getTime() -
|
|
5002
|
-
|
|
5009
|
+
const B = JSON.parse(Q.data);
|
|
5010
|
+
if (s.value.intention || (s.value.intention = B.intention, s.value.showSave = !C.value.includes(B.intention)), B.type == "queryId" && (s.value.queryId || (s.value.queryId = B.content)), B.type == "think" && (s.value.think || (P = (/* @__PURE__ */ new Date()).getTime()), s.value.think = s.value.think + B.content), B.type == "text") {
|
|
5011
|
+
if (P && s.value.think && !s.value.content) {
|
|
5012
|
+
const cu = (/* @__PURE__ */ new Date()).getTime() - P;
|
|
5013
|
+
P = 0, s.value.thinkTime = parseInt(`${cu / 1e3}`);
|
|
5003
5014
|
}
|
|
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));
|
|
5015
|
+
s.value.content = s.value.content + B.content, s.value.showSave, x.autoAudio && (console.log("autoAudio", s.value.audioStatus), s.value.audioStatus == "normal" ? E(1, s.value, s.value.content) : E(1, s.value, B.content));
|
|
5005
5016
|
}
|
|
5006
5017
|
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();
|
|
5007
|
-
}, D.onerror = (
|
|
5008
|
-
D.close(), x.loading = !1, s.value.content = I("连接错误");
|
|
5018
|
+
}, D.onerror = (Q) => {
|
|
5019
|
+
console.error("SSE error:", Q), D.close(), x.loading = !1, s.value.content = I("连接错误");
|
|
5009
5020
|
}, f.value = D;
|
|
5010
5021
|
}, pe = () => {
|
|
5011
|
-
var
|
|
5012
|
-
if ((
|
|
5013
|
-
const D = (/* @__PURE__ */ new Date()).getTime() -
|
|
5014
|
-
|
|
5022
|
+
var F;
|
|
5023
|
+
if ((F = f.value) == null || F.close(), x.loading = !1, Kt(), s.value && (s.value.loading = !1, console.log("stopMsg1", s.value.think), console.log("stopMsg2", s.value.thinkTime), s.value.think && !s.value.thinkTime)) {
|
|
5024
|
+
const D = (/* @__PURE__ */ new Date()).getTime() - P;
|
|
5025
|
+
P = 0, s.value.thinkTime = parseInt(`${D / 1e3}`);
|
|
5015
5026
|
}
|
|
5016
5027
|
}, Kt = async () => {
|
|
5017
5028
|
if (s.value && s.value.loading && s.value.queryId && s.value.content) {
|
|
5018
|
-
let
|
|
5029
|
+
let F = s.value.file ? s.value.file.filter((B) => B.type != "url") : [];
|
|
5019
5030
|
const D = {
|
|
5020
5031
|
chat_id: o.value,
|
|
5021
5032
|
//会话id
|
|
@@ -5038,7 +5049,7 @@ const Dc = () => {
|
|
|
5038
5049
|
web_url: B.webUrl
|
|
5039
5050
|
})) : [],
|
|
5040
5051
|
//
|
|
5041
|
-
files:
|
|
5052
|
+
files: F.map((B) => ({
|
|
5042
5053
|
name: B.name,
|
|
5043
5054
|
summary: B.summary,
|
|
5044
5055
|
url: B.url
|
|
@@ -5046,70 +5057,70 @@ const Dc = () => {
|
|
|
5046
5057
|
//
|
|
5047
5058
|
};
|
|
5048
5059
|
D.searchType == "1" && (D.fold_id = x.folderId == x.allKnowId ? "" : x.folderId);
|
|
5049
|
-
const [
|
|
5050
|
-
if (
|
|
5060
|
+
const [Z, Q] = await Ci(D).run();
|
|
5061
|
+
if (console.log("stopChatApi", Q, Z), Z) return;
|
|
5051
5062
|
}
|
|
5052
5063
|
};
|
|
5053
5064
|
return e({
|
|
5054
|
-
senderVal: (
|
|
5055
|
-
x.senderValue = `${x.senderValue}${
|
|
5065
|
+
senderVal: (F) => {
|
|
5066
|
+
x.senderValue = `${x.senderValue}${F}`;
|
|
5056
5067
|
},
|
|
5057
5068
|
outSendMsg: () => {
|
|
5058
|
-
x.senderValue &&
|
|
5069
|
+
x.senderValue && w("sender", x.senderValue);
|
|
5059
5070
|
},
|
|
5060
5071
|
hideFn: K,
|
|
5061
5072
|
playAudioFn: () => {
|
|
5062
|
-
const
|
|
5073
|
+
const F = d.value.findLastIndex((Z) => Z.role == "ai"), D = d.value[F] ? d.value[F] : null;
|
|
5063
5074
|
D && E(0, D);
|
|
5064
5075
|
},
|
|
5065
|
-
pauseAudio:
|
|
5076
|
+
pauseAudio: R,
|
|
5066
5077
|
stopMsg: pe,
|
|
5067
|
-
openNewChat:
|
|
5068
|
-
}), (
|
|
5069
|
-
const
|
|
5070
|
-
return Au((
|
|
5071
|
-
a.value ? (
|
|
5072
|
-
a.value == "reference" ? (
|
|
5078
|
+
openNewChat: Tu
|
|
5079
|
+
}), (F, D) => {
|
|
5080
|
+
const Z = Wt("dasLoading");
|
|
5081
|
+
return Au((S(), q("div", Ec, [
|
|
5082
|
+
a.value ? (S(), q("div", Fc, [
|
|
5083
|
+
a.value == "reference" ? (S(), Y(ic, {
|
|
5073
5084
|
key: 0,
|
|
5074
5085
|
item: s.value,
|
|
5075
5086
|
onPreview: H,
|
|
5076
5087
|
onBack: Eu,
|
|
5077
5088
|
onToApp: N
|
|
5078
5089
|
}, null, 8, ["item"])) : $("", !0),
|
|
5079
|
-
a.value == "history" ? (
|
|
5090
|
+
a.value == "history" ? (S(), Y(Ac, {
|
|
5080
5091
|
key: 1,
|
|
5081
5092
|
chatId: o.value,
|
|
5082
|
-
onRecord:
|
|
5093
|
+
onRecord: Iu,
|
|
5083
5094
|
onBack: Eu
|
|
5084
5095
|
}, null, 8, ["chatId"])) : $("", !0)
|
|
5085
5096
|
])) : $("", !0),
|
|
5086
|
-
|
|
5087
|
-
|
|
5097
|
+
k("div", wc, [
|
|
5098
|
+
k("div", Sc, [
|
|
5088
5099
|
j(Gi, {
|
|
5089
|
-
onBack:
|
|
5100
|
+
onBack: Tu,
|
|
5090
5101
|
listLength: d.value.length
|
|
5091
5102
|
}, null, 8, ["listLength"])
|
|
5092
5103
|
]),
|
|
5093
|
-
|
|
5094
|
-
j(
|
|
5104
|
+
k("div", zc, [
|
|
5105
|
+
j(v(vu), {
|
|
5095
5106
|
placement: "top",
|
|
5096
5107
|
type: "button"
|
|
5097
5108
|
}, {
|
|
5098
5109
|
content: J(() => [
|
|
5099
|
-
|
|
5110
|
+
k("div", null, V(v(I)("自动播报")), 1)
|
|
5100
5111
|
]),
|
|
5101
5112
|
default: J(() => [
|
|
5102
|
-
|
|
5113
|
+
k("div", {
|
|
5103
5114
|
onClick: L,
|
|
5104
5115
|
style: { "margin-right": "16px" },
|
|
5105
5116
|
class: "ai-top-right-icon"
|
|
5106
5117
|
}, [
|
|
5107
|
-
|
|
5118
|
+
v(x).autoAudio ? (S(), Y(v(r0), {
|
|
5108
5119
|
key: 0,
|
|
5109
5120
|
customSize: "20",
|
|
5110
5121
|
iconColor: "#006DF1"
|
|
5111
5122
|
})) : $("", !0),
|
|
5112
|
-
|
|
5123
|
+
v(x).autoAudio ? $("", !0) : (S(), Y(v(o0), {
|
|
5113
5124
|
key: 1,
|
|
5114
5125
|
customSize: "20",
|
|
5115
5126
|
iconColor: "#333333"
|
|
@@ -5118,19 +5129,19 @@ const Dc = () => {
|
|
|
5118
5129
|
]),
|
|
5119
5130
|
_: 1
|
|
5120
5131
|
}),
|
|
5121
|
-
j(
|
|
5132
|
+
j(v(vu), {
|
|
5122
5133
|
placement: "top",
|
|
5123
5134
|
type: "button"
|
|
5124
5135
|
}, {
|
|
5125
5136
|
content: J(() => [
|
|
5126
|
-
|
|
5137
|
+
k("div", null, V(v(I)("历史会话")), 1)
|
|
5127
5138
|
]),
|
|
5128
5139
|
default: J(() => [
|
|
5129
|
-
|
|
5140
|
+
k("div", {
|
|
5130
5141
|
onClick: eu,
|
|
5131
5142
|
class: "ai-top-right-icon"
|
|
5132
5143
|
}, [
|
|
5133
|
-
j(
|
|
5144
|
+
j(v(i0), {
|
|
5134
5145
|
customSize: "20",
|
|
5135
5146
|
iconColor: "#666666"
|
|
5136
5147
|
})
|
|
@@ -5140,8 +5151,8 @@ const Dc = () => {
|
|
|
5140
5151
|
})
|
|
5141
5152
|
])
|
|
5142
5153
|
]),
|
|
5143
|
-
d.value.length ? (
|
|
5144
|
-
j(
|
|
5154
|
+
d.value.length ? (S(), q("div", Ic, [
|
|
5155
|
+
j(v(we), {
|
|
5145
5156
|
"wrap-class": "das-ai-wrap-class",
|
|
5146
5157
|
onScroll: fu
|
|
5147
5158
|
}, {
|
|
@@ -5154,59 +5165,59 @@ const Dc = () => {
|
|
|
5154
5165
|
_: 1
|
|
5155
5166
|
})
|
|
5156
5167
|
])) : $("", !0),
|
|
5157
|
-
d.value.length ? $("", !0) : (
|
|
5168
|
+
d.value.length ? $("", !0) : (S(), Y(ki, {
|
|
5158
5169
|
key: 2,
|
|
5159
5170
|
list: _.value,
|
|
5160
|
-
onClick:
|
|
5171
|
+
onClick: z
|
|
5161
5172
|
}, null, 8, ["list"])),
|
|
5162
|
-
d.value.length ? (
|
|
5163
|
-
D[0] || (D[0] =
|
|
5173
|
+
d.value.length ? (S(), q("div", Tc, [
|
|
5174
|
+
D[0] || (D[0] = k("div", { class: "chat-new-top-mask" }, null, -1)),
|
|
5164
5175
|
j(fi, { onAddNewEmit: fe })
|
|
5165
5176
|
])) : $("", !0),
|
|
5166
|
-
|
|
5167
|
-
|
|
5177
|
+
k("div", Mc, [
|
|
5178
|
+
k("div", Oc, [
|
|
5168
5179
|
j(ci, {
|
|
5169
5180
|
isNew: !d.value.length,
|
|
5170
|
-
onSenderEmit:
|
|
5181
|
+
onSenderEmit: w
|
|
5171
5182
|
}, null, 8, ["isNew"])
|
|
5172
5183
|
]),
|
|
5173
|
-
D[1] || (D[1] =
|
|
5184
|
+
D[1] || (D[1] = k("div", { class: "das-ai-chat-input-tip" }, null, -1))
|
|
5174
5185
|
]),
|
|
5175
|
-
j(
|
|
5176
|
-
j(
|
|
5186
|
+
j(v(g)),
|
|
5187
|
+
j(v(c0), {
|
|
5177
5188
|
ref_key: "dasPreviewRef",
|
|
5178
5189
|
ref: i,
|
|
5179
5190
|
"file-url": c.value
|
|
5180
5191
|
}, null, 8, ["file-url"]),
|
|
5181
|
-
|
|
5182
|
-
src:
|
|
5192
|
+
k("audio", {
|
|
5193
|
+
src: v(T),
|
|
5183
5194
|
class: "ai-audio-class",
|
|
5184
5195
|
ref_key: "aiAudioRef",
|
|
5185
5196
|
ref: b,
|
|
5186
|
-
muted: !
|
|
5197
|
+
muted: !v(m),
|
|
5187
5198
|
autoplay: ""
|
|
5188
5199
|
}, null, 8, Nc)
|
|
5189
5200
|
])), [
|
|
5190
|
-
[
|
|
5201
|
+
[Z, l.value]
|
|
5191
5202
|
]);
|
|
5192
5203
|
};
|
|
5193
5204
|
}
|
|
5194
|
-
}), qc = /* @__PURE__ */ iu(Bc, [["__scopeId", "data-v-2d50bbce"]]),
|
|
5205
|
+
}), qc = /* @__PURE__ */ iu(Bc, [["__scopeId", "data-v-2d50bbce"]]), Rc = { class: "das-ai-panel-div 2" }, Pc = { class: "das-ai-panel-coantainer-header" }, jc = { class: "das-ai-panel-header-title" }, Hc = { class: "das-ai-panel-coantainer-body" }, $c = /* @__PURE__ */ ou({
|
|
5195
5206
|
__name: "index",
|
|
5196
5207
|
emits: ["confirm", "toApp", "getStatus"],
|
|
5197
5208
|
setup(u, { expose: e, emit: t }) {
|
|
5198
|
-
const n = t, r = e0(), o =
|
|
5209
|
+
const n = t, r = e0(), o = M(), c = M(0), i = M(), a = M(!1);
|
|
5199
5210
|
bu(
|
|
5200
5211
|
() => r == null ? void 0 : r.path,
|
|
5201
|
-
(m,
|
|
5202
|
-
f();
|
|
5212
|
+
(m, T) => {
|
|
5213
|
+
console.log(`路由从 ${T} 变为 ${m}`), f();
|
|
5203
5214
|
}
|
|
5204
5215
|
), qu(() => {
|
|
5205
5216
|
setTimeout(() => {
|
|
5206
5217
|
Ae(() => {
|
|
5207
5218
|
let m = document.getElementsByClassName("das-web-app-header")[0];
|
|
5208
|
-
m && (c.value = m.clientHeight), m && !i.value && (i.value = C0((
|
|
5209
|
-
c.value =
|
|
5219
|
+
m && (c.value = m.clientHeight), m && !i.value && (i.value = C0((T) => {
|
|
5220
|
+
c.value = T.height;
|
|
5210
5221
|
}, m));
|
|
5211
5222
|
});
|
|
5212
5223
|
}, 1e3);
|
|
@@ -5215,7 +5226,7 @@ const Dc = () => {
|
|
|
5215
5226
|
(m = i.value) == null || m.disconnect(), i.value = null;
|
|
5216
5227
|
});
|
|
5217
5228
|
const s = (m) => {
|
|
5218
|
-
n("toApp", m);
|
|
5229
|
+
console.log("toApp", m), n("toApp", m);
|
|
5219
5230
|
}, l = () => {
|
|
5220
5231
|
a.value || (a.value = !0, n("getStatus", !0));
|
|
5221
5232
|
}, f = () => {
|
|
@@ -5250,34 +5261,34 @@ const Dc = () => {
|
|
|
5250
5261
|
(m = o.value) == null || m.outSendMsg();
|
|
5251
5262
|
},
|
|
5252
5263
|
senderVal: (m) => {
|
|
5253
|
-
var
|
|
5254
|
-
(
|
|
5264
|
+
var T;
|
|
5265
|
+
(T = o.value) == null || T.senderVal(m);
|
|
5255
5266
|
},
|
|
5256
5267
|
clearSenderVal: () => {
|
|
5257
5268
|
x.senderValue = "";
|
|
5258
5269
|
},
|
|
5259
5270
|
openPanel: l,
|
|
5260
5271
|
closePanel: f
|
|
5261
|
-
}), (m,
|
|
5272
|
+
}), (m, T) => (S(), q("div", Rc, [
|
|
5262
5273
|
j(Xt, { name: "das-ai-panel" }, {
|
|
5263
5274
|
default: J(() => [
|
|
5264
|
-
Au(
|
|
5275
|
+
Au(k("div", {
|
|
5265
5276
|
class: "das-ai-panel-coantainer",
|
|
5266
5277
|
style: Yt({ top: `${c.value}px` })
|
|
5267
5278
|
}, [
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5279
|
+
k("div", Pc, [
|
|
5280
|
+
k("div", jc, V(v(I)("AI助手")), 1),
|
|
5281
|
+
k("div", {
|
|
5271
5282
|
onClick: f,
|
|
5272
5283
|
class: "das-ai-panel-header-close"
|
|
5273
5284
|
}, [
|
|
5274
|
-
j(
|
|
5285
|
+
j(v(t0), {
|
|
5275
5286
|
size: "medium",
|
|
5276
5287
|
iconColor: "#666666"
|
|
5277
5288
|
})
|
|
5278
5289
|
])
|
|
5279
5290
|
]),
|
|
5280
|
-
|
|
5291
|
+
k("div", Hc, [
|
|
5281
5292
|
j(qc, {
|
|
5282
5293
|
ref_key: "dasAiVueRef",
|
|
5283
5294
|
ref: o,
|
|
@@ -5387,7 +5398,7 @@ const Dc = () => {
|
|
|
5387
5398
|
}
|
|
5388
5399
|
};
|
|
5389
5400
|
n0(Uc);
|
|
5390
|
-
const Oa = () =>
|
|
5401
|
+
const Oa = () => M(null), Na = u0(Vc);
|
|
5391
5402
|
export {
|
|
5392
5403
|
Na as D,
|
|
5393
5404
|
iu as _,
|