@sisense/sdk-ui-vue 2.6.0 → 2.8.0

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