@d-id/client-sdk 1.1.11-staging.41 → 1.1.11-staging.43

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.
@@ -1,16 +1,16 @@
1
- var ve = Object.defineProperty;
2
- var ke = (e, t, n) => t in e ? ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var Q = (e, t, n) => ke(e, typeof t != "symbol" ? t + "" : t, n);
4
- class ee extends Error {
1
+ var ke = Object.defineProperty;
2
+ var De = (e, t, n) => t in e ? ke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var Z = (e, t, n) => De(e, typeof t != "symbol" ? t + "" : t, n);
4
+ class te extends Error {
5
5
  constructor({ kind: n, description: r, error: i }) {
6
6
  super(JSON.stringify({ kind: n, description: r }));
7
- Q(this, "kind");
8
- Q(this, "description");
9
- Q(this, "error");
7
+ Z(this, "kind");
8
+ Z(this, "description");
9
+ Z(this, "error");
10
10
  this.kind = n, this.description = r, this.error = i;
11
11
  }
12
12
  }
13
- class De extends ee {
13
+ class Ce extends te {
14
14
  constructor(t, n) {
15
15
  super({
16
16
  kind: "ChatCreationFailed",
@@ -18,25 +18,25 @@ class De extends ee {
18
18
  });
19
19
  }
20
20
  }
21
- class Ce extends ee {
21
+ class Re extends te {
22
22
  constructor(t) {
23
23
  super({ kind: "ChatModeDowngraded", description: `Chat mode downgraded to ${t}` });
24
24
  }
25
25
  }
26
- class H extends ee {
26
+ class H extends te {
27
27
  constructor(n, r) {
28
28
  super({ kind: "ValidationError", description: n });
29
- Q(this, "key");
29
+ Z(this, "key");
30
30
  this.key = r;
31
31
  }
32
32
  }
33
- class Re extends ee {
33
+ class Se extends te {
34
34
  constructor(t) {
35
35
  super({ kind: "WSError", description: t });
36
36
  }
37
37
  }
38
- var Se = /* @__PURE__ */ ((e) => (e.TRIAL = "trial", e.BASIC = "basic", e.ENTERPRISE = "enterprise", e.LITE = "lite", e.ADVANCED = "advanced", e))(Se || {}), Ie = /* @__PURE__ */ ((e) => (e.TRIAL = "deid-trial", e.PRO = "deid-pro", e.ENTERPRISE = "deid-enterprise", e.LITE = "deid-lite", e.ADVANCED = "deid-advanced", e.BUILD = "deid-api-build", e.LAUNCH = "deid-api-launch", e.SCALE = "deid-api-scale", e))(Ie || {}), Ee = /* @__PURE__ */ ((e) => (e.Created = "created", e.Started = "started", e.Done = "done", e.Error = "error", e.Rejected = "rejected", e.Ready = "ready", e))(Ee || {}), Me = /* @__PURE__ */ ((e) => (e.Unrated = "Unrated", e.Positive = "Positive", e.Negative = "Negative", e))(Me || {}), E = /* @__PURE__ */ ((e) => (e.Functional = "Functional", e.TextOnly = "TextOnly", e.Maintenance = "Maintenance", e.Playground = "Playground", e.DirectPlayback = "DirectPlayback", e.Off = "Off", e))(E || {}), q = /* @__PURE__ */ ((e) => (e.Embed = "embed", e.Query = "query", e.Partial = "partial", e.Answer = "answer", e.Complete = "done", e))(q || {}), _e = /* @__PURE__ */ ((e) => (e.KnowledgeProcessing = "knowledge/processing", e.KnowledgeIndexing = "knowledge/indexing", e.KnowledgeFailed = "knowledge/error", e.KnowledgeDone = "knowledge/done", e))(_e || {}), Te = /* @__PURE__ */ ((e) => (e.Knowledge = "knowledge", e.Document = "document", e.Record = "record", e))(Te || {}), je = /* @__PURE__ */ ((e) => (e.Pdf = "pdf", e.Text = "text", e.Html = "html", e.Word = "word", e.Json = "json", e.Markdown = "markdown", e.Csv = "csv", e.Excel = "excel", e.Powerpoint = "powerpoint", e.Archive = "archive", e.Image = "image", e.Audio = "audio", e.Video = "video", e))(je || {}), ce = /* @__PURE__ */ ((e) => (e.Clip = "clip", e.Talk = "talk", e.Expressive = "expressive", e))(ce || {});
39
- const Tt = (e) => {
38
+ var Ie = /* @__PURE__ */ ((e) => (e.TRIAL = "trial", e.BASIC = "basic", e.ENTERPRISE = "enterprise", e.LITE = "lite", e.ADVANCED = "advanced", e))(Ie || {}), Ee = /* @__PURE__ */ ((e) => (e.TRIAL = "deid-trial", e.PRO = "deid-pro", e.ENTERPRISE = "deid-enterprise", e.LITE = "deid-lite", e.ADVANCED = "deid-advanced", e.BUILD = "deid-api-build", e.LAUNCH = "deid-api-launch", e.SCALE = "deid-api-scale", e))(Ee || {}), Me = /* @__PURE__ */ ((e) => (e.Created = "created", e.Started = "started", e.Done = "done", e.Error = "error", e.Rejected = "rejected", e.Ready = "ready", e))(Me || {}), _e = /* @__PURE__ */ ((e) => (e.Unrated = "Unrated", e.Positive = "Positive", e.Negative = "Negative", e))(_e || {}), E = /* @__PURE__ */ ((e) => (e.Functional = "Functional", e.TextOnly = "TextOnly", e.Maintenance = "Maintenance", e.Playground = "Playground", e.DirectPlayback = "DirectPlayback", e.Off = "Off", e))(E || {}), q = /* @__PURE__ */ ((e) => (e.Embed = "embed", e.Query = "query", e.Partial = "partial", e.Answer = "answer", e.Complete = "done", e))(q || {}), Te = /* @__PURE__ */ ((e) => (e.KnowledgeProcessing = "knowledge/processing", e.KnowledgeIndexing = "knowledge/indexing", e.KnowledgeFailed = "knowledge/error", e.KnowledgeDone = "knowledge/done", e))(Te || {}), je = /* @__PURE__ */ ((e) => (e.Knowledge = "knowledge", e.Document = "document", e.Record = "record", e))(je || {}), Ae = /* @__PURE__ */ ((e) => (e.Pdf = "pdf", e.Text = "text", e.Html = "html", e.Word = "word", e.Json = "json", e.Markdown = "markdown", e.Csv = "csv", e.Excel = "excel", e.Powerpoint = "powerpoint", e.Archive = "archive", e.Image = "image", e.Audio = "audio", e.Video = "video", e))(Ae || {}), de = /* @__PURE__ */ ((e) => (e.Clip = "clip", e.Talk = "talk", e.Expressive = "expressive", e))(de || {});
39
+ const jt = (e) => {
40
40
  switch (e) {
41
41
  case "clip":
42
42
  return "clip";
@@ -46,12 +46,12 @@ const Tt = (e) => {
46
46
  throw new Error(`Unknown video type: ${e}`);
47
47
  }
48
48
  };
49
- var w = /* @__PURE__ */ ((e) => (e.Start = "START", e.Stop = "STOP", e))(w || {}), Z = /* @__PURE__ */ ((e) => (e.Strong = "STRONG", e.Weak = "WEAK", e.Unknown = "UNKNOWN", e))(Z || {}), O = /* @__PURE__ */ ((e) => (e.Idle = "IDLE", e.Talking = "TALKING", e))(O || {}), A = /* @__PURE__ */ ((e) => (e.ChatAnswer = "chat/answer", e.ChatPartial = "chat/partial", e.StreamDone = "stream/done", e.StreamStarted = "stream/started", e.StreamFailed = "stream/error", e.StreamReady = "stream/ready", e.StreamCreated = "stream/created", e.StreamInterrupt = "stream/interrupt", e.StreamVideoCreated = "stream-video/started", e.StreamVideoDone = "stream-video/done", e.StreamVideoError = "stream-video/error", e.StreamVideoRejected = "stream-video/rejected", e))(A || {}), S = /* @__PURE__ */ ((e) => (e.New = "new", e.Fail = "fail", e.Connected = "connected", e.Connecting = "connecting", e.Closed = "closed", e.Completed = "completed", e.Disconnected = "disconnected", e))(S || {}), N = /* @__PURE__ */ ((e) => (e.Legacy = "legacy", e.Fluent = "fluent", e))(N || {}), be = /* @__PURE__ */ ((e) => (e.Livekit = "livekit", e))(be || {}), Ae = /* @__PURE__ */ ((e) => (e.Amazon = "amazon", e.Microsoft = "microsoft", e.Afflorithmics = "afflorithmics", e.Elevenlabs = "elevenlabs", e))(Ae || {}), Pe = /* @__PURE__ */ ((e) => (e.Public = "public", e.Premium = "premium", e.Private = "private", e))(Pe || {});
50
- const Le = 45 * 1e3, Be = "X-Playground-Chat", G = "https://api.d-id.com", $e = "wss://notifications.d-id.com", ze = "79f81a83a67430be2bc0fd61042b8faa", de = (e) => new Promise((t) => setTimeout(t, e)), V = (e = 16) => {
49
+ var w = /* @__PURE__ */ ((e) => (e.Start = "START", e.Stop = "STOP", e))(w || {}), G = /* @__PURE__ */ ((e) => (e.Strong = "STRONG", e.Weak = "WEAK", e.Unknown = "UNKNOWN", e))(G || {}), O = /* @__PURE__ */ ((e) => (e.Idle = "IDLE", e.Talking = "TALKING", e))(O || {}), P = /* @__PURE__ */ ((e) => (e.ChatAnswer = "chat/answer", e.ChatPartial = "chat/partial", e.StreamDone = "stream/done", e.StreamStarted = "stream/started", e.StreamFailed = "stream/error", e.StreamReady = "stream/ready", e.StreamCreated = "stream/created", e.StreamInterrupt = "stream/interrupt", e.StreamVideoCreated = "stream-video/started", e.StreamVideoDone = "stream-video/done", e.StreamVideoError = "stream-video/error", e.StreamVideoRejected = "stream-video/rejected", e))(P || {}), R = /* @__PURE__ */ ((e) => (e.New = "new", e.Fail = "fail", e.Connected = "connected", e.Connecting = "connecting", e.Closed = "closed", e.Completed = "completed", e.Disconnected = "disconnected", e))(R || {}), J = /* @__PURE__ */ ((e) => (e.Legacy = "legacy", e.Fluent = "fluent", e))(J || {}), be = /* @__PURE__ */ ((e) => (e.Livekit = "livekit", e))(be || {}), Pe = /* @__PURE__ */ ((e) => (e.Amazon = "amazon", e.Microsoft = "microsoft", e.Afflorithmics = "afflorithmics", e.Elevenlabs = "elevenlabs", e))(Pe || {}), Le = /* @__PURE__ */ ((e) => (e.Public = "public", e.Premium = "premium", e.Private = "private", e))(Le || {});
50
+ const Be = 45 * 1e3, $e = "X-Playground-Chat", ee = "https://api.d-id.com", xe = "wss://notifications.d-id.com", ze = "79f81a83a67430be2bc0fd61042b8faa", le = (e) => new Promise((t) => setTimeout(t, e)), V = (e = 16) => {
51
51
  const t = new Uint8Array(e);
52
52
  return window.crypto.getRandomValues(t), Array.from(t, (n) => n.toString(16).padStart(2, "0")).join("").slice(0, 13);
53
- }, xe = (e) => [E.TextOnly, E.Playground, E.Maintenance].includes(e), le = (e) => e && [E.DirectPlayback, E.Off].includes(e);
54
- function Fe(e, t) {
53
+ }, Fe = (e) => [E.TextOnly, E.Playground, E.Maintenance].includes(e), ue = (e) => e && [E.DirectPlayback, E.Off].includes(e);
54
+ function Ne(e, t) {
55
55
  let n;
56
56
  return {
57
57
  promise: new Promise((i, o) => {
@@ -60,7 +60,7 @@ function Fe(e, t) {
60
60
  clear: () => clearTimeout(n)
61
61
  };
62
62
  }
63
- async function re(e, t) {
63
+ async function ne(e, t) {
64
64
  const n = {
65
65
  limit: (t == null ? void 0 : t.limit) ?? 3,
66
66
  delayMs: (t == null ? void 0 : t.delayMs) ?? 0,
@@ -75,16 +75,16 @@ async function re(e, t) {
75
75
  try {
76
76
  if (!n.timeout)
77
77
  return await e();
78
- const { promise: o, clear: c } = Fe(n.timeout, n.timeoutErrorMessage), a = e().finally(c);
78
+ const { promise: o, clear: c } = Ne(n.timeout, n.timeoutErrorMessage), a = e().finally(c);
79
79
  return await Promise.race([a, o]);
80
80
  } catch (o) {
81
81
  if (r = o, !n.shouldRetryFn(o) || i >= n.limit)
82
82
  throw o;
83
- await de(n.delayMs), n.onRetry(o);
83
+ await le(n.delayMs), n.onRetry(o);
84
84
  }
85
85
  throw r;
86
86
  }
87
- function ue() {
87
+ function fe() {
88
88
  let e = window.localStorage.getItem("did_external_key_id");
89
89
  if (!e) {
90
90
  let t = V();
@@ -92,30 +92,30 @@ function ue() {
92
92
  }
93
93
  return e;
94
94
  }
95
- let Ne = V();
96
- function fe(e) {
95
+ let Je = V();
96
+ function me(e) {
97
97
  if (e.type === "bearer")
98
98
  return `Bearer ${e.token}`;
99
99
  if (e.type === "basic")
100
100
  return `Basic ${btoa(`${e.username}:${e.password}`)}`;
101
101
  if (e.type === "key")
102
- return `Client-Key ${e.clientKey}.${ue()}_${Ne}`;
102
+ return `Client-Key ${e.clientKey}.${fe()}_${Je}`;
103
103
  throw new Error(`Unknown auth type: ${e}`);
104
104
  }
105
- const Je = (e) => re(e, {
105
+ const We = (e) => ne(e, {
106
106
  limit: 3,
107
107
  delayMs: 1e3,
108
108
  timeout: 0,
109
109
  shouldRetryFn: (t) => t.status === 429
110
110
  });
111
- function me(e, t = G, n) {
111
+ function ge(e, t = ee, n) {
112
112
  const r = async (i, o) => {
113
- const { skipErrorHandler: c, ...a } = o || {}, s = await Je(
113
+ const { skipErrorHandler: c, ...a } = o || {}, s = await We(
114
114
  () => fetch(t + (i != null && i.startsWith("/") ? i : `/${i}`), {
115
115
  ...a,
116
116
  headers: {
117
117
  ...a.headers,
118
- Authorization: fe(e),
118
+ Authorization: me(e),
119
119
  "Content-Type": "application/json"
120
120
  }
121
121
  })
@@ -142,8 +142,8 @@ function me(e, t = G, n) {
142
142
  }
143
143
  };
144
144
  }
145
- function ge(e, t = G, n) {
146
- const r = me(e, `${t}/agents`, n);
145
+ function he(e, t = ee, n) {
146
+ const r = ge(e, `${t}/agents`, n);
147
147
  return {
148
148
  create(i, o) {
149
149
  return r.post("/", i, o);
@@ -180,8 +180,8 @@ function ge(e, t = G, n) {
180
180
  }
181
181
  };
182
182
  }
183
- const he = (e) => e.type === "clip" && e.presenter_id.startsWith("v2_") ? "clip_v2" : e.type;
184
- function We(e) {
183
+ const we = (e) => e.type === "clip" && e.presenter_id.startsWith("v2_") ? "clip_v2" : e.type;
184
+ function Ke(e) {
185
185
  var i, o, c, a;
186
186
  const t = () => /Mobi|Android/i.test(navigator.userAgent) ? "Mobile" : "Desktop", n = () => {
187
187
  const s = navigator.platform;
@@ -192,18 +192,18 @@ function We(e) {
192
192
  isMobile: `${t() == "Mobile"}`,
193
193
  browser: navigator.userAgent,
194
194
  origin: window.location.origin,
195
- agentType: he(r),
195
+ agentType: we(r),
196
196
  agentVoice: {
197
197
  voiceId: (o = (i = e.presenter) == null ? void 0 : i.voice) == null ? void 0 : o.voice_id,
198
198
  provider: (a = (c = e.presenter) == null ? void 0 : c.voice) == null ? void 0 : a.type
199
199
  }
200
200
  };
201
201
  }
202
- function Ke(e) {
202
+ function Ue(e) {
203
203
  var n, r, i, o, c, a;
204
204
  const t = (n = e.llm) == null ? void 0 : n.prompt_customization;
205
205
  return {
206
- agentType: he(e.presenter),
206
+ agentType: we(e.presenter),
207
207
  owner_id: e.owner_id ?? "",
208
208
  promptVersion: (r = e.llm) == null ? void 0 : r.prompt_version,
209
209
  behavior: {
@@ -222,8 +222,8 @@ function Ke(e) {
222
222
  ...e.access === "public" ? { from: "agent-template" } : {}
223
223
  };
224
224
  }
225
- const Ue = (e) => e.reduce((t, n) => t + n, 0), ie = (e) => Ue(e) / e.length;
226
- function He(e, t, n) {
225
+ const He = (e) => e.reduce((t, n) => t + n, 0), se = (e) => He(e) / e.length;
226
+ function qe(e, t, n) {
227
227
  var s, d, l;
228
228
  const { event: r, ...i } = e, { template: o } = (t == null ? void 0 : t.llm) || {}, { language: c } = ((s = t == null ? void 0 : t.presenter) == null ? void 0 : s.voice) || {};
229
229
  return {
@@ -234,15 +234,18 @@ function He(e, t, n) {
234
234
  ...n
235
235
  };
236
236
  }
237
- let te = {};
238
- const qe = "https://api-js.mixpanel.com/track/?verbose=1&ip=1";
239
- function Ve(e) {
237
+ let re = {};
238
+ const Ve = "https://api-js.mixpanel.com/track/?verbose=1&ip=1";
239
+ function Oe(e) {
240
240
  const t = window != null && window.hasOwnProperty("DID_AGENTS_API") ? "agents-ui" : "agents-sdk";
241
241
  return {
242
242
  token: e.token || "testKey",
243
- distinct_id: e.distinctId || ue(),
243
+ distinct_id: e.distinctId || fe(),
244
244
  agentId: e.agentId,
245
- additionalProperties: {},
245
+ additionalProperties: {
246
+ id: e.distinctId,
247
+ ...e.mixpanelAdditionalProperties || {}
248
+ },
246
249
  isEnabled: e.isEnabled ?? !0,
247
250
  getRandom: V,
248
251
  enrich(n) {
@@ -278,14 +281,14 @@ function Ve(e) {
278
281
  })
279
282
  };
280
283
  try {
281
- return await fetch(qe, c).then((a) => a.json());
284
+ return await fetch(Ve, c).then((a) => a.json());
282
285
  } catch (a) {
283
286
  return console.error(a);
284
287
  }
285
288
  },
286
289
  linkTrack(n, r, i, o) {
287
- te[n] || (te[n] = { events: {}, resolvedDependencies: [] }), o.includes(i) || o.push(i);
288
- const c = te[n];
290
+ re[n] || (re[n] = { events: {}, resolvedDependencies: [] }), o.includes(i) || o.push(i);
291
+ const c = re[n];
289
292
  if (c.events[i] = { props: r }, c.resolvedDependencies.push(i), o.every(
290
293
  (s) => c.resolvedDependencies.includes(s)
291
294
  )) {
@@ -299,7 +302,7 @@ function Ve(e) {
299
302
  }
300
303
  };
301
304
  }
302
- function we() {
305
+ function pe() {
303
306
  let e = 0;
304
307
  return {
305
308
  reset: () => e = 0,
@@ -307,13 +310,13 @@ function we() {
307
310
  get: (t = !1) => t ? Date.now() - e : e
308
311
  };
309
312
  }
310
- const B = we(), ne = we();
311
- function pe(e) {
312
- return e === E.Playground ? { headers: { [Be]: "true" } } : {};
313
+ const $ = pe(), ae = pe();
314
+ function ye(e) {
315
+ return e === E.Playground ? { headers: { [$e]: "true" } } : {};
313
316
  }
314
- async function ye(e, t, n, r, i = !1, o) {
317
+ async function ve(e, t, n, r, i = !1, o) {
315
318
  try {
316
- return !o && !le(r) && (o = await t.newChat(e.id, { persist: i }, pe(r)), n.track("agent-chat", {
319
+ return !o && !ue(r) && (o = await t.newChat(e.id, { persist: i }, ye(r)), n.track("agent-chat", {
317
320
  event: "created",
318
321
  chatId: o.id,
319
322
  mode: r
@@ -329,58 +332,58 @@ async function ye(e, t, n, r, i = !1, o) {
329
332
  throw new Error("Cannot create new chat");
330
333
  }
331
334
  }
332
- function Oe(e) {
335
+ function Xe(e) {
333
336
  return e && e.length > 0 ? e : [];
334
337
  }
335
- function Xe(e, t, n) {
338
+ function Ye(e, t, n) {
336
339
  if (!e)
337
340
  throw new Error("Please connect to the agent first");
338
341
  if (!e.interruptAvailable)
339
342
  throw new Error("Interrupt is not enabled for this stream");
340
- if (t !== N.Fluent)
343
+ if (t !== J.Fluent)
341
344
  throw new Error("Interrupt only available for Fluent streams");
342
345
  if (!n)
343
346
  throw new Error("No active video to interrupt");
344
347
  }
345
- async function Ye(e, t) {
348
+ async function Qe(e, t) {
346
349
  const n = {
347
- type: A.StreamInterrupt,
350
+ type: P.StreamInterrupt,
348
351
  videoId: t,
349
352
  timestamp: Date.now()
350
353
  };
351
354
  e.sendDataChannelMessage(JSON.stringify(n));
352
355
  }
353
- function Qe(e) {
356
+ function Ze(e) {
354
357
  return new Promise((t, n) => {
355
- const { callbacks: r, host: i, auth: o } = e, { onMessage: c = null, onOpen: a = null, onClose: s = null, onError: d = null } = r || {}, l = new WebSocket(`${i}?authorization=${fe(o)}`);
356
- l.onmessage = c, l.onclose = s, l.onerror = (v) => {
357
- console.error(v), d == null || d("Websocket failed to connect", v), n(v);
358
- }, l.onopen = (v) => {
359
- a == null || a(v), t(l);
358
+ const { callbacks: r, host: i, auth: o } = e, { onMessage: c = null, onOpen: a = null, onClose: s = null, onError: d = null } = r || {}, l = new WebSocket(`${i}?authorization=${me(o)}`);
359
+ l.onmessage = c, l.onclose = s, l.onerror = (y) => {
360
+ console.error(y), d == null || d("Websocket failed to connect", y), n(y);
361
+ }, l.onopen = (y) => {
362
+ a == null || a(y), t(l);
360
363
  };
361
364
  });
362
365
  }
363
- async function Ze(e) {
366
+ async function Ge(e) {
364
367
  const { retries: t = 1 } = e;
365
368
  let n = null;
366
369
  for (let r = 0; (n == null ? void 0 : n.readyState) !== WebSocket.OPEN; r++)
367
370
  try {
368
- n = await Qe(e);
371
+ n = await Ze(e);
369
372
  } catch (i) {
370
373
  if (r === t)
371
374
  throw i;
372
- await de(r * 500);
375
+ await le(r * 500);
373
376
  }
374
377
  return n;
375
378
  }
376
- async function Ge(e, t, n) {
377
- const r = n != null && n.onMessage ? [n.onMessage] : [], i = await Ze({
379
+ async function et(e, t, n) {
380
+ const r = n != null && n.onMessage ? [n.onMessage] : [], i = await Ge({
378
381
  auth: e,
379
382
  host: t,
380
383
  callbacks: {
381
384
  onError: (o) => {
382
385
  var c;
383
- return (c = n.onError) == null ? void 0 : c.call(n, new Re(o));
386
+ return (c = n.onError) == null ? void 0 : c.call(n, new Se(o));
384
387
  },
385
388
  onMessage(o) {
386
389
  const c = JSON.parse(o.data);
@@ -394,7 +397,7 @@ async function Ge(e, t, n) {
394
397
  subscribeToEvents: (o) => r.push(o)
395
398
  };
396
399
  }
397
- function et(e) {
400
+ function tt(e) {
398
401
  if (e.answer !== void 0)
399
402
  return e.answer;
400
403
  let t = 0, n = "";
@@ -402,41 +405,41 @@ function et(e) {
402
405
  n += e[t++];
403
406
  return n;
404
407
  }
405
- function tt(e, t, n, r, i) {
408
+ function rt(e, t, n, r, i) {
406
409
  const o = r.messages[r.messages.length - 1];
407
410
  if (!(e === q.Partial || e === q.Answer) || (o == null ? void 0 : o.role) !== "assistant")
408
411
  return;
409
412
  const { content: c, sequence: a } = t;
410
413
  e === q.Partial ? n[a] = c : n.answer = c;
411
- const s = et(n);
414
+ const s = tt(n);
412
415
  (o.content !== s || e === q.Answer) && (o.content = s, i == null || i([...r.messages], e));
413
416
  }
414
- function rt(e, t, n, r, i) {
417
+ function nt(e, t, n, r, i) {
415
418
  let o = {};
416
419
  return {
417
420
  clearQueue: () => o = {},
418
421
  onMessage: (c, a) => {
419
422
  var s, d;
420
423
  if ("content" in a)
421
- tt(c, a, o, t, n.callbacks.onNewMessage), c === q.Answer && e.track("agent-message-received", {
424
+ rt(c, a, o, t, n.callbacks.onNewMessage), c === q.Answer && e.track("agent-message-received", {
422
425
  messages: t.messages.length,
423
426
  mode: t.chatMode
424
427
  });
425
428
  else {
426
- const l = A, v = [l.StreamVideoDone, l.StreamVideoError, l.StreamVideoRejected], M = [l.StreamFailed, l.StreamVideoError, l.StreamVideoRejected], T = He(a, r, { mode: t.chatMode });
429
+ const l = P, y = [l.StreamVideoDone, l.StreamVideoError, l.StreamVideoRejected], M = [l.StreamFailed, l.StreamVideoError, l.StreamVideoRejected], j = qe(a, r, { mode: t.chatMode });
427
430
  if (c = c, c === l.StreamVideoCreated)
428
- e.linkTrack("agent-video", T, l.StreamVideoCreated, ["start"]);
429
- else if (v.includes(c)) {
431
+ e.linkTrack("agent-video", j, l.StreamVideoCreated, ["start"]);
432
+ else if (y.includes(c)) {
430
433
  const b = c.split("/")[1];
431
- M.includes(c) ? e.track("agent-video", { ...T, event: b }) : e.linkTrack("agent-video", { ...T, event: b }, c, ["done"]);
434
+ M.includes(c) ? e.track("agent-video", { ...j, event: b }) : e.linkTrack("agent-video", { ...j, event: b }, c, ["done"]);
432
435
  }
433
436
  M.includes(c) && ((d = (s = n.callbacks).onError) == null || d.call(s, new Error(`Stream failed with event ${c}`), { data: a })), a.event === l.StreamDone && i();
434
437
  }
435
438
  }
436
439
  };
437
440
  }
438
- function nt(e, t, n, r) {
439
- const i = me(e, `${t}/agents/${n}`, r);
441
+ function at(e, t, n, r) {
442
+ const i = ge(e, `${t}/agents/${n}`, r);
440
443
  return {
441
444
  createStream(o) {
442
445
  return i.post("/streams", o);
@@ -464,8 +467,8 @@ function nt(e, t, n, r) {
464
467
  }
465
468
  };
466
469
  }
467
- const at = (e, t) => (n, r) => e && console.log(`[${t}] ${n}`, r ?? "");
468
- function it(e, t, n) {
470
+ const it = (e, t) => (n, r) => e && console.log(`[${t}] ${n}`, r ?? "");
471
+ function st(e, t, n) {
469
472
  const r = (t.timestamp - e.timestamp) / 1e3;
470
473
  return {
471
474
  duration: r,
@@ -485,7 +488,7 @@ function it(e, t, n) {
485
488
  lowFpsCount: n
486
489
  };
487
490
  }
488
- function st(e) {
491
+ function ot(e) {
489
492
  return e.filter(
490
493
  (t) => t.freezeCount > 0 || t.framesPerSecond < 21 || t.framesDropped > 0 || t.packetsLost > 0
491
494
  ).map((t) => {
@@ -496,7 +499,7 @@ function st(e) {
496
499
  };
497
500
  });
498
501
  }
499
- function ot(e) {
502
+ function ct(e) {
500
503
  let t = "", n = 0;
501
504
  for (const r of e.values())
502
505
  if (r && r.type === "codec" && r.mimeType.startsWith("video") && (t = r.mimeType.split("/")[1]), r && r.type === "candidate-pair" && (n = r.currentRoundTripTime), r && r.type === "inbound-rtp" && r.kind === "video")
@@ -521,7 +524,7 @@ function ot(e) {
521
524
  };
522
525
  return {};
523
526
  }
524
- function ct(e, t, n) {
527
+ function dt(e, t, n) {
525
528
  const r = e.map((s, d) => d === 0 ? n ? {
526
529
  timestamp: s.timestamp,
527
530
  duration: 0,
@@ -573,32 +576,32 @@ function ct(e, t, n) {
573
576
  framesPerSecond: s.framesPerSecond,
574
577
  freezeCount: s.freezeCount - e[d - 1].freezeCount,
575
578
  freezeDuration: s.freezeDuration - e[d - 1].freezeDuration
576
- }), i = st(r), o = i.reduce((s, d) => s + (d.causes.includes("low fps") ? 1 : 0), 0), c = r.filter((s) => !!s.avgJitterDelayInInterval).map((s) => s.avgJitterDelayInInterval), a = r.filter((s) => !!s.rtt).map((s) => s.rtt);
579
+ }), i = ot(r), o = i.reduce((s, d) => s + (d.causes.includes("low fps") ? 1 : 0), 0), c = r.filter((s) => !!s.avgJitterDelayInInterval).map((s) => s.avgJitterDelayInInterval), a = r.filter((s) => !!s.rtt).map((s) => s.rtt);
577
580
  return {
578
581
  webRTCStats: {
579
582
  anomalies: i,
580
583
  minRtt: Math.min(...a),
581
- avgRtt: ie(a),
584
+ avgRtt: se(a),
582
585
  maxRtt: Math.max(...a),
583
- aggregateReport: it(e[0], e[e.length - 1], o),
586
+ aggregateReport: st(e[0], e[e.length - 1], o),
584
587
  minJitterDelayInInterval: Math.min(...c),
585
588
  maxJitterDelayInInterval: Math.max(...c),
586
- avgJitterDelayInInterval: ie(c)
589
+ avgJitterDelayInInterval: se(c)
587
590
  },
588
591
  codec: e[0].codec,
589
592
  resolution: `${e[0].frameWidth}x${e[0].frameHeight}`
590
593
  };
591
594
  }
592
- const ae = 100, dt = Math.max(Math.ceil(400 / ae), 1), lt = 0.25, ut = 0.28;
593
- function ft() {
595
+ const ie = 100, lt = Math.max(Math.ceil(400 / ie), 1), ut = 0.25, ft = 0.28;
596
+ function mt() {
594
597
  let e = 0, t, n, r = 0;
595
598
  return (i) => {
596
599
  for (const o of i.values())
597
600
  if (o && o.type === "inbound-rtp" && o.kind === "video") {
598
601
  const c = o.jitterBufferDelay, a = o.jitterBufferEmittedCount;
599
602
  if (n && a > n) {
600
- const l = c - t, v = a - n;
601
- r = l / v;
603
+ const l = c - t, y = a - n;
604
+ r = l / y;
602
605
  }
603
606
  t = c, n = a;
604
607
  const s = o.framesDecoded, d = s - e > 0;
@@ -607,41 +610,41 @@ function ft() {
607
610
  return { isReceiving: !1, avgJitterDelayInInterval: r };
608
611
  };
609
612
  }
610
- function mt(e, t, n, r, i, o = !1) {
611
- let c = [], a, s = 0, d = !1, l = Z.Unknown, v = Z.Unknown, M = 0, T = 0;
612
- const b = ft();
613
+ function gt(e, t, n, r, i, o = !1) {
614
+ let c = [], a, s = 0, d = !1, l = G.Unknown, y = G.Unknown, M = 0, j = 0;
615
+ const b = mt();
613
616
  return setInterval(async () => {
614
- const F = await e.getStats(), { isReceiving: K, avgJitterDelayInInterval: J, freezeCount: R } = b(F), U = ot(F);
617
+ const z = await e.getStats(), { isReceiving: K, avgJitterDelayInInterval: W, freezeCount: C } = b(z), U = ct(z);
615
618
  if (K)
616
- s = 0, M = R - T, v = J < lt ? Z.Strong : J > ut && M > 1 ? Z.Weak : l, v !== l && (i == null || i(v), l = v, T += M, M = 0), d || (r == null || r(w.Start), a = c[c.length - 1], c = [], d = !0), c.push(U);
617
- else if (d && (s++, s >= dt)) {
618
- const u = ct(c, ae, a);
619
- r == null || r(w.Stop, u), t() || n(), T = R, d = !1;
619
+ s = 0, M = C - j, y = W < ut ? G.Strong : W > ft && M > 1 ? G.Weak : l, y !== l && (i == null || i(y), l = y, j += M, M = 0), d || (r == null || r(w.Start), a = c[c.length - 1], c = [], d = !0), c.push(U);
620
+ else if (d && (s++, s >= lt)) {
621
+ const u = dt(c, ie, a);
622
+ r == null || r(w.Stop, u), t() || n(), j = C, d = !1;
620
623
  }
621
- }, ae);
624
+ }, ie);
622
625
  }
623
- const gt = (window.RTCPeerConnection || window.webkitRTCPeerConnection || window.mozRTCPeerConnection).bind(window);
624
- function se(e) {
626
+ const ht = (window.RTCPeerConnection || window.webkitRTCPeerConnection || window.mozRTCPeerConnection).bind(window);
627
+ function oe(e) {
625
628
  switch (e) {
626
629
  case "connected":
627
- return S.Connected;
630
+ return R.Connected;
628
631
  case "checking":
629
- return S.Connecting;
632
+ return R.Connecting;
630
633
  case "failed":
631
- return S.Fail;
634
+ return R.Fail;
632
635
  case "new":
633
- return S.New;
636
+ return R.New;
634
637
  case "closed":
635
- return S.Closed;
638
+ return R.Closed;
636
639
  case "disconnected":
637
- return S.Disconnected;
640
+ return R.Disconnected;
638
641
  case "completed":
639
- return S.Completed;
642
+ return R.Completed;
640
643
  default:
641
- return S.New;
644
+ return R.New;
642
645
  }
643
646
  }
644
- const ht = (e) => (t) => {
647
+ const wt = (e) => (t) => {
645
648
  const [n, r = ""] = t.split(/:(.+)/);
646
649
  try {
647
650
  const i = JSON.parse(r);
@@ -650,7 +653,7 @@ const ht = (e) => (t) => {
650
653
  return e("Failed to parse data channel message, returning data as string", { subject: n, rawData: r, error: i }), { subject: n, data: r };
651
654
  }
652
655
  };
653
- function wt({
656
+ function pt({
654
657
  statsSignal: e,
655
658
  dataChannelSignal: t,
656
659
  onVideoStateChange: n,
@@ -658,7 +661,7 @@ function wt({
658
661
  }) {
659
662
  e === w.Start && t === w.Start ? n == null || n(w.Start) : e === w.Stop && t === w.Stop && (n == null || n(w.Stop, r));
660
663
  }
661
- function pt({
664
+ function yt({
662
665
  statsSignal: e,
663
666
  dataChannelSignal: t,
664
667
  onVideoStateChange: n,
@@ -667,7 +670,7 @@ function pt({
667
670
  }) {
668
671
  e === w.Start ? n == null || n(w.Start) : e === w.Stop && (n == null || n(w.Stop, i)), t === w.Start ? r == null || r(O.Talking) : t === w.Stop && (r == null || r(O.Idle));
669
672
  }
670
- function oe({
673
+ function ce({
671
674
  statsSignal: e,
672
675
  dataChannelSignal: t,
673
676
  onVideoStateChange: n,
@@ -675,7 +678,7 @@ function oe({
675
678
  streamType: i,
676
679
  report: o
677
680
  }) {
678
- i === N.Legacy ? wt({ statsSignal: e, dataChannelSignal: t, onVideoStateChange: n, report: o }) : i === N.Fluent && pt({
681
+ i === J.Legacy ? pt({ statsSignal: e, dataChannelSignal: t, onVideoStateChange: n, report: o }) : i === J.Fluent && yt({
679
682
  statsSignal: e,
680
683
  dataChannelSignal: t,
681
684
  onVideoStateChange: n,
@@ -683,157 +686,158 @@ function oe({
683
686
  report: o
684
687
  });
685
688
  }
686
- async function yt(e, t, { debug: n = !1, callbacks: r, auth: i, baseURL: o = G, analytics: c }) {
687
- var X;
688
- const a = at(n, "WebRTCStreamingManager"), s = ht(a);
689
- let d = !1, l = !1, v = w.Stop, M = w.Stop;
690
- const { startConnection: T, sendStreamRequest: b, close: F, createStream: K, addIceCandidate: J } = nt(
689
+ async function vt(e, t, { debug: n = !1, callbacks: r, auth: i, baseURL: o = ee, analytics: c }) {
690
+ var Y;
691
+ const a = it(n, "WebRTCStreamingManager"), s = wt(a);
692
+ let d = !1, l = !1, y = w.Stop, M = w.Stop;
693
+ const { startConnection: j, sendStreamRequest: b, close: z, createStream: K, addIceCandidate: W } = at(
691
694
  i,
692
695
  o,
693
696
  e,
694
697
  r.onError
695
698
  ), {
696
- id: R,
699
+ id: C,
697
700
  offer: U,
698
701
  ice_servers: u,
699
702
  session_id: h,
700
703
  fluent: p,
701
- interrupt_enabled: _
704
+ interrupt_enabled: _,
705
+ triggers_enabled: v
702
706
  } = await K(t);
703
- (X = r.onStreamCreated) == null || X.call(r, { stream_id: R, session_id: h, agent_id: e });
704
- const m = new gt({ iceServers: u }), y = m.createDataChannel("JanusDataChannel");
707
+ (Y = r.onStreamCreated) == null || Y.call(r, { stream_id: C, session_id: h, agent_id: e });
708
+ const f = new ht({ iceServers: u }), S = f.createDataChannel("JanusDataChannel");
705
709
  if (!h)
706
710
  throw new Error("Could not create session_id");
707
- const C = p ? N.Fluent : N.Legacy;
711
+ const T = p ? J.Fluent : J.Legacy;
708
712
  c.enrich({
709
- "stream-type": C
713
+ "stream-type": T
710
714
  });
711
- const P = t.stream_warmup && !p, $ = () => d, k = () => {
712
- var f;
713
- d = !0, l && ((f = r.onConnectionStateChange) == null || f.call(r, S.Connected));
714
- }, I = mt(
715
- m,
716
- $,
717
- k,
718
- (f, g) => oe({
719
- statsSignal: M = f,
720
- dataChannelSignal: C === N.Legacy ? v : void 0,
715
+ const L = t.stream_warmup && !p, D = () => d, I = () => {
716
+ var m;
717
+ d = !0, l && ((m = r.onConnectionStateChange) == null || m.call(r, R.Connected));
718
+ }, k = gt(
719
+ f,
720
+ D,
721
+ I,
722
+ (m, g) => ce({
723
+ statsSignal: M = m,
724
+ dataChannelSignal: T === J.Legacy ? y : void 0,
721
725
  onVideoStateChange: r.onVideoStateChange,
722
726
  onAgentActivityStateChange: r.onAgentActivityStateChange,
723
727
  report: g,
724
- streamType: C
728
+ streamType: T
725
729
  }),
726
- (f) => {
730
+ (m) => {
727
731
  var g;
728
- return (g = r.onConnectivityStateChange) == null ? void 0 : g.call(r, f);
732
+ return (g = r.onConnectivityStateChange) == null ? void 0 : g.call(r, m);
729
733
  },
730
- P
734
+ L
731
735
  );
732
- m.onicecandidate = (f) => {
736
+ f.onicecandidate = (m) => {
733
737
  var g;
734
- a("peerConnection.onicecandidate", f);
738
+ a("peerConnection.onicecandidate", m);
735
739
  try {
736
- f.candidate && f.candidate.sdpMid && f.candidate.sdpMLineIndex !== null ? J(
737
- R,
740
+ m.candidate && m.candidate.sdpMid && m.candidate.sdpMLineIndex !== null ? W(
741
+ C,
738
742
  {
739
- candidate: f.candidate.candidate,
740
- sdpMid: f.candidate.sdpMid,
741
- sdpMLineIndex: f.candidate.sdpMLineIndex
743
+ candidate: m.candidate.candidate,
744
+ sdpMid: m.candidate.sdpMid,
745
+ sdpMLineIndex: m.candidate.sdpMLineIndex
742
746
  },
743
747
  h
744
- ) : J(R, { candidate: null }, h);
745
- } catch (j) {
746
- (g = r.onError) == null || g.call(r, j, { streamId: R });
748
+ ) : W(C, { candidate: null }, h);
749
+ } catch (A) {
750
+ (g = r.onError) == null || g.call(r, A, { streamId: C });
747
751
  }
748
- }, y.onopen = () => {
749
- l = !0, (!P || d) && k();
752
+ }, S.onopen = () => {
753
+ l = !0, (!L || d) && I();
750
754
  };
751
- const D = (f) => {
755
+ const x = (m) => {
752
756
  var g;
753
- (g = r.onVideoIdChange) == null || g.call(r, f);
757
+ (g = r.onVideoIdChange) == null || g.call(r, m);
754
758
  };
755
- function z(f, g) {
756
- if (f === A.StreamStarted && typeof g == "object" && "metadata" in g) {
757
- const j = g.metadata;
758
- D(j.videoId);
759
+ function B(m, g) {
760
+ if (m === P.StreamStarted && typeof g == "object" && "metadata" in g) {
761
+ const A = g.metadata;
762
+ x(A.videoId);
759
763
  }
760
- f === A.StreamDone && D(null), v = f === A.StreamStarted ? w.Start : w.Stop, oe({
761
- statsSignal: C === N.Legacy ? M : void 0,
762
- dataChannelSignal: v,
764
+ m === P.StreamDone && x(null), y = m === P.StreamStarted ? w.Start : w.Stop, ce({
765
+ statsSignal: T === J.Legacy ? M : void 0,
766
+ dataChannelSignal: y,
763
767
  onVideoStateChange: r.onVideoStateChange,
764
768
  onAgentActivityStateChange: r.onAgentActivityStateChange,
765
- streamType: C
769
+ streamType: T
766
770
  });
767
771
  }
768
- function x(f, g) {
769
- const j = typeof g == "string" ? g : g == null ? void 0 : g.metadata;
770
- j && c.enrich({ streamMetadata: j }), c.track("agent-chat", { event: "ready" });
772
+ function F(m, g) {
773
+ const A = typeof g == "string" ? g : g == null ? void 0 : g.metadata;
774
+ A && c.enrich({ streamMetadata: A }), c.track("agent-chat", { event: "ready" });
771
775
  }
772
- const L = {
773
- [A.StreamStarted]: z,
774
- [A.StreamDone]: z,
775
- [A.StreamReady]: x
776
+ const N = {
777
+ [P.StreamStarted]: B,
778
+ [P.StreamDone]: B,
779
+ [P.StreamReady]: F
776
780
  };
777
- y.onmessage = (f) => {
778
- var Y;
779
- const { subject: g, data: j } = s(f.data);
780
- (Y = L[g]) == null || Y.call(L, g, j);
781
- }, m.oniceconnectionstatechange = () => {
781
+ S.onmessage = (m) => {
782
+ var Q;
783
+ const { subject: g, data: A } = s(m.data);
784
+ (Q = N[g]) == null || Q.call(N, g, A);
785
+ }, f.oniceconnectionstatechange = () => {
782
786
  var g;
783
- a("peerConnection.oniceconnectionstatechange => " + m.iceConnectionState);
784
- const f = se(m.iceConnectionState);
785
- f !== S.Connected && ((g = r.onConnectionStateChange) == null || g.call(r, f));
786
- }, m.ontrack = (f) => {
787
+ a("peerConnection.oniceconnectionstatechange => " + f.iceConnectionState);
788
+ const m = oe(f.iceConnectionState);
789
+ m !== R.Connected && ((g = r.onConnectionStateChange) == null || g.call(r, m));
790
+ }, f.ontrack = (m) => {
787
791
  var g;
788
- a("peerConnection.ontrack", f), (g = r.onSrcObjectReady) == null || g.call(r, f.streams[0]);
789
- }, await m.setRemoteDescription(U), a("set remote description OK");
790
- const W = await m.createAnswer();
791
- return a("create answer OK"), await m.setLocalDescription(W), a("set local description OK"), await T(R, W, h), a("start connection OK"), {
792
+ a("peerConnection.ontrack", m), (g = r.onSrcObjectReady) == null || g.call(r, m.streams[0]);
793
+ }, await f.setRemoteDescription(U), a("set remote description OK");
794
+ const X = await f.createAnswer();
795
+ return a("create answer OK"), await f.setLocalDescription(X), a("set local description OK"), await j(C, X, h), a("start connection OK"), {
792
796
  /**
793
797
  * Method to send request to server to get clip or talk depend on you payload
794
798
  * @param payload
795
799
  */
796
- speak(f) {
797
- return b(R, h, f);
800
+ speak(m) {
801
+ return b(C, h, m);
798
802
  },
799
803
  /**
800
804
  * Method to close RTC connection
801
805
  */
802
806
  async disconnect() {
803
- var f;
804
- if (R) {
805
- const g = se(m.iceConnectionState);
806
- if (m) {
807
- if (g === S.New) {
808
- clearInterval(I);
807
+ var m;
808
+ if (C) {
809
+ const g = oe(f.iceConnectionState);
810
+ if (f) {
811
+ if (g === R.New) {
812
+ clearInterval(k);
809
813
  return;
810
814
  }
811
- m.close(), m.oniceconnectionstatechange = null, m.onnegotiationneeded = null, m.onicecandidate = null, m.ontrack = null;
815
+ f.close(), f.oniceconnectionstatechange = null, f.onnegotiationneeded = null, f.onicecandidate = null, f.ontrack = null;
812
816
  }
813
817
  try {
814
- g === S.Connected && await F(R, h).catch((j) => {
818
+ g === R.Connected && await z(C, h).catch((A) => {
815
819
  });
816
- } catch (j) {
817
- a("Error on close stream connection", j);
820
+ } catch (A) {
821
+ a("Error on close stream connection", A);
818
822
  }
819
- (f = r.onAgentActivityStateChange) == null || f.call(r, O.Idle), clearInterval(I);
823
+ (m = r.onAgentActivityStateChange) == null || m.call(r, O.Idle), clearInterval(k);
820
824
  }
821
825
  },
822
826
  /**
823
827
  * Method to send data channel messages to the server
824
828
  */
825
- sendDataChannelMessage(f) {
826
- var g, j;
827
- if (!d || y.readyState !== "open") {
829
+ sendDataChannelMessage(m) {
830
+ var g, A;
831
+ if (!d || S.readyState !== "open") {
828
832
  a("Data channel is not ready for sending messages"), (g = r.onError) == null || g.call(r, new Error("Data channel is not ready for sending messages"), {
829
- streamId: R
833
+ streamId: C
830
834
  });
831
835
  return;
832
836
  }
833
837
  try {
834
- y.send(f);
835
- } catch (Y) {
836
- a("Error sending data channel message", Y), (j = r.onError) == null || j.call(r, Y, { streamId: R });
838
+ S.send(m);
839
+ } catch (Q) {
840
+ a("Error sending data channel message", Q), (A = r.onError) == null || A.call(r, Q, { streamId: C });
837
841
  }
838
842
  },
839
843
  /**
@@ -843,21 +847,22 @@ async function yt(e, t, { debug: n = !1, callbacks: r, auth: i, baseURL: o = G,
843
847
  /**
844
848
  * Id of current RTC stream
845
849
  */
846
- streamId: R,
847
- streamType: C,
848
- interruptAvailable: _ ?? !1
850
+ streamId: C,
851
+ streamType: T,
852
+ interruptAvailable: _ ?? !1,
853
+ triggersAvailable: v ?? !1
849
854
  };
850
855
  }
851
- const vt = (e) => e.presenter.type === ce.Expressive;
852
- async function kt(e, t, n) {
856
+ const kt = (e) => e.presenter.type === de.Expressive;
857
+ async function Dt(e, t, n) {
853
858
  const r = e.id;
854
- if (vt(e)) {
855
- const { createLiveKitStreamingManager: i } = await import("./livekit-manager-6i5Rpchn.js");
859
+ if (kt(e)) {
860
+ const { createLiveKitStreamingManager: i } = await import("./livekit-manager-DZ_BAT5P.js");
856
861
  return i(r, t, n);
857
862
  } else
858
- return yt(r, t, n);
863
+ return vt(r, t, n);
859
864
  }
860
- function Dt(e) {
865
+ function Ct(e) {
861
866
  const { streamOptions: t } = e ?? {};
862
867
  return {
863
868
  output_resolution: t == null ? void 0 : t.outputResolution,
@@ -867,10 +872,10 @@ function Dt(e) {
867
872
  fluent: t == null ? void 0 : t.fluent
868
873
  };
869
874
  }
870
- function Ct(e, t, n, r, i) {
871
- i === N.Fluent ? Rt(e, t, n, r, i) : It(e, t, n, r, i);
872
- }
873
875
  function Rt(e, t, n, r, i) {
876
+ i === J.Fluent ? St(e, t, n, r, i) : Et(e, t, n, r, i);
877
+ }
878
+ function St(e, t, n, r, i) {
874
879
  e === w.Start ? r.track("stream-session", { event: "start", "stream-type": i }) : e === w.Stop && r.track("stream-session", {
875
880
  event: "stop",
876
881
  is_greenscreen: t.presenter.type === "clip" && t.presenter.is_greenscreen,
@@ -879,12 +884,12 @@ function Rt(e, t, n, r, i) {
879
884
  ...n
880
885
  });
881
886
  }
882
- function St(e, t, n, r) {
883
- B.get() <= 0 || (e === w.Start ? n.linkTrack(
887
+ function It(e, t, n, r) {
888
+ $.get() <= 0 || (e === w.Start ? n.linkTrack(
884
889
  "agent-video",
885
- { event: "start", latency: B.get(!0), "stream-type": r },
890
+ { event: "start", latency: $.get(!0), "stream-type": r },
886
891
  "start",
887
- [A.StreamVideoCreated]
892
+ [P.StreamVideoCreated]
888
893
  ) : e === w.Stop && n.linkTrack(
889
894
  "agent-video",
890
895
  {
@@ -894,15 +899,15 @@ function St(e, t, n, r) {
894
899
  "stream-type": r
895
900
  },
896
901
  "done",
897
- [A.StreamVideoDone]
902
+ [P.StreamVideoDone]
898
903
  ));
899
904
  }
900
- function It(e, t, n, r, i) {
901
- B.get() <= 0 || (e === w.Start ? r.linkTrack(
905
+ function Et(e, t, n, r, i) {
906
+ $.get() <= 0 || (e === w.Start ? r.linkTrack(
902
907
  "agent-video",
903
- { event: "start", latency: B.get(!0), "stream-type": i },
908
+ { event: "start", latency: $.get(!0), "stream-type": i },
904
909
  "start",
905
- [A.StreamVideoCreated]
910
+ [P.StreamVideoCreated]
906
911
  ) : e === w.Stop && r.linkTrack(
907
912
  "agent-video",
908
913
  {
@@ -913,25 +918,25 @@ function It(e, t, n, r, i) {
913
918
  ...n
914
919
  },
915
920
  "done",
916
- [A.StreamVideoDone]
921
+ [P.StreamVideoDone]
917
922
  ));
918
923
  }
919
- function Et(e, t, n) {
920
- return B.reset(), new Promise(async (r, i) => {
924
+ function Mt(e, t, n) {
925
+ return $.reset(), new Promise(async (r, i) => {
921
926
  try {
922
927
  let o;
923
- o = await kt(e, Dt(t), {
928
+ o = await Dt(e, Ct(t), {
924
929
  ...t,
925
930
  analytics: n,
926
931
  callbacks: {
927
932
  ...t.callbacks,
928
933
  onConnectionStateChange: (c) => {
929
934
  var a, s;
930
- (s = (a = t.callbacks).onConnectionStateChange) == null || s.call(a, c), c === S.Connected && r(o);
935
+ (s = (a = t.callbacks).onConnectionStateChange) == null || s.call(a, c), c === R.Connected && r(o);
931
936
  },
932
937
  onVideoStateChange: (c, a) => {
933
938
  var s, d;
934
- (d = (s = t.callbacks).onVideoStateChange) == null || d.call(s, c), Ct(
939
+ (d = (s = t.callbacks).onVideoStateChange) == null || d.call(s, c), Rt(
935
940
  c,
936
941
  e,
937
942
  a,
@@ -941,7 +946,7 @@ function Et(e, t, n) {
941
946
  },
942
947
  onAgentActivityStateChange: (c) => {
943
948
  var a, s;
944
- (s = (a = t.callbacks).onAgentActivityStateChange) == null || s.call(a, c), c === O.Talking ? ne.update() : ne.reset(), St(
949
+ (s = (a = t.callbacks).onAgentActivityStateChange) == null || s.call(a, c), c === O.Talking ? ae.update() : ae.reset(), It(
945
950
  c === O.Talking ? w.Start : w.Stop,
946
951
  e,
947
952
  n,
@@ -955,27 +960,28 @@ function Et(e, t, n) {
955
960
  }
956
961
  });
957
962
  }
958
- async function Mt(e, t, n, r, i) {
959
- var v, M, T, b;
960
- const o = ye(e, n, r, t.mode, t.persistentChat, i), c = Et(e, t, r), [a, s] = await Promise.all([o, c]), { chat: d, chatMode: l } = a;
961
- return l && l !== t.mode && (t.mode = l, (M = (v = t.callbacks).onModeChange) == null || M.call(v, l), l !== E.Functional) ? ((b = (T = t.callbacks).onError) == null || b.call(T, new Ce(l)), s == null || s.disconnect(), { chat: d }) : { chat: d, streamingManager: s };
963
+ async function _t(e, t, n, r, i) {
964
+ var y, M, j, b;
965
+ const o = ve(e, n, r, t.mode, t.persistentChat, i), c = Mt(e, t, r), [a, s] = await Promise.all([o, c]), { chat: d, chatMode: l } = a;
966
+ return l && l !== t.mode && (t.mode = l, (M = (y = t.callbacks).onModeChange) == null || M.call(y, l), l !== E.Functional) ? ((b = (j = t.callbacks).onError) == null || b.call(j, new Re(l)), s == null || s.disconnect(), { chat: d }) : { chat: d, streamingManager: s };
962
967
  }
963
- async function jt(e, t) {
964
- var J, R, U;
968
+ async function At(e, t) {
969
+ var W, C, U;
965
970
  let n = !0, r = null;
966
- const i = t.mixpanelKey || ze, o = t.wsURL || $e, c = t.baseURL || G, a = {
971
+ const i = t.mixpanelKey || ze, o = t.wsURL || xe, c = t.baseURL || ee, a = {
967
972
  messages: [],
968
973
  chatMode: t.mode || E.Functional
969
- }, s = Ve({
974
+ }, s = Oe({
970
975
  token: i,
971
976
  agentId: e,
972
977
  isEnabled: t.enableAnalitics,
973
- distinctId: t.distinctId
978
+ distinctId: t.distinctId,
979
+ mixpanelAdditionalProperties: t.mixpanelAdditionalProperties
974
980
  });
975
981
  s.track("agent-sdk", { event: "init" });
976
- const d = ge(t.auth, c, t.callbacks.onError), l = await d.getById(e);
977
- s.enrich(Ke(l));
978
- const { onMessage: v, clearQueue: M } = rt(
982
+ const d = he(t.auth, c, t.callbacks.onError), l = await d.getById(e);
983
+ s.enrich(Ue(l));
984
+ const { onMessage: y, clearQueue: M } = nt(
979
985
  s,
980
986
  a,
981
987
  t,
@@ -985,47 +991,47 @@ async function jt(e, t) {
985
991
  return (u = a.socketManager) == null ? void 0 : u.disconnect();
986
992
  }
987
993
  );
988
- a.messages = Oe(t.initialMessages), (R = (J = t.callbacks).onNewMessage) == null || R.call(J, [...a.messages], "answer");
989
- const T = (u) => {
994
+ a.messages = Xe(t.initialMessages), (C = (W = t.callbacks).onNewMessage) == null || C.call(W, [...a.messages], "answer");
995
+ const j = (u) => {
990
996
  r = u;
991
997
  };
992
- s.track("agent-sdk", { event: "loaded", ...We(l) });
998
+ s.track("agent-sdk", { event: "loaded", ...Ke(l) });
993
999
  async function b(u) {
994
- var C, P, $, k, I, D, z;
995
- (P = (C = t.callbacks).onConnectionStateChange) == null || P.call(C, S.Connecting), B.reset(), u && !n && (delete a.chat, (k = ($ = t.callbacks).onNewMessage) == null || k.call($, [...a.messages], "answer"));
996
- const h = t.mode === E.DirectPlayback ? Promise.resolve(void 0) : Ge(t.auth, o, { onMessage: v, onError: t.callbacks.onError }), p = re(
997
- () => Mt(
1000
+ var S, T, L, D, I, k, x;
1001
+ (T = (S = t.callbacks).onConnectionStateChange) == null || T.call(S, R.Connecting), $.reset(), u && !n && (delete a.chat, (D = (L = t.callbacks).onNewMessage) == null || D.call(L, [...a.messages], "answer"));
1002
+ const h = t.mode === E.DirectPlayback ? Promise.resolve(void 0) : et(t.auth, o, { onMessage: y, onError: t.callbacks.onError }), p = ne(
1003
+ () => _t(
998
1004
  l,
999
- { ...t, callbacks: { ...t.callbacks, onVideoIdChange: T } },
1005
+ { ...t, callbacks: { ...t.callbacks, onVideoIdChange: j } },
1000
1006
  d,
1001
1007
  s,
1002
1008
  a.chat
1003
1009
  ),
1004
1010
  {
1005
1011
  limit: 3,
1006
- timeout: Le,
1012
+ timeout: Be,
1007
1013
  timeoutErrorMessage: "Timeout initializing the stream",
1008
1014
  // Retry on all errors except for connection errors and rate limit errors, these are already handled in client level.
1009
- shouldRetryFn: (x) => (x == null ? void 0 : x.message) !== "Could not connect" && x.status !== 429,
1015
+ shouldRetryFn: (B) => (B == null ? void 0 : B.message) !== "Could not connect" && B.status !== 429,
1010
1016
  delayMs: 1e3
1011
1017
  }
1012
- ).catch((x) => {
1013
- var L, W;
1014
- throw K(E.Maintenance), (W = (L = t.callbacks).onConnectionStateChange) == null || W.call(L, S.Fail), x;
1015
- }), [_, { streamingManager: m, chat: y }] = await Promise.all([h, p]);
1016
- y && y.id !== ((I = a.chat) == null ? void 0 : I.id) && ((z = (D = t.callbacks).onNewChat) == null || z.call(D, y.id)), a.streamingManager = m, a.socketManager = _, a.chat = y, n = !1, s.enrich({
1017
- chatId: y == null ? void 0 : y.id,
1018
- streamId: m == null ? void 0 : m.streamId,
1018
+ ).catch((B) => {
1019
+ var F, N;
1020
+ throw K(E.Maintenance), (N = (F = t.callbacks).onConnectionStateChange) == null || N.call(F, R.Fail), B;
1021
+ }), [_, { streamingManager: v, chat: f }] = await Promise.all([h, p]);
1022
+ f && f.id !== ((I = a.chat) == null ? void 0 : I.id) && ((x = (k = t.callbacks).onNewChat) == null || x.call(k, f.id)), a.streamingManager = v, a.socketManager = _, a.chat = f, n = !1, s.enrich({
1023
+ chatId: f == null ? void 0 : f.id,
1024
+ streamId: v == null ? void 0 : v.streamId,
1019
1025
  mode: a.chatMode
1020
- }), K((y == null ? void 0 : y.chat_mode) ?? t.mode ?? E.Functional);
1026
+ }), K((f == null ? void 0 : f.chat_mode) ?? t.mode ?? E.Functional);
1021
1027
  }
1022
- async function F() {
1028
+ async function z() {
1023
1029
  var u, h, p, _;
1024
- (u = a.socketManager) == null || u.disconnect(), await ((h = a.streamingManager) == null ? void 0 : h.disconnect()), delete a.streamingManager, delete a.socketManager, (_ = (p = t.callbacks).onConnectionStateChange) == null || _.call(p, S.Disconnected);
1030
+ (u = a.socketManager) == null || u.disconnect(), await ((h = a.streamingManager) == null ? void 0 : h.disconnect()), delete a.streamingManager, delete a.socketManager, (_ = (p = t.callbacks).onConnectionStateChange) == null || _.call(p, R.Disconnected);
1025
1031
  }
1026
1032
  async function K(u) {
1027
1033
  var h, p;
1028
- u !== a.chatMode && (s.track("agent-mode-change", { mode: u }), a.chatMode = u, a.chatMode !== E.Functional && await F(), (p = (h = t.callbacks).onModeChange) == null || p.call(h, u));
1034
+ u !== a.chatMode && (s.track("agent-mode-change", { mode: u }), a.chatMode = u, a.chatMode !== E.Functional && await z(), (p = (h = t.callbacks).onModeChange) == null || p.call(h, u));
1029
1035
  }
1030
1036
  return {
1031
1037
  agent: l,
@@ -1037,6 +1043,10 @@ async function jt(e, t) {
1037
1043
  var u;
1038
1044
  return ((u = a.streamingManager) == null ? void 0 : u.interruptAvailable) ?? !1;
1039
1045
  },
1046
+ getIsTriggersAvailable: () => {
1047
+ var u;
1048
+ return ((u = a.streamingManager) == null ? void 0 : u.triggersAvailable) ?? !1;
1049
+ },
1040
1050
  starterMessages: ((U = l.knowledge) == null ? void 0 : U.starter_message) || [],
1041
1051
  getSTTToken: () => d.getSTTToken(l.id),
1042
1052
  changeMode: K,
@@ -1048,21 +1058,21 @@ async function jt(e, t) {
1048
1058
  });
1049
1059
  },
1050
1060
  async reconnect() {
1051
- await F(), await b(!1), s.track("agent-chat", {
1061
+ await z(), await b(!1), s.track("agent-chat", {
1052
1062
  event: "reconnect",
1053
1063
  mode: a.chatMode
1054
1064
  });
1055
1065
  },
1056
1066
  async disconnect() {
1057
- await F(), s.track("agent-chat", {
1067
+ await z(), s.track("agent-chat", {
1058
1068
  event: "disconnect",
1059
1069
  mode: a.chatMode
1060
1070
  });
1061
1071
  },
1062
1072
  async chat(u) {
1063
- var m, y, C, P, $;
1073
+ var v, f, S, T, L;
1064
1074
  const h = () => {
1065
- if (le(t.mode))
1075
+ if (ue(t.mode))
1066
1076
  throw new H(`${t.mode} is enabled, chat is disabled`);
1067
1077
  if (u.length >= 800)
1068
1078
  throw new H("Message cannot be more than 800 characters");
@@ -1077,47 +1087,47 @@ async function jt(e, t) {
1077
1087
  throw new H("Chat is not initialized");
1078
1088
  }
1079
1089
  }, p = async () => {
1080
- var k, I;
1090
+ var D, I;
1081
1091
  if (!a.chat) {
1082
- const D = await ye(
1092
+ const k = await ve(
1083
1093
  l,
1084
1094
  d,
1085
1095
  s,
1086
1096
  a.chatMode,
1087
1097
  t.persistentChat
1088
1098
  );
1089
- if (!D.chat)
1090
- throw new De(a.chatMode, !!t.persistentChat);
1091
- a.chat = D.chat, (I = (k = t.callbacks).onNewChat) == null || I.call(k, a.chat.id);
1099
+ if (!k.chat)
1100
+ throw new Ce(a.chatMode, !!t.persistentChat);
1101
+ a.chat = k.chat, (I = (D = t.callbacks).onNewChat) == null || I.call(D, a.chat.id);
1092
1102
  }
1093
1103
  return a.chat.id;
1094
- }, _ = async (k, I) => re(
1104
+ }, _ = async (D, I) => ne(
1095
1105
  () => {
1096
- var D, z;
1106
+ var k, x;
1097
1107
  return d.chat(
1098
1108
  l.id,
1099
1109
  I,
1100
1110
  {
1101
1111
  chatMode: a.chatMode,
1102
- streamId: (D = a.streamingManager) == null ? void 0 : D.streamId,
1103
- sessionId: (z = a.streamingManager) == null ? void 0 : z.sessionId,
1104
- messages: k.map(({ matches: x, ...L }) => L)
1112
+ streamId: (k = a.streamingManager) == null ? void 0 : k.streamId,
1113
+ sessionId: (x = a.streamingManager) == null ? void 0 : x.sessionId,
1114
+ messages: D.map(({ matches: B, ...F }) => F)
1105
1115
  },
1106
1116
  {
1107
- ...pe(a.chatMode),
1117
+ ...ye(a.chatMode),
1108
1118
  skipErrorHandler: !0
1109
1119
  }
1110
1120
  );
1111
1121
  },
1112
1122
  {
1113
1123
  limit: 2,
1114
- shouldRetryFn: (D) => {
1115
- var L, W, X, f;
1116
- const z = (L = D == null ? void 0 : D.message) == null ? void 0 : L.includes("missing or invalid session_id");
1117
- return !((W = D == null ? void 0 : D.message) == null ? void 0 : W.includes("Stream Error")) && !z ? ((f = (X = t.callbacks).onError) == null || f.call(X, D), !1) : !0;
1124
+ shouldRetryFn: (k) => {
1125
+ var F, N, X, Y;
1126
+ const x = (F = k == null ? void 0 : k.message) == null ? void 0 : F.includes("missing or invalid session_id");
1127
+ return !((N = k == null ? void 0 : k.message) == null ? void 0 : N.includes("Stream Error")) && !x ? ((Y = (X = t.callbacks).onError) == null || Y.call(X, k), !1) : !0;
1118
1128
  },
1119
1129
  onRetry: async () => {
1120
- await F(), await b(!1);
1130
+ await z(), await b(!1);
1121
1131
  }
1122
1132
  }
1123
1133
  );
@@ -1126,9 +1136,9 @@ async function jt(e, t) {
1126
1136
  id: V(),
1127
1137
  role: "user",
1128
1138
  content: u,
1129
- created_at: new Date(B.update()).toISOString()
1130
- }), (y = (m = t.callbacks).onNewMessage) == null || y.call(m, [...a.messages], "user");
1131
- const k = await p(), I = await _([...a.messages], k);
1139
+ created_at: new Date($.update()).toISOString()
1140
+ }), (f = (v = t.callbacks).onNewMessage) == null || f.call(v, [...a.messages], "user");
1141
+ const D = await p(), I = await _([...a.messages], D);
1132
1142
  return a.messages.push({
1133
1143
  id: V(),
1134
1144
  role: "assistant",
@@ -1139,40 +1149,40 @@ async function jt(e, t) {
1139
1149
  }), s.track("agent-message-send", {
1140
1150
  event: "success",
1141
1151
  messages: a.messages.length + 1
1142
- }), I.result && ((P = (C = t.callbacks).onNewMessage) == null || P.call(C, [...a.messages], "answer"), s.track("agent-message-received", {
1143
- latency: B.get(!0),
1152
+ }), I.result && ((T = (S = t.callbacks).onNewMessage) == null || T.call(S, [...a.messages], "answer"), s.track("agent-message-received", {
1153
+ latency: $.get(!0),
1144
1154
  messages: a.messages.length
1145
1155
  })), I;
1146
- } catch (k) {
1147
- throw (($ = a.messages[a.messages.length - 1]) == null ? void 0 : $.role) === "assistant" && a.messages.pop(), s.track("agent-message-send", {
1156
+ } catch (D) {
1157
+ throw ((L = a.messages[a.messages.length - 1]) == null ? void 0 : L.role) === "assistant" && a.messages.pop(), s.track("agent-message-send", {
1148
1158
  event: "error",
1149
1159
  messages: a.messages.length
1150
- }), k;
1160
+ }), D;
1151
1161
  }
1152
1162
  },
1153
1163
  rate(u, h, p) {
1154
- var y, C, P, $;
1155
- const _ = a.messages.find((k) => k.id === u);
1164
+ var f, S, T, L;
1165
+ const _ = a.messages.find((D) => D.id === u);
1156
1166
  if (a.chat) {
1157
1167
  if (!_)
1158
1168
  throw new Error("Message not found");
1159
1169
  } else throw new Error("Chat is not initialized");
1160
- const m = ((y = _.matches) == null ? void 0 : y.map((k) => [k.document_id, k.id])) ?? [];
1170
+ const v = ((f = _.matches) == null ? void 0 : f.map((D) => [D.document_id, D.id])) ?? [];
1161
1171
  return s.track("agent-rate", {
1162
1172
  event: p ? "update" : "create",
1163
1173
  thumb: h === 1 ? "up" : "down",
1164
- knowledge_id: ((C = l.knowledge) == null ? void 0 : C.id) ?? "",
1165
- matches: m,
1174
+ knowledge_id: ((S = l.knowledge) == null ? void 0 : S.id) ?? "",
1175
+ matches: v,
1166
1176
  score: h
1167
1177
  }), p ? d.updateRating(l.id, a.chat.id, p, {
1168
- knowledge_id: ((P = l.knowledge) == null ? void 0 : P.id) ?? "",
1178
+ knowledge_id: ((T = l.knowledge) == null ? void 0 : T.id) ?? "",
1169
1179
  message_id: u,
1170
- matches: m,
1180
+ matches: v,
1171
1181
  score: h
1172
1182
  }) : d.createRating(l.id, a.chat.id, {
1173
- knowledge_id: (($ = l.knowledge) == null ? void 0 : $.id) ?? "",
1183
+ knowledge_id: ((L = l.knowledge) == null ? void 0 : L.id) ?? "",
1174
1184
  message_id: u,
1175
- matches: m,
1185
+ matches: v,
1176
1186
  score: h
1177
1187
  });
1178
1188
  },
@@ -1182,7 +1192,7 @@ async function jt(e, t) {
1182
1192
  return s.track("agent-rate-delete", { type: "text" }), d.deleteRating(l.id, a.chat.id, u);
1183
1193
  },
1184
1194
  async speak(u) {
1185
- var m, y, C;
1195
+ var v, f, S;
1186
1196
  function h() {
1187
1197
  if (typeof u == "string") {
1188
1198
  if (!l.presenter.voice)
@@ -1207,12 +1217,12 @@ async function jt(e, t) {
1207
1217
  return u;
1208
1218
  }
1209
1219
  const p = h();
1210
- if (s.track("agent-speak", p), B.update(), a.messages && p.type === "text" && (a.messages.push({
1220
+ if (s.track("agent-speak", p), $.update(), a.messages && p.type === "text" && (a.messages.push({
1211
1221
  id: V(),
1212
1222
  role: "assistant",
1213
1223
  content: p.input,
1214
- created_at: new Date(B.get(!0)).toISOString()
1215
- }), (y = (m = t.callbacks).onNewMessage) == null || y.call(m, [...a.messages], "answer")), xe(a.chatMode))
1224
+ created_at: new Date($.get(!0)).toISOString()
1225
+ }), (f = (v = t.callbacks).onNewMessage) == null || f.call(v, [...a.messages], "answer")), Fe(a.chatMode))
1216
1226
  return {
1217
1227
  duration: 0,
1218
1228
  video_id: "",
@@ -1222,53 +1232,53 @@ async function jt(e, t) {
1222
1232
  throw new Error("Please connect to the agent first");
1223
1233
  return a.streamingManager.speak({
1224
1234
  script: p,
1225
- metadata: { chat_id: (C = a.chat) == null ? void 0 : C.id, agent_id: l.id }
1235
+ metadata: { chat_id: (S = a.chat) == null ? void 0 : S.id, agent_id: l.id }
1226
1236
  });
1227
1237
  },
1228
1238
  async interrupt({ type: u }) {
1229
- var p, _, m;
1230
- Xe(a.streamingManager, (p = a.streamingManager) == null ? void 0 : p.streamType, r);
1239
+ var p, _, v;
1240
+ Ye(a.streamingManager, (p = a.streamingManager) == null ? void 0 : p.streamType, r);
1231
1241
  const h = a.messages[a.messages.length - 1];
1232
1242
  s.track("agent-video-interrupt", {
1233
1243
  type: u || "click",
1234
- video_duration_to_interrupt: ne.get(!0),
1235
- message_duration_to_interrupt: B.get(!0)
1236
- }), h.interrupted = !0, (m = (_ = t.callbacks).onNewMessage) == null || m.call(_, [...a.messages], "answer"), Ye(a.streamingManager, r);
1244
+ video_duration_to_interrupt: ae.get(!0),
1245
+ message_duration_to_interrupt: $.get(!0)
1246
+ }), h.interrupted = !0, (v = (_ = t.callbacks).onNewMessage) == null || v.call(_, [...a.messages], "answer"), Qe(a.streamingManager, r);
1237
1247
  }
1238
1248
  };
1239
1249
  }
1240
1250
  function bt(e, t, n) {
1241
- const { getById: r } = ge(t, n || G);
1251
+ const { getById: r } = he(t, n || ee);
1242
1252
  return r(e);
1243
1253
  }
1244
1254
  export {
1245
1255
  O as A,
1246
- S as C,
1247
- je as D,
1248
- Te as K,
1249
- Ie as P,
1250
- Me as R,
1251
- N as S,
1256
+ R as C,
1257
+ Ae as D,
1258
+ je as K,
1259
+ Ee as P,
1260
+ _e as R,
1261
+ J as S,
1252
1262
  be as T,
1253
- Se as U,
1263
+ Ie as U,
1254
1264
  H as V,
1255
- Re as W,
1256
- at as a,
1257
- Z as b,
1258
- me as c,
1265
+ Se as W,
1266
+ it as a,
1267
+ G as b,
1268
+ ge as c,
1259
1269
  w as d,
1260
- A as e,
1261
- G as f,
1262
- De as g,
1263
- Ce as h,
1264
- jt as i,
1270
+ P as e,
1271
+ ee as f,
1272
+ Ce as g,
1273
+ Re as h,
1274
+ At as i,
1265
1275
  bt as j,
1266
- Ee as k,
1276
+ Me as k,
1267
1277
  E as l,
1268
1278
  q as m,
1269
- _e as n,
1270
- ce as o,
1271
- Tt as p,
1272
- Ae as q,
1273
- Pe as r
1279
+ Te as n,
1280
+ de as o,
1281
+ jt as p,
1282
+ Pe as q,
1283
+ Le as r
1274
1284
  };