@schmitech/chatbot-widget 0.4.5 → 0.4.6

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.
@@ -85,8 +85,8 @@ function tc() {
85
85
  {
86
86
  var oe = A.ReactDebugCurrentFrame, xe = oe.getStackAddendum();
87
87
  xe !== "" && (q += "%s", Z = Z.concat([xe]));
88
- var ke = Z.map(function(ge) {
89
- return String(ge);
88
+ var ke = Z.map(function(ve) {
89
+ return String(ve);
90
90
  });
91
91
  ke.unshift("Warning: " + q), Function.prototype.apply.call(console[T], console, ke);
92
92
  }
@@ -145,9 +145,9 @@ function tc() {
145
145
  var oe = T.displayName || null;
146
146
  return oe !== null ? oe : te(T.type) || "Memo";
147
147
  case p: {
148
- var xe = T, ke = xe._payload, ge = xe._init;
148
+ var xe = T, ke = xe._payload, ve = xe._init;
149
149
  try {
150
- return te(ge(ke));
150
+ return te(ve(ke));
151
151
  } catch {
152
152
  return null;
153
153
  }
@@ -155,14 +155,14 @@ function tc() {
155
155
  }
156
156
  return null;
157
157
  }
158
- var K = Object.assign, me = 0, ve, Ce, Ue, S, Me, we, E;
158
+ var K = Object.assign, ce = 0, de, Ce, Ue, S, Me, we, E;
159
159
  function Fe() {
160
160
  }
161
161
  Fe.__reactDisabledLog = !0;
162
162
  function $e() {
163
163
  {
164
- if (me === 0) {
165
- ve = console.log, Ce = console.info, Ue = console.warn, S = console.error, Me = console.group, we = console.groupCollapsed, E = console.groupEnd;
164
+ if (ce === 0) {
165
+ de = console.log, Ce = console.info, Ue = console.warn, S = console.error, Me = console.group, we = console.groupCollapsed, E = console.groupEnd;
166
166
  var T = {
167
167
  configurable: !0,
168
168
  enumerable: !0,
@@ -179,12 +179,12 @@ function tc() {
179
179
  groupEnd: T
180
180
  });
181
181
  }
182
- me++;
182
+ ce++;
183
183
  }
184
184
  }
185
185
  function ze() {
186
186
  {
187
- if (me--, me === 0) {
187
+ if (ce--, ce === 0) {
188
188
  var T = {
189
189
  configurable: !0,
190
190
  enumerable: !0,
@@ -192,7 +192,7 @@ function tc() {
192
192
  };
193
193
  Object.defineProperties(console, {
194
194
  log: K({}, T, {
195
- value: ve
195
+ value: de
196
196
  }),
197
197
  info: K({}, T, {
198
198
  value: Ce
@@ -214,7 +214,7 @@ function tc() {
214
214
  })
215
215
  });
216
216
  }
217
- me < 0 && z("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
217
+ ce < 0 && z("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
218
218
  }
219
219
  }
220
220
  var Ve = A.ReactCurrentDispatcher, Re;
@@ -252,27 +252,27 @@ function tc() {
252
252
  ke = Ve.current, Ve.current = null, $e();
253
253
  try {
254
254
  if (q) {
255
- var ge = function() {
255
+ var ve = function() {
256
256
  throw Error();
257
257
  };
258
- if (Object.defineProperty(ge.prototype, "props", {
258
+ if (Object.defineProperty(ve.prototype, "props", {
259
259
  set: function() {
260
260
  throw Error();
261
261
  }
262
262
  }), typeof Reflect == "object" && Reflect.construct) {
263
263
  try {
264
- Reflect.construct(ge, []);
264
+ Reflect.construct(ve, []);
265
265
  } catch (at) {
266
266
  oe = at;
267
267
  }
268
- Reflect.construct(T, [], ge);
268
+ Reflect.construct(T, [], ve);
269
269
  } else {
270
270
  try {
271
- ge.call();
271
+ ve.call();
272
272
  } catch (at) {
273
273
  oe = at;
274
274
  }
275
- T.call(ge.prototype);
275
+ T.call(ve.prototype);
276
276
  }
277
277
  } else {
278
278
  try {
@@ -284,17 +284,17 @@ function tc() {
284
284
  }
285
285
  } catch (at) {
286
286
  if (at && oe && typeof at.stack == "string") {
287
- for (var de = at.stack.split(`
287
+ for (var ge = at.stack.split(`
288
288
  `), Qe = oe.stack.split(`
289
- `), De = de.length - 1, _e = Qe.length - 1; De >= 1 && _e >= 0 && de[De] !== Qe[_e]; )
289
+ `), De = ge.length - 1, _e = Qe.length - 1; De >= 1 && _e >= 0 && ge[De] !== Qe[_e]; )
290
290
  _e--;
291
291
  for (; De >= 1 && _e >= 0; De--, _e--)
292
- if (de[De] !== Qe[_e]) {
292
+ if (ge[De] !== Qe[_e]) {
293
293
  if (De !== 1 || _e !== 1)
294
294
  do
295
- if (De--, _e--, _e < 0 || de[De] !== Qe[_e]) {
295
+ if (De--, _e--, _e < 0 || ge[De] !== Qe[_e]) {
296
296
  var bt = `
297
- ` + de[De].replace(" at new ", " at ");
297
+ ` + ge[De].replace(" at new ", " at ");
298
298
  return T.displayName && bt.includes("<anonymous>") && (bt = bt.replace("<anonymous>", T.displayName)), typeof T == "function" && nt.set(T, bt), bt;
299
299
  }
300
300
  while (De >= 1 && _e >= 0);
@@ -354,19 +354,19 @@ function tc() {
354
354
  function ri(T, q, Z, oe, xe) {
355
355
  {
356
356
  var ke = Function.call.bind(yt);
357
- for (var ge in T)
358
- if (ke(T, ge)) {
359
- var de = void 0;
357
+ for (var ve in T)
358
+ if (ke(T, ve)) {
359
+ var ge = void 0;
360
360
  try {
361
- if (typeof T[ge] != "function") {
362
- var Qe = Error((oe || "React class") + ": " + Z + " type `" + ge + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof T[ge] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
361
+ if (typeof T[ve] != "function") {
362
+ var Qe = Error((oe || "React class") + ": " + Z + " type `" + ve + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof T[ve] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
363
363
  throw Qe.name = "Invariant Violation", Qe;
364
364
  }
365
- de = T[ge](q, ge, oe, Z, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
365
+ ge = T[ve](q, ve, oe, Z, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
366
366
  } catch (De) {
367
- de = De;
367
+ ge = De;
368
368
  }
369
- de && !(de instanceof Error) && (mr(xe), z("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", oe || "React class", Z, ge, typeof de), mr(null)), de instanceof Error && !(de.message in Ut) && (Ut[de.message] = !0, mr(xe), z("Failed %s type: %s", Z, de.message), mr(null));
369
+ ge && !(ge instanceof Error) && (mr(xe), z("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", oe || "React class", Z, ve, typeof ge), mr(null)), ge instanceof Error && !(ge.message in Ut) && (Ut[ge.message] = !0, mr(xe), z("Failed %s type: %s", Z, ge.message), mr(null));
370
370
  }
371
371
  }
372
372
  }
@@ -394,7 +394,7 @@ function tc() {
394
394
  if (ai(T))
395
395
  return z("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ii(T)), L(T);
396
396
  }
397
- var le = A.ReactCurrentOwner, fe = {
397
+ var le = A.ReactCurrentOwner, me = {
398
398
  key: !0,
399
399
  ref: !0,
400
400
  __self: !0,
@@ -441,51 +441,51 @@ function tc() {
441
441
  });
442
442
  }
443
443
  }
444
- var tr = function(T, q, Z, oe, xe, ke, ge) {
445
- var de = {
444
+ var tr = function(T, q, Z, oe, xe, ke, ve) {
445
+ var ge = {
446
446
  // This tag allows us to uniquely identify this as a React Element
447
447
  $$typeof: r,
448
448
  // Built-in properties that belong on the element
449
449
  type: T,
450
450
  key: q,
451
451
  ref: Z,
452
- props: ge,
452
+ props: ve,
453
453
  // Record the component responsible for creating this element.
454
454
  _owner: ke
455
455
  };
456
- return de._store = {}, Object.defineProperty(de._store, "validated", {
456
+ return ge._store = {}, Object.defineProperty(ge._store, "validated", {
457
457
  configurable: !1,
458
458
  enumerable: !1,
459
459
  writable: !0,
460
460
  value: !1
461
- }), Object.defineProperty(de, "_self", {
461
+ }), Object.defineProperty(ge, "_self", {
462
462
  configurable: !1,
463
463
  enumerable: !1,
464
464
  writable: !1,
465
465
  value: oe
466
- }), Object.defineProperty(de, "_source", {
466
+ }), Object.defineProperty(ge, "_source", {
467
467
  configurable: !1,
468
468
  enumerable: !1,
469
469
  writable: !1,
470
470
  value: xe
471
- }), Object.freeze && (Object.freeze(de.props), Object.freeze(de)), de;
471
+ }), Object.freeze && (Object.freeze(ge.props), Object.freeze(ge)), ge;
472
472
  };
473
473
  function Ct(T, q, Z, oe, xe) {
474
474
  {
475
- var ke, ge = {}, de = null, Qe = null;
476
- Z !== void 0 && (W(Z), de = "" + Z), Mt(q) && (W(q.key), de = "" + q.key), $t(q) && (Qe = q.ref, fr(q, xe));
475
+ var ke, ve = {}, ge = null, Qe = null;
476
+ Z !== void 0 && (W(Z), ge = "" + Z), Mt(q) && (W(q.key), ge = "" + q.key), $t(q) && (Qe = q.ref, fr(q, xe));
477
477
  for (ke in q)
478
- yt.call(q, ke) && !fe.hasOwnProperty(ke) && (ge[ke] = q[ke]);
478
+ yt.call(q, ke) && !me.hasOwnProperty(ke) && (ve[ke] = q[ke]);
479
479
  if (T && T.defaultProps) {
480
480
  var De = T.defaultProps;
481
481
  for (ke in De)
482
- ge[ke] === void 0 && (ge[ke] = De[ke]);
482
+ ve[ke] === void 0 && (ve[ke] = De[ke]);
483
483
  }
484
- if (de || Qe) {
484
+ if (ge || Qe) {
485
485
  var _e = typeof T == "function" ? T.displayName || T.name || "Unknown" : T;
486
- de && pr(ge, _e), Qe && Ke(ge, _e);
486
+ ge && pr(ve, _e), Qe && Ke(ve, _e);
487
487
  }
488
- return tr(T, de, Qe, xe, oe, le.current, ge);
488
+ return tr(T, ge, Qe, xe, oe, le.current, ve);
489
489
  }
490
490
  }
491
491
  var li = A.ReactCurrentOwner, ca = A.ReactDebugCurrentFrame;
@@ -556,8 +556,8 @@ Check the top-level render call using <` + Z + ">.");
556
556
  else if (T) {
557
557
  var xe = w(T);
558
558
  if (typeof xe == "function" && xe !== T.entries)
559
- for (var ke = xe.call(T), ge; !(ge = ke.next()).done; )
560
- si(ge.value) && fa(ge.value, q);
559
+ for (var ke = xe.call(T), ve; !(ve = ke.next()).done; )
560
+ si(ve.value) && fa(ve.value, q);
561
561
  }
562
562
  }
563
563
  }
@@ -601,19 +601,19 @@ Check the top-level render call using <` + Z + ">.");
601
601
  var da = {};
602
602
  function ga(T, q, Z, oe, xe, ke) {
603
603
  {
604
- var ge = $(T);
605
- if (!ge) {
606
- var de = "";
607
- (T === void 0 || typeof T == "object" && T !== null && Object.keys(T).length === 0) && (de += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
604
+ var ve = $(T);
605
+ if (!ve) {
606
+ var ge = "";
607
+ (T === void 0 || typeof T == "object" && T !== null && Object.keys(T).length === 0) && (ge += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
608
608
  var Qe = qu();
609
- Qe ? de += Qe : de += ha();
609
+ Qe ? ge += Qe : ge += ha();
610
610
  var De;
611
- T === null ? De = "null" : Ur(T) ? De = "array" : T !== void 0 && T.$$typeof === r ? (De = "<" + (te(T.type) || "Unknown") + " />", de = " Did you accidentally export a JSX literal instead of a component?") : De = typeof T, z("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", De, de);
611
+ T === null ? De = "null" : Ur(T) ? De = "array" : T !== void 0 && T.$$typeof === r ? (De = "<" + (te(T.type) || "Unknown") + " />", ge = " Did you accidentally export a JSX literal instead of a component?") : De = typeof T, z("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", De, ge);
612
612
  }
613
613
  var _e = Ct(T, q, Z, xe, ke);
614
614
  if (_e == null)
615
615
  return _e;
616
- if (ge) {
616
+ if (ve) {
617
617
  var bt = q.children;
618
618
  if (bt !== void 0)
619
619
  if (oe)
@@ -1324,7 +1324,7 @@ function S0(e) {
1324
1324
  typeof window > "u" || (sessionStorage.setItem(Qi, e), window.CHATBOT_SESSION_ID = e);
1325
1325
  }
1326
1326
  const Pc = 50, _c = 200;
1327
- let ce = {
1327
+ let fe = {
1328
1328
  MAX_MESSAGE_LENGTH: 250,
1329
1329
  MAX_SUGGESTED_QUESTION_LENGTH: Pc,
1330
1330
  MAX_SUGGESTED_QUESTION_QUERY_LENGTH: _c,
@@ -1665,15 +1665,15 @@ const Hc = `
1665
1665
  transform: translateY(-1px);
1666
1666
  }
1667
1667
  `, qc = (e) => {
1668
- const { BREAKPOINTS: t, WIDTHS: r } = ce.WINDOW_DIMENSIONS;
1668
+ const { BREAKPOINTS: t, WIDTHS: r } = fe.WINDOW_DIMENSIONS;
1669
1669
  return e < t.SM ? "100%" : e < t.MD ? r.SM : e < t.LG ? r.MD : r.LG;
1670
- }, jc = (e) => e < ce.WINDOW_DIMENSIONS.BREAKPOINTS.SM ? "100%" : ce.WINDOW_DIMENSIONS.WIDTHS.SM, Uc = 'Mona Sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif', $c = (e, t) => ({
1670
+ }, jc = (e) => e < fe.WINDOW_DIMENSIONS.BREAKPOINTS.SM ? "100%" : fe.WINDOW_DIMENSIONS.WIDTHS.SM, Uc = 'Mona Sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif', $c = (e, t) => ({
1671
1671
  color: e >= t * 0.9 ? "#ef4444" : "#6b7280",
1672
1672
  backgroundColor: e >= t * 0.9 ? "rgba(239, 68, 68, 0.1)" : "rgba(107, 114, 128, 0.1)",
1673
1673
  fontSize: "0.7rem"
1674
1674
  });
1675
1675
  function Vc(e) {
1676
- Object.assign(ce, e);
1676
+ Object.assign(fe, e);
1677
1677
  }
1678
1678
  let Na = !1;
1679
1679
  function Gc() {
@@ -1704,7 +1704,7 @@ const To = Ic((e, t) => ({
1704
1704
  getSessionId: () => t().sessionId,
1705
1705
  sendMessage: async (r) => {
1706
1706
  try {
1707
- const n = ce.MAX_SUGGESTED_QUESTION_QUERY_LENGTH;
1707
+ const n = fe.MAX_SUGGESTED_QUESTION_QUERY_LENGTH;
1708
1708
  let i = r;
1709
1709
  if (r.length > n && (i = r.substring(0, n)), !Gc())
1710
1710
  throw new Error("API not properly configured");
@@ -1856,12 +1856,12 @@ const To = Ic((e, t) => ({
1856
1856
  behavior: v ? "auto" : "smooth"
1857
1857
  }), setTimeout(() => {
1858
1858
  d();
1859
- }, v ? 0 : ce.ANIMATIONS.SCROLL_TIMEOUT);
1859
+ }, v ? 0 : fe.ANIMATIONS.SCROLL_TIMEOUT);
1860
1860
  }
1861
1861
  }, []), d = It(() => {
1862
1862
  if (o.current && !e) {
1863
- const { scrollTop: v, scrollHeight: b, clientHeight: M } = o.current, w = Math.abs(b - v - M) < ce.SCROLL_THRESHOLDS.BOTTOM_THRESHOLD, A = v < ce.SCROLL_THRESHOLDS.TOP_THRESHOLD;
1864
- r(!A && v > ce.SCROLL_THRESHOLDS.SHOW_SCROLL_TOP_OFFSET), i(!w);
1863
+ const { scrollTop: v, scrollHeight: b, clientHeight: M } = o.current, w = Math.abs(b - v - M) < fe.SCROLL_THRESHOLDS.BOTTOM_THRESHOLD, A = v < fe.SCROLL_THRESHOLDS.TOP_THRESHOLD;
1864
+ r(!A && v > fe.SCROLL_THRESHOLDS.SHOW_SCROLL_TOP_OFFSET), i(!w);
1865
1865
  }
1866
1866
  }, [e]), p = It(() => {
1867
1867
  o.current && (l(!0), o.current.scrollTo({
@@ -1869,7 +1869,7 @@ const To = Ic((e, t) => ({
1869
1869
  behavior: "smooth"
1870
1870
  }), setTimeout(() => {
1871
1871
  l(!1), d();
1872
- }, ce.ANIMATIONS.SCROLL_TIMEOUT));
1872
+ }, fe.ANIMATIONS.SCROLL_TIMEOUT));
1873
1873
  }, [d]);
1874
1874
  return {
1875
1875
  // State
@@ -1913,7 +1913,7 @@ const To = Ic((e, t) => ({
1913
1913
  }) => {
1914
1914
  const [n, i] = st(""), [a, l] = st(!1), o = ut(null), s = It((p) => {
1915
1915
  const v = p.target.value;
1916
- v.length <= ce.MAX_MESSAGE_LENGTH && i(v);
1916
+ v.length <= fe.MAX_MESSAGE_LENGTH && i(v);
1917
1917
  }, []), u = It(() => {
1918
1918
  n.trim() && !t && (e(n.trim()), i(""));
1919
1919
  }, [n, t, e]), m = It((p) => {
@@ -5008,7 +5008,7 @@ function im(e, t, r) {
5008
5008
  return E === null || J(E) ? V(E) : pe(E) ? (e.consume(E), $) : r(E);
5009
5009
  }
5010
5010
  function V(E) {
5011
- return E === 45 && i === 2 ? (e.consume(E), me) : E === 60 && i === 1 ? (e.consume(E), ve) : E === 62 && i === 4 ? (e.consume(E), Me) : E === 63 && i === 3 ? (e.consume(E), S) : E === 93 && i === 5 ? (e.consume(E), Ue) : J(E) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check(tm, we, ie)(E)) : E === null || J(E) ? (e.exit("htmlFlowData"), ie(E)) : (e.consume(E), V);
5011
+ return E === 45 && i === 2 ? (e.consume(E), ce) : E === 60 && i === 1 ? (e.consume(E), de) : E === 62 && i === 4 ? (e.consume(E), Me) : E === 63 && i === 3 ? (e.consume(E), S) : E === 93 && i === 5 ? (e.consume(E), Ue) : J(E) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check(tm, we, ie)(E)) : E === null || J(E) ? (e.exit("htmlFlowData"), ie(E)) : (e.consume(E), V);
5012
5012
  }
5013
5013
  function ie(E) {
5014
5014
  return e.check(rm, te, we)(E);
@@ -5019,10 +5019,10 @@ function im(e, t, r) {
5019
5019
  function K(E) {
5020
5020
  return E === null || J(E) ? ie(E) : (e.enter("htmlFlowData"), V(E));
5021
5021
  }
5022
- function me(E) {
5022
+ function ce(E) {
5023
5023
  return E === 45 ? (e.consume(E), S) : V(E);
5024
5024
  }
5025
- function ve(E) {
5025
+ function de(E) {
5026
5026
  return E === 47 ? (e.consume(E), l = "", Ce) : V(E);
5027
5027
  }
5028
5028
  function Ce(E) {
@@ -5082,35 +5082,35 @@ function sm(e, t, r) {
5082
5082
  return S === 45 ? (e.consume(S), p) : r(S);
5083
5083
  }
5084
5084
  function h(S) {
5085
- return S === null ? r(S) : S === 45 ? (e.consume(S), d) : J(S) ? (l = h, ve(S)) : (e.consume(S), h);
5085
+ return S === null ? r(S) : S === 45 ? (e.consume(S), d) : J(S) ? (l = h, de(S)) : (e.consume(S), h);
5086
5086
  }
5087
5087
  function d(S) {
5088
5088
  return S === 45 ? (e.consume(S), p) : h(S);
5089
5089
  }
5090
5090
  function p(S) {
5091
- return S === 62 ? me(S) : S === 45 ? d(S) : h(S);
5091
+ return S === 62 ? ce(S) : S === 45 ? d(S) : h(S);
5092
5092
  }
5093
5093
  function v(S) {
5094
5094
  const Me = "CDATA[";
5095
5095
  return S === Me.charCodeAt(a++) ? (e.consume(S), a === Me.length ? b : v) : r(S);
5096
5096
  }
5097
5097
  function b(S) {
5098
- return S === null ? r(S) : S === 93 ? (e.consume(S), M) : J(S) ? (l = b, ve(S)) : (e.consume(S), b);
5098
+ return S === null ? r(S) : S === 93 ? (e.consume(S), M) : J(S) ? (l = b, de(S)) : (e.consume(S), b);
5099
5099
  }
5100
5100
  function M(S) {
5101
5101
  return S === 93 ? (e.consume(S), w) : b(S);
5102
5102
  }
5103
5103
  function w(S) {
5104
- return S === 62 ? me(S) : S === 93 ? (e.consume(S), w) : b(S);
5104
+ return S === 62 ? ce(S) : S === 93 ? (e.consume(S), w) : b(S);
5105
5105
  }
5106
5106
  function A(S) {
5107
- return S === null || S === 62 ? me(S) : J(S) ? (l = A, ve(S)) : (e.consume(S), A);
5107
+ return S === null || S === 62 ? ce(S) : J(S) ? (l = A, de(S)) : (e.consume(S), A);
5108
5108
  }
5109
5109
  function z(S) {
5110
- return S === null ? r(S) : S === 63 ? (e.consume(S), D) : J(S) ? (l = z, ve(S)) : (e.consume(S), z);
5110
+ return S === null ? r(S) : S === 63 ? (e.consume(S), D) : J(S) ? (l = z, de(S)) : (e.consume(S), z);
5111
5111
  }
5112
5112
  function D(S) {
5113
- return S === 62 ? me(S) : z(S);
5113
+ return S === 62 ? ce(S) : z(S);
5114
5114
  }
5115
5115
  function B(S) {
5116
5116
  return et(S) ? (e.consume(S), I) : r(S);
@@ -5119,25 +5119,25 @@ function sm(e, t, r) {
5119
5119
  return S === 45 || Ye(S) ? (e.consume(S), I) : F(S);
5120
5120
  }
5121
5121
  function F(S) {
5122
- return J(S) ? (l = F, ve(S)) : pe(S) ? (e.consume(S), F) : me(S);
5122
+ return J(S) ? (l = F, de(S)) : pe(S) ? (e.consume(S), F) : ce(S);
5123
5123
  }
5124
5124
  function Y(S) {
5125
5125
  return S === 45 || Ye(S) ? (e.consume(S), Y) : S === 47 || S === 62 || Se(S) ? H(S) : r(S);
5126
5126
  }
5127
5127
  function H(S) {
5128
- return S === 47 ? (e.consume(S), me) : S === 58 || S === 95 || et(S) ? (e.consume(S), N) : J(S) ? (l = H, ve(S)) : pe(S) ? (e.consume(S), H) : me(S);
5128
+ return S === 47 ? (e.consume(S), ce) : S === 58 || S === 95 || et(S) ? (e.consume(S), N) : J(S) ? (l = H, de(S)) : pe(S) ? (e.consume(S), H) : ce(S);
5129
5129
  }
5130
5130
  function N(S) {
5131
5131
  return S === 45 || S === 46 || S === 58 || S === 95 || Ye(S) ? (e.consume(S), N) : $(S);
5132
5132
  }
5133
5133
  function $(S) {
5134
- return S === 61 ? (e.consume(S), V) : J(S) ? (l = $, ve(S)) : pe(S) ? (e.consume(S), $) : H(S);
5134
+ return S === 61 ? (e.consume(S), V) : J(S) ? (l = $, de(S)) : pe(S) ? (e.consume(S), $) : H(S);
5135
5135
  }
5136
5136
  function V(S) {
5137
- return S === null || S === 60 || S === 61 || S === 62 || S === 96 ? r(S) : S === 34 || S === 39 ? (e.consume(S), i = S, ie) : J(S) ? (l = V, ve(S)) : pe(S) ? (e.consume(S), V) : (e.consume(S), te);
5137
+ return S === null || S === 60 || S === 61 || S === 62 || S === 96 ? r(S) : S === 34 || S === 39 ? (e.consume(S), i = S, ie) : J(S) ? (l = V, de(S)) : pe(S) ? (e.consume(S), V) : (e.consume(S), te);
5138
5138
  }
5139
5139
  function ie(S) {
5140
- return S === i ? (e.consume(S), i = void 0, K) : S === null ? r(S) : J(S) ? (l = ie, ve(S)) : (e.consume(S), ie);
5140
+ return S === i ? (e.consume(S), i = void 0, K) : S === null ? r(S) : J(S) ? (l = ie, de(S)) : (e.consume(S), ie);
5141
5141
  }
5142
5142
  function te(S) {
5143
5143
  return S === null || S === 34 || S === 39 || S === 60 || S === 61 || S === 96 ? r(S) : S === 47 || S === 62 || Se(S) ? H(S) : (e.consume(S), te);
@@ -5145,10 +5145,10 @@ function sm(e, t, r) {
5145
5145
  function K(S) {
5146
5146
  return S === 47 || S === 62 || Se(S) ? H(S) : r(S);
5147
5147
  }
5148
- function me(S) {
5148
+ function ce(S) {
5149
5149
  return S === 62 ? (e.consume(S), e.exit("htmlTextData"), e.exit("htmlText"), t) : r(S);
5150
5150
  }
5151
- function ve(S) {
5151
+ function de(S) {
5152
5152
  return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(S), e.exit("lineEnding"), Ce;
5153
5153
  }
5154
5154
  function Ce(S) {
@@ -5775,8 +5775,8 @@ function Xm(e, t, r) {
5775
5775
  }
5776
5776
  function F($, V) {
5777
5777
  return ie;
5778
- function ie(te, K, me) {
5779
- let ve, Ce, Ue, S;
5778
+ function ie(te, K, ce) {
5779
+ let de, Ce, Ue, S;
5780
5780
  return Array.isArray(te) ? (
5781
5781
  /* c8 ignore next 1 */
5782
5782
  we(te)
@@ -5800,7 +5800,7 @@ function Xm(e, t, r) {
5800
5800
  }
5801
5801
  }
5802
5802
  function we(ze) {
5803
- return ve = ze, Ce = 0, ze.length === 0 ? me : E(ze[Ce]);
5803
+ return de = ze, Ce = 0, ze.length === 0 ? ce : E(ze[Ce]);
5804
5804
  }
5805
5805
  function E(ze) {
5806
5806
  return Ve;
@@ -5820,7 +5820,7 @@ function Xm(e, t, r) {
5820
5820
  return $(Ue, S), K;
5821
5821
  }
5822
5822
  function $e(ze) {
5823
- return S.restore(), ++Ce < ve.length ? E(ve[Ce]) : me;
5823
+ return S.restore(), ++Ce < de.length ? E(de[Ce]) : ce;
5824
5824
  }
5825
5825
  }
5826
5826
  }
@@ -5831,9 +5831,9 @@ function Xm(e, t, r) {
5831
5831
  const $ = v(), V = u.previous, ie = u.currentConstruct, te = u.events.length, K = Array.from(o);
5832
5832
  return {
5833
5833
  from: te,
5834
- restore: me
5834
+ restore: ce
5835
5835
  };
5836
- function me() {
5836
+ function ce() {
5837
5837
  n = $, u.previous = V, u.currentConstruct = ie, u.events.length = te, o = K, N();
5838
5838
  }
5839
5839
  }
@@ -6054,11 +6054,11 @@ function lf(e) {
6054
6054
  htmlFlowData: N,
6055
6055
  htmlText: s(te),
6056
6056
  htmlTextData: N,
6057
- image: s(ve),
6057
+ image: s(de),
6058
6058
  label: Ue,
6059
6059
  labelText: Ce,
6060
6060
  lineEnding: $,
6061
- link: s(me),
6061
+ link: s(ce),
6062
6062
  listItem: s(),
6063
6063
  listOrdered: s(),
6064
6064
  listUnordered: s(),
@@ -6091,14 +6091,14 @@ function lf(e) {
6091
6091
  buffer: l,
6092
6092
  resume: m,
6093
6093
  data: r
6094
- }, fe = [];
6094
+ }, me = [];
6095
6095
  let be = -1;
6096
6096
  for (; ++be < L.length; )
6097
6097
  if (L[be][1].type === "listOrdered" || L[be][1].type === "listUnordered")
6098
6098
  if (L[be][0] === "enter")
6099
- fe.push(be);
6099
+ me.push(be);
6100
6100
  else {
6101
- const it = fe.pop();
6101
+ const it = me.pop();
6102
6102
  be = i(L, it, be);
6103
6103
  }
6104
6104
  for (be = -1; ++be < L.length; ) {
@@ -6127,9 +6127,9 @@ function lf(e) {
6127
6127
  return W;
6128
6128
  }
6129
6129
  function i(L, W, le) {
6130
- let fe = W - 1, be = -1, it = !1, $t, Mt, fr, pr;
6131
- for (; ++fe <= le; ) {
6132
- const Ke = L[fe];
6130
+ let me = W - 1, be = -1, it = !1, $t, Mt, fr, pr;
6131
+ for (; ++me <= le; ) {
6132
+ const Ke = L[me];
6133
6133
  switch (Ke[1].type) {
6134
6134
  case "listUnordered":
6135
6135
  case "listOrdered":
@@ -6138,7 +6138,7 @@ function lf(e) {
6138
6138
  break;
6139
6139
  }
6140
6140
  case "lineEndingBlank": {
6141
- Ke[0] === "enter" && ($t && !pr && !be && !fr && (fr = fe), pr = void 0);
6141
+ Ke[0] === "enter" && ($t && !pr && !be && !fr && (fr = me), pr = void 0);
6142
6142
  break;
6143
6143
  }
6144
6144
  case "linePrefix":
@@ -6152,7 +6152,7 @@ function lf(e) {
6152
6152
  }
6153
6153
  if (!be && Ke[0] === "enter" && Ke[1].type === "listItemPrefix" || be === -1 && Ke[0] === "exit" && (Ke[1].type === "listUnordered" || Ke[1].type === "listOrdered")) {
6154
6154
  if ($t) {
6155
- let tr = fe;
6155
+ let tr = me;
6156
6156
  for (Mt = void 0; tr--; ) {
6157
6157
  const Ct = L[tr];
6158
6158
  if (Ct[1].type === "lineEnding" || Ct[1].type === "lineEndingBlank") {
@@ -6160,7 +6160,7 @@ function lf(e) {
6160
6160
  Mt && (L[Mt][1].type = "lineEndingBlank", it = !0), Ct[1].type = "lineEnding", Mt = tr;
6161
6161
  } else if (!(Ct[1].type === "linePrefix" || Ct[1].type === "blockQuotePrefix" || Ct[1].type === "blockQuotePrefixWhitespace" || Ct[1].type === "blockQuoteMarker" || Ct[1].type === "listItemIndent")) break;
6162
6162
  }
6163
- fr && (!Mt || fr < Mt) && ($t._spread = !0), $t.end = Object.assign({}, Mt ? L[Mt][1].start : Ke[1].end), L.splice(Mt || fe, 0, ["exit", $t, Ke[2]]), fe++, le++;
6163
+ fr && (!Mt || fr < Mt) && ($t._spread = !0), $t.end = Object.assign({}, Mt ? L[Mt][1].start : Ke[1].end), L.splice(Mt || me, 0, ["exit", $t, Ke[2]]), me++, le++;
6164
6164
  }
6165
6165
  if (Ke[1].type === "listItemPrefix") {
6166
6166
  const tr = {
@@ -6170,7 +6170,7 @@ function lf(e) {
6170
6170
  // @ts-expect-error: we’ll add `end` in a second.
6171
6171
  end: void 0
6172
6172
  };
6173
- $t = tr, L.splice(fe, 0, ["enter", tr, Ke[2]]), fe++, le++, fr = void 0, pr = !0;
6173
+ $t = tr, L.splice(me, 0, ["enter", tr, Ke[2]]), me++, le++, fr = void 0, pr = !0;
6174
6174
  }
6175
6175
  }
6176
6176
  }
@@ -6178,8 +6178,8 @@ function lf(e) {
6178
6178
  }
6179
6179
  function a(L, W) {
6180
6180
  return le;
6181
- function le(fe) {
6182
- o.call(this, L(fe), fe), W && W.call(this, fe);
6181
+ function le(me) {
6182
+ o.call(this, L(me), me), W && W.call(this, me);
6183
6183
  }
6184
6184
  }
6185
6185
  function l() {
@@ -6202,9 +6202,9 @@ function lf(e) {
6202
6202
  }
6203
6203
  }
6204
6204
  function u(L, W) {
6205
- const le = this.stack.pop(), fe = this.tokenStack.pop();
6206
- if (fe)
6207
- fe[0].type !== L.type && (W ? W.call(this, L, fe[0]) : (fe[1] || tl).call(this, L, fe[0]));
6205
+ const le = this.stack.pop(), me = this.tokenStack.pop();
6206
+ if (me)
6207
+ me[0].type !== L.type && (W ? W.call(this, L, me[0]) : (me[1] || tl).call(this, L, me[0]));
6208
6208
  else throw new Error("Cannot close `" + L.type + "` (" + Qr({
6209
6209
  start: L.start,
6210
6210
  end: L.end
@@ -6273,12 +6273,12 @@ function lf(e) {
6273
6273
  }
6274
6274
  function H(L) {
6275
6275
  const le = this.stack[this.stack.length - 1].children;
6276
- let fe = le[le.length - 1];
6277
- (!fe || fe.type !== "text") && (fe = ii(), fe.position = {
6276
+ let me = le[le.length - 1];
6277
+ (!me || me.type !== "text") && (me = ii(), me.position = {
6278
6278
  start: rr(L.start),
6279
6279
  // @ts-expect-error: we’ll add `end` later.
6280
6280
  end: void 0
6281
- }, le.push(fe)), this.stack.push(fe);
6281
+ }, le.push(me)), this.stack.push(me);
6282
6282
  }
6283
6283
  function N(L) {
6284
6284
  const W = this.stack.pop();
@@ -6308,7 +6308,7 @@ function lf(e) {
6308
6308
  const L = this.resume(), W = this.stack[this.stack.length - 1];
6309
6309
  W.value = L;
6310
6310
  }
6311
- function me() {
6311
+ function ce() {
6312
6312
  const L = this.stack[this.stack.length - 1];
6313
6313
  if (this.data.inReference) {
6314
6314
  const W = this.data.referenceType || "shortcut";
@@ -6317,7 +6317,7 @@ function lf(e) {
6317
6317
  delete L.identifier, delete L.label;
6318
6318
  this.data.referenceType = void 0;
6319
6319
  }
6320
- function ve() {
6320
+ function de() {
6321
6321
  const L = this.stack[this.stack.length - 1];
6322
6322
  if (this.data.inReference) {
6323
6323
  const W = this.data.referenceType || "shortcut";
@@ -6333,8 +6333,8 @@ function lf(e) {
6333
6333
  function Ue() {
6334
6334
  const L = this.stack[this.stack.length - 1], W = this.resume(), le = this.stack[this.stack.length - 1];
6335
6335
  if (this.data.inReference = !0, le.type === "link") {
6336
- const fe = L.children;
6337
- le.children = fe;
6336
+ const me = L.children;
6337
+ le.children = me;
6338
6338
  } else
6339
6339
  le.alt = W;
6340
6340
  }
@@ -6361,10 +6361,10 @@ function lf(e) {
6361
6361
  }
6362
6362
  function ze(L) {
6363
6363
  const W = this.sliceSerialize(L), le = this.data.characterReferenceType;
6364
- let fe;
6365
- le ? (fe = Vo(W, le === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : fe = N0(W);
6364
+ let me;
6365
+ le ? (me = Vo(W, le === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : me = N0(W);
6366
6366
  const be = this.stack[this.stack.length - 1];
6367
- be.value += fe;
6367
+ be.value += me;
6368
6368
  }
6369
6369
  function Ve(L) {
6370
6370
  const W = this.stack.pop();
@@ -7281,7 +7281,7 @@ function Yf(e) {
7281
7281
  }
7282
7282
  function P0(e, t, r, n) {
7283
7283
  let i, a, l;
7284
- typeof t == "function" ? (a = void 0, l = t, i = r) : (a = t, l = r, i = n), F0(e, a, o, i);
7284
+ typeof t == "function" && typeof r != "function" ? (a = void 0, l = t, i = r) : (a = t, l = r, i = n), F0(e, a, o, i);
7285
7285
  function o(s, u) {
7286
7286
  const m = u[u.length - 1], h = m ? m.children.indexOf(s) : void 0;
7287
7287
  return l(s, h, m);
@@ -15124,12 +15124,12 @@ var Kr = function(t, r, n) {
15124
15124
  n && (N *= i.sizeMultiplier);
15125
15125
  var $ = H / 2 - N, V = [];
15126
15126
  if (h.length > 0) {
15127
- var ie = H - b - z, te = Math.round(H * 1e3), K = mp(h, Math.round(ie * 1e3)), me = new or(h, K), ve = (d / 1e3).toFixed(3) + "em", Ce = (te / 1e3).toFixed(3) + "em", Ue = new Xt([me], {
15128
- width: ve,
15127
+ var ie = H - b - z, te = Math.round(H * 1e3), K = mp(h, Math.round(ie * 1e3)), ce = new or(h, K), de = (d / 1e3).toFixed(3) + "em", Ce = (te / 1e3).toFixed(3) + "em", Ue = new Xt([ce], {
15128
+ width: de,
15129
15129
  height: Ce,
15130
15130
  viewBox: "0 0 " + d + " " + te
15131
15131
  }), S = O.makeSvgSpan([], [Ue], i);
15132
- S.height = te / 1e3, S.style.width = ve, S.style.height = Ce, V.push({
15132
+ S.height = te / 1e3, S.style.width = de, S.style.height = Ce, V.push({
15133
15133
  type: "elem",
15134
15134
  elem: S
15135
15135
  });
@@ -15860,24 +15860,24 @@ var _t = function(t, r) {
15860
15860
  var N = t.rowGaps[n], $ = 0;
15861
15861
  N && ($ = Oe(N, r), $ > 0 && ($ += A, F < $ && (F = $), $ = 0)), t.addJot && (F += b), Y.height = I, Y.depth = F, z += I, Y.pos = z, z += F + $, s[n] = Y, D(l[n + 1]);
15862
15862
  }
15863
- var V = z / 2 + r.fontMetrics().axisHeight, ie = t.cols || [], te = [], K, me, ve = [];
15863
+ var V = z / 2 + r.fontMetrics().axisHeight, ie = t.cols || [], te = [], K, ce, de = [];
15864
15864
  if (t.tags && t.tags.some((Ut) => Ut))
15865
15865
  for (n = 0; n < a; ++n) {
15866
15866
  var Ce = s[n], Ue = Ce.pos - V, S = t.tags[n], Me = void 0;
15867
- S === !0 ? Me = O.makeSpan(["eqn-num"], [], r) : S === !1 ? Me = O.makeSpan([], [], r) : Me = O.makeSpan([], je(S, r, !0), r), Me.depth = Ce.depth, Me.height = Ce.height, ve.push({
15867
+ S === !0 ? Me = O.makeSpan(["eqn-num"], [], r) : S === !1 ? Me = O.makeSpan([], [], r) : Me = O.makeSpan([], je(S, r, !0), r), Me.depth = Ce.depth, Me.height = Ce.height, de.push({
15868
15868
  type: "elem",
15869
15869
  elem: Me,
15870
15870
  shift: Ue
15871
15871
  });
15872
15872
  }
15873
15873
  for (
15874
- i = 0, me = 0;
15874
+ i = 0, ce = 0;
15875
15875
  // Continue while either there are more columns or more column
15876
15876
  // descriptions, so trailing separators don't get lost.
15877
- i < o || me < ie.length;
15878
- ++i, ++me
15877
+ i < o || ce < ie.length;
15878
+ ++i, ++ce
15879
15879
  ) {
15880
- for (var we = ie[me] || {}, E = !0; we.type === "separator"; ) {
15880
+ for (var we = ie[ce] || {}, E = !0; we.type === "separator"; ) {
15881
15881
  if (E || (K = O.makeSpan(["arraycolsep"], []), K.style.width = G(r.fontMetrics().doubleRuleSep), te.push(K)), we.separator === "|" || we.separator === ":") {
15882
15882
  var Fe = we.separator === "|" ? "solid" : "dashed", $e = O.makeSpan(["vertical-separator"], [], r);
15883
15883
  $e.style.height = G(z), $e.style.borderRightWidth = G(m), $e.style.borderRightStyle = Fe, $e.style.margin = "0 " + G(-m / 2);
@@ -15885,7 +15885,7 @@ var _t = function(t, r) {
15885
15885
  ze && ($e.style.verticalAlign = G(-ze)), te.push($e);
15886
15886
  } else
15887
15887
  throw new j("Invalid separator type: " + we.separator);
15888
- me++, we = ie[me] || {}, E = !1;
15888
+ ce++, we = ie[ce] || {}, E = !1;
15889
15889
  }
15890
15890
  if (!(i >= o)) {
15891
15891
  var Ve = void 0;
@@ -15930,11 +15930,11 @@ var _t = function(t, r) {
15930
15930
  children: Et
15931
15931
  }, r);
15932
15932
  }
15933
- if (ve.length === 0)
15933
+ if (de.length === 0)
15934
15934
  return O.makeSpan(["mord"], [s], r);
15935
15935
  var yt = O.makeVList({
15936
15936
  positionType: "individualShift",
15937
- children: ve
15937
+ children: de
15938
15938
  }, r);
15939
15939
  return yt = O.makeSpan(["tag"], [yt], r), O.makeFragment([s, yt]);
15940
15940
  }, vd = {
@@ -23508,7 +23508,7 @@ $1 $2
23508
23508
  }
23509
23509
  if (I = H, D < w.current.length) {
23510
23510
  const N = w.current.slice(0, D + 1);
23511
- m(N), a.current.set(r, D + 1), D === 0 && d(!1), H - B > ce.ANIMATIONS.ANIMATION_SCROLL_INTERVAL && (s(), B = H), D++, p.current = D, b.current = requestAnimationFrame(Y);
23511
+ m(N), a.current.set(r, D + 1), D === 0 && d(!1), H - B > fe.ANIMATIONS.ANIMATION_SCROLL_INTERVAL && (s(), B = H), D++, p.current = D, b.current = requestAnimationFrame(Y);
23512
23512
  } else
23513
23513
  z();
23514
23514
  }
@@ -23533,7 +23533,7 @@ $1 $2
23533
23533
  b.current && (cancelAnimationFrame(b.current), v.current = !1), D = Date.now();
23534
23534
  else if (M.current && !v.current && p.current > 0 && p.current < w.current.length) {
23535
23535
  const I = Date.now();
23536
- D && I - D > ce.ANIMATIONS.VISIBILITY_SKIP_THRESHOLD ? (m(w.current), d(!1), z(), a.current.set(r, w.current.length)) : A(), D = null;
23536
+ D && I - D > fe.ANIMATIONS.VISIBILITY_SKIP_THRESHOLD ? (m(w.current), d(!1), z(), a.current.set(r, w.current.length)) : A(), D = null;
23537
23537
  }
23538
23538
  };
23539
23539
  return document.addEventListener("visibilitychange", B), () => {
@@ -23719,7 +23719,7 @@ $1 $2
23719
23719
  },
23720
23720
  "aria-label": "Scroll to top",
23721
23721
  title: "Scroll to top",
23722
- children: /* @__PURE__ */ R.jsx(sc, { size: ce.BUTTON_SIZES.ICON_SIZES.BUTTON })
23722
+ children: /* @__PURE__ */ R.jsx(sc, { size: fe.BUTTON_SIZES.ICON_SIZES.BUTTON })
23723
23723
  }
23724
23724
  ),
23725
23725
  a && !l && /* @__PURE__ */ R.jsx(
@@ -23733,7 +23733,7 @@ $1 $2
23733
23733
  },
23734
23734
  "aria-label": "Scroll to bottom",
23735
23735
  title: "Scroll to bottom",
23736
- children: /* @__PURE__ */ R.jsx(oc, { size: ce.BUTTON_SIZES.ICON_SIZES.BUTTON })
23736
+ children: /* @__PURE__ */ R.jsx(oc, { size: fe.BUTTON_SIZES.ICON_SIZES.BUTTON })
23737
23737
  }
23738
23738
  ),
23739
23739
  e.length === 0 ? /* @__PURE__ */ R.jsxs("div", { className: "text-center py-4", children: [
@@ -23741,39 +23741,49 @@ $1 $2
23741
23741
  Eo,
23742
23742
  {
23743
23743
  iconName: n.icon,
23744
- size: ce.BUTTON_SIZES.ICON_SIZES.WELCOME,
23744
+ size: fe.BUTTON_SIZES.ICON_SIZES.WELCOME,
23745
23745
  className: "mx-auto mb-2",
23746
23746
  style: { color: r.iconColor }
23747
23747
  }
23748
23748
  ),
23749
- /* @__PURE__ */ R.jsx("h4", { className: "font-medium text-2xl mb-3", style: { color: r.text.primary }, children: n.welcome.title }),
23750
- /* @__PURE__ */ R.jsx("div", { className: "w-full px-3 mb-4", children: /* @__PURE__ */ R.jsx("div", { className: "max-w-lg mx-auto sm:max-w-2xl", children: /* @__PURE__ */ R.jsx("p", { className: "text-xl text-left px-1 py-2", style: { color: r.text.secondary }, children: n.welcome.description }) }) }),
23751
- /* @__PURE__ */ R.jsx("div", { className: "w-full px-2", children: /* @__PURE__ */ R.jsx("div", { className: "grid gap-2 max-w-2xl mx-auto grid-cols-1 sm:grid-cols-2", children: n.suggestedQuestions.map((N, $) => {
23752
- var V;
23753
- return /* @__PURE__ */ R.jsxs(
23754
- "div",
23755
- {
23756
- onClick: () => {
23757
- var K;
23758
- const ie = H ?? ce.MAX_SUGGESTED_QUESTION_QUERY_LENGTH, te = ((K = N.query) == null ? void 0 : K.length) > ie ? N.query.substring(0, ie) : N.query;
23759
- d(te), setTimeout(() => {
23760
- p();
23761
- }, ce.ANIMATIONS.TOGGLE_DELAY);
23762
- },
23763
- className: "flex items-center cursor-pointer p-2.5 text-left text-base rounded-lg transition-all duration-300 ease-in-out hover:opacity-80 hover:translate-x-1 hover:shadow-sm transform-gpu",
23764
- style: {
23765
- backgroundColor: "transparent",
23766
- color: r.suggestedQuestions.text
23767
- },
23768
- title: N.text,
23769
- children: [
23770
- /* @__PURE__ */ R.jsx(Yi, { size: ce.BUTTON_SIZES.ICON_SIZES.BUTTON, className: "mr-2.5 flex-shrink-0 opacity-70" }),
23771
- /* @__PURE__ */ R.jsx("span", { className: "flex-1 text-ellipsis overflow-hidden whitespace-nowrap font-medium", children: ((V = N.text) == null ? void 0 : V.length) > (Y ?? ce.MAX_SUGGESTED_QUESTION_LENGTH) ? `${N.text.substring(0, Y ?? ce.MAX_SUGGESTED_QUESTION_LENGTH)}...` : N.text })
23772
- ]
23749
+ /* @__PURE__ */ R.jsx("h4", { className: "font-medium text-xl mb-3", style: { color: r.text.primary }, children: n.welcome.title }),
23750
+ /* @__PURE__ */ R.jsx("div", { className: "w-full px-3 mb-4", children: /* @__PURE__ */ R.jsx("div", { className: "max-w-lg mx-auto sm:max-w-2xl", children: /* @__PURE__ */ R.jsx("p", { className: "text-lg text-left px-1 py-2", style: { color: r.text.secondary }, children: n.welcome.description }) }) }),
23751
+ /* @__PURE__ */ R.jsx("div", { className: "w-full px-2", children: /* @__PURE__ */ R.jsx(
23752
+ "div",
23753
+ {
23754
+ className: "grid gap-3 max-w-3xl mx-auto",
23755
+ style: {
23756
+ gridTemplateColumns: "repeat(auto-fit, minmax(240px, 1fr))",
23757
+ alignItems: "stretch"
23773
23758
  },
23774
- $
23775
- );
23776
- }) }) })
23759
+ children: n.suggestedQuestions.slice(0, 6).map((N, $) => {
23760
+ var ce, de;
23761
+ const V = H ?? fe.MAX_SUGGESTED_QUESTION_QUERY_LENGTH, ie = Y ?? fe.MAX_SUGGESTED_QUESTION_LENGTH, te = ((ce = N.query) == null ? void 0 : ce.length) > V ? N.query.substring(0, V) : N.query, K = ((de = N.text) == null ? void 0 : de.length) > ie ? `${N.text.substring(0, ie)}...` : N.text;
23762
+ return /* @__PURE__ */ R.jsxs(
23763
+ "button",
23764
+ {
23765
+ onClick: () => {
23766
+ d(te), setTimeout(() => {
23767
+ p();
23768
+ }, fe.ANIMATIONS.TOGGLE_DELAY);
23769
+ },
23770
+ className: "flex items-center w-full cursor-pointer px-4 py-3 text-left text-base rounded-xl transition-all duration-200 ease-in-out bg-transparent border border-transparent hover:bg-black/5 hover:border-primary/40 focus:outline-none focus:ring-2 focus:ring-primary/30",
23771
+ style: {
23772
+ color: r.suggestedQuestions.text,
23773
+ minHeight: "48px",
23774
+ fontWeight: 500
23775
+ },
23776
+ title: N.text,
23777
+ children: [
23778
+ /* @__PURE__ */ R.jsx(Yi, { size: fe.BUTTON_SIZES.ICON_SIZES.BUTTON, className: "mr-3 flex-shrink-0 opacity-70" }),
23779
+ /* @__PURE__ */ R.jsx("span", { className: "flex-1 truncate", children: K })
23780
+ ]
23781
+ },
23782
+ $
23783
+ );
23784
+ })
23785
+ }
23786
+ ) })
23777
23787
  ] }) : (
23778
23788
  /* Messages List */
23779
23789
  /* @__PURE__ */ R.jsxs("div", { className: "space-y-3", children: [
@@ -23845,7 +23855,7 @@ $1 $2
23845
23855
  }
23846
23856
  }
23847
23857
  ),
23848
- /* @__PURE__ */ R.jsxs("div", { className: "flex items-end gap-3", children: [
23858
+ /* @__PURE__ */ R.jsxs("div", { className: "flex items-center gap-3", children: [
23849
23859
  /* @__PURE__ */ R.jsxs(
23850
23860
  "div",
23851
23861
  {
@@ -23872,7 +23882,7 @@ $1 $2
23872
23882
  onFocus: () => s(!0),
23873
23883
  onBlur: () => s(!1),
23874
23884
  placeholder: "Type your message...",
23875
- maxLength: ce.MAX_MESSAGE_LENGTH,
23885
+ maxLength: fe.MAX_MESSAGE_LENGTH,
23876
23886
  id: "chat-message-input",
23877
23887
  name: "chat-message-input",
23878
23888
  className: "w-full resize-none outline-none p-4 pr-12 text-base custom-scrollbar focus:ring-0 focus:outline-none placeholder-gray-400 transition-all duration-200",
@@ -23894,7 +23904,7 @@ $1 $2
23894
23904
  {
23895
23905
  className: "absolute bottom-2 right-3 text-xs px-2.5 py-1 rounded-full transition-all duration-200 backdrop-blur-sm",
23896
23906
  style: {
23897
- ...$c(e.length, ce.MAX_MESSAGE_LENGTH),
23907
+ ...$c(e.length, fe.MAX_MESSAGE_LENGTH),
23898
23908
  backdropFilter: "blur(8px)",
23899
23909
  WebkitBackdropFilter: "blur(8px)",
23900
23910
  fontWeight: "500"
@@ -23902,7 +23912,7 @@ $1 $2
23902
23912
  children: [
23903
23913
  e.length,
23904
23914
  "/",
23905
- ce.MAX_MESSAGE_LENGTH
23915
+ fe.MAX_MESSAGE_LENGTH
23906
23916
  ]
23907
23917
  }
23908
23918
  )
@@ -23927,8 +23937,6 @@ $1 $2
23927
23937
  height: "54px",
23928
23938
  // Match input height + border (52px + 2px border)
23929
23939
  minHeight: "54px",
23930
- // Slight upward adjustment for perfect visual centering
23931
- transform: "translateY(-2px)",
23932
23940
  padding: "0",
23933
23941
  border: "none",
23934
23942
  boxShadow: e.trim() && !r ? `0 4px 12px -2px ${n.secondary}40` : "0 2px 4px -1px rgba(0, 0, 0, 0.1)",
@@ -23951,32 +23959,13 @@ $1 $2
23951
23959
  }
23952
23960
  ),
23953
23961
  /* @__PURE__ */ R.jsx(
23954
- "div",
23962
+ pc,
23955
23963
  {
23956
- className: "absolute inset-0 flex items-center justify-center",
23964
+ size: fe.BUTTON_SIZES.ICON_SIZES.SEND,
23965
+ className: "transition-transform duration-200 drop-shadow-sm",
23957
23966
  style: {
23958
- // Extra centering container to ensure perfect alignment
23959
- display: "flex",
23960
- alignItems: "center",
23961
- justifyContent: "center",
23962
- width: "100%",
23963
- height: "100%"
23964
- },
23965
- children: /* @__PURE__ */ R.jsx(
23966
- pc,
23967
- {
23968
- size: ce.BUTTON_SIZES.ICON_SIZES.SEND,
23969
- className: "transition-transform duration-200 group-hover:translate-x-0.5 drop-shadow-sm",
23970
- style: {
23971
- // Ensure icon is perfectly centered
23972
- display: "block",
23973
- strokeWidth: 2,
23974
- // Enterprise-grade icon weight
23975
- // Fine-tune positioning for perfect visual centering
23976
- transform: "translate(0.5px, -0.5px)"
23977
- }
23978
- }
23979
- )
23967
+ strokeWidth: 2
23968
+ }
23980
23969
  }
23981
23970
  )
23982
23971
  ]
@@ -24031,13 +24020,13 @@ $1 $2
24031
24020
  }));
24032
24021
  }, [e]), xt(() => {
24033
24022
  Vc({
24034
- MAX_SUGGESTED_QUESTION_LENGTH: e.maxSuggestedQuestionLength ?? ce.MAX_SUGGESTED_QUESTION_LENGTH,
24035
- MAX_SUGGESTED_QUESTION_QUERY_LENGTH: e.maxSuggestedQuestionQueryLength ?? ce.MAX_SUGGESTED_QUESTION_QUERY_LENGTH
24023
+ MAX_SUGGESTED_QUESTION_LENGTH: e.maxSuggestedQuestionLength ?? fe.MAX_SUGGESTED_QUESTION_LENGTH,
24024
+ MAX_SUGGESTED_QUESTION_QUERY_LENGTH: e.maxSuggestedQuestionQueryLength ?? fe.MAX_SUGGESTED_QUESTION_QUERY_LENGTH
24036
24025
  });
24037
24026
  }, [e.maxSuggestedQuestionLength, e.maxSuggestedQuestionQueryLength]);
24038
24027
  const {
24039
- messages: me,
24040
- isLoading: ve,
24028
+ messages: ce,
24029
+ isLoading: de,
24041
24030
  sendMessage: Ce,
24042
24031
  clearMessages: Ue
24043
24032
  } = To(), {
@@ -24051,28 +24040,28 @@ $1 $2
24051
24040
  focusInput: Ve
24052
24041
  } = Kc({
24053
24042
  onSendMessage: (Pe) => {
24054
- B.current = !0, Ce(Pe), setTimeout(() => F(!0), ce.ANIMATIONS.TOGGLE_DELAY);
24043
+ B.current = !0, Ce(Pe), setTimeout(() => F(!0), fe.ANIMATIONS.TOGGLE_DELAY);
24055
24044
  },
24056
- isLoading: ve,
24045
+ isLoading: de,
24057
24046
  isOpen: t
24058
24047
  });
24059
24048
  xt(() => {
24060
- me.length === 0 && b();
24061
- }, [me.length, b]);
24049
+ ce.length === 0 && b();
24050
+ }, [ce.length, b]);
24062
24051
  const Re = () => {
24063
- r(!t), t || (i(!1), setTimeout(() => F(!0), ce.ANIMATIONS.TOGGLE_DELAY));
24052
+ r(!t), t || (i(!1), setTimeout(() => F(!0), fe.ANIMATIONS.TOGGLE_DELAY));
24064
24053
  }, Ge = async (Pe, Et) => {
24065
24054
  try {
24066
24055
  await navigator.clipboard.writeText(Pe), s(Et), setTimeout(() => {
24067
24056
  s(null);
24068
- }, ce.ANIMATIONS.COPY_FEEDBACK_DURATION);
24057
+ }, fe.ANIMATIONS.COPY_FEEDBACK_DURATION);
24069
24058
  } catch (jt) {
24070
24059
  console.error("Failed to copy text: ", jt);
24071
24060
  }
24072
24061
  }, We = (Pe) => Pe.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
24073
24062
  return xt(() => {
24074
- (ve || me.length === 0) && F(!0);
24075
- }, [me, ve, F]), xt(() => () => {
24063
+ (de || ce.length === 0) && F(!0);
24064
+ }, [ce, de, F]), xt(() => () => {
24076
24065
  I.current && clearTimeout(I.current);
24077
24066
  }, [I]), /* @__PURE__ */ R.jsxs("div", { className: "fixed bottom-8 right-8 z-50 flex flex-col items-end font-sans", style: { fontFamily: Uc }, children: [
24078
24067
  t && /* @__PURE__ */ R.jsxs(
@@ -24081,8 +24070,8 @@ $1 $2
24081
24070
  className: "mb-4 w-full rounded-2xl shadow-elegant flex flex-col overflow-hidden border-0 transition-all duration-300 ease-in-out animate-slide-in-up backdrop-blur-lg",
24082
24071
  style: {
24083
24072
  background: `linear-gradient(145deg, ${K.background}, ${K.background}f0)`,
24084
- height: ce.WINDOW_DIMENSIONS.HEIGHT,
24085
- maxHeight: ce.WINDOW_DIMENSIONS.MAX_HEIGHT,
24073
+ height: fe.WINDOW_DIMENSIONS.HEIGHT,
24074
+ maxHeight: fe.WINDOW_DIMENSIONS.MAX_HEIGHT,
24086
24075
  width: qc(N),
24087
24076
  minWidth: jc(N),
24088
24077
  backdropFilter: "blur(20px)",
@@ -24118,7 +24107,7 @@ $1 $2
24118
24107
  Eo,
24119
24108
  {
24120
24109
  iconName: ie.icon,
24121
- size: ce.BUTTON_SIZES.ICON_SIZES.HEADER,
24110
+ size: fe.BUTTON_SIZES.ICON_SIZES.HEADER,
24122
24111
  className: "mr-2.5 transition-transform duration-300 hover:scale-110",
24123
24112
  style: { color: K.secondary, filter: "drop-shadow(0 2px 4px rgba(0,0,0,0.1))" }
24124
24113
  }
@@ -24136,7 +24125,7 @@ $1 $2
24136
24125
  style: { color: K.text.inverse },
24137
24126
  "aria-label": "Clear conversation",
24138
24127
  title: "Clear conversation",
24139
- children: /* @__PURE__ */ R.jsx(gc, { size: ce.BUTTON_SIZES.ICON_SIZES.SEND, className: "drop-shadow-sm" })
24128
+ children: /* @__PURE__ */ R.jsx(gc, { size: fe.BUTTON_SIZES.ICON_SIZES.SEND, className: "drop-shadow-sm" })
24140
24129
  }
24141
24130
  ),
24142
24131
  /* @__PURE__ */ R.jsx(
@@ -24146,7 +24135,7 @@ $1 $2
24146
24135
  className: "btn-modern transition-all duration-200 p-2 rounded-xl hover:bg-white hover:bg-opacity-20 animate-button-hover",
24147
24136
  style: { color: K.text.inverse },
24148
24137
  "aria-label": "Minimize chat",
24149
- children: /* @__PURE__ */ R.jsx(wa, { size: ce.BUTTON_SIZES.ICON_SIZES.MINIMIZE, className: "text-white opacity-90 drop-shadow-sm" })
24138
+ children: /* @__PURE__ */ R.jsx(wa, { size: fe.BUTTON_SIZES.ICON_SIZES.MINIMIZE, className: "text-white opacity-90 drop-shadow-sm" })
24150
24139
  }
24151
24140
  )
24152
24141
  ] })
@@ -24156,8 +24145,8 @@ $1 $2
24156
24145
  /* @__PURE__ */ R.jsx(
24157
24146
  N3,
24158
24147
  {
24159
- messages: me,
24160
- isLoading: ve,
24148
+ messages: ce,
24149
+ isLoading: de,
24161
24150
  theme: K,
24162
24151
  currentConfig: ie,
24163
24152
  showScrollTop: w,
@@ -24189,7 +24178,7 @@ $1 $2
24189
24178
  {
24190
24179
  message: S,
24191
24180
  isFocused: Me,
24192
- isLoading: ve,
24181
+ isLoading: de,
24193
24182
  theme: K,
24194
24183
  inputRef: we,
24195
24184
  handleMessageChange: E,
@@ -24218,8 +24207,8 @@ $1 $2
24218
24207
  background: t ? `linear-gradient(135deg, ${K.primary}, ${K.primary}e6)` : `linear-gradient(135deg, ${((nt = K.chatButton) == null ? void 0 : nt.background) || "#ffffff"}, ${((er = K.chatButton) == null ? void 0 : er.hoverBackground) || "#f8fafc"})`,
24219
24208
  color: t ? void 0 : K.iconColor,
24220
24209
  border: t ? "none" : "1px solid rgba(0, 0, 0, 0.1)",
24221
- width: ce.BUTTON_SIZES.CHAT_BUTTON.width,
24222
- height: ce.BUTTON_SIZES.CHAT_BUTTON.height,
24210
+ width: fe.BUTTON_SIZES.CHAT_BUTTON.width,
24211
+ height: fe.BUTTON_SIZES.CHAT_BUTTON.height,
24223
24212
  transform: a ? "translateY(-2px) scale(1.05)" : "translateY(0) scale(1)",
24224
24213
  boxShadow: t ? "0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04)" : "0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)"
24225
24214
  },
@@ -24240,7 +24229,7 @@ $1 $2
24240
24229
  t ? /* @__PURE__ */ R.jsx(
24241
24230
  wa,
24242
24231
  {
24243
- size: ce.BUTTON_SIZES.ICON_SIZES.MINIMIZE,
24232
+ size: fe.BUTTON_SIZES.ICON_SIZES.MINIMIZE,
24244
24233
  className: "text-white opacity-90 drop-shadow-sm relative z-10"
24245
24234
  }
24246
24235
  ) : /* @__PURE__ */ R.jsx(