@sisense/sdk-ui-vue 2.1.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ai.js CHANGED
@@ -1,22 +1,22 @@
1
- import { inject as oa, ref as ht, defineComponent as ze, watchEffect as mt, provide as na, watch as Ze, toRefs as Re } from "vue";
2
- import { ax as bt, ay as ye, az as la, aA as _e, aB as da, aC as sa, aD as ee, aE as V, aF as ft, aG as b, aH as xt, aI as k, aJ as i, aK as C, aL as j, aM as De, aN as O, aO as de, aP as _, aQ as kt, aR as ca, aS as pa, aT as ga, aU as $, aV as ua, aW as oe, aX as Ie, aY as We, aZ as ha, a_ as ma, a$ as ba, b0 as u, b1 as T, b2 as fa, b3 as xa, b4 as I, b5 as ke, b6 as h, b7 as se, b8 as ka, b9 as wa, ba as ya, bb as _a, bc as ce, bd as le, be as Ca, bf as va, bg as wt, bh as Sa, bi as Ma, bj as Da, bk as Ia, bl as yt, bm as Aa, bn as La, bo as Ta, bp as Na, bq as _t, br as ja, bs as Oa, bt as Ae, bu as Ea, bv as za, bw as Je, bx as Za, by as Ra, bz as Wa, bA as Ct, bB as ne, bC as vt, bD as Te, bE as Ga, bF as qa, bG as Ha, bH as Pa, bI as Ya, bJ as Ba, bK as Qa, ak as he, bL as St, bM as Ua, bN as Fa, bO as Va, bP as Mt, bQ as Dt, bR as $a, bS as Ja, w as Xa, bT as Ka, a as It, bU as At, x as Ge, v as qe, y as He, C as te, a1 as Pe } from "./use-tracking-f0a32d92.js";
3
- var er = Object.defineProperty, tr = Object.defineProperties, ar = Object.getOwnPropertyDescriptors, Xe = Object.getOwnPropertySymbols, rr = Object.prototype.hasOwnProperty, ir = Object.prototype.propertyIsEnumerable, Ke = (e, t, a) => t in e ? er(e, t, {
1
+ import { inject as ra, ref as ht, defineComponent as ze, watchEffect as mt, provide as ia, watch as Ze, toRefs as Re } from "vue";
2
+ import { ax as bt, ay as ye, az as oa, aA as _e, aB as na, aC as la, aD as ee, aE as V, aF as ft, aG as b, aH as xt, aI as k, aJ as i, aK as C, aL as j, aM as De, aN as O, aO as de, aP as _, aQ as kt, aR as da, aS as sa, aT as ca, aU as J, aV as pa, aW as oe, aX as Ie, aY as We, aZ as ga, a_ as ua, a$ as ha, b0 as u, b1 as T, b2 as ma, b3 as ba, b4 as I, b5 as ke, b6 as h, b7 as se, b8 as fa, b9 as xa, ba as ka, bb as wa, bc as ce, bd as le, be as ya, bf as _a, bg as wt, bh as Ca, bi as va, bj as Sa, bk as Ma, bl as yt, bm as Da, bn as Ia, bo as Aa, bp as La, bq as _t, br as Ta, bs as Na, bt as Ae, bu as ja, bv as Oa, bw as $e, bx as Ea, by as za, bz as Za, bA as Ct, bB as ne, bC as vt, bD as Te, bE as Ra, bF as Wa, bG as qa, bH as Ga, bI as Ya, bJ as Pa, bK as Ha, bL as Qa, ak as he, bM as Ba, bN as Ua, bO as Fa, bP as Va, bQ as St, bR as Mt, bS as pe, bT as Ja, bU as $a, bV as Xa, bW as Ka, C as er, bX as tr, a as Dt, bY as It, D as qe, A as Ge, E as Ye, I as te, a1 as Pe } from "./use-tracking-95bdb64e.js";
3
+ var ar = Object.defineProperty, rr = Object.defineProperties, ir = Object.getOwnPropertyDescriptors, Xe = Object.getOwnPropertySymbols, or = Object.prototype.hasOwnProperty, nr = Object.prototype.propertyIsEnumerable, Ke = (e, t, a) => t in e ? ar(e, t, {
4
4
  enumerable: !0,
5
5
  configurable: !0,
6
6
  writable: !0,
7
7
  value: a
8
8
  }) : e[t] = a, D = (e, t) => {
9
9
  for (var a in t || (t = {}))
10
- rr.call(t, a) && Ke(e, a, t[a]);
10
+ or.call(t, a) && Ke(e, a, t[a]);
11
11
  if (Xe)
12
12
  for (var a of Xe(t))
13
- ir.call(t, a) && Ke(e, a, t[a]);
13
+ nr.call(t, a) && Ke(e, a, t[a]);
14
14
  return e;
15
- }, B = (e, t) => tr(e, ar(t));
16
- class Lt extends vt {
15
+ }, Q = (e, t) => rr(e, ir(t));
16
+ class At extends vt {
17
17
  constructor(t, a) {
18
18
  var r;
19
- super((r = t.jaql.title) !== null && r !== void 0 ? r : "", a), this.expression = t.jaql.dim || t.jaql.formula, this.metadataItem = t, t.jaql.agg ? this.aggregation = t.jaql.agg : delete this.aggregation, t.jaql.formula ? this.formula = t.jaql.formula : delete this.formula, t.jaql.sort ? this.sortType = Ha(t.jaql.sort) : delete this.sortType, this.skipValidation = !0;
19
+ super((r = t.jaql.title) !== null && r !== void 0 ? r : "", a), this.expression = t.jaql.dim || t.jaql.formula, this.metadataItem = t, t.jaql.agg ? this.aggregation = t.jaql.agg : delete this.aggregation, t.jaql.formula ? this.formula = t.jaql.formula : delete this.formula, t.jaql.sort ? this.sortType = qa(t.jaql.sort) : delete this.sortType, this.skipValidation = !0;
20
20
  }
21
21
  get id() {
22
22
  return this.expression;
@@ -32,52 +32,55 @@ class Lt extends vt {
32
32
  return t.__serializable = "JaqlElement", t.metadataItem = this.metadataItem, t.type = this.type, t;
33
33
  }
34
34
  }
35
- const or = {
35
+ const lr = {
36
36
  text: De.TextAttribute,
37
37
  numeric: De.NumericAttribute,
38
38
  datetime: De.DateLevel
39
39
  };
40
- function nr(e) {
40
+ function dr(e) {
41
41
  var t;
42
- return new Lt(e, (t = or[e.jaql.datatype]) !== null && t !== void 0 ? t : "numeric");
42
+ return new At(e, (t = lr[e.jaql.datatype]) !== null && t !== void 0 ? t : "numeric");
43
43
  }
44
- function Tt(e) {
44
+ function Lt(e) {
45
45
  const {
46
46
  jaql: t
47
47
  } = e;
48
- return t.formula ? Pa(t) : "agg" in t && t.dim && t.datatype ? Ya({
48
+ if (t.formula)
49
+ return Ga(t);
50
+ const a = Ya.translateJaqlToGranularity(t);
51
+ return "agg" in t && t.dim && t.datatype ? Pa({
49
52
  expression: t.dim,
50
53
  dataType: t.datatype,
51
54
  agg: t.agg || "",
52
- granularity: t.level,
55
+ granularity: a,
53
56
  format: void 0,
54
57
  sort: t.sort,
55
58
  title: t.title,
56
59
  dataSource: t.datasource
57
- }) : t.dim && t.datatype ? Ba({
60
+ }) : t.dim && t.datatype ? Ha({
58
61
  expression: t.dim,
59
62
  dataType: t.datatype,
60
- granularity: t.level,
63
+ granularity: a,
61
64
  sort: t.sort,
62
65
  title: t.title,
63
66
  panel: e.panel,
64
67
  dataSource: t.datasource
65
- }) : nr(e);
68
+ }) : dr(e);
66
69
  }
67
- const lr = (e) => "dashboardOid" in e && "widgetOid" in e;
68
- function dr(e) {
70
+ const sr = (e) => "dashboardOid" in e && "widgetOid" in e;
71
+ function cr(e) {
69
72
  return e.replace(/\s+/g, "-").replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
70
73
  }
71
- function sr(e) {
74
+ function pr(e) {
72
75
  return !e || !e.jaql.datasource.title || !e.jaql.metadata.length;
73
76
  }
74
- function Nt(e) {
75
- if (![...Na, "pivot", "pivot2"].includes(e))
77
+ function Tt(e) {
78
+ if (![...La, "pivot", "pivot2"].includes(e))
76
79
  throw new le("errors.chartTypeNotSupported", {
77
80
  chartType: e
78
81
  });
79
82
  }
80
- function cr(e) {
83
+ function gr(e) {
81
84
  return "widgetType" in e && e.widgetType === "pivot";
82
85
  }
83
86
  function K(e) {
@@ -86,12 +89,12 @@ function K(e) {
86
89
  }
87
90
  function et(e) {
88
91
  const t = "measures" in e && Z(e.measures) || "values" in e && Z(e.values);
89
- return cr(e) ? "values" in e.dataOptions && Z(e.dataOptions.values) : "chartType" in e ? e.chartType === "indicator" ? "value" in e.dataOptions && Z(e.dataOptions.value) || "secondary" in e.dataOptions && Z(e.dataOptions.secondary) : e.chartType === "table" ? !("columns" in e.dataOptions) || !Z(e.dataOptions.columns) ? !1 : e.dataOptions.columns.some((a) => K(a)) : e.chartType === "boxplot" ? !1 : e.chartType === "scatter" ? "x" in e.dataOptions && e.dataOptions.x !== void 0 && K(e.dataOptions.x) || "y" in e.dataOptions && e.dataOptions.y !== void 0 && K(e.dataOptions.y) || "size" in e.dataOptions && e.dataOptions.size !== void 0 : e.chartType === "scattermap" ? "colorBy" in e.dataOptions && e.dataOptions.colorBy !== void 0 && K(e.dataOptions.colorBy) || "details" in e.dataOptions && e.dataOptions.details !== void 0 && K(e.dataOptions.details) || "size" in e.dataOptions && e.dataOptions.size !== void 0 && K(e.dataOptions.size) : e.chartType === "areamap" ? "geo" in e.dataOptions && Z(e.dataOptions.geo) && "color" in e.dataOptions && Z(e.dataOptions.color) : "value" in e.dataOptions && Z(e.dataOptions.value) : t;
92
+ return gr(e) ? "values" in e.dataOptions && Z(e.dataOptions.values) : "chartType" in e ? e.chartType === "indicator" ? "value" in e.dataOptions && Z(e.dataOptions.value) || "secondary" in e.dataOptions && Z(e.dataOptions.secondary) : e.chartType === "table" ? !("columns" in e.dataOptions) || !Z(e.dataOptions.columns) ? !1 : e.dataOptions.columns.some((a) => K(a)) : e.chartType === "boxplot" ? !1 : e.chartType === "scatter" ? "x" in e.dataOptions && e.dataOptions.x !== void 0 && K(e.dataOptions.x) || "y" in e.dataOptions && e.dataOptions.y !== void 0 && K(e.dataOptions.y) || "size" in e.dataOptions && e.dataOptions.size !== void 0 : e.chartType === "scattermap" ? "colorBy" in e.dataOptions && e.dataOptions.colorBy !== void 0 && K(e.dataOptions.colorBy) || "details" in e.dataOptions && e.dataOptions.details !== void 0 && K(e.dataOptions.details) || "size" in e.dataOptions && e.dataOptions.size !== void 0 && K(e.dataOptions.size) : e.chartType === "areamap" ? "geo" in e.dataOptions && Z(e.dataOptions.geo) && "color" in e.dataOptions && Z(e.dataOptions.color) : "value" in e.dataOptions && Z(e.dataOptions.value) : t;
90
93
  }
91
94
  function Z(e) {
92
95
  return Array.isArray(e) && e.length > 0;
93
96
  }
94
- function pr(e) {
97
+ function ur(e) {
95
98
  const t = e.split(`
96
99
  `);
97
100
  for (let a = 0; a < t.length - 1; a++)
@@ -105,7 +108,7 @@ function pr(e) {
105
108
  return t.join(`
106
109
  `);
107
110
  }
108
- const gr = {
111
+ const hr = {
109
112
  react: {
110
113
  baseChartTmpl: `import { {{componentString}} } from '@sisense/sdk-ui';
111
114
  {{extraImportsString}}
@@ -564,10 +567,10 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
564
567
  </template>`,
565
568
  dashboardTmpl: "/** COMING SOON */"
566
569
  }
567
- }, jt = (e, t) => gr[t][e].replace(/{{(.*?)Tmpl}}/g, (a, r) => jt(`${r}Tmpl`, t)), ur = (e, t) => e.replace(/{{(.*?)}}/g, (a, r) => r in t ? t[r] : (console.warn(`Placeholder ${r} not found in data`), a)), Ne = (e, t, a = "react") => {
568
- const r = jt(e, a);
569
- return pr(ur(r, t));
570
- }, hr = () => Object.values(Va).map((e) => Mt.aggregationToJAQL(e)).join("|"), Ot = (e) => {
570
+ }, Nt = (e, t) => hr[t][e].replace(/{{(.*?)Tmpl}}/g, (a, r) => Nt(`${r}Tmpl`, t)), mr = (e, t) => e.replace(/{{(.*?)}}/g, (a, r) => r in t ? t[r] : (console.warn(`Placeholder ${r} not found in data`), a)), Ne = (e, t, a = "react") => {
571
+ const r = Nt(e, a);
572
+ return ur(mr(r, t));
573
+ }, br = () => Object.values(Va).map((e) => St.aggregationToJAQL(e)).join("|"), jt = (e) => {
571
574
  const {
572
575
  formula: t,
573
576
  context: a,
@@ -581,7 +584,7 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
581
584
  const n = o[0];
582
585
  if (typeof n != "string")
583
586
  return e;
584
- const l = a[`${n}`], d = hr(), s = new RegExp(`^\\s*(${d})\\(\\[\\w+\\]\\)$`), c = t.match(s);
587
+ const l = a[`${n}`], d = br(), s = new RegExp(`^\\s*(${d})\\(\\[\\w+\\]\\)$`), c = t.match(s);
585
588
  if (c && t.includes(n)) {
586
589
  const g = c[1];
587
590
  return D({
@@ -598,14 +601,14 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
598
601
  return e;
599
602
  }, fe = (e) => {
600
603
  let t = e;
601
- if ("formula" in e && (t = Ot(e)), "context" in t) {
604
+ if ("formula" in e && (t = jt(e)), "context" in t) {
602
605
  const a = D({}, t.context);
603
606
  Object.keys(a).forEach((r) => {
604
607
  a[`${r}`] = fe(a[`${r}`]);
605
608
  }), t.context = a;
606
609
  }
607
610
  return t;
608
- }, mr = (e) => {
611
+ }, fr = (e) => {
609
612
  var t;
610
613
  const a = e;
611
614
  if (a.panel !== "scope")
@@ -613,18 +616,18 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
613
616
  const {
614
617
  jaql: r
615
618
  } = a;
616
- return (t = r.filter) != null && t.by && (r.filter.by = Ot(r.filter.by)), B(D({}, a), {
619
+ return (t = r.filter) != null && t.by && (r.filter.by = jt(r.filter.by)), Q(D({}, a), {
617
620
  jaql: r
618
621
  });
619
- }, br = (e) => {
622
+ }, xr = (e) => {
620
623
  let t = e;
621
- t = mr(t);
624
+ t = fr(t);
622
625
  const {
623
626
  jaql: a,
624
627
  measure: r,
625
628
  by: o
626
629
  } = t;
627
- return D(D(B(D({}, t), {
630
+ return D(D(Q(D({}, t), {
628
631
  jaql: fe(a)
629
632
  }), o ? {
630
633
  by: fe(o)
@@ -632,19 +635,19 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
632
635
  measure: fe(r)
633
636
  } : {});
634
637
  }, xe = 6, me = `
635
- `, je = "UNKNOWN", fr = (e, t) => {
638
+ `, je = "UNKNOWN", kr = (e, t) => {
636
639
  let a = "";
637
640
  return a += `measureFactory.customFormula(
638
641
  `, a += " ".repeat(t), a += ` '${ne(e.title)}',
639
642
  `, a += " ".repeat(t), a += ` '${e.formula}',
640
643
  `, a += " ".repeat(t), a += ` {
641
644
  `, Object.entries(e.context).forEach(([r, o]) => {
642
- const n = Dt(o.table || je, o.column || je, void 0, "DM");
645
+ const n = Mt(o.table || je, o.column || je, void 0, "DM");
643
646
  a += " ".repeat(t), a += ` '${r.slice(1, -1)}': ${n},
644
647
  `;
645
648
  }), a += " ".repeat(t), a += ` }
646
649
  `, a += " ".repeat(t), a += ")", a;
647
- }, xr = (e) => {
650
+ }, wr = (e) => {
648
651
  const {
649
652
  level: t,
650
653
  table: a,
@@ -653,108 +656,108 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
653
656
  title: n
654
657
  } = e;
655
658
  let l;
656
- return a && r && (l = Dt(a, r, t, "DM")), o && a && r && n && (l = `measureFactory.${Mt.aggregationFromJAQL(o)}(${l}, '${ne(n)}')`), l || je;
657
- }, kr = (e, t) => {
659
+ return a && r && (l = Mt(a, r, t, "DM")), o && a && r && n && (l = `measureFactory.${St.aggregationFromJAQL(o)}(${l}, '${ne(n)}')`), l || je;
660
+ }, yr = (e, t) => {
658
661
  const a = e.jaql(!1).jaql;
659
- return "formula" in a ? fr(a, t) : xr(a);
660
- }, G = (e, t = 0, a = !1) => {
662
+ return "formula" in a ? kr(a, t) : wr(a);
663
+ }, q = (e, t = 0, a = !1) => {
661
664
  if (!e)
662
665
  return "";
663
666
  if (typeof e == "string")
664
667
  return `'${ne(e)}'`;
665
- if (e instanceof Lt)
666
- return kr(e, t);
668
+ if (e instanceof At)
669
+ return yr(e, t);
667
670
  if (e instanceof vt)
668
671
  return e.composeCode || "";
669
672
  let r = "";
670
- return Array.isArray(e) ? r += `[${e.map((o) => G(o, t + 2))}${e.length ? me + " ".repeat(t + 2) : ""}]` : (r += `{${me}`, Object.entries(e).forEach(([o, n]) => {
671
- a && typeof o == "string" && (o = `'${ne(o)}'`), r += " ".repeat(t + 2), Array.isArray(n) ? r += `${o}: [${n.map((l) => G(l, t + 4, a))}${n.length ? me + " ".repeat(t + 2) : ""}]` : typeof n == "object" && n !== null ? r += `${o}: ${G(n, t + 2, a)}` : ["number", "boolean", "undefined"].includes(typeof n) || n === null ? r += `${o}: ${n}` : typeof n == "string" ? r += `${o}: '${ne(n)}'` : r += `${o}: ${n}`, r += `,${me}`;
673
+ return Array.isArray(e) ? r += `[${e.map((o) => q(o, t + 2))}${e.length ? me + " ".repeat(t + 2) : ""}]` : (r += `{${me}`, Object.entries(e).forEach(([o, n]) => {
674
+ a && typeof o == "string" && (o = `'${ne(o)}'`), r += " ".repeat(t + 2), Array.isArray(n) ? r += `${o}: [${n.map((l) => q(l, t + 4, a))}${n.length ? me + " ".repeat(t + 2) : ""}]` : typeof n == "object" && n !== null ? r += `${o}: ${q(n, t + 2, a)}` : ["number", "boolean", "undefined"].includes(typeof n) || n === null ? r += `${o}: ${n}` : typeof n == "string" ? r += `${o}: '${ne(n)}'` : r += `${o}: ${n}`, r += `,${me}`;
672
675
  }), r += " ".repeat(t), r += "}"), r;
673
676
  };
674
- function wr(e) {
675
- return G(e, xe);
677
+ function _r(e) {
678
+ return q(e, xe);
676
679
  }
677
680
  function tt(e, t = "data-source-placeholder") {
678
681
  if (!e)
679
682
  return t;
680
683
  const a = typeof e == "object" && "title" in e ? e.title : e;
681
- return dr(a);
684
+ return cr(a);
682
685
  }
683
686
  function at(e, t = !0) {
684
687
  const a = [];
685
688
  return t && a.push("measureFactory"), Z(e) && a.push("filterFactory"), a.length > 0 ? `import { ${a.join(", ")} } from '@sisense/sdk-data';` : "";
686
689
  }
687
690
  const rt = `
688
- `, yr = (e, t) => {
691
+ `, Cr = (e, t) => {
689
692
  if (e.composeCode)
690
693
  return `${rt}${" ".repeat(t)}${e.composeCode}`;
691
694
  const a = e.jaql().jaql;
692
- return `${rt}${" ".repeat(t)}filterFactory.customFilter(${G(a, t, !0)})`;
693
- }, _r = (e, t = 0) => {
695
+ return `${rt}${" ".repeat(t)}filterFactory.customFilter(${q(a, t, !0)})`;
696
+ }, vr = (e, t = 0) => {
694
697
  if (!e)
695
698
  return "";
696
699
  let a = "";
697
- return a += `[${e.map((r) => yr(r, t + 2))}${e.length ? `
700
+ return a += `[${e.map((r) => Cr(r, t + 2))}${e.length ? `
698
701
  ` + " ".repeat(t + 2) : ""}]`, a;
699
- }, it = (e) => e ? Array.isArray(e) ? _r(e, 6) : "/** Filter relations not supported yet */" : "[]", Cr = ["executeQueryByWidgetIdTmpl", "widgetByIdTmpl"], vr = "chartWidgetTmpl", Sr = "pivotTableWidgetTmpl", Mr = (e) => e, Dr = ({
702
+ }, it = (e) => e ? Array.isArray(e) ? vr(e, 6) : "/** Filter relations not supported yet */" : "[]", Sr = ["executeQueryByWidgetIdTmpl", "widgetByIdTmpl"], Mr = "chartWidgetTmpl", Dr = "pivotTableWidgetTmpl", Ir = (e) => e, Ar = ({
700
703
  dashboardOid: e,
701
704
  widgetOid: t,
702
705
  uiFramework: a = "react",
703
706
  chartType: r = "table",
704
707
  includeChart: o = !0
705
708
  }) => {
706
- Nt(r);
709
+ Tt(r);
707
710
  const n = {
708
711
  dashboardOid: e,
709
712
  widgetOid: t
710
- }, l = Cr[Number(o)];
713
+ }, l = Sr[Number(o)];
711
714
  return Ne(l, n, a);
712
- }, Ir = (e, t, a) => {
715
+ }, Lr = (e, t, a) => {
713
716
  if (_t(e)) {
714
- Nt(e.chartType);
717
+ Tt(e.chartType);
715
718
  const r = et(e), o = {
716
719
  idString: e.id,
717
720
  widgetTypeString: "chart",
718
721
  titleString: e.title,
719
722
  dataSourceString: tt(e.dataSource),
720
- chartTypeString: Mr(e.chartType),
721
- dataOptionsString: wr(e.dataOptions),
723
+ chartTypeString: Ir(e.chartType),
724
+ dataOptionsString: _r(e.dataOptions),
722
725
  filtersString: it(e.filters),
723
726
  componentString: "ChartWidget",
724
727
  extraImportsString: at(e.filters || [], r),
725
- styleOptionsString: G(e.styleOptions || {}, xe),
726
- drilldownOptionsString: G(e.drilldownOptions || {}, xe)
728
+ styleOptionsString: q(e.styleOptions || {}, xe),
729
+ drilldownOptionsString: q(e.drilldownOptions || {}, xe)
727
730
  };
728
731
  return Ne(a.chart, o, t);
729
732
  }
730
- if (ja(e)) {
733
+ if (Ta(e)) {
731
734
  const r = et(e), o = {
732
735
  idString: e.id,
733
736
  widgetTypeString: "pivot",
734
737
  titleString: e.title,
735
738
  dataSourceString: tt(e.dataSource),
736
- dataOptionsString: G(e.dataOptions),
739
+ dataOptionsString: q(e.dataOptions),
737
740
  filtersString: it(e.filters),
738
741
  componentString: "PivotTableWidget",
739
742
  extraImportsString: at(e.filters || [], r),
740
- styleOptionsString: G(e.styleOptions || {}, xe)
743
+ styleOptionsString: q(e.styleOptions || {}, xe)
741
744
  };
742
745
  return Ne(a.pivot, o, t);
743
746
  }
744
- if (Oa(e))
747
+ if (Na(e))
745
748
  return "/** Plugin widget code not supported yet */";
746
749
  throw new le("errors.otherWidgetTypesNotSupported");
747
- }, Ar = ({
750
+ }, Tr = ({
748
751
  widgetProps: e,
749
752
  uiFramework: t = "react"
750
- }) => Ir(e, t, {
751
- chart: vr,
752
- pivot: Sr
753
- }), Lr = (e) => ({
753
+ }) => Lr(e, t, {
754
+ chart: Mr,
755
+ pivot: Dr
756
+ }), Nr = (e) => ({
754
757
  dataOptions: {
755
- columns: e.map(Tt)
758
+ columns: e.map(Lt)
756
759
  }
757
- }), Tr = Object.freeze({
760
+ }), jr = Object.freeze({
758
761
  convolution: {
759
762
  enabled: !0,
760
763
  selectedConvolutionType: "bySlicesCount",
@@ -780,7 +783,7 @@ const rt = `
780
783
  pie: "pie/donut",
781
784
  bar: "bar/stacked",
782
785
  column: "column/stackedcolumn"
783
- }), Nr = (e, t, a) => {
786
+ }), Or = (e, t, a) => {
784
787
  const r = e.reduce((n, l) => (n[l.jaql.title] = l, n), {}), o = Object.entries(a).reduce((n, l) => {
785
788
  const [d, s] = l;
786
789
  return n[`${d}`] = Array.isArray(s) ? s.map((c) => {
@@ -795,20 +798,20 @@ const rt = `
795
798
  name: m.column.name
796
799
  }
797
800
  };
798
- const w = Tt(x);
801
+ const w = Lt(x);
799
802
  if (x.panel === "measures")
800
- return B(D({}, m), {
803
+ return Q(D({}, m), {
801
804
  column: w
802
805
  });
803
- if (Ga(w.type)) {
806
+ if (Ra(w.type)) {
804
807
  const f = (p = (g = x.format) == null ? void 0 : g.mask) == null ? void 0 : p[x.jaql.level];
805
808
  if (f)
806
- return B(D({}, m), {
809
+ return Q(D({}, m), {
807
810
  column: w,
808
811
  dateFormat: f
809
812
  });
810
813
  }
811
- return B(D({}, m), {
814
+ return Q(D({}, m), {
812
815
  column: w
813
816
  });
814
817
  }) : s, n;
@@ -834,7 +837,7 @@ const rt = `
834
837
  n !== "geo" && (o[`${n}`] = o[`${n}`][0]);
835
838
  }), o;
836
839
  case "table":
837
- return Object.keys(o).length === 0 ? Lr(e).dataOptions : o;
840
+ return Object.keys(o).length === 0 ? Nr(e).dataOptions : o;
838
841
  case "boxplot":
839
842
  case "areamap":
840
843
  case "indicator":
@@ -844,14 +847,14 @@ const rt = `
844
847
  }, nt = (e, t) => {
845
848
  var a, r, o, n;
846
849
  return t === "x" ? (r = (a = e.axesMapping.category) != null ? a : e.axesMapping.x) == null ? void 0 : r.map((l) => Te(l).column.name).join(", ") : (n = (o = e.axesMapping.value) != null ? o : e.axesMapping.y) == null ? void 0 : n.map((l) => Te(l).column.name).join(", ");
847
- }, jr = (e, t, a = !0) => {
850
+ }, Er = (e, t, a = !0) => {
848
851
  const {
849
852
  chartFamily: r,
850
853
  axesMapping: o = {},
851
854
  styleOptions: n = {}
852
- } = t, l = Nr(e, r, o);
855
+ } = t, l = Or(e, r, o);
853
856
  let d;
854
- return a && t.chartType in ot ? d = Ae(Ae(Tr, {
857
+ return a && t.chartType in ot ? d = Ae(Ae(jr, {
855
858
  subtype: ot[t.chartType]
856
859
  }), {
857
860
  legend: {
@@ -870,25 +873,25 @@ const rt = `
870
873
  text: nt(t, "x")
871
874
  }
872
875
  }
873
- }, n) : d = Ae(Ea(), n), {
876
+ }, n) : d = Ae(ja(), n), {
874
877
  dataOptions: l,
875
878
  chartStyleOptions: d
876
879
  };
877
- }, Or = (e) => "chartType" in e ? e : {
880
+ }, zr = (e) => "chartType" in e ? e : {
878
881
  chartType: "table",
879
882
  chartFamily: "table",
880
883
  axesMapping: {}
881
- }, Er = (e) => e.map((t) => za(t.jaql)), zr = (e) => e.reduce((t, a) => {
882
- if ((a.panel === "scope" || a.jaql.filter) && t.metadataFilters.push(Je(a)), a.panel !== "scope") {
883
- const r = Je(a);
884
+ }, Zr = (e) => e.map((t) => Oa(t.jaql)), Rr = (e) => e.reduce((t, a) => {
885
+ if ((a.panel === "scope" || a.jaql.filter) && t.metadataFilters.push($e(a)), a.panel !== "scope") {
886
+ const r = $e(a);
884
887
  delete r.jaql.filter, t.metadataColumns.push(r);
885
888
  }
886
889
  return t;
887
890
  }, {
888
891
  metadataColumns: [],
889
892
  metadataFilters: []
890
- }), Zr = (e, t) => {
891
- if (!sr(e))
893
+ }), Wr = (e, t) => {
894
+ if (!pr(e))
892
895
  try {
893
896
  const {
894
897
  useCustomizedStyleOptions: a = !1
@@ -899,13 +902,13 @@ const rt = `
899
902
  } = e, {
900
903
  metadata: l,
901
904
  datasource: d
902
- } = r, s = B(D({}, d), {
905
+ } = r, s = Q(D({}, d), {
903
906
  type: d.type || "elasticube"
904
- }), c = Ma(s), g = l.map((N) => br(N)).map((N) => B(D({}, N), {
905
- jaql: B(D({}, N.jaql), {
907
+ }), c = va(s), g = l.map((N) => xr(N)).map((N) => Q(D({}, N), {
908
+ jaql: Q(D({}, N.jaql), {
906
909
  datasource: c
907
910
  })
908
- })), p = Or(o), m = p.chartType.toLowerCase(), x = {
911
+ })), p = zr(o), m = p.chartType.toLowerCase(), x = {
909
912
  cornerRadius: "Small",
910
913
  header: {
911
914
  // remove info button and render empty toolbar instead
@@ -914,10 +917,10 @@ const rt = `
914
917
  }, {
915
918
  metadataColumns: w,
916
919
  metadataFilters: f
917
- } = zr(g), S = Er(f), {
920
+ } = Rr(g), S = Zr(f), {
918
921
  dataOptions: M,
919
922
  chartStyleOptions: z
920
- } = jr(w, p, a), y = D(D({}, z), x);
923
+ } = Er(w, p, a), y = D(D({}, z), x);
921
924
  return {
922
925
  widgetType: "chart",
923
926
  id: n,
@@ -932,14 +935,14 @@ const rt = `
932
935
  console.error(a);
933
936
  return;
934
937
  }
935
- }, Ye = (e, t) => Zr(e, t), Rr = (e) => lr(e) ? Dr(e) : Ar(e), Et = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
938
+ }, He = (e, t) => Wr(e, t), qr = (e) => sr(e) ? Ar(e) : Tr(e), Ot = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
936
939
  __proto__: null,
937
- toWidgetCode: Rr,
938
- toWidgetProps: Ye
940
+ toWidgetCode: qr,
941
+ toWidgetProps: He
939
942
  }, Symbol.toStringTag, {
940
943
  value: "Module"
941
944
  }));
942
- var Wr = Object.defineProperty, Gr = Object.defineProperties, qr = Object.getOwnPropertyDescriptors, lt = Object.getOwnPropertySymbols, Hr = Object.prototype.hasOwnProperty, Pr = Object.prototype.propertyIsEnumerable, dt = (e, t, a) => t in e ? Wr(e, t, {
945
+ var Gr = Object.defineProperty, Yr = Object.defineProperties, Pr = Object.getOwnPropertyDescriptors, lt = Object.getOwnPropertySymbols, Hr = Object.prototype.hasOwnProperty, Qr = Object.prototype.propertyIsEnumerable, dt = (e, t, a) => t in e ? Gr(e, t, {
943
946
  enumerable: !0,
944
947
  configurable: !0,
945
948
  writable: !0,
@@ -949,9 +952,9 @@ var Wr = Object.defineProperty, Gr = Object.defineProperties, qr = Object.getOwn
949
952
  Hr.call(t, a) && dt(e, a, t[a]);
950
953
  if (lt)
951
954
  for (var a of lt(t))
952
- Pr.call(t, a) && dt(e, a, t[a]);
955
+ Qr.call(t, a) && dt(e, a, t[a]);
953
956
  return e;
954
- }, L = (e, t) => Gr(e, qr(t)), J = (e, t, a) => new Promise((r, o) => {
957
+ }, L = (e, t) => Yr(e, Pr(t)), $ = (e, t, a) => new Promise((r, o) => {
955
958
  var n = (s) => {
956
959
  try {
957
960
  d(a.next(s));
@@ -967,7 +970,7 @@ var Wr = Object.defineProperty, Gr = Object.defineProperties, qr = Object.getOwn
967
970
  }, d = (s) => s.done ? r(s.value) : Promise.resolve(s.value).then(n, l);
968
971
  d((a = a.apply(e, t)).next());
969
972
  });
970
- class Yr extends Za {
973
+ class Br extends Ea {
971
974
  constructor(t, a) {
972
975
  super(), this.client = t, this.setOptions(a), this.bindMethods(), this.updateResult();
973
976
  }
@@ -977,7 +980,7 @@ class Yr extends Za {
977
980
  setOptions(t) {
978
981
  var a;
979
982
  const r = this.options;
980
- this.options = this.client.defaultMutationOptions(t), Ra(r, this.options) || this.client.getMutationCache().notify({
983
+ this.options = this.client.defaultMutationOptions(t), za(r, this.options) || this.client.getMutationCache().notify({
981
984
  type: "observerOptionsUpdated",
982
985
  mutation: this.currentMutation,
983
986
  observer: this
@@ -1010,7 +1013,7 @@ class Yr extends Za {
1010
1013
  })), this.currentMutation.addObserver(this), this.currentMutation.execute();
1011
1014
  }
1012
1015
  updateResult() {
1013
- const t = this.currentMutation ? this.currentMutation.state : Wa(), a = L(v({}, t), {
1016
+ const t = this.currentMutation ? this.currentMutation.state : Za(), a = L(v({}, t), {
1014
1017
  isLoading: t.status === "loading",
1015
1018
  isSuccess: t.status === "success",
1016
1019
  isError: t.status === "error",
@@ -1039,32 +1042,32 @@ class Yr extends Za {
1039
1042
  });
1040
1043
  }
1041
1044
  }
1042
- function Be(e, t, a) {
1043
- const r = Da(e, t), o = se({
1045
+ function Qe(e, t, a) {
1046
+ const r = Sa(e, t), o = se({
1044
1047
  context: r.context
1045
- }), [n] = I(() => new Yr(o, r));
1048
+ }), [n] = I(() => new Br(o, r));
1046
1049
  ce(() => {
1047
1050
  n.setOptions(r);
1048
1051
  }, [n, r]);
1049
- const l = Ia(_((s) => n.subscribe(yt.batchCalls(s)), [n]), () => n.getCurrentResult(), () => n.getCurrentResult()), d = _((s, c) => {
1050
- n.mutate(s, c).catch(Br);
1052
+ const l = Ma(_((s) => n.subscribe(yt.batchCalls(s)), [n]), () => n.getCurrentResult(), () => n.getCurrentResult()), d = _((s, c) => {
1053
+ n.mutate(s, c).catch(Ur);
1051
1054
  }, [n]);
1052
- if (l.error && Aa(n.options.useErrorBoundary, [l.error]))
1055
+ if (l.error && Da(n.options.useErrorBoundary, [l.error]))
1053
1056
  throw l.error;
1054
1057
  return L(v({}, l), {
1055
1058
  mutate: d,
1056
1059
  mutateAsync: l.mutate
1057
1060
  });
1058
1061
  }
1059
- function Br() {
1062
+ function Ur() {
1060
1063
  }
1061
1064
  class st {
1062
1065
  constructor(t, a = !1) {
1063
- this.volatile = a, this.getChatContexts = () => J(this, null, function* () {
1066
+ this.volatile = a, this.getChatContexts = () => $(this, null, function* () {
1064
1067
  return (yield this.httpClient.get("api/datasources//")) || [];
1065
1068
  }), this.getNlgInsights = (r) => this.httpClient.post("api/v2/ai/nlg/queryResult", r), this.getQueryRecommendations = (r, o) => this.httpClient.get(`api/v2/ai/recommendations/query/${r}/${o.numOfRecommendations}`), this.getNlqResult = (r, o) => this.httpClient.post(`api/v2/ai/nlq/query/${r}`, o), this.setLlmConfig = (r) => this.httpClient.post("api/v2/settings/ai/llmProvider", r).catch((o) => {
1066
1069
  console.error("Unable to set llm config", o);
1067
- }), this.getAllChats = () => J(this, null, function* () {
1070
+ }), this.getAllChats = () => $(this, null, function* () {
1068
1071
  return this.volatile ? [] : this.httpClient.get("api/v2/ai/chats");
1069
1072
  }), this.getChatById = (r) => this.httpClient.get(`api/v2/ai/chats/${r}`), this.createChat = (r, o) => this.httpClient.post("api/v2/ai/chats", {
1070
1073
  sourceId: r,
@@ -1094,7 +1097,7 @@ new bt({
1094
1097
  }
1095
1098
  }
1096
1099
  });
1097
- const zt = /* @__PURE__ */ ye(void 0), q = () => We(zt), Zt = /* @__PURE__ */ ye({}), Qr = () => We(Zt), Ur = ({
1100
+ const Et = /* @__PURE__ */ ye(void 0), G = () => We(Et), zt = /* @__PURE__ */ ye({}), Fr = () => We(zt), Vr = ({
1098
1101
  children: e
1099
1102
  }) => {
1100
1103
  const [t, a] = I({}), r = _((l, d) => {
@@ -1105,7 +1108,7 @@ const zt = /* @__PURE__ */ ye(void 0), q = () => We(zt), Zt = /* @__PURE__ */ ye
1105
1108
  [r(d, s)]: l
1106
1109
  }));
1107
1110
  }, [r]), n = _((l, d) => t[r(l, d)], [t, r]);
1108
- return /* @__PURE__ */ i(Zt.Provider, {
1111
+ return /* @__PURE__ */ i(zt.Provider, {
1109
1112
  value: {
1110
1113
  saveChatId: o,
1111
1114
  getChatId: n
@@ -1113,18 +1116,18 @@ const zt = /* @__PURE__ */ ye(void 0), q = () => We(zt), Zt = /* @__PURE__ */ ye
1113
1116
  children: e
1114
1117
  });
1115
1118
  };
1116
- function Rt(e) {
1119
+ function Zt(e) {
1117
1120
  var t, a;
1118
1121
  if ("jaql" in e)
1119
1122
  return e;
1120
1123
  {
1121
- const r = ha(e.dataSource), {
1124
+ const r = ga(e.dataSource), {
1122
1125
  filters: o = [],
1123
1126
  relations: n
1124
- } = ma(e.filters), {
1127
+ } = ua(e.filters), {
1125
1128
  metadata: l,
1126
1129
  filterRelations: d
1127
- } = ba({
1130
+ } = ha({
1128
1131
  dataSource: e.dataSource,
1129
1132
  attributes: (t = e.dimensions) != null ? t : [],
1130
1133
  measures: (a = e.measures) != null ? a : [],
@@ -1141,8 +1144,8 @@ function Rt(e) {
1141
1144
  return e.verbosity && (s.verbosity = e.verbosity), s;
1142
1145
  }
1143
1146
  }
1144
- const Wt = (e, t = !0) => {
1145
- const a = O(() => Rt(e), [e]), r = q(), {
1147
+ const Rt = (e, t = !0) => {
1148
+ const a = O(() => Zt(e), [e]), r = G(), {
1146
1149
  data: o,
1147
1150
  error: n,
1148
1151
  isError: l,
@@ -1168,8 +1171,8 @@ const Wt = (e, t = !0) => {
1168
1171
  c();
1169
1172
  }, [c])
1170
1173
  };
1171
- }, Fr = ["indicator", "column", "line", "table", "pie", "bar"];
1172
- function Vr(e) {
1174
+ }, Jr = ["indicator", "column", "line", "table", "pie", "bar"];
1175
+ function $r(e) {
1173
1176
  const {
1174
1177
  dataSource: t,
1175
1178
  query: a,
@@ -1181,17 +1184,17 @@ function Vr(e) {
1181
1184
  text: a,
1182
1185
  // Timezone is not used by AI API, but it is currently required by the endpoint
1183
1186
  timezone: "UTC",
1184
- chartTypes: r ?? [...Fr]
1187
+ chartTypes: r ?? [...Jr]
1185
1188
  }
1186
1189
  };
1187
1190
  }
1188
- const Oe = 4, $r = (e) => {
1191
+ const Oe = 4, Xr = (e) => {
1189
1192
  const {
1190
1193
  contextTitle: t,
1191
1194
  count: a,
1192
1195
  enableAxisTitlesInWidgetProps: r,
1193
1196
  enabled: o
1194
- } = e, n = q(), l = a ?? Oe, d = (o === void 0 || o === !0) && l > 0, {
1197
+ } = e, n = G(), l = a ?? Oe, d = (o === void 0 || o === !0) && l > 0, {
1195
1198
  isLoading: s,
1196
1199
  isError: c,
1197
1200
  isSuccess: g,
@@ -1205,7 +1208,7 @@ const Oe = 4, $r = (e) => {
1205
1208
  }),
1206
1209
  enabled: !!n && d
1207
1210
  }), w = O(() => p == null ? void 0 : p.map((f) => L(v({}, f), {
1208
- widgetProps: f.jaql ? Ye(f, {
1211
+ widgetProps: f.jaql ? He(f, {
1209
1212
  useCustomizedStyleOptions: r
1210
1213
  }) : void 0
1211
1214
  })), [p, r]);
@@ -1219,19 +1222,19 @@ const Oe = 4, $r = (e) => {
1219
1222
  x();
1220
1223
  }, [x])
1221
1224
  };
1222
- }, Gt = Object.freeze({
1225
+ }, Wt = Object.freeze({
1223
1226
  enableFollowupQuestions: !1,
1224
1227
  enableHeader: !0,
1225
1228
  enableInsights: !0,
1226
1229
  numOfRecommendations: 4,
1227
1230
  numOfRecentPrompts: 5
1228
- }), qt = /* @__PURE__ */ ye(v({}, Gt)), H = () => We(qt), Jr = ({
1231
+ }), qt = /* @__PURE__ */ ye(v({}, Wt)), Y = () => We(qt), Kr = ({
1229
1232
  children: e,
1230
1233
  value: t
1231
1234
  }) => {
1232
1235
  const {
1233
1236
  t: a
1234
- } = C(), r = Object.entries(t).reduce((o, [n, l]) => (l !== void 0 && (o[n] = l), o), L(v({}, Gt), {
1237
+ } = C(), r = Object.entries(t).reduce((o, [n, l]) => (l !== void 0 && (o[n] = l), o), L(v({}, Wt), {
1235
1238
  inputPromptText: a("ai.config.inputPromptText"),
1236
1239
  welcomeText: a("ai.config.welcomeText"),
1237
1240
  suggestionsWelcomeText: a("ai.config.suggestionsWelcomeText")
@@ -1240,13 +1243,13 @@ const Oe = 4, $r = (e) => {
1240
1243
  value: r,
1241
1244
  children: e
1242
1245
  });
1243
- }, Qe = "chatHistory", Xr = (e) => {
1244
- const t = q(), {
1246
+ }, Be = "chatHistory", ei = (e) => {
1247
+ const t = G(), {
1245
1248
  hideHistory: a
1246
- } = H();
1249
+ } = Y();
1247
1250
  return de({
1248
- queryKey: [Qe, e, t],
1249
- queryFn: () => J(void 0, null, function* () {
1251
+ queryKey: [Be, e, t],
1252
+ queryFn: () => $(void 0, null, function* () {
1250
1253
  if (!t || !e)
1251
1254
  return;
1252
1255
  if (a)
@@ -1256,10 +1259,10 @@ const Oe = 4, $r = (e) => {
1256
1259
  }),
1257
1260
  enabled: !!t && !!e
1258
1261
  });
1259
- }, Ht = (e) => {
1260
- const t = q(), a = se();
1261
- return Be({
1262
- mutationFn: () => J(void 0, null, function* () {
1262
+ }, Gt = (e) => {
1263
+ const t = G(), a = se();
1264
+ return Qe({
1265
+ mutationFn: () => $(void 0, null, function* () {
1263
1266
  if (!(!t || !e))
1264
1267
  return t.ai.chat.clearHistory(e);
1265
1268
  }),
@@ -1267,17 +1270,17 @@ const Oe = 4, $r = (e) => {
1267
1270
  console.error("Error when clearing history:", r);
1268
1271
  },
1269
1272
  onSettled: () => {
1270
- e && a.setQueriesData([Qe, e], []);
1273
+ e && a.setQueriesData([Be, e], []);
1271
1274
  }
1272
1275
  });
1273
- }, Kr = (e) => {
1276
+ }, ti = (e) => {
1274
1277
  const {
1275
1278
  data: t,
1276
1279
  isLoading: a,
1277
1280
  isError: r
1278
- } = Xr(e), {
1281
+ } = ei(e), {
1279
1282
  mutate: o
1280
- } = Ht(e);
1283
+ } = Gt(e);
1281
1284
  return ce(() => {
1282
1285
  r && o();
1283
1286
  }, [r, o]), {
@@ -1285,14 +1288,14 @@ const Oe = 4, $r = (e) => {
1285
1288
  isLoading: a,
1286
1289
  isError: r
1287
1290
  };
1288
- }, ei = () => {
1289
- const e = q(), {
1291
+ }, ai = () => {
1292
+ const e = G(), {
1290
1293
  data: t,
1291
1294
  isLoading: a,
1292
1295
  fetchStatus: r
1293
1296
  } = de({
1294
1297
  queryKey: ["getDataTopics", e],
1295
- queryFn: () => J(void 0, null, function* () {
1298
+ queryFn: () => $(void 0, null, function* () {
1296
1299
  if (e)
1297
1300
  return e.getChatContexts();
1298
1301
  }),
@@ -1303,8 +1306,8 @@ const Oe = 4, $r = (e) => {
1303
1306
  isLoading: a,
1304
1307
  fetchStatus: r
1305
1308
  };
1306
- }, ti = () => {
1307
- const e = q(), {
1309
+ }, ri = () => {
1310
+ const e = G(), {
1308
1311
  data: t,
1309
1312
  isLoading: a
1310
1313
  } = de({
@@ -1316,9 +1319,9 @@ const Oe = 4, $r = (e) => {
1316
1319
  data: t ?? [],
1317
1320
  isLoading: a
1318
1321
  };
1319
- }, ai = (e, t, a) => {
1320
- const r = se(), o = q(), n = Be({
1321
- mutationFn: () => J(void 0, null, function* () {
1322
+ }, ii = (e, t, a) => {
1323
+ const r = se(), o = G(), n = Qe({
1324
+ mutationFn: () => $(void 0, null, function* () {
1322
1325
  if (!(!o || !e))
1323
1326
  return o.ai.chat.create(e, a);
1324
1327
  }),
@@ -1327,7 +1330,7 @@ const Oe = 4, $r = (e) => {
1327
1330
  return ce(() => {
1328
1331
  t && n.isIdle && n.mutate();
1329
1332
  }, [t, n]), n;
1330
- }, ri = (e, t) => {
1333
+ }, oi = (e, t) => {
1331
1334
  switch (e.responseType = e.responseType.toLowerCase(), e.responseType) {
1332
1335
  case "nlq":
1333
1336
  return {
@@ -1344,16 +1347,16 @@ const Oe = 4, $r = (e) => {
1344
1347
  default:
1345
1348
  throw Error(`${t}${JSON.stringify(e)}`);
1346
1349
  }
1347
- }, ii = (e, t) => {
1350
+ }, ni = (e, t) => {
1348
1351
  const a = se(), r = _((s) => {
1349
- e && a.setQueriesData([Qe, e], (c) => c && [...c, s]);
1352
+ e && a.setQueriesData([Be, e], (c) => c && [...c, s]);
1350
1353
  }, [a, e]), {
1351
1354
  t: o
1352
- } = C(), n = q(), {
1355
+ } = C(), n = G(), {
1353
1356
  mutate: l,
1354
1357
  isLoading: d
1355
- } = Be({
1356
- mutationFn: (s) => J(void 0, null, function* () {
1358
+ } = Qe({
1359
+ mutationFn: (s) => $(void 0, null, function* () {
1357
1360
  if (!(!n || !e))
1358
1361
  return n.ai.chat.post(e, {
1359
1362
  text: s,
@@ -1380,26 +1383,26 @@ const Oe = 4, $r = (e) => {
1380
1383
  if (!s)
1381
1384
  return;
1382
1385
  const c = o("ai.errors.unknownResponse");
1383
- r(ri(s, c));
1386
+ r(oi(s, c));
1384
1387
  }
1385
1388
  });
1386
1389
  return {
1387
1390
  mutate: l,
1388
1391
  isLoading: d
1389
1392
  };
1390
- }, oi = (e, t, a = !1) => {
1393
+ }, li = (e, t, a = !1) => {
1391
1394
  var r;
1392
1395
  const {
1393
1396
  data: o,
1394
1397
  isLoading: n
1395
- } = ti(), l = Qr(), d = l.getChatId(e, t) || ((r = o.find((p) => {
1398
+ } = ri(), l = Fr(), d = l.getChatId(e, t) || ((r = o.find((p) => {
1396
1399
  var m;
1397
1400
  return p.contextTitle === e && ((m = p.contextDetails) == null ? void 0 : m.dashboardId) === (t == null ? void 0 : t.dashboardId);
1398
1401
  })) == null ? void 0 : r.chatId), {
1399
1402
  isError: s,
1400
1403
  data: c,
1401
1404
  isSuccess: g
1402
- } = ai(e, a && !n && !d, t);
1405
+ } = ii(e, a && !n && !d, t);
1403
1406
  return ce(() => {
1404
1407
  g && c && !d && l.saveChatId(c.chatId, e, t);
1405
1408
  }, [c, g, e, t, d, l]), {
@@ -1407,33 +1410,33 @@ const Oe = 4, $r = (e) => {
1407
1410
  isLoading: n,
1408
1411
  isError: s
1409
1412
  };
1410
- }, ni = (e) => O(() => {
1413
+ }, di = (e) => O(() => {
1411
1414
  if (e != null && e.length) {
1412
1415
  const t = e[e.length - 1];
1413
- if (Pt(t))
1416
+ if (Yt(t))
1414
1417
  return JSON.parse(t.content);
1415
1418
  }
1416
1419
  return null;
1417
- }, [e]), Pt = (e) => !!e && "type" in e && e.type === "nlq", li = (e) => !!e && "type" in e && e.type === "text", di = (e, t) => {
1420
+ }, [e]), Yt = (e) => !!e && "type" in e && e.type === "nlq", si = (e) => !!e && "type" in e && e.type === "text", ci = (e, t) => {
1418
1421
  const {
1419
1422
  t: a
1420
1423
  } = C(), {
1421
1424
  enableFollowupQuestions: r
1422
- } = H(), {
1425
+ } = Y(), {
1423
1426
  chatId: o,
1424
1427
  isError: n
1425
- } = oi(e, t, !0), [l, d] = I(null), {
1428
+ } = li(e, t, !0), [l, d] = I(null), {
1426
1429
  history: s,
1427
1430
  isLoading: c,
1428
1431
  isError: g
1429
- } = Kr(o);
1432
+ } = ti(o);
1430
1433
  ce(() => {
1431
1434
  n ? d(new le("ai.errors.chatUnavailable")) : g && d(new le("ai.errors.fetchHistory"));
1432
1435
  }, [n, g, a]);
1433
1436
  const {
1434
1437
  mutate: p,
1435
1438
  isLoading: m
1436
- } = ii(o, r), x = ni(s);
1439
+ } = ni(o, r), x = di(s);
1437
1440
  return {
1438
1441
  chatId: o,
1439
1442
  history: s ?? [],
@@ -1443,18 +1446,18 @@ const Oe = 4, $r = (e) => {
1443
1446
  isLoading: c,
1444
1447
  lastError: l
1445
1448
  };
1446
- }, si = 500, ci = 500, pi = 500, gi = 900, ui = /* @__PURE__ */ u("div", {
1449
+ }, pi = 500, gi = 500, ui = 500, hi = 900, mi = /* @__PURE__ */ u("div", {
1447
1450
  target: "e1ldv6710",
1448
1451
  label: "ChatFrame"
1449
1452
  })("box-sizing:border-box;position:relative;display:flex;flex-direction:column;border:1px solid #c6c9ce;border-radius:", ({
1450
1453
  theme: e
1451
1454
  }) => e.aiChat.borderRadius, ";background-color:", ({
1452
1455
  theme: e
1453
- }) => e.aiChat.backgroundColor, ";overflow:hidden;min-width:", si, "px;min-height:", ci, "px;width:", ({
1456
+ }) => e.aiChat.backgroundColor, ";overflow:hidden;min-width:", pi, "px;min-height:", gi, "px;width:", ({
1454
1457
  width: e
1455
- }) => e ? ct(e) : `${pi}px`, ";height:", ({
1458
+ }) => e ? ct(e) : `${ui}px`, ";height:", ({
1456
1459
  height: e
1457
- }) => e ? ct(e) : `${gi}px`, ";", ({
1460
+ }) => e ? ct(e) : `${hi}px`, ";", ({
1458
1461
  theme: e
1459
1462
  }) => T`
1460
1463
  font-size: ${e.aiChat.primaryFontSize[0]};
@@ -1465,7 +1468,7 @@ const Oe = 4, $r = (e) => {
1465
1468
  function ct(e) {
1466
1469
  return typeof e == "number" ? `${e}px` : e;
1467
1470
  }
1468
- function hi({
1471
+ function bi({
1469
1472
  spin: e
1470
1473
  }) {
1471
1474
  return /* @__PURE__ */ h("svg", {
@@ -1493,12 +1496,12 @@ function Ce() {
1493
1496
  return /* @__PURE__ */ i("div", {
1494
1497
  className: "csdk-m-auto",
1495
1498
  "aria-label": "loading spinner",
1496
- children: /* @__PURE__ */ i(hi, {
1499
+ children: /* @__PURE__ */ i(bi, {
1497
1500
  spin: !0
1498
1501
  })
1499
1502
  });
1500
1503
  }
1501
- function mi({
1504
+ function fi({
1502
1505
  theme: e
1503
1506
  }) {
1504
1507
  return /* @__PURE__ */ i("svg", {
@@ -1513,7 +1516,7 @@ function mi({
1513
1516
  })
1514
1517
  });
1515
1518
  }
1516
- function bi({
1519
+ function xi({
1517
1520
  theme: e
1518
1521
  }) {
1519
1522
  const t = e.aiChat.icons.color;
@@ -1535,17 +1538,17 @@ function bi({
1535
1538
  })]
1536
1539
  });
1537
1540
  }
1538
- const fi = /* @__PURE__ */ u("div", {
1541
+ const ki = /* @__PURE__ */ u("div", {
1539
1542
  target: "e1q6h1ze0",
1540
1543
  label: "Section"
1541
- })("display:flex;flex-direction:column;row-gap:4px;"), xi = /* @__PURE__ */ u("div", {
1544
+ })("display:flex;flex-direction:column;row-gap:4px;"), wi = /* @__PURE__ */ u("div", {
1542
1545
  target: "e1q6h1ze1",
1543
1546
  label: "SectionHeader"
1544
1547
  })("font-size:11px;line-height:18px;font-weight:300;color:", ({
1545
1548
  theme: e
1546
1549
  }) => e.aiChat.dropup.headers.textColor, ";cursor:pointer;padding:4px 12px;&:hover{background-color:", ({
1547
1550
  theme: e
1548
- }) => e.aiChat.dropup.headers.hover.backgroundColor, ";}"), ki = /* @__PURE__ */ u("div", {
1551
+ }) => e.aiChat.dropup.headers.hover.backgroundColor, ";}"), yi = /* @__PURE__ */ u("div", {
1549
1552
  target: "e1q6h1ze2",
1550
1553
  label: "DropupItem"
1551
1554
  })("font-size:", ({
@@ -1557,7 +1560,7 @@ const fi = /* @__PURE__ */ u("div", {
1557
1560
  }) => e.aiChat.dropup.items.textColor, ";cursor:pointer;padding:4px 12px;&:hover{background-color:", ({
1558
1561
  theme: e
1559
1562
  }) => e.aiChat.dropup.items.hover.backgroundColor, ";}");
1560
- function wi({
1563
+ function _i({
1561
1564
  title: e,
1562
1565
  items: t,
1563
1566
  onSelect: a,
@@ -1566,19 +1569,19 @@ function wi({
1566
1569
  const [o, n] = I(!1), {
1567
1570
  themeSettings: l
1568
1571
  } = k();
1569
- return /* @__PURE__ */ h(fi, {
1570
- children: [/* @__PURE__ */ i(xi, {
1572
+ return /* @__PURE__ */ h(ki, {
1573
+ children: [/* @__PURE__ */ i(wi, {
1571
1574
  onClick: () => n((d) => !d),
1572
1575
  theme: l,
1573
1576
  children: e.toUpperCase()
1574
- }), (o || r) && t.map((d, s) => /* @__PURE__ */ i(ki, {
1577
+ }), (o || r) && t.map((d, s) => /* @__PURE__ */ i(yi, {
1575
1578
  onClick: () => a(d),
1576
1579
  theme: l,
1577
1580
  children: d
1578
1581
  }, s))]
1579
1582
  });
1580
1583
  }
1581
- const yi = /* @__PURE__ */ u("div", {
1584
+ const Ci = /* @__PURE__ */ u("div", {
1582
1585
  target: "e10x5x4a0",
1583
1586
  label: "PopupContent"
1584
1587
  })("font-family:", ({
@@ -1593,7 +1596,7 @@ const yi = /* @__PURE__ */ u("div", {
1593
1596
  theme: e
1594
1597
  }) => e.aiChat.dropup.borderRadius, ";box-shadow:", ({
1595
1598
  theme: e
1596
- }) => e.aiChat.dropup.boxShadow, ";padding-top:8px;padding-bottom:8px;display:flex;flex-direction:column;row-gap:4px;"), _i = /* @__PURE__ */ u("div", {
1599
+ }) => e.aiChat.dropup.boxShadow, ";padding-top:8px;padding-bottom:8px;display:flex;flex-direction:column;row-gap:4px;"), vi = /* @__PURE__ */ u("div", {
1597
1600
  target: "e10x5x4a1",
1598
1601
  label: "ErrorMessage"
1599
1602
  })("font-size:", ({
@@ -1603,7 +1606,7 @@ const yi = /* @__PURE__ */ u("div", {
1603
1606
  }) => e.aiChat.primaryFontSize[1], ";color:", ({
1604
1607
  theme: e
1605
1608
  }) => e.aiChat.dropup.items.textColor, ";padding:4px 12px;"), Ee = (e) => e.startsWith("/");
1606
- function Ci({
1609
+ function Si({
1607
1610
  recentPrompts: e,
1608
1611
  suggestions: t,
1609
1612
  isLoading: a,
@@ -1638,21 +1641,21 @@ function Ci({
1638
1641
  sx: {
1639
1642
  zIndex: 3
1640
1643
  },
1641
- children: /* @__PURE__ */ h(yi, {
1644
+ children: /* @__PURE__ */ h(Ci, {
1642
1645
  style: {
1643
1646
  width: o == null ? void 0 : o.offsetWidth
1644
1647
  },
1645
1648
  theme: s,
1646
- children: [a && /* @__PURE__ */ i(Ce, {}), !a && !l && d.map((p) => /* @__PURE__ */ i(wi, L(v({}, p), {
1649
+ children: [a && /* @__PURE__ */ i(Ce, {}), !a && !l && d.map((p) => /* @__PURE__ */ i(_i, L(v({}, p), {
1647
1650
  alwaysExpanded: g
1648
- }), p.title)), l && /* @__PURE__ */ i(_i, {
1651
+ }), p.title)), l && /* @__PURE__ */ i(vi, {
1649
1652
  theme: s,
1650
1653
  children: c("ai.errors.recommendationsNotAvailable")
1651
1654
  })]
1652
1655
  })
1653
1656
  });
1654
1657
  }
1655
- function pe({
1658
+ function ge({
1656
1659
  title: e,
1657
1660
  placement: t = "top",
1658
1661
  children: a
@@ -1660,7 +1663,7 @@ function pe({
1660
1663
  const {
1661
1664
  themeSettings: r
1662
1665
  } = k();
1663
- return /* @__PURE__ */ i(La, {
1666
+ return /* @__PURE__ */ i(Ia, {
1664
1667
  title: e,
1665
1668
  placement: t,
1666
1669
  disableInteractive: !0,
@@ -1688,15 +1691,15 @@ function pe({
1688
1691
  children: a
1689
1692
  });
1690
1693
  }
1691
- const vi = 500, Si = /* @__PURE__ */ u("div", {
1694
+ const Mi = 500, Di = /* @__PURE__ */ u("div", {
1692
1695
  target: "e6iwkw10",
1693
1696
  label: "ChatInputContainer"
1694
1697
  })("display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;background-color:", ({
1695
1698
  theme: e
1696
- }) => e.aiChat.backgroundColor, ";"), Mi = /* @__PURE__ */ u("button", {
1699
+ }) => e.aiChat.backgroundColor, ";"), Ii = /* @__PURE__ */ u("button", {
1697
1700
  target: "e6iwkw11",
1698
1701
  label: "ClearHistoryButton"
1699
- })("height:34px;background-color:inherit;cursor:pointer;border:none;"), Di = /* @__PURE__ */ u("textarea", {
1702
+ })("height:34px;background-color:inherit;cursor:pointer;border:none;"), Ai = /* @__PURE__ */ u("textarea", {
1700
1703
  target: "e6iwkw12",
1701
1704
  label: "TextInput"
1702
1705
  })("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 ", ({
@@ -1705,7 +1708,7 @@ const vi = 500, Si = /* @__PURE__ */ u("div", {
1705
1708
  theme: e
1706
1709
  }) => e.aiChat.primaryTextColor, ";background-color:", ({
1707
1710
  theme: e
1708
- }) => e.aiChat.input.backgroundColor, ";"), Ii = /* @__PURE__ */ u("button", {
1711
+ }) => e.aiChat.input.backgroundColor, ";"), Li = /* @__PURE__ */ u("button", {
1709
1712
  target: "e6iwkw13",
1710
1713
  label: "SendMessageButton"
1711
1714
  })("height:34px;background-color:inherit;border-style:none;color:", ({
@@ -1718,8 +1721,8 @@ const vi = 500, Si = /* @__PURE__ */ u("div", {
1718
1721
  ` : T`
1719
1722
  opacity: 1;
1720
1723
  cursor: pointer;
1721
- `), Ai = 34;
1722
- function Li({
1724
+ `), Ti = 34;
1725
+ function Ni({
1723
1726
  onSendMessage: e,
1724
1727
  onClearHistoryClick: t,
1725
1728
  disabled: a,
@@ -1731,7 +1734,7 @@ function Li({
1731
1734
  }) {
1732
1735
  const [s, c] = I(""), {
1733
1736
  inputPromptText: g
1734
- } = H(), p = _(() => {
1737
+ } = Y(), p = _(() => {
1735
1738
  if (a)
1736
1739
  return;
1737
1740
  if (Ee(s)) {
@@ -1746,9 +1749,9 @@ function Li({
1746
1749
  y.key === "Enter" ? (y.preventDefault(), p()) : y.key === "Escape" && Ee(s) && c("");
1747
1750
  }, [p, s]), w = _((y) => {
1748
1751
  d == null || d(y.target.value), c(y.target.value);
1749
- }, [d]), f = $(null);
1752
+ }, [d]), f = J(null);
1750
1753
  ke(() => {
1751
- f.current && (f.current.style.height = "inherit", f.current.style.height = `${Math.max(f.current.scrollHeight + 2, Ai)}px`);
1754
+ f.current && (f.current.style.height = "inherit", f.current.style.height = `${Math.max(f.current.scrollHeight + 2, Ti)}px`);
1752
1755
  }, [s]), ke(() => {
1753
1756
  f.current && f.current.focus({
1754
1757
  preventScroll: !0
@@ -1770,9 +1773,9 @@ function Li({
1770
1773
  document.addEventListener("mouseup", P), document.addEventListener("keyup", P);
1771
1774
  }
1772
1775
  }, []);
1773
- return /* @__PURE__ */ h(Si, {
1776
+ return /* @__PURE__ */ h(Di, {
1774
1777
  theme: S,
1775
- children: [/* @__PURE__ */ i(Ci, {
1778
+ children: [/* @__PURE__ */ i(Si, {
1776
1779
  recentPrompts: r,
1777
1780
  suggestions: o,
1778
1781
  isLoading: n,
@@ -1780,20 +1783,20 @@ function Li({
1780
1783
  anchorEl: f.current,
1781
1784
  text: s,
1782
1785
  recommendationsError: l
1783
- }), t && /* @__PURE__ */ i(pe, {
1786
+ }), t && /* @__PURE__ */ i(ge, {
1784
1787
  title: M("ai.buttons.clearChat"),
1785
1788
  placement: "bottom-start",
1786
- children: /* @__PURE__ */ i(Mi, {
1789
+ children: /* @__PURE__ */ i(Ii, {
1787
1790
  "aria-label": "clear history",
1788
1791
  onClick: t,
1789
- children: /* @__PURE__ */ i(bi, {
1792
+ children: /* @__PURE__ */ i(xi, {
1790
1793
  theme: S
1791
1794
  })
1792
1795
  })
1793
- }), /* @__PURE__ */ i(Di, {
1796
+ }), /* @__PURE__ */ i(Ai, {
1794
1797
  "aria-label": "chat input",
1795
1798
  onBlur: z,
1796
- maxLength: vi,
1799
+ maxLength: Mi,
1797
1800
  ref: f,
1798
1801
  rows: 1,
1799
1802
  onChange: w,
@@ -1802,21 +1805,21 @@ function Li({
1802
1805
  value: s,
1803
1806
  onKeyDown: x,
1804
1807
  theme: S
1805
- }), /* @__PURE__ */ i(Ii, {
1808
+ }), /* @__PURE__ */ i(Li, {
1806
1809
  "aria-label": "send chat message",
1807
1810
  disabled: a || s.length === 0,
1808
1811
  onClick: p,
1809
1812
  theme: S,
1810
1813
  children: /* @__PURE__ */ i("span", {
1811
1814
  "data-state": "closed",
1812
- children: /* @__PURE__ */ i(mi, {
1815
+ children: /* @__PURE__ */ i(fi, {
1813
1816
  theme: S
1814
1817
  })
1815
1818
  })
1816
1819
  })]
1817
1820
  });
1818
1821
  }
1819
- const Ti = /* @__PURE__ */ u("div", {
1822
+ const ji = /* @__PURE__ */ u("div", {
1820
1823
  target: "er3yjg60",
1821
1824
  label: "FlexContainer"
1822
1825
  })("display:flex;", ({
@@ -1825,7 +1828,7 @@ const Ti = /* @__PURE__ */ u("div", {
1825
1828
  justify-content: flex-end;
1826
1829
  ` : T`
1827
1830
  justify-content: flex-start;
1828
- `), Yt = /* @__PURE__ */ u("div", {
1831
+ `), Pt = /* @__PURE__ */ u("div", {
1829
1832
  target: "er3yjg61",
1830
1833
  label: "MessageContainer"
1831
1834
  })("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;", ({
@@ -1845,56 +1848,56 @@ const Ti = /* @__PURE__ */ u("div", {
1845
1848
  }) => e.aiChat.primaryTextColor, ";background-color:", ({
1846
1849
  theme: e,
1847
1850
  align: t
1848
- }) => t === "right" ? e.aiChat.userMessages.backgroundColor : e.aiChat.systemMessages.backgroundColor, ";"), Q = ({
1851
+ }) => t === "right" ? e.aiChat.userMessages.backgroundColor : e.aiChat.systemMessages.backgroundColor, ";"), B = ({
1849
1852
  align: e,
1850
1853
  children: t
1851
1854
  }) => {
1852
1855
  const {
1853
1856
  themeSettings: a
1854
1857
  } = k();
1855
- return /* @__PURE__ */ i(Ti, {
1858
+ return /* @__PURE__ */ i(ji, {
1856
1859
  theme: a,
1857
1860
  align: e,
1858
- children: /* @__PURE__ */ i(Yt, {
1861
+ children: /* @__PURE__ */ i(Pt, {
1859
1862
  theme: a,
1860
1863
  align: e,
1861
1864
  children: t
1862
1865
  })
1863
1866
  });
1864
1867
  };
1865
- function Ni() {
1868
+ function Oi() {
1866
1869
  const {
1867
1870
  welcomeText: e
1868
- } = H();
1869
- return e === !1 ? null : /* @__PURE__ */ i(Q, {
1871
+ } = Y();
1872
+ return e === !1 ? null : /* @__PURE__ */ i(B, {
1870
1873
  align: "left",
1871
1874
  children: e
1872
1875
  });
1873
1876
  }
1874
- const ji = /* @__PURE__ */ u("div", {
1877
+ const Ei = /* @__PURE__ */ u("div", {
1875
1878
  target: "e1r5p4wy0",
1876
1879
  label: "Container"
1877
- })("margin:auto;display:flex;flex-direction:column;align-items:center;row-gap:21px;"), Oi = /* @__PURE__ */ u("div", {
1880
+ })("margin:auto;display:flex;flex-direction:column;align-items:center;row-gap:21px;"), zi = /* @__PURE__ */ u("div", {
1878
1881
  target: "e1r5p4wy1",
1879
1882
  label: "Title"
1880
1883
  })("color:", ({
1881
1884
  theme: e
1882
- }) => e.aiChat.primaryTextColor, ";text-align:center;font-weight:600;"), Ei = /* @__PURE__ */ u("div", {
1885
+ }) => e.aiChat.primaryTextColor, ";text-align:center;font-weight:600;"), Zi = /* @__PURE__ */ u("div", {
1883
1886
  target: "e1r5p4wy2",
1884
1887
  label: "ActionButton"
1885
1888
  })("color:rgba(54,163,217,1);cursor:pointer;");
1886
- function Bt({
1889
+ function Ht({
1887
1890
  text: e,
1888
1891
  action: t
1889
1892
  }) {
1890
1893
  const {
1891
1894
  themeSettings: a
1892
1895
  } = k();
1893
- return /* @__PURE__ */ h(ji, {
1894
- children: [/* @__PURE__ */ i(Oi, {
1896
+ return /* @__PURE__ */ h(Ei, {
1897
+ children: [/* @__PURE__ */ i(zi, {
1895
1898
  theme: a,
1896
1899
  children: e
1897
- }), /* @__PURE__ */ i(wa, {}), t && /* @__PURE__ */ i(Ei, {
1900
+ }), /* @__PURE__ */ i(xa, {}), t && /* @__PURE__ */ i(Zi, {
1898
1901
  onClick: t.onClick,
1899
1902
  children: t.text
1900
1903
  })]
@@ -1922,7 +1925,7 @@ function Qt() {
1922
1925
  })]
1923
1926
  });
1924
1927
  }
1925
- const zi = /* @__PURE__ */ u("div", {
1928
+ const Ri = /* @__PURE__ */ u("div", {
1926
1929
  target: "ed5z2fc0",
1927
1930
  label: "FlexContainer"
1928
1931
  })("display:flex;", ({
@@ -1931,7 +1934,7 @@ const zi = /* @__PURE__ */ u("div", {
1931
1934
  justify-content: flex-end;
1932
1935
  ` : T`
1933
1936
  justify-content: flex-start;
1934
- `), Zi = /* @__PURE__ */ u("button", {
1937
+ `), Wi = /* @__PURE__ */ u("button", {
1935
1938
  target: "ed5z2fc1",
1936
1939
  label: "MessageButton"
1937
1940
  })("font-family:inherit;font-size:inherit;line-height:inherit;border:", ({
@@ -1996,9 +1999,9 @@ function we({
1996
1999
  const {
1997
2000
  themeSettings: l
1998
2001
  } = k();
1999
- return /* @__PURE__ */ i(zi, {
2002
+ return /* @__PURE__ */ i(Ri, {
2000
2003
  align: t,
2001
- children: /* @__PURE__ */ i(Zi, {
2004
+ children: /* @__PURE__ */ i(Wi, {
2002
2005
  "aria-label": n,
2003
2006
  theme: l,
2004
2007
  onClick: a,
@@ -2009,7 +2012,7 @@ function we({
2009
2012
  })
2010
2013
  });
2011
2014
  }
2012
- function Ri({
2015
+ function qi({
2013
2016
  onCancel: e,
2014
2017
  onConfirm: t
2015
2018
  }) {
@@ -2017,7 +2020,7 @@ function Ri({
2017
2020
  t: a
2018
2021
  } = C();
2019
2022
  return /* @__PURE__ */ h(j, {
2020
- children: [/* @__PURE__ */ i(Q, {
2023
+ children: [/* @__PURE__ */ i(B, {
2021
2024
  align: "left",
2022
2025
  children: a("ai.clearHistoryPrompt")
2023
2026
  }), /* @__PURE__ */ h("div", {
@@ -2042,12 +2045,12 @@ function Ri({
2042
2045
  })]
2043
2046
  });
2044
2047
  }
2045
- function Wi(e) {
2046
- return Ca("MuiDialog", e);
2048
+ function Gi(e) {
2049
+ return ya("MuiDialog", e);
2047
2050
  }
2048
- const Le = la("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), Ut = /* @__PURE__ */ ye({});
2049
- process.env.NODE_ENV !== "production" && (Ut.displayName = "DialogContext");
2050
- const Gi = ["aria-describedby", "aria-labelledby", "BackdropComponent", "BackdropProps", "children", "className", "disableEscapeKeyDown", "fullScreen", "fullWidth", "maxWidth", "onBackdropClick", "onClick", "onClose", "open", "PaperComponent", "PaperProps", "scroll", "TransitionComponent", "transitionDuration", "TransitionProps"], qi = _e(da, {
2051
+ const Le = oa("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), Bt = /* @__PURE__ */ ye({});
2052
+ process.env.NODE_ENV !== "production" && (Bt.displayName = "DialogContext");
2053
+ const Yi = ["aria-describedby", "aria-labelledby", "BackdropComponent", "BackdropProps", "children", "className", "disableEscapeKeyDown", "fullScreen", "fullWidth", "maxWidth", "onBackdropClick", "onClick", "onClose", "open", "PaperComponent", "PaperProps", "scroll", "TransitionComponent", "transitionDuration", "TransitionProps"], Pi = _e(na, {
2051
2054
  name: "MuiDialog",
2052
2055
  slot: "Backdrop",
2053
2056
  overrides: (e, t) => t.backdrop
@@ -2066,8 +2069,8 @@ const Gi = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
2066
2069
  container: ["container", `scroll${ee(a)}`],
2067
2070
  paper: ["paper", `paperScroll${ee(a)}`, `paperWidth${ee(String(r))}`, o && "paperFullWidth", n && "paperFullScreen"]
2068
2071
  };
2069
- return fa(l, Wi, t);
2070
- }, Pi = _e(sa, {
2072
+ return ma(l, Gi, t);
2073
+ }, Qi = _e(la, {
2071
2074
  name: "MuiDialog",
2072
2075
  slot: "Root",
2073
2076
  overridesResolver: (e, t) => t.root
@@ -2076,7 +2079,7 @@ const Gi = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
2076
2079
  // Use !important to override the Modal inline-style.
2077
2080
  position: "absolute !important"
2078
2081
  }
2079
- }), Yi = _e("div", {
2082
+ }), Bi = _e("div", {
2080
2083
  name: "MuiDialog",
2081
2084
  slot: "Container",
2082
2085
  overridesResolver: (e, t) => {
@@ -2109,7 +2112,7 @@ const Gi = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
2109
2112
  height: "100%",
2110
2113
  width: "0"
2111
2114
  }
2112
- })), Bi = _e(ft, {
2115
+ })), Ui = _e(ft, {
2113
2116
  name: "MuiDialog",
2114
2117
  slot: "Paper",
2115
2118
  overridesResolver: (e, t) => {
@@ -2168,11 +2171,11 @@ const Gi = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
2168
2171
  margin: 0,
2169
2172
  maxWidth: "100%"
2170
2173
  }
2171
- })), Ft = /* @__PURE__ */ kt(function(e, t) {
2172
- const a = ca({
2174
+ })), Ut = /* @__PURE__ */ kt(function(e, t) {
2175
+ const a = da({
2173
2176
  props: e,
2174
2177
  name: "MuiDialog"
2175
- }), r = pa(), o = {
2178
+ }), r = sa(), o = {
2176
2179
  enter: r.transitions.duration.enteringScreen,
2177
2180
  exit: r.transitions.duration.leavingScreen
2178
2181
  }, {
@@ -2193,27 +2196,27 @@ const Gi = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
2193
2196
  PaperComponent: y = ft,
2194
2197
  PaperProps: N = {},
2195
2198
  scroll: P = "paper",
2196
- TransitionComponent: R = xa,
2199
+ TransitionComponent: R = ba,
2197
2200
  transitionDuration: U = o,
2198
2201
  TransitionProps: Se
2199
- } = a, ue = ga(a, Gi), F = V({}, a, {
2202
+ } = a, ue = ca(a, Yi), F = V({}, a, {
2200
2203
  disableEscapeKeyDown: p,
2201
2204
  fullScreen: m,
2202
2205
  fullWidth: x,
2203
2206
  maxWidth: w,
2204
2207
  scroll: P
2205
- }), X = Hi(F), ae = $(), Me = (W) => {
2208
+ }), X = Hi(F), ae = J(), Me = (W) => {
2206
2209
  ae.current = W.target === W.currentTarget;
2207
2210
  }, re = (W) => {
2208
2211
  S && S(W), ae.current && (ae.current = null, f && f(W), M && M(W, "backdropClick"));
2209
- }, ie = ua(l), E = O(() => ({
2212
+ }, ie = pa(l), E = O(() => ({
2210
2213
  titleId: ie
2211
2214
  }), [ie]);
2212
- return /* @__PURE__ */ oe(Pi, V({
2215
+ return /* @__PURE__ */ oe(Qi, V({
2213
2216
  className: Ie(X.root, g),
2214
2217
  closeAfterTransition: !0,
2215
2218
  components: {
2216
- Backdrop: qi
2219
+ Backdrop: Pi
2217
2220
  },
2218
2221
  componentsProps: {
2219
2222
  backdrop: V({
@@ -2234,11 +2237,11 @@ const Gi = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
2234
2237
  timeout: U,
2235
2238
  role: "presentation"
2236
2239
  }, Se, {
2237
- children: /* @__PURE__ */ oe(Yi, {
2240
+ children: /* @__PURE__ */ oe(Bi, {
2238
2241
  className: Ie(X.container),
2239
2242
  onMouseDown: Me,
2240
2243
  ownerState: F,
2241
- children: /* @__PURE__ */ oe(Bi, V({
2244
+ children: /* @__PURE__ */ oe(Ui, V({
2242
2245
  as: y,
2243
2246
  elevation: 24,
2244
2247
  role: "dialog",
@@ -2247,7 +2250,7 @@ const Gi = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
2247
2250
  }, N, {
2248
2251
  className: Ie(X.paper, N.className),
2249
2252
  ownerState: F,
2250
- children: /* @__PURE__ */ oe(Ut.Provider, {
2253
+ children: /* @__PURE__ */ oe(Bt.Provider, {
2251
2254
  value: E,
2252
2255
  children: c
2253
2256
  })
@@ -2256,7 +2259,7 @@ const Gi = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
2256
2259
  }))
2257
2260
  }));
2258
2261
  });
2259
- process.env.NODE_ENV !== "production" && (Ft.propTypes = {
2262
+ process.env.NODE_ENV !== "production" && (Ut.propTypes = {
2260
2263
  // ┌────────────────────────────── Warning ──────────────────────────────┐
2261
2264
  // │ These PropTypes are generated from the TypeScript type definitions. │
2262
2265
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
@@ -2388,7 +2391,7 @@ process.env.NODE_ENV !== "production" && (Ft.propTypes = {
2388
2391
  */
2389
2392
  TransitionProps: b.object
2390
2393
  });
2391
- function Qi({
2394
+ function Fi({
2392
2395
  fillColor: e = "#262E3D"
2393
2396
  }) {
2394
2397
  return /* @__PURE__ */ h("svg", {
@@ -2412,105 +2415,7 @@ function Qi({
2412
2415
  })]
2413
2416
  });
2414
2417
  }
2415
- const Vt = {
2416
- row: {
2417
- hover: "rgba(224, 224, 224, 0.3)"
2418
- },
2419
- secondary: {
2420
- default: "rgba(38, 46, 61, 0.1)",
2421
- hover: "rgba(38, 46, 61, 0.17)"
2422
- },
2423
- text: {
2424
- active: "rgba(38, 46, 61, 1)",
2425
- content: "rgba(38, 46, 61, 0.8)",
2426
- secondary: "rgba(38, 46, 61, 0.55)",
2427
- disabled: "rgba(38, 46, 61, 0.3)",
2428
- link: "rgba(54, 163, 217, 1)",
2429
- accented: "rgba(12, 14, 18, 1)",
2430
- linkButton: "#1eaff3",
2431
- primary: "#262E3D"
2432
- },
2433
- UI: {
2434
- default: "#6e737d",
2435
- additional: "rgba(38, 46, 61, 0.4)",
2436
- guiding: "rgba(38, 46, 61, 0.1)"
2437
- },
2438
- background: {
2439
- workspace: "rgba(255, 255, 255, 1)",
2440
- supporting: "rgba(249, 249, 251, 1)",
2441
- priority: "rgba(244, 244, 248, 1)"
2442
- },
2443
- primary: {
2444
- primary: "rgba(255, 203, 5, 1)",
2445
- default: "#FFC805",
2446
- hover: "#F2B900"
2447
- },
2448
- interaction: {
2449
- defaultHover: "rgba(12, 14, 18, 0.07)",
2450
- guidingHover: "rgba(38, 46, 61, 0.17)",
2451
- linkHovered: "rgba(50, 147, 197, 1)",
2452
- primaryHovered: "rgba(242, 185, 0, 1)"
2453
- },
2454
- semantic: {
2455
- info: "rgba(52, 150, 200, 1)",
2456
- success: "rgba(34, 195, 195, 1)",
2457
- warning: "rgba(242, 185, 0, 1)",
2458
- error: "rgba(231, 71, 39, 1)",
2459
- infoBG: "rgba(52, 150, 200, 0.1)",
2460
- successBG: "rgba(34, 195, 195, 0.1)",
2461
- warningBG: "rgba(242, 185, 0, 0.1)",
2462
- errorBG: "rgba(231, 71, 39, 0.1)"
2463
- },
2464
- sisenseDark: {
2465
- text: {
2466
- active: "rgba(235, 239, 247, 1)",
2467
- content: "rgba(235, 239, 247, 0.8)",
2468
- secondary: "rgba(235, 239, 247, 0.55)",
2469
- disabled: "rgba(235, 239, 247, 0.3)",
2470
- link: "rgba(50, 147, 197, 1)",
2471
- accented: "rgba(12, 14, 18, 1)"
2472
- },
2473
- ui: {
2474
- default: "rgba(235, 239, 247, 0.67)",
2475
- additional: "rgba(235, 239, 247, 0.4)",
2476
- guiding: "rgba(235, 239, 247, 0.1)"
2477
- },
2478
- background: {
2479
- workspace: "rgba(12, 14, 18, 1)",
2480
- supporting: "rgba(249, 249, 251, 1)",
2481
- priority: "rgba(244, 244, 248, 1)"
2482
- },
2483
- interaction: {
2484
- defaultHover: "rgba(12, 14, 18, 0.07)",
2485
- guidingHover: "rgba(235, 239, 247, 0.17)",
2486
- linkHovered: "rgba(50, 147, 197, 1)",
2487
- primaryHovered: "rgba(242, 185, 0, 1)"
2488
- },
2489
- semantic: {
2490
- info: "rgba(52, 150, 200, 1)",
2491
- success: "rgba(34, 195, 195, 1)",
2492
- warning: "rgba(242, 185, 0, 1)",
2493
- error: "rgba(231, 71, 39, 1)",
2494
- infoBG: "rgba(52, 150, 200, 0.1)",
2495
- successBG: "rgba(34, 195, 195, 0.1)",
2496
- warningBG: "rgba(242, 185, 0, 0.1)",
2497
- errorBG: "rgba(231, 71, 39, 0.1)"
2498
- }
2499
- }
2500
- }, Ui = {
2501
- shouldForwardProp: (e) => !e.startsWith("$")
2502
- }, ge = /* @__PURE__ */ u(St, Ui, {
2503
- target: "e869yoj0",
2504
- label: "IconButton"
2505
- })(({
2506
- $hoverColor: e
2507
- }) => ({
2508
- padding: 2,
2509
- "&.MuiIconButton-root:hover": {
2510
- backgroundColor: e ?? Vt.interaction.defaultHover
2511
- }
2512
- }));
2513
- function Fi({
2418
+ function Vi({
2514
2419
  fill: e = "rgba(38, 46, 61, 0.67)"
2515
2420
  }) {
2516
2421
  return /* @__PURE__ */ i("svg", {
@@ -2527,7 +2432,7 @@ function Fi({
2527
2432
  })
2528
2433
  });
2529
2434
  }
2530
- function Vi({
2435
+ function Ji({
2531
2436
  fill: e = "rgba(38, 46, 61, 0.67)"
2532
2437
  }) {
2533
2438
  return /* @__PURE__ */ i("svg", {
@@ -2560,35 +2465,18 @@ function $i() {
2560
2465
  })
2561
2466
  });
2562
2467
  }
2563
- function Ji({
2564
- fill: e = "rgba(38, 46, 61, 0.67)"
2565
- }) {
2566
- return /* @__PURE__ */ i("svg", {
2567
- xmlns: "http://www.w3.org/2000/svg",
2568
- width: "24",
2569
- height: "24",
2570
- viewBox: "0 0 24 24",
2571
- fill: "none",
2572
- children: /* @__PURE__ */ i("path", {
2573
- fillRule: "evenodd",
2574
- clipRule: "evenodd",
2575
- d: "M11 7C11 6.44772 11.4477 6 12 6C12.5523 6 13 6.44772 13 7C13 7.55228 12.5523 8 12 8C11.4477 8 11 7.55228 11 7ZM11 12C11 11.4477 11.4477 11 12 11C12.5523 11 13 11.4477 13 12C13 12.5523 12.5523 13 12 13C11.4477 13 11 12.5523 11 12ZM12 16C11.4477 16 11 16.4477 11 17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17C13 16.4477 12.5523 16 12 16Z",
2576
- fill: e
2577
- })
2578
- });
2579
- }
2580
2468
  const Ue = (e) => Ct(e.chart.backgroundColor), Xi = ({
2581
2469
  title: e
2582
2470
  }) => {
2583
2471
  const {
2584
2472
  themeSettings: t
2585
2473
  } = k();
2586
- return /* @__PURE__ */ i(pe, {
2474
+ return /* @__PURE__ */ i(ge, {
2587
2475
  title: e,
2588
- children: /* @__PURE__ */ i(ge, {
2476
+ children: /* @__PURE__ */ i(pe, {
2589
2477
  disableTouchRipple: !0,
2590
2478
  $hoverColor: Ue(t),
2591
- children: /* @__PURE__ */ i(Vi, {
2479
+ children: /* @__PURE__ */ i(Ji, {
2592
2480
  fill: t.chart.textColor
2593
2481
  })
2594
2482
  })
@@ -2604,14 +2492,14 @@ const Ue = (e) => Ct(e.chart.backgroundColor), Xi = ({
2604
2492
  themeSettings: n
2605
2493
  } = k();
2606
2494
  return /* @__PURE__ */ h(j, {
2607
- children: [/* @__PURE__ */ i(ge, {
2495
+ children: [/* @__PURE__ */ i(pe, {
2608
2496
  onClick: r,
2609
2497
  $hoverColor: Ue(n),
2610
2498
  "aria-label": "three dots button",
2611
- children: /* @__PURE__ */ i(Ji, {
2499
+ children: /* @__PURE__ */ i(Ja, {
2612
2500
  fill: n.chart.textColor
2613
2501
  })
2614
- }), /* @__PURE__ */ i(Ja, {
2502
+ }), /* @__PURE__ */ i(Ka, {
2615
2503
  anchorEl: t,
2616
2504
  anchorOrigin: {
2617
2505
  vertical: "bottom",
@@ -2630,7 +2518,7 @@ const Ue = (e) => Ct(e.chart.backgroundColor), Xi = ({
2630
2518
  sx: {
2631
2519
  fontSize: "13px",
2632
2520
  fontFamily: n.typography.fontFamily,
2633
- color: Vt.text.content
2521
+ color: Xa.text.content
2634
2522
  },
2635
2523
  disableRipple: !0,
2636
2524
  children: [l.icon, /* @__PURE__ */ i("div", {
@@ -2648,12 +2536,12 @@ const Ue = (e) => Ct(e.chart.backgroundColor), Xi = ({
2648
2536
  } = k(), {
2649
2537
  t: a
2650
2538
  } = C();
2651
- return /* @__PURE__ */ i(pe, {
2539
+ return /* @__PURE__ */ i(ge, {
2652
2540
  title: a("ai.preview"),
2653
- children: /* @__PURE__ */ i(ge, {
2541
+ children: /* @__PURE__ */ i(pe, {
2654
2542
  onClick: e,
2655
2543
  $hoverColor: Ue(t),
2656
- children: /* @__PURE__ */ i(Fi, {
2544
+ children: /* @__PURE__ */ i(Vi, {
2657
2545
  fill: t.chart.textColor
2658
2546
  })
2659
2547
  })
@@ -2692,7 +2580,7 @@ function ro({
2692
2580
  inlineElement: o,
2693
2581
  expandedElement: n
2694
2582
  } = O(() => {
2695
- const l = Ye(e, {
2583
+ const l = He(e, {
2696
2584
  useCustomizedStyleOptions: !0
2697
2585
  });
2698
2586
  if (l === void 0 || !_t(l))
@@ -2751,7 +2639,7 @@ function ro({
2751
2639
  };
2752
2640
  }, [e]);
2753
2641
  return /* @__PURE__ */ h(j, {
2754
- children: [o, /* @__PURE__ */ h(Ft, {
2642
+ children: [o, /* @__PURE__ */ h(Ut, {
2755
2643
  open: t,
2756
2644
  onClose: () => a(!1),
2757
2645
  maxWidth: "xl",
@@ -2767,10 +2655,10 @@ function ro({
2767
2655
  children: [/* @__PURE__ */ i("div", {
2768
2656
  className: "csdk-text-ai-lg csdk-semibold",
2769
2657
  children: e.queryTitle
2770
- }), /* @__PURE__ */ i(St, {
2658
+ }), /* @__PURE__ */ i(Ba, {
2771
2659
  onClick: () => a(!1),
2772
2660
  "aria-label": "close expanded chart",
2773
- children: /* @__PURE__ */ i(Qi, {
2661
+ children: /* @__PURE__ */ i(Fi, {
2774
2662
  fillColor: r.aiChat.primaryTextColor
2775
2663
  })
2776
2664
  })]
@@ -2807,9 +2695,9 @@ function oo({
2807
2695
  } = k(), {
2808
2696
  t: r
2809
2697
  } = C();
2810
- return /* @__PURE__ */ i(pe, {
2698
+ return /* @__PURE__ */ i(ge, {
2811
2699
  title: r("ai.buttons.incorrectResponse"),
2812
- children: /* @__PURE__ */ i(ge, {
2700
+ children: /* @__PURE__ */ i(pe, {
2813
2701
  "aria-label": "thumbs-down",
2814
2702
  onClick: e,
2815
2703
  $hoverColor: a.aiChat.icons.feedbackIcons.hoverColor,
@@ -2846,9 +2734,9 @@ function lo({
2846
2734
  } = k(), {
2847
2735
  t: r
2848
2736
  } = C();
2849
- return /* @__PURE__ */ i(pe, {
2737
+ return /* @__PURE__ */ i(ge, {
2850
2738
  title: r("ai.buttons.correctResponse"),
2851
- children: /* @__PURE__ */ i(ge, {
2739
+ children: /* @__PURE__ */ i(pe, {
2852
2740
  "aria-label": "thumbs-up",
2853
2741
  onClick: e,
2854
2742
  $hoverColor: a.aiChat.icons.feedbackIcons.hoverColor,
@@ -2860,7 +2748,7 @@ function lo({
2860
2748
  });
2861
2749
  }
2862
2750
  const so = () => {
2863
- const [e, t] = I(!1), a = $(null), r = _(() => {
2751
+ const [e, t] = I(!1), a = J(null), r = _(() => {
2864
2752
  t(!0);
2865
2753
  }, []), o = _(() => {
2866
2754
  t(!1);
@@ -2900,7 +2788,7 @@ function pt({
2900
2788
  buttonVisibility: r = "onHover",
2901
2789
  renderContent: o
2902
2790
  }) {
2903
- const n = q(), l = Ua(_((p) => {
2791
+ const n = G(), l = Ua(_((p) => {
2904
2792
  n && n.ai.sendFeedback({
2905
2793
  sourceId: e,
2906
2794
  type: a,
@@ -2920,12 +2808,12 @@ function pt({
2920
2808
  });
2921
2809
  }
2922
2810
  const go = 18 * 5;
2923
- function $t({
2811
+ function Ft({
2924
2812
  text: e
2925
2813
  }) {
2926
2814
  const [t, a] = I(!0), [r, o] = I(!1), {
2927
2815
  t: n
2928
- } = C(), l = $(null);
2816
+ } = C(), l = J(null);
2929
2817
  return ke(() => {
2930
2818
  l.current && l.current.scrollHeight > go && o(!0);
2931
2819
  }, [e]), /* @__PURE__ */ h("div", {
@@ -2950,15 +2838,15 @@ function uo({
2950
2838
  data: t,
2951
2839
  isLoading: a,
2952
2840
  isError: r
2953
- } = Wt(e), {
2841
+ } = Rt(e), {
2954
2842
  t: o
2955
2843
  } = C();
2956
- return a ? /* @__PURE__ */ i(Qt, {}) : r ? /* @__PURE__ */ i(Q, {
2844
+ return a ? /* @__PURE__ */ i(Qt, {}) : r ? /* @__PURE__ */ i(B, {
2957
2845
  align: "left",
2958
2846
  children: o("ai.errors.unexpected")
2959
- }) : /* @__PURE__ */ i(Q, {
2847
+ }) : /* @__PURE__ */ i(B, {
2960
2848
  align: "full",
2961
- children: /* @__PURE__ */ i($t, {
2849
+ children: /* @__PURE__ */ i(Ft, {
2962
2850
  text: t ?? o("ai.errors.insightsNotAvailable")
2963
2851
  })
2964
2852
  });
@@ -3008,7 +2896,7 @@ function xo({
3008
2896
  const {
3009
2897
  chatMode: a = "analyze",
3010
2898
  enableInsights: r
3011
- } = H(), {
2899
+ } = Y(), {
3012
2900
  themeSettings: o
3013
2901
  } = k(), {
3014
2902
  queryTitle: n,
@@ -3036,7 +2924,7 @@ function xo({
3036
2924
  buttonVisibility: t ? "always" : "onHover",
3037
2925
  renderContent: (M) => /* @__PURE__ */ h(j, {
3038
2926
  children: [/* @__PURE__ */ h(gt, {
3039
- children: [/* @__PURE__ */ i(Yt, {
2927
+ children: [/* @__PURE__ */ i(Pt, {
3040
2928
  align: "left",
3041
2929
  theme: o,
3042
2930
  children: s || `Here's ${g} showing ${bo(n)}.`
@@ -3066,23 +2954,23 @@ function ko({
3066
2954
  message: e,
3067
2955
  isLastMessage: t
3068
2956
  }) {
3069
- if (Pt(e)) {
2957
+ if (Yt(e)) {
3070
2958
  const r = JSON.parse(e.content);
3071
2959
  return /* @__PURE__ */ i(xo, {
3072
2960
  data: r,
3073
2961
  alwaysShowFeedback: t
3074
2962
  });
3075
2963
  }
3076
- const a = li(e) ? JSON.parse(e.content).answer : e.content;
3077
- return /* @__PURE__ */ i(Q, {
2964
+ const a = si(e) ? JSON.parse(e.content).answer : e.content;
2965
+ return /* @__PURE__ */ i(B, {
3078
2966
  align: e.role === "user" ? "right" : "left",
3079
2967
  children: a
3080
2968
  });
3081
2969
  }
3082
- const wo = /* @__PURE__ */ Ta(ko), yo = ({
2970
+ const wo = /* @__PURE__ */ Aa(ko), yo = ({
3083
2971
  error: e,
3084
2972
  displayMessage: t
3085
- }) => (console.debug("Unexpected error occurred when resolving a chat message:", e), /* @__PURE__ */ i(Q, {
2973
+ }) => (console.debug("Unexpected error occurred when resolving a chat message:", e), /* @__PURE__ */ i(B, {
3086
2974
  align: "left",
3087
2975
  children: t
3088
2976
  }));
@@ -3093,7 +2981,7 @@ function _o({
3093
2981
  t
3094
2982
  } = C();
3095
2983
  return /* @__PURE__ */ i(j, {
3096
- children: e.map((a, r) => /* @__PURE__ */ i(va, {
2984
+ children: e.map((a, r) => /* @__PURE__ */ i(_a, {
3097
2985
  fallbackRender: (o) => yo(L(v({}, o), {
3098
2986
  displayMessage: t("ai.errors.unexpected")
3099
2987
  })),
@@ -3104,7 +2992,7 @@ function _o({
3104
2992
  }, r))
3105
2993
  });
3106
2994
  }
3107
- function Jt({
2995
+ function Vt({
3108
2996
  color: e
3109
2997
  }) {
3110
2998
  return /* @__PURE__ */ i("svg", {
@@ -3127,7 +3015,7 @@ function Co({
3127
3015
  "aria-label": "go back",
3128
3016
  className: "csdk-w-5 csdk-h-5 csdk-flex csdk-p-[4px] csdk-ml-[6px] csdk-cursor-pointer",
3129
3017
  onClick: e,
3130
- children: /* @__PURE__ */ i(Jt, {
3018
+ children: /* @__PURE__ */ i(Vt, {
3131
3019
  color: t
3132
3020
  })
3133
3021
  });
@@ -3256,9 +3144,9 @@ function Lo({
3256
3144
  }) {
3257
3145
  const r = e.length > 0, {
3258
3146
  suggestionsWelcomeText: o
3259
- } = H();
3147
+ } = Y();
3260
3148
  return t ? /* @__PURE__ */ i(Ao, {}) : r ? /* @__PURE__ */ h(j, {
3261
- children: [o && /* @__PURE__ */ i(Q, {
3149
+ children: [o && /* @__PURE__ */ i(B, {
3262
3150
  align: "left",
3263
3151
  children: o
3264
3152
  }), /* @__PURE__ */ i(Mo, {
@@ -3277,7 +3165,7 @@ const To = /* @__PURE__ */ u("div", {
3277
3165
  label: "ToolbarTitle"
3278
3166
  })("font-size:18px;line-height:22px;font-weight:600;margin-left:20px;color:", ({
3279
3167
  style: e
3280
- }) => e.textColor, ";"), Xt = /* @__PURE__ */ kt(function({
3168
+ }) => e.textColor, ";"), Jt = /* @__PURE__ */ kt(function({
3281
3169
  title: e,
3282
3170
  leftNav: t,
3283
3171
  rightNav: a,
@@ -3334,7 +3222,7 @@ function Eo() {
3334
3222
  });
3335
3223
  }
3336
3224
  const zo = (e, t) => {
3337
- const a = new qa(e);
3225
+ const a = new Wa(e);
3338
3226
  return a.alpha = t, a;
3339
3227
  }, Zo = /* @__PURE__ */ u("div", {
3340
3228
  target: "e1rxvpki0",
@@ -3374,7 +3262,7 @@ const zo = (e, t) => {
3374
3262
  children: /* @__PURE__ */ i(Ro, {
3375
3263
  onClick: t
3376
3264
  })
3377
- }), Go = /* @__PURE__ */ u("div", {
3265
+ }), qo = /* @__PURE__ */ u("div", {
3378
3266
  target: "ednrf320",
3379
3267
  label: "ChatBody"
3380
3268
  })("display:flex;flex-direction:column;row-gap:", ({
@@ -3387,7 +3275,7 @@ const zo = (e, t) => {
3387
3275
  theme: e
3388
3276
  }) => e.aiChat.body.paddingTop, ";padding-bottom:", ({
3389
3277
  theme: e
3390
- }) => e.aiChat.body.paddingBottom, ";flex:initial;height:100%;"), qo = /* @__PURE__ */ u("div", {
3278
+ }) => e.aiChat.body.paddingBottom, ";flex:initial;height:100%;"), Go = /* @__PURE__ */ u("div", {
3391
3279
  target: "ednrf321",
3392
3280
  label: "ChatFooter"
3393
3281
  })("padding-left:", ({
@@ -3398,7 +3286,7 @@ const zo = (e, t) => {
3398
3286
  theme: e
3399
3287
  }) => e.aiChat.footer.paddingTop, ";padding-bottom:", ({
3400
3288
  theme: e
3401
- }) => e.aiChat.footer.paddingBottom, ";display:flex;flex-direction:column;row-gap:6px;"), Ho = /* @__PURE__ */ u("div", {
3289
+ }) => e.aiChat.footer.paddingBottom, ";display:flex;flex-direction:column;row-gap:6px;"), Yo = /* @__PURE__ */ u("div", {
3402
3290
  target: "ednrf322",
3403
3291
  label: "FollowupQuestionsContainer"
3404
3292
  })("display:flex;flex-direction:column;row-gap:", ({
@@ -3417,13 +3305,13 @@ function Po({
3417
3305
  enableHeader: s,
3418
3306
  numOfRecentPrompts: c,
3419
3307
  numOfRecommendations: g
3420
- } = H(), {
3308
+ } = Y(), {
3421
3309
  themeSettings: p
3422
3310
  } = k(), {
3423
3311
  data: m,
3424
3312
  isLoading: x,
3425
3313
  isError: w
3426
- } = $r({
3314
+ } = Xr({
3427
3315
  contextTitle: e,
3428
3316
  count: g
3429
3317
  }), f = O(() => m == null ? void 0 : m.map((A) => A.nlqPrompt), [m]), {
@@ -3434,67 +3322,67 @@ function Po({
3434
3322
  isLoading: N,
3435
3323
  chatId: P,
3436
3324
  lastError: R
3437
- } = di(e, a), {
3325
+ } = ci(e, a), {
3438
3326
  mutate: U,
3439
3327
  isLoading: Se
3440
- } = Ht(P), [ue, F] = I(!1), [X, ae] = I(!1), Me = () => F(!0), re = () => F(!1), ie = () => {
3328
+ } = Gt(P), [ue, F] = I(!1), [X, ae] = I(!1), Me = () => F(!0), re = () => F(!1), ie = () => {
3441
3329
  U(), re();
3442
- }, E = $(null), W = $(null), aa = () => {
3330
+ }, E = J(null), W = J(null), ea = () => {
3443
3331
  if (!(E != null && E.current))
3444
3332
  return;
3445
3333
  const {
3446
3334
  scrollTop: A,
3447
- clientHeight: Y,
3335
+ clientHeight: H,
3448
3336
  scrollHeight: Ve
3449
3337
  } = E.current;
3450
- if (A === void 0 || Y === void 0 || Ve === void 0)
3338
+ if (A === void 0 || H === void 0 || Ve === void 0)
3451
3339
  return;
3452
- const $e = Ve - A - Y > Y / 2;
3453
- X !== $e && ae($e);
3340
+ const Je = Ve - A - H > H / 2;
3341
+ X !== Je && ae(Je);
3454
3342
  };
3455
3343
  ke(() => {
3456
3344
  E.current && (E.current.scrollTop = E.current.scrollHeight);
3457
3345
  }, [S, ue, z]);
3458
- const ra = $(null), Fe = s ? /* @__PURE__ */ i(Xt, {
3459
- ref: ra,
3346
+ const ta = J(null), Fe = s ? /* @__PURE__ */ i(Jt, {
3347
+ ref: ta,
3460
3348
  title: e,
3461
3349
  leftNav: t && /* @__PURE__ */ i(Co, {
3462
3350
  onClick: t,
3463
3351
  color: p.aiChat.header.textColor
3464
3352
  }),
3465
3353
  style: p.aiChat.header
3466
- }) : null, ia = O(() => [...new Set(S.filter((A) => A.role === "user").filter((A) => !(f != null && f.includes(A.content))).map((A) => A.content).reverse())].slice(0, c), [S, c, f]);
3354
+ }) : null, aa = O(() => [...new Set(S.filter((A) => A.role === "user").filter((A) => !(f != null && f.includes(A.content))).map((A) => A.content).reverse())].slice(0, c), [S, c, f]);
3467
3355
  return (R == null ? void 0 : R.message) === l("ai.errors.chatUnavailable") ? /* @__PURE__ */ h(j, {
3468
- children: [s && Fe, /* @__PURE__ */ i(Bt, {
3356
+ children: [s && Fe, /* @__PURE__ */ i(Ht, {
3469
3357
  text: R.message
3470
3358
  })]
3471
3359
  }) : /* @__PURE__ */ h(j, {
3472
- children: [Fe, /* @__PURE__ */ h(Go, {
3360
+ children: [Fe, /* @__PURE__ */ h(qo, {
3473
3361
  ref: E,
3474
3362
  theme: p,
3475
- onScroll: aa,
3363
+ onScroll: ea,
3476
3364
  children: [/* @__PURE__ */ i(Wo, {
3477
3365
  isVisible: X,
3478
3366
  anchorElement: W.current,
3479
3367
  onClick: () => {
3480
- var A, Y;
3481
- (Y = E.current) == null || Y.scroll({
3368
+ var A, H;
3369
+ (H = E.current) == null || H.scroll({
3482
3370
  top: (A = E.current) == null ? void 0 : A.scrollHeight,
3483
3371
  behavior: "smooth"
3484
3372
  });
3485
3373
  }
3486
- }), /* @__PURE__ */ i(Ni, {}), /* @__PURE__ */ i(Lo, {
3374
+ }), /* @__PURE__ */ i(Oi, {}), /* @__PURE__ */ i(Lo, {
3487
3375
  questions: f || [],
3488
3376
  isLoading: x,
3489
3377
  onSelection: y
3490
- }), R && /* @__PURE__ */ i(Q, {
3378
+ }), R && /* @__PURE__ */ i(B, {
3491
3379
  align: "left",
3492
3380
  children: R.message
3493
3381
  }), N ? /* @__PURE__ */ i(Ce, {}) : /* @__PURE__ */ i(_o, {
3494
3382
  messages: S
3495
- }), d && M && ((o = (r = M.followupQuestions) == null ? void 0 : r.length) != null ? o : 0) > 0 && /* @__PURE__ */ i(Ho, {
3383
+ }), d && M && ((o = (r = M.followupQuestions) == null ? void 0 : r.length) != null ? o : 0) > 0 && /* @__PURE__ */ i(Yo, {
3496
3384
  theme: p,
3497
- children: (n = M.followupQuestions) == null ? void 0 : n.slice(0, 2).map((A, Y) => /* @__PURE__ */ i(we, {
3385
+ children: (n = M.followupQuestions) == null ? void 0 : n.slice(0, 2).map((A, H) => /* @__PURE__ */ i(we, {
3498
3386
  align: "left",
3499
3387
  onClick: () => {
3500
3388
  y(A);
@@ -3503,20 +3391,20 @@ function Po({
3503
3391
  className: "csdk-py-[7px] csdk-px-4",
3504
3392
  children: A
3505
3393
  })
3506
- }, Y))
3507
- }), (z || Se) && /* @__PURE__ */ i(Qt, {}), ue && /* @__PURE__ */ i(Ri, {
3394
+ }, H))
3395
+ }), (z || Se) && /* @__PURE__ */ i(Qt, {}), ue && /* @__PURE__ */ i(qi, {
3508
3396
  onCancel: re,
3509
3397
  onConfirm: ie
3510
3398
  })]
3511
- }), /* @__PURE__ */ h(qo, {
3399
+ }), /* @__PURE__ */ h(Go, {
3512
3400
  ref: W,
3513
3401
  theme: p,
3514
- children: [/* @__PURE__ */ i(Li, {
3402
+ children: [/* @__PURE__ */ i(Ni, {
3515
3403
  onSendMessage: y,
3516
3404
  disabled: z || N,
3517
3405
  onClearHistoryClick: Me,
3518
3406
  suggestions: f || [],
3519
- recentPrompts: ia,
3407
+ recentPrompts: aa,
3520
3408
  isLoading: x || N,
3521
3409
  recommendationsError: w,
3522
3410
  onChange: re
@@ -3526,19 +3414,19 @@ function Po({
3526
3414
  })]
3527
3415
  });
3528
3416
  }
3529
- const Yo = /* @__PURE__ */ u("button", {
3417
+ const Ho = /* @__PURE__ */ u("button", {
3530
3418
  target: "e5a38pw0",
3531
3419
  label: "Container"
3532
3420
  })("font-family:", ({
3533
3421
  theme: e
3534
3422
  }) => e.typography.fontFamily, ";padding:20px;border:none;display:flex;align-items:center;justify-content:space-between;text-align:left;border-radius:15px;box-shadow:0px 1px 2px rgba(9,9,10,0.1),0px 2px 4px rgba(9,9,10,0.1);cursor:pointer;background-color:", ({
3535
3423
  theme: e
3536
- }) => e.aiChat.dataTopics.items.backgroundColor, ";"), Bo = /* @__PURE__ */ u("div", {
3424
+ }) => e.aiChat.dataTopics.items.backgroundColor, ";"), Qo = /* @__PURE__ */ u("div", {
3537
3425
  target: "e5a38pw1",
3538
3426
  label: "Title"
3539
3427
  })("font-size:1.05rem;line-height:28px;color:", ({
3540
3428
  theme: e
3541
- }) => e.aiChat.dataTopics.items.textColor, ";"), Qo = /* @__PURE__ */ u("div", {
3429
+ }) => e.aiChat.dataTopics.items.textColor, ";"), Bo = /* @__PURE__ */ u("div", {
3542
3430
  target: "e5a38pw2",
3543
3431
  label: "Description"
3544
3432
  })("font-size:", ({
@@ -3559,19 +3447,19 @@ function Fo(e) {
3559
3447
  } = e, {
3560
3448
  themeSettings: o
3561
3449
  } = k();
3562
- return /* @__PURE__ */ h(Yo, {
3450
+ return /* @__PURE__ */ h(Ho, {
3563
3451
  onClick: r,
3564
3452
  theme: o,
3565
3453
  children: [/* @__PURE__ */ h("div", {
3566
- children: [/* @__PURE__ */ i(Bo, {
3454
+ children: [/* @__PURE__ */ i(Qo, {
3567
3455
  theme: o,
3568
3456
  children: t
3569
- }), /* @__PURE__ */ i(Qo, {
3457
+ }), /* @__PURE__ */ i(Bo, {
3570
3458
  theme: o,
3571
3459
  children: a
3572
3460
  })]
3573
3461
  }), /* @__PURE__ */ i(Uo, {
3574
- children: /* @__PURE__ */ i(Jt, {
3462
+ children: /* @__PURE__ */ i(Vt, {
3575
3463
  color: o.aiChat.icons.color
3576
3464
  })
3577
3465
  })]
@@ -3580,12 +3468,12 @@ function Fo(e) {
3580
3468
  const Vo = /* @__PURE__ */ u("div", {
3581
3469
  target: "emrh5y30",
3582
3470
  label: "FlexContainer"
3583
- })("padding:20px;display:flex;flex-direction:column;gap:20px;overflow:auto;"), $o = /* @__PURE__ */ u("div", {
3471
+ })("padding:20px;display:flex;flex-direction:column;gap:20px;overflow:auto;"), Jo = /* @__PURE__ */ u("div", {
3584
3472
  target: "emrh5y31",
3585
3473
  label: "Title"
3586
3474
  })("font-size:24px;line-height:32px;font-weight:600;text-align:center;padding-bottom:4px;color:", ({
3587
3475
  theme: e
3588
- }) => e.aiChat.primaryTextColor, ";"), Jo = /* @__PURE__ */ u("div", {
3476
+ }) => e.aiChat.primaryTextColor, ";"), $o = /* @__PURE__ */ u("div", {
3589
3477
  target: "emrh5y32",
3590
3478
  label: "Subtitle"
3591
3479
  })("font-size:15px;line-height:22px;color:", ({
@@ -3600,13 +3488,13 @@ function Xo(e) {
3600
3488
  t: r
3601
3489
  } = C();
3602
3490
  return /* @__PURE__ */ h(Vo, {
3603
- children: [/* @__PURE__ */ i($o, {
3491
+ children: [/* @__PURE__ */ i(Jo, {
3604
3492
  theme: a,
3605
3493
  children: r("ai.dataTopics")
3606
- }), /* @__PURE__ */ h(Jo, {
3494
+ }), /* @__PURE__ */ h($o, {
3607
3495
  theme: a,
3608
3496
  children: [r("ai.chatbotDescription"), /* @__PURE__ */ i("br", {}), /* @__PURE__ */ i("br", {}), r("ai.topicSelectPrompt")]
3609
- }), t.map((o) => /* @__PURE__ */ Sa(Fo, L(v({}, o), {
3497
+ }), t.map((o) => /* @__PURE__ */ Ca(Fo, L(v({}, o), {
3610
3498
  key: o.title
3611
3499
  })))]
3612
3500
  });
@@ -3688,16 +3576,16 @@ function on({
3688
3576
  }) {
3689
3577
  const {
3690
3578
  enableHeader: a
3691
- } = H(), {
3579
+ } = Y(), {
3692
3580
  themeSettings: r
3693
3581
  } = k(), {
3694
3582
  t: o
3695
3583
  } = C(), n = O(() => e == null ? void 0 : e.map((d) => ({
3696
3584
  title: d,
3697
3585
  onClick: () => t(d)
3698
- })), [e, t]), l = ya(_a(r.aiChat.header.backgroundColor)) > 0.5;
3586
+ })), [e, t]), l = ka(wa(r.aiChat.header.backgroundColor)) > 0.5;
3699
3587
  return /* @__PURE__ */ h(j, {
3700
- children: [a ? /* @__PURE__ */ i(Xt, {
3588
+ children: [a ? /* @__PURE__ */ i(Jt, {
3701
3589
  title: o("ai.analyticsChatbot"),
3702
3590
  leftNav: /* @__PURE__ */ i(an, {
3703
3591
  children: /* @__PURE__ */ i(tn, {
@@ -3717,10 +3605,10 @@ function nn() {
3717
3605
  const [e, t] = I(), [a, r] = I(), {
3718
3606
  data: o,
3719
3607
  fetchStatus: n
3720
- } = ei(), {
3608
+ } = ai(), {
3721
3609
  dataTopicsList: l,
3722
3610
  contextDetails: d
3723
- } = H(), {
3611
+ } = Y(), {
3724
3612
  t: s
3725
3613
  } = C(), c = s("ai.errors.noAvailableDataTopics"), g = _((w) => {
3726
3614
  w.length ? w.length === 1 && (r(void 0), t(w[0])) : r(c);
@@ -3733,7 +3621,7 @@ function nn() {
3733
3621
  }, [o, n, l, g]), m = se(), x = _(() => {
3734
3622
  r(void 0), m.invalidateQueries(["getDataTopics"]);
3735
3623
  }, [m]);
3736
- return a ? /* @__PURE__ */ i(Bt, {
3624
+ return a ? /* @__PURE__ */ i(Ht, {
3737
3625
  text: a,
3738
3626
  action: {
3739
3627
  text: s("ai.buttons.refresh"),
@@ -3758,9 +3646,9 @@ const ln = xt({
3758
3646
  } = e, {
3759
3647
  themeSettings: o
3760
3648
  } = k();
3761
- return /* @__PURE__ */ i(Jr, {
3649
+ return /* @__PURE__ */ i(Kr, {
3762
3650
  value: r ?? {},
3763
- children: /* @__PURE__ */ i(ui, {
3651
+ children: /* @__PURE__ */ i(mi, {
3764
3652
  id: "csdk-chatbot-frame",
3765
3653
  width: t,
3766
3654
  height: a,
@@ -3776,7 +3664,7 @@ const ln = xt({
3776
3664
  data: t,
3777
3665
  isLoading: a,
3778
3666
  isError: r
3779
- } = Wt(e), {
3667
+ } = Rt(e), {
3780
3668
  t: o
3781
3669
  } = C();
3782
3670
  if (r)
@@ -3784,7 +3672,7 @@ const ln = xt({
3784
3672
  children: o("ai.errors.unexpected")
3785
3673
  });
3786
3674
  const n = t ?? o("ai.errors.insightsNotAvailable");
3787
- return /* @__PURE__ */ i($t, {
3675
+ return /* @__PURE__ */ i(Ft, {
3788
3676
  text: a ? "Loading..." : n
3789
3677
  });
3790
3678
  }), sn = new bt({
@@ -3799,10 +3687,10 @@ function cn({
3799
3687
  children: e,
3800
3688
  context: t
3801
3689
  }) {
3802
- return /* @__PURE__ */ i(Ur, {
3803
- children: /* @__PURE__ */ i(zt.Provider, {
3690
+ return /* @__PURE__ */ i(Vr, {
3691
+ children: /* @__PURE__ */ i(Et.Provider, {
3804
3692
  value: t == null ? void 0 : t.api,
3805
- children: /* @__PURE__ */ i(ka, {
3693
+ children: /* @__PURE__ */ i(fa, {
3806
3694
  client: sn,
3807
3695
  children: e
3808
3696
  })
@@ -3820,11 +3708,11 @@ function cn({
3820
3708
  console.error("vite-plugin-css-injected-by-js", a);
3821
3709
  }
3822
3710
  })();
3823
- const Kt = {
3711
+ const $t = {
3824
3712
  api: void 0
3825
- }, ea = Symbol("aiContextKey"), ve = () => oa(
3826
- ea,
3827
- () => ht(Kt),
3713
+ }, Xt = Symbol("aiContextKey"), ve = () => ra(
3714
+ Xt,
3715
+ () => ht($t),
3828
3716
  !0
3829
3717
  ), un = ze({
3830
3718
  props: {
@@ -3834,7 +3722,7 @@ const Kt = {
3834
3722
  volatile: Boolean
3835
3723
  },
3836
3724
  setup(e, { slots: t }) {
3837
- const a = Xa(), r = ht(Kt), { app: o } = a.value;
3725
+ const a = er(), r = ht($t), { app: o } = a.value;
3838
3726
  return o && (r.value = {
3839
3727
  api: new st(o.httpClient, e.volatile)
3840
3728
  }), mt(async () => {
@@ -3842,13 +3730,13 @@ const Kt = {
3842
3730
  n && (r.value = {
3843
3731
  api: new st(n.httpClient, e.volatile)
3844
3732
  });
3845
- }), na(ea, r), () => {
3733
+ }), ia(Xt, r), () => {
3846
3734
  var n;
3847
3735
  return (n = t.default) == null ? void 0 : n.call(t);
3848
3736
  };
3849
3737
  }
3850
- }), ta = () => {
3851
- const e = ve(), t = new Ka({
3738
+ }), Kt = () => {
3739
+ const e = ve(), t = new tr({
3852
3740
  context: e.value
3853
3741
  });
3854
3742
  return mt(() => {
@@ -3874,9 +3762,9 @@ const Kt = {
3874
3762
  */
3875
3763
  config: Object
3876
3764
  },
3877
- setup: (e) => It(ln, e, [
3878
- ...At(),
3879
- ta()
3765
+ setup: (e) => Dt(ln, e, [
3766
+ ...It(),
3767
+ Kt()
3880
3768
  ])
3881
3769
  }), mn = ze({
3882
3770
  props: {
@@ -3904,13 +3792,13 @@ const Kt = {
3904
3792
  */
3905
3793
  verbosity: String
3906
3794
  },
3907
- setup: (e) => It(dn, e, [
3908
- ...At(),
3909
- ta()
3795
+ setup: (e) => Dt(dn, e, [
3796
+ ...It(),
3797
+ Kt()
3910
3798
  ])
3911
3799
  }), bn = (e) => {
3912
- Ge("useGetNlgInsights");
3913
- const [t, a] = qe(Pe, {
3800
+ qe("useGetNlgInsights");
3801
+ const [t, a] = Ge(Pe, {
3914
3802
  isLoading: !0,
3915
3803
  isError: !1,
3916
3804
  isSuccess: !1,
@@ -3921,14 +3809,14 @@ const Kt = {
3921
3809
  var d;
3922
3810
  try {
3923
3811
  a({ type: "loading" });
3924
- const s = Rt(te(e)), c = await (l == null ? void 0 : l.ai.getNlgInsights(s));
3812
+ const s = Zt(te(e)), c = await (l == null ? void 0 : l.ai.getNlgInsights(s));
3925
3813
  a({ type: "success", data: (d = c == null ? void 0 : c.data) == null ? void 0 : d.answer });
3926
3814
  } catch (s) {
3927
3815
  a({ type: "error", error: s });
3928
3816
  }
3929
3817
  };
3930
3818
  Ze(
3931
- [...He(e), r],
3819
+ [...Ye(e), r],
3932
3820
  () => {
3933
3821
  const { api: l } = r.value, { enabled: d } = te(e);
3934
3822
  !l || !(d === void 0 || d === !0) || o(l);
@@ -3943,8 +3831,8 @@ const Kt = {
3943
3831
  refetch: n
3944
3832
  };
3945
3833
  }, fn = (e) => {
3946
- Ge("useGetQueryRecommendations");
3947
- const [t, a] = qe(Pe, {
3834
+ qe("useGetQueryRecommendations");
3835
+ const [t, a] = Ge(Pe, {
3948
3836
  isLoading: !0,
3949
3837
  isError: !1,
3950
3838
  isSuccess: !1,
@@ -3958,7 +3846,7 @@ const Kt = {
3958
3846
  numOfRecommendations: g
3959
3847
  })), m = (p == null ? void 0 : p.map((x) => ({
3960
3848
  ...x,
3961
- widgetProps: Et.toWidgetProps(x, {
3849
+ widgetProps: Ot.toWidgetProps(x, {
3962
3850
  useCustomizedStyleOptions: c
3963
3851
  })
3964
3852
  }))) || [];
@@ -3968,7 +3856,7 @@ const Kt = {
3968
3856
  }
3969
3857
  };
3970
3858
  Ze(
3971
- [...He(e), r],
3859
+ [...Ye(e), r],
3972
3860
  () => {
3973
3861
  const { api: l } = r.value, { enabled: d, count: s } = te(e), g = (d === void 0 || d === !0) && (s ?? Oe) > 0;
3974
3862
  !l || !g || o(l);
@@ -3983,8 +3871,8 @@ const Kt = {
3983
3871
  refetch: n
3984
3872
  };
3985
3873
  }, xn = (e) => {
3986
- Ge("useGetNlqResult");
3987
- const [t, a] = qe(Pe, {
3874
+ qe("useGetNlqResult");
3875
+ const [t, a] = Ge(Pe, {
3988
3876
  isLoading: !0,
3989
3877
  isError: !1,
3990
3878
  isSuccess: !1,
@@ -3994,7 +3882,7 @@ const Kt = {
3994
3882
  }), r = ve(), o = async (l) => {
3995
3883
  try {
3996
3884
  a({ type: "loading" });
3997
- const d = te(e), { enableAxisTitlesInWidgetProps: s } = d, { contextTitle: c, request: g } = Vr(d), p = await (l == null ? void 0 : l.ai.getNlqResult(c, g)), m = p ? Et.toWidgetProps(p, {
3885
+ const d = te(e), { enableAxisTitlesInWidgetProps: s } = d, { contextTitle: c, request: g } = $r(d), p = await (l == null ? void 0 : l.ai.getNlqResult(c, g)), m = p ? Ot.toWidgetProps(p, {
3998
3886
  useCustomizedStyleOptions: s || !1
3999
3887
  }) : void 0;
4000
3888
  a({ type: "success", data: m });
@@ -4003,7 +3891,7 @@ const Kt = {
4003
3891
  }
4004
3892
  };
4005
3893
  Ze(
4006
- [...He(e), r],
3894
+ [...Ye(e), r],
4007
3895
  () => {
4008
3896
  const { api: l } = r.value, { enabled: d } = te(e);
4009
3897
  !l || !(d === void 0 || d === !0) || o(l);