@fses/workbench-app 0.3.6 → 0.3.8
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/WORKBENCH-CLOSURE.json +12 -12
- package/dist/{WorkbenchCardCenterDrawer-HJ0aLMoa.js → WorkbenchCardCenterDrawer-ClILtOq1.js} +3 -3
- package/dist/{WorkbenchDiagnosticsFooter-CnowGKmK.js → WorkbenchDiagnosticsFooter-3yFRUgiy.js} +1 -1
- package/dist/{WorkbenchDiagnosticsPage-Cr2NcLXT.js → WorkbenchDiagnosticsPage-B2QxfJ6d.js} +1 -1
- package/dist/{Workspace-Cfs67QRS.js → Workspace-c1KUGFx3.js} +4079 -4079
- package/dist/canvas/api/index.js +1 -1
- package/dist/{canvasFacade-ZFqB_i7z.js → canvasFacade-DlebDEqi.js} +1 -1
- package/dist/{cardFactory-D5dyYSC3.js → cardFactory-Bmt-0aZg.js} +345 -338
- package/dist/config/workbenchAppConfig.d.ts +14 -1
- package/dist/{customCardCatalog-DQcReAqL.js → customCardCatalog-By8jCrf4.js} +3 -3
- package/dist/extensions/index.js +1 -1
- package/dist/fses-workbench-app.js +5 -5
- package/dist/{index-oCa4LJJn.js → index-DfuSursG.js} +9 -8
- package/dist/internal/personal-workbench/extensions/runtimeExtensions.d.ts +6 -1
- package/dist/{normalizeWorkbenchExtensions-Ccv3n3fC.js → normalizeWorkbenchExtensions-Ve5GcdIX.js} +1 -1
- package/dist/runtime/conversation/workbenchChatMessageOrdering.d.ts +1 -0
- package/dist/runtime/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{useWorkbenchRuntime-7mQAjEV9.js → useWorkbenchRuntime-CtEXD1vZ.js} +3544 -3534
- package/dist/version.d.ts +1 -1
- package/node_modules/@fses/ai-chat/dist/composables/types.d.ts +5 -0
- package/node_modules/@fses/ai-chat/dist/fses-ai-chat.js +869 -858
- package/node_modules/@fses/ai-chat/dist/fses-ai-chat.umd.cjs +13 -13
- package/node_modules/@fses/ai-chat/dist/style.css +1 -1
- package/node_modules/@fses/ai-chat/package.json +5 -5
- package/node_modules/@fses/workbench-card/package.json +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as oe, computed as ne, watch as Wa, inject as io, defineComponent as Wt, onMounted as co, onUnmounted as bm, openBlock as S, createElementBlock as I, normalizeStyle as uc, createElementVNode as x, toDisplayString as N, unref as M, createCommentVNode as ie, nextTick as ht, createVNode as
|
|
1
|
+
import { ref as oe, computed as ne, watch as Wa, inject as io, defineComponent as Wt, onMounted as co, onUnmounted as bm, openBlock as S, createElementBlock as I, normalizeStyle as uc, createElementVNode as x, toDisplayString as N, unref as M, createCommentVNode as ie, nextTick as ht, createVNode as ma, Fragment as ra, renderList as Ca, getCurrentInstance as no, normalizeClass as ia, withKeys as Zs, withModifiers as Bt, createTextVNode as Dc, onBeforeUnmount as Es, createBlock as Xa, reactive as lo, withDirectives as bi, vModelText as gi, renderSlot as Er, Teleport as Rr, resolveDynamicComponent as Yn, provide as gm, useSlots as Cm, withCtx as ks } from "vue";
|
|
2
2
|
import { EditOutlined as oo, CheckOutlined as Tm, CloseOutlined as Ci, PlusOutlined as vm, SendOutlined as xm, LoadingOutlined as hc, ClockCircleOutlined as yc, CloseCircleOutlined as Zn, CheckCircleOutlined as Jn, DownOutlined as Pm, MessageOutlined as Am, SettingOutlined as Sm, LeftOutlined as Xn, CommentOutlined as el, EllipsisOutlined as al, DragOutlined as km } from "@ant-design/icons-vue";
|
|
3
3
|
import { Tooltip as vr, message as _m } from "ant-design-vue";
|
|
4
4
|
import { Marked as po } from "marked";
|
|
@@ -68,7 +68,7 @@ function Bm(e) {
|
|
|
68
68
|
return bc(e, i);
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function Le(e, t) {
|
|
72
72
|
let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : wr;
|
|
73
73
|
if (sl && sl(e, null), !ut(t))
|
|
74
74
|
return e;
|
|
@@ -225,7 +225,7 @@ function fo() {
|
|
|
225
225
|
HTMLFormElement: H,
|
|
226
226
|
DOMParser: A,
|
|
227
227
|
trustedTypes: R
|
|
228
|
-
} = e, z = F.prototype,
|
|
228
|
+
} = e, z = F.prototype, K = Hs(z, "cloneNode"), se = Hs(z, "remove"), Ke = Hs(z, "nextSibling"), he = Hs(z, "childNodes"), ve = Hs(z, "parentNode");
|
|
229
229
|
if (typeof f == "function") {
|
|
230
230
|
const Te = i.createElement("template");
|
|
231
231
|
Te.content && Te.content.ownerDocument && (i = Te.content.ownerDocument);
|
|
@@ -234,29 +234,29 @@ function fo() {
|
|
|
234
234
|
const {
|
|
235
235
|
implementation: me,
|
|
236
236
|
createNodeIterator: re,
|
|
237
|
-
createDocumentFragment:
|
|
237
|
+
createDocumentFragment: qe,
|
|
238
238
|
getElementsByTagName: fe
|
|
239
239
|
} = i, {
|
|
240
|
-
importNode:
|
|
240
|
+
importNode: Ie
|
|
241
241
|
} = n;
|
|
242
242
|
let Se = hl();
|
|
243
243
|
t.isSupported = typeof uo == "function" && typeof ve == "function" && me && me.createHTMLDocument !== void 0;
|
|
244
244
|
const {
|
|
245
|
-
MUSTACHE_EXPR:
|
|
245
|
+
MUSTACHE_EXPR: Be,
|
|
246
246
|
ERB_EXPR: Ba,
|
|
247
247
|
TMPLIT_EXPR: Qa,
|
|
248
|
-
DATA_ATTR:
|
|
249
|
-
ARIA_ATTR:
|
|
248
|
+
DATA_ATTR: fa,
|
|
249
|
+
ARIA_ATTR: ba,
|
|
250
250
|
IS_SCRIPT_OR_DATA: Aa,
|
|
251
251
|
ATTR_WHITESPACE: Da,
|
|
252
252
|
CUSTOM_ELEMENT: Ta
|
|
253
253
|
} = ul;
|
|
254
254
|
let {
|
|
255
255
|
IS_ALLOWED_URI: rt
|
|
256
|
-
} = ul,
|
|
257
|
-
const et =
|
|
258
|
-
let
|
|
259
|
-
const Ya =
|
|
256
|
+
} = ul, Ge = null;
|
|
257
|
+
const et = Le({}, [...ol, ...Xi, ...ec, ...ac, ...dl]);
|
|
258
|
+
let ga = null;
|
|
259
|
+
const Ya = Le({}, [...pl, ...tc, ...ml, ...ii]);
|
|
260
260
|
let We = Object.seal($s(null, {
|
|
261
261
|
tagNameCheck: {
|
|
262
262
|
writable: !0,
|
|
@@ -291,18 +291,18 @@ function fo() {
|
|
|
291
291
|
value: null
|
|
292
292
|
}
|
|
293
293
|
}));
|
|
294
|
-
let j = !0, J = !0, k = !1, X = !0, te = !1,
|
|
295
|
-
const
|
|
296
|
-
let Ze = !0,
|
|
297
|
-
const W =
|
|
294
|
+
let j = !0, J = !0, k = !1, X = !0, te = !1, q = !0, B = !1, Y = !1, le = !1, ke = !1, Re = !1, De = !1, ea = !0, Fe = !1;
|
|
295
|
+
const ca = "user-content-";
|
|
296
|
+
let Ze = !0, ua = !1, aa = {}, E = null;
|
|
297
|
+
const W = Le({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
298
298
|
let ce = null;
|
|
299
|
-
const de =
|
|
299
|
+
const de = Le({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
300
300
|
let Ee = null;
|
|
301
|
-
const
|
|
302
|
-
let w = v, Z = !1,
|
|
303
|
-
const
|
|
304
|
-
let
|
|
305
|
-
const Va =
|
|
301
|
+
const Oe = Le({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Ve = "http://www.w3.org/1998/Math/MathML", u = "http://www.w3.org/2000/svg", v = "http://www.w3.org/1999/xhtml";
|
|
302
|
+
let w = v, Z = !1, _e = null;
|
|
303
|
+
const Me = Le({}, [Ve, u, v], Ji);
|
|
304
|
+
let ta = Le({}, ["mi", "mo", "mn", "ms", "mtext"]), it = Le({}, ["annotation-xml"]);
|
|
305
|
+
const Va = Le({}, ["title", "style", "font", "a", "script"]);
|
|
306
306
|
let Fa = null;
|
|
307
307
|
const ja = ["application/xhtml+xml", "text/html"], Ia = "text/html";
|
|
308
308
|
let ha = null, ct = null;
|
|
@@ -313,9 +313,9 @@ function fo() {
|
|
|
313
313
|
if (ct && ct === T)
|
|
314
314
|
return;
|
|
315
315
|
(!T || typeof T != "object") && (T = {}), T = Ct(T), Fa = // eslint-disable-next-line unicorn/prefer-includes
|
|
316
|
-
ja.indexOf(T.PARSER_MEDIA_TYPE) === -1 ? Ia : T.PARSER_MEDIA_TYPE, ha = Fa === "application/xhtml+xml" ? Ji : wr,
|
|
316
|
+
ja.indexOf(T.PARSER_MEDIA_TYPE) === -1 ? Ia : T.PARSER_MEDIA_TYPE, ha = Fa === "application/xhtml+xml" ? Ji : wr, Ge = wa(T, "ALLOWED_TAGS") && ut(T.ALLOWED_TAGS) ? Le({}, T.ALLOWED_TAGS, ha) : et, ga = wa(T, "ALLOWED_ATTR") && ut(T.ALLOWED_ATTR) ? Le({}, T.ALLOWED_ATTR, ha) : Ya, _e = wa(T, "ALLOWED_NAMESPACES") && ut(T.ALLOWED_NAMESPACES) ? Le({}, T.ALLOWED_NAMESPACES, Ji) : Me, Ee = wa(T, "ADD_URI_SAFE_ATTR") && ut(T.ADD_URI_SAFE_ATTR) ? Le(Ct(Oe), T.ADD_URI_SAFE_ATTR, ha) : Oe, ce = wa(T, "ADD_DATA_URI_TAGS") && ut(T.ADD_DATA_URI_TAGS) ? Le(Ct(de), T.ADD_DATA_URI_TAGS, ha) : de, E = wa(T, "FORBID_CONTENTS") && ut(T.FORBID_CONTENTS) ? Le({}, T.FORBID_CONTENTS, ha) : W, va = wa(T, "FORBID_TAGS") && ut(T.FORBID_TAGS) ? Le({}, T.FORBID_TAGS, ha) : Ct({}), xa = wa(T, "FORBID_ATTR") && ut(T.FORBID_ATTR) ? Le({}, T.FORBID_ATTR, ha) : Ct({}), aa = wa(T, "USE_PROFILES") ? T.USE_PROFILES && typeof T.USE_PROFILES == "object" ? Ct(T.USE_PROFILES) : T.USE_PROFILES : !1, j = T.ALLOW_ARIA_ATTR !== !1, J = T.ALLOW_DATA_ATTR !== !1, k = T.ALLOW_UNKNOWN_PROTOCOLS || !1, X = T.ALLOW_SELF_CLOSE_IN_ATTR !== !1, te = T.SAFE_FOR_TEMPLATES || !1, q = T.SAFE_FOR_XML !== !1, B = T.WHOLE_DOCUMENT || !1, ke = T.RETURN_DOM || !1, Re = T.RETURN_DOM_FRAGMENT || !1, De = T.RETURN_TRUSTED_TYPE || !1, le = T.FORCE_BODY || !1, ea = T.SANITIZE_DOM !== !1, Fe = T.SANITIZE_NAMED_PROPS || !1, Ze = T.KEEP_CONTENT !== !1, ua = T.IN_PLACE || !1, rt = Km(T.ALLOWED_URI_REGEXP) ? T.ALLOWED_URI_REGEXP : ho, w = typeof T.NAMESPACE == "string" ? T.NAMESPACE : v, ta = wa(T, "MATHML_TEXT_INTEGRATION_POINTS") && T.MATHML_TEXT_INTEGRATION_POINTS && typeof T.MATHML_TEXT_INTEGRATION_POINTS == "object" ? Ct(T.MATHML_TEXT_INTEGRATION_POINTS) : Le({}, ["mi", "mo", "mn", "ms", "mtext"]), it = wa(T, "HTML_INTEGRATION_POINTS") && T.HTML_INTEGRATION_POINTS && typeof T.HTML_INTEGRATION_POINTS == "object" ? Ct(T.HTML_INTEGRATION_POINTS) : Le({}, ["annotation-xml"]);
|
|
317
317
|
const O = wa(T, "CUSTOM_ELEMENT_HANDLING") && T.CUSTOM_ELEMENT_HANDLING && typeof T.CUSTOM_ELEMENT_HANDLING == "object" ? Ct(T.CUSTOM_ELEMENT_HANDLING) : $s(null);
|
|
318
|
-
if (We = $s(null), wa(O, "tagNameCheck") && jt(O.tagNameCheck) && (We.tagNameCheck = O.tagNameCheck), wa(O, "attributeNameCheck") && jt(O.attributeNameCheck) && (We.attributeNameCheck = O.attributeNameCheck), wa(O, "allowCustomizedBuiltInElements") && typeof O.allowCustomizedBuiltInElements == "boolean" && (We.allowCustomizedBuiltInElements = O.allowCustomizedBuiltInElements), te && (J = !1), Re && (ke = !0), aa && (
|
|
318
|
+
if (We = $s(null), wa(O, "tagNameCheck") && jt(O.tagNameCheck) && (We.tagNameCheck = O.tagNameCheck), wa(O, "attributeNameCheck") && jt(O.attributeNameCheck) && (We.attributeNameCheck = O.attributeNameCheck), wa(O, "allowCustomizedBuiltInElements") && typeof O.allowCustomizedBuiltInElements == "boolean" && (We.allowCustomizedBuiltInElements = O.allowCustomizedBuiltInElements), te && (J = !1), Re && (ke = !0), aa && (Ge = Le({}, dl), ga = $s(null), aa.html === !0 && (Le(Ge, ol), Le(ga, pl)), aa.svg === !0 && (Le(Ge, Xi), Le(ga, tc), Le(ga, ii)), aa.svgFilters === !0 && (Le(Ge, ec), Le(ga, tc), Le(ga, ii)), aa.mathMl === !0 && (Le(Ge, ac), Le(ga, ml), Le(ga, ii))), L.tagCheck = null, L.attributeCheck = null, wa(T, "ADD_TAGS") && (typeof T.ADD_TAGS == "function" ? L.tagCheck = T.ADD_TAGS : ut(T.ADD_TAGS) && (Ge === et && (Ge = Ct(Ge)), Le(Ge, T.ADD_TAGS, ha))), wa(T, "ADD_ATTR") && (typeof T.ADD_ATTR == "function" ? L.attributeCheck = T.ADD_ATTR : ut(T.ADD_ATTR) && (ga === Ya && (ga = Ct(ga)), Le(ga, T.ADD_ATTR, ha))), wa(T, "ADD_URI_SAFE_ATTR") && ut(T.ADD_URI_SAFE_ATTR) && Le(Ee, T.ADD_URI_SAFE_ATTR, ha), wa(T, "FORBID_CONTENTS") && ut(T.FORBID_CONTENTS) && (E === W && (E = Ct(E)), Le(E, T.FORBID_CONTENTS, ha)), wa(T, "ADD_FORBID_CONTENTS") && ut(T.ADD_FORBID_CONTENTS) && (E === W && (E = Ct(E)), Le(E, T.ADD_FORBID_CONTENTS, ha)), Ze && (Ge["#text"] = !0), B && Le(Ge, ["html", "head", "body"]), Ge.table && (Le(Ge, ["tbody"]), delete va.tbody), T.TRUSTED_TYPES_POLICY) {
|
|
319
319
|
if (typeof T.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
320
320
|
throw ri('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
321
321
|
if (typeof T.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -324,14 +324,14 @@ function fo() {
|
|
|
324
324
|
} else
|
|
325
325
|
ye === void 0 && (ye = eu(R, d)), ye !== null && typeof Qe == "string" && (Qe = ye.createHTML(""));
|
|
326
326
|
yt && yt(T), ct = T;
|
|
327
|
-
}, At =
|
|
327
|
+
}, At = Le({}, [...Xi, ...ec, ...qm]), ss = Le({}, [...ac, ...Om]), Rt = function(T) {
|
|
328
328
|
let O = ve(T);
|
|
329
329
|
(!O || !O.tagName) && (O = {
|
|
330
330
|
namespaceURI: w,
|
|
331
331
|
tagName: "template"
|
|
332
332
|
});
|
|
333
|
-
const ge = wr(T.tagName),
|
|
334
|
-
return
|
|
333
|
+
const ge = wr(T.tagName), na = wr(O.tagName);
|
|
334
|
+
return _e[T.namespaceURI] ? T.namespaceURI === u ? O.namespaceURI === v ? ge === "svg" : O.namespaceURI === Ve ? ge === "svg" && (na === "annotation-xml" || ta[na]) : !!At[ge] : T.namespaceURI === Ve ? O.namespaceURI === v ? ge === "math" : O.namespaceURI === u ? ge === "math" && it[na] : !!ss[ge] : T.namespaceURI === v ? O.namespaceURI === u && !it[na] || O.namespaceURI === Ve && !ta[na] ? !1 : !ss[ge] && (Va[ge] || !At[ge]) : !!(Fa === "application/xhtml+xml" && _e[T.namespaceURI]) : !1;
|
|
335
335
|
}, Za = function(T) {
|
|
336
336
|
Pr(t.removed, {
|
|
337
337
|
element: T
|
|
@@ -373,16 +373,16 @@ function fo() {
|
|
|
373
373
|
ge = Ae && Ae[0];
|
|
374
374
|
}
|
|
375
375
|
Fa === "application/xhtml+xml" && w === v && (T = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + T + "</body></html>");
|
|
376
|
-
const
|
|
376
|
+
const na = ye ? ye.createHTML(T) : T;
|
|
377
377
|
if (w === v)
|
|
378
378
|
try {
|
|
379
|
-
O = new A().parseFromString(
|
|
379
|
+
O = new A().parseFromString(na, Fa);
|
|
380
380
|
} catch {
|
|
381
381
|
}
|
|
382
382
|
if (!O || !O.documentElement) {
|
|
383
383
|
O = me.createDocument(w, "template", null);
|
|
384
384
|
try {
|
|
385
|
-
O.documentElement.innerHTML = Z ? Qe :
|
|
385
|
+
O.documentElement.innerHTML = Z ? Qe : na;
|
|
386
386
|
} catch {
|
|
387
387
|
}
|
|
388
388
|
}
|
|
@@ -398,7 +398,7 @@ function fo() {
|
|
|
398
398
|
);
|
|
399
399
|
}, we = function(T) {
|
|
400
400
|
return T instanceof H && (typeof T.nodeName != "string" || typeof T.textContent != "string" || typeof T.removeChild != "function" || !(T.attributes instanceof $) || typeof T.removeAttribute != "function" || typeof T.setAttribute != "function" || typeof T.namespaceURI != "string" || typeof T.insertBefore != "function" || typeof T.hasChildNodes != "function");
|
|
401
|
-
},
|
|
401
|
+
}, ze = function(T) {
|
|
402
402
|
return typeof C == "function" && T instanceof C;
|
|
403
403
|
};
|
|
404
404
|
function He(Te, T, O) {
|
|
@@ -413,36 +413,36 @@ function fo() {
|
|
|
413
413
|
const ge = ha(T.nodeName);
|
|
414
414
|
if (He(Se.uponSanitizeElement, T, {
|
|
415
415
|
tagName: ge,
|
|
416
|
-
allowedTags:
|
|
417
|
-
}),
|
|
416
|
+
allowedTags: Ge
|
|
417
|
+
}), q && T.hasChildNodes() && !ze(T.firstElementChild) && st(/<[/\w!]/g, T.innerHTML) && st(/<[/\w!]/g, T.textContent) || q && T.namespaceURI === v && ge === "style" && ze(T.firstElementChild) || T.nodeType === Sr.progressingInstruction || q && T.nodeType === Sr.comment && st(/<[/\w]/g, T.data))
|
|
418
418
|
return Za(T), !0;
|
|
419
|
-
if (va[ge] || !(L.tagCheck instanceof Function && L.tagCheck(ge)) && !
|
|
419
|
+
if (va[ge] || !(L.tagCheck instanceof Function && L.tagCheck(ge)) && !Ge[ge]) {
|
|
420
420
|
if (!va[ge] && ft(ge) && (We.tagNameCheck instanceof RegExp && st(We.tagNameCheck, ge) || We.tagNameCheck instanceof Function && We.tagNameCheck(ge)))
|
|
421
421
|
return !1;
|
|
422
422
|
if (Ze && !E[ge]) {
|
|
423
|
-
const
|
|
424
|
-
if (be &&
|
|
423
|
+
const na = ve(T) || T.parentNode, be = he(T) || T.childNodes;
|
|
424
|
+
if (be && na) {
|
|
425
425
|
const Ae = be.length;
|
|
426
426
|
for (let je = Ae - 1; je >= 0; --je) {
|
|
427
|
-
const
|
|
428
|
-
|
|
427
|
+
const la = K(be[je], !0);
|
|
428
|
+
na.insertBefore(la, Ke(T));
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
432
|
return Za(T), !0;
|
|
433
433
|
}
|
|
434
|
-
return T instanceof F && !Rt(T) || (ge === "noscript" || ge === "noembed" || ge === "noframes") && st(/<\/no(script|embed|frames)/i, T.innerHTML) ? (Za(T), !0) : (te && T.nodeType === Sr.text && (O = T.textContent, xr([
|
|
435
|
-
O = Ks(O,
|
|
434
|
+
return T instanceof F && !Rt(T) || (ge === "noscript" || ge === "noembed" || ge === "noframes") && st(/<\/no(script|embed|frames)/i, T.innerHTML) ? (Za(T), !0) : (te && T.nodeType === Sr.text && (O = T.textContent, xr([Be, Ba, Qa], (na) => {
|
|
435
|
+
O = Ks(O, na, " ");
|
|
436
436
|
}), T.textContent !== O && (Pr(t.removed, {
|
|
437
437
|
element: T.cloneNode()
|
|
438
438
|
}), T.textContent = O)), He(Se.afterSanitizeElements, T, null), !1);
|
|
439
439
|
}, nt = function(T, O, ge) {
|
|
440
440
|
if (xa[O] || ea && (O === "id" || O === "name") && (ge in i || ge in ts))
|
|
441
441
|
return !1;
|
|
442
|
-
if (!(J && !xa[O] && st(
|
|
443
|
-
if (!(j && st(
|
|
442
|
+
if (!(J && !xa[O] && st(fa, O))) {
|
|
443
|
+
if (!(j && st(ba, O))) {
|
|
444
444
|
if (!(L.attributeCheck instanceof Function && L.attributeCheck(O, T))) {
|
|
445
|
-
if (!
|
|
445
|
+
if (!ga[O] || xa[O]) {
|
|
446
446
|
if (
|
|
447
447
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
448
448
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
@@ -465,7 +465,7 @@ function fo() {
|
|
|
465
465
|
}
|
|
466
466
|
}
|
|
467
467
|
return !0;
|
|
468
|
-
}, at =
|
|
468
|
+
}, at = Le({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), ft = function(T) {
|
|
469
469
|
return !at[wr(T)] && st(Ta, T);
|
|
470
470
|
}, Yt = function(T) {
|
|
471
471
|
He(Se.beforeSanitizeAttributes, T, null);
|
|
@@ -478,18 +478,18 @@ function fo() {
|
|
|
478
478
|
attrName: "",
|
|
479
479
|
attrValue: "",
|
|
480
480
|
keepAttr: !0,
|
|
481
|
-
allowedAttributes:
|
|
481
|
+
allowedAttributes: ga,
|
|
482
482
|
forceKeepAttr: void 0
|
|
483
483
|
};
|
|
484
|
-
let
|
|
485
|
-
for (;
|
|
486
|
-
const be = O[
|
|
484
|
+
let na = O.length;
|
|
485
|
+
for (; na--; ) {
|
|
486
|
+
const be = O[na], {
|
|
487
487
|
name: Ae,
|
|
488
488
|
namespaceURI: je,
|
|
489
|
-
value:
|
|
490
|
-
} = be, Sa = ha(Ae), bt =
|
|
489
|
+
value: la
|
|
490
|
+
} = be, Sa = ha(Ae), bt = la;
|
|
491
491
|
let Ea = Ae === "value" ? bt : Mm(bt);
|
|
492
|
-
if (ge.attrName = Sa, ge.attrValue = Ea, ge.keepAttr = !0, ge.forceKeepAttr = void 0, He(Se.uponSanitizeAttribute, T, ge), Ea = ge.attrValue,
|
|
492
|
+
if (ge.attrName = Sa, ge.attrValue = Ea, ge.keepAttr = !0, ge.forceKeepAttr = void 0, He(Se.uponSanitizeAttribute, T, ge), Ea = ge.attrValue, Fe && (Sa === "id" || Sa === "name") && cl(Ea, ca) !== 0 && (dt(Ae, T), Ea = ca + Ea), q && st(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, Ea)) {
|
|
493
493
|
dt(Ae, T);
|
|
494
494
|
continue;
|
|
495
495
|
}
|
|
@@ -507,7 +507,7 @@ function fo() {
|
|
|
507
507
|
dt(Ae, T);
|
|
508
508
|
continue;
|
|
509
509
|
}
|
|
510
|
-
te && xr([
|
|
510
|
+
te && xr([Be, Ba, Qa], (Cs) => {
|
|
511
511
|
Ea = Ks(Ea, Cs, " ");
|
|
512
512
|
});
|
|
513
513
|
const rs = ha(T.nodeName);
|
|
@@ -542,16 +542,16 @@ function fo() {
|
|
|
542
542
|
He(Se.afterSanitizeShadowDOM, T, null);
|
|
543
543
|
};
|
|
544
544
|
return t.sanitize = function(Te) {
|
|
545
|
-
let T = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, O = null, ge = null,
|
|
546
|
-
if (Z = !Te, Z && (Te = "<!-->"), typeof Te != "string" && !
|
|
545
|
+
let T = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, O = null, ge = null, na = null, be = null;
|
|
546
|
+
if (Z = !Te, Z && (Te = "<!-->"), typeof Te != "string" && !ze(Te) && (Te = zm(Te), typeof Te != "string"))
|
|
547
547
|
throw ri("dirty is not a string, aborting");
|
|
548
548
|
if (!t.isSupported)
|
|
549
549
|
return Te;
|
|
550
|
-
if (Y || zt(T), t.removed = [], typeof Te == "string" && (
|
|
551
|
-
const
|
|
552
|
-
if (typeof
|
|
553
|
-
const Sa = ha(
|
|
554
|
-
if (!
|
|
550
|
+
if (Y || zt(T), t.removed = [], typeof Te == "string" && (ua = !1), ua) {
|
|
551
|
+
const la = Te.nodeName;
|
|
552
|
+
if (typeof la == "string") {
|
|
553
|
+
const Sa = ha(la);
|
|
554
|
+
if (!Ge[Sa] || va[Sa])
|
|
555
555
|
throw ri("root node is forbidden and cannot be sanitized in-place");
|
|
556
556
|
}
|
|
557
557
|
} else if (Te instanceof C)
|
|
@@ -564,30 +564,30 @@ function fo() {
|
|
|
564
564
|
return ke ? null : De ? Qe : "";
|
|
565
565
|
}
|
|
566
566
|
O && le && Za(O.firstChild);
|
|
567
|
-
const Ae = xe(
|
|
568
|
-
for (;
|
|
569
|
-
$e(
|
|
570
|
-
if (
|
|
567
|
+
const Ae = xe(ua ? Te : O);
|
|
568
|
+
for (; na = Ae.nextNode(); )
|
|
569
|
+
$e(na), Yt(na), na.content instanceof m && St(na.content);
|
|
570
|
+
if (ua)
|
|
571
571
|
return Te;
|
|
572
572
|
if (ke) {
|
|
573
573
|
if (te) {
|
|
574
574
|
O.normalize();
|
|
575
|
-
let
|
|
576
|
-
xr([
|
|
577
|
-
|
|
578
|
-
}), O.innerHTML =
|
|
575
|
+
let la = O.innerHTML;
|
|
576
|
+
xr([Be, Ba, Qa], (Sa) => {
|
|
577
|
+
la = Ks(la, Sa, " ");
|
|
578
|
+
}), O.innerHTML = la;
|
|
579
579
|
}
|
|
580
580
|
if (Re)
|
|
581
|
-
for (be =
|
|
581
|
+
for (be = qe.call(O.ownerDocument); O.firstChild; )
|
|
582
582
|
be.appendChild(O.firstChild);
|
|
583
583
|
else
|
|
584
584
|
be = O;
|
|
585
|
-
return (
|
|
585
|
+
return (ga.shadowroot || ga.shadowrootmode) && (be = Ie.call(n, be, !0)), be;
|
|
586
586
|
}
|
|
587
587
|
let je = B ? O.outerHTML : O.innerHTML;
|
|
588
|
-
return B &&
|
|
589
|
-
` + je), te && xr([
|
|
590
|
-
je = Ks(je,
|
|
588
|
+
return B && Ge["!doctype"] && O.ownerDocument && O.ownerDocument.doctype && O.ownerDocument.doctype.name && st(yo, O.ownerDocument.doctype.name) && (je = "<!DOCTYPE " + O.ownerDocument.doctype.name + `>
|
|
589
|
+
` + je), te && xr([Be, Ba, Qa], (la) => {
|
|
590
|
+
je = Ks(je, la, " ");
|
|
591
591
|
}), ye && De ? ye.createHTML(je) : je;
|
|
592
592
|
}, t.setConfig = function() {
|
|
593
593
|
let Te = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
@@ -596,8 +596,8 @@ function fo() {
|
|
|
596
596
|
ct = null, Y = !1;
|
|
597
597
|
}, t.isValidAttribute = function(Te, T, O) {
|
|
598
598
|
ct || zt({});
|
|
599
|
-
const ge = ha(Te),
|
|
600
|
-
return nt(ge,
|
|
599
|
+
const ge = ha(Te), na = ha(T);
|
|
600
|
+
return nt(ge, na, O);
|
|
601
601
|
}, t.addHook = function(Te, T) {
|
|
602
602
|
typeof T == "function" && Pr(Se[Te], T);
|
|
603
603
|
}, t.removeHook = function(Te, T) {
|
|
@@ -870,7 +870,7 @@ function yu(e) {
|
|
|
870
870
|
function To(e) {
|
|
871
871
|
for (const t of e) {
|
|
872
872
|
if (!ya(t)) continue;
|
|
873
|
-
const i = {}, n =
|
|
873
|
+
const i = {}, n = oa(t.unitCode || t.unit_code), d = oa(t.unitLabel || t.unit_label || t.unit), m = oa(t.valueFormat || t.value_format || t.format), f = oa(t.displayValue || t.display_value), C = Nc(t.decimalPlaces ?? t.decimal_places ?? t.scale);
|
|
874
874
|
if (n && (i.unitCode = n), d && (i.unitLabel = d), m && (i.valueFormat = m), f && (i.displayValue = f), C !== null && (i.decimalPlaces = Math.max(0, Math.min(8, Math.trunc(C)))), Object.keys(i).length > 0) return i;
|
|
875
875
|
}
|
|
876
876
|
}
|
|
@@ -971,7 +971,7 @@ function gl(e) {
|
|
|
971
971
|
}
|
|
972
972
|
};
|
|
973
973
|
}
|
|
974
|
-
function
|
|
974
|
+
function oa(e) {
|
|
975
975
|
return typeof e == "string" && e.trim() ? e.trim() : "";
|
|
976
976
|
}
|
|
977
977
|
function Nc(e) {
|
|
@@ -979,7 +979,7 @@ function Nc(e) {
|
|
|
979
979
|
return Number.isFinite(t) ? t : null;
|
|
980
980
|
}
|
|
981
981
|
function bu(e, t) {
|
|
982
|
-
const i =
|
|
982
|
+
const i = oa(e.primaryFormat || e.format || e.valueFormat);
|
|
983
983
|
if (i === "currency" || i === "number" || i === "percent") return i;
|
|
984
984
|
const n = t.toLowerCase();
|
|
985
985
|
return /率|占比|percent|percentage|ratio|rate/.test(n) ? "percent" : "number";
|
|
@@ -988,23 +988,23 @@ function gu(e) {
|
|
|
988
988
|
if (!ya(e)) return { label: p("FAC.39f71787576181027"), level: "self" };
|
|
989
989
|
const t = e.level === "team" || e.level === "org" || e.level === "self" ? e.level : "self";
|
|
990
990
|
return {
|
|
991
|
-
label:
|
|
991
|
+
label: oa(e.label) || p("FAC.39f71787576181027"),
|
|
992
992
|
level: t
|
|
993
993
|
};
|
|
994
994
|
}
|
|
995
995
|
function Cu(e, t) {
|
|
996
|
-
const n = { ...ya(e.displaySpec) ? e.displaySpec : ya(t.displaySpec) ? t.displaySpec : {}, ...t, ...e }, d = {}, m =
|
|
996
|
+
const n = { ...ya(e.displaySpec) ? e.displaySpec : ya(t.displaySpec) ? t.displaySpec : {}, ...t, ...e }, d = {}, m = oa(n.unitCode || n.unit_code || n.unit), f = oa(n.unitLabel || n.unit_label || n.unitName || n.unit_name || n.unit), C = oa(n.valueFormat || n.value_format || n.primaryFormat || n.format), F = oa(n.displayValue || n.display_value), D = Nc(n.decimalPlaces ?? n.decimal_places ?? n.scale);
|
|
997
997
|
return m && (d.unitCode = m), f && (d.unitLabel = f), C && (d.valueFormat = C), F && (d.displayValue = F), D !== null && (d.decimalPlaces = Math.max(0, Math.min(8, Math.trunc(D)))), Object.keys(d).length > 0 ? d : void 0;
|
|
998
998
|
}
|
|
999
999
|
function Tu(e) {
|
|
1000
1000
|
const t = Ti(e);
|
|
1001
1001
|
if (!ya(t)) return null;
|
|
1002
|
-
const i = ya(t.source) ? t.source : {}, n =
|
|
1002
|
+
const i = ya(t.source) ? t.source : {}, n = oa(i.value), d = oa(t.metricCode || t.metric_code), m = oa(t.metricId || t.metric_id), f = oa(t.metricName || t.metric_name || t.title) || d || m || p("FAC.d44f1787576271804"), C = Nc(t.value ?? t.currentValue ?? t.primaryValue), F = !!(d || m || oa(t.metricName || t.metric_name) || n === "execute_metric_api" || t.aggregation);
|
|
1003
1003
|
if (C === null || !F) return null;
|
|
1004
1004
|
const D = ya(t.dataBinding) ? t.dataBinding : {}, $ = ya(D.permissionContext) ? D.permissionContext : {
|
|
1005
|
-
...
|
|
1006
|
-
...
|
|
1007
|
-
}, H =
|
|
1005
|
+
...oa(t.tenantId) ? { tenantId: oa(t.tenantId) } : {},
|
|
1006
|
+
...oa(t.appId) ? { appId: oa(t.appId) } : {}
|
|
1007
|
+
}, H = oa(D.question), A = oa(D.bindingId) || m || d, R = oa(D.metricCode) || d, z = oa(D.metricId) || m, K = Cu(t, D), se = oa(t.displayValue || t.display_value || D.displayValue || (K == null ? void 0 : K.displayValue));
|
|
1008
1008
|
return {
|
|
1009
1009
|
type: "metric-card",
|
|
1010
1010
|
id: `metric-${Mc(`${z || R || f}:${C}`)}`,
|
|
@@ -1014,27 +1014,27 @@ function Tu(e) {
|
|
|
1014
1014
|
...z ? { metricId: z } : {},
|
|
1015
1015
|
value: C,
|
|
1016
1016
|
...se ? { displayValue: se } : {},
|
|
1017
|
-
...
|
|
1018
|
-
format: bu({ ...t, ...
|
|
1017
|
+
...K ? { displaySpec: K } : {},
|
|
1018
|
+
format: bu({ ...t, ...K ?? {} }, f),
|
|
1019
1019
|
source: {
|
|
1020
|
-
label:
|
|
1020
|
+
label: oa(i.label) || p("FAC.fb301787576174781"),
|
|
1021
1021
|
...n ? { value: n } : { value: "execute_metric_api" }
|
|
1022
1022
|
},
|
|
1023
1023
|
dataBinding: {
|
|
1024
1024
|
...H ? { question: H } : {},
|
|
1025
1025
|
...A ? { bindingId: A } : {},
|
|
1026
|
-
...
|
|
1027
|
-
executeApi:
|
|
1026
|
+
...oa(D.contractHash || t.contractHash) ? { contractHash: oa(D.contractHash || t.contractHash) } : {},
|
|
1027
|
+
executeApi: oa(D.executeApi) || "/apps/api/v1/sp/ai/metric/metrics/execute",
|
|
1028
1028
|
...R ? { metricCode: R } : {},
|
|
1029
1029
|
...z ? { metricId: z } : {},
|
|
1030
|
-
...
|
|
1030
|
+
...K ? { displaySpec: K } : {},
|
|
1031
1031
|
...se ? { displayValue: se } : {},
|
|
1032
|
-
...
|
|
1033
|
-
...
|
|
1034
|
-
...
|
|
1035
|
-
...(
|
|
1036
|
-
readbackApi:
|
|
1037
|
-
refreshApi:
|
|
1032
|
+
...K != null && K.unitCode ? { unitCode: K.unitCode } : {},
|
|
1033
|
+
...K != null && K.unitLabel ? { unitLabel: K.unitLabel } : {},
|
|
1034
|
+
...K != null && K.valueFormat ? { valueFormat: K.valueFormat } : {},
|
|
1035
|
+
...(K == null ? void 0 : K.decimalPlaces) !== void 0 ? { decimalPlaces: K.decimalPlaces } : {},
|
|
1036
|
+
readbackApi: oa(D.readbackApi) || "/apps/api/v1/sp/ai/metric/metrics/userReadback",
|
|
1037
|
+
refreshApi: oa(D.refreshApi) || "/apps/api/v1/sp/ai/metric/metrics/execute",
|
|
1038
1038
|
...Array.isArray(D.queryFilters) ? { queryFilters: D.queryFilters } : {},
|
|
1039
1039
|
...ya(D.paramsSchema) ? { paramsSchema: D.paramsSchema } : {},
|
|
1040
1040
|
...Object.keys($).length > 0 ? { permissionContext: $ } : {}
|
|
@@ -1043,7 +1043,7 @@ function Tu(e) {
|
|
|
1043
1043
|
meta: {
|
|
1044
1044
|
generatedBy: "agent",
|
|
1045
1045
|
version: ya(t.meta) && typeof t.meta.version == "number" && Number.isFinite(t.meta.version) ? t.meta.version : 1,
|
|
1046
|
-
...ya(t.meta) &&
|
|
1046
|
+
...ya(t.meta) && oa(t.meta.prompt) ? { prompt: oa(t.meta.prompt) } : {}
|
|
1047
1047
|
}
|
|
1048
1048
|
};
|
|
1049
1049
|
}
|
|
@@ -1155,17 +1155,17 @@ function gs(e) {
|
|
|
1155
1155
|
return ki(e) || Si(e) || fs(e) || ws(e.id);
|
|
1156
1156
|
}
|
|
1157
1157
|
function Nr(e) {
|
|
1158
|
-
return e == null ? "" : Array.isArray(e) ? `[${e.map(Nr).join(",")}]` :
|
|
1158
|
+
return e == null ? "" : Array.isArray(e) ? `[${e.map(Nr).join(",")}]` : da(e) ? `{${Object.keys(e).sort().map((t) => `${JSON.stringify(t)}:${Nr(e[t])}`).join(",")}}` : JSON.stringify(e) ?? String(e);
|
|
1159
1159
|
}
|
|
1160
1160
|
function er(e) {
|
|
1161
|
-
return
|
|
1161
|
+
return da(e) ? e : {};
|
|
1162
1162
|
}
|
|
1163
1163
|
function Iu(e) {
|
|
1164
|
-
return typeof e == "string" && e.trim() ? e.trim() :
|
|
1164
|
+
return typeof e == "string" && e.trim() ? e.trim() : da(e) ? ee(e.key) || ee(e.dataIndex) || ee(e.data_index) || ee(e.field) || ee(e.name) : "";
|
|
1165
1165
|
}
|
|
1166
1166
|
function xo(e) {
|
|
1167
1167
|
const t = er(e.data);
|
|
1168
|
-
return (Array.isArray(e.rows) ? e.rows : Array.isArray(t.rows) ? t.rows : []).filter(
|
|
1168
|
+
return (Array.isArray(e.rows) ? e.rows : Array.isArray(t.rows) ? t.rows : []).filter(da);
|
|
1169
1169
|
}
|
|
1170
1170
|
function Po(e, t) {
|
|
1171
1171
|
const i = er(e.data), n = Array.isArray(e.columns) ? e.columns : Array.isArray(i.columns) ? i.columns : [], d = [...new Set(t.flatMap((f) => Object.keys(f)))], m = n.map((f, C) => {
|
|
@@ -1175,7 +1175,7 @@ function Po(e, t) {
|
|
|
1175
1175
|
return [...new Set(m.length > 0 ? m : d)];
|
|
1176
1176
|
}
|
|
1177
1177
|
function vc(e) {
|
|
1178
|
-
if (!
|
|
1178
|
+
if (!da(e)) return "";
|
|
1179
1179
|
const t = er(e.metadata), i = ee(e.resultSetId) || ee(t.resultSetId);
|
|
1180
1180
|
if (i) return `result-set:${i}`;
|
|
1181
1181
|
const n = ee(e.resultId) || ee(t.resultId) || ee(e.id), d = ee(e.sourceTurnId) || ee(t.sourceTurnId);
|
|
@@ -1276,10 +1276,10 @@ function _o(e) {
|
|
|
1276
1276
|
return t;
|
|
1277
1277
|
}
|
|
1278
1278
|
function Nu(e) {
|
|
1279
|
-
if (!
|
|
1280
|
-
const t =
|
|
1279
|
+
if (!da(e)) return [];
|
|
1280
|
+
const t = da(e.data) ? e.data : {}, i = [e.displayRows, t.displayRows, e.rows, t.rows];
|
|
1281
1281
|
for (const n of i)
|
|
1282
|
-
if (Array.isArray(n)) return n.filter(
|
|
1282
|
+
if (Array.isArray(n)) return n.filter(da);
|
|
1283
1283
|
return [];
|
|
1284
1284
|
}
|
|
1285
1285
|
function Lu(e) {
|
|
@@ -1287,7 +1287,7 @@ function Lu(e) {
|
|
|
1287
1287
|
return t ? [
|
|
1288
1288
|
t.queryResult,
|
|
1289
1289
|
...t.recommendations.map((i) => i.queryResult)
|
|
1290
|
-
].filter(
|
|
1290
|
+
].filter(da) : [];
|
|
1291
1291
|
}
|
|
1292
1292
|
function Bu(e) {
|
|
1293
1293
|
const t = /* @__PURE__ */ new Set();
|
|
@@ -1394,7 +1394,7 @@ function Ku(e) {
|
|
|
1394
1394
|
return t ? [
|
|
1395
1395
|
t.queryResult,
|
|
1396
1396
|
...t.recommendations.flatMap(Lc).map((i) => i.queryResult)
|
|
1397
|
-
].filter(
|
|
1397
|
+
].filter(da).some((i) => {
|
|
1398
1398
|
const n = er(i.metadata);
|
|
1399
1399
|
return !!(ee(i.resultSetId) || ee(n.resultSetId) || ee(i.resultId) || ee(n.resultId) || ee(i.id) || ee(i.sourceTurnId) || ee(n.sourceTurnId));
|
|
1400
1400
|
}) : !1;
|
|
@@ -1444,11 +1444,11 @@ function Ou(e) {
|
|
|
1444
1444
|
function Vu(e) {
|
|
1445
1445
|
if (!rr(e)) return null;
|
|
1446
1446
|
const t = e.cardRecommendationDraft, i = t == null ? void 0 : t.recommendations[0], n = (i == null ? void 0 : i.queryResult) || (t == null ? void 0 : t.queryResult);
|
|
1447
|
-
return
|
|
1447
|
+
return da(n) ? n : null;
|
|
1448
1448
|
}
|
|
1449
1449
|
function $u(e) {
|
|
1450
1450
|
const t = er(e.data);
|
|
1451
|
-
return (Array.isArray(e.columns) ? e.columns : Array.isArray(t.columns) ? t.columns : []).map((n) => typeof n == "string" ? n.trim() :
|
|
1451
|
+
return (Array.isArray(e.columns) ? e.columns : Array.isArray(t.columns) ? t.columns : []).map((n) => typeof n == "string" ? n.trim() : da(n) ? ee(n.label) || ee(n.title) || ee(n.name) || ee(n.key) : "").filter(Boolean);
|
|
1452
1452
|
}
|
|
1453
1453
|
function Hu(e) {
|
|
1454
1454
|
var H, A;
|
|
@@ -1456,9 +1456,9 @@ function Hu(e) {
|
|
|
1456
1456
|
if (!t)
|
|
1457
1457
|
return (((H = n == null ? void 0 : n.title) == null ? void 0 : H.trim().length) || 0) > 0 ? 1 : 0;
|
|
1458
1458
|
const d = xo(t), m = Po(t, d), C = $u(t).filter((R, z) => {
|
|
1459
|
-
const
|
|
1460
|
-
return R && R !==
|
|
1461
|
-
}).length, F = d.slice(0, 5).reduce((R, z) => R + m.filter((
|
|
1459
|
+
const K = m[z] || "";
|
|
1460
|
+
return R && R !== K;
|
|
1461
|
+
}).length, F = d.slice(0, 5).reduce((R, z) => R + m.filter((K) => z[K] !== null && z[K] !== void 0 && String(z[K]).trim() !== "").length, 0), D = vc(t) ? 4 : 0, $ = (A = n == null ? void 0 : n.title) != null && A.trim() ? 2 : 0;
|
|
1462
1462
|
return m.length * 20 + Math.min(d.length, 20) * 3 + C * 6 + Math.min(F, 30) + D + $;
|
|
1463
1463
|
}
|
|
1464
1464
|
function Uu(e, t, i) {
|
|
@@ -1535,11 +1535,11 @@ function kl(e) {
|
|
|
1535
1535
|
return null;
|
|
1536
1536
|
}
|
|
1537
1537
|
}
|
|
1538
|
-
function
|
|
1538
|
+
function da(e) {
|
|
1539
1539
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
1540
1540
|
}
|
|
1541
1541
|
function ar(e) {
|
|
1542
|
-
if (
|
|
1542
|
+
if (da(e) && e.type === "text" && typeof e.value == "string" || da(e) && e.type === "json" && "value" in e)
|
|
1543
1543
|
return ar(e.value);
|
|
1544
1544
|
if (typeof e == "string")
|
|
1545
1545
|
try {
|
|
@@ -1553,7 +1553,7 @@ function ee(e) {
|
|
|
1553
1553
|
return typeof e == "string" && e.trim() ? e.trim() : "";
|
|
1554
1554
|
}
|
|
1555
1555
|
function Ju(e) {
|
|
1556
|
-
if (!
|
|
1556
|
+
if (!da(e)) return null;
|
|
1557
1557
|
const t = ee(e.name), i = ee(e.mimeType) || "application/octet-stream", n = e.type === "image" ? "image" : e.type === "file" ? "file" : null;
|
|
1558
1558
|
if (!t || !n) return null;
|
|
1559
1559
|
const d = typeof e.size == "number" && Number.isFinite(e.size) && e.size >= 0 ? Math.floor(e.size) : void 0, m = ee(e.fileId), f = Xu(e.downloadUrl);
|
|
@@ -1582,14 +1582,14 @@ function eh(e) {
|
|
|
1582
1582
|
if (typeof e == "number") return Number.isFinite(e) ? e : void 0;
|
|
1583
1583
|
}
|
|
1584
1584
|
function Sc(e) {
|
|
1585
|
-
if (!
|
|
1585
|
+
if (!da(e)) return null;
|
|
1586
1586
|
const t = /* @__PURE__ */ new Set(), i = (Array.isArray(e.columns) ? e.columns : []).map((f) => {
|
|
1587
|
-
if (!
|
|
1587
|
+
if (!da(f)) return null;
|
|
1588
1588
|
const C = ee(f.key) || ee(f.name);
|
|
1589
1589
|
return !C || t.has(C) ? null : (t.add(C), { key: C, label: ee(f.label) || C });
|
|
1590
1590
|
}).filter((f) => !!f);
|
|
1591
1591
|
if (i.length === 0) return null;
|
|
1592
|
-
const n = (Array.isArray(e.rows) ? e.rows : []).filter(
|
|
1592
|
+
const n = (Array.isArray(e.rows) ? e.rows : []).filter(da).map((f) => {
|
|
1593
1593
|
const C = {};
|
|
1594
1594
|
for (const F of i) {
|
|
1595
1595
|
const D = eh(f[F.key]);
|
|
@@ -1610,17 +1610,17 @@ function Fl(e) {
|
|
|
1610
1610
|
return Array.isArray(e) ? e.map((t) => Sc(t)).filter((t) => !!t) : [];
|
|
1611
1611
|
}
|
|
1612
1612
|
function Il(e) {
|
|
1613
|
-
return e instanceof Error && e.message.trim() ||
|
|
1613
|
+
return e instanceof Error && e.message.trim() || da(e) && typeof e.message == "string" && e.message.trim() ? e.message.trim() : String(e || p("FAC.1d911787576233473"));
|
|
1614
1614
|
}
|
|
1615
1615
|
function ah(e) {
|
|
1616
|
-
return
|
|
1616
|
+
return da(e) && typeof e.code == "number" && "data" in e ? e.data : e;
|
|
1617
1617
|
}
|
|
1618
1618
|
async function sc(e) {
|
|
1619
1619
|
return ah(await e.json());
|
|
1620
1620
|
}
|
|
1621
1621
|
function th(e) {
|
|
1622
1622
|
return Array.isArray(e) ? e.flatMap((t) => {
|
|
1623
|
-
if (!
|
|
1623
|
+
if (!da(t)) return [];
|
|
1624
1624
|
const i = ee(t.threadId);
|
|
1625
1625
|
return i ? [{
|
|
1626
1626
|
threadId: i,
|
|
@@ -1646,7 +1646,7 @@ function lh(e) {
|
|
|
1646
1646
|
return ch(e) ? sh : nh(e) ? rh : e;
|
|
1647
1647
|
}
|
|
1648
1648
|
function wl(e) {
|
|
1649
|
-
if (!
|
|
1649
|
+
if (!da(e)) return null;
|
|
1650
1650
|
const t = typeof e.index == "number" && Number.isFinite(e.index) ? e.index : void 0;
|
|
1651
1651
|
return t ? {
|
|
1652
1652
|
index: t,
|
|
@@ -1660,7 +1660,7 @@ function wl(e) {
|
|
|
1660
1660
|
} : null;
|
|
1661
1661
|
}
|
|
1662
1662
|
function Wl(e) {
|
|
1663
|
-
if (!
|
|
1663
|
+
if (!da(e)) return null;
|
|
1664
1664
|
const t = ee(e.code) || ee(e.name), i = ee(e.name) || t;
|
|
1665
1665
|
return !t || !i ? null : {
|
|
1666
1666
|
code: t,
|
|
@@ -1671,7 +1671,7 @@ function Wl(e) {
|
|
|
1671
1671
|
};
|
|
1672
1672
|
}
|
|
1673
1673
|
function Dl(e) {
|
|
1674
|
-
if (!
|
|
1674
|
+
if (!da(e)) return null;
|
|
1675
1675
|
const t = ee(e.taskId), i = ee(e.taskKind), n = ee(e.title);
|
|
1676
1676
|
if (!t || !i || !n) return null;
|
|
1677
1677
|
const m = (Array.isArray(e.confirmationOptions) ? e.confirmationOptions : []).map(wl).filter((D) => !!D), f = wl(e.confirmedSelection), C = (Array.isArray(e.fields) ? e.fields : []).map(Wl).filter((D) => !!D), F = (Array.isArray(e.missingFields) ? e.missingFields : []).map(Wl).filter((D) => !!D);
|
|
@@ -1697,13 +1697,13 @@ function Dl(e) {
|
|
|
1697
1697
|
}
|
|
1698
1698
|
function Eo(e) {
|
|
1699
1699
|
const t = ar(e);
|
|
1700
|
-
if (!
|
|
1701
|
-
const i =
|
|
1700
|
+
if (!da(t)) return null;
|
|
1701
|
+
const i = da(t.queryContext) ? t.queryContext : t, n = ee(i.tenantId), d = ee(i.appId), m = ee(i.dialect);
|
|
1702
1702
|
return n || d || m ? { tenantId: n, appId: d, dialect: m } : null;
|
|
1703
1703
|
}
|
|
1704
1704
|
function oh(e) {
|
|
1705
1705
|
const t = ar(e);
|
|
1706
|
-
if (!
|
|
1706
|
+
if (!da(t)) return;
|
|
1707
1707
|
const i = Eo(t), n = ni(t.matchedMetrics), d = ni(t.matchedDimensions), m = ni(t.matchedFilters), f = ni(t.matchedOntologyObjects ?? t.ontologyAssets);
|
|
1708
1708
|
if (i || Array.isArray(t.matchedMetrics) || Array.isArray(t.matchedDimensions) || Array.isArray(t.matchedFilters) || Array.isArray(t.matchedOntologyObjects) || Array.isArray(t.ontologyAssets))
|
|
1709
1709
|
return [
|
|
@@ -1729,8 +1729,8 @@ function li(e, t) {
|
|
|
1729
1729
|
return `${i.join("、")}${e.length > i.length ? ` 等 ${e.length} 项` : ""}`;
|
|
1730
1730
|
}
|
|
1731
1731
|
function dh(e) {
|
|
1732
|
-
if (!
|
|
1733
|
-
const t =
|
|
1732
|
+
if (!da(e)) return ee(e);
|
|
1733
|
+
const t = da(e.asset) ? e.asset : e;
|
|
1734
1734
|
return ee(t.name) || ee(t.label) || ee(t.title) || ee(t.metricName) || ee(t.dimensionName) || ee(t.fieldName) || ee(t.modelName) || ee(t.modelCode) || ee(t.code) || ee(t.id);
|
|
1735
1735
|
}
|
|
1736
1736
|
function ph(e, t) {
|
|
@@ -1742,7 +1742,7 @@ function ph(e, t) {
|
|
|
1742
1742
|
}
|
|
1743
1743
|
function mh(e, t, i) {
|
|
1744
1744
|
const n = ar(e);
|
|
1745
|
-
if (!
|
|
1745
|
+
if (!da(n)) return null;
|
|
1746
1746
|
const d = ee(n.sql), m = ee(n.tenantId) || t.tenantId, f = ee(n.appId) || t.appId, C = ee(n.sqlDialect) || ee(n.dialect) || t.dialect || "sql";
|
|
1747
1747
|
return !i.trim() || !d || !m || !f || !C ? null : {
|
|
1748
1748
|
question: i.trim(),
|
|
@@ -1754,7 +1754,7 @@ function mh(e, t, i) {
|
|
|
1754
1754
|
}
|
|
1755
1755
|
function uh(e) {
|
|
1756
1756
|
const t = ar(e);
|
|
1757
|
-
return !
|
|
1757
|
+
return !da(t) || t.success !== !0 ? null : Array.isArray(t.rows) && t.rows.length > 0 ? t.rows.filter(da).map((i) => ({ ...i })) : typeof t.rowCount == "number" && t.rowCount > 0 ? [] : null;
|
|
1758
1758
|
}
|
|
1759
1759
|
const hh = /* @__PURE__ */ new Set([
|
|
1760
1760
|
"no color",
|
|
@@ -1812,8 +1812,8 @@ function fh(e, t, i, n) {
|
|
|
1812
1812
|
let H = -1, A = 0;
|
|
1813
1813
|
i.forEach((R, z) => {
|
|
1814
1814
|
if (f.has(z)) return;
|
|
1815
|
-
const
|
|
1816
|
-
|
|
1815
|
+
const K = jl($[t], R[n]);
|
|
1816
|
+
K > A && (A = K, H = z);
|
|
1817
1817
|
}), H !== -1 && f.add(H), C += A;
|
|
1818
1818
|
}
|
|
1819
1819
|
return Math.max(m, C / e.length);
|
|
@@ -1924,9 +1924,9 @@ function Ph(e) {
|
|
|
1924
1924
|
}, R = () => typeof e.assistantPersona == "function" ? e.assistantPersona() : e.assistantPersona, z = () => {
|
|
1925
1925
|
const L = Qt(e.activeConversationId);
|
|
1926
1926
|
return typeof L == "string" ? L.trim() : "";
|
|
1927
|
-
},
|
|
1927
|
+
}, K = ne(
|
|
1928
1928
|
() => t.value.find((L) => L.id === i.value) ?? null
|
|
1929
|
-
), se = oe([]),
|
|
1929
|
+
), se = oe([]), Ke = ne(() => ku(se.value.filter(Tl)));
|
|
1930
1930
|
function he(L, j) {
|
|
1931
1931
|
var te;
|
|
1932
1932
|
const J = L.trim();
|
|
@@ -1940,7 +1940,7 @@ function Ph(e) {
|
|
|
1940
1940
|
});
|
|
1941
1941
|
}
|
|
1942
1942
|
function ve(L, j) {
|
|
1943
|
-
const J = j == null ? void 0 : j.trim(), k = J ? t.value.find((B) => B.id === J) ?? null :
|
|
1943
|
+
const J = j == null ? void 0 : j.trim(), k = J ? t.value.find((B) => B.id === J) ?? null : K.value;
|
|
1944
1944
|
if (!k)
|
|
1945
1945
|
throw new Error(p("FAC.929e1787576166445"));
|
|
1946
1946
|
const X = {
|
|
@@ -1958,8 +1958,8 @@ function Ph(e) {
|
|
|
1958
1958
|
};
|
|
1959
1959
|
return k.messages[te] = B, _s(k.messages, B), kr(k.messages, B) ? (k.messages.splice(te, 1), B) : (Qs(k.messages, B), ds(k.messages), Us(k.messages, B), B);
|
|
1960
1960
|
}
|
|
1961
|
-
const
|
|
1962
|
-
return
|
|
1961
|
+
const q = ko(k.messages, X);
|
|
1962
|
+
return q || (_s(k.messages, X), X.cardRecommendationDraft && kr(k.messages, X) ? X : (X.cardRecommendationDraft && Qs(k.messages, X), Pl(k.messages, X) ? (ds(k.messages), K.value === k && se.value !== k.messages && (se.value = k.messages), X) : zu(k.messages, X) ? (K.value === k && se.value !== k.messages && (se.value = k.messages), X) : (Fu(k.messages, X), Us(k.messages, X), ds(k.messages), K.value === k && se.value !== k.messages && (se.value = k.messages), X)));
|
|
1963
1963
|
}
|
|
1964
1964
|
function ye(L) {
|
|
1965
1965
|
return L.replace(/\s+/gu, " ").trim();
|
|
@@ -1981,15 +1981,15 @@ function Ph(e) {
|
|
|
1981
1981
|
const ke = ye(le.content);
|
|
1982
1982
|
ke && te.set(ke, (te.get(ke) || 0) + 1);
|
|
1983
1983
|
}
|
|
1984
|
-
let
|
|
1984
|
+
let q = 0, B = !1;
|
|
1985
1985
|
for (const le of j) {
|
|
1986
1986
|
const ke = le.turnId.trim(), Re = ye(le.content);
|
|
1987
|
-
let De = ke ? k.messages.findIndex((
|
|
1987
|
+
let De = ke ? k.messages.findIndex((ca) => ca.role === "user" && ca.workbenchTurnId === ke) : -1;
|
|
1988
1988
|
const ea = Re && X.get(Re) === te.get(Re);
|
|
1989
|
-
if (De < 0 && ea && (De = k.messages.findIndex((
|
|
1990
|
-
|
|
1991
|
-
const
|
|
1992
|
-
ke &&
|
|
1989
|
+
if (De < 0 && ea && (De = k.messages.findIndex((ca, Ze) => Ze >= q && ca.role === "user" && ye(ca.content) === Re)), De < 0) continue;
|
|
1990
|
+
q = De + 1;
|
|
1991
|
+
const Fe = k.messages[De];
|
|
1992
|
+
ke && Fe.workbenchTurnId !== ke && (Fe.workbenchTurnId = ke, B = !0), le.attachments.length > 0 && !((Y = Fe.attachments) != null && Y.length) && (Fe.attachments = le.attachments.map((ca) => ({ ...ca })), B = !0);
|
|
1993
1993
|
}
|
|
1994
1994
|
return B;
|
|
1995
1995
|
}
|
|
@@ -2008,7 +2008,7 @@ function Ph(e) {
|
|
|
2008
2008
|
const ke = fs(le) || ws(le.id);
|
|
2009
2009
|
ke && te.add(ke);
|
|
2010
2010
|
}
|
|
2011
|
-
let
|
|
2011
|
+
let q = 0, B = !1;
|
|
2012
2012
|
for (const le of k.messages) {
|
|
2013
2013
|
if (le.role !== "assistant" || le.cardRecommendationDraft || !le.content.trim() || fs(le)) continue;
|
|
2014
2014
|
const Re = ws(le.id);
|
|
@@ -2016,11 +2016,11 @@ function Ph(e) {
|
|
|
2016
2016
|
le.workbenchTurnId = Re, B = !0;
|
|
2017
2017
|
continue;
|
|
2018
2018
|
}
|
|
2019
|
-
for (;
|
|
2020
|
-
|
|
2021
|
-
const De = X[
|
|
2019
|
+
for (; q < X.length && te.has(X[q]); )
|
|
2020
|
+
q += 1;
|
|
2021
|
+
const De = X[q];
|
|
2022
2022
|
if (!De) break;
|
|
2023
|
-
le.workbenchTurnId = De, te.add(De),
|
|
2023
|
+
le.workbenchTurnId = De, te.add(De), q += 1, B = !0;
|
|
2024
2024
|
}
|
|
2025
2025
|
const Y = Al(k.messages);
|
|
2026
2026
|
return B || Y;
|
|
@@ -2056,40 +2056,40 @@ function Ph(e) {
|
|
|
2056
2056
|
De = W;
|
|
2057
2057
|
break;
|
|
2058
2058
|
}
|
|
2059
|
-
const ea = te.messages.slice(Y + 1).findIndex((W) => W.role === "user"),
|
|
2060
|
-
const de = Pt(W, X), Ee = !!W.cardRecommendationDraft && Gu(W, X, te.messages),
|
|
2059
|
+
const ea = te.messages.slice(Y + 1).findIndex((W) => W.role === "user"), Fe = ea >= 0 ? Y + ea + 1 : te.messages.length, ca = te.messages.flatMap((W, ce) => {
|
|
2060
|
+
const de = Pt(W, X), Ee = !!W.cardRecommendationDraft && Gu(W, X, te.messages), Oe = W.content.replace(/\s+/gu, " ").trim(), Ve = ce > De && ce < Fe, u = Ve && W.role === "status", v = ce > De && ce < Fe && Wu(W);
|
|
2061
2061
|
u && !v && xl(W);
|
|
2062
|
-
const w = ce > De && ce <
|
|
2062
|
+
const w = ce > De && ce < Fe && W.role === "assistant" && !W.cardRecommendationDraft && !!Oe && B.includes(Oe), Z = Ve && W.role === "assistant" && !W.cardRecommendationDraft && (W.loading === !0 || W.streaming === !0);
|
|
2063
2063
|
return Z && xl(W), de || Ee || v || w || Z ? [ce] : [];
|
|
2064
2064
|
});
|
|
2065
|
-
for (let W =
|
|
2066
|
-
te.messages.splice(
|
|
2065
|
+
for (let W = ca.length - 1; W >= 0; W -= 1)
|
|
2066
|
+
te.messages.splice(ca[W], 1);
|
|
2067
2067
|
const Ze = Math.min(Y, te.messages.length);
|
|
2068
|
-
return te.messages.splice(Ze, 0, ...Re), Re.some((W) => !!W.workbenchInterleavedPlacement) || Al(te.messages),
|
|
2068
|
+
return te.messages.splice(Ze, 0, ...Re), Re.some((W) => !!W.workbenchInterleavedPlacement) || Al(te.messages), K.value === te && se.value !== te.messages && (se.value = te.messages), !0;
|
|
2069
2069
|
}
|
|
2070
2070
|
Wa(
|
|
2071
|
-
|
|
2071
|
+
K,
|
|
2072
2072
|
(L) => {
|
|
2073
2073
|
se.value = (L == null ? void 0 : L.messages) ?? [];
|
|
2074
2074
|
},
|
|
2075
2075
|
{ immediate: !0 }
|
|
2076
2076
|
), Wa(se, (L) => {
|
|
2077
|
-
|
|
2077
|
+
K.value && K.value.messages !== L && (K.value.messages = L);
|
|
2078
2078
|
}, { flush: "sync" });
|
|
2079
|
-
async function
|
|
2079
|
+
async function qe(L, j) {
|
|
2080
2080
|
return fetch(`${e.apiBaseUrl}${L}`, {
|
|
2081
2081
|
...j,
|
|
2082
2082
|
headers: xh(j == null ? void 0 : j.headers, A())
|
|
2083
2083
|
});
|
|
2084
2084
|
}
|
|
2085
2085
|
function fe(L) {
|
|
2086
|
-
var te,
|
|
2087
|
-
const j = new URLSearchParams(), J = (te = Qt(e.chatMode)) == null ? void 0 : te.trim(), k = (
|
|
2086
|
+
var te, q;
|
|
2087
|
+
const j = new URLSearchParams(), J = (te = Qt(e.chatMode)) == null ? void 0 : te.trim(), k = (q = Qt(e.workspaceId)) == null ? void 0 : q.trim();
|
|
2088
2088
|
J && j.set("chatMode", J), k && j.set("workspaceId", k);
|
|
2089
2089
|
const X = j.toString();
|
|
2090
2090
|
return X ? `${L}?${X}` : L;
|
|
2091
2091
|
}
|
|
2092
|
-
function
|
|
2092
|
+
function Ie() {
|
|
2093
2093
|
const L = A();
|
|
2094
2094
|
return L["x-trace-id"] || L["X-Trace-Id"] || L["x-request-id"] || L["X-Request-Id"] || "";
|
|
2095
2095
|
}
|
|
@@ -2101,11 +2101,11 @@ function Ph(e) {
|
|
|
2101
2101
|
}
|
|
2102
2102
|
(J = e.onError) == null || J.call(e, new Error(typeof L == "string" ? L : p("FAC.4f531787576253382")));
|
|
2103
2103
|
}
|
|
2104
|
-
function
|
|
2104
|
+
function Be(L, j = null, J = [], k = "") {
|
|
2105
2105
|
var te;
|
|
2106
2106
|
if (!e.enableChartCards || !Pu(L) || (te = L.cards) != null && te.length) return;
|
|
2107
2107
|
const X = uu(L.content, { userQuestion: k });
|
|
2108
|
-
X.length > 0 && (L.cards = X.map((
|
|
2108
|
+
X.length > 0 && (L.cards = X.map((q) => Ll(q, j, J)));
|
|
2109
2109
|
}
|
|
2110
2110
|
function Ba(L) {
|
|
2111
2111
|
return !!(!L || L.persisted === !1 || L.historyLoaded || L.messages.length > 0);
|
|
@@ -2114,7 +2114,7 @@ function Ph(e) {
|
|
|
2114
2114
|
if (!(H || d.value)) {
|
|
2115
2115
|
d.value = !0;
|
|
2116
2116
|
try {
|
|
2117
|
-
const L = await
|
|
2117
|
+
const L = await qe(fe("/chat/conversations"));
|
|
2118
2118
|
if (!L.ok) return;
|
|
2119
2119
|
const j = await sc(L), k = th(j.conversations).map((te) => ({
|
|
2120
2120
|
id: te.threadId,
|
|
@@ -2132,7 +2132,7 @@ function Ph(e) {
|
|
|
2132
2132
|
...k.filter((te) => te.id !== i.value)
|
|
2133
2133
|
] : k, H = !0;
|
|
2134
2134
|
const X = z();
|
|
2135
|
-
X && t.value.some((
|
|
2135
|
+
X && t.value.some((q) => q.id === X) && await ba(X, { silent: !0 });
|
|
2136
2136
|
} catch (L) {
|
|
2137
2137
|
Se(L);
|
|
2138
2138
|
} finally {
|
|
@@ -2140,49 +2140,49 @@ function Ph(e) {
|
|
|
2140
2140
|
}
|
|
2141
2141
|
}
|
|
2142
2142
|
}
|
|
2143
|
-
async function
|
|
2143
|
+
async function fa(L) {
|
|
2144
2144
|
var J;
|
|
2145
2145
|
const j = t.value.find((k) => k.id === L);
|
|
2146
2146
|
if (!(!j || j.persisted === !1 || j.historyLoaded || j.messages.length > 0))
|
|
2147
2147
|
try {
|
|
2148
|
-
const k = await
|
|
2148
|
+
const k = await qe(`/chat/${L}/history`);
|
|
2149
2149
|
if (!k.ok) return;
|
|
2150
2150
|
const te = (await sc(k)).messages || [];
|
|
2151
|
-
j.messages = Yu(te.map((
|
|
2151
|
+
j.messages = Yu(te.map((q) => {
|
|
2152
2152
|
let B = "";
|
|
2153
|
-
typeof
|
|
2154
|
-
var
|
|
2155
|
-
return
|
|
2156
|
-
}).map((
|
|
2157
|
-
const
|
|
2158
|
-
return p("FAC.4d7f1787576131218", { p0:
|
|
2153
|
+
typeof q.content == "string" ? B = q.content : Array.isArray(q.content) ? q.role === "tool" ? B = q.content.filter((Fe) => {
|
|
2154
|
+
var ca, Ze;
|
|
2155
|
+
return Fe.type === "tool-result" && ((ca = Fe.output) == null ? void 0 : ca.type) === "text" && !((Ze = Fe.output.value) != null && Ze.includes("no output"));
|
|
2156
|
+
}).map((Fe) => {
|
|
2157
|
+
const ca = Ic(Fe.toolName);
|
|
2158
|
+
return p("FAC.4d7f1787576131218", { p0: ca, p1: Fe.output.value });
|
|
2159
2159
|
}).join(`
|
|
2160
2160
|
|
|
2161
|
-
`) : B =
|
|
2161
|
+
`) : B = q.content.filter((Fe) => Fe.type === "text").map((Fe) => Fe.text || "").join("") : Array.isArray(q.parts) && (B = q.parts.filter((Fe) => Fe.type === "text").map((Fe) => Fe.text || "").join(""));
|
|
2162
2162
|
const Y = {
|
|
2163
|
-
id: ee(
|
|
2164
|
-
role:
|
|
2163
|
+
id: ee(q.id) || Xt(),
|
|
2164
|
+
role: q.role === "user" ? "user" : "assistant",
|
|
2165
2165
|
content: lh(B),
|
|
2166
|
-
timestamp: ee(
|
|
2167
|
-
}, le = _l(
|
|
2168
|
-
le.length > 0 && (Y.attachments = le),
|
|
2169
|
-
const ke = ee(
|
|
2170
|
-
ke && (Y.workbenchTurnId = ke), e.enableChartCards &&
|
|
2171
|
-
const Re = Dl(
|
|
2166
|
+
timestamp: ee(q.timestamp) || es()
|
|
2167
|
+
}, le = _l(q.attachments, !0);
|
|
2168
|
+
le.length > 0 && (Y.attachments = le), q.conclusion === !0 && (Y.conclusion = !0);
|
|
2169
|
+
const ke = ee(q.workbenchTurnId);
|
|
2170
|
+
ke && (Y.workbenchTurnId = ke), e.enableChartCards && q.conclusion === !0 && Array.isArray(q.cards) && (Y.cards = q.cards);
|
|
2171
|
+
const Re = Dl(q.taskStateDraft);
|
|
2172
2172
|
Re && (Y.taskStateDraft = Re);
|
|
2173
|
-
const De = Sc(
|
|
2173
|
+
const De = Sc(q.queryResultTable);
|
|
2174
2174
|
De && (Y.queryResultTable = De);
|
|
2175
|
-
const ea = Fl(
|
|
2176
|
-
return ea.length > 0 && (Y.queryResultTables = ea), ci(Y),
|
|
2177
|
-
}).filter((
|
|
2175
|
+
const ea = Fl(q.queryResultTables);
|
|
2176
|
+
return ea.length > 0 && (Y.queryResultTables = ea), ci(Y), Be(Y), Y;
|
|
2177
|
+
}).filter((q) => {
|
|
2178
2178
|
var B, Y, le;
|
|
2179
|
-
return
|
|
2179
|
+
return q.content.trim() !== "" || !!((B = q.cards) != null && B.length) || !!((Y = q.attachments) != null && Y.length) || !!q.taskStateDraft || !!q.queryResultTable || !!((le = q.queryResultTables) != null && le.length);
|
|
2180
2180
|
})), j.historyLoaded = !0, i.value === L && (se.value = j.messages), (J = e.onHistoryLoaded) == null || J.call(e, L);
|
|
2181
2181
|
} catch (k) {
|
|
2182
2182
|
Se(k);
|
|
2183
2183
|
}
|
|
2184
2184
|
}
|
|
2185
|
-
async function
|
|
2185
|
+
async function ba(L, j = {}) {
|
|
2186
2186
|
const J = L.trim();
|
|
2187
2187
|
if (!J) return;
|
|
2188
2188
|
const k = t.value.find((B) => B.id === i.value) ?? null;
|
|
@@ -2192,7 +2192,7 @@ function Ph(e) {
|
|
|
2192
2192
|
const te = t.value.find((B) => B.id === J) ?? null;
|
|
2193
2193
|
!Ba(te) && !j.silent && (m.value = !0);
|
|
2194
2194
|
try {
|
|
2195
|
-
await
|
|
2195
|
+
await fa(J);
|
|
2196
2196
|
} finally {
|
|
2197
2197
|
m.value = !1;
|
|
2198
2198
|
}
|
|
@@ -2228,10 +2228,10 @@ function Ph(e) {
|
|
|
2228
2228
|
await Aa();
|
|
2229
2229
|
else if (k) {
|
|
2230
2230
|
const X = t.value[j] ?? t.value[j - 1] ?? t.value[0];
|
|
2231
|
-
await
|
|
2231
|
+
await ba(X.id);
|
|
2232
2232
|
}
|
|
2233
2233
|
try {
|
|
2234
|
-
J.persisted !== !1 && await
|
|
2234
|
+
J.persisted !== !1 && await qe(`/chat/${L}`, { method: "DELETE" });
|
|
2235
2235
|
} catch {
|
|
2236
2236
|
}
|
|
2237
2237
|
}
|
|
@@ -2241,18 +2241,18 @@ function Ph(e) {
|
|
|
2241
2241
|
va(), t.value = [k], i.value = j, se.value = k.messages, he(j, k), await Promise.all(
|
|
2242
2242
|
L.map(async (te) => {
|
|
2243
2243
|
try {
|
|
2244
|
-
te.persisted !== !1 && await
|
|
2244
|
+
te.persisted !== !1 && await qe(`/chat/${te.id}`, { method: "DELETE" });
|
|
2245
2245
|
} catch {
|
|
2246
2246
|
}
|
|
2247
2247
|
})
|
|
2248
2248
|
);
|
|
2249
2249
|
}
|
|
2250
|
-
async function
|
|
2250
|
+
async function Ge(L, j) {
|
|
2251
2251
|
const J = t.value.find((X) => X.id === L);
|
|
2252
2252
|
J && (J.title = j);
|
|
2253
|
-
const k =
|
|
2253
|
+
const k = Ie();
|
|
2254
2254
|
try {
|
|
2255
|
-
(await
|
|
2255
|
+
(await qe(`/chat/${L}/title`, {
|
|
2256
2256
|
method: "PATCH",
|
|
2257
2257
|
headers: { "Content-Type": "application/json" },
|
|
2258
2258
|
body: JSON.stringify({
|
|
@@ -2264,11 +2264,11 @@ function Ph(e) {
|
|
|
2264
2264
|
}
|
|
2265
2265
|
}
|
|
2266
2266
|
async function et() {
|
|
2267
|
-
const L =
|
|
2267
|
+
const L = K.value;
|
|
2268
2268
|
if (!(!L || n.value || f.value)) {
|
|
2269
2269
|
f.value = !0;
|
|
2270
2270
|
try {
|
|
2271
|
-
const j = await
|
|
2271
|
+
const j = await qe(`/chat/${L.id}/compact`, { method: "POST" });
|
|
2272
2272
|
if (!j.ok) {
|
|
2273
2273
|
Se(new Error(p("FAC.abc91787576145438", { p0: j.status })));
|
|
2274
2274
|
return;
|
|
@@ -2281,10 +2281,10 @@ function Ph(e) {
|
|
|
2281
2281
|
}
|
|
2282
2282
|
}
|
|
2283
2283
|
}
|
|
2284
|
-
function
|
|
2284
|
+
function ga(L) {
|
|
2285
2285
|
return L.messages.filter((j) => j.role !== "status").map((j) => {
|
|
2286
2286
|
var le, ke;
|
|
2287
|
-
const J = Dl(j.taskStateDraft), k = Sc(j.queryResultTable), X = Fl(j.queryResultTables), te = fs(j),
|
|
2287
|
+
const J = Dl(j.taskStateDraft), k = Sc(j.queryResultTable), X = Fl(j.queryResultTables), te = fs(j), q = _l(j.attachments), B = {
|
|
2288
2288
|
content: j.content,
|
|
2289
2289
|
queryResultTable: k ?? void 0,
|
|
2290
2290
|
queryResultTables: X.length > 0 ? X : void 0
|
|
@@ -2296,7 +2296,7 @@ function Ph(e) {
|
|
|
2296
2296
|
timestamp: j.timestamp,
|
|
2297
2297
|
...j.conclusion === !0 ? { conclusion: !0 } : {},
|
|
2298
2298
|
...te ? { workbenchTurnId: te } : {},
|
|
2299
|
-
...
|
|
2299
|
+
...q.length > 0 ? { attachments: q } : {},
|
|
2300
2300
|
...(le = j.cards) != null && le.length ? { cards: j.cards } : {},
|
|
2301
2301
|
...(ke = B.queryResultTables) != null && ke.length ? { queryResultTables: B.queryResultTables } : B.queryResultTable ? { queryResultTable: B.queryResultTable } : {},
|
|
2302
2302
|
...J ? { taskStateDraft: J } : {}
|
|
@@ -2309,11 +2309,11 @@ function Ph(e) {
|
|
|
2309
2309
|
async function Ya(L) {
|
|
2310
2310
|
var X, te;
|
|
2311
2311
|
if (!L.threadId) return;
|
|
2312
|
-
const j =
|
|
2312
|
+
const j = ga(L);
|
|
2313
2313
|
if (j.length === 0) return;
|
|
2314
2314
|
const J = (X = Qt(e.chatMode)) == null ? void 0 : X.trim(), k = (te = Qt(e.workspaceId)) == null ? void 0 : te.trim();
|
|
2315
2315
|
try {
|
|
2316
|
-
const
|
|
2316
|
+
const q = await qe(`/chat/${L.threadId}/history`, {
|
|
2317
2317
|
method: "PUT",
|
|
2318
2318
|
headers: { "Content-Type": "application/json" },
|
|
2319
2319
|
body: JSON.stringify({
|
|
@@ -2323,13 +2323,13 @@ function Ph(e) {
|
|
|
2323
2323
|
messages: j
|
|
2324
2324
|
})
|
|
2325
2325
|
});
|
|
2326
|
-
if (!
|
|
2327
|
-
Se(new Error(p("FAC.66b71787576141704", { p0:
|
|
2326
|
+
if (!q.ok) {
|
|
2327
|
+
Se(new Error(p("FAC.66b71787576141704", { p0: q.status })));
|
|
2328
2328
|
return;
|
|
2329
2329
|
}
|
|
2330
2330
|
L.persisted = !0;
|
|
2331
|
-
} catch (
|
|
2332
|
-
Se(
|
|
2331
|
+
} catch (q) {
|
|
2332
|
+
Se(q);
|
|
2333
2333
|
}
|
|
2334
2334
|
}
|
|
2335
2335
|
function We(L) {
|
|
@@ -2338,15 +2338,15 @@ function Ph(e) {
|
|
|
2338
2338
|
if (j < 0) return;
|
|
2339
2339
|
const J = se.value[j], k = gs(J), X = k && Pt(J, k) ? se.value.filter((B) => B.id !== J.id && !!B.cardRecommendationDraft && bs(se.value, B) === k) : [];
|
|
2340
2340
|
if (j >= se.value.length - 1 && X.length === 0) return;
|
|
2341
|
-
const te = /* @__PURE__ */ new Set([J.id, ...X.map((B) => B.id)]),
|
|
2342
|
-
se.value.splice(0, se.value.length, ...
|
|
2341
|
+
const te = /* @__PURE__ */ new Set([J.id, ...X.map((B) => B.id)]), q = se.value.filter((B) => !te.has(B.id));
|
|
2342
|
+
se.value.splice(0, se.value.length, ...q, J, ...X);
|
|
2343
2343
|
}
|
|
2344
2344
|
function va() {
|
|
2345
2345
|
$.value && ($.value.abort(), $.value = null);
|
|
2346
2346
|
}
|
|
2347
2347
|
async function xa(L, j = {}) {
|
|
2348
2348
|
var Rt, Za, dt;
|
|
2349
|
-
const J =
|
|
2349
|
+
const J = K.value;
|
|
2350
2350
|
if (!J) {
|
|
2351
2351
|
console.error("[useChat] No active conversation");
|
|
2352
2352
|
return;
|
|
@@ -2361,9 +2361,9 @@ function Ph(e) {
|
|
|
2361
2361
|
k.messages.push(X), k.messages.filter((pe) => pe.role === "user").length === 1 && (k.title = El(L)), n.value = !0;
|
|
2362
2362
|
const te = new AbortController();
|
|
2363
2363
|
$.value = te;
|
|
2364
|
-
let
|
|
2365
|
-
const ea = 16,
|
|
2366
|
-
let Ze = {},
|
|
2364
|
+
let q = null, B = null, Y = null, le = null, ke = null, Re = "", De = null;
|
|
2365
|
+
const ea = 16, Fe = 25, ca = ea * 3;
|
|
2366
|
+
let Ze = {}, ua = null, aa = [];
|
|
2367
2367
|
const E = /* @__PURE__ */ new Map(), W = /* @__PURE__ */ new Map();
|
|
2368
2368
|
function ce(pe) {
|
|
2369
2369
|
C.value = (pe == null ? void 0 : pe.id) ?? null;
|
|
@@ -2376,16 +2376,16 @@ function Ph(e) {
|
|
|
2376
2376
|
function Ee() {
|
|
2377
2377
|
ke && (clearTimeout(ke), ke = null);
|
|
2378
2378
|
}
|
|
2379
|
-
function
|
|
2380
|
-
De || !
|
|
2381
|
-
if (De = null,
|
|
2379
|
+
function Oe() {
|
|
2380
|
+
De || !q || Re.length === 0 || (De = setTimeout(() => {
|
|
2381
|
+
if (De = null, q && Re.length > 0) {
|
|
2382
2382
|
const pe = Re.slice(0, ea);
|
|
2383
|
-
Re = Re.slice(ea),
|
|
2383
|
+
Re = Re.slice(ea), q.content += pe, Re.length > 0 && Oe();
|
|
2384
2384
|
}
|
|
2385
|
-
},
|
|
2385
|
+
}, Fe));
|
|
2386
2386
|
}
|
|
2387
|
-
function
|
|
2388
|
-
De && (clearTimeout(De), De = null),
|
|
2387
|
+
function Ve() {
|
|
2388
|
+
De && (clearTimeout(De), De = null), q && Re.length > 0 && (q.content += Re, Re = "");
|
|
2389
2389
|
}
|
|
2390
2390
|
function u(pe = !1) {
|
|
2391
2391
|
const xe = {
|
|
@@ -2420,25 +2420,25 @@ function Ph(e) {
|
|
|
2420
2420
|
};
|
|
2421
2421
|
return k.messages.push(we), k.messages[k.messages.length - 1];
|
|
2422
2422
|
}
|
|
2423
|
-
const
|
|
2424
|
-
function
|
|
2423
|
+
const _e = /* @__PURE__ */ new Map();
|
|
2424
|
+
function Me(pe) {
|
|
2425
2425
|
if (!pe.cardRecommendationDraft) return !1;
|
|
2426
2426
|
const xe = bs(k.messages, pe);
|
|
2427
2427
|
if (!xe || k.messages.some((He) => Pt(He, xe))) return !1;
|
|
2428
|
-
const we = Pc(pe) || pe.id,
|
|
2429
|
-
return
|
|
2430
|
-
...
|
|
2428
|
+
const we = Pc(pe) || pe.id, ze = _e.get(we);
|
|
2429
|
+
return _e.set(we, ze ? {
|
|
2430
|
+
...ze,
|
|
2431
2431
|
...pe,
|
|
2432
|
-
timestamp: pe.timestamp ||
|
|
2432
|
+
timestamp: pe.timestamp || ze.timestamp
|
|
2433
2433
|
} : pe), !0;
|
|
2434
2434
|
}
|
|
2435
|
-
function
|
|
2435
|
+
function ta(pe) {
|
|
2436
2436
|
const xe = gs(pe);
|
|
2437
2437
|
if (!xe || !Pt(pe, xe)) return !1;
|
|
2438
|
-
const we = [...
|
|
2438
|
+
const we = [..._e.entries()].filter(([, He]) => bs(k.messages, He) === xe);
|
|
2439
2439
|
if (we.length === 0 || k.messages.findIndex((He) => He.id === pe.id) < 0) return !1;
|
|
2440
2440
|
for (const [He] of we)
|
|
2441
|
-
|
|
2441
|
+
_e.delete(He);
|
|
2442
2442
|
for (const [, He] of we) {
|
|
2443
2443
|
if (kr(k.messages, He)) continue;
|
|
2444
2444
|
_s(k.messages, He), Qs(k.messages, He), fi(k.messages, He);
|
|
@@ -2456,7 +2456,7 @@ function Ph(e) {
|
|
|
2456
2456
|
id: pe.id || Xt(),
|
|
2457
2457
|
timestamp: pe.timestamp || es()
|
|
2458
2458
|
};
|
|
2459
|
-
if (
|
|
2459
|
+
if (Me(xe))
|
|
2460
2460
|
return xe;
|
|
2461
2461
|
fi(k.messages, xe);
|
|
2462
2462
|
const we = k.messages.findIndex(($e) => $e.id === xe.id);
|
|
@@ -2471,23 +2471,23 @@ function Ph(e) {
|
|
|
2471
2471
|
const nt = k.messages.findIndex((at) => at.id === $e.id);
|
|
2472
2472
|
return nt >= 0 && k.messages.splice(nt, 1), $e;
|
|
2473
2473
|
}
|
|
2474
|
-
return Qs(k.messages, $e), ds(k.messages),
|
|
2474
|
+
return Qs(k.messages, $e), ds(k.messages), ta($e), Us(k.messages, $e), $e;
|
|
2475
2475
|
}
|
|
2476
|
-
const
|
|
2476
|
+
const ze = le ? k.messages.findIndex(($e) => $e.id === (le == null ? void 0 : le.id)) : -1;
|
|
2477
2477
|
if (xe.cardRecommendationDraft) {
|
|
2478
2478
|
if (_s(k.messages, xe), kr(k.messages, xe))
|
|
2479
2479
|
return xe;
|
|
2480
2480
|
if (Qs(k.messages, xe), Pl(k.messages, xe))
|
|
2481
2481
|
return ds(k.messages), xe;
|
|
2482
2482
|
}
|
|
2483
|
-
if (
|
|
2484
|
-
_s(k.messages, xe), k.messages.splice(
|
|
2485
|
-
const $e = k.messages[
|
|
2486
|
-
return
|
|
2483
|
+
if (ze >= 0) {
|
|
2484
|
+
_s(k.messages, xe), k.messages.splice(ze, 0, xe);
|
|
2485
|
+
const $e = k.messages[ze];
|
|
2486
|
+
return ta($e), Us(k.messages, $e), ds(k.messages), $e;
|
|
2487
2487
|
}
|
|
2488
2488
|
_s(k.messages, xe), k.messages.push(xe);
|
|
2489
2489
|
const He = k.messages[k.messages.length - 1];
|
|
2490
|
-
return
|
|
2490
|
+
return ta(He), Us(k.messages, He), ds(k.messages), He;
|
|
2491
2491
|
}
|
|
2492
2492
|
function Va(pe) {
|
|
2493
2493
|
var we;
|
|
@@ -2495,10 +2495,10 @@ function Ph(e) {
|
|
|
2495
2495
|
if (!xe)
|
|
2496
2496
|
return { summary: p("FAC.1d911787576233473") };
|
|
2497
2497
|
try {
|
|
2498
|
-
const
|
|
2498
|
+
const ze = JSON.parse(xe);
|
|
2499
2499
|
return {
|
|
2500
|
-
summary: (
|
|
2501
|
-
detail: typeof
|
|
2500
|
+
summary: (ze == null ? void 0 : ze.errorText) || (ze == null ? void 0 : ze.message) || ((we = ze == null ? void 0 : ze.error) == null ? void 0 : we.message) || p("FAC.1d911787576233473"),
|
|
2501
|
+
detail: typeof ze == "string" ? ze : JSON.stringify(ze, null, 2)
|
|
2502
2502
|
};
|
|
2503
2503
|
} catch {
|
|
2504
2504
|
return {
|
|
@@ -2528,7 +2528,7 @@ function Ph(e) {
|
|
|
2528
2528
|
Fa(le), le = null;
|
|
2529
2529
|
}
|
|
2530
2530
|
function ha() {
|
|
2531
|
-
Fa(
|
|
2531
|
+
Fa(q), q = null, ce(null);
|
|
2532
2532
|
}
|
|
2533
2533
|
function ct() {
|
|
2534
2534
|
Fa(B), B = null, Y = null;
|
|
@@ -2550,34 +2550,34 @@ function Ph(e) {
|
|
|
2550
2550
|
}
|
|
2551
2551
|
function At() {
|
|
2552
2552
|
var pe;
|
|
2553
|
-
Ia(),
|
|
2553
|
+
Ia(), q && (q.content.trim() === "" && !((pe = q.cards) != null && pe.length) ? ha() : (q.loading = !1, q.streaming = !1, Be(q, ua, aa, L), q = null, ce(null))), ts(), jt();
|
|
2554
2554
|
}
|
|
2555
2555
|
ja(!0);
|
|
2556
2556
|
async function ss(pe) {
|
|
2557
2557
|
var He, $e, nt, at, ft, Yt, St;
|
|
2558
2558
|
const xe = pe.getReader(), we = new TextDecoder();
|
|
2559
|
-
let
|
|
2559
|
+
let ze = "";
|
|
2560
2560
|
for (; ; ) {
|
|
2561
2561
|
const { done: Te, value: T } = await xe.read();
|
|
2562
2562
|
if (Te) break;
|
|
2563
|
-
|
|
2564
|
-
const O =
|
|
2563
|
+
ze += we.decode(T, { stream: !0 });
|
|
2564
|
+
const O = ze.split(`
|
|
2565
2565
|
`);
|
|
2566
|
-
|
|
2566
|
+
ze = O.pop() || "";
|
|
2567
2567
|
for (const ge of O) {
|
|
2568
|
-
const
|
|
2569
|
-
if (!
|
|
2570
|
-
const be = kl(
|
|
2568
|
+
const na = ge.trim();
|
|
2569
|
+
if (!na) continue;
|
|
2570
|
+
const be = kl(na);
|
|
2571
2571
|
if (be)
|
|
2572
2572
|
switch (le != null && le.initialEventsPending && Ia(), be.type) {
|
|
2573
2573
|
case "start-step":
|
|
2574
|
-
|
|
2574
|
+
Ve(), Ia(), q = u(be.conclusion === !0 || be.kind === "conclusion");
|
|
2575
2575
|
break;
|
|
2576
2576
|
case "text-delta":
|
|
2577
|
-
if (Ia(), jt(),
|
|
2578
|
-
|
|
2577
|
+
if (Ia(), jt(), q) {
|
|
2578
|
+
q.loading = !1, q.streaming = !0;
|
|
2579
2579
|
const Ae = be.delta || "";
|
|
2580
|
-
Ae.length >
|
|
2580
|
+
Ae.length > ca ? (Re += Ae, Oe()) : q.content += Ae;
|
|
2581
2581
|
}
|
|
2582
2582
|
de();
|
|
2583
2583
|
break;
|
|
@@ -2585,12 +2585,12 @@ function Ph(e) {
|
|
|
2585
2585
|
Ee(), de();
|
|
2586
2586
|
break;
|
|
2587
2587
|
case "finish-step": {
|
|
2588
|
-
|
|
2588
|
+
Ve(), Ee(), jt(), q && q.content.trim() === "" && !((He = q.cards) != null && He.length) ? ha() : q && (q.loading = !1, q.streaming = !1, Be(q, ua, aa, L), q = null, ce(null)), de();
|
|
2589
2589
|
break;
|
|
2590
2590
|
}
|
|
2591
2591
|
case "tool-input-start": {
|
|
2592
2592
|
if (typeof be.toolCallId == "string" && typeof be.toolName == "string" && E.set(be.toolCallId, be.toolName), (Y == null ? void 0 : Y.kind) === "subagent") break;
|
|
2593
|
-
Ia(),
|
|
2593
|
+
Ia(), q && q.content.trim() === "" && !(($e = q.cards) != null && $e.length) && ha(), ts();
|
|
2594
2594
|
const Ae = Ic(be.toolName);
|
|
2595
2595
|
B = v(Ae), Y = { kind: "tool", name: be.toolName };
|
|
2596
2596
|
break;
|
|
@@ -2615,20 +2615,20 @@ function Ph(e) {
|
|
|
2615
2615
|
if (Ae === "execute_sql_api" && typeof be.toolCallId == "string") {
|
|
2616
2616
|
const je = uh(be.output ?? be.delta ?? be.result);
|
|
2617
2617
|
if (je) {
|
|
2618
|
-
const
|
|
2619
|
-
|
|
2618
|
+
const la = W.get(be.toolCallId);
|
|
2619
|
+
la && (ua = la, aa = je);
|
|
2620
2620
|
}
|
|
2621
2621
|
}
|
|
2622
2622
|
if (e.enableChartCards && (Ae === "generate_chart" || Ae === "execute_metric_api")) {
|
|
2623
2623
|
if (Ae === "execute_metric_api") {
|
|
2624
|
-
const
|
|
2625
|
-
|
|
2624
|
+
const la = Tu(be.output ?? be.delta ?? be.result);
|
|
2625
|
+
la && (D.value = la);
|
|
2626
2626
|
}
|
|
2627
2627
|
const je = vu(be.output ?? be.delta ?? be.result);
|
|
2628
2628
|
if (je) {
|
|
2629
2629
|
Ae === "generate_chart" && (D.value = null);
|
|
2630
|
-
const
|
|
2631
|
-
F.value =
|
|
2630
|
+
const la = Ll(je, ua, aa);
|
|
2631
|
+
F.value = la;
|
|
2632
2632
|
}
|
|
2633
2633
|
}
|
|
2634
2634
|
if (!(Ae && zt(Ae))) {
|
|
@@ -2636,8 +2636,8 @@ function Ph(e) {
|
|
|
2636
2636
|
if (Y.name === "task")
|
|
2637
2637
|
ct();
|
|
2638
2638
|
else if (B.startTime) {
|
|
2639
|
-
const je = Date.now(),
|
|
2640
|
-
B.content += p("FAC.b9161787576153238", { p0: oi(
|
|
2639
|
+
const je = Date.now(), la = je - B.startTime;
|
|
2640
|
+
B.content += p("FAC.b9161787576153238", { p0: oi(la) }), B.endTime = je, B.loading = !1, B = null, Y = null;
|
|
2641
2641
|
}
|
|
2642
2642
|
}
|
|
2643
2643
|
}
|
|
@@ -2651,12 +2651,12 @@ function Ph(e) {
|
|
|
2651
2651
|
else if (B.startTime) {
|
|
2652
2652
|
const Ae = Date.now(), je = Ae - B.startTime;
|
|
2653
2653
|
B.content += p("FAC.239c1787576154298", { p0: oi(je) }), B.endTime = Ae;
|
|
2654
|
-
const
|
|
2654
|
+
const la = be.output || be.delta || "";
|
|
2655
2655
|
try {
|
|
2656
|
-
const Sa = JSON.parse(
|
|
2657
|
-
B.error = Sa.error || Sa.message ||
|
|
2656
|
+
const Sa = JSON.parse(la);
|
|
2657
|
+
B.error = Sa.error || Sa.message || la, B.detail = Sa.detail || Sa.details || Sa.reason;
|
|
2658
2658
|
} catch {
|
|
2659
|
-
B.error =
|
|
2659
|
+
B.error = la || p("FAC.4f531787576253382");
|
|
2660
2660
|
}
|
|
2661
2661
|
B.loading = !1, B = null, Y = null;
|
|
2662
2662
|
}
|
|
@@ -2673,8 +2673,8 @@ function Ph(e) {
|
|
|
2673
2673
|
break;
|
|
2674
2674
|
}
|
|
2675
2675
|
case "data-oh:subagent.done": {
|
|
2676
|
-
const Ae = ((Yt = be.data) == null ? void 0 : Yt.agentName) || "", je = (St = be.data) == null ? void 0 : St.taskId,
|
|
2677
|
-
if (B &&
|
|
2676
|
+
const Ae = ((Yt = be.data) == null ? void 0 : Yt.agentName) || "", je = (St = be.data) == null ? void 0 : St.taskId, la = (Y == null ? void 0 : Y.kind) === "subagent" && (je && Y.taskId === je || Ae && Y.name === Ae || !je && !Ae);
|
|
2677
|
+
if (B && la)
|
|
2678
2678
|
if (B.startTime) {
|
|
2679
2679
|
const Sa = Date.now(), bt = Sa - B.startTime;
|
|
2680
2680
|
B.content += p("FAC.b9161787576153238", { p0: oi(bt) }), B.endTime = Sa, B.loading = !1, B = null, Y = null;
|
|
@@ -2692,20 +2692,20 @@ function Ph(e) {
|
|
|
2692
2692
|
}
|
|
2693
2693
|
}
|
|
2694
2694
|
}
|
|
2695
|
-
if (
|
|
2696
|
-
const Te = kl(
|
|
2697
|
-
Te && (le != null && le.initialEventsPending) && Ia(), (Te == null ? void 0 : Te.type) === "text-delta" &&
|
|
2695
|
+
if (ze.trim()) {
|
|
2696
|
+
const Te = kl(ze.trim());
|
|
2697
|
+
Te && (le != null && le.initialEventsPending) && Ia(), (Te == null ? void 0 : Te.type) === "text-delta" && q && (q.loading = !1, q.streaming = !0, q.content += Te.delta);
|
|
2698
2698
|
}
|
|
2699
2699
|
}
|
|
2700
2700
|
if (e.transport) {
|
|
2701
2701
|
let pe = k.threadId || "";
|
|
2702
2702
|
try {
|
|
2703
|
-
const xe =
|
|
2703
|
+
const xe = Ie(), we = R(), ze = Zu(e.businessGroup), He = (Za = Qt(e.chatMode)) == null ? void 0 : Za.trim(), $e = Qt(e.workspaceId), nt = Qt(e.userId), at = await e.transport({
|
|
2704
2704
|
appendMessage: it,
|
|
2705
2705
|
consumeAssistantStream: ss,
|
|
2706
2706
|
moveMessageToEnd: We,
|
|
2707
2707
|
assistantPersona: we,
|
|
2708
|
-
businessGroup:
|
|
2708
|
+
businessGroup: ze,
|
|
2709
2709
|
chatMode: He || void 0,
|
|
2710
2710
|
threadId: k.threadId,
|
|
2711
2711
|
clientDraftId: k.clientDraftId,
|
|
@@ -2743,13 +2743,13 @@ function Ph(e) {
|
|
|
2743
2743
|
async (L) => {
|
|
2744
2744
|
if (!L) return;
|
|
2745
2745
|
const j = t.value.some((J) => J.id === L);
|
|
2746
|
-
!j && !H && e.autoLoadConversations !== !1 || j && await
|
|
2746
|
+
!j && !H && e.autoLoadConversations !== !1 || j && await ba(L, { silent: !0 });
|
|
2747
2747
|
}
|
|
2748
2748
|
), {
|
|
2749
2749
|
conversations: t,
|
|
2750
2750
|
currentConversationId: i,
|
|
2751
2751
|
messages: se,
|
|
2752
|
-
contextUsage:
|
|
2752
|
+
contextUsage: Ke,
|
|
2753
2753
|
isLoading: n,
|
|
2754
2754
|
isLoadingConversations: d,
|
|
2755
2755
|
isSwitchingConversation: m,
|
|
@@ -2768,9 +2768,9 @@ function Ph(e) {
|
|
|
2768
2768
|
loadConversations: Qa,
|
|
2769
2769
|
deleteConversation: Ta,
|
|
2770
2770
|
clearConversations: rt,
|
|
2771
|
-
renameConversation:
|
|
2772
|
-
switchConversation:
|
|
2773
|
-
loadHistory:
|
|
2771
|
+
renameConversation: Ge,
|
|
2772
|
+
switchConversation: ba,
|
|
2773
|
+
loadHistory: fa,
|
|
2774
2774
|
moveMessageToEnd: We
|
|
2775
2775
|
};
|
|
2776
2776
|
}
|
|
@@ -2851,7 +2851,7 @@ function jo(e, t = {}) {
|
|
|
2851
2851
|
const F = t.hiddenStatusMessageIds ?? /* @__PURE__ */ new Set();
|
|
2852
2852
|
function D(R = !1) {
|
|
2853
2853
|
if (n.length === 0) return;
|
|
2854
|
-
const z = n.filter((
|
|
2854
|
+
const z = n.filter((K) => !F.has(K.id));
|
|
2855
2855
|
z.length > 0 && i.push({
|
|
2856
2856
|
type: "tool-activity",
|
|
2857
2857
|
messages: z,
|
|
@@ -2870,23 +2870,23 @@ function jo(e, t = {}) {
|
|
|
2870
2870
|
};
|
|
2871
2871
|
}
|
|
2872
2872
|
function H() {
|
|
2873
|
-
var se,
|
|
2873
|
+
var se, Ke;
|
|
2874
2874
|
if (d.length === 0) return;
|
|
2875
2875
|
const R = d;
|
|
2876
2876
|
d = [];
|
|
2877
2877
|
const z = R.some((he) => he.loading);
|
|
2878
2878
|
if (!z && C) return;
|
|
2879
|
-
const
|
|
2880
|
-
!
|
|
2879
|
+
const K = z || f;
|
|
2880
|
+
!K && !R.some((he) => he.content.trim()) || i.push({
|
|
2881
2881
|
type: "assistant",
|
|
2882
2882
|
message: {
|
|
2883
2883
|
id: `${((se = R[0]) == null ? void 0 : se.id) || "thinking-process"}-assistant`,
|
|
2884
2884
|
role: "assistant",
|
|
2885
2885
|
content: "",
|
|
2886
|
-
loading:
|
|
2887
|
-
streaming:
|
|
2886
|
+
loading: K,
|
|
2887
|
+
streaming: K,
|
|
2888
2888
|
thinkingProcessMessages: R,
|
|
2889
|
-
timestamp: ((
|
|
2889
|
+
timestamp: ((Ke = R[0]) == null ? void 0 : Ke.timestamp) || ""
|
|
2890
2890
|
}
|
|
2891
2891
|
});
|
|
2892
2892
|
}
|
|
@@ -3153,22 +3153,22 @@ function dy(e, t, i, n) {
|
|
|
3153
3153
|
const m = d.indent;
|
|
3154
3154
|
let f = t, C = t;
|
|
3155
3155
|
for (; f > i; ) {
|
|
3156
|
-
const
|
|
3157
|
-
if (
|
|
3156
|
+
const K = e[f - 1];
|
|
3157
|
+
if (K.protected || !K.blank && K.indent < m) break;
|
|
3158
3158
|
f -= 1;
|
|
3159
3159
|
}
|
|
3160
3160
|
for (; C + 1 < e.length; ) {
|
|
3161
|
-
const
|
|
3162
|
-
if (
|
|
3161
|
+
const K = e[C + 1];
|
|
3162
|
+
if (K.protected || !K.blank && K.indent < m) break;
|
|
3163
3163
|
C += 1;
|
|
3164
3164
|
}
|
|
3165
3165
|
const F = e.slice(f, C + 1), D = F.filter(
|
|
3166
|
-
(
|
|
3166
|
+
(K) => {
|
|
3167
3167
|
var se;
|
|
3168
|
-
return ((se =
|
|
3168
|
+
return ((se = K.listItem) == null ? void 0 : se.indent) === m && !K.hasListParent;
|
|
3169
3169
|
}
|
|
3170
3170
|
).length, $ = F.some(
|
|
3171
|
-
(
|
|
3171
|
+
(K) => !K.blank && !K.listItem && K.indent === m
|
|
3172
3172
|
), H = ny(e, f - 1), A = ly(H), R = n ? oy(e, n) : null, z = !!(n && H === R && R && !R.listItem && R.indent === n.baseIndent);
|
|
3173
3173
|
return D < 2 && !$ && !A && !z ? null : { start: f, end: C, baseIndent: m };
|
|
3174
3174
|
}
|
|
@@ -3417,7 +3417,7 @@ function _y(e) {
|
|
|
3417
3417
|
var $, H;
|
|
3418
3418
|
const t = Sy(e), i = Go(e), n = e.chart.xField;
|
|
3419
3419
|
if (e.chart.type === "candlestick" || e.chart.type === "kline") {
|
|
3420
|
-
const A = Wr(i, ["open", p("FAC.3fc31787576278355"), p("FAC.13c51787576254953")]) || i[0], R = Wr(i, ["close", p("FAC.24a31787576279073"), p("FAC.a40b1787576255081")]) || i[1], z = Wr(i, ["low", p("FAC.f3351787576279084"), p("FAC.b1501787576255479")]) || i[2],
|
|
3420
|
+
const A = Wr(i, ["open", p("FAC.3fc31787576278355"), p("FAC.13c51787576254953")]) || i[0], R = Wr(i, ["close", p("FAC.24a31787576279073"), p("FAC.a40b1787576255081")]) || i[1], z = Wr(i, ["low", p("FAC.f3351787576279084"), p("FAC.b1501787576255479")]) || i[2], K = Wr(i, ["high", p("FAC.5d751787576279098"), p("FAC.866c1787576255636")]) || i[3];
|
|
3421
3421
|
return {
|
|
3422
3422
|
tooltip: { trigger: "axis" },
|
|
3423
3423
|
grid: { left: 40, right: 16, top: 28, bottom: 28, containLabel: !0 },
|
|
@@ -3437,17 +3437,17 @@ function _y(e) {
|
|
|
3437
3437
|
mt(se[A]),
|
|
3438
3438
|
mt(se[R]),
|
|
3439
3439
|
mt(se[z]),
|
|
3440
|
-
mt(se[
|
|
3440
|
+
mt(se[K])
|
|
3441
3441
|
])
|
|
3442
3442
|
}]
|
|
3443
3443
|
};
|
|
3444
3444
|
}
|
|
3445
3445
|
if (e.chart.type === "sankey") {
|
|
3446
3446
|
const A = ps(e), R = t.map((z) => {
|
|
3447
|
-
const
|
|
3447
|
+
const K = ic(z);
|
|
3448
3448
|
return {
|
|
3449
3449
|
source: String(z[n] ?? ""),
|
|
3450
|
-
target: String(z[
|
|
3450
|
+
target: String(z[K] ?? ""),
|
|
3451
3451
|
value: mt(z[A])
|
|
3452
3452
|
};
|
|
3453
3453
|
}).filter((z) => z.source && z.target);
|
|
@@ -3461,17 +3461,17 @@ function _y(e) {
|
|
|
3461
3461
|
};
|
|
3462
3462
|
}
|
|
3463
3463
|
if (e.chart.type === "heatmap") {
|
|
3464
|
-
const A = ps(e), R = t[0] ? ic(t[0]) : "target", z = [...new Set(t.map((se) => String(se[R] ?? "")))],
|
|
3464
|
+
const A = ps(e), R = t[0] ? ic(t[0]) : "target", z = [...new Set(t.map((se) => String(se[R] ?? "")))], K = [...new Set(t.map((se) => String(se[n] ?? "")))];
|
|
3465
3465
|
return {
|
|
3466
3466
|
tooltip: { trigger: "item" },
|
|
3467
3467
|
grid: { left: 48, right: 16, top: 28, bottom: 28, containLabel: !0 },
|
|
3468
|
-
xAxis: { type: "category", data:
|
|
3468
|
+
xAxis: { type: "category", data: K },
|
|
3469
3469
|
yAxis: { type: "category", data: z },
|
|
3470
3470
|
visualMap: { min: 0, max: Math.max(...t.map((se) => mt(se[A])), 1), calculable: !0, orient: "horizontal", bottom: 0 },
|
|
3471
3471
|
series: [{
|
|
3472
3472
|
type: "heatmap",
|
|
3473
3473
|
data: t.map((se) => [
|
|
3474
|
-
|
|
3474
|
+
K.indexOf(String(se[n] ?? "")),
|
|
3475
3475
|
z.indexOf(String(se[R] ?? "")),
|
|
3476
3476
|
mt(se[A])
|
|
3477
3477
|
])
|
|
@@ -3523,10 +3523,10 @@ function _y(e) {
|
|
|
3523
3523
|
}
|
|
3524
3524
|
if (e.chart.type === "graph" || e.chart.type === "network") {
|
|
3525
3525
|
const A = ps(e), R = t.map((z) => {
|
|
3526
|
-
const
|
|
3526
|
+
const K = ic(z);
|
|
3527
3527
|
return {
|
|
3528
3528
|
source: String(z[n] ?? ""),
|
|
3529
|
-
target: String(z[
|
|
3529
|
+
target: String(z[K] ?? ""),
|
|
3530
3530
|
value: mt(z[A])
|
|
3531
3531
|
};
|
|
3532
3532
|
}).filter((z) => z.source && z.target);
|
|
@@ -3767,21 +3767,21 @@ const By = {
|
|
|
3767
3767
|
attributeFilter: ["data-workbench-style", "data-dash-theme", "style", "class"]
|
|
3768
3768
|
}));
|
|
3769
3769
|
}
|
|
3770
|
-
function
|
|
3770
|
+
function K() {
|
|
3771
3771
|
ht(() => {
|
|
3772
3772
|
n == null || n.resize();
|
|
3773
3773
|
});
|
|
3774
3774
|
}
|
|
3775
3775
|
function se() {
|
|
3776
3776
|
n || !i.value || F.value || (F.value = !0, n = Im.init(i.value), D.value = !0, A(t.option), z(), typeof ResizeObserver < "u" && i.value && (d = new ResizeObserver(() => {
|
|
3777
|
-
|
|
3777
|
+
K();
|
|
3778
3778
|
}), d.observe(i.value)), F.value = !1);
|
|
3779
3779
|
}
|
|
3780
|
-
function
|
|
3780
|
+
function Ke() {
|
|
3781
3781
|
f == null || f.disconnect(), f = null;
|
|
3782
3782
|
}
|
|
3783
3783
|
function he() {
|
|
3784
|
-
if (
|
|
3784
|
+
if (Ke(), !!i.value) {
|
|
3785
3785
|
if (typeof IntersectionObserver > "u") {
|
|
3786
3786
|
C.value = !0, se();
|
|
3787
3787
|
return;
|
|
@@ -3789,7 +3789,7 @@ const By = {
|
|
|
3789
3789
|
f = new IntersectionObserver(
|
|
3790
3790
|
(ve) => {
|
|
3791
3791
|
for (const ye of ve)
|
|
3792
|
-
ye.isIntersecting && (C.value = !0, se(),
|
|
3792
|
+
ye.isIntersecting && (C.value = !0, se(), Ke());
|
|
3793
3793
|
},
|
|
3794
3794
|
{
|
|
3795
3795
|
root: null,
|
|
@@ -3810,10 +3810,10 @@ const By = {
|
|
|
3810
3810
|
), Wa(
|
|
3811
3811
|
() => t.height,
|
|
3812
3812
|
() => {
|
|
3813
|
-
|
|
3813
|
+
K();
|
|
3814
3814
|
}
|
|
3815
3815
|
), bm(() => {
|
|
3816
|
-
|
|
3816
|
+
Ke(), R(), d == null || d.disconnect(), d = null, n == null || n.dispose(), n = null;
|
|
3817
3817
|
}), (ve, ye) => (S(), I("div", {
|
|
3818
3818
|
class: "echarts-view",
|
|
3819
3819
|
style: uc($.value)
|
|
@@ -3900,7 +3900,7 @@ const By = {
|
|
|
3900
3900
|
])
|
|
3901
3901
|
]),
|
|
3902
3902
|
e.card.period ? (S(), I("div", $y, N(e.card.period), 1)) : ie("", !0),
|
|
3903
|
-
|
|
3903
|
+
ma(Ko, {
|
|
3904
3904
|
class: "chart-card__chart",
|
|
3905
3905
|
option: f.value,
|
|
3906
3906
|
height: C.value
|
|
@@ -3921,13 +3921,13 @@ const By = {
|
|
|
3921
3921
|
])) : ie("", !0)
|
|
3922
3922
|
]),
|
|
3923
3923
|
D.value.length ? (S(), I("div", af, [
|
|
3924
|
-
(S(!0), I(
|
|
3925
|
-
key:
|
|
3924
|
+
(S(!0), I(ra, null, Ca(D.value, (K) => (S(), I("button", {
|
|
3925
|
+
key: K,
|
|
3926
3926
|
type: "button",
|
|
3927
3927
|
class: "chart-card__business-action",
|
|
3928
|
-
disabled: $(
|
|
3929
|
-
onClick: (se) => H(
|
|
3930
|
-
}, N(m[
|
|
3928
|
+
disabled: $(K),
|
|
3929
|
+
onClick: (se) => H(K)
|
|
3930
|
+
}, N(m[K]), 9, tf))), 128))
|
|
3931
3931
|
])) : ie("", !0)
|
|
3932
3932
|
], 512);
|
|
3933
3933
|
};
|
|
@@ -24798,7 +24798,7 @@ const Af = p("FAC.2ad01787576171601");
|
|
|
24798
24798
|
function Lr(e) {
|
|
24799
24799
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
24800
24800
|
}
|
|
24801
|
-
function
|
|
24801
|
+
function sa(e) {
|
|
24802
24802
|
return Lr(e) ? e : {};
|
|
24803
24803
|
}
|
|
24804
24804
|
function La(e) {
|
|
@@ -24809,7 +24809,7 @@ function Js(e, t) {
|
|
|
24809
24809
|
return !i || i === t.trim() ? "" : i;
|
|
24810
24810
|
}
|
|
24811
24811
|
function Ft(e) {
|
|
24812
|
-
const t =
|
|
24812
|
+
const t = sa(e);
|
|
24813
24813
|
return Object.fromEntries(Object.entries(t).flatMap(([i, n]) => {
|
|
24814
24814
|
const d = Js(n, i);
|
|
24815
24815
|
return d ? [[i, d]] : [];
|
|
@@ -24837,7 +24837,7 @@ function Ql(e, t) {
|
|
|
24837
24837
|
}));
|
|
24838
24838
|
}
|
|
24839
24839
|
function qs(e) {
|
|
24840
|
-
const t =
|
|
24840
|
+
const t = sa(e.data), i = Array.isArray(e.columns) ? e.columns : t.columns;
|
|
24841
24841
|
return {
|
|
24842
24842
|
...cc(t.displayColumns, i),
|
|
24843
24843
|
...cc(e.displayColumns, i),
|
|
@@ -24848,7 +24848,7 @@ function qs(e) {
|
|
|
24848
24848
|
}
|
|
24849
24849
|
function Fi(e) {
|
|
24850
24850
|
if (typeof e == "string") return e.trim();
|
|
24851
|
-
const t =
|
|
24851
|
+
const t = sa(e);
|
|
24852
24852
|
return La(t.key) || La(t.dataIndex) || La(t.field) || La(t.name);
|
|
24853
24853
|
}
|
|
24854
24854
|
function Qo(e, t, i, n) {
|
|
@@ -24857,7 +24857,7 @@ function Qo(e, t, i, n) {
|
|
|
24857
24857
|
key: e,
|
|
24858
24858
|
labels: i
|
|
24859
24859
|
});
|
|
24860
|
-
const d =
|
|
24860
|
+
const d = sa(e);
|
|
24861
24861
|
return Ws({
|
|
24862
24862
|
key: t,
|
|
24863
24863
|
explicitLabel: La(d.label) || La(d.title) || La(d.displayName),
|
|
@@ -24880,7 +24880,7 @@ function Yl(e) {
|
|
|
24880
24880
|
return e.filter((i) => t.has(i.value) ? !1 : (t.add(i.value), !0));
|
|
24881
24881
|
}
|
|
24882
24882
|
function Yo(e) {
|
|
24883
|
-
const t =
|
|
24883
|
+
const t = sa(e == null ? void 0 : e.cardConfig), i = sa(e == null ? void 0 : e.selectedConfig), n = sa(i.values), d = sa(e == null ? void 0 : e.dataBinding), m = sa(e == null ? void 0 : e.queryResult), f = sa(m.data), C = sa(m.dataBinding), F = sa(d.queryResult), D = sa(F.data), $ = sa(e == null ? void 0 : e.blockPlan), H = sa($.data), A = sa(H.dataBinding), R = sa($.meta), z = sa(R.queryResult);
|
|
24884
24884
|
return {
|
|
24885
24885
|
...Os(D.columns),
|
|
24886
24886
|
...Os(F.columns),
|
|
@@ -24909,20 +24909,20 @@ function Yo(e) {
|
|
|
24909
24909
|
};
|
|
24910
24910
|
}
|
|
24911
24911
|
function Sf(e) {
|
|
24912
|
-
const t =
|
|
24912
|
+
const t = sa(e == null ? void 0 : e.cardConfig), i = sa(e == null ? void 0 : e.selectedConfig), n = sa(i.values), d = sa(e == null ? void 0 : e.dataBinding);
|
|
24913
24913
|
return [
|
|
24914
|
-
|
|
24915
|
-
|
|
24916
|
-
|
|
24917
|
-
|
|
24914
|
+
sa(t.fieldMapping),
|
|
24915
|
+
sa(i.fieldMapping),
|
|
24916
|
+
sa(n.fieldMapping),
|
|
24917
|
+
sa(d.fieldMapping)
|
|
24918
24918
|
].find((f) => Object.keys(f).length > 0) ?? {};
|
|
24919
24919
|
}
|
|
24920
24920
|
function kf(e) {
|
|
24921
24921
|
if (!e) return [];
|
|
24922
|
-
const t =
|
|
24922
|
+
const t = sa(e.queryResult), i = sa(t.data), n = Yo(e), m = (Array.isArray(t.columns) ? t.columns : Array.isArray(i.columns) ? i.columns : []).map((F, D) => {
|
|
24923
24923
|
const $ = Fi(F);
|
|
24924
24924
|
if (!$) return null;
|
|
24925
|
-
const H =
|
|
24925
|
+
const H = sa(F);
|
|
24926
24926
|
return {
|
|
24927
24927
|
value: $,
|
|
24928
24928
|
label: Qo(F, $, n),
|
|
@@ -24942,7 +24942,7 @@ function _f(e) {
|
|
|
24942
24942
|
}
|
|
24943
24943
|
function Dr(e, t) {
|
|
24944
24944
|
if (typeof e == "string") return Ws({ key: e, labels: t });
|
|
24945
|
-
const i =
|
|
24945
|
+
const i = sa(e), n = La(i.name) || La(i.key) || La(i.field);
|
|
24946
24946
|
return n ? Ws({
|
|
24947
24947
|
key: n,
|
|
24948
24948
|
explicitLabel: La(i.label) || La(i.displayName),
|
|
@@ -24958,11 +24958,11 @@ function Fr(e, t, i, n) {
|
|
|
24958
24958
|
n && e.push({ key: t, text: `${i}:${n}` });
|
|
24959
24959
|
}
|
|
24960
24960
|
function Ys(e) {
|
|
24961
|
-
const t =
|
|
24961
|
+
const t = sa(e == null ? void 0 : e.dataBinding);
|
|
24962
24962
|
return La(t.filterSummary);
|
|
24963
24963
|
}
|
|
24964
24964
|
function Ff(e) {
|
|
24965
|
-
const t =
|
|
24965
|
+
const t = sa(e.configRequirement), i = sa(e.diagnostics);
|
|
24966
24966
|
return La(t.message) || La(e.previewReason) || La(e.diagnosticReason) || wc(i.reasonCodes, {}) || Af;
|
|
24967
24967
|
}
|
|
24968
24968
|
function Zo(e) {
|
|
@@ -25555,7 +25555,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
25555
25555
|
},
|
|
25556
25556
|
emits: ["choose", "configure"],
|
|
25557
25557
|
setup(e, { expose: t, emit: i }) {
|
|
25558
|
-
const n = e, d = i, m = oe({}), f = oe({}), C = oe({}), F = oe({}), D = oe({}), $ = oe({}), H = oe({}), A = oe({}), R = oe({}), z = oe({}),
|
|
25558
|
+
const n = e, d = i, m = oe({}), f = oe({}), C = oe({}), F = oe({}), D = oe({}), $ = oe({}), H = oe({}), A = oe({}), R = oe({}), z = oe({}), K = gf(), se = [120, 160, 220, 320, 420], Ke = {
|
|
25559
25559
|
metricSummary: p("FAC.83491787576256174"),
|
|
25560
25560
|
singleSeries: p("FAC.cf531787576256641"),
|
|
25561
25561
|
multiSeries: p("FAC.6bd51787576257053"),
|
|
@@ -25652,11 +25652,11 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
25652
25652
|
{ key: "composite", label: p("FAC.c3d61787576264159"), icon: "composite" },
|
|
25653
25653
|
{ key: "configOnly", label: p("FAC.72621787576264942"), icon: "metric" },
|
|
25654
25654
|
{ key: "progress", label: p("FAC.b0c41787576265282"), icon: "progress" }
|
|
25655
|
-
],
|
|
25655
|
+
], qe = /* @__PURE__ */ new Set(["", "datatable", "table", "tablelist", "list"]);
|
|
25656
25656
|
function fe(a) {
|
|
25657
|
-
return a.dataShape &&
|
|
25657
|
+
return a.dataShape && Ke[a.dataShape] ? Ke[a.dataShape] : a.capabilityId.includes(".line") ? p("FAC.cf531787576256641") : a.capabilityId.includes(".bar") ? p("FAC.ffe31787576265629") : a.capabilityId.includes(".pie") ? p("FAC.15661787576257245") : a.capabilityId.includes(".table") ? p("FAC.01091787576257671") : a.capabilityId.includes(".metric") ? p("FAC.83491787576256174") : p("FAC.72341787576283211");
|
|
25658
25658
|
}
|
|
25659
|
-
function
|
|
25659
|
+
function Ie(a) {
|
|
25660
25660
|
const r = we(Do(a));
|
|
25661
25661
|
if (r) return r;
|
|
25662
25662
|
const c = we(Tt(a).title);
|
|
@@ -25665,24 +25665,24 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
25665
25665
|
return l && l !== a.capabilityId ? l : "";
|
|
25666
25666
|
}
|
|
25667
25667
|
function Se(a) {
|
|
25668
|
-
const r = Ra(a.title), c =
|
|
25668
|
+
const r = Ra(a.title), c = Ie(a);
|
|
25669
25669
|
if (c) return c;
|
|
25670
25670
|
const l = fe(a);
|
|
25671
25671
|
return a.capabilityId.startsWith("card.echarts.") && r && r !== a.capabilityId ? r : l;
|
|
25672
25672
|
}
|
|
25673
|
-
function
|
|
25673
|
+
function Be(a) {
|
|
25674
25674
|
return a.nextAction === "configure" || a.previewStatus === "requires_config" ? !1 : !!a.blockPlan && (!a.previewStatus || a.previewStatus === "ready");
|
|
25675
25675
|
}
|
|
25676
25676
|
function Ba(a, r) {
|
|
25677
|
-
return
|
|
25677
|
+
return Ge(a) === "chart" && $e(r) ? Tr(a, r) || $i(r) && Be(r) : Tr(a, r) || Be(r);
|
|
25678
25678
|
}
|
|
25679
25679
|
function Qa(a) {
|
|
25680
25680
|
return !!a.blockPlan && (!a.previewStatus || a.previewStatus === "ready");
|
|
25681
25681
|
}
|
|
25682
|
-
function
|
|
25682
|
+
function fa(a) {
|
|
25683
25683
|
return Array.isArray(a.viewAlternatives) ? a.viewAlternatives.filter((r) => !!(r != null && r.capabilityId && r.title)) : [];
|
|
25684
25684
|
}
|
|
25685
|
-
function
|
|
25685
|
+
function ba(a, r = "chart") {
|
|
25686
25686
|
return [
|
|
25687
25687
|
r,
|
|
25688
25688
|
a.recommendationId || a.capabilityId,
|
|
@@ -25697,32 +25697,32 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
25697
25697
|
return a.capabilityId.startsWith("card.echarts.") || a.capabilityId.startsWith("card.chart.") || !!js(a) || !!fn(a) || ["metricSummary", "singleSeries", "multiSeries", "pieSlices", "scatterPoints", "funnelStages"].includes(a.dataShape || "") || ["series", "network", "tree", "geo"].includes(U(a.protocolKind).toLowerCase());
|
|
25698
25698
|
}
|
|
25699
25699
|
function Da(a) {
|
|
25700
|
-
const r =
|
|
25701
|
-
return c ? c ===
|
|
25702
|
-
(l) =>
|
|
25700
|
+
const r = Ne(a), c = m.value[r];
|
|
25701
|
+
return c ? c === ba(a, "chart") || c === ba(a, "table") ? a : fa(a).find(
|
|
25702
|
+
(l) => ba(l, "chart") === c || ba(l, "table") === c
|
|
25703
25703
|
) ?? a : va(a) ?? Z(a) ?? a;
|
|
25704
25704
|
}
|
|
25705
25705
|
function Ta(a) {
|
|
25706
|
-
return ad.value.get(
|
|
25706
|
+
return ad.value.get(Ne(a)) ?? Da(a);
|
|
25707
25707
|
}
|
|
25708
25708
|
function rt(a) {
|
|
25709
|
-
const r = m.value[
|
|
25709
|
+
const r = m.value[Ne(a)];
|
|
25710
25710
|
return r != null && r.startsWith("table|") ? "table" : r != null && r.startsWith("chart|") ? "chart" : va(a) ? "table" : Aa(Da(a)) ? "chart" : "table";
|
|
25711
25711
|
}
|
|
25712
|
-
function
|
|
25713
|
-
return td.value.get(
|
|
25712
|
+
function Ge(a) {
|
|
25713
|
+
return td.value.get(Ne(a)) ?? rt(a);
|
|
25714
25714
|
}
|
|
25715
25715
|
function et(a) {
|
|
25716
25716
|
return (Re(a) ?? Ya(a)).options.length;
|
|
25717
25717
|
}
|
|
25718
|
-
function
|
|
25718
|
+
function ga(a) {
|
|
25719
25719
|
var r;
|
|
25720
25720
|
return ((r = Re(a)) == null ? void 0 : r.options.length) ?? Ya(a).options.length;
|
|
25721
25721
|
}
|
|
25722
25722
|
function Ya(a) {
|
|
25723
|
-
const r = [a, ...
|
|
25723
|
+
const r = [a, ...fa(a)], c = We(r, a), l = c.map((b, P) => ({
|
|
25724
25724
|
...re[0],
|
|
25725
|
-
key: `table:${
|
|
25725
|
+
key: `table:${ba(b, "table")}:${P}`,
|
|
25726
25726
|
label: ce(b, a),
|
|
25727
25727
|
item: b,
|
|
25728
25728
|
previewMode: "table",
|
|
@@ -25735,7 +25735,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
25735
25735
|
label: ct(b, P),
|
|
25736
25736
|
icon: ts(b),
|
|
25737
25737
|
iconPath: V,
|
|
25738
|
-
iconSrc: V ?
|
|
25738
|
+
iconSrc: V ? K.resolveSrc(V) : void 0,
|
|
25739
25739
|
item: b,
|
|
25740
25740
|
previewMode: "chart",
|
|
25741
25741
|
disabled: !1,
|
|
@@ -25752,7 +25752,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
25752
25752
|
const c = /* @__PURE__ */ new Set(), l = a.filter((b) => kt(b) > 0).filter((b) => _(b) || W(b, r)), o = l.some(
|
|
25753
25753
|
(b) => !W(b, r) && xa(b)
|
|
25754
25754
|
), h = l.filter((b) => !(o && W(b, r))).filter((b) => {
|
|
25755
|
-
const P =
|
|
25755
|
+
const P = ba(b, "table");
|
|
25756
25756
|
return c.has(P) ? !1 : (c.add(P), !0);
|
|
25757
25757
|
});
|
|
25758
25758
|
return te(
|
|
@@ -25762,7 +25762,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
25762
25762
|
);
|
|
25763
25763
|
}
|
|
25764
25764
|
function va(a) {
|
|
25765
|
-
return We([a, ...
|
|
25765
|
+
return We([a, ...fa(a)], a).find((r) => !W(r, a) && xa(r));
|
|
25766
25766
|
}
|
|
25767
25767
|
function xa(a) {
|
|
25768
25768
|
return a.capabilityId === ui;
|
|
@@ -25822,12 +25822,12 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
25822
25822
|
}
|
|
25823
25823
|
function te(a) {
|
|
25824
25824
|
if (a.length !== 2) return a;
|
|
25825
|
-
const r = a.find(
|
|
25826
|
-
(l) => !
|
|
25825
|
+
const r = a.find(q), c = a.find(
|
|
25826
|
+
(l) => !q(l) && Y(l)
|
|
25827
25827
|
);
|
|
25828
25828
|
return !r || !c || !B(c) ? a : [c];
|
|
25829
25829
|
}
|
|
25830
|
-
function
|
|
25830
|
+
function q(a) {
|
|
25831
25831
|
return a.dataShape === "metricSummary" || a.capabilityId.startsWith("card.metric.");
|
|
25832
25832
|
}
|
|
25833
25833
|
function B(a) {
|
|
@@ -25835,7 +25835,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
25835
25835
|
}
|
|
25836
25836
|
function Y(a) {
|
|
25837
25837
|
const r = ke(a).toLowerCase();
|
|
25838
|
-
return a.capabilityId.startsWith(Ub) ?
|
|
25838
|
+
return a.capabilityId.startsWith(Ub) ? qe.has(r) : !!(r && qe.has(r));
|
|
25839
25839
|
}
|
|
25840
25840
|
function le(a) {
|
|
25841
25841
|
return a.find((r) => r.capabilityId === ui) ?? a[0];
|
|
@@ -25845,29 +25845,29 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
25845
25845
|
return U(r.rendererKey) || U(c.rendererKey) || U(l.rendererKey) || U(o.rendererKey);
|
|
25846
25846
|
}
|
|
25847
25847
|
function Re(a) {
|
|
25848
|
-
return sd.value.get(
|
|
25848
|
+
return sd.value.get(Ne(a));
|
|
25849
25849
|
}
|
|
25850
25850
|
function De(a) {
|
|
25851
25851
|
var r;
|
|
25852
25852
|
return ((r = Re(a)) == null ? void 0 : r.options) ?? Ya(a).options;
|
|
25853
25853
|
}
|
|
25854
25854
|
function ea(a) {
|
|
25855
|
-
const r =
|
|
25855
|
+
const r = Ne(a), c = Fe(a), l = D.value[r] || 1;
|
|
25856
25856
|
return Math.min(Math.max(l, 1), c);
|
|
25857
25857
|
}
|
|
25858
|
-
function
|
|
25858
|
+
function Fe(a) {
|
|
25859
25859
|
return Math.max(1, Math.ceil(De(a).length / Ir));
|
|
25860
25860
|
}
|
|
25861
|
-
function
|
|
25861
|
+
function ca(a) {
|
|
25862
25862
|
const c = (ea(a) - 1) * Ir;
|
|
25863
25863
|
return De(a).slice(c, c + Ir);
|
|
25864
25864
|
}
|
|
25865
25865
|
function Ze(a) {
|
|
25866
|
-
const r =
|
|
25867
|
-
return
|
|
25866
|
+
const r = ca(a);
|
|
25867
|
+
return Fe(a) <= 1 || r.length >= Ir ? r : [
|
|
25868
25868
|
...r,
|
|
25869
25869
|
...Array.from({ length: Ir - r.length }, (c, l) => ({
|
|
25870
|
-
key: `placeholder:${
|
|
25870
|
+
key: `placeholder:${Ne(a)}:${ea(a)}:${l}`,
|
|
25871
25871
|
label: "",
|
|
25872
25872
|
icon: "bar",
|
|
25873
25873
|
disabled: !0,
|
|
@@ -25876,12 +25876,12 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
25876
25876
|
}))
|
|
25877
25877
|
];
|
|
25878
25878
|
}
|
|
25879
|
-
function
|
|
25880
|
-
const c =
|
|
25879
|
+
function ua(a, r) {
|
|
25880
|
+
const c = Ne(a), l = Math.min(Math.max(ea(a) + r, 1), Fe(a));
|
|
25881
25881
|
D.value = { ...D.value, [c]: l }, aa(a);
|
|
25882
25882
|
}
|
|
25883
25883
|
function aa(a) {
|
|
25884
|
-
const r =
|
|
25884
|
+
const r = Ne(a);
|
|
25885
25885
|
C.value = { ...C.value, [r]: !0 }, window.setTimeout(() => {
|
|
25886
25886
|
if (!C.value[r]) return;
|
|
25887
25887
|
const c = { ...C.value };
|
|
@@ -25889,7 +25889,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
25889
25889
|
}, 0);
|
|
25890
25890
|
}
|
|
25891
25891
|
function E(a) {
|
|
25892
|
-
const r = /* @__PURE__ */ new Set(), c = [a, ...
|
|
25892
|
+
const r = /* @__PURE__ */ new Set(), c = [a, ...fa(a)].filter((o) => $e(o)).filter((o) => !Yi(o)).filter((o) => Vn(a, o));
|
|
25893
25893
|
return ha(a, c).filter((o) => {
|
|
25894
25894
|
const h = nt(a, o);
|
|
25895
25895
|
return r.has(h) ? !1 : (r.add(h), !0);
|
|
@@ -25905,10 +25905,10 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
25905
25905
|
return [
|
|
25906
25906
|
we(a.title),
|
|
25907
25907
|
we(c.title)
|
|
25908
|
-
].find((l) => l && l !== a.capabilityId && !
|
|
25908
|
+
].find((l) => l && l !== a.capabilityId && !ze(l)) || re[0].label;
|
|
25909
25909
|
}
|
|
25910
25910
|
function de(a) {
|
|
25911
|
-
return [a, ...
|
|
25911
|
+
return [a, ...fa(a)].some(
|
|
25912
25912
|
(r) => $e(r) && !Yi(r)
|
|
25913
25913
|
);
|
|
25914
25914
|
}
|
|
@@ -25936,7 +25936,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
25936
25936
|
parallel: 17,
|
|
25937
25937
|
pictorialBar: 18,
|
|
25938
25938
|
themeRiver: 19
|
|
25939
|
-
},
|
|
25939
|
+
}, Oe = [
|
|
25940
25940
|
{ family: "line", pattern: /(\u6298\u7ebf\u56fe|\u7ebf\u56fe|line\s*chart|line\b)/iu },
|
|
25941
25941
|
{ family: "bar", pattern: /(\u67f1\u72b6\u56fe|\u67f1\u5f62\u56fe|\u6761\u5f62\u56fe|bar\s*chart|bar\b)/iu },
|
|
25942
25942
|
{ family: "pie", pattern: /(\u997c\u56fe|\u997c\u72b6\u56fe|pie\s*chart|pie\b)/iu },
|
|
@@ -25945,7 +25945,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
25945
25945
|
{ family: "radar", pattern: /(\u96f7\u8fbe\u56fe|radar\s*chart|radar\b)/iu },
|
|
25946
25946
|
{ family: "heatmap", pattern: /(\u70ed\u529b\u56fe|heat\s*map|heatmap\b)/iu },
|
|
25947
25947
|
{ family: "gauge", pattern: /(\u4eea\u8868\u76d8|gauge\s*chart|gauge\b)/iu }
|
|
25948
|
-
],
|
|
25948
|
+
], Ve = [
|
|
25949
25949
|
"#4C78FC",
|
|
25950
25950
|
"#35B8A6",
|
|
25951
25951
|
"#F4B84A",
|
|
@@ -25972,19 +25972,19 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
25972
25972
|
function w() {
|
|
25973
25973
|
var r;
|
|
25974
25974
|
const a = v();
|
|
25975
|
-
return a && ((r =
|
|
25975
|
+
return a && ((r = Oe.find((c) => c.pattern.test(a))) == null ? void 0 : r.family) || "";
|
|
25976
25976
|
}
|
|
25977
25977
|
function Z(a) {
|
|
25978
25978
|
const r = w();
|
|
25979
|
-
return r ? [a, ...
|
|
25979
|
+
return r ? [a, ...fa(a)].find(
|
|
25980
25980
|
(c) => Aa(c) && u(c) === r
|
|
25981
25981
|
) ?? null : null;
|
|
25982
25982
|
}
|
|
25983
|
-
function
|
|
25983
|
+
function _e(a) {
|
|
25984
25984
|
const r = u(a);
|
|
25985
25985
|
return Ee[r] ?? 100;
|
|
25986
25986
|
}
|
|
25987
|
-
function
|
|
25987
|
+
function Me(a) {
|
|
25988
25988
|
const r = Tt(a);
|
|
25989
25989
|
return [
|
|
25990
25990
|
a.capabilityId,
|
|
@@ -25993,8 +25993,8 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
25993
25993
|
r.title
|
|
25994
25994
|
].filter(Boolean).join(" ").replace(/([a-z0-9])([A-Z])/gu, "$1 $2").toLowerCase();
|
|
25995
25995
|
}
|
|
25996
|
-
function
|
|
25997
|
-
return /(^|[.\-_\s])bump(?:chart)?($|[.\-_\s])/iu.test(
|
|
25996
|
+
function ta(a) {
|
|
25997
|
+
return /(^|[.\-_\s])bump(?:chart)?($|[.\-_\s])/iu.test(Me(a));
|
|
25998
25998
|
}
|
|
25999
25999
|
function it(a) {
|
|
26000
26000
|
const r = Ka(a);
|
|
@@ -26003,10 +26003,10 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
26003
26003
|
return !!(l && o.length >= 1);
|
|
26004
26004
|
}
|
|
26005
26005
|
function Va(a) {
|
|
26006
|
-
return np(a) ?
|
|
26006
|
+
return np(a) ? ta(a) ? it(a) : !0 : !1;
|
|
26007
26007
|
}
|
|
26008
26008
|
function Fa(a) {
|
|
26009
|
-
const r =
|
|
26009
|
+
const r = Me(a);
|
|
26010
26010
|
let c = 0;
|
|
26011
26011
|
return /(^|[._\-\s])(first|primary|default|basic|base|simple|main|recommended|common)($|[._\-\s])/u.test(r) && (c += 12), /[\u57fa\u7840\u9ed8\u8ba4\u9996\u9009\u4f18\u5148\u5e38\u7528\u5339\u914d]/u.test(r) && (c += 12), /(^|[._\-\s])(second|duplicate|another|copy|variant|alternative|alt)($|[._\-\s])/u.test(r) && (c -= 12), /(\u53e6|\u7b2c\u4e8c|\u5907\u9009|\u91cd\u590d)/u.test(r) && (c -= 12), c;
|
|
26012
26012
|
}
|
|
@@ -26024,7 +26024,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
26024
26024
|
index: P,
|
|
26025
26025
|
type: u(b),
|
|
26026
26026
|
fitScore: ja(a, b),
|
|
26027
|
-
commonRank:
|
|
26027
|
+
commonRank: _e(b)
|
|
26028
26028
|
})).sort(Ia), l = /* @__PURE__ */ new Map(), o = [];
|
|
26029
26029
|
for (const b of c) {
|
|
26030
26030
|
const P = l.get(b.type) || [];
|
|
@@ -26063,25 +26063,25 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
26063
26063
|
}
|
|
26064
26064
|
function jt(a) {
|
|
26065
26065
|
var r;
|
|
26066
|
-
return
|
|
26066
|
+
return K.resolvePath((r = js(a)) == null ? void 0 : r.iconPath);
|
|
26067
26067
|
}
|
|
26068
26068
|
function zt(a) {
|
|
26069
|
-
a.iconPath &&
|
|
26069
|
+
a.iconPath && K.markFailed(a.iconPath);
|
|
26070
26070
|
}
|
|
26071
26071
|
function At(a) {
|
|
26072
|
-
a.iconPath &&
|
|
26072
|
+
a.iconPath && K.markLoaded(a.iconPath);
|
|
26073
26073
|
}
|
|
26074
26074
|
function ss(a) {
|
|
26075
|
-
return !!(a.iconPath &&
|
|
26075
|
+
return !!(a.iconPath && K.shouldShow(a.iconPath));
|
|
26076
26076
|
}
|
|
26077
26077
|
function Rt(a) {
|
|
26078
|
-
return !!(a.iconPath &&
|
|
26078
|
+
return !!(a.iconPath && K.isLoaded(a.iconPath));
|
|
26079
26079
|
}
|
|
26080
26080
|
function Za(a) {
|
|
26081
26081
|
return !Rt(a);
|
|
26082
26082
|
}
|
|
26083
26083
|
function dt(a) {
|
|
26084
|
-
return !!(a.iconPath &&
|
|
26084
|
+
return !!(a.iconPath && K.shouldShow(a.iconPath) && !K.isLoaded(a.iconPath));
|
|
26085
26085
|
}
|
|
26086
26086
|
function pe(a) {
|
|
26087
26087
|
const r = gn(a.capabilityId);
|
|
@@ -26100,18 +26100,18 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
26100
26100
|
we(a.title),
|
|
26101
26101
|
we(r.title)
|
|
26102
26102
|
].find(
|
|
26103
|
-
(h) => h && h !== a.capabilityId && !ve.test(h) && !
|
|
26103
|
+
(h) => h && h !== a.capabilityId && !ve.test(h) && !ze(h)
|
|
26104
26104
|
) || "";
|
|
26105
26105
|
}
|
|
26106
26106
|
function we(a) {
|
|
26107
26107
|
const r = Ra(a);
|
|
26108
26108
|
return /^(?:FAC|FRA|FWA|FWC|FWW)\.[A-Za-z0-9]+$/u.test(r) ? p(r) : r;
|
|
26109
26109
|
}
|
|
26110
|
-
function
|
|
26110
|
+
function ze(a) {
|
|
26111
26111
|
return /^doc-example\//iu.test(a) || /^example\//iu.test(a);
|
|
26112
26112
|
}
|
|
26113
26113
|
function He(a) {
|
|
26114
|
-
return
|
|
26114
|
+
return ze(U(a.title)) || ze(U(Tt(a).title));
|
|
26115
26115
|
}
|
|
26116
26116
|
function $e(a) {
|
|
26117
26117
|
return (a.capabilityId.startsWith("card.echarts.") || a.capabilityId.startsWith("card.chart.")) && !He(a) && !!xe(a);
|
|
@@ -26129,18 +26129,18 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
26129
26129
|
}
|
|
26130
26130
|
function at(a) {
|
|
26131
26131
|
const r = Re(a) ?? Ya(a);
|
|
26132
|
-
return r.options.length <= 1 ? !1 :
|
|
26132
|
+
return r.options.length <= 1 ? !1 : fa(a).length > 0 ? !0 : r.chartCount > 1;
|
|
26133
26133
|
}
|
|
26134
26134
|
function ft(a) {
|
|
26135
|
-
return
|
|
26135
|
+
return fa(a).length > 0 && ga(a) > 1;
|
|
26136
26136
|
}
|
|
26137
26137
|
function Yt(a, r) {
|
|
26138
26138
|
if (r.disabled || !r.item) return;
|
|
26139
|
-
const c =
|
|
26140
|
-
m.value = { ...m.value, [c]:
|
|
26139
|
+
const c = Ne(a);
|
|
26140
|
+
m.value = { ...m.value, [c]: ba(r.item, r.previewMode) }, f.value = { ...f.value, [c]: !1 }, F.value = { ...F.value, [c]: 1 };
|
|
26141
26141
|
}
|
|
26142
26142
|
function St(a) {
|
|
26143
|
-
const r = z.value[
|
|
26143
|
+
const r = z.value[Ne(a)];
|
|
26144
26144
|
return Number.isInteger(r) ? Math.min(Math.max(r, 0), se.length - 1) : Te(a);
|
|
26145
26145
|
}
|
|
26146
26146
|
function Te(a) {
|
|
@@ -26158,13 +26158,13 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
26158
26158
|
return c >= 0 && c < se.length;
|
|
26159
26159
|
}
|
|
26160
26160
|
function ge(a, r) {
|
|
26161
|
-
const c =
|
|
26161
|
+
const c = Ne(a), l = Math.min(Math.max(St(a) + r, 0), se.length - 1);
|
|
26162
26162
|
z.value = { ...z.value, [c]: l };
|
|
26163
26163
|
}
|
|
26164
|
-
function
|
|
26164
|
+
function na(a) {
|
|
26165
26165
|
z.value = {
|
|
26166
26166
|
...z.value,
|
|
26167
|
-
[
|
|
26167
|
+
[Ne(a)]: Te(a)
|
|
26168
26168
|
};
|
|
26169
26169
|
}
|
|
26170
26170
|
function be(a) {
|
|
@@ -26179,11 +26179,11 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
26179
26179
|
const o = l * Vb, h = Ln(a) ? Hb : 0;
|
|
26180
26180
|
return Ae(Math.max(o, h));
|
|
26181
26181
|
}
|
|
26182
|
-
function
|
|
26182
|
+
function la(a, r) {
|
|
26183
26183
|
const c = r.item;
|
|
26184
26184
|
if (!c) return !1;
|
|
26185
|
-
const l = m.value[
|
|
26186
|
-
return l ? l === o :
|
|
26185
|
+
const l = m.value[Ne(a)], o = ba(c, r.previewMode);
|
|
26186
|
+
return l ? l === o : Ge(a) === r.previewMode && ba(Ta(a), r.previewMode) === o;
|
|
26187
26187
|
}
|
|
26188
26188
|
function Sa(a) {
|
|
26189
26189
|
const r = bt(a);
|
|
@@ -26193,19 +26193,19 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
26193
26193
|
return l.insertReadyChart ? p("FAC.61591787576228328") : c.nextAction === "configure" || c.previewStatus === "requires_config" ? Gr(c) : l.canChoose ? p("FAC.61591787576228328") : Gr(c);
|
|
26194
26194
|
}
|
|
26195
26195
|
function bt(a) {
|
|
26196
|
-
return R.value[
|
|
26196
|
+
return R.value[ba(Ta(a), Ge(a))] || "";
|
|
26197
26197
|
}
|
|
26198
26198
|
function Ea(a) {
|
|
26199
|
-
const r =
|
|
26199
|
+
const r = Ne(a);
|
|
26200
26200
|
f.value = { ...f.value, [r]: !f.value[r] };
|
|
26201
26201
|
}
|
|
26202
26202
|
function rs(a) {
|
|
26203
|
-
return !!f.value[
|
|
26203
|
+
return !!f.value[Ne(a)];
|
|
26204
26204
|
}
|
|
26205
26205
|
function Cs(a, r) {
|
|
26206
26206
|
const c = r.currentTarget instanceof HTMLElement ? r.currentTarget : null, l = r.relatedTarget instanceof Node ? r.relatedTarget : null;
|
|
26207
26207
|
if (c && l && c.contains(l)) return;
|
|
26208
|
-
const o =
|
|
26208
|
+
const o = Ne(a), h = typeof document < "u" ? document.activeElement : null, b = c || (r.target instanceof HTMLElement ? r.target.closest(".card-recommendation__preview-card") : null);
|
|
26209
26209
|
if (!(!l && b && h && b.contains(h))) {
|
|
26210
26210
|
if (!l && C.value[o]) {
|
|
26211
26211
|
const P = { ...C.value };
|
|
@@ -26355,7 +26355,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
26355
26355
|
const l = r.trim();
|
|
26356
26356
|
return c === l ? "" : c;
|
|
26357
26357
|
}
|
|
26358
|
-
function
|
|
26358
|
+
function Ne(a) {
|
|
26359
26359
|
var l, o;
|
|
26360
26360
|
if (a.recommendationId) return a.recommendationId;
|
|
26361
26361
|
const r = Ts((l = a.visualIntent) == null ? void 0 : l.dimensionFields) || "none", c = Ts((o = a.visualIntent) == null ? void 0 : o.measureFields) || "none";
|
|
@@ -26402,7 +26402,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
26402
26402
|
}
|
|
26403
26403
|
function Ce(a) {
|
|
26404
26404
|
if (!g(a)) return "";
|
|
26405
|
-
const r =
|
|
26405
|
+
const r = Ie(a) || Ra(a.title);
|
|
26406
26406
|
return r ? [
|
|
26407
26407
|
r,
|
|
26408
26408
|
Ys(a),
|
|
@@ -26422,7 +26422,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
26422
26422
|
Ye(Ka(a))
|
|
26423
26423
|
].join("|");
|
|
26424
26424
|
}
|
|
26425
|
-
function
|
|
26425
|
+
function pa(a) {
|
|
26426
26426
|
return kt(a) <= 0 ? [] : [
|
|
26427
26427
|
k(a),
|
|
26428
26428
|
J(a),
|
|
@@ -26435,10 +26435,10 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
26435
26435
|
const r = /* @__PURE__ */ new Set();
|
|
26436
26436
|
for (const c of a)
|
|
26437
26437
|
if (de(c)) {
|
|
26438
|
-
for (const l of
|
|
26438
|
+
for (const l of pa(c))
|
|
26439
26439
|
r.add(l);
|
|
26440
|
-
for (const l of We([c, ...
|
|
26441
|
-
for (const o of
|
|
26440
|
+
for (const l of We([c, ...fa(c)], c))
|
|
26441
|
+
for (const o of pa(l))
|
|
26442
26442
|
r.add(o);
|
|
26443
26443
|
}
|
|
26444
26444
|
return r;
|
|
@@ -26452,7 +26452,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
26452
26452
|
l.push(o);
|
|
26453
26453
|
continue;
|
|
26454
26454
|
}
|
|
26455
|
-
const b =
|
|
26455
|
+
const b = pa(o).filter((P) => r.has(P));
|
|
26456
26456
|
if (b.length > 0) {
|
|
26457
26457
|
b.forEach((P) => c.add(P));
|
|
26458
26458
|
continue;
|
|
@@ -26473,7 +26473,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
26473
26473
|
return Vt(a) || $e(a);
|
|
26474
26474
|
}
|
|
26475
26475
|
function Vt(a) {
|
|
26476
|
-
return g(a) && !
|
|
26476
|
+
return g(a) && !q(a);
|
|
26477
26477
|
}
|
|
26478
26478
|
function or(a) {
|
|
26479
26479
|
const r = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set();
|
|
@@ -26492,7 +26492,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
26492
26492
|
const V = l.get(P) ?? [];
|
|
26493
26493
|
V.push(
|
|
26494
26494
|
y(h),
|
|
26495
|
-
...
|
|
26495
|
+
...fa(h).map(y)
|
|
26496
26496
|
), l.set(P, V), o.add(h);
|
|
26497
26497
|
}
|
|
26498
26498
|
return a.flatMap((h) => {
|
|
@@ -26515,12 +26515,12 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
26515
26515
|
o && c.set(o, r.length), r.push(l);
|
|
26516
26516
|
continue;
|
|
26517
26517
|
}
|
|
26518
|
-
const b = r[h], P =
|
|
26518
|
+
const b = r[h], P = q(b) && Y(l) && B(l);
|
|
26519
26519
|
r[h] = P ? {
|
|
26520
26520
|
...l,
|
|
26521
26521
|
viewAlternatives: [
|
|
26522
26522
|
y(b),
|
|
26523
|
-
...
|
|
26523
|
+
...fa(b).map(y),
|
|
26524
26524
|
...Array.isArray(l.viewAlternatives) ? l.viewAlternatives : []
|
|
26525
26525
|
]
|
|
26526
26526
|
} : {
|
|
@@ -26547,7 +26547,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
26547
26547
|
viewAlternatives: [
|
|
26548
26548
|
...Array.isArray(b.viewAlternatives) ? b.viewAlternatives : [],
|
|
26549
26549
|
y(l),
|
|
26550
|
-
...
|
|
26550
|
+
...fa(l).map(y)
|
|
26551
26551
|
]
|
|
26552
26552
|
};
|
|
26553
26553
|
}
|
|
@@ -26555,7 +26555,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
26555
26555
|
}
|
|
26556
26556
|
function Vr(a) {
|
|
26557
26557
|
if (!Y(a)) return a;
|
|
26558
|
-
const r =
|
|
26558
|
+
const r = fa(a), c = r.find(
|
|
26559
26559
|
(l) => l.capabilityId === ui && Y(l)
|
|
26560
26560
|
);
|
|
26561
26561
|
return c ? {
|
|
@@ -26577,46 +26577,46 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
26577
26577
|
}), ad = ne(() => {
|
|
26578
26578
|
const a = /* @__PURE__ */ new Map();
|
|
26579
26579
|
for (const r of tt.value)
|
|
26580
|
-
a.set(
|
|
26580
|
+
a.set(Ne(r), Da(r));
|
|
26581
26581
|
return a;
|
|
26582
26582
|
}), td = ne(() => {
|
|
26583
26583
|
const a = /* @__PURE__ */ new Map();
|
|
26584
26584
|
for (const r of tt.value)
|
|
26585
|
-
a.set(
|
|
26585
|
+
a.set(Ne(r), rt(r));
|
|
26586
26586
|
return a;
|
|
26587
26587
|
}), sd = ne(() => {
|
|
26588
26588
|
const a = /* @__PURE__ */ new Map();
|
|
26589
26589
|
for (const r of tt.value)
|
|
26590
|
-
a.set(
|
|
26590
|
+
a.set(Ne(r), Ya(r));
|
|
26591
26591
|
return a;
|
|
26592
26592
|
}), zc = ne(() => {
|
|
26593
26593
|
const a = /* @__PURE__ */ new Map();
|
|
26594
26594
|
for (const r of tt.value) {
|
|
26595
|
-
const c =
|
|
26596
|
-
a.set(c,
|
|
26595
|
+
const c = Ne(r);
|
|
26596
|
+
a.set(c, Ge(r) === "chart" ? Rn(r) : null);
|
|
26597
26597
|
}
|
|
26598
26598
|
return a;
|
|
26599
26599
|
}), rd = ne(() => {
|
|
26600
26600
|
const a = /* @__PURE__ */ new Map();
|
|
26601
26601
|
for (const r of tt.value) {
|
|
26602
|
-
const c = zc.value.get(
|
|
26603
|
-
c && a.set(
|
|
26602
|
+
const c = zc.value.get(Ne(r));
|
|
26603
|
+
c && a.set(Ne(r), Mn(c));
|
|
26604
26604
|
}
|
|
26605
26605
|
return a;
|
|
26606
26606
|
}), id = ne(() => {
|
|
26607
26607
|
const a = /* @__PURE__ */ new Map();
|
|
26608
26608
|
for (const r of tt.value)
|
|
26609
|
-
a.set(
|
|
26609
|
+
a.set(Ne(r), $n(r, Da(r)));
|
|
26610
26610
|
return a;
|
|
26611
26611
|
}), cd = ne(() => {
|
|
26612
26612
|
const a = /* @__PURE__ */ new Map();
|
|
26613
26613
|
for (const r of tt.value)
|
|
26614
|
-
a.set(
|
|
26614
|
+
a.set(Ne(r), Qn(r));
|
|
26615
26615
|
return a;
|
|
26616
26616
|
}), nd = ne(() => {
|
|
26617
26617
|
const a = /* @__PURE__ */ new Map();
|
|
26618
26618
|
for (const r of tt.value)
|
|
26619
|
-
a.set(
|
|
26619
|
+
a.set(Ne(r), rn(Da(r)));
|
|
26620
26620
|
return a;
|
|
26621
26621
|
}), Kc = ne(() => tt.value.length);
|
|
26622
26622
|
function ld(a) {
|
|
@@ -27050,7 +27050,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
27050
27050
|
}
|
|
27051
27051
|
}
|
|
27052
27052
|
function ns(a) {
|
|
27053
|
-
return F.value[
|
|
27053
|
+
return F.value[Ne(a)] || 1;
|
|
27054
27054
|
}
|
|
27055
27055
|
function Di(a) {
|
|
27056
27056
|
return Math.max(1, Math.ceil(Ka(a).length / nc));
|
|
@@ -27071,7 +27071,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
27071
27071
|
}
|
|
27072
27072
|
function ji(a) {
|
|
27073
27073
|
const r = Ta(a);
|
|
27074
|
-
return nd.value.get(
|
|
27074
|
+
return nd.value.get(Ne(a)) ?? rn(r);
|
|
27075
27075
|
}
|
|
27076
27076
|
function cn(a) {
|
|
27077
27077
|
return ji(a).columns;
|
|
@@ -27096,29 +27096,29 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
27096
27096
|
}
|
|
27097
27097
|
function Ri(a, r) {
|
|
27098
27098
|
const c = Ta(a), l = Math.min(Math.max(1, r), Di(c));
|
|
27099
|
-
F.value = { ...F.value, [
|
|
27099
|
+
F.value = { ...F.value, [Ne(a)]: l };
|
|
27100
27100
|
}
|
|
27101
27101
|
function ln(a) {
|
|
27102
|
-
const r = Ta(a), c = A.value[
|
|
27103
|
-
return c ||
|
|
27102
|
+
const r = Ta(a), c = A.value[Ne(a)];
|
|
27103
|
+
return c || Ie(a) || Ie(r) || Se(r);
|
|
27104
27104
|
}
|
|
27105
27105
|
function zd(a) {
|
|
27106
|
-
const r =
|
|
27106
|
+
const r = Ne(a);
|
|
27107
27107
|
return $.value[r] ? U(H.value[r]) : U(A.value[r]);
|
|
27108
27108
|
}
|
|
27109
27109
|
function Kd(a) {
|
|
27110
|
-
return !!$.value[
|
|
27110
|
+
return !!$.value[Ne(a)];
|
|
27111
27111
|
}
|
|
27112
27112
|
function qd(a) {
|
|
27113
|
-
const r =
|
|
27113
|
+
const r = Ne(a);
|
|
27114
27114
|
H.value = { ...H.value, [r]: ln(a) }, $.value = { ...$.value, [r]: !0 };
|
|
27115
27115
|
}
|
|
27116
27116
|
function Od(a, r) {
|
|
27117
27117
|
const c = r.target instanceof HTMLInputElement ? r.target : null;
|
|
27118
|
-
c && (H.value = { ...H.value, [
|
|
27118
|
+
c && (H.value = { ...H.value, [Ne(a)]: c.value });
|
|
27119
27119
|
}
|
|
27120
27120
|
function on(a) {
|
|
27121
|
-
const r =
|
|
27121
|
+
const r = Ne(a), c = U(H.value[r]);
|
|
27122
27122
|
A.value = c ? { ...A.value, [r]: c } : Object.fromEntries(Object.entries(A.value).filter(([l]) => l !== r)), $.value = { ...$.value, [r]: !1 };
|
|
27123
27123
|
}
|
|
27124
27124
|
function $a(a) {
|
|
@@ -28323,7 +28323,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
28323
28323
|
});
|
|
28324
28324
|
}
|
|
28325
28325
|
function gr(a) {
|
|
28326
|
-
return zc.value.get(
|
|
28326
|
+
return zc.value.get(Ne(a)) ?? null;
|
|
28327
28327
|
}
|
|
28328
28328
|
function Mn(a) {
|
|
28329
28329
|
const r = { ...a };
|
|
@@ -28336,7 +28336,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
28336
28336
|
}
|
|
28337
28337
|
function Nn(a) {
|
|
28338
28338
|
const r = gr(a);
|
|
28339
|
-
return r ? rd.value.get(
|
|
28339
|
+
return r ? rd.value.get(Ne(a)) ?? Mn(r) : {};
|
|
28340
28340
|
}
|
|
28341
28341
|
function _t(a) {
|
|
28342
28342
|
return Array.isArray(a.series) ? a.series.filter(ue) : ue(a.series) ? [a.series] : [];
|
|
@@ -28426,7 +28426,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
28426
28426
|
function em(a, r) {
|
|
28427
28427
|
const c = _t(a);
|
|
28428
28428
|
if (!c.some((Q) => ue(Q) && U(Q.type) === "pie")) return a;
|
|
28429
|
-
const o = Array.from(new Set(c.flatMap((Q) => U(Q.type) === "pie" ? Hi(Q) : []))), h = c.some((Q) => U(Q.type) === "pie" && Ui(Hi(Q))), b = Gn(a).length > 0 ? Gn(a) :
|
|
28429
|
+
const o = Array.from(new Set(c.flatMap((Q) => U(Q.type) === "pie" ? Hi(Q) : []))), h = c.some((Q) => U(Q.type) === "pie" && Ui(Hi(Q))), b = Gn(a).length > 0 ? Gn(a) : Ve, P = (Q) => !ue(Q) || U(Q.type) !== "pie" || !Array.isArray(Q.data) ? Q : {
|
|
28430
28430
|
...Xp(Q, r),
|
|
28431
28431
|
data: Q.data.map((Pe, Xe) => {
|
|
28432
28432
|
if (!ue(Pe)) return Pe;
|
|
@@ -28566,7 +28566,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
28566
28566
|
return Tr(a, r) ? he.ready : Ds(r);
|
|
28567
28567
|
}
|
|
28568
28568
|
function $n(a, r) {
|
|
28569
|
-
const c = Tr(a, r), l =
|
|
28569
|
+
const c = Tr(a, r), l = Ge(a) === "chart" && $e(r) ? c || $i(r) && Be(r) : c || Be(r), o = c ? "" : Ii(r);
|
|
28570
28570
|
return {
|
|
28571
28571
|
canChoose: l,
|
|
28572
28572
|
insertReadyChart: c,
|
|
@@ -28579,13 +28579,13 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
28579
28579
|
}
|
|
28580
28580
|
function Hn(a) {
|
|
28581
28581
|
const r = Ta(a);
|
|
28582
|
-
return id.value.get(
|
|
28582
|
+
return id.value.get(Ne(a)) ?? $n(a, r);
|
|
28583
28583
|
}
|
|
28584
28584
|
function Gs(a) {
|
|
28585
28585
|
return ls(a);
|
|
28586
28586
|
}
|
|
28587
28587
|
function lm(a) {
|
|
28588
|
-
return
|
|
28588
|
+
return Ge(a) === "chart" && !!gr(a);
|
|
28589
28589
|
}
|
|
28590
28590
|
function Un(a) {
|
|
28591
28591
|
const r = ue(n.draft.queryResult) && ($r(n.draft.queryResult) || Hr(n.draft.queryResult)) ? n.draft.queryResult : null, c = ue(a.queryResult) ? Jc(a.queryResult, r) : a.queryResult, l = ue(c) ? Xc(c, r) : c, o = ue(l) ? l : r, h = Tt(a), b = G(h.data), P = G(h.meta), V = G(P.queryResult), Q = G(b.dataBinding), ae = G(a.dataBinding), Pe = G(o == null ? void 0 : o.dataBinding), Xe = Object.keys(Q).length > 0 ? Q : Object.keys(ae).length > 0 ? ae : Pe, _a = ue(a.blockPlan) && Object.keys(Xe).length > 0 ? {
|
|
@@ -28627,7 +28627,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
28627
28627
|
});
|
|
28628
28628
|
}
|
|
28629
28629
|
function dm(a) {
|
|
28630
|
-
return cd.value.get(
|
|
28630
|
+
return cd.value.get(Ne(a)) ?? Qn(a);
|
|
28631
28631
|
}
|
|
28632
28632
|
t({
|
|
28633
28633
|
recommendationConfigSummary: dm
|
|
@@ -28645,7 +28645,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
28645
28645
|
rendererType: _a,
|
|
28646
28646
|
optionPatch: lt,
|
|
28647
28647
|
...Ut
|
|
28648
|
-
} = P, As = G(h.meta), Jt = Ps(l), Ha = G(Jt.dataBinding), Pa = G(l.dataBinding), Ja = G(P.dataBinding), Ua = Object.keys(Ja).length > 0 ? Ja : Object.keys(Pa).length > 0 ? Pa : Ha, zs = U(h.id) || `preview-${l.capabilityId.replace(/[^a-z0-9]+/giu, "-")}`, Ss =
|
|
28648
|
+
} = P, As = G(h.meta), Jt = Ps(l), Ha = G(Jt.dataBinding), Pa = G(l.dataBinding), Ja = G(P.dataBinding), Ua = Object.keys(Ja).length > 0 ? Ja : Object.keys(Pa).length > 0 ? Pa : Ha, zs = U(h.id) || `preview-${l.capabilityId.replace(/[^a-z0-9]+/giu, "-")}`, Ss = Ie(a) || Se(a) || Se(l);
|
|
28649
28649
|
return {
|
|
28650
28650
|
...l,
|
|
28651
28651
|
previewStatus: "ready",
|
|
@@ -28695,7 +28695,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
28695
28695
|
function ym(a) {
|
|
28696
28696
|
const r = Ta(a);
|
|
28697
28697
|
if (!Ba(a, r)) return;
|
|
28698
|
-
const c =
|
|
28698
|
+
const c = ba(r, Ge(a));
|
|
28699
28699
|
R.value = { ...R.value, [c]: "inserting" };
|
|
28700
28700
|
const l = gr(a), o = pm(
|
|
28701
28701
|
a,
|
|
@@ -28723,9 +28723,9 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
28723
28723
|
x("p", Jf, N(n.draft.message), 1),
|
|
28724
28724
|
Oc.value ? (S(), I("p", Xf, N(Oc.value), 1)) : ie("", !0),
|
|
28725
28725
|
Kc.value > 0 ? (S(), I("div", eb, [
|
|
28726
|
-
(S(!0), I(
|
|
28727
|
-
key:
|
|
28728
|
-
class:
|
|
28726
|
+
(S(!0), I(ra, null, Ca(tt.value, (l) => (S(), I("article", {
|
|
28727
|
+
key: Ne(l),
|
|
28728
|
+
class: ia(["card-recommendation__item card-recommendation__preview-card", {
|
|
28729
28729
|
"card-recommendation__preview-card--inserting": bt(l) === "inserting",
|
|
28730
28730
|
"card-recommendation__preview-card--inserted": bt(l) === "success",
|
|
28731
28731
|
"card-recommendation__preview-card--switch-open": rs(l)
|
|
@@ -28737,7 +28737,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
28737
28737
|
Kd(l) ? (S(), I("input", {
|
|
28738
28738
|
key: 0,
|
|
28739
28739
|
class: "card-recommendation__title-input",
|
|
28740
|
-
value: H.value[
|
|
28740
|
+
value: H.value[Ne(l)],
|
|
28741
28741
|
"data-i18n-aria-label": "FAC.8ad41787576195786",
|
|
28742
28742
|
"aria-label": M(p)("FAC.8ad41787576195786"),
|
|
28743
28743
|
onInput: (o) => Od(l, o),
|
|
@@ -28751,7 +28751,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
28751
28751
|
"aria-label": M(p)("FAC.8ad41787576195786"),
|
|
28752
28752
|
onClick: (o) => qd(l)
|
|
28753
28753
|
}, [
|
|
28754
|
-
|
|
28754
|
+
ma(M(oo), {
|
|
28755
28755
|
class: "card-recommendation__edit-icon",
|
|
28756
28756
|
"aria-hidden": "true"
|
|
28757
28757
|
})
|
|
@@ -28779,7 +28779,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
28779
28779
|
], 8, lb)) : ie("", !0),
|
|
28780
28780
|
x("button", {
|
|
28781
28781
|
type: "button",
|
|
28782
|
-
class:
|
|
28782
|
+
class: ia(["card-recommendation__choose card-recommendation__insert", { "card-recommendation__insert--loading": bt(l) === "inserting" }]),
|
|
28783
28783
|
disabled: !mm(l) || !!bt(l),
|
|
28784
28784
|
onClick: (o) => ym(l)
|
|
28785
28785
|
}, [
|
|
@@ -28794,11 +28794,11 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
28794
28794
|
x("div", yb, N(M(p)("FAC.08a71787576167600", { p0: et(l) })), 1)
|
|
28795
28795
|
]),
|
|
28796
28796
|
x("div", fb, [
|
|
28797
|
-
(S(!0), I(
|
|
28797
|
+
(S(!0), I(ra, null, Ca(Ze(l), (o) => (S(), I("button", {
|
|
28798
28798
|
key: o.key,
|
|
28799
28799
|
type: "button",
|
|
28800
|
-
class:
|
|
28801
|
-
"card-recommendation__view-option--active":
|
|
28800
|
+
class: ia(["card-recommendation__view-option", {
|
|
28801
|
+
"card-recommendation__view-option--active": la(l, o),
|
|
28802
28802
|
"card-recommendation__view-option--disabled": o.disabled,
|
|
28803
28803
|
"card-recommendation__view-option--icon-loading": dt(o),
|
|
28804
28804
|
"card-recommendation__view-option--placeholder": o.placeholder
|
|
@@ -28810,7 +28810,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
28810
28810
|
}, [
|
|
28811
28811
|
ss(o) ? (S(), I("img", {
|
|
28812
28812
|
key: 0,
|
|
28813
|
-
class:
|
|
28813
|
+
class: ia(["card-recommendation__view-option-image", {
|
|
28814
28814
|
"card-recommendation__view-option-image--loading": !Rt(o),
|
|
28815
28815
|
"card-recommendation__view-option-image--loaded": Rt(o)
|
|
28816
28816
|
}]),
|
|
@@ -28823,7 +28823,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
28823
28823
|
}, null, 42, gb)) : ie("", !0),
|
|
28824
28824
|
Za(o) ? (S(), I("span", {
|
|
28825
28825
|
key: 1,
|
|
28826
|
-
class:
|
|
28826
|
+
class: ia(["card-recommendation__view-option-icon", `card-recommendation__view-option-icon--${o.icon}`]),
|
|
28827
28827
|
"aria-hidden": "true"
|
|
28828
28828
|
}, null, 2)) : ie("", !0),
|
|
28829
28829
|
dt(o) ? (S(), I("span", Cb)) : ie("", !0),
|
|
@@ -28831,7 +28831,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
28831
28831
|
o.item ? (S(), I("span", vb, N(o.statusLabel || cm(l, o.item)), 1)) : ie("", !0)
|
|
28832
28832
|
], 10, bb))), 128))
|
|
28833
28833
|
]),
|
|
28834
|
-
|
|
28834
|
+
Fe(l) > 1 ? (S(), I("div", {
|
|
28835
28835
|
key: 0,
|
|
28836
28836
|
class: "card-recommendation__switch-pagination",
|
|
28837
28837
|
onPointerdownCapture: (o) => aa(l),
|
|
@@ -28843,17 +28843,17 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
28843
28843
|
disabled: ea(l) <= 1,
|
|
28844
28844
|
onPointerdown: (o) => aa(l),
|
|
28845
28845
|
onMousedown: (o) => aa(l),
|
|
28846
|
-
onClick: (o) =>
|
|
28846
|
+
onClick: (o) => ua(l, -1),
|
|
28847
28847
|
"data-i18n": "FAC.53d81787576267984"
|
|
28848
28848
|
}, N(M(p)("FAC.53d81787576267984")), 41, Pb),
|
|
28849
|
-
x("span", null, N(ea(l)) + " / " + N(
|
|
28849
|
+
x("span", null, N(ea(l)) + " / " + N(Fe(l)), 1),
|
|
28850
28850
|
x("button", {
|
|
28851
28851
|
type: "button",
|
|
28852
28852
|
class: "card-recommendation__switch-page",
|
|
28853
|
-
disabled: ea(l) >=
|
|
28853
|
+
disabled: ea(l) >= Fe(l),
|
|
28854
28854
|
onPointerdown: (o) => aa(l),
|
|
28855
28855
|
onMousedown: (o) => aa(l),
|
|
28856
|
-
onClick: (o) =>
|
|
28856
|
+
onClick: (o) => ua(l, 1),
|
|
28857
28857
|
"data-i18n": "FAC.f4111787576268448"
|
|
28858
28858
|
}, N(M(p)("FAC.f4111787576268448")), 41, Ab)
|
|
28859
28859
|
], 40, xb)) : ie("", !0)
|
|
@@ -28888,7 +28888,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
28888
28888
|
"aria-label": M(p)("FAC.3ceb1787576184174"),
|
|
28889
28889
|
"data-i18n-title": "FAC.3ceb1787576184174",
|
|
28890
28890
|
title: M(p)("FAC.3ceb1787576184174"),
|
|
28891
|
-
onClick: (o) =>
|
|
28891
|
+
onClick: (o) => na(l)
|
|
28892
28892
|
}, " 1x ", 8, Fb),
|
|
28893
28893
|
x("button", {
|
|
28894
28894
|
type: "button",
|
|
@@ -28902,7 +28902,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
28902
28902
|
onClick: (o) => ge(l, 1)
|
|
28903
28903
|
}, " + ", 8, Ib)
|
|
28904
28904
|
], 8, kb),
|
|
28905
|
-
|
|
28905
|
+
ma(Ko, {
|
|
28906
28906
|
class: "card-recommendation__echarts-preview",
|
|
28907
28907
|
option: Nn(l),
|
|
28908
28908
|
height: T(l)
|
|
@@ -28912,14 +28912,14 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
28912
28912
|
x("table", null, [
|
|
28913
28913
|
x("thead", null, [
|
|
28914
28914
|
x("tr", null, [
|
|
28915
|
-
(S(!0), I(
|
|
28915
|
+
(S(!0), I(ra, null, Ca(cn(l), (o) => (S(), I("th", {
|
|
28916
28916
|
key: o.key
|
|
28917
28917
|
}, N(o.label), 1))), 128))
|
|
28918
28918
|
])
|
|
28919
28919
|
]),
|
|
28920
28920
|
x("tbody", null, [
|
|
28921
|
-
(S(!0), I(
|
|
28922
|
-
(S(!0), I(
|
|
28921
|
+
(S(!0), I(ra, null, Ca(Gd(l), (o, h) => (S(), I("tr", { key: h }, [
|
|
28922
|
+
(S(!0), I(ra, null, Ca(cn(l), (b) => (S(), I("td", {
|
|
28923
28923
|
key: b.key
|
|
28924
28924
|
}, N(pt(o[b.key])), 1))), 128))
|
|
28925
28925
|
]))), 128))
|
|
@@ -28935,10 +28935,10 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
28935
28935
|
disabled: ns(l) <= 1,
|
|
28936
28936
|
onClick: (o) => Ri(l, ns(l) - 1)
|
|
28937
28937
|
}, " ‹ ", 8, Rb),
|
|
28938
|
-
(S(!0), I(
|
|
28938
|
+
(S(!0), I(ra, null, Ca(Bd(l), (o) => (S(), I("button", {
|
|
28939
28939
|
key: o,
|
|
28940
28940
|
type: "button",
|
|
28941
|
-
class:
|
|
28941
|
+
class: ia(["card-recommendation__page-button", { "card-recommendation__page-current": ns(l) === o }]),
|
|
28942
28942
|
onClick: (h) => Ri(l, o)
|
|
28943
28943
|
}, N(o), 11, Mb))), 128)),
|
|
28944
28944
|
x("button", {
|
|
@@ -28952,7 +28952,7 @@ const Hf = { class: "card-recommendation" }, Uf = { class: "card-recommendation_
|
|
|
28952
28952
|
], 42, ab))), 128))
|
|
28953
28953
|
])) : (S(), I("div", Lb, [
|
|
28954
28954
|
(c = n.draft.fallbackActions) != null && c.length ? (S(), I("div", Bb, [
|
|
28955
|
-
(S(!0), I(
|
|
28955
|
+
(S(!0), I(ra, null, Ca(n.draft.fallbackActions, (l) => (S(), I("button", {
|
|
28956
28956
|
key: l.action,
|
|
28957
28957
|
type: "button",
|
|
28958
28958
|
class: "card-recommendation__fallback-action",
|
|
@@ -29085,13 +29085,13 @@ const mg = {
|
|
|
29085
29085
|
setup(e) {
|
|
29086
29086
|
const t = e, i = lo({ expanded: !1 }), n = oe(Date.now()), d = oe(null), m = oe(null), f = oe(null), C = oe(null), F = oe(!1), D = oe(!1), $ = oe({}), H = oe({}), A = oe({});
|
|
29087
29087
|
let R = null;
|
|
29088
|
-
const z = ne(() => Mh(t.messages)),
|
|
29088
|
+
const z = ne(() => Mh(t.messages)), K = ne(() => t.turnActive), se = ne(() => {
|
|
29089
29089
|
var u;
|
|
29090
29090
|
return ((u = t.messages[0]) == null ? void 0 : u.id) || "";
|
|
29091
|
-
}),
|
|
29091
|
+
}), Ke = ne(
|
|
29092
29092
|
() => se.value ? `collapsed-activity-panel-${Se(se.value)}` : ""
|
|
29093
29093
|
), he = ne(
|
|
29094
|
-
() => i.expanded &&
|
|
29094
|
+
() => i.expanded && Ke.value ? Ke.value : void 0
|
|
29095
29095
|
), ve = ne(() => z.value.length > 0 || t.turnActive), ye = ne(() => et(z.value)), Qe = ne(
|
|
29096
29096
|
() => ye.value.map((u) => {
|
|
29097
29097
|
if (!u.commentary) return u;
|
|
@@ -29108,40 +29108,51 @@ const mg = {
|
|
|
29108
29108
|
() => z.value[z.value.length - 1]
|
|
29109
29109
|
), re = ne(() => {
|
|
29110
29110
|
var u, v;
|
|
29111
|
-
return
|
|
29112
|
-
}),
|
|
29113
|
-
|
|
29114
|
-
|
|
29115
|
-
|
|
29116
|
-
|
|
29111
|
+
return K.value ? (v = (u = me.value) == null ? void 0 : u.processInvocations) != null && v.length ? p("FAC.b24a1787576268971") : p("FAC.c7221787576268990") : "";
|
|
29112
|
+
}), qe = ne(() => {
|
|
29113
|
+
var _e;
|
|
29114
|
+
const u = (_e = t.messages.find(
|
|
29115
|
+
(Me) => {
|
|
29116
|
+
var ta;
|
|
29117
|
+
return Number.isFinite((ta = Me.processingTiming) == null ? void 0 : ta.startedAt);
|
|
29118
|
+
}
|
|
29119
|
+
)) == null ? void 0 : _e.processingTiming;
|
|
29120
|
+
if (u) {
|
|
29121
|
+
const Me = Number.isFinite(u.endedAt) ? u.endedAt : K.value ? n.value : m.value;
|
|
29122
|
+
if (Me !== null) return fa(Me - u.startedAt);
|
|
29123
|
+
}
|
|
29124
|
+
const v = ba();
|
|
29125
|
+
if (v.length === 0) return "0s";
|
|
29126
|
+
const w = rt(v), Z = Ge(v);
|
|
29127
|
+
return w !== null && Z !== null ? fa(Z - w) : "0s";
|
|
29117
29128
|
}), fe = ne(
|
|
29118
29129
|
() => {
|
|
29119
|
-
const u =
|
|
29120
|
-
return
|
|
29130
|
+
const u = K.value ? p("FAC.b24a1787576268971") : p("FAC.01471787576269002");
|
|
29131
|
+
return qe.value ? `${u} ${qe.value}` : u;
|
|
29121
29132
|
}
|
|
29122
29133
|
);
|
|
29123
|
-
function
|
|
29134
|
+
function Ie() {
|
|
29124
29135
|
t.messages.length > 0 && d.value === null && (d.value = Date.now());
|
|
29125
29136
|
}
|
|
29126
29137
|
function Se(u) {
|
|
29127
29138
|
return u.replace(/[^a-zA-Z0-9_-]/g, "-");
|
|
29128
29139
|
}
|
|
29129
|
-
function
|
|
29130
|
-
F.value = !1, D.value = !1, $.value = {}, H.value = {}, A.value = {}, d.value = null, m.value = null, f.value = null, C.value = null, n.value = Date.now(),
|
|
29140
|
+
function Be() {
|
|
29141
|
+
F.value = !1, D.value = !1, $.value = {}, H.value = {}, A.value = {}, d.value = null, m.value = null, f.value = null, C.value = null, n.value = Date.now(), K.value ? (D.value = !0, i.expanded = !0, m.value = null, Ie()) : i.expanded = !1, Ba(ye.value);
|
|
29131
29142
|
}
|
|
29132
29143
|
function Ba(u) {
|
|
29133
29144
|
const v = { ...A.value };
|
|
29134
29145
|
let w = !1;
|
|
29135
29146
|
for (const Z of u) {
|
|
29136
|
-
const
|
|
29137
|
-
!(
|
|
29147
|
+
const _e = Z.commentary;
|
|
29148
|
+
!(_e != null && _e.text) || v[_e.id] || (v[_e.id] = _e.text, w = !0);
|
|
29138
29149
|
}
|
|
29139
29150
|
w && (A.value = v);
|
|
29140
29151
|
}
|
|
29141
29152
|
Wa(
|
|
29142
29153
|
() => t.messages,
|
|
29143
29154
|
() => {
|
|
29144
|
-
if (
|
|
29155
|
+
if (Ie(), Ta(t.messages), n.value = Date.now(), K.value) {
|
|
29145
29156
|
m.value = null;
|
|
29146
29157
|
return;
|
|
29147
29158
|
}
|
|
@@ -29150,8 +29161,8 @@ const mg = {
|
|
|
29150
29161
|
{ deep: !0, immediate: !0 }
|
|
29151
29162
|
), Wa(se, (u, v) => {
|
|
29152
29163
|
if (u === v) return;
|
|
29153
|
-
const w =
|
|
29154
|
-
|
|
29164
|
+
const w = K.value && (d.value !== null || f.value !== null), Z = d.value, _e = f.value, Me = C.value;
|
|
29165
|
+
Be(), w && (d.value = Z ?? d.value, f.value = _e ?? f.value, C.value = Me ?? C.value);
|
|
29155
29166
|
}), Wa(
|
|
29156
29167
|
ye,
|
|
29157
29168
|
(u) => {
|
|
@@ -29159,9 +29170,9 @@ const mg = {
|
|
|
29159
29170
|
},
|
|
29160
29171
|
{ immediate: !0 }
|
|
29161
29172
|
), Wa(
|
|
29162
|
-
|
|
29173
|
+
K,
|
|
29163
29174
|
(u) => {
|
|
29164
|
-
if (u ? (D.value = !0, F.value || (i.expanded = !0)) : F.value || (i.expanded = !1),
|
|
29175
|
+
if (u ? (D.value = !0, F.value || (i.expanded = !0)) : F.value || (i.expanded = !1), Ie(), Ta(t.messages), u) {
|
|
29165
29176
|
n.value = Date.now(), m.value = null, R || (R = setInterval(() => {
|
|
29166
29177
|
n.value = Date.now();
|
|
29167
29178
|
}, 1e3));
|
|
@@ -29173,7 +29184,7 @@ const mg = {
|
|
|
29173
29184
|
), Wa(
|
|
29174
29185
|
() => t.messages.map((u) => u.id).join("|"),
|
|
29175
29186
|
() => {
|
|
29176
|
-
|
|
29187
|
+
K.value || F.value || (i.expanded = D.value ? !1 : i.expanded);
|
|
29177
29188
|
}
|
|
29178
29189
|
), Es(() => {
|
|
29179
29190
|
R && (clearInterval(R), R = null);
|
|
@@ -29181,11 +29192,11 @@ const mg = {
|
|
|
29181
29192
|
function Qa() {
|
|
29182
29193
|
F.value = !0, i.expanded = !i.expanded;
|
|
29183
29194
|
}
|
|
29184
|
-
function
|
|
29195
|
+
function fa(u) {
|
|
29185
29196
|
const v = Math.max(0, Math.floor(u / 1e3)), w = Math.floor(v / 60), Z = v % 60;
|
|
29186
29197
|
return w > 0 ? `${w}m ${Z}s` : `${Z}s`;
|
|
29187
29198
|
}
|
|
29188
|
-
function
|
|
29199
|
+
function ba() {
|
|
29189
29200
|
return z.value.length > 0 ? z.value : t.messages;
|
|
29190
29201
|
}
|
|
29191
29202
|
function Aa(u) {
|
|
@@ -29209,25 +29220,25 @@ const mg = {
|
|
|
29209
29220
|
var v;
|
|
29210
29221
|
return f.value ?? ((v = Da(u)) == null ? void 0 : v.value) ?? null;
|
|
29211
29222
|
}
|
|
29212
|
-
function
|
|
29213
|
-
if (
|
|
29223
|
+
function Ge(u) {
|
|
29224
|
+
if (K.value) return n.value;
|
|
29214
29225
|
const v = u.map((w) => w.endTime).filter((w) => typeof w == "number" && Number.isFinite(w));
|
|
29215
29226
|
return v.length === 0 ? m.value : D.value && m.value !== null ? Math.max(...v, m.value) : Math.max(...v);
|
|
29216
29227
|
}
|
|
29217
29228
|
function et(u) {
|
|
29218
|
-
var
|
|
29229
|
+
var Me;
|
|
29219
29230
|
const v = [];
|
|
29220
29231
|
let w = [], Z = null;
|
|
29221
|
-
function
|
|
29232
|
+
function _e() {
|
|
29222
29233
|
Z && (v.push(Z), Z = null);
|
|
29223
29234
|
}
|
|
29224
|
-
for (const
|
|
29225
|
-
const it =
|
|
29226
|
-
it && (
|
|
29227
|
-
id:
|
|
29235
|
+
for (const ta of u) {
|
|
29236
|
+
const it = ga(ta);
|
|
29237
|
+
it && (_e(), w.push({
|
|
29238
|
+
id: ta.id,
|
|
29228
29239
|
text: it
|
|
29229
29240
|
}));
|
|
29230
|
-
const Va = xa(
|
|
29241
|
+
const Va = xa(ta);
|
|
29231
29242
|
if (Va.length === 0) continue;
|
|
29232
29243
|
const Fa = w.filter(
|
|
29233
29244
|
(Ia) => !We(Ia.text, Va)
|
|
@@ -29236,24 +29247,24 @@ const mg = {
|
|
|
29236
29247
|
Z.items.push(...Va), w = [];
|
|
29237
29248
|
continue;
|
|
29238
29249
|
}
|
|
29239
|
-
|
|
29250
|
+
_e();
|
|
29240
29251
|
const ja = va(Fa);
|
|
29241
29252
|
Z = {
|
|
29242
|
-
id: (ja == null ? void 0 : ja.id) ?? ((
|
|
29253
|
+
id: (ja == null ? void 0 : ja.id) ?? ((Me = Va[0]) == null ? void 0 : Me.id) ?? ta.id,
|
|
29243
29254
|
...ja ? { commentary: ja } : {},
|
|
29244
29255
|
items: [...Va]
|
|
29245
29256
|
}, w = [];
|
|
29246
29257
|
}
|
|
29247
|
-
|
|
29248
|
-
for (const
|
|
29258
|
+
_e();
|
|
29259
|
+
for (const ta of w)
|
|
29249
29260
|
v.push({
|
|
29250
|
-
id:
|
|
29251
|
-
commentary:
|
|
29261
|
+
id: ta.id,
|
|
29262
|
+
commentary: ta,
|
|
29252
29263
|
items: []
|
|
29253
29264
|
});
|
|
29254
29265
|
return v;
|
|
29255
29266
|
}
|
|
29256
|
-
function
|
|
29267
|
+
function ga(u) {
|
|
29257
29268
|
var w;
|
|
29258
29269
|
const v = u.content.trim();
|
|
29259
29270
|
return !v || pg(v) && !Ya(u, v) ? "" : u.processPreamble === !0 ? v : u.processPreamble === !1 || (w = u.processInvocations) != null && w.length ? "" : v;
|
|
@@ -29265,8 +29276,8 @@ const mg = {
|
|
|
29265
29276
|
function We(u, v) {
|
|
29266
29277
|
const w = u.trim();
|
|
29267
29278
|
return !w || v.length === 0 ? !1 : v.some((Z) => {
|
|
29268
|
-
const
|
|
29269
|
-
return w ===
|
|
29279
|
+
const _e = Z.actionLabel.trim(), Me = _e.replace(/^正在执行\s+/u, "").replace(/^执行失败\s+/u, "").trim();
|
|
29280
|
+
return w === _e || w === Me;
|
|
29270
29281
|
});
|
|
29271
29282
|
}
|
|
29272
29283
|
function va(u) {
|
|
@@ -29285,9 +29296,9 @@ const mg = {
|
|
|
29285
29296
|
);
|
|
29286
29297
|
}
|
|
29287
29298
|
function L(u, v) {
|
|
29288
|
-
const w = j(v), Z = w === "readFile" ?
|
|
29299
|
+
const w = j(v), Z = w === "readFile" ? Oe(v) : void 0, _e = v.title || v.name || (v.kind === "skill" ? "Skill" : p("FAC.22ee1787576236078")), Me = t.turnActive ? v.status : te(v.status);
|
|
29289
29300
|
return {
|
|
29290
|
-
actionLabel: k({ ...v, status:
|
|
29301
|
+
actionLabel: k({ ...v, status: Me }, w, _e, Z),
|
|
29291
29302
|
displayKind: w,
|
|
29292
29303
|
error: v.error,
|
|
29293
29304
|
id: v.id,
|
|
@@ -29295,9 +29306,9 @@ const mg = {
|
|
|
29295
29306
|
kind: v.kind,
|
|
29296
29307
|
parentMessageId: u.id,
|
|
29297
29308
|
resultSummary: v.resultSummary,
|
|
29298
|
-
status:
|
|
29309
|
+
status: Me,
|
|
29299
29310
|
titleLabel: v.title.trim() || v.name.trim() || (v.kind === "skill" ? "Skill" : p("FAC.22ee1787576236078")),
|
|
29300
|
-
viewStatus: X(
|
|
29311
|
+
viewStatus: X(Me)
|
|
29301
29312
|
};
|
|
29302
29313
|
}
|
|
29303
29314
|
function j(u) {
|
|
@@ -29316,7 +29327,7 @@ const mg = {
|
|
|
29316
29327
|
function te(u) {
|
|
29317
29328
|
return u === "running" ? "done" : u;
|
|
29318
29329
|
}
|
|
29319
|
-
function
|
|
29330
|
+
function q(u) {
|
|
29320
29331
|
const v = u.items.filter((Z) => Z.viewStatus === "failed");
|
|
29321
29332
|
if (v.length > 0) return p("FAC.e0ba1787576137509", { p0: v.length, p1: B(v) });
|
|
29322
29333
|
const w = u.items.filter((Z) => Z.viewStatus === "running");
|
|
@@ -29349,45 +29360,45 @@ const mg = {
|
|
|
29349
29360
|
function ea(u) {
|
|
29350
29361
|
return le(u) ? void 0 : De(u);
|
|
29351
29362
|
}
|
|
29352
|
-
function
|
|
29363
|
+
function Fe(u) {
|
|
29353
29364
|
return u.viewStatus === "failed" ? p("FAC.e0851787576286413") : u.viewStatus === "running" ? p("FAC.5e731787576269015") : p("FAC.eba41787576269028");
|
|
29354
29365
|
}
|
|
29355
|
-
function
|
|
29366
|
+
function ca(u) {
|
|
29356
29367
|
return `${u.parentMessageId}:${u.id}`;
|
|
29357
29368
|
}
|
|
29358
29369
|
function Ze(u) {
|
|
29359
29370
|
return !!(u != null && u.trim());
|
|
29360
29371
|
}
|
|
29361
|
-
function
|
|
29372
|
+
function ua(u) {
|
|
29362
29373
|
return u.viewStatus === "failed" && Ze(u.error) ? u.error : void 0;
|
|
29363
29374
|
}
|
|
29364
29375
|
function aa(u) {
|
|
29365
|
-
return
|
|
29376
|
+
return ua(u) ? void 0 : Ze(u.resultSummary) ? u.resultSummary : void 0;
|
|
29366
29377
|
}
|
|
29367
29378
|
function E(u) {
|
|
29368
|
-
return Ze(u.inputSummary) || !!
|
|
29379
|
+
return Ze(u.inputSummary) || !!ua(u) || !!aa(u);
|
|
29369
29380
|
}
|
|
29370
29381
|
function W(u) {
|
|
29371
|
-
return H.value[
|
|
29382
|
+
return H.value[ca(u)] ?? !0;
|
|
29372
29383
|
}
|
|
29373
29384
|
function ce(u) {
|
|
29374
|
-
const v =
|
|
29385
|
+
const v = ca(u);
|
|
29375
29386
|
H.value = {
|
|
29376
29387
|
...H.value,
|
|
29377
29388
|
[v]: !W(u)
|
|
29378
29389
|
};
|
|
29379
29390
|
}
|
|
29380
29391
|
function de(u) {
|
|
29381
|
-
return `collapsed-activity-tool-${Se(
|
|
29392
|
+
return `collapsed-activity-tool-${Se(ca(u))}`;
|
|
29382
29393
|
}
|
|
29383
29394
|
function Ee(u) {
|
|
29384
29395
|
return W(u) ? void 0 : de(u);
|
|
29385
29396
|
}
|
|
29386
|
-
function qe(u) {
|
|
29387
|
-
const v = Oe(u.inputSummary);
|
|
29388
|
-
return v || Oe(u.resultSummary);
|
|
29389
|
-
}
|
|
29390
29397
|
function Oe(u) {
|
|
29398
|
+
const v = Ve(u.inputSummary);
|
|
29399
|
+
return v || Ve(u.resultSummary);
|
|
29400
|
+
}
|
|
29401
|
+
function Ve(u) {
|
|
29391
29402
|
if (!u) return;
|
|
29392
29403
|
const v = u.match(/(?:path|file|filePath|file_path)\s*[:=]\s*["']?([^"',\n}]+)/iu), w = ((v == null ? void 0 : v[1]) || "").trim();
|
|
29393
29404
|
if (!w) return;
|
|
@@ -29404,7 +29415,7 @@ const mg = {
|
|
|
29404
29415
|
}, [
|
|
29405
29416
|
x("span", hg, N(fe.value), 1),
|
|
29406
29417
|
x("span", {
|
|
29407
|
-
class:
|
|
29418
|
+
class: ia(["collapsed-activity__arrow", { "is-open": i.expanded }]),
|
|
29408
29419
|
"aria-hidden": "true"
|
|
29409
29420
|
}, [...v[0] || (v[0] = [
|
|
29410
29421
|
x("img", {
|
|
@@ -29415,10 +29426,10 @@ const mg = {
|
|
|
29415
29426
|
], 8, ug),
|
|
29416
29427
|
i.expanded ? (S(), I("div", {
|
|
29417
29428
|
key: 0,
|
|
29418
|
-
id:
|
|
29429
|
+
id: Ke.value,
|
|
29419
29430
|
class: "collapsed-activity__items codex-turn-process__body"
|
|
29420
29431
|
}, [
|
|
29421
|
-
(S(!0), I(
|
|
29432
|
+
(S(!0), I(ra, null, Ca(Qe.value, (w) => (S(), I("div", {
|
|
29422
29433
|
key: w.id,
|
|
29423
29434
|
class: "collapsed-activity__task"
|
|
29424
29435
|
}, [
|
|
@@ -29436,9 +29447,9 @@ const mg = {
|
|
|
29436
29447
|
"aria-controls": ea(w),
|
|
29437
29448
|
onClick: (Z) => Re(w)
|
|
29438
29449
|
}, [
|
|
29439
|
-
x("span", Tg, N(
|
|
29450
|
+
x("span", Tg, N(q(w)), 1),
|
|
29440
29451
|
x("span", {
|
|
29441
|
-
class:
|
|
29452
|
+
class: ia(["collapsed-activity__invocation-group-arrow", { "is-open": !le(w) }]),
|
|
29442
29453
|
"aria-hidden": "true"
|
|
29443
29454
|
}, [...v[1] || (v[1] = [
|
|
29444
29455
|
x("img", {
|
|
@@ -29452,9 +29463,9 @@ const mg = {
|
|
|
29452
29463
|
id: De(w),
|
|
29453
29464
|
class: "collapsed-activity__invocations codex-turn-process__tools"
|
|
29454
29465
|
}, [
|
|
29455
|
-
(S(!0), I(
|
|
29466
|
+
(S(!0), I(ra, null, Ca(w.items, (Z) => (S(), I("article", {
|
|
29456
29467
|
key: Z.id,
|
|
29457
|
-
class:
|
|
29468
|
+
class: ia(["codex-process-item collapsed-activity__invocation", [`codex-process-item--${Z.viewStatus}`, `is-${Z.status}`]])
|
|
29458
29469
|
}, [
|
|
29459
29470
|
E(Z) ? (S(), I("button", {
|
|
29460
29471
|
key: 0,
|
|
@@ -29463,16 +29474,16 @@ const mg = {
|
|
|
29463
29474
|
"data-testid": "tool-action-row",
|
|
29464
29475
|
"aria-expanded": !W(Z),
|
|
29465
29476
|
"aria-controls": Ee(Z),
|
|
29466
|
-
onClick: (
|
|
29477
|
+
onClick: (_e) => ce(Z)
|
|
29467
29478
|
}, [
|
|
29468
29479
|
x("span", {
|
|
29469
|
-
class:
|
|
29480
|
+
class: ia(["collapsed-activity__invocation-main codex-process-item__action-text", { "is-open": !W(Z) }])
|
|
29470
29481
|
}, [
|
|
29471
29482
|
x("span", Pg, N(Z.titleLabel), 1),
|
|
29472
29483
|
x("span", {
|
|
29473
|
-
class:
|
|
29484
|
+
class: ia(["codex-process-item__status-hint", `is-${Z.viewStatus}`]),
|
|
29474
29485
|
style: { "margin-left": "8px" }
|
|
29475
|
-
}, N(
|
|
29486
|
+
}, N(Fe(Z)), 3),
|
|
29476
29487
|
v[2] || (v[2] = x("img", {
|
|
29477
29488
|
class: "tool-arrow-toggle",
|
|
29478
29489
|
src: dc,
|
|
@@ -29480,7 +29491,7 @@ const mg = {
|
|
|
29480
29491
|
}, null, -1))
|
|
29481
29492
|
], 2),
|
|
29482
29493
|
x("span", {
|
|
29483
|
-
class:
|
|
29494
|
+
class: ia(["collapsed-activity__invocation-arrow", { "is-open": !W(Z) }]),
|
|
29484
29495
|
"aria-hidden": "true"
|
|
29485
29496
|
}, null, 2)
|
|
29486
29497
|
], 8, xg)) : (S(), I("div", Ag, [
|
|
@@ -29488,8 +29499,8 @@ const mg = {
|
|
|
29488
29499
|
x("span", kg, N(Z.titleLabel), 1)
|
|
29489
29500
|
]),
|
|
29490
29501
|
x("span", {
|
|
29491
|
-
class:
|
|
29492
|
-
}, N(
|
|
29502
|
+
class: ia(["codex-process-item__status-hint", `is-${Z.viewStatus}`])
|
|
29503
|
+
}, N(Fe(Z)), 3)
|
|
29493
29504
|
])),
|
|
29494
29505
|
E(Z) && !W(Z) ? (S(), I("div", {
|
|
29495
29506
|
key: 2,
|
|
@@ -29500,9 +29511,9 @@ const mg = {
|
|
|
29500
29511
|
x("h4", Ig, N(M(p)("FAC.64c41787576286438")), 1),
|
|
29501
29512
|
x("pre", null, N(Z.inputSummary), 1)
|
|
29502
29513
|
])) : ie("", !0),
|
|
29503
|
-
|
|
29514
|
+
ua(Z) ? (S(), I("section", Eg, [
|
|
29504
29515
|
x("h4", wg, N(M(p)("FAC.91931787576286466")), 1),
|
|
29505
|
-
x("pre", Wg, N(
|
|
29516
|
+
x("pre", Wg, N(ua(Z)), 1)
|
|
29506
29517
|
])) : aa(Z) ? (S(), I("section", Dg, [
|
|
29507
29518
|
x("h4", jg, N(M(p)("FAC.1fd11787576286494")), 1),
|
|
29508
29519
|
x("pre", null, N(aa(Z)), 1)
|
|
@@ -29511,7 +29522,7 @@ const mg = {
|
|
|
29511
29522
|
], 2))), 128))
|
|
29512
29523
|
], 8, vg)) : ie("", !0)
|
|
29513
29524
|
]))), 128)),
|
|
29514
|
-
(S(!0), I(
|
|
29525
|
+
(S(!0), I(ra, null, Ca(z.value.filter((w) => w.error), (w) => (S(), I("div", {
|
|
29515
29526
|
key: `error-${w.id}`,
|
|
29516
29527
|
class: "collapsed-activity__error"
|
|
29517
29528
|
}, [
|
|
@@ -29521,7 +29532,7 @@ const mg = {
|
|
|
29521
29532
|
], 8, yg)) : ie("", !0)
|
|
29522
29533
|
])) : ie("", !0);
|
|
29523
29534
|
}
|
|
29524
|
-
}), Lg = /* @__PURE__ */ Dt(Ng, [["__scopeId", "data-v-
|
|
29535
|
+
}), Lg = /* @__PURE__ */ Dt(Ng, [["__scopeId", "data-v-86829b1e"]]), Bg = { class: "plan-draft" }, Gg = {
|
|
29525
29536
|
class: "plan-draft__header",
|
|
29526
29537
|
"data-i18n": "FAC.7a321787576190465"
|
|
29527
29538
|
}, zg = { class: "plan-draft__blocks" }, Kg = { class: "plan-draft__block-title" }, qg = { class: "plan-draft__block-meta" }, Og = ["title"], Vg = {
|
|
@@ -29578,7 +29589,7 @@ const mg = {
|
|
|
29578
29589
|
return (A, R) => (S(), I("div", Bg, [
|
|
29579
29590
|
x("div", Gg, N(M(p)("FAC.7a321787576190465")), 1),
|
|
29580
29591
|
x("div", zg, [
|
|
29581
|
-
(S(!0), I(
|
|
29592
|
+
(S(!0), I(ra, null, Ca(e.draft.blocks, (z) => (S(), I("div", {
|
|
29582
29593
|
key: z.blockId,
|
|
29583
29594
|
class: "plan-draft__block"
|
|
29584
29595
|
}, [
|
|
@@ -29623,7 +29634,7 @@ const mg = {
|
|
|
29623
29634
|
class: "plan-draft__btn plan-draft__btn--primary",
|
|
29624
29635
|
onClick: C
|
|
29625
29636
|
}, [
|
|
29626
|
-
|
|
29637
|
+
ma(M(Tm)),
|
|
29627
29638
|
x("span", Yg, N(M(p)("FAC.493b1787576220873")), 1)
|
|
29628
29639
|
]),
|
|
29629
29640
|
x("button", {
|
|
@@ -29631,7 +29642,7 @@ const mg = {
|
|
|
29631
29642
|
class: "plan-draft__btn",
|
|
29632
29643
|
onClick: D
|
|
29633
29644
|
}, [
|
|
29634
|
-
|
|
29645
|
+
ma(M(oo)),
|
|
29635
29646
|
x("span", Zg, N(M(p)("FAC.af581787576300149")), 1)
|
|
29636
29647
|
]),
|
|
29637
29648
|
x("button", {
|
|
@@ -29639,7 +29650,7 @@ const mg = {
|
|
|
29639
29650
|
class: "plan-draft__btn plan-draft__btn--danger",
|
|
29640
29651
|
onClick: F
|
|
29641
29652
|
}, [
|
|
29642
|
-
|
|
29653
|
+
ma(M(Ci)),
|
|
29643
29654
|
x("span", Jg, N(M(p)("FAC.34b91787576290331")), 1)
|
|
29644
29655
|
])
|
|
29645
29656
|
]))
|
|
@@ -29735,11 +29746,11 @@ const mg = {
|
|
|
29735
29746
|
}
|
|
29736
29747
|
], $ = /\.(png|jpe?g|gif|webp|bmp|svg)(?:[?#].*)?$/iu;
|
|
29737
29748
|
function H(E, W) {
|
|
29738
|
-
var Ee,
|
|
29749
|
+
var Ee, Oe;
|
|
29739
29750
|
if (E.type !== "image" || !W || /^(?:blob|data):/iu.test(W) || $.test(W)) return W;
|
|
29740
29751
|
const ce = (Ee = E.name.match($)) == null ? void 0 : Ee[0];
|
|
29741
29752
|
if (ce) return `${W}#preview${ce.slice(ce.lastIndexOf("."))}`;
|
|
29742
|
-
const de = (
|
|
29753
|
+
const de = (Oe = E.mimeType.match(/^image\/(png|jpe?g|gif|webp|bmp|svg)(?:\+xml)?$/iu)) == null ? void 0 : Oe[1];
|
|
29743
29754
|
return de ? `${W}#preview.${de}` : W;
|
|
29744
29755
|
}
|
|
29745
29756
|
const A = ne(() => n.message.attachments || []), R = ne(() => A.value.some((E) => !!(E.url || E.downloadUrl)) ? C : []), z = ne(() => A.value.map((E, W) => {
|
|
@@ -29751,10 +29762,10 @@ const mg = {
|
|
|
29751
29762
|
status: "success"
|
|
29752
29763
|
};
|
|
29753
29764
|
return E.rawFile ? { ...Ee, rawFile: E.rawFile } : { ...Ee, size: E.size || 1 };
|
|
29754
|
-
})),
|
|
29765
|
+
})), K = ne(() => n.message.role === "assistant" ? "card" : A.value.every((E) => E.type === "image") ? "picture" : "card"), se = ne(() => {
|
|
29755
29766
|
var E;
|
|
29756
29767
|
return (((E = n.message.cards) == null ? void 0 : E.length) || 0) > 1;
|
|
29757
|
-
}),
|
|
29768
|
+
}), Ke = ne(() => Au(n.message)), he = ne(() => (n.message.cards || []).map((E) => X(E))), ve = ne(() => n.message.queryResultTable), ye = ne(() => {
|
|
29758
29769
|
const E = Array.isArray(n.message.queryResultTables) ? n.message.queryResultTables : [];
|
|
29759
29770
|
return (E.length > 0 ? E : ve.value ? [ve.value] : []).filter((ce) => !ce.renderedInMarkdown);
|
|
29760
29771
|
}), Qe = ne(() => !!(n.message.role === "assistant" && !n.message.loading && !n.message.cardRecommendationDraft && ye.value.some((E) => E.columns.length > 0 && E.rows.length > 0)));
|
|
@@ -29765,20 +29776,20 @@ const mg = {
|
|
|
29765
29776
|
const re = ne(() => {
|
|
29766
29777
|
var E;
|
|
29767
29778
|
return ((E = n.message.taskStateDraft) == null ? void 0 : E.fields.filter((W) => !!W.displayValue)) || [];
|
|
29768
|
-
}),
|
|
29779
|
+
}), qe = ne(() => {
|
|
29769
29780
|
var E, W;
|
|
29770
29781
|
return ((W = (E = n.message.taskStateDraft) == null ? void 0 : E.confirmationOptions) == null ? void 0 : W.filter((ce) => Number.isFinite(ce.index))) || [];
|
|
29771
29782
|
}), fe = ne(() => {
|
|
29772
29783
|
var W, ce;
|
|
29773
29784
|
const E = (ce = (W = n.message.taskStateDraft) == null ? void 0 : W.title) == null ? void 0 : ce.trim();
|
|
29774
29785
|
return E && !/^确认/u.test(E) ? E : p("FAC.8c9e1787576268832");
|
|
29775
|
-
}),
|
|
29786
|
+
}), Ie = ne(() => n.message.role === "assistant" && !n.message.loading ? et(n.message.content) : []), Se = ne(() => {
|
|
29776
29787
|
const E = n.message.taskStateDraft;
|
|
29777
|
-
return !!(E != null && E.canConfirm &&
|
|
29778
|
-
}),
|
|
29788
|
+
return !!(E != null && E.canConfirm && qe.value.length > 0);
|
|
29789
|
+
}), Be = ne(() => Se.value ? void 0 : n.message.taskStateDraft), Ba = ne(() => {
|
|
29779
29790
|
const E = n.message.taskStateDraft;
|
|
29780
|
-
return !!(E != null && E.canConfirm && E.confirmPhrase &&
|
|
29781
|
-
}), Qa = ne(() => Se.value),
|
|
29791
|
+
return !!(E != null && E.canConfirm && E.confirmPhrase && qe.value.length === 0);
|
|
29792
|
+
}), Qa = ne(() => Se.value), fa = ne(() => n.message.thinkingProcessMessages || []), ba = ne(() => {
|
|
29782
29793
|
const E = n.message.taskStateDraft;
|
|
29783
29794
|
return !!(E != null && E.canConfirm && E.cancelPhrase);
|
|
29784
29795
|
}), Aa = ne(() => n.message.memoryCaptureDraft ? f.value[n.message.id] || n.message.memoryCaptureDraft.status : void 0), Da = ne(() => n.message.memoryCaptureDraft ? Aa.value === "candidate_created" ? p("FAC.71161787576211037") : Aa.value === "saving" ? p("FAC.f0fb1787576268846") : n.message.memoryCaptureDraft.confirmLabel : "");
|
|
@@ -29796,39 +29807,39 @@ const mg = {
|
|
|
29796
29807
|
const E = n.message.memoryCaptureDraft;
|
|
29797
29808
|
E && (f.value = { ...f.value, [n.message.id]: "dismissed" }, d("memoryCaptureDismiss", E.turnId, E.itemId));
|
|
29798
29809
|
}
|
|
29799
|
-
function
|
|
29810
|
+
function Ge() {
|
|
29800
29811
|
const E = n.message.memoryCaptureDraft;
|
|
29801
29812
|
E && (f.value = { ...f.value, [n.message.id]: "saving" }, d("memoryCaptureSave", E.turnId, E.itemId));
|
|
29802
29813
|
}
|
|
29803
29814
|
function et(E) {
|
|
29804
|
-
const W = [], ce = (
|
|
29805
|
-
const
|
|
29806
|
-
!
|
|
29815
|
+
const W = [], ce = (Oe) => {
|
|
29816
|
+
const Ve = Oe.trim().replace(/[。;;,,]\s*$/u, "");
|
|
29817
|
+
!Ve || Ve.length > 80 || W.includes(Ve) || W.push(Ve);
|
|
29807
29818
|
};
|
|
29808
29819
|
let de = 0;
|
|
29809
29820
|
for (; W.length < 3; ) {
|
|
29810
|
-
const
|
|
29811
|
-
if (qe < 0) break;
|
|
29812
|
-
const Oe = E.slice(qe + 3).search(/[「“"]/u);
|
|
29821
|
+
const Oe = E.indexOf(p("FAC.94cb1787576268962"), de);
|
|
29813
29822
|
if (Oe < 0) break;
|
|
29814
|
-
const
|
|
29823
|
+
const Ve = E.slice(Oe + 3).search(/[「“"]/u);
|
|
29824
|
+
if (Ve < 0) break;
|
|
29825
|
+
const u = Oe + 3 + Ve, v = E[u], w = v === "「" ? "」" : v === "“" ? "”" : v, Z = E.indexOf(w, u + 1);
|
|
29815
29826
|
if (Z < 0) break;
|
|
29816
29827
|
ce(E.slice(u + 1, Z)), de = Z + 1;
|
|
29817
29828
|
}
|
|
29818
29829
|
const Ee = E.match(/(?:你可以继续这样问|可以继续问|还可以继续问|后续可以):?\s*\n([\s\S]*)/u);
|
|
29819
29830
|
if (Ee && W.length < 3)
|
|
29820
|
-
for (const
|
|
29831
|
+
for (const Oe of Ee[1].split(`
|
|
29821
29832
|
`)) {
|
|
29822
|
-
const
|
|
29823
|
-
if (!
|
|
29833
|
+
const Ve = Oe.match(/^\s*[-*]\s+(.+?)\s*$/u);
|
|
29834
|
+
if (!Ve) {
|
|
29824
29835
|
if (W.length > 0) break;
|
|
29825
29836
|
continue;
|
|
29826
29837
|
}
|
|
29827
|
-
if (ce(
|
|
29838
|
+
if (ce(Ve[1]), W.length >= 3) break;
|
|
29828
29839
|
}
|
|
29829
29840
|
return W;
|
|
29830
29841
|
}
|
|
29831
|
-
function
|
|
29842
|
+
function ga(E) {
|
|
29832
29843
|
!E.trim() || n.taskStateActionsDisabled || d("sendFollowUp", E);
|
|
29833
29844
|
}
|
|
29834
29845
|
function Ya() {
|
|
@@ -29871,10 +29882,10 @@ const mg = {
|
|
|
29871
29882
|
return "";
|
|
29872
29883
|
}
|
|
29873
29884
|
function X(E) {
|
|
29874
|
-
var Ee,
|
|
29875
|
-
const W = (
|
|
29885
|
+
var Ee, Oe, Ve, u;
|
|
29886
|
+
const W = (Oe = (Ee = E.meta) == null ? void 0 : Ee.prompt) == null ? void 0 : Oe.trim();
|
|
29876
29887
|
if (W && !J(W)) return E;
|
|
29877
|
-
const ce = (u = (
|
|
29888
|
+
const ce = (u = (Ve = E.dataBinding) == null ? void 0 : Ve.question) == null ? void 0 : u.trim(), de = ce && !J(ce) ? ce : k();
|
|
29878
29889
|
return de ? {
|
|
29879
29890
|
...E,
|
|
29880
29891
|
dataBinding: {
|
|
@@ -29898,9 +29909,9 @@ const mg = {
|
|
|
29898
29909
|
return String(ce);
|
|
29899
29910
|
}
|
|
29900
29911
|
}
|
|
29901
|
-
function
|
|
29902
|
-
var
|
|
29903
|
-
const de = (
|
|
29912
|
+
function q(E, W, ce) {
|
|
29913
|
+
var Oe;
|
|
29914
|
+
const de = (Oe = E.columns[0]) == null ? void 0 : Oe.key, Ee = de ? te(W, de) : "";
|
|
29904
29915
|
return `${ce}-${Ee}`;
|
|
29905
29916
|
}
|
|
29906
29917
|
const B = new po({
|
|
@@ -29927,30 +29938,30 @@ const mg = {
|
|
|
29927
29938
|
function ea() {
|
|
29928
29939
|
le && (clearTimeout(le), le = null);
|
|
29929
29940
|
}
|
|
29930
|
-
function
|
|
29941
|
+
function Fe() {
|
|
29931
29942
|
ea(), Y.value = n.message.content ? De(n.message.content) : "";
|
|
29932
29943
|
}
|
|
29933
|
-
function
|
|
29944
|
+
function ca() {
|
|
29934
29945
|
le || (le = setTimeout(() => {
|
|
29935
29946
|
le = null, Y.value = n.message.content ? De(n.message.content) : "";
|
|
29936
29947
|
}, H7));
|
|
29937
29948
|
}
|
|
29938
29949
|
const Ze = oe(!1);
|
|
29939
|
-
let
|
|
29950
|
+
let ua = null;
|
|
29940
29951
|
function aa() {
|
|
29941
|
-
|
|
29952
|
+
ua && (clearTimeout(ua), ua = null);
|
|
29942
29953
|
}
|
|
29943
29954
|
return Wa(
|
|
29944
29955
|
() => [n.message.content, n.message.loading, n.message.streaming],
|
|
29945
29956
|
(E, W) => {
|
|
29946
29957
|
if (n.message.role === "status") return;
|
|
29947
29958
|
if (n.message.streaming) {
|
|
29948
|
-
!Y.value && n.message.content && (Y.value = De(n.message.content)),
|
|
29959
|
+
!Y.value && n.message.content && (Y.value = De(n.message.content)), ca();
|
|
29949
29960
|
return;
|
|
29950
29961
|
}
|
|
29951
|
-
|
|
29952
|
-
Ze.value = !0, aa(),
|
|
29953
|
-
Ze.value = !1,
|
|
29962
|
+
Fe(), (W == null ? void 0 : W[2]) && !n.message.streaming && n.message.content && ht(() => {
|
|
29963
|
+
Ze.value = !0, aa(), ua = setTimeout(() => {
|
|
29964
|
+
Ze.value = !1, ua = null;
|
|
29954
29965
|
}, 1200);
|
|
29955
29966
|
});
|
|
29956
29967
|
},
|
|
@@ -29960,7 +29971,7 @@ const mg = {
|
|
|
29960
29971
|
}), (E, W) => {
|
|
29961
29972
|
var ce;
|
|
29962
29973
|
return S(), I("div", {
|
|
29963
|
-
class:
|
|
29974
|
+
class: ia(["chat-msg", [
|
|
29964
29975
|
`chat-msg--${e.message.role}`,
|
|
29965
29976
|
{
|
|
29966
29977
|
"chat-msg--workbench-interleaved-result": e.message.workbenchInterleavedPlacement === "result" || e.message.workbenchInterleavedPlacement === "separator-result",
|
|
@@ -29973,18 +29984,18 @@ const mg = {
|
|
|
29973
29984
|
x("div", t7, N(M(p)("FAC.ae131787576233459")), 1),
|
|
29974
29985
|
x("div", s7, N(e.message.error), 1)
|
|
29975
29986
|
])) : ie("", !0),
|
|
29976
|
-
e.message.role === "assistant" &&
|
|
29987
|
+
e.message.role === "assistant" && fa.value.length > 0 ? (S(), Xa(Lg, {
|
|
29977
29988
|
key: 1,
|
|
29978
29989
|
class: "chat-msg__thinking-process",
|
|
29979
|
-
messages:
|
|
29990
|
+
messages: fa.value,
|
|
29980
29991
|
"turn-active": e.message.loading || e.message.streaming
|
|
29981
29992
|
}, null, 8, ["messages", "turn-active"])) : ie("", !0),
|
|
29982
29993
|
!e.message.loading && e.message.content && Y.value ? (S(), I("div", {
|
|
29983
29994
|
key: 2,
|
|
29984
|
-
class:
|
|
29995
|
+
class: ia(["chat-msg__text", { "chat-msg__text--reveal": Ze.value }]),
|
|
29985
29996
|
innerHTML: Y.value
|
|
29986
29997
|
}, null, 10, r7)) : ie("", !0),
|
|
29987
|
-
(S(!0), I(
|
|
29998
|
+
(S(!0), I(ra, null, Ca(Qe.value ? ye.value : [], (de, Ee) => (S(), I("section", {
|
|
29988
29999
|
key: `${e.message.id}-query-result-table-${Ee}`,
|
|
29989
30000
|
class: "chat-msg__query-result-table"
|
|
29990
30001
|
}, [
|
|
@@ -29996,48 +30007,48 @@ const mg = {
|
|
|
29996
30007
|
x("table", null, [
|
|
29997
30008
|
x("thead", null, [
|
|
29998
30009
|
x("tr", null, [
|
|
29999
|
-
(S(!0), I(
|
|
30000
|
-
key:
|
|
30001
|
-
}, N(
|
|
30010
|
+
(S(!0), I(ra, null, Ca(de.columns, (Oe) => (S(), I("th", {
|
|
30011
|
+
key: Oe.key
|
|
30012
|
+
}, N(Oe.label), 1))), 128))
|
|
30002
30013
|
])
|
|
30003
30014
|
]),
|
|
30004
30015
|
x("tbody", null, [
|
|
30005
|
-
(S(!0), I(
|
|
30006
|
-
key:
|
|
30016
|
+
(S(!0), I(ra, null, Ca(de.rows, (Oe, Ve) => (S(), I("tr", {
|
|
30017
|
+
key: q(de, Oe, Ve)
|
|
30007
30018
|
}, [
|
|
30008
|
-
(S(!0), I(
|
|
30019
|
+
(S(!0), I(ra, null, Ca(de.columns, (u) => (S(), I("td", {
|
|
30009
30020
|
key: u.key
|
|
30010
|
-
}, N(te(
|
|
30021
|
+
}, N(te(Oe, u.key)), 1))), 128))
|
|
30011
30022
|
]))), 128))
|
|
30012
30023
|
])
|
|
30013
30024
|
])
|
|
30014
30025
|
])
|
|
30015
30026
|
]))), 128)),
|
|
30016
|
-
|
|
30017
|
-
(S(!0), I(
|
|
30027
|
+
Ie.value.length > 0 ? (S(), I("div", o7, [
|
|
30028
|
+
(S(!0), I(ra, null, Ca(Ie.value, (de) => (S(), I("button", {
|
|
30018
30029
|
key: de,
|
|
30019
30030
|
type: "button",
|
|
30020
30031
|
class: "chat-msg__follow-up-action",
|
|
30021
30032
|
disabled: e.taskStateActionsDisabled,
|
|
30022
|
-
onClick: (Ee) =>
|
|
30033
|
+
onClick: (Ee) => ga(de)
|
|
30023
30034
|
}, N(de), 9, d7))), 128))
|
|
30024
30035
|
])) : ie("", !0),
|
|
30025
30036
|
!e.message.loading && z.value.length > 0 ? (S(), I("div", {
|
|
30026
30037
|
key: 4,
|
|
30027
|
-
class:
|
|
30038
|
+
class: ia(["chat-msg__attachments", `chat-msg__attachments--${e.message.role}`])
|
|
30028
30039
|
}, [
|
|
30029
|
-
|
|
30040
|
+
ma(M(mo), {
|
|
30030
30041
|
items: z.value,
|
|
30031
30042
|
actions: R.value,
|
|
30032
30043
|
"file-matchers": D,
|
|
30033
|
-
variant:
|
|
30044
|
+
variant: K.value,
|
|
30034
30045
|
disabled: "",
|
|
30035
30046
|
wrap: "",
|
|
30036
30047
|
onDownload: j
|
|
30037
30048
|
}, null, 8, ["items", "actions", "variant"])
|
|
30038
30049
|
], 2)) : ie("", !0),
|
|
30039
|
-
|
|
30040
|
-
(S(!0), I(
|
|
30050
|
+
Ke.value ? (S(), I("div", p7, [
|
|
30051
|
+
(S(!0), I(ra, null, Ca(he.value, (de) => (S(), Xa(rf, {
|
|
30041
30052
|
key: de.id,
|
|
30042
30053
|
card: de,
|
|
30043
30054
|
"show-insert-action": se.value,
|
|
@@ -30047,7 +30058,7 @@ const mg = {
|
|
|
30047
30058
|
e.message.role === "assistant" && !e.message.loading && Se.value ? (S(), I("div", m7, [
|
|
30048
30059
|
x("div", u7, N(fe.value), 1),
|
|
30049
30060
|
x("div", h7, [
|
|
30050
|
-
(S(!0), I(
|
|
30061
|
+
(S(!0), I(ra, null, Ca(qe.value, (de) => (S(), I("button", {
|
|
30051
30062
|
key: de.index,
|
|
30052
30063
|
type: "button",
|
|
30053
30064
|
class: "chat-msg__task-choice-action",
|
|
@@ -30058,7 +30069,7 @@ const mg = {
|
|
|
30058
30069
|
x("span", f7, N(de.index), 1),
|
|
30059
30070
|
x("span", b7, N(de.label), 1)
|
|
30060
30071
|
], 8, y7))), 128)),
|
|
30061
|
-
|
|
30072
|
+
ba.value ? (S(), I("button", {
|
|
30062
30073
|
key: 0,
|
|
30063
30074
|
type: "button",
|
|
30064
30075
|
class: "chat-msg__task-choice-cancel",
|
|
@@ -30068,7 +30079,7 @@ const mg = {
|
|
|
30068
30079
|
])
|
|
30069
30080
|
])) : ie("", !0),
|
|
30070
30081
|
e.message.role === "assistant" && !e.message.loading && e.message.planDraft ? (S(), I("div", C7, [
|
|
30071
|
-
|
|
30082
|
+
ma(e7, {
|
|
30072
30083
|
draft: e.message.planDraft,
|
|
30073
30084
|
"auto-insert": e.autoInsertComposePlan,
|
|
30074
30085
|
onConfirm: W[0] || (W[0] = (de) => d("confirmPlan", de)),
|
|
@@ -30077,29 +30088,29 @@ const mg = {
|
|
|
30077
30088
|
onAutoInsertChange: W[3] || (W[3] = (de) => d("autoInsertComposePlanChange", de))
|
|
30078
30089
|
}, null, 8, ["draft", "auto-insert"])
|
|
30079
30090
|
])) : ie("", !0),
|
|
30080
|
-
e.message.role === "assistant" && !e.message.loading && e.message.cardRecommendationDraft && !
|
|
30081
|
-
|
|
30091
|
+
e.message.role === "assistant" && !e.message.loading && e.message.cardRecommendationDraft && !Ke.value ? (S(), I("div", T7, [
|
|
30092
|
+
ma(og, {
|
|
30082
30093
|
draft: e.message.cardRecommendationDraft,
|
|
30083
30094
|
defer: e.message.deferCardRecommendationRender,
|
|
30084
30095
|
onChoose: W[4] || (W[4] = (de, Ee) => d("chooseCardRecommendation", de, Ee)),
|
|
30085
30096
|
onConfigure: W[5] || (W[5] = (de) => d("configureCardRecommendation", de))
|
|
30086
30097
|
}, null, 8, ["draft", "defer"])
|
|
30087
30098
|
])) : ie("", !0),
|
|
30088
|
-
e.message.role === "assistant" && !e.message.loading &&
|
|
30099
|
+
e.message.role === "assistant" && !e.message.loading && Be.value ? (S(), I("section", v7, [
|
|
30089
30100
|
x("header", x7, [
|
|
30090
30101
|
x("div", P7, [
|
|
30091
|
-
x("div", A7, N(
|
|
30092
|
-
x("div", S7, N(
|
|
30102
|
+
x("div", A7, N(Be.value.taskKindLabel), 1),
|
|
30103
|
+
x("div", S7, N(Be.value.title), 1)
|
|
30093
30104
|
]),
|
|
30094
30105
|
Qa.value ? (S(), I("span", {
|
|
30095
30106
|
key: 0,
|
|
30096
|
-
class:
|
|
30097
|
-
}, N(
|
|
30107
|
+
class: ia(["chat-msg__task-status", `chat-msg__task-status--${Be.value.statusTone}`])
|
|
30108
|
+
}, N(Be.value.statusLabel), 3)) : ie("", !0)
|
|
30098
30109
|
]),
|
|
30099
30110
|
re.value.length > 0 ? (S(), I("div", k7, [
|
|
30100
30111
|
x("div", _7, N(M(p)("FAC.f51a1787576211617")), 1),
|
|
30101
30112
|
x("dl", F7, [
|
|
30102
|
-
(S(!0), I(
|
|
30113
|
+
(S(!0), I(ra, null, Ca(re.value, (de) => (S(), I(ra, {
|
|
30103
30114
|
key: de.code
|
|
30104
30115
|
}, [
|
|
30105
30116
|
x("dt", I7, N(de.name), 1),
|
|
@@ -30107,31 +30118,31 @@ const mg = {
|
|
|
30107
30118
|
], 64))), 128))
|
|
30108
30119
|
])
|
|
30109
30120
|
])) : ie("", !0),
|
|
30110
|
-
|
|
30121
|
+
Be.value.missingFields.length > 0 ? (S(), I("div", w7, [
|
|
30111
30122
|
x("div", W7, N(M(p)("FAC.c5871787576212124")), 1),
|
|
30112
30123
|
x("div", D7, [
|
|
30113
|
-
(S(!0), I(
|
|
30124
|
+
(S(!0), I(ra, null, Ca(Be.value.missingFields, (de) => (S(), I("span", {
|
|
30114
30125
|
key: de.code,
|
|
30115
30126
|
class: "chat-msg__task-missing"
|
|
30116
30127
|
}, N(de.name), 1))), 128))
|
|
30117
30128
|
])
|
|
30118
30129
|
])) : ie("", !0),
|
|
30119
|
-
|
|
30120
|
-
|
|
30121
|
-
|
|
30130
|
+
Be.value.lastErrorMessage ? (S(), I("div", j7, N(Be.value.lastErrorMessage), 1)) : ie("", !0),
|
|
30131
|
+
Be.value.resultSummary ? (S(), I("div", R7, N(Be.value.resultSummary), 1)) : ie("", !0),
|
|
30132
|
+
ba.value ? (S(), I("div", M7, [
|
|
30122
30133
|
x("button", {
|
|
30123
30134
|
type: "button",
|
|
30124
30135
|
class: "chat-msg__task-action chat-msg__task-action--cancel",
|
|
30125
30136
|
disabled: e.taskStateActionsDisabled,
|
|
30126
30137
|
onClick: va
|
|
30127
|
-
}, N(
|
|
30138
|
+
}, N(Be.value.cancelPhrase), 9, N7),
|
|
30128
30139
|
Ba.value ? (S(), I("button", {
|
|
30129
30140
|
key: 0,
|
|
30130
30141
|
type: "button",
|
|
30131
30142
|
class: "chat-msg__task-action chat-msg__task-action--confirm",
|
|
30132
30143
|
disabled: e.taskStateActionsDisabled,
|
|
30133
30144
|
onClick: Ya
|
|
30134
|
-
}, N(
|
|
30145
|
+
}, N(Be.value.confirmPhrase), 9, L7)) : ie("", !0)
|
|
30135
30146
|
])) : ie("", !0)
|
|
30136
30147
|
])) : ie("", !0),
|
|
30137
30148
|
e.message.role === "assistant" && !e.message.loading && e.message.memoryCaptureDraft && Aa.value !== "dismissed" ? (S(), I("div", B7, [
|
|
@@ -30148,7 +30159,7 @@ const mg = {
|
|
|
30148
30159
|
type: "button",
|
|
30149
30160
|
class: "chat-msg__memory-action chat-msg__memory-action--primary",
|
|
30150
30161
|
disabled: Aa.value !== "draft",
|
|
30151
|
-
onClick:
|
|
30162
|
+
onClick: Ge
|
|
30152
30163
|
}, N(Da.value), 9, q7)
|
|
30153
30164
|
])
|
|
30154
30165
|
])) : ie("", !0),
|
|
@@ -30159,13 +30170,13 @@ const mg = {
|
|
|
30159
30170
|
onClick: Ta
|
|
30160
30171
|
}, [
|
|
30161
30172
|
x("span", {
|
|
30162
|
-
class:
|
|
30173
|
+
class: ia(["detail-arrow", { "is-open": !m.collapsed }])
|
|
30163
30174
|
}, "▶", 2),
|
|
30164
30175
|
Dc(" " + N(m.collapsed ? M(p)("FAC.4fac1787576233982") : M(p)("FAC.e7121787576234504")), 1)
|
|
30165
30176
|
])
|
|
30166
30177
|
]),
|
|
30167
30178
|
x("div", {
|
|
30168
|
-
class:
|
|
30179
|
+
class: ia(["detail-content", { "is-collapsed": m.collapsed }])
|
|
30169
30180
|
}, [
|
|
30170
30181
|
x("div", $7, N(e.message.detail), 1)
|
|
30171
30182
|
], 2)
|
|
@@ -30219,7 +30230,7 @@ const mg = {
|
|
|
30219
30230
|
var re;
|
|
30220
30231
|
return me.type === "tool-activity" && me.messages.length === 1 && !!((re = me.messages[0]) != null && re.initialEventsPending);
|
|
30221
30232
|
}
|
|
30222
|
-
function
|
|
30233
|
+
function K() {
|
|
30223
30234
|
F && (clearInterval(F), F = null), C.value = 0, F = setInterval(() => {
|
|
30224
30235
|
C.value += 1;
|
|
30225
30236
|
}, 1e3);
|
|
@@ -30227,15 +30238,15 @@ const mg = {
|
|
|
30227
30238
|
function se() {
|
|
30228
30239
|
F && (clearInterval(F), F = null), C.value = 0;
|
|
30229
30240
|
}
|
|
30230
|
-
function
|
|
30241
|
+
function Ke() {
|
|
30231
30242
|
d("scrollPositionChange", !!(m.value && m.value.scrollTop > 0));
|
|
30232
30243
|
}
|
|
30233
30244
|
function he() {
|
|
30234
|
-
|
|
30245
|
+
Ke();
|
|
30235
30246
|
}
|
|
30236
30247
|
function ve() {
|
|
30237
30248
|
const me = m.value;
|
|
30238
|
-
me && (me.scrollTop = me.scrollHeight),
|
|
30249
|
+
me && (me.scrollTop = me.scrollHeight), Ke();
|
|
30239
30250
|
}
|
|
30240
30251
|
function ye(me, re) {
|
|
30241
30252
|
if (re && typeof re == "object") {
|
|
@@ -30245,8 +30256,8 @@ const mg = {
|
|
|
30245
30256
|
f.delete(me);
|
|
30246
30257
|
}
|
|
30247
30258
|
function Qe(me, re) {
|
|
30248
|
-
var
|
|
30249
|
-
(fe = (
|
|
30259
|
+
var qe, fe;
|
|
30260
|
+
(fe = (qe = f.get(me)) == null ? void 0 : qe.setMemoryCaptureStatus) == null || fe.call(qe, re);
|
|
30250
30261
|
}
|
|
30251
30262
|
return t({
|
|
30252
30263
|
setMemoryCaptureStatus: Qe
|
|
@@ -30259,7 +30270,7 @@ const mg = {
|
|
|
30259
30270
|
A,
|
|
30260
30271
|
(me) => {
|
|
30261
30272
|
if (me) {
|
|
30262
|
-
|
|
30273
|
+
K();
|
|
30263
30274
|
return;
|
|
30264
30275
|
}
|
|
30265
30276
|
se();
|
|
@@ -30271,49 +30282,49 @@ const mg = {
|
|
|
30271
30282
|
class: "chat-message-list",
|
|
30272
30283
|
onScroll: he
|
|
30273
30284
|
}, [
|
|
30274
|
-
(S(!0), I(
|
|
30275
|
-
key: R(
|
|
30285
|
+
(S(!0), I(ra, null, Ca($.value, (qe) => (S(), I(ra, {
|
|
30286
|
+
key: R(qe)
|
|
30276
30287
|
}, [
|
|
30277
|
-
|
|
30288
|
+
qe.type === "user" ? (S(), Xa(to, {
|
|
30278
30289
|
key: 0,
|
|
30279
30290
|
ref_for: !0,
|
|
30280
|
-
ref: (fe) => ye(
|
|
30281
|
-
message:
|
|
30291
|
+
ref: (fe) => ye(qe.message.id, fe),
|
|
30292
|
+
message: qe.message,
|
|
30282
30293
|
messages: e.messages,
|
|
30283
30294
|
"auto-insert-compose-plan": e.autoInsertComposePlan,
|
|
30284
30295
|
"task-state-actions-disabled": e.taskStateActionsDisabled,
|
|
30285
30296
|
onInsertCard: re[0] || (re[0] = (fe) => d("insertCard", fe)),
|
|
30286
|
-
onChooseCardRecommendation: re[1] || (re[1] = (fe,
|
|
30297
|
+
onChooseCardRecommendation: re[1] || (re[1] = (fe, Ie) => d("chooseCardRecommendation", fe, Ie)),
|
|
30287
30298
|
onConfigureCardRecommendation: re[2] || (re[2] = (fe) => d("configureCardRecommendation", fe)),
|
|
30288
30299
|
onConfirmPlan: re[3] || (re[3] = (fe) => d("confirmPlan", fe)),
|
|
30289
30300
|
onCancelPlan: re[4] || (re[4] = (fe) => d("cancelPlan")),
|
|
30290
|
-
onConfirmTaskState: re[5] || (re[5] = (fe,
|
|
30291
|
-
onCancelTaskState: re[6] || (re[6] = (fe,
|
|
30292
|
-
onMemoryCaptureDismiss: re[7] || (re[7] = (fe,
|
|
30293
|
-
onMemoryCaptureSave: re[8] || (re[8] = (fe,
|
|
30294
|
-
onModifyPlan: re[9] || (re[9] = (fe,
|
|
30301
|
+
onConfirmTaskState: re[5] || (re[5] = (fe, Ie, Se) => d("confirmTaskState", fe, Ie, Se)),
|
|
30302
|
+
onCancelTaskState: re[6] || (re[6] = (fe, Ie, Se) => d("cancelTaskState", fe, Ie, Se)),
|
|
30303
|
+
onMemoryCaptureDismiss: re[7] || (re[7] = (fe, Ie) => d("memoryCaptureDismiss", fe, Ie)),
|
|
30304
|
+
onMemoryCaptureSave: re[8] || (re[8] = (fe, Ie) => d("memoryCaptureSave", fe, Ie)),
|
|
30305
|
+
onModifyPlan: re[9] || (re[9] = (fe, Ie) => d("modifyPlan", fe, Ie)),
|
|
30295
30306
|
onSendFollowUp: re[10] || (re[10] = (fe) => d("sendFollowUp", fe)),
|
|
30296
30307
|
onAutoInsertComposePlanChange: re[11] || (re[11] = (fe) => d("autoInsertComposePlanChange", fe))
|
|
30297
|
-
}, null, 8, ["message", "messages", "auto-insert-compose-plan", "task-state-actions-disabled"])) :
|
|
30308
|
+
}, null, 8, ["message", "messages", "auto-insert-compose-plan", "task-state-actions-disabled"])) : qe.type === "assistant" ? (S(), Xa(to, {
|
|
30298
30309
|
key: 1,
|
|
30299
30310
|
ref_for: !0,
|
|
30300
|
-
ref: (fe) => ye(
|
|
30301
|
-
message:
|
|
30311
|
+
ref: (fe) => ye(qe.message.id, fe),
|
|
30312
|
+
message: qe.message,
|
|
30302
30313
|
messages: e.messages,
|
|
30303
30314
|
"task-state-actions-disabled": e.taskStateActionsDisabled,
|
|
30304
30315
|
onInsertCard: re[12] || (re[12] = (fe) => d("insertCard", fe)),
|
|
30305
|
-
onChooseCardRecommendation: re[13] || (re[13] = (fe,
|
|
30316
|
+
onChooseCardRecommendation: re[13] || (re[13] = (fe, Ie) => d("chooseCardRecommendation", fe, Ie)),
|
|
30306
30317
|
onConfigureCardRecommendation: re[14] || (re[14] = (fe) => d("configureCardRecommendation", fe)),
|
|
30307
30318
|
onConfirmPlan: re[15] || (re[15] = (fe) => d("confirmPlan", fe)),
|
|
30308
30319
|
onCancelPlan: re[16] || (re[16] = (fe) => d("cancelPlan")),
|
|
30309
|
-
onConfirmTaskState: re[17] || (re[17] = (fe,
|
|
30310
|
-
onCancelTaskState: re[18] || (re[18] = (fe,
|
|
30311
|
-
onMemoryCaptureDismiss: re[19] || (re[19] = (fe,
|
|
30312
|
-
onMemoryCaptureSave: re[20] || (re[20] = (fe,
|
|
30313
|
-
onModifyPlan: re[21] || (re[21] = (fe,
|
|
30320
|
+
onConfirmTaskState: re[17] || (re[17] = (fe, Ie, Se) => d("confirmTaskState", fe, Ie, Se)),
|
|
30321
|
+
onCancelTaskState: re[18] || (re[18] = (fe, Ie, Se) => d("cancelTaskState", fe, Ie, Se)),
|
|
30322
|
+
onMemoryCaptureDismiss: re[19] || (re[19] = (fe, Ie) => d("memoryCaptureDismiss", fe, Ie)),
|
|
30323
|
+
onMemoryCaptureSave: re[20] || (re[20] = (fe, Ie) => d("memoryCaptureSave", fe, Ie)),
|
|
30324
|
+
onModifyPlan: re[21] || (re[21] = (fe, Ie) => d("modifyPlan", fe, Ie)),
|
|
30314
30325
|
onSendFollowUp: re[22] || (re[22] = (fe) => d("sendFollowUp", fe)),
|
|
30315
30326
|
onAutoInsertComposePlanChange: re[23] || (re[23] = (fe) => d("autoInsertComposePlanChange", fe))
|
|
30316
|
-
}, null, 8, ["message", "messages", "task-state-actions-disabled"])) : z(
|
|
30327
|
+
}, null, 8, ["message", "messages", "task-state-actions-disabled"])) : z(qe) ? (S(), I("div", Z7, N(M(p)("FAC.4e871787576156391", { p0: C.value })), 1)) : ie("", !0)
|
|
30317
30328
|
], 64))), 128))
|
|
30318
30329
|
], 544));
|
|
30319
30330
|
}
|
|
@@ -30350,16 +30361,16 @@ const mg = {
|
|
|
30350
30361
|
},
|
|
30351
30362
|
emits: ["attachment", "attachments", "businessGroupClear", "businessGroupSelect", "businessGroupOpen", "cancel", "submit", "image"],
|
|
30352
30363
|
setup(e, { expose: t, emit: i }) {
|
|
30353
|
-
const n = e, d = i, m = oe(""), f = oe([]), C = oe(null), F = oe(!1), D = oe(""), $ = oe(null), H = oe(null), A = oe(null), R = oe({}), z = oe(null),
|
|
30354
|
-
let
|
|
30355
|
-
const fe = ["image/png", "image/jpeg", "image/webp"],
|
|
30364
|
+
const n = e, d = i, m = oe(""), f = oe([]), C = oe(null), F = oe(!1), D = oe(""), $ = oe(null), H = oe(null), A = oe(null), R = oe({}), z = oe(null), K = oe(null), se = oe([]), Ke = oe(null), he = oe(null), ve = oe(!1), ye = oe(0), Qe = ne(() => ye.value > 0), me = oe(0), re = /* @__PURE__ */ new Set();
|
|
30365
|
+
let qe = 0;
|
|
30366
|
+
const fe = ["image/png", "image/jpeg", "image/webp"], Ie = [], Se = [
|
|
30356
30367
|
{
|
|
30357
30368
|
type: "image",
|
|
30358
30369
|
matcher: (u) => typeof u != "string" ? u.type.startsWith("image/") : /^data:image\//i.test(u) || /^(png|jpe?g|gif|webp|bmp|svg)(?:[;,?]|$)/i.test(u) || /\.(png|jpe?g|gif|webp|bmp|svg)(?:[?#].*)?$/i.test(u)
|
|
30359
30370
|
}
|
|
30360
30371
|
];
|
|
30361
|
-
function
|
|
30362
|
-
const u =
|
|
30372
|
+
function Be() {
|
|
30373
|
+
const u = K.value;
|
|
30363
30374
|
if (!u) return;
|
|
30364
30375
|
if (!m.value) {
|
|
30365
30376
|
u.style.height = `${hi}px`, u.style.overflowY = "hidden";
|
|
@@ -30372,7 +30383,7 @@ const mg = {
|
|
|
30372
30383
|
function Ba(u) {
|
|
30373
30384
|
m.value = u, ht(() => {
|
|
30374
30385
|
var v;
|
|
30375
|
-
|
|
30386
|
+
Be(), (v = K.value) == null || v.setSelectionRange(m.value.length, m.value.length);
|
|
30376
30387
|
});
|
|
30377
30388
|
}
|
|
30378
30389
|
const Qa = ne(() => se.value.map((u) => {
|
|
@@ -30385,10 +30396,10 @@ const mg = {
|
|
|
30385
30396
|
rawFile: v,
|
|
30386
30397
|
status: "success"
|
|
30387
30398
|
};
|
|
30388
|
-
})),
|
|
30399
|
+
})), fa = ne(() => {
|
|
30389
30400
|
var u;
|
|
30390
30401
|
return se.value.length === 1 && ((u = se.value[0]) == null ? void 0 : u.type) === "image" ? "picture" : "card";
|
|
30391
|
-
}),
|
|
30402
|
+
}), ba = ne(() => {
|
|
30392
30403
|
const u = D.value.trim().toLowerCase();
|
|
30393
30404
|
return u ? n.businessGroups.filter((v) => [
|
|
30394
30405
|
v.businessGroupName,
|
|
@@ -30414,28 +30425,28 @@ ${v}` : u.businessGroupName;
|
|
|
30414
30425
|
xa(), (u = A.value) == null || u.focus();
|
|
30415
30426
|
});
|
|
30416
30427
|
}
|
|
30417
|
-
function
|
|
30428
|
+
function Ge() {
|
|
30418
30429
|
F.value = !1, D.value = "", j();
|
|
30419
30430
|
}
|
|
30420
30431
|
function et(u) {
|
|
30421
|
-
d("businessGroupSelect", u),
|
|
30432
|
+
d("businessGroupSelect", u), Ge();
|
|
30422
30433
|
}
|
|
30423
|
-
function
|
|
30424
|
-
d("businessGroupClear"),
|
|
30434
|
+
function ga() {
|
|
30435
|
+
d("businessGroupClear"), Ge();
|
|
30425
30436
|
}
|
|
30426
30437
|
function Ya(u) {
|
|
30427
30438
|
var w, Z;
|
|
30428
30439
|
const v = u.relatedTarget;
|
|
30429
|
-
v instanceof Node && ((w = $.value) != null && w.contains(v)) || v instanceof Node && ((Z = H.value) != null && Z.contains(v)) ||
|
|
30440
|
+
v instanceof Node && ((w = $.value) != null && w.contains(v)) || v instanceof Node && ((Z = H.value) != null && Z.contains(v)) || Ge();
|
|
30430
30441
|
}
|
|
30431
30442
|
function We(u) {
|
|
30432
30443
|
var w, Z;
|
|
30433
30444
|
if (!F.value) return;
|
|
30434
30445
|
const v = u.target;
|
|
30435
|
-
v instanceof Node && ((w = $.value) != null && w.contains(v)) || v instanceof Node && ((Z = H.value) != null && Z.contains(v)) ||
|
|
30446
|
+
v instanceof Node && ((w = $.value) != null && w.contains(v)) || v instanceof Node && ((Z = H.value) != null && Z.contains(v)) || Ge();
|
|
30436
30447
|
}
|
|
30437
30448
|
function va() {
|
|
30438
|
-
|
|
30449
|
+
Ge();
|
|
30439
30450
|
}
|
|
30440
30451
|
function xa() {
|
|
30441
30452
|
const u = $.value;
|
|
@@ -30443,11 +30454,11 @@ ${v}` : u.businessGroupName;
|
|
|
30443
30454
|
R.value = {};
|
|
30444
30455
|
return;
|
|
30445
30456
|
}
|
|
30446
|
-
const v = window.innerWidth || document.documentElement.clientWidth, w = window.innerHeight || document.documentElement.clientHeight, Z = Math.max(0, v - Vs * 2),
|
|
30457
|
+
const v = window.innerWidth || document.documentElement.clientWidth, w = window.innerHeight || document.documentElement.clientHeight, Z = Math.max(0, v - Vs * 2), _e = Math.min(E1, Z), Me = u.getBoundingClientRect(), ta = Math.max(Vs, v - Vs - _e), it = Math.min(Math.max(Vs, Me.left), ta), Va = Math.max(160, Me.top - Vs * 2), Fa = Math.min(420, Va), ja = Math.max(Vs, w - Me.top + 8);
|
|
30447
30458
|
R.value = {
|
|
30448
30459
|
position: "fixed",
|
|
30449
30460
|
left: `${Math.round(it)}px`,
|
|
30450
|
-
width: `${Math.round(
|
|
30461
|
+
width: `${Math.round(_e)}px`,
|
|
30451
30462
|
maxHeight: `${Math.round(Fa)}px`,
|
|
30452
30463
|
bottom: `${Math.round(ja)}px`
|
|
30453
30464
|
};
|
|
@@ -30460,20 +30471,20 @@ ${v}` : u.businessGroupName;
|
|
|
30460
30471
|
j();
|
|
30461
30472
|
return;
|
|
30462
30473
|
}
|
|
30463
|
-
const
|
|
30474
|
+
const _e = w.getBoundingClientRect(), Me = typeof window > "u" ? ro : window.innerWidth || document.documentElement.clientWidth, ta = Math.min(
|
|
30464
30475
|
ro,
|
|
30465
|
-
Math.max(160,
|
|
30466
|
-
), it =
|
|
30476
|
+
Math.max(160, Me - pc * 2)
|
|
30477
|
+
), it = _e.left + _e.width / 2, Va = ta / 2, Fa = pc + Va, ja = Math.max(Fa, Me - pc - Va), Ia = Math.min(
|
|
30467
30478
|
Math.max(Fa, it),
|
|
30468
30479
|
ja
|
|
30469
|
-
), ha =
|
|
30480
|
+
), ha = _e.top > mc + 36;
|
|
30470
30481
|
z.value = {
|
|
30471
30482
|
text: v,
|
|
30472
30483
|
style: {
|
|
30473
30484
|
left: `${Math.round(Ia)}px`,
|
|
30474
|
-
top: `${Math.round(ha ?
|
|
30485
|
+
top: `${Math.round(ha ? _e.top - mc : _e.bottom + mc)}px`,
|
|
30475
30486
|
transform: ha ? "translate(-50%, -100%)" : "translateX(-50%)",
|
|
30476
|
-
maxWidth: `${Math.round(
|
|
30487
|
+
maxWidth: `${Math.round(ta)}px`
|
|
30477
30488
|
}
|
|
30478
30489
|
};
|
|
30479
30490
|
}
|
|
@@ -30484,7 +30495,7 @@ ${v}` : u.businessGroupName;
|
|
|
30484
30495
|
return fe.includes(u.type);
|
|
30485
30496
|
}
|
|
30486
30497
|
function k() {
|
|
30487
|
-
return
|
|
30498
|
+
return qe += 1, `pending-attachment-${qe}`;
|
|
30488
30499
|
}
|
|
30489
30500
|
function X(u) {
|
|
30490
30501
|
const v = URL.createObjectURL(u);
|
|
@@ -30493,7 +30504,7 @@ ${v}` : u.businessGroupName;
|
|
|
30493
30504
|
function te(u) {
|
|
30494
30505
|
u != null && u.startsWith("blob:") && (URL.revokeObjectURL(u), re.delete(u));
|
|
30495
30506
|
}
|
|
30496
|
-
function
|
|
30507
|
+
function q(u, v) {
|
|
30497
30508
|
se.value = [
|
|
30498
30509
|
...se.value,
|
|
30499
30510
|
{
|
|
@@ -30526,27 +30537,27 @@ ${v}` : u.businessGroupName;
|
|
|
30526
30537
|
}
|
|
30527
30538
|
], v();
|
|
30528
30539
|
}, w.onerror = () => {
|
|
30529
|
-
|
|
30540
|
+
Ke.value = p("FAC.251b1787576148524", { p0: u.name }), v();
|
|
30530
30541
|
}, w.onabort = () => {
|
|
30531
|
-
|
|
30542
|
+
Ke.value = p("FAC.49191787576146424", { p0: u.name }), v();
|
|
30532
30543
|
}, w.readAsDataURL(u);
|
|
30533
30544
|
});
|
|
30534
30545
|
}
|
|
30535
30546
|
async function Y(u) {
|
|
30536
30547
|
if (u.length !== 0) {
|
|
30537
|
-
|
|
30548
|
+
Ke.value = null, ye.value += 1;
|
|
30538
30549
|
try {
|
|
30539
30550
|
for (const v of u) {
|
|
30540
30551
|
if (!J(v)) {
|
|
30541
|
-
|
|
30552
|
+
q(v, v.type.startsWith("image/") ? "image" : "file");
|
|
30542
30553
|
continue;
|
|
30543
30554
|
}
|
|
30544
30555
|
if (n.routeImagesAsAttachments) {
|
|
30545
|
-
|
|
30556
|
+
q(v, "image");
|
|
30546
30557
|
continue;
|
|
30547
30558
|
}
|
|
30548
30559
|
if (v.size > w1) {
|
|
30549
|
-
|
|
30560
|
+
Ke.value = p("FAC.a8b01787576138568", { p0: v.name });
|
|
30550
30561
|
continue;
|
|
30551
30562
|
}
|
|
30552
30563
|
await B(v);
|
|
@@ -30565,55 +30576,55 @@ ${v}` : u.businessGroupName;
|
|
|
30565
30576
|
Y(Array.from(v.files ?? []));
|
|
30566
30577
|
}
|
|
30567
30578
|
function Re(u) {
|
|
30568
|
-
var
|
|
30569
|
-
const w = Array.from(((
|
|
30579
|
+
var _e, Me;
|
|
30580
|
+
const w = Array.from(((_e = u.clipboardData) == null ? void 0 : _e.items) ?? []).find((ta) => ta.kind === "file" && ta.type.startsWith("image/")), Z = (w == null ? void 0 : w.getAsFile()) ?? Array.from(((Me = u.clipboardData) == null ? void 0 : Me.files) ?? []).find((ta) => ta.type.startsWith("image/"));
|
|
30570
30581
|
Z && (u.preventDefault(), Y([Z]));
|
|
30571
30582
|
}
|
|
30572
30583
|
function De(u) {
|
|
30573
30584
|
const v = se.value.find((w) => w.id === u.id);
|
|
30574
|
-
v && (te(v.previewUrl), se.value = se.value.filter((w) => w.id !== v.id),
|
|
30585
|
+
v && (te(v.previewUrl), se.value = se.value.filter((w) => w.id !== v.id), Ke.value = null);
|
|
30575
30586
|
}
|
|
30576
30587
|
function ea() {
|
|
30577
30588
|
se.value.forEach((u) => {
|
|
30578
30589
|
te(u.previewUrl);
|
|
30579
30590
|
}), se.value = [], re.forEach((u) => URL.revokeObjectURL(u)), re.clear();
|
|
30580
30591
|
}
|
|
30581
|
-
function
|
|
30592
|
+
function Fe(u) {
|
|
30582
30593
|
var v;
|
|
30583
30594
|
return Array.from(((v = u.dataTransfer) == null ? void 0 : v.types) ?? []).includes("Files");
|
|
30584
30595
|
}
|
|
30585
|
-
function
|
|
30586
|
-
|
|
30596
|
+
function ca(u) {
|
|
30597
|
+
Fe(u) && (u.preventDefault(), me.value += 1, ve.value = !0);
|
|
30587
30598
|
}
|
|
30588
30599
|
function Ze(u) {
|
|
30589
|
-
|
|
30600
|
+
Fe(u) && u.preventDefault();
|
|
30590
30601
|
}
|
|
30591
|
-
function
|
|
30592
|
-
|
|
30602
|
+
function ua(u) {
|
|
30603
|
+
Fe(u) && (me.value = Math.max(0, me.value - 1), me.value === 0 && (ve.value = !1));
|
|
30593
30604
|
}
|
|
30594
30605
|
function aa(u) {
|
|
30595
30606
|
var v;
|
|
30596
|
-
|
|
30607
|
+
Fe(u) && (u.preventDefault(), me.value = 0, ve.value = !1, Y(Array.from(((v = u.dataTransfer) == null ? void 0 : v.files) ?? [])));
|
|
30597
30608
|
}
|
|
30598
30609
|
function E() {
|
|
30599
30610
|
if (Qe.value) return;
|
|
30600
|
-
if (
|
|
30611
|
+
if (Ke.value = null, se.value.length > 0) {
|
|
30601
30612
|
const v = m.value.trim();
|
|
30602
30613
|
d("attachments", {
|
|
30603
30614
|
attachments: se.value.map(({ id: w, ...Z }) => Z),
|
|
30604
30615
|
text: v
|
|
30605
|
-
}), se.value = [], m.value = "", ht(
|
|
30616
|
+
}), se.value = [], m.value = "", ht(Be);
|
|
30606
30617
|
return;
|
|
30607
30618
|
}
|
|
30608
30619
|
const u = m.value.trim();
|
|
30609
|
-
u && (f.value = [...f.value, u], C.value = null, d("submit", u), m.value = "", ht(
|
|
30620
|
+
u && (f.value = [...f.value, u], C.value = null, d("submit", u), m.value = "", ht(Be));
|
|
30610
30621
|
}
|
|
30611
30622
|
function W(u) {
|
|
30612
|
-
m.value = u, ht(
|
|
30623
|
+
m.value = u, ht(Be);
|
|
30613
30624
|
}
|
|
30614
30625
|
function ce() {
|
|
30615
30626
|
var u;
|
|
30616
|
-
(u =
|
|
30627
|
+
(u = K.value) == null || u.focus();
|
|
30617
30628
|
}
|
|
30618
30629
|
function de(u) {
|
|
30619
30630
|
if (f.value.length === 0 || C.value === null && m.value.trim()) return;
|
|
@@ -30631,7 +30642,7 @@ ${v}` : u.businessGroupName;
|
|
|
30631
30642
|
}
|
|
30632
30643
|
C.value = v, Ba(f.value[v]);
|
|
30633
30644
|
}
|
|
30634
|
-
function
|
|
30645
|
+
function Oe(u) {
|
|
30635
30646
|
u.isComposing || (u.preventDefault(), E());
|
|
30636
30647
|
}
|
|
30637
30648
|
t({
|
|
@@ -30640,35 +30651,35 @@ ${v}` : u.businessGroupName;
|
|
|
30640
30651
|
handleImageSelected: ke,
|
|
30641
30652
|
setText: W
|
|
30642
30653
|
}), Wa(m, (u, v) => {
|
|
30643
|
-
C.value !== null && u !== f.value[C.value] && u !== v && (C.value = null), ht(
|
|
30654
|
+
C.value !== null && u !== f.value[C.value] && u !== v && (C.value = null), ht(Be);
|
|
30644
30655
|
}), Wa(F, (u) => {
|
|
30645
30656
|
u ? ht(xa) : j();
|
|
30646
30657
|
});
|
|
30647
|
-
function
|
|
30648
|
-
|
|
30658
|
+
function Ve() {
|
|
30659
|
+
Be(), F.value && xa(), j();
|
|
30649
30660
|
}
|
|
30650
|
-
return typeof window < "u" && (window.addEventListener("resize",
|
|
30651
|
-
window.removeEventListener("resize",
|
|
30661
|
+
return typeof window < "u" && (window.addEventListener("resize", Ve), document.addEventListener("pointerdown", We, !0), Es(() => {
|
|
30662
|
+
window.removeEventListener("resize", Ve), document.removeEventListener("pointerdown", We, !0);
|
|
30652
30663
|
})), Es(() => {
|
|
30653
30664
|
me.value = 0, ve.value = !1, ea();
|
|
30654
30665
|
}), (u, v) => (S(), I("div", e1, [
|
|
30655
30666
|
x("div", {
|
|
30656
|
-
class:
|
|
30657
|
-
onDragenter:
|
|
30667
|
+
class: ia(["chat-sender__surface", { "chat-sender__surface--dragging": ve.value }]),
|
|
30668
|
+
onDragenter: ca,
|
|
30658
30669
|
onDragover: Ze,
|
|
30659
|
-
onDragleave:
|
|
30670
|
+
onDragleave: ua,
|
|
30660
30671
|
onDrop: aa
|
|
30661
30672
|
}, [
|
|
30662
30673
|
bi(x("textarea", {
|
|
30663
30674
|
ref_key: "textareaRef",
|
|
30664
|
-
ref:
|
|
30675
|
+
ref: K,
|
|
30665
30676
|
"onUpdate:modelValue": v[0] || (v[0] = (w) => m.value = w),
|
|
30666
30677
|
class: "chat-sender__input",
|
|
30667
30678
|
rows: "2",
|
|
30668
30679
|
placeholder: e.placeholder,
|
|
30669
30680
|
disabled: e.loading,
|
|
30670
30681
|
onKeydown: [
|
|
30671
|
-
Zs(Bt(
|
|
30682
|
+
Zs(Bt(Oe, ["exact"]), ["enter"]),
|
|
30672
30683
|
Zs(de, ["up"]),
|
|
30673
30684
|
Zs(Ee, ["down"])
|
|
30674
30685
|
],
|
|
@@ -30677,20 +30688,20 @@ ${v}` : u.businessGroupName;
|
|
|
30677
30688
|
[gi, m.value]
|
|
30678
30689
|
]),
|
|
30679
30690
|
Qa.value.length ? (S(), I("div", t1, [
|
|
30680
|
-
|
|
30691
|
+
ma(M(mo), {
|
|
30681
30692
|
items: Qa.value,
|
|
30682
|
-
actions:
|
|
30693
|
+
actions: Ie,
|
|
30683
30694
|
"file-matchers": Se,
|
|
30684
|
-
variant:
|
|
30695
|
+
variant: fa.value,
|
|
30685
30696
|
wrap: "",
|
|
30686
30697
|
onRemove: De
|
|
30687
30698
|
}, null, 8, ["items", "variant"]),
|
|
30688
|
-
(S(!0), I(
|
|
30699
|
+
(S(!0), I(ra, null, Ca(se.value.filter((w) => w.type === "file"), (w) => (S(), I("div", {
|
|
30689
30700
|
key: w.id,
|
|
30690
30701
|
class: "chat-sender__attachment-name"
|
|
30691
30702
|
}, N(w.file.name), 1))), 128))
|
|
30692
30703
|
])) : ie("", !0),
|
|
30693
|
-
|
|
30704
|
+
Ke.value ? (S(), I("div", s1, N(Ke.value), 1)) : ie("", !0),
|
|
30694
30705
|
Qe.value ? (S(), I("div", r1, N(M(p)("FAC.85621787576176834")), 1)) : ie("", !0),
|
|
30695
30706
|
x("input", {
|
|
30696
30707
|
ref_key: "attachmentInputRef",
|
|
@@ -30724,7 +30735,7 @@ ${v}` : u.businessGroupName;
|
|
|
30724
30735
|
"data-testid": "chat-attachment-trigger",
|
|
30725
30736
|
onClick: Ta
|
|
30726
30737
|
}, [
|
|
30727
|
-
|
|
30738
|
+
ma(M(vm))
|
|
30728
30739
|
], 8, o1),
|
|
30729
30740
|
x("div", {
|
|
30730
30741
|
ref_key: "businessGroupRef",
|
|
@@ -30734,7 +30745,7 @@ ${v}` : u.businessGroupName;
|
|
|
30734
30745
|
}, [
|
|
30735
30746
|
x("button", {
|
|
30736
30747
|
type: "button",
|
|
30737
|
-
class:
|
|
30748
|
+
class: ia(["chat-sender__business-trigger", { "chat-sender__business-trigger--active": !!e.selectedBusinessGroup }]),
|
|
30738
30749
|
disabled: e.loading,
|
|
30739
30750
|
"aria-haspopup": "listbox",
|
|
30740
30751
|
"aria-expanded": F.value,
|
|
@@ -30758,9 +30769,9 @@ ${v}` : u.businessGroupName;
|
|
|
30758
30769
|
title: M(p)("FAC.10141787576197985"),
|
|
30759
30770
|
"data-i18n-aria-label": "FAC.10141787576197985",
|
|
30760
30771
|
"aria-label": M(p)("FAC.10141787576197985"),
|
|
30761
|
-
onClick: Bt(
|
|
30772
|
+
onClick: Bt(ga, ["stop"])
|
|
30762
30773
|
}, [
|
|
30763
|
-
|
|
30774
|
+
ma(M(Ci))
|
|
30764
30775
|
], 8, u1)
|
|
30765
30776
|
], 8, m1)) : ie("", !0)
|
|
30766
30777
|
], 10, d1)
|
|
@@ -30798,7 +30809,7 @@ ${v}` : u.businessGroupName;
|
|
|
30798
30809
|
disabled: !m.value.trim() && se.value.length === 0 || e.loading || Qe.value,
|
|
30799
30810
|
onClick: E
|
|
30800
30811
|
}, [
|
|
30801
|
-
|
|
30812
|
+
ma(M(xm))
|
|
30802
30813
|
], 8, f1))
|
|
30803
30814
|
])
|
|
30804
30815
|
])
|
|
@@ -30828,18 +30839,18 @@ ${v}` : u.businessGroupName;
|
|
|
30828
30839
|
]),
|
|
30829
30840
|
x("div", C1, [
|
|
30830
30841
|
e.businessGroupLoading ? (S(), I("div", T1, [
|
|
30831
|
-
|
|
30842
|
+
ma(M(hc)),
|
|
30832
30843
|
x("span", v1, N(M(p)("FAC.d4ef1787576256006")), 1)
|
|
30833
|
-
])) : e.businessGroupError ? (S(), I("div", x1, N(e.businessGroupError), 1)) : (S(!0), I(
|
|
30834
|
-
var Z,
|
|
30844
|
+
])) : e.businessGroupError ? (S(), I("div", x1, N(e.businessGroupError), 1)) : (S(!0), I(ra, { key: 2 }, Ca(ba.value, (w) => {
|
|
30845
|
+
var Z, _e;
|
|
30835
30846
|
return S(), I("button", {
|
|
30836
30847
|
key: w.businessGroupCode,
|
|
30837
30848
|
type: "button",
|
|
30838
|
-
class:
|
|
30849
|
+
class: ia(["chat-sender__business-option", { "chat-sender__business-option--active": w.businessGroupCode === ((Z = e.selectedBusinessGroup) == null ? void 0 : Z.businessGroupCode) }]),
|
|
30839
30850
|
role: "option",
|
|
30840
|
-
"aria-selected": w.businessGroupCode === ((
|
|
30851
|
+
"aria-selected": w.businessGroupCode === ((_e = e.selectedBusinessGroup) == null ? void 0 : _e.businessGroupCode),
|
|
30841
30852
|
"aria-label": Da(w),
|
|
30842
|
-
onClick: (
|
|
30853
|
+
onClick: (Me) => et(w)
|
|
30843
30854
|
}, [
|
|
30844
30855
|
v[5] || (v[5] = x("span", {
|
|
30845
30856
|
class: "chat-sender__business-radio",
|
|
@@ -30850,9 +30861,9 @@ ${v}` : u.businessGroupName;
|
|
|
30850
30861
|
class: "chat-sender__business-name-trigger",
|
|
30851
30862
|
tabindex: "0",
|
|
30852
30863
|
"aria-label": w.businessGroupName,
|
|
30853
|
-
onMouseenter: (
|
|
30864
|
+
onMouseenter: (Me) => L(Me, w.businessGroupName),
|
|
30854
30865
|
onMouseleave: j,
|
|
30855
|
-
onFocus: (
|
|
30866
|
+
onFocus: (Me) => L(Me, w.businessGroupName),
|
|
30856
30867
|
onBlur: j
|
|
30857
30868
|
}, [
|
|
30858
30869
|
x("span", k1, N(w.businessGroupName), 1)
|
|
@@ -30861,9 +30872,9 @@ ${v}` : u.businessGroupName;
|
|
|
30861
30872
|
class: "chat-sender__business-desc-trigger",
|
|
30862
30873
|
tabindex: "0",
|
|
30863
30874
|
"aria-label": Aa(w),
|
|
30864
|
-
onMouseenter: (
|
|
30875
|
+
onMouseenter: (Me) => L(Me, Aa(w)),
|
|
30865
30876
|
onMouseleave: j,
|
|
30866
|
-
onFocus: (
|
|
30877
|
+
onFocus: (Me) => L(Me, Aa(w)),
|
|
30867
30878
|
onBlur: j
|
|
30868
30879
|
}, [
|
|
30869
30880
|
x("span", F1, N(Aa(w)), 1)
|
|
@@ -30871,7 +30882,7 @@ ${v}` : u.businessGroupName;
|
|
|
30871
30882
|
])
|
|
30872
30883
|
], 10, P1);
|
|
30873
30884
|
}), 128)),
|
|
30874
|
-
!e.businessGroupLoading &&
|
|
30885
|
+
!e.businessGroupLoading && ba.value.length === 0 ? (S(), I("div", I1, N(M(p)("FAC.e6271787576198507")), 1)) : ie("", !0)
|
|
30875
30886
|
])
|
|
30876
30887
|
], 44, b1)) : ie("", !0)
|
|
30877
30888
|
])),
|
|
@@ -30903,7 +30914,7 @@ ${v}` : u.businessGroupName;
|
|
|
30903
30914
|
}), m = 2 * Math.PI * 14, f = ne(() => m * (1 - i.usage.percent / 100));
|
|
30904
30915
|
return (C, F) => (S(), I("button", {
|
|
30905
30916
|
type: "button",
|
|
30906
|
-
class:
|
|
30917
|
+
class: ia(["context-usage", [e.usage.level, { loading: e.loading }]]),
|
|
30907
30918
|
title: d.value,
|
|
30908
30919
|
disabled: e.loading || e.disabled,
|
|
30909
30920
|
"data-i18n-aria-label": "FAC.6ed11787576212725",
|
|
@@ -31000,7 +31011,7 @@ ${v}` : u.businessGroupName;
|
|
|
31000
31011
|
var he, ve, ye;
|
|
31001
31012
|
return ((he = t.plan) == null ? void 0 : he.mode) === "todo" ? yc : (ve = t.plan) != null && ve.failed ? Zn : (ye = t.plan) != null && ye.active ? hc : Jn;
|
|
31002
31013
|
});
|
|
31003
|
-
function
|
|
31014
|
+
function K(he) {
|
|
31004
31015
|
return he.status === "error" ? Zn : he.status === "running" ? hc : he.status === "pending" ? yc : Jn;
|
|
31005
31016
|
}
|
|
31006
31017
|
function se() {
|
|
@@ -31018,7 +31029,7 @@ ${v}` : u.businessGroupName;
|
|
|
31018
31029
|
}
|
|
31019
31030
|
n.value || (i.value = t.plan.active);
|
|
31020
31031
|
}
|
|
31021
|
-
function
|
|
31032
|
+
function Ke() {
|
|
31022
31033
|
n.value = !0, i.value = !i.value;
|
|
31023
31034
|
}
|
|
31024
31035
|
return Wa(
|
|
@@ -31059,7 +31070,7 @@ ${v}` : u.businessGroupName;
|
|
|
31059
31070
|
m && (clearInterval(m), m = null);
|
|
31060
31071
|
}), (he, ve) => e.plan && f.value > 0 ? (S(), I("section", {
|
|
31061
31072
|
key: 0,
|
|
31062
|
-
class:
|
|
31073
|
+
class: ia(["task-todo-plan", {
|
|
31063
31074
|
"task-todo-plan--active": e.plan.active,
|
|
31064
31075
|
"task-todo-plan--failed": e.plan.failed
|
|
31065
31076
|
}]),
|
|
@@ -31072,7 +31083,7 @@ ${v}` : u.businessGroupName;
|
|
|
31072
31083
|
class: "task-todo-plan__summary",
|
|
31073
31084
|
"aria-expanded": i.value,
|
|
31074
31085
|
"data-testid": "task-todo-plan-summary",
|
|
31075
|
-
onClick:
|
|
31086
|
+
onClick: Ke
|
|
31076
31087
|
}, [
|
|
31077
31088
|
(S(), Xa(Yn(z.value), {
|
|
31078
31089
|
class: "task-todo-plan__summary-icon",
|
|
@@ -31080,18 +31091,18 @@ ${v}` : u.businessGroupName;
|
|
|
31080
31091
|
})),
|
|
31081
31092
|
x("span", z1, N(R.value), 1),
|
|
31082
31093
|
D.value && e.plan.active ? (S(), I("span", K1, N(D.value.title), 1)) : ie("", !0),
|
|
31083
|
-
|
|
31084
|
-
class:
|
|
31094
|
+
ma(M(Pm), {
|
|
31095
|
+
class: ia(["task-todo-plan__arrow", { "is-open": i.value }]),
|
|
31085
31096
|
"aria-hidden": "true"
|
|
31086
31097
|
}, null, 8, ["class"])
|
|
31087
31098
|
], 8, G1),
|
|
31088
31099
|
i.value ? (S(), I("div", q1, [
|
|
31089
|
-
(S(!0), I(
|
|
31100
|
+
(S(!0), I(ra, null, Ca(e.plan.steps, (ye) => (S(), I("div", {
|
|
31090
31101
|
key: ye.id,
|
|
31091
|
-
class:
|
|
31102
|
+
class: ia(["task-todo-plan__step", `task-todo-plan__step--${ye.status}`]),
|
|
31092
31103
|
"data-testid": "task-todo-plan-step"
|
|
31093
31104
|
}, [
|
|
31094
|
-
(S(), Xa(Yn(
|
|
31105
|
+
(S(), Xa(Yn(K(ye)), {
|
|
31095
31106
|
class: "task-todo-plan__step-icon",
|
|
31096
31107
|
"aria-hidden": "true"
|
|
31097
31108
|
})),
|
|
@@ -31236,28 +31247,28 @@ ${v}` : u.businessGroupName;
|
|
|
31236
31247
|
transport: n.transport,
|
|
31237
31248
|
workspaceId: () => n.workspaceId,
|
|
31238
31249
|
userId: () => n.userId
|
|
31239
|
-
}), R = A.messages, z = A.isLoading,
|
|
31250
|
+
}), R = A.messages, z = A.isLoading, K = A.isLoadingConversations, se = A.isSwitchingConversation, Ke = oe(null), he = oe(null), ve = oe(""), ye = ne(
|
|
31240
31251
|
() => A.conversations.value.map((y) => ({
|
|
31241
31252
|
id: y.id,
|
|
31242
31253
|
title: y.title,
|
|
31243
31254
|
createdAt: y.createdAt,
|
|
31244
31255
|
updatedAt: y.updatedAt
|
|
31245
31256
|
}))
|
|
31246
|
-
), Qe = ne(() => A.currentConversationId.value || ""), me = oe("chat"), re = oe(!1),
|
|
31257
|
+
), Qe = ne(() => A.currentConversationId.value || ""), me = oe("chat"), re = oe(!1), qe = oe(null), fe = oe(!1), Ie = ne(
|
|
31247
31258
|
() => n.canvasConfigActive || re.value
|
|
31248
|
-
), Se = ne(() => Sa(R.value)),
|
|
31259
|
+
), Se = ne(() => Sa(R.value)), Be = ne(() => !n.showTaskTodoPlan || me.value !== "chat" ? null : Yh(Se.value)), Ba = ne(() => {
|
|
31249
31260
|
var y;
|
|
31250
|
-
return ((y =
|
|
31261
|
+
return ((y = Be.value) == null ? void 0 : y.claimedStatusMessageIds) ?? [];
|
|
31251
31262
|
}), Qa = [
|
|
31252
31263
|
{ id: "warm", label: p("FAC.3e921787576286527") },
|
|
31253
31264
|
{ id: "professional", label: p("FAC.94ad1787576286630") },
|
|
31254
31265
|
{ id: "reserved", label: p("FAC.a0cc1787576286773") }
|
|
31255
|
-
],
|
|
31256
|
-
function
|
|
31266
|
+
], fa = /* @__PURE__ */ new WeakMap();
|
|
31267
|
+
function ba(y) {
|
|
31257
31268
|
fe.value = !!(y && y.scrollTop > 0);
|
|
31258
31269
|
}
|
|
31259
31270
|
function Aa(y) {
|
|
31260
|
-
|
|
31271
|
+
ba(y.currentTarget);
|
|
31261
31272
|
}
|
|
31262
31273
|
function Da(y) {
|
|
31263
31274
|
fe.value = y;
|
|
@@ -31267,7 +31278,7 @@ ${v}` : u.businessGroupName;
|
|
|
31267
31278
|
fe.value = !1;
|
|
31268
31279
|
return;
|
|
31269
31280
|
}
|
|
31270
|
-
Se.value.length === 0 &&
|
|
31281
|
+
Se.value.length === 0 && ba(qe.value);
|
|
31271
31282
|
}
|
|
31272
31283
|
Wa(
|
|
31273
31284
|
[me, () => Se.value.length],
|
|
@@ -31276,15 +31287,15 @@ ${v}` : u.businessGroupName;
|
|
|
31276
31287
|
const rt = new po({
|
|
31277
31288
|
gfm: !0,
|
|
31278
31289
|
breaks: !0
|
|
31279
|
-
}),
|
|
31290
|
+
}), Ge = ne(() => Ya(n.welcomeText));
|
|
31280
31291
|
function et(y) {
|
|
31281
31292
|
return y.replace(/百特搭\s*的?/gu, "").replace(/Baiteda(?:'s)?\s*/giu, "").replace(/\s+/gu, " ").trim();
|
|
31282
31293
|
}
|
|
31283
|
-
const
|
|
31294
|
+
const ga = ne(() => et(n.placeholder));
|
|
31284
31295
|
function Ya(y) {
|
|
31285
31296
|
return y.trim() ? yi.sanitize(rt.parse(y)) : "";
|
|
31286
31297
|
}
|
|
31287
|
-
function We(y, g, _, Ce, Ue,
|
|
31298
|
+
function We(y, g, _, Ce, Ue, pa = {}) {
|
|
31288
31299
|
return {
|
|
31289
31300
|
id: y,
|
|
31290
31301
|
entryId: y,
|
|
@@ -31295,7 +31306,7 @@ ${v}` : u.businessGroupName;
|
|
|
31295
31306
|
capabilityId: Ce,
|
|
31296
31307
|
quickEntryId: y,
|
|
31297
31308
|
source: _,
|
|
31298
|
-
...
|
|
31309
|
+
...pa
|
|
31299
31310
|
}
|
|
31300
31311
|
};
|
|
31301
31312
|
}
|
|
@@ -31329,10 +31340,10 @@ ${v}` : u.businessGroupName;
|
|
|
31329
31340
|
}), Wa(z, (y, g) => {
|
|
31330
31341
|
y || !g || ht(() => {
|
|
31331
31342
|
var _;
|
|
31332
|
-
(_ =
|
|
31343
|
+
(_ = Ke.value) == null || _.focusComposer();
|
|
31333
31344
|
});
|
|
31334
31345
|
});
|
|
31335
|
-
const va = oe(!1), xa = oe(""), L = oe(""), j = oe(""), J = oe(!1), k = oe(!1), X = oe(0), te = oe(!1),
|
|
31346
|
+
const va = oe(!1), xa = oe(""), L = oe(""), j = oe(""), J = oe(!1), k = oe(!1), X = oe(0), te = oe(!1), q = oe(!1), B = oe(""), Y = ne(() => {
|
|
31336
31347
|
const y = A.conversations.value.find(
|
|
31337
31348
|
(g) => g.id === B.value
|
|
31338
31349
|
);
|
|
@@ -31360,26 +31371,26 @@ ${v}` : u.businessGroupName;
|
|
|
31360
31371
|
if (!y) return "";
|
|
31361
31372
|
const g = new Date(y);
|
|
31362
31373
|
if (!Number.isFinite(g.getTime())) return "";
|
|
31363
|
-
const _ = /* @__PURE__ */ new Date(), Ce =
|
|
31364
|
-
if (
|
|
31374
|
+
const _ = /* @__PURE__ */ new Date(), Ce = ua(g);
|
|
31375
|
+
if (ca(g, _)) return Ce;
|
|
31365
31376
|
const Ue = `${Ze(g.getMonth() + 1)}-${Ze(g.getDate())}`;
|
|
31366
31377
|
return g.getFullYear() === _.getFullYear() ? `${Ue} ${Ce}` : `${g.getFullYear()}-${Ue} ${Ce}`;
|
|
31367
31378
|
}
|
|
31368
|
-
function
|
|
31379
|
+
function Fe(y) {
|
|
31369
31380
|
if (!y) return "";
|
|
31370
31381
|
const g = new Date(y);
|
|
31371
31382
|
return Number.isFinite(g.getTime()) ? [
|
|
31372
31383
|
`${g.getFullYear()}-${Ze(g.getMonth() + 1)}-${Ze(g.getDate())}`,
|
|
31373
|
-
|
|
31384
|
+
ua(g)
|
|
31374
31385
|
].join(" ") : "";
|
|
31375
31386
|
}
|
|
31376
|
-
function
|
|
31387
|
+
function ca(y, g) {
|
|
31377
31388
|
return y.getFullYear() === g.getFullYear() && y.getMonth() === g.getMonth() && y.getDate() === g.getDate();
|
|
31378
31389
|
}
|
|
31379
31390
|
function Ze(y) {
|
|
31380
31391
|
return String(y).padStart(2, "0");
|
|
31381
31392
|
}
|
|
31382
|
-
function
|
|
31393
|
+
function ua(y) {
|
|
31383
31394
|
return `${Ze(y.getHours())}:${Ze(y.getMinutes())}`;
|
|
31384
31395
|
}
|
|
31385
31396
|
function aa() {
|
|
@@ -31399,19 +31410,19 @@ ${v}` : u.businessGroupName;
|
|
|
31399
31410
|
g && (j.value = "", B.value = g.id, te.value = !0);
|
|
31400
31411
|
}
|
|
31401
31412
|
function Ee() {
|
|
31402
|
-
|
|
31413
|
+
q.value || (te.value = !1, B.value = "");
|
|
31403
31414
|
}
|
|
31404
|
-
async function
|
|
31405
|
-
if (!(
|
|
31406
|
-
|
|
31415
|
+
async function Oe() {
|
|
31416
|
+
if (!(q.value || !B.value)) {
|
|
31417
|
+
q.value = !0;
|
|
31407
31418
|
try {
|
|
31408
31419
|
await A.deleteConversation(B.value), te.value = !1, B.value = "";
|
|
31409
31420
|
} finally {
|
|
31410
|
-
|
|
31421
|
+
q.value = !1;
|
|
31411
31422
|
}
|
|
31412
31423
|
}
|
|
31413
31424
|
}
|
|
31414
|
-
function
|
|
31425
|
+
function Ve(y) {
|
|
31415
31426
|
const g = A.conversations.value.find((_) => _.id === y);
|
|
31416
31427
|
g && (j.value = "", L.value = g.id, xa.value = g.title, va.value = !0);
|
|
31417
31428
|
}
|
|
@@ -31427,17 +31438,17 @@ ${v}` : u.businessGroupName;
|
|
|
31427
31438
|
function Z() {
|
|
31428
31439
|
me.value = "chat";
|
|
31429
31440
|
}
|
|
31430
|
-
function
|
|
31441
|
+
function _e() {
|
|
31431
31442
|
Z();
|
|
31432
31443
|
}
|
|
31433
|
-
function
|
|
31444
|
+
function Me() {
|
|
31434
31445
|
w("history");
|
|
31435
31446
|
}
|
|
31436
|
-
function
|
|
31447
|
+
function ta() {
|
|
31437
31448
|
me.value = "settings";
|
|
31438
31449
|
}
|
|
31439
31450
|
function it() {
|
|
31440
|
-
|
|
31451
|
+
ta();
|
|
31441
31452
|
}
|
|
31442
31453
|
function Va() {
|
|
31443
31454
|
me.value = "settings", d("settings-open");
|
|
@@ -31491,14 +31502,14 @@ ${v}` : u.businessGroupName;
|
|
|
31491
31502
|
const _ = At(g), Ce = ss(g);
|
|
31492
31503
|
A.messages.value = A.messages.value.map((Ue) => {
|
|
31493
31504
|
var Ma;
|
|
31494
|
-
const
|
|
31495
|
-
if (!
|
|
31496
|
-
const Je = Ce !== void 0 ? (Ma =
|
|
31505
|
+
const pa = Ue.taskStateDraft;
|
|
31506
|
+
if (!pa || pa.taskId !== y || !pa.canConfirm) return Ue;
|
|
31507
|
+
const Je = Ce !== void 0 ? (Ma = pa.confirmationOptions) == null ? void 0 : Ma.find((za) => za.index === Ce) : void 0;
|
|
31497
31508
|
return {
|
|
31498
31509
|
...Ue,
|
|
31499
31510
|
taskStateDraft: {
|
|
31500
|
-
...
|
|
31501
|
-
title: p("FAC.ebfe1787576168445", { p0:
|
|
31511
|
+
...pa,
|
|
31512
|
+
title: p("FAC.ebfe1787576168445", { p0: pa.title }),
|
|
31502
31513
|
status: _ ? "cancelled" : "confirmed",
|
|
31503
31514
|
statusLabel: p("FAC.bc8f1787576269051"),
|
|
31504
31515
|
statusTone: _ ? "neutral" : "success",
|
|
@@ -31525,7 +31536,7 @@ ${v}` : u.businessGroupName;
|
|
|
31525
31536
|
function we(y) {
|
|
31526
31537
|
return /(不要|别|无需|不用|先不).{0,8}(插入|插卡|添加|加到|放到)/.test(y);
|
|
31527
31538
|
}
|
|
31528
|
-
function
|
|
31539
|
+
function ze(y) {
|
|
31529
31540
|
const g = y.trim().replace(/\s+/gu, "");
|
|
31530
31541
|
return !g || we(g) ? !1 : /^(?:请)?(?:把|将)?(?:当前|这张|最新)?(?:图表|卡片|指标卡)?(?:插入|插卡|添加|加|放)(?:到|上)?(?:左侧|工作台|画布|页面)$/u.test(g) || /^(?:请)?(?:把|将)?(?:左侧|工作台|画布|页面)(?:插入|插卡|添加|加上|放上)$/u.test(g);
|
|
31531
31542
|
}
|
|
@@ -31555,8 +31566,8 @@ ${v}` : u.businessGroupName;
|
|
|
31555
31566
|
const g = y.replace(/\s+/g, " ").replace(/[??。.!!、]+$/g, "").trim();
|
|
31556
31567
|
if (!g || /^(?:选|选择|序号|第)?[1-9]\d*(?:个|项|号)?$/u.test(g.replace(/\s+/g, "")))
|
|
31557
31568
|
return "";
|
|
31558
|
-
const _ = /^(?:请|帮我|麻烦|能不能|可以|我想|能否|请问|我想了解|我想知道|麻烦你?|能麻烦)\s*/u, Ce = /(?:给我|给我看看|帮我查|帮我分析|帮我看看|查一下|看一下|分析一下?|展示一下?|显示一下?|告诉我|说一下|列举一下?|统计一下?|对比一下?|比较一下?|算一下?)\s*/gu, Ue = /(?:是多少|有多少|怎么样|的情况|的情况如何|如何|呢|吗|吧|的数据|的数据吗|是什么|是什么情况|有哪些|有哪些变化|趋势如何)$/u,
|
|
31559
|
-
let Je = g.replace(_, "").replace(Ce, "").replace(Ue, "").replace(
|
|
31569
|
+
const _ = /^(?:请|帮我|麻烦|能不能|可以|我想|能否|请问|我想了解|我想知道|麻烦你?|能麻烦)\s*/u, Ce = /(?:给我|给我看看|帮我查|帮我分析|帮我看看|查一下|看一下|分析一下?|展示一下?|显示一下?|告诉我|说一下|列举一下?|统计一下?|对比一下?|比较一下?|算一下?)\s*/gu, Ue = /(?:是多少|有多少|怎么样|的情况|的情况如何|如何|呢|吗|吧|的数据|的数据吗|是什么|是什么情况|有哪些|有哪些变化|趋势如何)$/u, pa = /(?:最近的?|最近\d+[天月年周个]*|今年|去年|上个月|本月|本季度|上季度|当月|上半年|下半年|第[一二三四]季度|\d{4}年(?:第[一二三四]季度)?)/gu;
|
|
31570
|
+
let Je = g.replace(_, "").replace(Ce, "").replace(Ue, "").replace(pa, "").replace(/^[的的和与及,,]\s*|\s*[的的和与及,,]$/g, "").trim();
|
|
31560
31571
|
if (Je || (Je = g), Je.length <= 20) return Je;
|
|
31561
31572
|
const Ma = Je.match(
|
|
31562
31573
|
/(?:各|全部)?([一-鿿]{0,3}(?:区域|地区|部门|产品线?|品类|渠道|门店|客户|业务线?|分公司|团队|大区|中心))/u
|
|
@@ -31611,17 +31622,17 @@ ${v}` : u.businessGroupName;
|
|
|
31611
31622
|
return "";
|
|
31612
31623
|
}
|
|
31613
31624
|
function ge(y) {
|
|
31614
|
-
var Ce, Ue,
|
|
31625
|
+
var Ce, Ue, pa, Je;
|
|
31615
31626
|
const g = (Ue = (Ce = y.dataBinding) == null ? void 0 : Ce.question) == null ? void 0 : Ue.trim();
|
|
31616
31627
|
if (g && T(g)) return g;
|
|
31617
|
-
const _ = (Je = (
|
|
31628
|
+
const _ = (Je = (pa = y.meta) == null ? void 0 : pa.prompt) == null ? void 0 : Je.trim();
|
|
31618
31629
|
return _ && T(_) ? _ : O();
|
|
31619
31630
|
}
|
|
31620
|
-
function
|
|
31631
|
+
function na(y) {
|
|
31621
31632
|
var Ma, za, Ot, Vt;
|
|
31622
31633
|
const g = ge(y), _ = at(g);
|
|
31623
31634
|
if (!g || !_) return y;
|
|
31624
|
-
const Ce = (za = (Ma = y.meta) == null ? void 0 : Ma.prompt) == null ? void 0 : za.trim(), Ue = (Vt = (Ot = y.dataBinding) == null ? void 0 : Ot.question) == null ? void 0 : Vt.trim(),
|
|
31635
|
+
const Ce = (za = (Ma = y.meta) == null ? void 0 : Ma.prompt) == null ? void 0 : za.trim(), Ue = (Vt = (Ot = y.dataBinding) == null ? void 0 : Ot.question) == null ? void 0 : Vt.trim(), pa = !!(Ce && !T(Ce)), Je = !!(Ue && !T(Ue));
|
|
31625
31636
|
return {
|
|
31626
31637
|
...y,
|
|
31627
31638
|
title: _,
|
|
@@ -31629,7 +31640,7 @@ ${v}` : u.businessGroupName;
|
|
|
31629
31640
|
...y.dataBinding,
|
|
31630
31641
|
question: g
|
|
31631
31642
|
},
|
|
31632
|
-
...
|
|
31643
|
+
...pa || Je ? {
|
|
31633
31644
|
meta: {
|
|
31634
31645
|
...y.meta,
|
|
31635
31646
|
prompt: g
|
|
@@ -31647,8 +31658,8 @@ ${v}` : u.businessGroupName;
|
|
|
31647
31658
|
if (!g)
|
|
31648
31659
|
return Ce ? { ...y, ..._ ? { viewAlternatives: _ } : {} } : y;
|
|
31649
31660
|
const Ue = y.blockPlan && typeof y.blockPlan == "object" ? { ...y.blockPlan } : y.blockPlan;
|
|
31650
|
-
let
|
|
31651
|
-
return Ue && typeof Ue == "object" && "title" in Ue && (typeof Ue.title == "string" ? Ue.title.trim() : "") !== g && (Ue.title = g,
|
|
31661
|
+
let pa = !1;
|
|
31662
|
+
return Ue && typeof Ue == "object" && "title" in Ue && (typeof Ue.title == "string" ? Ue.title.trim() : "") !== g && (Ue.title = g, pa = !0), !pa && !Ce ? y : {
|
|
31652
31663
|
...y,
|
|
31653
31664
|
...Ue ? { blockPlan: Ue } : {},
|
|
31654
31665
|
..._ ? { viewAlternatives: _ } : {}
|
|
@@ -31657,11 +31668,11 @@ ${v}` : u.businessGroupName;
|
|
|
31657
31668
|
function Ae(y) {
|
|
31658
31669
|
const g = y.cardRecommendationDraft;
|
|
31659
31670
|
if (!g) return y;
|
|
31660
|
-
const _ =
|
|
31671
|
+
const _ = fa.get(y);
|
|
31661
31672
|
if ((_ == null ? void 0 : _.draft) === g) return _.normalized;
|
|
31662
31673
|
const Ce = g.recommendations.map(
|
|
31663
31674
|
(Je) => be(Je)
|
|
31664
|
-
),
|
|
31675
|
+
), pa = Ce.some(
|
|
31665
31676
|
(Je, Ma) => Je !== g.recommendations[Ma]
|
|
31666
31677
|
) ? {
|
|
31667
31678
|
...y,
|
|
@@ -31670,13 +31681,13 @@ ${v}` : u.businessGroupName;
|
|
|
31670
31681
|
recommendations: Ce
|
|
31671
31682
|
}
|
|
31672
31683
|
} : y;
|
|
31673
|
-
return
|
|
31684
|
+
return fa.set(y, { draft: g, normalized: pa }), pa;
|
|
31674
31685
|
}
|
|
31675
31686
|
function je(y) {
|
|
31676
31687
|
const g = y.cardRecommendationDraft;
|
|
31677
31688
|
return String(y.workbenchTurnId || (g == null ? void 0 : g.placementTurnId) || (g == null ? void 0 : g.sourceTurnId) || "").trim();
|
|
31678
31689
|
}
|
|
31679
|
-
function
|
|
31690
|
+
function la(y) {
|
|
31680
31691
|
const g = new Set(
|
|
31681
31692
|
y.filter((_) => {
|
|
31682
31693
|
var Ce;
|
|
@@ -31691,7 +31702,7 @@ ${v}` : u.businessGroupName;
|
|
|
31691
31702
|
);
|
|
31692
31703
|
}
|
|
31693
31704
|
function Sa(y) {
|
|
31694
|
-
return
|
|
31705
|
+
return la(y).map((g) => Ae(g));
|
|
31695
31706
|
}
|
|
31696
31707
|
function bt() {
|
|
31697
31708
|
var y;
|
|
@@ -31717,8 +31728,8 @@ ${v}` : u.businessGroupName;
|
|
|
31717
31728
|
} : y;
|
|
31718
31729
|
}
|
|
31719
31730
|
function Cs(y) {
|
|
31720
|
-
var
|
|
31721
|
-
if ((
|
|
31731
|
+
var pa, Je, Ma, za;
|
|
31732
|
+
if ((pa = y.meta) != null && pa.workbenchAdaptiveHeightPx) return y;
|
|
31722
31733
|
const g = (((Je = y.meta) == null ? void 0 : Je.prompt) || ((Ma = y.dataBinding) == null ? void 0 : Ma.question) || "").length, _ = ((za = y.summary) == null ? void 0 : za.length) || 0, Ce = y.chart.type === "mini-bar" ? 210 : 390, Ue = Math.ceil(g / 28) * 20 + Math.ceil(_ / 32) * 22;
|
|
31723
31734
|
return {
|
|
31724
31735
|
...y,
|
|
@@ -31734,14 +31745,14 @@ ${v}` : u.businessGroupName;
|
|
|
31734
31745
|
d("insertCard", Cs(_));
|
|
31735
31746
|
return;
|
|
31736
31747
|
}
|
|
31737
|
-
if (
|
|
31748
|
+
if (ze(y)) {
|
|
31738
31749
|
const Ce = Ea();
|
|
31739
31750
|
if (Ce) {
|
|
31740
31751
|
d("insertMetricCard", rs(Ce));
|
|
31741
31752
|
return;
|
|
31742
31753
|
}
|
|
31743
31754
|
if (g) {
|
|
31744
|
-
d("insertCard", Cs(
|
|
31755
|
+
d("insertCard", Cs(na(g)));
|
|
31745
31756
|
return;
|
|
31746
31757
|
}
|
|
31747
31758
|
}
|
|
@@ -31756,13 +31767,13 @@ ${v}` : u.businessGroupName;
|
|
|
31756
31767
|
}
|
|
31757
31768
|
function Ts(y) {
|
|
31758
31769
|
var Ma, za, Ot;
|
|
31759
|
-
const g = ((Ma = y.fileName) == null ? void 0 : Ma.trim()) || (y.type === "file" ? p("FAC.4c191787576287120") : p("FAC.cd3f1787576287435")), _ = y.type !== "file", Ce = ((za = y.text) == null ? void 0 : za.trim()) || (_ ? p("FAC.ae0f1787576159009", { p0: g }) : p("FAC.021a1787576159532", { p0: g })), Ue = (/* @__PURE__ */ new Date()).toISOString(),
|
|
31770
|
+
const g = ((Ma = y.fileName) == null ? void 0 : Ma.trim()) || (y.type === "file" ? p("FAC.4c191787576287120") : p("FAC.cd3f1787576287435")), _ = y.type !== "file", Ce = ((za = y.text) == null ? void 0 : za.trim()) || (_ ? p("FAC.ae0f1787576159009", { p0: g }) : p("FAC.021a1787576159532", { p0: g })), Ue = (/* @__PURE__ */ new Date()).toISOString(), pa = {
|
|
31760
31771
|
id: `image-user-${Date.now()}-${Math.random().toString(16).slice(2, 8)}`,
|
|
31761
31772
|
role: "user",
|
|
31762
31773
|
content: Ce,
|
|
31763
31774
|
timestamp: Ue
|
|
31764
31775
|
};
|
|
31765
|
-
|
|
31776
|
+
pa.attachments = [
|
|
31766
31777
|
{
|
|
31767
31778
|
type: _ ? "image" : "file",
|
|
31768
31779
|
url: y.downloadUrl || y.imageUrl,
|
|
@@ -31782,7 +31793,7 @@ ${v}` : u.businessGroupName;
|
|
|
31782
31793
|
timestamp: Ue,
|
|
31783
31794
|
startTime: Date.now()
|
|
31784
31795
|
};
|
|
31785
|
-
return A.messages.value.push(
|
|
31796
|
+
return A.messages.value.push(pa, Je), Je.id;
|
|
31786
31797
|
}
|
|
31787
31798
|
function G(y, g) {
|
|
31788
31799
|
const _ = A.messages.value.find((Ce) => Ce.id === y);
|
|
@@ -31913,13 +31924,13 @@ ${v}` : u.businessGroupName;
|
|
|
31913
31924
|
function nr(y) {
|
|
31914
31925
|
ve.value = y, me.value = "chat", ht(() => {
|
|
31915
31926
|
var g;
|
|
31916
|
-
(g =
|
|
31927
|
+
(g = Ke.value) == null || g.setText(ve.value);
|
|
31917
31928
|
});
|
|
31918
31929
|
}
|
|
31919
31930
|
function is() {
|
|
31920
31931
|
me.value = "chat", ht(() => {
|
|
31921
31932
|
var y;
|
|
31922
|
-
(y =
|
|
31933
|
+
(y = Ke.value) == null || y.focusComposer();
|
|
31923
31934
|
});
|
|
31924
31935
|
}
|
|
31925
31936
|
function lr(y, g) {
|
|
@@ -31934,8 +31945,8 @@ ${v}` : u.businessGroupName;
|
|
|
31934
31945
|
function Ga(y, g, _) {
|
|
31935
31946
|
return A.replaceWorkbenchTurnAnswer(y, g, _);
|
|
31936
31947
|
}
|
|
31937
|
-
function
|
|
31938
|
-
d("insertCard",
|
|
31948
|
+
function Ne(y) {
|
|
31949
|
+
d("insertCard", na(y)), is();
|
|
31939
31950
|
}
|
|
31940
31951
|
function Ye(y, g) {
|
|
31941
31952
|
var _, Ce;
|
|
@@ -31948,7 +31959,7 @@ ${v}` : u.businessGroupName;
|
|
|
31948
31959
|
switchConversation: W,
|
|
31949
31960
|
deleteConversation: ce,
|
|
31950
31961
|
openDeleteConversationDialog: de,
|
|
31951
|
-
openRenameConversationDialog:
|
|
31962
|
+
openRenameConversationDialog: Ve,
|
|
31952
31963
|
openClearConversationDialog: ha,
|
|
31953
31964
|
pushImageUploadMessage: Ts,
|
|
31954
31965
|
updateImageUploadMessage: G,
|
|
@@ -31961,8 +31972,8 @@ ${v}` : u.businessGroupName;
|
|
|
31961
31972
|
sendText: zt,
|
|
31962
31973
|
setInputText: nr,
|
|
31963
31974
|
focusComposer: is,
|
|
31964
|
-
openChatPanelFromHost:
|
|
31965
|
-
openHistoryPanel:
|
|
31975
|
+
openChatPanelFromHost: _e,
|
|
31976
|
+
openHistoryPanel: Me,
|
|
31966
31977
|
openSettingsPanelFromHost: it,
|
|
31967
31978
|
setMemoryCaptureStatus: Ye,
|
|
31968
31979
|
moveMessageToEnd: A.moveMessageToEnd
|
|
@@ -31972,7 +31983,7 @@ ${v}` : u.businessGroupName;
|
|
|
31972
31983
|
x("div", Z1, [
|
|
31973
31984
|
me.value === "chat" ? (S(), I("div", {
|
|
31974
31985
|
key: 0,
|
|
31975
|
-
class:
|
|
31986
|
+
class: ia(["runtime-chat__topbar", { "runtime-chat__topbar--shadow": fe.value }]),
|
|
31976
31987
|
"data-i18n-aria-label": "FAC.e8c21787576238740",
|
|
31977
31988
|
"aria-label": M(p)("FAC.e8c21787576238740")
|
|
31978
31989
|
}, [
|
|
@@ -31980,7 +31991,7 @@ ${v}` : u.businessGroupName;
|
|
|
31980
31991
|
Er(y.$slots, "topbar-leading", {}, void 0, !0)
|
|
31981
31992
|
])) : ie("", !0),
|
|
31982
31993
|
x("div", eC, [
|
|
31983
|
-
|
|
31994
|
+
ma(M(vr), {
|
|
31984
31995
|
"data-i18n-title": "FAC.41b31787576239223",
|
|
31985
31996
|
title: M(p)("FAC.41b31787576239223"),
|
|
31986
31997
|
placement: "bottom",
|
|
@@ -31996,7 +32007,7 @@ ${v}` : u.businessGroupName;
|
|
|
31996
32007
|
disabled: M(R).length === 0,
|
|
31997
32008
|
onClick: aa
|
|
31998
32009
|
}, [
|
|
31999
|
-
|
|
32010
|
+
ma(M(Am))
|
|
32000
32011
|
], 8, aC)
|
|
32001
32012
|
]),
|
|
32002
32013
|
_: 1
|
|
@@ -32017,12 +32028,12 @@ ${v}` : u.businessGroupName;
|
|
|
32017
32028
|
"data-testid": "chat-action-history",
|
|
32018
32029
|
onClick: g[0] || (g[0] = (_) => w("history"))
|
|
32019
32030
|
}, [
|
|
32020
|
-
|
|
32031
|
+
ma(M(yc))
|
|
32021
32032
|
], 8, tC)
|
|
32022
32033
|
]),
|
|
32023
32034
|
_: 1
|
|
32024
32035
|
}, 8, ["title"])) : ie("", !0),
|
|
32025
|
-
|
|
32036
|
+
ma(M(vr), {
|
|
32026
32037
|
"data-i18n-title": "FAC.84111787576287603",
|
|
32027
32038
|
title: M(p)("FAC.84111787576287603"),
|
|
32028
32039
|
placement: "bottomRight",
|
|
@@ -32031,13 +32042,13 @@ ${v}` : u.businessGroupName;
|
|
|
32031
32042
|
default: ks(() => [
|
|
32032
32043
|
x("button", {
|
|
32033
32044
|
type: "button",
|
|
32034
|
-
class:
|
|
32045
|
+
class: ia(["runtime-chat__topbar-action", { "runtime-chat__topbar-action--active": e.canvasConfigActive }]),
|
|
32035
32046
|
"data-i18n-aria-label": "FAC.84111787576287603",
|
|
32036
32047
|
"aria-label": M(p)("FAC.84111787576287603"),
|
|
32037
32048
|
"data-testid": "chat-action-settings",
|
|
32038
|
-
onClick:
|
|
32049
|
+
onClick: ta
|
|
32039
32050
|
}, [
|
|
32040
|
-
|
|
32051
|
+
ma(M(Sm))
|
|
32041
32052
|
], 10, sC)
|
|
32042
32053
|
]),
|
|
32043
32054
|
_: 1
|
|
@@ -32053,7 +32064,7 @@ ${v}` : u.businessGroupName;
|
|
|
32053
32064
|
"hidden-status-message-ids": Ba.value,
|
|
32054
32065
|
"auto-insert-compose-plan": !!n.autoInsertComposePlan,
|
|
32055
32066
|
"task-state-actions-disabled": n.taskStateActionsDisabled || M(z),
|
|
32056
|
-
onInsertCard:
|
|
32067
|
+
onInsertCard: Ne,
|
|
32057
32068
|
onChooseCardRecommendation: pe,
|
|
32058
32069
|
onConfigureCardRecommendation: xe,
|
|
32059
32070
|
onConfirmPlan: Ei,
|
|
@@ -32080,7 +32091,7 @@ ${v}` : u.businessGroupName;
|
|
|
32080
32091
|
])) : me.value === "chat" ? (S(), I("section", {
|
|
32081
32092
|
key: 2,
|
|
32082
32093
|
ref_key: "welcomeWorkspaceRef",
|
|
32083
|
-
ref:
|
|
32094
|
+
ref: qe,
|
|
32084
32095
|
class: "chat-workspace",
|
|
32085
32096
|
"data-i18n-aria-label": "FAC.85061787576188891",
|
|
32086
32097
|
"aria-label": M(p)("FAC.85061787576188891"),
|
|
@@ -32088,7 +32099,7 @@ ${v}` : u.businessGroupName;
|
|
|
32088
32099
|
}, [
|
|
32089
32100
|
x("div", {
|
|
32090
32101
|
class: "ai-chat-prologue",
|
|
32091
|
-
innerHTML:
|
|
32102
|
+
innerHTML: Ge.value
|
|
32092
32103
|
}, null, 8, lC)
|
|
32093
32104
|
], 40, nC)) : me.value === "history" ? (S(), I("section", {
|
|
32094
32105
|
key: 3,
|
|
@@ -32097,7 +32108,7 @@ ${v}` : u.businessGroupName;
|
|
|
32097
32108
|
"aria-label": M(p)("FAC.ec1d1787576239750")
|
|
32098
32109
|
}, [
|
|
32099
32110
|
x("header", {
|
|
32100
|
-
class:
|
|
32111
|
+
class: ia(["chat-panel__header", { "chat-panel__header--with-extra": $.value }])
|
|
32101
32112
|
}, [
|
|
32102
32113
|
x("button", {
|
|
32103
32114
|
type: "button",
|
|
@@ -32106,7 +32117,7 @@ ${v}` : u.businessGroupName;
|
|
|
32106
32117
|
"aria-label": M(p)("FAC.53a81787576287876"),
|
|
32107
32118
|
onClick: Z
|
|
32108
32119
|
}, [
|
|
32109
|
-
|
|
32120
|
+
ma(M(Xn))
|
|
32110
32121
|
], 8, dC),
|
|
32111
32122
|
x("h2", pC, N(M(p)("FAC.ac871787576288449")), 1),
|
|
32112
32123
|
$.value ? (S(), I("div", mC, [
|
|
@@ -32119,11 +32130,11 @@ ${v}` : u.businessGroupName;
|
|
|
32119
32130
|
"aria-label": M(p)("FAC.4d8e1787576288594"),
|
|
32120
32131
|
onClick: Z
|
|
32121
32132
|
}, [
|
|
32122
|
-
|
|
32133
|
+
ma(M(Ci))
|
|
32123
32134
|
], 8, uC)
|
|
32124
32135
|
], 2),
|
|
32125
32136
|
x("div", hC, [
|
|
32126
|
-
M(
|
|
32137
|
+
M(K) ? (S(), I("div", yC, [
|
|
32127
32138
|
g[17] || (g[17] = x("span", {
|
|
32128
32139
|
class: "chat-history-panel__spinner",
|
|
32129
32140
|
"aria-hidden": "true"
|
|
@@ -32131,9 +32142,9 @@ ${v}` : u.businessGroupName;
|
|
|
32131
32142
|
x("span", fC, N(M(p)("FAC.96181787576185775")), 1)
|
|
32132
32143
|
])) : (S(), I("section", bC, [
|
|
32133
32144
|
x("h3", gC, N(M(p)("FAC.4b581787576288938")), 1),
|
|
32134
|
-
(S(!0), I(
|
|
32145
|
+
(S(!0), I(ra, null, Ca(Re.value, (_) => (S(), I("div", {
|
|
32135
32146
|
key: _.id,
|
|
32136
|
-
class:
|
|
32147
|
+
class: ia(["chat-history-item", {
|
|
32137
32148
|
"chat-history-item--active": _.id === Qe.value,
|
|
32138
32149
|
"chat-history-item--menu-open": j.value === _.id
|
|
32139
32150
|
}]),
|
|
@@ -32145,7 +32156,7 @@ ${v}` : u.businessGroupName;
|
|
|
32145
32156
|
"data-testid": `chat-history-item-${_.id}`,
|
|
32146
32157
|
onClick: (Ce) => W(_.id)
|
|
32147
32158
|
}, [
|
|
32148
|
-
|
|
32159
|
+
ma(M(el), { class: "chat-history-item__icon" }),
|
|
32149
32160
|
x("span", vC, [
|
|
32150
32161
|
v(_.title) ? (S(), Xa(M(vr), {
|
|
32151
32162
|
key: 0,
|
|
@@ -32170,7 +32181,7 @@ ${v}` : u.businessGroupName;
|
|
|
32170
32181
|
ea(_.updatedAt) ? (S(), I("span", {
|
|
32171
32182
|
key: 2,
|
|
32172
32183
|
class: "chat-history-item__time",
|
|
32173
|
-
title:
|
|
32184
|
+
title: Fe(_.updatedAt),
|
|
32174
32185
|
"data-testid": `chat-history-updated-at-${_.id}`
|
|
32175
32186
|
}, N(ea(_.updatedAt)), 9, SC)) : ie("", !0)
|
|
32176
32187
|
])
|
|
@@ -32185,7 +32196,7 @@ ${v}` : u.businessGroupName;
|
|
|
32185
32196
|
"data-testid": `chat-history-more-${_.id}`,
|
|
32186
32197
|
onClick: Bt((Ce) => u(_.id), ["stop"])
|
|
32187
32198
|
}, [
|
|
32188
|
-
|
|
32199
|
+
ma(M(al))
|
|
32189
32200
|
], 8, _C),
|
|
32190
32201
|
j.value === _.id ? (S(), I("div", {
|
|
32191
32202
|
key: 0,
|
|
@@ -32197,7 +32208,7 @@ ${v}` : u.businessGroupName;
|
|
|
32197
32208
|
type: "button",
|
|
32198
32209
|
class: "chat-history-item__menu-action",
|
|
32199
32210
|
"data-testid": `chat-history-rename-${_.id}`,
|
|
32200
|
-
onClick: (Ce) =>
|
|
32211
|
+
onClick: (Ce) => Ve(_.id),
|
|
32201
32212
|
"data-i18n": "FAC.fced1787576269124"
|
|
32202
32213
|
}, N(M(p)("FAC.fced1787576269124")), 9, FC),
|
|
32203
32214
|
x("button", {
|
|
@@ -32211,11 +32222,11 @@ ${v}` : u.businessGroupName;
|
|
|
32211
32222
|
])
|
|
32212
32223
|
], 10, CC))), 128))
|
|
32213
32224
|
])),
|
|
32214
|
-
M(
|
|
32225
|
+
M(K) ? ie("", !0) : (S(), I("section", EC, [
|
|
32215
32226
|
x("h3", wC, N(M(p)("FAC.04791787576189417")), 1),
|
|
32216
|
-
(S(!0), I(
|
|
32227
|
+
(S(!0), I(ra, null, Ca(De.value, (_) => (S(), I("div", {
|
|
32217
32228
|
key: _.id,
|
|
32218
|
-
class:
|
|
32229
|
+
class: ia(["chat-history-item", {
|
|
32219
32230
|
"chat-history-item--active": _.id === Qe.value,
|
|
32220
32231
|
"chat-history-item--menu-open": j.value === _.id
|
|
32221
32232
|
}]),
|
|
@@ -32227,7 +32238,7 @@ ${v}` : u.businessGroupName;
|
|
|
32227
32238
|
"data-testid": `chat-history-item-${_.id}`,
|
|
32228
32239
|
onClick: (Ce) => W(_.id)
|
|
32229
32240
|
}, [
|
|
32230
|
-
|
|
32241
|
+
ma(M(el), { class: "chat-history-item__icon" }),
|
|
32231
32242
|
x("span", jC, [
|
|
32232
32243
|
v(_.title) ? (S(), Xa(M(vr), {
|
|
32233
32244
|
key: 0,
|
|
@@ -32252,7 +32263,7 @@ ${v}` : u.businessGroupName;
|
|
|
32252
32263
|
ea(_.updatedAt) ? (S(), I("span", {
|
|
32253
32264
|
key: 2,
|
|
32254
32265
|
class: "chat-history-item__time",
|
|
32255
|
-
title:
|
|
32266
|
+
title: Fe(_.updatedAt),
|
|
32256
32267
|
"data-testid": `chat-history-updated-at-${_.id}`
|
|
32257
32268
|
}, N(ea(_.updatedAt)), 9, LC)) : ie("", !0)
|
|
32258
32269
|
])
|
|
@@ -32267,7 +32278,7 @@ ${v}` : u.businessGroupName;
|
|
|
32267
32278
|
"data-testid": `chat-history-more-${_.id}`,
|
|
32268
32279
|
onClick: Bt((Ce) => u(_.id), ["stop"])
|
|
32269
32280
|
}, [
|
|
32270
|
-
|
|
32281
|
+
ma(M(al))
|
|
32271
32282
|
], 8, GC),
|
|
32272
32283
|
j.value === _.id ? (S(), I("div", {
|
|
32273
32284
|
key: 0,
|
|
@@ -32279,7 +32290,7 @@ ${v}` : u.businessGroupName;
|
|
|
32279
32290
|
type: "button",
|
|
32280
32291
|
class: "chat-history-item__menu-action",
|
|
32281
32292
|
"data-testid": `chat-history-rename-${_.id}`,
|
|
32282
|
-
onClick: (Ce) =>
|
|
32293
|
+
onClick: (Ce) => Ve(_.id),
|
|
32283
32294
|
"data-i18n": "FAC.fced1787576269124"
|
|
32284
32295
|
}, N(M(p)("FAC.fced1787576269124")), 9, zC),
|
|
32285
32296
|
x("button", {
|
|
@@ -32293,7 +32304,7 @@ ${v}` : u.businessGroupName;
|
|
|
32293
32304
|
])
|
|
32294
32305
|
], 10, WC))), 128))
|
|
32295
32306
|
])),
|
|
32296
|
-
!M(
|
|
32307
|
+
!M(K) && ye.value.length === 0 ? (S(), I("div", qC, N(M(p)("FAC.39271787576202113")), 1)) : ie("", !0)
|
|
32297
32308
|
])
|
|
32298
32309
|
], 8, oC)) : (S(), I("section", {
|
|
32299
32310
|
key: 4,
|
|
@@ -32302,7 +32313,7 @@ ${v}` : u.businessGroupName;
|
|
|
32302
32313
|
"aria-label": M(p)("FAC.7dac1787576217786")
|
|
32303
32314
|
}, [
|
|
32304
32315
|
x("header", {
|
|
32305
|
-
class:
|
|
32316
|
+
class: ia(["chat-panel__header", { "chat-panel__header--with-extra": $.value }])
|
|
32306
32317
|
}, [
|
|
32307
32318
|
x("button", {
|
|
32308
32319
|
type: "button",
|
|
@@ -32311,7 +32322,7 @@ ${v}` : u.businessGroupName;
|
|
|
32311
32322
|
"aria-label": M(p)("FAC.53a81787576287876"),
|
|
32312
32323
|
onClick: Fa
|
|
32313
32324
|
}, [
|
|
32314
|
-
|
|
32325
|
+
ma(M(Xn))
|
|
32315
32326
|
], 8, VC),
|
|
32316
32327
|
x("h2", $C, N(M(p)("FAC.7dac1787576217786")), 1),
|
|
32317
32328
|
$.value ? (S(), I("div", HC, [
|
|
@@ -32324,11 +32335,11 @@ ${v}` : u.businessGroupName;
|
|
|
32324
32335
|
"aria-label": M(p)("FAC.4d8e1787576288594"),
|
|
32325
32336
|
onClick: Fa
|
|
32326
32337
|
}, [
|
|
32327
|
-
|
|
32338
|
+
ma(M(Ci))
|
|
32328
32339
|
], 8, UC)
|
|
32329
32340
|
], 2),
|
|
32330
32341
|
x("div", QC, [
|
|
32331
|
-
e.showDefaultWorkbenchActions ? (S(), I(
|
|
32342
|
+
e.showDefaultWorkbenchActions ? (S(), I(ra, { key: 0 }, [
|
|
32332
32343
|
x("button", {
|
|
32333
32344
|
type: "button",
|
|
32334
32345
|
class: "chat-settings-panel__secondary",
|
|
@@ -32343,7 +32354,7 @@ ${v}` : u.businessGroupName;
|
|
|
32343
32354
|
"data-i18n": "FAC.e51d1787576189941"
|
|
32344
32355
|
}, N(M(p)("FAC.e51d1787576189941")), 1)
|
|
32345
32356
|
], 64)) : ie("", !0),
|
|
32346
|
-
|
|
32357
|
+
Ie.value ? ie("", !0) : (S(), I("button", {
|
|
32347
32358
|
key: 1,
|
|
32348
32359
|
type: "button",
|
|
32349
32360
|
class: "chat-settings-panel__secondary chat-settings-panel__secondary--wide",
|
|
@@ -32351,14 +32362,14 @@ ${v}` : u.businessGroupName;
|
|
|
32351
32362
|
onClick: Va,
|
|
32352
32363
|
"data-i18n": "FAC.546b1787576218251"
|
|
32353
32364
|
}, N(M(p)("FAC.546b1787576218251")), 1)),
|
|
32354
|
-
|
|
32365
|
+
Ie.value ? (S(), I(ra, { key: 2 }, [
|
|
32355
32366
|
x("button", {
|
|
32356
32367
|
type: "button",
|
|
32357
32368
|
class: "chat-settings-panel__secondary",
|
|
32358
32369
|
"data-testid": "chat-settings-auto-arrange",
|
|
32359
32370
|
onClick: g[8] || (g[8] = (_) => d("auto-arrange"))
|
|
32360
32371
|
}, [
|
|
32361
|
-
|
|
32372
|
+
ma(M(km)),
|
|
32362
32373
|
x("span", YC, N(M(p)("FAC.12b11787576240462")), 1)
|
|
32363
32374
|
]),
|
|
32364
32375
|
x("button", {
|
|
@@ -32368,7 +32379,7 @@ ${v}` : u.businessGroupName;
|
|
|
32368
32379
|
disabled: re.value,
|
|
32369
32380
|
onClick: ja
|
|
32370
32381
|
}, [
|
|
32371
|
-
re.value ? (S(), I(
|
|
32382
|
+
re.value ? (S(), I(ra, { key: 0 }, [
|
|
32372
32383
|
x("span", JC, N(M(p)("FAC.06e61787576268855")), 1),
|
|
32373
32384
|
g[18] || (g[18] = x("span", {
|
|
32374
32385
|
class: "chat-saving-dots",
|
|
@@ -32390,10 +32401,10 @@ ${v}` : u.businessGroupName;
|
|
|
32390
32401
|
"data-i18n-aria-label": "FAC.b1ea1787576240860",
|
|
32391
32402
|
"aria-label": M(p)("FAC.b1ea1787576240860")
|
|
32392
32403
|
}, [
|
|
32393
|
-
(S(), I(
|
|
32404
|
+
(S(), I(ra, null, Ca(Qa, (_) => x("button", {
|
|
32394
32405
|
key: _.id,
|
|
32395
32406
|
type: "button",
|
|
32396
|
-
class:
|
|
32407
|
+
class: ia(["chat-settings-panel__persona-option", {
|
|
32397
32408
|
"chat-settings-panel__persona-option--active": e.assistantPersonaKey === _.id
|
|
32398
32409
|
}]),
|
|
32399
32410
|
"aria-selected": e.assistantPersonaKey === _.id,
|
|
@@ -32407,18 +32418,18 @@ ${v}` : u.businessGroupName;
|
|
|
32407
32418
|
], 8, OC))
|
|
32408
32419
|
]),
|
|
32409
32420
|
me.value === "chat" ? (S(), I("div", i8, [
|
|
32410
|
-
|
|
32421
|
+
Be.value ? (S(), Xa(Q1, {
|
|
32411
32422
|
key: 0,
|
|
32412
|
-
plan:
|
|
32423
|
+
plan: Be.value
|
|
32413
32424
|
}, null, 8, ["plan"])) : ie("", !0),
|
|
32414
|
-
|
|
32425
|
+
ma(D1, {
|
|
32415
32426
|
ref_key: "senderRef",
|
|
32416
|
-
ref:
|
|
32427
|
+
ref: Ke,
|
|
32417
32428
|
"business-group-error": n.businessGroupError,
|
|
32418
32429
|
"business-group-loading": n.businessGroupLoading,
|
|
32419
32430
|
"business-groups": n.businessGroups,
|
|
32420
32431
|
loading: M(z),
|
|
32421
|
-
placeholder:
|
|
32432
|
+
placeholder: ga.value,
|
|
32422
32433
|
"route-images-as-attachments": n.routeImagesAsAttachments,
|
|
32423
32434
|
"selected-business-group": n.selectedBusinessGroup,
|
|
32424
32435
|
onBusinessGroupClear: g[9] || (g[9] = (_) => d("business-group-clear")),
|
|
@@ -32431,7 +32442,7 @@ ${v}` : u.businessGroupName;
|
|
|
32431
32442
|
onAttachments: Zt
|
|
32432
32443
|
}, {
|
|
32433
32444
|
history: ks(() => [
|
|
32434
|
-
|
|
32445
|
+
ma(L1, {
|
|
32435
32446
|
usage: M(A).contextUsage.value,
|
|
32436
32447
|
loading: M(A).isCompacting.value,
|
|
32437
32448
|
disabled: M(z),
|
|
@@ -32487,17 +32498,17 @@ ${v}` : u.businessGroupName;
|
|
|
32487
32498
|
x("div", u8, [
|
|
32488
32499
|
x("button", {
|
|
32489
32500
|
class: "delete-modal__btn delete-modal__btn--cancel",
|
|
32490
|
-
disabled:
|
|
32501
|
+
disabled: q.value,
|
|
32491
32502
|
"data-testid": "delete-conversation-cancel",
|
|
32492
32503
|
onClick: Ee,
|
|
32493
32504
|
"data-i18n": "FAC.36c91787576289774"
|
|
32494
32505
|
}, N(M(p)("FAC.36c91787576289774")), 9, h8),
|
|
32495
32506
|
x("button", {
|
|
32496
32507
|
class: "delete-modal__btn delete-modal__btn--danger",
|
|
32497
|
-
disabled:
|
|
32508
|
+
disabled: q.value,
|
|
32498
32509
|
"data-testid": "delete-conversation-confirm",
|
|
32499
|
-
onClick:
|
|
32500
|
-
}, N(
|
|
32510
|
+
onClick: Oe
|
|
32511
|
+
}, N(q.value ? M(p)("FAC.a3d91787576202584") : M(p)("FAC.de191787576241322")), 9, y8)
|
|
32501
32512
|
])
|
|
32502
32513
|
])
|
|
32503
32514
|
])) : ie("", !0)
|