@voxket-ai/voxket-live 1.1.5 โ†’ 1.1.7

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.js CHANGED
@@ -2,7 +2,7 @@ var Ug = Object.defineProperty;
2
2
  var Hg = (e, t, n) => t in e ? Ug(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var we = (e, t, n) => Hg(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import * as P from "react";
5
- import Me, { createContext as In, useRef as on, useLayoutEffect as jg, useEffect as Nt, useId as qa, useContext as Ct, useInsertionEffect as Tf, useMemo as Qt, useCallback as Xe, Children as Wg, isValidElement as Gg, useState as Se, Fragment as Nf, createElement as Kg, forwardRef as qg, Component as Yg } from "react";
5
+ import Me, { createContext as In, useRef as on, useLayoutEffect as Wg, useEffect as Nt, useId as qa, useContext as Ct, useInsertionEffect as Tf, useMemo as Qt, useCallback as Xe, Children as jg, isValidElement as Gg, useState as Se, Fragment as Nf, createElement as Kg, forwardRef as qg, Component as Yg } from "react";
6
6
  import { jsx as m, Fragment as Tt, jsxs as N } from "react/jsx-runtime";
7
7
  import { Track as at, setLogLevel as Zg, RoomEvent as Be, ConnectionState as vr, Room as so } from "livekit-client";
8
8
  import { AudioTrack as Xg, BarVisualizer as Af, VideoTrack as Oo, useTracks as Qg, useRoomContext as Jg, RoomContext as xc, RoomAudioRenderer as vc, StartAudio as wc } from "@livekit/components-react";
@@ -16,7 +16,7 @@ function Za(e) {
16
16
  const t = on(null);
17
17
  return t.current === null && (t.current = e()), t.current;
18
18
  }
19
- const Xa = typeof window < "u", Pf = Xa ? jg : Nt, Po = /* @__PURE__ */ In(null);
19
+ const Xa = typeof window < "u", Pf = Xa ? Wg : Nt, Po = /* @__PURE__ */ In(null);
20
20
  function Qa(e, t) {
21
21
  e.indexOf(t) === -1 && e.push(t);
22
22
  }
@@ -98,18 +98,18 @@ function _i(e, t, n, r) {
98
98
  const i = (o) => Sb(o, 0, 1, e, n);
99
99
  return (o) => o === 0 || o === 1 ? o : $f(i(o), t, r);
100
100
  }
101
- const Vf = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, zf = (e) => (t) => 1 - e(1 - t), Uf = /* @__PURE__ */ _i(0.33, 1.53, 0.69, 0.99), rl = /* @__PURE__ */ zf(Uf), Hf = /* @__PURE__ */ Vf(rl), jf = (e) => (e *= 2) < 1 ? 0.5 * rl(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), il = (e) => 1 - Math.sin(Math.acos(e)), Wf = zf(il), Gf = Vf(il), kb = /* @__PURE__ */ _i(0.42, 0, 1, 1), _b = /* @__PURE__ */ _i(0, 0, 0.58, 1), Kf = /* @__PURE__ */ _i(0.42, 0, 0.58, 1), Cb = (e) => Array.isArray(e) && typeof e[0] != "number", qf = (e) => Array.isArray(e) && typeof e[0] == "number", Sc = {
101
+ const Vf = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, zf = (e) => (t) => 1 - e(1 - t), Uf = /* @__PURE__ */ _i(0.33, 1.53, 0.69, 0.99), rl = /* @__PURE__ */ zf(Uf), Hf = /* @__PURE__ */ Vf(rl), Wf = (e) => (e *= 2) < 1 ? 0.5 * rl(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), il = (e) => 1 - Math.sin(Math.acos(e)), jf = zf(il), Gf = Vf(il), kb = /* @__PURE__ */ _i(0.42, 0, 1, 1), _b = /* @__PURE__ */ _i(0, 0, 0.58, 1), Kf = /* @__PURE__ */ _i(0.42, 0, 0.58, 1), Cb = (e) => Array.isArray(e) && typeof e[0] != "number", qf = (e) => Array.isArray(e) && typeof e[0] == "number", Sc = {
102
102
  linear: sn,
103
103
  easeIn: kb,
104
104
  easeInOut: Kf,
105
105
  easeOut: _b,
106
106
  circIn: il,
107
107
  circInOut: Gf,
108
- circOut: Wf,
108
+ circOut: jf,
109
109
  backIn: rl,
110
110
  backInOut: Hf,
111
111
  backOut: Uf,
112
- anticipate: jf
112
+ anticipate: Wf
113
113
  }, Tb = (e) => typeof e == "string", kc = (e) => {
114
114
  if (qf(e)) {
115
115
  An(e.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
@@ -200,8 +200,8 @@ let ao;
200
200
  function Mb() {
201
201
  ao = void 0;
202
202
  }
203
- const jt = {
204
- now: () => (ao === void 0 && jt.set(Ot.isProcessing || Mn.useManualTiming ? Ot.timestamp : performance.now()), ao),
203
+ const Wt = {
204
+ now: () => (ao === void 0 && Wt.set(Ot.isProcessing || Mn.useManualTiming ? Ot.timestamp : performance.now()), ao),
205
205
  set: (e) => {
206
206
  ao = e, queueMicrotask(Mb);
207
207
  }
@@ -301,16 +301,16 @@ function th(e) {
301
301
  return o;
302
302
  };
303
303
  }
304
- const jb = (e) => typeof e == "number" ? 0 : wt.test(e) ? wt.getAnimatableNone(e) : e;
305
- function Wb(e) {
304
+ const Wb = (e) => typeof e == "number" ? 0 : wt.test(e) ? wt.getAnimatableNone(e) : e;
305
+ function jb(e) {
306
306
  const t = eh(e);
307
- return th(e)(t.map(jb));
307
+ return th(e)(t.map(Wb));
308
308
  }
309
309
  const Hn = {
310
310
  test: Vb,
311
311
  parse: eh,
312
312
  createTransformer: th,
313
- getAnimatableNone: Wb
313
+ getAnimatableNone: jb
314
314
  };
315
315
  function ds(e, t, n) {
316
316
  return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
@@ -403,7 +403,7 @@ const ey = (e) => {
403
403
  * If we're processing this frame we can use the
404
404
  * framelocked timestamp to keep things in sync.
405
405
  */
406
- now: () => Ot.isProcessing ? Ot.timestamp : jt.now()
406
+ now: () => Ot.isProcessing ? Ot.timestamp : Wt.now()
407
407
  };
408
408
  }, ih = (e, t, n = 10) => {
409
409
  let r = "";
@@ -735,7 +735,7 @@ class hl extends fl {
735
735
  super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
736
736
  var r, i;
737
737
  const { motionValue: n } = this.options;
738
- n && n.updatedAt !== jt.now() && this.tick(jt.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), (i = (r = this.options).onStop) == null || i.call(r));
738
+ n && n.updatedAt !== Wt.now() && this.tick(Wt.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), (i = (r = this.options).onStop) == null || i.call(r));
739
739
  }, this.options = t, this.initAnimation(), this.play(), t.autoplay === !1 && this.pause();
740
740
  }
741
741
  initAnimation() {
@@ -801,7 +801,7 @@ class hl extends fl {
801
801
  return this.playbackSpeed;
802
802
  }
803
803
  set speed(t) {
804
- this.updateTime(jt.now());
804
+ this.updateTime(Wt.now());
805
805
  const n = this.playbackSpeed !== t;
806
806
  this.playbackSpeed = t, n && (this.time = /* @__PURE__ */ vn(this.currentTime));
807
807
  }
@@ -815,7 +815,7 @@ class hl extends fl {
815
815
  this.state === "finished" ? (this.updateFinished(), this.startTime = r) : this.holdTime !== null ? this.startTime = r - this.holdTime : this.startTime || (this.startTime = n ?? r), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
816
816
  }
817
817
  pause() {
818
- this.state = "paused", this.updateTime(jt.now()), this.holdTime = this.currentTime;
818
+ this.state = "paused", this.updateTime(Wt.now()), this.holdTime = this.currentTime;
819
819
  }
820
820
  complete() {
821
821
  this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
@@ -1161,7 +1161,7 @@ class Py extends fl {
1161
1161
  }
1162
1162
  }
1163
1163
  const fh = {
1164
- anticipate: jf,
1164
+ anticipate: Wf,
1165
1165
  backInOut: Hf,
1166
1166
  circInOut: Gf
1167
1167
  };
@@ -1243,13 +1243,13 @@ function Uy(e) {
1243
1243
  !l && !r && i !== "mirror" && o !== 0 && s !== "inertia";
1244
1244
  }
1245
1245
  const Hy = 40;
1246
- class jy extends fl {
1246
+ class Wy extends fl {
1247
1247
  constructor({ autoplay: t = !0, delay: n = 0, type: r = "keyframes", repeat: i = 0, repeatDelay: o = 0, repeatType: s = "loop", keyframes: a, name: l, motionValue: c, element: u, ...d }) {
1248
1248
  var g;
1249
1249
  super(), this.stop = () => {
1250
1250
  var p, v;
1251
1251
  this._animation && (this._animation.stop(), (p = this.stopTimeline) == null || p.call(this)), (v = this.keyframeResolver) == null || v.cancel();
1252
- }, this.createdAt = jt.now();
1252
+ }, this.createdAt = Wt.now();
1253
1253
  const f = {
1254
1254
  autoplay: t,
1255
1255
  delay: n,
@@ -1267,7 +1267,7 @@ class jy extends fl {
1267
1267
  onKeyframesResolved(t, n, r, i) {
1268
1268
  this.keyframeResolver = void 0;
1269
1269
  const { name: o, type: s, velocity: a, delay: l, isHandoff: c, onUpdate: u } = r;
1270
- this.resolvedAt = jt.now(), $y(t, o, s, a) || ((Mn.instantAnimations || !l) && (u == null || u(dl(t, r, n))), t[0] = t[t.length - 1], va(r), r.repeat = 0);
1270
+ this.resolvedAt = Wt.now(), $y(t, o, s, a) || ((Mn.instantAnimations || !l) && (u == null || u(dl(t, r, n))), t[0] = t[t.length - 1], va(r), r.repeat = 0);
1271
1271
  const f = {
1272
1272
  startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt > Hy ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
1273
1273
  finalKeyframe: n,
@@ -1328,12 +1328,12 @@ class jy extends fl {
1328
1328
  this._animation && this.animation.cancel(), (t = this.keyframeResolver) == null || t.cancel();
1329
1329
  }
1330
1330
  }
1331
- const Wy = (
1331
+ const jy = (
1332
1332
  // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
1333
1333
  /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
1334
1334
  );
1335
1335
  function Gy(e) {
1336
- const t = Wy.exec(e);
1336
+ const t = jy.exec(e);
1337
1337
  if (!t)
1338
1338
  return [,];
1339
1339
  const [, n, r, i] = t;
@@ -1569,14 +1569,14 @@ class s0 {
1569
1569
  constructor(t, n = {}) {
1570
1570
  this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (r) => {
1571
1571
  var o;
1572
- const i = jt.now();
1572
+ const i = Wt.now();
1573
1573
  if (this.updatedAt !== i && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(r), this.current !== this.prev && ((o = this.events.change) == null || o.notify(this.current), this.dependents))
1574
1574
  for (const s of this.dependents)
1575
1575
  s.dirty();
1576
1576
  }, this.hasAnimated = !1, this.setCurrent(t), this.owner = n.owner;
1577
1577
  }
1578
1578
  setCurrent(t) {
1579
- this.current = t, this.updatedAt = jt.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = o0(this.current));
1579
+ this.current = t, this.updatedAt = Wt.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = o0(this.current));
1580
1580
  }
1581
1581
  setPrevFrameValue(t = this.current) {
1582
1582
  this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
@@ -1705,7 +1705,7 @@ class s0 {
1705
1705
  * @public
1706
1706
  */
1707
1707
  getVelocity() {
1708
- const t = jt.now();
1708
+ const t = Wt.now();
1709
1709
  if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > $c)
1710
1710
  return 0;
1711
1711
  const n = Math.min(this.updatedAt - this.prevUpdatedAt, $c);
@@ -1960,7 +1960,7 @@ function _h(e = !0) {
1960
1960
  const zi = (e) => e.key || "";
1961
1961
  function Hc(e) {
1962
1962
  const t = [];
1963
- return Wg.forEach(e, (n) => {
1963
+ return jg.forEach(e, (n) => {
1964
1964
  Gg(n) && t.push(n);
1965
1965
  }), t;
1966
1966
  }
@@ -1997,7 +1997,7 @@ const Dr = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presen
1997
1997
  };
1998
1998
  return m(y0, { isPresent: A, initial: !h.current || n ? void 0 : !1, custom: t, presenceAffectsLayout: i, mode: o, root: l, onExitComplete: A ? void 0 : O, anchorX: a, children: C }, R);
1999
1999
  }) });
2000
- }, Ch = In({ strict: !1 }), jc = {
2000
+ }, Ch = In({ strict: !1 }), Wc = {
2001
2001
  animation: [
2002
2002
  "animate",
2003
2003
  "variants",
@@ -2017,9 +2017,9 @@ const Dr = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presen
2017
2017
  inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
2018
2018
  layout: ["layout", "layoutId"]
2019
2019
  }, Lr = {};
2020
- for (const e in jc)
2020
+ for (const e in Wc)
2021
2021
  Lr[e] = {
2022
- isEnabled: (t) => jc[e].some((n) => !!t[n])
2022
+ isEnabled: (t) => Wc[e].some((n) => !!t[n])
2023
2023
  };
2024
2024
  function v0(e) {
2025
2025
  for (const t in e)
@@ -2112,9 +2112,9 @@ function k0(e, t) {
2112
2112
  }
2113
2113
  function _0(e) {
2114
2114
  const { initial: t, animate: n } = k0(e, Ct(Do));
2115
- return Qt(() => ({ initial: t, animate: n }), [Wc(t), Wc(n)]);
2115
+ return Qt(() => ({ initial: t, animate: n }), [jc(t), jc(n)]);
2116
2116
  }
2117
- function Wc(e) {
2117
+ function jc(e) {
2118
2118
  return Array.isArray(e) ? e.join(" ") : e;
2119
2119
  }
2120
2120
  const xi = {};
@@ -2387,7 +2387,7 @@ const U0 = /* @__PURE__ */ Ph({
2387
2387
  function Cr(e) {
2388
2388
  return e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "current");
2389
2389
  }
2390
- function j0(e, t, n) {
2390
+ function W0(e, t, n) {
2391
2391
  return Xe(
2392
2392
  (r) => {
2393
2393
  r && e.onMount && e.onMount(r), t && (r ? t.mount(r) : t.unmount()), n && (typeof n == "function" ? n(r) : Cr(n) && (n.current = r));
@@ -2400,7 +2400,7 @@ function j0(e, t, n) {
2400
2400
  [t]
2401
2401
  );
2402
2402
  }
2403
- const Tl = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), W0 = "framerAppearId", Lh = "data-" + Tl(W0), Fh = In({});
2403
+ const Tl = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), j0 = "framerAppearId", Lh = "data-" + Tl(j0), Fh = In({});
2404
2404
  function G0(e, t, n, r, i) {
2405
2405
  var p, v;
2406
2406
  const { visualElement: o } = Ct(Do), s = Ct(Ch), a = Ct(Po), l = Ct(xl).reducedMotion, c = on(null);
@@ -2468,7 +2468,7 @@ function ms(e, { forwardMotionProps: t = !1 } = {}, n, r) {
2468
2468
  const g = Z0(u);
2469
2469
  c = g.MeasureLayout, f.visualElement = G0(e, h, u, r, g.ProjectionNode);
2470
2470
  }
2471
- return N(Do.Provider, { value: f, children: [c && f.visualElement ? m(c, { visualElement: f.visualElement, ...u }) : null, B0(e, a, j0(h, f.visualElement, l), h, d, t)] });
2471
+ return N(Do.Provider, { value: f, children: [c && f.visualElement ? m(c, { visualElement: f.visualElement, ...u }) : null, B0(e, a, W0(h, f.visualElement, l), h, d, t)] });
2472
2472
  }
2473
2473
  o.displayName = `motion.${typeof e == "string" ? e : `create(${e.displayName ?? e.name ?? ""})`}`;
2474
2474
  const s = qg(o);
@@ -2655,7 +2655,7 @@ class ox {
2655
2655
  this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = pl, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2656
2656
  this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
2657
2657
  }, this.renderScheduledAt = 0, this.scheduleRender = () => {
2658
- const f = jt.now();
2658
+ const f = Wt.now();
2659
2659
  this.renderScheduledAt < f && (this.renderScheduledAt = f, lt.render(this.render, !1, !0));
2660
2660
  };
2661
2661
  const { latestValues: l, renderState: c } = s;
@@ -2845,7 +2845,7 @@ class ox {
2845
2845
  bl.render(this.render);
2846
2846
  }
2847
2847
  }
2848
- class jh extends ox {
2848
+ class Wh extends ox {
2849
2849
  constructor() {
2850
2850
  super(...arguments), this.KeyframeResolver = r0;
2851
2851
  }
@@ -2866,7 +2866,7 @@ class jh extends ox {
2866
2866
  }));
2867
2867
  }
2868
2868
  }
2869
- function Wh(e, { style: t, vars: n }, r, i) {
2869
+ function jh(e, { style: t, vars: n }, r, i) {
2870
2870
  const o = e.style;
2871
2871
  let s;
2872
2872
  for (s in t)
@@ -2878,9 +2878,9 @@ function Wh(e, { style: t, vars: n }, r, i) {
2878
2878
  function sx(e) {
2879
2879
  return window.getComputedStyle(e);
2880
2880
  }
2881
- class ax extends jh {
2881
+ class ax extends Wh {
2882
2882
  constructor() {
2883
- super(...arguments), this.type = "html", this.renderInstance = Wh;
2883
+ super(...arguments), this.type = "html", this.renderInstance = jh;
2884
2884
  }
2885
2885
  readValueFromInstance(t, n) {
2886
2886
  var r;
@@ -2927,11 +2927,11 @@ const Gh = /* @__PURE__ */ new Set([
2927
2927
  "lengthAdjust"
2928
2928
  ]);
2929
2929
  function lx(e, t, n, r) {
2930
- Wh(e, t, void 0, r);
2930
+ jh(e, t, void 0, r);
2931
2931
  for (const i in t.attrs)
2932
2932
  e.setAttribute(Gh.has(i) ? i : Tl(i), t.attrs[i]);
2933
2933
  }
2934
- class cx extends jh {
2934
+ class cx extends Wh {
2935
2935
  constructor() {
2936
2936
  super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = mt;
2937
2937
  }
@@ -3053,7 +3053,7 @@ const Nl = (e, t, n, r = {}, i, o) => (s) => {
3053
3053
  return;
3054
3054
  }
3055
3055
  }
3056
- return a.isSync ? new hl(u) : new jy(u);
3056
+ return a.isSync ? new hl(u) : new Wy(u);
3057
3057
  };
3058
3058
  function Sx({ protectedKeys: e, needsAnimating: t }, n) {
3059
3059
  const r = e.hasOwnProperty(n) && t[n] !== !0;
@@ -3449,17 +3449,17 @@ function ys({ point: e }, t) {
3449
3449
  return {
3450
3450
  point: e,
3451
3451
  delta: su(e, np(t)),
3452
- offset: su(e, jx(t)),
3453
- velocity: Wx(t, 0.1)
3452
+ offset: su(e, Wx(t)),
3453
+ velocity: jx(t, 0.1)
3454
3454
  };
3455
3455
  }
3456
- function jx(e) {
3456
+ function Wx(e) {
3457
3457
  return e[0];
3458
3458
  }
3459
3459
  function np(e) {
3460
3460
  return e[e.length - 1];
3461
3461
  }
3462
- function Wx(e, t) {
3462
+ function jx(e, t) {
3463
3463
  if (e.length < 2)
3464
3464
  return { x: 0, y: 0 };
3465
3465
  let n = e.length - 1, r = null;
@@ -3935,7 +3935,7 @@ class lv {
3935
3935
  }
3936
3936
  }
3937
3937
  function cv(e, t) {
3938
- const n = jt.now(), r = ({ timestamp: i }) => {
3938
+ const n = Wt.now(), r = ({ timestamp: i }) => {
3939
3939
  const o = i - n;
3940
3940
  o >= t && (Un(r), e(o - t));
3941
3941
  };
@@ -3956,7 +3956,7 @@ function dv(e, t, n, r, i, o) {
3956
3956
  function mu(e, t) {
3957
3957
  return e[t] !== void 0 ? e[t] : e.borderRadius;
3958
3958
  }
3959
- const fv = /* @__PURE__ */ op(0, 0.5, Wf), hv = /* @__PURE__ */ op(0.5, 0.95, sn);
3959
+ const fv = /* @__PURE__ */ op(0, 0.5, jf), hv = /* @__PURE__ */ op(0.5, 0.95, sn);
3960
3960
  function op(e, t, n) {
3961
3961
  return (r) => r < e ? 0 : r > t ? 1 : n(/* @__PURE__ */ mi(e, t, r));
3962
3962
  }
@@ -4206,7 +4206,7 @@ function cp({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
4206
4206
  return;
4207
4207
  }
4208
4208
  this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(Tv), this.nodes.forEach(Ev), this.nodes.forEach(Sv)) : this.nodes.forEach(Tu), this.clearAllSnapshots();
4209
- const a = jt.now();
4209
+ const a = Wt.now();
4210
4210
  Ot.delta = Nn(0, 1e3 / 60, a - Ot.timestamp), Ot.timestamp = a, Ot.isProcessing = !0, cs.update.process(Ot), cs.preRender.process(Ot), cs.render.process(Ot), Ot.isProcessing = !1;
4211
4211
  }
4212
4212
  didUpdate() {
@@ -4752,14 +4752,14 @@ const Aa = /* @__PURE__ */ new WeakMap(), Ss = /* @__PURE__ */ new WeakMap(), Uv
4752
4752
  }, Hv = (e) => {
4753
4753
  e.forEach(Uv);
4754
4754
  };
4755
- function jv({ root: e, ...t }) {
4755
+ function Wv({ root: e, ...t }) {
4756
4756
  const n = e || document;
4757
4757
  Ss.has(n) || Ss.set(n, {});
4758
4758
  const r = Ss.get(n), i = JSON.stringify(t);
4759
4759
  return r[i] || (r[i] = new IntersectionObserver(Hv, { root: e, ...t })), r[i];
4760
4760
  }
4761
- function Wv(e, t, n) {
4762
- const r = jv(t);
4761
+ function jv(e, t, n) {
4762
+ const r = Wv(t);
4763
4763
  return Aa.set(e, n), r.observe(e), () => {
4764
4764
  Aa.delete(e), r.unobserve(e);
4765
4765
  };
@@ -4786,7 +4786,7 @@ class Kv extends Gn {
4786
4786
  const { onViewportEnter: u, onViewportLeave: d } = this.node.getProps(), f = c ? u : d;
4787
4787
  f && f(l);
4788
4788
  };
4789
- return Wv(this.node.current, s, a);
4789
+ return jv(this.node.current, s, a);
4790
4790
  }
4791
4791
  mount() {
4792
4792
  this.startObserver();
@@ -5247,10 +5247,10 @@ const _t = (e) => {
5247
5247
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
5248
5248
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
5249
5249
  bw.test(e) && !yw.test(e)
5250
- ), gp = () => !1, Sw = (e) => xw.test(e), kw = (e) => vw.test(e), _w = (e) => !de(e) && !fe(e), Cw = (e) => Hr(e, xp, gp), de = (e) => pp.test(e), Qn = (e) => Hr(e, vp, Ew), _s = (e) => Hr(e, Rw, De), Bu = (e) => Hr(e, bp, gp), Tw = (e) => Hr(e, yp, kw), Hi = (e) => Hr(e, wp, Sw), fe = (e) => mp.test(e), Xr = (e) => jr(e, vp), Nw = (e) => jr(e, Iw), $u = (e) => jr(e, bp), Aw = (e) => jr(e, xp), Mw = (e) => jr(e, yp), ji = (e) => jr(e, wp, !0), Hr = (e, t, n) => {
5250
+ ), gp = () => !1, Sw = (e) => xw.test(e), kw = (e) => vw.test(e), _w = (e) => !de(e) && !fe(e), Cw = (e) => Hr(e, xp, gp), de = (e) => pp.test(e), Qn = (e) => Hr(e, vp, Ew), _s = (e) => Hr(e, Rw, De), Bu = (e) => Hr(e, bp, gp), Tw = (e) => Hr(e, yp, kw), Hi = (e) => Hr(e, wp, Sw), fe = (e) => mp.test(e), Xr = (e) => Wr(e, vp), Nw = (e) => Wr(e, Iw), $u = (e) => Wr(e, bp), Aw = (e) => Wr(e, xp), Mw = (e) => Wr(e, yp), Wi = (e) => Wr(e, wp, !0), Hr = (e, t, n) => {
5251
5251
  const r = pp.exec(e);
5252
5252
  return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
5253
- }, jr = (e, t, n = !1) => {
5253
+ }, Wr = (e, t, n = !1) => {
5254
5254
  const r = mp.exec(e);
5255
5255
  return r ? r[1] ? t(r[1]) : n : !1;
5256
5256
  }, bp = (e) => e === "position" || e === "percentage", yp = (e) => e === "image" || e === "url", xp = (e) => e === "length" || e === "size" || e === "bg-size", vp = (e) => e === "length", Rw = (e) => e === "number", Iw = (e) => e === "family-name", wp = (e) => e === "shadow", Ow = () => {
@@ -5288,7 +5288,7 @@ const _t = (e) => {
5288
5288
  c,
5289
5289
  fe,
5290
5290
  de
5291
- ], Y = () => ["", De, Xr, Qn], te = () => ["solid", "dashed", "dotted", "double"], B = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], q = () => [De, ks, $u, Bu], W = () => [
5291
+ ], Y = () => ["", De, Xr, Qn], te = () => ["solid", "dashed", "dotted", "double"], B = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], q = () => [De, ks, $u, Bu], j = () => [
5292
5292
  // Deprecated since Tailwind CSS v4.0.0
5293
5293
  "",
5294
5294
  "none",
@@ -6645,7 +6645,7 @@ const _t = (e) => {
6645
6645
  "",
6646
6646
  "none",
6647
6647
  u,
6648
- ji,
6648
+ Wi,
6649
6649
  Hi
6650
6650
  ]
6651
6651
  }],
@@ -6661,7 +6661,7 @@ const _t = (e) => {
6661
6661
  * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
6662
6662
  */
6663
6663
  "inset-shadow": [{
6664
- "inset-shadow": ["none", d, ji, Hi]
6664
+ "inset-shadow": ["none", d, Wi, Hi]
6665
6665
  }],
6666
6666
  /**
6667
6667
  * Inset Box Shadow Color
@@ -6728,7 +6728,7 @@ const _t = (e) => {
6728
6728
  * @see https://tailwindcss.com/docs/text-shadow
6729
6729
  */
6730
6730
  "text-shadow": [{
6731
- "text-shadow": ["none", f, ji, Hi]
6731
+ "text-shadow": ["none", f, Wi, Hi]
6732
6732
  }],
6733
6733
  /**
6734
6734
  * Text Shadow Color
@@ -6975,7 +6975,7 @@ const _t = (e) => {
6975
6975
  * @see https://tailwindcss.com/docs/blur
6976
6976
  */
6977
6977
  blur: [{
6978
- blur: W()
6978
+ blur: j()
6979
6979
  }],
6980
6980
  /**
6981
6981
  * Brightness
@@ -7001,7 +7001,7 @@ const _t = (e) => {
7001
7001
  "",
7002
7002
  "none",
7003
7003
  h,
7004
- ji,
7004
+ Wi,
7005
7005
  Hi
7006
7006
  ]
7007
7007
  }],
@@ -7065,7 +7065,7 @@ const _t = (e) => {
7065
7065
  * @see https://tailwindcss.com/docs/backdrop-blur
7066
7066
  */
7067
7067
  "backdrop-blur": [{
7068
- "backdrop-blur": W()
7068
+ "backdrop-blur": j()
7069
7069
  }],
7070
7070
  /**
7071
7071
  * Backdrop Brightness
@@ -7724,7 +7724,7 @@ const _t = (e) => {
7724
7724
  orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
7725
7725
  };
7726
7726
  }, Pw = /* @__PURE__ */ pw(Ow);
7727
- function je(...e) {
7727
+ function We(...e) {
7728
7728
  return Pw(eb(e));
7729
7729
  }
7730
7730
  function Rl(e) {
@@ -7816,7 +7816,7 @@ const Ep = Me.forwardRef(({
7816
7816
  highlighted: "bg-white",
7817
7817
  muted: "bg-white/30"
7818
7818
  }, [r]);
7819
- return /* @__PURE__ */ N("div", { ref: i, className: je("", n), children: [
7819
+ return /* @__PURE__ */ N("div", { ref: i, className: We("", n), children: [
7820
7820
  t && /* @__PURE__ */ N(Tt, { children: [
7821
7821
  /* @__PURE__ */ m(Xg, { ref: o, trackRef: t, volume: 1 }),
7822
7822
  /* @__PURE__ */ m(
@@ -7826,11 +7826,11 @@ const Ep = Me.forwardRef(({
7826
7826
  state: e,
7827
7827
  options: { minHeight: 5 },
7828
7828
  trackRef: t,
7829
- className: je("flex aspect-video w-40 items-center justify-center gap-1.5"),
7829
+ className: We("flex aspect-video w-40 items-center justify-center gap-1.5"),
7830
7830
  children: /* @__PURE__ */ m(
7831
7831
  "span",
7832
7832
  {
7833
- className: je([
7833
+ className: We([
7834
7834
  `${l.base} min-h-2 w-2 rounded-full`,
7835
7835
  "origin-center transition-colors duration-250 ease-linear",
7836
7836
  `data-[lk-highlighted=true]:${l.highlighted}`,
@@ -7842,10 +7842,10 @@ const Ep = Me.forwardRef(({
7842
7842
  )
7843
7843
  ] }),
7844
7844
  !t && // Fallback: Show default avatar when no audio track is available
7845
- /* @__PURE__ */ m("div", { className: je("flex aspect-video w-40 items-center justify-center"), children: /* @__PURE__ */ m("div", { className: "flex flex-col items-center justify-center", children: /* @__PURE__ */ m("div", { className: "flex gap-1.5", children: Array.from({ length: 5 }).map((g, p) => /* @__PURE__ */ m(
7845
+ /* @__PURE__ */ m("div", { className: We("flex aspect-video w-40 items-center justify-center"), children: /* @__PURE__ */ m("div", { className: "flex flex-col items-center justify-center", children: /* @__PURE__ */ m("div", { className: "flex gap-1.5", children: Array.from({ length: 5 }).map((g, p) => /* @__PURE__ */ m(
7846
7846
  "span",
7847
7847
  {
7848
- className: je([
7848
+ className: We([
7849
7849
  `${l.base} min-h-2 w-2 rounded-full`,
7850
7850
  "origin-center transition-colors duration-250 ease-linear",
7851
7851
  e === "speaking" && `animate-pulse ${l.highlighted}`,
@@ -7863,7 +7863,7 @@ const $w = ({
7863
7863
  ref: n
7864
7864
  }) => {
7865
7865
  var r, i;
7866
- return !e || !e.publication || !e.participant ? /* @__PURE__ */ m("div", { ref: n, className: je(t), children: /* @__PURE__ */ m("div", { className: "w-full h-full bg-gray-200 rounded-md flex items-center justify-center", children: /* @__PURE__ */ m("span", { className: "text-gray-500", children: "No video available" }) }) }) : /* @__PURE__ */ m("div", { ref: n, className: je(t), children: /* @__PURE__ */ m(
7866
+ return !e || !e.publication || !e.participant ? /* @__PURE__ */ m("div", { ref: n, className: We(t), children: /* @__PURE__ */ m("div", { className: "w-full h-full bg-gray-200 rounded-md flex items-center justify-center", children: /* @__PURE__ */ m("span", { className: "text-gray-500", children: "No video available" }) }) }) : /* @__PURE__ */ m("div", { ref: n, className: We(t), children: /* @__PURE__ */ m(
7867
7867
  Oo,
7868
7868
  {
7869
7869
  trackRef: e,
@@ -7874,13 +7874,13 @@ const $w = ({
7874
7874
  ) });
7875
7875
  }, Vw = P.forwardRef(function({ trackRef: t, className: n, ...r }, i) {
7876
7876
  var o, s;
7877
- return /* @__PURE__ */ m("div", { ref: i, className: je("bg-muted overflow-hidden rounded-md", n), children: /* @__PURE__ */ m(
7877
+ return /* @__PURE__ */ m("div", { ref: i, className: We("bg-muted overflow-hidden rounded-md", n), children: /* @__PURE__ */ m(
7878
7878
  Oo,
7879
7879
  {
7880
7880
  trackRef: t,
7881
7881
  width: ((o = t == null ? void 0 : t.publication.dimensions) == null ? void 0 : o.width) ?? 0,
7882
7882
  height: ((s = t == null ? void 0 : t.publication.dimensions) == null ? void 0 : s.height) ?? 0,
7883
- className: je("h-full w-auto"),
7883
+ className: We("h-full w-auto"),
7884
7884
  ...r
7885
7885
  }
7886
7886
  ) });
@@ -7948,7 +7948,7 @@ function Hw(e, t) {
7948
7948
  [e, r, n]
7949
7949
  );
7950
7950
  }
7951
- function jw({ chatOpen: e, client: t, theme: n = "vox" }) {
7951
+ function Ww({ chatOpen: e, client: t, theme: n = "vox" }) {
7952
7952
  const {
7953
7953
  agent: { isActive: r = !1 } = {},
7954
7954
  session: i,
@@ -7983,11 +7983,11 @@ function jw({ chatOpen: e, client: t, theme: n = "vox" }) {
7983
7983
  ..._n.animate,
7984
7984
  transition: g
7985
7985
  }, y = g, E = g, w = a && a.publication && a.participant;
7986
- return /* @__PURE__ */ m("div", { className: "relative w-full h-full z-10 flex items-center justify-center", children: /* @__PURE__ */ m("div", { className: "relative w-full h-full max-w-2xl px-4 md:px-0", children: /* @__PURE__ */ N("div", { className: je(fr.grid), children: [
7986
+ return /* @__PURE__ */ m("div", { className: "relative w-full h-full z-10 flex items-center justify-center", children: /* @__PURE__ */ m("div", { className: "relative w-full h-full max-w-2xl px-4 md:px-0", children: /* @__PURE__ */ N("div", { className: We(fr.grid), children: [
7987
7987
  h && /* @__PURE__ */ m(
7988
7988
  "div",
7989
7989
  {
7990
- className: je([
7990
+ className: We([
7991
7991
  "grid",
7992
7992
  !e && fr.agentChatClosed,
7993
7993
  e && f && fr.agentChatOpenWithSecondTile,
@@ -8005,7 +8005,7 @@ function jw({ chatOpen: e, client: t, theme: n = "vox" }) {
8005
8005
  state: o,
8006
8006
  audioTrack: s || void 0,
8007
8007
  theme: n,
8008
- className: je(e ? "h-[90px]" : "h-auto w-full")
8008
+ className: We(e ? "h-[90px]" : "h-auto w-full")
8009
8009
  },
8010
8010
  "agent"
8011
8011
  ),
@@ -8018,7 +8018,7 @@ function jw({ chatOpen: e, client: t, theme: n = "vox" }) {
8018
8018
  animate: v,
8019
8019
  transition: E,
8020
8020
  videoTrack: a,
8021
- className: je(
8021
+ className: We(
8022
8022
  e ? "h-[90px] [&>video]:h-[90px] [&>video]:w-auto" : "h-auto w-full"
8023
8023
  )
8024
8024
  },
@@ -8030,7 +8030,7 @@ function jw({ chatOpen: e, client: t, theme: n = "vox" }) {
8030
8030
  /* @__PURE__ */ m(
8031
8031
  "div",
8032
8032
  {
8033
- className: je([
8033
+ className: We([
8034
8034
  "grid",
8035
8035
  e && fr.secondTileChatOpen,
8036
8036
  !e && fr.secondTileChatClosed
@@ -8071,7 +8071,7 @@ function jw({ chatOpen: e, client: t, theme: n = "vox" }) {
8071
8071
  )
8072
8072
  ] }) }) });
8073
8073
  }
8074
- const Ww = {
8074
+ const jw = {
8075
8075
  card: "text-gray-100 bg-gradient-to-b from-[#0a0a0a] via-[#121212] to-[#0a0a0a] border border-gray-800/50 w-full h-full flex flex-col justify-between overflow-hidden relative shadow-2xl",
8076
8076
  cardTopGradient: "pointer-events-none absolute top-0 left-0 w-full h-40 z-10 bg-gradient-to-b from-black/90 via-black/40 to-transparent",
8077
8077
  cardRadial: "absolute inset-0 bg-[radial-gradient(circle_at_50%_-20%,_rgba(75,85,99,0.08),transparent_50%)] opacity-100",
@@ -8316,7 +8316,7 @@ const Ww = {
8316
8316
  mutedIndicator: "bg-red-600 text-white shadow-xl shadow-red-500/40 font-semibold"
8317
8317
  }
8318
8318
  }, zu = {
8319
- dark: Ww,
8319
+ dark: jw,
8320
8320
  light: Gw,
8321
8321
  vox: Kw,
8322
8322
  midnight: qw
@@ -8478,17 +8478,17 @@ function Bo({
8478
8478
  }, G = (x) => {
8479
8479
  const $ = Array.from(x.target.files || []);
8480
8480
  $.length > 0 && k && k($), I.current && (I.current.value = "");
8481
- }, ie = je(
8481
+ }, ie = We(
8482
8482
  "flex items-center gap-3 px-3 py-2 w-full backdrop-blur-xl border-t",
8483
8483
  E ? "justify-between" : "justify-center",
8484
8484
  t === "light" ? "bg-white/95 border-gray-200" : "bg-black/90 border-gray-800"
8485
8485
  ), X = (x, $) => {
8486
8486
  var K, S, Y;
8487
- return $ === "end-call" ? je(
8487
+ return $ === "end-call" ? We(
8488
8488
  "p-3 rounded-full transition-all duration-200",
8489
8489
  ((K = O.video) == null ? void 0 : K.endCall) || "bg-red-500 text-white hover:bg-red-600",
8490
8490
  n ? "opacity-50 cursor-not-allowed" : "hover:scale-105"
8491
- ) : je(
8491
+ ) : We(
8492
8492
  "p-3 rounded-full transition-all duration-200",
8493
8493
  x ? ((S = O.video) == null ? void 0 : S.controlEnabled) || "bg-green-500 text-white" : ((Y = O.video) == null ? void 0 : Y.controlDisabled) || "bg-gray-500 text-white",
8494
8494
  n ? "opacity-50 cursor-not-allowed" : "hover:scale-105"
@@ -8505,7 +8505,7 @@ function Bo({
8505
8505
  return (x = I.current) == null ? void 0 : x.click();
8506
8506
  },
8507
8507
  disabled: n,
8508
- className: je(
8508
+ className: We(
8509
8509
  "p-2 rounded-full transition-all duration-200",
8510
8510
  t === "light" ? "hover:bg-gray-100" : "hover:bg-gray-800",
8511
8511
  n && "opacity-50 cursor-not-allowed"
@@ -8535,7 +8535,7 @@ function Bo({
8535
8535
  onKeyDown: D,
8536
8536
  disabled: n,
8537
8537
  placeholder: w,
8538
- className: je(
8538
+ className: We(
8539
8539
  "flex-1 px-4 py-2 rounded-full border outline-none transition-all",
8540
8540
  t === "light" ? "bg-gray-100 border-gray-300 focus:border-blue-500 text-gray-900" : "bg-gray-800 border-gray-700 focus:border-blue-400 text-white",
8541
8541
  n && "opacity-50 cursor-not-allowed"
@@ -8547,7 +8547,7 @@ function Bo({
8547
8547
  {
8548
8548
  onClick: F,
8549
8549
  disabled: n || !b.trim(),
8550
- className: je(
8550
+ className: We(
8551
8551
  "p-2 rounded-full transition-all duration-200",
8552
8552
  b.trim() ? ((U = O.video) == null ? void 0 : U.controlEnabled) || "bg-blue-500 text-white hover:bg-blue-600" : t === "light" ? "bg-gray-200 text-gray-400" : "bg-gray-700 text-gray-500",
8553
8553
  n && "opacity-50 cursor-not-allowed",
@@ -8933,9 +8933,9 @@ function Hu(e, t) {
8933
8933
  }
8934
8934
  const cE = /[ \t\n\f\r]/g;
8935
8935
  function uE(e) {
8936
- return typeof e == "object" ? e.type === "text" ? ju(e.value) : !1 : ju(e);
8936
+ return typeof e == "object" ? e.type === "text" ? Wu(e.value) : !1 : Wu(e);
8937
8937
  }
8938
- function ju(e) {
8938
+ function Wu(e) {
8939
8939
  return e.replace(cE, "") === "";
8940
8940
  }
8941
8941
  class Ni {
@@ -8965,7 +8965,7 @@ function kp(e, t) {
8965
8965
  function Oa(e) {
8966
8966
  return e.toLowerCase();
8967
8967
  }
8968
- class Wt {
8968
+ class jt {
8969
8969
  /**
8970
8970
  * @param {string} property
8971
8971
  * Property.
@@ -8978,18 +8978,18 @@ class Wt {
8978
8978
  this.attribute = n, this.property = t;
8979
8979
  }
8980
8980
  }
8981
- Wt.prototype.attribute = "";
8982
- Wt.prototype.booleanish = !1;
8983
- Wt.prototype.boolean = !1;
8984
- Wt.prototype.commaOrSpaceSeparated = !1;
8985
- Wt.prototype.commaSeparated = !1;
8986
- Wt.prototype.defined = !1;
8987
- Wt.prototype.mustUseProperty = !1;
8988
- Wt.prototype.number = !1;
8989
- Wt.prototype.overloadedBoolean = !1;
8990
- Wt.prototype.property = "";
8991
- Wt.prototype.spaceSeparated = !1;
8992
- Wt.prototype.space = void 0;
8981
+ jt.prototype.attribute = "";
8982
+ jt.prototype.booleanish = !1;
8983
+ jt.prototype.boolean = !1;
8984
+ jt.prototype.commaOrSpaceSeparated = !1;
8985
+ jt.prototype.commaSeparated = !1;
8986
+ jt.prototype.defined = !1;
8987
+ jt.prototype.mustUseProperty = !1;
8988
+ jt.prototype.number = !1;
8989
+ jt.prototype.overloadedBoolean = !1;
8990
+ jt.prototype.property = "";
8991
+ jt.prototype.spaceSeparated = !1;
8992
+ jt.prototype.space = void 0;
8993
8993
  let dE = 0;
8994
8994
  const Ie = cr(), vt = cr(), Pa = cr(), Z = cr(), it = cr(), Rr = cr(), qt = cr();
8995
8995
  function cr() {
@@ -9008,7 +9008,7 @@ const Da = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9008
9008
  /** @type {ReadonlyArray<keyof typeof types>} */
9009
9009
  Object.keys(Da)
9010
9010
  );
9011
- class Pl extends Wt {
9011
+ class Pl extends jt {
9012
9012
  /**
9013
9013
  * @constructor
9014
9014
  * @param {string} property
@@ -9024,18 +9024,18 @@ class Pl extends Wt {
9024
9024
  */
9025
9025
  constructor(t, n, r, i) {
9026
9026
  let o = -1;
9027
- if (super(t, n), Wu(this, "space", i), typeof r == "number")
9027
+ if (super(t, n), ju(this, "space", i), typeof r == "number")
9028
9028
  for (; ++o < Cs.length; ) {
9029
9029
  const s = Cs[o];
9030
- Wu(this, Cs[o], (r & Da[s]) === Da[s]);
9030
+ ju(this, Cs[o], (r & Da[s]) === Da[s]);
9031
9031
  }
9032
9032
  }
9033
9033
  }
9034
9034
  Pl.prototype.defined = !0;
9035
- function Wu(e, t, n) {
9035
+ function ju(e, t, n) {
9036
9036
  n && (e[t] = n);
9037
9037
  }
9038
- function Wr(e) {
9038
+ function jr(e) {
9039
9039
  const t = {}, n = {};
9040
9040
  for (const [r, i] of Object.entries(e.properties)) {
9041
9041
  const o = new Pl(
@@ -9048,7 +9048,7 @@ function Wr(e) {
9048
9048
  }
9049
9049
  return new Ni(t, n, e.space);
9050
9050
  }
9051
- const _p = Wr({
9051
+ const _p = jr({
9052
9052
  properties: {
9053
9053
  ariaActiveDescendant: null,
9054
9054
  ariaAtomic: vt,
@@ -9110,7 +9110,7 @@ function Cp(e, t) {
9110
9110
  function Tp(e, t) {
9111
9111
  return Cp(e, t.toLowerCase());
9112
9112
  }
9113
- const fE = Wr({
9113
+ const fE = jr({
9114
9114
  attributes: {
9115
9115
  acceptcharset: "accept-charset",
9116
9116
  classname: "class",
@@ -9471,7 +9471,7 @@ const fE = Wr({
9471
9471
  },
9472
9472
  space: "html",
9473
9473
  transform: Tp
9474
- }), hE = Wr({
9474
+ }), hE = jr({
9475
9475
  attributes: {
9476
9476
  accentHeight: "accent-height",
9477
9477
  alignmentBaseline: "alignment-baseline",
@@ -10030,7 +10030,7 @@ const fE = Wr({
10030
10030
  },
10031
10031
  space: "svg",
10032
10032
  transform: Cp
10033
- }), Np = Wr({
10033
+ }), Np = jr({
10034
10034
  properties: {
10035
10035
  xLinkActuate: null,
10036
10036
  xLinkArcRole: null,
@@ -10044,12 +10044,12 @@ const fE = Wr({
10044
10044
  transform(e, t) {
10045
10045
  return "xlink:" + t.slice(5).toLowerCase();
10046
10046
  }
10047
- }), Ap = Wr({
10047
+ }), Ap = jr({
10048
10048
  attributes: { xmlnsxlink: "xmlns:xlink" },
10049
10049
  properties: { xmlnsXLink: null, xmlns: null },
10050
10050
  space: "xmlns",
10051
10051
  transform: Tp
10052
- }), Mp = Wr({
10052
+ }), Mp = jr({
10053
10053
  properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
10054
10054
  space: "xml",
10055
10055
  transform(e, t) {
@@ -10076,7 +10076,7 @@ const fE = Wr({
10076
10076
  }, mE = /[A-Z]/g, Gu = /-[a-z]/g, gE = /^data[-\w.:]+$/i;
10077
10077
  function bE(e, t) {
10078
10078
  const n = Oa(t);
10079
- let r = t, i = Wt;
10079
+ let r = t, i = jt;
10080
10080
  if (n in e.normal)
10081
10081
  return e.property[e.normal[n]];
10082
10082
  if (n.length > 4 && n.slice(0, 4) === "data" && gE.test(t)) {
@@ -10502,7 +10502,7 @@ function UE(e, t) {
10502
10502
  let r, i;
10503
10503
  for (i in t.properties)
10504
10504
  if (i !== "children" && Fl.call(t.properties, i)) {
10505
- const o = jE(e, i, t.properties[i]);
10505
+ const o = WE(e, i, t.properties[i]);
10506
10506
  if (o) {
10507
10507
  const [s, a] = o;
10508
10508
  e.tableCellAlignToStyle && s === "align" && typeof a == "string" && IE.has(t.tagName) ? r = a : n[s] = a;
@@ -10568,11 +10568,11 @@ function $l(e, t) {
10568
10568
  }
10569
10569
  return n;
10570
10570
  }
10571
- function jE(e, t, n) {
10571
+ function WE(e, t, n) {
10572
10572
  const r = bE(e.schema, t);
10573
10573
  if (!(n == null || typeof n == "number" && Number.isNaN(n))) {
10574
10574
  if (Array.isArray(n) && (n = r.commaSeparated ? oE(n) : wE(n)), r.property === "style") {
10575
- let i = typeof n == "object" ? n : WE(e, String(n));
10575
+ let i = typeof n == "object" ? n : jE(e, String(n));
10576
10576
  return e.stylePropertyNameCase === "css" && (i = GE(i)), ["style", i];
10577
10577
  }
10578
10578
  return [
@@ -10581,7 +10581,7 @@ function jE(e, t, n) {
10581
10581
  ];
10582
10582
  }
10583
10583
  }
10584
- function WE(e, t) {
10584
+ function jE(e, t) {
10585
10585
  try {
10586
10586
  return TE(t, { reactCompat: !0 });
10587
10587
  } catch (n) {
@@ -11634,7 +11634,7 @@ function IS(e, t, n) {
11634
11634
  return !r.parser.constructs.disable.null.includes("codeIndented") && a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? t(s) : e.interrupt(r.parser.constructs.flow, n, t)(s);
11635
11635
  }
11636
11636
  }
11637
- function jp(e, t, n, r, i, o, s, a, l) {
11637
+ function Wp(e, t, n, r, i, o, s, a, l) {
11638
11638
  const c = l || Number.POSITIVE_INFINITY;
11639
11639
  let u = 0;
11640
11640
  return d;
@@ -11661,7 +11661,7 @@ function jp(e, t, n, r, i, o, s, a, l) {
11661
11661
  return y === 40 || y === 41 || y === 92 ? (e.consume(y), p) : p(y);
11662
11662
  }
11663
11663
  }
11664
- function Wp(e, t, n, r, i, o) {
11664
+ function jp(e, t, n, r, i, o) {
11665
11665
  const s = this;
11666
11666
  let a = 0, l;
11667
11667
  return c;
@@ -11728,7 +11728,7 @@ function DS(e, t, n) {
11728
11728
  return e.enter("definition"), s(h);
11729
11729
  }
11730
11730
  function s(h) {
11731
- return Wp.call(
11731
+ return jp.call(
11732
11732
  r,
11733
11733
  e,
11734
11734
  a,
@@ -11746,7 +11746,7 @@ function DS(e, t, n) {
11746
11746
  return tt(h) ? fi(e, c)(h) : c(h);
11747
11747
  }
11748
11748
  function c(h) {
11749
- return jp(
11749
+ return Wp(
11750
11750
  e,
11751
11751
  u,
11752
11752
  // Note: we donโ€™t need to reset the way `markdown-rs` does.
@@ -11904,10 +11904,10 @@ const US = [
11904
11904
  name: "htmlFlow",
11905
11905
  resolveTo: GS,
11906
11906
  tokenize: KS
11907
- }, jS = {
11907
+ }, WS = {
11908
11908
  partial: !0,
11909
11909
  tokenize: YS
11910
- }, WS = {
11910
+ }, jS = {
11911
11911
  partial: !0,
11912
11912
  tokenize: qS
11913
11913
  };
@@ -11984,10 +11984,10 @@ function KS(e, t, n) {
11984
11984
  return S === null || ye(S) ? I(S) : Fe(S) ? (e.consume(S), M) : n(S);
11985
11985
  }
11986
11986
  function I(S) {
11987
- return S === 45 && i === 2 ? (e.consume(S), ie) : S === 60 && i === 1 ? (e.consume(S), X) : S === 62 && i === 4 ? (e.consume(S), $) : S === 63 && i === 3 ? (e.consume(S), x) : S === 93 && i === 5 ? (e.consume(S), U) : ye(S) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check(jS, K, F)(S)) : S === null || ye(S) ? (e.exit("htmlFlowData"), F(S)) : (e.consume(S), I);
11987
+ return S === 45 && i === 2 ? (e.consume(S), ie) : S === 60 && i === 1 ? (e.consume(S), X) : S === 62 && i === 4 ? (e.consume(S), $) : S === 63 && i === 3 ? (e.consume(S), x) : S === 93 && i === 5 ? (e.consume(S), U) : ye(S) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check(WS, K, F)(S)) : S === null || ye(S) ? (e.exit("htmlFlowData"), F(S)) : (e.consume(S), I);
11988
11988
  }
11989
11989
  function F(S) {
11990
- return e.check(WS, D, K)(S);
11990
+ return e.check(jS, D, K)(S);
11991
11991
  }
11992
11992
  function D(S) {
11993
11993
  return e.enter("lineEnding"), e.consume(S), e.exit("lineEnding"), G;
@@ -12235,7 +12235,7 @@ function ik(e, t, n) {
12235
12235
  return tt(d) ? fi(e, o)(d) : o(d);
12236
12236
  }
12237
12237
  function o(d) {
12238
- return d === 41 ? u(d) : jp(e, s, a, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(d);
12238
+ return d === 41 ? u(d) : Wp(e, s, a, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(d);
12239
12239
  }
12240
12240
  function s(d) {
12241
12241
  return tt(d) ? fi(e, l)(d) : u(d);
@@ -12257,7 +12257,7 @@ function ok(e, t, n) {
12257
12257
  const r = this;
12258
12258
  return i;
12259
12259
  function i(a) {
12260
- return Wp.call(r, e, o, s, "reference", "referenceMarker", "referenceString")(a);
12260
+ return jp.call(r, e, o, s, "reference", "referenceMarker", "referenceString")(a);
12261
12261
  }
12262
12262
  function o(a) {
12263
12263
  return r.parser.defined.includes(hn(r.sliceSerialize(r.events[r.events.length - 1][1]).slice(1, -1))) ? t(a) : n(a);
@@ -12765,14 +12765,14 @@ function Bk(e, t, n) {
12765
12765
  ) : $(D);
12766
12766
  function $(B) {
12767
12767
  return q;
12768
- function q(W) {
12769
- const ce = W !== null && B[W], Q = W !== null && B.null, xe = [
12768
+ function q(j) {
12769
+ const ce = j !== null && B[j], Q = j !== null && B.null, xe = [
12770
12770
  // To do: add more extension tests.
12771
12771
  /* c8 ignore next 2 */
12772
12772
  ...Array.isArray(ce) ? ce : ce ? [ce] : [],
12773
12773
  ...Array.isArray(Q) ? Q : Q ? [Q] : []
12774
12774
  ];
12775
- return K(xe)(W);
12775
+ return K(xe)(j);
12776
12776
  }
12777
12777
  }
12778
12778
  function K(B) {
@@ -12780,7 +12780,7 @@ function Bk(e, t, n) {
12780
12780
  }
12781
12781
  function S(B) {
12782
12782
  return q;
12783
- function q(W) {
12783
+ function q(j) {
12784
12784
  return x = O(), U = B, B.partial || (c.currentConstruct = B), B.name && c.parser.constructs.disable.null.includes(B.name) ? te() : B.tokenize.call(
12785
12785
  // If we do have fields, create an object w/ `context` as its
12786
12786
  // prototype.
@@ -12789,7 +12789,7 @@ function Bk(e, t, n) {
12789
12789
  l,
12790
12790
  Y,
12791
12791
  te
12792
- )(W);
12792
+ )(j);
12793
12793
  }
12794
12794
  }
12795
12795
  function Y(B) {
@@ -12934,9 +12934,9 @@ function Hk() {
12934
12934
  return a && (r && l.push(-5), t && l.push(t), l.push(null)), l;
12935
12935
  }
12936
12936
  }
12937
- const jk = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
12938
- function Wk(e) {
12939
- return e.replace(jk, Gk);
12937
+ const Wk = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
12938
+ function jk(e) {
12939
+ return e.replace(Wk, Gk);
12940
12940
  }
12941
12941
  function Gk(e, t, n) {
12942
12942
  if (t)
@@ -13003,7 +13003,7 @@ function qk(e) {
13003
13003
  atxHeadingSequence: k,
13004
13004
  autolink: l(),
13005
13005
  autolinkEmail: ce,
13006
- autolinkProtocol: W,
13006
+ autolinkProtocol: j,
13007
13007
  blockQuote: l(),
13008
13008
  characterEscapeValue: b,
13009
13009
  characterReferenceMarkerHexadecimal: te,
@@ -13304,7 +13304,7 @@ function qk(e) {
13304
13304
  }
13305
13305
  function V(H) {
13306
13306
  const J = this.sliceSerialize(H), ve = this.stack[this.stack.length - 2];
13307
- ve.label = Wk(J), ve.identifier = hn(J).toLowerCase();
13307
+ ve.label = jk(J), ve.identifier = hn(J).toLowerCase();
13308
13308
  }
13309
13309
  function U() {
13310
13310
  const H = this.stack[this.stack.length - 1], J = this.resume(), ve = this.stack[this.stack.length - 1];
@@ -13346,7 +13346,7 @@ function qk(e) {
13346
13346
  const J = this.stack.pop();
13347
13347
  J.position.end = Bn(H.end);
13348
13348
  }
13349
- function W(H) {
13349
+ function j(H) {
13350
13350
  b.call(this, H);
13351
13351
  const J = this.stack[this.stack.length - 1];
13352
13352
  J.url = this.sliceSerialize(H);
@@ -13874,14 +13874,14 @@ const E1 = {
13874
13874
  tableRow: b1,
13875
13875
  text: v1,
13876
13876
  thematicBreak: w1,
13877
- toml: Wi,
13878
- yaml: Wi,
13879
- definition: Wi,
13880
- footnoteDefinition: Wi
13877
+ toml: ji,
13878
+ yaml: ji,
13879
+ definition: ji,
13880
+ footnoteDefinition: ji
13881
13881
  };
13882
- function Wi() {
13882
+ function ji() {
13883
13883
  }
13884
- const Jp = -1, Uo = 0, hi = 1, ko = 2, Hl = 3, jl = 4, Wl = 5, Gl = 6, em = 7, tm = 8, hd = typeof self == "object" ? self : globalThis, S1 = (e, t) => {
13884
+ const Jp = -1, Uo = 0, hi = 1, ko = 2, Hl = 3, Wl = 4, jl = 5, Gl = 6, em = 7, tm = 8, hd = typeof self == "object" ? self : globalThis, S1 = (e, t) => {
13885
13885
  const n = (i, o) => (e.set(o, i), i), r = (i) => {
13886
13886
  if (e.has(i))
13887
13887
  return e.get(i);
@@ -13904,11 +13904,11 @@ const Jp = -1, Uo = 0, hi = 1, ko = 2, Hl = 3, jl = 4, Wl = 5, Gl = 6, em = 7, t
13904
13904
  }
13905
13905
  case Hl:
13906
13906
  return n(new Date(s), i);
13907
- case jl: {
13907
+ case Wl: {
13908
13908
  const { source: a, flags: l } = s;
13909
13909
  return n(new RegExp(a, l), i);
13910
13910
  }
13911
- case Wl: {
13911
+ case jl: {
13912
13912
  const a = n(/* @__PURE__ */ new Map(), i);
13913
13913
  for (const [l, c] of s)
13914
13914
  a.set(r(l), r(c));
@@ -13951,9 +13951,9 @@ const Jp = -1, Uo = 0, hi = 1, ko = 2, Hl = 3, jl = 4, Wl = 5, Gl = 6, em = 7, t
13951
13951
  case "Date":
13952
13952
  return [Hl, pr];
13953
13953
  case "RegExp":
13954
- return [jl, pr];
13955
- case "Map":
13956
13954
  return [Wl, pr];
13955
+ case "Map":
13956
+ return [jl, pr];
13957
13957
  case "Set":
13958
13958
  return [Gl, pr];
13959
13959
  case "DataView":
@@ -14015,11 +14015,11 @@ const Jp = -1, Uo = 0, hi = 1, ko = 2, Hl = 3, jl = 4, Wl = 5, Gl = 6, em = 7, t
14015
14015
  }
14016
14016
  case Hl:
14017
14017
  return i([a, s.toISOString()], s);
14018
- case jl: {
14018
+ case Wl: {
14019
14019
  const { source: u, flags: d } = s;
14020
14020
  return i([a, { source: u, flags: d }], s);
14021
14021
  }
14022
- case Wl: {
14022
+ case jl: {
14023
14023
  const u = [], d = i([a, u], s);
14024
14024
  for (const [f, h] of s)
14025
14025
  (e || !(Gi(ti(f)) || Gi(ti(h)))) && u.push([o(f), o(h)]);
@@ -14255,7 +14255,7 @@ function rm(e, t, n, r) {
14255
14255
  function F1(e) {
14256
14256
  return Array.isArray(e) ? e : typeof e == "number" ? [D1, e] : e == null ? nm : [e];
14257
14257
  }
14258
- function jo(e, t, n, r) {
14258
+ function Wo(e, t, n, r) {
14259
14259
  let i, o, s;
14260
14260
  typeof t == "function" && typeof n != "function" ? (o = void 0, s = t, i = n) : (o = t, s = n, i = r), rm(e, o, a, i);
14261
14261
  function a(l, c) {
@@ -14278,7 +14278,7 @@ function $1(e, t) {
14278
14278
  patch: V1,
14279
14279
  wrap: H1
14280
14280
  };
14281
- return jo(e, function(u) {
14281
+ return Wo(e, function(u) {
14282
14282
  if (u.type === "definition" || u.type === "footnoteDefinition") {
14283
14283
  const d = u.type === "definition" ? r : i, f = String(u.identifier).toUpperCase();
14284
14284
  d.has(f) || d.set(f, u);
@@ -14364,7 +14364,7 @@ function bd(e, t) {
14364
14364
  return i && o.children.push({ type: "text", value: `
14365
14365
  ` }, i), o;
14366
14366
  }
14367
- function j1(e, t) {
14367
+ function W1(e, t) {
14368
14368
  return e && "run" in e ? async function(n, r) {
14369
14369
  const i = (
14370
14370
  /** @type {HastRoot} */
@@ -14383,7 +14383,7 @@ function yd(e) {
14383
14383
  throw e;
14384
14384
  }
14385
14385
  var Rs, xd;
14386
- function W1() {
14386
+ function j1() {
14387
14387
  if (xd) return Rs;
14388
14388
  xd = 1;
14389
14389
  var e = Object.prototype.hasOwnProperty, t = Object.prototype.toString, n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = function(c) {
@@ -14422,7 +14422,7 @@ function W1() {
14422
14422
  return p;
14423
14423
  }, Rs;
14424
14424
  }
14425
- var G1 = W1();
14425
+ var G1 = j1();
14426
14426
  const Is = /* @__PURE__ */ $o(G1);
14427
14427
  function za(e) {
14428
14428
  if (typeof e != "object" || e === null)
@@ -15617,7 +15617,7 @@ function m_(e) {
15617
15617
  }
15618
15618
  function g_(e) {
15619
15619
  const t = e.rehypePlugins || Sd, n = e.remarkPlugins || Sd, r = e.remarkRehypeOptions ? { ...e.remarkRehypeOptions, ...kd } : kd;
15620
- return l_().use(Zk).use(n).use(j1, r).use(t);
15620
+ return l_().use(Zk).use(n).use(W1, r).use(t);
15621
15621
  }
15622
15622
  function b_(e) {
15623
15623
  const t = e.children || "", n = new im();
@@ -15627,7 +15627,7 @@ function y_(e, t) {
15627
15627
  const n = t.allowedElements, r = t.allowElement, i = t.components, o = t.disallowedElements, s = t.skipHtml, a = t.unwrapDisallowed, l = t.urlTransform || x_;
15628
15628
  for (const u of p_)
15629
15629
  Object.hasOwn(t, u.from) && ("" + u.from + (u.to ? "use `" + u.to + "` instead" : "remove it") + f_ + u.id, void 0);
15630
- return jo(e, c), OE(e, {
15630
+ return Wo(e, c), OE(e, {
15631
15631
  Fragment: Tt,
15632
15632
  components: i,
15633
15633
  ignoreInvalidStyle: !0,
@@ -15863,7 +15863,7 @@ function om(e, t) {
15863
15863
  return (e.index === 0 || ar(n) || Vo(n)) && // If itโ€™s an email, the previous character should not be a slash.
15864
15864
  (!t || n !== 47);
15865
15865
  }
15866
- sm.peek = W_;
15866
+ sm.peek = j_;
15867
15867
  function F_() {
15868
15868
  this.buffer();
15869
15869
  }
@@ -15894,10 +15894,10 @@ function H_(e) {
15894
15894
  this.sliceSerialize(e)
15895
15895
  ).toLowerCase(), n.label = t;
15896
15896
  }
15897
- function j_(e) {
15897
+ function W_(e) {
15898
15898
  this.exit(e);
15899
15899
  }
15900
- function W_() {
15900
+ function j_() {
15901
15901
  return "[";
15902
15902
  }
15903
15903
  function sm(e, t, n, r) {
@@ -15920,7 +15920,7 @@ function G_() {
15920
15920
  gfmFootnoteCallString: z_,
15921
15921
  gfmFootnoteCall: U_,
15922
15922
  gfmFootnoteDefinitionLabelString: H_,
15923
- gfmFootnoteDefinition: j_
15923
+ gfmFootnoteDefinition: W_
15924
15924
  }
15925
15925
  };
15926
15926
  }
@@ -16275,7 +16275,7 @@ function pC(e, t, n) {
16275
16275
  }
16276
16276
  function mC(e, t) {
16277
16277
  let n = !1;
16278
- return jo(e, function(r) {
16278
+ return Wo(e, function(r) {
16279
16279
  if ("value" in r && /\r?\n|\r/.test(r.value) || r.type === "break")
16280
16280
  return n = !0, $a;
16281
16281
  }), !!((!e.depth || e.depth < 3) && Vl(e) && (t.options.setext || n));
@@ -16799,11 +16799,11 @@ function HC() {
16799
16799
  exit: {
16800
16800
  taskListCheckValueChecked: Md,
16801
16801
  taskListCheckValueUnchecked: Md,
16802
- paragraph: WC
16802
+ paragraph: jC
16803
16803
  }
16804
16804
  };
16805
16805
  }
16806
- function jC() {
16806
+ function WC() {
16807
16807
  return {
16808
16808
  unsafe: [{ atBreak: !0, character: "-", after: "[:|-]" }],
16809
16809
  handlers: { listItem: GC }
@@ -16813,7 +16813,7 @@ function Md(e) {
16813
16813
  const t = this.stack[this.stack.length - 2];
16814
16814
  t.type, t.checked = e.type === "taskListCheckValueChecked";
16815
16815
  }
16816
- function WC(e) {
16816
+ function jC(e) {
16817
16817
  const t = this.stack[this.stack.length - 2];
16818
16818
  if (t && t.type === "listItem" && typeof t.checked == "boolean") {
16819
16819
  const n = this.stack[this.stack.length - 1];
@@ -16862,7 +16862,7 @@ function qC(e) {
16862
16862
  K_(e),
16863
16863
  X_(),
16864
16864
  UC(e),
16865
- jC()
16865
+ WC()
16866
16866
  ]
16867
16867
  };
16868
16868
  }
@@ -17673,7 +17673,7 @@ function RT(e) {
17673
17673
  function IT(e) {
17674
17674
  return e !== null && typeof e == "object" && "type" in e && "tagName" in e;
17675
17675
  }
17676
- const Od = /\n/g, Pd = /[\t ]+/g, ja = ur("br"), Dd = ur(VT), OT = ur("p"), Ld = ur("tr"), PT = ur([
17676
+ const Od = /\n/g, Pd = /[\t ]+/g, Wa = ur("br"), Dd = ur(VT), OT = ur("p"), Ld = ur("tr"), PT = ur([
17677
17677
  // List from: <https://html.spec.whatwg.org/multipage/rendering.html#hidden-elements>
17678
17678
  "datalist",
17679
17679
  "head",
@@ -17792,7 +17792,7 @@ function DT(e, t) {
17792
17792
  {
17793
17793
  whitespace: o,
17794
17794
  breakBefore: a ? void 0 : i,
17795
- breakAfter: a < r.length - 1 ? ja(r[a + 1]) : i
17795
+ breakAfter: a < r.length - 1 ? Wa(r[a + 1]) : i
17796
17796
  }
17797
17797
  )
17798
17798
  );
@@ -17814,14 +17814,14 @@ function LT(e, t, n) {
17814
17814
  if (PT(e))
17815
17815
  return s;
17816
17816
  let a, l;
17817
- for (ja(e) || Ld(e) && // @ts-expect-error: something up with types of parents.
17817
+ for (Wa(e) || Ld(e) && // @ts-expect-error: something up with types of parents.
17818
17818
  Id(t, e, Ld) ? l = `
17819
17819
  ` : OT(e) ? (a = 2, l = 2) : Nm(e) && (a = 1, l = 1); ++o < i.length; )
17820
17820
  s = s.concat(
17821
17821
  Am(i[o], e, {
17822
17822
  whitespace: r,
17823
17823
  breakBefore: o ? void 0 : a,
17824
- breakAfter: o < i.length - 1 ? ja(i[o + 1]) : l
17824
+ breakAfter: o < i.length - 1 ? Wa(i[o + 1]) : l
17825
17825
  })
17826
17826
  );
17827
17827
  return Dd(e) && // @ts-expect-error: something up with types of parents.
@@ -18793,7 +18793,7 @@ function HT(e) {
18793
18793
  ...t.built_in
18794
18794
  ], r._hints = t._hints, n.name = "Arduino", n.aliases = ["ino"], n.supersetOf = "cpp", n;
18795
18795
  }
18796
- function jT(e) {
18796
+ function WT(e) {
18797
18797
  const t = e.regex, n = {}, r = {
18798
18798
  begin: /\$\{/,
18799
18799
  end: /\}/,
@@ -19167,7 +19167,7 @@ function jT(e) {
19167
19167
  ]
19168
19168
  };
19169
19169
  }
19170
- function WT(e) {
19170
+ function jT(e) {
19171
19171
  const t = e.regex, n = e.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }), r = "decltype\\(auto\\)", i = "[a-zA-Z_]\\w*::", s = "(" + r + "|" + t.optional(i) + "[a-zA-Z_]\\w*" + t.optional("<[^<>]+>") + ")", a = {
19172
19172
  className: "type",
19173
19173
  variants: [
@@ -27023,7 +27023,7 @@ const FN = (e) => ({
27023
27023
  "selection",
27024
27024
  "slotted",
27025
27025
  "spelling-error"
27026
- ].sort().reverse(), jN = [
27026
+ ].sort().reverse(), WN = [
27027
27027
  "accent-color",
27028
27028
  "align-content",
27029
27029
  "align-items",
@@ -27540,7 +27540,7 @@ const FN = (e) => ({
27540
27540
  "z-index",
27541
27541
  "zoom"
27542
27542
  ].sort().reverse();
27543
- function WN(e) {
27543
+ function jN(e) {
27544
27544
  const t = FN(e), n = HN, r = UN, i = "@[a-z-]+", o = "and or not only", a = {
27545
27545
  className: "variable",
27546
27546
  begin: "(\\$" + "[a-zA-Z-][a-zA-Z0-9_-]*" + ")\\b",
@@ -27591,7 +27591,7 @@ function WN(e) {
27591
27591
  t.CSS_VARIABLE,
27592
27592
  {
27593
27593
  className: "attribute",
27594
- begin: "\\b(" + jN.join("|") + ")\\b"
27594
+ begin: "\\b(" + WN.join("|") + ")\\b"
27595
27595
  },
27596
27596
  { begin: "\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b" },
27597
27597
  {
@@ -28544,7 +28544,7 @@ const Ql = (e) => Ze(
28544
28544
  /[\uFE20-\uFE2F]/
28545
28545
  // TODO: The following characters are also allowed, but the regex isn't supported yet.
28546
28546
  // /[\u{E0100}-\u{E01EF}]/u
28547
- ), js = Ze($m, Vm, "*"), zm = Bt(
28547
+ ), Ws = Ze($m, Vm, "*"), zm = Bt(
28548
28548
  /[a-zA-Z_]/,
28549
28549
  /[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,
28550
28550
  /[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,
@@ -28671,7 +28671,7 @@ function tA(e) {
28671
28671
  className: "operator",
28672
28672
  relevance: 0,
28673
28673
  variants: [
28674
- { match: js },
28674
+ { match: Ws },
28675
28675
  {
28676
28676
  // dot-operator: only operators that start with a dot are allowed to use dots as
28677
28677
  // characters (..., ...<, .*, etc). So there rule here is: a dot followed by one or more
@@ -28897,7 +28897,7 @@ function tA(e) {
28897
28897
  match: yn
28898
28898
  }
28899
28899
  ]
28900
- }, W = {
28900
+ }, j = {
28901
28901
  begin: /\(/,
28902
28902
  end: /\)/,
28903
28903
  keywords: c,
@@ -28918,7 +28918,7 @@ function tA(e) {
28918
28918
  match: [
28919
28919
  /(func|macro)/,
28920
28920
  /\s+/,
28921
- Bt(D.match, yn, js)
28921
+ Bt(D.match, yn, Ws)
28922
28922
  ],
28923
28923
  className: {
28924
28924
  1: "keyword",
@@ -28926,7 +28926,7 @@ function tA(e) {
28926
28926
  },
28927
28927
  contains: [
28928
28928
  B,
28929
- W,
28929
+ j,
28930
28930
  t
28931
28931
  ],
28932
28932
  illegal: [
@@ -28941,7 +28941,7 @@ function tA(e) {
28941
28941
  className: { 1: "keyword" },
28942
28942
  contains: [
28943
28943
  B,
28944
- W,
28944
+ j,
28945
28945
  t
28946
28946
  ],
28947
28947
  illegal: /\[|%/
@@ -28949,7 +28949,7 @@ function tA(e) {
28949
28949
  match: [
28950
28950
  /operator/,
28951
28951
  /\s+/,
28952
- js
28952
+ Ws
28953
28953
  ],
28954
28954
  className: {
28955
28955
  1: "keyword",
@@ -29130,7 +29130,7 @@ const No = "[A-Za-z$_][0-9A-Za-z$_]*", Um = [
29130
29130
  "undefined",
29131
29131
  "NaN",
29132
29132
  "Infinity"
29133
- ], jm = [
29133
+ ], Wm = [
29134
29134
  // Fundamental objects
29135
29135
  "Object",
29136
29136
  "Function",
@@ -29180,7 +29180,7 @@ const No = "[A-Za-z$_][0-9A-Za-z$_]*", Um = [
29180
29180
  "Intl",
29181
29181
  // WebAssembly
29182
29182
  "WebAssembly"
29183
- ], Wm = [
29183
+ ], jm = [
29184
29184
  "Error",
29185
29185
  "EvalError",
29186
29186
  "InternalError",
@@ -29221,8 +29221,8 @@ const No = "[A-Za-z$_][0-9A-Za-z$_]*", Um = [
29221
29221
  // Node.js
29222
29222
  ], qm = [].concat(
29223
29223
  Gm,
29224
- jm,
29225
- Wm
29224
+ Wm,
29225
+ jm
29226
29226
  );
29227
29227
  function nA(e) {
29228
29228
  const t = e.regex, n = (V, { after: U }) => {
@@ -29477,8 +29477,8 @@ function nA(e) {
29477
29477
  keywords: {
29478
29478
  _: [
29479
29479
  // se we still get relevance credit for JS library classes
29480
- ...jm,
29481
- ...Wm
29480
+ ...Wm,
29481
+ ...jm
29482
29482
  ]
29483
29483
  }
29484
29484
  }, O = {
@@ -30456,8 +30456,8 @@ function aA(e) {
30456
30456
  }
30457
30457
  const lA = {
30458
30458
  arduino: HT,
30459
- bash: jT,
30460
- c: WT,
30459
+ bash: WT,
30460
+ c: jT,
30461
30461
  cpp: GT,
30462
30462
  csharp: KT,
30463
30463
  css: nN,
@@ -30483,7 +30483,7 @@ const lA = {
30483
30483
  r: PN,
30484
30484
  ruby: DN,
30485
30485
  rust: LN,
30486
- scss: WN,
30486
+ scss: jN,
30487
30487
  shell: GN,
30488
30488
  sql: KN,
30489
30489
  swift: tA,
@@ -30493,17 +30493,17 @@ const lA = {
30493
30493
  xml: sA,
30494
30494
  yaml: aA
30495
30495
  };
30496
- var Ws, Ud;
30496
+ var js, Ud;
30497
30497
  function cA() {
30498
- if (Ud) return Ws;
30498
+ if (Ud) return js;
30499
30499
  Ud = 1;
30500
30500
  function e(T) {
30501
30501
  return T instanceof Map ? T.clear = T.delete = T.set = function() {
30502
30502
  throw new Error("map is read-only");
30503
30503
  } : T instanceof Set && (T.add = T.clear = T.delete = function() {
30504
30504
  throw new Error("set is read-only");
30505
- }), Object.freeze(T), Object.getOwnPropertyNames(T).forEach((j) => {
30506
- const re = T[j], Ne = typeof re;
30505
+ }), Object.freeze(T), Object.getOwnPropertyNames(T).forEach((W) => {
30506
+ const re = T[W], Ne = typeof re;
30507
30507
  (Ne === "object" || Ne === "function") && !Object.isFrozen(re) && e(re);
30508
30508
  }), T;
30509
30509
  }
@@ -30511,8 +30511,8 @@ function cA() {
30511
30511
  /**
30512
30512
  * @param {CompiledMode} mode
30513
30513
  */
30514
- constructor(j) {
30515
- j.data === void 0 && (j.data = {}), this.data = j.data, this.isMatchIgnored = !1;
30514
+ constructor(W) {
30515
+ W.data === void 0 && (W.data = {}), this.data = W.data, this.isMatchIgnored = !1;
30516
30516
  }
30517
30517
  ignoreMatch() {
30518
30518
  this.isMatchIgnored = !0;
@@ -30521,27 +30521,27 @@ function cA() {
30521
30521
  function n(T) {
30522
30522
  return T.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
30523
30523
  }
30524
- function r(T, ...j) {
30524
+ function r(T, ...W) {
30525
30525
  const re = /* @__PURE__ */ Object.create(null);
30526
30526
  for (const Ne in T)
30527
30527
  re[Ne] = T[Ne];
30528
- return j.forEach(function(Ne) {
30528
+ return W.forEach(function(Ne) {
30529
30529
  for (const ht in Ne)
30530
30530
  re[ht] = Ne[ht];
30531
30531
  }), /** @type {T} */
30532
30532
  re;
30533
30533
  }
30534
- const i = "</span>", o = (T) => !!T.scope, s = (T, { prefix: j }) => {
30534
+ const i = "</span>", o = (T) => !!T.scope, s = (T, { prefix: W }) => {
30535
30535
  if (T.startsWith("language:"))
30536
30536
  return T.replace("language:", "language-");
30537
30537
  if (T.includes(".")) {
30538
30538
  const re = T.split(".");
30539
30539
  return [
30540
- `${j}${re.shift()}`,
30540
+ `${W}${re.shift()}`,
30541
30541
  ...re.map((Ne, ht) => `${Ne}${"_".repeat(ht + 1)}`)
30542
30542
  ].join(" ");
30543
30543
  }
30544
- return `${j}${T}`;
30544
+ return `${W}${T}`;
30545
30545
  };
30546
30546
  class a {
30547
30547
  /**
@@ -30550,24 +30550,24 @@ function cA() {
30550
30550
  * @param {Tree} parseTree - the parse tree (must support `walk` API)
30551
30551
  * @param {{classPrefix: string}} options
30552
30552
  */
30553
- constructor(j, re) {
30554
- this.buffer = "", this.classPrefix = re.classPrefix, j.walk(this);
30553
+ constructor(W, re) {
30554
+ this.buffer = "", this.classPrefix = re.classPrefix, W.walk(this);
30555
30555
  }
30556
30556
  /**
30557
30557
  * Adds texts to the output stream
30558
30558
  *
30559
30559
  * @param {string} text */
30560
- addText(j) {
30561
- this.buffer += n(j);
30560
+ addText(W) {
30561
+ this.buffer += n(W);
30562
30562
  }
30563
30563
  /**
30564
30564
  * Adds a node open to the output stream (if needed)
30565
30565
  *
30566
30566
  * @param {Node} node */
30567
- openNode(j) {
30568
- if (!o(j)) return;
30567
+ openNode(W) {
30568
+ if (!o(W)) return;
30569
30569
  const re = s(
30570
- j.scope,
30570
+ W.scope,
30571
30571
  { prefix: this.classPrefix }
30572
30572
  );
30573
30573
  this.span(re);
@@ -30576,8 +30576,8 @@ function cA() {
30576
30576
  * Adds a node close to the output stream (if needed)
30577
30577
  *
30578
30578
  * @param {Node} node */
30579
- closeNode(j) {
30580
- o(j) && (this.buffer += i);
30579
+ closeNode(W) {
30580
+ o(W) && (this.buffer += i);
30581
30581
  }
30582
30582
  /**
30583
30583
  * returns the accumulated buffer
@@ -30590,13 +30590,13 @@ function cA() {
30590
30590
  * Builds a span element
30591
30591
  *
30592
30592
  * @param {string} className */
30593
- span(j) {
30594
- this.buffer += `<span class="${j}">`;
30593
+ span(W) {
30594
+ this.buffer += `<span class="${W}">`;
30595
30595
  }
30596
30596
  }
30597
30597
  const l = (T = {}) => {
30598
- const j = { children: [] };
30599
- return Object.assign(j, T), j;
30598
+ const W = { children: [] };
30599
+ return Object.assign(W, T), W;
30600
30600
  };
30601
30601
  class c {
30602
30602
  constructor() {
@@ -30609,12 +30609,12 @@ function cA() {
30609
30609
  return this.rootNode;
30610
30610
  }
30611
30611
  /** @param {Node} node */
30612
- add(j) {
30613
- this.top.children.push(j);
30612
+ add(W) {
30613
+ this.top.children.push(W);
30614
30614
  }
30615
30615
  /** @param {string} scope */
30616
- openNode(j) {
30617
- const re = l({ scope: j });
30616
+ openNode(W) {
30617
+ const re = l({ scope: W });
30618
30618
  this.add(re), this.stack.push(re);
30619
30619
  }
30620
30620
  closeNode() {
@@ -30631,21 +30631,21 @@ function cA() {
30631
30631
  * @typedef { import("./html_renderer").Renderer } Renderer
30632
30632
  * @param {Renderer} builder
30633
30633
  */
30634
- walk(j) {
30635
- return this.constructor._walk(j, this.rootNode);
30634
+ walk(W) {
30635
+ return this.constructor._walk(W, this.rootNode);
30636
30636
  }
30637
30637
  /**
30638
30638
  * @param {Renderer} builder
30639
30639
  * @param {Node} node
30640
30640
  */
30641
- static _walk(j, re) {
30642
- return typeof re == "string" ? j.addText(re) : re.children && (j.openNode(re), re.children.forEach((Ne) => this._walk(j, Ne)), j.closeNode(re)), j;
30641
+ static _walk(W, re) {
30642
+ return typeof re == "string" ? W.addText(re) : re.children && (W.openNode(re), re.children.forEach((Ne) => this._walk(W, Ne)), W.closeNode(re)), W;
30643
30643
  }
30644
30644
  /**
30645
30645
  * @param {Node} node
30646
30646
  */
30647
- static _collapse(j) {
30648
- typeof j != "string" && j.children && (j.children.every((re) => typeof re == "string") ? j.children = [j.children.join("")] : j.children.forEach((re) => {
30647
+ static _collapse(W) {
30648
+ typeof W != "string" && W.children && (W.children.every((re) => typeof re == "string") ? W.children = [W.children.join("")] : W.children.forEach((re) => {
30649
30649
  c._collapse(re);
30650
30650
  }));
30651
30651
  }
@@ -30654,18 +30654,18 @@ function cA() {
30654
30654
  /**
30655
30655
  * @param {*} options
30656
30656
  */
30657
- constructor(j) {
30658
- super(), this.options = j;
30657
+ constructor(W) {
30658
+ super(), this.options = W;
30659
30659
  }
30660
30660
  /**
30661
30661
  * @param {string} text
30662
30662
  */
30663
- addText(j) {
30664
- j !== "" && this.add(j);
30663
+ addText(W) {
30664
+ W !== "" && this.add(W);
30665
30665
  }
30666
30666
  /** @param {string} scope */
30667
- startScope(j) {
30668
- this.openNode(j);
30667
+ startScope(W) {
30668
+ this.openNode(W);
30669
30669
  }
30670
30670
  endScope() {
30671
30671
  this.closeNode();
@@ -30674,8 +30674,8 @@ function cA() {
30674
30674
  * @param {Emitter & {root: DataNode}} emitter
30675
30675
  * @param {string} name
30676
30676
  */
30677
- __addSublanguage(j, re) {
30678
- const Ne = j.root;
30677
+ __addSublanguage(W, re) {
30678
+ const Ne = W.root;
30679
30679
  re && (Ne.scope = `language:${re}`), this.add(Ne);
30680
30680
  }
30681
30681
  toHTML() {
@@ -30701,8 +30701,8 @@ function cA() {
30701
30701
  return T.map((re) => d(re)).join("");
30702
30702
  }
30703
30703
  function v(T) {
30704
- const j = T[T.length - 1];
30705
- return typeof j == "object" && j.constructor === Object ? (T.splice(T.length - 1, 1), j) : {};
30704
+ const W = T[T.length - 1];
30705
+ return typeof W == "object" && W.constructor === Object ? (T.splice(T.length - 1, 1), W) : {};
30706
30706
  }
30707
30707
  function y(...T) {
30708
30708
  return "(" + (v(T).capture ? "" : "?:") + T.map((Ne) => d(Ne)).join("|") + ")";
@@ -30710,12 +30710,12 @@ function cA() {
30710
30710
  function E(T) {
30711
30711
  return new RegExp(T.toString() + "|").exec("").length - 1;
30712
30712
  }
30713
- function w(T, j) {
30714
- const re = T && T.exec(j);
30713
+ function w(T, W) {
30714
+ const re = T && T.exec(W);
30715
30715
  return re && re.index === 0;
30716
30716
  }
30717
30717
  const _ = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
30718
- function k(T, { joinWith: j }) {
30718
+ function k(T, { joinWith: W }) {
30719
30719
  let re = 0;
30720
30720
  return T.map((Ne) => {
30721
30721
  re += 1;
@@ -30730,18 +30730,18 @@ function cA() {
30730
30730
  he += pt.substring(0, ue.index), pt = pt.substring(ue.index + ue[0].length), ue[0][0] === "\\" && ue[1] ? he += "\\" + String(Number(ue[1]) + ht) : (he += ue[0], ue[0] === "(" && re++);
30731
30731
  }
30732
30732
  return he;
30733
- }).map((Ne) => `(${Ne})`).join(j);
30733
+ }).map((Ne) => `(${Ne})`).join(W);
30734
30734
  }
30735
30735
  const C = /\b\B/, R = "[a-zA-Z]\\w*", A = "[a-zA-Z_]\\w*", O = "\\b\\d+(\\.\\d+)?", b = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", M = "\\b(0b[01]+)", I = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", F = (T = {}) => {
30736
- const j = /^#![ ]*\//;
30736
+ const W = /^#![ ]*\//;
30737
30737
  return T.binary && (T.begin = p(
30738
- j,
30738
+ W,
30739
30739
  /.*\b/,
30740
30740
  T.binary,
30741
30741
  /\b.*/
30742
30742
  )), r({
30743
30743
  scope: "meta",
30744
- begin: j,
30744
+ begin: W,
30745
30745
  end: /$/,
30746
30746
  relevance: 0,
30747
30747
  /** @type {ModeCallback} */
@@ -30766,12 +30766,12 @@ function cA() {
30766
30766
  contains: [D]
30767
30767
  }, X = {
30768
30768
  begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
30769
- }, V = function(T, j, re = {}) {
30769
+ }, V = function(T, W, re = {}) {
30770
30770
  const Ne = r(
30771
30771
  {
30772
30772
  scope: "comment",
30773
30773
  begin: T,
30774
- end: j,
30774
+ end: W,
30775
30775
  contains: []
30776
30776
  },
30777
30777
  re
@@ -30865,7 +30865,7 @@ function cA() {
30865
30865
  scope: "title",
30866
30866
  begin: A,
30867
30867
  relevance: 0
30868
- }, W = {
30868
+ }, j = {
30869
30869
  // excludes method names from keyword processing
30870
30870
  begin: "\\.\\s*" + A,
30871
30871
  relevance: 0
@@ -30886,12 +30886,12 @@ function cA() {
30886
30886
  T,
30887
30887
  {
30888
30888
  /** @type {ModeCallback} */
30889
- "on:begin": (j, re) => {
30890
- re.data._beginMatch = j[1];
30889
+ "on:begin": (W, re) => {
30890
+ re.data._beginMatch = W[1];
30891
30891
  },
30892
30892
  /** @type {ModeCallback} */
30893
- "on:end": (j, re) => {
30894
- re.data._beginMatch !== j[1] && re.ignoreMatch();
30893
+ "on:end": (W, re) => {
30894
+ re.data._beginMatch !== W[1] && re.ignoreMatch();
30895
30895
  }
30896
30896
  }
30897
30897
  );
@@ -30899,7 +30899,7 @@ function cA() {
30899
30899
  HASH_COMMENT_MODE: $,
30900
30900
  IDENT_RE: R,
30901
30901
  MATCH_NOTHING_RE: C,
30902
- METHOD_GUARD: W,
30902
+ METHOD_GUARD: j,
30903
30903
  NUMBER_MODE: K,
30904
30904
  NUMBER_RE: O,
30905
30905
  PHRASAL_WORDS_MODE: X,
@@ -30911,28 +30911,28 @@ function cA() {
30911
30911
  UNDERSCORE_IDENT_RE: A,
30912
30912
  UNDERSCORE_TITLE_MODE: q
30913
30913
  });
30914
- function xe(T, j) {
30915
- T.input[T.index - 1] === "." && j.ignoreMatch();
30914
+ function xe(T, W) {
30915
+ T.input[T.index - 1] === "." && W.ignoreMatch();
30916
30916
  }
30917
- function L(T, j) {
30917
+ function L(T, W) {
30918
30918
  T.className !== void 0 && (T.scope = T.className, delete T.className);
30919
30919
  }
30920
- function se(T, j) {
30921
- j && T.beginKeywords && (T.begin = "\\b(" + T.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", T.__beforeBegin = xe, T.keywords = T.keywords || T.beginKeywords, delete T.beginKeywords, T.relevance === void 0 && (T.relevance = 0));
30920
+ function se(T, W) {
30921
+ W && T.beginKeywords && (T.begin = "\\b(" + T.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", T.__beforeBegin = xe, T.keywords = T.keywords || T.beginKeywords, delete T.beginKeywords, T.relevance === void 0 && (T.relevance = 0));
30922
30922
  }
30923
- function ke(T, j) {
30923
+ function ke(T, W) {
30924
30924
  Array.isArray(T.illegal) && (T.illegal = y(...T.illegal));
30925
30925
  }
30926
- function pe(T, j) {
30926
+ function pe(T, W) {
30927
30927
  if (T.match) {
30928
30928
  if (T.begin || T.end) throw new Error("begin & end are not supported with match");
30929
30929
  T.begin = T.match, delete T.match;
30930
30930
  }
30931
30931
  }
30932
- function ne(T, j) {
30932
+ function ne(T, W) {
30933
30933
  T.relevance === void 0 && (T.relevance = 1);
30934
30934
  }
30935
- const ge = (T, j) => {
30935
+ const ge = (T, W) => {
30936
30936
  if (!T.beforeMatch) return;
30937
30937
  if (T.starts) throw new Error("beforeMatch cannot be used with starts");
30938
30938
  const re = Object.assign({}, T);
@@ -30960,39 +30960,39 @@ function cA() {
30960
30960
  "value"
30961
30961
  // common variable name
30962
30962
  ], _e = "keyword";
30963
- function le(T, j, re = _e) {
30963
+ function le(T, W, re = _e) {
30964
30964
  const Ne = /* @__PURE__ */ Object.create(null);
30965
30965
  return typeof T == "string" ? ht(re, T.split(" ")) : Array.isArray(T) ? ht(re, T) : Object.keys(T).forEach(function(pt) {
30966
30966
  Object.assign(
30967
30967
  Ne,
30968
- le(T[pt], j, pt)
30968
+ le(T[pt], W, pt)
30969
30969
  );
30970
30970
  }), Ne;
30971
30971
  function ht(pt, he) {
30972
- j && (he = he.map((ue) => ue.toLowerCase())), he.forEach(function(ue) {
30972
+ W && (he = he.map((ue) => ue.toLowerCase())), he.forEach(function(ue) {
30973
30973
  const Ce = ue.split("|");
30974
30974
  Ne[Ce[0]] = [pt, At(Ce[0], Ce[1])];
30975
30975
  });
30976
30976
  }
30977
30977
  }
30978
- function At(T, j) {
30979
- return j ? Number(j) : Re(T) ? 0 : 1;
30978
+ function At(T, W) {
30979
+ return W ? Number(W) : Re(T) ? 0 : 1;
30980
30980
  }
30981
30981
  function Re(T) {
30982
30982
  return Te.includes(T.toLowerCase());
30983
30983
  }
30984
30984
  const bt = {}, yt = (T) => {
30985
30985
  console.error(T);
30986
- }, ln = (T, ...j) => {
30987
- console.log(`WARN: ${T}`, ...j);
30988
- }, H = (T, j) => {
30989
- bt[`${T}/${j}`] || (console.log(`Deprecated as of ${T}. ${j}`), bt[`${T}/${j}`] = !0);
30986
+ }, ln = (T, ...W) => {
30987
+ console.log(`WARN: ${T}`, ...W);
30988
+ }, H = (T, W) => {
30989
+ bt[`${T}/${W}`] || (console.log(`Deprecated as of ${T}. ${W}`), bt[`${T}/${W}`] = !0);
30990
30990
  }, J = new Error();
30991
- function ve(T, j, { key: re }) {
30991
+ function ve(T, W, { key: re }) {
30992
30992
  let Ne = 0;
30993
30993
  const ht = T[re], pt = {}, he = {};
30994
- for (let ue = 1; ue <= j.length; ue++)
30995
- he[ue + Ne] = ht[ue], pt[ue + Ne] = !0, Ne += E(j[ue - 1]);
30994
+ for (let ue = 1; ue <= W.length; ue++)
30995
+ he[ue + Ne] = ht[ue], pt[ue + Ne] = !0, Ne += E(W[ue - 1]);
30996
30996
  T[re] = he, T[re]._emit = pt, T[re]._multi = !0;
30997
30997
  }
30998
30998
  function Oe(T) {
@@ -31020,7 +31020,7 @@ function cA() {
31020
31020
  Et(T), typeof T.beginScope == "string" && (T.beginScope = { _wrap: T.beginScope }), typeof T.endScope == "string" && (T.endScope = { _wrap: T.endScope }), Oe(T), He(T);
31021
31021
  }
31022
31022
  function Gt(T) {
31023
- function j(he, ue) {
31023
+ function W(he, ue) {
31024
31024
  return new RegExp(
31025
31025
  d(he),
31026
31026
  "m" + (T.case_insensitive ? "i" : "") + (T.unicodeRegex ? "u" : "") + (ue ? "g" : "")
@@ -31037,7 +31037,7 @@ function cA() {
31037
31037
  compile() {
31038
31038
  this.regexes.length === 0 && (this.exec = () => null);
31039
31039
  const ue = this.regexes.map((Ce) => Ce[1]);
31040
- this.matcherRe = j(k(ue, { joinWith: "|" }), !0), this.lastIndex = 0;
31040
+ this.matcherRe = W(k(ue, { joinWith: "|" }), !0), this.lastIndex = 0;
31041
31041
  }
31042
31042
  /** @param {string} s */
31043
31043
  exec(ue) {
@@ -31107,7 +31107,7 @@ function cA() {
31107
31107
  ne
31108
31108
  ].forEach((xt) => xt(he, ue)), he.isCompiled = !0;
31109
31109
  let Mt = null;
31110
- return typeof he.keywords == "object" && he.keywords.$pattern && (he.keywords = Object.assign({}, he.keywords), Mt = he.keywords.$pattern, delete he.keywords.$pattern), Mt = Mt || /\w+/, he.keywords && (he.keywords = le(he.keywords, T.case_insensitive)), Ce.keywordPatternRe = j(Mt, !0), ue && (he.begin || (he.begin = /\B|\b/), Ce.beginRe = j(Ce.begin), !he.end && !he.endsWithParent && (he.end = /\B|\b/), he.end && (Ce.endRe = j(Ce.end)), Ce.terminatorEnd = d(Ce.end) || "", he.endsWithParent && ue.terminatorEnd && (Ce.terminatorEnd += (he.end ? "|" : "") + ue.terminatorEnd)), he.illegal && (Ce.illegalRe = j(
31110
+ return typeof he.keywords == "object" && he.keywords.$pattern && (he.keywords = Object.assign({}, he.keywords), Mt = he.keywords.$pattern, delete he.keywords.$pattern), Mt = Mt || /\w+/, he.keywords && (he.keywords = le(he.keywords, T.case_insensitive)), Ce.keywordPatternRe = W(Mt, !0), ue && (he.begin || (he.begin = /\B|\b/), Ce.beginRe = W(Ce.begin), !he.end && !he.endsWithParent && (he.end = /\B|\b/), he.end && (Ce.endRe = W(Ce.end)), Ce.terminatorEnd = d(Ce.end) || "", he.endsWithParent && ue.terminatorEnd && (Ce.terminatorEnd += (he.end ? "|" : "") + ue.terminatorEnd)), he.illegal && (Ce.illegalRe = W(
31111
31111
  /** @type {RegExp | string} */
31112
31112
  he.illegal
31113
31113
  )), he.contains || (he.contains = []), he.contains = [].concat(...he.contains.map(function(xt) {
@@ -31131,18 +31131,18 @@ function cA() {
31131
31131
  return T ? T.endsWithParent || pn(T.starts) : !1;
31132
31132
  }
31133
31133
  function cn(T) {
31134
- return T.variants && !T.cachedVariants && (T.cachedVariants = T.variants.map(function(j) {
31135
- return r(T, { variants: null }, j);
31134
+ return T.variants && !T.cachedVariants && (T.cachedVariants = T.variants.map(function(W) {
31135
+ return r(T, { variants: null }, W);
31136
31136
  })), T.cachedVariants ? T.cachedVariants : pn(T) ? r(T, { starts: T.starts ? r(T.starts) : null }) : Object.isFrozen(T) ? r(T) : T;
31137
31137
  }
31138
31138
  var St = "11.11.1";
31139
31139
  class Jt extends Error {
31140
- constructor(j, re) {
31141
- super(j), this.name = "HTMLInjectionError", this.html = re;
31140
+ constructor(W, re) {
31141
+ super(W), this.name = "HTMLInjectionError", this.html = re;
31142
31142
  }
31143
31143
  }
31144
31144
  const Rt = n, Yn = r, qr = Symbol("nomatch"), ae = 7, ot = function(T) {
31145
- const j = /* @__PURE__ */ Object.create(null), re = /* @__PURE__ */ Object.create(null), Ne = [];
31145
+ const W = /* @__PURE__ */ Object.create(null), re = /* @__PURE__ */ Object.create(null), Ne = [];
31146
31146
  let ht = !0;
31147
31147
  const pt = "Could not find the language '{}', did you forget to load/include a language module?", he = { disableAutodetect: !0, name: "Plain text", contains: [] };
31148
31148
  let ue = {
@@ -31216,7 +31216,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), kt = ee, nt = be), Ve
31216
31216
  if (rt === "") return;
31217
31217
  let oe = null;
31218
31218
  if (typeof Ae.subLanguage == "string") {
31219
- if (!j[Ae.subLanguage]) {
31219
+ if (!W[Ae.subLanguage]) {
31220
31220
  It.addText(rt);
31221
31221
  return;
31222
31222
  }
@@ -31388,7 +31388,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), kt = ee, nt = be), Ve
31388
31388
  return be._emitter.addText(ee), be;
31389
31389
  }
31390
31390
  function is(ee, be) {
31391
- be = be || ue.languages || Object.keys(j);
31391
+ be = be || ue.languages || Object.keys(W);
31392
31392
  const Ve = rs(ee), nt = be.filter(Dn).filter(hc).map(
31393
31393
  (Kt) => Yr(Kt, ee, !1)
31394
31394
  );
@@ -31468,18 +31468,18 @@ https://github.com/highlightjs/highlight.js/issues/2277`), kt = ee, nt = be), Ve
31468
31468
  throw nt;
31469
31469
  Ve = he;
31470
31470
  }
31471
- Ve.name || (Ve.name = ee), j[ee] = Ve, Ve.rawDefinition = be.bind(null, T), Ve.aliases && fc(Ve.aliases, { languageName: ee });
31471
+ Ve.name || (Ve.name = ee), W[ee] = Ve, Ve.rawDefinition = be.bind(null, T), Ve.aliases && fc(Ve.aliases, { languageName: ee });
31472
31472
  }
31473
31473
  function Ag(ee) {
31474
- delete j[ee];
31474
+ delete W[ee];
31475
31475
  for (const be of Object.keys(re))
31476
31476
  re[be] === ee && delete re[be];
31477
31477
  }
31478
31478
  function Mg() {
31479
- return Object.keys(j);
31479
+ return Object.keys(W);
31480
31480
  }
31481
31481
  function Dn(ee) {
31482
- return ee = (ee || "").toLowerCase(), j[ee] || j[re[ee]];
31482
+ return ee = (ee || "").toLowerCase(), W[ee] || W[re[ee]];
31483
31483
  }
31484
31484
  function fc(ee, { languageName: be }) {
31485
31485
  typeof ee == "string" && (ee = [ee]), ee.forEach((Ve) => {
@@ -31551,7 +31551,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), kt = ee, nt = be), Ve
31551
31551
  typeof Q[ee] == "object" && e(Q[ee]);
31552
31552
  return Object.assign(T, Q), T;
31553
31553
  }, $e = ot({});
31554
- return $e.newInstance = () => ot({}), Ws = $e, $e.HighlightJS = $e, $e.default = $e, Ws;
31554
+ return $e.newInstance = () => ot({}), js = $e, $e.HighlightJS = $e, $e.default = $e, js;
31555
31555
  }
31556
31556
  var uA = /* @__PURE__ */ cA();
31557
31557
  const dA = /* @__PURE__ */ $o(uA), Hd = {}, fA = "hljs-";
@@ -31746,7 +31746,7 @@ function gA(e) {
31746
31746
  l = u === -1 ? s : s.slice(0, u);
31747
31747
  }
31748
31748
  return function(u, d) {
31749
- jo(u, "element", function(f, h, g) {
31749
+ Wo(u, "element", function(f, h, g) {
31750
31750
  if (f.tagName !== "code" || !g || g.type !== "element" || g.tagName !== "pre")
31751
31751
  return;
31752
31752
  const p = bA(f);
@@ -32286,11 +32286,11 @@ function Jl({
32286
32286
  e.off("suggested.response", L);
32287
32287
  };
32288
32288
  }, [e]);
32289
- const B = F && I ? "fullscreen" : i, q = B === "fullscreen" ? F && I ? "fixed inset-0 z-[9999] flex flex-col h-screen w-screen bg-black" : "flex flex-col h-full w-full max-w-none" : "flex flex-col h-full w-full backdrop-blur-sm max-h-full overflow-hidden contain-layout", W = B === "fullscreen" ? F && I ? "flex items-center w-full justify-between px-3 h-11 bg-black/80 text-white border-b border-gray-700" : `flex items-center w-full justify-between px-5 h-12 border-b ${U.chatHeader.container}` : `flex items-center w-full justify-between px-4 h-12 border-b ${U.chatHeader.container}`, ce = B === "fullscreen" ? F && I ? "flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide p-4 w-full max-w-none chat-scrollable min-h-0" : "flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide p-6 w-full max-w-none chat-scrollable min-h-0" : "flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide w-full p-4 chat-scrollable min-h-0", Q = "flex-shrink-0 !w-full", xe = () => {
32289
+ const B = F && I ? "fullscreen" : i, q = B === "fullscreen" ? F && I ? "fixed inset-0 z-[9999] flex flex-col h-screen w-screen bg-black" : "flex flex-col h-full w-full max-w-none" : "flex flex-col h-full w-full backdrop-blur-sm max-h-full overflow-hidden contain-layout", j = B === "fullscreen" ? F && I ? "flex items-center w-full justify-between px-3 h-11 bg-black/80 text-white border-b border-gray-700" : `flex items-center w-full justify-between px-5 h-12 border-b ${U.chatHeader.container}` : `flex items-center w-full justify-between px-4 h-12 border-b ${U.chatHeader.container}`, ce = B === "fullscreen" ? F && I ? "flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide p-4 w-full max-w-none chat-scrollable min-h-0" : "flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide p-6 w-full max-w-none chat-scrollable min-h-0" : "flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide w-full p-4 chat-scrollable min-h-0", Q = "flex-shrink-0 !w-full", xe = () => {
32290
32290
  D(!1), n && n();
32291
32291
  };
32292
32292
  return /* @__PURE__ */ N("div", { className: `${q} relative`, children: [
32293
- /* @__PURE__ */ m("div", { className: W, children: /* @__PURE__ */ N("div", { className: "flex items-center justify-between w-full", children: [
32293
+ /* @__PURE__ */ m("div", { className: j, children: /* @__PURE__ */ N("div", { className: "flex items-center justify-between w-full", children: [
32294
32294
  /* @__PURE__ */ N("div", { className: "flex items-center gap-2", children: [
32295
32295
  /* @__PURE__ */ m(
32296
32296
  "h3",
@@ -32587,9 +32587,9 @@ const Ym = Me.forwardRef(({
32587
32587
  if (!B) return;
32588
32588
  const q = () => A(B.offsetHeight || 64);
32589
32589
  q();
32590
- const W = new ResizeObserver(() => q());
32591
- return W.observe(B), window.addEventListener("resize", q), () => {
32592
- W.disconnect(), window.removeEventListener("resize", q);
32590
+ const j = new ResizeObserver(() => q());
32591
+ return j.observe(B), window.addEventListener("resize", q), () => {
32592
+ j.disconnect(), window.removeEventListener("resize", q);
32593
32593
  };
32594
32594
  }, []), Yw();
32595
32595
  const { agent: { isActive: O = !1 } = {} } = o ? Al(o) : { agent: { isActive: !1 } }, b = fo(o, "microphone"), M = zt(i), I = Me.useMemo(() => o != null && o.getCurrentSession ? !!o.getCurrentSession() : !1, [o]), F = Me.useMemo(() => o != null && o.getIsAgentConnected && o.getIsAgentConnected() || h, [o, h]), D = O || F;
@@ -32616,13 +32616,13 @@ const Ym = Me.forwardRef(({
32616
32616
  if (!o) return;
32617
32617
  const B = () => {
32618
32618
  console.log("โœ… SessionView: Agent connected event received"), g(!0), f(!1), E(!1);
32619
- }, q = B, W = B, ce = (xe) => {
32619
+ }, q = B, j = B, ce = (xe) => {
32620
32620
  console.log("๐Ÿ‘ค SessionView: Participant joined:", xe), xe.isLocal || B();
32621
32621
  }, Q = () => {
32622
32622
  g(!1), t && E(!0);
32623
32623
  };
32624
- return o.on("agent.connected", B), o.on("agent.speaking", q), o.on("agent.thinking", W), o.on("participant.joined", ce), o.on("connection.disconnected", Q), () => {
32625
- o.off("agent.connected", B), o.off("agent.speaking", q), o.off("agent.thinking", W), o.off("participant.joined", ce), o.off("connection.disconnected", Q);
32624
+ return o.on("agent.connected", B), o.on("agent.speaking", q), o.on("agent.thinking", j), o.on("participant.joined", ce), o.on("connection.disconnected", Q), () => {
32625
+ o.off("agent.connected", B), o.off("agent.speaking", q), o.off("agent.thinking", j), o.off("participant.joined", ce), o.off("connection.disconnected", Q);
32626
32626
  };
32627
32627
  }, [o, t]), Me.useEffect(() => {
32628
32628
  if (!o) return;
@@ -32636,28 +32636,28 @@ const Ym = Me.forwardRef(({
32636
32636
  const B = (q = o.getCurrentInteraction) == null ? void 0 : q.call(o);
32637
32637
  v(B || null);
32638
32638
  }, [o]), Me.useEffect(() => {
32639
- var q, W;
32640
- const B = ((W = (q = o == null ? void 0 : o.getCurrentSession) == null ? void 0 : q.call(o)) == null ? void 0 : W.id) || null;
32639
+ var q, j;
32640
+ const B = ((j = (q = o == null ? void 0 : o.getCurrentSession) == null ? void 0 : q.call(o)) == null ? void 0 : j.id) || null;
32641
32641
  w.current, w.current = B;
32642
32642
  }, [o]), Me.useEffect(() => {
32643
32643
  p && c && u(!1);
32644
32644
  }, [p, c]);
32645
32645
  const G = Me.useCallback((B) => {
32646
32646
  }, []), ie = Me.useCallback(() => {
32647
- var B, q, W;
32647
+ var B, q, j;
32648
32648
  try {
32649
- p && (v(null), (B = o == null ? void 0 : o.dismissCurrentInteraction) == null || B.call(o)), u(!1), f(!1), (q = o == null ? void 0 : o.endSession) == null || q.call(o), (W = o == null ? void 0 : o.disconnect) == null || W.call(o), a == null || a();
32649
+ p && (v(null), (B = o == null ? void 0 : o.dismissCurrentInteraction) == null || B.call(o)), u(!1), f(!1), (q = o == null ? void 0 : o.endSession) == null || q.call(o), (j = o == null ? void 0 : o.disconnect) == null || j.call(o), a == null || a();
32650
32650
  } catch (ce) {
32651
32651
  console.error("Failed to end call:", ce), v(null), u(!1), f(!1), a == null || a();
32652
32652
  }
32653
- }, [o, p, a]), X = je(
32653
+ }, [o, p, a]), X = We(
32654
32654
  "w-full flex flex-col items-center justify-center",
32655
32655
  s === "fullscreen" ? "w-full max-w-none mx-0 h-full" : "w-full mx-auto",
32656
32656
  M.main,
32657
32657
  s === "fullscreen" ? "max-w-none" : "",
32658
32658
  "overflow-hidden h-full"
32659
32659
  ), V = a && (s === "popup" || s === "fullscreen"), U = Me.useMemo(() => d ? "Agent is taking longer than expected..." : I ? "Room connected. Waiting for agent..." : r, [d, I, r]), x = Me.useMemo(() => d ? "Please check your connection or try again." : I ? "The agent will join shortly." : "Agent is connecting... This may take a moment.", [d, I]);
32660
- return y ? /* @__PURE__ */ m("main", { ref: l, className: je(X, "relative", e && "pointer-events-none opacity-50"), children: (V || k) && /* @__PURE__ */ N("div", { className: `flex items-center justify-between w-full p-4 border-b ${(($ = M.chatHeader) == null ? void 0 : $.container) || "border-gray-200"}`, children: [
32660
+ return y ? /* @__PURE__ */ m("main", { ref: l, className: We(X, "relative", e && "pointer-events-none opacity-50"), children: (V || k) && /* @__PURE__ */ N("div", { className: `flex items-center justify-between w-full p-4 border-b ${(($ = M.chatHeader) == null ? void 0 : $.container) || "border-gray-200"}`, children: [
32661
32661
  /* @__PURE__ */ m("div", { children: /* @__PURE__ */ m("h3", { className: `font-semibold ${M.text.primary}`, children: "Voice Session" }) }),
32662
32662
  k && /* @__PURE__ */ m(
32663
32663
  Eo,
@@ -32669,7 +32669,7 @@ const Ym = Me.forwardRef(({
32669
32669
  }
32670
32670
  }
32671
32671
  )
32672
- ] }) }) : /* @__PURE__ */ N("main", { ref: l, className: je(X, "relative", e && "pointer-events-none opacity-50"), style: { minHeight: 0 }, children: [
32672
+ ] }) }) : /* @__PURE__ */ N("main", { ref: l, className: We(X, "relative", e && "pointer-events-none opacity-50"), style: { minHeight: 0 }, children: [
32673
32673
  (V || k) && /* @__PURE__ */ N("div", { className: `flex items-center justify-between w-full p-4 border-b ${((K = M.chatHeader) == null ? void 0 : K.container) || "border-gray-200"}`, children: [
32674
32674
  /* @__PURE__ */ m("div", { children: /* @__PURE__ */ m("h3", { className: `font-semibold ${M.text.primary}`, children: "Voice Session" }) }),
32675
32675
  k && /* @__PURE__ */ m(
@@ -32695,7 +32695,7 @@ const Ym = Me.forwardRef(({
32695
32695
  /* @__PURE__ */ m(
32696
32696
  "div",
32697
32697
  {
32698
- className: je(
32698
+ className: We(
32699
32699
  "absolute left-0 right-0 top-0 flex flex-col transition-[opacity,translate] duration-300 ease-out z-10",
32700
32700
  i === "light" ? "bg-white" : "bg-black backdrop-blur-sm",
32701
32701
  "translate-y-0 opacity-100 delay-200"
@@ -32704,16 +32704,16 @@ const Ym = Me.forwardRef(({
32704
32704
  children: /* @__PURE__ */ m(Jl, { client: o, theme: i, displayType: s === "fullscreen" ? "fullscreen" : "widget", disabled: e, onBack: () => u(!1), showTimer: !1 })
32705
32705
  }
32706
32706
  ),
32707
- !c && /* @__PURE__ */ N("div", { className: je("flex-1 flex flex-col items-center w-full h-full min-h-0", (p == null ? void 0 : p.presentationMode) === "embedded" ? "justify-end" : "justify-center"), children: [
32708
- /* @__PURE__ */ m(Le.div, { className: "w-full flex justify-center", animate: { y: (p == null ? void 0 : p.presentationMode) === "embedded" ? -8 : 0 }, transition: { duration: 0.3, ease: "easeOut" }, children: /* @__PURE__ */ m(jw, { chatOpen: c, client: o, theme: i }, `media-tiles-${((te = (Y = o == null ? void 0 : o.getCurrentSession) == null ? void 0 : Y.call(o)) == null ? void 0 : te.id) || "no-session"}`) }),
32709
- /* @__PURE__ */ m(Dr, { mode: "wait", children: p && p.presentationMode === "embedded" && /* @__PURE__ */ m(Le.div, { initial: { opacity: 0, y: 20, height: 0 }, animate: { opacity: 1, y: 0, height: "auto" }, exit: { opacity: 0, y: 20, height: 0 }, transition: { duration: 0.3, ease: "easeOut" }, className: je("w-full relative mt-4 flex justify-center", s === "fullscreen" ? "max-w-4xl" : "max-w-md"), children: /* @__PURE__ */ m("div", { className: "bg-white/10 backdrop-blur-sm rounded-xl border border-white/20 shadow-lg overflow-hidden", children: /* @__PURE__ */ m(wo, { interaction: p, theme: i, onDismiss: () => {
32707
+ !c && /* @__PURE__ */ N("div", { className: We("flex-1 flex flex-col items-center w-full h-full min-h-0", (p == null ? void 0 : p.presentationMode) === "embedded" ? "justify-end" : "justify-center"), children: [
32708
+ /* @__PURE__ */ m(Le.div, { className: "w-full flex justify-center", animate: { y: (p == null ? void 0 : p.presentationMode) === "embedded" ? -8 : 0 }, transition: { duration: 0.3, ease: "easeOut" }, children: /* @__PURE__ */ m(Ww, { chatOpen: c, client: o, theme: i }, `media-tiles-${((te = (Y = o == null ? void 0 : o.getCurrentSession) == null ? void 0 : Y.call(o)) == null ? void 0 : te.id) || "no-session"}`) }),
32709
+ /* @__PURE__ */ m(Dr, { mode: "wait", children: p && p.presentationMode === "embedded" && /* @__PURE__ */ m(Le.div, { initial: { opacity: 0, y: 20, height: 0 }, animate: { opacity: 1, y: 0, height: "auto" }, exit: { opacity: 0, y: 20, height: 0 }, transition: { duration: 0.3, ease: "easeOut" }, className: We("w-full relative mt-4 flex justify-center", s === "fullscreen" ? "max-w-4xl" : "max-w-md"), children: /* @__PURE__ */ m("div", { className: "bg-white/10 backdrop-blur-sm rounded-xl border border-white/20 shadow-lg overflow-hidden", children: /* @__PURE__ */ m(wo, { interaction: p, theme: i, onDismiss: () => {
32710
32710
  var B;
32711
32711
  return (B = o == null ? void 0 : o.dismissCurrentInteraction) == null ? void 0 : B.call(o);
32712
32712
  }, client: o, addLocalMessage: G }) }) }, `embedded-${p.methodName}`) })
32713
32713
  ] })
32714
32714
  ] })
32715
32715
  ] }),
32716
- /* @__PURE__ */ m(Dr, { mode: "wait", children: p && p.presentationMode !== "embedded" && !c && /* @__PURE__ */ m("div", { className: je("absolute inset-0 z-50 flex items-center justify-center backdrop-blur-sm", s === "fullscreen" ? "bg-black/70" : "bg-black/50"), children: /* @__PURE__ */ m(Le.div, { initial: { opacity: 0, scale: 0.9 }, animate: { opacity: 1, scale: 1 }, exit: { opacity: 0, scale: 0.9 }, transition: { duration: 0.2, ease: "easeOut" }, className: je("relative w-full overflow-hidden", s === "fullscreen" ? "max-w-2xl mx-8 max-h-[85vh]" : "max-w-lg mx-4 max-h-[80vh]", "bg-white dark:bg-gray-900 rounded-2xl shadow-2xl", "border border-gray-200 dark:border-gray-700"), children: /* @__PURE__ */ m(wo, { interaction: p, theme: i, onDismiss: () => {
32716
+ /* @__PURE__ */ m(Dr, { mode: "wait", children: p && p.presentationMode !== "embedded" && !c && /* @__PURE__ */ m("div", { className: We("absolute inset-0 z-50 flex items-center justify-center backdrop-blur-sm", s === "fullscreen" ? "bg-black/70" : "bg-black/50"), children: /* @__PURE__ */ m(Le.div, { initial: { opacity: 0, scale: 0.9 }, animate: { opacity: 1, scale: 1 }, exit: { opacity: 0, scale: 0.9 }, transition: { duration: 0.2, ease: "easeOut" }, className: We("relative w-full overflow-hidden", s === "fullscreen" ? "max-w-2xl mx-8 max-h-[85vh]" : "max-w-lg mx-4 max-h-[80vh]", "bg-white dark:bg-gray-900 rounded-2xl shadow-2xl", "border border-gray-200 dark:border-gray-700"), children: /* @__PURE__ */ m(wo, { interaction: p, theme: i, onDismiss: () => {
32717
32717
  var B;
32718
32718
  return (B = o == null ? void 0 : o.dismissCurrentInteraction) == null ? void 0 : B.call(o);
32719
32719
  }, client: o, addLocalMessage: G }) }, `modal-${p.methodName}`) }) }),
@@ -32737,7 +32737,7 @@ const Ym = Me.forwardRef(({
32737
32737
  ] });
32738
32738
  });
32739
32739
  Ym.displayName = "SessionView";
32740
- function jd({ trackRef: e, participant: t, isLocal: n = !1, className: r = "", theme: i }) {
32740
+ function Wd({ trackRef: e, participant: t, isLocal: n = !1, className: r = "", theme: i }) {
32741
32741
  var l;
32742
32742
  const o = zt(i), s = (t == null ? void 0 : t.name) || (t == null ? void 0 : t.identity) || (n ? "You" : "Participant"), a = (e == null ? void 0 : e.publication) && !e.publication.isMuted;
32743
32743
  return /* @__PURE__ */ N("div", { className: `relative rounded-lg overflow-hidden ${o.video.tile} ${r}`, children: [
@@ -32876,7 +32876,7 @@ function NA({
32876
32876
  h ? (
32877
32877
  // Show video when agent avatar is enabled
32878
32878
  K ? /* @__PURE__ */ m(
32879
- jd,
32879
+ Wd,
32880
32880
  {
32881
32881
  trackRef: K,
32882
32882
  participant: K.participant,
@@ -32900,7 +32900,7 @@ function NA({
32900
32900
  children: /* @__PURE__ */ m(
32901
32901
  "span",
32902
32902
  {
32903
- className: je([
32903
+ className: We([
32904
32904
  "bg-[#6721a4] min-h-2 w-2 rounded-full",
32905
32905
  "origin-center transition-colors duration-250 ease-linear",
32906
32906
  "data-[lk-highlighted=true]:bg-[#5c64f6]",
@@ -32912,7 +32912,7 @@ function NA({
32912
32912
  ) : /* @__PURE__ */ m("div", { className: "flex items-center justify-center gap-1", children: Array.from({ length: 5 }).map((te, B) => /* @__PURE__ */ m(
32913
32913
  "span",
32914
32914
  {
32915
- className: je([
32915
+ className: We([
32916
32916
  "bg-[#6721a4] min-h-2 w-2 rounded-full",
32917
32917
  "origin-center transition-colors duration-250 ease-linear",
32918
32918
  O === "speaking" && "bg-[#5c64f6]",
@@ -32937,7 +32937,7 @@ function NA({
32937
32937
  ] }) })
32938
32938
  ] }) }),
32939
32939
  x && f && /* @__PURE__ */ m("div", { className: "absolute bottom-4 right-0 w-32 sm:w-36 h-20 sm:h-24 rounded-lg overflow-hidden shadow-xl border border-white/20", children: /* @__PURE__ */ m(
32940
- jd,
32940
+ Wd,
32941
32941
  {
32942
32942
  trackRef: x,
32943
32943
  participant: U || void 0,
@@ -32955,7 +32955,7 @@ function NA({
32955
32955
  animate: { opacity: 1, y: 0 },
32956
32956
  exit: { opacity: 0, y: 20 },
32957
32957
  transition: { duration: 0.3, ease: "easeOut" },
32958
- className: je(
32958
+ className: We(
32959
32959
  "absolute left-0 right-0 top-0 flex flex-col z-20",
32960
32960
  t === "light" ? "bg-white" : "bg-gray-900/95 backdrop-blur-sm"
32961
32961
  ),
@@ -33000,8 +33000,8 @@ function NA({
33000
33000
  ) })
33001
33001
  ] });
33002
33002
  }
33003
- const Wd = (e) => e, AA = () => {
33004
- let e = Wd;
33003
+ const jd = (e) => e, AA = () => {
33004
+ let e = jd;
33005
33005
  return {
33006
33006
  configure(t) {
33007
33007
  e = t;
@@ -33010,20 +33010,20 @@ const Wd = (e) => e, AA = () => {
33010
33010
  return e(t);
33011
33011
  },
33012
33012
  reset() {
33013
- e = Wd;
33013
+ e = jd;
33014
33014
  }
33015
33015
  };
33016
33016
  }, MA = AA();
33017
- function jn(e, ...t) {
33017
+ function Wn(e, ...t) {
33018
33018
  const n = new URL(`https://mui.com/production-error/?code=${e}`);
33019
33019
  return t.forEach((r) => n.searchParams.append("args[]", r)), `Minified MUI error #${e}; visit ${n} for the full message.`;
33020
33020
  }
33021
33021
  function lr(e) {
33022
33022
  if (typeof e != "string")
33023
- throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `capitalize(string)` expects a string argument." : jn(7));
33023
+ throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `capitalize(string)` expects a string argument." : Wn(7));
33024
33024
  return e.charAt(0).toUpperCase() + e.slice(1);
33025
33025
  }
33026
- var eo = { exports: {} }, to = { exports: {} }, We = {};
33026
+ var eo = { exports: {} }, to = { exports: {} }, je = {};
33027
33027
  /** @license React v16.13.1
33028
33028
  * react-is.production.min.js
33029
33029
  *
@@ -33034,7 +33034,7 @@ var eo = { exports: {} }, to = { exports: {} }, We = {};
33034
33034
  */
33035
33035
  var Gd;
33036
33036
  function RA() {
33037
- if (Gd) return We;
33037
+ if (Gd) return je;
33038
33038
  Gd = 1;
33039
33039
  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, i = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, a = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, c = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112, d = e ? Symbol.for("react.suspense") : 60113, f = e ? Symbol.for("react.suspense_list") : 60120, h = e ? Symbol.for("react.memo") : 60115, g = e ? Symbol.for("react.lazy") : 60116, p = e ? Symbol.for("react.block") : 60121, v = e ? Symbol.for("react.fundamental") : 60117, y = e ? Symbol.for("react.responder") : 60118, E = e ? Symbol.for("react.scope") : 60119;
33040
33040
  function w(k) {
@@ -33070,33 +33070,33 @@ function RA() {
33070
33070
  function _(k) {
33071
33071
  return w(k) === c;
33072
33072
  }
33073
- return We.AsyncMode = l, We.ConcurrentMode = c, We.ContextConsumer = a, We.ContextProvider = s, We.Element = t, We.ForwardRef = u, We.Fragment = r, We.Lazy = g, We.Memo = h, We.Portal = n, We.Profiler = o, We.StrictMode = i, We.Suspense = d, We.isAsyncMode = function(k) {
33073
+ return je.AsyncMode = l, je.ConcurrentMode = c, je.ContextConsumer = a, je.ContextProvider = s, je.Element = t, je.ForwardRef = u, je.Fragment = r, je.Lazy = g, je.Memo = h, je.Portal = n, je.Profiler = o, je.StrictMode = i, je.Suspense = d, je.isAsyncMode = function(k) {
33074
33074
  return _(k) || w(k) === l;
33075
- }, We.isConcurrentMode = _, We.isContextConsumer = function(k) {
33075
+ }, je.isConcurrentMode = _, je.isContextConsumer = function(k) {
33076
33076
  return w(k) === a;
33077
- }, We.isContextProvider = function(k) {
33077
+ }, je.isContextProvider = function(k) {
33078
33078
  return w(k) === s;
33079
- }, We.isElement = function(k) {
33079
+ }, je.isElement = function(k) {
33080
33080
  return typeof k == "object" && k !== null && k.$$typeof === t;
33081
- }, We.isForwardRef = function(k) {
33081
+ }, je.isForwardRef = function(k) {
33082
33082
  return w(k) === u;
33083
- }, We.isFragment = function(k) {
33083
+ }, je.isFragment = function(k) {
33084
33084
  return w(k) === r;
33085
- }, We.isLazy = function(k) {
33085
+ }, je.isLazy = function(k) {
33086
33086
  return w(k) === g;
33087
- }, We.isMemo = function(k) {
33087
+ }, je.isMemo = function(k) {
33088
33088
  return w(k) === h;
33089
- }, We.isPortal = function(k) {
33089
+ }, je.isPortal = function(k) {
33090
33090
  return w(k) === n;
33091
- }, We.isProfiler = function(k) {
33091
+ }, je.isProfiler = function(k) {
33092
33092
  return w(k) === o;
33093
- }, We.isStrictMode = function(k) {
33093
+ }, je.isStrictMode = function(k) {
33094
33094
  return w(k) === i;
33095
- }, We.isSuspense = function(k) {
33095
+ }, je.isSuspense = function(k) {
33096
33096
  return w(k) === d;
33097
- }, We.isValidElementType = function(k) {
33097
+ }, je.isValidElementType = function(k) {
33098
33098
  return typeof k == "string" || typeof k == "function" || k === r || k === c || k === o || k === i || k === d || k === f || typeof k == "object" && k !== null && (k.$$typeof === g || k.$$typeof === h || k.$$typeof === s || k.$$typeof === a || k.$$typeof === u || k.$$typeof === v || k.$$typeof === y || k.$$typeof === E || k.$$typeof === p);
33099
- }, We.typeOf = w, We;
33099
+ }, je.typeOf = w, je;
33100
33100
  }
33101
33101
  var Ge = {};
33102
33102
  /** @license React v16.13.1
@@ -33175,7 +33175,7 @@ function IA() {
33175
33175
  function q(L) {
33176
33176
  return _(L) === h;
33177
33177
  }
33178
- function W(L) {
33178
+ function j(L) {
33179
33179
  return _(L) === n;
33180
33180
  }
33181
33181
  function ce(L) {
@@ -33187,7 +33187,7 @@ function IA() {
33187
33187
  function xe(L) {
33188
33188
  return _(L) === d;
33189
33189
  }
33190
- Ge.AsyncMode = k, Ge.ConcurrentMode = C, Ge.ContextConsumer = R, Ge.ContextProvider = A, Ge.Element = O, Ge.ForwardRef = b, Ge.Fragment = M, Ge.Lazy = I, Ge.Memo = F, Ge.Portal = D, Ge.Profiler = G, Ge.StrictMode = ie, Ge.Suspense = X, Ge.isAsyncMode = U, Ge.isConcurrentMode = x, Ge.isContextConsumer = $, Ge.isContextProvider = K, Ge.isElement = S, Ge.isForwardRef = Y, Ge.isFragment = te, Ge.isLazy = B, Ge.isMemo = q, Ge.isPortal = W, Ge.isProfiler = ce, Ge.isStrictMode = Q, Ge.isSuspense = xe, Ge.isValidElementType = w, Ge.typeOf = _;
33190
+ Ge.AsyncMode = k, Ge.ConcurrentMode = C, Ge.ContextConsumer = R, Ge.ContextProvider = A, Ge.Element = O, Ge.ForwardRef = b, Ge.Fragment = M, Ge.Lazy = I, Ge.Memo = F, Ge.Portal = D, Ge.Profiler = G, Ge.StrictMode = ie, Ge.Suspense = X, Ge.isAsyncMode = U, Ge.isConcurrentMode = x, Ge.isContextConsumer = $, Ge.isContextProvider = K, Ge.isElement = S, Ge.isForwardRef = Y, Ge.isFragment = te, Ge.isLazy = B, Ge.isMemo = q, Ge.isPortal = j, Ge.isProfiler = ce, Ge.isStrictMode = Q, Ge.isSuspense = xe, Ge.isValidElementType = w, Ge.typeOf = _;
33191
33191
  }()), Ge;
33192
33192
  }
33193
33193
  var qd;
@@ -33360,31 +33360,31 @@ function DA() {
33360
33360
  function v(x) {
33361
33361
  if (process.env.NODE_ENV !== "production")
33362
33362
  var $ = {}, K = 0;
33363
- function S(te, B, q, W, ce, Q, xe) {
33364
- if (W = W || f, Q = Q || q, xe !== n) {
33363
+ function S(te, B, q, j, ce, Q, xe) {
33364
+ if (j = j || f, Q = Q || q, xe !== n) {
33365
33365
  if (l) {
33366
33366
  var L = new Error(
33367
33367
  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
33368
33368
  );
33369
33369
  throw L.name = "Invariant Violation", L;
33370
33370
  } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
33371
- var se = W + ":" + q;
33371
+ var se = j + ":" + q;
33372
33372
  !$[se] && // Avoid spamming the console because they are often not actionable except for lib authors
33373
33373
  K < 3 && (o(
33374
- "You are manually calling a React.PropTypes validation function for the `" + Q + "` prop on `" + W + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
33374
+ "You are manually calling a React.PropTypes validation function for the `" + Q + "` prop on `" + j + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
33375
33375
  ), $[se] = !0, K++);
33376
33376
  }
33377
33377
  }
33378
- return B[q] == null ? te ? B[q] === null ? new p("The " + ce + " `" + Q + "` is marked as required " + ("in `" + W + "`, but its value is `null`.")) : new p("The " + ce + " `" + Q + "` is marked as required in " + ("`" + W + "`, but its value is `undefined`.")) : null : x(B, q, W, ce, Q);
33378
+ return B[q] == null ? te ? B[q] === null ? new p("The " + ce + " `" + Q + "` is marked as required " + ("in `" + j + "`, but its value is `null`.")) : new p("The " + ce + " `" + Q + "` is marked as required in " + ("`" + j + "`, but its value is `undefined`.")) : null : x(B, q, j, ce, Q);
33379
33379
  }
33380
33380
  var Y = S.bind(null, !1);
33381
33381
  return Y.isRequired = S.bind(null, !0), Y;
33382
33382
  }
33383
33383
  function y(x) {
33384
33384
  function $(K, S, Y, te, B, q) {
33385
- var W = K[S], ce = ie(W);
33385
+ var j = K[S], ce = ie(j);
33386
33386
  if (ce !== x) {
33387
- var Q = X(W);
33387
+ var Q = X(j);
33388
33388
  return new p(
33389
33389
  "Invalid " + te + " `" + B + "` of type " + ("`" + Q + "` supplied to `" + Y + "`, expected ") + ("`" + x + "`."),
33390
33390
  { expectedType: x }
@@ -33403,8 +33403,8 @@ function DA() {
33403
33403
  return new p("Property `" + B + "` of component `" + Y + "` has invalid PropType notation inside arrayOf.");
33404
33404
  var q = K[S];
33405
33405
  if (!Array.isArray(q)) {
33406
- var W = ie(q);
33407
- return new p("Invalid " + te + " `" + B + "` of type " + ("`" + W + "` supplied to `" + Y + "`, expected an array."));
33406
+ var j = ie(q);
33407
+ return new p("Invalid " + te + " `" + B + "` of type " + ("`" + j + "` supplied to `" + Y + "`, expected an array."));
33408
33408
  }
33409
33409
  for (var ce = 0; ce < q.length; ce++) {
33410
33410
  var Q = x(q, ce, Y, te, B + "[" + ce + "]", n);
@@ -33440,8 +33440,8 @@ function DA() {
33440
33440
  function C(x) {
33441
33441
  function $(K, S, Y, te, B) {
33442
33442
  if (!(K[S] instanceof x)) {
33443
- var q = x.name || f, W = U(K[S]);
33444
- return new p("Invalid " + te + " `" + B + "` of type " + ("`" + W + "` supplied to `" + Y + "`, expected ") + ("instance of `" + q + "`."));
33443
+ var q = x.name || f, j = U(K[S]);
33444
+ return new p("Invalid " + te + " `" + B + "` of type " + ("`" + j + "` supplied to `" + Y + "`, expected ") + ("instance of `" + q + "`."));
33445
33445
  }
33446
33446
  return null;
33447
33447
  }
@@ -33453,8 +33453,8 @@ function DA() {
33453
33453
  "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
33454
33454
  ) : o("Invalid argument supplied to oneOf, expected an array.")), s;
33455
33455
  function $(K, S, Y, te, B) {
33456
- for (var q = K[S], W = 0; W < x.length; W++)
33457
- if (g(q, x[W]))
33456
+ for (var q = K[S], j = 0; j < x.length; j++)
33457
+ if (g(q, x[j]))
33458
33458
  return null;
33459
33459
  var ce = JSON.stringify(x, function(xe, L) {
33460
33460
  var se = X(L);
@@ -33468,9 +33468,9 @@ function DA() {
33468
33468
  function $(K, S, Y, te, B) {
33469
33469
  if (typeof x != "function")
33470
33470
  return new p("Property `" + B + "` of component `" + Y + "` has invalid PropType notation inside objectOf.");
33471
- var q = K[S], W = ie(q);
33472
- if (W !== "object")
33473
- return new p("Invalid " + te + " `" + B + "` of type " + ("`" + W + "` supplied to `" + Y + "`, expected an object."));
33471
+ var q = K[S], j = ie(q);
33472
+ if (j !== "object")
33473
+ return new p("Invalid " + te + " `" + B + "` of type " + ("`" + j + "` supplied to `" + Y + "`, expected an object."));
33474
33474
  for (var ce in q)
33475
33475
  if (r(q, ce)) {
33476
33476
  var Q = x(q, ce, Y, te, B + "." + ce, n);
@@ -33491,15 +33491,15 @@ function DA() {
33491
33491
  "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + V(K) + " at index " + $ + "."
33492
33492
  ), s;
33493
33493
  }
33494
- function S(Y, te, B, q, W) {
33494
+ function S(Y, te, B, q, j) {
33495
33495
  for (var ce = [], Q = 0; Q < x.length; Q++) {
33496
- var xe = x[Q], L = xe(Y, te, B, q, W, n);
33496
+ var xe = x[Q], L = xe(Y, te, B, q, j, n);
33497
33497
  if (L == null)
33498
33498
  return null;
33499
33499
  L.data && r(L.data, "expectedType") && ce.push(L.data.expectedType);
33500
33500
  }
33501
33501
  var se = ce.length > 0 ? ", expected one of type [" + ce.join(", ") + "]" : "";
33502
- return new p("Invalid " + q + " `" + W + "` supplied to " + ("`" + B + "`" + se + "."));
33502
+ return new p("Invalid " + q + " `" + j + "` supplied to " + ("`" + B + "`" + se + "."));
33503
33503
  }
33504
33504
  return v(S);
33505
33505
  }
@@ -33516,9 +33516,9 @@ function DA() {
33516
33516
  }
33517
33517
  function I(x) {
33518
33518
  function $(K, S, Y, te, B) {
33519
- var q = K[S], W = ie(q);
33520
- if (W !== "object")
33521
- return new p("Invalid " + te + " `" + B + "` of type `" + W + "` " + ("supplied to `" + Y + "`, expected `object`."));
33519
+ var q = K[S], j = ie(q);
33520
+ if (j !== "object")
33521
+ return new p("Invalid " + te + " `" + B + "` of type `" + j + "` " + ("supplied to `" + Y + "`, expected `object`."));
33522
33522
  for (var ce in x) {
33523
33523
  var Q = x[ce];
33524
33524
  if (typeof Q != "function")
@@ -33533,9 +33533,9 @@ function DA() {
33533
33533
  }
33534
33534
  function F(x) {
33535
33535
  function $(K, S, Y, te, B) {
33536
- var q = K[S], W = ie(q);
33537
- if (W !== "object")
33538
- return new p("Invalid " + te + " `" + B + "` of type `" + W + "` " + ("supplied to `" + Y + "`, expected `object`."));
33536
+ var q = K[S], j = ie(q);
33537
+ if (j !== "object")
33538
+ return new p("Invalid " + te + " `" + B + "` of type `" + j + "` " + ("supplied to `" + Y + "`, expected `object`."));
33539
33539
  var ce = t({}, K[S], x);
33540
33540
  for (var Q in ce) {
33541
33541
  var xe = x[Q];
@@ -33902,18 +33902,18 @@ function sf(e, t) {
33902
33902
  function HA(e, t) {
33903
33903
  return t === "@" || t.startsWith("@") && (e.some((n) => t.startsWith(`@${n}`)) || !!t.match(/^@\d/));
33904
33904
  }
33905
- function jA(e, t) {
33905
+ function WA(e, t) {
33906
33906
  const n = t.match(/^@([^/]+)?\/?(.+)?$/);
33907
33907
  if (!n) {
33908
33908
  if (process.env.NODE_ENV !== "production")
33909
33909
  throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
33910
- For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.` : jn(18, `(${t})`));
33910
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.` : Wn(18, `(${t})`));
33911
33911
  return null;
33912
33912
  }
33913
33913
  const [, r, i] = n, o = Number.isNaN(+r) ? r || 0 : +r;
33914
33914
  return e.containerQueries(i).up(o);
33915
33915
  }
33916
- function WA(e) {
33916
+ function jA(e) {
33917
33917
  const t = (o, s) => o.replace("@media", s ? `@container ${s}` : "@container");
33918
33918
  function n(o, s) {
33919
33919
  o.up = (...a) => t(e.breakpoints.up(...a), s), o.down = (...a) => t(e.breakpoints.down(...a), s), o.between = (...a) => t(e.breakpoints.between(...a), s), o.only = (...a) => t(e.breakpoints.only(...a), s), o.not = (...a) => {
@@ -33927,7 +33927,7 @@ function WA(e) {
33927
33927
  containerQueries: i
33928
33928
  };
33929
33929
  }
33930
- const Wo = {
33930
+ const jo = {
33931
33931
  xs: 0,
33932
33932
  // phone
33933
33933
  sm: 600,
@@ -33942,11 +33942,11 @@ const Wo = {
33942
33942
  // Sorted ASC by size. That's important.
33943
33943
  // It can't be configured as it's used statically for propTypes.
33944
33944
  keys: ["xs", "sm", "md", "lg", "xl"],
33945
- up: (e) => `@media (min-width:${Wo[e]}px)`
33945
+ up: (e) => `@media (min-width:${jo[e]}px)`
33946
33946
  }, GA = {
33947
33947
  containerQueries: (e) => ({
33948
33948
  up: (t) => {
33949
- let n = typeof t == "number" ? t : Wo[t] || t;
33949
+ let n = typeof t == "number" ? t : jo[t] || t;
33950
33950
  return typeof n == "number" && (n = `${n}px`), e ? `@container ${e} (min-width:${n})` : `@container (min-width:${n})`;
33951
33951
  }
33952
33952
  })
@@ -33961,9 +33961,9 @@ function Rn(e, t, n) {
33961
33961
  const o = r.breakpoints || af;
33962
33962
  return Object.keys(t).reduce((s, a) => {
33963
33963
  if (HA(o.keys, a)) {
33964
- const l = jA(r.containerQueries ? r : GA, a);
33964
+ const l = WA(r.containerQueries ? r : GA, a);
33965
33965
  l && (s[l] = n(t[a], a));
33966
- } else if (Object.keys(o.values || Wo).includes(a)) {
33966
+ } else if (Object.keys(o.values || jo).includes(a)) {
33967
33967
  const l = o.up(a);
33968
33968
  s[l] = n(t[a], a);
33969
33969
  } else {
@@ -34213,7 +34213,7 @@ const _M = gt({
34213
34213
  if (e.maxWidth !== void 0 && e.maxWidth !== null) {
34214
34214
  const t = (n) => {
34215
34215
  var i, o, s, a, l;
34216
- const r = ((s = (o = (i = e.theme) == null ? void 0 : i.breakpoints) == null ? void 0 : o.values) == null ? void 0 : s[n]) || Wo[n];
34216
+ const r = ((s = (o = (i = e.theme) == null ? void 0 : i.breakpoints) == null ? void 0 : o.values) == null ? void 0 : s[n]) || jo[n];
34217
34217
  return r ? ((l = (a = e.theme) == null ? void 0 : a.breakpoints) == null ? void 0 : l.unit) !== "px" ? {
34218
34218
  maxWidth: `${r}${e.theme.breakpoints.unit}`
34219
34219
  } : {
@@ -34849,7 +34849,7 @@ const HM = (e) => {
34849
34849
  [r.key]: r.val
34850
34850
  }), {});
34851
34851
  };
34852
- function jM(e) {
34852
+ function WM(e) {
34853
34853
  const {
34854
34854
  // The breakpoint **start** at this value.
34855
34855
  // For instance with the first breakpoint xs: [xs, sm).
@@ -34898,7 +34898,7 @@ function jM(e) {
34898
34898
  ...i
34899
34899
  };
34900
34900
  }
34901
- const WM = {
34901
+ const jM = {
34902
34902
  borderRadius: 4
34903
34903
  };
34904
34904
  function tg(e = 8, t = tc({
@@ -34932,7 +34932,7 @@ function ng(e = {}, ...t) {
34932
34932
  spacing: i,
34933
34933
  shape: o = {},
34934
34934
  ...s
34935
- } = e, a = jM(n), l = tg(i);
34935
+ } = e, a = WM(n), l = tg(i);
34936
34936
  let c = Xt({
34937
34937
  breakpoints: a,
34938
34938
  direction: "ltr",
@@ -34944,11 +34944,11 @@ function ng(e = {}, ...t) {
34944
34944
  },
34945
34945
  spacing: l,
34946
34946
  shape: {
34947
- ...WM,
34947
+ ...jM,
34948
34948
  ...o
34949
34949
  }
34950
34950
  }, s);
34951
- return c = WA(c), c.applyStyles = GM, c = t.reduce((u, d) => Xt(u, d), c), c.unstable_sxConfig = {
34951
+ return c = jA(c), c.applyStyles = GM, c = t.reduce((u, d) => Xt(u, d), c), c.unstable_sxConfig = {
34952
34952
  ...es,
34953
34953
  ...s == null ? void 0 : s.unstable_sxConfig
34954
34954
  }, c.unstable_sx = function(d) {
@@ -35168,7 +35168,7 @@ function rR(e) {
35168
35168
  function sg(e) {
35169
35169
  return e && e.charAt(0).toLowerCase() + e.slice(1);
35170
35170
  }
35171
- function Wa(e, t, n = !1) {
35171
+ function ja(e, t, n = !1) {
35172
35172
  const r = {
35173
35173
  ...t
35174
35174
  };
@@ -35193,7 +35193,7 @@ function Wa(e, t, n = !1) {
35193
35193
  for (const l in s)
35194
35194
  if (Object.prototype.hasOwnProperty.call(s, l)) {
35195
35195
  const c = l;
35196
- r[o][c] = Wa(s[c], a[c], n);
35196
+ r[o][c] = ja(s[c], a[c], n);
35197
35197
  }
35198
35198
  }
35199
35199
  } else o === "className" && n && t.className ? r.className = Mf(e == null ? void 0 : e.className, t == null ? void 0 : t.className) : o === "style" && n && t.style ? r.style = {
@@ -35215,20 +35215,20 @@ function oR(e) {
35215
35215
  let n = e.match(t);
35216
35216
  return n && n[0].length === 1 && (n = n.map((r) => r + r)), process.env.NODE_ENV !== "production" && e.length !== e.trim().length && console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`), n ? `rgb${n.length === 4 ? "a" : ""}(${n.map((r, i) => i < 3 ? parseInt(r, 16) : Math.round(parseInt(r, 16) / 255 * 1e3) / 1e3).join(", ")})` : "";
35217
35217
  }
35218
- function Wn(e) {
35218
+ function jn(e) {
35219
35219
  if (e.type)
35220
35220
  return e;
35221
35221
  if (e.charAt(0) === "#")
35222
- return Wn(oR(e));
35222
+ return jn(oR(e));
35223
35223
  const t = e.indexOf("("), n = e.substring(0, t);
35224
35224
  if (!["rgb", "rgba", "hsl", "hsla", "color"].includes(n))
35225
35225
  throw new Error(process.env.NODE_ENV !== "production" ? `MUI: Unsupported \`${e}\` color.
35226
- The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : jn(9, e));
35226
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : Wn(9, e));
35227
35227
  let r = e.substring(t + 1, e.length - 1), i;
35228
35228
  if (n === "color") {
35229
35229
  if (r = r.split(" "), i = r.shift(), r.length === 4 && r[3].charAt(0) === "/" && (r[3] = r[3].slice(1)), !["srgb", "display-p3", "a98-rgb", "prophoto-rgb", "rec-2020"].includes(i))
35230
35230
  throw new Error(process.env.NODE_ENV !== "production" ? `MUI: unsupported \`${i}\` color space.
35231
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : jn(10, i));
35231
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : Wn(10, i));
35232
35232
  } else
35233
35233
  r = r.split(",");
35234
35234
  return r = r.map((o) => parseFloat(o)), {
@@ -35238,7 +35238,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
35238
35238
  };
35239
35239
  }
35240
35240
  const sR = (e) => {
35241
- const t = Wn(e);
35241
+ const t = jn(e);
35242
35242
  return t.values.slice(0, 3).map((n, r) => t.type.includes("hsl") && r !== 0 ? `${n}%` : n).join(" ");
35243
35243
  }, oi = (e, t) => {
35244
35244
  try {
@@ -35258,7 +35258,7 @@ function ts(e) {
35258
35258
  return t.includes("rgb") ? r = r.map((i, o) => o < 3 ? parseInt(i, 10) : i) : t.includes("hsl") && (r[1] = `${r[1]}%`, r[2] = `${r[2]}%`), t.includes("color") ? r = `${n} ${r.join(" ")}` : r = `${r.join(", ")}`, `${t}(${r})`;
35259
35259
  }
35260
35260
  function ag(e) {
35261
- e = Wn(e);
35261
+ e = jn(e);
35262
35262
  const {
35263
35263
  values: t
35264
35264
  } = e, n = t[0], r = t[1] / 100, i = t[2] / 100, o = r * Math.min(i, 1 - i), s = (c, u = (c + n / 30) % 12) => i - o * Math.max(Math.min(u - 3, 9 - u, 1), -1);
@@ -35270,8 +35270,8 @@ function ag(e) {
35270
35270
  });
35271
35271
  }
35272
35272
  function Ga(e) {
35273
- e = Wn(e);
35274
- let t = e.type === "hsl" || e.type === "hsla" ? Wn(ag(e)).values : e.values;
35273
+ e = jn(e);
35274
+ let t = e.type === "hsl" || e.type === "hsla" ? jn(ag(e)).values : e.values;
35275
35275
  return t = t.map((n) => (e.type !== "color" && (n /= 255), n <= 0.03928 ? n / 12.92 : ((n + 0.055) / 1.055) ** 2.4)), Number((0.2126 * t[0] + 0.7152 * t[1] + 0.0722 * t[2]).toFixed(3));
35276
35276
  }
35277
35277
  function mf(e, t) {
@@ -35279,7 +35279,7 @@ function mf(e, t) {
35279
35279
  return (Math.max(n, r) + 0.05) / (Math.min(n, r) + 0.05);
35280
35280
  }
35281
35281
  function aR(e, t) {
35282
- return e = Wn(e), t = ic(t), (e.type === "rgb" || e.type === "hsl") && (e.type += "a"), e.type === "color" ? e.values[3] = `/${t}` : e.values[3] = t, ts(e);
35282
+ return e = jn(e), t = ic(t), (e.type === "rgb" || e.type === "hsl") && (e.type += "a"), e.type === "color" ? e.values[3] = `/${t}` : e.values[3] = t, ts(e);
35283
35283
  }
35284
35284
  function ro(e, t, n) {
35285
35285
  try {
@@ -35289,7 +35289,7 @@ function ro(e, t, n) {
35289
35289
  }
35290
35290
  }
35291
35291
  function oc(e, t) {
35292
- if (e = Wn(e), t = ic(t), e.type.includes("hsl"))
35292
+ if (e = jn(e), t = ic(t), e.type.includes("hsl"))
35293
35293
  e.values[2] *= 1 - t;
35294
35294
  else if (e.type.includes("rgb") || e.type.includes("color"))
35295
35295
  for (let n = 0; n < 3; n += 1)
@@ -35304,7 +35304,7 @@ function Je(e, t, n) {
35304
35304
  }
35305
35305
  }
35306
35306
  function sc(e, t) {
35307
- if (e = Wn(e), t = ic(t), e.type.includes("hsl"))
35307
+ if (e = jn(e), t = ic(t), e.type.includes("hsl"))
35308
35308
  e.values[2] += (100 - e.values[2]) * t;
35309
35309
  else if (e.type.includes("rgb"))
35310
35310
  for (let n = 0; n < 3; n += 1)
@@ -35342,7 +35342,7 @@ function uR(e) {
35342
35342
  if (!t || !t.components || !t.components[n])
35343
35343
  return r;
35344
35344
  const i = t.components[n];
35345
- return i.defaultProps ? Wa(i.defaultProps, r, t.components.mergeClassNameAndStyle) : !i.styleOverrides && !i.variants ? Wa(i, r, t.components.mergeClassNameAndStyle) : r;
35345
+ return i.defaultProps ? ja(i.defaultProps, r, t.components.mergeClassNameAndStyle) : !i.styleOverrides && !i.variants ? ja(i, r, t.components.mergeClassNameAndStyle) : r;
35346
35346
  }
35347
35347
  function dR({
35348
35348
  props: e,
@@ -35757,7 +35757,7 @@ function ac(e) {
35757
35757
  ...p
35758
35758
  }, !p.main && p[y] && (p.main = p[y]), !p.hasOwnProperty("main"))
35759
35759
  throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The color${v ? ` (${v})` : ""} provided to augmentColor(color) is invalid.
35760
- The color object needs to have a \`main\` property or a \`${y}\` property.` : jn(11, v ? ` (${v})` : "", y));
35760
+ The color object needs to have a \`main\` property or a \`${y}\` property.` : Wn(11, v ? ` (${v})` : "", y));
35761
35761
  if (typeof p.main != "string")
35762
35762
  throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The color${v ? ` (${v})` : ""} provided to augmentColor(color) is invalid.
35763
35763
  \`color.main\` should be a string, but \`${JSON.stringify(p.main)}\` was provided instead.
@@ -35772,7 +35772,7 @@ const theme1 = createTheme({ palette: {
35772
35772
 
35773
35773
  const theme2 = createTheme({ palette: {
35774
35774
  primary: { main: green[500] },
35775
- } });` : jn(12, v ? ` (${v})` : "", JSON.stringify(p.main)));
35775
+ } });` : Wn(12, v ? ` (${v})` : "", JSON.stringify(p.main)));
35776
35776
  return xf(p, "light", E, r), xf(p, "dark", w, r), p.contrastText || (p.contrastText = d(p.main)), p;
35777
35777
  };
35778
35778
  let h;
@@ -36047,7 +36047,7 @@ function Ka(e = {}, ...t) {
36047
36047
  if (e.vars && // The error should throw only for the root theme creation because user is not allowed to use a custom node `vars`.
36048
36048
  // `generateThemeVars` is the closest identifier for checking that the `options` is a result of `createTheme` with CSS variables so that user can create new theme for nested ThemeProvider.
36049
36049
  e.generateThemeVars === void 0)
36050
- throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature." : jn(20));
36050
+ throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature." : Wn(20));
36051
36051
  const u = ac(o), d = ng(e);
36052
36052
  let f = Xt(d, {
36053
36053
  mixins: TR(d.breakpoints, r),
@@ -36140,13 +36140,13 @@ function HR(e) {
36140
36140
  return !!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/) || !!e[0].match(/sxConfig$/) || // ends with sxConfig
36141
36141
  e[0] === "palette" && !!((t = e[1]) != null && t.match(/(mode|contrastThreshold|tonalOffset)/));
36142
36142
  }
36143
- const jR = (e) => [...[...Array(25)].map((t, n) => `--${e ? `${e}-` : ""}overlays-${n}`), `--${e ? `${e}-` : ""}palette-AppBar-darkBg`, `--${e ? `${e}-` : ""}palette-AppBar-darkColor`], WR = (e) => (t, n) => {
36143
+ const WR = (e) => [...[...Array(25)].map((t, n) => `--${e ? `${e}-` : ""}overlays-${n}`), `--${e ? `${e}-` : ""}palette-AppBar-darkBg`, `--${e ? `${e}-` : ""}palette-AppBar-darkColor`], jR = (e) => (t, n) => {
36144
36144
  const r = e.rootSelector || ":root", i = e.colorSchemeSelector;
36145
36145
  let o = i;
36146
36146
  if (i === "class" && (o = ".%s"), i === "data" && (o = "[data-%s]"), i != null && i.startsWith("data-") && !i.includes("%s") && (o = `[${i}="%s"]`), e.defaultColorScheme === t) {
36147
36147
  if (t === "dark") {
36148
36148
  const s = {};
36149
- return jR(e.cssVarPrefix).forEach((a) => {
36149
+ return WR(e.cssVarPrefix).forEach((a) => {
36150
36150
  s[a] = n[a], delete n[a];
36151
36151
  }), o === "media" ? {
36152
36152
  [r]: n,
@@ -36258,7 +36258,7 @@ function YR(e = {}, ...t) {
36258
36258
  };
36259
36259
  let E = h;
36260
36260
  if ((d === "dark" && !("dark" in n) || d === "light" && !("light" in n)) && (E = !0), !E)
36261
- throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The \`colorSchemes.${d}\` option is either missing or invalid.` : jn(21, d));
36261
+ throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The \`colorSchemes.${d}\` option is either missing or invalid.` : Wn(21, d));
36262
36262
  const w = ta(y, E, c, d);
36263
36263
  g && !y.light && ta(y, g, void 0, "light"), p && !y.dark && ta(y, p, void 0, "dark");
36264
36264
  let _ = {
@@ -36299,7 +36299,7 @@ function YR(e = {}, ...t) {
36299
36299
  prefix: o,
36300
36300
  disableCssColorScheme: i,
36301
36301
  shouldSkipGeneratingVar: s,
36302
- getSelector: WR(_)
36302
+ getSelector: jR(_)
36303
36303
  }, {
36304
36304
  vars: C,
36305
36305
  generateThemeVars: R,
@@ -38489,63 +38489,75 @@ class yI {
38489
38489
  registerFunctionToolsHandler() {
38490
38490
  try {
38491
38491
  this.room.registerTextStreamHandler("function_tools_executed", async (t, n) => {
38492
+ var o, s, a, l;
38492
38493
  const r = await t.readAll();
38493
- console.log("StreamHandlerManager: Raw function_tools_executed data:", r);
38494
+ console.log(
38495
+ "StreamHandlerManager: Raw function_tools_executed data (type, length, first 200 chars):",
38496
+ typeof r,
38497
+ r == null ? void 0 : r.length,
38498
+ (o = r == null ? void 0 : r.substring) == null ? void 0 : o.call(r, 0, 200)
38499
+ );
38494
38500
  let i = {};
38495
38501
  try {
38496
38502
  if (typeof r == "string")
38497
38503
  try {
38498
- i = JSON.parse(r);
38499
- } catch (o) {
38500
- console.warn("StreamHandlerManager: Initial JSON parse failed:", o);
38501
- let s = r;
38504
+ i = JSON.parse(r), console.log("StreamHandlerManager: Direct JSON parse succeeded!");
38505
+ } catch (c) {
38506
+ console.warn("StreamHandlerManager: Initial JSON parse failed:", c), console.warn("First 100 chars of raw data:", r.substring(0, 100));
38507
+ let u = r;
38502
38508
  try {
38503
- s = s.replace(/\bTrue\b/g, "true"), s = s.replace(/\bFalse\b/g, "false"), s = s.replace(/\bNone\b/g, "null"), s = s.replace(/,(\s*[}\]])/g, "$1");
38504
- let a = "", l = !1, c = "", u = 0;
38505
- for (let d = 0; d < s.length; d++) {
38506
- const f = s[d];
38507
- if ((d > 0 ? s[d - 1] : "") === "\\") {
38508
- a += f;
38509
+ console.log("StreamHandlerManager: Starting enhanced parsing..."), u = u.replace(/\bTrue\b/g, "true"), u = u.replace(/\bFalse\b/g, "false"), u = u.replace(/\bNone\b/g, "null"), u = u.replace(/,(\s*[}\]])/g, "$1"), console.log("StreamHandlerManager: After replacements (first 200 chars):", u.substring(0, 200));
38510
+ let d = "", f = !1, h = "";
38511
+ for (let g = 0; g < u.length; g++) {
38512
+ const p = u[g];
38513
+ if ((g > 0 ? u[g - 1] : "") === "\\") {
38514
+ d += p;
38509
38515
  continue;
38510
38516
  }
38511
- if ((f === '"' || f === "'") && !l) {
38512
- l = !0, c = f, a += '"';
38517
+ if ((p === '"' || p === "'") && !f) {
38518
+ f = !0, h = p, d += '"';
38513
38519
  continue;
38514
38520
  }
38515
- if (f === c && l) {
38516
- const g = d < s.length - 1 ? s[d + 1] : "";
38517
- if (g === ":" || g === "," || g === "}" || g === "]" || g === "" || /\s/.test(g)) {
38518
- l = !1, a += '"';
38521
+ if (p === h && f) {
38522
+ const y = g < u.length - 1 ? u[g + 1] : "";
38523
+ if (y === ":" || y === "," || y === "}" || y === "]" || y === "" || /\s/.test(y)) {
38524
+ f = !1, d += '"';
38519
38525
  continue;
38520
38526
  }
38521
38527
  }
38522
- l && f === '"' ? a += '\\"' : a += f;
38528
+ f && p === '"' ? d += '\\"' : d += p;
38523
38529
  }
38524
- s = a, console.log("StreamHandlerManager: After quote conversion (first 500 chars):", s.substring(0, 500)), i = JSON.parse(s), console.log("StreamHandlerManager: Successfully parsed with enhanced logic");
38525
- } catch (a) {
38526
- console.warn("StreamHandlerManager: Enhanced parsing also failed:", a), console.warn("Problematic JSON string (first 500 chars):", s == null ? void 0 : s.substring(0, 500)), console.warn("Full data:", r);
38530
+ u = d, console.log("StreamHandlerManager: โœ… Quote conversion complete. Length:", u.length), console.log("StreamHandlerManager: After quote conversion (first 500 chars):", u.substring(0, 500)), i = JSON.parse(u), console.log("StreamHandlerManager: โœ… Successfully parsed with enhanced logic");
38531
+ } catch (d) {
38532
+ console.error("StreamHandlerManager: โŒ Enhanced parsing failed:", d == null ? void 0 : d.message), console.error("Error position:", (a = (s = d == null ? void 0 : d.message) == null ? void 0 : s.match(/position (\d+)/)) == null ? void 0 : a[1]), console.error("After conversion (first 600 chars):", u == null ? void 0 : u.substring(0, 600)), console.error(
38533
+ "Characters around error position:",
38534
+ (l = d == null ? void 0 : d.message) != null && l.match(/position (\d+)/) ? u == null ? void 0 : u.substring(
38535
+ Math.max(0, parseInt(d.message.match(/position (\d+)/)[1]) - 50),
38536
+ parseInt(d.message.match(/position (\d+)/)[1]) + 50
38537
+ ) : "N/A"
38538
+ );
38527
38539
  try {
38528
- let l = r.replace(/\bTrue\b/g, "true").replace(/\bFalse\b/g, "false").replace(/\bNone\b/g, "null");
38529
- i = new Function("return " + l)();
38530
- } catch (l) {
38531
- throw console.error("StreamHandlerManager: All parsing methods failed:", l), o;
38540
+ let f = r.replace(/\bTrue\b/g, "true").replace(/\bFalse\b/g, "false").replace(/\bNone\b/g, "null");
38541
+ i = new Function("return " + f)();
38542
+ } catch (f) {
38543
+ throw console.error("StreamHandlerManager: All parsing methods failed:", f), c;
38532
38544
  }
38533
38545
  }
38534
38546
  }
38535
38547
  else
38536
38548
  i = r;
38537
- } catch (o) {
38538
- console.warn("StreamHandlerManager: Failed to parse function_tool_executed:", o, r);
38539
- let s = null;
38549
+ } catch (c) {
38550
+ console.warn("StreamHandlerManager: Failed to parse function_tool_executed:", c, r);
38551
+ let u = null;
38540
38552
  if (typeof r == "string" && r.includes("visualization_data"))
38541
38553
  try {
38542
- const a = r.match(/"arguments":\s*"({.*?})"/);
38543
- if (a) {
38544
- const l = a[1].replace(/\\"/g, '"');
38545
- s = JSON.parse(l), console.log("๐Ÿ› ๏ธ StreamHandlerManager: Extracted visualization data:", s);
38554
+ const d = r.match(/"arguments":\s*"({.*?})"/);
38555
+ if (d) {
38556
+ const f = d[1].replace(/\\"/g, '"');
38557
+ u = JSON.parse(f), console.log("๐Ÿ› ๏ธ StreamHandlerManager: Extracted visualization data:", u);
38546
38558
  }
38547
- } catch (a) {
38548
- console.warn("StreamHandlerManager: Failed to extract visualization data:", a);
38559
+ } catch (d) {
38560
+ console.warn("StreamHandlerManager: Failed to extract visualization data:", d);
38549
38561
  }
38550
38562
  i = {
38551
38563
  type: "function_tools_executed",
@@ -38554,7 +38566,7 @@ class yI {
38554
38566
  created_at: Date.now() / 1e3,
38555
38567
  parseError: !0,
38556
38568
  rawData: r,
38557
- extractedVisualizationData: s
38569
+ extractedVisualizationData: u
38558
38570
  };
38559
38571
  }
38560
38572
  this.eventEmitter.emit("tool.executed", i);
@@ -38757,7 +38769,7 @@ function ia({
38757
38769
  h(null), p("idle"), y(ke), w([]), k([]), R([]);
38758
38770
  }, q = (se) => {
38759
38771
  w((ke) => [...ke, se]);
38760
- }, W = (se) => {
38772
+ }, j = (se) => {
38761
38773
  w((ke) => ke.filter((pe) => pe.id !== se.id));
38762
38774
  }, ce = (se) => {
38763
38775
  k((ke) => [...ke, se]);
@@ -38768,8 +38780,8 @@ function ia({
38768
38780
  }, L = () => {
38769
38781
  console.log("๐Ÿงน VoxketProvider: Clearing chat messages and transcriptions"), k([]), R([]);
38770
38782
  };
38771
- return U.on("connection.connecting", x), U.on("connection.connected", $), U.on("connection.disconnected", K), U.on("connection.error", S), U.on("session.created", Y), U.on("session.state.changed", te), U.on("session.ended", B), U.on("participant.joined", q), U.on("participant.left", W), U.on("chat.message.received", ce), U.on("chat.message.sent", Q), U.on("transcription.received", xe), U.on("chat.history.cleared", L), () => {
38772
- console.log("๐Ÿ“ VoxketProvider: Cleaning up event listeners"), U.off("connection.connecting", x), U.off("connection.connected", $), U.off("connection.disconnected", K), U.off("connection.error", S), U.off("session.created", Y), U.off("session.state.changed", te), U.off("session.ended", B), U.off("participant.joined", q), U.off("participant.left", W), U.off("chat.message.received", ce), U.off("chat.message.sent", Q), U.off("chat.history.cleared", L), U.off("transcription.received", xe);
38783
+ return U.on("connection.connecting", x), U.on("connection.connected", $), U.on("connection.disconnected", K), U.on("connection.error", S), U.on("session.created", Y), U.on("session.state.changed", te), U.on("session.ended", B), U.on("participant.joined", q), U.on("participant.left", j), U.on("chat.message.received", ce), U.on("chat.message.sent", Q), U.on("transcription.received", xe), U.on("chat.history.cleared", L), () => {
38784
+ console.log("๐Ÿ“ VoxketProvider: Cleaning up event listeners"), U.off("connection.connecting", x), U.off("connection.connected", $), U.off("connection.disconnected", K), U.off("connection.error", S), U.off("session.created", Y), U.off("session.state.changed", te), U.off("session.ended", B), U.off("participant.joined", q), U.off("participant.left", j), U.off("chat.message.received", ce), U.off("chat.message.sent", Q), U.off("chat.history.cleared", L), U.off("transcription.received", xe);
38773
38785
  };
38774
38786
  }, O = async (U) => {
38775
38787
  const x = U || i;
@@ -39800,7 +39812,7 @@ function TI(e) {
39800
39812
  return !1;
39801
39813
  }), [K, S] = P.useState(!1), [Y, te] = P.useState(t || ""), [B, q] = P.useState(
39802
39814
  n || "User"
39803
- ), [W, ce] = P.useState(() => {
39815
+ ), [j, ce] = P.useState(() => {
39804
39816
  try {
39805
39817
  if (I)
39806
39818
  return I.getCurrentSession();
@@ -39828,7 +39840,7 @@ function TI(e) {
39828
39840
  P.useEffect(() => {
39829
39841
  A === "fullscreen" && console.log("๐ŸŽฏ Widget: Switched to fullscreen mode");
39830
39842
  }, [A]), P.useEffect(() => {
39831
- x && !K ? console.log("๐Ÿ“Š Session started:", { currentMode: Q, sessionId: W == null ? void 0 : W.id }) : !x && !K && Q === "welcome" && console.log("๐Ÿ“Š Returned to welcome screen");
39843
+ x && !K ? console.log("๐Ÿ“Š Session started:", { currentMode: Q, sessionId: j == null ? void 0 : j.id }) : !x && !K && Q === "welcome" && console.log("๐Ÿ“Š Returned to welcome screen");
39832
39844
  }, [x, Q, K]);
39833
39845
  const le = P.useMemo(() => {
39834
39846
  try {
@@ -39880,33 +39892,33 @@ function TI(e) {
39880
39892
  state: Re.state,
39881
39893
  numParticipants: Re.numParticipants,
39882
39894
  isConnected: Re.state === "connected",
39883
- sessionId: W == null ? void 0 : W.id
39895
+ sessionId: j == null ? void 0 : j.id
39884
39896
  });
39885
- }, ot = ($e, T, j) => {
39897
+ }, ot = ($e, T, W) => {
39886
39898
  console.log("๐ŸŽต Widget: Track subscribed:", {
39887
39899
  trackKind: $e.kind,
39888
39900
  trackSource: $e.source,
39889
- participantSid: j.sid,
39890
- participantIdentity: j.identity,
39891
- sessionId: W == null ? void 0 : W.id
39901
+ participantSid: W.sid,
39902
+ participantIdentity: W.identity,
39903
+ sessionId: j == null ? void 0 : j.id
39892
39904
  });
39893
39905
  };
39894
39906
  return Re.on(Be.Connected, ae), Re.on(Be.Disconnected, ae), Re.on(Be.TrackSubscribed, ot), () => {
39895
39907
  Re.off(Be.Connected, ae), Re.off(Be.Disconnected, ae), Re.off(Be.TrackSubscribed, ot);
39896
39908
  };
39897
39909
  }
39898
- }, [Re, W == null ? void 0 : W.id]), P.useEffect(() => {
39910
+ }, [Re, j == null ? void 0 : j.id]), P.useEffect(() => {
39899
39911
  !K && Q === "welcome" ? console.log("๐ŸŽฌ Widget: Welcome screen ready") : x && Q !== "welcome" && console.log("๐ŸŽฌ Widget: Session mode active:", Q);
39900
39912
  }, [Q, K, x]), P.useEffect(() => {
39901
- (Q === "voice" || Q === "video" || Q === "chat") && !W && !x && !K && le && !le.connected && (console.log("๐Ÿ”„ Auto-correcting: Found orphaned mode without session, returning to welcome"), xe("welcome"), S(!1));
39902
- }, [Q, W, x, K, le]);
39913
+ (Q === "voice" || Q === "video" || Q === "chat") && !j && !x && !K && le && !le.connected && (console.log("๐Ÿ”„ Auto-correcting: Found orphaned mode without session, returning to welcome"), xe("welcome"), S(!1));
39914
+ }, [Q, j, x, K, le]);
39903
39915
  const { sessionMetrics: bt, sessionLogs: yt, logEvent: ln } = fI({
39904
39916
  room: Re,
39905
39917
  onSessionStart: E,
39906
39918
  onSessionEnd: w,
39907
39919
  enableConsoleLogging: _,
39908
39920
  enableLocalStorage: _,
39909
- voxketSessionId: W == null ? void 0 : W.id
39921
+ voxketSessionId: j == null ? void 0 : j.id
39910
39922
  });
39911
39923
  P.useEffect(() => {
39912
39924
  k && k(yt);
@@ -39931,13 +39943,13 @@ function TI(e) {
39931
39943
  });
39932
39944
  };
39933
39945
  }, [le, Q, K, x]);
39934
- const J = !!(!!(le != null && le.connected) && x && W);
39946
+ const J = !!(!!(le != null && le.connected) && x && j);
39935
39947
  P.useEffect(() => {
39936
39948
  const ae = ($e) => {
39937
39949
  console.log("๐Ÿ”ด Widget: Room disconnected:", $e), console.log("๐Ÿ” Widget: Current state on disconnect:", {
39938
39950
  currentMode: Q,
39939
39951
  sessionStarted: x,
39940
- currentSessionId: W == null ? void 0 : W.id,
39952
+ currentSessionId: j == null ? void 0 : j.id,
39941
39953
  loading: K
39942
39954
  }), S(!1), $(!1), ce(null), xe("welcome"), console.log("๐Ÿ  Widget: Automatically returning to welcome screen after disconnect");
39943
39955
  }, ot = ($e) => {
@@ -39946,7 +39958,7 @@ function TI(e) {
39946
39958
  return Re.on(Be.MediaDevicesError, ot), Re.on(Be.Disconnected, ae), () => {
39947
39959
  Re.off(Be.Disconnected, ae), Re.off(Be.MediaDevicesError, ot);
39948
39960
  };
39949
- }, [Re, Q, x, W == null ? void 0 : W.id, K]);
39961
+ }, [Re, Q, x, j == null ? void 0 : j.id, K]);
39950
39962
  const ve = async () => {
39951
39963
  try {
39952
39964
  if (!le) {
@@ -39999,7 +40011,7 @@ function TI(e) {
39999
40011
  console.error("โŒ Failed to start video session:", ae), S(!1), $(!1), xe("welcome");
40000
40012
  }
40001
40013
  }, Et = () => {
40002
- xe("welcome"), S(!1), F && F(e.displayType || "widget"), W && x ? (console.log("๐Ÿงน Widget: Cleaning up active session"), $(!1), ce(null), le && (console.log("๐Ÿ”Œ Widget: Disconnecting client and cleaning up room"), le.disconnect().catch((ae) => {
40014
+ xe("welcome"), S(!1), F && F(e.displayType || "widget"), j && x ? (console.log("๐Ÿงน Widget: Cleaning up active session"), $(!1), ce(null), le && (console.log("๐Ÿ”Œ Widget: Disconnecting client and cleaning up room"), le.disconnect().catch((ae) => {
40003
40015
  console.error("โŒ Widget: Error during disconnect:", ae);
40004
40016
  }))) : (console.log("๐Ÿ“ Widget: No active session to clean up"), le && le.connected && (console.log("๐Ÿ”Œ Widget: Force disconnecting client for fresh state"), le.disconnect().catch((ae) => {
40005
40017
  console.error("โŒ Widget: Error during force disconnect:", ae);
@@ -40010,7 +40022,7 @@ function TI(e) {
40010
40022
  });
40011
40023
  }, Ut = () => {
40012
40024
  const ae = !L;
40013
- se(ae), M && M(ae), !ae && !(W && x) && (xe("welcome"), $(!1), ce(null));
40025
+ se(ae), M && M(ae), !ae && !(j && x) && (xe("welcome"), $(!1), ce(null));
40014
40026
  }, Gt = () => {
40015
40027
  console.log("๐Ÿ”„ Closing fullscreen, switching to widget display type"), e.onDisplayTypeChange ? e.onDisplayTypeChange("widget") : console.warn("โš ๏ธ No onDisplayTypeChange callback provided");
40016
40028
  }, pn = () => {
@@ -40041,7 +40053,7 @@ function TI(e) {
40041
40053
  {
40042
40054
  onClick: () => {
40043
40055
  if (J) {
40044
- !ne && (W != null && W.activeModalities) && (W.activeModalities.includes("chat") ? ge("chat") : W.activeModalities.includes("video") ? ge("video") : W.activeModalities.includes("voice") && ge("voice")), pe(!1), se(!0), M && M(!0);
40056
+ !ne && (j != null && j.activeModalities) && (j.activeModalities.includes("chat") ? ge("chat") : j.activeModalities.includes("video") ? ge("video") : j.activeModalities.includes("voice") && ge("voice")), pe(!1), se(!0), M && M(!0);
40045
40057
  return;
40046
40058
  }
40047
40059
  if (G !== "all") {
@@ -40059,7 +40071,7 @@ function TI(e) {
40059
40071
  ke && G === "all" && (() => {
40060
40072
  const $e = {};
40061
40073
  O === "bottom-right" ? ($e.bottom = 88, $e.right = 16) : O === "bottom-left" ? ($e.bottom = 88, $e.left = 16) : O === "top-right" ? ($e.top = 88, $e.right = 16) : ($e.top = 88, $e.left = 16);
40062
- const T = "absolute w-0 h-0 border-8", j = O.startsWith("bottom") ? /* @__PURE__ */ m(
40074
+ const T = "absolute w-0 h-0 border-8", W = O.startsWith("bottom") ? /* @__PURE__ */ m(
40063
40075
  "div",
40064
40076
  {
40065
40077
  className: `${T} border-transparent border-t-black`,
@@ -40073,7 +40085,7 @@ function TI(e) {
40073
40085
  }
40074
40086
  );
40075
40087
  return /* @__PURE__ */ m("div", { className: "fixed z-[51]", style: $e, children: /* @__PURE__ */ N("div", { className: "relative bg-black text-white rounded-xl shadow-2xl px-3 py-3", children: [
40076
- j,
40088
+ W,
40077
40089
  /* @__PURE__ */ m("div", { className: "text-xs uppercase tracking-wide mb-2 opacity-70", children: "Choose modality" }),
40078
40090
  /* @__PURE__ */ N("div", { className: "flex items-center gap-2", children: [
40079
40091
  /* @__PURE__ */ m(
@@ -40186,8 +40198,8 @@ function TI(e) {
40186
40198
  `loading-${Q}`
40187
40199
  ),
40188
40200
  Q === "voice" && !K && x && le && /* @__PURE__ */ N(xc.Provider, { value: Re, children: [
40189
- /* @__PURE__ */ m(vc, {}, `audio-${(W == null ? void 0 : W.id) || "no-session"}`),
40190
- /* @__PURE__ */ m(wc, { label: "Start Audio" }, `start-audio-${(W == null ? void 0 : W.id) || "no-session"}`),
40201
+ /* @__PURE__ */ m(vc, {}, `audio-${(j == null ? void 0 : j.id) || "no-session"}`),
40202
+ /* @__PURE__ */ m(wc, { label: "Start Audio" }, `start-audio-${(j == null ? void 0 : j.id) || "no-session"}`),
40191
40203
  /* @__PURE__ */ m(
40192
40204
  wI,
40193
40205
  {
@@ -40230,8 +40242,8 @@ function TI(e) {
40230
40242
  "chat-view"
40231
40243
  ),
40232
40244
  Q === "video" && !K && x && le && /* @__PURE__ */ N(xc.Provider, { value: Re, children: [
40233
- /* @__PURE__ */ m(vc, {}, `audio-video-${(W == null ? void 0 : W.id) || "no-session"}`),
40234
- /* @__PURE__ */ m(wc, { label: "Start Audio" }, `start-audio-video-${(W == null ? void 0 : W.id) || "no-session"}`),
40245
+ /* @__PURE__ */ m(vc, {}, `audio-video-${(j == null ? void 0 : j.id) || "no-session"}`),
40246
+ /* @__PURE__ */ m(wc, { label: "Start Audio" }, `start-audio-video-${(j == null ? void 0 : j.id) || "no-session"}`),
40235
40247
  /* @__PURE__ */ m(
40236
40248
  SI,
40237
40249
  {
@@ -41228,7 +41240,7 @@ const CO = gg(
41228
41240
  console.log("Voice modality deactivated");
41229
41241
  },
41230
41242
  onMessage: async (e, t) => {
41231
- t.type === "audio" && jI(e, t);
41243
+ t.type === "audio" && WI(e, t);
41232
41244
  }
41233
41245
  }
41234
41246
  );
@@ -41243,7 +41255,7 @@ function HI(e, t) {
41243
41255
  const n = t.silenceThreshold || -50;
41244
41256
  console.log("Voice activation setup with threshold:", n);
41245
41257
  }
41246
- function jI(e, t) {
41258
+ function WI(e, t) {
41247
41259
  console.log("Playing audio response:", t.content);
41248
41260
  }
41249
41261
  const TO = gg(
@@ -41252,7 +41264,7 @@ const TO = gg(
41252
41264
  {
41253
41265
  onActivate: async (e) => {
41254
41266
  const t = e.config;
41255
- t.enableRichText && WI(), t.enableFileUpload && GI(e), t.enableCustomComponents && KI(), console.log("Chat modality activated", t);
41267
+ t.enableRichText && jI(), t.enableFileUpload && GI(e), t.enableCustomComponents && KI(), console.log("Chat modality activated", t);
41256
41268
  },
41257
41269
  onDeactivate: async (e) => {
41258
41270
  console.log("Chat modality deactivated");
@@ -41263,7 +41275,7 @@ const TO = gg(
41263
41275
  }
41264
41276
  }
41265
41277
  );
41266
- function WI(e) {
41278
+ function jI(e) {
41267
41279
  console.log("Rich text support enabled");
41268
41280
  }
41269
41281
  function GI(e) {