@livelayer/react 0.15.3 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { jsxs as x, jsx as n, Fragment as He } from "react/jsx-runtime";
3
- import { Component as Jn, useState as N, useRef as M, useEffect as R, useCallback as E, useMemo as nt, useLayoutEffect as kn, forwardRef as $t, useImperativeHandle as Xn, createElement as Zn } from "react";
4
- import { createPortal as zt } from "react-dom";
5
- import { LiveKitSession as Qn, registerFields as er } from "@livelayer/sdk";
6
- import { clearFieldRegistry as qi, getRegisteredFields as Ui, registerFields as ji, setFieldValue as Vi } from "@livelayer/sdk";
7
- import { createLocalAudioTrack as tr, Track as Cn, createLocalVideoTrack as nr } from "livekit-client";
8
- class rr extends Jn {
2
+ import { jsxs as x, jsx as n, Fragment as ze } from "react/jsx-runtime";
3
+ import { Component as Vn, useState as N, useRef as M, useEffect as T, useCallback as E, useMemo as Qe, useLayoutEffect as Ln, forwardRef as Pt, useImperativeHandle as Yn, createElement as Gn } from "react";
4
+ import { createPortal as $t } from "react-dom";
5
+ import { LiveKitSession as Kn, registerFields as Jn } from "@livelayer/sdk";
6
+ import { clearFieldRegistry as Fo, getRegisteredFields as Wo, registerFields as qo, setFieldValue as Uo } from "@livelayer/sdk";
7
+ import { createLocalAudioTrack as Xn, Track as kn, createLocalVideoTrack as Zn } from "livekit-client";
8
+ class Qn extends Vn {
9
9
  constructor() {
10
10
  super(...arguments), this.state = { hasError: !1, error: null }, this.reset = () => {
11
11
  this.setState({ hasError: !1, error: null });
@@ -15,8 +15,8 @@ class rr extends Jn {
15
15
  return { hasError: !0, error: t };
16
16
  }
17
17
  componentDidCatch(t, r) {
18
- var i, a;
19
- (a = (i = this.props).onError) == null || a.call(i, t, r);
18
+ var o, a;
19
+ (a = (o = this.props).onError) == null || a.call(o, t, r);
20
20
  }
21
21
  render() {
22
22
  var t;
@@ -35,9 +35,9 @@ class rr extends Jn {
35
35
  ] }) : this.props.children;
36
36
  }
37
37
  }
38
- function ir(e) {
39
- const [t, r] = N("idle"), [i, a] = N("idle"), [o, s] = N([]), [l, c] = N(null), [p, w] = N(null), [m, f] = N(null), [T, _] = N(!1), [v, u] = N(null), h = M(null), L = M(e.onDataMessage);
40
- L.current = e.onDataMessage, R(() => {
38
+ function er(e) {
39
+ const [t, r] = N("idle"), [o, a] = N("idle"), [i, s] = N([]), [l, c] = N(null), [p, w] = N(null), [m, f] = N(null), [R, _] = N(!1), [y, u] = N(null), h = M(null), L = M(e.onDataMessage);
40
+ L.current = e.onDataMessage, T(() => {
41
41
  const b = {
42
42
  onConnectionStateChange: (O) => {
43
43
  r(O), O === "connected" && u(null);
@@ -54,7 +54,7 @@ function ir(e) {
54
54
  (q = L.current) == null || q.call(L, O);
55
55
  },
56
56
  onResumabilityChange: _
57
- }, P = new Qn(
57
+ }, P = new Kn(
58
58
  {
59
59
  agentId: e.agentId,
60
60
  baseUrl: e.baseUrl,
@@ -92,62 +92,62 @@ function ir(e) {
92
92
  }, []);
93
93
  return {
94
94
  connectionState: t,
95
- agentState: i,
96
- transcript: o,
95
+ agentState: o,
96
+ transcript: i,
97
97
  agentConfig: l,
98
98
  videoElement: p,
99
99
  audioElement: m,
100
- canResume: T,
101
- error: v,
100
+ canResume: R,
101
+ error: y,
102
102
  connect: A,
103
103
  disconnect: I,
104
104
  getRoom: U,
105
105
  session: h.current
106
106
  };
107
107
  }
108
- function or() {
109
- const e = M(null), t = M(/* @__PURE__ */ new Map()), r = M(null), i = M(/* @__PURE__ */ new Set()), a = E(() => {
108
+ function tr() {
109
+ const e = M(null), t = M(/* @__PURE__ */ new Map()), r = M(null), o = M(/* @__PURE__ */ new Set()), a = E(() => {
110
110
  const _ = t.current;
111
111
  if (_.size === 0) {
112
112
  r.current = null;
113
113
  return;
114
114
  }
115
- let v = 0;
115
+ let y = 0;
116
116
  for (const { analyser: u, buffer: h } of _.values()) {
117
117
  u.getByteFrequencyData(h);
118
118
  let L = 0;
119
119
  for (let I = 0; I < h.length; I++) L += h[I];
120
120
  const A = L / h.length / 255;
121
- A > v && (v = A);
121
+ A > y && (y = A);
122
122
  }
123
- for (const u of i.current)
123
+ for (const u of o.current)
124
124
  try {
125
- u(v);
125
+ u(y);
126
126
  } catch (h) {
127
127
  console.error("[useAudioLevel] subscriber threw:", h);
128
128
  }
129
129
  r.current = requestAnimationFrame(a);
130
- }, []), o = E(() => e.current ? e.current : typeof window > "u" || typeof AudioContext > "u" ? null : (e.current = new AudioContext(), e.current), []), s = E(() => {
130
+ }, []), i = E(() => e.current ? e.current : typeof window > "u" || typeof AudioContext > "u" ? null : (e.current = new AudioContext(), e.current), []), s = E(() => {
131
131
  r.current === null && t.current.size > 0 && (r.current = requestAnimationFrame(a));
132
132
  }, [a]), l = E((_) => {
133
- const v = t.current.get(_);
134
- if (v) {
133
+ const y = t.current.get(_);
134
+ if (y) {
135
135
  try {
136
- v.node.disconnect();
136
+ y.node.disconnect();
137
137
  } catch {
138
138
  }
139
139
  try {
140
- v.analyser.disconnect();
140
+ y.analyser.disconnect();
141
141
  } catch {
142
142
  }
143
143
  t.current.delete(_);
144
144
  }
145
145
  }, []), c = E(
146
- (_, v) => {
147
- const u = o();
146
+ (_, y) => {
147
+ const u = i();
148
148
  if (!u) return;
149
149
  l(_);
150
- const h = v(u);
150
+ const h = y(u);
151
151
  if (!h) return;
152
152
  const L = u.createAnalyser();
153
153
  L.fftSize = 64;
@@ -163,16 +163,16 @@ function or() {
163
163
  buffer: new Uint8Array(new ArrayBuffer(L.frequencyBinCount))
164
164
  }), s();
165
165
  },
166
- [l, o, s]
166
+ [l, i, s]
167
167
  ), p = E(
168
- (_, v = "agent") => {
169
- c(v, (u) => {
168
+ (_, y = "agent") => {
169
+ c(y, (u) => {
170
170
  try {
171
171
  return u.createMediaElementSource(_);
172
172
  } catch (h) {
173
173
  return console.warn(
174
174
  "[useAudioLevel] createMediaElementSource failed for slot",
175
- v,
175
+ y,
176
176
  h
177
177
  ), null;
178
178
  }
@@ -180,14 +180,14 @@ function or() {
180
180
  },
181
181
  [c]
182
182
  ), w = E(
183
- (_, v = "mic") => {
184
- c(v, (u) => {
183
+ (_, y = "mic") => {
184
+ c(y, (u) => {
185
185
  try {
186
186
  return u.createMediaStreamSource(_);
187
187
  } catch (h) {
188
188
  return console.warn(
189
189
  "[useAudioLevel] createMediaStreamSource failed for slot",
190
- v,
190
+ y,
191
191
  h
192
192
  ), null;
193
193
  }
@@ -203,10 +203,10 @@ function or() {
203
203
  r.current !== null && (cancelAnimationFrame(r.current), r.current = null);
204
204
  for (const _ of Array.from(t.current.keys()))
205
205
  l(_);
206
- }, [l]), T = E((_) => (i.current.add(_), () => {
207
- i.current.delete(_);
206
+ }, [l]), R = E((_) => (o.current.add(_), () => {
207
+ o.current.delete(_);
208
208
  }), []);
209
- return R(() => () => {
209
+ return T(() => () => {
210
210
  if (f(), e.current) {
211
211
  try {
212
212
  e.current.close();
@@ -214,15 +214,15 @@ function or() {
214
214
  }
215
215
  e.current = null;
216
216
  }
217
- i.current.clear();
218
- }, [f]), { attach: p, attachStream: w, detach: f, detachSlot: m, subscribe: T };
217
+ o.current.clear();
218
+ }, [f]), { attach: p, attachStream: w, detach: f, detachSlot: m, subscribe: R };
219
219
  }
220
- function lr(e) {
220
+ function nr(e) {
221
221
  const t = e == null ? void 0 : e.mediaStreamTrack;
222
222
  return t ? new MediaStream([t]) : null;
223
223
  }
224
- function ar() {
225
- const [e, t] = N(!1), [r, i] = N(""), [a, o] = N(null), s = M(null), l = M(null), c = E(async (v) => {
224
+ function rr() {
225
+ const [e, t] = N(!1), [r, o] = N(""), [a, i] = N(null), s = M(null), l = M(null), c = E(async (y) => {
226
226
  var u, h;
227
227
  if (s.current && l.current) {
228
228
  try {
@@ -231,48 +231,48 @@ function ar() {
231
231
  }
232
232
  s.current.stop(), s.current = null;
233
233
  }
234
- l.current = v, o(null);
234
+ l.current = y, i(null);
235
235
  try {
236
- const L = await tr({
236
+ const L = await Xn({
237
237
  echoCancellation: !0,
238
238
  noiseSuppression: !0
239
239
  });
240
- await v.localParticipant.publishTrack(L), s.current = L, t(L.isMuted);
240
+ await y.localParticipant.publishTrack(L), s.current = L, t(L.isMuted);
241
241
  const A = (h = (u = L.mediaStreamTrack) == null ? void 0 : u.getSettings) == null ? void 0 : h.call(u);
242
- A != null && A.deviceId && i(A.deviceId);
242
+ A != null && A.deviceId && o(A.deviceId);
243
243
  } catch (L) {
244
244
  const A = L instanceof Error && L.name === "NotAllowedError" ? "Enable your microphone to talk with the agent." : "Microphone unavailable. Check browser permissions and try again.";
245
- throw o(A), L;
245
+ throw i(A), L;
246
246
  }
247
- }, []), p = E((v) => {
248
- l.current = v;
249
- }, []), w = E(async (v) => {
247
+ }, []), p = E((y) => {
248
+ l.current = y;
249
+ }, []), w = E(async (y) => {
250
250
  const u = l.current;
251
251
  if (u)
252
252
  try {
253
- await u.switchActiveDevice("audioinput", v), i(v);
253
+ await u.switchActiveDevice("audioinput", y), o(y);
254
254
  } catch (h) {
255
255
  console.warn("[useMicrophoneState] switchDevice failed:", h);
256
256
  }
257
257
  }, []), m = E(async () => {
258
- const v = l.current, u = !e;
259
- if (t(u), !!v)
258
+ const y = l.current, u = !e;
259
+ if (t(u), !!y)
260
260
  try {
261
- await v.localParticipant.setMicrophoneEnabled(!u);
261
+ await y.localParticipant.setMicrophoneEnabled(!u);
262
262
  } catch (h) {
263
263
  console.warn("[useMicrophoneState] setMicrophoneEnabled failed:", h), t(!u);
264
264
  }
265
265
  }, [e]), f = E(() => {
266
- const v = s.current, u = l.current;
267
- if (v && u) {
266
+ const y = s.current, u = l.current;
267
+ if (y && u) {
268
268
  try {
269
- u.localParticipant.unpublishTrack(v);
269
+ u.localParticipant.unpublishTrack(y);
270
270
  } catch {
271
271
  }
272
- v.stop();
272
+ y.stop();
273
273
  }
274
- s.current = null, l.current = null, t(!1), i("");
275
- }, []), T = E(() => o(null), []), _ = E(() => lr(s.current), []);
274
+ s.current = null, l.current = null, t(!1), o("");
275
+ }, []), R = E(() => i(null), []), _ = E(() => nr(s.current), []);
276
276
  return {
277
277
  isMuted: e,
278
278
  activeDeviceId: r,
@@ -282,19 +282,19 @@ function ar() {
282
282
  attachRoom: p,
283
283
  switchDevice: w,
284
284
  teardownMic: f,
285
- clearError: T,
285
+ clearError: R,
286
286
  getMicStream: _
287
287
  };
288
288
  }
289
- const sr = { resolution: { width: 640, height: 480, frameRate: 24 } };
290
- function cr() {
291
- const [e, t] = N(!1), [r, i] = N(null), [a, o] = N(null), [s, l] = N(""), c = M(null), p = M(null), w = E((h) => {
289
+ const or = { resolution: { width: 640, height: 480, frameRate: 24 } };
290
+ function ir() {
291
+ const [e, t] = N(!1), [r, o] = N(null), [a, i] = N(null), [s, l] = N(""), c = M(null), p = M(null), w = E((h) => {
292
292
  c.current = h;
293
293
  }, []), m = E(() => {
294
294
  var A;
295
295
  const h = c.current, L = p.current;
296
296
  if (L && h) {
297
- const I = h.localParticipant.getTrackPublication(Cn.Source.Camera), b = (I == null ? void 0 : I.track) ?? L;
297
+ const I = h.localParticipant.getTrackPublication(kn.Source.Camera), b = (I == null ? void 0 : I.track) ?? L;
298
298
  try {
299
299
  h.localParticipant.unpublishTrack(b);
300
300
  } catch {
@@ -304,18 +304,18 @@ function cr() {
304
304
  } catch {
305
305
  }
306
306
  }
307
- p.current = null, o(null), t(!1);
307
+ p.current = null, i(null), t(!1);
308
308
  }, []), f = E(async (h) => {
309
309
  const L = c.current;
310
310
  if (L) {
311
- i(null);
311
+ o(null);
312
312
  try {
313
- const A = { ...sr };
313
+ const A = { ...or };
314
314
  h && (A.deviceId = h);
315
- const I = await nr(A);
315
+ const I = await Zn(A);
316
316
  await L.localParticipant.publishTrack(I), p.current = I;
317
317
  const U = I.attach();
318
- o(U), t(!0), h && l(h);
318
+ i(U), t(!0), h && l(h);
319
319
  try {
320
320
  L.localParticipant.publishData(
321
321
  new TextEncoder().encode(JSON.stringify({ type: "user_camera_on" })),
@@ -325,34 +325,34 @@ function cr() {
325
325
  }
326
326
  } catch (A) {
327
327
  const I = A instanceof Error && A.name === "NotAllowedError" ? "Enable your camera in the browser to share video." : "Camera unavailable. Check permissions and try again.";
328
- i(I);
328
+ o(I);
329
329
  }
330
330
  }
331
- }, []), T = E(async () => {
331
+ }, []), R = E(async () => {
332
332
  e ? m() : await f(s || void 0);
333
333
  }, [e, s, m, f]), _ = E(async (h) => {
334
334
  m(), await f(h);
335
- }, [m, f]), v = E(() => {
336
- m(), c.current = null, i(null), l("");
337
- }, [m]), u = E(() => i(null), []);
338
- return R(() => () => {
335
+ }, [m, f]), y = E(() => {
336
+ m(), c.current = null, o(null), l("");
337
+ }, [m]), u = E(() => o(null), []);
338
+ return T(() => () => {
339
339
  p.current && p.current.stop();
340
340
  }, []), {
341
341
  isEnabled: e,
342
342
  error: r,
343
343
  previewEl: a,
344
344
  activeDeviceId: s,
345
- toggle: T,
345
+ toggle: R,
346
346
  switchDevice: _,
347
347
  attachRoom: w,
348
- teardown: v,
348
+ teardown: y,
349
349
  clearError: u
350
350
  };
351
351
  }
352
- function dr() {
353
- const [e, t] = N(!1), [r, i] = N(null), [a, o] = N(null), s = M(null), l = E((f) => {
352
+ function lr() {
353
+ const [e, t] = N(!1), [r, o] = N(null), [a, i] = N(null), s = M(null), l = E((f) => {
354
354
  s.current = f;
355
- }, []), c = E(() => o(null), []), p = E(async () => {
355
+ }, []), c = E(() => i(null), []), p = E(async () => {
356
356
  const f = s.current;
357
357
  if (f) {
358
358
  if (e) {
@@ -363,15 +363,15 @@ function dr() {
363
363
  c(), t(!1);
364
364
  return;
365
365
  }
366
- i(null);
366
+ o(null);
367
367
  try {
368
368
  await f.localParticipant.setScreenShareEnabled(!0);
369
- let T = 0;
369
+ let R = 0;
370
370
  const _ = () => {
371
- const v = f.localParticipant.getTrackPublication(Cn.Source.ScreenShare);
372
- if (v != null && v.track) {
373
- const u = v.track.attach();
374
- o(u), t(!0);
371
+ const y = f.localParticipant.getTrackPublication(kn.Source.ScreenShare);
372
+ if (y != null && y.track) {
373
+ const u = y.track.attach();
374
+ i(u), t(!0);
375
375
  try {
376
376
  f.localParticipant.publishData(
377
377
  new TextEncoder().encode(JSON.stringify({ type: "user_screen_share_on" })),
@@ -381,12 +381,12 @@ function dr() {
381
381
  }
382
382
  return;
383
383
  }
384
- T++ < 10 ? setTimeout(_, 100) : t(!0);
384
+ R++ < 10 ? setTimeout(_, 100) : t(!0);
385
385
  };
386
386
  _();
387
- } catch (T) {
388
- const _ = T instanceof Error ? T.name : "";
389
- _ !== "NotAllowedError" && _ !== "AbortError" && i("Screen share unavailable. Try again."), t(!1);
387
+ } catch (R) {
388
+ const _ = R instanceof Error ? R.name : "";
389
+ _ !== "NotAllowedError" && _ !== "AbortError" && o("Screen share unavailable. Try again."), t(!1);
390
390
  }
391
391
  }
392
392
  }, [e, c]), w = E(() => {
@@ -396,28 +396,28 @@ function dr() {
396
396
  f.localParticipant.setScreenShareEnabled(!1);
397
397
  } catch {
398
398
  }
399
- c(), t(!1), i(null), s.current = null;
400
- }, [e, c]), m = E(() => i(null), []);
399
+ c(), t(!1), o(null), s.current = null;
400
+ }, [e, c]), m = E(() => o(null), []);
401
401
  return { isEnabled: e, error: r, previewEl: a, toggle: p, attachRoom: l, teardown: w, clearError: m };
402
402
  }
403
- function ur() {
404
- const [e, t] = N([]), [r, i] = N([]), a = E(async () => {
403
+ function ar() {
404
+ const [e, t] = N([]), [r, o] = N([]), a = E(async () => {
405
405
  if (!(typeof navigator > "u" || !navigator.mediaDevices))
406
406
  try {
407
- const o = await navigator.mediaDevices.enumerateDevices();
408
- t(o.filter((s) => s.kind === "audioinput")), i(o.filter((s) => s.kind === "videoinput"));
407
+ const i = await navigator.mediaDevices.enumerateDevices();
408
+ t(i.filter((s) => s.kind === "audioinput")), o(i.filter((s) => s.kind === "videoinput"));
409
409
  } catch {
410
410
  }
411
411
  }, []);
412
- return R(() => {
412
+ return T(() => {
413
413
  if (a(), typeof navigator > "u" || !navigator.mediaDevices) return;
414
- const o = () => void a();
415
- return navigator.mediaDevices.addEventListener("devicechange", o), () => navigator.mediaDevices.removeEventListener("devicechange", o);
414
+ const i = () => void a();
415
+ return navigator.mediaDevices.addEventListener("devicechange", i), () => navigator.mediaDevices.removeEventListener("devicechange", i);
416
416
  }, [a]), { mics: e, cameras: r, refresh: a };
417
417
  }
418
- function fr(e, t, r = !1) {
419
- const [i, a] = N(null), [o, s] = N(null), [l, c] = N(!r && !!e);
420
- return R(() => {
418
+ function sr(e, t, r = !1) {
419
+ const [o, a] = N(null), [i, s] = N(null), [l, c] = N(!r && !!e);
420
+ return T(() => {
421
421
  if (r || !e) {
422
422
  c(!1);
423
423
  return;
@@ -436,9 +436,9 @@ function fr(e, t, r = !1) {
436
436
  }).catch((m) => {
437
437
  p.signal.aborted || (s(m instanceof Error ? m.message : "Agent lookup failed"), c(!1));
438
438
  }), () => p.abort();
439
- }, [e, t, r]), { info: i, error: o, loading: l };
439
+ }, [e, t, r]), { info: o, error: i, loading: l };
440
440
  }
441
- function En(e) {
441
+ function cr(e) {
442
442
  if (typeof window > "u") return null;
443
443
  try {
444
444
  return window.localStorage.getItem(e);
@@ -446,135 +446,135 @@ function En(e) {
446
446
  return null;
447
447
  }
448
448
  }
449
- function pr(e, t) {
449
+ function dr(e, t) {
450
450
  if (!(typeof window > "u"))
451
451
  try {
452
452
  window.localStorage.setItem(e, t);
453
453
  } catch {
454
454
  }
455
455
  }
456
- function hr({
456
+ function ur({
457
457
  value: e,
458
458
  defaultValue: t = "expanded",
459
459
  onChange: r
460
460
  } = {}) {
461
- const i = e !== void 0, [a, o] = N(t), s = i ? e : a, l = E(
461
+ const o = e !== void 0, [a, i] = N(t), s = o ? e : a, l = E(
462
462
  (c) => {
463
- c !== s && (i || o(c), r == null || r(c));
463
+ c !== s && (o || i(c), r == null || r(c));
464
464
  },
465
- [s, i, r]
465
+ [s, o, r]
466
466
  );
467
467
  return [s, l];
468
468
  }
469
- const mr = ["hidden", "minimized", "expanded"];
470
- function gr(e) {
471
- return e && mr.includes(e) ? e : null;
469
+ const fr = ["hidden", "minimized", "expanded"];
470
+ function pr(e) {
471
+ return e && fr.includes(e) ? e : null;
472
472
  }
473
- function yr({
473
+ function hr({
474
474
  value: e,
475
475
  defaultValue: t = "expanded",
476
476
  onChange: r,
477
- persistKey: i = "ll-widget",
477
+ persistKey: o = "ll-widget",
478
478
  disablePersistence: a = !1
479
479
  } = {}) {
480
- const o = `${i}:display-mode`, s = M(!1), [l, c] = hr({
480
+ const i = `${o}:display-mode`, s = M(!1), [l, c] = ur({
481
481
  value: e,
482
482
  defaultValue: t,
483
483
  onChange: (p) => {
484
- e === void 0 && !a && pr(o, p), r == null || r(p);
484
+ e === void 0 && !a && dr(i, p), r == null || r(p);
485
485
  }
486
486
  });
487
- return R(() => {
487
+ return T(() => {
488
488
  if (s.current || (s.current = !0, a || e !== void 0)) return;
489
- const p = gr(En(o));
489
+ const p = pr(cr(i));
490
490
  p && p !== l && c(p);
491
491
  }, []), [l, c];
492
492
  }
493
- const vr = 640;
494
- function br(e = vr) {
493
+ const mr = 640;
494
+ function gr(e = mr) {
495
495
  const [t, r] = N(!1);
496
- return R(() => {
496
+ return T(() => {
497
497
  if (e === !1) {
498
498
  r(!1);
499
499
  return;
500
500
  }
501
501
  if (typeof window > "u" || typeof window.matchMedia > "u")
502
502
  return;
503
- const i = `(max-width: ${e - 1}px)`, a = window.matchMedia(i), o = () => r(a.matches);
504
- return o(), typeof a.addEventListener == "function" ? (a.addEventListener("change", o), () => a.removeEventListener("change", o)) : (a.addListener(o), () => {
505
- a.removeListener(o);
503
+ const o = `(max-width: ${e - 1}px)`, a = window.matchMedia(o), i = () => r(a.matches);
504
+ return i(), typeof a.addEventListener == "function" ? (a.addEventListener("change", i), () => a.removeEventListener("change", i)) : (a.addListener(i), () => {
505
+ a.removeListener(i);
506
506
  });
507
507
  }, [e]), t;
508
508
  }
509
- const nn = "__llHistoryPatched", xt = "ll:pathname";
510
- function wr() {
511
- if (typeof window > "u" || window.history[nn]) return;
509
+ const tn = "__llHistoryPatched", xt = "ll:pathname";
510
+ function yr() {
511
+ if (typeof window > "u" || window.history[tn]) return;
512
512
  const e = window.history.pushState, t = window.history.replaceState;
513
513
  window.history.pushState = function(...r) {
514
- const i = e.apply(this, r);
515
- return window.dispatchEvent(new Event(xt)), i;
514
+ const o = e.apply(this, r);
515
+ return window.dispatchEvent(new Event(xt)), o;
516
516
  }, window.history.replaceState = function(...r) {
517
- const i = t.apply(this, r);
518
- return window.dispatchEvent(new Event(xt)), i;
519
- }, window.history[nn] = !0;
517
+ const o = t.apply(this, r);
518
+ return window.dispatchEvent(new Event(xt)), o;
519
+ }, window.history[tn] = !0;
520
520
  }
521
- function rn() {
521
+ function nn() {
522
522
  return typeof window > "u" ? "/" : window.location.pathname || "/";
523
523
  }
524
- function _r(e) {
524
+ function vr(e) {
525
525
  const [t, r] = N(
526
- () => e ?? rn()
526
+ () => e ?? nn()
527
527
  );
528
- return R(() => {
528
+ return T(() => {
529
529
  if (e !== void 0) return;
530
- wr();
531
- const i = () => r(rn());
532
- return i(), window.addEventListener("popstate", i), window.addEventListener(xt, i), () => {
533
- window.removeEventListener("popstate", i), window.removeEventListener(xt, i);
530
+ yr();
531
+ const o = () => r(nn());
532
+ return o(), window.addEventListener("popstate", o), window.addEventListener(xt, o), () => {
533
+ window.removeEventListener("popstate", o), window.removeEventListener(xt, o);
534
534
  };
535
535
  }, [e]), e ?? t;
536
536
  }
537
- const on = /* @__PURE__ */ new Map(), xr = /[\\^$+?.()|{}[\]]/g;
538
- function Lr(e) {
539
- return e.replace(xr, "\\$&");
537
+ const rn = /* @__PURE__ */ new Map(), br = /[\\^$+?.()|{}[\]]/g;
538
+ function wr(e) {
539
+ return e.replace(br, "\\$&");
540
540
  }
541
- function kr(e) {
542
- const t = on.get(e);
541
+ function _r(e) {
542
+ const t = rn.get(e);
543
543
  if (t) return t;
544
- const r = e.length > 1 && e.endsWith("/") ? e.slice(0, -1) : e, i = "", a = "", o = r.replace(/\*\*/g, i).replace(/\*/g, a), l = Lr(o).replace(new RegExp(`\\/${i}`, "g"), "(?:\\/.*)?").replace(new RegExp(i, "g"), ".*").replace(new RegExp(a, "g"), "[^/]+"), c = new RegExp(`^${l}\\/?$`);
545
- return on.set(e, c), c;
544
+ const r = e.length > 1 && e.endsWith("/") ? e.slice(0, -1) : e, o = "", a = "", i = r.replace(/\*\*/g, o).replace(/\*/g, a), l = wr(i).replace(new RegExp(`\\/${o}`, "g"), "(?:\\/.*)?").replace(new RegExp(o, "g"), ".*").replace(new RegExp(a, "g"), "[^/]+"), c = new RegExp(`^${l}\\/?$`);
545
+ return rn.set(e, c), c;
546
546
  }
547
- function Cr(e, t) {
547
+ function xr(e, t) {
548
548
  const r = t.length > 1 && t.endsWith("/") ? t.slice(0, -1) : t;
549
- return kr(e).test(r);
549
+ return _r(e).test(r);
550
550
  }
551
- function Er(e, t) {
552
- return typeof e == "function" ? e(t) : e instanceof RegExp ? e.test(t) : Cr(e, t);
551
+ function Lr(e, t) {
552
+ return typeof e == "function" ? e(t) : e instanceof RegExp ? e.test(t) : xr(e, t);
553
553
  }
554
- function ln(e, t) {
554
+ function on(e, t) {
555
555
  if (!e || e.length === 0) return !1;
556
556
  for (const r of e)
557
- if (Er(r, t)) return !0;
557
+ if (Lr(r, t)) return !0;
558
558
  return !1;
559
559
  }
560
- function Sr(e, t, r) {
561
- return e === void 0 ? !0 : ln(r, e) ? !1 : t && t.length > 0 ? ln(t, e) : !0;
560
+ function kr(e, t, r) {
561
+ return e === void 0 ? !0 : on(r, e) ? !1 : t && t.length > 0 ? on(t, e) : !0;
562
562
  }
563
- function Nr(e, t, r) {
564
- return nt(
565
- () => Sr(e, t, r),
563
+ function Cr(e, t, r) {
564
+ return Qe(
565
+ () => kr(e, t, r),
566
566
  [e, t, r]
567
567
  );
568
568
  }
569
- function Ar(e) {
569
+ function Er(e) {
570
570
  return e === !1 ? { navigate: !1, thinking: !1, action: !1 } : e === void 0 || e === !0 ? { navigate: !0, thinking: !0, action: !0 } : {
571
571
  navigate: e.navigate !== !1,
572
572
  thinking: e.thinking !== !1,
573
573
  action: e.action !== !1
574
574
  };
575
575
  }
576
- function Ir(e) {
577
- const t = nt(() => Ar(e.config), [e.config]), r = e.baseUrl.replace(/\/+$/, ""), i = M(null), a = E(
576
+ function Sr(e) {
577
+ const t = Qe(() => Er(e.config), [e.config]), r = e.baseUrl.replace(/\/+$/, ""), o = M(null), a = E(
578
578
  (c) => {
579
579
  try {
580
580
  new Audio(`${r}${c}`).play().catch(() => {
@@ -583,55 +583,55 @@ function Ir(e) {
583
583
  }
584
584
  },
585
585
  [r]
586
- ), o = E(() => {
586
+ ), i = E(() => {
587
587
  t.navigate && a("/audio/page-change-sound.mp3");
588
588
  }, [t.navigate, a]), s = E(() => {
589
589
  t.action && a("/audio/confirmation-sound.mp3");
590
590
  }, [t.action, a]), l = E(
591
591
  (c) => {
592
592
  if (!t.thinking) {
593
- if (i.current) {
593
+ if (o.current) {
594
594
  try {
595
- i.current.pause();
595
+ o.current.pause();
596
596
  } catch {
597
597
  }
598
- i.current = null;
598
+ o.current = null;
599
599
  }
600
600
  return;
601
601
  }
602
602
  if (c) {
603
- if (i.current) return;
603
+ if (o.current) return;
604
604
  try {
605
605
  const p = new Audio(`${r}/audio/thinking-sound.mp3`);
606
606
  p.loop = !0, p.volume = 0.3, p.play().catch(() => {
607
- i.current = null;
608
- }), i.current = p;
607
+ o.current = null;
608
+ }), o.current = p;
609
609
  } catch {
610
610
  }
611
- } else if (i.current) {
611
+ } else if (o.current) {
612
612
  try {
613
- i.current.pause();
613
+ o.current.pause();
614
614
  } catch {
615
615
  }
616
- i.current = null;
616
+ o.current = null;
617
617
  }
618
618
  },
619
619
  [r, t.thinking]
620
620
  );
621
- return R(() => () => {
622
- if (i.current) {
621
+ return T(() => () => {
622
+ if (o.current) {
623
623
  try {
624
- i.current.pause();
624
+ o.current.pause();
625
625
  } catch {
626
626
  }
627
- i.current = null;
627
+ o.current = null;
628
628
  }
629
- }, []), nt(
630
- () => ({ playPageChange: o, playConfirmation: s, setThinking: l }),
631
- [o, s, l]
629
+ }, []), Qe(
630
+ () => ({ playPageChange: i, playConfirmation: s, setThinking: l }),
631
+ [i, s, l]
632
632
  );
633
633
  }
634
- const an = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ x(
634
+ const ln = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ x(
635
635
  "svg",
636
636
  {
637
637
  className: t,
@@ -677,7 +677,7 @@ const an = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ x(
677
677
  }
678
678
  )
679
679
  }
680
- ), sn = ({ className: e }) => /* @__PURE__ */ n(
680
+ ), an = ({ className: e }) => /* @__PURE__ */ n(
681
681
  "svg",
682
682
  {
683
683
  className: e,
@@ -695,7 +695,7 @@ const an = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ x(
695
695
  }
696
696
  )
697
697
  }
698
- ), Mr = ({ className: e }) => /* @__PURE__ */ n(
698
+ ), Nr = ({ className: e }) => /* @__PURE__ */ n(
699
699
  "svg",
700
700
  {
701
701
  className: e,
@@ -706,12 +706,12 @@ const an = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ x(
706
706
  "aria-hidden": "true",
707
707
  children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
708
708
  }
709
- ), Rr = {
709
+ ), Ar = {
710
710
  left: 180,
711
711
  right: 0,
712
712
  up: -90,
713
713
  down: 90
714
- }, cn = ({ direction: e = "right", className: t }) => /* @__PURE__ */ n(
714
+ }, sn = ({ direction: e = "right", className: t }) => /* @__PURE__ */ n(
715
715
  "svg",
716
716
  {
717
717
  className: t,
@@ -719,19 +719,19 @@ const an = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ x(
719
719
  viewBox: "0 0 24 24",
720
720
  stroke: "currentColor",
721
721
  strokeWidth: 2,
722
- style: { transform: `rotate(${Rr[e]}deg)` },
722
+ style: { transform: `rotate(${Ar[e]}deg)` },
723
723
  "aria-hidden": "true",
724
724
  children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 6l6 6-6 6" })
725
725
  }
726
726
  );
727
- function Tr(e) {
727
+ function Ir(e) {
728
728
  return e === "top-left" || e === "bottom-left" ? "left" : "right";
729
729
  }
730
- const Sn = "ll-hidden-tab-center-y", Dr = 5, dn = 16;
731
- function Pr() {
730
+ const Cn = "ll-hidden-tab-center-y", Mr = 5, cn = 16;
731
+ function Rr() {
732
732
  if (typeof window > "u") return null;
733
733
  try {
734
- const e = window.localStorage.getItem(Sn);
734
+ const e = window.localStorage.getItem(Cn);
735
735
  if (!e) return null;
736
736
  const t = Number.parseFloat(e);
737
737
  return Number.isFinite(t) ? t : null;
@@ -739,37 +739,37 @@ function Pr() {
739
739
  return null;
740
740
  }
741
741
  }
742
- function un(e) {
742
+ function dn(e) {
743
743
  if (!(typeof window > "u"))
744
744
  try {
745
- window.localStorage.setItem(Sn, String(e));
745
+ window.localStorage.setItem(Cn, String(e));
746
746
  } catch {
747
747
  }
748
748
  }
749
- const $r = ({
749
+ const Tr = ({
750
750
  position: e,
751
751
  isMobile: t,
752
752
  isSpeaking: r,
753
- onExpand: i,
753
+ onExpand: o,
754
754
  label: a = "Open widget",
755
- avatarImageUrl: o,
755
+ avatarImageUrl: i,
756
756
  agentName: s,
757
757
  containerEl: l
758
758
  }) => {
759
- const c = Tr(e), p = c === "right" ? "left" : "right", w = t ? 80 : 72, m = !!o, f = !!l, [T, _] = N(null), [v, u] = N(!1), h = M(null), L = M(!1), A = E(
759
+ const c = Ir(e), p = c === "right" ? "left" : "right", w = t ? 80 : 72, m = !!i, f = !!l, [R, _] = N(null), [y, u] = N(!1), h = M(null), L = M(!1), A = E(
760
760
  (B) => {
761
761
  if (typeof window > "u") return B;
762
- const j = w / 2, S = dn + j, Z = window.innerHeight - dn - j;
762
+ const j = w / 2, S = cn + j, Z = window.innerHeight - cn - j;
763
763
  return Z < S ? Math.max(S, B) : Math.max(S, Math.min(Z, B));
764
764
  },
765
765
  [w]
766
766
  );
767
- R(() => {
767
+ T(() => {
768
768
  if (f) {
769
769
  _(null);
770
770
  return;
771
771
  }
772
- const B = Pr();
772
+ const B = Rr();
773
773
  _(A(B ?? window.innerHeight / 2));
774
774
  const j = () => {
775
775
  _((S) => S === null ? null : A(S));
@@ -778,25 +778,25 @@ const $r = ({
778
778
  }, [A, f]);
779
779
  const I = E(
780
780
  (B) => {
781
- if (!f && !(B.pointerType === "mouse" && B.button !== 0) && T !== null) {
781
+ if (!f && !(B.pointerType === "mouse" && B.button !== 0) && R !== null) {
782
782
  try {
783
783
  B.currentTarget.setPointerCapture(B.pointerId);
784
784
  } catch {
785
785
  }
786
786
  h.current = {
787
787
  startClientY: B.clientY,
788
- startCenterY: T,
788
+ startCenterY: R,
789
789
  moved: !1
790
790
  };
791
791
  }
792
792
  },
793
- [T, f]
793
+ [R, f]
794
794
  ), U = E(
795
795
  (B) => {
796
796
  const j = h.current;
797
797
  if (!j) return;
798
798
  const S = B.clientY - j.startClientY;
799
- !j.moved && Math.abs(S) > Dr && (j.moved = !0, u(!0)), j.moved && _(A(j.startCenterY + S));
799
+ !j.moved && Math.abs(S) > Mr && (j.moved = !0, u(!0)), j.moved && _(A(j.startCenterY + S));
800
800
  },
801
801
  [A]
802
802
  ), b = E(
@@ -807,7 +807,7 @@ const $r = ({
807
807
  B.currentTarget.releasePointerCapture(B.pointerId);
808
808
  } catch {
809
809
  }
810
- h.current = null, j.moved && (u(!1), L.current = !0, _((S) => (S !== null && un(S), S)));
810
+ h.current = null, j.moved && (u(!1), L.current = !0, _((S) => (S !== null && dn(S), S)));
811
811
  }
812
812
  },
813
813
  []
@@ -816,8 +816,8 @@ const $r = ({
816
816
  L.current = !1;
817
817
  return;
818
818
  }
819
- i();
820
- }, [i]), O = E(
819
+ o();
820
+ }, [o]), O = E(
821
821
  (B) => {
822
822
  if (B.key === "ArrowUp" || B.key === "ArrowDown") {
823
823
  B.preventDefault();
@@ -825,7 +825,7 @@ const $r = ({
825
825
  _((S) => {
826
826
  if (S === null) return S;
827
827
  const Z = A(S + j);
828
- return un(Z), Z;
828
+ return dn(Z), Z;
829
829
  });
830
830
  }
831
831
  },
@@ -835,10 +835,10 @@ const $r = ({
835
835
  `ll-hidden--${c}`,
836
836
  t ? "ll-hidden--mobile" : "ll-hidden--desktop",
837
837
  r ? "ll-hidden--speaking" : null,
838
- v ? "is-dragging" : null,
838
+ y ? "is-dragging" : null,
839
839
  m ? "ll-hidden--with-avatar" : null,
840
840
  f ? "ll-hidden--scoped" : null
841
- ].filter(Boolean).join(" "), ne = T === null ? void 0 : { top: `${T - w / 2}px`, transform: "none" };
841
+ ].filter(Boolean).join(" "), ne = R === null ? void 0 : { top: `${R - w / 2}px`, transform: "none" };
842
842
  return /* @__PURE__ */ n(
843
843
  "button",
844
844
  {
@@ -858,9 +858,9 @@ const $r = ({
858
858
  // as the click affordance), then the circular avatar photo
859
859
  // taking the rest of the tab. Reinforces "this is an
860
860
  // avatar-based experience" even when collapsed.
861
- /* @__PURE__ */ x(He, { children: [
861
+ /* @__PURE__ */ x(ze, { children: [
862
862
  /* @__PURE__ */ n(
863
- cn,
863
+ sn,
864
864
  {
865
865
  direction: p,
866
866
  className: "ll-hidden__chevron ll-hidden__chevron--mini"
@@ -869,7 +869,7 @@ const $r = ({
869
869
  /* @__PURE__ */ n(
870
870
  "img",
871
871
  {
872
- src: o,
872
+ src: i,
873
873
  alt: s ? `${s} avatar` : "Agent avatar",
874
874
  className: "ll-hidden__avatar",
875
875
  draggable: !1
@@ -877,7 +877,7 @@ const $r = ({
877
877
  )
878
878
  ] })
879
879
  ) : /* @__PURE__ */ n(
880
- cn,
880
+ sn,
881
881
  {
882
882
  direction: p,
883
883
  className: "ll-hidden__chevron"
@@ -885,26 +885,26 @@ const $r = ({
885
885
  )
886
886
  }
887
887
  );
888
- }, zr = ({
888
+ }, Dr = ({
889
889
  audioLevel: e,
890
890
  bars: t = 20,
891
891
  maxHeight: r = 20,
892
- minHeight: i = 4,
892
+ minHeight: o = 4,
893
893
  className: a,
894
- barClassName: o
894
+ barClassName: i
895
895
  }) => {
896
- const s = M(null), l = M([]), c = nt(() => {
896
+ const s = M(null), l = M([]), c = Qe(() => {
897
897
  const w = (Math.sqrt(5) - 1) / 2;
898
898
  return Array.from({ length: t }, (m, f) => 0.5 + f * w % 1 * 0.5);
899
899
  }, [t]);
900
- R(() => e.subscribe((m) => {
900
+ T(() => e.subscribe((m) => {
901
901
  for (let f = 0; f < t; f++) {
902
- const T = l.current[f];
903
- if (!T) continue;
904
- const _ = Math.max(i, m * r * c[f]);
905
- T.style.height = `${_}px`;
902
+ const R = l.current[f];
903
+ if (!R) continue;
904
+ const _ = Math.max(o, m * r * c[f]);
905
+ R.style.height = `${_}px`;
906
906
  }
907
- }), [e, t, r, i, c]);
907
+ }), [e, t, r, o, c]);
908
908
  const p = ["ll-waveform", a].filter(Boolean).join(" ");
909
909
  return /* @__PURE__ */ n("div", { ref: s, className: p, "aria-hidden": "true", children: Array.from({ length: t }, (w, m) => /* @__PURE__ */ n(
910
910
  "div",
@@ -912,18 +912,18 @@ const $r = ({
912
912
  ref: (f) => {
913
913
  l.current[m] = f;
914
914
  },
915
- className: ["ll-waveform__bar", o].filter(Boolean).join(" "),
916
- style: { height: `${i}px` }
915
+ className: ["ll-waveform__bar", i].filter(Boolean).join(" "),
916
+ style: { height: `${o}px` }
917
917
  },
918
918
  m
919
919
  )) });
920
- }, Hr = ({
920
+ }, Pr = ({
921
921
  position: e,
922
922
  isMobile: t,
923
923
  agentName: r,
924
- avatarImageUrl: i,
924
+ avatarImageUrl: o,
925
925
  agentState: a,
926
- isMuted: o,
926
+ isMuted: i,
927
927
  audioLevel: s,
928
928
  onExpand: l,
929
929
  onToggleMute: c,
@@ -942,19 +942,19 @@ const $r = ({
942
942
  onClick: l,
943
943
  "aria-label": `Expand ${r} widget`,
944
944
  children: [
945
- i ? (
945
+ o ? (
946
946
  // eslint-disable-next-line @next/next/no-img-element
947
947
  /* @__PURE__ */ n(
948
948
  "img",
949
949
  {
950
- src: i,
950
+ src: o,
951
951
  alt: r,
952
952
  className: "ll-minimized__avatar"
953
953
  }
954
954
  )
955
955
  ) : /* @__PURE__ */ n("div", { className: "ll-minimized__avatar ll-minimized__avatar--placeholder" }),
956
956
  /* @__PURE__ */ n(
957
- zr,
957
+ Dr,
958
958
  {
959
959
  audioLevel: s,
960
960
  bars: 16,
@@ -976,11 +976,11 @@ const $r = ({
976
976
  onKeyDown: (w) => {
977
977
  (w.key === "Enter" || w.key === " ") && (w.stopPropagation(), w.preventDefault(), c());
978
978
  },
979
- "aria-label": o ? "Unmute microphone" : "Mute microphone",
980
- children: /* @__PURE__ */ n(an, { muted: o, className: "ll-minimized__icon" })
979
+ "aria-label": i ? "Unmute microphone" : "Mute microphone",
980
+ children: /* @__PURE__ */ n(ln, { muted: i, className: "ll-minimized__icon" })
981
981
  }
982
982
  ),
983
- /* @__PURE__ */ n(sn, { className: "ll-minimized__icon ll-minimized__icon--expand" })
983
+ /* @__PURE__ */ n(an, { className: "ll-minimized__icon ll-minimized__icon--expand" })
984
984
  ] })
985
985
  ]
986
986
  }
@@ -994,12 +994,12 @@ const $r = ({
994
994
  role: "region",
995
995
  "aria-label": `${r} widget`,
996
996
  children: /* @__PURE__ */ x("div", { className: "ll-minimized__surface", children: [
997
- i ? (
997
+ o ? (
998
998
  // eslint-disable-next-line @next/next/no-img-element
999
999
  /* @__PURE__ */ n(
1000
1000
  "img",
1001
1001
  {
1002
- src: i,
1002
+ src: o,
1003
1003
  alt: r,
1004
1004
  className: "ll-minimized__avatar"
1005
1005
  }
@@ -1016,8 +1016,8 @@ const $r = ({
1016
1016
  type: "button",
1017
1017
  className: "ll-minimized__btn",
1018
1018
  onClick: c,
1019
- "aria-label": o ? "Unmute microphone" : "Mute microphone",
1020
- children: /* @__PURE__ */ n(an, { muted: o, className: "ll-minimized__icon" })
1019
+ "aria-label": i ? "Unmute microphone" : "Mute microphone",
1020
+ children: /* @__PURE__ */ n(ln, { muted: i, className: "ll-minimized__icon" })
1021
1021
  }
1022
1022
  ),
1023
1023
  /* @__PURE__ */ n(
@@ -1027,7 +1027,7 @@ const $r = ({
1027
1027
  className: "ll-minimized__btn",
1028
1028
  onClick: l,
1029
1029
  "aria-label": `Expand ${r} widget`,
1030
- children: /* @__PURE__ */ n(sn, { className: "ll-minimized__icon" })
1030
+ children: /* @__PURE__ */ n(an, { className: "ll-minimized__icon" })
1031
1031
  }
1032
1032
  ),
1033
1033
  /* @__PURE__ */ n(
@@ -1037,21 +1037,21 @@ const $r = ({
1037
1037
  className: "ll-minimized__btn ll-minimized__btn--close",
1038
1038
  onClick: p,
1039
1039
  "aria-label": "Close widget",
1040
- children: /* @__PURE__ */ n(Mr, { className: "ll-minimized__icon" })
1040
+ children: /* @__PURE__ */ n(Nr, { className: "ll-minimized__icon" })
1041
1041
  }
1042
1042
  )
1043
1043
  ] })
1044
1044
  ] })
1045
1045
  }
1046
- ), Or = ({
1046
+ ), $r = ({
1047
1047
  src: e,
1048
1048
  alt: t,
1049
1049
  preCannedPlaying: r = !1,
1050
- className: i,
1050
+ className: o,
1051
1051
  style: a
1052
1052
  }) => {
1053
- const [o, s] = N(!1), l = M(e);
1054
- if (R(() => {
1053
+ const [i, s] = N(!1), l = M(e);
1054
+ if (T(() => {
1055
1055
  l.current !== e && (l.current = e, s(!1));
1056
1056
  }, [e]), !e) return null;
1057
1057
  const c = {
@@ -1063,7 +1063,7 @@ const $r = ({
1063
1063
  objectPosition: "top",
1064
1064
  transition: "opacity 500ms ease, transform 500ms ease",
1065
1065
  transform: r ? "scale(1.02)" : "scale(1)",
1066
- opacity: o ? 1 : 0,
1066
+ opacity: i ? 1 : 0,
1067
1067
  ...a
1068
1068
  };
1069
1069
  return (
@@ -1073,7 +1073,7 @@ const $r = ({
1073
1073
  {
1074
1074
  src: e,
1075
1075
  alt: t,
1076
- className: i,
1076
+ className: o,
1077
1077
  style: c,
1078
1078
  loading: "eager",
1079
1079
  fetchPriority: "high",
@@ -1081,11 +1081,11 @@ const $r = ({
1081
1081
  }
1082
1082
  )
1083
1083
  );
1084
- }, Br = "#E06540";
1085
- function Fr({
1084
+ }, zr = "#E06540";
1085
+ function Hr({
1086
1086
  size: e = 14,
1087
1087
  className: t,
1088
- fill: r = Br
1088
+ fill: r = zr
1089
1089
  }) {
1090
1090
  return /* @__PURE__ */ x(
1091
1091
  "svg",
@@ -1123,14 +1123,14 @@ function Fr({
1123
1123
  }
1124
1124
  );
1125
1125
  }
1126
- const Wr = 8, fn = 8, qr = ({
1126
+ const Or = 8, un = 8, Br = ({
1127
1127
  open: e,
1128
1128
  onClose: t,
1129
1129
  anchorRef: r,
1130
- children: i
1130
+ children: o
1131
1131
  }) => {
1132
- const a = M(null), [o, s] = N(null);
1133
- return kn(() => {
1132
+ const a = M(null), [i, s] = N(null);
1133
+ return Ln(() => {
1134
1134
  if (!e) {
1135
1135
  s(null);
1136
1136
  return;
@@ -1139,15 +1139,15 @@ const Wr = 8, fn = 8, qr = ({
1139
1139
  if (!l) return;
1140
1140
  const c = () => {
1141
1141
  const p = l.getBoundingClientRect(), w = {
1142
- top: p.top - Wr,
1142
+ top: p.top - Or,
1143
1143
  left: p.left + p.width / 2
1144
- }, m = fn + 90, f = window.innerWidth - fn - 90;
1144
+ }, m = un + 90, f = window.innerWidth - un - 90;
1145
1145
  w.left < m && (w.left = m), w.left > f && (w.left = f), s(w);
1146
1146
  };
1147
1147
  return c(), window.addEventListener("scroll", c, !0), window.addEventListener("resize", c), () => {
1148
1148
  window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c);
1149
1149
  };
1150
- }, [e, r]), R(() => {
1150
+ }, [e, r]), T(() => {
1151
1151
  if (!e) return;
1152
1152
  const l = (p) => {
1153
1153
  const w = p.target, m = a.current, f = r.current;
@@ -1158,7 +1158,7 @@ const Wr = 8, fn = 8, qr = ({
1158
1158
  return document.addEventListener("mousedown", l), document.addEventListener("keydown", c), () => {
1159
1159
  document.removeEventListener("mousedown", l), document.removeEventListener("keydown", c);
1160
1160
  };
1161
- }, [e, t, r]), !e || o === null || typeof document > "u" ? null : zt(
1161
+ }, [e, t, r]), !e || i === null || typeof document > "u" ? null : $t(
1162
1162
  /* @__PURE__ */ n(
1163
1163
  "div",
1164
1164
  {
@@ -1169,22 +1169,22 @@ const Wr = 8, fn = 8, qr = ({
1169
1169
  position: "fixed",
1170
1170
  // Lift the popover above the anchor via translateY(-100%).
1171
1171
  // top points to (anchorTop - GAP); transform pulls bottom up to there.
1172
- top: o.top,
1173
- left: o.left,
1172
+ top: i.top,
1173
+ left: i.left,
1174
1174
  transform: "translate(-50%, -100%)"
1175
1175
  },
1176
- children: i
1176
+ children: o
1177
1177
  }
1178
1178
  ),
1179
1179
  document.body
1180
1180
  );
1181
- }, Ur = ({
1181
+ }, Fr = ({
1182
1182
  isMuted: e,
1183
1183
  onToggleMute: t,
1184
1184
  isCameraEnabled: r,
1185
- onToggleCamera: i,
1185
+ onToggleCamera: o,
1186
1186
  allowCamera: a,
1187
- isScreenShareEnabled: o,
1187
+ isScreenShareEnabled: i,
1188
1188
  onToggleScreenShare: s,
1189
1189
  allowScreenShare: l,
1190
1190
  isSpeakerMuted: c,
@@ -1192,10 +1192,10 @@ const Wr = 8, fn = 8, qr = ({
1192
1192
  allowTyping: w,
1193
1193
  isTypingOpen: m,
1194
1194
  onToggleTyping: f,
1195
- onDisconnect: T
1195
+ onDisconnect: R
1196
1196
  }) => {
1197
- const [_, v] = N(!1), u = M(null);
1198
- return /* @__PURE__ */ x(He, { children: [
1197
+ const [_, y] = N(!1), u = M(null);
1198
+ return /* @__PURE__ */ x(ze, { children: [
1199
1199
  /* @__PURE__ */ x(
1200
1200
  "div",
1201
1201
  {
@@ -1210,7 +1210,7 @@ const Wr = 8, fn = 8, qr = ({
1210
1210
  className: `ll-tool ${e ? "is-muted" : ""}`,
1211
1211
  onClick: t,
1212
1212
  "aria-label": e ? "Unmute microphone" : "Mute microphone",
1213
- children: /* @__PURE__ */ n(In, { muted: e })
1213
+ children: /* @__PURE__ */ n(Nn, { muted: e })
1214
1214
  }
1215
1215
  ),
1216
1216
  /* @__PURE__ */ n(
@@ -1219,11 +1219,11 @@ const Wr = 8, fn = 8, qr = ({
1219
1219
  ref: u,
1220
1220
  type: "button",
1221
1221
  className: `ll-tool ${_ ? "is-on" : ""}`,
1222
- onClick: () => v((h) => !h),
1222
+ onClick: () => y((h) => !h),
1223
1223
  "aria-label": "More controls",
1224
1224
  "aria-haspopup": "menu",
1225
1225
  "aria-expanded": _,
1226
- children: /* @__PURE__ */ n(jr, {})
1226
+ children: /* @__PURE__ */ n(Wr, {})
1227
1227
  }
1228
1228
  ),
1229
1229
  /* @__PURE__ */ n(
@@ -1231,19 +1231,19 @@ const Wr = 8, fn = 8, qr = ({
1231
1231
  {
1232
1232
  type: "button",
1233
1233
  className: "ll-tool ll-tool--danger",
1234
- onClick: T,
1234
+ onClick: R,
1235
1235
  "aria-label": "End conversation",
1236
- children: /* @__PURE__ */ n(Rn, {})
1236
+ children: /* @__PURE__ */ n(In, {})
1237
1237
  }
1238
1238
  )
1239
1239
  ]
1240
1240
  }
1241
1241
  ),
1242
1242
  /* @__PURE__ */ x(
1243
- qr,
1243
+ Br,
1244
1244
  {
1245
1245
  open: _,
1246
- onClose: () => v(!1),
1246
+ onClose: () => y(!1),
1247
1247
  anchorRef: u,
1248
1248
  children: [
1249
1249
  a && /* @__PURE__ */ x(
@@ -1252,10 +1252,10 @@ const Wr = 8, fn = 8, qr = ({
1252
1252
  type: "button",
1253
1253
  className: `ll-overflow-popover__item ${r ? "is-on" : ""}`,
1254
1254
  onClick: () => {
1255
- i(), v(!1);
1255
+ o(), y(!1);
1256
1256
  },
1257
1257
  children: [
1258
- /* @__PURE__ */ n(An, {}),
1258
+ /* @__PURE__ */ n(Sn, {}),
1259
1259
  /* @__PURE__ */ n("span", { children: r ? "Stop camera" : "Start camera" })
1260
1260
  ]
1261
1261
  }
@@ -1264,13 +1264,13 @@ const Wr = 8, fn = 8, qr = ({
1264
1264
  "button",
1265
1265
  {
1266
1266
  type: "button",
1267
- className: `ll-overflow-popover__item ${o ? "is-on" : ""}`,
1267
+ className: `ll-overflow-popover__item ${i ? "is-on" : ""}`,
1268
1268
  onClick: () => {
1269
- s(), v(!1);
1269
+ s(), y(!1);
1270
1270
  },
1271
1271
  children: [
1272
- /* @__PURE__ */ n(Nn, {}),
1273
- /* @__PURE__ */ n("span", { children: o ? "Stop sharing" : "Share screen" })
1272
+ /* @__PURE__ */ n(En, {}),
1273
+ /* @__PURE__ */ n("span", { children: i ? "Stop sharing" : "Share screen" })
1274
1274
  ]
1275
1275
  }
1276
1276
  ),
@@ -1280,10 +1280,10 @@ const Wr = 8, fn = 8, qr = ({
1280
1280
  type: "button",
1281
1281
  className: `ll-overflow-popover__item ${c ? "is-on" : ""}`,
1282
1282
  onClick: () => {
1283
- p(), v(!1);
1283
+ p(), y(!1);
1284
1284
  },
1285
1285
  children: [
1286
- /* @__PURE__ */ n(Mn, { muted: c }),
1286
+ /* @__PURE__ */ n(An, { muted: c }),
1287
1287
  /* @__PURE__ */ n("span", { children: c ? "Unmute speaker" : "Mute speaker" })
1288
1288
  ]
1289
1289
  }
@@ -1294,10 +1294,10 @@ const Wr = 8, fn = 8, qr = ({
1294
1294
  type: "button",
1295
1295
  className: `ll-overflow-popover__item ${m ? "is-on" : ""}`,
1296
1296
  onClick: () => {
1297
- f(), v(!1);
1297
+ f(), y(!1);
1298
1298
  },
1299
1299
  children: [
1300
- /* @__PURE__ */ n(Vr, {}),
1300
+ /* @__PURE__ */ n(qr, {}),
1301
1301
  /* @__PURE__ */ n("span", { children: m ? "Hide typing" : "Type a message" })
1302
1302
  ]
1303
1303
  }
@@ -1320,7 +1320,7 @@ const Wr = 8, fn = 8, qr = ({
1320
1320
  )
1321
1321
  ] });
1322
1322
  };
1323
- function jr() {
1323
+ function Wr() {
1324
1324
  return /* @__PURE__ */ x(
1325
1325
  "svg",
1326
1326
  {
@@ -1337,7 +1337,7 @@ function jr() {
1337
1337
  }
1338
1338
  );
1339
1339
  }
1340
- function Vr() {
1340
+ function qr() {
1341
1341
  return /* @__PURE__ */ n(
1342
1342
  "svg",
1343
1343
  {
@@ -1354,13 +1354,13 @@ function Vr() {
1354
1354
  }
1355
1355
  );
1356
1356
  }
1357
- const Yr = ({
1357
+ const Ur = ({
1358
1358
  position: e,
1359
1359
  isMobile: t,
1360
1360
  agentName: r,
1361
- avatarImageUrl: i,
1361
+ avatarImageUrl: o,
1362
1362
  idleLoopUrl: a,
1363
- greeting: o,
1363
+ greeting: i,
1364
1364
  branding: s,
1365
1365
  teamMembers: l,
1366
1366
  currentTeamMemberId: c,
@@ -1368,9 +1368,9 @@ const Yr = ({
1368
1368
  teamSwitcherOpen: w,
1369
1369
  onToggleTeamSwitcher: m,
1370
1370
  onSelectTeamMember: f,
1371
- languageMenuOpen: T,
1371
+ languageMenuOpen: R,
1372
1372
  onToggleLanguageMenu: _,
1373
- connectionState: v,
1373
+ connectionState: y,
1374
1374
  agentState: u,
1375
1375
  transcript: h,
1376
1376
  canResume: L,
@@ -1386,119 +1386,119 @@ const Yr = ({
1386
1386
  activeCameraId: j,
1387
1387
  isScreenShareEnabled: S,
1388
1388
  screenPreviewEl: Z,
1389
- isSpeakerMuted: we,
1389
+ isSpeakerMuted: _e,
1390
1390
  allowCamera: de,
1391
- allowScreenShare: Oe,
1392
- allowTyping: Be,
1391
+ allowScreenShare: He,
1392
+ allowTyping: Oe,
1393
1393
  showMinimize: X = !0,
1394
- showClose: Ne = !0,
1395
- chromeless: _e = !1,
1394
+ showClose: Se = !0,
1395
+ chromeless: xe = !1,
1396
1396
  compactControls: F = !1,
1397
- transforming: oe,
1397
+ transforming: ie,
1398
1398
  transformingLabel: Y,
1399
- avatarVideoContainerRef: pe,
1399
+ avatarVideoContainerRef: fe,
1400
1400
  agentVideoEl: K,
1401
- onConnect: rt,
1402
- onDisconnect: it,
1403
- onRetry: mt,
1404
- onResumeAudio: ot,
1405
- onToggleMute: Ae,
1406
- onSwitchMicDevice: Fe,
1407
- onToggleCamera: Ie,
1408
- onSwitchCameraDevice: We,
1409
- onToggleScreenShare: Me,
1410
- onToggleSpeaker: Re,
1411
- onSendMessage: Te,
1412
- onMinimize: De,
1401
+ onConnect: et,
1402
+ onDisconnect: tt,
1403
+ onRetry: ft,
1404
+ onResumeAudio: nt,
1405
+ onToggleMute: Ne,
1406
+ onSwitchMicDevice: Be,
1407
+ onToggleCamera: Ae,
1408
+ onSwitchCameraDevice: Fe,
1409
+ onToggleScreenShare: Ie,
1410
+ onToggleSpeaker: Me,
1411
+ onSendMessage: Re,
1412
+ onMinimize: Te,
1413
1413
  onClose: $,
1414
1414
  onClearMicError: Lt
1415
1415
  }) => {
1416
- var Je;
1417
- const Pe = ((l == null ? void 0 : l.length) ?? 0) > 1, qe = v === "connecting" || v === "connected", he = v === "connected", lt = v === "idle" || v === "disconnected" || v === "error", [$e, Ue] = N(!1);
1418
- R(() => {
1416
+ var gt;
1417
+ const De = ((l == null ? void 0 : l.length) ?? 0) > 1, We = y === "connecting" || y === "connected", pe = y === "connected", rt = y === "idle" || y === "disconnected" || y === "error", [Pe, qe] = N(!1);
1418
+ T(() => {
1419
1419
  if (!K) {
1420
- Ue(!1);
1420
+ qe(!1);
1421
1421
  return;
1422
1422
  }
1423
1423
  if (!K.paused && K.readyState >= 2) {
1424
- Ue(!0);
1424
+ qe(!0);
1425
1425
  return;
1426
1426
  }
1427
- Ue(!1);
1428
- const g = () => Ue(!0);
1427
+ qe(!1);
1428
+ const g = () => qe(!0);
1429
1429
  return K.addEventListener("playing", g), K.addEventListener("loadeddata", g), () => {
1430
1430
  K.removeEventListener("playing", g), K.removeEventListener("loadeddata", g);
1431
1431
  };
1432
1432
  }, [K]);
1433
- const [kt, ke] = N(!1);
1434
- R(() => {
1435
- if (!he) {
1436
- ke(!1);
1433
+ const [kt, Ce] = N(!1);
1434
+ T(() => {
1435
+ if (!pe) {
1436
+ Ce(!1);
1437
1437
  return;
1438
1438
  }
1439
- if ($e) return;
1440
- const g = setTimeout(() => ke(!0), 8e3);
1439
+ if (Pe) return;
1440
+ const g = setTimeout(() => Ce(!0), 8e3);
1441
1441
  return () => clearTimeout(g);
1442
- }, [he, $e]);
1443
- const le = v === "connecting" || he && !!i && !$e && !kt, at = M(null), ue = M(null);
1444
- R(() => {
1445
- const g = at.current;
1442
+ }, [pe, Pe]);
1443
+ const le = y === "connecting" || pe && !!o && !Pe && !kt, ot = M(null), he = M(null);
1444
+ T(() => {
1445
+ const g = ot.current;
1446
1446
  g && (g.innerHTML = "", ne && (ne.style.width = "100%", ne.style.height = "100%", ne.style.objectFit = "cover", ne.style.transform = "scaleX(-1)", g.appendChild(ne)));
1447
- }, [ne]), R(() => {
1448
- const g = ue.current;
1447
+ }, [ne]), T(() => {
1448
+ const g = he.current;
1449
1449
  g && (g.innerHTML = "", Z && (Z.style.width = "100%", Z.style.height = "100%", Z.style.objectFit = "contain", g.appendChild(Z)));
1450
1450
  }, [Z]);
1451
- const [ce, st] = N(!1), [je, Ce] = N(!1), Ve = M(null), ct = M(null);
1452
- R(() => {
1453
- if (!ce && !je && !T && !w) return;
1451
+ const [me, Ue] = N(!1), [je, ae] = N(!1), ge = M(null), pt = M(null);
1452
+ T(() => {
1453
+ if (!me && !je && !R && !w) return;
1454
1454
  const g = () => {
1455
- st(!1), Ce(!1), T && _(), w && m();
1455
+ Ue(!1), ae(!1), R && _(), w && m();
1456
1456
  };
1457
1457
  return document.addEventListener("click", g), () => document.removeEventListener("click", g);
1458
1458
  }, [
1459
- ce,
1459
+ me,
1460
1460
  je,
1461
- T,
1461
+ R,
1462
1462
  w,
1463
1463
  _,
1464
1464
  m
1465
1465
  ]);
1466
- const [fe, xe] = N(!1), Ct = E(() => xe((g) => !g), []), [Ye, Ee] = N(""), ae = E(
1466
+ const [ht, $e] = N(!1), se = E(() => $e((g) => !g), []), [ue, Ee] = N(""), it = E(
1467
1467
  (g) => {
1468
1468
  g.preventDefault();
1469
- const Q = Ye.trim();
1470
- Q && (Te(Q), Ee(""));
1469
+ const Q = ue.trim();
1470
+ Q && (Re(Q), Ee(""));
1471
1471
  },
1472
- [Ye, Te]
1473
- ), me = s.productName || "Live Layer", ze = !s.productName;
1474
- let ge = null, Se = null;
1472
+ [ue, Re]
1473
+ ), mt = s.productName || "Live Layer", lt = !s.productName;
1474
+ let ye = null, Le = null;
1475
1475
  for (let g = h.length - 1; g >= 0; g--) {
1476
1476
  const Q = h[g];
1477
- if (!ge && Q.role === "agent" ? ge = Q : !Se && Q.role === "user" && (Se = Q), ge && Se) break;
1477
+ if (!ye && Q.role === "agent" ? ye = Q : !Le && Q.role === "user" && (Le = Q), ye && Le) break;
1478
1478
  }
1479
- const Ge = he ? (ge == null ? void 0 : ge.text) || null : o || null, Ke = he && (Se == null ? void 0 : Se.text) || null, gt = [
1479
+ const Ve = pe ? (ye == null ? void 0 : ye.text) || null : i || null, Ye = pe && (Le == null ? void 0 : Le.text) || null, Ct = [
1480
1480
  "ll-expanded",
1481
1481
  t ? "ll-expanded--mobile" : "ll-expanded--desktop"
1482
1482
  ].join(" ");
1483
1483
  return /* @__PURE__ */ x(
1484
1484
  "div",
1485
1485
  {
1486
- className: gt,
1486
+ className: Ct,
1487
1487
  "data-position": e,
1488
- "data-state": he ? "connected" : qe ? "connecting" : "idle",
1488
+ "data-state": pe ? "connected" : We ? "connecting" : "idle",
1489
1489
  role: "dialog",
1490
1490
  "aria-label": `${r} widget`,
1491
1491
  children: [
1492
1492
  /* @__PURE__ */ x("div", { className: "ll-expanded__bg", children: [
1493
- i ? /* @__PURE__ */ n(
1494
- Or,
1493
+ o ? /* @__PURE__ */ n(
1494
+ $r,
1495
1495
  {
1496
- src: i,
1496
+ src: o,
1497
1497
  alt: r,
1498
1498
  className: "ll-expanded__bg-img"
1499
1499
  }
1500
- ) : /* @__PURE__ */ n("div", { className: "ll-expanded__bg-fallback", children: /* @__PURE__ */ n("span", { className: "ll-expanded__bg-initial", children: ((Je = r == null ? void 0 : r.charAt(0)) == null ? void 0 : Je.toUpperCase()) || "A" }) }),
1501
- a && !he && /* @__PURE__ */ n(
1500
+ ) : /* @__PURE__ */ n("div", { className: "ll-expanded__bg-fallback", children: /* @__PURE__ */ n("span", { className: "ll-expanded__bg-initial", children: ((gt = r == null ? void 0 : r.charAt(0)) == null ? void 0 : gt.toUpperCase()) || "A" }) }),
1501
+ a && !pe && /* @__PURE__ */ n(
1502
1502
  "video",
1503
1503
  {
1504
1504
  className: "ll-expanded__bg-idle",
@@ -1510,24 +1510,24 @@ const Yr = ({
1510
1510
  }
1511
1511
  )
1512
1512
  ] }),
1513
- /* @__PURE__ */ n("div", { ref: pe, className: "ll-expanded__video" }),
1513
+ /* @__PURE__ */ n("div", { ref: fe, className: "ll-expanded__video" }),
1514
1514
  le && /* @__PURE__ */ x("div", { className: "ll-expanded__overlay ll-expanded__overlay--connecting", children: [
1515
1515
  /* @__PURE__ */ n("div", { className: "ll-expanded__spinner" }),
1516
1516
  /* @__PURE__ */ n("p", { className: "ll-expanded__overlay-text", children: p ? "Switching..." : "Connecting..." })
1517
1517
  ] }),
1518
- A && he && /* @__PURE__ */ x(
1518
+ A && pe && /* @__PURE__ */ x(
1519
1519
  "button",
1520
1520
  {
1521
1521
  type: "button",
1522
1522
  className: "ll-expanded__overlay ll-expanded__overlay--gesture",
1523
- onClick: ot,
1523
+ onClick: nt,
1524
1524
  children: [
1525
1525
  /* @__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" }) }),
1526
1526
  /* @__PURE__ */ n("p", { className: "ll-expanded__overlay-text", children: "Tap to enable audio" })
1527
1527
  ]
1528
1528
  }
1529
1529
  ),
1530
- oe && /* @__PURE__ */ x(
1530
+ ie && /* @__PURE__ */ x(
1531
1531
  "div",
1532
1532
  {
1533
1533
  className: "ll-expanded__overlay ll-expanded__overlay--transforming",
@@ -1540,9 +1540,9 @@ const Yr = ({
1540
1540
  ]
1541
1541
  }
1542
1542
  ),
1543
- qe ? /* @__PURE__ */ x(He, { children: [
1543
+ We ? /* @__PURE__ */ x(ze, { children: [
1544
1544
  !F && /* @__PURE__ */ x("div", { className: "ll-expanded__topbar", children: [
1545
- !_e && /* @__PURE__ */ x("div", { className: "ll-expanded__topbar-left", children: [
1545
+ !xe && /* @__PURE__ */ x("div", { className: "ll-expanded__topbar-left", children: [
1546
1546
  /* @__PURE__ */ x("div", { className: "ll-expanded__pill-wrap", children: [
1547
1547
  /* @__PURE__ */ x(
1548
1548
  "button",
@@ -1550,17 +1550,17 @@ const Yr = ({
1550
1550
  type: "button",
1551
1551
  className: "ll-hpill",
1552
1552
  onClick: (g) => {
1553
- Pe && (g.stopPropagation(), m());
1553
+ De && (g.stopPropagation(), m());
1554
1554
  },
1555
- "aria-haspopup": Pe ? "listbox" : void 0,
1556
- "aria-expanded": Pe ? w : void 0,
1555
+ "aria-haspopup": De ? "listbox" : void 0,
1556
+ "aria-expanded": De ? w : void 0,
1557
1557
  children: [
1558
1558
  /* @__PURE__ */ n("span", { className: "ll-hpill__label", children: r }),
1559
- Pe && /* @__PURE__ */ n(wt, {})
1559
+ De && /* @__PURE__ */ n(wt, {})
1560
1560
  ]
1561
1561
  }
1562
1562
  ),
1563
- Pe && w && /* @__PURE__ */ n(
1563
+ De && w && /* @__PURE__ */ n(
1564
1564
  "div",
1565
1565
  {
1566
1566
  className: "ll-hmenu",
@@ -1602,7 +1602,7 @@ const Yr = ({
1602
1602
  g.stopPropagation(), _();
1603
1603
  },
1604
1604
  "aria-haspopup": "listbox",
1605
- "aria-expanded": T,
1605
+ "aria-expanded": R,
1606
1606
  "aria-label": "Language: English",
1607
1607
  title: "Language: English",
1608
1608
  children: [
@@ -1611,7 +1611,7 @@ const Yr = ({
1611
1611
  ]
1612
1612
  }
1613
1613
  ),
1614
- T && /* @__PURE__ */ n(
1614
+ R && /* @__PURE__ */ n(
1615
1615
  "div",
1616
1616
  {
1617
1617
  className: "ll-hmenu",
@@ -1644,13 +1644,13 @@ const Yr = ({
1644
1644
  {
1645
1645
  type: "button",
1646
1646
  className: "ll-hbtn",
1647
- onClick: De,
1647
+ onClick: Te,
1648
1648
  "aria-label": "Minimize widget",
1649
1649
  title: "Minimize",
1650
- children: /* @__PURE__ */ n(hn, {})
1650
+ children: /* @__PURE__ */ n(pn, {})
1651
1651
  }
1652
1652
  ),
1653
- Ne !== !1 && /* @__PURE__ */ n(
1653
+ Se !== !1 && /* @__PURE__ */ n(
1654
1654
  "button",
1655
1655
  {
1656
1656
  type: "button",
@@ -1658,7 +1658,7 @@ const Yr = ({
1658
1658
  onClick: $,
1659
1659
  "aria-label": "End call",
1660
1660
  title: "End call",
1661
- children: /* @__PURE__ */ n(pn, {})
1661
+ children: /* @__PURE__ */ n(fn, {})
1662
1662
  }
1663
1663
  )
1664
1664
  ] })
@@ -1673,7 +1673,7 @@ const Yr = ({
1673
1673
  // and 40px buttons crowded out the central "Start video call"
1674
1674
  // affordance. The user can dismiss by scrolling past the slot.
1675
1675
  !F && /* @__PURE__ */ x("div", { className: "ll-expanded__header ll-expanded__header--idle", children: [
1676
- ze ? /* @__PURE__ */ x(
1676
+ lt ? /* @__PURE__ */ x(
1677
1677
  "a",
1678
1678
  {
1679
1679
  className: "ll-expanded__brand ll-expanded__brand--link",
@@ -1683,44 +1683,44 @@ const Yr = ({
1683
1683
  "aria-label": "Powered by LiveLayer — opens livelayer.studio in a new tab",
1684
1684
  title: "Powered by LiveLayer — visit livelayer.studio",
1685
1685
  children: [
1686
- /* @__PURE__ */ n(Fr, { size: 14, className: "ll-expanded__brand-mark" }),
1687
- /* @__PURE__ */ n("span", { children: me })
1686
+ /* @__PURE__ */ n(Hr, { size: 14, className: "ll-expanded__brand-mark" }),
1687
+ /* @__PURE__ */ n("span", { children: mt })
1688
1688
  ]
1689
1689
  }
1690
- ) : /* @__PURE__ */ n("span", { className: "ll-expanded__brand", children: me }),
1690
+ ) : /* @__PURE__ */ n("span", { className: "ll-expanded__brand", children: mt }),
1691
1691
  /* @__PURE__ */ x("div", { className: "ll-expanded__header-actions", children: [
1692
1692
  X !== !1 && /* @__PURE__ */ n(
1693
1693
  "button",
1694
1694
  {
1695
1695
  type: "button",
1696
1696
  className: "ll-hbtn ll-hbtn--ghost",
1697
- onClick: De,
1697
+ onClick: Te,
1698
1698
  "aria-label": "Minimize widget",
1699
- children: /* @__PURE__ */ n(hn, {})
1699
+ children: /* @__PURE__ */ n(pn, {})
1700
1700
  }
1701
1701
  ),
1702
- Ne !== !1 && /* @__PURE__ */ n(
1702
+ Se !== !1 && /* @__PURE__ */ n(
1703
1703
  "button",
1704
1704
  {
1705
1705
  type: "button",
1706
1706
  className: "ll-hbtn ll-hbtn--danger",
1707
1707
  onClick: $,
1708
1708
  "aria-label": "Close widget",
1709
- children: /* @__PURE__ */ n(pn, {})
1709
+ children: /* @__PURE__ */ n(fn, {})
1710
1710
  }
1711
1711
  )
1712
1712
  ] })
1713
1713
  ] })
1714
1714
  ),
1715
- lt && /* @__PURE__ */ (() => {
1716
- const g = L ? "Resume session" : v === "disconnected" ? "Reconnect to agent" : "Start video call";
1717
- return /* @__PURE__ */ x(He, { children: [
1715
+ rt && /* @__PURE__ */ (() => {
1716
+ const g = L ? "Resume session" : y === "disconnected" ? "Reconnect to agent" : "Start video call";
1717
+ return /* @__PURE__ */ x(ze, { children: [
1718
1718
  !I && /* @__PURE__ */ x(
1719
1719
  "button",
1720
1720
  {
1721
1721
  type: "button",
1722
1722
  className: "ll-expanded__play",
1723
- onClick: rt,
1723
+ onClick: et,
1724
1724
  "aria-label": g,
1725
1725
  children: [
1726
1726
  /* @__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" }) }) }),
@@ -1729,13 +1729,13 @@ const Yr = ({
1729
1729
  }
1730
1730
  ),
1731
1731
  !F && /* @__PURE__ */ x("div", { className: "ll-expanded__bottom ll-expanded__bottom--idle", children: [
1732
- o && /* @__PURE__ */ n("div", { className: "ll-expanded__transcript", children: /* @__PURE__ */ n("p", { className: "ll-expanded__transcript-text", children: o }) }),
1732
+ i && /* @__PURE__ */ n("div", { className: "ll-expanded__transcript", children: /* @__PURE__ */ n("p", { className: "ll-expanded__transcript-text", children: i }) }),
1733
1733
  /* @__PURE__ */ n(
1734
1734
  "button",
1735
1735
  {
1736
1736
  type: "button",
1737
1737
  className: "ll-expanded__cta",
1738
- onClick: rt,
1738
+ onClick: et,
1739
1739
  "aria-label": g,
1740
1740
  children: g
1741
1741
  }
@@ -1746,52 +1746,52 @@ const Yr = ({
1746
1746
  /* @__PURE__ */ x(
1747
1747
  "div",
1748
1748
  {
1749
- className: `ll-expanded__pip ${qe && (q || S) ? "is-visible" : ""}`,
1749
+ className: `ll-expanded__pip ${We && (q || S) ? "is-visible" : ""}`,
1750
1750
  children: [
1751
1751
  /* @__PURE__ */ n(
1752
1752
  "div",
1753
1753
  {
1754
- ref: ue,
1754
+ ref: he,
1755
1755
  className: S ? "ll-expanded__pip-host" : "ll-expanded__pip-host is-hidden"
1756
1756
  }
1757
1757
  ),
1758
1758
  /* @__PURE__ */ n(
1759
1759
  "div",
1760
1760
  {
1761
- ref: at,
1761
+ ref: ot,
1762
1762
  className: !S && q ? "ll-expanded__pip-host" : "ll-expanded__pip-host is-hidden"
1763
1763
  }
1764
1764
  )
1765
1765
  ]
1766
1766
  }
1767
1767
  ),
1768
- qe ? /* @__PURE__ */ x("div", { className: "ll-expanded__bottom", children: [
1769
- !F && Ge && /* @__PURE__ */ n(
1768
+ We ? /* @__PURE__ */ x("div", { className: "ll-expanded__bottom", children: [
1769
+ !F && Ve && /* @__PURE__ */ n(
1770
1770
  "div",
1771
1771
  {
1772
1772
  className: "ll-expanded__transcript ll-expanded__transcript--agent",
1773
1773
  "data-role": "agent",
1774
- children: /* @__PURE__ */ n("p", { className: "ll-expanded__transcript-text", children: Ge })
1774
+ children: /* @__PURE__ */ n("p", { className: "ll-expanded__transcript-text", children: Ve })
1775
1775
  }
1776
1776
  ),
1777
- !F && Ke && /* @__PURE__ */ n(
1777
+ !F && Ye && /* @__PURE__ */ n(
1778
1778
  "div",
1779
1779
  {
1780
1780
  className: "ll-expanded__transcript ll-expanded__transcript--user",
1781
1781
  "data-role": "user",
1782
- children: /* @__PURE__ */ n("p", { className: "ll-expanded__transcript-text", children: Ke })
1782
+ children: /* @__PURE__ */ n("p", { className: "ll-expanded__transcript-text", children: Ye })
1783
1783
  }
1784
1784
  ),
1785
- !_e && !F && /* @__PURE__ */ x("div", { className: "ll-toolbar", onClick: (g) => g.stopPropagation(), children: [
1786
- Oe && /* @__PURE__ */ n(
1785
+ !xe && !F && /* @__PURE__ */ x("div", { className: "ll-toolbar", onClick: (g) => g.stopPropagation(), children: [
1786
+ He && /* @__PURE__ */ n(
1787
1787
  "button",
1788
1788
  {
1789
1789
  type: "button",
1790
1790
  className: `ll-tool ${S ? "is-on" : ""}`,
1791
- onClick: Me,
1791
+ onClick: Ie,
1792
1792
  "aria-label": S ? "Stop sharing screen" : "Share screen",
1793
1793
  title: S ? "Stop sharing" : "Share screen",
1794
- children: /* @__PURE__ */ n(Nn, {})
1794
+ children: /* @__PURE__ */ n(En, {})
1795
1795
  }
1796
1796
  ),
1797
1797
  de && /* @__PURE__ */ x("div", { className: "ll-tool-split", children: [
@@ -1800,20 +1800,20 @@ const Yr = ({
1800
1800
  {
1801
1801
  type: "button",
1802
1802
  className: `ll-tool ll-tool--left ${q ? "is-on" : ""}`,
1803
- onClick: Ie,
1803
+ onClick: Ae,
1804
1804
  "aria-label": q ? "Turn off camera" : "Turn on camera",
1805
1805
  title: q ? "Stop camera" : "Start camera",
1806
- children: /* @__PURE__ */ n(An, {})
1806
+ children: /* @__PURE__ */ n(Sn, {})
1807
1807
  }
1808
1808
  ),
1809
1809
  /* @__PURE__ */ n(
1810
1810
  "button",
1811
1811
  {
1812
- ref: ct,
1812
+ ref: pt,
1813
1813
  type: "button",
1814
1814
  className: `ll-tool ll-tool--right ${q ? "is-on" : ""}`,
1815
1815
  onClick: (g) => {
1816
- g.stopPropagation(), Ce((Q) => !Q), st(!1);
1816
+ g.stopPropagation(), ae((Q) => !Q), Ue(!1);
1817
1817
  },
1818
1818
  "aria-label": "Camera devices",
1819
1819
  "aria-haspopup": "listbox",
@@ -1822,14 +1822,14 @@ const Yr = ({
1822
1822
  }
1823
1823
  ),
1824
1824
  je && B.length > 0 && /* @__PURE__ */ n(
1825
- mn,
1825
+ hn,
1826
1826
  {
1827
1827
  label: "Camera",
1828
1828
  devices: B,
1829
1829
  activeId: j,
1830
- anchorRef: ct,
1830
+ anchorRef: pt,
1831
1831
  onPick: (g) => {
1832
- Ce(!1), We(g);
1832
+ ae(!1), Fe(g);
1833
1833
  }
1834
1834
  }
1835
1835
  )
@@ -1840,36 +1840,36 @@ const Yr = ({
1840
1840
  {
1841
1841
  type: "button",
1842
1842
  className: `ll-tool ll-tool--left ${U ? "is-muted" : ""}`,
1843
- onClick: Ae,
1843
+ onClick: Ne,
1844
1844
  "aria-label": U ? "Unmute microphone" : "Mute microphone",
1845
1845
  title: U ? "Unmute" : "Mute",
1846
- children: /* @__PURE__ */ n(In, { muted: U })
1846
+ children: /* @__PURE__ */ n(Nn, { muted: U })
1847
1847
  }
1848
1848
  ),
1849
1849
  /* @__PURE__ */ n(
1850
1850
  "button",
1851
1851
  {
1852
- ref: Ve,
1852
+ ref: ge,
1853
1853
  type: "button",
1854
1854
  className: `ll-tool ll-tool--right ${U ? "is-muted" : ""}`,
1855
1855
  onClick: (g) => {
1856
- g.stopPropagation(), st((Q) => !Q), Ce(!1);
1856
+ g.stopPropagation(), Ue((Q) => !Q), ae(!1);
1857
1857
  },
1858
1858
  "aria-label": "Microphone devices",
1859
1859
  "aria-haspopup": "listbox",
1860
- "aria-expanded": ce,
1860
+ "aria-expanded": me,
1861
1861
  children: /* @__PURE__ */ n(wt, {})
1862
1862
  }
1863
1863
  ),
1864
- ce && P.length > 0 && /* @__PURE__ */ n(
1865
- mn,
1864
+ me && P.length > 0 && /* @__PURE__ */ n(
1865
+ hn,
1866
1866
  {
1867
1867
  label: "Microphone",
1868
1868
  devices: P,
1869
1869
  activeId: O,
1870
- anchorRef: Ve,
1870
+ anchorRef: ge,
1871
1871
  onPick: (g) => {
1872
- st(!1), Fe(g);
1872
+ Ue(!1), Be(g);
1873
1873
  }
1874
1874
  }
1875
1875
  )
@@ -1878,11 +1878,11 @@ const Yr = ({
1878
1878
  "button",
1879
1879
  {
1880
1880
  type: "button",
1881
- className: `ll-tool ${we ? "is-muted" : ""}`,
1882
- onClick: Re,
1883
- "aria-label": we ? "Unmute speaker" : "Mute speaker",
1884
- title: we ? "Unmute speaker" : "Mute speaker",
1885
- children: /* @__PURE__ */ n(Mn, { muted: we })
1881
+ className: `ll-tool ${_e ? "is-muted" : ""}`,
1882
+ onClick: Me,
1883
+ "aria-label": _e ? "Unmute speaker" : "Mute speaker",
1884
+ title: _e ? "Unmute speaker" : "Mute speaker",
1885
+ children: /* @__PURE__ */ n(An, { muted: _e })
1886
1886
  }
1887
1887
  ),
1888
1888
  /* @__PURE__ */ n(
@@ -1890,57 +1890,57 @@ const Yr = ({
1890
1890
  {
1891
1891
  type: "button",
1892
1892
  className: "ll-tool ll-tool--danger",
1893
- onClick: it,
1893
+ onClick: tt,
1894
1894
  "aria-label": "End conversation",
1895
1895
  title: "End conversation",
1896
- children: /* @__PURE__ */ n(Rn, {})
1896
+ children: /* @__PURE__ */ n(In, {})
1897
1897
  }
1898
1898
  )
1899
1899
  ] }),
1900
- !_e && F && /* @__PURE__ */ n(
1901
- Ur,
1900
+ !xe && F && /* @__PURE__ */ n(
1901
+ Fr,
1902
1902
  {
1903
1903
  isMuted: U,
1904
- onToggleMute: Ae,
1904
+ onToggleMute: Ne,
1905
1905
  isCameraEnabled: q,
1906
- onToggleCamera: Ie,
1906
+ onToggleCamera: Ae,
1907
1907
  allowCamera: de,
1908
1908
  isScreenShareEnabled: S,
1909
- onToggleScreenShare: Me,
1910
- allowScreenShare: Oe,
1911
- isSpeakerMuted: we,
1912
- onToggleSpeaker: Re,
1913
- allowTyping: Be,
1914
- isTypingOpen: fe,
1915
- onToggleTyping: Ct,
1916
- onDisconnect: it
1909
+ onToggleScreenShare: Ie,
1910
+ allowScreenShare: He,
1911
+ isSpeakerMuted: _e,
1912
+ onToggleSpeaker: Me,
1913
+ allowTyping: Oe,
1914
+ isTypingOpen: ht,
1915
+ onToggleTyping: se,
1916
+ onDisconnect: tt
1917
1917
  }
1918
1918
  ),
1919
- !_e && Be && (F ? fe : !0) && /* @__PURE__ */ x("form", { className: "ll-message-input", onSubmit: ae, children: [
1919
+ !xe && Oe && (F ? ht : !0) && /* @__PURE__ */ x("form", { className: "ll-message-input", onSubmit: it, children: [
1920
1920
  /* @__PURE__ */ n(
1921
1921
  "input",
1922
1922
  {
1923
1923
  type: "text",
1924
1924
  className: "ll-message-input__field",
1925
1925
  placeholder: "Message...",
1926
- value: Ye,
1926
+ value: ue,
1927
1927
  onChange: (g) => Ee(g.target.value),
1928
1928
  "aria-label": "Message the agent"
1929
1929
  }
1930
1930
  ),
1931
- Ye.trim() && /* @__PURE__ */ n(
1931
+ ue.trim() && /* @__PURE__ */ n(
1932
1932
  "button",
1933
1933
  {
1934
1934
  type: "submit",
1935
1935
  className: "ll-message-input__send",
1936
1936
  "aria-label": "Send message",
1937
- children: /* @__PURE__ */ n(Gr, {})
1937
+ children: /* @__PURE__ */ n(jr, {})
1938
1938
  }
1939
1939
  )
1940
1940
  ] })
1941
1941
  ] }) : null,
1942
1942
  (() => {
1943
- if (b && v !== "error")
1943
+ if (b && y !== "error")
1944
1944
  return /* @__PURE__ */ x("div", { className: "ll-expanded__banner", role: "alert", children: [
1945
1945
  /* @__PURE__ */ n("span", { children: b }),
1946
1946
  /* @__PURE__ */ n(
@@ -1954,7 +1954,7 @@ const Yr = ({
1954
1954
  }
1955
1955
  )
1956
1956
  ] });
1957
- if (!I || v !== "error") return null;
1957
+ if (!I || y !== "error") return null;
1958
1958
  let g = "Failed to connect", Q = "Try again";
1959
1959
  return I === "MIC_PERMISSION_DENIED" ? g = "Microphone blocked. Allow access to talk." : I === "MIC_NOT_FOUND" ? g = "No microphone found. Plug one in + retry." : I === "MIC_UNAVAILABLE" ? g = "Mic unavailable. Check other apps using it." : I === "AGENT_TIMEOUT" ? g = "Agent didn't pick up. Try again." : I === "CONNECT_FAILED" ? g = "Connection failed. Check your network." : I.length < 80 && (g = I), /* @__PURE__ */ x("div", { className: "ll-expanded__banner ll-expanded__banner--error", role: "alert", children: [
1960
1960
  /* @__PURE__ */ n("span", { children: g }),
@@ -1963,7 +1963,7 @@ const Yr = ({
1963
1963
  {
1964
1964
  type: "button",
1965
1965
  className: "ll-expanded__banner-retry",
1966
- onClick: mt,
1966
+ onClick: ft,
1967
1967
  children: Q
1968
1968
  }
1969
1969
  )
@@ -1976,29 +1976,29 @@ const Yr = ({
1976
1976
  function wt() {
1977
1977
  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" }) });
1978
1978
  }
1979
- function pn() {
1979
+ function fn() {
1980
1980
  return /* @__PURE__ */ x("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", "aria-hidden": !0, children: [
1981
1981
  /* @__PURE__ */ n("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
1982
1982
  /* @__PURE__ */ n("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
1983
1983
  ] });
1984
1984
  }
1985
- function hn() {
1985
+ function pn() {
1986
1986
  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" }) });
1987
1987
  }
1988
- function Nn() {
1988
+ function En() {
1989
1989
  return /* @__PURE__ */ x("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: [
1990
1990
  /* @__PURE__ */ n("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }),
1991
1991
  /* @__PURE__ */ n("line", { x1: "8", y1: "21", x2: "16", y2: "21" }),
1992
1992
  /* @__PURE__ */ n("line", { x1: "12", y1: "17", x2: "12", y2: "21" })
1993
1993
  ] });
1994
1994
  }
1995
- function An() {
1995
+ function Sn() {
1996
1996
  return /* @__PURE__ */ x("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: [
1997
1997
  /* @__PURE__ */ n("path", { d: "M23 7l-7 5 7 5V7z" }),
1998
1998
  /* @__PURE__ */ n("rect", { x: "1", y: "5", width: "15", height: "14", rx: "2" })
1999
1999
  ] });
2000
2000
  }
2001
- function In({ muted: e }) {
2001
+ function Nn({ muted: e }) {
2002
2002
  return /* @__PURE__ */ x("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: [
2003
2003
  /* @__PURE__ */ n("path", { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }),
2004
2004
  /* @__PURE__ */ n("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
@@ -2006,22 +2006,22 @@ function In({ muted: e }) {
2006
2006
  e && /* @__PURE__ */ n("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
2007
2007
  ] });
2008
2008
  }
2009
- function Mn({ muted: e }) {
2009
+ function An({ muted: e }) {
2010
2010
  return /* @__PURE__ */ x("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: [
2011
2011
  /* @__PURE__ */ n("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
2012
- e ? /* @__PURE__ */ n("line", { x1: "23", y1: "9", x2: "17", y2: "15" }) : /* @__PURE__ */ x(He, { children: [
2012
+ e ? /* @__PURE__ */ n("line", { x1: "23", y1: "9", x2: "17", y2: "15" }) : /* @__PURE__ */ x(ze, { children: [
2013
2013
  /* @__PURE__ */ n("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14" }),
2014
2014
  /* @__PURE__ */ n("path", { d: "M15.54 8.46a5 5 0 0 1 0 7.07" })
2015
2015
  ] })
2016
2016
  ] });
2017
2017
  }
2018
- function Gr() {
2018
+ function jr() {
2019
2019
  return /* @__PURE__ */ x("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
2020
2020
  /* @__PURE__ */ n("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
2021
2021
  /* @__PURE__ */ n("polyline", { points: "12 5 19 12 12 19" })
2022
2022
  ] });
2023
2023
  }
2024
- function Rn() {
2024
+ function In() {
2025
2025
  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(
2026
2026
  "path",
2027
2027
  {
@@ -2030,15 +2030,15 @@ function Rn() {
2030
2030
  }
2031
2031
  ) });
2032
2032
  }
2033
- const mn = ({
2033
+ const hn = ({
2034
2034
  label: e,
2035
2035
  devices: t,
2036
2036
  activeId: r,
2037
- onPick: i,
2037
+ onPick: o,
2038
2038
  anchorRef: a
2039
2039
  }) => {
2040
- const [o, s] = N(null);
2041
- return kn(() => {
2040
+ const [i, s] = N(null);
2041
+ return Ln(() => {
2042
2042
  const l = () => {
2043
2043
  const c = a.current;
2044
2044
  if (!c) return;
@@ -2051,7 +2051,7 @@ const mn = ({
2051
2051
  return l(), window.addEventListener("scroll", l, !0), window.addEventListener("resize", l), () => {
2052
2052
  window.removeEventListener("scroll", l, !0), window.removeEventListener("resize", l);
2053
2053
  };
2054
- }, [a]), o === null || typeof document > "u" ? null : zt(
2054
+ }, [a]), i === null || typeof document > "u" ? null : $t(
2055
2055
  /* @__PURE__ */ x(
2056
2056
  "div",
2057
2057
  {
@@ -2060,8 +2060,8 @@ const mn = ({
2060
2060
  role: "listbox",
2061
2061
  style: {
2062
2062
  position: "fixed",
2063
- top: o.top,
2064
- left: o.left,
2063
+ top: i.top,
2064
+ left: i.left,
2065
2065
  // translate up by 100% so its BOTTOM edge sits at pos.top.
2066
2066
  transform: "translate(-50%, -100%)"
2067
2067
  },
@@ -2074,7 +2074,7 @@ const mn = ({
2074
2074
  {
2075
2075
  type: "button",
2076
2076
  className: `ll-device-menu__item ${p ? "is-active" : ""}`,
2077
- onClick: () => i(l.deviceId),
2077
+ onClick: () => o(l.deviceId),
2078
2078
  role: "option",
2079
2079
  "aria-selected": p,
2080
2080
  children: [
@@ -2090,7 +2090,7 @@ const mn = ({
2090
2090
  ),
2091
2091
  document.body
2092
2092
  );
2093
- }, Kr = [
2093
+ }, Vr = [
2094
2094
  // Accept any value (or empty) — `<input data-ll-private />` and
2095
2095
  // `<input data-ll-private="true" />` both opt out. The bare attribute
2096
2096
  // is the recommended spelling; "true" is preserved for back-compat.
@@ -2098,17 +2098,17 @@ const mn = ({
2098
2098
  "[data-ll-skip]",
2099
2099
  ".ll-widget"
2100
2100
  ];
2101
- function Ht(e) {
2101
+ function zt(e) {
2102
2102
  let t = e;
2103
2103
  for (; t; ) {
2104
- for (const r of Kr)
2104
+ for (const r of Vr)
2105
2105
  if (t.matches(r)) return !0;
2106
2106
  t = t.parentElement;
2107
2107
  }
2108
2108
  return !1;
2109
2109
  }
2110
- function Pt(e) {
2111
- if (Ht(e)) return !1;
2110
+ function Dt(e) {
2111
+ if (zt(e)) return !1;
2112
2112
  if (e instanceof HTMLInputElement) {
2113
2113
  if (e.type === "password") return !1;
2114
2114
  const t = (e.getAttribute("autocomplete") || "").toLowerCase();
@@ -2116,7 +2116,7 @@ function Pt(e) {
2116
2116
  }
2117
2117
  return !0;
2118
2118
  }
2119
- const _t = 4096, Jr = 20, Xr = 20, Zr = 10, Qr = 10, ei = 30, ti = 20, gn = 500, ni = [
2119
+ const _t = 4096, Yr = 20, Gr = 20, Kr = 10, Jr = 10, Xr = 30, Zr = 20, mn = 500, Qr = [
2120
2120
  '[data-ll-private="true"]',
2121
2121
  ".ll-widget",
2122
2122
  "script",
@@ -2124,74 +2124,74 @@ const _t = 4096, Jr = 20, Xr = 20, Zr = 10, Qr = 10, ei = 30, ti = 20, gn = 500,
2124
2124
  "noscript",
2125
2125
  "iframe"
2126
2126
  ];
2127
- function pt(e) {
2127
+ function dt(e) {
2128
2128
  if (e.getAttribute("aria-hidden") === "true" || e.hasAttribute("hidden")) return !0;
2129
2129
  let t = e;
2130
2130
  for (; t; ) {
2131
- for (const r of ni)
2131
+ for (const r of Qr)
2132
2132
  if (t.matches(r)) return !0;
2133
2133
  t = t.parentElement;
2134
2134
  }
2135
2135
  return !1;
2136
2136
  }
2137
- function ht(e) {
2137
+ function ut(e) {
2138
2138
  if (typeof window > "u") return !0;
2139
2139
  const t = e.getBoundingClientRect();
2140
2140
  if (t.width <= 0 || t.height <= 0) return !1;
2141
- const r = window.innerHeight || document.documentElement.clientHeight, i = window.innerWidth || document.documentElement.clientWidth;
2142
- return t.bottom > 0 && t.right > 0 && t.top < r && t.left < i;
2141
+ const r = window.innerHeight || document.documentElement.clientHeight, o = window.innerWidth || document.documentElement.clientWidth;
2142
+ return t.bottom > 0 && t.right > 0 && t.top < r && t.left < o;
2143
2143
  }
2144
- function yn(e) {
2144
+ function gn(e) {
2145
2145
  const t = e.getAttribute("id");
2146
2146
  if (t) {
2147
- const o = typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(t) : t.replace(/"/g, '\\"'), s = document.querySelector(`label[for="${o}"]`);
2147
+ const i = typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(t) : t.replace(/"/g, '\\"'), s = document.querySelector(`label[for="${i}"]`);
2148
2148
  if (s != null && s.textContent) return s.textContent.trim();
2149
2149
  }
2150
2150
  const r = e.getAttribute("aria-label");
2151
2151
  if (r) return r.trim();
2152
- const i = e.closest("label");
2153
- if (i) {
2154
- const o = [];
2155
- for (const l of Array.from(i.childNodes))
2152
+ const o = e.closest("label");
2153
+ if (o) {
2154
+ const i = [];
2155
+ for (const l of Array.from(o.childNodes))
2156
2156
  if (l.nodeType === Node.TEXT_NODE) {
2157
2157
  const c = (l.textContent || "").trim();
2158
- c && o.push(c);
2158
+ c && i.push(c);
2159
2159
  } else if (l instanceof HTMLElement) {
2160
2160
  if (l instanceof HTMLInputElement || l instanceof HTMLTextAreaElement || l instanceof HTMLSelectElement || l instanceof HTMLButtonElement)
2161
2161
  continue;
2162
2162
  const c = (l.textContent || "").trim();
2163
- c && o.push(c);
2163
+ c && i.push(c);
2164
2164
  }
2165
- const s = o.join(" ").trim();
2165
+ const s = i.join(" ").trim();
2166
2166
  if (s) return s;
2167
2167
  }
2168
2168
  const a = e.getAttribute("placeholder");
2169
2169
  return a ? a.trim() : "";
2170
2170
  }
2171
- function ie(e, t) {
2171
+ function oe(e, t) {
2172
2172
  return e.length <= t ? e : e.slice(0, t - 1) + "…";
2173
2173
  }
2174
- function ri(e) {
2174
+ function eo(e) {
2175
2175
  return e && e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 60) || null;
2176
2176
  }
2177
- function ii(e) {
2177
+ function to(e) {
2178
2178
  const t = e.getAttribute("aria-label");
2179
2179
  if (t) return t.trim().slice(0, 80);
2180
2180
  const r = e.getAttribute("aria-labelledby");
2181
2181
  if (r) {
2182
- const o = document.getElementById(r);
2183
- if (o != null && o.textContent) return o.textContent.trim().slice(0, 80);
2182
+ const i = document.getElementById(r);
2183
+ if (i != null && i.textContent) return i.textContent.trim().slice(0, 80);
2184
2184
  }
2185
- const i = e.querySelector(
2185
+ const o = e.querySelector(
2186
2186
  'button[type="submit"], input[type="submit"], button:not([type])'
2187
2187
  );
2188
- if (i) {
2189
- const o = i instanceof HTMLInputElement ? i.value : (i.textContent ?? "").trim();
2190
- if (o && o.length < 60 && !/^(submit|ok|continue)$/i.test(o))
2191
- return o;
2188
+ if (o) {
2189
+ const i = o instanceof HTMLInputElement ? o.value : (o.textContent ?? "").trim();
2190
+ if (i && i.length < 60 && !/^(submit|ok|continue)$/i.test(i))
2191
+ return i;
2192
2192
  }
2193
2193
  let a = e.parentElement;
2194
- for (let o = 0; a && o < 4; o++, a = a.parentElement) {
2194
+ for (let i = 0; a && i < 4; i++, a = a.parentElement) {
2195
2195
  const s = a.querySelector("h1, h2, h3, h4");
2196
2196
  if (s != null && s.textContent) {
2197
2197
  const l = s.textContent.trim();
@@ -2200,10 +2200,10 @@ function ii(e) {
2200
2200
  }
2201
2201
  return null;
2202
2202
  }
2203
- function Qe(e) {
2203
+ function Je(e) {
2204
2204
  return e.length;
2205
2205
  }
2206
- function oi(e, t = {}) {
2206
+ function no(e, t = {}) {
2207
2207
  const r = t.doc ?? (typeof document < "u" ? document : null);
2208
2208
  if (!r)
2209
2209
  return {
@@ -2217,15 +2217,15 @@ function oi(e, t = {}) {
2217
2217
  forms: [],
2218
2218
  extras: e
2219
2219
  };
2220
- const i = typeof window < "u" && window.location.href || "", a = typeof window < "u" && window.location.pathname || "/", o = r.title || "", s = Array.from(
2220
+ const o = typeof window < "u" && window.location.href || "", a = typeof window < "u" && window.location.pathname || "/", i = r.title || "", s = Array.from(
2221
2221
  r.querySelectorAll("[data-ll-region]")
2222
2222
  ), l = [];
2223
2223
  for (const b of s) {
2224
- if (l.length >= Zr) break;
2225
- if (pt(b) || !ht(b)) continue;
2226
- const P = b.getAttribute("data-ll-region") ?? "", O = b.getAttribute("data-ll-intent") ?? void 0, q = ie(
2224
+ if (l.length >= Kr) break;
2225
+ if (dt(b) || !ut(b)) continue;
2226
+ const P = b.getAttribute("data-ll-region") ?? "", O = b.getAttribute("data-ll-intent") ?? void 0, q = oe(
2227
2227
  (b.innerText || b.textContent || "").trim(),
2228
- gn * 2
2228
+ mn * 2
2229
2229
  );
2230
2230
  !P || !q || l.push({ id: P, intent: O, text: q });
2231
2231
  }
@@ -2233,41 +2233,41 @@ function oi(e, t = {}) {
2233
2233
  r.querySelectorAll("h1, h2, h3, h4, h5, h6")
2234
2234
  );
2235
2235
  for (const b of w) {
2236
- if (pt(b) || !ht(b)) continue;
2236
+ if (dt(b) || !ut(b)) continue;
2237
2237
  const P = (b.textContent || "").trim();
2238
- P && c.push(`${b.tagName}: ${ie(P, 200)}`);
2238
+ P && c.push(`${b.tagName}: ${oe(P, 200)}`);
2239
2239
  }
2240
2240
  const m = Array.from(r.querySelectorAll("p, li"));
2241
2241
  for (const b of m) {
2242
- if (pt(b) || !ht(b) || p.includes(b.tagName)) continue;
2242
+ if (dt(b) || !ut(b) || p.includes(b.tagName)) continue;
2243
2243
  const P = (b.textContent || "").trim();
2244
- P.length > 10 && c.push(ie(P, gn));
2244
+ P.length > 10 && c.push(oe(P, mn));
2245
2245
  }
2246
2246
  const f = c.join(`
2247
- `), T = [], _ = Array.from(r.querySelectorAll("a[href]"));
2247
+ `), R = [], _ = Array.from(r.querySelectorAll("a[href]"));
2248
2248
  for (const b of _) {
2249
- if (T.length >= Jr) break;
2250
- if (pt(b) || !ht(b)) continue;
2249
+ if (R.length >= Yr) break;
2250
+ if (dt(b) || !ut(b)) continue;
2251
2251
  const P = b.getAttribute("href") || "", O = (b.textContent || "").trim();
2252
- !P || !O || T.push({ href: P, text: ie(O, 100) });
2252
+ !P || !O || R.push({ href: P, text: oe(O, 100) });
2253
2253
  }
2254
- const v = [], u = Array.from(
2254
+ const y = [], u = Array.from(
2255
2255
  r.querySelectorAll(
2256
2256
  "input, textarea, select"
2257
2257
  )
2258
2258
  );
2259
2259
  for (const b of u) {
2260
- if (v.length >= Xr) break;
2261
- if (pt(b) || !Pt(b) || !ht(b)) continue;
2262
- const P = yn(b), O = b instanceof HTMLInputElement ? b.type : b.tagName.toLowerCase();
2263
- P && v.push({ label: ie(P, 100), type: O });
2260
+ if (y.length >= Gr) break;
2261
+ if (dt(b) || !Dt(b) || !ut(b)) continue;
2262
+ const P = gn(b), O = b instanceof HTMLInputElement ? b.type : b.tagName.toLowerCase();
2263
+ P && y.push({ label: oe(P, 100), type: O });
2264
2264
  }
2265
2265
  const h = Array.from(r.querySelectorAll("form")), L = [];
2266
2266
  let A = 0;
2267
2267
  for (const b of h) {
2268
- if (L.length >= Qr) break;
2269
- if (Ht(b) || b.matches(".ll-widget *, .ll-widget")) continue;
2270
- const P = b.getAttribute("id") || b.getAttribute("name") || ri(b.getAttribute("data-ll-intent")) || `form_${A++}`, O = b.getAttribute("data-ll-intent") || ii(b) || void 0, q = Array.from(
2268
+ if (L.length >= Jr) break;
2269
+ if (zt(b) || b.matches(".ll-widget *, .ll-widget")) continue;
2270
+ const P = b.getAttribute("id") || b.getAttribute("name") || eo(b.getAttribute("data-ll-intent")) || `form_${A++}`, O = b.getAttribute("data-ll-intent") || to(b) || void 0, q = Array.from(
2271
2271
  b.querySelectorAll(
2272
2272
  "input, textarea, select"
2273
2273
  )
@@ -2275,92 +2275,92 @@ function oi(e, t = {}) {
2275
2275
  let B = 0;
2276
2276
  const j = /* @__PURE__ */ new Set();
2277
2277
  for (const S of q) {
2278
- if (ne.length >= ei) break;
2279
- if (!Pt(S)) continue;
2278
+ if (ne.length >= Xr) break;
2279
+ if (!Dt(S)) continue;
2280
2280
  if (S instanceof HTMLInputElement) {
2281
2281
  const F = S.type;
2282
2282
  if (F === "submit" || F === "button" || F === "reset" || F === "hidden" || F === "image" || F === "file") continue;
2283
2283
  }
2284
- const Z = S.getAttribute("name") || "", we = S.getAttribute("id") || "";
2285
- let de = Z || we || `field_${B}`;
2284
+ const Z = S.getAttribute("name") || "", _e = S.getAttribute("id") || "";
2285
+ let de = Z || _e || `field_${B}`;
2286
2286
  j.has(de) && (de = `${de}__${B}`), j.add(de), B++;
2287
- const Oe = yn(S) || de, Be = S instanceof HTMLInputElement ? S.type : S.tagName.toLowerCase(), X = {
2287
+ const He = gn(S) || de, Oe = S instanceof HTMLInputElement ? S.type : S.tagName.toLowerCase(), X = {
2288
2288
  name: de,
2289
- label: ie(Oe, 100),
2290
- type: Be
2289
+ label: oe(He, 100),
2290
+ type: Oe
2291
2291
  };
2292
2292
  S.required === !0 && (X.required = !0);
2293
- const Ne = S.getAttribute("placeholder");
2294
- if (Ne && (X.placeholder = ie(Ne.trim(), 100)), S instanceof HTMLInputElement || S instanceof HTMLTextAreaElement) {
2293
+ const Se = S.getAttribute("placeholder");
2294
+ if (Se && (X.placeholder = oe(Se.trim(), 100)), S instanceof HTMLInputElement || S instanceof HTMLTextAreaElement) {
2295
2295
  const F = S.getAttribute("minlength");
2296
2296
  if (F !== null) {
2297
2297
  const Y = parseInt(F, 10);
2298
2298
  !Number.isNaN(Y) && Y >= 0 && (X.minLength = Y);
2299
2299
  }
2300
- const oe = S.getAttribute("maxlength");
2301
- if (oe !== null) {
2302
- const Y = parseInt(oe, 10);
2300
+ const ie = S.getAttribute("maxlength");
2301
+ if (ie !== null) {
2302
+ const Y = parseInt(ie, 10);
2303
2303
  !Number.isNaN(Y) && Y >= 0 && (X.maxLength = Y);
2304
2304
  }
2305
2305
  }
2306
2306
  if (S instanceof HTMLInputElement) {
2307
2307
  const F = S.getAttribute("min");
2308
- F !== null && (X.min = ie(F, 50));
2309
- const oe = S.getAttribute("max");
2310
- oe !== null && (X.max = ie(oe, 50));
2308
+ F !== null && (X.min = oe(F, 50));
2309
+ const ie = S.getAttribute("max");
2310
+ ie !== null && (X.max = oe(ie, 50));
2311
2311
  const Y = S.getAttribute("step");
2312
- Y !== null && (X.step = ie(Y, 20));
2313
- const pe = S.getAttribute("pattern");
2314
- pe !== null && (X.pattern = ie(pe, 200));
2312
+ Y !== null && (X.step = oe(Y, 20));
2313
+ const fe = S.getAttribute("pattern");
2314
+ fe !== null && (X.pattern = oe(fe, 200));
2315
2315
  const K = (S.getAttribute("autocomplete") || "").toLowerCase();
2316
- K && K !== "off" && !K.startsWith("cc-") && (X.autocomplete = ie(K, 50));
2316
+ K && K !== "off" && !K.startsWith("cc-") && (X.autocomplete = oe(K, 50));
2317
2317
  }
2318
2318
  if (S instanceof HTMLSelectElement) {
2319
2319
  const F = [];
2320
- for (let oe = 0; oe < S.options.length && !(F.length >= ti); oe++) {
2321
- const Y = S.options[oe];
2320
+ for (let ie = 0; ie < S.options.length && !(F.length >= Zr); ie++) {
2321
+ const Y = S.options[ie];
2322
2322
  if (!Y || Y.disabled) continue;
2323
- const pe = Y.value || "", K = (Y.textContent || "").trim() || pe;
2324
- !pe && !K || F.push({ value: pe, label: ie(K, 60) });
2323
+ const fe = Y.value || "", K = (Y.textContent || "").trim() || fe;
2324
+ !fe && !K || F.push({ value: fe, label: oe(K, 60) });
2325
2325
  }
2326
2326
  F.length > 0 && (X.options = F);
2327
2327
  }
2328
- const _e = typeof S.validationMessage == "string" ? S.validationMessage : "";
2329
- _e && (X.validationMessage = ie(_e, 200)), ne.push(X);
2328
+ const xe = typeof S.validationMessage == "string" ? S.validationMessage : "";
2329
+ xe && (X.validationMessage = oe(xe, 200)), ne.push(X);
2330
2330
  }
2331
2331
  L.push({ id: P, intent: O, fields: ne });
2332
2332
  }
2333
2333
  const I = {
2334
- url: i,
2335
- title: o,
2334
+ url: o,
2335
+ title: i,
2336
2336
  pathname: a,
2337
2337
  regions: l,
2338
2338
  visibleText: f,
2339
- visibleLinks: T,
2340
- visibleFields: v,
2339
+ visibleLinks: R,
2340
+ visibleFields: y,
2341
2341
  forms: L,
2342
2342
  extras: e
2343
2343
  };
2344
- let U = Qe(JSON.stringify(I.regions)) + Qe(I.visibleText) + Qe(JSON.stringify(I.visibleLinks)) + Qe(JSON.stringify(I.visibleFields));
2344
+ let U = Je(JSON.stringify(I.regions)) + Je(I.visibleText) + Je(JSON.stringify(I.visibleLinks)) + Je(JSON.stringify(I.visibleFields));
2345
2345
  for (; U > _t && I.visibleFields.length > 0; )
2346
- I.visibleFields.pop(), U = Qe(JSON.stringify(I.visibleFields));
2346
+ I.visibleFields.pop(), U = Je(JSON.stringify(I.visibleFields));
2347
2347
  for (; U > _t && I.visibleLinks.length > 0; )
2348
2348
  I.visibleLinks.pop(), U -= 80;
2349
- return Qe(I.visibleText) > _t && (I.visibleText = ie(I.visibleText, _t - 100)), I;
2349
+ return Je(I.visibleText) > _t && (I.visibleText = oe(I.visibleText, _t - 100)), I;
2350
2350
  }
2351
- let et = null;
2352
- function vn(e, t = {}) {
2351
+ let Xe = null;
2352
+ function yn(e, t = {}) {
2353
2353
  const r = Date.now(), a = `${typeof window < "u" && window.location.pathname || "/"}::${typeof window < "u" ? window.scrollY : 0}`;
2354
- if (et && et.key === a && r - et.at < 1e3)
2355
- return et.ctx;
2356
- const o = oi(e, t);
2357
- return et = { key: a, at: r, ctx: o }, o;
2354
+ if (Xe && Xe.key === a && r - Xe.at < 1e3)
2355
+ return Xe.ctx;
2356
+ const i = no(e, t);
2357
+ return Xe = { key: a, at: r, ctx: i }, i;
2358
2358
  }
2359
- function li() {
2360
- et = null;
2359
+ function ro() {
2360
+ Xe = null;
2361
2361
  }
2362
- const ai = 200;
2363
- function si(e) {
2362
+ const oo = 200;
2363
+ function io(e) {
2364
2364
  const t = String(e.href || "");
2365
2365
  return {
2366
2366
  href: t,
@@ -2370,18 +2370,18 @@ function si(e) {
2370
2370
  description: e.description
2371
2371
  };
2372
2372
  }
2373
- function ci(e) {
2373
+ function lo(e) {
2374
2374
  return !(!e || e.startsWith("#") || e.startsWith("javascript:") || e.startsWith("mailto:") || e.startsWith("tel:"));
2375
2375
  }
2376
- function di(e) {
2376
+ function ao(e) {
2377
2377
  const t = e ?? (typeof document < "u" ? document : null);
2378
2378
  if (!t) return [];
2379
- const r = typeof window < "u" && window.location.origin || "", i = /* @__PURE__ */ new Set(), a = [], o = Array.from(t.querySelectorAll("a[href]"));
2380
- for (const s of o) {
2381
- if (a.length >= ai) break;
2382
- if (Ht(s)) continue;
2379
+ const r = typeof window < "u" && window.location.origin || "", o = /* @__PURE__ */ new Set(), a = [], i = Array.from(t.querySelectorAll("a[href]"));
2380
+ for (const s of i) {
2381
+ if (a.length >= oo) break;
2382
+ if (zt(s)) continue;
2383
2383
  const l = s.getAttribute("href") || "";
2384
- if (!ci(l)) continue;
2384
+ if (!lo(l)) continue;
2385
2385
  let c = l, p = !0;
2386
2386
  try {
2387
2387
  if (typeof window < "u") {
@@ -2391,26 +2391,26 @@ function di(e) {
2391
2391
  } catch {
2392
2392
  continue;
2393
2393
  }
2394
- if (i.has(c)) continue;
2395
- i.add(c);
2394
+ if (o.has(c)) continue;
2395
+ o.add(c);
2396
2396
  const w = (s.textContent || "").trim().slice(0, 120);
2397
2397
  a.push({ href: c, text: w, internal: p });
2398
2398
  }
2399
2399
  return a;
2400
2400
  }
2401
- let tt = null;
2402
- const ui = 5e3;
2403
- function Tt() {
2401
+ let Ze = null;
2402
+ const so = 5e3;
2403
+ function Rt() {
2404
2404
  const e = Date.now(), t = typeof window < "u" && window.location.pathname || "/";
2405
- if (tt && tt.pathname === t && e - tt.at < ui)
2406
- return tt.routes;
2407
- const r = di();
2408
- return tt = { at: e, pathname: t, routes: r }, r;
2405
+ if (Ze && Ze.pathname === t && e - Ze.at < so)
2406
+ return Ze.routes;
2407
+ const r = ao();
2408
+ return Ze = { at: e, pathname: t, routes: r }, r;
2409
2409
  }
2410
- function fi() {
2411
- tt = null;
2410
+ function co() {
2411
+ Ze = null;
2412
2412
  }
2413
- function bn(e) {
2413
+ function vn(e) {
2414
2414
  if (e instanceof HTMLInputElement) {
2415
2415
  const t = e.type;
2416
2416
  if (t === "submit" || t === "button" || t === "reset" || t === "hidden" || t === "image" || t === "file")
@@ -2418,53 +2418,53 @@ function bn(e) {
2418
2418
  }
2419
2419
  return !0;
2420
2420
  }
2421
- function pi(e, t) {
2421
+ function uo(e, t) {
2422
2422
  return e.getAttribute("name") || e.getAttribute("id") || `field_${t}`;
2423
2423
  }
2424
- function hi(e, t) {
2424
+ function fo(e, t) {
2425
2425
  if (!t) return null;
2426
2426
  try {
2427
- const o = e.querySelector(
2427
+ const i = e.querySelector(
2428
2428
  `[name="${t.replace(/"/g, '\\"')}"]`
2429
2429
  );
2430
- if (o && bn(o)) return o;
2430
+ if (i && vn(i)) return i;
2431
2431
  } catch {
2432
2432
  }
2433
2433
  const r = Array.from(
2434
2434
  e.querySelectorAll("input, textarea, select")
2435
2435
  );
2436
- let i = 0;
2436
+ let o = 0;
2437
2437
  const a = /* @__PURE__ */ new Map();
2438
- for (const o of r) {
2439
- if (!bn(o)) continue;
2440
- const s = pi(o, i);
2438
+ for (const i of r) {
2439
+ if (!vn(i)) continue;
2440
+ const s = uo(i, o);
2441
2441
  let l = s;
2442
- if (a.has(s) && (l = `${s}__${i}`), l === t) return o;
2443
- a.set(s, o), i++;
2442
+ if (a.has(s) && (l = `${s}__${o}`), l === t) return i;
2443
+ a.set(s, i), o++;
2444
2444
  }
2445
2445
  return null;
2446
2446
  }
2447
- function wn(e, t) {
2448
- const r = hi(e, t);
2449
- return r ? Pt(r) ? { el: r } : { el: null, reason: "private" } : { el: null, reason: "not_found" };
2447
+ function bn(e, t) {
2448
+ const r = fo(e, t);
2449
+ return r ? Dt(r) ? { el: r } : { el: null, reason: "private" } : { el: null, reason: "not_found" };
2450
2450
  }
2451
- function mi(e, t) {
2452
- const r = e instanceof HTMLInputElement ? HTMLInputElement.prototype : e instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLSelectElement.prototype, i = Object.getOwnPropertyDescriptor(r, "value"), a = i == null ? void 0 : i.set;
2451
+ function po(e, t) {
2452
+ const r = e instanceof HTMLInputElement ? HTMLInputElement.prototype : e instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLSelectElement.prototype, o = Object.getOwnPropertyDescriptor(r, "value"), a = o == null ? void 0 : o.set;
2453
2453
  a ? a.call(e, t) : e.value = t;
2454
2454
  }
2455
- function gi(e, t, r = {}) {
2456
- const i = r.triggerInput ?? !0, a = r.triggerChange ?? !0;
2455
+ function ho(e, t, r = {}) {
2456
+ const o = r.triggerInput ?? !0, a = r.triggerChange ?? !0;
2457
2457
  if (e instanceof HTMLInputElement && (e.type === "checkbox" || e.type === "radio")) {
2458
- const o = Object.getOwnPropertyDescriptor(
2458
+ const i = Object.getOwnPropertyDescriptor(
2459
2459
  HTMLInputElement.prototype,
2460
2460
  "checked"
2461
- ), s = o == null ? void 0 : o.set, l = t === "true" || t === "1" || t === "on";
2462
- s ? s.call(e, l) : e.checked = l, i && e.dispatchEvent(new Event("input", { bubbles: !0 })), a && e.dispatchEvent(new Event("change", { bubbles: !0 }));
2461
+ ), s = i == null ? void 0 : i.set, l = t === "true" || t === "1" || t === "on";
2462
+ s ? s.call(e, l) : e.checked = l, o && e.dispatchEvent(new Event("input", { bubbles: !0 })), a && e.dispatchEvent(new Event("change", { bubbles: !0 }));
2463
2463
  return;
2464
2464
  }
2465
- mi(e, t), i && e.dispatchEvent(new Event("input", { bubbles: !0 })), a && e.dispatchEvent(new Event("change", { bubbles: !0 }));
2465
+ po(e, t), o && e.dispatchEvent(new Event("input", { bubbles: !0 })), a && e.dispatchEvent(new Event("change", { bubbles: !0 }));
2466
2466
  }
2467
- function _n(e, t) {
2467
+ function wn(e, t) {
2468
2468
  if (!t) return null;
2469
2469
  const r = t.replace(/"/g, '\\"');
2470
2470
  try {
@@ -2474,23 +2474,23 @@ function _n(e, t) {
2474
2474
  if (s) return s;
2475
2475
  } catch {
2476
2476
  }
2477
- const i = e.querySelector(
2477
+ const o = e.querySelector(
2478
2478
  `form[name="${r}"]`
2479
2479
  );
2480
- if (i) return i;
2480
+ if (o) return o;
2481
2481
  const a = e.querySelector(
2482
2482
  `form[data-ll-intent="${r}"]`
2483
2483
  );
2484
2484
  if (a) return a;
2485
- const o = Array.from(e.querySelectorAll("form"));
2486
- for (const s of o) {
2485
+ const i = Array.from(e.querySelectorAll("form"));
2486
+ for (const s of i) {
2487
2487
  const l = s.getAttribute("data-ll-intent");
2488
- if (l && yi(l) === t) return s;
2488
+ if (l && mo(l) === t) return s;
2489
2489
  }
2490
2490
  if (/^form_\d+$/.test(t)) {
2491
2491
  const s = parseInt(t.slice(5), 10);
2492
2492
  let l = 0;
2493
- for (const c of o)
2493
+ for (const c of i)
2494
2494
  if (!(c.id || c.getAttribute("name") || c.getAttribute("data-ll-intent"))) {
2495
2495
  if (l === s) return c;
2496
2496
  l++;
@@ -2498,10 +2498,10 @@ function _n(e, t) {
2498
2498
  }
2499
2499
  return null;
2500
2500
  }
2501
- function yi(e) {
2501
+ function mo(e) {
2502
2502
  return e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 60) || null;
2503
2503
  }
2504
- function vi() {
2504
+ function go() {
2505
2505
  if (typeof window > "u" || typeof document > "u")
2506
2506
  return !1;
2507
2507
  const e = document.scrollingElement || document.documentElement;
@@ -2509,44 +2509,44 @@ function vi() {
2509
2509
  const t = window.getComputedStyle(e);
2510
2510
  return !(t.overflowY === "hidden" || t.overflowY === "clip");
2511
2511
  }
2512
- function bi(e) {
2512
+ function yo(e) {
2513
2513
  if (!(e instanceof HTMLElement)) return !1;
2514
2514
  const r = window.getComputedStyle(e).overflowY;
2515
2515
  return !(r !== "auto" && r !== "scroll" || e.scrollHeight <= e.clientHeight + 2);
2516
2516
  }
2517
- function wi() {
2517
+ function vo() {
2518
2518
  if (typeof document > "u") return null;
2519
2519
  const e = Array.from(
2520
2520
  document.querySelectorAll("body, body *")
2521
2521
  );
2522
2522
  let t = null, r = 0;
2523
- for (const i of e) {
2524
- if (!bi(i)) continue;
2525
- const a = i.getBoundingClientRect();
2526
- if (a.bottom <= 0 || a.top >= window.innerHeight || a.right <= 0 || a.left >= window.innerWidth || a.width <= 0 || a.height <= 0 || i.closest(".ll-widget")) continue;
2527
- const o = a.width * a.height;
2528
- o > r && (r = o, t = i);
2523
+ for (const o of e) {
2524
+ if (!yo(o)) continue;
2525
+ const a = o.getBoundingClientRect();
2526
+ if (a.bottom <= 0 || a.top >= window.innerHeight || a.right <= 0 || a.left >= window.innerWidth || a.width <= 0 || a.height <= 0 || o.closest(".ll-widget")) continue;
2527
+ const i = a.width * a.height;
2528
+ i > r && (r = i, t = o);
2529
2529
  }
2530
2530
  return t;
2531
2531
  }
2532
- function _i() {
2532
+ function bo() {
2533
2533
  if (typeof window > "u")
2534
2534
  return null;
2535
- if (vi()) return window;
2536
- const e = wi();
2535
+ if (go()) return window;
2536
+ const e = vo();
2537
2537
  return e || window;
2538
2538
  }
2539
- function xn(e) {
2539
+ function _n(e) {
2540
2540
  return e instanceof Window ? e.innerHeight || 0 : e.clientHeight || 0;
2541
2541
  }
2542
- function xi(e) {
2542
+ function wo(e) {
2543
2543
  var t, r;
2544
2544
  return e instanceof Window ? typeof document > "u" ? 0 : Math.max(
2545
2545
  ((t = document.body) == null ? void 0 : t.scrollHeight) ?? 0,
2546
2546
  ((r = document.documentElement) == null ? void 0 : r.scrollHeight) ?? 0
2547
2547
  ) : e.scrollHeight - e.clientHeight;
2548
2548
  }
2549
- const Li = /* @__PURE__ */ new Set([
2549
+ const _o = /* @__PURE__ */ new Set([
2550
2550
  "agent_state",
2551
2551
  "avatar_stream_ready",
2552
2552
  "avatar_active",
@@ -2576,29 +2576,30 @@ const Li = /* @__PURE__ */ new Set([
2576
2576
  // to onAgentCommand.
2577
2577
  "task_field_updated",
2578
2578
  "task_completed"
2579
- ]), Tn = $t(
2579
+ ]), Mn = Pt(
2580
2580
  function(t, r) {
2581
- var Kt, Jt, Xt, Zt, Qt, en, tn;
2581
+ var Gt, Kt, Jt, Xt, Zt, Qt, en;
2582
2582
  const {
2583
- agentId: i,
2583
+ agentId: o,
2584
2584
  apiKey: a,
2585
- baseUrl: o = "https://app.livelayer.studio",
2585
+ baseUrl: i = "https://app.livelayer.studio",
2586
2586
  sessionEndpoint: s,
2587
2587
  sessionBody: l,
2588
2588
  soundEffects: c,
2589
2589
  experienceMode: p = "WIDGET",
2590
2590
  autoConnect: w = !1,
2591
2591
  displayMode: m,
2592
- // No destructure default `undefined` here means "consumer didn't
2593
- // pin a preferred initial mode, infer it from the viewport." We
2594
- // resolve to "minimized" on mobile (a compact bottom bar) and
2595
- // "expanded" on desktop (the 400×560 panel) below, once isMobile
2596
- // is known. Consumers that explicitly pass any value get exactly
2597
- // what they asked for.
2598
- defaultDisplayMode: f,
2599
- onDisplayModeChange: T,
2592
+ // Initial display mode. Mobile gets a smaller card layout (not the
2593
+ // full-screen sheet) so "expanded" is the right default on every
2594
+ // viewport the prior 0.15.1-0.15.3 mobile-flip-to-minimized
2595
+ // logic was solving the wrong problem (user actually wanted the
2596
+ // expanded widget but card-sized, not the bottom bar that
2597
+ // minimized produced). The card sizing now lives in CSS — see
2598
+ // .ll-expanded--mobile in styles.css.
2599
+ defaultDisplayMode: f = "expanded",
2600
+ onDisplayModeChange: R,
2600
2601
  position: _ = "bottom-right",
2601
- mobileBreakpoint: v = 640,
2602
+ mobileBreakpoint: y = 640,
2602
2603
  persistKey: u = "ll-widget",
2603
2604
  disablePersistence: h = !1,
2604
2605
  teamMembers: L,
@@ -2614,87 +2615,72 @@ const Li = /* @__PURE__ */ new Set([
2614
2615
  allowTyping: j = !0,
2615
2616
  showMinimize: S,
2616
2617
  showClose: Z,
2617
- chromeless: we = !1,
2618
+ chromeless: _e = !1,
2618
2619
  floatingChromeContainer: de = null,
2619
- compactControls: Oe = !1,
2620
- transforming: Be = !1,
2620
+ compactControls: He = !1,
2621
+ transforming: Oe = !1,
2621
2622
  transformingLabel: X = "Transforming…",
2622
- showOn: Ne,
2623
- hideOn: _e,
2623
+ showOn: Se,
2624
+ hideOn: xe,
2624
2625
  pathname: F,
2625
- onNavigate: oe,
2626
+ onNavigate: ie,
2626
2627
  onScrollToSelector: Y,
2627
- getPageContext: pe,
2628
+ getPageContext: fe,
2628
2629
  pageContextExtras: K,
2629
- getRoutes: rt,
2630
- onScrollPage: it,
2631
- onClick: mt,
2632
- capabilities: ot,
2633
- onConnect: Ae,
2634
- onDisconnect: Fe,
2635
- onTranscript: Ie,
2636
- onAgentState: We,
2637
- onConnectionStateChange: Me,
2638
- onAgentEvent: Re,
2639
- onAgentCommand: Te,
2640
- onCollect: De,
2630
+ getRoutes: et,
2631
+ onScrollPage: tt,
2632
+ onClick: ft,
2633
+ capabilities: nt,
2634
+ onConnect: Ne,
2635
+ onDisconnect: Be,
2636
+ onTranscript: Ae,
2637
+ onAgentState: Fe,
2638
+ onConnectionStateChange: Ie,
2639
+ onAgentEvent: Me,
2640
+ onAgentCommand: Re,
2641
+ onCollect: Te,
2641
2642
  controlledSession: $,
2642
2643
  className: Lt,
2643
- style: Pe,
2644
- zIndex: qe = 2147483647
2645
- } = t, he = _r(F), lt = Nr(he, Ne, _e);
2646
- R(() => {
2647
- li(), fi();
2648
- }, [he]);
2649
- const $e = A !== void 0, [Ue, kt] = N(() => {
2650
- var y;
2651
- return A ?? ((y = L == null ? void 0 : L[0]) == null ? void 0 : y.id);
2652
- }), ke = $e ? A : Ue, le = nt(
2653
- () => (L == null ? void 0 : L.find((y) => y.id === ke)) ?? null,
2654
- [L, ke]
2655
- ), at = (le == null ? void 0 : le.agentId) ?? i, ue = p === "EMBEDDED", ce = br(v), je = f ?? (ce ? "minimized" : "expanded"), [Ce, Ve] = yr({
2644
+ style: De,
2645
+ zIndex: We = 2147483647
2646
+ } = t, pe = vr(F), rt = Cr(pe, Se, xe);
2647
+ T(() => {
2648
+ ro(), co();
2649
+ }, [pe]);
2650
+ const Pe = A !== void 0, [qe, kt] = N(() => {
2651
+ var v;
2652
+ return A ?? ((v = L == null ? void 0 : L[0]) == null ? void 0 : v.id);
2653
+ }), Ce = Pe ? A : qe, le = Qe(
2654
+ () => (L == null ? void 0 : L.find((v) => v.id === Ce)) ?? null,
2655
+ [L, Ce]
2656
+ ), ot = (le == null ? void 0 : le.agentId) ?? o, he = p === "EMBEDDED", me = gr(y), [Ue, je] = hr({
2656
2657
  value: m,
2657
- defaultValue: je,
2658
- onChange: T,
2658
+ defaultValue: f,
2659
+ onChange: R,
2659
2660
  persistKey: u,
2660
- disablePersistence: ue || h
2661
- }), ct = M(!1);
2662
- R(() => {
2663
- if (ct.current || m !== void 0 || f !== void 0 || ue || h) return;
2664
- const y = En(`${u}:display-mode`);
2665
- y && y !== "expanded" || (ce && Ce === "expanded" && Ve("minimized"), ct.current = !0);
2666
- }, [
2667
- ce,
2668
- Ce,
2669
- f,
2670
- m,
2671
- ue,
2672
- h,
2673
- u,
2674
- Ve
2675
- ]);
2676
- const fe = ue ? "expanded" : Ce, xe = ue ? () => {
2677
- } : Ve, Ct = S ?? !ue, Ye = Z ?? !ue, Ee = or(), ae = ar(), me = cr(), ze = dr(), ge = ur(), [Se, Ge] = N(!1), [Ke, gt] = N(!1), [Je, g] = N(!1), [Q, Dn] = N(!1), [Et, Pn] = N(!1), yt = Ir({ baseUrl: o, config: c }), vt = M(yt);
2661
+ disablePersistence: he || h
2662
+ }), ae = he ? "expanded" : Ue, ge = he ? () => {
2663
+ } : je, pt = S ?? !he, ht = Z ?? !he, $e = tr(), se = rr(), ue = ir(), Ee = lr(), it = ar(), [mt, lt] = N(!1), [ye, Le] = N(!1), [Ve, Ye] = N(!1), [Ct, gt] = N(!1), [g, Q] = N(!1), yt = Sr({ baseUrl: i, config: c }), vt = M(yt);
2678
2664
  vt.current = yt;
2679
- const St = M(oe), Nt = M(Y), At = M(it), It = M(mt), Ot = M(pe), Bt = M(K), Ft = M(rt), Mt = M(ot), ye = M(null);
2680
- St.current = oe, Nt.current = Y, At.current = it, It.current = mt, Ot.current = pe, Bt.current = K, Ft.current = rt, Mt.current = ot;
2681
- function ve(y) {
2682
- const d = Mt.current;
2683
- return d ? d.includes(y) : !0;
2665
+ const Et = M(ie), St = M(Y), Nt = M(tt), At = M(ft), Ht = M(fe), Ot = M(K), Bt = M(et), It = M(nt), ve = M(null);
2666
+ Et.current = ie, St.current = Y, Nt.current = tt, At.current = ft, Ht.current = fe, Ot.current = K, Bt.current = et, It.current = nt;
2667
+ function be(v) {
2668
+ const d = It.current;
2669
+ return d ? d.includes(v) : !0;
2684
2670
  }
2685
- function be(y, d) {
2671
+ function we(v, d) {
2686
2672
  console.warn(
2687
- `[LiveLayer] Agent command "${y}" blocked — capability "${d}" not in allowlist. See https://livelayer.studio/docs/react/capabilities`
2673
+ `[LiveLayer] Agent command "${v}" blocked — capability "${d}" not in allowlist. See https://livelayer.studio/docs/react/capabilities`
2688
2674
  );
2689
2675
  }
2690
- const dt = E(
2691
- (y) => {
2692
- var J, re, Le, ft;
2693
- const d = y;
2676
+ const at = E(
2677
+ (v) => {
2678
+ var J, re, ke, ct;
2679
+ const d = v;
2694
2680
  if (!(!d.type || typeof d.type != "string")) {
2695
- if (Re == null || Re({ eventName: d.type, data: y }), d.type === "navigate") {
2696
- if (!ve("navigate")) {
2697
- be("navigate", "navigate");
2681
+ if (Me == null || Me({ eventName: d.type, data: v }), d.type === "navigate") {
2682
+ if (!be("navigate")) {
2683
+ we("navigate", "navigate");
2698
2684
  return;
2699
2685
  }
2700
2686
  const k = typeof d.href == "string" ? d.href : null;
@@ -2704,9 +2690,9 @@ const Li = /* @__PURE__ */ new Set([
2704
2690
  );
2705
2691
  return;
2706
2692
  }
2707
- if (vt.current.playPageChange(), St.current) {
2693
+ if (vt.current.playPageChange(), Et.current) {
2708
2694
  try {
2709
- St.current(k);
2695
+ Et.current(k);
2710
2696
  } catch (D) {
2711
2697
  console.warn(
2712
2698
  `[LiveLayer] onNavigate threw for "${k}". Falling back. Error:`,
@@ -2736,16 +2722,16 @@ const Li = /* @__PURE__ */ new Set([
2736
2722
  return;
2737
2723
  }
2738
2724
  if (d.type === "scroll_to") {
2739
- if (!ve("scroll")) {
2740
- be("scroll_to", "scroll");
2725
+ if (!be("scroll")) {
2726
+ we("scroll_to", "scroll");
2741
2727
  return;
2742
2728
  }
2743
2729
  const k = typeof d.selector == "string" ? d.selector : null;
2744
2730
  if (!k) return;
2745
2731
  const D = d.behavior === "instant" ? "instant" : "smooth";
2746
- if (Nt.current) {
2732
+ if (St.current) {
2747
2733
  try {
2748
- Nt.current(
2734
+ St.current(
2749
2735
  k,
2750
2736
  D
2751
2737
  );
@@ -2778,20 +2764,20 @@ const Li = /* @__PURE__ */ new Set([
2778
2764
  return;
2779
2765
  }
2780
2766
  if (d.type === "request_page_context") {
2781
- if (!ve("read_page")) {
2782
- be("request_page_context", "read_page");
2767
+ if (!be("read_page")) {
2768
+ we("request_page_context", "read_page");
2783
2769
  return;
2784
2770
  }
2785
- const k = typeof d.requestId == "string" ? d.requestId : void 0, D = (J = ye.current) == null ? void 0 : J.call(ye), W = (G) => {
2771
+ const k = typeof d.requestId == "string" ? d.requestId : void 0, D = (J = ve.current) == null ? void 0 : J.call(ve), W = (G) => {
2786
2772
  const z = D, te = z == null ? void 0 : z.localParticipant;
2787
2773
  if (te != null && te.publishData)
2788
2774
  try {
2789
- const se = k ? { ...G, requestId: k } : G, Ze = new TextEncoder().encode(JSON.stringify(se));
2790
- te.publishData(Ze, { reliable: !0 });
2791
- } catch (se) {
2792
- console.warn("[LiveLayer] publishData failed.", se);
2775
+ const ce = k ? { ...G, requestId: k } : G, Ke = new TextEncoder().encode(JSON.stringify(ce));
2776
+ te.publishData(Ke, { reliable: !0 });
2777
+ } catch (ce) {
2778
+ console.warn("[LiveLayer] publishData failed.", ce);
2793
2779
  }
2794
- }, H = Bt.current, V = Ot.current;
2780
+ }, H = Ot.current, V = Ht.current;
2795
2781
  try {
2796
2782
  if (V) {
2797
2783
  const G = V(H);
@@ -2802,7 +2788,7 @@ const Li = /* @__PURE__ */ new Set([
2802
2788
  z
2803
2789
  ), W({
2804
2790
  type: "page_context",
2805
- context: vn(H)
2791
+ context: yn(H)
2806
2792
  });
2807
2793
  });
2808
2794
  return;
@@ -2812,7 +2798,7 @@ const Li = /* @__PURE__ */ new Set([
2812
2798
  }
2813
2799
  W({
2814
2800
  type: "page_context",
2815
- context: vn(H)
2801
+ context: yn(H)
2816
2802
  });
2817
2803
  } catch (G) {
2818
2804
  console.warn(
@@ -2826,8 +2812,8 @@ const Li = /* @__PURE__ */ new Set([
2826
2812
  return;
2827
2813
  }
2828
2814
  if (d.type === "scroll_page") {
2829
- if (!ve("scroll")) {
2830
- be("scroll_page", "scroll");
2815
+ if (!be("scroll")) {
2816
+ we("scroll_page", "scroll");
2831
2817
  return;
2832
2818
  }
2833
2819
  const k = d.direction;
@@ -2838,9 +2824,9 @@ const Li = /* @__PURE__ */ new Set([
2838
2824
  return;
2839
2825
  }
2840
2826
  const D = d.behavior === "instant" ? "instant" : "smooth";
2841
- if (At.current) {
2827
+ if (Nt.current) {
2842
2828
  try {
2843
- At.current(
2829
+ Nt.current(
2844
2830
  k,
2845
2831
  D
2846
2832
  );
@@ -2850,17 +2836,17 @@ const Li = /* @__PURE__ */ new Set([
2850
2836
  return;
2851
2837
  }
2852
2838
  if (typeof window > "u") return;
2853
- const W = { behavior: D }, H = _i(), V = (z) => {
2839
+ const W = { behavior: D }, H = bo(), V = (z) => {
2854
2840
  H instanceof Window ? H.scrollBy({ top: z, ...W }) : H.scrollBy({ top: z, ...W });
2855
2841
  }, G = (z) => {
2856
2842
  H instanceof Window ? H.scrollTo({ top: z, ...W }) : H.scrollTo({ top: z, ...W });
2857
2843
  };
2858
- k === "up" ? V(-xn(H)) : k === "down" ? V(xn(H)) : G(k === "top" ? 0 : xi(H));
2844
+ k === "up" ? V(-_n(H)) : k === "down" ? V(_n(H)) : G(k === "top" ? 0 : wo(H));
2859
2845
  return;
2860
2846
  }
2861
2847
  if (d.type === "click") {
2862
- if (!ve("click")) {
2863
- be("click", "click");
2848
+ if (!be("click")) {
2849
+ we("click", "click");
2864
2850
  return;
2865
2851
  }
2866
2852
  const k = typeof d.selector == "string" ? d.selector : null;
@@ -2868,9 +2854,9 @@ const Li = /* @__PURE__ */ new Set([
2868
2854
  console.warn("[LiveLayer] click: missing selector.");
2869
2855
  return;
2870
2856
  }
2871
- if (It.current) {
2857
+ if (At.current) {
2872
2858
  try {
2873
- It.current(k);
2859
+ At.current(k);
2874
2860
  } catch (W) {
2875
2861
  console.warn("[LiveLayer] onClick threw.", W);
2876
2862
  }
@@ -2902,8 +2888,8 @@ const Li = /* @__PURE__ */ new Set([
2902
2888
  return;
2903
2889
  }
2904
2890
  if (d.type === "fill_form" || d.type === "focus_field") {
2905
- if (!ve("fill_forms")) {
2906
- be(d.type, "fill_forms");
2891
+ if (!be("fill_forms")) {
2892
+ we(d.type, "fill_forms");
2907
2893
  return;
2908
2894
  }
2909
2895
  if (typeof document > "u") return;
@@ -2913,7 +2899,7 @@ const Li = /* @__PURE__ */ new Set([
2913
2899
  console.warn(`[LiveLayer] ${d.type}: missing formId.`);
2914
2900
  return;
2915
2901
  }
2916
- const D = _n(document, k);
2902
+ const D = wn(document, k);
2917
2903
  if (!D) {
2918
2904
  console.warn(
2919
2905
  `[LiveLayer] ${d.type}: no <form> matched id="${k}" (or matching name / data-ll-intent slug). Forms are auto-discovered — make sure the form has an \`id\`, \`name\`, or \`data-ll-intent\` attribute the agent observed in PageContext.forms.`
@@ -2932,7 +2918,7 @@ const Li = /* @__PURE__ */ new Set([
2932
2918
  console.warn("[LiveLayer] focus_field: missing fieldName.");
2933
2919
  return;
2934
2920
  }
2935
- const V = wn(D, H);
2921
+ const V = bn(D, H);
2936
2922
  if (V.el === null) {
2937
2923
  V.reason === "private" ? console.warn(
2938
2924
  `[LiveLayer] focus_field: field "${H}" is privacy-protected and not focusable.`
@@ -2951,7 +2937,7 @@ const Li = /* @__PURE__ */ new Set([
2951
2937
  }
2952
2938
  for (const [H, V] of Object.entries(W)) {
2953
2939
  if (typeof V != "string") continue;
2954
- const G = wn(D, H);
2940
+ const G = bn(D, H);
2955
2941
  if (G.el === null) {
2956
2942
  G.reason === "private" ? console.warn(
2957
2943
  `[LiveLayer] fill_form: field "${H}" is privacy-protected (password / cc-* / data-ll-private). Skipping.`
@@ -2961,7 +2947,7 @@ const Li = /* @__PURE__ */ new Set([
2961
2947
  continue;
2962
2948
  }
2963
2949
  try {
2964
- gi(G.el, V);
2950
+ ho(G.el, V);
2965
2951
  } catch (z) {
2966
2952
  console.warn(
2967
2953
  `[LiveLayer] fill_form: failed to set "${H}".`,
@@ -2972,8 +2958,8 @@ const Li = /* @__PURE__ */ new Set([
2972
2958
  return;
2973
2959
  }
2974
2960
  if (d.type === "submit_form") {
2975
- if (!ve("submit_forms")) {
2976
- be("submit_form", "submit_forms");
2961
+ if (!be("submit_forms")) {
2962
+ we("submit_form", "submit_forms");
2977
2963
  return;
2978
2964
  }
2979
2965
  if (typeof document > "u") return;
@@ -2983,7 +2969,7 @@ const Li = /* @__PURE__ */ new Set([
2983
2969
  return;
2984
2970
  }
2985
2971
  vt.current.playConfirmation();
2986
- const D = _n(document, k);
2972
+ const D = wn(document, k);
2987
2973
  if (!D) {
2988
2974
  console.warn(
2989
2975
  `[LiveLayer] submit_form: no <form> matched id="${k}" (or matching name / data-ll-intent slug).`
@@ -2996,12 +2982,12 @@ const Li = /* @__PURE__ */ new Set([
2996
2982
  );
2997
2983
  return;
2998
2984
  }
2999
- const W = typeof d.requestId == "string" ? d.requestId : void 0, H = (Le = ye.current) == null ? void 0 : Le.call(ye), V = (te) => {
3000
- const se = H, Ze = se == null ? void 0 : se.localParticipant;
3001
- if (Ze != null && Ze.publishData)
2985
+ const W = typeof d.requestId == "string" ? d.requestId : void 0, H = (ke = ve.current) == null ? void 0 : ke.call(ve), V = (te) => {
2986
+ const ce = H, Ke = ce == null ? void 0 : ce.localParticipant;
2987
+ if (Ke != null && Ke.publishData)
3002
2988
  try {
3003
- const Gn = W ? { ...te, requestId: W } : te, Kn = new TextEncoder().encode(JSON.stringify(Gn));
3004
- Ze.publishData(Kn, { reliable: !0 });
2989
+ const Un = W ? { ...te, requestId: W } : te, jn = new TextEncoder().encode(JSON.stringify(Un));
2990
+ Ke.publishData(jn, { reliable: !0 });
3005
2991
  } catch {
3006
2992
  }
3007
2993
  };
@@ -3030,53 +3016,53 @@ const Li = /* @__PURE__ */ new Set([
3030
3016
  return;
3031
3017
  }
3032
3018
  if (d.type === "request_routes") {
3033
- if (!ve("read_page")) {
3034
- be("request_routes", "read_page");
3019
+ if (!be("read_page")) {
3020
+ we("request_routes", "read_page");
3035
3021
  return;
3036
3022
  }
3037
- const k = typeof d.requestId == "string" ? d.requestId : void 0, W = (ft = ye.current) == null ? void 0 : ft.call(ye), H = W == null ? void 0 : W.localParticipant;
3023
+ const k = typeof d.requestId == "string" ? d.requestId : void 0, W = (ct = ve.current) == null ? void 0 : ct.call(ve), H = W == null ? void 0 : W.localParticipant;
3038
3024
  if (!(H != null && H.publishData)) return;
3039
3025
  const V = (z) => {
3040
3026
  try {
3041
- const te = k ? { type: "routes", routes: z, requestId: k } : { type: "routes", routes: z }, se = new TextEncoder().encode(JSON.stringify(te));
3042
- H.publishData(se, { reliable: !0 });
3027
+ const te = k ? { type: "routes", routes: z, requestId: k } : { type: "routes", routes: z }, ce = new TextEncoder().encode(JSON.stringify(te));
3028
+ H.publishData(ce, { reliable: !0 });
3043
3029
  } catch (te) {
3044
3030
  console.warn("[LiveLayer] request_routes: publishData failed.", te);
3045
3031
  }
3046
- }, G = Ft.current;
3032
+ }, G = Bt.current;
3047
3033
  if (G) {
3048
3034
  try {
3049
- const z = G(), te = (se) => {
3050
- if (!Array.isArray(se)) {
3035
+ const z = G(), te = (ce) => {
3036
+ if (!Array.isArray(ce)) {
3051
3037
  V([]);
3052
3038
  return;
3053
3039
  }
3054
- V(se.map(si).slice(0, 200));
3040
+ V(ce.map(io).slice(0, 200));
3055
3041
  };
3056
- z instanceof Promise ? z.then(te).catch((se) => {
3042
+ z instanceof Promise ? z.then(te).catch((ce) => {
3057
3043
  console.warn(
3058
3044
  "[LiveLayer] getRoutes rejected; falling back to DOM walker.",
3059
- se
3060
- ), V(Tt());
3045
+ ce
3046
+ ), V(Rt());
3061
3047
  }) : te(z);
3062
3048
  } catch (z) {
3063
3049
  console.warn(
3064
3050
  "[LiveLayer] getRoutes threw; falling back to DOM walker.",
3065
3051
  z
3066
- ), V(Tt());
3052
+ ), V(Rt());
3067
3053
  }
3068
3054
  return;
3069
3055
  }
3070
3056
  try {
3071
- V(Tt());
3057
+ V(Rt());
3072
3058
  } catch (z) {
3073
3059
  console.warn("[LiveLayer] request_routes: extractRoutes threw.", z);
3074
3060
  }
3075
3061
  return;
3076
3062
  }
3077
3063
  if (d.type === "task_field_updated") {
3078
- if (!ve("collect_data")) {
3079
- be("task_field_updated", "collect_data");
3064
+ if (!be("collect_data")) {
3065
+ we("task_field_updated", "collect_data");
3080
3066
  return;
3081
3067
  }
3082
3068
  const k = {
@@ -3099,8 +3085,8 @@ const Li = /* @__PURE__ */ new Set([
3099
3085
  return;
3100
3086
  }
3101
3087
  if (d.type === "task_completed") {
3102
- if (!ve("collect_data")) {
3103
- be("task_completed", "collect_data");
3088
+ if (!be("collect_data")) {
3089
+ we("task_completed", "collect_data");
3104
3090
  return;
3105
3091
  }
3106
3092
  const k = d.result;
@@ -3120,7 +3106,7 @@ const Li = /* @__PURE__ */ new Set([
3120
3106
  } catch {
3121
3107
  }
3122
3108
  try {
3123
- De == null || De(
3109
+ Te == null || Te(
3124
3110
  k
3125
3111
  );
3126
3112
  } catch (D) {
@@ -3128,40 +3114,40 @@ const Li = /* @__PURE__ */ new Set([
3128
3114
  }
3129
3115
  return;
3130
3116
  }
3131
- Li.has(d.type) || Te == null || Te(d);
3117
+ _o.has(d.type) || Re == null || Re(d);
3132
3118
  }
3133
3119
  },
3134
- [Te, Re, De]
3135
- ), ee = ir({
3136
- agentId: $ ? "__controlled__" : at,
3137
- baseUrl: o,
3120
+ [Re, Me, Te]
3121
+ ), ee = er({
3122
+ agentId: $ ? "__controlled__" : ot,
3123
+ baseUrl: i,
3138
3124
  apiKey: a,
3139
3125
  sessionEndpoint: s,
3140
3126
  sessionBody: l,
3141
- onDataMessage: $ ? void 0 : dt
3127
+ onDataMessage: $ ? void 0 : at
3142
3128
  });
3143
- R(() => {
3129
+ T(() => {
3144
3130
  if ($ != null && $.subscribeToDataMessages)
3145
- return $.subscribeToDataMessages(dt);
3146
- }, [$, dt]), ye.current = () => {
3147
- var y;
3148
- return (y = ee.getRoom) == null ? void 0 : y.call(ee);
3149
- }, R(() => {
3131
+ return $.subscribeToDataMessages(at);
3132
+ }, [$, at]), ve.current = () => {
3133
+ var v;
3134
+ return (v = ee.getRoom) == null ? void 0 : v.call(ee);
3135
+ }, T(() => {
3150
3136
  var J;
3151
3137
  if (typeof window > "u") return;
3152
- const y = ((J = window.location) == null ? void 0 : J.hostname) || "";
3153
- if (y === "localhost" || y === "127.0.0.1" || y === "0.0.0.0" || y.endsWith(".local") || y.endsWith(".test"))
3138
+ const v = ((J = window.location) == null ? void 0 : J.hostname) || "";
3139
+ if (v === "localhost" || v === "127.0.0.1" || v === "0.0.0.0" || v.endsWith(".local") || v.endsWith(".test"))
3154
3140
  return window.__livelayerSimulateCommand = (re) => {
3155
3141
  try {
3156
- dt(re);
3157
- } catch (Le) {
3158
- console.warn("[LiveLayer] simulate-command threw:", Le);
3142
+ at(re);
3143
+ } catch (ke) {
3144
+ console.warn("[LiveLayer] simulate-command threw:", ke);
3159
3145
  }
3160
3146
  }, () => {
3161
3147
  delete window.__livelayerSimulateCommand;
3162
3148
  };
3163
- }, [dt]);
3164
- const C = nt(() => $ ? {
3149
+ }, [at]);
3150
+ const C = Qe(() => $ ? {
3165
3151
  connectionState: $.connectionState,
3166
3152
  agentState: $.agentState,
3167
3153
  transcript: $.transcript,
@@ -3192,27 +3178,27 @@ const Li = /* @__PURE__ */ new Set([
3192
3178
  disconnect: ee.disconnect,
3193
3179
  getRoom: ee.getRoom,
3194
3180
  isControlled: !1
3195
- }, [$, ee]), Wt = M(C);
3196
- Wt.current = C;
3197
- const qt = M($);
3198
- qt.current = $, Xn(
3181
+ }, [$, ee]), Ft = M(C);
3182
+ Ft.current = C;
3183
+ const Wt = M($);
3184
+ Wt.current = $, Yn(
3199
3185
  r,
3200
3186
  () => ({
3201
- sendData: async (y) => {
3202
- var Le, ft;
3203
- const d = qt.current;
3187
+ sendData: async (v) => {
3188
+ var ke, ct;
3189
+ const d = Wt.current;
3204
3190
  if (d != null && d.publishData) {
3205
3191
  try {
3206
- await d.publishData(y);
3192
+ await d.publishData(v);
3207
3193
  } catch (k) {
3208
3194
  console.warn("[AvatarWidget] sendData (controlled) failed:", k);
3209
3195
  }
3210
3196
  return;
3211
3197
  }
3212
- const J = (ft = (Le = Wt.current) == null ? void 0 : Le.getRoom) == null ? void 0 : ft.call(Le), re = J == null ? void 0 : J.localParticipant;
3198
+ const J = (ct = (ke = Ft.current) == null ? void 0 : ke.getRoom) == null ? void 0 : ct.call(ke), re = J == null ? void 0 : J.localParticipant;
3213
3199
  if (re != null && re.publishData)
3214
3200
  try {
3215
- const k = new TextEncoder().encode(JSON.stringify(y));
3201
+ const k = new TextEncoder().encode(JSON.stringify(v));
3216
3202
  await re.publishData(k, { reliable: !0 });
3217
3203
  } catch (k) {
3218
3204
  console.warn("[AvatarWidget] sendData failed:", k);
@@ -3221,49 +3207,49 @@ const Li = /* @__PURE__ */ new Set([
3221
3207
  }),
3222
3208
  []
3223
3209
  );
3224
- const Ut = M(null);
3225
- R(() => {
3226
- const y = C.videoElement, d = Ut.current;
3227
- if (!(!y || !d))
3228
- return d.appendChild(y), () => {
3229
- y.parentNode === d && d.removeChild(y);
3210
+ const qt = M(null);
3211
+ T(() => {
3212
+ const v = C.videoElement, d = qt.current;
3213
+ if (!(!v || !d))
3214
+ return d.appendChild(v), () => {
3215
+ v.parentNode === d && d.removeChild(v);
3230
3216
  };
3231
- }, [C.videoElement]), R(() => {
3232
- const y = C.audioElement;
3233
- if (!y) return;
3217
+ }, [C.videoElement]), T(() => {
3218
+ const v = C.audioElement;
3219
+ if (!v) return;
3234
3220
  const d = document.createElement("div");
3235
- d.className = "ll-audio-sink", d.setAttribute("aria-hidden", "true"), d.style.cssText = "position:absolute;width:0;height:0;overflow:hidden;clip:rect(0 0 0 0);pointer-events:none;", d.appendChild(y), document.body.appendChild(d), Ee.attach(y);
3236
- const J = y.play();
3221
+ d.className = "ll-audio-sink", d.setAttribute("aria-hidden", "true"), d.style.cssText = "position:absolute;width:0;height:0;overflow:hidden;clip:rect(0 0 0 0);pointer-events:none;", d.appendChild(v), document.body.appendChild(d), $e.attach(v);
3222
+ const J = v.play();
3237
3223
  return J && typeof J.catch == "function" && J.catch((re) => {
3238
- (re == null ? void 0 : re.name) === "NotAllowedError" && Ge(!0);
3224
+ (re == null ? void 0 : re.name) === "NotAllowedError" && lt(!0);
3239
3225
  }), () => {
3240
- Ee.detach(), y.parentNode === d && d.removeChild(y), d.parentNode === document.body && document.body.removeChild(d);
3226
+ $e.detach(), v.parentNode === d && d.removeChild(v), d.parentNode === document.body && document.body.removeChild(d);
3241
3227
  };
3242
- }, [C.audioElement]), R(() => {
3228
+ }, [C.audioElement]), T(() => {
3243
3229
  if (C.isControlled || C.connectionState !== "connected") return;
3244
- const y = C.getRoom();
3245
- if (y)
3246
- return ae.setupMic(y).then(() => {
3247
- const d = ae.getMicStream();
3248
- d && Ee.attachStream(d, "mic");
3230
+ const v = C.getRoom();
3231
+ if (v)
3232
+ return se.setupMic(v).then(() => {
3233
+ const d = se.getMicStream();
3234
+ d && $e.attachStream(d, "mic");
3249
3235
  }).catch(() => {
3250
3236
  }), () => {
3251
- Ee.detachSlot("mic"), ae.teardownMic();
3237
+ $e.detachSlot("mic"), se.teardownMic();
3252
3238
  };
3253
- }, [C.isControlled, C.connectionState]), R(() => {
3239
+ }, [C.isControlled, C.connectionState]), T(() => {
3254
3240
  var d;
3255
3241
  if (C.connectionState !== "connected") return;
3256
- const y = C.isControlled ? (d = $ == null ? void 0 : $.getRoom) == null ? void 0 : d.call($) : C.getRoom();
3257
- if (y)
3258
- return me.attachRoom(y), ze.attachRoom(y), C.isControlled && ae.attachRoom(y), ge.refresh(), () => {
3259
- me.teardown(), ze.teardown();
3242
+ const v = C.isControlled ? (d = $ == null ? void 0 : $.getRoom) == null ? void 0 : d.call($) : C.getRoom();
3243
+ if (v)
3244
+ return ue.attachRoom(v), Ee.attachRoom(v), C.isControlled && se.attachRoom(v), it.refresh(), () => {
3245
+ ue.teardown(), Ee.teardown();
3260
3246
  };
3261
- }, [C.isControlled, C.connectionState, $]), R(() => {
3262
- const y = C.audioElement;
3263
- y && (y.muted = Et);
3264
- }, [C.audioElement, Et]);
3265
- const $n = E((y) => {
3266
- const d = { type: "user_message", text: y };
3247
+ }, [C.isControlled, C.connectionState, $]), T(() => {
3248
+ const v = C.audioElement;
3249
+ v && (v.muted = g);
3250
+ }, [C.audioElement, g]);
3251
+ const Rn = E((v) => {
3252
+ const d = { type: "user_message", text: v };
3267
3253
  if ($ != null && $.publishData) {
3268
3254
  try {
3269
3255
  $.publishData(d);
@@ -3278,256 +3264,256 @@ const Li = /* @__PURE__ */ new Set([
3278
3264
  J.localParticipant.publishData(re, { reliable: !0 });
3279
3265
  } catch {
3280
3266
  }
3281
- }, [C, $]), zn = E(() => {
3282
- Pn((y) => !y);
3267
+ }, [C, $]), Tn = E(() => {
3268
+ Q((v) => !v);
3283
3269
  }, []);
3284
- R(() => {
3285
- Me == null || Me(C.connectionState), C.connectionState === "connected" ? Ae == null || Ae() : C.connectionState === "disconnected" && (Fe == null || Fe());
3286
- }, [C.connectionState, Ae, Fe, Me]), R(() => {
3287
- Ie == null || Ie(C.transcript);
3288
- }, [C.transcript, Ie]), R(() => {
3289
- We == null || We(C.agentState);
3290
- }, [C.agentState, We]), R(() => {
3270
+ T(() => {
3271
+ Ie == null || Ie(C.connectionState), C.connectionState === "connected" ? Ne == null || Ne() : C.connectionState === "disconnected" && (Be == null || Be());
3272
+ }, [C.connectionState, Ne, Be, Ie]), T(() => {
3273
+ Ae == null || Ae(C.transcript);
3274
+ }, [C.transcript, Ae]), T(() => {
3275
+ Fe == null || Fe(C.agentState);
3276
+ }, [C.agentState, Fe]), T(() => {
3291
3277
  yt.setThinking(C.agentState === "thinking");
3292
3278
  }, [C.agentState, yt]);
3293
- const jt = M(!1);
3294
- R(() => {
3295
- !w || jt.current || lt && C.connectionState === "idle" && (jt.current = !0, C.connect());
3296
- }, [w, C.connectionState, C, lt]);
3297
- const Hn = E(
3298
- (y) => {
3299
- const d = L == null ? void 0 : L.find((J) => J.id === y);
3300
- d && (g(!1), y !== ke && (gt(!0), C.disconnect(), $e || kt(y), I == null || I(d)));
3279
+ const Ut = M(!1);
3280
+ T(() => {
3281
+ !w || Ut.current || rt && C.connectionState === "idle" && (Ut.current = !0, C.connect());
3282
+ }, [w, C.connectionState, C, rt]);
3283
+ const Dn = E(
3284
+ (v) => {
3285
+ const d = L == null ? void 0 : L.find((J) => J.id === v);
3286
+ d && (Ye(!1), v !== Ce && (Le(!0), C.disconnect(), Pe || kt(v), I == null || I(d)));
3301
3287
  },
3302
3288
  [
3303
3289
  L,
3304
- ke,
3290
+ Ce,
3305
3291
  C,
3306
- $e,
3292
+ Pe,
3307
3293
  I
3308
3294
  ]
3309
3295
  );
3310
- R(() => {
3311
- Ke && C.connectionState === "connected" && gt(!1);
3312
- }, [C.connectionState, Ke]), R(() => {
3313
- if (!Je) return;
3314
- const y = (d) => {
3315
- d.key === "Escape" && g(!1);
3296
+ T(() => {
3297
+ ye && C.connectionState === "connected" && Le(!1);
3298
+ }, [C.connectionState, ye]), T(() => {
3299
+ if (!Ve) return;
3300
+ const v = (d) => {
3301
+ d.key === "Escape" && Ye(!1);
3316
3302
  };
3317
- return window.addEventListener("keydown", y), () => window.removeEventListener("keydown", y);
3318
- }, [Je]);
3319
- const On = !!P || !!(le != null && le.avatarImageUrl) || C.isControlled, ut = fr(at, o, On);
3320
- ot === void 0 && ((Kt = ut.info) != null && Kt.capabilities) && (Mt.current = ut.info.capabilities);
3321
- const bt = (le == null ? void 0 : le.name) ?? O ?? ((Jt = C.agentConfig) == null ? void 0 : Jt.name) ?? ((Xt = ut.info) == null ? void 0 : Xt.name) ?? "Live Layer", Rt = (le == null ? void 0 : le.avatarImageUrl) ?? P ?? ((Zt = C.agentConfig) == null ? void 0 : Zt.avatarImageUrl) ?? ((Qt = ut.info) == null ? void 0 : Qt.avatarImageUrl) ?? null, Bn = U ?? ((en = C.agentConfig) == null ? void 0 : en.idleLoopUrl) ?? ((tn = ut.info) == null ? void 0 : tn.idleLoopUrl) ?? null, Fn = b ?? null, Wn = E(() => xe("expanded"), [xe]), qn = E(
3322
- () => xe("minimized"),
3323
- [xe]
3324
- ), Vt = E(() => {
3325
- C.disconnect(), xe("hidden");
3326
- }, [C, xe]), Un = E(() => {
3327
- const y = C.audioElement;
3328
- y && y.play().then(() => Ge(!1)).catch(() => {
3303
+ return window.addEventListener("keydown", v), () => window.removeEventListener("keydown", v);
3304
+ }, [Ve]);
3305
+ const Pn = !!P || !!(le != null && le.avatarImageUrl) || C.isControlled, st = sr(ot, i, Pn);
3306
+ nt === void 0 && ((Gt = st.info) != null && Gt.capabilities) && (It.current = st.info.capabilities);
3307
+ const bt = (le == null ? void 0 : le.name) ?? O ?? ((Kt = C.agentConfig) == null ? void 0 : Kt.name) ?? ((Jt = st.info) == null ? void 0 : Jt.name) ?? "Live Layer", Mt = (le == null ? void 0 : le.avatarImageUrl) ?? P ?? ((Xt = C.agentConfig) == null ? void 0 : Xt.avatarImageUrl) ?? ((Zt = st.info) == null ? void 0 : Zt.avatarImageUrl) ?? null, $n = U ?? ((Qt = C.agentConfig) == null ? void 0 : Qt.idleLoopUrl) ?? ((en = st.info) == null ? void 0 : en.idleLoopUrl) ?? null, zn = b ?? null, Hn = E(() => ge("expanded"), [ge]), On = E(
3308
+ () => ge("minimized"),
3309
+ [ge]
3310
+ ), jt = E(() => {
3311
+ C.disconnect(), ge("hidden");
3312
+ }, [C, ge]), Bn = E(() => {
3313
+ const v = C.audioElement;
3314
+ v && v.play().then(() => lt(!1)).catch(() => {
3329
3315
  });
3330
- }, [C.audioElement]), jn = E(() => {
3331
- Ge(!1), C.connect();
3332
- }, [C]), Xe = {
3333
- ...Pe,
3334
- ...ue ? {} : { zIndex: qe }
3316
+ }, [C.audioElement]), Fn = E(() => {
3317
+ lt(!1), C.connect();
3318
+ }, [C]), Ge = {
3319
+ ...De,
3320
+ ...he ? {} : { zIndex: We }
3335
3321
  };
3336
- q.primaryColor && (Xe["--ll-color-primary"] = q.primaryColor), q.accentColor && (Xe["--ll-color-accent"] = q.accentColor), q.backgroundColor && (Xe["--ll-color-bg"] = q.backgroundColor), q.textColor && (Xe["--ll-color-fg"] = q.textColor);
3337
- const Vn = [
3322
+ q.primaryColor && (Ge["--ll-color-primary"] = q.primaryColor), q.accentColor && (Ge["--ll-color-accent"] = q.accentColor), q.backgroundColor && (Ge["--ll-color-bg"] = q.backgroundColor), q.textColor && (Ge["--ll-color-fg"] = q.textColor);
3323
+ const Wn = [
3338
3324
  "ll-widget",
3339
- `ll-widget--${fe}`,
3340
- `ll-widget--${ce ? "mobile" : "desktop"}`,
3325
+ `ll-widget--${ae}`,
3326
+ `ll-widget--${me ? "mobile" : "desktop"}`,
3341
3327
  Lt
3342
3328
  ].filter(Boolean).join(" ");
3343
- if (!lt) return null;
3344
- const Yn = /* @__PURE__ */ n(
3329
+ if (!rt) return null;
3330
+ const qn = /* @__PURE__ */ n(
3345
3331
  "div",
3346
3332
  {
3347
- className: Vn,
3348
- style: Xe,
3349
- "data-display-mode": fe,
3333
+ className: Wn,
3334
+ style: Ge,
3335
+ "data-display-mode": ae,
3350
3336
  "data-position": _,
3351
3337
  "data-experience-mode": p === "EMBEDDED" ? "embedded" : "widget",
3352
- children: fe === "expanded" && /* @__PURE__ */ n(
3353
- Yr,
3338
+ children: ae === "expanded" && /* @__PURE__ */ n(
3339
+ Ur,
3354
3340
  {
3355
3341
  position: _,
3356
- isMobile: ce,
3342
+ isMobile: me,
3357
3343
  agentName: bt,
3358
- avatarImageUrl: Rt,
3359
- idleLoopUrl: Bn,
3360
- greeting: Fn,
3344
+ avatarImageUrl: Mt,
3345
+ idleLoopUrl: $n,
3346
+ greeting: zn,
3361
3347
  branding: q,
3362
3348
  teamMembers: L,
3363
- currentTeamMemberId: ke,
3364
- isSwitchingTeamMember: Ke,
3365
- teamSwitcherOpen: Je,
3366
- onToggleTeamSwitcher: () => g((y) => !y),
3367
- onSelectTeamMember: Hn,
3349
+ currentTeamMemberId: Ce,
3350
+ isSwitchingTeamMember: ye,
3351
+ teamSwitcherOpen: Ve,
3352
+ onToggleTeamSwitcher: () => Ye((v) => !v),
3353
+ onSelectTeamMember: Dn,
3368
3354
  connectionState: C.connectionState,
3369
3355
  agentState: C.agentState,
3370
3356
  transcript: C.transcript,
3371
- isMuted: ae.isMuted,
3372
- micDevices: ge.mics,
3373
- activeMicId: ae.activeDeviceId,
3374
- isCameraEnabled: me.isEnabled,
3375
- cameraPreviewEl: me.previewEl,
3376
- cameraDevices: ge.cameras,
3377
- activeCameraId: me.activeDeviceId,
3378
- isScreenShareEnabled: ze.isEnabled,
3379
- screenPreviewEl: ze.previewEl,
3380
- isSpeakerMuted: Et,
3357
+ isMuted: se.isMuted,
3358
+ micDevices: it.mics,
3359
+ activeMicId: se.activeDeviceId,
3360
+ isCameraEnabled: ue.isEnabled,
3361
+ cameraPreviewEl: ue.previewEl,
3362
+ cameraDevices: it.cameras,
3363
+ activeCameraId: ue.activeDeviceId,
3364
+ isScreenShareEnabled: Ee.isEnabled,
3365
+ screenPreviewEl: Ee.previewEl,
3366
+ isSpeakerMuted: g,
3381
3367
  allowCamera: ne,
3382
3368
  allowScreenShare: B,
3383
3369
  allowTyping: j,
3384
- showMinimize: Ct,
3385
- showClose: Ye,
3386
- chromeless: we,
3387
- compactControls: Oe,
3388
- transforming: Be,
3370
+ showMinimize: pt,
3371
+ showClose: ht,
3372
+ chromeless: _e,
3373
+ compactControls: He,
3374
+ transforming: Oe,
3389
3375
  transformingLabel: X,
3390
- languageMenuOpen: Q,
3391
- onToggleLanguageMenu: () => Dn((y) => !y),
3392
- needsUserGesture: Se,
3376
+ languageMenuOpen: Ct,
3377
+ onToggleLanguageMenu: () => gt((v) => !v),
3378
+ needsUserGesture: mt,
3393
3379
  canResume: C.canResume,
3394
- micError: ae.micError,
3380
+ micError: se.micError,
3395
3381
  error: C.error,
3396
- avatarVideoContainerRef: Ut,
3382
+ avatarVideoContainerRef: qt,
3397
3383
  agentVideoEl: C.videoElement,
3398
3384
  onConnect: () => void C.connect(),
3399
3385
  onDisconnect: () => C.disconnect(),
3400
- onRetry: jn,
3401
- onResumeAudio: Un,
3402
- onToggleMute: ae.toggleMute,
3403
- onSwitchMicDevice: (y) => void ae.switchDevice(y),
3404
- onToggleCamera: () => void me.toggle(),
3405
- onSwitchCameraDevice: (y) => void me.switchDevice(y),
3406
- onToggleScreenShare: () => void ze.toggle(),
3407
- onToggleSpeaker: zn,
3408
- onSendMessage: $n,
3409
- onMinimize: qn,
3410
- onClose: Vt,
3411
- onClearMicError: ae.clearError
3386
+ onRetry: Fn,
3387
+ onResumeAudio: Bn,
3388
+ onToggleMute: se.toggleMute,
3389
+ onSwitchMicDevice: (v) => void se.switchDevice(v),
3390
+ onToggleCamera: () => void ue.toggle(),
3391
+ onSwitchCameraDevice: (v) => void ue.switchDevice(v),
3392
+ onToggleScreenShare: () => void Ee.toggle(),
3393
+ onToggleSpeaker: Tn,
3394
+ onSendMessage: Rn,
3395
+ onMinimize: On,
3396
+ onClose: jt,
3397
+ onClearMicError: se.clearError
3412
3398
  }
3413
3399
  )
3414
3400
  }
3415
- ), Yt = !ue && (fe === "hidden" || fe === "minimized") ? /* @__PURE__ */ x(
3401
+ ), Vt = !he && (ae === "hidden" || ae === "minimized") ? /* @__PURE__ */ x(
3416
3402
  "div",
3417
3403
  {
3418
3404
  className: [
3419
3405
  "ll-widget",
3420
3406
  "ll-widget--floating",
3421
- `ll-widget--${fe}`,
3422
- `ll-widget--${ce ? "mobile" : "desktop"}`
3407
+ `ll-widget--${ae}`,
3408
+ `ll-widget--${me ? "mobile" : "desktop"}`
3423
3409
  ].join(" "),
3424
- style: Xe,
3425
- "data-display-mode": fe,
3410
+ style: Ge,
3411
+ "data-display-mode": ae,
3426
3412
  "data-position": _,
3427
3413
  children: [
3428
- fe === "hidden" && /* @__PURE__ */ n(
3429
- $r,
3414
+ ae === "hidden" && /* @__PURE__ */ n(
3415
+ Tr,
3430
3416
  {
3431
3417
  position: _,
3432
- isMobile: ce,
3418
+ isMobile: me,
3433
3419
  isSpeaking: C.agentState === "speaking",
3434
- onExpand: () => xe("expanded"),
3420
+ onExpand: () => ge("expanded"),
3435
3421
  label: `Open ${bt} widget`,
3436
- avatarImageUrl: Rt,
3422
+ avatarImageUrl: Mt,
3437
3423
  agentName: bt,
3438
3424
  containerEl: de
3439
3425
  }
3440
3426
  ),
3441
- fe === "minimized" && /* @__PURE__ */ n(
3442
- Hr,
3427
+ ae === "minimized" && /* @__PURE__ */ n(
3428
+ Pr,
3443
3429
  {
3444
3430
  position: _,
3445
- isMobile: ce,
3431
+ isMobile: me,
3446
3432
  agentName: bt,
3447
- avatarImageUrl: Rt,
3433
+ avatarImageUrl: Mt,
3448
3434
  agentState: C.agentState,
3449
- isMuted: ae.isMuted,
3450
- audioLevel: Ee,
3451
- onExpand: Wn,
3452
- onToggleMute: ae.toggleMute,
3453
- onClose: Vt
3435
+ isMuted: se.isMuted,
3436
+ audioLevel: $e,
3437
+ onExpand: Hn,
3438
+ onToggleMute: se.toggleMute,
3439
+ onClose: jt
3454
3440
  }
3455
3441
  )
3456
3442
  ]
3457
3443
  }
3458
- ) : null, Gt = de ?? (typeof document < "u" ? document.body : null);
3459
- return /* @__PURE__ */ x(He, { children: [
3460
- Yn,
3461
- Yt && Gt && zt(Yt, Gt)
3444
+ ) : null, Yt = de ?? (typeof document < "u" ? document.body : null);
3445
+ return /* @__PURE__ */ x(ze, { children: [
3446
+ qn,
3447
+ Vt && Yt && $t(Vt, Yt)
3462
3448
  ] });
3463
3449
  }
3464
3450
  );
3465
- Tn.displayName = "AvatarWidgetInner";
3466
- const ki = $t(
3451
+ Mn.displayName = "AvatarWidgetInner";
3452
+ const xo = Pt(
3467
3453
  function(t, r) {
3468
- return /* @__PURE__ */ n(rr, { children: /* @__PURE__ */ n(Tn, { ...t, ref: r }) });
3454
+ return /* @__PURE__ */ n(Qn, { children: /* @__PURE__ */ n(Mn, { ...t, ref: r }) });
3469
3455
  }
3470
3456
  );
3471
- ki.displayName = "AvatarWidget";
3472
- const Pi = ({
3457
+ xo.displayName = "AvatarWidget";
3458
+ const To = ({
3473
3459
  agentId: e,
3474
3460
  baseUrl: t,
3475
3461
  apiKey: r,
3476
- mode: i,
3462
+ mode: o,
3477
3463
  onAgentEvent: a,
3478
- className: o,
3464
+ className: i,
3479
3465
  style: s
3480
3466
  }) => {
3481
3467
  const l = M(null), c = M(null), p = M(a);
3482
3468
  p.current = a;
3483
3469
  const w = E((m) => {
3484
- var T;
3470
+ var R;
3485
3471
  const f = m.detail;
3486
- (T = p.current) == null || T.call(p, f);
3472
+ (R = p.current) == null || R.call(p, f);
3487
3473
  }, []);
3488
- return R(() => {
3474
+ return T(() => {
3489
3475
  const m = l.current;
3490
3476
  if (!m) return;
3491
3477
  const f = document.createElement("livelayer-widget");
3492
- return f.setAttribute("agent-id", e), t && f.setAttribute("base-url", t), r && f.setAttribute("api-key", r), i && f.setAttribute("mode", i), f.addEventListener("agent-event", w), m.appendChild(f), c.current = f, () => {
3478
+ return f.setAttribute("agent-id", e), t && f.setAttribute("base-url", t), r && f.setAttribute("api-key", r), o && f.setAttribute("mode", o), f.addEventListener("agent-event", w), m.appendChild(f), c.current = f, () => {
3493
3479
  f.removeEventListener("agent-event", w), m.removeChild(f), c.current = null;
3494
3480
  };
3495
- }, [e]), R(() => {
3496
- c.current && (i ? c.current.setAttribute("mode", i) : c.current.removeAttribute("mode"));
3497
- }, [i]), /* @__PURE__ */ n("div", { ref: l, className: o, style: s });
3498
- }, $i = $t(
3499
- function({ id: t, intent: r, as: i = "div", className: a, style: o, children: s }, l) {
3500
- return Zn(
3501
- i,
3481
+ }, [e]), T(() => {
3482
+ c.current && (o ? c.current.setAttribute("mode", o) : c.current.removeAttribute("mode"));
3483
+ }, [o]), /* @__PURE__ */ n("div", { ref: l, className: i, style: s });
3484
+ }, Do = Pt(
3485
+ function({ id: t, intent: r, as: o = "div", className: a, style: i, children: s }, l) {
3486
+ return Gn(
3487
+ o,
3502
3488
  {
3503
3489
  ref: l,
3504
3490
  "data-ll-region": t,
3505
3491
  "data-ll-intent": r,
3506
3492
  className: a,
3507
- style: o
3493
+ style: i
3508
3494
  },
3509
3495
  s
3510
3496
  );
3511
3497
  }
3512
3498
  );
3513
- function zi(e = {}) {
3514
- const { onFieldUpdate: t, onComplete: r, source: i = "all" } = e, [a, o] = N({}), [s, l] = N(!1), [c, p] = N(null), w = M(t), m = M(r), f = M(i);
3515
- R(() => {
3516
- w.current = t, m.current = r, f.current = i;
3517
- }, [t, r, i]);
3518
- const T = E(() => {
3519
- o({}), l(!1);
3499
+ function Po(e = {}) {
3500
+ const { onFieldUpdate: t, onComplete: r, source: o = "all" } = e, [a, i] = N({}), [s, l] = N(!1), [c, p] = N(null), w = M(t), m = M(r), f = M(o);
3501
+ T(() => {
3502
+ w.current = t, m.current = r, f.current = o;
3503
+ }, [t, r, o]);
3504
+ const R = E(() => {
3505
+ i({}), l(!1);
3520
3506
  }, []);
3521
- return R(() => {
3507
+ return T(() => {
3522
3508
  if (typeof window > "u") return;
3523
- const _ = (v) => {
3509
+ const _ = (y) => {
3524
3510
  var h, L;
3525
- const u = v.detail;
3511
+ const u = y.detail;
3526
3512
  if (u) {
3527
3513
  if (u.phase === "field") {
3528
3514
  if (f.current !== "all" && u.source !== f.current)
3529
3515
  return;
3530
- l(!0), o(
3516
+ l(!0), i(
3531
3517
  (A) => A[u.fieldName] === u.value ? A : { ...A, [u.fieldName]: u.value }
3532
3518
  );
3533
3519
  try {
@@ -3551,34 +3537,34 @@ function zi(e = {}) {
3551
3537
  }
3552
3538
  };
3553
3539
  return document.addEventListener("ll-collected", _), () => document.removeEventListener("ll-collected", _);
3554
- }, []), { fields: a, isCollecting: s, lastResult: c, reset: T };
3540
+ }, []), { fields: a, isCollecting: s, lastResult: c, reset: R };
3555
3541
  }
3556
- let Ln = 1;
3557
- function Hi({
3542
+ let xn = 1;
3543
+ function $o({
3558
3544
  onMount: e,
3559
3545
  defaultOpen: t = !1,
3560
3546
  storageKey: r = "ll-debug-open"
3561
3547
  }) {
3562
- const [i, a] = N(t), [o, s] = N([]), [l, c] = N(""), [p, w] = N(!1), m = M(/* @__PURE__ */ new Set()), f = M([]), T = M(p);
3563
- T.current = p, R(() => {
3548
+ const [o, a] = N(t), [i, s] = N([]), [l, c] = N(""), [p, w] = N(!1), m = M(/* @__PURE__ */ new Set()), f = M([]), R = M(p);
3549
+ R.current = p, T(() => {
3564
3550
  try {
3565
3551
  const u = localStorage.getItem(r);
3566
3552
  u === "1" && a(!0), u === "0" && a(!1);
3567
3553
  } catch {
3568
3554
  }
3569
- }, [r]), R(() => {
3555
+ }, [r]), T(() => {
3570
3556
  try {
3571
- localStorage.setItem(r, i ? "1" : "0");
3557
+ localStorage.setItem(r, o ? "1" : "0");
3572
3558
  } catch {
3573
3559
  }
3574
- }, [i, r]), R(() => {
3560
+ }, [o, r]), T(() => {
3575
3561
  const u = (h) => {
3576
3562
  (h.metaKey || h.ctrlKey) && h.shiftKey && h.key.toLowerCase() === "l" && (h.preventDefault(), a((L) => !L));
3577
3563
  };
3578
3564
  return window.addEventListener("keydown", u), () => window.removeEventListener("keydown", u);
3579
- }, []), R(() => {
3565
+ }, []), T(() => {
3580
3566
  const u = setInterval(() => {
3581
- if (f.current.length === 0 || T.current) return;
3567
+ if (f.current.length === 0 || R.current) return;
3582
3568
  const h = f.current.splice(0, f.current.length);
3583
3569
  s(
3584
3570
  (L) => [...h.reverse(), ...L].slice(0, 200)
@@ -3587,26 +3573,26 @@ function Hi({
3587
3573
  return () => clearInterval(u);
3588
3574
  }, []);
3589
3575
  const _ = M(!1);
3590
- if (R(() => {
3576
+ if (T(() => {
3591
3577
  !e || _.current || (_.current = !0, e((u) => {
3592
3578
  f.current.push({
3593
- id: Ln++,
3579
+ id: xn++,
3594
3580
  ts: Date.now(),
3595
3581
  kind: "event",
3596
3582
  type: u.eventName,
3597
3583
  data: u.data
3598
3584
  });
3599
3585
  }));
3600
- }, [e]), R(() => {
3586
+ }, [e]), T(() => {
3601
3587
  const u = console.warn, h = console.log, L = (A, I) => function(...U) {
3602
3588
  try {
3603
3589
  const b = typeof U[0] == "string" ? U[0] : "";
3604
3590
  b.startsWith("[LiveLayer]") && f.current.push({
3605
- id: Ln++,
3591
+ id: xn++,
3606
3592
  ts: Date.now(),
3607
3593
  kind: A,
3608
3594
  type: b.slice(0, 120),
3609
- data: { args: U.slice(1).map((P) => Ei(P)) }
3595
+ data: { args: U.slice(1).map((P) => ko(P)) }
3610
3596
  });
3611
3597
  } catch {
3612
3598
  }
@@ -3615,7 +3601,7 @@ function Hi({
3615
3601
  return console.warn = L("warn", u), console.log = L("log", h), () => {
3616
3602
  console.warn = u, console.log = h;
3617
3603
  };
3618
- }, []), !i)
3604
+ }, []), !o)
3619
3605
  return /* @__PURE__ */ n(
3620
3606
  "button",
3621
3607
  {
@@ -3642,7 +3628,7 @@ function Hi({
3642
3628
  children: "🛰 LL debug"
3643
3629
  }
3644
3630
  );
3645
- const v = o.filter((u) => {
3631
+ const y = i.filter((u) => {
3646
3632
  if (!l) return !0;
3647
3633
  const h = l.toLowerCase();
3648
3634
  return u.type.toLowerCase().includes(h) || JSON.stringify(u.data || {}).toLowerCase().includes(h);
@@ -3683,9 +3669,9 @@ function Hi({
3683
3669
  children: [
3684
3670
  /* @__PURE__ */ n("span", { style: { fontWeight: 600, fontSize: 12 }, children: "LiveLayer debug" }),
3685
3671
  /* @__PURE__ */ x("span", { style: { fontSize: 10, color: "rgba(255,255,255,0.4)" }, children: [
3686
- o.length,
3672
+ i.length,
3687
3673
  " event",
3688
- o.length === 1 ? "" : "s"
3674
+ i.length === 1 ? "" : "s"
3689
3675
  ] }),
3690
3676
  /* @__PURE__ */ n("span", { style: { flex: 1 } }),
3691
3677
  /* @__PURE__ */ n(
@@ -3693,7 +3679,7 @@ function Hi({
3693
3679
  {
3694
3680
  type: "button",
3695
3681
  onClick: () => w((u) => !u),
3696
- style: Dt(p ? "#f59e0b" : "transparent"),
3682
+ style: Tt(p ? "#f59e0b" : "transparent"),
3697
3683
  title: "Pause / resume capture",
3698
3684
  children: p ? "▶ resume" : "⏸ pause"
3699
3685
  }
@@ -3705,7 +3691,7 @@ function Hi({
3705
3691
  onClick: () => {
3706
3692
  s([]), f.current = [];
3707
3693
  },
3708
- style: Dt("transparent"),
3694
+ style: Tt("transparent"),
3709
3695
  title: "Clear buffer",
3710
3696
  children: "clear"
3711
3697
  }
@@ -3715,7 +3701,7 @@ function Hi({
3715
3701
  {
3716
3702
  type: "button",
3717
3703
  onClick: () => a(!1),
3718
- style: Dt("transparent"),
3704
+ style: Tt("transparent"),
3719
3705
  "aria-label": "Close",
3720
3706
  title: "Close (Cmd/Ctrl + Shift + L)",
3721
3707
  children: "✕"
@@ -3751,7 +3737,7 @@ function Hi({
3751
3737
  overflowY: "auto",
3752
3738
  padding: "0 8px 8px"
3753
3739
  },
3754
- children: v.length === 0 ? /* @__PURE__ */ x(
3740
+ children: y.length === 0 ? /* @__PURE__ */ x(
3755
3741
  "div",
3756
3742
  {
3757
3743
  style: {
@@ -3781,8 +3767,8 @@ function Hi({
3781
3767
  )
3782
3768
  ]
3783
3769
  }
3784
- ) : v.map((u) => /* @__PURE__ */ n(
3785
- Ci,
3770
+ ) : y.map((u) => /* @__PURE__ */ n(
3771
+ Lo,
3786
3772
  {
3787
3773
  entry: u,
3788
3774
  expanded: m.current.has(u.id),
@@ -3798,12 +3784,12 @@ function Hi({
3798
3784
  }
3799
3785
  );
3800
3786
  }
3801
- function Ci({
3787
+ function Lo({
3802
3788
  entry: e,
3803
3789
  expanded: t,
3804
3790
  onToggle: r
3805
3791
  }) {
3806
- const i = 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", a = new Date(e.ts).toLocaleTimeString("en-US", {
3792
+ 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", a = new Date(e.ts).toLocaleTimeString("en-US", {
3807
3793
  hour12: !1
3808
3794
  });
3809
3795
  return /* @__PURE__ */ x(
@@ -3840,7 +3826,7 @@ function Ci({
3840
3826
  "span",
3841
3827
  {
3842
3828
  style: {
3843
- color: i,
3829
+ color: o,
3844
3830
  fontWeight: 600,
3845
3831
  flexShrink: 0
3846
3832
  },
@@ -3868,7 +3854,7 @@ function Ci({
3868
3854
  }
3869
3855
  );
3870
3856
  }
3871
- function Dt(e) {
3857
+ function Tt(e) {
3872
3858
  return {
3873
3859
  background: e,
3874
3860
  color: "#fff",
@@ -3879,71 +3865,71 @@ function Dt(e) {
3879
3865
  cursor: "pointer"
3880
3866
  };
3881
3867
  }
3882
- function Ei(e) {
3868
+ function ko(e) {
3883
3869
  try {
3884
3870
  return e instanceof Error ? { message: e.message, stack: e.stack } : (JSON.stringify(e), e);
3885
3871
  } catch {
3886
3872
  return String(e);
3887
3873
  }
3888
3874
  }
3889
- function Si(e) {
3875
+ function Co(e) {
3890
3876
  const t = JSON.stringify(e);
3891
- R(() => er(e), [t]);
3877
+ T(() => Jn(e), [t]);
3892
3878
  }
3893
- function Oi({ fields: e, children: t }) {
3894
- return Si(e), /* @__PURE__ */ n(He, { children: t });
3879
+ function zo({ fields: e, children: t }) {
3880
+ return Co(e), /* @__PURE__ */ n(ze, { children: t });
3895
3881
  }
3896
- function Bi() {
3882
+ function Ho() {
3897
3883
  const [e, t] = N([]), r = E((a) => {
3898
- t((o) => {
3899
- const s = o.findIndex((l) => l.id === a.id);
3884
+ t((i) => {
3885
+ const s = i.findIndex((l) => l.id === a.id);
3900
3886
  if (s >= 0) {
3901
- const l = o.slice();
3887
+ const l = i.slice();
3902
3888
  return l[s] = a, l;
3903
3889
  }
3904
- return [...o, a];
3890
+ return [...i, a];
3905
3891
  });
3906
- }, []), i = E(() => t([]), []);
3892
+ }, []), o = E(() => t([]), []);
3907
3893
  return {
3908
3894
  entries: e,
3909
3895
  pushSegment: r,
3910
- clear: i,
3896
+ clear: o,
3911
3897
  latest: e.length > 0 ? e[e.length - 1] : null
3912
3898
  };
3913
3899
  }
3914
3900
  export {
3915
- ki as AvatarWidget,
3916
- rr as ErrorBoundary,
3917
- Oi as FieldProvider,
3918
- Hi as LiveLayerDebugPanel,
3919
- $i as LiveLayerRegion,
3920
- Pi as LiveLayerWidget,
3921
- qi as clearFieldRegistry,
3922
- li as clearPageContextCache,
3923
- fi as clearRoutesCache,
3924
- oi as extractPageContext,
3925
- di as extractRoutes,
3926
- vn as getCachedPageContext,
3927
- Tt as getCachedRoutes,
3928
- Ui as getRegisteredFields,
3929
- Er as matchesPattern,
3930
- si as normalizeRouteInput,
3931
- ji as registerFields,
3932
- Vi as setFieldValue,
3933
- Sr as shouldRenderAtPath,
3934
- fr as useAgentInfo,
3935
- or as useAudioLevel,
3936
- cr as useCameraState,
3937
- zi as useCollect,
3938
- hr as useDisplayMode,
3939
- yr as useDisplayModePersistence,
3940
- br as useIsMobile,
3941
- ir as useLiveKitSession,
3942
- ur as useMediaDevices,
3943
- ar as useMicrophoneState,
3944
- _r as usePathname,
3945
- Si as useRegisterFields,
3946
- Nr as useRouteMatch,
3947
- dr as useScreenShareState,
3948
- Bi as useTranscript
3901
+ xo as AvatarWidget,
3902
+ Qn as ErrorBoundary,
3903
+ zo as FieldProvider,
3904
+ $o as LiveLayerDebugPanel,
3905
+ Do as LiveLayerRegion,
3906
+ To as LiveLayerWidget,
3907
+ Fo as clearFieldRegistry,
3908
+ ro as clearPageContextCache,
3909
+ co as clearRoutesCache,
3910
+ no as extractPageContext,
3911
+ ao as extractRoutes,
3912
+ yn as getCachedPageContext,
3913
+ Rt as getCachedRoutes,
3914
+ Wo as getRegisteredFields,
3915
+ Lr as matchesPattern,
3916
+ io as normalizeRouteInput,
3917
+ qo as registerFields,
3918
+ Uo as setFieldValue,
3919
+ kr as shouldRenderAtPath,
3920
+ sr as useAgentInfo,
3921
+ tr as useAudioLevel,
3922
+ ir as useCameraState,
3923
+ Po as useCollect,
3924
+ ur as useDisplayMode,
3925
+ hr as useDisplayModePersistence,
3926
+ gr as useIsMobile,
3927
+ er as useLiveKitSession,
3928
+ ar as useMediaDevices,
3929
+ rr as useMicrophoneState,
3930
+ vr as usePathname,
3931
+ Co as useRegisterFields,
3932
+ Cr as useRouteMatch,
3933
+ lr as useScreenShareState,
3934
+ Ho as useTranscript
3949
3935
  };