@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.
Files changed (72) hide show
  1. package/dist/ai.cjs +29 -29
  2. package/dist/ai.js +686 -702
  3. package/dist/analytics-composer.cjs +33 -33
  4. package/dist/analytics-composer.js +278 -290
  5. package/dist/derive-chart-family-6PZA-xZh.js +92092 -0
  6. package/dist/derive-chart-family-DQUVKMcV.cjs +656 -0
  7. package/dist/{dimensions-DuHaCozA.js → dimensions-b8xRITJn.js} +4 -5
  8. package/dist/{dimensions-BgPl9ZS9.cjs → dimensions-x8nnAUew.cjs} +1 -1
  9. package/dist/index.cjs +17 -17
  10. package/dist/index.js +7935 -7787
  11. package/dist/index.umd.js +415 -389
  12. package/dist/packages/sdk-ui/src/ai/api/types.d.ts +1 -0
  13. package/dist/packages/sdk-ui/src/ai/chat-config.d.ts +7 -0
  14. package/dist/packages/sdk-ui/src/ai/common/icon-button.d.ts +1 -3
  15. package/dist/packages/sdk-ui/src/ai/messages/clickable-message.d.ts +0 -1
  16. package/dist/packages/sdk-ui/src/ai/use-get-query-recommendations.d.ts +7 -0
  17. package/dist/packages/sdk-ui/src/analytics-composer/query/fix-ranking-filter-jaql.d.ts +8 -0
  18. 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
  19. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/legend.d.ts +2 -0
  20. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/tooltip.d.ts +4 -0
  21. 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
  22. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/bar-chart/highchart-options/legend.d.ts +3 -0
  23. package/dist/packages/sdk-ui/src/chart-options-processor/{cartesian-chart-options.d.ts → cartesian/cartesian-chart-options.d.ts} +6 -6
  24. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis-configuration.d.ts +41 -0
  25. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/chart-configuration.d.ts +13 -0
  26. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/chart-spacing-calculator.d.ts +41 -0
  27. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/series-processor.d.ts +57 -0
  28. package/dist/packages/sdk-ui/src/chart-options-processor/data-points.d.ts +1 -0
  29. package/dist/packages/sdk-ui/src/chart-options-processor/tooltip.d.ts +3 -29
  30. package/dist/packages/sdk-ui/src/chart-options-processor/translations/scatter-plot-options.d.ts +2 -2
  31. package/dist/packages/sdk-ui/src/chart-options-processor/translations/scatter-tooltip.d.ts +2 -2
  32. package/dist/packages/sdk-ui/src/chart-options-processor/translations/tooltip-utils.d.ts +17 -2
  33. package/dist/packages/sdk-ui/src/chart-options-processor/translations/tooltip.d.ts +3 -3
  34. package/dist/packages/sdk-ui/src/chart-options-processor/translations/translations-to-highcharts.d.ts +7 -0
  35. package/dist/packages/sdk-ui/src/chart-options-processor/translations/treemap/treemap-tooltip.d.ts +3 -4
  36. package/dist/packages/sdk-ui/src/chart-options-processor/translations/value-label-section.d.ts +3 -3
  37. package/dist/packages/sdk-ui/src/common/icons/drag-handle-icon.d.ts +2 -1
  38. package/dist/packages/sdk-ui/src/custom-widgets-provider/types.d.ts +10 -1
  39. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/components/draggable-line.d.ts +5 -1
  40. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/utils.d.ts +7 -1
  41. package/dist/packages/sdk-ui/src/dashboard/hooks/use-dashboard-header-toolbar.d.ts +0 -1
  42. package/dist/packages/sdk-ui/src/dashboard/hooks/use-edit-mode-toolbar.d.ts +0 -1
  43. package/dist/packages/sdk-ui/src/dashboard/use-dashboard-theme.d.ts +4 -0
  44. package/dist/packages/sdk-ui/src/decorators/component-decorators/with-tracking/index.d.ts +1 -1
  45. package/dist/packages/sdk-ui/src/decorators/component-decorators/with-tracking/use-track-component-init.d.ts +4 -1
  46. package/dist/packages/sdk-ui/src/decorators/component-decorators/with-tracking/with-tracking.d.ts +10 -2
  47. package/dist/packages/sdk-ui/src/error-boundary/error-boundary.d.ts +1 -1
  48. package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-existing-filter-editing.d.ts +0 -1
  49. package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-new-filter-adding.d.ts +0 -1
  50. package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/use-members.d.ts +1 -1
  51. package/dist/packages/sdk-ui/src/index.d.ts +1 -0
  52. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/get-pivot-table-data-point.d.ts +4 -0
  53. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/index.d.ts +1 -0
  54. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/types.d.ts +32 -0
  55. 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
  56. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/utils.d.ts +11 -0
  57. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-formatting.d.ts +2 -2
  58. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-render-pivot.d.ts +8 -4
  59. package/dist/packages/sdk-ui/src/props.d.ts +33 -1
  60. package/dist/packages/sdk-ui/src/theme-provider/default-theme-settings.d.ts +5 -0
  61. package/dist/packages/sdk-ui/src/types.d.ts +84 -3
  62. package/dist/packages/sdk-ui/src/widget-by-id/utils.d.ts +3 -3
  63. package/dist/packages/sdk-ui/src/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -6
  64. package/dist/{use-common-filters-B1RKY2KD.js → use-common-filters-BHBy4uv6.js} +5815 -5679
  65. package/dist/use-common-filters-Cg217teN.cjs +350 -0
  66. package/dist/{widget-composer-B2r2a9Oh.cjs → widget-composer-BPlNiX_P.cjs} +8 -8
  67. package/dist/{widget-composer-I9gUFBZt.js → widget-composer-SGEFYrXY.js} +248 -216
  68. package/package.json +29 -27
  69. package/dist/derive-chart-family-BPYK8evJ.js +0 -90579
  70. package/dist/derive-chart-family-yUBZXP4x.cjs +0 -669
  71. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/get-legacy-cartesian-chart-options.d.ts +0 -3
  72. 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 Te = Object.getOwnPropertySymbols;
4
- var pt = Object.prototype.hasOwnProperty, ht = Object.prototype.propertyIsEnumerable;
5
- var ut = (e, t, n) => t in e ? yn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, T = (e, t) => {
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
- pt.call(t, n) && ut(e, n, t[n]);
8
- if (Te)
9
- for (var n of Te(t))
10
- ht.call(t, n) && ut(e, n, t[n]);
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 Pe = (e, t) => {
13
+ var $e = (e, t) => {
14
14
  var n = {};
15
15
  for (var r in e)
16
- pt.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
17
- if (e != null && Te)
18
- for (var r of Te(e))
19
- t.indexOf(r) < 0 && ht.call(e, r) && (n[r] = e[r]);
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 (h) {
27
- a(h);
26
+ } catch (g) {
27
+ a(g);
28
28
  }
29
29
  }, s = (d) => {
30
30
  try {
31
31
  p(n.throw(d));
32
- } catch (h) {
33
- a(h);
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 { by as kn, bz as wn, bA as Tt, bB as Sn, bC as xe, bD as Mn, bE as Tn, bF as Ln, bc as Lt, bd as Rt, aQ as he, G as _e, aF as Et, aj as Rn, bG as En, al as In, v as Bn, x as Be, bH as Fn, bI as Nn, aq as de, bJ as It, ar as Hn, A as On, aT as Pn, bK as Dn, B as ge, q as De, bL as gt, P as f, t as $n, aG as Bt, b3 as An, aC as zn, bM as qn, ah as be, J as Wn, bN as Zn, bO as jn, M as Ft, bP as Gn, b6 as Vn, ba as Un } from "./use-common-filters-B1RKY2KD.js";
39
- import { P as Qn, t as o, _ as _n, k as Kn, c7 as Jn, R as O, T as Ze, aZ as v, bb as $, a7 as w, U as L, F as G, a4 as Nt, aD as je, aI as Xn, c8 as Yn, c9 as er, a2 as tr, a3 as nr, n as rr } from "./derive-chart-family-BPYK8evJ.js";
40
- import * as K from "react";
41
- import { createContext as Ke, useContext as Je, useMemo as Z, useState as D, useCallback as H, useEffect as ve, useRef as ue, useLayoutEffect as Ee, memo as or, forwardRef as ir } from "react";
42
- import { t as Fe } from "./widget-composer-I9gUFBZt.js";
43
- import { w as X1 } from "./widget-composer-I9gUFBZt.js";
44
- import { jsx as Ce } from "react/jsx-runtime";
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: t.status === "loading",
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 = n;
97
+ this.currentResult = r;
97
98
  }
98
99
  notify(t) {
99
- Tt.batch(() => {
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, h;
106
- (s = (p = this.mutateOptions).onError) == null || s.call(p, this.currentResult.error, this.currentResult.variables, this.currentResult.context), (d = (h = this.mutateOptions).onSettled) == null || d.call(h, void 0, this.currentResult.error, this.currentResult.variables, this.currentResult.context);
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: b
111
+ listener: m
111
112
  }) => {
112
- b(this.currentResult);
113
+ m(this.currentResult);
113
114
  });
114
115
  });
115
116
  }
116
117
  }
117
- function Xe(e, t, n) {
118
- const r = Ln(e, t), a = xe({
118
+ function Ye(e, t, n) {
119
+ const r = Ln(e, t), a = ve({
119
120
  context: r.context
120
- }), [c] = K.useState(() => new ar(a, r));
121
- K.useEffect(() => {
121
+ }), [c] = J.useState(() => new ar(a, r));
122
+ J.useEffect(() => {
122
123
  c.setOptions(r);
123
124
  }, [c, r]);
124
- const s = Mn(K.useCallback((d) => c.subscribe(Tt.batchCalls(d)), [c]), () => c.getCurrentResult(), () => c.getCurrentResult()), p = K.useCallback((d, h) => {
125
- c.mutate(d, h).catch(sr);
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 Lt({
165
+ const cr = new Rt({
165
166
  defaultOptions: {
166
167
  queries: {
167
168
  refetchOnWindowFocus: !1,
168
169
  refetchOnMount: !1
169
170
  }
170
171
  }
171
- }), Ye = /* @__PURE__ */ Ke(void 0), J = () => Je(Ye), dr = ({ children: e, volatile: t }) => {
172
- const { app: n } = Qn(), r = Z(() => n ? new lr(n.httpClient, t) : void 0, [
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(Ye.Provider, {
177
+ return /* @__PURE__ */ o(et.Provider, {
177
178
  value: r,
178
- children: /* @__PURE__ */ o(Rt, {
179
+ children: /* @__PURE__ */ o(Et, {
179
180
  client: cr,
180
181
  children: e
181
182
  })
182
183
  });
183
- }, Ht = /* @__PURE__ */ Ke({}), ur = () => Je(Ht), Ot = ({ children: e }) => {
184
- const [t, n] = D({}), r = H((s, p) => {
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((h) => B(T({}, h), {
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(Ht.Provider, {
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 = Jn(e.dataSource), { filters: a = [], relations: c } = _n(e.filters), { metadata: s, filterRelations: p } = Kn({
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 Ne = (e, t = !0) => {
236
- const n = Z(() => pr(e), [
236
+ const He = (e, t = !0) => {
237
+ const n = z(() => pr(e), [
237
238
  e
238
- ]), r = J(), { data: a, error: c, isError: s, isLoading: p, isSuccess: d, refetch: h } = he({
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: (b) => {
246
- var m;
247
- return (m = b == null ? void 0 : b.data) == null ? void 0 : m.answer;
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
- h();
259
+ g();
259
260
  }, [
260
- h
261
+ g
261
262
  ])
262
263
  };
263
264
  }, hr = (e) => {
264
- const r = e, { enabled: t } = r, n = Pe(r, ["enabled"]);
265
- return Ne(n, t);
266
- }, q1 = _e("useGetNlgInsights")(hr), gr = [
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 = J(), { isLoading: a, isError: c, isSuccess: s, data: p, error: d, refetch: h } = he({
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
- }), b = p ? Fe(p, {
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: b,
306
+ data: m,
306
307
  error: d,
307
308
  refetch: H(() => {
308
- h();
309
+ g();
309
310
  }, [
310
- h
311
+ g
311
312
  ])
312
313
  };
313
- }, W1 = _e("useGetNlqResult")(fr), mr = 4, Pt = (e) => {
314
- const { contextTitle: t, count: n, enableAxisTitlesInWidgetProps: r, enabled: a } = e, c = J(), s = n != null ? n : mr, p = (a === void 0 || a === !0) && s > 0, { isLoading: d, isError: h, isSuccess: b, data: m, error: i, refetch: u } = he({
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
- s,
319
- c
319
+ p,
320
+ s
320
321
  ],
321
- queryFn: () => c == null ? void 0 : c.ai.getQueryRecommendations(t, {
322
- numOfRecommendations: s
323
- }),
324
- enabled: !!c && p
325
- }), l = Z(() => m == null ? void 0 : m.map((C) => B(T({}, C), {
326
- widgetProps: C.jaql ? Fe(C, {
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
- m,
333
+ i,
331
334
  r
332
335
  ]);
333
336
  return {
334
- isLoading: p ? d : !1,
335
- isError: h,
337
+ isLoading: d ? g : !1,
338
+ isError: m,
336
339
  isSuccess: b,
337
- data: l != null ? l : void 0,
338
- error: i,
340
+ data: C != null ? C : void 0,
341
+ error: u,
339
342
  refetch: H(() => {
340
- u();
343
+ l();
341
344
  }, [
342
- u
345
+ l
343
346
  ])
344
347
  };
345
- }, Z1 = _e("useGetQueryRecommendations")(Pt), Dt = Object.freeze({
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
- }), $t = /* @__PURE__ */ Ke(T({}, Dt)), ee = () => Je($t), br = ({ children: e, value: t }) => {
352
- const { t: n } = O(), r = Object.entries(t).reduce((a, [c, s]) => (s !== void 0 && (a[c] = s), a), B(T({}, Dt), {
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($t.Provider, {
360
+ return /* @__PURE__ */ o(At.Provider, {
358
361
  value: r,
359
362
  children: e
360
363
  });
361
- }, et = "chatHistory", yr = (e) => {
362
- const t = J(), { hideHistory: n } = ee();
363
- return he({
364
+ }, tt = "chatHistory", yr = (e) => {
365
+ const t = X(), { hideHistory: n } = ee();
366
+ return ge({
364
367
  queryKey: [
365
- et,
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
- }, At = (e) => {
380
- const t = J(), n = xe();
381
- return Xe({
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
- et,
394
+ tt,
392
395
  e
393
396
  ], []);
394
397
  }
395
398
  });
396
- }, tt = (e) => {
397
- const { data: t, isLoading: n, isError: r } = yr(e), { mutate: a } = At(e);
398
- return ve(() => {
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 = J(), { data: t, isLoading: n, fetchStatus: r } = he({
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 = J(), { data: t, isLoading: n } = he({
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 = xe(), a = J(), c = Xe({
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 ve(() => {
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 = xe(), r = H((d) => {
475
+ const n = ve(), r = H((d) => {
473
476
  e && n.setQueriesData([
474
- et,
477
+ tt,
475
478
  e
476
- ], (h) => h && [
477
- ...h,
479
+ ], (g) => g && [
480
+ ...g,
478
481
  d
479
482
  ]);
480
483
  }, [
481
484
  n,
482
485
  e
483
- ]), { t: a } = O(), c = J(), { mutate: s, isLoading: p } = Xe({
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 h = a("ai.errors.unknownResponse");
511
- r(wr(d, h));
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
- }, nt = (e, t, n = !1) => {
519
- var b;
520
- const { data: r, isLoading: a } = vr(), c = ur(), s = c.getChatId(e, t) || ((b = r.find((m) => {
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 m.contextTitle === e && ((i = m.contextDetails) == null ? void 0 : i.dashboardId) === (t == null ? void 0 : t.dashboardId);
523
- })) == null ? void 0 : b.chatId), { isError: p, data: d, isSuccess: h } = kr(e, n && !a && !s, t);
524
- return ve(() => {
525
- h && d && !s && c.saveChatId(d.chatId, e, t);
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
- h,
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
- }, zt = (e) => Z(() => {
541
+ }, qt = (e) => z(() => {
539
542
  if (e != null && e.length) {
540
543
  const t = e[e.length - 1];
541
- if (rt(t))
544
+ if (ot(t))
542
545
  return JSON.parse(t.content);
543
546
  }
544
547
  return null;
545
548
  }, [
546
549
  e
547
- ]), rt = (e) => !!e && "type" in e && e.type === "nlq", Mr = (e) => !!e && "type" in e && e.type === "text", Tr = (e, t) => {
548
- const { t: n } = O(), { enableFollowupQuestions: r } = ee(), { chatId: a, isError: c } = nt(e, t, !0), [s, p] = D(null), { history: d, isLoading: h, isError: b } = tt(a);
549
- ve(() => {
550
- c ? p(new Ze("ai.errors.chatUnavailable")) : b && p(new Ze("ai.errors.fetchHistory"));
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
- b,
556
+ m,
554
557
  n
555
558
  ]);
556
- const { mutate: m, isLoading: i } = Sr(a, r), u = zt(d);
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: m,
564
+ sendMessage: b,
562
565
  isAwaitingResponse: i,
563
- isLoading: h,
566
+ isLoading: g,
564
567
  lastError: s
565
568
  };
566
569
  }, j1 = ({ contextTitle: e, contextDetails: t }) => {
567
- const { chatId: n } = nt(e, t), { history: r } = tt(n);
568
- return zt(r);
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 } = nt(e, t), { history: r } = tt(n);
571
- return Z(() => {
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(rt);
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 ? Ct(e) : `${Er}px`, ";height:", ({ height: e }) => e ? Ct(e) : `${Ir}px`, ";", ({ theme: 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 Ct(e) {
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 He() {
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 Or = /* @__PURE__ */ v("div", {
665
+ const Pr = /* @__PURE__ */ v("div", {
663
666
  target: "e1q6h1ze0",
664
667
  label: "Section"
665
- })("display:flex;flex-direction:column;row-gap:4px;"), Pr = /* @__PURE__ */ v("div", {
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, ";}"), Dr = /* @__PURE__ */ v("div", {
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 $r({ title: e, items: t, onSelect: n, alwaysExpanded: r = !1 }) {
673
- const [a, c] = D(!1), { themeSettings: s } = L();
674
- return /* @__PURE__ */ w(Or, {
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(Pr, {
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(Dr, {
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;"), Ge = (e) => e.startsWith("/");
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: h } = L(), { t: b } = O(), m = d.length === 1;
709
- return /* @__PURE__ */ o(Et, {
710
- open: Ge(c) && d.length > 0,
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: h,
734
+ theme: g,
732
735
  children: [
733
- n && /* @__PURE__ */ o(He, {}),
734
- !n && !s && d.map((i) => /* @__PURE__ */ o($r, B(T({}, i), {
735
- alwaysExpanded: m
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: h,
739
- children: b("ai.errors.recommendationsNotAvailable")
741
+ theme: g,
742
+ children: m("ai.errors.recommendationsNotAvailable")
740
743
  })
741
744
  ]
742
745
  })
743
746
  });
744
747
  }
745
- function ke({ title: e, placement: t = "top", children: n }) {
746
- const { themeSettings: r } = L();
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, h] = D(""), { inputPromptText: b } = ee(), m = H(() => {
796
- if (n)
797
- return;
798
- if (Ge(d)) {
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 y = d.trim();
803
- y.length !== 0 && (e(y), h(""));
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((y) => {
809
- e(y), h("");
810
+ ]), i = H((x) => {
811
+ e(x), g("");
810
812
  }, [
811
813
  e
812
- ]), u = H((y) => {
813
- y.key === "Enter" ? (y.preventDefault(), m()) : y.key === "Escape" && Ge(d) && h("");
814
+ ]), u = H((x) => {
815
+ x.key === "Enter" ? (x.preventDefault(), b()) : x.key === "Escape" && Ve(d) && g("");
814
816
  }, [
815
- m,
817
+ b,
816
818
  d
817
- ]), l = H((y) => {
818
- p == null || p(y.target.value), h(y.target.value);
819
+ ]), l = H((x) => {
820
+ p == null || p(x.target.value), g(x.target.value);
819
821
  }, [
820
822
  p
821
- ]), C = ue(null);
822
- Ee(() => {
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
- ]), Ee(() => {
828
+ ]), Ie(() => {
827
829
  C.current && C.current.focus({
828
830
  preventScroll: !0
829
831
  });
830
832
  }, []);
831
- const { themeSettings: g } = L(), { t: k } = O(), S = H((y) => {
832
- var E;
833
- if ((E = document.getElementById("csdk-chatbot-frame")) != null && E.contains(y.relatedTarget)) {
834
- const R = (M) => {
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", R), document.removeEventListener("keyup", R), M.type === "mouseup" && ((I = document.getSelection()) == null ? void 0 : I.type) !== "Range" && y.target.focus({
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", R), document.addEventListener("keyup", R);
842
+ document.addEventListener("mouseup", E), document.addEventListener("keyup", E);
841
843
  }
842
844
  }, []);
843
845
  return /* @__PURE__ */ w(Zr, {
844
- theme: g,
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(ke, {
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: g
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: b,
876
+ placeholder: m,
875
877
  value: d,
876
878
  onKeyDown: u,
877
- theme: g
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: m,
883
- theme: g,
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: g
889
+ theme: h
888
890
  })
889
891
  })
890
892
  })
891
893
  ]
892
894
  });
893
895
  }
894
- function ae() {
895
- return ae = Object.assign ? Object.assign.bind() : function(e) {
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
- }, ae.apply(this, arguments);
903
+ }, se.apply(this, arguments);
903
904
  }
904
- const _r = ["children", "options"], x = { 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" };
905
- var ft;
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
- })(ft || (ft = {}));
909
- const mt = ["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" }), bt = { 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,}$/, qt = /^(\s*>[\s\S]*?)(?=\n\n|$)/, to = /^ *> ?/gm, no = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, ro = /^ {2,}\n/, oo = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, Wt = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, Zt = /^(?: {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)\]/, jt = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Gt = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Vt = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/, Ve = /^ *(?!<[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, Ut = /^<!--[\s\S]*?(?:-->)/, Co = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, Ue = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, fo = /^\{.*\}$/, mo = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, bo = /^<([^ >]+@[^ >]+)>/, yo = /^<([^ >]+:\/[^ >]+)>/, xo = /-([a-z])?/gi, Qt = /^(\|.*)\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])/, yt = /\\([^0-9A-Za-z\s])/g, Oo = /^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/, Po = /^\n+/, Do = /^([ \t]*)/, $o = /\\([^\\])/g, Ao = /(?:^|\n)( *)$/, ot = "(?:\\d+\\.)", it = "(?:[*+-])";
910
- function _t(e) {
911
- return "( *)(" + (e === 1 ? ot : it) + ") +";
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 zo = Xt(1), qo = Xt(2);
914
+ const Jt = Kt(1), Xt = Kt(2);
918
915
  function Yt(e) {
919
- return new RegExp("^" + (e === 1 ? Kt : Jt) + "[^\\n]*(?:\\n(?!\\1" + (e === 1 ? ot : it) + " )[^\\n]*)*(\\n|$)", "gm");
916
+ return new RegExp("^" + (e === 1 ? Jt : Xt));
920
917
  }
921
- const Wo = Yt(1), Zo = Yt(2);
918
+ const zo = Yt(1), qo = Yt(2);
922
919
  function en(e) {
923
- const t = e === 1 ? ot : it;
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 tn = en(1), nn = en(2);
927
- function xt(e, t) {
928
- const n = t === 1, r = n ? tn : nn, a = n ? Wo : Zo, c = n ? zo : qo;
929
- return { match: pe(function(s, p) {
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 h = n ? +s[2] : void 0, b = s[0].replace(eo, `
934
+ const g = n ? +s[2] : void 0, m = s[0].replace(eo, `
934
935
  `).match(a);
935
- let m = !1;
936
- return { items: b.map(function(i, u) {
937
- const l = c.exec(i)[0].length, C = new RegExp("^ {1," + l + "}", "gm"), g = i.replace(C, "").replace(c, ""), k = u === b.length - 1, S = g.indexOf(`
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 && m;
940
- m = S;
941
- const y = d.inline, E = d.list;
942
- let R;
943
- d.list = !0, S ? (d.inline = !1, R = ye(g) + `
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, R = ye(g));
946
- const M = p(R, d);
947
- return d.inline = y, d.list = E, M;
948
- }), ordered: n, start: h };
949
- }, render: (s, p, d) => e(s.ordered ? "ol" : "ul", { key: d.key, start: s.type === x.orderedList ? s.start : void 0 }, s.items.map(function(h, b) {
950
- return e("li", { key: b }, p(h, d));
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 = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, rn = [qt, Wt, Zt, jt, Vt, Gt, Qt, tn, nn], Vo = [...rn, /^[^\n]+(?: \n|\n{2,})/, Ve, Ut, Ue];
954
- function ye(e) {
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 fe(e) {
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 vt(e, t, n, r) {
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, h, b) => {
977
- d.trim() === "|" && (p(), r) ? h !== 0 && h !== b.length - 1 && c.push([]) : s += d;
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(h) {
985
- return vt(h, p, d, !0);
983
+ `).map(function(g) {
984
+ return kt(g, p, d, !0);
986
985
  });
987
- }(e[3], t, n) : [], c = vt(e[1], t, n, !!a.length);
988
- return n.inline = !1, a.length ? { align: r, cells: a, header: c, type: x.table } : { children: c, type: x.paragraph };
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 kt(e, t) {
989
+ function wt(e, t) {
991
990
  return e.align[t] == null ? {} : { textAlign: e.align[t] };
992
991
  }
993
- function pe(e) {
992
+ function he(e) {
994
993
  return e.inline = 1, e;
995
994
  }
996
995
  function re(e) {
997
- return pe(function(t, n) {
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 pe(function(t, n) {
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 me(e) {
1012
- return pe(function(t) {
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
- `, !rn.some((c) => c.test(a)) && (n += a, !!a.trim())));
1023
- const r = ye(n);
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 wt(e) {
1038
- return e.replace($o, "$1");
1034
+ function St(e) {
1035
+ return e.replace(Do, "$1");
1039
1036
  }
1040
- function Re(e, t, n) {
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 $e = (e, t, n) => ({ children: Re(t, e[2], n) });
1059
- function Ae() {
1055
+ const Ae = (e, t, n) => ({ children: Ee(t, e[2], n) });
1056
+ function ze() {
1060
1057
  return {};
1061
1058
  }
1062
- function ze() {
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 qe(e, t, n) {
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 = qe(t.overrides, `${i}.props`, {});
1078
- return t.createElement(function(g, k) {
1079
- const S = qe(k, g);
1080
- return S ? typeof S == "function" || typeof S == "object" && "render" in S ? S : qe(k, `${g}.component`, g) : g;
1081
- }(i, t.overrides), ae({}, u, C, { className: ei(u == null ? void 0 : u.className, C.className) || void 0 }), ...l);
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 = h(d(u ? i : `${ye(i).replace(Po, "")}
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
- l.pop();
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 g;
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
- return g = l[0], typeof g == "string" ? n("span", { key: "outer" }, g) : g;
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" }, g);
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, g) {
1108
- const k = g.indexOf("=");
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, P) {
1112
- return P.toUpperCase();
1103
+ return M.indexOf("-") !== -1 && M.match(Co) === null && (M = M.replace(xo, function(I, O) {
1104
+ return O.toUpperCase();
1113
1105
  })), M;
1114
- }(g.slice(0, k)).trim(), y = function(M) {
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
- }(g.slice(k + 1).trim()), E = mt[S] || S;
1118
- if (E === "ref")
1119
- return C;
1120
- const R = C[E] = function(M, I, P, se) {
1121
- return I === "style" ? function(Q) {
1122
- const A = [];
1123
- let U = "", F = !1, z = !1, X = "";
1124
- if (!Q)
1125
- return A;
1126
- for (let V = 0; V < Q.length; V++) {
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 = U.trim();
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(), N = j.slice(te + 1).trim();
1136
- A.push([le, N]);
1124
+ const le = j.slice(0, te).trim(), ce = j.slice(te + 1).trim();
1125
+ Z.push([le, ce]);
1137
1126
  }
1138
1127
  }
1139
- U = "";
1128
+ q = "";
1140
1129
  }
1141
1130
  }
1142
- const _ = U.trim();
1131
+ const _ = q.trim();
1143
1132
  if (_) {
1144
1133
  const V = _.indexOf(":");
1145
1134
  if (V > 0) {
1146
- const q = _.slice(0, V).trim(), j = _.slice(V + 1).trim();
1147
- A.push([q, j]);
1135
+ const D = _.slice(0, V).trim(), j = _.slice(V + 1).trim();
1136
+ Z.push([D, j]);
1148
1137
  }
1149
1138
  }
1150
- return A;
1151
- }(P).reduce(function(Q, [A, U]) {
1152
- return Q[A.replace(/(-[a-z])/g, (F) => F[1].toUpperCase())] = se(U, M, A), Q;
1153
- }, {}) : Jr.indexOf(I) !== -1 ? se(P, M, I) : (P.match(fo) && (P = P.slice(1, P.length - 1)), P === "true" || P !== "false" && P);
1154
- }(i, S, y, t.sanitizer);
1155
- typeof R == "string" && (Ve.test(R) || Ue.test(R)) && (C[E] = r(R.trim()));
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 || fe, t.namedCodesToUnicode = t.namedCodesToUnicode ? ae({}, bt, t.namedCodesToUnicode) : bt, t.createElement = t.createElement || K.createElement;
1162
- const c = [], s = {}, p = { [x.blockQuote]: { match: Y(qt), order: 1, parse(i, u, l) {
1163
- const [, C, g] = i[0].replace(to, "").match(no);
1164
- return { alert: C, children: u(g, l) };
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(), fe), i.children.unshift({ attrs: {}, children: [{ type: x.text, text: i.alert }], noInnerParse: !0, type: x.htmlBlock, tag: "header" })), n("blockquote", C, u(i.children, l));
1168
- } }, [x.breakLine]: { match: me(ro), order: 1, parse: Ae, render: (i, u, l) => n("br", { key: l.key }) }, [x.breakThematic]: { match: Y(oo), order: 1, parse: Ae, render: (i, u, l) => n("hr", { key: l.key }) }, [x.codeBlock]: { match: Y(Zt), order: 0, parse: (i) => ({ lang: void 0, text: ye(i[0].replace(/^ {4}/gm, "")).replace(yt, "$1") }), render: (i, u, l) => n("pre", { key: l.key }, n("code", ae({}, i.attrs, { className: i.lang ? `lang-${i.lang}` : "" }), i.text)) }, [x.codeFenced]: { match: Y(Wt), order: 0, parse: (i) => ({ attrs: a("code", i[3] || ""), lang: i[2] || void 0, text: i[4], type: x.codeBlock }) }, [x.codeInline]: { match: oe(io), order: 3, parse: (i) => ({ text: i[2].replace(yt, "$1") }), render: (i, u, l) => n("code", { key: l.key }, i.text) }, [x.footnote]: { match: Y(lo), order: 0, parse: (i) => (c.push({ footnote: i[2], identifier: i[1] }), {}), render: ze }, [x.footnoteReference]: { match: re(co), order: 1, parse: (i) => ({ target: `#${t.slugify(i[1], fe)}`, 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)) }, [x.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" }) }, [x.heading]: { match: Y(t.enforceAtxHeadings ? Gt : jt), order: 1, parse: (i, u, l) => ({ children: Re(u, i[2], l), id: t.slugify(i[2], fe), level: i[1].length }), render: (i, u, l) => n(`h${i.level}`, { id: i.id, key: l.key }, u(i.children, l)) }, [x.headingSetext]: { match: Y(Vt), order: 0, parse: (i, u, l) => ({ children: Re(u, i[1], l), level: i[2] === "=" ? 1 : 2, type: x.heading }) }, [x.htmlBlock]: { match: me(Ve), order: 1, parse(i, u, l) {
1169
- const [, C] = i[3].match(Do), g = new RegExp(`^${C}`, "gm"), k = i[3].replace(g, ""), S = (y = k, Vo.some((P) => P.test(y)) ? Yo : Re);
1170
- var y;
1171
- const E = i[1].toLowerCase(), R = Kr.indexOf(E) !== -1, M = (R ? E : i[1]).trim(), I = { attrs: a(M, i[2]), noInnerParse: R, tag: M };
1172
- return l.inAnchor = l.inAnchor || E === "a", R ? I.text = i[3] : I.children = S(u, k, l), l.inAnchor = !1, I;
1173
- }, render: (i, u, l) => n(i.tag, ae({ key: l.key }, i.attrs), i.text || (i.children ? u(i.children, l) : "")) }, [x.htmlSelfClosing]: { match: me(Ue), order: 1, parse(i) {
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, ae({}, i.attrs, { key: l.key })) }, [x.htmlComment]: { match: me(Ut), order: 1, parse: () => ({}), render: ze }, [x.image]: { match: oe(Go), order: 1, parse: (i) => ({ alt: i[1], target: wt(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") }) }, [x.link]: { match: re(jo), order: 3, parse: (i, u, l) => ({ children: Xo(u, i[1], l), target: wt(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)) }, [x.linkAngleBraceStyleDetector]: { match: re(yo), order: 0, parse: (i) => ({ children: [{ text: i[1], type: x.text }], target: i[1], type: x.link }) }, [x.linkBareUrlDetector]: { match: pe((i, u) => u.inAnchor || t.disableAutoLink ? null : re(mo)(i, u)), order: 0, parse: (i) => ({ children: [{ text: i[1], type: x.text }], target: i[1], title: void 0, type: x.link }) }, [x.linkMailtoDetector]: { match: re(bo), order: 0, parse(i) {
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: x.text }], target: l, type: x.link };
1179
- } }, [x.orderedList]: xt(n, 1), [x.unorderedList]: xt(n, 2), [x.newlineCoalescer]: { match: Y(ao), order: 3, parse: Ae, render: () => `
1180
- ` }, [x.paragraph]: { match: pe(_o), order: 3, parse: $e, render: (i, u, l) => n("p", { key: l.key }, u(i.children, l)) }, [x.ref]: { match: re(vo), order: 0, parse: (i) => (s[i[1]] = { target: i[2], title: i[4] }, {}), render: ze }, [x.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 }, [x.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) }, [x.table]: { match: Y(Qt), order: 1, parse: Qo, render(i, u, l) {
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(g, k) {
1183
- return n("th", { key: k, style: kt(C, k) }, u(g, l));
1184
- }))), n("tbody", null, C.cells.map(function(g, k) {
1185
- return n("tr", { key: k }, g.map(function(S, y) {
1186
- return n("td", { key: y, style: kt(C, y) }, u(S, l));
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
- } }, [x.text]: { match: me(Oo), order: 4, parse: (i) => ({ text: i[0].replace(go, (u, l) => t.namedCodesToUnicode[l] ? t.namedCodesToUnicode[l] : u) }), render: (i) => i.text }, [x.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)) }, [x.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)) }, [x.textEscaped]: { match: oe(Ho), order: 1, parse: (i) => ({ text: i[1], type: x.text }) }, [x.textMarked]: { match: oe(Fo), order: 3, parse: $e, render: (i, u, l) => n("mark", { key: l.key }, u(i.children, l)) }, [x.textStrikethroughed]: { match: oe(No), order: 3, parse: $e, render: (i, u, l) => n("del", { key: l.key }, u(i.children, l)) } };
1190
- t.disableParsingRawHTML === !0 && (delete p[x.htmlBlock], delete p[x.htmlSelfClosing]);
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, g) {
1194
- let k, S, y = [], E = "", R = "";
1195
- for (g.prevCapture = g.prevCapture || ""; C; ) {
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 (E = u[M], k = i[E], g.inline && !k.match.inline) {
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, g);
1190
+ const I = k.match(C, h);
1203
1191
  if (I) {
1204
- R = I[0], g.prevCapture += R, C = C.substring(R.length), S = k.parse(I, l, g), S.type == null && (S.type = E), y.push(S);
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 g.prevCapture = "", y;
1198
+ return h.prevCapture = "", x;
1211
1199
  }
1212
- return u.sort(function(C, g) {
1213
- let k = i[C].order, S = i[g].order;
1214
- return k !== S ? k - S : C < g ? -1 : 1;
1215
- }), function(C, g) {
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), g);
1207
+ }(C), h);
1220
1208
  };
1221
- }(p), h = (b = /* @__PURE__ */ function(i, u) {
1222
- return function(l, C, g) {
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, g), l, C, g) : k(l, C, g);
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, g = [];
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 y = i(u[S], l), E = typeof y == "string";
1233
- E && k ? g[g.length - 1] += y : y !== null && g.push(y), k = E;
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, g;
1223
+ return l.key = C, h;
1236
1224
  }
1237
- return b(u, i, l);
1225
+ return m(u, i, l);
1238
1226
  });
1239
- var b;
1240
- const m = r(e);
1241
- return c.length ? n("div", null, m, n("footer", { key: "footer" }, c.map(function(i) {
1242
- return n("div", { id: t.slugify(i.identifier, fe), key: i.identifier }, i.identifier, h(d(i.footnote, { inline: !0 })));
1243
- }))) : m;
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
- return {};
1249
- var s, p, d = {}, h = Object.keys(a);
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 K.cloneElement(ti(t, n), r);
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
- `), on = /* @__PURE__ */ v("div", {
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 } = L();
1260
+ const { themeSettings: n } = R();
1275
1261
  return /* @__PURE__ */ o(ri, {
1276
1262
  theme: n,
1277
1263
  align: e,
1278
- children: /* @__PURE__ */ o(on, {
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 an({ text: e, action: t }) {
1305
- const { themeSettings: n } = L();
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 Le = /* @__PURE__ */ v("div", {
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 at() {
1325
- const { themeSettings: e } = L(), t = e.aiChat.icons.color;
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(Le, {
1316
+ /* @__PURE__ */ o(Re, {
1331
1317
  color: t
1332
1318
  }),
1333
- /* @__PURE__ */ o(Le, {
1319
+ /* @__PURE__ */ o(Re, {
1334
1320
  color: t
1335
1321
  }),
1336
- /* @__PURE__ */ o(Le, {
1322
+ /* @__PURE__ */ o(Re, {
1337
1323
  color: t
1338
1324
  }),
1339
- /* @__PURE__ */ o(Le, {
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 Ie({ children: e, align: t, onClick: n, onMouseEnter: r, onMouseLeave: a, accessibleName: c }) {
1388
- const { themeSettings: s } = L();
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 } = O();
1404
- return /* @__PURE__ */ w(G, {
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(Ie, {
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(Ie, {
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 We = In("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), sn = /* @__PURE__ */ K.createContext({});
1440
- process.env.NODE_ENV !== "production" && (sn.displayName = "DialogContext");
1441
- const pi = Be(Fn, {
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${de(n)}`],
1458
- paper: ["paper", `paperScroll${de(n)}`, `paperWidth${de(String(r))}`, a && "paperFullWidth", c && "paperFullScreen"]
1443
+ container: ["container", `scroll${ue(n)}`],
1444
+ paper: ["paper", `paperScroll${ue(n)}`, `paperWidth${ue(String(r))}`, a && "paperFullWidth", c && "paperFullScreen"]
1459
1445
  };
1460
- return $n(s, ui, t);
1461
- }, gi = Be(Nn, {
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 = Be("div", {
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${de(n.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 = Be(It, {
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${de(n.scroll)}`], t[`paperWidth${de(String(n.maxWidth))}`], n.fullWidth && t.paperFullWidth, n.fullScreen && t.paperFullScreen];
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
- [`&.${We.paperScrollBody}`]: {
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
- [`&.${We.paperScrollBody}`]: {
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
- [`&.${We.paperScrollBody}`]: {
1584
+ [`&.${Ze.paperScrollBody}`]: {
1599
1585
  margin: 0,
1600
1586
  maxWidth: "100%"
1601
1587
  }
1602
1588
  }
1603
1589
  }]
1604
- }))), ln = /* @__PURE__ */ K.forwardRef(function(t, n) {
1605
- const r = On({
1590
+ }))), cn = /* @__PURE__ */ J.forwardRef(function(t, n) {
1591
+ const r = Pn({
1606
1592
  props: t,
1607
1593
  name: "MuiDialog"
1608
- }), a = Pn(), c = {
1594
+ }), a = On(), c = {
1609
1595
  enter: a.transitions.duration.enteringScreen,
1610
1596
  exit: a.transitions.duration.leavingScreen
1611
- }, dt = r, {
1597
+ }, ut = r, {
1612
1598
  "aria-describedby": s,
1613
1599
  "aria-labelledby": p,
1614
1600
  "aria-modal": d = !0,
1615
- BackdropComponent: h,
1616
- BackdropProps: b,
1617
- children: m,
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: g = "sm",
1608
+ maxWidth: h = "sm",
1623
1609
  onBackdropClick: k,
1624
1610
  onClick: S,
1625
- onClose: y,
1626
- open: E,
1627
- PaperComponent: R = It,
1611
+ onClose: x,
1612
+ open: L,
1613
+ PaperComponent: E = Bt,
1628
1614
  PaperProps: M = {},
1629
1615
  scroll: I = "paper",
1630
- slots: P = {},
1631
- slotProps: se = {},
1632
- TransitionComponent: Q = gt,
1633
- transitionDuration: A = c,
1634
- TransitionProps: U
1635
- } = dt, F = Pe(dt, [
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
- ]), z = B(T({}, r), {
1645
+ ]), F = B(T({}, r), {
1660
1646
  disableEscapeKeyDown: u,
1661
1647
  fullScreen: l,
1662
1648
  fullWidth: C,
1663
- maxWidth: g,
1649
+ maxWidth: h,
1664
1650
  scroll: I
1665
- }), X = hi(z), _ = K.useRef(), V = (ce) => {
1666
- _.current = ce.target === ce.currentTarget;
1667
- }, q = (ce) => {
1668
- S && S(ce), _.current && (_.current = null, k && k(ce), y && y(ce, "backdropClick"));
1669
- }, j = Dn(p), te = K.useMemo(() => ({
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: Q
1673
- }, P), N = T({
1674
- transition: U,
1658
+ transition: U
1659
+ }, O), ce = T({
1660
+ transition: q,
1675
1661
  paper: M,
1676
- backdrop: b
1677
- }, se), W = {
1662
+ backdrop: m
1663
+ }, ae), N = {
1678
1664
  slots: le,
1679
- slotProps: N
1680
- }, [Se, ct] = ge("root", {
1665
+ slotProps: ce
1666
+ }, [K, Me] = Ce("root", {
1681
1667
  elementType: gi,
1682
1668
  shouldForwardComponentProp: !0,
1683
- externalForwardedProps: W,
1684
- ownerState: z,
1685
- className: De(X.root, i),
1669
+ externalForwardedProps: N,
1670
+ ownerState: F,
1671
+ className: De(Q.root, i),
1686
1672
  ref: n
1687
- }), [Me, pn] = ge("backdrop", {
1673
+ }), [dt, Te] = Ce("backdrop", {
1688
1674
  elementType: pi,
1689
1675
  shouldForwardComponentProp: !0,
1690
- externalForwardedProps: W,
1691
- ownerState: z
1692
- }), [hn, gn] = ge("paper", {
1676
+ externalForwardedProps: N,
1677
+ ownerState: F
1678
+ }), [hn, gn] = Ce("paper", {
1693
1679
  elementType: fi,
1694
1680
  shouldForwardComponentProp: !0,
1695
- externalForwardedProps: W,
1696
- ownerState: z,
1697
- className: De(X.paper, M.className)
1698
- }), [Cn, fn] = ge("container", {
1681
+ externalForwardedProps: N,
1682
+ ownerState: F,
1683
+ className: De(Q.paper, M.className)
1684
+ }), [Cn, fn] = Ce("container", {
1699
1685
  elementType: Ci,
1700
- externalForwardedProps: W,
1701
- ownerState: z,
1702
- className: De(X.container)
1703
- }), [mn, bn] = ge("transition", {
1704
- elementType: gt,
1705
- externalForwardedProps: W,
1706
- ownerState: z,
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: E,
1710
- timeout: A,
1695
+ in: L,
1696
+ timeout: Z,
1711
1697
  role: "presentation"
1712
1698
  }
1713
1699
  });
1714
- return /* @__PURE__ */ Ce(Se, B(T(T({
1700
+ return /* @__PURE__ */ fe(K, B(T(T({
1715
1701
  closeAfterTransition: !0,
1716
1702
  slots: {
1717
- backdrop: Me
1703
+ backdrop: dt
1718
1704
  },
1719
1705
  slotProps: {
1720
1706
  backdrop: T({
1721
- transitionDuration: A,
1722
- as: h
1723
- }, pn)
1707
+ transitionDuration: Z,
1708
+ as: g
1709
+ }, Te)
1724
1710
  },
1725
1711
  disableEscapeKeyDown: u,
1726
- onClose: y,
1727
- open: E,
1728
- onClick: q
1729
- }, ct), F), {
1730
- children: /* @__PURE__ */ Ce(mn, B(T({}, bn), {
1731
- children: /* @__PURE__ */ Ce(Cn, B(T({
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__ */ Ce(hn, B(T({
1735
- as: R,
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__ */ Ce(sn.Provider, {
1728
+ children: /* @__PURE__ */ fe(ln.Provider, {
1743
1729
  value: te,
1744
- children: m
1730
+ children: b
1745
1731
  })
1746
1732
  }))
1747
1733
  }))
1748
1734
  }))
1749
1735
  }));
1750
1736
  });
1751
- process.env.NODE_ENV !== "production" && (ln.propTypes = {
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 cn = {
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
- }, we = /* @__PURE__ */ v(Bt, bi, {
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 : cn.interaction.defaultHover
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 st = (e) => Nt(e.chart.backgroundColor), ki = ({ title: e }) => {
2082
- const { themeSettings: t } = L();
2083
- return /* @__PURE__ */ o(ke, {
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(we, {
2071
+ children: /* @__PURE__ */ o(Se, {
2086
2072
  disableTouchRipple: !0,
2087
- $hoverColor: st(t),
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] = D(null), r = (s) => {
2080
+ const [t, n] = $(null), r = (s) => {
2095
2081
  n(s.currentTarget);
2096
2082
  }, a = () => {
2097
2083
  n(null);
2098
- }, { themeSettings: c } = L();
2099
- return /* @__PURE__ */ w(G, {
2084
+ }, { themeSettings: c } = R();
2085
+ return /* @__PURE__ */ w(W, {
2100
2086
  children: [
2101
- /* @__PURE__ */ o(we, {
2087
+ /* @__PURE__ */ o(Se, {
2102
2088
  onClick: r,
2103
- $hoverColor: st(c),
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: cn.text.content
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 } = L(), { t: n } = O();
2144
- return /* @__PURE__ */ o(ke, {
2129
+ const { themeSettings: t } = R(), { t: n } = P();
2130
+ return /* @__PURE__ */ o(we, {
2145
2131
  title: n("ai.preview"),
2146
- children: /* @__PURE__ */ o(we, {
2132
+ children: /* @__PURE__ */ o(Se, {
2147
2133
  onClick: e,
2148
- $hoverColor: st(t),
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 = Z(() => [
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] = D(!1), { themeSettings: r } = L(), { inlineElement: a, expandedElement: c } = Z(() => {
2185
- const s = Fe(e, {
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 || !je(s))
2189
- throw new Ze("errors.otherWidgetTypesNotSupported");
2190
- const { detailedDescription: p } = e, { styleOptions: d } = s, h = {
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 b, m;
2201
- if (Xn(s.chartType))
2202
- b = /* @__PURE__ */ o("div", {
2186
+ let m, b;
2187
+ if (Yn(s.chartType))
2188
+ m = /* @__PURE__ */ o("div", {
2203
2189
  className: "csdk-h-[245px]",
2204
- children: /* @__PURE__ */ o(be, B(T({}, s), {
2205
- styleOptions: h
2190
+ children: /* @__PURE__ */ o(ye, B(T({}, s), {
2191
+ styleOptions: g
2206
2192
  }))
2207
- }), m = /* @__PURE__ */ o(be, B(T({}, s), {
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
- }), h);
2224
- delete u.legend, delete u.xAxis, delete u.yAxis, b = /* @__PURE__ */ o("div", {
2225
- children: /* @__PURE__ */ o(be, B(T({}, s), {
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
- }), m = /* @__PURE__ */ o(be, B(T({}, s), {
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: b,
2236
- expandedElement: m
2221
+ inlineElement: m,
2222
+ expandedElement: b
2237
2223
  };
2238
2224
  }, [
2239
2225
  e
2240
2226
  ]);
2241
- return /* @__PURE__ */ w(G, {
2227
+ return /* @__PURE__ */ w(W, {
2242
2228
  children: [
2243
2229
  a,
2244
- /* @__PURE__ */ w(ln, {
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(Bt, {
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 } = L(), { t: r } = O();
2298
- return /* @__PURE__ */ o(ke, {
2283
+ const { themeSettings: n } = R(), { t: r } = P();
2284
+ return /* @__PURE__ */ o(we, {
2299
2285
  title: r("ai.buttons.incorrectResponse"),
2300
- children: /* @__PURE__ */ o(we, {
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 } = L(), { t: r } = O();
2328
- return /* @__PURE__ */ o(ke, {
2313
+ const { themeSettings: n } = R(), { t: r } = P();
2314
+ return /* @__PURE__ */ o(we, {
2329
2315
  title: r("ai.buttons.correctResponse"),
2330
- children: /* @__PURE__ */ o(we, {
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] = D(!1), n = ue(null), r = H(() => {
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] = D(!1), a = H((s) => {
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 Qe({ sourceId: e, data: t, type: n, buttonVisibility: r = "onHover", renderContent: a }) {
2382
- const c = J(), s = Wn(H((m) => {
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: m
2373
+ rating: b
2388
2374
  });
2389
2375
  }, [
2390
2376
  c,
2391
2377
  e,
2392
2378
  t,
2393
2379
  n
2394
- ]), 200), [p, d] = Fi(), h = Z(() => r === "onHover" ? d : r !== "never", [
2380
+ ]), 200), [p, d] = Fi(), g = z(() => r === "onHover" ? d : r !== "never", [
2395
2381
  d,
2396
2382
  r
2397
- ]), { themeSettings: b } = L();
2383
+ ]), { themeSettings: m } = R();
2398
2384
  return /* @__PURE__ */ o(Ni, {
2399
2385
  ref: p,
2400
- theme: b,
2386
+ theme: m,
2401
2387
  children: a(/* @__PURE__ */ o(Hi, {
2402
2388
  onSend: s,
2403
- visible: h
2389
+ visible: g
2404
2390
  }))
2405
2391
  });
2406
2392
  }
2407
- const Oi = 18 * 5;
2408
- function lt({ text: e }) {
2409
- const [t, n] = D(!0), [r, a] = D(!1), { t: c } = O(), s = ue(null);
2410
- return Ee(() => {
2411
- s.current && s.current.scrollHeight > Oi && a(!0);
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 Pi({ nlgRequest: e }) {
2433
- const { data: t, isLoading: n, isError: r } = Ne(e), { t: a } = O();
2434
- return n ? /* @__PURE__ */ o(at, {}) : r ? /* @__PURE__ */ o(ie, {
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(lt, {
2425
+ children: /* @__PURE__ */ o(ct, {
2440
2426
  text: t != null ? t : a("ai.errors.insightsNotAvailable")
2441
2427
  })
2442
2428
  });
2443
2429
  }
2444
- function Di() {
2445
- const { themeSettings: e } = L();
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 $i({ onClick: e }) {
2461
- const { t } = O();
2462
- return /* @__PURE__ */ o(Ie, {
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(Di, {}),
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 St = /* @__PURE__ */ v("div", {
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 } = L(), { queryTitle: c, chartRecommendations: s, jaql: p, userMsg: d, clarification: h = "" } = e;
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 b = "chartType" in s ? s.chartType : "table";
2483
- let m;
2484
- zi(b) ? m = `an ${b}` : m = `a ${b}`, b !== "table" && (m += " chart");
2485
- const i = p.datasource.title, [u, l] = D(!1), C = H(() => {
2486
- l((y) => !y);
2487
- }, []), g = {
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 && h ? `
2493
- ` : ""}${h}`;
2494
- return /* @__PURE__ */ w(G, {
2478
+ }, k = n === "analyze", S = `${d}${d && g ? `
2479
+ ` : ""}${g}`;
2480
+ return /* @__PURE__ */ w(W, {
2495
2481
  children: [
2496
- /* @__PURE__ */ o(Qe, {
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: (y) => /* @__PURE__ */ w(G, {
2487
+ renderContent: (x) => /* @__PURE__ */ w(W, {
2502
2488
  children: [
2503
- /* @__PURE__ */ w(St, {
2489
+ /* @__PURE__ */ w(Mt, {
2504
2490
  children: [
2505
- /* @__PURE__ */ o(on, {
2491
+ /* @__PURE__ */ o(an, {
2506
2492
  align: "left",
2507
2493
  theme: a,
2508
- children: S || `Here's ${m} showing ${Ai(c)}.`
2494
+ children: S || `Here's ${b} showing ${Ai(c)}.`
2509
2495
  }),
2510
- y
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(Qe, {
2505
+ r && /* @__PURE__ */ o(_e, {
2520
2506
  sourceId: i,
2521
- data: g,
2507
+ data: h,
2522
2508
  type: "nlg/queryResult",
2523
2509
  buttonVisibility: u ? "onHover" : "never",
2524
- renderContent: (y) => /* @__PURE__ */ w(G, {
2510
+ renderContent: (x) => /* @__PURE__ */ w(W, {
2525
2511
  children: [
2526
- /* @__PURE__ */ w(St, {
2512
+ /* @__PURE__ */ w(Mt, {
2527
2513
  children: [
2528
- /* @__PURE__ */ o($i, {
2514
+ /* @__PURE__ */ o(Di, {
2529
2515
  onClick: C
2530
2516
  }),
2531
- y
2517
+ x
2532
2518
  ]
2533
2519
  }),
2534
- u && /* @__PURE__ */ o(Pi, {
2535
- nlgRequest: g
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 (rt(e)) {
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 } = O();
2563
- return /* @__PURE__ */ o(G, {
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 dn({ color: e }) {
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(dn, {
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 Mt({ question: e, onClick: t }) {
2628
- const { themeSettings: n } = L();
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 } = O(), [r, a] = D(!0), c = Z(() => r && e.length > 5 ? e.slice(0, 4) : e, [
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 } = L();
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(Mt, {
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(Mt, {
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 } = L();
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(G, {
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, ";"), un = /* @__PURE__ */ ir(function({ title: t, leftNav: n, rightNav: r, style: a }, c) {
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 } = O();
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 } = L();
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 Yn(e);
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 } = L();
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(Et, {
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: "ednrf320",
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: "ednrf321",
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: "ednrf322",
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 j, te, le;
2793
- const { t: r } = O(), { enableFollowupQuestions: a, enableHeader: c, numOfRecentPrompts: s, numOfRecommendations: p } = ee(), { themeSettings: d } = L(), { data: h, isLoading: b, isError: m } = Pt({
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
- }), i = Z(() => h == null ? void 0 : h.map((N) => N.nlqPrompt), [
2797
- h
2798
- ]), { history: u, lastNlqResponse: l, isAwaitingResponse: C, sendMessage: g, isLoading: k, chatId: S, lastError: y } = Tr(e, n), { mutate: E, isLoading: R } = At(S), [M, I] = D(!1), [P, se] = D(!1), Q = () => I(!0), A = () => I(!1), U = () => {
2799
- E(), A();
2800
- }, F = ue(null), z = ue(null), X = () => {
2801
- if (!(F != null && F.current))
2802
- return;
2803
- const { scrollTop: N, clientHeight: W, scrollHeight: Se } = F.current;
2804
- if (N === void 0 || W === void 0 || Se === void 0)
2805
- return;
2806
- const Me = Se - N - W > W / 2;
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
- Ee(() => {
2794
+ Ie(() => {
2810
2795
  F.current && (F.current.scrollTop = F.current.scrollHeight);
2811
2796
  }, [
2812
- u,
2813
- M,
2814
- C
2797
+ l,
2798
+ I,
2799
+ h
2815
2800
  ]);
2816
- const _ = ue(null), V = c ? /* @__PURE__ */ o(un, {
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: d.aiChat.header.textColor
2806
+ color: g.aiChat.header.textColor
2822
2807
  }),
2823
- style: d.aiChat.header
2824
- }) : null, q = Z(() => [
2825
- ...new Set(u.filter((N) => N.role === "user").filter((N) => !(i != null && i.includes(N.content))).map((N) => N.content).reverse())
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
- u,
2812
+ l,
2828
2813
  s,
2829
- i
2814
+ u
2830
2815
  ]);
2831
- return (y == null ? void 0 : y.message) === r("ai.errors.chatUnavailable") ? /* @__PURE__ */ w(G, {
2816
+ return (L == null ? void 0 : L.message) === r("ai.errors.chatUnavailable") ? /* @__PURE__ */ w(W, {
2832
2817
  children: [
2833
- c && V,
2834
- /* @__PURE__ */ o(an, {
2835
- text: y.message
2818
+ c && D,
2819
+ /* @__PURE__ */ o(sn, {
2820
+ text: L.message
2836
2821
  })
2837
2822
  ]
2838
- }) : /* @__PURE__ */ w(G, {
2823
+ }) : /* @__PURE__ */ w(W, {
2839
2824
  children: [
2840
- V,
2825
+ D,
2841
2826
  /* @__PURE__ */ w(c1, {
2842
2827
  ref: F,
2843
- theme: d,
2844
- onScroll: X,
2828
+ theme: g,
2829
+ onScroll: _,
2845
2830
  children: [
2846
2831
  /* @__PURE__ */ o(l1, {
2847
- isVisible: P,
2848
- anchorElement: z.current,
2832
+ isVisible: ae,
2833
+ anchorElement: Q.current,
2849
2834
  onClick: () => {
2850
- var N, W;
2851
- (W = F.current) == null || W.scroll({
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: i || [],
2844
+ questions: u || [],
2860
2845
  isLoading: b,
2861
- onSelection: g
2846
+ onSelection: k
2862
2847
  }),
2863
- y && /* @__PURE__ */ o(ie, {
2848
+ L && /* @__PURE__ */ o(ie, {
2864
2849
  align: "left",
2865
- children: y.message
2850
+ children: L.message
2866
2851
  }),
2867
- k ? /* @__PURE__ */ o(He, {}) : /* @__PURE__ */ o(Gi, {
2868
- messages: u
2852
+ S ? /* @__PURE__ */ o(Pe, {}) : /* @__PURE__ */ o(Gi, {
2853
+ messages: l
2869
2854
  }),
2870
- a && l && ((te = (j = l.followupQuestions) == null ? void 0 : j.length) != null ? te : 0) > 0 && /* @__PURE__ */ o(u1, {
2871
- theme: d,
2872
- children: (le = l.followupQuestions) == null ? void 0 : le.slice(0, 2).map((N, W) => /* @__PURE__ */ o(Ie, {
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
- g(N);
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
- }, W))
2866
+ }, K))
2882
2867
  }),
2883
- (C || R) && /* @__PURE__ */ o(at, {}),
2884
- M && /* @__PURE__ */ o(di, {
2885
- onCancel: A,
2886
- onConfirm: U
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: z,
2892
- theme: d,
2876
+ ref: Q,
2877
+ theme: g,
2893
2878
  children: [
2894
2879
  /* @__PURE__ */ o(Qr, {
2895
- onSendMessage: g,
2896
- disabled: C || k,
2897
- onClearHistoryClick: Q,
2898
- suggestions: i || [],
2899
- recentPrompts: q,
2900
- isLoading: b || k,
2901
- recommendationsError: m,
2902
- onChange: A
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: d
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 }) => Nt(e.aiChat.dataTopics.items.textColor, 0, 0.5), ";"), f1 = /* @__PURE__ */ v("div", {
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 } = L();
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(dn, {
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 } = L(), { t: r } = O();
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__ */ er(m1, B(T({}, a), {
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 } = L(), { t: a } = O(), c = Z(() => e == null ? void 0 : e.map((p) => ({
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(G, {
3061
+ return /* @__PURE__ */ w(W, {
3077
3062
  children: [
3078
- n ? /* @__PURE__ */ o(un, {
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(He, {}),
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] = D(), [n, r] = D(), { data: a, fetchStatus: c } = xr(), { dataTopicsList: s, contextDetails: p } = ee(), { t: d } = O(), h = d("ai.errors.noAvailableDataTopics"), b = H((l) => {
3101
- l.length ? l.length === 1 && (r(void 0), t(l[0])) : r(h);
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
- h
3104
- ]), m = Z(() => {
3088
+ g
3089
+ ]), b = z(() => {
3105
3090
  if (a && c === "idle") {
3106
- const C = (s != null && s.length ? a == null ? void 0 : a.filter((g) => s == null ? void 0 : s.includes(g.title)) : a).map((g) => g.title);
3107
- return b(C), C;
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
- b
3115
- ]), i = xe(), u = H(() => {
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(an, {
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
- }) : m.length === 1 && !e ? /* @__PURE__ */ o(He, {}) : e ? /* @__PURE__ */ o(p1, {
3113
+ }) : b.length === 1 && !e ? /* @__PURE__ */ o(Pe, {}) : e ? /* @__PURE__ */ o(p1, {
3129
3114
  contextTitle: e,
3130
3115
  contextDetails: p,
3131
- onGoBack: m.length === 1 ? void 0 : () => t(void 0)
3116
+ onGoBack: b.length === 1 ? void 0 : () => t(void 0)
3132
3117
  }) : /* @__PURE__ */ o(L1, {
3133
- dataTopicsList: m,
3118
+ dataTopicsList: b,
3134
3119
  onDataTopicClick: (l) => t(l)
3135
3120
  });
3136
3121
  }
3137
- const V1 = Ft({
3122
+ const V1 = Nt({
3138
3123
  componentName: "Chatbot"
3139
3124
  })((e) => {
3140
- const { width: t, height: n, config: r } = e, { themeSettings: a } = L();
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 = Ft({
3137
+ }), U1 = Nt({
3153
3138
  componentName: "GetNlgInsights"
3154
3139
  })(function(t) {
3155
- const { data: n, isLoading: r, isError: a } = Ne(t), { t: c } = O();
3140
+ const { data: n, isLoading: r, isError: a } = He(t), { t: c } = P();
3156
3141
  if (a)
3157
- return /* @__PURE__ */ o(G, {
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(lt, {
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 } = L();
3203
- return /* @__PURE__ */ o(Qe, {
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(lt, {
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 = Gn(e.queryTitle);
3226
- const { connectToWidgetProps: a } = Vn({
3210
+ e.queryTitle = Vn(e.queryTitle);
3211
+ const { connectToWidgetProps: a } = Un({
3227
3212
  initialFilters: r
3228
- }), [c, s] = D(null);
3229
- ve(() => {
3230
- const m = Fe(e, {
3213
+ }), [c, s] = $(null);
3214
+ ke(() => {
3215
+ const b = Ne(e, {
3231
3216
  useCustomizedStyleOptions: !0
3232
3217
  });
3233
- if (!m)
3234
- s(null);
3218
+ if (!b) s(null);
3235
3219
  else {
3236
- n && m.styleOptions && (m.styleOptions = rr(m.styleOptions, n));
3237
- const i = a(m, {
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 = Z(() => {
3249
- const m = c && je(c) ? Un(c == null ? void 0 : c.filters) : [], i = e.jaql.metadata.filter((u) => !u.jaql.filter).concat(m.filter((u) => !u.config.disabled).map((u) => u.jaql()));
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: h, isError: b } = Ne(p);
3260
- return h || !c ? /* @__PURE__ */ o(at, {}) : je(c) ? /* @__PURE__ */ o(be, B(T({}, c), {
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 && !b && /* @__PURE__ */ o(F1, {
3247
+ topSlot: d && !m && /* @__PURE__ */ o(F1, {
3264
3248
  nlgRequest: p,
3265
3249
  summary: d
3266
3250
  })
3267
- })) : /* @__PURE__ */ o(G, {});
3268
- }, N1 = new Lt({
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(Ye.Provider, {
3262
+ children: /* @__PURE__ */ o(et.Provider, {
3279
3263
  value: t == null ? void 0 : t.api,
3280
- children: /* @__PURE__ */ o(Rt, {
3264
+ children: /* @__PURE__ */ o(Et, {
3281
3265
  client: N1,
3282
3266
  children: e
3283
3267
  })