@livelayer/react 0.10.3 → 0.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +9 -0
- package/dist/index.js +3 -3
- package/dist/index.mjs +587 -584
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as g, jsx as n, Fragment as
|
|
3
|
-
import { Component as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import { LiveKitSession as
|
|
6
|
-
import { createLocalAudioTrack as
|
|
7
|
-
class
|
|
2
|
+
import { jsxs as g, jsx as n, Fragment as Ye } from "react/jsx-runtime";
|
|
3
|
+
import { Component as On, useState as C, useRef as N, useEffect as I, useCallback as E, useMemo as Ge, useLayoutEffect as mn, forwardRef as ut, useImperativeHandle as Hn, createElement as Wn } from "react";
|
|
4
|
+
import { createPortal as It } from "react-dom";
|
|
5
|
+
import { LiveKitSession as Bn } from "@livelayer/sdk";
|
|
6
|
+
import { createLocalAudioTrack as qn, Track as gn, createLocalVideoTrack as Fn } from "livekit-client";
|
|
7
|
+
class Un extends On {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments), this.state = { hasError: !1, error: null }, this.reset = () => {
|
|
10
10
|
this.setState({ hasError: !1, error: null });
|
|
@@ -34,7 +34,7 @@ class Fn extends zn {
|
|
|
34
34
|
] }) : this.props.children;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function jn(e) {
|
|
38
38
|
const [t, r] = C("idle"), [o, i] = C("idle"), [l, d] = C([]), [a, s] = C(null), [u, y] = C(null), [f, c] = C(null), [A, _] = C(!1), [x, b] = C(null), v = N(null), S = N(e.onDataMessage);
|
|
39
39
|
S.current = e.onDataMessage, I(() => {
|
|
40
40
|
const R = {
|
|
@@ -53,7 +53,7 @@ function Un(e) {
|
|
|
53
53
|
(F = S.current) == null || F.call(S, q);
|
|
54
54
|
},
|
|
55
55
|
onResumabilityChange: _
|
|
56
|
-
}, B = new
|
|
56
|
+
}, B = new Bn(
|
|
57
57
|
{
|
|
58
58
|
agentId: e.agentId,
|
|
59
59
|
baseUrl: e.baseUrl,
|
|
@@ -104,7 +104,7 @@ function Un(e) {
|
|
|
104
104
|
session: v.current
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function Vn() {
|
|
108
108
|
const e = N(null), t = N(null), r = N(null), o = N(null), i = N(/* @__PURE__ */ new Set()), l = N(null), d = E(() => {
|
|
109
109
|
const f = t.current;
|
|
110
110
|
if (!f) {
|
|
@@ -180,7 +180,7 @@ function jn() {
|
|
|
180
180
|
i.current.clear(), l.current = null;
|
|
181
181
|
}, [u]), { attach: s, detach: u, subscribe: y };
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function Yn() {
|
|
184
184
|
const [e, t] = C(!1), [r, o] = C(""), [i, l] = C(null), d = N(null), a = N(null), s = E(async (_) => {
|
|
185
185
|
var x, b;
|
|
186
186
|
if (d.current && a.current) {
|
|
@@ -192,7 +192,7 @@ function Vn() {
|
|
|
192
192
|
}
|
|
193
193
|
a.current = _, l(null);
|
|
194
194
|
try {
|
|
195
|
-
const v = await
|
|
195
|
+
const v = await qn({
|
|
196
196
|
echoCancellation: !0,
|
|
197
197
|
noiseSuppression: !0
|
|
198
198
|
});
|
|
@@ -251,15 +251,15 @@ function Vn() {
|
|
|
251
251
|
clearError: A
|
|
252
252
|
};
|
|
253
253
|
}
|
|
254
|
-
const
|
|
255
|
-
function
|
|
254
|
+
const Gn = { resolution: { width: 640, height: 480, frameRate: 24 } };
|
|
255
|
+
function Jn() {
|
|
256
256
|
const [e, t] = C(!1), [r, o] = C(null), [i, l] = C(null), [d, a] = C(""), s = N(null), u = N(null), y = E((v) => {
|
|
257
257
|
s.current = v;
|
|
258
258
|
}, []), f = E(() => {
|
|
259
259
|
var M;
|
|
260
260
|
const v = s.current, S = u.current;
|
|
261
261
|
if (S && v) {
|
|
262
|
-
const D = v.localParticipant.getTrackPublication(
|
|
262
|
+
const D = v.localParticipant.getTrackPublication(gn.Source.Camera), R = (D == null ? void 0 : D.track) ?? S;
|
|
263
263
|
try {
|
|
264
264
|
v.localParticipant.unpublishTrack(R);
|
|
265
265
|
} catch {
|
|
@@ -275,9 +275,9 @@ function Gn() {
|
|
|
275
275
|
if (S) {
|
|
276
276
|
o(null);
|
|
277
277
|
try {
|
|
278
|
-
const M = { ...
|
|
278
|
+
const M = { ...Gn };
|
|
279
279
|
v && (M.deviceId = v);
|
|
280
|
-
const D = await
|
|
280
|
+
const D = await Fn(M);
|
|
281
281
|
await S.localParticipant.publishTrack(D), u.current = D;
|
|
282
282
|
const k = D.attach();
|
|
283
283
|
l(k), t(!0), v && a(v);
|
|
@@ -314,7 +314,7 @@ function Gn() {
|
|
|
314
314
|
clearError: b
|
|
315
315
|
};
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function Kn() {
|
|
318
318
|
const [e, t] = C(!1), [r, o] = C(null), [i, l] = C(null), d = N(null), a = E((c) => {
|
|
319
319
|
d.current = c;
|
|
320
320
|
}, []), s = E(() => l(null), []), u = E(async () => {
|
|
@@ -333,7 +333,7 @@ function Jn() {
|
|
|
333
333
|
await c.localParticipant.setScreenShareEnabled(!0);
|
|
334
334
|
let A = 0;
|
|
335
335
|
const _ = () => {
|
|
336
|
-
const x = c.localParticipant.getTrackPublication(
|
|
336
|
+
const x = c.localParticipant.getTrackPublication(gn.Source.ScreenShare);
|
|
337
337
|
if (x != null && x.track) {
|
|
338
338
|
const b = x.track.attach();
|
|
339
339
|
l(b), t(!0);
|
|
@@ -365,7 +365,7 @@ function Jn() {
|
|
|
365
365
|
}, [e, s]), f = E(() => o(null), []);
|
|
366
366
|
return { isEnabled: e, error: r, previewEl: i, toggle: u, attachRoom: a, teardown: y, clearError: f };
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function Xn() {
|
|
369
369
|
const [e, t] = C([]), [r, o] = C([]), i = E(async () => {
|
|
370
370
|
if (!(typeof navigator > "u" || !navigator.mediaDevices))
|
|
371
371
|
try {
|
|
@@ -380,7 +380,7 @@ function Kn() {
|
|
|
380
380
|
return navigator.mediaDevices.addEventListener("devicechange", l), () => navigator.mediaDevices.removeEventListener("devicechange", l);
|
|
381
381
|
}, [i]), { mics: e, cameras: r, refresh: i };
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function Qn(e, t, r = !1) {
|
|
384
384
|
const [o, i] = C(null), [l, d] = C(null), [a, s] = C(!r && !!e);
|
|
385
385
|
return I(() => {
|
|
386
386
|
if (r || !e) {
|
|
@@ -403,7 +403,7 @@ function Xn(e, t, r = !1) {
|
|
|
403
403
|
}), () => u.abort();
|
|
404
404
|
}, [e, t, r]), { info: o, error: l, loading: a };
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function Zn(e) {
|
|
407
407
|
if (typeof window > "u") return null;
|
|
408
408
|
try {
|
|
409
409
|
return window.localStorage.getItem(e);
|
|
@@ -411,14 +411,14 @@ function Qn(e) {
|
|
|
411
411
|
return null;
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function er(e, t) {
|
|
415
415
|
if (!(typeof window > "u"))
|
|
416
416
|
try {
|
|
417
417
|
window.localStorage.setItem(e, t);
|
|
418
418
|
} catch {
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
|
-
function
|
|
421
|
+
function tr({
|
|
422
422
|
value: e,
|
|
423
423
|
defaultValue: t = "expanded",
|
|
424
424
|
onChange: r
|
|
@@ -431,32 +431,32 @@ function er({
|
|
|
431
431
|
);
|
|
432
432
|
return [d, a];
|
|
433
433
|
}
|
|
434
|
-
const
|
|
435
|
-
function
|
|
436
|
-
return e &&
|
|
434
|
+
const nr = ["hidden", "minimized", "expanded"];
|
|
435
|
+
function rr(e) {
|
|
436
|
+
return e && nr.includes(e) ? e : null;
|
|
437
437
|
}
|
|
438
|
-
function
|
|
438
|
+
function or({
|
|
439
439
|
value: e,
|
|
440
440
|
defaultValue: t = "expanded",
|
|
441
441
|
onChange: r,
|
|
442
442
|
persistKey: o = "ll-widget",
|
|
443
443
|
disablePersistence: i = !1
|
|
444
444
|
} = {}) {
|
|
445
|
-
const l = `${o}:display-mode`, d = N(!1), [a, s] =
|
|
445
|
+
const l = `${o}:display-mode`, d = N(!1), [a, s] = tr({
|
|
446
446
|
value: e,
|
|
447
447
|
defaultValue: t,
|
|
448
448
|
onChange: (u) => {
|
|
449
|
-
e === void 0 && !i &&
|
|
449
|
+
e === void 0 && !i && er(l, u), r == null || r(u);
|
|
450
450
|
}
|
|
451
451
|
});
|
|
452
452
|
return I(() => {
|
|
453
453
|
if (d.current || (d.current = !0, i || e !== void 0)) return;
|
|
454
|
-
const u =
|
|
454
|
+
const u = rr(Zn(l));
|
|
455
455
|
u && u !== a && s(u);
|
|
456
456
|
}, []), [a, s];
|
|
457
457
|
}
|
|
458
|
-
const
|
|
459
|
-
function
|
|
458
|
+
const ir = 640;
|
|
459
|
+
function lr(e = ir) {
|
|
460
460
|
const [t, r] = C(!1);
|
|
461
461
|
return I(() => {
|
|
462
462
|
if (e === !1) {
|
|
@@ -471,75 +471,75 @@ function ir(e = or) {
|
|
|
471
471
|
});
|
|
472
472
|
}, [e]), t;
|
|
473
473
|
}
|
|
474
|
-
const
|
|
475
|
-
function
|
|
476
|
-
if (typeof window > "u" || window.history[
|
|
474
|
+
const Kt = "__llHistoryPatched", _t = "ll:pathname";
|
|
475
|
+
function ar() {
|
|
476
|
+
if (typeof window > "u" || window.history[Kt]) return;
|
|
477
477
|
const e = window.history.pushState, t = window.history.replaceState;
|
|
478
478
|
window.history.pushState = function(...r) {
|
|
479
479
|
const o = e.apply(this, r);
|
|
480
|
-
return window.dispatchEvent(new Event(
|
|
480
|
+
return window.dispatchEvent(new Event(_t)), o;
|
|
481
481
|
}, window.history.replaceState = function(...r) {
|
|
482
482
|
const o = t.apply(this, r);
|
|
483
|
-
return window.dispatchEvent(new Event(
|
|
484
|
-
}, window.history[
|
|
483
|
+
return window.dispatchEvent(new Event(_t)), o;
|
|
484
|
+
}, window.history[Kt] = !0;
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function Xt() {
|
|
487
487
|
return typeof window > "u" ? "/" : window.location.pathname || "/";
|
|
488
488
|
}
|
|
489
|
-
function
|
|
489
|
+
function cr(e) {
|
|
490
490
|
const [t, r] = C(
|
|
491
|
-
() => e ??
|
|
491
|
+
() => e ?? Xt()
|
|
492
492
|
);
|
|
493
493
|
return I(() => {
|
|
494
494
|
if (e !== void 0) return;
|
|
495
|
-
|
|
496
|
-
const o = () => r(
|
|
497
|
-
return o(), window.addEventListener("popstate", o), window.addEventListener(
|
|
498
|
-
window.removeEventListener("popstate", o), window.removeEventListener(
|
|
495
|
+
ar();
|
|
496
|
+
const o = () => r(Xt());
|
|
497
|
+
return o(), window.addEventListener("popstate", o), window.addEventListener(_t, o), () => {
|
|
498
|
+
window.removeEventListener("popstate", o), window.removeEventListener(_t, o);
|
|
499
499
|
};
|
|
500
500
|
}, [e]), e ?? t;
|
|
501
501
|
}
|
|
502
|
-
const
|
|
503
|
-
function sr(e) {
|
|
504
|
-
return e.replace(cr, "\\$&");
|
|
505
|
-
}
|
|
502
|
+
const Qt = /* @__PURE__ */ new Map(), sr = /[\\^$+?.()|{}[\]]/g;
|
|
506
503
|
function dr(e) {
|
|
507
|
-
|
|
504
|
+
return e.replace(sr, "\\$&");
|
|
505
|
+
}
|
|
506
|
+
function ur(e) {
|
|
507
|
+
const t = Qt.get(e);
|
|
508
508
|
if (t) return t;
|
|
509
|
-
const r = e.length > 1 && e.endsWith("/") ? e.slice(0, -1) : e, o = "", i = "", l = r.replace(/\*\*/g, o).replace(/\*/g, i), a =
|
|
510
|
-
return
|
|
509
|
+
const r = e.length > 1 && e.endsWith("/") ? e.slice(0, -1) : e, o = "", i = "", l = r.replace(/\*\*/g, o).replace(/\*/g, i), a = dr(l).replace(new RegExp(`\\/${o}`, "g"), "(?:\\/.*)?").replace(new RegExp(o, "g"), ".*").replace(new RegExp(i, "g"), "[^/]+"), s = new RegExp(`^${a}\\/?$`);
|
|
510
|
+
return Qt.set(e, s), s;
|
|
511
511
|
}
|
|
512
|
-
function
|
|
512
|
+
function fr(e, t) {
|
|
513
513
|
const r = t.length > 1 && t.endsWith("/") ? t.slice(0, -1) : t;
|
|
514
|
-
return
|
|
514
|
+
return ur(e).test(r);
|
|
515
515
|
}
|
|
516
|
-
function
|
|
517
|
-
return typeof e == "function" ? e(t) : e instanceof RegExp ? e.test(t) :
|
|
516
|
+
function pr(e, t) {
|
|
517
|
+
return typeof e == "function" ? e(t) : e instanceof RegExp ? e.test(t) : fr(e, t);
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function Zt(e, t) {
|
|
520
520
|
if (!e || e.length === 0) return !1;
|
|
521
521
|
for (const r of e)
|
|
522
|
-
if (
|
|
522
|
+
if (pr(r, t)) return !0;
|
|
523
523
|
return !1;
|
|
524
524
|
}
|
|
525
|
-
function pr(e, t, r) {
|
|
526
|
-
return e === void 0 ? !0 : Qt(r, e) ? !1 : t && t.length > 0 ? Qt(t, e) : !0;
|
|
527
|
-
}
|
|
528
525
|
function hr(e, t, r) {
|
|
529
|
-
return
|
|
530
|
-
|
|
526
|
+
return e === void 0 ? !0 : Zt(r, e) ? !1 : t && t.length > 0 ? Zt(t, e) : !0;
|
|
527
|
+
}
|
|
528
|
+
function mr(e, t, r) {
|
|
529
|
+
return Ge(
|
|
530
|
+
() => hr(e, t, r),
|
|
531
531
|
[e, t, r]
|
|
532
532
|
);
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function gr(e) {
|
|
535
535
|
return e === !1 ? { navigate: !1, thinking: !1, action: !1 } : e === void 0 || e === !0 ? { navigate: !0, thinking: !0, action: !0 } : {
|
|
536
536
|
navigate: e.navigate !== !1,
|
|
537
537
|
thinking: e.thinking !== !1,
|
|
538
538
|
action: e.action !== !1
|
|
539
539
|
};
|
|
540
540
|
}
|
|
541
|
-
function
|
|
542
|
-
const t =
|
|
541
|
+
function yr(e) {
|
|
542
|
+
const t = Ge(() => gr(e.config), [e.config]), r = e.baseUrl.replace(/\/+$/, ""), o = N(null), i = E(
|
|
543
543
|
(s) => {
|
|
544
544
|
try {
|
|
545
545
|
new Audio(`${r}${s}`).play().catch(() => {
|
|
@@ -591,12 +591,12 @@ function gr(e) {
|
|
|
591
591
|
}
|
|
592
592
|
o.current = null;
|
|
593
593
|
}
|
|
594
|
-
}, []),
|
|
594
|
+
}, []), Ge(
|
|
595
595
|
() => ({ playPageChange: l, playConfirmation: d, setThinking: a }),
|
|
596
596
|
[l, d, a]
|
|
597
597
|
);
|
|
598
598
|
}
|
|
599
|
-
const
|
|
599
|
+
const en = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ g(
|
|
600
600
|
"svg",
|
|
601
601
|
{
|
|
602
602
|
className: t,
|
|
@@ -642,7 +642,7 @@ const Zt = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ g(
|
|
|
642
642
|
}
|
|
643
643
|
)
|
|
644
644
|
}
|
|
645
|
-
),
|
|
645
|
+
), tn = ({ className: e }) => /* @__PURE__ */ n(
|
|
646
646
|
"svg",
|
|
647
647
|
{
|
|
648
648
|
className: e,
|
|
@@ -660,7 +660,7 @@ const Zt = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ g(
|
|
|
660
660
|
}
|
|
661
661
|
)
|
|
662
662
|
}
|
|
663
|
-
),
|
|
663
|
+
), vr = ({ className: e }) => /* @__PURE__ */ n(
|
|
664
664
|
"svg",
|
|
665
665
|
{
|
|
666
666
|
className: e,
|
|
@@ -671,12 +671,12 @@ const Zt = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ g(
|
|
|
671
671
|
"aria-hidden": "true",
|
|
672
672
|
children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
|
|
673
673
|
}
|
|
674
|
-
),
|
|
674
|
+
), br = {
|
|
675
675
|
left: 180,
|
|
676
676
|
right: 0,
|
|
677
677
|
up: -90,
|
|
678
678
|
down: 90
|
|
679
|
-
},
|
|
679
|
+
}, nn = ({ direction: e = "right", className: t }) => /* @__PURE__ */ n(
|
|
680
680
|
"svg",
|
|
681
681
|
{
|
|
682
682
|
className: t,
|
|
@@ -684,19 +684,19 @@ const Zt = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ g(
|
|
|
684
684
|
viewBox: "0 0 24 24",
|
|
685
685
|
stroke: "currentColor",
|
|
686
686
|
strokeWidth: 2,
|
|
687
|
-
style: { transform: `rotate(${
|
|
687
|
+
style: { transform: `rotate(${br[e]}deg)` },
|
|
688
688
|
"aria-hidden": "true",
|
|
689
689
|
children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 6l6 6-6 6" })
|
|
690
690
|
}
|
|
691
691
|
);
|
|
692
|
-
function
|
|
692
|
+
function wr(e) {
|
|
693
693
|
return e === "top-left" || e === "bottom-left" ? "left" : "right";
|
|
694
694
|
}
|
|
695
|
-
const
|
|
696
|
-
function
|
|
695
|
+
const yn = "ll-hidden-tab-center-y", _r = 5, rn = 16;
|
|
696
|
+
function xr() {
|
|
697
697
|
if (typeof window > "u") return null;
|
|
698
698
|
try {
|
|
699
|
-
const e = window.localStorage.getItem(
|
|
699
|
+
const e = window.localStorage.getItem(yn);
|
|
700
700
|
if (!e) return null;
|
|
701
701
|
const t = Number.parseFloat(e);
|
|
702
702
|
return Number.isFinite(t) ? t : null;
|
|
@@ -704,14 +704,14 @@ function _r() {
|
|
|
704
704
|
return null;
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
|
-
function
|
|
707
|
+
function on(e) {
|
|
708
708
|
if (!(typeof window > "u"))
|
|
709
709
|
try {
|
|
710
|
-
window.localStorage.setItem(
|
|
710
|
+
window.localStorage.setItem(yn, String(e));
|
|
711
711
|
} catch {
|
|
712
712
|
}
|
|
713
713
|
}
|
|
714
|
-
const
|
|
714
|
+
const kr = ({
|
|
715
715
|
position: e,
|
|
716
716
|
isMobile: t,
|
|
717
717
|
isSpeaking: r,
|
|
@@ -721,10 +721,10 @@ const xr = ({
|
|
|
721
721
|
agentName: d,
|
|
722
722
|
containerEl: a
|
|
723
723
|
}) => {
|
|
724
|
-
const s =
|
|
724
|
+
const s = wr(e), u = s === "right" ? "left" : "right", y = t ? 80 : 72, f = !!l, c = !!a, [A, _] = C(null), [x, b] = C(!1), v = N(null), S = N(!1), M = E(
|
|
725
725
|
(O) => {
|
|
726
726
|
if (typeof window > "u") return O;
|
|
727
|
-
const j = y / 2, H =
|
|
727
|
+
const j = y / 2, H = rn + j, G = window.innerHeight - rn - j;
|
|
728
728
|
return G < H ? Math.max(H, O) : Math.max(H, Math.min(G, O));
|
|
729
729
|
},
|
|
730
730
|
[y]
|
|
@@ -734,7 +734,7 @@ const xr = ({
|
|
|
734
734
|
_(null);
|
|
735
735
|
return;
|
|
736
736
|
}
|
|
737
|
-
const O =
|
|
737
|
+
const O = xr();
|
|
738
738
|
_(M(O ?? window.innerHeight / 2));
|
|
739
739
|
const j = () => {
|
|
740
740
|
_((H) => H === null ? null : M(H));
|
|
@@ -761,7 +761,7 @@ const xr = ({
|
|
|
761
761
|
const j = v.current;
|
|
762
762
|
if (!j) return;
|
|
763
763
|
const H = O.clientY - j.startClientY;
|
|
764
|
-
!j.moved && Math.abs(H) >
|
|
764
|
+
!j.moved && Math.abs(H) > _r && (j.moved = !0, b(!0)), j.moved && _(M(j.startCenterY + H));
|
|
765
765
|
},
|
|
766
766
|
[M]
|
|
767
767
|
), R = E(
|
|
@@ -772,7 +772,7 @@ const xr = ({
|
|
|
772
772
|
O.currentTarget.releasePointerCapture(O.pointerId);
|
|
773
773
|
} catch {
|
|
774
774
|
}
|
|
775
|
-
v.current = null, j.moved && (b(!1), S.current = !0, _((H) => (H !== null &&
|
|
775
|
+
v.current = null, j.moved && (b(!1), S.current = !0, _((H) => (H !== null && on(H), H)));
|
|
776
776
|
}
|
|
777
777
|
},
|
|
778
778
|
[]
|
|
@@ -790,7 +790,7 @@ const xr = ({
|
|
|
790
790
|
_((H) => {
|
|
791
791
|
if (H === null) return H;
|
|
792
792
|
const G = M(H + j);
|
|
793
|
-
return
|
|
793
|
+
return on(G), G;
|
|
794
794
|
});
|
|
795
795
|
}
|
|
796
796
|
},
|
|
@@ -823,9 +823,9 @@ const xr = ({
|
|
|
823
823
|
// as the click affordance), then the circular avatar photo
|
|
824
824
|
// taking the rest of the tab. Reinforces "this is an
|
|
825
825
|
// avatar-based experience" even when collapsed.
|
|
826
|
-
/* @__PURE__ */ g(
|
|
826
|
+
/* @__PURE__ */ g(Ye, { children: [
|
|
827
827
|
/* @__PURE__ */ n(
|
|
828
|
-
|
|
828
|
+
nn,
|
|
829
829
|
{
|
|
830
830
|
direction: u,
|
|
831
831
|
className: "ll-hidden__chevron ll-hidden__chevron--mini"
|
|
@@ -842,7 +842,7 @@ const xr = ({
|
|
|
842
842
|
)
|
|
843
843
|
] })
|
|
844
844
|
) : /* @__PURE__ */ n(
|
|
845
|
-
|
|
845
|
+
nn,
|
|
846
846
|
{
|
|
847
847
|
direction: u,
|
|
848
848
|
className: "ll-hidden__chevron"
|
|
@@ -850,7 +850,7 @@ const xr = ({
|
|
|
850
850
|
)
|
|
851
851
|
}
|
|
852
852
|
);
|
|
853
|
-
},
|
|
853
|
+
}, Lr = ({
|
|
854
854
|
audioLevel: e,
|
|
855
855
|
bars: t = 20,
|
|
856
856
|
maxHeight: r = 20,
|
|
@@ -858,7 +858,7 @@ const xr = ({
|
|
|
858
858
|
className: i,
|
|
859
859
|
barClassName: l
|
|
860
860
|
}) => {
|
|
861
|
-
const d = N(null), a = N([]), s =
|
|
861
|
+
const d = N(null), a = N([]), s = Ge(() => {
|
|
862
862
|
const y = (Math.sqrt(5) - 1) / 2;
|
|
863
863
|
return Array.from({ length: t }, (f, c) => 0.5 + c * y % 1 * 0.5);
|
|
864
864
|
}, [t]);
|
|
@@ -882,7 +882,7 @@ const xr = ({
|
|
|
882
882
|
},
|
|
883
883
|
f
|
|
884
884
|
)) });
|
|
885
|
-
},
|
|
885
|
+
}, Er = ({
|
|
886
886
|
position: e,
|
|
887
887
|
isMobile: t,
|
|
888
888
|
agentName: r,
|
|
@@ -919,7 +919,7 @@ const xr = ({
|
|
|
919
919
|
)
|
|
920
920
|
) : /* @__PURE__ */ n("div", { className: "ll-minimized__avatar ll-minimized__avatar--placeholder" }),
|
|
921
921
|
/* @__PURE__ */ n(
|
|
922
|
-
|
|
922
|
+
Lr,
|
|
923
923
|
{
|
|
924
924
|
audioLevel: d,
|
|
925
925
|
bars: 16,
|
|
@@ -942,10 +942,10 @@ const xr = ({
|
|
|
942
942
|
(y.key === "Enter" || y.key === " ") && (y.stopPropagation(), y.preventDefault(), s());
|
|
943
943
|
},
|
|
944
944
|
"aria-label": l ? "Unmute microphone" : "Mute microphone",
|
|
945
|
-
children: /* @__PURE__ */ n(
|
|
945
|
+
children: /* @__PURE__ */ n(en, { muted: l, className: "ll-minimized__icon" })
|
|
946
946
|
}
|
|
947
947
|
),
|
|
948
|
-
/* @__PURE__ */ n(
|
|
948
|
+
/* @__PURE__ */ n(tn, { className: "ll-minimized__icon ll-minimized__icon--expand" })
|
|
949
949
|
] })
|
|
950
950
|
]
|
|
951
951
|
}
|
|
@@ -982,7 +982,7 @@ const xr = ({
|
|
|
982
982
|
className: "ll-minimized__btn",
|
|
983
983
|
onClick: s,
|
|
984
984
|
"aria-label": l ? "Unmute microphone" : "Mute microphone",
|
|
985
|
-
children: /* @__PURE__ */ n(
|
|
985
|
+
children: /* @__PURE__ */ n(en, { muted: l, className: "ll-minimized__icon" })
|
|
986
986
|
}
|
|
987
987
|
),
|
|
988
988
|
/* @__PURE__ */ n(
|
|
@@ -992,7 +992,7 @@ const xr = ({
|
|
|
992
992
|
className: "ll-minimized__btn",
|
|
993
993
|
onClick: a,
|
|
994
994
|
"aria-label": `Expand ${r} widget`,
|
|
995
|
-
children: /* @__PURE__ */ n(
|
|
995
|
+
children: /* @__PURE__ */ n(tn, { className: "ll-minimized__icon" })
|
|
996
996
|
}
|
|
997
997
|
),
|
|
998
998
|
/* @__PURE__ */ n(
|
|
@@ -1002,13 +1002,13 @@ const xr = ({
|
|
|
1002
1002
|
className: "ll-minimized__btn ll-minimized__btn--close",
|
|
1003
1003
|
onClick: u,
|
|
1004
1004
|
"aria-label": "Close widget",
|
|
1005
|
-
children: /* @__PURE__ */ n(
|
|
1005
|
+
children: /* @__PURE__ */ n(vr, { className: "ll-minimized__icon" })
|
|
1006
1006
|
}
|
|
1007
1007
|
)
|
|
1008
1008
|
] })
|
|
1009
1009
|
] })
|
|
1010
1010
|
}
|
|
1011
|
-
),
|
|
1011
|
+
), Cr = ({
|
|
1012
1012
|
src: e,
|
|
1013
1013
|
alt: t,
|
|
1014
1014
|
preCannedPlaying: r = !1,
|
|
@@ -1046,14 +1046,14 @@ const xr = ({
|
|
|
1046
1046
|
}
|
|
1047
1047
|
)
|
|
1048
1048
|
);
|
|
1049
|
-
},
|
|
1049
|
+
}, Sr = 8, ln = 8, Nr = ({
|
|
1050
1050
|
open: e,
|
|
1051
1051
|
onClose: t,
|
|
1052
1052
|
anchorRef: r,
|
|
1053
1053
|
children: o
|
|
1054
1054
|
}) => {
|
|
1055
1055
|
const i = N(null), [l, d] = C(null);
|
|
1056
|
-
return
|
|
1056
|
+
return mn(() => {
|
|
1057
1057
|
if (!e) {
|
|
1058
1058
|
d(null);
|
|
1059
1059
|
return;
|
|
@@ -1062,9 +1062,9 @@ const xr = ({
|
|
|
1062
1062
|
if (!a) return;
|
|
1063
1063
|
const s = () => {
|
|
1064
1064
|
const u = a.getBoundingClientRect(), y = {
|
|
1065
|
-
top: u.top -
|
|
1065
|
+
top: u.top - Sr,
|
|
1066
1066
|
left: u.left + u.width / 2
|
|
1067
|
-
}, f =
|
|
1067
|
+
}, f = ln + 90, c = window.innerWidth - ln - 90;
|
|
1068
1068
|
y.left < f && (y.left = f), y.left > c && (y.left = c), d(y);
|
|
1069
1069
|
};
|
|
1070
1070
|
return s(), window.addEventListener("scroll", s, !0), window.addEventListener("resize", s), () => {
|
|
@@ -1081,7 +1081,7 @@ const xr = ({
|
|
|
1081
1081
|
return document.addEventListener("mousedown", a), document.addEventListener("keydown", s), () => {
|
|
1082
1082
|
document.removeEventListener("mousedown", a), document.removeEventListener("keydown", s);
|
|
1083
1083
|
};
|
|
1084
|
-
}, [e, t, r]), !e || l === null || typeof document > "u" ? null :
|
|
1084
|
+
}, [e, t, r]), !e || l === null || typeof document > "u" ? null : It(
|
|
1085
1085
|
/* @__PURE__ */ n(
|
|
1086
1086
|
"div",
|
|
1087
1087
|
{
|
|
@@ -1101,7 +1101,7 @@ const xr = ({
|
|
|
1101
1101
|
),
|
|
1102
1102
|
document.body
|
|
1103
1103
|
);
|
|
1104
|
-
},
|
|
1104
|
+
}, Ar = ({
|
|
1105
1105
|
isMuted: e,
|
|
1106
1106
|
onToggleMute: t,
|
|
1107
1107
|
isCameraEnabled: r,
|
|
@@ -1118,7 +1118,7 @@ const xr = ({
|
|
|
1118
1118
|
onDisconnect: A
|
|
1119
1119
|
}) => {
|
|
1120
1120
|
const [_, x] = C(!1), b = N(null);
|
|
1121
|
-
return /* @__PURE__ */ g(
|
|
1121
|
+
return /* @__PURE__ */ g(Ye, { children: [
|
|
1122
1122
|
/* @__PURE__ */ g(
|
|
1123
1123
|
"div",
|
|
1124
1124
|
{
|
|
@@ -1133,7 +1133,7 @@ const xr = ({
|
|
|
1133
1133
|
className: `ll-tool ${e ? "is-muted" : ""}`,
|
|
1134
1134
|
onClick: t,
|
|
1135
1135
|
"aria-label": e ? "Unmute microphone" : "Mute microphone",
|
|
1136
|
-
children: /* @__PURE__ */ n(
|
|
1136
|
+
children: /* @__PURE__ */ n(wn, { muted: e })
|
|
1137
1137
|
}
|
|
1138
1138
|
),
|
|
1139
1139
|
/* @__PURE__ */ n(
|
|
@@ -1146,7 +1146,7 @@ const xr = ({
|
|
|
1146
1146
|
"aria-label": "More controls",
|
|
1147
1147
|
"aria-haspopup": "menu",
|
|
1148
1148
|
"aria-expanded": _,
|
|
1149
|
-
children: /* @__PURE__ */ n(
|
|
1149
|
+
children: /* @__PURE__ */ n(Rr, {})
|
|
1150
1150
|
}
|
|
1151
1151
|
),
|
|
1152
1152
|
/* @__PURE__ */ n(
|
|
@@ -1156,14 +1156,14 @@ const xr = ({
|
|
|
1156
1156
|
className: "ll-tool ll-tool--danger",
|
|
1157
1157
|
onClick: A,
|
|
1158
1158
|
"aria-label": "End conversation",
|
|
1159
|
-
children: /* @__PURE__ */ n(
|
|
1159
|
+
children: /* @__PURE__ */ n(xn, {})
|
|
1160
1160
|
}
|
|
1161
1161
|
)
|
|
1162
1162
|
]
|
|
1163
1163
|
}
|
|
1164
1164
|
),
|
|
1165
1165
|
/* @__PURE__ */ g(
|
|
1166
|
-
|
|
1166
|
+
Nr,
|
|
1167
1167
|
{
|
|
1168
1168
|
open: _,
|
|
1169
1169
|
onClose: () => x(!1),
|
|
@@ -1178,7 +1178,7 @@ const xr = ({
|
|
|
1178
1178
|
o(), x(!1);
|
|
1179
1179
|
},
|
|
1180
1180
|
children: [
|
|
1181
|
-
/* @__PURE__ */ n(
|
|
1181
|
+
/* @__PURE__ */ n(bn, {}),
|
|
1182
1182
|
/* @__PURE__ */ n("span", { children: r ? "Stop camera" : "Start camera" })
|
|
1183
1183
|
]
|
|
1184
1184
|
}
|
|
@@ -1192,7 +1192,7 @@ const xr = ({
|
|
|
1192
1192
|
d(), x(!1);
|
|
1193
1193
|
},
|
|
1194
1194
|
children: [
|
|
1195
|
-
/* @__PURE__ */ n(
|
|
1195
|
+
/* @__PURE__ */ n(vn, {}),
|
|
1196
1196
|
/* @__PURE__ */ n("span", { children: l ? "Stop sharing" : "Share screen" })
|
|
1197
1197
|
]
|
|
1198
1198
|
}
|
|
@@ -1206,7 +1206,7 @@ const xr = ({
|
|
|
1206
1206
|
u(), x(!1);
|
|
1207
1207
|
},
|
|
1208
1208
|
children: [
|
|
1209
|
-
/* @__PURE__ */ n(
|
|
1209
|
+
/* @__PURE__ */ n(_n, { muted: s }),
|
|
1210
1210
|
/* @__PURE__ */ n("span", { children: s ? "Unmute speaker" : "Mute speaker" })
|
|
1211
1211
|
]
|
|
1212
1212
|
}
|
|
@@ -1220,7 +1220,7 @@ const xr = ({
|
|
|
1220
1220
|
c(), x(!1);
|
|
1221
1221
|
},
|
|
1222
1222
|
children: [
|
|
1223
|
-
/* @__PURE__ */ n(
|
|
1223
|
+
/* @__PURE__ */ n(Ir, {}),
|
|
1224
1224
|
/* @__PURE__ */ n("span", { children: f ? "Hide typing" : "Type a message" })
|
|
1225
1225
|
]
|
|
1226
1226
|
}
|
|
@@ -1243,7 +1243,7 @@ const xr = ({
|
|
|
1243
1243
|
)
|
|
1244
1244
|
] });
|
|
1245
1245
|
};
|
|
1246
|
-
function
|
|
1246
|
+
function Rr() {
|
|
1247
1247
|
return /* @__PURE__ */ g(
|
|
1248
1248
|
"svg",
|
|
1249
1249
|
{
|
|
@@ -1260,7 +1260,7 @@ function Ar() {
|
|
|
1260
1260
|
}
|
|
1261
1261
|
);
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1263
|
+
function Ir() {
|
|
1264
1264
|
return /* @__PURE__ */ n(
|
|
1265
1265
|
"svg",
|
|
1266
1266
|
{
|
|
@@ -1277,7 +1277,7 @@ function Rr() {
|
|
|
1277
1277
|
}
|
|
1278
1278
|
);
|
|
1279
1279
|
}
|
|
1280
|
-
const
|
|
1280
|
+
const Mr = ({
|
|
1281
1281
|
position: e,
|
|
1282
1282
|
isMobile: t,
|
|
1283
1283
|
agentName: r,
|
|
@@ -1309,103 +1309,104 @@ const Ir = ({
|
|
|
1309
1309
|
activeCameraId: j,
|
|
1310
1310
|
isScreenShareEnabled: H,
|
|
1311
1311
|
screenPreviewEl: G,
|
|
1312
|
-
isSpeakerMuted:
|
|
1313
|
-
allowCamera:
|
|
1314
|
-
allowScreenShare:
|
|
1312
|
+
isSpeakerMuted: ce,
|
|
1313
|
+
allowCamera: se,
|
|
1314
|
+
allowScreenShare: ge,
|
|
1315
1315
|
allowTyping: pe,
|
|
1316
|
-
showMinimize:
|
|
1317
|
-
|
|
1316
|
+
showMinimize: ye = !0,
|
|
1317
|
+
showClose: Ee = !0,
|
|
1318
|
+
chromeless: Pe = !1,
|
|
1318
1319
|
compactControls: ne = !1,
|
|
1319
|
-
transforming:
|
|
1320
|
-
transformingLabel:
|
|
1321
|
-
avatarVideoContainerRef:
|
|
1322
|
-
agentVideoEl:
|
|
1323
|
-
onConnect:
|
|
1324
|
-
onDisconnect:
|
|
1325
|
-
onRetry:
|
|
1326
|
-
onResumeAudio:
|
|
1320
|
+
transforming: ft,
|
|
1321
|
+
transformingLabel: Je,
|
|
1322
|
+
avatarVideoContainerRef: pt,
|
|
1323
|
+
agentVideoEl: le,
|
|
1324
|
+
onConnect: Ke,
|
|
1325
|
+
onDisconnect: Xe,
|
|
1326
|
+
onRetry: ht,
|
|
1327
|
+
onResumeAudio: Qe,
|
|
1327
1328
|
onToggleMute: Ce,
|
|
1328
|
-
onSwitchMicDevice:
|
|
1329
|
+
onSwitchMicDevice: $e,
|
|
1329
1330
|
onToggleCamera: Se,
|
|
1330
|
-
onSwitchCameraDevice:
|
|
1331
|
+
onSwitchCameraDevice: ze,
|
|
1331
1332
|
onToggleScreenShare: Ne,
|
|
1332
1333
|
onToggleSpeaker: Ae,
|
|
1333
1334
|
onSendMessage: Re,
|
|
1334
1335
|
onMinimize: P,
|
|
1335
|
-
onClose:
|
|
1336
|
-
onClearMicError:
|
|
1336
|
+
onClose: mt,
|
|
1337
|
+
onClearMicError: kt
|
|
1337
1338
|
}) => {
|
|
1338
1339
|
var De;
|
|
1339
|
-
const Ie = ((a == null ? void 0 : a.length) ?? 0) > 1, Me = x === "connecting" || x === "connected", re = x === "connected",
|
|
1340
|
+
const Ie = ((a == null ? void 0 : a.length) ?? 0) > 1, Me = x === "connecting" || x === "connected", re = x === "connected", Ze = x === "idle" || x === "disconnected" || x === "error", [et, Oe] = C(!1);
|
|
1340
1341
|
I(() => {
|
|
1341
|
-
if (!
|
|
1342
|
-
|
|
1342
|
+
if (!le) {
|
|
1343
|
+
Oe(!1);
|
|
1343
1344
|
return;
|
|
1344
1345
|
}
|
|
1345
|
-
if (!
|
|
1346
|
-
|
|
1346
|
+
if (!le.paused && le.readyState >= 2) {
|
|
1347
|
+
Oe(!0);
|
|
1347
1348
|
return;
|
|
1348
1349
|
}
|
|
1349
|
-
|
|
1350
|
-
const h = () =>
|
|
1351
|
-
return
|
|
1352
|
-
|
|
1350
|
+
Oe(!1);
|
|
1351
|
+
const h = () => Oe(!0);
|
|
1352
|
+
return le.addEventListener("playing", h), le.addEventListener("loadeddata", h), () => {
|
|
1353
|
+
le.removeEventListener("playing", h), le.removeEventListener("loadeddata", h);
|
|
1353
1354
|
};
|
|
1354
|
-
}, [
|
|
1355
|
+
}, [le]);
|
|
1355
1356
|
const [Te, ee] = C(!1);
|
|
1356
1357
|
I(() => {
|
|
1357
1358
|
if (!re) {
|
|
1358
1359
|
ee(!1);
|
|
1359
1360
|
return;
|
|
1360
1361
|
}
|
|
1361
|
-
if (
|
|
1362
|
+
if (et) return;
|
|
1362
1363
|
const h = setTimeout(() => ee(!0), 8e3);
|
|
1363
1364
|
return () => clearTimeout(h);
|
|
1364
|
-
}, [re,
|
|
1365
|
-
const
|
|
1365
|
+
}, [re, et]);
|
|
1366
|
+
const gt = x === "connecting" || re && !!o && !et && !Te, tt = N(null), oe = N(null);
|
|
1366
1367
|
I(() => {
|
|
1367
|
-
const h =
|
|
1368
|
+
const h = tt.current;
|
|
1368
1369
|
h && (h.innerHTML = "", U && (U.style.width = "100%", U.style.height = "100%", U.style.objectFit = "cover", U.style.transform = "scaleX(-1)", h.appendChild(U)));
|
|
1369
1370
|
}, [U]), I(() => {
|
|
1370
1371
|
const h = oe.current;
|
|
1371
1372
|
h && (h.innerHTML = "", G && (G.style.width = "100%", G.style.height = "100%", G.style.objectFit = "contain", h.appendChild(G)));
|
|
1372
1373
|
}, [G]);
|
|
1373
|
-
const [ie,
|
|
1374
|
+
const [ie, de] = C(!1), [ve, X] = C(!1), ue = N(null), be = N(null);
|
|
1374
1375
|
I(() => {
|
|
1375
|
-
if (!ie && !
|
|
1376
|
+
if (!ie && !ve && !A && !y) return;
|
|
1376
1377
|
const h = () => {
|
|
1377
|
-
|
|
1378
|
+
de(!1), X(!1), A && _(), y && f();
|
|
1378
1379
|
};
|
|
1379
1380
|
return document.addEventListener("click", h), () => document.removeEventListener("click", h);
|
|
1380
1381
|
}, [
|
|
1381
1382
|
ie,
|
|
1382
|
-
|
|
1383
|
+
ve,
|
|
1383
1384
|
A,
|
|
1384
1385
|
y,
|
|
1385
1386
|
_,
|
|
1386
1387
|
f
|
|
1387
1388
|
]);
|
|
1388
|
-
const [
|
|
1389
|
+
const [He, Lt] = C(!1), nt = E(() => Lt((h) => !h), []), [we, rt] = C(""), ot = E(
|
|
1389
1390
|
(h) => {
|
|
1390
1391
|
h.preventDefault();
|
|
1391
|
-
const J =
|
|
1392
|
-
J && (Re(J),
|
|
1392
|
+
const J = we.trim();
|
|
1393
|
+
J && (Re(J), rt(""));
|
|
1393
1394
|
},
|
|
1394
|
-
[
|
|
1395
|
-
),
|
|
1396
|
-
let
|
|
1395
|
+
[we, Re]
|
|
1396
|
+
), it = d.productName || "Live Layer";
|
|
1397
|
+
let _e = null, xe = null;
|
|
1397
1398
|
for (let h = v.length - 1; h >= 0; h--) {
|
|
1398
1399
|
const J = v[h];
|
|
1399
|
-
if (!
|
|
1400
|
+
if (!_e && J.role === "agent" ? _e = J : !xe && J.role === "user" && (xe = J), _e && xe) break;
|
|
1400
1401
|
}
|
|
1401
|
-
const
|
|
1402
|
+
const We = re ? (_e == null ? void 0 : _e.text) || null : l || null, yt = re && (xe == null ? void 0 : xe.text) || null, Be = [
|
|
1402
1403
|
"ll-expanded",
|
|
1403
1404
|
t ? "ll-expanded--mobile" : "ll-expanded--desktop"
|
|
1404
1405
|
].join(" ");
|
|
1405
1406
|
return /* @__PURE__ */ g(
|
|
1406
1407
|
"div",
|
|
1407
1408
|
{
|
|
1408
|
-
className:
|
|
1409
|
+
className: Be,
|
|
1409
1410
|
"data-position": e,
|
|
1410
1411
|
"data-state": re ? "connected" : Me ? "connecting" : "idle",
|
|
1411
1412
|
role: "dialog",
|
|
@@ -1413,7 +1414,7 @@ const Ir = ({
|
|
|
1413
1414
|
children: [
|
|
1414
1415
|
/* @__PURE__ */ g("div", { className: "ll-expanded__bg", children: [
|
|
1415
1416
|
o ? /* @__PURE__ */ n(
|
|
1416
|
-
|
|
1417
|
+
Cr,
|
|
1417
1418
|
{
|
|
1418
1419
|
src: o,
|
|
1419
1420
|
alt: r,
|
|
@@ -1432,8 +1433,8 @@ const Ir = ({
|
|
|
1432
1433
|
}
|
|
1433
1434
|
)
|
|
1434
1435
|
] }),
|
|
1435
|
-
/* @__PURE__ */ n("div", { ref:
|
|
1436
|
-
|
|
1436
|
+
/* @__PURE__ */ n("div", { ref: pt, className: "ll-expanded__video" }),
|
|
1437
|
+
gt && /* @__PURE__ */ g("div", { className: "ll-expanded__overlay ll-expanded__overlay--connecting", children: [
|
|
1437
1438
|
/* @__PURE__ */ n("div", { className: "ll-expanded__spinner" }),
|
|
1438
1439
|
/* @__PURE__ */ n("p", { className: "ll-expanded__overlay-text", children: u ? "Switching..." : "Connecting..." })
|
|
1439
1440
|
] }),
|
|
@@ -1442,29 +1443,29 @@ const Ir = ({
|
|
|
1442
1443
|
{
|
|
1443
1444
|
type: "button",
|
|
1444
1445
|
className: "ll-expanded__overlay ll-expanded__overlay--gesture",
|
|
1445
|
-
onClick:
|
|
1446
|
+
onClick: Qe,
|
|
1446
1447
|
children: [
|
|
1447
1448
|
/* @__PURE__ */ n("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": !0, children: /* @__PURE__ */ n("path", { d: "M3 9v6h4l5 5V4L7 9H3zm13.54.12a5 5 0 0 1 0 5.76l-1.41-1.41a3 3 0 0 0 0-2.94L16.54 9.12z" }) }),
|
|
1448
1449
|
/* @__PURE__ */ n("p", { className: "ll-expanded__overlay-text", children: "Tap to enable audio" })
|
|
1449
1450
|
]
|
|
1450
1451
|
}
|
|
1451
1452
|
),
|
|
1452
|
-
|
|
1453
|
+
ft && /* @__PURE__ */ g(
|
|
1453
1454
|
"div",
|
|
1454
1455
|
{
|
|
1455
1456
|
className: "ll-expanded__overlay ll-expanded__overlay--transforming",
|
|
1456
1457
|
role: "status",
|
|
1457
1458
|
"aria-live": "polite",
|
|
1458
|
-
"aria-label":
|
|
1459
|
+
"aria-label": Je,
|
|
1459
1460
|
children: [
|
|
1460
1461
|
/* @__PURE__ */ n("div", { className: "ll-expanded__spinner" }),
|
|
1461
|
-
/* @__PURE__ */ n("p", { className: "ll-expanded__overlay-text", children:
|
|
1462
|
+
/* @__PURE__ */ n("p", { className: "ll-expanded__overlay-text", children: Je })
|
|
1462
1463
|
]
|
|
1463
1464
|
}
|
|
1464
1465
|
),
|
|
1465
|
-
Me ? /* @__PURE__ */ g(
|
|
1466
|
+
Me ? /* @__PURE__ */ g(Ye, { children: [
|
|
1466
1467
|
!ne && /* @__PURE__ */ g("div", { className: "ll-expanded__topbar", children: [
|
|
1467
|
-
!
|
|
1468
|
+
!Pe && /* @__PURE__ */ g("div", { className: "ll-expanded__topbar-left", children: [
|
|
1468
1469
|
/* @__PURE__ */ g("div", { className: "ll-expanded__pill-wrap", children: [
|
|
1469
1470
|
/* @__PURE__ */ g(
|
|
1470
1471
|
"button",
|
|
@@ -1478,7 +1479,7 @@ const Ir = ({
|
|
|
1478
1479
|
"aria-expanded": Ie ? y : void 0,
|
|
1479
1480
|
children: [
|
|
1480
1481
|
/* @__PURE__ */ n("span", { className: "ll-hpill__label", children: r }),
|
|
1481
|
-
Ie && /* @__PURE__ */ n(
|
|
1482
|
+
Ie && /* @__PURE__ */ n(bt, {})
|
|
1482
1483
|
]
|
|
1483
1484
|
}
|
|
1484
1485
|
),
|
|
@@ -1529,7 +1530,7 @@ const Ir = ({
|
|
|
1529
1530
|
title: "Language: English",
|
|
1530
1531
|
children: [
|
|
1531
1532
|
/* @__PURE__ */ n("span", { className: "ll-hpill__label", children: "EN" }),
|
|
1532
|
-
/* @__PURE__ */ n(
|
|
1533
|
+
/* @__PURE__ */ n(bt, {})
|
|
1533
1534
|
]
|
|
1534
1535
|
}
|
|
1535
1536
|
),
|
|
@@ -1561,7 +1562,7 @@ const Ir = ({
|
|
|
1561
1562
|
)
|
|
1562
1563
|
] }),
|
|
1563
1564
|
/* @__PURE__ */ g("div", { className: "ll-expanded__header-actions", children: [
|
|
1564
|
-
|
|
1565
|
+
ye !== !1 && /* @__PURE__ */ n(
|
|
1565
1566
|
"button",
|
|
1566
1567
|
{
|
|
1567
1568
|
type: "button",
|
|
@@ -1569,18 +1570,18 @@ const Ir = ({
|
|
|
1569
1570
|
onClick: P,
|
|
1570
1571
|
"aria-label": "Minimize widget",
|
|
1571
1572
|
title: "Minimize",
|
|
1572
|
-
children: /* @__PURE__ */ n(
|
|
1573
|
+
children: /* @__PURE__ */ n(cn, {})
|
|
1573
1574
|
}
|
|
1574
1575
|
),
|
|
1575
|
-
/* @__PURE__ */ n(
|
|
1576
|
+
Ee !== !1 && /* @__PURE__ */ n(
|
|
1576
1577
|
"button",
|
|
1577
1578
|
{
|
|
1578
1579
|
type: "button",
|
|
1579
1580
|
className: "ll-hbtn ll-hbtn--danger",
|
|
1580
|
-
onClick:
|
|
1581
|
+
onClick: mt,
|
|
1581
1582
|
"aria-label": "End call",
|
|
1582
1583
|
title: "End call",
|
|
1583
|
-
children: /* @__PURE__ */ n(
|
|
1584
|
+
children: /* @__PURE__ */ n(an, {})
|
|
1584
1585
|
}
|
|
1585
1586
|
)
|
|
1586
1587
|
] })
|
|
@@ -1595,40 +1596,40 @@ const Ir = ({
|
|
|
1595
1596
|
// and 40px buttons crowded out the central "Start video call"
|
|
1596
1597
|
// affordance. The user can dismiss by scrolling past the slot.
|
|
1597
1598
|
!ne && /* @__PURE__ */ g("div", { className: "ll-expanded__header ll-expanded__header--idle", children: [
|
|
1598
|
-
/* @__PURE__ */ n("span", { className: "ll-expanded__brand", children:
|
|
1599
|
+
/* @__PURE__ */ n("span", { className: "ll-expanded__brand", children: it }),
|
|
1599
1600
|
/* @__PURE__ */ g("div", { className: "ll-expanded__header-actions", children: [
|
|
1600
|
-
|
|
1601
|
+
ye !== !1 && /* @__PURE__ */ n(
|
|
1601
1602
|
"button",
|
|
1602
1603
|
{
|
|
1603
1604
|
type: "button",
|
|
1604
1605
|
className: "ll-hbtn ll-hbtn--ghost",
|
|
1605
1606
|
onClick: P,
|
|
1606
1607
|
"aria-label": "Minimize widget",
|
|
1607
|
-
children: /* @__PURE__ */ n(
|
|
1608
|
+
children: /* @__PURE__ */ n(cn, {})
|
|
1608
1609
|
}
|
|
1609
1610
|
),
|
|
1610
|
-
/* @__PURE__ */ n(
|
|
1611
|
+
Ee !== !1 && /* @__PURE__ */ n(
|
|
1611
1612
|
"button",
|
|
1612
1613
|
{
|
|
1613
1614
|
type: "button",
|
|
1614
1615
|
className: "ll-hbtn ll-hbtn--danger",
|
|
1615
|
-
onClick:
|
|
1616
|
+
onClick: mt,
|
|
1616
1617
|
"aria-label": "Close widget",
|
|
1617
|
-
children: /* @__PURE__ */ n(
|
|
1618
|
+
children: /* @__PURE__ */ n(an, {})
|
|
1618
1619
|
}
|
|
1619
1620
|
)
|
|
1620
1621
|
] })
|
|
1621
1622
|
] })
|
|
1622
1623
|
),
|
|
1623
|
-
|
|
1624
|
+
Ze && /* @__PURE__ */ (() => {
|
|
1624
1625
|
const h = S ? "Resume session" : x === "disconnected" ? "Reconnect to agent" : "Start video call";
|
|
1625
|
-
return /* @__PURE__ */ g(
|
|
1626
|
+
return /* @__PURE__ */ g(Ye, { children: [
|
|
1626
1627
|
!D && /* @__PURE__ */ g(
|
|
1627
1628
|
"button",
|
|
1628
1629
|
{
|
|
1629
1630
|
type: "button",
|
|
1630
1631
|
className: "ll-expanded__play",
|
|
1631
|
-
onClick:
|
|
1632
|
+
onClick: Ke,
|
|
1632
1633
|
"aria-label": h,
|
|
1633
1634
|
children: [
|
|
1634
1635
|
/* @__PURE__ */ n("div", { className: "ll-expanded__play-circle", children: /* @__PURE__ */ n("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": !0, children: /* @__PURE__ */ n("polygon", { points: "6 3 20 12 6 21 6 3" }) }) }),
|
|
@@ -1643,7 +1644,7 @@ const Ir = ({
|
|
|
1643
1644
|
{
|
|
1644
1645
|
type: "button",
|
|
1645
1646
|
className: "ll-expanded__cta",
|
|
1646
|
-
onClick:
|
|
1647
|
+
onClick: Ke,
|
|
1647
1648
|
"aria-label": h,
|
|
1648
1649
|
children: h
|
|
1649
1650
|
}
|
|
@@ -1666,7 +1667,7 @@ const Ir = ({
|
|
|
1666
1667
|
/* @__PURE__ */ n(
|
|
1667
1668
|
"div",
|
|
1668
1669
|
{
|
|
1669
|
-
ref:
|
|
1670
|
+
ref: tt,
|
|
1670
1671
|
className: !H && F ? "ll-expanded__pip-host" : "ll-expanded__pip-host is-hidden"
|
|
1671
1672
|
}
|
|
1672
1673
|
)
|
|
@@ -1674,24 +1675,24 @@ const Ir = ({
|
|
|
1674
1675
|
}
|
|
1675
1676
|
),
|
|
1676
1677
|
Me ? /* @__PURE__ */ g("div", { className: "ll-expanded__bottom", children: [
|
|
1677
|
-
!ne &&
|
|
1678
|
+
!ne && We && /* @__PURE__ */ n(
|
|
1678
1679
|
"div",
|
|
1679
1680
|
{
|
|
1680
1681
|
className: "ll-expanded__transcript ll-expanded__transcript--agent",
|
|
1681
1682
|
"data-role": "agent",
|
|
1682
|
-
children: /* @__PURE__ */ n("p", { className: "ll-expanded__transcript-text", children:
|
|
1683
|
+
children: /* @__PURE__ */ n("p", { className: "ll-expanded__transcript-text", children: We })
|
|
1683
1684
|
}
|
|
1684
1685
|
),
|
|
1685
|
-
!ne &&
|
|
1686
|
+
!ne && yt && /* @__PURE__ */ n(
|
|
1686
1687
|
"div",
|
|
1687
1688
|
{
|
|
1688
1689
|
className: "ll-expanded__transcript ll-expanded__transcript--user",
|
|
1689
1690
|
"data-role": "user",
|
|
1690
|
-
children: /* @__PURE__ */ n("p", { className: "ll-expanded__transcript-text", children:
|
|
1691
|
+
children: /* @__PURE__ */ n("p", { className: "ll-expanded__transcript-text", children: yt })
|
|
1691
1692
|
}
|
|
1692
1693
|
),
|
|
1693
|
-
!
|
|
1694
|
-
|
|
1694
|
+
!Pe && !ne && /* @__PURE__ */ g("div", { className: "ll-toolbar", onClick: (h) => h.stopPropagation(), children: [
|
|
1695
|
+
ge && /* @__PURE__ */ n(
|
|
1695
1696
|
"button",
|
|
1696
1697
|
{
|
|
1697
1698
|
type: "button",
|
|
@@ -1699,10 +1700,10 @@ const Ir = ({
|
|
|
1699
1700
|
onClick: Ne,
|
|
1700
1701
|
"aria-label": H ? "Stop sharing screen" : "Share screen",
|
|
1701
1702
|
title: H ? "Stop sharing" : "Share screen",
|
|
1702
|
-
children: /* @__PURE__ */ n(
|
|
1703
|
+
children: /* @__PURE__ */ n(vn, {})
|
|
1703
1704
|
}
|
|
1704
1705
|
),
|
|
1705
|
-
|
|
1706
|
+
se && /* @__PURE__ */ g("div", { className: "ll-tool-split", children: [
|
|
1706
1707
|
/* @__PURE__ */ n(
|
|
1707
1708
|
"button",
|
|
1708
1709
|
{
|
|
@@ -1711,33 +1712,33 @@ const Ir = ({
|
|
|
1711
1712
|
onClick: Se,
|
|
1712
1713
|
"aria-label": F ? "Turn off camera" : "Turn on camera",
|
|
1713
1714
|
title: F ? "Stop camera" : "Start camera",
|
|
1714
|
-
children: /* @__PURE__ */ n(
|
|
1715
|
+
children: /* @__PURE__ */ n(bn, {})
|
|
1715
1716
|
}
|
|
1716
1717
|
),
|
|
1717
1718
|
/* @__PURE__ */ n(
|
|
1718
1719
|
"button",
|
|
1719
1720
|
{
|
|
1720
|
-
ref:
|
|
1721
|
+
ref: be,
|
|
1721
1722
|
type: "button",
|
|
1722
1723
|
className: `ll-tool ll-tool--right ${F ? "is-on" : ""}`,
|
|
1723
1724
|
onClick: (h) => {
|
|
1724
|
-
h.stopPropagation(), X((J) => !J),
|
|
1725
|
+
h.stopPropagation(), X((J) => !J), de(!1);
|
|
1725
1726
|
},
|
|
1726
1727
|
"aria-label": "Camera devices",
|
|
1727
1728
|
"aria-haspopup": "listbox",
|
|
1728
|
-
"aria-expanded":
|
|
1729
|
-
children: /* @__PURE__ */ n(
|
|
1729
|
+
"aria-expanded": ve,
|
|
1730
|
+
children: /* @__PURE__ */ n(bt, {})
|
|
1730
1731
|
}
|
|
1731
1732
|
),
|
|
1732
|
-
|
|
1733
|
-
|
|
1733
|
+
ve && O.length > 0 && /* @__PURE__ */ n(
|
|
1734
|
+
sn,
|
|
1734
1735
|
{
|
|
1735
1736
|
label: "Camera",
|
|
1736
1737
|
devices: O,
|
|
1737
1738
|
activeId: j,
|
|
1738
|
-
anchorRef:
|
|
1739
|
+
anchorRef: be,
|
|
1739
1740
|
onPick: (h) => {
|
|
1740
|
-
X(!1),
|
|
1741
|
+
X(!1), ze(h);
|
|
1741
1742
|
}
|
|
1742
1743
|
}
|
|
1743
1744
|
)
|
|
@@ -1751,33 +1752,33 @@ const Ir = ({
|
|
|
1751
1752
|
onClick: Ce,
|
|
1752
1753
|
"aria-label": k ? "Unmute microphone" : "Mute microphone",
|
|
1753
1754
|
title: k ? "Unmute" : "Mute",
|
|
1754
|
-
children: /* @__PURE__ */ n(
|
|
1755
|
+
children: /* @__PURE__ */ n(wn, { muted: k })
|
|
1755
1756
|
}
|
|
1756
1757
|
),
|
|
1757
1758
|
/* @__PURE__ */ n(
|
|
1758
1759
|
"button",
|
|
1759
1760
|
{
|
|
1760
|
-
ref:
|
|
1761
|
+
ref: ue,
|
|
1761
1762
|
type: "button",
|
|
1762
1763
|
className: `ll-tool ll-tool--right ${k ? "is-muted" : ""}`,
|
|
1763
1764
|
onClick: (h) => {
|
|
1764
|
-
h.stopPropagation(),
|
|
1765
|
+
h.stopPropagation(), de((J) => !J), X(!1);
|
|
1765
1766
|
},
|
|
1766
1767
|
"aria-label": "Microphone devices",
|
|
1767
1768
|
"aria-haspopup": "listbox",
|
|
1768
1769
|
"aria-expanded": ie,
|
|
1769
|
-
children: /* @__PURE__ */ n(
|
|
1770
|
+
children: /* @__PURE__ */ n(bt, {})
|
|
1770
1771
|
}
|
|
1771
1772
|
),
|
|
1772
1773
|
ie && B.length > 0 && /* @__PURE__ */ n(
|
|
1773
|
-
|
|
1774
|
+
sn,
|
|
1774
1775
|
{
|
|
1775
1776
|
label: "Microphone",
|
|
1776
1777
|
devices: B,
|
|
1777
1778
|
activeId: q,
|
|
1778
|
-
anchorRef:
|
|
1779
|
+
anchorRef: ue,
|
|
1779
1780
|
onPick: (h) => {
|
|
1780
|
-
|
|
1781
|
+
de(!1), $e(h);
|
|
1781
1782
|
}
|
|
1782
1783
|
}
|
|
1783
1784
|
)
|
|
@@ -1786,11 +1787,11 @@ const Ir = ({
|
|
|
1786
1787
|
"button",
|
|
1787
1788
|
{
|
|
1788
1789
|
type: "button",
|
|
1789
|
-
className: `ll-tool ${
|
|
1790
|
+
className: `ll-tool ${ce ? "is-muted" : ""}`,
|
|
1790
1791
|
onClick: Ae,
|
|
1791
|
-
"aria-label":
|
|
1792
|
-
title:
|
|
1793
|
-
children: /* @__PURE__ */ n(
|
|
1792
|
+
"aria-label": ce ? "Unmute speaker" : "Mute speaker",
|
|
1793
|
+
title: ce ? "Unmute speaker" : "Mute speaker",
|
|
1794
|
+
children: /* @__PURE__ */ n(_n, { muted: ce })
|
|
1794
1795
|
}
|
|
1795
1796
|
),
|
|
1796
1797
|
/* @__PURE__ */ n(
|
|
@@ -1798,51 +1799,51 @@ const Ir = ({
|
|
|
1798
1799
|
{
|
|
1799
1800
|
type: "button",
|
|
1800
1801
|
className: "ll-tool ll-tool--danger",
|
|
1801
|
-
onClick:
|
|
1802
|
+
onClick: Xe,
|
|
1802
1803
|
"aria-label": "End conversation",
|
|
1803
1804
|
title: "End conversation",
|
|
1804
|
-
children: /* @__PURE__ */ n(
|
|
1805
|
+
children: /* @__PURE__ */ n(xn, {})
|
|
1805
1806
|
}
|
|
1806
1807
|
)
|
|
1807
1808
|
] }),
|
|
1808
|
-
!
|
|
1809
|
-
|
|
1809
|
+
!Pe && ne && /* @__PURE__ */ n(
|
|
1810
|
+
Ar,
|
|
1810
1811
|
{
|
|
1811
1812
|
isMuted: k,
|
|
1812
1813
|
onToggleMute: Ce,
|
|
1813
1814
|
isCameraEnabled: F,
|
|
1814
1815
|
onToggleCamera: Se,
|
|
1815
|
-
allowCamera:
|
|
1816
|
+
allowCamera: se,
|
|
1816
1817
|
isScreenShareEnabled: H,
|
|
1817
1818
|
onToggleScreenShare: Ne,
|
|
1818
|
-
allowScreenShare:
|
|
1819
|
-
isSpeakerMuted:
|
|
1819
|
+
allowScreenShare: ge,
|
|
1820
|
+
isSpeakerMuted: ce,
|
|
1820
1821
|
onToggleSpeaker: Ae,
|
|
1821
1822
|
allowTyping: pe,
|
|
1822
|
-
isTypingOpen:
|
|
1823
|
-
onToggleTyping:
|
|
1824
|
-
onDisconnect:
|
|
1823
|
+
isTypingOpen: He,
|
|
1824
|
+
onToggleTyping: nt,
|
|
1825
|
+
onDisconnect: Xe
|
|
1825
1826
|
}
|
|
1826
1827
|
),
|
|
1827
|
-
!
|
|
1828
|
+
!Pe && pe && (ne ? He : !0) && /* @__PURE__ */ g("form", { className: "ll-message-input", onSubmit: ot, children: [
|
|
1828
1829
|
/* @__PURE__ */ n(
|
|
1829
1830
|
"input",
|
|
1830
1831
|
{
|
|
1831
1832
|
type: "text",
|
|
1832
1833
|
className: "ll-message-input__field",
|
|
1833
1834
|
placeholder: "Message...",
|
|
1834
|
-
value:
|
|
1835
|
-
onChange: (h) =>
|
|
1835
|
+
value: we,
|
|
1836
|
+
onChange: (h) => rt(h.target.value),
|
|
1836
1837
|
"aria-label": "Message the agent"
|
|
1837
1838
|
}
|
|
1838
1839
|
),
|
|
1839
|
-
|
|
1840
|
+
we.trim() && /* @__PURE__ */ n(
|
|
1840
1841
|
"button",
|
|
1841
1842
|
{
|
|
1842
1843
|
type: "submit",
|
|
1843
1844
|
className: "ll-message-input__send",
|
|
1844
1845
|
"aria-label": "Send message",
|
|
1845
|
-
children: /* @__PURE__ */ n(
|
|
1846
|
+
children: /* @__PURE__ */ n(Tr, {})
|
|
1846
1847
|
}
|
|
1847
1848
|
)
|
|
1848
1849
|
] })
|
|
@@ -1856,7 +1857,7 @@ const Ir = ({
|
|
|
1856
1857
|
{
|
|
1857
1858
|
type: "button",
|
|
1858
1859
|
className: "ll-expanded__banner-x",
|
|
1859
|
-
onClick:
|
|
1860
|
+
onClick: kt,
|
|
1860
1861
|
"aria-label": "Dismiss",
|
|
1861
1862
|
children: "×"
|
|
1862
1863
|
}
|
|
@@ -1871,7 +1872,7 @@ const Ir = ({
|
|
|
1871
1872
|
{
|
|
1872
1873
|
type: "button",
|
|
1873
1874
|
className: "ll-expanded__banner-retry",
|
|
1874
|
-
onClick:
|
|
1875
|
+
onClick: ht,
|
|
1875
1876
|
children: J
|
|
1876
1877
|
}
|
|
1877
1878
|
)
|
|
@@ -1881,32 +1882,32 @@ const Ir = ({
|
|
|
1881
1882
|
}
|
|
1882
1883
|
);
|
|
1883
1884
|
};
|
|
1884
|
-
function
|
|
1885
|
+
function bt() {
|
|
1885
1886
|
return /* @__PURE__ */ n("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": !0, children: /* @__PURE__ */ n("polyline", { points: "6 9 12 15 18 9" }) });
|
|
1886
1887
|
}
|
|
1887
|
-
function
|
|
1888
|
+
function an() {
|
|
1888
1889
|
return /* @__PURE__ */ g("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", "aria-hidden": !0, children: [
|
|
1889
1890
|
/* @__PURE__ */ n("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1890
1891
|
/* @__PURE__ */ n("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
1891
1892
|
] });
|
|
1892
1893
|
}
|
|
1893
|
-
function
|
|
1894
|
+
function cn() {
|
|
1894
1895
|
return /* @__PURE__ */ n("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", "aria-hidden": !0, children: /* @__PURE__ */ n("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) });
|
|
1895
1896
|
}
|
|
1896
|
-
function
|
|
1897
|
+
function vn() {
|
|
1897
1898
|
return /* @__PURE__ */ g("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
|
|
1898
1899
|
/* @__PURE__ */ n("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }),
|
|
1899
1900
|
/* @__PURE__ */ n("line", { x1: "8", y1: "21", x2: "16", y2: "21" }),
|
|
1900
1901
|
/* @__PURE__ */ n("line", { x1: "12", y1: "17", x2: "12", y2: "21" })
|
|
1901
1902
|
] });
|
|
1902
1903
|
}
|
|
1903
|
-
function
|
|
1904
|
+
function bn() {
|
|
1904
1905
|
return /* @__PURE__ */ g("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
|
|
1905
1906
|
/* @__PURE__ */ n("path", { d: "M23 7l-7 5 7 5V7z" }),
|
|
1906
1907
|
/* @__PURE__ */ n("rect", { x: "1", y: "5", width: "15", height: "14", rx: "2" })
|
|
1907
1908
|
] });
|
|
1908
1909
|
}
|
|
1909
|
-
function
|
|
1910
|
+
function wn({ muted: e }) {
|
|
1910
1911
|
return /* @__PURE__ */ g("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
|
|
1911
1912
|
/* @__PURE__ */ n("path", { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }),
|
|
1912
1913
|
/* @__PURE__ */ n("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
|
|
@@ -1914,22 +1915,22 @@ function bn({ muted: e }) {
|
|
|
1914
1915
|
e && /* @__PURE__ */ n("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
|
|
1915
1916
|
] });
|
|
1916
1917
|
}
|
|
1917
|
-
function
|
|
1918
|
+
function _n({ muted: e }) {
|
|
1918
1919
|
return /* @__PURE__ */ g("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
|
|
1919
1920
|
/* @__PURE__ */ n("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
|
|
1920
|
-
e ? /* @__PURE__ */ n("line", { x1: "23", y1: "9", x2: "17", y2: "15" }) : /* @__PURE__ */ g(
|
|
1921
|
+
e ? /* @__PURE__ */ n("line", { x1: "23", y1: "9", x2: "17", y2: "15" }) : /* @__PURE__ */ g(Ye, { children: [
|
|
1921
1922
|
/* @__PURE__ */ n("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14" }),
|
|
1922
1923
|
/* @__PURE__ */ n("path", { d: "M15.54 8.46a5 5 0 0 1 0 7.07" })
|
|
1923
1924
|
] })
|
|
1924
1925
|
] });
|
|
1925
1926
|
}
|
|
1926
|
-
function
|
|
1927
|
+
function Tr() {
|
|
1927
1928
|
return /* @__PURE__ */ g("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
|
|
1928
1929
|
/* @__PURE__ */ n("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
|
|
1929
1930
|
/* @__PURE__ */ n("polyline", { points: "12 5 19 12 12 19" })
|
|
1930
1931
|
] });
|
|
1931
1932
|
}
|
|
1932
|
-
function
|
|
1933
|
+
function xn() {
|
|
1933
1934
|
return /* @__PURE__ */ n("svg", { width: "16", height: "16", viewBox: "-4 -4 32 32", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: /* @__PURE__ */ n(
|
|
1934
1935
|
"path",
|
|
1935
1936
|
{
|
|
@@ -1938,7 +1939,7 @@ function _n() {
|
|
|
1938
1939
|
}
|
|
1939
1940
|
) });
|
|
1940
1941
|
}
|
|
1941
|
-
const
|
|
1942
|
+
const sn = ({
|
|
1942
1943
|
label: e,
|
|
1943
1944
|
devices: t,
|
|
1944
1945
|
activeId: r,
|
|
@@ -1946,7 +1947,7 @@ const cn = ({
|
|
|
1946
1947
|
anchorRef: i
|
|
1947
1948
|
}) => {
|
|
1948
1949
|
const [l, d] = C(null);
|
|
1949
|
-
return
|
|
1950
|
+
return mn(() => {
|
|
1950
1951
|
const a = () => {
|
|
1951
1952
|
const s = i.current;
|
|
1952
1953
|
if (!s) return;
|
|
@@ -1959,7 +1960,7 @@ const cn = ({
|
|
|
1959
1960
|
return a(), window.addEventListener("scroll", a, !0), window.addEventListener("resize", a), () => {
|
|
1960
1961
|
window.removeEventListener("scroll", a, !0), window.removeEventListener("resize", a);
|
|
1961
1962
|
};
|
|
1962
|
-
}, [i]), l === null || typeof document > "u" ? null :
|
|
1963
|
+
}, [i]), l === null || typeof document > "u" ? null : It(
|
|
1963
1964
|
/* @__PURE__ */ g(
|
|
1964
1965
|
"div",
|
|
1965
1966
|
{
|
|
@@ -1998,21 +1999,21 @@ const cn = ({
|
|
|
1998
1999
|
),
|
|
1999
2000
|
document.body
|
|
2000
2001
|
);
|
|
2001
|
-
},
|
|
2002
|
+
}, Dr = [
|
|
2002
2003
|
'[data-ll-private="true"]',
|
|
2003
2004
|
".ll-widget"
|
|
2004
2005
|
];
|
|
2005
|
-
function
|
|
2006
|
+
function Mt(e) {
|
|
2006
2007
|
let t = e;
|
|
2007
2008
|
for (; t; ) {
|
|
2008
|
-
for (const r of
|
|
2009
|
+
for (const r of Dr)
|
|
2009
2010
|
if (t.matches(r)) return !0;
|
|
2010
2011
|
t = t.parentElement;
|
|
2011
2012
|
}
|
|
2012
2013
|
return !1;
|
|
2013
2014
|
}
|
|
2014
|
-
function
|
|
2015
|
-
if (
|
|
2015
|
+
function xt(e) {
|
|
2016
|
+
if (Mt(e)) return !1;
|
|
2016
2017
|
if (e instanceof HTMLInputElement) {
|
|
2017
2018
|
if (e.type === "password") return !1;
|
|
2018
2019
|
const t = (e.getAttribute("autocomplete") || "").toLowerCase();
|
|
@@ -2020,7 +2021,7 @@ function _t(e) {
|
|
|
2020
2021
|
}
|
|
2021
2022
|
return !0;
|
|
2022
2023
|
}
|
|
2023
|
-
const
|
|
2024
|
+
const wt = 4096, Pr = 20, $r = 20, zr = 10, Or = 10, Hr = 30, Wr = 20, dn = 500, Br = [
|
|
2024
2025
|
'[data-ll-private="true"]',
|
|
2025
2026
|
".ll-widget",
|
|
2026
2027
|
"script",
|
|
@@ -2028,24 +2029,24 @@ const bt = 4096, Dr = 20, Pr = 20, $r = 10, zr = 10, Or = 30, Hr = 20, sn = 500,
|
|
|
2028
2029
|
"noscript",
|
|
2029
2030
|
"iframe"
|
|
2030
2031
|
];
|
|
2031
|
-
function
|
|
2032
|
+
function st(e) {
|
|
2032
2033
|
if (e.getAttribute("aria-hidden") === "true" || e.hasAttribute("hidden")) return !0;
|
|
2033
2034
|
let t = e;
|
|
2034
2035
|
for (; t; ) {
|
|
2035
|
-
for (const r of
|
|
2036
|
+
for (const r of Br)
|
|
2036
2037
|
if (t.matches(r)) return !0;
|
|
2037
2038
|
t = t.parentElement;
|
|
2038
2039
|
}
|
|
2039
2040
|
return !1;
|
|
2040
2041
|
}
|
|
2041
|
-
function
|
|
2042
|
+
function dt(e) {
|
|
2042
2043
|
if (typeof window > "u") return !0;
|
|
2043
2044
|
const t = e.getBoundingClientRect();
|
|
2044
2045
|
if (t.width <= 0 || t.height <= 0) return !1;
|
|
2045
2046
|
const r = window.innerHeight || document.documentElement.clientHeight, o = window.innerWidth || document.documentElement.clientWidth;
|
|
2046
2047
|
return t.bottom > 0 && t.right > 0 && t.top < r && t.left < o;
|
|
2047
2048
|
}
|
|
2048
|
-
function
|
|
2049
|
+
function un(e) {
|
|
2049
2050
|
const t = e.getAttribute("id");
|
|
2050
2051
|
if (t) {
|
|
2051
2052
|
const l = document.querySelector(`label[for="${CSS.escape(t)}"]`);
|
|
@@ -2058,13 +2059,13 @@ function dn(e) {
|
|
|
2058
2059
|
const i = e.closest("label");
|
|
2059
2060
|
return i != null && i.textContent ? i.textContent.trim() : "";
|
|
2060
2061
|
}
|
|
2061
|
-
function
|
|
2062
|
+
function me(e, t) {
|
|
2062
2063
|
return e.length <= t ? e : e.slice(0, t - 1) + "…";
|
|
2063
2064
|
}
|
|
2064
|
-
function
|
|
2065
|
+
function Ue(e) {
|
|
2065
2066
|
return e.length;
|
|
2066
2067
|
}
|
|
2067
|
-
function
|
|
2068
|
+
function qr(e, t = {}) {
|
|
2068
2069
|
const r = t.doc ?? (typeof document < "u" ? document : null);
|
|
2069
2070
|
if (!r)
|
|
2070
2071
|
return {
|
|
@@ -2082,11 +2083,11 @@ function Br(e, t = {}) {
|
|
|
2082
2083
|
r.querySelectorAll("[data-ll-region]")
|
|
2083
2084
|
), a = [];
|
|
2084
2085
|
for (const k of d) {
|
|
2085
|
-
if (a.length >=
|
|
2086
|
-
if (
|
|
2087
|
-
const R = k.getAttribute("data-ll-region") ?? "", B = k.getAttribute("data-ll-intent") ?? void 0, q =
|
|
2086
|
+
if (a.length >= zr) break;
|
|
2087
|
+
if (st(k) || !dt(k)) continue;
|
|
2088
|
+
const R = k.getAttribute("data-ll-region") ?? "", B = k.getAttribute("data-ll-intent") ?? void 0, q = me(
|
|
2088
2089
|
(k.innerText || k.textContent || "").trim(),
|
|
2089
|
-
|
|
2090
|
+
dn * 2
|
|
2090
2091
|
);
|
|
2091
2092
|
!R || !q || a.push({ id: R, intent: B, text: q });
|
|
2092
2093
|
}
|
|
@@ -2094,23 +2095,23 @@ function Br(e, t = {}) {
|
|
|
2094
2095
|
r.querySelectorAll("h1, h2, h3, h4, h5, h6")
|
|
2095
2096
|
);
|
|
2096
2097
|
for (const k of y) {
|
|
2097
|
-
if (
|
|
2098
|
+
if (st(k) || !dt(k)) continue;
|
|
2098
2099
|
const R = (k.textContent || "").trim();
|
|
2099
|
-
R && s.push(`${k.tagName}: ${
|
|
2100
|
+
R && s.push(`${k.tagName}: ${me(R, 200)}`);
|
|
2100
2101
|
}
|
|
2101
2102
|
const f = Array.from(r.querySelectorAll("p, li"));
|
|
2102
2103
|
for (const k of f) {
|
|
2103
|
-
if (
|
|
2104
|
+
if (st(k) || !dt(k) || u.includes(k.tagName)) continue;
|
|
2104
2105
|
const R = (k.textContent || "").trim();
|
|
2105
|
-
R.length > 10 && s.push(
|
|
2106
|
+
R.length > 10 && s.push(me(R, dn));
|
|
2106
2107
|
}
|
|
2107
2108
|
const c = s.join(`
|
|
2108
2109
|
`), A = [], _ = Array.from(r.querySelectorAll("a[href]"));
|
|
2109
2110
|
for (const k of _) {
|
|
2110
|
-
if (A.length >=
|
|
2111
|
-
if (
|
|
2111
|
+
if (A.length >= Pr) break;
|
|
2112
|
+
if (st(k) || !dt(k)) continue;
|
|
2112
2113
|
const R = k.getAttribute("href") || "", B = (k.textContent || "").trim();
|
|
2113
|
-
!R || !B || A.push({ href: R, text:
|
|
2114
|
+
!R || !B || A.push({ href: R, text: me(B, 100) });
|
|
2114
2115
|
}
|
|
2115
2116
|
const x = [], b = Array.from(
|
|
2116
2117
|
r.querySelectorAll(
|
|
@@ -2118,17 +2119,17 @@ function Br(e, t = {}) {
|
|
|
2118
2119
|
)
|
|
2119
2120
|
);
|
|
2120
2121
|
for (const k of b) {
|
|
2121
|
-
if (x.length >=
|
|
2122
|
-
if (
|
|
2123
|
-
const R =
|
|
2124
|
-
R && x.push({ label:
|
|
2122
|
+
if (x.length >= $r) break;
|
|
2123
|
+
if (st(k) || !xt(k) || !dt(k)) continue;
|
|
2124
|
+
const R = un(k), B = k instanceof HTMLInputElement ? k.type : k.tagName.toLowerCase();
|
|
2125
|
+
R && x.push({ label: me(R, 100), type: B });
|
|
2125
2126
|
}
|
|
2126
2127
|
const v = Array.from(
|
|
2127
2128
|
r.querySelectorAll("[data-ll-form]")
|
|
2128
2129
|
), S = [];
|
|
2129
2130
|
for (const k of v) {
|
|
2130
|
-
if (S.length >=
|
|
2131
|
-
if (
|
|
2131
|
+
if (S.length >= Or) break;
|
|
2132
|
+
if (Mt(k)) continue;
|
|
2132
2133
|
const R = k.getAttribute("data-ll-form") || "";
|
|
2133
2134
|
if (!R) continue;
|
|
2134
2135
|
const B = k.getAttribute("data-ll-intent") || void 0, q = Array.from(
|
|
@@ -2137,27 +2138,27 @@ function Br(e, t = {}) {
|
|
|
2137
2138
|
)
|
|
2138
2139
|
), F = [];
|
|
2139
2140
|
for (const U of q) {
|
|
2140
|
-
if (F.length >=
|
|
2141
|
-
if (!
|
|
2141
|
+
if (F.length >= Hr) break;
|
|
2142
|
+
if (!xt(U)) continue;
|
|
2142
2143
|
const O = U.getAttribute("data-ll-field") || "";
|
|
2143
2144
|
if (!O) continue;
|
|
2144
|
-
const j =
|
|
2145
|
+
const j = un(U) || O, H = U instanceof HTMLInputElement ? U.type : U.tagName.toLowerCase(), G = {
|
|
2145
2146
|
name: O,
|
|
2146
|
-
label:
|
|
2147
|
+
label: me(j, 100),
|
|
2147
2148
|
type: H
|
|
2148
2149
|
};
|
|
2149
2150
|
if (U.required === !0 && (G.required = !0), U instanceof HTMLSelectElement) {
|
|
2150
|
-
const
|
|
2151
|
-
for (let
|
|
2152
|
-
const pe = U.options[
|
|
2151
|
+
const se = [];
|
|
2152
|
+
for (let ge = 0; ge < U.options.length && !(se.length >= Wr); ge++) {
|
|
2153
|
+
const pe = U.options[ge];
|
|
2153
2154
|
if (!pe || pe.disabled) continue;
|
|
2154
|
-
const
|
|
2155
|
-
!
|
|
2155
|
+
const ye = pe.value || "", Ee = (pe.textContent || "").trim() || ye;
|
|
2156
|
+
!ye && !Ee || se.push({ value: ye, label: me(Ee, 60) });
|
|
2156
2157
|
}
|
|
2157
|
-
|
|
2158
|
+
se.length > 0 && (G.options = se);
|
|
2158
2159
|
}
|
|
2159
|
-
const
|
|
2160
|
-
|
|
2160
|
+
const ce = typeof U.validationMessage == "string" ? U.validationMessage : "";
|
|
2161
|
+
ce && (G.validationMessage = me(ce, 200)), F.push(G);
|
|
2161
2162
|
}
|
|
2162
2163
|
S.push({ id: R, intent: B, fields: F });
|
|
2163
2164
|
}
|
|
@@ -2172,26 +2173,26 @@ function Br(e, t = {}) {
|
|
|
2172
2173
|
forms: S,
|
|
2173
2174
|
extras: e
|
|
2174
2175
|
};
|
|
2175
|
-
let D =
|
|
2176
|
-
for (; D >
|
|
2177
|
-
M.visibleFields.pop(), D =
|
|
2178
|
-
for (; D >
|
|
2176
|
+
let D = Ue(JSON.stringify(M.regions)) + Ue(M.visibleText) + Ue(JSON.stringify(M.visibleLinks)) + Ue(JSON.stringify(M.visibleFields));
|
|
2177
|
+
for (; D > wt && M.visibleFields.length > 0; )
|
|
2178
|
+
M.visibleFields.pop(), D = Ue(JSON.stringify(M.visibleFields));
|
|
2179
|
+
for (; D > wt && M.visibleLinks.length > 0; )
|
|
2179
2180
|
M.visibleLinks.pop(), D -= 80;
|
|
2180
|
-
return
|
|
2181
|
+
return Ue(M.visibleText) > wt && (M.visibleText = me(M.visibleText, wt - 100)), M;
|
|
2181
2182
|
}
|
|
2182
|
-
let
|
|
2183
|
-
function
|
|
2183
|
+
let je = null;
|
|
2184
|
+
function fn(e, t = {}) {
|
|
2184
2185
|
const r = Date.now(), i = `${typeof window < "u" && window.location.pathname || "/"}::${typeof window < "u" ? window.scrollY : 0}`;
|
|
2185
|
-
if (
|
|
2186
|
-
return
|
|
2187
|
-
const l =
|
|
2188
|
-
return
|
|
2186
|
+
if (je && je.key === i && r - je.at < 1e3)
|
|
2187
|
+
return je.ctx;
|
|
2188
|
+
const l = qr(e, t);
|
|
2189
|
+
return je = { key: i, at: r, ctx: l }, l;
|
|
2189
2190
|
}
|
|
2190
|
-
function
|
|
2191
|
-
|
|
2191
|
+
function Fr() {
|
|
2192
|
+
je = null;
|
|
2192
2193
|
}
|
|
2193
|
-
const
|
|
2194
|
-
function
|
|
2194
|
+
const Ur = 200;
|
|
2195
|
+
function jr(e) {
|
|
2195
2196
|
const t = String(e.href || "");
|
|
2196
2197
|
return {
|
|
2197
2198
|
href: t,
|
|
@@ -2201,18 +2202,18 @@ function Ur(e) {
|
|
|
2201
2202
|
description: e.description
|
|
2202
2203
|
};
|
|
2203
2204
|
}
|
|
2204
|
-
function
|
|
2205
|
+
function Vr(e) {
|
|
2205
2206
|
return !(!e || e.startsWith("#") || e.startsWith("javascript:") || e.startsWith("mailto:") || e.startsWith("tel:"));
|
|
2206
2207
|
}
|
|
2207
|
-
function
|
|
2208
|
+
function Yr(e) {
|
|
2208
2209
|
const t = e ?? (typeof document < "u" ? document : null);
|
|
2209
2210
|
if (!t) return [];
|
|
2210
2211
|
const r = typeof window < "u" && window.location.origin || "", o = /* @__PURE__ */ new Set(), i = [], l = Array.from(t.querySelectorAll("a[href]"));
|
|
2211
2212
|
for (const d of l) {
|
|
2212
|
-
if (i.length >=
|
|
2213
|
-
if (
|
|
2213
|
+
if (i.length >= Ur) break;
|
|
2214
|
+
if (Mt(d)) continue;
|
|
2214
2215
|
const a = d.getAttribute("href") || "";
|
|
2215
|
-
if (!
|
|
2216
|
+
if (!Vr(a)) continue;
|
|
2216
2217
|
let s = a, u = !0;
|
|
2217
2218
|
try {
|
|
2218
2219
|
if (typeof window < "u") {
|
|
@@ -2229,23 +2230,23 @@ function Vr(e) {
|
|
|
2229
2230
|
}
|
|
2230
2231
|
return i;
|
|
2231
2232
|
}
|
|
2232
|
-
let
|
|
2233
|
-
const
|
|
2234
|
-
function
|
|
2233
|
+
let Ve = null;
|
|
2234
|
+
const Gr = 5e3;
|
|
2235
|
+
function At() {
|
|
2235
2236
|
const e = Date.now(), t = typeof window < "u" && window.location.pathname || "/";
|
|
2236
|
-
if (
|
|
2237
|
-
return
|
|
2238
|
-
const r =
|
|
2239
|
-
return
|
|
2237
|
+
if (Ve && Ve.pathname === t && e - Ve.at < Gr)
|
|
2238
|
+
return Ve.routes;
|
|
2239
|
+
const r = Yr();
|
|
2240
|
+
return Ve = { at: e, pathname: t, routes: r }, r;
|
|
2240
2241
|
}
|
|
2241
|
-
function
|
|
2242
|
-
|
|
2242
|
+
function Jr() {
|
|
2243
|
+
Ve = null;
|
|
2243
2244
|
}
|
|
2244
|
-
function
|
|
2245
|
+
function Kr(e, t) {
|
|
2245
2246
|
const r = e instanceof HTMLInputElement ? HTMLInputElement.prototype : e instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLSelectElement.prototype, o = Object.getOwnPropertyDescriptor(r, "value"), i = o == null ? void 0 : o.set;
|
|
2246
2247
|
i ? i.call(e, t) : e.value = t;
|
|
2247
2248
|
}
|
|
2248
|
-
function
|
|
2249
|
+
function Xr(e, t, r = {}) {
|
|
2249
2250
|
const o = r.triggerInput ?? !0, i = r.triggerChange ?? !0;
|
|
2250
2251
|
if (e instanceof HTMLInputElement && (e.type === "checkbox" || e.type === "radio")) {
|
|
2251
2252
|
const l = Object.getOwnPropertyDescriptor(
|
|
@@ -2255,9 +2256,9 @@ function Kr(e, t, r = {}) {
|
|
|
2255
2256
|
d ? d.call(e, a) : e.checked = a, o && e.dispatchEvent(new Event("input", { bubbles: !0 })), i && e.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
2256
2257
|
return;
|
|
2257
2258
|
}
|
|
2258
|
-
|
|
2259
|
+
Kr(e, t), o && e.dispatchEvent(new Event("input", { bubbles: !0 })), i && e.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
2259
2260
|
}
|
|
2260
|
-
function
|
|
2261
|
+
function Qr() {
|
|
2261
2262
|
if (typeof window > "u" || typeof document > "u")
|
|
2262
2263
|
return !1;
|
|
2263
2264
|
const e = document.scrollingElement || document.documentElement;
|
|
@@ -2265,19 +2266,19 @@ function Xr() {
|
|
|
2265
2266
|
const t = window.getComputedStyle(e);
|
|
2266
2267
|
return !(t.overflowY === "hidden" || t.overflowY === "clip");
|
|
2267
2268
|
}
|
|
2268
|
-
function
|
|
2269
|
+
function Zr(e) {
|
|
2269
2270
|
if (!(e instanceof HTMLElement)) return !1;
|
|
2270
2271
|
const r = window.getComputedStyle(e).overflowY;
|
|
2271
2272
|
return !(r !== "auto" && r !== "scroll" || e.scrollHeight <= e.clientHeight + 2);
|
|
2272
2273
|
}
|
|
2273
|
-
function
|
|
2274
|
+
function eo() {
|
|
2274
2275
|
if (typeof document > "u") return null;
|
|
2275
2276
|
const e = Array.from(
|
|
2276
2277
|
document.querySelectorAll("body, body *")
|
|
2277
2278
|
);
|
|
2278
2279
|
let t = null, r = 0;
|
|
2279
2280
|
for (const o of e) {
|
|
2280
|
-
if (!
|
|
2281
|
+
if (!Zr(o)) continue;
|
|
2281
2282
|
const i = o.getBoundingClientRect();
|
|
2282
2283
|
if (i.bottom <= 0 || i.top >= window.innerHeight || i.right <= 0 || i.left >= window.innerWidth || i.width <= 0 || i.height <= 0 || o.closest(".ll-widget")) continue;
|
|
2283
2284
|
const l = i.width * i.height;
|
|
@@ -2285,24 +2286,24 @@ function Zr() {
|
|
|
2285
2286
|
}
|
|
2286
2287
|
return t;
|
|
2287
2288
|
}
|
|
2288
|
-
function
|
|
2289
|
+
function to() {
|
|
2289
2290
|
if (typeof window > "u")
|
|
2290
2291
|
return null;
|
|
2291
|
-
if (
|
|
2292
|
-
const e =
|
|
2292
|
+
if (Qr()) return window;
|
|
2293
|
+
const e = eo();
|
|
2293
2294
|
return e || window;
|
|
2294
2295
|
}
|
|
2295
|
-
function
|
|
2296
|
+
function pn(e) {
|
|
2296
2297
|
return e instanceof Window ? e.innerHeight || 0 : e.clientHeight || 0;
|
|
2297
2298
|
}
|
|
2298
|
-
function
|
|
2299
|
+
function no(e) {
|
|
2299
2300
|
var t, r;
|
|
2300
2301
|
return e instanceof Window ? typeof document > "u" ? 0 : Math.max(
|
|
2301
2302
|
((t = document.body) == null ? void 0 : t.scrollHeight) ?? 0,
|
|
2302
2303
|
((r = document.documentElement) == null ? void 0 : r.scrollHeight) ?? 0
|
|
2303
2304
|
) : e.scrollHeight - e.clientHeight;
|
|
2304
2305
|
}
|
|
2305
|
-
const
|
|
2306
|
+
const ro = /* @__PURE__ */ new Set([
|
|
2306
2307
|
"agent_state",
|
|
2307
2308
|
"avatar_stream_ready",
|
|
2308
2309
|
"avatar_active",
|
|
@@ -2324,9 +2325,9 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2324
2325
|
"focus_field",
|
|
2325
2326
|
"submit_form",
|
|
2326
2327
|
"request_routes"
|
|
2327
|
-
]),
|
|
2328
|
+
]), kn = ut(
|
|
2328
2329
|
function(t, r) {
|
|
2329
|
-
var
|
|
2330
|
+
var Ft, Ut, jt, Vt, Yt, Gt, Jt;
|
|
2330
2331
|
const {
|
|
2331
2332
|
agentId: o,
|
|
2332
2333
|
apiKey: i,
|
|
@@ -2355,70 +2356,71 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2355
2356
|
allowScreenShare: O = !0,
|
|
2356
2357
|
allowTyping: j = !0,
|
|
2357
2358
|
showMinimize: H = !0,
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2359
|
+
showClose: G = !0,
|
|
2360
|
+
chromeless: ce = !1,
|
|
2361
|
+
floatingChromeContainer: se = null,
|
|
2362
|
+
compactControls: ge = !1,
|
|
2363
|
+
transforming: pe = !1,
|
|
2364
|
+
transformingLabel: ye = "Transforming…",
|
|
2365
|
+
showOn: Ee,
|
|
2366
|
+
hideOn: Pe,
|
|
2365
2367
|
pathname: ne,
|
|
2366
|
-
onNavigate:
|
|
2367
|
-
onScrollToSelector:
|
|
2368
|
-
getPageContext:
|
|
2369
|
-
pageContextExtras:
|
|
2370
|
-
getRoutes:
|
|
2371
|
-
onScrollPage:
|
|
2372
|
-
onClick:
|
|
2373
|
-
capabilities:
|
|
2368
|
+
onNavigate: ft,
|
|
2369
|
+
onScrollToSelector: Je,
|
|
2370
|
+
getPageContext: pt,
|
|
2371
|
+
pageContextExtras: le,
|
|
2372
|
+
getRoutes: Ke,
|
|
2373
|
+
onScrollPage: Xe,
|
|
2374
|
+
onClick: ht,
|
|
2375
|
+
capabilities: Qe,
|
|
2374
2376
|
onConnect: Ce,
|
|
2375
|
-
onDisconnect:
|
|
2377
|
+
onDisconnect: $e,
|
|
2376
2378
|
onTranscript: Se,
|
|
2377
|
-
onAgentState:
|
|
2379
|
+
onAgentState: ze,
|
|
2378
2380
|
onConnectionStateChange: Ne,
|
|
2379
2381
|
onAgentEvent: Ae,
|
|
2380
2382
|
onAgentCommand: Re,
|
|
2381
2383
|
controlledSession: P,
|
|
2382
|
-
className:
|
|
2383
|
-
style:
|
|
2384
|
+
className: mt,
|
|
2385
|
+
style: kt,
|
|
2384
2386
|
zIndex: Ie = 2147483647
|
|
2385
|
-
} = t, Me =
|
|
2387
|
+
} = t, Me = cr(ne), re = mr(Me, Ee, Pe);
|
|
2386
2388
|
I(() => {
|
|
2387
|
-
|
|
2389
|
+
Fr(), Jr();
|
|
2388
2390
|
}, [Me]);
|
|
2389
|
-
const
|
|
2391
|
+
const Ze = M !== void 0, [et, Oe] = C(() => {
|
|
2390
2392
|
var m;
|
|
2391
2393
|
return M ?? ((m = S == null ? void 0 : S[0]) == null ? void 0 : m.id);
|
|
2392
|
-
}), Te =
|
|
2394
|
+
}), Te = Ze ? M : et, ee = Ge(
|
|
2393
2395
|
() => (S == null ? void 0 : S.find((m) => m.id === Te)) ?? null,
|
|
2394
2396
|
[S, Te]
|
|
2395
|
-
),
|
|
2397
|
+
), gt = (ee == null ? void 0 : ee.agentId) ?? o, tt = u === "EMBEDDED", [oe, ie] = or({
|
|
2396
2398
|
value: f,
|
|
2397
2399
|
defaultValue: c,
|
|
2398
2400
|
onChange: A,
|
|
2399
2401
|
persistKey: b,
|
|
2400
|
-
disablePersistence:
|
|
2401
|
-
}),
|
|
2402
|
-
De.current =
|
|
2403
|
-
const h = N(
|
|
2404
|
-
h.current =
|
|
2405
|
-
function
|
|
2406
|
-
const p =
|
|
2402
|
+
disablePersistence: tt || v
|
|
2403
|
+
}), de = lr(x), ve = Vn(), X = Yn(), ue = Jn(), be = Kn(), He = Xn(), [Lt, nt] = C(!1), [we, rt] = C(!1), [ot, it] = C(!1), [_e, xe] = C(!1), [We, yt] = C(!1), Be = yr({ baseUrl: l, config: s }), De = N(Be);
|
|
2404
|
+
De.current = Be;
|
|
2405
|
+
const h = N(ft), J = N(Je), Et = N(Xe), Ct = N(ht), Tt = N(pt), Dt = N(le), Pt = N(Ke), St = N(Qe), fe = N(null);
|
|
2406
|
+
h.current = ft, J.current = Je, Et.current = Xe, Ct.current = ht, Tt.current = pt, Dt.current = le, Pt.current = Ke, St.current = Qe;
|
|
2407
|
+
function ke(m) {
|
|
2408
|
+
const p = St.current;
|
|
2407
2409
|
return p ? p.includes(m) : !0;
|
|
2408
2410
|
}
|
|
2409
|
-
function
|
|
2411
|
+
function Le(m, p) {
|
|
2410
2412
|
console.warn(
|
|
2411
2413
|
`[LiveLayer] Agent command "${m}" blocked — capability "${p}" not in allowlist. See https://livelayer.studio/docs/react/capabilities`
|
|
2412
2414
|
);
|
|
2413
2415
|
}
|
|
2414
|
-
const
|
|
2416
|
+
const lt = E(
|
|
2415
2417
|
(m) => {
|
|
2416
|
-
var K,
|
|
2418
|
+
var K, ae, he, ct;
|
|
2417
2419
|
const p = m;
|
|
2418
2420
|
if (!(!p.type || typeof p.type != "string")) {
|
|
2419
2421
|
if (Ae == null || Ae({ eventName: p.type, data: m }), p.type === "navigate") {
|
|
2420
|
-
if (!
|
|
2421
|
-
|
|
2422
|
+
if (!ke("navigate")) {
|
|
2423
|
+
Le("navigate", "navigate");
|
|
2422
2424
|
return;
|
|
2423
2425
|
}
|
|
2424
2426
|
const L = typeof p.href == "string" ? p.href : null;
|
|
@@ -2460,8 +2462,8 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2460
2462
|
return;
|
|
2461
2463
|
}
|
|
2462
2464
|
if (p.type === "scroll_to") {
|
|
2463
|
-
if (!
|
|
2464
|
-
|
|
2465
|
+
if (!ke("scroll")) {
|
|
2466
|
+
Le("scroll_to", "scroll");
|
|
2465
2467
|
return;
|
|
2466
2468
|
}
|
|
2467
2469
|
const L = typeof p.selector == "string" ? p.selector : null;
|
|
@@ -2502,20 +2504,20 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2502
2504
|
return;
|
|
2503
2505
|
}
|
|
2504
2506
|
if (p.type === "request_page_context") {
|
|
2505
|
-
if (!
|
|
2506
|
-
|
|
2507
|
+
if (!ke("read_page")) {
|
|
2508
|
+
Le("request_page_context", "read_page");
|
|
2507
2509
|
return;
|
|
2508
2510
|
}
|
|
2509
|
-
const L = typeof p.requestId == "string" ? p.requestId : void 0, T = (K =
|
|
2511
|
+
const L = typeof p.requestId == "string" ? p.requestId : void 0, T = (K = fe.current) == null ? void 0 : K.call(fe), W = (Y) => {
|
|
2510
2512
|
const $ = T, Z = $ == null ? void 0 : $.localParticipant;
|
|
2511
2513
|
if (Z != null && Z.publishData)
|
|
2512
2514
|
try {
|
|
2513
|
-
const te = L ? { ...Y, requestId: L } : Y,
|
|
2514
|
-
Z.publishData(
|
|
2515
|
+
const te = L ? { ...Y, requestId: L } : Y, Fe = new TextEncoder().encode(JSON.stringify(te));
|
|
2516
|
+
Z.publishData(Fe, { reliable: !0 });
|
|
2515
2517
|
} catch (te) {
|
|
2516
2518
|
console.warn("[LiveLayer] publishData failed.", te);
|
|
2517
2519
|
}
|
|
2518
|
-
}, z =
|
|
2520
|
+
}, z = Dt.current, V = Tt.current;
|
|
2519
2521
|
try {
|
|
2520
2522
|
if (V) {
|
|
2521
2523
|
const Y = V(z);
|
|
@@ -2526,7 +2528,7 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2526
2528
|
$
|
|
2527
2529
|
), W({
|
|
2528
2530
|
type: "page_context",
|
|
2529
|
-
context:
|
|
2531
|
+
context: fn(z)
|
|
2530
2532
|
});
|
|
2531
2533
|
});
|
|
2532
2534
|
return;
|
|
@@ -2536,7 +2538,7 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2536
2538
|
}
|
|
2537
2539
|
W({
|
|
2538
2540
|
type: "page_context",
|
|
2539
|
-
context:
|
|
2541
|
+
context: fn(z)
|
|
2540
2542
|
});
|
|
2541
2543
|
} catch (Y) {
|
|
2542
2544
|
console.warn(
|
|
@@ -2550,8 +2552,8 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2550
2552
|
return;
|
|
2551
2553
|
}
|
|
2552
2554
|
if (p.type === "scroll_page") {
|
|
2553
|
-
if (!
|
|
2554
|
-
|
|
2555
|
+
if (!ke("scroll")) {
|
|
2556
|
+
Le("scroll_page", "scroll");
|
|
2555
2557
|
return;
|
|
2556
2558
|
}
|
|
2557
2559
|
const L = p.direction;
|
|
@@ -2562,9 +2564,9 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2562
2564
|
return;
|
|
2563
2565
|
}
|
|
2564
2566
|
const T = p.behavior === "instant" ? "instant" : "smooth";
|
|
2565
|
-
if (
|
|
2567
|
+
if (Et.current) {
|
|
2566
2568
|
try {
|
|
2567
|
-
|
|
2569
|
+
Et.current(
|
|
2568
2570
|
L,
|
|
2569
2571
|
T
|
|
2570
2572
|
);
|
|
@@ -2574,17 +2576,17 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2574
2576
|
return;
|
|
2575
2577
|
}
|
|
2576
2578
|
if (typeof window > "u") return;
|
|
2577
|
-
const W = { behavior: T }, z =
|
|
2579
|
+
const W = { behavior: T }, z = to(), V = ($) => {
|
|
2578
2580
|
z instanceof Window ? z.scrollBy({ top: $, ...W }) : z.scrollBy({ top: $, ...W });
|
|
2579
2581
|
}, Y = ($) => {
|
|
2580
2582
|
z instanceof Window ? z.scrollTo({ top: $, ...W }) : z.scrollTo({ top: $, ...W });
|
|
2581
2583
|
};
|
|
2582
|
-
L === "up" ? V(-
|
|
2584
|
+
L === "up" ? V(-pn(z)) : L === "down" ? V(pn(z)) : Y(L === "top" ? 0 : no(z));
|
|
2583
2585
|
return;
|
|
2584
2586
|
}
|
|
2585
2587
|
if (p.type === "click") {
|
|
2586
|
-
if (!
|
|
2587
|
-
|
|
2588
|
+
if (!ke("click")) {
|
|
2589
|
+
Le("click", "click");
|
|
2588
2590
|
return;
|
|
2589
2591
|
}
|
|
2590
2592
|
const L = typeof p.selector == "string" ? p.selector : null;
|
|
@@ -2592,9 +2594,9 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2592
2594
|
console.warn("[LiveLayer] click: missing selector.");
|
|
2593
2595
|
return;
|
|
2594
2596
|
}
|
|
2595
|
-
if (
|
|
2597
|
+
if (Ct.current) {
|
|
2596
2598
|
try {
|
|
2597
|
-
|
|
2599
|
+
Ct.current(L);
|
|
2598
2600
|
} catch (W) {
|
|
2599
2601
|
console.warn("[LiveLayer] onClick threw.", W);
|
|
2600
2602
|
}
|
|
@@ -2622,12 +2624,12 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2622
2624
|
);
|
|
2623
2625
|
return;
|
|
2624
2626
|
}
|
|
2625
|
-
(
|
|
2627
|
+
(ae = T.click) == null || ae.call(T);
|
|
2626
2628
|
return;
|
|
2627
2629
|
}
|
|
2628
2630
|
if (p.type === "fill_form" || p.type === "focus_field") {
|
|
2629
|
-
if (!
|
|
2630
|
-
|
|
2631
|
+
if (!ke("fill_forms")) {
|
|
2632
|
+
Le(p.type, "fill_forms");
|
|
2631
2633
|
return;
|
|
2632
2634
|
}
|
|
2633
2635
|
if (typeof document > "u") return;
|
|
@@ -2665,7 +2667,7 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2665
2667
|
);
|
|
2666
2668
|
return;
|
|
2667
2669
|
}
|
|
2668
|
-
if (!
|
|
2670
|
+
if (!xt(V)) {
|
|
2669
2671
|
console.warn(
|
|
2670
2672
|
`[LiveLayer] focus_field: field "${z}" is privacy-protected and not focusable.`
|
|
2671
2673
|
);
|
|
@@ -2688,14 +2690,14 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2688
2690
|
);
|
|
2689
2691
|
continue;
|
|
2690
2692
|
}
|
|
2691
|
-
if (!
|
|
2693
|
+
if (!xt(Y)) {
|
|
2692
2694
|
console.warn(
|
|
2693
2695
|
`[LiveLayer] fill_form: field "${z}" is privacy-protected (password / cc-* / private). Skipping.`
|
|
2694
2696
|
);
|
|
2695
2697
|
continue;
|
|
2696
2698
|
}
|
|
2697
2699
|
try {
|
|
2698
|
-
|
|
2700
|
+
Xr(Y, V);
|
|
2699
2701
|
} catch ($) {
|
|
2700
2702
|
console.warn(
|
|
2701
2703
|
`[LiveLayer] fill_form: failed to set "${z}".`,
|
|
@@ -2706,8 +2708,8 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2706
2708
|
return;
|
|
2707
2709
|
}
|
|
2708
2710
|
if (p.type === "submit_form") {
|
|
2709
|
-
if (!
|
|
2710
|
-
|
|
2711
|
+
if (!ke("submit_forms")) {
|
|
2712
|
+
Le("submit_form", "submit_forms");
|
|
2711
2713
|
return;
|
|
2712
2714
|
}
|
|
2713
2715
|
if (typeof document > "u") return;
|
|
@@ -2732,12 +2734,12 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2732
2734
|
);
|
|
2733
2735
|
return;
|
|
2734
2736
|
}
|
|
2735
|
-
const W = typeof p.requestId == "string" ? p.requestId : void 0, z = (
|
|
2736
|
-
const te = z,
|
|
2737
|
-
if (
|
|
2737
|
+
const W = typeof p.requestId == "string" ? p.requestId : void 0, z = (he = fe.current) == null ? void 0 : he.call(fe), V = (Z) => {
|
|
2738
|
+
const te = z, Fe = te == null ? void 0 : te.localParticipant;
|
|
2739
|
+
if (Fe != null && Fe.publishData)
|
|
2738
2740
|
try {
|
|
2739
|
-
const
|
|
2740
|
-
|
|
2741
|
+
const $n = W ? { ...Z, requestId: W } : Z, zn = new TextEncoder().encode(JSON.stringify($n));
|
|
2742
|
+
Fe.publishData(zn, { reliable: !0 });
|
|
2741
2743
|
} catch {
|
|
2742
2744
|
}
|
|
2743
2745
|
};
|
|
@@ -2766,11 +2768,11 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2766
2768
|
return;
|
|
2767
2769
|
}
|
|
2768
2770
|
if (p.type === "request_routes") {
|
|
2769
|
-
if (!
|
|
2770
|
-
|
|
2771
|
+
if (!ke("read_page")) {
|
|
2772
|
+
Le("request_routes", "read_page");
|
|
2771
2773
|
return;
|
|
2772
2774
|
}
|
|
2773
|
-
const L = typeof p.requestId == "string" ? p.requestId : void 0, W = (
|
|
2775
|
+
const L = typeof p.requestId == "string" ? p.requestId : void 0, W = (ct = fe.current) == null ? void 0 : ct.call(fe), z = W == null ? void 0 : W.localParticipant;
|
|
2774
2776
|
if (!(z != null && z.publishData)) return;
|
|
2775
2777
|
const V = ($) => {
|
|
2776
2778
|
try {
|
|
@@ -2779,7 +2781,7 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2779
2781
|
} catch (Z) {
|
|
2780
2782
|
console.warn("[LiveLayer] request_routes: publishData failed.", Z);
|
|
2781
2783
|
}
|
|
2782
|
-
}, Y =
|
|
2784
|
+
}, Y = Pt.current;
|
|
2783
2785
|
if (Y) {
|
|
2784
2786
|
try {
|
|
2785
2787
|
const $ = Y(), Z = (te) => {
|
|
@@ -2787,45 +2789,45 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2787
2789
|
V([]);
|
|
2788
2790
|
return;
|
|
2789
2791
|
}
|
|
2790
|
-
V(te.map(
|
|
2792
|
+
V(te.map(jr).slice(0, 200));
|
|
2791
2793
|
};
|
|
2792
2794
|
$ instanceof Promise ? $.then(Z).catch((te) => {
|
|
2793
2795
|
console.warn(
|
|
2794
2796
|
"[LiveLayer] getRoutes rejected; falling back to DOM walker.",
|
|
2795
2797
|
te
|
|
2796
|
-
), V(
|
|
2798
|
+
), V(At());
|
|
2797
2799
|
}) : Z($);
|
|
2798
2800
|
} catch ($) {
|
|
2799
2801
|
console.warn(
|
|
2800
2802
|
"[LiveLayer] getRoutes threw; falling back to DOM walker.",
|
|
2801
2803
|
$
|
|
2802
|
-
), V(
|
|
2804
|
+
), V(At());
|
|
2803
2805
|
}
|
|
2804
2806
|
return;
|
|
2805
2807
|
}
|
|
2806
2808
|
try {
|
|
2807
|
-
V(
|
|
2809
|
+
V(At());
|
|
2808
2810
|
} catch ($) {
|
|
2809
2811
|
console.warn("[LiveLayer] request_routes: extractRoutes threw.", $);
|
|
2810
2812
|
}
|
|
2811
2813
|
return;
|
|
2812
2814
|
}
|
|
2813
|
-
|
|
2815
|
+
ro.has(p.type) || Re == null || Re(p);
|
|
2814
2816
|
}
|
|
2815
2817
|
},
|
|
2816
2818
|
[Re, Ae]
|
|
2817
|
-
), Q =
|
|
2818
|
-
agentId: P ? "__controlled__" :
|
|
2819
|
+
), Q = jn({
|
|
2820
|
+
agentId: P ? "__controlled__" : gt,
|
|
2819
2821
|
baseUrl: l,
|
|
2820
2822
|
apiKey: i,
|
|
2821
2823
|
sessionEndpoint: d,
|
|
2822
2824
|
sessionBody: a,
|
|
2823
|
-
onDataMessage: P ? void 0 :
|
|
2825
|
+
onDataMessage: P ? void 0 : lt
|
|
2824
2826
|
});
|
|
2825
2827
|
I(() => {
|
|
2826
2828
|
if (P != null && P.subscribeToDataMessages)
|
|
2827
|
-
return P.subscribeToDataMessages(
|
|
2828
|
-
}, [P,
|
|
2829
|
+
return P.subscribeToDataMessages(lt);
|
|
2830
|
+
}, [P, lt]), fe.current = () => {
|
|
2829
2831
|
var m;
|
|
2830
2832
|
return (m = Q.getRoom) == null ? void 0 : m.call(Q);
|
|
2831
2833
|
}, I(() => {
|
|
@@ -2833,17 +2835,17 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2833
2835
|
if (typeof window > "u") return;
|
|
2834
2836
|
const m = ((K = window.location) == null ? void 0 : K.hostname) || "";
|
|
2835
2837
|
if (m === "localhost" || m === "127.0.0.1" || m === "0.0.0.0" || m.endsWith(".local") || m.endsWith(".test"))
|
|
2836
|
-
return window.__livelayerSimulateCommand = (
|
|
2838
|
+
return window.__livelayerSimulateCommand = (ae) => {
|
|
2837
2839
|
try {
|
|
2838
|
-
|
|
2839
|
-
} catch (
|
|
2840
|
-
console.warn("[LiveLayer] simulate-command threw:",
|
|
2840
|
+
lt(ae);
|
|
2841
|
+
} catch (he) {
|
|
2842
|
+
console.warn("[LiveLayer] simulate-command threw:", he);
|
|
2841
2843
|
}
|
|
2842
2844
|
}, () => {
|
|
2843
2845
|
delete window.__livelayerSimulateCommand;
|
|
2844
2846
|
};
|
|
2845
|
-
}, [
|
|
2846
|
-
const w =
|
|
2847
|
+
}, [lt]);
|
|
2848
|
+
const w = Ge(() => P ? {
|
|
2847
2849
|
connectionState: P.connectionState,
|
|
2848
2850
|
agentState: P.agentState,
|
|
2849
2851
|
transcript: P.transcript,
|
|
@@ -2874,15 +2876,15 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2874
2876
|
disconnect: Q.disconnect,
|
|
2875
2877
|
getRoom: Q.getRoom,
|
|
2876
2878
|
isControlled: !1
|
|
2877
|
-
}, [P, Q]),
|
|
2878
|
-
|
|
2879
|
-
const
|
|
2880
|
-
|
|
2879
|
+
}, [P, Q]), $t = N(w);
|
|
2880
|
+
$t.current = w;
|
|
2881
|
+
const zt = N(P);
|
|
2882
|
+
zt.current = P, Hn(
|
|
2881
2883
|
r,
|
|
2882
2884
|
() => ({
|
|
2883
2885
|
sendData: async (m) => {
|
|
2884
|
-
var
|
|
2885
|
-
const p =
|
|
2886
|
+
var he, ct;
|
|
2887
|
+
const p = zt.current;
|
|
2886
2888
|
if (p != null && p.publishData) {
|
|
2887
2889
|
try {
|
|
2888
2890
|
await p.publishData(m);
|
|
@@ -2891,11 +2893,11 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2891
2893
|
}
|
|
2892
2894
|
return;
|
|
2893
2895
|
}
|
|
2894
|
-
const K = (
|
|
2895
|
-
if (
|
|
2896
|
+
const K = (ct = (he = $t.current) == null ? void 0 : he.getRoom) == null ? void 0 : ct.call(he), ae = K == null ? void 0 : K.localParticipant;
|
|
2897
|
+
if (ae != null && ae.publishData)
|
|
2896
2898
|
try {
|
|
2897
2899
|
const L = new TextEncoder().encode(JSON.stringify(m));
|
|
2898
|
-
await
|
|
2900
|
+
await ae.publishData(L, { reliable: !0 });
|
|
2899
2901
|
} catch (L) {
|
|
2900
2902
|
console.warn("[AvatarWidget] sendData failed:", L);
|
|
2901
2903
|
}
|
|
@@ -2903,9 +2905,9 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2903
2905
|
}),
|
|
2904
2906
|
[]
|
|
2905
2907
|
);
|
|
2906
|
-
const
|
|
2908
|
+
const Ot = N(null);
|
|
2907
2909
|
I(() => {
|
|
2908
|
-
const m = w.videoElement, p =
|
|
2910
|
+
const m = w.videoElement, p = Ot.current;
|
|
2909
2911
|
if (!(!m || !p))
|
|
2910
2912
|
return p.appendChild(m), () => {
|
|
2911
2913
|
m.parentNode === p && p.removeChild(m);
|
|
@@ -2913,12 +2915,12 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2913
2915
|
}, [w.videoElement]), I(() => {
|
|
2914
2916
|
const m = w.audioElement;
|
|
2915
2917
|
if (!m) return;
|
|
2916
|
-
|
|
2918
|
+
ve.attach(m);
|
|
2917
2919
|
const p = m.play();
|
|
2918
2920
|
return p && typeof p.catch == "function" && p.catch((K) => {
|
|
2919
|
-
(K == null ? void 0 : K.name) === "NotAllowedError" &&
|
|
2921
|
+
(K == null ? void 0 : K.name) === "NotAllowedError" && nt(!0);
|
|
2920
2922
|
}), () => {
|
|
2921
|
-
|
|
2923
|
+
ve.detach();
|
|
2922
2924
|
};
|
|
2923
2925
|
}, [w.audioElement]), I(() => {
|
|
2924
2926
|
if (w.isControlled || w.connectionState !== "connected") return;
|
|
@@ -2933,14 +2935,14 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2933
2935
|
if (w.connectionState !== "connected") return;
|
|
2934
2936
|
const m = w.isControlled ? (p = P == null ? void 0 : P.getRoom) == null ? void 0 : p.call(P) : w.getRoom();
|
|
2935
2937
|
if (m)
|
|
2936
|
-
return
|
|
2937
|
-
|
|
2938
|
+
return ue.attachRoom(m), be.attachRoom(m), w.isControlled && X.attachRoom(m), He.refresh(), () => {
|
|
2939
|
+
ue.teardown(), be.teardown();
|
|
2938
2940
|
};
|
|
2939
2941
|
}, [w.isControlled, w.connectionState, P]), I(() => {
|
|
2940
2942
|
const m = w.audioElement;
|
|
2941
|
-
m && (m.muted =
|
|
2942
|
-
}, [w.audioElement,
|
|
2943
|
-
const
|
|
2943
|
+
m && (m.muted = We);
|
|
2944
|
+
}, [w.audioElement, We]);
|
|
2945
|
+
const Ln = E((m) => {
|
|
2944
2946
|
const p = { type: "user_message", text: m };
|
|
2945
2947
|
if (P != null && P.publishData) {
|
|
2946
2948
|
try {
|
|
@@ -2952,201 +2954,202 @@ const no = /* @__PURE__ */ new Set([
|
|
|
2952
2954
|
const K = w.getRoom();
|
|
2953
2955
|
if (K)
|
|
2954
2956
|
try {
|
|
2955
|
-
const
|
|
2956
|
-
K.localParticipant.publishData(
|
|
2957
|
+
const ae = new TextEncoder().encode(JSON.stringify(p));
|
|
2958
|
+
K.localParticipant.publishData(ae, { reliable: !0 });
|
|
2957
2959
|
} catch {
|
|
2958
2960
|
}
|
|
2959
|
-
}, [w, P]),
|
|
2960
|
-
|
|
2961
|
+
}, [w, P]), En = E(() => {
|
|
2962
|
+
yt((m) => !m);
|
|
2961
2963
|
}, []);
|
|
2962
2964
|
I(() => {
|
|
2963
|
-
Ne == null || Ne(w.connectionState), w.connectionState === "connected" ? Ce == null || Ce() : w.connectionState === "disconnected" && (
|
|
2964
|
-
}, [w.connectionState, Ce,
|
|
2965
|
+
Ne == null || Ne(w.connectionState), w.connectionState === "connected" ? Ce == null || Ce() : w.connectionState === "disconnected" && ($e == null || $e());
|
|
2966
|
+
}, [w.connectionState, Ce, $e, Ne]), I(() => {
|
|
2965
2967
|
Se == null || Se(w.transcript);
|
|
2966
2968
|
}, [w.transcript, Se]), I(() => {
|
|
2967
|
-
|
|
2968
|
-
}, [w.agentState,
|
|
2969
|
-
|
|
2970
|
-
}, [w.agentState,
|
|
2971
|
-
const
|
|
2969
|
+
ze == null || ze(w.agentState);
|
|
2970
|
+
}, [w.agentState, ze]), I(() => {
|
|
2971
|
+
Be.setThinking(w.agentState === "thinking");
|
|
2972
|
+
}, [w.agentState, Be]);
|
|
2973
|
+
const Ht = N(!1);
|
|
2972
2974
|
I(() => {
|
|
2973
|
-
w.isControlled || !y ||
|
|
2975
|
+
w.isControlled || !y || Ht.current || re && w.connectionState === "idle" && (Ht.current = !0, w.connect());
|
|
2974
2976
|
}, [y, w.connectionState, w, re]);
|
|
2975
|
-
const
|
|
2977
|
+
const Cn = E(
|
|
2976
2978
|
(m) => {
|
|
2977
2979
|
const p = S == null ? void 0 : S.find((K) => K.id === m);
|
|
2978
|
-
p && (
|
|
2980
|
+
p && (it(!1), m !== Te && (rt(!0), w.disconnect(), Ze || Oe(m), D == null || D(p)));
|
|
2979
2981
|
},
|
|
2980
2982
|
[
|
|
2981
2983
|
S,
|
|
2982
2984
|
Te,
|
|
2983
2985
|
w,
|
|
2984
|
-
|
|
2986
|
+
Ze,
|
|
2985
2987
|
D
|
|
2986
2988
|
]
|
|
2987
2989
|
);
|
|
2988
2990
|
I(() => {
|
|
2989
|
-
|
|
2990
|
-
}, [w.connectionState,
|
|
2991
|
-
if (!
|
|
2991
|
+
we && w.connectionState === "connected" && rt(!1);
|
|
2992
|
+
}, [w.connectionState, we]), I(() => {
|
|
2993
|
+
if (!ot) return;
|
|
2992
2994
|
const m = (p) => {
|
|
2993
|
-
p.key === "Escape" &&
|
|
2995
|
+
p.key === "Escape" && it(!1);
|
|
2994
2996
|
};
|
|
2995
2997
|
return window.addEventListener("keydown", m), () => window.removeEventListener("keydown", m);
|
|
2996
|
-
}, [
|
|
2997
|
-
const
|
|
2998
|
-
|
|
2999
|
-
const
|
|
2998
|
+
}, [ot]);
|
|
2999
|
+
const Sn = !!B || !!(ee != null && ee.avatarImageUrl) || w.isControlled, at = Qn(gt, l, Sn);
|
|
3000
|
+
Qe === void 0 && ((Ft = at.info) != null && Ft.capabilities) && (St.current = at.info.capabilities);
|
|
3001
|
+
const vt = (ee == null ? void 0 : ee.name) ?? q ?? ((Ut = w.agentConfig) == null ? void 0 : Ut.name) ?? ((jt = at.info) == null ? void 0 : jt.name) ?? "Live Layer", Nt = (ee == null ? void 0 : ee.avatarImageUrl) ?? B ?? ((Vt = w.agentConfig) == null ? void 0 : Vt.avatarImageUrl) ?? ((Yt = at.info) == null ? void 0 : Yt.avatarImageUrl) ?? null, Nn = k ?? ((Gt = w.agentConfig) == null ? void 0 : Gt.idleLoopUrl) ?? ((Jt = at.info) == null ? void 0 : Jt.idleLoopUrl) ?? null, An = R ?? null, Rn = E(() => ie("expanded"), [ie]), In = E(
|
|
3000
3002
|
() => ie("minimized"),
|
|
3001
3003
|
[ie]
|
|
3002
|
-
),
|
|
3004
|
+
), Wt = E(() => {
|
|
3003
3005
|
w.disconnect(), ie("hidden");
|
|
3004
|
-
}, [w, ie]),
|
|
3006
|
+
}, [w, ie]), Mn = E(() => {
|
|
3005
3007
|
const m = w.audioElement;
|
|
3006
|
-
m && m.play().then(() =>
|
|
3008
|
+
m && m.play().then(() => nt(!1)).catch(() => {
|
|
3007
3009
|
});
|
|
3008
|
-
}, [w.audioElement]),
|
|
3009
|
-
|
|
3010
|
-
}, [w]),
|
|
3011
|
-
...
|
|
3012
|
-
...
|
|
3010
|
+
}, [w.audioElement]), Tn = E(() => {
|
|
3011
|
+
nt(!1), w.connect();
|
|
3012
|
+
}, [w]), qe = {
|
|
3013
|
+
...kt,
|
|
3014
|
+
...tt ? {} : { zIndex: Ie }
|
|
3013
3015
|
};
|
|
3014
|
-
F.primaryColor && (
|
|
3015
|
-
const
|
|
3016
|
+
F.primaryColor && (qe["--ll-color-primary"] = F.primaryColor), F.accentColor && (qe["--ll-color-accent"] = F.accentColor), F.backgroundColor && (qe["--ll-color-bg"] = F.backgroundColor), F.textColor && (qe["--ll-color-fg"] = F.textColor);
|
|
3017
|
+
const Dn = [
|
|
3016
3018
|
"ll-widget",
|
|
3017
3019
|
`ll-widget--${oe}`,
|
|
3018
|
-
`ll-widget--${
|
|
3019
|
-
|
|
3020
|
+
`ll-widget--${de ? "mobile" : "desktop"}`,
|
|
3021
|
+
mt
|
|
3020
3022
|
].filter(Boolean).join(" ");
|
|
3021
3023
|
if (!re) return null;
|
|
3022
|
-
const
|
|
3024
|
+
const Pn = /* @__PURE__ */ n(
|
|
3023
3025
|
"div",
|
|
3024
3026
|
{
|
|
3025
|
-
className:
|
|
3026
|
-
style:
|
|
3027
|
+
className: Dn,
|
|
3028
|
+
style: qe,
|
|
3027
3029
|
"data-display-mode": oe,
|
|
3028
3030
|
"data-position": _,
|
|
3029
3031
|
"data-experience-mode": u === "EMBEDDED" ? "embedded" : "widget",
|
|
3030
3032
|
children: oe === "expanded" && /* @__PURE__ */ n(
|
|
3031
|
-
|
|
3033
|
+
Mr,
|
|
3032
3034
|
{
|
|
3033
3035
|
position: _,
|
|
3034
|
-
isMobile:
|
|
3035
|
-
agentName:
|
|
3036
|
-
avatarImageUrl:
|
|
3037
|
-
idleLoopUrl:
|
|
3038
|
-
greeting:
|
|
3036
|
+
isMobile: de,
|
|
3037
|
+
agentName: vt,
|
|
3038
|
+
avatarImageUrl: Nt,
|
|
3039
|
+
idleLoopUrl: Nn,
|
|
3040
|
+
greeting: An,
|
|
3039
3041
|
branding: F,
|
|
3040
3042
|
teamMembers: S,
|
|
3041
3043
|
currentTeamMemberId: Te,
|
|
3042
|
-
isSwitchingTeamMember:
|
|
3043
|
-
teamSwitcherOpen:
|
|
3044
|
-
onToggleTeamSwitcher: () =>
|
|
3045
|
-
onSelectTeamMember:
|
|
3044
|
+
isSwitchingTeamMember: we,
|
|
3045
|
+
teamSwitcherOpen: ot,
|
|
3046
|
+
onToggleTeamSwitcher: () => it((m) => !m),
|
|
3047
|
+
onSelectTeamMember: Cn,
|
|
3046
3048
|
connectionState: w.connectionState,
|
|
3047
3049
|
agentState: w.agentState,
|
|
3048
3050
|
transcript: w.transcript,
|
|
3049
3051
|
isMuted: X.isMuted,
|
|
3050
|
-
micDevices:
|
|
3052
|
+
micDevices: He.mics,
|
|
3051
3053
|
activeMicId: X.activeDeviceId,
|
|
3052
|
-
isCameraEnabled:
|
|
3053
|
-
cameraPreviewEl:
|
|
3054
|
-
cameraDevices:
|
|
3055
|
-
activeCameraId:
|
|
3056
|
-
isScreenShareEnabled:
|
|
3057
|
-
screenPreviewEl:
|
|
3058
|
-
isSpeakerMuted:
|
|
3054
|
+
isCameraEnabled: ue.isEnabled,
|
|
3055
|
+
cameraPreviewEl: ue.previewEl,
|
|
3056
|
+
cameraDevices: He.cameras,
|
|
3057
|
+
activeCameraId: ue.activeDeviceId,
|
|
3058
|
+
isScreenShareEnabled: be.isEnabled,
|
|
3059
|
+
screenPreviewEl: be.previewEl,
|
|
3060
|
+
isSpeakerMuted: We,
|
|
3059
3061
|
allowCamera: U,
|
|
3060
3062
|
allowScreenShare: O,
|
|
3061
3063
|
allowTyping: j,
|
|
3062
3064
|
showMinimize: H,
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3065
|
+
showClose: G,
|
|
3066
|
+
chromeless: ce,
|
|
3067
|
+
compactControls: ge,
|
|
3068
|
+
transforming: pe,
|
|
3069
|
+
transformingLabel: ye,
|
|
3070
|
+
languageMenuOpen: _e,
|
|
3071
|
+
onToggleLanguageMenu: () => xe((m) => !m),
|
|
3072
|
+
needsUserGesture: Lt,
|
|
3070
3073
|
canResume: w.canResume,
|
|
3071
3074
|
micError: X.micError,
|
|
3072
3075
|
error: w.error,
|
|
3073
|
-
avatarVideoContainerRef:
|
|
3076
|
+
avatarVideoContainerRef: Ot,
|
|
3074
3077
|
agentVideoEl: w.videoElement,
|
|
3075
3078
|
onConnect: () => void w.connect(),
|
|
3076
3079
|
onDisconnect: () => w.disconnect(),
|
|
3077
|
-
onRetry:
|
|
3078
|
-
onResumeAudio:
|
|
3080
|
+
onRetry: Tn,
|
|
3081
|
+
onResumeAudio: Mn,
|
|
3079
3082
|
onToggleMute: X.toggleMute,
|
|
3080
3083
|
onSwitchMicDevice: (m) => void X.switchDevice(m),
|
|
3081
|
-
onToggleCamera: () => void
|
|
3082
|
-
onSwitchCameraDevice: (m) => void
|
|
3083
|
-
onToggleScreenShare: () => void
|
|
3084
|
-
onToggleSpeaker:
|
|
3085
|
-
onSendMessage:
|
|
3086
|
-
onMinimize:
|
|
3087
|
-
onClose:
|
|
3084
|
+
onToggleCamera: () => void ue.toggle(),
|
|
3085
|
+
onSwitchCameraDevice: (m) => void ue.switchDevice(m),
|
|
3086
|
+
onToggleScreenShare: () => void be.toggle(),
|
|
3087
|
+
onToggleSpeaker: En,
|
|
3088
|
+
onSendMessage: Ln,
|
|
3089
|
+
onMinimize: In,
|
|
3090
|
+
onClose: Wt,
|
|
3088
3091
|
onClearMicError: X.clearError
|
|
3089
3092
|
}
|
|
3090
3093
|
)
|
|
3091
3094
|
}
|
|
3092
|
-
),
|
|
3095
|
+
), Bt = oe === "hidden" || oe === "minimized" ? /* @__PURE__ */ g(
|
|
3093
3096
|
"div",
|
|
3094
3097
|
{
|
|
3095
3098
|
className: [
|
|
3096
3099
|
"ll-widget",
|
|
3097
3100
|
"ll-widget--floating",
|
|
3098
3101
|
`ll-widget--${oe}`,
|
|
3099
|
-
`ll-widget--${
|
|
3102
|
+
`ll-widget--${de ? "mobile" : "desktop"}`
|
|
3100
3103
|
].join(" "),
|
|
3101
|
-
style:
|
|
3104
|
+
style: qe,
|
|
3102
3105
|
"data-display-mode": oe,
|
|
3103
3106
|
"data-position": _,
|
|
3104
3107
|
children: [
|
|
3105
3108
|
oe === "hidden" && /* @__PURE__ */ n(
|
|
3106
|
-
|
|
3109
|
+
kr,
|
|
3107
3110
|
{
|
|
3108
3111
|
position: _,
|
|
3109
|
-
isMobile:
|
|
3112
|
+
isMobile: de,
|
|
3110
3113
|
isSpeaking: w.agentState === "speaking",
|
|
3111
3114
|
onExpand: () => ie("expanded"),
|
|
3112
|
-
label: `Open ${
|
|
3113
|
-
avatarImageUrl:
|
|
3114
|
-
agentName:
|
|
3115
|
-
containerEl:
|
|
3115
|
+
label: `Open ${vt} widget`,
|
|
3116
|
+
avatarImageUrl: Nt,
|
|
3117
|
+
agentName: vt,
|
|
3118
|
+
containerEl: se
|
|
3116
3119
|
}
|
|
3117
3120
|
),
|
|
3118
3121
|
oe === "minimized" && /* @__PURE__ */ n(
|
|
3119
|
-
|
|
3122
|
+
Er,
|
|
3120
3123
|
{
|
|
3121
3124
|
position: _,
|
|
3122
|
-
isMobile:
|
|
3123
|
-
agentName:
|
|
3124
|
-
avatarImageUrl:
|
|
3125
|
+
isMobile: de,
|
|
3126
|
+
agentName: vt,
|
|
3127
|
+
avatarImageUrl: Nt,
|
|
3125
3128
|
agentState: w.agentState,
|
|
3126
3129
|
isMuted: X.isMuted,
|
|
3127
|
-
audioLevel:
|
|
3128
|
-
onExpand:
|
|
3130
|
+
audioLevel: ve,
|
|
3131
|
+
onExpand: Rn,
|
|
3129
3132
|
onToggleMute: X.toggleMute,
|
|
3130
|
-
onClose:
|
|
3133
|
+
onClose: Wt
|
|
3131
3134
|
}
|
|
3132
3135
|
)
|
|
3133
3136
|
]
|
|
3134
3137
|
}
|
|
3135
|
-
) : null,
|
|
3136
|
-
return /* @__PURE__ */ g(
|
|
3137
|
-
|
|
3138
|
-
|
|
3138
|
+
) : null, qt = se ?? (typeof document < "u" ? document.body : null);
|
|
3139
|
+
return /* @__PURE__ */ g(Ye, { children: [
|
|
3140
|
+
Pn,
|
|
3141
|
+
Bt && qt && It(Bt, qt)
|
|
3139
3142
|
] });
|
|
3140
3143
|
}
|
|
3141
3144
|
);
|
|
3142
|
-
|
|
3143
|
-
const
|
|
3145
|
+
kn.displayName = "AvatarWidgetInner";
|
|
3146
|
+
const oo = ut(
|
|
3144
3147
|
function(t, r) {
|
|
3145
|
-
return /* @__PURE__ */ n(
|
|
3148
|
+
return /* @__PURE__ */ n(Un, { children: /* @__PURE__ */ n(kn, { ...t, ref: r }) });
|
|
3146
3149
|
}
|
|
3147
3150
|
);
|
|
3148
|
-
|
|
3149
|
-
const
|
|
3151
|
+
oo.displayName = "AvatarWidget";
|
|
3152
|
+
const mo = ({
|
|
3150
3153
|
agentId: e,
|
|
3151
3154
|
baseUrl: t,
|
|
3152
3155
|
apiKey: r,
|
|
@@ -3172,9 +3175,9 @@ const ho = ({
|
|
|
3172
3175
|
}, [e]), I(() => {
|
|
3173
3176
|
s.current && (o ? s.current.setAttribute("mode", o) : s.current.removeAttribute("mode"));
|
|
3174
3177
|
}, [o]), /* @__PURE__ */ n("div", { ref: a, className: l, style: d });
|
|
3175
|
-
},
|
|
3178
|
+
}, go = ut(
|
|
3176
3179
|
function({ id: t, intent: r, as: o = "div", className: i, style: l, children: d }, a) {
|
|
3177
|
-
return
|
|
3180
|
+
return Wn(
|
|
3178
3181
|
o,
|
|
3179
3182
|
{
|
|
3180
3183
|
ref: a,
|
|
@@ -3186,7 +3189,7 @@ const ho = ({
|
|
|
3186
3189
|
d
|
|
3187
3190
|
);
|
|
3188
3191
|
}
|
|
3189
|
-
),
|
|
3192
|
+
), yo = ut(
|
|
3190
3193
|
function({ id: t, intent: r, children: o, ...i }, l) {
|
|
3191
3194
|
return /* @__PURE__ */ n(
|
|
3192
3195
|
"form",
|
|
@@ -3199,7 +3202,7 @@ const ho = ({
|
|
|
3199
3202
|
}
|
|
3200
3203
|
);
|
|
3201
3204
|
}
|
|
3202
|
-
),
|
|
3205
|
+
), vo = ut(
|
|
3203
3206
|
function(t, r) {
|
|
3204
3207
|
const { name: o, label: i, labelClassName: l } = t, d = { name: o, "data-ll-field": o };
|
|
3205
3208
|
let a;
|
|
@@ -3241,8 +3244,8 @@ const ho = ({
|
|
|
3241
3244
|
] });
|
|
3242
3245
|
}
|
|
3243
3246
|
);
|
|
3244
|
-
let
|
|
3245
|
-
function
|
|
3247
|
+
let hn = 1;
|
|
3248
|
+
function bo({
|
|
3246
3249
|
onMount: e,
|
|
3247
3250
|
defaultOpen: t = !1,
|
|
3248
3251
|
storageKey: r = "ll-debug-open"
|
|
@@ -3278,7 +3281,7 @@ function vo({
|
|
|
3278
3281
|
if (I(() => {
|
|
3279
3282
|
!e || _.current || (_.current = !0, e((b) => {
|
|
3280
3283
|
c.current.push({
|
|
3281
|
-
id:
|
|
3284
|
+
id: hn++,
|
|
3282
3285
|
ts: Date.now(),
|
|
3283
3286
|
kind: "event",
|
|
3284
3287
|
type: b.eventName,
|
|
@@ -3290,11 +3293,11 @@ function vo({
|
|
|
3290
3293
|
try {
|
|
3291
3294
|
const R = typeof k[0] == "string" ? k[0] : "";
|
|
3292
3295
|
R.startsWith("[LiveLayer]") && c.current.push({
|
|
3293
|
-
id:
|
|
3296
|
+
id: hn++,
|
|
3294
3297
|
ts: Date.now(),
|
|
3295
3298
|
kind: M,
|
|
3296
3299
|
type: R.slice(0, 120),
|
|
3297
|
-
data: { args: k.slice(1).map((B) =>
|
|
3300
|
+
data: { args: k.slice(1).map((B) => lo(B)) }
|
|
3298
3301
|
});
|
|
3299
3302
|
} catch {
|
|
3300
3303
|
}
|
|
@@ -3381,7 +3384,7 @@ function vo({
|
|
|
3381
3384
|
{
|
|
3382
3385
|
type: "button",
|
|
3383
3386
|
onClick: () => y((b) => !b),
|
|
3384
|
-
style:
|
|
3387
|
+
style: Rt(u ? "#f59e0b" : "transparent"),
|
|
3385
3388
|
title: "Pause / resume capture",
|
|
3386
3389
|
children: u ? "▶ resume" : "⏸ pause"
|
|
3387
3390
|
}
|
|
@@ -3393,7 +3396,7 @@ function vo({
|
|
|
3393
3396
|
onClick: () => {
|
|
3394
3397
|
d([]), c.current = [];
|
|
3395
3398
|
},
|
|
3396
|
-
style:
|
|
3399
|
+
style: Rt("transparent"),
|
|
3397
3400
|
title: "Clear buffer",
|
|
3398
3401
|
children: "clear"
|
|
3399
3402
|
}
|
|
@@ -3403,7 +3406,7 @@ function vo({
|
|
|
3403
3406
|
{
|
|
3404
3407
|
type: "button",
|
|
3405
3408
|
onClick: () => i(!1),
|
|
3406
|
-
style:
|
|
3409
|
+
style: Rt("transparent"),
|
|
3407
3410
|
"aria-label": "Close",
|
|
3408
3411
|
title: "Close (Cmd/Ctrl + Shift + L)",
|
|
3409
3412
|
children: "✕"
|
|
@@ -3470,7 +3473,7 @@ function vo({
|
|
|
3470
3473
|
]
|
|
3471
3474
|
}
|
|
3472
3475
|
) : x.map((b) => /* @__PURE__ */ n(
|
|
3473
|
-
|
|
3476
|
+
io,
|
|
3474
3477
|
{
|
|
3475
3478
|
entry: b,
|
|
3476
3479
|
expanded: f.current.has(b.id),
|
|
@@ -3486,7 +3489,7 @@ function vo({
|
|
|
3486
3489
|
}
|
|
3487
3490
|
);
|
|
3488
3491
|
}
|
|
3489
|
-
function
|
|
3492
|
+
function io({
|
|
3490
3493
|
entry: e,
|
|
3491
3494
|
expanded: t,
|
|
3492
3495
|
onToggle: r
|
|
@@ -3556,7 +3559,7 @@ function oo({
|
|
|
3556
3559
|
}
|
|
3557
3560
|
);
|
|
3558
3561
|
}
|
|
3559
|
-
function
|
|
3562
|
+
function Rt(e) {
|
|
3560
3563
|
return {
|
|
3561
3564
|
background: e,
|
|
3562
3565
|
color: "#fff",
|
|
@@ -3567,14 +3570,14 @@ function At(e) {
|
|
|
3567
3570
|
cursor: "pointer"
|
|
3568
3571
|
};
|
|
3569
3572
|
}
|
|
3570
|
-
function
|
|
3573
|
+
function lo(e) {
|
|
3571
3574
|
try {
|
|
3572
3575
|
return e instanceof Error ? { message: e.message, stack: e.stack } : (JSON.stringify(e), e);
|
|
3573
3576
|
} catch {
|
|
3574
3577
|
return String(e);
|
|
3575
3578
|
}
|
|
3576
3579
|
}
|
|
3577
|
-
function
|
|
3580
|
+
function wo() {
|
|
3578
3581
|
const [e, t] = C([]), r = E((i) => {
|
|
3579
3582
|
t((l) => {
|
|
3580
3583
|
const d = l.findIndex((a) => a.id === i.id);
|
|
@@ -3593,33 +3596,33 @@ function bo() {
|
|
|
3593
3596
|
};
|
|
3594
3597
|
}
|
|
3595
3598
|
export {
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3599
|
+
oo as AvatarWidget,
|
|
3600
|
+
Un as ErrorBoundary,
|
|
3601
|
+
bo as LiveLayerDebugPanel,
|
|
3602
|
+
vo as LiveLayerField,
|
|
3603
|
+
yo as LiveLayerForm,
|
|
3604
|
+
go as LiveLayerRegion,
|
|
3605
|
+
mo as LiveLayerWidget,
|
|
3606
|
+
Fr as clearPageContextCache,
|
|
3607
|
+
Jr as clearRoutesCache,
|
|
3608
|
+
qr as extractPageContext,
|
|
3609
|
+
Yr as extractRoutes,
|
|
3610
|
+
fn as getCachedPageContext,
|
|
3611
|
+
At as getCachedRoutes,
|
|
3612
|
+
pr as matchesPattern,
|
|
3613
|
+
jr as normalizeRouteInput,
|
|
3614
|
+
hr as shouldRenderAtPath,
|
|
3615
|
+
Qn as useAgentInfo,
|
|
3616
|
+
Vn as useAudioLevel,
|
|
3617
|
+
Jn as useCameraState,
|
|
3618
|
+
tr as useDisplayMode,
|
|
3619
|
+
or as useDisplayModePersistence,
|
|
3620
|
+
lr as useIsMobile,
|
|
3621
|
+
jn as useLiveKitSession,
|
|
3622
|
+
Xn as useMediaDevices,
|
|
3623
|
+
Yn as useMicrophoneState,
|
|
3624
|
+
cr as usePathname,
|
|
3625
|
+
mr as useRouteMatch,
|
|
3626
|
+
Kn as useScreenShareState,
|
|
3627
|
+
wo as useTranscript
|
|
3625
3628
|
};
|