@sisense/sdk-ui-preact 2.14.0 → 2.16.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 +424 -34
- package/dist/ai.js +1358 -1096
- package/dist/index.cjs +1549 -32
- package/dist/index.js +8339 -6719
- package/dist/{use-common-filters-BGrn7zoW-a71b747c.js → use-common-filters-CxoO7TzT-0b1a1295.js} +59653 -51984
- package/dist/use-common-filters-CxoO7TzT-4f2d0550.cjs +1514 -0
- package/package.json +3 -3
- package/dist/use-common-filters-BGrn7zoW-a4095d79.cjs +0 -1020
package/dist/ai.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { w as
|
|
2
|
-
let
|
|
1
|
+
import { w as Ke, b as Jt, cj as ia, fA as oa, fB as na, fC as la, fD as sa, fE as da, fF as ca, j as Ae, bU as Ge, bT as pa, cX as ua, b_ as ga, bC as P, fG as De, aU as ht, cz as nt, bf as ha, aM as We, fH as ma, fI as fa, cE as Xt, aa as ba, e_ as xa, S as Kt, K as Qe, ax as er, U as _, V as $, Z as tr, $ as ka, x as Fe, fJ as ya, fK as wa, a3 as be, fL as rr, a4 as _a, k as f, P as ar, as as Ca, a6 as ir, g as or, L as D, l as n, q as E, aw as Y, fM as va, aR as Sa, aF as Ma, T as q, bK as ke, F as j, aN as mt, r as R, y as ye, m as v, ai as Ia, bN as Da, A as ue, fN as Aa, aK as _e, ac as et, u as Ce, fO as La, fP as Ta, bW as Na, bY as ja, cY as Ie, dG as nr, aI as ft, n as Oa, fQ as Te, cg as Ea, fR as At, a as Be, fS as za, fT as Ra, fU as lr, fV as Za, fW as Wa, cV as $a, cW as qa, fX as Pa, fY as Ga, fZ as Ba, bk as Ha, f_ as Ya, dY as Ua, cw as Qa, ci as Fa, f$ as Va, d6 as sr, g0 as Ja, ag as Xa, _ as Ka, eH as ei, d4 as ti, g1 as ri } from "./use-common-filters-CxoO7TzT-0b1a1295.js";
|
|
2
|
+
let dr = class extends Jt {
|
|
3
3
|
constructor(t, r) {
|
|
4
4
|
var a;
|
|
5
|
-
super((a = t.jaql.title) !== null && a !== void 0 ? a : "", r), this.__serializable = "JaqlElement", this.expression = t.jaql.dim || t.jaql.formula, this.metadataItem = t, t.jaql.agg ? this.aggregation = t.jaql.agg : delete this.aggregation, t.jaql.formula ? this.formula = t.jaql.formula : delete this.formula, t.jaql.sort ? this.sortType =
|
|
5
|
+
super((a = t.jaql.title) !== null && a !== void 0 ? a : "", r), this.__serializable = "JaqlElement", this.expression = t.jaql.dim || t.jaql.formula, this.metadataItem = t, t.jaql.agg ? this.aggregation = t.jaql.agg : delete this.aggregation, t.jaql.formula ? this.formula = t.jaql.formula : delete this.formula, t.jaql.sort ? this.sortType = ia(t.jaql.sort) : delete this.sortType, this.skipValidation = !0;
|
|
6
6
|
}
|
|
7
7
|
get id() {
|
|
8
8
|
return this.expression;
|
|
@@ -18,23 +18,23 @@ let sr = class extends Vt {
|
|
|
18
18
|
return t.metadataItem = this.metadataItem, t.type = this.type, t;
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
|
-
const
|
|
22
|
-
text:
|
|
23
|
-
numeric:
|
|
24
|
-
datetime:
|
|
21
|
+
const ai = {
|
|
22
|
+
text: Ke.TextAttribute,
|
|
23
|
+
numeric: Ke.NumericAttribute,
|
|
24
|
+
datetime: Ke.DateLevel
|
|
25
25
|
};
|
|
26
|
-
function
|
|
26
|
+
function ii(e) {
|
|
27
27
|
var t;
|
|
28
|
-
return new
|
|
28
|
+
return new dr(e, (t = ai[e.jaql.datatype]) !== null && t !== void 0 ? t : "numeric");
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function cr(e) {
|
|
31
31
|
const {
|
|
32
32
|
jaql: t
|
|
33
33
|
} = e;
|
|
34
34
|
if (t.formula)
|
|
35
|
-
return
|
|
36
|
-
const r =
|
|
37
|
-
return "agg" in t && t.dim && t.datatype ?
|
|
35
|
+
return oa(t);
|
|
36
|
+
const r = na(t);
|
|
37
|
+
return "agg" in t && t.dim && t.datatype ? la({
|
|
38
38
|
expression: t.dim,
|
|
39
39
|
dataType: t.datatype,
|
|
40
40
|
agg: t.agg || "",
|
|
@@ -43,7 +43,7 @@ function dr(e) {
|
|
|
43
43
|
sort: t.sort,
|
|
44
44
|
title: t.title,
|
|
45
45
|
dataSource: t.datasource
|
|
46
|
-
}) : t.dim && t.datatype ?
|
|
46
|
+
}) : t.dim && t.datatype ? sa({
|
|
47
47
|
expression: t.dim,
|
|
48
48
|
dataType: t.datatype,
|
|
49
49
|
granularity: r,
|
|
@@ -51,57 +51,57 @@ function dr(e) {
|
|
|
51
51
|
title: t.title,
|
|
52
52
|
panel: e.panel,
|
|
53
53
|
dataSource: t.datasource
|
|
54
|
-
}) :
|
|
54
|
+
}) : ii(e);
|
|
55
55
|
}
|
|
56
|
-
const
|
|
57
|
-
var
|
|
56
|
+
const oi = (e) => "dashboardOid" in e && "widgetOid" in e;
|
|
57
|
+
var ni = Object.defineProperty, li = Object.defineProperties, si = Object.getOwnPropertyDescriptors, He = Object.getOwnPropertySymbols, pr = Object.prototype.hasOwnProperty, ur = Object.prototype.propertyIsEnumerable, Lt = (e, t, r) => t in e ? ni(e, t, {
|
|
58
58
|
enumerable: !0,
|
|
59
59
|
configurable: !0,
|
|
60
60
|
writable: !0,
|
|
61
61
|
value: r
|
|
62
62
|
}) : e[t] = r, O = (e, t) => {
|
|
63
63
|
for (var r in t || (t = {}))
|
|
64
|
-
|
|
64
|
+
pr.call(t, r) && Lt(e, r, t[r]);
|
|
65
65
|
if (He)
|
|
66
66
|
for (var r of He(t))
|
|
67
|
-
|
|
67
|
+
ur.call(t, r) && Lt(e, r, t[r]);
|
|
68
68
|
return e;
|
|
69
|
-
},
|
|
69
|
+
}, te = (e, t) => li(e, si(t)), di = (e, t) => {
|
|
70
70
|
var r = {};
|
|
71
71
|
for (var a in e)
|
|
72
|
-
|
|
72
|
+
pr.call(e, a) && t.indexOf(a) < 0 && (r[a] = e[a]);
|
|
73
73
|
if (e != null && He)
|
|
74
74
|
for (var a of He(e))
|
|
75
|
-
t.indexOf(a) < 0 &&
|
|
75
|
+
t.indexOf(a) < 0 && ur.call(e, a) && (r[a] = e[a]);
|
|
76
76
|
return r;
|
|
77
77
|
};
|
|
78
|
-
function
|
|
78
|
+
function ci(e) {
|
|
79
79
|
return e.replace(/\s+/g, "-").replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function pi(e) {
|
|
82
82
|
return !e || !e.jaql.datasource.title || !e.jaql.metadata.length;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
if (![...
|
|
86
|
-
throw new
|
|
84
|
+
function gr(e) {
|
|
85
|
+
if (![...ca, "pivot", "pivot2"].includes(e))
|
|
86
|
+
throw new Ae("errors.chartTypeNotSupported", {
|
|
87
87
|
chartType: e
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function ui(e) {
|
|
91
91
|
return "widgetType" in e && e.widgetType === "pivot";
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function fe(e) {
|
|
94
94
|
var t;
|
|
95
95
|
return "column" in e && ((t = e.column) == null ? void 0 : t.expression) && /\(.*\)/.test(e.column.expression);
|
|
96
96
|
}
|
|
97
|
-
function
|
|
98
|
-
const t = "measures" in e &&
|
|
99
|
-
return
|
|
97
|
+
function Tt(e) {
|
|
98
|
+
const t = "measures" in e && ee(e.measures) || "values" in e && ee(e.values);
|
|
99
|
+
return ui(e) ? "values" in e.dataOptions && ee(e.dataOptions.values) : "chartType" in e ? e.chartType === "indicator" ? "value" in e.dataOptions && ee(e.dataOptions.value) || "secondary" in e.dataOptions && ee(e.dataOptions.secondary) : e.chartType === "table" ? !("columns" in e.dataOptions) || !ee(e.dataOptions.columns) ? !1 : e.dataOptions.columns.some((r) => fe(r)) : e.chartType === "boxplot" ? !1 : e.chartType === "scatter" ? "x" in e.dataOptions && e.dataOptions.x !== void 0 && fe(e.dataOptions.x) || "y" in e.dataOptions && e.dataOptions.y !== void 0 && fe(e.dataOptions.y) || "size" in e.dataOptions && e.dataOptions.size !== void 0 : e.chartType === "scattermap" ? "colorBy" in e.dataOptions && e.dataOptions.colorBy !== void 0 && fe(e.dataOptions.colorBy) || "details" in e.dataOptions && e.dataOptions.details !== void 0 && fe(e.dataOptions.details) || "size" in e.dataOptions && e.dataOptions.size !== void 0 && fe(e.dataOptions.size) : e.chartType === "areamap" ? "geo" in e.dataOptions && ee(e.dataOptions.geo) && "color" in e.dataOptions && ee(e.dataOptions.color) : "value" in e.dataOptions && ee(e.dataOptions.value) : t;
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function ee(e) {
|
|
102
102
|
return Array.isArray(e) && e.length > 0;
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function gi(e) {
|
|
105
105
|
const t = e.split(`
|
|
106
106
|
`);
|
|
107
107
|
for (let r = 0; r < t.length - 1; r++)
|
|
@@ -115,7 +115,7 @@ function ui(e) {
|
|
|
115
115
|
return t.join(`
|
|
116
116
|
`);
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function hi(e) {
|
|
119
119
|
const t = (a) => /^[$A-Z_][0-9A-Z_$]*$/i.test(a);
|
|
120
120
|
if ("composeCode" in e)
|
|
121
121
|
return e;
|
|
@@ -126,7 +126,7 @@ function gi(e) {
|
|
|
126
126
|
}
|
|
127
127
|
return r;
|
|
128
128
|
}
|
|
129
|
-
const
|
|
129
|
+
const mi = {
|
|
130
130
|
react: {
|
|
131
131
|
baseChartTmpl: `import { {{componentString}} } from '@sisense/sdk-ui';
|
|
132
132
|
{{extraImportsString}}
|
|
@@ -581,10 +581,10 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
|
|
|
581
581
|
</template>`,
|
|
582
582
|
dashboardTmpl: "/** COMING SOON */"
|
|
583
583
|
}
|
|
584
|
-
},
|
|
585
|
-
const a =
|
|
586
|
-
return
|
|
587
|
-
},
|
|
584
|
+
}, hr = (e, t) => mi[t][e].replace(/{{(.*?)Tmpl}}/g, (r, a) => hr(`${a}Tmpl`, t)), fi = (e, t) => e.replace(/{{(.*?)}}/g, (r, a) => a in t ? t[a] : (console.warn(`Placeholder ${a} not found in data`), r)), lt = (e, t, r = "react") => {
|
|
585
|
+
const a = hr(e, r);
|
|
586
|
+
return gi(fi(a, t));
|
|
587
|
+
}, bi = () => Object.values(fa).map((e) => Xt.aggregationToJAQL(e)).join("|"), mr = (e) => {
|
|
588
588
|
const {
|
|
589
589
|
formula: t,
|
|
590
590
|
context: r,
|
|
@@ -598,7 +598,7 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
|
|
|
598
598
|
const l = i[0];
|
|
599
599
|
if (typeof l != "string")
|
|
600
600
|
return e;
|
|
601
|
-
const s = r[`${l}`], u =
|
|
601
|
+
const s = r[`${l}`], u = bi(), c = new RegExp(`^\\s*(${u})\\(\\[\\w+\\]\\)$`), g = t.match(c);
|
|
602
602
|
if (g && t.includes(l)) {
|
|
603
603
|
const b = g[1];
|
|
604
604
|
return O({
|
|
@@ -613,16 +613,16 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
|
|
|
613
613
|
} : {});
|
|
614
614
|
}
|
|
615
615
|
return e;
|
|
616
|
-
},
|
|
616
|
+
}, $e = (e) => {
|
|
617
617
|
let t = e;
|
|
618
|
-
if ("formula" in e && (t =
|
|
618
|
+
if ("formula" in e && (t = mr(e)), "context" in t) {
|
|
619
619
|
const r = O({}, t.context);
|
|
620
620
|
Object.keys(r).forEach((a) => {
|
|
621
|
-
r[`${a}`] =
|
|
621
|
+
r[`${a}`] = $e(r[`${a}`]);
|
|
622
622
|
}), t.context = r;
|
|
623
623
|
}
|
|
624
624
|
return t;
|
|
625
|
-
},
|
|
625
|
+
}, xi = (e) => {
|
|
626
626
|
var t;
|
|
627
627
|
const r = e;
|
|
628
628
|
if (r.panel !== "scope")
|
|
@@ -630,26 +630,26 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
|
|
|
630
630
|
const {
|
|
631
631
|
jaql: a
|
|
632
632
|
} = r;
|
|
633
|
-
return (t = a.filter) != null && t.by && (a.filter.by =
|
|
633
|
+
return (t = a.filter) != null && t.by && (a.filter.by = mr(a.filter.by)), te(O({}, r), {
|
|
634
634
|
jaql: a
|
|
635
635
|
});
|
|
636
|
-
},
|
|
636
|
+
}, ki = (e) => {
|
|
637
637
|
let t = e;
|
|
638
|
-
t =
|
|
638
|
+
t = xi(t);
|
|
639
639
|
const {
|
|
640
640
|
jaql: r,
|
|
641
641
|
measure: a,
|
|
642
642
|
by: i
|
|
643
643
|
} = t;
|
|
644
|
-
return O(O(
|
|
645
|
-
jaql:
|
|
644
|
+
return O(O(te(O({}, t), {
|
|
645
|
+
jaql: $e(r)
|
|
646
646
|
}), i ? {
|
|
647
|
-
by:
|
|
647
|
+
by: $e(i)
|
|
648
648
|
} : {}), a ? {
|
|
649
|
-
measure:
|
|
649
|
+
measure: $e(a)
|
|
650
650
|
} : {});
|
|
651
651
|
}, qe = 6;
|
|
652
|
-
function
|
|
652
|
+
function yi(e) {
|
|
653
653
|
switch (e) {
|
|
654
654
|
case "line":
|
|
655
655
|
case "area":
|
|
@@ -699,7 +699,7 @@ function ki(e) {
|
|
|
699
699
|
return {};
|
|
700
700
|
}
|
|
701
701
|
}
|
|
702
|
-
const
|
|
702
|
+
const wi = {
|
|
703
703
|
subtype: "indicator/numeric",
|
|
704
704
|
numericSubtype: "numericSimple",
|
|
705
705
|
skin: "vertical",
|
|
@@ -718,7 +718,7 @@ const yi = {
|
|
|
718
718
|
shouldBeShown: !1
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
|
-
},
|
|
721
|
+
}, _i = {
|
|
722
722
|
legend: {
|
|
723
723
|
enabled: !0,
|
|
724
724
|
position: "bottom"
|
|
@@ -794,7 +794,7 @@ const yi = {
|
|
|
794
794
|
size: "small",
|
|
795
795
|
fill: "filled"
|
|
796
796
|
}
|
|
797
|
-
},
|
|
797
|
+
}, vi = {
|
|
798
798
|
subtype: "area/basic",
|
|
799
799
|
lineWidth: {
|
|
800
800
|
width: "bold"
|
|
@@ -804,11 +804,11 @@ const yi = {
|
|
|
804
804
|
size: "small",
|
|
805
805
|
fill: "filled"
|
|
806
806
|
}
|
|
807
|
-
}, vi = {
|
|
808
|
-
subtype: "bar/classic"
|
|
809
807
|
}, Si = {
|
|
810
|
-
subtype: "
|
|
808
|
+
subtype: "bar/classic"
|
|
811
809
|
}, Mi = {
|
|
810
|
+
subtype: "column/classic"
|
|
811
|
+
}, Ii = {
|
|
812
812
|
subtype: "polar/column",
|
|
813
813
|
yAxis: {
|
|
814
814
|
enabled: !0,
|
|
@@ -830,10 +830,10 @@ const yi = {
|
|
|
830
830
|
categoriesCapacity: 200
|
|
831
831
|
}
|
|
832
832
|
};
|
|
833
|
-
function
|
|
834
|
-
return
|
|
833
|
+
function ve(e) {
|
|
834
|
+
return ba({}, _i, e);
|
|
835
835
|
}
|
|
836
|
-
const
|
|
836
|
+
const Di = {
|
|
837
837
|
subtype: "pie/classic",
|
|
838
838
|
legend: {
|
|
839
839
|
enabled: !1,
|
|
@@ -856,7 +856,7 @@ const Ii = {
|
|
|
856
856
|
minimalIndependentSlicePercentage: 3,
|
|
857
857
|
selectedConvolutionType: "byPercentage"
|
|
858
858
|
}
|
|
859
|
-
},
|
|
859
|
+
}, Ai = {
|
|
860
860
|
legend: {
|
|
861
861
|
enabled: !1,
|
|
862
862
|
position: "left"
|
|
@@ -871,7 +871,7 @@ const Ii = {
|
|
|
871
871
|
funnelSize: "regular",
|
|
872
872
|
funnelType: "regular",
|
|
873
873
|
funnelDirection: "regular"
|
|
874
|
-
},
|
|
874
|
+
}, Li = {
|
|
875
875
|
rowsPerPage: 25,
|
|
876
876
|
isAutoHeight: !0,
|
|
877
877
|
rowHeight: null,
|
|
@@ -880,7 +880,7 @@ const Ii = {
|
|
|
880
880
|
headersColor: !1,
|
|
881
881
|
membersColor: !1,
|
|
882
882
|
totalsColor: !1
|
|
883
|
-
},
|
|
883
|
+
}, Ti = {
|
|
884
884
|
labels: {
|
|
885
885
|
category: [{
|
|
886
886
|
enabled: !0
|
|
@@ -893,8 +893,8 @@ const Ii = {
|
|
|
893
893
|
tooltip: {
|
|
894
894
|
mode: "value"
|
|
895
895
|
}
|
|
896
|
-
},
|
|
897
|
-
subtype:
|
|
896
|
+
}, Ni = {
|
|
897
|
+
subtype: xa.SUBTYPE,
|
|
898
898
|
viewType: "month",
|
|
899
899
|
startOfWeek: "sunday",
|
|
900
900
|
cellLabels: {
|
|
@@ -911,7 +911,7 @@ const Ii = {
|
|
|
911
911
|
cellColor: "#e6e6e6",
|
|
912
912
|
hideValues: !0
|
|
913
913
|
}
|
|
914
|
-
},
|
|
914
|
+
}, ji = {
|
|
915
915
|
legend: {
|
|
916
916
|
enabled: !0,
|
|
917
917
|
position: "bottom"
|
|
@@ -919,7 +919,7 @@ const Ii = {
|
|
|
919
919
|
tooltip: {
|
|
920
920
|
mode: "value"
|
|
921
921
|
}
|
|
922
|
-
},
|
|
922
|
+
}, Oi = {
|
|
923
923
|
legend: {
|
|
924
924
|
enabled: !0,
|
|
925
925
|
position: "bottom"
|
|
@@ -971,7 +971,7 @@ const Ii = {
|
|
|
971
971
|
scatterBubbleMinSize: 10,
|
|
972
972
|
scatterBubbleMaxSize: 10
|
|
973
973
|
}
|
|
974
|
-
},
|
|
974
|
+
}, Ei = {
|
|
975
975
|
header: {
|
|
976
976
|
color: {
|
|
977
977
|
enabled: !1
|
|
@@ -987,7 +987,7 @@ const Ii = {
|
|
|
987
987
|
enabled: !1
|
|
988
988
|
}
|
|
989
989
|
}
|
|
990
|
-
},
|
|
990
|
+
}, zi = {
|
|
991
991
|
subtype: "scattermap",
|
|
992
992
|
markers: {
|
|
993
993
|
fill: "filled",
|
|
@@ -997,9 +997,9 @@ const Ii = {
|
|
|
997
997
|
maxSize: 24
|
|
998
998
|
}
|
|
999
999
|
}
|
|
1000
|
-
}, zi = {
|
|
1001
|
-
mapType: "world"
|
|
1002
1000
|
}, Ri = {
|
|
1001
|
+
mapType: "world"
|
|
1002
|
+
}, Zi = {
|
|
1003
1003
|
subtype: "boxplot/full",
|
|
1004
1004
|
legend: {
|
|
1005
1005
|
enabled: !0,
|
|
@@ -1051,42 +1051,42 @@ const Ii = {
|
|
|
1051
1051
|
enabled: !0
|
|
1052
1052
|
}
|
|
1053
1053
|
};
|
|
1054
|
-
function
|
|
1054
|
+
function Wi(e) {
|
|
1055
1055
|
switch (e) {
|
|
1056
1056
|
case "indicator":
|
|
1057
|
-
return
|
|
1057
|
+
return P(wi);
|
|
1058
1058
|
case "line":
|
|
1059
|
-
return
|
|
1059
|
+
return ve(Ci);
|
|
1060
1060
|
case "area":
|
|
1061
|
-
return
|
|
1061
|
+
return ve(vi);
|
|
1062
1062
|
case "bar":
|
|
1063
|
-
return
|
|
1063
|
+
return ve(Si);
|
|
1064
1064
|
case "column":
|
|
1065
|
-
return
|
|
1065
|
+
return ve(Mi);
|
|
1066
1066
|
case "polar":
|
|
1067
|
-
return
|
|
1067
|
+
return ve(Ii);
|
|
1068
1068
|
case "pie":
|
|
1069
|
-
return
|
|
1069
|
+
return P(Di);
|
|
1070
1070
|
case "funnel":
|
|
1071
|
-
return
|
|
1071
|
+
return P(Ai);
|
|
1072
1072
|
case "treemap":
|
|
1073
|
-
return
|
|
1073
|
+
return P(Ti);
|
|
1074
1074
|
case "calendar-heatmap":
|
|
1075
|
-
return
|
|
1075
|
+
return P(Ni);
|
|
1076
1076
|
case "sunburst":
|
|
1077
|
-
return
|
|
1077
|
+
return P(ji);
|
|
1078
1078
|
case "scatter":
|
|
1079
|
-
return
|
|
1079
|
+
return P(Oi);
|
|
1080
1080
|
case "scattermap":
|
|
1081
|
-
return
|
|
1081
|
+
return P(zi);
|
|
1082
1082
|
case "areamap":
|
|
1083
|
-
return
|
|
1083
|
+
return P(Ri);
|
|
1084
1084
|
case "boxplot":
|
|
1085
|
-
return
|
|
1085
|
+
return P(Zi);
|
|
1086
1086
|
case "table":
|
|
1087
|
-
return
|
|
1087
|
+
return P(Ei);
|
|
1088
1088
|
case "pivot":
|
|
1089
|
-
return
|
|
1089
|
+
return P(Li);
|
|
1090
1090
|
case "pivot2":
|
|
1091
1091
|
return {};
|
|
1092
1092
|
case "image":
|
|
@@ -1095,15 +1095,15 @@ function Zi(e) {
|
|
|
1095
1095
|
return {};
|
|
1096
1096
|
}
|
|
1097
1097
|
}
|
|
1098
|
-
const
|
|
1099
|
-
`,
|
|
1098
|
+
const Re = `
|
|
1099
|
+
`, st = "UNKNOWN", $i = (e, t) => {
|
|
1100
1100
|
let r = "";
|
|
1101
1101
|
return r += `measureFactory.customFormula(
|
|
1102
|
-
`, r += " ".repeat(t), r += ` '${
|
|
1102
|
+
`, r += " ".repeat(t), r += ` '${De(e.title)}',
|
|
1103
1103
|
`, r += " ".repeat(t), r += ` '${e.formula}',
|
|
1104
1104
|
`, r += " ".repeat(t), r += ` {
|
|
1105
1105
|
`, Object.entries(e.context).forEach(([a, i]) => {
|
|
1106
|
-
const l =
|
|
1106
|
+
const l = Kt(i.table || st, i.column || st, void 0, "DM");
|
|
1107
1107
|
r += " ".repeat(t), r += ` '${a.slice(1, -1)}': ${l},
|
|
1108
1108
|
`;
|
|
1109
1109
|
}), r += " ".repeat(t), r += ` }
|
|
@@ -1117,39 +1117,39 @@ const ze = `
|
|
|
1117
1117
|
title: l
|
|
1118
1118
|
} = e;
|
|
1119
1119
|
let s;
|
|
1120
|
-
return r && a && (s =
|
|
1120
|
+
return r && a && (s = Kt(r, a, t, "DM")), i && r && a && l && (s = `measureFactory.${Xt.aggregationFromJAQL(i)}(${s}, '${De(l)}')`), s || st;
|
|
1121
1121
|
}, Pi = (e, t) => {
|
|
1122
1122
|
const r = e.jaql(!1).jaql;
|
|
1123
|
-
return "formula" in r ?
|
|
1124
|
-
},
|
|
1123
|
+
return "formula" in r ? $i(r, t) : qi(r);
|
|
1124
|
+
}, ie = (e, t = 0, r = !1) => {
|
|
1125
1125
|
if (!e)
|
|
1126
1126
|
return "";
|
|
1127
1127
|
if (typeof e == "string")
|
|
1128
|
-
return `'${
|
|
1129
|
-
if (e instanceof
|
|
1128
|
+
return `'${De(e)}'`;
|
|
1129
|
+
if (e instanceof dr)
|
|
1130
1130
|
return Pi(e, t);
|
|
1131
|
-
if (e instanceof
|
|
1131
|
+
if (e instanceof Jt)
|
|
1132
1132
|
return e.composeCode || "";
|
|
1133
1133
|
let a = "";
|
|
1134
|
-
return Array.isArray(e) ? a += `[${e.map((i) =>
|
|
1135
|
-
if (r && typeof i == "string" && (i = `'${
|
|
1136
|
-
a += `${i}: [${l.map((s) =>
|
|
1134
|
+
return Array.isArray(e) ? a += `[${e.map((i) => ie(i, t + 2))}${e.length ? Re + " ".repeat(t + 2) : ""}]` : (a += `{${Re}`, Object.entries(e).forEach(([i, l]) => {
|
|
1135
|
+
if (r && typeof i == "string" && (i = `'${De(i)}'`), a += " ".repeat(t + 2), Array.isArray(l))
|
|
1136
|
+
a += `${i}: [${l.map((s) => ie(s, t + 4, r))}${l.length ? Re + " ".repeat(t + 2) : ""}]`;
|
|
1137
1137
|
else if (typeof l == "object" && l !== null) {
|
|
1138
|
-
const s = Array.isArray(l) ? l :
|
|
1139
|
-
a += `${i}: ${
|
|
1138
|
+
const s = Array.isArray(l) ? l : hi(l);
|
|
1139
|
+
a += `${i}: ${ie(s, t + 2, r)}`;
|
|
1140
1140
|
} else
|
|
1141
|
-
["number", "boolean", "undefined"].includes(typeof l) || l === null ? a += `${i}: ${l}` : typeof l == "string" ? a += `${i}: '${
|
|
1142
|
-
a += `,${
|
|
1141
|
+
["number", "boolean", "undefined"].includes(typeof l) || l === null ? a += `${i}: ${l}` : typeof l == "string" ? a += `${i}: '${De(l)}'` : a += `${i}: ${l}`;
|
|
1142
|
+
a += `,${Re}`;
|
|
1143
1143
|
}), a += " ".repeat(t), a += "}"), a;
|
|
1144
1144
|
};
|
|
1145
|
-
function
|
|
1145
|
+
function bt(e, t) {
|
|
1146
1146
|
if (t === void 0 || t && typeof t == "object" && !Array.isArray(t) && Object.keys(t).length === 0)
|
|
1147
1147
|
return e;
|
|
1148
|
-
if (!
|
|
1148
|
+
if (!ht(e, t)) {
|
|
1149
1149
|
if (e && typeof e == "object" && !Array.isArray(e)) {
|
|
1150
1150
|
const r = {};
|
|
1151
1151
|
for (const a of Object.keys(e)) {
|
|
1152
|
-
const i =
|
|
1152
|
+
const i = bt(e[a], t == null ? void 0 : t[a]), l = t && Object.prototype.hasOwnProperty.call(t, a), s = l ? t[a] : void 0;
|
|
1153
1153
|
(i !== void 0 || !l || e[a] === void 0 && s !== void 0) && (r[a] = i);
|
|
1154
1154
|
}
|
|
1155
1155
|
return Object.keys(r).length ? r : void 0;
|
|
@@ -1157,119 +1157,119 @@ function mt(e, t) {
|
|
|
1157
1157
|
return e;
|
|
1158
1158
|
}
|
|
1159
1159
|
}
|
|
1160
|
-
function
|
|
1160
|
+
function Nt(e, t) {
|
|
1161
1161
|
if (!e || Object.keys(e).length === 0)
|
|
1162
1162
|
return {};
|
|
1163
|
-
const r =
|
|
1164
|
-
if (
|
|
1163
|
+
const r = Wi(t);
|
|
1164
|
+
if (ht(e, r))
|
|
1165
1165
|
return {};
|
|
1166
|
-
const a =
|
|
1166
|
+
const a = bt(e, r);
|
|
1167
1167
|
return a ?? {};
|
|
1168
1168
|
}
|
|
1169
|
-
function
|
|
1170
|
-
const r =
|
|
1171
|
-
if (
|
|
1169
|
+
function jt(e, t) {
|
|
1170
|
+
const r = yi(t);
|
|
1171
|
+
if (ht(e, r))
|
|
1172
1172
|
return e;
|
|
1173
|
-
const a =
|
|
1173
|
+
const a = bt(e, r);
|
|
1174
1174
|
return a ?? {};
|
|
1175
1175
|
}
|
|
1176
1176
|
function Gi(e) {
|
|
1177
|
-
return
|
|
1177
|
+
return ie(e, qe);
|
|
1178
1178
|
}
|
|
1179
|
-
function
|
|
1179
|
+
function Ot(e, t = "data-source-placeholder") {
|
|
1180
1180
|
if (!e)
|
|
1181
1181
|
return t;
|
|
1182
1182
|
const r = typeof e == "object" && "title" in e ? e.title : e;
|
|
1183
|
-
return
|
|
1183
|
+
return ci(r);
|
|
1184
1184
|
}
|
|
1185
|
-
function
|
|
1185
|
+
function Et(e, t = !0) {
|
|
1186
1186
|
const r = [];
|
|
1187
|
-
return t && r.push("measureFactory"),
|
|
1187
|
+
return t && r.push("measureFactory"), ee(e) && r.push("filterFactory"), r.length > 0 ? `import { ${r.join(", ")} } from '@sisense/sdk-data';` : "";
|
|
1188
1188
|
}
|
|
1189
|
-
const
|
|
1189
|
+
const zt = `
|
|
1190
1190
|
`, Bi = (e, t) => {
|
|
1191
1191
|
if (e.composeCode)
|
|
1192
|
-
return `${
|
|
1192
|
+
return `${zt}${" ".repeat(t)}${e.composeCode}`;
|
|
1193
1193
|
const r = e.jaql().jaql;
|
|
1194
|
-
return `${
|
|
1194
|
+
return `${zt}${" ".repeat(t)}filterFactory.customFilter(${ie(r, t, !0)})`;
|
|
1195
1195
|
}, Hi = (e, t = 0) => {
|
|
1196
1196
|
if (!e)
|
|
1197
1197
|
return "";
|
|
1198
1198
|
let r = "";
|
|
1199
1199
|
return r += `[${e.map((a) => Bi(a, t + 2))}${e.length ? `
|
|
1200
1200
|
` + " ".repeat(t + 2) : ""}]`, r;
|
|
1201
|
-
},
|
|
1201
|
+
}, Rt = (e) => e ? Array.isArray(e) ? Hi(e, 6) : "/** Filter relations not supported yet */" : "[]", Yi = ["executeQueryByWidgetIdTmpl", "widgetByIdTmpl"], Ui = "chartWidgetTmpl", Qi = "pivotTableWidgetTmpl", Fi = (e) => e, Vi = ({
|
|
1202
1202
|
dashboardOid: e,
|
|
1203
1203
|
widgetOid: t,
|
|
1204
1204
|
uiFramework: r = "react",
|
|
1205
1205
|
chartType: a = "table",
|
|
1206
1206
|
includeChart: i = !0
|
|
1207
1207
|
}) => {
|
|
1208
|
-
|
|
1208
|
+
gr(a);
|
|
1209
1209
|
const l = {
|
|
1210
1210
|
dashboardOid: e,
|
|
1211
1211
|
widgetOid: t
|
|
1212
1212
|
}, s = Yi[Number(i)];
|
|
1213
|
-
return
|
|
1214
|
-
},
|
|
1213
|
+
return lt(s, l, r);
|
|
1214
|
+
}, Ji = (e, t, r, a) => {
|
|
1215
1215
|
if (Ge(e)) {
|
|
1216
|
-
|
|
1217
|
-
const i =
|
|
1216
|
+
gr(e.chartType);
|
|
1217
|
+
const i = Tt(e), l = {
|
|
1218
1218
|
idString: e.id,
|
|
1219
1219
|
widgetTypeString: "chart",
|
|
1220
1220
|
titleString: e.title,
|
|
1221
|
-
dataSourceString:
|
|
1222
|
-
chartTypeString:
|
|
1223
|
-
dataOptionsString: Gi(a ?
|
|
1224
|
-
filtersString:
|
|
1221
|
+
dataSourceString: Ot(e.dataSource),
|
|
1222
|
+
chartTypeString: Fi(e.chartType),
|
|
1223
|
+
dataOptionsString: Gi(a ? jt(e.dataOptions, e.chartType) : e.dataOptions),
|
|
1224
|
+
filtersString: Rt(e.filters),
|
|
1225
1225
|
componentString: "ChartWidget",
|
|
1226
|
-
extraImportsString:
|
|
1227
|
-
styleOptionsString:
|
|
1228
|
-
drilldownOptionsString:
|
|
1226
|
+
extraImportsString: Et(e.filters || [], i),
|
|
1227
|
+
styleOptionsString: ie(a ? Nt(e.styleOptions || {}, e.chartType) : e.styleOptions || {}, qe),
|
|
1228
|
+
drilldownOptionsString: ie(e.drilldownOptions || {}, qe)
|
|
1229
1229
|
};
|
|
1230
|
-
return
|
|
1230
|
+
return lt(r.chart, l, t);
|
|
1231
1231
|
}
|
|
1232
|
-
if (
|
|
1233
|
-
const i =
|
|
1232
|
+
if (pa(e)) {
|
|
1233
|
+
const i = Tt(e), l = {
|
|
1234
1234
|
idString: e.id,
|
|
1235
1235
|
widgetTypeString: "pivot",
|
|
1236
1236
|
titleString: e.title,
|
|
1237
|
-
dataSourceString:
|
|
1238
|
-
dataOptionsString:
|
|
1239
|
-
filtersString:
|
|
1237
|
+
dataSourceString: Ot(e.dataSource),
|
|
1238
|
+
dataOptionsString: ie(a ? jt(e.dataOptions, e.widgetType) : e.dataOptions),
|
|
1239
|
+
filtersString: Rt(e.filters),
|
|
1240
1240
|
componentString: "PivotTableWidget",
|
|
1241
|
-
extraImportsString:
|
|
1242
|
-
styleOptionsString:
|
|
1241
|
+
extraImportsString: Et(e.filters || [], i),
|
|
1242
|
+
styleOptionsString: ie(a ? Nt(e.styleOptions || {}, e.widgetType) : e.styleOptions || {}, qe)
|
|
1243
1243
|
};
|
|
1244
|
-
return
|
|
1244
|
+
return lt(r.pivot, l, t);
|
|
1245
1245
|
}
|
|
1246
|
-
if (
|
|
1246
|
+
if (ua(e))
|
|
1247
1247
|
return "/** Custom widget code not supported yet */";
|
|
1248
|
-
throw new
|
|
1249
|
-
},
|
|
1248
|
+
throw new Ae("errors.otherWidgetTypesNotSupported");
|
|
1249
|
+
}, Xi = ({
|
|
1250
1250
|
widgetProps: e,
|
|
1251
1251
|
uiFramework: t = "react",
|
|
1252
1252
|
removeDefaultProps: r = !1
|
|
1253
|
-
}) =>
|
|
1254
|
-
chart:
|
|
1255
|
-
pivot:
|
|
1253
|
+
}) => Ji(e, t, {
|
|
1254
|
+
chart: Ui,
|
|
1255
|
+
pivot: Qi
|
|
1256
1256
|
}, r);
|
|
1257
|
-
function
|
|
1257
|
+
function Ki(e) {
|
|
1258
1258
|
return !!(e && (e.top !== void 0 || e.bottom !== void 0));
|
|
1259
1259
|
}
|
|
1260
|
-
const
|
|
1260
|
+
const eo = (e) => {
|
|
1261
1261
|
const t = e.find((r) => r.panel === "rows");
|
|
1262
1262
|
return t ? e.map((r) => {
|
|
1263
1263
|
const a = r.jaql.filter;
|
|
1264
|
-
if (!(r.panel === "scope" &&
|
|
1264
|
+
if (!(r.panel === "scope" && Ki(a) && a.by === void 0))
|
|
1265
1265
|
return r;
|
|
1266
1266
|
const i = r.jaql, {
|
|
1267
1267
|
type: l,
|
|
1268
1268
|
context: s,
|
|
1269
1269
|
formula: u,
|
|
1270
1270
|
filter: c
|
|
1271
|
-
} = i, g =
|
|
1272
|
-
return
|
|
1271
|
+
} = i, g = di(i, ["type", "context", "formula", "filter"]);
|
|
1272
|
+
return te(O({}, r), {
|
|
1273
1273
|
jaql: O({
|
|
1274
1274
|
// Copy dimension properties from rows dimension
|
|
1275
1275
|
dim: t.jaql.dim,
|
|
@@ -1277,7 +1277,7 @@ const Ki = (e) => {
|
|
|
1277
1277
|
column: t.jaql.column,
|
|
1278
1278
|
datatype: t.jaql.datatype,
|
|
1279
1279
|
// Keep the filter but add the by clause
|
|
1280
|
-
filter:
|
|
1280
|
+
filter: te(O({}, c), {
|
|
1281
1281
|
by: {
|
|
1282
1282
|
type: l,
|
|
1283
1283
|
context: s,
|
|
@@ -1287,11 +1287,11 @@ const Ki = (e) => {
|
|
|
1287
1287
|
}, g)
|
|
1288
1288
|
});
|
|
1289
1289
|
}) : e;
|
|
1290
|
-
},
|
|
1290
|
+
}, to = (e) => ({
|
|
1291
1291
|
dataOptions: {
|
|
1292
|
-
columns: e.map(
|
|
1292
|
+
columns: e.map(cr)
|
|
1293
1293
|
}
|
|
1294
|
-
}),
|
|
1294
|
+
}), ro = Object.freeze({
|
|
1295
1295
|
convolution: {
|
|
1296
1296
|
enabled: !0,
|
|
1297
1297
|
selectedConvolutionType: "bySlicesCount",
|
|
@@ -1312,17 +1312,17 @@ const Ki = (e) => {
|
|
|
1312
1312
|
xAxis: {
|
|
1313
1313
|
gridLines: !1
|
|
1314
1314
|
}
|
|
1315
|
-
}),
|
|
1315
|
+
}), Zt = Object.freeze({
|
|
1316
1316
|
line: "line/spline",
|
|
1317
1317
|
pie: "pie/donut",
|
|
1318
1318
|
bar: "bar/stacked",
|
|
1319
1319
|
column: "column/stackedcolumn"
|
|
1320
|
-
}),
|
|
1320
|
+
}), ao = (e, t, r) => {
|
|
1321
1321
|
const a = e.reduce((l, s) => (l[s.jaql.title] = s, l), {}), i = Object.entries(r).reduce((l, s) => {
|
|
1322
1322
|
const [u, c] = s;
|
|
1323
1323
|
return l[`${u}`] = Array.isArray(c) ? c.map((g) => {
|
|
1324
1324
|
var b, x;
|
|
1325
|
-
const o =
|
|
1325
|
+
const o = nt(g);
|
|
1326
1326
|
delete o.enabled;
|
|
1327
1327
|
const p = a[o.column.name];
|
|
1328
1328
|
if (!p)
|
|
@@ -1332,20 +1332,20 @@ const Ki = (e) => {
|
|
|
1332
1332
|
name: o.column.name
|
|
1333
1333
|
}
|
|
1334
1334
|
};
|
|
1335
|
-
const d =
|
|
1335
|
+
const d = cr(p);
|
|
1336
1336
|
if (p.panel === "measures")
|
|
1337
|
-
return
|
|
1337
|
+
return te(O({}, o), {
|
|
1338
1338
|
column: d
|
|
1339
1339
|
});
|
|
1340
|
-
if (
|
|
1340
|
+
if (ha(d.type)) {
|
|
1341
1341
|
const m = (x = (b = p.format) == null ? void 0 : b.mask) == null ? void 0 : x[p.jaql.level];
|
|
1342
1342
|
if (m)
|
|
1343
|
-
return
|
|
1343
|
+
return te(O({}, o), {
|
|
1344
1344
|
column: d,
|
|
1345
1345
|
dateFormat: m
|
|
1346
1346
|
});
|
|
1347
1347
|
}
|
|
1348
|
-
return
|
|
1348
|
+
return te(O({}, o), {
|
|
1349
1349
|
column: d
|
|
1350
1350
|
});
|
|
1351
1351
|
}) : c, l;
|
|
@@ -1371,20 +1371,20 @@ const Ki = (e) => {
|
|
|
1371
1371
|
l !== "geo" && (i[`${l}`] = i[`${l}`][0]);
|
|
1372
1372
|
}), i;
|
|
1373
1373
|
case "table":
|
|
1374
|
-
return Object.keys(i).length === 0 ?
|
|
1374
|
+
return Object.keys(i).length === 0 ? to(e).dataOptions : i;
|
|
1375
1375
|
case "boxplot":
|
|
1376
1376
|
case "areamap":
|
|
1377
1377
|
case "indicator":
|
|
1378
1378
|
default:
|
|
1379
1379
|
return i;
|
|
1380
1380
|
}
|
|
1381
|
-
},
|
|
1381
|
+
}, Wt = (e, t) => {
|
|
1382
1382
|
var r, a, i, l;
|
|
1383
|
-
return t === "x" ? (a = (r = e.category) != null ? r : e.x) == null ? void 0 : a.map((s) =>
|
|
1384
|
-
},
|
|
1383
|
+
return t === "x" ? (a = (r = e.category) != null ? r : e.x) == null ? void 0 : a.map((s) => nt(s).column.name).join(", ") : (l = (i = e.value) != null ? i : e.y) == null ? void 0 : l.map((s) => nt(s).column.name).join(", ");
|
|
1384
|
+
}, io = (e, t, r, a) => {
|
|
1385
1385
|
let i;
|
|
1386
|
-
return a && e in
|
|
1387
|
-
subtype:
|
|
1386
|
+
return a && e in Zt ? i = We(We(ro, {
|
|
1387
|
+
subtype: Zt[`${e}`]
|
|
1388
1388
|
}), {
|
|
1389
1389
|
legend: {
|
|
1390
1390
|
enabled: !0,
|
|
@@ -1393,42 +1393,42 @@ const Ki = (e) => {
|
|
|
1393
1393
|
yAxis: {
|
|
1394
1394
|
title: {
|
|
1395
1395
|
enabled: !0,
|
|
1396
|
-
text:
|
|
1396
|
+
text: Wt(t, "y")
|
|
1397
1397
|
}
|
|
1398
1398
|
},
|
|
1399
1399
|
xAxis: {
|
|
1400
1400
|
title: {
|
|
1401
1401
|
enabled: !0,
|
|
1402
|
-
text:
|
|
1402
|
+
text: Wt(t, "x")
|
|
1403
1403
|
}
|
|
1404
1404
|
}
|
|
1405
|
-
}, r) : i =
|
|
1406
|
-
},
|
|
1405
|
+
}, r) : i = We(ma(), r), i;
|
|
1406
|
+
}, oo = (e, t, r = !0) => {
|
|
1407
1407
|
const {
|
|
1408
1408
|
chartFamily: a,
|
|
1409
1409
|
chartType: i,
|
|
1410
1410
|
axesMapping: l = {},
|
|
1411
1411
|
styleOptions: s = {}
|
|
1412
|
-
} = t, u =
|
|
1412
|
+
} = t, u = ao(e, a, l), c = io(i, l, s, r);
|
|
1413
1413
|
return {
|
|
1414
1414
|
dataOptions: u,
|
|
1415
1415
|
chartStyleOptions: c
|
|
1416
1416
|
};
|
|
1417
|
-
},
|
|
1417
|
+
}, no = (e) => "chartType" in e ? e : {
|
|
1418
1418
|
chartType: "table",
|
|
1419
1419
|
chartFamily: "table",
|
|
1420
1420
|
axesMapping: {}
|
|
1421
|
-
},
|
|
1422
|
-
if ((r.panel === "scope" || r.jaql.filter) && t.metadataFilters.push(
|
|
1423
|
-
const a =
|
|
1421
|
+
}, lo = (e) => e.map((t) => ga(t.jaql)), so = (e) => e.reduce((t, r) => {
|
|
1422
|
+
if ((r.panel === "scope" || r.jaql.filter) && t.metadataFilters.push(P(r)), r.panel !== "scope") {
|
|
1423
|
+
const a = P(r);
|
|
1424
1424
|
delete a.jaql.filter, t.metadataColumns.push(a);
|
|
1425
1425
|
}
|
|
1426
1426
|
return t;
|
|
1427
1427
|
}, {
|
|
1428
1428
|
metadataColumns: [],
|
|
1429
1429
|
metadataFilters: []
|
|
1430
|
-
}),
|
|
1431
|
-
if (!
|
|
1430
|
+
}), co = (e, t) => {
|
|
1431
|
+
if (!pi(e))
|
|
1432
1432
|
try {
|
|
1433
1433
|
const {
|
|
1434
1434
|
useCustomizedStyleOptions: r = !1
|
|
@@ -1439,13 +1439,13 @@ const Ki = (e) => {
|
|
|
1439
1439
|
} = e, {
|
|
1440
1440
|
metadata: s,
|
|
1441
1441
|
datasource: u
|
|
1442
|
-
} = a, c =
|
|
1442
|
+
} = a, c = te(O({}, u), {
|
|
1443
1443
|
type: u.type || "elasticube"
|
|
1444
|
-
}), g =
|
|
1445
|
-
jaql:
|
|
1444
|
+
}), g = da(c), b = eo(s).map((I) => ki(I)).map((I) => te(O({}, I), {
|
|
1445
|
+
jaql: te(O({}, I.jaql), {
|
|
1446
1446
|
datasource: g
|
|
1447
1447
|
})
|
|
1448
|
-
})), x =
|
|
1448
|
+
})), x = no(i), o = x.chartType.toLowerCase(), p = {
|
|
1449
1449
|
cornerRadius: "Small",
|
|
1450
1450
|
header: {
|
|
1451
1451
|
// remove info button and render empty toolbar instead
|
|
@@ -1454,10 +1454,10 @@ const Ki = (e) => {
|
|
|
1454
1454
|
}, {
|
|
1455
1455
|
metadataColumns: d,
|
|
1456
1456
|
metadataFilters: m
|
|
1457
|
-
} =
|
|
1457
|
+
} = so(b), h = lo(m), {
|
|
1458
1458
|
dataOptions: w,
|
|
1459
|
-
chartStyleOptions:
|
|
1460
|
-
} =
|
|
1459
|
+
chartStyleOptions: C
|
|
1460
|
+
} = oo(d, x, r), y = O(O({}, C), p);
|
|
1461
1461
|
return {
|
|
1462
1462
|
widgetType: "chart",
|
|
1463
1463
|
id: l,
|
|
@@ -1472,34 +1472,34 @@ const Ki = (e) => {
|
|
|
1472
1472
|
console.error(r);
|
|
1473
1473
|
return;
|
|
1474
1474
|
}
|
|
1475
|
-
},
|
|
1475
|
+
}, Ne = (e, t) => co(e, t), po = (e) => oi(e) ? Vi(e) : Xi(e), Hs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1476
1476
|
__proto__: null,
|
|
1477
|
-
toWidgetCode:
|
|
1478
|
-
toWidgetProps:
|
|
1477
|
+
toWidgetCode: po,
|
|
1478
|
+
toWidgetProps: Ne
|
|
1479
1479
|
}, Symbol.toStringTag, {
|
|
1480
1480
|
value: "Module"
|
|
1481
1481
|
}));
|
|
1482
|
-
var
|
|
1482
|
+
var uo = Object.defineProperty, go = Object.defineProperties, ho = Object.getOwnPropertyDescriptors, Ye = Object.getOwnPropertySymbols, fr = Object.prototype.hasOwnProperty, br = Object.prototype.propertyIsEnumerable, dt = (e, t, r) => t in e ? uo(e, t, {
|
|
1483
1483
|
enumerable: !0,
|
|
1484
1484
|
configurable: !0,
|
|
1485
1485
|
writable: !0,
|
|
1486
1486
|
value: r
|
|
1487
1487
|
}) : e[t] = r, M = (e, t) => {
|
|
1488
1488
|
for (var r in t || (t = {}))
|
|
1489
|
-
|
|
1489
|
+
fr.call(t, r) && dt(e, r, t[r]);
|
|
1490
1490
|
if (Ye)
|
|
1491
1491
|
for (var r of Ye(t))
|
|
1492
|
-
|
|
1492
|
+
br.call(t, r) && dt(e, r, t[r]);
|
|
1493
1493
|
return e;
|
|
1494
|
-
}, T = (e, t) =>
|
|
1494
|
+
}, T = (e, t) => go(e, ho(t)), xr = (e, t) => {
|
|
1495
1495
|
var r = {};
|
|
1496
1496
|
for (var a in e)
|
|
1497
|
-
|
|
1497
|
+
fr.call(e, a) && t.indexOf(a) < 0 && (r[a] = e[a]);
|
|
1498
1498
|
if (e != null && Ye)
|
|
1499
1499
|
for (var a of Ye(e))
|
|
1500
|
-
t.indexOf(a) < 0 &&
|
|
1500
|
+
t.indexOf(a) < 0 && br.call(e, a) && (r[a] = e[a]);
|
|
1501
1501
|
return r;
|
|
1502
|
-
},
|
|
1502
|
+
}, H = (e, t, r) => dt(e, typeof t != "symbol" ? t + "" : t, r), se = (e, t, r) => new Promise((a, i) => {
|
|
1503
1503
|
var l = (c) => {
|
|
1504
1504
|
try {
|
|
1505
1505
|
u(r.next(c));
|
|
@@ -1515,7 +1515,7 @@ var po = Object.defineProperty, uo = Object.defineProperties, go = Object.getOwn
|
|
|
1515
1515
|
}, u = (c) => c.done ? a(c.value) : Promise.resolve(c.value).then(l, s);
|
|
1516
1516
|
u((r = r.apply(e, t)).next());
|
|
1517
1517
|
});
|
|
1518
|
-
class
|
|
1518
|
+
class mo extends Pa {
|
|
1519
1519
|
constructor(t, r) {
|
|
1520
1520
|
super(), this.client = t, this.setOptions(r), this.bindMethods(), this.updateResult();
|
|
1521
1521
|
}
|
|
@@ -1525,7 +1525,7 @@ class ho extends Wa {
|
|
|
1525
1525
|
setOptions(t) {
|
|
1526
1526
|
var r;
|
|
1527
1527
|
const a = this.options;
|
|
1528
|
-
this.options = this.client.defaultMutationOptions(t),
|
|
1528
|
+
this.options = this.client.defaultMutationOptions(t), Ga(a, this.options) || this.client.getMutationCache().notify({
|
|
1529
1529
|
type: "observerOptionsUpdated",
|
|
1530
1530
|
mutation: this.currentMutation,
|
|
1531
1531
|
observer: this
|
|
@@ -1558,7 +1558,7 @@ class ho extends Wa {
|
|
|
1558
1558
|
})), this.currentMutation.addObserver(this), this.currentMutation.execute();
|
|
1559
1559
|
}
|
|
1560
1560
|
updateResult() {
|
|
1561
|
-
const t = this.currentMutation ? this.currentMutation.state :
|
|
1561
|
+
const t = this.currentMutation ? this.currentMutation.state : Ba(), r = t.status === "loading", a = T(M({}, t), {
|
|
1562
1562
|
isLoading: r,
|
|
1563
1563
|
isPending: r,
|
|
1564
1564
|
isSuccess: t.status === "success",
|
|
@@ -1570,7 +1570,7 @@ class ho extends Wa {
|
|
|
1570
1570
|
this.currentResult = a;
|
|
1571
1571
|
}
|
|
1572
1572
|
notify(t) {
|
|
1573
|
-
|
|
1573
|
+
lr.batch(() => {
|
|
1574
1574
|
if (this.mutateOptions && this.hasListeners()) {
|
|
1575
1575
|
if (t.onSuccess) {
|
|
1576
1576
|
var r, a, i, l;
|
|
@@ -1588,26 +1588,26 @@ class ho extends Wa {
|
|
|
1588
1588
|
});
|
|
1589
1589
|
}
|
|
1590
1590
|
}
|
|
1591
|
-
function
|
|
1592
|
-
const a =
|
|
1591
|
+
function xt(e, t, r) {
|
|
1592
|
+
const a = za(e, t), i = Te({
|
|
1593
1593
|
context: a.context
|
|
1594
|
-
}), [l] = R(() => new
|
|
1595
|
-
|
|
1594
|
+
}), [l] = R(() => new mo(i, a));
|
|
1595
|
+
ye(() => {
|
|
1596
1596
|
l.setOptions(a);
|
|
1597
1597
|
}, [l, a]);
|
|
1598
|
-
const s =
|
|
1599
|
-
l.mutate(c, g).catch(
|
|
1598
|
+
const s = Ra(j((c) => l.subscribe(lr.batchCalls(c)), [l]), () => l.getCurrentResult(), () => l.getCurrentResult()), u = j((c, g) => {
|
|
1599
|
+
l.mutate(c, g).catch(fo);
|
|
1600
1600
|
}, [l]);
|
|
1601
|
-
if (s.error &&
|
|
1601
|
+
if (s.error && Za(l.options.useErrorBoundary, [s.error]))
|
|
1602
1602
|
throw s.error;
|
|
1603
1603
|
return T(M({}, s), {
|
|
1604
1604
|
mutate: u,
|
|
1605
1605
|
mutateAsync: s.mutate
|
|
1606
1606
|
});
|
|
1607
1607
|
}
|
|
1608
|
-
function
|
|
1608
|
+
function fo() {
|
|
1609
1609
|
}
|
|
1610
|
-
const
|
|
1610
|
+
const kr = Qe({}), bo = () => ft(kr), yr = ({
|
|
1611
1611
|
children: e
|
|
1612
1612
|
}) => {
|
|
1613
1613
|
const [t, r] = R({}), a = j((s, u) => {
|
|
@@ -1618,7 +1618,7 @@ const xr = /* @__PURE__ */ Ue({}), fo = () => ht(xr), kr = ({
|
|
|
1618
1618
|
[a(u, c)]: s
|
|
1619
1619
|
}));
|
|
1620
1620
|
}, [a]), l = j((s, u) => t[a(s, u)], [t, a]);
|
|
1621
|
-
return /* @__PURE__ */ n(
|
|
1621
|
+
return /* @__PURE__ */ n(kr.Provider, {
|
|
1622
1622
|
value: {
|
|
1623
1623
|
saveChatId: i,
|
|
1624
1624
|
getChatId: l
|
|
@@ -1626,19 +1626,19 @@ const xr = /* @__PURE__ */ Ue({}), fo = () => ht(xr), kr = ({
|
|
|
1626
1626
|
children: e
|
|
1627
1627
|
});
|
|
1628
1628
|
};
|
|
1629
|
-
class
|
|
1629
|
+
class xo {
|
|
1630
1630
|
constructor(t, r = !1) {
|
|
1631
|
-
this
|
|
1631
|
+
H(this, "httpClient"), H(this, "getChatContexts", () => se(this, null, function* () {
|
|
1632
1632
|
return (yield this.httpClient.get("api/datasources//")) || [];
|
|
1633
|
-
}), this
|
|
1633
|
+
})), H(this, "getNlgInsights", (a) => this.httpClient.post("api/v2/ai/nlg/queryResult", a)), H(this, "getQueryRecommendations", (a, i) => this.httpClient.get(`api/v2/ai/recommendations/query/${a}/${i.numOfRecommendations}${i.userPrompt ? "?userPrompt=" + encodeURIComponent(i.userPrompt) : ""}`)), H(this, "getNlqResult", (a, i) => this.httpClient.post(`api/v2/ai/nlq/query/${a}`, i)), H(this, "setLlmConfig", (a) => this.httpClient.post("api/v2/settings/ai/llmProvider", a).catch((i) => {
|
|
1634
1634
|
console.error("Unable to set llm config", i);
|
|
1635
|
-
}), this
|
|
1635
|
+
})), H(this, "getAllChats", () => se(this, null, function* () {
|
|
1636
1636
|
return this.volatile ? [] : this.httpClient.get("api/v2/ai/chats");
|
|
1637
|
-
}), this
|
|
1637
|
+
})), H(this, "getChatById", (a) => this.httpClient.get(`api/v2/ai/chats/${a}`)), H(this, "createChat", (a, i) => this.httpClient.post("api/v2/ai/chats", {
|
|
1638
1638
|
sourceId: a,
|
|
1639
1639
|
volatile: this.volatile,
|
|
1640
1640
|
contextDetails: i
|
|
1641
|
-
}), this
|
|
1641
|
+
})), H(this, "postChat", (a, i) => this.httpClient.post(`api/v2/ai/chats/${a}`, i)), H(this, "deleteChatHistory", (a) => this.httpClient.delete(`api/v2/ai/chats/${a}/history`)), H(this, "sendFeedback", (a) => this.httpClient.post("api/v2/ai/feedback", a)), H(this, "ai", {
|
|
1642
1642
|
getNlgInsights: this.getNlgInsights,
|
|
1643
1643
|
getNlqResult: this.getNlqResult,
|
|
1644
1644
|
getQueryRecommendations: this.getQueryRecommendations,
|
|
@@ -1651,27 +1651,27 @@ class bo {
|
|
|
1651
1651
|
post: this.postChat,
|
|
1652
1652
|
clearHistory: this.deleteChatHistory
|
|
1653
1653
|
}
|
|
1654
|
-
}, this.httpClient = t;
|
|
1654
|
+
}), this.volatile = r, this.httpClient = t;
|
|
1655
1655
|
}
|
|
1656
1656
|
}
|
|
1657
|
-
const
|
|
1657
|
+
const ko = new er({
|
|
1658
1658
|
defaultOptions: {
|
|
1659
1659
|
queries: {
|
|
1660
1660
|
refetchOnWindowFocus: !1,
|
|
1661
1661
|
refetchOnMount: !1
|
|
1662
1662
|
}
|
|
1663
1663
|
}
|
|
1664
|
-
}),
|
|
1664
|
+
}), kt = Qe(void 0), re = () => ft(kt), yo = ({
|
|
1665
1665
|
children: e,
|
|
1666
1666
|
volatile: t
|
|
1667
1667
|
}) => {
|
|
1668
1668
|
const {
|
|
1669
1669
|
app: r
|
|
1670
|
-
} =
|
|
1671
|
-
return /* @__PURE__ */ n(
|
|
1670
|
+
} = Oa(), a = q(() => r ? new xo(r.httpClient, t) : void 0, [r, t]);
|
|
1671
|
+
return /* @__PURE__ */ n(kt.Provider, {
|
|
1672
1672
|
value: a,
|
|
1673
|
-
children: /* @__PURE__ */ n(
|
|
1674
|
-
client:
|
|
1673
|
+
children: /* @__PURE__ */ n(nr, {
|
|
1674
|
+
client: ko,
|
|
1675
1675
|
children: e
|
|
1676
1676
|
})
|
|
1677
1677
|
});
|
|
@@ -1680,25 +1680,25 @@ function Ys({
|
|
|
1680
1680
|
children: e,
|
|
1681
1681
|
volatile: t
|
|
1682
1682
|
}) {
|
|
1683
|
-
return /* @__PURE__ */ n(
|
|
1684
|
-
children: /* @__PURE__ */ n(
|
|
1683
|
+
return /* @__PURE__ */ n(yr, {
|
|
1684
|
+
children: /* @__PURE__ */ n(yo, {
|
|
1685
1685
|
volatile: t,
|
|
1686
1686
|
children: e
|
|
1687
1687
|
})
|
|
1688
1688
|
});
|
|
1689
1689
|
}
|
|
1690
|
-
function
|
|
1690
|
+
function wo(e) {
|
|
1691
1691
|
var t, r;
|
|
1692
1692
|
if ("jaql" in e)
|
|
1693
1693
|
return e;
|
|
1694
1694
|
{
|
|
1695
|
-
const a =
|
|
1695
|
+
const a = va(e.dataSource), {
|
|
1696
1696
|
filters: i = [],
|
|
1697
1697
|
relations: l
|
|
1698
|
-
} =
|
|
1698
|
+
} = Sa(e.filters), {
|
|
1699
1699
|
metadata: s,
|
|
1700
1700
|
filterRelations: u
|
|
1701
|
-
} =
|
|
1701
|
+
} = Ma({
|
|
1702
1702
|
dataSource: e.dataSource,
|
|
1703
1703
|
attributes: (t = e.dimensions) != null ? t : [],
|
|
1704
1704
|
measures: (r = e.measures) != null ? r : [],
|
|
@@ -1715,15 +1715,15 @@ function yo(e) {
|
|
|
1715
1715
|
return e.verbosity && (c.verbosity = e.verbosity), c;
|
|
1716
1716
|
}
|
|
1717
1717
|
}
|
|
1718
|
-
const
|
|
1719
|
-
const r =
|
|
1718
|
+
const Ve = (e, t = !0) => {
|
|
1719
|
+
const r = q(() => wo(e), [e]), a = re(), {
|
|
1720
1720
|
data: i,
|
|
1721
1721
|
error: l,
|
|
1722
1722
|
isError: s,
|
|
1723
1723
|
isLoading: u,
|
|
1724
1724
|
isSuccess: c,
|
|
1725
1725
|
refetch: g
|
|
1726
|
-
} =
|
|
1726
|
+
} = ke({
|
|
1727
1727
|
queryKey: ["getNlgInsights", r, a],
|
|
1728
1728
|
queryFn: () => a == null ? void 0 : a.ai.getNlgInsights(r),
|
|
1729
1729
|
select: (b) => {
|
|
@@ -1742,13 +1742,13 @@ const Fe = (e, t = !0) => {
|
|
|
1742
1742
|
g();
|
|
1743
1743
|
}, [g])
|
|
1744
1744
|
};
|
|
1745
|
-
},
|
|
1745
|
+
}, _o = (e) => {
|
|
1746
1746
|
const t = e, {
|
|
1747
1747
|
enabled: r
|
|
1748
|
-
} = t, a =
|
|
1749
|
-
return
|
|
1750
|
-
},
|
|
1751
|
-
function
|
|
1748
|
+
} = t, a = xr(t, ["enabled"]);
|
|
1749
|
+
return Ve(a, r);
|
|
1750
|
+
}, Us = mt("useGetNlgInsights")(_o), Co = ["indicator", "column", "line", "table", "pie", "bar"];
|
|
1751
|
+
function wr(e) {
|
|
1752
1752
|
const {
|
|
1753
1753
|
dataSource: t,
|
|
1754
1754
|
query: r,
|
|
@@ -1764,34 +1764,34 @@ function yr(e) {
|
|
|
1764
1764
|
}
|
|
1765
1765
|
};
|
|
1766
1766
|
}
|
|
1767
|
-
function
|
|
1768
|
-
return
|
|
1767
|
+
function vo(e, t) {
|
|
1768
|
+
return se(this, null, function* () {
|
|
1769
1769
|
const {
|
|
1770
1770
|
contextTitle: r,
|
|
1771
1771
|
request: a
|
|
1772
|
-
} =
|
|
1772
|
+
} = wr(e), i = yield t.ai.getNlqResult(r, a);
|
|
1773
1773
|
return {
|
|
1774
|
-
widgetProps: i ?
|
|
1774
|
+
widgetProps: i ? Ne(i, {
|
|
1775
1775
|
useCustomizedStyleOptions: e.enableAxisTitlesInWidgetProps || !1
|
|
1776
1776
|
}) : void 0,
|
|
1777
1777
|
nlqResult: i
|
|
1778
1778
|
};
|
|
1779
1779
|
});
|
|
1780
1780
|
}
|
|
1781
|
-
const
|
|
1781
|
+
const So = (e) => {
|
|
1782
1782
|
const {
|
|
1783
1783
|
contextTitle: t,
|
|
1784
1784
|
request: r
|
|
1785
|
-
} =
|
|
1785
|
+
} = wr(e), a = re(), i = ["getNlqResult", t, r, a], {
|
|
1786
1786
|
isLoading: l,
|
|
1787
1787
|
isError: s,
|
|
1788
1788
|
isSuccess: u,
|
|
1789
1789
|
data: c,
|
|
1790
1790
|
error: g,
|
|
1791
1791
|
refetch: b
|
|
1792
|
-
} =
|
|
1792
|
+
} = ke({
|
|
1793
1793
|
queryKey: i,
|
|
1794
|
-
queryFn: () => a ?
|
|
1794
|
+
queryFn: () => a ? vo(e, a).then((x) => x.widgetProps) : Promise.reject("No API available"),
|
|
1795
1795
|
enabled: !!a && e.enabled
|
|
1796
1796
|
});
|
|
1797
1797
|
return {
|
|
@@ -1804,21 +1804,21 @@ const vo = (e) => {
|
|
|
1804
1804
|
b();
|
|
1805
1805
|
}, [b])
|
|
1806
1806
|
};
|
|
1807
|
-
},
|
|
1807
|
+
}, Qs = mt("useGetNlqResult")(So), Mo = 4, _r = (e) => {
|
|
1808
1808
|
const {
|
|
1809
1809
|
contextTitle: t,
|
|
1810
1810
|
count: r,
|
|
1811
1811
|
enableAxisTitlesInWidgetProps: a,
|
|
1812
1812
|
enabled: i,
|
|
1813
1813
|
customPrompt: l
|
|
1814
|
-
} = e, s =
|
|
1814
|
+
} = e, s = re(), u = r ?? Mo, c = (i === void 0 || i === !0) && u > 0, {
|
|
1815
1815
|
isLoading: g,
|
|
1816
1816
|
isError: b,
|
|
1817
1817
|
isSuccess: x,
|
|
1818
1818
|
data: o,
|
|
1819
1819
|
error: p,
|
|
1820
1820
|
refetch: d
|
|
1821
|
-
} =
|
|
1821
|
+
} = ke({
|
|
1822
1822
|
queryKey: ["getQueryRecommendations", t, u, s],
|
|
1823
1823
|
queryFn: () => s == null ? void 0 : s.ai.getQueryRecommendations(t, M({
|
|
1824
1824
|
numOfRecommendations: u
|
|
@@ -1826,8 +1826,8 @@ const vo = (e) => {
|
|
|
1826
1826
|
userPrompt: l
|
|
1827
1827
|
} : null)),
|
|
1828
1828
|
enabled: !!s && c
|
|
1829
|
-
}), m =
|
|
1830
|
-
widgetProps: h.jaql ?
|
|
1829
|
+
}), m = q(() => o == null ? void 0 : o.map((h) => T(M({}, h), {
|
|
1830
|
+
widgetProps: h.jaql ? Ne(h, {
|
|
1831
1831
|
useCustomizedStyleOptions: a
|
|
1832
1832
|
}) : void 0
|
|
1833
1833
|
})), [o, a]);
|
|
@@ -1841,13 +1841,13 @@ const vo = (e) => {
|
|
|
1841
1841
|
d();
|
|
1842
1842
|
}, [d])
|
|
1843
1843
|
};
|
|
1844
|
-
},
|
|
1844
|
+
}, Fs = mt("useGetQueryRecommendations")(_r), Cr = Object.freeze({
|
|
1845
1845
|
enableFollowupQuestions: !1,
|
|
1846
1846
|
enableHeader: !0,
|
|
1847
1847
|
enableInsights: !0,
|
|
1848
1848
|
numOfRecommendations: 4,
|
|
1849
1849
|
numOfRecentPrompts: 5
|
|
1850
|
-
}),
|
|
1850
|
+
}), vr = Qe(M({}, Cr)), oe = () => ft(vr), Io = ({
|
|
1851
1851
|
children: e,
|
|
1852
1852
|
value: t
|
|
1853
1853
|
}) => {
|
|
@@ -1858,17 +1858,17 @@ const vo = (e) => {
|
|
|
1858
1858
|
welcomeText: r("ai.config.welcomeText"),
|
|
1859
1859
|
suggestionsWelcomeText: r("ai.config.suggestionsWelcomeText")
|
|
1860
1860
|
}));
|
|
1861
|
-
return /* @__PURE__ */ n(
|
|
1861
|
+
return /* @__PURE__ */ n(vr.Provider, {
|
|
1862
1862
|
value: a,
|
|
1863
1863
|
children: e
|
|
1864
1864
|
});
|
|
1865
|
-
},
|
|
1866
|
-
const t =
|
|
1865
|
+
}, yt = "chatHistory", Do = (e) => {
|
|
1866
|
+
const t = re(), {
|
|
1867
1867
|
hideHistory: r
|
|
1868
|
-
} =
|
|
1869
|
-
return
|
|
1870
|
-
queryKey: [
|
|
1871
|
-
queryFn: () =>
|
|
1868
|
+
} = oe();
|
|
1869
|
+
return ke({
|
|
1870
|
+
queryKey: [yt, e, t],
|
|
1871
|
+
queryFn: () => se(void 0, null, function* () {
|
|
1872
1872
|
if (!t || !e)
|
|
1873
1873
|
return;
|
|
1874
1874
|
if (r)
|
|
@@ -1878,10 +1878,10 @@ const vo = (e) => {
|
|
|
1878
1878
|
}),
|
|
1879
1879
|
enabled: !!t && !!e
|
|
1880
1880
|
});
|
|
1881
|
-
},
|
|
1882
|
-
const t =
|
|
1883
|
-
return
|
|
1884
|
-
mutationFn: () =>
|
|
1881
|
+
}, Sr = (e) => {
|
|
1882
|
+
const t = re(), r = Te();
|
|
1883
|
+
return xt({
|
|
1884
|
+
mutationFn: () => se(void 0, null, function* () {
|
|
1885
1885
|
if (!(!t || !e))
|
|
1886
1886
|
return t.ai.chat.clearHistory(e);
|
|
1887
1887
|
}),
|
|
@@ -1889,32 +1889,32 @@ const vo = (e) => {
|
|
|
1889
1889
|
console.error("Error when clearing history:", a);
|
|
1890
1890
|
},
|
|
1891
1891
|
onSettled: () => {
|
|
1892
|
-
e && r.setQueriesData([
|
|
1892
|
+
e && r.setQueriesData([yt, e], []);
|
|
1893
1893
|
}
|
|
1894
1894
|
});
|
|
1895
|
-
},
|
|
1895
|
+
}, wt = (e) => {
|
|
1896
1896
|
const {
|
|
1897
1897
|
data: t,
|
|
1898
1898
|
isLoading: r,
|
|
1899
1899
|
isError: a
|
|
1900
|
-
} =
|
|
1900
|
+
} = Do(e), {
|
|
1901
1901
|
mutate: i
|
|
1902
|
-
} =
|
|
1903
|
-
return
|
|
1902
|
+
} = Sr(e);
|
|
1903
|
+
return ye(() => {
|
|
1904
1904
|
a && i();
|
|
1905
1905
|
}, [a, i]), {
|
|
1906
1906
|
history: t,
|
|
1907
1907
|
isLoading: r,
|
|
1908
1908
|
isError: a
|
|
1909
1909
|
};
|
|
1910
|
-
},
|
|
1911
|
-
const e =
|
|
1910
|
+
}, Ao = () => {
|
|
1911
|
+
const e = re(), {
|
|
1912
1912
|
data: t,
|
|
1913
1913
|
isLoading: r,
|
|
1914
1914
|
fetchStatus: a
|
|
1915
|
-
} =
|
|
1915
|
+
} = ke({
|
|
1916
1916
|
queryKey: ["getDataTopics", e],
|
|
1917
|
-
queryFn: () =>
|
|
1917
|
+
queryFn: () => se(void 0, null, function* () {
|
|
1918
1918
|
if (e)
|
|
1919
1919
|
return e.getChatContexts();
|
|
1920
1920
|
}),
|
|
@@ -1925,11 +1925,11 @@ const vo = (e) => {
|
|
|
1925
1925
|
isLoading: r,
|
|
1926
1926
|
fetchStatus: a
|
|
1927
1927
|
};
|
|
1928
|
-
},
|
|
1929
|
-
const e =
|
|
1928
|
+
}, Lo = () => {
|
|
1929
|
+
const e = re(), {
|
|
1930
1930
|
data: t,
|
|
1931
1931
|
isLoading: r
|
|
1932
|
-
} =
|
|
1932
|
+
} = ke({
|
|
1933
1933
|
queryKey: ["getAllChats", e],
|
|
1934
1934
|
queryFn: () => e == null ? void 0 : e.ai.chat.getAll(),
|
|
1935
1935
|
enabled: !!e
|
|
@@ -1938,18 +1938,18 @@ const vo = (e) => {
|
|
|
1938
1938
|
data: t ?? [],
|
|
1939
1939
|
isLoading: r
|
|
1940
1940
|
};
|
|
1941
|
-
},
|
|
1942
|
-
const a =
|
|
1943
|
-
mutationFn: () =>
|
|
1941
|
+
}, To = (e, t, r) => {
|
|
1942
|
+
const a = Te(), i = re(), l = xt({
|
|
1943
|
+
mutationFn: () => se(void 0, null, function* () {
|
|
1944
1944
|
if (!(!i || !e))
|
|
1945
1945
|
return i.ai.chat.create(e, r);
|
|
1946
1946
|
}),
|
|
1947
1947
|
onSuccess: () => a.invalidateQueries(["getAllChats"])
|
|
1948
1948
|
});
|
|
1949
|
-
return
|
|
1949
|
+
return ye(() => {
|
|
1950
1950
|
t && l.isIdle && l.mutate();
|
|
1951
1951
|
}, [t, l]), l;
|
|
1952
|
-
},
|
|
1952
|
+
}, No = (e, t) => {
|
|
1953
1953
|
switch (e.responseType = e.responseType.toLowerCase(), e.responseType) {
|
|
1954
1954
|
case "nlq":
|
|
1955
1955
|
return {
|
|
@@ -1966,16 +1966,16 @@ const vo = (e) => {
|
|
|
1966
1966
|
default:
|
|
1967
1967
|
throw Error(`${t}${JSON.stringify(e)}`);
|
|
1968
1968
|
}
|
|
1969
|
-
},
|
|
1970
|
-
const r =
|
|
1971
|
-
e && r.setQueriesData([
|
|
1969
|
+
}, jo = (e, t) => {
|
|
1970
|
+
const r = Te(), a = j((c) => {
|
|
1971
|
+
e && r.setQueriesData([yt, e], (g) => g && [...g, c]);
|
|
1972
1972
|
}, [r, e]), {
|
|
1973
1973
|
t: i
|
|
1974
|
-
} = E(), l =
|
|
1974
|
+
} = E(), l = re(), {
|
|
1975
1975
|
mutate: s,
|
|
1976
1976
|
isLoading: u
|
|
1977
|
-
} =
|
|
1978
|
-
mutationFn: (c) =>
|
|
1977
|
+
} = xt({
|
|
1978
|
+
mutationFn: (c) => se(void 0, null, function* () {
|
|
1979
1979
|
if (!(!l || !e))
|
|
1980
1980
|
return l.ai.chat.post(e, {
|
|
1981
1981
|
text: c,
|
|
@@ -2002,60 +2002,60 @@ const vo = (e) => {
|
|
|
2002
2002
|
if (!c)
|
|
2003
2003
|
return;
|
|
2004
2004
|
const g = i("ai.errors.unknownResponse");
|
|
2005
|
-
a(
|
|
2005
|
+
a(No(c, g));
|
|
2006
2006
|
}
|
|
2007
2007
|
});
|
|
2008
2008
|
return {
|
|
2009
2009
|
mutate: s,
|
|
2010
2010
|
isLoading: u
|
|
2011
2011
|
};
|
|
2012
|
-
},
|
|
2012
|
+
}, _t = (e, t, r = !1) => {
|
|
2013
2013
|
var a;
|
|
2014
2014
|
const {
|
|
2015
2015
|
data: i,
|
|
2016
2016
|
isLoading: l
|
|
2017
|
-
} =
|
|
2017
|
+
} = Lo(), s = bo(), u = s.getChatId(e, t) || ((a = i.find((x) => {
|
|
2018
2018
|
var o;
|
|
2019
2019
|
return x.contextTitle === e && ((o = x.contextDetails) == null ? void 0 : o.dashboardId) === (t == null ? void 0 : t.dashboardId);
|
|
2020
2020
|
})) == null ? void 0 : a.chatId), {
|
|
2021
2021
|
isError: c,
|
|
2022
2022
|
data: g,
|
|
2023
2023
|
isSuccess: b
|
|
2024
|
-
} =
|
|
2025
|
-
return
|
|
2024
|
+
} = To(e, r && !l && !u, t);
|
|
2025
|
+
return ye(() => {
|
|
2026
2026
|
b && g && !u && s.saveChatId(g.chatId, e, t);
|
|
2027
2027
|
}, [g, b, e, t, u, s]), {
|
|
2028
2028
|
chatId: u,
|
|
2029
2029
|
isLoading: l,
|
|
2030
2030
|
isError: c
|
|
2031
2031
|
};
|
|
2032
|
-
},
|
|
2032
|
+
}, Mr = (e) => q(() => {
|
|
2033
2033
|
if (e != null && e.length) {
|
|
2034
2034
|
const t = e[e.length - 1];
|
|
2035
|
-
if (
|
|
2035
|
+
if (Ct(t))
|
|
2036
2036
|
return JSON.parse(t.content);
|
|
2037
2037
|
}
|
|
2038
2038
|
return null;
|
|
2039
|
-
}, [e]),
|
|
2039
|
+
}, [e]), Ct = (e) => !!e && "type" in e && e.type === "nlq", Oo = (e) => !!e && "type" in e && e.type === "text", Eo = (e, t) => {
|
|
2040
2040
|
const {
|
|
2041
2041
|
t: r
|
|
2042
2042
|
} = E(), {
|
|
2043
2043
|
enableFollowupQuestions: a
|
|
2044
|
-
} =
|
|
2044
|
+
} = oe(), {
|
|
2045
2045
|
chatId: i,
|
|
2046
2046
|
isError: l
|
|
2047
|
-
} =
|
|
2047
|
+
} = _t(e, t, !0), [s, u] = R(null), {
|
|
2048
2048
|
history: c,
|
|
2049
2049
|
isLoading: g,
|
|
2050
2050
|
isError: b
|
|
2051
|
-
} =
|
|
2052
|
-
|
|
2053
|
-
l ? u(new
|
|
2051
|
+
} = wt(i);
|
|
2052
|
+
ye(() => {
|
|
2053
|
+
l ? u(new Ae("ai.errors.chatUnavailable")) : b && u(new Ae("ai.errors.fetchHistory"));
|
|
2054
2054
|
}, [l, b, r]);
|
|
2055
2055
|
const {
|
|
2056
2056
|
mutate: x,
|
|
2057
2057
|
isLoading: o
|
|
2058
|
-
} =
|
|
2058
|
+
} = jo(i, a), p = Mr(c);
|
|
2059
2059
|
return {
|
|
2060
2060
|
chatId: i,
|
|
2061
2061
|
history: c ?? [],
|
|
@@ -2065,53 +2065,67 @@ const vo = (e) => {
|
|
|
2065
2065
|
isLoading: g,
|
|
2066
2066
|
lastError: s
|
|
2067
2067
|
};
|
|
2068
|
-
},
|
|
2068
|
+
}, Vs = ({
|
|
2069
2069
|
contextTitle: e,
|
|
2070
2070
|
contextDetails: t
|
|
2071
2071
|
}) => {
|
|
2072
2072
|
const {
|
|
2073
2073
|
chatId: r
|
|
2074
|
-
} =
|
|
2074
|
+
} = _t(e, t), {
|
|
2075
2075
|
history: a
|
|
2076
|
-
} =
|
|
2077
|
-
return
|
|
2078
|
-
},
|
|
2076
|
+
} = wt(r);
|
|
2077
|
+
return Mr(a);
|
|
2078
|
+
}, Js = ({
|
|
2079
2079
|
contextTitle: e,
|
|
2080
2080
|
contextDetails: t
|
|
2081
2081
|
}) => {
|
|
2082
2082
|
const {
|
|
2083
2083
|
chatId: r
|
|
2084
|
-
} =
|
|
2084
|
+
} = _t(e, t), {
|
|
2085
2085
|
history: a
|
|
2086
|
-
} =
|
|
2087
|
-
return
|
|
2086
|
+
} = wt(r);
|
|
2087
|
+
return q(() => {
|
|
2088
2088
|
if (a != null && a.length) {
|
|
2089
|
-
const i = a.slice().reverse().find(
|
|
2089
|
+
const i = a.slice().reverse().find(Ct);
|
|
2090
2090
|
if (i)
|
|
2091
2091
|
return JSON.parse(i.content);
|
|
2092
2092
|
}
|
|
2093
2093
|
return null;
|
|
2094
2094
|
}, [a]);
|
|
2095
|
-
},
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2095
|
+
}, zo = 500, Ro = 500, Zo = 500, Wo = 900, $o = _.div`
|
|
2096
|
+
box-sizing: border-box;
|
|
2097
|
+
position: relative;
|
|
2098
|
+
display: flex;
|
|
2099
|
+
flex-direction: column;
|
|
2100
|
+
border: 1px solid #c6c9ce;
|
|
2101
|
+
border-radius: ${({
|
|
2099
2102
|
theme: e
|
|
2100
|
-
}) => e.aiChat.borderRadius
|
|
2103
|
+
}) => e.aiChat.borderRadius};
|
|
2104
|
+
background-color: ${({
|
|
2101
2105
|
theme: e
|
|
2102
|
-
}) => e.aiChat.backgroundColor
|
|
2106
|
+
}) => e.aiChat.backgroundColor};
|
|
2107
|
+
overflow: hidden;
|
|
2108
|
+
|
|
2109
|
+
min-width: ${zo}px;
|
|
2110
|
+
min-height: ${Ro}px;
|
|
2111
|
+
width: ${({
|
|
2103
2112
|
width: e
|
|
2104
|
-
}) => e ?
|
|
2113
|
+
}) => e ? $t(e) : `${Zo}px`};
|
|
2114
|
+
height: ${({
|
|
2105
2115
|
height: e
|
|
2106
|
-
}) => e ?
|
|
2116
|
+
}) => e ? $t(e) : `${Wo}px`};
|
|
2117
|
+
|
|
2118
|
+
${({
|
|
2107
2119
|
theme: e
|
|
2108
|
-
}) =>
|
|
2120
|
+
}) => $`
|
|
2109
2121
|
font-size: ${e.aiChat.primaryFontSize[0]};
|
|
2110
2122
|
line-height: ${e.aiChat.primaryFontSize[1]};
|
|
2111
|
-
|
|
2123
|
+
`}
|
|
2124
|
+
border: ${({
|
|
2112
2125
|
theme: e
|
|
2113
|
-
}) => e.aiChat.border === !1 ? "none" : e.aiChat.border
|
|
2114
|
-
|
|
2126
|
+
}) => e.aiChat.border === !1 ? "none" : e.aiChat.border};
|
|
2127
|
+
`;
|
|
2128
|
+
function $t(e) {
|
|
2115
2129
|
return typeof e == "number" ? `${e}px` : e;
|
|
2116
2130
|
}
|
|
2117
2131
|
function qo({
|
|
@@ -2138,7 +2152,7 @@ function qo({
|
|
|
2138
2152
|
})]
|
|
2139
2153
|
});
|
|
2140
2154
|
}
|
|
2141
|
-
function
|
|
2155
|
+
function Je() {
|
|
2142
2156
|
return /* @__PURE__ */ n("div", {
|
|
2143
2157
|
className: "csdk-m-auto",
|
|
2144
2158
|
"aria-label": "loading spinner",
|
|
@@ -2147,12 +2161,22 @@ function Ve() {
|
|
|
2147
2161
|
})
|
|
2148
2162
|
});
|
|
2149
2163
|
}
|
|
2150
|
-
const Po =
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2164
|
+
const Po = _.div`
|
|
2165
|
+
text-align: center;
|
|
2166
|
+
font-size: 11px;
|
|
2167
|
+
line-height: 18px;
|
|
2168
|
+
white-space: pre-wrap;
|
|
2169
|
+
|
|
2170
|
+
display: flex;
|
|
2171
|
+
flex-wrap: wrap;
|
|
2172
|
+
align-items: center;
|
|
2173
|
+
justify-content: center;
|
|
2174
|
+
box-sizing: border-box;
|
|
2175
|
+
|
|
2176
|
+
color: ${({
|
|
2154
2177
|
theme: e
|
|
2155
|
-
}) => e.aiChat.secondaryTextColor
|
|
2178
|
+
}) => e.aiChat.secondaryTextColor};
|
|
2179
|
+
`;
|
|
2156
2180
|
function Go({
|
|
2157
2181
|
theme: e
|
|
2158
2182
|
}) {
|
|
@@ -2168,29 +2192,43 @@ function Go({
|
|
|
2168
2192
|
})]
|
|
2169
2193
|
});
|
|
2170
2194
|
}
|
|
2171
|
-
const Bo =
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2195
|
+
const Bo = _.div`
|
|
2196
|
+
display: flex;
|
|
2197
|
+
flex-direction: column;
|
|
2198
|
+
row-gap: 4px;
|
|
2199
|
+
`, Ho = _.div`
|
|
2200
|
+
font-size: 11px;
|
|
2201
|
+
line-height: 18px;
|
|
2202
|
+
font-weight: 300;
|
|
2203
|
+
color: ${({
|
|
2178
2204
|
theme: e
|
|
2179
|
-
}) => e.aiChat.dropup.headers.textColor
|
|
2205
|
+
}) => e.aiChat.dropup.headers.textColor};
|
|
2206
|
+
cursor: pointer;
|
|
2207
|
+
padding: 4px 12px;
|
|
2208
|
+
&:hover {
|
|
2209
|
+
background-color: ${({
|
|
2180
2210
|
theme: e
|
|
2181
|
-
}) => e.aiChat.dropup.headers.hover.backgroundColor
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2211
|
+
}) => e.aiChat.dropup.headers.hover.backgroundColor};
|
|
2212
|
+
}
|
|
2213
|
+
`, Yo = _.div`
|
|
2214
|
+
font-size: ${({
|
|
2185
2215
|
theme: e
|
|
2186
|
-
}) => e.aiChat.primaryFontSize[0]
|
|
2216
|
+
}) => e.aiChat.primaryFontSize[0]};
|
|
2217
|
+
line-height: ${({
|
|
2187
2218
|
theme: e
|
|
2188
|
-
}) => e.aiChat.primaryFontSize[1]
|
|
2219
|
+
}) => e.aiChat.primaryFontSize[1]};
|
|
2220
|
+
color: ${({
|
|
2189
2221
|
theme: e
|
|
2190
|
-
}) => e.aiChat.dropup.items.textColor
|
|
2222
|
+
}) => e.aiChat.dropup.items.textColor};
|
|
2223
|
+
cursor: pointer;
|
|
2224
|
+
padding: 4px 12px;
|
|
2225
|
+
&:hover {
|
|
2226
|
+
background-color: ${({
|
|
2191
2227
|
theme: e
|
|
2192
|
-
}) => e.aiChat.dropup.items.hover.backgroundColor
|
|
2193
|
-
|
|
2228
|
+
}) => e.aiChat.dropup.items.hover.backgroundColor};
|
|
2229
|
+
}
|
|
2230
|
+
`;
|
|
2231
|
+
function Uo({
|
|
2194
2232
|
title: e,
|
|
2195
2233
|
items: t,
|
|
2196
2234
|
onSelect: r,
|
|
@@ -2211,32 +2249,43 @@ function $o({
|
|
|
2211
2249
|
}, c))]
|
|
2212
2250
|
});
|
|
2213
2251
|
}
|
|
2214
|
-
const
|
|
2215
|
-
|
|
2216
|
-
label: "PopupContent"
|
|
2217
|
-
})("font-family:", ({
|
|
2252
|
+
const Qo = _.div`
|
|
2253
|
+
font-family: ${({
|
|
2218
2254
|
theme: e
|
|
2219
|
-
}) => e.typography.fontFamily
|
|
2255
|
+
}) => e.typography.fontFamily};
|
|
2256
|
+
font-size: ${({
|
|
2220
2257
|
theme: e
|
|
2221
|
-
}) => e.aiChat.primaryFontSize[0]
|
|
2258
|
+
}) => e.aiChat.primaryFontSize[0]};
|
|
2259
|
+
line-height: ${({
|
|
2222
2260
|
theme: e
|
|
2223
|
-
}) => e.aiChat.primaryFontSize[1]
|
|
2261
|
+
}) => e.aiChat.primaryFontSize[1]};
|
|
2262
|
+
background-color: ${({
|
|
2224
2263
|
theme: e
|
|
2225
|
-
}) => e.aiChat.dropup.backgroundColor
|
|
2264
|
+
}) => e.aiChat.dropup.backgroundColor};
|
|
2265
|
+
border-radius: ${({
|
|
2226
2266
|
theme: e
|
|
2227
|
-
}) => e.aiChat.dropup.borderRadius
|
|
2267
|
+
}) => e.aiChat.dropup.borderRadius};
|
|
2268
|
+
box-shadow: ${({
|
|
2228
2269
|
theme: e
|
|
2229
|
-
}) => e.aiChat.dropup.boxShadow
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2270
|
+
}) => e.aiChat.dropup.boxShadow};
|
|
2271
|
+
padding-top: 8px;
|
|
2272
|
+
padding-bottom: 8px;
|
|
2273
|
+
display: flex;
|
|
2274
|
+
flex-direction: column;
|
|
2275
|
+
row-gap: 4px;
|
|
2276
|
+
`, Fo = _.div`
|
|
2277
|
+
font-size: ${({
|
|
2233
2278
|
theme: e
|
|
2234
|
-
}) => e.aiChat.primaryFontSize[0]
|
|
2279
|
+
}) => e.aiChat.primaryFontSize[0]};
|
|
2280
|
+
line-height: ${({
|
|
2235
2281
|
theme: e
|
|
2236
|
-
}) => e.aiChat.primaryFontSize[1]
|
|
2282
|
+
}) => e.aiChat.primaryFontSize[1]};
|
|
2283
|
+
color: ${({
|
|
2237
2284
|
theme: e
|
|
2238
|
-
}) => e.aiChat.dropup.items.textColor
|
|
2239
|
-
|
|
2285
|
+
}) => e.aiChat.dropup.items.textColor};
|
|
2286
|
+
padding: 4px 12px;
|
|
2287
|
+
`, ct = (e) => e.startsWith("/");
|
|
2288
|
+
function Vo({
|
|
2240
2289
|
recentPrompts: e,
|
|
2241
2290
|
suggestions: t,
|
|
2242
2291
|
isLoading: r,
|
|
@@ -2258,8 +2307,8 @@ function Fo({
|
|
|
2258
2307
|
} = D(), {
|
|
2259
2308
|
t: g
|
|
2260
2309
|
} = E(), b = u.length === 1;
|
|
2261
|
-
return /* @__PURE__ */ n(
|
|
2262
|
-
open:
|
|
2310
|
+
return /* @__PURE__ */ n(sr, {
|
|
2311
|
+
open: ct(l) && u.length > 0,
|
|
2263
2312
|
anchorEl: i,
|
|
2264
2313
|
placement: "top-start",
|
|
2265
2314
|
modifiers: [{
|
|
@@ -2271,22 +2320,22 @@ function Fo({
|
|
|
2271
2320
|
sx: {
|
|
2272
2321
|
zIndex: 3
|
|
2273
2322
|
},
|
|
2274
|
-
children: /* @__PURE__ */ v(
|
|
2323
|
+
children: /* @__PURE__ */ v(Qo, {
|
|
2275
2324
|
style: {
|
|
2276
2325
|
width: i == null ? void 0 : i.offsetWidth
|
|
2277
2326
|
},
|
|
2278
2327
|
theme: c,
|
|
2279
|
-
children: [r && /* @__PURE__ */ n(
|
|
2328
|
+
children: [r && /* @__PURE__ */ n(Je, {}), !r && !s && u.map((x) => /* @__PURE__ */ n(Uo, T(M({}, x), {
|
|
2280
2329
|
alwaysExpanded: b
|
|
2281
|
-
}), x.title)), s && /* @__PURE__ */ n(
|
|
2330
|
+
}), x.title)), s && /* @__PURE__ */ n(Fo, {
|
|
2282
2331
|
theme: c,
|
|
2283
2332
|
children: g("ai.errors.recommendationsNotAvailable")
|
|
2284
2333
|
})]
|
|
2285
2334
|
})
|
|
2286
2335
|
});
|
|
2287
2336
|
}
|
|
2288
|
-
const
|
|
2289
|
-
function
|
|
2337
|
+
const Jo = 500;
|
|
2338
|
+
function je({
|
|
2290
2339
|
title: e,
|
|
2291
2340
|
placement: t = "top",
|
|
2292
2341
|
children: r
|
|
@@ -2294,7 +2343,7 @@ function Ne({
|
|
|
2294
2343
|
const {
|
|
2295
2344
|
themeSettings: a
|
|
2296
2345
|
} = D();
|
|
2297
|
-
return /* @__PURE__ */ n(
|
|
2346
|
+
return /* @__PURE__ */ n(Xa, {
|
|
2298
2347
|
title: e,
|
|
2299
2348
|
placement: t,
|
|
2300
2349
|
disableInteractive: !0,
|
|
@@ -2322,7 +2371,7 @@ function Ne({
|
|
|
2322
2371
|
children: r
|
|
2323
2372
|
});
|
|
2324
2373
|
}
|
|
2325
|
-
function
|
|
2374
|
+
function Xo({
|
|
2326
2375
|
theme: e
|
|
2327
2376
|
}) {
|
|
2328
2377
|
const t = e.aiChat.icons.color;
|
|
@@ -2344,7 +2393,7 @@ function Jo({
|
|
|
2344
2393
|
})]
|
|
2345
2394
|
});
|
|
2346
2395
|
}
|
|
2347
|
-
function
|
|
2396
|
+
function Ko({
|
|
2348
2397
|
theme: e
|
|
2349
2398
|
}) {
|
|
2350
2399
|
return /* @__PURE__ */ n("svg", {
|
|
@@ -2359,38 +2408,74 @@ function Xo({
|
|
|
2359
2408
|
})
|
|
2360
2409
|
});
|
|
2361
2410
|
}
|
|
2362
|
-
const
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2411
|
+
const en = _.div`
|
|
2412
|
+
display: flex;
|
|
2413
|
+
flex-direction: row;
|
|
2414
|
+
align-items: flex-end;
|
|
2415
|
+
justify-content: space-between;
|
|
2416
|
+
|
|
2417
|
+
background-color: ${({
|
|
2366
2418
|
theme: e
|
|
2367
|
-
}) => e.aiChat.backgroundColor
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2419
|
+
}) => e.aiChat.backgroundColor};
|
|
2420
|
+
`, tn = _.button`
|
|
2421
|
+
height: 34px;
|
|
2422
|
+
background-color: inherit;
|
|
2423
|
+
cursor: pointer;
|
|
2424
|
+
border: none;
|
|
2425
|
+
`, rn = _.textarea`
|
|
2426
|
+
font-size: inherit;
|
|
2427
|
+
line-height: inherit;
|
|
2428
|
+
resize: none;
|
|
2429
|
+
overflow-y: auto;
|
|
2430
|
+
box-sizing: border-box;
|
|
2431
|
+
// size style
|
|
2432
|
+
max-height: 88px;
|
|
2433
|
+
width: 100%;
|
|
2434
|
+
// spacing style
|
|
2435
|
+
padding-top: 7px;
|
|
2436
|
+
padding-bottom: 7px;
|
|
2437
|
+
padding-left: 16px;
|
|
2438
|
+
padding-right: 16px;
|
|
2439
|
+
margin-left: 10px;
|
|
2440
|
+
margin-right: 10px;
|
|
2441
|
+
// border style
|
|
2442
|
+
border-width: 1px;
|
|
2443
|
+
border-color: rgb(38 46 61 / 0.15);
|
|
2444
|
+
border-radius: 0.5rem;
|
|
2445
|
+
&:focus {
|
|
2446
|
+
outline: 1px solid ${({
|
|
2374
2447
|
theme: e
|
|
2375
|
-
}) => e.aiChat.input.focus.outlineColor
|
|
2448
|
+
}) => e.aiChat.input.focus.outlineColor};
|
|
2449
|
+
}
|
|
2450
|
+
font-family: inherit;
|
|
2451
|
+
|
|
2452
|
+
color: ${({
|
|
2376
2453
|
theme: e
|
|
2377
|
-
}) => e.aiChat.primaryTextColor
|
|
2454
|
+
}) => e.aiChat.primaryTextColor};
|
|
2455
|
+
|
|
2456
|
+
background-color: ${({
|
|
2378
2457
|
theme: e
|
|
2379
|
-
}) => e.aiChat.input.backgroundColor
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2458
|
+
}) => e.aiChat.input.backgroundColor};
|
|
2459
|
+
`, an = _.button`
|
|
2460
|
+
height: 34px;
|
|
2461
|
+
background-color: inherit;
|
|
2462
|
+
border-style: none;
|
|
2463
|
+
|
|
2464
|
+
color: ${({
|
|
2383
2465
|
theme: e
|
|
2384
|
-
}) => e.aiChat.primaryTextColor
|
|
2466
|
+
}) => e.aiChat.primaryTextColor};
|
|
2467
|
+
|
|
2468
|
+
${({
|
|
2385
2469
|
disabled: e
|
|
2386
|
-
}) => e ?
|
|
2470
|
+
}) => e ? $`
|
|
2387
2471
|
opacity: 0.3;
|
|
2388
2472
|
cursor: not-allowed;
|
|
2389
|
-
` :
|
|
2473
|
+
` : $`
|
|
2390
2474
|
opacity: 1;
|
|
2391
2475
|
cursor: pointer;
|
|
2392
|
-
`
|
|
2393
|
-
|
|
2476
|
+
`}
|
|
2477
|
+
`, on = 34;
|
|
2478
|
+
function nn({
|
|
2394
2479
|
onSendMessage: e,
|
|
2395
2480
|
onClearHistoryClick: t,
|
|
2396
2481
|
disabled: r,
|
|
@@ -2402,10 +2487,10 @@ function on({
|
|
|
2402
2487
|
}) {
|
|
2403
2488
|
const [c, g] = R(""), {
|
|
2404
2489
|
inputPromptText: b
|
|
2405
|
-
} =
|
|
2490
|
+
} = oe(), x = j(() => {
|
|
2406
2491
|
if (r)
|
|
2407
2492
|
return;
|
|
2408
|
-
if (
|
|
2493
|
+
if (ct(c)) {
|
|
2409
2494
|
g("");
|
|
2410
2495
|
return;
|
|
2411
2496
|
}
|
|
@@ -2414,12 +2499,16 @@ function on({
|
|
|
2414
2499
|
}, [r, e, c]), o = j((y) => {
|
|
2415
2500
|
e(y), g("");
|
|
2416
2501
|
}, [e]), p = j((y) => {
|
|
2417
|
-
y.key === "Enter" ? (y.preventDefault(), x()) : y.key === "Escape" &&
|
|
2502
|
+
y.key === "Enter" ? (y.preventDefault(), x()) : y.key === "Escape" && ct(c) && g("");
|
|
2418
2503
|
}, [x, c]), d = j((y) => {
|
|
2419
2504
|
u == null || u(y.target.value), g(y.target.value);
|
|
2420
|
-
}, [u]), m =
|
|
2505
|
+
}, [u]), m = ue(null);
|
|
2421
2506
|
Be(() => {
|
|
2422
|
-
m.current && (m.current.style.height = "inherit", m.current.style.height = `${Math.max(
|
|
2507
|
+
m.current && (m.current.style.height = "inherit", m.current.style.height = `${Math.max(
|
|
2508
|
+
m.current.scrollHeight + 2,
|
|
2509
|
+
// account for 1px top/bottom border
|
|
2510
|
+
on
|
|
2511
|
+
)}px`);
|
|
2423
2512
|
}, [c]), Be(() => {
|
|
2424
2513
|
m.current && m.current.focus({
|
|
2425
2514
|
preventScroll: !0
|
|
@@ -2429,7 +2518,7 @@ function on({
|
|
|
2429
2518
|
themeSettings: h
|
|
2430
2519
|
} = D(), {
|
|
2431
2520
|
t: w
|
|
2432
|
-
} = E(),
|
|
2521
|
+
} = E(), C = j((y) => {
|
|
2433
2522
|
var I;
|
|
2434
2523
|
if ((I = document.getElementById("csdk-chatbot-frame")) != null && I.contains(y.relatedTarget)) {
|
|
2435
2524
|
const A = (S) => {
|
|
@@ -2441,9 +2530,9 @@ function on({
|
|
|
2441
2530
|
document.addEventListener("mouseup", A), document.addEventListener("keyup", A);
|
|
2442
2531
|
}
|
|
2443
2532
|
}, []);
|
|
2444
|
-
return /* @__PURE__ */ v(
|
|
2533
|
+
return /* @__PURE__ */ v(en, {
|
|
2445
2534
|
theme: h,
|
|
2446
|
-
children: [/* @__PURE__ */ n(
|
|
2535
|
+
children: [/* @__PURE__ */ n(Vo, {
|
|
2447
2536
|
recentPrompts: a,
|
|
2448
2537
|
suggestions: i,
|
|
2449
2538
|
isLoading: l,
|
|
@@ -2451,20 +2540,20 @@ function on({
|
|
|
2451
2540
|
anchorEl: m.current,
|
|
2452
2541
|
text: c,
|
|
2453
2542
|
recommendationsError: s
|
|
2454
|
-
}), t && /* @__PURE__ */ n(
|
|
2543
|
+
}), t && /* @__PURE__ */ n(je, {
|
|
2455
2544
|
title: w("ai.buttons.clearChat"),
|
|
2456
2545
|
placement: "bottom-start",
|
|
2457
|
-
children: /* @__PURE__ */ n(
|
|
2546
|
+
children: /* @__PURE__ */ n(tn, {
|
|
2458
2547
|
"aria-label": "clear history",
|
|
2459
2548
|
onClick: t,
|
|
2460
|
-
children: /* @__PURE__ */ n(
|
|
2549
|
+
children: /* @__PURE__ */ n(Xo, {
|
|
2461
2550
|
theme: h
|
|
2462
2551
|
})
|
|
2463
2552
|
})
|
|
2464
|
-
}), /* @__PURE__ */ n(
|
|
2553
|
+
}), /* @__PURE__ */ n(rn, {
|
|
2465
2554
|
"aria-label": "chat input",
|
|
2466
|
-
onBlur:
|
|
2467
|
-
maxLength:
|
|
2555
|
+
onBlur: C,
|
|
2556
|
+
maxLength: Jo,
|
|
2468
2557
|
ref: m,
|
|
2469
2558
|
rows: 1,
|
|
2470
2559
|
onChange: d,
|
|
@@ -2473,69 +2562,83 @@ function on({
|
|
|
2473
2562
|
value: c,
|
|
2474
2563
|
onKeyDown: p,
|
|
2475
2564
|
theme: h
|
|
2476
|
-
}), /* @__PURE__ */ n(
|
|
2565
|
+
}), /* @__PURE__ */ n(an, {
|
|
2477
2566
|
"aria-label": "send chat message",
|
|
2478
2567
|
disabled: r || c.length === 0,
|
|
2479
2568
|
onClick: x,
|
|
2480
2569
|
theme: h,
|
|
2481
2570
|
children: /* @__PURE__ */ n("span", {
|
|
2482
2571
|
"data-state": "closed",
|
|
2483
|
-
children: /* @__PURE__ */ n(
|
|
2572
|
+
children: /* @__PURE__ */ n(Ko, {
|
|
2484
2573
|
theme: h
|
|
2485
2574
|
})
|
|
2486
2575
|
})
|
|
2487
2576
|
})]
|
|
2488
2577
|
});
|
|
2489
2578
|
}
|
|
2490
|
-
const
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2579
|
+
const ln = _.div`
|
|
2580
|
+
margin: auto;
|
|
2581
|
+
display: flex;
|
|
2582
|
+
flex-direction: column;
|
|
2583
|
+
align-items: center;
|
|
2584
|
+
row-gap: 21px;
|
|
2585
|
+
`, sn = _.div`
|
|
2586
|
+
color: ${({
|
|
2497
2587
|
theme: e
|
|
2498
|
-
}) => e.aiChat.primaryTextColor
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2588
|
+
}) => e.aiChat.primaryTextColor};
|
|
2589
|
+
text-align: center;
|
|
2590
|
+
font-weight: 600;
|
|
2591
|
+
`, dn = _.div`
|
|
2592
|
+
color: rgba(54, 163, 217, 1);
|
|
2593
|
+
cursor: pointer;
|
|
2594
|
+
`;
|
|
2595
|
+
function Ir({
|
|
2503
2596
|
text: e,
|
|
2504
2597
|
action: t
|
|
2505
2598
|
}) {
|
|
2506
2599
|
const {
|
|
2507
2600
|
themeSettings: r
|
|
2508
2601
|
} = D();
|
|
2509
|
-
return /* @__PURE__ */ v(
|
|
2510
|
-
children: [/* @__PURE__ */ n(
|
|
2602
|
+
return /* @__PURE__ */ v(ln, {
|
|
2603
|
+
children: [/* @__PURE__ */ n(sn, {
|
|
2511
2604
|
theme: r,
|
|
2512
2605
|
children: e
|
|
2513
|
-
}), /* @__PURE__ */ n(
|
|
2606
|
+
}), /* @__PURE__ */ n(Wa, {}), t && /* @__PURE__ */ n(dn, {
|
|
2514
2607
|
onClick: t.onClick,
|
|
2515
2608
|
children: t.text
|
|
2516
2609
|
})]
|
|
2517
2610
|
});
|
|
2518
2611
|
}
|
|
2519
|
-
const
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2612
|
+
const cn = _.div`
|
|
2613
|
+
flex: 0 0 80px;
|
|
2614
|
+
padding-left: 14px;
|
|
2615
|
+
padding-right: 14px;
|
|
2616
|
+
display: flex;
|
|
2617
|
+
align-items: center;
|
|
2618
|
+
position: relative;
|
|
2619
|
+
|
|
2620
|
+
background-color: ${({
|
|
2523
2621
|
style: e
|
|
2524
|
-
}) => e.backgroundColor
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2622
|
+
}) => e.backgroundColor};
|
|
2623
|
+
`, pn = _.div`
|
|
2624
|
+
font-size: 18px;
|
|
2625
|
+
line-height: 22px;
|
|
2626
|
+
font-weight: 600;
|
|
2627
|
+
margin-left: 20px;
|
|
2628
|
+
|
|
2629
|
+
color: ${({
|
|
2528
2630
|
style: e
|
|
2529
|
-
}) => e.textColor
|
|
2631
|
+
}) => e.textColor};
|
|
2632
|
+
`, Dr = tr(function({
|
|
2530
2633
|
title: e,
|
|
2531
2634
|
leftNav: t,
|
|
2532
2635
|
rightNav: r,
|
|
2533
2636
|
style: a
|
|
2534
2637
|
}, i) {
|
|
2535
|
-
return /* @__PURE__ */ v(
|
|
2638
|
+
return /* @__PURE__ */ v(cn, {
|
|
2536
2639
|
ref: i,
|
|
2537
2640
|
style: a,
|
|
2538
|
-
children: [t, /* @__PURE__ */ n(
|
|
2641
|
+
children: [t, /* @__PURE__ */ n(pn, {
|
|
2539
2642
|
style: a,
|
|
2540
2643
|
children: e
|
|
2541
2644
|
}), r && /* @__PURE__ */ n("div", {
|
|
@@ -2543,39 +2646,64 @@ const dn = /* @__PURE__ */ C("div", {
|
|
|
2543
2646
|
children: r
|
|
2544
2647
|
})]
|
|
2545
2648
|
});
|
|
2546
|
-
}),
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2649
|
+
}), Ze = _.div`
|
|
2650
|
+
width: 5px;
|
|
2651
|
+
height: 5px;
|
|
2652
|
+
border-radius: 50%;
|
|
2653
|
+
background-color: ${(e) => e.color};
|
|
2654
|
+
animation: hop 0.9s ease-out infinite;
|
|
2655
|
+
|
|
2656
|
+
&:nth-of-type(2) {
|
|
2657
|
+
animation-delay: 0.1s;
|
|
2658
|
+
}
|
|
2659
|
+
|
|
2660
|
+
&:nth-of-type(3) {
|
|
2661
|
+
animation-delay: 0.2s;
|
|
2662
|
+
}
|
|
2663
|
+
|
|
2664
|
+
&:nth-of-type(4) {
|
|
2665
|
+
animation-delay: 0.3s;
|
|
2666
|
+
}
|
|
2667
|
+
|
|
2668
|
+
@keyframes hop {
|
|
2669
|
+
0%,
|
|
2670
|
+
40% {
|
|
2671
|
+
transform: translateY(0);
|
|
2672
|
+
}
|
|
2673
|
+
20% {
|
|
2674
|
+
transform: translateY(-100%);
|
|
2675
|
+
}
|
|
2676
|
+
}
|
|
2677
|
+
`;
|
|
2678
|
+
function vt() {
|
|
2551
2679
|
const {
|
|
2552
2680
|
themeSettings: e
|
|
2553
2681
|
} = D(), t = e.aiChat.icons.color;
|
|
2554
2682
|
return /* @__PURE__ */ v("div", {
|
|
2555
2683
|
className: "csdk-flex csdk-justify-between csdk-w-[28px] csdk-py-[14.5px]",
|
|
2556
2684
|
"aria-label": "loading dots",
|
|
2557
|
-
children: [/* @__PURE__ */ n(
|
|
2685
|
+
children: [/* @__PURE__ */ n(Ze, {
|
|
2558
2686
|
color: t
|
|
2559
|
-
}), /* @__PURE__ */ n(
|
|
2687
|
+
}), /* @__PURE__ */ n(Ze, {
|
|
2560
2688
|
color: t
|
|
2561
|
-
}), /* @__PURE__ */ n(
|
|
2689
|
+
}), /* @__PURE__ */ n(Ze, {
|
|
2562
2690
|
color: t
|
|
2563
|
-
}), /* @__PURE__ */ n(
|
|
2691
|
+
}), /* @__PURE__ */ n(Ze, {
|
|
2564
2692
|
color: t
|
|
2565
2693
|
})]
|
|
2566
2694
|
});
|
|
2567
2695
|
}
|
|
2568
|
-
function
|
|
2569
|
-
return
|
|
2696
|
+
function pe() {
|
|
2697
|
+
return pe = Object.assign ? Object.assign.bind() : function(e) {
|
|
2570
2698
|
for (var t = 1; t < arguments.length; t++) {
|
|
2571
2699
|
var r = arguments[t];
|
|
2572
2700
|
for (var a in r)
|
|
2573
2701
|
Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]);
|
|
2574
2702
|
}
|
|
2575
2703
|
return e;
|
|
2576
|
-
},
|
|
2704
|
+
}, pe.apply(this, arguments);
|
|
2577
2705
|
}
|
|
2578
|
-
const
|
|
2706
|
+
const un = ["children", "options"], k = {
|
|
2579
2707
|
blockQuote: "0",
|
|
2580
2708
|
breakLine: "1",
|
|
2581
2709
|
breakThematic: "2",
|
|
@@ -2625,47 +2753,47 @@ const Pt = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus",
|
|
|
2625
2753
|
lt: "<",
|
|
2626
2754
|
nbsp: " ",
|
|
2627
2755
|
quot: "“"
|
|
2628
|
-
},
|
|
2629
|
-
function
|
|
2630
|
-
return "( *)(" + (e === 1 ?
|
|
2756
|
+
}, gn = ["style", "script"], hn = ["src", "href", "data", "formAction", "srcDoc", "action"], mn = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, fn = /mailto:/i, bn = /\n{2,}$/, Ar = /^(\s*>[\s\S]*?)(?=\n\n|$)/, xn = /^ *> ?/gm, kn = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, yn = /^ {2,}\n/, wn = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, Lr = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, Tr = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, _n = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, Cn = /^(?:\n *)*\n/, vn = /\r\n?/g, Sn = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, Mn = /^\[\^([^\]]+)]/, In = /\f/g, Dn = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, An = /^\s*?\[(x|\s)\]/, Nr = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, jr = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Or = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/, pt = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, Ln = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, Er = /^<!--[\s\S]*?(?:-->)/, Tn = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, ut = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, Nn = /^\{.*\}$/, jn = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, On = /^<([^ >]+@[^ >]+)>/, En = /^<([^ >]+:\/[^ >]+)>/, zn = /-([a-z])?/gi, zr = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, Rn = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, Zn = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, Wn = /^\[([^\]]*)\] ?\[([^\]]*)\]/, $n = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, qn = /\t/g, Pn = /(^ *\||\| *$)/g, Gn = /^ *:-+: *$/, Bn = /^ *:-+ *$/, Hn = /^ *-+: *$/, Xe = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", Yn = new RegExp(`^([*_])\\1${Xe}\\1\\1(?!\\1)`), Un = new RegExp(`^([*_])${Xe}\\1(?!\\1)`), Qn = new RegExp(`^(==)${Xe}\\1`), Fn = new RegExp(`^(~~)${Xe}\\1`), Vn = /^\\([^0-9A-Za-z\s])/, Bt = /\\([^0-9A-Za-z\s])/g, Jn = /^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/, Xn = /^\n+/, Kn = /^([ \t]*)/, el = /\\([^\\])/g, tl = /(?:^|\n)( *)$/, St = "(?:\\d+\\.)", Mt = "(?:[*+-])";
|
|
2757
|
+
function Rr(e) {
|
|
2758
|
+
return "( *)(" + (e === 1 ? St : Mt) + ") +";
|
|
2631
2759
|
}
|
|
2632
|
-
const
|
|
2633
|
-
function
|
|
2634
|
-
return new RegExp("^" + (e === 1 ?
|
|
2760
|
+
const Zr = Rr(1), Wr = Rr(2);
|
|
2761
|
+
function $r(e) {
|
|
2762
|
+
return new RegExp("^" + (e === 1 ? Zr : Wr));
|
|
2635
2763
|
}
|
|
2636
|
-
const
|
|
2764
|
+
const rl = $r(1), al = $r(2);
|
|
2637
2765
|
function qr(e) {
|
|
2638
|
-
return new RegExp("^" + (e === 1 ?
|
|
2766
|
+
return new RegExp("^" + (e === 1 ? Zr : Wr) + "[^\\n]*(?:\\n(?!\\1" + (e === 1 ? St : Mt) + " )[^\\n]*)*(\\n|$)", "gm");
|
|
2639
2767
|
}
|
|
2640
|
-
const
|
|
2768
|
+
const il = qr(1), ol = qr(2);
|
|
2641
2769
|
function Pr(e) {
|
|
2642
|
-
const t = e === 1 ?
|
|
2770
|
+
const t = e === 1 ? St : Mt;
|
|
2643
2771
|
return new RegExp("^( *)(" + t + ") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1" + t + " (?!" + t + " ))\\n*|\\s*\\n*$)");
|
|
2644
2772
|
}
|
|
2645
2773
|
const Gr = Pr(1), Br = Pr(2);
|
|
2646
2774
|
function Ht(e, t) {
|
|
2647
|
-
const r = t === 1, a = r ? Gr : Br, i = r ?
|
|
2775
|
+
const r = t === 1, a = r ? Gr : Br, i = r ? il : ol, l = r ? rl : al;
|
|
2648
2776
|
return {
|
|
2649
|
-
match:
|
|
2650
|
-
const c =
|
|
2777
|
+
match: xe(function(s, u) {
|
|
2778
|
+
const c = tl.exec(u.prevCapture);
|
|
2651
2779
|
return c && (u.list || !u.inline && !u.simple) ? a.exec(s = c[1] + s) : null;
|
|
2652
2780
|
}),
|
|
2653
2781
|
order: 1,
|
|
2654
2782
|
parse(s, u, c) {
|
|
2655
|
-
const g = r ? +s[2] : void 0, b = s[0].replace(
|
|
2783
|
+
const g = r ? +s[2] : void 0, b = s[0].replace(bn, `
|
|
2656
2784
|
`).match(i);
|
|
2657
2785
|
let x = !1;
|
|
2658
2786
|
return {
|
|
2659
2787
|
items: b.map(function(o, p) {
|
|
2660
|
-
const d = l.exec(o)[0].length, m = new RegExp("^ {1," + d + "}", "gm"), h = o.replace(m, "").replace(l, ""), w = p === b.length - 1,
|
|
2788
|
+
const d = l.exec(o)[0].length, m = new RegExp("^ {1," + d + "}", "gm"), h = o.replace(m, "").replace(l, ""), w = p === b.length - 1, C = h.indexOf(`
|
|
2661
2789
|
|
|
2662
2790
|
`) !== -1 || w && x;
|
|
2663
|
-
x =
|
|
2791
|
+
x = C;
|
|
2664
2792
|
const y = c.inline, I = c.list;
|
|
2665
2793
|
let A;
|
|
2666
|
-
c.list = !0,
|
|
2794
|
+
c.list = !0, C ? (c.inline = !1, A = Le(h) + `
|
|
2667
2795
|
|
|
2668
|
-
`) : (c.inline = !0, A =
|
|
2796
|
+
`) : (c.inline = !0, A = Le(h));
|
|
2669
2797
|
const S = u(A, c);
|
|
2670
2798
|
return c.inline = y, c.list = I, S;
|
|
2671
2799
|
}),
|
|
@@ -2683,17 +2811,17 @@ function Ht(e, t) {
|
|
|
2683
2811
|
}))
|
|
2684
2812
|
};
|
|
2685
2813
|
}
|
|
2686
|
-
const
|
|
2687
|
-
function
|
|
2814
|
+
const nl = new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), ll = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, Hr = [Ar, Lr, Tr, Nr, Or, jr, zr, Gr, Br], sl = [...Hr, /^[^\n]+(?: \n|\n{2,})/, pt, Er, ut];
|
|
2815
|
+
function Le(e) {
|
|
2688
2816
|
let t = e.length;
|
|
2689
2817
|
for (; t > 0 && e[t - 1] <= " "; )
|
|
2690
2818
|
t--;
|
|
2691
2819
|
return e.slice(0, t);
|
|
2692
2820
|
}
|
|
2693
|
-
function
|
|
2821
|
+
function Se(e) {
|
|
2694
2822
|
return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g, "a").replace(/[çÇ]/g, "c").replace(/[ðÐ]/g, "d").replace(/[ÈÉÊËéèêë]/g, "e").replace(/[ÏïÎîÍíÌì]/g, "i").replace(/[Ññ]/g, "n").replace(/[øØœŒÕõÔôÓóÒò]/g, "o").replace(/[ÜüÛûÚúÙù]/g, "u").replace(/[ŸÿÝý]/g, "y").replace(/[^a-z0-9- ]/gi, "").replace(/ /gi, "-").toLowerCase();
|
|
2695
2823
|
}
|
|
2696
|
-
function
|
|
2824
|
+
function dl(e) {
|
|
2697
2825
|
return Hn.test(e) ? "right" : Gn.test(e) ? "center" : Bn.test(e) ? "left" : null;
|
|
2698
2826
|
}
|
|
2699
2827
|
function Yt(e, t, r, a) {
|
|
@@ -2710,9 +2838,9 @@ function Yt(e, t, r, a) {
|
|
|
2710
2838
|
c.trim() === "|" && (u(), a) ? g !== 0 && g !== b.length - 1 && l.push([]) : s += c;
|
|
2711
2839
|
}), u(), r.inTable = i, l;
|
|
2712
2840
|
}
|
|
2713
|
-
function
|
|
2841
|
+
function cl(e, t, r) {
|
|
2714
2842
|
r.inline = !0;
|
|
2715
|
-
const a = e[2] ? e[2].replace(Pn, "").split("|").map(
|
|
2843
|
+
const a = e[2] ? e[2].replace(Pn, "").split("|").map(dl) : [], i = e[3] ? function(s, u, c) {
|
|
2716
2844
|
return s.trim().split(`
|
|
2717
2845
|
`).map(function(g) {
|
|
2718
2846
|
return Yt(g, u, c, !0);
|
|
@@ -2728,57 +2856,57 @@ function dl(e, t, r) {
|
|
|
2728
2856
|
type: k.paragraph
|
|
2729
2857
|
};
|
|
2730
2858
|
}
|
|
2731
|
-
function
|
|
2859
|
+
function Ut(e, t) {
|
|
2732
2860
|
return e.align[t] == null ? {} : {
|
|
2733
2861
|
textAlign: e.align[t]
|
|
2734
2862
|
};
|
|
2735
2863
|
}
|
|
2736
|
-
function
|
|
2864
|
+
function xe(e) {
|
|
2737
2865
|
return e.inline = 1, e;
|
|
2738
2866
|
}
|
|
2739
|
-
function
|
|
2740
|
-
return
|
|
2867
|
+
function ne(e) {
|
|
2868
|
+
return xe(function(t, r) {
|
|
2741
2869
|
return r.inline ? e.exec(t) : null;
|
|
2742
2870
|
});
|
|
2743
2871
|
}
|
|
2744
|
-
function
|
|
2745
|
-
return
|
|
2872
|
+
function le(e) {
|
|
2873
|
+
return xe(function(t, r) {
|
|
2746
2874
|
return r.inline || r.simple ? e.exec(t) : null;
|
|
2747
2875
|
});
|
|
2748
2876
|
}
|
|
2749
|
-
function
|
|
2877
|
+
function ae(e) {
|
|
2750
2878
|
return function(t, r) {
|
|
2751
2879
|
return r.inline || r.simple ? null : e.exec(t);
|
|
2752
2880
|
};
|
|
2753
2881
|
}
|
|
2754
|
-
function
|
|
2755
|
-
return
|
|
2882
|
+
function Me(e) {
|
|
2883
|
+
return xe(function(t) {
|
|
2756
2884
|
return e.exec(t);
|
|
2757
2885
|
});
|
|
2758
2886
|
}
|
|
2759
|
-
function
|
|
2887
|
+
function pl(e, t) {
|
|
2760
2888
|
if (t.inline || t.simple)
|
|
2761
2889
|
return null;
|
|
2762
2890
|
let r = "";
|
|
2763
2891
|
e.split(`
|
|
2764
2892
|
`).every((i) => (i += `
|
|
2765
2893
|
`, !Hr.some((l) => l.test(i)) && (r += i, !!i.trim())));
|
|
2766
|
-
const a =
|
|
2894
|
+
const a = Le(r);
|
|
2767
2895
|
return a == "" ? null : [r, , a];
|
|
2768
2896
|
}
|
|
2769
|
-
const
|
|
2770
|
-
function
|
|
2897
|
+
const ul = /(javascript|vbscript|data(?!:image)):/i;
|
|
2898
|
+
function gl(e) {
|
|
2771
2899
|
try {
|
|
2772
2900
|
const t = decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g, "");
|
|
2773
|
-
if (
|
|
2901
|
+
if (ul.test(t))
|
|
2774
2902
|
return null;
|
|
2775
2903
|
} catch {
|
|
2776
2904
|
return null;
|
|
2777
2905
|
}
|
|
2778
2906
|
return e;
|
|
2779
2907
|
}
|
|
2780
|
-
function
|
|
2781
|
-
return e.replace(
|
|
2908
|
+
function Qt(e) {
|
|
2909
|
+
return e.replace(el, "$1");
|
|
2782
2910
|
}
|
|
2783
2911
|
function Pe(e, t, r) {
|
|
2784
2912
|
const a = r.inline || !1, i = r.simple || !1;
|
|
@@ -2786,52 +2914,52 @@ function Pe(e, t, r) {
|
|
|
2786
2914
|
const l = e(t, r);
|
|
2787
2915
|
return r.inline = a, r.simple = i, l;
|
|
2788
2916
|
}
|
|
2789
|
-
function
|
|
2917
|
+
function hl(e, t, r) {
|
|
2790
2918
|
const a = r.inline || !1, i = r.simple || !1;
|
|
2791
2919
|
r.inline = !1, r.simple = !0;
|
|
2792
2920
|
const l = e(t, r);
|
|
2793
2921
|
return r.inline = a, r.simple = i, l;
|
|
2794
2922
|
}
|
|
2795
|
-
function
|
|
2923
|
+
function ml(e, t, r) {
|
|
2796
2924
|
const a = r.inline || !1;
|
|
2797
2925
|
r.inline = !1;
|
|
2798
2926
|
const i = e(t, r);
|
|
2799
2927
|
return r.inline = a, i;
|
|
2800
2928
|
}
|
|
2801
|
-
const
|
|
2929
|
+
const tt = (e, t, r) => ({
|
|
2802
2930
|
children: Pe(t, e[2], r)
|
|
2803
2931
|
});
|
|
2804
|
-
function
|
|
2932
|
+
function rt() {
|
|
2805
2933
|
return {};
|
|
2806
2934
|
}
|
|
2807
|
-
function
|
|
2935
|
+
function at() {
|
|
2808
2936
|
return null;
|
|
2809
2937
|
}
|
|
2810
|
-
function
|
|
2938
|
+
function fl(...e) {
|
|
2811
2939
|
return e.filter(Boolean).join(" ");
|
|
2812
2940
|
}
|
|
2813
|
-
function
|
|
2941
|
+
function it(e, t, r) {
|
|
2814
2942
|
let a = e;
|
|
2815
2943
|
const i = t.split(".");
|
|
2816
2944
|
for (; i.length && (a = a[i[0]], a !== void 0); )
|
|
2817
2945
|
i.shift();
|
|
2818
2946
|
return a || r;
|
|
2819
2947
|
}
|
|
2820
|
-
function
|
|
2948
|
+
function bl(e = "", t = {}) {
|
|
2821
2949
|
function r(o, p, ...d) {
|
|
2822
|
-
const m =
|
|
2950
|
+
const m = it(t.overrides, `${o}.props`, {});
|
|
2823
2951
|
return t.createElement(function(h, w) {
|
|
2824
|
-
const
|
|
2825
|
-
return
|
|
2826
|
-
}(o, t.overrides),
|
|
2827
|
-
className:
|
|
2952
|
+
const C = it(w, h);
|
|
2953
|
+
return C ? typeof C == "function" || typeof C == "object" && "render" in C ? C : it(w, `${h}.component`, h) : h;
|
|
2954
|
+
}(o, t.overrides), pe({}, p, m, {
|
|
2955
|
+
className: fl(p == null ? void 0 : p.className, m.className) || void 0
|
|
2828
2956
|
}), ...d);
|
|
2829
2957
|
}
|
|
2830
2958
|
function a(o) {
|
|
2831
|
-
o = o.replace(
|
|
2959
|
+
o = o.replace(Dn, "");
|
|
2832
2960
|
let p = !1;
|
|
2833
|
-
t.forceInline ? p = !0 : t.forceBlock || (p =
|
|
2834
|
-
const d = g(c(p ? o : `${
|
|
2961
|
+
t.forceInline ? p = !0 : t.forceBlock || (p = $n.test(o) === !1);
|
|
2962
|
+
const d = g(c(p ? o : `${Le(o).replace(Xn, "")}
|
|
2835
2963
|
|
|
2836
2964
|
`, {
|
|
2837
2965
|
inline: p
|
|
@@ -2856,68 +2984,68 @@ function fl(e = "", t = {}) {
|
|
|
2856
2984
|
}, h);
|
|
2857
2985
|
}
|
|
2858
2986
|
function i(o, p) {
|
|
2859
|
-
const d = p.match(
|
|
2987
|
+
const d = p.match(mn);
|
|
2860
2988
|
return d ? d.reduce(function(m, h) {
|
|
2861
2989
|
const w = h.indexOf("=");
|
|
2862
2990
|
if (w !== -1) {
|
|
2863
|
-
const
|
|
2864
|
-
return S.indexOf("-") !== -1 && S.match(
|
|
2991
|
+
const C = function(S) {
|
|
2992
|
+
return S.indexOf("-") !== -1 && S.match(Tn) === null && (S = S.replace(zn, function(L, Z) {
|
|
2865
2993
|
return Z.toUpperCase();
|
|
2866
2994
|
})), S;
|
|
2867
2995
|
}(h.slice(0, w)).trim(), y = function(S) {
|
|
2868
2996
|
const L = S[0];
|
|
2869
2997
|
return (L === '"' || L === "'") && S.length >= 2 && S[S.length - 1] === L ? S.slice(1, -1) : S;
|
|
2870
|
-
}(h.slice(w + 1).trim()), I = Pt[
|
|
2998
|
+
}(h.slice(w + 1).trim()), I = Pt[C] || C;
|
|
2871
2999
|
if (I === "ref")
|
|
2872
3000
|
return m;
|
|
2873
|
-
const A = m[I] = function(S, L, Z,
|
|
2874
|
-
return L === "style" ? function(
|
|
2875
|
-
const
|
|
2876
|
-
let
|
|
2877
|
-
if (!
|
|
2878
|
-
return
|
|
2879
|
-
for (let z = 0; z <
|
|
2880
|
-
const W =
|
|
2881
|
-
if (W !== '"' && W !== "'" ||
|
|
2882
|
-
|
|
3001
|
+
const A = m[I] = function(S, L, Z, ge) {
|
|
3002
|
+
return L === "style" ? function(F) {
|
|
3003
|
+
const G = [];
|
|
3004
|
+
let U = "", V = !1, B = !1, J = "";
|
|
3005
|
+
if (!F)
|
|
3006
|
+
return G;
|
|
3007
|
+
for (let z = 0; z < F.length; z++) {
|
|
3008
|
+
const W = F[z];
|
|
3009
|
+
if (W !== '"' && W !== "'" || V || (B ? W === J && (B = !1, J = "") : (B = !0, J = W)), W === "(" && U.endsWith("url") ? V = !0 : W === ")" && V && (V = !1), W !== ";" || B || V)
|
|
3010
|
+
U += W;
|
|
2883
3011
|
else {
|
|
2884
|
-
const
|
|
2885
|
-
if (
|
|
2886
|
-
const
|
|
2887
|
-
if (
|
|
2888
|
-
const
|
|
2889
|
-
|
|
3012
|
+
const Q = U.trim();
|
|
3013
|
+
if (Q) {
|
|
3014
|
+
const ce = Q.indexOf(":");
|
|
3015
|
+
if (ce > 0) {
|
|
3016
|
+
const he = Q.slice(0, ce).trim(), we = Q.slice(ce + 1).trim();
|
|
3017
|
+
G.push([he, we]);
|
|
2890
3018
|
}
|
|
2891
3019
|
}
|
|
2892
|
-
|
|
3020
|
+
U = "";
|
|
2893
3021
|
}
|
|
2894
3022
|
}
|
|
2895
|
-
const
|
|
2896
|
-
if (
|
|
2897
|
-
const z =
|
|
3023
|
+
const X = U.trim();
|
|
3024
|
+
if (X) {
|
|
3025
|
+
const z = X.indexOf(":");
|
|
2898
3026
|
if (z > 0) {
|
|
2899
|
-
const W =
|
|
2900
|
-
|
|
3027
|
+
const W = X.slice(0, z).trim(), Q = X.slice(z + 1).trim();
|
|
3028
|
+
G.push([W, Q]);
|
|
2901
3029
|
}
|
|
2902
3030
|
}
|
|
2903
|
-
return
|
|
2904
|
-
}(Z).reduce(function(
|
|
2905
|
-
return
|
|
2906
|
-
}, {}) :
|
|
2907
|
-
}(o,
|
|
2908
|
-
typeof A == "string" && (
|
|
3031
|
+
return G;
|
|
3032
|
+
}(Z).reduce(function(F, [G, U]) {
|
|
3033
|
+
return F[G.replace(/(-[a-z])/g, (V) => V[1].toUpperCase())] = ge(U, S, G), F;
|
|
3034
|
+
}, {}) : hn.indexOf(L) !== -1 ? ge(Z, S, L) : (Z.match(Nn) && (Z = Z.slice(1, Z.length - 1)), Z === "true" || Z !== "false" && Z);
|
|
3035
|
+
}(o, C, y, t.sanitizer);
|
|
3036
|
+
typeof A == "string" && (pt.test(A) || ut.test(A)) && (m[I] = a(A.trim()));
|
|
2909
3037
|
} else
|
|
2910
3038
|
h !== "style" && (m[Pt[h] || h] = !0);
|
|
2911
3039
|
return m;
|
|
2912
3040
|
}, {}) : null;
|
|
2913
3041
|
}
|
|
2914
|
-
t.overrides = t.overrides || {}, t.sanitizer = t.sanitizer ||
|
|
3042
|
+
t.overrides = t.overrides || {}, t.sanitizer = t.sanitizer || gl, t.slugify = t.slugify || Se, t.namedCodesToUnicode = t.namedCodesToUnicode ? pe({}, Gt, t.namedCodesToUnicode) : Gt, t.createElement = t.createElement || Ka;
|
|
2915
3043
|
const l = [], s = {}, u = {
|
|
2916
3044
|
[k.blockQuote]: {
|
|
2917
|
-
match:
|
|
3045
|
+
match: ae(Ar),
|
|
2918
3046
|
order: 1,
|
|
2919
3047
|
parse(o, p, d) {
|
|
2920
|
-
const [, m, h] = o[0].replace(
|
|
3048
|
+
const [, m, h] = o[0].replace(xn, "").match(kn);
|
|
2921
3049
|
return {
|
|
2922
3050
|
alert: m,
|
|
2923
3051
|
children: p(h, d)
|
|
@@ -2927,7 +3055,7 @@ function fl(e = "", t = {}) {
|
|
|
2927
3055
|
const m = {
|
|
2928
3056
|
key: d.key
|
|
2929
3057
|
};
|
|
2930
|
-
return o.alert && (m.className = "markdown-alert-" + t.slugify(o.alert.toLowerCase(),
|
|
3058
|
+
return o.alert && (m.className = "markdown-alert-" + t.slugify(o.alert.toLowerCase(), Se), o.children.unshift({
|
|
2931
3059
|
attrs: {},
|
|
2932
3060
|
children: [{
|
|
2933
3061
|
type: k.text,
|
|
@@ -2940,36 +3068,36 @@ function fl(e = "", t = {}) {
|
|
|
2940
3068
|
}
|
|
2941
3069
|
},
|
|
2942
3070
|
[k.breakLine]: {
|
|
2943
|
-
match:
|
|
3071
|
+
match: Me(yn),
|
|
2944
3072
|
order: 1,
|
|
2945
|
-
parse:
|
|
3073
|
+
parse: rt,
|
|
2946
3074
|
render: (o, p, d) => r("br", {
|
|
2947
3075
|
key: d.key
|
|
2948
3076
|
})
|
|
2949
3077
|
},
|
|
2950
3078
|
[k.breakThematic]: {
|
|
2951
|
-
match:
|
|
3079
|
+
match: ae(wn),
|
|
2952
3080
|
order: 1,
|
|
2953
|
-
parse:
|
|
3081
|
+
parse: rt,
|
|
2954
3082
|
render: (o, p, d) => r("hr", {
|
|
2955
3083
|
key: d.key
|
|
2956
3084
|
})
|
|
2957
3085
|
},
|
|
2958
3086
|
[k.codeBlock]: {
|
|
2959
|
-
match:
|
|
3087
|
+
match: ae(Tr),
|
|
2960
3088
|
order: 0,
|
|
2961
3089
|
parse: (o) => ({
|
|
2962
3090
|
lang: void 0,
|
|
2963
|
-
text:
|
|
3091
|
+
text: Le(o[0].replace(/^ {4}/gm, "")).replace(Bt, "$1")
|
|
2964
3092
|
}),
|
|
2965
3093
|
render: (o, p, d) => r("pre", {
|
|
2966
3094
|
key: d.key
|
|
2967
|
-
}, r("code",
|
|
3095
|
+
}, r("code", pe({}, o.attrs, {
|
|
2968
3096
|
className: o.lang ? `lang-${o.lang}` : ""
|
|
2969
3097
|
}), o.text))
|
|
2970
3098
|
},
|
|
2971
3099
|
[k.codeFenced]: {
|
|
2972
|
-
match:
|
|
3100
|
+
match: ae(Lr),
|
|
2973
3101
|
order: 0,
|
|
2974
3102
|
parse: (o) => ({
|
|
2975
3103
|
attrs: i("code", o[3] || ""),
|
|
@@ -2979,7 +3107,7 @@ function fl(e = "", t = {}) {
|
|
|
2979
3107
|
})
|
|
2980
3108
|
},
|
|
2981
3109
|
[k.codeInline]: {
|
|
2982
|
-
match:
|
|
3110
|
+
match: le(_n),
|
|
2983
3111
|
order: 3,
|
|
2984
3112
|
parse: (o) => ({
|
|
2985
3113
|
text: o[2].replace(Bt, "$1")
|
|
@@ -2989,19 +3117,19 @@ function fl(e = "", t = {}) {
|
|
|
2989
3117
|
}, o.text)
|
|
2990
3118
|
},
|
|
2991
3119
|
[k.footnote]: {
|
|
2992
|
-
match:
|
|
3120
|
+
match: ae(Sn),
|
|
2993
3121
|
order: 0,
|
|
2994
3122
|
parse: (o) => (l.push({
|
|
2995
3123
|
footnote: o[2],
|
|
2996
3124
|
identifier: o[1]
|
|
2997
3125
|
}), {}),
|
|
2998
|
-
render:
|
|
3126
|
+
render: at
|
|
2999
3127
|
},
|
|
3000
3128
|
[k.footnoteReference]: {
|
|
3001
|
-
match:
|
|
3129
|
+
match: ne(Mn),
|
|
3002
3130
|
order: 1,
|
|
3003
3131
|
parse: (o) => ({
|
|
3004
|
-
target: `#${t.slugify(o[1],
|
|
3132
|
+
target: `#${t.slugify(o[1], Se)}`,
|
|
3005
3133
|
text: o[1]
|
|
3006
3134
|
}),
|
|
3007
3135
|
render: (o, p, d) => r("a", {
|
|
@@ -3012,7 +3140,7 @@ function fl(e = "", t = {}) {
|
|
|
3012
3140
|
}, o.text))
|
|
3013
3141
|
},
|
|
3014
3142
|
[k.gfmTask]: {
|
|
3015
|
-
match:
|
|
3143
|
+
match: ne(An),
|
|
3016
3144
|
order: 1,
|
|
3017
3145
|
parse: (o) => ({
|
|
3018
3146
|
completed: o[1].toLowerCase() === "x"
|
|
@@ -3025,11 +3153,11 @@ function fl(e = "", t = {}) {
|
|
|
3025
3153
|
})
|
|
3026
3154
|
},
|
|
3027
3155
|
[k.heading]: {
|
|
3028
|
-
match:
|
|
3156
|
+
match: ae(t.enforceAtxHeadings ? jr : Nr),
|
|
3029
3157
|
order: 1,
|
|
3030
3158
|
parse: (o, p, d) => ({
|
|
3031
3159
|
children: Pe(p, o[2], d),
|
|
3032
|
-
id: t.slugify(o[2],
|
|
3160
|
+
id: t.slugify(o[2], Se),
|
|
3033
3161
|
level: o[1].length
|
|
3034
3162
|
}),
|
|
3035
3163
|
render: (o, p, d) => r(`h${o.level}`, {
|
|
@@ -3038,7 +3166,7 @@ function fl(e = "", t = {}) {
|
|
|
3038
3166
|
}, p(o.children, d))
|
|
3039
3167
|
},
|
|
3040
3168
|
[k.headingSetext]: {
|
|
3041
|
-
match:
|
|
3169
|
+
match: ae(Or),
|
|
3042
3170
|
order: 0,
|
|
3043
3171
|
parse: (o, p, d) => ({
|
|
3044
3172
|
children: Pe(p, o[1], d),
|
|
@@ -3047,24 +3175,24 @@ function fl(e = "", t = {}) {
|
|
|
3047
3175
|
})
|
|
3048
3176
|
},
|
|
3049
3177
|
[k.htmlBlock]: {
|
|
3050
|
-
match:
|
|
3178
|
+
match: Me(pt),
|
|
3051
3179
|
order: 1,
|
|
3052
3180
|
parse(o, p, d) {
|
|
3053
|
-
const [, m] = o[3].match(
|
|
3181
|
+
const [, m] = o[3].match(Kn), h = new RegExp(`^${m}`, "gm"), w = o[3].replace(h, ""), C = (y = w, sl.some((Z) => Z.test(y)) ? ml : Pe);
|
|
3054
3182
|
var y;
|
|
3055
|
-
const I = o[1].toLowerCase(), A =
|
|
3183
|
+
const I = o[1].toLowerCase(), A = gn.indexOf(I) !== -1, S = (A ? I : o[1]).trim(), L = {
|
|
3056
3184
|
attrs: i(S, o[2]),
|
|
3057
3185
|
noInnerParse: A,
|
|
3058
3186
|
tag: S
|
|
3059
3187
|
};
|
|
3060
|
-
return d.inAnchor = d.inAnchor || I === "a", A ? L.text = o[3] : L.children =
|
|
3188
|
+
return d.inAnchor = d.inAnchor || I === "a", A ? L.text = o[3] : L.children = C(p, w, d), d.inAnchor = !1, L;
|
|
3061
3189
|
},
|
|
3062
|
-
render: (o, p, d) => r(o.tag,
|
|
3190
|
+
render: (o, p, d) => r(o.tag, pe({
|
|
3063
3191
|
key: d.key
|
|
3064
3192
|
}, o.attrs), o.text || (o.children ? p(o.children, d) : ""))
|
|
3065
3193
|
},
|
|
3066
3194
|
[k.htmlSelfClosing]: {
|
|
3067
|
-
match:
|
|
3195
|
+
match: Me(ut),
|
|
3068
3196
|
order: 1,
|
|
3069
3197
|
parse(o) {
|
|
3070
3198
|
const p = o[1].trim();
|
|
@@ -3073,22 +3201,22 @@ function fl(e = "", t = {}) {
|
|
|
3073
3201
|
tag: p
|
|
3074
3202
|
};
|
|
3075
3203
|
},
|
|
3076
|
-
render: (o, p, d) => r(o.tag,
|
|
3204
|
+
render: (o, p, d) => r(o.tag, pe({}, o.attrs, {
|
|
3077
3205
|
key: d.key
|
|
3078
3206
|
}))
|
|
3079
3207
|
},
|
|
3080
3208
|
[k.htmlComment]: {
|
|
3081
|
-
match:
|
|
3209
|
+
match: Me(Er),
|
|
3082
3210
|
order: 1,
|
|
3083
3211
|
parse: () => ({}),
|
|
3084
|
-
render:
|
|
3212
|
+
render: at
|
|
3085
3213
|
},
|
|
3086
3214
|
[k.image]: {
|
|
3087
|
-
match:
|
|
3215
|
+
match: le(ll),
|
|
3088
3216
|
order: 1,
|
|
3089
3217
|
parse: (o) => ({
|
|
3090
3218
|
alt: o[1],
|
|
3091
|
-
target:
|
|
3219
|
+
target: Qt(o[2]),
|
|
3092
3220
|
title: o[3]
|
|
3093
3221
|
}),
|
|
3094
3222
|
render: (o, p, d) => r("img", {
|
|
@@ -3099,11 +3227,11 @@ function fl(e = "", t = {}) {
|
|
|
3099
3227
|
})
|
|
3100
3228
|
},
|
|
3101
3229
|
[k.link]: {
|
|
3102
|
-
match:
|
|
3230
|
+
match: ne(nl),
|
|
3103
3231
|
order: 3,
|
|
3104
3232
|
parse: (o, p, d) => ({
|
|
3105
|
-
children:
|
|
3106
|
-
target:
|
|
3233
|
+
children: hl(p, o[1], d),
|
|
3234
|
+
target: Qt(o[2]),
|
|
3107
3235
|
title: o[3]
|
|
3108
3236
|
}),
|
|
3109
3237
|
render: (o, p, d) => r("a", {
|
|
@@ -3113,7 +3241,7 @@ function fl(e = "", t = {}) {
|
|
|
3113
3241
|
}, p(o.children, d))
|
|
3114
3242
|
},
|
|
3115
3243
|
[k.linkAngleBraceStyleDetector]: {
|
|
3116
|
-
match:
|
|
3244
|
+
match: ne(En),
|
|
3117
3245
|
order: 0,
|
|
3118
3246
|
parse: (o) => ({
|
|
3119
3247
|
children: [{
|
|
@@ -3125,7 +3253,7 @@ function fl(e = "", t = {}) {
|
|
|
3125
3253
|
})
|
|
3126
3254
|
},
|
|
3127
3255
|
[k.linkBareUrlDetector]: {
|
|
3128
|
-
match:
|
|
3256
|
+
match: xe((o, p) => p.inAnchor || t.disableAutoLink ? null : ne(jn)(o, p)),
|
|
3129
3257
|
order: 0,
|
|
3130
3258
|
parse: (o) => ({
|
|
3131
3259
|
children: [{
|
|
@@ -3138,11 +3266,11 @@ function fl(e = "", t = {}) {
|
|
|
3138
3266
|
})
|
|
3139
3267
|
},
|
|
3140
3268
|
[k.linkMailtoDetector]: {
|
|
3141
|
-
match:
|
|
3269
|
+
match: ne(On),
|
|
3142
3270
|
order: 0,
|
|
3143
3271
|
parse(o) {
|
|
3144
3272
|
let p = o[1], d = o[1];
|
|
3145
|
-
return
|
|
3273
|
+
return fn.test(d) || (d = "mailto:" + d), {
|
|
3146
3274
|
children: [{
|
|
3147
3275
|
text: p.replace("mailto:", ""),
|
|
3148
3276
|
type: k.text
|
|
@@ -3155,31 +3283,31 @@ function fl(e = "", t = {}) {
|
|
|
3155
3283
|
[k.orderedList]: Ht(r, 1),
|
|
3156
3284
|
[k.unorderedList]: Ht(r, 2),
|
|
3157
3285
|
[k.newlineCoalescer]: {
|
|
3158
|
-
match:
|
|
3286
|
+
match: ae(Cn),
|
|
3159
3287
|
order: 3,
|
|
3160
|
-
parse:
|
|
3288
|
+
parse: rt,
|
|
3161
3289
|
render: () => `
|
|
3162
3290
|
`
|
|
3163
3291
|
},
|
|
3164
3292
|
[k.paragraph]: {
|
|
3165
|
-
match:
|
|
3293
|
+
match: xe(pl),
|
|
3166
3294
|
order: 3,
|
|
3167
|
-
parse:
|
|
3295
|
+
parse: tt,
|
|
3168
3296
|
render: (o, p, d) => r("p", {
|
|
3169
3297
|
key: d.key
|
|
3170
3298
|
}, p(o.children, d))
|
|
3171
3299
|
},
|
|
3172
3300
|
[k.ref]: {
|
|
3173
|
-
match:
|
|
3301
|
+
match: ne(Rn),
|
|
3174
3302
|
order: 0,
|
|
3175
3303
|
parse: (o) => (s[o[1]] = {
|
|
3176
3304
|
target: o[2],
|
|
3177
3305
|
title: o[4]
|
|
3178
3306
|
}, {}),
|
|
3179
|
-
render:
|
|
3307
|
+
render: at
|
|
3180
3308
|
},
|
|
3181
3309
|
[k.refImage]: {
|
|
3182
|
-
match:
|
|
3310
|
+
match: le(Zn),
|
|
3183
3311
|
order: 0,
|
|
3184
3312
|
parse: (o) => ({
|
|
3185
3313
|
alt: o[1] || void 0,
|
|
@@ -3193,7 +3321,7 @@ function fl(e = "", t = {}) {
|
|
|
3193
3321
|
}) : null
|
|
3194
3322
|
},
|
|
3195
3323
|
[k.refLink]: {
|
|
3196
|
-
match:
|
|
3324
|
+
match: ne(Wn),
|
|
3197
3325
|
order: 0,
|
|
3198
3326
|
parse: (o, p, d) => ({
|
|
3199
3327
|
children: p(o[1], d),
|
|
@@ -3209,9 +3337,9 @@ function fl(e = "", t = {}) {
|
|
|
3209
3337
|
}, o.fallbackChildren)
|
|
3210
3338
|
},
|
|
3211
3339
|
[k.table]: {
|
|
3212
|
-
match:
|
|
3340
|
+
match: ae(zr),
|
|
3213
3341
|
order: 1,
|
|
3214
|
-
parse:
|
|
3342
|
+
parse: cl,
|
|
3215
3343
|
render(o, p, d) {
|
|
3216
3344
|
const m = o;
|
|
3217
3345
|
return r("table", {
|
|
@@ -3219,30 +3347,30 @@ function fl(e = "", t = {}) {
|
|
|
3219
3347
|
}, r("thead", null, r("tr", null, m.header.map(function(h, w) {
|
|
3220
3348
|
return r("th", {
|
|
3221
3349
|
key: w,
|
|
3222
|
-
style:
|
|
3350
|
+
style: Ut(m, w)
|
|
3223
3351
|
}, p(h, d));
|
|
3224
3352
|
}))), r("tbody", null, m.cells.map(function(h, w) {
|
|
3225
3353
|
return r("tr", {
|
|
3226
3354
|
key: w
|
|
3227
|
-
}, h.map(function(
|
|
3355
|
+
}, h.map(function(C, y) {
|
|
3228
3356
|
return r("td", {
|
|
3229
3357
|
key: y,
|
|
3230
|
-
style:
|
|
3231
|
-
}, p(
|
|
3358
|
+
style: Ut(m, y)
|
|
3359
|
+
}, p(C, d));
|
|
3232
3360
|
}));
|
|
3233
3361
|
})));
|
|
3234
3362
|
}
|
|
3235
3363
|
},
|
|
3236
3364
|
[k.text]: {
|
|
3237
|
-
match:
|
|
3365
|
+
match: Me(Jn),
|
|
3238
3366
|
order: 4,
|
|
3239
3367
|
parse: (o) => ({
|
|
3240
|
-
text: o[0].replace(
|
|
3368
|
+
text: o[0].replace(Ln, (p, d) => t.namedCodesToUnicode[d] ? t.namedCodesToUnicode[d] : p)
|
|
3241
3369
|
}),
|
|
3242
3370
|
render: (o) => o.text
|
|
3243
3371
|
},
|
|
3244
3372
|
[k.textBolded]: {
|
|
3245
|
-
match:
|
|
3373
|
+
match: le(Yn),
|
|
3246
3374
|
order: 2,
|
|
3247
3375
|
parse: (o, p, d) => ({
|
|
3248
3376
|
children: p(o[2], d)
|
|
@@ -3252,7 +3380,7 @@ function fl(e = "", t = {}) {
|
|
|
3252
3380
|
}, p(o.children, d))
|
|
3253
3381
|
},
|
|
3254
3382
|
[k.textEmphasized]: {
|
|
3255
|
-
match:
|
|
3383
|
+
match: le(Un),
|
|
3256
3384
|
order: 3,
|
|
3257
3385
|
parse: (o, p, d) => ({
|
|
3258
3386
|
children: p(o[2], d)
|
|
@@ -3262,7 +3390,7 @@ function fl(e = "", t = {}) {
|
|
|
3262
3390
|
}, p(o.children, d))
|
|
3263
3391
|
},
|
|
3264
3392
|
[k.textEscaped]: {
|
|
3265
|
-
match:
|
|
3393
|
+
match: le(Vn),
|
|
3266
3394
|
order: 1,
|
|
3267
3395
|
parse: (o) => ({
|
|
3268
3396
|
text: o[1],
|
|
@@ -3270,17 +3398,17 @@ function fl(e = "", t = {}) {
|
|
|
3270
3398
|
})
|
|
3271
3399
|
},
|
|
3272
3400
|
[k.textMarked]: {
|
|
3273
|
-
match:
|
|
3401
|
+
match: le(Qn),
|
|
3274
3402
|
order: 3,
|
|
3275
|
-
parse:
|
|
3403
|
+
parse: tt,
|
|
3276
3404
|
render: (o, p, d) => r("mark", {
|
|
3277
3405
|
key: d.key
|
|
3278
3406
|
}, p(o.children, d))
|
|
3279
3407
|
},
|
|
3280
3408
|
[k.textStrikethroughed]: {
|
|
3281
|
-
match:
|
|
3409
|
+
match: le(Fn),
|
|
3282
3410
|
order: 3,
|
|
3283
|
-
parse:
|
|
3411
|
+
parse: tt,
|
|
3284
3412
|
render: (o, p, d) => r("del", {
|
|
3285
3413
|
key: d.key
|
|
3286
3414
|
}, p(o.children, d))
|
|
@@ -3290,7 +3418,7 @@ function fl(e = "", t = {}) {
|
|
|
3290
3418
|
const c = function(o) {
|
|
3291
3419
|
let p = Object.keys(o);
|
|
3292
3420
|
function d(m, h) {
|
|
3293
|
-
let w,
|
|
3421
|
+
let w, C, y = [], I = "", A = "";
|
|
3294
3422
|
for (h.prevCapture = h.prevCapture || ""; m; ) {
|
|
3295
3423
|
let S = 0;
|
|
3296
3424
|
for (; S < p.length; ) {
|
|
@@ -3300,7 +3428,7 @@ function fl(e = "", t = {}) {
|
|
|
3300
3428
|
}
|
|
3301
3429
|
const L = w.match(m, h);
|
|
3302
3430
|
if (L) {
|
|
3303
|
-
A = L[0], h.prevCapture += A, m = m.substring(A.length),
|
|
3431
|
+
A = L[0], h.prevCapture += A, m = m.substring(A.length), C = w.parse(L, d, h), C.type == null && (C.type = I), y.push(C);
|
|
3304
3432
|
break;
|
|
3305
3433
|
}
|
|
3306
3434
|
S++;
|
|
@@ -3309,12 +3437,12 @@ function fl(e = "", t = {}) {
|
|
|
3309
3437
|
return h.prevCapture = "", y;
|
|
3310
3438
|
}
|
|
3311
3439
|
return p.sort(function(m, h) {
|
|
3312
|
-
let w = o[m].order,
|
|
3313
|
-
return w !==
|
|
3440
|
+
let w = o[m].order, C = o[h].order;
|
|
3441
|
+
return w !== C ? w - C : m < h ? -1 : 1;
|
|
3314
3442
|
}), function(m, h) {
|
|
3315
3443
|
return d(function(w) {
|
|
3316
|
-
return w.replace(
|
|
3317
|
-
`).replace(
|
|
3444
|
+
return w.replace(vn, `
|
|
3445
|
+
`).replace(In, "").replace(qn, " ");
|
|
3318
3446
|
}(m), h);
|
|
3319
3447
|
};
|
|
3320
3448
|
}(u), g = (b = /* @__PURE__ */ function(o, p) {
|
|
@@ -3326,9 +3454,9 @@ function fl(e = "", t = {}) {
|
|
|
3326
3454
|
if (Array.isArray(p)) {
|
|
3327
3455
|
const m = d.key, h = [];
|
|
3328
3456
|
let w = !1;
|
|
3329
|
-
for (let
|
|
3330
|
-
d.key =
|
|
3331
|
-
const y = o(p[
|
|
3457
|
+
for (let C = 0; C < p.length; C++) {
|
|
3458
|
+
d.key = C;
|
|
3459
|
+
const y = o(p[C], d), I = typeof y == "string";
|
|
3332
3460
|
I && w ? h[h.length - 1] += y : y !== null && h.push(y), w = I;
|
|
3333
3461
|
}
|
|
3334
3462
|
return d.key = m, h;
|
|
@@ -3341,14 +3469,14 @@ function fl(e = "", t = {}) {
|
|
|
3341
3469
|
key: "footer"
|
|
3342
3470
|
}, l.map(function(o) {
|
|
3343
3471
|
return r("div", {
|
|
3344
|
-
id: t.slugify(o.identifier,
|
|
3472
|
+
id: t.slugify(o.identifier, Se),
|
|
3345
3473
|
key: o.identifier
|
|
3346
3474
|
}, o.identifier, g(c(o.footnote, {
|
|
3347
3475
|
inline: !0
|
|
3348
3476
|
})));
|
|
3349
3477
|
}))) : x;
|
|
3350
3478
|
}
|
|
3351
|
-
const
|
|
3479
|
+
const xl = (e) => {
|
|
3352
3480
|
let {
|
|
3353
3481
|
children: t = "",
|
|
3354
3482
|
options: r
|
|
@@ -3359,98 +3487,131 @@ const bl = (e) => {
|
|
|
3359
3487
|
for (u = 0; u < g.length; u++)
|
|
3360
3488
|
l.indexOf(s = g[u]) >= 0 || (c[s] = i[s]);
|
|
3361
3489
|
return c;
|
|
3362
|
-
}(e,
|
|
3363
|
-
return
|
|
3364
|
-
},
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3490
|
+
}(e, un);
|
|
3491
|
+
return Ha(bl(t, r), a);
|
|
3492
|
+
}, kl = _.div`
|
|
3493
|
+
display: flex;
|
|
3494
|
+
|
|
3495
|
+
${({
|
|
3368
3496
|
align: e
|
|
3369
|
-
}) => e === "right" ?
|
|
3497
|
+
}) => e === "right" ? $`
|
|
3370
3498
|
justify-content: flex-end;
|
|
3371
|
-
` :
|
|
3499
|
+
` : $`
|
|
3372
3500
|
justify-content: flex-start;
|
|
3373
|
-
`
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3501
|
+
`}
|
|
3502
|
+
`, Yr = _.div`
|
|
3503
|
+
font-size: inherit;
|
|
3504
|
+
line-height: inherit;
|
|
3505
|
+
padding-top: 8.5px;
|
|
3506
|
+
padding-bottom: 8.5px;
|
|
3507
|
+
padding-left: 0.5rem;
|
|
3508
|
+
padding-right: 0.5rem;
|
|
3509
|
+
white-space: pre-wrap;
|
|
3510
|
+
overflow-wrap: break-word;
|
|
3511
|
+
box-sizing: border-box;
|
|
3512
|
+
|
|
3513
|
+
${({
|
|
3377
3514
|
align: e
|
|
3378
|
-
}) => e === "right" ?
|
|
3515
|
+
}) => e === "right" ? $`
|
|
3379
3516
|
text-align: right;
|
|
3380
3517
|
border-radius: 10px 10px 0px 10px;
|
|
3381
|
-
` :
|
|
3518
|
+
` : $`
|
|
3382
3519
|
text-align: left;
|
|
3383
3520
|
border-radius: 10px 10px 10px 0px;
|
|
3384
|
-
|
|
3521
|
+
`}
|
|
3522
|
+
|
|
3523
|
+
${({
|
|
3385
3524
|
align: e
|
|
3386
|
-
}) => e !== "full" ?
|
|
3525
|
+
}) => e !== "full" ? $`
|
|
3387
3526
|
max-width: 85%;
|
|
3388
|
-
` : ""
|
|
3527
|
+
` : ""}
|
|
3528
|
+
|
|
3529
|
+
color: ${({
|
|
3389
3530
|
theme: e
|
|
3390
|
-
}) => e.aiChat.primaryTextColor
|
|
3531
|
+
}) => e.aiChat.primaryTextColor};
|
|
3532
|
+
background-color: ${({
|
|
3391
3533
|
theme: e,
|
|
3392
3534
|
align: t
|
|
3393
|
-
}) => t === "right" ? e.aiChat.userMessages.backgroundColor : e.aiChat.systemMessages.backgroundColor
|
|
3535
|
+
}) => t === "right" ? e.aiChat.userMessages.backgroundColor : e.aiChat.systemMessages.backgroundColor};
|
|
3536
|
+
`, de = ({
|
|
3394
3537
|
align: e,
|
|
3395
3538
|
children: t
|
|
3396
3539
|
}) => {
|
|
3397
3540
|
const {
|
|
3398
3541
|
themeSettings: r
|
|
3399
3542
|
} = D();
|
|
3400
|
-
return /* @__PURE__ */ n(
|
|
3543
|
+
return /* @__PURE__ */ n(kl, {
|
|
3401
3544
|
theme: r,
|
|
3402
3545
|
align: e,
|
|
3403
3546
|
children: /* @__PURE__ */ n(Yr, {
|
|
3404
3547
|
theme: r,
|
|
3405
3548
|
align: e,
|
|
3406
|
-
children: typeof t == "string" ? /* @__PURE__ */ n(
|
|
3549
|
+
children: typeof t == "string" ? /* @__PURE__ */ n(xl, {
|
|
3407
3550
|
children: t
|
|
3408
3551
|
}) : t
|
|
3409
3552
|
})
|
|
3410
3553
|
});
|
|
3411
3554
|
};
|
|
3412
|
-
function
|
|
3555
|
+
function yl() {
|
|
3413
3556
|
const {
|
|
3414
3557
|
welcomeText: e
|
|
3415
|
-
} =
|
|
3416
|
-
return e === !1 ? null : /* @__PURE__ */ n(
|
|
3558
|
+
} = oe();
|
|
3559
|
+
return e === !1 ? null : /* @__PURE__ */ n(de, {
|
|
3417
3560
|
align: "left",
|
|
3418
3561
|
children: e
|
|
3419
3562
|
});
|
|
3420
3563
|
}
|
|
3421
|
-
const
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3564
|
+
const wl = _.div`
|
|
3565
|
+
display: flex;
|
|
3566
|
+
|
|
3567
|
+
${({
|
|
3425
3568
|
align: e
|
|
3426
|
-
}) => e === "right" ?
|
|
3569
|
+
}) => e === "right" ? $`
|
|
3427
3570
|
justify-content: flex-end;
|
|
3428
|
-
` :
|
|
3571
|
+
` : $`
|
|
3429
3572
|
justify-content: flex-start;
|
|
3430
|
-
`
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3573
|
+
`}
|
|
3574
|
+
`, _l = _.button`
|
|
3575
|
+
font-family: inherit;
|
|
3576
|
+
font-size: inherit;
|
|
3577
|
+
line-height: inherit;
|
|
3578
|
+
border: ${({
|
|
3434
3579
|
theme: e
|
|
3435
|
-
}) => e.aiChat.clickableMessages.border
|
|
3580
|
+
}) => e.aiChat.clickableMessages.border};
|
|
3581
|
+
padding: 0;
|
|
3582
|
+
cursor: pointer;
|
|
3583
|
+
|
|
3584
|
+
color: ${({
|
|
3436
3585
|
theme: e
|
|
3437
|
-
}) => e.aiChat.clickableMessages.textColor
|
|
3586
|
+
}) => e.aiChat.clickableMessages.textColor};
|
|
3587
|
+
background-color: ${({
|
|
3438
3588
|
theme: e
|
|
3439
|
-
}) => e.aiChat.clickableMessages.backgroundColor
|
|
3589
|
+
}) => e.aiChat.clickableMessages.backgroundColor};
|
|
3590
|
+
&:hover {
|
|
3591
|
+
color: ${({
|
|
3440
3592
|
theme: e
|
|
3441
|
-
}) => e.aiChat.clickableMessages.hover.textColor
|
|
3593
|
+
}) => e.aiChat.clickableMessages.hover.textColor};
|
|
3594
|
+
background-color: ${({
|
|
3442
3595
|
theme: e
|
|
3443
|
-
}) => e.aiChat.clickableMessages.hover.backgroundColor
|
|
3596
|
+
}) => e.aiChat.clickableMessages.hover.backgroundColor};
|
|
3597
|
+
}
|
|
3598
|
+
border-radius: 20px;
|
|
3599
|
+
|
|
3600
|
+
${({
|
|
3444
3601
|
align: e
|
|
3445
|
-
}) => e === "right" ?
|
|
3602
|
+
}) => e === "right" ? $`
|
|
3446
3603
|
text-align: right;
|
|
3447
|
-
` :
|
|
3604
|
+
` : $`
|
|
3448
3605
|
text-align: left;
|
|
3449
|
-
|
|
3606
|
+
`}
|
|
3607
|
+
|
|
3608
|
+
${({
|
|
3450
3609
|
align: e
|
|
3451
|
-
}) => e !== "full" ?
|
|
3610
|
+
}) => e !== "full" ? $`
|
|
3452
3611
|
max-width: 382px;
|
|
3453
|
-
` : ""
|
|
3612
|
+
` : ""}
|
|
3613
|
+
|
|
3614
|
+
${({
|
|
3454
3615
|
theme: e
|
|
3455
3616
|
}) => {
|
|
3456
3617
|
const {
|
|
@@ -3459,7 +3620,7 @@ const yl = /* @__PURE__ */ C("div", {
|
|
|
3459
3620
|
} = e.aiChat.suggestions;
|
|
3460
3621
|
if (t) {
|
|
3461
3622
|
const [a, i] = t;
|
|
3462
|
-
return
|
|
3623
|
+
return $`
|
|
3463
3624
|
border: none;
|
|
3464
3625
|
position: relative;
|
|
3465
3626
|
border-radius: ${r};
|
|
@@ -3480,8 +3641,9 @@ const yl = /* @__PURE__ */ C("div", {
|
|
|
3480
3641
|
`;
|
|
3481
3642
|
}
|
|
3482
3643
|
return "";
|
|
3483
|
-
}
|
|
3484
|
-
|
|
3644
|
+
}}
|
|
3645
|
+
`;
|
|
3646
|
+
function Ue({
|
|
3485
3647
|
children: e,
|
|
3486
3648
|
align: t,
|
|
3487
3649
|
onClick: r,
|
|
@@ -3492,9 +3654,9 @@ function $e({
|
|
|
3492
3654
|
const {
|
|
3493
3655
|
themeSettings: s
|
|
3494
3656
|
} = D();
|
|
3495
|
-
return /* @__PURE__ */ n(
|
|
3657
|
+
return /* @__PURE__ */ n(wl, {
|
|
3496
3658
|
align: t,
|
|
3497
|
-
children: /* @__PURE__ */ n(
|
|
3659
|
+
children: /* @__PURE__ */ n(_l, {
|
|
3498
3660
|
"aria-label": l,
|
|
3499
3661
|
theme: s,
|
|
3500
3662
|
onClick: r,
|
|
@@ -3513,12 +3675,12 @@ function Cl({
|
|
|
3513
3675
|
t: r
|
|
3514
3676
|
} = E();
|
|
3515
3677
|
return /* @__PURE__ */ v(Y, {
|
|
3516
|
-
children: [/* @__PURE__ */ n(
|
|
3678
|
+
children: [/* @__PURE__ */ n(de, {
|
|
3517
3679
|
align: "left",
|
|
3518
3680
|
children: r("ai.clearHistoryPrompt")
|
|
3519
3681
|
}), /* @__PURE__ */ v("div", {
|
|
3520
3682
|
className: "csdk-flex csdk-gap-x-2",
|
|
3521
|
-
children: [/* @__PURE__ */ n(
|
|
3683
|
+
children: [/* @__PURE__ */ n(Ue, {
|
|
3522
3684
|
align: "right",
|
|
3523
3685
|
onClick: t,
|
|
3524
3686
|
accessibleName: "confirm clear chat",
|
|
@@ -3526,7 +3688,7 @@ function Cl({
|
|
|
3526
3688
|
className: "csdk-py-[6px] csdk-px-[20px]",
|
|
3527
3689
|
children: r("ai.buttons.yes")
|
|
3528
3690
|
})
|
|
3529
|
-
}), /* @__PURE__ */ n(
|
|
3691
|
+
}), /* @__PURE__ */ n(Ue, {
|
|
3530
3692
|
align: "right",
|
|
3531
3693
|
onClick: e,
|
|
3532
3694
|
accessibleName: "cancel clear chat",
|
|
@@ -3538,8 +3700,8 @@ function Cl({
|
|
|
3538
3700
|
})]
|
|
3539
3701
|
});
|
|
3540
3702
|
}
|
|
3541
|
-
var
|
|
3542
|
-
function
|
|
3703
|
+
var vl = Ya("toLowerCase");
|
|
3704
|
+
function Sl() {
|
|
3543
3705
|
const {
|
|
3544
3706
|
themeSettings: e
|
|
3545
3707
|
} = D();
|
|
@@ -3557,34 +3719,34 @@ function vl() {
|
|
|
3557
3719
|
})
|
|
3558
3720
|
});
|
|
3559
3721
|
}
|
|
3560
|
-
function
|
|
3722
|
+
function Ml({
|
|
3561
3723
|
onClick: e
|
|
3562
3724
|
}) {
|
|
3563
3725
|
const {
|
|
3564
3726
|
t
|
|
3565
3727
|
} = E();
|
|
3566
|
-
return /* @__PURE__ */ n(
|
|
3728
|
+
return /* @__PURE__ */ n(Ue, {
|
|
3567
3729
|
align: "left",
|
|
3568
3730
|
onClick: e,
|
|
3569
3731
|
children: /* @__PURE__ */ v("div", {
|
|
3570
3732
|
className: "csdk-py-[5px] csdk-px-2 csdk-flex csdk-items-center csdk-gap-x-1 csdk-select-none",
|
|
3571
|
-
children: [/* @__PURE__ */ n(
|
|
3733
|
+
children: [/* @__PURE__ */ n(Sl, {}), t("ai.buttons.insights")]
|
|
3572
3734
|
})
|
|
3573
3735
|
});
|
|
3574
3736
|
}
|
|
3575
|
-
function
|
|
3576
|
-
return
|
|
3737
|
+
function Il(e) {
|
|
3738
|
+
return Ua("MuiDialog", e);
|
|
3577
3739
|
}
|
|
3578
|
-
const
|
|
3579
|
-
process.env.NODE_ENV !== "production" && (
|
|
3580
|
-
const
|
|
3740
|
+
const ot = ka("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), Ur = /* @__PURE__ */ Qe({});
|
|
3741
|
+
process.env.NODE_ENV !== "production" && (Ur.displayName = "DialogContext");
|
|
3742
|
+
const Dl = Fe(ya, {
|
|
3581
3743
|
name: "MuiDialog",
|
|
3582
3744
|
slot: "Backdrop",
|
|
3583
3745
|
overrides: (e, t) => t.backdrop
|
|
3584
3746
|
})({
|
|
3585
3747
|
// Improve scrollable dialog support.
|
|
3586
3748
|
zIndex: -1
|
|
3587
|
-
}),
|
|
3749
|
+
}), Al = (e) => {
|
|
3588
3750
|
const {
|
|
3589
3751
|
classes: t,
|
|
3590
3752
|
scroll: r,
|
|
@@ -3593,11 +3755,11 @@ const Il = Qe(ka, {
|
|
|
3593
3755
|
fullScreen: l
|
|
3594
3756
|
} = e, s = {
|
|
3595
3757
|
root: ["root"],
|
|
3596
|
-
container: ["container", `scroll${
|
|
3597
|
-
paper: ["paper", `paperScroll${
|
|
3758
|
+
container: ["container", `scroll${be(r)}`],
|
|
3759
|
+
paper: ["paper", `paperScroll${be(r)}`, `paperWidth${be(String(a))}`, i && "paperFullWidth", l && "paperFullScreen"]
|
|
3598
3760
|
};
|
|
3599
|
-
return
|
|
3600
|
-
},
|
|
3761
|
+
return Ea(s, Il, t);
|
|
3762
|
+
}, Ll = Fe(wa, {
|
|
3601
3763
|
name: "MuiDialog",
|
|
3602
3764
|
slot: "Root",
|
|
3603
3765
|
overridesResolver: (e, t) => t.root
|
|
@@ -3606,14 +3768,14 @@ const Il = Qe(ka, {
|
|
|
3606
3768
|
// Use !important to override the Modal inline-style.
|
|
3607
3769
|
position: "absolute !important"
|
|
3608
3770
|
}
|
|
3609
|
-
}),
|
|
3771
|
+
}), Tl = Fe("div", {
|
|
3610
3772
|
name: "MuiDialog",
|
|
3611
3773
|
slot: "Container",
|
|
3612
3774
|
overridesResolver: (e, t) => {
|
|
3613
3775
|
const {
|
|
3614
3776
|
ownerState: r
|
|
3615
3777
|
} = e;
|
|
3616
|
-
return [t.container, t[`scroll${
|
|
3778
|
+
return [t.container, t[`scroll${be(r.scroll)}`]];
|
|
3617
3779
|
}
|
|
3618
3780
|
})({
|
|
3619
3781
|
height: "100%",
|
|
@@ -3648,16 +3810,16 @@ const Il = Qe(ka, {
|
|
|
3648
3810
|
}
|
|
3649
3811
|
}
|
|
3650
3812
|
}]
|
|
3651
|
-
}),
|
|
3813
|
+
}), Nl = Fe(rr, {
|
|
3652
3814
|
name: "MuiDialog",
|
|
3653
3815
|
slot: "Paper",
|
|
3654
3816
|
overridesResolver: (e, t) => {
|
|
3655
3817
|
const {
|
|
3656
3818
|
ownerState: r
|
|
3657
3819
|
} = e;
|
|
3658
|
-
return [t.paper, t[`scrollPaper${
|
|
3820
|
+
return [t.paper, t[`scrollPaper${be(r.scroll)}`], t[`paperWidth${be(String(r.maxWidth))}`], r.fullWidth && t.paperFullWidth, r.fullScreen && t.paperFullScreen];
|
|
3659
3821
|
}
|
|
3660
|
-
})(
|
|
3822
|
+
})(_a(({
|
|
3661
3823
|
theme: e
|
|
3662
3824
|
}) => ({
|
|
3663
3825
|
margin: 32,
|
|
@@ -3698,7 +3860,7 @@ const Il = Qe(ka, {
|
|
|
3698
3860
|
},
|
|
3699
3861
|
style: {
|
|
3700
3862
|
maxWidth: e.breakpoints.unit === "px" ? Math.max(e.breakpoints.values.xs, 444) : `max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,
|
|
3701
|
-
[`&.${
|
|
3863
|
+
[`&.${ot.paperScrollBody}`]: {
|
|
3702
3864
|
[e.breakpoints.down(Math.max(e.breakpoints.values.xs, 444) + 32 * 2)]: {
|
|
3703
3865
|
maxWidth: "calc(100% - 64px)"
|
|
3704
3866
|
}
|
|
@@ -3710,7 +3872,7 @@ const Il = Qe(ka, {
|
|
|
3710
3872
|
},
|
|
3711
3873
|
style: {
|
|
3712
3874
|
maxWidth: `${e.breakpoints.values[t]}${e.breakpoints.unit}`,
|
|
3713
|
-
[`&.${
|
|
3875
|
+
[`&.${ot.paperScrollBody}`]: {
|
|
3714
3876
|
[e.breakpoints.down(e.breakpoints.values[t] + 32 * 2)]: {
|
|
3715
3877
|
maxWidth: "calc(100% - 64px)"
|
|
3716
3878
|
}
|
|
@@ -3734,17 +3896,17 @@ const Il = Qe(ka, {
|
|
|
3734
3896
|
height: "100%",
|
|
3735
3897
|
maxHeight: "none",
|
|
3736
3898
|
borderRadius: 0,
|
|
3737
|
-
[`&.${
|
|
3899
|
+
[`&.${ot.paperScrollBody}`]: {
|
|
3738
3900
|
margin: 0,
|
|
3739
3901
|
maxWidth: "100%"
|
|
3740
3902
|
}
|
|
3741
3903
|
}
|
|
3742
3904
|
}]
|
|
3743
|
-
}))),
|
|
3744
|
-
const r =
|
|
3905
|
+
}))), Qr = /* @__PURE__ */ tr(function(e, t) {
|
|
3906
|
+
const r = Ia({
|
|
3745
3907
|
props: e,
|
|
3746
3908
|
name: "MuiDialog"
|
|
3747
|
-
}), a =
|
|
3909
|
+
}), a = Da(), i = {
|
|
3748
3910
|
enter: a.transitions.duration.enteringScreen,
|
|
3749
3911
|
exit: a.transitions.duration.leavingScreen
|
|
3750
3912
|
}, l = r, {
|
|
@@ -3760,102 +3922,102 @@ const Il = Qe(ka, {
|
|
|
3760
3922
|
fullWidth: m = !1,
|
|
3761
3923
|
maxWidth: h = "sm",
|
|
3762
3924
|
onBackdropClick: w,
|
|
3763
|
-
onClick:
|
|
3925
|
+
onClick: C,
|
|
3764
3926
|
onClose: y,
|
|
3765
3927
|
open: I,
|
|
3766
|
-
PaperComponent: A =
|
|
3928
|
+
PaperComponent: A = rr,
|
|
3767
3929
|
PaperProps: S = {},
|
|
3768
3930
|
scroll: L = "paper",
|
|
3769
3931
|
slots: Z = {},
|
|
3770
|
-
slotProps:
|
|
3771
|
-
TransitionComponent:
|
|
3772
|
-
transitionDuration:
|
|
3773
|
-
TransitionProps:
|
|
3774
|
-
} = l,
|
|
3932
|
+
slotProps: ge = {},
|
|
3933
|
+
TransitionComponent: F = At,
|
|
3934
|
+
transitionDuration: G = i,
|
|
3935
|
+
TransitionProps: U
|
|
3936
|
+
} = l, V = xr(l, ["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"]), B = T(M({}, r), {
|
|
3775
3937
|
disableEscapeKeyDown: p,
|
|
3776
3938
|
fullScreen: d,
|
|
3777
3939
|
fullWidth: m,
|
|
3778
3940
|
maxWidth: h,
|
|
3779
3941
|
scroll: L
|
|
3780
|
-
}),
|
|
3781
|
-
|
|
3782
|
-
}, W = (
|
|
3783
|
-
|
|
3784
|
-
},
|
|
3785
|
-
titleId:
|
|
3786
|
-
}), [
|
|
3787
|
-
transition:
|
|
3788
|
-
}, Z),
|
|
3789
|
-
transition:
|
|
3942
|
+
}), J = Al(B), X = ue(), z = (me) => {
|
|
3943
|
+
X.current = me.target === me.currentTarget;
|
|
3944
|
+
}, W = (me) => {
|
|
3945
|
+
C && C(me), X.current && (X.current = null, w && w(me), y && y(me, "backdropClick"));
|
|
3946
|
+
}, Q = Aa(u), ce = q(() => ({
|
|
3947
|
+
titleId: Q
|
|
3948
|
+
}), [Q]), he = M({
|
|
3949
|
+
transition: F
|
|
3950
|
+
}, Z), we = M({
|
|
3951
|
+
transition: U,
|
|
3790
3952
|
paper: S,
|
|
3791
3953
|
backdrop: b
|
|
3792
|
-
},
|
|
3793
|
-
slots:
|
|
3794
|
-
slotProps:
|
|
3795
|
-
}, [
|
|
3796
|
-
elementType:
|
|
3954
|
+
}, ge), N = {
|
|
3955
|
+
slots: he,
|
|
3956
|
+
slotProps: we
|
|
3957
|
+
}, [K, Ee] = _e("root", {
|
|
3958
|
+
elementType: Ll,
|
|
3797
3959
|
shouldForwardComponentProp: !0,
|
|
3798
3960
|
externalForwardedProps: N,
|
|
3799
|
-
ownerState:
|
|
3800
|
-
className:
|
|
3961
|
+
ownerState: B,
|
|
3962
|
+
className: et(J.root, o),
|
|
3801
3963
|
ref: t
|
|
3802
|
-
}), [
|
|
3803
|
-
elementType:
|
|
3964
|
+
}), [ze, Jr] = _e("backdrop", {
|
|
3965
|
+
elementType: Dl,
|
|
3804
3966
|
shouldForwardComponentProp: !0,
|
|
3805
3967
|
externalForwardedProps: N,
|
|
3806
|
-
ownerState:
|
|
3807
|
-
}), [
|
|
3808
|
-
elementType:
|
|
3968
|
+
ownerState: B
|
|
3969
|
+
}), [Xr, Kr] = _e("paper", {
|
|
3970
|
+
elementType: Nl,
|
|
3809
3971
|
shouldForwardComponentProp: !0,
|
|
3810
3972
|
externalForwardedProps: N,
|
|
3811
|
-
ownerState:
|
|
3812
|
-
className:
|
|
3813
|
-
}), [
|
|
3814
|
-
elementType:
|
|
3973
|
+
ownerState: B,
|
|
3974
|
+
className: et(J.paper, S.className)
|
|
3975
|
+
}), [ea, ta] = _e("container", {
|
|
3976
|
+
elementType: Tl,
|
|
3815
3977
|
externalForwardedProps: N,
|
|
3816
|
-
ownerState:
|
|
3817
|
-
className:
|
|
3818
|
-
}), [
|
|
3819
|
-
elementType:
|
|
3978
|
+
ownerState: B,
|
|
3979
|
+
className: et(J.container)
|
|
3980
|
+
}), [ra, aa] = _e("transition", {
|
|
3981
|
+
elementType: At,
|
|
3820
3982
|
externalForwardedProps: N,
|
|
3821
|
-
ownerState:
|
|
3983
|
+
ownerState: B,
|
|
3822
3984
|
additionalProps: {
|
|
3823
3985
|
appear: !0,
|
|
3824
3986
|
in: I,
|
|
3825
|
-
timeout:
|
|
3987
|
+
timeout: G,
|
|
3826
3988
|
role: "presentation"
|
|
3827
3989
|
}
|
|
3828
3990
|
});
|
|
3829
|
-
return /* @__PURE__ */ Ce(
|
|
3991
|
+
return /* @__PURE__ */ Ce(K, T(M(M({
|
|
3830
3992
|
closeAfterTransition: !0,
|
|
3831
3993
|
slots: {
|
|
3832
|
-
backdrop:
|
|
3994
|
+
backdrop: ze
|
|
3833
3995
|
},
|
|
3834
3996
|
slotProps: {
|
|
3835
3997
|
backdrop: M({
|
|
3836
|
-
transitionDuration:
|
|
3998
|
+
transitionDuration: G,
|
|
3837
3999
|
as: g
|
|
3838
|
-
},
|
|
4000
|
+
}, Jr)
|
|
3839
4001
|
},
|
|
3840
4002
|
disableEscapeKeyDown: p,
|
|
3841
4003
|
onClose: y,
|
|
3842
4004
|
open: I,
|
|
3843
4005
|
onClick: W
|
|
3844
|
-
},
|
|
3845
|
-
children: /* @__PURE__ */ Ce(
|
|
3846
|
-
children: /* @__PURE__ */ Ce(
|
|
4006
|
+
}, Ee), V), {
|
|
4007
|
+
children: /* @__PURE__ */ Ce(ra, T(M({}, aa), {
|
|
4008
|
+
children: /* @__PURE__ */ Ce(ea, T(M({
|
|
3847
4009
|
onMouseDown: z
|
|
3848
|
-
},
|
|
3849
|
-
children: /* @__PURE__ */ Ce(
|
|
4010
|
+
}, ta), {
|
|
4011
|
+
children: /* @__PURE__ */ Ce(Xr, T(M({
|
|
3850
4012
|
as: A,
|
|
3851
4013
|
elevation: 24,
|
|
3852
4014
|
role: "dialog",
|
|
3853
4015
|
"aria-describedby": s,
|
|
3854
|
-
"aria-labelledby":
|
|
4016
|
+
"aria-labelledby": Q,
|
|
3855
4017
|
"aria-modal": c
|
|
3856
|
-
},
|
|
3857
|
-
children: /* @__PURE__ */ Ce(
|
|
3858
|
-
value:
|
|
4018
|
+
}, Kr), {
|
|
4019
|
+
children: /* @__PURE__ */ Ce(Ur.Provider, {
|
|
4020
|
+
value: ce,
|
|
3859
4021
|
children: x
|
|
3860
4022
|
})
|
|
3861
4023
|
}))
|
|
@@ -3863,7 +4025,7 @@ const Il = Qe(ka, {
|
|
|
3863
4025
|
}))
|
|
3864
4026
|
}));
|
|
3865
4027
|
});
|
|
3866
|
-
process.env.NODE_ENV !== "production" && (
|
|
4028
|
+
process.env.NODE_ENV !== "production" && (Qr.propTypes = {
|
|
3867
4029
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
3868
4030
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
3869
4031
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -4026,7 +4188,7 @@ process.env.NODE_ENV !== "production" && (Ur.propTypes = {
|
|
|
4026
4188
|
*/
|
|
4027
4189
|
TransitionProps: f.object
|
|
4028
4190
|
});
|
|
4029
|
-
function
|
|
4191
|
+
function jl({
|
|
4030
4192
|
fillColor: e = "#262E3D"
|
|
4031
4193
|
}) {
|
|
4032
4194
|
return /* @__PURE__ */ v("svg", {
|
|
@@ -4050,7 +4212,7 @@ function Nl({
|
|
|
4050
4212
|
})]
|
|
4051
4213
|
});
|
|
4052
4214
|
}
|
|
4053
|
-
const
|
|
4215
|
+
const Fr = {
|
|
4054
4216
|
row: {
|
|
4055
4217
|
hover: "rgba(224, 224, 224, 0.3)"
|
|
4056
4218
|
},
|
|
@@ -4135,20 +4297,17 @@ const Qr = {
|
|
|
4135
4297
|
errorBG: "rgba(231, 71, 39, 0.1)"
|
|
4136
4298
|
}
|
|
4137
4299
|
}
|
|
4138
|
-
},
|
|
4300
|
+
}, Ol = {
|
|
4139
4301
|
shouldForwardProp: (e) => !e.startsWith("$")
|
|
4140
|
-
},
|
|
4141
|
-
target: "e869yoj0",
|
|
4142
|
-
label: "IconButton"
|
|
4143
|
-
})(({
|
|
4302
|
+
}, Oe = _(ar, Ol)(({
|
|
4144
4303
|
$hoverColor: e
|
|
4145
4304
|
}) => ({
|
|
4146
4305
|
padding: 2,
|
|
4147
4306
|
"&.MuiIconButton-root:hover": {
|
|
4148
|
-
backgroundColor: e ??
|
|
4307
|
+
backgroundColor: e ?? Fr.interaction.defaultHover
|
|
4149
4308
|
}
|
|
4150
4309
|
}));
|
|
4151
|
-
function
|
|
4310
|
+
function El({
|
|
4152
4311
|
fill: e = "rgba(38, 46, 61, 0.67)"
|
|
4153
4312
|
}) {
|
|
4154
4313
|
return /* @__PURE__ */ n("svg", {
|
|
@@ -4165,7 +4324,7 @@ function Ol({
|
|
|
4165
4324
|
})
|
|
4166
4325
|
});
|
|
4167
4326
|
}
|
|
4168
|
-
function
|
|
4327
|
+
function zl({
|
|
4169
4328
|
fill: e = "rgba(38, 46, 61, 0.67)"
|
|
4170
4329
|
}) {
|
|
4171
4330
|
return /* @__PURE__ */ n("svg", {
|
|
@@ -4182,7 +4341,7 @@ function El({
|
|
|
4182
4341
|
})
|
|
4183
4342
|
});
|
|
4184
4343
|
}
|
|
4185
|
-
function
|
|
4344
|
+
function Rl() {
|
|
4186
4345
|
return /* @__PURE__ */ n("svg", {
|
|
4187
4346
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4188
4347
|
width: "24",
|
|
@@ -4198,23 +4357,23 @@ function zl() {
|
|
|
4198
4357
|
})
|
|
4199
4358
|
});
|
|
4200
4359
|
}
|
|
4201
|
-
const
|
|
4360
|
+
const It = (e) => ir(e.chart.backgroundColor), Zl = ({
|
|
4202
4361
|
title: e
|
|
4203
4362
|
}) => {
|
|
4204
4363
|
const {
|
|
4205
4364
|
themeSettings: t
|
|
4206
4365
|
} = D();
|
|
4207
|
-
return /* @__PURE__ */ n(
|
|
4366
|
+
return /* @__PURE__ */ n(je, {
|
|
4208
4367
|
title: e,
|
|
4209
|
-
children: /* @__PURE__ */ n(
|
|
4368
|
+
children: /* @__PURE__ */ n(Oe, {
|
|
4210
4369
|
disableTouchRipple: !0,
|
|
4211
|
-
$hoverColor:
|
|
4212
|
-
children: /* @__PURE__ */ n(
|
|
4370
|
+
$hoverColor: It(t),
|
|
4371
|
+
children: /* @__PURE__ */ n(zl, {
|
|
4213
4372
|
fill: t.chart.textColor
|
|
4214
4373
|
})
|
|
4215
4374
|
})
|
|
4216
4375
|
});
|
|
4217
|
-
},
|
|
4376
|
+
}, Wl = ({
|
|
4218
4377
|
items: e
|
|
4219
4378
|
}) => {
|
|
4220
4379
|
const [t, r] = R(null), a = (s) => {
|
|
@@ -4225,14 +4384,14 @@ const St = (e) => nr(e.chart.backgroundColor), Rl = ({
|
|
|
4225
4384
|
themeSettings: l
|
|
4226
4385
|
} = D();
|
|
4227
4386
|
return /* @__PURE__ */ v(Y, {
|
|
4228
|
-
children: [/* @__PURE__ */ n(
|
|
4387
|
+
children: [/* @__PURE__ */ n(Oe, {
|
|
4229
4388
|
onClick: a,
|
|
4230
|
-
$hoverColor:
|
|
4389
|
+
$hoverColor: It(l),
|
|
4231
4390
|
"aria-label": "three dots button",
|
|
4232
|
-
children: /* @__PURE__ */ n(
|
|
4391
|
+
children: /* @__PURE__ */ n(ei, {
|
|
4233
4392
|
fill: l.chart.textColor
|
|
4234
4393
|
})
|
|
4235
|
-
}), /* @__PURE__ */ n(
|
|
4394
|
+
}), /* @__PURE__ */ n(ri, {
|
|
4236
4395
|
anchorEl: t,
|
|
4237
4396
|
anchorOrigin: {
|
|
4238
4397
|
vertical: "bottom",
|
|
@@ -4244,14 +4403,14 @@ const St = (e) => nr(e.chart.backgroundColor), Rl = ({
|
|
|
4244
4403
|
},
|
|
4245
4404
|
open: !!t,
|
|
4246
4405
|
onClose: i,
|
|
4247
|
-
children: e.map((s) => /* @__PURE__ */ v(
|
|
4406
|
+
children: e.map((s) => /* @__PURE__ */ v(ti, {
|
|
4248
4407
|
onClick: () => {
|
|
4249
4408
|
s.onClick(), i();
|
|
4250
4409
|
},
|
|
4251
4410
|
sx: {
|
|
4252
4411
|
fontSize: "13px",
|
|
4253
4412
|
fontFamily: l.typography.fontFamily,
|
|
4254
|
-
color:
|
|
4413
|
+
color: Fr.text.content
|
|
4255
4414
|
},
|
|
4256
4415
|
disableRipple: !0,
|
|
4257
4416
|
children: [s.icon, /* @__PURE__ */ n("div", {
|
|
@@ -4261,7 +4420,7 @@ const St = (e) => nr(e.chart.backgroundColor), Rl = ({
|
|
|
4261
4420
|
}, s.title))
|
|
4262
4421
|
})]
|
|
4263
4422
|
});
|
|
4264
|
-
},
|
|
4423
|
+
}, $l = ({
|
|
4265
4424
|
onClick: e
|
|
4266
4425
|
}) => {
|
|
4267
4426
|
const {
|
|
@@ -4269,37 +4428,38 @@ const St = (e) => nr(e.chart.backgroundColor), Rl = ({
|
|
|
4269
4428
|
} = D(), {
|
|
4270
4429
|
t: r
|
|
4271
4430
|
} = E();
|
|
4272
|
-
return /* @__PURE__ */ n(
|
|
4431
|
+
return /* @__PURE__ */ n(je, {
|
|
4273
4432
|
title: r("ai.preview"),
|
|
4274
|
-
children: /* @__PURE__ */ n(
|
|
4433
|
+
children: /* @__PURE__ */ n(Oe, {
|
|
4275
4434
|
onClick: e,
|
|
4276
|
-
$hoverColor:
|
|
4277
|
-
children: /* @__PURE__ */ n(
|
|
4435
|
+
$hoverColor: It(t),
|
|
4436
|
+
children: /* @__PURE__ */ n(El, {
|
|
4278
4437
|
fill: t.chart.textColor
|
|
4279
4438
|
})
|
|
4280
4439
|
})
|
|
4281
4440
|
});
|
|
4282
|
-
}, ql =
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4441
|
+
}, ql = _.div`
|
|
4442
|
+
display: flex;
|
|
4443
|
+
padding-top: 6px;
|
|
4444
|
+
padding-bottom: 6px;
|
|
4445
|
+
`;
|
|
4286
4446
|
function Pl({
|
|
4287
4447
|
infoTooltipText: e,
|
|
4288
4448
|
onRefresh: t,
|
|
4289
4449
|
onExpand: r
|
|
4290
4450
|
}) {
|
|
4291
|
-
const a =
|
|
4451
|
+
const a = q(() => [{
|
|
4292
4452
|
title: "Refresh",
|
|
4293
4453
|
onClick: t,
|
|
4294
|
-
icon: /* @__PURE__ */ n(
|
|
4454
|
+
icon: /* @__PURE__ */ n(Rl, {})
|
|
4295
4455
|
}], [t]);
|
|
4296
4456
|
return /* @__PURE__ */ v(ql, {
|
|
4297
4457
|
"aria-label": "chatbot chart toolbar",
|
|
4298
|
-
children: [/* @__PURE__ */ n(
|
|
4458
|
+
children: [/* @__PURE__ */ n(Zl, {
|
|
4299
4459
|
title: e ?? ""
|
|
4300
|
-
}), /* @__PURE__ */ n(Zl, {
|
|
4301
|
-
items: a
|
|
4302
4460
|
}), /* @__PURE__ */ n(Wl, {
|
|
4461
|
+
items: a
|
|
4462
|
+
}), /* @__PURE__ */ n($l, {
|
|
4303
4463
|
onClick: r
|
|
4304
4464
|
})]
|
|
4305
4465
|
});
|
|
@@ -4312,12 +4472,12 @@ function Gl({
|
|
|
4312
4472
|
} = D(), {
|
|
4313
4473
|
inlineElement: i,
|
|
4314
4474
|
expandedElement: l
|
|
4315
|
-
} =
|
|
4316
|
-
const s =
|
|
4475
|
+
} = q(() => {
|
|
4476
|
+
const s = Ne(e, {
|
|
4317
4477
|
useCustomizedStyleOptions: !0
|
|
4318
4478
|
});
|
|
4319
4479
|
if (s === void 0 || !Ge(s))
|
|
4320
|
-
throw new
|
|
4480
|
+
throw new Ae("errors.otherWidgetTypesNotSupported");
|
|
4321
4481
|
const {
|
|
4322
4482
|
detailedDescription: u
|
|
4323
4483
|
} = e, {
|
|
@@ -4333,13 +4493,13 @@ function Gl({
|
|
|
4333
4493
|
}
|
|
4334
4494
|
};
|
|
4335
4495
|
let b, x;
|
|
4336
|
-
if (
|
|
4496
|
+
if (Qa(s.chartType))
|
|
4337
4497
|
b = /* @__PURE__ */ n("div", {
|
|
4338
4498
|
className: "csdk-h-[245px]",
|
|
4339
|
-
children: /* @__PURE__ */ n(
|
|
4499
|
+
children: /* @__PURE__ */ n(Ie, T(M({}, s), {
|
|
4340
4500
|
styleOptions: g
|
|
4341
4501
|
}))
|
|
4342
|
-
}), x = /* @__PURE__ */ n(
|
|
4502
|
+
}), x = /* @__PURE__ */ n(Ie, T(M({}, s), {
|
|
4343
4503
|
styleOptions: {
|
|
4344
4504
|
header: {
|
|
4345
4505
|
hidden: !0
|
|
@@ -4357,10 +4517,10 @@ function Gl({
|
|
|
4357
4517
|
yAxis: void 0
|
|
4358
4518
|
}), g);
|
|
4359
4519
|
delete p.legend, delete p.xAxis, delete p.yAxis, b = /* @__PURE__ */ n("div", {
|
|
4360
|
-
children: /* @__PURE__ */ n(
|
|
4520
|
+
children: /* @__PURE__ */ n(Ie, T(M({}, s), {
|
|
4361
4521
|
styleOptions: p
|
|
4362
4522
|
}))
|
|
4363
|
-
}), x = /* @__PURE__ */ n(
|
|
4523
|
+
}), x = /* @__PURE__ */ n(Ie, T(M({}, s), {
|
|
4364
4524
|
styleOptions: M({
|
|
4365
4525
|
cornerRadius: "None"
|
|
4366
4526
|
}, o)
|
|
@@ -4372,7 +4532,7 @@ function Gl({
|
|
|
4372
4532
|
};
|
|
4373
4533
|
}, [e]);
|
|
4374
4534
|
return /* @__PURE__ */ v(Y, {
|
|
4375
|
-
children: [i, /* @__PURE__ */ v(
|
|
4535
|
+
children: [i, /* @__PURE__ */ v(Qr, {
|
|
4376
4536
|
open: t,
|
|
4377
4537
|
onClose: () => r(!1),
|
|
4378
4538
|
maxWidth: "xl",
|
|
@@ -4388,10 +4548,10 @@ function Gl({
|
|
|
4388
4548
|
children: [/* @__PURE__ */ n("div", {
|
|
4389
4549
|
className: "csdk-text-ai-lg csdk-semibold",
|
|
4390
4550
|
children: e.queryTitle
|
|
4391
|
-
}), /* @__PURE__ */ n(
|
|
4551
|
+
}), /* @__PURE__ */ n(ar, {
|
|
4392
4552
|
onClick: () => r(!1),
|
|
4393
4553
|
"aria-label": "close expanded chart",
|
|
4394
|
-
children: /* @__PURE__ */ n(
|
|
4554
|
+
children: /* @__PURE__ */ n(jl, {
|
|
4395
4555
|
fillColor: a.aiChat.primaryTextColor
|
|
4396
4556
|
})
|
|
4397
4557
|
})]
|
|
@@ -4428,9 +4588,9 @@ function Hl({
|
|
|
4428
4588
|
} = D(), {
|
|
4429
4589
|
t: a
|
|
4430
4590
|
} = E();
|
|
4431
|
-
return /* @__PURE__ */ n(
|
|
4591
|
+
return /* @__PURE__ */ n(je, {
|
|
4432
4592
|
title: a("ai.buttons.incorrectResponse"),
|
|
4433
|
-
children: /* @__PURE__ */ n(
|
|
4593
|
+
children: /* @__PURE__ */ n(Oe, {
|
|
4434
4594
|
"aria-label": "thumbs-down",
|
|
4435
4595
|
onClick: e,
|
|
4436
4596
|
$hoverColor: r.aiChat.icons.feedbackIcons.hoverColor,
|
|
@@ -4458,7 +4618,7 @@ function Yl({
|
|
|
4458
4618
|
})
|
|
4459
4619
|
});
|
|
4460
4620
|
}
|
|
4461
|
-
function
|
|
4621
|
+
function Ul({
|
|
4462
4622
|
onClick: e,
|
|
4463
4623
|
disabled: t
|
|
4464
4624
|
}) {
|
|
@@ -4467,9 +4627,9 @@ function $l({
|
|
|
4467
4627
|
} = D(), {
|
|
4468
4628
|
t: a
|
|
4469
4629
|
} = E();
|
|
4470
|
-
return /* @__PURE__ */ n(
|
|
4630
|
+
return /* @__PURE__ */ n(je, {
|
|
4471
4631
|
title: a("ai.buttons.correctResponse"),
|
|
4472
|
-
children: /* @__PURE__ */ n(
|
|
4632
|
+
children: /* @__PURE__ */ n(Oe, {
|
|
4473
4633
|
"aria-label": "thumbs-up",
|
|
4474
4634
|
onClick: e,
|
|
4475
4635
|
$hoverColor: r.aiChat.icons.feedbackIcons.hoverColor,
|
|
@@ -4480,8 +4640,8 @@ function $l({
|
|
|
4480
4640
|
})
|
|
4481
4641
|
});
|
|
4482
4642
|
}
|
|
4483
|
-
const
|
|
4484
|
-
const [e, t] = R(!1), r =
|
|
4643
|
+
const Ql = () => {
|
|
4644
|
+
const [e, t] = R(!1), r = ue(null), a = j(() => {
|
|
4485
4645
|
t(!0);
|
|
4486
4646
|
}, []), i = j(() => {
|
|
4487
4647
|
t(!1);
|
|
@@ -4490,13 +4650,14 @@ const Ul = () => {
|
|
|
4490
4650
|
var s;
|
|
4491
4651
|
((s = r.current) == null ? void 0 : s.nodeType) === Node.ELEMENT_NODE && (r.current.removeEventListener("mouseenter", a), r.current.removeEventListener("mouseleave", i)), (l == null ? void 0 : l.nodeType) === Node.ELEMENT_NODE && (l.addEventListener("mouseenter", a), l.addEventListener("mouseleave", i)), r.current = l;
|
|
4492
4652
|
}, [a, i]), e];
|
|
4493
|
-
},
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4653
|
+
}, Fl = _.div`
|
|
4654
|
+
display: flex;
|
|
4655
|
+
flex-direction: column;
|
|
4656
|
+
row-gap: ${({
|
|
4497
4657
|
theme: e
|
|
4498
|
-
}) => e.aiChat.body.gapBetweenMessages
|
|
4499
|
-
|
|
4658
|
+
}) => e.aiChat.body.gapBetweenMessages};
|
|
4659
|
+
`;
|
|
4660
|
+
function Vl({
|
|
4500
4661
|
visible: e,
|
|
4501
4662
|
onSend: t
|
|
4502
4663
|
}) {
|
|
@@ -4505,7 +4666,7 @@ function Fl({
|
|
|
4505
4666
|
}, [t]);
|
|
4506
4667
|
return e ? /* @__PURE__ */ v("div", {
|
|
4507
4668
|
className: `csdk-flex csdk-items-center ${`csdk-transition-opacity csdk-delay-150 csdk-duration-500 ${r ? "csdk-opacity-0" : "csdk-opacity-100"}`}`,
|
|
4508
|
-
children: [/* @__PURE__ */ n(
|
|
4669
|
+
children: [/* @__PURE__ */ n(Ul, {
|
|
4509
4670
|
onClick: () => i("up"),
|
|
4510
4671
|
disabled: r
|
|
4511
4672
|
}), /* @__PURE__ */ n(Hl, {
|
|
@@ -4514,41 +4675,41 @@ function Fl({
|
|
|
4514
4675
|
})]
|
|
4515
4676
|
}) : null;
|
|
4516
4677
|
}
|
|
4517
|
-
function
|
|
4678
|
+
function gt({
|
|
4518
4679
|
sourceId: e,
|
|
4519
4680
|
data: t,
|
|
4520
4681
|
type: r,
|
|
4521
4682
|
buttonVisibility: a = "onHover",
|
|
4522
4683
|
renderContent: i
|
|
4523
4684
|
}) {
|
|
4524
|
-
const l =
|
|
4685
|
+
const l = re(), s = Fa(j((x) => {
|
|
4525
4686
|
l && l.ai.sendFeedback({
|
|
4526
4687
|
sourceId: e,
|
|
4527
4688
|
type: r,
|
|
4528
4689
|
data: t,
|
|
4529
4690
|
rating: x
|
|
4530
4691
|
});
|
|
4531
|
-
}, [l, e, t, r]), 200), [u, c] =
|
|
4692
|
+
}, [l, e, t, r]), 200), [u, c] = Ql(), g = q(() => a === "onHover" ? c : a !== "never", [c, a]), {
|
|
4532
4693
|
themeSettings: b
|
|
4533
4694
|
} = D();
|
|
4534
|
-
return /* @__PURE__ */ n(
|
|
4695
|
+
return /* @__PURE__ */ n(Fl, {
|
|
4535
4696
|
ref: u,
|
|
4536
4697
|
theme: b,
|
|
4537
|
-
children: i(/* @__PURE__ */ n(
|
|
4698
|
+
children: i(/* @__PURE__ */ n(Vl, {
|
|
4538
4699
|
onSend: s,
|
|
4539
4700
|
visible: g
|
|
4540
4701
|
}))
|
|
4541
4702
|
});
|
|
4542
4703
|
}
|
|
4543
|
-
const
|
|
4544
|
-
function
|
|
4704
|
+
const Jl = 18 * 5;
|
|
4705
|
+
function Dt({
|
|
4545
4706
|
text: e
|
|
4546
4707
|
}) {
|
|
4547
4708
|
const [t, r] = R(!0), [a, i] = R(!1), {
|
|
4548
4709
|
t: l
|
|
4549
|
-
} = E(), s =
|
|
4710
|
+
} = E(), s = ue(null);
|
|
4550
4711
|
return Be(() => {
|
|
4551
|
-
s.current && s.current.scrollHeight >
|
|
4712
|
+
s.current && s.current.scrollHeight > Jl && i(!0);
|
|
4552
4713
|
}, [e]), /* @__PURE__ */ v("div", {
|
|
4553
4714
|
children: [/* @__PURE__ */ n("div", {
|
|
4554
4715
|
ref: s,
|
|
@@ -4564,38 +4725,39 @@ function Mt({
|
|
|
4564
4725
|
})]
|
|
4565
4726
|
});
|
|
4566
4727
|
}
|
|
4567
|
-
function
|
|
4728
|
+
function Xl({
|
|
4568
4729
|
nlgRequest: e
|
|
4569
4730
|
}) {
|
|
4570
4731
|
const {
|
|
4571
4732
|
data: t,
|
|
4572
4733
|
isLoading: r,
|
|
4573
4734
|
isError: a
|
|
4574
|
-
} =
|
|
4735
|
+
} = Ve(e), {
|
|
4575
4736
|
t: i
|
|
4576
4737
|
} = E();
|
|
4577
|
-
return r ? /* @__PURE__ */ n(
|
|
4738
|
+
return r ? /* @__PURE__ */ n(vt, {}) : a ? /* @__PURE__ */ n(de, {
|
|
4578
4739
|
align: "left",
|
|
4579
4740
|
children: i("ai.errors.unexpected")
|
|
4580
|
-
}) : /* @__PURE__ */ n(
|
|
4741
|
+
}) : /* @__PURE__ */ n(de, {
|
|
4581
4742
|
align: "full",
|
|
4582
|
-
children: /* @__PURE__ */ n(
|
|
4743
|
+
children: /* @__PURE__ */ n(Dt, {
|
|
4583
4744
|
text: t ?? i("ai.errors.insightsNotAvailable")
|
|
4584
4745
|
})
|
|
4585
4746
|
});
|
|
4586
4747
|
}
|
|
4587
|
-
const
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4748
|
+
const Ft = _.div`
|
|
4749
|
+
display: flex;
|
|
4750
|
+
align-items: center;
|
|
4751
|
+
column-gap: 10px;
|
|
4752
|
+
`, Kl = (e) => !!e && "aeiou".includes(e[0]);
|
|
4753
|
+
function es({
|
|
4592
4754
|
data: e,
|
|
4593
4755
|
alwaysShowFeedback: t
|
|
4594
4756
|
}) {
|
|
4595
4757
|
const {
|
|
4596
4758
|
chatMode: r = "analyze",
|
|
4597
4759
|
enableInsights: a
|
|
4598
|
-
} =
|
|
4760
|
+
} = oe(), {
|
|
4599
4761
|
themeSettings: i
|
|
4600
4762
|
} = D(), {
|
|
4601
4763
|
queryTitle: l,
|
|
@@ -4607,7 +4769,7 @@ function Kl({
|
|
|
4607
4769
|
console.debug(`JAQL for ${l}`, u), console.debug(`chart recommendations for ${l}`, s);
|
|
4608
4770
|
const b = "chartType" in s ? s.chartType : "table";
|
|
4609
4771
|
let x;
|
|
4610
|
-
|
|
4772
|
+
Kl(b) ? x = `an ${b}` : x = `a ${b}`, b !== "table" && (x += " chart");
|
|
4611
4773
|
const o = u.datasource.title, [p, d] = R(!1), m = j(() => {
|
|
4612
4774
|
d((y) => !y);
|
|
4613
4775
|
}, []), h = {
|
|
@@ -4615,85 +4777,85 @@ function Kl({
|
|
|
4615
4777
|
datasource: u.datasource,
|
|
4616
4778
|
metadata: u.metadata
|
|
4617
4779
|
}
|
|
4618
|
-
}, w = r === "analyze",
|
|
4780
|
+
}, w = r === "analyze", C = `${c}${c && g ? `
|
|
4619
4781
|
` : ""}${g}`;
|
|
4620
4782
|
return /* @__PURE__ */ v(Y, {
|
|
4621
|
-
children: [/* @__PURE__ */ n(
|
|
4783
|
+
children: [/* @__PURE__ */ n(gt, {
|
|
4622
4784
|
sourceId: o,
|
|
4623
4785
|
data: e,
|
|
4624
4786
|
type: "chats/nlq",
|
|
4625
4787
|
buttonVisibility: t ? "always" : "onHover",
|
|
4626
4788
|
renderContent: (y) => /* @__PURE__ */ v(Y, {
|
|
4627
|
-
children: [/* @__PURE__ */ v(
|
|
4789
|
+
children: [/* @__PURE__ */ v(Ft, {
|
|
4628
4790
|
children: [/* @__PURE__ */ n(Yr, {
|
|
4629
4791
|
align: "left",
|
|
4630
4792
|
theme: i,
|
|
4631
|
-
children:
|
|
4793
|
+
children: C || `Here's ${x} showing ${vl(l)}.`
|
|
4632
4794
|
}), y]
|
|
4633
4795
|
}), w && /* @__PURE__ */ n(Gl, {
|
|
4634
4796
|
content: e
|
|
4635
4797
|
})]
|
|
4636
4798
|
})
|
|
4637
|
-
}), a && /* @__PURE__ */ n(
|
|
4799
|
+
}), a && /* @__PURE__ */ n(gt, {
|
|
4638
4800
|
sourceId: o,
|
|
4639
4801
|
data: h,
|
|
4640
4802
|
type: "nlg/queryResult",
|
|
4641
4803
|
buttonVisibility: p ? "onHover" : "never",
|
|
4642
4804
|
renderContent: (y) => /* @__PURE__ */ v(Y, {
|
|
4643
|
-
children: [/* @__PURE__ */ v(
|
|
4644
|
-
children: [/* @__PURE__ */ n(
|
|
4805
|
+
children: [/* @__PURE__ */ v(Ft, {
|
|
4806
|
+
children: [/* @__PURE__ */ n(Ml, {
|
|
4645
4807
|
onClick: m
|
|
4646
4808
|
}), y]
|
|
4647
|
-
}), p && /* @__PURE__ */ n(
|
|
4809
|
+
}), p && /* @__PURE__ */ n(Xl, {
|
|
4648
4810
|
nlgRequest: h
|
|
4649
4811
|
})]
|
|
4650
4812
|
})
|
|
4651
4813
|
})]
|
|
4652
4814
|
});
|
|
4653
4815
|
}
|
|
4654
|
-
function
|
|
4816
|
+
function ts({
|
|
4655
4817
|
message: e,
|
|
4656
4818
|
isLastMessage: t
|
|
4657
4819
|
}) {
|
|
4658
|
-
if (
|
|
4820
|
+
if (Ct(e)) {
|
|
4659
4821
|
const a = JSON.parse(e.content);
|
|
4660
|
-
return /* @__PURE__ */ n(
|
|
4822
|
+
return /* @__PURE__ */ n(es, {
|
|
4661
4823
|
data: a,
|
|
4662
4824
|
alwaysShowFeedback: t
|
|
4663
4825
|
});
|
|
4664
4826
|
}
|
|
4665
|
-
const r =
|
|
4666
|
-
return /* @__PURE__ */ n(
|
|
4827
|
+
const r = Oo(e) ? JSON.parse(e.content).answer : e.content;
|
|
4828
|
+
return /* @__PURE__ */ n(de, {
|
|
4667
4829
|
align: e.role === "user" ? "right" : "left",
|
|
4668
4830
|
children: r
|
|
4669
4831
|
});
|
|
4670
4832
|
}
|
|
4671
|
-
const
|
|
4833
|
+
const rs = Ca(ts), as = ({
|
|
4672
4834
|
error: e,
|
|
4673
4835
|
displayMessage: t
|
|
4674
|
-
}) => (console.debug("Unexpected error occurred when resolving a chat message:", e), /* @__PURE__ */ n(
|
|
4836
|
+
}) => (console.debug("Unexpected error occurred when resolving a chat message:", e), /* @__PURE__ */ n(de, {
|
|
4675
4837
|
align: "left",
|
|
4676
4838
|
children: t
|
|
4677
4839
|
}));
|
|
4678
|
-
function
|
|
4840
|
+
function is({
|
|
4679
4841
|
messages: e
|
|
4680
4842
|
}) {
|
|
4681
4843
|
const {
|
|
4682
4844
|
t
|
|
4683
4845
|
} = E();
|
|
4684
4846
|
return /* @__PURE__ */ n(Y, {
|
|
4685
|
-
children: e.map((r, a) => /* @__PURE__ */ n(
|
|
4686
|
-
fallbackRender: (i) =>
|
|
4847
|
+
children: e.map((r, a) => /* @__PURE__ */ n(Va, {
|
|
4848
|
+
fallbackRender: (i) => as(T(M({}, i), {
|
|
4687
4849
|
displayMessage: t("ai.errors.unexpected")
|
|
4688
4850
|
})),
|
|
4689
|
-
children: /* @__PURE__ */ n(
|
|
4851
|
+
children: /* @__PURE__ */ n(rs, {
|
|
4690
4852
|
message: r,
|
|
4691
4853
|
isLastMessage: a === e.length - 1
|
|
4692
4854
|
}, a)
|
|
4693
4855
|
}, a))
|
|
4694
4856
|
});
|
|
4695
4857
|
}
|
|
4696
|
-
function
|
|
4858
|
+
function Vr({
|
|
4697
4859
|
color: e
|
|
4698
4860
|
}) {
|
|
4699
4861
|
return /* @__PURE__ */ n("svg", {
|
|
@@ -4708,7 +4870,7 @@ function Fr({
|
|
|
4708
4870
|
})
|
|
4709
4871
|
});
|
|
4710
4872
|
}
|
|
4711
|
-
function
|
|
4873
|
+
function os({
|
|
4712
4874
|
onClick: e,
|
|
4713
4875
|
color: t
|
|
4714
4876
|
}) {
|
|
@@ -4716,12 +4878,12 @@ function is({
|
|
|
4716
4878
|
"aria-label": "go back",
|
|
4717
4879
|
className: "csdk-w-5 csdk-h-5 csdk-flex csdk-p-[4px] csdk-ml-[6px] csdk-cursor-pointer",
|
|
4718
4880
|
onClick: e,
|
|
4719
|
-
children: /* @__PURE__ */ n(
|
|
4881
|
+
children: /* @__PURE__ */ n(Vr, {
|
|
4720
4882
|
color: t
|
|
4721
4883
|
})
|
|
4722
4884
|
});
|
|
4723
4885
|
}
|
|
4724
|
-
function
|
|
4886
|
+
function ns() {
|
|
4725
4887
|
const {
|
|
4726
4888
|
themeSettings: e
|
|
4727
4889
|
} = D();
|
|
@@ -4739,65 +4901,99 @@ function os() {
|
|
|
4739
4901
|
})
|
|
4740
4902
|
});
|
|
4741
4903
|
}
|
|
4742
|
-
const
|
|
4743
|
-
const r = new
|
|
4904
|
+
const ls = (e, t) => {
|
|
4905
|
+
const r = new La(e);
|
|
4744
4906
|
return r.alpha = t, r;
|
|
4745
|
-
},
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4907
|
+
}, ss = _.div`
|
|
4908
|
+
font-size: inherit;
|
|
4909
|
+
line-height: inherit;
|
|
4910
|
+
padding-left: 8px;
|
|
4911
|
+
padding-right: 8px;
|
|
4912
|
+
padding-top: 4px;
|
|
4913
|
+
border-radius: 16px;
|
|
4914
|
+
margin-bottom: 4px;
|
|
4915
|
+
box-shadow: ${({
|
|
4749
4916
|
theme: e
|
|
4750
|
-
}) => `0 4px 8px 0 ${
|
|
4917
|
+
}) => `0 4px 8px 0 ${ls(e.aiChat.primaryTextColor, 0.2)}`};
|
|
4918
|
+
cursor: pointer;
|
|
4919
|
+
color: ${({
|
|
4751
4920
|
theme: e
|
|
4752
|
-
}) => e.aiChat.clickableMessages.textColor
|
|
4921
|
+
}) => e.aiChat.clickableMessages.textColor};
|
|
4922
|
+
background-color: ${({
|
|
4753
4923
|
theme: e
|
|
4754
|
-
}) => e.aiChat.clickableMessages.backgroundColor
|
|
4924
|
+
}) => e.aiChat.clickableMessages.backgroundColor};
|
|
4925
|
+
|
|
4926
|
+
&:hover {
|
|
4927
|
+
color: ${({
|
|
4755
4928
|
theme: e
|
|
4756
|
-
}) => e.aiChat.clickableMessages.hover.textColor
|
|
4929
|
+
}) => e.aiChat.clickableMessages.hover.textColor};
|
|
4930
|
+
background-color: ${({
|
|
4757
4931
|
theme: e
|
|
4758
|
-
}) => e.aiChat.clickableMessages.hover.backgroundColor
|
|
4932
|
+
}) => e.aiChat.clickableMessages.hover.backgroundColor};
|
|
4933
|
+
box-shadow: none;
|
|
4934
|
+
`, ds = ({
|
|
4759
4935
|
onClick: e
|
|
4760
4936
|
}) => {
|
|
4761
4937
|
const {
|
|
4762
4938
|
themeSettings: t
|
|
4763
4939
|
} = D();
|
|
4764
|
-
return /* @__PURE__ */ n(
|
|
4940
|
+
return /* @__PURE__ */ n(ss, {
|
|
4765
4941
|
theme: t,
|
|
4766
4942
|
onClick: e,
|
|
4767
|
-
children: /* @__PURE__ */ n(
|
|
4943
|
+
children: /* @__PURE__ */ n(ns, {})
|
|
4768
4944
|
});
|
|
4769
|
-
},
|
|
4945
|
+
}, cs = ({
|
|
4770
4946
|
isVisible: e,
|
|
4771
4947
|
onClick: t,
|
|
4772
4948
|
anchorElement: r
|
|
4773
|
-
}) => /* @__PURE__ */ n(
|
|
4949
|
+
}) => /* @__PURE__ */ n(sr, {
|
|
4774
4950
|
anchorEl: r,
|
|
4775
4951
|
open: e,
|
|
4776
4952
|
placement: "top",
|
|
4777
4953
|
sx: {
|
|
4778
4954
|
zIndex: 2
|
|
4779
4955
|
},
|
|
4780
|
-
children: /* @__PURE__ */ n(
|
|
4956
|
+
children: /* @__PURE__ */ n(ds, {
|
|
4781
4957
|
onClick: t
|
|
4782
4958
|
})
|
|
4783
|
-
}),
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4959
|
+
}), ps = _.button`
|
|
4960
|
+
font-size: inherit;
|
|
4961
|
+
line-height: inherit;
|
|
4962
|
+
box-sizing: border-box;
|
|
4963
|
+
border-width: 1px;
|
|
4964
|
+
padding-left: 1rem;
|
|
4965
|
+
padding-right: 1rem;
|
|
4966
|
+
padding-top: 0.5rem;
|
|
4967
|
+
padding-bottom: 0.5rem;
|
|
4968
|
+
cursor: pointer;
|
|
4969
|
+
text-align: left;
|
|
4970
|
+
max-width: 85%;
|
|
4971
|
+
|
|
4972
|
+
font-family: ${({
|
|
4787
4973
|
theme: e
|
|
4788
|
-
}) => e.typography.fontFamily
|
|
4974
|
+
}) => e.typography.fontFamily};
|
|
4975
|
+
color: ${({
|
|
4789
4976
|
theme: e
|
|
4790
|
-
}) => e.aiChat.suggestions.textColor
|
|
4977
|
+
}) => e.aiChat.suggestions.textColor};
|
|
4978
|
+
background-color: ${({
|
|
4791
4979
|
theme: e
|
|
4792
|
-
}) => e.aiChat.suggestions.backgroundColor
|
|
4980
|
+
}) => e.aiChat.suggestions.backgroundColor};
|
|
4981
|
+
border: ${({
|
|
4793
4982
|
theme: e
|
|
4794
|
-
}) => e.aiChat.suggestions.border
|
|
4983
|
+
}) => e.aiChat.suggestions.border};
|
|
4984
|
+
border-radius: ${({
|
|
4795
4985
|
theme: e
|
|
4796
|
-
}) => e.aiChat.suggestions.borderRadius
|
|
4986
|
+
}) => e.aiChat.suggestions.borderRadius};
|
|
4987
|
+
&:hover {
|
|
4988
|
+
background-color: ${({
|
|
4797
4989
|
theme: e
|
|
4798
|
-
}) => e.aiChat.suggestions.hover.backgroundColor
|
|
4990
|
+
}) => e.aiChat.suggestions.hover.backgroundColor};
|
|
4991
|
+
color: ${({
|
|
4799
4992
|
theme: e
|
|
4800
|
-
}) => e.aiChat.suggestions.hover.textColor
|
|
4993
|
+
}) => e.aiChat.suggestions.hover.textColor};
|
|
4994
|
+
}
|
|
4995
|
+
|
|
4996
|
+
${({
|
|
4801
4997
|
theme: e
|
|
4802
4998
|
}) => {
|
|
4803
4999
|
const {
|
|
@@ -4806,7 +5002,7 @@ const ns = (e, t) => {
|
|
|
4806
5002
|
} = e.aiChat.suggestions;
|
|
4807
5003
|
if (t) {
|
|
4808
5004
|
const [a, i] = t;
|
|
4809
|
-
return
|
|
5005
|
+
return $`
|
|
4810
5006
|
border: none;
|
|
4811
5007
|
position: relative;
|
|
4812
5008
|
border-radius: ${r};
|
|
@@ -4827,51 +5023,55 @@ const ns = (e, t) => {
|
|
|
4827
5023
|
`;
|
|
4828
5024
|
}
|
|
4829
5025
|
return "";
|
|
4830
|
-
}
|
|
4831
|
-
|
|
5026
|
+
}}
|
|
5027
|
+
`;
|
|
5028
|
+
function Vt({
|
|
4832
5029
|
question: e,
|
|
4833
5030
|
onClick: t
|
|
4834
5031
|
}) {
|
|
4835
5032
|
const {
|
|
4836
5033
|
themeSettings: r
|
|
4837
5034
|
} = D();
|
|
4838
|
-
return /* @__PURE__ */ n(
|
|
5035
|
+
return /* @__PURE__ */ n(ps, {
|
|
4839
5036
|
onClick: t,
|
|
4840
5037
|
theme: r,
|
|
4841
5038
|
children: e
|
|
4842
5039
|
});
|
|
4843
5040
|
}
|
|
4844
|
-
const
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
5041
|
+
const us = _.div`
|
|
5042
|
+
display: flex;
|
|
5043
|
+
flex-direction: column;
|
|
5044
|
+
align-items: flex-start;
|
|
5045
|
+
row-gap: ${({
|
|
4848
5046
|
theme: e
|
|
4849
|
-
}) => e.aiChat.suggestions.gap
|
|
4850
|
-
|
|
5047
|
+
}) => e.aiChat.suggestions.gap};
|
|
5048
|
+
`;
|
|
5049
|
+
function gs({
|
|
4851
5050
|
questions: e,
|
|
4852
5051
|
onSelection: t
|
|
4853
5052
|
}) {
|
|
4854
5053
|
const {
|
|
4855
5054
|
t: r
|
|
4856
|
-
} = E(), [a, i] = R(!0), l =
|
|
5055
|
+
} = E(), [a, i] = R(!0), l = q(() => a && e.length > 5 ? e.slice(0, 4) : e, [e, a]), {
|
|
4857
5056
|
themeSettings: s
|
|
4858
5057
|
} = D();
|
|
4859
|
-
return /* @__PURE__ */ v(
|
|
5058
|
+
return /* @__PURE__ */ v(us, {
|
|
4860
5059
|
"aria-label": "list of suggested questions",
|
|
4861
5060
|
theme: s,
|
|
4862
|
-
children: [l.map((u) => /* @__PURE__ */ n(
|
|
5061
|
+
children: [l.map((u) => /* @__PURE__ */ n(Vt, {
|
|
4863
5062
|
question: u,
|
|
4864
5063
|
onClick: () => t(u)
|
|
4865
|
-
}, u)), l.length < e.length && /* @__PURE__ */ n(
|
|
5064
|
+
}, u)), l.length < e.length && /* @__PURE__ */ n(Vt, {
|
|
4866
5065
|
question: r("ai.buttons.seeMore"),
|
|
4867
5066
|
onClick: () => i(!1)
|
|
4868
5067
|
})]
|
|
4869
5068
|
});
|
|
4870
5069
|
}
|
|
4871
|
-
const
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
5070
|
+
const hs = _.div`
|
|
5071
|
+
width: 283px;
|
|
5072
|
+
height: 32px;
|
|
5073
|
+
border-radius: 10px;
|
|
5074
|
+
background: ${({
|
|
4875
5075
|
theme: e
|
|
4876
5076
|
}) => {
|
|
4877
5077
|
const [t, r] = e.aiChat.suggestions.loadingGradient;
|
|
@@ -4881,71 +5081,98 @@ const gs = /* @__PURE__ */ C("div", {
|
|
|
4881
5081
|
${r} 50%,
|
|
4882
5082
|
${t} 100%
|
|
4883
5083
|
)`;
|
|
4884
|
-
}
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
5084
|
+
}};
|
|
5085
|
+
background-size: 200% auto;
|
|
5086
|
+
animation: gradient 2s linear infinite;
|
|
5087
|
+
|
|
5088
|
+
@keyframes gradient {
|
|
5089
|
+
0% {
|
|
5090
|
+
background-position: 0 0;
|
|
5091
|
+
}
|
|
5092
|
+
100% {
|
|
5093
|
+
background-position: -200% 0;
|
|
5094
|
+
}
|
|
5095
|
+
}
|
|
5096
|
+
`, ms = _.div`
|
|
5097
|
+
display: flex;
|
|
5098
|
+
flex-direction: column;
|
|
5099
|
+
row-gap: 1rem;
|
|
5100
|
+
`;
|
|
5101
|
+
function fs() {
|
|
4889
5102
|
const {
|
|
4890
5103
|
themeSettings: e
|
|
4891
5104
|
} = D();
|
|
4892
|
-
return /* @__PURE__ */ n(
|
|
5105
|
+
return /* @__PURE__ */ n(ms, {
|
|
4893
5106
|
children: Array.from({
|
|
4894
5107
|
length: 3
|
|
4895
|
-
}, (t, r) => /* @__PURE__ */ n(
|
|
5108
|
+
}, (t, r) => /* @__PURE__ */ n(hs, {
|
|
4896
5109
|
theme: e
|
|
4897
5110
|
}, r))
|
|
4898
5111
|
});
|
|
4899
5112
|
}
|
|
4900
|
-
function
|
|
5113
|
+
function bs({
|
|
4901
5114
|
questions: e,
|
|
4902
5115
|
isLoading: t,
|
|
4903
5116
|
onSelection: r
|
|
4904
5117
|
}) {
|
|
4905
5118
|
const a = e.length > 0, {
|
|
4906
5119
|
suggestionsWelcomeText: i
|
|
4907
|
-
} =
|
|
4908
|
-
return t ? /* @__PURE__ */ n(
|
|
4909
|
-
children: [i && /* @__PURE__ */ n(
|
|
5120
|
+
} = oe();
|
|
5121
|
+
return t ? /* @__PURE__ */ n(fs, {}) : a ? /* @__PURE__ */ v(Y, {
|
|
5122
|
+
children: [i && /* @__PURE__ */ n(de, {
|
|
4910
5123
|
align: "left",
|
|
4911
5124
|
children: i
|
|
4912
|
-
}), /* @__PURE__ */ n(
|
|
5125
|
+
}), /* @__PURE__ */ n(gs, {
|
|
4913
5126
|
onSelection: r,
|
|
4914
5127
|
questions: e
|
|
4915
5128
|
})]
|
|
4916
5129
|
}) : null;
|
|
4917
5130
|
}
|
|
4918
|
-
const
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
5131
|
+
const xs = _.div`
|
|
5132
|
+
display: flex;
|
|
5133
|
+
flex-direction: column;
|
|
5134
|
+
row-gap: ${({
|
|
4922
5135
|
theme: e
|
|
4923
|
-
}) => e.aiChat.body.gapBetweenMessages
|
|
5136
|
+
}) => e.aiChat.body.gapBetweenMessages};
|
|
5137
|
+
overflow-y: scroll;
|
|
5138
|
+
padding-left: ${({
|
|
4924
5139
|
theme: e
|
|
4925
|
-
}) => e.aiChat.body.paddingLeft
|
|
5140
|
+
}) => e.aiChat.body.paddingLeft};
|
|
5141
|
+
padding-right: ${({
|
|
4926
5142
|
theme: e
|
|
4927
|
-
}) => e.aiChat.body.paddingRight
|
|
5143
|
+
}) => e.aiChat.body.paddingRight};
|
|
5144
|
+
padding-top: ${({
|
|
4928
5145
|
theme: e
|
|
4929
|
-
}) => e.aiChat.body.paddingTop
|
|
5146
|
+
}) => e.aiChat.body.paddingTop};
|
|
5147
|
+
padding-bottom: ${({
|
|
4930
5148
|
theme: e
|
|
4931
|
-
}) => e.aiChat.body.paddingBottom
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
5149
|
+
}) => e.aiChat.body.paddingBottom};
|
|
5150
|
+
flex: initial;
|
|
5151
|
+
height: 100%;
|
|
5152
|
+
`, ks = _.div`
|
|
5153
|
+
padding-left: ${({
|
|
4935
5154
|
theme: e
|
|
4936
|
-
}) => e.aiChat.footer.paddingLeft
|
|
5155
|
+
}) => e.aiChat.footer.paddingLeft};
|
|
5156
|
+
padding-right: ${({
|
|
4937
5157
|
theme: e
|
|
4938
|
-
}) => e.aiChat.footer.paddingRight
|
|
5158
|
+
}) => e.aiChat.footer.paddingRight};
|
|
5159
|
+
padding-top: ${({
|
|
4939
5160
|
theme: e
|
|
4940
|
-
}) => e.aiChat.footer.paddingTop
|
|
5161
|
+
}) => e.aiChat.footer.paddingTop};
|
|
5162
|
+
padding-bottom: ${({
|
|
4941
5163
|
theme: e
|
|
4942
|
-
}) => e.aiChat.footer.paddingBottom
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
5164
|
+
}) => e.aiChat.footer.paddingBottom};
|
|
5165
|
+
display: flex;
|
|
5166
|
+
flex-direction: column;
|
|
5167
|
+
row-gap: 6px;
|
|
5168
|
+
`, ys = _.div`
|
|
5169
|
+
display: flex;
|
|
5170
|
+
flex-direction: column;
|
|
5171
|
+
row-gap: ${({
|
|
4946
5172
|
theme: e
|
|
4947
|
-
}) => e.aiChat.suggestions.gap
|
|
4948
|
-
|
|
5173
|
+
}) => e.aiChat.suggestions.gap};
|
|
5174
|
+
`;
|
|
5175
|
+
function ws({
|
|
4949
5176
|
contextTitle: e,
|
|
4950
5177
|
onGoBack: t,
|
|
4951
5178
|
contextDetails: r
|
|
@@ -4959,85 +5186,85 @@ function ys({
|
|
|
4959
5186
|
numOfRecentPrompts: g,
|
|
4960
5187
|
numOfRecommendations: b,
|
|
4961
5188
|
customPrompt: x
|
|
4962
|
-
} =
|
|
5189
|
+
} = oe(), {
|
|
4963
5190
|
themeSettings: o
|
|
4964
5191
|
} = D(), {
|
|
4965
5192
|
data: p,
|
|
4966
5193
|
isLoading: d,
|
|
4967
5194
|
isError: m
|
|
4968
|
-
} =
|
|
5195
|
+
} = _r({
|
|
4969
5196
|
contextTitle: e,
|
|
4970
5197
|
count: b,
|
|
4971
5198
|
customPrompt: x
|
|
4972
|
-
}), h =
|
|
5199
|
+
}), h = q(() => p == null ? void 0 : p.map((N) => N.nlqPrompt), [p]), {
|
|
4973
5200
|
history: w,
|
|
4974
|
-
lastNlqResponse:
|
|
5201
|
+
lastNlqResponse: C,
|
|
4975
5202
|
isAwaitingResponse: y,
|
|
4976
5203
|
sendMessage: I,
|
|
4977
5204
|
isLoading: A,
|
|
4978
5205
|
chatId: S,
|
|
4979
5206
|
lastError: L
|
|
4980
|
-
} =
|
|
5207
|
+
} = Eo(e, r), {
|
|
4981
5208
|
mutate: Z,
|
|
4982
|
-
isLoading:
|
|
4983
|
-
} =
|
|
4984
|
-
Z(),
|
|
4985
|
-
}, z =
|
|
5209
|
+
isLoading: ge
|
|
5210
|
+
} = Sr(S), [F, G] = R(!1), [U, V] = R(!1), B = () => G(!0), J = () => G(!1), X = () => {
|
|
5211
|
+
Z(), J();
|
|
5212
|
+
}, z = ue(null), W = ue(null), Q = () => {
|
|
4986
5213
|
if (!(z != null && z.current))
|
|
4987
5214
|
return;
|
|
4988
5215
|
const {
|
|
4989
5216
|
scrollTop: N,
|
|
4990
|
-
clientHeight:
|
|
4991
|
-
scrollHeight:
|
|
5217
|
+
clientHeight: K,
|
|
5218
|
+
scrollHeight: Ee
|
|
4992
5219
|
} = z.current;
|
|
4993
|
-
if (N === void 0 ||
|
|
5220
|
+
if (N === void 0 || K === void 0 || Ee === void 0)
|
|
4994
5221
|
return;
|
|
4995
|
-
const
|
|
4996
|
-
|
|
5222
|
+
const ze = Ee - N - K > K / 2;
|
|
5223
|
+
U !== ze && V(ze);
|
|
4997
5224
|
};
|
|
4998
5225
|
Be(() => {
|
|
4999
5226
|
z.current && (z.current.scrollTop = z.current.scrollHeight);
|
|
5000
|
-
}, [w,
|
|
5001
|
-
const
|
|
5002
|
-
ref:
|
|
5227
|
+
}, [w, F, y]);
|
|
5228
|
+
const ce = ue(null), he = c ? /* @__PURE__ */ n(Dr, {
|
|
5229
|
+
ref: ce,
|
|
5003
5230
|
title: e,
|
|
5004
|
-
leftNav: t && /* @__PURE__ */ n(
|
|
5231
|
+
leftNav: t && /* @__PURE__ */ n(os, {
|
|
5005
5232
|
onClick: t,
|
|
5006
5233
|
color: o.aiChat.header.textColor
|
|
5007
5234
|
}),
|
|
5008
5235
|
style: o.aiChat.header
|
|
5009
|
-
}) : null,
|
|
5236
|
+
}) : null, we = q(() => [...new Set(w.filter((N) => N.role === "user").filter((N) => !(h != null && h.includes(N.content))).map((N) => N.content).reverse())].slice(0, g), [w, g, h]);
|
|
5010
5237
|
return (L == null ? void 0 : L.message) === s("ai.errors.chatUnavailable") ? /* @__PURE__ */ v(Y, {
|
|
5011
|
-
children: [c &&
|
|
5238
|
+
children: [c && he, /* @__PURE__ */ n(Ir, {
|
|
5012
5239
|
text: L.message
|
|
5013
5240
|
})]
|
|
5014
5241
|
}) : /* @__PURE__ */ v(Y, {
|
|
5015
|
-
children: [
|
|
5242
|
+
children: [he, /* @__PURE__ */ v(xs, {
|
|
5016
5243
|
ref: z,
|
|
5017
5244
|
theme: o,
|
|
5018
|
-
onScroll:
|
|
5019
|
-
children: [/* @__PURE__ */ n(
|
|
5020
|
-
isVisible:
|
|
5245
|
+
onScroll: Q,
|
|
5246
|
+
children: [/* @__PURE__ */ n(cs, {
|
|
5247
|
+
isVisible: U,
|
|
5021
5248
|
anchorElement: W.current,
|
|
5022
5249
|
onClick: () => {
|
|
5023
|
-
var N,
|
|
5024
|
-
(
|
|
5250
|
+
var N, K;
|
|
5251
|
+
(K = z.current) == null || K.scroll({
|
|
5025
5252
|
top: (N = z.current) == null ? void 0 : N.scrollHeight,
|
|
5026
5253
|
behavior: "smooth"
|
|
5027
5254
|
});
|
|
5028
5255
|
}
|
|
5029
|
-
}), /* @__PURE__ */ n(
|
|
5256
|
+
}), /* @__PURE__ */ n(yl, {}), /* @__PURE__ */ n(bs, {
|
|
5030
5257
|
questions: h || [],
|
|
5031
5258
|
isLoading: d,
|
|
5032
5259
|
onSelection: I
|
|
5033
|
-
}), L && /* @__PURE__ */ n(
|
|
5260
|
+
}), L && /* @__PURE__ */ n(de, {
|
|
5034
5261
|
align: "left",
|
|
5035
5262
|
children: L.message
|
|
5036
|
-
}), A ? /* @__PURE__ */ n(
|
|
5263
|
+
}), A ? /* @__PURE__ */ n(Je, {}) : /* @__PURE__ */ n(is, {
|
|
5037
5264
|
messages: w
|
|
5038
|
-
}), u &&
|
|
5265
|
+
}), u && C && ((i = (a = C.followupQuestions) == null ? void 0 : a.length) != null ? i : 0) > 0 && /* @__PURE__ */ n(ys, {
|
|
5039
5266
|
theme: o,
|
|
5040
|
-
children: (l =
|
|
5267
|
+
children: (l = C.followupQuestions) == null ? void 0 : l.slice(0, 2).map((N, K) => /* @__PURE__ */ n(Ue, {
|
|
5041
5268
|
align: "left",
|
|
5042
5269
|
onClick: () => {
|
|
5043
5270
|
I(N);
|
|
@@ -5046,55 +5273,70 @@ function ys({
|
|
|
5046
5273
|
className: "csdk-py-[7px] csdk-px-4",
|
|
5047
5274
|
children: N
|
|
5048
5275
|
})
|
|
5049
|
-
},
|
|
5050
|
-
}), (y ||
|
|
5051
|
-
onCancel:
|
|
5052
|
-
onConfirm:
|
|
5276
|
+
}, K))
|
|
5277
|
+
}), (y || ge) && /* @__PURE__ */ n(vt, {}), F && /* @__PURE__ */ n(Cl, {
|
|
5278
|
+
onCancel: J,
|
|
5279
|
+
onConfirm: X
|
|
5053
5280
|
})]
|
|
5054
|
-
}), /* @__PURE__ */ v(
|
|
5281
|
+
}), /* @__PURE__ */ v(ks, {
|
|
5055
5282
|
ref: W,
|
|
5056
5283
|
theme: o,
|
|
5057
|
-
children: [/* @__PURE__ */ n(
|
|
5284
|
+
children: [/* @__PURE__ */ n(nn, {
|
|
5058
5285
|
onSendMessage: I,
|
|
5059
5286
|
disabled: y || A,
|
|
5060
|
-
onClearHistoryClick:
|
|
5287
|
+
onClearHistoryClick: B,
|
|
5061
5288
|
suggestions: h || [],
|
|
5062
|
-
recentPrompts:
|
|
5289
|
+
recentPrompts: we,
|
|
5063
5290
|
isLoading: d || A,
|
|
5064
5291
|
recommendationsError: m,
|
|
5065
|
-
onChange:
|
|
5292
|
+
onChange: J
|
|
5066
5293
|
}), /* @__PURE__ */ n(Go, {
|
|
5067
5294
|
theme: o
|
|
5068
5295
|
})]
|
|
5069
5296
|
})]
|
|
5070
5297
|
});
|
|
5071
5298
|
}
|
|
5072
|
-
const
|
|
5073
|
-
|
|
5074
|
-
label: "Container"
|
|
5075
|
-
})("font-family:", ({
|
|
5299
|
+
const _s = _.button`
|
|
5300
|
+
font-family: ${({
|
|
5076
5301
|
theme: e
|
|
5077
|
-
}) => e.typography.fontFamily
|
|
5302
|
+
}) => e.typography.fontFamily};
|
|
5303
|
+
padding: 20px;
|
|
5304
|
+
border: none;
|
|
5305
|
+
display: flex;
|
|
5306
|
+
align-items: center;
|
|
5307
|
+
justify-content: space-between;
|
|
5308
|
+
text-align: left;
|
|
5309
|
+
border-radius: 15px;
|
|
5310
|
+
box-shadow: 0px 1px 2px rgba(9, 9, 10, 0.1), 0px 2px 4px rgba(9, 9, 10, 0.1);
|
|
5311
|
+
cursor: pointer;
|
|
5312
|
+
|
|
5313
|
+
background-color: ${({
|
|
5078
5314
|
theme: e
|
|
5079
|
-
}) => e.aiChat.dataTopics.items.backgroundColor
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5315
|
+
}) => e.aiChat.dataTopics.items.backgroundColor};
|
|
5316
|
+
`, Cs = _.div`
|
|
5317
|
+
font-size: 1.05rem;
|
|
5318
|
+
line-height: 28px;
|
|
5319
|
+
|
|
5320
|
+
color: ${({
|
|
5083
5321
|
theme: e
|
|
5084
|
-
}) => e.aiChat.dataTopics.items.textColor
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
})("font-size:", ({
|
|
5322
|
+
}) => e.aiChat.dataTopics.items.textColor};
|
|
5323
|
+
`, vs = _.div`
|
|
5324
|
+
font-size: ${({
|
|
5088
5325
|
theme: e
|
|
5089
|
-
}) => e.aiChat.primaryFontSize[0]
|
|
5326
|
+
}) => e.aiChat.primaryFontSize[0]};
|
|
5327
|
+
line-height: ${({
|
|
5090
5328
|
theme: e
|
|
5091
|
-
}) => e.aiChat.primaryFontSize[1]
|
|
5329
|
+
}) => e.aiChat.primaryFontSize[1]};
|
|
5330
|
+
|
|
5331
|
+
color: ${({
|
|
5092
5332
|
theme: e
|
|
5093
|
-
}) =>
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5333
|
+
}) => ir(e.aiChat.dataTopics.items.textColor, 0, 0.5)};
|
|
5334
|
+
`, Ss = _.div`
|
|
5335
|
+
width: 16px;
|
|
5336
|
+
height: 16px;
|
|
5337
|
+
transform: rotate(180deg);
|
|
5338
|
+
`;
|
|
5339
|
+
function Ms(e) {
|
|
5098
5340
|
const {
|
|
5099
5341
|
title: t,
|
|
5100
5342
|
description: r,
|
|
@@ -5102,39 +5344,49 @@ function Ss(e) {
|
|
|
5102
5344
|
} = e, {
|
|
5103
5345
|
themeSettings: i
|
|
5104
5346
|
} = D();
|
|
5105
|
-
return /* @__PURE__ */ v(
|
|
5347
|
+
return /* @__PURE__ */ v(_s, {
|
|
5106
5348
|
onClick: a,
|
|
5107
5349
|
theme: i,
|
|
5108
5350
|
children: [/* @__PURE__ */ v("div", {
|
|
5109
5351
|
children: [/* @__PURE__ */ n(Cs, {
|
|
5110
5352
|
theme: i,
|
|
5111
5353
|
children: t
|
|
5112
|
-
}), /* @__PURE__ */ n(
|
|
5354
|
+
}), /* @__PURE__ */ n(vs, {
|
|
5113
5355
|
theme: i,
|
|
5114
5356
|
children: r
|
|
5115
5357
|
})]
|
|
5116
|
-
}), /* @__PURE__ */ n(
|
|
5117
|
-
children: /* @__PURE__ */ n(
|
|
5358
|
+
}), /* @__PURE__ */ n(Ss, {
|
|
5359
|
+
children: /* @__PURE__ */ n(Vr, {
|
|
5118
5360
|
color: i.aiChat.icons.color
|
|
5119
5361
|
})
|
|
5120
5362
|
})]
|
|
5121
5363
|
});
|
|
5122
5364
|
}
|
|
5123
|
-
const
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5365
|
+
const Is = _.div`
|
|
5366
|
+
padding: 20px;
|
|
5367
|
+
display: flex;
|
|
5368
|
+
flex-direction: column;
|
|
5369
|
+
gap: 20px;
|
|
5370
|
+
overflow: auto;
|
|
5371
|
+
`, Ds = _.div`
|
|
5372
|
+
font-size: 24px;
|
|
5373
|
+
line-height: 32px;
|
|
5374
|
+
font-weight: 600;
|
|
5375
|
+
text-align: center;
|
|
5376
|
+
padding-bottom: 4px;
|
|
5377
|
+
|
|
5378
|
+
color: ${({
|
|
5130
5379
|
theme: e
|
|
5131
|
-
}) => e.aiChat.primaryTextColor
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5380
|
+
}) => e.aiChat.primaryTextColor};
|
|
5381
|
+
`, As = _.div`
|
|
5382
|
+
font-size: 15px;
|
|
5383
|
+
line-height: 22px;
|
|
5384
|
+
|
|
5385
|
+
color: ${({
|
|
5135
5386
|
theme: e
|
|
5136
|
-
}) => e.aiChat.primaryTextColor
|
|
5137
|
-
|
|
5387
|
+
}) => e.aiChat.primaryTextColor};
|
|
5388
|
+
`;
|
|
5389
|
+
function Ls(e) {
|
|
5138
5390
|
const {
|
|
5139
5391
|
dataTopics: t
|
|
5140
5392
|
} = e, {
|
|
@@ -5142,23 +5394,23 @@ function As(e) {
|
|
|
5142
5394
|
} = D(), {
|
|
5143
5395
|
t: a
|
|
5144
5396
|
} = E();
|
|
5145
|
-
return /* @__PURE__ */ v(
|
|
5146
|
-
children: [/* @__PURE__ */ n(
|
|
5397
|
+
return /* @__PURE__ */ v(Is, {
|
|
5398
|
+
children: [/* @__PURE__ */ n(Ds, {
|
|
5147
5399
|
theme: r,
|
|
5148
5400
|
children: a("ai.dataTopics")
|
|
5149
|
-
}), /* @__PURE__ */ v(
|
|
5401
|
+
}), /* @__PURE__ */ v(As, {
|
|
5150
5402
|
theme: r,
|
|
5151
5403
|
children: [a("ai.chatbotDescription"), /* @__PURE__ */ n("br", {}), /* @__PURE__ */ n("br", {}), a("ai.topicSelectPrompt")]
|
|
5152
|
-
}), t.map((i) => /* @__PURE__ */
|
|
5404
|
+
}), t.map((i) => /* @__PURE__ */ Ja(Ms, T(M({}, i), {
|
|
5153
5405
|
key: i.title
|
|
5154
5406
|
})))]
|
|
5155
5407
|
});
|
|
5156
5408
|
}
|
|
5157
|
-
const
|
|
5158
|
-
function
|
|
5409
|
+
const Ts = "#000000", Ns = "#FFFFFF";
|
|
5410
|
+
function js({
|
|
5159
5411
|
isDarkBackground: e = !1
|
|
5160
5412
|
}) {
|
|
5161
|
-
const t = e ?
|
|
5413
|
+
const t = e ? Ns : Ts;
|
|
5162
5414
|
return /* @__PURE__ */ v("svg", {
|
|
5163
5415
|
width: "32",
|
|
5164
5416
|
height: "32",
|
|
@@ -5216,82 +5468,87 @@ function Ns({
|
|
|
5216
5468
|
})]
|
|
5217
5469
|
});
|
|
5218
5470
|
}
|
|
5219
|
-
const
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5471
|
+
const Os = _.div`
|
|
5472
|
+
margin-left: 14px;
|
|
5473
|
+
margin-top: 3px;
|
|
5474
|
+
`, Es = _.div`
|
|
5475
|
+
display: flex;
|
|
5476
|
+
flex-direction: column;
|
|
5477
|
+
justify-content: top;
|
|
5478
|
+
overflow: hidden;
|
|
5479
|
+
height: 100%;
|
|
5480
|
+
|
|
5481
|
+
background-color: ${({
|
|
5226
5482
|
theme: e
|
|
5227
|
-
}) => e.aiChat.dataTopics.backgroundColor
|
|
5228
|
-
|
|
5483
|
+
}) => e.aiChat.dataTopics.backgroundColor};
|
|
5484
|
+
`;
|
|
5485
|
+
function zs({
|
|
5229
5486
|
dataTopicsList: e,
|
|
5230
5487
|
onDataTopicClick: t
|
|
5231
5488
|
}) {
|
|
5232
5489
|
const {
|
|
5233
5490
|
enableHeader: r
|
|
5234
|
-
} =
|
|
5491
|
+
} = oe(), {
|
|
5235
5492
|
themeSettings: a
|
|
5236
5493
|
} = D(), {
|
|
5237
5494
|
t: i
|
|
5238
|
-
} = E(), l =
|
|
5495
|
+
} = E(), l = q(() => e == null ? void 0 : e.map((u) => ({
|
|
5239
5496
|
title: u,
|
|
5240
5497
|
onClick: () => t(u)
|
|
5241
|
-
})), [e, t]), s =
|
|
5498
|
+
})), [e, t]), s = $a(qa(a.aiChat.header.backgroundColor)) > 0.5;
|
|
5242
5499
|
return /* @__PURE__ */ v(Y, {
|
|
5243
|
-
children: [r ? /* @__PURE__ */ n(
|
|
5500
|
+
children: [r ? /* @__PURE__ */ n(Dr, {
|
|
5244
5501
|
title: i("ai.analyticsChatbot"),
|
|
5245
|
-
leftNav: /* @__PURE__ */ n(
|
|
5246
|
-
children: /* @__PURE__ */ n(
|
|
5502
|
+
leftNav: /* @__PURE__ */ n(Os, {
|
|
5503
|
+
children: /* @__PURE__ */ n(js, {
|
|
5247
5504
|
isDarkBackground: s
|
|
5248
5505
|
})
|
|
5249
5506
|
}),
|
|
5250
5507
|
style: a.aiChat.header
|
|
5251
|
-
}) : null, /* @__PURE__ */ v(
|
|
5508
|
+
}) : null, /* @__PURE__ */ v(Es, {
|
|
5252
5509
|
theme: a,
|
|
5253
|
-
children: [!l && /* @__PURE__ */ n(
|
|
5510
|
+
children: [!l && /* @__PURE__ */ n(Je, {}), l && /* @__PURE__ */ n(Ls, {
|
|
5254
5511
|
dataTopics: l
|
|
5255
5512
|
})]
|
|
5256
5513
|
})]
|
|
5257
5514
|
});
|
|
5258
5515
|
}
|
|
5259
|
-
function
|
|
5516
|
+
function Rs() {
|
|
5260
5517
|
const [e, t] = R(), [r, a] = R(), {
|
|
5261
5518
|
data: i,
|
|
5262
5519
|
fetchStatus: l
|
|
5263
|
-
} =
|
|
5520
|
+
} = Ao(), {
|
|
5264
5521
|
dataTopicsList: s,
|
|
5265
5522
|
contextDetails: u
|
|
5266
|
-
} =
|
|
5523
|
+
} = oe(), {
|
|
5267
5524
|
t: c
|
|
5268
5525
|
} = E(), g = c("ai.errors.noAvailableDataTopics"), b = j((d) => {
|
|
5269
5526
|
d.length ? d.length === 1 && (a(void 0), t(d[0])) : a(g);
|
|
5270
|
-
}, [g]), x =
|
|
5527
|
+
}, [g]), x = q(() => {
|
|
5271
5528
|
if (i && l === "idle") {
|
|
5272
5529
|
const d = (s != null && s.length ? i == null ? void 0 : i.filter((m) => s == null ? void 0 : s.includes(m.title)) : i).map((m) => m.title);
|
|
5273
5530
|
return b(d), d;
|
|
5274
5531
|
}
|
|
5275
5532
|
return [];
|
|
5276
|
-
}, [i, l, s, b]), o =
|
|
5533
|
+
}, [i, l, s, b]), o = Te(), p = j(() => {
|
|
5277
5534
|
a(void 0), o.invalidateQueries(["getDataTopics"]);
|
|
5278
5535
|
}, [o]);
|
|
5279
|
-
return r ? /* @__PURE__ */ n(
|
|
5536
|
+
return r ? /* @__PURE__ */ n(Ir, {
|
|
5280
5537
|
text: r,
|
|
5281
5538
|
action: {
|
|
5282
5539
|
text: c("ai.buttons.refresh"),
|
|
5283
5540
|
onClick: p
|
|
5284
5541
|
}
|
|
5285
|
-
}) : x.length === 1 && !e ? /* @__PURE__ */ n(
|
|
5542
|
+
}) : x.length === 1 && !e ? /* @__PURE__ */ n(Je, {}) : e ? /* @__PURE__ */ n(ws, {
|
|
5286
5543
|
contextTitle: e,
|
|
5287
5544
|
contextDetails: u,
|
|
5288
5545
|
onGoBack: x.length === 1 ? void 0 : () => t(void 0)
|
|
5289
|
-
}) : /* @__PURE__ */ n(
|
|
5546
|
+
}) : /* @__PURE__ */ n(zs, {
|
|
5290
5547
|
dataTopicsList: x,
|
|
5291
5548
|
onDataTopicClick: (d) => t(d)
|
|
5292
5549
|
});
|
|
5293
5550
|
}
|
|
5294
|
-
const
|
|
5551
|
+
const Xs = or({
|
|
5295
5552
|
componentName: "Chatbot"
|
|
5296
5553
|
})((e) => {
|
|
5297
5554
|
const {
|
|
@@ -5301,25 +5558,25 @@ const Js = tr({
|
|
|
5301
5558
|
} = e, {
|
|
5302
5559
|
themeSettings: i
|
|
5303
5560
|
} = D();
|
|
5304
|
-
return /* @__PURE__ */ n(
|
|
5561
|
+
return /* @__PURE__ */ n(Io, {
|
|
5305
5562
|
value: a ?? {},
|
|
5306
|
-
children: /* @__PURE__ */ n(
|
|
5563
|
+
children: /* @__PURE__ */ n($o, {
|
|
5307
5564
|
id: "csdk-chatbot-frame",
|
|
5308
5565
|
width: t,
|
|
5309
5566
|
height: r,
|
|
5310
5567
|
theme: i,
|
|
5311
5568
|
tabIndex: 0,
|
|
5312
|
-
children: /* @__PURE__ */ n(
|
|
5569
|
+
children: /* @__PURE__ */ n(Rs, {})
|
|
5313
5570
|
})
|
|
5314
5571
|
});
|
|
5315
|
-
}),
|
|
5572
|
+
}), Ks = or({
|
|
5316
5573
|
componentName: "GetNlgInsights"
|
|
5317
5574
|
})(function(e) {
|
|
5318
5575
|
const {
|
|
5319
5576
|
data: t,
|
|
5320
5577
|
isLoading: r,
|
|
5321
5578
|
isError: a
|
|
5322
|
-
} =
|
|
5579
|
+
} = Ve(e), {
|
|
5323
5580
|
t: i
|
|
5324
5581
|
} = E();
|
|
5325
5582
|
if (a)
|
|
@@ -5327,11 +5584,11 @@ const Js = tr({
|
|
|
5327
5584
|
children: i("ai.errors.unexpected")
|
|
5328
5585
|
});
|
|
5329
5586
|
const l = t ?? i("ai.errors.insightsNotAvailable");
|
|
5330
|
-
return /* @__PURE__ */ n(
|
|
5587
|
+
return /* @__PURE__ */ n(Dt, {
|
|
5331
5588
|
text: r ? "Loading..." : l
|
|
5332
5589
|
});
|
|
5333
5590
|
});
|
|
5334
|
-
function
|
|
5591
|
+
function Zs({
|
|
5335
5592
|
theme: e
|
|
5336
5593
|
}) {
|
|
5337
5594
|
const t = e.general.brandColor;
|
|
@@ -5359,61 +5616,66 @@ function Rs({
|
|
|
5359
5616
|
})]
|
|
5360
5617
|
});
|
|
5361
5618
|
}
|
|
5362
|
-
const
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5619
|
+
const Ws = _.div`
|
|
5620
|
+
display: flex;
|
|
5621
|
+
flex-direction: row;
|
|
5622
|
+
align-items: center;
|
|
5623
|
+
gap: 10px;
|
|
5624
|
+
margin: 24px 0;
|
|
5625
|
+
max-width: 640px;
|
|
5626
|
+
color: ${({
|
|
5366
5627
|
theme: e
|
|
5367
|
-
}) => e.chart.textColor
|
|
5628
|
+
}) => e.chart.textColor};
|
|
5629
|
+
background-color: ${({
|
|
5368
5630
|
theme: e
|
|
5369
|
-
}) => e.chart.backgroundColor
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5631
|
+
}) => e.chart.backgroundColor};
|
|
5632
|
+
`, $s = _.div`
|
|
5633
|
+
align-self: flex-start;
|
|
5634
|
+
`, qs = ({
|
|
5373
5635
|
summary: e,
|
|
5374
5636
|
nlgRequest: t
|
|
5375
5637
|
}) => {
|
|
5376
5638
|
const {
|
|
5377
5639
|
themeSettings: r
|
|
5378
5640
|
} = D();
|
|
5379
|
-
return /* @__PURE__ */ n(
|
|
5641
|
+
return /* @__PURE__ */ n(gt, {
|
|
5380
5642
|
sourceId: t.jaql.datasource.title,
|
|
5381
5643
|
data: t,
|
|
5382
5644
|
type: "chart/insights",
|
|
5383
5645
|
buttonVisibility: "always",
|
|
5384
|
-
renderContent: (a) => /* @__PURE__ */ v(
|
|
5646
|
+
renderContent: (a) => /* @__PURE__ */ v(Ws, {
|
|
5385
5647
|
theme: r,
|
|
5386
|
-
children: [/* @__PURE__ */ n(
|
|
5648
|
+
children: [/* @__PURE__ */ n($s, {
|
|
5387
5649
|
theme: r,
|
|
5388
|
-
children: /* @__PURE__ */ n(
|
|
5650
|
+
children: /* @__PURE__ */ n(Zs, {
|
|
5389
5651
|
theme: r
|
|
5390
5652
|
})
|
|
5391
|
-
}), /* @__PURE__ */ n(
|
|
5653
|
+
}), /* @__PURE__ */ n(Dt, {
|
|
5392
5654
|
text: e
|
|
5393
5655
|
}), a]
|
|
5394
5656
|
})
|
|
5395
5657
|
});
|
|
5396
|
-
},
|
|
5658
|
+
}, ed = ({
|
|
5397
5659
|
nlqResponse: e,
|
|
5398
5660
|
onDataReady: t,
|
|
5399
5661
|
styleOptions: r,
|
|
5400
5662
|
widgetProps: a,
|
|
5401
5663
|
filters: i = []
|
|
5402
5664
|
}) => {
|
|
5403
|
-
e.queryTitle =
|
|
5665
|
+
e.queryTitle = Ta(e.queryTitle);
|
|
5404
5666
|
const {
|
|
5405
5667
|
connectToWidgetProps: l
|
|
5406
|
-
} =
|
|
5668
|
+
} = Na({
|
|
5407
5669
|
initialFilters: i
|
|
5408
5670
|
}), [s, u] = R(null);
|
|
5409
|
-
|
|
5410
|
-
const p =
|
|
5671
|
+
ye(() => {
|
|
5672
|
+
const p = Ne(e, {
|
|
5411
5673
|
useCustomizedStyleOptions: !0
|
|
5412
5674
|
});
|
|
5413
5675
|
if (!p)
|
|
5414
5676
|
u(null);
|
|
5415
5677
|
else {
|
|
5416
|
-
r && p.styleOptions && (p.styleOptions =
|
|
5678
|
+
r && p.styleOptions && (p.styleOptions = We(p.styleOptions, r));
|
|
5417
5679
|
const d = l(p, {
|
|
5418
5680
|
shouldAffectFilters: !1,
|
|
5419
5681
|
applyMode: "filter"
|
|
@@ -5421,8 +5683,8 @@ const Zs = /* @__PURE__ */ C("div", {
|
|
|
5421
5683
|
u(d);
|
|
5422
5684
|
}
|
|
5423
5685
|
}, [e, l, r]);
|
|
5424
|
-
const c =
|
|
5425
|
-
const p = s && Ge(s) ?
|
|
5686
|
+
const c = q(() => {
|
|
5687
|
+
const p = s && Ge(s) ? ja(s == null ? void 0 : s.filters) : [], d = e.jaql.metadata.filter((m) => !m.jaql.filter).concat(p.filter((m) => !m.config.disabled).map((m) => m.jaql()));
|
|
5426
5688
|
return T(M({}, e), {
|
|
5427
5689
|
jaql: T(M({}, e.jaql), {
|
|
5428
5690
|
metadata: d
|
|
@@ -5433,23 +5695,23 @@ const Zs = /* @__PURE__ */ C("div", {
|
|
|
5433
5695
|
data: g,
|
|
5434
5696
|
isLoading: b,
|
|
5435
5697
|
isError: x
|
|
5436
|
-
} =
|
|
5698
|
+
} = Ve(c);
|
|
5437
5699
|
if (b || !s)
|
|
5438
|
-
return /* @__PURE__ */ n(
|
|
5700
|
+
return /* @__PURE__ */ n(vt, {});
|
|
5439
5701
|
if (!Ge(s))
|
|
5440
5702
|
return /* @__PURE__ */ n(Y, {});
|
|
5441
5703
|
const o = a || T(M({}, s), {
|
|
5442
5704
|
styleOptions: r,
|
|
5443
5705
|
onDataReady: t
|
|
5444
5706
|
});
|
|
5445
|
-
return /* @__PURE__ */ n(
|
|
5707
|
+
return /* @__PURE__ */ n(Ie, T(M({}, o), {
|
|
5446
5708
|
highlightSelectionDisabled: !0,
|
|
5447
5709
|
topSlot: g && !x && /* @__PURE__ */ n(qs, {
|
|
5448
5710
|
nlgRequest: c,
|
|
5449
5711
|
summary: g
|
|
5450
5712
|
})
|
|
5451
5713
|
}));
|
|
5452
|
-
}, Ps = new
|
|
5714
|
+
}, Ps = new er({
|
|
5453
5715
|
defaultOptions: {
|
|
5454
5716
|
queries: {
|
|
5455
5717
|
refetchOnWindowFocus: !1,
|
|
@@ -5457,14 +5719,14 @@ const Zs = /* @__PURE__ */ C("div", {
|
|
|
5457
5719
|
}
|
|
5458
5720
|
}
|
|
5459
5721
|
});
|
|
5460
|
-
function
|
|
5722
|
+
function td({
|
|
5461
5723
|
children: e,
|
|
5462
5724
|
context: t
|
|
5463
5725
|
}) {
|
|
5464
|
-
return /* @__PURE__ */ n(
|
|
5465
|
-
children: /* @__PURE__ */ n(
|
|
5726
|
+
return /* @__PURE__ */ n(yr, {
|
|
5727
|
+
children: /* @__PURE__ */ n(kt.Provider, {
|
|
5466
5728
|
value: t == null ? void 0 : t.api,
|
|
5467
|
-
children: /* @__PURE__ */ n(
|
|
5729
|
+
children: /* @__PURE__ */ n(nr, {
|
|
5468
5730
|
client: Ps,
|
|
5469
5731
|
children: e
|
|
5470
5732
|
})
|
|
@@ -5484,21 +5746,21 @@ function ed({
|
|
|
5484
5746
|
})();
|
|
5485
5747
|
export {
|
|
5486
5748
|
Ys as AiContextProvider,
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5749
|
+
xo as ChatRestApi,
|
|
5750
|
+
Xs as Chatbot,
|
|
5751
|
+
td as CustomAiContextProvider,
|
|
5752
|
+
Mo as DEFAULT_RECOMMENDATIONS_COUNT,
|
|
5753
|
+
Ks as GetNlgInsights,
|
|
5492
5754
|
Co as NLQ_RESULT_CHART_TYPES,
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5755
|
+
ed as NlqChartWidget,
|
|
5756
|
+
vo as executeGetNlqResult,
|
|
5757
|
+
wo as prepareGetNlgInsightsPayload,
|
|
5758
|
+
wr as prepareGetNlqResultPayload,
|
|
5759
|
+
Eo as useChatSession,
|
|
5760
|
+
Js as useFinalNlqResponse,
|
|
5761
|
+
Us as useGetNlgInsights,
|
|
5762
|
+
Qs as useGetNlqResult,
|
|
5763
|
+
Fs as useGetQueryRecommendations,
|
|
5764
|
+
Vs as useLastNlqResponse,
|
|
5503
5765
|
Hs as widgetComposer
|
|
5504
5766
|
};
|