@livelayer/react 0.5.6 → 0.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/dist/index.mjs +363 -352
- package/dist/styles.css +24 -5
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -13,8 +13,8 @@ class mn extends dn {
|
|
|
13
13
|
return { hasError: !0, error: t };
|
|
14
14
|
}
|
|
15
15
|
componentDidCatch(t, r) {
|
|
16
|
-
var
|
|
17
|
-
(
|
|
16
|
+
var o, i;
|
|
17
|
+
(i = (o = this.props).onError) == null || i.call(o, t, r);
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
20
|
var t;
|
|
@@ -34,13 +34,13 @@ class mn extends dn {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
function gn(e) {
|
|
37
|
-
const [t, r] = S("idle"), [
|
|
37
|
+
const [t, r] = S("idle"), [o, i] = S("idle"), [l, s] = S([]), [d, f] = S(null), [g, m] = S(null), [a, c] = S(null), [R, C] = S(!1), [L, v] = S(null), b = E(null), z = E(e.onDataMessage);
|
|
38
38
|
z.current = e.onDataMessage, T(() => {
|
|
39
39
|
const N = {
|
|
40
40
|
onConnectionStateChange: (D) => {
|
|
41
41
|
r(D), D === "connected" && v(null);
|
|
42
42
|
},
|
|
43
|
-
onAgentStateChange:
|
|
43
|
+
onAgentStateChange: i,
|
|
44
44
|
onTranscript: (D) => s([...D]),
|
|
45
45
|
onAgentConfig: f,
|
|
46
46
|
onAudioTrack: (D) => c(D),
|
|
@@ -62,7 +62,7 @@ function gn(e) {
|
|
|
62
62
|
},
|
|
63
63
|
N
|
|
64
64
|
);
|
|
65
|
-
return b.current = B, r("idle"),
|
|
65
|
+
return b.current = B, r("idle"), i("idle"), s([]), f(null), m(null), c(null), C(!1), v(null), () => {
|
|
66
66
|
var D;
|
|
67
67
|
(D = B.destroy) == null || D.call(B), b.current = null;
|
|
68
68
|
};
|
|
@@ -90,7 +90,7 @@ function gn(e) {
|
|
|
90
90
|
}, []);
|
|
91
91
|
return {
|
|
92
92
|
connectionState: t,
|
|
93
|
-
agentState:
|
|
93
|
+
agentState: o,
|
|
94
94
|
transcript: l,
|
|
95
95
|
agentConfig: d,
|
|
96
96
|
videoElement: g,
|
|
@@ -104,10 +104,10 @@ function gn(e) {
|
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
106
|
function yn() {
|
|
107
|
-
const e = E(null), t = E(null), r = E(null),
|
|
107
|
+
const e = E(null), t = E(null), r = E(null), o = E(null), i = E(/* @__PURE__ */ new Set()), l = E(null), s = k(() => {
|
|
108
108
|
const a = t.current;
|
|
109
109
|
if (!a) {
|
|
110
|
-
|
|
110
|
+
o.current = null;
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
113
113
|
(!l.current || l.current.length !== a.frequencyBinCount) && (l.current = new Uint8Array(
|
|
@@ -118,13 +118,13 @@ function yn() {
|
|
|
118
118
|
let R = 0;
|
|
119
119
|
for (let L = 0; L < c.length; L++) R += c[L];
|
|
120
120
|
const C = R / c.length / 255;
|
|
121
|
-
for (const L of
|
|
121
|
+
for (const L of i.current)
|
|
122
122
|
try {
|
|
123
123
|
L(C);
|
|
124
124
|
} catch (v) {
|
|
125
125
|
console.error("[useAudioLevel] subscriber threw:", v);
|
|
126
126
|
}
|
|
127
|
-
|
|
127
|
+
o.current = requestAnimationFrame(s);
|
|
128
128
|
}, []), d = k(() => {
|
|
129
129
|
if (e.current || typeof window > "u" || typeof AudioContext > "u") return;
|
|
130
130
|
const a = new AudioContext(), c = a.createAnalyser();
|
|
@@ -146,20 +146,20 @@ function yn() {
|
|
|
146
146
|
console.warn("[useAudioLevel] createMediaElementSource failed:", c);
|
|
147
147
|
return;
|
|
148
148
|
}
|
|
149
|
-
|
|
149
|
+
o.current === null && (o.current = requestAnimationFrame(s));
|
|
150
150
|
}
|
|
151
151
|
},
|
|
152
152
|
[d, s]
|
|
153
153
|
), g = k(() => {
|
|
154
|
-
if (
|
|
154
|
+
if (o.current !== null && (cancelAnimationFrame(o.current), o.current = null), r.current) {
|
|
155
155
|
try {
|
|
156
156
|
r.current.disconnect();
|
|
157
157
|
} catch {
|
|
158
158
|
}
|
|
159
159
|
r.current = null;
|
|
160
160
|
}
|
|
161
|
-
}, []), m = k((a) => (
|
|
162
|
-
|
|
161
|
+
}, []), m = k((a) => (i.current.add(a), () => {
|
|
162
|
+
i.current.delete(a);
|
|
163
163
|
}), []);
|
|
164
164
|
return T(() => () => {
|
|
165
165
|
if (g(), t.current) {
|
|
@@ -176,34 +176,34 @@ function yn() {
|
|
|
176
176
|
}
|
|
177
177
|
e.current = null;
|
|
178
178
|
}
|
|
179
|
-
|
|
179
|
+
i.current.clear(), l.current = null;
|
|
180
180
|
}, [g]), { attach: f, detach: g, subscribe: m };
|
|
181
181
|
}
|
|
182
182
|
function vn() {
|
|
183
|
-
const [e, t] = S(!1), [r,
|
|
184
|
-
if (
|
|
183
|
+
const [e, t] = S(!1), [r, o] = S(null), i = E(null), l = E(null), s = k(async (m) => {
|
|
184
|
+
if (i.current && l.current) {
|
|
185
185
|
try {
|
|
186
|
-
await l.current.localParticipant.unpublishTrack(
|
|
186
|
+
await l.current.localParticipant.unpublishTrack(i.current);
|
|
187
187
|
} catch {
|
|
188
188
|
}
|
|
189
|
-
|
|
189
|
+
i.current.stop(), i.current = null;
|
|
190
190
|
}
|
|
191
|
-
l.current = m,
|
|
191
|
+
l.current = m, o(null);
|
|
192
192
|
try {
|
|
193
193
|
const a = await pn({
|
|
194
194
|
echoCancellation: !0,
|
|
195
195
|
noiseSuppression: !0
|
|
196
196
|
});
|
|
197
|
-
await m.localParticipant.publishTrack(a),
|
|
197
|
+
await m.localParticipant.publishTrack(a), i.current = a, t(a.isMuted);
|
|
198
198
|
} catch (a) {
|
|
199
199
|
const c = a instanceof Error && a.name === "NotAllowedError" ? "Enable your microphone to talk with the agent." : "Microphone unavailable. Check browser permissions and try again.";
|
|
200
|
-
throw
|
|
200
|
+
throw o(c), a;
|
|
201
201
|
}
|
|
202
202
|
}, []), d = k(() => {
|
|
203
|
-
const m =
|
|
203
|
+
const m = i.current;
|
|
204
204
|
m && (m.isMuted ? (m.unmute(), t(!1)) : (m.mute(), t(!0)));
|
|
205
205
|
}, []), f = k(() => {
|
|
206
|
-
const m =
|
|
206
|
+
const m = i.current, a = l.current;
|
|
207
207
|
if (m && a) {
|
|
208
208
|
try {
|
|
209
209
|
a.localParticipant.unpublishTrack(m);
|
|
@@ -211,8 +211,8 @@ function vn() {
|
|
|
211
211
|
}
|
|
212
212
|
m.stop();
|
|
213
213
|
}
|
|
214
|
-
|
|
215
|
-
}, []), g = k(() =>
|
|
214
|
+
i.current = null, l.current = null, t(!1);
|
|
215
|
+
}, []), g = k(() => o(null), []);
|
|
216
216
|
return {
|
|
217
217
|
isMuted: e,
|
|
218
218
|
micError: r,
|
|
@@ -224,7 +224,7 @@ function vn() {
|
|
|
224
224
|
}
|
|
225
225
|
const bn = { resolution: { width: 640, height: 480, frameRate: 24 } };
|
|
226
226
|
function wn() {
|
|
227
|
-
const [e, t] = S(!1), [r,
|
|
227
|
+
const [e, t] = S(!1), [r, o] = S(null), [i, l] = S(null), [s, d] = S(""), f = E(null), g = E(null), m = k((b) => {
|
|
228
228
|
f.current = b;
|
|
229
229
|
}, []), a = k(() => {
|
|
230
230
|
const b = f.current, z = g.current;
|
|
@@ -243,7 +243,7 @@ function wn() {
|
|
|
243
243
|
}, []), c = k(async (b) => {
|
|
244
244
|
const z = f.current;
|
|
245
245
|
if (z) {
|
|
246
|
-
|
|
246
|
+
o(null);
|
|
247
247
|
try {
|
|
248
248
|
const I = { ...bn };
|
|
249
249
|
b && (I.deviceId = b);
|
|
@@ -260,7 +260,7 @@ function wn() {
|
|
|
260
260
|
}
|
|
261
261
|
} catch (I) {
|
|
262
262
|
const H = I instanceof Error && I.name === "NotAllowedError" ? "Enable your camera in the browser to share video." : "Camera unavailable. Check permissions and try again.";
|
|
263
|
-
|
|
263
|
+
o(H);
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
266
|
}, []), R = k(async () => {
|
|
@@ -268,14 +268,14 @@ function wn() {
|
|
|
268
268
|
}, [e, s, a, c]), C = k(async (b) => {
|
|
269
269
|
a(), await c(b);
|
|
270
270
|
}, [a, c]), L = k(() => {
|
|
271
|
-
a(), f.current = null,
|
|
272
|
-
}, [a]), v = k(() =>
|
|
271
|
+
a(), f.current = null, o(null), d("");
|
|
272
|
+
}, [a]), v = k(() => o(null), []);
|
|
273
273
|
return T(() => () => {
|
|
274
274
|
g.current && g.current.stop();
|
|
275
275
|
}, []), {
|
|
276
276
|
isEnabled: e,
|
|
277
277
|
error: r,
|
|
278
|
-
previewEl:
|
|
278
|
+
previewEl: i,
|
|
279
279
|
activeDeviceId: s,
|
|
280
280
|
toggle: R,
|
|
281
281
|
switchDevice: C,
|
|
@@ -285,7 +285,7 @@ function wn() {
|
|
|
285
285
|
};
|
|
286
286
|
}
|
|
287
287
|
function _n() {
|
|
288
|
-
const [e, t] = S(!1), [r,
|
|
288
|
+
const [e, t] = S(!1), [r, o] = S(null), [i, l] = S(null), s = E(null), d = k((c) => {
|
|
289
289
|
s.current = c;
|
|
290
290
|
}, []), f = k(() => l(null), []), g = k(async () => {
|
|
291
291
|
const c = s.current;
|
|
@@ -298,7 +298,7 @@ function _n() {
|
|
|
298
298
|
f(), t(!1);
|
|
299
299
|
return;
|
|
300
300
|
}
|
|
301
|
-
|
|
301
|
+
o(null);
|
|
302
302
|
try {
|
|
303
303
|
await c.localParticipant.setScreenShareEnabled(!0);
|
|
304
304
|
let R = 0;
|
|
@@ -321,7 +321,7 @@ function _n() {
|
|
|
321
321
|
C();
|
|
322
322
|
} catch (R) {
|
|
323
323
|
const C = R instanceof Error ? R.name : "";
|
|
324
|
-
C !== "NotAllowedError" && C !== "AbortError" &&
|
|
324
|
+
C !== "NotAllowedError" && C !== "AbortError" && o("Screen share unavailable. Try again."), t(!1);
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
327
|
}, [e, f]), m = k(() => {
|
|
@@ -331,27 +331,27 @@ function _n() {
|
|
|
331
331
|
c.localParticipant.setScreenShareEnabled(!1);
|
|
332
332
|
} catch {
|
|
333
333
|
}
|
|
334
|
-
f(), t(!1),
|
|
335
|
-
}, [e, f]), a = k(() =>
|
|
336
|
-
return { isEnabled: e, error: r, previewEl:
|
|
334
|
+
f(), t(!1), o(null), s.current = null;
|
|
335
|
+
}, [e, f]), a = k(() => o(null), []);
|
|
336
|
+
return { isEnabled: e, error: r, previewEl: i, toggle: g, attachRoom: d, teardown: m, clearError: a };
|
|
337
337
|
}
|
|
338
338
|
function xn() {
|
|
339
|
-
const [e, t] = S([]), [r,
|
|
339
|
+
const [e, t] = S([]), [r, o] = S([]), i = k(async () => {
|
|
340
340
|
if (!(typeof navigator > "u" || !navigator.mediaDevices))
|
|
341
341
|
try {
|
|
342
342
|
const l = await navigator.mediaDevices.enumerateDevices();
|
|
343
|
-
t(l.filter((s) => s.kind === "audioinput")),
|
|
343
|
+
t(l.filter((s) => s.kind === "audioinput")), o(l.filter((s) => s.kind === "videoinput"));
|
|
344
344
|
} catch {
|
|
345
345
|
}
|
|
346
346
|
}, []);
|
|
347
347
|
return T(() => {
|
|
348
|
-
if (
|
|
349
|
-
const l = () => void
|
|
348
|
+
if (i(), typeof navigator > "u" || !navigator.mediaDevices) return;
|
|
349
|
+
const l = () => void i();
|
|
350
350
|
return navigator.mediaDevices.addEventListener("devicechange", l), () => navigator.mediaDevices.removeEventListener("devicechange", l);
|
|
351
|
-
}, [
|
|
351
|
+
}, [i]), { mics: e, cameras: r, refresh: i };
|
|
352
352
|
}
|
|
353
353
|
function kn(e, t, r = !1) {
|
|
354
|
-
const [
|
|
354
|
+
const [o, i] = S(null), [l, s] = S(null), [d, f] = S(!r && !!e);
|
|
355
355
|
return T(() => {
|
|
356
356
|
if (r || !e) {
|
|
357
357
|
f(!1);
|
|
@@ -367,11 +367,11 @@ function kn(e, t, r = !1) {
|
|
|
367
367
|
}
|
|
368
368
|
return a.json();
|
|
369
369
|
}).then((a) => {
|
|
370
|
-
g.signal.aborted || (
|
|
370
|
+
g.signal.aborted || (i(a), f(!1));
|
|
371
371
|
}).catch((a) => {
|
|
372
372
|
g.signal.aborted || (s(a instanceof Error ? a.message : "Agent lookup failed"), f(!1));
|
|
373
373
|
}), () => g.abort();
|
|
374
|
-
}, [e, t, r]), { info:
|
|
374
|
+
}, [e, t, r]), { info: o, error: l, loading: d };
|
|
375
375
|
}
|
|
376
376
|
function Ln(e) {
|
|
377
377
|
if (typeof window > "u") return null;
|
|
@@ -393,11 +393,11 @@ function Cn({
|
|
|
393
393
|
defaultValue: t = "expanded",
|
|
394
394
|
onChange: r
|
|
395
395
|
} = {}) {
|
|
396
|
-
const
|
|
396
|
+
const o = e !== void 0, [i, l] = S(t), s = o ? e : i, d = k(
|
|
397
397
|
(f) => {
|
|
398
|
-
f !== s && (
|
|
398
|
+
f !== s && (o || l(f), r == null || r(f));
|
|
399
399
|
},
|
|
400
|
-
[s,
|
|
400
|
+
[s, o, r]
|
|
401
401
|
);
|
|
402
402
|
return [s, d];
|
|
403
403
|
}
|
|
@@ -409,18 +409,18 @@ function An({
|
|
|
409
409
|
value: e,
|
|
410
410
|
defaultValue: t = "expanded",
|
|
411
411
|
onChange: r,
|
|
412
|
-
persistKey:
|
|
413
|
-
disablePersistence:
|
|
412
|
+
persistKey: o = "ll-widget",
|
|
413
|
+
disablePersistence: i = !1
|
|
414
414
|
} = {}) {
|
|
415
|
-
const l = `${
|
|
415
|
+
const l = `${o}:display-mode`, s = E(!1), [d, f] = Cn({
|
|
416
416
|
value: e,
|
|
417
417
|
defaultValue: t,
|
|
418
418
|
onChange: (g) => {
|
|
419
|
-
e === void 0 && !
|
|
419
|
+
e === void 0 && !i && Sn(l, g), r == null || r(g);
|
|
420
420
|
}
|
|
421
421
|
});
|
|
422
422
|
return T(() => {
|
|
423
|
-
if (s.current || (s.current = !0,
|
|
423
|
+
if (s.current || (s.current = !0, i || e !== void 0)) return;
|
|
424
424
|
const g = Nn(Ln(l));
|
|
425
425
|
g && g !== d && f(g);
|
|
426
426
|
}, []), [d, f];
|
|
@@ -435,9 +435,9 @@ function In(e = Rn) {
|
|
|
435
435
|
}
|
|
436
436
|
if (typeof window > "u" || typeof window.matchMedia > "u")
|
|
437
437
|
return;
|
|
438
|
-
const
|
|
439
|
-
return l(), typeof
|
|
440
|
-
|
|
438
|
+
const o = `(max-width: ${e - 1}px)`, i = window.matchMedia(o), l = () => r(i.matches);
|
|
439
|
+
return l(), typeof i.addEventListener == "function" ? (i.addEventListener("change", l), () => i.removeEventListener("change", l)) : (i.addListener(l), () => {
|
|
440
|
+
i.removeListener(l);
|
|
441
441
|
});
|
|
442
442
|
}, [e]), t;
|
|
443
443
|
}
|
|
@@ -446,11 +446,11 @@ function Mn() {
|
|
|
446
446
|
if (typeof window > "u" || window.history[Nt]) return;
|
|
447
447
|
const e = window.history.pushState, t = window.history.replaceState;
|
|
448
448
|
window.history.pushState = function(...r) {
|
|
449
|
-
const
|
|
450
|
-
return window.dispatchEvent(new Event(et)),
|
|
449
|
+
const o = e.apply(this, r);
|
|
450
|
+
return window.dispatchEvent(new Event(et)), o;
|
|
451
451
|
}, window.history.replaceState = function(...r) {
|
|
452
|
-
const
|
|
453
|
-
return window.dispatchEvent(new Event(et)),
|
|
452
|
+
const o = t.apply(this, r);
|
|
453
|
+
return window.dispatchEvent(new Event(et)), o;
|
|
454
454
|
}, window.history[Nt] = !0;
|
|
455
455
|
}
|
|
456
456
|
function At() {
|
|
@@ -463,9 +463,9 @@ function Tn(e) {
|
|
|
463
463
|
return T(() => {
|
|
464
464
|
if (e !== void 0) return;
|
|
465
465
|
Mn();
|
|
466
|
-
const
|
|
467
|
-
return
|
|
468
|
-
window.removeEventListener("popstate",
|
|
466
|
+
const o = () => r(At());
|
|
467
|
+
return o(), window.addEventListener("popstate", o), window.addEventListener(et, o), () => {
|
|
468
|
+
window.removeEventListener("popstate", o), window.removeEventListener(et, o);
|
|
469
469
|
};
|
|
470
470
|
}, [e]), e ?? t;
|
|
471
471
|
}
|
|
@@ -476,7 +476,7 @@ function Dn(e) {
|
|
|
476
476
|
function $n(e) {
|
|
477
477
|
const t = Rt.get(e);
|
|
478
478
|
if (t) return t;
|
|
479
|
-
const r = e.length > 1 && e.endsWith("/") ? e.slice(0, -1) : e,
|
|
479
|
+
const r = e.length > 1 && e.endsWith("/") ? e.slice(0, -1) : e, o = "", i = "", l = r.replace(/\*\*/g, o).replace(/\*/g, i), d = Dn(l).replace(new RegExp(`\\/${o}`, "g"), "(?:\\/.*)?").replace(new RegExp(o, "g"), ".*").replace(new RegExp(i, "g"), "[^/]+"), f = new RegExp(`^${d}\\/?$`);
|
|
480
480
|
return Rt.set(e, f), f;
|
|
481
481
|
}
|
|
482
482
|
function zn(e, t) {
|
|
@@ -620,8 +620,8 @@ const Vn = ({
|
|
|
620
620
|
position: e,
|
|
621
621
|
isMobile: t,
|
|
622
622
|
isSpeaking: r,
|
|
623
|
-
onExpand:
|
|
624
|
-
label:
|
|
623
|
+
onExpand: o,
|
|
624
|
+
label: i = "Open widget",
|
|
625
625
|
avatarImageUrl: l,
|
|
626
626
|
agentName: s
|
|
627
627
|
}) => {
|
|
@@ -681,8 +681,8 @@ const Vn = ({
|
|
|
681
681
|
v.current = !1;
|
|
682
682
|
return;
|
|
683
683
|
}
|
|
684
|
-
|
|
685
|
-
}, [
|
|
684
|
+
o();
|
|
685
|
+
}, [o]), N = k(
|
|
686
686
|
(A) => {
|
|
687
687
|
if (A.key === "ArrowUp" || A.key === "ArrowDown") {
|
|
688
688
|
A.preventDefault();
|
|
@@ -714,7 +714,7 @@ const Vn = ({
|
|
|
714
714
|
onPointerCancel: H,
|
|
715
715
|
onClick: p,
|
|
716
716
|
onKeyDown: N,
|
|
717
|
-
"aria-label":
|
|
717
|
+
"aria-label": i,
|
|
718
718
|
"data-position": e,
|
|
719
719
|
style: D,
|
|
720
720
|
children: m ? (
|
|
@@ -753,8 +753,8 @@ const Vn = ({
|
|
|
753
753
|
audioLevel: e,
|
|
754
754
|
bars: t = 20,
|
|
755
755
|
maxHeight: r = 20,
|
|
756
|
-
minHeight:
|
|
757
|
-
className:
|
|
756
|
+
minHeight: o = 4,
|
|
757
|
+
className: i,
|
|
758
758
|
barClassName: l
|
|
759
759
|
}) => {
|
|
760
760
|
const s = E(null), d = E([]), f = Ze(() => {
|
|
@@ -765,11 +765,11 @@ const Vn = ({
|
|
|
765
765
|
for (let c = 0; c < t; c++) {
|
|
766
766
|
const R = d.current[c];
|
|
767
767
|
if (!R) continue;
|
|
768
|
-
const C = Math.max(
|
|
768
|
+
const C = Math.max(o, a * r * f[c]);
|
|
769
769
|
R.style.height = `${C}px`;
|
|
770
770
|
}
|
|
771
|
-
}), [e, t, r,
|
|
772
|
-
const g = ["ll-waveform",
|
|
771
|
+
}), [e, t, r, o, f]);
|
|
772
|
+
const g = ["ll-waveform", i].filter(Boolean).join(" ");
|
|
773
773
|
return /* @__PURE__ */ n("div", { ref: s, className: g, "aria-hidden": "true", children: Array.from({ length: t }, (m, a) => /* @__PURE__ */ n(
|
|
774
774
|
"div",
|
|
775
775
|
{
|
|
@@ -777,16 +777,16 @@ const Vn = ({
|
|
|
777
777
|
d.current[a] = c;
|
|
778
778
|
},
|
|
779
779
|
className: ["ll-waveform__bar", l].filter(Boolean).join(" "),
|
|
780
|
-
style: { height: `${
|
|
780
|
+
style: { height: `${o}px` }
|
|
781
781
|
},
|
|
782
782
|
a
|
|
783
783
|
)) });
|
|
784
|
-
},
|
|
784
|
+
}, Gn = ({
|
|
785
785
|
position: e,
|
|
786
786
|
isMobile: t,
|
|
787
787
|
agentName: r,
|
|
788
|
-
avatarImageUrl:
|
|
789
|
-
agentState:
|
|
788
|
+
avatarImageUrl: o,
|
|
789
|
+
agentState: i,
|
|
790
790
|
isMuted: l,
|
|
791
791
|
audioLevel: s,
|
|
792
792
|
onExpand: d,
|
|
@@ -806,12 +806,12 @@ const Vn = ({
|
|
|
806
806
|
onClick: d,
|
|
807
807
|
"aria-label": `Expand ${r} widget`,
|
|
808
808
|
children: [
|
|
809
|
-
|
|
809
|
+
o ? (
|
|
810
810
|
// eslint-disable-next-line @next/next/no-img-element
|
|
811
811
|
/* @__PURE__ */ n(
|
|
812
812
|
"img",
|
|
813
813
|
{
|
|
814
|
-
src:
|
|
814
|
+
src: o,
|
|
815
815
|
alt: r,
|
|
816
816
|
className: "ll-minimized__avatar"
|
|
817
817
|
}
|
|
@@ -858,12 +858,12 @@ const Vn = ({
|
|
|
858
858
|
role: "region",
|
|
859
859
|
"aria-label": `${r} widget`,
|
|
860
860
|
children: /* @__PURE__ */ w("div", { className: "ll-minimized__surface", children: [
|
|
861
|
-
|
|
861
|
+
o ? (
|
|
862
862
|
// eslint-disable-next-line @next/next/no-img-element
|
|
863
863
|
/* @__PURE__ */ n(
|
|
864
864
|
"img",
|
|
865
865
|
{
|
|
866
|
-
src:
|
|
866
|
+
src: o,
|
|
867
867
|
alt: r,
|
|
868
868
|
className: "ll-minimized__avatar"
|
|
869
869
|
}
|
|
@@ -871,7 +871,7 @@ const Vn = ({
|
|
|
871
871
|
) : /* @__PURE__ */ n("div", { className: "ll-minimized__avatar ll-minimized__avatar--placeholder" }),
|
|
872
872
|
/* @__PURE__ */ w("div", { className: "ll-minimized__meta", children: [
|
|
873
873
|
/* @__PURE__ */ n("span", { className: "ll-minimized__name", children: r }),
|
|
874
|
-
/* @__PURE__ */ n("span", { className: "ll-minimized__state", children:
|
|
874
|
+
/* @__PURE__ */ n("span", { className: "ll-minimized__state", children: i === "speaking" ? "Speaking" : i === "thinking" ? "Thinking" : "Listening" })
|
|
875
875
|
] }),
|
|
876
876
|
/* @__PURE__ */ w("div", { className: "ll-minimized__controls", children: [
|
|
877
877
|
/* @__PURE__ */ n(
|
|
@@ -907,12 +907,12 @@ const Vn = ({
|
|
|
907
907
|
] })
|
|
908
908
|
] })
|
|
909
909
|
}
|
|
910
|
-
),
|
|
910
|
+
), Jn = ({
|
|
911
911
|
src: e,
|
|
912
912
|
alt: t,
|
|
913
913
|
preCannedPlaying: r = !1,
|
|
914
|
-
className:
|
|
915
|
-
style:
|
|
914
|
+
className: o,
|
|
915
|
+
style: i
|
|
916
916
|
}) => {
|
|
917
917
|
const [l, s] = S(!1), d = E(e);
|
|
918
918
|
if (T(() => {
|
|
@@ -928,7 +928,7 @@ const Vn = ({
|
|
|
928
928
|
transition: "opacity 500ms ease, transform 500ms ease",
|
|
929
929
|
transform: r ? "scale(1.02)" : "scale(1)",
|
|
930
930
|
opacity: l ? 1 : 0,
|
|
931
|
-
...
|
|
931
|
+
...i
|
|
932
932
|
};
|
|
933
933
|
return (
|
|
934
934
|
// eslint-disable-next-line @next/next/no-img-element
|
|
@@ -937,7 +937,7 @@ const Vn = ({
|
|
|
937
937
|
{
|
|
938
938
|
src: e,
|
|
939
939
|
alt: t,
|
|
940
|
-
className:
|
|
940
|
+
className: o,
|
|
941
941
|
style: f,
|
|
942
942
|
loading: "eager",
|
|
943
943
|
fetchPriority: "high",
|
|
@@ -949,8 +949,8 @@ const Vn = ({
|
|
|
949
949
|
position: e,
|
|
950
950
|
isMobile: t,
|
|
951
951
|
agentName: r,
|
|
952
|
-
avatarImageUrl:
|
|
953
|
-
idleLoopUrl:
|
|
952
|
+
avatarImageUrl: o,
|
|
953
|
+
idleLoopUrl: i,
|
|
954
954
|
greeting: l,
|
|
955
955
|
branding: s,
|
|
956
956
|
teamMembers: d,
|
|
@@ -989,14 +989,14 @@ const Vn = ({
|
|
|
989
989
|
onToggleCamera: _e,
|
|
990
990
|
onSwitchCameraDevice: xe,
|
|
991
991
|
onToggleScreenShare: ke,
|
|
992
|
-
onToggleSpeaker:
|
|
992
|
+
onToggleSpeaker: V,
|
|
993
993
|
onSendMessage: Ue,
|
|
994
994
|
onMinimize: je,
|
|
995
995
|
onClose: Ve,
|
|
996
996
|
onClearMicError: fe
|
|
997
997
|
}) => {
|
|
998
998
|
var Ce;
|
|
999
|
-
const ae = b.length > 0 ? b[b.length - 1] : null,
|
|
999
|
+
const ae = b.length > 0 ? b[b.length - 1] : null, ie = ((d == null ? void 0 : d.length) ?? 0) > 1, Le = L === "connecting" || L === "connected", Se = L === "connected", pe = L === "idle" || L === "disconnected" || L === "error", K = E(null), Me = E(null);
|
|
1000
1000
|
T(() => {
|
|
1001
1001
|
const y = K.current;
|
|
1002
1002
|
y && (y.innerHTML = "", A && (A.style.width = "100%", A.style.height = "100%", A.style.objectFit = "cover", A.style.transform = "scaleX(-1)", y.appendChild(A)));
|
|
@@ -1040,19 +1040,19 @@ const Vn = ({
|
|
|
1040
1040
|
"aria-label": `${r} widget`,
|
|
1041
1041
|
children: [
|
|
1042
1042
|
/* @__PURE__ */ w("div", { className: "ll-expanded__bg", children: [
|
|
1043
|
-
|
|
1044
|
-
|
|
1043
|
+
o ? /* @__PURE__ */ n(
|
|
1044
|
+
Jn,
|
|
1045
1045
|
{
|
|
1046
|
-
src:
|
|
1046
|
+
src: o,
|
|
1047
1047
|
alt: r,
|
|
1048
1048
|
className: "ll-expanded__bg-img"
|
|
1049
1049
|
}
|
|
1050
1050
|
) : /* @__PURE__ */ n("div", { className: "ll-expanded__bg-fallback", children: /* @__PURE__ */ n("span", { className: "ll-expanded__bg-initial", children: ((Ce = r == null ? void 0 : r.charAt(0)) == null ? void 0 : Ce.toUpperCase()) || "A" }) }),
|
|
1051
|
-
|
|
1051
|
+
i && !Se && /* @__PURE__ */ n(
|
|
1052
1052
|
"video",
|
|
1053
1053
|
{
|
|
1054
1054
|
className: "ll-expanded__bg-idle",
|
|
1055
|
-
src:
|
|
1055
|
+
src: i,
|
|
1056
1056
|
autoPlay: !0,
|
|
1057
1057
|
loop: !0,
|
|
1058
1058
|
muted: !0,
|
|
@@ -1086,17 +1086,17 @@ const Vn = ({
|
|
|
1086
1086
|
type: "button",
|
|
1087
1087
|
className: "ll-hpill",
|
|
1088
1088
|
onClick: (y) => {
|
|
1089
|
-
|
|
1089
|
+
ie && (y.stopPropagation(), a());
|
|
1090
1090
|
},
|
|
1091
|
-
"aria-haspopup":
|
|
1092
|
-
"aria-expanded":
|
|
1091
|
+
"aria-haspopup": ie ? "listbox" : void 0,
|
|
1092
|
+
"aria-expanded": ie ? m : void 0,
|
|
1093
1093
|
children: [
|
|
1094
1094
|
/* @__PURE__ */ n("span", { className: "ll-hpill__label", children: r }),
|
|
1095
|
-
|
|
1095
|
+
ie && /* @__PURE__ */ n(Xe, {})
|
|
1096
1096
|
]
|
|
1097
1097
|
}
|
|
1098
1098
|
),
|
|
1099
|
-
|
|
1099
|
+
ie && m && /* @__PURE__ */ n(
|
|
1100
1100
|
"div",
|
|
1101
1101
|
{
|
|
1102
1102
|
className: "ll-hmenu",
|
|
@@ -1373,11 +1373,22 @@ const Vn = ({
|
|
|
1373
1373
|
{
|
|
1374
1374
|
type: "button",
|
|
1375
1375
|
className: `ll-tool ${ue ? "is-muted" : ""}`,
|
|
1376
|
-
onClick:
|
|
1376
|
+
onClick: V,
|
|
1377
1377
|
"aria-label": ue ? "Unmute speaker" : "Mute speaker",
|
|
1378
1378
|
title: ue ? "Unmute speaker" : "Mute speaker",
|
|
1379
1379
|
children: /* @__PURE__ */ n(er, { muted: ue })
|
|
1380
1380
|
}
|
|
1381
|
+
),
|
|
1382
|
+
/* @__PURE__ */ n(
|
|
1383
|
+
"button",
|
|
1384
|
+
{
|
|
1385
|
+
type: "button",
|
|
1386
|
+
className: "ll-tool ll-tool--danger",
|
|
1387
|
+
onClick: ye,
|
|
1388
|
+
"aria-label": "End conversation",
|
|
1389
|
+
title: "End conversation",
|
|
1390
|
+
children: /* @__PURE__ */ n(nr, {})
|
|
1391
|
+
}
|
|
1381
1392
|
)
|
|
1382
1393
|
] }),
|
|
1383
1394
|
We && /* @__PURE__ */ w("form", { className: "ll-message-input", onSubmit: he, children: [
|
|
@@ -1401,16 +1412,7 @@ const Vn = ({
|
|
|
1401
1412
|
children: /* @__PURE__ */ n(tr, {})
|
|
1402
1413
|
}
|
|
1403
1414
|
)
|
|
1404
|
-
] })
|
|
1405
|
-
/* @__PURE__ */ n(
|
|
1406
|
-
"button",
|
|
1407
|
-
{
|
|
1408
|
-
type: "button",
|
|
1409
|
-
className: "ll-expanded__end",
|
|
1410
|
-
onClick: ye,
|
|
1411
|
-
children: "End conversation"
|
|
1412
|
-
}
|
|
1413
|
-
)
|
|
1415
|
+
] })
|
|
1414
1416
|
] }) : null,
|
|
1415
1417
|
(() => {
|
|
1416
1418
|
if (N && L !== "error")
|
|
@@ -1494,42 +1496,51 @@ function tr() {
|
|
|
1494
1496
|
/* @__PURE__ */ n("polyline", { points: "12 5 19 12 12 19" })
|
|
1495
1497
|
] });
|
|
1496
1498
|
}
|
|
1497
|
-
|
|
1499
|
+
function nr() {
|
|
1500
|
+
return /* @__PURE__ */ n("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: /* @__PURE__ */ n(
|
|
1501
|
+
"path",
|
|
1502
|
+
{
|
|
1503
|
+
d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.93.37 1.84.71 2.7a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.38-1.38a2 2 0 0 1 2.11-.45c.86.34 1.77.58 2.7.71A2 2 0 0 1 22 16.92z",
|
|
1504
|
+
transform: "rotate(135 12 12)"
|
|
1505
|
+
}
|
|
1506
|
+
) });
|
|
1507
|
+
}
|
|
1508
|
+
const Ot = ({ label: e, devices: t, activeId: r, onPick: o }) => /* @__PURE__ */ w(
|
|
1498
1509
|
"div",
|
|
1499
1510
|
{
|
|
1500
1511
|
className: "ll-device-menu",
|
|
1501
|
-
onClick: (
|
|
1512
|
+
onClick: (i) => i.stopPropagation(),
|
|
1502
1513
|
role: "listbox",
|
|
1503
1514
|
children: [
|
|
1504
1515
|
/* @__PURE__ */ n("p", { className: "ll-device-menu__label", children: e }),
|
|
1505
|
-
t.map((
|
|
1506
|
-
const s = r ===
|
|
1516
|
+
t.map((i, l) => {
|
|
1517
|
+
const s = r === i.deviceId;
|
|
1507
1518
|
return /* @__PURE__ */ w(
|
|
1508
1519
|
"button",
|
|
1509
1520
|
{
|
|
1510
1521
|
type: "button",
|
|
1511
1522
|
className: `ll-device-menu__item ${s ? "is-active" : ""}`,
|
|
1512
|
-
onClick: () => i
|
|
1523
|
+
onClick: () => o(i.deviceId),
|
|
1513
1524
|
role: "option",
|
|
1514
1525
|
"aria-selected": s,
|
|
1515
1526
|
children: [
|
|
1516
1527
|
s && /* @__PURE__ */ n("span", { className: "ll-device-menu__dot", children: "●" }),
|
|
1517
|
-
/* @__PURE__ */ n("span", { className: "ll-device-menu__name", children:
|
|
1528
|
+
/* @__PURE__ */ n("span", { className: "ll-device-menu__name", children: i.label || `${e} ${l + 1}` })
|
|
1518
1529
|
]
|
|
1519
1530
|
},
|
|
1520
|
-
|
|
1531
|
+
i.deviceId || l
|
|
1521
1532
|
);
|
|
1522
1533
|
})
|
|
1523
1534
|
]
|
|
1524
1535
|
}
|
|
1525
|
-
),
|
|
1536
|
+
), rr = [
|
|
1526
1537
|
'[data-ll-private="true"]',
|
|
1527
1538
|
".ll-widget"
|
|
1528
1539
|
];
|
|
1529
1540
|
function pt(e) {
|
|
1530
1541
|
let t = e;
|
|
1531
1542
|
for (; t; ) {
|
|
1532
|
-
for (const r of
|
|
1543
|
+
for (const r of rr)
|
|
1533
1544
|
if (t.matches(r)) return !0;
|
|
1534
1545
|
t = t.parentElement;
|
|
1535
1546
|
}
|
|
@@ -1544,7 +1555,7 @@ function tt(e) {
|
|
|
1544
1555
|
}
|
|
1545
1556
|
return !0;
|
|
1546
1557
|
}
|
|
1547
|
-
const Qe = 4096,
|
|
1558
|
+
const Qe = 4096, or = 20, ir = 20, lr = 10, ar = 10, cr = 30, qt = 500, sr = [
|
|
1548
1559
|
'[data-ll-private="true"]',
|
|
1549
1560
|
".ll-widget",
|
|
1550
1561
|
"script",
|
|
@@ -1556,7 +1567,7 @@ function He(e) {
|
|
|
1556
1567
|
if (e.getAttribute("aria-hidden") === "true" || e.hasAttribute("hidden")) return !0;
|
|
1557
1568
|
let t = e;
|
|
1558
1569
|
for (; t; ) {
|
|
1559
|
-
for (const r of
|
|
1570
|
+
for (const r of sr)
|
|
1560
1571
|
if (t.matches(r)) return !0;
|
|
1561
1572
|
t = t.parentElement;
|
|
1562
1573
|
}
|
|
@@ -1566,8 +1577,8 @@ function Oe(e) {
|
|
|
1566
1577
|
if (typeof window > "u") return !0;
|
|
1567
1578
|
const t = e.getBoundingClientRect();
|
|
1568
1579
|
if (t.width <= 0 || t.height <= 0) return !1;
|
|
1569
|
-
const r = window.innerHeight || document.documentElement.clientHeight,
|
|
1570
|
-
return t.bottom > 0 && t.right > 0 && t.top < r && t.left <
|
|
1580
|
+
const r = window.innerHeight || document.documentElement.clientHeight, o = window.innerWidth || document.documentElement.clientWidth;
|
|
1581
|
+
return t.bottom > 0 && t.right > 0 && t.top < r && t.left < o;
|
|
1571
1582
|
}
|
|
1572
1583
|
function Bt(e) {
|
|
1573
1584
|
const t = e.getAttribute("id");
|
|
@@ -1577,10 +1588,10 @@ function Bt(e) {
|
|
|
1577
1588
|
}
|
|
1578
1589
|
const r = e.getAttribute("aria-label");
|
|
1579
1590
|
if (r) return r.trim();
|
|
1580
|
-
const
|
|
1581
|
-
if (
|
|
1582
|
-
const
|
|
1583
|
-
return
|
|
1591
|
+
const o = e.getAttribute("placeholder");
|
|
1592
|
+
if (o) return o.trim();
|
|
1593
|
+
const i = e.closest("label");
|
|
1594
|
+
return i != null && i.textContent ? i.textContent.trim() : "";
|
|
1584
1595
|
}
|
|
1585
1596
|
function me(e, t) {
|
|
1586
1597
|
return e.length <= t ? e : e.slice(0, t - 1) + "…";
|
|
@@ -1588,7 +1599,7 @@ function me(e, t) {
|
|
|
1588
1599
|
function Ae(e) {
|
|
1589
1600
|
return e.length;
|
|
1590
1601
|
}
|
|
1591
|
-
function
|
|
1602
|
+
function dr(e, t = {}) {
|
|
1592
1603
|
const r = t.doc ?? (typeof document < "u" ? document : null);
|
|
1593
1604
|
if (!r)
|
|
1594
1605
|
return {
|
|
@@ -1602,11 +1613,11 @@ function sr(e, t = {}) {
|
|
|
1602
1613
|
forms: [],
|
|
1603
1614
|
extras: e
|
|
1604
1615
|
};
|
|
1605
|
-
const
|
|
1616
|
+
const o = typeof window < "u" && window.location.href || "", i = typeof window < "u" && window.location.pathname || "/", l = r.title || "", s = Array.from(
|
|
1606
1617
|
r.querySelectorAll("[data-ll-region]")
|
|
1607
1618
|
), d = [];
|
|
1608
1619
|
for (const p of s) {
|
|
1609
|
-
if (d.length >=
|
|
1620
|
+
if (d.length >= lr) break;
|
|
1610
1621
|
if (He(p) || !Oe(p)) continue;
|
|
1611
1622
|
const N = p.getAttribute("data-ll-region") ?? "", B = p.getAttribute("data-ll-intent") ?? void 0, D = me(
|
|
1612
1623
|
(p.innerText || p.textContent || "").trim(),
|
|
@@ -1631,7 +1642,7 @@ function sr(e, t = {}) {
|
|
|
1631
1642
|
const c = f.join(`
|
|
1632
1643
|
`), R = [], C = Array.from(r.querySelectorAll("a[href]"));
|
|
1633
1644
|
for (const p of C) {
|
|
1634
|
-
if (R.length >=
|
|
1645
|
+
if (R.length >= or) break;
|
|
1635
1646
|
if (He(p) || !Oe(p)) continue;
|
|
1636
1647
|
const N = p.getAttribute("href") || "", B = (p.textContent || "").trim();
|
|
1637
1648
|
!N || !B || R.push({ href: N, text: me(B, 100) });
|
|
@@ -1651,7 +1662,7 @@ function sr(e, t = {}) {
|
|
|
1651
1662
|
r.querySelectorAll("[data-ll-form]")
|
|
1652
1663
|
), z = [];
|
|
1653
1664
|
for (const p of b) {
|
|
1654
|
-
if (z.length >=
|
|
1665
|
+
if (z.length >= ar) break;
|
|
1655
1666
|
if (pt(p)) continue;
|
|
1656
1667
|
const N = p.getAttribute("data-ll-form") || "";
|
|
1657
1668
|
if (!N) continue;
|
|
@@ -1661,7 +1672,7 @@ function sr(e, t = {}) {
|
|
|
1661
1672
|
)
|
|
1662
1673
|
), A = [];
|
|
1663
1674
|
for (const O of D) {
|
|
1664
|
-
if (A.length >=
|
|
1675
|
+
if (A.length >= cr) break;
|
|
1665
1676
|
if (!tt(O)) continue;
|
|
1666
1677
|
const W = O.getAttribute("data-ll-field") || "";
|
|
1667
1678
|
if (!W) continue;
|
|
@@ -1671,9 +1682,9 @@ function sr(e, t = {}) {
|
|
|
1671
1682
|
z.push({ id: N, intent: B, fields: A });
|
|
1672
1683
|
}
|
|
1673
1684
|
const I = {
|
|
1674
|
-
url:
|
|
1685
|
+
url: o,
|
|
1675
1686
|
title: l,
|
|
1676
|
-
pathname:
|
|
1687
|
+
pathname: i,
|
|
1677
1688
|
regions: d,
|
|
1678
1689
|
visibleText: c,
|
|
1679
1690
|
visibleLinks: R,
|
|
@@ -1690,17 +1701,17 @@ function sr(e, t = {}) {
|
|
|
1690
1701
|
}
|
|
1691
1702
|
let Re = null;
|
|
1692
1703
|
function Wt(e, t = {}) {
|
|
1693
|
-
const r = Date.now(),
|
|
1694
|
-
if (Re && Re.key ===
|
|
1704
|
+
const r = Date.now(), i = `${typeof window < "u" && window.location.pathname || "/"}::${typeof window < "u" ? window.scrollY : 0}`;
|
|
1705
|
+
if (Re && Re.key === i && r - Re.at < 1e3)
|
|
1695
1706
|
return Re.ctx;
|
|
1696
|
-
const l =
|
|
1697
|
-
return Re = { key:
|
|
1707
|
+
const l = dr(e, t);
|
|
1708
|
+
return Re = { key: i, at: r, ctx: l }, l;
|
|
1698
1709
|
}
|
|
1699
|
-
function
|
|
1710
|
+
function ur() {
|
|
1700
1711
|
Re = null;
|
|
1701
1712
|
}
|
|
1702
|
-
const
|
|
1703
|
-
function
|
|
1713
|
+
const fr = 200;
|
|
1714
|
+
function pr(e) {
|
|
1704
1715
|
const t = String(e.href || "");
|
|
1705
1716
|
return {
|
|
1706
1717
|
href: t,
|
|
@@ -1710,18 +1721,18 @@ function fr(e) {
|
|
|
1710
1721
|
description: e.description
|
|
1711
1722
|
};
|
|
1712
1723
|
}
|
|
1713
|
-
function
|
|
1724
|
+
function hr(e) {
|
|
1714
1725
|
return !(!e || e.startsWith("#") || e.startsWith("javascript:") || e.startsWith("mailto:") || e.startsWith("tel:"));
|
|
1715
1726
|
}
|
|
1716
|
-
function
|
|
1727
|
+
function mr(e) {
|
|
1717
1728
|
const t = e ?? (typeof document < "u" ? document : null);
|
|
1718
1729
|
if (!t) return [];
|
|
1719
|
-
const r = typeof window < "u" && window.location.origin || "",
|
|
1730
|
+
const r = typeof window < "u" && window.location.origin || "", o = /* @__PURE__ */ new Set(), i = [], l = Array.from(t.querySelectorAll("a[href]"));
|
|
1720
1731
|
for (const s of l) {
|
|
1721
|
-
if (
|
|
1732
|
+
if (i.length >= fr) break;
|
|
1722
1733
|
if (pt(s)) continue;
|
|
1723
1734
|
const d = s.getAttribute("href") || "";
|
|
1724
|
-
if (!
|
|
1735
|
+
if (!hr(d)) continue;
|
|
1725
1736
|
let f = d, g = !0;
|
|
1726
1737
|
try {
|
|
1727
1738
|
if (typeof window < "u") {
|
|
@@ -1731,42 +1742,42 @@ function hr(e) {
|
|
|
1731
1742
|
} catch {
|
|
1732
1743
|
continue;
|
|
1733
1744
|
}
|
|
1734
|
-
if (
|
|
1735
|
-
|
|
1745
|
+
if (o.has(f)) continue;
|
|
1746
|
+
o.add(f);
|
|
1736
1747
|
const m = (s.textContent || "").trim().slice(0, 120);
|
|
1737
|
-
|
|
1748
|
+
i.push({ href: f, text: m, internal: g });
|
|
1738
1749
|
}
|
|
1739
|
-
return
|
|
1750
|
+
return i;
|
|
1740
1751
|
}
|
|
1741
1752
|
let Ie = null;
|
|
1742
|
-
const
|
|
1753
|
+
const gr = 5e3;
|
|
1743
1754
|
function st() {
|
|
1744
1755
|
const e = Date.now(), t = typeof window < "u" && window.location.pathname || "/";
|
|
1745
|
-
if (Ie && Ie.pathname === t && e - Ie.at <
|
|
1756
|
+
if (Ie && Ie.pathname === t && e - Ie.at < gr)
|
|
1746
1757
|
return Ie.routes;
|
|
1747
|
-
const r =
|
|
1758
|
+
const r = mr();
|
|
1748
1759
|
return Ie = { at: e, pathname: t, routes: r }, r;
|
|
1749
1760
|
}
|
|
1750
|
-
function
|
|
1761
|
+
function yr() {
|
|
1751
1762
|
Ie = null;
|
|
1752
1763
|
}
|
|
1753
|
-
function
|
|
1754
|
-
const r = e instanceof HTMLInputElement ? HTMLInputElement.prototype : e instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLSelectElement.prototype,
|
|
1755
|
-
|
|
1764
|
+
function vr(e, t) {
|
|
1765
|
+
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;
|
|
1766
|
+
i ? i.call(e, t) : e.value = t;
|
|
1756
1767
|
}
|
|
1757
|
-
function
|
|
1758
|
-
const
|
|
1768
|
+
function br(e, t, r = {}) {
|
|
1769
|
+
const o = r.triggerInput ?? !0, i = r.triggerChange ?? !0;
|
|
1759
1770
|
if (e instanceof HTMLInputElement && (e.type === "checkbox" || e.type === "radio")) {
|
|
1760
1771
|
const l = Object.getOwnPropertyDescriptor(
|
|
1761
1772
|
HTMLInputElement.prototype,
|
|
1762
1773
|
"checked"
|
|
1763
1774
|
), s = l == null ? void 0 : l.set, d = t === "true" || t === "1" || t === "on";
|
|
1764
|
-
s ? s.call(e, d) : e.checked = d,
|
|
1775
|
+
s ? s.call(e, d) : e.checked = d, o && e.dispatchEvent(new Event("input", { bubbles: !0 })), i && e.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
1765
1776
|
return;
|
|
1766
1777
|
}
|
|
1767
|
-
|
|
1778
|
+
vr(e, t), o && e.dispatchEvent(new Event("input", { bubbles: !0 })), i && e.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
1768
1779
|
}
|
|
1769
|
-
function
|
|
1780
|
+
function wr() {
|
|
1770
1781
|
if (typeof window > "u" || typeof document > "u")
|
|
1771
1782
|
return !1;
|
|
1772
1783
|
const e = document.scrollingElement || document.documentElement;
|
|
@@ -1774,44 +1785,44 @@ function br() {
|
|
|
1774
1785
|
const t = window.getComputedStyle(e);
|
|
1775
1786
|
return !(t.overflowY === "hidden" || t.overflowY === "clip");
|
|
1776
1787
|
}
|
|
1777
|
-
function
|
|
1788
|
+
function _r(e) {
|
|
1778
1789
|
if (!(e instanceof HTMLElement)) return !1;
|
|
1779
1790
|
const r = window.getComputedStyle(e).overflowY;
|
|
1780
1791
|
return !(r !== "auto" && r !== "scroll" || e.scrollHeight <= e.clientHeight + 2);
|
|
1781
1792
|
}
|
|
1782
|
-
function
|
|
1793
|
+
function xr() {
|
|
1783
1794
|
if (typeof document > "u") return null;
|
|
1784
1795
|
const e = Array.from(
|
|
1785
1796
|
document.querySelectorAll("body, body *")
|
|
1786
1797
|
);
|
|
1787
1798
|
let t = null, r = 0;
|
|
1788
|
-
for (const
|
|
1789
|
-
if (!
|
|
1790
|
-
const
|
|
1791
|
-
if (
|
|
1792
|
-
const l =
|
|
1793
|
-
l > r && (r = l, t =
|
|
1799
|
+
for (const o of e) {
|
|
1800
|
+
if (!_r(o)) continue;
|
|
1801
|
+
const i = o.getBoundingClientRect();
|
|
1802
|
+
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;
|
|
1803
|
+
const l = i.width * i.height;
|
|
1804
|
+
l > r && (r = l, t = o);
|
|
1794
1805
|
}
|
|
1795
1806
|
return t;
|
|
1796
1807
|
}
|
|
1797
|
-
function
|
|
1808
|
+
function kr() {
|
|
1798
1809
|
if (typeof window > "u")
|
|
1799
1810
|
return null;
|
|
1800
|
-
if (
|
|
1801
|
-
const e =
|
|
1811
|
+
if (wr()) return window;
|
|
1812
|
+
const e = xr();
|
|
1802
1813
|
return e || window;
|
|
1803
1814
|
}
|
|
1804
1815
|
function Ft(e) {
|
|
1805
1816
|
return e instanceof Window ? e.innerHeight || 0 : e.clientHeight || 0;
|
|
1806
1817
|
}
|
|
1807
|
-
function
|
|
1818
|
+
function Lr(e) {
|
|
1808
1819
|
var t, r;
|
|
1809
1820
|
return e instanceof Window ? typeof document > "u" ? 0 : Math.max(
|
|
1810
1821
|
((t = document.body) == null ? void 0 : t.scrollHeight) ?? 0,
|
|
1811
1822
|
((r = document.documentElement) == null ? void 0 : r.scrollHeight) ?? 0
|
|
1812
1823
|
) : e.scrollHeight - e.clientHeight;
|
|
1813
1824
|
}
|
|
1814
|
-
const
|
|
1825
|
+
const Sr = /* @__PURE__ */ new Set([
|
|
1815
1826
|
"agent_state",
|
|
1816
1827
|
"avatar_stream_ready",
|
|
1817
1828
|
"avatar_active",
|
|
@@ -1834,13 +1845,13 @@ const Lr = /* @__PURE__ */ new Set([
|
|
|
1834
1845
|
"submit_form",
|
|
1835
1846
|
"request_routes"
|
|
1836
1847
|
]);
|
|
1837
|
-
function
|
|
1848
|
+
function Cr(e) {
|
|
1838
1849
|
var wt, _t, xt, kt, Lt, St, Ct;
|
|
1839
1850
|
const {
|
|
1840
1851
|
agentId: t,
|
|
1841
1852
|
apiKey: r,
|
|
1842
|
-
baseUrl:
|
|
1843
|
-
sessionEndpoint:
|
|
1853
|
+
baseUrl: o = "https://app.livelayer.studio",
|
|
1854
|
+
sessionEndpoint: i,
|
|
1844
1855
|
sessionBody: l,
|
|
1845
1856
|
autoConnect: s = !1,
|
|
1846
1857
|
displayMode: d,
|
|
@@ -1879,30 +1890,18 @@ function Sr(e) {
|
|
|
1879
1890
|
onConnectionStateChange: _e,
|
|
1880
1891
|
onAgentEvent: xe,
|
|
1881
1892
|
onAgentCommand: ke,
|
|
1882
|
-
controlledSession:
|
|
1893
|
+
controlledSession: V,
|
|
1883
1894
|
className: Ue,
|
|
1884
1895
|
style: je,
|
|
1885
1896
|
zIndex: Ve = 2147483647
|
|
1886
1897
|
} = e, fe = Tn(W), ae = qn(fe, A, O);
|
|
1887
1898
|
T(() => {
|
|
1888
|
-
|
|
1889
|
-
}, [fe])
|
|
1890
|
-
|
|
1891
|
-
if (!fe) return;
|
|
1892
|
-
const h = (J = V.getRoom) == null ? void 0 : J.call(V), u = h == null ? void 0 : h.localParticipant;
|
|
1893
|
-
if (u != null && u.publishData)
|
|
1894
|
-
try {
|
|
1895
|
-
const Ee = new TextEncoder().encode(
|
|
1896
|
-
JSON.stringify({ type: "pathname", pathname: fe })
|
|
1897
|
-
);
|
|
1898
|
-
u.publishData(Ee, { reliable: !0 });
|
|
1899
|
-
} catch {
|
|
1900
|
-
}
|
|
1901
|
-
}, [fe, V]);
|
|
1902
|
-
const oe = L !== void 0, [Le, Se] = S(() => {
|
|
1899
|
+
ur(), yr();
|
|
1900
|
+
}, [fe]);
|
|
1901
|
+
const ie = L !== void 0, [Le, Se] = S(() => {
|
|
1903
1902
|
var h;
|
|
1904
1903
|
return L ?? ((h = C == null ? void 0 : C[0]) == null ? void 0 : h.id);
|
|
1905
|
-
}), pe =
|
|
1904
|
+
}), pe = ie ? L : Le, K = Ze(
|
|
1906
1905
|
() => (C == null ? void 0 : C.find((h) => h.id === pe)) ?? null,
|
|
1907
1906
|
[C, pe]
|
|
1908
1907
|
), Me = (K == null ? void 0 : K.agentId) ?? t, [ne, ee] = An({
|
|
@@ -1911,8 +1910,8 @@ function Sr(e) {
|
|
|
1911
1910
|
onChange: g,
|
|
1912
1911
|
persistKey: c,
|
|
1913
1912
|
disablePersistence: R
|
|
1914
|
-
}), le = In(a), ce = yn(), Z = vn(), re = wn(), he = _n(), Te = xn(), [Ye, Pe] = S(!1), [Ce, y] = S(!1), [X,
|
|
1915
|
-
rt.current = Y,
|
|
1913
|
+
}), le = In(a), ce = yn(), Z = vn(), re = wn(), he = _n(), Te = xn(), [Ye, Pe] = S(!1), [Ce, y] = S(!1), [X, Ge] = S(!1), [Yt, Gt] = S(!1), [nt, Jt] = S(!1), rt = E(Y), ot = E(te), it = E(We), lt = E(Fe), ht = E(ue), mt = E(qe), gt = E(Be), at = E(ge), oe = E(null);
|
|
1914
|
+
rt.current = Y, ot.current = te, it.current = We, lt.current = Fe, ht.current = ue, mt.current = qe, gt.current = Be, at.current = ge;
|
|
1916
1915
|
function se(h) {
|
|
1917
1916
|
const u = at.current;
|
|
1918
1917
|
return u ? u.includes(h) : !0;
|
|
@@ -1924,7 +1923,7 @@ function Sr(e) {
|
|
|
1924
1923
|
}
|
|
1925
1924
|
const De = k(
|
|
1926
1925
|
(h) => {
|
|
1927
|
-
var
|
|
1926
|
+
var G, Ee, Ke, Et;
|
|
1928
1927
|
const u = h;
|
|
1929
1928
|
if (!(!u.type || typeof u.type != "string")) {
|
|
1930
1929
|
if (xe == null || xe({ eventName: u.type, data: h }), u.type === "navigate") {
|
|
@@ -1978,9 +1977,9 @@ function Sr(e) {
|
|
|
1978
1977
|
const x = typeof u.selector == "string" ? u.selector : null;
|
|
1979
1978
|
if (!x) return;
|
|
1980
1979
|
const M = u.behavior === "instant" ? "instant" : "smooth";
|
|
1981
|
-
if (
|
|
1980
|
+
if (ot.current) {
|
|
1982
1981
|
try {
|
|
1983
|
-
|
|
1982
|
+
ot.current(
|
|
1984
1983
|
x,
|
|
1985
1984
|
M
|
|
1986
1985
|
);
|
|
@@ -2017,21 +2016,21 @@ function Sr(e) {
|
|
|
2017
2016
|
de("request_page_context", "read_page");
|
|
2018
2017
|
return;
|
|
2019
2018
|
}
|
|
2020
|
-
const x = typeof u.requestId == "string" ? u.requestId : void 0, M = (
|
|
2021
|
-
const P = M,
|
|
2022
|
-
if (
|
|
2019
|
+
const x = typeof u.requestId == "string" ? u.requestId : void 0, M = (G = oe.current) == null ? void 0 : G.call(oe), q = (j) => {
|
|
2020
|
+
const P = M, J = P == null ? void 0 : P.localParticipant;
|
|
2021
|
+
if (J != null && J.publishData)
|
|
2023
2022
|
try {
|
|
2024
|
-
const Q = x ? { ...
|
|
2025
|
-
|
|
2023
|
+
const Q = x ? { ...j, requestId: x } : j, Ne = new TextEncoder().encode(JSON.stringify(Q));
|
|
2024
|
+
J.publishData(Ne, { reliable: !0 });
|
|
2026
2025
|
} catch (Q) {
|
|
2027
2026
|
console.warn("[LiveLayer] publishData failed.", Q);
|
|
2028
2027
|
}
|
|
2029
2028
|
}, $ = mt.current, F = ht.current;
|
|
2030
2029
|
try {
|
|
2031
2030
|
if (F) {
|
|
2032
|
-
const
|
|
2033
|
-
if (
|
|
2034
|
-
q({ type: "page_context_pending" }),
|
|
2031
|
+
const j = F($);
|
|
2032
|
+
if (j instanceof Promise) {
|
|
2033
|
+
q({ type: "page_context_pending" }), j.then((P) => q({ type: "page_context", context: P })).catch((P) => {
|
|
2035
2034
|
console.warn(
|
|
2036
2035
|
"[LiveLayer] getPageContext rejected; falling back to default walker.",
|
|
2037
2036
|
P
|
|
@@ -2042,17 +2041,17 @@ function Sr(e) {
|
|
|
2042
2041
|
});
|
|
2043
2042
|
return;
|
|
2044
2043
|
}
|
|
2045
|
-
q({ type: "page_context", context:
|
|
2044
|
+
q({ type: "page_context", context: j });
|
|
2046
2045
|
return;
|
|
2047
2046
|
}
|
|
2048
2047
|
q({
|
|
2049
2048
|
type: "page_context",
|
|
2050
2049
|
context: Wt($)
|
|
2051
2050
|
});
|
|
2052
|
-
} catch (
|
|
2051
|
+
} catch (j) {
|
|
2053
2052
|
console.warn(
|
|
2054
2053
|
"[LiveLayer] page-context extraction threw. Sending empty context.",
|
|
2055
|
-
|
|
2054
|
+
j
|
|
2056
2055
|
), q({
|
|
2057
2056
|
type: "page_context",
|
|
2058
2057
|
context: { url: "", title: "", pathname: "/", regions: [], visibleText: "", visibleLinks: [], visibleFields: [], forms: [], extras: $ }
|
|
@@ -2073,9 +2072,9 @@ function Sr(e) {
|
|
|
2073
2072
|
return;
|
|
2074
2073
|
}
|
|
2075
2074
|
const M = u.behavior === "instant" ? "instant" : "smooth";
|
|
2076
|
-
if (
|
|
2075
|
+
if (it.current) {
|
|
2077
2076
|
try {
|
|
2078
|
-
|
|
2077
|
+
it.current(
|
|
2079
2078
|
x,
|
|
2080
2079
|
M
|
|
2081
2080
|
);
|
|
@@ -2085,12 +2084,12 @@ function Sr(e) {
|
|
|
2085
2084
|
return;
|
|
2086
2085
|
}
|
|
2087
2086
|
if (typeof window > "u") return;
|
|
2088
|
-
const q = { behavior: M }, $ =
|
|
2087
|
+
const q = { behavior: M }, $ = kr(), F = (P) => {
|
|
2089
2088
|
$ instanceof Window ? $.scrollBy({ top: P, ...q }) : $.scrollBy({ top: P, ...q });
|
|
2090
|
-
},
|
|
2089
|
+
}, j = (P) => {
|
|
2091
2090
|
$ instanceof Window ? $.scrollTo({ top: P, ...q }) : $.scrollTo({ top: P, ...q });
|
|
2092
2091
|
};
|
|
2093
|
-
x === "up" ? F(-Ft($)) : x === "down" ? F(Ft($)) :
|
|
2092
|
+
x === "up" ? F(-Ft($)) : x === "down" ? F(Ft($)) : j(x === "top" ? 0 : Lr($));
|
|
2094
2093
|
return;
|
|
2095
2094
|
}
|
|
2096
2095
|
if (u.type === "click") {
|
|
@@ -2191,21 +2190,21 @@ function Sr(e) {
|
|
|
2191
2190
|
}
|
|
2192
2191
|
for (const [$, F] of Object.entries(q)) {
|
|
2193
2192
|
if (typeof F != "string") continue;
|
|
2194
|
-
const
|
|
2195
|
-
if (!
|
|
2193
|
+
const j = M.querySelector(`[data-ll-field="${$.replace(/"/g, '\\"')}"]`);
|
|
2194
|
+
if (!j) {
|
|
2196
2195
|
console.warn(
|
|
2197
2196
|
`[LiveLayer] fill_form: no field "${$}" in form "${x}". Skipping.`
|
|
2198
2197
|
);
|
|
2199
2198
|
continue;
|
|
2200
2199
|
}
|
|
2201
|
-
if (!tt(
|
|
2200
|
+
if (!tt(j)) {
|
|
2202
2201
|
console.warn(
|
|
2203
2202
|
`[LiveLayer] fill_form: field "${$}" is privacy-protected (password / cc-* / private). Skipping.`
|
|
2204
2203
|
);
|
|
2205
2204
|
continue;
|
|
2206
2205
|
}
|
|
2207
2206
|
try {
|
|
2208
|
-
|
|
2207
|
+
br(j, F);
|
|
2209
2208
|
} catch (P) {
|
|
2210
2209
|
console.warn(
|
|
2211
2210
|
`[LiveLayer] fill_form: failed to set "${$}".`,
|
|
@@ -2241,24 +2240,24 @@ function Sr(e) {
|
|
|
2241
2240
|
);
|
|
2242
2241
|
return;
|
|
2243
2242
|
}
|
|
2244
|
-
const q = typeof u.requestId == "string" ? u.requestId : void 0, $ = (Ke =
|
|
2243
|
+
const q = typeof u.requestId == "string" ? u.requestId : void 0, $ = (Ke = oe.current) == null ? void 0 : Ke.call(oe), F = (J) => {
|
|
2245
2244
|
const Q = $, Ne = Q == null ? void 0 : Q.localParticipant;
|
|
2246
2245
|
if (Ne != null && Ne.publishData)
|
|
2247
2246
|
try {
|
|
2248
|
-
const cn = q ? { ...
|
|
2247
|
+
const cn = q ? { ...J, requestId: q } : J, sn = new TextEncoder().encode(JSON.stringify(cn));
|
|
2249
2248
|
Ne.publishData(sn, { reliable: !0 });
|
|
2250
2249
|
} catch {
|
|
2251
2250
|
}
|
|
2252
2251
|
};
|
|
2253
|
-
let
|
|
2252
|
+
let j = !1;
|
|
2254
2253
|
const P = () => {
|
|
2255
|
-
|
|
2254
|
+
j = !0, F({ type: "form_submitted", formId: x });
|
|
2256
2255
|
};
|
|
2257
2256
|
M.addEventListener("submit", P, { once: !0 });
|
|
2258
2257
|
try {
|
|
2259
2258
|
typeof M.requestSubmit == "function" ? M.requestSubmit() : M.submit();
|
|
2260
|
-
} catch (
|
|
2261
|
-
console.warn("[LiveLayer] submit_form: requestSubmit threw.",
|
|
2259
|
+
} catch (J) {
|
|
2260
|
+
console.warn("[LiveLayer] submit_form: requestSubmit threw.", J), M.removeEventListener("submit", P), F({
|
|
2262
2261
|
type: "form_submit_blocked",
|
|
2263
2262
|
formId: x,
|
|
2264
2263
|
reason: "exception"
|
|
@@ -2266,7 +2265,7 @@ function Sr(e) {
|
|
|
2266
2265
|
return;
|
|
2267
2266
|
}
|
|
2268
2267
|
setTimeout(() => {
|
|
2269
|
-
|
|
2268
|
+
j || (M.removeEventListener("submit", P), F({
|
|
2270
2269
|
type: "form_submit_blocked",
|
|
2271
2270
|
formId: x,
|
|
2272
2271
|
reason: "validation"
|
|
@@ -2279,31 +2278,31 @@ function Sr(e) {
|
|
|
2279
2278
|
de("request_routes", "read_page");
|
|
2280
2279
|
return;
|
|
2281
2280
|
}
|
|
2282
|
-
const x = typeof u.requestId == "string" ? u.requestId : void 0, q = (Et =
|
|
2281
|
+
const x = typeof u.requestId == "string" ? u.requestId : void 0, q = (Et = oe.current) == null ? void 0 : Et.call(oe), $ = q == null ? void 0 : q.localParticipant;
|
|
2283
2282
|
if (!($ != null && $.publishData)) return;
|
|
2284
2283
|
const F = (P) => {
|
|
2285
2284
|
try {
|
|
2286
|
-
const
|
|
2285
|
+
const J = x ? { type: "routes", routes: P, requestId: x } : { type: "routes", routes: P }, Q = new TextEncoder().encode(JSON.stringify(J));
|
|
2287
2286
|
$.publishData(Q, { reliable: !0 });
|
|
2288
|
-
} catch (
|
|
2289
|
-
console.warn("[LiveLayer] request_routes: publishData failed.",
|
|
2287
|
+
} catch (J) {
|
|
2288
|
+
console.warn("[LiveLayer] request_routes: publishData failed.", J);
|
|
2290
2289
|
}
|
|
2291
|
-
},
|
|
2292
|
-
if (
|
|
2290
|
+
}, j = gt.current;
|
|
2291
|
+
if (j) {
|
|
2293
2292
|
try {
|
|
2294
|
-
const P =
|
|
2293
|
+
const P = j(), J = (Q) => {
|
|
2295
2294
|
if (!Array.isArray(Q)) {
|
|
2296
2295
|
F([]);
|
|
2297
2296
|
return;
|
|
2298
2297
|
}
|
|
2299
|
-
F(Q.map(
|
|
2298
|
+
F(Q.map(pr).slice(0, 200));
|
|
2300
2299
|
};
|
|
2301
|
-
P instanceof Promise ? P.then(
|
|
2300
|
+
P instanceof Promise ? P.then(J).catch((Q) => {
|
|
2302
2301
|
console.warn(
|
|
2303
2302
|
"[LiveLayer] getRoutes rejected; falling back to DOM walker.",
|
|
2304
2303
|
Q
|
|
2305
2304
|
), F(st());
|
|
2306
|
-
}) :
|
|
2305
|
+
}) : J(P);
|
|
2307
2306
|
} catch (P) {
|
|
2308
2307
|
console.warn(
|
|
2309
2308
|
"[LiveLayer] getRoutes threw; falling back to DOM walker.",
|
|
@@ -2319,28 +2318,40 @@ function Sr(e) {
|
|
|
2319
2318
|
}
|
|
2320
2319
|
return;
|
|
2321
2320
|
}
|
|
2322
|
-
|
|
2321
|
+
Sr.has(u.type) || ke == null || ke(u);
|
|
2323
2322
|
}
|
|
2324
2323
|
},
|
|
2325
2324
|
[ke, xe]
|
|
2326
|
-
),
|
|
2327
|
-
agentId:
|
|
2328
|
-
baseUrl:
|
|
2325
|
+
), U = gn({
|
|
2326
|
+
agentId: V ? "__controlled__" : Me,
|
|
2327
|
+
baseUrl: o,
|
|
2329
2328
|
apiKey: r,
|
|
2330
|
-
sessionEndpoint:
|
|
2329
|
+
sessionEndpoint: i,
|
|
2331
2330
|
sessionBody: l,
|
|
2332
|
-
onDataMessage:
|
|
2331
|
+
onDataMessage: V ? void 0 : De
|
|
2333
2332
|
});
|
|
2334
2333
|
T(() => {
|
|
2335
|
-
if (
|
|
2336
|
-
return
|
|
2337
|
-
}, [
|
|
2334
|
+
if (V != null && V.subscribeToDataMessages)
|
|
2335
|
+
return V.subscribeToDataMessages(De);
|
|
2336
|
+
}, [V, De]), oe.current = () => {
|
|
2338
2337
|
var h;
|
|
2339
|
-
return (h =
|
|
2338
|
+
return (h = U.getRoom) == null ? void 0 : h.call(U);
|
|
2340
2339
|
}, T(() => {
|
|
2341
|
-
var
|
|
2340
|
+
var G;
|
|
2341
|
+
if (!fe) return;
|
|
2342
|
+
const h = (G = U.getRoom) == null ? void 0 : G.call(U), u = h == null ? void 0 : h.localParticipant;
|
|
2343
|
+
if (u != null && u.publishData)
|
|
2344
|
+
try {
|
|
2345
|
+
const Ee = new TextEncoder().encode(
|
|
2346
|
+
JSON.stringify({ type: "pathname", pathname: fe })
|
|
2347
|
+
);
|
|
2348
|
+
u.publishData(Ee, { reliable: !0 });
|
|
2349
|
+
} catch {
|
|
2350
|
+
}
|
|
2351
|
+
}, [fe, U, U.connectionState]), T(() => {
|
|
2352
|
+
var G;
|
|
2342
2353
|
if (typeof window > "u") return;
|
|
2343
|
-
const h = ((
|
|
2354
|
+
const h = ((G = window.location) == null ? void 0 : G.hostname) || "";
|
|
2344
2355
|
if (h === "localhost" || h === "127.0.0.1" || h === "0.0.0.0" || h.endsWith(".local") || h.endsWith(".test"))
|
|
2345
2356
|
return window.__livelayerSimulateCommand = (Ee) => {
|
|
2346
2357
|
try {
|
|
@@ -2352,38 +2363,38 @@ function Sr(e) {
|
|
|
2352
2363
|
delete window.__livelayerSimulateCommand;
|
|
2353
2364
|
};
|
|
2354
2365
|
}, [De]);
|
|
2355
|
-
const _ = Ze(() =>
|
|
2356
|
-
connectionState:
|
|
2357
|
-
agentState:
|
|
2358
|
-
transcript:
|
|
2359
|
-
videoElement:
|
|
2360
|
-
audioElement:
|
|
2361
|
-
canResume:
|
|
2362
|
-
error:
|
|
2366
|
+
const _ = Ze(() => V ? {
|
|
2367
|
+
connectionState: V.connectionState,
|
|
2368
|
+
agentState: V.agentState,
|
|
2369
|
+
transcript: V.transcript,
|
|
2370
|
+
videoElement: V.videoElement,
|
|
2371
|
+
audioElement: V.audioElement,
|
|
2372
|
+
canResume: V.canResume,
|
|
2373
|
+
error: V.error,
|
|
2363
2374
|
agentConfig: null,
|
|
2364
2375
|
connect: async () => {
|
|
2365
|
-
await
|
|
2376
|
+
await V.onConnect();
|
|
2366
2377
|
},
|
|
2367
|
-
disconnect: () =>
|
|
2378
|
+
disconnect: () => V.onDisconnect(),
|
|
2368
2379
|
// Dummy getRoom for shape compatibility — controlled consumers own the Room.
|
|
2369
2380
|
// Internal session's getRoom returns null when no real connect has happened,
|
|
2370
2381
|
// so we reuse its reference for type consistency.
|
|
2371
|
-
getRoom:
|
|
2382
|
+
getRoom: U.getRoom,
|
|
2372
2383
|
isControlled: !0
|
|
2373
2384
|
} : {
|
|
2374
|
-
connectionState:
|
|
2375
|
-
agentState:
|
|
2376
|
-
transcript:
|
|
2377
|
-
videoElement:
|
|
2378
|
-
audioElement:
|
|
2379
|
-
canResume:
|
|
2380
|
-
error:
|
|
2381
|
-
agentConfig:
|
|
2382
|
-
connect:
|
|
2383
|
-
disconnect:
|
|
2384
|
-
getRoom:
|
|
2385
|
+
connectionState: U.connectionState,
|
|
2386
|
+
agentState: U.agentState,
|
|
2387
|
+
transcript: U.transcript,
|
|
2388
|
+
videoElement: U.videoElement,
|
|
2389
|
+
audioElement: U.audioElement,
|
|
2390
|
+
canResume: U.canResume,
|
|
2391
|
+
error: U.error,
|
|
2392
|
+
agentConfig: U.agentConfig,
|
|
2393
|
+
connect: U.connect,
|
|
2394
|
+
disconnect: U.disconnect,
|
|
2395
|
+
getRoom: U.getRoom,
|
|
2385
2396
|
isControlled: !1
|
|
2386
|
-
}, [
|
|
2397
|
+
}, [V, U]), yt = E(null);
|
|
2387
2398
|
T(() => {
|
|
2388
2399
|
const h = _.videoElement, u = yt.current;
|
|
2389
2400
|
if (!(!h || !u))
|
|
@@ -2395,8 +2406,8 @@ function Sr(e) {
|
|
|
2395
2406
|
if (!h) return;
|
|
2396
2407
|
ce.attach(h);
|
|
2397
2408
|
const u = h.play();
|
|
2398
|
-
return u && typeof u.catch == "function" && u.catch((
|
|
2399
|
-
(
|
|
2409
|
+
return u && typeof u.catch == "function" && u.catch((G) => {
|
|
2410
|
+
(G == null ? void 0 : G.name) === "NotAllowedError" && Pe(!0);
|
|
2400
2411
|
}), () => {
|
|
2401
2412
|
ce.detach();
|
|
2402
2413
|
};
|
|
@@ -2416,14 +2427,14 @@ function Sr(e) {
|
|
|
2416
2427
|
const u = _.getRoom();
|
|
2417
2428
|
if (u)
|
|
2418
2429
|
try {
|
|
2419
|
-
const
|
|
2430
|
+
const G = new TextEncoder().encode(
|
|
2420
2431
|
JSON.stringify({ type: "user_message", text: h })
|
|
2421
2432
|
);
|
|
2422
|
-
u.localParticipant.publishData(
|
|
2433
|
+
u.localParticipant.publishData(G, { reliable: !0 });
|
|
2423
2434
|
} catch {
|
|
2424
2435
|
}
|
|
2425
2436
|
}, [_]), Xt = k(() => {
|
|
2426
|
-
|
|
2437
|
+
Jt((h) => !h);
|
|
2427
2438
|
}, []);
|
|
2428
2439
|
T(() => {
|
|
2429
2440
|
_e == null || _e(_.connectionState), _.connectionState === "connected" ? ye == null || ye() : _.connectionState === "disconnected" && (ve == null || ve());
|
|
@@ -2438,14 +2449,14 @@ function Sr(e) {
|
|
|
2438
2449
|
}, [s, _.connectionState, _, ae]);
|
|
2439
2450
|
const Qt = k(
|
|
2440
2451
|
(h) => {
|
|
2441
|
-
const u = C == null ? void 0 : C.find((
|
|
2442
|
-
u && (
|
|
2452
|
+
const u = C == null ? void 0 : C.find((G) => G.id === h);
|
|
2453
|
+
u && (Ge(!1), h !== pe && (y(!0), _.disconnect(), ie || Se(h), v == null || v(u)));
|
|
2443
2454
|
},
|
|
2444
2455
|
[
|
|
2445
2456
|
C,
|
|
2446
2457
|
pe,
|
|
2447
2458
|
_,
|
|
2448
|
-
|
|
2459
|
+
ie,
|
|
2449
2460
|
v
|
|
2450
2461
|
]
|
|
2451
2462
|
);
|
|
@@ -2454,13 +2465,13 @@ function Sr(e) {
|
|
|
2454
2465
|
}, [_.connectionState, Ce]), T(() => {
|
|
2455
2466
|
if (!X) return;
|
|
2456
2467
|
const h = (u) => {
|
|
2457
|
-
u.key === "Escape" &&
|
|
2468
|
+
u.key === "Escape" && Ge(!1);
|
|
2458
2469
|
};
|
|
2459
2470
|
return window.addEventListener("keydown", h), () => window.removeEventListener("keydown", h);
|
|
2460
2471
|
}, [X]);
|
|
2461
|
-
const Zt = !!I || !!(K != null && K.avatarImageUrl) || _.isControlled, $e = kn(Me,
|
|
2472
|
+
const Zt = !!I || !!(K != null && K.avatarImageUrl) || _.isControlled, $e = kn(Me, o, Zt);
|
|
2462
2473
|
ge === void 0 && ((wt = $e.info) != null && wt.capabilities) && (at.current = $e.info.capabilities);
|
|
2463
|
-
const
|
|
2474
|
+
const Je = (K == null ? void 0 : K.name) ?? H ?? ((_t = _.agentConfig) == null ? void 0 : _t.name) ?? ((xt = $e.info) == null ? void 0 : xt.name) ?? "Live Layer", ct = (K == null ? void 0 : K.avatarImageUrl) ?? I ?? ((kt = _.agentConfig) == null ? void 0 : kt.avatarImageUrl) ?? ((Lt = $e.info) == null ? void 0 : Lt.avatarImageUrl) ?? null, en = b ?? ((St = _.agentConfig) == null ? void 0 : St.idleLoopUrl) ?? ((Ct = $e.info) == null ? void 0 : Ct.idleLoopUrl) ?? null, tn = z ?? null, nn = k(() => ee("expanded"), [ee]), rn = k(
|
|
2464
2475
|
() => ee("minimized"),
|
|
2465
2476
|
[ee]
|
|
2466
2477
|
), bt = k(() => {
|
|
@@ -2497,17 +2508,17 @@ function Sr(e) {
|
|
|
2497
2508
|
isMobile: le,
|
|
2498
2509
|
isSpeaking: _.agentState === "speaking",
|
|
2499
2510
|
onExpand: () => ee("expanded"),
|
|
2500
|
-
label: `Open ${
|
|
2511
|
+
label: `Open ${Je} widget`,
|
|
2501
2512
|
avatarImageUrl: ct,
|
|
2502
|
-
agentName:
|
|
2513
|
+
agentName: Je
|
|
2503
2514
|
}
|
|
2504
2515
|
),
|
|
2505
2516
|
ne === "minimized" && /* @__PURE__ */ n(
|
|
2506
|
-
|
|
2517
|
+
Gn,
|
|
2507
2518
|
{
|
|
2508
2519
|
position: m,
|
|
2509
2520
|
isMobile: le,
|
|
2510
|
-
agentName:
|
|
2521
|
+
agentName: Je,
|
|
2511
2522
|
avatarImageUrl: ct,
|
|
2512
2523
|
agentState: _.agentState,
|
|
2513
2524
|
isMuted: Z.isMuted,
|
|
@@ -2522,7 +2533,7 @@ function Sr(e) {
|
|
|
2522
2533
|
{
|
|
2523
2534
|
position: m,
|
|
2524
2535
|
isMobile: le,
|
|
2525
|
-
agentName:
|
|
2536
|
+
agentName: Je,
|
|
2526
2537
|
avatarImageUrl: ct,
|
|
2527
2538
|
idleLoopUrl: en,
|
|
2528
2539
|
greeting: tn,
|
|
@@ -2531,7 +2542,7 @@ function Sr(e) {
|
|
|
2531
2542
|
currentTeamMemberId: pe,
|
|
2532
2543
|
isSwitchingTeamMember: Ce,
|
|
2533
2544
|
teamSwitcherOpen: X,
|
|
2534
|
-
onToggleTeamSwitcher: () =>
|
|
2545
|
+
onToggleTeamSwitcher: () => Ge((h) => !h),
|
|
2535
2546
|
onSelectTeamMember: Qt,
|
|
2536
2547
|
connectionState: _.connectionState,
|
|
2537
2548
|
agentState: _.agentState,
|
|
@@ -2549,7 +2560,7 @@ function Sr(e) {
|
|
|
2549
2560
|
allowScreenShare: B,
|
|
2550
2561
|
allowTyping: D,
|
|
2551
2562
|
languageMenuOpen: Yt,
|
|
2552
|
-
onToggleLanguageMenu: () =>
|
|
2563
|
+
onToggleLanguageMenu: () => Gt((h) => !h),
|
|
2553
2564
|
needsUserGesture: Ye,
|
|
2554
2565
|
canResume: _.canResume,
|
|
2555
2566
|
micError: Z.micError,
|
|
@@ -2574,20 +2585,20 @@ function Sr(e) {
|
|
|
2574
2585
|
}
|
|
2575
2586
|
) : null;
|
|
2576
2587
|
}
|
|
2577
|
-
function
|
|
2578
|
-
return /* @__PURE__ */ n(mn, { children: /* @__PURE__ */ n(
|
|
2588
|
+
function Pr(e) {
|
|
2589
|
+
return /* @__PURE__ */ n(mn, { children: /* @__PURE__ */ n(Cr, { ...e }) });
|
|
2579
2590
|
}
|
|
2580
|
-
const
|
|
2591
|
+
const Dr = ({
|
|
2581
2592
|
agentId: e,
|
|
2582
2593
|
baseUrl: t,
|
|
2583
2594
|
apiKey: r,
|
|
2584
|
-
mode:
|
|
2585
|
-
onAgentEvent:
|
|
2595
|
+
mode: o,
|
|
2596
|
+
onAgentEvent: i,
|
|
2586
2597
|
className: l,
|
|
2587
2598
|
style: s
|
|
2588
2599
|
}) => {
|
|
2589
|
-
const d = E(null), f = E(null), g = E(
|
|
2590
|
-
g.current =
|
|
2600
|
+
const d = E(null), f = E(null), g = E(i);
|
|
2601
|
+
g.current = i;
|
|
2591
2602
|
const m = k((a) => {
|
|
2592
2603
|
var R;
|
|
2593
2604
|
const c = a.detail;
|
|
@@ -2597,42 +2608,42 @@ const Pr = ({
|
|
|
2597
2608
|
const a = d.current;
|
|
2598
2609
|
if (!a) return;
|
|
2599
2610
|
const c = document.createElement("livelayer-widget");
|
|
2600
|
-
return c.setAttribute("agent-id", e), t && c.setAttribute("base-url", t), r && c.setAttribute("api-key", r),
|
|
2611
|
+
return c.setAttribute("agent-id", e), t && c.setAttribute("base-url", t), r && c.setAttribute("api-key", r), o && c.setAttribute("mode", o), c.addEventListener("agent-event", m), a.appendChild(c), f.current = c, () => {
|
|
2601
2612
|
c.removeEventListener("agent-event", m), a.removeChild(c), f.current = null;
|
|
2602
2613
|
};
|
|
2603
2614
|
}, [e]), T(() => {
|
|
2604
|
-
f.current && (
|
|
2605
|
-
}, [
|
|
2606
|
-
},
|
|
2607
|
-
function({ id: t, intent: r, as:
|
|
2615
|
+
f.current && (o ? f.current.setAttribute("mode", o) : f.current.removeAttribute("mode"));
|
|
2616
|
+
}, [o]), /* @__PURE__ */ n("div", { ref: d, className: l, style: s });
|
|
2617
|
+
}, $r = ft(
|
|
2618
|
+
function({ id: t, intent: r, as: o = "div", className: i, style: l, children: s }, d) {
|
|
2608
2619
|
return un(
|
|
2609
|
-
|
|
2620
|
+
o,
|
|
2610
2621
|
{
|
|
2611
2622
|
ref: d,
|
|
2612
2623
|
"data-ll-region": t,
|
|
2613
2624
|
"data-ll-intent": r,
|
|
2614
|
-
className:
|
|
2625
|
+
className: i,
|
|
2615
2626
|
style: l
|
|
2616
2627
|
},
|
|
2617
2628
|
s
|
|
2618
2629
|
);
|
|
2619
2630
|
}
|
|
2620
|
-
),
|
|
2621
|
-
function({ id: t, intent: r, children:
|
|
2631
|
+
), zr = ft(
|
|
2632
|
+
function({ id: t, intent: r, children: o, ...i }, l) {
|
|
2622
2633
|
return /* @__PURE__ */ n(
|
|
2623
2634
|
"form",
|
|
2624
2635
|
{
|
|
2625
2636
|
ref: l,
|
|
2626
2637
|
"data-ll-form": t,
|
|
2627
2638
|
"data-ll-intent": r,
|
|
2628
|
-
...
|
|
2629
|
-
children:
|
|
2639
|
+
...i,
|
|
2640
|
+
children: o
|
|
2630
2641
|
}
|
|
2631
2642
|
);
|
|
2632
2643
|
}
|
|
2633
|
-
),
|
|
2644
|
+
), Hr = ft(
|
|
2634
2645
|
function(t, r) {
|
|
2635
|
-
const { name:
|
|
2646
|
+
const { name: o, label: i, labelClassName: l } = t, s = { name: o, "data-ll-field": o };
|
|
2636
2647
|
let d;
|
|
2637
2648
|
if ("as" in t && t.as === "textarea") {
|
|
2638
2649
|
const { name: f, label: g, labelClassName: m, as: a, ...c } = t;
|
|
@@ -2666,33 +2677,33 @@ const Pr = ({
|
|
|
2666
2677
|
}
|
|
2667
2678
|
);
|
|
2668
2679
|
}
|
|
2669
|
-
return
|
|
2670
|
-
|
|
2680
|
+
return i === void 0 ? d : /* @__PURE__ */ w("label", { className: l, children: [
|
|
2681
|
+
i,
|
|
2671
2682
|
d
|
|
2672
2683
|
] });
|
|
2673
2684
|
}
|
|
2674
2685
|
);
|
|
2675
2686
|
let Ut = 1;
|
|
2676
|
-
function
|
|
2687
|
+
function Or({
|
|
2677
2688
|
onMount: e,
|
|
2678
2689
|
defaultOpen: t = !1,
|
|
2679
2690
|
storageKey: r = "ll-debug-open"
|
|
2680
2691
|
}) {
|
|
2681
|
-
const [
|
|
2692
|
+
const [o, i] = S(t), [l, s] = S([]), [d, f] = S(""), [g, m] = S(!1), a = E(/* @__PURE__ */ new Set()), c = E([]), R = E(g);
|
|
2682
2693
|
R.current = g, T(() => {
|
|
2683
2694
|
try {
|
|
2684
2695
|
const v = localStorage.getItem(r);
|
|
2685
|
-
v === "1" &&
|
|
2696
|
+
v === "1" && i(!0), v === "0" && i(!1);
|
|
2686
2697
|
} catch {
|
|
2687
2698
|
}
|
|
2688
2699
|
}, [r]), T(() => {
|
|
2689
2700
|
try {
|
|
2690
|
-
localStorage.setItem(r,
|
|
2701
|
+
localStorage.setItem(r, o ? "1" : "0");
|
|
2691
2702
|
} catch {
|
|
2692
2703
|
}
|
|
2693
|
-
}, [
|
|
2704
|
+
}, [o, r]), T(() => {
|
|
2694
2705
|
const v = (b) => {
|
|
2695
|
-
(b.metaKey || b.ctrlKey) && b.shiftKey && b.key.toLowerCase() === "l" && (b.preventDefault(),
|
|
2706
|
+
(b.metaKey || b.ctrlKey) && b.shiftKey && b.key.toLowerCase() === "l" && (b.preventDefault(), i((z) => !z));
|
|
2696
2707
|
};
|
|
2697
2708
|
return window.addEventListener("keydown", v), () => window.removeEventListener("keydown", v);
|
|
2698
2709
|
}, []), T(() => {
|
|
@@ -2725,7 +2736,7 @@ function Hr({
|
|
|
2725
2736
|
ts: Date.now(),
|
|
2726
2737
|
kind: I,
|
|
2727
2738
|
type: N.slice(0, 120),
|
|
2728
|
-
data: { args: p.slice(1).map((B) =>
|
|
2739
|
+
data: { args: p.slice(1).map((B) => Nr(B)) }
|
|
2729
2740
|
});
|
|
2730
2741
|
} catch {
|
|
2731
2742
|
}
|
|
@@ -2734,12 +2745,12 @@ function Hr({
|
|
|
2734
2745
|
return console.warn = z("warn", v), console.log = z("log", b), () => {
|
|
2735
2746
|
console.warn = v, console.log = b;
|
|
2736
2747
|
};
|
|
2737
|
-
}, []), !
|
|
2748
|
+
}, []), !o)
|
|
2738
2749
|
return /* @__PURE__ */ n(
|
|
2739
2750
|
"button",
|
|
2740
2751
|
{
|
|
2741
2752
|
type: "button",
|
|
2742
|
-
onClick: () =>
|
|
2753
|
+
onClick: () => i(!0),
|
|
2743
2754
|
title: "Open LiveLayer debug panel (Cmd/Ctrl + Shift + L)",
|
|
2744
2755
|
"aria-label": "Open LiveLayer debug panel",
|
|
2745
2756
|
style: {
|
|
@@ -2833,7 +2844,7 @@ function Hr({
|
|
|
2833
2844
|
"button",
|
|
2834
2845
|
{
|
|
2835
2846
|
type: "button",
|
|
2836
|
-
onClick: () =>
|
|
2847
|
+
onClick: () => i(!1),
|
|
2837
2848
|
style: dt("transparent"),
|
|
2838
2849
|
"aria-label": "Close",
|
|
2839
2850
|
title: "Close (Cmd/Ctrl + Shift + L)",
|
|
@@ -2901,7 +2912,7 @@ function Hr({
|
|
|
2901
2912
|
]
|
|
2902
2913
|
}
|
|
2903
2914
|
) : L.map((v) => /* @__PURE__ */ n(
|
|
2904
|
-
|
|
2915
|
+
Er,
|
|
2905
2916
|
{
|
|
2906
2917
|
entry: v,
|
|
2907
2918
|
expanded: a.current.has(v.id),
|
|
@@ -2917,12 +2928,12 @@ function Hr({
|
|
|
2917
2928
|
}
|
|
2918
2929
|
);
|
|
2919
2930
|
}
|
|
2920
|
-
function
|
|
2931
|
+
function Er({
|
|
2921
2932
|
entry: e,
|
|
2922
2933
|
expanded: t,
|
|
2923
2934
|
onToggle: r
|
|
2924
2935
|
}) {
|
|
2925
|
-
const
|
|
2936
|
+
const o = e.kind === "warn" ? "#f59e0b" : e.type.startsWith("[LiveLayer]") ? "#94a3b8" : e.type === "navigate" || e.type === "scroll_page" || e.type === "scroll_to" || e.type === "click" ? "#22c55e" : e.type === "fill_form" || e.type === "submit_form" || e.type === "focus_field" ? "#a78bfa" : e.type === "request_page_context" || e.type === "request_routes" ? "#38bdf8" : e.type === "agent_state" ? "#facc15" : "#cbd5e1", i = new Date(e.ts).toLocaleTimeString("en-US", {
|
|
2926
2937
|
hour12: !1
|
|
2927
2938
|
});
|
|
2928
2939
|
return /* @__PURE__ */ w(
|
|
@@ -2952,14 +2963,14 @@ function Cr({
|
|
|
2952
2963
|
fontVariantNumeric: "tabular-nums",
|
|
2953
2964
|
fontSize: 10
|
|
2954
2965
|
},
|
|
2955
|
-
children:
|
|
2966
|
+
children: i
|
|
2956
2967
|
}
|
|
2957
2968
|
),
|
|
2958
2969
|
/* @__PURE__ */ n(
|
|
2959
2970
|
"span",
|
|
2960
2971
|
{
|
|
2961
2972
|
style: {
|
|
2962
|
-
color:
|
|
2973
|
+
color: o,
|
|
2963
2974
|
fontWeight: 600,
|
|
2964
2975
|
flexShrink: 0
|
|
2965
2976
|
},
|
|
@@ -2998,47 +3009,47 @@ function dt(e) {
|
|
|
2998
3009
|
cursor: "pointer"
|
|
2999
3010
|
};
|
|
3000
3011
|
}
|
|
3001
|
-
function
|
|
3012
|
+
function Nr(e) {
|
|
3002
3013
|
try {
|
|
3003
3014
|
return e instanceof Error ? { message: e.message, stack: e.stack } : (JSON.stringify(e), e);
|
|
3004
3015
|
} catch {
|
|
3005
3016
|
return String(e);
|
|
3006
3017
|
}
|
|
3007
3018
|
}
|
|
3008
|
-
function
|
|
3009
|
-
const [e, t] = S([]), r = k((
|
|
3019
|
+
function qr() {
|
|
3020
|
+
const [e, t] = S([]), r = k((i) => {
|
|
3010
3021
|
t((l) => {
|
|
3011
|
-
const s = l.findIndex((d) => d.id ===
|
|
3022
|
+
const s = l.findIndex((d) => d.id === i.id);
|
|
3012
3023
|
if (s >= 0) {
|
|
3013
3024
|
const d = l.slice();
|
|
3014
|
-
return d[s] =
|
|
3025
|
+
return d[s] = i, d;
|
|
3015
3026
|
}
|
|
3016
|
-
return [...l,
|
|
3027
|
+
return [...l, i];
|
|
3017
3028
|
});
|
|
3018
|
-
}, []),
|
|
3029
|
+
}, []), o = k(() => t([]), []);
|
|
3019
3030
|
return {
|
|
3020
3031
|
entries: e,
|
|
3021
3032
|
pushSegment: r,
|
|
3022
|
-
clear:
|
|
3033
|
+
clear: o,
|
|
3023
3034
|
latest: e.length > 0 ? e[e.length - 1] : null
|
|
3024
3035
|
};
|
|
3025
3036
|
}
|
|
3026
3037
|
export {
|
|
3027
|
-
|
|
3038
|
+
Pr as AvatarWidget,
|
|
3028
3039
|
mn as ErrorBoundary,
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3040
|
+
Or as LiveLayerDebugPanel,
|
|
3041
|
+
Hr as LiveLayerField,
|
|
3042
|
+
zr as LiveLayerForm,
|
|
3043
|
+
$r as LiveLayerRegion,
|
|
3044
|
+
Dr as LiveLayerWidget,
|
|
3045
|
+
ur as clearPageContextCache,
|
|
3046
|
+
yr as clearRoutesCache,
|
|
3047
|
+
dr as extractPageContext,
|
|
3048
|
+
mr as extractRoutes,
|
|
3038
3049
|
Wt as getCachedPageContext,
|
|
3039
3050
|
st as getCachedRoutes,
|
|
3040
3051
|
Hn as matchesPattern,
|
|
3041
|
-
|
|
3052
|
+
pr as normalizeRouteInput,
|
|
3042
3053
|
On as shouldRenderAtPath,
|
|
3043
3054
|
kn as useAgentInfo,
|
|
3044
3055
|
yn as useAudioLevel,
|
|
@@ -3052,5 +3063,5 @@ export {
|
|
|
3052
3063
|
Tn as usePathname,
|
|
3053
3064
|
qn as useRouteMatch,
|
|
3054
3065
|
_n as useScreenShareState,
|
|
3055
|
-
|
|
3066
|
+
qr as useTranscript
|
|
3056
3067
|
};
|