@chatsystem/client 1.1.58 → 1.1.60

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/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as L, jsxs as Te, Fragment as vt } from "react/jsx-runtime";
2
2
  import * as Be from "react";
3
- import Le, { useState as fe, useEffect as Ce, forwardRef as cu, useRef as xe, useMemo as sn, useImperativeHandle as Ml, useContext as st, useCallback as kt, createContext as Bl, useLayoutEffect as Fl } from "react";
3
+ import Le, { useState as fe, useEffect as Ce, forwardRef as cu, useRef as xe, useMemo as sn, useImperativeHandle as Ml, useContext as tt, useCallback as kt, createContext as Bl, useLayoutEffect as Fl } from "react";
4
4
  import Xn, { createPortal as Hl } from "react-dom";
5
5
  import Ul from "lottie-react";
6
6
  import { DotLottieReact as $l } from "@lottiefiles/dotlottie-react";
@@ -48,9 +48,12 @@ const Br = (e) => ({
48
48
  settings: {
49
49
  maxUserMessagesPerDiscussion: 20
50
50
  // to be overriden by remote api conf received
51
+ },
52
+ tracking: {
53
+ queryParamToAppend: ""
51
54
  }
52
55
  }
53
- }), Hn = Le.createContext({
56
+ }), mn = Le.createContext({
54
57
  companySettings: Gl(),
55
58
  setCompanySettings: () => {
56
59
  }
@@ -142,8 +145,8 @@ function mu(e) {
142
145
  const { imgEl: s, width: o, height: l } = await new Promise((c, d) => {
143
146
  const f = URL.createObjectURL(a), h = new Image();
144
147
  h.crossOrigin = "anonymous", h.onload = () => {
145
- const m = h.naturalWidth, y = h.naturalHeight;
146
- c({ imgEl: h, width: m, height: y });
148
+ const m = h.naturalWidth, A = h.naturalHeight;
149
+ c({ imgEl: h, width: m, height: A });
147
150
  }, h.onerror = () => {
148
151
  URL.revokeObjectURL(f), d(new Error("Spritesheet image decode failed"));
149
152
  }, h.src = f, h.decode?.().catch(() => {
@@ -224,8 +227,8 @@ function Zl({
224
227
  return d({ kind: "loading" }), hu(e).then(async (m) => {
225
228
  if (!h)
226
229
  if (m.kind === "zip") {
227
- const y = Kl(m) ? m.blob : await (await fetch(m.blobUrl)).blob();
228
- f = URL.createObjectURL(y), d({ kind: "lottieZip", blobUrl: f }), o?.(f);
230
+ const A = Kl(m) ? m.blob : await (await fetch(m.blobUrl)).blob();
231
+ f = URL.createObjectURL(A), d({ kind: "lottieZip", blobUrl: f }), o?.(f);
229
232
  } else
230
233
  d({ kind: "json", data: m.data }), o?.(m.data);
231
234
  }).catch(
@@ -307,31 +310,31 @@ async function Jl(e, t = {}) {
307
310
  }
308
311
  m[Y] = U;
309
312
  }
310
- const y = Ai(
313
+ const A = Ai(
311
314
  h,
312
315
  n,
313
316
  Math.min(r, c / 2)
314
- ), A = Ai(
317
+ ), x = Ai(
315
318
  m,
316
319
  n,
317
320
  Math.min(r, d / 2)
318
321
  );
319
- if (!y || !A)
322
+ if (!A || !x)
320
323
  return i && console.warn("detectGrid: could not find periods"), null;
321
- const C = Math.max(1, Math.round(c / y)), x = Math.max(1, Math.round(d / A)), O = xi(
324
+ const C = Math.max(1, Math.round(c / A)), y = Math.max(1, Math.round(d / x)), O = xi(
322
325
  h,
323
- y,
326
+ A,
324
327
  C,
325
328
  a
326
- ), I = xi(m, A, x, a), M = Math.max(1, y - O), S = Math.max(1, A - I);
327
- if (M * C > c + 2 || S * x > d + 2)
329
+ ), I = xi(m, x, y, a), M = Math.max(1, A - O), S = Math.max(1, x - I);
330
+ if (M * C > c + 2 || S * y > d + 2)
328
331
  return i && console.warn("detectGrid: sanity check failed"), null;
329
332
  const w = pa(h, 60), Q = pa(m, 60), oe = Math.max(0, _i(h, w)), ae = Math.max(0, _i(m, Q));
330
333
  return i && console.log({
331
- periodX: y,
332
- periodY: A,
334
+ periodX: A,
335
+ periodY: x,
333
336
  columns: C,
334
- rows: x,
337
+ rows: y,
335
338
  gutterX: O,
336
339
  gutterY: I,
337
340
  frameWidth: M,
@@ -340,7 +343,7 @@ async function Jl(e, t = {}) {
340
343
  originY: ae
341
344
  }), {
342
345
  columns: C,
343
- rows: x,
346
+ rows: y,
344
347
  frameWidth: M,
345
348
  frameHeight: S,
346
349
  gutterX: O,
@@ -353,18 +356,18 @@ function Ai(e, t, n) {
353
356
  const r = Eu(e);
354
357
  let a = 0;
355
358
  for (let m = 0; m < e.length; m++) {
356
- const y = e[m] - r;
357
- a += y * y;
359
+ const A = e[m] - r;
360
+ a += A * A;
358
361
  }
359
362
  if (a === 0) return null;
360
363
  const i = new Float32Array(n + 1);
361
364
  let s = 0, o = -1 / 0;
362
365
  for (let m = t; m <= n; m++) {
363
- let y = 0;
366
+ let A = 0;
364
367
  for (let C = 0; C + m < e.length; C++)
365
- y += (e[C] - r) * (e[C + m] - r);
366
- const A = y / a;
367
- i[m] = A, A > o && (o = A, s = m);
368
+ A += (e[C] - r) * (e[C + m] - r);
369
+ const x = A / a;
370
+ i[m] = x, x > o && (o = x, s = m);
368
371
  }
369
372
  if (s <= t || s >= n) return s || null;
370
373
  const l = i[s - 1], c = i[s], d = i[s + 1], f = l - 2 * c + d, h = f === 0 ? 0 : 0.5 * (l - d) / f;
@@ -434,10 +437,10 @@ const tc = cu(function({
434
437
  autoplay: f = !0,
435
438
  loop: h = !0,
436
439
  startFrame: m = 0,
437
- direction: y = "forward",
438
- scale: A = 1,
440
+ direction: A = "forward",
441
+ scale: x = 1,
439
442
  backgroundColor: C,
440
- className: x,
443
+ className: y,
441
444
  style: O,
442
445
  pauseWhenHidden: I = !1,
443
446
  originX: M,
@@ -543,12 +546,12 @@ const tc = cu(function({
543
546
  ]), Ct = () => {
544
547
  const ce = Y.current;
545
548
  if (!ce || Ue.length === 0) return;
546
- const _e = Ue[Math.max(0, Math.min(q, Ue.length - 1))], Ae = Math.max(1, Math.round(_e.w * A)), ye = Math.max(1, Math.round(_e.h * A));
549
+ const _e = Ue[Math.max(0, Math.min(q, Ue.length - 1))], Ae = Math.max(1, Math.round(_e.w * x)), ye = Math.max(1, Math.round(_e.h * x));
547
550
  ce.style.width = Ae + "px", ce.style.height = ye + "px", ce.width = Ae * ee, ce.height = ye * ee;
548
551
  };
549
552
  Ce(() => {
550
553
  Ct();
551
- }, [Oe, A, Ue.length, ee, q]);
554
+ }, [Oe, x, Ue.length, ee, q]);
552
555
  const ft = (ce) => {
553
556
  const _e = $ ?? B ?? null, Ae = Y.current;
554
557
  if (!Ae || !_e || Ue.length === 0) return;
@@ -564,8 +567,8 @@ const tc = cu(function({
564
567
  Re.h,
565
568
  0,
566
569
  0,
567
- Math.round(Re.w * A),
568
- Math.round(Re.h * A)
570
+ Math.round(Re.w * x),
571
+ Math.round(Re.h * x)
569
572
  ), ye.restore();
570
573
  };
571
574
  return Ce(() => {
@@ -584,15 +587,15 @@ const tc = cu(function({
584
587
  ce = ye - Re % _e, b((N) => {
585
588
  const D = Ue.length - 1;
586
589
  let j = N;
587
- return y === "forward" ? j = N + 1 : y === "backward" ? j = N - 1 : ((N >= D && W.current === 1 || N <= 0 && W.current === -1) && (W.current *= -1), j = N + W.current), (j > D || j < 0) && (h ? j = y === "backward" ? D : 0 : (j = Math.max(0, Math.min(j, D)), F(!1), Q?.())), j;
590
+ return A === "forward" ? j = N + 1 : A === "backward" ? j = N - 1 : ((N >= D && W.current === 1 || N <= 0 && W.current === -1) && (W.current *= -1), j = N + W.current), (j > D || j < 0) && (h ? j = A === "backward" ? D : 0 : (j = Math.max(0, Math.min(j, D)), F(!1), Q?.())), j;
588
591
  });
589
592
  };
590
593
  return U.current = requestAnimationFrame(Ae), () => {
591
594
  U.current && cancelAnimationFrame(U.current);
592
595
  };
593
- }, [Oe, d, p, h, y, Ue.length, q]), Ce(() => {
596
+ }, [Oe, d, p, h, A, Ue.length, q]), Ce(() => {
594
597
  ft(q), oe?.(q);
595
- }, [q, Oe, A, ee]), Ce(() => {
598
+ }, [q, Oe, x, ee]), Ce(() => {
596
599
  if (!I) return;
597
600
  const ce = () => {
598
601
  document.hidden && F(!1);
@@ -612,7 +615,7 @@ const tc = cu(function({
612
615
  currentFrame: () => q
613
616
  }),
614
617
  [p, q, Ue.length]
615
- ), /* @__PURE__ */ L("div", { className: x, style: O, children: /* @__PURE__ */ L("canvas", { ref: Y, "aria-label": "spritesheet animation" }) });
618
+ ), /* @__PURE__ */ L("div", { className: y, style: O, children: /* @__PURE__ */ L("canvas", { ref: Y, "aria-label": "spritesheet animation" }) });
616
619
  });
617
620
  function nc({
618
621
  url: e,
@@ -673,11 +676,11 @@ const Va = ({ facet: e }) => {
673
676
  spr_originX: f,
674
677
  spr_originY: h,
675
678
  spr_scaleDesktop: m,
676
- spr_scaleMobile: y,
677
- spr_scaleTablet: A
679
+ spr_scaleMobile: A,
680
+ spr_scaleTablet: x
678
681
  } = e, C = rc({
679
- mobile: y ?? 0.6,
680
- tablet: A ?? 0.8,
682
+ mobile: A ?? 0.6,
683
+ tablet: x ?? 0.8,
681
684
  desktop: m ?? 1
682
685
  });
683
686
  return /* @__PURE__ */ Te("div", { className: "assetContainer", children: [
@@ -686,7 +689,7 @@ const Va = ({ facet: e }) => {
686
689
  {
687
690
  src: n,
688
691
  autoplay: !0,
689
- onError: (x) => console.error(x)
692
+ onError: (y) => console.error(y)
690
693
  }
691
694
  ),
692
695
  t === Qe.AgentDisplayFacetModeType.SVG && /* @__PURE__ */ L("div", { children: /* @__PURE__ */ L(nc, { url: n }) }),
@@ -714,7 +717,7 @@ const Va = ({ facet: e }) => {
714
717
  isWidgetOpen: e,
715
718
  setIsWidgetOpen: t
716
719
  }) => {
717
- const { companySettings: n } = st(Hn);
720
+ const { companySettings: n } = tt(mn);
718
721
  return /* @__PURE__ */ Te(
719
722
  "div",
720
723
  {
@@ -794,7 +797,7 @@ var Si;
794
797
  function ic() {
795
798
  if (Si) return ge;
796
799
  Si = 1;
797
- var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, c = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, f = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, m = e ? Symbol.for("react.memo") : 60115, y = e ? Symbol.for("react.lazy") : 60116, A = e ? Symbol.for("react.block") : 60121, C = e ? Symbol.for("react.fundamental") : 60117, x = e ? Symbol.for("react.responder") : 60118, O = e ? Symbol.for("react.scope") : 60119;
800
+ var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, c = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, f = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, m = e ? Symbol.for("react.memo") : 60115, A = e ? Symbol.for("react.lazy") : 60116, x = e ? Symbol.for("react.block") : 60121, C = e ? Symbol.for("react.fundamental") : 60117, y = e ? Symbol.for("react.responder") : 60118, O = e ? Symbol.for("react.scope") : 60119;
798
801
  function I(S) {
799
802
  if (typeof S == "object" && S !== null) {
800
803
  var w = S.$$typeof;
@@ -812,7 +815,7 @@ function ic() {
812
815
  switch (S = S && S.$$typeof, S) {
813
816
  case o:
814
817
  case d:
815
- case y:
818
+ case A:
816
819
  case m:
817
820
  case s:
818
821
  return S;
@@ -828,7 +831,7 @@ function ic() {
828
831
  function M(S) {
829
832
  return I(S) === c;
830
833
  }
831
- return ge.AsyncMode = l, ge.ConcurrentMode = c, ge.ContextConsumer = o, ge.ContextProvider = s, ge.Element = t, ge.ForwardRef = d, ge.Fragment = r, ge.Lazy = y, ge.Memo = m, ge.Portal = n, ge.Profiler = i, ge.StrictMode = a, ge.Suspense = f, ge.isAsyncMode = function(S) {
834
+ return ge.AsyncMode = l, ge.ConcurrentMode = c, ge.ContextConsumer = o, ge.ContextProvider = s, ge.Element = t, ge.ForwardRef = d, ge.Fragment = r, ge.Lazy = A, ge.Memo = m, ge.Portal = n, ge.Profiler = i, ge.StrictMode = a, ge.Suspense = f, ge.isAsyncMode = function(S) {
832
835
  return M(S) || I(S) === l;
833
836
  }, ge.isConcurrentMode = M, ge.isContextConsumer = function(S) {
834
837
  return I(S) === o;
@@ -841,7 +844,7 @@ function ic() {
841
844
  }, ge.isFragment = function(S) {
842
845
  return I(S) === r;
843
846
  }, ge.isLazy = function(S) {
844
- return I(S) === y;
847
+ return I(S) === A;
845
848
  }, ge.isMemo = function(S) {
846
849
  return I(S) === m;
847
850
  }, ge.isPortal = function(S) {
@@ -853,7 +856,7 @@ function ic() {
853
856
  }, ge.isSuspense = function(S) {
854
857
  return I(S) === f;
855
858
  }, ge.isValidElementType = function(S) {
856
- return typeof S == "string" || typeof S == "function" || S === r || S === c || S === i || S === a || S === f || S === h || typeof S == "object" && S !== null && (S.$$typeof === y || S.$$typeof === m || S.$$typeof === s || S.$$typeof === o || S.$$typeof === d || S.$$typeof === C || S.$$typeof === x || S.$$typeof === O || S.$$typeof === A);
859
+ return typeof S == "string" || typeof S == "function" || S === r || S === c || S === i || S === a || S === f || S === h || typeof S == "object" && S !== null && (S.$$typeof === A || S.$$typeof === m || S.$$typeof === s || S.$$typeof === o || S.$$typeof === d || S.$$typeof === C || S.$$typeof === y || S.$$typeof === O || S.$$typeof === x);
857
860
  }, ge.typeOf = I, ge;
858
861
  }
859
862
  var be = {};
@@ -868,10 +871,10 @@ var be = {};
868
871
  var Ci;
869
872
  function sc() {
870
873
  return Ci || (Ci = 1, process.env.NODE_ENV !== "production" && (function() {
871
- var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, c = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, f = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, m = e ? Symbol.for("react.memo") : 60115, y = e ? Symbol.for("react.lazy") : 60116, A = e ? Symbol.for("react.block") : 60121, C = e ? Symbol.for("react.fundamental") : 60117, x = e ? Symbol.for("react.responder") : 60118, O = e ? Symbol.for("react.scope") : 60119;
874
+ var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, c = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, f = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, m = e ? Symbol.for("react.memo") : 60115, A = e ? Symbol.for("react.lazy") : 60116, x = e ? Symbol.for("react.block") : 60121, C = e ? Symbol.for("react.fundamental") : 60117, y = e ? Symbol.for("react.responder") : 60118, O = e ? Symbol.for("react.scope") : 60119;
872
875
  function I(H) {
873
876
  return typeof H == "string" || typeof H == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
874
- H === r || H === c || H === i || H === a || H === f || H === h || typeof H == "object" && H !== null && (H.$$typeof === y || H.$$typeof === m || H.$$typeof === s || H.$$typeof === o || H.$$typeof === d || H.$$typeof === C || H.$$typeof === x || H.$$typeof === O || H.$$typeof === A);
877
+ H === r || H === c || H === i || H === a || H === f || H === h || typeof H == "object" && H !== null && (H.$$typeof === A || H.$$typeof === m || H.$$typeof === s || H.$$typeof === o || H.$$typeof === d || H.$$typeof === C || H.$$typeof === y || H.$$typeof === O || H.$$typeof === x);
875
878
  }
876
879
  function M(H) {
877
880
  if (typeof H == "object" && H !== null) {
@@ -892,7 +895,7 @@ function sc() {
892
895
  switch (dt) {
893
896
  case o:
894
897
  case d:
895
- case y:
898
+ case A:
896
899
  case m:
897
900
  case s:
898
901
  return dt;
@@ -905,7 +908,7 @@ function sc() {
905
908
  }
906
909
  }
907
910
  }
908
- var S = l, w = c, Q = o, oe = s, ae = t, Y = d, U = r, B = y, z = m, $ = n, K = i, le = a, pe = f, Oe = !1;
911
+ var S = l, w = c, Q = o, oe = s, ae = t, Y = d, U = r, B = A, z = m, $ = n, K = i, le = a, pe = f, Oe = !1;
909
912
  function He(H) {
910
913
  return Oe || (Oe = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), p(H) || M(H) === l;
911
914
  }
@@ -928,7 +931,7 @@ function sc() {
928
931
  return M(H) === r;
929
932
  }
930
933
  function G(H) {
931
- return M(H) === y;
934
+ return M(H) === A;
932
935
  }
933
936
  function ee(H) {
934
937
  return M(H) === m;
@@ -991,30 +994,30 @@ function uc() {
991
994
  type: !0
992
995
  }, i = {};
993
996
  i[e.ForwardRef] = r, i[e.Memo] = a;
994
- function s(y) {
995
- return e.isMemo(y) ? a : i[y.$$typeof] || t;
997
+ function s(A) {
998
+ return e.isMemo(A) ? a : i[A.$$typeof] || t;
996
999
  }
997
1000
  var o = Object.defineProperty, l = Object.getOwnPropertyNames, c = Object.getOwnPropertySymbols, d = Object.getOwnPropertyDescriptor, f = Object.getPrototypeOf, h = Object.prototype;
998
- function m(y, A, C) {
999
- if (typeof A != "string") {
1001
+ function m(A, x, C) {
1002
+ if (typeof x != "string") {
1000
1003
  if (h) {
1001
- var x = f(A);
1002
- x && x !== h && m(y, x, C);
1004
+ var y = f(x);
1005
+ y && y !== h && m(A, y, C);
1003
1006
  }
1004
- var O = l(A);
1005
- c && (O = O.concat(c(A)));
1006
- for (var I = s(y), M = s(A), S = 0; S < O.length; ++S) {
1007
+ var O = l(x);
1008
+ c && (O = O.concat(c(x)));
1009
+ for (var I = s(A), M = s(x), S = 0; S < O.length; ++S) {
1007
1010
  var w = O[S];
1008
1011
  if (!n[w] && !(C && C[w]) && !(M && M[w]) && !(I && I[w])) {
1009
- var Q = d(A, w);
1012
+ var Q = d(x, w);
1010
1013
  try {
1011
- o(y, w, Q);
1014
+ o(A, w, Q);
1012
1015
  } catch {
1013
1016
  }
1014
1017
  }
1015
1018
  }
1016
1019
  }
1017
- return y;
1020
+ return A;
1018
1021
  }
1019
1022
  return Hr = m, Hr;
1020
1023
  }
@@ -3147,31 +3150,31 @@ var kc = (
3147
3150
  var m = he(d, this.clonePosition());
3148
3151
  c = { style: h, styleLocation: m };
3149
3152
  }
3150
- var y = this.tryParseArgumentClose(a);
3151
- if (y.err)
3152
- return y;
3153
- var A = he(a, this.clonePosition());
3153
+ var A = this.tryParseArgumentClose(a);
3154
+ if (A.err)
3155
+ return A;
3156
+ var x = he(a, this.clonePosition());
3154
3157
  if (c && Ri(c?.style, "::", 0)) {
3155
3158
  var C = Lc(c.style.slice(2));
3156
3159
  if (o === "number") {
3157
3160
  var f = this.parseNumberSkeletonFromString(C, c.styleLocation);
3158
3161
  return f.err ? f : {
3159
- val: { type: ve.number, value: r, location: A, style: f.val },
3162
+ val: { type: ve.number, value: r, location: x, style: f.val },
3160
3163
  err: null
3161
3164
  };
3162
3165
  } else {
3163
3166
  if (C.length === 0)
3164
- return this.error(de.EXPECT_DATE_TIME_SKELETON, A);
3165
- var x = C;
3166
- this.locale && (x = bc(C, this.locale));
3167
+ return this.error(de.EXPECT_DATE_TIME_SKELETON, x);
3168
+ var y = C;
3169
+ this.locale && (y = bc(C, this.locale));
3167
3170
  var h = {
3168
3171
  type: cn.dateTime,
3169
- pattern: x,
3172
+ pattern: y,
3170
3173
  location: c.styleLocation,
3171
- parsedOptions: this.shouldParseSkeletons ? dc(x) : {}
3174
+ parsedOptions: this.shouldParseSkeletons ? dc(y) : {}
3172
3175
  }, O = o === "date" ? ve.date : ve.time;
3173
3176
  return {
3174
- val: { type: O, value: r, location: A, style: h },
3177
+ val: { type: O, value: r, location: x, style: h },
3175
3178
  err: null
3176
3179
  };
3177
3180
  }
@@ -3180,7 +3183,7 @@ var kc = (
3180
3183
  val: {
3181
3184
  type: o === "number" ? ve.number : o === "date" ? ve.date : ve.time,
3182
3185
  value: r,
3183
- location: A,
3186
+ location: x,
3184
3187
  style: (i = c?.style) !== null && i !== void 0 ? i : null
3185
3188
  },
3186
3189
  err: null
@@ -3206,9 +3209,9 @@ var kc = (
3206
3209
  var w = this.tryParsePluralOrSelectOptions(t, o, n, M);
3207
3210
  if (w.err)
3208
3211
  return w;
3209
- var y = this.tryParseArgumentClose(a);
3210
- if (y.err)
3211
- return y;
3212
+ var A = this.tryParseArgumentClose(a);
3213
+ if (A.err)
3214
+ return A;
3212
3215
  var Q = he(a, this.clonePosition());
3213
3216
  return o === "select" ? {
3214
3217
  val: {
@@ -3304,16 +3307,16 @@ var kc = (
3304
3307
  var m = this.clonePosition();
3305
3308
  if (!this.bumpIf("{"))
3306
3309
  return this.error(n === "select" ? de.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : de.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, he(this.clonePosition(), this.clonePosition()));
3307
- var y = this.parseMessage(t + 1, n, r);
3308
- if (y.err)
3309
- return y;
3310
- var A = this.tryParseArgumentClose(m);
3310
+ var A = this.parseMessage(t + 1, n, r);
3311
3311
  if (A.err)
3312
3312
  return A;
3313
+ var x = this.tryParseArgumentClose(m);
3314
+ if (x.err)
3315
+ return x;
3313
3316
  o.push([
3314
3317
  c,
3315
3318
  {
3316
- value: y.val,
3319
+ value: A.val,
3317
3320
  location: he(m, this.clonePosition())
3318
3321
  }
3319
3322
  ]), l.add(c), this.bumpSpace(), i = this.parseIdentifierIfPossible(), c = i.value, d = i.location;
@@ -3590,10 +3593,10 @@ function ur(e, t, n, r, a, i, s) {
3590
3593
  continue;
3591
3594
  }
3592
3595
  if (_u(d)) {
3593
- var y = d.children, A = d.value, C = a[A];
3596
+ var A = d.children, x = d.value, C = a[x];
3594
3597
  if (!Du(C))
3595
- throw new Gc(A, "function", s);
3596
- var x = ur(y, t, n, r, a, i), O = C(x.map(function(S) {
3598
+ throw new Gc(x, "function", s);
3599
+ var y = ur(A, t, n, r, a, i), O = C(y.map(function(S) {
3597
3600
  return S.value;
3598
3601
  }));
3599
3602
  Array.isArray(O) || (O = [O]), o.push.apply(o, O.map(function(S) {
@@ -4012,44 +4015,44 @@ function Fi(e, t) {
4012
4015
  var _a = function(e, t, n, r, a) {
4013
4016
  var i = e.locale, s = e.formats, o = e.messages, l = e.defaultLocale, c = e.defaultFormats, d = e.fallbackOnEmptyString, f = e.onError, h = e.timeZone, m = e.defaultRichTextElements;
4014
4017
  n === void 0 && (n = { id: "" });
4015
- var y = n.id, A = n.defaultMessage;
4016
- gu(!!y, "[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");
4017
- var C = String(y), x = (
4018
+ var A = n.id, x = n.defaultMessage;
4019
+ gu(!!A, "[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");
4020
+ var C = String(A), y = (
4018
4021
  // In case messages is Object.create(null)
4019
4022
  // e.g import('foo.json') from webpack)
4020
4023
  // See https://github.com/formatjs/formatjs/issues/1914
4021
4024
  o && Object.prototype.hasOwnProperty.call(o, C) && o[C]
4022
4025
  );
4023
- if (Array.isArray(x) && x.length === 1 && x[0].type === ve.literal)
4024
- return x[0].value;
4025
- if (!r && x && typeof x == "string" && !m)
4026
- return x.replace(/'\{(.*?)\}'/gi, "{$1}");
4027
- if (r = V(V({}, m), r || {}), s = Fi(s, h), c = Fi(c, h), !x) {
4028
- if (d === !1 && x === "")
4029
- return x;
4030
- if ((!A || i && i.toLowerCase() !== l.toLowerCase()) && f(new Zc(n, i)), A)
4026
+ if (Array.isArray(y) && y.length === 1 && y[0].type === ve.literal)
4027
+ return y[0].value;
4028
+ if (!r && y && typeof y == "string" && !m)
4029
+ return y.replace(/'\{(.*?)\}'/gi, "{$1}");
4030
+ if (r = V(V({}, m), r || {}), s = Fi(s, h), c = Fi(c, h), !y) {
4031
+ if (d === !1 && y === "")
4032
+ return y;
4033
+ if ((!x || i && i.toLowerCase() !== l.toLowerCase()) && f(new Zc(n, i)), x)
4031
4034
  try {
4032
- var O = t.getMessageFormat(A, l, c, a);
4035
+ var O = t.getMessageFormat(x, l, c, a);
4033
4036
  return O.format(r);
4034
4037
  } catch (I) {
4035
- return f(new zr('Error formatting default message for: "'.concat(C, '", rendering default message verbatim'), i, n, I)), typeof A == "string" ? A : C;
4038
+ return f(new zr('Error formatting default message for: "'.concat(C, '", rendering default message verbatim'), i, n, I)), typeof x == "string" ? x : C;
4036
4039
  }
4037
4040
  return C;
4038
4041
  }
4039
4042
  try {
4040
- var O = t.getMessageFormat(x, i, s, V({ formatters: t }, a || {}));
4043
+ var O = t.getMessageFormat(y, i, s, V({ formatters: t }, a || {}));
4041
4044
  return O.format(r);
4042
4045
  } catch (I) {
4043
- f(new zr('Error formatting message: "'.concat(C, '", using ').concat(A ? "default message" : "id", " as fallback."), i, n, I));
4046
+ f(new zr('Error formatting message: "'.concat(C, '", using ').concat(x ? "default message" : "id", " as fallback."), i, n, I));
4044
4047
  }
4045
- if (A)
4048
+ if (x)
4046
4049
  try {
4047
- var O = t.getMessageFormat(A, l, c, a);
4050
+ var O = t.getMessageFormat(x, l, c, a);
4048
4051
  return O.format(r);
4049
4052
  } catch (I) {
4050
4053
  f(new zr('Error formatting the default message for: "'.concat(C, '", rendering message verbatim'), i, n, I));
4051
4054
  }
4052
- return typeof x == "string" ? x : typeof A == "string" ? A : C;
4055
+ return typeof y == "string" ? y : typeof x == "string" ? x : C;
4053
4056
  }, Fu = [
4054
4057
  "formatMatcher",
4055
4058
  "timeZone",
@@ -4533,7 +4536,7 @@ function Vu(e, t) {
4533
4536
  Object.assign(n, e[a].property), Object.assign(r, e[a].normal);
4534
4537
  return new Yn(n, r, t);
4535
4538
  }
4536
- function Pn(e) {
4539
+ function Mn(e) {
4537
4540
  return e.toLowerCase();
4538
4541
  }
4539
4542
  class lt {
@@ -4593,7 +4596,7 @@ function ji(e, t, n) {
4593
4596
  n && (e[t] = n);
4594
4597
  }
4595
4598
  const Pd = {}.hasOwnProperty;
4596
- function mn(e) {
4599
+ function pn(e) {
4597
4600
  const t = {}, n = {};
4598
4601
  let r;
4599
4602
  for (r in e.properties)
@@ -4604,11 +4607,11 @@ function mn(e) {
4604
4607
  a,
4605
4608
  e.space
4606
4609
  );
4607
- e.mustUseProperty && e.mustUseProperty.includes(r) && (i.mustUseProperty = !0), t[r] = i, n[Pn(r)] = r, n[Pn(i.attribute)] = r;
4610
+ e.mustUseProperty && e.mustUseProperty.includes(r) && (i.mustUseProperty = !0), t[r] = i, n[Mn(r)] = r, n[Mn(i.attribute)] = r;
4608
4611
  }
4609
4612
  return new Yn(t, n, e.space);
4610
4613
  }
4611
- const Wu = mn({
4614
+ const Wu = pn({
4612
4615
  space: "xlink",
4613
4616
  transform(e, t) {
4614
4617
  return "xlink:" + t.slice(5).toLowerCase();
@@ -4622,7 +4625,7 @@ const Wu = mn({
4622
4625
  xLinkTitle: null,
4623
4626
  xLinkType: null
4624
4627
  }
4625
- }), Xu = mn({
4628
+ }), Xu = pn({
4626
4629
  space: "xml",
4627
4630
  transform(e, t) {
4628
4631
  return "xml:" + t.slice(3).toLowerCase();
@@ -4635,12 +4638,12 @@ function Qu(e, t) {
4635
4638
  function Ku(e, t) {
4636
4639
  return Qu(e, t.toLowerCase());
4637
4640
  }
4638
- const Zu = mn({
4641
+ const Zu = pn({
4639
4642
  space: "xmlns",
4640
4643
  attributes: { xmlnsxlink: "xmlns:xlink" },
4641
4644
  transform: Ku,
4642
4645
  properties: { xmlns: null, xmlnsXLink: null }
4643
- }), Ju = mn({
4646
+ }), Ju = pn({
4644
4647
  transform(e, t) {
4645
4648
  return t === "role" ? t : "aria-" + t.slice(4).toLowerCase();
4646
4649
  },
@@ -4695,7 +4698,7 @@ const Zu = mn({
4695
4698
  ariaValueText: null,
4696
4699
  role: null
4697
4700
  }
4698
- }), Md = mn({
4701
+ }), Md = pn({
4699
4702
  space: "html",
4700
4703
  attributes: {
4701
4704
  acceptcharset: "accept-charset",
@@ -5054,7 +5057,7 @@ const Zu = mn({
5054
5057
  security: null,
5055
5058
  unselectable: null
5056
5059
  }
5057
- }), Bd = mn({
5060
+ }), Bd = pn({
5058
5061
  space: "svg",
5059
5062
  attributes: {
5060
5063
  accentHeight: "accent-height",
@@ -5615,7 +5618,7 @@ const Zu = mn({
5615
5618
  }
5616
5619
  }), Fd = /^data[-\w.:]+$/i, Vi = /-[a-z]/g, Hd = /[A-Z]/g;
5617
5620
  function Ir(e, t) {
5618
- const n = Pn(t);
5621
+ const n = Mn(t);
5619
5622
  let r = t, a = lt;
5620
5623
  if (n in e.normal)
5621
5624
  return e.property[e.normal[n]];
@@ -5672,39 +5675,39 @@ function Yd() {
5672
5675
  Wi = 1;
5673
5676
  var e = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, t = /\n/g, n = /^\s*/, r = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, a = /^:\s*/, i = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, s = /^[;\s]*/, o = /^\s+|\s+$/g, l = `
5674
5677
  `, c = "/", d = "*", f = "", h = "comment", m = "declaration";
5675
- jr = function(A, C) {
5676
- if (typeof A != "string")
5678
+ jr = function(x, C) {
5679
+ if (typeof x != "string")
5677
5680
  throw new TypeError("First argument must be a string");
5678
- if (!A) return [];
5681
+ if (!x) return [];
5679
5682
  C = C || {};
5680
- var x = 1, O = 1;
5683
+ var y = 1, O = 1;
5681
5684
  function I(z) {
5682
5685
  var $ = z.match(t);
5683
- $ && (x += $.length);
5686
+ $ && (y += $.length);
5684
5687
  var K = z.lastIndexOf(l);
5685
5688
  O = ~K ? z.length - K : O + z.length;
5686
5689
  }
5687
5690
  function M() {
5688
- var z = { line: x, column: O };
5691
+ var z = { line: y, column: O };
5689
5692
  return function($) {
5690
5693
  return $.position = new S(z), oe(), $;
5691
5694
  };
5692
5695
  }
5693
5696
  function S(z) {
5694
- this.start = z, this.end = { line: x, column: O }, this.source = C.source;
5697
+ this.start = z, this.end = { line: y, column: O }, this.source = C.source;
5695
5698
  }
5696
- S.prototype.content = A;
5699
+ S.prototype.content = x;
5697
5700
  function w(z) {
5698
5701
  var $ = new Error(
5699
- C.source + ":" + x + ":" + O + ": " + z
5702
+ C.source + ":" + y + ":" + O + ": " + z
5700
5703
  );
5701
- if ($.reason = z, $.filename = C.source, $.line = x, $.column = O, $.source = A, !C.silent) throw $;
5704
+ if ($.reason = z, $.filename = C.source, $.line = y, $.column = O, $.source = x, !C.silent) throw $;
5702
5705
  }
5703
5706
  function Q(z) {
5704
- var $ = z.exec(A);
5707
+ var $ = z.exec(x);
5705
5708
  if ($) {
5706
5709
  var K = $[0];
5707
- return I(K), A = A.slice(K.length), $;
5710
+ return I(K), x = x.slice(K.length), $;
5708
5711
  }
5709
5712
  }
5710
5713
  function oe() {
@@ -5718,13 +5721,13 @@ function Yd() {
5718
5721
  }
5719
5722
  function Y() {
5720
5723
  var z = M();
5721
- if (!(c != A.charAt(0) || d != A.charAt(1))) {
5722
- for (var $ = 2; f != A.charAt($) && (d != A.charAt($) || c != A.charAt($ + 1)); )
5724
+ if (!(c != x.charAt(0) || d != x.charAt(1))) {
5725
+ for (var $ = 2; f != x.charAt($) && (d != x.charAt($) || c != x.charAt($ + 1)); )
5723
5726
  ++$;
5724
- if ($ += 2, f === A.charAt($ - 1))
5727
+ if ($ += 2, f === x.charAt($ - 1))
5725
5728
  return w("End of comment missing");
5726
- var K = A.slice(2, $ - 2);
5727
- return O += 2, I(K), A = A.slice($), O += 2, z({
5729
+ var K = x.slice(2, $ - 2);
5730
+ return O += 2, I(K), x = x.slice($), O += 2, z({
5728
5731
  type: h,
5729
5732
  comment: K
5730
5733
  });
@@ -5736,8 +5739,8 @@ function Yd() {
5736
5739
  if (Y(), !Q(a)) return w("property missing ':'");
5737
5740
  var K = Q(i), le = z({
5738
5741
  type: m,
5739
- property: y($[0].replace(e, f)),
5740
- value: K ? y(K[0].replace(e, f)) : f
5742
+ property: A($[0].replace(e, f)),
5743
+ value: K ? A(K[0].replace(e, f)) : f
5741
5744
  });
5742
5745
  return Q(s), le;
5743
5746
  }
@@ -5751,8 +5754,8 @@ function Yd() {
5751
5754
  }
5752
5755
  return oe(), B();
5753
5756
  };
5754
- function y(A) {
5755
- return A ? A.replace(o, f) : f;
5757
+ function A(x) {
5758
+ return x ? x.replace(o, f) : f;
5756
5759
  }
5757
5760
  return jr;
5758
5761
  }
@@ -5798,7 +5801,7 @@ function qd(e) {
5798
5801
  if (t && n)
5799
5802
  return { start: t, end: n };
5800
5803
  }
5801
- function Nn(e) {
5804
+ function vn(e) {
5802
5805
  return !e || typeof e != "object" ? "" : "position" in e || "type" in e ? Ki(e.position) : "start" in e || "end" in e ? Ki(e) : "line" in e || "column" in e ? Na(e) : "";
5803
5806
  }
5804
5807
  function Na(e) {
@@ -5881,7 +5884,7 @@ class Ye extends Error {
5881
5884
  l && (i.place = l.position);
5882
5885
  }
5883
5886
  const o = i.place && "start" in i.place ? i.place.start : i.place;
5884
- this.ancestors = i.ancestors || void 0, this.cause = i.cause || void 0, this.column = o ? o.column : void 0, this.fatal = void 0, this.file, this.message = a, this.line = o ? o.line : void 0, this.name = Nn(i.place) || "1:1", this.place = i.place || void 0, this.reason = this.message, this.ruleId = i.ruleId || void 0, this.source = i.source || void 0, this.stack = s && i.cause && typeof i.cause.stack == "string" ? i.cause.stack : "", this.actual, this.expected, this.note, this.url;
5887
+ this.ancestors = i.ancestors || void 0, this.cause = i.cause || void 0, this.column = o ? o.column : void 0, this.fatal = void 0, this.file, this.message = a, this.line = o ? o.line : void 0, this.name = vn(i.place) || "1:1", this.place = i.place || void 0, this.reason = this.message, this.ruleId = i.ruleId || void 0, this.source = i.source || void 0, this.stack = s && i.cause && typeof i.cause.stack == "string" ? i.cause.stack : "", this.actual, this.expected, this.note, this.url;
5885
5888
  }
5886
5889
  }
5887
5890
  Ye.prototype.file = "";
@@ -5968,7 +5971,7 @@ function t0(e, t) {
5968
5971
  return r.type, /** @type {Child | undefined} */
5969
5972
  e.evaluater.evaluateExpression(r.expression);
5970
5973
  }
5971
- Mn(e, t.position);
5974
+ Bn(e, t.position);
5972
5975
  }
5973
5976
  function n0(e, t) {
5974
5977
  if (t.data && t.data.estree && e.evaluater)
@@ -5976,7 +5979,7 @@ function n0(e, t) {
5976
5979
  /** @type {Child | undefined} */
5977
5980
  e.evaluater.evaluateProgram(t.data.estree)
5978
5981
  );
5979
- Mn(e, t.position);
5982
+ Bn(e, t.position);
5980
5983
  }
5981
5984
  function r0(e, t, n) {
5982
5985
  const r = e.schema;
@@ -6061,7 +6064,7 @@ function l0(e, t) {
6061
6064
  e.evaluater.evaluateExpression(o.argument)
6062
6065
  );
6063
6066
  } else
6064
- Mn(e, t.position);
6067
+ Bn(e, t.position);
6065
6068
  else {
6066
6069
  const a = r.name;
6067
6070
  let i;
@@ -6070,7 +6073,7 @@ function l0(e, t) {
6070
6073
  const o = r.value.data.estree.body[0];
6071
6074
  o.type, i = e.evaluater.evaluateExpression(o.expression);
6072
6075
  } else
6073
- Mn(e, t.position);
6076
+ Bn(e, t.position);
6074
6077
  else
6075
6078
  i = r.value === null ? !0 : r.value;
6076
6079
  n[a] = /** @type {Props[keyof Props]} */
@@ -6163,9 +6166,9 @@ function io(e, t, n) {
6163
6166
  }
6164
6167
  if (e.evaluater)
6165
6168
  return e.evaluater.evaluateExpression(r);
6166
- Mn(e);
6169
+ Bn(e);
6167
6170
  }
6168
- function Mn(e, t) {
6171
+ function Bn(e, t) {
6169
6172
  const n = new Ye(
6170
6173
  "Cannot handle MDX estrees without `createEvaluater`",
6171
6174
  {
@@ -6258,7 +6261,7 @@ function xt(e, t, n, r) {
6258
6261
  for (n && e.splice(t, n); i < r.length; )
6259
6262
  s = r.slice(i, i + 1e4), s.unshift(t, 0), e.splice(...s), i += 1e4, t += 1e4;
6260
6263
  }
6261
- function nt(e, t) {
6264
+ function rt(e, t) {
6262
6265
  return e.length > 0 ? (xt(e, e.length, 0, t), e) : t;
6263
6266
  }
6264
6267
  const ts = {}.hasOwnProperty;
@@ -6334,7 +6337,7 @@ function Bt(e) {
6334
6337
  return n !== null && n > -1 && e.test(String.fromCharCode(n));
6335
6338
  }
6336
6339
  }
6337
- function pn(e) {
6340
+ function En(e) {
6338
6341
  const t = [];
6339
6342
  let n = -1, r = 0, a = 0;
6340
6343
  for (; ++n < e.length; ) {
@@ -6430,7 +6433,7 @@ function O0(e) {
6430
6433
  w = t.events[S][1].end;
6431
6434
  break;
6432
6435
  }
6433
- x(r);
6436
+ y(r);
6434
6437
  let Q = M;
6435
6438
  for (; Q < t.events.length; )
6436
6439
  t.events[Q][1].end = Object.assign({}, w), Q++;
@@ -6448,7 +6451,7 @@ function O0(e) {
6448
6451
  if (!a)
6449
6452
  return h(I);
6450
6453
  if (a.currentConstruct && a.currentConstruct.concrete)
6451
- return y(I);
6454
+ return A(I);
6452
6455
  t.interrupt = !!(a.currentConstruct && !a._gfmTableDynamicInterruptHack);
6453
6456
  }
6454
6457
  return t.containerState = {}, e.check(
@@ -6458,38 +6461,38 @@ function O0(e) {
6458
6461
  )(I);
6459
6462
  }
6460
6463
  function d(I) {
6461
- return a && O(), x(r), h(I);
6464
+ return a && O(), y(r), h(I);
6462
6465
  }
6463
6466
  function f(I) {
6464
- return t.parser.lazy[t.now().line] = r !== n.length, s = t.now().offset, y(I);
6467
+ return t.parser.lazy[t.now().line] = r !== n.length, s = t.now().offset, A(I);
6465
6468
  }
6466
6469
  function h(I) {
6467
6470
  return t.containerState = {}, e.attempt(
6468
6471
  ns,
6469
6472
  m,
6470
- y
6473
+ A
6471
6474
  )(I);
6472
6475
  }
6473
6476
  function m(I) {
6474
6477
  return r++, n.push([t.currentConstruct, t.containerState]), h(I);
6475
6478
  }
6476
- function y(I) {
6479
+ function A(I) {
6477
6480
  if (I === null) {
6478
- a && O(), x(0), e.consume(I);
6481
+ a && O(), y(0), e.consume(I);
6479
6482
  return;
6480
6483
  }
6481
6484
  return a = a || t.parser.flow(t.now()), e.enter("chunkFlow", {
6482
6485
  contentType: "flow",
6483
6486
  previous: i,
6484
6487
  _tokenizer: a
6485
- }), A(I);
6488
+ }), x(I);
6486
6489
  }
6487
- function A(I) {
6490
+ function x(I) {
6488
6491
  if (I === null) {
6489
- C(e.exit("chunkFlow"), !0), x(0), e.consume(I);
6492
+ C(e.exit("chunkFlow"), !0), y(0), e.consume(I);
6490
6493
  return;
6491
6494
  }
6492
- return ne(I) ? (e.consume(I), C(e.exit("chunkFlow")), r = 0, t.interrupt = void 0, o) : (e.consume(I), A);
6495
+ return ne(I) ? (e.consume(I), C(e.exit("chunkFlow")), r = 0, t.interrupt = void 0, o) : (e.consume(I), x);
6493
6496
  }
6494
6497
  function C(I, M) {
6495
6498
  const S = t.sliceStream(I);
@@ -6513,7 +6516,7 @@ function O0(e) {
6513
6516
  }
6514
6517
  ae = !0;
6515
6518
  }
6516
- for (x(r), w = Q; w < t.events.length; )
6519
+ for (y(r), w = Q; w < t.events.length; )
6517
6520
  t.events[w][1].end = Object.assign({}, Y), w++;
6518
6521
  xt(
6519
6522
  t.events,
@@ -6523,7 +6526,7 @@ function O0(e) {
6523
6526
  ), t.events.length = w;
6524
6527
  }
6525
6528
  }
6526
- function x(I) {
6529
+ function y(I) {
6527
6530
  let M = n.length;
6528
6531
  for (; M-- > I; ) {
6529
6532
  const S = n[M];
@@ -6590,27 +6593,27 @@ function R0(e, t) {
6590
6593
  type: l > 1 ? "strong" : "emphasis",
6591
6594
  start: Object.assign({}, s.start),
6592
6595
  end: Object.assign({}, o.end)
6593
- }, e[r][1].end = Object.assign({}, s.start), e[n][1].start = Object.assign({}, o.end), c = [], e[r][1].end.offset - e[r][1].start.offset && (c = nt(c, [
6596
+ }, e[r][1].end = Object.assign({}, s.start), e[n][1].start = Object.assign({}, o.end), c = [], e[r][1].end.offset - e[r][1].start.offset && (c = rt(c, [
6594
6597
  ["enter", e[r][1], t],
6595
6598
  ["exit", e[r][1], t]
6596
- ])), c = nt(c, [
6599
+ ])), c = rt(c, [
6597
6600
  ["enter", a, t],
6598
6601
  ["enter", s, t],
6599
6602
  ["exit", s, t],
6600
6603
  ["enter", i, t]
6601
- ]), c = nt(
6604
+ ]), c = rt(
6602
6605
  c,
6603
6606
  ri(
6604
6607
  t.parser.constructs.insideSpan.null,
6605
6608
  e.slice(r + 1, n),
6606
6609
  t
6607
6610
  )
6608
- ), c = nt(c, [
6611
+ ), c = rt(c, [
6609
6612
  ["exit", i, t],
6610
6613
  ["enter", o, t],
6611
6614
  ["exit", o, t],
6612
6615
  ["exit", a, t]
6613
- ]), e[n][1].end.offset - e[n][1].start.offset ? (d = 2, c = nt(c, [
6616
+ ]), e[n][1].end.offset - e[n][1].start.offset ? (d = 2, c = rt(c, [
6614
6617
  ["enter", e[n][1], t],
6615
6618
  ["exit", e[n][1], t]
6616
6619
  ])) : d = 0, xt(e, r - 1, n - r + 3, c), n = r + c.length - d - 2;
@@ -6671,8 +6674,8 @@ function P0(e, t, n) {
6671
6674
  }
6672
6675
  function h(m) {
6673
6676
  if ((m === 45 || et(m)) && r++ < 63) {
6674
- const y = m === 45 ? h : f;
6675
- return e.consume(m), y;
6677
+ const A = m === 45 ? h : f;
6678
+ return e.consume(m), A;
6676
6679
  }
6677
6680
  return n(m);
6678
6681
  }
@@ -6796,7 +6799,7 @@ function z0(e, t, n) {
6796
6799
  return w === o ? (s++, e.consume(w), d) : s < 3 ? n(w) : (e.exit("codeFencedFenceSequence"), me(w) ? Ie(e, f, "whitespace")(w) : f(w));
6797
6800
  }
6798
6801
  function f(w) {
6799
- return w === null || ne(w) ? (e.exit("codeFencedFence"), r.interrupt ? t(w) : e.check(is, A, M)(w)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
6802
+ return w === null || ne(w) ? (e.exit("codeFencedFence"), r.interrupt ? t(w) : e.check(is, x, M)(w)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
6800
6803
  contentType: "string"
6801
6804
  }), h(w));
6802
6805
  }
@@ -6806,18 +6809,18 @@ function z0(e, t, n) {
6806
6809
  function m(w) {
6807
6810
  return w === null || ne(w) ? f(w) : (e.enter("codeFencedFenceMeta"), e.enter("chunkString", {
6808
6811
  contentType: "string"
6809
- }), y(w));
6810
- }
6811
- function y(w) {
6812
- return w === null || ne(w) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), f(w)) : w === 96 && w === o ? n(w) : (e.consume(w), y);
6812
+ }), A(w));
6813
6813
  }
6814
6814
  function A(w) {
6815
+ return w === null || ne(w) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), f(w)) : w === 96 && w === o ? n(w) : (e.consume(w), A);
6816
+ }
6817
+ function x(w) {
6815
6818
  return e.attempt(a, M, C)(w);
6816
6819
  }
6817
6820
  function C(w) {
6818
- return e.enter("lineEnding"), e.consume(w), e.exit("lineEnding"), x;
6821
+ return e.enter("lineEnding"), e.consume(w), e.exit("lineEnding"), y;
6819
6822
  }
6820
- function x(w) {
6823
+ function y(w) {
6821
6824
  return i > 0 && me(w) ? Ie(
6822
6825
  e,
6823
6826
  O,
@@ -6826,7 +6829,7 @@ function z0(e, t, n) {
6826
6829
  )(w) : O(w);
6827
6830
  }
6828
6831
  function O(w) {
6829
- return w === null || ne(w) ? e.check(is, A, M)(w) : (e.enter("codeFlowValue"), I(w));
6832
+ return w === null || ne(w) ? e.check(is, x, M)(w) : (e.enter("codeFlowValue"), I(w));
6830
6833
  }
6831
6834
  function I(w) {
6832
6835
  return w === null || ne(w) ? (e.exit("codeFlowValue"), O(w)) : (e.consume(w), I);
@@ -6971,8 +6974,8 @@ function K0(e, t) {
6971
6974
  const n = e[t][1], r = e[t][2];
6972
6975
  let a = t - 1;
6973
6976
  const i = [], s = n._tokenizer || r.parser[n.contentType](n.start), o = s.events, l = [], c = {};
6974
- let d, f, h = -1, m = n, y = 0, A = 0;
6975
- const C = [A];
6977
+ let d, f, h = -1, m = n, A = 0, x = 0;
6978
+ const C = [x];
6976
6979
  for (; m; ) {
6977
6980
  for (; e[++a][1] !== m; )
6978
6981
  ;
@@ -6980,13 +6983,13 @@ function K0(e, t) {
6980
6983
  }
6981
6984
  for (m = n; ++h < o.length; )
6982
6985
  // Find a void token that includes a break.
6983
- o[h][0] === "exit" && o[h - 1][0] === "enter" && o[h][1].type === o[h - 1][1].type && o[h][1].start.line !== o[h][1].end.line && (A = h + 1, C.push(A), m._tokenizer = void 0, m.previous = void 0, m = m.next);
6986
+ o[h][0] === "exit" && o[h - 1][0] === "enter" && o[h][1].type === o[h - 1][1].type && o[h][1].start.line !== o[h][1].end.line && (x = h + 1, C.push(x), m._tokenizer = void 0, m.previous = void 0, m = m.next);
6984
6987
  for (s.events = [], m ? (m._tokenizer = void 0, m.previous = void 0) : C.pop(), h = C.length; h--; ) {
6985
- const x = o.slice(C[h], C[h + 1]), O = i.pop();
6986
- l.unshift([O, O + x.length - 1]), xt(e, O, 2, x);
6988
+ const y = o.slice(C[h], C[h + 1]), O = i.pop();
6989
+ l.unshift([O, O + y.length - 1]), xt(e, O, 2, y);
6987
6990
  }
6988
6991
  for (h = -1; ++h < l.length; )
6989
- c[y + l[h][0]] = y + l[h][1], y += l[h][1] - l[h][0] - 1;
6992
+ c[A + l[h][0]] = A + l[h][1], A += l[h][1] - l[h][0] - 1;
6990
6993
  return c;
6991
6994
  }
6992
6995
  const Z0 = {
@@ -7041,27 +7044,27 @@ function ho(e, t, n, r, a, i, s, o, l) {
7041
7044
  const c = l || Number.POSITIVE_INFINITY;
7042
7045
  let d = 0;
7043
7046
  return f;
7044
- function f(x) {
7045
- return x === 60 ? (e.enter(r), e.enter(a), e.enter(i), e.consume(x), e.exit(i), h) : x === null || x === 32 || x === 41 || va(x) ? n(x) : (e.enter(r), e.enter(s), e.enter(o), e.enter("chunkString", {
7047
+ function f(y) {
7048
+ return y === 60 ? (e.enter(r), e.enter(a), e.enter(i), e.consume(y), e.exit(i), h) : y === null || y === 32 || y === 41 || va(y) ? n(y) : (e.enter(r), e.enter(s), e.enter(o), e.enter("chunkString", {
7046
7049
  contentType: "string"
7047
- }), A(x));
7050
+ }), x(y));
7048
7051
  }
7049
- function h(x) {
7050
- return x === 62 ? (e.enter(i), e.consume(x), e.exit(i), e.exit(a), e.exit(r), t) : (e.enter(o), e.enter("chunkString", {
7052
+ function h(y) {
7053
+ return y === 62 ? (e.enter(i), e.consume(y), e.exit(i), e.exit(a), e.exit(r), t) : (e.enter(o), e.enter("chunkString", {
7051
7054
  contentType: "string"
7052
- }), m(x));
7055
+ }), m(y));
7053
7056
  }
7054
- function m(x) {
7055
- return x === 62 ? (e.exit("chunkString"), e.exit(o), h(x)) : x === null || x === 60 || ne(x) ? n(x) : (e.consume(x), x === 92 ? y : m);
7057
+ function m(y) {
7058
+ return y === 62 ? (e.exit("chunkString"), e.exit(o), h(y)) : y === null || y === 60 || ne(y) ? n(y) : (e.consume(y), y === 92 ? A : m);
7056
7059
  }
7057
- function y(x) {
7058
- return x === 60 || x === 62 || x === 92 ? (e.consume(x), m) : m(x);
7060
+ function A(y) {
7061
+ return y === 60 || y === 62 || y === 92 ? (e.consume(y), m) : m(y);
7059
7062
  }
7060
- function A(x) {
7061
- return !d && (x === null || x === 41 || Ke(x)) ? (e.exit("chunkString"), e.exit(o), e.exit(s), e.exit(r), t(x)) : d < c && x === 40 ? (e.consume(x), d++, A) : x === 41 ? (e.consume(x), d--, A) : x === null || x === 32 || x === 40 || va(x) ? n(x) : (e.consume(x), x === 92 ? C : A);
7063
+ function x(y) {
7064
+ return !d && (y === null || y === 41 || Ke(y)) ? (e.exit("chunkString"), e.exit(o), e.exit(s), e.exit(r), t(y)) : d < c && y === 40 ? (e.consume(y), d++, x) : y === 41 ? (e.consume(y), d--, x) : y === null || y === 32 || y === 40 || va(y) ? n(y) : (e.consume(y), y === 92 ? C : x);
7062
7065
  }
7063
- function C(x) {
7064
- return x === 40 || x === 41 || x === 92 ? (e.consume(x), A) : A(x);
7066
+ function C(y) {
7067
+ return y === 40 || y === 41 || y === 92 ? (e.consume(y), x) : x(y);
7065
7068
  }
7066
7069
  }
7067
7070
  function mo(e, t, n, r, a, i) {
@@ -7109,7 +7112,7 @@ function po(e, t, n, r, a, i) {
7109
7112
  return h === s || h === 92 ? (e.consume(h), d) : d(h);
7110
7113
  }
7111
7114
  }
7112
- function vn(e, t) {
7115
+ function wn(e, t) {
7113
7116
  let n;
7114
7117
  return r;
7115
7118
  function r(a) {
@@ -7152,7 +7155,7 @@ function sf(e, t, n) {
7152
7155
  ), m === 58 ? (e.enter("definitionMarker"), e.consume(m), e.exit("definitionMarker"), l) : n(m);
7153
7156
  }
7154
7157
  function l(m) {
7155
- return Ke(m) ? vn(e, c)(m) : c(m);
7158
+ return Ke(m) ? wn(e, c)(m) : c(m);
7156
7159
  }
7157
7160
  function c(m) {
7158
7161
  return ho(
@@ -7180,7 +7183,7 @@ function sf(e, t, n) {
7180
7183
  function uf(e, t, n) {
7181
7184
  return r;
7182
7185
  function r(o) {
7183
- return Ke(o) ? vn(e, a)(o) : n(o);
7186
+ return Ke(o) ? wn(e, a)(o) : n(o);
7184
7187
  }
7185
7188
  function a(o) {
7186
7189
  return po(
@@ -7349,29 +7352,29 @@ function bf(e, t, n) {
7349
7352
  return e.enter("htmlFlow"), e.enter("htmlFlowData"), e.consume(b), f;
7350
7353
  }
7351
7354
  function f(b) {
7352
- return b === 33 ? (e.consume(b), h) : b === 47 ? (e.consume(b), i = !0, A) : b === 63 ? (e.consume(b), a = 3, r.interrupt ? t : p) : yt(b) ? (e.consume(b), s = String.fromCharCode(b), C) : n(b);
7355
+ return b === 33 ? (e.consume(b), h) : b === 47 ? (e.consume(b), i = !0, x) : b === 63 ? (e.consume(b), a = 3, r.interrupt ? t : p) : yt(b) ? (e.consume(b), s = String.fromCharCode(b), C) : n(b);
7353
7356
  }
7354
7357
  function h(b) {
7355
- return b === 45 ? (e.consume(b), a = 2, m) : b === 91 ? (e.consume(b), a = 5, o = 0, y) : yt(b) ? (e.consume(b), a = 4, r.interrupt ? t : p) : n(b);
7358
+ return b === 45 ? (e.consume(b), a = 2, m) : b === 91 ? (e.consume(b), a = 5, o = 0, A) : yt(b) ? (e.consume(b), a = 4, r.interrupt ? t : p) : n(b);
7356
7359
  }
7357
7360
  function m(b) {
7358
7361
  return b === 45 ? (e.consume(b), r.interrupt ? t : p) : n(b);
7359
7362
  }
7360
- function y(b) {
7363
+ function A(b) {
7361
7364
  const W = "CDATA[";
7362
- return b === W.charCodeAt(o++) ? (e.consume(b), o === W.length ? r.interrupt ? t : B : y) : n(b);
7365
+ return b === W.charCodeAt(o++) ? (e.consume(b), o === W.length ? r.interrupt ? t : B : A) : n(b);
7363
7366
  }
7364
- function A(b) {
7367
+ function x(b) {
7365
7368
  return yt(b) ? (e.consume(b), s = String.fromCharCode(b), C) : n(b);
7366
7369
  }
7367
7370
  function C(b) {
7368
7371
  if (b === null || b === 47 || b === 62 || Ke(b)) {
7369
7372
  const W = b === 47, J = s.toLowerCase();
7370
- return !W && !i && us.includes(J) ? (a = 1, r.interrupt ? t(b) : B(b)) : hf.includes(s.toLowerCase()) ? (a = 6, W ? (e.consume(b), x) : r.interrupt ? t(b) : B(b)) : (a = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(b) : i ? O(b) : I(b));
7373
+ return !W && !i && us.includes(J) ? (a = 1, r.interrupt ? t(b) : B(b)) : hf.includes(s.toLowerCase()) ? (a = 6, W ? (e.consume(b), y) : r.interrupt ? t(b) : B(b)) : (a = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(b) : i ? O(b) : I(b));
7371
7374
  }
7372
7375
  return b === 45 || et(b) ? (e.consume(b), s += String.fromCharCode(b), C) : n(b);
7373
7376
  }
7374
- function x(b) {
7377
+ function y(b) {
7375
7378
  return b === 62 ? (e.consume(b), r.interrupt ? t : B) : n(b);
7376
7379
  }
7377
7380
  function O(b) {
@@ -7481,7 +7484,7 @@ function xf(e, t, n) {
7481
7484
  return p === 33 ? (e.consume(p), c) : p === 47 ? (e.consume(p), S) : p === 63 ? (e.consume(p), I) : yt(p) ? (e.consume(p), oe) : n(p);
7482
7485
  }
7483
7486
  function c(p) {
7484
- return p === 45 ? (e.consume(p), d) : p === 91 ? (e.consume(p), i = 0, y) : yt(p) ? (e.consume(p), O) : n(p);
7487
+ return p === 45 ? (e.consume(p), d) : p === 91 ? (e.consume(p), i = 0, A) : yt(p) ? (e.consume(p), O) : n(p);
7485
7488
  }
7486
7489
  function d(p) {
7487
7490
  return p === 45 ? (e.consume(p), m) : n(p);
@@ -7495,18 +7498,18 @@ function xf(e, t, n) {
7495
7498
  function m(p) {
7496
7499
  return p === 62 ? le(p) : p === 45 ? h(p) : f(p);
7497
7500
  }
7498
- function y(p) {
7501
+ function A(p) {
7499
7502
  const F = "CDATA[";
7500
- return p === F.charCodeAt(i++) ? (e.consume(p), i === F.length ? A : y) : n(p);
7503
+ return p === F.charCodeAt(i++) ? (e.consume(p), i === F.length ? x : A) : n(p);
7501
7504
  }
7502
- function A(p) {
7503
- return p === null ? n(p) : p === 93 ? (e.consume(p), C) : ne(p) ? (s = A, pe(p)) : (e.consume(p), A);
7505
+ function x(p) {
7506
+ return p === null ? n(p) : p === 93 ? (e.consume(p), C) : ne(p) ? (s = x, pe(p)) : (e.consume(p), x);
7504
7507
  }
7505
7508
  function C(p) {
7506
- return p === 93 ? (e.consume(p), x) : A(p);
7509
+ return p === 93 ? (e.consume(p), y) : x(p);
7507
7510
  }
7508
- function x(p) {
7509
- return p === 62 ? le(p) : p === 93 ? (e.consume(p), x) : A(p);
7511
+ function y(p) {
7512
+ return p === 62 ? le(p) : p === 93 ? (e.consume(p), y) : x(p);
7510
7513
  }
7511
7514
  function O(p) {
7512
7515
  return p === null || p === 62 ? le(p) : ne(p) ? (s = O, pe(p)) : (e.consume(p), O);
@@ -7617,19 +7620,19 @@ function Nf(e, t) {
7617
7620
  return o = [
7618
7621
  ["enter", l, t],
7619
7622
  ["enter", c, t]
7620
- ], o = nt(o, e.slice(i + 1, i + r + 3)), o = nt(o, [["enter", d, t]]), o = nt(
7623
+ ], o = rt(o, e.slice(i + 1, i + r + 3)), o = rt(o, [["enter", d, t]]), o = rt(
7621
7624
  o,
7622
7625
  ri(
7623
7626
  t.parser.constructs.insideSpan.null,
7624
7627
  e.slice(i + r + 4, s - 3),
7625
7628
  t
7626
7629
  )
7627
- ), o = nt(o, [
7630
+ ), o = rt(o, [
7628
7631
  ["exit", d, t],
7629
7632
  e[s - 2],
7630
7633
  e[s - 1],
7631
7634
  ["exit", c, t]
7632
- ]), o = nt(o, e.slice(s + 1)), o = nt(o, [["exit", l, t]]), xt(e, i, e.length, o), e;
7635
+ ]), o = rt(o, e.slice(s + 1)), o = rt(o, [["exit", l, t]]), xt(e, i, e.length, o), e;
7633
7636
  }
7634
7637
  function vf(e, t, n) {
7635
7638
  const r = this;
@@ -7681,7 +7684,7 @@ function wf(e, t, n) {
7681
7684
  return e.enter("resource"), e.enter("resourceMarker"), e.consume(f), e.exit("resourceMarker"), a;
7682
7685
  }
7683
7686
  function a(f) {
7684
- return Ke(f) ? vn(e, i)(f) : i(f);
7687
+ return Ke(f) ? wn(e, i)(f) : i(f);
7685
7688
  }
7686
7689
  function i(f) {
7687
7690
  return f === 41 ? d(f) : ho(
@@ -7697,7 +7700,7 @@ function wf(e, t, n) {
7697
7700
  )(f);
7698
7701
  }
7699
7702
  function s(f) {
7700
- return Ke(f) ? vn(e, l)(f) : d(f);
7703
+ return Ke(f) ? wn(e, l)(f) : d(f);
7701
7704
  }
7702
7705
  function o(f) {
7703
7706
  return n(f);
@@ -7713,7 +7716,7 @@ function wf(e, t, n) {
7713
7716
  )(f) : d(f);
7714
7717
  }
7715
7718
  function c(f) {
7716
- return Ke(f) ? vn(e, d)(f) : d(f);
7719
+ return Ke(f) ? wn(e, d)(f) : d(f);
7717
7720
  }
7718
7721
  function d(f) {
7719
7722
  return f === 41 ? (e.enter("resourceMarker"), e.consume(f), e.exit("resourceMarker"), e.exit("resource"), t) : n(f);
@@ -7835,11 +7838,11 @@ function Uf(e, t, n) {
7835
7838
  let i = a && a[1].type === "linePrefix" ? a[2].sliceSerialize(a[1], !0).length : 0, s = 0;
7836
7839
  return o;
7837
7840
  function o(m) {
7838
- const y = r.containerState.type || (m === 42 || m === 43 || m === 45 ? "listUnordered" : "listOrdered");
7839
- if (y === "listUnordered" ? !r.containerState.marker || m === r.containerState.marker : wa(m)) {
7840
- if (r.containerState.type || (r.containerState.type = y, e.enter(y, {
7841
+ const A = r.containerState.type || (m === 42 || m === 43 || m === 45 ? "listUnordered" : "listOrdered");
7842
+ if (A === "listUnordered" ? !r.containerState.marker || m === r.containerState.marker : wa(m)) {
7843
+ if (r.containerState.type || (r.containerState.type = A, e.enter(A, {
7841
7844
  _container: !0
7842
- })), y === "listUnordered")
7845
+ })), A === "listUnordered")
7843
7846
  return e.enter("listItemPrefix"), m === 42 || m === 45 ? e.check(or, n, c)(m) : c(m);
7844
7847
  if (!r.interrupt || m === 49)
7845
7848
  return e.enter("listItemPrefix"), e.enter("listItemValue"), l(m);
@@ -8132,14 +8135,14 @@ function Jf(e, t, n) {
8132
8135
  parser: e,
8133
8136
  sliceStream: m,
8134
8137
  sliceSerialize: h,
8135
- now: y,
8136
- defineSkip: A,
8138
+ now: A,
8139
+ defineSkip: x,
8137
8140
  write: f
8138
8141
  };
8139
8142
  let d = t.tokenize.call(c, l);
8140
8143
  return t.resolveAll && i.push(t), c;
8141
8144
  function f(U) {
8142
- return s = nt(s, U), C(), s[s.length - 1] !== null ? [] : (oe(t, 0), c.events = ri(i, c.events, c), c.events);
8145
+ return s = rt(s, U), C(), s[s.length - 1] !== null ? [] : (oe(t, 0), c.events = ri(i, c.events, c), c.events);
8143
8146
  }
8144
8147
  function h(U, B) {
8145
8148
  return th(m(U), B);
@@ -8147,7 +8150,7 @@ function Jf(e, t, n) {
8147
8150
  function m(U) {
8148
8151
  return eh(s, U);
8149
8152
  }
8150
- function y() {
8153
+ function A() {
8151
8154
  const { line: U, column: B, offset: z, _index: $, _bufferIndex: K } = r;
8152
8155
  return {
8153
8156
  line: U,
@@ -8157,7 +8160,7 @@ function Jf(e, t, n) {
8157
8160
  _bufferIndex: K
8158
8161
  };
8159
8162
  }
8160
- function A(U) {
8163
+ function x(U) {
8161
8164
  a[U.line] = U.column, Y();
8162
8165
  }
8163
8166
  function C() {
@@ -8166,12 +8169,12 @@ function Jf(e, t, n) {
8166
8169
  const B = s[r._index];
8167
8170
  if (typeof B == "string")
8168
8171
  for (U = r._index, r._bufferIndex < 0 && (r._bufferIndex = 0); r._index === U && r._bufferIndex < B.length; )
8169
- x(B.charCodeAt(r._bufferIndex));
8172
+ y(B.charCodeAt(r._bufferIndex));
8170
8173
  else
8171
- x(B);
8174
+ y(B);
8172
8175
  }
8173
8176
  }
8174
- function x(U) {
8177
+ function y(U) {
8175
8178
  d = d(U);
8176
8179
  }
8177
8180
  function O(U) {
@@ -8179,11 +8182,11 @@ function Jf(e, t, n) {
8179
8182
  }
8180
8183
  function I(U, B) {
8181
8184
  const z = B || {};
8182
- return z.type = U, z.start = y(), c.events.push(["enter", z, c]), o.push(z), z;
8185
+ return z.type = U, z.start = A(), c.events.push(["enter", z, c]), o.push(z), z;
8183
8186
  }
8184
8187
  function M(U) {
8185
8188
  const B = o.pop();
8186
- return B.end = y(), c.events.push(["exit", B, c]), B;
8189
+ return B.end = A(), c.events.push(["exit", B, c]), B;
8187
8190
  }
8188
8191
  function S(U, B) {
8189
8192
  oe(U, B.from);
@@ -8245,7 +8248,7 @@ function Jf(e, t, n) {
8245
8248
  ), U.resolveTo && (c.events = U.resolveTo(c.events, c));
8246
8249
  }
8247
8250
  function ae() {
8248
- const U = y(), B = c.previous, z = c.currentConstruct, $ = c.events.length, K = Array.from(o);
8251
+ const U = A(), B = c.previous, z = c.currentConstruct, $ = c.events.length, K = Array.from(o);
8249
8252
  return {
8250
8253
  restore: le,
8251
8254
  from: $
@@ -8520,11 +8523,11 @@ function Th(e) {
8520
8523
  characterReferenceMarkerNumeric: J,
8521
8524
  characterReferenceValue: G,
8522
8525
  codeFenced: l(C),
8523
- codeFencedFence: A,
8526
+ codeFencedFence: x,
8524
8527
  codeFencedFenceInfo: m,
8525
- codeFencedFenceMeta: y,
8528
+ codeFencedFenceMeta: A,
8526
8529
  codeFlowValue: Y,
8527
- codeIndented: l(x),
8530
+ codeIndented: l(y),
8528
8531
  codeText: l(K),
8529
8532
  codeTextData: Y,
8530
8533
  data: Y,
@@ -8649,11 +8652,11 @@ function Th(e) {
8649
8652
  if (ht) {
8650
8653
  let It = se;
8651
8654
  for (mt = void 0; It--; ) {
8652
- const tt = N[It];
8653
- if (tt[1].type === "lineEnding" || tt[1].type === "lineEndingBlank") {
8654
- if (tt[0] === "exit") continue;
8655
- mt && (N[mt][1].type = "lineEndingBlank", Ze = !0), tt[1].type = "lineEnding", mt = It;
8656
- } else if (!(tt[1].type === "linePrefix" || tt[1].type === "blockQuotePrefix" || tt[1].type === "blockQuotePrefixWhitespace" || tt[1].type === "blockQuoteMarker" || tt[1].type === "listItemIndent")) break;
8655
+ const nt = N[It];
8656
+ if (nt[1].type === "lineEnding" || nt[1].type === "lineEndingBlank") {
8657
+ if (nt[0] === "exit") continue;
8658
+ mt && (N[mt][1].type = "lineEndingBlank", Ze = !0), nt[1].type = "lineEnding", mt = It;
8659
+ } else if (!(nt[1].type === "linePrefix" || nt[1].type === "blockQuotePrefix" || nt[1].type === "blockQuotePrefixWhitespace" || nt[1].type === "blockQuoteMarker" || nt[1].type === "listItemIndent")) break;
8657
8660
  }
8658
8661
  je && (!mt || je < mt) && (ht._spread = !0), ht.end = Object.assign(
8659
8662
  {},
@@ -8704,7 +8707,7 @@ function Th(e) {
8704
8707
  if (se)
8705
8708
  se[0].type !== N.type && (D ? D.call(this, N, se[0]) : (se[1] || cs).call(this, N, se[0]));
8706
8709
  else throw new Error(
8707
- "Cannot close `" + N.type + "` (" + Nn({
8710
+ "Cannot close `" + N.type + "` (" + vn({
8708
8711
  start: N.start,
8709
8712
  end: N.end
8710
8713
  }) + "): it’s not open"
@@ -8727,18 +8730,18 @@ function Th(e) {
8727
8730
  const N = this.resume(), D = this.stack[this.stack.length - 1];
8728
8731
  D.lang = N;
8729
8732
  }
8730
- function y() {
8733
+ function A() {
8731
8734
  const N = this.resume(), D = this.stack[this.stack.length - 1];
8732
8735
  D.meta = N;
8733
8736
  }
8734
- function A() {
8737
+ function x() {
8735
8738
  this.data.flowCodeInside || (this.buffer(), this.data.flowCodeInside = !0);
8736
8739
  }
8737
8740
  function C() {
8738
8741
  const N = this.resume(), D = this.stack[this.stack.length - 1];
8739
8742
  D.value = N.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), this.data.flowCodeInside = void 0;
8740
8743
  }
8741
- function x() {
8744
+ function y() {
8742
8745
  const N = this.resume(), D = this.stack[this.stack.length - 1];
8743
8746
  D.value = N.replace(/(\r?\n|\r)$/g, "");
8744
8747
  }
@@ -9033,15 +9036,15 @@ function yh(e, t) {
9033
9036
  }
9034
9037
  function cs(e, t) {
9035
9038
  throw e ? new Error(
9036
- "Cannot close `" + e.type + "` (" + Nn({
9039
+ "Cannot close `" + e.type + "` (" + vn({
9037
9040
  start: e.start,
9038
9041
  end: e.end
9039
- }) + "): a different token (`" + t.type + "`, " + Nn({
9042
+ }) + "): a different token (`" + t.type + "`, " + vn({
9040
9043
  start: t.start,
9041
9044
  end: t.end
9042
9045
  }) + ") is open"
9043
9046
  ) : new Error(
9044
- "Cannot close document, a token (`" + t.type + "`, " + Nn({
9047
+ "Cannot close document, a token (`" + t.type + "`, " + vn({
9045
9048
  start: t.start,
9046
9049
  end: t.end
9047
9050
  }) + ") is still open"
@@ -9107,7 +9110,7 @@ function Ih(e, t) {
9107
9110
  return e.patch(t, n), e.applyData(t, n);
9108
9111
  }
9109
9112
  function Nh(e, t) {
9110
- const n = typeof e.options.clobberPrefix == "string" ? e.options.clobberPrefix : "user-content-", r = String(t.identifier).toUpperCase(), a = pn(r.toLowerCase()), i = e.footnoteOrder.indexOf(r);
9113
+ const n = typeof e.options.clobberPrefix == "string" ? e.options.clobberPrefix : "user-content-", r = String(t.identifier).toUpperCase(), a = En(r.toLowerCase()), i = e.footnoteOrder.indexOf(r);
9111
9114
  let s, o = e.footnoteCounts.get(r);
9112
9115
  o === void 0 ? (o = 0, e.footnoteOrder.push(r), s = e.footnoteOrder.length) : s = i + 1, o += 1, e.footnoteCounts.set(r, o);
9113
9116
  const l = {
@@ -9159,13 +9162,13 @@ function Oh(e, t) {
9159
9162
  const n = String(t.identifier).toUpperCase(), r = e.definitionById.get(n);
9160
9163
  if (!r)
9161
9164
  return yo(e, t);
9162
- const a = { src: pn(r.url || ""), alt: t.alt };
9165
+ const a = { src: En(r.url || ""), alt: t.alt };
9163
9166
  r.title !== null && r.title !== void 0 && (a.title = r.title);
9164
9167
  const i = { type: "element", tagName: "img", properties: a, children: [] };
9165
9168
  return e.patch(t, i), e.applyData(t, i);
9166
9169
  }
9167
9170
  function Lh(e, t) {
9168
- const n = { src: pn(t.url) };
9171
+ const n = { src: En(t.url) };
9169
9172
  t.alt !== null && t.alt !== void 0 && (n.alt = t.alt), t.title !== null && t.title !== void 0 && (n.title = t.title);
9170
9173
  const r = { type: "element", tagName: "img", properties: n, children: [] };
9171
9174
  return e.patch(t, r), e.applyData(t, r);
@@ -9185,7 +9188,7 @@ function kh(e, t) {
9185
9188
  const n = String(t.identifier).toUpperCase(), r = e.definitionById.get(n);
9186
9189
  if (!r)
9187
9190
  return yo(e, t);
9188
- const a = { href: pn(r.url || "") };
9191
+ const a = { href: En(r.url || "") };
9189
9192
  r.title !== null && r.title !== void 0 && (a.title = r.title);
9190
9193
  const i = {
9191
9194
  type: "element",
@@ -9196,7 +9199,7 @@ function kh(e, t) {
9196
9199
  return e.patch(t, i), e.applyData(t, i);
9197
9200
  }
9198
9201
  function Dh(e, t) {
9199
- const n = { href: pn(t.url) };
9202
+ const n = { href: En(t.url) };
9200
9203
  t.title !== null && t.title !== void 0 && (n.title = t.title);
9201
9204
  const r = {
9202
9205
  type: "element",
@@ -9320,8 +9323,8 @@ function zh(e, t, n) {
9320
9323
  for (; ++l < o; ) {
9321
9324
  const f = t.children[l], h = {}, m = s ? s[l] : void 0;
9322
9325
  m && (h.align = m);
9323
- let y = { type: "element", tagName: i, properties: h, children: [] };
9324
- f && (y.children = e.all(f), e.patch(f, y), y = e.applyData(f, y)), c.push(y);
9326
+ let A = { type: "element", tagName: i, properties: h, children: [] };
9327
+ f && (A.children = e.all(f), e.patch(f, A), A = e.applyData(f, A)), c.push(A);
9325
9328
  }
9326
9329
  const d = {
9327
9330
  type: "element",
@@ -9463,7 +9466,7 @@ const xo = -1, wr = 0, dr = 1, fr = 2, ii = 3, si = 4, ui = 5, oi = 6, _o = 7, S
9463
9466
  return n(new ms[i](s), a);
9464
9467
  };
9465
9468
  return r;
9466
- }, ps = (e) => Wh(/* @__PURE__ */ new Map(), e)(0), Jt = "", { toString: Xh } = {}, { keys: Qh } = Object, yn = (e) => {
9469
+ }, ps = (e) => Wh(/* @__PURE__ */ new Map(), e)(0), Jt = "", { toString: Xh } = {}, { keys: Qh } = Object, An = (e) => {
9467
9470
  const t = typeof e;
9468
9471
  if (t !== "object" || !e)
9469
9472
  return [wr, t];
@@ -9490,7 +9493,7 @@ const xo = -1, wr = 0, dr = 1, fr = 2, ii = 3, si = 4, ui = 5, oi = 6, _o = 7, S
9490
9493
  }, i = (s) => {
9491
9494
  if (n.has(s))
9492
9495
  return n.get(s);
9493
- let [o, l] = yn(s);
9496
+ let [o, l] = An(s);
9494
9497
  switch (o) {
9495
9498
  case wr: {
9496
9499
  let d = s;
@@ -9531,7 +9534,7 @@ const xo = -1, wr = 0, dr = 1, fr = 2, ii = 3, si = 4, ui = 5, oi = 6, _o = 7, S
9531
9534
  return i(s.toJSON());
9532
9535
  const d = [], f = a([o, d], s);
9533
9536
  for (const h of Qh(s))
9534
- (e || !tr(yn(s[h]))) && d.push([i(h), i(s[h])]);
9537
+ (e || !tr(An(s[h]))) && d.push([i(h), i(s[h])]);
9535
9538
  return f;
9536
9539
  }
9537
9540
  case ii:
@@ -9543,13 +9546,13 @@ const xo = -1, wr = 0, dr = 1, fr = 2, ii = 3, si = 4, ui = 5, oi = 6, _o = 7, S
9543
9546
  case ui: {
9544
9547
  const d = [], f = a([o, d], s);
9545
9548
  for (const [h, m] of s)
9546
- (e || !(tr(yn(h)) || tr(yn(m)))) && d.push([i(h), i(m)]);
9549
+ (e || !(tr(An(h)) || tr(An(m)))) && d.push([i(h), i(m)]);
9547
9550
  return f;
9548
9551
  }
9549
9552
  case oi: {
9550
9553
  const d = [], f = a([o, d], s);
9551
9554
  for (const h of s)
9552
- (e || !tr(yn(h))) && d.push(i(h));
9555
+ (e || !tr(An(h))) && d.push(i(h));
9553
9556
  return f;
9554
9557
  }
9555
9558
  }
@@ -9585,13 +9588,13 @@ function em(e) {
9585
9588
  const c = e.footnoteById.get(e.footnoteOrder[l]);
9586
9589
  if (!c)
9587
9590
  continue;
9588
- const d = e.all(c), f = String(c.identifier).toUpperCase(), h = pn(f.toLowerCase());
9591
+ const d = e.all(c), f = String(c.identifier).toUpperCase(), h = En(f.toLowerCase());
9589
9592
  let m = 0;
9590
- const y = [], A = e.footnoteCounts.get(f);
9591
- for (; A !== void 0 && ++m <= A; ) {
9592
- y.length > 0 && y.push({ type: "text", value: " " });
9593
+ const A = [], x = e.footnoteCounts.get(f);
9594
+ for (; x !== void 0 && ++m <= x; ) {
9595
+ A.length > 0 && A.push({ type: "text", value: " " });
9593
9596
  let O = typeof n == "string" ? n : n(l, m);
9594
- typeof O == "string" && (O = { type: "text", value: O }), y.push({
9597
+ typeof O == "string" && (O = { type: "text", value: O }), A.push({
9595
9598
  type: "element",
9596
9599
  tagName: "a",
9597
9600
  properties: {
@@ -9606,16 +9609,16 @@ function em(e) {
9606
9609
  const C = d[d.length - 1];
9607
9610
  if (C && C.type === "element" && C.tagName === "p") {
9608
9611
  const O = C.children[C.children.length - 1];
9609
- O && O.type === "text" ? O.value += " " : C.children.push({ type: "text", value: " " }), C.children.push(...y);
9612
+ O && O.type === "text" ? O.value += " " : C.children.push({ type: "text", value: " " }), C.children.push(...A);
9610
9613
  } else
9611
- d.push(...y);
9612
- const x = {
9614
+ d.push(...A);
9615
+ const y = {
9613
9616
  type: "element",
9614
9617
  tagName: "li",
9615
9618
  properties: { id: t + "fn-" + h },
9616
9619
  children: e.wrap(d, !0)
9617
9620
  };
9618
- e.patch(c, x), o.push(x);
9621
+ e.patch(c, y), o.push(y);
9619
9622
  }
9620
9623
  if (o.length !== 0)
9621
9624
  return {
@@ -9751,20 +9754,20 @@ function om(e, t, n, r) {
9751
9754
  }
9752
9755
  return h;
9753
9756
  function h() {
9754
- let m = Io, y, A, C;
9757
+ let m = Io, A, x, C;
9755
9758
  if ((!t || i(l, c, d[d.length - 1] || void 0)) && (m = lm(n(l, d)), m[0] === gs))
9756
9759
  return m;
9757
9760
  if ("children" in l && l.children) {
9758
- const x = (
9761
+ const y = (
9759
9762
  /** @type {UnistParent} */
9760
9763
  l
9761
9764
  );
9762
- if (x.children && m[0] !== um)
9763
- for (A = (r ? x.children.length : -1) + s, C = d.concat(x); A > -1 && A < x.children.length; ) {
9764
- const O = x.children[A];
9765
- if (y = o(O, A, C)(), y[0] === gs)
9766
- return y;
9767
- A = typeof y[1] == "number" ? y[1] : A + s;
9765
+ if (y.children && m[0] !== um)
9766
+ for (x = (r ? y.children.length : -1) + s, C = d.concat(y); x > -1 && x < y.children.length; ) {
9767
+ const O = y.children[x];
9768
+ if (A = o(O, x, C)(), A[0] === gs)
9769
+ return A;
9770
+ x = typeof A[1] == "number" ? A[1] : x + s;
9768
9771
  }
9769
9772
  }
9770
9773
  return m;
@@ -9809,8 +9812,8 @@ function dm(e, t) {
9809
9812
  return m(o, d, f);
9810
9813
  if (o.options.passThrough && o.options.passThrough.includes(h)) {
9811
9814
  if ("children" in d) {
9812
- const { children: A, ...C } = d, x = dn(C);
9813
- return x.children = o.all(d), x;
9815
+ const { children: x, ...C } = d, y = dn(C);
9816
+ return y.children = o.all(d), y;
9814
9817
  }
9815
9818
  return dn(d);
9816
9819
  }
@@ -9822,13 +9825,13 @@ function dm(e, t) {
9822
9825
  const h = d.children;
9823
9826
  let m = -1;
9824
9827
  for (; ++m < h.length; ) {
9825
- const y = o.one(h[m], d);
9826
- if (y) {
9827
- if (m && h[m - 1].type === "break" && (!Array.isArray(y) && y.type === "text" && (y.value = bs(y.value)), !Array.isArray(y) && y.type === "element")) {
9828
- const A = y.children[0];
9829
- A && A.type === "text" && (A.value = bs(A.value));
9828
+ const A = o.one(h[m], d);
9829
+ if (A) {
9830
+ if (m && h[m - 1].type === "break" && (!Array.isArray(A) && A.type === "text" && (A.value = bs(A.value)), !Array.isArray(A) && A.type === "element")) {
9831
+ const x = A.children[0];
9832
+ x && x.type === "text" && (x.value = bs(x.value));
9830
9833
  }
9831
- Array.isArray(y) ? f.push(...y) : f.push(y);
9834
+ Array.isArray(A) ? f.push(...A) : f.push(A);
9832
9835
  }
9833
9836
  }
9834
9837
  }
@@ -9933,12 +9936,12 @@ function gm() {
9933
9936
  return c[d];
9934
9937
  };
9935
9938
  return Xr = function l() {
9936
- var c, d, f, h, m, y, A = arguments[0], C = 1, x = arguments.length, O = !1;
9937
- for (typeof A == "boolean" && (O = A, A = arguments[1] || {}, C = 2), (A == null || typeof A != "object" && typeof A != "function") && (A = {}); C < x; ++C)
9939
+ var c, d, f, h, m, A, x = arguments[0], C = 1, y = arguments.length, O = !1;
9940
+ for (typeof x == "boolean" && (O = x, x = arguments[1] || {}, C = 2), (x == null || typeof x != "object" && typeof x != "function") && (x = {}); C < y; ++C)
9938
9941
  if (c = arguments[C], c != null)
9939
9942
  for (d in c)
9940
- f = o(A, d), h = o(c, d), A !== h && (O && h && (i(h) || (m = a(h))) ? (m ? (m = !1, y = f && a(f) ? f : []) : y = f && i(f) ? f : {}, s(A, { name: d, newValue: l(O, y, h) })) : typeof h < "u" && s(A, { name: d, newValue: h }));
9941
- return A;
9943
+ f = o(x, d), h = o(c, d), x !== h && (O && h && (i(h) || (m = a(h))) ? (m ? (m = !1, A = f && a(f) ? f : []) : A = f && i(f) ? f : {}, s(x, { name: d, newValue: l(O, A, h) })) : typeof h < "u" && s(x, { name: d, newValue: h }));
9944
+ return x;
9942
9945
  }, Xr;
9943
9946
  }
9944
9947
  var bm = gm();
@@ -10788,8 +10791,8 @@ class ci extends Rm {
10788
10791
  /** @type {CompileTree extends undefined ? Node : CompileTree} */
10789
10792
  /** @type {unknown} */
10790
10793
  f
10791
- ), y = r.stringify(m, h);
10792
- Mm(y) ? h.value = y : h.result = y, c(
10794
+ ), A = r.stringify(m, h);
10795
+ Mm(A) ? h.value = A : h.result = A, c(
10793
10796
  d,
10794
10797
  /** @type {VFileWithOutput<CompileResult>} */
10795
10798
  h
@@ -11058,9 +11061,9 @@ class ci extends Rm {
11058
11061
  if (h === -1)
11059
11062
  r.push([c, ...d]);
11060
11063
  else if (d.length > 0) {
11061
- let [m, ...y] = d;
11062
- const A = r[h][1];
11063
- Ra(A) && Ra(m) && (m = Qr(!0, A, m)), r[h] = [c, m, ...y];
11064
+ let [m, ...A] = d;
11065
+ const x = r[h][1];
11066
+ Ra(x) && Ra(m) && (m = Qr(!0, x, m)), r[h] = [c, m, ...A];
11064
11067
  }
11065
11068
  }
11066
11069
  }
@@ -11136,12 +11139,12 @@ const Fm = "https://github.com/remarkjs/react-markdown/blob/main/changelog.md",
11136
11139
  { from: "transformLinkUri", id: "#add-urltransform", to: "urlTransform" }
11137
11140
  ];
11138
11141
  function vo(e) {
11139
- const t = e.allowedElements, n = e.allowElement, r = e.children || "", a = e.className, i = e.components, s = e.disallowedElements, o = e.rehypePlugins || Cs, l = e.remarkPlugins || Cs, c = e.remarkRehypeOptions ? { ...e.remarkRehypeOptions, ...Is } : Is, d = e.skipHtml, f = e.unwrapDisallowed, h = e.urlTransform || $m, m = Dm().use(Ah).use(l).use(Em, c).use(o), y = new No();
11140
- typeof r == "string" && (y.value = r);
11142
+ const t = e.allowedElements, n = e.allowElement, r = e.children || "", a = e.className, i = e.components, s = e.disallowedElements, o = e.rehypePlugins || Cs, l = e.remarkPlugins || Cs, c = e.remarkRehypeOptions ? { ...e.remarkRehypeOptions, ...Is } : Is, d = e.skipHtml, f = e.unwrapDisallowed, h = e.urlTransform || $m, m = Dm().use(Ah).use(l).use(Em, c).use(o), A = new No();
11143
+ typeof r == "string" && (A.value = r);
11141
11144
  for (const O of Um)
11142
11145
  Object.hasOwn(e, O.from) && ("" + O.from + (O.to ? "use `" + O.to + "` instead" : "remove it") + Fm + O.id, void 0);
11143
- const A = m.parse(y);
11144
- let C = m.runSync(A, y);
11146
+ const x = m.parse(A);
11147
+ let C = m.runSync(x, A);
11145
11148
  return a && (C = {
11146
11149
  type: "element",
11147
11150
  tagName: "div",
@@ -11151,7 +11154,7 @@ function vo(e) {
11151
11154
  /** @type {Array<ElementContent>} */
11152
11155
  C.type === "root" ? C.children : [C]
11153
11156
  )
11154
- }), li(C, x), Jd(C, {
11157
+ }), li(C, y), Jd(C, {
11155
11158
  Fragment: vt,
11156
11159
  components: i,
11157
11160
  ignoreInvalidStyle: !0,
@@ -11160,7 +11163,7 @@ function vo(e) {
11160
11163
  passKeys: !0,
11161
11164
  passNode: !0
11162
11165
  });
11163
- function x(O, I, M) {
11166
+ function y(O, I, M) {
11164
11167
  if (O.type === "raw" && M && typeof I == "number")
11165
11168
  return d ? M.children.splice(I, 1) : M.children[I] = { type: "text", value: O.value }, I;
11166
11169
  if (O.type === "element") {
@@ -11276,7 +11279,7 @@ function vs(e, t, n) {
11276
11279
  if (typeof n == "string") {
11277
11280
  if (e.number && n && !Number.isNaN(Number(n)))
11278
11281
  return Number(n);
11279
- if ((e.boolean || e.overloadedBoolean) && (n === "" || Pn(n) === Pn(t)))
11282
+ if ((e.boolean || e.overloadedBoolean) && (n === "" || Mn(n) === Mn(t)))
11280
11283
  return !0;
11281
11284
  }
11282
11285
  return n;
@@ -11545,11 +11548,11 @@ function ip(e, t) {
11545
11548
  mode: (e.data || {}).quirksMode ? "quirks" : "no-quirks",
11546
11549
  childNodes: []
11547
11550
  };
11548
- return n.childNodes = fi(e.children, n, t), En(e, n), n;
11551
+ return n.childNodes = fi(e.children, n, t), gn(e, n), n;
11549
11552
  }
11550
11553
  function sp(e, t) {
11551
11554
  const n = { nodeName: "#document-fragment", childNodes: [] };
11552
- return n.childNodes = fi(e.children, n, t), En(e, n), n;
11555
+ return n.childNodes = fi(e.children, n, t), gn(e, n), n;
11553
11556
  }
11554
11557
  function up(e) {
11555
11558
  const t = {
@@ -11559,7 +11562,7 @@ function up(e) {
11559
11562
  systemId: "",
11560
11563
  parentNode: null
11561
11564
  };
11562
- return En(e, t), t;
11565
+ return gn(e, t), t;
11563
11566
  }
11564
11567
  function op(e) {
11565
11568
  const t = {
@@ -11567,7 +11570,7 @@ function op(e) {
11567
11570
  value: e.value,
11568
11571
  parentNode: null
11569
11572
  };
11570
- return En(e, t), t;
11573
+ return gn(e, t), t;
11571
11574
  }
11572
11575
  function lp(e) {
11573
11576
  const t = {
@@ -11575,7 +11578,7 @@ function lp(e) {
11575
11578
  data: e.value,
11576
11579
  parentNode: null
11577
11580
  };
11578
- return En(e, t), t;
11581
+ return gn(e, t), t;
11579
11582
  }
11580
11583
  function cp(e, t) {
11581
11584
  const n = t;
@@ -11603,7 +11606,7 @@ function cp(e, t) {
11603
11606
  childNodes: [],
11604
11607
  parentNode: null
11605
11608
  };
11606
- return o.childNodes = fi(e.children, o, r), En(e, o), e.tagName === "template" && e.content && (o.content = sp(e.content, r)), o;
11609
+ return o.childNodes = fi(e.children, o, r), gn(e, o), e.tagName === "template" && e.content && (o.content = sp(e.content, r)), o;
11607
11610
  }
11608
11611
  function dp(e, t, n) {
11609
11612
  const r = Ir(e, t);
@@ -11630,7 +11633,7 @@ function fi(e, t, n) {
11630
11633
  }
11631
11634
  return a;
11632
11635
  }
11633
- function En(e, t) {
11636
+ function gn(e, t) {
11634
11637
  const n = e.position;
11635
11638
  n && n.start && n.end && (n.start.offset, n.end.offset, t.sourceCodeLocation = {
11636
11639
  startLine: n.start.line,
@@ -12140,10 +12143,10 @@ var Gt;
12140
12143
  (function(e) {
12141
12144
  e.TYPE = "type", e.ACTION = "action", e.ENCODING = "encoding", e.PROMPT = "prompt", e.NAME = "name", e.COLOR = "color", e.FACE = "face", e.SIZE = "size";
12142
12145
  })(Gt || (Gt = {}));
12143
- var rt;
12146
+ var at;
12144
12147
  (function(e) {
12145
12148
  e.NO_QUIRKS = "no-quirks", e.QUIRKS = "quirks", e.LIMITED_QUIRKS = "limited-quirks";
12146
- })(rt || (rt = {}));
12149
+ })(at || (at = {}));
12147
12150
  var _;
12148
12151
  (function(e) {
12149
12152
  e.A = "a", e.ADDRESS = "address", e.ANNOTATION_XML = "annotation-xml", e.APPLET = "applet", e.AREA = "area", e.ARTICLE = "article", e.ASIDE = "aside", e.B = "b", e.BASE = "base", e.BASEFONT = "basefont", e.BGSOUND = "bgsound", e.BIG = "big", e.BLOCKQUOTE = "blockquote", e.BODY = "body", e.BR = "br", e.BUTTON = "button", e.CAPTION = "caption", e.CENTER = "center", e.CODE = "code", e.COL = "col", e.COLGROUP = "colgroup", e.DD = "dd", e.DESC = "desc", e.DETAILS = "details", e.DIALOG = "dialog", e.DIR = "dir", e.DIV = "div", e.DL = "dl", e.DT = "dt", e.EM = "em", e.EMBED = "embed", e.FIELDSET = "fieldset", e.FIGCAPTION = "figcaption", e.FIGURE = "figure", e.FONT = "font", e.FOOTER = "footer", e.FOREIGN_OBJECT = "foreignObject", e.FORM = "form", e.FRAME = "frame", e.FRAMESET = "frameset", e.H1 = "h1", e.H2 = "h2", e.H3 = "h3", e.H4 = "h4", e.H5 = "h5", e.H6 = "h6", e.HEAD = "head", e.HEADER = "header", e.HGROUP = "hgroup", e.HR = "hr", e.HTML = "html", e.I = "i", e.IMG = "img", e.IMAGE = "image", e.INPUT = "input", e.IFRAME = "iframe", e.KEYGEN = "keygen", e.LABEL = "label", e.LI = "li", e.LINK = "link", e.LISTING = "listing", e.MAIN = "main", e.MALIGNMARK = "malignmark", e.MARQUEE = "marquee", e.MATH = "math", e.MENU = "menu", e.META = "meta", e.MGLYPH = "mglyph", e.MI = "mi", e.MO = "mo", e.MN = "mn", e.MS = "ms", e.MTEXT = "mtext", e.NAV = "nav", e.NOBR = "nobr", e.NOFRAMES = "noframes", e.NOEMBED = "noembed", e.NOSCRIPT = "noscript", e.OBJECT = "object", e.OL = "ol", e.OPTGROUP = "optgroup", e.OPTION = "option", e.P = "p", e.PARAM = "param", e.PLAINTEXT = "plaintext", e.PRE = "pre", e.RB = "rb", e.RP = "rp", e.RT = "rt", e.RTC = "rtc", e.RUBY = "ruby", e.S = "s", e.SCRIPT = "script", e.SEARCH = "search", e.SECTION = "section", e.SELECT = "select", e.SOURCE = "source", e.SMALL = "small", e.SPAN = "span", e.STRIKE = "strike", e.STRONG = "strong", e.STYLE = "style", e.SUB = "sub", e.SUMMARY = "summary", e.SUP = "sup", e.TABLE = "table", e.TBODY = "tbody", e.TEMPLATE = "template", e.TEXTAREA = "textarea", e.TFOOT = "tfoot", e.TD = "td", e.TH = "th", e.THEAD = "thead", e.TITLE = "title", e.TR = "tr", e.TRACK = "track", e.TT = "tt", e.U = "u", e.UL = "ul", e.SVG = "svg", e.VAR = "var", e.WBR = "wbr", e.XMP = "xmp";
@@ -12277,7 +12280,7 @@ const Np = /* @__PURE__ */ new Map([
12277
12280
  [_.WBR, u.WBR],
12278
12281
  [_.XMP, u.XMP]
12279
12282
  ]);
12280
- function gn(e) {
12283
+ function bn(e) {
12281
12284
  var t;
12282
12285
  return (t = Np.get(e)) !== null && t !== void 0 ? t : u.UNKNOWN;
12283
12286
  }
@@ -12387,14 +12390,14 @@ const De = {
12387
12390
  function wp(e) {
12388
12391
  return e >= E.DIGIT_0 && e <= E.DIGIT_9;
12389
12392
  }
12390
- function Sn(e) {
12393
+ function Cn(e) {
12391
12394
  return e >= E.LATIN_CAPITAL_A && e <= E.LATIN_CAPITAL_Z;
12392
12395
  }
12393
12396
  function Op(e) {
12394
12397
  return e >= E.LATIN_SMALL_A && e <= E.LATIN_SMALL_Z;
12395
12398
  }
12396
12399
  function Ot(e) {
12397
- return Op(e) || Sn(e);
12400
+ return Op(e) || Cn(e);
12398
12401
  }
12399
12402
  function Rs(e) {
12400
12403
  return Ot(e) || wp(e);
@@ -12559,7 +12562,7 @@ class Rp {
12559
12562
  }
12560
12563
  emitCurrentTagToken() {
12561
12564
  const t = this.currentToken;
12562
- this.prepareToken(t), t.tagID = gn(t.tagName), t.type === ue.START_TAG ? (this.lastStartTagName = t.tagName, this.handler.onStartTag(t)) : (t.attrs.length > 0 && this._err(v.endTagWithAttributes), t.selfClosing && this._err(v.endTagWithTrailingSolidus), this.handler.onEndTag(t)), this.preprocessor.dropParsedChunk();
12565
+ this.prepareToken(t), t.tagID = bn(t.tagName), t.type === ue.START_TAG ? (this.lastStartTagName = t.tagName, this.handler.onStartTag(t)) : (t.attrs.length > 0 && this._err(v.endTagWithAttributes), t.selfClosing && this._err(v.endTagWithTrailingSolidus), this.handler.onEndTag(t)), this.preprocessor.dropParsedChunk();
12563
12566
  }
12564
12567
  emitCurrentComment(t) {
12565
12568
  this.prepareToken(t), this.handler.onComment(t), this.preprocessor.dropParsedChunk();
@@ -13106,7 +13109,7 @@ class Rp {
13106
13109
  break;
13107
13110
  }
13108
13111
  default:
13109
- n.tagName += String.fromCodePoint(Sn(t) ? rr(t) : t);
13112
+ n.tagName += String.fromCodePoint(Cn(t) ? rr(t) : t);
13110
13113
  }
13111
13114
  }
13112
13115
  // RCDATA less-than sign state
@@ -13438,7 +13441,7 @@ class Rp {
13438
13441
  break;
13439
13442
  }
13440
13443
  default:
13441
- this.currentAttr.name += String.fromCodePoint(Sn(t) ? rr(t) : t);
13444
+ this.currentAttr.name += String.fromCodePoint(Cn(t) ? rr(t) : t);
13442
13445
  }
13443
13446
  }
13444
13447
  // After attribute name state
@@ -13839,7 +13842,7 @@ class Rp {
13839
13842
  // Before DOCTYPE name state
13840
13843
  //------------------------------------------------------------------
13841
13844
  _stateBeforeDoctypeName(t) {
13842
- if (Sn(t))
13845
+ if (Cn(t))
13843
13846
  this._createDoctypeToken(String.fromCharCode(rr(t))), this.state = g.DOCTYPE_NAME;
13844
13847
  else
13845
13848
  switch (t) {
@@ -13893,7 +13896,7 @@ class Rp {
13893
13896
  break;
13894
13897
  }
13895
13898
  default:
13896
- n.name += String.fromCodePoint(Sn(t) ? rr(t) : t);
13899
+ n.name += String.fromCodePoint(Cn(t) ? rr(t) : t);
13897
13900
  }
13898
13901
  }
13899
13902
  // After DOCTYPE name state
@@ -14623,7 +14626,7 @@ const Lt = {
14623
14626
  createDocument() {
14624
14627
  return {
14625
14628
  nodeName: "#document",
14626
- mode: rt.NO_QUIRKS,
14629
+ mode: at.NO_QUIRKS,
14627
14630
  childNodes: []
14628
14631
  };
14629
14632
  },
@@ -14852,21 +14855,21 @@ function Vp(e) {
14852
14855
  }
14853
14856
  function qp(e) {
14854
14857
  if (e.name !== Yo)
14855
- return rt.QUIRKS;
14858
+ return at.QUIRKS;
14856
14859
  const { systemId: t } = e;
14857
14860
  if (t && t.toLowerCase() === zp)
14858
- return rt.QUIRKS;
14861
+ return at.QUIRKS;
14859
14862
  let { publicId: n } = e;
14860
14863
  if (n !== null) {
14861
14864
  if (n = n.toLowerCase(), Gp.has(n))
14862
- return rt.QUIRKS;
14865
+ return at.QUIRKS;
14863
14866
  let r = t === null ? Yp : Go;
14864
14867
  if (Fs(n, r))
14865
- return rt.QUIRKS;
14868
+ return at.QUIRKS;
14866
14869
  if (r = t === null ? jo : jp, Fs(n, r))
14867
- return rt.LIMITED_QUIRKS;
14870
+ return at.LIMITED_QUIRKS;
14868
14871
  }
14869
- return rt.NO_QUIRKS;
14872
+ return at.NO_QUIRKS;
14870
14873
  }
14871
14874
  const Hs = {
14872
14875
  TEXT_HTML: "text/html",
@@ -15050,7 +15053,7 @@ function hi(e) {
15050
15053
  }
15051
15054
  function t1(e) {
15052
15055
  const t = Zp.get(e.tagName);
15053
- t != null && (e.tagName = t, e.tagID = gn(e.tagName));
15056
+ t != null && (e.tagName = t, e.tagID = bn(e.tagName));
15054
15057
  }
15055
15058
  function n1(e, t) {
15056
15059
  return t === R.MATHML && (e === u.MI || e === u.MO || e === u.MN || e === u.MS || e === u.MTEXT);
@@ -15091,7 +15094,7 @@ class $s {
15091
15094
  this.fragmentContext = r, this.scriptHandler = a, this.currentToken = null, this.stopped = !1, this.insertionMode = T.INITIAL, this.originalInsertionMode = T.INITIAL, this.headElement = null, this.formElement = null, this.currentNotInHTML = !1, this.tmplInsertionModeStack = [], this.pendingCharacterTokens = [], this.hasNonWhitespacePendingCharacterToken = !1, this.framesetOk = !0, this.skipNextNewLine = !1, this.fosterParentingEnabled = !1, this.options = {
15092
15095
  ...Us,
15093
15096
  ...t
15094
- }, this.treeAdapter = this.options.treeAdapter, this.onParseError = this.options.onParseError, this.onParseError && (this.options.sourceCodeLocationInfo = !0), this.document = n ?? this.treeAdapter.createDocument(), this.tokenizer = new Rp(this.options, this), this.activeFormattingElements = new Up(this.treeAdapter), this.fragmentContextID = r ? gn(this.treeAdapter.getTagName(r)) : u.UNKNOWN, this._setContextModes(r ?? this.document, this.fragmentContextID), this.openElements = new Hp(this.document, this.treeAdapter, this);
15097
+ }, this.treeAdapter = this.options.treeAdapter, this.onParseError = this.options.onParseError, this.onParseError && (this.options.sourceCodeLocationInfo = !0), this.document = n ?? this.treeAdapter.createDocument(), this.tokenizer = new Rp(this.options, this), this.activeFormattingElements = new Up(this.treeAdapter), this.fragmentContextID = r ? bn(this.treeAdapter.getTagName(r)) : u.UNKNOWN, this._setContextModes(r ?? this.document, this.fragmentContextID), this.openElements = new Hp(this.document, this.treeAdapter, this);
15095
15098
  }
15096
15099
  // API
15097
15100
  static parse(t, n) {
@@ -15492,27 +15495,27 @@ class $s {
15492
15495
  }
15493
15496
  switch (this.insertionMode) {
15494
15497
  case T.INITIAL: {
15495
- An(this, t);
15498
+ xn(this, t);
15496
15499
  break;
15497
15500
  }
15498
15501
  case T.BEFORE_HTML: {
15499
- wn(this, t);
15502
+ On(this, t);
15500
15503
  break;
15501
15504
  }
15502
15505
  case T.BEFORE_HEAD: {
15503
- On(this, t);
15506
+ Ln(this, t);
15504
15507
  break;
15505
15508
  }
15506
15509
  case T.IN_HEAD: {
15507
- Ln(this, t);
15510
+ Rn(this, t);
15508
15511
  break;
15509
15512
  }
15510
15513
  case T.IN_HEAD_NO_SCRIPT: {
15511
- Rn(this, t);
15514
+ kn(this, t);
15512
15515
  break;
15513
15516
  }
15514
15517
  case T.AFTER_HEAD: {
15515
- kn(this, t);
15518
+ Dn(this, t);
15516
15519
  break;
15517
15520
  }
15518
15521
  case T.IN_BODY:
@@ -15560,27 +15563,27 @@ class $s {
15560
15563
  }
15561
15564
  switch (this.insertionMode) {
15562
15565
  case T.INITIAL: {
15563
- An(this, t);
15566
+ xn(this, t);
15564
15567
  break;
15565
15568
  }
15566
15569
  case T.BEFORE_HTML: {
15567
- wn(this, t);
15570
+ On(this, t);
15568
15571
  break;
15569
15572
  }
15570
15573
  case T.BEFORE_HEAD: {
15571
- On(this, t);
15574
+ Ln(this, t);
15572
15575
  break;
15573
15576
  }
15574
15577
  case T.IN_HEAD: {
15575
- Ln(this, t);
15578
+ Rn(this, t);
15576
15579
  break;
15577
15580
  }
15578
15581
  case T.IN_HEAD_NO_SCRIPT: {
15579
- Rn(this, t);
15582
+ kn(this, t);
15580
15583
  break;
15581
15584
  }
15582
15585
  case T.AFTER_HEAD: {
15583
- kn(this, t);
15586
+ Dn(this, t);
15584
15587
  break;
15585
15588
  }
15586
15589
  case T.TEXT: {
@@ -15636,7 +15639,7 @@ class $s {
15636
15639
  break;
15637
15640
  }
15638
15641
  case T.IN_TABLE_TEXT: {
15639
- xn(this, t);
15642
+ _n(this, t);
15640
15643
  break;
15641
15644
  }
15642
15645
  case T.AFTER_BODY: {
@@ -15665,7 +15668,7 @@ class $s {
15665
15668
  break;
15666
15669
  }
15667
15670
  case T.IN_TABLE_TEXT: {
15668
- xn(this, t);
15671
+ _n(this, t);
15669
15672
  break;
15670
15673
  }
15671
15674
  }
@@ -15692,7 +15695,7 @@ class $s {
15692
15695
  _startTagOutsideForeignContent(t) {
15693
15696
  switch (this.insertionMode) {
15694
15697
  case T.INITIAL: {
15695
- An(this, t);
15698
+ xn(this, t);
15696
15699
  break;
15697
15700
  }
15698
15701
  case T.BEFORE_HTML: {
@@ -15724,7 +15727,7 @@ class $s {
15724
15727
  break;
15725
15728
  }
15726
15729
  case T.IN_TABLE_TEXT: {
15727
- xn(this, t);
15730
+ _n(this, t);
15728
15731
  break;
15729
15732
  }
15730
15733
  case T.IN_CAPTION: {
@@ -15789,7 +15792,7 @@ class $s {
15789
15792
  _endTagOutsideForeignContent(t) {
15790
15793
  switch (this.insertionMode) {
15791
15794
  case T.INITIAL: {
15792
- An(this, t);
15795
+ xn(this, t);
15793
15796
  break;
15794
15797
  }
15795
15798
  case T.BEFORE_HTML: {
@@ -15821,11 +15824,11 @@ class $s {
15821
15824
  break;
15822
15825
  }
15823
15826
  case T.IN_TABLE: {
15824
- Bn(this, t);
15827
+ Fn(this, t);
15825
15828
  break;
15826
15829
  }
15827
15830
  case T.IN_TABLE_TEXT: {
15828
- xn(this, t);
15831
+ _n(this, t);
15829
15832
  break;
15830
15833
  }
15831
15834
  case T.IN_CAPTION: {
@@ -15882,27 +15885,27 @@ class $s {
15882
15885
  onEof(t) {
15883
15886
  switch (this.insertionMode) {
15884
15887
  case T.INITIAL: {
15885
- An(this, t);
15888
+ xn(this, t);
15886
15889
  break;
15887
15890
  }
15888
15891
  case T.BEFORE_HTML: {
15889
- wn(this, t);
15892
+ On(this, t);
15890
15893
  break;
15891
15894
  }
15892
15895
  case T.BEFORE_HEAD: {
15893
- On(this, t);
15896
+ Ln(this, t);
15894
15897
  break;
15895
15898
  }
15896
15899
  case T.IN_HEAD: {
15897
- Ln(this, t);
15900
+ Rn(this, t);
15898
15901
  break;
15899
15902
  }
15900
15903
  case T.IN_HEAD_NO_SCRIPT: {
15901
- Rn(this, t);
15904
+ kn(this, t);
15902
15905
  break;
15903
15906
  }
15904
15907
  case T.AFTER_HEAD: {
15905
- kn(this, t);
15908
+ Dn(this, t);
15906
15909
  break;
15907
15910
  }
15908
15911
  case T.IN_BODY:
@@ -15922,7 +15925,7 @@ class $s {
15922
15925
  break;
15923
15926
  }
15924
15927
  case T.IN_TABLE_TEXT: {
15925
- xn(this, t);
15928
+ _n(this, t);
15926
15929
  break;
15927
15930
  }
15928
15931
  case T.IN_TEMPLATE: {
@@ -16014,7 +16017,7 @@ function f1(e, t) {
16014
16017
  return e.openElements.replace(t.element, r), t.element = r, r;
16015
16018
  }
16016
16019
  function h1(e, t, n) {
16017
- const r = e.treeAdapter.getTagName(t), a = gn(r);
16020
+ const r = e.treeAdapter.getTagName(t), a = bn(r);
16018
16021
  if (e._isElementCausesFosterParenting(a))
16019
16022
  e._fosterParentElement(n);
16020
16023
  else {
@@ -16064,20 +16067,20 @@ function pi(e, t) {
16064
16067
  }
16065
16068
  function g1(e, t) {
16066
16069
  e._setDocumentType(t);
16067
- const n = t.forceQuirks ? rt.QUIRKS : qp(t);
16070
+ const n = t.forceQuirks ? at.QUIRKS : qp(t);
16068
16071
  Vp(t) || e._err(t, v.nonConformingDoctype), e.treeAdapter.setDocumentMode(e.document, n), e.insertionMode = T.BEFORE_HTML;
16069
16072
  }
16070
- function An(e, t) {
16071
- e._err(t, v.missingDoctype, !0), e.treeAdapter.setDocumentMode(e.document, rt.QUIRKS), e.insertionMode = T.BEFORE_HTML, e._processToken(t);
16073
+ function xn(e, t) {
16074
+ e._err(t, v.missingDoctype, !0), e.treeAdapter.setDocumentMode(e.document, at.QUIRKS), e.insertionMode = T.BEFORE_HTML, e._processToken(t);
16072
16075
  }
16073
16076
  function b1(e, t) {
16074
- t.tagID === u.HTML ? (e._insertElement(t, R.HTML), e.insertionMode = T.BEFORE_HEAD) : wn(e, t);
16077
+ t.tagID === u.HTML ? (e._insertElement(t, R.HTML), e.insertionMode = T.BEFORE_HEAD) : On(e, t);
16075
16078
  }
16076
16079
  function T1(e, t) {
16077
16080
  const n = t.tagID;
16078
- (n === u.HTML || n === u.HEAD || n === u.BODY || n === u.BR) && wn(e, t);
16081
+ (n === u.HTML || n === u.HEAD || n === u.BODY || n === u.BR) && On(e, t);
16079
16082
  }
16080
- function wn(e, t) {
16083
+ function On(e, t) {
16081
16084
  e._insertFakeRootElement(), e.insertionMode = T.BEFORE_HEAD, e._processToken(t);
16082
16085
  }
16083
16086
  function y1(e, t) {
@@ -16091,14 +16094,14 @@ function y1(e, t) {
16091
16094
  break;
16092
16095
  }
16093
16096
  default:
16094
- On(e, t);
16097
+ Ln(e, t);
16095
16098
  }
16096
16099
  }
16097
16100
  function A1(e, t) {
16098
16101
  const n = t.tagID;
16099
- n === u.HEAD || n === u.BODY || n === u.HTML || n === u.BR ? On(e, t) : e._err(t, v.endTagWithoutMatchingOpenElement);
16102
+ n === u.HEAD || n === u.BODY || n === u.HTML || n === u.BR ? Ln(e, t) : e._err(t, v.endTagWithoutMatchingOpenElement);
16100
16103
  }
16101
- function On(e, t) {
16104
+ function Ln(e, t) {
16102
16105
  e._insertFakeElement(_.HEAD, u.HEAD), e.headElement = e.openElements.current, e.insertionMode = T.IN_HEAD, e._processToken(t);
16103
16106
  }
16104
16107
  function ct(e, t) {
@@ -16141,7 +16144,7 @@ function ct(e, t) {
16141
16144
  break;
16142
16145
  }
16143
16146
  default:
16144
- Ln(e, t);
16147
+ Rn(e, t);
16145
16148
  }
16146
16149
  }
16147
16150
  function x1(e, t) {
@@ -16153,7 +16156,7 @@ function x1(e, t) {
16153
16156
  case u.BODY:
16154
16157
  case u.BR:
16155
16158
  case u.HTML: {
16156
- Ln(e, t);
16159
+ Rn(e, t);
16157
16160
  break;
16158
16161
  }
16159
16162
  case u.TEMPLATE: {
@@ -16167,7 +16170,7 @@ function x1(e, t) {
16167
16170
  function Qt(e, t) {
16168
16171
  e.openElements.tmplCount > 0 ? (e.openElements.generateImpliedEndTagsThoroughly(), e.openElements.currentTagId !== u.TEMPLATE && e._err(t, v.closingOfElementWithOpenChildElements), e.openElements.popUntilTagNamePopped(u.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode()) : e._err(t, v.endTagWithoutMatchingOpenElement);
16169
16172
  }
16170
- function Ln(e, t) {
16173
+ function Rn(e, t) {
16171
16174
  e.openElements.pop(), e.insertionMode = T.AFTER_HEAD, e._processToken(t);
16172
16175
  }
16173
16176
  function _1(e, t) {
@@ -16191,7 +16194,7 @@ function _1(e, t) {
16191
16194
  break;
16192
16195
  }
16193
16196
  default:
16194
- Rn(e, t);
16197
+ kn(e, t);
16195
16198
  }
16196
16199
  }
16197
16200
  function S1(e, t) {
@@ -16201,14 +16204,14 @@ function S1(e, t) {
16201
16204
  break;
16202
16205
  }
16203
16206
  case u.BR: {
16204
- Rn(e, t);
16207
+ kn(e, t);
16205
16208
  break;
16206
16209
  }
16207
16210
  default:
16208
16211
  e._err(t, v.endTagWithoutMatchingOpenElement);
16209
16212
  }
16210
16213
  }
16211
- function Rn(e, t) {
16214
+ function kn(e, t) {
16212
16215
  const n = t.type === ue.EOF ? v.openElementsLeftAfterEof : v.disallowedContentInNoscriptInHead;
16213
16216
  e._err(t, n), e.openElements.pop(), e.insertionMode = T.IN_HEAD, e._processToken(t);
16214
16217
  }
@@ -16244,7 +16247,7 @@ function C1(e, t) {
16244
16247
  break;
16245
16248
  }
16246
16249
  default:
16247
- kn(e, t);
16250
+ Dn(e, t);
16248
16251
  }
16249
16252
  }
16250
16253
  function I1(e, t) {
@@ -16252,7 +16255,7 @@ function I1(e, t) {
16252
16255
  case u.BODY:
16253
16256
  case u.HTML:
16254
16257
  case u.BR: {
16255
- kn(e, t);
16258
+ Dn(e, t);
16256
16259
  break;
16257
16260
  }
16258
16261
  case u.TEMPLATE: {
@@ -16263,7 +16266,7 @@ function I1(e, t) {
16263
16266
  e._err(t, v.endTagWithoutMatchingOpenElement);
16264
16267
  }
16265
16268
  }
16266
- function kn(e, t) {
16269
+ function Dn(e, t) {
16267
16270
  e._insertFakeElement(_.BODY, u.BODY), e.insertionMode = T.IN_BODY, Lr(e, t);
16268
16271
  }
16269
16272
  function Lr(e, t) {
@@ -16358,7 +16361,7 @@ function U1(e, t) {
16358
16361
  e._reconstructActiveFormattingElements(), e._insertElement(t, R.HTML), e.activeFormattingElements.insertMarker(), e.framesetOk = !1;
16359
16362
  }
16360
16363
  function $1(e, t) {
16361
- e.treeAdapter.getDocumentMode(e.document) !== rt.QUIRKS && e.openElements.hasInButtonScope(u.P) && e._closePElement(), e._insertElement(t, R.HTML), e.framesetOk = !1, e.insertionMode = T.IN_TABLE;
16364
+ e.treeAdapter.getDocumentMode(e.document) !== at.QUIRKS && e.openElements.hasInButtonScope(u.P) && e._closePElement(), e._insertElement(t, R.HTML), e.framesetOk = !1, e.insertionMode = T.IN_TABLE;
16362
16365
  }
16363
16366
  function Ko(e, t) {
16364
16367
  e._reconstructActiveFormattingElements(), e._appendElement(t, R.HTML), e.framesetOk = !1, t.ackSelfClosing = !0;
@@ -16869,7 +16872,7 @@ function fn(e, t) {
16869
16872
  Vn(e, t);
16870
16873
  }
16871
16874
  }
16872
- function Bn(e, t) {
16875
+ function Fn(e, t) {
16873
16876
  switch (t.tagID) {
16874
16877
  case u.TABLE: {
16875
16878
  e.openElements.hasInTableScope(u.TABLE) && (e.openElements.popUntilTagNamePopped(u.TABLE), e._resetInsertionMode());
@@ -16905,7 +16908,7 @@ function tl(e, t) {
16905
16908
  function nl(e, t) {
16906
16909
  e.pendingCharacterTokens.push(t), e.hasNonWhitespacePendingCharacterToken = !0;
16907
16910
  }
16908
- function xn(e, t) {
16911
+ function _n(e, t) {
16909
16912
  let n = 0;
16910
16913
  if (e.hasNonWhitespacePendingCharacterToken)
16911
16914
  for (; n < e.pendingCharacterTokens.length; n++)
@@ -16925,7 +16928,7 @@ function xE(e, t) {
16925
16928
  switch (n) {
16926
16929
  case u.CAPTION:
16927
16930
  case u.TABLE: {
16928
- e.openElements.hasInTableScope(u.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(u.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = T.IN_TABLE, n === u.TABLE && Bn(e, t));
16931
+ e.openElements.hasInTableScope(u.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(u.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = T.IN_TABLE, n === u.TABLE && Fn(e, t));
16929
16932
  break;
16930
16933
  }
16931
16934
  case u.BODY:
@@ -17014,7 +17017,7 @@ function Ha(e, t) {
17014
17017
  break;
17015
17018
  }
17016
17019
  case u.TABLE: {
17017
- e.openElements.hasTableBodyContextInTableScope() && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = T.IN_TABLE, Bn(e, t));
17020
+ e.openElements.hasTableBodyContextInTableScope() && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = T.IN_TABLE, Fn(e, t));
17018
17021
  break;
17019
17022
  }
17020
17023
  case u.BODY:
@@ -17027,7 +17030,7 @@ function Ha(e, t) {
17027
17030
  case u.TR:
17028
17031
  break;
17029
17032
  default:
17030
- Bn(e, t);
17033
+ Fn(e, t);
17031
17034
  }
17032
17035
  }
17033
17036
  function Dr(e, t) {
@@ -17076,7 +17079,7 @@ function al(e, t) {
17076
17079
  case u.TH:
17077
17080
  break;
17078
17081
  default:
17079
- Bn(e, t);
17082
+ Fn(e, t);
17080
17083
  }
17081
17084
  }
17082
17085
  function SE(e, t) {
@@ -17346,7 +17349,7 @@ function cl(e, t) {
17346
17349
  stitches: !1,
17347
17350
  options: t || {}
17348
17351
  };
17349
- r(e, a), bn(a, _t());
17352
+ r(e, a), Tn(a, _t());
17350
17353
  const i = n ? a.parser.document : a.parser.getFragment(), s = Jm(i, {
17351
17354
  // To do: support `space`?
17352
17355
  file: a.options.file
@@ -17382,7 +17385,7 @@ function GE(e, t) {
17382
17385
  chars: e.value,
17383
17386
  location: qn(e)
17384
17387
  };
17385
- bn(t, _t(e)), t.parser.currentToken = n, t.parser._processToken(t.parser.currentToken);
17388
+ Tn(t, _t(e)), t.parser.currentToken = n, t.parser._processToken(t.parser.currentToken);
17386
17389
  }
17387
17390
  function jE(e, t) {
17388
17391
  const n = {
@@ -17393,7 +17396,7 @@ function jE(e, t) {
17393
17396
  systemId: "",
17394
17397
  location: qn(e)
17395
17398
  };
17396
- bn(t, _t(e)), t.parser.currentToken = n, t.parser._processToken(t.parser.currentToken);
17399
+ Tn(t, _t(e)), t.parser.currentToken = n, t.parser._processToken(t.parser.currentToken);
17397
17400
  }
17398
17401
  function VE(e, t) {
17399
17402
  t.stitches = !0;
@@ -17413,7 +17416,7 @@ function fl(e, t) {
17413
17416
  data: n,
17414
17417
  location: qn(e)
17415
17418
  };
17416
- bn(t, _t(e)), t.parser.currentToken = r, t.parser._processToken(t.parser.currentToken);
17419
+ Tn(t, _t(e)), t.parser.currentToken = r, t.parser._processToken(t.parser.currentToken);
17417
17420
  }
17418
17421
  function qE(e, t) {
17419
17422
  if (t.parser.tokenizer.preprocessor.html = "", t.parser.tokenizer.preprocessor.pos = -1, t.parser.tokenizer.preprocessor.lastGapPos = -2, t.parser.tokenizer.preprocessor.gapStack = [], t.parser.tokenizer.preprocessor.skipNextNewLine = !1, t.parser.tokenizer.preprocessor.lastChunkWritten = !1, t.parser.tokenizer.preprocessor.endOfChunkHit = !1, t.parser.tokenizer.preprocessor.isEol = !1, hl(t, _t(e)), t.parser.tokenizer.write(e.value, !1), t.parser.tokenizer._runParsingLoop(), t.parser.tokenizer.state === 72 || t.parser.tokenizer.state === 78) {
@@ -17434,7 +17437,7 @@ function WE(e, t) {
17434
17437
  throw $E.has(n.type) && (r = ". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"), new Error("Cannot compile `" + n.type + "` node" + r);
17435
17438
  }
17436
17439
  }
17437
- function bn(e, t) {
17440
+ function Tn(e, t) {
17438
17441
  hl(e, t);
17439
17442
  const n = e.parser.tokenizer.currentCharacterToken;
17440
17443
  n && n.location && (n.location.endLine = e.parser.tokenizer.preprocessor.line, n.location.endCol = e.parser.tokenizer.preprocessor.col + 1, n.location.endOffset = e.parser.tokenizer.preprocessor.offset + 1, e.parser.currentToken = n, e.parser._processToken(e.parser.currentToken)), e.parser.tokenizer.paused = !1, e.parser.tokenizer.inLoop = !1, e.parser.tokenizer.active = !1, e.parser.tokenizer.returnState = De.DATA, e.parser.tokenizer.charRefCode = -1, e.parser.tokenizer.consumedAfterSnapshot = -1, e.parser.tokenizer.currentLocation = null, e.parser.tokenizer.currentCharacterToken = null, e.parser.tokenizer.currentToken = null, e.parser.tokenizer.currentAttr = { name: "", value: "" };
@@ -17455,7 +17458,7 @@ function hl(e, t) {
17455
17458
  function XE(e, t) {
17456
17459
  const n = e.tagName.toLowerCase();
17457
17460
  if (t.parser.tokenizer.state === De.PLAINTEXT) return;
17458
- bn(t, _t(e));
17461
+ Tn(t, _t(e));
17459
17462
  const r = t.parser.openElements.current;
17460
17463
  let a = "namespaceURI" in r ? r.namespaceURI : Yt.html;
17461
17464
  a === Yt.html && n === "svg" && (a = Yt.svg);
@@ -17466,7 +17469,7 @@ function XE(e, t) {
17466
17469
  ), s = {
17467
17470
  type: ue.START_TAG,
17468
17471
  tagName: n,
17469
- tagID: gn(n),
17472
+ tagID: bn(n),
17470
17473
  // We always send start and end tags.
17471
17474
  selfClosing: !1,
17472
17475
  ackSelfClosing: !1,
@@ -17480,11 +17483,11 @@ function XE(e, t) {
17480
17483
  function QE(e, t) {
17481
17484
  const n = e.tagName.toLowerCase();
17482
17485
  if (!t.parser.tokenizer.inForeignNode && fp.includes(n) || t.parser.tokenizer.state === De.PLAINTEXT) return;
17483
- bn(t, Nr(e));
17486
+ Tn(t, Nr(e));
17484
17487
  const r = {
17485
17488
  type: ue.END_TAG,
17486
17489
  tagName: n,
17487
- tagID: gn(n),
17490
+ tagID: bn(n),
17488
17491
  selfClosing: !1,
17489
17492
  ackSelfClosing: !1,
17490
17493
  attrs: [],
@@ -17549,7 +17552,7 @@ const JE = (e) => /* @__PURE__ */ Be.createElement("svg", { xmlns: "http://www.w
17549
17552
  )
17550
17553
  ] });
17551
17554
  }, tg = ({}) => {
17552
- const { companySettings: e } = st(Hn);
17555
+ const { companySettings: e } = tt(mn);
17553
17556
  return /* @__PURE__ */ L(
17554
17557
  "div",
17555
17558
  {
@@ -17593,8 +17596,8 @@ function rg(e, {
17593
17596
  return;
17594
17597
  }
17595
17598
  const h = new IntersectionObserver(
17596
- (m, y) => {
17597
- m[0]?.isIntersecting && (y.disconnect(), f());
17599
+ (m, A) => {
17600
+ m[0]?.isIntersecting && (A.disconnect(), f());
17598
17601
  },
17599
17602
  { root: d, rootMargin: r, threshold: a }
17600
17603
  );
@@ -17603,10 +17606,10 @@ function rg(e, {
17603
17606
  [t, n, r, a, i, e]
17604
17607
  );
17605
17608
  }
17606
- class Fn {
17609
+ class Hn {
17607
17610
  constructor() {
17608
17611
  }
17609
- static getApiUrl = () => typeof document < "u" && new URL(document.URL)?.hostname.includes("localhost") ? "http://localhost:3001" : "https://www.api.chatsystem.ai";
17612
+ static getApiUrl = () => typeof document < "u" && new URL(document.URL)?.hostname.includes("localhost:3080") ? "http://localhost:3001" : "https://www.api.chatsystem.ai";
17610
17613
  static getHeaders = ({ contentType: t = "text/plain" }) => ({
17611
17614
  "Content-Type": t
17612
17615
  });
@@ -17624,17 +17627,26 @@ class Fn {
17624
17627
  return r && (i.body = JSON.stringify(r)), i;
17625
17628
  };
17626
17629
  }
17627
- function ag({
17630
+ function ag(e, t) {
17631
+ if (!t || !e) return e;
17632
+ const n = t.replace(/^[?&]+/, ""), [r, a] = e.split("#"), i = r.includes("?") ? "&" : "?", s = `${r}${i}${n}`;
17633
+ return a ? `${s}#${a}` : s;
17634
+ }
17635
+ function ig({
17628
17636
  href: e = "",
17629
- children: t,
17630
- context: n,
17631
- onClick: r,
17632
- seenRootEl: a,
17633
- ...i
17637
+ queryParamToAppend: t = "",
17638
+ children: n,
17639
+ context: r,
17640
+ onClick: a,
17641
+ seenRootEl: i,
17642
+ ...s
17634
17643
  }) {
17635
- const s = e.startsWith("/") || typeof window < "u" && e.startsWith(window.location.origin), o = Fn.getApiUrl(), l = () => {
17636
- const y = `${o}/tracking/clicked/${n.appToken}`, A = {
17637
- discussionId: n.discussionId,
17644
+ const { companySettings: o } = tt(mn), l = e.startsWith("/") || typeof window < "u" && e.startsWith(window.location.origin), c = Hn.getApiUrl(), d = ag(
17645
+ e,
17646
+ o.api.tracking?.queryParamToAppend
17647
+ ), f = () => {
17648
+ const y = `${c}/tracking/clicked/${r.appToken}`, O = {
17649
+ discussionId: r.discussionId,
17638
17650
  urlClicked: e
17639
17651
  };
17640
17652
  try {
@@ -17644,7 +17656,7 @@ function ag({
17644
17656
  "Content-Type": "application/json",
17645
17657
  Accept: "application/json"
17646
17658
  },
17647
- body: JSON.stringify(A),
17659
+ body: JSON.stringify(O),
17648
17660
  keepalive: !0,
17649
17661
  cache: "no-store",
17650
17662
  credentials: "omit",
@@ -17653,9 +17665,9 @@ function ag({
17653
17665
  });
17654
17666
  } catch {
17655
17667
  }
17656
- }, c = () => {
17657
- const y = `${o}/tracking/displayed/${n.appToken}`, A = {
17658
- discussionId: n.discussionId,
17668
+ }, h = () => {
17669
+ const y = `${c}/tracking/displayed/${r.appToken}`, O = {
17670
+ discussionId: r.discussionId,
17659
17671
  urlSeen: e
17660
17672
  };
17661
17673
  try {
@@ -17665,7 +17677,7 @@ function ag({
17665
17677
  "Content-Type": "application/json",
17666
17678
  Accept: "application/json"
17667
17679
  },
17668
- body: JSON.stringify(A),
17680
+ body: JSON.stringify(O),
17669
17681
  keepalive: !0,
17670
17682
  cache: "no-store",
17671
17683
  credentials: "omit",
@@ -17674,43 +17686,43 @@ function ag({
17674
17686
  });
17675
17687
  } catch {
17676
17688
  }
17677
- }, d = sn(
17678
- () => `${n.appToken}::${n.discussionId}::${e}`,
17679
- [n.appToken, n.discussionId, e]
17680
- ), f = rg(c, {
17681
- root: a,
17689
+ }, m = sn(
17690
+ () => `${r.appToken}::${r.discussionId}::${e}`,
17691
+ [r.appToken, r.discussionId, e]
17692
+ ), A = rg(h, {
17693
+ root: i,
17682
17694
  threshold: 0,
17683
17695
  // easier to trigger
17684
17696
  rootMargin: "0px 0px -10% 0px",
17685
17697
  // avoid flicker at bottom edge
17686
- dedupeKey: d
17687
- }), h = (y) => {
17688
- l(), r?.(y);
17689
- }, m = s ? {} : { target: "_blank", rel: "noopener noreferrer" };
17690
- return s ? /* @__PURE__ */ L(
17698
+ dedupeKey: m
17699
+ }), x = (y) => {
17700
+ f(), a?.(y);
17701
+ }, C = l ? {} : { target: "_blank", rel: "noopener noreferrer" };
17702
+ return l ? /* @__PURE__ */ L(
17691
17703
  "a",
17692
17704
  {
17693
- ref: f,
17694
- href: e,
17695
- ...i,
17696
- onClick: h,
17705
+ ref: A,
17706
+ href: d,
17707
+ ...s,
17708
+ onClick: x,
17697
17709
  className: "customLinkInternal",
17698
- children: t
17710
+ children: n
17699
17711
  }
17700
17712
  ) : /* @__PURE__ */ L(
17701
17713
  "a",
17702
17714
  {
17703
- ref: f,
17704
- href: e,
17705
- ...m,
17706
- ...i,
17707
- onClick: h,
17715
+ ref: A,
17716
+ href: d,
17717
+ ...C,
17718
+ ...s,
17719
+ onClick: x,
17708
17720
  className: "customLinkExternal",
17709
- children: t
17721
+ children: n
17710
17722
  }
17711
17723
  );
17712
17724
  }
17713
- const ig = ({ content: e, metaData: t, context: n, seenRootEl: r }) => {
17725
+ const sg = ({ content: e, metaData: t, context: n, seenRootEl: r }) => {
17714
17726
  const { chatlineLabelAssistantTranslation: a } = Ka();
17715
17727
  return /* @__PURE__ */ Te("div", { className: "flex justify-between mt-8 px-3 chatLineAssistant", children: [
17716
17728
  /* @__PURE__ */ L("div", { className: "w-10 mr-3 mt-6", children: /* @__PURE__ */ L("div", { children: /* @__PURE__ */ L(tg, {}) }) }),
@@ -17726,7 +17738,7 @@ const ig = ({ content: e, metaData: t, context: n, seenRootEl: r }) => {
17726
17738
  rehypePlugins: [ml],
17727
17739
  components: {
17728
17740
  a: ({ node: i, href: s, children: o, ...l }) => /* @__PURE__ */ L(
17729
- ag,
17741
+ ig,
17730
17742
  {
17731
17743
  href: s ?? "",
17732
17744
  ...l,
@@ -17743,7 +17755,7 @@ const ig = ({ content: e, metaData: t, context: n, seenRootEl: r }) => {
17743
17755
  }
17744
17756
  )
17745
17757
  ] });
17746
- }, sg = ({
17758
+ }, ug = ({
17747
17759
  userType: e,
17748
17760
  content: t,
17749
17761
  metaData: n,
@@ -17752,7 +17764,7 @@ const ig = ({ content: e, metaData: t, context: n, seenRootEl: r }) => {
17752
17764
  }) => /* @__PURE__ */ Te(vt, { children: [
17753
17765
  e === "user" && /* @__PURE__ */ L(eg, { content: t, metaData: n }),
17754
17766
  e === "assistant" && /* @__PURE__ */ L(
17755
- ig,
17767
+ sg,
17756
17768
  {
17757
17769
  content: t,
17758
17770
  metaData: n,
@@ -17761,7 +17773,7 @@ const ig = ({ content: e, metaData: t, context: n, seenRootEl: r }) => {
17761
17773
  }
17762
17774
  )
17763
17775
  ] });
17764
- function ug(e, t, n) {
17776
+ function og(e, t, n) {
17765
17777
  let [r, a] = fe(e || t), i = xe(e !== void 0), s = e !== void 0;
17766
17778
  Ce(() => {
17767
17779
  let c = i.current;
@@ -17773,9 +17785,9 @@ function ug(e, t, n) {
17773
17785
  let f = (h, ...m) => {
17774
17786
  n && (Object.is(o, h) || n(h, ...m)), s || (o = h);
17775
17787
  };
17776
- typeof c == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), a((m, ...y) => {
17777
- let A = c(s ? o : m, ...y);
17778
- return f(A, ...d), s ? m : A;
17788
+ typeof c == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), a((m, ...A) => {
17789
+ let x = c(s ? o : m, ...A);
17790
+ return f(x, ...d), s ? m : x;
17779
17791
  })) : (s || a(c), f(c, ...d));
17780
17792
  }, [
17781
17793
  s,
@@ -17790,10 +17802,10 @@ function ug(e, t, n) {
17790
17802
  const Er = {
17791
17803
  prefix: String(Math.round(Math.random() * 1e10)),
17792
17804
  current: 0
17793
- }, pl = /* @__PURE__ */ Le.createContext(Er), og = /* @__PURE__ */ Le.createContext(!1);
17794
- let lg = !!(typeof window < "u" && window.document && window.document.createElement), sa = /* @__PURE__ */ new WeakMap();
17795
- function cg(e = !1) {
17796
- let t = st(pl), n = xe(null);
17805
+ }, pl = /* @__PURE__ */ Le.createContext(Er), lg = /* @__PURE__ */ Le.createContext(!1);
17806
+ let cg = !!(typeof window < "u" && window.document && window.document.createElement), sa = /* @__PURE__ */ new WeakMap();
17807
+ function dg(e = !1) {
17808
+ let t = tt(pl), n = xe(null);
17797
17809
  if (n.current === null && !e) {
17798
17810
  var r, a;
17799
17811
  let i = (a = Le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || a === void 0 || (r = a.ReactCurrentOwner) === null || r === void 0 ? void 0 : r.current;
@@ -17808,29 +17820,29 @@ function cg(e = !1) {
17808
17820
  }
17809
17821
  return n.current;
17810
17822
  }
17811
- function dg(e) {
17812
- let t = st(pl);
17813
- t === Er && !lg && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
17814
- let n = cg(!!e), r = t === Er && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${t.prefix}`;
17823
+ function fg(e) {
17824
+ let t = tt(pl);
17825
+ t === Er && !cg && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
17826
+ let n = dg(!!e), r = t === Er && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${t.prefix}`;
17815
17827
  return e || `${r}-${n}`;
17816
17828
  }
17817
- function fg(e) {
17818
- let t = Le.useId(), [n] = fe(gg()), r = n || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${Er.prefix}`;
17829
+ function hg(e) {
17830
+ let t = Le.useId(), [n] = fe(bg()), r = n || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${Er.prefix}`;
17819
17831
  return e || `${r}-${t}`;
17820
17832
  }
17821
- const hg = typeof Le.useId == "function" ? fg : dg;
17822
- function mg() {
17833
+ const mg = typeof Le.useId == "function" ? hg : fg;
17834
+ function pg() {
17823
17835
  return !1;
17824
17836
  }
17825
- function pg() {
17837
+ function Eg() {
17826
17838
  return !0;
17827
17839
  }
17828
- function Eg(e) {
17840
+ function gg(e) {
17829
17841
  return () => {
17830
17842
  };
17831
17843
  }
17832
- function gg() {
17833
- return typeof Le.useSyncExternalStore == "function" ? Le.useSyncExternalStore(Eg, mg, pg) : st(og);
17844
+ function bg() {
17845
+ return typeof Le.useSyncExternalStore == "function" ? Le.useSyncExternalStore(gg, pg, Eg) : tt(lg);
17834
17846
  }
17835
17847
  function El(e) {
17836
17848
  var t, n, r = "";
@@ -17841,7 +17853,7 @@ function El(e) {
17841
17853
  } else for (n in e) e[n] && (r && (r += " "), r += n);
17842
17854
  return r;
17843
17855
  }
17844
- function bg() {
17856
+ function Tg() {
17845
17857
  for (var e, t, n = 0, r = "", a = arguments.length; n < a; n++) (e = arguments[n]) && (t = El(e)) && (r && (r += " "), r += t);
17846
17858
  return r;
17847
17859
  }
@@ -17858,7 +17870,7 @@ function jt(e) {
17858
17870
  return r?.(...n);
17859
17871
  }, []);
17860
17872
  }
17861
- function Tg(e) {
17873
+ function yg(e) {
17862
17874
  let [t, n] = fe(e), r = xe(null), a = jt(() => {
17863
17875
  if (!r.current) return;
17864
17876
  let s = r.current.next();
@@ -17879,12 +17891,12 @@ function Tg(e) {
17879
17891
  i
17880
17892
  ];
17881
17893
  }
17882
- let yg = !!(typeof window < "u" && window.document && window.document.createElement), gr = /* @__PURE__ */ new Map();
17894
+ let Ag = !!(typeof window < "u" && window.document && window.document.createElement), gr = /* @__PURE__ */ new Map();
17883
17895
  function br(e) {
17884
- let [t, n] = fe(e), r = xe(null), a = hg(t), i = kt((s) => {
17896
+ let [t, n] = fe(e), r = xe(null), a = mg(t), i = kt((s) => {
17885
17897
  r.current = s;
17886
17898
  }, []);
17887
- return yg && gr.set(a, i), Kt(() => {
17899
+ return Ag && gr.set(a, i), Kt(() => {
17888
17900
  let s = a;
17889
17901
  return () => {
17890
17902
  gr.delete(s);
@@ -17896,7 +17908,7 @@ function br(e) {
17896
17908
  s && (r.current = null, n(s));
17897
17909
  }), a;
17898
17910
  }
17899
- function Ag(e, t) {
17911
+ function xg(e, t) {
17900
17912
  if (e === t) return e;
17901
17913
  let n = gr.get(e);
17902
17914
  if (n)
@@ -17905,7 +17917,7 @@ function Ag(e, t) {
17905
17917
  return r ? (r(e), e) : t;
17906
17918
  }
17907
17919
  function Vs(e = []) {
17908
- let t = br(), [n, r] = Tg(t), a = kt(() => {
17920
+ let t = br(), [n, r] = yg(t), a = kt(() => {
17909
17921
  r(function* () {
17910
17922
  yield t, yield document.getElementById(t) ? t : void 0;
17911
17923
  });
@@ -17919,7 +17931,7 @@ function Vs(e = []) {
17919
17931
  ...e
17920
17932
  ]), n;
17921
17933
  }
17922
- function xg(...e) {
17934
+ function _g(...e) {
17923
17935
  return (...t) => {
17924
17936
  for (let n of e) typeof n == "function" && n(...t);
17925
17937
  };
@@ -17939,42 +17951,42 @@ function yr(...e) {
17939
17951
  typeof i == "function" && typeof s == "function" && // This is a lot faster than a regex.
17940
17952
  a[0] === "o" && a[1] === "n" && a.charCodeAt(2) >= /* 'A' */
17941
17953
  65 && a.charCodeAt(2) <= /* 'Z' */
17942
- 90 ? t[a] = xg(i, s) : (a === "className" || a === "UNSAFE_className") && typeof i == "string" && typeof s == "string" ? t[a] = bg(i, s) : a === "id" && i && s ? t.id = Ag(i, s) : t[a] = s !== void 0 ? s : i;
17954
+ 90 ? t[a] = _g(i, s) : (a === "className" || a === "UNSAFE_className") && typeof i == "string" && typeof s == "string" ? t[a] = Tg(i, s) : a === "id" && i && s ? t.id = xg(i, s) : t[a] = s !== void 0 ? s : i;
17943
17955
  }
17944
17956
  }
17945
17957
  return t;
17946
17958
  }
17947
- const _g = /* @__PURE__ */ new Set([
17959
+ const Sg = /* @__PURE__ */ new Set([
17948
17960
  "id"
17949
- ]), Sg = /* @__PURE__ */ new Set([
17961
+ ]), Cg = /* @__PURE__ */ new Set([
17950
17962
  "aria-label",
17951
17963
  "aria-labelledby",
17952
17964
  "aria-describedby",
17953
17965
  "aria-details"
17954
- ]), Cg = /* @__PURE__ */ new Set([
17966
+ ]), Ig = /* @__PURE__ */ new Set([
17955
17967
  "href",
17956
17968
  "target",
17957
17969
  "rel",
17958
17970
  "download",
17959
17971
  "ping",
17960
17972
  "referrerPolicy"
17961
- ]), Ig = /^(data-.*)$/;
17962
- function Ng(e, t = {}) {
17973
+ ]), Ng = /^(data-.*)$/;
17974
+ function vg(e, t = {}) {
17963
17975
  let { labelable: n, isLink: r, propNames: a } = t, i = {};
17964
- for (const s in e) Object.prototype.hasOwnProperty.call(e, s) && (_g.has(s) || n && Sg.has(s) || r && Cg.has(s) || a?.has(s) || Ig.test(s)) && (i[s] = e[s]);
17976
+ for (const s in e) Object.prototype.hasOwnProperty.call(e, s) && (Sg.has(s) || n && Cg.has(s) || r && Ig.has(s) || a?.has(s) || Ng.test(s)) && (i[s] = e[s]);
17965
17977
  return i;
17966
17978
  }
17967
17979
  function qs(e) {
17968
- if (vg()) e.focus({
17980
+ if (wg()) e.focus({
17969
17981
  preventScroll: !0
17970
17982
  });
17971
17983
  else {
17972
- let t = wg(e);
17973
- e.focus(), Og(t);
17984
+ let t = Og(e);
17985
+ e.focus(), Lg(t);
17974
17986
  }
17975
17987
  }
17976
17988
  let ar = null;
17977
- function vg() {
17989
+ function wg() {
17978
17990
  if (ar == null) {
17979
17991
  ar = !1;
17980
17992
  try {
@@ -17988,7 +18000,7 @@ function vg() {
17988
18000
  }
17989
18001
  return ar;
17990
18002
  }
17991
- function wg(e) {
18003
+ function Og(e) {
17992
18004
  let t = e.parentNode, n = [], r = document.scrollingElement || document.documentElement;
17993
18005
  for (; t instanceof HTMLElement && t !== r; )
17994
18006
  (t.offsetHeight < t.scrollHeight || t.offsetWidth < t.scrollWidth) && n.push({
@@ -18002,23 +18014,23 @@ function wg(e) {
18002
18014
  scrollLeft: r.scrollLeft
18003
18015
  }), n;
18004
18016
  }
18005
- function Og(e) {
18017
+ function Lg(e) {
18006
18018
  for (let { element: t, scrollTop: n, scrollLeft: r } of e)
18007
18019
  t.scrollTop = n, t.scrollLeft = r;
18008
18020
  }
18009
- function Lg(e) {
18021
+ function Rg(e) {
18010
18022
  var t;
18011
18023
  return typeof window > "u" || window.navigator == null ? !1 : ((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.brands.some((n) => e.test(n.brand))) || e.test(window.navigator.userAgent);
18012
18024
  }
18013
- function Rg(e) {
18025
+ function kg(e) {
18014
18026
  var t;
18015
18027
  return typeof window < "u" && window.navigator != null ? e.test(((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.platform) || window.navigator.platform) : !1;
18016
18028
  }
18017
- function kg() {
18018
- return Rg(/^Mac/i);
18019
- }
18020
18029
  function Dg() {
18021
- return Lg(/Android/i);
18030
+ return kg(/^Mac/i);
18031
+ }
18032
+ function Pg() {
18033
+ return Rg(/Android/i);
18022
18034
  }
18023
18035
  let nn = /* @__PURE__ */ new Map(), Ua = /* @__PURE__ */ new Set();
18024
18036
  function Ws() {
@@ -18043,12 +18055,12 @@ function Ws() {
18043
18055
  document.body.addEventListener("transitionrun", t), document.body.addEventListener("transitionend", n);
18044
18056
  }
18045
18057
  typeof document < "u" && (document.readyState !== "loading" ? Ws() : document.addEventListener("DOMContentLoaded", Ws));
18046
- function Pg(e) {
18058
+ function Mg(e) {
18047
18059
  requestAnimationFrame(() => {
18048
18060
  nn.size === 0 ? e() : Ua.add(e);
18049
18061
  });
18050
18062
  }
18051
- function Mg(e, t) {
18063
+ function Bg(e, t) {
18052
18064
  let { id: n, "aria-label": r, "aria-labelledby": a } = e;
18053
18065
  return n = br(n), a && r ? a = [
18054
18066
  .../* @__PURE__ */ new Set([
@@ -18061,7 +18073,7 @@ function Mg(e, t) {
18061
18073
  "aria-labelledby": a
18062
18074
  };
18063
18075
  }
18064
- function Bg(e, t) {
18076
+ function Fg(e, t) {
18065
18077
  Kt(() => {
18066
18078
  if (e && e.ref && t)
18067
18079
  return e.ref.current = t.current, () => {
@@ -18069,10 +18081,10 @@ function Bg(e, t) {
18069
18081
  };
18070
18082
  });
18071
18083
  }
18072
- function Fg(e) {
18073
- return e.mozInputSource === 0 && e.isTrusted ? !0 : Dg() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
18084
+ function Hg(e) {
18085
+ return e.mozInputSource === 0 && e.isTrusted ? !0 : Pg() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
18074
18086
  }
18075
- function Hg(e, t, n) {
18087
+ function Ug(e, t, n) {
18076
18088
  let r = xe(t), a = jt(() => {
18077
18089
  n && n(r.current);
18078
18090
  });
@@ -18087,12 +18099,12 @@ function Hg(e, t, n) {
18087
18099
  a
18088
18100
  ]);
18089
18101
  }
18090
- const Ug = Le.createContext({
18102
+ const $g = Le.createContext({
18091
18103
  register: () => {
18092
18104
  }
18093
18105
  });
18094
- Ug.displayName = "PressResponderContext";
18095
- class $g {
18106
+ $g.displayName = "PressResponderContext";
18107
+ class zg {
18096
18108
  isDefaultPrevented() {
18097
18109
  return this.nativeEvent.defaultPrevented;
18098
18110
  }
@@ -18111,7 +18123,7 @@ class $g {
18111
18123
  this.nativeEvent = n, this.target = n.target, this.currentTarget = n.currentTarget, this.relatedTarget = n.relatedTarget, this.bubbles = n.bubbles, this.cancelable = n.cancelable, this.defaultPrevented = n.defaultPrevented, this.eventPhase = n.eventPhase, this.isTrusted = n.isTrusted, this.timeStamp = n.timeStamp, this.type = t;
18112
18124
  }
18113
18125
  }
18114
- function zg(e) {
18126
+ function Yg(e) {
18115
18127
  let t = xe({
18116
18128
  isFocused: !1,
18117
18129
  observer: null
@@ -18129,7 +18141,7 @@ function zg(e) {
18129
18141
  if (r.target instanceof HTMLButtonElement || r.target instanceof HTMLInputElement || r.target instanceof HTMLTextAreaElement || r.target instanceof HTMLSelectElement) {
18130
18142
  t.current.isFocused = !0;
18131
18143
  let a = r.target, i = (s) => {
18132
- t.current.isFocused = !1, a.disabled && n(new $g("blur", s)), t.current.observer && (t.current.observer.disconnect(), t.current.observer = null);
18144
+ t.current.isFocused = !1, a.disabled && n(new zg("blur", s)), t.current.observer && (t.current.observer.disconnect(), t.current.observer = null);
18133
18145
  };
18134
18146
  a.addEventListener("focusout", i, {
18135
18147
  once: !0
@@ -18156,7 +18168,7 @@ function zg(e) {
18156
18168
  n
18157
18169
  ]);
18158
18170
  }
18159
- function Yg(e) {
18171
+ function Gg(e) {
18160
18172
  let { isDisabled: t, onFocus: n, onBlur: r, onFocusChange: a } = e;
18161
18173
  const i = kt((l) => {
18162
18174
  if (l.target === l.currentTarget)
@@ -18164,7 +18176,7 @@ function Yg(e) {
18164
18176
  }, [
18165
18177
  r,
18166
18178
  a
18167
- ]), s = zg(i), o = kt((l) => {
18179
+ ]), s = Yg(i), o = kt((l) => {
18168
18180
  l.target === l.currentTarget && document.activeElement === l.target && (n && n(l), a && a(!0), s(l));
18169
18181
  }, [
18170
18182
  a,
@@ -18178,59 +18190,59 @@ function Yg(e) {
18178
18190
  }
18179
18191
  };
18180
18192
  }
18181
- let Tn = null, Gg = /* @__PURE__ */ new Set(), Dn = /* @__PURE__ */ new Map(), qt = !1, $a = !1;
18193
+ let yn = null, jg = /* @__PURE__ */ new Set(), Pn = /* @__PURE__ */ new Map(), qt = !1, $a = !1;
18182
18194
  function Pr(e, t) {
18183
- for (let n of Gg) n(e, t);
18195
+ for (let n of jg) n(e, t);
18184
18196
  }
18185
- function jg(e) {
18186
- return !(e.metaKey || !kg() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
18197
+ function Vg(e) {
18198
+ return !(e.metaKey || !Dg() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
18187
18199
  }
18188
18200
  function Ar(e) {
18189
- qt = !0, jg(e) && (Tn = "keyboard", Pr("keyboard", e));
18201
+ qt = !0, Vg(e) && (yn = "keyboard", Pr("keyboard", e));
18190
18202
  }
18191
- function at(e) {
18192
- Tn = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (qt = !0, Pr("pointer", e));
18203
+ function it(e) {
18204
+ yn = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (qt = !0, Pr("pointer", e));
18193
18205
  }
18194
18206
  function gl(e) {
18195
- Fg(e) && (qt = !0, Tn = "virtual");
18207
+ Hg(e) && (qt = !0, yn = "virtual");
18196
18208
  }
18197
18209
  function bl(e) {
18198
- e.target === window || e.target === document || (!qt && !$a && (Tn = "virtual", Pr("virtual", e)), qt = !1, $a = !1);
18210
+ e.target === window || e.target === document || (!qt && !$a && (yn = "virtual", Pr("virtual", e)), qt = !1, $a = !1);
18199
18211
  }
18200
18212
  function Tl() {
18201
18213
  qt = !1, $a = !0;
18202
18214
  }
18203
18215
  function Xs(e) {
18204
- if (typeof window > "u" || Dn.get(Tr(e))) return;
18216
+ if (typeof window > "u" || Pn.get(Tr(e))) return;
18205
18217
  const t = Tr(e), n = Wn(e);
18206
18218
  let r = t.HTMLElement.prototype.focus;
18207
18219
  t.HTMLElement.prototype.focus = function() {
18208
18220
  qt = !0, r.apply(this, arguments);
18209
- }, n.addEventListener("keydown", Ar, !0), n.addEventListener("keyup", Ar, !0), n.addEventListener("click", gl, !0), t.addEventListener("focus", bl, !0), t.addEventListener("blur", Tl, !1), typeof PointerEvent < "u" ? (n.addEventListener("pointerdown", at, !0), n.addEventListener("pointermove", at, !0), n.addEventListener("pointerup", at, !0)) : (n.addEventListener("mousedown", at, !0), n.addEventListener("mousemove", at, !0), n.addEventListener("mouseup", at, !0)), t.addEventListener("beforeunload", () => {
18221
+ }, n.addEventListener("keydown", Ar, !0), n.addEventListener("keyup", Ar, !0), n.addEventListener("click", gl, !0), t.addEventListener("focus", bl, !0), t.addEventListener("blur", Tl, !1), typeof PointerEvent < "u" ? (n.addEventListener("pointerdown", it, !0), n.addEventListener("pointermove", it, !0), n.addEventListener("pointerup", it, !0)) : (n.addEventListener("mousedown", it, !0), n.addEventListener("mousemove", it, !0), n.addEventListener("mouseup", it, !0)), t.addEventListener("beforeunload", () => {
18210
18222
  yl(e);
18211
18223
  }, {
18212
18224
  once: !0
18213
- }), Dn.set(t, {
18225
+ }), Pn.set(t, {
18214
18226
  focus: r
18215
18227
  });
18216
18228
  }
18217
18229
  const yl = (e, t) => {
18218
18230
  const n = Tr(e), r = Wn(e);
18219
- t && r.removeEventListener("DOMContentLoaded", t), Dn.has(n) && (n.HTMLElement.prototype.focus = Dn.get(n).focus, r.removeEventListener("keydown", Ar, !0), r.removeEventListener("keyup", Ar, !0), r.removeEventListener("click", gl, !0), n.removeEventListener("focus", bl, !0), n.removeEventListener("blur", Tl, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", at, !0), r.removeEventListener("pointermove", at, !0), r.removeEventListener("pointerup", at, !0)) : (r.removeEventListener("mousedown", at, !0), r.removeEventListener("mousemove", at, !0), r.removeEventListener("mouseup", at, !0)), Dn.delete(n));
18231
+ t && r.removeEventListener("DOMContentLoaded", t), Pn.has(n) && (n.HTMLElement.prototype.focus = Pn.get(n).focus, r.removeEventListener("keydown", Ar, !0), r.removeEventListener("keyup", Ar, !0), r.removeEventListener("click", gl, !0), n.removeEventListener("focus", bl, !0), n.removeEventListener("blur", Tl, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", it, !0), r.removeEventListener("pointermove", it, !0), r.removeEventListener("pointerup", it, !0)) : (r.removeEventListener("mousedown", it, !0), r.removeEventListener("mousemove", it, !0), r.removeEventListener("mouseup", it, !0)), Pn.delete(n));
18220
18232
  };
18221
- function Vg(e) {
18233
+ function qg(e) {
18222
18234
  const t = Wn(e);
18223
18235
  let n;
18224
18236
  return t.readyState !== "loading" ? Xs(e) : (n = () => {
18225
18237
  Xs(e);
18226
18238
  }, t.addEventListener("DOMContentLoaded", n)), () => yl(e, n);
18227
18239
  }
18228
- typeof document < "u" && Vg();
18229
- function qg() {
18230
- return Tn;
18240
+ typeof document < "u" && qg();
18241
+ function Wg() {
18242
+ return yn;
18231
18243
  }
18232
- function Wg(e) {
18233
- Tn = e, Pr(e, null);
18244
+ function Xg(e) {
18245
+ yn = e, Pr(e, null);
18234
18246
  }
18235
18247
  function Qs(e) {
18236
18248
  if (!e) return;
@@ -18254,7 +18266,7 @@ function Qs(e) {
18254
18266
  e(r), t && n.stopPropagation();
18255
18267
  };
18256
18268
  }
18257
- function Xg(e) {
18269
+ function Qg(e) {
18258
18270
  return {
18259
18271
  keyboardProps: e.isDisabled ? {} : {
18260
18272
  onKeyDown: Qs(e.onKeyDown),
@@ -18262,16 +18274,16 @@ function Xg(e) {
18262
18274
  }
18263
18275
  };
18264
18276
  }
18265
- function Qg(e) {
18277
+ function Kg(e) {
18266
18278
  const t = Wn(e);
18267
- if (qg() === "virtual") {
18279
+ if (Wg() === "virtual") {
18268
18280
  let n = t.activeElement;
18269
- Pg(() => {
18281
+ Mg(() => {
18270
18282
  t.activeElement === n && e.isConnected && qs(e);
18271
18283
  });
18272
18284
  } else qs(e);
18273
18285
  }
18274
- function Kg(e, t) {
18286
+ function Zg(e, t) {
18275
18287
  return !e || !t ? !1 : t.some((n) => n.contains(e));
18276
18288
  }
18277
18289
  class gi {
@@ -18297,7 +18309,7 @@ class gi {
18297
18309
  let n = this.fastMap.get(t);
18298
18310
  if (!n) return;
18299
18311
  let r = n.parent;
18300
- for (let i of this.traverse()) i !== n && n.nodeToRestore && i.nodeToRestore && n.scopeRef && n.scopeRef.current && Kg(i.nodeToRestore, n.scopeRef.current) && (i.nodeToRestore = n.nodeToRestore);
18312
+ for (let i of this.traverse()) i !== n && n.nodeToRestore && i.nodeToRestore && n.scopeRef && n.scopeRef.current && Zg(i.nodeToRestore, n.scopeRef.current) && (i.nodeToRestore = n.nodeToRestore);
18301
18313
  let a = n.children;
18302
18314
  r && (r.removeChild(n), a.size > 0 && a.forEach((i) => r && r.addChild(i))), this.fastMap.delete(n.scopeRef);
18303
18315
  }
@@ -18330,17 +18342,17 @@ class Ks {
18330
18342
  }
18331
18343
  }
18332
18344
  new gi();
18333
- let Zg = /* @__PURE__ */ Le.createContext(null);
18334
- function Jg(e) {
18335
- let t = st(Zg) || {};
18336
- Bg(t, e);
18345
+ let Jg = /* @__PURE__ */ Le.createContext(null);
18346
+ function eb(e) {
18347
+ let t = tt(Jg) || {};
18348
+ Fg(t, e);
18337
18349
  let { ref: n, ...r } = t;
18338
18350
  return r;
18339
18351
  }
18340
- function eb(e, t) {
18341
- let { focusProps: n } = Yg(e), { keyboardProps: r } = Xg(e), a = yr(n, r), i = Jg(t), s = e.isDisabled ? {} : i, o = xe(e.autoFocus);
18352
+ function tb(e, t) {
18353
+ let { focusProps: n } = Gg(e), { keyboardProps: r } = Qg(e), a = yr(n, r), i = eb(t), s = e.isDisabled ? {} : i, o = xe(e.autoFocus);
18342
18354
  return Ce(() => {
18343
- o.current && t.current && Qg(t.current), o.current = !1;
18355
+ o.current && t.current && Kg(t.current), o.current = !1;
18344
18356
  }, [
18345
18357
  t
18346
18358
  ]), {
@@ -18350,12 +18362,12 @@ function eb(e, t) {
18350
18362
  }, s)
18351
18363
  };
18352
18364
  }
18353
- function tb(e, t, n) {
18365
+ function nb(e, t, n) {
18354
18366
  let { validationBehavior: r, focus: a } = e;
18355
18367
  Kt(() => {
18356
18368
  if (r === "native" && n?.current) {
18357
18369
  let l = t.realtimeValidation.isInvalid ? t.realtimeValidation.validationErrors.join(" ") || "Invalid value." : "";
18358
- n.current.setCustomValidity(l), n.current.hasAttribute("title") || (n.current.title = ""), t.realtimeValidation.isInvalid || t.updateValidation(rb(n.current));
18370
+ n.current.setCustomValidity(l), n.current.hasAttribute("title") || (n.current.title = ""), t.realtimeValidation.isInvalid || t.updateValidation(ab(n.current));
18359
18371
  }
18360
18372
  });
18361
18373
  let i = jt(() => {
@@ -18364,9 +18376,9 @@ function tb(e, t, n) {
18364
18376
  var c;
18365
18377
  t.displayValidation.isInvalid || t.commitValidation();
18366
18378
  let d = n == null || (c = n.current) === null || c === void 0 ? void 0 : c.form;
18367
- if (!l.defaultPrevented && n && d && ab(d) === n.current) {
18379
+ if (!l.defaultPrevented && n && d && ib(d) === n.current) {
18368
18380
  var f;
18369
- a ? a() : (f = n.current) === null || f === void 0 || f.focus(), Wg("keyboard");
18381
+ a ? a() : (f = n.current) === null || f === void 0 || f.focus(), Xg("keyboard");
18370
18382
  }
18371
18383
  l.preventDefault();
18372
18384
  }), o = jt(() => {
@@ -18387,7 +18399,7 @@ function tb(e, t, n) {
18387
18399
  r
18388
18400
  ]);
18389
18401
  }
18390
- function nb(e) {
18402
+ function rb(e) {
18391
18403
  let t = e.validity;
18392
18404
  return {
18393
18405
  badInput: t.badInput,
@@ -18403,16 +18415,16 @@ function nb(e) {
18403
18415
  valid: t.valid
18404
18416
  };
18405
18417
  }
18406
- function rb(e) {
18418
+ function ab(e) {
18407
18419
  return {
18408
18420
  isInvalid: !e.validity.valid,
18409
- validationDetails: nb(e),
18421
+ validationDetails: rb(e),
18410
18422
  validationErrors: e.validationMessage ? [
18411
18423
  e.validationMessage
18412
18424
  ] : []
18413
18425
  };
18414
18426
  }
18415
- function ab(e) {
18427
+ function ib(e) {
18416
18428
  for (let t = 0; t < e.elements.length; t++) {
18417
18429
  let n = e.elements[t];
18418
18430
  if (!n.validity.valid) return n;
@@ -18435,12 +18447,12 @@ const Al = {
18435
18447
  ...Al,
18436
18448
  customError: !0,
18437
18449
  valid: !1
18438
- }, _n = {
18450
+ }, Sn = {
18439
18451
  isInvalid: !1,
18440
18452
  validationDetails: Al,
18441
18453
  validationErrors: []
18442
- }, ib = Bl({}), Zs = "__formValidationState" + Date.now();
18443
- function sb(e) {
18454
+ }, sb = Bl({}), Zs = "__formValidationState" + Date.now();
18455
+ function ub(e) {
18444
18456
  if (e[Zs]) {
18445
18457
  let { realtimeValidation: t, displayValidation: n, updateValidation: r, resetValidation: a, commitValidation: i } = e[Zs];
18446
18458
  return {
@@ -18451,46 +18463,46 @@ function sb(e) {
18451
18463
  commitValidation: i
18452
18464
  };
18453
18465
  }
18454
- return ub(e);
18466
+ return ob(e);
18455
18467
  }
18456
- function ub(e) {
18468
+ function ob(e) {
18457
18469
  let { isInvalid: t, validationState: n, name: r, value: a, builtinValidation: i, validate: s, validationBehavior: o = "aria" } = e;
18458
18470
  n && (t || (t = n === "invalid"));
18459
18471
  let l = t ? {
18460
18472
  isInvalid: !0,
18461
18473
  validationErrors: [],
18462
18474
  validationDetails: xl
18463
- } : null, c = sn(() => Js(ob(s, a)), [
18475
+ } : null, c = sn(() => Js(lb(s, a)), [
18464
18476
  s,
18465
18477
  a
18466
18478
  ]);
18467
18479
  i?.validationDetails.valid && (i = null);
18468
- let d = st(ib), f = sn(() => r ? Array.isArray(r) ? r.flatMap((Y) => za(d[Y])) : za(d[r]) : [], [
18480
+ let d = tt(sb), f = sn(() => r ? Array.isArray(r) ? r.flatMap((Y) => za(d[Y])) : za(d[r]) : [], [
18469
18481
  d,
18470
18482
  r
18471
- ]), [h, m] = fe(d), [y, A] = fe(!1);
18472
- d !== h && (m(d), A(!1));
18473
- let C = sn(() => Js(y ? [] : f), [
18474
- y,
18483
+ ]), [h, m] = fe(d), [A, x] = fe(!1);
18484
+ d !== h && (m(d), x(!1));
18485
+ let C = sn(() => Js(A ? [] : f), [
18486
+ A,
18475
18487
  f
18476
- ]), x = xe(_n), [O, I] = fe(_n), M = xe(_n), S = () => {
18488
+ ]), y = xe(Sn), [O, I] = fe(Sn), M = xe(Sn), S = () => {
18477
18489
  if (!w) return;
18478
18490
  Q(!1);
18479
- let Y = c || i || x.current;
18491
+ let Y = c || i || y.current;
18480
18492
  ua(Y, M.current) || (M.current = Y, I(Y));
18481
18493
  }, [w, Q] = fe(!1);
18482
18494
  return Ce(S), {
18483
- realtimeValidation: l || C || c || i || _n,
18495
+ realtimeValidation: l || C || c || i || Sn,
18484
18496
  displayValidation: o === "native" ? l || C || O : l || C || c || i || O,
18485
18497
  updateValidation(Y) {
18486
- o === "aria" && !ua(O, Y) ? I(Y) : x.current = Y;
18498
+ o === "aria" && !ua(O, Y) ? I(Y) : y.current = Y;
18487
18499
  },
18488
18500
  resetValidation() {
18489
- let Y = _n;
18490
- ua(Y, M.current) || (M.current = Y, I(Y)), o === "native" && Q(!1), A(!0);
18501
+ let Y = Sn;
18502
+ ua(Y, M.current) || (M.current = Y, I(Y)), o === "native" && Q(!1), x(!0);
18491
18503
  },
18492
18504
  commitValidation() {
18493
- o === "native" && Q(!0), A(!0);
18505
+ o === "native" && Q(!0), x(!0);
18494
18506
  }
18495
18507
  };
18496
18508
  }
@@ -18499,7 +18511,7 @@ function za(e) {
18499
18511
  e
18500
18512
  ] : [];
18501
18513
  }
18502
- function ob(e, t) {
18514
+ function lb(e, t) {
18503
18515
  if (typeof e == "function") {
18504
18516
  let n = e(t);
18505
18517
  if (n && typeof n != "boolean") return za(n);
@@ -18516,7 +18528,7 @@ function Js(e) {
18516
18528
  function ua(e, t) {
18517
18529
  return e === t ? !0 : e && t && e.isInvalid === t.isInvalid && e.validationErrors.length === t.validationErrors.length && e.validationErrors.every((n, r) => n === t.validationErrors[r]) && Object.entries(e.validationDetails).every(([n, r]) => t.validationDetails[n] === r);
18518
18530
  }
18519
- function lb(e) {
18531
+ function cb(e) {
18520
18532
  let { id: t, label: n, "aria-labelledby": r, "aria-label": a, labelElementType: i = "label" } = e;
18521
18533
  t = br(t);
18522
18534
  let s = br(), o = {};
@@ -18524,7 +18536,7 @@ function lb(e) {
18524
18536
  id: s,
18525
18537
  htmlFor: i === "label" ? t : void 0
18526
18538
  }) : !r && !a && console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");
18527
- let l = Mg({
18539
+ let l = Bg({
18528
18540
  id: t,
18529
18541
  "aria-label": a,
18530
18542
  "aria-labelledby": r
@@ -18534,8 +18546,8 @@ function lb(e) {
18534
18546
  fieldProps: l
18535
18547
  };
18536
18548
  }
18537
- function cb(e) {
18538
- let { description: t, errorMessage: n, isInvalid: r, validationState: a } = e, { labelProps: i, fieldProps: s } = lb(e), o = Vs([
18549
+ function db(e) {
18550
+ let { description: t, errorMessage: n, isInvalid: r, validationState: a } = e, { labelProps: i, fieldProps: s } = cb(e), o = Vs([
18539
18551
  !!t,
18540
18552
  !!n,
18541
18553
  r,
@@ -18564,22 +18576,22 @@ function cb(e) {
18564
18576
  }
18565
18577
  };
18566
18578
  }
18567
- function db(e, t) {
18568
- let { inputElementType: n = "input", isDisabled: r = !1, isRequired: a = !1, isReadOnly: i = !1, type: s = "text", validationBehavior: o = "aria" } = e, [l, c] = ug(e.value, e.defaultValue || "", e.onChange), { focusableProps: d } = eb(e, t), f = sb({
18579
+ function fb(e, t) {
18580
+ let { inputElementType: n = "input", isDisabled: r = !1, isRequired: a = !1, isReadOnly: i = !1, type: s = "text", validationBehavior: o = "aria" } = e, [l, c] = og(e.value, e.defaultValue || "", e.onChange), { focusableProps: d } = tb(e, t), f = ub({
18569
18581
  ...e,
18570
18582
  value: l
18571
- }), { isInvalid: h, validationErrors: m, validationDetails: y } = f.displayValidation, { labelProps: A, fieldProps: C, descriptionProps: x, errorMessageProps: O } = cb({
18583
+ }), { isInvalid: h, validationErrors: m, validationDetails: A } = f.displayValidation, { labelProps: x, fieldProps: C, descriptionProps: y, errorMessageProps: O } = db({
18572
18584
  ...e,
18573
18585
  isInvalid: h,
18574
18586
  errorMessage: e.errorMessage || m
18575
- }), I = Ng(e, {
18587
+ }), I = vg(e, {
18576
18588
  labelable: !0
18577
18589
  });
18578
18590
  const M = {
18579
18591
  type: s,
18580
18592
  pattern: e.pattern
18581
18593
  };
18582
- return Hg(t, l, c), tb(e, f, t), Ce(() => {
18594
+ return Ug(t, l, c), nb(e, f, t), Ce(() => {
18583
18595
  if (t.current instanceof Tr(t.current).HTMLTextAreaElement) {
18584
18596
  let S = t.current;
18585
18597
  Object.defineProperty(S, "defaultValue", {
@@ -18592,7 +18604,7 @@ function db(e, t) {
18592
18604
  }, [
18593
18605
  t
18594
18606
  ]), {
18595
- labelProps: A,
18607
+ labelProps: x,
18596
18608
  inputProps: yr(I, n === "input" && M, {
18597
18609
  disabled: r,
18598
18610
  readOnly: i,
@@ -18628,14 +18640,14 @@ function db(e, t) {
18628
18640
  ...d,
18629
18641
  ...C
18630
18642
  }),
18631
- descriptionProps: x,
18643
+ descriptionProps: y,
18632
18644
  errorMessageProps: O,
18633
18645
  isInvalid: h,
18634
18646
  validationErrors: m,
18635
- validationDetails: y
18647
+ validationDetails: A
18636
18648
  };
18637
18649
  }
18638
- const fb = (e) => e.charCodeAt(e.length - 1) === 10, hb = (e) => {
18650
+ const hb = (e) => e.charCodeAt(e.length - 1) === 10, mb = (e) => {
18639
18651
  const [t, n] = fe(""), r = () => {
18640
18652
  h.current && (h.current.style.height = h.current.scrollHeight + "px");
18641
18653
  }, a = () => {
@@ -18651,15 +18663,15 @@ const fb = (e) => e.charCodeAt(e.length - 1) === 10, hb = (e) => {
18651
18663
  isLoadingStream: c,
18652
18664
  LoadingComponent: d,
18653
18665
  onPressLoadingButton: f
18654
- } = e, h = xe(null), { labelProps: m, inputProps: y } = db(
18666
+ } = e, h = xe(null), { labelProps: m, inputProps: A } = fb(
18655
18667
  {
18656
18668
  ...e,
18657
18669
  inputElementType: "textarea"
18658
18670
  },
18659
18671
  h
18660
18672
  );
18661
- const A = (S) => {
18662
- fb(S.target.value) || i(S.target.value);
18673
+ const x = (S) => {
18674
+ hb(S.target.value) || i(S.target.value);
18663
18675
  }, C = (S) => {
18664
18676
  if (S.key === "Enter" || S.code === "Enter" || S.keyCode === 13 || S.code === "NumpadEnter") {
18665
18677
  if (S.shiftKey)
@@ -18670,7 +18682,7 @@ const fb = (e) => e.charCodeAt(e.length - 1) === 10, hb = (e) => {
18670
18682
  return;
18671
18683
  }
18672
18684
  }
18673
- }, x = (S) => {
18685
+ }, y = (S) => {
18674
18686
  (S.key === "Enter" || S.code === "Enter" || S.keyCode === 13 || S.code === "NumpadEnter") && (S.preventDefault(), S.stopPropagation());
18675
18687
  };
18676
18688
  let O = e.isDisabled;
@@ -18691,10 +18703,10 @@ const fb = (e) => e.charCodeAt(e.length - 1) === 10, hb = (e) => {
18691
18703
  /* @__PURE__ */ L(
18692
18704
  "textarea",
18693
18705
  {
18694
- ...y,
18706
+ ...A,
18695
18707
  ref: h,
18696
18708
  className: `${e.classNameTextarea} p-3`,
18697
- onChange: A,
18709
+ onChange: x,
18698
18710
  value: t,
18699
18711
  rows: 1,
18700
18712
  style: {
@@ -18706,7 +18718,7 @@ const fb = (e) => e.charCodeAt(e.length - 1) === 10, hb = (e) => {
18706
18718
  resize: "none"
18707
18719
  },
18708
18720
  onKeyDown: C,
18709
- onKeyUp: x
18721
+ onKeyUp: y
18710
18722
  }
18711
18723
  )
18712
18724
  ] }),
@@ -18721,7 +18733,7 @@ const fb = (e) => e.charCodeAt(e.length - 1) === 10, hb = (e) => {
18721
18733
  ]
18722
18734
  }
18723
18735
  );
18724
- }, mb = ({
18736
+ }, pb = ({
18725
18737
  onSubmitButton: e,
18726
18738
  isDisabled: t
18727
18739
  }) => /* @__PURE__ */ L("div", { children: /* @__PURE__ */ L(
@@ -18784,8 +18796,8 @@ const fb = (e) => e.charCodeAt(e.length - 1) === 10, hb = (e) => {
18784
18796
  ) })
18785
18797
  }
18786
18798
  ) });
18787
- var it = /* @__PURE__ */ ((e) => (e.FRENCH = "fr-FR", e.ENGLISH = "en-US", e))(it || {});
18788
- const pb = {
18799
+ var st = /* @__PURE__ */ ((e) => (e.FRENCH = "fr-FR", e.ENGLISH = "en-US", e))(st || {});
18800
+ const Eb = {
18789
18801
  "generic.language.english": "English",
18790
18802
  "generic.language.french": "French",
18791
18803
  "chatbot.placeholder.content": "Message the assistant...",
@@ -18808,7 +18820,7 @@ const pb = {
18808
18820
  "chatbot.chatline.seeRecentMessages": "see recent messages",
18809
18821
  "chatbot.infobanner.title": "You have an archived discussion.",
18810
18822
  "chatbot.infobanner.cta": "See"
18811
- }, Eb = {
18823
+ }, gb = {
18812
18824
  "generic.language.english": "Anglais",
18813
18825
  "generic.language.french": "Français",
18814
18826
  "chatbot.placeholder.content": "Envoyez un message à l'assistant ...",
@@ -18832,36 +18844,36 @@ const pb = {
18832
18844
  "chatbot.infobanner.title": "Vous avez une conversation archivée.",
18833
18845
  "chatbot.infobanner.cta": "Voir"
18834
18846
  }, Mr = {
18835
- [it.ENGLISH]: {
18836
- translatedText: pb,
18837
- pictureName: it.ENGLISH,
18847
+ [st.ENGLISH]: {
18848
+ translatedText: Eb,
18849
+ pictureName: st.ENGLISH,
18838
18850
  langID: 0,
18839
- locale: it.ENGLISH
18851
+ locale: st.ENGLISH
18840
18852
  },
18841
- [it.FRENCH]: {
18842
- translatedText: Eb,
18843
- pictureName: it.FRENCH,
18853
+ [st.FRENCH]: {
18854
+ translatedText: gb,
18855
+ pictureName: st.FRENCH,
18844
18856
  langID: 1,
18845
- locale: it.FRENCH
18857
+ locale: st.FRENCH
18846
18858
  }
18847
- }, gb = Object.keys(
18859
+ }, bb = Object.keys(
18848
18860
  Mr
18849
18861
  );
18850
- gb.reduce(
18862
+ bb.reduce(
18851
18863
  (e, t) => {
18852
18864
  const n = Mr[t];
18853
18865
  return [...e, n];
18854
18866
  },
18855
18867
  []
18856
18868
  );
18857
- const bb = "languageSettings", _l = Le.createContext({
18858
- appCurrentLang: Mr[it.ENGLISH],
18869
+ const Tb = "languageSettings", _l = Le.createContext({
18870
+ appCurrentLang: Mr[st.ENGLISH],
18859
18871
  setAppCurrentLang: () => {
18860
18872
  }
18861
- }), Tb = (e) => /(\[.*|\!\[.*)$/.test(e), yb = (e) => /\)/.test(e), Ab = (e) => e.filter((t) => t.userType === "user").length;
18873
+ }), yb = (e) => /(\[.*|\!\[.*)$/.test(e), Ab = (e) => /\)/.test(e), xb = (e) => e.filter((t) => t.userType === "user").length;
18862
18874
  var Sl = /* @__PURE__ */ ((e) => (e.GET_DISCUSSION_ID = "/id", e))(Sl || {});
18863
- const xb = (e) => !!e.startsWith("/"), _b = (e, t) => e === Sl.GET_DISCUSSION_ID ? t ? `Votre ID de discussion est ${t}` : "Votre ID de discussion n'est pas encore défini. Envoyez un premier message pour que ce soit le cas." : `La commande ${e} n'est pas prise en compte.`;
18864
- var Cn = /* @__PURE__ */ ((e) => (e.OUTPUT_STREAM_TEXT_TYPE = "text", e.OUTPUT_STREAM_NUMBER_OF_STEPS_TYPE = "number_of_steps", e.OUTPUT_STREAM_CURRENT_STEP_NUMBER_TYPE = "current_step_number", e.OUTPUT_STREAM_CURRENT_STEP_NAME_TYPE = "current_step_name", e))(Cn || {});
18875
+ const _b = (e) => !!e.startsWith("/"), Sb = (e, t) => e === Sl.GET_DISCUSSION_ID ? t ? `Votre ID de discussion est ${t}` : "Votre ID de discussion n'est pas encore défini. Envoyez un premier message pour que ce soit le cas." : `La commande ${e} n'est pas prise en compte.`;
18876
+ var In = /* @__PURE__ */ ((e) => (e.OUTPUT_STREAM_TEXT_TYPE = "text", e.OUTPUT_STREAM_NUMBER_OF_STEPS_TYPE = "number_of_steps", e.OUTPUT_STREAM_CURRENT_STEP_NUMBER_TYPE = "current_step_number", e.OUTPUT_STREAM_CURRENT_STEP_NAME_TYPE = "current_step_name", e))(In || {});
18865
18877
  class en {
18866
18878
  constructor() {
18867
18879
  }
@@ -18880,10 +18892,10 @@ class en {
18880
18892
  }
18881
18893
  return i;
18882
18894
  };
18883
- static isObjectOutputstreamTextDTO = (t) => t.type === Cn.OUTPUT_STREAM_TEXT_TYPE;
18884
- static isObjectOutputstreamLoadingNumberOfStepsDTO = (t) => t.type === Cn.OUTPUT_STREAM_NUMBER_OF_STEPS_TYPE;
18885
- static isObjectOutputstreamLoadingCurrentStepNumberDTO = (t) => t.type === Cn.OUTPUT_STREAM_CURRENT_STEP_NUMBER_TYPE;
18886
- static isObjectOutputstreamLoadingCurrentStepNameDTO = (t) => t.type === Cn.OUTPUT_STREAM_CURRENT_STEP_NAME_TYPE;
18895
+ static isObjectOutputstreamTextDTO = (t) => t.type === In.OUTPUT_STREAM_TEXT_TYPE;
18896
+ static isObjectOutputstreamLoadingNumberOfStepsDTO = (t) => t.type === In.OUTPUT_STREAM_NUMBER_OF_STEPS_TYPE;
18897
+ static isObjectOutputstreamLoadingCurrentStepNumberDTO = (t) => t.type === In.OUTPUT_STREAM_CURRENT_STEP_NUMBER_TYPE;
18898
+ static isObjectOutputstreamLoadingCurrentStepNameDTO = (t) => t.type === In.OUTPUT_STREAM_CURRENT_STEP_NAME_TYPE;
18887
18899
  static containsObjectWithLastAnswerToTrue = (t) => {
18888
18900
  for (const n of t)
18889
18901
  if (this.isObjectOutputstreamTextDTO(n) && n.isLastAnswer)
@@ -18932,8 +18944,8 @@ const Cl = () => {
18932
18944
  cancelTranslation: l,
18933
18945
  recentMessagesTranslation: c
18934
18946
  };
18935
- }, Sb = ({}) => {
18936
- const { companySettings: e } = st(Hn);
18947
+ }, Cb = ({}) => {
18948
+ const { companySettings: e } = tt(mn);
18937
18949
  return /* @__PURE__ */ L(
18938
18950
  "div",
18939
18951
  {
@@ -18953,7 +18965,7 @@ const Cl = () => {
18953
18965
  )
18954
18966
  }
18955
18967
  );
18956
- }, Cb = ({
18968
+ }, Ib = ({
18957
18969
  loadingStatus: e,
18958
18970
  currentStepName: t,
18959
18971
  currentStepNumber: n,
@@ -18979,9 +18991,9 @@ const Cl = () => {
18979
18991
  r
18980
18992
  ] })
18981
18993
  ] }),
18982
- /* @__PURE__ */ L("div", { className: "flex justify-center", children: /* @__PURE__ */ L(Sb, {}) })
18994
+ /* @__PURE__ */ L("div", { className: "flex justify-center", children: /* @__PURE__ */ L(Cb, {}) })
18983
18995
  ] }) });
18984
- }, Ib = ({
18996
+ }, Nb = ({
18985
18997
  onPressLoadingButton: e
18986
18998
  }) => /* @__PURE__ */ L("div", { children: /* @__PURE__ */ L(
18987
18999
  "button",
@@ -19028,13 +19040,13 @@ const Cl = () => {
19028
19040
  }
19029
19041
  ) })
19030
19042
  }
19031
- ) }), Nb = (e) => {
19043
+ ) }), vb = (e) => {
19032
19044
  const t = xe(null), [n, r] = fe(!1), a = xe(!0), i = xe(!1), s = xe(0), o = () => {
19033
19045
  const d = t.current, f = 4;
19034
19046
  if (d) {
19035
19047
  d.scrollTop < s.current - 1 && (i.current = !1);
19036
- const m = d.scrollHeight > d.clientHeight, y = d.scrollHeight - d.scrollTop <= d.clientHeight + f;
19037
- r(m && !y), a.current = y, s.current = d.scrollTop;
19048
+ const m = d.scrollHeight > d.clientHeight, A = d.scrollHeight - d.scrollTop <= d.clientHeight + f;
19049
+ r(m && !A), a.current = A, s.current = d.scrollTop;
19038
19050
  }
19039
19051
  }, l = ({
19040
19052
  smooth: d = !1,
@@ -19067,7 +19079,7 @@ const Cl = () => {
19067
19079
  messagesContainerRef: t,
19068
19080
  showScrollButton: n
19069
19081
  };
19070
- }, vb = () => {
19082
+ }, wb = () => {
19071
19083
  const e = $n(), t = e.formatMessage({
19072
19084
  defaultMessage: "Discussion limit reached",
19073
19085
  id: "chatbot.DiscussionLimitReached.title"
@@ -19083,7 +19095,7 @@ const Cl = () => {
19083
19095
  DiscussionLimitReachedExplainationTranslation: n,
19084
19096
  DiscussionLimitReachedCtaTranslation: r
19085
19097
  };
19086
- }, wb = (e) => /* @__PURE__ */ Be.createElement("svg", { width: "800px", height: "800px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Be.createElement("g", { clipPath: "url(#clip0_1276_7761)" }, /* @__PURE__ */ Be.createElement("path", { d: "M19.7285 10.9288C20.4413 13.5978 19.7507 16.5635 17.6569 18.6573C15.1798 21.1344 11.4826 21.6475 8.5 20.1966M18.364 8.05071L17.6569 7.3436C14.5327 4.21941 9.46736 4.21941 6.34316 7.3436C3.42964 10.2571 3.23318 14.8588 5.75376 18M18.364 8.05071H14.1213M18.364 8.05071V3.80807", stroke: "#1C274C", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), /* @__PURE__ */ Be.createElement("defs", null, /* @__PURE__ */ Be.createElement("clipPath", { id: "clip0_1276_7761" }, /* @__PURE__ */ Be.createElement("rect", { width: 24, height: 24, fill: "white" })))), Ob = ({
19098
+ }, Ob = (e) => /* @__PURE__ */ Be.createElement("svg", { width: "800px", height: "800px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Be.createElement("g", { clipPath: "url(#clip0_1276_7761)" }, /* @__PURE__ */ Be.createElement("path", { d: "M19.7285 10.9288C20.4413 13.5978 19.7507 16.5635 17.6569 18.6573C15.1798 21.1344 11.4826 21.6475 8.5 20.1966M18.364 8.05071L17.6569 7.3436C14.5327 4.21941 9.46736 4.21941 6.34316 7.3436C3.42964 10.2571 3.23318 14.8588 5.75376 18M18.364 8.05071H14.1213M18.364 8.05071V3.80807", stroke: "#1C274C", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), /* @__PURE__ */ Be.createElement("defs", null, /* @__PURE__ */ Be.createElement("clipPath", { id: "clip0_1276_7761" }, /* @__PURE__ */ Be.createElement("rect", { width: 24, height: 24, fill: "white" })))), Lb = ({
19087
19099
  resetDiscussion: e,
19088
19100
  companySettings: t
19089
19101
  }) => {
@@ -19091,7 +19103,7 @@ const Cl = () => {
19091
19103
  DiscussionLimitReachedCtaTranslation: n,
19092
19104
  DiscussionLimitReachedExplainationTranslation: r,
19093
19105
  DiscussionLimitReachedTitleTranslation: a
19094
- } = vb();
19106
+ } = wb();
19095
19107
  return /* @__PURE__ */ L(vt, { children: /* @__PURE__ */ L("div", { className: "px-3 mt-4", children: /* @__PURE__ */ Te(
19096
19108
  "div",
19097
19109
  {
@@ -19137,7 +19149,7 @@ const Cl = () => {
19137
19149
  active:scale-[0.98]`,
19138
19150
  children: [
19139
19151
  /* @__PURE__ */ L(
19140
- wb,
19152
+ Ob,
19141
19153
  {
19142
19154
  "aria-hidden": "true",
19143
19155
  className: "w-5 h-5 transition-transform duration-200 group-hover:rotate-180"
@@ -19151,7 +19163,7 @@ const Cl = () => {
19151
19163
  ]
19152
19164
  }
19153
19165
  ) }) });
19154
- }, Lb = ({
19166
+ }, Rb = ({
19155
19167
  onClick: e,
19156
19168
  label: t = "voir les messages plus récents",
19157
19169
  className: n
@@ -19194,14 +19206,14 @@ const Cl = () => {
19194
19206
  )
19195
19207
  }
19196
19208
  );
19197
- }, Il = "chatsystem-widget", Rb = 1440 * 60 * 1e3;
19198
- function kb(e) {
19199
- return !(typeof e != "object" || e === null || e.userType !== "user" && e.userType !== "assistant" || "content" in e && e.content !== void 0 && typeof e.content != "string" || "metaData" in e && e.metaData !== void 0 && (typeof e.metaData != "object" || e.metaData === null || "isErrorMessage" in e.metaData && e.metaData.isErrorMessage !== void 0 && typeof e.metaData.isErrorMessage != "boolean"));
19200
- }
19209
+ }, Il = "chatsystem-widget", kb = 1440 * 60 * 1e3;
19201
19210
  function Db(e) {
19202
- return !(typeof e != "object" || e === null || !Array.isArray(e.items) || !e.items.every(kb) || e.discussionId !== null && typeof e.discussionId != "number" || typeof e.updatedAt != "string" || Number.isNaN(Date.parse(e.updatedAt)));
19211
+ return !(typeof e != "object" || e === null || e.userType !== "user" && e.userType !== "assistant" || "content" in e && e.content !== void 0 && typeof e.content != "string" || "metaData" in e && e.metaData !== void 0 && (typeof e.metaData != "object" || e.metaData === null || "isErrorMessage" in e.metaData && e.metaData.isErrorMessage !== void 0 && typeof e.metaData.isErrorMessage != "boolean"));
19203
19212
  }
19204
19213
  function Pb(e) {
19214
+ return !(typeof e != "object" || e === null || !Array.isArray(e.items) || !e.items.every(Db) || e.discussionId !== null && typeof e.discussionId != "number" || typeof e.updatedAt != "string" || Number.isNaN(Date.parse(e.updatedAt)));
19215
+ }
19216
+ function Mb(e) {
19205
19217
  if (typeof window > "u")
19206
19218
  return;
19207
19219
  const t = e.key ?? Il, n = {
@@ -19216,14 +19228,14 @@ function Pb(e) {
19216
19228
  console.error("Failed to save chat state to localStorage", r);
19217
19229
  }
19218
19230
  }
19219
- function Mb(e) {
19231
+ function Bb(e) {
19220
19232
  if (typeof window > "u")
19221
19233
  return null;
19222
19234
  const t = e?.key, n = window.localStorage.getItem(t);
19223
19235
  if (!n) return null;
19224
19236
  try {
19225
19237
  const r = JSON.parse(n);
19226
- return Db(r) ? r : (console.warn(
19238
+ return Pb(r) ? r : (console.warn(
19227
19239
  "Chat state in localStorage has unexpected shape, ignoring."
19228
19240
  ), null);
19229
19241
  } catch (r) {
@@ -19237,8 +19249,8 @@ const Nl = Le.createContext({
19237
19249
  archivedConversation: { items: [], discussionId: null },
19238
19250
  setArchivedConversation: () => {
19239
19251
  }
19240
- }), Bb = () => {
19241
- const e = st(Nl);
19252
+ }), Fb = () => {
19253
+ const e = tt(Nl);
19242
19254
  if (!e)
19243
19255
  throw new Error(
19244
19256
  "useChatbotConversation must be used within ChatbotInitialtextContext.Provider"
@@ -19249,19 +19261,19 @@ const Nl = Le.createContext({
19249
19261
  archivedConversation: r,
19250
19262
  setArchivedConversation: a
19251
19263
  } = e, i = (C) => {
19252
- n((x) => ({
19253
- ...x,
19264
+ n((y) => ({
19265
+ ...y,
19254
19266
  discussionId: C
19255
19267
  }));
19256
19268
  }, s = (C) => {
19257
- n((x) => ({
19258
- ...x,
19269
+ n((y) => ({
19270
+ ...y,
19259
19271
  items: C
19260
19272
  }));
19261
19273
  }, o = (C) => {
19262
- n((x) => ({
19263
- ...x,
19264
- items: [...x.items, C]
19274
+ n((y) => ({
19275
+ ...y,
19276
+ items: [...y.items, C]
19265
19277
  }));
19266
19278
  }, l = () => {
19267
19279
  n((C) => ({
@@ -19278,20 +19290,20 @@ const Nl = Le.createContext({
19278
19290
  n((C) => ({
19279
19291
  ...C,
19280
19292
  items: C.items.filter(
19281
- (x) => !(x.content?.length === 0 && x.userType === "assistant")
19293
+ (y) => !(y.content?.length === 0 && y.userType === "assistant")
19282
19294
  )
19283
19295
  }));
19284
19296
  }, d = () => {
19285
19297
  n((C) => {
19286
- const x = [...C.items];
19287
- return x.pop(), {
19298
+ const y = [...C.items];
19299
+ return y.pop(), {
19288
19300
  ...C,
19289
- items: x
19301
+ items: y
19290
19302
  };
19291
19303
  });
19292
19304
  }, f = (C) => {
19293
- n((x) => ({
19294
- ...x,
19305
+ n((y) => ({
19306
+ ...y,
19295
19307
  updatedAt: C.updatedAt
19296
19308
  }));
19297
19309
  }, h = (C) => {
@@ -19323,14 +19335,14 @@ const Nl = Le.createContext({
19323
19335
  removeEmptyAssistantMessageFromCurrentConversation: c,
19324
19336
  addEmptyAssistantMessageToCurrentConversation: l,
19325
19337
  removeLastMessageFromCurrentConversation: d,
19326
- updateCurrentConversationLastMessage: (C, x) => {
19338
+ updateCurrentConversationLastMessage: (C, y) => {
19327
19339
  n((O) => {
19328
19340
  const I = [...O.items], M = I.length - 1, S = I[M];
19329
19341
  return I[M] = {
19330
19342
  ...S,
19331
19343
  content: S.content = C,
19332
19344
  metaData: {
19333
- isErrorMessage: x
19345
+ isErrorMessage: y
19334
19346
  }
19335
19347
  }, { ...O, items: I };
19336
19348
  });
@@ -19340,7 +19352,7 @@ const Nl = Le.createContext({
19340
19352
  n(r), m();
19341
19353
  }
19342
19354
  };
19343
- }, Fb = ({
19355
+ }, Hb = ({
19344
19356
  message: e,
19345
19357
  actionLabel: t,
19346
19358
  onClick: n
@@ -19378,23 +19390,23 @@ const vl = ({
19378
19390
  addMessageToCurrentConversation: f,
19379
19391
  removeEmptyAssistantMessageFromCurrentConversation: h,
19380
19392
  removeLastMessageFromCurrentConversation: m,
19381
- resetConversation: y,
19382
- setCurrentConversationId: A,
19393
+ resetConversation: A,
19394
+ setCurrentConversationId: x,
19383
19395
  updateCurrentConversationLastMessage: C,
19384
- archivedConversation: x,
19396
+ archivedConversation: y,
19385
19397
  setArchivedConversationAsMain: O
19386
- } = Bb(), [I, M] = fe("notLoading"), { defaultStartingStep: S, recentMessagesTranslation: w } = Cl(), [Q, oe] = fe(
19398
+ } = Fb(), [I, M] = fe("notLoading"), { defaultStartingStep: S, recentMessagesTranslation: w } = Cl(), [Q, oe] = fe(
19387
19399
  null
19388
19400
  ), [ae, Y] = fe(
19389
19401
  S
19390
19402
  ), [U, B] = fe(
19391
19403
  null
19392
- ), { companySettings: z } = st(Hn), { appCurrentLang: $ } = st(_l), K = I !== "notLoading" || (c?.items?.length ?? 0) > 0, [le, pe] = fe(!0), Oe = !!x && (x.items?.length ?? 0) > 0, He = () => {
19404
+ ), { companySettings: z } = tt(mn), { appCurrentLang: $ } = tt(_l), K = I !== "notLoading" || (c?.items?.length ?? 0) > 0, [le, pe] = fe(!0), Oe = !!y && (y.items?.length ?? 0) > 0, He = () => {
19393
19405
  O(), pe(!1);
19394
19406
  }, p = xe(I);
19395
19407
  Ce(() => {
19396
19408
  const X = p.current, Z = I;
19397
- X !== "notLoading" && Z === "notLoading" && c.discussionId !== null && c?.items.length > 0 && Pb({
19409
+ X !== "notLoading" && Z === "notLoading" && c.discussionId !== null && c?.items.length > 0 && Mb({
19398
19410
  conversation: c
19399
19411
  }), p.current = Z;
19400
19412
  }, [
@@ -19410,23 +19422,23 @@ const vl = ({
19410
19422
  height: "250px"
19411
19423
  //TODO overridable with custom css
19412
19424
  }
19413
- }, q = Ab(c.items) >= z?.api?.settings?.maxUserMessagesPerDiscussion, {
19425
+ }, q = xb(c.items) >= z?.api?.settings?.maxUserMessagesPerDiscussion, {
19414
19426
  scrollToBottom: b,
19415
19427
  showScrollButton: W,
19416
19428
  messagesContainerRef: J,
19417
19429
  removeStickyNess: G
19418
- } = Nb(c.items), ee = () => {
19430
+ } = vb(c.items), ee = () => {
19419
19431
  ir.abort("Cancelling stream on purpose."), console.log("Stream request aborted"), M("notLoading"), h();
19420
19432
  }, te = async (X) => {
19421
19433
  M("loadingIntermediaryStates");
19422
- const Z = Fn.getApiUrl(), Ne = {
19434
+ const Z = Hn.getApiUrl(), Ne = {
19423
19435
  query: X,
19424
19436
  language: $.locale
19425
19437
  };
19426
19438
  d(), requestAnimationFrame(
19427
19439
  () => b({ smooth: !1, sticky: !1 })
19428
19440
  ), c?.discussionId && (Ne.discussionId = c.discussionId);
19429
- const H = ir.signal, Pe = Fn.getFetchConfig({
19441
+ const H = ir.signal, Pe = Hn.getFetchConfig({
19430
19442
  httpVerb: "POST",
19431
19443
  body: Ne,
19432
19444
  contentType: "application/json",
@@ -19438,7 +19450,7 @@ const vl = ({
19438
19450
  const dt = Fe?.body?.getReader(), Ft = new TextDecoder();
19439
19451
  let Ue = "", Ct = "", ft = !1, ce = !1, _e = null;
19440
19452
  const Ae = Fe.headers.get("discussionId"), ye = parseInt(Ae, 10);
19441
- A(ye), await new ReadableStream({
19453
+ x(ye), await new ReadableStream({
19442
19454
  start(N) {
19443
19455
  return D();
19444
19456
  async function D() {
@@ -19465,11 +19477,11 @@ const vl = ({
19465
19477
  content: ke,
19466
19478
  isLastAnswer: Ve,
19467
19479
  streamSourceUuid: It,
19468
- shouldStopStream: tt
19480
+ shouldStopStream: nt
19469
19481
  } = je;
19470
- _e && _e !== It && (Ue += '<span style="display:block;height:1rem;"></span>'), _e = It, (Ve || tt) && (ce = !0), N.enqueue(ke), yb(ke) ? (Ct += ke, Ue += Ct, Ct = "", ft = !1) : ft || Tb(ke) ? (Ct += ke, ft = !0) : Ue += ke, C(
19482
+ _e && _e !== It && (Ue += '<span style="display:block;height:1rem;"></span>'), _e = It, (Ve || nt) && (ce = !0), N.enqueue(ke), Ab(ke) ? (Ct += ke, Ue += Ct, Ct = "", ft = !1) : ft || yb(ke) ? (Ct += ke, ft = !0) : Ue += ke, C(
19471
19483
  Ue,
19472
- tt
19484
+ nt
19473
19485
  );
19474
19486
  } else if (en.isObjectOutputstreamLoadingCurrentStepNumberDTO(
19475
19487
  je
@@ -19522,7 +19534,7 @@ const vl = ({
19522
19534
  ref: J,
19523
19535
  children: [
19524
19536
  c.items.map((X, Z) => /* @__PURE__ */ L(
19525
- sg,
19537
+ ug,
19526
19538
  {
19527
19539
  content: X.content,
19528
19540
  userType: X.userType,
@@ -19537,7 +19549,7 @@ const vl = ({
19537
19549
  Z
19538
19550
  )),
19539
19551
  /* @__PURE__ */ L(
19540
- Cb,
19552
+ Ib,
19541
19553
  {
19542
19554
  currentStepName: ae,
19543
19555
  currentStepNumber: U,
@@ -19549,7 +19561,7 @@ const vl = ({
19549
19561
  }
19550
19562
  ),
19551
19563
  W && /* @__PURE__ */ L(
19552
- Lb,
19564
+ Rb,
19553
19565
  {
19554
19566
  label: w,
19555
19567
  onClick: () => b({
@@ -19559,14 +19571,14 @@ const vl = ({
19559
19571
  }
19560
19572
  ),
19561
19573
  q && /* @__PURE__ */ L(
19562
- Ob,
19574
+ Lb,
19563
19575
  {
19564
- resetDiscussion: y,
19576
+ resetDiscussion: A,
19565
19577
  companySettings: z
19566
19578
  }
19567
19579
  ),
19568
19580
  Oe && le && /* @__PURE__ */ L(
19569
- Fb,
19581
+ Hb,
19570
19582
  {
19571
19583
  actionLabel: l,
19572
19584
  message: o,
@@ -19574,17 +19586,17 @@ const vl = ({
19574
19586
  }
19575
19587
  ),
19576
19588
  /* @__PURE__ */ L("div", { className: "flex-shrink-0", children: /* @__PURE__ */ L(
19577
- hb,
19589
+ mb,
19578
19590
  {
19579
19591
  classNameTextarea: "",
19580
19592
  classNameContainer: "relative mt-6 mt-3 border-slate-400 border-[1px] rounded-lg p-1",
19581
- SubmitComponent: mb,
19593
+ SubmitComponent: pb,
19582
19594
  isDisabled: I !== "notLoading" || q,
19583
19595
  shouldDisableIfInputIsEmpty: !0,
19584
19596
  "aria-label": "TextArea For Bot Conversation",
19585
19597
  onSubmit: (X) => {
19586
- if (pe(!1), xb(X)) {
19587
- const Z = _b(
19598
+ if (pe(!1), _b(X)) {
19599
+ const Z = Sb(
19588
19600
  X,
19589
19601
  c.discussionId
19590
19602
  );
@@ -19607,7 +19619,7 @@ const vl = ({
19607
19619
  placeholder: r,
19608
19620
  autoFocus: !0,
19609
19621
  isLoadingStream: I === "loadingFinalAnswer" || I === "loadingIntermediaryStates",
19610
- LoadingComponent: Ib,
19622
+ LoadingComponent: Nb,
19611
19623
  onPressLoadingButton: ee
19612
19624
  }
19613
19625
  ) })
@@ -19647,7 +19659,7 @@ object-assign
19647
19659
  @license MIT
19648
19660
  */
19649
19661
  var oa, eu;
19650
- function Hb() {
19662
+ function Ub() {
19651
19663
  if (eu) return oa;
19652
19664
  eu = 1;
19653
19665
  var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable;
@@ -19704,7 +19716,7 @@ function Ll() {
19704
19716
  return nu || (nu = 1, ca = Function.call.bind(Object.prototype.hasOwnProperty)), ca;
19705
19717
  }
19706
19718
  var da, ru;
19707
- function Ub() {
19719
+ function $b() {
19708
19720
  if (ru) return da;
19709
19721
  ru = 1;
19710
19722
  var e = function() {
@@ -19733,8 +19745,8 @@ function Ub() {
19733
19745
  throw h.name = "Invariant Violation", h;
19734
19746
  }
19735
19747
  f = i[d](s, d, l, o, null, t);
19736
- } catch (y) {
19737
- f = y;
19748
+ } catch (A) {
19749
+ f = A;
19738
19750
  }
19739
19751
  if (f && !(f instanceof Error) && e(
19740
19752
  (l || "React class") + ": type specification of " + o + " `" + d + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof f + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
@@ -19753,10 +19765,10 @@ function Ub() {
19753
19765
  }, da = a, da;
19754
19766
  }
19755
19767
  var fa, au;
19756
- function $b() {
19768
+ function zb() {
19757
19769
  if (au) return fa;
19758
19770
  au = 1;
19759
- var e = qa(), t = Hb(), n = /* @__PURE__ */ bi(), r = /* @__PURE__ */ Ll(), a = /* @__PURE__ */ Ub(), i = function() {
19771
+ var e = qa(), t = Ub(), n = /* @__PURE__ */ bi(), r = /* @__PURE__ */ Ll(), a = /* @__PURE__ */ $b(), i = function() {
19760
19772
  };
19761
19773
  process.env.NODE_ENV !== "production" && (i = function(o) {
19762
19774
  var l = "Warning: " + o;
@@ -19777,14 +19789,14 @@ function $b() {
19777
19789
  return F;
19778
19790
  }
19779
19791
  var h = "<<anonymous>>", m = {
19780
- array: x("array"),
19781
- bigint: x("bigint"),
19782
- bool: x("boolean"),
19783
- func: x("function"),
19784
- number: x("number"),
19785
- object: x("object"),
19786
- string: x("string"),
19787
- symbol: x("symbol"),
19792
+ array: y("array"),
19793
+ bigint: y("bigint"),
19794
+ bool: y("boolean"),
19795
+ func: y("function"),
19796
+ number: y("number"),
19797
+ object: y("object"),
19798
+ string: y("string"),
19799
+ symbol: y("symbol"),
19788
19800
  any: O(),
19789
19801
  arrayOf: I,
19790
19802
  element: M(),
@@ -19797,13 +19809,13 @@ function $b() {
19797
19809
  shape: B,
19798
19810
  exact: z
19799
19811
  };
19800
- function y(p, F) {
19812
+ function A(p, F) {
19801
19813
  return p === F ? p !== 0 || 1 / p === 1 / F : p !== p && F !== F;
19802
19814
  }
19803
- function A(p, F) {
19815
+ function x(p, F) {
19804
19816
  this.message = p, this.data = F && typeof F == "object" ? F : {}, this.stack = "";
19805
19817
  }
19806
- A.prototype = Error.prototype;
19818
+ x.prototype = Error.prototype;
19807
19819
  function C(p) {
19808
19820
  if (process.env.NODE_ENV !== "production")
19809
19821
  var F = {}, q = 0;
@@ -19822,17 +19834,17 @@ function $b() {
19822
19834
  ), F[Pe] = !0, q++);
19823
19835
  }
19824
19836
  }
19825
- return G[ee] == null ? J ? G[ee] === null ? new A("The " + X + " `" + Z + "` is marked as required " + ("in `" + te + "`, but its value is `null`.")) : new A("The " + X + " `" + Z + "` is marked as required in " + ("`" + te + "`, but its value is `undefined`.")) : null : p(G, ee, te, X, Z);
19837
+ return G[ee] == null ? J ? G[ee] === null ? new x("The " + X + " `" + Z + "` is marked as required " + ("in `" + te + "`, but its value is `null`.")) : new x("The " + X + " `" + Z + "` is marked as required in " + ("`" + te + "`, but its value is `undefined`.")) : null : p(G, ee, te, X, Z);
19826
19838
  }
19827
19839
  var W = b.bind(null, !1);
19828
19840
  return W.isRequired = b.bind(null, !0), W;
19829
19841
  }
19830
- function x(p) {
19842
+ function y(p) {
19831
19843
  function F(q, b, W, J, G, ee) {
19832
19844
  var te = q[b], X = le(te);
19833
19845
  if (X !== p) {
19834
19846
  var Z = pe(te);
19835
- return new A(
19847
+ return new x(
19836
19848
  "Invalid " + J + " `" + G + "` of type " + ("`" + Z + "` supplied to `" + W + "`, expected ") + ("`" + p + "`."),
19837
19849
  { expectedType: p }
19838
19850
  );
@@ -19847,11 +19859,11 @@ function $b() {
19847
19859
  function I(p) {
19848
19860
  function F(q, b, W, J, G) {
19849
19861
  if (typeof p != "function")
19850
- return new A("Property `" + G + "` of component `" + W + "` has invalid PropType notation inside arrayOf.");
19862
+ return new x("Property `" + G + "` of component `" + W + "` has invalid PropType notation inside arrayOf.");
19851
19863
  var ee = q[b];
19852
19864
  if (!Array.isArray(ee)) {
19853
19865
  var te = le(ee);
19854
- return new A("Invalid " + J + " `" + G + "` of type " + ("`" + te + "` supplied to `" + W + "`, expected an array."));
19866
+ return new x("Invalid " + J + " `" + G + "` of type " + ("`" + te + "` supplied to `" + W + "`, expected an array."));
19855
19867
  }
19856
19868
  for (var X = 0; X < ee.length; X++) {
19857
19869
  var Z = p(ee, X, W, J, G + "[" + X + "]", n);
@@ -19867,7 +19879,7 @@ function $b() {
19867
19879
  var G = F[q];
19868
19880
  if (!o(G)) {
19869
19881
  var ee = le(G);
19870
- return new A("Invalid " + W + " `" + J + "` of type " + ("`" + ee + "` supplied to `" + b + "`, expected a single ReactElement."));
19882
+ return new x("Invalid " + W + " `" + J + "` of type " + ("`" + ee + "` supplied to `" + b + "`, expected a single ReactElement."));
19871
19883
  }
19872
19884
  return null;
19873
19885
  }
@@ -19878,7 +19890,7 @@ function $b() {
19878
19890
  var G = F[q];
19879
19891
  if (!e.isValidElementType(G)) {
19880
19892
  var ee = le(G);
19881
- return new A("Invalid " + W + " `" + J + "` of type " + ("`" + ee + "` supplied to `" + b + "`, expected a single ReactElement type."));
19893
+ return new x("Invalid " + W + " `" + J + "` of type " + ("`" + ee + "` supplied to `" + b + "`, expected a single ReactElement type."));
19882
19894
  }
19883
19895
  return null;
19884
19896
  }
@@ -19888,7 +19900,7 @@ function $b() {
19888
19900
  function F(q, b, W, J, G) {
19889
19901
  if (!(q[b] instanceof p)) {
19890
19902
  var ee = p.name || h, te = He(q[b]);
19891
- return new A("Invalid " + J + " `" + G + "` of type " + ("`" + te + "` supplied to `" + W + "`, expected ") + ("instance of `" + ee + "`."));
19903
+ return new x("Invalid " + J + " `" + G + "` of type " + ("`" + te + "` supplied to `" + W + "`, expected ") + ("instance of `" + ee + "`."));
19892
19904
  }
19893
19905
  return null;
19894
19906
  }
@@ -19901,23 +19913,23 @@ function $b() {
19901
19913
  ) : i("Invalid argument supplied to oneOf, expected an array.")), s;
19902
19914
  function F(q, b, W, J, G) {
19903
19915
  for (var ee = q[b], te = 0; te < p.length; te++)
19904
- if (y(ee, p[te]))
19916
+ if (A(ee, p[te]))
19905
19917
  return null;
19906
19918
  var X = JSON.stringify(p, function(Ne, H) {
19907
19919
  var Pe = pe(H);
19908
19920
  return Pe === "symbol" ? String(H) : H;
19909
19921
  });
19910
- return new A("Invalid " + J + " `" + G + "` of value `" + String(ee) + "` " + ("supplied to `" + W + "`, expected one of " + X + "."));
19922
+ return new x("Invalid " + J + " `" + G + "` of value `" + String(ee) + "` " + ("supplied to `" + W + "`, expected one of " + X + "."));
19911
19923
  }
19912
19924
  return C(F);
19913
19925
  }
19914
19926
  function oe(p) {
19915
19927
  function F(q, b, W, J, G) {
19916
19928
  if (typeof p != "function")
19917
- return new A("Property `" + G + "` of component `" + W + "` has invalid PropType notation inside objectOf.");
19929
+ return new x("Property `" + G + "` of component `" + W + "` has invalid PropType notation inside objectOf.");
19918
19930
  var ee = q[b], te = le(ee);
19919
19931
  if (te !== "object")
19920
- return new A("Invalid " + J + " `" + G + "` of type " + ("`" + te + "` supplied to `" + W + "`, expected an object."));
19932
+ return new x("Invalid " + J + " `" + G + "` of type " + ("`" + te + "` supplied to `" + W + "`, expected an object."));
19921
19933
  for (var X in ee)
19922
19934
  if (r(ee, X)) {
19923
19935
  var Z = p(ee, X, W, J, G + "." + X, n);
@@ -19946,18 +19958,18 @@ function $b() {
19946
19958
  H.data && r(H.data, "expectedType") && X.push(H.data.expectedType);
19947
19959
  }
19948
19960
  var Pe = X.length > 0 ? ", expected one of type [" + X.join(", ") + "]" : "";
19949
- return new A("Invalid " + ee + " `" + te + "` supplied to " + ("`" + G + "`" + Pe + "."));
19961
+ return new x("Invalid " + ee + " `" + te + "` supplied to " + ("`" + G + "`" + Pe + "."));
19950
19962
  }
19951
19963
  return C(b);
19952
19964
  }
19953
19965
  function Y() {
19954
19966
  function p(F, q, b, W, J) {
19955
- return $(F[q]) ? null : new A("Invalid " + W + " `" + J + "` supplied to " + ("`" + b + "`, expected a ReactNode."));
19967
+ return $(F[q]) ? null : new x("Invalid " + W + " `" + J + "` supplied to " + ("`" + b + "`, expected a ReactNode."));
19956
19968
  }
19957
19969
  return C(p);
19958
19970
  }
19959
19971
  function U(p, F, q, b, W) {
19960
- return new A(
19972
+ return new x(
19961
19973
  (p || "React class") + ": " + F + " type `" + q + "." + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + W + "`."
19962
19974
  );
19963
19975
  }
@@ -19965,7 +19977,7 @@ function $b() {
19965
19977
  function F(q, b, W, J, G) {
19966
19978
  var ee = q[b], te = le(ee);
19967
19979
  if (te !== "object")
19968
- return new A("Invalid " + J + " `" + G + "` of type `" + te + "` " + ("supplied to `" + W + "`, expected `object`."));
19980
+ return new x("Invalid " + J + " `" + G + "` of type `" + te + "` " + ("supplied to `" + W + "`, expected `object`."));
19969
19981
  for (var X in p) {
19970
19982
  var Z = p[X];
19971
19983
  if (typeof Z != "function")
@@ -19982,14 +19994,14 @@ function $b() {
19982
19994
  function F(q, b, W, J, G) {
19983
19995
  var ee = q[b], te = le(ee);
19984
19996
  if (te !== "object")
19985
- return new A("Invalid " + J + " `" + G + "` of type `" + te + "` " + ("supplied to `" + W + "`, expected `object`."));
19997
+ return new x("Invalid " + J + " `" + G + "` of type `" + te + "` " + ("supplied to `" + W + "`, expected `object`."));
19986
19998
  var X = t({}, q[b], p);
19987
19999
  for (var Z in X) {
19988
20000
  var Ne = p[Z];
19989
20001
  if (r(p, Z) && typeof Ne != "function")
19990
20002
  return U(W, J, G, Z, pe(Ne));
19991
20003
  if (!Ne)
19992
- return new A(
20004
+ return new x(
19993
20005
  "Invalid " + J + " `" + G + "` key `" + Z + "` supplied to `" + W + "`.\nBad object: " + JSON.stringify(q[b], null, " ") + `
19994
20006
  Valid keys: ` + JSON.stringify(Object.keys(p), null, " ")
19995
20007
  );
@@ -20074,7 +20086,7 @@ Valid keys: ` + JSON.stringify(Object.keys(p), null, " ")
20074
20086
  }, fa;
20075
20087
  }
20076
20088
  var ha, iu;
20077
- function zb() {
20089
+ function Yb() {
20078
20090
  if (iu) return ha;
20079
20091
  iu = 1;
20080
20092
  var e = /* @__PURE__ */ bi();
@@ -20122,37 +20134,37 @@ function zb() {
20122
20134
  }, ha;
20123
20135
  }
20124
20136
  var su;
20125
- function Yb() {
20137
+ function Gb() {
20126
20138
  if (su) return sr.exports;
20127
20139
  if (su = 1, process.env.NODE_ENV !== "production") {
20128
20140
  var e = qa(), t = !0;
20129
- sr.exports = /* @__PURE__ */ $b()(e.isElement, t);
20141
+ sr.exports = /* @__PURE__ */ zb()(e.isElement, t);
20130
20142
  } else
20131
- sr.exports = /* @__PURE__ */ zb()();
20143
+ sr.exports = /* @__PURE__ */ Yb()();
20132
20144
  return sr.exports;
20133
20145
  }
20134
- var Gb = /* @__PURE__ */ Yb();
20135
- const re = /* @__PURE__ */ ja(Gb);
20136
- function jb(e, t) {
20146
+ var jb = /* @__PURE__ */ Gb();
20147
+ const re = /* @__PURE__ */ ja(jb);
20148
+ function Vb(e, t) {
20137
20149
  return e.classList ? !!t && e.classList.contains(t) : (" " + (e.className.baseVal || e.className) + " ").indexOf(" " + t + " ") !== -1;
20138
20150
  }
20139
- function Vb(e, t) {
20140
- e.classList ? e.classList.add(t) : jb(e, t) || (typeof e.className == "string" ? e.className = e.className + " " + t : e.setAttribute("class", (e.className && e.className.baseVal || "") + " " + t));
20151
+ function qb(e, t) {
20152
+ e.classList ? e.classList.add(t) : Vb(e, t) || (typeof e.className == "string" ? e.className = e.className + " " + t : e.setAttribute("class", (e.className && e.className.baseVal || "") + " " + t));
20141
20153
  }
20142
20154
  function uu(e, t) {
20143
20155
  return e.replace(new RegExp("(^|\\s)" + t + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
20144
20156
  }
20145
- function qb(e, t) {
20157
+ function Wb(e, t) {
20146
20158
  e.classList ? e.classList.remove(t) : typeof e.className == "string" ? e.className = uu(e.className, t) : e.setAttribute("class", uu(e.className && e.className.baseVal || "", t));
20147
20159
  }
20148
20160
  const ou = {
20149
20161
  disabled: !1
20150
20162
  };
20151
- var Wb = process.env.NODE_ENV !== "production" ? re.oneOfType([re.number, re.shape({
20163
+ var Xb = process.env.NODE_ENV !== "production" ? re.oneOfType([re.number, re.shape({
20152
20164
  enter: re.number,
20153
20165
  exit: re.number,
20154
20166
  appear: re.number
20155
- }).isRequired]) : null, Xb = process.env.NODE_ENV !== "production" ? re.oneOfType([re.string, re.shape({
20167
+ }).isRequired]) : null, Qb = process.env.NODE_ENV !== "production" ? re.oneOfType([re.string, re.shape({
20156
20168
  enter: re.string,
20157
20169
  exit: re.string,
20158
20170
  active: re.string
@@ -20167,19 +20179,19 @@ var Wb = process.env.NODE_ENV !== "production" ? re.oneOfType([re.number, re.sha
20167
20179
  const Rl = Le.createContext(null);
20168
20180
  var kl = function(t) {
20169
20181
  return t.scrollTop;
20170
- }, In = "unmounted", $t = "exited", zt = "entering", rn = "entered", Ga = "exiting", St = /* @__PURE__ */ (function(e) {
20182
+ }, Nn = "unmounted", $t = "exited", zt = "entering", rn = "entered", Ga = "exiting", St = /* @__PURE__ */ (function(e) {
20171
20183
  Ol(t, e);
20172
20184
  function t(r, a) {
20173
20185
  var i;
20174
20186
  i = e.call(this, r, a) || this;
20175
20187
  var s = a, o = s && !s.isMounting ? r.enter : r.appear, l;
20176
- return i.appearStatus = null, r.in ? o ? (l = $t, i.appearStatus = zt) : l = rn : r.unmountOnExit || r.mountOnEnter ? l = In : l = $t, i.state = {
20188
+ return i.appearStatus = null, r.in ? o ? (l = $t, i.appearStatus = zt) : l = rn : r.unmountOnExit || r.mountOnEnter ? l = Nn : l = $t, i.state = {
20177
20189
  status: l
20178
20190
  }, i.nextCallback = null, i;
20179
20191
  }
20180
20192
  t.getDerivedStateFromProps = function(a, i) {
20181
20193
  var s = a.in;
20182
- return s && i.status === In ? {
20194
+ return s && i.status === Nn ? {
20183
20195
  status: $t
20184
20196
  } : null;
20185
20197
  };
@@ -20213,7 +20225,7 @@ var kl = function(t) {
20213
20225
  } else
20214
20226
  this.performExit();
20215
20227
  else this.props.unmountOnExit && this.state.status === $t && this.setState({
20216
- status: In
20228
+ status: Nn
20217
20229
  });
20218
20230
  }, n.performEnter = function(a) {
20219
20231
  var i = this, s = this.props.enter, o = this.context ? this.context.isMounting : a, l = this.props.nodeRef ? [o] : [Xn.findDOMNode(this), o], c = l[0], d = l[1], f = this.getTimeouts(), h = o ? f.appear : f.enter;
@@ -20282,7 +20294,7 @@ var kl = function(t) {
20282
20294
  a != null && setTimeout(this.nextCallback, a);
20283
20295
  }, n.render = function() {
20284
20296
  var a = this.state.status;
20285
- if (a === In)
20297
+ if (a === Nn)
20286
20298
  return null;
20287
20299
  var i = this.props, s = i.children;
20288
20300
  i.in, i.mountOnEnter, i.unmountOnExit, i.appear, i.enter, i.exit, i.timeout, i.addEndListener, i.onEnter, i.onEntering, i.onEntered, i.onExit, i.onExiting, i.onExited, i.nodeRef;
@@ -20392,7 +20404,7 @@ St.propTypes = process.env.NODE_ENV !== "production" ? {
20392
20404
  * @type {number | { enter?: number, exit?: number, appear?: number }}
20393
20405
  */
20394
20406
  timeout: function(t) {
20395
- var n = Wb;
20407
+ var n = Xb;
20396
20408
  t.addEndListener || (n = n.isRequired);
20397
20409
  for (var r = arguments.length, a = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
20398
20410
  a[i - 1] = arguments[i];
@@ -20481,18 +20493,18 @@ St.defaultProps = {
20481
20493
  onExiting: tn,
20482
20494
  onExited: tn
20483
20495
  };
20484
- St.UNMOUNTED = In;
20496
+ St.UNMOUNTED = Nn;
20485
20497
  St.EXITED = $t;
20486
20498
  St.ENTERING = zt;
20487
20499
  St.ENTERED = rn;
20488
20500
  St.EXITING = Ga;
20489
- var Qb = function(t, n) {
20501
+ var Kb = function(t, n) {
20490
20502
  return t && n && n.split(" ").forEach(function(r) {
20491
- return Vb(t, r);
20503
+ return qb(t, r);
20492
20504
  });
20493
20505
  }, ma = function(t, n) {
20494
20506
  return t && n && n.split(" ").forEach(function(r) {
20495
- return qb(t, r);
20507
+ return Wb(t, r);
20496
20508
  });
20497
20509
  }, Ti = /* @__PURE__ */ (function(e) {
20498
20510
  Ol(t, e);
@@ -20535,7 +20547,7 @@ var Qb = function(t, n) {
20535
20547
  var n = t.prototype;
20536
20548
  return n.addClass = function(a, i, s) {
20537
20549
  var o = this.getClassNames(i)[s + "ClassName"], l = this.getClassNames("enter"), c = l.doneClassName;
20538
- i === "appear" && s === "done" && c && (o += " " + c), s === "active" && a && kl(a), o && (this.appliedClasses[i][s] = o, Qb(a, o));
20550
+ i === "appear" && s === "done" && c && (o += " " + c), s === "active" && a && kl(a), o && (this.appliedClasses[i][s] = o, Kb(a, o));
20539
20551
  }, n.removeClasses = function(a, i) {
20540
20552
  var s = this.appliedClasses[i], o = s.base, l = s.active, c = s.done;
20541
20553
  this.appliedClasses[i] = {}, o && ma(a, o), l && ma(a, l), c && ma(a, c);
@@ -20625,7 +20637,7 @@ Ti.propTypes = process.env.NODE_ENV !== "production" ? xr({}, St.propTypes, {
20625
20637
  * exitDone?: string,
20626
20638
  * }}
20627
20639
  */
20628
- classNames: Xb,
20640
+ classNames: Qb,
20629
20641
  /**
20630
20642
  * A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is
20631
20643
  * applied.
@@ -20680,7 +20692,7 @@ Ti.propTypes = process.env.NODE_ENV !== "production" ? xr({}, St.propTypes, {
20680
20692
  */
20681
20693
  onExited: re.func
20682
20694
  }) : {};
20683
- const Kb = ({ setIsWidgetOpen: e }) => /* @__PURE__ */ L(vt, { children: /* @__PURE__ */ L(
20695
+ const Zb = ({ setIsWidgetOpen: e }) => /* @__PURE__ */ L(vt, { children: /* @__PURE__ */ L(
20684
20696
  "button",
20685
20697
  {
20686
20698
  type: "button",
@@ -20720,7 +20732,7 @@ const Kb = ({ setIsWidgetOpen: e }) => /* @__PURE__ */ L(vt, { children: /* @__P
20720
20732
  }
20721
20733
  )
20722
20734
  }
20723
- ) }), Zb = cu(
20735
+ ) }), Jb = cu(
20724
20736
  ({ props: e }, t) => /* @__PURE__ */ Te(
20725
20737
  "div",
20726
20738
  {
@@ -20742,7 +20754,7 @@ const Kb = ({ setIsWidgetOpen: e }) => /* @__PURE__ */ L(vt, { children: /* @__P
20742
20754
  className: "relative bg-violet-700 py-2 text-white text-center flex justify-center items-center",
20743
20755
  children: [
20744
20756
  /* @__PURE__ */ L("span", { className: "font-medium", children: "Assistant" }),
20745
- /* @__PURE__ */ L(Kb, { setIsWidgetOpen: e.setIsWidgetOpen })
20757
+ /* @__PURE__ */ L(Zb, { setIsWidgetOpen: e.setIsWidgetOpen })
20746
20758
  ]
20747
20759
  }
20748
20760
  ),
@@ -20750,7 +20762,7 @@ const Kb = ({ setIsWidgetOpen: e }) => /* @__PURE__ */ L(vt, { children: /* @__P
20750
20762
  ]
20751
20763
  }
20752
20764
  )
20753
- ), Jb = ({
20765
+ ), eT = ({
20754
20766
  isWidgetOpen: e,
20755
20767
  appToken: t,
20756
20768
  setIsWidgetOpen: n
@@ -20764,13 +20776,13 @@ const Kb = ({ setIsWidgetOpen: e }) => /* @__PURE__ */ L(vt, { children: /* @__P
20764
20776
  timeout: 200,
20765
20777
  classNames: "menuTransition",
20766
20778
  unmountOnExit: !0,
20767
- children: /* @__PURE__ */ L(Zb, { ref: r, props: { appToken: t, setIsWidgetOpen: n } })
20779
+ children: /* @__PURE__ */ L(Jb, { ref: r, props: { appToken: t, setIsWidgetOpen: n } })
20768
20780
  }
20769
20781
  ) });
20770
20782
  }, Dl = () => ({
20771
20783
  hasFetchedSettings: !1,
20772
20784
  hasDisplayedCSS: !1
20773
- }), eT = () => {
20785
+ }), tT = () => {
20774
20786
  const [e, t] = fe(Dl());
20775
20787
  return {
20776
20788
  appInternalContext: e,
@@ -20794,8 +20806,8 @@ const Kb = ({ setIsWidgetOpen: e }) => /* @__PURE__ */ L(vt, { children: /* @__P
20794
20806
  },
20795
20807
  setHasFetchedSettings: () => {
20796
20808
  }
20797
- }), tT = ({ displayMode: e, appToken: t }) => {
20798
- const [n, r] = fe(!1), { appInternalContext: a } = st(Pl);
20809
+ }), nT = ({ displayMode: e, appToken: t }) => {
20810
+ const [n, r] = fe(!1), { appInternalContext: a } = tt(Pl);
20799
20811
  return /* @__PURE__ */ Te(vt, { children: [
20800
20812
  e === hn.LAUNCHER && a.hasFetchedSettings && /* @__PURE__ */ Te(vt, { children: [
20801
20813
  /* @__PURE__ */ L(
@@ -20806,7 +20818,7 @@ const Kb = ({ setIsWidgetOpen: e }) => /* @__PURE__ */ L(vt, { children: /* @__P
20806
20818
  }
20807
20819
  ),
20808
20820
  /* @__PURE__ */ L(
20809
- Jb,
20821
+ eT,
20810
20822
  {
20811
20823
  isWidgetOpen: n,
20812
20824
  appToken: t,
@@ -20816,39 +20828,39 @@ const Kb = ({ setIsWidgetOpen: e }) => /* @__PURE__ */ L(vt, { children: /* @__P
20816
20828
  ] }),
20817
20829
  e === hn.CHATBOX && a.hasFetchedSettings && /* @__PURE__ */ L("div", { className: "chatBox", children: /* @__PURE__ */ L(vl, { appToken: t }) })
20818
20830
  ] });
20819
- }, nT = (e) => Object.values(hn).includes(e), rT = (e) => nT(e) ? e : (console.warn(
20831
+ }, rT = (e) => Object.values(hn).includes(e), aT = (e) => rT(e) ? e : (console.warn(
20820
20832
  `Display mode not valid. Using ${hn.LAUNCHER} as default.`
20821
- ), hn.LAUNCHER), aT = (e, t) => {
20833
+ ), hn.LAUNCHER), iT = (e, t) => {
20822
20834
  let n, r;
20823
20835
  return typeof window < "u" && (r = window.localStorage.getItem(
20824
- bb
20836
+ Tb
20825
20837
  )), r && e?.[r] !== void 0 ? n = e[r] : (n = e[t], n.isDefault = !0), n;
20826
- }, iT = (e, t) => {
20838
+ }, sT = (e, t) => {
20827
20839
  const [n, r] = fe(e[t]), a = (i) => {
20828
- Object.keys(e).includes(i?.locale) ? r(i) : r(e[it.ENGLISH]);
20840
+ Object.keys(e).includes(i?.locale) ? r(i) : r(e[st.ENGLISH]);
20829
20841
  };
20830
20842
  return Ce(() => {
20831
- let i = aT(e, t);
20843
+ let i = iT(e, t);
20832
20844
  i.locale !== t && r(e[i.locale]);
20833
20845
  }, []), {
20834
20846
  appCurrentLang: n,
20835
20847
  handleSetContextCurrentLang: a
20836
20848
  };
20837
- }, sT = (e) => Object.values(it).includes(e), uT = (e) => sT(e) ? e : (console.log(
20838
- `Language ${e} not handled for now. Using ${it.ENGLISH}.`
20839
- ), it.ENGLISH);
20840
- function oT(e, t = Date.now()) {
20849
+ }, uT = (e) => Object.values(st).includes(e), oT = (e) => uT(e) ? e : (console.log(
20850
+ `Language ${e} not handled for now. Using ${st.ENGLISH}.`
20851
+ ), st.ENGLISH);
20852
+ function lT(e, t = Date.now()) {
20841
20853
  return t - e;
20842
20854
  }
20843
- function lT(e, t = Date.now()) {
20844
- return oT(new Date(e).getTime(), t) <= Rb;
20855
+ function cT(e, t = Date.now()) {
20856
+ return lT(new Date(e).getTime(), t) <= kb;
20845
20857
  }
20846
- function cT({
20858
+ function dT({
20847
20859
  settings: e,
20848
20860
  setCurrentConversation: t,
20849
20861
  setArchivedConversation: n
20850
20862
  }) {
20851
- const r = Mb({ key: Il });
20863
+ const r = Bb({ key: Il });
20852
20864
  if (!r) {
20853
20865
  t({
20854
20866
  discussionId: null,
@@ -20861,7 +20873,7 @@ function cT({
20861
20873
  });
20862
20874
  return;
20863
20875
  }
20864
- lT(r.updatedAt) ? t({
20876
+ cT(r.updatedAt) ? t({
20865
20877
  discussionId: r.discussionId,
20866
20878
  items: r.items,
20867
20879
  updatedAt: r.updatedAt
@@ -20879,7 +20891,7 @@ function cT({
20879
20891
  updatedAt: r.updatedAt
20880
20892
  }));
20881
20893
  }
20882
- const dT = ({
20894
+ const fT = ({
20883
20895
  agentId: e,
20884
20896
  appToken: t,
20885
20897
  onFetched: n
@@ -20904,21 +20916,21 @@ const dT = ({
20904
20916
  setArchivedConversation: c
20905
20917
  };
20906
20918
  return Ce(() => {
20907
- const f = Fn.getApiUrl(), h = Fn.getFetchConfig({
20919
+ const f = Hn.getApiUrl(), h = Hn.getFetchConfig({
20908
20920
  httpVerb: "GET",
20909
20921
  contentType: "application/json"
20910
20922
  });
20911
20923
  fetch(`${f}/company/settings/${t}/${e}`, h).then(async (m) => {
20912
- const y = await m.json();
20913
- a(y), cT({
20914
- settings: y,
20924
+ const A = await m.json();
20925
+ a(A), dT({
20926
+ settings: A,
20915
20927
  setCurrentConversation: o,
20916
20928
  setArchivedConversation: c
20917
20929
  }), n?.();
20918
20930
  }).catch((m) => console.log("error in settings fetch", m));
20919
20931
  }, [t, e]), { contextCompanySettings: i, contextInitialConversationState: d };
20920
20932
  };
20921
- function fT(e, t = {}, n, r) {
20933
+ function hT(e, t = {}, n, r) {
20922
20934
  const { id: a, nonce: i, target: s, disableConstructable: o } = t, l = s, c = xe(null), d = xe(null);
20923
20935
  Ce(() => {
20924
20936
  if (!s) return;
@@ -20933,8 +20945,8 @@ function fT(e, t = {}, n, r) {
20933
20945
  ]), c.current.replaceSync(e), console.log("Loading custom css via stylesheet."), r?.(), () => {
20934
20946
  const h = l.adoptedStyleSheets || [], m = h.indexOf(c.current);
20935
20947
  if (m >= 0) {
20936
- const y = h.slice();
20937
- y.splice(m, 1), l.adoptedStyleSheets = y;
20948
+ const A = h.slice();
20949
+ A.splice(m, 1), l.adoptedStyleSheets = A;
20938
20950
  }
20939
20951
  c.current = null;
20940
20952
  };
@@ -20947,14 +20959,14 @@ function fT(e, t = {}, n, r) {
20947
20959
  };
20948
20960
  }, [e, a, i, s, o]);
20949
20961
  }
20950
- function hT(e) {
20951
- const { manifest: t, origins: n } = mT(e);
20962
+ function mT(e) {
20963
+ const { manifest: t, origins: n } = pT(e);
20952
20964
  n.forEach(ql), Xl(t), Vl(t);
20953
20965
  }
20954
- function mT(e) {
20955
- const t = pT(e), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
20966
+ function pT(e) {
20967
+ const t = ET(e), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
20956
20968
  for (const { url: l, mode: c } of t)
20957
- switch (ET(c, l)) {
20969
+ switch (gT(c, l)) {
20958
20970
  case "svg":
20959
20971
  r.add(l);
20960
20972
  break;
@@ -20973,10 +20985,10 @@ function mT(e) {
20973
20985
  svgs: Array.from(r),
20974
20986
  lotties: Array.from(a),
20975
20987
  sprites: Array.from(i)
20976
- }, o = gT(s);
20988
+ }, o = bT(s);
20977
20989
  return { manifest: s, origins: o };
20978
20990
  }
20979
- function pT(e) {
20991
+ function ET(e) {
20980
20992
  if (!e?.agent?.display) return [];
20981
20993
  const t = e.agent.display, n = [
20982
20994
  t.launcher,
@@ -20987,7 +20999,7 @@ function pT(e) {
20987
20999
  a?.assetUrl && r.push({ url: a.assetUrl, mode: a.mode });
20988
21000
  return r;
20989
21001
  }
20990
- function ET(e, t) {
21002
+ function gT(e, t) {
20991
21003
  if (e)
20992
21004
  switch (e) {
20993
21005
  case "svg":
@@ -21013,7 +21025,7 @@ function ET(e, t) {
21013
21025
  }
21014
21026
  return "unknown";
21015
21027
  }
21016
- function gT(e) {
21028
+ function bT(e) {
21017
21029
  const t = /* @__PURE__ */ new Set(), n = (r) => {
21018
21030
  if (r)
21019
21031
  try {
@@ -21025,7 +21037,7 @@ function gT(e) {
21025
21037
  };
21026
21038
  return (e.images ?? []).forEach(n), (e.svgs ?? []).forEach(n), (e.lotties ?? []).forEach(n), (e.sprites ?? []).forEach(n), Array.from(t);
21027
21039
  }
21028
- const bT = ({
21040
+ const TT = ({
21029
21041
  children: e,
21030
21042
  appToken: t,
21031
21043
  agentId: n,
@@ -21033,18 +21045,18 @@ const bT = ({
21033
21045
  }) => {
21034
21046
  var a = navigator.language;
21035
21047
  console.log("Brower language", a);
21036
- const i = uT(a), { appCurrentLang: s, handleSetContextCurrentLang: o } = iT(
21048
+ const i = oT(a), { appCurrentLang: s, handleSetContextCurrentLang: o } = sT(
21037
21049
  Mr,
21038
21050
  i
21039
21051
  ), l = {
21040
21052
  appCurrentLang: s,
21041
21053
  setAppCurrentLang: o
21042
- }, c = eT(), { contextCompanySettings: d, contextInitialConversationState: f } = dT({
21054
+ }, c = tT(), { contextCompanySettings: d, contextInitialConversationState: f } = fT({
21043
21055
  agentId: n,
21044
21056
  appToken: t,
21045
21057
  onFetched: c.setHasFetchedSettings
21046
21058
  });
21047
- return hT(d.companySettings), fT(
21059
+ return mT(d.companySettings), hT(
21048
21060
  d.companySettings?.agent?.display?.CSSRules,
21049
21061
  { id: `${n}`, target: r },
21050
21062
  c.appInternalContext.hasFetchedSettings,
@@ -21054,7 +21066,7 @@ const bT = ({
21054
21066
  {
21055
21067
  locale: s?.locale,
21056
21068
  messages: s?.translatedText,
21057
- children: /* @__PURE__ */ L(_l.Provider, { value: l, children: /* @__PURE__ */ L(Pl.Provider, { value: c, children: /* @__PURE__ */ L(Hn.Provider, { value: d, children: /* @__PURE__ */ L(
21069
+ children: /* @__PURE__ */ L(_l.Provider, { value: l, children: /* @__PURE__ */ L(Pl.Provider, { value: c, children: /* @__PURE__ */ L(mn.Provider, { value: d, children: /* @__PURE__ */ L(
21058
21070
  Nl.Provider,
21059
21071
  {
21060
21072
  value: f,
@@ -21065,7 +21077,7 @@ const bT = ({
21065
21077
  ) });
21066
21078
  };
21067
21079
  var hn = /* @__PURE__ */ ((e) => (e.LAUNCHER = "launcher", e.CHATBOX = "chatbox", e))(hn || {});
21068
- function TT({
21080
+ function yT({
21069
21081
  appToken: e,
21070
21082
  displayMode: t = "launcher",
21071
21083
  agentId: n,
@@ -21074,10 +21086,10 @@ function TT({
21074
21086
  e || console.warn(
21075
21087
  "appToken not defined in ai-client. Please see the documentation at URL_ERROR_IN_DOC"
21076
21088
  );
21077
- const a = rT(t);
21078
- return console.log(`App boot in ${a} mode.`), /* @__PURE__ */ L("div", { className: "chatSystemWidget app-root", id: "chatSystemWidget", children: /* @__PURE__ */ L(bT, { appToken: e, agentId: n, appRoot: r, children: /* @__PURE__ */ L(tT, { displayMode: a, appToken: e }) }) });
21089
+ const a = aT(t);
21090
+ return console.log(`App boot in ${a} mode.`), /* @__PURE__ */ L("div", { className: "chatSystemWidget app-root", id: "chatSystemWidget", children: /* @__PURE__ */ L(TT, { appToken: e, agentId: n, appRoot: r, children: /* @__PURE__ */ L(nT, { displayMode: a, appToken: e }) }) });
21079
21091
  }
21080
- const yT = `*, ::before, ::after {
21092
+ const AT = `*, ::before, ::after {
21081
21093
  --tw-border-spacing-x: 0;
21082
21094
  --tw-border-spacing-y: 0;
21083
21095
  --tw-translate-x: 0;
@@ -22636,7 +22648,7 @@ video {
22636
22648
  border-radius: 0.75rem;
22637
22649
  }
22638
22650
  }
22639
- `, AT = `
22651
+ `, xT = `
22640
22652
  .chatBox {
22641
22653
  overflow-x: hidden; /* Hide horizontal scrollbar */
22642
22654
  }
@@ -22677,7 +22689,7 @@ video {
22677
22689
  .chatBox hr {
22678
22690
  margin: 1.5rem 0;
22679
22691
  }
22680
- `, xT = `/* React-Css Transitions */
22692
+ `, _T = `/* React-Css Transitions */
22681
22693
  .menuTransition-enter {
22682
22694
  opacity: 0;
22683
22695
  transform: scale(0.9) translateX(200px);
@@ -22740,7 +22752,7 @@ textarea::placeholder {
22740
22752
 
22741
22753
  .messagesContainer {
22742
22754
  outline:none
22743
- }`, _T = `/* 1) Remove UA outline on the shadow host */
22755
+ }`, ST = `/* 1) Remove UA outline on the shadow host */
22744
22756
  :host(:focus),
22745
22757
  :host(:focus-visible) { outline: none; }
22746
22758
 
@@ -22752,11 +22764,11 @@ textarea::placeholder {
22752
22764
 
22753
22765
  /* Ensure the wrapper itself doesn't get a default outline either */
22754
22766
  .app-root:focus { outline: none; }
22755
- `, lu = `${yT}
22756
- ${AT}
22767
+ `, lu = `${AT}
22757
22768
  ${xT}
22758
- ${_T}`;
22759
- function wT({
22769
+ ${_T}
22770
+ ${ST}`;
22771
+ function OT({
22760
22772
  cssHref: e,
22761
22773
  appToken: t,
22762
22774
  agentId: n,
@@ -22770,29 +22782,29 @@ function wT({
22770
22782
  if (!h) return;
22771
22783
  const m = document.createElement("div");
22772
22784
  h.appendChild(m), o.current = m;
22773
- const y = m.attachShadow({ mode: "open", delegatesFocus: !0 });
22774
- f(y);
22775
- let A = !1;
22785
+ const A = m.attachShadow({ mode: "open", delegatesFocus: !0 });
22786
+ f(A);
22787
+ let x = !1;
22776
22788
  try {
22777
- if ("adoptedStyleSheets" in y && !e) {
22778
- const x = new CSSStyleSheet();
22779
- x.replaceSync(lu), y.adoptedStyleSheets = [
22780
- ...y.adoptedStyleSheets ?? [],
22781
- x
22782
- ], A = !0;
22789
+ if ("adoptedStyleSheets" in A && !e) {
22790
+ const y = new CSSStyleSheet();
22791
+ y.replaceSync(lu), A.adoptedStyleSheets = [
22792
+ ...A.adoptedStyleSheets ?? [],
22793
+ y
22794
+ ], x = !0;
22783
22795
  }
22784
22796
  } catch {
22785
22797
  }
22786
- if (!A)
22798
+ if (!x)
22787
22799
  if (e) {
22788
- const x = document.createElement("link");
22789
- x.rel = "stylesheet", x.href = e, y.appendChild(x);
22800
+ const y = document.createElement("link");
22801
+ y.rel = "stylesheet", y.href = e, A.appendChild(y);
22790
22802
  } else {
22791
- const x = document.createElement("style");
22792
- x.textContent = lu, y.appendChild(x);
22803
+ const y = document.createElement("style");
22804
+ y.textContent = lu, A.appendChild(y);
22793
22805
  }
22794
22806
  const C = document.createElement("div");
22795
- return y.appendChild(C), c(C), () => {
22807
+ return A.appendChild(C), c(C), () => {
22796
22808
  c(null), m.remove(), o.current = null;
22797
22809
  };
22798
22810
  }, [i, e]), /* @__PURE__ */ Te(vt, { children: [
@@ -22800,7 +22812,7 @@ function wT({
22800
22812
  " ",
22801
22813
  l && Hl(
22802
22814
  /* @__PURE__ */ L(
22803
- TT,
22815
+ yT,
22804
22816
  {
22805
22817
  ...a,
22806
22818
  appToken: t,
@@ -22814,6 +22826,6 @@ function wT({
22814
22826
  ] });
22815
22827
  }
22816
22828
  export {
22817
- wT as App
22829
+ OT as App
22818
22830
  };
22819
22831
  //# sourceMappingURL=index.mjs.map