@anam-ai/agent-widget 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- var Ke, M, Ii, bi, ye, Jt, wi, Ri, Ai, Mt, It, bt, He = {}, Oi = [], Cn = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, lt = Array.isArray;
1
+ var Ke, M, bi, wi, ye, Jt, Ri, Ai, Oi, Mt, It, bt, He = {}, xi = [], Sn = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, lt = Array.isArray;
2
2
  function le(t, e) {
3
3
  for (var i in e) t[i] = e[i];
4
4
  return t;
@@ -13,7 +13,7 @@ function xe(t, e, i) {
13
13
  return je(t, c, n, a, null);
14
14
  }
15
15
  function je(t, e, i, n, a) {
16
- var s = { type: t, props: e, key: i, ref: n, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: a ?? ++Ii, __i: -1, __u: 0 };
16
+ var s = { type: t, props: e, key: i, ref: n, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: a ?? ++bi, __i: -1, __u: 0 };
17
17
  return a == null && M.vnode != null && M.vnode(s), s;
18
18
  }
19
19
  function Ce(t) {
@@ -27,38 +27,38 @@ function Le(t, e) {
27
27
  for (var i; e < t.__k.length; e++) if ((i = t.__k[e]) != null && i.__e != null) return i.__e;
28
28
  return typeof t.type == "function" ? Le(t) : null;
29
29
  }
30
- function xi(t) {
30
+ function Ni(t) {
31
31
  var e, i;
32
32
  if ((t = t.__) != null && t.__c != null) {
33
33
  for (t.__e = t.__c.base = null, e = 0; e < t.__k.length; e++) if ((i = t.__k[e]) != null && i.__e != null) {
34
34
  t.__e = t.__c.base = i.__e;
35
35
  break;
36
36
  }
37
- return xi(t);
37
+ return Ni(t);
38
38
  }
39
39
  }
40
40
  function Xt(t) {
41
- (!t.__d && (t.__d = !0) && ye.push(t) && !rt.__r++ || Jt != M.debounceRendering) && ((Jt = M.debounceRendering) || wi)(rt);
41
+ (!t.__d && (t.__d = !0) && ye.push(t) && !rt.__r++ || Jt != M.debounceRendering) && ((Jt = M.debounceRendering) || Ri)(rt);
42
42
  }
43
43
  function rt() {
44
- for (var t, e, i, n, a, s, c, l = 1; ye.length; ) ye.length > l && ye.sort(Ri), t = ye.shift(), l = ye.length, t.__d && (i = void 0, n = void 0, a = (n = (e = t).__v).__e, s = [], c = [], e.__P && ((i = le({}, n)).__v = n.__v + 1, M.vnode && M.vnode(i), Ut(e.__P, i, n, e.__n, e.__P.namespaceURI, 32 & n.__u ? [a] : null, s, a ?? Le(n), !!(32 & n.__u), c), i.__v = n.__v, i.__.__k[i.__i] = i, Li(s, i, c), n.__e = n.__ = null, i.__e != a && xi(i)));
44
+ for (var t, e, i, n, a, s, c, l = 1; ye.length; ) ye.length > l && ye.sort(Ai), t = ye.shift(), l = ye.length, t.__d && (i = void 0, n = void 0, a = (n = (e = t).__v).__e, s = [], c = [], e.__P && ((i = le({}, n)).__v = n.__v + 1, M.vnode && M.vnode(i), Ut(e.__P, i, n, e.__n, e.__P.namespaceURI, 32 & n.__u ? [a] : null, s, a ?? Le(n), !!(32 & n.__u), c), i.__v = n.__v, i.__.__k[i.__i] = i, Mi(s, i, c), n.__e = n.__ = null, i.__e != a && Ni(i)));
45
45
  rt.__r = 0;
46
46
  }
47
- function Ni(t, e, i, n, a, s, c, l, m, f, p) {
48
- var u, y, E, T, I, w, A, R = n && n.__k || Oi, b = e.length;
49
- for (m = Sn(i, e, R, m, b), u = 0; u < b; u++) (E = i.__k[u]) != null && (y = E.__i == -1 ? He : R[E.__i] || He, E.__i = u, w = Ut(t, E, y, a, s, c, l, m, f, p), T = E.__e, E.ref && y.ref != E.ref && (y.ref && Pt(y.ref, null, E), p.push(E.ref, E.__c || T, E)), I == null && T != null && (I = T), (A = !!(4 & E.__u)) || y.__k === E.__k ? m = ki(E, m, t, A) : typeof E.type == "function" && w !== void 0 ? m = w : T && (m = T.nextSibling), E.__u &= -7);
47
+ function ki(t, e, i, n, a, s, c, l, m, f, p) {
48
+ var u, y, E, T, I, w, A, R = n && n.__k || xi, b = e.length;
49
+ for (m = Tn(i, e, R, m, b), u = 0; u < b; u++) (E = i.__k[u]) != null && (y = E.__i == -1 ? He : R[E.__i] || He, E.__i = u, w = Ut(t, E, y, a, s, c, l, m, f, p), T = E.__e, E.ref && y.ref != E.ref && (y.ref && Pt(y.ref, null, E), p.push(E.ref, E.__c || T, E)), I == null && T != null && (I = T), (A = !!(4 & E.__u)) || y.__k === E.__k ? m = Li(E, m, t, A) : typeof E.type == "function" && w !== void 0 ? m = w : T && (m = T.nextSibling), E.__u &= -7);
50
50
  return i.__e = I, m;
51
51
  }
52
- function Sn(t, e, i, n, a) {
52
+ function Tn(t, e, i, n, a) {
53
53
  var s, c, l, m, f, p = i.length, u = p, y = 0;
54
- for (t.__k = new Array(a), s = 0; s < a; s++) (c = e[s]) != null && typeof c != "boolean" && typeof c != "function" ? (typeof c == "string" || typeof c == "number" || typeof c == "bigint" || c.constructor == String ? c = t.__k[s] = je(null, c, null, null, null) : lt(c) ? c = t.__k[s] = je(Ce, { children: c }, null, null, null) : c.constructor === void 0 && c.__b > 0 ? c = t.__k[s] = je(c.type, c.props, c.key, c.ref ? c.ref : null, c.__v) : t.__k[s] = c, m = s + y, c.__ = t, c.__b = t.__b + 1, l = null, (f = c.__i = Tn(c, i, m, u)) != -1 && (u--, (l = i[f]) && (l.__u |= 2)), l == null || l.__v == null ? (f == -1 && (a > p ? y-- : a < p && y++), typeof c.type != "function" && (c.__u |= 4)) : f != m && (f == m - 1 ? y-- : f == m + 1 ? y++ : (f > m ? y-- : y++, c.__u |= 4))) : t.__k[s] = null;
55
- if (u) for (s = 0; s < p; s++) (l = i[s]) != null && (2 & l.__u) == 0 && (l.__e == n && (n = Le(l)), Di(l, l));
54
+ for (t.__k = new Array(a), s = 0; s < a; s++) (c = e[s]) != null && typeof c != "boolean" && typeof c != "function" ? (typeof c == "string" || typeof c == "number" || typeof c == "bigint" || c.constructor == String ? c = t.__k[s] = je(null, c, null, null, null) : lt(c) ? c = t.__k[s] = je(Ce, { children: c }, null, null, null) : c.constructor === void 0 && c.__b > 0 ? c = t.__k[s] = je(c.type, c.props, c.key, c.ref ? c.ref : null, c.__v) : t.__k[s] = c, m = s + y, c.__ = t, c.__b = t.__b + 1, l = null, (f = c.__i = yn(c, i, m, u)) != -1 && (u--, (l = i[f]) && (l.__u |= 2)), l == null || l.__v == null ? (f == -1 && (a > p ? y-- : a < p && y++), typeof c.type != "function" && (c.__u |= 4)) : f != m && (f == m - 1 ? y-- : f == m + 1 ? y++ : (f > m ? y-- : y++, c.__u |= 4))) : t.__k[s] = null;
55
+ if (u) for (s = 0; s < p; s++) (l = i[s]) != null && (2 & l.__u) == 0 && (l.__e == n && (n = Le(l)), Ui(l, l));
56
56
  return n;
57
57
  }
58
- function ki(t, e, i, n) {
58
+ function Li(t, e, i, n) {
59
59
  var a, s;
60
60
  if (typeof t.type == "function") {
61
- for (a = t.__k, s = 0; a && s < a.length; s++) a[s] && (a[s].__ = t, e = ki(a[s], e, i, n));
61
+ for (a = t.__k, s = 0; a && s < a.length; s++) a[s] && (a[s].__ = t, e = Li(a[s], e, i, n));
62
62
  return e;
63
63
  }
64
64
  t.__e != e && (n && (e && t.type && !e.parentNode && (e = Le(t)), i.insertBefore(t.__e, e || null)), e = t.__e);
@@ -67,7 +67,7 @@ function ki(t, e, i, n) {
67
67
  while (e != null && e.nodeType == 8);
68
68
  return e;
69
69
  }
70
- function Tn(t, e, i, n) {
70
+ function yn(t, e, i, n) {
71
71
  var a, s, c, l = t.key, m = t.type, f = e[i], p = f != null && (2 & f.__u) == 0;
72
72
  if (f === null && l == null || p && l == f.key && m == f.type) return i;
73
73
  if (n > (p ? 1 : 0)) {
@@ -76,7 +76,7 @@ function Tn(t, e, i, n) {
76
76
  return -1;
77
77
  }
78
78
  function Zt(t, e, i) {
79
- e[0] == "-" ? t.setProperty(e, i ?? "") : t[e] = i == null ? "" : typeof i != "number" || Cn.test(e) ? i : i + "px";
79
+ e[0] == "-" ? t.setProperty(e, i ?? "") : t[e] = i == null ? "" : typeof i != "number" || Sn.test(e) ? i : i + "px";
80
80
  }
81
81
  function Qe(t, e, i, n, a) {
82
82
  var s, c;
@@ -85,7 +85,7 @@ function Qe(t, e, i, n, a) {
85
85
  if (typeof n == "string" && (t.style.cssText = n = ""), n) for (e in n) i && e in i || Zt(t.style, e, "");
86
86
  if (i) for (e in i) n && i[e] == n[e] || Zt(t.style, e, i[e]);
87
87
  }
88
- else if (e[0] == "o" && e[1] == "n") s = e != (e = e.replace(Ai, "$1")), c = e.toLowerCase(), e = c in t || e == "onFocusOut" || e == "onFocusIn" ? c.slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + s] = i, i ? n ? i.u = n.u : (i.u = Mt, t.addEventListener(e, s ? bt : It, s)) : t.removeEventListener(e, s ? bt : It, s);
88
+ else if (e[0] == "o" && e[1] == "n") s = e != (e = e.replace(Oi, "$1")), c = e.toLowerCase(), e = c in t || e == "onFocusOut" || e == "onFocusIn" ? c.slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + s] = i, i ? n ? i.u = n.u : (i.u = Mt, t.addEventListener(e, s ? bt : It, s)) : t.removeEventListener(e, s ? bt : It, s);
89
89
  else {
90
90
  if (a == "http://www.w3.org/2000/svg") e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
91
91
  else if (e != "width" && e != "height" && e != "href" && e != "list" && e != "form" && e != "tabIndex" && e != "download" && e != "rowSpan" && e != "colSpan" && e != "role" && e != "popover" && e in t) try {
@@ -107,11 +107,11 @@ function Qt(t) {
107
107
  };
108
108
  }
109
109
  function Ut(t, e, i, n, a, s, c, l, m, f) {
110
- var p, u, y, E, T, I, w, A, R, b, N, S, k, U, z, Y, oe, K = e.type;
110
+ var p, u, y, E, T, I, w, A, R, b, N, S, k, U, q, Y, oe, K = e.type;
111
111
  if (e.constructor !== void 0) return null;
112
112
  128 & i.__u && (m = !!(32 & i.__u), s = [l = e.__e = i.__e]), (p = M.__b) && p(e);
113
113
  e: if (typeof K == "function") try {
114
- if (A = e.props, R = "prototype" in K && K.prototype.render, b = (p = K.contextType) && n[p.__c], N = p ? b ? b.props.value : p.__ : n, i.__c ? w = (u = e.__c = i.__c).__ = u.__E : (R ? e.__c = u = new K(A, N) : (e.__c = u = new Ne(A, N), u.constructor = K, u.render = In), b && b.sub(u), u.state || (u.state = {}), u.__n = n, y = u.__d = !0, u.__h = [], u._sb = []), R && u.__s == null && (u.__s = u.state), R && K.getDerivedStateFromProps != null && (u.__s == u.state && (u.__s = le({}, u.__s)), le(u.__s, K.getDerivedStateFromProps(A, u.__s))), E = u.props, T = u.state, u.__v = e, y) R && K.getDerivedStateFromProps == null && u.componentWillMount != null && u.componentWillMount(), R && u.componentDidMount != null && u.__h.push(u.componentDidMount);
114
+ if (A = e.props, R = "prototype" in K && K.prototype.render, b = (p = K.contextType) && n[p.__c], N = p ? b ? b.props.value : p.__ : n, i.__c ? w = (u = e.__c = i.__c).__ = u.__E : (R ? e.__c = u = new K(A, N) : (e.__c = u = new Ne(A, N), u.constructor = K, u.render = bn), b && b.sub(u), u.state || (u.state = {}), u.__n = n, y = u.__d = !0, u.__h = [], u._sb = []), R && u.__s == null && (u.__s = u.state), R && K.getDerivedStateFromProps != null && (u.__s == u.state && (u.__s = le({}, u.__s)), le(u.__s, K.getDerivedStateFromProps(A, u.__s))), E = u.props, T = u.state, u.__v = e, y) R && K.getDerivedStateFromProps == null && u.componentWillMount != null && u.componentWillMount(), R && u.componentDidMount != null && u.__h.push(u.componentDidMount);
115
115
  else {
116
116
  if (R && K.getDerivedStateFromProps == null && A !== E && u.componentWillReceiveProps != null && u.componentWillReceiveProps(A, N), e.__v == i.__v || !u.__e && u.shouldComponentUpdate != null && u.shouldComponentUpdate(A, u.__s, N) === !1) {
117
117
  for (e.__v != i.__v && (u.props = A, u.state = u.__s, u.__d = !1), e.__e = i.__e, e.__k = i.__k, e.__k.some(function(te) {
@@ -125,12 +125,12 @@ function Ut(t, e, i, n, a, s, c, l, m, f) {
125
125
  });
126
126
  }
127
127
  if (u.context = N, u.props = A, u.__P = t, u.__e = !1, k = M.__r, U = 0, R) {
128
- for (u.state = u.__s, u.__d = !1, k && k(e), p = u.render(u.props, u.state, u.context), z = 0; z < u._sb.length; z++) u.__h.push(u._sb[z]);
128
+ for (u.state = u.__s, u.__d = !1, k && k(e), p = u.render(u.props, u.state, u.context), q = 0; q < u._sb.length; q++) u.__h.push(u._sb[q]);
129
129
  u._sb = [];
130
130
  } else do
131
131
  u.__d = !1, k && k(e), p = u.render(u.props, u.state, u.context), u.state = u.__s;
132
132
  while (u.__d && ++U < 25);
133
- u.state = u.__s, u.getChildContext != null && (n = le(le({}, n), u.getChildContext())), R && !y && u.getSnapshotBeforeUpdate != null && (I = u.getSnapshotBeforeUpdate(E, T)), Y = p, p != null && p.type === Ce && p.key == null && (Y = Mi(p.props.children)), l = Ni(t, lt(Y) ? Y : [Y], e, i, n, a, s, c, l, m, f), u.base = e.__e, e.__u &= -161, u.__h.length && c.push(u), w && (u.__E = u.__ = null);
133
+ u.state = u.__s, u.getChildContext != null && (n = le(le({}, n), u.getChildContext())), R && !y && u.getSnapshotBeforeUpdate != null && (I = u.getSnapshotBeforeUpdate(E, T)), Y = p, p != null && p.type === Ce && p.key == null && (Y = Di(p.props.children)), l = ki(t, lt(Y) ? Y : [Y], e, i, n, a, s, c, l, m, f), u.base = e.__e, e.__u &= -161, u.__h.length && c.push(u), w && (u.__E = u.__ = null);
134
134
  } catch (te) {
135
135
  if (e.__v = null, m || s != null) if (te.then) {
136
136
  for (e.__u |= m ? 160 : 128; l && l.nodeType == 8 && l.nextSibling; ) l = l.nextSibling;
@@ -142,13 +142,13 @@ function Ut(t, e, i, n, a, s, c, l, m, f) {
142
142
  else e.__e = i.__e, e.__k = i.__k, te.then || wt(e);
143
143
  M.__e(te, e, i);
144
144
  }
145
- else s == null && e.__v == i.__v ? (e.__k = i.__k, e.__e = i.__e) : l = e.__e = yn(i.__e, e, i, n, a, s, c, m, f);
145
+ else s == null && e.__v == i.__v ? (e.__k = i.__k, e.__e = i.__e) : l = e.__e = In(i.__e, e, i, n, a, s, c, m, f);
146
146
  return (p = M.diffed) && p(e), 128 & e.__u ? void 0 : l;
147
147
  }
148
148
  function wt(t) {
149
149
  t && t.__c && (t.__c.__e = !0), t && t.__k && t.__k.forEach(wt);
150
150
  }
151
- function Li(t, e, i) {
151
+ function Mi(t, e, i) {
152
152
  for (var n = 0; n < i.length; n++) Pt(i[n], i[++n], i[++n]);
153
153
  M.__c && M.__c(e, t), t.some(function(a) {
154
154
  try {
@@ -160,10 +160,10 @@ function Li(t, e, i) {
160
160
  }
161
161
  });
162
162
  }
163
- function Mi(t) {
164
- return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : lt(t) ? t.map(Mi) : le({}, t);
163
+ function Di(t) {
164
+ return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : lt(t) ? t.map(Di) : le({}, t);
165
165
  }
166
- function yn(t, e, i, n, a, s, c, l, m) {
166
+ function In(t, e, i, n, a, s, c, l, m) {
167
167
  var f, p, u, y, E, T, I, w = i.props || He, A = e.props, R = e.type;
168
168
  if (R == "svg" ? a = "http://www.w3.org/2000/svg" : R == "math" ? a = "http://www.w3.org/1998/Math/MathML" : a || (a = "http://www.w3.org/1999/xhtml"), s != null) {
169
169
  for (f = 0; f < s.length; f++) if ((E = s[f]) && "setAttribute" in E == !!R && (R ? E.localName == R : E.nodeType == 3)) {
@@ -187,7 +187,7 @@ function yn(t, e, i, n, a, s, c, l, m) {
187
187
  }
188
188
  for (f in A) E = A[f], f == "children" ? y = E : f == "dangerouslySetInnerHTML" ? p = E : f == "value" ? T = E : f == "checked" ? I = E : l && typeof E != "function" || w[f] === E || Qe(t, f, E, w[f], a);
189
189
  if (p) l || u && (p.__html == u.__html || p.__html == t.innerHTML) || (t.innerHTML = p.__html), e.__k = [];
190
- else if (u && (t.innerHTML = ""), Ni(e.type == "template" ? t.content : t, lt(y) ? y : [y], e, i, n, R == "foreignObject" ? "http://www.w3.org/1999/xhtml" : a, s, c, s ? s[0] : i.__k && Le(i, 0), l, m), s != null) for (f = s.length; f--; ) Dt(s[f]);
190
+ else if (u && (t.innerHTML = ""), ki(e.type == "template" ? t.content : t, lt(y) ? y : [y], e, i, n, R == "foreignObject" ? "http://www.w3.org/1999/xhtml" : a, s, c, s ? s[0] : i.__k && Le(i, 0), l, m), s != null) for (f = s.length; f--; ) Dt(s[f]);
191
191
  l || (f = "value", R == "progress" && T == null ? t.removeAttribute("value") : T != null && (T !== t[f] || R == "progress" && !T || R == "option" && T != w[f]) && Qe(t, f, T, w[f], a), f = "checked", I != null && I != t[f] && Qe(t, f, I, w[f], a));
192
192
  }
193
193
  return t;
@@ -202,7 +202,7 @@ function Pt(t, e, i) {
202
202
  M.__e(a, i);
203
203
  }
204
204
  }
205
- function Di(t, e, i) {
205
+ function Ui(t, e, i) {
206
206
  var n, a;
207
207
  if (M.unmount && M.unmount(t), (n = t.ref) && (n.current && n.current != t.__e || Pt(n, null, e)), (n = t.__c) != null) {
208
208
  if (n.componentWillUnmount) try {
@@ -212,41 +212,41 @@ function Di(t, e, i) {
212
212
  }
213
213
  n.base = n.__P = null;
214
214
  }
215
- if (n = t.__k) for (a = 0; a < n.length; a++) n[a] && Di(n[a], e, i || typeof t.type != "function");
215
+ if (n = t.__k) for (a = 0; a < n.length; a++) n[a] && Ui(n[a], e, i || typeof t.type != "function");
216
216
  i || Dt(t.__e), t.__c = t.__ = t.__e = void 0;
217
217
  }
218
- function In(t, e, i) {
218
+ function bn(t, e, i) {
219
219
  return this.constructor(t, i);
220
220
  }
221
221
  function ct(t, e, i) {
222
222
  var n, a, s, c;
223
- e == document && (e = document.documentElement), M.__ && M.__(t, e), a = (n = typeof i == "function") ? null : i && i.__k || e.__k, s = [], c = [], Ut(e, t = (!n && i || e).__k = xe(Ce, null, [t]), a || He, He, e.namespaceURI, !n && i ? [i] : a ? null : e.firstChild ? Ke.call(e.childNodes) : null, s, !n && i ? i : a ? a.__e : e.firstChild, n, c), Li(s, t, c);
223
+ e == document && (e = document.documentElement), M.__ && M.__(t, e), a = (n = typeof i == "function") ? null : i && i.__k || e.__k, s = [], c = [], Ut(e, t = (!n && i || e).__k = xe(Ce, null, [t]), a || He, He, e.namespaceURI, !n && i ? [i] : a ? null : e.firstChild ? Ke.call(e.childNodes) : null, s, !n && i ? i : a ? a.__e : e.firstChild, n, c), Mi(s, t, c);
224
224
  }
225
- function Ui(t, e) {
226
- ct(t, e, Ui);
225
+ function Pi(t, e) {
226
+ ct(t, e, Pi);
227
227
  }
228
- function Pi(t, e, i) {
228
+ function Bi(t, e, i) {
229
229
  var n, a, s, c, l = le({}, t.props);
230
230
  for (s in t.type && t.type.defaultProps && (c = t.type.defaultProps), e) s == "key" ? n = e[s] : s == "ref" ? a = e[s] : l[s] = e[s] === void 0 && c != null ? c[s] : e[s];
231
231
  return arguments.length > 2 && (l.children = arguments.length > 3 ? Ke.call(arguments, 2) : i), je(t.type, l, n || t.key, a || t.ref, null);
232
232
  }
233
- Ke = Oi.slice, M = { __e: function(t, e, i, n) {
233
+ Ke = xi.slice, M = { __e: function(t, e, i, n) {
234
234
  for (var a, s, c; e = e.__; ) if ((a = e.__c) && !a.__) try {
235
235
  if ((s = a.constructor) && s.getDerivedStateFromError != null && (a.setState(s.getDerivedStateFromError(t)), c = a.__d), a.componentDidCatch != null && (a.componentDidCatch(t, n || {}), c = a.__d), c) return a.__E = a;
236
236
  } catch (l) {
237
237
  t = l;
238
238
  }
239
239
  throw t;
240
- } }, Ii = 0, bi = function(t) {
240
+ } }, bi = 0, wi = function(t) {
241
241
  return t != null && t.constructor === void 0;
242
242
  }, Ne.prototype.setState = function(t, e) {
243
243
  var i;
244
244
  i = this.__s != null && this.__s != this.state ? this.__s : this.__s = le({}, this.state), typeof t == "function" && (t = t(le({}, i), this.props)), t && le(i, t), t != null && this.__v && (e && this._sb.push(e), Xt(this));
245
245
  }, Ne.prototype.forceUpdate = function(t) {
246
246
  this.__v && (this.__e = !0, t && this.__h.push(t), Xt(this));
247
- }, Ne.prototype.render = Ce, ye = [], wi = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Ri = function(t, e) {
247
+ }, Ne.prototype.render = Ce, ye = [], Ri = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Ai = function(t, e) {
248
248
  return t.__v.__b - e.__v.__b;
249
- }, rt.__r = 0, Ai = /(PointerCapture)$|Capture$/i, Mt = 0, It = Qt(!1), bt = Qt(!0);
249
+ }, rt.__r = 0, Oi = /(PointerCapture)$|Capture$/i, Mt = 0, It = Qt(!1), bt = Qt(!0);
250
250
  function ot() {
251
251
  return ot = Object.assign ? Object.assign.bind() : function(t) {
252
252
  for (var e = 1; e < arguments.length; e++) {
@@ -256,21 +256,21 @@ function ot() {
256
256
  return t;
257
257
  }, ot.apply(this, arguments);
258
258
  }
259
- function Bi(t, e) {
259
+ function Fi(t, e) {
260
260
  if (t == null) return {};
261
261
  var i, n, a = {}, s = Object.keys(t);
262
262
  for (n = 0; n < s.length; n++) e.indexOf(i = s[n]) >= 0 || (a[i] = t[i]);
263
263
  return a;
264
264
  }
265
- var bn = ["context", "children"], wn = ["useFragment"];
266
- function Rn(t, e, i, n) {
265
+ var wn = ["context", "children"], Rn = ["useFragment"];
266
+ function An(t, e, i, n) {
267
267
  function a() {
268
268
  var s, c = Reflect.construct(HTMLElement, [], a);
269
269
  return c._vdomComponent = t, n && n.shadow ? (c._root = c.attachShadow({ mode: n.mode || "open", serializable: (s = n.serializable) != null && s }), n.adoptedStyleSheets && (c._root.adoptedStyleSheets = n.adoptedStyleSheets)) : c._root = c, c;
270
270
  }
271
271
  return (a.prototype = Object.create(HTMLElement.prototype)).constructor = a, a.prototype.connectedCallback = function() {
272
- On.call(this, n);
273
- }, a.prototype.attributeChangedCallback = xn, a.prototype.disconnectedCallback = Nn, i = i || t.observedAttributes || Object.keys(t.propTypes || {}), a.observedAttributes = i, t.formAssociated && (a.formAssociated = !0), i.forEach(function(s) {
272
+ xn.call(this, n);
273
+ }, a.prototype.attributeChangedCallback = Nn, a.prototype.disconnectedCallback = kn, i = i || t.observedAttributes || Object.keys(t.propTypes || {}), a.observedAttributes = i, t.formAssociated && (a.formAssociated = !0), i.forEach(function(s) {
274
274
  Object.defineProperty(a.prototype, s, { get: function() {
275
275
  return this._vdom ? this._vdom.props[s] : this._props[s];
276
276
  }, set: function(c) {
@@ -280,72 +280,72 @@ function Rn(t, e, i, n) {
280
280
  } });
281
281
  }), customElements.define(e || t.tagName || t.displayName || t.name, a), a;
282
282
  }
283
- function An(t) {
283
+ function On(t) {
284
284
  this.getChildContext = function() {
285
285
  return t.context;
286
286
  };
287
- var e = t.children, i = Bi(t, bn);
288
- return Pi(e, i);
287
+ var e = t.children, i = Fi(t, wn);
288
+ return Bi(e, i);
289
289
  }
290
- function On(t) {
290
+ function xn(t) {
291
291
  var e = new CustomEvent("_preact", { detail: {}, bubbles: !0, cancelable: !0 });
292
- this.dispatchEvent(e), this._vdom = xe(An, ot({}, this._props, { context: e.detail.context }), $i(this, this._vdomComponent, t)), (this.hasAttribute("hydrate") ? Ui : ct)(this._vdom, this._root);
292
+ this.dispatchEvent(e), this._vdom = xe(On, ot({}, this._props, { context: e.detail.context }), Vi(this, this._vdomComponent, t)), (this.hasAttribute("hydrate") ? Pi : ct)(this._vdom, this._root);
293
293
  }
294
- function Fi(t) {
294
+ function $i(t) {
295
295
  return t.replace(/-(\w)/g, function(e, i) {
296
296
  return i ? i.toUpperCase() : "";
297
297
  });
298
298
  }
299
- function xn(t, e, i) {
299
+ function Nn(t, e, i) {
300
300
  if (this._vdom) {
301
301
  var n = {};
302
- n[t] = i = i ?? void 0, n[Fi(t)] = i, this._vdom = Pi(this._vdom, n), ct(this._vdom, this._root);
302
+ n[t] = i = i ?? void 0, n[$i(t)] = i, this._vdom = Bi(this._vdom, n), ct(this._vdom, this._root);
303
303
  }
304
304
  }
305
- function Nn() {
305
+ function kn() {
306
306
  ct(this._vdom = null, this._root);
307
307
  }
308
308
  function ei(t, e) {
309
- var i = this, n = t.useFragment, a = Bi(t, wn);
309
+ var i = this, n = t.useFragment, a = Fi(t, Rn);
310
310
  return xe(n ? Ce : "slot", ot({}, a, { ref: function(s) {
311
311
  s ? (i.ref = s, i._listener || (i._listener = function(c) {
312
312
  c.stopPropagation(), c.detail.context = e;
313
313
  }, s.addEventListener("_preact", i._listener))) : i.ref.removeEventListener("_preact", i._listener);
314
314
  } }));
315
315
  }
316
- function $i(t, e, i) {
316
+ function Vi(t, e, i) {
317
317
  if (t.nodeType === 3) return t.data;
318
318
  if (t.nodeType !== 1) return null;
319
319
  var n = [], a = {}, s = 0, c = t.attributes, l = t.childNodes;
320
- for (s = c.length; s--; ) c[s].name !== "slot" && (a[c[s].name] = c[s].value, a[Fi(c[s].name)] = c[s].value);
320
+ for (s = c.length; s--; ) c[s].name !== "slot" && (a[c[s].name] = c[s].value, a[$i(c[s].name)] = c[s].value);
321
321
  for (s = l.length; s--; ) {
322
- var m = $i(l[s], null, i), f = l[s].slot;
322
+ var m = Vi(l[s], null, i), f = l[s].slot;
323
323
  f ? a[f] = xe(ei, { name: f }, m) : n[s] = m;
324
324
  }
325
325
  var p = !(!i || !i.shadow), u = e ? xe(ei, { useFragment: !p }, n) : n;
326
326
  return !p && e && (t.innerHTML = ""), xe(e || t.nodeName.toLowerCase(), a, u);
327
327
  }
328
- var kn = 0;
328
+ var Ln = 0;
329
329
  function C(t, e, i, n, a, s) {
330
330
  e || (e = {});
331
331
  var c, l, m = e;
332
332
  if ("ref" in m) for (l in m = {}, e) l == "ref" ? c = e[l] : m[l] = e[l];
333
- var f = { type: t, props: m, key: i, ref: c, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --kn, __i: -1, __u: 0, __source: a, __self: s };
333
+ var f = { type: t, props: m, key: i, ref: c, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --Ln, __i: -1, __u: 0, __source: a, __self: s };
334
334
  if (typeof t == "function" && (c = t.defaultProps)) for (l in c) m[l] === void 0 && (m[l] = c[l]);
335
335
  return M.vnode && M.vnode(f), f;
336
336
  }
337
- var ze, W, _t, ti, qe = 0, Vi = [], j = M, ii = j.__b, ni = j.__r, ri = j.diffed, oi = j.__c, si = j.unmount, ai = j.__;
337
+ var ze, W, _t, ti, qe = 0, Wi = [], j = M, ii = j.__b, ni = j.__r, ri = j.diffed, oi = j.__c, si = j.unmount, ai = j.__;
338
338
  function Bt(t, e) {
339
339
  j.__h && j.__h(W, t, qe || e), qe = 0;
340
340
  var i = W.__H || (W.__H = { __: [], __h: [] });
341
341
  return t >= i.__.length && i.__.push({}), i.__[t];
342
342
  }
343
343
  function Rt(t) {
344
- return qe = 1, Ln(ji, t);
344
+ return qe = 1, Mn(Gi, t);
345
345
  }
346
- function Ln(t, e, i) {
346
+ function Mn(t, e, i) {
347
347
  var n = Bt(ze++, 2);
348
- if (n.t = t, !n.__c && (n.__ = [ji(void 0, e), function(l) {
348
+ if (n.t = t, !n.__c && (n.__ = [Gi(void 0, e), function(l) {
349
349
  var m = n.__N ? n.__N[0] : n.__[0], f = n.t(m, l);
350
350
  m !== f && (n.__N = [f, n.__[1]], n.__c.setState({}));
351
351
  }], n.__c = W, !W.__f)) {
@@ -379,7 +379,7 @@ function Ln(t, e, i) {
379
379
  }
380
380
  function Ie(t, e) {
381
381
  var i = Bt(ze++, 3);
382
- !j.__s && Wi(i.__H, e) && (i.__ = t, i.u = e, W.__H.__h.push(i));
382
+ !j.__s && ji(i.__H, e) && (i.__ = t, i.u = e, W.__H.__h.push(i));
383
383
  }
384
384
  function Ye(t) {
385
385
  return qe = 5, ke(function() {
@@ -388,15 +388,15 @@ function Ye(t) {
388
388
  }
389
389
  function ke(t, e) {
390
390
  var i = Bt(ze++, 7);
391
- return Wi(i.__H, e) && (i.__ = t(), i.__H = e, i.__h = t), i.__;
391
+ return ji(i.__H, e) && (i.__ = t(), i.__H = e, i.__h = t), i.__;
392
392
  }
393
393
  function We(t, e) {
394
394
  return qe = 8, ke(function() {
395
395
  return t;
396
396
  }, e);
397
397
  }
398
- function Mn() {
399
- for (var t; t = Vi.shift(); ) if (t.__P && t.__H) try {
398
+ function Dn() {
399
+ for (var t; t = Wi.shift(); ) if (t.__P && t.__H) try {
400
400
  t.__H.__h.forEach(it), t.__H.__h.forEach(At), t.__H.__h = [];
401
401
  } catch (e) {
402
402
  t.__H.__h = [], j.__e(e, t.__v);
@@ -415,7 +415,7 @@ j.__b = function(t) {
415
415
  }, j.diffed = function(t) {
416
416
  ri && ri(t);
417
417
  var e = t.__c;
418
- e && e.__H && (e.__H.__h.length && (Vi.push(e) !== 1 && ti === j.requestAnimationFrame || ((ti = j.requestAnimationFrame) || Dn)(Mn)), e.__H.__.forEach(function(i) {
418
+ e && e.__H && (e.__H.__h.length && (Wi.push(e) !== 1 && ti === j.requestAnimationFrame || ((ti = j.requestAnimationFrame) || Un)(Dn)), e.__H.__.forEach(function(i) {
419
419
  i.u && (i.__H = i.u), i.u = void 0;
420
420
  })), _t = W = null;
421
421
  }, j.__c = function(t, e) {
@@ -442,7 +442,7 @@ j.__b = function(t) {
442
442
  }), i.__H = void 0, e && j.__e(e, i.__v));
443
443
  };
444
444
  var li = typeof requestAnimationFrame == "function";
445
- function Dn(t) {
445
+ function Un(t) {
446
446
  var e, i = function() {
447
447
  clearTimeout(n), li && cancelAnimationFrame(e), setTimeout(t);
448
448
  }, n = setTimeout(i, 35);
@@ -456,24 +456,24 @@ function At(t) {
456
456
  var e = W;
457
457
  t.__c = t.__(), W = e;
458
458
  }
459
- function Wi(t, e) {
459
+ function ji(t, e) {
460
460
  return !t || t.length !== e.length || e.some(function(i, n) {
461
461
  return i !== t[n];
462
462
  });
463
463
  }
464
- function ji(t, e) {
464
+ function Gi(t, e) {
465
465
  return typeof e == "function" ? e(t) : e;
466
466
  }
467
- var Un = /* @__PURE__ */ Symbol.for("preact-signals");
467
+ var Pn = /* @__PURE__ */ Symbol.for("preact-signals");
468
468
  function dt() {
469
- if (ge > 1)
470
- ge--;
469
+ if (Ee > 1)
470
+ Ee--;
471
471
  else {
472
472
  for (var t, e = !1; Ge !== void 0; ) {
473
473
  var i = Ge;
474
474
  for (Ge = void 0, Ot++; i !== void 0; ) {
475
475
  var n = i.o;
476
- if (i.o = void 0, i.f &= -3, !(8 & i.f) && zi(i)) try {
476
+ if (i.o = void 0, i.f &= -3, !(8 & i.f) && qi(i)) try {
477
477
  i.c();
478
478
  } catch (a) {
479
479
  e || (t = a, e = !0);
@@ -481,12 +481,12 @@ function dt() {
481
481
  i = n;
482
482
  }
483
483
  }
484
- if (Ot = 0, ge--, e) throw t;
484
+ if (Ot = 0, Ee--, e) throw t;
485
485
  }
486
486
  }
487
- function Pn(t) {
488
- if (ge > 0) return t();
489
- ge++;
487
+ function Bn(t) {
488
+ if (Ee > 0) return t();
489
+ Ee++;
490
490
  try {
491
491
  return t();
492
492
  } finally {
@@ -494,7 +494,7 @@ function Pn(t) {
494
494
  }
495
495
  }
496
496
  var L = void 0;
497
- function Gi(t) {
497
+ function Hi(t) {
498
498
  var e = L;
499
499
  L = void 0;
500
500
  try {
@@ -503,8 +503,8 @@ function Gi(t) {
503
503
  L = e;
504
504
  }
505
505
  }
506
- var Ge = void 0, ge = 0, Ot = 0, st = 0;
507
- function Hi(t) {
506
+ var Ge = void 0, Ee = 0, Ot = 0, st = 0;
507
+ function zi(t) {
508
508
  if (L !== void 0) {
509
509
  var e = t.n;
510
510
  if (e === void 0 || e.t !== L)
@@ -516,13 +516,13 @@ function Hi(t) {
516
516
  function X(t, e) {
517
517
  this.v = t, this.i = 0, this.n = void 0, this.t = void 0, this.W = e?.watched, this.Z = e?.unwatched, this.name = e?.name;
518
518
  }
519
- X.prototype.brand = Un;
519
+ X.prototype.brand = Pn;
520
520
  X.prototype.h = function() {
521
521
  return !0;
522
522
  };
523
523
  X.prototype.S = function(t) {
524
524
  var e = this, i = this.t;
525
- i !== t && t.e === void 0 && (t.x = i, this.t = t, i !== void 0 ? i.e = t : Gi(function() {
525
+ i !== t && t.e === void 0 && (t.x = i, this.t = t, i !== void 0 ? i.e = t : Hi(function() {
526
526
  var n;
527
527
  (n = e.W) == null || n.call(e);
528
528
  }));
@@ -531,7 +531,7 @@ X.prototype.U = function(t) {
531
531
  var e = this;
532
532
  if (this.t !== void 0) {
533
533
  var i = t.e, n = t.x;
534
- i !== void 0 && (i.x = n, t.e = void 0), n !== void 0 && (n.e = i, t.x = void 0), t === this.t && (this.t = n, n === void 0 && Gi(function() {
534
+ i !== void 0 && (i.x = n, t.e = void 0), n !== void 0 && (n.e = i, t.x = void 0), t === this.t && (this.t = n, n === void 0 && Hi(function() {
535
535
  var a;
536
536
  (a = e.Z) == null || a.call(e);
537
537
  }));
@@ -568,12 +568,12 @@ X.prototype.peek = function() {
568
568
  }
569
569
  };
570
570
  Object.defineProperty(X.prototype, "value", { get: function() {
571
- var t = Hi(this);
571
+ var t = zi(this);
572
572
  return t !== void 0 && (t.i = this.i), this.v;
573
573
  }, set: function(t) {
574
574
  if (t !== this.v) {
575
575
  if (Ot > 100) throw new Error("Cycle detected");
576
- this.v = t, this.i++, st++, ge++;
576
+ this.v = t, this.i++, st++, Ee++;
577
577
  try {
578
578
  for (var e = this.t; e !== void 0; e = e.x) e.t.N();
579
579
  } finally {
@@ -581,14 +581,14 @@ Object.defineProperty(X.prototype, "value", { get: function() {
581
581
  }
582
582
  }
583
583
  } });
584
- function q(t, e) {
584
+ function z(t, e) {
585
585
  return new X(t, e);
586
586
  }
587
- function zi(t) {
587
+ function qi(t) {
588
588
  for (var e = t.s; e !== void 0; e = e.n) if (e.S.i !== e.i || !e.S.h() || e.S.i !== e.i) return !0;
589
589
  return !1;
590
590
  }
591
- function qi(t) {
591
+ function Yi(t) {
592
592
  for (var e = t.s; e !== void 0; e = e.n) {
593
593
  var i = e.S.n;
594
594
  if (i !== void 0 && (e.r = i), e.S.n = e, e.i = -1, e.n === void 0) {
@@ -597,7 +597,7 @@ function qi(t) {
597
597
  }
598
598
  }
599
599
  }
600
- function Yi(t) {
600
+ function Ki(t) {
601
601
  for (var e = t.s, i = void 0; e !== void 0; ) {
602
602
  var n = e.p;
603
603
  e.i === -1 ? (e.S.U(e), n !== void 0 && (n.n = e.n), e.n !== void 0 && (e.n.p = n)) : i = e, e.S.n = e.r, e.r !== void 0 && (e.r = void 0), e = n;
@@ -611,17 +611,17 @@ be.prototype = new X();
611
611
  be.prototype.h = function() {
612
612
  if (this.f &= -3, 1 & this.f) return !1;
613
613
  if ((36 & this.f) == 32 || (this.f &= -5, this.g === st)) return !0;
614
- if (this.g = st, this.f |= 1, this.i > 0 && !zi(this))
614
+ if (this.g = st, this.f |= 1, this.i > 0 && !qi(this))
615
615
  return this.f &= -2, !0;
616
616
  var t = L;
617
617
  try {
618
- qi(this), L = this;
618
+ Yi(this), L = this;
619
619
  var e = this.x();
620
620
  (16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
621
621
  } catch (i) {
622
622
  this.v = i, this.f |= 16, this.i++;
623
623
  }
624
- return L = t, Yi(this), this.f &= -2, !0;
624
+ return L = t, Ki(this), this.f &= -2, !0;
625
625
  };
626
626
  be.prototype.S = function(t) {
627
627
  if (this.t === void 0) {
@@ -644,17 +644,17 @@ be.prototype.N = function() {
644
644
  };
645
645
  Object.defineProperty(be.prototype, "value", { get: function() {
646
646
  if (1 & this.f) throw new Error("Cycle detected");
647
- var t = Hi(this);
647
+ var t = zi(this);
648
648
  if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f) throw this.v;
649
649
  return this.v;
650
650
  } });
651
651
  function ci(t, e) {
652
652
  return new be(t, e);
653
653
  }
654
- function Ki(t) {
654
+ function Ji(t) {
655
655
  var e = t.u;
656
656
  if (t.u = void 0, typeof e == "function") {
657
- ge++;
657
+ Ee++;
658
658
  var i = L;
659
659
  L = void 0;
660
660
  try {
@@ -668,11 +668,11 @@ function Ki(t) {
668
668
  }
669
669
  function Ft(t) {
670
670
  for (var e = t.s; e !== void 0; e = e.n) e.S.U(e);
671
- t.x = void 0, t.s = void 0, Ki(t);
671
+ t.x = void 0, t.s = void 0, Ji(t);
672
672
  }
673
- function Bn(t) {
673
+ function Fn(t) {
674
674
  if (L !== this) throw new Error("Out-of-order effect");
675
- Yi(this), L = t, this.f &= -2, 8 & this.f && Ft(this), dt();
675
+ Ki(this), L = t, this.f &= -2, 8 & this.f && Ft(this), dt();
676
676
  }
677
677
  function De(t, e) {
678
678
  this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32, this.name = e?.name;
@@ -689,9 +689,9 @@ De.prototype.c = function() {
689
689
  };
690
690
  De.prototype.S = function() {
691
691
  if (1 & this.f) throw new Error("Cycle detected");
692
- this.f |= 1, this.f &= -9, Ki(this), qi(this), ge++;
692
+ this.f |= 1, this.f &= -9, Ji(this), Yi(this), Ee++;
693
693
  var t = L;
694
- return L = this, Bn.bind(this, t);
694
+ return L = this, Fn.bind(this, t);
695
695
  };
696
696
  De.prototype.N = function() {
697
697
  2 & this.f || (this.f |= 2, this.o = Ge, Ge = this);
@@ -712,9 +712,9 @@ function Je(t, e) {
712
712
  var n = i.d.bind(i);
713
713
  return n[Symbol.dispose] = n, n;
714
714
  }
715
- var Ji, mt, Fn = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, Xi = [];
715
+ var Xi, mt, $n = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, Zi = [];
716
716
  Je(function() {
717
- Ji = this.N;
717
+ Xi = this.N;
718
718
  })();
719
719
  function Ue(t, e) {
720
720
  M[t] = e.bind(null, M[t] || function() {
@@ -723,8 +723,8 @@ function Ue(t, e) {
723
723
  function at(t) {
724
724
  mt && mt(), mt = t && t.S();
725
725
  }
726
- function Zi(t) {
727
- var e = this, i = t.data, n = Qi(i);
726
+ function Qi(t) {
727
+ var e = this, i = t.data, n = en(i);
728
728
  n.value = i;
729
729
  var a = ke(function() {
730
730
  for (var l = e, m = e.__v; m = m.__; ) if (m.__c) {
@@ -735,9 +735,9 @@ function Zi(t) {
735
735
  var E = n.value.value;
736
736
  return E === 0 ? 0 : E === !0 ? "" : E || "";
737
737
  }), p = ci(function() {
738
- return !Array.isArray(f.value) && !bi(f.value);
738
+ return !Array.isArray(f.value) && !wi(f.value);
739
739
  }), u = Je(function() {
740
- if (this.N = en, p.value) {
740
+ if (this.N = tn, p.value) {
741
741
  var E = f.value;
742
742
  l.__v && l.__v.__e && l.__v.__e.nodeType === 3 && (l.__v.__e.data = E);
743
743
  }
@@ -748,8 +748,8 @@ function Zi(t) {
748
748
  }, []), s = a[0], c = a[1];
749
749
  return s.value ? c.peek() : c.value;
750
750
  }
751
- Zi.displayName = "ReactiveTextNode";
752
- Object.defineProperties(X.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: Zi }, props: { configurable: !0, get: function() {
751
+ Qi.displayName = "ReactiveTextNode";
752
+ Object.defineProperties(X.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: Qi }, props: { configurable: !0, get: function() {
753
753
  return { data: this };
754
754
  } }, __b: { configurable: !0, value: 1 } });
755
755
  Ue("__b", function(t, e) {
@@ -773,7 +773,7 @@ Ue("__r", function(t, e) {
773
773
  }, { name: s }), c.c = a, c;
774
774
  })(function() {
775
775
  var a;
776
- Fn && ((a = i.y) == null || a.call(i)), n.__$f |= 1, n.setState({});
776
+ $n && ((a = i.y) == null || a.call(i)), n.__$f |= 1, n.setState({});
777
777
  }, typeof e.type == "function" ? e.type.displayName || e.type.name : ""))), at(i);
778
778
  }
779
779
  t(e);
@@ -796,18 +796,18 @@ Ue("diffed", function(t, e) {
796
796
  s = {}, i.U = s;
797
797
  for (var m in n) {
798
798
  var f = s[m], p = n[m];
799
- f === void 0 ? (f = $n(i, m, p, a), s[m] = f) : f.o(p, a);
799
+ f === void 0 ? (f = Vn(i, m, p, a), s[m] = f) : f.o(p, a);
800
800
  }
801
801
  }
802
802
  }
803
803
  t(e);
804
804
  });
805
- function $n(t, e, i, n) {
806
- var a = e in t && t.ownerSVGElement === void 0, s = q(i);
805
+ function Vn(t, e, i, n) {
806
+ var a = e in t && t.ownerSVGElement === void 0, s = z(i);
807
807
  return { o: function(c, l) {
808
808
  s.value = c, n = l;
809
809
  }, d: Je(function() {
810
- this.N = en;
810
+ this.N = tn;
811
811
  var c = s.value.value;
812
812
  n[e] !== c && (n[e] = c, a ? t[e] = c : c != null && (c !== !1 || e[4] === "-") ? t.setAttribute(e, c) : t.removeAttribute(e));
813
813
  }) };
@@ -849,23 +849,23 @@ Ne.prototype.shouldComponentUpdate = function(t, e) {
849
849
  for (var l in this.props) if (!(l in t)) return !0;
850
850
  return !1;
851
851
  };
852
- function Qi(t, e) {
852
+ function en(t, e) {
853
853
  return Rt(function() {
854
- return q(t, e);
854
+ return z(t, e);
855
855
  })[0];
856
856
  }
857
- var Vn = function(t) {
857
+ var Wn = function(t) {
858
858
  queueMicrotask(function() {
859
859
  queueMicrotask(t);
860
860
  });
861
861
  };
862
- function Wn() {
863
- Pn(function() {
864
- for (var t; t = Xi.shift(); ) Ji.call(t);
862
+ function jn() {
863
+ Bn(function() {
864
+ for (var t; t = Zi.shift(); ) Xi.call(t);
865
865
  });
866
866
  }
867
- function en() {
868
- Xi.push(this) === 1 && (M.requestAnimationFrame || Vn)(Wn);
867
+ function tn() {
868
+ Zi.push(this) === 1 && (M.requestAnimationFrame || Wn)(jn);
869
869
  }
870
870
  const di = {
871
871
  layout: "floating",
@@ -883,7 +883,7 @@ const di = {
883
883
  "bottom-left": { bottom: "24px", left: "24px" },
884
884
  "top-right": { top: "24px", right: "24px" },
885
885
  "top-left": { top: "24px", left: "24px" }
886
- }, jn = /* @__PURE__ */ new Set([
886
+ }, Gn = /* @__PURE__ */ new Set([
887
887
  "top",
888
888
  "right",
889
889
  "bottom",
@@ -894,7 +894,7 @@ const di = {
894
894
  "margin-bottom",
895
895
  "margin-left"
896
896
  ]);
897
- function Gn(t) {
897
+ function Hn(t) {
898
898
  if (et[t])
899
899
  return et[t];
900
900
  const e = t.match(/^\[(.+)\]$/);
@@ -904,14 +904,14 @@ function Gn(t) {
904
904
  const a = n.trim(), s = a.lastIndexOf("-");
905
905
  if (s <= 0) continue;
906
906
  const c = a.slice(0, s);
907
- if (!jn.has(c)) continue;
907
+ if (!Gn.has(c)) continue;
908
908
  const l = a.slice(s + 1);
909
909
  /^[\w.%-]+$/.test(l) && (i[c] = /^\d+$/.test(l) ? `${l}px` : l);
910
910
  }
911
911
  return Object.keys(i).length > 0 ? i : et["bottom-right"];
912
912
  }
913
913
  var gt = {}, Be = {}, ui;
914
- function Hn() {
914
+ function zn() {
915
915
  if (ui) return Be;
916
916
  ui = 1, Be.byteLength = l, Be.toByteArray = f, Be.fromByteArray = y;
917
917
  for (var t = [], e = [], i = typeof Uint8Array < "u" ? Uint8Array : Array, n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", a = 0, s = n.length; a < s; ++a)
@@ -960,7 +960,7 @@ function Hn() {
960
960
  }
961
961
  var tt = {};
962
962
  var hi;
963
- function zn() {
963
+ function qn() {
964
964
  return hi || (hi = 1, tt.read = function(t, e, i, n, a) {
965
965
  var s, c, l = a * 8 - n - 1, m = (1 << l) - 1, f = m >> 1, p = -7, u = i ? a - 1 : 0, y = i ? -1 : 1, E = t[e + u];
966
966
  for (u += y, s = E & (1 << -p) - 1, E >>= -p, p += l; p > 0; s = s * 256 + t[e + u], u += y, p -= 8)
@@ -985,9 +985,9 @@ function zn() {
985
985
  }), tt;
986
986
  }
987
987
  var fi;
988
- function qn() {
988
+ function Yn() {
989
989
  return fi || (fi = 1, (function(t) {
990
- const e = Hn(), i = zn(), n = typeof Symbol == "function" && typeof Symbol.for == "function" ? /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom") : null;
990
+ const e = zn(), i = qn(), n = typeof Symbol == "function" && typeof Symbol.for == "function" ? /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom") : null;
991
991
  t.Buffer = l, t.SlowBuffer = R, t.INSPECT_MAX_BYTES = 50;
992
992
  const a = 2147483647;
993
993
  t.kMaxLength = a, l.TYPED_ARRAY_SUPPORT = s(), !l.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
@@ -1235,14 +1235,14 @@ function qn() {
1235
1235
  return Xe(this, r, o);
1236
1236
  case "utf8":
1237
1237
  case "utf-8":
1238
- return ue(this, r, o);
1238
+ return he(this, r, o);
1239
1239
  case "ascii":
1240
1240
  return re(this, r, o);
1241
1241
  case "latin1":
1242
1242
  case "binary":
1243
1243
  return ut(this, r, o);
1244
1244
  case "base64":
1245
- return de(this, r, o);
1245
+ return ue(this, r, o);
1246
1246
  case "ucs2":
1247
1247
  case "ucs-2":
1248
1248
  case "utf16le":
@@ -1281,7 +1281,7 @@ function qn() {
1281
1281
  return this;
1282
1282
  }, l.prototype.toString = function() {
1283
1283
  const r = this.length;
1284
- return r === 0 ? "" : arguments.length === 0 ? ue(this, 0, r) : N.apply(this, arguments);
1284
+ return r === 0 ? "" : arguments.length === 0 ? he(this, 0, r) : N.apply(this, arguments);
1285
1285
  }, l.prototype.toLocaleString = l.prototype.toString, l.prototype.equals = function(r) {
1286
1286
  if (!l.isBuffer(r)) throw new TypeError("Argument must be a Buffer");
1287
1287
  return this === r ? !0 : l.compare(this, r) === 0;
@@ -1363,7 +1363,7 @@ function qn() {
1363
1363
  }, l.prototype.lastIndexOf = function(r, o, h) {
1364
1364
  return k(this, r, o, h, !1);
1365
1365
  };
1366
- function z(d, r, o, h) {
1366
+ function q(d, r, o, h) {
1367
1367
  o = Number(o) || 0;
1368
1368
  const _ = d.length - o;
1369
1369
  h ? (h = Number(h), h > _ && (h = _)) : h = _;
@@ -1381,13 +1381,13 @@ function qn() {
1381
1381
  return Ze(ft(r, d.length - o), d, o, h);
1382
1382
  }
1383
1383
  function oe(d, r, o, h) {
1384
- return Ze(mn(r), d, o, h);
1384
+ return Ze(gn(r), d, o, h);
1385
1385
  }
1386
1386
  function K(d, r, o, h) {
1387
1387
  return Ze(Kt(r), d, o, h);
1388
1388
  }
1389
1389
  function te(d, r, o, h) {
1390
- return Ze(gn(r, d.length - o), d, o, h);
1390
+ return Ze(En(r, d.length - o), d, o, h);
1391
1391
  }
1392
1392
  l.prototype.write = function(r, o, h, _) {
1393
1393
  if (o === void 0)
@@ -1408,7 +1408,7 @@ function qn() {
1408
1408
  for (; ; )
1409
1409
  switch (_) {
1410
1410
  case "hex":
1411
- return z(this, r, o, h);
1411
+ return q(this, r, o, h);
1412
1412
  case "utf8":
1413
1413
  case "utf-8":
1414
1414
  return Y(this, r, o, h);
@@ -1433,10 +1433,10 @@ function qn() {
1433
1433
  data: Array.prototype.slice.call(this._arr || this, 0)
1434
1434
  };
1435
1435
  };
1436
- function de(d, r, o) {
1436
+ function ue(d, r, o) {
1437
1437
  return r === 0 && o === d.length ? e.fromByteArray(d) : e.fromByteArray(d.slice(r, o));
1438
1438
  }
1439
- function ue(d, r, o) {
1439
+ function he(d, r, o) {
1440
1440
  o = Math.min(d.length, o);
1441
1441
  const h = [];
1442
1442
  let _ = r;
@@ -1495,7 +1495,7 @@ function qn() {
1495
1495
  (!r || r < 0) && (r = 0), (!o || o < 0 || o > h) && (o = h);
1496
1496
  let _ = "";
1497
1497
  for (let g = r; g < o; ++g)
1498
- _ += En[d[g]];
1498
+ _ += vn[d[g]];
1499
1499
  return _;
1500
1500
  }
1501
1501
  function G(d, r, o) {
@@ -1537,13 +1537,13 @@ function qn() {
1537
1537
  return r = r >>> 0, o || H(r, 4, this.length), (this[r] | this[r + 1] << 8 | this[r + 2] << 16) + this[r + 3] * 16777216;
1538
1538
  }, l.prototype.readUint32BE = l.prototype.readUInt32BE = function(r, o) {
1539
1539
  return r = r >>> 0, o || H(r, 4, this.length), this[r] * 16777216 + (this[r + 1] << 16 | this[r + 2] << 8 | this[r + 3]);
1540
- }, l.prototype.readBigUInt64LE = he(function(r) {
1540
+ }, l.prototype.readBigUInt64LE = fe(function(r) {
1541
1541
  r = r >>> 0, Re(r, "offset");
1542
1542
  const o = this[r], h = this[r + 7];
1543
1543
  (o === void 0 || h === void 0) && Pe(r, this.length - 8);
1544
1544
  const _ = o + this[++r] * 2 ** 8 + this[++r] * 2 ** 16 + this[++r] * 2 ** 24, g = this[++r] + this[++r] * 2 ** 8 + this[++r] * 2 ** 16 + h * 2 ** 24;
1545
1545
  return BigInt(_) + (BigInt(g) << BigInt(32));
1546
- }), l.prototype.readBigUInt64BE = he(function(r) {
1546
+ }), l.prototype.readBigUInt64BE = fe(function(r) {
1547
1547
  r = r >>> 0, Re(r, "offset");
1548
1548
  const o = this[r], h = this[r + 7];
1549
1549
  (o === void 0 || h === void 0) && Pe(r, this.length - 8);
@@ -1575,13 +1575,13 @@ function qn() {
1575
1575
  return r = r >>> 0, o || H(r, 4, this.length), this[r] | this[r + 1] << 8 | this[r + 2] << 16 | this[r + 3] << 24;
1576
1576
  }, l.prototype.readInt32BE = function(r, o) {
1577
1577
  return r = r >>> 0, o || H(r, 4, this.length), this[r] << 24 | this[r + 1] << 16 | this[r + 2] << 8 | this[r + 3];
1578
- }, l.prototype.readBigInt64LE = he(function(r) {
1578
+ }, l.prototype.readBigInt64LE = fe(function(r) {
1579
1579
  r = r >>> 0, Re(r, "offset");
1580
1580
  const o = this[r], h = this[r + 7];
1581
1581
  (o === void 0 || h === void 0) && Pe(r, this.length - 8);
1582
1582
  const _ = this[r + 4] + this[r + 5] * 2 ** 8 + this[r + 6] * 2 ** 16 + (h << 24);
1583
1583
  return (BigInt(_) << BigInt(32)) + BigInt(o + this[++r] * 2 ** 8 + this[++r] * 2 ** 16 + this[++r] * 2 ** 24);
1584
- }), l.prototype.readBigInt64BE = he(function(r) {
1584
+ }), l.prototype.readBigInt64BE = fe(function(r) {
1585
1585
  r = r >>> 0, Re(r, "offset");
1586
1586
  const o = this[r], h = this[r + 7];
1587
1587
  (o === void 0 || h === void 0) && Pe(r, this.length - 8);
@@ -1645,9 +1645,9 @@ function qn() {
1645
1645
  let v = Number(r >> BigInt(32) & BigInt(4294967295));
1646
1646
  return d[o + 3] = v, v = v >> 8, d[o + 2] = v, v = v >> 8, d[o + 1] = v, v = v >> 8, d[o] = v, o + 8;
1647
1647
  }
1648
- l.prototype.writeBigUInt64LE = he(function(r, o = 0) {
1648
+ l.prototype.writeBigUInt64LE = fe(function(r, o = 0) {
1649
1649
  return Wt(this, r, o, BigInt(0), BigInt("0xffffffffffffffff"));
1650
- }), l.prototype.writeBigUInt64BE = he(function(r, o = 0) {
1650
+ }), l.prototype.writeBigUInt64BE = fe(function(r, o = 0) {
1651
1651
  return jt(this, r, o, BigInt(0), BigInt("0xffffffffffffffff"));
1652
1652
  }), l.prototype.writeIntLE = function(r, o, h, _) {
1653
1653
  if (r = +r, o = o >>> 0, !_) {
@@ -1677,9 +1677,9 @@ function qn() {
1677
1677
  return r = +r, o = o >>> 0, h || ne(this, r, o, 4, 2147483647, -2147483648), this[o] = r & 255, this[o + 1] = r >>> 8, this[o + 2] = r >>> 16, this[o + 3] = r >>> 24, o + 4;
1678
1678
  }, l.prototype.writeInt32BE = function(r, o, h) {
1679
1679
  return r = +r, o = o >>> 0, h || ne(this, r, o, 4, 2147483647, -2147483648), r < 0 && (r = 4294967295 + r + 1), this[o] = r >>> 24, this[o + 1] = r >>> 16, this[o + 2] = r >>> 8, this[o + 3] = r & 255, o + 4;
1680
- }, l.prototype.writeBigInt64LE = he(function(r, o = 0) {
1680
+ }, l.prototype.writeBigInt64LE = fe(function(r, o = 0) {
1681
1681
  return Wt(this, r, o, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
1682
- }), l.prototype.writeBigInt64BE = he(function(r, o = 0) {
1682
+ }), l.prototype.writeBigInt64BE = fe(function(r, o = 0) {
1683
1683
  return jt(this, r, o, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
1684
1684
  });
1685
1685
  function Gt(d, r, o, h, _, g) {
@@ -1797,7 +1797,7 @@ function qn() {
1797
1797
  r = `_${d.slice(o - 3, o)}${r}`;
1798
1798
  return `${d.slice(0, o)}${r}`;
1799
1799
  }
1800
- function fn(d, r, o) {
1800
+ function pn(d, r, o) {
1801
1801
  Re(r, "offset"), (d[r] === void 0 || d[r + o] === void 0) && Pe(r, d.length - (o + 1));
1802
1802
  }
1803
1803
  function Yt(d, r, o, h, _, g) {
@@ -1806,7 +1806,7 @@ function qn() {
1806
1806
  let x;
1807
1807
  throw r === 0 || r === BigInt(0) ? x = `>= 0${v} and < 2${v} ** ${(g + 1) * 8}${v}` : x = `>= -(2${v} ** ${(g + 1) * 8 - 1}${v}) and < 2 ** ${(g + 1) * 8 - 1}${v}`, new we.ERR_OUT_OF_RANGE("value", x, d);
1808
1808
  }
1809
- fn(h, _, g);
1809
+ pn(h, _, g);
1810
1810
  }
1811
1811
  function Re(d, r) {
1812
1812
  if (typeof d != "number")
@@ -1819,9 +1819,9 @@ function qn() {
1819
1819
  d
1820
1820
  );
1821
1821
  }
1822
- const pn = /[^+/0-9A-Za-z-_]/g;
1823
- function _n(d) {
1824
- if (d = d.split("=")[0], d = d.trim().replace(pn, ""), d.length < 2) return "";
1822
+ const _n = /[^+/0-9A-Za-z-_]/g;
1823
+ function mn(d) {
1824
+ if (d = d.split("=")[0], d = d.trim().replace(_n, ""), d.length < 2) return "";
1825
1825
  for (; d.length % 4 !== 0; )
1826
1826
  d = d + "=";
1827
1827
  return d;
@@ -1880,13 +1880,13 @@ function qn() {
1880
1880
  }
1881
1881
  return g;
1882
1882
  }
1883
- function mn(d) {
1883
+ function gn(d) {
1884
1884
  const r = [];
1885
1885
  for (let o = 0; o < d.length; ++o)
1886
1886
  r.push(d.charCodeAt(o) & 255);
1887
1887
  return r;
1888
1888
  }
1889
- function gn(d, r) {
1889
+ function En(d, r) {
1890
1890
  let o, h, _;
1891
1891
  const g = [];
1892
1892
  for (let v = 0; v < d.length && !((r -= 2) < 0); ++v)
@@ -1894,7 +1894,7 @@ function qn() {
1894
1894
  return g;
1895
1895
  }
1896
1896
  function Kt(d) {
1897
- return e.toByteArray(_n(d));
1897
+ return e.toByteArray(mn(d));
1898
1898
  }
1899
1899
  function Ze(d, r, o, h) {
1900
1900
  let _;
@@ -1908,7 +1908,7 @@ function qn() {
1908
1908
  function pt(d) {
1909
1909
  return d !== d;
1910
1910
  }
1911
- const En = (function() {
1911
+ const vn = (function() {
1912
1912
  const d = "0123456789abcdef", r = new Array(256);
1913
1913
  for (let o = 0; o < 16; ++o) {
1914
1914
  const h = o * 16;
@@ -1917,20 +1917,20 @@ function qn() {
1917
1917
  }
1918
1918
  return r;
1919
1919
  })();
1920
- function he(d) {
1921
- return typeof BigInt > "u" ? vn : d;
1920
+ function fe(d) {
1921
+ return typeof BigInt > "u" ? Cn : d;
1922
1922
  }
1923
- function vn() {
1923
+ function Cn() {
1924
1924
  throw new Error("BigInt not supported");
1925
1925
  }
1926
1926
  })(gt)), gt;
1927
1927
  }
1928
- var Yn = qn();
1929
- const Kn = "https://api.anam.ai", Jn = "/v1", tn = {
1928
+ var Kn = Yn();
1929
+ const Jn = "https://api.anam.ai", Xn = "/v1", nn = {
1930
1930
  client: "js-sdk",
1931
1931
  version: "4.20.0"
1932
- }, Xn = 3, Zn = 250, Qn = 2e3, er = 1e4;
1933
- var nn = function(t, e, i, n) {
1932
+ }, Zn = 3, Qn = 250, er = 2e3, tr = 1e4;
1933
+ var rn = function(t, e, i, n) {
1934
1934
  function a(s) {
1935
1935
  return s instanceof i ? s : new i(function(c) {
1936
1936
  c(s);
@@ -1957,41 +1957,41 @@ var nn = function(t, e, i, n) {
1957
1957
  f((n = n.apply(t, e || [])).next());
1958
1958
  });
1959
1959
  };
1960
- const rn = "https://api.anam.ai", $t = "/v1";
1960
+ const on = "https://api.anam.ai", $t = "/v1";
1961
1961
  var ce;
1962
1962
  (function(t) {
1963
1963
  t.CLIENT_METRIC_MEASUREMENT_ERROR = "client_error", t.CLIENT_METRIC_MEASUREMENT_CONNECTION_CLOSED = "client_connection_closed", t.CLIENT_METRIC_MEASUREMENT_CONNECTION_ESTABLISHED = "client_connection_established", t.CLIENT_METRIC_MEASUREMENT_CONNECTION_MILESTONE = "client_connection_milestone", t.CLIENT_METRIC_MEASUREMENT_CONNECTION_MILESTONES = "client_connection_milestones", t.CLIENT_METRIC_MEASUREMENT_SESSION_ATTEMPT = "client_session_attempt", t.CLIENT_METRIC_MEASUREMENT_SESSION_SUCCESS = "client_session_success", t.CLIENT_METRIC_MEASUREMENT_ICE_RESTART = "client_ice_restart";
1964
1964
  })(ce || (ce = {}));
1965
1965
  const pi = 50;
1966
- let xt = rn, on = $t, pe, sn = !1;
1967
- const tr = (t, e = $t) => {
1968
- xt = t, on = e;
1969
- }, ir = (t) => {
1970
- pe = t;
1966
+ let xt = on, sn = $t, _e, an = !1;
1967
+ const ir = (t, e = $t) => {
1968
+ xt = t, sn = e;
1971
1969
  }, nr = (t) => {
1972
- sn = t;
1970
+ _e = t;
1971
+ }, rr = (t) => {
1972
+ an = t;
1973
1973
  };
1974
- let _e = {
1974
+ let me = {
1975
1975
  sessionId: null,
1976
1976
  organizationId: null,
1977
1977
  attemptCorrelationId: null
1978
1978
  };
1979
1979
  const Fe = (t) => {
1980
- _e = Object.assign(Object.assign({}, _e), t);
1981
- }, Me = (t, e, i) => nn(void 0, void 0, void 0, function* () {
1982
- yield an([{ name: t, value: e, tags: i }]);
1983
- }), an = (t) => nn(void 0, void 0, void 0, function* () {
1984
- if (!(sn || t.length === 0))
1980
+ me = Object.assign(Object.assign({}, me), t);
1981
+ }, Me = (t, e, i) => rn(void 0, void 0, void 0, function* () {
1982
+ yield ln([{ name: t, value: e, tags: i }]);
1983
+ }), ln = (t) => rn(void 0, void 0, void 0, function* () {
1984
+ if (!(an || t.length === 0))
1985
1985
  try {
1986
- const e = `${on}/metrics/client`;
1986
+ const e = `${sn}/metrics/client`;
1987
1987
  let i;
1988
1988
  const n = {
1989
1989
  "Content-Type": "application/json"
1990
1990
  };
1991
- pe?.enabled && pe?.baseUrl ? (i = `${pe.baseUrl}${e}`, n["X-Anam-Target-Url"] = `${xt}${e}`) : i = `${xt}${e}`;
1991
+ _e?.enabled && _e?.baseUrl ? (i = `${_e.baseUrl}${e}`, n["X-Anam-Target-Url"] = `${xt}${e}`) : i = `${xt}${e}`;
1992
1992
  const a = t.map((s) => {
1993
1993
  var c;
1994
- return Object.assign(Object.assign({}, s), { clientTimestamp: (c = s.clientTimestamp) !== null && c !== void 0 ? c : (/* @__PURE__ */ new Date()).toISOString(), tags: rr(s.tags) });
1994
+ return Object.assign(Object.assign({}, s), { clientTimestamp: (c = s.clientTimestamp) !== null && c !== void 0 ? c : (/* @__PURE__ */ new Date()).toISOString(), tags: or(s.tags) });
1995
1995
  });
1996
1996
  for (let s = 0; s < a.length; s += pi) {
1997
1997
  const c = a.slice(s, s + pi), l = c.length === 1 ? c[0] : {
@@ -2006,10 +2006,10 @@ const Fe = (t) => {
2006
2006
  } catch (e) {
2007
2007
  console.error("Failed to send client metric:", e);
2008
2008
  }
2009
- }), rr = (t) => {
2010
- const e = Object.assign(Object.assign({}, tn), t);
2011
- return _e.sessionId && e.sessionId === void 0 && (e.sessionId = _e.sessionId), _e.organizationId && e.organizationId === void 0 && (e.organizationId = _e.organizationId), _e.attemptCorrelationId && e.attemptCorrelationId === void 0 && (e.attemptCorrelationId = _e.attemptCorrelationId), e;
2012
- }, or = (t, e = "console") => {
2009
+ }), or = (t) => {
2010
+ const e = Object.assign(Object.assign({}, nn), t);
2011
+ return me.sessionId && e.sessionId === void 0 && (e.sessionId = me.sessionId), me.organizationId && e.organizationId === void 0 && (e.organizationId = me.organizationId), me.attemptCorrelationId && e.attemptCorrelationId === void 0 && (e.attemptCorrelationId = me.attemptCorrelationId), e;
2012
+ }, sr = (t, e = "console") => {
2013
2013
  var i, n, a;
2014
2014
  const s = {};
2015
2015
  t.forEach((u) => {
@@ -2101,18 +2101,18 @@ class V extends Error {
2101
2101
  });
2102
2102
  }
2103
2103
  }
2104
- function sr() {
2104
+ function ar() {
2105
2105
  return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : Date.now().toString(36) + Math.random().toString(36).substr(2, 9);
2106
2106
  }
2107
- const ln = 0, ar = 5e3;
2108
- class lr {
2107
+ const cn = 0, lr = 5e3;
2108
+ class cr {
2109
2109
  constructor(e = {}) {
2110
2110
  var i, n, a, s;
2111
2111
  this.milestones = [], this.context = {
2112
2112
  sessionId: null,
2113
2113
  organizationId: null,
2114
2114
  attemptCorrelationId: null
2115
- }, this.published = !1, this.sessionSuccessful = !1, this.now = (i = e.now) !== null && i !== void 0 ? i : cr, this.attemptStartedAtMs = this.now(), this.sampleRatio = dr((n = e.connectionMilestoneSampleRatio) !== null && n !== void 0 ? n : ln), this.slowConnectionThresholdMs = Math.max(0, cn(e.slowConnectionThresholdMs, ar)), this.sampled = ((a = e.random) !== null && a !== void 0 ? a : Math.random)() < this.sampleRatio, this.updateContext((s = e.context) !== null && s !== void 0 ? s : {}), this.record("client_session_attempt");
2115
+ }, this.published = !1, this.sessionSuccessful = !1, this.now = (i = e.now) !== null && i !== void 0 ? i : dr, this.attemptStartedAtMs = this.now(), this.sampleRatio = ur((n = e.connectionMilestoneSampleRatio) !== null && n !== void 0 ? n : cn), this.slowConnectionThresholdMs = Math.max(0, dn(e.slowConnectionThresholdMs, lr)), this.sampled = ((a = e.random) !== null && a !== void 0 ? a : Math.random)() < this.sampleRatio, this.updateContext((s = e.context) !== null && s !== void 0 ? s : {}), this.record("client_session_attempt");
2116
2116
  }
2117
2117
  updateContext(e) {
2118
2118
  this.context = Object.assign(Object.assign({}, this.context), e);
@@ -2120,7 +2120,7 @@ class lr {
2120
2120
  record(e, i) {
2121
2121
  if (this.published)
2122
2122
  return;
2123
- const n = dn(i), a = {
2123
+ const n = un(i), a = {
2124
2124
  name: e,
2125
2125
  elapsedMs: this.elapsedMs(),
2126
2126
  clientTimestamp: (/* @__PURE__ */ new Date()).toISOString()
@@ -2168,16 +2168,16 @@ class lr {
2168
2168
  tags: _i(Object.assign(Object.assign(Object.assign({}, this.context), { publishReason: e, milestone: s.name, sequence: c }), s.tags))
2169
2169
  }))
2170
2170
  ];
2171
- an(a);
2171
+ ln(a);
2172
2172
  }
2173
2173
  elapsedMs() {
2174
2174
  return Math.max(0, Math.round(this.now() - this.attemptStartedAtMs));
2175
2175
  }
2176
2176
  }
2177
- const cr = () => typeof performance < "u" ? performance.now() : Date.now(), dr = (t) => {
2178
- const e = cn(t, ln);
2177
+ const dr = () => typeof performance < "u" ? performance.now() : Date.now(), ur = (t) => {
2178
+ const e = dn(t, cn);
2179
2179
  return Math.min(1, Math.max(0, e));
2180
- }, cn = (t, e) => typeof t == "number" && Number.isFinite(t) ? t : e, dn = (t) => {
2180
+ }, dn = (t, e) => typeof t == "number" && Number.isFinite(t) ? t : e, un = (t) => {
2181
2181
  if (!t)
2182
2182
  return {};
2183
2183
  const e = {};
@@ -2186,11 +2186,11 @@ const cr = () => typeof performance < "u" ? performance.now() : Date.now(), dr =
2186
2186
  }), e;
2187
2187
  }, _i = (t) => {
2188
2188
  const e = {};
2189
- return Object.entries(dn(t)).forEach(([i, n]) => {
2189
+ return Object.entries(un(t)).forEach(([i, n]) => {
2190
2190
  e[i] = typeof n == "boolean" ? String(n) : n;
2191
2191
  }), e;
2192
2192
  };
2193
- function ur(t) {
2193
+ function hr(t) {
2194
2194
  if (!(!t || !t.enabled)) {
2195
2195
  if (!t.baseUrl)
2196
2196
  return "API Gateway baseUrl is required when enabled";
@@ -2213,10 +2213,10 @@ var se;
2213
2213
  (function(t) {
2214
2214
  t.SPEECH_TEXT = "speechText", t.CLIENT_TOOL_EVENT = "clientToolEvent", t.TOOL_CALL_STARTED_EVENT = "toolCallStarted", t.TOOL_CALL_COMPLETED_EVENT = "toolCallCompleted", t.TOOL_CALL_FAILED_EVENT = "toolCallFailed", t.REASONING_TEXT = "reasoningText", t.USER_SPEECH_STARTED = "userSpeechStarted", t.USER_SPEECH_ENDED = "userSpeechEnded", t.DIRECTOR_NOTE_CUE_APPLIED = "directorNoteCueApplied";
2215
2215
  })(se || (se = {}));
2216
- var me;
2216
+ var ge;
2217
2217
  (function(t) {
2218
2218
  t.PENDING = "pending", t.GRANTED = "granted", t.DENIED = "denied", t.NOT_REQUESTED = "not_requested";
2219
- })(me || (me = {}));
2219
+ })(ge || (ge = {}));
2220
2220
  var ve;
2221
2221
  (function(t) {
2222
2222
  t.USER = "user", t.PERSONA = "persona";
@@ -2229,11 +2229,11 @@ var B;
2229
2229
  (function(t) {
2230
2230
  t.WEB_SOCKET_OPEN = "WEB_SOCKET_OPEN", t.SIGNAL_MESSAGE_RECEIVED = "SIGNAL_MESSAGE_RECEIVED", t.WEBRTC_CHAT_MESSAGE_RECEIVED = "WEBRTC_CHAT_MESSAGE_RECEIVED", t.WEBRTC_CLIENT_TOOL_EVENT_RECEIVED = "WEBRTC_CLIENT_TOOL_EVENT_RECEIVED", t.WEBRTC_TOOL_CALL_STARTED_EVENT_RECEIVED = "WEBRTC_TOOL_CALL_STARTED_EVENT_RECEIVED", t.WEBRTC_TOOL_CALL_COMPLETED_EVENT_RECEIVED = "WEBRTC_TOOL_CALL_COMPLETED_EVENT_RECEIVED", t.WEBRTC_TOOL_CALL_FAILED_EVENT_RECEIVED = "WEBRTC_TOOL_CALL_FAILED_EVENT_RECEIVED", t.WEBRTC_REASONING_TEXT_MESSAGE_RECEIVED = "WEBRTC_REASONING_TEXT_MESSAGE_RECEIVED", t.TOOL_CALL_RESULT_READY = "TOOL_CALL_RESULT_READY";
2231
2231
  })(B || (B = {}));
2232
- var Ee;
2232
+ var de;
2233
2233
  (function(t) {
2234
2234
  t.NORMAL = "CONNECTION_CLOSED_CODE_NORMAL", t.MICROPHONE_PERMISSION_DENIED = "CONNECTION_CLOSED_CODE_MICROPHONE_PERMISSION_DENIED", t.SIGNALLING_CLIENT_CONNECTION_FAILURE = "CONNECTION_CLOSED_CODE_SIGNALLING_CLIENT_CONNECTION_FAILURE", t.WEBRTC_FAILURE = "CONNECTION_CLOSED_CODE_WEBRTC_FAILURE", t.SERVER_CLOSED_CONNECTION = "CONNECTION_CLOSED_CODE_SERVER_CLOSED_CONNECTION";
2235
- })(Ee || (Ee = {}));
2236
- class hr {
2235
+ })(de || (de = {}));
2236
+ class fr {
2237
2237
  constructor(e, i) {
2238
2238
  this.sequenceNumber = 0, this.config = e, this.signallingClient = i;
2239
2239
  }
@@ -2302,15 +2302,15 @@ var Ae = function(t, e, i, n) {
2302
2302
  f((n = n.apply(t, e || [])).next());
2303
2303
  });
2304
2304
  };
2305
- const fr = 5, pr = 5, _r = 24;
2306
- class mr {
2305
+ const pr = 5, _r = 5, mr = 24;
2306
+ class gr {
2307
2307
  constructor(e, i, n, a, s, c) {
2308
2308
  var l, m, f, p, u;
2309
2309
  if (this.stopSignal = !1, this.sendingBuffer = [], this.wsConnectionAttempts = 0, this.socket = null, this.permanentlyClosed = !1, this.iceRestartReconnectInProgress = !1, this.heartBeatIntervalRef = null, this.reconnectTimer = null, this.publicEventEmitter = n, this.internalEventEmitter = a, this.apiGatewayConfig = s, this.connectionMilestones = c, !e)
2310
2310
  throw new Error("Signalling Client: sessionId is required");
2311
2311
  this.sessionId = e;
2312
2312
  const { heartbeatIntervalSeconds: y, maxWsReconnectionAttempts: E, url: T } = i;
2313
- if (this.heartbeatIntervalSeconds = y || fr, this.maxWsReconnectionAttempts = E || pr, !T.baseUrl)
2313
+ if (this.heartbeatIntervalSeconds = y || pr, this.maxWsReconnectionAttempts = E || _r, !T.baseUrl)
2314
2314
  throw new Error("Signalling Client: baseUrl is required");
2315
2315
  if (!((l = this.apiGatewayConfig) === null || l === void 0) && l.enabled && (!((m = this.apiGatewayConfig) === null || m === void 0) && m.baseUrl)) {
2316
2316
  const I = new URL(this.apiGatewayConfig.baseUrl), w = (f = this.apiGatewayConfig.wsPath) !== null && f !== void 0 ? f : "/ws";
@@ -2450,7 +2450,7 @@ class mr {
2450
2450
  attemptNumber: this.wsConnectionAttempts + 1
2451
2451
  }), this.wsConnectionAttempts = 0, this.flushSendingBuffer(), e.onmessage = this.onMessage.bind(this), this.startSendingHeartBeats(), this.internalEventEmitter.emit(B.WEB_SOCKET_OPEN);
2452
2452
  } catch (n) {
2453
- console.error("SignallingClient - onOpen: error in onOpen", n), this.publicEventEmitter.emit(O.CONNECTION_CLOSED, Ee.SIGNALLING_CLIENT_CONNECTION_FAILURE), this.permanentlyClosed = !0;
2453
+ console.error("SignallingClient - onOpen: error in onOpen", n), this.publicEventEmitter.emit(O.CONNECTION_CLOSED, de.SIGNALLING_CLIENT_CONNECTION_FAILURE), this.permanentlyClosed = !0;
2454
2454
  }
2455
2455
  });
2456
2456
  }
@@ -2479,11 +2479,11 @@ class mr {
2479
2479
  this.clearReconnectTimer(), this.heartBeatIntervalRef && (clearInterval(this.heartBeatIntervalRef), this.heartBeatIntervalRef = null), (s = this.connectionMilestones) === null || s === void 0 || s.publishFailure({
2480
2480
  failureStage: "websocket",
2481
2481
  closeCode: i?.code
2482
- }), this.publicEventEmitter.emit(O.CONNECTION_CLOSED, Ee.SIGNALLING_CLIENT_CONNECTION_FAILURE), this.iceRestartReconnectInProgress = !1, this.permanentlyClosed = !0;
2482
+ }), this.publicEventEmitter.emit(O.CONNECTION_CLOSED, de.SIGNALLING_CLIENT_CONNECTION_FAILURE), this.iceRestartReconnectInProgress = !1, this.permanentlyClosed = !0;
2483
2483
  });
2484
2484
  }
2485
2485
  getMaxReconnectionAttempts() {
2486
- return this.iceRestartReconnectInProgress ? Math.max(this.maxWsReconnectionAttempts, _r) : this.maxWsReconnectionAttempts;
2486
+ return this.iceRestartReconnectInProgress ? Math.max(this.maxWsReconnectionAttempts, mr) : this.maxWsReconnectionAttempts;
2487
2487
  }
2488
2488
  onError(e, i) {
2489
2489
  var n;
@@ -2519,7 +2519,7 @@ class mr {
2519
2519
  }, e);
2520
2520
  }
2521
2521
  }
2522
- function gr(t) {
2522
+ function Er(t) {
2523
2523
  return "brainType" in t || "llmId" in t;
2524
2524
  }
2525
2525
  var Et = function(t, e, i, n) {
@@ -2549,11 +2549,11 @@ var Et = function(t, e, i, n) {
2549
2549
  f((n = n.apply(t, e || [])).next());
2550
2550
  });
2551
2551
  };
2552
- class Er {
2552
+ class vr {
2553
2553
  constructor(e, i, n) {
2554
2554
  if (!e && !i)
2555
2555
  throw new Error("Either sessionToken or apiKey must be provided");
2556
- this.sessionToken = e || null, this.apiKey = i || null, this.baseUrl = n?.baseUrl || Kn, this.apiVersion = n?.apiVersion || Jn, this.apiGatewayConfig = n?.apiGateway || void 0, this.retryOptions = vr(n?.retry), this.requestTimeoutMs = Math.max(0, nt(n?.requestTimeoutMs, er));
2556
+ this.sessionToken = e || null, this.apiKey = i || null, this.baseUrl = n?.baseUrl || Jn, this.apiVersion = n?.apiVersion || Xn, this.apiGatewayConfig = n?.apiGateway || void 0, this.retryOptions = Cr(n?.retry), this.requestTimeoutMs = Math.max(0, nt(n?.requestTimeoutMs, tr));
2557
2557
  }
2558
2558
  /**
2559
2559
  * Builds URL and headers for a request, applying API Gateway configuration if enabled
@@ -2583,9 +2583,9 @@ class Er {
2583
2583
  try {
2584
2584
  return yield this.attemptStartSession(e, i);
2585
2585
  } catch (c) {
2586
- if (a = c, s >= n || !Cr(c))
2586
+ if (a = c, s >= n || !Sr(c))
2587
2587
  throw c;
2588
- yield Sr(this.computeBackoffDelay(s));
2588
+ yield Tr(this.computeBackoffDelay(s));
2589
2589
  }
2590
2590
  throw a;
2591
2591
  });
@@ -2603,7 +2603,7 @@ class Er {
2603
2603
  body: JSON.stringify({
2604
2604
  personaConfig: e,
2605
2605
  sessionOptions: i,
2606
- clientMetadata: tn
2606
+ clientMetadata: nn
2607
2607
  }),
2608
2608
  signal: n?.signal
2609
2609
  }), f = yield m.json(), p = f.error;
@@ -2645,7 +2645,7 @@ class Er {
2645
2645
  let i = {
2646
2646
  clientLabel: "js-sdk-api-key"
2647
2647
  };
2648
- gr(e) && (i = Object.assign(Object.assign({}, i), { personaConfig: e }));
2648
+ Er(e) && (i = Object.assign(Object.assign({}, i), { personaConfig: e }));
2649
2649
  try {
2650
2650
  const n = `${this.apiVersion}/auth/session-token`, { url: a, headers: s } = this.buildGatewayUrlAndHeaders(n, {
2651
2651
  "Content-Type": "application/json",
@@ -2665,20 +2665,20 @@ class Er {
2665
2665
  return `${this.baseUrl}${this.apiVersion}`;
2666
2666
  }
2667
2667
  }
2668
- function vr(t) {
2669
- const e = Math.max(1, Math.floor(nt(t?.maxAttempts, Xn))), i = Math.max(0, nt(t?.initialBackoffMs, Zn)), n = Math.max(i, nt(t?.maxBackoffMs, Qn));
2668
+ function Cr(t) {
2669
+ const e = Math.max(1, Math.floor(nt(t?.maxAttempts, Zn))), i = Math.max(0, nt(t?.initialBackoffMs, Qn)), n = Math.max(i, nt(t?.maxBackoffMs, er));
2670
2670
  return { maxAttempts: e, initialBackoffMs: i, maxBackoffMs: n };
2671
2671
  }
2672
2672
  function nt(t, e) {
2673
2673
  return typeof t == "number" && Number.isFinite(t) ? t : e;
2674
2674
  }
2675
- function Cr(t) {
2675
+ function Sr(t) {
2676
2676
  return t instanceof V ? t.statusCode >= 500 && t.statusCode < 600 : !0;
2677
2677
  }
2678
- function Sr(t) {
2678
+ function Tr(t) {
2679
2679
  return new Promise((e) => setTimeout(e, t));
2680
2680
  }
2681
- var Tr = function(t, e, i, n) {
2681
+ var yr = function(t, e, i, n) {
2682
2682
  function a(s) {
2683
2683
  return s instanceof i ? s : new i(function(c) {
2684
2684
  c(s);
@@ -2705,12 +2705,12 @@ var Tr = function(t, e, i, n) {
2705
2705
  f((n = n.apply(t, e || [])).next());
2706
2706
  });
2707
2707
  };
2708
- class yr {
2708
+ class Ir {
2709
2709
  constructor(e, i, n) {
2710
2710
  this.baseUrl = e, this.sessionId = i, this.apiGatewayConfig = n;
2711
2711
  }
2712
2712
  sendTalkCommand(e) {
2713
- return Tr(this, void 0, void 0, function* () {
2713
+ return yr(this, void 0, void 0, function* () {
2714
2714
  var i, n;
2715
2715
  try {
2716
2716
  let a, s = {
@@ -2738,7 +2738,7 @@ class yr {
2738
2738
  });
2739
2739
  }
2740
2740
  }
2741
- class Ir {
2741
+ class br {
2742
2742
  constructor() {
2743
2743
  this.listeners = {};
2744
2744
  }
@@ -2754,7 +2754,7 @@ class Ir {
2754
2754
  });
2755
2755
  }
2756
2756
  }
2757
- class br {
2757
+ class wr {
2758
2758
  constructor(e, i) {
2759
2759
  this.messages = [], this.publicEventEmitter = e, this.internalEventEmitter = i, this.internalEventEmitter.addListener(B.WEBRTC_CHAT_MESSAGE_RECEIVED, this.processWebRtcTextMessageEvent.bind(this));
2760
2760
  }
@@ -2795,7 +2795,7 @@ class br {
2795
2795
  i.endOfSpeech && this.publicEventEmitter.emit(O.MESSAGE_HISTORY_UPDATED, this.messages);
2796
2796
  }
2797
2797
  }
2798
- class wr {
2798
+ class Rr {
2799
2799
  constructor() {
2800
2800
  this.listeners = {};
2801
2801
  }
@@ -2846,7 +2846,7 @@ var vt = function(t, e, i, n) {
2846
2846
  f((n = n.apply(t, e || [])).next());
2847
2847
  });
2848
2848
  };
2849
- class Rr {
2849
+ class Ar {
2850
2850
  constructor(e, i, n) {
2851
2851
  this.state = ie.UNSTARTED, this.correlationId = e, this.internalEventEmitter = i, this.signallingClient = n, this.internalEventEmitter.addListener(B.SIGNAL_MESSAGE_RECEIVED, this.onSignalMessage.bind(this));
2852
2852
  }
@@ -2933,7 +2933,7 @@ const mi = (t, e) => {
2933
2933
  const i = e - t;
2934
2934
  return i > 0 ? i : 0;
2935
2935
  };
2936
- class un {
2936
+ class hn {
2937
2937
  constructor(e, i) {
2938
2938
  this.handlers = /* @__PURE__ */ Object.create(null), this.pendingCalls = /* @__PURE__ */ Object.create(null), this.failedCalls = /* @__PURE__ */ Object.create(null), this.activeSessionId = null, this.publicEventEmitter = e, this.internalEventEmitter = i;
2939
2939
  }
@@ -3153,16 +3153,16 @@ var Z = function(t, e, i, n) {
3153
3153
  f((n = n.apply(t, e || [])).next());
3154
3154
  });
3155
3155
  };
3156
- const St = 15e3, Ar = 5e3, gi = 2, Or = 3, xr = 2e3, Tt = 3e3, Nr = 5e3;
3157
- class kr {
3156
+ const St = 15e3, Or = 5e3, gi = 2, xr = 3, Nr = 2e3, Tt = 3e3, kr = 5e3;
3157
+ class Lr {
3158
3158
  constructor(e, i, n, a, s, c) {
3159
3159
  var l, m, f, p;
3160
3160
  this.peerConnection = null, this.connectionEstablishedEmitted = !1, this.iceRestartInProgress = !1, this.iceRestartAttempts = 0, this.iceRestartAwaitedAnswer = !1, this.iceRestartEpisodeStartMs = null, this.iceRestartEpisodeTrigger = null, this.iceRestartStopped = !1, this.iceDisconnectedGraceTimer = null, this.iceRestartWatchdogTimer = null, this.pendingWsOpenListener = null, this.pendingWsOpenTimeout = null, this.pendingWsOpenReject = null, this.connectionReceivedAnswer = !1, this.remoteIceCandidateBuffer = [], this.iceRestartCandidateBuffer = null, this.inputAudioStream = null, this.dataChannel = null, this.videoElement = null, this.videoStream = null, this.audioStream = null, this.inputAudioState = {
3161
3161
  isMuted: !1,
3162
- permissionState: me.NOT_REQUESTED
3162
+ permissionState: ge.NOT_REQUESTED
3163
3163
  }, this.successMetricPoller = null, this.successMetricFired = !1, this.showPeerConnectionStatsReport = !1, this.peerConnectionStatsReportOutputFormat = "console", this.statsCollectionInterval = null, this.agentAudioInputStream = null, this.firstLocalIceCandidateSent = !1, this.firstRemoteIceCandidateReceived = !1, this.firstRemoteIceCandidateApplied = !1, this.connectionEstablishedMilestoneRecorded = !1, this.publicEventEmitter = n, this.internalEventEmitter = a, this.toolCallManager = s, this.connectionMilestones = c, this.apiGatewayConfig = i.apiGateway;
3164
3164
  const { inputAudio: u } = i;
3165
- this.inputAudioState = u.inputAudioState, i.inputAudio.userProvidedMediaStream && (this.inputAudioStream = i.inputAudio.userProvidedMediaStream), this.disableInputAudio = i.inputAudio.disableInputAudio === !0, this.internalEventEmitter.addListener(B.WEB_SOCKET_OPEN, this.onSignallingClientConnected.bind(this)), this.internalEventEmitter.addListener(B.SIGNAL_MESSAGE_RECEIVED, this.onSignalMessage.bind(this)), this.internalEventEmitter.addListener(B.WEBRTC_TOOL_CALL_STARTED_EVENT_RECEIVED, this.toolCallManager.processToolCallStartedEvent.bind(this.toolCallManager)), this.internalEventEmitter.addListener(B.WEBRTC_TOOL_CALL_COMPLETED_EVENT_RECEIVED, this.toolCallManager.processToolCallCompletedEvent.bind(this.toolCallManager)), this.internalEventEmitter.addListener(B.WEBRTC_TOOL_CALL_FAILED_EVENT_RECEIVED, this.toolCallManager.processToolCallFailedEvent.bind(this.toolCallManager)), this.internalEventEmitter.addListener(B.TOOL_CALL_RESULT_READY, this.onToolCallResultReceived.bind(this)), this.iceServers = i.iceServers, this.iceTransportPolicy = i.iceTransportPolicy, this.rtcConfiguration = i.rtcConfiguration, this.signallingClient = new mr(e, i.signalling, this.publicEventEmitter, this.internalEventEmitter, this.apiGatewayConfig, this.connectionMilestones), this.engineApiRestClient = new yr(i.engine.baseUrl, e, this.apiGatewayConfig), this.audioDeviceId = i.inputAudio.audioDeviceId, this.showPeerConnectionStatsReport = (m = (l = i.metrics) === null || l === void 0 ? void 0 : l.showPeerConnectionStatsReport) !== null && m !== void 0 ? m : !1, this.peerConnectionStatsReportOutputFormat = (p = (f = i.metrics) === null || f === void 0 ? void 0 : f.peerConnectionStatsReportOutputFormat) !== null && p !== void 0 ? p : "console";
3165
+ this.inputAudioState = u.inputAudioState, i.inputAudio.userProvidedMediaStream && (this.inputAudioStream = i.inputAudio.userProvidedMediaStream), this.disableInputAudio = i.inputAudio.disableInputAudio === !0, this.internalEventEmitter.addListener(B.WEB_SOCKET_OPEN, this.onSignallingClientConnected.bind(this)), this.internalEventEmitter.addListener(B.SIGNAL_MESSAGE_RECEIVED, this.onSignalMessage.bind(this)), this.internalEventEmitter.addListener(B.WEBRTC_TOOL_CALL_STARTED_EVENT_RECEIVED, this.toolCallManager.processToolCallStartedEvent.bind(this.toolCallManager)), this.internalEventEmitter.addListener(B.WEBRTC_TOOL_CALL_COMPLETED_EVENT_RECEIVED, this.toolCallManager.processToolCallCompletedEvent.bind(this.toolCallManager)), this.internalEventEmitter.addListener(B.WEBRTC_TOOL_CALL_FAILED_EVENT_RECEIVED, this.toolCallManager.processToolCallFailedEvent.bind(this.toolCallManager)), this.internalEventEmitter.addListener(B.TOOL_CALL_RESULT_READY, this.onToolCallResultReceived.bind(this)), this.iceServers = i.iceServers, this.iceTransportPolicy = i.iceTransportPolicy, this.rtcConfiguration = i.rtcConfiguration, this.signallingClient = new gr(e, i.signalling, this.publicEventEmitter, this.internalEventEmitter, this.apiGatewayConfig, this.connectionMilestones), this.engineApiRestClient = new Ir(i.engine.baseUrl, e, this.apiGatewayConfig), this.audioDeviceId = i.inputAudio.audioDeviceId, this.showPeerConnectionStatsReport = (m = (l = i.metrics) === null || l === void 0 ? void 0 : l.showPeerConnectionStatsReport) !== null && m !== void 0 ? m : !1, this.peerConnectionStatsReportOutputFormat = (p = (f = i.metrics) === null || f === void 0 ? void 0 : f.peerConnectionStatsReportOutputFormat) !== null && p !== void 0 ? p : "console";
3166
3166
  }
3167
3167
  onInputAudioStateChange(e, i) {
3168
3168
  e.isMuted !== i.isMuted && (i.isMuted ? this.muteAllAudioTracks() : this.unmuteAllAudioTracks());
@@ -3188,7 +3188,7 @@ class kr {
3188
3188
  } catch (e) {
3189
3189
  console.error("Failed to collect and send stats:", e);
3190
3190
  }
3191
- }), Ar));
3191
+ }), Or));
3192
3192
  }
3193
3193
  sendClientSideMetrics(e) {
3194
3194
  e.forEach((i) => {
@@ -3332,10 +3332,10 @@ class kr {
3332
3332
  });
3333
3333
  }
3334
3334
  startTalkMessageStream(e) {
3335
- return e || (e = Math.random().toString(36).substring(2, 15)), new Rr(e, this.internalEventEmitter, this.signallingClient);
3335
+ return e || (e = Math.random().toString(36).substring(2, 15)), new Ar(e, this.internalEventEmitter, this.signallingClient);
3336
3336
  }
3337
3337
  createAgentAudioInputStream(e) {
3338
- return this.agentAudioInputStream = new hr(e, this.signallingClient), this.agentAudioInputStream;
3338
+ return this.agentAudioInputStream = new fr(e, this.signallingClient), this.agentAudioInputStream;
3339
3339
  }
3340
3340
  getAgentAudioInputStream() {
3341
3341
  return this.agentAudioInputStream;
@@ -3394,7 +3394,7 @@ class kr {
3394
3394
  const c = e.payload;
3395
3395
  this.sendIceRestartMetric("aborted"), (s = this.connectionMilestones) === null || s === void 0 || s.publishFailure({
3396
3396
  failureStage: "server_closed_connection"
3397
- }), this.publicEventEmitter.emit(O.CONNECTION_CLOSED, Ee.SERVER_CLOSED_CONNECTION, c), this.shutdown();
3397
+ }), this.publicEventEmitter.emit(O.CONNECTION_CLOSED, de.SERVER_CLOSED_CONNECTION, c), this.shutdown();
3398
3398
  break;
3399
3399
  case Q.WARNING:
3400
3400
  const l = e.payload;
@@ -3550,7 +3550,7 @@ class kr {
3550
3550
  return;
3551
3551
  const i = (e = this.peerConnection) === null || e === void 0 ? void 0 : e.iceConnectionState;
3552
3552
  (i === "disconnected" || i === "failed") && this.restartIce();
3553
- }, xr));
3553
+ }, Nr));
3554
3554
  }
3555
3555
  /**
3556
3556
  * Resolve once the signalling WebSocket is open (it auto-reconnects on close),
@@ -3562,7 +3562,7 @@ class kr {
3562
3562
  return this.signallingClient.isConnected() ? Promise.resolve() : this.signallingClient.isPermanentlyClosed() ? Promise.reject(new Error("signalling permanently closed")) : new Promise((e, i) => {
3563
3563
  this.pendingWsOpenReject = i, this.pendingWsOpenTimeout = setTimeout(() => {
3564
3564
  this.clearPendingWsOpenWait(), i(new Error("timed out waiting for signalling WebSocket"));
3565
- }, Nr);
3565
+ }, kr);
3566
3566
  const n = () => {
3567
3567
  this.clearPendingWsOpenWait(), e();
3568
3568
  };
@@ -3582,7 +3582,7 @@ class kr {
3582
3582
  this.sendIceRestartMetric("aborted"), this.cancelIceRestart();
3583
3583
  return;
3584
3584
  }
3585
- if (this.iceRestartAttempts >= Or) {
3585
+ if (this.iceRestartAttempts >= xr) {
3586
3586
  console.error("StreamingClient - restartIce: exhausted attempts"), (e = this.connectionMilestones) === null || e === void 0 || e.publishFailure({
3587
3587
  failureStage: "ice_connection",
3588
3588
  iceConnectionState: (i = this.peerConnection) === null || i === void 0 ? void 0 : i.iceConnectionState
@@ -3652,7 +3652,7 @@ class kr {
3652
3652
  }
3653
3653
  handleWebrtcFailure(e) {
3654
3654
  var i, n;
3655
- (i = this.connectionMilestones) === null || i === void 0 || i.record("webrtc_failure", $e(e)), (n = this.connectionMilestones) === null || n === void 0 || n.publishFailure(Object.assign({ failureStage: "webrtc" }, $e(e))), console.error({ message: "StreamingClient - handleWebrtcFailure: ", err: e }), e.name === "NotAllowedError" && e.message === "Permission denied" ? this.publicEventEmitter.emit(O.CONNECTION_CLOSED, Ee.MICROPHONE_PERMISSION_DENIED) : this.publicEventEmitter.emit(O.CONNECTION_CLOSED, Ee.WEBRTC_FAILURE);
3655
+ (i = this.connectionMilestones) === null || i === void 0 || i.record("webrtc_failure", $e(e)), (n = this.connectionMilestones) === null || n === void 0 || n.publishFailure(Object.assign({ failureStage: "webrtc" }, $e(e))), console.error({ message: "StreamingClient - handleWebrtcFailure: ", err: e }), e.name === "NotAllowedError" && e.message === "Permission denied" ? this.publicEventEmitter.emit(O.CONNECTION_CLOSED, de.MICROPHONE_PERMISSION_DENIED) : this.publicEventEmitter.emit(O.CONNECTION_CLOSED, de.WEBRTC_FAILURE);
3656
3656
  try {
3657
3657
  this.stopConnection();
3658
3658
  } catch (a) {
@@ -3703,7 +3703,7 @@ class kr {
3703
3703
  case se.CLIENT_TOOL_EVENT:
3704
3704
  const u = p.data;
3705
3705
  this.internalEventEmitter.emit(B.WEBRTC_CLIENT_TOOL_EVENT_RECEIVED, u);
3706
- const y = un.WebRTCClientToolEventToClientToolEvent(u);
3706
+ const y = hn.WebRTCClientToolEventToClientToolEvent(u);
3707
3707
  this.publicEventEmitter.emit(O.CLIENT_TOOL_EVENT_RECEIVED, y);
3708
3708
  break;
3709
3709
  case se.TOOL_CALL_STARTED_EVENT:
@@ -3750,8 +3750,8 @@ class kr {
3750
3750
  requestMicrophonePermissionAsync() {
3751
3751
  return Z(this, void 0, void 0, function* () {
3752
3752
  var e, i, n;
3753
- if (this.inputAudioState.permissionState !== me.PENDING) {
3754
- this.inputAudioState = Object.assign(Object.assign({}, this.inputAudioState), { permissionState: me.PENDING }), (e = this.connectionMilestones) === null || e === void 0 || e.record("microphone_permission_pending"), this.publicEventEmitter.emit(O.MIC_PERMISSION_PENDING);
3753
+ if (this.inputAudioState.permissionState !== ge.PENDING) {
3754
+ this.inputAudioState = Object.assign(Object.assign({}, this.inputAudioState), { permissionState: ge.PENDING }), (e = this.connectionMilestones) === null || e === void 0 || e.record("microphone_permission_pending"), this.publicEventEmitter.emit(O.MIC_PERMISSION_PENDING);
3755
3755
  try {
3756
3756
  const a = {
3757
3757
  echoCancellation: !0
@@ -3766,9 +3766,9 @@ class kr {
3766
3766
  s.getTracks().forEach((c) => c.stop());
3767
3767
  return;
3768
3768
  }
3769
- this.inputAudioStream = s, this.inputAudioState = Object.assign(Object.assign({}, this.inputAudioState), { permissionState: me.GRANTED }), (i = this.connectionMilestones) === null || i === void 0 || i.record("microphone_permission_granted"), this.publicEventEmitter.emit(O.MIC_PERMISSION_GRANTED), yield this.setupAudioTrack();
3769
+ this.inputAudioStream = s, this.inputAudioState = Object.assign(Object.assign({}, this.inputAudioState), { permissionState: ge.GRANTED }), (i = this.connectionMilestones) === null || i === void 0 || i.record("microphone_permission_granted"), this.publicEventEmitter.emit(O.MIC_PERMISSION_GRANTED), yield this.setupAudioTrack();
3770
3770
  } catch (a) {
3771
- console.error("Failed to get microphone permission:", a), this.inputAudioState = Object.assign(Object.assign({}, this.inputAudioState), { permissionState: me.DENIED }), (n = this.connectionMilestones) === null || n === void 0 || n.record("microphone_permission_denied", Object.assign({}, $e(a)));
3771
+ console.error("Failed to get microphone permission:", a), this.inputAudioState = Object.assign(Object.assign({}, this.inputAudioState), { permissionState: ge.DENIED }), (n = this.connectionMilestones) === null || n === void 0 || n.record("microphone_permission_denied", Object.assign({}, $e(a)));
3772
3772
  const s = a instanceof Error ? a.message : String(a);
3773
3773
  this.publicEventEmitter.emit(O.MIC_PERMISSION_DENIED, s);
3774
3774
  }
@@ -3830,7 +3830,7 @@ class kr {
3830
3830
  if (this.iceRestartStopped = !0, this.cancelIceRestart(), this.showPeerConnectionStatsReport) {
3831
3831
  const i = yield (e = this.peerConnection) === null || e === void 0 ? void 0 : e.getStats();
3832
3832
  if (i) {
3833
- const n = or(i, this.peerConnectionStatsReportOutputFormat);
3833
+ const n = sr(i, this.peerConnectionStatsReportOutputFormat);
3834
3834
  n && console.log(n, void 0, 2);
3835
3835
  }
3836
3836
  }
@@ -3881,7 +3881,7 @@ const yt = (t) => {
3881
3881
  n !== void 0 && (e[i] = n);
3882
3882
  }), e;
3883
3883
  };
3884
- class Lr {
3884
+ class Mr {
3885
3885
  constructor(e, i) {
3886
3886
  this.reasoning_messages = [], this.publicEventEmitter = e, this.internalEventEmitter = i, this.internalEventEmitter.addListener(B.WEBRTC_REASONING_TEXT_MESSAGE_RECEIVED, this.processWebRtcReasoningTextMessageEvent.bind(this));
3887
3887
  }
@@ -3909,7 +3909,7 @@ class Lr {
3909
3909
  i.endOfThought && this.publicEventEmitter.emit(O.REASONING_HISTORY_UPDATED, this.reasoning_messages);
3910
3910
  }
3911
3911
  }
3912
- var fe = function(t, e, i, n) {
3912
+ var pe = function(t, e, i, n) {
3913
3913
  function a(s) {
3914
3914
  return s instanceof i ? s : new i(function(c) {
3915
3915
  c(s);
@@ -3936,21 +3936,21 @@ var fe = function(t, e, i, n) {
3936
3936
  f((n = n.apply(t, e || [])).next());
3937
3937
  });
3938
3938
  };
3939
- class Mr {
3939
+ class Dr {
3940
3940
  constructor(e, i, n) {
3941
3941
  var a, s, c, l, m;
3942
3942
  this.inputAudioState = {
3943
3943
  isMuted: !1,
3944
- permissionState: me.NOT_REQUESTED
3944
+ permissionState: ge.NOT_REQUESTED
3945
3945
  }, this.sessionId = null, this.organizationId = null, this.streamingClient = null, this._isStreaming = !1;
3946
3946
  const f = this.validateClientConfig(e, i, n);
3947
3947
  if (f)
3948
3948
  throw new V(f, J.CLIENT_ERROR_CODE_CONFIGURATION_ERROR, 400);
3949
- this.personaConfig = i, this.clientOptions = n, (!((a = n?.api) === null || a === void 0) && a.baseUrl || !((s = n?.api) === null || s === void 0) && s.apiVersion) && tr(n.api.baseUrl || rn, n.api.apiVersion || $t), !((l = (c = n?.api) === null || c === void 0 ? void 0 : c.apiGateway) === null || l === void 0) && l.enabled && ir(n.api.apiGateway), !((m = n?.metrics) === null || m === void 0) && m.disableClientMetrics && nr(!0), this.publicEventEmitter = new wr(), this.internalEventEmitter = new Ir(), this.toolCallManager = new un(this.publicEventEmitter, this.internalEventEmitter), this.apiClient = new Er(e, n?.apiKey, n?.api), this.messageHistoryClient = new br(this.publicEventEmitter, this.internalEventEmitter), this.reasoningHistoryClient = new Lr(this.publicEventEmitter, this.internalEventEmitter);
3949
+ this.personaConfig = i, this.clientOptions = n, (!((a = n?.api) === null || a === void 0) && a.baseUrl || !((s = n?.api) === null || s === void 0) && s.apiVersion) && ir(n.api.baseUrl || on, n.api.apiVersion || $t), !((l = (c = n?.api) === null || c === void 0 ? void 0 : c.apiGateway) === null || l === void 0) && l.enabled && nr(n.api.apiGateway), !((m = n?.metrics) === null || m === void 0) && m.disableClientMetrics && rr(!0), this.publicEventEmitter = new Rr(), this.internalEventEmitter = new br(), this.toolCallManager = new hn(this.publicEventEmitter, this.internalEventEmitter), this.apiClient = new vr(e, n?.apiKey, n?.api), this.messageHistoryClient = new wr(this.publicEventEmitter, this.internalEventEmitter), this.reasoningHistoryClient = new Mr(this.publicEventEmitter, this.internalEventEmitter);
3950
3950
  }
3951
3951
  decodeJwt(e) {
3952
3952
  try {
3953
- const i = e.split(".")[1], n = Yn.Buffer.from(i, "base64").toString("utf8");
3953
+ const i = e.split(".")[1], n = Kn.Buffer.from(i, "base64").toString("utf8");
3954
3954
  return JSON.parse(n);
3955
3955
  } catch {
3956
3956
  throw new Error("Invalid session token format");
@@ -3962,7 +3962,7 @@ class Mr {
3962
3962
  return "Either sessionToken or apiKey must be provided";
3963
3963
  if (n?.apiKey && e)
3964
3964
  return "Only one of sessionToken or apiKey should be used";
3965
- const c = ur((a = n?.api) === null || a === void 0 ? void 0 : a.apiGateway);
3965
+ const c = hr((a = n?.api) === null || a === void 0 ? void 0 : a.apiGateway);
3966
3966
  if (c)
3967
3967
  return c;
3968
3968
  if (e) {
@@ -3996,13 +3996,13 @@ class Mr {
3996
3996
  }
3997
3997
  startConnectionAttempt() {
3998
3998
  var e, i, n, a;
3999
- const s = sr();
3999
+ const s = ar();
4000
4000
  Fe({
4001
4001
  attemptCorrelationId: s,
4002
4002
  sessionId: null,
4003
4003
  organizationId: this.organizationId
4004
4004
  });
4005
- const c = new lr({
4005
+ const c = new cr({
4006
4006
  context: {
4007
4007
  attemptCorrelationId: s,
4008
4008
  sessionId: null,
@@ -4014,7 +4014,7 @@ class Mr {
4014
4014
  return Me(ce.CLIENT_METRIC_MEASUREMENT_SESSION_ATTEMPT, "1"), c;
4015
4015
  }
4016
4016
  startSession(e, i) {
4017
- return fe(this, void 0, void 0, function* () {
4017
+ return pe(this, void 0, void 0, function* () {
4018
4018
  var n, a, s, c, l, m, f, p, u, y, E, T, I, w, A, R, b;
4019
4019
  const N = this.personaConfig, S = this.buildStartSessionOptionsForClient();
4020
4020
  i?.record("start_session_request_started");
@@ -4024,22 +4024,22 @@ class Mr {
4024
4024
  } catch (re) {
4025
4025
  throw i?.record("start_session_request_failed", Object.assign({}, Oe(re))), i?.publishFailure(Object.assign({ failureStage: "start_session_request" }, Oe(re))), re;
4026
4026
  }
4027
- const { sessionId: U, clientConfig: z, engineHost: Y, engineProtocol: oe, signallingEndpoint: K } = k, { heartbeatIntervalSeconds: te, maxWsReconnectionAttempts: de, iceServers: ue, iceTransportPolicy: Se } = z;
4027
+ const { sessionId: U, clientConfig: q, engineHost: Y, engineProtocol: oe, signallingEndpoint: K } = k, { heartbeatIntervalSeconds: te, maxWsReconnectionAttempts: ue, iceServers: he, iceTransportPolicy: Se } = q;
4028
4028
  this.sessionId = U, this.toolCallManager.setActiveSession(U), Fe({
4029
4029
  sessionId: this.sessionId
4030
4030
  }), i?.updateContext({
4031
4031
  sessionId: this.sessionId,
4032
4032
  organizationId: this.organizationId
4033
4033
  });
4034
- const Te = (l = (a = (n = this.clientOptions) === null || n === void 0 ? void 0 : n.iceServers) !== null && a !== void 0 ? a : (c = (s = this.clientOptions) === null || s === void 0 ? void 0 : s.rtcConfiguration) === null || c === void 0 ? void 0 : c.iceServers) !== null && l !== void 0 ? l : ue;
4034
+ const Te = (l = (a = (n = this.clientOptions) === null || n === void 0 ? void 0 : n.iceServers) !== null && a !== void 0 ? a : (c = (s = this.clientOptions) === null || s === void 0 ? void 0 : s.rtcConfiguration) === null || c === void 0 ? void 0 : c.iceServers) !== null && l !== void 0 ? l : he;
4035
4035
  try {
4036
- this.streamingClient = new kr(U, {
4036
+ this.streamingClient = new Lr(U, {
4037
4037
  engine: {
4038
4038
  baseUrl: `${oe}://${Y}`
4039
4039
  },
4040
4040
  signalling: {
4041
4041
  heartbeatIntervalSeconds: te,
4042
- maxWsReconnectionAttempts: de,
4042
+ maxWsReconnectionAttempts: ue,
4043
4043
  url: {
4044
4044
  baseUrl: Y,
4045
4045
  protocol: oe,
@@ -4073,7 +4073,7 @@ class Mr {
4073
4073
  });
4074
4074
  }
4075
4075
  startSessionIfNeeded(e, i) {
4076
- return fe(this, void 0, void 0, function* () {
4076
+ return pe(this, void 0, void 0, function* () {
4077
4077
  if ((!this.sessionId || !this.streamingClient) && (yield this.startSession(e, i), !this.sessionId || !this.streamingClient))
4078
4078
  throw i?.publishFailure({
4079
4079
  failureStage: "start_session_validation"
@@ -4083,7 +4083,7 @@ class Mr {
4083
4083
  });
4084
4084
  }
4085
4085
  stream(e) {
4086
- return fe(this, void 0, void 0, function* () {
4086
+ return pe(this, void 0, void 0, function* () {
4087
4087
  var i;
4088
4088
  if (this._isStreaming)
4089
4089
  throw new Error("Already streaming");
@@ -4110,12 +4110,12 @@ class Mr {
4110
4110
  * @deprecated This method is deprecated. Please use streamToVideoElement instead.
4111
4111
  */
4112
4112
  streamToVideoAndAudioElements(e, i, n) {
4113
- return fe(this, void 0, void 0, function* () {
4113
+ return pe(this, void 0, void 0, function* () {
4114
4114
  console.warn("AnamClient: streamToVideoAndAudioElements is deprecated. To avoid possible audio issues, please use streamToVideoElement instead."), yield this.streamToVideoElement(e, n);
4115
4115
  });
4116
4116
  }
4117
4117
  streamToVideoElement(e, i) {
4118
- return fe(this, void 0, void 0, function* () {
4118
+ return pe(this, void 0, void 0, function* () {
4119
4119
  var n;
4120
4120
  const a = this.startConnectionAttempt();
4121
4121
  !((n = this.clientOptions) === null || n === void 0) && n.disableInputAudio && i && console.warn("AnamClient: Input audio is disabled. User-provided audio stream will be ignored.");
@@ -4148,7 +4148,7 @@ class Mr {
4148
4148
  * @throws Error if session is not started or not currently streaming
4149
4149
  */
4150
4150
  talk(e) {
4151
- return fe(this, void 0, void 0, function* () {
4151
+ return pe(this, void 0, void 0, function* () {
4152
4152
  if (!this.streamingClient)
4153
4153
  throw new Error("Failed to send talk command: session is not started. Have you called startSession?");
4154
4154
  if (!this._isStreaming)
@@ -4221,8 +4221,8 @@ class Mr {
4221
4221
  this.sendDataMessage(n);
4222
4222
  }
4223
4223
  stopStreaming() {
4224
- return fe(this, void 0, void 0, function* () {
4225
- this.streamingClient && (this.publicEventEmitter.emit(O.CONNECTION_CLOSED, Ee.NORMAL), this.toolCallManager.clearSessionState(), yield this.streamingClient.stopConnection(), this.streamingClient = null, this.sessionId = null, Fe({
4224
+ return pe(this, void 0, void 0, function* () {
4225
+ this.streamingClient && (this.publicEventEmitter.emit(O.CONNECTION_CLOSED, de.NORMAL), this.toolCallManager.clearSessionState(), yield this.streamingClient.stopConnection(), this.streamingClient = null, this.sessionId = null, Fe({
4226
4226
  attemptCorrelationId: null,
4227
4227
  sessionId: null,
4228
4228
  organizationId: this.organizationId
@@ -4251,7 +4251,7 @@ class Mr {
4251
4251
  return !((e = this.clientOptions) === null || e === void 0) && e.disableInputAudio && console.warn("AnamClient: Input audio is disabled. Unmuting input audio will have no effect."), this.streamingClient && !(!((i = this.clientOptions) === null || i === void 0) && i.disableInputAudio) ? this.inputAudioState = this.streamingClient.unmuteInputAudio() : this.inputAudioState = Object.assign(Object.assign({}, this.inputAudioState), { isMuted: !1 }), this.inputAudioState;
4252
4252
  }
4253
4253
  changeAudioInputDevice(e) {
4254
- return fe(this, void 0, void 0, function* () {
4254
+ return pe(this, void 0, void 0, function* () {
4255
4255
  var i;
4256
4256
  if (!((i = this.clientOptions) === null || i === void 0) && i.disableInputAudio)
4257
4257
  throw new Error("AnamClient: Cannot change audio input device because input audio is disabled.");
@@ -4294,8 +4294,8 @@ const Oe = (t) => t instanceof V ? {
4294
4294
  errorName: t.name,
4295
4295
  errorCode: t.code,
4296
4296
  httpStatusCode: t.statusCode
4297
- } : t instanceof Error ? { errorName: t.name } : {}, Dr = (t, e) => new Mr(t, void 0, e), Ei = 80;
4298
- function Ur(t) {
4297
+ } : t instanceof Error ? { errorName: t.name } : {}, Ur = (t, e) => new Dr(t, void 0, e), Ei = 80;
4298
+ function Pr(t) {
4299
4299
  if (typeof t.url != "string" || !t.url.trim()) return null;
4300
4300
  let e;
4301
4301
  try {
@@ -4310,14 +4310,14 @@ function Ur(t) {
4310
4310
  }
4311
4311
  const vi = {
4312
4312
  anam_show_link: (t) => {
4313
- const e = Ur(t);
4313
+ const e = Pr(t);
4314
4314
  return e ? { kind: "link", data: e } : null;
4315
4315
  }
4316
4316
  };
4317
4317
  function Ci(t) {
4318
4318
  return typeof t == "object" && t !== null && !Array.isArray(t);
4319
4319
  }
4320
- function Pr(t, e, i) {
4320
+ function Br(t, e, i) {
4321
4321
  if (!Object.prototype.hasOwnProperty.call(vi, t))
4322
4322
  return null;
4323
4323
  const n = vi[t];
@@ -4342,11 +4342,11 @@ function Pr(t, e, i) {
4342
4342
  return null;
4343
4343
  }
4344
4344
  }
4345
- const Br = () => /* @__PURE__ */ C("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", children: [
4345
+ const Fr = () => /* @__PURE__ */ C("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", children: [
4346
4346
  /* @__PURE__ */ C("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
4347
4347
  /* @__PURE__ */ C("path", { d: "M15 3h6v6" }),
4348
4348
  /* @__PURE__ */ C("path", { d: "M10 14L21 3" })
4349
- ] }), Fr = ({ data: t }) => /* @__PURE__ */ C(
4349
+ ] }), $r = ({ data: t }) => /* @__PURE__ */ C(
4350
4350
  "a",
4351
4351
  {
4352
4352
  class: "anam-transcript-block-link",
@@ -4358,14 +4358,14 @@ const Br = () => /* @__PURE__ */ C("svg", { width: "14", height: "14", viewBox:
4358
4358
  /* @__PURE__ */ C("span", { class: "anam-transcript-block-link-label", children: t.label }),
4359
4359
  /* @__PURE__ */ C("span", { class: "anam-transcript-block-link-host", children: t.host })
4360
4360
  ] }),
4361
- /* @__PURE__ */ C(Br, {})
4361
+ /* @__PURE__ */ C(Fr, {})
4362
4362
  ]
4363
4363
  }
4364
- ), $r = {
4365
- link: (t) => /* @__PURE__ */ C(Fr, { data: t })
4364
+ ), Vr = {
4365
+ link: (t) => /* @__PURE__ */ C($r, { data: t })
4366
4366
  };
4367
- function Vr(t) {
4368
- return $r[t.kind](t.data);
4367
+ function Wr(t) {
4368
+ return Vr[t.kind](t.data);
4369
4369
  }
4370
4370
  const ee = {
4371
4371
  SESSION_STARTED: "anam-agent:session-started",
@@ -4382,8 +4382,8 @@ const ee = {
4382
4382
  TOOL_CALL_STARTED: "anam-agent:tool-call-started",
4383
4383
  TOOL_CALL_COMPLETED: "anam-agent:tool-call-completed",
4384
4384
  TOOL_CALL_FAILED: "anam-agent:tool-call-failed"
4385
- }, Wr = "https://api.anam.ai";
4386
- function hn(t) {
4385
+ }, jr = "https://api.anam.ai";
4386
+ function fn(t) {
4387
4387
  return /^[a-zA-Z0-9_-]{1,128}$/.test(t);
4388
4388
  }
4389
4389
  function Si(t) {
@@ -4394,42 +4394,46 @@ function Si(t) {
4394
4394
  return {};
4395
4395
  }
4396
4396
  }
4397
- function jr(t, e) {
4397
+ function Gr(t, e) {
4398
4398
  return e === 401 || e === 403 ? "This agent is not authorized. Check your agent ID." : e === 404 ? "Agent not found. Check your agent ID." : e === 429 ? "Too many requests. Please wait a moment." : e && e >= 500 ? "Server error. Please try again later." : t instanceof TypeError && t.message === "Failed to fetch" ? "Unable to connect. Check your network connection." : t instanceof Error && t.message.length < 80 ? t.message : "Something went wrong. Please try again.";
4399
4399
  }
4400
- function Gr() {
4400
+ function Ti(t, e) {
4401
+ return t === de.SERVER_CLOSED_CONNECTION && e?.startsWith("Session reached max duration of ") === !0;
4402
+ }
4403
+ function Hr() {
4401
4404
  return {
4402
- client: q(null),
4403
- connectionStatus: q("idle"),
4404
- isStreaming: q(!1),
4405
- isMuted: q(!1),
4406
- messages: q([]),
4405
+ client: z(null),
4406
+ connectionStatus: z("idle"),
4407
+ isStreaming: z(!1),
4408
+ isMuted: z(!1),
4409
+ messages: z([]),
4407
4410
  messageTimes: /* @__PURE__ */ new Map(),
4408
4411
  pendingSent: [],
4409
4412
  messageSeq: /* @__PURE__ */ new Map(),
4410
4413
  seqCounter: 0,
4411
4414
  localIdCounter: 0,
4412
- toolBlocks: q([]),
4415
+ toolBlocks: z([]),
4413
4416
  seenToolCallIds: /* @__PURE__ */ new Set(),
4414
- caption: q(null),
4417
+ caption: z(null),
4415
4418
  captionTimer: null,
4416
- sentCaption: q(null),
4419
+ sentCaption: z(null),
4417
4420
  sentCaptionTimer: null,
4418
- error: q(null),
4419
- sessionId: q(null),
4420
- avatarThumbnailUrl: q(null),
4421
- avatarVideoUrl: q(null),
4422
- personaName: q(null),
4423
- serverConfig: q(null),
4424
- isConfigured: q(!1),
4425
- isReady: q(!1),
4421
+ error: z(null),
4422
+ timeLimitReached: z(!1),
4423
+ sessionId: z(null),
4424
+ avatarThumbnailUrl: z(null),
4425
+ avatarVideoUrl: z(null),
4426
+ personaName: z(null),
4427
+ serverConfig: z(null),
4428
+ isConfigured: z(!1),
4429
+ isReady: z(!1),
4426
4430
  generation: 0,
4427
4431
  stopAttempt: null,
4428
4432
  prevMessageCount: 0,
4429
4433
  dispatch: null
4430
4434
  };
4431
4435
  }
4432
- function Hr(t, e) {
4436
+ function zr(t, e) {
4433
4437
  for (const n of e) {
4434
4438
  if (t.messageSeq.has(n.id)) continue;
4435
4439
  const a = n.role === ve.USER ? t.pendingSent.findIndex((s) => s.content === n.content) : -1;
@@ -4447,8 +4451,8 @@ function Hr(t, e) {
4447
4451
  function Vt(t) {
4448
4452
  t.messages.value = [], t.messageTimes.clear(), t.pendingSent = [], t.messageSeq.clear(), t.toolBlocks.value = [], t.seenToolCallIds.clear(), t.prevMessageCount = 0;
4449
4453
  }
4450
- async function zr(t, e, i) {
4451
- if (t.isReady.value = !1, !hn(e)) {
4454
+ async function qr(t, e, i) {
4455
+ if (t.isReady.value = !1, !fn(e)) {
4452
4456
  console.error("[AnamWidget] Invalid agent ID format:", e);
4453
4457
  return;
4454
4458
  }
@@ -4465,11 +4469,11 @@ async function zr(t, e, i) {
4465
4469
  console.error("[AnamWidget] Failed to load widget config:", n);
4466
4470
  }
4467
4471
  }
4468
- async function qr(t, e, i, n, a) {
4472
+ async function Yr(t, e, i, n, a) {
4469
4473
  if (t.connectionStatus.value === "connecting" || t.connectionStatus.value === "connected")
4470
4474
  return;
4471
4475
  const s = ++t.generation;
4472
- Vt(t), t.connectionStatus.value = "connecting", t.error.value = null;
4476
+ Vt(t), t.connectionStatus.value = "connecting", t.error.value = null, t.timeLimitReached.value = !1;
4473
4477
  let c, l = null, m = "", f = !1, p = null, u, y;
4474
4478
  const E = new AbortController(), T = () => {
4475
4479
  clearInterval(u), clearTimeout(y), u = void 0;
@@ -4514,7 +4518,7 @@ async function qr(t, e, i, n, a) {
4514
4518
  if (a)
4515
4519
  m = a;
4516
4520
  else {
4517
- if (!hn(e))
4521
+ if (!fn(e))
4518
4522
  throw new Error("Invalid agent ID format");
4519
4523
  const S = await fetch(`${i}/v1/auth/widget`, {
4520
4524
  method: "POST",
@@ -4530,7 +4534,7 @@ async function qr(t, e, i, n, a) {
4530
4534
  m = (await S.json()).sessionToken;
4531
4535
  }
4532
4536
  if (s !== t.generation) return;
4533
- const b = Dr(m, {
4537
+ const b = Ur(m, {
4534
4538
  api: i ? { baseUrl: i } : void 0,
4535
4539
  metrics: { disableClientMetrics: !0 }
4536
4540
  });
@@ -4539,17 +4543,17 @@ async function qr(t, e, i, n, a) {
4539
4543
  }), b.addListener(O.AUDIO_STREAM_STARTED, () => {
4540
4544
  }), b.addListener(O.MESSAGE_HISTORY_UPDATED, (S) => {
4541
4545
  if (s !== t.generation) return;
4542
- for (let z = t.prevMessageCount; z < S.length; z++) {
4543
- const Y = S[z];
4546
+ for (let q = t.prevMessageCount; q < S.length; q++) {
4547
+ const Y = S[q];
4544
4548
  t.dispatch?.(ee.MESSAGE_RECEIVED, {
4545
4549
  role: Y.role === "persona" ? "agent" : "user",
4546
4550
  content: Y.content
4547
4551
  });
4548
4552
  }
4549
4553
  t.prevMessageCount = S.length;
4550
- const k = Hr(t, S), U = (/* @__PURE__ */ new Date()).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
4551
- for (const z of k)
4552
- t.messageTimes.has(z.id) || t.messageTimes.set(z.id, U);
4554
+ const k = zr(t, S), U = (/* @__PURE__ */ new Date()).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
4555
+ for (const q of k)
4556
+ t.messageTimes.has(q.id) || t.messageTimes.set(q.id, U);
4553
4557
  t.messages.value = k;
4554
4558
  }), b.addListener(O.MESSAGE_STREAM_EVENT_RECEIVED, (S) => {
4555
4559
  if (s !== t.generation) return;
@@ -4567,7 +4571,7 @@ async function qr(t, e, i, n, a) {
4567
4571
  toolSubtype: S.toolSubtype,
4568
4572
  arguments: S.arguments
4569
4573
  });
4570
- const k = Pr(S.toolName, S.toolCallId, S.arguments);
4574
+ const k = Br(S.toolName, S.toolCallId, S.arguments);
4571
4575
  k && !t.seenToolCallIds.has(S.toolCallId) && (t.seenToolCallIds.add(S.toolCallId), t.messageSeq.set(k.id, t.seqCounter++), t.messageTimes.set(k.id, (/* @__PURE__ */ new Date()).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })), t.toolBlocks.value = [...t.toolBlocks.value, k]);
4572
4576
  }), b.addListener(O.TOOL_CALL_COMPLETED, (S) => {
4573
4577
  s === t.generation && t.dispatch?.(ee.TOOL_CALL_COMPLETED, {
@@ -4590,12 +4594,12 @@ async function qr(t, e, i, n, a) {
4590
4594
  });
4591
4595
  }), b.addListener(O.CONNECTION_CLOSED, (S, k) => {
4592
4596
  if (s !== t.generation) return;
4593
- if (!t.isStreaming.value) {
4597
+ if (!t.isStreaming.value && !Ti(S, k)) {
4594
4598
  A("The connection ended before playback. Please try again.");
4595
4599
  return;
4596
4600
  }
4597
4601
  const U = t.sessionId.value;
4598
- t.generation++, t.stopAttempt = null, w(), t.client.value = null, t.connectionStatus.value = "idle", t.isStreaming.value = !1, t.sessionId.value = null, t.dispatch?.(ee.SESSION_ENDED, {
4602
+ t.generation++, t.stopAttempt = null, w(), t.client.value = null, t.connectionStatus.value = "idle", t.isStreaming.value = !1, t.sessionId.value = null, t.timeLimitReached.value = Ti(S, k), t.dispatch?.(ee.SESSION_ENDED, {
4599
4603
  sessionId: U ?? "",
4600
4604
  reason: k ?? S
4601
4605
  });
@@ -4619,19 +4623,19 @@ async function qr(t, e, i, n, a) {
4619
4623
  w();
4620
4624
  return;
4621
4625
  }
4622
- A(jr(b, c), c ? `HTTP_${c}` : "SESSION_ERROR");
4626
+ A(Gr(b, c), c ? `HTTP_${c}` : "SESSION_ERROR");
4623
4627
  }
4624
4628
  }
4625
- async function Yr(t) {
4629
+ async function Kr(t) {
4626
4630
  const e = t.sessionId.value, i = t.connectionStatus.value !== "idle";
4627
4631
  t.generation++;
4628
4632
  const n = t.stopAttempt;
4629
- t.stopAttempt = null, t.client.value = null, t.connectionStatus.value = "idle", t.isStreaming.value = !1, t.isMuted.value = !1, Vt(t), t.captionTimer && clearTimeout(t.captionTimer), t.captionTimer = null, t.caption.value = null, t.sentCaptionTimer && clearTimeout(t.sentCaptionTimer), t.sentCaptionTimer = null, t.sentCaption.value = null, t.sessionId.value = null, n?.(), i && t.dispatch?.(ee.SESSION_ENDED, {
4633
+ t.stopAttempt = null, t.client.value = null, t.connectionStatus.value = "idle", t.isStreaming.value = !1, t.isMuted.value = !1, Vt(t), t.captionTimer && clearTimeout(t.captionTimer), t.captionTimer = null, t.caption.value = null, t.sentCaptionTimer && clearTimeout(t.sentCaptionTimer), t.sentCaptionTimer = null, t.sentCaption.value = null, t.sessionId.value = null, t.timeLimitReached.value = !1, n?.(), i && t.dispatch?.(ee.SESSION_ENDED, {
4630
4634
  sessionId: e ?? "",
4631
4635
  reason: "USER_ENDED"
4632
4636
  });
4633
4637
  }
4634
- function Kr(t, e) {
4638
+ function Jr(t, e) {
4635
4639
  if (!t.client.value || t.connectionStatus.value !== "connected") return;
4636
4640
  t.client.value.sendUserMessage(e);
4637
4641
  const i = {
@@ -4643,20 +4647,20 @@ function Kr(t, e) {
4643
4647
  t.sentCaption.value = null, t.sentCaptionTimer = null;
4644
4648
  }, 4e3), t.dispatch?.(ee.MESSAGE_SENT, { content: e });
4645
4649
  }
4646
- function Jr(t) {
4650
+ function Xr(t) {
4647
4651
  t.client.value && (t.isMuted.value ? (t.client.value.unmuteInputAudio(), t.isMuted.value = !1, t.dispatch?.(ee.MIC_UNMUTED, {})) : (t.client.value.muteInputAudio(), t.isMuted.value = !0, t.dispatch?.(ee.MIC_MUTED, {})));
4648
4652
  }
4649
- function Xr(t) {
4650
- t.generation++, t.stopAttempt?.(), t.stopAttempt = null, t.client.value = null, t.connectionStatus.value = "idle", t.isStreaming.value = !1, t.isMuted.value = !1, Vt(t), t.captionTimer && clearTimeout(t.captionTimer), t.captionTimer = null, t.caption.value = null, t.sentCaptionTimer && clearTimeout(t.sentCaptionTimer), t.sentCaptionTimer = null, t.sentCaption.value = null, t.error.value = null, t.sessionId.value = null, t.avatarThumbnailUrl.value = null, t.avatarVideoUrl.value = null, t.personaName.value = null, t.serverConfig.value = null;
4653
+ function Zr(t) {
4654
+ t.generation++, t.stopAttempt?.(), t.stopAttempt = null, t.client.value = null, t.connectionStatus.value = "idle", t.isStreaming.value = !1, t.isMuted.value = !1, Vt(t), t.captionTimer && clearTimeout(t.captionTimer), t.captionTimer = null, t.caption.value = null, t.sentCaptionTimer && clearTimeout(t.sentCaptionTimer), t.sentCaptionTimer = null, t.sentCaption.value = null, t.error.value = null, t.timeLimitReached.value = !1, t.sessionId.value = null, t.avatarThumbnailUrl.value = null, t.avatarVideoUrl.value = null, t.personaName.value = null, t.serverConfig.value = null;
4651
4655
  }
4652
- function Zr(t, e, i, n) {
4656
+ function Qr(t, e, i, n) {
4653
4657
  const a = Ye();
4654
- a.current || (a.current = Gr());
4658
+ a.current || (a.current = Hr());
4655
4659
  const s = a.current;
4656
4660
  s.dispatch = n ?? null;
4657
4661
  const c = t || (i ? Si(i).personaId : void 0), l = !!c || !!i;
4658
4662
  s.isConfigured.value !== l && (s.isConfigured.value = l);
4659
- const m = e || Wr;
4663
+ const m = e || jr;
4660
4664
  return {
4661
4665
  connectionStatus: s.connectionStatus,
4662
4666
  isStreaming: s.isStreaming,
@@ -4668,6 +4672,7 @@ function Zr(t, e, i, n) {
4668
4672
  caption: s.caption,
4669
4673
  sentCaption: s.sentCaption,
4670
4674
  error: s.error,
4675
+ timeLimitReached: s.timeLimitReached,
4671
4676
  sessionId: s.sessionId,
4672
4677
  isConfigured: s.isConfigured,
4673
4678
  isReady: s.isReady,
@@ -4677,7 +4682,7 @@ function Zr(t, e, i, n) {
4677
4682
  serverConfig: s.serverConfig,
4678
4683
  fetchWidgetConfig: () => {
4679
4684
  if (c) {
4680
- zr(s, c, m);
4685
+ qr(s, c, m);
4681
4686
  return;
4682
4687
  }
4683
4688
  if (i) {
@@ -4687,14 +4692,14 @@ function Zr(t, e, i, n) {
4687
4692
  }
4688
4693
  s.isReady.value = !0;
4689
4694
  },
4690
- startSession: (f) => !c && !i ? (s.error.value = "No agent ID or session token configured", Promise.resolve()) : qr(s, c || "", m, f, i),
4691
- stopSession: () => Yr(s),
4692
- sendMessage: (f) => Kr(s, f),
4693
- toggleMute: () => Jr(s),
4694
- cleanup: () => Xr(s)
4695
+ startSession: (f) => !c && !i ? (s.error.value = "No agent ID or session token configured", Promise.resolve()) : Yr(s, c || "", m, f, i),
4696
+ stopSession: () => Kr(s),
4697
+ sendMessage: (f) => Jr(s, f),
4698
+ toggleMute: () => Xr(s),
4699
+ cleanup: () => Zr(s)
4695
4700
  };
4696
4701
  }
4697
- function Qr(t, e, i) {
4702
+ function eo(t, e, i) {
4698
4703
  t.dispatchEvent(
4699
4704
  new CustomEvent(e, {
4700
4705
  bubbles: !0,
@@ -4703,8 +4708,8 @@ function Qr(t, e, i) {
4703
4708
  })
4704
4709
  );
4705
4710
  }
4706
- const eo = '@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-outline-style:solid}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.block{display:block}.flex{display:flex}.inline{display:inline}.flex-shrink{flex-shrink:1}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.border{border-style:var(--tw-border-style);border-width:1px}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}}:host{--anam-trigger-size:80px;--anam-sheet-width:400px;--anam-sheet-height:640px;all:initial;color:#18181b;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:DM Sans,system-ui,-apple-system,sans-serif;font-size:15px;line-height:1.5}@media(max-width:640px){:host{--anam-trigger-size:72px;--anam-sheet-width: calc(100vw - 24px) ;--anam-sheet-height: calc(100dvh - 100px) }}.anam-widget{z-index:9999;font-family:inherit}.anam-widget[data-layout=floating]{position:fixed}.anam-widget[data-layout=inline]{position:relative}.anam-trigger{width:var(--anam-trigger-size);height:var(--anam-trigger-size);cursor:pointer;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;padding:0;transition:all .25s cubic-bezier(.4,0,.2,1);display:flex;overflow:hidden;box-shadow:0 2px 8px #00000014,0 8px 24px -4px #0000002e}.anam-trigger:hover{transform:scale(1.06);box-shadow:0 4px 12px #0000001a,0 12px 32px -4px #00000040}.anam-trigger:active{transform:scale(.97)}.anam-trigger img{object-fit:cover;width:100%;height:100%;display:block}.anam-sheet{width:var(--anam-sheet-width);max-height:var(--anam-sheet-height);border-radius:8px;flex-direction:column;animation:.25s cubic-bezier(.16,1,.3,1) sheetIn;display:flex;position:relative;overflow:hidden;box-shadow:0 32px 64px -16px #00000040,0 0 0 1px #00000014}.anam-sheet[data-orientation=portrait]{flex-direction:row;align-items:stretch;width:auto}.anam-widget[data-layout=inline] .anam-sheet{border-radius:8px;width:100%;max-height:none;animation:none}@keyframes sheetIn{0%{opacity:0;transform:translateY(8px)scale(.97)}to{opacity:1;transform:translateY(0)scale(1)}}.anam-video-region{aspect-ratio:3/2;background:#000;flex:none;width:100%;position:relative;overflow:hidden}.anam-sheet[data-orientation=portrait] .anam-video-region{aspect-ratio:2/3;width:auto;height:min(540px,var(--anam-sheet-height))}.anam-sheet[data-orientation=landscape] .anam-video-region{z-index:1;box-shadow:0 4px 10px #00000029}.anam-video{object-fit:cover;background:#000;width:100%;height:100%;display:block;position:absolute;inset:0}.anam-video[data-hidden=true]{visibility:hidden}.anam-overlay-idle{z-index:2;position:absolute;inset:0}.anam-overlay-idle img{object-fit:cover;width:100%;height:100%;display:block}.anam-preview-video{object-fit:cover;z-index:1;width:100%;height:100%;display:block;position:absolute;inset:0}.anam-preview-fallback{z-index:0;position:absolute;inset:0}.anam-overlay-idle .anam-scrim{z-index:1}.anam-cta-pill{z-index:2;box-sizing:border-box;-webkit-backdrop-filter:blur(18px);color:#ffffffeb;letter-spacing:-.01em;cursor:pointer;white-space:nowrap;background:#ffffff1a;border:1.4px solid #ffffff38;border-radius:999px;justify-content:center;align-items:center;gap:10px;padding:12px 26px;font-family:inherit;font-size:17px;font-weight:600;transition:all .2s;display:flex;position:absolute;bottom:20px;left:50%;transform:translate(-50%);box-shadow:0 16px 38px #0000002e}.anam-cta-pill:hover{background:#ffffff29;transform:translate(-50%)scale(1.03)}.anam-cta-pill:active{transform:translate(-50%)scale(.98)}.anam-cta-pill svg{flex-shrink:0;transform:translateY(-1px)}.anam-overlay-unconfigured{z-index:2;background:#111;flex-direction:column;justify-content:center;align-items:center;gap:16px;display:flex;position:absolute;inset:0}.anam-overlay-unconfigured span{color:#ffffff59;letter-spacing:-.01em;font-size:14px;font-weight:400}.anam-overlay-loading{z-index:3;background:#000;flex-direction:column;justify-content:center;align-items:center;gap:20px;display:flex;position:absolute;inset:0}.anam-overlay-loading span{color:#fffc;letter-spacing:-.01em;font-size:15px;font-weight:400}.anam-overlay-error{z-index:3;background:#000;flex-direction:column;justify-content:center;align-items:center;gap:16px;display:flex;position:absolute;inset:0}.anam-overlay-error-text{color:#fff9;text-align:center;max-width:260px;font-size:14px;line-height:1.5}.anam-overlay-error .anam-retry-btn{box-sizing:border-box;-webkit-backdrop-filter:blur(18px);color:#ffffffeb;cursor:pointer;background:#ffffff1a;border:1.4px solid #ffffff38;border-radius:999px;padding:10px 24px;font-family:inherit;font-size:14px;font-weight:500;transition:background .15s;box-shadow:0 16px 38px #0000002e}.anam-overlay-error .anam-retry-btn:hover{background:#ffffff29}.anam-spinner{border:2.5px solid #ffffff1f;border-top-color:#fff;border-radius:50%;width:32px;height:32px;animation:.75s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.anam-close-btn{z-index:10;box-sizing:border-box;-webkit-backdrop-filter:blur(18px);color:#ffffffbd;cursor:pointer;background:#ffffff1a;border:1.4px solid #ffffff38;border-radius:999px;justify-content:center;align-items:center;width:32px;height:32px;padding:0;transition:background .15s,color .15s;display:flex;position:absolute;top:12px;right:12px;box-shadow:0 16px 38px #0000002e}.anam-close-btn:hover{color:#ffffffeb;background:#ffffff24}.anam-scrim{z-index:8;pointer-events:none;background:linear-gradient(#0000,#00000040 40%,#0000008c);height:42%;position:absolute;bottom:0;left:0;right:0}.anam-captions{z-index:9;pointer-events:none;color:#fffffff2;letter-spacing:-.01em;text-shadow:0 1px 4px #00000073;-webkit-line-clamp:3;-webkit-box-orient:vertical;font-size:15px;line-height:1.4;display:-webkit-box;position:absolute;bottom:72px;left:18px;right:18px;overflow:hidden}.anam-captions-agent{text-align:left}.anam-captions-user{text-align:right}.anam-control-bar{z-index:10;background:0 0;justify-content:center;align-items:center;gap:10px;padding:0;display:flex;position:absolute;bottom:14px;left:14px;right:14px}.anam-ctl-btn{box-sizing:border-box;-webkit-backdrop-filter:blur(18px);color:#ffffffbd;cursor:pointer;background:#ffffff1a;border:1.4px solid #ffffff38;border-radius:999px;flex-shrink:0;justify-content:center;align-items:center;width:44px;height:44px;padding:0;transition:background .15s,color .15s;display:flex;box-shadow:0 16px 38px #0000002e}.anam-ctl-btn:hover{color:#ffffffeb;background:#ffffff24}.anam-ctl-btn:disabled{opacity:.38;cursor:not-allowed}.anam-ctl-input-wrap{flex:1;align-items:center;min-width:0;display:flex;position:relative}.anam-ctl-input{box-sizing:border-box;-webkit-backdrop-filter:blur(18px);color:#ffffffeb;background:#ffffff1a;border:1.4px solid #ffffff38;border-radius:999px;outline:none;width:100%;height:44px;padding:0 54px 0 18px;font-family:inherit;font-size:15px;transition:background .15s,border-color .15s;box-shadow:0 18px 42px #0000002e}.anam-ctl-input::placeholder{color:#fff6}.anam-ctl-input:focus{background:#ffffff24;border-color:#ffffff47}.anam-ctl-input:disabled{opacity:.38;cursor:not-allowed}.anam-ctl-send{color:#fff6;cursor:pointer;background:0 0;border:none;border-radius:999px;justify-content:center;align-items:center;width:32px;height:32px;padding:0;transition:color .15s;display:flex;position:absolute;right:8px}.anam-ctl-send:not(:disabled){color:#ffffffbd}.anam-ctl-send:not(:disabled):hover{color:#ffffffeb}.anam-ctl-send:disabled{cursor:not-allowed;opacity:.38}@media(max-width:640px){.anam-control-bar{gap:8px}.anam-ctl-input{padding:0 50px 0 14px;font-size:16px}}.anam-transcript-pane{background:#f7f5f2;flex-direction:column;flex:none;height:0;transition:height .35s cubic-bezier(.32,.72,.33,1);display:flex;overflow:hidden}.anam-sheet[data-transcript=open] .anam-transcript-pane{height:min(320px,45dvh)}.anam-transcript-toggle svg{transition:transform .3s}.anam-sheet[data-transcript=open] .anam-transcript-toggle svg{transform:rotate(180deg)}.anam-transcript-rail{background:#f7f5f2;border-right:1px solid #eae5dd;flex:none;width:0;transition:width .35s cubic-bezier(.32,.72,.33,1);overflow:hidden}.anam-sheet[data-transcript=open] .anam-transcript-rail{width:300px}.anam-transcript-rail-inner{flex-direction:column;width:300px;height:100%;display:flex}.anam-transcript-head{border-bottom:1px solid #eae5dd;flex:none;justify-content:space-between;align-items:center;padding:14px 14px 10px 18px;display:flex}.anam-transcript-title{letter-spacing:.14em;text-transform:uppercase;color:#8a8378;font-size:10px;font-weight:700}.anam-transcript-collapse{color:#9a9285;cursor:pointer;background:0 0;border:none;padding:4px;transition:color .15s;display:flex}.anam-transcript-collapse:hover{color:#4a4239}.anam-transcript-tab{z-index:10;box-sizing:border-box;-webkit-backdrop-filter:blur(18px);color:#ffffffbd;cursor:pointer;background:#ffffff1a;border:1.4px solid #ffffff38;border-left:none;border-radius:0 10px 10px 0;justify-content:center;align-items:center;width:24px;height:84px;padding:0;transition:background .15s;display:flex;position:absolute;top:50%;left:0;transform:translateY(-50%);box-shadow:0 16px 38px #0000002e}.anam-transcript-tab:hover{color:#ffffffeb;background:#ffffff24}.anam-transcript-rows{overscroll-behavior:contain;flex:1;min-height:0;padding:10px 18px 8px 22px;overflow-y:auto}.anam-transcript-empty{color:#b0a89b;padding:14px 0;font-size:12.5px}.anam-transcript-row{border-left:2px solid #e3ded6;padding:10px 0 10px 16px;position:relative}.anam-transcript-row:last-child{border-left-color:#ff6200}.anam-transcript-meta{align-items:baseline;gap:8px;margin-bottom:3px;display:flex}.anam-transcript-role{letter-spacing:.1em;text-transform:uppercase;color:#6b7280;font-size:9.5px;font-weight:700}.anam-transcript-row-agent .anam-transcript-role{color:#ff6200}.anam-transcript-time{color:#b4aca0;font-variant-numeric:tabular-nums;font-size:9.5px}.anam-transcript-text{color:#33383f;overflow-wrap:anywhere;font-size:12.5px;line-height:1.5}.anam-transcript-row-user .anam-transcript-text{color:#5a616b}.anam-transcript-block-link{color:#33383f;background:#fff;border:1px solid #e2dcd2;border-radius:10px;justify-content:space-between;align-items:center;gap:10px;margin-top:2px;padding:8px 12px;text-decoration:none;transition:border-color .15s,background .15s;display:flex}.anam-transcript-block-link:hover{background:#fffaf6;border-color:#ff6200}.anam-transcript-block-link-text{flex-direction:column;gap:1px;min-width:0;display:flex}.anam-transcript-block-link-label{color:#33383f;overflow-wrap:anywhere;font-size:12.5px;font-weight:600;line-height:1.4}.anam-transcript-block-link-host{color:#b4aca0;text-overflow:ellipsis;white-space:nowrap;font-size:9.5px;overflow:hidden}.anam-transcript-block-link svg{color:#b4aca0;flex:none}.anam-transcript-block-link:hover svg{color:#ff6200}.anam-transcript-footer{flex:none;padding:8px 12px 12px;display:flex}.anam-transcript-footer .anam-control-bar{width:100%;position:static}.anam-transcript-footer .anam-ctl-btn{-webkit-backdrop-filter:none;box-shadow:none;color:#6b6257;background:#fff;border:1px solid #e2dcd2}.anam-transcript-footer .anam-ctl-btn:hover{color:#4a4239;background:#faf8f5}.anam-transcript-footer .anam-ctl-input{-webkit-backdrop-filter:none;box-shadow:none;color:#33383f;background:#fff;border:1px solid #e2dcd2}.anam-transcript-footer .anam-ctl-input::placeholder{color:#b0a89b}.anam-transcript-footer .anam-ctl-input:focus{background:#fff;border-color:#d0c8ba}.anam-transcript-footer .anam-ctl-send,.anam-transcript-footer .anam-ctl-send:not(:disabled){color:#b0a89b}.anam-transcript-footer .anam-ctl-send:not(:disabled):hover{color:#4a4239}.anam-watermark{z-index:11;opacity:.5;line-height:0;text-decoration:none;transition:opacity .15s;position:absolute;top:16px;left:16px}.anam-watermark:hover{opacity:.8}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}';
4707
- class to extends Ne {
4711
+ const to = '@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-outline-style:solid}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.block{display:block}.flex{display:flex}.inline{display:inline}.flex-shrink{flex-shrink:1}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.border{border-style:var(--tw-border-style);border-width:1px}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}}:host{--anam-trigger-size:80px;--anam-sheet-width:400px;--anam-sheet-height:640px;all:initial;color:#18181b;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:DM Sans,system-ui,-apple-system,sans-serif;font-size:15px;line-height:1.5}@media(max-width:640px){:host{--anam-trigger-size:72px;--anam-sheet-width: calc(100vw - 24px) ;--anam-sheet-height: calc(100dvh - 100px) }}.anam-widget{z-index:9999;font-family:inherit}.anam-widget[data-layout=floating]{position:fixed}.anam-widget[data-layout=inline]{position:relative}.anam-trigger{width:var(--anam-trigger-size);height:var(--anam-trigger-size);cursor:pointer;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;padding:0;transition:all .25s cubic-bezier(.4,0,.2,1);display:flex;overflow:hidden;box-shadow:0 2px 8px #00000014,0 8px 24px -4px #0000002e}.anam-trigger:hover{transform:scale(1.06);box-shadow:0 4px 12px #0000001a,0 12px 32px -4px #00000040}.anam-trigger:active{transform:scale(.97)}.anam-trigger img{object-fit:cover;width:100%;height:100%;display:block}.anam-sheet{width:var(--anam-sheet-width);max-height:var(--anam-sheet-height);border-radius:8px;flex-direction:column;animation:.25s cubic-bezier(.16,1,.3,1) sheetIn;display:flex;position:relative;overflow:hidden;box-shadow:0 32px 64px -16px #00000040,0 0 0 1px #00000014}.anam-sheet[data-orientation=portrait]{flex-direction:row;align-items:stretch;width:auto}.anam-widget[data-layout=inline] .anam-sheet{border-radius:8px;width:100%;max-height:none;animation:none}@keyframes sheetIn{0%{opacity:0;transform:translateY(8px)scale(.97)}to{opacity:1;transform:translateY(0)scale(1)}}.anam-video-region{aspect-ratio:3/2;background:#000;flex:none;width:100%;position:relative;overflow:hidden}.anam-sheet[data-orientation=portrait] .anam-video-region{aspect-ratio:2/3;width:auto;height:min(540px,var(--anam-sheet-height))}.anam-sheet[data-orientation=landscape] .anam-video-region{z-index:1;box-shadow:0 4px 10px #00000029}.anam-video{object-fit:cover;background:#000;width:100%;height:100%;display:block;position:absolute;inset:0}.anam-video[data-hidden=true]{visibility:hidden}.anam-overlay-idle{z-index:2;position:absolute;inset:0}.anam-overlay-idle img{object-fit:cover;width:100%;height:100%;display:block}.anam-preview-video{object-fit:cover;z-index:1;width:100%;height:100%;display:block;position:absolute;inset:0}.anam-preview-fallback{z-index:0;position:absolute;inset:0}.anam-overlay-idle .anam-scrim{z-index:1}.anam-cta-pill{z-index:2;box-sizing:border-box;-webkit-backdrop-filter:blur(18px);color:#ffffffeb;letter-spacing:-.01em;cursor:pointer;white-space:nowrap;background:#ffffff1a;border:1.4px solid #ffffff38;border-radius:999px;justify-content:center;align-items:center;gap:10px;padding:12px 26px;font-family:inherit;font-size:17px;font-weight:600;transition:all .2s;display:flex;position:absolute;bottom:20px;left:50%;transform:translate(-50%);box-shadow:0 16px 38px #0000002e}.anam-cta-pill:hover{background:#ffffff29;transform:translate(-50%)scale(1.03)}.anam-cta-pill:active{transform:translate(-50%)scale(.98)}.anam-cta-pill svg{flex-shrink:0;transform:translateY(-1px)}.anam-ended-notice{z-index:2;box-sizing:border-box;color:#ffffffeb;text-align:center;background:#00000073;border-radius:999px;width:max-content;max-width:calc(100% - 32px);padding:6px 14px;font-size:14px;font-weight:500;position:absolute;bottom:84px;left:50%;transform:translate(-50%)}.anam-overlay-unconfigured{z-index:2;background:#111;flex-direction:column;justify-content:center;align-items:center;gap:16px;display:flex;position:absolute;inset:0}.anam-overlay-unconfigured span{color:#ffffff59;letter-spacing:-.01em;font-size:14px;font-weight:400}.anam-overlay-loading{z-index:3;background:#000;flex-direction:column;justify-content:center;align-items:center;gap:20px;display:flex;position:absolute;inset:0}.anam-overlay-loading span{color:#fffc;letter-spacing:-.01em;font-size:15px;font-weight:400}.anam-overlay-error{z-index:3;background:#000;flex-direction:column;justify-content:center;align-items:center;gap:16px;display:flex;position:absolute;inset:0}.anam-overlay-error-text{color:#fff9;text-align:center;max-width:260px;font-size:14px;line-height:1.5}.anam-overlay-error .anam-retry-btn{box-sizing:border-box;-webkit-backdrop-filter:blur(18px);color:#ffffffeb;cursor:pointer;background:#ffffff1a;border:1.4px solid #ffffff38;border-radius:999px;padding:10px 24px;font-family:inherit;font-size:14px;font-weight:500;transition:background .15s;box-shadow:0 16px 38px #0000002e}.anam-overlay-error .anam-retry-btn:hover{background:#ffffff29}.anam-spinner{border:2.5px solid #ffffff1f;border-top-color:#fff;border-radius:50%;width:32px;height:32px;animation:.75s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.anam-close-btn{z-index:10;box-sizing:border-box;-webkit-backdrop-filter:blur(18px);color:#ffffffbd;cursor:pointer;background:#ffffff1a;border:1.4px solid #ffffff38;border-radius:999px;justify-content:center;align-items:center;width:32px;height:32px;padding:0;transition:background .15s,color .15s;display:flex;position:absolute;top:12px;right:12px;box-shadow:0 16px 38px #0000002e}.anam-close-btn:hover{color:#ffffffeb;background:#ffffff24}.anam-scrim{z-index:8;pointer-events:none;background:linear-gradient(#0000,#00000040 40%,#0000008c);height:42%;position:absolute;bottom:0;left:0;right:0}.anam-captions{z-index:9;pointer-events:none;color:#fffffff2;letter-spacing:-.01em;text-shadow:0 1px 4px #00000073;-webkit-line-clamp:3;-webkit-box-orient:vertical;font-size:15px;line-height:1.4;display:-webkit-box;position:absolute;bottom:72px;left:18px;right:18px;overflow:hidden}.anam-captions-agent{text-align:left}.anam-captions-user{text-align:right}.anam-control-bar{z-index:10;background:0 0;justify-content:center;align-items:center;gap:10px;padding:0;display:flex;position:absolute;bottom:14px;left:14px;right:14px}.anam-ctl-btn{box-sizing:border-box;-webkit-backdrop-filter:blur(18px);color:#ffffffbd;cursor:pointer;background:#ffffff1a;border:1.4px solid #ffffff38;border-radius:999px;flex-shrink:0;justify-content:center;align-items:center;width:44px;height:44px;padding:0;transition:background .15s,color .15s;display:flex;box-shadow:0 16px 38px #0000002e}.anam-ctl-btn:hover{color:#ffffffeb;background:#ffffff24}.anam-ctl-btn:disabled{opacity:.38;cursor:not-allowed}.anam-ctl-input-wrap{flex:1;align-items:center;min-width:0;display:flex;position:relative}.anam-ctl-input{box-sizing:border-box;-webkit-backdrop-filter:blur(18px);color:#ffffffeb;background:#ffffff1a;border:1.4px solid #ffffff38;border-radius:999px;outline:none;width:100%;height:44px;padding:0 54px 0 18px;font-family:inherit;font-size:15px;transition:background .15s,border-color .15s;box-shadow:0 18px 42px #0000002e}.anam-ctl-input::placeholder{color:#fff6}.anam-ctl-input:focus{background:#ffffff24;border-color:#ffffff47}.anam-ctl-input:disabled{opacity:.38;cursor:not-allowed}.anam-ctl-send{color:#fff6;cursor:pointer;background:0 0;border:none;border-radius:999px;justify-content:center;align-items:center;width:32px;height:32px;padding:0;transition:color .15s;display:flex;position:absolute;right:8px}.anam-ctl-send:not(:disabled){color:#ffffffbd}.anam-ctl-send:not(:disabled):hover{color:#ffffffeb}.anam-ctl-send:disabled{cursor:not-allowed;opacity:.38}@media(max-width:640px){.anam-control-bar{gap:8px}.anam-ctl-input{padding:0 50px 0 14px;font-size:16px}}.anam-transcript-pane{background:#f7f5f2;flex-direction:column;flex:none;height:0;transition:height .35s cubic-bezier(.32,.72,.33,1);display:flex;overflow:hidden}.anam-sheet[data-transcript=open] .anam-transcript-pane{height:min(320px,45dvh)}.anam-transcript-toggle svg{transition:transform .3s}.anam-sheet[data-transcript=open] .anam-transcript-toggle svg{transform:rotate(180deg)}.anam-transcript-rail{background:#f7f5f2;border-right:1px solid #eae5dd;flex:none;width:0;transition:width .35s cubic-bezier(.32,.72,.33,1);overflow:hidden}.anam-sheet[data-transcript=open] .anam-transcript-rail{width:300px}.anam-transcript-rail-inner{flex-direction:column;width:300px;height:100%;display:flex}.anam-transcript-head{border-bottom:1px solid #eae5dd;flex:none;justify-content:space-between;align-items:center;padding:14px 14px 10px 18px;display:flex}.anam-transcript-title{letter-spacing:.14em;text-transform:uppercase;color:#8a8378;font-size:10px;font-weight:700}.anam-transcript-collapse{color:#9a9285;cursor:pointer;background:0 0;border:none;padding:4px;transition:color .15s;display:flex}.anam-transcript-collapse:hover{color:#4a4239}.anam-transcript-tab{z-index:10;box-sizing:border-box;-webkit-backdrop-filter:blur(18px);color:#ffffffbd;cursor:pointer;background:#ffffff1a;border:1.4px solid #ffffff38;border-left:none;border-radius:0 10px 10px 0;justify-content:center;align-items:center;width:24px;height:84px;padding:0;transition:background .15s;display:flex;position:absolute;top:50%;left:0;transform:translateY(-50%);box-shadow:0 16px 38px #0000002e}.anam-transcript-tab:hover{color:#ffffffeb;background:#ffffff24}.anam-transcript-rows{overscroll-behavior:contain;flex:1;min-height:0;padding:10px 18px 8px 22px;overflow-y:auto}.anam-transcript-empty{color:#b0a89b;padding:14px 0;font-size:12.5px}.anam-transcript-row{border-left:2px solid #e3ded6;padding:10px 0 10px 16px;position:relative}.anam-transcript-row:last-child{border-left-color:#ff6200}.anam-transcript-meta{align-items:baseline;gap:8px;margin-bottom:3px;display:flex}.anam-transcript-role{letter-spacing:.1em;text-transform:uppercase;color:#6b7280;font-size:9.5px;font-weight:700}.anam-transcript-row-agent .anam-transcript-role{color:#ff6200}.anam-transcript-time{color:#b4aca0;font-variant-numeric:tabular-nums;font-size:9.5px}.anam-transcript-text{color:#33383f;overflow-wrap:anywhere;font-size:12.5px;line-height:1.5}.anam-transcript-row-user .anam-transcript-text{color:#5a616b}.anam-transcript-block-link{color:#33383f;background:#fff;border:1px solid #e2dcd2;border-radius:10px;justify-content:space-between;align-items:center;gap:10px;margin-top:2px;padding:8px 12px;text-decoration:none;transition:border-color .15s,background .15s;display:flex}.anam-transcript-block-link:hover{background:#fffaf6;border-color:#ff6200}.anam-transcript-block-link-text{flex-direction:column;gap:1px;min-width:0;display:flex}.anam-transcript-block-link-label{color:#33383f;overflow-wrap:anywhere;font-size:12.5px;font-weight:600;line-height:1.4}.anam-transcript-block-link-host{color:#b4aca0;text-overflow:ellipsis;white-space:nowrap;font-size:9.5px;overflow:hidden}.anam-transcript-block-link svg{color:#b4aca0;flex:none}.anam-transcript-block-link:hover svg{color:#ff6200}.anam-transcript-footer{flex:none;padding:8px 12px 12px;display:flex}.anam-transcript-footer .anam-control-bar{width:100%;position:static}.anam-transcript-footer .anam-ctl-btn{-webkit-backdrop-filter:none;box-shadow:none;color:#6b6257;background:#fff;border:1px solid #e2dcd2}.anam-transcript-footer .anam-ctl-btn:hover{color:#4a4239;background:#faf8f5}.anam-transcript-footer .anam-ctl-input{-webkit-backdrop-filter:none;box-shadow:none;color:#33383f;background:#fff;border:1px solid #e2dcd2}.anam-transcript-footer .anam-ctl-input::placeholder{color:#b0a89b}.anam-transcript-footer .anam-ctl-input:focus{background:#fff;border-color:#d0c8ba}.anam-transcript-footer .anam-ctl-send,.anam-transcript-footer .anam-ctl-send:not(:disabled){color:#b0a89b}.anam-transcript-footer .anam-ctl-send:not(:disabled):hover{color:#4a4239}.anam-watermark{z-index:11;opacity:.5;line-height:0;text-decoration:none;transition:opacity .15s;position:absolute;top:16px;left:16px}.anam-watermark:hover{opacity:.8}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}';
4712
+ class io extends Ne {
4708
4713
  state = { hasError: !1 };
4709
4714
  static getDerivedStateFromError() {
4710
4715
  return { hasError: !0 };
@@ -4728,7 +4733,7 @@ function Ve(t) {
4728
4733
  if (t !== void 0)
4729
4734
  return t === "true";
4730
4735
  }
4731
- function io(t) {
4736
+ function no(t) {
4732
4737
  const e = {};
4733
4738
  t.layout && (e.layout = t.layout), t["initial-state"] && (e.initialState = t["initial-state"]), t.position && (e.position = t.position);
4734
4739
  const i = Ve(t["ui-mute-button"]);
@@ -4742,23 +4747,23 @@ function io(t) {
4742
4747
  const c = Ve(t["ui-preview-video"]);
4743
4748
  return c !== void 0 && (e.showPreviewVideo = c), t["call-to-action"] && (e.callToAction = t["call-to-action"]), e;
4744
4749
  }
4745
- const no = () => /* @__PURE__ */ C("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "3", "stroke-linecap": "round", children: /* @__PURE__ */ C("path", { d: "M18 6L6 18M6 6l12 12" }) }), ro = () => /* @__PURE__ */ C("svg", { width: "24", height: "24", viewBox: "0 0 640 640", fill: "currentColor", children: /* @__PURE__ */ C("path", { d: "M187.2 100.9C174.8 94.1 159.8 94.4 147.6 101.6C135.4 108.8 128 121.9 128 136L128 504C128 518.1 135.5 531.2 147.6 538.4C159.7 545.6 174.8 545.9 187.2 539.1L523.2 355.1C536 348.1 544 334.6 544 320C544 305.4 536 291.9 523.2 284.9L187.2 100.9z" }) }), oo = () => /* @__PURE__ */ C("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", children: [
4750
+ const ro = () => /* @__PURE__ */ C("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "3", "stroke-linecap": "round", children: /* @__PURE__ */ C("path", { d: "M18 6L6 18M6 6l12 12" }) }), oo = () => /* @__PURE__ */ C("svg", { width: "24", height: "24", viewBox: "0 0 640 640", fill: "currentColor", children: /* @__PURE__ */ C("path", { d: "M187.2 100.9C174.8 94.1 159.8 94.4 147.6 101.6C135.4 108.8 128 121.9 128 136L128 504C128 518.1 135.5 531.2 147.6 538.4C159.7 545.6 174.8 545.9 187.2 539.1L523.2 355.1C536 348.1 544 334.6 544 320C544 305.4 536 291.9 523.2 284.9L187.2 100.9z" }) }), so = () => /* @__PURE__ */ C("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", children: [
4746
4751
  /* @__PURE__ */ C("path", { d: "M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z" }),
4747
4752
  /* @__PURE__ */ C("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
4748
4753
  /* @__PURE__ */ C("line", { x1: "12", y1: "19", x2: "12", y2: "22" })
4749
- ] }), so = () => /* @__PURE__ */ C("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", children: [
4754
+ ] }), ao = () => /* @__PURE__ */ C("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", children: [
4750
4755
  /* @__PURE__ */ C("line", { x1: "1", y1: "1", x2: "23", y2: "23" }),
4751
4756
  /* @__PURE__ */ C("path", { d: "M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V5a3 3 0 0 0-5.94-.6" }),
4752
4757
  /* @__PURE__ */ C("path", { d: "M17 16.95A7 7 0 0 1 5 12v-2m14 0v2c0 .87-.16 1.71-.46 2.49" }),
4753
4758
  /* @__PURE__ */ C("line", { x1: "12", y1: "19", x2: "12", y2: "22" })
4754
- ] }), ao = () => /* @__PURE__ */ C("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", children: [
4759
+ ] }), lo = () => /* @__PURE__ */ C("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", children: [
4755
4760
  /* @__PURE__ */ C("line", { x1: "22", y1: "2", x2: "11", y2: "13" }),
4756
4761
  /* @__PURE__ */ C("polygon", { points: "22 2 15 22 11 13 2 9 22 2" })
4757
- ] }), lo = () => /* @__PURE__ */ C("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", children: /* @__PURE__ */ C("path", { d: "M6 9l6 6 6-6" }) }), co = () => /* @__PURE__ */ C("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2.5", "stroke-linecap": "round", "stroke-linejoin": "round", children: /* @__PURE__ */ C("path", { d: "M15 18l-6-6 6-6" }) }), uo = () => /* @__PURE__ */ C("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2.5", "stroke-linecap": "round", "stroke-linejoin": "round", children: /* @__PURE__ */ C("path", { d: "M9 18l6-6-6-6" }) }), Lt = () => /* @__PURE__ */ C("svg", { width: "48", height: "48", viewBox: "0 0 48 48", fill: "none", style: { opacity: 0.3 }, children: [
4762
+ ] }), co = () => /* @__PURE__ */ C("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", children: /* @__PURE__ */ C("path", { d: "M6 9l6 6 6-6" }) }), uo = () => /* @__PURE__ */ C("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2.5", "stroke-linecap": "round", "stroke-linejoin": "round", children: /* @__PURE__ */ C("path", { d: "M15 18l-6-6 6-6" }) }), ho = () => /* @__PURE__ */ C("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2.5", "stroke-linecap": "round", "stroke-linejoin": "round", children: /* @__PURE__ */ C("path", { d: "M9 18l6-6-6-6" }) }), Lt = () => /* @__PURE__ */ C("svg", { width: "48", height: "48", viewBox: "0 0 48 48", fill: "none", style: { opacity: 0.3 }, children: [
4758
4763
  /* @__PURE__ */ C("circle", { cx: "24", cy: "18", r: "8", stroke: "white", "stroke-width": "2", fill: "none" }),
4759
4764
  /* @__PURE__ */ C("path", { d: "M8 42c0-8.837 7.163-16 16-16s16 7.163 16 16", stroke: "white", "stroke-width": "2", fill: "none" })
4760
4765
  ] });
4761
- function Ti({
4766
+ function yi({
4762
4767
  session: t,
4763
4768
  agentLabel: e,
4764
4769
  rowsRef: i
@@ -4776,7 +4781,7 @@ function Ti({
4776
4781
  /* @__PURE__ */ C("span", { class: "anam-transcript-role", children: e }),
4777
4782
  /* @__PURE__ */ C("span", { class: "anam-transcript-time", children: t.messageTimes.get(c.block.id) ?? "" })
4778
4783
  ] }),
4779
- Vr(c.block)
4784
+ Wr(c.block)
4780
4785
  ] }, c.block.id);
4781
4786
  const l = c.message, m = l.role === "persona";
4782
4787
  return /* @__PURE__ */ C("div", { class: `anam-transcript-row ${m ? "anam-transcript-row-agent" : "anam-transcript-row-user"}`, children: [
@@ -4789,7 +4794,7 @@ function Ti({
4789
4794
  })
4790
4795
  ] });
4791
4796
  }
4792
- function ho({
4797
+ function fo({
4793
4798
  config: t,
4794
4799
  session: e,
4795
4800
  videoRef: i,
@@ -4801,7 +4806,7 @@ function ho({
4801
4806
  onStop: m,
4802
4807
  dispatch: f
4803
4808
  }) {
4804
- const p = Ye(null), [u, y] = Rt(""), E = e.connectionStatus.value === "connected", T = e.connectionStatus.value === "connecting", I = e.connectionStatus.value === "error", w = e.isStreaming.value, A = !T && !E && !I, R = E || w, b = t.orientation ?? "landscape", N = t.showTranscript && R, [S, k] = Rt(!1), U = Ye(null), z = c || "Agent", Y = We(() => {
4809
+ const p = Ye(null), [u, y] = Rt(""), E = e.connectionStatus.value === "connected", T = e.connectionStatus.value === "connecting", I = e.connectionStatus.value === "error", w = e.isStreaming.value, A = !T && !E && !I, R = E || w, b = t.orientation ?? "landscape", N = t.showTranscript && R, [S, k] = Rt(!1), U = Ye(null), q = c || "Agent", Y = We(() => {
4805
4810
  const G = !S;
4806
4811
  k(G), f(
4807
4812
  G ? ee.TRANSCRIPT_OPENED : ee.TRANSCRIPT_CLOSED,
@@ -4821,7 +4826,7 @@ function ho({
4821
4826
  if (!G || !S) return;
4822
4827
  G.scrollHeight - G.scrollTop - G.clientHeight < 160 && (G.scrollTop = G.scrollHeight);
4823
4828
  }, [e.messages.value, e.toolBlocks.value, S]);
4824
- const K = N && S && b === "landscape", te = t.showCaptions ? e.caption.value : null, de = e.sentCaption.value, ue = te && de ? te.at >= de.at ? te : de : te ?? de, Se = We(async () => {
4829
+ const K = N && S && b === "landscape", te = t.showCaptions ? e.caption.value : null, ue = e.sentCaption.value, he = te && ue ? te.at >= ue.at ? te : ue : te ?? ue, Se = We(async () => {
4825
4830
  i.current && await e.startSession(i.current);
4826
4831
  }, [e.startSession]), Te = We(() => {
4827
4832
  u.trim() && (e.sendMessage(u.trim()), y(""), p.current?.focus());
@@ -4848,7 +4853,7 @@ function ho({
4848
4853
  onClick: Te,
4849
4854
  disabled: !E || !u.trim(),
4850
4855
  "aria-label": "Send message",
4851
- children: /* @__PURE__ */ C(ao, {})
4856
+ children: /* @__PURE__ */ C(lo, {})
4852
4857
  }
4853
4858
  )
4854
4859
  ] }) : null, Xe = /* @__PURE__ */ C("div", { class: "anam-control-bar", children: [
@@ -4858,7 +4863,7 @@ function ho({
4858
4863
  class: `anam-ctl-btn ${e.isMuted.value ? "anam-ctl-btn-muted" : ""}`,
4859
4864
  onClick: () => e.toggleMute(),
4860
4865
  "aria-label": e.isMuted.value ? "Unmute" : "Mute",
4861
- children: e.isMuted.value ? /* @__PURE__ */ C(so, {}) : /* @__PURE__ */ C(oo, {})
4866
+ children: e.isMuted.value ? /* @__PURE__ */ C(ao, {}) : /* @__PURE__ */ C(so, {})
4862
4867
  }
4863
4868
  ),
4864
4869
  ut,
@@ -4869,7 +4874,7 @@ function ho({
4869
4874
  onClick: Y,
4870
4875
  "aria-expanded": S,
4871
4876
  "aria-label": S ? "Hide transcript" : "Show transcript",
4872
- children: /* @__PURE__ */ C(lo, {})
4877
+ children: /* @__PURE__ */ C(co, {})
4873
4878
  }
4874
4879
  )
4875
4880
  ] });
@@ -4889,11 +4894,11 @@ function ho({
4889
4894
  class: "anam-transcript-collapse",
4890
4895
  onClick: Y,
4891
4896
  "aria-label": "Hide transcript",
4892
- children: /* @__PURE__ */ C(co, {})
4897
+ children: /* @__PURE__ */ C(uo, {})
4893
4898
  }
4894
4899
  )
4895
4900
  ] }),
4896
- /* @__PURE__ */ C(Ti, { session: e, agentLabel: z, rowsRef: U })
4901
+ /* @__PURE__ */ C(yi, { session: e, agentLabel: q, rowsRef: U })
4897
4902
  ] }) }),
4898
4903
  /* @__PURE__ */ C("div", { class: "anam-video-region", children: [
4899
4904
  /* @__PURE__ */ C(
@@ -4932,8 +4937,9 @@ function ho({
4932
4937
  }
4933
4938
  ) : /* @__PURE__ */ C(Lt, {}),
4934
4939
  /* @__PURE__ */ C("div", { class: "anam-scrim" }),
4940
+ e.timeLimitReached.value && /* @__PURE__ */ C("div", { class: "anam-ended-notice", role: "status", children: "Session time limit reached" }),
4935
4941
  /* @__PURE__ */ C("button", { class: "anam-cta-pill", onClick: Se, children: [
4936
- /* @__PURE__ */ C(ro, {}),
4942
+ /* @__PURE__ */ C(oo, {}),
4937
4943
  s
4938
4944
  ] })
4939
4945
  ] })
@@ -4958,16 +4964,16 @@ function ho({
4958
4964
  class: "anam-close-btn",
4959
4965
  onClick: l || m,
4960
4966
  "aria-label": l ? "Close" : "End call",
4961
- children: /* @__PURE__ */ C(no, {})
4967
+ children: /* @__PURE__ */ C(ro, {})
4962
4968
  }
4963
4969
  ),
4964
4970
  R && /* @__PURE__ */ C(Ce, { children: [
4965
4971
  /* @__PURE__ */ C("div", { class: "anam-scrim" }),
4966
- ue && /* @__PURE__ */ C(
4972
+ he && /* @__PURE__ */ C(
4967
4973
  "div",
4968
4974
  {
4969
- class: `anam-captions ${ue.role === "persona" ? "anam-captions-agent" : "anam-captions-user"}`,
4970
- children: ue.content
4975
+ class: `anam-captions ${he.role === "persona" ? "anam-captions-agent" : "anam-captions-user"}`,
4976
+ children: he.content
4971
4977
  }
4972
4978
  ),
4973
4979
  !K && Xe,
@@ -4977,7 +4983,7 @@ function ho({
4977
4983
  class: "anam-transcript-tab",
4978
4984
  onClick: Y,
4979
4985
  "aria-label": "Show transcript",
4980
- children: /* @__PURE__ */ C(uo, {})
4986
+ children: /* @__PURE__ */ C(ho, {})
4981
4987
  }
4982
4988
  )
4983
4989
  ] }),
@@ -4998,36 +5004,36 @@ function ho({
4998
5004
  )
4999
5005
  ] }),
5000
5006
  N && b === "landscape" && /* @__PURE__ */ C("div", { class: "anam-transcript-pane", children: [
5001
- /* @__PURE__ */ C(Ti, { session: e, agentLabel: z, rowsRef: U }),
5007
+ /* @__PURE__ */ C(yi, { session: e, agentLabel: q, rowsRef: U }),
5002
5008
  K && /* @__PURE__ */ C("div", { class: "anam-transcript-footer", children: Xe })
5003
5009
  ] })
5004
5010
  ]
5005
5011
  }
5006
5012
  );
5007
5013
  }
5008
- function fo(t) {
5014
+ function po(t) {
5009
5015
  return /* @__PURE__ */ C(Ce, { children: [
5010
- /* @__PURE__ */ C("style", { children: eo }),
5011
- /* @__PURE__ */ C(to, { children: /* @__PURE__ */ C(po, { ...t }) })
5016
+ /* @__PURE__ */ C("style", { children: to }),
5017
+ /* @__PURE__ */ C(io, { children: /* @__PURE__ */ C(_o, { ...t }) })
5012
5018
  ] });
5013
5019
  }
5014
- function po(t) {
5020
+ function _o(t) {
5015
5021
  const e = Ye(null), i = Ye(null), n = We((b, N) => {
5016
5022
  const S = i.current?.getRootNode();
5017
- S && S instanceof ShadowRoot && Qr(S.host, b, N);
5023
+ S && S instanceof ShadowRoot && eo(S.host, b, N);
5018
5024
  }, []);
5019
5025
  t["agent-id"] && t["session-token"] && console.warn("[AnamWidget] Both agent-id and session-token are set. Use one or the other. Ignoring agent-id.");
5020
- const a = t["session-token"] ? void 0 : t["agent-id"], s = Zr(a, t["api-base-url"], t["session-token"], n);
5026
+ const a = t["session-token"] ? void 0 : t["agent-id"], s = Qr(a, t["api-base-url"], t["session-token"], n);
5021
5027
  Ie(() => () => {
5022
5028
  s.cleanup();
5023
5029
  }, []);
5024
5030
  const c = ke(
5025
- () => io(t),
5031
+ () => no(t),
5026
5032
  [t.layout, t["initial-state"], t.position, t["ui-mute-button"], t["ui-text-input"], t["ui-captions"], t["ui-transcript"], t["ui-preview-video"], t["call-to-action"]]
5027
5033
  ), l = ke(() => {
5028
5034
  const b = s.serverConfig.value;
5029
5035
  return kt(kt({ ...di }, b ?? {}), c);
5030
- }, [s.serverConfig.value, c]), m = Qi(
5036
+ }, [s.serverConfig.value, c]), m = en(
5031
5037
  l.layout === "floating" ? l.initialState : "expanded"
5032
5038
  );
5033
5039
  Ie(() => {
@@ -5037,7 +5043,7 @@ function po(t) {
5037
5043
  }, [a, t["api-base-url"], t["session-token"]]);
5038
5044
  const f = t["avatar-url"] || s.avatarThumbnailUrl.value || null, p = l.showPreviewVideo && (t["avatar-video-url"] || s.avatarVideoUrl.value) || null, y = t["agent-name"] || s.personaName.value, E = l.callToAction === di.callToAction && y ? `Talk to ${y}` : l.callToAction, T = ke(() => {
5039
5045
  if (l.layout === "inline") return "";
5040
- const b = Gn(l.position);
5046
+ const b = Hn(l.position);
5041
5047
  return Object.entries(b).map(([N, S]) => `${N}: ${S}`).join("; ");
5042
5048
  }, [l.layout, l.position]), I = l.layout === "floating", w = () => {
5043
5049
  m.value = "expanded", n(ee.EXPANDED, {});
@@ -5063,7 +5069,7 @@ function po(t) {
5063
5069
  }
5064
5070
  ),
5065
5071
  R && /* @__PURE__ */ C(
5066
- ho,
5072
+ fo,
5067
5073
  {
5068
5074
  config: l,
5069
5075
  session: s,
@@ -5081,7 +5087,7 @@ function po(t) {
5081
5087
  }
5082
5088
  ) : null;
5083
5089
  }
5084
- const _o = [
5090
+ const mo = [
5085
5091
  "agent-id",
5086
5092
  // Persona ID -- required for session streaming + server config fetch
5087
5093
  "api-base-url",
@@ -5113,14 +5119,14 @@ const _o = [
5113
5119
  "agent-name"
5114
5120
  // Override persona name for CTA (Lab preview)
5115
5121
  ];
5116
- function yi(t = "anam-agent") {
5117
- Rn(fo, t, [..._o], {
5122
+ function Ii(t = "anam-agent") {
5123
+ An(po, t, [...mo], {
5118
5124
  shadow: !0
5119
5125
  });
5120
5126
  }
5121
- typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", () => yi()) : yi());
5127
+ typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", () => Ii()) : Ii());
5122
5128
  export {
5123
5129
  di as DefaultConfig,
5124
5130
  ee as WidgetEventNames,
5125
- yi as registerWidget
5131
+ Ii as registerWidget
5126
5132
  };