@sisense/sdk-ui 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 +29 -29
- package/dist/ai.js +686 -702
- package/dist/analytics-composer.cjs +33 -33
- package/dist/analytics-composer.js +278 -290
- package/dist/derive-chart-family-6PZA-xZh.js +92092 -0
- package/dist/derive-chart-family-DQUVKMcV.cjs +656 -0
- package/dist/{dimensions-DuHaCozA.js → dimensions-b8xRITJn.js} +4 -5
- package/dist/{dimensions-BgPl9ZS9.cjs → dimensions-x8nnAUew.cjs} +1 -1
- package/dist/index.cjs +17 -17
- package/dist/index.js +7935 -7787
- package/dist/index.umd.js +415 -389
- package/dist/packages/sdk-ui/src/ai/api/types.d.ts +1 -0
- package/dist/packages/sdk-ui/src/ai/chat-config.d.ts +7 -0
- package/dist/packages/sdk-ui/src/ai/common/icon-button.d.ts +1 -3
- package/dist/packages/sdk-ui/src/ai/messages/clickable-message.d.ts +0 -1
- package/dist/packages/sdk-ui/src/ai/use-get-query-recommendations.d.ts +7 -0
- package/dist/packages/sdk-ui/src/analytics-composer/query/fix-ranking-filter-jaql.d.ts +8 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/get-legacy-cartesian-chart-options.d.ts +3 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/legend.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/tooltip.d.ts +4 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/bar-chart/{highcharts-options-builder.d.ts → highchart-options/highcharts-options-builder.d.ts} +1 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/bar-chart/highchart-options/legend.d.ts +3 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/{cartesian-chart-options.d.ts → cartesian/cartesian-chart-options.d.ts} +6 -6
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis-configuration.d.ts +41 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/chart-configuration.d.ts +13 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/chart-spacing-calculator.d.ts +41 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/series-processor.d.ts +57 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/data-points.d.ts +1 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/tooltip.d.ts +3 -29
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/scatter-plot-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/scatter-tooltip.d.ts +2 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/tooltip-utils.d.ts +17 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/tooltip.d.ts +3 -3
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/translations-to-highcharts.d.ts +7 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/treemap/treemap-tooltip.d.ts +3 -4
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/value-label-section.d.ts +3 -3
- package/dist/packages/sdk-ui/src/common/icons/drag-handle-icon.d.ts +2 -1
- package/dist/packages/sdk-ui/src/custom-widgets-provider/types.d.ts +10 -1
- package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/components/draggable-line.d.ts +5 -1
- package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/utils.d.ts +7 -1
- package/dist/packages/sdk-ui/src/dashboard/hooks/use-dashboard-header-toolbar.d.ts +0 -1
- package/dist/packages/sdk-ui/src/dashboard/hooks/use-edit-mode-toolbar.d.ts +0 -1
- package/dist/packages/sdk-ui/src/dashboard/use-dashboard-theme.d.ts +4 -0
- package/dist/packages/sdk-ui/src/decorators/component-decorators/with-tracking/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/decorators/component-decorators/with-tracking/use-track-component-init.d.ts +4 -1
- package/dist/packages/sdk-ui/src/decorators/component-decorators/with-tracking/with-tracking.d.ts +10 -2
- package/dist/packages/sdk-ui/src/error-boundary/error-boundary.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-existing-filter-editing.d.ts +0 -1
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-new-filter-adding.d.ts +0 -1
- package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/use-members.d.ts +1 -1
- package/dist/packages/sdk-ui/src/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/get-pivot-table-data-point.d.ts +4 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/types.d.ts +32 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/use-apply-pivot-table-cell-events.d.ts +18 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/utils.d.ts +11 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-formatting.d.ts +2 -2
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-render-pivot.d.ts +8 -4
- package/dist/packages/sdk-ui/src/props.d.ts +33 -1
- package/dist/packages/sdk-ui/src/theme-provider/default-theme-settings.d.ts +5 -0
- package/dist/packages/sdk-ui/src/types.d.ts +84 -3
- package/dist/packages/sdk-ui/src/widget-by-id/utils.d.ts +3 -3
- package/dist/packages/sdk-ui/src/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -6
- package/dist/{use-common-filters-B1RKY2KD.js → use-common-filters-BHBy4uv6.js} +5815 -5679
- package/dist/use-common-filters-Cg217teN.cjs +350 -0
- package/dist/{widget-composer-B2r2a9Oh.cjs → widget-composer-BPlNiX_P.cjs} +8 -8
- package/dist/{widget-composer-I9gUFBZt.js → widget-composer-SGEFYrXY.js} +248 -216
- package/package.json +29 -27
- package/dist/derive-chart-family-BPYK8evJ.js +0 -90579
- package/dist/derive-chart-family-yUBZXP4x.cjs +0 -669
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/get-legacy-cartesian-chart-options.d.ts +0 -3
- package/dist/use-common-filters-CRgYdKcV.cjs +0 -350
package/dist/ai.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
var yn = Object.defineProperty, xn = Object.defineProperties;
|
|
2
2
|
var vn = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var Le = Object.getOwnPropertySymbols;
|
|
4
|
+
var ht = Object.prototype.hasOwnProperty, gt = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var pt = (e, t, n) => t in e ? yn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, T = (e, t) => {
|
|
6
6
|
for (var n in t || (t = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var n of
|
|
10
|
-
|
|
7
|
+
ht.call(t, n) && pt(e, n, t[n]);
|
|
8
|
+
if (Le)
|
|
9
|
+
for (var n of Le(t))
|
|
10
|
+
gt.call(t, n) && pt(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
12
|
}, B = (e, t) => xn(e, vn(t));
|
|
13
|
-
var
|
|
13
|
+
var $e = (e, t) => {
|
|
14
14
|
var n = {};
|
|
15
15
|
for (var r in e)
|
|
16
|
-
|
|
17
|
-
if (e != null &&
|
|
18
|
-
for (var r of
|
|
19
|
-
t.indexOf(r) < 0 &&
|
|
16
|
+
ht.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
17
|
+
if (e != null && Le)
|
|
18
|
+
for (var r of Le(e))
|
|
19
|
+
t.indexOf(r) < 0 && gt.call(e, r) && (n[r] = e[r]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
22
|
var ne = (e, t, n) => new Promise((r, a) => {
|
|
23
23
|
var c = (d) => {
|
|
24
24
|
try {
|
|
25
25
|
p(n.next(d));
|
|
26
|
-
} catch (
|
|
27
|
-
a(
|
|
26
|
+
} catch (g) {
|
|
27
|
+
a(g);
|
|
28
28
|
}
|
|
29
29
|
}, s = (d) => {
|
|
30
30
|
try {
|
|
31
31
|
p(n.throw(d));
|
|
32
|
-
} catch (
|
|
33
|
-
a(
|
|
32
|
+
} catch (g) {
|
|
33
|
+
a(g);
|
|
34
34
|
}
|
|
35
35
|
}, p = (d) => d.done ? r(d.value) : Promise.resolve(d.value).then(c, s);
|
|
36
36
|
p((n = n.apply(e, t)).next());
|
|
37
37
|
});
|
|
38
|
-
import {
|
|
39
|
-
import { P as
|
|
40
|
-
import * as
|
|
41
|
-
import { createContext as
|
|
42
|
-
import { t as
|
|
43
|
-
import { w as X1 } from "./widget-composer-
|
|
44
|
-
import { jsx as
|
|
38
|
+
import { bC as kn, bD as wn, bE as Lt, bF as Sn, bG as ve, bH as Mn, bI as Tn, bJ as Ln, bf as Rt, bg as Et, aU as ge, G as Ke, ae as v, aK as A, aI as It, am as Rn, bK as En, ao as In, v as Bn, x as Fe, bL as Fn, bM as Nn, at as ue, bN as Bt, au as Hn, A as Pn, aX as On, bO as $n, B as Ce, q as De, bP as Ct, P as f, t as Dn, aJ as Ft, b6 as An, aF as zn, bQ as qn, ak as ye, J as Wn, bR as Zn, bS as jn, bT as Gn, M as Nt, bU as Vn, ba as Un, bd as Qn } from "./use-common-filters-BHBy4uv6.js";
|
|
39
|
+
import { P as _n, t as o, _ as Kn, k as Jn, c7 as Xn, R as P, T as je, a9 as w, U as R, F as W, a4 as Ht, aF as Ge, aK as Yn, c8 as er, a2 as tr, a3 as nr, n as rr } from "./derive-chart-family-6PZA-xZh.js";
|
|
40
|
+
import * as J from "react";
|
|
41
|
+
import { createContext as Je, useContext as Xe, useMemo as z, useState as $, useCallback as H, useEffect as ke, useRef as pe, useLayoutEffect as Ie, memo as or, forwardRef as ir } from "react";
|
|
42
|
+
import { t as Ne } from "./widget-composer-SGEFYrXY.js";
|
|
43
|
+
import { w as X1 } from "./widget-composer-SGEFYrXY.js";
|
|
44
|
+
import { jsx as fe } from "react/jsx-runtime";
|
|
45
45
|
class ar extends kn {
|
|
46
46
|
constructor(t, n) {
|
|
47
47
|
super(), this.client = t, this.setOptions(n), this.bindMethods(), this.updateResult();
|
|
@@ -85,44 +85,45 @@ class ar extends kn {
|
|
|
85
85
|
})), this.currentMutation.addObserver(this), this.currentMutation.execute();
|
|
86
86
|
}
|
|
87
87
|
updateResult() {
|
|
88
|
-
const t = this.currentMutation ? this.currentMutation.state : Sn(), n = B(T({}, t), {
|
|
89
|
-
isLoading:
|
|
88
|
+
const t = this.currentMutation ? this.currentMutation.state : Sn(), n = t.status === "loading", r = B(T({}, t), {
|
|
89
|
+
isLoading: n,
|
|
90
|
+
isPending: n,
|
|
90
91
|
isSuccess: t.status === "success",
|
|
91
92
|
isError: t.status === "error",
|
|
92
93
|
isIdle: t.status === "idle",
|
|
93
94
|
mutate: this.mutate,
|
|
94
95
|
reset: this.reset
|
|
95
96
|
});
|
|
96
|
-
this.currentResult =
|
|
97
|
+
this.currentResult = r;
|
|
97
98
|
}
|
|
98
99
|
notify(t) {
|
|
99
|
-
|
|
100
|
+
Lt.batch(() => {
|
|
100
101
|
if (this.mutateOptions && this.hasListeners()) {
|
|
101
102
|
if (t.onSuccess) {
|
|
102
103
|
var n, r, a, c;
|
|
103
104
|
(n = (r = this.mutateOptions).onSuccess) == null || n.call(r, this.currentResult.data, this.currentResult.variables, this.currentResult.context), (a = (c = this.mutateOptions).onSettled) == null || a.call(c, this.currentResult.data, null, this.currentResult.variables, this.currentResult.context);
|
|
104
105
|
} else if (t.onError) {
|
|
105
|
-
var s, p, d,
|
|
106
|
-
(s = (p = this.mutateOptions).onError) == null || s.call(p, this.currentResult.error, this.currentResult.variables, this.currentResult.context), (d = (
|
|
106
|
+
var s, p, d, g;
|
|
107
|
+
(s = (p = this.mutateOptions).onError) == null || s.call(p, this.currentResult.error, this.currentResult.variables, this.currentResult.context), (d = (g = this.mutateOptions).onSettled) == null || d.call(g, void 0, this.currentResult.error, this.currentResult.variables, this.currentResult.context);
|
|
107
108
|
}
|
|
108
109
|
}
|
|
109
110
|
t.listeners && this.listeners.forEach(({
|
|
110
|
-
listener:
|
|
111
|
+
listener: m
|
|
111
112
|
}) => {
|
|
112
|
-
|
|
113
|
+
m(this.currentResult);
|
|
113
114
|
});
|
|
114
115
|
});
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
|
-
function
|
|
118
|
-
const r = Ln(e, t), a =
|
|
118
|
+
function Ye(e, t, n) {
|
|
119
|
+
const r = Ln(e, t), a = ve({
|
|
119
120
|
context: r.context
|
|
120
|
-
}), [c] =
|
|
121
|
-
|
|
121
|
+
}), [c] = J.useState(() => new ar(a, r));
|
|
122
|
+
J.useEffect(() => {
|
|
122
123
|
c.setOptions(r);
|
|
123
124
|
}, [c, r]);
|
|
124
|
-
const s = Mn(
|
|
125
|
-
c.mutate(d,
|
|
125
|
+
const s = Mn(J.useCallback((d) => c.subscribe(Lt.batchCalls(d)), [c]), () => c.getCurrentResult(), () => c.getCurrentResult()), p = J.useCallback((d, g) => {
|
|
126
|
+
c.mutate(d, g).catch(sr);
|
|
126
127
|
}, [c]);
|
|
127
128
|
if (s.error && Tn(c.options.useErrorBoundary, [s.error]))
|
|
128
129
|
throw s.error;
|
|
@@ -137,7 +138,7 @@ class lr {
|
|
|
137
138
|
constructor(t, n = !1) {
|
|
138
139
|
this.volatile = n, this.getChatContexts = () => ne(this, null, function* () {
|
|
139
140
|
return (yield this.httpClient.get("api/datasources//")) || [];
|
|
140
|
-
}), this.getNlgInsights = (r) => this.httpClient.post("api/v2/ai/nlg/queryResult", r), this.getQueryRecommendations = (r, a) => this.httpClient.get(`api/v2/ai/recommendations/query/${r}/${a.numOfRecommendations}`), this.getNlqResult = (r, a) => this.httpClient.post(`api/v2/ai/nlq/query/${r}`, a), this.setLlmConfig = (r) => this.httpClient.post("api/v2/settings/ai/llmProvider", r).catch((a) => {
|
|
141
|
+
}), this.getNlgInsights = (r) => this.httpClient.post("api/v2/ai/nlg/queryResult", r), this.getQueryRecommendations = (r, a) => this.httpClient.get(`api/v2/ai/recommendations/query/${r}/${a.numOfRecommendations}${a.userPrompt ? "?userPrompt=" + encodeURIComponent(a.userPrompt) : ""}`), this.getNlqResult = (r, a) => this.httpClient.post(`api/v2/ai/nlq/query/${r}`, a), this.setLlmConfig = (r) => this.httpClient.post("api/v2/settings/ai/llmProvider", r).catch((a) => {
|
|
141
142
|
console.error("Unable to set llm config", a);
|
|
142
143
|
}), this.getAllChats = () => ne(this, null, function* () {
|
|
143
144
|
return this.volatile ? [] : this.httpClient.get("api/v2/ai/chats");
|
|
@@ -161,31 +162,31 @@ class lr {
|
|
|
161
162
|
}, this.httpClient = t;
|
|
162
163
|
}
|
|
163
164
|
}
|
|
164
|
-
const cr = new
|
|
165
|
+
const cr = new Rt({
|
|
165
166
|
defaultOptions: {
|
|
166
167
|
queries: {
|
|
167
168
|
refetchOnWindowFocus: !1,
|
|
168
169
|
refetchOnMount: !1
|
|
169
170
|
}
|
|
170
171
|
}
|
|
171
|
-
}),
|
|
172
|
-
const { app: n } =
|
|
172
|
+
}), et = /* @__PURE__ */ Je(void 0), X = () => Xe(et), dr = ({ children: e, volatile: t }) => {
|
|
173
|
+
const { app: n } = _n(), r = z(() => n ? new lr(n.httpClient, t) : void 0, [
|
|
173
174
|
n,
|
|
174
175
|
t
|
|
175
176
|
]);
|
|
176
|
-
return /* @__PURE__ */ o(
|
|
177
|
+
return /* @__PURE__ */ o(et.Provider, {
|
|
177
178
|
value: r,
|
|
178
|
-
children: /* @__PURE__ */ o(
|
|
179
|
+
children: /* @__PURE__ */ o(Et, {
|
|
179
180
|
client: cr,
|
|
180
181
|
children: e
|
|
181
182
|
})
|
|
182
183
|
});
|
|
183
|
-
},
|
|
184
|
-
const [t, n] =
|
|
184
|
+
}, Pt = /* @__PURE__ */ Je({}), ur = () => Xe(Pt), Ot = ({ children: e }) => {
|
|
185
|
+
const [t, n] = $({}), r = H((s, p) => {
|
|
185
186
|
var d;
|
|
186
187
|
return `${s}_${(d = p == null ? void 0 : p.dashboardId) != null ? d : ""}`;
|
|
187
188
|
}, []), a = H((s, p, d) => {
|
|
188
|
-
n((
|
|
189
|
+
n((g) => B(T({}, g), {
|
|
189
190
|
[r(p, d)]: s
|
|
190
191
|
}));
|
|
191
192
|
}, [
|
|
@@ -194,7 +195,7 @@ const cr = new Lt({
|
|
|
194
195
|
t,
|
|
195
196
|
r
|
|
196
197
|
]);
|
|
197
|
-
return /* @__PURE__ */ o(
|
|
198
|
+
return /* @__PURE__ */ o(Pt.Provider, {
|
|
198
199
|
value: {
|
|
199
200
|
saveChatId: a,
|
|
200
201
|
getChatId: c
|
|
@@ -215,7 +216,7 @@ function pr(e) {
|
|
|
215
216
|
if ("jaql" in e)
|
|
216
217
|
return e;
|
|
217
218
|
{
|
|
218
|
-
const r =
|
|
219
|
+
const r = Xn(e.dataSource), { filters: a = [], relations: c } = Kn(e.filters), { metadata: s, filterRelations: p } = Jn({
|
|
219
220
|
dataSource: e.dataSource,
|
|
220
221
|
attributes: (t = e.dimensions) != null ? t : [],
|
|
221
222
|
measures: (n = e.measures) != null ? n : [],
|
|
@@ -232,19 +233,19 @@ function pr(e) {
|
|
|
232
233
|
return e.verbosity && (d.verbosity = e.verbosity), d;
|
|
233
234
|
}
|
|
234
235
|
}
|
|
235
|
-
const
|
|
236
|
-
const n =
|
|
236
|
+
const He = (e, t = !0) => {
|
|
237
|
+
const n = z(() => pr(e), [
|
|
237
238
|
e
|
|
238
|
-
]), r =
|
|
239
|
+
]), r = X(), { data: a, error: c, isError: s, isLoading: p, isSuccess: d, refetch: g } = ge({
|
|
239
240
|
queryKey: [
|
|
240
241
|
"getNlgInsights",
|
|
241
242
|
n,
|
|
242
243
|
r
|
|
243
244
|
],
|
|
244
245
|
queryFn: () => r == null ? void 0 : r.ai.getNlgInsights(n),
|
|
245
|
-
select: (
|
|
246
|
-
var
|
|
247
|
-
return (
|
|
246
|
+
select: (m) => {
|
|
247
|
+
var b;
|
|
248
|
+
return (b = m == null ? void 0 : m.data) == null ? void 0 : b.answer;
|
|
248
249
|
},
|
|
249
250
|
enabled: !!r && t
|
|
250
251
|
});
|
|
@@ -255,15 +256,15 @@ const Ne = (e, t = !0) => {
|
|
|
255
256
|
data: a,
|
|
256
257
|
error: c,
|
|
257
258
|
refetch: H(() => {
|
|
258
|
-
|
|
259
|
+
g();
|
|
259
260
|
}, [
|
|
260
|
-
|
|
261
|
+
g
|
|
261
262
|
])
|
|
262
263
|
};
|
|
263
264
|
}, hr = (e) => {
|
|
264
|
-
const r = e, { enabled: t } = r, n =
|
|
265
|
-
return
|
|
266
|
-
}, q1 =
|
|
265
|
+
const r = e, { enabled: t } = r, n = $e(r, ["enabled"]);
|
|
266
|
+
return He(n, t);
|
|
267
|
+
}, q1 = Ke("useGetNlgInsights")(hr), gr = [
|
|
267
268
|
"indicator",
|
|
268
269
|
"column",
|
|
269
270
|
"line",
|
|
@@ -286,7 +287,7 @@ function Cr(e) {
|
|
|
286
287
|
};
|
|
287
288
|
}
|
|
288
289
|
const fr = (e) => {
|
|
289
|
-
const { contextTitle: t, request: n } = Cr(e), r =
|
|
290
|
+
const { contextTitle: t, request: n } = Cr(e), r = X(), { isLoading: a, isError: c, isSuccess: s, data: p, error: d, refetch: g } = ge({
|
|
290
291
|
queryKey: [
|
|
291
292
|
"getNlqResult",
|
|
292
293
|
t,
|
|
@@ -295,74 +296,76 @@ const fr = (e) => {
|
|
|
295
296
|
],
|
|
296
297
|
queryFn: () => r == null ? void 0 : r.ai.getNlqResult(t, n),
|
|
297
298
|
enabled: !!r && e.enabled
|
|
298
|
-
}),
|
|
299
|
+
}), m = p ? Ne(p, {
|
|
299
300
|
useCustomizedStyleOptions: e.enableAxisTitlesInWidgetProps || !1
|
|
300
301
|
}) : void 0;
|
|
301
302
|
return {
|
|
302
303
|
isLoading: a,
|
|
303
304
|
isError: c,
|
|
304
305
|
isSuccess: s,
|
|
305
|
-
data:
|
|
306
|
+
data: m,
|
|
306
307
|
error: d,
|
|
307
308
|
refetch: H(() => {
|
|
308
|
-
|
|
309
|
+
g();
|
|
309
310
|
}, [
|
|
310
|
-
|
|
311
|
+
g
|
|
311
312
|
])
|
|
312
313
|
};
|
|
313
|
-
}, W1 =
|
|
314
|
-
const { contextTitle: t, count: n, enableAxisTitlesInWidgetProps: r, enabled: a } = e,
|
|
314
|
+
}, W1 = Ke("useGetNlqResult")(fr), mr = 4, $t = (e) => {
|
|
315
|
+
const { contextTitle: t, count: n, enableAxisTitlesInWidgetProps: r, enabled: a, customPrompt: c } = e, s = X(), p = n != null ? n : mr, d = (a === void 0 || a === !0) && p > 0, { isLoading: g, isError: m, isSuccess: b, data: i, error: u, refetch: l } = ge({
|
|
315
316
|
queryKey: [
|
|
316
317
|
"getQueryRecommendations",
|
|
317
318
|
t,
|
|
318
|
-
|
|
319
|
-
|
|
319
|
+
p,
|
|
320
|
+
s
|
|
320
321
|
],
|
|
321
|
-
queryFn: () =>
|
|
322
|
-
numOfRecommendations:
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
322
|
+
queryFn: () => s == null ? void 0 : s.ai.getQueryRecommendations(t, T({
|
|
323
|
+
numOfRecommendations: p
|
|
324
|
+
}, c ? {
|
|
325
|
+
userPrompt: c
|
|
326
|
+
} : null)),
|
|
327
|
+
enabled: !!s && d
|
|
328
|
+
}), C = z(() => i == null ? void 0 : i.map((h) => B(T({}, h), {
|
|
329
|
+
widgetProps: h.jaql ? Ne(h, {
|
|
327
330
|
useCustomizedStyleOptions: r
|
|
328
331
|
}) : void 0
|
|
329
332
|
})), [
|
|
330
|
-
|
|
333
|
+
i,
|
|
331
334
|
r
|
|
332
335
|
]);
|
|
333
336
|
return {
|
|
334
|
-
isLoading:
|
|
335
|
-
isError:
|
|
337
|
+
isLoading: d ? g : !1,
|
|
338
|
+
isError: m,
|
|
336
339
|
isSuccess: b,
|
|
337
|
-
data:
|
|
338
|
-
error:
|
|
340
|
+
data: C != null ? C : void 0,
|
|
341
|
+
error: u,
|
|
339
342
|
refetch: H(() => {
|
|
340
|
-
|
|
343
|
+
l();
|
|
341
344
|
}, [
|
|
342
|
-
|
|
345
|
+
l
|
|
343
346
|
])
|
|
344
347
|
};
|
|
345
|
-
}, Z1 =
|
|
348
|
+
}, Z1 = Ke("useGetQueryRecommendations")($t), Dt = Object.freeze({
|
|
346
349
|
enableFollowupQuestions: !1,
|
|
347
350
|
enableHeader: !0,
|
|
348
351
|
enableInsights: !0,
|
|
349
352
|
numOfRecommendations: 4,
|
|
350
353
|
numOfRecentPrompts: 5
|
|
351
|
-
}),
|
|
352
|
-
const { t: n } =
|
|
354
|
+
}), At = /* @__PURE__ */ Je(T({}, Dt)), ee = () => Xe(At), br = ({ children: e, value: t }) => {
|
|
355
|
+
const { t: n } = P(), r = Object.entries(t).reduce((a, [c, s]) => (s !== void 0 && (a[c] = s), a), B(T({}, Dt), {
|
|
353
356
|
inputPromptText: n("ai.config.inputPromptText"),
|
|
354
357
|
welcomeText: n("ai.config.welcomeText"),
|
|
355
358
|
suggestionsWelcomeText: n("ai.config.suggestionsWelcomeText")
|
|
356
359
|
}));
|
|
357
|
-
return /* @__PURE__ */ o(
|
|
360
|
+
return /* @__PURE__ */ o(At.Provider, {
|
|
358
361
|
value: r,
|
|
359
362
|
children: e
|
|
360
363
|
});
|
|
361
|
-
},
|
|
362
|
-
const t =
|
|
363
|
-
return
|
|
364
|
+
}, tt = "chatHistory", yr = (e) => {
|
|
365
|
+
const t = X(), { hideHistory: n } = ee();
|
|
366
|
+
return ge({
|
|
364
367
|
queryKey: [
|
|
365
|
-
|
|
368
|
+
tt,
|
|
366
369
|
e,
|
|
367
370
|
t
|
|
368
371
|
],
|
|
@@ -376,9 +379,9 @@ const fr = (e) => {
|
|
|
376
379
|
}),
|
|
377
380
|
enabled: !!t && !!e
|
|
378
381
|
});
|
|
379
|
-
},
|
|
380
|
-
const t =
|
|
381
|
-
return
|
|
382
|
+
}, zt = (e) => {
|
|
383
|
+
const t = X(), n = ve();
|
|
384
|
+
return Ye({
|
|
382
385
|
mutationFn: () => ne(void 0, null, function* () {
|
|
383
386
|
if (!(!t || !e))
|
|
384
387
|
return t.ai.chat.clearHistory(e);
|
|
@@ -388,14 +391,14 @@ const fr = (e) => {
|
|
|
388
391
|
},
|
|
389
392
|
onSettled: () => {
|
|
390
393
|
e && n.setQueriesData([
|
|
391
|
-
|
|
394
|
+
tt,
|
|
392
395
|
e
|
|
393
396
|
], []);
|
|
394
397
|
}
|
|
395
398
|
});
|
|
396
|
-
},
|
|
397
|
-
const { data: t, isLoading: n, isError: r } = yr(e), { mutate: a } =
|
|
398
|
-
return
|
|
399
|
+
}, nt = (e) => {
|
|
400
|
+
const { data: t, isLoading: n, isError: r } = yr(e), { mutate: a } = zt(e);
|
|
401
|
+
return ke(() => {
|
|
399
402
|
r && a();
|
|
400
403
|
}, [
|
|
401
404
|
r,
|
|
@@ -406,7 +409,7 @@ const fr = (e) => {
|
|
|
406
409
|
isError: r
|
|
407
410
|
};
|
|
408
411
|
}, xr = () => {
|
|
409
|
-
const e =
|
|
412
|
+
const e = X(), { data: t, isLoading: n, fetchStatus: r } = ge({
|
|
410
413
|
queryKey: [
|
|
411
414
|
"getDataTopics",
|
|
412
415
|
e
|
|
@@ -423,7 +426,7 @@ const fr = (e) => {
|
|
|
423
426
|
fetchStatus: r
|
|
424
427
|
};
|
|
425
428
|
}, vr = () => {
|
|
426
|
-
const e =
|
|
429
|
+
const e = X(), { data: t, isLoading: n } = ge({
|
|
427
430
|
queryKey: [
|
|
428
431
|
"getAllChats",
|
|
429
432
|
e
|
|
@@ -436,7 +439,7 @@ const fr = (e) => {
|
|
|
436
439
|
isLoading: n
|
|
437
440
|
};
|
|
438
441
|
}, kr = (e, t, n) => {
|
|
439
|
-
const r =
|
|
442
|
+
const r = ve(), a = X(), c = Ye({
|
|
440
443
|
mutationFn: () => ne(void 0, null, function* () {
|
|
441
444
|
if (!(!a || !e))
|
|
442
445
|
return a.ai.chat.create(e, n);
|
|
@@ -445,7 +448,7 @@ const fr = (e) => {
|
|
|
445
448
|
"getAllChats"
|
|
446
449
|
])
|
|
447
450
|
});
|
|
448
|
-
return
|
|
451
|
+
return ke(() => {
|
|
449
452
|
t && c.isIdle && c.mutate();
|
|
450
453
|
}, [
|
|
451
454
|
t,
|
|
@@ -469,18 +472,18 @@ const fr = (e) => {
|
|
|
469
472
|
throw Error(`${t}${JSON.stringify(e)}`);
|
|
470
473
|
}
|
|
471
474
|
}, Sr = (e, t) => {
|
|
472
|
-
const n =
|
|
475
|
+
const n = ve(), r = H((d) => {
|
|
473
476
|
e && n.setQueriesData([
|
|
474
|
-
|
|
477
|
+
tt,
|
|
475
478
|
e
|
|
476
|
-
], (
|
|
477
|
-
...
|
|
479
|
+
], (g) => g && [
|
|
480
|
+
...g,
|
|
478
481
|
d
|
|
479
482
|
]);
|
|
480
483
|
}, [
|
|
481
484
|
n,
|
|
482
485
|
e
|
|
483
|
-
]), { t: a } =
|
|
486
|
+
]), { t: a } = P(), c = X(), { mutate: s, isLoading: p } = Ye({
|
|
484
487
|
mutationFn: (d) => ne(void 0, null, function* () {
|
|
485
488
|
if (!(!c || !e))
|
|
486
489
|
return c.ai.chat.post(e, {
|
|
@@ -507,25 +510,25 @@ const fr = (e) => {
|
|
|
507
510
|
onSuccess: (d) => {
|
|
508
511
|
if (!d)
|
|
509
512
|
return;
|
|
510
|
-
const
|
|
511
|
-
r(wr(d,
|
|
513
|
+
const g = a("ai.errors.unknownResponse");
|
|
514
|
+
r(wr(d, g));
|
|
512
515
|
}
|
|
513
516
|
});
|
|
514
517
|
return {
|
|
515
518
|
mutate: s,
|
|
516
519
|
isLoading: p
|
|
517
520
|
};
|
|
518
|
-
},
|
|
519
|
-
var
|
|
520
|
-
const { data: r, isLoading: a } = vr(), c = ur(), s = c.getChatId(e, t) || ((
|
|
521
|
+
}, rt = (e, t, n = !1) => {
|
|
522
|
+
var m;
|
|
523
|
+
const { data: r, isLoading: a } = vr(), c = ur(), s = c.getChatId(e, t) || ((m = r.find((b) => {
|
|
521
524
|
var i;
|
|
522
|
-
return
|
|
523
|
-
})) == null ? void 0 :
|
|
524
|
-
return
|
|
525
|
-
|
|
525
|
+
return b.contextTitle === e && ((i = b.contextDetails) == null ? void 0 : i.dashboardId) === (t == null ? void 0 : t.dashboardId);
|
|
526
|
+
})) == null ? void 0 : m.chatId), { isError: p, data: d, isSuccess: g } = kr(e, n && !a && !s, t);
|
|
527
|
+
return ke(() => {
|
|
528
|
+
g && d && !s && c.saveChatId(d.chatId, e, t);
|
|
526
529
|
}, [
|
|
527
530
|
d,
|
|
528
|
-
|
|
531
|
+
g,
|
|
529
532
|
e,
|
|
530
533
|
t,
|
|
531
534
|
s,
|
|
@@ -535,42 +538,42 @@ const fr = (e) => {
|
|
|
535
538
|
isLoading: a,
|
|
536
539
|
isError: p
|
|
537
540
|
};
|
|
538
|
-
},
|
|
541
|
+
}, qt = (e) => z(() => {
|
|
539
542
|
if (e != null && e.length) {
|
|
540
543
|
const t = e[e.length - 1];
|
|
541
|
-
if (
|
|
544
|
+
if (ot(t))
|
|
542
545
|
return JSON.parse(t.content);
|
|
543
546
|
}
|
|
544
547
|
return null;
|
|
545
548
|
}, [
|
|
546
549
|
e
|
|
547
|
-
]),
|
|
548
|
-
const { t: n } =
|
|
549
|
-
|
|
550
|
-
c ? p(new
|
|
550
|
+
]), ot = (e) => !!e && "type" in e && e.type === "nlq", Mr = (e) => !!e && "type" in e && e.type === "text", Tr = (e, t) => {
|
|
551
|
+
const { t: n } = P(), { enableFollowupQuestions: r } = ee(), { chatId: a, isError: c } = rt(e, t, !0), [s, p] = $(null), { history: d, isLoading: g, isError: m } = nt(a);
|
|
552
|
+
ke(() => {
|
|
553
|
+
c ? p(new je("ai.errors.chatUnavailable")) : m && p(new je("ai.errors.fetchHistory"));
|
|
551
554
|
}, [
|
|
552
555
|
c,
|
|
553
|
-
|
|
556
|
+
m,
|
|
554
557
|
n
|
|
555
558
|
]);
|
|
556
|
-
const { mutate:
|
|
559
|
+
const { mutate: b, isLoading: i } = Sr(a, r), u = qt(d);
|
|
557
560
|
return {
|
|
558
561
|
chatId: a,
|
|
559
562
|
history: d != null ? d : [],
|
|
560
563
|
lastNlqResponse: u,
|
|
561
|
-
sendMessage:
|
|
564
|
+
sendMessage: b,
|
|
562
565
|
isAwaitingResponse: i,
|
|
563
|
-
isLoading:
|
|
566
|
+
isLoading: g,
|
|
564
567
|
lastError: s
|
|
565
568
|
};
|
|
566
569
|
}, j1 = ({ contextTitle: e, contextDetails: t }) => {
|
|
567
|
-
const { chatId: n } =
|
|
568
|
-
return
|
|
570
|
+
const { chatId: n } = rt(e, t), { history: r } = nt(n);
|
|
571
|
+
return qt(r);
|
|
569
572
|
}, G1 = ({ contextTitle: e, contextDetails: t }) => {
|
|
570
|
-
const { chatId: n } =
|
|
571
|
-
return
|
|
573
|
+
const { chatId: n } = rt(e, t), { history: r } = nt(n);
|
|
574
|
+
return z(() => {
|
|
572
575
|
if (r != null && r.length) {
|
|
573
|
-
const a = r.slice().reverse().find(
|
|
576
|
+
const a = r.slice().reverse().find(ot);
|
|
574
577
|
if (a)
|
|
575
578
|
return JSON.parse(a.content);
|
|
576
579
|
}
|
|
@@ -581,11 +584,11 @@ const fr = (e) => {
|
|
|
581
584
|
}, Lr = 500, Rr = 500, Er = 500, Ir = 900, Br = /* @__PURE__ */ v("div", {
|
|
582
585
|
target: "e1ldv6710",
|
|
583
586
|
label: "ChatFrame"
|
|
584
|
-
})("box-sizing:border-box;position:relative;display:flex;flex-direction:column;border:1px solid #c6c9ce;border-radius:", ({ theme: e }) => e.aiChat.borderRadius, ";background-color:", ({ theme: e }) => e.aiChat.backgroundColor, ";overflow:hidden;min-width:", Lr, "px;min-height:", Rr, "px;width:", ({ width: e }) => e ?
|
|
587
|
+
})("box-sizing:border-box;position:relative;display:flex;flex-direction:column;border:1px solid #c6c9ce;border-radius:", ({ theme: e }) => e.aiChat.borderRadius, ";background-color:", ({ theme: e }) => e.aiChat.backgroundColor, ";overflow:hidden;min-width:", Lr, "px;min-height:", Rr, "px;width:", ({ width: e }) => e ? ft(e) : `${Er}px`, ";height:", ({ height: e }) => e ? ft(e) : `${Ir}px`, ";", ({ theme: e }) => A`
|
|
585
588
|
font-size: ${e.aiChat.primaryFontSize[0]};
|
|
586
589
|
line-height: ${e.aiChat.primaryFontSize[1]};
|
|
587
590
|
`, " border:", ({ theme: e }) => e.aiChat.border === !1 ? "none" : e.aiChat.border, ";");
|
|
588
|
-
function
|
|
591
|
+
function ft(e) {
|
|
589
592
|
return typeof e == "number" ? `${e}px` : e;
|
|
590
593
|
}
|
|
591
594
|
function Fr({ spin: e }) {
|
|
@@ -613,7 +616,7 @@ function Fr({ spin: e }) {
|
|
|
613
616
|
]
|
|
614
617
|
});
|
|
615
618
|
}
|
|
616
|
-
function
|
|
619
|
+
function Pe() {
|
|
617
620
|
return /* @__PURE__ */ o("div", {
|
|
618
621
|
className: "csdk-m-auto",
|
|
619
622
|
"aria-label": "loading spinner",
|
|
@@ -659,26 +662,26 @@ function Hr({ theme: e }) {
|
|
|
659
662
|
]
|
|
660
663
|
});
|
|
661
664
|
}
|
|
662
|
-
const
|
|
665
|
+
const Pr = /* @__PURE__ */ v("div", {
|
|
663
666
|
target: "e1q6h1ze0",
|
|
664
667
|
label: "Section"
|
|
665
|
-
})("display:flex;flex-direction:column;row-gap:4px;"),
|
|
668
|
+
})("display:flex;flex-direction:column;row-gap:4px;"), Or = /* @__PURE__ */ v("div", {
|
|
666
669
|
target: "e1q6h1ze1",
|
|
667
670
|
label: "SectionHeader"
|
|
668
|
-
})("font-size:11px;line-height:18px;font-weight:300;color:", ({ theme: e }) => e.aiChat.dropup.headers.textColor, ";cursor:pointer;padding:4px 12px;&:hover{background-color:", ({ theme: e }) => e.aiChat.dropup.headers.hover.backgroundColor, ";}"),
|
|
671
|
+
})("font-size:11px;line-height:18px;font-weight:300;color:", ({ theme: e }) => e.aiChat.dropup.headers.textColor, ";cursor:pointer;padding:4px 12px;&:hover{background-color:", ({ theme: e }) => e.aiChat.dropup.headers.hover.backgroundColor, ";}"), $r = /* @__PURE__ */ v("div", {
|
|
669
672
|
target: "e1q6h1ze2",
|
|
670
673
|
label: "DropupItem"
|
|
671
674
|
})("font-size:", ({ theme: e }) => e.aiChat.primaryFontSize[0], ";line-height:", ({ theme: e }) => e.aiChat.primaryFontSize[1], ";color:", ({ theme: e }) => e.aiChat.dropup.items.textColor, ";cursor:pointer;padding:4px 12px;&:hover{background-color:", ({ theme: e }) => e.aiChat.dropup.items.hover.backgroundColor, ";}");
|
|
672
|
-
function
|
|
673
|
-
const [a, c] =
|
|
674
|
-
return /* @__PURE__ */ w(
|
|
675
|
+
function Dr({ title: e, items: t, onSelect: n, alwaysExpanded: r = !1 }) {
|
|
676
|
+
const [a, c] = $(!1), { themeSettings: s } = R();
|
|
677
|
+
return /* @__PURE__ */ w(Pr, {
|
|
675
678
|
children: [
|
|
676
|
-
/* @__PURE__ */ o(
|
|
679
|
+
/* @__PURE__ */ o(Or, {
|
|
677
680
|
onClick: () => c((p) => !p),
|
|
678
681
|
theme: s,
|
|
679
682
|
children: e.toUpperCase()
|
|
680
683
|
}),
|
|
681
|
-
(a || r) && t.map((p, d) => /* @__PURE__ */ o(
|
|
684
|
+
(a || r) && t.map((p, d) => /* @__PURE__ */ o($r, {
|
|
682
685
|
onClick: () => n(p),
|
|
683
686
|
theme: s,
|
|
684
687
|
children: p
|
|
@@ -692,7 +695,7 @@ const Ar = /* @__PURE__ */ v("div", {
|
|
|
692
695
|
})("font-family:", ({ theme: e }) => e.typography.fontFamily, ";font-size:", ({ theme: e }) => e.aiChat.primaryFontSize[0], ";line-height:", ({ theme: e }) => e.aiChat.primaryFontSize[1], ";background-color:", ({ theme: e }) => e.aiChat.dropup.backgroundColor, ";border-radius:", ({ theme: e }) => e.aiChat.dropup.borderRadius, ";box-shadow:", ({ theme: e }) => e.aiChat.dropup.boxShadow, ";padding-top:8px;padding-bottom:8px;display:flex;flex-direction:column;row-gap:4px;"), zr = /* @__PURE__ */ v("div", {
|
|
693
696
|
target: "e10x5x4a1",
|
|
694
697
|
label: "ErrorMessage"
|
|
695
|
-
})("font-size:", ({ theme: e }) => e.aiChat.primaryFontSize[0], ";line-height:", ({ theme: e }) => e.aiChat.primaryFontSize[1], ";color:", ({ theme: e }) => e.aiChat.dropup.items.textColor, ";padding:4px 12px;"),
|
|
698
|
+
})("font-size:", ({ theme: e }) => e.aiChat.primaryFontSize[0], ";line-height:", ({ theme: e }) => e.aiChat.primaryFontSize[1], ";color:", ({ theme: e }) => e.aiChat.dropup.items.textColor, ";padding:4px 12px;"), Ve = (e) => e.startsWith("/");
|
|
696
699
|
function qr({ recentPrompts: e, suggestions: t, isLoading: n, onSelection: r, anchorEl: a, text: c, recommendationsError: s }) {
|
|
697
700
|
const d = [
|
|
698
701
|
{
|
|
@@ -705,9 +708,9 @@ function qr({ recentPrompts: e, suggestions: t, isLoading: n, onSelection: r, an
|
|
|
705
708
|
items: t,
|
|
706
709
|
onSelect: r
|
|
707
710
|
}
|
|
708
|
-
].filter((i) => i.title.slice(0, c.length) === c), { themeSettings:
|
|
709
|
-
return /* @__PURE__ */ o(
|
|
710
|
-
open:
|
|
711
|
+
].filter((i) => i.title.slice(0, c.length) === c), { themeSettings: g } = R(), { t: m } = P(), b = d.length === 1;
|
|
712
|
+
return /* @__PURE__ */ o(It, {
|
|
713
|
+
open: Ve(c) && d.length > 0,
|
|
711
714
|
anchorEl: a,
|
|
712
715
|
placement: "top-start",
|
|
713
716
|
modifiers: [
|
|
@@ -728,22 +731,22 @@ function qr({ recentPrompts: e, suggestions: t, isLoading: n, onSelection: r, an
|
|
|
728
731
|
style: {
|
|
729
732
|
width: a == null ? void 0 : a.offsetWidth
|
|
730
733
|
},
|
|
731
|
-
theme:
|
|
734
|
+
theme: g,
|
|
732
735
|
children: [
|
|
733
|
-
n && /* @__PURE__ */ o(
|
|
734
|
-
!n && !s && d.map((i) => /* @__PURE__ */ o(
|
|
735
|
-
alwaysExpanded:
|
|
736
|
+
n && /* @__PURE__ */ o(Pe, {}),
|
|
737
|
+
!n && !s && d.map((i) => /* @__PURE__ */ o(Dr, B(T({}, i), {
|
|
738
|
+
alwaysExpanded: b
|
|
736
739
|
}), i.title)),
|
|
737
740
|
s && /* @__PURE__ */ o(zr, {
|
|
738
|
-
theme:
|
|
739
|
-
children:
|
|
741
|
+
theme: g,
|
|
742
|
+
children: m("ai.errors.recommendationsNotAvailable")
|
|
740
743
|
})
|
|
741
744
|
]
|
|
742
745
|
})
|
|
743
746
|
});
|
|
744
747
|
}
|
|
745
|
-
function
|
|
746
|
-
const { themeSettings: r } =
|
|
748
|
+
function we({ title: e, placement: t = "top", children: n }) {
|
|
749
|
+
const { themeSettings: r } = R();
|
|
747
750
|
return /* @__PURE__ */ o(Rn, {
|
|
748
751
|
title: e,
|
|
749
752
|
placement: t,
|
|
@@ -784,64 +787,63 @@ const Wr = 500, Zr = /* @__PURE__ */ v("div", {
|
|
|
784
787
|
})("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 ", ({ theme: e }) => e.aiChat.input.focus.outlineColor, ";}font-family:inherit;color:", ({ theme: e }) => e.aiChat.primaryTextColor, ";background-color:", ({ theme: e }) => e.aiChat.input.backgroundColor, ";"), Vr = /* @__PURE__ */ v("button", {
|
|
785
788
|
target: "e6iwkw13",
|
|
786
789
|
label: "SendMessageButton"
|
|
787
|
-
})("height:34px;background-color:inherit;border-style:none;color:", ({ theme: e }) => e.aiChat.primaryTextColor, ";", ({ disabled: e }) => e ?
|
|
790
|
+
})("height:34px;background-color:inherit;border-style:none;color:", ({ theme: e }) => e.aiChat.primaryTextColor, ";", ({ disabled: e }) => e ? A`
|
|
788
791
|
opacity: 0.3;
|
|
789
792
|
cursor: not-allowed;
|
|
790
|
-
` :
|
|
793
|
+
` : A`
|
|
791
794
|
opacity: 1;
|
|
792
795
|
cursor: pointer;
|
|
793
796
|
`), Ur = 34;
|
|
794
797
|
function Qr({ onSendMessage: e, onClearHistoryClick: t, disabled: n, recentPrompts: r, suggestions: a, isLoading: c, recommendationsError: s, onChange: p }) {
|
|
795
|
-
const [d,
|
|
796
|
-
if (n)
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
h("");
|
|
798
|
+
const [d, g] = $(""), { inputPromptText: m } = ee(), b = H(() => {
|
|
799
|
+
if (n) return;
|
|
800
|
+
if (Ve(d)) {
|
|
801
|
+
g("");
|
|
800
802
|
return;
|
|
801
803
|
}
|
|
802
|
-
const
|
|
803
|
-
|
|
804
|
+
const x = d.trim();
|
|
805
|
+
x.length !== 0 && (e(x), g(""));
|
|
804
806
|
}, [
|
|
805
807
|
n,
|
|
806
808
|
e,
|
|
807
809
|
d
|
|
808
|
-
]), i = H((
|
|
809
|
-
e(
|
|
810
|
+
]), i = H((x) => {
|
|
811
|
+
e(x), g("");
|
|
810
812
|
}, [
|
|
811
813
|
e
|
|
812
|
-
]), u = H((
|
|
813
|
-
|
|
814
|
+
]), u = H((x) => {
|
|
815
|
+
x.key === "Enter" ? (x.preventDefault(), b()) : x.key === "Escape" && Ve(d) && g("");
|
|
814
816
|
}, [
|
|
815
|
-
|
|
817
|
+
b,
|
|
816
818
|
d
|
|
817
|
-
]), l = H((
|
|
818
|
-
p == null || p(
|
|
819
|
+
]), l = H((x) => {
|
|
820
|
+
p == null || p(x.target.value), g(x.target.value);
|
|
819
821
|
}, [
|
|
820
822
|
p
|
|
821
|
-
]), C =
|
|
822
|
-
|
|
823
|
+
]), C = pe(null);
|
|
824
|
+
Ie(() => {
|
|
823
825
|
C.current && (C.current.style.height = "inherit", C.current.style.height = `${Math.max(C.current.scrollHeight + 2, Ur)}px`);
|
|
824
826
|
}, [
|
|
825
827
|
d
|
|
826
|
-
]),
|
|
828
|
+
]), Ie(() => {
|
|
827
829
|
C.current && C.current.focus({
|
|
828
830
|
preventScroll: !0
|
|
829
831
|
});
|
|
830
832
|
}, []);
|
|
831
|
-
const { themeSettings:
|
|
832
|
-
var
|
|
833
|
-
if ((
|
|
834
|
-
const
|
|
833
|
+
const { themeSettings: h } = R(), { t: k } = P(), S = H((x) => {
|
|
834
|
+
var L;
|
|
835
|
+
if ((L = document.getElementById("csdk-chatbot-frame")) != null && L.contains(x.relatedTarget)) {
|
|
836
|
+
const E = (M) => {
|
|
835
837
|
var I;
|
|
836
|
-
document.removeEventListener("mouseup",
|
|
838
|
+
document.removeEventListener("mouseup", E), document.removeEventListener("keyup", E), M.type === "mouseup" && ((I = document.getSelection()) == null ? void 0 : I.type) !== "Range" && x.target.focus({
|
|
837
839
|
preventScroll: !0
|
|
838
840
|
});
|
|
839
841
|
};
|
|
840
|
-
document.addEventListener("mouseup",
|
|
842
|
+
document.addEventListener("mouseup", E), document.addEventListener("keyup", E);
|
|
841
843
|
}
|
|
842
844
|
}, []);
|
|
843
845
|
return /* @__PURE__ */ w(Zr, {
|
|
844
|
-
theme:
|
|
846
|
+
theme: h,
|
|
845
847
|
children: [
|
|
846
848
|
/* @__PURE__ */ o(qr, {
|
|
847
849
|
recentPrompts: r,
|
|
@@ -852,14 +854,14 @@ function Qr({ onSendMessage: e, onClearHistoryClick: t, disabled: n, recentPromp
|
|
|
852
854
|
text: d,
|
|
853
855
|
recommendationsError: s
|
|
854
856
|
}),
|
|
855
|
-
t && /* @__PURE__ */ o(
|
|
857
|
+
t && /* @__PURE__ */ o(we, {
|
|
856
858
|
title: k("ai.buttons.clearChat"),
|
|
857
859
|
placement: "bottom-start",
|
|
858
860
|
children: /* @__PURE__ */ o(jr, {
|
|
859
861
|
"aria-label": "clear history",
|
|
860
862
|
onClick: t,
|
|
861
863
|
children: /* @__PURE__ */ o(Hr, {
|
|
862
|
-
theme:
|
|
864
|
+
theme: h
|
|
863
865
|
})
|
|
864
866
|
})
|
|
865
867
|
}),
|
|
@@ -871,135 +873,132 @@ function Qr({ onSendMessage: e, onClearHistoryClick: t, disabled: n, recentPromp
|
|
|
871
873
|
rows: 1,
|
|
872
874
|
onChange: l,
|
|
873
875
|
spellCheck: "true",
|
|
874
|
-
placeholder:
|
|
876
|
+
placeholder: m,
|
|
875
877
|
value: d,
|
|
876
878
|
onKeyDown: u,
|
|
877
|
-
theme:
|
|
879
|
+
theme: h
|
|
878
880
|
}),
|
|
879
881
|
/* @__PURE__ */ o(Vr, {
|
|
880
882
|
"aria-label": "send chat message",
|
|
881
883
|
disabled: n || d.length === 0,
|
|
882
|
-
onClick:
|
|
883
|
-
theme:
|
|
884
|
+
onClick: b,
|
|
885
|
+
theme: h,
|
|
884
886
|
children: /* @__PURE__ */ o("span", {
|
|
885
887
|
"data-state": "closed",
|
|
886
888
|
children: /* @__PURE__ */ o(Nr, {
|
|
887
|
-
theme:
|
|
889
|
+
theme: h
|
|
888
890
|
})
|
|
889
891
|
})
|
|
890
892
|
})
|
|
891
893
|
]
|
|
892
894
|
});
|
|
893
895
|
}
|
|
894
|
-
function
|
|
895
|
-
return
|
|
896
|
+
function se() {
|
|
897
|
+
return se = Object.assign ? Object.assign.bind() : function(e) {
|
|
896
898
|
for (var t = 1; t < arguments.length; t++) {
|
|
897
899
|
var n = arguments[t];
|
|
898
|
-
for (var r in n)
|
|
899
|
-
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
900
|
+
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
900
901
|
}
|
|
901
902
|
return e;
|
|
902
|
-
},
|
|
903
|
+
}, se.apply(this, arguments);
|
|
903
904
|
}
|
|
904
|
-
const _r = ["children", "options"],
|
|
905
|
-
var
|
|
905
|
+
const _r = ["children", "options"], y = { blockQuote: "0", breakLine: "1", breakThematic: "2", codeBlock: "3", codeFenced: "4", codeInline: "5", footnote: "6", footnoteReference: "7", gfmTask: "8", heading: "9", headingSetext: "10", htmlBlock: "11", htmlComment: "12", htmlSelfClosing: "13", image: "14", link: "15", linkAngleBraceStyleDetector: "16", linkBareUrlDetector: "17", linkMailtoDetector: "18", newlineCoalescer: "19", orderedList: "20", paragraph: "21", ref: "22", refImage: "23", refLink: "24", table: "25", tableSeparator: "26", text: "27", textBolded: "28", textEmphasized: "29", textEscaped: "30", textMarked: "31", textStrikethroughed: "32", unorderedList: "33" };
|
|
906
|
+
var mt;
|
|
906
907
|
(function(e) {
|
|
907
908
|
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";
|
|
908
|
-
})(
|
|
909
|
-
const
|
|
910
|
-
function
|
|
911
|
-
return "( *)(" + (e === 1 ?
|
|
912
|
-
}
|
|
913
|
-
const Kt = _t(1), Jt = _t(2);
|
|
914
|
-
function Xt(e) {
|
|
915
|
-
return new RegExp("^" + (e === 1 ? Kt : Jt));
|
|
909
|
+
})(mt || (mt = {}));
|
|
910
|
+
const bt = ["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), { class: "className", for: "htmlFor" }), yt = { amp: "&", apos: "'", gt: ">", lt: "<", nbsp: " ", quot: "“" }, Kr = ["style", "script"], Jr = ["src", "href", "data", "formAction", "srcDoc", "action"], Xr = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, Yr = /mailto:/i, eo = /\n{2,}$/, Wt = /^(\s*>[\s\S]*?)(?=\n\n|$)/, to = /^ *> ?/gm, no = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, ro = /^ {2,}\n/, oo = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, Zt = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, jt = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, io = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, ao = /^(?:\n *)*\n/, so = /\r\n?/g, lo = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, co = /^\[\^([^\]]+)]/, uo = /\f/g, po = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, ho = /^\s*?\[(x|\s)\]/, Gt = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Vt = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Ut = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/, Ue = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, go = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, Qt = /^<!--[\s\S]*?(?:-->)/, Co = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, Qe = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, fo = /^\{.*\}$/, mo = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, bo = /^<([^ >]+@[^ >]+)>/, yo = /^<([^ >]+:\/[^ >]+)>/, xo = /-([a-z])?/gi, _t = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, vo = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, ko = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, wo = /^\[([^\]]*)\] ?\[([^\]]*)\]/, So = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, Mo = /\t/g, To = /(^ *\||\| *$)/g, Lo = /^ *:-+: *$/, Ro = /^ *:-+ *$/, Eo = /^ *-+: *$/, Oe = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", Io = new RegExp(`^([*_])\\1${Oe}\\1\\1(?!\\1)`), Bo = new RegExp(`^([*_])${Oe}\\1(?!\\1)`), Fo = new RegExp(`^(==)${Oe}\\1`), No = new RegExp(`^(~~)${Oe}\\1`), Ho = /^\\([^0-9A-Za-z\s])/, xt = /\\([^0-9A-Za-z\s])/g, Po = /^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/, Oo = /^\n+/, $o = /^([ \t]*)/, Do = /\\([^\\])/g, Ao = /(?:^|\n)( *)$/, it = "(?:\\d+\\.)", at = "(?:[*+-])";
|
|
911
|
+
function Kt(e) {
|
|
912
|
+
return "( *)(" + (e === 1 ? it : at) + ") +";
|
|
916
913
|
}
|
|
917
|
-
const
|
|
914
|
+
const Jt = Kt(1), Xt = Kt(2);
|
|
918
915
|
function Yt(e) {
|
|
919
|
-
return new RegExp("^" + (e === 1 ?
|
|
916
|
+
return new RegExp("^" + (e === 1 ? Jt : Xt));
|
|
920
917
|
}
|
|
921
|
-
const
|
|
918
|
+
const zo = Yt(1), qo = Yt(2);
|
|
922
919
|
function en(e) {
|
|
923
|
-
|
|
920
|
+
return new RegExp("^" + (e === 1 ? Jt : Xt) + "[^\\n]*(?:\\n(?!\\1" + (e === 1 ? it : at) + " )[^\\n]*)*(\\n|$)", "gm");
|
|
921
|
+
}
|
|
922
|
+
const Wo = en(1), Zo = en(2);
|
|
923
|
+
function tn(e) {
|
|
924
|
+
const t = e === 1 ? it : at;
|
|
924
925
|
return new RegExp("^( *)(" + t + ") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1" + t + " (?!" + t + " ))\\n*|\\s*\\n*$)");
|
|
925
926
|
}
|
|
926
|
-
const
|
|
927
|
-
function
|
|
928
|
-
const n = t === 1, r = n ?
|
|
929
|
-
return { match:
|
|
927
|
+
const nn = tn(1), rn = tn(2);
|
|
928
|
+
function vt(e, t) {
|
|
929
|
+
const n = t === 1, r = n ? nn : rn, a = n ? Wo : Zo, c = n ? zo : qo;
|
|
930
|
+
return { match: he(function(s, p) {
|
|
930
931
|
const d = Ao.exec(p.prevCapture);
|
|
931
932
|
return d && (p.list || !p.inline && !p.simple) ? r.exec(s = d[1] + s) : null;
|
|
932
933
|
}), order: 1, parse(s, p, d) {
|
|
933
|
-
const
|
|
934
|
+
const g = n ? +s[2] : void 0, m = s[0].replace(eo, `
|
|
934
935
|
`).match(a);
|
|
935
|
-
let
|
|
936
|
-
return { items:
|
|
937
|
-
const l = c.exec(i)[0].length, C = new RegExp("^ {1," + l + "}", "gm"),
|
|
936
|
+
let b = !1;
|
|
937
|
+
return { items: m.map(function(i, u) {
|
|
938
|
+
const l = c.exec(i)[0].length, C = new RegExp("^ {1," + l + "}", "gm"), h = i.replace(C, "").replace(c, ""), k = u === m.length - 1, S = h.indexOf(`
|
|
938
939
|
|
|
939
|
-
`) !== -1 || k &&
|
|
940
|
-
|
|
941
|
-
const
|
|
942
|
-
let
|
|
943
|
-
d.list = !0, S ? (d.inline = !1,
|
|
940
|
+
`) !== -1 || k && b;
|
|
941
|
+
b = S;
|
|
942
|
+
const x = d.inline, L = d.list;
|
|
943
|
+
let E;
|
|
944
|
+
d.list = !0, S ? (d.inline = !1, E = xe(h) + `
|
|
944
945
|
|
|
945
|
-
`) : (d.inline = !0,
|
|
946
|
-
const M = p(
|
|
947
|
-
return d.inline =
|
|
948
|
-
}), ordered: n, start:
|
|
949
|
-
}, render: (s, p, d) => e(s.ordered ? "ol" : "ul", { key: d.key, start: s.type ===
|
|
950
|
-
return e("li", { key:
|
|
946
|
+
`) : (d.inline = !0, E = xe(h));
|
|
947
|
+
const M = p(E, d);
|
|
948
|
+
return d.inline = x, d.list = L, M;
|
|
949
|
+
}), ordered: n, start: g };
|
|
950
|
+
}, render: (s, p, d) => e(s.ordered ? "ol" : "ul", { key: d.key, start: s.type === y.orderedList ? s.start : void 0 }, s.items.map(function(g, m) {
|
|
951
|
+
return e("li", { key: m }, p(g, d));
|
|
951
952
|
})) };
|
|
952
953
|
}
|
|
953
|
-
const jo = new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), Go = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,
|
|
954
|
-
function
|
|
954
|
+
const jo = new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), Go = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, on = [Wt, Zt, jt, Gt, Ut, Vt, _t, nn, rn], Vo = [...on, /^[^\n]+(?: \n|\n{2,})/, Ue, Qt, Qe];
|
|
955
|
+
function xe(e) {
|
|
955
956
|
let t = e.length;
|
|
956
|
-
for (; t > 0 && e[t - 1] <= " "; )
|
|
957
|
-
t--;
|
|
957
|
+
for (; t > 0 && e[t - 1] <= " "; ) t--;
|
|
958
958
|
return e.slice(0, t);
|
|
959
959
|
}
|
|
960
|
-
function
|
|
960
|
+
function me(e) {
|
|
961
961
|
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();
|
|
962
962
|
}
|
|
963
963
|
function Uo(e) {
|
|
964
964
|
return Eo.test(e) ? "right" : Lo.test(e) ? "center" : Ro.test(e) ? "left" : null;
|
|
965
965
|
}
|
|
966
|
-
function
|
|
966
|
+
function kt(e, t, n, r) {
|
|
967
967
|
const a = n.inTable;
|
|
968
968
|
n.inTable = !0;
|
|
969
969
|
let c = [[]], s = "";
|
|
970
970
|
function p() {
|
|
971
|
-
if (!s)
|
|
972
|
-
return;
|
|
971
|
+
if (!s) return;
|
|
973
972
|
const d = c[c.length - 1];
|
|
974
973
|
d.push.apply(d, t(s, n)), s = "";
|
|
975
974
|
}
|
|
976
|
-
return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((d,
|
|
977
|
-
d.trim() === "|" && (p(), r) ?
|
|
975
|
+
return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((d, g, m) => {
|
|
976
|
+
d.trim() === "|" && (p(), r) ? g !== 0 && g !== m.length - 1 && c.push([]) : s += d;
|
|
978
977
|
}), p(), n.inTable = a, c;
|
|
979
978
|
}
|
|
980
979
|
function Qo(e, t, n) {
|
|
981
980
|
n.inline = !0;
|
|
982
981
|
const r = e[2] ? e[2].replace(To, "").split("|").map(Uo) : [], a = e[3] ? function(s, p, d) {
|
|
983
982
|
return s.trim().split(`
|
|
984
|
-
`).map(function(
|
|
985
|
-
return
|
|
983
|
+
`).map(function(g) {
|
|
984
|
+
return kt(g, p, d, !0);
|
|
986
985
|
});
|
|
987
|
-
}(e[3], t, n) : [], c =
|
|
988
|
-
return n.inline = !1, a.length ? { align: r, cells: a, header: c, type:
|
|
986
|
+
}(e[3], t, n) : [], c = kt(e[1], t, n, !!a.length);
|
|
987
|
+
return n.inline = !1, a.length ? { align: r, cells: a, header: c, type: y.table } : { children: c, type: y.paragraph };
|
|
989
988
|
}
|
|
990
|
-
function
|
|
989
|
+
function wt(e, t) {
|
|
991
990
|
return e.align[t] == null ? {} : { textAlign: e.align[t] };
|
|
992
991
|
}
|
|
993
|
-
function
|
|
992
|
+
function he(e) {
|
|
994
993
|
return e.inline = 1, e;
|
|
995
994
|
}
|
|
996
995
|
function re(e) {
|
|
997
|
-
return
|
|
996
|
+
return he(function(t, n) {
|
|
998
997
|
return n.inline ? e.exec(t) : null;
|
|
999
998
|
});
|
|
1000
999
|
}
|
|
1001
1000
|
function oe(e) {
|
|
1002
|
-
return
|
|
1001
|
+
return he(function(t, n) {
|
|
1003
1002
|
return n.inline || n.simple ? e.exec(t) : null;
|
|
1004
1003
|
});
|
|
1005
1004
|
}
|
|
@@ -1008,36 +1007,34 @@ function Y(e) {
|
|
|
1008
1007
|
return n.inline || n.simple ? null : e.exec(t);
|
|
1009
1008
|
};
|
|
1010
1009
|
}
|
|
1011
|
-
function
|
|
1012
|
-
return
|
|
1010
|
+
function be(e) {
|
|
1011
|
+
return he(function(t) {
|
|
1013
1012
|
return e.exec(t);
|
|
1014
1013
|
});
|
|
1015
1014
|
}
|
|
1016
1015
|
function _o(e, t) {
|
|
1017
|
-
if (t.inline || t.simple)
|
|
1018
|
-
return null;
|
|
1016
|
+
if (t.inline || t.simple) return null;
|
|
1019
1017
|
let n = "";
|
|
1020
1018
|
e.split(`
|
|
1021
1019
|
`).every((a) => (a += `
|
|
1022
|
-
`, !
|
|
1023
|
-
const r =
|
|
1020
|
+
`, !on.some((c) => c.test(a)) && (n += a, !!a.trim())));
|
|
1021
|
+
const r = xe(n);
|
|
1024
1022
|
return r == "" ? null : [n, , r];
|
|
1025
1023
|
}
|
|
1026
1024
|
const Ko = /(javascript|vbscript|data(?!:image)):/i;
|
|
1027
1025
|
function Jo(e) {
|
|
1028
1026
|
try {
|
|
1029
1027
|
const t = decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g, "");
|
|
1030
|
-
if (Ko.test(t))
|
|
1031
|
-
return null;
|
|
1028
|
+
if (Ko.test(t)) return null;
|
|
1032
1029
|
} catch (t) {
|
|
1033
1030
|
return null;
|
|
1034
1031
|
}
|
|
1035
1032
|
return e;
|
|
1036
1033
|
}
|
|
1037
|
-
function
|
|
1038
|
-
return e.replace(
|
|
1034
|
+
function St(e) {
|
|
1035
|
+
return e.replace(Do, "$1");
|
|
1039
1036
|
}
|
|
1040
|
-
function
|
|
1037
|
+
function Ee(e, t, n) {
|
|
1041
1038
|
const r = n.inline || !1, a = n.simple || !1;
|
|
1042
1039
|
n.inline = !0, n.simple = !0;
|
|
1043
1040
|
const c = e(t, n);
|
|
@@ -1055,227 +1052,216 @@ function Yo(e, t, n) {
|
|
|
1055
1052
|
const a = e(t, n);
|
|
1056
1053
|
return n.inline = r, a;
|
|
1057
1054
|
}
|
|
1058
|
-
const
|
|
1059
|
-
function
|
|
1055
|
+
const Ae = (e, t, n) => ({ children: Ee(t, e[2], n) });
|
|
1056
|
+
function ze() {
|
|
1060
1057
|
return {};
|
|
1061
1058
|
}
|
|
1062
|
-
function
|
|
1059
|
+
function qe() {
|
|
1063
1060
|
return null;
|
|
1064
1061
|
}
|
|
1065
1062
|
function ei(...e) {
|
|
1066
1063
|
return e.filter(Boolean).join(" ");
|
|
1067
1064
|
}
|
|
1068
|
-
function
|
|
1065
|
+
function We(e, t, n) {
|
|
1069
1066
|
let r = e;
|
|
1070
1067
|
const a = t.split(".");
|
|
1071
|
-
for (; a.length && (r = r[a[0]], r !== void 0); )
|
|
1072
|
-
a.shift();
|
|
1068
|
+
for (; a.length && (r = r[a[0]], r !== void 0); ) a.shift();
|
|
1073
1069
|
return r || n;
|
|
1074
1070
|
}
|
|
1075
1071
|
function ti(e = "", t = {}) {
|
|
1076
1072
|
function n(i, u, ...l) {
|
|
1077
|
-
const C =
|
|
1078
|
-
return t.createElement(function(
|
|
1079
|
-
const S =
|
|
1080
|
-
return S ? typeof S == "function" || typeof S == "object" && "render" in S ? S :
|
|
1081
|
-
}(i, t.overrides),
|
|
1073
|
+
const C = We(t.overrides, `${i}.props`, {});
|
|
1074
|
+
return t.createElement(function(h, k) {
|
|
1075
|
+
const S = We(k, h);
|
|
1076
|
+
return S ? typeof S == "function" || typeof S == "object" && "render" in S ? S : We(k, `${h}.component`, h) : h;
|
|
1077
|
+
}(i, t.overrides), se({}, u, C, { className: ei(u == null ? void 0 : u.className, C.className) || void 0 }), ...l);
|
|
1082
1078
|
}
|
|
1083
1079
|
function r(i) {
|
|
1084
1080
|
i = i.replace(po, "");
|
|
1085
1081
|
let u = !1;
|
|
1086
1082
|
t.forceInline ? u = !0 : t.forceBlock || (u = So.test(i) === !1);
|
|
1087
|
-
const l =
|
|
1083
|
+
const l = g(d(u ? i : `${xe(i).replace(Oo, "")}
|
|
1088
1084
|
|
|
1089
1085
|
`, { inline: u }));
|
|
1090
|
-
for (; typeof l[l.length - 1] == "string" && !l[l.length - 1].trim(); )
|
|
1091
|
-
|
|
1092
|
-
if (t.wrapper === null)
|
|
1093
|
-
return l;
|
|
1086
|
+
for (; typeof l[l.length - 1] == "string" && !l[l.length - 1].trim(); ) l.pop();
|
|
1087
|
+
if (t.wrapper === null) return l;
|
|
1094
1088
|
const C = t.wrapper || (u ? "span" : "div");
|
|
1095
|
-
let
|
|
1096
|
-
if (l.length > 1 || t.forceWrapper)
|
|
1097
|
-
g = l;
|
|
1089
|
+
let h;
|
|
1090
|
+
if (l.length > 1 || t.forceWrapper) h = l;
|
|
1098
1091
|
else {
|
|
1099
|
-
if (l.length === 1)
|
|
1100
|
-
|
|
1101
|
-
g = null;
|
|
1092
|
+
if (l.length === 1) return h = l[0], typeof h == "string" ? n("span", { key: "outer" }, h) : h;
|
|
1093
|
+
h = null;
|
|
1102
1094
|
}
|
|
1103
|
-
return t.createElement(C, { key: "outer" },
|
|
1095
|
+
return t.createElement(C, { key: "outer" }, h);
|
|
1104
1096
|
}
|
|
1105
1097
|
function a(i, u) {
|
|
1106
1098
|
const l = u.match(Xr);
|
|
1107
|
-
return l ? l.reduce(function(C,
|
|
1108
|
-
const k =
|
|
1099
|
+
return l ? l.reduce(function(C, h) {
|
|
1100
|
+
const k = h.indexOf("=");
|
|
1109
1101
|
if (k !== -1) {
|
|
1110
1102
|
const S = function(M) {
|
|
1111
|
-
return M.indexOf("-") !== -1 && M.match(Co) === null && (M = M.replace(xo, function(I,
|
|
1112
|
-
return
|
|
1103
|
+
return M.indexOf("-") !== -1 && M.match(Co) === null && (M = M.replace(xo, function(I, O) {
|
|
1104
|
+
return O.toUpperCase();
|
|
1113
1105
|
})), M;
|
|
1114
|
-
}(
|
|
1106
|
+
}(h.slice(0, k)).trim(), x = function(M) {
|
|
1115
1107
|
const I = M[0];
|
|
1116
1108
|
return (I === '"' || I === "'") && M.length >= 2 && M[M.length - 1] === I ? M.slice(1, -1) : M;
|
|
1117
|
-
}(
|
|
1118
|
-
if (
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
const q = Q[V];
|
|
1128
|
-
if (q !== '"' && q !== "'" || F || (z ? q === X && (z = !1, X = "") : (z = !0, X = q)), q === "(" && U.endsWith("url") ? F = !0 : q === ")" && F && (F = !1), q !== ";" || z || F)
|
|
1129
|
-
U += q;
|
|
1109
|
+
}(h.slice(k + 1).trim()), L = bt[S] || S;
|
|
1110
|
+
if (L === "ref") return C;
|
|
1111
|
+
const E = C[L] = function(M, I, O, ae) {
|
|
1112
|
+
return I === "style" ? function(U) {
|
|
1113
|
+
const Z = [];
|
|
1114
|
+
let q = "", G = !1, F = !1, Q = "";
|
|
1115
|
+
if (!U) return Z;
|
|
1116
|
+
for (let V = 0; V < U.length; V++) {
|
|
1117
|
+
const D = U[V];
|
|
1118
|
+
if (D !== '"' && D !== "'" || G || (F ? D === Q && (F = !1, Q = "") : (F = !0, Q = D)), D === "(" && q.endsWith("url") ? G = !0 : D === ")" && G && (G = !1), D !== ";" || F || G) q += D;
|
|
1130
1119
|
else {
|
|
1131
|
-
const j =
|
|
1120
|
+
const j = q.trim();
|
|
1132
1121
|
if (j) {
|
|
1133
1122
|
const te = j.indexOf(":");
|
|
1134
1123
|
if (te > 0) {
|
|
1135
|
-
const le = j.slice(0, te).trim(),
|
|
1136
|
-
|
|
1124
|
+
const le = j.slice(0, te).trim(), ce = j.slice(te + 1).trim();
|
|
1125
|
+
Z.push([le, ce]);
|
|
1137
1126
|
}
|
|
1138
1127
|
}
|
|
1139
|
-
|
|
1128
|
+
q = "";
|
|
1140
1129
|
}
|
|
1141
1130
|
}
|
|
1142
|
-
const _ =
|
|
1131
|
+
const _ = q.trim();
|
|
1143
1132
|
if (_) {
|
|
1144
1133
|
const V = _.indexOf(":");
|
|
1145
1134
|
if (V > 0) {
|
|
1146
|
-
const
|
|
1147
|
-
|
|
1135
|
+
const D = _.slice(0, V).trim(), j = _.slice(V + 1).trim();
|
|
1136
|
+
Z.push([D, j]);
|
|
1148
1137
|
}
|
|
1149
1138
|
}
|
|
1150
|
-
return
|
|
1151
|
-
}(
|
|
1152
|
-
return
|
|
1153
|
-
}, {}) : Jr.indexOf(I) !== -1 ?
|
|
1154
|
-
}(i, S,
|
|
1155
|
-
typeof
|
|
1156
|
-
} else
|
|
1157
|
-
g !== "style" && (C[mt[g] || g] = !0);
|
|
1139
|
+
return Z;
|
|
1140
|
+
}(O).reduce(function(U, [Z, q]) {
|
|
1141
|
+
return U[Z.replace(/(-[a-z])/g, (G) => G[1].toUpperCase())] = ae(q, M, Z), U;
|
|
1142
|
+
}, {}) : Jr.indexOf(I) !== -1 ? ae(O, M, I) : (O.match(fo) && (O = O.slice(1, O.length - 1)), O === "true" || O !== "false" && O);
|
|
1143
|
+
}(i, S, x, t.sanitizer);
|
|
1144
|
+
typeof E == "string" && (Ue.test(E) || Qe.test(E)) && (C[L] = r(E.trim()));
|
|
1145
|
+
} else h !== "style" && (C[bt[h] || h] = !0);
|
|
1158
1146
|
return C;
|
|
1159
1147
|
}, {}) : null;
|
|
1160
1148
|
}
|
|
1161
|
-
t.overrides = t.overrides || {}, t.sanitizer = t.sanitizer || Jo, t.slugify = t.slugify ||
|
|
1162
|
-
const c = [], s = {}, p = { [
|
|
1163
|
-
const [, C,
|
|
1164
|
-
return { alert: C, children: u(
|
|
1149
|
+
t.overrides = t.overrides || {}, t.sanitizer = t.sanitizer || Jo, t.slugify = t.slugify || me, t.namedCodesToUnicode = t.namedCodesToUnicode ? se({}, yt, t.namedCodesToUnicode) : yt, t.createElement = t.createElement || J.createElement;
|
|
1150
|
+
const c = [], s = {}, p = { [y.blockQuote]: { match: Y(Wt), order: 1, parse(i, u, l) {
|
|
1151
|
+
const [, C, h] = i[0].replace(to, "").match(no);
|
|
1152
|
+
return { alert: C, children: u(h, l) };
|
|
1165
1153
|
}, render(i, u, l) {
|
|
1166
1154
|
const C = { key: l.key };
|
|
1167
|
-
return i.alert && (C.className = "markdown-alert-" + t.slugify(i.alert.toLowerCase(),
|
|
1168
|
-
} }, [
|
|
1169
|
-
const [, C] = i[3].match(
|
|
1170
|
-
var
|
|
1171
|
-
const
|
|
1172
|
-
return l.inAnchor = l.inAnchor ||
|
|
1173
|
-
}, render: (i, u, l) => n(i.tag,
|
|
1155
|
+
return i.alert && (C.className = "markdown-alert-" + t.slugify(i.alert.toLowerCase(), me), i.children.unshift({ attrs: {}, children: [{ type: y.text, text: i.alert }], noInnerParse: !0, type: y.htmlBlock, tag: "header" })), n("blockquote", C, u(i.children, l));
|
|
1156
|
+
} }, [y.breakLine]: { match: be(ro), order: 1, parse: ze, render: (i, u, l) => n("br", { key: l.key }) }, [y.breakThematic]: { match: Y(oo), order: 1, parse: ze, render: (i, u, l) => n("hr", { key: l.key }) }, [y.codeBlock]: { match: Y(jt), order: 0, parse: (i) => ({ lang: void 0, text: xe(i[0].replace(/^ {4}/gm, "")).replace(xt, "$1") }), render: (i, u, l) => n("pre", { key: l.key }, n("code", se({}, i.attrs, { className: i.lang ? `lang-${i.lang}` : "" }), i.text)) }, [y.codeFenced]: { match: Y(Zt), order: 0, parse: (i) => ({ attrs: a("code", i[3] || ""), lang: i[2] || void 0, text: i[4], type: y.codeBlock }) }, [y.codeInline]: { match: oe(io), order: 3, parse: (i) => ({ text: i[2].replace(xt, "$1") }), render: (i, u, l) => n("code", { key: l.key }, i.text) }, [y.footnote]: { match: Y(lo), order: 0, parse: (i) => (c.push({ footnote: i[2], identifier: i[1] }), {}), render: qe }, [y.footnoteReference]: { match: re(co), order: 1, parse: (i) => ({ target: `#${t.slugify(i[1], me)}`, text: i[1] }), render: (i, u, l) => n("a", { key: l.key, href: t.sanitizer(i.target, "a", "href") }, n("sup", { key: l.key }, i.text)) }, [y.gfmTask]: { match: re(ho), order: 1, parse: (i) => ({ completed: i[1].toLowerCase() === "x" }), render: (i, u, l) => n("input", { checked: i.completed, key: l.key, readOnly: !0, type: "checkbox" }) }, [y.heading]: { match: Y(t.enforceAtxHeadings ? Vt : Gt), order: 1, parse: (i, u, l) => ({ children: Ee(u, i[2], l), id: t.slugify(i[2], me), level: i[1].length }), render: (i, u, l) => n(`h${i.level}`, { id: i.id, key: l.key }, u(i.children, l)) }, [y.headingSetext]: { match: Y(Ut), order: 0, parse: (i, u, l) => ({ children: Ee(u, i[1], l), level: i[2] === "=" ? 1 : 2, type: y.heading }) }, [y.htmlBlock]: { match: be(Ue), order: 1, parse(i, u, l) {
|
|
1157
|
+
const [, C] = i[3].match($o), h = new RegExp(`^${C}`, "gm"), k = i[3].replace(h, ""), S = (x = k, Vo.some((O) => O.test(x)) ? Yo : Ee);
|
|
1158
|
+
var x;
|
|
1159
|
+
const L = i[1].toLowerCase(), E = Kr.indexOf(L) !== -1, M = (E ? L : i[1]).trim(), I = { attrs: a(M, i[2]), noInnerParse: E, tag: M };
|
|
1160
|
+
return l.inAnchor = l.inAnchor || L === "a", E ? I.text = i[3] : I.children = S(u, k, l), l.inAnchor = !1, I;
|
|
1161
|
+
}, render: (i, u, l) => n(i.tag, se({ key: l.key }, i.attrs), i.text || (i.children ? u(i.children, l) : "")) }, [y.htmlSelfClosing]: { match: be(Qe), order: 1, parse(i) {
|
|
1174
1162
|
const u = i[1].trim();
|
|
1175
1163
|
return { attrs: a(u, i[2] || ""), tag: u };
|
|
1176
|
-
}, render: (i, u, l) => n(i.tag,
|
|
1164
|
+
}, render: (i, u, l) => n(i.tag, se({}, i.attrs, { key: l.key })) }, [y.htmlComment]: { match: be(Qt), order: 1, parse: () => ({}), render: qe }, [y.image]: { match: oe(Go), order: 1, parse: (i) => ({ alt: i[1], target: St(i[2]), title: i[3] }), render: (i, u, l) => n("img", { key: l.key, alt: i.alt || void 0, title: i.title || void 0, src: t.sanitizer(i.target, "img", "src") }) }, [y.link]: { match: re(jo), order: 3, parse: (i, u, l) => ({ children: Xo(u, i[1], l), target: St(i[2]), title: i[3] }), render: (i, u, l) => n("a", { key: l.key, href: t.sanitizer(i.target, "a", "href"), title: i.title }, u(i.children, l)) }, [y.linkAngleBraceStyleDetector]: { match: re(yo), order: 0, parse: (i) => ({ children: [{ text: i[1], type: y.text }], target: i[1], type: y.link }) }, [y.linkBareUrlDetector]: { match: he((i, u) => u.inAnchor || t.disableAutoLink ? null : re(mo)(i, u)), order: 0, parse: (i) => ({ children: [{ text: i[1], type: y.text }], target: i[1], title: void 0, type: y.link }) }, [y.linkMailtoDetector]: { match: re(bo), order: 0, parse(i) {
|
|
1177
1165
|
let u = i[1], l = i[1];
|
|
1178
|
-
return Yr.test(l) || (l = "mailto:" + l), { children: [{ text: u.replace("mailto:", ""), type:
|
|
1179
|
-
} }, [
|
|
1180
|
-
` }, [
|
|
1166
|
+
return Yr.test(l) || (l = "mailto:" + l), { children: [{ text: u.replace("mailto:", ""), type: y.text }], target: l, type: y.link };
|
|
1167
|
+
} }, [y.orderedList]: vt(n, 1), [y.unorderedList]: vt(n, 2), [y.newlineCoalescer]: { match: Y(ao), order: 3, parse: ze, render: () => `
|
|
1168
|
+
` }, [y.paragraph]: { match: he(_o), order: 3, parse: Ae, render: (i, u, l) => n("p", { key: l.key }, u(i.children, l)) }, [y.ref]: { match: re(vo), order: 0, parse: (i) => (s[i[1]] = { target: i[2], title: i[4] }, {}), render: qe }, [y.refImage]: { match: oe(ko), order: 0, parse: (i) => ({ alt: i[1] || void 0, ref: i[2] }), render: (i, u, l) => s[i.ref] ? n("img", { key: l.key, alt: i.alt, src: t.sanitizer(s[i.ref].target, "img", "src"), title: s[i.ref].title }) : null }, [y.refLink]: { match: re(wo), order: 0, parse: (i, u, l) => ({ children: u(i[1], l), fallbackChildren: i[0], ref: i[2] }), render: (i, u, l) => s[i.ref] ? n("a", { key: l.key, href: t.sanitizer(s[i.ref].target, "a", "href"), title: s[i.ref].title }, u(i.children, l)) : n("span", { key: l.key }, i.fallbackChildren) }, [y.table]: { match: Y(_t), order: 1, parse: Qo, render(i, u, l) {
|
|
1181
1169
|
const C = i;
|
|
1182
|
-
return n("table", { key: l.key }, n("thead", null, n("tr", null, C.header.map(function(
|
|
1183
|
-
return n("th", { key: k, style:
|
|
1184
|
-
}))), n("tbody", null, C.cells.map(function(
|
|
1185
|
-
return n("tr", { key: k },
|
|
1186
|
-
return n("td", { key:
|
|
1170
|
+
return n("table", { key: l.key }, n("thead", null, n("tr", null, C.header.map(function(h, k) {
|
|
1171
|
+
return n("th", { key: k, style: wt(C, k) }, u(h, l));
|
|
1172
|
+
}))), n("tbody", null, C.cells.map(function(h, k) {
|
|
1173
|
+
return n("tr", { key: k }, h.map(function(S, x) {
|
|
1174
|
+
return n("td", { key: x, style: wt(C, x) }, u(S, l));
|
|
1187
1175
|
}));
|
|
1188
1176
|
})));
|
|
1189
|
-
} }, [
|
|
1190
|
-
t.disableParsingRawHTML === !0 && (delete p[
|
|
1177
|
+
} }, [y.text]: { match: be(Po), order: 4, parse: (i) => ({ text: i[0].replace(go, (u, l) => t.namedCodesToUnicode[l] ? t.namedCodesToUnicode[l] : u) }), render: (i) => i.text }, [y.textBolded]: { match: oe(Io), order: 2, parse: (i, u, l) => ({ children: u(i[2], l) }), render: (i, u, l) => n("strong", { key: l.key }, u(i.children, l)) }, [y.textEmphasized]: { match: oe(Bo), order: 3, parse: (i, u, l) => ({ children: u(i[2], l) }), render: (i, u, l) => n("em", { key: l.key }, u(i.children, l)) }, [y.textEscaped]: { match: oe(Ho), order: 1, parse: (i) => ({ text: i[1], type: y.text }) }, [y.textMarked]: { match: oe(Fo), order: 3, parse: Ae, render: (i, u, l) => n("mark", { key: l.key }, u(i.children, l)) }, [y.textStrikethroughed]: { match: oe(No), order: 3, parse: Ae, render: (i, u, l) => n("del", { key: l.key }, u(i.children, l)) } };
|
|
1178
|
+
t.disableParsingRawHTML === !0 && (delete p[y.htmlBlock], delete p[y.htmlSelfClosing]);
|
|
1191
1179
|
const d = function(i) {
|
|
1192
1180
|
let u = Object.keys(i);
|
|
1193
|
-
function l(C,
|
|
1194
|
-
let k, S,
|
|
1195
|
-
for (
|
|
1181
|
+
function l(C, h) {
|
|
1182
|
+
let k, S, x = [], L = "", E = "";
|
|
1183
|
+
for (h.prevCapture = h.prevCapture || ""; C; ) {
|
|
1196
1184
|
let M = 0;
|
|
1197
1185
|
for (; M < u.length; ) {
|
|
1198
|
-
if (
|
|
1186
|
+
if (L = u[M], k = i[L], h.inline && !k.match.inline) {
|
|
1199
1187
|
M++;
|
|
1200
1188
|
continue;
|
|
1201
1189
|
}
|
|
1202
|
-
const I = k.match(C,
|
|
1190
|
+
const I = k.match(C, h);
|
|
1203
1191
|
if (I) {
|
|
1204
|
-
|
|
1192
|
+
E = I[0], h.prevCapture += E, C = C.substring(E.length), S = k.parse(I, l, h), S.type == null && (S.type = L), x.push(S);
|
|
1205
1193
|
break;
|
|
1206
1194
|
}
|
|
1207
1195
|
M++;
|
|
1208
1196
|
}
|
|
1209
1197
|
}
|
|
1210
|
-
return
|
|
1198
|
+
return h.prevCapture = "", x;
|
|
1211
1199
|
}
|
|
1212
|
-
return u.sort(function(C,
|
|
1213
|
-
let k = i[C].order, S = i[
|
|
1214
|
-
return k !== S ? k - S : C <
|
|
1215
|
-
}), function(C,
|
|
1200
|
+
return u.sort(function(C, h) {
|
|
1201
|
+
let k = i[C].order, S = i[h].order;
|
|
1202
|
+
return k !== S ? k - S : C < h ? -1 : 1;
|
|
1203
|
+
}), function(C, h) {
|
|
1216
1204
|
return l(function(k) {
|
|
1217
1205
|
return k.replace(so, `
|
|
1218
1206
|
`).replace(uo, "").replace(Mo, " ");
|
|
1219
|
-
}(C),
|
|
1207
|
+
}(C), h);
|
|
1220
1208
|
};
|
|
1221
|
-
}(p),
|
|
1222
|
-
return function(l, C,
|
|
1209
|
+
}(p), g = (m = /* @__PURE__ */ function(i, u) {
|
|
1210
|
+
return function(l, C, h) {
|
|
1223
1211
|
const k = i[l.type].render;
|
|
1224
|
-
return u ? u(() => k(l, C,
|
|
1212
|
+
return u ? u(() => k(l, C, h), l, C, h) : k(l, C, h);
|
|
1225
1213
|
};
|
|
1226
1214
|
}(p, t.renderRule), function i(u, l = {}) {
|
|
1227
1215
|
if (Array.isArray(u)) {
|
|
1228
|
-
const C = l.key,
|
|
1216
|
+
const C = l.key, h = [];
|
|
1229
1217
|
let k = !1;
|
|
1230
1218
|
for (let S = 0; S < u.length; S++) {
|
|
1231
1219
|
l.key = S;
|
|
1232
|
-
const
|
|
1233
|
-
|
|
1220
|
+
const x = i(u[S], l), L = typeof x == "string";
|
|
1221
|
+
L && k ? h[h.length - 1] += x : x !== null && h.push(x), k = L;
|
|
1234
1222
|
}
|
|
1235
|
-
return l.key = C,
|
|
1223
|
+
return l.key = C, h;
|
|
1236
1224
|
}
|
|
1237
|
-
return
|
|
1225
|
+
return m(u, i, l);
|
|
1238
1226
|
});
|
|
1239
|
-
var
|
|
1240
|
-
const
|
|
1241
|
-
return c.length ? n("div", null,
|
|
1242
|
-
return n("div", { id: t.slugify(i.identifier,
|
|
1243
|
-
}))) :
|
|
1227
|
+
var m;
|
|
1228
|
+
const b = r(e);
|
|
1229
|
+
return c.length ? n("div", null, b, n("footer", { key: "footer" }, c.map(function(i) {
|
|
1230
|
+
return n("div", { id: t.slugify(i.identifier, me), key: i.identifier }, i.identifier, g(d(i.footnote, { inline: !0 })));
|
|
1231
|
+
}))) : b;
|
|
1244
1232
|
}
|
|
1245
1233
|
const ni = (e) => {
|
|
1246
1234
|
let { children: t = "", options: n } = e, r = function(a, c) {
|
|
1247
|
-
if (a == null)
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
for (p = 0; p < h.length; p++)
|
|
1251
|
-
c.indexOf(s = h[p]) >= 0 || (d[s] = a[s]);
|
|
1235
|
+
if (a == null) return {};
|
|
1236
|
+
var s, p, d = {}, g = Object.keys(a);
|
|
1237
|
+
for (p = 0; p < g.length; p++) c.indexOf(s = g[p]) >= 0 || (d[s] = a[s]);
|
|
1252
1238
|
return d;
|
|
1253
1239
|
}(e, _r);
|
|
1254
|
-
return
|
|
1240
|
+
return J.cloneElement(ti(t, n), r);
|
|
1255
1241
|
}, ri = /* @__PURE__ */ v("div", {
|
|
1256
1242
|
target: "e1vkf9b40",
|
|
1257
1243
|
label: "FlexContainer"
|
|
1258
|
-
})("display:flex;", ({ align: e }) => e === "right" ?
|
|
1244
|
+
})("display:flex;", ({ align: e }) => e === "right" ? A`
|
|
1259
1245
|
justify-content: flex-end;
|
|
1260
|
-
` :
|
|
1246
|
+
` : A`
|
|
1261
1247
|
justify-content: flex-start;
|
|
1262
|
-
`),
|
|
1248
|
+
`), an = /* @__PURE__ */ v("div", {
|
|
1263
1249
|
target: "e1vkf9b41",
|
|
1264
1250
|
label: "MessageContainer"
|
|
1265
|
-
})("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;", ({ align: e }) => e === "right" ?
|
|
1251
|
+
})("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;", ({ align: e }) => e === "right" ? A`
|
|
1266
1252
|
text-align: right;
|
|
1267
1253
|
border-radius: 10px 10px 0px 10px;
|
|
1268
|
-
` :
|
|
1254
|
+
` : A`
|
|
1269
1255
|
text-align: left;
|
|
1270
1256
|
border-radius: 10px 10px 10px 0px;
|
|
1271
|
-
`, " ", ({ align: e }) => e !== "full" ?
|
|
1257
|
+
`, " ", ({ align: e }) => e !== "full" ? A`
|
|
1272
1258
|
max-width: 85%;
|
|
1273
1259
|
` : "", " color:", ({ theme: e }) => e.aiChat.primaryTextColor, ";background-color:", ({ theme: e, align: t }) => t === "right" ? e.aiChat.userMessages.backgroundColor : e.aiChat.systemMessages.backgroundColor, ";"), ie = ({ align: e, children: t }) => {
|
|
1274
|
-
const { themeSettings: n } =
|
|
1260
|
+
const { themeSettings: n } = R();
|
|
1275
1261
|
return /* @__PURE__ */ o(ri, {
|
|
1276
1262
|
theme: n,
|
|
1277
1263
|
align: e,
|
|
1278
|
-
children: /* @__PURE__ */ o(
|
|
1264
|
+
children: /* @__PURE__ */ o(an, {
|
|
1279
1265
|
theme: n,
|
|
1280
1266
|
align: e,
|
|
1281
1267
|
children: typeof t == "string" ? /* @__PURE__ */ o(ni, {
|
|
@@ -1301,8 +1287,8 @@ const ii = /* @__PURE__ */ v("div", {
|
|
|
1301
1287
|
target: "e1r5p4wy2",
|
|
1302
1288
|
label: "ActionButton"
|
|
1303
1289
|
})("color:rgba(54,163,217,1);cursor:pointer;");
|
|
1304
|
-
function
|
|
1305
|
-
const { themeSettings: n } =
|
|
1290
|
+
function sn({ text: e, action: t }) {
|
|
1291
|
+
const { themeSettings: n } = R();
|
|
1306
1292
|
return /* @__PURE__ */ w(ii, {
|
|
1307
1293
|
children: [
|
|
1308
1294
|
/* @__PURE__ */ o(ai, {
|
|
@@ -1317,26 +1303,26 @@ function an({ text: e, action: t }) {
|
|
|
1317
1303
|
]
|
|
1318
1304
|
});
|
|
1319
1305
|
}
|
|
1320
|
-
const
|
|
1306
|
+
const Re = /* @__PURE__ */ v("div", {
|
|
1321
1307
|
target: "e3ryei50",
|
|
1322
1308
|
label: "Dot"
|
|
1323
1309
|
})("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%);}}");
|
|
1324
|
-
function
|
|
1325
|
-
const { themeSettings: e } =
|
|
1310
|
+
function st() {
|
|
1311
|
+
const { themeSettings: e } = R(), t = e.aiChat.icons.color;
|
|
1326
1312
|
return /* @__PURE__ */ w("div", {
|
|
1327
1313
|
className: "csdk-flex csdk-justify-between csdk-w-[28px] csdk-py-[14.5px]",
|
|
1328
1314
|
"aria-label": "loading dots",
|
|
1329
1315
|
children: [
|
|
1330
|
-
/* @__PURE__ */ o(
|
|
1316
|
+
/* @__PURE__ */ o(Re, {
|
|
1331
1317
|
color: t
|
|
1332
1318
|
}),
|
|
1333
|
-
/* @__PURE__ */ o(
|
|
1319
|
+
/* @__PURE__ */ o(Re, {
|
|
1334
1320
|
color: t
|
|
1335
1321
|
}),
|
|
1336
|
-
/* @__PURE__ */ o(
|
|
1322
|
+
/* @__PURE__ */ o(Re, {
|
|
1337
1323
|
color: t
|
|
1338
1324
|
}),
|
|
1339
|
-
/* @__PURE__ */ o(
|
|
1325
|
+
/* @__PURE__ */ o(Re, {
|
|
1340
1326
|
color: t
|
|
1341
1327
|
})
|
|
1342
1328
|
]
|
|
@@ -1345,24 +1331,24 @@ function at() {
|
|
|
1345
1331
|
const li = /* @__PURE__ */ v("div", {
|
|
1346
1332
|
target: "ed5z2fc0",
|
|
1347
1333
|
label: "FlexContainer"
|
|
1348
|
-
})("display:flex;", ({ align: e }) => e === "right" ?
|
|
1334
|
+
})("display:flex;", ({ align: e }) => e === "right" ? A`
|
|
1349
1335
|
justify-content: flex-end;
|
|
1350
|
-
` :
|
|
1336
|
+
` : A`
|
|
1351
1337
|
justify-content: flex-start;
|
|
1352
1338
|
`), ci = /* @__PURE__ */ v("button", {
|
|
1353
1339
|
target: "ed5z2fc1",
|
|
1354
1340
|
label: "MessageButton"
|
|
1355
|
-
})("font-family:inherit;font-size:inherit;line-height:inherit;border:", ({ theme: e }) => e.aiChat.clickableMessages.border, ";padding:0;cursor:pointer;color:", ({ theme: e }) => e.aiChat.clickableMessages.textColor, ";background-color:", ({ theme: e }) => e.aiChat.clickableMessages.backgroundColor, ";&:hover{color:", ({ theme: e }) => e.aiChat.clickableMessages.hover.textColor, ";background-color:", ({ theme: e }) => e.aiChat.clickableMessages.hover.backgroundColor, ";}border-radius:20px;", ({ align: e }) => e === "right" ?
|
|
1341
|
+
})("font-family:inherit;font-size:inherit;line-height:inherit;border:", ({ theme: e }) => e.aiChat.clickableMessages.border, ";padding:0;cursor:pointer;color:", ({ theme: e }) => e.aiChat.clickableMessages.textColor, ";background-color:", ({ theme: e }) => e.aiChat.clickableMessages.backgroundColor, ";&:hover{color:", ({ theme: e }) => e.aiChat.clickableMessages.hover.textColor, ";background-color:", ({ theme: e }) => e.aiChat.clickableMessages.hover.backgroundColor, ";}border-radius:20px;", ({ align: e }) => e === "right" ? A`
|
|
1356
1342
|
text-align: right;
|
|
1357
|
-
` :
|
|
1343
|
+
` : A`
|
|
1358
1344
|
text-align: left;
|
|
1359
|
-
`, " ", ({ align: e }) => e !== "full" ?
|
|
1345
|
+
`, " ", ({ align: e }) => e !== "full" ? A`
|
|
1360
1346
|
max-width: 382px;
|
|
1361
1347
|
` : "", " ", ({ theme: e }) => {
|
|
1362
1348
|
const { borderGradient: t, borderRadius: n } = e.aiChat.suggestions;
|
|
1363
1349
|
if (t) {
|
|
1364
1350
|
const [r, a] = t;
|
|
1365
|
-
return
|
|
1351
|
+
return A`
|
|
1366
1352
|
border: none;
|
|
1367
1353
|
position: relative;
|
|
1368
1354
|
border-radius: ${n};
|
|
@@ -1384,8 +1370,8 @@ const li = /* @__PURE__ */ v("div", {
|
|
|
1384
1370
|
}
|
|
1385
1371
|
return "";
|
|
1386
1372
|
});
|
|
1387
|
-
function
|
|
1388
|
-
const { themeSettings: s } =
|
|
1373
|
+
function Be({ children: e, align: t, onClick: n, onMouseEnter: r, onMouseLeave: a, accessibleName: c }) {
|
|
1374
|
+
const { themeSettings: s } = R();
|
|
1389
1375
|
return /* @__PURE__ */ o(li, {
|
|
1390
1376
|
align: t,
|
|
1391
1377
|
children: /* @__PURE__ */ o(ci, {
|
|
@@ -1400,8 +1386,8 @@ function Ie({ children: e, align: t, onClick: n, onMouseEnter: r, onMouseLeave:
|
|
|
1400
1386
|
});
|
|
1401
1387
|
}
|
|
1402
1388
|
function di({ onCancel: e, onConfirm: t }) {
|
|
1403
|
-
const { t: n } =
|
|
1404
|
-
return /* @__PURE__ */ w(
|
|
1389
|
+
const { t: n } = P();
|
|
1390
|
+
return /* @__PURE__ */ w(W, {
|
|
1405
1391
|
children: [
|
|
1406
1392
|
/* @__PURE__ */ o(ie, {
|
|
1407
1393
|
align: "left",
|
|
@@ -1410,7 +1396,7 @@ function di({ onCancel: e, onConfirm: t }) {
|
|
|
1410
1396
|
/* @__PURE__ */ w("div", {
|
|
1411
1397
|
className: "csdk-flex csdk-gap-x-2",
|
|
1412
1398
|
children: [
|
|
1413
|
-
/* @__PURE__ */ o(
|
|
1399
|
+
/* @__PURE__ */ o(Be, {
|
|
1414
1400
|
align: "right",
|
|
1415
1401
|
onClick: t,
|
|
1416
1402
|
accessibleName: "confirm clear chat",
|
|
@@ -1419,7 +1405,7 @@ function di({ onCancel: e, onConfirm: t }) {
|
|
|
1419
1405
|
children: n("ai.buttons.yes")
|
|
1420
1406
|
})
|
|
1421
1407
|
}),
|
|
1422
|
-
/* @__PURE__ */ o(
|
|
1408
|
+
/* @__PURE__ */ o(Be, {
|
|
1423
1409
|
align: "right",
|
|
1424
1410
|
onClick: e,
|
|
1425
1411
|
accessibleName: "cancel clear chat",
|
|
@@ -1436,9 +1422,9 @@ function di({ onCancel: e, onConfirm: t }) {
|
|
|
1436
1422
|
function ui(e) {
|
|
1437
1423
|
return Bn("MuiDialog", e);
|
|
1438
1424
|
}
|
|
1439
|
-
const
|
|
1440
|
-
process.env.NODE_ENV !== "production" && (
|
|
1441
|
-
const pi =
|
|
1425
|
+
const Ze = In("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), ln = /* @__PURE__ */ J.createContext({});
|
|
1426
|
+
process.env.NODE_ENV !== "production" && (ln.displayName = "DialogContext");
|
|
1427
|
+
const pi = Fe(Fn, {
|
|
1442
1428
|
name: "MuiDialog",
|
|
1443
1429
|
slot: "Backdrop",
|
|
1444
1430
|
overrides: (e, t) => t.backdrop
|
|
@@ -1454,11 +1440,11 @@ const pi = Be(Fn, {
|
|
|
1454
1440
|
fullScreen: c
|
|
1455
1441
|
} = e, s = {
|
|
1456
1442
|
root: ["root"],
|
|
1457
|
-
container: ["container", `scroll${
|
|
1458
|
-
paper: ["paper", `paperScroll${
|
|
1443
|
+
container: ["container", `scroll${ue(n)}`],
|
|
1444
|
+
paper: ["paper", `paperScroll${ue(n)}`, `paperWidth${ue(String(r))}`, a && "paperFullWidth", c && "paperFullScreen"]
|
|
1459
1445
|
};
|
|
1460
|
-
return
|
|
1461
|
-
}, gi =
|
|
1446
|
+
return Dn(s, ui, t);
|
|
1447
|
+
}, gi = Fe(Nn, {
|
|
1462
1448
|
name: "MuiDialog",
|
|
1463
1449
|
slot: "Root",
|
|
1464
1450
|
overridesResolver: (e, t) => t.root
|
|
@@ -1467,14 +1453,14 @@ const pi = Be(Fn, {
|
|
|
1467
1453
|
// Use !important to override the Modal inline-style.
|
|
1468
1454
|
position: "absolute !important"
|
|
1469
1455
|
}
|
|
1470
|
-
}), Ci =
|
|
1456
|
+
}), Ci = Fe("div", {
|
|
1471
1457
|
name: "MuiDialog",
|
|
1472
1458
|
slot: "Container",
|
|
1473
1459
|
overridesResolver: (e, t) => {
|
|
1474
1460
|
const {
|
|
1475
1461
|
ownerState: n
|
|
1476
1462
|
} = e;
|
|
1477
|
-
return [t.container, t[`scroll${
|
|
1463
|
+
return [t.container, t[`scroll${ue(n.scroll)}`]];
|
|
1478
1464
|
}
|
|
1479
1465
|
})({
|
|
1480
1466
|
height: "100%",
|
|
@@ -1509,14 +1495,14 @@ const pi = Be(Fn, {
|
|
|
1509
1495
|
}
|
|
1510
1496
|
}
|
|
1511
1497
|
}]
|
|
1512
|
-
}), fi =
|
|
1498
|
+
}), fi = Fe(Bt, {
|
|
1513
1499
|
name: "MuiDialog",
|
|
1514
1500
|
slot: "Paper",
|
|
1515
1501
|
overridesResolver: (e, t) => {
|
|
1516
1502
|
const {
|
|
1517
1503
|
ownerState: n
|
|
1518
1504
|
} = e;
|
|
1519
|
-
return [t.paper, t[`scrollPaper${
|
|
1505
|
+
return [t.paper, t[`scrollPaper${ue(n.scroll)}`], t[`paperWidth${ue(String(n.maxWidth))}`], n.fullWidth && t.paperFullWidth, n.fullScreen && t.paperFullScreen];
|
|
1520
1506
|
}
|
|
1521
1507
|
})(Hn(({
|
|
1522
1508
|
theme: e
|
|
@@ -1559,7 +1545,7 @@ const pi = Be(Fn, {
|
|
|
1559
1545
|
},
|
|
1560
1546
|
style: {
|
|
1561
1547
|
maxWidth: e.breakpoints.unit === "px" ? Math.max(e.breakpoints.values.xs, 444) : `max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,
|
|
1562
|
-
[`&.${
|
|
1548
|
+
[`&.${Ze.paperScrollBody}`]: {
|
|
1563
1549
|
[e.breakpoints.down(Math.max(e.breakpoints.values.xs, 444) + 32 * 2)]: {
|
|
1564
1550
|
maxWidth: "calc(100% - 64px)"
|
|
1565
1551
|
}
|
|
@@ -1571,7 +1557,7 @@ const pi = Be(Fn, {
|
|
|
1571
1557
|
},
|
|
1572
1558
|
style: {
|
|
1573
1559
|
maxWidth: `${e.breakpoints.values[t]}${e.breakpoints.unit}`,
|
|
1574
|
-
[`&.${
|
|
1560
|
+
[`&.${Ze.paperScrollBody}`]: {
|
|
1575
1561
|
[e.breakpoints.down(e.breakpoints.values[t] + 32 * 2)]: {
|
|
1576
1562
|
maxWidth: "calc(100% - 64px)"
|
|
1577
1563
|
}
|
|
@@ -1595,44 +1581,44 @@ const pi = Be(Fn, {
|
|
|
1595
1581
|
height: "100%",
|
|
1596
1582
|
maxHeight: "none",
|
|
1597
1583
|
borderRadius: 0,
|
|
1598
|
-
[`&.${
|
|
1584
|
+
[`&.${Ze.paperScrollBody}`]: {
|
|
1599
1585
|
margin: 0,
|
|
1600
1586
|
maxWidth: "100%"
|
|
1601
1587
|
}
|
|
1602
1588
|
}
|
|
1603
1589
|
}]
|
|
1604
|
-
}))),
|
|
1605
|
-
const r =
|
|
1590
|
+
}))), cn = /* @__PURE__ */ J.forwardRef(function(t, n) {
|
|
1591
|
+
const r = Pn({
|
|
1606
1592
|
props: t,
|
|
1607
1593
|
name: "MuiDialog"
|
|
1608
|
-
}), a =
|
|
1594
|
+
}), a = On(), c = {
|
|
1609
1595
|
enter: a.transitions.duration.enteringScreen,
|
|
1610
1596
|
exit: a.transitions.duration.leavingScreen
|
|
1611
|
-
},
|
|
1597
|
+
}, ut = r, {
|
|
1612
1598
|
"aria-describedby": s,
|
|
1613
1599
|
"aria-labelledby": p,
|
|
1614
1600
|
"aria-modal": d = !0,
|
|
1615
|
-
BackdropComponent:
|
|
1616
|
-
BackdropProps:
|
|
1617
|
-
children:
|
|
1601
|
+
BackdropComponent: g,
|
|
1602
|
+
BackdropProps: m,
|
|
1603
|
+
children: b,
|
|
1618
1604
|
className: i,
|
|
1619
1605
|
disableEscapeKeyDown: u = !1,
|
|
1620
1606
|
fullScreen: l = !1,
|
|
1621
1607
|
fullWidth: C = !1,
|
|
1622
|
-
maxWidth:
|
|
1608
|
+
maxWidth: h = "sm",
|
|
1623
1609
|
onBackdropClick: k,
|
|
1624
1610
|
onClick: S,
|
|
1625
|
-
onClose:
|
|
1626
|
-
open:
|
|
1627
|
-
PaperComponent:
|
|
1611
|
+
onClose: x,
|
|
1612
|
+
open: L,
|
|
1613
|
+
PaperComponent: E = Bt,
|
|
1628
1614
|
PaperProps: M = {},
|
|
1629
1615
|
scroll: I = "paper",
|
|
1630
|
-
slots:
|
|
1631
|
-
slotProps:
|
|
1632
|
-
TransitionComponent:
|
|
1633
|
-
transitionDuration:
|
|
1634
|
-
TransitionProps:
|
|
1635
|
-
} =
|
|
1616
|
+
slots: O = {},
|
|
1617
|
+
slotProps: ae = {},
|
|
1618
|
+
TransitionComponent: U = Ct,
|
|
1619
|
+
transitionDuration: Z = c,
|
|
1620
|
+
TransitionProps: q
|
|
1621
|
+
} = ut, G = $e(ut, [
|
|
1636
1622
|
"aria-describedby",
|
|
1637
1623
|
"aria-labelledby",
|
|
1638
1624
|
"aria-modal",
|
|
@@ -1656,99 +1642,99 @@ const pi = Be(Fn, {
|
|
|
1656
1642
|
"TransitionComponent",
|
|
1657
1643
|
"transitionDuration",
|
|
1658
1644
|
"TransitionProps"
|
|
1659
|
-
]),
|
|
1645
|
+
]), F = B(T({}, r), {
|
|
1660
1646
|
disableEscapeKeyDown: u,
|
|
1661
1647
|
fullScreen: l,
|
|
1662
1648
|
fullWidth: C,
|
|
1663
|
-
maxWidth:
|
|
1649
|
+
maxWidth: h,
|
|
1664
1650
|
scroll: I
|
|
1665
|
-
}),
|
|
1666
|
-
_.current =
|
|
1667
|
-
},
|
|
1668
|
-
S && S(
|
|
1669
|
-
}, j =
|
|
1651
|
+
}), Q = hi(F), _ = J.useRef(), V = (de) => {
|
|
1652
|
+
_.current = de.target === de.currentTarget;
|
|
1653
|
+
}, D = (de) => {
|
|
1654
|
+
S && S(de), _.current && (_.current = null, k && k(de), x && x(de, "backdropClick"));
|
|
1655
|
+
}, j = $n(p), te = J.useMemo(() => ({
|
|
1670
1656
|
titleId: j
|
|
1671
1657
|
}), [j]), le = T({
|
|
1672
|
-
transition:
|
|
1673
|
-
},
|
|
1674
|
-
transition:
|
|
1658
|
+
transition: U
|
|
1659
|
+
}, O), ce = T({
|
|
1660
|
+
transition: q,
|
|
1675
1661
|
paper: M,
|
|
1676
|
-
backdrop:
|
|
1677
|
-
},
|
|
1662
|
+
backdrop: m
|
|
1663
|
+
}, ae), N = {
|
|
1678
1664
|
slots: le,
|
|
1679
|
-
slotProps:
|
|
1680
|
-
}, [
|
|
1665
|
+
slotProps: ce
|
|
1666
|
+
}, [K, Me] = Ce("root", {
|
|
1681
1667
|
elementType: gi,
|
|
1682
1668
|
shouldForwardComponentProp: !0,
|
|
1683
|
-
externalForwardedProps:
|
|
1684
|
-
ownerState:
|
|
1685
|
-
className: De(
|
|
1669
|
+
externalForwardedProps: N,
|
|
1670
|
+
ownerState: F,
|
|
1671
|
+
className: De(Q.root, i),
|
|
1686
1672
|
ref: n
|
|
1687
|
-
}), [
|
|
1673
|
+
}), [dt, Te] = Ce("backdrop", {
|
|
1688
1674
|
elementType: pi,
|
|
1689
1675
|
shouldForwardComponentProp: !0,
|
|
1690
|
-
externalForwardedProps:
|
|
1691
|
-
ownerState:
|
|
1692
|
-
}), [hn, gn] =
|
|
1676
|
+
externalForwardedProps: N,
|
|
1677
|
+
ownerState: F
|
|
1678
|
+
}), [hn, gn] = Ce("paper", {
|
|
1693
1679
|
elementType: fi,
|
|
1694
1680
|
shouldForwardComponentProp: !0,
|
|
1695
|
-
externalForwardedProps:
|
|
1696
|
-
ownerState:
|
|
1697
|
-
className: De(
|
|
1698
|
-
}), [Cn, fn] =
|
|
1681
|
+
externalForwardedProps: N,
|
|
1682
|
+
ownerState: F,
|
|
1683
|
+
className: De(Q.paper, M.className)
|
|
1684
|
+
}), [Cn, fn] = Ce("container", {
|
|
1699
1685
|
elementType: Ci,
|
|
1700
|
-
externalForwardedProps:
|
|
1701
|
-
ownerState:
|
|
1702
|
-
className: De(
|
|
1703
|
-
}), [mn, bn] =
|
|
1704
|
-
elementType:
|
|
1705
|
-
externalForwardedProps:
|
|
1706
|
-
ownerState:
|
|
1686
|
+
externalForwardedProps: N,
|
|
1687
|
+
ownerState: F,
|
|
1688
|
+
className: De(Q.container)
|
|
1689
|
+
}), [mn, bn] = Ce("transition", {
|
|
1690
|
+
elementType: Ct,
|
|
1691
|
+
externalForwardedProps: N,
|
|
1692
|
+
ownerState: F,
|
|
1707
1693
|
additionalProps: {
|
|
1708
1694
|
appear: !0,
|
|
1709
|
-
in:
|
|
1710
|
-
timeout:
|
|
1695
|
+
in: L,
|
|
1696
|
+
timeout: Z,
|
|
1711
1697
|
role: "presentation"
|
|
1712
1698
|
}
|
|
1713
1699
|
});
|
|
1714
|
-
return /* @__PURE__ */
|
|
1700
|
+
return /* @__PURE__ */ fe(K, B(T(T({
|
|
1715
1701
|
closeAfterTransition: !0,
|
|
1716
1702
|
slots: {
|
|
1717
|
-
backdrop:
|
|
1703
|
+
backdrop: dt
|
|
1718
1704
|
},
|
|
1719
1705
|
slotProps: {
|
|
1720
1706
|
backdrop: T({
|
|
1721
|
-
transitionDuration:
|
|
1722
|
-
as:
|
|
1723
|
-
},
|
|
1707
|
+
transitionDuration: Z,
|
|
1708
|
+
as: g
|
|
1709
|
+
}, Te)
|
|
1724
1710
|
},
|
|
1725
1711
|
disableEscapeKeyDown: u,
|
|
1726
|
-
onClose:
|
|
1727
|
-
open:
|
|
1728
|
-
onClick:
|
|
1729
|
-
},
|
|
1730
|
-
children: /* @__PURE__ */
|
|
1731
|
-
children: /* @__PURE__ */
|
|
1712
|
+
onClose: x,
|
|
1713
|
+
open: L,
|
|
1714
|
+
onClick: D
|
|
1715
|
+
}, Me), G), {
|
|
1716
|
+
children: /* @__PURE__ */ fe(mn, B(T({}, bn), {
|
|
1717
|
+
children: /* @__PURE__ */ fe(Cn, B(T({
|
|
1732
1718
|
onMouseDown: V
|
|
1733
1719
|
}, fn), {
|
|
1734
|
-
children: /* @__PURE__ */
|
|
1735
|
-
as:
|
|
1720
|
+
children: /* @__PURE__ */ fe(hn, B(T({
|
|
1721
|
+
as: E,
|
|
1736
1722
|
elevation: 24,
|
|
1737
1723
|
role: "dialog",
|
|
1738
1724
|
"aria-describedby": s,
|
|
1739
1725
|
"aria-labelledby": j,
|
|
1740
1726
|
"aria-modal": d
|
|
1741
1727
|
}, gn), {
|
|
1742
|
-
children: /* @__PURE__ */
|
|
1728
|
+
children: /* @__PURE__ */ fe(ln.Provider, {
|
|
1743
1729
|
value: te,
|
|
1744
|
-
children:
|
|
1730
|
+
children: b
|
|
1745
1731
|
})
|
|
1746
1732
|
}))
|
|
1747
1733
|
}))
|
|
1748
1734
|
}))
|
|
1749
1735
|
}));
|
|
1750
1736
|
});
|
|
1751
|
-
process.env.NODE_ENV !== "production" && (
|
|
1737
|
+
process.env.NODE_ENV !== "production" && (cn.propTypes = {
|
|
1752
1738
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
1753
1739
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
1754
1740
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -1936,7 +1922,7 @@ function mi({ fillColor: e = "#262E3D" }) {
|
|
|
1936
1922
|
]
|
|
1937
1923
|
});
|
|
1938
1924
|
}
|
|
1939
|
-
const
|
|
1925
|
+
const dn = {
|
|
1940
1926
|
row: {
|
|
1941
1927
|
hover: "rgba(224, 224, 224, 0.3)"
|
|
1942
1928
|
},
|
|
@@ -2023,13 +2009,13 @@ const cn = {
|
|
|
2023
2009
|
}
|
|
2024
2010
|
}, bi = {
|
|
2025
2011
|
shouldForwardProp: (e) => !e.startsWith("$")
|
|
2026
|
-
},
|
|
2012
|
+
}, Se = /* @__PURE__ */ v(Ft, bi, {
|
|
2027
2013
|
target: "e869yoj0",
|
|
2028
2014
|
label: "IconButton"
|
|
2029
2015
|
})(({ $hoverColor: e }) => ({
|
|
2030
2016
|
padding: 2,
|
|
2031
2017
|
"&.MuiIconButton-root:hover": {
|
|
2032
|
-
backgroundColor: e != null ? e :
|
|
2018
|
+
backgroundColor: e != null ? e : dn.interaction.defaultHover
|
|
2033
2019
|
}
|
|
2034
2020
|
}));
|
|
2035
2021
|
function yi({ fill: e = "rgba(38, 46, 61, 0.67)" }) {
|
|
@@ -2078,29 +2064,29 @@ function vi() {
|
|
|
2078
2064
|
})
|
|
2079
2065
|
});
|
|
2080
2066
|
}
|
|
2081
|
-
const
|
|
2082
|
-
const { themeSettings: t } =
|
|
2083
|
-
return /* @__PURE__ */ o(
|
|
2067
|
+
const lt = (e) => Ht(e.chart.backgroundColor), ki = ({ title: e }) => {
|
|
2068
|
+
const { themeSettings: t } = R();
|
|
2069
|
+
return /* @__PURE__ */ o(we, {
|
|
2084
2070
|
title: e,
|
|
2085
|
-
children: /* @__PURE__ */ o(
|
|
2071
|
+
children: /* @__PURE__ */ o(Se, {
|
|
2086
2072
|
disableTouchRipple: !0,
|
|
2087
|
-
$hoverColor:
|
|
2073
|
+
$hoverColor: lt(t),
|
|
2088
2074
|
children: /* @__PURE__ */ o(xi, {
|
|
2089
2075
|
fill: t.chart.textColor
|
|
2090
2076
|
})
|
|
2091
2077
|
})
|
|
2092
2078
|
});
|
|
2093
2079
|
}, wi = ({ items: e }) => {
|
|
2094
|
-
const [t, n] =
|
|
2080
|
+
const [t, n] = $(null), r = (s) => {
|
|
2095
2081
|
n(s.currentTarget);
|
|
2096
2082
|
}, a = () => {
|
|
2097
2083
|
n(null);
|
|
2098
|
-
}, { themeSettings: c } =
|
|
2099
|
-
return /* @__PURE__ */ w(
|
|
2084
|
+
}, { themeSettings: c } = R();
|
|
2085
|
+
return /* @__PURE__ */ w(W, {
|
|
2100
2086
|
children: [
|
|
2101
|
-
/* @__PURE__ */ o(
|
|
2087
|
+
/* @__PURE__ */ o(Se, {
|
|
2102
2088
|
onClick: r,
|
|
2103
|
-
$hoverColor:
|
|
2089
|
+
$hoverColor: lt(c),
|
|
2104
2090
|
"aria-label": "three dots button",
|
|
2105
2091
|
children: /* @__PURE__ */ o(An, {
|
|
2106
2092
|
fill: c.chart.textColor
|
|
@@ -2125,7 +2111,7 @@ const st = (e) => Nt(e.chart.backgroundColor), ki = ({ title: e }) => {
|
|
|
2125
2111
|
sx: {
|
|
2126
2112
|
fontSize: "13px",
|
|
2127
2113
|
fontFamily: c.typography.fontFamily,
|
|
2128
|
-
color:
|
|
2114
|
+
color: dn.text.content
|
|
2129
2115
|
},
|
|
2130
2116
|
disableRipple: !0,
|
|
2131
2117
|
children: [
|
|
@@ -2140,12 +2126,12 @@ const st = (e) => Nt(e.chart.backgroundColor), ki = ({ title: e }) => {
|
|
|
2140
2126
|
]
|
|
2141
2127
|
});
|
|
2142
2128
|
}, Si = ({ onClick: e }) => {
|
|
2143
|
-
const { themeSettings: t } =
|
|
2144
|
-
return /* @__PURE__ */ o(
|
|
2129
|
+
const { themeSettings: t } = R(), { t: n } = P();
|
|
2130
|
+
return /* @__PURE__ */ o(we, {
|
|
2145
2131
|
title: n("ai.preview"),
|
|
2146
|
-
children: /* @__PURE__ */ o(
|
|
2132
|
+
children: /* @__PURE__ */ o(Se, {
|
|
2147
2133
|
onClick: e,
|
|
2148
|
-
$hoverColor:
|
|
2134
|
+
$hoverColor: lt(t),
|
|
2149
2135
|
children: /* @__PURE__ */ o(yi, {
|
|
2150
2136
|
fill: t.chart.textColor
|
|
2151
2137
|
})
|
|
@@ -2156,7 +2142,7 @@ const st = (e) => Nt(e.chart.backgroundColor), ki = ({ title: e }) => {
|
|
|
2156
2142
|
label: "ToolbarContainer"
|
|
2157
2143
|
})("display:flex;padding-top:6px;padding-bottom:6px;");
|
|
2158
2144
|
function Ti({ infoTooltipText: e, onRefresh: t, onExpand: n }) {
|
|
2159
|
-
const r =
|
|
2145
|
+
const r = z(() => [
|
|
2160
2146
|
{
|
|
2161
2147
|
title: "Refresh",
|
|
2162
2148
|
onClick: t,
|
|
@@ -2181,13 +2167,13 @@ function Ti({ infoTooltipText: e, onRefresh: t, onExpand: n }) {
|
|
|
2181
2167
|
});
|
|
2182
2168
|
}
|
|
2183
2169
|
function Li({ content: e }) {
|
|
2184
|
-
const [t, n] =
|
|
2185
|
-
const s =
|
|
2170
|
+
const [t, n] = $(!1), { themeSettings: r } = R(), { inlineElement: a, expandedElement: c } = z(() => {
|
|
2171
|
+
const s = Ne(e, {
|
|
2186
2172
|
useCustomizedStyleOptions: !0
|
|
2187
2173
|
});
|
|
2188
|
-
if (s === void 0 || !
|
|
2189
|
-
throw new
|
|
2190
|
-
const { detailedDescription: p } = e, { styleOptions: d } = s,
|
|
2174
|
+
if (s === void 0 || !Ge(s))
|
|
2175
|
+
throw new je("errors.otherWidgetTypesNotSupported");
|
|
2176
|
+
const { detailedDescription: p } = e, { styleOptions: d } = s, g = {
|
|
2191
2177
|
cornerRadius: "Small",
|
|
2192
2178
|
header: {
|
|
2193
2179
|
renderToolbar: (i) => /* @__PURE__ */ o(Ti, {
|
|
@@ -2197,14 +2183,14 @@ function Li({ content: e }) {
|
|
|
2197
2183
|
})
|
|
2198
2184
|
}
|
|
2199
2185
|
};
|
|
2200
|
-
let
|
|
2201
|
-
if (
|
|
2202
|
-
|
|
2186
|
+
let m, b;
|
|
2187
|
+
if (Yn(s.chartType))
|
|
2188
|
+
m = /* @__PURE__ */ o("div", {
|
|
2203
2189
|
className: "csdk-h-[245px]",
|
|
2204
|
-
children: /* @__PURE__ */ o(
|
|
2205
|
-
styleOptions:
|
|
2190
|
+
children: /* @__PURE__ */ o(ye, B(T({}, s), {
|
|
2191
|
+
styleOptions: g
|
|
2206
2192
|
}))
|
|
2207
|
-
}),
|
|
2193
|
+
}), b = /* @__PURE__ */ o(ye, B(T({}, s), {
|
|
2208
2194
|
styleOptions: {
|
|
2209
2195
|
header: {
|
|
2210
2196
|
hidden: !0
|
|
@@ -2220,28 +2206,28 @@ function Li({ content: e }) {
|
|
|
2220
2206
|
legend: void 0,
|
|
2221
2207
|
xAxis: void 0,
|
|
2222
2208
|
yAxis: void 0
|
|
2223
|
-
}),
|
|
2224
|
-
delete u.legend, delete u.xAxis, delete u.yAxis,
|
|
2225
|
-
children: /* @__PURE__ */ o(
|
|
2209
|
+
}), g);
|
|
2210
|
+
delete u.legend, delete u.xAxis, delete u.yAxis, m = /* @__PURE__ */ o("div", {
|
|
2211
|
+
children: /* @__PURE__ */ o(ye, B(T({}, s), {
|
|
2226
2212
|
styleOptions: u
|
|
2227
2213
|
}))
|
|
2228
|
-
}),
|
|
2214
|
+
}), b = /* @__PURE__ */ o(ye, B(T({}, s), {
|
|
2229
2215
|
styleOptions: T({
|
|
2230
2216
|
cornerRadius: "None"
|
|
2231
2217
|
}, i)
|
|
2232
2218
|
}));
|
|
2233
2219
|
}
|
|
2234
2220
|
return {
|
|
2235
|
-
inlineElement:
|
|
2236
|
-
expandedElement:
|
|
2221
|
+
inlineElement: m,
|
|
2222
|
+
expandedElement: b
|
|
2237
2223
|
};
|
|
2238
2224
|
}, [
|
|
2239
2225
|
e
|
|
2240
2226
|
]);
|
|
2241
|
-
return /* @__PURE__ */ w(
|
|
2227
|
+
return /* @__PURE__ */ w(W, {
|
|
2242
2228
|
children: [
|
|
2243
2229
|
a,
|
|
2244
|
-
/* @__PURE__ */ w(
|
|
2230
|
+
/* @__PURE__ */ w(cn, {
|
|
2245
2231
|
open: t,
|
|
2246
2232
|
onClose: () => n(!1),
|
|
2247
2233
|
maxWidth: "xl",
|
|
@@ -2260,7 +2246,7 @@ function Li({ content: e }) {
|
|
|
2260
2246
|
className: "csdk-text-ai-lg csdk-semibold",
|
|
2261
2247
|
children: e.queryTitle
|
|
2262
2248
|
}),
|
|
2263
|
-
/* @__PURE__ */ o(
|
|
2249
|
+
/* @__PURE__ */ o(Ft, {
|
|
2264
2250
|
onClick: () => n(!1),
|
|
2265
2251
|
"aria-label": "close expanded chart",
|
|
2266
2252
|
children: /* @__PURE__ */ o(mi, {
|
|
@@ -2294,10 +2280,10 @@ function Ri({ theme: e }) {
|
|
|
2294
2280
|
});
|
|
2295
2281
|
}
|
|
2296
2282
|
function Ei({ onClick: e, disabled: t }) {
|
|
2297
|
-
const { themeSettings: n } =
|
|
2298
|
-
return /* @__PURE__ */ o(
|
|
2283
|
+
const { themeSettings: n } = R(), { t: r } = P();
|
|
2284
|
+
return /* @__PURE__ */ o(we, {
|
|
2299
2285
|
title: r("ai.buttons.incorrectResponse"),
|
|
2300
|
-
children: /* @__PURE__ */ o(
|
|
2286
|
+
children: /* @__PURE__ */ o(Se, {
|
|
2301
2287
|
"aria-label": "thumbs-down",
|
|
2302
2288
|
onClick: e,
|
|
2303
2289
|
$hoverColor: n.aiChat.icons.feedbackIcons.hoverColor,
|
|
@@ -2324,10 +2310,10 @@ function Ii({ theme: e }) {
|
|
|
2324
2310
|
});
|
|
2325
2311
|
}
|
|
2326
2312
|
function Bi({ onClick: e, disabled: t }) {
|
|
2327
|
-
const { themeSettings: n } =
|
|
2328
|
-
return /* @__PURE__ */ o(
|
|
2313
|
+
const { themeSettings: n } = R(), { t: r } = P();
|
|
2314
|
+
return /* @__PURE__ */ o(we, {
|
|
2329
2315
|
title: r("ai.buttons.correctResponse"),
|
|
2330
|
-
children: /* @__PURE__ */ o(
|
|
2316
|
+
children: /* @__PURE__ */ o(Se, {
|
|
2331
2317
|
"aria-label": "thumbs-up",
|
|
2332
2318
|
onClick: e,
|
|
2333
2319
|
$hoverColor: n.aiChat.icons.feedbackIcons.hoverColor,
|
|
@@ -2339,7 +2325,7 @@ function Bi({ onClick: e, disabled: t }) {
|
|
|
2339
2325
|
});
|
|
2340
2326
|
}
|
|
2341
2327
|
const Fi = () => {
|
|
2342
|
-
const [e, t] =
|
|
2328
|
+
const [e, t] = $(!1), n = pe(null), r = H(() => {
|
|
2343
2329
|
t(!0);
|
|
2344
2330
|
}, []), a = H(() => {
|
|
2345
2331
|
t(!1);
|
|
@@ -2359,7 +2345,7 @@ const Fi = () => {
|
|
|
2359
2345
|
label: "Container"
|
|
2360
2346
|
})("display:flex;flex-direction:column;row-gap:", ({ theme: e }) => e.aiChat.body.gapBetweenMessages, ";");
|
|
2361
2347
|
function Hi({ visible: e, onSend: t }) {
|
|
2362
|
-
const [n, r] =
|
|
2348
|
+
const [n, r] = $(!1), a = H((s) => {
|
|
2363
2349
|
r(!0), t(s === "up" ? 1 : -1);
|
|
2364
2350
|
}, [
|
|
2365
2351
|
t
|
|
@@ -2378,37 +2364,37 @@ function Hi({ visible: e, onSend: t }) {
|
|
|
2378
2364
|
]
|
|
2379
2365
|
}) : null;
|
|
2380
2366
|
}
|
|
2381
|
-
function
|
|
2382
|
-
const c =
|
|
2367
|
+
function _e({ sourceId: e, data: t, type: n, buttonVisibility: r = "onHover", renderContent: a }) {
|
|
2368
|
+
const c = X(), s = Wn(H((b) => {
|
|
2383
2369
|
c && c.ai.sendFeedback({
|
|
2384
2370
|
sourceId: e,
|
|
2385
2371
|
type: n,
|
|
2386
2372
|
data: t,
|
|
2387
|
-
rating:
|
|
2373
|
+
rating: b
|
|
2388
2374
|
});
|
|
2389
2375
|
}, [
|
|
2390
2376
|
c,
|
|
2391
2377
|
e,
|
|
2392
2378
|
t,
|
|
2393
2379
|
n
|
|
2394
|
-
]), 200), [p, d] = Fi(),
|
|
2380
|
+
]), 200), [p, d] = Fi(), g = z(() => r === "onHover" ? d : r !== "never", [
|
|
2395
2381
|
d,
|
|
2396
2382
|
r
|
|
2397
|
-
]), { themeSettings:
|
|
2383
|
+
]), { themeSettings: m } = R();
|
|
2398
2384
|
return /* @__PURE__ */ o(Ni, {
|
|
2399
2385
|
ref: p,
|
|
2400
|
-
theme:
|
|
2386
|
+
theme: m,
|
|
2401
2387
|
children: a(/* @__PURE__ */ o(Hi, {
|
|
2402
2388
|
onSend: s,
|
|
2403
|
-
visible:
|
|
2389
|
+
visible: g
|
|
2404
2390
|
}))
|
|
2405
2391
|
});
|
|
2406
2392
|
}
|
|
2407
|
-
const
|
|
2408
|
-
function
|
|
2409
|
-
const [t, n] =
|
|
2410
|
-
return
|
|
2411
|
-
s.current && s.current.scrollHeight >
|
|
2393
|
+
const Pi = 18 * 5;
|
|
2394
|
+
function ct({ text: e }) {
|
|
2395
|
+
const [t, n] = $(!0), [r, a] = $(!1), { t: c } = P(), s = pe(null);
|
|
2396
|
+
return Ie(() => {
|
|
2397
|
+
s.current && s.current.scrollHeight > Pi && a(!0);
|
|
2412
2398
|
}, [
|
|
2413
2399
|
e
|
|
2414
2400
|
]), /* @__PURE__ */ w("div", {
|
|
@@ -2429,20 +2415,20 @@ function lt({ text: e }) {
|
|
|
2429
2415
|
]
|
|
2430
2416
|
});
|
|
2431
2417
|
}
|
|
2432
|
-
function
|
|
2433
|
-
const { data: t, isLoading: n, isError: r } =
|
|
2434
|
-
return n ? /* @__PURE__ */ o(
|
|
2418
|
+
function Oi({ nlgRequest: e }) {
|
|
2419
|
+
const { data: t, isLoading: n, isError: r } = He(e), { t: a } = P();
|
|
2420
|
+
return n ? /* @__PURE__ */ o(st, {}) : r ? /* @__PURE__ */ o(ie, {
|
|
2435
2421
|
align: "left",
|
|
2436
2422
|
children: a("ai.errors.unexpected")
|
|
2437
2423
|
}) : /* @__PURE__ */ o(ie, {
|
|
2438
2424
|
align: "full",
|
|
2439
|
-
children: /* @__PURE__ */ o(
|
|
2425
|
+
children: /* @__PURE__ */ o(ct, {
|
|
2440
2426
|
text: t != null ? t : a("ai.errors.insightsNotAvailable")
|
|
2441
2427
|
})
|
|
2442
2428
|
});
|
|
2443
2429
|
}
|
|
2444
|
-
function
|
|
2445
|
-
const { themeSettings: e } =
|
|
2430
|
+
function $i() {
|
|
2431
|
+
const { themeSettings: e } = R();
|
|
2446
2432
|
return /* @__PURE__ */ o("svg", {
|
|
2447
2433
|
width: "24",
|
|
2448
2434
|
height: "25",
|
|
@@ -2457,57 +2443,57 @@ function Di() {
|
|
|
2457
2443
|
})
|
|
2458
2444
|
});
|
|
2459
2445
|
}
|
|
2460
|
-
function
|
|
2461
|
-
const { t } =
|
|
2462
|
-
return /* @__PURE__ */ o(
|
|
2446
|
+
function Di({ onClick: e }) {
|
|
2447
|
+
const { t } = P();
|
|
2448
|
+
return /* @__PURE__ */ o(Be, {
|
|
2463
2449
|
align: "left",
|
|
2464
2450
|
onClick: e,
|
|
2465
2451
|
children: /* @__PURE__ */ w("div", {
|
|
2466
2452
|
className: "csdk-py-[5px] csdk-px-2 csdk-flex csdk-items-center csdk-gap-x-1 csdk-select-none",
|
|
2467
2453
|
children: [
|
|
2468
|
-
/* @__PURE__ */ o(
|
|
2454
|
+
/* @__PURE__ */ o($i, {}),
|
|
2469
2455
|
t("ai.buttons.insights")
|
|
2470
2456
|
]
|
|
2471
2457
|
})
|
|
2472
2458
|
});
|
|
2473
2459
|
}
|
|
2474
2460
|
var Ai = Zn("toLowerCase");
|
|
2475
|
-
const
|
|
2461
|
+
const Mt = /* @__PURE__ */ v("div", {
|
|
2476
2462
|
target: "etljahs0",
|
|
2477
2463
|
label: "FlexRow"
|
|
2478
2464
|
})("display:flex;align-items:center;column-gap:10px;"), zi = (e) => !!e && "aeiou".includes(e[0]);
|
|
2479
2465
|
function qi({ data: e, alwaysShowFeedback: t }) {
|
|
2480
|
-
const { chatMode: n = "analyze", enableInsights: r } = ee(), { themeSettings: a } =
|
|
2466
|
+
const { chatMode: n = "analyze", enableInsights: r } = ee(), { themeSettings: a } = R(), { queryTitle: c, chartRecommendations: s, jaql: p, userMsg: d, clarification: g = "" } = e;
|
|
2481
2467
|
console.debug(`JAQL for ${c}`, p), console.debug(`chart recommendations for ${c}`, s);
|
|
2482
|
-
const
|
|
2483
|
-
let
|
|
2484
|
-
zi(
|
|
2485
|
-
const i = p.datasource.title, [u, l] =
|
|
2486
|
-
l((
|
|
2487
|
-
}, []),
|
|
2468
|
+
const m = "chartType" in s ? s.chartType : "table";
|
|
2469
|
+
let b;
|
|
2470
|
+
zi(m) ? b = `an ${m}` : b = `a ${m}`, m !== "table" && (b += " chart");
|
|
2471
|
+
const i = p.datasource.title, [u, l] = $(!1), C = H(() => {
|
|
2472
|
+
l((x) => !x);
|
|
2473
|
+
}, []), h = {
|
|
2488
2474
|
jaql: {
|
|
2489
2475
|
datasource: p.datasource,
|
|
2490
2476
|
metadata: p.metadata
|
|
2491
2477
|
}
|
|
2492
|
-
}, k = n === "analyze", S = `${d}${d &&
|
|
2493
|
-
` : ""}${
|
|
2494
|
-
return /* @__PURE__ */ w(
|
|
2478
|
+
}, k = n === "analyze", S = `${d}${d && g ? `
|
|
2479
|
+
` : ""}${g}`;
|
|
2480
|
+
return /* @__PURE__ */ w(W, {
|
|
2495
2481
|
children: [
|
|
2496
|
-
/* @__PURE__ */ o(
|
|
2482
|
+
/* @__PURE__ */ o(_e, {
|
|
2497
2483
|
sourceId: i,
|
|
2498
2484
|
data: e,
|
|
2499
2485
|
type: "chats/nlq",
|
|
2500
2486
|
buttonVisibility: t ? "always" : "onHover",
|
|
2501
|
-
renderContent: (
|
|
2487
|
+
renderContent: (x) => /* @__PURE__ */ w(W, {
|
|
2502
2488
|
children: [
|
|
2503
|
-
/* @__PURE__ */ w(
|
|
2489
|
+
/* @__PURE__ */ w(Mt, {
|
|
2504
2490
|
children: [
|
|
2505
|
-
/* @__PURE__ */ o(
|
|
2491
|
+
/* @__PURE__ */ o(an, {
|
|
2506
2492
|
align: "left",
|
|
2507
2493
|
theme: a,
|
|
2508
|
-
children: S || `Here's ${
|
|
2494
|
+
children: S || `Here's ${b} showing ${Ai(c)}.`
|
|
2509
2495
|
}),
|
|
2510
|
-
|
|
2496
|
+
x
|
|
2511
2497
|
]
|
|
2512
2498
|
}),
|
|
2513
2499
|
k && /* @__PURE__ */ o(Li, {
|
|
@@ -2516,23 +2502,23 @@ function qi({ data: e, alwaysShowFeedback: t }) {
|
|
|
2516
2502
|
]
|
|
2517
2503
|
})
|
|
2518
2504
|
}),
|
|
2519
|
-
r && /* @__PURE__ */ o(
|
|
2505
|
+
r && /* @__PURE__ */ o(_e, {
|
|
2520
2506
|
sourceId: i,
|
|
2521
|
-
data:
|
|
2507
|
+
data: h,
|
|
2522
2508
|
type: "nlg/queryResult",
|
|
2523
2509
|
buttonVisibility: u ? "onHover" : "never",
|
|
2524
|
-
renderContent: (
|
|
2510
|
+
renderContent: (x) => /* @__PURE__ */ w(W, {
|
|
2525
2511
|
children: [
|
|
2526
|
-
/* @__PURE__ */ w(
|
|
2512
|
+
/* @__PURE__ */ w(Mt, {
|
|
2527
2513
|
children: [
|
|
2528
|
-
/* @__PURE__ */ o(
|
|
2514
|
+
/* @__PURE__ */ o(Di, {
|
|
2529
2515
|
onClick: C
|
|
2530
2516
|
}),
|
|
2531
|
-
|
|
2517
|
+
x
|
|
2532
2518
|
]
|
|
2533
2519
|
}),
|
|
2534
|
-
u && /* @__PURE__ */ o(
|
|
2535
|
-
nlgRequest:
|
|
2520
|
+
u && /* @__PURE__ */ o(Oi, {
|
|
2521
|
+
nlgRequest: h
|
|
2536
2522
|
})
|
|
2537
2523
|
]
|
|
2538
2524
|
})
|
|
@@ -2541,7 +2527,7 @@ function qi({ data: e, alwaysShowFeedback: t }) {
|
|
|
2541
2527
|
});
|
|
2542
2528
|
}
|
|
2543
2529
|
function Wi({ message: e, isLastMessage: t }) {
|
|
2544
|
-
if (
|
|
2530
|
+
if (ot(e)) {
|
|
2545
2531
|
const r = JSON.parse(e.content);
|
|
2546
2532
|
return /* @__PURE__ */ o(qi, {
|
|
2547
2533
|
data: r,
|
|
@@ -2559,8 +2545,8 @@ const Zi = /* @__PURE__ */ or(Wi), ji = ({ error: e, displayMessage: t }) => (co
|
|
|
2559
2545
|
children: t
|
|
2560
2546
|
}));
|
|
2561
2547
|
function Gi({ messages: e }) {
|
|
2562
|
-
const { t } =
|
|
2563
|
-
return /* @__PURE__ */ o(
|
|
2548
|
+
const { t } = P();
|
|
2549
|
+
return /* @__PURE__ */ o(W, {
|
|
2564
2550
|
children: e.map((n, r) => /* @__PURE__ */ o(jn, {
|
|
2565
2551
|
fallbackRender: (a) => ji(B(T({}, a), {
|
|
2566
2552
|
displayMessage: t("ai.errors.unexpected")
|
|
@@ -2572,7 +2558,7 @@ function Gi({ messages: e }) {
|
|
|
2572
2558
|
}, r))
|
|
2573
2559
|
});
|
|
2574
2560
|
}
|
|
2575
|
-
function
|
|
2561
|
+
function un({ color: e }) {
|
|
2576
2562
|
return /* @__PURE__ */ o("svg", {
|
|
2577
2563
|
width: "100%",
|
|
2578
2564
|
height: "100%",
|
|
@@ -2590,7 +2576,7 @@ function Vi({ onClick: e, color: t }) {
|
|
|
2590
2576
|
"aria-label": "go back",
|
|
2591
2577
|
className: "csdk-w-5 csdk-h-5 csdk-flex csdk-p-[4px] csdk-ml-[6px] csdk-cursor-pointer",
|
|
2592
2578
|
onClick: e,
|
|
2593
|
-
children: /* @__PURE__ */ o(
|
|
2579
|
+
children: /* @__PURE__ */ o(un, {
|
|
2594
2580
|
color: t
|
|
2595
2581
|
})
|
|
2596
2582
|
});
|
|
@@ -2602,7 +2588,7 @@ const Ui = /* @__PURE__ */ v("button", {
|
|
|
2602
2588
|
const { borderGradient: t, borderRadius: n } = e.aiChat.suggestions;
|
|
2603
2589
|
if (t) {
|
|
2604
2590
|
const [r, a] = t;
|
|
2605
|
-
return
|
|
2591
|
+
return A`
|
|
2606
2592
|
border: none;
|
|
2607
2593
|
position: relative;
|
|
2608
2594
|
border-radius: ${n};
|
|
@@ -2624,8 +2610,8 @@ const Ui = /* @__PURE__ */ v("button", {
|
|
|
2624
2610
|
}
|
|
2625
2611
|
return "";
|
|
2626
2612
|
});
|
|
2627
|
-
function
|
|
2628
|
-
const { themeSettings: n } =
|
|
2613
|
+
function Tt({ question: e, onClick: t }) {
|
|
2614
|
+
const { themeSettings: n } = R();
|
|
2629
2615
|
return /* @__PURE__ */ o(Ui, {
|
|
2630
2616
|
onClick: t,
|
|
2631
2617
|
theme: n,
|
|
@@ -2637,19 +2623,19 @@ const Qi = /* @__PURE__ */ v("div", {
|
|
|
2637
2623
|
label: "ListContainer"
|
|
2638
2624
|
})("display:flex;flex-direction:column;align-items:flex-start;row-gap:", ({ theme: e }) => e.aiChat.suggestions.gap, ";");
|
|
2639
2625
|
function _i({ questions: e, onSelection: t }) {
|
|
2640
|
-
const { t: n } =
|
|
2626
|
+
const { t: n } = P(), [r, a] = $(!0), c = z(() => r && e.length > 5 ? e.slice(0, 4) : e, [
|
|
2641
2627
|
e,
|
|
2642
2628
|
r
|
|
2643
|
-
]), { themeSettings: s } =
|
|
2629
|
+
]), { themeSettings: s } = R();
|
|
2644
2630
|
return /* @__PURE__ */ w(Qi, {
|
|
2645
2631
|
"aria-label": "list of suggested questions",
|
|
2646
2632
|
theme: s,
|
|
2647
2633
|
children: [
|
|
2648
|
-
c.map((p) => /* @__PURE__ */ o(
|
|
2634
|
+
c.map((p) => /* @__PURE__ */ o(Tt, {
|
|
2649
2635
|
question: p,
|
|
2650
2636
|
onClick: () => t(p)
|
|
2651
2637
|
}, p)),
|
|
2652
|
-
c.length < e.length && /* @__PURE__ */ o(
|
|
2638
|
+
c.length < e.length && /* @__PURE__ */ o(Tt, {
|
|
2653
2639
|
question: n("ai.buttons.seeMore"),
|
|
2654
2640
|
onClick: () => a(!1)
|
|
2655
2641
|
})
|
|
@@ -2672,7 +2658,7 @@ const Ki = /* @__PURE__ */ v("div", {
|
|
|
2672
2658
|
label: "SkeletonContainer"
|
|
2673
2659
|
})("display:flex;flex-direction:column;row-gap:1rem;");
|
|
2674
2660
|
function Xi() {
|
|
2675
|
-
const { themeSettings: e } =
|
|
2661
|
+
const { themeSettings: e } = R();
|
|
2676
2662
|
return /* @__PURE__ */ o(Ji, {
|
|
2677
2663
|
children: Array.from({
|
|
2678
2664
|
length: 3
|
|
@@ -2683,7 +2669,7 @@ function Xi() {
|
|
|
2683
2669
|
}
|
|
2684
2670
|
function Yi({ questions: e, isLoading: t, onSelection: n }) {
|
|
2685
2671
|
const r = e.length > 0, { suggestionsWelcomeText: a } = ee();
|
|
2686
|
-
return t ? /* @__PURE__ */ o(Xi, {}) : r ? /* @__PURE__ */ w(
|
|
2672
|
+
return t ? /* @__PURE__ */ o(Xi, {}) : r ? /* @__PURE__ */ w(W, {
|
|
2687
2673
|
children: [
|
|
2688
2674
|
a && /* @__PURE__ */ o(ie, {
|
|
2689
2675
|
align: "left",
|
|
@@ -2702,7 +2688,7 @@ const e1 = /* @__PURE__ */ v("div", {
|
|
|
2702
2688
|
})("flex:0 0 80px;padding-left:14px;padding-right:14px;display:flex;align-items:center;position:relative;background-color:", ({ style: e }) => e.backgroundColor, ";"), t1 = /* @__PURE__ */ v("div", {
|
|
2703
2689
|
target: "ew7avl31",
|
|
2704
2690
|
label: "ToolbarTitle"
|
|
2705
|
-
})("font-size:18px;line-height:22px;font-weight:600;margin-left:20px;color:", ({ style: e }) => e.textColor, ";"),
|
|
2691
|
+
})("font-size:18px;line-height:22px;font-weight:600;margin-left:20px;color:", ({ style: e }) => e.textColor, ";"), pn = /* @__PURE__ */ ir(function({ title: t, leftNav: n, rightNav: r, style: a }, c) {
|
|
2706
2692
|
return /* @__PURE__ */ w(e1, {
|
|
2707
2693
|
ref: c,
|
|
2708
2694
|
style: a,
|
|
@@ -2723,7 +2709,7 @@ const e1 = /* @__PURE__ */ v("div", {
|
|
|
2723
2709
|
label: "AiDisclaimerContainer"
|
|
2724
2710
|
})("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:", ({ theme: e }) => e.aiChat.secondaryTextColor, ";");
|
|
2725
2711
|
function r1({ theme: e }) {
|
|
2726
|
-
const { t } =
|
|
2712
|
+
const { t } = P();
|
|
2727
2713
|
return /* @__PURE__ */ w(n1, {
|
|
2728
2714
|
theme: e,
|
|
2729
2715
|
children: [
|
|
@@ -2740,7 +2726,7 @@ function r1({ theme: e }) {
|
|
|
2740
2726
|
});
|
|
2741
2727
|
}
|
|
2742
2728
|
function o1() {
|
|
2743
|
-
const { themeSettings: e } =
|
|
2729
|
+
const { themeSettings: e } = R();
|
|
2744
2730
|
return /* @__PURE__ */ o("svg", {
|
|
2745
2731
|
width: "24",
|
|
2746
2732
|
height: "24",
|
|
@@ -2756,19 +2742,19 @@ function o1() {
|
|
|
2756
2742
|
});
|
|
2757
2743
|
}
|
|
2758
2744
|
const i1 = (e, t) => {
|
|
2759
|
-
const n = new
|
|
2745
|
+
const n = new er(e);
|
|
2760
2746
|
return n.alpha = t, n;
|
|
2761
2747
|
}, a1 = /* @__PURE__ */ v("div", {
|
|
2762
2748
|
target: "e1rxvpki0",
|
|
2763
2749
|
label: "Container"
|
|
2764
2750
|
})("font-size:inherit;line-height:inherit;padding-left:8px;padding-right:8px;padding-top:4px;border-radius:16px;margin-bottom:4px;box-shadow:", ({ theme: e }) => `0 4px 8px 0 ${i1(e.aiChat.primaryTextColor, 0.2)}`, ";cursor:pointer;color:", ({ theme: e }) => e.aiChat.clickableMessages.textColor, ";background-color:", ({ theme: e }) => e.aiChat.clickableMessages.backgroundColor, ";&:hover{color:", ({ theme: e }) => e.aiChat.clickableMessages.hover.textColor, ";background-color:", ({ theme: e }) => e.aiChat.clickableMessages.hover.backgroundColor, ";box-shadow:none;"), s1 = ({ onClick: e }) => {
|
|
2765
|
-
const { themeSettings: t } =
|
|
2751
|
+
const { themeSettings: t } = R();
|
|
2766
2752
|
return /* @__PURE__ */ o(a1, {
|
|
2767
2753
|
theme: t,
|
|
2768
2754
|
onClick: e,
|
|
2769
2755
|
children: /* @__PURE__ */ o(o1, {})
|
|
2770
2756
|
});
|
|
2771
|
-
}, l1 = ({ isVisible: e, onClick: t, anchorElement: n }) => /* @__PURE__ */ o(
|
|
2757
|
+
}, l1 = ({ isVisible: e, onClick: t, anchorElement: n }) => /* @__PURE__ */ o(It, {
|
|
2772
2758
|
anchorEl: n,
|
|
2773
2759
|
open: e,
|
|
2774
2760
|
placement: "top",
|
|
@@ -2779,76 +2765,75 @@ const i1 = (e, t) => {
|
|
|
2779
2765
|
onClick: t
|
|
2780
2766
|
})
|
|
2781
2767
|
}), c1 = /* @__PURE__ */ v("div", {
|
|
2782
|
-
target: "
|
|
2768
|
+
target: "evtkjw10",
|
|
2783
2769
|
label: "ChatBody"
|
|
2784
2770
|
})("display:flex;flex-direction:column;row-gap:", ({ theme: e }) => e.aiChat.body.gapBetweenMessages, ";overflow-y:scroll;padding-left:", ({ theme: e }) => e.aiChat.body.paddingLeft, ";padding-right:", ({ theme: e }) => e.aiChat.body.paddingRight, ";padding-top:", ({ theme: e }) => e.aiChat.body.paddingTop, ";padding-bottom:", ({ theme: e }) => e.aiChat.body.paddingBottom, ";flex:initial;height:100%;"), d1 = /* @__PURE__ */ v("div", {
|
|
2785
|
-
target: "
|
|
2771
|
+
target: "evtkjw11",
|
|
2786
2772
|
label: "ChatFooter"
|
|
2787
2773
|
})("padding-left:", ({ theme: e }) => e.aiChat.footer.paddingLeft, ";padding-right:", ({ theme: e }) => e.aiChat.footer.paddingRight, ";padding-top:", ({ theme: e }) => e.aiChat.footer.paddingTop, ";padding-bottom:", ({ theme: e }) => e.aiChat.footer.paddingBottom, ";display:flex;flex-direction:column;row-gap:6px;"), u1 = /* @__PURE__ */ v("div", {
|
|
2788
|
-
target: "
|
|
2774
|
+
target: "evtkjw12",
|
|
2789
2775
|
label: "FollowupQuestionsContainer"
|
|
2790
2776
|
})("display:flex;flex-direction:column;row-gap:", ({ theme: e }) => e.aiChat.suggestions.gap, ";");
|
|
2791
2777
|
function p1({ contextTitle: e, onGoBack: t, contextDetails: n }) {
|
|
2792
|
-
var
|
|
2793
|
-
const { t: r } =
|
|
2778
|
+
var te, le, ce;
|
|
2779
|
+
const { t: r } = P(), { enableFollowupQuestions: a, enableHeader: c, numOfRecentPrompts: s, numOfRecommendations: p, customPrompt: d } = ee(), { themeSettings: g } = R(), { data: m, isLoading: b, isError: i } = $t({
|
|
2794
2780
|
contextTitle: e,
|
|
2795
|
-
count: p
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
const { scrollTop: N, clientHeight:
|
|
2804
|
-
if (N === void 0 ||
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
P !== Me && se(Me);
|
|
2781
|
+
count: p,
|
|
2782
|
+
customPrompt: d
|
|
2783
|
+
}), u = z(() => m == null ? void 0 : m.map((N) => N.nlqPrompt), [
|
|
2784
|
+
m
|
|
2785
|
+
]), { history: l, lastNlqResponse: C, isAwaitingResponse: h, sendMessage: k, isLoading: S, chatId: x, lastError: L } = Tr(e, n), { mutate: E, isLoading: M } = zt(x), [I, O] = $(!1), [ae, U] = $(!1), Z = () => O(!0), q = () => O(!1), G = () => {
|
|
2786
|
+
E(), q();
|
|
2787
|
+
}, F = pe(null), Q = pe(null), _ = () => {
|
|
2788
|
+
if (!(F != null && F.current)) return;
|
|
2789
|
+
const { scrollTop: N, clientHeight: K, scrollHeight: Me } = F.current;
|
|
2790
|
+
if (N === void 0 || K === void 0 || Me === void 0) return;
|
|
2791
|
+
const Te = Me - N - K > K / 2;
|
|
2792
|
+
ae !== Te && U(Te);
|
|
2808
2793
|
};
|
|
2809
|
-
|
|
2794
|
+
Ie(() => {
|
|
2810
2795
|
F.current && (F.current.scrollTop = F.current.scrollHeight);
|
|
2811
2796
|
}, [
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2797
|
+
l,
|
|
2798
|
+
I,
|
|
2799
|
+
h
|
|
2815
2800
|
]);
|
|
2816
|
-
const
|
|
2817
|
-
ref:
|
|
2801
|
+
const V = pe(null), D = c ? /* @__PURE__ */ o(pn, {
|
|
2802
|
+
ref: V,
|
|
2818
2803
|
title: e,
|
|
2819
2804
|
leftNav: t && /* @__PURE__ */ o(Vi, {
|
|
2820
2805
|
onClick: t,
|
|
2821
|
-
color:
|
|
2806
|
+
color: g.aiChat.header.textColor
|
|
2822
2807
|
}),
|
|
2823
|
-
style:
|
|
2824
|
-
}) : null,
|
|
2825
|
-
...new Set(
|
|
2808
|
+
style: g.aiChat.header
|
|
2809
|
+
}) : null, j = z(() => [
|
|
2810
|
+
...new Set(l.filter((N) => N.role === "user").filter((N) => !(u != null && u.includes(N.content))).map((N) => N.content).reverse())
|
|
2826
2811
|
].slice(0, s), [
|
|
2827
|
-
|
|
2812
|
+
l,
|
|
2828
2813
|
s,
|
|
2829
|
-
|
|
2814
|
+
u
|
|
2830
2815
|
]);
|
|
2831
|
-
return (
|
|
2816
|
+
return (L == null ? void 0 : L.message) === r("ai.errors.chatUnavailable") ? /* @__PURE__ */ w(W, {
|
|
2832
2817
|
children: [
|
|
2833
|
-
c &&
|
|
2834
|
-
/* @__PURE__ */ o(
|
|
2835
|
-
text:
|
|
2818
|
+
c && D,
|
|
2819
|
+
/* @__PURE__ */ o(sn, {
|
|
2820
|
+
text: L.message
|
|
2836
2821
|
})
|
|
2837
2822
|
]
|
|
2838
|
-
}) : /* @__PURE__ */ w(
|
|
2823
|
+
}) : /* @__PURE__ */ w(W, {
|
|
2839
2824
|
children: [
|
|
2840
|
-
|
|
2825
|
+
D,
|
|
2841
2826
|
/* @__PURE__ */ w(c1, {
|
|
2842
2827
|
ref: F,
|
|
2843
|
-
theme:
|
|
2844
|
-
onScroll:
|
|
2828
|
+
theme: g,
|
|
2829
|
+
onScroll: _,
|
|
2845
2830
|
children: [
|
|
2846
2831
|
/* @__PURE__ */ o(l1, {
|
|
2847
|
-
isVisible:
|
|
2848
|
-
anchorElement:
|
|
2832
|
+
isVisible: ae,
|
|
2833
|
+
anchorElement: Q.current,
|
|
2849
2834
|
onClick: () => {
|
|
2850
|
-
var N,
|
|
2851
|
-
(
|
|
2835
|
+
var N, K;
|
|
2836
|
+
(K = F.current) == null || K.scroll({
|
|
2852
2837
|
top: (N = F.current) == null ? void 0 : N.scrollHeight,
|
|
2853
2838
|
behavior: "smooth"
|
|
2854
2839
|
});
|
|
@@ -2856,53 +2841,53 @@ function p1({ contextTitle: e, onGoBack: t, contextDetails: n }) {
|
|
|
2856
2841
|
}),
|
|
2857
2842
|
/* @__PURE__ */ o(oi, {}),
|
|
2858
2843
|
/* @__PURE__ */ o(Yi, {
|
|
2859
|
-
questions:
|
|
2844
|
+
questions: u || [],
|
|
2860
2845
|
isLoading: b,
|
|
2861
|
-
onSelection:
|
|
2846
|
+
onSelection: k
|
|
2862
2847
|
}),
|
|
2863
|
-
|
|
2848
|
+
L && /* @__PURE__ */ o(ie, {
|
|
2864
2849
|
align: "left",
|
|
2865
|
-
children:
|
|
2850
|
+
children: L.message
|
|
2866
2851
|
}),
|
|
2867
|
-
|
|
2868
|
-
messages:
|
|
2852
|
+
S ? /* @__PURE__ */ o(Pe, {}) : /* @__PURE__ */ o(Gi, {
|
|
2853
|
+
messages: l
|
|
2869
2854
|
}),
|
|
2870
|
-
a &&
|
|
2871
|
-
theme:
|
|
2872
|
-
children: (
|
|
2855
|
+
a && C && ((le = (te = C.followupQuestions) == null ? void 0 : te.length) != null ? le : 0) > 0 && /* @__PURE__ */ o(u1, {
|
|
2856
|
+
theme: g,
|
|
2857
|
+
children: (ce = C.followupQuestions) == null ? void 0 : ce.slice(0, 2).map((N, K) => /* @__PURE__ */ o(Be, {
|
|
2873
2858
|
align: "left",
|
|
2874
2859
|
onClick: () => {
|
|
2875
|
-
|
|
2860
|
+
k(N);
|
|
2876
2861
|
},
|
|
2877
2862
|
children: /* @__PURE__ */ o("div", {
|
|
2878
2863
|
className: "csdk-py-[7px] csdk-px-4",
|
|
2879
2864
|
children: N
|
|
2880
2865
|
})
|
|
2881
|
-
},
|
|
2866
|
+
}, K))
|
|
2882
2867
|
}),
|
|
2883
|
-
(
|
|
2884
|
-
|
|
2885
|
-
onCancel:
|
|
2886
|
-
onConfirm:
|
|
2868
|
+
(h || M) && /* @__PURE__ */ o(st, {}),
|
|
2869
|
+
I && /* @__PURE__ */ o(di, {
|
|
2870
|
+
onCancel: q,
|
|
2871
|
+
onConfirm: G
|
|
2887
2872
|
})
|
|
2888
2873
|
]
|
|
2889
2874
|
}),
|
|
2890
2875
|
/* @__PURE__ */ w(d1, {
|
|
2891
|
-
ref:
|
|
2892
|
-
theme:
|
|
2876
|
+
ref: Q,
|
|
2877
|
+
theme: g,
|
|
2893
2878
|
children: [
|
|
2894
2879
|
/* @__PURE__ */ o(Qr, {
|
|
2895
|
-
onSendMessage:
|
|
2896
|
-
disabled:
|
|
2897
|
-
onClearHistoryClick:
|
|
2898
|
-
suggestions:
|
|
2899
|
-
recentPrompts:
|
|
2900
|
-
isLoading: b ||
|
|
2901
|
-
recommendationsError:
|
|
2902
|
-
onChange:
|
|
2880
|
+
onSendMessage: k,
|
|
2881
|
+
disabled: h || S,
|
|
2882
|
+
onClearHistoryClick: Z,
|
|
2883
|
+
suggestions: u || [],
|
|
2884
|
+
recentPrompts: j,
|
|
2885
|
+
isLoading: b || S,
|
|
2886
|
+
recommendationsError: i,
|
|
2887
|
+
onChange: q
|
|
2903
2888
|
}),
|
|
2904
2889
|
/* @__PURE__ */ o(r1, {
|
|
2905
|
-
theme:
|
|
2890
|
+
theme: g
|
|
2906
2891
|
})
|
|
2907
2892
|
]
|
|
2908
2893
|
})
|
|
@@ -2918,12 +2903,12 @@ const h1 = /* @__PURE__ */ v("button", {
|
|
|
2918
2903
|
})("font-size:1.05rem;line-height:28px;color:", ({ theme: e }) => e.aiChat.dataTopics.items.textColor, ";"), C1 = /* @__PURE__ */ v("div", {
|
|
2919
2904
|
target: "e5a38pw2",
|
|
2920
2905
|
label: "Description"
|
|
2921
|
-
})("font-size:", ({ theme: e }) => e.aiChat.primaryFontSize[0], ";line-height:", ({ theme: e }) => e.aiChat.primaryFontSize[1], ";color:", ({ theme: e }) =>
|
|
2906
|
+
})("font-size:", ({ theme: e }) => e.aiChat.primaryFontSize[0], ";line-height:", ({ theme: e }) => e.aiChat.primaryFontSize[1], ";color:", ({ theme: e }) => Ht(e.aiChat.dataTopics.items.textColor, 0, 0.5), ";"), f1 = /* @__PURE__ */ v("div", {
|
|
2922
2907
|
target: "e5a38pw3",
|
|
2923
2908
|
label: "IconContainer"
|
|
2924
2909
|
})("width:16px;height:16px;transform:rotate(180deg);");
|
|
2925
2910
|
function m1(e) {
|
|
2926
|
-
const { title: t, description: n, onClick: r } = e, { themeSettings: a } =
|
|
2911
|
+
const { title: t, description: n, onClick: r } = e, { themeSettings: a } = R();
|
|
2927
2912
|
return /* @__PURE__ */ w(h1, {
|
|
2928
2913
|
onClick: r,
|
|
2929
2914
|
theme: a,
|
|
@@ -2941,7 +2926,7 @@ function m1(e) {
|
|
|
2941
2926
|
]
|
|
2942
2927
|
}),
|
|
2943
2928
|
/* @__PURE__ */ o(f1, {
|
|
2944
|
-
children: /* @__PURE__ */ o(
|
|
2929
|
+
children: /* @__PURE__ */ o(un, {
|
|
2945
2930
|
color: a.aiChat.icons.color
|
|
2946
2931
|
})
|
|
2947
2932
|
})
|
|
@@ -2959,7 +2944,7 @@ const b1 = /* @__PURE__ */ v("div", {
|
|
|
2959
2944
|
label: "Subtitle"
|
|
2960
2945
|
})("font-size:15px;line-height:22px;color:", ({ theme: e }) => e.aiChat.primaryTextColor, ";");
|
|
2961
2946
|
function v1(e) {
|
|
2962
|
-
const { dataTopics: t } = e, { themeSettings: n } =
|
|
2947
|
+
const { dataTopics: t } = e, { themeSettings: n } = R(), { t: r } = P();
|
|
2963
2948
|
return /* @__PURE__ */ w(b1, {
|
|
2964
2949
|
children: [
|
|
2965
2950
|
/* @__PURE__ */ o(y1, {
|
|
@@ -2975,7 +2960,7 @@ function v1(e) {
|
|
|
2975
2960
|
r("ai.topicSelectPrompt")
|
|
2976
2961
|
]
|
|
2977
2962
|
}),
|
|
2978
|
-
t.map((a) => /* @__PURE__ */
|
|
2963
|
+
t.map((a) => /* @__PURE__ */ Gn(m1, B(T({}, a), {
|
|
2979
2964
|
key: a.title
|
|
2980
2965
|
})))
|
|
2981
2966
|
]
|
|
@@ -3066,16 +3051,16 @@ const M1 = /* @__PURE__ */ v("div", {
|
|
|
3066
3051
|
label: "DataTopicsContainer"
|
|
3067
3052
|
})("display:flex;flex-direction:column;justify-content:top;overflow:hidden;height:100%;background-color:", ({ theme: e }) => e.aiChat.dataTopics.backgroundColor, ";");
|
|
3068
3053
|
function L1({ dataTopicsList: e, onDataTopicClick: t }) {
|
|
3069
|
-
const { enableHeader: n } = ee(), { themeSettings: r } =
|
|
3054
|
+
const { enableHeader: n } = ee(), { themeSettings: r } = R(), { t: a } = P(), c = z(() => e == null ? void 0 : e.map((p) => ({
|
|
3070
3055
|
title: p,
|
|
3071
3056
|
onClick: () => t(p)
|
|
3072
3057
|
})), [
|
|
3073
3058
|
e,
|
|
3074
3059
|
t
|
|
3075
3060
|
]), s = tr(nr(r.aiChat.header.backgroundColor)) > 0.5;
|
|
3076
|
-
return /* @__PURE__ */ w(
|
|
3061
|
+
return /* @__PURE__ */ w(W, {
|
|
3077
3062
|
children: [
|
|
3078
|
-
n ? /* @__PURE__ */ o(
|
|
3063
|
+
n ? /* @__PURE__ */ o(pn, {
|
|
3079
3064
|
title: a("ai.analyticsChatbot"),
|
|
3080
3065
|
leftNav: /* @__PURE__ */ o(M1, {
|
|
3081
3066
|
children: /* @__PURE__ */ o(S1, {
|
|
@@ -3087,7 +3072,7 @@ function L1({ dataTopicsList: e, onDataTopicClick: t }) {
|
|
|
3087
3072
|
/* @__PURE__ */ w(T1, {
|
|
3088
3073
|
theme: r,
|
|
3089
3074
|
children: [
|
|
3090
|
-
!c && /* @__PURE__ */ o(
|
|
3075
|
+
!c && /* @__PURE__ */ o(Pe, {}),
|
|
3091
3076
|
c && /* @__PURE__ */ o(v1, {
|
|
3092
3077
|
dataTopics: c
|
|
3093
3078
|
})
|
|
@@ -3097,47 +3082,47 @@ function L1({ dataTopicsList: e, onDataTopicClick: t }) {
|
|
|
3097
3082
|
});
|
|
3098
3083
|
}
|
|
3099
3084
|
function R1() {
|
|
3100
|
-
const [e, t] =
|
|
3101
|
-
l.length ? l.length === 1 && (r(void 0), t(l[0])) : r(
|
|
3085
|
+
const [e, t] = $(), [n, r] = $(), { data: a, fetchStatus: c } = xr(), { dataTopicsList: s, contextDetails: p } = ee(), { t: d } = P(), g = d("ai.errors.noAvailableDataTopics"), m = H((l) => {
|
|
3086
|
+
l.length ? l.length === 1 && (r(void 0), t(l[0])) : r(g);
|
|
3102
3087
|
}, [
|
|
3103
|
-
|
|
3104
|
-
]),
|
|
3088
|
+
g
|
|
3089
|
+
]), b = z(() => {
|
|
3105
3090
|
if (a && c === "idle") {
|
|
3106
|
-
const C = (s != null && s.length ? a == null ? void 0 : a.filter((
|
|
3107
|
-
return
|
|
3091
|
+
const C = (s != null && s.length ? a == null ? void 0 : a.filter((h) => s == null ? void 0 : s.includes(h.title)) : a).map((h) => h.title);
|
|
3092
|
+
return m(C), C;
|
|
3108
3093
|
}
|
|
3109
3094
|
return [];
|
|
3110
3095
|
}, [
|
|
3111
3096
|
a,
|
|
3112
3097
|
c,
|
|
3113
3098
|
s,
|
|
3114
|
-
|
|
3115
|
-
]), i =
|
|
3099
|
+
m
|
|
3100
|
+
]), i = ve(), u = H(() => {
|
|
3116
3101
|
r(void 0), i.invalidateQueries([
|
|
3117
3102
|
"getDataTopics"
|
|
3118
3103
|
]);
|
|
3119
3104
|
}, [
|
|
3120
3105
|
i
|
|
3121
3106
|
]);
|
|
3122
|
-
return n ? /* @__PURE__ */ o(
|
|
3107
|
+
return n ? /* @__PURE__ */ o(sn, {
|
|
3123
3108
|
text: n,
|
|
3124
3109
|
action: {
|
|
3125
3110
|
text: d("ai.buttons.refresh"),
|
|
3126
3111
|
onClick: u
|
|
3127
3112
|
}
|
|
3128
|
-
}) :
|
|
3113
|
+
}) : b.length === 1 && !e ? /* @__PURE__ */ o(Pe, {}) : e ? /* @__PURE__ */ o(p1, {
|
|
3129
3114
|
contextTitle: e,
|
|
3130
3115
|
contextDetails: p,
|
|
3131
|
-
onGoBack:
|
|
3116
|
+
onGoBack: b.length === 1 ? void 0 : () => t(void 0)
|
|
3132
3117
|
}) : /* @__PURE__ */ o(L1, {
|
|
3133
|
-
dataTopicsList:
|
|
3118
|
+
dataTopicsList: b,
|
|
3134
3119
|
onDataTopicClick: (l) => t(l)
|
|
3135
3120
|
});
|
|
3136
3121
|
}
|
|
3137
|
-
const V1 =
|
|
3122
|
+
const V1 = Nt({
|
|
3138
3123
|
componentName: "Chatbot"
|
|
3139
3124
|
})((e) => {
|
|
3140
|
-
const { width: t, height: n, config: r } = e, { themeSettings: a } =
|
|
3125
|
+
const { width: t, height: n, config: r } = e, { themeSettings: a } = R();
|
|
3141
3126
|
return /* @__PURE__ */ o(br, {
|
|
3142
3127
|
value: r != null ? r : {},
|
|
3143
3128
|
children: /* @__PURE__ */ o(Br, {
|
|
@@ -3149,16 +3134,16 @@ const V1 = Ft({
|
|
|
3149
3134
|
children: /* @__PURE__ */ o(R1, {})
|
|
3150
3135
|
})
|
|
3151
3136
|
});
|
|
3152
|
-
}), U1 =
|
|
3137
|
+
}), U1 = Nt({
|
|
3153
3138
|
componentName: "GetNlgInsights"
|
|
3154
3139
|
})(function(t) {
|
|
3155
|
-
const { data: n, isLoading: r, isError: a } =
|
|
3140
|
+
const { data: n, isLoading: r, isError: a } = He(t), { t: c } = P();
|
|
3156
3141
|
if (a)
|
|
3157
|
-
return /* @__PURE__ */ o(
|
|
3142
|
+
return /* @__PURE__ */ o(W, {
|
|
3158
3143
|
children: c("ai.errors.unexpected")
|
|
3159
3144
|
});
|
|
3160
3145
|
const s = n != null ? n : c("ai.errors.insightsNotAvailable");
|
|
3161
|
-
return /* @__PURE__ */ o(
|
|
3146
|
+
return /* @__PURE__ */ o(ct, {
|
|
3162
3147
|
text: r ? "Loading..." : s
|
|
3163
3148
|
});
|
|
3164
3149
|
});
|
|
@@ -3199,8 +3184,8 @@ const I1 = /* @__PURE__ */ v("div", {
|
|
|
3199
3184
|
target: "eit37yz1",
|
|
3200
3185
|
label: "IconDiv"
|
|
3201
3186
|
})("align-self:flex-start;"), F1 = ({ summary: e, nlgRequest: t }) => {
|
|
3202
|
-
const { themeSettings: n } =
|
|
3203
|
-
return /* @__PURE__ */ o(
|
|
3187
|
+
const { themeSettings: n } = R();
|
|
3188
|
+
return /* @__PURE__ */ o(_e, {
|
|
3204
3189
|
sourceId: t.jaql.datasource.title,
|
|
3205
3190
|
data: t,
|
|
3206
3191
|
type: "chart/insights",
|
|
@@ -3214,7 +3199,7 @@ const I1 = /* @__PURE__ */ v("div", {
|
|
|
3214
3199
|
theme: n
|
|
3215
3200
|
})
|
|
3216
3201
|
}),
|
|
3217
|
-
/* @__PURE__ */ o(
|
|
3202
|
+
/* @__PURE__ */ o(ct, {
|
|
3218
3203
|
text: e
|
|
3219
3204
|
}),
|
|
3220
3205
|
r
|
|
@@ -3222,19 +3207,18 @@ const I1 = /* @__PURE__ */ v("div", {
|
|
|
3222
3207
|
})
|
|
3223
3208
|
});
|
|
3224
3209
|
}, Q1 = ({ nlqResponse: e, onDataReady: t, styleOptions: n, filters: r = [] }) => {
|
|
3225
|
-
e.queryTitle =
|
|
3226
|
-
const { connectToWidgetProps: a } =
|
|
3210
|
+
e.queryTitle = Vn(e.queryTitle);
|
|
3211
|
+
const { connectToWidgetProps: a } = Un({
|
|
3227
3212
|
initialFilters: r
|
|
3228
|
-
}), [c, s] =
|
|
3229
|
-
|
|
3230
|
-
const
|
|
3213
|
+
}), [c, s] = $(null);
|
|
3214
|
+
ke(() => {
|
|
3215
|
+
const b = Ne(e, {
|
|
3231
3216
|
useCustomizedStyleOptions: !0
|
|
3232
3217
|
});
|
|
3233
|
-
if (!
|
|
3234
|
-
s(null);
|
|
3218
|
+
if (!b) s(null);
|
|
3235
3219
|
else {
|
|
3236
|
-
n &&
|
|
3237
|
-
const i = a(
|
|
3220
|
+
n && b.styleOptions && (b.styleOptions = rr(b.styleOptions, n));
|
|
3221
|
+
const i = a(b, {
|
|
3238
3222
|
shouldAffectFilters: !1,
|
|
3239
3223
|
applyMode: "filter"
|
|
3240
3224
|
});
|
|
@@ -3245,8 +3229,8 @@ const I1 = /* @__PURE__ */ v("div", {
|
|
|
3245
3229
|
a,
|
|
3246
3230
|
n
|
|
3247
3231
|
]);
|
|
3248
|
-
const p =
|
|
3249
|
-
const
|
|
3232
|
+
const p = z(() => {
|
|
3233
|
+
const b = c && Ge(c) ? Qn(c == null ? void 0 : c.filters) : [], i = e.jaql.metadata.filter((u) => !u.jaql.filter).concat(b.filter((u) => !u.config.disabled).map((u) => u.jaql()));
|
|
3250
3234
|
return B(T({}, e), {
|
|
3251
3235
|
jaql: B(T({}, e.jaql), {
|
|
3252
3236
|
metadata: i
|
|
@@ -3256,16 +3240,16 @@ const I1 = /* @__PURE__ */ v("div", {
|
|
|
3256
3240
|
}, [
|
|
3257
3241
|
e,
|
|
3258
3242
|
c
|
|
3259
|
-
]), { data: d, isLoading:
|
|
3260
|
-
return
|
|
3243
|
+
]), { data: d, isLoading: g, isError: m } = He(p);
|
|
3244
|
+
return g || !c ? /* @__PURE__ */ o(st, {}) : Ge(c) ? /* @__PURE__ */ o(ye, B(T({}, c), {
|
|
3261
3245
|
highlightSelectionDisabled: !0,
|
|
3262
3246
|
onDataReady: t,
|
|
3263
|
-
topSlot: d && !
|
|
3247
|
+
topSlot: d && !m && /* @__PURE__ */ o(F1, {
|
|
3264
3248
|
nlgRequest: p,
|
|
3265
3249
|
summary: d
|
|
3266
3250
|
})
|
|
3267
|
-
})) : /* @__PURE__ */ o(
|
|
3268
|
-
}, N1 = new
|
|
3251
|
+
})) : /* @__PURE__ */ o(W, {});
|
|
3252
|
+
}, N1 = new Rt({
|
|
3269
3253
|
defaultOptions: {
|
|
3270
3254
|
queries: {
|
|
3271
3255
|
refetchOnWindowFocus: !1,
|
|
@@ -3275,9 +3259,9 @@ const I1 = /* @__PURE__ */ v("div", {
|
|
|
3275
3259
|
});
|
|
3276
3260
|
function _1({ children: e, context: t }) {
|
|
3277
3261
|
return /* @__PURE__ */ o(Ot, {
|
|
3278
|
-
children: /* @__PURE__ */ o(
|
|
3262
|
+
children: /* @__PURE__ */ o(et.Provider, {
|
|
3279
3263
|
value: t == null ? void 0 : t.api,
|
|
3280
|
-
children: /* @__PURE__ */ o(
|
|
3264
|
+
children: /* @__PURE__ */ o(Et, {
|
|
3281
3265
|
client: N1,
|
|
3282
3266
|
children: e
|
|
3283
3267
|
})
|