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