@sisense/sdk-ui-vue 2.6.0 → 2.8.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 +34 -34
- package/dist/ai.js +1237 -1188
- package/dist/index.cjs +1 -1
- package/dist/index.js +210 -210
- package/dist/packages/sdk-ui-vue/src/components/widgets/widget.d.ts +4 -4
- package/dist/packages/sdk-ui-vue/src/helpers/setup-helper.d.ts +1 -1
- package/dist/{use-tracking-354e67c5.js → use-tracking-a39b9c1f.js} +49762 -47392
- package/dist/use-tracking-c034eb94.cjs +1060 -0
- package/package.json +2 -2
- package/dist/use-tracking-6e22d282.cjs +0 -1073
package/dist/ai.js
CHANGED
@@ -1,22 +1,30 @@
|
|
1
|
-
import { inject as
|
2
|
-
import { aC as
|
3
|
-
var
|
1
|
+
import { inject as sa, ref as Ut, defineComponent as st, watchEffect as Ft, provide as ca, watch as ct, toRefs as pt } from "vue";
|
2
|
+
import { aC as Vt, aD as He, aE as pa, aF as Be, aG as ua, aH as ga, aI as me, aJ as $t, aK as ha, aL as b, aM as Jt, aN as L, aO as n, aP as E, aQ as Y, aR as Fe, aS as Q, aT as Me, aU as N, aV as Xt, aW as ma, aX as ba, aY as se, aZ as fa, a_ as ke, a$ as Ve, b0 as ye, b1 as ut, b2 as xa, b3 as ka, b4 as ya, b5 as C, b6 as P, b7 as wa, b8 as Ct, b9 as Z, ba as We, bb as v, bc as Ie, bd as _a, be as Ca, bf as va, bg as Sa, bh as De, bi as ve, bj as Ma, bk as Ia, bl as Kt, bm as Da, bn as Aa, bo as La, bp as Ta, bq as er, br as Na, bs as ja, bt as Oa, bu as Ea, bv as za, bw as tr, bx as Ra, by as Za, bz as Wa, bA as vt, bB as Pa, bC as qa, bD as Ga, bE as Ha, bF as rr, bG as Ce, bH as ar, bI as rt, bJ as Ba, bK as $e, bL as Ya, bM as Qa, bN as Ua, bO as Fa, bP as Va, bQ as $a, bR as Ja, bS as Xa, ao as je, bT as ir, bU as Ka, bV as ei, bW as ti, bX as or, bY as nr, bZ as ri, b_ as ai, b$ as ii, J as oi, c0 as ni, a as lr, c1 as dr, K as gt, H as ht, L as mt, N as be, a4 as bt } from "./use-tracking-a39b9c1f.js";
|
3
|
+
var li = Object.defineProperty, di = Object.defineProperties, si = Object.getOwnPropertyDescriptors, Pe = Object.getOwnPropertySymbols, sr = Object.prototype.hasOwnProperty, cr = Object.prototype.propertyIsEnumerable, St = (e, t, r) => t in e ? li(e, t, {
|
4
4
|
enumerable: !0,
|
5
5
|
configurable: !0,
|
6
6
|
writable: !0,
|
7
7
|
value: r
|
8
|
-
}) : e[t] = r,
|
8
|
+
}) : e[t] = r, O = (e, t) => {
|
9
9
|
for (var r in t || (t = {}))
|
10
|
-
|
11
|
-
if (
|
12
|
-
for (var r of
|
13
|
-
|
10
|
+
sr.call(t, r) && St(e, r, t[r]);
|
11
|
+
if (Pe)
|
12
|
+
for (var r of Pe(t))
|
13
|
+
cr.call(t, r) && St(e, r, t[r]);
|
14
14
|
return e;
|
15
|
-
},
|
16
|
-
|
15
|
+
}, K = (e, t) => di(e, si(t)), ci = (e, t) => {
|
16
|
+
var r = {};
|
17
|
+
for (var a in e)
|
18
|
+
sr.call(e, a) && t.indexOf(a) < 0 && (r[a] = e[a]);
|
19
|
+
if (e != null && Pe)
|
20
|
+
for (var a of Pe(e))
|
21
|
+
t.indexOf(a) < 0 && cr.call(e, a) && (r[a] = e[a]);
|
22
|
+
return r;
|
23
|
+
};
|
24
|
+
let pr = class extends ar {
|
17
25
|
constructor(e, t) {
|
18
26
|
var r;
|
19
|
-
super((r = e.jaql.title) !== null && r !== void 0 ? r : "", t), this.__serializable = "JaqlElement", this.expression = e.jaql.dim || e.jaql.formula, this.metadataItem = e, e.jaql.agg ? this.aggregation = e.jaql.agg : delete this.aggregation, e.jaql.formula ? this.formula = e.jaql.formula : delete this.formula, e.jaql.sort ? this.sortType =
|
27
|
+
super((r = e.jaql.title) !== null && r !== void 0 ? r : "", t), this.__serializable = "JaqlElement", this.expression = e.jaql.dim || e.jaql.formula, this.metadataItem = e, e.jaql.agg ? this.aggregation = e.jaql.agg : delete this.aggregation, e.jaql.formula ? this.formula = e.jaql.formula : delete this.formula, e.jaql.sort ? this.sortType = Ua(e.jaql.sort) : delete this.sortType, this.skipValidation = !0;
|
20
28
|
}
|
21
29
|
get id() {
|
22
30
|
return this.expression;
|
@@ -32,23 +40,23 @@ let dr = class extends rr {
|
|
32
40
|
return e.metadataItem = this.metadataItem, e.type = this.type, e;
|
33
41
|
}
|
34
42
|
};
|
35
|
-
const
|
36
|
-
text:
|
37
|
-
numeric:
|
38
|
-
datetime:
|
43
|
+
const pi = {
|
44
|
+
text: Fe.TextAttribute,
|
45
|
+
numeric: Fe.NumericAttribute,
|
46
|
+
datetime: Fe.DateLevel
|
39
47
|
};
|
40
|
-
function
|
48
|
+
function ui(e) {
|
41
49
|
var t;
|
42
|
-
return new
|
50
|
+
return new pr(e, (t = pi[e.jaql.datatype]) !== null && t !== void 0 ? t : "numeric");
|
43
51
|
}
|
44
|
-
function
|
52
|
+
function ur(e) {
|
45
53
|
const {
|
46
54
|
jaql: t
|
47
55
|
} = e;
|
48
56
|
if (t.formula)
|
49
|
-
return
|
50
|
-
const r =
|
51
|
-
return "agg" in t && t.dim && t.datatype ?
|
57
|
+
return Fa(t);
|
58
|
+
const r = Va(t);
|
59
|
+
return "agg" in t && t.dim && t.datatype ? $a({
|
52
60
|
expression: t.dim,
|
53
61
|
dataType: t.datatype,
|
54
62
|
agg: t.agg || "",
|
@@ -57,7 +65,7 @@ function sr(e) {
|
|
57
65
|
sort: t.sort,
|
58
66
|
title: t.title,
|
59
67
|
dataSource: t.datasource
|
60
|
-
}) : t.dim && t.datatype ?
|
68
|
+
}) : t.dim && t.datatype ? Ja({
|
61
69
|
expression: t.dim,
|
62
70
|
dataType: t.datatype,
|
63
71
|
granularity: r,
|
@@ -65,36 +73,36 @@ function sr(e) {
|
|
65
73
|
title: t.title,
|
66
74
|
panel: e.panel,
|
67
75
|
dataSource: t.datasource
|
68
|
-
}) :
|
76
|
+
}) : ui(e);
|
69
77
|
}
|
70
|
-
const
|
71
|
-
function
|
78
|
+
const gi = (e) => "dashboardOid" in e && "widgetOid" in e;
|
79
|
+
function hi(e) {
|
72
80
|
return e.replace(/\s+/g, "-").replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
73
81
|
}
|
74
|
-
function
|
82
|
+
function mi(e) {
|
75
83
|
return !e || !e.jaql.datasource.title || !e.jaql.metadata.length;
|
76
84
|
}
|
77
|
-
function
|
78
|
-
if (![...
|
79
|
-
throw new
|
85
|
+
function gr(e) {
|
86
|
+
if (![...za, "pivot", "pivot2"].includes(e))
|
87
|
+
throw new ve("errors.chartTypeNotSupported", {
|
80
88
|
chartType: e
|
81
89
|
});
|
82
90
|
}
|
83
|
-
function
|
91
|
+
function bi(e) {
|
84
92
|
return "widgetType" in e && e.widgetType === "pivot";
|
85
93
|
}
|
86
|
-
function
|
94
|
+
function he(e) {
|
87
95
|
var t;
|
88
96
|
return "column" in e && ((t = e.column) == null ? void 0 : t.expression) && /\(.*\)/.test(e.column.expression);
|
89
97
|
}
|
90
|
-
function
|
98
|
+
function Mt(e) {
|
91
99
|
const t = "measures" in e && X(e.measures) || "values" in e && X(e.values);
|
92
|
-
return
|
100
|
+
return bi(e) ? "values" in e.dataOptions && X(e.dataOptions.values) : "chartType" in e ? e.chartType === "indicator" ? "value" in e.dataOptions && X(e.dataOptions.value) || "secondary" in e.dataOptions && X(e.dataOptions.secondary) : e.chartType === "table" ? !("columns" in e.dataOptions) || !X(e.dataOptions.columns) ? !1 : e.dataOptions.columns.some((r) => he(r)) : e.chartType === "boxplot" ? !1 : e.chartType === "scatter" ? "x" in e.dataOptions && e.dataOptions.x !== void 0 && he(e.dataOptions.x) || "y" in e.dataOptions && e.dataOptions.y !== void 0 && he(e.dataOptions.y) || "size" in e.dataOptions && e.dataOptions.size !== void 0 : e.chartType === "scattermap" ? "colorBy" in e.dataOptions && e.dataOptions.colorBy !== void 0 && he(e.dataOptions.colorBy) || "details" in e.dataOptions && e.dataOptions.details !== void 0 && he(e.dataOptions.details) || "size" in e.dataOptions && e.dataOptions.size !== void 0 && he(e.dataOptions.size) : e.chartType === "areamap" ? "geo" in e.dataOptions && X(e.dataOptions.geo) && "color" in e.dataOptions && X(e.dataOptions.color) : "value" in e.dataOptions && X(e.dataOptions.value) : t;
|
93
101
|
}
|
94
102
|
function X(e) {
|
95
103
|
return Array.isArray(e) && e.length > 0;
|
96
104
|
}
|
97
|
-
function
|
105
|
+
function fi(e) {
|
98
106
|
const t = e.split(`
|
99
107
|
`);
|
100
108
|
for (let r = 0; r < t.length - 1; r++)
|
@@ -108,7 +116,7 @@ function bi(e) {
|
|
108
116
|
return t.join(`
|
109
117
|
`);
|
110
118
|
}
|
111
|
-
function
|
119
|
+
function xi(e) {
|
112
120
|
const t = (a) => /^[$A-Z_][0-9A-Z_$]*$/i.test(a);
|
113
121
|
if ("composeCode" in e)
|
114
122
|
return e;
|
@@ -119,7 +127,7 @@ function fi(e) {
|
|
119
127
|
}
|
120
128
|
return r;
|
121
129
|
}
|
122
|
-
const
|
130
|
+
const ki = {
|
123
131
|
react: {
|
124
132
|
baseChartTmpl: `import { {{componentString}} } from '@sisense/sdk-ui';
|
125
133
|
{{extraImportsString}}
|
@@ -578,10 +586,10 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
|
|
578
586
|
</template>`,
|
579
587
|
dashboardTmpl: "/** COMING SOON */"
|
580
588
|
}
|
581
|
-
},
|
582
|
-
const a =
|
583
|
-
return
|
584
|
-
},
|
589
|
+
}, hr = (e, t) => ki[t][e].replace(/{{(.*?)Tmpl}}/g, (r, a) => hr(`${a}Tmpl`, t)), yi = (e, t) => e.replace(/{{(.*?)}}/g, (r, a) => a in t ? t[a] : (console.warn(`Placeholder ${a} not found in data`), r)), at = (e, t, r = "react") => {
|
590
|
+
const a = hr(e, r);
|
591
|
+
return fi(yi(a, t));
|
592
|
+
}, wi = () => Object.values(ti).map((e) => or.aggregationToJAQL(e)).join("|"), mr = (e) => {
|
585
593
|
const {
|
586
594
|
formula: t,
|
587
595
|
context: r,
|
@@ -595,31 +603,31 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
|
|
595
603
|
const l = i[0];
|
596
604
|
if (typeof l != "string")
|
597
605
|
return e;
|
598
|
-
const d = r[`${l}`], p =
|
606
|
+
const d = r[`${l}`], p = wi(), c = new RegExp(`^\\s*(${p})\\(\\[\\w+\\]\\)$`), g = t.match(c);
|
599
607
|
if (g && t.includes(l)) {
|
600
|
-
const
|
601
|
-
return
|
608
|
+
const f = g[1];
|
609
|
+
return O({
|
602
610
|
dim: d.dim,
|
603
611
|
table: d.table,
|
604
612
|
column: d.column,
|
605
613
|
datatype: d.datatype,
|
606
|
-
agg:
|
614
|
+
agg: f,
|
607
615
|
title: e.title
|
608
616
|
}, a ? {
|
609
|
-
filter:
|
617
|
+
filter: O({}, a)
|
610
618
|
} : {});
|
611
619
|
}
|
612
620
|
return e;
|
613
|
-
},
|
621
|
+
}, ze = (e) => {
|
614
622
|
let t = e;
|
615
|
-
if ("formula" in e && (t =
|
616
|
-
const r =
|
623
|
+
if ("formula" in e && (t = mr(e)), "context" in t) {
|
624
|
+
const r = O({}, t.context);
|
617
625
|
Object.keys(r).forEach((a) => {
|
618
|
-
r[`${a}`] =
|
626
|
+
r[`${a}`] = ze(r[`${a}`]);
|
619
627
|
}), t.context = r;
|
620
628
|
}
|
621
629
|
return t;
|
622
|
-
},
|
630
|
+
}, _i = (e) => {
|
623
631
|
var t;
|
624
632
|
const r = e;
|
625
633
|
if (r.panel !== "scope")
|
@@ -627,38 +635,38 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
|
|
627
635
|
const {
|
628
636
|
jaql: a
|
629
637
|
} = r;
|
630
|
-
return (t = a.filter) != null && t.by && (a.filter.by =
|
638
|
+
return (t = a.filter) != null && t.by && (a.filter.by = mr(a.filter.by)), K(O({}, r), {
|
631
639
|
jaql: a
|
632
640
|
});
|
633
|
-
},
|
641
|
+
}, Ci = (e) => {
|
634
642
|
let t = e;
|
635
|
-
t =
|
643
|
+
t = _i(t);
|
636
644
|
const {
|
637
645
|
jaql: r,
|
638
646
|
measure: a,
|
639
647
|
by: i
|
640
648
|
} = t;
|
641
|
-
return
|
642
|
-
jaql:
|
649
|
+
return O(O(K(O({}, t), {
|
650
|
+
jaql: ze(r)
|
643
651
|
}), i ? {
|
644
|
-
by:
|
652
|
+
by: ze(i)
|
645
653
|
} : {}), a ? {
|
646
|
-
measure:
|
654
|
+
measure: ze(a)
|
647
655
|
} : {});
|
648
|
-
},
|
649
|
-
`,
|
656
|
+
}, Re = 6, Oe = `
|
657
|
+
`, it = "UNKNOWN", vi = (e, t) => {
|
650
658
|
let r = "";
|
651
659
|
return r += `measureFactory.customFormula(
|
652
|
-
`, r += " ".repeat(t), r += ` '${
|
660
|
+
`, r += " ".repeat(t), r += ` '${Ce(e.title)}',
|
653
661
|
`, r += " ".repeat(t), r += ` '${e.formula}',
|
654
662
|
`, r += " ".repeat(t), r += ` {
|
655
663
|
`, Object.entries(e.context).forEach(([a, i]) => {
|
656
|
-
const l =
|
664
|
+
const l = nr(i.table || it, i.column || it, void 0, "DM");
|
657
665
|
r += " ".repeat(t), r += ` '${a.slice(1, -1)}': ${l},
|
658
666
|
`;
|
659
667
|
}), r += " ".repeat(t), r += ` }
|
660
668
|
`, r += " ".repeat(t), r += ")", r;
|
661
|
-
},
|
669
|
+
}, Si = (e) => {
|
662
670
|
const {
|
663
671
|
level: t,
|
664
672
|
table: r,
|
@@ -667,113 +675,113 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
|
|
667
675
|
title: l
|
668
676
|
} = e;
|
669
677
|
let d;
|
670
|
-
return r && a && (d =
|
671
|
-
},
|
678
|
+
return r && a && (d = nr(r, a, t, "DM")), i && r && a && l && (d = `measureFactory.${or.aggregationFromJAQL(i)}(${d}, '${Ce(l)}')`), d || it;
|
679
|
+
}, Mi = (e, t) => {
|
672
680
|
const r = e.jaql(!1).jaql;
|
673
|
-
return "formula" in r ?
|
674
|
-
},
|
681
|
+
return "formula" in r ? vi(r, t) : Si(r);
|
682
|
+
}, te = (e, t = 0, r = !1) => {
|
675
683
|
if (!e)
|
676
684
|
return "";
|
677
685
|
if (typeof e == "string")
|
678
|
-
return `'${
|
679
|
-
if (e instanceof
|
680
|
-
return
|
681
|
-
if (e instanceof
|
686
|
+
return `'${Ce(e)}'`;
|
687
|
+
if (e instanceof pr)
|
688
|
+
return Mi(e, t);
|
689
|
+
if (e instanceof ar)
|
682
690
|
return e.composeCode || "";
|
683
691
|
let a = "";
|
684
|
-
return Array.isArray(e) ? a += `[${e.map((i) =>
|
685
|
-
if (r && typeof i == "string" && (i = `'${
|
686
|
-
a += `${i}: [${l.map((d) =>
|
692
|
+
return Array.isArray(e) ? a += `[${e.map((i) => te(i, t + 2))}${e.length ? Oe + " ".repeat(t + 2) : ""}]` : (a += `{${Oe}`, Object.entries(e).forEach(([i, l]) => {
|
693
|
+
if (r && typeof i == "string" && (i = `'${Ce(i)}'`), a += " ".repeat(t + 2), Array.isArray(l))
|
694
|
+
a += `${i}: [${l.map((d) => te(d, t + 4, r))}${l.length ? Oe + " ".repeat(t + 2) : ""}]`;
|
687
695
|
else if (typeof l == "object" && l !== null) {
|
688
|
-
const d = Array.isArray(l) ? l :
|
689
|
-
a += `${i}: ${
|
696
|
+
const d = Array.isArray(l) ? l : xi(l);
|
697
|
+
a += `${i}: ${te(d, t + 2, r)}`;
|
690
698
|
} else
|
691
|
-
["number", "boolean", "undefined"].includes(typeof l) || l === null ? a += `${i}: ${l}` : typeof l == "string" ? a += `${i}: '${
|
692
|
-
a += `,${
|
699
|
+
["number", "boolean", "undefined"].includes(typeof l) || l === null ? a += `${i}: ${l}` : typeof l == "string" ? a += `${i}: '${Ce(l)}'` : a += `${i}: ${l}`;
|
700
|
+
a += `,${Oe}`;
|
693
701
|
}), a += " ".repeat(t), a += "}"), a;
|
694
702
|
};
|
695
|
-
function
|
696
|
-
return
|
703
|
+
function Ii(e) {
|
704
|
+
return te(e, Re);
|
697
705
|
}
|
698
|
-
function
|
706
|
+
function It(e, t = "data-source-placeholder") {
|
699
707
|
if (!e)
|
700
708
|
return t;
|
701
709
|
const r = typeof e == "object" && "title" in e ? e.title : e;
|
702
|
-
return
|
710
|
+
return hi(r);
|
703
711
|
}
|
704
|
-
function
|
712
|
+
function Dt(e, t = !0) {
|
705
713
|
const r = [];
|
706
714
|
return t && r.push("measureFactory"), X(e) && r.push("filterFactory"), r.length > 0 ? `import { ${r.join(", ")} } from '@sisense/sdk-data';` : "";
|
707
715
|
}
|
708
|
-
const
|
709
|
-
`,
|
716
|
+
const At = `
|
717
|
+
`, Di = (e, t) => {
|
710
718
|
if (e.composeCode)
|
711
|
-
return `${
|
719
|
+
return `${At}${" ".repeat(t)}${e.composeCode}`;
|
712
720
|
const r = e.jaql().jaql;
|
713
|
-
return `${
|
714
|
-
},
|
721
|
+
return `${At}${" ".repeat(t)}filterFactory.customFilter(${te(r, t, !0)})`;
|
722
|
+
}, Ai = (e, t = 0) => {
|
715
723
|
if (!e)
|
716
724
|
return "";
|
717
725
|
let r = "";
|
718
|
-
return r += `[${e.map((a) =>
|
726
|
+
return r += `[${e.map((a) => Di(a, t + 2))}${e.length ? `
|
719
727
|
` + " ".repeat(t + 2) : ""}]`, r;
|
720
|
-
},
|
728
|
+
}, Lt = (e) => e ? Array.isArray(e) ? Ai(e, 6) : "/** Filter relations not supported yet */" : "[]", Li = ["executeQueryByWidgetIdTmpl", "widgetByIdTmpl"], Ti = "chartWidgetTmpl", Ni = "pivotTableWidgetTmpl", ji = (e) => e, Oi = ({
|
721
729
|
dashboardOid: e,
|
722
730
|
widgetOid: t,
|
723
731
|
uiFramework: r = "react",
|
724
732
|
chartType: a = "table",
|
725
733
|
includeChart: i = !0
|
726
734
|
}) => {
|
727
|
-
|
735
|
+
gr(a);
|
728
736
|
const l = {
|
729
737
|
dashboardOid: e,
|
730
738
|
widgetOid: t
|
731
|
-
}, d =
|
732
|
-
return
|
733
|
-
},
|
734
|
-
if (
|
735
|
-
|
736
|
-
const a =
|
739
|
+
}, d = Li[Number(i)];
|
740
|
+
return at(d, l, r);
|
741
|
+
}, Ei = (e, t, r) => {
|
742
|
+
if (tr(e)) {
|
743
|
+
gr(e.chartType);
|
744
|
+
const a = Mt(e), i = {
|
737
745
|
idString: e.id,
|
738
746
|
widgetTypeString: "chart",
|
739
747
|
titleString: e.title,
|
740
|
-
dataSourceString:
|
741
|
-
chartTypeString:
|
742
|
-
dataOptionsString:
|
743
|
-
filtersString:
|
748
|
+
dataSourceString: It(e.dataSource),
|
749
|
+
chartTypeString: ji(e.chartType),
|
750
|
+
dataOptionsString: Ii(e.dataOptions),
|
751
|
+
filtersString: Lt(e.filters),
|
744
752
|
componentString: "ChartWidget",
|
745
|
-
extraImportsString:
|
746
|
-
styleOptionsString:
|
747
|
-
drilldownOptionsString:
|
753
|
+
extraImportsString: Dt(e.filters || [], a),
|
754
|
+
styleOptionsString: te(e.styleOptions || {}, Re),
|
755
|
+
drilldownOptionsString: te(e.drilldownOptions || {}, Re)
|
748
756
|
};
|
749
|
-
return
|
757
|
+
return at(r.chart, i, t);
|
750
758
|
}
|
751
|
-
if (
|
752
|
-
const a =
|
759
|
+
if (Ra(e)) {
|
760
|
+
const a = Mt(e), i = {
|
753
761
|
idString: e.id,
|
754
762
|
widgetTypeString: "pivot",
|
755
763
|
titleString: e.title,
|
756
|
-
dataSourceString:
|
757
|
-
dataOptionsString:
|
758
|
-
filtersString:
|
764
|
+
dataSourceString: It(e.dataSource),
|
765
|
+
dataOptionsString: te(e.dataOptions),
|
766
|
+
filtersString: Lt(e.filters),
|
759
767
|
componentString: "PivotTableWidget",
|
760
|
-
extraImportsString:
|
761
|
-
styleOptionsString:
|
768
|
+
extraImportsString: Dt(e.filters || [], a),
|
769
|
+
styleOptionsString: te(e.styleOptions || {}, Re)
|
762
770
|
};
|
763
|
-
return
|
771
|
+
return at(r.pivot, i, t);
|
764
772
|
}
|
765
|
-
if (
|
773
|
+
if (Za(e))
|
766
774
|
return "/** Custom widget code not supported yet */";
|
767
|
-
throw new
|
768
|
-
},
|
775
|
+
throw new ve("errors.otherWidgetTypesNotSupported");
|
776
|
+
}, zi = ({
|
769
777
|
widgetProps: e,
|
770
778
|
uiFramework: t = "react"
|
771
|
-
}) =>
|
772
|
-
chart:
|
773
|
-
pivot:
|
774
|
-
}),
|
779
|
+
}) => Ei(e, t, {
|
780
|
+
chart: Ti,
|
781
|
+
pivot: Ni
|
782
|
+
}), Ri = (e) => ({
|
775
783
|
dataOptions: {
|
776
|
-
columns: e.map(
|
784
|
+
columns: e.map(ur)
|
777
785
|
}
|
778
786
|
}), Zi = Object.freeze({
|
779
787
|
convolution: {
|
@@ -796,17 +804,17 @@ const Dt = `
|
|
796
804
|
xAxis: {
|
797
805
|
gridLines: !1
|
798
806
|
}
|
799
|
-
}),
|
807
|
+
}), Tt = Object.freeze({
|
800
808
|
line: "line/spline",
|
801
809
|
pie: "pie/donut",
|
802
810
|
bar: "bar/stacked",
|
803
811
|
column: "column/stackedcolumn"
|
804
|
-
}),
|
812
|
+
}), Wi = (e, t, r) => {
|
805
813
|
const a = e.reduce((l, d) => (l[d.jaql.title] = d, l), {}), i = Object.entries(r).reduce((l, d) => {
|
806
814
|
const [p, c] = d;
|
807
815
|
return l[`${p}`] = Array.isArray(c) ? c.map((g) => {
|
808
|
-
var
|
809
|
-
const o =
|
816
|
+
var f, x;
|
817
|
+
const o = rt(g);
|
810
818
|
delete o.enabled;
|
811
819
|
const u = a[o.column.name];
|
812
820
|
if (!u)
|
@@ -816,33 +824,33 @@ const Dt = `
|
|
816
824
|
name: o.column.name
|
817
825
|
}
|
818
826
|
};
|
819
|
-
const s =
|
827
|
+
const s = ur(u);
|
820
828
|
if (u.panel === "measures")
|
821
|
-
return
|
829
|
+
return K(O({}, o), {
|
822
830
|
column: s
|
823
831
|
});
|
824
|
-
if (
|
825
|
-
const
|
826
|
-
if (
|
827
|
-
return
|
832
|
+
if (Ba(s.type)) {
|
833
|
+
const m = (x = (f = u.format) == null ? void 0 : f.mask) == null ? void 0 : x[u.jaql.level];
|
834
|
+
if (m)
|
835
|
+
return K(O({}, o), {
|
828
836
|
column: s,
|
829
|
-
dateFormat:
|
837
|
+
dateFormat: m
|
830
838
|
});
|
831
839
|
}
|
832
|
-
return
|
840
|
+
return K(O({}, o), {
|
833
841
|
column: s
|
834
842
|
});
|
835
843
|
}) : c, l;
|
836
844
|
}, {});
|
837
845
|
switch (t) {
|
838
846
|
case "cartesian":
|
839
|
-
return
|
847
|
+
return O({
|
840
848
|
category: [],
|
841
849
|
value: [],
|
842
850
|
breakBy: []
|
843
851
|
}, i);
|
844
852
|
case "categorical":
|
845
|
-
return
|
853
|
+
return O({
|
846
854
|
category: [],
|
847
855
|
value: []
|
848
856
|
}, i);
|
@@ -855,20 +863,20 @@ const Dt = `
|
|
855
863
|
l !== "geo" && (i[`${l}`] = i[`${l}`][0]);
|
856
864
|
}), i;
|
857
865
|
case "table":
|
858
|
-
return Object.keys(i).length === 0 ?
|
866
|
+
return Object.keys(i).length === 0 ? Ri(e).dataOptions : i;
|
859
867
|
case "boxplot":
|
860
868
|
case "areamap":
|
861
869
|
case "indicator":
|
862
870
|
default:
|
863
871
|
return i;
|
864
872
|
}
|
865
|
-
},
|
873
|
+
}, Nt = (e, t) => {
|
866
874
|
var r, a, i, l;
|
867
|
-
return t === "x" ? (a = (r = e.category) != null ? r : e.x) == null ? void 0 : a.map((d) =>
|
868
|
-
},
|
875
|
+
return t === "x" ? (a = (r = e.category) != null ? r : e.x) == null ? void 0 : a.map((d) => rt(d).column.name).join(", ") : (l = (i = e.value) != null ? i : e.y) == null ? void 0 : l.map((d) => rt(d).column.name).join(", ");
|
876
|
+
}, Pi = (e, t, r, a) => {
|
869
877
|
let i;
|
870
|
-
return a && e in
|
871
|
-
subtype:
|
878
|
+
return a && e in Tt ? i = $e($e(Zi, {
|
879
|
+
subtype: Tt[`${e}`]
|
872
880
|
}), {
|
873
881
|
legend: {
|
874
882
|
enabled: !0,
|
@@ -877,42 +885,76 @@ const Dt = `
|
|
877
885
|
yAxis: {
|
878
886
|
title: {
|
879
887
|
enabled: !0,
|
880
|
-
text:
|
888
|
+
text: Nt(t, "y")
|
881
889
|
}
|
882
890
|
},
|
883
891
|
xAxis: {
|
884
892
|
title: {
|
885
893
|
enabled: !0,
|
886
|
-
text:
|
894
|
+
text: Nt(t, "x")
|
887
895
|
}
|
888
896
|
}
|
889
|
-
}, r) : i =
|
890
|
-
},
|
897
|
+
}, r) : i = $e(Ya(), r), i;
|
898
|
+
}, qi = (e, t, r = !0) => {
|
891
899
|
const {
|
892
900
|
chartFamily: a,
|
893
901
|
chartType: i,
|
894
902
|
axesMapping: l = {},
|
895
903
|
styleOptions: d = {}
|
896
|
-
} = t, p =
|
904
|
+
} = t, p = Wi(e, a, l), c = Pi(i, l, d, r);
|
897
905
|
return {
|
898
906
|
dataOptions: p,
|
899
907
|
chartStyleOptions: c
|
900
908
|
};
|
901
|
-
}
|
909
|
+
};
|
910
|
+
function Gi(e) {
|
911
|
+
return !!(e && (e.top !== void 0 || e.bottom !== void 0));
|
912
|
+
}
|
913
|
+
const Hi = (e) => {
|
914
|
+
const t = e.find((r) => r.panel === "rows");
|
915
|
+
return t ? e.map((r) => {
|
916
|
+
const a = r.jaql.filter;
|
917
|
+
if (!(r.panel === "scope" && Gi(a) && a.by === void 0))
|
918
|
+
return r;
|
919
|
+
const i = r.jaql, {
|
920
|
+
type: l,
|
921
|
+
context: d,
|
922
|
+
formula: p,
|
923
|
+
filter: c
|
924
|
+
} = i, g = ci(i, ["type", "context", "formula", "filter"]);
|
925
|
+
return K(O({}, r), {
|
926
|
+
jaql: O({
|
927
|
+
// Copy dimension properties from rows dimension
|
928
|
+
dim: t.jaql.dim,
|
929
|
+
table: t.jaql.table,
|
930
|
+
column: t.jaql.column,
|
931
|
+
datatype: t.jaql.datatype,
|
932
|
+
// Keep the filter but add the by clause
|
933
|
+
filter: K(O({}, c), {
|
934
|
+
by: {
|
935
|
+
type: l,
|
936
|
+
context: d,
|
937
|
+
formula: p
|
938
|
+
}
|
939
|
+
})
|
940
|
+
}, g)
|
941
|
+
});
|
942
|
+
}) : e;
|
943
|
+
}, Bi = (e) => "chartType" in e ? e : {
|
902
944
|
chartType: "table",
|
903
945
|
chartFamily: "table",
|
904
946
|
axesMapping: {}
|
905
|
-
},
|
906
|
-
if ((r.panel === "scope" || r.jaql.filter) && t.metadataFilters.push(
|
907
|
-
const a =
|
947
|
+
}, Yi = (e) => e.map((t) => Wa(t.jaql)), Qi = (e) => e.reduce((t, r) => {
|
948
|
+
if ((r.panel === "scope" || r.jaql.filter) && t.metadataFilters.push(vt(r)), r.panel !== "scope") {
|
949
|
+
const a = vt(r);
|
908
950
|
delete a.jaql.filter, t.metadataColumns.push(a);
|
909
951
|
}
|
910
952
|
return t;
|
911
953
|
}, {
|
912
954
|
metadataColumns: [],
|
913
955
|
metadataFilters: []
|
914
|
-
}),
|
915
|
-
if (!
|
956
|
+
}), Ui = (e, t) => {
|
957
|
+
if (!mi(e))
|
916
958
|
try {
|
917
959
|
const {
|
918
960
|
useCustomizedStyleOptions: r = !1
|
@@ -923,13 +965,13 @@ const Dt = `
|
|
923
965
|
} = e, {
|
924
966
|
metadata: d,
|
925
967
|
datasource: p
|
926
|
-
} = a, c =
|
968
|
+
} = a, c = K(O({}, p), {
|
927
969
|
type: p.type || "elasticube"
|
928
|
-
}), g =
|
929
|
-
jaql:
|
970
|
+
}), g = Aa(c), f = Hi(d).map((M) => Ci(M)).map((M) => K(O({}, M), {
|
971
|
+
jaql: K(O({}, M.jaql), {
|
930
972
|
datasource: g
|
931
973
|
})
|
932
|
-
})),
|
974
|
+
})), x = Bi(i), o = x.chartType.toLowerCase(), u = {
|
933
975
|
cornerRadius: "Small",
|
934
976
|
header: {
|
935
977
|
// remove info button and render empty toolbar instead
|
@@ -937,11 +979,11 @@ const Dt = `
|
|
937
979
|
}
|
938
980
|
}, {
|
939
981
|
metadataColumns: s,
|
940
|
-
metadataFilters:
|
941
|
-
} =
|
982
|
+
metadataFilters: m
|
983
|
+
} = Qi(f), h = Yi(m), {
|
942
984
|
dataOptions: w,
|
943
985
|
chartStyleOptions: _
|
944
|
-
} =
|
986
|
+
} = qi(s, x, r), y = O(O({}, _), u);
|
945
987
|
return {
|
946
988
|
widgetType: "chart",
|
947
989
|
id: l,
|
@@ -949,41 +991,41 @@ const Dt = `
|
|
949
991
|
chartType: o,
|
950
992
|
dataSource: c,
|
951
993
|
dataOptions: w,
|
952
|
-
filters:
|
994
|
+
filters: h,
|
953
995
|
styleOptions: y
|
954
996
|
};
|
955
997
|
} catch (r) {
|
956
998
|
console.error(r);
|
957
999
|
return;
|
958
1000
|
}
|
959
|
-
},
|
1001
|
+
}, ft = (e, t) => Ui(e, t), Fi = (e) => gi(e) ? Oi(e) : zi(e), br = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
960
1002
|
__proto__: null,
|
961
|
-
toWidgetCode:
|
962
|
-
toWidgetProps:
|
1003
|
+
toWidgetCode: Fi,
|
1004
|
+
toWidgetProps: ft
|
963
1005
|
}, Symbol.toStringTag, {
|
964
1006
|
value: "Module"
|
965
1007
|
}));
|
966
|
-
var
|
1008
|
+
var Vi = Object.defineProperty, $i = Object.defineProperties, Ji = Object.getOwnPropertyDescriptors, qe = Object.getOwnPropertySymbols, fr = Object.prototype.hasOwnProperty, xr = Object.prototype.propertyIsEnumerable, jt = (e, t, r) => t in e ? Vi(e, t, {
|
967
1009
|
enumerable: !0,
|
968
1010
|
configurable: !0,
|
969
1011
|
writable: !0,
|
970
1012
|
value: r
|
971
1013
|
}) : e[t] = r, I = (e, t) => {
|
972
1014
|
for (var r in t || (t = {}))
|
973
|
-
|
974
|
-
if (
|
975
|
-
for (var r of
|
976
|
-
|
1015
|
+
fr.call(t, r) && jt(e, r, t[r]);
|
1016
|
+
if (qe)
|
1017
|
+
for (var r of qe(t))
|
1018
|
+
xr.call(t, r) && jt(e, r, t[r]);
|
977
1019
|
return e;
|
978
|
-
}, j = (e, t) =>
|
1020
|
+
}, j = (e, t) => $i(e, Ji(t)), Xi = (e, t) => {
|
979
1021
|
var r = {};
|
980
1022
|
for (var a in e)
|
981
|
-
|
982
|
-
if (e != null &&
|
983
|
-
for (var a of
|
984
|
-
t.indexOf(a) < 0 &&
|
1023
|
+
fr.call(e, a) && t.indexOf(a) < 0 && (r[a] = e[a]);
|
1024
|
+
if (e != null && qe)
|
1025
|
+
for (var a of qe(e))
|
1026
|
+
t.indexOf(a) < 0 && xr.call(e, a) && (r[a] = e[a]);
|
985
1027
|
return r;
|
986
|
-
},
|
1028
|
+
}, ce = (e, t, r) => new Promise((a, i) => {
|
987
1029
|
var l = (c) => {
|
988
1030
|
try {
|
989
1031
|
p(r.next(c));
|
@@ -999,7 +1041,7 @@ var Qi = Object.defineProperty, Ui = Object.defineProperties, Fi = Object.getOwn
|
|
999
1041
|
}, p = (c) => c.done ? a(c.value) : Promise.resolve(c.value).then(l, d);
|
1000
1042
|
p((r = r.apply(e, t)).next());
|
1001
1043
|
});
|
1002
|
-
class
|
1044
|
+
class Ki extends Pa {
|
1003
1045
|
constructor(t, r) {
|
1004
1046
|
super(), this.client = t, this.setOptions(r), this.bindMethods(), this.updateResult();
|
1005
1047
|
}
|
@@ -1009,7 +1051,7 @@ class $i extends Ra {
|
|
1009
1051
|
setOptions(t) {
|
1010
1052
|
var r;
|
1011
1053
|
const a = this.options;
|
1012
|
-
this.options = this.client.defaultMutationOptions(t),
|
1054
|
+
this.options = this.client.defaultMutationOptions(t), qa(a, this.options) || this.client.getMutationCache().notify({
|
1013
1055
|
type: "observerOptionsUpdated",
|
1014
1056
|
mutation: this.currentMutation,
|
1015
1057
|
observer: this
|
@@ -1042,18 +1084,19 @@ class $i extends Ra {
|
|
1042
1084
|
})), this.currentMutation.addObserver(this), this.currentMutation.execute();
|
1043
1085
|
}
|
1044
1086
|
updateResult() {
|
1045
|
-
const t = this.currentMutation ? this.currentMutation.state :
|
1046
|
-
isLoading:
|
1087
|
+
const t = this.currentMutation ? this.currentMutation.state : Ga(), r = t.status === "loading", a = j(I({}, t), {
|
1088
|
+
isLoading: r,
|
1089
|
+
isPending: r,
|
1047
1090
|
isSuccess: t.status === "success",
|
1048
1091
|
isError: t.status === "error",
|
1049
1092
|
isIdle: t.status === "idle",
|
1050
1093
|
mutate: this.mutate,
|
1051
1094
|
reset: this.reset
|
1052
1095
|
});
|
1053
|
-
this.currentResult =
|
1096
|
+
this.currentResult = a;
|
1054
1097
|
}
|
1055
1098
|
notify(t) {
|
1056
|
-
|
1099
|
+
er.batch(() => {
|
1057
1100
|
if (this.mutateOptions && this.hasListeners()) {
|
1058
1101
|
if (t.onSuccess) {
|
1059
1102
|
var r, a, i, l;
|
@@ -1064,39 +1107,39 @@ class $i extends Ra {
|
|
1064
1107
|
}
|
1065
1108
|
}
|
1066
1109
|
t.listeners && this.listeners.forEach(({
|
1067
|
-
listener:
|
1110
|
+
listener: f
|
1068
1111
|
}) => {
|
1069
|
-
|
1112
|
+
f(this.currentResult);
|
1070
1113
|
});
|
1071
1114
|
});
|
1072
1115
|
}
|
1073
1116
|
}
|
1074
|
-
function
|
1075
|
-
const a =
|
1117
|
+
function xt(e, t, r) {
|
1118
|
+
const a = La(e, t), i = Ie({
|
1076
1119
|
context: a.context
|
1077
|
-
}), [l] =
|
1078
|
-
|
1120
|
+
}), [l] = Z(() => new Ki(i, a));
|
1121
|
+
De(() => {
|
1079
1122
|
l.setOptions(a);
|
1080
1123
|
}, [l, a]);
|
1081
|
-
const d =
|
1082
|
-
l.mutate(c, g).catch(
|
1124
|
+
const d = Ta(N((c) => l.subscribe(er.batchCalls(c)), [l]), () => l.getCurrentResult(), () => l.getCurrentResult()), p = N((c, g) => {
|
1125
|
+
l.mutate(c, g).catch(eo);
|
1083
1126
|
}, [l]);
|
1084
|
-
if (d.error &&
|
1127
|
+
if (d.error && Na(l.options.useErrorBoundary, [d.error]))
|
1085
1128
|
throw d.error;
|
1086
1129
|
return j(I({}, d), {
|
1087
1130
|
mutate: p,
|
1088
1131
|
mutateAsync: d.mutate
|
1089
1132
|
});
|
1090
1133
|
}
|
1091
|
-
function
|
1134
|
+
function eo() {
|
1092
1135
|
}
|
1093
|
-
class
|
1136
|
+
class Ot {
|
1094
1137
|
constructor(t, r = !1) {
|
1095
|
-
this.volatile = r, this.getChatContexts = () =>
|
1138
|
+
this.volatile = r, this.getChatContexts = () => ce(this, null, function* () {
|
1096
1139
|
return (yield this.httpClient.get("api/datasources//")) || [];
|
1097
|
-
}), this.getNlgInsights = (a) => this.httpClient.post("api/v2/ai/nlg/queryResult", a), this.getQueryRecommendations = (a, i) => this.httpClient.get(`api/v2/ai/recommendations/query/${a}/${i.numOfRecommendations}`), this.getNlqResult = (a, i) => this.httpClient.post(`api/v2/ai/nlq/query/${a}`, i), this.setLlmConfig = (a) => this.httpClient.post("api/v2/settings/ai/llmProvider", a).catch((i) => {
|
1140
|
+
}), this.getNlgInsights = (a) => this.httpClient.post("api/v2/ai/nlg/queryResult", a), this.getQueryRecommendations = (a, i) => this.httpClient.get(`api/v2/ai/recommendations/query/${a}/${i.numOfRecommendations}${i.userPrompt ? "?userPrompt=" + encodeURIComponent(i.userPrompt) : ""}`), this.getNlqResult = (a, i) => this.httpClient.post(`api/v2/ai/nlq/query/${a}`, i), this.setLlmConfig = (a) => this.httpClient.post("api/v2/settings/ai/llmProvider", a).catch((i) => {
|
1098
1141
|
console.error("Unable to set llm config", i);
|
1099
|
-
}), this.getAllChats = () =>
|
1142
|
+
}), this.getAllChats = () => ce(this, null, function* () {
|
1100
1143
|
return this.volatile ? [] : this.httpClient.get("api/v2/ai/chats");
|
1101
1144
|
}), this.getChatById = (a) => this.httpClient.get(`api/v2/ai/chats/${a}`), this.createChat = (a, i) => this.httpClient.post("api/v2/ai/chats", {
|
1102
1145
|
sourceId: a,
|
@@ -1118,7 +1161,7 @@ class jt {
|
|
1118
1161
|
}, this.httpClient = t;
|
1119
1162
|
}
|
1120
1163
|
}
|
1121
|
-
new
|
1164
|
+
new Vt({
|
1122
1165
|
defaultOptions: {
|
1123
1166
|
queries: {
|
1124
1167
|
refetchOnWindowFocus: !1,
|
@@ -1126,18 +1169,18 @@ new Ft({
|
|
1126
1169
|
}
|
1127
1170
|
}
|
1128
1171
|
});
|
1129
|
-
const
|
1172
|
+
const kr = /* @__PURE__ */ He(void 0), re = () => ut(kr), yr = /* @__PURE__ */ He({}), to = () => ut(yr), ro = ({
|
1130
1173
|
children: e
|
1131
1174
|
}) => {
|
1132
|
-
const [t, r] =
|
1175
|
+
const [t, r] = Z({}), a = N((d, p) => {
|
1133
1176
|
var c;
|
1134
1177
|
return `${d}_${(c = p == null ? void 0 : p.dashboardId) != null ? c : ""}`;
|
1135
|
-
}, []), i =
|
1178
|
+
}, []), i = N((d, p, c) => {
|
1136
1179
|
r((g) => j(I({}, g), {
|
1137
1180
|
[a(p, c)]: d
|
1138
1181
|
}));
|
1139
|
-
}, [a]), l =
|
1140
|
-
return /* @__PURE__ */ n(
|
1182
|
+
}, [a]), l = N((d, p) => t[a(d, p)], [t, a]);
|
1183
|
+
return /* @__PURE__ */ n(yr.Provider, {
|
1141
1184
|
value: {
|
1142
1185
|
saveChatId: i,
|
1143
1186
|
getChatId: l
|
@@ -1145,18 +1188,18 @@ const br = /* @__PURE__ */ Ge(void 0), te = () => ct(br), fr = /* @__PURE__ */ G
|
|
1145
1188
|
children: e
|
1146
1189
|
});
|
1147
1190
|
};
|
1148
|
-
function
|
1191
|
+
function wr(e) {
|
1149
1192
|
var t, r;
|
1150
1193
|
if ("jaql" in e)
|
1151
1194
|
return e;
|
1152
1195
|
{
|
1153
|
-
const a =
|
1196
|
+
const a = xa(e.dataSource), {
|
1154
1197
|
filters: i = [],
|
1155
1198
|
relations: l
|
1156
|
-
} =
|
1199
|
+
} = ka(e.filters), {
|
1157
1200
|
metadata: d,
|
1158
1201
|
filterRelations: p
|
1159
|
-
} =
|
1202
|
+
} = ya({
|
1160
1203
|
dataSource: e.dataSource,
|
1161
1204
|
attributes: (t = e.dimensions) != null ? t : [],
|
1162
1205
|
measures: (r = e.measures) != null ? r : [],
|
@@ -1173,20 +1216,20 @@ function xr(e) {
|
|
1173
1216
|
return e.verbosity && (c.verbosity = e.verbosity), c;
|
1174
1217
|
}
|
1175
1218
|
}
|
1176
|
-
const
|
1177
|
-
const r =
|
1219
|
+
const _r = (e, t = !0) => {
|
1220
|
+
const r = Q(() => wr(e), [e]), a = re(), {
|
1178
1221
|
data: i,
|
1179
1222
|
error: l,
|
1180
1223
|
isError: d,
|
1181
1224
|
isLoading: p,
|
1182
1225
|
isSuccess: c,
|
1183
1226
|
refetch: g
|
1184
|
-
} =
|
1227
|
+
} = Me({
|
1185
1228
|
queryKey: ["getNlgInsights", r, a],
|
1186
1229
|
queryFn: () => a == null ? void 0 : a.ai.getNlgInsights(r),
|
1187
|
-
select: (
|
1188
|
-
var
|
1189
|
-
return (
|
1230
|
+
select: (f) => {
|
1231
|
+
var x;
|
1232
|
+
return (x = f == null ? void 0 : f.data) == null ? void 0 : x.answer;
|
1190
1233
|
},
|
1191
1234
|
enabled: !!a && t
|
1192
1235
|
});
|
@@ -1196,12 +1239,12 @@ const kr = (e, t = !0) => {
|
|
1196
1239
|
isSuccess: c,
|
1197
1240
|
data: i,
|
1198
1241
|
error: l,
|
1199
|
-
refetch:
|
1242
|
+
refetch: N(() => {
|
1200
1243
|
g();
|
1201
1244
|
}, [g])
|
1202
1245
|
};
|
1203
|
-
},
|
1204
|
-
function
|
1246
|
+
}, ao = ["indicator", "column", "line", "table", "pie", "bar"];
|
1247
|
+
function io(e) {
|
1205
1248
|
const {
|
1206
1249
|
dataSource: t,
|
1207
1250
|
query: r,
|
@@ -1213,72 +1256,75 @@ function to(e) {
|
|
1213
1256
|
text: r,
|
1214
1257
|
// Timezone is not used by AI API, but it is currently required by the endpoint
|
1215
1258
|
timezone: "UTC",
|
1216
|
-
chartTypes: a ?? [...
|
1259
|
+
chartTypes: a ?? [...ao]
|
1217
1260
|
}
|
1218
1261
|
};
|
1219
1262
|
}
|
1220
|
-
const
|
1263
|
+
const ot = 4, oo = (e) => {
|
1221
1264
|
const {
|
1222
1265
|
contextTitle: t,
|
1223
1266
|
count: r,
|
1224
1267
|
enableAxisTitlesInWidgetProps: a,
|
1225
|
-
enabled: i
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1268
|
+
enabled: i,
|
1269
|
+
customPrompt: l
|
1270
|
+
} = e, d = re(), p = r ?? ot, c = (i === void 0 || i === !0) && p > 0, {
|
1271
|
+
isLoading: g,
|
1272
|
+
isError: f,
|
1229
1273
|
isSuccess: x,
|
1230
|
-
data:
|
1231
|
-
error:
|
1232
|
-
refetch:
|
1233
|
-
} =
|
1234
|
-
queryKey: ["getQueryRecommendations", t,
|
1235
|
-
queryFn: () =>
|
1236
|
-
numOfRecommendations:
|
1237
|
-
}
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1274
|
+
data: o,
|
1275
|
+
error: u,
|
1276
|
+
refetch: s
|
1277
|
+
} = Me({
|
1278
|
+
queryKey: ["getQueryRecommendations", t, p, d],
|
1279
|
+
queryFn: () => d == null ? void 0 : d.ai.getQueryRecommendations(t, I({
|
1280
|
+
numOfRecommendations: p
|
1281
|
+
}, l ? {
|
1282
|
+
userPrompt: l
|
1283
|
+
} : null)),
|
1284
|
+
enabled: !!d && c
|
1285
|
+
}), m = Q(() => o == null ? void 0 : o.map((h) => j(I({}, h), {
|
1286
|
+
widgetProps: h.jaql ? ft(h, {
|
1241
1287
|
useCustomizedStyleOptions: a
|
1242
1288
|
}) : void 0
|
1243
|
-
})), [
|
1289
|
+
})), [o, a]);
|
1244
1290
|
return {
|
1245
|
-
isLoading:
|
1246
|
-
isError:
|
1291
|
+
isLoading: c ? g : !1,
|
1292
|
+
isError: f,
|
1247
1293
|
isSuccess: x,
|
1248
|
-
data:
|
1249
|
-
error:
|
1250
|
-
refetch:
|
1251
|
-
|
1252
|
-
}, [
|
1294
|
+
data: m ?? void 0,
|
1295
|
+
error: u,
|
1296
|
+
refetch: N(() => {
|
1297
|
+
s();
|
1298
|
+
}, [s])
|
1253
1299
|
};
|
1254
|
-
},
|
1300
|
+
}, Cr = Object.freeze({
|
1255
1301
|
enableFollowupQuestions: !1,
|
1256
1302
|
enableHeader: !0,
|
1257
1303
|
enableInsights: !0,
|
1258
1304
|
numOfRecommendations: 4,
|
1259
1305
|
numOfRecentPrompts: 5
|
1260
|
-
}),
|
1306
|
+
}), vr = /* @__PURE__ */ He(I({}, Cr)), ae = () => ut(vr), no = ({
|
1261
1307
|
children: e,
|
1262
1308
|
value: t
|
1263
1309
|
}) => {
|
1264
1310
|
const {
|
1265
1311
|
t: r
|
1266
|
-
} =
|
1312
|
+
} = E(), a = Object.entries(t).reduce((i, [l, d]) => (d !== void 0 && (i[l] = d), i), j(I({}, Cr), {
|
1267
1313
|
inputPromptText: r("ai.config.inputPromptText"),
|
1268
1314
|
welcomeText: r("ai.config.welcomeText"),
|
1269
1315
|
suggestionsWelcomeText: r("ai.config.suggestionsWelcomeText")
|
1270
1316
|
}));
|
1271
|
-
return /* @__PURE__ */ n(
|
1317
|
+
return /* @__PURE__ */ n(vr.Provider, {
|
1272
1318
|
value: a,
|
1273
1319
|
children: e
|
1274
1320
|
});
|
1275
|
-
},
|
1276
|
-
const t =
|
1321
|
+
}, kt = "chatHistory", lo = (e) => {
|
1322
|
+
const t = re(), {
|
1277
1323
|
hideHistory: r
|
1278
|
-
} =
|
1279
|
-
return
|
1280
|
-
queryKey: [
|
1281
|
-
queryFn: () =>
|
1324
|
+
} = ae();
|
1325
|
+
return Me({
|
1326
|
+
queryKey: [kt, e, t],
|
1327
|
+
queryFn: () => ce(void 0, null, function* () {
|
1282
1328
|
if (!t || !e)
|
1283
1329
|
return;
|
1284
1330
|
if (r)
|
@@ -1288,10 +1334,10 @@ const at = 4, ro = (e) => {
|
|
1288
1334
|
}),
|
1289
1335
|
enabled: !!t && !!e
|
1290
1336
|
});
|
1291
|
-
},
|
1292
|
-
const t =
|
1293
|
-
return
|
1294
|
-
mutationFn: () =>
|
1337
|
+
}, Sr = (e) => {
|
1338
|
+
const t = re(), r = Ie();
|
1339
|
+
return xt({
|
1340
|
+
mutationFn: () => ce(void 0, null, function* () {
|
1295
1341
|
if (!(!t || !e))
|
1296
1342
|
return t.ai.chat.clearHistory(e);
|
1297
1343
|
}),
|
@@ -1299,32 +1345,32 @@ const at = 4, ro = (e) => {
|
|
1299
1345
|
console.error("Error when clearing history:", a);
|
1300
1346
|
},
|
1301
1347
|
onSettled: () => {
|
1302
|
-
e && r.setQueriesData([
|
1348
|
+
e && r.setQueriesData([kt, e], []);
|
1303
1349
|
}
|
1304
1350
|
});
|
1305
|
-
},
|
1351
|
+
}, so = (e) => {
|
1306
1352
|
const {
|
1307
1353
|
data: t,
|
1308
1354
|
isLoading: r,
|
1309
1355
|
isError: a
|
1310
|
-
} =
|
1356
|
+
} = lo(e), {
|
1311
1357
|
mutate: i
|
1312
|
-
} =
|
1313
|
-
return
|
1358
|
+
} = Sr(e);
|
1359
|
+
return De(() => {
|
1314
1360
|
a && i();
|
1315
1361
|
}, [a, i]), {
|
1316
1362
|
history: t,
|
1317
1363
|
isLoading: r,
|
1318
1364
|
isError: a
|
1319
1365
|
};
|
1320
|
-
},
|
1321
|
-
const e =
|
1366
|
+
}, co = () => {
|
1367
|
+
const e = re(), {
|
1322
1368
|
data: t,
|
1323
1369
|
isLoading: r,
|
1324
1370
|
fetchStatus: a
|
1325
|
-
} =
|
1371
|
+
} = Me({
|
1326
1372
|
queryKey: ["getDataTopics", e],
|
1327
|
-
queryFn: () =>
|
1373
|
+
queryFn: () => ce(void 0, null, function* () {
|
1328
1374
|
if (e)
|
1329
1375
|
return e.getChatContexts();
|
1330
1376
|
}),
|
@@ -1335,11 +1381,11 @@ const at = 4, ro = (e) => {
|
|
1335
1381
|
isLoading: r,
|
1336
1382
|
fetchStatus: a
|
1337
1383
|
};
|
1338
|
-
},
|
1339
|
-
const e =
|
1384
|
+
}, po = () => {
|
1385
|
+
const e = re(), {
|
1340
1386
|
data: t,
|
1341
1387
|
isLoading: r
|
1342
|
-
} =
|
1388
|
+
} = Me({
|
1343
1389
|
queryKey: ["getAllChats", e],
|
1344
1390
|
queryFn: () => e == null ? void 0 : e.ai.chat.getAll(),
|
1345
1391
|
enabled: !!e
|
@@ -1348,18 +1394,18 @@ const at = 4, ro = (e) => {
|
|
1348
1394
|
data: t ?? [],
|
1349
1395
|
isLoading: r
|
1350
1396
|
};
|
1351
|
-
},
|
1352
|
-
const a =
|
1353
|
-
mutationFn: () =>
|
1397
|
+
}, uo = (e, t, r) => {
|
1398
|
+
const a = Ie(), i = re(), l = xt({
|
1399
|
+
mutationFn: () => ce(void 0, null, function* () {
|
1354
1400
|
if (!(!i || !e))
|
1355
1401
|
return i.ai.chat.create(e, r);
|
1356
1402
|
}),
|
1357
1403
|
onSuccess: () => a.invalidateQueries(["getAllChats"])
|
1358
1404
|
});
|
1359
|
-
return
|
1405
|
+
return De(() => {
|
1360
1406
|
t && l.isIdle && l.mutate();
|
1361
1407
|
}, [t, l]), l;
|
1362
|
-
},
|
1408
|
+
}, go = (e, t) => {
|
1363
1409
|
switch (e.responseType = e.responseType.toLowerCase(), e.responseType) {
|
1364
1410
|
case "nlq":
|
1365
1411
|
return {
|
@@ -1376,16 +1422,16 @@ const at = 4, ro = (e) => {
|
|
1376
1422
|
default:
|
1377
1423
|
throw Error(`${t}${JSON.stringify(e)}`);
|
1378
1424
|
}
|
1379
|
-
},
|
1380
|
-
const r =
|
1381
|
-
e && r.setQueriesData([
|
1425
|
+
}, ho = (e, t) => {
|
1426
|
+
const r = Ie(), a = N((c) => {
|
1427
|
+
e && r.setQueriesData([kt, e], (g) => g && [...g, c]);
|
1382
1428
|
}, [r, e]), {
|
1383
1429
|
t: i
|
1384
|
-
} =
|
1430
|
+
} = E(), l = re(), {
|
1385
1431
|
mutate: d,
|
1386
1432
|
isLoading: p
|
1387
|
-
} =
|
1388
|
-
mutationFn: (c) =>
|
1433
|
+
} = xt({
|
1434
|
+
mutationFn: (c) => ce(void 0, null, function* () {
|
1389
1435
|
if (!(!l || !e))
|
1390
1436
|
return l.ai.chat.post(e, {
|
1391
1437
|
text: c,
|
@@ -1412,81 +1458,81 @@ const at = 4, ro = (e) => {
|
|
1412
1458
|
if (!c)
|
1413
1459
|
return;
|
1414
1460
|
const g = i("ai.errors.unknownResponse");
|
1415
|
-
a(
|
1461
|
+
a(go(c, g));
|
1416
1462
|
}
|
1417
1463
|
});
|
1418
1464
|
return {
|
1419
1465
|
mutate: d,
|
1420
1466
|
isLoading: p
|
1421
1467
|
};
|
1422
|
-
},
|
1468
|
+
}, mo = (e, t, r = !1) => {
|
1423
1469
|
var a;
|
1424
1470
|
const {
|
1425
1471
|
data: i,
|
1426
1472
|
isLoading: l
|
1427
|
-
} =
|
1473
|
+
} = po(), d = to(), p = d.getChatId(e, t) || ((a = i.find((x) => {
|
1428
1474
|
var o;
|
1429
|
-
return
|
1475
|
+
return x.contextTitle === e && ((o = x.contextDetails) == null ? void 0 : o.dashboardId) === (t == null ? void 0 : t.dashboardId);
|
1430
1476
|
})) == null ? void 0 : a.chatId), {
|
1431
1477
|
isError: c,
|
1432
1478
|
data: g,
|
1433
|
-
isSuccess:
|
1434
|
-
} =
|
1435
|
-
return
|
1436
|
-
|
1437
|
-
}, [g,
|
1479
|
+
isSuccess: f
|
1480
|
+
} = uo(e, r && !l && !p, t);
|
1481
|
+
return De(() => {
|
1482
|
+
f && g && !p && d.saveChatId(g.chatId, e, t);
|
1483
|
+
}, [g, f, e, t, p, d]), {
|
1438
1484
|
chatId: p,
|
1439
1485
|
isLoading: l,
|
1440
1486
|
isError: c
|
1441
1487
|
};
|
1442
|
-
},
|
1488
|
+
}, bo = (e) => Q(() => {
|
1443
1489
|
if (e != null && e.length) {
|
1444
1490
|
const t = e[e.length - 1];
|
1445
|
-
if (
|
1491
|
+
if (Mr(t))
|
1446
1492
|
return JSON.parse(t.content);
|
1447
1493
|
}
|
1448
1494
|
return null;
|
1449
|
-
}, [e]),
|
1495
|
+
}, [e]), Mr = (e) => !!e && "type" in e && e.type === "nlq", fo = (e) => !!e && "type" in e && e.type === "text", xo = (e, t) => {
|
1450
1496
|
const {
|
1451
1497
|
t: r
|
1452
|
-
} =
|
1498
|
+
} = E(), {
|
1453
1499
|
enableFollowupQuestions: a
|
1454
|
-
} =
|
1500
|
+
} = ae(), {
|
1455
1501
|
chatId: i,
|
1456
1502
|
isError: l
|
1457
|
-
} =
|
1503
|
+
} = mo(e, t, !0), [d, p] = Z(null), {
|
1458
1504
|
history: c,
|
1459
1505
|
isLoading: g,
|
1460
|
-
isError:
|
1461
|
-
} =
|
1462
|
-
|
1463
|
-
l ? p(new
|
1464
|
-
}, [l,
|
1506
|
+
isError: f
|
1507
|
+
} = so(i);
|
1508
|
+
De(() => {
|
1509
|
+
l ? p(new ve("ai.errors.chatUnavailable")) : f && p(new ve("ai.errors.fetchHistory"));
|
1510
|
+
}, [l, f, r]);
|
1465
1511
|
const {
|
1466
|
-
mutate:
|
1512
|
+
mutate: x,
|
1467
1513
|
isLoading: o
|
1468
|
-
} =
|
1514
|
+
} = ho(i, a), u = bo(c);
|
1469
1515
|
return {
|
1470
1516
|
chatId: i,
|
1471
1517
|
history: c ?? [],
|
1472
1518
|
lastNlqResponse: u,
|
1473
|
-
sendMessage:
|
1519
|
+
sendMessage: x,
|
1474
1520
|
isAwaitingResponse: o,
|
1475
1521
|
isLoading: g,
|
1476
1522
|
lastError: d
|
1477
1523
|
};
|
1478
|
-
},
|
1524
|
+
}, ko = 500, yo = 500, wo = 500, _o = 900, Co = /* @__PURE__ */ C("div", {
|
1479
1525
|
target: "e1ldv6710",
|
1480
1526
|
label: "ChatFrame"
|
1481
1527
|
})("box-sizing:border-box;position:relative;display:flex;flex-direction:column;border:1px solid #c6c9ce;border-radius:", ({
|
1482
1528
|
theme: e
|
1483
1529
|
}) => e.aiChat.borderRadius, ";background-color:", ({
|
1484
1530
|
theme: e
|
1485
|
-
}) => e.aiChat.backgroundColor, ";overflow:hidden;min-width:",
|
1531
|
+
}) => e.aiChat.backgroundColor, ";overflow:hidden;min-width:", ko, "px;min-height:", yo, "px;width:", ({
|
1486
1532
|
width: e
|
1487
|
-
}) => e ?
|
1533
|
+
}) => e ? Et(e) : `${wo}px`, ";height:", ({
|
1488
1534
|
height: e
|
1489
|
-
}) => e ?
|
1535
|
+
}) => e ? Et(e) : `${_o}px`, ";", ({
|
1490
1536
|
theme: e
|
1491
1537
|
}) => P`
|
1492
1538
|
font-size: ${e.aiChat.primaryFontSize[0]};
|
@@ -1494,10 +1540,10 @@ const at = 4, ro = (e) => {
|
|
1494
1540
|
`, " border:", ({
|
1495
1541
|
theme: e
|
1496
1542
|
}) => e.aiChat.border === !1 ? "none" : e.aiChat.border, ";");
|
1497
|
-
function
|
1543
|
+
function Et(e) {
|
1498
1544
|
return typeof e == "number" ? `${e}px` : e;
|
1499
1545
|
}
|
1500
|
-
function
|
1546
|
+
function vo({
|
1501
1547
|
spin: e
|
1502
1548
|
}) {
|
1503
1549
|
return /* @__PURE__ */ v("svg", {
|
@@ -1521,16 +1567,16 @@ function wo({
|
|
1521
1567
|
})]
|
1522
1568
|
});
|
1523
1569
|
}
|
1524
|
-
function
|
1570
|
+
function Ye() {
|
1525
1571
|
return /* @__PURE__ */ n("div", {
|
1526
1572
|
className: "csdk-m-auto",
|
1527
1573
|
"aria-label": "loading spinner",
|
1528
|
-
children: /* @__PURE__ */ n(
|
1574
|
+
children: /* @__PURE__ */ n(vo, {
|
1529
1575
|
spin: !0
|
1530
1576
|
})
|
1531
1577
|
});
|
1532
1578
|
}
|
1533
|
-
function
|
1579
|
+
function So({
|
1534
1580
|
theme: e
|
1535
1581
|
}) {
|
1536
1582
|
return /* @__PURE__ */ n("svg", {
|
@@ -1545,7 +1591,7 @@ function _o({
|
|
1545
1591
|
})
|
1546
1592
|
});
|
1547
1593
|
}
|
1548
|
-
function
|
1594
|
+
function Mo({
|
1549
1595
|
theme: e
|
1550
1596
|
}) {
|
1551
1597
|
const t = e.aiChat.icons.color;
|
@@ -1567,17 +1613,17 @@ function Co({
|
|
1567
1613
|
})]
|
1568
1614
|
});
|
1569
1615
|
}
|
1570
|
-
const
|
1616
|
+
const Io = /* @__PURE__ */ C("div", {
|
1571
1617
|
target: "e1q6h1ze0",
|
1572
1618
|
label: "Section"
|
1573
|
-
})("display:flex;flex-direction:column;row-gap:4px;"),
|
1619
|
+
})("display:flex;flex-direction:column;row-gap:4px;"), Do = /* @__PURE__ */ C("div", {
|
1574
1620
|
target: "e1q6h1ze1",
|
1575
1621
|
label: "SectionHeader"
|
1576
1622
|
})("font-size:11px;line-height:18px;font-weight:300;color:", ({
|
1577
1623
|
theme: e
|
1578
1624
|
}) => e.aiChat.dropup.headers.textColor, ";cursor:pointer;padding:4px 12px;&:hover{background-color:", ({
|
1579
1625
|
theme: e
|
1580
|
-
}) => e.aiChat.dropup.headers.hover.backgroundColor, ";}"),
|
1626
|
+
}) => e.aiChat.dropup.headers.hover.backgroundColor, ";}"), Ao = /* @__PURE__ */ C("div", {
|
1581
1627
|
target: "e1q6h1ze2",
|
1582
1628
|
label: "DropupItem"
|
1583
1629
|
})("font-size:", ({
|
@@ -1589,28 +1635,28 @@ const vo = /* @__PURE__ */ C("div", {
|
|
1589
1635
|
}) => e.aiChat.dropup.items.textColor, ";cursor:pointer;padding:4px 12px;&:hover{background-color:", ({
|
1590
1636
|
theme: e
|
1591
1637
|
}) => e.aiChat.dropup.items.hover.backgroundColor, ";}");
|
1592
|
-
function
|
1638
|
+
function Lo({
|
1593
1639
|
title: e,
|
1594
1640
|
items: t,
|
1595
1641
|
onSelect: r,
|
1596
1642
|
alwaysExpanded: a = !1
|
1597
1643
|
}) {
|
1598
|
-
const [i, l] =
|
1644
|
+
const [i, l] = Z(!1), {
|
1599
1645
|
themeSettings: d
|
1600
|
-
} =
|
1601
|
-
return /* @__PURE__ */ v(
|
1602
|
-
children: [/* @__PURE__ */ n(
|
1646
|
+
} = L();
|
1647
|
+
return /* @__PURE__ */ v(Io, {
|
1648
|
+
children: [/* @__PURE__ */ n(Do, {
|
1603
1649
|
onClick: () => l((p) => !p),
|
1604
1650
|
theme: d,
|
1605
1651
|
children: e.toUpperCase()
|
1606
|
-
}), (i || a) && t.map((p, c) => /* @__PURE__ */ n(
|
1652
|
+
}), (i || a) && t.map((p, c) => /* @__PURE__ */ n(Ao, {
|
1607
1653
|
onClick: () => r(p),
|
1608
1654
|
theme: d,
|
1609
1655
|
children: p
|
1610
1656
|
}, c))]
|
1611
1657
|
});
|
1612
1658
|
}
|
1613
|
-
const
|
1659
|
+
const To = /* @__PURE__ */ C("div", {
|
1614
1660
|
target: "e10x5x4a0",
|
1615
1661
|
label: "PopupContent"
|
1616
1662
|
})("font-family:", ({
|
@@ -1625,7 +1671,7 @@ const Do = /* @__PURE__ */ C("div", {
|
|
1625
1671
|
theme: e
|
1626
1672
|
}) => e.aiChat.dropup.borderRadius, ";box-shadow:", ({
|
1627
1673
|
theme: e
|
1628
|
-
}) => e.aiChat.dropup.boxShadow, ";padding-top:8px;padding-bottom:8px;display:flex;flex-direction:column;row-gap:4px;"),
|
1674
|
+
}) => e.aiChat.dropup.boxShadow, ";padding-top:8px;padding-bottom:8px;display:flex;flex-direction:column;row-gap:4px;"), No = /* @__PURE__ */ C("div", {
|
1629
1675
|
target: "e10x5x4a1",
|
1630
1676
|
label: "ErrorMessage"
|
1631
1677
|
})("font-size:", ({
|
@@ -1634,8 +1680,8 @@ const Do = /* @__PURE__ */ C("div", {
|
|
1634
1680
|
theme: e
|
1635
1681
|
}) => e.aiChat.primaryFontSize[1], ";color:", ({
|
1636
1682
|
theme: e
|
1637
|
-
}) => e.aiChat.dropup.items.textColor, ";padding:4px 12px;"),
|
1638
|
-
function
|
1683
|
+
}) => e.aiChat.dropup.items.textColor, ";padding:4px 12px;"), nt = (e) => e.startsWith("/");
|
1684
|
+
function jo({
|
1639
1685
|
recentPrompts: e,
|
1640
1686
|
suggestions: t,
|
1641
1687
|
isLoading: r,
|
@@ -1652,13 +1698,13 @@ function Lo({
|
|
1652
1698
|
title: "/ai recommendations",
|
1653
1699
|
items: t,
|
1654
1700
|
onSelect: a
|
1655
|
-
}].filter((
|
1701
|
+
}].filter((x) => x.title.slice(0, l.length) === l), {
|
1656
1702
|
themeSettings: c
|
1657
|
-
} =
|
1703
|
+
} = L(), {
|
1658
1704
|
t: g
|
1659
|
-
} =
|
1660
|
-
return /* @__PURE__ */ n(
|
1661
|
-
open:
|
1705
|
+
} = E(), f = p.length === 1;
|
1706
|
+
return /* @__PURE__ */ n(Kt, {
|
1707
|
+
open: nt(l) && p.length > 0,
|
1662
1708
|
anchorEl: i,
|
1663
1709
|
placement: "top-start",
|
1664
1710
|
modifiers: [{
|
@@ -1670,29 +1716,29 @@ function Lo({
|
|
1670
1716
|
sx: {
|
1671
1717
|
zIndex: 3
|
1672
1718
|
},
|
1673
|
-
children: /* @__PURE__ */ v(
|
1719
|
+
children: /* @__PURE__ */ v(To, {
|
1674
1720
|
style: {
|
1675
1721
|
width: i == null ? void 0 : i.offsetWidth
|
1676
1722
|
},
|
1677
1723
|
theme: c,
|
1678
|
-
children: [r && /* @__PURE__ */ n(
|
1679
|
-
alwaysExpanded:
|
1680
|
-
}),
|
1724
|
+
children: [r && /* @__PURE__ */ n(Ye, {}), !r && !d && p.map((x) => /* @__PURE__ */ n(Lo, j(I({}, x), {
|
1725
|
+
alwaysExpanded: f
|
1726
|
+
}), x.title)), d && /* @__PURE__ */ n(No, {
|
1681
1727
|
theme: c,
|
1682
1728
|
children: g("ai.errors.recommendationsNotAvailable")
|
1683
1729
|
})]
|
1684
1730
|
})
|
1685
1731
|
});
|
1686
1732
|
}
|
1687
|
-
function
|
1733
|
+
function Ae({
|
1688
1734
|
title: e,
|
1689
1735
|
placement: t = "top",
|
1690
1736
|
children: r
|
1691
1737
|
}) {
|
1692
1738
|
const {
|
1693
1739
|
themeSettings: a
|
1694
|
-
} =
|
1695
|
-
return /* @__PURE__ */ n(
|
1740
|
+
} = L();
|
1741
|
+
return /* @__PURE__ */ n(ja, {
|
1696
1742
|
title: e,
|
1697
1743
|
placement: t,
|
1698
1744
|
disableInteractive: !0,
|
@@ -1720,15 +1766,15 @@ function De({
|
|
1720
1766
|
children: r
|
1721
1767
|
});
|
1722
1768
|
}
|
1723
|
-
const
|
1769
|
+
const Oo = 500, Eo = /* @__PURE__ */ C("div", {
|
1724
1770
|
target: "e6iwkw10",
|
1725
1771
|
label: "ChatInputContainer"
|
1726
1772
|
})("display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;background-color:", ({
|
1727
1773
|
theme: e
|
1728
|
-
}) => e.aiChat.backgroundColor, ";"),
|
1774
|
+
}) => e.aiChat.backgroundColor, ";"), zo = /* @__PURE__ */ C("button", {
|
1729
1775
|
target: "e6iwkw11",
|
1730
1776
|
label: "ClearHistoryButton"
|
1731
|
-
})("height:34px;background-color:inherit;cursor:pointer;border:none;"),
|
1777
|
+
})("height:34px;background-color:inherit;cursor:pointer;border:none;"), Ro = /* @__PURE__ */ C("textarea", {
|
1732
1778
|
target: "e6iwkw12",
|
1733
1779
|
label: "TextInput"
|
1734
1780
|
})("font-size:inherit;line-height:inherit;resize:none;overflow-y:auto;box-sizing:border-box;max-height:88px;width:100%;padding-top:7px;padding-bottom:7px;padding-left:16px;padding-right:16px;margin-left:10px;margin-right:10px;border-width:1px;border-color:rgb(38 46 61 / 0.15);border-radius:0.5rem;&:focus{outline:1px solid ", ({
|
@@ -1737,7 +1783,7 @@ const To = 500, No = /* @__PURE__ */ C("div", {
|
|
1737
1783
|
theme: e
|
1738
1784
|
}) => e.aiChat.primaryTextColor, ";background-color:", ({
|
1739
1785
|
theme: e
|
1740
|
-
}) => e.aiChat.input.backgroundColor, ";"),
|
1786
|
+
}) => e.aiChat.input.backgroundColor, ";"), Zo = /* @__PURE__ */ C("button", {
|
1741
1787
|
target: "e6iwkw13",
|
1742
1788
|
label: "SendMessageButton"
|
1743
1789
|
})("height:34px;background-color:inherit;border-style:none;color:", ({
|
@@ -1750,8 +1796,8 @@ const To = 500, No = /* @__PURE__ */ C("div", {
|
|
1750
1796
|
` : P`
|
1751
1797
|
opacity: 1;
|
1752
1798
|
cursor: pointer;
|
1753
|
-
`),
|
1754
|
-
function
|
1799
|
+
`), Wo = 34;
|
1800
|
+
function Po({
|
1755
1801
|
onSendMessage: e,
|
1756
1802
|
onClearHistoryClick: t,
|
1757
1803
|
disabled: r,
|
@@ -1761,104 +1807,104 @@ function Zo({
|
|
1761
1807
|
recommendationsError: d,
|
1762
1808
|
onChange: p
|
1763
1809
|
}) {
|
1764
|
-
const [c, g] =
|
1765
|
-
inputPromptText:
|
1766
|
-
} =
|
1810
|
+
const [c, g] = Z(""), {
|
1811
|
+
inputPromptText: f
|
1812
|
+
} = ae(), x = N(() => {
|
1767
1813
|
if (r)
|
1768
1814
|
return;
|
1769
|
-
if (
|
1815
|
+
if (nt(c)) {
|
1770
1816
|
g("");
|
1771
1817
|
return;
|
1772
1818
|
}
|
1773
1819
|
const y = c.trim();
|
1774
1820
|
y.length !== 0 && (e(y), g(""));
|
1775
|
-
}, [r, e, c]), o =
|
1821
|
+
}, [r, e, c]), o = N((y) => {
|
1776
1822
|
e(y), g("");
|
1777
|
-
}, [e]), u =
|
1778
|
-
y.key === "Enter" ? (y.preventDefault(),
|
1779
|
-
}, [
|
1823
|
+
}, [e]), u = N((y) => {
|
1824
|
+
y.key === "Enter" ? (y.preventDefault(), x()) : y.key === "Escape" && nt(c) && g("");
|
1825
|
+
}, [x, c]), s = N((y) => {
|
1780
1826
|
p == null || p(y.target.value), g(y.target.value);
|
1781
|
-
}, [p]),
|
1782
|
-
|
1783
|
-
|
1784
|
-
}, [c]),
|
1785
|
-
|
1827
|
+
}, [p]), m = se(null);
|
1828
|
+
We(() => {
|
1829
|
+
m.current && (m.current.style.height = "inherit", m.current.style.height = `${Math.max(m.current.scrollHeight + 2, Wo)}px`);
|
1830
|
+
}, [c]), We(() => {
|
1831
|
+
m.current && m.current.focus({
|
1786
1832
|
preventScroll: !0
|
1787
1833
|
});
|
1788
1834
|
}, []);
|
1789
1835
|
const {
|
1790
|
-
themeSettings:
|
1791
|
-
} =
|
1836
|
+
themeSettings: h
|
1837
|
+
} = L(), {
|
1792
1838
|
t: w
|
1793
|
-
} =
|
1839
|
+
} = E(), _ = N((y) => {
|
1794
1840
|
var M;
|
1795
1841
|
if ((M = document.getElementById("csdk-chatbot-frame")) != null && M.contains(y.relatedTarget)) {
|
1796
|
-
const
|
1797
|
-
var
|
1798
|
-
document.removeEventListener("mouseup",
|
1842
|
+
const D = (S) => {
|
1843
|
+
var A;
|
1844
|
+
document.removeEventListener("mouseup", D), document.removeEventListener("keyup", D), S.type === "mouseup" && ((A = document.getSelection()) == null ? void 0 : A.type) !== "Range" && y.target.focus({
|
1799
1845
|
preventScroll: !0
|
1800
1846
|
});
|
1801
1847
|
};
|
1802
|
-
document.addEventListener("mouseup",
|
1848
|
+
document.addEventListener("mouseup", D), document.addEventListener("keyup", D);
|
1803
1849
|
}
|
1804
1850
|
}, []);
|
1805
|
-
return /* @__PURE__ */ v(
|
1806
|
-
theme:
|
1807
|
-
children: [/* @__PURE__ */ n(
|
1851
|
+
return /* @__PURE__ */ v(Eo, {
|
1852
|
+
theme: h,
|
1853
|
+
children: [/* @__PURE__ */ n(jo, {
|
1808
1854
|
recentPrompts: a,
|
1809
1855
|
suggestions: i,
|
1810
1856
|
isLoading: l,
|
1811
1857
|
onSelection: o,
|
1812
|
-
anchorEl:
|
1858
|
+
anchorEl: m.current,
|
1813
1859
|
text: c,
|
1814
1860
|
recommendationsError: d
|
1815
|
-
}), t && /* @__PURE__ */ n(
|
1861
|
+
}), t && /* @__PURE__ */ n(Ae, {
|
1816
1862
|
title: w("ai.buttons.clearChat"),
|
1817
1863
|
placement: "bottom-start",
|
1818
|
-
children: /* @__PURE__ */ n(
|
1864
|
+
children: /* @__PURE__ */ n(zo, {
|
1819
1865
|
"aria-label": "clear history",
|
1820
1866
|
onClick: t,
|
1821
|
-
children: /* @__PURE__ */ n(
|
1822
|
-
theme:
|
1867
|
+
children: /* @__PURE__ */ n(Mo, {
|
1868
|
+
theme: h
|
1823
1869
|
})
|
1824
1870
|
})
|
1825
|
-
}), /* @__PURE__ */ n(
|
1871
|
+
}), /* @__PURE__ */ n(Ro, {
|
1826
1872
|
"aria-label": "chat input",
|
1827
1873
|
onBlur: _,
|
1828
|
-
maxLength:
|
1829
|
-
ref:
|
1874
|
+
maxLength: Oo,
|
1875
|
+
ref: m,
|
1830
1876
|
rows: 1,
|
1831
1877
|
onChange: s,
|
1832
1878
|
spellCheck: "true",
|
1833
|
-
placeholder:
|
1879
|
+
placeholder: f,
|
1834
1880
|
value: c,
|
1835
1881
|
onKeyDown: u,
|
1836
|
-
theme:
|
1837
|
-
}), /* @__PURE__ */ n(
|
1882
|
+
theme: h
|
1883
|
+
}), /* @__PURE__ */ n(Zo, {
|
1838
1884
|
"aria-label": "send chat message",
|
1839
1885
|
disabled: r || c.length === 0,
|
1840
|
-
onClick:
|
1841
|
-
theme:
|
1886
|
+
onClick: x,
|
1887
|
+
theme: h,
|
1842
1888
|
children: /* @__PURE__ */ n("span", {
|
1843
1889
|
"data-state": "closed",
|
1844
|
-
children: /* @__PURE__ */ n(
|
1845
|
-
theme:
|
1890
|
+
children: /* @__PURE__ */ n(So, {
|
1891
|
+
theme: h
|
1846
1892
|
})
|
1847
1893
|
})
|
1848
1894
|
})]
|
1849
1895
|
});
|
1850
1896
|
}
|
1851
|
-
function
|
1852
|
-
return
|
1897
|
+
function de() {
|
1898
|
+
return de = Object.assign ? Object.assign.bind() : function(e) {
|
1853
1899
|
for (var t = 1; t < arguments.length; t++) {
|
1854
1900
|
var r = arguments[t];
|
1855
1901
|
for (var a in r)
|
1856
1902
|
Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]);
|
1857
1903
|
}
|
1858
1904
|
return e;
|
1859
|
-
},
|
1905
|
+
}, de.apply(this, arguments);
|
1860
1906
|
}
|
1861
|
-
const
|
1907
|
+
const qo = ["children", "options"], k = {
|
1862
1908
|
blockQuote: "0",
|
1863
1909
|
breakLine: "1",
|
1864
1910
|
breakThematic: "2",
|
@@ -1894,11 +1940,11 @@ const Ro = ["children", "options"], k = {
|
|
1894
1940
|
textStrikethroughed: "32",
|
1895
1941
|
unorderedList: "33"
|
1896
1942
|
};
|
1897
|
-
var
|
1943
|
+
var zt;
|
1898
1944
|
(function(e) {
|
1899
1945
|
e[e.MAX = 0] = "MAX", e[e.HIGH = 1] = "HIGH", e[e.MED = 2] = "MED", e[e.LOW = 3] = "LOW", e[e.MIN = 4] = "MIN";
|
1900
|
-
})(
|
1901
|
-
const
|
1946
|
+
})(zt || (zt = {}));
|
1947
|
+
const Rt = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus", "autoPlay", "cellPadding", "cellSpacing", "charSet", "classId", "colSpan", "contentEditable", "contextMenu", "crossOrigin", "encType", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "frameBorder", "hrefLang", "inputMode", "keyParams", "keyType", "marginHeight", "marginWidth", "maxLength", "mediaGroup", "minLength", "noValidate", "radioGroup", "readOnly", "rowSpan", "spellCheck", "srcDoc", "srcLang", "srcSet", "tabIndex", "useMap"].reduce((e, t) => (e[t.toLowerCase()] = t, e), {
|
1902
1948
|
class: "className",
|
1903
1949
|
for: "htmlFor"
|
1904
1950
|
}), Zt = {
|
@@ -1908,48 +1954,48 @@ const zt = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus",
|
|
1908
1954
|
lt: "<",
|
1909
1955
|
nbsp: " ",
|
1910
1956
|
quot: "“"
|
1911
|
-
},
|
1912
|
-
function Nr(e) {
|
1913
|
-
return "( *)(" + (e === 1 ? xt : kt) + ") +";
|
1914
|
-
}
|
1915
|
-
const jr = Nr(1), Or = Nr(2);
|
1957
|
+
}, Go = ["style", "script"], Ho = ["src", "href", "data", "formAction", "srcDoc", "action"], Bo = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, Yo = /mailto:/i, Qo = /\n{2,}$/, Ir = /^(\s*>[\s\S]*?)(?=\n\n|$)/, Uo = /^ *> ?/gm, Fo = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, Vo = /^ {2,}\n/, $o = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, Dr = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, Ar = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, Jo = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, Xo = /^(?:\n *)*\n/, Ko = /\r\n?/g, en = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, tn = /^\[\^([^\]]+)]/, rn = /\f/g, an = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, on = /^\s*?\[(x|\s)\]/, Lr = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Tr = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Nr = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/, lt = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, nn = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, jr = /^<!--[\s\S]*?(?:-->)/, ln = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, dt = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, dn = /^\{.*\}$/, sn = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, cn = /^<([^ >]+@[^ >]+)>/, pn = /^<([^ >]+:\/[^ >]+)>/, un = /-([a-z])?/gi, Or = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, gn = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, hn = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, mn = /^\[([^\]]*)\] ?\[([^\]]*)\]/, bn = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, fn = /\t/g, xn = /(^ *\||\| *$)/g, kn = /^ *:-+: *$/, yn = /^ *:-+ *$/, wn = /^ *-+: *$/, Qe = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", _n = new RegExp(`^([*_])\\1${Qe}\\1\\1(?!\\1)`), Cn = new RegExp(`^([*_])${Qe}\\1(?!\\1)`), vn = new RegExp(`^(==)${Qe}\\1`), Sn = new RegExp(`^(~~)${Qe}\\1`), Mn = /^\\([^0-9A-Za-z\s])/, Wt = /\\([^0-9A-Za-z\s])/g, In = /^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/, Dn = /^\n+/, An = /^([ \t]*)/, Ln = /\\([^\\])/g, Tn = /(?:^|\n)( *)$/, yt = "(?:\\d+\\.)", wt = "(?:[*+-])";
|
1916
1958
|
function Er(e) {
|
1917
|
-
return
|
1918
|
-
}
|
1919
|
-
const An = Er(1), Ln = Er(2);
|
1920
|
-
function zr(e) {
|
1921
|
-
return new RegExp("^" + (e === 1 ? jr : Or) + "[^\\n]*(?:\\n(?!\\1" + (e === 1 ? xt : kt) + " )[^\\n]*)*(\\n|$)", "gm");
|
1959
|
+
return "( *)(" + (e === 1 ? yt : wt) + ") +";
|
1922
1960
|
}
|
1923
|
-
const
|
1961
|
+
const zr = Er(1), Rr = Er(2);
|
1924
1962
|
function Zr(e) {
|
1925
|
-
|
1963
|
+
return new RegExp("^" + (e === 1 ? zr : Rr));
|
1964
|
+
}
|
1965
|
+
const Nn = Zr(1), jn = Zr(2);
|
1966
|
+
function Wr(e) {
|
1967
|
+
return new RegExp("^" + (e === 1 ? zr : Rr) + "[^\\n]*(?:\\n(?!\\1" + (e === 1 ? yt : wt) + " )[^\\n]*)*(\\n|$)", "gm");
|
1968
|
+
}
|
1969
|
+
const On = Wr(1), En = Wr(2);
|
1970
|
+
function Pr(e) {
|
1971
|
+
const t = e === 1 ? yt : wt;
|
1926
1972
|
return new RegExp("^( *)(" + t + ") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1" + t + " (?!" + t + " ))\\n*|\\s*\\n*$)");
|
1927
1973
|
}
|
1928
|
-
const
|
1929
|
-
function
|
1930
|
-
const r = t === 1, a = r ?
|
1974
|
+
const qr = Pr(1), Gr = Pr(2);
|
1975
|
+
function Pt(e, t) {
|
1976
|
+
const r = t === 1, a = r ? qr : Gr, i = r ? On : En, l = r ? Nn : jn;
|
1931
1977
|
return {
|
1932
|
-
match:
|
1933
|
-
const c =
|
1978
|
+
match: fe(function(d, p) {
|
1979
|
+
const c = Tn.exec(p.prevCapture);
|
1934
1980
|
return c && (p.list || !p.inline && !p.simple) ? a.exec(d = c[1] + d) : null;
|
1935
1981
|
}),
|
1936
1982
|
order: 1,
|
1937
1983
|
parse(d, p, c) {
|
1938
|
-
const g = r ? +d[2] : void 0,
|
1984
|
+
const g = r ? +d[2] : void 0, f = d[0].replace(Qo, `
|
1939
1985
|
`).match(i);
|
1940
|
-
let
|
1986
|
+
let x = !1;
|
1941
1987
|
return {
|
1942
|
-
items:
|
1943
|
-
const s = l.exec(o)[0].length,
|
1988
|
+
items: f.map(function(o, u) {
|
1989
|
+
const s = l.exec(o)[0].length, m = new RegExp("^ {1," + s + "}", "gm"), h = o.replace(m, "").replace(l, ""), w = u === f.length - 1, _ = h.indexOf(`
|
1944
1990
|
|
1945
|
-
`) !== -1 || w &&
|
1946
|
-
|
1991
|
+
`) !== -1 || w && x;
|
1992
|
+
x = _;
|
1947
1993
|
const y = c.inline, M = c.list;
|
1948
|
-
let
|
1949
|
-
c.list = !0, _ ? (c.inline = !1,
|
1994
|
+
let D;
|
1995
|
+
c.list = !0, _ ? (c.inline = !1, D = Se(h) + `
|
1950
1996
|
|
1951
|
-
`) : (c.inline = !0,
|
1952
|
-
const S = p(
|
1997
|
+
`) : (c.inline = !0, D = Se(h));
|
1998
|
+
const S = p(D, c);
|
1953
1999
|
return c.inline = y, c.list = M, S;
|
1954
2000
|
}),
|
1955
2001
|
ordered: r,
|
@@ -1959,27 +2005,27 @@ function Wt(e, t) {
|
|
1959
2005
|
render: (d, p, c) => e(d.ordered ? "ol" : "ul", {
|
1960
2006
|
key: c.key,
|
1961
2007
|
start: d.type === k.orderedList ? d.start : void 0
|
1962
|
-
}, d.items.map(function(g,
|
2008
|
+
}, d.items.map(function(g, f) {
|
1963
2009
|
return e("li", {
|
1964
|
-
key:
|
2010
|
+
key: f
|
1965
2011
|
}, p(g, c));
|
1966
2012
|
}))
|
1967
2013
|
};
|
1968
2014
|
}
|
1969
|
-
const
|
1970
|
-
function
|
2015
|
+
const zn = new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), Rn = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, Hr = [Ir, Dr, Ar, Lr, Nr, Tr, Or, qr, Gr], Zn = [...Hr, /^[^\n]+(?: \n|\n{2,})/, lt, jr, dt];
|
2016
|
+
function Se(e) {
|
1971
2017
|
let t = e.length;
|
1972
2018
|
for (; t > 0 && e[t - 1] <= " "; )
|
1973
2019
|
t--;
|
1974
2020
|
return e.slice(0, t);
|
1975
2021
|
}
|
1976
|
-
function
|
2022
|
+
function we(e) {
|
1977
2023
|
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();
|
1978
2024
|
}
|
1979
|
-
function
|
1980
|
-
return
|
2025
|
+
function Wn(e) {
|
2026
|
+
return wn.test(e) ? "right" : kn.test(e) ? "center" : yn.test(e) ? "left" : null;
|
1981
2027
|
}
|
1982
|
-
function
|
2028
|
+
function qt(e, t, r, a) {
|
1983
2029
|
const i = r.inTable;
|
1984
2030
|
r.inTable = !0;
|
1985
2031
|
let l = [[]], d = "";
|
@@ -1989,18 +2035,18 @@ function Pt(e, t, r, a) {
|
|
1989
2035
|
const c = l[l.length - 1];
|
1990
2036
|
c.push.apply(c, t(d, r)), d = "";
|
1991
2037
|
}
|
1992
|
-
return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((c, g,
|
1993
|
-
c.trim() === "|" && (p(), a) ? g !== 0 && g !==
|
2038
|
+
return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((c, g, f) => {
|
2039
|
+
c.trim() === "|" && (p(), a) ? g !== 0 && g !== f.length - 1 && l.push([]) : d += c;
|
1994
2040
|
}), p(), r.inTable = i, l;
|
1995
2041
|
}
|
1996
|
-
function
|
2042
|
+
function Pn(e, t, r) {
|
1997
2043
|
r.inline = !0;
|
1998
|
-
const a = e[2] ? e[2].replace(
|
2044
|
+
const a = e[2] ? e[2].replace(xn, "").split("|").map(Wn) : [], i = e[3] ? function(d, p, c) {
|
1999
2045
|
return d.trim().split(`
|
2000
2046
|
`).map(function(g) {
|
2001
|
-
return
|
2047
|
+
return qt(g, p, c, !0);
|
2002
2048
|
});
|
2003
|
-
}(e[3], t, r) : [], l =
|
2049
|
+
}(e[3], t, r) : [], l = qt(e[1], t, r, !!i.length);
|
2004
2050
|
return r.inline = !1, i.length ? {
|
2005
2051
|
align: a,
|
2006
2052
|
cells: i,
|
@@ -2016,52 +2062,52 @@ function Gt(e, t) {
|
|
2016
2062
|
textAlign: e.align[t]
|
2017
2063
|
};
|
2018
2064
|
}
|
2019
|
-
function
|
2065
|
+
function fe(e) {
|
2020
2066
|
return e.inline = 1, e;
|
2021
2067
|
}
|
2022
2068
|
function ie(e) {
|
2023
|
-
return
|
2069
|
+
return fe(function(t, r) {
|
2024
2070
|
return r.inline ? e.exec(t) : null;
|
2025
2071
|
});
|
2026
2072
|
}
|
2027
2073
|
function oe(e) {
|
2028
|
-
return
|
2074
|
+
return fe(function(t, r) {
|
2029
2075
|
return r.inline || r.simple ? e.exec(t) : null;
|
2030
2076
|
});
|
2031
2077
|
}
|
2032
|
-
function
|
2078
|
+
function ee(e) {
|
2033
2079
|
return function(t, r) {
|
2034
2080
|
return r.inline || r.simple ? null : e.exec(t);
|
2035
2081
|
};
|
2036
2082
|
}
|
2037
|
-
function
|
2038
|
-
return
|
2083
|
+
function _e(e) {
|
2084
|
+
return fe(function(t) {
|
2039
2085
|
return e.exec(t);
|
2040
2086
|
});
|
2041
2087
|
}
|
2042
|
-
function
|
2088
|
+
function qn(e, t) {
|
2043
2089
|
if (t.inline || t.simple)
|
2044
2090
|
return null;
|
2045
2091
|
let r = "";
|
2046
2092
|
e.split(`
|
2047
2093
|
`).every((i) => (i += `
|
2048
|
-
`, !
|
2049
|
-
const a =
|
2094
|
+
`, !Hr.some((l) => l.test(i)) && (r += i, !!i.trim())));
|
2095
|
+
const a = Se(r);
|
2050
2096
|
return a == "" ? null : [r, , a];
|
2051
2097
|
}
|
2052
|
-
const
|
2053
|
-
function
|
2098
|
+
const Gn = /(javascript|vbscript|data(?!:image)):/i;
|
2099
|
+
function Hn(e) {
|
2054
2100
|
try {
|
2055
2101
|
const t = decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g, "");
|
2056
|
-
if (
|
2102
|
+
if (Gn.test(t))
|
2057
2103
|
return null;
|
2058
2104
|
} catch {
|
2059
2105
|
return null;
|
2060
2106
|
}
|
2061
2107
|
return e;
|
2062
2108
|
}
|
2063
|
-
function
|
2064
|
-
return e.replace(
|
2109
|
+
function Ht(e) {
|
2110
|
+
return e.replace(Ln, "$1");
|
2065
2111
|
}
|
2066
2112
|
function Ze(e, t, r) {
|
2067
2113
|
const a = r.inline || !1, i = r.simple || !1;
|
@@ -2069,52 +2115,52 @@ function Ze(e, t, r) {
|
|
2069
2115
|
const l = e(t, r);
|
2070
2116
|
return r.inline = a, r.simple = i, l;
|
2071
2117
|
}
|
2072
|
-
function
|
2118
|
+
function Bn(e, t, r) {
|
2073
2119
|
const a = r.inline || !1, i = r.simple || !1;
|
2074
2120
|
r.inline = !1, r.simple = !0;
|
2075
2121
|
const l = e(t, r);
|
2076
2122
|
return r.inline = a, r.simple = i, l;
|
2077
2123
|
}
|
2078
|
-
function
|
2124
|
+
function Yn(e, t, r) {
|
2079
2125
|
const a = r.inline || !1;
|
2080
2126
|
r.inline = !1;
|
2081
2127
|
const i = e(t, r);
|
2082
2128
|
return r.inline = a, i;
|
2083
2129
|
}
|
2084
|
-
const
|
2130
|
+
const Je = (e, t, r) => ({
|
2085
2131
|
children: Ze(t, e[2], r)
|
2086
2132
|
});
|
2087
|
-
function
|
2133
|
+
function Xe() {
|
2088
2134
|
return {};
|
2089
2135
|
}
|
2090
|
-
function
|
2136
|
+
function Ke() {
|
2091
2137
|
return null;
|
2092
2138
|
}
|
2093
|
-
function
|
2139
|
+
function Qn(...e) {
|
2094
2140
|
return e.filter(Boolean).join(" ");
|
2095
2141
|
}
|
2096
|
-
function
|
2142
|
+
function et(e, t, r) {
|
2097
2143
|
let a = e;
|
2098
2144
|
const i = t.split(".");
|
2099
2145
|
for (; i.length && (a = a[i[0]], a !== void 0); )
|
2100
2146
|
i.shift();
|
2101
2147
|
return a || r;
|
2102
2148
|
}
|
2103
|
-
function
|
2149
|
+
function Un(e = "", t = {}) {
|
2104
2150
|
function r(o, u, ...s) {
|
2105
|
-
const
|
2106
|
-
return t.createElement(function(
|
2107
|
-
const _ =
|
2108
|
-
return _ ? typeof _ == "function" || typeof _ == "object" && "render" in _ ? _ :
|
2109
|
-
}(o, t.overrides),
|
2110
|
-
className:
|
2151
|
+
const m = et(t.overrides, `${o}.props`, {});
|
2152
|
+
return t.createElement(function(h, w) {
|
2153
|
+
const _ = et(w, h);
|
2154
|
+
return _ ? typeof _ == "function" || typeof _ == "object" && "render" in _ ? _ : et(w, `${h}.component`, h) : h;
|
2155
|
+
}(o, t.overrides), de({}, u, m, {
|
2156
|
+
className: Qn(u == null ? void 0 : u.className, m.className) || void 0
|
2111
2157
|
}), ...s);
|
2112
2158
|
}
|
2113
2159
|
function a(o) {
|
2114
|
-
o = o.replace(
|
2160
|
+
o = o.replace(an, "");
|
2115
2161
|
let u = !1;
|
2116
|
-
t.forceInline ? u = !0 : t.forceBlock || (u =
|
2117
|
-
const s = g(c(u ? o : `${
|
2162
|
+
t.forceInline ? u = !0 : t.forceBlock || (u = bn.test(o) === !1);
|
2163
|
+
const s = g(c(u ? o : `${Se(o).replace(Dn, "")}
|
2118
2164
|
|
2119
2165
|
`, {
|
2120
2166
|
inline: u
|
@@ -2123,94 +2169,94 @@ function Bn(e = "", t = {}) {
|
|
2123
2169
|
s.pop();
|
2124
2170
|
if (t.wrapper === null)
|
2125
2171
|
return s;
|
2126
|
-
const
|
2127
|
-
let
|
2172
|
+
const m = t.wrapper || (u ? "span" : "div");
|
2173
|
+
let h;
|
2128
2174
|
if (s.length > 1 || t.forceWrapper)
|
2129
|
-
|
2175
|
+
h = s;
|
2130
2176
|
else {
|
2131
2177
|
if (s.length === 1)
|
2132
|
-
return
|
2178
|
+
return h = s[0], typeof h == "string" ? r("span", {
|
2133
2179
|
key: "outer"
|
2134
|
-
},
|
2135
|
-
|
2180
|
+
}, h) : h;
|
2181
|
+
h = null;
|
2136
2182
|
}
|
2137
|
-
return t.createElement(
|
2183
|
+
return t.createElement(m, {
|
2138
2184
|
key: "outer"
|
2139
|
-
},
|
2185
|
+
}, h);
|
2140
2186
|
}
|
2141
2187
|
function i(o, u) {
|
2142
|
-
const s = u.match(
|
2143
|
-
return s ? s.reduce(function(
|
2144
|
-
const w =
|
2188
|
+
const s = u.match(Bo);
|
2189
|
+
return s ? s.reduce(function(m, h) {
|
2190
|
+
const w = h.indexOf("=");
|
2145
2191
|
if (w !== -1) {
|
2146
2192
|
const _ = function(S) {
|
2147
|
-
return S.indexOf("-") !== -1 && S.match(
|
2148
|
-
return
|
2193
|
+
return S.indexOf("-") !== -1 && S.match(ln) === null && (S = S.replace(un, function(A, R) {
|
2194
|
+
return R.toUpperCase();
|
2149
2195
|
})), S;
|
2150
|
-
}(
|
2151
|
-
const
|
2152
|
-
return (
|
2153
|
-
}(
|
2196
|
+
}(h.slice(0, w)).trim(), y = function(S) {
|
2197
|
+
const A = S[0];
|
2198
|
+
return (A === '"' || A === "'") && S.length >= 2 && S[S.length - 1] === A ? S.slice(1, -1) : S;
|
2199
|
+
}(h.slice(w + 1).trim()), M = Rt[_] || _;
|
2154
2200
|
if (M === "ref")
|
2155
|
-
return
|
2156
|
-
const
|
2157
|
-
return
|
2158
|
-
const
|
2159
|
-
let
|
2160
|
-
if (!
|
2161
|
-
return
|
2162
|
-
for (let
|
2163
|
-
const
|
2164
|
-
if (
|
2165
|
-
|
2201
|
+
return m;
|
2202
|
+
const D = m[M] = function(S, A, R, pe) {
|
2203
|
+
return A === "style" ? function(U) {
|
2204
|
+
const q = [];
|
2205
|
+
let H = "", F = !1, G = !1, V = "";
|
2206
|
+
if (!U)
|
2207
|
+
return q;
|
2208
|
+
for (let z = 0; z < U.length; z++) {
|
2209
|
+
const W = U[z];
|
2210
|
+
if (W !== '"' && W !== "'" || F || (G ? W === V && (G = !1, V = "") : (G = !0, V = W)), W === "(" && H.endsWith("url") ? F = !0 : W === ")" && F && (F = !1), W !== ";" || G || F)
|
2211
|
+
H += W;
|
2166
2212
|
else {
|
2167
|
-
const
|
2168
|
-
if (
|
2169
|
-
const
|
2170
|
-
if (
|
2171
|
-
const
|
2172
|
-
|
2213
|
+
const B = H.trim();
|
2214
|
+
if (B) {
|
2215
|
+
const le = B.indexOf(":");
|
2216
|
+
if (le > 0) {
|
2217
|
+
const ue = B.slice(0, le).trim(), xe = B.slice(le + 1).trim();
|
2218
|
+
q.push([ue, xe]);
|
2173
2219
|
}
|
2174
2220
|
}
|
2175
|
-
|
2221
|
+
H = "";
|
2176
2222
|
}
|
2177
2223
|
}
|
2178
|
-
const
|
2179
|
-
if (
|
2180
|
-
const
|
2181
|
-
if (
|
2182
|
-
const
|
2183
|
-
|
2224
|
+
const $ = H.trim();
|
2225
|
+
if ($) {
|
2226
|
+
const z = $.indexOf(":");
|
2227
|
+
if (z > 0) {
|
2228
|
+
const W = $.slice(0, z).trim(), B = $.slice(z + 1).trim();
|
2229
|
+
q.push([W, B]);
|
2184
2230
|
}
|
2185
2231
|
}
|
2186
|
-
return
|
2187
|
-
}(
|
2188
|
-
return
|
2189
|
-
}, {}) :
|
2232
|
+
return q;
|
2233
|
+
}(R).reduce(function(U, [q, H]) {
|
2234
|
+
return U[q.replace(/(-[a-z])/g, (F) => F[1].toUpperCase())] = pe(H, S, q), U;
|
2235
|
+
}, {}) : Ho.indexOf(A) !== -1 ? pe(R, S, A) : (R.match(dn) && (R = R.slice(1, R.length - 1)), R === "true" || R !== "false" && R);
|
2190
2236
|
}(o, _, y, t.sanitizer);
|
2191
|
-
typeof
|
2237
|
+
typeof D == "string" && (lt.test(D) || dt.test(D)) && (m[M] = a(D.trim()));
|
2192
2238
|
} else
|
2193
|
-
|
2194
|
-
return
|
2239
|
+
h !== "style" && (m[Rt[h] || h] = !0);
|
2240
|
+
return m;
|
2195
2241
|
}, {}) : null;
|
2196
2242
|
}
|
2197
|
-
t.overrides = t.overrides || {}, t.sanitizer = t.sanitizer ||
|
2243
|
+
t.overrides = t.overrides || {}, t.sanitizer = t.sanitizer || Hn, t.slugify = t.slugify || we, t.namedCodesToUnicode = t.namedCodesToUnicode ? de({}, Zt, t.namedCodesToUnicode) : Zt, t.createElement = t.createElement || Ha;
|
2198
2244
|
const l = [], d = {}, p = {
|
2199
2245
|
[k.blockQuote]: {
|
2200
|
-
match:
|
2246
|
+
match: ee(Ir),
|
2201
2247
|
order: 1,
|
2202
2248
|
parse(o, u, s) {
|
2203
|
-
const [,
|
2249
|
+
const [, m, h] = o[0].replace(Uo, "").match(Fo);
|
2204
2250
|
return {
|
2205
|
-
alert:
|
2206
|
-
children: u(
|
2251
|
+
alert: m,
|
2252
|
+
children: u(h, s)
|
2207
2253
|
};
|
2208
2254
|
},
|
2209
2255
|
render(o, u, s) {
|
2210
|
-
const
|
2256
|
+
const m = {
|
2211
2257
|
key: s.key
|
2212
2258
|
};
|
2213
|
-
return o.alert && (
|
2259
|
+
return o.alert && (m.className = "markdown-alert-" + t.slugify(o.alert.toLowerCase(), we), o.children.unshift({
|
2214
2260
|
attrs: {},
|
2215
2261
|
children: [{
|
2216
2262
|
type: k.text,
|
@@ -2219,40 +2265,40 @@ function Bn(e = "", t = {}) {
|
|
2219
2265
|
noInnerParse: !0,
|
2220
2266
|
type: k.htmlBlock,
|
2221
2267
|
tag: "header"
|
2222
|
-
})), r("blockquote",
|
2268
|
+
})), r("blockquote", m, u(o.children, s));
|
2223
2269
|
}
|
2224
2270
|
},
|
2225
2271
|
[k.breakLine]: {
|
2226
|
-
match:
|
2272
|
+
match: _e(Vo),
|
2227
2273
|
order: 1,
|
2228
|
-
parse:
|
2274
|
+
parse: Xe,
|
2229
2275
|
render: (o, u, s) => r("br", {
|
2230
2276
|
key: s.key
|
2231
2277
|
})
|
2232
2278
|
},
|
2233
2279
|
[k.breakThematic]: {
|
2234
|
-
match:
|
2280
|
+
match: ee($o),
|
2235
2281
|
order: 1,
|
2236
|
-
parse:
|
2282
|
+
parse: Xe,
|
2237
2283
|
render: (o, u, s) => r("hr", {
|
2238
2284
|
key: s.key
|
2239
2285
|
})
|
2240
2286
|
},
|
2241
2287
|
[k.codeBlock]: {
|
2242
|
-
match:
|
2288
|
+
match: ee(Ar),
|
2243
2289
|
order: 0,
|
2244
2290
|
parse: (o) => ({
|
2245
2291
|
lang: void 0,
|
2246
|
-
text:
|
2292
|
+
text: Se(o[0].replace(/^ {4}/gm, "")).replace(Wt, "$1")
|
2247
2293
|
}),
|
2248
2294
|
render: (o, u, s) => r("pre", {
|
2249
2295
|
key: s.key
|
2250
|
-
}, r("code",
|
2296
|
+
}, r("code", de({}, o.attrs, {
|
2251
2297
|
className: o.lang ? `lang-${o.lang}` : ""
|
2252
2298
|
}), o.text))
|
2253
2299
|
},
|
2254
2300
|
[k.codeFenced]: {
|
2255
|
-
match:
|
2301
|
+
match: ee(Dr),
|
2256
2302
|
order: 0,
|
2257
2303
|
parse: (o) => ({
|
2258
2304
|
attrs: i("code", o[3] || ""),
|
@@ -2262,29 +2308,29 @@ function Bn(e = "", t = {}) {
|
|
2262
2308
|
})
|
2263
2309
|
},
|
2264
2310
|
[k.codeInline]: {
|
2265
|
-
match: oe(
|
2311
|
+
match: oe(Jo),
|
2266
2312
|
order: 3,
|
2267
2313
|
parse: (o) => ({
|
2268
|
-
text: o[2].replace(
|
2314
|
+
text: o[2].replace(Wt, "$1")
|
2269
2315
|
}),
|
2270
2316
|
render: (o, u, s) => r("code", {
|
2271
2317
|
key: s.key
|
2272
2318
|
}, o.text)
|
2273
2319
|
},
|
2274
2320
|
[k.footnote]: {
|
2275
|
-
match:
|
2321
|
+
match: ee(en),
|
2276
2322
|
order: 0,
|
2277
2323
|
parse: (o) => (l.push({
|
2278
2324
|
footnote: o[2],
|
2279
2325
|
identifier: o[1]
|
2280
2326
|
}), {}),
|
2281
|
-
render:
|
2327
|
+
render: Ke
|
2282
2328
|
},
|
2283
2329
|
[k.footnoteReference]: {
|
2284
|
-
match: ie(
|
2330
|
+
match: ie(tn),
|
2285
2331
|
order: 1,
|
2286
2332
|
parse: (o) => ({
|
2287
|
-
target: `#${t.slugify(o[1],
|
2333
|
+
target: `#${t.slugify(o[1], we)}`,
|
2288
2334
|
text: o[1]
|
2289
2335
|
}),
|
2290
2336
|
render: (o, u, s) => r("a", {
|
@@ -2295,7 +2341,7 @@ function Bn(e = "", t = {}) {
|
|
2295
2341
|
}, o.text))
|
2296
2342
|
},
|
2297
2343
|
[k.gfmTask]: {
|
2298
|
-
match: ie(
|
2344
|
+
match: ie(on),
|
2299
2345
|
order: 1,
|
2300
2346
|
parse: (o) => ({
|
2301
2347
|
completed: o[1].toLowerCase() === "x"
|
@@ -2308,11 +2354,11 @@ function Bn(e = "", t = {}) {
|
|
2308
2354
|
})
|
2309
2355
|
},
|
2310
2356
|
[k.heading]: {
|
2311
|
-
match:
|
2357
|
+
match: ee(t.enforceAtxHeadings ? Tr : Lr),
|
2312
2358
|
order: 1,
|
2313
2359
|
parse: (o, u, s) => ({
|
2314
2360
|
children: Ze(u, o[2], s),
|
2315
|
-
id: t.slugify(o[2],
|
2361
|
+
id: t.slugify(o[2], we),
|
2316
2362
|
level: o[1].length
|
2317
2363
|
}),
|
2318
2364
|
render: (o, u, s) => r(`h${o.level}`, {
|
@@ -2321,7 +2367,7 @@ function Bn(e = "", t = {}) {
|
|
2321
2367
|
}, u(o.children, s))
|
2322
2368
|
},
|
2323
2369
|
[k.headingSetext]: {
|
2324
|
-
match:
|
2370
|
+
match: ee(Nr),
|
2325
2371
|
order: 0,
|
2326
2372
|
parse: (o, u, s) => ({
|
2327
2373
|
children: Ze(u, o[1], s),
|
@@ -2330,24 +2376,24 @@ function Bn(e = "", t = {}) {
|
|
2330
2376
|
})
|
2331
2377
|
},
|
2332
2378
|
[k.htmlBlock]: {
|
2333
|
-
match:
|
2379
|
+
match: _e(lt),
|
2334
2380
|
order: 1,
|
2335
2381
|
parse(o, u, s) {
|
2336
|
-
const [,
|
2382
|
+
const [, m] = o[3].match(An), h = new RegExp(`^${m}`, "gm"), w = o[3].replace(h, ""), _ = (y = w, Zn.some((R) => R.test(y)) ? Yn : Ze);
|
2337
2383
|
var y;
|
2338
|
-
const M = o[1].toLowerCase(),
|
2384
|
+
const M = o[1].toLowerCase(), D = Go.indexOf(M) !== -1, S = (D ? M : o[1]).trim(), A = {
|
2339
2385
|
attrs: i(S, o[2]),
|
2340
|
-
noInnerParse:
|
2386
|
+
noInnerParse: D,
|
2341
2387
|
tag: S
|
2342
2388
|
};
|
2343
|
-
return s.inAnchor = s.inAnchor || M === "a",
|
2389
|
+
return s.inAnchor = s.inAnchor || M === "a", D ? A.text = o[3] : A.children = _(u, w, s), s.inAnchor = !1, A;
|
2344
2390
|
},
|
2345
|
-
render: (o, u, s) => r(o.tag,
|
2391
|
+
render: (o, u, s) => r(o.tag, de({
|
2346
2392
|
key: s.key
|
2347
2393
|
}, o.attrs), o.text || (o.children ? u(o.children, s) : ""))
|
2348
2394
|
},
|
2349
2395
|
[k.htmlSelfClosing]: {
|
2350
|
-
match:
|
2396
|
+
match: _e(dt),
|
2351
2397
|
order: 1,
|
2352
2398
|
parse(o) {
|
2353
2399
|
const u = o[1].trim();
|
@@ -2356,22 +2402,22 @@ function Bn(e = "", t = {}) {
|
|
2356
2402
|
tag: u
|
2357
2403
|
};
|
2358
2404
|
},
|
2359
|
-
render: (o, u, s) => r(o.tag,
|
2405
|
+
render: (o, u, s) => r(o.tag, de({}, o.attrs, {
|
2360
2406
|
key: s.key
|
2361
2407
|
}))
|
2362
2408
|
},
|
2363
2409
|
[k.htmlComment]: {
|
2364
|
-
match:
|
2410
|
+
match: _e(jr),
|
2365
2411
|
order: 1,
|
2366
2412
|
parse: () => ({}),
|
2367
|
-
render:
|
2413
|
+
render: Ke
|
2368
2414
|
},
|
2369
2415
|
[k.image]: {
|
2370
|
-
match: oe(
|
2416
|
+
match: oe(Rn),
|
2371
2417
|
order: 1,
|
2372
2418
|
parse: (o) => ({
|
2373
2419
|
alt: o[1],
|
2374
|
-
target:
|
2420
|
+
target: Ht(o[2]),
|
2375
2421
|
title: o[3]
|
2376
2422
|
}),
|
2377
2423
|
render: (o, u, s) => r("img", {
|
@@ -2382,11 +2428,11 @@ function Bn(e = "", t = {}) {
|
|
2382
2428
|
})
|
2383
2429
|
},
|
2384
2430
|
[k.link]: {
|
2385
|
-
match: ie(
|
2431
|
+
match: ie(zn),
|
2386
2432
|
order: 3,
|
2387
2433
|
parse: (o, u, s) => ({
|
2388
|
-
children:
|
2389
|
-
target:
|
2434
|
+
children: Bn(u, o[1], s),
|
2435
|
+
target: Ht(o[2]),
|
2390
2436
|
title: o[3]
|
2391
2437
|
}),
|
2392
2438
|
render: (o, u, s) => r("a", {
|
@@ -2396,7 +2442,7 @@ function Bn(e = "", t = {}) {
|
|
2396
2442
|
}, u(o.children, s))
|
2397
2443
|
},
|
2398
2444
|
[k.linkAngleBraceStyleDetector]: {
|
2399
|
-
match: ie(
|
2445
|
+
match: ie(pn),
|
2400
2446
|
order: 0,
|
2401
2447
|
parse: (o) => ({
|
2402
2448
|
children: [{
|
@@ -2408,7 +2454,7 @@ function Bn(e = "", t = {}) {
|
|
2408
2454
|
})
|
2409
2455
|
},
|
2410
2456
|
[k.linkBareUrlDetector]: {
|
2411
|
-
match:
|
2457
|
+
match: fe((o, u) => u.inAnchor || t.disableAutoLink ? null : ie(sn)(o, u)),
|
2412
2458
|
order: 0,
|
2413
2459
|
parse: (o) => ({
|
2414
2460
|
children: [{
|
@@ -2421,11 +2467,11 @@ function Bn(e = "", t = {}) {
|
|
2421
2467
|
})
|
2422
2468
|
},
|
2423
2469
|
[k.linkMailtoDetector]: {
|
2424
|
-
match: ie(
|
2470
|
+
match: ie(cn),
|
2425
2471
|
order: 0,
|
2426
2472
|
parse(o) {
|
2427
2473
|
let u = o[1], s = o[1];
|
2428
|
-
return
|
2474
|
+
return Yo.test(s) || (s = "mailto:" + s), {
|
2429
2475
|
children: [{
|
2430
2476
|
text: u.replace("mailto:", ""),
|
2431
2477
|
type: k.text
|
@@ -2435,34 +2481,34 @@ function Bn(e = "", t = {}) {
|
|
2435
2481
|
};
|
2436
2482
|
}
|
2437
2483
|
},
|
2438
|
-
[k.orderedList]:
|
2439
|
-
[k.unorderedList]:
|
2484
|
+
[k.orderedList]: Pt(r, 1),
|
2485
|
+
[k.unorderedList]: Pt(r, 2),
|
2440
2486
|
[k.newlineCoalescer]: {
|
2441
|
-
match:
|
2487
|
+
match: ee(Xo),
|
2442
2488
|
order: 3,
|
2443
|
-
parse:
|
2489
|
+
parse: Xe,
|
2444
2490
|
render: () => `
|
2445
2491
|
`
|
2446
2492
|
},
|
2447
2493
|
[k.paragraph]: {
|
2448
|
-
match:
|
2494
|
+
match: fe(qn),
|
2449
2495
|
order: 3,
|
2450
|
-
parse:
|
2496
|
+
parse: Je,
|
2451
2497
|
render: (o, u, s) => r("p", {
|
2452
2498
|
key: s.key
|
2453
2499
|
}, u(o.children, s))
|
2454
2500
|
},
|
2455
2501
|
[k.ref]: {
|
2456
|
-
match: ie(
|
2502
|
+
match: ie(gn),
|
2457
2503
|
order: 0,
|
2458
2504
|
parse: (o) => (d[o[1]] = {
|
2459
2505
|
target: o[2],
|
2460
2506
|
title: o[4]
|
2461
2507
|
}, {}),
|
2462
|
-
render:
|
2508
|
+
render: Ke
|
2463
2509
|
},
|
2464
2510
|
[k.refImage]: {
|
2465
|
-
match: oe(
|
2511
|
+
match: oe(hn),
|
2466
2512
|
order: 0,
|
2467
2513
|
parse: (o) => ({
|
2468
2514
|
alt: o[1] || void 0,
|
@@ -2476,7 +2522,7 @@ function Bn(e = "", t = {}) {
|
|
2476
2522
|
}) : null
|
2477
2523
|
},
|
2478
2524
|
[k.refLink]: {
|
2479
|
-
match: ie(
|
2525
|
+
match: ie(mn),
|
2480
2526
|
order: 0,
|
2481
2527
|
parse: (o, u, s) => ({
|
2482
2528
|
children: u(o[1], s),
|
@@ -2492,40 +2538,40 @@ function Bn(e = "", t = {}) {
|
|
2492
2538
|
}, o.fallbackChildren)
|
2493
2539
|
},
|
2494
2540
|
[k.table]: {
|
2495
|
-
match:
|
2541
|
+
match: ee(Or),
|
2496
2542
|
order: 1,
|
2497
|
-
parse:
|
2543
|
+
parse: Pn,
|
2498
2544
|
render(o, u, s) {
|
2499
|
-
const
|
2545
|
+
const m = o;
|
2500
2546
|
return r("table", {
|
2501
2547
|
key: s.key
|
2502
|
-
}, r("thead", null, r("tr", null,
|
2548
|
+
}, r("thead", null, r("tr", null, m.header.map(function(h, w) {
|
2503
2549
|
return r("th", {
|
2504
2550
|
key: w,
|
2505
|
-
style: Gt(
|
2506
|
-
}, u(
|
2507
|
-
}))), r("tbody", null,
|
2551
|
+
style: Gt(m, w)
|
2552
|
+
}, u(h, s));
|
2553
|
+
}))), r("tbody", null, m.cells.map(function(h, w) {
|
2508
2554
|
return r("tr", {
|
2509
2555
|
key: w
|
2510
|
-
},
|
2556
|
+
}, h.map(function(_, y) {
|
2511
2557
|
return r("td", {
|
2512
2558
|
key: y,
|
2513
|
-
style: Gt(
|
2559
|
+
style: Gt(m, y)
|
2514
2560
|
}, u(_, s));
|
2515
2561
|
}));
|
2516
2562
|
})));
|
2517
2563
|
}
|
2518
2564
|
},
|
2519
2565
|
[k.text]: {
|
2520
|
-
match:
|
2566
|
+
match: _e(In),
|
2521
2567
|
order: 4,
|
2522
2568
|
parse: (o) => ({
|
2523
|
-
text: o[0].replace(
|
2569
|
+
text: o[0].replace(nn, (u, s) => t.namedCodesToUnicode[s] ? t.namedCodesToUnicode[s] : u)
|
2524
2570
|
}),
|
2525
2571
|
render: (o) => o.text
|
2526
2572
|
},
|
2527
2573
|
[k.textBolded]: {
|
2528
|
-
match: oe(
|
2574
|
+
match: oe(_n),
|
2529
2575
|
order: 2,
|
2530
2576
|
parse: (o, u, s) => ({
|
2531
2577
|
children: u(o[2], s)
|
@@ -2535,7 +2581,7 @@ function Bn(e = "", t = {}) {
|
|
2535
2581
|
}, u(o.children, s))
|
2536
2582
|
},
|
2537
2583
|
[k.textEmphasized]: {
|
2538
|
-
match: oe(
|
2584
|
+
match: oe(Cn),
|
2539
2585
|
order: 3,
|
2540
2586
|
parse: (o, u, s) => ({
|
2541
2587
|
children: u(o[2], s)
|
@@ -2545,7 +2591,7 @@ function Bn(e = "", t = {}) {
|
|
2545
2591
|
}, u(o.children, s))
|
2546
2592
|
},
|
2547
2593
|
[k.textEscaped]: {
|
2548
|
-
match: oe(
|
2594
|
+
match: oe(Mn),
|
2549
2595
|
order: 1,
|
2550
2596
|
parse: (o) => ({
|
2551
2597
|
text: o[1],
|
@@ -2553,17 +2599,17 @@ function Bn(e = "", t = {}) {
|
|
2553
2599
|
})
|
2554
2600
|
},
|
2555
2601
|
[k.textMarked]: {
|
2556
|
-
match: oe(
|
2602
|
+
match: oe(vn),
|
2557
2603
|
order: 3,
|
2558
|
-
parse:
|
2604
|
+
parse: Je,
|
2559
2605
|
render: (o, u, s) => r("mark", {
|
2560
2606
|
key: s.key
|
2561
2607
|
}, u(o.children, s))
|
2562
2608
|
},
|
2563
2609
|
[k.textStrikethroughed]: {
|
2564
|
-
match: oe(
|
2610
|
+
match: oe(Sn),
|
2565
2611
|
order: 3,
|
2566
|
-
parse:
|
2612
|
+
parse: Je,
|
2567
2613
|
render: (o, u, s) => r("del", {
|
2568
2614
|
key: s.key
|
2569
2615
|
}, u(o.children, s))
|
@@ -2572,66 +2618,66 @@ function Bn(e = "", t = {}) {
|
|
2572
2618
|
t.disableParsingRawHTML === !0 && (delete p[k.htmlBlock], delete p[k.htmlSelfClosing]);
|
2573
2619
|
const c = function(o) {
|
2574
2620
|
let u = Object.keys(o);
|
2575
|
-
function s(
|
2576
|
-
let w, _, y = [], M = "",
|
2577
|
-
for (
|
2621
|
+
function s(m, h) {
|
2622
|
+
let w, _, y = [], M = "", D = "";
|
2623
|
+
for (h.prevCapture = h.prevCapture || ""; m; ) {
|
2578
2624
|
let S = 0;
|
2579
2625
|
for (; S < u.length; ) {
|
2580
|
-
if (M = u[S], w = o[M],
|
2626
|
+
if (M = u[S], w = o[M], h.inline && !w.match.inline) {
|
2581
2627
|
S++;
|
2582
2628
|
continue;
|
2583
2629
|
}
|
2584
|
-
const
|
2585
|
-
if (
|
2586
|
-
|
2630
|
+
const A = w.match(m, h);
|
2631
|
+
if (A) {
|
2632
|
+
D = A[0], h.prevCapture += D, m = m.substring(D.length), _ = w.parse(A, s, h), _.type == null && (_.type = M), y.push(_);
|
2587
2633
|
break;
|
2588
2634
|
}
|
2589
2635
|
S++;
|
2590
2636
|
}
|
2591
2637
|
}
|
2592
|
-
return
|
2638
|
+
return h.prevCapture = "", y;
|
2593
2639
|
}
|
2594
|
-
return u.sort(function(
|
2595
|
-
let w = o[
|
2596
|
-
return w !== _ ? w - _ :
|
2597
|
-
}), function(
|
2640
|
+
return u.sort(function(m, h) {
|
2641
|
+
let w = o[m].order, _ = o[h].order;
|
2642
|
+
return w !== _ ? w - _ : m < h ? -1 : 1;
|
2643
|
+
}), function(m, h) {
|
2598
2644
|
return s(function(w) {
|
2599
|
-
return w.replace(
|
2600
|
-
`).replace(
|
2601
|
-
}(
|
2645
|
+
return w.replace(Ko, `
|
2646
|
+
`).replace(rn, "").replace(fn, " ");
|
2647
|
+
}(m), h);
|
2602
2648
|
};
|
2603
|
-
}(p), g = (
|
2604
|
-
return function(s,
|
2649
|
+
}(p), g = (f = /* @__PURE__ */ function(o, u) {
|
2650
|
+
return function(s, m, h) {
|
2605
2651
|
const w = o[s.type].render;
|
2606
|
-
return u ? u(() => w(s,
|
2652
|
+
return u ? u(() => w(s, m, h), s, m, h) : w(s, m, h);
|
2607
2653
|
};
|
2608
2654
|
}(p, t.renderRule), function o(u, s = {}) {
|
2609
2655
|
if (Array.isArray(u)) {
|
2610
|
-
const
|
2656
|
+
const m = s.key, h = [];
|
2611
2657
|
let w = !1;
|
2612
2658
|
for (let _ = 0; _ < u.length; _++) {
|
2613
2659
|
s.key = _;
|
2614
2660
|
const y = o(u[_], s), M = typeof y == "string";
|
2615
|
-
M && w ?
|
2661
|
+
M && w ? h[h.length - 1] += y : y !== null && h.push(y), w = M;
|
2616
2662
|
}
|
2617
|
-
return s.key =
|
2663
|
+
return s.key = m, h;
|
2618
2664
|
}
|
2619
|
-
return
|
2665
|
+
return f(u, o, s);
|
2620
2666
|
});
|
2621
|
-
var
|
2622
|
-
const
|
2623
|
-
return l.length ? r("div", null,
|
2667
|
+
var f;
|
2668
|
+
const x = a(e);
|
2669
|
+
return l.length ? r("div", null, x, r("footer", {
|
2624
2670
|
key: "footer"
|
2625
2671
|
}, l.map(function(o) {
|
2626
2672
|
return r("div", {
|
2627
|
-
id: t.slugify(o.identifier,
|
2673
|
+
id: t.slugify(o.identifier, we),
|
2628
2674
|
key: o.identifier
|
2629
2675
|
}, o.identifier, g(c(o.footnote, {
|
2630
2676
|
inline: !0
|
2631
2677
|
})));
|
2632
|
-
}))) :
|
2678
|
+
}))) : x;
|
2633
2679
|
}
|
2634
|
-
const
|
2680
|
+
const Fn = (e) => {
|
2635
2681
|
let {
|
2636
2682
|
children: t = "",
|
2637
2683
|
options: r
|
@@ -2642,9 +2688,9 @@ const Yn = (e) => {
|
|
2642
2688
|
for (p = 0; p < g.length; p++)
|
2643
2689
|
l.indexOf(d = g[p]) >= 0 || (c[d] = i[d]);
|
2644
2690
|
return c;
|
2645
|
-
}(e,
|
2646
|
-
return
|
2647
|
-
},
|
2691
|
+
}(e, qo);
|
2692
|
+
return Oa(Un(t, r), a);
|
2693
|
+
}, Vn = /* @__PURE__ */ C("div", {
|
2648
2694
|
target: "e1vkf9b40",
|
2649
2695
|
label: "FlexContainer"
|
2650
2696
|
})("display:flex;", ({
|
@@ -2653,7 +2699,7 @@ const Yn = (e) => {
|
|
2653
2699
|
justify-content: flex-end;
|
2654
2700
|
` : P`
|
2655
2701
|
justify-content: flex-start;
|
2656
|
-
`),
|
2702
|
+
`), Br = /* @__PURE__ */ C("div", {
|
2657
2703
|
target: "e1vkf9b41",
|
2658
2704
|
label: "MessageContainer"
|
2659
2705
|
})("font-size:inherit;line-height:inherit;padding-top:8.5px;padding-bottom:8.5px;padding-left:0.5rem;padding-right:0.5rem;white-space:pre-wrap;overflow-wrap:break-word;box-sizing:border-box;", ({
|
@@ -2673,86 +2719,86 @@ const Yn = (e) => {
|
|
2673
2719
|
}) => e.aiChat.primaryTextColor, ";background-color:", ({
|
2674
2720
|
theme: e,
|
2675
2721
|
align: t
|
2676
|
-
}) => t === "right" ? e.aiChat.userMessages.backgroundColor : e.aiChat.systemMessages.backgroundColor, ";"),
|
2722
|
+
}) => t === "right" ? e.aiChat.userMessages.backgroundColor : e.aiChat.systemMessages.backgroundColor, ";"), ne = ({
|
2677
2723
|
align: e,
|
2678
2724
|
children: t
|
2679
2725
|
}) => {
|
2680
2726
|
const {
|
2681
2727
|
themeSettings: r
|
2682
|
-
} =
|
2683
|
-
return /* @__PURE__ */ n(
|
2728
|
+
} = L();
|
2729
|
+
return /* @__PURE__ */ n(Vn, {
|
2684
2730
|
theme: r,
|
2685
2731
|
align: e,
|
2686
|
-
children: /* @__PURE__ */ n(
|
2732
|
+
children: /* @__PURE__ */ n(Br, {
|
2687
2733
|
theme: r,
|
2688
2734
|
align: e,
|
2689
|
-
children: typeof t == "string" ? /* @__PURE__ */ n(
|
2735
|
+
children: typeof t == "string" ? /* @__PURE__ */ n(Fn, {
|
2690
2736
|
children: t
|
2691
2737
|
}) : t
|
2692
2738
|
})
|
2693
2739
|
});
|
2694
2740
|
};
|
2695
|
-
function
|
2741
|
+
function $n() {
|
2696
2742
|
const {
|
2697
2743
|
welcomeText: e
|
2698
|
-
} =
|
2699
|
-
return e === !1 ? null : /* @__PURE__ */ n(
|
2744
|
+
} = ae();
|
2745
|
+
return e === !1 ? null : /* @__PURE__ */ n(ne, {
|
2700
2746
|
align: "left",
|
2701
2747
|
children: e
|
2702
2748
|
});
|
2703
2749
|
}
|
2704
|
-
const
|
2750
|
+
const Jn = /* @__PURE__ */ C("div", {
|
2705
2751
|
target: "e1r5p4wy0",
|
2706
2752
|
label: "Container"
|
2707
|
-
})("margin:auto;display:flex;flex-direction:column;align-items:center;row-gap:21px;"),
|
2753
|
+
})("margin:auto;display:flex;flex-direction:column;align-items:center;row-gap:21px;"), Xn = /* @__PURE__ */ C("div", {
|
2708
2754
|
target: "e1r5p4wy1",
|
2709
2755
|
label: "Title"
|
2710
2756
|
})("color:", ({
|
2711
2757
|
theme: e
|
2712
|
-
}) => e.aiChat.primaryTextColor, ";text-align:center;font-weight:600;"),
|
2758
|
+
}) => e.aiChat.primaryTextColor, ";text-align:center;font-weight:600;"), Kn = /* @__PURE__ */ C("div", {
|
2713
2759
|
target: "e1r5p4wy2",
|
2714
2760
|
label: "ActionButton"
|
2715
2761
|
})("color:rgba(54,163,217,1);cursor:pointer;");
|
2716
|
-
function
|
2762
|
+
function Yr({
|
2717
2763
|
text: e,
|
2718
2764
|
action: t
|
2719
2765
|
}) {
|
2720
2766
|
const {
|
2721
2767
|
themeSettings: r
|
2722
|
-
} =
|
2723
|
-
return /* @__PURE__ */ v(
|
2724
|
-
children: [/* @__PURE__ */ n(
|
2768
|
+
} = L();
|
2769
|
+
return /* @__PURE__ */ v(Jn, {
|
2770
|
+
children: [/* @__PURE__ */ n(Xn, {
|
2725
2771
|
theme: r,
|
2726
2772
|
children: e
|
2727
|
-
}), /* @__PURE__ */ n(
|
2773
|
+
}), /* @__PURE__ */ n(Ca, {}), t && /* @__PURE__ */ n(Kn, {
|
2728
2774
|
onClick: t.onClick,
|
2729
2775
|
children: t.text
|
2730
2776
|
})]
|
2731
2777
|
});
|
2732
2778
|
}
|
2733
|
-
const
|
2779
|
+
const Ee = /* @__PURE__ */ C("div", {
|
2734
2780
|
target: "e3ryei50",
|
2735
2781
|
label: "Dot"
|
2736
2782
|
})("width:5px;height:5px;border-radius:50%;background-color:", (e) => e.color, ";animation:hop 0.9s ease-out infinite;&:nth-of-type(2){animation-delay:0.1s;}&:nth-of-type(3){animation-delay:0.2s;}&:nth-of-type(4){animation-delay:0.3s;}@keyframes hop{0%,40%{transform:translateY(0);}20%{transform:translateY(-100%);}}");
|
2737
|
-
function
|
2783
|
+
function Qr() {
|
2738
2784
|
const {
|
2739
2785
|
themeSettings: e
|
2740
|
-
} =
|
2786
|
+
} = L(), t = e.aiChat.icons.color;
|
2741
2787
|
return /* @__PURE__ */ v("div", {
|
2742
2788
|
className: "csdk-flex csdk-justify-between csdk-w-[28px] csdk-py-[14.5px]",
|
2743
2789
|
"aria-label": "loading dots",
|
2744
|
-
children: [/* @__PURE__ */ n(
|
2790
|
+
children: [/* @__PURE__ */ n(Ee, {
|
2745
2791
|
color: t
|
2746
|
-
}), /* @__PURE__ */ n(
|
2792
|
+
}), /* @__PURE__ */ n(Ee, {
|
2747
2793
|
color: t
|
2748
|
-
}), /* @__PURE__ */ n(
|
2794
|
+
}), /* @__PURE__ */ n(Ee, {
|
2749
2795
|
color: t
|
2750
|
-
}), /* @__PURE__ */ n(
|
2796
|
+
}), /* @__PURE__ */ n(Ee, {
|
2751
2797
|
color: t
|
2752
2798
|
})]
|
2753
2799
|
});
|
2754
2800
|
}
|
2755
|
-
const
|
2801
|
+
const el = /* @__PURE__ */ C("div", {
|
2756
2802
|
target: "ed5z2fc0",
|
2757
2803
|
label: "FlexContainer"
|
2758
2804
|
})("display:flex;", ({
|
@@ -2761,7 +2807,7 @@ const Xn = /* @__PURE__ */ C("div", {
|
|
2761
2807
|
justify-content: flex-end;
|
2762
2808
|
` : P`
|
2763
2809
|
justify-content: flex-start;
|
2764
|
-
`),
|
2810
|
+
`), tl = /* @__PURE__ */ C("button", {
|
2765
2811
|
target: "ed5z2fc1",
|
2766
2812
|
label: "MessageButton"
|
2767
2813
|
})("font-family:inherit;font-size:inherit;line-height:inherit;border:", ({
|
@@ -2815,7 +2861,7 @@ const Xn = /* @__PURE__ */ C("div", {
|
|
2815
2861
|
}
|
2816
2862
|
return "";
|
2817
2863
|
});
|
2818
|
-
function
|
2864
|
+
function Ge({
|
2819
2865
|
children: e,
|
2820
2866
|
align: t,
|
2821
2867
|
onClick: r,
|
@@ -2825,10 +2871,10 @@ function Pe({
|
|
2825
2871
|
}) {
|
2826
2872
|
const {
|
2827
2873
|
themeSettings: d
|
2828
|
-
} =
|
2829
|
-
return /* @__PURE__ */ n(
|
2874
|
+
} = L();
|
2875
|
+
return /* @__PURE__ */ n(el, {
|
2830
2876
|
align: t,
|
2831
|
-
children: /* @__PURE__ */ n(
|
2877
|
+
children: /* @__PURE__ */ n(tl, {
|
2832
2878
|
"aria-label": l,
|
2833
2879
|
theme: d,
|
2834
2880
|
onClick: r,
|
@@ -2839,20 +2885,20 @@ function Pe({
|
|
2839
2885
|
})
|
2840
2886
|
});
|
2841
2887
|
}
|
2842
|
-
function
|
2888
|
+
function rl({
|
2843
2889
|
onCancel: e,
|
2844
2890
|
onConfirm: t
|
2845
2891
|
}) {
|
2846
2892
|
const {
|
2847
2893
|
t: r
|
2848
|
-
} =
|
2849
|
-
return /* @__PURE__ */ v(
|
2850
|
-
children: [/* @__PURE__ */ n(
|
2894
|
+
} = E();
|
2895
|
+
return /* @__PURE__ */ v(Y, {
|
2896
|
+
children: [/* @__PURE__ */ n(ne, {
|
2851
2897
|
align: "left",
|
2852
2898
|
children: r("ai.clearHistoryPrompt")
|
2853
2899
|
}), /* @__PURE__ */ v("div", {
|
2854
2900
|
className: "csdk-flex csdk-gap-x-2",
|
2855
|
-
children: [/* @__PURE__ */ n(
|
2901
|
+
children: [/* @__PURE__ */ n(Ge, {
|
2856
2902
|
align: "right",
|
2857
2903
|
onClick: t,
|
2858
2904
|
accessibleName: "confirm clear chat",
|
@@ -2860,7 +2906,7 @@ function Kn({
|
|
2860
2906
|
className: "csdk-py-[6px] csdk-px-[20px]",
|
2861
2907
|
children: r("ai.buttons.yes")
|
2862
2908
|
})
|
2863
|
-
}), /* @__PURE__ */ n(
|
2909
|
+
}), /* @__PURE__ */ n(Ge, {
|
2864
2910
|
align: "right",
|
2865
2911
|
onClick: e,
|
2866
2912
|
accessibleName: "cancel clear chat",
|
@@ -2872,19 +2918,19 @@ function Kn({
|
|
2872
2918
|
})]
|
2873
2919
|
});
|
2874
2920
|
}
|
2875
|
-
function
|
2876
|
-
return
|
2921
|
+
function al(e) {
|
2922
|
+
return Ma("MuiDialog", e);
|
2877
2923
|
}
|
2878
|
-
const
|
2879
|
-
process.env.NODE_ENV !== "production" && (
|
2880
|
-
const
|
2924
|
+
const tt = pa("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), Ur = /* @__PURE__ */ He({});
|
2925
|
+
process.env.NODE_ENV !== "production" && (Ur.displayName = "DialogContext");
|
2926
|
+
const il = Be(ua, {
|
2881
2927
|
name: "MuiDialog",
|
2882
2928
|
slot: "Backdrop",
|
2883
2929
|
overrides: (e, t) => t.backdrop
|
2884
2930
|
})({
|
2885
2931
|
// Improve scrollable dialog support.
|
2886
2932
|
zIndex: -1
|
2887
|
-
}),
|
2933
|
+
}), ol = (e) => {
|
2888
2934
|
const {
|
2889
2935
|
classes: t,
|
2890
2936
|
scroll: r,
|
@@ -2893,11 +2939,11 @@ const tl = qe(ca, {
|
|
2893
2939
|
fullScreen: l
|
2894
2940
|
} = e, d = {
|
2895
2941
|
root: ["root"],
|
2896
|
-
container: ["container", `scroll${
|
2897
|
-
paper: ["paper", `paperScroll${
|
2942
|
+
container: ["container", `scroll${me(r)}`],
|
2943
|
+
paper: ["paper", `paperScroll${me(r)}`, `paperWidth${me(String(a))}`, i && "paperFullWidth", l && "paperFullScreen"]
|
2898
2944
|
};
|
2899
|
-
return
|
2900
|
-
},
|
2945
|
+
return wa(d, al, t);
|
2946
|
+
}, nl = Be(ga, {
|
2901
2947
|
name: "MuiDialog",
|
2902
2948
|
slot: "Root",
|
2903
2949
|
overridesResolver: (e, t) => t.root
|
@@ -2906,14 +2952,14 @@ const tl = qe(ca, {
|
|
2906
2952
|
// Use !important to override the Modal inline-style.
|
2907
2953
|
position: "absolute !important"
|
2908
2954
|
}
|
2909
|
-
}),
|
2955
|
+
}), ll = Be("div", {
|
2910
2956
|
name: "MuiDialog",
|
2911
2957
|
slot: "Container",
|
2912
2958
|
overridesResolver: (e, t) => {
|
2913
2959
|
const {
|
2914
2960
|
ownerState: r
|
2915
2961
|
} = e;
|
2916
|
-
return [t.container, t[`scroll${
|
2962
|
+
return [t.container, t[`scroll${me(r.scroll)}`]];
|
2917
2963
|
}
|
2918
2964
|
})({
|
2919
2965
|
height: "100%",
|
@@ -2948,16 +2994,16 @@ const tl = qe(ca, {
|
|
2948
2994
|
}
|
2949
2995
|
}
|
2950
2996
|
}]
|
2951
|
-
}),
|
2997
|
+
}), dl = Be($t, {
|
2952
2998
|
name: "MuiDialog",
|
2953
2999
|
slot: "Paper",
|
2954
3000
|
overridesResolver: (e, t) => {
|
2955
3001
|
const {
|
2956
3002
|
ownerState: r
|
2957
3003
|
} = e;
|
2958
|
-
return [t.paper, t[`scrollPaper${
|
3004
|
+
return [t.paper, t[`scrollPaper${me(r.scroll)}`], t[`paperWidth${me(String(r.maxWidth))}`], r.fullWidth && t.paperFullWidth, r.fullScreen && t.paperFullScreen];
|
2959
3005
|
}
|
2960
|
-
})(
|
3006
|
+
})(ha(({
|
2961
3007
|
theme: e
|
2962
3008
|
}) => ({
|
2963
3009
|
margin: 32,
|
@@ -2998,7 +3044,7 @@ const tl = qe(ca, {
|
|
2998
3044
|
},
|
2999
3045
|
style: {
|
3000
3046
|
maxWidth: e.breakpoints.unit === "px" ? Math.max(e.breakpoints.values.xs, 444) : `max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,
|
3001
|
-
[`&.${
|
3047
|
+
[`&.${tt.paperScrollBody}`]: {
|
3002
3048
|
[e.breakpoints.down(Math.max(e.breakpoints.values.xs, 444) + 32 * 2)]: {
|
3003
3049
|
maxWidth: "calc(100% - 64px)"
|
3004
3050
|
}
|
@@ -3010,7 +3056,7 @@ const tl = qe(ca, {
|
|
3010
3056
|
},
|
3011
3057
|
style: {
|
3012
3058
|
maxWidth: `${e.breakpoints.values[t]}${e.breakpoints.unit}`,
|
3013
|
-
[`&.${
|
3059
|
+
[`&.${tt.paperScrollBody}`]: {
|
3014
3060
|
[e.breakpoints.down(e.breakpoints.values[t] + 32 * 2)]: {
|
3015
3061
|
maxWidth: "calc(100% - 64px)"
|
3016
3062
|
}
|
@@ -3034,17 +3080,17 @@ const tl = qe(ca, {
|
|
3034
3080
|
height: "100%",
|
3035
3081
|
maxHeight: "none",
|
3036
3082
|
borderRadius: 0,
|
3037
|
-
[`&.${
|
3083
|
+
[`&.${tt.paperScrollBody}`]: {
|
3038
3084
|
margin: 0,
|
3039
3085
|
maxWidth: "100%"
|
3040
3086
|
}
|
3041
3087
|
}
|
3042
3088
|
}]
|
3043
|
-
}))),
|
3044
|
-
const r =
|
3089
|
+
}))), Fr = /* @__PURE__ */ Xt(function(e, t) {
|
3090
|
+
const r = ma({
|
3045
3091
|
props: e,
|
3046
3092
|
name: "MuiDialog"
|
3047
|
-
}), a =
|
3093
|
+
}), a = ba(), i = {
|
3048
3094
|
enter: a.transitions.duration.enteringScreen,
|
3049
3095
|
exit: a.transitions.duration.leavingScreen
|
3050
3096
|
}, l = r, {
|
@@ -3052,118 +3098,118 @@ const tl = qe(ca, {
|
|
3052
3098
|
"aria-labelledby": p,
|
3053
3099
|
"aria-modal": c = !0,
|
3054
3100
|
BackdropComponent: g,
|
3055
|
-
BackdropProps:
|
3056
|
-
children:
|
3101
|
+
BackdropProps: f,
|
3102
|
+
children: x,
|
3057
3103
|
className: o,
|
3058
3104
|
disableEscapeKeyDown: u = !1,
|
3059
3105
|
fullScreen: s = !1,
|
3060
|
-
fullWidth:
|
3061
|
-
maxWidth:
|
3106
|
+
fullWidth: m = !1,
|
3107
|
+
maxWidth: h = "sm",
|
3062
3108
|
onBackdropClick: w,
|
3063
3109
|
onClick: _,
|
3064
3110
|
onClose: y,
|
3065
3111
|
open: M,
|
3066
|
-
PaperComponent:
|
3112
|
+
PaperComponent: D = $t,
|
3067
3113
|
PaperProps: S = {},
|
3068
|
-
scroll:
|
3069
|
-
slots:
|
3070
|
-
slotProps:
|
3071
|
-
TransitionComponent:
|
3072
|
-
transitionDuration:
|
3073
|
-
TransitionProps:
|
3074
|
-
} = l,
|
3114
|
+
scroll: A = "paper",
|
3115
|
+
slots: R = {},
|
3116
|
+
slotProps: pe = {},
|
3117
|
+
TransitionComponent: U = Ct,
|
3118
|
+
transitionDuration: q = i,
|
3119
|
+
TransitionProps: H
|
3120
|
+
} = l, F = Xi(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"]), G = j(I({}, r), {
|
3075
3121
|
disableEscapeKeyDown: u,
|
3076
3122
|
fullScreen: s,
|
3077
|
-
fullWidth:
|
3078
|
-
maxWidth:
|
3079
|
-
scroll:
|
3080
|
-
}),
|
3081
|
-
|
3082
|
-
},
|
3083
|
-
_ && _(
|
3084
|
-
},
|
3085
|
-
titleId:
|
3086
|
-
}), [
|
3087
|
-
transition:
|
3088
|
-
},
|
3089
|
-
transition:
|
3123
|
+
fullWidth: m,
|
3124
|
+
maxWidth: h,
|
3125
|
+
scroll: A
|
3126
|
+
}), V = ol(G), $ = se(), z = (ge) => {
|
3127
|
+
$.current = ge.target === ge.currentTarget;
|
3128
|
+
}, W = (ge) => {
|
3129
|
+
_ && _(ge), $.current && ($.current = null, w && w(ge), y && y(ge, "backdropClick"));
|
3130
|
+
}, B = fa(p), le = Q(() => ({
|
3131
|
+
titleId: B
|
3132
|
+
}), [B]), ue = I({
|
3133
|
+
transition: U
|
3134
|
+
}, R), xe = I({
|
3135
|
+
transition: H,
|
3090
3136
|
paper: S,
|
3091
|
-
backdrop:
|
3092
|
-
},
|
3093
|
-
slots:
|
3094
|
-
slotProps:
|
3095
|
-
}, [
|
3096
|
-
elementType:
|
3137
|
+
backdrop: f
|
3138
|
+
}, pe), T = {
|
3139
|
+
slots: ue,
|
3140
|
+
slotProps: xe
|
3141
|
+
}, [J, Te] = ke("root", {
|
3142
|
+
elementType: nl,
|
3097
3143
|
shouldForwardComponentProp: !0,
|
3098
|
-
externalForwardedProps:
|
3099
|
-
ownerState:
|
3100
|
-
className:
|
3144
|
+
externalForwardedProps: T,
|
3145
|
+
ownerState: G,
|
3146
|
+
className: Ve(V.root, o),
|
3101
3147
|
ref: t
|
3102
|
-
}), [
|
3103
|
-
elementType:
|
3148
|
+
}), [Ne, ra] = ke("backdrop", {
|
3149
|
+
elementType: il,
|
3104
3150
|
shouldForwardComponentProp: !0,
|
3105
|
-
externalForwardedProps:
|
3106
|
-
ownerState:
|
3107
|
-
}), [
|
3108
|
-
elementType:
|
3151
|
+
externalForwardedProps: T,
|
3152
|
+
ownerState: G
|
3153
|
+
}), [aa, ia] = ke("paper", {
|
3154
|
+
elementType: dl,
|
3109
3155
|
shouldForwardComponentProp: !0,
|
3110
|
-
externalForwardedProps:
|
3111
|
-
ownerState:
|
3112
|
-
className:
|
3113
|
-
}), [
|
3114
|
-
elementType:
|
3115
|
-
externalForwardedProps:
|
3116
|
-
ownerState:
|
3117
|
-
className:
|
3118
|
-
}), [
|
3119
|
-
elementType:
|
3120
|
-
externalForwardedProps:
|
3121
|
-
ownerState:
|
3156
|
+
externalForwardedProps: T,
|
3157
|
+
ownerState: G,
|
3158
|
+
className: Ve(V.paper, S.className)
|
3159
|
+
}), [oa, na] = ke("container", {
|
3160
|
+
elementType: ll,
|
3161
|
+
externalForwardedProps: T,
|
3162
|
+
ownerState: G,
|
3163
|
+
className: Ve(V.container)
|
3164
|
+
}), [la, da] = ke("transition", {
|
3165
|
+
elementType: Ct,
|
3166
|
+
externalForwardedProps: T,
|
3167
|
+
ownerState: G,
|
3122
3168
|
additionalProps: {
|
3123
3169
|
appear: !0,
|
3124
3170
|
in: M,
|
3125
|
-
timeout:
|
3171
|
+
timeout: q,
|
3126
3172
|
role: "presentation"
|
3127
3173
|
}
|
3128
3174
|
});
|
3129
|
-
return /* @__PURE__ */
|
3175
|
+
return /* @__PURE__ */ ye(J, j(I(I({
|
3130
3176
|
closeAfterTransition: !0,
|
3131
3177
|
slots: {
|
3132
|
-
backdrop:
|
3178
|
+
backdrop: Ne
|
3133
3179
|
},
|
3134
3180
|
slotProps: {
|
3135
3181
|
backdrop: I({
|
3136
|
-
transitionDuration:
|
3182
|
+
transitionDuration: q,
|
3137
3183
|
as: g
|
3138
|
-
},
|
3184
|
+
}, ra)
|
3139
3185
|
},
|
3140
3186
|
disableEscapeKeyDown: u,
|
3141
3187
|
onClose: y,
|
3142
3188
|
open: M,
|
3143
|
-
onClick:
|
3144
|
-
}, Te),
|
3145
|
-
children: /* @__PURE__ */
|
3146
|
-
children: /* @__PURE__ */
|
3147
|
-
onMouseDown:
|
3148
|
-
},
|
3149
|
-
children: /* @__PURE__ */
|
3150
|
-
as:
|
3189
|
+
onClick: W
|
3190
|
+
}, Te), F), {
|
3191
|
+
children: /* @__PURE__ */ ye(la, j(I({}, da), {
|
3192
|
+
children: /* @__PURE__ */ ye(oa, j(I({
|
3193
|
+
onMouseDown: z
|
3194
|
+
}, na), {
|
3195
|
+
children: /* @__PURE__ */ ye(aa, j(I({
|
3196
|
+
as: D,
|
3151
3197
|
elevation: 24,
|
3152
3198
|
role: "dialog",
|
3153
3199
|
"aria-describedby": d,
|
3154
|
-
"aria-labelledby":
|
3200
|
+
"aria-labelledby": B,
|
3155
3201
|
"aria-modal": c
|
3156
|
-
},
|
3157
|
-
children: /* @__PURE__ */
|
3158
|
-
value:
|
3159
|
-
children:
|
3202
|
+
}, ia), {
|
3203
|
+
children: /* @__PURE__ */ ye(Ur.Provider, {
|
3204
|
+
value: le,
|
3205
|
+
children: x
|
3160
3206
|
})
|
3161
3207
|
}))
|
3162
3208
|
}))
|
3163
3209
|
}))
|
3164
3210
|
}));
|
3165
3211
|
});
|
3166
|
-
process.env.NODE_ENV !== "production" && (
|
3212
|
+
process.env.NODE_ENV !== "production" && (Fr.propTypes = {
|
3167
3213
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
3168
3214
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
3169
3215
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
@@ -3171,17 +3217,17 @@ process.env.NODE_ENV !== "production" && (Yr.propTypes = {
|
|
3171
3217
|
/**
|
3172
3218
|
* The id(s) of the element(s) that describe the dialog.
|
3173
3219
|
*/
|
3174
|
-
"aria-describedby":
|
3220
|
+
"aria-describedby": b.string,
|
3175
3221
|
/**
|
3176
3222
|
* The id(s) of the element(s) that label the dialog.
|
3177
3223
|
*/
|
3178
|
-
"aria-labelledby":
|
3224
|
+
"aria-labelledby": b.string,
|
3179
3225
|
/**
|
3180
3226
|
* Informs assistive technologies that the element is modal.
|
3181
3227
|
* It's added on the element with role="dialog".
|
3182
3228
|
* @default true
|
3183
3229
|
*/
|
3184
|
-
"aria-modal":
|
3230
|
+
"aria-modal": b.oneOfType([b.oneOf(["false", "true"]), b.bool]),
|
3185
3231
|
/**
|
3186
3232
|
* A backdrop component. This prop enables custom backdrop rendering.
|
3187
3233
|
* @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.
|
@@ -3196,116 +3242,116 @@ process.env.NODE_ENV !== "production" && (Yr.propTypes = {
|
|
3196
3242
|
* zIndex: -1,
|
3197
3243
|
* })
|
3198
3244
|
*/
|
3199
|
-
BackdropComponent:
|
3245
|
+
BackdropComponent: b.elementType,
|
3200
3246
|
/**
|
3201
3247
|
* @ignore
|
3202
3248
|
*/
|
3203
|
-
BackdropProps:
|
3249
|
+
BackdropProps: b.object,
|
3204
3250
|
/**
|
3205
3251
|
* Dialog children, usually the included sub-components.
|
3206
3252
|
*/
|
3207
|
-
children:
|
3253
|
+
children: b.node,
|
3208
3254
|
/**
|
3209
3255
|
* Override or extend the styles applied to the component.
|
3210
3256
|
*/
|
3211
|
-
classes:
|
3257
|
+
classes: b.object,
|
3212
3258
|
/**
|
3213
3259
|
* @ignore
|
3214
3260
|
*/
|
3215
|
-
className:
|
3261
|
+
className: b.string,
|
3216
3262
|
/**
|
3217
3263
|
* If `true`, hitting escape will not fire the `onClose` callback.
|
3218
3264
|
* @default false
|
3219
3265
|
*/
|
3220
|
-
disableEscapeKeyDown:
|
3266
|
+
disableEscapeKeyDown: b.bool,
|
3221
3267
|
/**
|
3222
3268
|
* If `true`, the dialog is full-screen.
|
3223
3269
|
* @default false
|
3224
3270
|
*/
|
3225
|
-
fullScreen:
|
3271
|
+
fullScreen: b.bool,
|
3226
3272
|
/**
|
3227
3273
|
* If `true`, the dialog stretches to `maxWidth`.
|
3228
3274
|
*
|
3229
3275
|
* Notice that the dialog width grow is limited by the default margin.
|
3230
3276
|
* @default false
|
3231
3277
|
*/
|
3232
|
-
fullWidth:
|
3278
|
+
fullWidth: b.bool,
|
3233
3279
|
/**
|
3234
3280
|
* Determine the max-width of the dialog.
|
3235
3281
|
* The dialog width grows with the size of the screen.
|
3236
3282
|
* Set to `false` to disable `maxWidth`.
|
3237
3283
|
* @default 'sm'
|
3238
3284
|
*/
|
3239
|
-
maxWidth:
|
3285
|
+
maxWidth: b.oneOfType([b.oneOf(["xs", "sm", "md", "lg", "xl", !1]), b.string]),
|
3240
3286
|
/**
|
3241
3287
|
* Callback fired when the backdrop is clicked.
|
3242
3288
|
* @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.
|
3243
3289
|
*/
|
3244
|
-
onBackdropClick:
|
3290
|
+
onBackdropClick: b.func,
|
3245
3291
|
/**
|
3246
3292
|
* @ignore
|
3247
3293
|
*/
|
3248
|
-
onClick:
|
3294
|
+
onClick: b.func,
|
3249
3295
|
/**
|
3250
3296
|
* Callback fired when the component requests to be closed.
|
3251
3297
|
*
|
3252
3298
|
* @param {object} event The event source of the callback.
|
3253
3299
|
* @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
|
3254
3300
|
*/
|
3255
|
-
onClose:
|
3301
|
+
onClose: b.func,
|
3256
3302
|
/**
|
3257
3303
|
* If `true`, the component is shown.
|
3258
3304
|
*/
|
3259
|
-
open:
|
3305
|
+
open: b.bool.isRequired,
|
3260
3306
|
/**
|
3261
3307
|
* The component used to render the body of the dialog.
|
3262
3308
|
* @default Paper
|
3263
3309
|
*/
|
3264
|
-
PaperComponent:
|
3310
|
+
PaperComponent: b.elementType,
|
3265
3311
|
/**
|
3266
3312
|
* Props applied to the [`Paper`](https://mui.com/material-ui/api/paper/) element.
|
3267
3313
|
* @default {}
|
3268
3314
|
* @deprecated Use `slotProps.paper` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
3269
3315
|
*/
|
3270
|
-
PaperProps:
|
3316
|
+
PaperProps: b.object,
|
3271
3317
|
/**
|
3272
3318
|
* Determine the container for scrolling the dialog.
|
3273
3319
|
* @default 'paper'
|
3274
3320
|
*/
|
3275
|
-
scroll:
|
3321
|
+
scroll: b.oneOf(["body", "paper"]),
|
3276
3322
|
/**
|
3277
3323
|
* The props used for each slot inside.
|
3278
3324
|
* @default {}
|
3279
3325
|
*/
|
3280
|
-
slotProps:
|
3281
|
-
backdrop:
|
3282
|
-
container:
|
3283
|
-
paper:
|
3284
|
-
root:
|
3285
|
-
transition:
|
3326
|
+
slotProps: b.shape({
|
3327
|
+
backdrop: b.oneOfType([b.func, b.object]),
|
3328
|
+
container: b.oneOfType([b.func, b.object]),
|
3329
|
+
paper: b.oneOfType([b.func, b.object]),
|
3330
|
+
root: b.oneOfType([b.func, b.object]),
|
3331
|
+
transition: b.oneOfType([b.func, b.object])
|
3286
3332
|
}),
|
3287
3333
|
/**
|
3288
3334
|
* The components used for each slot inside.
|
3289
3335
|
* @default {}
|
3290
3336
|
*/
|
3291
|
-
slots:
|
3292
|
-
backdrop:
|
3293
|
-
container:
|
3294
|
-
paper:
|
3295
|
-
root:
|
3296
|
-
transition:
|
3337
|
+
slots: b.shape({
|
3338
|
+
backdrop: b.elementType,
|
3339
|
+
container: b.elementType,
|
3340
|
+
paper: b.elementType,
|
3341
|
+
root: b.elementType,
|
3342
|
+
transition: b.elementType
|
3297
3343
|
}),
|
3298
3344
|
/**
|
3299
3345
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
3300
3346
|
*/
|
3301
|
-
sx:
|
3347
|
+
sx: b.oneOfType([b.arrayOf(b.oneOfType([b.func, b.object, b.bool])), b.func, b.object]),
|
3302
3348
|
/**
|
3303
3349
|
* The component used for the transition.
|
3304
3350
|
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
3305
3351
|
* @default Fade
|
3306
3352
|
* @deprecated Use `slots.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
3307
3353
|
*/
|
3308
|
-
TransitionComponent:
|
3354
|
+
TransitionComponent: b.elementType,
|
3309
3355
|
/**
|
3310
3356
|
* The duration for the transition, in milliseconds.
|
3311
3357
|
* You may specify a single timeout for all transitions, or individually with an object.
|
@@ -3314,19 +3360,19 @@ process.env.NODE_ENV !== "production" && (Yr.propTypes = {
|
|
3314
3360
|
* exit: theme.transitions.duration.leavingScreen,
|
3315
3361
|
* }
|
3316
3362
|
*/
|
3317
|
-
transitionDuration:
|
3318
|
-
appear:
|
3319
|
-
enter:
|
3320
|
-
exit:
|
3363
|
+
transitionDuration: b.oneOfType([b.number, b.shape({
|
3364
|
+
appear: b.number,
|
3365
|
+
enter: b.number,
|
3366
|
+
exit: b.number
|
3321
3367
|
})]),
|
3322
3368
|
/**
|
3323
3369
|
* Props applied to the transition element.
|
3324
3370
|
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
|
3325
3371
|
* @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
3326
3372
|
*/
|
3327
|
-
TransitionProps:
|
3373
|
+
TransitionProps: b.object
|
3328
3374
|
});
|
3329
|
-
function
|
3375
|
+
function sl({
|
3330
3376
|
fillColor: e = "#262E3D"
|
3331
3377
|
}) {
|
3332
3378
|
return /* @__PURE__ */ v("svg", {
|
@@ -3350,7 +3396,7 @@ function nl({
|
|
3350
3396
|
})]
|
3351
3397
|
});
|
3352
3398
|
}
|
3353
|
-
const
|
3399
|
+
const Vr = {
|
3354
3400
|
row: {
|
3355
3401
|
hover: "rgba(224, 224, 224, 0.3)"
|
3356
3402
|
},
|
@@ -3435,9 +3481,9 @@ const Qr = {
|
|
3435
3481
|
errorBG: "rgba(231, 71, 39, 0.1)"
|
3436
3482
|
}
|
3437
3483
|
}
|
3438
|
-
},
|
3484
|
+
}, cl = {
|
3439
3485
|
shouldForwardProp: (e) => !e.startsWith("$")
|
3440
|
-
},
|
3486
|
+
}, Le = /* @__PURE__ */ C(ir, cl, {
|
3441
3487
|
target: "e869yoj0",
|
3442
3488
|
label: "IconButton"
|
3443
3489
|
})(({
|
@@ -3445,10 +3491,10 @@ const Qr = {
|
|
3445
3491
|
}) => ({
|
3446
3492
|
padding: 2,
|
3447
3493
|
"&.MuiIconButton-root:hover": {
|
3448
|
-
backgroundColor: e ??
|
3494
|
+
backgroundColor: e ?? Vr.interaction.defaultHover
|
3449
3495
|
}
|
3450
3496
|
}));
|
3451
|
-
function
|
3497
|
+
function pl({
|
3452
3498
|
fill: e = "rgba(38, 46, 61, 0.67)"
|
3453
3499
|
}) {
|
3454
3500
|
return /* @__PURE__ */ n("svg", {
|
@@ -3465,7 +3511,7 @@ function dl({
|
|
3465
3511
|
})
|
3466
3512
|
});
|
3467
3513
|
}
|
3468
|
-
function
|
3514
|
+
function ul({
|
3469
3515
|
fill: e = "rgba(38, 46, 61, 0.67)"
|
3470
3516
|
}) {
|
3471
3517
|
return /* @__PURE__ */ n("svg", {
|
@@ -3482,7 +3528,7 @@ function sl({
|
|
3482
3528
|
})
|
3483
3529
|
});
|
3484
3530
|
}
|
3485
|
-
function
|
3531
|
+
function gl() {
|
3486
3532
|
return /* @__PURE__ */ n("svg", {
|
3487
3533
|
xmlns: "http://www.w3.org/2000/svg",
|
3488
3534
|
width: "24",
|
@@ -3498,41 +3544,41 @@ function cl() {
|
|
3498
3544
|
})
|
3499
3545
|
});
|
3500
3546
|
}
|
3501
|
-
const
|
3547
|
+
const _t = (e) => rr(e.chart.backgroundColor), hl = ({
|
3502
3548
|
title: e
|
3503
3549
|
}) => {
|
3504
3550
|
const {
|
3505
3551
|
themeSettings: t
|
3506
|
-
} =
|
3507
|
-
return /* @__PURE__ */ n(
|
3552
|
+
} = L();
|
3553
|
+
return /* @__PURE__ */ n(Ae, {
|
3508
3554
|
title: e,
|
3509
|
-
children: /* @__PURE__ */ n(
|
3555
|
+
children: /* @__PURE__ */ n(Le, {
|
3510
3556
|
disableTouchRipple: !0,
|
3511
|
-
$hoverColor:
|
3512
|
-
children: /* @__PURE__ */ n(
|
3557
|
+
$hoverColor: _t(t),
|
3558
|
+
children: /* @__PURE__ */ n(ul, {
|
3513
3559
|
fill: t.chart.textColor
|
3514
3560
|
})
|
3515
3561
|
})
|
3516
3562
|
});
|
3517
|
-
},
|
3563
|
+
}, ml = ({
|
3518
3564
|
items: e
|
3519
3565
|
}) => {
|
3520
|
-
const [t, r] =
|
3566
|
+
const [t, r] = Z(null), a = (d) => {
|
3521
3567
|
r(d.currentTarget);
|
3522
3568
|
}, i = () => {
|
3523
3569
|
r(null);
|
3524
3570
|
}, {
|
3525
3571
|
themeSettings: l
|
3526
|
-
} =
|
3527
|
-
return /* @__PURE__ */ v(
|
3528
|
-
children: [/* @__PURE__ */ n(
|
3572
|
+
} = L();
|
3573
|
+
return /* @__PURE__ */ v(Y, {
|
3574
|
+
children: [/* @__PURE__ */ n(Le, {
|
3529
3575
|
onClick: a,
|
3530
|
-
$hoverColor:
|
3576
|
+
$hoverColor: _t(l),
|
3531
3577
|
"aria-label": "three dots button",
|
3532
|
-
children: /* @__PURE__ */ n(
|
3578
|
+
children: /* @__PURE__ */ n(ri, {
|
3533
3579
|
fill: l.chart.textColor
|
3534
3580
|
})
|
3535
|
-
}), /* @__PURE__ */ n(
|
3581
|
+
}), /* @__PURE__ */ n(ii, {
|
3536
3582
|
anchorEl: t,
|
3537
3583
|
anchorOrigin: {
|
3538
3584
|
vertical: "bottom",
|
@@ -3544,14 +3590,14 @@ const yt = (e) => tr(e.chart.backgroundColor), pl = ({
|
|
3544
3590
|
},
|
3545
3591
|
open: !!t,
|
3546
3592
|
onClose: i,
|
3547
|
-
children: e.map((d) => /* @__PURE__ */ v(
|
3593
|
+
children: e.map((d) => /* @__PURE__ */ v(ai, {
|
3548
3594
|
onClick: () => {
|
3549
3595
|
d.onClick(), i();
|
3550
3596
|
},
|
3551
3597
|
sx: {
|
3552
3598
|
fontSize: "13px",
|
3553
3599
|
fontFamily: l.typography.fontFamily,
|
3554
|
-
color:
|
3600
|
+
color: Vr.text.content
|
3555
3601
|
},
|
3556
3602
|
disableRipple: !0,
|
3557
3603
|
children: [d.icon, /* @__PURE__ */ n("div", {
|
@@ -3561,63 +3607,63 @@ const yt = (e) => tr(e.chart.backgroundColor), pl = ({
|
|
3561
3607
|
}, d.title))
|
3562
3608
|
})]
|
3563
3609
|
});
|
3564
|
-
},
|
3610
|
+
}, bl = ({
|
3565
3611
|
onClick: e
|
3566
3612
|
}) => {
|
3567
3613
|
const {
|
3568
3614
|
themeSettings: t
|
3569
|
-
} =
|
3615
|
+
} = L(), {
|
3570
3616
|
t: r
|
3571
|
-
} =
|
3572
|
-
return /* @__PURE__ */ n(
|
3617
|
+
} = E();
|
3618
|
+
return /* @__PURE__ */ n(Ae, {
|
3573
3619
|
title: r("ai.preview"),
|
3574
|
-
children: /* @__PURE__ */ n(
|
3620
|
+
children: /* @__PURE__ */ n(Le, {
|
3575
3621
|
onClick: e,
|
3576
|
-
$hoverColor:
|
3577
|
-
children: /* @__PURE__ */ n(
|
3622
|
+
$hoverColor: _t(t),
|
3623
|
+
children: /* @__PURE__ */ n(pl, {
|
3578
3624
|
fill: t.chart.textColor
|
3579
3625
|
})
|
3580
3626
|
})
|
3581
3627
|
});
|
3582
|
-
},
|
3628
|
+
}, fl = /* @__PURE__ */ C("div", {
|
3583
3629
|
target: "e1cseu7j0",
|
3584
3630
|
label: "ToolbarContainer"
|
3585
3631
|
})("display:flex;padding-top:6px;padding-bottom:6px;");
|
3586
|
-
function
|
3632
|
+
function xl({
|
3587
3633
|
infoTooltipText: e,
|
3588
3634
|
onRefresh: t,
|
3589
3635
|
onExpand: r
|
3590
3636
|
}) {
|
3591
|
-
const a =
|
3637
|
+
const a = Q(() => [{
|
3592
3638
|
title: "Refresh",
|
3593
3639
|
onClick: t,
|
3594
|
-
icon: /* @__PURE__ */ n(
|
3640
|
+
icon: /* @__PURE__ */ n(gl, {})
|
3595
3641
|
}], [t]);
|
3596
|
-
return /* @__PURE__ */ v(
|
3642
|
+
return /* @__PURE__ */ v(fl, {
|
3597
3643
|
"aria-label": "chatbot chart toolbar",
|
3598
|
-
children: [/* @__PURE__ */ n(
|
3644
|
+
children: [/* @__PURE__ */ n(hl, {
|
3599
3645
|
title: e ?? ""
|
3600
|
-
}), /* @__PURE__ */ n(
|
3646
|
+
}), /* @__PURE__ */ n(ml, {
|
3601
3647
|
items: a
|
3602
|
-
}), /* @__PURE__ */ n(
|
3648
|
+
}), /* @__PURE__ */ n(bl, {
|
3603
3649
|
onClick: r
|
3604
3650
|
})]
|
3605
3651
|
});
|
3606
3652
|
}
|
3607
|
-
function
|
3653
|
+
function kl({
|
3608
3654
|
content: e
|
3609
3655
|
}) {
|
3610
|
-
const [t, r] =
|
3656
|
+
const [t, r] = Z(!1), {
|
3611
3657
|
themeSettings: a
|
3612
|
-
} =
|
3658
|
+
} = L(), {
|
3613
3659
|
inlineElement: i,
|
3614
3660
|
expandedElement: l
|
3615
|
-
} =
|
3616
|
-
const d =
|
3661
|
+
} = Q(() => {
|
3662
|
+
const d = ft(e, {
|
3617
3663
|
useCustomizedStyleOptions: !0
|
3618
3664
|
});
|
3619
|
-
if (d === void 0 || !
|
3620
|
-
throw new
|
3665
|
+
if (d === void 0 || !tr(d))
|
3666
|
+
throw new ve("errors.otherWidgetTypesNotSupported");
|
3621
3667
|
const {
|
3622
3668
|
detailedDescription: p
|
3623
3669
|
} = e, {
|
@@ -3625,21 +3671,21 @@ function bl({
|
|
3625
3671
|
} = d, g = {
|
3626
3672
|
cornerRadius: "Small",
|
3627
3673
|
header: {
|
3628
|
-
renderToolbar: (o) => /* @__PURE__ */ n(
|
3674
|
+
renderToolbar: (o) => /* @__PURE__ */ n(xl, {
|
3629
3675
|
infoTooltipText: p,
|
3630
3676
|
onRefresh: o,
|
3631
3677
|
onExpand: () => r(!0)
|
3632
3678
|
})
|
3633
3679
|
}
|
3634
3680
|
};
|
3635
|
-
let
|
3636
|
-
if (
|
3637
|
-
|
3681
|
+
let f, x;
|
3682
|
+
if (Xa(d.chartType))
|
3683
|
+
f = /* @__PURE__ */ n("div", {
|
3638
3684
|
className: "csdk-h-[245px]",
|
3639
|
-
children: /* @__PURE__ */ n(
|
3685
|
+
children: /* @__PURE__ */ n(je, j(I({}, d), {
|
3640
3686
|
styleOptions: g
|
3641
3687
|
}))
|
3642
|
-
}),
|
3688
|
+
}), x = /* @__PURE__ */ n(je, j(I({}, d), {
|
3643
3689
|
styleOptions: {
|
3644
3690
|
header: {
|
3645
3691
|
hidden: !0
|
@@ -3656,23 +3702,23 @@ function bl({
|
|
3656
3702
|
xAxis: void 0,
|
3657
3703
|
yAxis: void 0
|
3658
3704
|
}), g);
|
3659
|
-
delete u.legend, delete u.xAxis, delete u.yAxis,
|
3660
|
-
children: /* @__PURE__ */ n(
|
3705
|
+
delete u.legend, delete u.xAxis, delete u.yAxis, f = /* @__PURE__ */ n("div", {
|
3706
|
+
children: /* @__PURE__ */ n(je, j(I({}, d), {
|
3661
3707
|
styleOptions: u
|
3662
3708
|
}))
|
3663
|
-
}),
|
3709
|
+
}), x = /* @__PURE__ */ n(je, j(I({}, d), {
|
3664
3710
|
styleOptions: I({
|
3665
3711
|
cornerRadius: "None"
|
3666
3712
|
}, o)
|
3667
3713
|
}));
|
3668
3714
|
}
|
3669
3715
|
return {
|
3670
|
-
inlineElement:
|
3671
|
-
expandedElement:
|
3716
|
+
inlineElement: f,
|
3717
|
+
expandedElement: x
|
3672
3718
|
};
|
3673
3719
|
}, [e]);
|
3674
|
-
return /* @__PURE__ */ v(
|
3675
|
-
children: [i, /* @__PURE__ */ v(
|
3720
|
+
return /* @__PURE__ */ v(Y, {
|
3721
|
+
children: [i, /* @__PURE__ */ v(Fr, {
|
3676
3722
|
open: t,
|
3677
3723
|
onClose: () => r(!1),
|
3678
3724
|
maxWidth: "xl",
|
@@ -3688,10 +3734,10 @@ function bl({
|
|
3688
3734
|
children: [/* @__PURE__ */ n("div", {
|
3689
3735
|
className: "csdk-text-ai-lg csdk-semibold",
|
3690
3736
|
children: e.queryTitle
|
3691
|
-
}), /* @__PURE__ */ n(
|
3737
|
+
}), /* @__PURE__ */ n(ir, {
|
3692
3738
|
onClick: () => r(!1),
|
3693
3739
|
"aria-label": "close expanded chart",
|
3694
|
-
children: /* @__PURE__ */ n(
|
3740
|
+
children: /* @__PURE__ */ n(sl, {
|
3695
3741
|
fillColor: a.aiChat.primaryTextColor
|
3696
3742
|
})
|
3697
3743
|
})]
|
@@ -3702,7 +3748,7 @@ function bl({
|
|
3702
3748
|
})]
|
3703
3749
|
});
|
3704
3750
|
}
|
3705
|
-
function
|
3751
|
+
function yl({
|
3706
3752
|
theme: e
|
3707
3753
|
}) {
|
3708
3754
|
return /* @__PURE__ */ n("svg", {
|
@@ -3719,29 +3765,29 @@ function fl({
|
|
3719
3765
|
})
|
3720
3766
|
});
|
3721
3767
|
}
|
3722
|
-
function
|
3768
|
+
function wl({
|
3723
3769
|
onClick: e,
|
3724
3770
|
disabled: t
|
3725
3771
|
}) {
|
3726
3772
|
const {
|
3727
3773
|
themeSettings: r
|
3728
|
-
} =
|
3774
|
+
} = L(), {
|
3729
3775
|
t: a
|
3730
|
-
} =
|
3731
|
-
return /* @__PURE__ */ n(
|
3776
|
+
} = E();
|
3777
|
+
return /* @__PURE__ */ n(Ae, {
|
3732
3778
|
title: a("ai.buttons.incorrectResponse"),
|
3733
|
-
children: /* @__PURE__ */ n(
|
3779
|
+
children: /* @__PURE__ */ n(Le, {
|
3734
3780
|
"aria-label": "thumbs-down",
|
3735
3781
|
onClick: e,
|
3736
3782
|
$hoverColor: r.aiChat.icons.feedbackIcons.hoverColor,
|
3737
3783
|
disabled: t,
|
3738
|
-
children: /* @__PURE__ */ n(
|
3784
|
+
children: /* @__PURE__ */ n(yl, {
|
3739
3785
|
theme: r
|
3740
3786
|
})
|
3741
3787
|
})
|
3742
3788
|
});
|
3743
3789
|
}
|
3744
|
-
function
|
3790
|
+
function _l({
|
3745
3791
|
theme: e
|
3746
3792
|
}) {
|
3747
3793
|
return /* @__PURE__ */ n("svg", {
|
@@ -3758,97 +3804,97 @@ function kl({
|
|
3758
3804
|
})
|
3759
3805
|
});
|
3760
3806
|
}
|
3761
|
-
function
|
3807
|
+
function Cl({
|
3762
3808
|
onClick: e,
|
3763
3809
|
disabled: t
|
3764
3810
|
}) {
|
3765
3811
|
const {
|
3766
3812
|
themeSettings: r
|
3767
|
-
} =
|
3813
|
+
} = L(), {
|
3768
3814
|
t: a
|
3769
|
-
} =
|
3770
|
-
return /* @__PURE__ */ n(
|
3815
|
+
} = E();
|
3816
|
+
return /* @__PURE__ */ n(Ae, {
|
3771
3817
|
title: a("ai.buttons.correctResponse"),
|
3772
|
-
children: /* @__PURE__ */ n(
|
3818
|
+
children: /* @__PURE__ */ n(Le, {
|
3773
3819
|
"aria-label": "thumbs-up",
|
3774
3820
|
onClick: e,
|
3775
3821
|
$hoverColor: r.aiChat.icons.feedbackIcons.hoverColor,
|
3776
3822
|
disabled: t,
|
3777
|
-
children: /* @__PURE__ */ n(
|
3823
|
+
children: /* @__PURE__ */ n(_l, {
|
3778
3824
|
theme: r
|
3779
3825
|
})
|
3780
3826
|
})
|
3781
3827
|
});
|
3782
3828
|
}
|
3783
|
-
const
|
3784
|
-
const [e, t] =
|
3829
|
+
const vl = () => {
|
3830
|
+
const [e, t] = Z(!1), r = se(null), a = N(() => {
|
3785
3831
|
t(!0);
|
3786
|
-
}, []), i =
|
3832
|
+
}, []), i = N(() => {
|
3787
3833
|
t(!1);
|
3788
3834
|
}, []);
|
3789
|
-
return [
|
3835
|
+
return [N((l) => {
|
3790
3836
|
var d;
|
3791
3837
|
((d = r.current) == null ? void 0 : d.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;
|
3792
3838
|
}, [a, i]), e];
|
3793
|
-
},
|
3839
|
+
}, Sl = /* @__PURE__ */ C("div", {
|
3794
3840
|
target: "e2xyvaw0",
|
3795
3841
|
label: "Container"
|
3796
3842
|
})("display:flex;flex-direction:column;row-gap:", ({
|
3797
3843
|
theme: e
|
3798
3844
|
}) => e.aiChat.body.gapBetweenMessages, ";");
|
3799
|
-
function
|
3845
|
+
function Ml({
|
3800
3846
|
visible: e,
|
3801
3847
|
onSend: t
|
3802
3848
|
}) {
|
3803
|
-
const [r, a] =
|
3849
|
+
const [r, a] = Z(!1), i = N((l) => {
|
3804
3850
|
a(!0), t(l === "up" ? 1 : -1);
|
3805
3851
|
}, [t]);
|
3806
3852
|
return e ? /* @__PURE__ */ v("div", {
|
3807
3853
|
className: `csdk-flex csdk-items-center ${`csdk-transition-opacity csdk-delay-150 csdk-duration-500 ${r ? "csdk-opacity-0" : "csdk-opacity-100"}`}`,
|
3808
|
-
children: [/* @__PURE__ */ n(
|
3854
|
+
children: [/* @__PURE__ */ n(Cl, {
|
3809
3855
|
onClick: () => i("up"),
|
3810
3856
|
disabled: r
|
3811
|
-
}), /* @__PURE__ */ n(
|
3857
|
+
}), /* @__PURE__ */ n(wl, {
|
3812
3858
|
onClick: () => i("down"),
|
3813
3859
|
disabled: r
|
3814
3860
|
})]
|
3815
3861
|
}) : null;
|
3816
3862
|
}
|
3817
|
-
function
|
3863
|
+
function Bt({
|
3818
3864
|
sourceId: e,
|
3819
3865
|
data: t,
|
3820
3866
|
type: r,
|
3821
3867
|
buttonVisibility: a = "onHover",
|
3822
3868
|
renderContent: i
|
3823
3869
|
}) {
|
3824
|
-
const l =
|
3870
|
+
const l = re(), d = Ka(N((x) => {
|
3825
3871
|
l && l.ai.sendFeedback({
|
3826
3872
|
sourceId: e,
|
3827
3873
|
type: r,
|
3828
3874
|
data: t,
|
3829
|
-
rating:
|
3875
|
+
rating: x
|
3830
3876
|
});
|
3831
|
-
}, [l, e, t, r]), 200), [p, c] =
|
3832
|
-
themeSettings:
|
3833
|
-
} =
|
3834
|
-
return /* @__PURE__ */ n(
|
3877
|
+
}, [l, e, t, r]), 200), [p, c] = vl(), g = Q(() => a === "onHover" ? c : a !== "never", [c, a]), {
|
3878
|
+
themeSettings: f
|
3879
|
+
} = L();
|
3880
|
+
return /* @__PURE__ */ n(Sl, {
|
3835
3881
|
ref: p,
|
3836
|
-
theme:
|
3837
|
-
children: i(/* @__PURE__ */ n(
|
3882
|
+
theme: f,
|
3883
|
+
children: i(/* @__PURE__ */ n(Ml, {
|
3838
3884
|
onSend: d,
|
3839
3885
|
visible: g
|
3840
3886
|
}))
|
3841
3887
|
});
|
3842
3888
|
}
|
3843
|
-
const
|
3844
|
-
function
|
3889
|
+
const Il = 18 * 5;
|
3890
|
+
function $r({
|
3845
3891
|
text: e
|
3846
3892
|
}) {
|
3847
|
-
const [t, r] =
|
3893
|
+
const [t, r] = Z(!0), [a, i] = Z(!1), {
|
3848
3894
|
t: l
|
3849
|
-
} =
|
3850
|
-
return
|
3851
|
-
d.current && d.current.scrollHeight >
|
3895
|
+
} = E(), d = se(null);
|
3896
|
+
return We(() => {
|
3897
|
+
d.current && d.current.scrollHeight > Il && i(!0);
|
3852
3898
|
}, [e]), /* @__PURE__ */ v("div", {
|
3853
3899
|
children: [/* @__PURE__ */ n("div", {
|
3854
3900
|
ref: d,
|
@@ -3864,30 +3910,30 @@ function Ur({
|
|
3864
3910
|
})]
|
3865
3911
|
});
|
3866
3912
|
}
|
3867
|
-
function
|
3913
|
+
function Dl({
|
3868
3914
|
nlgRequest: e
|
3869
3915
|
}) {
|
3870
3916
|
const {
|
3871
3917
|
data: t,
|
3872
3918
|
isLoading: r,
|
3873
3919
|
isError: a
|
3874
|
-
} =
|
3920
|
+
} = _r(e), {
|
3875
3921
|
t: i
|
3876
|
-
} =
|
3877
|
-
return r ? /* @__PURE__ */ n(
|
3922
|
+
} = E();
|
3923
|
+
return r ? /* @__PURE__ */ n(Qr, {}) : a ? /* @__PURE__ */ n(ne, {
|
3878
3924
|
align: "left",
|
3879
3925
|
children: i("ai.errors.unexpected")
|
3880
|
-
}) : /* @__PURE__ */ n(
|
3926
|
+
}) : /* @__PURE__ */ n(ne, {
|
3881
3927
|
align: "full",
|
3882
|
-
children: /* @__PURE__ */ n(
|
3928
|
+
children: /* @__PURE__ */ n($r, {
|
3883
3929
|
text: t ?? i("ai.errors.insightsNotAvailable")
|
3884
3930
|
})
|
3885
3931
|
});
|
3886
3932
|
}
|
3887
|
-
function
|
3933
|
+
function Al() {
|
3888
3934
|
const {
|
3889
3935
|
themeSettings: e
|
3890
|
-
} =
|
3936
|
+
} = L();
|
3891
3937
|
return /* @__PURE__ */ n("svg", {
|
3892
3938
|
width: "24",
|
3893
3939
|
height: "25",
|
@@ -3902,36 +3948,36 @@ function Ml() {
|
|
3902
3948
|
})
|
3903
3949
|
});
|
3904
3950
|
}
|
3905
|
-
function
|
3951
|
+
function Ll({
|
3906
3952
|
onClick: e
|
3907
3953
|
}) {
|
3908
3954
|
const {
|
3909
3955
|
t
|
3910
|
-
} =
|
3911
|
-
return /* @__PURE__ */ n(
|
3956
|
+
} = E();
|
3957
|
+
return /* @__PURE__ */ n(Ge, {
|
3912
3958
|
align: "left",
|
3913
3959
|
onClick: e,
|
3914
3960
|
children: /* @__PURE__ */ v("div", {
|
3915
3961
|
className: "csdk-py-[5px] csdk-px-2 csdk-flex csdk-items-center csdk-gap-x-1 csdk-select-none",
|
3916
|
-
children: [/* @__PURE__ */ n(
|
3962
|
+
children: [/* @__PURE__ */ n(Al, {}), t("ai.buttons.insights")]
|
3917
3963
|
})
|
3918
3964
|
});
|
3919
3965
|
}
|
3920
|
-
var
|
3921
|
-
const
|
3966
|
+
var Tl = ei("toLowerCase");
|
3967
|
+
const Yt = /* @__PURE__ */ C("div", {
|
3922
3968
|
target: "etljahs0",
|
3923
3969
|
label: "FlexRow"
|
3924
|
-
})("display:flex;align-items:center;column-gap:10px;"),
|
3925
|
-
function
|
3970
|
+
})("display:flex;align-items:center;column-gap:10px;"), Nl = (e) => !!e && "aeiou".includes(e[0]);
|
3971
|
+
function jl({
|
3926
3972
|
data: e,
|
3927
3973
|
alwaysShowFeedback: t
|
3928
3974
|
}) {
|
3929
3975
|
const {
|
3930
3976
|
chatMode: r = "analyze",
|
3931
3977
|
enableInsights: a
|
3932
|
-
} =
|
3978
|
+
} = ae(), {
|
3933
3979
|
themeSettings: i
|
3934
|
-
} =
|
3980
|
+
} = L(), {
|
3935
3981
|
queryTitle: l,
|
3936
3982
|
chartRecommendations: d,
|
3937
3983
|
jaql: p,
|
@@ -3939,95 +3985,95 @@ function Ll({
|
|
3939
3985
|
clarification: g = ""
|
3940
3986
|
} = e;
|
3941
3987
|
console.debug(`JAQL for ${l}`, p), console.debug(`chart recommendations for ${l}`, d);
|
3942
|
-
const
|
3943
|
-
let
|
3944
|
-
|
3945
|
-
const o = p.datasource.title, [u, s] =
|
3988
|
+
const f = "chartType" in d ? d.chartType : "table";
|
3989
|
+
let x;
|
3990
|
+
Nl(f) ? x = `an ${f}` : x = `a ${f}`, f !== "table" && (x += " chart");
|
3991
|
+
const o = p.datasource.title, [u, s] = Z(!1), m = N(() => {
|
3946
3992
|
s((y) => !y);
|
3947
|
-
}, []),
|
3993
|
+
}, []), h = {
|
3948
3994
|
jaql: {
|
3949
3995
|
datasource: p.datasource,
|
3950
3996
|
metadata: p.metadata
|
3951
3997
|
}
|
3952
3998
|
}, w = r === "analyze", _ = `${c}${c && g ? `
|
3953
3999
|
` : ""}${g}`;
|
3954
|
-
return /* @__PURE__ */ v(
|
3955
|
-
children: [/* @__PURE__ */ n(
|
4000
|
+
return /* @__PURE__ */ v(Y, {
|
4001
|
+
children: [/* @__PURE__ */ n(Bt, {
|
3956
4002
|
sourceId: o,
|
3957
4003
|
data: e,
|
3958
4004
|
type: "chats/nlq",
|
3959
4005
|
buttonVisibility: t ? "always" : "onHover",
|
3960
|
-
renderContent: (y) => /* @__PURE__ */ v(
|
3961
|
-
children: [/* @__PURE__ */ v(
|
3962
|
-
children: [/* @__PURE__ */ n(
|
4006
|
+
renderContent: (y) => /* @__PURE__ */ v(Y, {
|
4007
|
+
children: [/* @__PURE__ */ v(Yt, {
|
4008
|
+
children: [/* @__PURE__ */ n(Br, {
|
3963
4009
|
align: "left",
|
3964
4010
|
theme: i,
|
3965
|
-
children: _ || `Here's ${
|
4011
|
+
children: _ || `Here's ${x} showing ${Tl(l)}.`
|
3966
4012
|
}), y]
|
3967
|
-
}), w && /* @__PURE__ */ n(
|
4013
|
+
}), w && /* @__PURE__ */ n(kl, {
|
3968
4014
|
content: e
|
3969
4015
|
})]
|
3970
4016
|
})
|
3971
|
-
}), a && /* @__PURE__ */ n(
|
4017
|
+
}), a && /* @__PURE__ */ n(Bt, {
|
3972
4018
|
sourceId: o,
|
3973
|
-
data:
|
4019
|
+
data: h,
|
3974
4020
|
type: "nlg/queryResult",
|
3975
4021
|
buttonVisibility: u ? "onHover" : "never",
|
3976
|
-
renderContent: (y) => /* @__PURE__ */ v(
|
3977
|
-
children: [/* @__PURE__ */ v(
|
3978
|
-
children: [/* @__PURE__ */ n(
|
3979
|
-
onClick:
|
4022
|
+
renderContent: (y) => /* @__PURE__ */ v(Y, {
|
4023
|
+
children: [/* @__PURE__ */ v(Yt, {
|
4024
|
+
children: [/* @__PURE__ */ n(Ll, {
|
4025
|
+
onClick: m
|
3980
4026
|
}), y]
|
3981
|
-
}), u && /* @__PURE__ */ n(
|
3982
|
-
nlgRequest:
|
4027
|
+
}), u && /* @__PURE__ */ n(Dl, {
|
4028
|
+
nlgRequest: h
|
3983
4029
|
})]
|
3984
4030
|
})
|
3985
4031
|
})]
|
3986
4032
|
});
|
3987
4033
|
}
|
3988
|
-
function
|
4034
|
+
function Ol({
|
3989
4035
|
message: e,
|
3990
4036
|
isLastMessage: t
|
3991
4037
|
}) {
|
3992
|
-
if (
|
4038
|
+
if (Mr(e)) {
|
3993
4039
|
const a = JSON.parse(e.content);
|
3994
|
-
return /* @__PURE__ */ n(
|
4040
|
+
return /* @__PURE__ */ n(jl, {
|
3995
4041
|
data: a,
|
3996
4042
|
alwaysShowFeedback: t
|
3997
4043
|
});
|
3998
4044
|
}
|
3999
|
-
const r =
|
4000
|
-
return /* @__PURE__ */ n(
|
4045
|
+
const r = fo(e) ? JSON.parse(e.content).answer : e.content;
|
4046
|
+
return /* @__PURE__ */ n(ne, {
|
4001
4047
|
align: e.role === "user" ? "right" : "left",
|
4002
4048
|
children: r
|
4003
4049
|
});
|
4004
4050
|
}
|
4005
|
-
const
|
4051
|
+
const El = /* @__PURE__ */ Ea(Ol), zl = ({
|
4006
4052
|
error: e,
|
4007
4053
|
displayMessage: t
|
4008
|
-
}) => (console.debug("Unexpected error occurred when resolving a chat message:", e), /* @__PURE__ */ n(
|
4054
|
+
}) => (console.debug("Unexpected error occurred when resolving a chat message:", e), /* @__PURE__ */ n(ne, {
|
4009
4055
|
align: "left",
|
4010
4056
|
children: t
|
4011
4057
|
}));
|
4012
|
-
function
|
4058
|
+
function Rl({
|
4013
4059
|
messages: e
|
4014
4060
|
}) {
|
4015
4061
|
const {
|
4016
4062
|
t
|
4017
|
-
} =
|
4018
|
-
return /* @__PURE__ */ n(
|
4019
|
-
children: e.map((r, a) => /* @__PURE__ */ n(
|
4020
|
-
fallbackRender: (i) =>
|
4063
|
+
} = E();
|
4064
|
+
return /* @__PURE__ */ n(Y, {
|
4065
|
+
children: e.map((r, a) => /* @__PURE__ */ n(Ia, {
|
4066
|
+
fallbackRender: (i) => zl(j(I({}, i), {
|
4021
4067
|
displayMessage: t("ai.errors.unexpected")
|
4022
4068
|
})),
|
4023
|
-
children: /* @__PURE__ */ n(
|
4069
|
+
children: /* @__PURE__ */ n(El, {
|
4024
4070
|
message: r,
|
4025
4071
|
isLastMessage: a === e.length - 1
|
4026
4072
|
}, a)
|
4027
4073
|
}, a))
|
4028
4074
|
});
|
4029
4075
|
}
|
4030
|
-
function
|
4076
|
+
function Jr({
|
4031
4077
|
color: e
|
4032
4078
|
}) {
|
4033
4079
|
return /* @__PURE__ */ n("svg", {
|
@@ -4042,7 +4088,7 @@ function Fr({
|
|
4042
4088
|
})
|
4043
4089
|
});
|
4044
4090
|
}
|
4045
|
-
function
|
4091
|
+
function Zl({
|
4046
4092
|
onClick: e,
|
4047
4093
|
color: t
|
4048
4094
|
}) {
|
@@ -4050,12 +4096,12 @@ function El({
|
|
4050
4096
|
"aria-label": "go back",
|
4051
4097
|
className: "csdk-w-5 csdk-h-5 csdk-flex csdk-p-[4px] csdk-ml-[6px] csdk-cursor-pointer",
|
4052
4098
|
onClick: e,
|
4053
|
-
children: /* @__PURE__ */ n(
|
4099
|
+
children: /* @__PURE__ */ n(Jr, {
|
4054
4100
|
color: t
|
4055
4101
|
})
|
4056
4102
|
});
|
4057
4103
|
}
|
4058
|
-
const
|
4104
|
+
const Wl = /* @__PURE__ */ C("button", {
|
4059
4105
|
target: "e1p0q0z20",
|
4060
4106
|
label: "Button"
|
4061
4107
|
})("font-size:inherit;line-height:inherit;box-sizing:border-box;border-width:1px;padding-left:1rem;padding-right:1rem;padding-top:0.5rem;padding-bottom:0.5rem;cursor:pointer;text-align:left;max-width:85%;font-family:", ({
|
@@ -4103,47 +4149,47 @@ const zl = /* @__PURE__ */ C("button", {
|
|
4103
4149
|
}
|
4104
4150
|
return "";
|
4105
4151
|
});
|
4106
|
-
function
|
4152
|
+
function Qt({
|
4107
4153
|
question: e,
|
4108
4154
|
onClick: t
|
4109
4155
|
}) {
|
4110
4156
|
const {
|
4111
4157
|
themeSettings: r
|
4112
|
-
} =
|
4113
|
-
return /* @__PURE__ */ n(
|
4158
|
+
} = L();
|
4159
|
+
return /* @__PURE__ */ n(Wl, {
|
4114
4160
|
onClick: t,
|
4115
4161
|
theme: r,
|
4116
4162
|
children: e
|
4117
4163
|
});
|
4118
4164
|
}
|
4119
|
-
const
|
4165
|
+
const Pl = /* @__PURE__ */ C("div", {
|
4120
4166
|
target: "eu11cc50",
|
4121
4167
|
label: "ListContainer"
|
4122
4168
|
})("display:flex;flex-direction:column;align-items:flex-start;row-gap:", ({
|
4123
4169
|
theme: e
|
4124
4170
|
}) => e.aiChat.suggestions.gap, ";");
|
4125
|
-
function
|
4171
|
+
function ql({
|
4126
4172
|
questions: e,
|
4127
4173
|
onSelection: t
|
4128
4174
|
}) {
|
4129
4175
|
const {
|
4130
4176
|
t: r
|
4131
|
-
} =
|
4177
|
+
} = E(), [a, i] = Z(!0), l = Q(() => a && e.length > 5 ? e.slice(0, 4) : e, [e, a]), {
|
4132
4178
|
themeSettings: d
|
4133
|
-
} =
|
4134
|
-
return /* @__PURE__ */ v(
|
4179
|
+
} = L();
|
4180
|
+
return /* @__PURE__ */ v(Pl, {
|
4135
4181
|
"aria-label": "list of suggested questions",
|
4136
4182
|
theme: d,
|
4137
|
-
children: [l.map((p) => /* @__PURE__ */ n(
|
4183
|
+
children: [l.map((p) => /* @__PURE__ */ n(Qt, {
|
4138
4184
|
question: p,
|
4139
4185
|
onClick: () => t(p)
|
4140
|
-
}, p)), l.length < e.length && /* @__PURE__ */ n(
|
4186
|
+
}, p)), l.length < e.length && /* @__PURE__ */ n(Qt, {
|
4141
4187
|
question: r("ai.buttons.seeMore"),
|
4142
4188
|
onClick: () => i(!1)
|
4143
4189
|
})]
|
4144
4190
|
});
|
4145
4191
|
}
|
4146
|
-
const
|
4192
|
+
const Gl = /* @__PURE__ */ C("div", {
|
4147
4193
|
target: "ebwb3nc0",
|
4148
4194
|
label: "Row"
|
4149
4195
|
})("width:283px;height:32px;border-radius:10px;background:", ({
|
@@ -4156,60 +4202,60 @@ const Wl = /* @__PURE__ */ C("div", {
|
|
4156
4202
|
${r} 50%,
|
4157
4203
|
${t} 100%
|
4158
4204
|
)`;
|
4159
|
-
}, ";background-size:200% auto;animation:gradient 2s linear infinite;@keyframes gradient{0%{background-position:0 0;}100%{background-position:-200% 0;}}"),
|
4205
|
+
}, ";background-size:200% auto;animation:gradient 2s linear infinite;@keyframes gradient{0%{background-position:0 0;}100%{background-position:-200% 0;}}"), Hl = /* @__PURE__ */ C("div", {
|
4160
4206
|
target: "ebwb3nc1",
|
4161
4207
|
label: "SkeletonContainer"
|
4162
4208
|
})("display:flex;flex-direction:column;row-gap:1rem;");
|
4163
|
-
function
|
4209
|
+
function Bl() {
|
4164
4210
|
const {
|
4165
4211
|
themeSettings: e
|
4166
|
-
} =
|
4167
|
-
return /* @__PURE__ */ n(
|
4212
|
+
} = L();
|
4213
|
+
return /* @__PURE__ */ n(Hl, {
|
4168
4214
|
children: Array.from({
|
4169
4215
|
length: 3
|
4170
|
-
}, (t, r) => /* @__PURE__ */ n(
|
4216
|
+
}, (t, r) => /* @__PURE__ */ n(Gl, {
|
4171
4217
|
theme: e
|
4172
4218
|
}, r))
|
4173
4219
|
});
|
4174
4220
|
}
|
4175
|
-
function
|
4221
|
+
function Yl({
|
4176
4222
|
questions: e,
|
4177
4223
|
isLoading: t,
|
4178
4224
|
onSelection: r
|
4179
4225
|
}) {
|
4180
4226
|
const a = e.length > 0, {
|
4181
4227
|
suggestionsWelcomeText: i
|
4182
|
-
} =
|
4183
|
-
return t ? /* @__PURE__ */ n(
|
4184
|
-
children: [i && /* @__PURE__ */ n(
|
4228
|
+
} = ae();
|
4229
|
+
return t ? /* @__PURE__ */ n(Bl, {}) : a ? /* @__PURE__ */ v(Y, {
|
4230
|
+
children: [i && /* @__PURE__ */ n(ne, {
|
4185
4231
|
align: "left",
|
4186
4232
|
children: i
|
4187
|
-
}), /* @__PURE__ */ n(
|
4233
|
+
}), /* @__PURE__ */ n(ql, {
|
4188
4234
|
onSelection: r,
|
4189
4235
|
questions: e
|
4190
4236
|
})]
|
4191
4237
|
}) : null;
|
4192
4238
|
}
|
4193
|
-
const
|
4239
|
+
const Ql = /* @__PURE__ */ C("div", {
|
4194
4240
|
target: "ew7avl30",
|
4195
4241
|
label: "ToolbarContainer"
|
4196
4242
|
})("flex:0 0 80px;padding-left:14px;padding-right:14px;display:flex;align-items:center;position:relative;background-color:", ({
|
4197
4243
|
style: e
|
4198
|
-
}) => e.backgroundColor, ";"),
|
4244
|
+
}) => e.backgroundColor, ";"), Ul = /* @__PURE__ */ C("div", {
|
4199
4245
|
target: "ew7avl31",
|
4200
4246
|
label: "ToolbarTitle"
|
4201
4247
|
})("font-size:18px;line-height:22px;font-weight:600;margin-left:20px;color:", ({
|
4202
4248
|
style: e
|
4203
|
-
}) => e.textColor, ";"),
|
4249
|
+
}) => e.textColor, ";"), Xr = /* @__PURE__ */ Xt(function({
|
4204
4250
|
title: e,
|
4205
4251
|
leftNav: t,
|
4206
4252
|
rightNav: r,
|
4207
4253
|
style: a
|
4208
4254
|
}, i) {
|
4209
|
-
return /* @__PURE__ */ v(
|
4255
|
+
return /* @__PURE__ */ v(Ql, {
|
4210
4256
|
ref: i,
|
4211
4257
|
style: a,
|
4212
|
-
children: [t, /* @__PURE__ */ n(
|
4258
|
+
children: [t, /* @__PURE__ */ n(Ul, {
|
4213
4259
|
style: a,
|
4214
4260
|
children: e
|
4215
4261
|
}), r && /* @__PURE__ */ n("div", {
|
@@ -4217,19 +4263,19 @@ const Hl = /* @__PURE__ */ C("div", {
|
|
4217
4263
|
children: r
|
4218
4264
|
})]
|
4219
4265
|
});
|
4220
|
-
}),
|
4266
|
+
}), Fl = /* @__PURE__ */ C("div", {
|
4221
4267
|
target: "e14yc7id0",
|
4222
4268
|
label: "AiDisclaimerContainer"
|
4223
4269
|
})("text-align:center;font-size:11px;line-height:18px;white-space:pre-wrap;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;box-sizing:border-box;color:", ({
|
4224
4270
|
theme: e
|
4225
4271
|
}) => e.aiChat.secondaryTextColor, ";");
|
4226
|
-
function
|
4272
|
+
function Vl({
|
4227
4273
|
theme: e
|
4228
4274
|
}) {
|
4229
4275
|
const {
|
4230
4276
|
t
|
4231
|
-
} =
|
4232
|
-
return /* @__PURE__ */ v(
|
4277
|
+
} = E();
|
4278
|
+
return /* @__PURE__ */ v(Fl, {
|
4233
4279
|
theme: e,
|
4234
4280
|
children: [/* @__PURE__ */ n("div", {
|
4235
4281
|
children: t("ai.disclaimer.poweredByAi")
|
@@ -4238,10 +4284,10 @@ function Ql({
|
|
4238
4284
|
})]
|
4239
4285
|
});
|
4240
4286
|
}
|
4241
|
-
function
|
4287
|
+
function $l() {
|
4242
4288
|
const {
|
4243
4289
|
themeSettings: e
|
4244
|
-
} =
|
4290
|
+
} = L();
|
4245
4291
|
return /* @__PURE__ */ n("svg", {
|
4246
4292
|
width: "24",
|
4247
4293
|
height: "24",
|
@@ -4256,15 +4302,15 @@ function Ul() {
|
|
4256
4302
|
})
|
4257
4303
|
});
|
4258
4304
|
}
|
4259
|
-
const
|
4260
|
-
const r = new
|
4305
|
+
const Jl = (e, t) => {
|
4306
|
+
const r = new Qa(e);
|
4261
4307
|
return r.alpha = t, r;
|
4262
|
-
},
|
4308
|
+
}, Xl = /* @__PURE__ */ C("div", {
|
4263
4309
|
target: "e1rxvpki0",
|
4264
4310
|
label: "Container"
|
4265
4311
|
})("font-size:inherit;line-height:inherit;padding-left:8px;padding-right:8px;padding-top:4px;border-radius:16px;margin-bottom:4px;box-shadow:", ({
|
4266
4312
|
theme: e
|
4267
|
-
}) => `0 4px 8px 0 ${
|
4313
|
+
}) => `0 4px 8px 0 ${Jl(e.aiChat.primaryTextColor, 0.2)}`, ";cursor:pointer;color:", ({
|
4268
4314
|
theme: e
|
4269
4315
|
}) => e.aiChat.clickableMessages.textColor, ";background-color:", ({
|
4270
4316
|
theme: e
|
@@ -4272,33 +4318,33 @@ const Fl = (e, t) => {
|
|
4272
4318
|
theme: e
|
4273
4319
|
}) => e.aiChat.clickableMessages.hover.textColor, ";background-color:", ({
|
4274
4320
|
theme: e
|
4275
|
-
}) => e.aiChat.clickableMessages.hover.backgroundColor, ";box-shadow:none;"),
|
4321
|
+
}) => e.aiChat.clickableMessages.hover.backgroundColor, ";box-shadow:none;"), Kl = ({
|
4276
4322
|
onClick: e
|
4277
4323
|
}) => {
|
4278
4324
|
const {
|
4279
4325
|
themeSettings: t
|
4280
|
-
} =
|
4281
|
-
return /* @__PURE__ */ n(
|
4326
|
+
} = L();
|
4327
|
+
return /* @__PURE__ */ n(Xl, {
|
4282
4328
|
theme: t,
|
4283
4329
|
onClick: e,
|
4284
|
-
children: /* @__PURE__ */ n(
|
4330
|
+
children: /* @__PURE__ */ n($l, {})
|
4285
4331
|
});
|
4286
|
-
},
|
4332
|
+
}, ed = ({
|
4287
4333
|
isVisible: e,
|
4288
4334
|
onClick: t,
|
4289
4335
|
anchorElement: r
|
4290
|
-
}) => /* @__PURE__ */ n(
|
4336
|
+
}) => /* @__PURE__ */ n(Kt, {
|
4291
4337
|
anchorEl: r,
|
4292
4338
|
open: e,
|
4293
4339
|
placement: "top",
|
4294
4340
|
sx: {
|
4295
4341
|
zIndex: 2
|
4296
4342
|
},
|
4297
|
-
children: /* @__PURE__ */ n(
|
4343
|
+
children: /* @__PURE__ */ n(Kl, {
|
4298
4344
|
onClick: t
|
4299
4345
|
})
|
4300
|
-
}),
|
4301
|
-
target: "
|
4346
|
+
}), td = /* @__PURE__ */ C("div", {
|
4347
|
+
target: "evtkjw10",
|
4302
4348
|
label: "ChatBody"
|
4303
4349
|
})("display:flex;flex-direction:column;row-gap:", ({
|
4304
4350
|
theme: e
|
@@ -4310,8 +4356,8 @@ const Fl = (e, t) => {
|
|
4310
4356
|
theme: e
|
4311
4357
|
}) => e.aiChat.body.paddingTop, ";padding-bottom:", ({
|
4312
4358
|
theme: e
|
4313
|
-
}) => e.aiChat.body.paddingBottom, ";flex:initial;height:100%;"),
|
4314
|
-
target: "
|
4359
|
+
}) => e.aiChat.body.paddingBottom, ";flex:initial;height:100%;"), rd = /* @__PURE__ */ C("div", {
|
4360
|
+
target: "evtkjw11",
|
4315
4361
|
label: "ChatFooter"
|
4316
4362
|
})("padding-left:", ({
|
4317
4363
|
theme: e
|
@@ -4321,13 +4367,13 @@ const Fl = (e, t) => {
|
|
4321
4367
|
theme: e
|
4322
4368
|
}) => e.aiChat.footer.paddingTop, ";padding-bottom:", ({
|
4323
4369
|
theme: e
|
4324
|
-
}) => e.aiChat.footer.paddingBottom, ";display:flex;flex-direction:column;row-gap:6px;"),
|
4325
|
-
target: "
|
4370
|
+
}) => e.aiChat.footer.paddingBottom, ";display:flex;flex-direction:column;row-gap:6px;"), ad = /* @__PURE__ */ C("div", {
|
4371
|
+
target: "evtkjw12",
|
4326
4372
|
label: "FollowupQuestionsContainer"
|
4327
4373
|
})("display:flex;flex-direction:column;row-gap:", ({
|
4328
4374
|
theme: e
|
4329
4375
|
}) => e.aiChat.suggestions.gap, ";");
|
4330
|
-
function
|
4376
|
+
function id({
|
4331
4377
|
contextTitle: e,
|
4332
4378
|
onGoBack: t,
|
4333
4379
|
contextDetails: r
|
@@ -4335,133 +4381,135 @@ function td({
|
|
4335
4381
|
var a, i, l;
|
4336
4382
|
const {
|
4337
4383
|
t: d
|
4338
|
-
} =
|
4384
|
+
} = E(), {
|
4339
4385
|
enableFollowupQuestions: p,
|
4340
4386
|
enableHeader: c,
|
4341
4387
|
numOfRecentPrompts: g,
|
4342
|
-
numOfRecommendations:
|
4343
|
-
|
4344
|
-
|
4345
|
-
|
4346
|
-
|
4347
|
-
|
4348
|
-
|
4349
|
-
|
4388
|
+
numOfRecommendations: f,
|
4389
|
+
customPrompt: x
|
4390
|
+
} = ae(), {
|
4391
|
+
themeSettings: o
|
4392
|
+
} = L(), {
|
4393
|
+
data: u,
|
4394
|
+
isLoading: s,
|
4395
|
+
isError: m
|
4396
|
+
} = oo({
|
4350
4397
|
contextTitle: e,
|
4351
|
-
count:
|
4352
|
-
|
4353
|
-
|
4354
|
-
|
4355
|
-
|
4356
|
-
|
4357
|
-
|
4358
|
-
|
4359
|
-
|
4360
|
-
|
4361
|
-
|
4362
|
-
|
4363
|
-
|
4364
|
-
|
4365
|
-
|
4366
|
-
|
4398
|
+
count: f,
|
4399
|
+
customPrompt: x
|
4400
|
+
}), h = Q(() => u == null ? void 0 : u.map((T) => T.nlqPrompt), [u]), {
|
4401
|
+
history: w,
|
4402
|
+
lastNlqResponse: _,
|
4403
|
+
isAwaitingResponse: y,
|
4404
|
+
sendMessage: M,
|
4405
|
+
isLoading: D,
|
4406
|
+
chatId: S,
|
4407
|
+
lastError: A
|
4408
|
+
} = xo(e, r), {
|
4409
|
+
mutate: R,
|
4410
|
+
isLoading: pe
|
4411
|
+
} = Sr(S), [U, q] = Z(!1), [H, F] = Z(!1), G = () => q(!0), V = () => q(!1), $ = () => {
|
4412
|
+
R(), V();
|
4413
|
+
}, z = se(null), W = se(null), B = () => {
|
4414
|
+
if (!(z != null && z.current))
|
4367
4415
|
return;
|
4368
4416
|
const {
|
4369
|
-
scrollTop:
|
4370
|
-
clientHeight:
|
4371
|
-
scrollHeight:
|
4372
|
-
} =
|
4373
|
-
if (
|
4417
|
+
scrollTop: T,
|
4418
|
+
clientHeight: J,
|
4419
|
+
scrollHeight: Te
|
4420
|
+
} = z.current;
|
4421
|
+
if (T === void 0 || J === void 0 || Te === void 0)
|
4374
4422
|
return;
|
4375
|
-
const
|
4376
|
-
H !==
|
4423
|
+
const Ne = Te - T - J > J / 2;
|
4424
|
+
H !== Ne && F(Ne);
|
4377
4425
|
};
|
4378
|
-
|
4379
|
-
|
4380
|
-
}, [
|
4381
|
-
const
|
4382
|
-
ref:
|
4426
|
+
We(() => {
|
4427
|
+
z.current && (z.current.scrollTop = z.current.scrollHeight);
|
4428
|
+
}, [w, U, y]);
|
4429
|
+
const le = se(null), ue = c ? /* @__PURE__ */ n(Xr, {
|
4430
|
+
ref: le,
|
4383
4431
|
title: e,
|
4384
|
-
leftNav: t && /* @__PURE__ */ n(
|
4432
|
+
leftNav: t && /* @__PURE__ */ n(Zl, {
|
4385
4433
|
onClick: t,
|
4386
|
-
color:
|
4434
|
+
color: o.aiChat.header.textColor
|
4387
4435
|
}),
|
4388
|
-
style:
|
4389
|
-
}) : null,
|
4390
|
-
return (
|
4391
|
-
children: [c &&
|
4392
|
-
text:
|
4436
|
+
style: o.aiChat.header
|
4437
|
+
}) : null, xe = Q(() => [...new Set(w.filter((T) => T.role === "user").filter((T) => !(h != null && h.includes(T.content))).map((T) => T.content).reverse())].slice(0, g), [w, g, h]);
|
4438
|
+
return (A == null ? void 0 : A.message) === d("ai.errors.chatUnavailable") ? /* @__PURE__ */ v(Y, {
|
4439
|
+
children: [c && ue, /* @__PURE__ */ n(Yr, {
|
4440
|
+
text: A.message
|
4393
4441
|
})]
|
4394
|
-
}) : /* @__PURE__ */ v(
|
4395
|
-
children: [
|
4396
|
-
ref:
|
4397
|
-
theme:
|
4398
|
-
onScroll:
|
4399
|
-
children: [/* @__PURE__ */ n(
|
4442
|
+
}) : /* @__PURE__ */ v(Y, {
|
4443
|
+
children: [ue, /* @__PURE__ */ v(td, {
|
4444
|
+
ref: z,
|
4445
|
+
theme: o,
|
4446
|
+
onScroll: B,
|
4447
|
+
children: [/* @__PURE__ */ n(ed, {
|
4400
4448
|
isVisible: H,
|
4401
|
-
anchorElement:
|
4449
|
+
anchorElement: W.current,
|
4402
4450
|
onClick: () => {
|
4403
|
-
var
|
4404
|
-
(
|
4405
|
-
top: (
|
4451
|
+
var T, J;
|
4452
|
+
(J = z.current) == null || J.scroll({
|
4453
|
+
top: (T = z.current) == null ? void 0 : T.scrollHeight,
|
4406
4454
|
behavior: "smooth"
|
4407
4455
|
});
|
4408
4456
|
}
|
4409
|
-
}), /* @__PURE__ */ n(
|
4457
|
+
}), /* @__PURE__ */ n($n, {}), /* @__PURE__ */ n(Yl, {
|
4410
4458
|
questions: h || [],
|
4411
|
-
isLoading:
|
4412
|
-
onSelection:
|
4413
|
-
}),
|
4459
|
+
isLoading: s,
|
4460
|
+
onSelection: M
|
4461
|
+
}), A && /* @__PURE__ */ n(ne, {
|
4414
4462
|
align: "left",
|
4415
|
-
children:
|
4416
|
-
}),
|
4417
|
-
messages:
|
4418
|
-
}), p &&
|
4419
|
-
theme:
|
4420
|
-
children: (l =
|
4463
|
+
children: A.message
|
4464
|
+
}), D ? /* @__PURE__ */ n(Ye, {}) : /* @__PURE__ */ n(Rl, {
|
4465
|
+
messages: w
|
4466
|
+
}), p && _ && ((i = (a = _.followupQuestions) == null ? void 0 : a.length) != null ? i : 0) > 0 && /* @__PURE__ */ n(ad, {
|
4467
|
+
theme: o,
|
4468
|
+
children: (l = _.followupQuestions) == null ? void 0 : l.slice(0, 2).map((T, J) => /* @__PURE__ */ n(Ge, {
|
4421
4469
|
align: "left",
|
4422
4470
|
onClick: () => {
|
4423
|
-
|
4471
|
+
M(T);
|
4424
4472
|
},
|
4425
4473
|
children: /* @__PURE__ */ n("div", {
|
4426
4474
|
className: "csdk-py-[7px] csdk-px-4",
|
4427
|
-
children:
|
4475
|
+
children: T
|
4428
4476
|
})
|
4429
|
-
},
|
4430
|
-
}), (
|
4431
|
-
onCancel:
|
4432
|
-
onConfirm:
|
4477
|
+
}, J))
|
4478
|
+
}), (y || pe) && /* @__PURE__ */ n(Qr, {}), U && /* @__PURE__ */ n(rl, {
|
4479
|
+
onCancel: V,
|
4480
|
+
onConfirm: $
|
4433
4481
|
})]
|
4434
|
-
}), /* @__PURE__ */ v(
|
4435
|
-
ref:
|
4436
|
-
theme:
|
4437
|
-
children: [/* @__PURE__ */ n(
|
4438
|
-
onSendMessage:
|
4439
|
-
disabled:
|
4440
|
-
onClearHistoryClick:
|
4482
|
+
}), /* @__PURE__ */ v(rd, {
|
4483
|
+
ref: W,
|
4484
|
+
theme: o,
|
4485
|
+
children: [/* @__PURE__ */ n(Po, {
|
4486
|
+
onSendMessage: M,
|
4487
|
+
disabled: y || D,
|
4488
|
+
onClearHistoryClick: G,
|
4441
4489
|
suggestions: h || [],
|
4442
|
-
recentPrompts:
|
4443
|
-
isLoading:
|
4444
|
-
recommendationsError:
|
4445
|
-
onChange:
|
4446
|
-
}), /* @__PURE__ */ n(
|
4447
|
-
theme:
|
4490
|
+
recentPrompts: xe,
|
4491
|
+
isLoading: s || D,
|
4492
|
+
recommendationsError: m,
|
4493
|
+
onChange: V
|
4494
|
+
}), /* @__PURE__ */ n(Vl, {
|
4495
|
+
theme: o
|
4448
4496
|
})]
|
4449
4497
|
})]
|
4450
4498
|
});
|
4451
4499
|
}
|
4452
|
-
const
|
4500
|
+
const od = /* @__PURE__ */ C("button", {
|
4453
4501
|
target: "e5a38pw0",
|
4454
4502
|
label: "Container"
|
4455
4503
|
})("font-family:", ({
|
4456
4504
|
theme: e
|
4457
4505
|
}) => e.typography.fontFamily, ";padding:20px;border:none;display:flex;align-items:center;justify-content:space-between;text-align:left;border-radius:15px;box-shadow:0px 1px 2px rgba(9,9,10,0.1),0px 2px 4px rgba(9,9,10,0.1);cursor:pointer;background-color:", ({
|
4458
4506
|
theme: e
|
4459
|
-
}) => e.aiChat.dataTopics.items.backgroundColor, ";"),
|
4507
|
+
}) => e.aiChat.dataTopics.items.backgroundColor, ";"), nd = /* @__PURE__ */ C("div", {
|
4460
4508
|
target: "e5a38pw1",
|
4461
4509
|
label: "Title"
|
4462
4510
|
})("font-size:1.05rem;line-height:28px;color:", ({
|
4463
4511
|
theme: e
|
4464
|
-
}) => e.aiChat.dataTopics.items.textColor, ";"),
|
4512
|
+
}) => e.aiChat.dataTopics.items.textColor, ";"), ld = /* @__PURE__ */ C("div", {
|
4465
4513
|
target: "e5a38pw2",
|
4466
4514
|
label: "Description"
|
4467
4515
|
})("font-size:", ({
|
@@ -4470,75 +4518,75 @@ const rd = /* @__PURE__ */ C("button", {
|
|
4470
4518
|
theme: e
|
4471
4519
|
}) => e.aiChat.primaryFontSize[1], ";color:", ({
|
4472
4520
|
theme: e
|
4473
|
-
}) =>
|
4521
|
+
}) => rr(e.aiChat.dataTopics.items.textColor, 0, 0.5), ";"), dd = /* @__PURE__ */ C("div", {
|
4474
4522
|
target: "e5a38pw3",
|
4475
4523
|
label: "IconContainer"
|
4476
4524
|
})("width:16px;height:16px;transform:rotate(180deg);");
|
4477
|
-
function
|
4525
|
+
function sd(e) {
|
4478
4526
|
const {
|
4479
4527
|
title: t,
|
4480
4528
|
description: r,
|
4481
4529
|
onClick: a
|
4482
4530
|
} = e, {
|
4483
4531
|
themeSettings: i
|
4484
|
-
} =
|
4485
|
-
return /* @__PURE__ */ v(
|
4532
|
+
} = L();
|
4533
|
+
return /* @__PURE__ */ v(od, {
|
4486
4534
|
onClick: a,
|
4487
4535
|
theme: i,
|
4488
4536
|
children: [/* @__PURE__ */ v("div", {
|
4489
|
-
children: [/* @__PURE__ */ n(
|
4537
|
+
children: [/* @__PURE__ */ n(nd, {
|
4490
4538
|
theme: i,
|
4491
4539
|
children: t
|
4492
|
-
}), /* @__PURE__ */ n(
|
4540
|
+
}), /* @__PURE__ */ n(ld, {
|
4493
4541
|
theme: i,
|
4494
4542
|
children: r
|
4495
4543
|
})]
|
4496
|
-
}), /* @__PURE__ */ n(
|
4497
|
-
children: /* @__PURE__ */ n(
|
4544
|
+
}), /* @__PURE__ */ n(dd, {
|
4545
|
+
children: /* @__PURE__ */ n(Jr, {
|
4498
4546
|
color: i.aiChat.icons.color
|
4499
4547
|
})
|
4500
4548
|
})]
|
4501
4549
|
});
|
4502
4550
|
}
|
4503
|
-
const
|
4551
|
+
const cd = /* @__PURE__ */ C("div", {
|
4504
4552
|
target: "emrh5y30",
|
4505
4553
|
label: "FlexContainer"
|
4506
|
-
})("padding:20px;display:flex;flex-direction:column;gap:20px;overflow:auto;"),
|
4554
|
+
})("padding:20px;display:flex;flex-direction:column;gap:20px;overflow:auto;"), pd = /* @__PURE__ */ C("div", {
|
4507
4555
|
target: "emrh5y31",
|
4508
4556
|
label: "Title"
|
4509
4557
|
})("font-size:24px;line-height:32px;font-weight:600;text-align:center;padding-bottom:4px;color:", ({
|
4510
4558
|
theme: e
|
4511
|
-
}) => e.aiChat.primaryTextColor, ";"),
|
4559
|
+
}) => e.aiChat.primaryTextColor, ";"), ud = /* @__PURE__ */ C("div", {
|
4512
4560
|
target: "emrh5y32",
|
4513
4561
|
label: "Subtitle"
|
4514
4562
|
})("font-size:15px;line-height:22px;color:", ({
|
4515
4563
|
theme: e
|
4516
4564
|
}) => e.aiChat.primaryTextColor, ";");
|
4517
|
-
function
|
4565
|
+
function gd(e) {
|
4518
4566
|
const {
|
4519
4567
|
dataTopics: t
|
4520
4568
|
} = e, {
|
4521
4569
|
themeSettings: r
|
4522
|
-
} =
|
4570
|
+
} = L(), {
|
4523
4571
|
t: a
|
4524
|
-
} =
|
4525
|
-
return /* @__PURE__ */ v(
|
4526
|
-
children: [/* @__PURE__ */ n(
|
4572
|
+
} = E();
|
4573
|
+
return /* @__PURE__ */ v(cd, {
|
4574
|
+
children: [/* @__PURE__ */ n(pd, {
|
4527
4575
|
theme: r,
|
4528
4576
|
children: a("ai.dataTopics")
|
4529
|
-
}), /* @__PURE__ */ v(
|
4577
|
+
}), /* @__PURE__ */ v(ud, {
|
4530
4578
|
theme: r,
|
4531
4579
|
children: [a("ai.chatbotDescription"), /* @__PURE__ */ n("br", {}), /* @__PURE__ */ n("br", {}), a("ai.topicSelectPrompt")]
|
4532
|
-
}), t.map((i) => /* @__PURE__ */
|
4580
|
+
}), t.map((i) => /* @__PURE__ */ Da(sd, j(I({}, i), {
|
4533
4581
|
key: i.title
|
4534
4582
|
})))]
|
4535
4583
|
});
|
4536
4584
|
}
|
4537
|
-
const
|
4538
|
-
function
|
4585
|
+
const hd = "#000000", md = "#FFFFFF";
|
4586
|
+
function bd({
|
4539
4587
|
isDarkBackground: e = !1
|
4540
4588
|
}) {
|
4541
|
-
const t = e ?
|
4589
|
+
const t = e ? md : hd;
|
4542
4590
|
return /* @__PURE__ */ v("svg", {
|
4543
4591
|
width: "32",
|
4544
4592
|
height: "32",
|
@@ -4596,82 +4644,82 @@ function gd({
|
|
4596
4644
|
})]
|
4597
4645
|
});
|
4598
4646
|
}
|
4599
|
-
const
|
4647
|
+
const fd = /* @__PURE__ */ C("div", {
|
4600
4648
|
target: "ealudtn0",
|
4601
4649
|
label: "LogoContainer"
|
4602
|
-
})("margin-left:14px;margin-top:3px;"),
|
4650
|
+
})("margin-left:14px;margin-top:3px;"), xd = /* @__PURE__ */ C("div", {
|
4603
4651
|
target: "ealudtn1",
|
4604
4652
|
label: "DataTopicsContainer"
|
4605
4653
|
})("display:flex;flex-direction:column;justify-content:top;overflow:hidden;height:100%;background-color:", ({
|
4606
4654
|
theme: e
|
4607
4655
|
}) => e.aiChat.dataTopics.backgroundColor, ";");
|
4608
|
-
function
|
4656
|
+
function kd({
|
4609
4657
|
dataTopicsList: e,
|
4610
4658
|
onDataTopicClick: t
|
4611
4659
|
}) {
|
4612
4660
|
const {
|
4613
4661
|
enableHeader: r
|
4614
|
-
} =
|
4662
|
+
} = ae(), {
|
4615
4663
|
themeSettings: a
|
4616
|
-
} =
|
4664
|
+
} = L(), {
|
4617
4665
|
t: i
|
4618
|
-
} =
|
4666
|
+
} = E(), l = Q(() => e == null ? void 0 : e.map((p) => ({
|
4619
4667
|
title: p,
|
4620
4668
|
onClick: () => t(p)
|
4621
|
-
})), [e, t]), d =
|
4622
|
-
return /* @__PURE__ */ v(
|
4623
|
-
children: [r ? /* @__PURE__ */ n(
|
4669
|
+
})), [e, t]), d = va(Sa(a.aiChat.header.backgroundColor)) > 0.5;
|
4670
|
+
return /* @__PURE__ */ v(Y, {
|
4671
|
+
children: [r ? /* @__PURE__ */ n(Xr, {
|
4624
4672
|
title: i("ai.analyticsChatbot"),
|
4625
|
-
leftNav: /* @__PURE__ */ n(
|
4626
|
-
children: /* @__PURE__ */ n(
|
4673
|
+
leftNav: /* @__PURE__ */ n(fd, {
|
4674
|
+
children: /* @__PURE__ */ n(bd, {
|
4627
4675
|
isDarkBackground: d
|
4628
4676
|
})
|
4629
4677
|
}),
|
4630
4678
|
style: a.aiChat.header
|
4631
|
-
}) : null, /* @__PURE__ */ v(
|
4679
|
+
}) : null, /* @__PURE__ */ v(xd, {
|
4632
4680
|
theme: a,
|
4633
|
-
children: [!l && /* @__PURE__ */ n(
|
4681
|
+
children: [!l && /* @__PURE__ */ n(Ye, {}), l && /* @__PURE__ */ n(gd, {
|
4634
4682
|
dataTopics: l
|
4635
4683
|
})]
|
4636
4684
|
})]
|
4637
4685
|
});
|
4638
4686
|
}
|
4639
|
-
function
|
4640
|
-
const [e, t] =
|
4687
|
+
function yd() {
|
4688
|
+
const [e, t] = Z(), [r, a] = Z(), {
|
4641
4689
|
data: i,
|
4642
4690
|
fetchStatus: l
|
4643
|
-
} =
|
4691
|
+
} = co(), {
|
4644
4692
|
dataTopicsList: d,
|
4645
4693
|
contextDetails: p
|
4646
|
-
} =
|
4694
|
+
} = ae(), {
|
4647
4695
|
t: c
|
4648
|
-
} =
|
4696
|
+
} = E(), g = c("ai.errors.noAvailableDataTopics"), f = N((s) => {
|
4649
4697
|
s.length ? s.length === 1 && (a(void 0), t(s[0])) : a(g);
|
4650
|
-
}, [g]),
|
4698
|
+
}, [g]), x = Q(() => {
|
4651
4699
|
if (i && l === "idle") {
|
4652
|
-
const s = (d != null && d.length ? i == null ? void 0 : i.filter((
|
4653
|
-
return
|
4700
|
+
const s = (d != null && d.length ? i == null ? void 0 : i.filter((m) => d == null ? void 0 : d.includes(m.title)) : i).map((m) => m.title);
|
4701
|
+
return f(s), s;
|
4654
4702
|
}
|
4655
4703
|
return [];
|
4656
|
-
}, [i, l, d,
|
4704
|
+
}, [i, l, d, f]), o = Ie(), u = N(() => {
|
4657
4705
|
a(void 0), o.invalidateQueries(["getDataTopics"]);
|
4658
4706
|
}, [o]);
|
4659
|
-
return r ? /* @__PURE__ */ n(
|
4707
|
+
return r ? /* @__PURE__ */ n(Yr, {
|
4660
4708
|
text: r,
|
4661
4709
|
action: {
|
4662
4710
|
text: c("ai.buttons.refresh"),
|
4663
4711
|
onClick: u
|
4664
4712
|
}
|
4665
|
-
}) :
|
4713
|
+
}) : x.length === 1 && !e ? /* @__PURE__ */ n(Ye, {}) : e ? /* @__PURE__ */ n(id, {
|
4666
4714
|
contextTitle: e,
|
4667
4715
|
contextDetails: p,
|
4668
|
-
onGoBack:
|
4669
|
-
}) : /* @__PURE__ */ n(
|
4670
|
-
dataTopicsList:
|
4716
|
+
onGoBack: x.length === 1 ? void 0 : () => t(void 0)
|
4717
|
+
}) : /* @__PURE__ */ n(kd, {
|
4718
|
+
dataTopicsList: x,
|
4671
4719
|
onDataTopicClick: (s) => t(s)
|
4672
4720
|
});
|
4673
4721
|
}
|
4674
|
-
const
|
4722
|
+
const wd = Jt({
|
4675
4723
|
componentName: "Chatbot"
|
4676
4724
|
})((e) => {
|
4677
4725
|
const {
|
@@ -4680,37 +4728,37 @@ const xd = $t({
|
|
4680
4728
|
config: a
|
4681
4729
|
} = e, {
|
4682
4730
|
themeSettings: i
|
4683
|
-
} =
|
4684
|
-
return /* @__PURE__ */ n(
|
4731
|
+
} = L();
|
4732
|
+
return /* @__PURE__ */ n(no, {
|
4685
4733
|
value: a ?? {},
|
4686
|
-
children: /* @__PURE__ */ n(
|
4734
|
+
children: /* @__PURE__ */ n(Co, {
|
4687
4735
|
id: "csdk-chatbot-frame",
|
4688
4736
|
width: t,
|
4689
4737
|
height: r,
|
4690
4738
|
theme: i,
|
4691
4739
|
tabIndex: 0,
|
4692
|
-
children: /* @__PURE__ */ n(
|
4740
|
+
children: /* @__PURE__ */ n(yd, {})
|
4693
4741
|
})
|
4694
4742
|
});
|
4695
|
-
}),
|
4743
|
+
}), _d = Jt({
|
4696
4744
|
componentName: "GetNlgInsights"
|
4697
4745
|
})(function(e) {
|
4698
4746
|
const {
|
4699
4747
|
data: t,
|
4700
4748
|
isLoading: r,
|
4701
4749
|
isError: a
|
4702
|
-
} =
|
4750
|
+
} = _r(e), {
|
4703
4751
|
t: i
|
4704
|
-
} =
|
4752
|
+
} = E();
|
4705
4753
|
if (a)
|
4706
|
-
return /* @__PURE__ */ n(
|
4754
|
+
return /* @__PURE__ */ n(Y, {
|
4707
4755
|
children: i("ai.errors.unexpected")
|
4708
4756
|
});
|
4709
4757
|
const l = t ?? i("ai.errors.insightsNotAvailable");
|
4710
|
-
return /* @__PURE__ */ n(
|
4758
|
+
return /* @__PURE__ */ n($r, {
|
4711
4759
|
text: r ? "Loading..." : l
|
4712
4760
|
});
|
4713
|
-
}),
|
4761
|
+
}), Cd = new Vt({
|
4714
4762
|
defaultOptions: {
|
4715
4763
|
queries: {
|
4716
4764
|
refetchOnWindowFocus: !1,
|
@@ -4718,15 +4766,15 @@ const xd = $t({
|
|
4718
4766
|
}
|
4719
4767
|
}
|
4720
4768
|
});
|
4721
|
-
function
|
4769
|
+
function vd({
|
4722
4770
|
children: e,
|
4723
4771
|
context: t
|
4724
4772
|
}) {
|
4725
|
-
return /* @__PURE__ */ n(
|
4726
|
-
children: /* @__PURE__ */ n(
|
4773
|
+
return /* @__PURE__ */ n(ro, {
|
4774
|
+
children: /* @__PURE__ */ n(kr.Provider, {
|
4727
4775
|
value: t == null ? void 0 : t.api,
|
4728
|
-
children: /* @__PURE__ */ n(
|
4729
|
-
client:
|
4776
|
+
children: /* @__PURE__ */ n(_a, {
|
4777
|
+
client: Cd,
|
4730
4778
|
children: e
|
4731
4779
|
})
|
4732
4780
|
})
|
@@ -4743,13 +4791,13 @@ function wd({
|
|
4743
4791
|
console.error("vite-plugin-css-injected-by-js", r);
|
4744
4792
|
}
|
4745
4793
|
})();
|
4746
|
-
const
|
4794
|
+
const Kr = {
|
4747
4795
|
api: void 0
|
4748
|
-
},
|
4749
|
-
|
4750
|
-
() =>
|
4796
|
+
}, ea = Symbol("aiContextKey"), Ue = () => sa(
|
4797
|
+
ea,
|
4798
|
+
() => Ut(Kr),
|
4751
4799
|
!0
|
4752
|
-
),
|
4800
|
+
), Id = st({
|
4753
4801
|
props: {
|
4754
4802
|
/**
|
4755
4803
|
* {@inheritDoc @sisense/sdk-ui!AiContextProviderProps.volatile}
|
@@ -4757,32 +4805,32 @@ const $r = {
|
|
4757
4805
|
volatile: Boolean
|
4758
4806
|
},
|
4759
4807
|
setup(e, { slots: t }) {
|
4760
|
-
const r =
|
4808
|
+
const r = oi(), a = Ut(Kr), { app: i } = r.value;
|
4761
4809
|
return i && (a.value = {
|
4762
|
-
api: new
|
4763
|
-
}),
|
4810
|
+
api: new Ot(i.httpClient, e.volatile)
|
4811
|
+
}), Ft(async () => {
|
4764
4812
|
const { app: l } = r.value;
|
4765
4813
|
l && (a.value = {
|
4766
|
-
api: new
|
4814
|
+
api: new Ot(l.httpClient, e.volatile)
|
4767
4815
|
});
|
4768
|
-
}),
|
4816
|
+
}), ca(ea, a), () => {
|
4769
4817
|
var l;
|
4770
4818
|
return (l = t.default) == null ? void 0 : l.call(t);
|
4771
4819
|
};
|
4772
4820
|
}
|
4773
|
-
}),
|
4774
|
-
const e =
|
4821
|
+
}), ta = () => {
|
4822
|
+
const e = Ue(), t = new ni({
|
4775
4823
|
context: e.value
|
4776
4824
|
});
|
4777
|
-
return
|
4825
|
+
return Ft(() => {
|
4778
4826
|
t.setValue({
|
4779
4827
|
context: e.value
|
4780
4828
|
});
|
4781
4829
|
}), {
|
4782
4830
|
propsObserver: t,
|
4783
|
-
providerComponent:
|
4831
|
+
providerComponent: vd
|
4784
4832
|
};
|
4785
|
-
},
|
4833
|
+
}, Dd = st({
|
4786
4834
|
props: {
|
4787
4835
|
/**
|
4788
4836
|
* {@inheritDoc @sisense/sdk-ui!ChatbotProps.width}
|
@@ -4797,11 +4845,11 @@ const $r = {
|
|
4797
4845
|
*/
|
4798
4846
|
config: Object
|
4799
4847
|
},
|
4800
|
-
setup: (e) =>
|
4801
|
-
...
|
4802
|
-
|
4848
|
+
setup: (e) => lr(wd, e, [
|
4849
|
+
...dr(),
|
4850
|
+
ta()
|
4803
4851
|
])
|
4804
|
-
}),
|
4852
|
+
}), Ad = st({
|
4805
4853
|
props: {
|
4806
4854
|
/**
|
4807
4855
|
* {@inheritDoc @sisense/sdk-ui!GetNlgInsightsProps.dataSource}
|
@@ -4827,33 +4875,33 @@ const $r = {
|
|
4827
4875
|
*/
|
4828
4876
|
verbosity: String
|
4829
4877
|
},
|
4830
|
-
setup: (e) =>
|
4831
|
-
...
|
4832
|
-
|
4878
|
+
setup: (e) => lr(_d, e, [
|
4879
|
+
...dr(),
|
4880
|
+
ta()
|
4833
4881
|
])
|
4834
|
-
}),
|
4835
|
-
|
4836
|
-
const [t, r] =
|
4882
|
+
}), Ld = (e) => {
|
4883
|
+
gt("useGetNlgInsights");
|
4884
|
+
const [t, r] = ht(bt, {
|
4837
4885
|
isLoading: !0,
|
4838
4886
|
isError: !1,
|
4839
4887
|
isSuccess: !1,
|
4840
4888
|
status: "loading",
|
4841
4889
|
error: void 0,
|
4842
4890
|
data: void 0
|
4843
|
-
}), a =
|
4891
|
+
}), a = Ue(), i = async (d) => {
|
4844
4892
|
var p;
|
4845
4893
|
try {
|
4846
4894
|
r({ type: "loading" });
|
4847
|
-
const c =
|
4895
|
+
const c = wr(be(e)), g = await (d == null ? void 0 : d.ai.getNlgInsights(c));
|
4848
4896
|
r({ type: "success", data: (p = g == null ? void 0 : g.data) == null ? void 0 : p.answer });
|
4849
4897
|
} catch (c) {
|
4850
4898
|
r({ type: "error", error: c });
|
4851
4899
|
}
|
4852
4900
|
};
|
4853
|
-
|
4854
|
-
[...
|
4901
|
+
ct(
|
4902
|
+
[...mt(e), a],
|
4855
4903
|
() => {
|
4856
|
-
const { api: d } = a.value, { enabled: p } =
|
4904
|
+
const { api: d } = a.value, { enabled: p } = be(e);
|
4857
4905
|
!d || !(p === void 0 || p === !0) || i(d);
|
4858
4906
|
},
|
4859
4907
|
{ immediate: !0 }
|
@@ -4862,39 +4910,40 @@ const $r = {
|
|
4862
4910
|
a.value.api && i(a.value.api);
|
4863
4911
|
};
|
4864
4912
|
return {
|
4865
|
-
...
|
4913
|
+
...pt(t.value),
|
4866
4914
|
refetch: l
|
4867
4915
|
};
|
4868
|
-
},
|
4869
|
-
|
4870
|
-
const [t, r] =
|
4916
|
+
}, Td = (e) => {
|
4917
|
+
gt("useGetQueryRecommendations");
|
4918
|
+
const [t, r] = ht(bt, {
|
4871
4919
|
isLoading: !0,
|
4872
4920
|
isError: !1,
|
4873
4921
|
isSuccess: !1,
|
4874
4922
|
status: "loading",
|
4875
4923
|
error: void 0,
|
4876
4924
|
data: void 0
|
4877
|
-
}), a =
|
4925
|
+
}), a = Ue(), i = async (d) => {
|
4878
4926
|
try {
|
4879
4927
|
r({ type: "loading" });
|
4880
|
-
const { contextTitle: p, count: c, enableAxisTitlesInWidgetProps: g } =
|
4881
|
-
numOfRecommendations: x
|
4882
|
-
|
4883
|
-
|
4884
|
-
|
4928
|
+
const { contextTitle: p, count: c, enableAxisTitlesInWidgetProps: g, customPrompt: f } = be(e), x = c ?? ot, o = await (d == null ? void 0 : d.ai.getQueryRecommendations(p, {
|
4929
|
+
numOfRecommendations: x,
|
4930
|
+
...f ? { userPrompt: f } : void 0
|
4931
|
+
})), u = (o == null ? void 0 : o.map((s) => ({
|
4932
|
+
...s,
|
4933
|
+
widgetProps: br.toWidgetProps(s, {
|
4885
4934
|
useCustomizedStyleOptions: g
|
4886
4935
|
})
|
4887
4936
|
}))) || [];
|
4888
|
-
r({ type: "success", data:
|
4937
|
+
r({ type: "success", data: u });
|
4889
4938
|
} catch (p) {
|
4890
4939
|
r({ type: "error", error: p });
|
4891
4940
|
}
|
4892
4941
|
};
|
4893
|
-
|
4894
|
-
[...
|
4942
|
+
ct(
|
4943
|
+
[...mt(e), a],
|
4895
4944
|
() => {
|
4896
|
-
const { api: d } = a.value, { enabled: p, count: c } =
|
4897
|
-
!d || !
|
4945
|
+
const { api: d } = a.value, { enabled: p, count: c } = be(e), f = (p === void 0 || p === !0) && (c ?? ot) > 0;
|
4946
|
+
!d || !f || i(d);
|
4898
4947
|
},
|
4899
4948
|
{ immediate: !0 }
|
4900
4949
|
);
|
@@ -4902,22 +4951,22 @@ const $r = {
|
|
4902
4951
|
a.value.api && i(a.value.api);
|
4903
4952
|
};
|
4904
4953
|
return {
|
4905
|
-
...
|
4954
|
+
...pt(t.value),
|
4906
4955
|
refetch: l
|
4907
4956
|
};
|
4908
|
-
},
|
4909
|
-
|
4910
|
-
const [t, r] =
|
4957
|
+
}, Nd = (e) => {
|
4958
|
+
gt("useGetNlqResult");
|
4959
|
+
const [t, r] = ht(bt, {
|
4911
4960
|
isLoading: !0,
|
4912
4961
|
isError: !1,
|
4913
4962
|
isSuccess: !1,
|
4914
4963
|
status: "loading",
|
4915
4964
|
error: void 0,
|
4916
4965
|
data: void 0
|
4917
|
-
}), a =
|
4966
|
+
}), a = Ue(), i = async (d) => {
|
4918
4967
|
try {
|
4919
4968
|
r({ type: "loading" });
|
4920
|
-
const p =
|
4969
|
+
const p = be(e), { enableAxisTitlesInWidgetProps: c } = p, { contextTitle: g, request: f } = io(p), x = await (d == null ? void 0 : d.ai.getNlqResult(g, f)), o = x ? br.toWidgetProps(x, {
|
4921
4970
|
useCustomizedStyleOptions: c || !1
|
4922
4971
|
}) : void 0;
|
4923
4972
|
r({ type: "success", data: o });
|
@@ -4925,10 +4974,10 @@ const $r = {
|
|
4925
4974
|
r({ type: "error", error: p });
|
4926
4975
|
}
|
4927
4976
|
};
|
4928
|
-
|
4929
|
-
[...
|
4977
|
+
ct(
|
4978
|
+
[...mt(e), a],
|
4930
4979
|
() => {
|
4931
|
-
const { api: d } = a.value, { enabled: p } =
|
4980
|
+
const { api: d } = a.value, { enabled: p } = be(e);
|
4932
4981
|
!d || !(p === void 0 || p === !0) || i(d);
|
4933
4982
|
},
|
4934
4983
|
{ immediate: !0 }
|
@@ -4937,15 +4986,15 @@ const $r = {
|
|
4937
4986
|
a.value.api && i(a.value.api);
|
4938
4987
|
};
|
4939
4988
|
return {
|
4940
|
-
...
|
4989
|
+
...pt(t.value),
|
4941
4990
|
refetch: l
|
4942
4991
|
};
|
4943
4992
|
};
|
4944
4993
|
export {
|
4945
|
-
|
4946
|
-
|
4947
|
-
|
4948
|
-
|
4949
|
-
|
4950
|
-
|
4994
|
+
Id as AiContextProvider,
|
4995
|
+
Dd as Chatbot,
|
4996
|
+
Ad as GetNlgInsights,
|
4997
|
+
Ld as useGetNlgInsights,
|
4998
|
+
Nd as useGetNlqResult,
|
4999
|
+
Td as useGetQueryRecommendations
|
4951
5000
|
};
|