@squadico/chatbot 1.1.0 → 1.1.2

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.
@@ -45,7 +45,7 @@ function w(e, t) {
45
45
  function T(e) {
46
46
  if (e.__P && e.__d) {
47
47
  var n = e.__v, r = n.__e, i = [], a = [], o = v({}, n);
48
- o.__v = n.__v + 1, t.vnode && t.vnode(o), I(e.__P, o, n, e.__n, e.__P.namespaceURI, 32 & n.__u ? [r] : null, i, r ?? w(n), !!(32 & n.__u), a), o.__v = n.__v, o.__.__k[o.__i] = o, ee(i, o, a), n.__e = n.__ = null, o.__e != r && E(o);
48
+ o.__v = n.__v + 1, t.vnode && t.vnode(o), ee(e.__P, o, n, e.__n, e.__P.namespaceURI, 32 & n.__u ? [r] : null, i, r ?? w(n), !!(32 & n.__u), a), o.__v = n.__v, o.__.__k[o.__i] = o, L(i, o, a), n.__e = n.__ = null, o.__e != r && E(o);
49
49
  }
50
50
  }
51
51
  function E(e) {
@@ -65,13 +65,13 @@ function O() {
65
65
  }
66
66
  function k(e, t, n, r, i, a, o, s, c, l, u) {
67
67
  var d, f, p, g, _, v, y = r && r.__k || h, b = t.length;
68
- for (c = A(n, t, y, c, b), d = 0; d < b; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && y[p.__i] || m, p.__i = d, v = I(e, p, f, i, a, o, s, c, l, u), g = p.__e, p.ref && f.ref != p.ref && (f.ref && z(f.ref, null, p), u.push(p.ref, p.__c || g, p)), _ == null && g != null && (_ = g), 4 & p.__u ? (c = j(p, c, e), f.__e && (f.__e = null)) : typeof p.type == "function" && v !== void 0 ? c = v : g && (c = g.nextSibling), p.__u &= -7);
68
+ for (c = A(n, t, y, c, b), d = 0; d < b; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && y[p.__i] || m, p.__i = d, v = ee(e, p, f, i, a, o, s, c, l, u), g = p.__e, p.ref && f.ref != p.ref && (f.ref && ne(f.ref, null, p), u.push(p.ref, p.__c || g, p)), _ == null && g != null && (_ = g), 4 & p.__u ? (c = j(p, c, e), f.__e && (f.__e = null)) : typeof p.type == "function" && v !== void 0 ? c = v : g && (c = g.nextSibling), p.__u &= -7);
69
69
  return n.__e = _, c;
70
70
  }
71
71
  function A(e, t, n, r, i) {
72
72
  var a, o, s, c, l, u = n.length, d = u, f = 0;
73
73
  for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = x(null, o, null, null, null) : _(o) ? o = e.__k[a] = x(S, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = x(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i = M(o, n, c, d)) != -1 && (d--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (i > u ? f-- : i < u && f++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, o.__u |= 4))) : e.__k[a] = null;
74
- if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = w(s)), ne(s, s));
74
+ if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = w(s)), z(s, s));
75
75
  return r;
76
76
  }
77
77
  function j(e, t, n) {
@@ -125,7 +125,7 @@ function F(e) {
125
125
  }
126
126
  };
127
127
  }
128
- function I(e, n, r, i, a, o, s, c, l, u) {
128
+ function ee(e, n, r, i, a, o, s, c, l, u) {
129
129
  var d, f, p, m, g, b, x, T, E, D, O, A, j, M, N, P, F = n.type;
130
130
  if (n.constructor !== void 0) return null;
131
131
  128 & r.__u && (l = !!(32 & r.__u), o = [c = n.__e = r.__e]), (d = t.__b) && d(n);
@@ -148,7 +148,7 @@ function I(e, n, r, i, a, o, s, c, l, u) {
148
148
  else do
149
149
  p.__d = !1, j && j(n), d = p.render(p.props, p.state, p.context), p.state = p.__s;
150
150
  while (p.__d && ++M < 25);
151
- p.state = p.__s, p.getChildContext != null && (i = v(v({}, i), p.getChildContext())), D && !m && p.getSnapshotBeforeUpdate != null && (x = p.getSnapshotBeforeUpdate(g, b)), N = d != null && d.type === S && d.key == null ? R(d.props.children) : d, c = k(e, _(N) ? N : [N], n, r, i, a, o, s, c, l, u), p.base = n.__e, n.__u &= -161, p.__h.length && s.push(p), T && (p.__E = p.__ = null);
151
+ p.state = p.__s, p.getChildContext != null && (i = v(v({}, i), p.getChildContext())), D && !m && p.getSnapshotBeforeUpdate != null && (x = p.getSnapshotBeforeUpdate(g, b)), N = d != null && d.type === S && d.key == null ? te(d.props.children) : d, c = k(e, _(N) ? N : [N], n, r, i, a, o, s, c, l, u), p.base = n.__e, n.__u &= -161, p.__h.length && s.push(p), T && (p.__E = p.__ = null);
152
152
  } catch (e) {
153
153
  if (s.length = f, n.__v = null, l || o != null) {
154
154
  if (e.then) {
@@ -156,16 +156,16 @@ function I(e, n, r, i, a, o, s, c, l, u) {
156
156
  o != null && (o[o.indexOf(c)] = null), n.__e = c;
157
157
  } else if (o != null) for (P = o.length; P--;) y(o[P]);
158
158
  } else n.__e = r.__e;
159
- n.__k ?? (n.__k = r.__k || []), e.then || L(n), t.__e(e, n, r);
159
+ n.__k ?? (n.__k = r.__k || []), e.then || I(n), t.__e(e, n, r);
160
160
  }
161
- } else o == null && n.__v == r.__v ? (n.__k = r.__k, n.__e = r.__e) : c = n.__e = te(r.__e, n, r, i, a, o, s, l, u);
161
+ } else o == null && n.__v == r.__v ? (n.__k = r.__k, n.__e = r.__e) : c = n.__e = R(r.__e, n, r, i, a, o, s, l, u);
162
162
  return (d = t.diffed) && d(n), 128 & n.__u ? void 0 : c;
163
163
  }
164
- function L(e) {
165
- e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(L));
164
+ function I(e) {
165
+ e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(I));
166
166
  }
167
- function ee(e, n, r) {
168
- for (var i = 0; i < r.length; i++) z(r[i], r[++i], r[++i]);
167
+ function L(e, n, r) {
168
+ for (var i = 0; i < r.length; i++) ne(r[i], r[++i], r[++i]);
169
169
  t.__c && t.__c(n, e), e.some(function(n) {
170
170
  try {
171
171
  e = n.__h, n.__h = [], e.some(function(e) {
@@ -176,10 +176,10 @@ function ee(e, n, r) {
176
176
  }
177
177
  });
178
178
  }
179
- function R(e) {
180
- return typeof e != "object" || !e || e.__b > 0 ? e : _(e) ? e.map(R) : e.constructor === void 0 ? v({}, e) : null;
179
+ function te(e) {
180
+ return typeof e != "object" || !e || e.__b > 0 ? e : _(e) ? e.map(te) : e.constructor === void 0 ? v({}, e) : null;
181
181
  }
182
- function te(n, r, i, a, o, s, c, l, u) {
182
+ function R(n, r, i, a, o, s, c, l, u) {
183
183
  var d, f, p, h, g, v, b, x = i.props || m, S = r.props, C = r.type;
184
184
  if (C == "svg" ? o = "http://www.w3.org/2000/svg" : C == "math" ? o = "http://www.w3.org/1998/Math/MathML" : o || (o = "http://www.w3.org/1999/xhtml"), s != null) {
185
185
  for (d = 0; d < s.length; d++) if ((g = s[d]) && "setAttribute" in g == !!C && (C ? g.localName == C : g.nodeType == 3)) {
@@ -202,7 +202,7 @@ function te(n, r, i, a, o, s, c, l, u) {
202
202
  }
203
203
  return n;
204
204
  }
205
- function z(e, n, r) {
205
+ function ne(e, n, r) {
206
206
  try {
207
207
  if (typeof e == "function") {
208
208
  var i = typeof e.__u == "function";
@@ -212,9 +212,9 @@ function z(e, n, r) {
212
212
  t.__e(e, r);
213
213
  }
214
214
  }
215
- function ne(e, n, r) {
215
+ function z(e, n, r) {
216
216
  var i, a;
217
- if (t.unmount && t.unmount(e), (i = e.ref) && (i.current && i.current != e.__e || z(i, null, n)), (i = e.__c) != null) {
217
+ if (t.unmount && t.unmount(e), (i = e.ref) && (i.current && i.current != e.__e || ne(i, null, n)), (i = e.__c) != null) {
218
218
  if (i.componentWillUnmount) try {
219
219
  i.componentWillUnmount();
220
220
  } catch (e) {
@@ -222,7 +222,7 @@ function ne(e, n, r) {
222
222
  }
223
223
  i.base = i.__P = i.__n = null;
224
224
  }
225
- if (i = e.__k) for (a = 0; a < i.length; a++) i[a] && ne(i[a], n, r || typeof e.type != "function");
225
+ if (i = e.__k) for (a = 0; a < i.length; a++) i[a] && z(i[a], n, r || typeof e.type != "function");
226
226
  r || y(e.__e), e.__c = e.__ = e.__e = void 0;
227
227
  }
228
228
  function re(e, t, n) {
@@ -230,7 +230,7 @@ function re(e, t, n) {
230
230
  }
231
231
  function ie(n, r, i) {
232
232
  var a, o, s, c;
233
- r == document && (r = document.documentElement), t.__ && t.__(n, r), o = (a = typeof i == "function") ? null : i && i.__k || r.__k, s = [], c = [], I(r, n = (!a && i || r).__k = b(S, null, [n]), o || m, m, r.namespaceURI, !a && i ? [i] : o ? null : r.firstChild ? e.call(r.childNodes) : null, s, !a && i ? i : o ? o.__e : r.firstChild, a, c), ee(s, n, c), n.props.children = null;
233
+ r == document && (r = document.documentElement), t.__ && t.__(n, r), o = (a = typeof i == "function") ? null : i && i.__k || r.__k, s = [], c = [], ee(r, n = (!a && i || r).__k = b(S, null, [n]), o || m, m, r.namespaceURI, !a && i ? [i] : o ? null : r.firstChild ? e.call(r.childNodes) : null, s, !a && i ? i : o ? o.__e : r.firstChild, a, c), L(s, n, c), n.props.children = null;
234
234
  }
235
235
  e = h.slice, t = { __e: function(e, t, n, r) {
236
236
  for (var i, a, o; t = t.__;) if ((i = t.__c) && !i.__) try {
@@ -249,24 +249,24 @@ e = h.slice, t = { __e: function(e, t, n, r) {
249
249
  }, O.__r = 0, s = Math.random().toString(8), c = "__d" + s, l = "__a" + s, u = /(PointerCapture)$|Capture$/i, d = 0, f = F(!1), p = F(!0);
250
250
  //#endregion
251
251
  //#region node_modules/preact/hooks/dist/hooks.module.js
252
- var ae, B, oe, se, ce = 0, le = [], V = t, ue = V.__b, de = V.__r, fe = V.diffed, pe = V.__c, me = V.unmount, he = V.__;
253
- function ge(e, t) {
254
- V.__h && V.__h(B, e, ce || t), ce = 0;
255
- var n = B.__H || (B.__H = {
252
+ var B, V, ae, oe, se = 0, ce = [], H = t, le = H.__b, ue = H.__r, de = H.diffed, fe = H.__c, pe = H.unmount, me = H.__;
253
+ function he(e, t) {
254
+ H.__h && H.__h(V, e, se || t), se = 0;
255
+ var n = V.__H || (V.__H = {
256
256
  __: [],
257
257
  __h: []
258
258
  });
259
259
  return e >= n.__.length && n.__.push({}), n.__[e];
260
260
  }
261
- function H(e) {
262
- return ce = 1, _e(Te, e);
261
+ function U(e) {
262
+ return se = 1, ge(we, e);
263
263
  }
264
- function _e(e, t, n) {
265
- var r = ge(ae++, 2);
266
- if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Te(void 0, t), function(e) {
264
+ function ge(e, t, n) {
265
+ var r = he(B++, 2);
266
+ if (r.t = e, !r.__c && (r.__ = [n ? n(t) : we(void 0, t), function(e) {
267
267
  var t = r.__N ? r.__N[0] : r.__[0], n = r.t(t, e);
268
268
  t !== n && (r.__N = [n, r.__[1]], r.__c.setState({}));
269
- }], r.__c = B, !B.__f)) {
269
+ }], r.__c = V, !V.__f)) {
270
270
  var i = function(e, t, n) {
271
271
  if (!r.__c.__H) return !0;
272
272
  var i = !1, o = r.__c.props !== e;
@@ -282,116 +282,116 @@ function _e(e, t, n) {
282
282
  }
283
283
  return !i || o;
284
284
  };
285
- B.__f = !0;
286
- var a = B.shouldComponentUpdate, o = B.componentWillUpdate;
287
- B.componentWillUpdate = function(e, t, n) {
285
+ V.__f = !0;
286
+ var a = V.shouldComponentUpdate, o = V.componentWillUpdate;
287
+ V.componentWillUpdate = function(e, t, n) {
288
288
  if (this.__e) {
289
289
  var r = a;
290
290
  a = void 0, i(e, t, n), a = r;
291
291
  }
292
292
  o && o.call(this, e, t, n);
293
- }, B.shouldComponentUpdate = i;
293
+ }, V.shouldComponentUpdate = i;
294
294
  }
295
295
  return r.__N || r.__;
296
296
  }
297
- function U(e, t) {
298
- var n = ge(ae++, 3);
299
- !V.__s && we(n.__H, t) && (n.__ = e, n.u = t, B.__H.__h.push(n));
297
+ function W(e, t) {
298
+ var n = he(B++, 3);
299
+ !H.__s && Ce(n.__H, t) && (n.__ = e, n.u = t, V.__H.__h.push(n));
300
300
  }
301
- function ve(e, t) {
302
- var n = ge(ae++, 4);
303
- !V.__s && we(n.__H, t) && (n.__ = e, n.u = t, B.__h.push(n));
301
+ function _e(e, t) {
302
+ var n = he(B++, 4);
303
+ !H.__s && Ce(n.__H, t) && (n.__ = e, n.u = t, V.__h.push(n));
304
304
  }
305
- function W(e) {
306
- return ce = 5, G(function() {
305
+ function G(e) {
306
+ return se = 5, K(function() {
307
307
  return { current: e };
308
308
  }, []);
309
309
  }
310
- function G(e, t) {
311
- var n = ge(ae++, 7);
312
- return we(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
313
- }
314
310
  function K(e, t) {
315
- return ce = 8, G(function() {
311
+ var n = he(B++, 7);
312
+ return Ce(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
313
+ }
314
+ function q(e, t) {
315
+ return se = 8, K(function() {
316
316
  return e;
317
317
  }, t);
318
318
  }
319
- function ye() {
320
- for (var e; e = le.shift();) {
319
+ function ve() {
320
+ for (var e; e = ce.shift();) {
321
321
  var t = e.__H;
322
322
  if (e.__P && t) try {
323
- t.__h.some(Se), t.__h.some(Ce), t.__h = [];
323
+ t.__h.some(xe), t.__h.some(Se), t.__h = [];
324
324
  } catch (n) {
325
- t.__h = [], V.__e(n, e.__v);
325
+ t.__h = [], H.__e(n, e.__v);
326
326
  }
327
327
  }
328
328
  }
329
- V.__b = function(e) {
330
- B = null, ue && ue(e);
331
- }, V.__ = function(e, t) {
332
- e && t.__k && t.__k.__m && (e.__m = t.__k.__m), he && he(e, t);
333
- }, V.__r = function(e) {
334
- de && de(e), ae = 0;
335
- var t = (B = e.__c).__H;
336
- t && (oe === B ? (t.__h = [], B.__h = [], t.__.some(function(e) {
329
+ H.__b = function(e) {
330
+ V = null, le && le(e);
331
+ }, H.__ = function(e, t) {
332
+ e && t.__k && t.__k.__m && (e.__m = t.__k.__m), me && me(e, t);
333
+ }, H.__r = function(e) {
334
+ ue && ue(e), B = 0;
335
+ var t = (V = e.__c).__H;
336
+ t && (ae === V ? (t.__h = [], V.__h = [], t.__.some(function(e) {
337
337
  e.__N && (e.__ = e.__N), e.u = e.__N = void 0;
338
- })) : (t.__h.some(Se), t.__h.some(Ce), t.__h = [], ae = 0)), oe = B;
339
- }, V.diffed = function(e) {
340
- fe && fe(e);
338
+ })) : (t.__h.some(xe), t.__h.some(Se), t.__h = [], B = 0)), ae = V;
339
+ }, H.diffed = function(e) {
340
+ de && de(e);
341
341
  var t = e.__c;
342
- t && t.__H && (t.__H.__h.length && (le.push(t) !== 1 && se === V.requestAnimationFrame || ((se = V.requestAnimationFrame) || xe)(ye)), t.__H.__.some(function(e) {
342
+ t && t.__H && (t.__H.__h.length && (ce.push(t) !== 1 && oe === H.requestAnimationFrame || ((oe = H.requestAnimationFrame) || be)(ve)), t.__H.__.some(function(e) {
343
343
  e.u && (e.__H = e.u, e.u = void 0);
344
- })), oe = B = null;
345
- }, V.__c = function(e, t) {
344
+ })), ae = V = null;
345
+ }, H.__c = function(e, t) {
346
346
  t.some(function(e) {
347
347
  try {
348
- e.__h.some(Se), e.__h = e.__h.filter(function(e) {
349
- return !e.__ || Ce(e);
348
+ e.__h.some(xe), e.__h = e.__h.filter(function(e) {
349
+ return !e.__ || Se(e);
350
350
  });
351
351
  } catch (n) {
352
352
  t.some(function(e) {
353
353
  e.__h && (e.__h = []);
354
- }), t = [], V.__e(n, e.__v);
354
+ }), t = [], H.__e(n, e.__v);
355
355
  }
356
- }), pe && pe(e, t);
357
- }, V.unmount = function(e) {
358
- me && me(e);
356
+ }), fe && fe(e, t);
357
+ }, H.unmount = function(e) {
358
+ pe && pe(e);
359
359
  var t, n = e.__c;
360
360
  n && n.__H && (n.__H.__.some(function(e) {
361
361
  try {
362
- Se(e);
362
+ xe(e);
363
363
  } catch (e) {
364
364
  t = e;
365
365
  }
366
- }), n.__H = void 0, t && V.__e(t, n.__v));
366
+ }), n.__H = void 0, t && H.__e(t, n.__v));
367
367
  };
368
- var be = typeof requestAnimationFrame == "function";
369
- function xe(e) {
368
+ var ye = typeof requestAnimationFrame == "function";
369
+ function be(e) {
370
370
  var t, n = function() {
371
- clearTimeout(r), be && cancelAnimationFrame(t), setTimeout(e);
371
+ clearTimeout(r), ye && cancelAnimationFrame(t), setTimeout(e);
372
372
  }, r = setTimeout(n, 35);
373
- be && (t = requestAnimationFrame(n));
373
+ ye && (t = requestAnimationFrame(n));
374
374
  }
375
- function Se(e) {
376
- var t = B, n = e.__c;
377
- typeof n == "function" && (e.__c = void 0, n()), B = t;
375
+ function xe(e) {
376
+ var t = V, n = e.__c;
377
+ typeof n == "function" && (e.__c = void 0, n()), V = t;
378
378
  }
379
- function Ce(e) {
380
- var t = B;
381
- e.__c = e.__(), B = t;
379
+ function Se(e) {
380
+ var t = V;
381
+ e.__c = e.__(), V = t;
382
382
  }
383
- function we(e, t) {
383
+ function Ce(e, t) {
384
384
  return !e || e.length !== t.length || t.some(function(t, n) {
385
385
  return t !== e[n];
386
386
  });
387
387
  }
388
- function Te(e, t) {
388
+ function we(e, t) {
389
389
  return typeof t == "function" ? t(e) : t;
390
390
  }
391
391
  //#endregion
392
392
  //#region src/lib/context.ts
393
- var Ee = /* @__PURE__ */ new Set(["sessionId"]);
394
- function De(e) {
393
+ var Te = /* @__PURE__ */ new Set(["sessionId"]);
394
+ function Ee(e) {
395
395
  if (typeof e == "string") return e.length > 0 ? { id: e } : void 0;
396
396
  if (!e || typeof e != "object" || Array.isArray(e)) return;
397
397
  let { id: t, name: n } = e;
@@ -400,32 +400,32 @@ function De(e) {
400
400
  name: n
401
401
  } : { id: t };
402
402
  }
403
- function Oe(e) {
404
- let t = De(e);
403
+ function De(e) {
404
+ let t = Ee(e);
405
405
  if (t) return t.name ?? t.id;
406
406
  }
407
- function ke(e) {
407
+ function Oe(e) {
408
408
  return !!e && typeof e == "object" && !Array.isArray(e);
409
409
  }
410
- function Ae(e) {
410
+ function ke(e) {
411
411
  let t = {};
412
412
  for (let [n, r] of Object.entries(e)) {
413
- if (Ee.has(n) || !ke(r)) {
413
+ if (Te.has(n) || !Oe(r)) {
414
414
  t[n] = r;
415
415
  continue;
416
416
  }
417
- let e = De(r);
417
+ let e = Ee(r);
418
418
  e && (t[`${n}Id`] = e.id, e.name && (t[`${n}Name`] = e.name));
419
419
  }
420
420
  return t;
421
421
  }
422
422
  //#endregion
423
423
  //#region src/lib/i18n.ts
424
- var je = "en", Me = [
424
+ var Ae = "en", je = [
425
425
  "en",
426
426
  "fr",
427
427
  "es"
428
- ], Ne = {
428
+ ], Me = {
429
429
  en: {
430
430
  heading: "Assistant",
431
431
  subheading: "Squadico",
@@ -464,6 +464,7 @@ var je = "en", Me = [
464
464
  noValue: "no"
465
465
  },
466
466
  choices: "Suggested options",
467
+ poweredBy: "Powered by Squadico",
467
468
  handles: {
468
469
  picker: "Agents you can address",
469
470
  unknown: "Nobody answers to that name here:",
@@ -533,6 +534,7 @@ var je = "en", Me = [
533
534
  noValue: "non"
534
535
  },
535
536
  choices: "Options proposées",
537
+ poweredBy: "Propulsé par Squadico",
536
538
  handles: {
537
539
  picker: "Agents que vous pouvez adresser",
538
540
  unknown: "Personne ne répond à ce nom ici :",
@@ -602,6 +604,7 @@ var je = "en", Me = [
602
604
  noValue: "no"
603
605
  },
604
606
  choices: "Opciones propuestas",
607
+ poweredBy: "Con la tecnología de Squadico",
605
608
  handles: {
606
609
  picker: "Agentes a los que puedes dirigirte",
607
610
  unknown: "Nadie responde a ese nombre aquí:",
@@ -633,50 +636,50 @@ var je = "en", Me = [
633
636
  error: "Se ha producido un error, el asistente no ha podido responder. Inténtelo de nuevo.",
634
637
  withHuman: "Un miembro del equipo le responderá aquí."
635
638
  }
636
- }, Pe = {
639
+ }, Ne = {
637
640
  en: "en-GB",
638
641
  fr: "fr-FR",
639
642
  es: "es-ES"
640
643
  };
641
- function Fe(e) {
644
+ function Pe(e) {
642
645
  let t = e?.trim().toLowerCase().split(/[-_]/)[0];
643
- return t && t in Ne ? t : void 0;
646
+ return t && t in Me ? t : void 0;
644
647
  }
645
- function Ie() {
648
+ function Fe() {
646
649
  return typeof navigator > "u" ? [] : navigator.languages?.length ? navigator.languages : [navigator.language];
647
650
  }
648
- function Le(e) {
649
- let t = e?.trim(), n = (t ? [t] : Ie()).find(Fe), r = Fe(n) ?? "en";
651
+ function Ie(e) {
652
+ let t = e?.trim(), n = (t ? [t] : Fe()).find(Pe), r = Pe(n) ?? "en";
650
653
  return {
651
654
  code: r,
652
- tag: n?.includes("-") ? n : Pe[r],
653
- t: Ne[r]
655
+ tag: n?.includes("-") ? n : Ne[r],
656
+ t: Me[r]
654
657
  };
655
658
  }
656
659
  //#endregion
657
660
  //#region src/lib/openState.ts
658
- var Re = "squadico-chatbot:open";
659
- function ze() {
661
+ var Le = "squadico-chatbot:open";
662
+ function Re() {
660
663
  try {
661
664
  if (typeof sessionStorage > "u") return;
662
- let e = sessionStorage.getItem(Re);
665
+ let e = sessionStorage.getItem(Le);
663
666
  return e === "1" || e !== "0" && void 0;
664
667
  } catch {
665
668
  return;
666
669
  }
667
670
  }
668
- function Be(e) {
671
+ function ze(e) {
669
672
  try {
670
673
  if (typeof sessionStorage > "u") return;
671
- sessionStorage.setItem(Re, e ? "1" : "0");
674
+ sessionStorage.setItem(Le, e ? "1" : "0");
672
675
  } catch {}
673
676
  }
674
- function Ve(e, t) {
675
- return t === !1 ? e ?? !1 : ze() ?? e ?? !1;
677
+ function Be(e, t) {
678
+ return t === !1 ? e ?? !1 : Re() ?? e ?? !1;
676
679
  }
677
680
  //#endregion
678
681
  //#region src/lib/uid.ts
679
- function He() {
682
+ function Ve() {
680
683
  let e = globalThis.crypto;
681
684
  if (e && typeof e.randomUUID == "function") return e.randomUUID();
682
685
  let t = /* @__PURE__ */ new Uint8Array(16);
@@ -689,36 +692,36 @@ function He() {
689
692
  }
690
693
  //#endregion
691
694
  //#region \0@oxc-project+runtime@0.147.0/helpers/esm/typeof.js
692
- function Ue(e) {
695
+ function He(e) {
693
696
  "@babel/helpers - typeof";
694
- return Ue = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
697
+ return He = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
695
698
  return typeof e;
696
699
  } : function(e) {
697
700
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
698
- }, Ue(e);
701
+ }, He(e);
699
702
  }
700
703
  //#endregion
701
704
  //#region \0@oxc-project+runtime@0.147.0/helpers/esm/toPrimitive.js
702
- function We(e, t) {
703
- if (Ue(e) != "object" || !e) return e;
705
+ function Ue(e, t) {
706
+ if (He(e) != "object" || !e) return e;
704
707
  var n = e[Symbol.toPrimitive];
705
708
  if (n !== void 0) {
706
709
  var r = n.call(e, t || "default");
707
- if (Ue(r) != "object") return r;
710
+ if (He(r) != "object") return r;
708
711
  throw TypeError("@@toPrimitive must return a primitive value.");
709
712
  }
710
713
  return (t === "string" ? String : Number)(e);
711
714
  }
712
715
  //#endregion
713
716
  //#region \0@oxc-project+runtime@0.147.0/helpers/esm/toPropertyKey.js
714
- function Ge(e) {
715
- var t = We(e, "string");
716
- return Ue(t) == "symbol" ? t : t + "";
717
+ function We(e) {
718
+ var t = Ue(e, "string");
719
+ return He(t) == "symbol" ? t : t + "";
717
720
  }
718
721
  //#endregion
719
722
  //#region \0@oxc-project+runtime@0.147.0/helpers/esm/defineProperty.js
720
- function Ke(e, t, n) {
721
- return (t = Ge(t)) in e ? Object.defineProperty(e, t, {
723
+ function Ge(e, t, n) {
724
+ return (t = We(t)) in e ? Object.defineProperty(e, t, {
722
725
  value: n,
723
726
  enumerable: !0,
724
727
  configurable: !0,
@@ -727,15 +730,15 @@ function Ke(e, t, n) {
727
730
  }
728
731
  //#endregion
729
732
  //#region src/lib/client.ts
730
- var qe = "https://api.squadico.com", Je = 2e4, q = class extends Error {
733
+ var Ke = "https://api.squadico.com", qe = 2e4, J = class extends Error {
731
734
  constructor(e, t, n) {
732
- super(e), Ke(this, "status", void 0), Ke(this, "code", void 0), this.name = "ChatHttpError", this.status = t, this.code = n;
735
+ super(e), Ge(this, "status", void 0), Ge(this, "code", void 0), this.name = "ChatHttpError", this.status = t, this.code = n;
733
736
  }
734
737
  };
735
- function Ye(e, t) {
738
+ function Je(e, t) {
736
739
  return `${e.replace(/\/+$/, "")}${t}`;
737
740
  }
738
- function Xe(e, t) {
741
+ function Ye(e, t) {
739
742
  return {
740
743
  "Content-Type": "application/json",
741
744
  Accept: "text/event-stream, application/json",
@@ -743,21 +746,21 @@ function Xe(e, t) {
743
746
  ...t ? { "X-Subject-Token": t } : {}
744
747
  };
745
748
  }
746
- function Ze(e) {
749
+ function Xe(e) {
747
750
  if (!e || typeof e != "object") return;
748
751
  let { loc: t, msg: n } = e;
749
752
  if (typeof n != "string" || !n) return;
750
753
  let r = (Array.isArray(t) ? t.filter((e) => typeof e == "string") : []).at(-1);
751
754
  return r && r !== "body" ? `${r}: ${n}` : n;
752
755
  }
753
- async function Qe(e) {
756
+ async function Ze(e) {
754
757
  let t = "", n;
755
758
  try {
756
759
  let r = await e.text();
757
760
  if (r) try {
758
761
  let e = JSON.parse(r), i = e.detail ?? e.message;
759
762
  if (Array.isArray(i)) {
760
- let e = i.map((e) => Ze(e) ?? (typeof e == "string" ? e : void 0)).filter((e) => e !== void 0);
763
+ let e = i.map((e) => Xe(e) ?? (typeof e == "string" ? e : void 0)).filter((e) => e !== void 0);
761
764
  t = e.length > 0 ? e.join(", ") : r;
762
765
  } else t = typeof i == "string" ? i : r;
763
766
  n = typeof e.code == "string" ? e.code : void 0;
@@ -765,9 +768,9 @@ async function Qe(e) {
765
768
  t = r;
766
769
  }
767
770
  } catch {}
768
- return new q(t || `The API answered ${e.status}`, e.status, n);
771
+ return new J(t || `The API answered ${e.status}`, e.status, n);
769
772
  }
770
- function $e(e) {
773
+ function Qe(e) {
771
774
  if (!e || typeof e != "object") return;
772
775
  let t = e;
773
776
  if (!(typeof t.handle != "string" || !t.handle)) return {
@@ -777,10 +780,10 @@ function $e(e) {
777
780
  color: typeof t.color == "string" ? t.color : void 0
778
781
  };
779
782
  }
780
- function et(e) {
781
- return (Array.isArray(e) ? e : []).map($e).filter((e) => e !== void 0);
783
+ function $e(e) {
784
+ return (Array.isArray(e) ? e : []).map(Qe).filter((e) => e !== void 0);
782
785
  }
783
- function tt(e) {
786
+ function et(e) {
784
787
  if (!e || typeof e != "object") return;
785
788
  let t = e;
786
789
  if (!(typeof t.tool_call_id != "string" || !t.tool_call_id)) return {
@@ -789,26 +792,26 @@ function tt(e) {
789
792
  arguments: t.arguments && typeof t.arguments == "object" ? t.arguments : {}
790
793
  };
791
794
  }
792
- var nt = /* @__PURE__ */ new Set(["user", "assistant"]);
793
- function rt(e) {
794
- if (typeof e.role != "string" || !nt.has(e.role) || typeof e.content != "string" || !e.content) return null;
795
+ var tt = /* @__PURE__ */ new Set(["user", "assistant"]);
796
+ function nt(e) {
797
+ if (typeof e.role != "string" || !tt.has(e.role) || typeof e.content != "string" || !e.content) return null;
795
798
  let t = typeof e.created_at == "string" ? Date.parse(e.created_at) : NaN;
796
799
  return {
797
- id: typeof e.id == "string" && e.id ? e.id : He(),
800
+ id: typeof e.id == "string" && e.id ? e.id : Ve(),
798
801
  role: e.role,
799
802
  content: e.content,
800
803
  createdAt: Number.isNaN(t) ? Date.now() : t,
801
- agent: $e(e.agent),
802
- attachments: it(e.attachments),
804
+ agent: Qe(e.agent),
805
+ attachments: rt(e.attachments),
803
806
  authorName: e.kind === "human" && typeof e.author_name == "string" && e.author_name ? e.author_name : void 0
804
807
  };
805
808
  }
806
- function it(e) {
809
+ function rt(e) {
807
810
  if (!Array.isArray(e)) return;
808
- let t = e.map((e) => at(e)).filter((e) => e !== null);
811
+ let t = e.map((e) => it(e)).filter((e) => e !== null);
809
812
  return t.length > 0 ? t : void 0;
810
813
  }
811
- function at(e) {
814
+ function it(e) {
812
815
  if (!e || typeof e != "object") return null;
813
816
  let { id: t, kind: n, filename: r, content_type: i } = e;
814
817
  return typeof t != "string" || !t || typeof r != "string" || !r ? null : {
@@ -818,20 +821,20 @@ function at(e) {
818
821
  contentType: typeof i == "string" ? i : "application/octet-stream"
819
822
  };
820
823
  }
821
- async function ot(e) {
822
- let t = await fetch(Ye(e.apiUrl, `/public/applications/${encodeURIComponent(e.embedKey)}/conversations`), {
824
+ async function at(e) {
825
+ let t = await fetch(Je(e.apiUrl, `/public/applications/${encodeURIComponent(e.embedKey)}/conversations`), {
823
826
  method: "POST",
824
- headers: Xe(),
827
+ headers: Ye(),
825
828
  body: JSON.stringify({
826
829
  ...e.user ? { user: e.user } : {},
827
830
  ...e.agent ? { agent: e.agent } : {}
828
831
  }),
829
832
  signal: e.signal
830
833
  });
831
- if (!t.ok) throw await Qe(t);
834
+ if (!t.ok) throw await Ze(t);
832
835
  let n = await t.json();
833
- if (typeof n.id != "string" || typeof n.visitor_token != "string") throw new q("The API opened a conversation without an id or a token");
834
- let r = (Array.isArray(n.messages) ? n.messages : []).map(rt).filter((e) => e !== null);
836
+ if (typeof n.id != "string" || typeof n.visitor_token != "string") throw new J("The API opened a conversation without an id or a token");
837
+ let r = (Array.isArray(n.messages) ? n.messages : []).map(nt).filter((e) => e !== null);
835
838
  return {
836
839
  conversationId: n.id,
837
840
  visitorToken: n.visitor_token,
@@ -839,87 +842,89 @@ async function ot(e) {
839
842
  agentSlug: typeof n.agent_slug == "string" ? n.agent_slug : "",
840
843
  welcomeMessage: typeof n.welcome_message == "string" && n.welcome_message ? n.welcome_message : void 0,
841
844
  messages: r,
842
- handles: et(n.handles),
845
+ handles: $e(n.handles),
843
846
  agentHandle: typeof n.agent_handle == "string" && n.agent_handle ? n.agent_handle : void 0,
844
- withHuman: typeof n.handling == "string" && n.handling !== "agents"
847
+ withHuman: typeof n.handling == "string" && n.handling !== "agents",
848
+ branding: n.branding === !0
845
849
  };
846
850
  }
847
- async function st(e) {
848
- let t = await fetch(Ye(e.apiUrl, `/public/conversations/${encodeURIComponent(e.conversationId)}`), {
851
+ async function ot(e) {
852
+ let t = await fetch(Je(e.apiUrl, `/public/conversations/${encodeURIComponent(e.conversationId)}`), {
849
853
  method: "GET",
850
- headers: Xe(e.visitorToken),
854
+ headers: Ye(e.visitorToken),
851
855
  signal: e.signal
852
856
  });
853
- if (!t.ok) throw await Qe(t);
857
+ if (!t.ok) throw await Ze(t);
854
858
  let n = await t.json();
855
- if (typeof n.id != "string") throw new q("The API replayed a conversation without an id");
859
+ if (typeof n.id != "string") throw new J("The API replayed a conversation without an id");
856
860
  return {
857
861
  conversationId: n.id,
858
862
  visitorToken: e.visitorToken,
859
863
  agentName: typeof n.agent_name == "string" ? n.agent_name : "",
860
864
  agentSlug: typeof n.agent_slug == "string" ? n.agent_slug : "",
861
865
  welcomeMessage: typeof n.welcome_message == "string" && n.welcome_message ? n.welcome_message : void 0,
862
- messages: (Array.isArray(n.messages) ? n.messages : []).map(rt).filter((e) => e !== null),
863
- handles: et(n.handles),
866
+ messages: (Array.isArray(n.messages) ? n.messages : []).map(nt).filter((e) => e !== null),
867
+ handles: $e(n.handles),
864
868
  agentHandle: typeof n.agent_handle == "string" && n.agent_handle ? n.agent_handle : void 0,
865
- withHuman: typeof n.handling == "string" && n.handling !== "agents"
869
+ withHuman: typeof n.handling == "string" && n.handling !== "agents",
870
+ branding: n.branding === !0
866
871
  };
867
872
  }
868
- async function ct(e) {
873
+ async function st(e) {
869
874
  let t = new FormData();
870
875
  t.append("file", e.file);
871
- let n = await fetch(dt(e), {
876
+ let n = await fetch(ut(e), {
872
877
  method: "POST",
873
878
  headers: { "X-Visitor-Token": e.visitorToken },
874
879
  body: t,
875
880
  signal: e.signal
876
881
  });
877
- if (!n.ok) throw await Qe(n);
878
- let r = at(await n.json());
879
- if (!r) throw new q("The upload could not be read", n.status);
882
+ if (!n.ok) throw await Ze(n);
883
+ let r = it(await n.json());
884
+ if (!r) throw new J("The upload could not be read", n.status);
880
885
  return r;
881
886
  }
882
- async function lt(e) {
883
- let t = await fetch(`${dt(e)}/${encodeURIComponent(e.attachmentId)}`, {
887
+ async function ct(e) {
888
+ let t = await fetch(`${ut(e)}/${encodeURIComponent(e.attachmentId)}`, {
884
889
  method: "DELETE",
885
890
  headers: { "X-Visitor-Token": e.visitorToken },
886
891
  signal: e.signal
887
892
  });
888
- if (!t.ok) throw await Qe(t);
893
+ if (!t.ok) throw await Ze(t);
889
894
  }
890
- async function ut(e) {
891
- let t = await fetch(`${dt(e)}/${encodeURIComponent(e.attachmentId)}/content`, {
895
+ async function lt(e) {
896
+ let t = await fetch(`${ut(e)}/${encodeURIComponent(e.attachmentId)}/content`, {
892
897
  headers: { "X-Visitor-Token": e.visitorToken },
893
898
  signal: e.signal
894
899
  });
895
- if (!t.ok) throw await Qe(t);
900
+ if (!t.ok) throw await Ze(t);
896
901
  return t.blob();
897
902
  }
898
- function dt(e) {
899
- return Ye(e.apiUrl, `/public/conversations/${encodeURIComponent(e.conversationId)}/attachments`);
903
+ function ut(e) {
904
+ return Je(e.apiUrl, `/public/conversations/${encodeURIComponent(e.conversationId)}/attachments`);
900
905
  }
901
- async function ft(e) {
902
- return mt(Ye(e.apiUrl, `/public/conversations/${encodeURIComponent(e.conversationId)}/messages`), {
906
+ async function dt(e) {
907
+ return pt(Je(e.apiUrl, `/public/conversations/${encodeURIComponent(e.conversationId)}/messages`), {
903
908
  content: e.message,
904
909
  attachment_ids: e.attachmentIds ?? [],
905
910
  ...e.context && Object.keys(e.context).length > 0 ? { context: e.context } : {}
906
911
  }, e);
907
912
  }
908
- async function pt(e) {
909
- return mt(Ye(e.apiUrl, `/public/conversations/${encodeURIComponent(e.conversationId)}/approvals`), {
913
+ async function ft(e) {
914
+ return pt(Je(e.apiUrl, `/public/conversations/${encodeURIComponent(e.conversationId)}/approvals`), {
910
915
  tool_call_id: e.toolCallId,
911
916
  approved: e.approved
912
917
  }, e);
913
918
  }
914
- async function mt(e, t, n) {
919
+ async function pt(e, t, n) {
915
920
  let r = await fetch(e, {
916
921
  method: "POST",
917
- headers: Xe(n.visitorToken, n.subjectToken),
922
+ headers: Ye(n.visitorToken, n.subjectToken),
918
923
  body: JSON.stringify(t),
919
924
  signal: n.signal
920
925
  });
921
- if (!r.ok) throw await Qe(r);
922
- if (!r.body) throw new q("Answer with no stream body");
926
+ if (!r.ok) throw await Ze(r);
927
+ if (!r.body) throw new J("Answer with no stream body");
923
928
  let i = r.body.getReader(), a = new TextDecoder(), o = "", s = "", c = "", l, u, d = { answer: "" };
924
929
  try {
925
930
  for (;;) {
@@ -947,23 +952,23 @@ async function mt(e, t, n) {
947
952
  } catch {
948
953
  continue;
949
954
  }
950
- s === "token" && typeof i.text == "string" ? (c += i.text, n.onToken(i.text)) : s === "done" ? (d.answer = typeof i.content == "string" ? i.content : c, d.agent = $e(i.agent), typeof i.unknown_handle == "string" && i.unknown_handle && (d.unknownHandle = i.unknown_handle, d.offered = et(i.handles))) : s === "handoff" ? (typeof i.to_agent_name == "string" && (u = i.to_agent_name), c = "") : s === "escalated" ? d.withHuman = !0 : s === "held" ? (d.held = !0, d.withHuman = !0) : s === "approval_required" ? d.approval = tt(i) : s === "error" && (l = typeof i.detail == "string" ? i.detail : "The turn failed");
955
+ s === "token" && typeof i.text == "string" ? (c += i.text, n.onToken(i.text)) : s === "done" ? (d.answer = typeof i.content == "string" ? i.content : c, d.agent = Qe(i.agent), typeof i.unknown_handle == "string" && i.unknown_handle && (d.unknownHandle = i.unknown_handle, d.offered = $e(i.handles))) : s === "handoff" ? (typeof i.to_agent_name == "string" && (u = i.to_agent_name), c = "") : s === "escalated" ? d.withHuman = !0 : s === "held" ? (d.held = !0, d.withHuman = !0) : s === "approval_required" ? d.approval = et(i) : s === "error" && (l = typeof i.detail == "string" ? i.detail : "The turn failed");
951
956
  }
952
957
  if (l) break;
953
958
  }
954
959
  } finally {
955
960
  i.cancel().catch(() => void 0);
956
961
  }
957
- if (l) throw new q(l);
962
+ if (l) throw new J(l);
958
963
  return !d.answer && !d.approval && (d.answer = c), u && !d.agent && (d.authorName = u), d;
959
964
  }
960
965
  //#endregion
961
966
  //#region src/lib/conversation.ts
962
- var ht = "squadico-chatbot:conversation";
963
- function gt() {
967
+ var mt = "squadico-chatbot:conversation";
968
+ function ht() {
964
969
  try {
965
970
  if (typeof sessionStorage > "u") return;
966
- let e = sessionStorage.getItem(ht);
971
+ let e = sessionStorage.getItem(mt);
967
972
  if (!e) return;
968
973
  let t = JSON.parse(e);
969
974
  return !t.sessionId || !t.visitorToken || !t.embedKey ? void 0 : {
@@ -976,110 +981,110 @@ function gt() {
976
981
  return;
977
982
  }
978
983
  }
979
- function _t(e) {
984
+ function gt(e) {
980
985
  try {
981
986
  if (typeof sessionStorage > "u") return;
982
- sessionStorage.setItem(ht, JSON.stringify(e));
987
+ sessionStorage.setItem(mt, JSON.stringify(e));
983
988
  } catch {}
984
989
  }
985
- function vt() {
990
+ function _t() {
986
991
  try {
987
992
  if (typeof sessionStorage > "u") return;
988
- sessionStorage.removeItem(ht);
993
+ sessionStorage.removeItem(mt);
989
994
  } catch {}
990
995
  }
991
- function yt(e, { embedKey: t, user: n }) {
996
+ function vt(e, { embedKey: t, user: n }) {
992
997
  return e.embedKey === t && e.user === n;
993
998
  }
994
999
  //#endregion
995
1000
  //#region src/lib/useChat.ts
996
- async function bt(e) {
1001
+ async function yt(e) {
997
1002
  if (e) try {
998
1003
  return await e() || void 0;
999
1004
  } catch {
1000
1005
  return;
1001
1006
  }
1002
1007
  }
1003
- function xt(e) {
1004
- let t = e instanceof q ? e.status : void 0;
1008
+ function bt(e) {
1009
+ let t = e instanceof J ? e.status : void 0;
1005
1010
  return t === 415 ? "unsupported" : t === 413 ? "tooLarge" : t === 409 ? "tooMany" : t === 422 ? "unreadable" : "failed";
1006
1011
  }
1007
- var St = 5e3;
1008
- function Ct(e) {
1009
- return e instanceof q && e.code === "conversation_retired";
1012
+ var xt = 5e3;
1013
+ function St(e) {
1014
+ return e instanceof J && e.code === "conversation_retired";
1010
1015
  }
1011
- function wt(e) {
1012
- let [t, n] = H([]), [r, i] = H(!1), [a, o] = H(""), [s, c] = H([]), [l, u] = H(""), [d, f] = H(null), [p, m] = H(!1), [h, g] = H([]), [_, v] = H([]), [y, b] = H(null), x = W(null), S = W(e);
1013
- S.current = e;
1014
- let C = W(null), w = W(null), T = W(void 0), E = e.greeting, D = G(() => E ? {
1016
+ function Ct(e) {
1017
+ let [t, n] = U([]), [r, i] = U(!1), [a, o] = U(""), [s, c] = U([]), [l, u] = U(""), [d, f] = U(null), [p, m] = U(!1), [h, g] = U(!1), [_, v] = U([]), [y, b] = U([]), [x, S] = U(null), C = G(null), w = G(e);
1018
+ w.current = e;
1019
+ let T = G(null), E = G(null), D = G(void 0), O = e.greeting, k = K(() => O ? {
1015
1020
  id: "greeting",
1016
1021
  role: "assistant",
1017
- content: E,
1022
+ content: O,
1018
1023
  createdAt: Date.now()
1019
- } : null, [E]), O = K((e) => {
1020
- S.current.onEvent?.(e);
1021
- }, []), k = K((e, t) => {
1024
+ } : null, [O]), A = q((e) => {
1025
+ w.current.onEvent?.(e);
1026
+ }, []), j = q((e, t) => {
1022
1027
  n((n) => n.map((n) => n.id === e ? {
1023
1028
  ...n,
1024
1029
  ...t
1025
1030
  } : n));
1026
- }, []), A = K((e, t) => {
1027
- let n = e instanceof q ? e.status : void 0, r = e instanceof Error ? e.message : String(e), i = (S.current.locale ?? Le(void 0)).t.error;
1028
- t && k(t, {
1031
+ }, []), M = q((e, t) => {
1032
+ let n = e instanceof J ? e.status : void 0, r = e instanceof Error ? e.message : String(e), i = (w.current.locale ?? Ie(void 0)).t.error;
1033
+ t && j(t, {
1029
1034
  content: i,
1030
1035
  streaming: !1,
1031
1036
  error: !0
1032
- }), O({
1037
+ }), A({
1033
1038
  type: "chatbot-error",
1034
1039
  message: r,
1035
1040
  status: n,
1036
- sessionId: w.current?.sessionId ?? ""
1041
+ sessionId: E.current?.sessionId ?? ""
1037
1042
  }), typeof console < "u" && console.error("[squadico-chatbot]", r);
1038
- }, [O, k]), j = K(async () => {
1039
- if (w.current) return w.current;
1040
- if (C.current) return C.current;
1041
- let e = S.current;
1042
- if (!e.embedKey) throw new q("No embed key: nothing says which application to open");
1043
+ }, [A, j]), N = q(async () => {
1044
+ if (E.current) return E.current;
1045
+ if (T.current) return T.current;
1046
+ let e = w.current;
1047
+ if (!e.embedKey) throw new J("No embed key: nothing says which application to open");
1043
1048
  let t = e.user, r = e.apiUrl ?? "https://api.squadico.com", i = e.embedKey, a = (r) => {
1044
1049
  let a = {
1045
1050
  sessionId: r.conversationId,
1046
1051
  visitorToken: r.visitorToken
1047
1052
  };
1048
- return w.current = a, T.current = t?.id, _t({
1053
+ return E.current = a, D.current = t?.id, gt({
1049
1054
  ...a,
1050
1055
  embedKey: i,
1051
1056
  user: t?.id
1052
- }), o(r.conversationId), c(r.handles), u(e.agent && r.agentHandle ? r.agentHandle : ""), m(!!r.withHuman), r.messages.length > 0 && n((e) => [...r.messages, ...e]), a;
1053
- }, s = () => ot({
1057
+ }), o(r.conversationId), c(r.handles), u(e.agent && r.agentHandle ? r.agentHandle : ""), m(!!r.withHuman), g(r.branding), r.messages.length > 0 && n((e) => [...r.messages, ...e]), a;
1058
+ }, s = () => at({
1054
1059
  apiUrl: r,
1055
1060
  embedKey: i,
1056
1061
  user: t,
1057
1062
  agent: e.agent
1058
- }).then(a), l = gt(), d = l && yt(l, {
1063
+ }).then(a), l = ht(), d = l && vt(l, {
1059
1064
  embedKey: i,
1060
1065
  user: t?.id
1061
- }) ? st({
1066
+ }) ? ot({
1062
1067
  apiUrl: r,
1063
1068
  conversationId: l.sessionId,
1064
1069
  visitorToken: l.visitorToken
1065
- }).then(a).catch(() => (vt(), s())) : s();
1066
- C.current = d;
1070
+ }).then(a).catch(() => (_t(), s())) : s();
1071
+ T.current = d;
1067
1072
  try {
1068
1073
  return await d;
1069
1074
  } finally {
1070
- C.current = null;
1075
+ T.current = null;
1071
1076
  }
1072
- }, []), M = K(() => {
1073
- w.current || C.current || j().catch((e) => A(e));
1074
- }, [j, A]), N = K((e, t, { retry: r = !1, carried: a = [] } = {}) => {
1075
- if (x.current) return;
1077
+ }, []), P = q(() => {
1078
+ E.current || T.current || N().catch((e) => M(e));
1079
+ }, [N, M]), F = q((e, t, { retry: r = !1, carried: a = [] } = {}) => {
1080
+ if (C.current) return;
1076
1081
  let o = new AbortController();
1077
- x.current = o, i(!0), f(null);
1078
- let s = He();
1082
+ C.current = o, i(!0), f(null);
1083
+ let s = Ve();
1079
1084
  n((t) => [
1080
1085
  ...t,
1081
1086
  {
1082
- id: He(),
1087
+ id: Ve(),
1083
1088
  role: "user",
1084
1089
  content: e,
1085
1090
  createdAt: Date.now(),
@@ -1093,27 +1098,27 @@ function wt(e) {
1093
1098
  streaming: !0
1094
1099
  }
1095
1100
  ]), (async () => {
1096
- let i = await j();
1097
- O({
1101
+ let i = await N();
1102
+ A({
1098
1103
  type: "chatbot-message",
1099
1104
  role: "user",
1100
1105
  content: e,
1101
1106
  sessionId: i.sessionId
1102
1107
  });
1103
1108
  let a = "", c = (e) => {
1104
- a += e, k(s, { content: a });
1109
+ a += e, j(s, { content: a });
1105
1110
  }, l;
1106
1111
  try {
1107
1112
  l = await t(i, c, o.signal);
1108
1113
  } catch (e) {
1109
- if (!Ct(e) || (vt(), w.current = null, C.current = null, !r)) throw e;
1110
- i = await j(), a = "", k(s, { content: "" }), l = await t(i, c, o.signal);
1114
+ if (!St(e) || (_t(), E.current = null, T.current = null, !r)) throw e;
1115
+ i = await N(), a = "", j(s, { content: "" }), l = await t(i, c, o.signal);
1111
1116
  }
1112
1117
  if (l.withHuman && m(!0), l.held) {
1113
1118
  n((e) => e.filter((e) => e.id !== s));
1114
1119
  return;
1115
1120
  }
1116
- k(s, {
1121
+ j(s, {
1117
1122
  content: l.answer,
1118
1123
  streaming: !1,
1119
1124
  agent: l.agent,
@@ -1121,7 +1126,7 @@ function wt(e) {
1121
1126
  approval: l.approval,
1122
1127
  unknownHandle: l.unknownHandle,
1123
1128
  offered: l.offered
1124
- }), f(l.approval ?? null), O({
1129
+ }), f(l.approval ?? null), A({
1125
1130
  type: "chatbot-message",
1126
1131
  role: "assistant",
1127
1132
  content: l.answer,
@@ -1130,69 +1135,69 @@ function wt(e) {
1130
1135
  });
1131
1136
  })().catch((e) => {
1132
1137
  if (o.signal.aborted) {
1133
- k(s, { streaming: !1 });
1138
+ j(s, { streaming: !1 });
1134
1139
  return;
1135
1140
  }
1136
- A(e, s);
1141
+ M(e, s);
1137
1142
  }).finally(() => {
1138
- x.current = null, i(!1);
1143
+ C.current = null, i(!1);
1139
1144
  });
1140
1145
  }, [
1141
- j,
1142
- O,
1146
+ N,
1143
1147
  A,
1144
- k
1145
- ]), P = K((e) => {
1148
+ M,
1149
+ j
1150
+ ]), ee = q((e) => {
1146
1151
  let t = e.trim();
1147
- if (!t && h.length === 0) return;
1148
- let n = h;
1149
- g([]), b(null), N(t, async (e, r, i) => ft({
1150
- subjectToken: await bt(S.current.getSubjectToken),
1151
- apiUrl: S.current.apiUrl ?? "https://api.squadico.com",
1152
+ if (!t && _.length === 0) return;
1153
+ let n = _;
1154
+ v([]), S(null), F(t, async (e, r, i) => dt({
1155
+ subjectToken: await yt(w.current.getSubjectToken),
1156
+ apiUrl: w.current.apiUrl ?? "https://api.squadico.com",
1152
1157
  conversationId: e.sessionId,
1153
1158
  visitorToken: e.visitorToken,
1154
1159
  message: t,
1155
1160
  attachmentIds: n.map((e) => e.id),
1156
- context: S.current.context ? Ae(S.current.context) : void 0,
1161
+ context: w.current.context ? ke(w.current.context) : void 0,
1157
1162
  onToken: r,
1158
1163
  signal: i
1159
1164
  }), {
1160
1165
  retry: !0,
1161
1166
  carried: n
1162
1167
  });
1163
- }, [h, N]), F = K((e) => {
1164
- b(null), v((t) => [...t, e.name]), j().then((t) => ct({
1165
- apiUrl: S.current.apiUrl ?? "https://api.squadico.com",
1168
+ }, [_, F]), I = q((e) => {
1169
+ S(null), b((t) => [...t, e.name]), N().then((t) => st({
1170
+ apiUrl: w.current.apiUrl ?? "https://api.squadico.com",
1166
1171
  conversationId: t.sessionId,
1167
1172
  visitorToken: t.visitorToken,
1168
1173
  file: e
1169
- })).then((e) => g((t) => [...t, e])).catch((e) => b(xt(e))).finally(() => v((t) => {
1174
+ })).then((e) => v((t) => [...t, e])).catch((e) => S(bt(e))).finally(() => b((t) => {
1170
1175
  let n = t.indexOf(e.name);
1171
1176
  return n < 0 ? t : [...t.slice(0, n), ...t.slice(n + 1)];
1172
1177
  }));
1173
- }, [j]), I = K((e) => {
1174
- g((t) => t.filter((t) => t.id !== e));
1175
- let t = w.current;
1176
- t && lt({
1177
- apiUrl: S.current.apiUrl ?? "https://api.squadico.com",
1178
+ }, [N]), L = q((e) => {
1179
+ v((t) => t.filter((t) => t.id !== e));
1180
+ let t = E.current;
1181
+ t && ct({
1182
+ apiUrl: w.current.apiUrl ?? "https://api.squadico.com",
1178
1183
  conversationId: t.sessionId,
1179
1184
  visitorToken: t.visitorToken,
1180
1185
  attachmentId: e
1181
1186
  }).catch(() => {});
1182
- }, []), L = K(async (e) => {
1183
- let t = w.current;
1184
- if (!t) throw new q("No conversation to read that file from");
1185
- return ut({
1186
- apiUrl: S.current.apiUrl ?? "https://api.squadico.com",
1187
+ }, []), te = q(async (e) => {
1188
+ let t = E.current;
1189
+ if (!t) throw new J("No conversation to read that file from");
1190
+ return lt({
1191
+ apiUrl: w.current.apiUrl ?? "https://api.squadico.com",
1187
1192
  conversationId: t.sessionId,
1188
1193
  visitorToken: t.visitorToken,
1189
1194
  attachmentId: e
1190
1195
  });
1191
- }, []), ee = K((e, t) => {
1196
+ }, []), R = q((e, t) => {
1192
1197
  let n = d;
1193
- n && N(t, async (t, r, i) => pt({
1194
- subjectToken: await bt(S.current.getSubjectToken),
1195
- apiUrl: S.current.apiUrl ?? "https://api.squadico.com",
1198
+ n && F(t, async (t, r, i) => ft({
1199
+ subjectToken: await yt(w.current.getSubjectToken),
1200
+ apiUrl: w.current.apiUrl ?? "https://api.squadico.com",
1196
1201
  conversationId: t.sessionId,
1197
1202
  visitorToken: t.visitorToken,
1198
1203
  toolCallId: n.toolCallId,
@@ -1200,61 +1205,62 @@ function wt(e) {
1200
1205
  onToken: r,
1201
1206
  signal: i
1202
1207
  }));
1203
- }, [d, N]), R = K(() => {
1204
- x.current?.abort(), x.current = null, i(!1);
1205
- }, []), te = K(() => {
1206
- x.current?.abort(), x.current = null, w.current = null, C.current = null, T.current = void 0, vt(), i(!1), f(null), m(!1), o(""), u(""), n([]), O({
1208
+ }, [d, F]), ne = q(() => {
1209
+ C.current?.abort(), C.current = null, i(!1);
1210
+ }, []), z = q(() => {
1211
+ C.current?.abort(), C.current = null, E.current = null, T.current = null, D.current = void 0, _t(), i(!1), f(null), m(!1), o(""), u(""), n([]), A({
1207
1212
  type: "chatbot-reset",
1208
1213
  sessionId: ""
1209
1214
  });
1210
- }, [O]), z = e.humanPollMs ?? St;
1211
- U(() => {
1215
+ }, [A]), re = e.humanPollMs ?? xt;
1216
+ W(() => {
1212
1217
  if (!p || !a) return;
1213
1218
  let e = setInterval(() => {
1214
- let e = w.current;
1215
- !e || x.current || st({
1216
- apiUrl: S.current.apiUrl ?? "https://api.squadico.com",
1219
+ let e = E.current;
1220
+ !e || C.current || ot({
1221
+ apiUrl: w.current.apiUrl ?? "https://api.squadico.com",
1217
1222
  conversationId: e.sessionId,
1218
1223
  visitorToken: e.visitorToken
1219
1224
  }).then((e) => {
1220
1225
  n(e.messages), m(!!e.withHuman);
1221
1226
  }).catch(() => {});
1222
- }, z);
1227
+ }, re);
1223
1228
  return () => clearInterval(e);
1224
1229
  }, [
1225
1230
  p,
1226
1231
  a,
1227
- z
1232
+ re
1228
1233
  ]);
1229
- let ne = e.user?.id;
1230
- return U(() => {
1231
- w.current && T.current !== ne && te();
1232
- }, [ne, te]), {
1233
- messages: G(() => t.length === 0 && D ? [D] : t, [D, t]),
1234
+ let ie = e.user?.id;
1235
+ return W(() => {
1236
+ E.current && D.current !== ie && z();
1237
+ }, [ie, z]), {
1238
+ messages: K(() => t.length === 0 && k ? [k] : t, [k, t]),
1234
1239
  busy: r,
1235
1240
  sessionId: a,
1236
1241
  handles: s,
1237
1242
  addressee: l,
1238
1243
  approval: d,
1239
1244
  withHuman: p,
1240
- start: M,
1241
- send: P,
1242
- attachments: h,
1243
- uploading: _,
1244
- attachmentError: y,
1245
- attach: F,
1246
- detach: I,
1247
- loadAttachment: L,
1248
- decide: ee,
1249
- stop: R,
1250
- reset: te
1245
+ branding: h,
1246
+ start: P,
1247
+ send: ee,
1248
+ attachments: _,
1249
+ uploading: y,
1250
+ attachmentError: x,
1251
+ attach: I,
1252
+ detach: L,
1253
+ loadAttachment: te,
1254
+ decide: R,
1255
+ stop: ne,
1256
+ reset: z
1251
1257
  };
1252
1258
  }
1253
1259
  //#endregion
1254
1260
  //#region node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
1255
- var Tt = 0;
1261
+ var wt = 0;
1256
1262
  Array.isArray;
1257
- function J(e, n, r, i, a, o) {
1263
+ function Y(e, n, r, i, a, o) {
1258
1264
  n || (n = {});
1259
1265
  var s, c, l = n;
1260
1266
  if ("ref" in l) for (c in l = {}, n) c == "ref" ? s = n[c] : l[c] = n[c];
@@ -1269,7 +1275,7 @@ function J(e, n, r, i, a, o) {
1269
1275
  __e: null,
1270
1276
  __c: null,
1271
1277
  constructor: void 0,
1272
- __v: --Tt,
1278
+ __v: --wt,
1273
1279
  __i: -1,
1274
1280
  __u: 0,
1275
1281
  __source: a,
@@ -1280,36 +1286,36 @@ function J(e, n, r, i, a, o) {
1280
1286
  }
1281
1287
  //#endregion
1282
1288
  //#region src/components/Composer.tsx
1283
- var Et = 132, Dt = "image/png,image/jpeg,image/gif,image/webp,application/pdf,.docx,.txt,.md,.csv,.json", Ot = /^[a-zA-Z0-9_-]*$/;
1284
- function kt(e, t) {
1289
+ var Tt = 132, Et = "image/png,image/jpeg,image/gif,image/webp,application/pdf,.docx,.txt,.md,.csv,.json", Dt = /^[a-zA-Z0-9_-]*$/;
1290
+ function Ot(e, t) {
1285
1291
  let n = e.slice(0, t), r = n.lastIndexOf("@");
1286
1292
  if (r < 0 || r > 0 && !/\s/.test(n[r - 1] ?? "")) return null;
1287
1293
  let i = n.slice(r + 1);
1288
- return Ot.test(i) ? {
1294
+ return Dt.test(i) ? {
1289
1295
  start: r,
1290
1296
  query: i
1291
1297
  } : null;
1292
1298
  }
1293
- function At({ placeholder: e, locale: t, busy: n, autoFocus: r, handles: i, addressee: a, attachments: o = [], uploading: s = [], attachmentError: c, onAttach: l, onDetach: u, onSend: d, onStop: f }) {
1294
- let [p, m] = H(""), [h, g] = H(null), [_, v] = H(0), [y, b] = H(!1), x = W(null), C = W(null), w = !!l, T = s.length > 0, E = G(() => {
1299
+ function kt({ placeholder: e, locale: t, busy: n, autoFocus: r, handles: i, addressee: a, attachments: o = [], uploading: s = [], attachmentError: c, onAttach: l, onDetach: u, onSend: d, onStop: f }) {
1300
+ let [p, m] = U(""), [h, g] = U(null), [_, v] = U(0), [y, b] = U(!1), x = G(null), C = G(null), w = !!l, T = s.length > 0, E = K(() => {
1295
1301
  if (!h || !i || i.length === 0) return [];
1296
1302
  let e = h.query.toLowerCase();
1297
1303
  return i.filter((t) => t.handle.startsWith(e));
1298
- }, [i, h]), D = E.length > 0, O = K(() => {
1304
+ }, [i, h]), D = E.length > 0, O = q(() => {
1299
1305
  let e = x.current;
1300
1306
  if (!e) return;
1301
1307
  e.style.height = "auto";
1302
- let t = e.scrollHeight > Et;
1303
- e.style.height = `${Math.min(e.scrollHeight, Et)}px`, e.style.overflowY = t ? "auto" : "hidden";
1308
+ let t = e.scrollHeight > Tt;
1309
+ e.style.height = `${Math.min(e.scrollHeight, Tt)}px`, e.style.overflowY = t ? "auto" : "hidden";
1304
1310
  }, []);
1305
- U(() => {
1311
+ W(() => {
1306
1312
  r && x.current?.focus(), O();
1307
- }, [r, O]), U(() => {
1313
+ }, [r, O]), W(() => {
1308
1314
  a && (m((e) => e || `@${a} `), requestAnimationFrame(O));
1309
1315
  }, [a, O]);
1310
- let k = K((e) => {
1311
- g(kt(e.value, e.selectionStart ?? e.value.length)), v(0);
1312
- }, []), A = K((e) => {
1316
+ let k = q((e) => {
1317
+ g(Ot(e.value, e.selectionStart ?? e.value.length)), v(0);
1318
+ }, []), A = q((e) => {
1313
1319
  let t = x.current;
1314
1320
  if (!t || !h) return;
1315
1321
  let n = t.selectionStart ?? t.value.length, r = `${p.slice(0, h.start)}@${e} ${p.slice(n)}`, i = h.start + e.length + 2;
@@ -1320,9 +1326,9 @@ function At({ placeholder: e, locale: t, busy: n, autoFocus: r, handles: i, addr
1320
1326
  O,
1321
1327
  h,
1322
1328
  p
1323
- ]), j = K((e) => {
1329
+ ]), j = q((e) => {
1324
1330
  if (!(!l || !e)) for (let t of Array.from(e)) l(t);
1325
- }, [l]), M = K(() => {
1331
+ }, [l]), M = q(() => {
1326
1332
  let e = p.trim();
1327
1333
  !e && o.length === 0 || n || T || (d(e), m(""), g(null), requestAnimationFrame(O));
1328
1334
  }, [
@@ -1332,7 +1338,7 @@ function At({ placeholder: e, locale: t, busy: n, autoFocus: r, handles: i, addr
1332
1338
  d,
1333
1339
  p,
1334
1340
  T
1335
- ]), N = K((e) => {
1341
+ ]), N = q((e) => {
1336
1342
  if (D && !e.isComposing) {
1337
1343
  if (e.key === "ArrowDown" || e.key === "ArrowUp") {
1338
1344
  e.preventDefault();
@@ -1356,8 +1362,8 @@ function At({ placeholder: e, locale: t, busy: n, autoFocus: r, handles: i, addr
1356
1362
  A,
1357
1363
  D,
1358
1364
  M
1359
- ]), P = Je - p.length;
1360
- return /* @__PURE__ */ J("form", {
1365
+ ]), P = qe - p.length;
1366
+ return /* @__PURE__ */ Y("form", {
1361
1367
  class: `sqc-composer${y ? " sqc-composer--dropping" : ""}`,
1362
1368
  onSubmit: (e) => {
1363
1369
  e.preventDefault(), M();
@@ -1370,16 +1376,16 @@ function At({ placeholder: e, locale: t, busy: n, autoFocus: r, handles: i, addr
1370
1376
  w && (e.preventDefault(), b(!1), j(e.dataTransfer?.files ?? null));
1371
1377
  },
1372
1378
  children: [
1373
- (o.length > 0 || T || c) && /* @__PURE__ */ J("div", {
1379
+ (o.length > 0 || T || c) && /* @__PURE__ */ Y("div", {
1374
1380
  class: "sqc-attachments",
1375
1381
  children: [
1376
- o.map((e) => /* @__PURE__ */ J("span", {
1382
+ o.map((e) => /* @__PURE__ */ Y("span", {
1377
1383
  class: "sqc-chip",
1378
1384
  "data-kind": e.kind,
1379
- children: [/* @__PURE__ */ J("span", {
1385
+ children: [/* @__PURE__ */ Y("span", {
1380
1386
  class: "sqc-chip__name",
1381
1387
  children: e.filename
1382
- }), /* @__PURE__ */ J("button", {
1388
+ }), /* @__PURE__ */ Y("button", {
1383
1389
  type: "button",
1384
1390
  class: "sqc-chip__remove",
1385
1391
  "aria-label": t.t.composer.remove.replace("{name}", e.filename),
@@ -1387,28 +1393,28 @@ function At({ placeholder: e, locale: t, busy: n, autoFocus: r, handles: i, addr
1387
1393
  children: "×"
1388
1394
  })]
1389
1395
  }, e.id)),
1390
- s.map((e) => /* @__PURE__ */ J("span", {
1396
+ s.map((e) => /* @__PURE__ */ Y("span", {
1391
1397
  class: "sqc-chip sqc-chip--waiting",
1392
- children: /* @__PURE__ */ J("span", {
1398
+ children: /* @__PURE__ */ Y("span", {
1393
1399
  class: "sqc-chip__name",
1394
1400
  children: e
1395
1401
  })
1396
1402
  }, e)),
1397
- c && /* @__PURE__ */ J("p", {
1403
+ c && /* @__PURE__ */ Y("p", {
1398
1404
  class: "sqc-attachments__error",
1399
1405
  role: "status",
1400
1406
  children: c
1401
1407
  })
1402
1408
  ]
1403
1409
  }),
1404
- /* @__PURE__ */ J("div", {
1410
+ /* @__PURE__ */ Y("div", {
1405
1411
  class: "sqc-composer__field",
1406
1412
  children: [
1407
- D && /* @__PURE__ */ J("ul", {
1413
+ D && /* @__PURE__ */ Y("ul", {
1408
1414
  class: "sqc-mentions",
1409
1415
  role: "listbox",
1410
1416
  "aria-label": t.t.handles.picker,
1411
- children: E.map((e, t) => /* @__PURE__ */ J("li", {
1417
+ children: E.map((e, t) => /* @__PURE__ */ Y("li", {
1412
1418
  role: "option",
1413
1419
  "aria-selected": t === _,
1414
1420
  class: `sqc-mention${t === _ ? " sqc-mention--active" : ""}`,
@@ -1416,29 +1422,29 @@ function At({ placeholder: e, locale: t, busy: n, autoFocus: r, handles: i, addr
1416
1422
  onMouseEnter: () => v(t),
1417
1423
  onClick: () => A(e.handle),
1418
1424
  children: [
1419
- /* @__PURE__ */ J("span", {
1425
+ /* @__PURE__ */ Y("span", {
1420
1426
  class: "sqc-mention__icon",
1421
1427
  "aria-hidden": "true",
1422
1428
  children: e.avatarEmoji ?? "@"
1423
1429
  }),
1424
- /* @__PURE__ */ J("span", {
1430
+ /* @__PURE__ */ Y("span", {
1425
1431
  class: "sqc-mention__handle",
1426
1432
  children: ["@", e.handle]
1427
1433
  }),
1428
- /* @__PURE__ */ J("span", {
1434
+ /* @__PURE__ */ Y("span", {
1429
1435
  class: "sqc-mention__name",
1430
1436
  children: e.name
1431
1437
  })
1432
1438
  ]
1433
1439
  }, e.handle))
1434
1440
  }),
1435
- /* @__PURE__ */ J("textarea", {
1441
+ /* @__PURE__ */ Y("textarea", {
1436
1442
  ref: x,
1437
1443
  class: "sqc-composer__input",
1438
1444
  rows: 1,
1439
1445
  value: p,
1440
1446
  placeholder: e,
1441
- maxLength: Je,
1447
+ maxLength: qe,
1442
1448
  "aria-label": t.t.composer.label,
1443
1449
  onInput: (e) => {
1444
1450
  m(e.currentTarget.value), k(e.currentTarget), O();
@@ -1450,29 +1456,29 @@ function At({ placeholder: e, locale: t, busy: n, autoFocus: r, handles: i, addr
1450
1456
  !w || !t || t.length === 0 || (e.preventDefault(), j(t));
1451
1457
  }
1452
1458
  }),
1453
- P <= 200 && /* @__PURE__ */ J("span", {
1459
+ P <= 200 && /* @__PURE__ */ Y("span", {
1454
1460
  class: "sqc-composer__count",
1455
1461
  "aria-live": "polite",
1456
1462
  children: P
1457
1463
  })
1458
1464
  ]
1459
1465
  }),
1460
- w && /* @__PURE__ */ J(S, { children: [/* @__PURE__ */ J("input", {
1466
+ w && /* @__PURE__ */ Y(S, { children: [/* @__PURE__ */ Y("input", {
1461
1467
  ref: C,
1462
1468
  type: "file",
1463
1469
  multiple: !0,
1464
- accept: Dt,
1470
+ accept: Et,
1465
1471
  class: "sqc-file-input",
1466
1472
  onChange: (e) => {
1467
1473
  j(e.currentTarget.files), e.currentTarget.value = "";
1468
1474
  }
1469
- }), /* @__PURE__ */ J("button", {
1475
+ }), /* @__PURE__ */ Y("button", {
1470
1476
  type: "button",
1471
1477
  class: "sqc-btn sqc-btn--attach",
1472
1478
  onClick: () => C.current?.click(),
1473
1479
  "aria-label": t.t.composer.attach,
1474
1480
  title: t.t.composer.attachTitle,
1475
- children: /* @__PURE__ */ J("svg", {
1481
+ children: /* @__PURE__ */ Y("svg", {
1476
1482
  viewBox: "0 0 24 24",
1477
1483
  fill: "none",
1478
1484
  stroke: "currentColor",
@@ -1480,19 +1486,19 @@ function At({ placeholder: e, locale: t, busy: n, autoFocus: r, handles: i, addr
1480
1486
  "stroke-linecap": "round",
1481
1487
  "stroke-linejoin": "round",
1482
1488
  "aria-hidden": "true",
1483
- children: /* @__PURE__ */ J("path", { d: "M21 11.5l-8.8 8.8a5 5 0 01-7.1-7.1l9-9a3.3 3.3 0 014.7 4.7l-9 9a1.6 1.6 0 01-2.3-2.3l8.3-8.3" })
1489
+ children: /* @__PURE__ */ Y("path", { d: "M21 11.5l-8.8 8.8a5 5 0 01-7.1-7.1l9-9a3.3 3.3 0 014.7 4.7l-9 9a1.6 1.6 0 01-2.3-2.3l8.3-8.3" })
1484
1490
  })
1485
1491
  })] }),
1486
- n ? /* @__PURE__ */ J("button", {
1492
+ n ? /* @__PURE__ */ Y("button", {
1487
1493
  type: "button",
1488
1494
  class: "sqc-btn sqc-btn--stop",
1489
1495
  onClick: f,
1490
1496
  "aria-label": t.t.composer.stop,
1491
1497
  title: t.t.composer.stopTitle,
1492
- children: /* @__PURE__ */ J("svg", {
1498
+ children: /* @__PURE__ */ Y("svg", {
1493
1499
  viewBox: "0 0 24 24",
1494
1500
  "aria-hidden": "true",
1495
- children: /* @__PURE__ */ J("rect", {
1501
+ children: /* @__PURE__ */ Y("rect", {
1496
1502
  x: "7",
1497
1503
  y: "7",
1498
1504
  width: "10",
@@ -1501,13 +1507,13 @@ function At({ placeholder: e, locale: t, busy: n, autoFocus: r, handles: i, addr
1501
1507
  fill: "currentColor"
1502
1508
  })
1503
1509
  })
1504
- }) : /* @__PURE__ */ J("button", {
1510
+ }) : /* @__PURE__ */ Y("button", {
1505
1511
  type: "submit",
1506
1512
  class: "sqc-btn sqc-btn--send",
1507
1513
  disabled: !p.trim() && o.length === 0 || T,
1508
1514
  "aria-label": t.t.composer.send,
1509
1515
  title: t.t.composer.sendTitle,
1510
- children: /* @__PURE__ */ J("svg", {
1516
+ children: /* @__PURE__ */ Y("svg", {
1511
1517
  viewBox: "0 0 24 24",
1512
1518
  fill: "none",
1513
1519
  stroke: "currentColor",
@@ -1515,7 +1521,7 @@ function At({ placeholder: e, locale: t, busy: n, autoFocus: r, handles: i, addr
1515
1521
  "stroke-linecap": "round",
1516
1522
  "stroke-linejoin": "round",
1517
1523
  "aria-hidden": "true",
1518
- children: /* @__PURE__ */ J("path", { d: "M5 12l14-7-5 14-2.5-5.5L5 12z" })
1524
+ children: /* @__PURE__ */ Y("path", { d: "M5 12l14-7-5 14-2.5-5.5L5 12z" })
1519
1525
  })
1520
1526
  })
1521
1527
  ]
@@ -1523,18 +1529,18 @@ function At({ placeholder: e, locale: t, busy: n, autoFocus: r, handles: i, addr
1523
1529
  }
1524
1530
  //#endregion
1525
1531
  //#region src/lib/confirm.ts
1526
- var jt = {
1532
+ var At = {
1527
1533
  fr: /\br[ée]ponde?z? +«?\s*oui\b/i,
1528
1534
  en: /\b(?:reply|answer|respond) +[“"']?\s*yes\b/i,
1529
1535
  es: /\bresponda?e?d? +«?\s*s[íi]\b/i
1530
- }, Mt = {
1536
+ }, jt = {
1531
1537
  fr: [
1532
1538
  /\b(?:confirmes?[- ]tu|confirmez[- ]vous)\b/i,
1533
1539
  /\b(?:valides?[- ]tu|validez[- ]vous)\b/i,
1534
1540
  /\b(?:es[- ]tu s[ûu]re?|[êe]tes[- ]vous s[ûu]re?s?)\b/i,
1535
1541
  /\b(?:dois[- ]je|puis[- ]je)\b/i,
1536
1542
  /\b(?:je continue|on continue|on y va|je lance)\b/i,
1537
- jt.fr
1543
+ At.fr
1538
1544
  ],
1539
1545
  en: [
1540
1546
  /\bdo you confirm\b/i,
@@ -1542,7 +1548,7 @@ var jt = {
1542
1548
  /\b(?:shall|should) I\b/i,
1543
1549
  /\bare you sure\b/i,
1544
1550
  /\b(?:shall we|should I) (?:proceed|continue|go ahead)\b/i,
1545
- jt.en
1551
+ At.en
1546
1552
  ],
1547
1553
  es: [
1548
1554
  /\b(?:confirmas|confirma|confirm[áa]is)\b/i,
@@ -1550,62 +1556,62 @@ var jt = {
1550
1556
  /\best[áa]s? seguro\b/i,
1551
1557
  /\b(?:contin[úu]o|procedo|lo lanzo|lo hago)\b/i,
1552
1558
  /\bquieres? que\b/i,
1553
- jt.es
1559
+ At.es
1554
1560
  ]
1555
- }, Nt = /^\s*(?:[-*•]\s+)?\[[ xX]\]\s+/m;
1556
- function Pt(e, t = "en") {
1557
- if (Nt.test(e)) return !1;
1561
+ }, Mt = /^\s*(?:[-*•]\s+)?\[[ xX]\]\s+/m;
1562
+ function Nt(e, t = "en") {
1563
+ if (Mt.test(e)) return !1;
1558
1564
  let n = e.split("\n").map((e) => e.trim()).filter(Boolean), r = n[n.length - 1];
1559
- return !r || !r.includes("?") && !jt[t].test(r) ? !1 : Mt[t].some((e) => e.test(r));
1565
+ return !r || !r.includes("?") && !At[t].test(r) ? !1 : jt[t].some((e) => e.test(r));
1560
1566
  }
1561
1567
  //#endregion
1562
1568
  //#region src/components/Approval.tsx
1563
- var Ft = /^mcp_[0-9a-f]{8}_/;
1564
- function It(e) {
1565
- let t = e.replace(Ft, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().toLowerCase();
1569
+ var Pt = /^(?:mcp|custom|a2a)_[0-9a-f]{8}_/;
1570
+ function Ft(e) {
1571
+ let t = e.replace(Pt, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().toLowerCase();
1566
1572
  return t ? t.charAt(0).toUpperCase() + t.slice(1) : e;
1567
1573
  }
1568
- function Lt(e) {
1569
- return typeof e == "string" ? e : JSON.stringify(e) ?? String(e);
1574
+ function It(e, t) {
1575
+ return e === !0 ? t.t.confirm.yes : e === !1 ? t.t.confirm.no : typeof e == "string" ? e : JSON.stringify(e) ?? String(e);
1570
1576
  }
1571
- function Rt({ locale: e, call: t, onDecide: n }) {
1572
- let { approval: r, confirm: i } = e.t, [a, o] = H(null), s = !!n && a === null, c = (e, t) => {
1577
+ function Lt({ locale: e, call: t, onDecide: n }) {
1578
+ let { approval: r, confirm: i } = e.t, [a, o] = U(null), s = !!n && a === null, c = (e, t) => {
1573
1579
  o(t), n?.(e, t);
1574
1580
  }, l = t ? Object.entries(t.arguments) : [];
1575
- return /* @__PURE__ */ J("div", {
1581
+ return /* @__PURE__ */ Y("div", {
1576
1582
  class: "sqc-approval",
1577
1583
  role: "group",
1578
1584
  "aria-label": r.group,
1579
1585
  children: [
1580
- t && /* @__PURE__ */ J("p", {
1586
+ t && /* @__PURE__ */ Y("p", {
1581
1587
  class: "sqc-approval__request",
1582
1588
  "data-testid": "sqc-approval-tool",
1583
- children: r.request.replace("{tool}", It(t.tool))
1589
+ children: r.request.replace("{tool}", Ft(t.tool))
1584
1590
  }),
1585
- l.length > 0 && /* @__PURE__ */ J("dl", {
1591
+ l.length > 0 && /* @__PURE__ */ Y("dl", {
1586
1592
  class: "sqc-approval__args",
1587
1593
  "data-testid": "sqc-approval-arguments",
1588
- children: l.map(([e, t]) => /* @__PURE__ */ J("div", {
1594
+ children: l.map(([t, n]) => /* @__PURE__ */ Y("div", {
1589
1595
  class: "sqc-approval__arg",
1590
- children: [/* @__PURE__ */ J("dt", {
1596
+ children: [/* @__PURE__ */ Y("dt", {
1591
1597
  class: "sqc-approval__arg-name",
1592
- children: It(e)
1593
- }), /* @__PURE__ */ J("dd", {
1598
+ children: Ft(t)
1599
+ }), /* @__PURE__ */ Y("dd", {
1594
1600
  class: "sqc-approval__arg-value",
1595
- children: Lt(t)
1601
+ children: It(n, e)
1596
1602
  })]
1597
- }, e))
1603
+ }, t))
1598
1604
  }),
1599
- /* @__PURE__ */ J("div", {
1605
+ /* @__PURE__ */ Y("div", {
1600
1606
  class: "sqc-approval__actions",
1601
- children: [/* @__PURE__ */ J("button", {
1607
+ children: [/* @__PURE__ */ Y("button", {
1602
1608
  type: "button",
1603
1609
  class: "sqc-approval__btn sqc-approval__btn--yes",
1604
1610
  "aria-pressed": a === i.yes,
1605
1611
  disabled: !s,
1606
1612
  onClick: () => c(!0, i.yes),
1607
1613
  children: r.approve
1608
- }), /* @__PURE__ */ J("button", {
1614
+ }), /* @__PURE__ */ Y("button", {
1609
1615
  type: "button",
1610
1616
  class: "sqc-approval__btn sqc-approval__btn--no",
1611
1617
  "aria-pressed": a === i.no,
@@ -1619,8 +1625,8 @@ function Rt({ locale: e, call: t, onDecide: n }) {
1619
1625
  }
1620
1626
  //#endregion
1621
1627
  //#region src/components/Confirm.tsx
1622
- function zt({ locale: e, onPick: t }) {
1623
- let [n, r] = H(null), i = !!t && n === null, { confirm: a } = e.t, o = [{
1628
+ function Rt({ locale: e, onPick: t }) {
1629
+ let [n, r] = U(null), i = !!t && n === null, { confirm: a } = e.t, o = [{
1624
1630
  value: a.yesValue,
1625
1631
  label: a.yes,
1626
1632
  kind: "yes"
@@ -1629,11 +1635,11 @@ function zt({ locale: e, onPick: t }) {
1629
1635
  label: a.no,
1630
1636
  kind: "no"
1631
1637
  }];
1632
- return /* @__PURE__ */ J("div", {
1638
+ return /* @__PURE__ */ Y("div", {
1633
1639
  class: "sqc-confirm",
1634
1640
  role: "group",
1635
1641
  "aria-label": a.group,
1636
- children: o.map((e) => /* @__PURE__ */ J("button", {
1642
+ children: o.map((e) => /* @__PURE__ */ Y("button", {
1637
1643
  type: "button",
1638
1644
  class: `sqc-confirm__btn sqc-confirm__btn--${e.kind}`,
1639
1645
  "aria-pressed": n === e.value,
@@ -1647,29 +1653,29 @@ function zt({ locale: e, onPick: t }) {
1647
1653
  }
1648
1654
  //#endregion
1649
1655
  //#region src/components/Choices.tsx
1650
- function Bt() {
1651
- return /* @__PURE__ */ J("svg", {
1656
+ function zt() {
1657
+ return /* @__PURE__ */ Y("svg", {
1652
1658
  viewBox: "0 0 16 16",
1653
1659
  fill: "none",
1654
1660
  stroke: "currentColor",
1655
1661
  "stroke-width": "2.2",
1656
1662
  "aria-hidden": "true",
1657
- children: /* @__PURE__ */ J("path", {
1663
+ children: /* @__PURE__ */ Y("path", {
1658
1664
  d: "M3.5 8.5l3 3 6-7",
1659
1665
  "stroke-linecap": "round",
1660
1666
  "stroke-linejoin": "round"
1661
1667
  })
1662
1668
  });
1663
1669
  }
1664
- function Vt({ items: e, locale: t, onPick: n }) {
1665
- let [r, i] = H(null), a = !!n && r === null;
1666
- return /* @__PURE__ */ J("div", {
1670
+ function Bt({ items: e, locale: t, onPick: n }) {
1671
+ let [r, i] = U(null), a = !!n && r === null;
1672
+ return /* @__PURE__ */ Y("div", {
1667
1673
  class: "sqc-choices",
1668
1674
  role: "group",
1669
1675
  "aria-label": t.t.choices,
1670
1676
  children: e.map((e, t) => {
1671
1677
  let o = r === null ? e.checked : r === e.label;
1672
- return /* @__PURE__ */ J("button", {
1678
+ return /* @__PURE__ */ Y("button", {
1673
1679
  type: "button",
1674
1680
  class: "sqc-choice",
1675
1681
  "aria-pressed": o,
@@ -1677,11 +1683,11 @@ function Vt({ items: e, locale: t, onPick: n }) {
1677
1683
  onClick: () => {
1678
1684
  i(e.label), n?.(e.label);
1679
1685
  },
1680
- children: [/* @__PURE__ */ J("span", {
1686
+ children: [/* @__PURE__ */ Y("span", {
1681
1687
  class: `sqc-choice__box${o ? " sqc-choice__box--on" : ""}`,
1682
1688
  "aria-hidden": "true",
1683
- children: o && /* @__PURE__ */ J(Bt, {})
1684
- }), /* @__PURE__ */ J("span", {
1689
+ children: o && /* @__PURE__ */ Y(zt, {})
1690
+ }), /* @__PURE__ */ Y("span", {
1685
1691
  class: "sqc-choice__label",
1686
1692
  children: e.content
1687
1693
  })]
@@ -1691,21 +1697,21 @@ function Vt({ items: e, locale: t, onPick: n }) {
1691
1697
  }
1692
1698
  //#endregion
1693
1699
  //#region src/components/RichText.tsx
1694
- var Ht = /(\*\*[^*\n]+\*\*|`[^`\n]+`|~~[^~\n]+~~|\[[^\]\n]+\]\([^)\s]+\)|\*[^*\n]+\*|https?:\/\/[^\s<>()]+)/g, Ut = /^\[([^\]\n]+)\]\(([^)\s]+)\)$/, Wt = /^(https?:|mailto:)/i;
1695
- function Gt(e, t, n) {
1696
- return Wt.test(e) ? /* @__PURE__ */ J("a", {
1700
+ var Vt = /(\*\*[^*\n]+\*\*|`[^`\n]+`|~~[^~\n]+~~|\[[^\]\n]+\]\([^)\s]+\)|\*[^*\n]+\*|https?:\/\/[^\s<>()]+)/g, Ht = /^\[([^\]\n]+)\]\(([^)\s]+)\)$/, Ut = /^(https?:|mailto:)/i;
1701
+ function Wt(e, t, n) {
1702
+ return Ut.test(e) ? /* @__PURE__ */ Y("a", {
1697
1703
  href: e,
1698
1704
  target: "_blank",
1699
1705
  rel: "noopener noreferrer",
1700
1706
  children: t
1701
1707
  }, n) : t;
1702
1708
  }
1703
- function Y(e, t) {
1704
- let n = e.split(Ht), r = [];
1709
+ function Gt(e, t) {
1710
+ let n = e.split(Vt), r = [];
1705
1711
  return n.forEach((e, n) => {
1706
1712
  if (!e) return;
1707
- let i = `${t}-${n}`, a = Ut.exec(e);
1708
- e.startsWith("**") && e.endsWith("**") && e.length > 4 ? r.push(/* @__PURE__ */ J("strong", { children: e.slice(2, -2) }, i)) : e.startsWith("`") && e.endsWith("`") && e.length > 2 ? r.push(/* @__PURE__ */ J("code", { children: e.slice(1, -1) }, i)) : e.startsWith("~~") && e.endsWith("~~") && e.length > 4 ? r.push(/* @__PURE__ */ J("del", { children: e.slice(2, -2) }, i)) : a ? r.push(Gt(a[2], a[1], i)) : e.startsWith("*") && e.endsWith("*") && e.length > 2 ? r.push(/* @__PURE__ */ J("em", { children: e.slice(1, -1) }, i)) : /^https?:\/\//.test(e) ? r.push(Gt(e, e, i)) : r.push(e);
1713
+ let i = `${t}-${n}`, a = Ht.exec(e);
1714
+ e.startsWith("**") && e.endsWith("**") && e.length > 4 ? r.push(/* @__PURE__ */ Y("strong", { children: e.slice(2, -2) }, i)) : e.startsWith("`") && e.endsWith("`") && e.length > 2 ? r.push(/* @__PURE__ */ Y("code", { children: e.slice(1, -1) }, i)) : e.startsWith("~~") && e.endsWith("~~") && e.length > 4 ? r.push(/* @__PURE__ */ Y("del", { children: e.slice(2, -2) }, i)) : a ? r.push(Wt(a[2], a[1], i)) : e.startsWith("*") && e.endsWith("*") && e.length > 2 ? r.push(/* @__PURE__ */ Y("em", { children: e.slice(1, -1) }, i)) : /^https?:\/\//.test(e) ? r.push(Wt(e, e, i)) : r.push(e);
1709
1715
  }), r;
1710
1716
  }
1711
1717
  var Kt = /^\s*(?:[-*•]\s+)?\[([ xX])\]\s+(.+)$/;
@@ -1736,14 +1742,14 @@ function rn(e, t, n, r) {
1736
1742
  nested: []
1737
1743
  }), o += 1;
1738
1744
  }
1739
- let s = a.map((e) => /* @__PURE__ */ J("li", { children: [e.text === null ? null : Y(e.text, e.key), e.nested] }, e.key));
1740
- return [J(i ? "ol" : "ul", { children: s }, r), o];
1745
+ let s = a.map((e) => /* @__PURE__ */ Y("li", { children: [e.text === null ? null : Gt(e.text, e.key), e.nested] }, e.key));
1746
+ return [Y(i ? "ol" : "ul", { children: s }, r), o];
1741
1747
  }
1742
1748
  function an({ text: e, locale: t, onChoice: n }) {
1743
1749
  let r = e.split("\n"), i = [], a = [], o = [], s = [], c = () => {
1744
1750
  if (!a.length) return;
1745
1751
  let e = `p${i.length}`;
1746
- i.push(/* @__PURE__ */ J("p", { children: Y(a.join("\n"), e) }, e)), a = [];
1752
+ i.push(/* @__PURE__ */ Y("p", { children: Gt(a.join("\n"), e) }, e)), a = [];
1747
1753
  }, l = () => {
1748
1754
  if (!o.length) return;
1749
1755
  let e = 0;
@@ -1755,7 +1761,7 @@ function an({ text: e, locale: t, onChoice: n }) {
1755
1761
  }, u = () => {
1756
1762
  if (!s.length) return;
1757
1763
  let e = `q${i.length}`;
1758
- i.push(/* @__PURE__ */ J("blockquote", { children: Y(s.join("\n"), e) }, e)), s = [];
1764
+ i.push(/* @__PURE__ */ Y("blockquote", { children: Gt(s.join("\n"), e) }, e)), s = [];
1759
1765
  }, d = () => {
1760
1766
  c(), l(), u();
1761
1767
  };
@@ -1766,7 +1772,7 @@ function an({ text: e, locale: t, onChoice: n }) {
1766
1772
  let t = [];
1767
1773
  for (e += 1; e < r.length && !tn.test(r[e]);) t.push(r[e]), e += 1;
1768
1774
  let n = `c${i.length}`;
1769
- i.push(/* @__PURE__ */ J("pre", { children: /* @__PURE__ */ J("code", { children: t.join("\n") }) }, n));
1775
+ i.push(/* @__PURE__ */ Y("pre", { children: /* @__PURE__ */ Y("code", { children: t.join("\n") }) }, n));
1770
1776
  continue;
1771
1777
  }
1772
1778
  if ($t.test(f) && e + 1 < r.length && en.test(r[e + 1])) {
@@ -1775,9 +1781,9 @@ function an({ text: e, locale: t, onChoice: n }) {
1775
1781
  for (e += 2; e < r.length && $t.test(r[e]);) n.push(nn(r[e])), e += 1;
1776
1782
  --e;
1777
1783
  let a = `t${i.length}`;
1778
- i.push(/* @__PURE__ */ J("div", {
1784
+ i.push(/* @__PURE__ */ Y("div", {
1779
1785
  class: "sqc-table",
1780
- children: /* @__PURE__ */ J("table", { children: [/* @__PURE__ */ J("thead", { children: /* @__PURE__ */ J("tr", { children: t.map((e, t) => /* @__PURE__ */ J("th", { children: Y(e, `${a}-h${t}`) }, `${a}-h${t}`)) }) }), /* @__PURE__ */ J("tbody", { children: n.map((e, n) => /* @__PURE__ */ J("tr", { children: t.map((t, r) => /* @__PURE__ */ J("td", { children: Y(e[r] ?? "", `${a}-r${n}c${r}`) }, `${a}-r${n}c${r}`)) }, `${a}-r${n}`)) })] })
1786
+ children: /* @__PURE__ */ Y("table", { children: [/* @__PURE__ */ Y("thead", { children: /* @__PURE__ */ Y("tr", { children: t.map((e, t) => /* @__PURE__ */ Y("th", { children: Gt(e, `${a}-h${t}`) }, `${a}-h${t}`)) }) }), /* @__PURE__ */ Y("tbody", { children: n.map((e, n) => /* @__PURE__ */ Y("tr", { children: t.map((t, r) => /* @__PURE__ */ Y("td", { children: Gt(e[r] ?? "", `${a}-r${n}c${r}`) }, `${a}-r${n}c${r}`)) }, `${a}-r${n}`)) })] })
1781
1787
  }, a));
1782
1788
  continue;
1783
1789
  }
@@ -1795,10 +1801,10 @@ function an({ text: e, locale: t, onChoice: n }) {
1795
1801
  a.push({
1796
1802
  label: qt(n),
1797
1803
  checked: t[1].toLowerCase() === "x",
1798
- content: Y(n, o)
1804
+ content: Gt(n, o)
1799
1805
  }), e += 1;
1800
1806
  }
1801
- --e, i.push(/* @__PURE__ */ J(Vt, {
1807
+ --e, i.push(/* @__PURE__ */ Y(Bt, {
1802
1808
  items: a,
1803
1809
  locale: t,
1804
1810
  onPick: n
@@ -1809,11 +1815,11 @@ function an({ text: e, locale: t, onChoice: n }) {
1809
1815
  if (p) {
1810
1816
  d();
1811
1817
  let e = p[1].length, t = e <= 2 ? "h3" : e === 3 ? "h4" : "h5", n = `h${i.length}`;
1812
- i.push(/* @__PURE__ */ J(t, { children: Y(p[2], n) }, n));
1818
+ i.push(/* @__PURE__ */ Y(t, { children: Gt(p[2], n) }, n));
1813
1819
  continue;
1814
1820
  }
1815
1821
  if (Zt.test(f)) {
1816
- d(), i.push(/* @__PURE__ */ J("hr", {}, `r${i.length}`));
1822
+ d(), i.push(/* @__PURE__ */ Y("hr", {}, `r${i.length}`));
1817
1823
  continue;
1818
1824
  }
1819
1825
  let m = Qt.exec(f);
@@ -1832,14 +1838,14 @@ function an({ text: e, locale: t, onChoice: n }) {
1832
1838
  }
1833
1839
  l(), u(), a.push(f);
1834
1840
  }
1835
- return d(), /* @__PURE__ */ J(S, { children: i });
1841
+ return d(), /* @__PURE__ */ Y(S, { children: i });
1836
1842
  }
1837
1843
  //#endregion
1838
1844
  //#region src/components/MessageList.tsx
1839
1845
  var on = 80;
1840
1846
  function sn({ at: e, locale: t }) {
1841
1847
  let n = new Date(e);
1842
- return /* @__PURE__ */ J("time", {
1848
+ return /* @__PURE__ */ Y("time", {
1843
1849
  class: "sqc-msg__time",
1844
1850
  dateTime: n.toISOString(),
1845
1851
  children: n.toLocaleTimeString(t.tag, {
@@ -1849,33 +1855,33 @@ function sn({ at: e, locale: t }) {
1849
1855
  });
1850
1856
  }
1851
1857
  function cn({ file: e, load: t }) {
1852
- let [n, r] = H(null);
1853
- return U(() => {
1858
+ let [n, r] = U(null);
1859
+ return W(() => {
1854
1860
  let n = null, i = !0;
1855
1861
  return t(e.id).then((e) => {
1856
1862
  i && (n = URL.createObjectURL(e), r(n));
1857
1863
  }).catch(() => {}), () => {
1858
1864
  i = !1, n && URL.revokeObjectURL(n);
1859
1865
  };
1860
- }, [e.id, t]), n ? /* @__PURE__ */ J("img", {
1866
+ }, [e.id, t]), n ? /* @__PURE__ */ Y("img", {
1861
1867
  class: "sqc-attachment__image",
1862
1868
  src: n,
1863
1869
  alt: e.filename
1864
- }) : /* @__PURE__ */ J("span", {
1870
+ }) : /* @__PURE__ */ Y("span", {
1865
1871
  class: "sqc-chip sqc-chip--waiting",
1866
1872
  children: e.filename
1867
1873
  });
1868
1874
  }
1869
1875
  function ln({ files: e, load: t }) {
1870
- return e.length === 0 || !t ? null : /* @__PURE__ */ J("div", {
1876
+ return e.length === 0 || !t ? null : /* @__PURE__ */ Y("div", {
1871
1877
  class: "sqc-attachments sqc-attachments--sent",
1872
- children: e.map((e) => e.kind === "image" ? /* @__PURE__ */ J(cn, {
1878
+ children: e.map((e) => e.kind === "image" ? /* @__PURE__ */ Y(cn, {
1873
1879
  file: e,
1874
1880
  load: t
1875
- }, e.id) : /* @__PURE__ */ J("span", {
1881
+ }, e.id) : /* @__PURE__ */ Y("span", {
1876
1882
  class: "sqc-chip",
1877
1883
  "data-kind": "document",
1878
- children: /* @__PURE__ */ J("span", {
1884
+ children: /* @__PURE__ */ Y("span", {
1879
1885
  class: "sqc-chip__name",
1880
1886
  children: e.filename
1881
1887
  })
@@ -1884,56 +1890,56 @@ function ln({ files: e, load: t }) {
1884
1890
  }
1885
1891
  function un({ message: e, locale: t, assistantName: n, onChoice: r, onDecide: i, onLoadAttachment: a }) {
1886
1892
  let o = e.streaming && !e.content, s = !!e.approval;
1887
- return /* @__PURE__ */ J("div", {
1893
+ return /* @__PURE__ */ Y("div", {
1888
1894
  class: `sqc-msg sqc-msg--${e.role}${e.error ? " sqc-msg--error" : ""}`,
1889
- children: [e.role === "assistant" && /* @__PURE__ */ J("div", {
1895
+ children: [e.role === "assistant" && /* @__PURE__ */ Y("div", {
1890
1896
  class: "sqc-msg__who",
1891
- children: [e.agent?.avatarEmoji ? /* @__PURE__ */ J("span", {
1897
+ children: [e.agent?.avatarEmoji ? /* @__PURE__ */ Y("span", {
1892
1898
  class: "sqc-msg__emoji",
1893
1899
  "aria-hidden": "true",
1894
1900
  children: e.agent.avatarEmoji
1895
- }) : /* @__PURE__ */ J(fn, {}), e.authorName ?? e.agent?.name ?? n]
1896
- }), /* @__PURE__ */ J("div", {
1901
+ }) : /* @__PURE__ */ Y(fn, {}), e.authorName ?? e.agent?.name ?? n]
1902
+ }), /* @__PURE__ */ Y("div", {
1897
1903
  class: "sqc-msg__bubble",
1898
- children: [o ? /* @__PURE__ */ J("span", {
1904
+ children: [o ? /* @__PURE__ */ Y("span", {
1899
1905
  class: "sqc-typing",
1900
1906
  "aria-label": t.t.typing,
1901
1907
  children: [
1902
- /* @__PURE__ */ J("i", {}),
1903
- /* @__PURE__ */ J("i", {}),
1904
- /* @__PURE__ */ J("i", {})
1908
+ /* @__PURE__ */ Y("i", {}),
1909
+ /* @__PURE__ */ Y("i", {}),
1910
+ /* @__PURE__ */ Y("i", {})
1905
1911
  ]
1906
- }) : /* @__PURE__ */ J("div", {
1912
+ }) : /* @__PURE__ */ Y("div", {
1907
1913
  class: "sqc-msg__body",
1908
1914
  children: [
1909
- /* @__PURE__ */ J(an, {
1915
+ /* @__PURE__ */ Y(an, {
1910
1916
  text: e.content,
1911
1917
  locale: t,
1912
1918
  onChoice: r
1913
1919
  }),
1914
- e.streaming && /* @__PURE__ */ J("span", {
1920
+ e.streaming && /* @__PURE__ */ Y("span", {
1915
1921
  class: "sqc-caret",
1916
1922
  "aria-hidden": "true"
1917
1923
  }),
1918
- s && /* @__PURE__ */ J(Rt, {
1924
+ s && /* @__PURE__ */ Y(Lt, {
1919
1925
  locale: t,
1920
1926
  call: e.content.trim() === "" ? e.approval : void 0,
1921
1927
  onDecide: i
1922
1928
  }),
1923
- !s && !e.streaming && !e.error && Pt(e.content, t.code) && /* @__PURE__ */ J(zt, {
1929
+ !s && !e.streaming && !e.error && Nt(e.content, t.code) && /* @__PURE__ */ Y(Rt, {
1924
1930
  locale: t,
1925
1931
  onPick: r
1926
1932
  }),
1927
- e.unknownHandle && !e.streaming && /* @__PURE__ */ J(dn, {
1933
+ e.unknownHandle && !e.streaming && /* @__PURE__ */ Y(dn, {
1928
1934
  message: e,
1929
1935
  locale: t
1930
1936
  }),
1931
- /* @__PURE__ */ J(ln, {
1937
+ /* @__PURE__ */ Y(ln, {
1932
1938
  files: e.attachments ?? [],
1933
1939
  load: a
1934
1940
  })
1935
1941
  ]
1936
- }), !o && /* @__PURE__ */ J(sn, {
1942
+ }), !o && /* @__PURE__ */ Y(sn, {
1937
1943
  at: e.createdAt,
1938
1944
  locale: t
1939
1945
  })]
@@ -1942,23 +1948,23 @@ function un({ message: e, locale: t, assistantName: n, onChoice: r, onDecide: i,
1942
1948
  }
1943
1949
  function dn({ message: e, locale: t }) {
1944
1950
  let n = e.offered ?? [];
1945
- return /* @__PURE__ */ J("p", {
1951
+ return /* @__PURE__ */ Y("p", {
1946
1952
  class: "sqc-msg__unaddressed",
1947
1953
  children: [
1948
- /* @__PURE__ */ J("span", { children: t.t.handles.unknown }),
1954
+ /* @__PURE__ */ Y("span", { children: t.t.handles.unknown }),
1949
1955
  " ",
1950
- /* @__PURE__ */ J("code", { children: ["@", e.unknownHandle] }),
1951
- n.length > 0 && /* @__PURE__ */ J(S, { children: [
1956
+ /* @__PURE__ */ Y("code", { children: ["@", e.unknownHandle] }),
1957
+ n.length > 0 && /* @__PURE__ */ Y(S, { children: [
1952
1958
  " ",
1953
- /* @__PURE__ */ J("span", { children: t.t.handles.instead }),
1959
+ /* @__PURE__ */ Y("span", { children: t.t.handles.instead }),
1954
1960
  " ",
1955
- n.map((e) => /* @__PURE__ */ J("code", { children: ["@", e.handle] }, e.handle))
1961
+ n.map((e) => /* @__PURE__ */ Y("code", { children: ["@", e.handle] }, e.handle))
1956
1962
  ] })
1957
1963
  ]
1958
1964
  });
1959
1965
  }
1960
1966
  function fn() {
1961
- return /* @__PURE__ */ J("svg", {
1967
+ return /* @__PURE__ */ Y("svg", {
1962
1968
  viewBox: "0 0 24 24",
1963
1969
  fill: "none",
1964
1970
  stroke: "currentColor",
@@ -1966,29 +1972,29 @@ function fn() {
1966
1972
  "stroke-linecap": "round",
1967
1973
  "stroke-linejoin": "round",
1968
1974
  "aria-hidden": "true",
1969
- children: /* @__PURE__ */ J("path", { d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" })
1975
+ children: /* @__PURE__ */ Y("path", { d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" })
1970
1976
  });
1971
1977
  }
1972
1978
  function pn({ messages: e, locale: t, assistantName: n, suggestions: r, showSuggestions: i, busy: a, withHuman: o, onSuggestion: s, onChoice: c, onDecide: l, onLoadAttachment: u }) {
1973
- let d = W(null), f = W(!0);
1974
- return ve(() => {
1979
+ let d = G(null), f = G(!0);
1980
+ return _e(() => {
1975
1981
  let e = d.current;
1976
1982
  e && f.current && (e.scrollTop = e.scrollHeight);
1977
- }, [e]), U(() => {
1983
+ }, [e]), W(() => {
1978
1984
  let e = d.current;
1979
1985
  if (!e) return;
1980
1986
  let t = () => {
1981
1987
  f.current = e.scrollHeight - e.scrollTop - e.clientHeight < on;
1982
1988
  };
1983
1989
  return e.addEventListener("scroll", t, { passive: !0 }), () => e.removeEventListener("scroll", t);
1984
- }, []), /* @__PURE__ */ J("div", {
1990
+ }, []), /* @__PURE__ */ Y("div", {
1985
1991
  class: "sqc-messages",
1986
1992
  ref: d,
1987
1993
  role: "log",
1988
1994
  "aria-live": "polite",
1989
1995
  "aria-atomic": "false",
1990
1996
  children: [
1991
- e.map((r, i) => /* @__PURE__ */ J(un, {
1997
+ e.map((r, i) => /* @__PURE__ */ Y(un, {
1992
1998
  message: r,
1993
1999
  locale: t,
1994
2000
  assistantName: n,
@@ -1996,14 +2002,14 @@ function pn({ messages: e, locale: t, assistantName: n, suggestions: r, showSugg
1996
2002
  onDecide: !a && r.role === "assistant" && i === e.length - 1 ? l : void 0,
1997
2003
  onLoadAttachment: u
1998
2004
  }, r.id)),
1999
- o && /* @__PURE__ */ J("p", {
2005
+ o && /* @__PURE__ */ Y("p", {
2000
2006
  class: "sqc-with-human",
2001
2007
  role: "status",
2002
2008
  children: t.t.withHuman
2003
2009
  }),
2004
- i && r && r.length > 0 && /* @__PURE__ */ J("div", {
2010
+ i && r && r.length > 0 && /* @__PURE__ */ Y("div", {
2005
2011
  class: "sqc-suggestions",
2006
- children: r.map((e) => /* @__PURE__ */ J("button", {
2012
+ children: r.map((e) => /* @__PURE__ */ Y("button", {
2007
2013
  type: "button",
2008
2014
  class: "sqc-suggestion",
2009
2015
  onClick: () => s(e),
@@ -2024,8 +2030,8 @@ function _n(e) {
2024
2030
  if (!e) return [];
2025
2031
  let t = [];
2026
2032
  for (let [n, r] of Object.entries(e)) {
2027
- if (hn.has(n) || typeof r != "string" && !ke(r)) continue;
2028
- let e = Oe(r);
2033
+ if (hn.has(n) || typeof r != "string" && !Oe(r)) continue;
2034
+ let e = De(r);
2029
2035
  e && t.push({
2030
2036
  label: gn(n),
2031
2037
  value: e
@@ -2037,8 +2043,8 @@ function vn(e, t) {
2037
2043
  return e?.trim() ? e : t;
2038
2044
  }
2039
2045
  function yn(e) {
2040
- let [t, n] = H(!1);
2041
- return U(() => {
2046
+ let [t, n] = U(!1);
2047
+ return W(() => {
2042
2048
  if (e !== "auto" || typeof matchMedia != "function") return;
2043
2049
  let t = matchMedia("(prefers-color-scheme: dark)");
2044
2050
  n(t.matches);
@@ -2047,7 +2053,7 @@ function yn(e) {
2047
2053
  }, [e]), e === "dark" ? "dark" : e === "light" ? "light" : t ? "dark" : "light";
2048
2054
  }
2049
2055
  function bn(e) {
2050
- let t = e.persistOpen ?? !0, [n, r] = H(() => Ve(e.defaultOpen, t)), [i, a] = H(!1), [o, s] = H(!1), c = W(null), l = W(null), u = yn(e.theme ?? "light"), d = G(() => Le(e.locale), [e.locale]), f = d.t, p = vn(e.heading, f.heading), m = vn(e.assistantName, f.assistant), h = vn(e.greeting, f.greeting), g = e.onEvent, { send: _, reset: v, decide: y, stop: b, start: x, busy: S, messages: C, withHuman: w, sessionId: T, handles: E, addressee: D, attachments: O, uploading: k, attachmentError: A, attach: j, detach: M, loadAttachment: N } = wt({
2056
+ let t = e.persistOpen ?? !0, [n, r] = U(() => Be(e.defaultOpen, t)), [i, a] = U(!1), [o, s] = U(!1), c = G(null), l = G(null), u = yn(e.theme ?? "light"), d = K(() => Ie(e.locale), [e.locale]), f = d.t, p = vn(e.heading, f.heading), m = vn(e.assistantName, f.assistant), h = vn(e.greeting, f.greeting), g = e.onEvent, { send: _, reset: v, decide: y, stop: b, start: x, busy: S, messages: C, withHuman: w, branding: T, sessionId: E, handles: D, addressee: O, attachments: k, uploading: A, attachmentError: j, attach: M, detach: N, loadAttachment: P } = Ct({
2051
2057
  embedKey: e.embedKey,
2052
2058
  user: e.user,
2053
2059
  getSubjectToken: e.getSubjectToken,
@@ -2057,100 +2063,100 @@ function bn(e) {
2057
2063
  locale: d,
2058
2064
  onEvent: g
2059
2065
  });
2060
- U(() => {
2066
+ W(() => {
2061
2067
  !n && C.some((e) => e.role === "assistant" && e.id !== "greeting") && s(!0);
2062
2068
  }, [C, n]);
2063
- let P = W(n);
2064
- P.current = n;
2065
- let F = K(() => {
2066
- s(!1), !P.current && (P.current = !0, r(!0), t && Be(!0), g?.({
2069
+ let F = G(n);
2070
+ F.current = n;
2071
+ let ee = q(() => {
2072
+ s(!1), !F.current && (F.current = !0, r(!0), t && ze(!0), g?.({
2067
2073
  type: "chatbot-open",
2068
- sessionId: T
2074
+ sessionId: E
2069
2075
  }));
2070
2076
  }, [
2071
2077
  g,
2072
2078
  t,
2073
- T
2074
- ]), I = K(() => {
2075
- P.current && (P.current = !1, r(!1), t && Be(!1), g?.({
2079
+ E
2080
+ ]), I = q(() => {
2081
+ F.current && (F.current = !1, r(!1), t && ze(!1), g?.({
2076
2082
  type: "chatbot-close",
2077
- sessionId: T
2083
+ sessionId: E
2078
2084
  }), l.current?.focus());
2079
2085
  }, [
2080
2086
  g,
2081
2087
  t,
2082
- T
2088
+ E
2083
2089
  ]);
2084
- U(() => {
2090
+ W(() => {
2085
2091
  n && x();
2086
2092
  }, [n, x]);
2087
- let L = K((e) => {
2093
+ let L = q((e) => {
2088
2094
  a(!0), _(e);
2089
- }, [_]), ee = K(() => {
2095
+ }, [_]), te = q(() => {
2090
2096
  a(!1), s(!1), v();
2091
- }, [v]), R = W({
2092
- openPanel: F,
2097
+ }, [v]), R = G({
2098
+ openPanel: ee,
2093
2099
  closePanel: I,
2094
2100
  send: L,
2095
- reset: ee,
2096
- sessionId: T
2101
+ reset: te,
2102
+ sessionId: E
2097
2103
  });
2098
2104
  R.current = {
2099
- openPanel: F,
2105
+ openPanel: ee,
2100
2106
  closePanel: I,
2101
2107
  send: L,
2102
- reset: ee,
2103
- sessionId: T
2108
+ reset: te,
2109
+ sessionId: E
2104
2110
  };
2105
- let te = W({
2111
+ let ne = G({
2106
2112
  open: () => R.current.openPanel(),
2107
2113
  close: () => R.current.closePanel(),
2108
- toggle: () => P.current ? R.current.closePanel() : R.current.openPanel(),
2114
+ toggle: () => F.current ? R.current.closePanel() : R.current.openPanel(),
2109
2115
  reset: () => R.current.reset(),
2110
2116
  send: (e) => {
2111
2117
  R.current.openPanel(), R.current.send(e);
2112
2118
  },
2113
- isOpen: () => P.current,
2119
+ isOpen: () => F.current,
2114
2120
  sessionId: () => R.current.sessionId
2115
2121
  }), z = e.bind;
2116
- ve(() => (z?.(te.current), () => z?.(null)), [z]), U(() => {
2122
+ _e(() => (z?.(ne.current), () => z?.(null)), [z]), W(() => {
2117
2123
  if (!n) return;
2118
2124
  let e = (e) => {
2119
2125
  e.key === "Escape" && (e.stopPropagation(), I());
2120
2126
  };
2121
2127
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
2122
2128
  }, [I, n]);
2123
- let ne = G(() => C.some((e) => e.id !== "greeting"), [C]), re = G(() => _n(e.context), [e.context]), ie = {
2129
+ let re = K(() => C.some((e) => e.id !== "greeting"), [C]), ie = K(() => _n(e.context), [e.context]), B = {
2124
2130
  ...e.accent ? { "--sqc-accent": e.accent } : {},
2125
2131
  "--sqc-width": e.width ?? mn.width
2126
2132
  };
2127
- return /* @__PURE__ */ J("div", {
2133
+ return /* @__PURE__ */ Y("div", {
2128
2134
  class: "sqc",
2129
2135
  "data-theme": u,
2130
2136
  "data-position": e.position ?? "bottom-right",
2131
2137
  "data-layout": e.layout ?? "sidebar",
2132
2138
  "data-open": n ? "true" : "false",
2133
- style: ie,
2134
- children: [/* @__PURE__ */ J("button", {
2139
+ style: B,
2140
+ children: [/* @__PURE__ */ Y("button", {
2135
2141
  ref: l,
2136
2142
  type: "button",
2137
2143
  class: "sqc-launcher",
2138
2144
  "aria-label": p,
2139
2145
  "aria-expanded": n,
2140
2146
  "aria-haspopup": "dialog",
2141
- onClick: F,
2142
- children: [/* @__PURE__ */ J("span", {
2147
+ onClick: ee,
2148
+ children: [/* @__PURE__ */ Y("span", {
2143
2149
  class: "sqc-launcher__icon",
2144
- children: /* @__PURE__ */ J("slot", {
2150
+ children: /* @__PURE__ */ Y("slot", {
2145
2151
  name: "launcher-icon",
2146
2152
  class: "sqc-slot-icon",
2147
- children: /* @__PURE__ */ J(fn, {})
2153
+ children: /* @__PURE__ */ Y(fn, {})
2148
2154
  })
2149
- }), o && /* @__PURE__ */ J("span", {
2155
+ }), o && /* @__PURE__ */ Y("span", {
2150
2156
  class: "sqc-launcher__badge",
2151
2157
  "aria-hidden": "true"
2152
2158
  })]
2153
- }), /* @__PURE__ */ J("aside", {
2159
+ }), /* @__PURE__ */ Y("aside", {
2154
2160
  ref: c,
2155
2161
  class: "sqc-panel",
2156
2162
  role: "dialog",
@@ -2158,53 +2164,53 @@ function bn(e) {
2158
2164
  "aria-label": p,
2159
2165
  ...n ? {} : { inert: !0 },
2160
2166
  children: [
2161
- /* @__PURE__ */ J("header", {
2167
+ /* @__PURE__ */ Y("header", {
2162
2168
  class: "sqc-header",
2163
2169
  children: [
2164
- /* @__PURE__ */ J("span", {
2170
+ /* @__PURE__ */ Y("span", {
2165
2171
  class: "sqc-header__icon",
2166
2172
  "aria-hidden": "true",
2167
- children: /* @__PURE__ */ J(fn, {})
2173
+ children: /* @__PURE__ */ Y(fn, {})
2168
2174
  }),
2169
- /* @__PURE__ */ J("div", {
2175
+ /* @__PURE__ */ Y("div", {
2170
2176
  class: "sqc-header__titles",
2171
- children: [/* @__PURE__ */ J("p", {
2177
+ children: [/* @__PURE__ */ Y("p", {
2172
2178
  class: "sqc-header__heading",
2173
2179
  children: p
2174
- }), /* @__PURE__ */ J("p", {
2180
+ }), /* @__PURE__ */ Y("p", {
2175
2181
  class: "sqc-header__sub",
2176
2182
  children: vn(e.subheading, f.subheading)
2177
2183
  })]
2178
2184
  }),
2179
- /* @__PURE__ */ J("button", {
2185
+ /* @__PURE__ */ Y("button", {
2180
2186
  type: "button",
2181
2187
  class: "sqc-icon-btn",
2182
- onClick: ee,
2188
+ onClick: te,
2183
2189
  "aria-label": f.newConversation,
2184
2190
  "data-tip": f.newConversation,
2185
- children: /* @__PURE__ */ J("svg", {
2191
+ children: /* @__PURE__ */ Y("svg", {
2186
2192
  viewBox: "0 0 24 24",
2187
2193
  fill: "none",
2188
2194
  stroke: "currentColor",
2189
2195
  "stroke-width": "1.8",
2190
- children: /* @__PURE__ */ J("path", {
2196
+ children: /* @__PURE__ */ Y("path", {
2191
2197
  d: "M20 12a8 8 0 1 1-2.6-5.9M20 4v4h-4",
2192
2198
  "stroke-linecap": "round"
2193
2199
  })
2194
2200
  })
2195
2201
  }),
2196
- /* @__PURE__ */ J("button", {
2202
+ /* @__PURE__ */ Y("button", {
2197
2203
  type: "button",
2198
2204
  class: "sqc-icon-btn",
2199
2205
  onClick: I,
2200
2206
  "aria-label": f.close,
2201
2207
  "data-tip": f.closeTitle,
2202
- children: /* @__PURE__ */ J("svg", {
2208
+ children: /* @__PURE__ */ Y("svg", {
2203
2209
  viewBox: "0 0 24 24",
2204
2210
  fill: "none",
2205
2211
  stroke: "currentColor",
2206
2212
  "stroke-width": "1.8",
2207
- children: /* @__PURE__ */ J("path", {
2213
+ children: /* @__PURE__ */ Y("path", {
2208
2214
  d: "M6 6l12 12M18 6L6 18",
2209
2215
  "stroke-linecap": "round"
2210
2216
  })
@@ -2212,46 +2218,55 @@ function bn(e) {
2212
2218
  })
2213
2219
  ]
2214
2220
  }),
2215
- re.length > 0 && /* @__PURE__ */ J("div", {
2221
+ ie.length > 0 && /* @__PURE__ */ Y("div", {
2216
2222
  class: "sqc-context",
2217
2223
  "aria-label": f.context.region,
2218
- children: re.map((e) => /* @__PURE__ */ J("span", {
2224
+ children: ie.map((e) => /* @__PURE__ */ Y("span", {
2219
2225
  class: "sqc-chip",
2220
2226
  title: `${e.label}: ${e.value}`,
2221
- children: [/* @__PURE__ */ J("b", { children: e.label }), e.value]
2227
+ children: [/* @__PURE__ */ Y("b", { children: e.label }), e.value]
2222
2228
  }, e.label))
2223
2229
  }),
2224
- /* @__PURE__ */ J(pn, {
2230
+ /* @__PURE__ */ Y(pn, {
2225
2231
  messages: C,
2226
2232
  locale: d,
2227
2233
  assistantName: m,
2228
2234
  suggestions: e.suggestions,
2229
- showSuggestions: !i && !ne,
2235
+ showSuggestions: !i && !re,
2230
2236
  busy: S,
2231
2237
  withHuman: w,
2232
2238
  onSuggestion: L,
2233
2239
  onChoice: L,
2234
2240
  onDecide: y,
2235
- onLoadAttachment: N
2241
+ onLoadAttachment: P
2236
2242
  }),
2237
- /* @__PURE__ */ J(At, {
2243
+ /* @__PURE__ */ Y(kt, {
2238
2244
  placeholder: vn(e.placeholder, f.placeholder),
2239
2245
  locale: d,
2240
2246
  busy: S,
2241
2247
  autoFocus: n,
2242
- handles: E,
2243
- addressee: D,
2244
- attachments: O,
2245
- uploading: k,
2246
- attachmentError: A ? f.attachments[A] : void 0,
2247
- onAttach: j,
2248
- onDetach: M,
2248
+ handles: D,
2249
+ addressee: O,
2250
+ attachments: k,
2251
+ uploading: A,
2252
+ attachmentError: j ? f.attachments[j] : void 0,
2253
+ onAttach: M,
2254
+ onDetach: N,
2249
2255
  onSend: L,
2250
2256
  onStop: b
2251
2257
  }),
2252
- /* @__PURE__ */ J("p", {
2258
+ /* @__PURE__ */ Y("p", {
2253
2259
  class: "sqc-hint",
2254
2260
  children: f.hint
2261
+ }),
2262
+ T && /* @__PURE__ */ Y("p", {
2263
+ class: "sqc-powered",
2264
+ children: /* @__PURE__ */ Y("a", {
2265
+ href: "https://squadico.com",
2266
+ target: "_blank",
2267
+ rel: "noopener noreferrer",
2268
+ children: f.poweredBy
2269
+ })
2255
2270
  })
2256
2271
  ]
2257
2272
  })]
@@ -2259,7 +2274,7 @@ function bn(e) {
2259
2274
  }
2260
2275
  //#endregion
2261
2276
  //#region src/styles.css?inline
2262
- var xn = ":host{--sqc-width:min(392px, 100vw);--sqc-height:640px;--sqc-z:2147480000;--sqc-radius:16px;--sqc-font-family:\"Plus Jakarta Sans\", ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;--sqc-font-heading:var(--sqc-font-family);z-index:var(--sqc-z);pointer-events:none;font-family:var(--sqc-font-family);-webkit-font-smoothing:antialiased;text-align:left;font-size:14px;line-height:1.5;display:block;position:fixed;top:0;bottom:0;left:0;right:0;margin:0!important}:host([hidden]){display:none}.sqc{--sqc-neutral-50:#f8fafc;--sqc-neutral-100:#f1f5f9;--sqc-neutral-200:#e2e8f0;--sqc-neutral-300:#cbd5e1;--sqc-neutral-400:#94a3b8;--sqc-neutral-500:#64748b;--sqc-neutral-600:#475569;--sqc-neutral-900:#0f172a;--sqc-error-50:#fff1f2;--sqc-error-100:#ffe4e6;--sqc-error-600:#e11d48;--sqc-accent-default:#000;--sqc-accent-color:var(--sqc-accent,var(--sqc-accent-default));--sqc-on-accent:#fff;--sqc-accent-hover:color-mix(in oklab, var(--sqc-accent-color) 84%, var(--sqc-on-accent));--sqc-accent-fg:var(--sqc-accent,var(--sqc-text));--sqc-bg:#fff;--sqc-surface:var(--sqc-neutral-50);--sqc-selected:var(--sqc-neutral-100);--sqc-border:var(--sqc-neutral-200);--sqc-border-strong:var(--sqc-neutral-300);--sqc-text:var(--sqc-neutral-900);--sqc-text-muted:var(--sqc-neutral-500);--sqc-link:#2563eb;--sqc-bubble-user:var(--sqc-accent-color);--sqc-bubble-user-text:var(--sqc-on-accent);--sqc-code-bg:var(--sqc-neutral-100);--sqc-disabled:var(--sqc-neutral-300);--sqc-shadow:0 10px 15px -3px #0f172a1a, 0 4px 6px -4px #0f172a1a;--sqc-shadow-bottom:0 6px 8px -6px #0f172a2e;--sqc-focus:0 0 0 2px var(--sqc-bg), 0 0 0 4px #0f172a4d;--sqc-focus-input:0 0 0 3px #0f172a1a;--sqc-danger:var(--sqc-error-600);color:var(--sqc-text);position:absolute;top:0;bottom:0;left:0;right:0}.sqc[data-theme=dark]{--sqc-neutral-50:#172033;--sqc-neutral-100:#1e293b;--sqc-neutral-200:#334155;--sqc-neutral-300:#475569;--sqc-neutral-400:#64748b;--sqc-neutral-500:#94a3b8;--sqc-neutral-600:#cbd5e1;--sqc-neutral-900:#f8fafc;--sqc-error-50:#2a0a12;--sqc-error-100:#4c0519;--sqc-error-600:#fb7185;--sqc-accent-default:#fff;--sqc-on-accent:#0f172a;--sqc-bg:#0f172a;--sqc-link:#60a5fa;--sqc-code-bg:#020617;--sqc-shadow:0 10px 24px -4px #0000008c;--sqc-shadow-bottom:0 6px 8px -6px #0000008c;--sqc-focus:0 0 0 2px var(--sqc-bg), 0 0 0 4px #f8fafc59;--sqc-focus-input:0 0 0 3px #f8fafc1f}@supports (color:oklch(from red l c h)){.sqc{--sqc-on-accent:oklch(from var(--sqc-accent-color) clamp(.208, (.62 - l) * 1000, 1) 0 0)}}.sqc *,.sqc :before,.sqc :after{box-sizing:border-box}.sqc-launcher{background:var(--sqc-accent-color);width:56px;height:56px;color:var(--sqc-on-accent);cursor:pointer;pointer-events:auto;box-shadow:var(--sqc-shadow);border:none;border-radius:50%;place-items:center;padding:0;transition:transform .18s,opacity .18s,background .18s,box-shadow .18s;display:grid;position:absolute;bottom:24px;right:24px}.sqc[data-position=bottom-left] .sqc-launcher{left:24px;right:auto}.sqc-launcher:hover{background:var(--sqc-accent-hover);transform:scale(1.06)}.sqc-launcher:focus-visible{box-shadow:var(--sqc-focus);outline:none}.sqc[data-open=true] .sqc-launcher{opacity:0;pointer-events:none;transform:scale(.5)}.sqc-launcher__icon svg{width:26px;height:26px;display:block}.sqc-slot-icon::slotted(*){justify-content:center;align-items:center;width:26px;height:26px;display:inline-flex}.sqc-launcher__badge{background:var(--sqc-error-600);border:2px solid var(--sqc-bg);border-radius:50%;width:12px;height:12px;position:absolute;top:6px;right:6px}.sqc-panel{width:var(--sqc-width);background:var(--sqc-bg);border-left:1px solid var(--sqc-border);box-shadow:var(--sqc-shadow);pointer-events:auto;visibility:hidden;flex-direction:column;transition:transform .26s cubic-bezier(.22,1,.36,1),visibility 0s linear .26s;display:flex;position:absolute;top:0;bottom:0;right:0;transform:translate(100%)}.sqc[data-open=true] .sqc-panel{visibility:visible;transition:transform .26s cubic-bezier(.22,1,.36,1),visibility;transform:translate(0)}.sqc[data-layout=floating] .sqc-panel{max-width:calc(100% - 48px);height:var(--sqc-height);border:1px solid var(--sqc-border);border-radius:var(--sqc-radius);opacity:0;transform-origin:100% 100%;max-height:calc(100% - 48px);transition:transform .22s cubic-bezier(.22,1,.36,1),opacity .22s,visibility 0s linear .22s;top:auto;bottom:24px;right:24px;overflow:hidden;transform:translateY(16px)scale(.96)}.sqc[data-layout=floating][data-position=bottom-left] .sqc-panel{transform-origin:0 100%;left:24px;right:auto}.sqc[data-layout=floating][data-open=true] .sqc-panel{opacity:1;transition:transform .22s cubic-bezier(.22,1,.36,1),opacity .22s,visibility;transform:none}.sqc-header{background:var(--sqc-bg);color:var(--sqc-text);border-bottom:1px solid var(--sqc-border);flex-shrink:0;align-items:center;gap:8px;padding:13px 12px 13px 16px;display:flex}.sqc-header__icon{color:var(--sqc-accent-fg);flex-shrink:0;place-items:center;display:grid}.sqc-header__icon svg{width:17px;height:17px;display:block}.sqc-header__titles{flex:1;min-width:0}.sqc-header__heading,.sqc-header__sub{text-overflow:ellipsis;white-space:nowrap;margin:0;overflow:hidden}.sqc-header__heading{font-family:var(--sqc-font-heading);letter-spacing:-.2px;font-size:15px;font-weight:700}.sqc-header__sub{color:var(--sqc-text-muted);font-size:12px}.sqc-icon-btn{width:26px;height:26px;color:var(--sqc-text-muted);cursor:pointer;background:0 0;border:none;border-radius:8px;flex-shrink:0;place-items:center;transition:background .15s;display:grid}.sqc-icon-btn:hover{background:var(--sqc-surface);color:var(--sqc-text)}.sqc-icon-btn:focus-visible{box-shadow:var(--sqc-focus);outline:none}.sqc-icon-btn svg{width:16px;height:16px}.sqc-icon-btn[data-tip]{position:relative}.sqc-icon-btn[data-tip]:after{content:attr(data-tip);z-index:6;background:var(--sqc-text);color:var(--sqc-bg);font-family:var(--sqc-font-family);white-space:nowrap;pointer-events:none;opacity:0;border-radius:8px;padding:4px 8px;font-size:11px;font-weight:500;line-height:1.3;transition:opacity .12s .15s;position:absolute;top:calc(100% + 6px);right:0}.sqc-icon-btn[data-tip]:hover:after{opacity:1}.sqc-icon-btn[data-tip]:focus-visible:after{opacity:1}.sqc-history-pop{z-index:5;position:absolute;top:54px;left:0;right:0}.sqc-history{background:var(--sqc-bg);max-height:320px;box-shadow:var(--sqc-shadow-bottom);flex-direction:column;display:flex;overflow-y:auto}.sqc-history__empty{color:var(--sqc-text-muted);text-align:center;margin:0;padding:14px 16px;font-size:12px}.sqc-history__item{border:none;border-bottom:1px solid var(--sqc-border);width:100%;color:var(--sqc-text);text-align:left;cursor:pointer;background:0 0;flex-direction:column;gap:2px;padding:10px 16px;transition:background .15s;display:flex}.sqc-history__item:last-child{border-bottom:none}.sqc-history__item:hover{background:var(--sqc-surface)}.sqc-history__item:focus-visible{box-shadow:var(--sqc-focus);outline:none}.sqc-history__item[aria-current=true]{background:var(--sqc-selected)}.sqc-history__item[aria-current=true] .sqc-history__title{color:var(--sqc-text);font-weight:600}.sqc-history__title{text-overflow:ellipsis;white-space:nowrap;font-size:13px;overflow:hidden}.sqc-history__date{color:var(--sqc-text-muted);font-size:11px}.sqc-context{background:var(--sqc-selected);border:1px solid var(--sqc-border);color:var(--sqc-text);border-radius:12px;flex-wrap:wrap;flex-shrink:0;align-items:center;gap:8px;margin:12px 16px 4px;padding:8px 11px;font-size:12px;display:flex}.sqc-chip{text-overflow:ellipsis;white-space:nowrap;align-items:baseline;gap:4px;max-width:100%;display:inline-flex;overflow:hidden}.sqc-chip b{font-weight:600}.sqc-chip:not(:last-child):after{content:\"·\";opacity:.5;margin-left:4px}.sqc-messages{overscroll-behavior:contain;background:var(--sqc-bg);scrollbar-width:thin;scrollbar-color:var(--sqc-neutral-300) transparent;flex-direction:column;flex:1;gap:13px;min-height:0;padding:12px 16px;display:flex;overflow-y:auto}.sqc-messages::-webkit-scrollbar{width:6px}.sqc-messages::-webkit-scrollbar-thumb{background:var(--sqc-neutral-300);border-radius:99px}.sqc-msg{flex-direction:column;max-width:93%;font-size:13.5px;display:flex}.sqc-msg--assistant{align-self:flex-start}.sqc-msg--user{align-self:flex-end}.sqc-msg__who{color:var(--sqc-text-muted);align-items:center;gap:6px;margin-bottom:4px;font-size:11px;font-weight:500;display:flex}.sqc-msg__who svg{width:12px;height:12px;color:var(--sqc-accent-fg);flex-shrink:0}.sqc-msg__unaddressed{color:var(--sqc-text-muted);margin:8px 0 0;font-size:11.5px;line-height:1.5}.sqc-msg__unaddressed code{background:var(--sqc-code-bg);color:var(--sqc-text);border-radius:4px;margin-right:4px;padding:1px 4px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px}.sqc-msg--user .sqc-msg__bubble{background:var(--sqc-bubble-user);color:var(--sqc-bubble-user-text);border-radius:var(--sqc-radius) var(--sqc-radius) 4px var(--sqc-radius);padding:9px 13px}.sqc-msg--error .sqc-msg__bubble{background:var(--sqc-error-50);color:var(--sqc-error-600);border:1px solid var(--sqc-error-100);border-radius:12px;padding:11px}.sqc-msg__body{overflow-wrap:anywhere}.sqc-msg--assistant .sqc-msg__body{font-size:14px;line-height:1.6}.sqc-msg__body>:first-child{margin-top:0}.sqc-msg__body>:last-child{margin-bottom:0}.sqc-msg__body p{white-space:pre-wrap;margin:0 0 8px}.sqc-msg__body ul,.sqc-msg__body ol{margin:0 0 8px;padding-left:20px}.sqc-msg__body li{margin-bottom:3px}.sqc-msg__body code{background:var(--sqc-code-bg);border-radius:4px;padding:1px 4px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.85em}.sqc-msg--user .sqc-msg__body code{background:#ffffff38}.sqc-msg__body pre{background:var(--sqc-code-bg);border-radius:8px;margin:0 0 8px;padding:9px 11px;overflow-x:auto}.sqc-msg__body pre code{background:0 0;padding:0}.sqc-msg__body a{color:inherit;text-underline-offset:2px;text-decoration:underline}.sqc-msg--assistant .sqc-msg__body a{color:var(--sqc-link);text-decoration:none}.sqc-msg--assistant .sqc-msg__body a:hover{text-decoration:underline}.sqc-msg__body h3,.sqc-msg__body h4,.sqc-msg__body h5,.sqc-msg__body h6{font-family:var(--sqc-font-heading);letter-spacing:-.2px;margin:12px 0 6px;font-weight:700;line-height:1.3}.sqc-msg__body h3{font-size:1.05em}.sqc-msg__body h4{font-size:1em}.sqc-msg__body h5,.sqc-msg__body h6{font-size:.94em}.sqc-msg__body ul ul,.sqc-msg__body ul ol,.sqc-msg__body ol ul,.sqc-msg__body ol ol{margin:3px 0 0}.sqc-msg__body blockquote{border-left:2px solid var(--sqc-border-strong);color:var(--sqc-text-muted);white-space:pre-wrap;margin:0 0 8px;padding:2px 0 2px 10px}.sqc-msg--user .sqc-msg__body blockquote{color:inherit;opacity:.85;border-left-color:#ffffff73}.sqc-msg__body hr{border:0;border-top:1px solid var(--sqc-border);margin:10px 0}.sqc-msg--user .sqc-msg__body hr{border-top-color:#ffffff4d}.sqc-msg__body del{opacity:.7}.sqc-approval{flex-direction:column;gap:8px;margin:11px 0 2px;display:flex}.sqc-approval__actions{flex-wrap:wrap;gap:8px;display:flex}.sqc-approval__request{color:var(--sqc-text);margin:0;font-size:13px}.sqc-approval__args{border:1px solid var(--sqc-border);background:var(--sqc-surface);border-radius:12px;flex-direction:column;gap:4px;margin:0;padding:8px 10px;font-size:12px;display:flex}.sqc-approval__arg{gap:8px;display:flex}.sqc-approval__arg-name{color:var(--sqc-text-muted);flex:none;font-weight:500}.sqc-approval__arg-value{overflow-wrap:anywhere;min-width:0;color:var(--sqc-text);margin:0}.sqc-approval__btn{height:32px;font-family:var(--sqc-font-family);border:1px solid var(--sqc-border);background:var(--sqc-bg);color:var(--sqc-text);cursor:pointer;border-radius:12px;flex:auto;justify-content:center;align-items:center;padding:0 12px;font-size:13px;font-weight:500;transition:border-color .12s,background .12s;display:inline-flex}.sqc-approval__btn--yes:not(:disabled),.sqc-approval__btn--send:not(:disabled){background:var(--sqc-accent-color);color:var(--sqc-on-accent);border-color:#0000;font-weight:600}.sqc-approval__btn:hover:not(:disabled){border-color:var(--sqc-border-strong);background:var(--sqc-surface)}.sqc-approval__btn--yes:hover:not(:disabled),.sqc-approval__btn--send:hover:not(:disabled){background:var(--sqc-accent-hover);border-color:#0000}.sqc-approval__btn:focus-visible{box-shadow:var(--sqc-focus);outline:none}.sqc-approval__btn:disabled{cursor:default}.sqc-approval__btn:disabled[aria-pressed=false]{opacity:.45}.sqc-approval__btn[aria-pressed=true]{border-color:var(--sqc-border-strong);background:var(--sqc-selected);color:var(--sqc-text);font-weight:600}.sqc-approval__edit{flex-direction:column;gap:8px;display:flex}.sqc-approval__input{width:100%;font-family:var(--sqc-font-family);color:var(--sqc-text);background:var(--sqc-bg);border:1px solid var(--sqc-border-strong);resize:vertical;border-radius:12px;padding:8px 10px;font-size:13px;line-height:1.4}.sqc-approval__input:focus-visible{border-color:var(--sqc-text);box-shadow:var(--sqc-focus-input);outline:none}.sqc-approval__btn--send{flex:none;align-self:flex-end}.sqc-confirm{gap:8px;margin:11px 0 2px;display:flex}.sqc-confirm__btn{height:32px;font-family:var(--sqc-font-family);border:1px solid var(--sqc-border);background:var(--sqc-bg);color:var(--sqc-text);cursor:pointer;border-radius:12px;flex:1 1 0;justify-content:center;align-items:center;padding:0 12px;font-size:13px;font-weight:500;transition:border-color .12s,background .12s;display:inline-flex}.sqc-confirm__btn--yes:not(:disabled){background:var(--sqc-accent-color);color:var(--sqc-on-accent);border-color:#0000;font-weight:600}.sqc-confirm__btn:hover:not(:disabled){border-color:var(--sqc-border-strong);background:var(--sqc-surface)}.sqc-confirm__btn--yes:hover:not(:disabled){background:var(--sqc-accent-hover);border-color:#0000}.sqc-confirm__btn:focus-visible{box-shadow:var(--sqc-focus);outline:none}.sqc-confirm__btn:disabled{cursor:default}.sqc-confirm__btn:disabled[aria-pressed=false]{opacity:.45}.sqc-confirm__btn[aria-pressed=true]{border-color:var(--sqc-border-strong);background:var(--sqc-selected);color:var(--sqc-text);font-weight:600}.sqc-choices{flex-direction:column;gap:7px;margin:10px 0 2px;display:flex}.sqc-choice{width:100%;font-family:var(--sqc-font-family);text-align:left;color:var(--sqc-text);background:var(--sqc-bg);border:1px solid var(--sqc-border);cursor:pointer;border-radius:12px;align-items:center;gap:8px;padding:8px 11px;font-size:12.5px;transition:border-color .12s,background .12s;display:flex}.sqc-choice:hover:not(:disabled){border-color:var(--sqc-border-strong);background:var(--sqc-surface)}.sqc-choice:focus-visible{box-shadow:var(--sqc-focus);outline:none}.sqc-choice:disabled{cursor:default}.sqc-choice:disabled[aria-pressed=false]{opacity:.55}.sqc-choice[aria-pressed=true]{border-color:var(--sqc-border-strong);background:var(--sqc-selected)}.sqc-choice__box{border:1.5px solid var(--sqc-border-strong);border-radius:4px;flex:none;justify-content:center;align-items:center;width:15px;height:15px;display:inline-flex}.sqc-choice__box--on{color:var(--sqc-on-accent);background:var(--sqc-accent-color);border-color:var(--sqc-accent-color)}.sqc-choice__box svg{width:11px;height:11px}.sqc-choice__label{overflow-wrap:anywhere}.sqc-choice__detail{color:var(--sqc-text-muted);margin-top:1px;font-size:11.5px;display:block}.sqc-selection{flex-direction:column;gap:10px;margin:2px 0;display:flex}.sqc-selection__question{flex-direction:column;gap:2px;display:flex}.sqc-selection__ask{font-family:var(--sqc-font-family);color:var(--sqc-text);margin:0;font-size:13px;font-weight:600}.sqc-selection__actions{display:flex}.sqc-selection__validate{height:32px;font-family:var(--sqc-font-family);color:var(--sqc-on-accent);background:var(--sqc-accent-color);cursor:pointer;border:1px solid #0000;border-radius:12px;flex:auto;justify-content:center;align-items:center;padding:0 12px;font-size:13px;font-weight:600;transition:filter .12s,background .12s;display:inline-flex}.sqc-selection__validate:hover:not(:disabled){background:var(--sqc-accent-hover)}.sqc-selection__validate:focus-visible{box-shadow:var(--sqc-focus);outline:none}.sqc-selection__validate:disabled{cursor:not-allowed;color:#fff;background:var(--sqc-disabled)}.sqc-selection__hint{font-family:var(--sqc-font-family);color:var(--sqc-text-muted);margin:0;font-size:11.5px}.sqc-table{scrollbar-width:thin;margin:0 0 8px;overflow-x:auto}.sqc-table table{border-collapse:collapse;min-width:100%;font-family:var(--sqc-font-family);white-space:nowrap;font-size:12.5px}.sqc-table th,.sqc-table td{text-align:left;vertical-align:top;border-bottom:1px solid var(--sqc-border);padding:6px 10px 6px 0}.sqc-table thead th{text-transform:uppercase;letter-spacing:.05em;color:var(--sqc-text-muted);font-size:10.5px;font-weight:600}.sqc-table tbody th{font-weight:500}.sqc-msg--user .sqc-table th,.sqc-msg--user .sqc-table td{border-bottom-color:#ffffff40}.sqc-msg--user .sqc-table thead th{color:#fffc}.sqc-table tbody tr:last-child th,.sqc-table tbody tr:last-child td{border-bottom:0}.sqc-msg__time{color:var(--sqc-text-muted);font-variant-numeric:tabular-nums;margin-top:3px;font-size:10px;display:block}.sqc-msg--user .sqc-msg__time{color:#ffffffb3;text-align:right}.sqc-caret{vertical-align:text-bottom;background:currentColor;width:2px;height:1em;margin-left:2px;animation:1s step-end infinite sqc-blink;display:inline-block}@keyframes sqc-blink{0%,to{opacity:1}50%{opacity:0}}.sqc-typing{gap:3px;padding:2px 0;display:inline-flex}.sqc-typing i{background:var(--sqc-neutral-400);border-radius:50%;width:5px;height:5px;animation:1.2s infinite sqc-pulse}.sqc-typing i:nth-child(2){animation-delay:.2s}.sqc-typing i:nth-child(3){animation-delay:.4s}@keyframes sqc-pulse{0%,60%,to{opacity:.25}30%{opacity:1}}.sqc-suggestions{flex-direction:column;gap:7px;display:flex}.sqc-suggestion{border:1px solid var(--sqc-border);background:var(--sqc-bg);width:100%;color:var(--sqc-text);font-family:var(--sqc-font-family);cursor:pointer;text-align:left;border-radius:12px;align-items:center;gap:8px;padding:8px 11px;font-size:12.5px;transition:background .15s,border-color .15s;display:flex}.sqc-suggestion:before{content:\"\";background:var(--sqc-accent-fg);border-radius:50%;flex:none;width:5px;height:5px}.sqc-suggestion:hover{background:var(--sqc-surface);border-color:var(--sqc-border-strong)}.sqc-suggestion:focus-visible{box-shadow:var(--sqc-focus);outline:none}.sqc-composer{border-top:1px solid var(--sqc-border);background:var(--sqc-bg);flex-wrap:wrap;flex-shrink:0;align-items:flex-end;gap:8px;padding:12px 14px;display:flex}.sqc-composer--dropping{outline:2px dashed var(--sqc-accent-color);outline-offset:-4px}.sqc-attachments{flex-wrap:wrap;flex-basis:100%;gap:6px;display:flex}.sqc-attachments--sent{margin-top:8px}.sqc-chip{border:1px solid var(--sqc-border);background:var(--sqc-selected);max-width:100%;color:var(--sqc-text);border-radius:999px;align-items:center;gap:4px;padding:3px 4px 3px 10px;font-size:12px;display:inline-flex}.sqc-chip--waiting{opacity:.6;padding-right:10px}.sqc-chip__name{text-overflow:ellipsis;white-space:nowrap;max-width:180px;overflow:hidden}.sqc-chip__remove{width:18px;height:18px;color:var(--sqc-text-muted);cursor:pointer;background:0 0;border:0;border-radius:999px;justify-content:center;align-items:center;padding:0;font-size:14px;line-height:1;display:inline-flex}.sqc-chip__remove:hover{background:var(--sqc-selected);color:var(--sqc-text)}.sqc-attachments__error{color:var(--sqc-error-600);flex-basis:100%;margin:0;font-size:12px}.sqc-attachment__image{border-radius:12px;max-width:100%;max-height:180px;display:block}.sqc-file-input{display:none}.sqc-btn--attach{color:var(--sqc-text-muted);background:0 0}.sqc-btn--attach:hover{background:var(--sqc-selected);color:var(--sqc-text)}.sqc-composer__field{flex:1;min-width:0;position:relative}.sqc-composer__input{border:1px solid var(--sqc-border-strong);background:var(--sqc-bg);width:100%;min-height:38px;max-height:132px;color:var(--sqc-text);font-family:var(--sqc-font-family);resize:none;border-radius:12px;outline:none;padding:9px 12px;font-size:13.5px;line-height:1.4;transition:border-color .15s,box-shadow .15s;display:block;overflow-y:hidden}.sqc-composer__input::placeholder{color:var(--sqc-neutral-400)}.sqc-composer__input:focus{border-color:var(--sqc-text);box-shadow:var(--sqc-focus-input)}.sqc-mentions{z-index:2;border:1px solid var(--sqc-border);background:var(--sqc-bg);max-height:184px;box-shadow:var(--sqc-shadow);scrollbar-width:thin;border-radius:12px;margin:0;padding:4px;list-style:none;position:absolute;bottom:calc(100% + 6px);left:0;right:0;overflow-y:auto}.sqc-mention{cursor:pointer;color:var(--sqc-text);border-radius:8px;align-items:baseline;gap:6px;padding:6px 8px;font-size:12.5px;display:flex}.sqc-mention--active{background:var(--sqc-neutral-100)}.sqc-mention__icon{flex-shrink:0}.sqc-mention__handle{font-weight:600}.sqc-mention__name{text-overflow:ellipsis;white-space:nowrap;color:var(--sqc-text-muted);overflow:hidden}.sqc-composer__count{color:var(--sqc-text-muted);pointer-events:none;font-variant-numeric:tabular-nums;font-size:10px;position:absolute;bottom:4px;right:8px}.sqc-btn{cursor:pointer;border:none;border-radius:12px;flex-shrink:0;place-items:center;width:38px;height:38px;transition:background .15s,opacity .15s;display:grid}.sqc-btn svg{width:17px;height:17px}.sqc-btn--send{background:var(--sqc-accent-color);color:var(--sqc-on-accent)}.sqc-btn--send:hover:not(:disabled){background:var(--sqc-accent-hover)}.sqc-btn--send:disabled{background:var(--sqc-disabled);color:#fff;cursor:not-allowed}.sqc-btn--stop{background:var(--sqc-bg);color:var(--sqc-text);border:1px solid var(--sqc-border)}.sqc-btn--stop:hover{border-color:var(--sqc-border-strong);background:var(--sqc-surface)}.sqc-btn:focus-visible{box-shadow:var(--sqc-focus);outline:none}.sqc-hint{padding:0 16px max(9px, env(safe-area-inset-bottom));color:var(--sqc-text-muted);text-align:center;flex-shrink:0;margin:0;font-size:10.5px;line-height:1.35}@media (max-width:520px){.sqc{--sqc-width:100vw}.sqc-panel{border-left:none}.sqc-launcher{bottom:16px;right:16px}.sqc[data-position=bottom-left] .sqc-launcher{left:16px}.sqc[data-layout=floating] .sqc-panel,.sqc[data-layout=floating][data-position=bottom-left] .sqc-panel{border:none;border-radius:0;max-width:none;height:auto;max-height:none;top:0;bottom:0;left:0;right:0}}@media (prefers-reduced-motion:reduce){.sqc-launcher,.sqc-panel,.sqc-btn,.sqc-suggestion,.sqc-choice,.sqc-confirm__btn,.sqc-icon-btn,.sqc-icon-btn[data-tip]:after{transition:none}.sqc-typing i,.sqc-caret{animation:none}}.sqc-with-human{border:1px solid var(--sqc-border);background:var(--sqc-selected);color:var(--sqc-neutral-600);border-radius:12px;margin:8px 0 0;padding:8px 12px;font-size:13px}";
2277
+ var xn = ":host{--sqc-width:min(392px, 100vw);--sqc-height:640px;--sqc-z:2147480000;--sqc-radius:16px;--sqc-font-family:\"Plus Jakarta Sans\", ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;--sqc-font-heading:var(--sqc-font-family);z-index:var(--sqc-z);pointer-events:none;font-family:var(--sqc-font-family);-webkit-font-smoothing:antialiased;text-align:left;font-size:14px;line-height:1.5;display:block;position:fixed;top:0;bottom:0;left:0;right:0;margin:0!important}:host([hidden]){display:none}.sqc{--sqc-neutral-50:#f8fafc;--sqc-neutral-100:#f1f5f9;--sqc-neutral-200:#e2e8f0;--sqc-neutral-300:#cbd5e1;--sqc-neutral-400:#94a3b8;--sqc-neutral-500:#64748b;--sqc-neutral-600:#475569;--sqc-neutral-900:#0f172a;--sqc-error-50:#fff1f2;--sqc-error-100:#ffe4e6;--sqc-error-600:#e11d48;--sqc-accent-default:#000;--sqc-accent-color:var(--sqc-accent,var(--sqc-accent-default));--sqc-on-accent:#fff;--sqc-accent-hover:color-mix(in oklab, var(--sqc-accent-color) 84%, var(--sqc-on-accent));--sqc-accent-fg:var(--sqc-accent,var(--sqc-text));--sqc-bg:#fff;--sqc-surface:var(--sqc-neutral-50);--sqc-selected:var(--sqc-neutral-100);--sqc-border:var(--sqc-neutral-200);--sqc-border-strong:var(--sqc-neutral-300);--sqc-text:var(--sqc-neutral-900);--sqc-text-muted:var(--sqc-neutral-500);--sqc-link:#2563eb;--sqc-bubble-user:var(--sqc-accent-color);--sqc-bubble-user-text:var(--sqc-on-accent);--sqc-code-bg:var(--sqc-neutral-100);--sqc-disabled:var(--sqc-neutral-300);--sqc-shadow:0 10px 15px -3px #0f172a1a, 0 4px 6px -4px #0f172a1a;--sqc-shadow-bottom:0 6px 8px -6px #0f172a2e;--sqc-focus:0 0 0 2px var(--sqc-bg), 0 0 0 4px #0f172a4d;--sqc-focus-input:0 0 0 3px #0f172a1a;--sqc-danger:var(--sqc-error-600);color:var(--sqc-text);position:absolute;top:0;bottom:0;left:0;right:0}.sqc[data-theme=dark]{--sqc-neutral-50:#172033;--sqc-neutral-100:#1e293b;--sqc-neutral-200:#334155;--sqc-neutral-300:#475569;--sqc-neutral-400:#64748b;--sqc-neutral-500:#94a3b8;--sqc-neutral-600:#cbd5e1;--sqc-neutral-900:#f8fafc;--sqc-error-50:#2a0a12;--sqc-error-100:#4c0519;--sqc-error-600:#fb7185;--sqc-accent-default:#fff;--sqc-on-accent:#0f172a;--sqc-bg:#0f172a;--sqc-link:#60a5fa;--sqc-code-bg:#020617;--sqc-shadow:0 10px 24px -4px #0000008c;--sqc-shadow-bottom:0 6px 8px -6px #0000008c;--sqc-focus:0 0 0 2px var(--sqc-bg), 0 0 0 4px #f8fafc59;--sqc-focus-input:0 0 0 3px #f8fafc1f}@supports (color:oklch(from red l c h)){.sqc{--sqc-on-accent:oklch(from var(--sqc-accent-color) clamp(.208, (.62 - l) * 1000, 1) 0 0)}}.sqc *,.sqc :before,.sqc :after{box-sizing:border-box}.sqc-launcher{background:var(--sqc-accent-color);width:56px;height:56px;color:var(--sqc-on-accent);cursor:pointer;pointer-events:auto;box-shadow:var(--sqc-shadow);border:none;border-radius:50%;place-items:center;padding:0;transition:transform .18s,opacity .18s,background .18s,box-shadow .18s;display:grid;position:absolute;bottom:24px;right:24px}.sqc[data-position=bottom-left] .sqc-launcher{left:24px;right:auto}.sqc-launcher:hover{background:var(--sqc-accent-hover);transform:scale(1.06)}.sqc-launcher:focus-visible{box-shadow:var(--sqc-focus);outline:none}.sqc[data-open=true] .sqc-launcher{opacity:0;pointer-events:none;transform:scale(.5)}.sqc-launcher__icon svg{width:26px;height:26px;display:block}.sqc-slot-icon::slotted(*){justify-content:center;align-items:center;width:26px;height:26px;display:inline-flex}.sqc-launcher__badge{background:var(--sqc-error-600);border:2px solid var(--sqc-bg);border-radius:50%;width:12px;height:12px;position:absolute;top:6px;right:6px}.sqc-panel{width:var(--sqc-width);background:var(--sqc-bg);border-left:1px solid var(--sqc-border);box-shadow:var(--sqc-shadow);pointer-events:auto;visibility:hidden;flex-direction:column;transition:transform .26s cubic-bezier(.22,1,.36,1),visibility 0s linear .26s;display:flex;position:absolute;top:0;bottom:0;right:0;transform:translate(100%)}.sqc[data-open=true] .sqc-panel{visibility:visible;transition:transform .26s cubic-bezier(.22,1,.36,1),visibility;transform:translate(0)}.sqc[data-layout=floating] .sqc-panel{max-width:calc(100% - 48px);height:var(--sqc-height);border:1px solid var(--sqc-border);border-radius:var(--sqc-radius);opacity:0;transform-origin:100% 100%;max-height:calc(100% - 48px);transition:transform .22s cubic-bezier(.22,1,.36,1),opacity .22s,visibility 0s linear .22s;top:auto;bottom:24px;right:24px;overflow:hidden;transform:translateY(16px)scale(.96)}.sqc[data-layout=floating][data-position=bottom-left] .sqc-panel{transform-origin:0 100%;left:24px;right:auto}.sqc[data-layout=floating][data-open=true] .sqc-panel{opacity:1;transition:transform .22s cubic-bezier(.22,1,.36,1),opacity .22s,visibility;transform:none}.sqc-header{background:var(--sqc-bg);color:var(--sqc-text);border-bottom:1px solid var(--sqc-border);flex-shrink:0;align-items:center;gap:8px;padding:13px 12px 13px 16px;display:flex}.sqc-header__icon{color:var(--sqc-accent-fg);flex-shrink:0;place-items:center;display:grid}.sqc-header__icon svg{width:17px;height:17px;display:block}.sqc-header__titles{flex:1;min-width:0}.sqc-header__heading,.sqc-header__sub{text-overflow:ellipsis;white-space:nowrap;margin:0;overflow:hidden}.sqc-header__heading{font-family:var(--sqc-font-heading);letter-spacing:-.2px;font-size:15px;font-weight:700}.sqc-header__sub{color:var(--sqc-text-muted);font-size:12px}.sqc-icon-btn{width:26px;height:26px;color:var(--sqc-text-muted);cursor:pointer;background:0 0;border:none;border-radius:8px;flex-shrink:0;place-items:center;transition:background .15s;display:grid}.sqc-icon-btn:hover{background:var(--sqc-surface);color:var(--sqc-text)}.sqc-icon-btn:focus-visible{box-shadow:var(--sqc-focus);outline:none}.sqc-icon-btn svg{width:16px;height:16px}.sqc-icon-btn[data-tip]{position:relative}.sqc-icon-btn[data-tip]:after{content:attr(data-tip);z-index:6;background:var(--sqc-text);color:var(--sqc-bg);font-family:var(--sqc-font-family);white-space:nowrap;pointer-events:none;opacity:0;border-radius:8px;padding:4px 8px;font-size:11px;font-weight:500;line-height:1.3;transition:opacity .12s .15s;position:absolute;top:calc(100% + 6px);right:0}.sqc-icon-btn[data-tip]:hover:after{opacity:1}.sqc-icon-btn[data-tip]:focus-visible:after{opacity:1}.sqc-history-pop{z-index:5;position:absolute;top:54px;left:0;right:0}.sqc-history{background:var(--sqc-bg);max-height:320px;box-shadow:var(--sqc-shadow-bottom);flex-direction:column;display:flex;overflow-y:auto}.sqc-history__empty{color:var(--sqc-text-muted);text-align:center;margin:0;padding:14px 16px;font-size:12px}.sqc-history__item{border:none;border-bottom:1px solid var(--sqc-border);width:100%;color:var(--sqc-text);text-align:left;cursor:pointer;background:0 0;flex-direction:column;gap:2px;padding:10px 16px;transition:background .15s;display:flex}.sqc-history__item:last-child{border-bottom:none}.sqc-history__item:hover{background:var(--sqc-surface)}.sqc-history__item:focus-visible{box-shadow:var(--sqc-focus);outline:none}.sqc-history__item[aria-current=true]{background:var(--sqc-selected)}.sqc-history__item[aria-current=true] .sqc-history__title{color:var(--sqc-text);font-weight:600}.sqc-history__title{text-overflow:ellipsis;white-space:nowrap;font-size:13px;overflow:hidden}.sqc-history__date{color:var(--sqc-text-muted);font-size:11px}.sqc-context{background:var(--sqc-selected);border:1px solid var(--sqc-border);color:var(--sqc-text);border-radius:12px;flex-wrap:wrap;flex-shrink:0;align-items:center;gap:8px;margin:12px 16px 4px;padding:8px 11px;font-size:12px;display:flex}.sqc-chip{text-overflow:ellipsis;white-space:nowrap;align-items:baseline;gap:4px;max-width:100%;display:inline-flex;overflow:hidden}.sqc-chip b{font-weight:600}.sqc-chip:not(:last-child):after{content:\"·\";opacity:.5;margin-left:4px}.sqc-messages{overscroll-behavior:contain;background:var(--sqc-bg);scrollbar-width:thin;scrollbar-color:var(--sqc-neutral-300) transparent;flex-direction:column;flex:1;gap:13px;min-height:0;padding:12px 16px;display:flex;overflow-y:auto}.sqc-messages::-webkit-scrollbar{width:6px}.sqc-messages::-webkit-scrollbar-thumb{background:var(--sqc-neutral-300);border-radius:99px}.sqc-msg{flex-direction:column;max-width:93%;font-size:13.5px;display:flex}.sqc-msg--assistant{align-self:flex-start}.sqc-msg--user{align-self:flex-end}.sqc-msg__who{color:var(--sqc-text-muted);align-items:center;gap:6px;margin-bottom:4px;font-size:11px;font-weight:500;display:flex}.sqc-msg__who svg{width:12px;height:12px;color:var(--sqc-accent-fg);flex-shrink:0}.sqc-msg__unaddressed{color:var(--sqc-text-muted);margin:8px 0 0;font-size:11.5px;line-height:1.5}.sqc-msg__unaddressed code{background:var(--sqc-code-bg);color:var(--sqc-text);border-radius:4px;margin-right:4px;padding:1px 4px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px}.sqc-msg--user .sqc-msg__bubble{background:var(--sqc-bubble-user);color:var(--sqc-bubble-user-text);border-radius:var(--sqc-radius) var(--sqc-radius) 4px var(--sqc-radius);padding:9px 13px}.sqc-msg--error .sqc-msg__bubble{background:var(--sqc-error-50);color:var(--sqc-error-600);border:1px solid var(--sqc-error-100);border-radius:12px;padding:11px}.sqc-msg__body{overflow-wrap:anywhere}.sqc-msg--assistant .sqc-msg__body{font-size:14px;line-height:1.6}.sqc-msg__body>:first-child{margin-top:0}.sqc-msg__body>:last-child{margin-bottom:0}.sqc-msg__body p{white-space:pre-wrap;margin:0 0 8px}.sqc-msg__body ul,.sqc-msg__body ol{margin:0 0 8px;padding-left:20px}.sqc-msg__body li{margin-bottom:3px}.sqc-msg__body code{background:var(--sqc-code-bg);border-radius:4px;padding:1px 4px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.85em}.sqc-msg--user .sqc-msg__body code{background:#ffffff38}.sqc-msg__body pre{background:var(--sqc-code-bg);border-radius:8px;margin:0 0 8px;padding:9px 11px;overflow-x:auto}.sqc-msg__body pre code{background:0 0;padding:0}.sqc-msg__body a{color:inherit;text-underline-offset:2px;text-decoration:underline}.sqc-msg--assistant .sqc-msg__body a{color:var(--sqc-link);text-decoration:none}.sqc-msg--assistant .sqc-msg__body a:hover{text-decoration:underline}.sqc-msg__body h3,.sqc-msg__body h4,.sqc-msg__body h5,.sqc-msg__body h6{font-family:var(--sqc-font-heading);letter-spacing:-.2px;margin:12px 0 6px;font-weight:700;line-height:1.3}.sqc-msg__body h3{font-size:1.05em}.sqc-msg__body h4{font-size:1em}.sqc-msg__body h5,.sqc-msg__body h6{font-size:.94em}.sqc-msg__body ul ul,.sqc-msg__body ul ol,.sqc-msg__body ol ul,.sqc-msg__body ol ol{margin:3px 0 0}.sqc-msg__body blockquote{border-left:2px solid var(--sqc-border-strong);color:var(--sqc-text-muted);white-space:pre-wrap;margin:0 0 8px;padding:2px 0 2px 10px}.sqc-msg--user .sqc-msg__body blockquote{color:inherit;opacity:.85;border-left-color:#ffffff73}.sqc-msg__body hr{border:0;border-top:1px solid var(--sqc-border);margin:10px 0}.sqc-msg--user .sqc-msg__body hr{border-top-color:#ffffff4d}.sqc-msg__body del{opacity:.7}.sqc-approval{flex-direction:column;gap:8px;margin:11px 0 2px;display:flex}.sqc-approval__actions{flex-wrap:wrap;gap:8px;display:flex}.sqc-approval__request{color:var(--sqc-text);margin:0;font-size:13px}.sqc-approval__args{border:1px solid var(--sqc-border);background:var(--sqc-surface);border-radius:12px;flex-direction:column;gap:4px;margin:0;padding:8px 10px;font-size:12px;display:flex}.sqc-approval__arg{gap:8px;display:flex}.sqc-approval__arg-name{color:var(--sqc-text-muted);flex:none;font-weight:500}.sqc-approval__arg-value{overflow-wrap:anywhere;min-width:0;color:var(--sqc-text);margin:0}.sqc-approval__btn{height:32px;font-family:var(--sqc-font-family);border:1px solid var(--sqc-border);background:var(--sqc-bg);color:var(--sqc-text);cursor:pointer;border-radius:12px;flex:auto;justify-content:center;align-items:center;padding:0 12px;font-size:13px;font-weight:500;transition:border-color .12s,background .12s;display:inline-flex}.sqc-approval__btn--yes:not(:disabled),.sqc-approval__btn--send:not(:disabled){background:var(--sqc-accent-color);color:var(--sqc-on-accent);border-color:#0000;font-weight:600}.sqc-approval__btn:hover:not(:disabled){border-color:var(--sqc-border-strong);background:var(--sqc-surface)}.sqc-approval__btn--yes:hover:not(:disabled),.sqc-approval__btn--send:hover:not(:disabled){background:var(--sqc-accent-hover);border-color:#0000}.sqc-approval__btn:focus-visible{box-shadow:var(--sqc-focus);outline:none}.sqc-approval__btn:disabled{cursor:default}.sqc-approval__btn:disabled[aria-pressed=false]{opacity:.45}.sqc-approval__btn[aria-pressed=true]{border-color:var(--sqc-border-strong);background:var(--sqc-selected);color:var(--sqc-text);font-weight:600}.sqc-approval__edit{flex-direction:column;gap:8px;display:flex}.sqc-approval__input{width:100%;font-family:var(--sqc-font-family);color:var(--sqc-text);background:var(--sqc-bg);border:1px solid var(--sqc-border-strong);resize:vertical;border-radius:12px;padding:8px 10px;font-size:13px;line-height:1.4}.sqc-approval__input:focus-visible{border-color:var(--sqc-text);box-shadow:var(--sqc-focus-input);outline:none}.sqc-approval__btn--send{flex:none;align-self:flex-end}.sqc-confirm{gap:8px;margin:11px 0 2px;display:flex}.sqc-confirm__btn{height:32px;font-family:var(--sqc-font-family);border:1px solid var(--sqc-border);background:var(--sqc-bg);color:var(--sqc-text);cursor:pointer;border-radius:12px;flex:1 1 0;justify-content:center;align-items:center;padding:0 12px;font-size:13px;font-weight:500;transition:border-color .12s,background .12s;display:inline-flex}.sqc-confirm__btn--yes:not(:disabled){background:var(--sqc-accent-color);color:var(--sqc-on-accent);border-color:#0000;font-weight:600}.sqc-confirm__btn:hover:not(:disabled){border-color:var(--sqc-border-strong);background:var(--sqc-surface)}.sqc-confirm__btn--yes:hover:not(:disabled){background:var(--sqc-accent-hover);border-color:#0000}.sqc-confirm__btn:focus-visible{box-shadow:var(--sqc-focus);outline:none}.sqc-confirm__btn:disabled{cursor:default}.sqc-confirm__btn:disabled[aria-pressed=false]{opacity:.45}.sqc-confirm__btn[aria-pressed=true]{border-color:var(--sqc-border-strong);background:var(--sqc-selected);color:var(--sqc-text);font-weight:600}.sqc-choices{flex-direction:column;gap:7px;margin:10px 0 2px;display:flex}.sqc-choice{width:100%;font-family:var(--sqc-font-family);text-align:left;color:var(--sqc-text);background:var(--sqc-bg);border:1px solid var(--sqc-border);cursor:pointer;border-radius:12px;align-items:center;gap:8px;padding:8px 11px;font-size:12.5px;transition:border-color .12s,background .12s;display:flex}.sqc-choice:hover:not(:disabled){border-color:var(--sqc-border-strong);background:var(--sqc-surface)}.sqc-choice:focus-visible{box-shadow:var(--sqc-focus);outline:none}.sqc-choice:disabled{cursor:default}.sqc-choice:disabled[aria-pressed=false]{opacity:.55}.sqc-choice[aria-pressed=true]{border-color:var(--sqc-border-strong);background:var(--sqc-selected)}.sqc-choice__box{border:1.5px solid var(--sqc-border-strong);border-radius:4px;flex:none;justify-content:center;align-items:center;width:15px;height:15px;display:inline-flex}.sqc-choice__box--on{color:var(--sqc-on-accent);background:var(--sqc-accent-color);border-color:var(--sqc-accent-color)}.sqc-choice__box svg{width:11px;height:11px}.sqc-choice__label{overflow-wrap:anywhere}.sqc-choice__detail{color:var(--sqc-text-muted);margin-top:1px;font-size:11.5px;display:block}.sqc-selection{flex-direction:column;gap:10px;margin:2px 0;display:flex}.sqc-selection__question{flex-direction:column;gap:2px;display:flex}.sqc-selection__ask{font-family:var(--sqc-font-family);color:var(--sqc-text);margin:0;font-size:13px;font-weight:600}.sqc-selection__actions{display:flex}.sqc-selection__validate{height:32px;font-family:var(--sqc-font-family);color:var(--sqc-on-accent);background:var(--sqc-accent-color);cursor:pointer;border:1px solid #0000;border-radius:12px;flex:auto;justify-content:center;align-items:center;padding:0 12px;font-size:13px;font-weight:600;transition:filter .12s,background .12s;display:inline-flex}.sqc-selection__validate:hover:not(:disabled){background:var(--sqc-accent-hover)}.sqc-selection__validate:focus-visible{box-shadow:var(--sqc-focus);outline:none}.sqc-selection__validate:disabled{cursor:not-allowed;color:#fff;background:var(--sqc-disabled)}.sqc-selection__hint{font-family:var(--sqc-font-family);color:var(--sqc-text-muted);margin:0;font-size:11.5px}.sqc-table{scrollbar-width:thin;margin:0 0 8px;overflow-x:auto}.sqc-table table{border-collapse:collapse;min-width:100%;font-family:var(--sqc-font-family);white-space:nowrap;font-size:12.5px}.sqc-table th,.sqc-table td{text-align:left;vertical-align:top;border-bottom:1px solid var(--sqc-border);padding:6px 10px 6px 0}.sqc-table thead th{text-transform:uppercase;letter-spacing:.05em;color:var(--sqc-text-muted);font-size:10.5px;font-weight:600}.sqc-table tbody th{font-weight:500}.sqc-msg--user .sqc-table th,.sqc-msg--user .sqc-table td{border-bottom-color:#ffffff40}.sqc-msg--user .sqc-table thead th{color:#fffc}.sqc-table tbody tr:last-child th,.sqc-table tbody tr:last-child td{border-bottom:0}.sqc-msg__time{color:var(--sqc-text-muted);font-variant-numeric:tabular-nums;margin-top:3px;font-size:10px;display:block}.sqc-msg--user .sqc-msg__time{color:#ffffffb3;text-align:right}.sqc-caret{vertical-align:text-bottom;background:currentColor;width:2px;height:1em;margin-left:2px;animation:1s step-end infinite sqc-blink;display:inline-block}@keyframes sqc-blink{0%,to{opacity:1}50%{opacity:0}}.sqc-typing{gap:3px;padding:2px 0;display:inline-flex}.sqc-typing i{background:var(--sqc-neutral-400);border-radius:50%;width:5px;height:5px;animation:1.2s infinite sqc-pulse}.sqc-typing i:nth-child(2){animation-delay:.2s}.sqc-typing i:nth-child(3){animation-delay:.4s}@keyframes sqc-pulse{0%,60%,to{opacity:.25}30%{opacity:1}}.sqc-suggestions{flex-direction:column;gap:7px;display:flex}.sqc-suggestion{border:1px solid var(--sqc-border);background:var(--sqc-bg);width:100%;color:var(--sqc-text);font-family:var(--sqc-font-family);cursor:pointer;text-align:left;border-radius:12px;align-items:center;gap:8px;padding:8px 11px;font-size:12.5px;transition:background .15s,border-color .15s;display:flex}.sqc-suggestion:before{content:\"\";background:var(--sqc-accent-fg);border-radius:50%;flex:none;width:5px;height:5px}.sqc-suggestion:hover{background:var(--sqc-surface);border-color:var(--sqc-border-strong)}.sqc-suggestion:focus-visible{box-shadow:var(--sqc-focus);outline:none}.sqc-composer{border-top:1px solid var(--sqc-border);background:var(--sqc-bg);flex-wrap:wrap;flex-shrink:0;align-items:flex-end;gap:8px;padding:12px 14px;display:flex}.sqc-composer--dropping{outline:2px dashed var(--sqc-accent-color);outline-offset:-4px}.sqc-attachments{flex-wrap:wrap;flex-basis:100%;gap:6px;display:flex}.sqc-attachments--sent{margin-top:8px}.sqc-chip{border:1px solid var(--sqc-border);background:var(--sqc-selected);max-width:100%;color:var(--sqc-text);border-radius:999px;align-items:center;gap:4px;padding:3px 4px 3px 10px;font-size:12px;display:inline-flex}.sqc-chip--waiting{opacity:.6;padding-right:10px}.sqc-chip__name{text-overflow:ellipsis;white-space:nowrap;max-width:180px;overflow:hidden}.sqc-chip__remove{width:18px;height:18px;color:var(--sqc-text-muted);cursor:pointer;background:0 0;border:0;border-radius:999px;justify-content:center;align-items:center;padding:0;font-size:14px;line-height:1;display:inline-flex}.sqc-chip__remove:hover{background:var(--sqc-selected);color:var(--sqc-text)}.sqc-attachments__error{color:var(--sqc-error-600);flex-basis:100%;margin:0;font-size:12px}.sqc-attachment__image{border-radius:12px;max-width:100%;max-height:180px;display:block}.sqc-file-input{display:none}.sqc-btn--attach{color:var(--sqc-text-muted);background:0 0}.sqc-btn--attach:hover{background:var(--sqc-selected);color:var(--sqc-text)}.sqc-composer__field{flex:1;min-width:0;position:relative}.sqc-composer__input{border:1px solid var(--sqc-border-strong);background:var(--sqc-bg);width:100%;min-height:38px;max-height:132px;color:var(--sqc-text);font-family:var(--sqc-font-family);resize:none;border-radius:12px;outline:none;padding:9px 12px;font-size:13.5px;line-height:1.4;transition:border-color .15s,box-shadow .15s;display:block;overflow-y:hidden}.sqc-composer__input::placeholder{color:var(--sqc-neutral-400)}.sqc-composer__input:focus{border-color:var(--sqc-text);box-shadow:var(--sqc-focus-input)}.sqc-mentions{z-index:2;border:1px solid var(--sqc-border);background:var(--sqc-bg);max-height:184px;box-shadow:var(--sqc-shadow);scrollbar-width:thin;border-radius:12px;margin:0;padding:4px;list-style:none;position:absolute;bottom:calc(100% + 6px);left:0;right:0;overflow-y:auto}.sqc-mention{cursor:pointer;color:var(--sqc-text);border-radius:8px;align-items:baseline;gap:6px;padding:6px 8px;font-size:12.5px;display:flex}.sqc-mention--active{background:var(--sqc-neutral-100)}.sqc-mention__icon{flex-shrink:0}.sqc-mention__handle{font-weight:600}.sqc-mention__name{text-overflow:ellipsis;white-space:nowrap;color:var(--sqc-text-muted);overflow:hidden}.sqc-composer__count{color:var(--sqc-text-muted);pointer-events:none;font-variant-numeric:tabular-nums;font-size:10px;position:absolute;bottom:4px;right:8px}.sqc-btn{cursor:pointer;border:none;border-radius:12px;flex-shrink:0;place-items:center;width:38px;height:38px;transition:background .15s,opacity .15s;display:grid}.sqc-btn svg{width:17px;height:17px}.sqc-btn--send{background:var(--sqc-accent-color);color:var(--sqc-on-accent)}.sqc-btn--send:hover:not(:disabled){background:var(--sqc-accent-hover)}.sqc-btn--send:disabled{background:var(--sqc-disabled);color:#fff;cursor:not-allowed}.sqc-btn--stop{background:var(--sqc-bg);color:var(--sqc-text);border:1px solid var(--sqc-border)}.sqc-btn--stop:hover{border-color:var(--sqc-border-strong);background:var(--sqc-surface)}.sqc-btn:focus-visible{box-shadow:var(--sqc-focus);outline:none}.sqc-hint{padding:0 16px max(9px, env(safe-area-inset-bottom));color:var(--sqc-text-muted);text-align:center;flex-shrink:0;margin:0;font-size:10.5px;line-height:1.35}.sqc-powered{padding:0 16px max(9px, env(safe-area-inset-bottom));text-align:center;flex-shrink:0;margin:0;font-size:10.5px;line-height:1.35}.sqc-powered a{color:var(--sqc-text-muted);text-decoration:none}.sqc-powered a:hover{text-decoration:underline}@media (max-width:520px){.sqc{--sqc-width:100vw}.sqc-panel{border-left:none}.sqc-launcher{bottom:16px;right:16px}.sqc[data-position=bottom-left] .sqc-launcher{left:16px}.sqc[data-layout=floating] .sqc-panel,.sqc[data-layout=floating][data-position=bottom-left] .sqc-panel{border:none;border-radius:0;max-width:none;height:auto;max-height:none;top:0;bottom:0;left:0;right:0}}@media (prefers-reduced-motion:reduce){.sqc-launcher,.sqc-panel,.sqc-btn,.sqc-suggestion,.sqc-choice,.sqc-confirm__btn,.sqc-icon-btn,.sqc-icon-btn[data-tip]:after{transition:none}.sqc-typing i,.sqc-caret{animation:none}}.sqc-with-human{border:1px solid var(--sqc-border);background:var(--sqc-selected);color:var(--sqc-neutral-600);border-radius:12px;margin:8px 0 0;padding:8px 12px;font-size:13px}";
2263
2278
  //#endregion
2264
2279
  //#region \0@oxc-project+runtime@0.147.0/helpers/esm/checkPrivateRedeclaration.js
2265
2280
  function Sn(e, t) {
@@ -2375,7 +2390,14 @@ function Pn(e) {
2375
2390
  function Fn(e) {
2376
2391
  return e === "floating" || e === "sidebar" ? e : void 0;
2377
2392
  }
2378
- function In() {
2393
+ var In = [
2394
+ "context",
2395
+ "embedKey",
2396
+ "user",
2397
+ "getSubjectToken",
2398
+ "agent"
2399
+ ];
2400
+ function Ln() {
2379
2401
  var e, t, n, r, i, a, o, s, c, l, u, d, f, p;
2380
2402
  return t = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakSet(), f = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), e = class extends HTMLElement {
2381
2403
  constructor() {
@@ -2396,6 +2418,11 @@ function In() {
2396
2418
  t.textContent = xn, e.append(t);
2397
2419
  }
2398
2420
  Q(t, this, document.createElement("div")), e.append($(t, this));
2421
+ for (let e of In) {
2422
+ if (!Object.hasOwn(this, e)) continue;
2423
+ let t = this[e];
2424
+ delete this[e], this[e] = t;
2425
+ }
2399
2426
  }
2400
2427
  connectedCallback() {
2401
2428
  Q(i, this, !0), Z(d, this, h).call(this);
@@ -2470,7 +2497,7 @@ function In() {
2470
2497
  }
2471
2498
  $(n, this).send(e);
2472
2499
  }
2473
- }, Ke(e, "observedAttributes", Tn), e;
2500
+ }, Ge(e, "observedAttributes", Tn), e;
2474
2501
  function m() {
2475
2502
  $(r, this) || !$(i, this) || (Q(r, this, !0), queueMicrotask(() => {
2476
2503
  Q(r, this, !1), $(i, this) && Z(d, this, h).call(this);
@@ -2478,7 +2505,7 @@ function In() {
2478
2505
  }
2479
2506
  function h() {
2480
2507
  let e = (e) => this.getAttribute(e) ?? void 0;
2481
- ie(/* @__PURE__ */ J(bn, {
2508
+ ie(/* @__PURE__ */ Y(bn, {
2482
2509
  embedKey: this.embedKey,
2483
2510
  context: this.context,
2484
2511
  user: this.user,
@@ -2503,14 +2530,14 @@ function In() {
2503
2530
  }), $(t, this));
2504
2531
  }
2505
2532
  }
2506
- var Ln;
2507
- function Rn(e = wn) {
2508
- typeof window > "u" || typeof HTMLElement > "u" || (Ln ?? (Ln = In()), window.customElements.get(e) || window.customElements.define(e, Ln));
2533
+ var Rn;
2534
+ function zn(e = wn) {
2535
+ typeof window > "u" || typeof HTMLElement > "u" || (Rn ?? (Rn = Ln()), window.customElements.get(e) || window.customElements.define(e, Rn));
2509
2536
  }
2510
2537
  //#endregion
2511
2538
  //#region src/index.ts
2512
- Rn();
2539
+ zn();
2513
2540
  //#endregion
2514
- export { Je as a, Me as c, q as i, Rn as n, Ve as o, qe as r, je as s, wn as t };
2541
+ export { qe as a, je as c, J as i, zn as n, Be as o, Ke as r, Ae as s, wn as t };
2515
2542
 
2516
- //# sourceMappingURL=src-D4ZbNlbK.js.map
2543
+ //# sourceMappingURL=src-2UbcV1gc.js.map