@sisense/sdk-ui-preact 2.25.0 → 2.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai.cjs +60 -60
- package/dist/ai.js +386 -392
- package/dist/{compat.module-f95af47d.js → compat.module-21d68a36.js} +2 -2
- package/dist/{compat.module-b324511a.cjs → compat.module-6709d39c.cjs} +1 -1
- package/dist/index.cjs +391 -391
- package/dist/index.js +10657 -10552
- package/dist/preact/compat.cjs +1 -1
- package/dist/preact/compat.js +1 -1
- package/dist/use-hover-B1HPf4hF-a1eb5d7a.cjs +899 -0
- package/dist/{use-hover-mptQLQ4S-feb781c7.js → use-hover-B1HPf4hF-b2b3fe1e.js} +25398 -25199
- package/package.json +3 -3
- package/dist/use-hover-mptQLQ4S-fa13b5dc.cjs +0 -910
package/dist/ai.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as rt,
|
|
2
|
-
import { D as ba, M as xa, T as R, q as z, d as Z, y as we, A as be, x as yt, _ as
|
|
1
|
+
import { E as rt, x as ia, j as ur, w as gr, k as hr, P as mr, a as fr, L as kr, u as br, b as Te, c as Ne, S as oa, d as xr, l as yr, y as G, e as wr, f as Le, z as kt, g as Ye, D as _r, h as De, V as jt, T as Cr, i as sa, m as vr, O as Sr, B as na, n as la, o as C, p as q, A as Mr, q as Je, r as Ir, H as Dr, s as ke, t as ca, v as Ar, _ as f, C as da, M as pa, F as ua, G as A, I as o, J as j, K as B, N as ga, Q as ha, R as ye, W as bt, U as v, X as Lr, Y as Tr, Z as Nr, $ as Ce, a0 as it, a1 as jr, a2 as zr, a3 as Or, a4 as Er, a5 as Ae, a6 as ma, a7 as xt, a8 as ze, a9 as Rr, aa as zt, ab as Zr, ac as Wr, ad as $r, ae as qr, af as fa, ag as Pr, ah as Gr, ai as Hr, aj as Br, ak as Yr, al as Ur, am as Qr, an as Fr, ao as Vr, ap as Jr, aq as Xr, ar as Kr, as as ei, at as ti, au as ai, av as ka, aw as ri, ax as ii, ay as oi, az as si, aA as ni } from "./use-hover-B1HPf4hF-b2b3fe1e.js";
|
|
2
|
+
import { D as ba, M as xa, T as R, q as z, d as Z, y as we, A as be, x as yt, _ as Ue, a as li } from "./compat.module-21d68a36.js";
|
|
3
3
|
import { jsx as ve } from "./preact/jsx-runtime.js";
|
|
4
4
|
import { K as Xe, _ as ci } from "./preact.module-d1297d7b.js";
|
|
5
5
|
import "./index-D7mHzfx0-e61bcbf5.js";
|
|
@@ -1014,7 +1014,7 @@ const Ei = {
|
|
|
1014
1014
|
}
|
|
1015
1015
|
}, Bi = {
|
|
1016
1016
|
mapType: "world"
|
|
1017
|
-
},
|
|
1017
|
+
}, Yi = {
|
|
1018
1018
|
subtype: "boxplot/full",
|
|
1019
1019
|
legend: {
|
|
1020
1020
|
enabled: !0,
|
|
@@ -1066,10 +1066,10 @@ const Ei = {
|
|
|
1066
1066
|
enabled: !0
|
|
1067
1067
|
}
|
|
1068
1068
|
};
|
|
1069
|
-
function
|
|
1069
|
+
function Ui(e) {
|
|
1070
1070
|
switch (e) {
|
|
1071
1071
|
case "indicator":
|
|
1072
|
-
return
|
|
1072
|
+
return G(Ai);
|
|
1073
1073
|
case "line":
|
|
1074
1074
|
return Se(Ti);
|
|
1075
1075
|
case "area":
|
|
@@ -1081,27 +1081,27 @@ function Yi(e) {
|
|
|
1081
1081
|
case "polar":
|
|
1082
1082
|
return Se(Oi);
|
|
1083
1083
|
case "pie":
|
|
1084
|
-
return
|
|
1084
|
+
return G(Ei);
|
|
1085
1085
|
case "funnel":
|
|
1086
|
-
return
|
|
1086
|
+
return G(Ri);
|
|
1087
1087
|
case "treemap":
|
|
1088
|
-
return
|
|
1088
|
+
return G(Wi);
|
|
1089
1089
|
case "calendar-heatmap":
|
|
1090
|
-
return
|
|
1090
|
+
return G($i);
|
|
1091
1091
|
case "sunburst":
|
|
1092
|
-
return
|
|
1092
|
+
return G(qi);
|
|
1093
1093
|
case "scatter":
|
|
1094
|
-
return
|
|
1094
|
+
return G(Pi);
|
|
1095
1095
|
case "scattermap":
|
|
1096
|
-
return
|
|
1096
|
+
return G(Hi);
|
|
1097
1097
|
case "areamap":
|
|
1098
|
-
return
|
|
1098
|
+
return G(Bi);
|
|
1099
1099
|
case "boxplot":
|
|
1100
|
-
return
|
|
1100
|
+
return G(Yi);
|
|
1101
1101
|
case "table":
|
|
1102
|
-
return
|
|
1102
|
+
return G(Gi);
|
|
1103
1103
|
case "pivot":
|
|
1104
|
-
return
|
|
1104
|
+
return G(Zi);
|
|
1105
1105
|
case "pivot2":
|
|
1106
1106
|
return {};
|
|
1107
1107
|
case "image":
|
|
@@ -1175,7 +1175,7 @@ function wt(e, t) {
|
|
|
1175
1175
|
function Rt(e, t) {
|
|
1176
1176
|
if (!e || Object.keys(e).length === 0)
|
|
1177
1177
|
return {};
|
|
1178
|
-
const a =
|
|
1178
|
+
const a = Ui(t);
|
|
1179
1179
|
if (kt(e, a))
|
|
1180
1180
|
return {};
|
|
1181
1181
|
const r = wt(e, a);
|
|
@@ -1336,8 +1336,8 @@ const lo = (e) => {
|
|
|
1336
1336
|
const r = e.reduce((n, l) => (n[l.jaql.title] = l, n), {}), i = Object.entries(a).reduce((n, l) => {
|
|
1337
1337
|
const [u, d] = l;
|
|
1338
1338
|
return n[`${u}`] = Array.isArray(d) ? d.map((m) => {
|
|
1339
|
-
var k,
|
|
1340
|
-
const s =
|
|
1339
|
+
var k, x;
|
|
1340
|
+
const s = Ye(m);
|
|
1341
1341
|
delete s.enabled;
|
|
1342
1342
|
const p = r[s.column.name];
|
|
1343
1343
|
if (!p)
|
|
@@ -1353,11 +1353,11 @@ const lo = (e) => {
|
|
|
1353
1353
|
column: c
|
|
1354
1354
|
});
|
|
1355
1355
|
if (_r(c.type)) {
|
|
1356
|
-
const
|
|
1357
|
-
if (
|
|
1356
|
+
const h = (x = (k = p.format) == null ? void 0 : k.mask) == null ? void 0 : x[p.jaql.level];
|
|
1357
|
+
if (h)
|
|
1358
1358
|
return re(N({}, s), {
|
|
1359
1359
|
column: c,
|
|
1360
|
-
dateFormat:
|
|
1360
|
+
dateFormat: h
|
|
1361
1361
|
});
|
|
1362
1362
|
}
|
|
1363
1363
|
return re(N({}, s), {
|
|
@@ -1395,10 +1395,10 @@ const lo = (e) => {
|
|
|
1395
1395
|
}
|
|
1396
1396
|
}, Ht = (e, t) => {
|
|
1397
1397
|
var a, r, i, n;
|
|
1398
|
-
return t === "x" ? (r = (a = e.category) != null ? a : e.x) == null ? void 0 : r.map((l) =>
|
|
1398
|
+
return t === "x" ? (r = (a = e.category) != null ? a : e.x) == null ? void 0 : r.map((l) => Ye(l).column.name).join(", ") : (n = (i = e.value) != null ? i : e.y) == null ? void 0 : n.map((l) => Ye(l).column.name).join(", ");
|
|
1399
1399
|
}, Bt = (e, t) => {
|
|
1400
1400
|
var a;
|
|
1401
|
-
return (a = e[t]) == null ? void 0 : a.map((r) =>
|
|
1401
|
+
return (a = e[t]) == null ? void 0 : a.map((r) => Ye(r).column.name).join(", ");
|
|
1402
1402
|
}, go = (e, t, a, r) => {
|
|
1403
1403
|
let i;
|
|
1404
1404
|
if (r && e in Gt)
|
|
@@ -1453,8 +1453,8 @@ const lo = (e) => {
|
|
|
1453
1453
|
chartFamily: "table",
|
|
1454
1454
|
axesMapping: {}
|
|
1455
1455
|
}, fo = (e) => e.map((t) => yr(t.jaql)), ko = (e) => e.reduce((t, a) => {
|
|
1456
|
-
if ((a.panel === "scope" || a.jaql.filter) && t.metadataFilters.push(
|
|
1457
|
-
const r =
|
|
1456
|
+
if ((a.panel === "scope" || a.jaql.filter) && t.metadataFilters.push(G(a)), a.panel !== "scope") {
|
|
1457
|
+
const r = G(a);
|
|
1458
1458
|
delete r.jaql.filter, t.metadataColumns.push(r);
|
|
1459
1459
|
}
|
|
1460
1460
|
return t;
|
|
@@ -1475,11 +1475,11 @@ const lo = (e) => {
|
|
|
1475
1475
|
datasource: u
|
|
1476
1476
|
} = r, d = re(N({}, u), {
|
|
1477
1477
|
type: u.type || "elasticube"
|
|
1478
|
-
}), m = kr(d), k = lo(l).map((
|
|
1479
|
-
jaql: re(N({},
|
|
1478
|
+
}), m = kr(d), k = lo(l).map((S) => Ii(S)).map((S) => re(N({}, S), {
|
|
1479
|
+
jaql: re(N({}, S.jaql), {
|
|
1480
1480
|
datasource: m
|
|
1481
1481
|
})
|
|
1482
|
-
})),
|
|
1482
|
+
})), x = mo(i), s = x.chartType.toLowerCase(), p = {
|
|
1483
1483
|
cornerRadius: "Small",
|
|
1484
1484
|
header: {
|
|
1485
1485
|
// remove info button and render empty toolbar instead
|
|
@@ -1487,19 +1487,19 @@ const lo = (e) => {
|
|
|
1487
1487
|
}
|
|
1488
1488
|
}, {
|
|
1489
1489
|
metadataColumns: c,
|
|
1490
|
-
metadataFilters:
|
|
1491
|
-
} = ko(k),
|
|
1492
|
-
dataOptions:
|
|
1490
|
+
metadataFilters: h
|
|
1491
|
+
} = ko(k), g = fo(h), {
|
|
1492
|
+
dataOptions: b,
|
|
1493
1493
|
chartStyleOptions: _
|
|
1494
|
-
} = ho(c,
|
|
1494
|
+
} = ho(c, x, a), y = N(N({}, _), p);
|
|
1495
1495
|
return {
|
|
1496
1496
|
widgetType: "chart",
|
|
1497
1497
|
id: n,
|
|
1498
1498
|
title: n,
|
|
1499
1499
|
chartType: s,
|
|
1500
1500
|
dataSource: d,
|
|
1501
|
-
dataOptions:
|
|
1502
|
-
filters:
|
|
1501
|
+
dataOptions: b,
|
|
1502
|
+
filters: g,
|
|
1503
1503
|
styleOptions: y
|
|
1504
1504
|
};
|
|
1505
1505
|
} catch (a) {
|
|
@@ -1518,7 +1518,7 @@ var yo = Object.defineProperty, wo = Object.defineProperties, _o = Object.getOwn
|
|
|
1518
1518
|
configurable: !0,
|
|
1519
1519
|
writable: !0,
|
|
1520
1520
|
value: a
|
|
1521
|
-
}) : e[t] = a,
|
|
1521
|
+
}) : e[t] = a, I = (e, t) => {
|
|
1522
1522
|
for (var a in t || (t = {}))
|
|
1523
1523
|
Ia.call(t, a) && ut(e, a, t[a]);
|
|
1524
1524
|
if (Fe)
|
|
@@ -1533,7 +1533,7 @@ var yo = Object.defineProperty, wo = Object.defineProperties, _o = Object.getOwn
|
|
|
1533
1533
|
for (var r of Fe(e))
|
|
1534
1534
|
t.indexOf(r) < 0 && Da.call(e, r) && (a[r] = e[r]);
|
|
1535
1535
|
return a;
|
|
1536
|
-
},
|
|
1536
|
+
}, H = (e, t, a) => ut(e, typeof t != "symbol" ? t + "" : t, a), se = (e, t, a) => new Promise((r, i) => {
|
|
1537
1537
|
var n = (d) => {
|
|
1538
1538
|
try {
|
|
1539
1539
|
u(a.next(d));
|
|
@@ -1587,12 +1587,12 @@ class Co extends Qr {
|
|
|
1587
1587
|
});
|
|
1588
1588
|
}
|
|
1589
1589
|
mutate(t, a) {
|
|
1590
|
-
return this.mutateOptions = a, this.currentMutation && this.currentMutation.removeObserver(this), this.currentMutation = this.client.getMutationCache().build(this.client, T(
|
|
1590
|
+
return this.mutateOptions = a, this.currentMutation && this.currentMutation.removeObserver(this), this.currentMutation = this.client.getMutationCache().build(this.client, T(I({}, this.options), {
|
|
1591
1591
|
variables: typeof t < "u" ? t : this.options.variables
|
|
1592
1592
|
})), this.currentMutation.addObserver(this), this.currentMutation.execute();
|
|
1593
1593
|
}
|
|
1594
1594
|
updateResult() {
|
|
1595
|
-
const t = this.currentMutation ? this.currentMutation.state : Vr(), a = t.status === "loading", r = T(
|
|
1595
|
+
const t = this.currentMutation ? this.currentMutation.state : Vr(), a = t.status === "loading", r = T(I({}, t), {
|
|
1596
1596
|
isLoading: a,
|
|
1597
1597
|
isPending: a,
|
|
1598
1598
|
isSuccess: t.status === "success",
|
|
@@ -1634,7 +1634,7 @@ function _t(e, t, a) {
|
|
|
1634
1634
|
}, [n]);
|
|
1635
1635
|
if (l.error && Pr(n.options.useErrorBoundary, [l.error]))
|
|
1636
1636
|
throw l.error;
|
|
1637
|
-
return T(
|
|
1637
|
+
return T(I({}, l), {
|
|
1638
1638
|
mutate: u,
|
|
1639
1639
|
mutateAsync: l.mutate
|
|
1640
1640
|
});
|
|
@@ -1648,7 +1648,7 @@ const La = Xe({}), So = () => yt(La), Ta = ({
|
|
|
1648
1648
|
var d;
|
|
1649
1649
|
return `${l}_${(d = u == null ? void 0 : u.dashboardId) != null ? d : ""}`;
|
|
1650
1650
|
}, []), i = z((l, u, d) => {
|
|
1651
|
-
a((m) => T(
|
|
1651
|
+
a((m) => T(I({}, m), {
|
|
1652
1652
|
[r(u, d)]: l
|
|
1653
1653
|
}));
|
|
1654
1654
|
}, [r]), n = z((l, u) => t[r(l, u)], [t, r]);
|
|
@@ -1661,21 +1661,18 @@ const La = Xe({}), So = () => yt(La), Ta = ({
|
|
|
1661
1661
|
});
|
|
1662
1662
|
};
|
|
1663
1663
|
class Mo {
|
|
1664
|
-
constructor(t, a = !1
|
|
1665
|
-
|
|
1664
|
+
constructor(t, a = !1) {
|
|
1665
|
+
H(this, "httpClient"), H(this, "getChatContexts", () => se(this, null, function* () {
|
|
1666
1666
|
return (yield this.httpClient.get("api/datasources//")) || [];
|
|
1667
|
-
})),
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
})), q(this, "getQueryRecommendations", (n, l) => this.httpClient.get(`api/v2/ai/recommendations/query/${n}/${l.numOfRecommendations}${l.userPrompt ? "?userPrompt=" + encodeURIComponent(l.userPrompt) : ""}`)), q(this, "getNlqResult", (n, l) => this.httpClient.post(`api/v2/ai/nlq/query/${n}`, l)), q(this, "setLlmConfig", (n) => this.httpClient.post("api/v2/settings/ai/llmProvider", n).catch((l) => {
|
|
1671
|
-
console.error("Unable to set llm config", l);
|
|
1672
|
-
})), q(this, "getAllChats", () => se(this, null, function* () {
|
|
1667
|
+
})), H(this, "getNlgInsights", (r, i) => xt(this.httpClient, r, i)), H(this, "getQueryRecommendations", (r, i) => this.httpClient.get(`api/v2/ai/recommendations/query/${r}/${i.numOfRecommendations}${i.userPrompt ? "?userPrompt=" + encodeURIComponent(i.userPrompt) : ""}`)), H(this, "getNlqResult", (r, i) => this.httpClient.post(`api/v2/ai/nlq/query/${r}`, i)), H(this, "setLlmConfig", (r) => this.httpClient.post("api/v2/settings/ai/llmProvider", r).catch((i) => {
|
|
1668
|
+
console.error("Unable to set llm config", i);
|
|
1669
|
+
})), H(this, "getAllChats", () => se(this, null, function* () {
|
|
1673
1670
|
return this.volatile ? [] : this.httpClient.get("api/v2/ai/chats");
|
|
1674
|
-
})),
|
|
1675
|
-
sourceId:
|
|
1671
|
+
})), H(this, "getChatById", (r) => this.httpClient.get(`api/v2/ai/chats/${r}`)), H(this, "createChat", (r, i) => this.httpClient.post("api/v2/ai/chats", {
|
|
1672
|
+
sourceId: r,
|
|
1676
1673
|
volatile: this.volatile,
|
|
1677
|
-
contextDetails:
|
|
1678
|
-
})),
|
|
1674
|
+
contextDetails: i
|
|
1675
|
+
})), H(this, "postChat", (r, i) => this.httpClient.post(`api/v2/ai/chats/${r}`, i)), H(this, "deleteChatHistory", (r) => this.httpClient.delete(`api/v2/ai/chats/${r}/history`)), H(this, "sendFeedback", (r) => this.httpClient.post("api/v2/ai/feedback", r)), H(this, "ai", {
|
|
1679
1676
|
getNlgInsights: this.getNlgInsights,
|
|
1680
1677
|
getNlqResult: this.getNlqResult,
|
|
1681
1678
|
getQueryRecommendations: this.getQueryRecommendations,
|
|
@@ -1688,7 +1685,7 @@ class Mo {
|
|
|
1688
1685
|
post: this.postChat,
|
|
1689
1686
|
clearHistory: this.deleteChatHistory
|
|
1690
1687
|
}
|
|
1691
|
-
}), this.volatile = a, this.httpClient = t
|
|
1688
|
+
}), this.volatile = a, this.httpClient = t;
|
|
1692
1689
|
}
|
|
1693
1690
|
}
|
|
1694
1691
|
const Io = new la({
|
|
@@ -1704,10 +1701,7 @@ const Io = new la({
|
|
|
1704
1701
|
}) => {
|
|
1705
1702
|
const {
|
|
1706
1703
|
app: a
|
|
1707
|
-
} = ga(), r = R(() =>
|
|
1708
|
-
var i, n;
|
|
1709
|
-
return a ? new Mo(a.httpClient, t, (i = a.settings) == null ? void 0 : i.isUnifiedNarrationEnabled, (n = a.settings) == null ? void 0 : n.isSisenseAiEnabled) : void 0;
|
|
1710
|
-
}, [a, t]);
|
|
1704
|
+
} = ga(), r = R(() => a ? new Mo(a.httpClient, t) : void 0, [a, t]);
|
|
1711
1705
|
return /* @__PURE__ */ o(Ct.Provider, {
|
|
1712
1706
|
value: r,
|
|
1713
1707
|
children: /* @__PURE__ */ o(ma, {
|
|
@@ -1728,40 +1722,40 @@ function ic({
|
|
|
1728
1722
|
});
|
|
1729
1723
|
}
|
|
1730
1724
|
const Ke = (e, t = !0) => {
|
|
1731
|
-
var a, r;
|
|
1725
|
+
var a, r, i, n;
|
|
1732
1726
|
const {
|
|
1733
|
-
app:
|
|
1734
|
-
} = ga(),
|
|
1735
|
-
var
|
|
1727
|
+
app: l
|
|
1728
|
+
} = ga(), u = l == null ? void 0 : l.httpClient, d = R(() => {
|
|
1729
|
+
var g, b, _, y, S, D;
|
|
1736
1730
|
return {
|
|
1737
|
-
|
|
1738
|
-
isSisenseAiEnabled: (
|
|
1731
|
+
isUnified: (_ = (b = (g = l == null ? void 0 : l.settings) == null ? void 0 : g.narrative) == null ? void 0 : b.isUnified) != null ? _ : !1,
|
|
1732
|
+
isSisenseAiEnabled: (D = (S = (y = l == null ? void 0 : l.settings) == null ? void 0 : y.narrative) == null ? void 0 : S.isSisenseAiEnabled) != null ? D : !1
|
|
1739
1733
|
};
|
|
1740
|
-
}, [(a =
|
|
1741
|
-
data:
|
|
1742
|
-
error:
|
|
1743
|
-
isError:
|
|
1744
|
-
isLoading:
|
|
1745
|
-
isSuccess:
|
|
1746
|
-
refetch:
|
|
1734
|
+
}, [(r = (a = l == null ? void 0 : l.settings) == null ? void 0 : a.narrative) == null ? void 0 : r.isUnified, (n = (i = l == null ? void 0 : l.settings) == null ? void 0 : i.narrative) == null ? void 0 : n.isSisenseAiEnabled]), m = R(() => ha(e), [e]), {
|
|
1735
|
+
data: k,
|
|
1736
|
+
error: x,
|
|
1737
|
+
isError: s,
|
|
1738
|
+
isLoading: p,
|
|
1739
|
+
isSuccess: c,
|
|
1740
|
+
refetch: h
|
|
1747
1741
|
} = ye({
|
|
1748
|
-
queryKey: ["narrative",
|
|
1749
|
-
queryFn: () =>
|
|
1750
|
-
select: (
|
|
1751
|
-
var
|
|
1752
|
-
return (
|
|
1742
|
+
queryKey: ["narrative", m, d],
|
|
1743
|
+
queryFn: () => u ? xt(u, m, d) : Promise.reject(new Error("HttpClient is required for narrative requests")),
|
|
1744
|
+
select: (g) => {
|
|
1745
|
+
var b;
|
|
1746
|
+
return (b = g == null ? void 0 : g.data) == null ? void 0 : b.answer;
|
|
1753
1747
|
},
|
|
1754
1748
|
enabled: t
|
|
1755
1749
|
});
|
|
1756
1750
|
return {
|
|
1757
|
-
isLoading:
|
|
1758
|
-
isError:
|
|
1759
|
-
isSuccess:
|
|
1760
|
-
data:
|
|
1761
|
-
error:
|
|
1751
|
+
isLoading: p,
|
|
1752
|
+
isError: s,
|
|
1753
|
+
isSuccess: c,
|
|
1754
|
+
data: k,
|
|
1755
|
+
error: x,
|
|
1762
1756
|
refetch: z(() => {
|
|
1763
|
-
|
|
1764
|
-
}, [
|
|
1757
|
+
h();
|
|
1758
|
+
}, [h])
|
|
1765
1759
|
};
|
|
1766
1760
|
}, Ao = (e) => {
|
|
1767
1761
|
const t = e, {
|
|
@@ -1812,7 +1806,7 @@ const No = (e) => {
|
|
|
1812
1806
|
refetch: k
|
|
1813
1807
|
} = ye({
|
|
1814
1808
|
queryKey: i,
|
|
1815
|
-
queryFn: () => r ? To(e, r).then((
|
|
1809
|
+
queryFn: () => r ? To(e, r).then((x) => x.widgetProps) : Promise.reject("No API available"),
|
|
1816
1810
|
enabled: !!r && e.enabled
|
|
1817
1811
|
});
|
|
1818
1812
|
return {
|
|
@@ -1835,28 +1829,28 @@ const No = (e) => {
|
|
|
1835
1829
|
} = e, l = ne(), u = a ?? jo, d = (i === void 0 || i === !0) && u > 0, {
|
|
1836
1830
|
isLoading: m,
|
|
1837
1831
|
isError: k,
|
|
1838
|
-
isSuccess:
|
|
1832
|
+
isSuccess: x,
|
|
1839
1833
|
data: s,
|
|
1840
1834
|
error: p,
|
|
1841
1835
|
refetch: c
|
|
1842
1836
|
} = ye({
|
|
1843
1837
|
queryKey: ["getQueryRecommendations", t, u, l],
|
|
1844
|
-
queryFn: () => l == null ? void 0 : l.ai.getQueryRecommendations(t,
|
|
1838
|
+
queryFn: () => l == null ? void 0 : l.ai.getQueryRecommendations(t, I({
|
|
1845
1839
|
numOfRecommendations: u
|
|
1846
1840
|
}, n ? {
|
|
1847
1841
|
userPrompt: n
|
|
1848
1842
|
} : null)),
|
|
1849
1843
|
enabled: !!l && d
|
|
1850
|
-
}),
|
|
1851
|
-
widgetProps:
|
|
1844
|
+
}), h = R(() => s == null ? void 0 : s.map((g) => T(I({}, g), {
|
|
1845
|
+
widgetProps: g.jaql ? Oe(g, {
|
|
1852
1846
|
useCustomizedStyleOptions: r
|
|
1853
1847
|
}) : void 0
|
|
1854
1848
|
})), [s, r]);
|
|
1855
1849
|
return {
|
|
1856
1850
|
isLoading: d ? m : !1,
|
|
1857
1851
|
isError: k,
|
|
1858
|
-
isSuccess:
|
|
1859
|
-
data:
|
|
1852
|
+
isSuccess: x,
|
|
1853
|
+
data: h ?? void 0,
|
|
1860
1854
|
error: p,
|
|
1861
1855
|
refetch: z(() => {
|
|
1862
1856
|
c();
|
|
@@ -1868,13 +1862,13 @@ const No = (e) => {
|
|
|
1868
1862
|
enableInsights: !0,
|
|
1869
1863
|
numOfRecommendations: 4,
|
|
1870
1864
|
numOfRecentPrompts: 5
|
|
1871
|
-
}), Oa = Xe(
|
|
1865
|
+
}), Oa = Xe(I({}, za)), le = () => yt(Oa), zo = ({
|
|
1872
1866
|
children: e,
|
|
1873
1867
|
value: t
|
|
1874
1868
|
}) => {
|
|
1875
1869
|
const {
|
|
1876
1870
|
t: a
|
|
1877
|
-
} = j(), r = Object.entries(t).reduce((i, [n, l]) => (l !== void 0 && (i[n] = l), i), T(
|
|
1871
|
+
} = j(), r = Object.entries(t).reduce((i, [n, l]) => (l !== void 0 && (i[n] = l), i), T(I({}, za), {
|
|
1878
1872
|
inputPromptText: a("ai.config.inputPromptText"),
|
|
1879
1873
|
welcomeText: a("ai.config.welcomeText"),
|
|
1880
1874
|
suggestionsWelcomeText: a("ai.config.suggestionsWelcomeText")
|
|
@@ -2035,9 +2029,9 @@ const No = (e) => {
|
|
|
2035
2029
|
const {
|
|
2036
2030
|
data: i,
|
|
2037
2031
|
isLoading: n
|
|
2038
|
-
} = Ro(), l = So(), u = l.getChatId(e, t) || ((r = i.find((
|
|
2032
|
+
} = Ro(), l = So(), u = l.getChatId(e, t) || ((r = i.find((x) => {
|
|
2039
2033
|
var s;
|
|
2040
|
-
return
|
|
2034
|
+
return x.contextTitle === e && ((s = x.contextDetails) == null ? void 0 : s.dashboardId) === (t == null ? void 0 : t.dashboardId);
|
|
2041
2035
|
})) == null ? void 0 : r.chatId), {
|
|
2042
2036
|
isError: d,
|
|
2043
2037
|
data: m,
|
|
@@ -2074,14 +2068,14 @@ const No = (e) => {
|
|
|
2074
2068
|
n ? u(new Te("ai.errors.chatUnavailable")) : k && u(new Te("ai.errors.fetchHistory"));
|
|
2075
2069
|
}, [n, k, a]);
|
|
2076
2070
|
const {
|
|
2077
|
-
mutate:
|
|
2071
|
+
mutate: x,
|
|
2078
2072
|
isLoading: s
|
|
2079
2073
|
} = $o(i, r), p = Ra(d);
|
|
2080
2074
|
return {
|
|
2081
2075
|
chatId: i,
|
|
2082
2076
|
history: d ?? [],
|
|
2083
2077
|
lastNlqResponse: p,
|
|
2084
|
-
sendMessage:
|
|
2078
|
+
sendMessage: x,
|
|
2085
2079
|
isAwaitingResponse: s,
|
|
2086
2080
|
isLoading: m,
|
|
2087
2081
|
lastError: l
|
|
@@ -2113,7 +2107,7 @@ const No = (e) => {
|
|
|
2113
2107
|
}
|
|
2114
2108
|
return null;
|
|
2115
2109
|
}, [r]);
|
|
2116
|
-
}, Go = 500, Ho = 500, Bo = 500,
|
|
2110
|
+
}, Go = 500, Ho = 500, Bo = 500, Yo = 900, Uo = C.div`
|
|
2117
2111
|
box-sizing: border-box;
|
|
2118
2112
|
position: relative;
|
|
2119
2113
|
display: flex;
|
|
@@ -2131,14 +2125,14 @@ const No = (e) => {
|
|
|
2131
2125
|
min-height: ${Ho}px;
|
|
2132
2126
|
width: ${({
|
|
2133
2127
|
width: e
|
|
2134
|
-
}) => e ?
|
|
2128
|
+
}) => e ? Yt(e) : `${Bo}px`};
|
|
2135
2129
|
height: ${({
|
|
2136
2130
|
height: e
|
|
2137
|
-
}) => e ?
|
|
2131
|
+
}) => e ? Yt(e) : `${Yo}px`};
|
|
2138
2132
|
|
|
2139
2133
|
${({
|
|
2140
2134
|
theme: e
|
|
2141
|
-
}) =>
|
|
2135
|
+
}) => q`
|
|
2142
2136
|
font-size: ${e.aiChat.primaryFontSize[0]};
|
|
2143
2137
|
line-height: ${e.aiChat.primaryFontSize[1]};
|
|
2144
2138
|
`}
|
|
@@ -2146,7 +2140,7 @@ const No = (e) => {
|
|
|
2146
2140
|
theme: e
|
|
2147
2141
|
}) => e.aiChat.border === !1 ? "none" : e.aiChat.border};
|
|
2148
2142
|
`;
|
|
2149
|
-
function
|
|
2143
|
+
function Yt(e) {
|
|
2150
2144
|
return typeof e == "number" ? `${e}px` : e;
|
|
2151
2145
|
}
|
|
2152
2146
|
function Qo({
|
|
@@ -2258,7 +2252,7 @@ function es({
|
|
|
2258
2252
|
}) {
|
|
2259
2253
|
const [i, n] = Z(!1), {
|
|
2260
2254
|
themeSettings: l
|
|
2261
|
-
} =
|
|
2255
|
+
} = A();
|
|
2262
2256
|
return /* @__PURE__ */ v(Jo, {
|
|
2263
2257
|
children: [/* @__PURE__ */ o(Xo, {
|
|
2264
2258
|
onClick: () => n((u) => !u),
|
|
@@ -2324,9 +2318,9 @@ function rs({
|
|
|
2324
2318
|
title: "/ai recommendations",
|
|
2325
2319
|
items: t,
|
|
2326
2320
|
onSelect: r
|
|
2327
|
-
}].filter((
|
|
2321
|
+
}].filter((x) => x.title.slice(0, n.length) === n), {
|
|
2328
2322
|
themeSettings: d
|
|
2329
|
-
} =
|
|
2323
|
+
} = A(), {
|
|
2330
2324
|
t: m
|
|
2331
2325
|
} = j(), k = u.length === 1;
|
|
2332
2326
|
return /* @__PURE__ */ o(ka, {
|
|
@@ -2347,9 +2341,9 @@ function rs({
|
|
|
2347
2341
|
width: i == null ? void 0 : i.offsetWidth
|
|
2348
2342
|
},
|
|
2349
2343
|
theme: d,
|
|
2350
|
-
children: [a && /* @__PURE__ */ o(et, {}), !a && !l && u.map((
|
|
2344
|
+
children: [a && /* @__PURE__ */ o(et, {}), !a && !l && u.map((x) => /* @__PURE__ */ o(es, T(I({}, x), {
|
|
2351
2345
|
alwaysExpanded: k
|
|
2352
|
-
}),
|
|
2346
|
+
}), x.title)), l && /* @__PURE__ */ o(as, {
|
|
2353
2347
|
theme: d,
|
|
2354
2348
|
children: m("ai.errors.recommendationsNotAvailable")
|
|
2355
2349
|
})]
|
|
@@ -2364,7 +2358,7 @@ function Ee({
|
|
|
2364
2358
|
}) {
|
|
2365
2359
|
const {
|
|
2366
2360
|
themeSettings: r
|
|
2367
|
-
} =
|
|
2361
|
+
} = A();
|
|
2368
2362
|
return /* @__PURE__ */ o(ii, {
|
|
2369
2363
|
title: e,
|
|
2370
2364
|
placement: t,
|
|
@@ -2489,10 +2483,10 @@ const ns = C.div`
|
|
|
2489
2483
|
|
|
2490
2484
|
${({
|
|
2491
2485
|
disabled: e
|
|
2492
|
-
}) => e ?
|
|
2486
|
+
}) => e ? q`
|
|
2493
2487
|
opacity: 0.3;
|
|
2494
2488
|
cursor: not-allowed;
|
|
2495
|
-
` :
|
|
2489
|
+
` : q`
|
|
2496
2490
|
opacity: 1;
|
|
2497
2491
|
cursor: pointer;
|
|
2498
2492
|
`}
|
|
@@ -2509,7 +2503,7 @@ function us({
|
|
|
2509
2503
|
}) {
|
|
2510
2504
|
const [d, m] = Z(""), {
|
|
2511
2505
|
inputPromptText: k
|
|
2512
|
-
} = le(),
|
|
2506
|
+
} = le(), x = z(() => {
|
|
2513
2507
|
if (a)
|
|
2514
2508
|
return;
|
|
2515
2509
|
if (gt(d)) {
|
|
@@ -2521,79 +2515,79 @@ function us({
|
|
|
2521
2515
|
}, [a, e, d]), s = z((y) => {
|
|
2522
2516
|
e(y), m("");
|
|
2523
2517
|
}, [e]), p = z((y) => {
|
|
2524
|
-
y.key === "Enter" ? (y.preventDefault(),
|
|
2525
|
-
}, [
|
|
2518
|
+
y.key === "Enter" ? (y.preventDefault(), x()) : y.key === "Escape" && gt(d) && m("");
|
|
2519
|
+
}, [x, d]), c = z((y) => {
|
|
2526
2520
|
u == null || u(y.target.value), m(y.target.value);
|
|
2527
|
-
}, [u]),
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2521
|
+
}, [u]), h = be(null);
|
|
2522
|
+
Ue(() => {
|
|
2523
|
+
h.current && (h.current.style.height = "inherit", h.current.style.height = `${Math.max(
|
|
2524
|
+
h.current.scrollHeight + 2,
|
|
2531
2525
|
// account for 1px top/bottom border
|
|
2532
2526
|
ps
|
|
2533
2527
|
)}px`);
|
|
2534
|
-
}, [d]),
|
|
2535
|
-
|
|
2528
|
+
}, [d]), Ue(() => {
|
|
2529
|
+
h.current && h.current.focus({
|
|
2536
2530
|
preventScroll: !0
|
|
2537
2531
|
});
|
|
2538
2532
|
}, []);
|
|
2539
2533
|
const {
|
|
2540
|
-
themeSettings:
|
|
2541
|
-
} =
|
|
2542
|
-
t:
|
|
2534
|
+
themeSettings: g
|
|
2535
|
+
} = A(), {
|
|
2536
|
+
t: b
|
|
2543
2537
|
} = j(), _ = z((y) => {
|
|
2544
|
-
var
|
|
2545
|
-
if ((
|
|
2546
|
-
const
|
|
2538
|
+
var S;
|
|
2539
|
+
if ((S = document.getElementById("csdk-chatbot-frame")) != null && S.contains(y.relatedTarget)) {
|
|
2540
|
+
const D = (M) => {
|
|
2547
2541
|
var L;
|
|
2548
|
-
document.removeEventListener("mouseup",
|
|
2542
|
+
document.removeEventListener("mouseup", D), document.removeEventListener("keyup", D), M.type === "mouseup" && ((L = document.getSelection()) == null ? void 0 : L.type) !== "Range" && y.target.focus({
|
|
2549
2543
|
preventScroll: !0
|
|
2550
2544
|
});
|
|
2551
2545
|
};
|
|
2552
|
-
document.addEventListener("mouseup",
|
|
2546
|
+
document.addEventListener("mouseup", D), document.addEventListener("keyup", D);
|
|
2553
2547
|
}
|
|
2554
2548
|
}, []);
|
|
2555
2549
|
return /* @__PURE__ */ v(ns, {
|
|
2556
|
-
theme:
|
|
2550
|
+
theme: g,
|
|
2557
2551
|
children: [/* @__PURE__ */ o(rs, {
|
|
2558
2552
|
recentPrompts: r,
|
|
2559
2553
|
suggestions: i,
|
|
2560
2554
|
isLoading: n,
|
|
2561
2555
|
onSelection: s,
|
|
2562
|
-
anchorEl:
|
|
2556
|
+
anchorEl: h.current,
|
|
2563
2557
|
text: d,
|
|
2564
2558
|
recommendationsError: l
|
|
2565
2559
|
}), t && /* @__PURE__ */ o(Ee, {
|
|
2566
|
-
title:
|
|
2560
|
+
title: b("ai.buttons.clearChat"),
|
|
2567
2561
|
placement: "bottom-start",
|
|
2568
2562
|
children: /* @__PURE__ */ o(ls, {
|
|
2569
2563
|
"aria-label": "clear history",
|
|
2570
2564
|
onClick: t,
|
|
2571
2565
|
children: /* @__PURE__ */ o(os, {
|
|
2572
|
-
theme:
|
|
2566
|
+
theme: g
|
|
2573
2567
|
})
|
|
2574
2568
|
})
|
|
2575
2569
|
}), /* @__PURE__ */ o(cs, {
|
|
2576
2570
|
"aria-label": "chat input",
|
|
2577
2571
|
onBlur: _,
|
|
2578
2572
|
maxLength: is,
|
|
2579
|
-
ref:
|
|
2573
|
+
ref: h,
|
|
2580
2574
|
rows: 1,
|
|
2581
2575
|
onChange: c,
|
|
2582
2576
|
spellCheck: "true",
|
|
2583
2577
|
placeholder: k,
|
|
2584
2578
|
value: d,
|
|
2585
2579
|
onKeyDown: p,
|
|
2586
|
-
theme:
|
|
2580
|
+
theme: g,
|
|
2587
2581
|
disabled: a
|
|
2588
2582
|
}), /* @__PURE__ */ o(ds, {
|
|
2589
2583
|
"aria-label": "send chat message",
|
|
2590
2584
|
disabled: a || d.length === 0,
|
|
2591
|
-
onClick:
|
|
2592
|
-
theme:
|
|
2585
|
+
onClick: x,
|
|
2586
|
+
theme: g,
|
|
2593
2587
|
children: /* @__PURE__ */ o("span", {
|
|
2594
2588
|
"data-state": "closed",
|
|
2595
2589
|
children: /* @__PURE__ */ o(ss, {
|
|
2596
|
-
theme:
|
|
2590
|
+
theme: g
|
|
2597
2591
|
})
|
|
2598
2592
|
})
|
|
2599
2593
|
})]
|
|
@@ -2621,7 +2615,7 @@ function Za({
|
|
|
2621
2615
|
}) {
|
|
2622
2616
|
const {
|
|
2623
2617
|
themeSettings: a
|
|
2624
|
-
} =
|
|
2618
|
+
} = A();
|
|
2625
2619
|
return /* @__PURE__ */ v(gs, {
|
|
2626
2620
|
children: [/* @__PURE__ */ o(hs, {
|
|
2627
2621
|
theme: a,
|
|
@@ -2701,7 +2695,7 @@ const fs = C.div`
|
|
|
2701
2695
|
function Dt() {
|
|
2702
2696
|
const {
|
|
2703
2697
|
themeSettings: e
|
|
2704
|
-
} =
|
|
2698
|
+
} = A(), t = e.aiChat.icons.color;
|
|
2705
2699
|
return /* @__PURE__ */ v("div", {
|
|
2706
2700
|
className: "csdk-flex csdk-justify-between csdk-w-[28px] csdk-py-[14.5px]",
|
|
2707
2701
|
"aria-label": "loading dots",
|
|
@@ -2762,10 +2756,10 @@ const bs = ["children", "options"], w = {
|
|
|
2762
2756
|
textStrikethroughed: "32",
|
|
2763
2757
|
unorderedList: "33"
|
|
2764
2758
|
};
|
|
2765
|
-
var
|
|
2759
|
+
var Ut;
|
|
2766
2760
|
(function(e) {
|
|
2767
2761
|
e[e.MAX = 0] = "MAX", e[e.HIGH = 1] = "HIGH", e[e.MED = 2] = "MED", e[e.LOW = 3] = "LOW", e[e.MIN = 4] = "MIN";
|
|
2768
|
-
})(
|
|
2762
|
+
})(Ut || (Ut = {}));
|
|
2769
2763
|
const Qt = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus", "autoPlay", "cellPadding", "cellSpacing", "charSet", "classId", "colSpan", "contentEditable", "contextMenu", "crossOrigin", "encType", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "frameBorder", "hrefLang", "inputMode", "keyParams", "keyType", "marginHeight", "marginWidth", "maxLength", "mediaGroup", "minLength", "noValidate", "radioGroup", "readOnly", "rowSpan", "spellCheck", "srcDoc", "srcLang", "srcSet", "tabIndex", "useMap"].reduce((e, t) => (e[t.toLowerCase()] = t, e), {
|
|
2770
2764
|
class: "className",
|
|
2771
2765
|
for: "htmlFor"
|
|
@@ -2776,7 +2770,7 @@ const Qt = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus",
|
|
|
2776
2770
|
lt: "<",
|
|
2777
2771
|
nbsp: " ",
|
|
2778
2772
|
quot: "“"
|
|
2779
|
-
}, xs = ["style", "script"], ys = ["src", "href", "data", "formAction", "srcDoc", "action"], ws = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, _s = /mailto:/i, Cs = /\n{2,}$/, $a = /^(\s*>[\s\S]*?)(?=\n\n|$)/, vs = /^ *> ?/gm, Ss = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, Ms = /^ {2,}\n/, Is = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, qa = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, Pa = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, Ds = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, As = /^(?:\n *)*\n/, Ls = /\r\n?/g, Ts = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, Ns = /^\[\^([^\]]+)]/, js = /\f/g, zs = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, Os = /^\s*?\[(x|\s)\]/, Ga = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Ha = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Ba = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/, ht = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, Es = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,
|
|
2773
|
+
}, xs = ["style", "script"], ys = ["src", "href", "data", "formAction", "srcDoc", "action"], ws = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, _s = /mailto:/i, Cs = /\n{2,}$/, $a = /^(\s*>[\s\S]*?)(?=\n\n|$)/, vs = /^ *> ?/gm, Ss = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, Ms = /^ {2,}\n/, Is = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, qa = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, Pa = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, Ds = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, As = /^(?:\n *)*\n/, Ls = /\r\n?/g, Ts = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, Ns = /^\[\^([^\]]+)]/, js = /\f/g, zs = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, Os = /^\s*?\[(x|\s)\]/, Ga = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Ha = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Ba = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/, ht = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, Es = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, Ya = /^<!--[\s\S]*?(?:-->)/, Rs = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, mt = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, Zs = /^\{.*\}$/, Ws = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, $s = /^<([^ >]+@[^ >]+)>/, qs = /^<([^ >]+:\/[^ >]+)>/, Ps = /-([a-z])?/gi, Ua = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, Gs = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, Hs = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, Bs = /^\[([^\]]*)\] ?\[([^\]]*)\]/, Ys = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, Us = /\t/g, Qs = /(^ *\||\| *$)/g, Fs = /^ *:-+: *$/, Vs = /^ *:-+ *$/, Js = /^ *-+: *$/, tt = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", Xs = new RegExp(`^([*_])\\1${tt}\\1\\1(?!\\1)`), Ks = new RegExp(`^([*_])${tt}\\1(?!\\1)`), en = new RegExp(`^(==)${tt}\\1`), tn = new RegExp(`^(~~)${tt}\\1`), an = /^\\([^0-9A-Za-z\s])/, Vt = /\\([^0-9A-Za-z\s])/g, rn = /^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/, on = /^\n+/, sn = /^([ \t]*)/, nn = /\\([^\\])/g, ln = /(?:^|\n)( *)$/, At = "(?:\\d+\\.)", Lt = "(?:[*+-])";
|
|
2780
2774
|
function Qa(e) {
|
|
2781
2775
|
return "( *)(" + (e === 1 ? At : Lt) + ") +";
|
|
2782
2776
|
}
|
|
@@ -2805,20 +2799,20 @@ function Jt(e, t) {
|
|
|
2805
2799
|
parse(l, u, d) {
|
|
2806
2800
|
const m = a ? +l[2] : void 0, k = l[0].replace(Cs, `
|
|
2807
2801
|
`).match(i);
|
|
2808
|
-
let
|
|
2802
|
+
let x = !1;
|
|
2809
2803
|
return {
|
|
2810
2804
|
items: k.map(function(s, p) {
|
|
2811
|
-
const c = n.exec(s)[0].length,
|
|
2805
|
+
const c = n.exec(s)[0].length, h = new RegExp("^ {1," + c + "}", "gm"), g = s.replace(h, "").replace(n, ""), b = p === k.length - 1, _ = g.indexOf(`
|
|
2812
2806
|
|
|
2813
|
-
`) !== -1 ||
|
|
2814
|
-
|
|
2815
|
-
const y = d.inline,
|
|
2816
|
-
let
|
|
2817
|
-
d.list = !0, _ ? (d.inline = !1,
|
|
2807
|
+
`) !== -1 || b && x;
|
|
2808
|
+
x = _;
|
|
2809
|
+
const y = d.inline, S = d.list;
|
|
2810
|
+
let D;
|
|
2811
|
+
d.list = !0, _ ? (d.inline = !1, D = je(g) + `
|
|
2818
2812
|
|
|
2819
|
-
`) : (d.inline = !0,
|
|
2820
|
-
const
|
|
2821
|
-
return d.inline = y, d.list =
|
|
2813
|
+
`) : (d.inline = !0, D = je(g));
|
|
2814
|
+
const M = u(D, d);
|
|
2815
|
+
return d.inline = y, d.list = S, M;
|
|
2822
2816
|
}),
|
|
2823
2817
|
ordered: a,
|
|
2824
2818
|
start: m
|
|
@@ -2834,7 +2828,7 @@ function Jt(e, t) {
|
|
|
2834
2828
|
}))
|
|
2835
2829
|
};
|
|
2836
2830
|
}
|
|
2837
|
-
const gn = new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), hn = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, ar = [$a, qa, Pa, Ga, Ba, Ha,
|
|
2831
|
+
const gn = new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), hn = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, ar = [$a, qa, Pa, Ga, Ba, Ha, Ua, er, tr], mn = [...ar, /^[^\n]+(?: \n|\n{2,})/, ht, Ya, mt];
|
|
2838
2832
|
function je(e) {
|
|
2839
2833
|
let t = e.length;
|
|
2840
2834
|
for (; t > 0 && e[t - 1] <= " "; )
|
|
@@ -2970,18 +2964,18 @@ function lt(e, t, a) {
|
|
|
2970
2964
|
}
|
|
2971
2965
|
function vn(e = "", t = {}) {
|
|
2972
2966
|
function a(s, p, ...c) {
|
|
2973
|
-
const
|
|
2974
|
-
return t.createElement(function(
|
|
2975
|
-
const _ = lt(
|
|
2976
|
-
return _ ? typeof _ == "function" || typeof _ == "object" && "render" in _ ? _ : lt(
|
|
2977
|
-
}(s, t.overrides), ge({}, p,
|
|
2978
|
-
className: Cn(p == null ? void 0 : p.className,
|
|
2967
|
+
const h = lt(t.overrides, `${s}.props`, {});
|
|
2968
|
+
return t.createElement(function(g, b) {
|
|
2969
|
+
const _ = lt(b, g);
|
|
2970
|
+
return _ ? typeof _ == "function" || typeof _ == "object" && "render" in _ ? _ : lt(b, `${g}.component`, g) : g;
|
|
2971
|
+
}(s, t.overrides), ge({}, p, h, {
|
|
2972
|
+
className: Cn(p == null ? void 0 : p.className, h.className) || void 0
|
|
2979
2973
|
}), ...c);
|
|
2980
2974
|
}
|
|
2981
2975
|
function r(s) {
|
|
2982
2976
|
s = s.replace(zs, "");
|
|
2983
2977
|
let p = !1;
|
|
2984
|
-
t.forceInline ? p = !0 : t.forceBlock || (p =
|
|
2978
|
+
t.forceInline ? p = !0 : t.forceBlock || (p = Ys.test(s) === !1);
|
|
2985
2979
|
const c = m(d(p ? s : `${je(s).replace(on, "")}
|
|
2986
2980
|
|
|
2987
2981
|
`, {
|
|
@@ -2991,45 +2985,45 @@ function vn(e = "", t = {}) {
|
|
|
2991
2985
|
c.pop();
|
|
2992
2986
|
if (t.wrapper === null)
|
|
2993
2987
|
return c;
|
|
2994
|
-
const
|
|
2995
|
-
let
|
|
2988
|
+
const h = t.wrapper || (p ? "span" : "div");
|
|
2989
|
+
let g;
|
|
2996
2990
|
if (c.length > 1 || t.forceWrapper)
|
|
2997
|
-
|
|
2991
|
+
g = c;
|
|
2998
2992
|
else {
|
|
2999
2993
|
if (c.length === 1)
|
|
3000
|
-
return
|
|
2994
|
+
return g = c[0], typeof g == "string" ? a("span", {
|
|
3001
2995
|
key: "outer"
|
|
3002
|
-
},
|
|
3003
|
-
|
|
2996
|
+
}, g) : g;
|
|
2997
|
+
g = null;
|
|
3004
2998
|
}
|
|
3005
|
-
return t.createElement(
|
|
2999
|
+
return t.createElement(h, {
|
|
3006
3000
|
key: "outer"
|
|
3007
|
-
},
|
|
3001
|
+
}, g);
|
|
3008
3002
|
}
|
|
3009
3003
|
function i(s, p) {
|
|
3010
3004
|
const c = p.match(ws);
|
|
3011
|
-
return c ? c.reduce(function(
|
|
3012
|
-
const
|
|
3013
|
-
if (
|
|
3014
|
-
const _ = function(
|
|
3015
|
-
return
|
|
3005
|
+
return c ? c.reduce(function(h, g) {
|
|
3006
|
+
const b = g.indexOf("=");
|
|
3007
|
+
if (b !== -1) {
|
|
3008
|
+
const _ = function(M) {
|
|
3009
|
+
return M.indexOf("-") !== -1 && M.match(Rs) === null && (M = M.replace(Ps, function(L, E) {
|
|
3016
3010
|
return E.toUpperCase();
|
|
3017
|
-
})),
|
|
3018
|
-
}(
|
|
3019
|
-
const L =
|
|
3020
|
-
return (L === '"' || L === "'") &&
|
|
3021
|
-
}(
|
|
3022
|
-
if (
|
|
3023
|
-
return
|
|
3024
|
-
const
|
|
3011
|
+
})), M;
|
|
3012
|
+
}(g.slice(0, b)).trim(), y = function(M) {
|
|
3013
|
+
const L = M[0];
|
|
3014
|
+
return (L === '"' || L === "'") && M.length >= 2 && M[M.length - 1] === L ? M.slice(1, -1) : M;
|
|
3015
|
+
}(g.slice(b + 1).trim()), S = Qt[_] || _;
|
|
3016
|
+
if (S === "ref")
|
|
3017
|
+
return h;
|
|
3018
|
+
const D = h[S] = function(M, L, E, J) {
|
|
3025
3019
|
return L === "style" ? function(X) {
|
|
3026
|
-
const
|
|
3027
|
-
let F = "",
|
|
3020
|
+
const Y = [];
|
|
3021
|
+
let F = "", U = !1, P = !1, K = "";
|
|
3028
3022
|
if (!X)
|
|
3029
|
-
return
|
|
3023
|
+
return Y;
|
|
3030
3024
|
for (let V = 0; V < X.length; V++) {
|
|
3031
3025
|
const W = X[V];
|
|
3032
|
-
if (W !== '"' && W !== "'" ||
|
|
3026
|
+
if (W !== '"' && W !== "'" || U || (P ? W === K && (P = !1, K = "") : (P = !0, K = W)), W === "(" && F.endsWith("url") ? U = !0 : W === ")" && U && (U = !1), W !== ";" || P || U)
|
|
3033
3027
|
F += W;
|
|
3034
3028
|
else {
|
|
3035
3029
|
const Q = F.trim();
|
|
@@ -3037,7 +3031,7 @@ function vn(e = "", t = {}) {
|
|
|
3037
3031
|
const $ = Q.indexOf(":");
|
|
3038
3032
|
if ($ > 0) {
|
|
3039
3033
|
const he = Q.slice(0, $).trim(), _e = Q.slice($ + 1).trim();
|
|
3040
|
-
|
|
3034
|
+
Y.push([he, _e]);
|
|
3041
3035
|
}
|
|
3042
3036
|
}
|
|
3043
3037
|
F = "";
|
|
@@ -3048,18 +3042,18 @@ function vn(e = "", t = {}) {
|
|
|
3048
3042
|
const V = ee.indexOf(":");
|
|
3049
3043
|
if (V > 0) {
|
|
3050
3044
|
const W = ee.slice(0, V).trim(), Q = ee.slice(V + 1).trim();
|
|
3051
|
-
|
|
3045
|
+
Y.push([W, Q]);
|
|
3052
3046
|
}
|
|
3053
3047
|
}
|
|
3054
|
-
return
|
|
3055
|
-
}(E).reduce(function(X, [
|
|
3056
|
-
return X[
|
|
3057
|
-
}, {}) : ys.indexOf(L) !== -1 ? J(E,
|
|
3048
|
+
return Y;
|
|
3049
|
+
}(E).reduce(function(X, [Y, F]) {
|
|
3050
|
+
return X[Y.replace(/(-[a-z])/g, (U) => U[1].toUpperCase())] = J(F, M, Y), X;
|
|
3051
|
+
}, {}) : ys.indexOf(L) !== -1 ? J(E, M, L) : (E.match(Zs) && (E = E.slice(1, E.length - 1)), E === "true" || E !== "false" && E);
|
|
3058
3052
|
}(s, _, y, t.sanitizer);
|
|
3059
|
-
typeof
|
|
3053
|
+
typeof D == "string" && (ht.test(D) || mt.test(D)) && (h[S] = r(D.trim()));
|
|
3060
3054
|
} else
|
|
3061
|
-
|
|
3062
|
-
return
|
|
3055
|
+
g !== "style" && (h[Qt[g] || g] = !0);
|
|
3056
|
+
return h;
|
|
3063
3057
|
}, {}) : null;
|
|
3064
3058
|
}
|
|
3065
3059
|
t.overrides = t.overrides || {}, t.sanitizer = t.sanitizer || yn, t.slugify = t.slugify || Me, t.namedCodesToUnicode = t.namedCodesToUnicode ? ge({}, Ft, t.namedCodesToUnicode) : Ft, t.createElement = t.createElement || ci;
|
|
@@ -3068,17 +3062,17 @@ function vn(e = "", t = {}) {
|
|
|
3068
3062
|
match: ie($a),
|
|
3069
3063
|
order: 1,
|
|
3070
3064
|
parse(s, p, c) {
|
|
3071
|
-
const [,
|
|
3065
|
+
const [, h, g] = s[0].replace(vs, "").match(Ss);
|
|
3072
3066
|
return {
|
|
3073
|
-
alert:
|
|
3074
|
-
children: p(
|
|
3067
|
+
alert: h,
|
|
3068
|
+
children: p(g, c)
|
|
3075
3069
|
};
|
|
3076
3070
|
},
|
|
3077
3071
|
render(s, p, c) {
|
|
3078
|
-
const
|
|
3072
|
+
const h = {
|
|
3079
3073
|
key: c.key
|
|
3080
3074
|
};
|
|
3081
|
-
return s.alert && (
|
|
3075
|
+
return s.alert && (h.className = "markdown-alert-" + t.slugify(s.alert.toLowerCase(), Me), s.children.unshift({
|
|
3082
3076
|
attrs: {},
|
|
3083
3077
|
children: [{
|
|
3084
3078
|
type: w.text,
|
|
@@ -3087,7 +3081,7 @@ function vn(e = "", t = {}) {
|
|
|
3087
3081
|
noInnerParse: !0,
|
|
3088
3082
|
type: w.htmlBlock,
|
|
3089
3083
|
tag: "header"
|
|
3090
|
-
})), a("blockquote",
|
|
3084
|
+
})), a("blockquote", h, p(s.children, c));
|
|
3091
3085
|
}
|
|
3092
3086
|
},
|
|
3093
3087
|
[w.breakLine]: {
|
|
@@ -3201,14 +3195,14 @@ function vn(e = "", t = {}) {
|
|
|
3201
3195
|
match: Ie(ht),
|
|
3202
3196
|
order: 1,
|
|
3203
3197
|
parse(s, p, c) {
|
|
3204
|
-
const [,
|
|
3198
|
+
const [, h] = s[3].match(sn), g = new RegExp(`^${h}`, "gm"), b = s[3].replace(g, ""), _ = (y = b, mn.some((E) => E.test(y)) ? _n : Be);
|
|
3205
3199
|
var y;
|
|
3206
|
-
const
|
|
3207
|
-
attrs: i(
|
|
3208
|
-
noInnerParse:
|
|
3209
|
-
tag:
|
|
3200
|
+
const S = s[1].toLowerCase(), D = xs.indexOf(S) !== -1, M = (D ? S : s[1]).trim(), L = {
|
|
3201
|
+
attrs: i(M, s[2]),
|
|
3202
|
+
noInnerParse: D,
|
|
3203
|
+
tag: M
|
|
3210
3204
|
};
|
|
3211
|
-
return c.inAnchor = c.inAnchor ||
|
|
3205
|
+
return c.inAnchor = c.inAnchor || S === "a", D ? L.text = s[3] : L.children = _(p, b, c), c.inAnchor = !1, L;
|
|
3212
3206
|
},
|
|
3213
3207
|
render: (s, p, c) => a(s.tag, ge({
|
|
3214
3208
|
key: c.key
|
|
@@ -3229,7 +3223,7 @@ function vn(e = "", t = {}) {
|
|
|
3229
3223
|
}))
|
|
3230
3224
|
},
|
|
3231
3225
|
[w.htmlComment]: {
|
|
3232
|
-
match: Ie(
|
|
3226
|
+
match: Ie(Ya),
|
|
3233
3227
|
order: 1,
|
|
3234
3228
|
parse: () => ({}),
|
|
3235
3229
|
render: nt
|
|
@@ -3360,25 +3354,25 @@ function vn(e = "", t = {}) {
|
|
|
3360
3354
|
}, s.fallbackChildren)
|
|
3361
3355
|
},
|
|
3362
3356
|
[w.table]: {
|
|
3363
|
-
match: ie(
|
|
3357
|
+
match: ie(Ua),
|
|
3364
3358
|
order: 1,
|
|
3365
3359
|
parse: kn,
|
|
3366
3360
|
render(s, p, c) {
|
|
3367
|
-
const
|
|
3361
|
+
const h = s;
|
|
3368
3362
|
return a("table", {
|
|
3369
3363
|
key: c.key
|
|
3370
|
-
}, a("thead", null, a("tr", null,
|
|
3364
|
+
}, a("thead", null, a("tr", null, h.header.map(function(g, b) {
|
|
3371
3365
|
return a("th", {
|
|
3372
|
-
key:
|
|
3373
|
-
style: Kt(
|
|
3374
|
-
}, p(
|
|
3375
|
-
}))), a("tbody", null,
|
|
3366
|
+
key: b,
|
|
3367
|
+
style: Kt(h, b)
|
|
3368
|
+
}, p(g, c));
|
|
3369
|
+
}))), a("tbody", null, h.cells.map(function(g, b) {
|
|
3376
3370
|
return a("tr", {
|
|
3377
|
-
key:
|
|
3378
|
-
},
|
|
3371
|
+
key: b
|
|
3372
|
+
}, g.map(function(_, y) {
|
|
3379
3373
|
return a("td", {
|
|
3380
3374
|
key: y,
|
|
3381
|
-
style: Kt(
|
|
3375
|
+
style: Kt(h, y)
|
|
3382
3376
|
}, p(_, c));
|
|
3383
3377
|
}));
|
|
3384
3378
|
})));
|
|
@@ -3440,55 +3434,55 @@ function vn(e = "", t = {}) {
|
|
|
3440
3434
|
t.disableParsingRawHTML === !0 && (delete u[w.htmlBlock], delete u[w.htmlSelfClosing]);
|
|
3441
3435
|
const d = function(s) {
|
|
3442
3436
|
let p = Object.keys(s);
|
|
3443
|
-
function c(
|
|
3444
|
-
let
|
|
3445
|
-
for (
|
|
3446
|
-
let
|
|
3447
|
-
for (;
|
|
3448
|
-
if (
|
|
3449
|
-
|
|
3437
|
+
function c(h, g) {
|
|
3438
|
+
let b, _, y = [], S = "", D = "";
|
|
3439
|
+
for (g.prevCapture = g.prevCapture || ""; h; ) {
|
|
3440
|
+
let M = 0;
|
|
3441
|
+
for (; M < p.length; ) {
|
|
3442
|
+
if (S = p[M], b = s[S], g.inline && !b.match.inline) {
|
|
3443
|
+
M++;
|
|
3450
3444
|
continue;
|
|
3451
3445
|
}
|
|
3452
|
-
const L =
|
|
3446
|
+
const L = b.match(h, g);
|
|
3453
3447
|
if (L) {
|
|
3454
|
-
|
|
3448
|
+
D = L[0], g.prevCapture += D, h = h.substring(D.length), _ = b.parse(L, c, g), _.type == null && (_.type = S), y.push(_);
|
|
3455
3449
|
break;
|
|
3456
3450
|
}
|
|
3457
|
-
|
|
3451
|
+
M++;
|
|
3458
3452
|
}
|
|
3459
3453
|
}
|
|
3460
|
-
return
|
|
3454
|
+
return g.prevCapture = "", y;
|
|
3461
3455
|
}
|
|
3462
|
-
return p.sort(function(
|
|
3463
|
-
let
|
|
3464
|
-
return
|
|
3465
|
-
}), function(
|
|
3466
|
-
return c(function(
|
|
3467
|
-
return
|
|
3468
|
-
`).replace(js, "").replace(
|
|
3469
|
-
}(
|
|
3456
|
+
return p.sort(function(h, g) {
|
|
3457
|
+
let b = s[h].order, _ = s[g].order;
|
|
3458
|
+
return b !== _ ? b - _ : h < g ? -1 : 1;
|
|
3459
|
+
}), function(h, g) {
|
|
3460
|
+
return c(function(b) {
|
|
3461
|
+
return b.replace(Ls, `
|
|
3462
|
+
`).replace(js, "").replace(Us, " ");
|
|
3463
|
+
}(h), g);
|
|
3470
3464
|
};
|
|
3471
3465
|
}(u), m = (k = /* @__PURE__ */ function(s, p) {
|
|
3472
|
-
return function(c,
|
|
3473
|
-
const
|
|
3474
|
-
return p ? p(() =>
|
|
3466
|
+
return function(c, h, g) {
|
|
3467
|
+
const b = s[c.type].render;
|
|
3468
|
+
return p ? p(() => b(c, h, g), c, h, g) : b(c, h, g);
|
|
3475
3469
|
};
|
|
3476
3470
|
}(u, t.renderRule), function s(p, c = {}) {
|
|
3477
3471
|
if (Array.isArray(p)) {
|
|
3478
|
-
const
|
|
3479
|
-
let
|
|
3472
|
+
const h = c.key, g = [];
|
|
3473
|
+
let b = !1;
|
|
3480
3474
|
for (let _ = 0; _ < p.length; _++) {
|
|
3481
3475
|
c.key = _;
|
|
3482
|
-
const y = s(p[_], c),
|
|
3483
|
-
|
|
3476
|
+
const y = s(p[_], c), S = typeof y == "string";
|
|
3477
|
+
S && b ? g[g.length - 1] += y : y !== null && g.push(y), b = S;
|
|
3484
3478
|
}
|
|
3485
|
-
return c.key =
|
|
3479
|
+
return c.key = h, g;
|
|
3486
3480
|
}
|
|
3487
3481
|
return k(p, s, c);
|
|
3488
3482
|
});
|
|
3489
3483
|
var k;
|
|
3490
|
-
const
|
|
3491
|
-
return n.length ? a("div", null,
|
|
3484
|
+
const x = r(e);
|
|
3485
|
+
return n.length ? a("div", null, x, a("footer", {
|
|
3492
3486
|
key: "footer"
|
|
3493
3487
|
}, n.map(function(s) {
|
|
3494
3488
|
return a("div", {
|
|
@@ -3497,7 +3491,7 @@ function vn(e = "", t = {}) {
|
|
|
3497
3491
|
}, s.identifier, m(d(s.footnote, {
|
|
3498
3492
|
inline: !0
|
|
3499
3493
|
})));
|
|
3500
|
-
}))) :
|
|
3494
|
+
}))) : x;
|
|
3501
3495
|
}
|
|
3502
3496
|
const Sn = (e) => {
|
|
3503
3497
|
let {
|
|
@@ -3517,9 +3511,9 @@ const Sn = (e) => {
|
|
|
3517
3511
|
|
|
3518
3512
|
${({
|
|
3519
3513
|
align: e
|
|
3520
|
-
}) => e === "right" ?
|
|
3514
|
+
}) => e === "right" ? q`
|
|
3521
3515
|
justify-content: flex-end;
|
|
3522
|
-
` :
|
|
3516
|
+
` : q`
|
|
3523
3517
|
justify-content: flex-start;
|
|
3524
3518
|
`}
|
|
3525
3519
|
`, rr = C.div`
|
|
@@ -3535,17 +3529,17 @@ const Sn = (e) => {
|
|
|
3535
3529
|
|
|
3536
3530
|
${({
|
|
3537
3531
|
align: e
|
|
3538
|
-
}) => e === "right" ?
|
|
3532
|
+
}) => e === "right" ? q`
|
|
3539
3533
|
text-align: right;
|
|
3540
3534
|
border-radius: 10px 10px 0px 10px;
|
|
3541
|
-
` :
|
|
3535
|
+
` : q`
|
|
3542
3536
|
text-align: left;
|
|
3543
3537
|
border-radius: 10px 10px 10px 0px;
|
|
3544
3538
|
`}
|
|
3545
3539
|
|
|
3546
3540
|
${({
|
|
3547
3541
|
align: e
|
|
3548
|
-
}) => e !== "full" ?
|
|
3542
|
+
}) => e !== "full" ? q`
|
|
3549
3543
|
max-width: 85%;
|
|
3550
3544
|
` : ""}
|
|
3551
3545
|
|
|
@@ -3562,7 +3556,7 @@ const Sn = (e) => {
|
|
|
3562
3556
|
}) => {
|
|
3563
3557
|
const {
|
|
3564
3558
|
themeSettings: a
|
|
3565
|
-
} =
|
|
3559
|
+
} = A();
|
|
3566
3560
|
return /* @__PURE__ */ o(Mn, {
|
|
3567
3561
|
theme: a,
|
|
3568
3562
|
align: e,
|
|
@@ -3589,9 +3583,9 @@ const Dn = C.div`
|
|
|
3589
3583
|
|
|
3590
3584
|
${({
|
|
3591
3585
|
align: e
|
|
3592
|
-
}) => e === "right" ?
|
|
3586
|
+
}) => e === "right" ? q`
|
|
3593
3587
|
justify-content: flex-end;
|
|
3594
|
-
` :
|
|
3588
|
+
` : q`
|
|
3595
3589
|
justify-content: flex-start;
|
|
3596
3590
|
`}
|
|
3597
3591
|
`, An = C.button`
|
|
@@ -3622,15 +3616,15 @@ const Dn = C.div`
|
|
|
3622
3616
|
|
|
3623
3617
|
${({
|
|
3624
3618
|
align: e
|
|
3625
|
-
}) => e === "right" ?
|
|
3619
|
+
}) => e === "right" ? q`
|
|
3626
3620
|
text-align: right;
|
|
3627
|
-
` :
|
|
3621
|
+
` : q`
|
|
3628
3622
|
text-align: left;
|
|
3629
3623
|
`}
|
|
3630
3624
|
|
|
3631
3625
|
${({
|
|
3632
3626
|
align: e
|
|
3633
|
-
}) => e !== "full" ?
|
|
3627
|
+
}) => e !== "full" ? q`
|
|
3634
3628
|
max-width: 382px;
|
|
3635
3629
|
` : ""}
|
|
3636
3630
|
|
|
@@ -3643,7 +3637,7 @@ const Dn = C.div`
|
|
|
3643
3637
|
} = e.aiChat.suggestions;
|
|
3644
3638
|
if (t) {
|
|
3645
3639
|
const [r, i] = t;
|
|
3646
|
-
return
|
|
3640
|
+
return q`
|
|
3647
3641
|
border: none;
|
|
3648
3642
|
position: relative;
|
|
3649
3643
|
border-radius: ${a};
|
|
@@ -3676,7 +3670,7 @@ function Ve({
|
|
|
3676
3670
|
}) {
|
|
3677
3671
|
const {
|
|
3678
3672
|
themeSettings: l
|
|
3679
|
-
} =
|
|
3673
|
+
} = A();
|
|
3680
3674
|
return /* @__PURE__ */ o(Dn, {
|
|
3681
3675
|
align: t,
|
|
3682
3676
|
children: /* @__PURE__ */ o(An, {
|
|
@@ -3727,7 +3721,7 @@ var Tn = Jr("toLowerCase");
|
|
|
3727
3721
|
function Nn() {
|
|
3728
3722
|
const {
|
|
3729
3723
|
themeSettings: e
|
|
3730
|
-
} =
|
|
3724
|
+
} = A();
|
|
3731
3725
|
return /* @__PURE__ */ o("svg", {
|
|
3732
3726
|
width: "24",
|
|
3733
3727
|
height: "25",
|
|
@@ -3938,41 +3932,41 @@ const On = Je(Ir, {
|
|
|
3938
3932
|
"aria-modal": d = !0,
|
|
3939
3933
|
BackdropComponent: m,
|
|
3940
3934
|
BackdropProps: k,
|
|
3941
|
-
children:
|
|
3935
|
+
children: x,
|
|
3942
3936
|
className: s,
|
|
3943
3937
|
disableEscapeKeyDown: p = !1,
|
|
3944
3938
|
fullScreen: c = !1,
|
|
3945
|
-
fullWidth:
|
|
3946
|
-
maxWidth:
|
|
3947
|
-
onBackdropClick:
|
|
3939
|
+
fullWidth: h = !1,
|
|
3940
|
+
maxWidth: g = "sm",
|
|
3941
|
+
onBackdropClick: b,
|
|
3948
3942
|
onClick: _,
|
|
3949
3943
|
onClose: y,
|
|
3950
|
-
open:
|
|
3951
|
-
PaperComponent:
|
|
3952
|
-
PaperProps:
|
|
3944
|
+
open: S,
|
|
3945
|
+
PaperComponent: D = ca,
|
|
3946
|
+
PaperProps: M = {},
|
|
3953
3947
|
scroll: L = "paper",
|
|
3954
3948
|
slots: E = {},
|
|
3955
3949
|
slotProps: J = {},
|
|
3956
3950
|
TransitionComponent: X = zt,
|
|
3957
|
-
transitionDuration:
|
|
3951
|
+
transitionDuration: Y = i,
|
|
3958
3952
|
TransitionProps: F
|
|
3959
|
-
} = n,
|
|
3953
|
+
} = n, U = Aa(n, ["aria-describedby", "aria-labelledby", "aria-modal", "BackdropComponent", "BackdropProps", "children", "className", "disableEscapeKeyDown", "fullScreen", "fullWidth", "maxWidth", "onBackdropClick", "onClick", "onClose", "open", "PaperComponent", "PaperProps", "scroll", "slots", "slotProps", "TransitionComponent", "transitionDuration", "TransitionProps"]), P = T(I({}, a), {
|
|
3960
3954
|
disableEscapeKeyDown: p,
|
|
3961
3955
|
fullScreen: c,
|
|
3962
|
-
fullWidth:
|
|
3963
|
-
maxWidth:
|
|
3956
|
+
fullWidth: h,
|
|
3957
|
+
maxWidth: g,
|
|
3964
3958
|
scroll: L
|
|
3965
|
-
}), K = En(
|
|
3959
|
+
}), K = En(P), ee = be(), V = (me) => {
|
|
3966
3960
|
ee.current = me.target === me.currentTarget;
|
|
3967
3961
|
}, W = (me) => {
|
|
3968
|
-
_ && _(me), ee.current && (ee.current = null,
|
|
3962
|
+
_ && _(me), ee.current && (ee.current = null, b && b(me), y && y(me, "backdropClick"));
|
|
3969
3963
|
}, Q = Nr(u), $ = R(() => ({
|
|
3970
3964
|
titleId: Q
|
|
3971
|
-
}), [Q]), he =
|
|
3965
|
+
}), [Q]), he = I({
|
|
3972
3966
|
transition: X
|
|
3973
|
-
}, E), _e =
|
|
3967
|
+
}, E), _e = I({
|
|
3974
3968
|
transition: F,
|
|
3975
|
-
paper:
|
|
3969
|
+
paper: M,
|
|
3976
3970
|
backdrop: k
|
|
3977
3971
|
}, J), ue = {
|
|
3978
3972
|
slots: he,
|
|
@@ -3981,58 +3975,58 @@ const On = Je(Ir, {
|
|
|
3981
3975
|
elementType: Rn,
|
|
3982
3976
|
shouldForwardComponentProp: !0,
|
|
3983
3977
|
externalForwardedProps: ue,
|
|
3984
|
-
ownerState:
|
|
3978
|
+
ownerState: P,
|
|
3985
3979
|
className: it(K.root, s),
|
|
3986
3980
|
ref: t
|
|
3987
3981
|
}), [O, te] = Ce("backdrop", {
|
|
3988
3982
|
elementType: On,
|
|
3989
3983
|
shouldForwardComponentProp: !0,
|
|
3990
3984
|
externalForwardedProps: ue,
|
|
3991
|
-
ownerState:
|
|
3985
|
+
ownerState: P
|
|
3992
3986
|
}), [We, $e] = Ce("paper", {
|
|
3993
3987
|
elementType: Wn,
|
|
3994
3988
|
shouldForwardComponentProp: !0,
|
|
3995
3989
|
externalForwardedProps: ue,
|
|
3996
|
-
ownerState:
|
|
3997
|
-
className: it(K.paper,
|
|
3990
|
+
ownerState: P,
|
|
3991
|
+
className: it(K.paper, M.className)
|
|
3998
3992
|
}), [lr, cr] = Ce("container", {
|
|
3999
3993
|
elementType: Zn,
|
|
4000
3994
|
externalForwardedProps: ue,
|
|
4001
|
-
ownerState:
|
|
3995
|
+
ownerState: P,
|
|
4002
3996
|
className: it(K.container)
|
|
4003
3997
|
}), [dr, pr] = Ce("transition", {
|
|
4004
3998
|
elementType: zt,
|
|
4005
3999
|
externalForwardedProps: ue,
|
|
4006
|
-
ownerState:
|
|
4000
|
+
ownerState: P,
|
|
4007
4001
|
additionalProps: {
|
|
4008
4002
|
appear: !0,
|
|
4009
|
-
in:
|
|
4010
|
-
timeout:
|
|
4003
|
+
in: S,
|
|
4004
|
+
timeout: Y,
|
|
4011
4005
|
role: "presentation"
|
|
4012
4006
|
}
|
|
4013
4007
|
});
|
|
4014
|
-
return /* @__PURE__ */ ve(Ze, T(
|
|
4008
|
+
return /* @__PURE__ */ ve(Ze, T(I(I({
|
|
4015
4009
|
closeAfterTransition: !0,
|
|
4016
4010
|
slots: {
|
|
4017
4011
|
backdrop: O
|
|
4018
4012
|
},
|
|
4019
4013
|
slotProps: {
|
|
4020
|
-
backdrop:
|
|
4021
|
-
transitionDuration:
|
|
4014
|
+
backdrop: I({
|
|
4015
|
+
transitionDuration: Y,
|
|
4022
4016
|
as: m
|
|
4023
4017
|
}, te)
|
|
4024
4018
|
},
|
|
4025
4019
|
disableEscapeKeyDown: p,
|
|
4026
4020
|
onClose: y,
|
|
4027
|
-
open:
|
|
4021
|
+
open: S,
|
|
4028
4022
|
onClick: W
|
|
4029
|
-
}, at),
|
|
4030
|
-
children: /* @__PURE__ */ ve(dr, T(
|
|
4031
|
-
children: /* @__PURE__ */ ve(lr, T(
|
|
4023
|
+
}, at), U), {
|
|
4024
|
+
children: /* @__PURE__ */ ve(dr, T(I({}, pr), {
|
|
4025
|
+
children: /* @__PURE__ */ ve(lr, T(I({
|
|
4032
4026
|
onMouseDown: V
|
|
4033
4027
|
}, cr), {
|
|
4034
|
-
children: /* @__PURE__ */ ve(We, T(
|
|
4035
|
-
as:
|
|
4028
|
+
children: /* @__PURE__ */ ve(We, T(I({
|
|
4029
|
+
as: D,
|
|
4036
4030
|
elevation: 24,
|
|
4037
4031
|
role: "dialog",
|
|
4038
4032
|
"aria-describedby": l,
|
|
@@ -4041,7 +4035,7 @@ const On = Je(Ir, {
|
|
|
4041
4035
|
}, $e), {
|
|
4042
4036
|
children: /* @__PURE__ */ ve(ir.Provider, {
|
|
4043
4037
|
value: $,
|
|
4044
|
-
children:
|
|
4038
|
+
children: x
|
|
4045
4039
|
})
|
|
4046
4040
|
}))
|
|
4047
4041
|
}))
|
|
@@ -4385,7 +4379,7 @@ const Tt = (e) => pa(e.chart.backgroundColor), Bn = ({
|
|
|
4385
4379
|
}) => {
|
|
4386
4380
|
const {
|
|
4387
4381
|
themeSettings: t
|
|
4388
|
-
} =
|
|
4382
|
+
} = A();
|
|
4389
4383
|
return /* @__PURE__ */ o(Ee, {
|
|
4390
4384
|
title: e,
|
|
4391
4385
|
children: /* @__PURE__ */ o(Re, {
|
|
@@ -4396,7 +4390,7 @@ const Tt = (e) => pa(e.chart.backgroundColor), Bn = ({
|
|
|
4396
4390
|
})
|
|
4397
4391
|
})
|
|
4398
4392
|
});
|
|
4399
|
-
},
|
|
4393
|
+
}, Yn = ({
|
|
4400
4394
|
items: e
|
|
4401
4395
|
}) => {
|
|
4402
4396
|
const [t, a] = Z(null), r = (l) => {
|
|
@@ -4405,7 +4399,7 @@ const Tt = (e) => pa(e.chart.backgroundColor), Bn = ({
|
|
|
4405
4399
|
a(null);
|
|
4406
4400
|
}, {
|
|
4407
4401
|
themeSettings: n
|
|
4408
|
-
} =
|
|
4402
|
+
} = A();
|
|
4409
4403
|
return /* @__PURE__ */ v(B, {
|
|
4410
4404
|
children: [/* @__PURE__ */ o(Re, {
|
|
4411
4405
|
onClick: r,
|
|
@@ -4443,12 +4437,12 @@ const Tt = (e) => pa(e.chart.backgroundColor), Bn = ({
|
|
|
4443
4437
|
}, l.title))
|
|
4444
4438
|
})]
|
|
4445
4439
|
});
|
|
4446
|
-
},
|
|
4440
|
+
}, Un = ({
|
|
4447
4441
|
onClick: e
|
|
4448
4442
|
}) => {
|
|
4449
4443
|
const {
|
|
4450
4444
|
themeSettings: t
|
|
4451
|
-
} =
|
|
4445
|
+
} = A(), {
|
|
4452
4446
|
t: a
|
|
4453
4447
|
} = j();
|
|
4454
4448
|
return /* @__PURE__ */ o(Ee, {
|
|
@@ -4480,9 +4474,9 @@ function Fn({
|
|
|
4480
4474
|
"aria-label": "chatbot chart toolbar",
|
|
4481
4475
|
children: [/* @__PURE__ */ o(Bn, {
|
|
4482
4476
|
title: e ?? ""
|
|
4483
|
-
}), /* @__PURE__ */ o(Un, {
|
|
4484
|
-
items: r
|
|
4485
4477
|
}), /* @__PURE__ */ o(Yn, {
|
|
4478
|
+
items: r
|
|
4479
|
+
}), /* @__PURE__ */ o(Un, {
|
|
4486
4480
|
onClick: a
|
|
4487
4481
|
})]
|
|
4488
4482
|
});
|
|
@@ -4492,7 +4486,7 @@ function Vn({
|
|
|
4492
4486
|
}) {
|
|
4493
4487
|
const [t, a] = Z(!1), {
|
|
4494
4488
|
themeSettings: r
|
|
4495
|
-
} =
|
|
4489
|
+
} = A(), {
|
|
4496
4490
|
inlineElement: i,
|
|
4497
4491
|
expandedElement: n
|
|
4498
4492
|
} = R(() => {
|
|
@@ -4515,14 +4509,14 @@ function Vn({
|
|
|
4515
4509
|
})
|
|
4516
4510
|
}
|
|
4517
4511
|
};
|
|
4518
|
-
let k,
|
|
4512
|
+
let k, x;
|
|
4519
4513
|
if (Kr(l.chartType))
|
|
4520
4514
|
k = /* @__PURE__ */ o("div", {
|
|
4521
4515
|
className: "csdk-h-[245px]",
|
|
4522
|
-
children: /* @__PURE__ */ o(Ae, T(
|
|
4516
|
+
children: /* @__PURE__ */ o(Ae, T(I({}, l), {
|
|
4523
4517
|
styleOptions: m
|
|
4524
4518
|
}))
|
|
4525
|
-
}),
|
|
4519
|
+
}), x = /* @__PURE__ */ o(Ae, T(I({}, l), {
|
|
4526
4520
|
styleOptions: {
|
|
4527
4521
|
header: {
|
|
4528
4522
|
hidden: !0
|
|
@@ -4530,28 +4524,28 @@ function Vn({
|
|
|
4530
4524
|
}
|
|
4531
4525
|
}));
|
|
4532
4526
|
else {
|
|
4533
|
-
const s = T(
|
|
4527
|
+
const s = T(I({}, d), {
|
|
4534
4528
|
header: {
|
|
4535
4529
|
hidden: !0
|
|
4536
4530
|
}
|
|
4537
|
-
}), p =
|
|
4531
|
+
}), p = I(T(I({}, d), {
|
|
4538
4532
|
legend: void 0,
|
|
4539
4533
|
xAxis: void 0,
|
|
4540
4534
|
yAxis: void 0
|
|
4541
4535
|
}), m);
|
|
4542
4536
|
delete p.legend, delete p.xAxis, delete p.yAxis, k = /* @__PURE__ */ o("div", {
|
|
4543
|
-
children: /* @__PURE__ */ o(Ae, T(
|
|
4537
|
+
children: /* @__PURE__ */ o(Ae, T(I({}, l), {
|
|
4544
4538
|
styleOptions: p
|
|
4545
4539
|
}))
|
|
4546
|
-
}),
|
|
4547
|
-
styleOptions:
|
|
4540
|
+
}), x = /* @__PURE__ */ o(Ae, T(I({}, l), {
|
|
4541
|
+
styleOptions: I({
|
|
4548
4542
|
cornerRadius: "None"
|
|
4549
4543
|
}, s)
|
|
4550
4544
|
}));
|
|
4551
4545
|
}
|
|
4552
4546
|
return {
|
|
4553
4547
|
inlineElement: k,
|
|
4554
|
-
expandedElement:
|
|
4548
|
+
expandedElement: x
|
|
4555
4549
|
};
|
|
4556
4550
|
}, [e]);
|
|
4557
4551
|
return /* @__PURE__ */ v(B, {
|
|
@@ -4608,7 +4602,7 @@ function Xn({
|
|
|
4608
4602
|
}) {
|
|
4609
4603
|
const {
|
|
4610
4604
|
themeSettings: a
|
|
4611
|
-
} =
|
|
4605
|
+
} = A(), {
|
|
4612
4606
|
t: r
|
|
4613
4607
|
} = j();
|
|
4614
4608
|
return /* @__PURE__ */ o(Ee, {
|
|
@@ -4647,7 +4641,7 @@ function el({
|
|
|
4647
4641
|
}) {
|
|
4648
4642
|
const {
|
|
4649
4643
|
themeSettings: a
|
|
4650
|
-
} =
|
|
4644
|
+
} = A(), {
|
|
4651
4645
|
t: r
|
|
4652
4646
|
} = j();
|
|
4653
4647
|
return /* @__PURE__ */ o(Ee, {
|
|
@@ -4695,16 +4689,16 @@ function ft({
|
|
|
4695
4689
|
buttonVisibility: r = "onHover",
|
|
4696
4690
|
renderContent: i
|
|
4697
4691
|
}) {
|
|
4698
|
-
const n = ne(), l = ei(z((
|
|
4692
|
+
const n = ne(), l = ei(z((x) => {
|
|
4699
4693
|
n && n.ai.sendFeedback({
|
|
4700
4694
|
sourceId: e,
|
|
4701
4695
|
type: a,
|
|
4702
4696
|
data: t,
|
|
4703
|
-
rating:
|
|
4697
|
+
rating: x
|
|
4704
4698
|
});
|
|
4705
4699
|
}, [n, e, t, a]), 200), [u, d] = ti(), m = R(() => r === "onHover" ? d : r !== "never", [d, r]), {
|
|
4706
4700
|
themeSettings: k
|
|
4707
|
-
} =
|
|
4701
|
+
} = A();
|
|
4708
4702
|
return /* @__PURE__ */ o(tl, {
|
|
4709
4703
|
ref: u,
|
|
4710
4704
|
theme: k,
|
|
@@ -4721,7 +4715,7 @@ function Nt({
|
|
|
4721
4715
|
const [t, a] = Z(!0), [r, i] = Z(!1), {
|
|
4722
4716
|
t: n
|
|
4723
4717
|
} = j(), l = be(null);
|
|
4724
|
-
return
|
|
4718
|
+
return Ue(() => {
|
|
4725
4719
|
l.current && i(l.current.scrollHeight > ta);
|
|
4726
4720
|
}, [e]), /* @__PURE__ */ v("div", {
|
|
4727
4721
|
className: "csdk-min-w-0 csdk-flex-1",
|
|
@@ -4776,7 +4770,7 @@ function nl({
|
|
|
4776
4770
|
enableInsights: r
|
|
4777
4771
|
} = le(), {
|
|
4778
4772
|
themeSettings: i
|
|
4779
|
-
} =
|
|
4773
|
+
} = A(), {
|
|
4780
4774
|
queryTitle: n,
|
|
4781
4775
|
chartRecommendations: l,
|
|
4782
4776
|
jaql: u,
|
|
@@ -4785,16 +4779,16 @@ function nl({
|
|
|
4785
4779
|
} = e;
|
|
4786
4780
|
console.debug(`JAQL for ${n}`, u), console.debug(`chart recommendations for ${n}`, l);
|
|
4787
4781
|
const k = "chartType" in l ? l.chartType : "table";
|
|
4788
|
-
let
|
|
4789
|
-
sl(k) ?
|
|
4790
|
-
const s = u.datasource.title, [p, c] = Z(!1),
|
|
4782
|
+
let x;
|
|
4783
|
+
sl(k) ? x = `an ${k}` : x = `a ${k}`, k !== "table" && (x += " chart");
|
|
4784
|
+
const s = u.datasource.title, [p, c] = Z(!1), h = z(() => {
|
|
4791
4785
|
c((y) => !y);
|
|
4792
|
-
}, []),
|
|
4786
|
+
}, []), g = {
|
|
4793
4787
|
jaql: {
|
|
4794
4788
|
datasource: u.datasource,
|
|
4795
4789
|
metadata: u.metadata
|
|
4796
4790
|
}
|
|
4797
|
-
},
|
|
4791
|
+
}, b = a === "analyze", _ = `${d}${d && m ? `
|
|
4798
4792
|
` : ""}${m}`;
|
|
4799
4793
|
return /* @__PURE__ */ v(B, {
|
|
4800
4794
|
children: [/* @__PURE__ */ o(ft, {
|
|
@@ -4807,24 +4801,24 @@ function nl({
|
|
|
4807
4801
|
children: [/* @__PURE__ */ o(rr, {
|
|
4808
4802
|
align: "left",
|
|
4809
4803
|
theme: i,
|
|
4810
|
-
children: _ || `Here's ${
|
|
4804
|
+
children: _ || `Here's ${x} showing ${Tn(n)}.`
|
|
4811
4805
|
}), y]
|
|
4812
|
-
}),
|
|
4806
|
+
}), b && /* @__PURE__ */ o(Vn, {
|
|
4813
4807
|
content: e
|
|
4814
4808
|
})]
|
|
4815
4809
|
})
|
|
4816
4810
|
}), r && /* @__PURE__ */ o(ft, {
|
|
4817
4811
|
sourceId: s,
|
|
4818
|
-
data:
|
|
4812
|
+
data: g,
|
|
4819
4813
|
type: "nlg/queryResult",
|
|
4820
4814
|
buttonVisibility: p ? "onHover" : "never",
|
|
4821
4815
|
renderContent: (y) => /* @__PURE__ */ v(B, {
|
|
4822
4816
|
children: [/* @__PURE__ */ v(aa, {
|
|
4823
4817
|
children: [/* @__PURE__ */ o(jn, {
|
|
4824
|
-
onClick:
|
|
4818
|
+
onClick: h
|
|
4825
4819
|
}), y]
|
|
4826
4820
|
}), p && /* @__PURE__ */ o(ol, {
|
|
4827
|
-
nlgRequest:
|
|
4821
|
+
nlgRequest: g
|
|
4828
4822
|
})]
|
|
4829
4823
|
})
|
|
4830
4824
|
})]
|
|
@@ -4862,7 +4856,7 @@ function pl({
|
|
|
4862
4856
|
} = j();
|
|
4863
4857
|
return /* @__PURE__ */ o(B, {
|
|
4864
4858
|
children: e.map((a, r) => /* @__PURE__ */ o(ai, {
|
|
4865
|
-
fallbackRender: (i) => dl(T(
|
|
4859
|
+
fallbackRender: (i) => dl(T(I({}, i), {
|
|
4866
4860
|
displayMessage: t("ai.errors.unexpected")
|
|
4867
4861
|
})),
|
|
4868
4862
|
children: /* @__PURE__ */ o(cl, {
|
|
@@ -4903,7 +4897,7 @@ function ul({
|
|
|
4903
4897
|
function gl() {
|
|
4904
4898
|
const {
|
|
4905
4899
|
themeSettings: e
|
|
4906
|
-
} =
|
|
4900
|
+
} = A();
|
|
4907
4901
|
return /* @__PURE__ */ o("svg", {
|
|
4908
4902
|
width: "24",
|
|
4909
4903
|
height: "24",
|
|
@@ -4953,7 +4947,7 @@ const hl = (e, t) => {
|
|
|
4953
4947
|
}) => {
|
|
4954
4948
|
const {
|
|
4955
4949
|
themeSettings: t
|
|
4956
|
-
} =
|
|
4950
|
+
} = A();
|
|
4957
4951
|
return /* @__PURE__ */ o(ml, {
|
|
4958
4952
|
theme: t,
|
|
4959
4953
|
onClick: e,
|
|
@@ -5019,7 +5013,7 @@ const hl = (e, t) => {
|
|
|
5019
5013
|
} = e.aiChat.suggestions;
|
|
5020
5014
|
if (t) {
|
|
5021
5015
|
const [r, i] = t;
|
|
5022
|
-
return
|
|
5016
|
+
return q`
|
|
5023
5017
|
border: none;
|
|
5024
5018
|
position: relative;
|
|
5025
5019
|
border-radius: ${a};
|
|
@@ -5048,7 +5042,7 @@ function ra({
|
|
|
5048
5042
|
}) {
|
|
5049
5043
|
const {
|
|
5050
5044
|
themeSettings: a
|
|
5051
|
-
} =
|
|
5045
|
+
} = A();
|
|
5052
5046
|
return /* @__PURE__ */ o(bl, {
|
|
5053
5047
|
onClick: t,
|
|
5054
5048
|
theme: a,
|
|
@@ -5071,7 +5065,7 @@ function yl({
|
|
|
5071
5065
|
t: a
|
|
5072
5066
|
} = j(), [r, i] = Z(!0), n = R(() => r && e.length > 5 ? e.slice(0, 4) : e, [e, r]), {
|
|
5073
5067
|
themeSettings: l
|
|
5074
|
-
} =
|
|
5068
|
+
} = A();
|
|
5075
5069
|
return /* @__PURE__ */ v(xl, {
|
|
5076
5070
|
"aria-label": "list of suggested questions",
|
|
5077
5071
|
theme: l,
|
|
@@ -5118,7 +5112,7 @@ const wl = C.div`
|
|
|
5118
5112
|
function Cl() {
|
|
5119
5113
|
const {
|
|
5120
5114
|
themeSettings: e
|
|
5121
|
-
} =
|
|
5115
|
+
} = A();
|
|
5122
5116
|
return /* @__PURE__ */ o(_l, {
|
|
5123
5117
|
children: Array.from({
|
|
5124
5118
|
length: 3
|
|
@@ -5201,33 +5195,33 @@ function Dl({
|
|
|
5201
5195
|
enableFollowupQuestions: d,
|
|
5202
5196
|
enableHeader: m,
|
|
5203
5197
|
numOfRecentPrompts: k,
|
|
5204
|
-
numOfRecommendations:
|
|
5198
|
+
numOfRecommendations: x,
|
|
5205
5199
|
customPrompt: s
|
|
5206
5200
|
} = le(), {
|
|
5207
5201
|
themeSettings: p
|
|
5208
|
-
} =
|
|
5202
|
+
} = A(), {
|
|
5209
5203
|
quotaState: c
|
|
5210
5204
|
} = Hr(), {
|
|
5211
|
-
data:
|
|
5212
|
-
isLoading:
|
|
5213
|
-
isError:
|
|
5205
|
+
data: h,
|
|
5206
|
+
isLoading: g,
|
|
5207
|
+
isError: b
|
|
5214
5208
|
} = ja({
|
|
5215
5209
|
contextTitle: e,
|
|
5216
|
-
count:
|
|
5210
|
+
count: x,
|
|
5217
5211
|
customPrompt: s
|
|
5218
|
-
}), _ = R(() =>
|
|
5212
|
+
}), _ = R(() => h == null ? void 0 : h.map((O) => O.nlqPrompt), [h]), {
|
|
5219
5213
|
history: y,
|
|
5220
|
-
lastNlqResponse:
|
|
5221
|
-
isAwaitingResponse:
|
|
5222
|
-
sendMessage:
|
|
5214
|
+
lastNlqResponse: S,
|
|
5215
|
+
isAwaitingResponse: D,
|
|
5216
|
+
sendMessage: M,
|
|
5223
5217
|
isLoading: L,
|
|
5224
5218
|
chatId: E,
|
|
5225
5219
|
lastError: J
|
|
5226
|
-
} = Po(e, a), X =
|
|
5227
|
-
mutate:
|
|
5220
|
+
} = Po(e, a), X = D || L || ((r = c == null ? void 0 : c.isExceeded) != null ? r : !1), {
|
|
5221
|
+
mutate: Y,
|
|
5228
5222
|
isLoading: F
|
|
5229
|
-
} = Ea(E), [
|
|
5230
|
-
|
|
5223
|
+
} = Ea(E), [U, P] = Z(!1), [K, ee] = Z(!1), V = () => P(!0), W = () => P(!1), Q = () => {
|
|
5224
|
+
Y(), W();
|
|
5231
5225
|
}, $ = be(null), he = be(null), _e = () => {
|
|
5232
5226
|
if (!($ != null && $.current))
|
|
5233
5227
|
return;
|
|
@@ -5241,9 +5235,9 @@ function Dl({
|
|
|
5241
5235
|
const $e = We - O - te > te / 2;
|
|
5242
5236
|
K !== $e && ee($e);
|
|
5243
5237
|
};
|
|
5244
|
-
|
|
5238
|
+
Ue(() => {
|
|
5245
5239
|
$.current && ($.current.scrollTop = $.current.scrollHeight);
|
|
5246
|
-
}, [y,
|
|
5240
|
+
}, [y, U, D]);
|
|
5247
5241
|
const ue = be(null), Ze = m ? /* @__PURE__ */ o(Wa, {
|
|
5248
5242
|
ref: ue,
|
|
5249
5243
|
title: e,
|
|
@@ -5274,26 +5268,26 @@ function Dl({
|
|
|
5274
5268
|
}
|
|
5275
5269
|
}), /* @__PURE__ */ o(In, {}), /* @__PURE__ */ o(vl, {
|
|
5276
5270
|
questions: _ || [],
|
|
5277
|
-
isLoading:
|
|
5278
|
-
onSelection:
|
|
5271
|
+
isLoading: g,
|
|
5272
|
+
onSelection: M
|
|
5279
5273
|
}), J && /* @__PURE__ */ o(pe, {
|
|
5280
5274
|
align: "left",
|
|
5281
5275
|
children: J.message
|
|
5282
5276
|
}), L ? /* @__PURE__ */ o(et, {}) : /* @__PURE__ */ o(pl, {
|
|
5283
5277
|
messages: y
|
|
5284
|
-
}), d &&
|
|
5278
|
+
}), d && S && ((n = (i = S.followupQuestions) == null ? void 0 : i.length) != null ? n : 0) > 0 && /* @__PURE__ */ o(Il, {
|
|
5285
5279
|
theme: p,
|
|
5286
|
-
children: (l =
|
|
5280
|
+
children: (l = S.followupQuestions) == null ? void 0 : l.slice(0, 2).map((O, te) => /* @__PURE__ */ o(Ve, {
|
|
5287
5281
|
align: "left",
|
|
5288
5282
|
onClick: () => {
|
|
5289
|
-
|
|
5283
|
+
M(O);
|
|
5290
5284
|
},
|
|
5291
5285
|
children: /* @__PURE__ */ o("div", {
|
|
5292
5286
|
className: "csdk-py-[7px] csdk-px-4",
|
|
5293
5287
|
children: O
|
|
5294
5288
|
})
|
|
5295
5289
|
}, te))
|
|
5296
|
-
}), (
|
|
5290
|
+
}), (D || F) && /* @__PURE__ */ o(Dt, {}), U && /* @__PURE__ */ o(Ln, {
|
|
5297
5291
|
onCancel: W,
|
|
5298
5292
|
onConfirm: Q
|
|
5299
5293
|
})]
|
|
@@ -5301,13 +5295,13 @@ function Dl({
|
|
|
5301
5295
|
ref: he,
|
|
5302
5296
|
theme: p,
|
|
5303
5297
|
children: [/* @__PURE__ */ o(us, {
|
|
5304
|
-
onSendMessage:
|
|
5298
|
+
onSendMessage: M,
|
|
5305
5299
|
disabled: X,
|
|
5306
5300
|
onClearHistoryClick: V,
|
|
5307
5301
|
suggestions: _ || [],
|
|
5308
5302
|
recentPrompts: at,
|
|
5309
|
-
isLoading:
|
|
5310
|
-
recommendationsError:
|
|
5303
|
+
isLoading: g || L,
|
|
5304
|
+
recommendationsError: b,
|
|
5311
5305
|
onChange: W
|
|
5312
5306
|
}), /* @__PURE__ */ o(Vo, {
|
|
5313
5307
|
theme: p
|
|
@@ -5362,7 +5356,7 @@ function jl(e) {
|
|
|
5362
5356
|
onClick: r
|
|
5363
5357
|
} = e, {
|
|
5364
5358
|
themeSettings: i
|
|
5365
|
-
} =
|
|
5359
|
+
} = A();
|
|
5366
5360
|
return /* @__PURE__ */ v(Al, {
|
|
5367
5361
|
onClick: r,
|
|
5368
5362
|
theme: i,
|
|
@@ -5410,7 +5404,7 @@ function Rl(e) {
|
|
|
5410
5404
|
dataTopics: t
|
|
5411
5405
|
} = e, {
|
|
5412
5406
|
themeSettings: a
|
|
5413
|
-
} =
|
|
5407
|
+
} = A(), {
|
|
5414
5408
|
t: r
|
|
5415
5409
|
} = j();
|
|
5416
5410
|
return /* @__PURE__ */ v(zl, {
|
|
@@ -5420,7 +5414,7 @@ function Rl(e) {
|
|
|
5420
5414
|
}), /* @__PURE__ */ v(El, {
|
|
5421
5415
|
theme: a,
|
|
5422
5416
|
children: [r("ai.chatbotDescription"), /* @__PURE__ */ o("br", {}), /* @__PURE__ */ o("br", {}), r("ai.topicSelectPrompt")]
|
|
5423
|
-
}), t.map((i) => /* @__PURE__ */ ri(jl, T(
|
|
5417
|
+
}), t.map((i) => /* @__PURE__ */ ri(jl, T(I({}, i), {
|
|
5424
5418
|
key: i.title
|
|
5425
5419
|
})))]
|
|
5426
5420
|
});
|
|
@@ -5509,12 +5503,12 @@ function Gl({
|
|
|
5509
5503
|
enableHeader: a
|
|
5510
5504
|
} = le(), {
|
|
5511
5505
|
themeSettings: r
|
|
5512
|
-
} =
|
|
5506
|
+
} = A(), {
|
|
5513
5507
|
t: i
|
|
5514
5508
|
} = j(), n = R(() => e == null ? void 0 : e.map((u) => ({
|
|
5515
5509
|
title: u,
|
|
5516
5510
|
onClick: () => t(u)
|
|
5517
|
-
})), [e, t]), l = Ur(
|
|
5511
|
+
})), [e, t]), l = Yr(Ur(r.aiChat.header.backgroundColor)) > 0.5;
|
|
5518
5512
|
return /* @__PURE__ */ v(B, {
|
|
5519
5513
|
children: [a ? /* @__PURE__ */ o(Wa, {
|
|
5520
5514
|
title: i("ai.analyticsChatbot"),
|
|
@@ -5543,9 +5537,9 @@ function Hl() {
|
|
|
5543
5537
|
t: d
|
|
5544
5538
|
} = j(), m = d("ai.errors.noAvailableDataTopics"), k = z((c) => {
|
|
5545
5539
|
c.length ? c.length === 1 && (r(void 0), t(c[0])) : r(m);
|
|
5546
|
-
}, [m]),
|
|
5540
|
+
}, [m]), x = R(() => {
|
|
5547
5541
|
if (i && n === "idle") {
|
|
5548
|
-
const c = (l != null && l.length ? i == null ? void 0 : i.filter((
|
|
5542
|
+
const c = (l != null && l.length ? i == null ? void 0 : i.filter((h) => l == null ? void 0 : l.includes(h.title)) : i).map((h) => h.title);
|
|
5549
5543
|
return k(c), c;
|
|
5550
5544
|
}
|
|
5551
5545
|
return [];
|
|
@@ -5558,12 +5552,12 @@ function Hl() {
|
|
|
5558
5552
|
text: d("ai.buttons.refresh"),
|
|
5559
5553
|
onClick: p
|
|
5560
5554
|
}
|
|
5561
|
-
}) :
|
|
5555
|
+
}) : x.length === 1 && !e ? /* @__PURE__ */ o(et, {}) : e ? /* @__PURE__ */ o(Dl, {
|
|
5562
5556
|
contextTitle: e,
|
|
5563
5557
|
contextDetails: u,
|
|
5564
|
-
onGoBack:
|
|
5558
|
+
onGoBack: x.length === 1 ? void 0 : () => t(void 0)
|
|
5565
5559
|
}) : /* @__PURE__ */ o(Gl, {
|
|
5566
|
-
dataTopicsList:
|
|
5560
|
+
dataTopicsList: x,
|
|
5567
5561
|
onDataTopicClick: (c) => t(c)
|
|
5568
5562
|
});
|
|
5569
5563
|
}
|
|
@@ -5576,10 +5570,10 @@ const dc = ua({
|
|
|
5576
5570
|
config: r
|
|
5577
5571
|
} = e, {
|
|
5578
5572
|
themeSettings: i
|
|
5579
|
-
} =
|
|
5573
|
+
} = A();
|
|
5580
5574
|
return /* @__PURE__ */ o(zo, {
|
|
5581
5575
|
value: r ?? {},
|
|
5582
|
-
children: /* @__PURE__ */ o(
|
|
5576
|
+
children: /* @__PURE__ */ o(Uo, {
|
|
5583
5577
|
id: "csdk-chatbot-frame",
|
|
5584
5578
|
width: t,
|
|
5585
5579
|
height: a,
|
|
@@ -5635,7 +5629,7 @@ function Bl({
|
|
|
5635
5629
|
})]
|
|
5636
5630
|
});
|
|
5637
5631
|
}
|
|
5638
|
-
const
|
|
5632
|
+
const Yl = C.div`
|
|
5639
5633
|
display: flex;
|
|
5640
5634
|
flex-direction: row;
|
|
5641
5635
|
align-items: center;
|
|
@@ -5648,7 +5642,7 @@ const Ul = C.div`
|
|
|
5648
5642
|
background-color: ${({
|
|
5649
5643
|
theme: e
|
|
5650
5644
|
}) => e.chart.backgroundColor};
|
|
5651
|
-
`,
|
|
5645
|
+
`, Ul = C.div`
|
|
5652
5646
|
align-self: flex-start;
|
|
5653
5647
|
`, Ql = ({
|
|
5654
5648
|
summary: e,
|
|
@@ -5656,15 +5650,15 @@ const Ul = C.div`
|
|
|
5656
5650
|
}) => {
|
|
5657
5651
|
const {
|
|
5658
5652
|
themeSettings: a
|
|
5659
|
-
} =
|
|
5653
|
+
} = A();
|
|
5660
5654
|
return /* @__PURE__ */ o(ft, {
|
|
5661
5655
|
sourceId: t.jaql.datasource.title,
|
|
5662
5656
|
data: t,
|
|
5663
5657
|
type: "chart/insights",
|
|
5664
5658
|
buttonVisibility: "always",
|
|
5665
|
-
renderContent: (r) => /* @__PURE__ */ v(
|
|
5659
|
+
renderContent: (r) => /* @__PURE__ */ v(Yl, {
|
|
5666
5660
|
theme: a,
|
|
5667
|
-
children: [/* @__PURE__ */ o(
|
|
5661
|
+
children: [/* @__PURE__ */ o(Ul, {
|
|
5668
5662
|
theme: a,
|
|
5669
5663
|
children: /* @__PURE__ */ o(Bl, {
|
|
5670
5664
|
theme: a
|
|
@@ -5682,7 +5676,7 @@ const Ul = C.div`
|
|
|
5682
5676
|
filters: i = []
|
|
5683
5677
|
}) {
|
|
5684
5678
|
const n = e.timestamp, l = R(
|
|
5685
|
-
() => T(
|
|
5679
|
+
() => T(I({}, e), {
|
|
5686
5680
|
queryTitle: zr(e.queryTitle)
|
|
5687
5681
|
}),
|
|
5688
5682
|
// Memoize based on timestamp to prevent unnecessary recomputations
|
|
@@ -5694,30 +5688,30 @@ const Ul = C.div`
|
|
|
5694
5688
|
initialFilters: i
|
|
5695
5689
|
}), [d, m] = Z(null);
|
|
5696
5690
|
we(() => {
|
|
5697
|
-
const
|
|
5691
|
+
const h = Oe(l, {
|
|
5698
5692
|
useCustomizedStyleOptions: !0
|
|
5699
5693
|
});
|
|
5700
|
-
if (!
|
|
5694
|
+
if (!h)
|
|
5701
5695
|
m(null);
|
|
5702
5696
|
else {
|
|
5703
|
-
a &&
|
|
5704
|
-
const
|
|
5697
|
+
a && h.styleOptions && (h.styleOptions = De(h.styleOptions, a));
|
|
5698
|
+
const g = u(h, {
|
|
5705
5699
|
shouldAffectFilters: !1,
|
|
5706
5700
|
applyMode: "filter"
|
|
5707
5701
|
});
|
|
5708
|
-
m(
|
|
5702
|
+
m(g);
|
|
5709
5703
|
}
|
|
5710
5704
|
}, [l, u, a]);
|
|
5711
5705
|
const k = R(() => {
|
|
5712
|
-
const
|
|
5713
|
-
return T(
|
|
5714
|
-
jaql: T(
|
|
5715
|
-
metadata:
|
|
5706
|
+
const h = d && Ne(d) ? Er(d == null ? void 0 : d.filters) : [], g = l.jaql.metadata.filter((b) => !b.jaql.filter).concat(h.filter((b) => !b.config.disabled).map((b) => b.jaql()));
|
|
5707
|
+
return T(I({}, l), {
|
|
5708
|
+
jaql: T(I({}, l.jaql), {
|
|
5709
|
+
metadata: g
|
|
5716
5710
|
}),
|
|
5717
5711
|
verbosity: "Low"
|
|
5718
5712
|
});
|
|
5719
5713
|
}, [l, d]), {
|
|
5720
|
-
data:
|
|
5714
|
+
data: x,
|
|
5721
5715
|
isLoading: s,
|
|
5722
5716
|
isError: p
|
|
5723
5717
|
} = Ke(k);
|
|
@@ -5725,15 +5719,15 @@ const Ul = C.div`
|
|
|
5725
5719
|
return /* @__PURE__ */ o(Dt, {});
|
|
5726
5720
|
if (!Ne(d))
|
|
5727
5721
|
return /* @__PURE__ */ o(B, {});
|
|
5728
|
-
const c = r || T(
|
|
5722
|
+
const c = r || T(I({}, d), {
|
|
5729
5723
|
styleOptions: a,
|
|
5730
5724
|
onDataReady: t
|
|
5731
5725
|
});
|
|
5732
|
-
return /* @__PURE__ */ o(Ae, T(
|
|
5726
|
+
return /* @__PURE__ */ o(Ae, T(I({}, c), {
|
|
5733
5727
|
highlightSelectionDisabled: !0,
|
|
5734
|
-
topSlot:
|
|
5728
|
+
topSlot: x && !p && /* @__PURE__ */ o(Ql, {
|
|
5735
5729
|
nlgRequest: k,
|
|
5736
|
-
summary:
|
|
5730
|
+
summary: x
|
|
5737
5731
|
})
|
|
5738
5732
|
}));
|
|
5739
5733
|
}, Fl), Vl = new la({
|
|
@@ -5765,7 +5759,7 @@ function hc(e, t, a) {
|
|
|
5765
5759
|
if (!i)
|
|
5766
5760
|
throw new Error("Only chart or pivot widget props are supported");
|
|
5767
5761
|
const n = yield xt(t, i, {
|
|
5768
|
-
|
|
5762
|
+
isUnified: a == null ? void 0 : a.isUnified,
|
|
5769
5763
|
isSisenseAiEnabled: a == null ? void 0 : a.isSisenseAiEnabled
|
|
5770
5764
|
});
|
|
5771
5765
|
if (!((r = n == null ? void 0 : n.data) != null && r.answer))
|