@8wave/ai-elements 0.112.0-beta.8 → 0.112.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.
Files changed (63) hide show
  1. package/dist/_chunks/{PkToolShowVideo-Djr8Ofsz.js → PkToolShowVideo-p6Y9j3-B.js} +3 -3
  2. package/dist/_chunks/PkToolShowVideo-p6Y9j3-B.js.map +1 -0
  3. package/dist/_chunks/{browser-B0Xnbqi7.js → browser-Ct5TRDgj.js} +521 -518
  4. package/dist/_chunks/{browser-B0Xnbqi7.js.map → browser-Ct5TRDgj.js.map} +1 -1
  5. package/dist/_chunks/markdown-BRD-hDrH.js.map +1 -1
  6. package/dist/_chunks/{web-Dzr6HJ14.js → web-CEmtEYdH.js} +89 -65
  7. package/dist/_chunks/web-CEmtEYdH.js.map +1 -0
  8. package/dist/ai-elements.es.js +2918 -3166
  9. package/dist/ai-elements.es.js.map +1 -1
  10. package/dist-vue/PkChatbot.js +1 -1
  11. package/dist-vue/PkChatbotAuth.js +1 -1
  12. package/dist-vue/PkChatbotMessages.js +1 -1
  13. package/dist-vue/PkChatbotViewChat.js +1 -1
  14. package/dist-vue/PkChatbotViewConversations.js +1 -1
  15. package/dist-vue/PkChatbotViewFiles.js +1 -1
  16. package/dist-vue/PkChatbotViewProfile.js +1 -1
  17. package/dist-vue/_chunks/{Document-Bjz-CSLq.js → Document-2X01-F4Z.js} +2 -2
  18. package/dist-vue/_chunks/Document-2X01-F4Z.js.map +1 -0
  19. package/dist-vue/_chunks/{PkChatbot-BGSXeh04.js → PkChatbot-C11EVHnI.js} +6 -6
  20. package/dist-vue/_chunks/{PkChatbot-BGSXeh04.js.map → PkChatbot-C11EVHnI.js.map} +1 -1
  21. package/dist-vue/_chunks/{PkChatbotAuth-AxAOI9t2.js → PkChatbotAuth-Bi508F1u.js} +57 -57
  22. package/dist-vue/_chunks/PkChatbotAuth-Bi508F1u.js.map +1 -0
  23. package/dist-vue/_chunks/{PkChatbotMessages-BNjbDHgy.js → PkChatbotMessages-BD-vUak6.js} +4 -4
  24. package/dist-vue/_chunks/{PkChatbotMessages-BNjbDHgy.js.map → PkChatbotMessages-BD-vUak6.js.map} +1 -1
  25. package/dist-vue/_chunks/{PkChatbotViewChat-ZWFtuc-N.js → PkChatbotViewChat-DJnjuhjt.js} +5 -5
  26. package/dist-vue/_chunks/{PkChatbotViewChat-ZWFtuc-N.js.map → PkChatbotViewChat-DJnjuhjt.js.map} +1 -1
  27. package/dist-vue/_chunks/{PkChatbotViewConversations-BLMzqmXi.js → PkChatbotViewConversations-BCdolW0R.js} +2 -2
  28. package/dist-vue/_chunks/{PkChatbotViewConversations-BLMzqmXi.js.map → PkChatbotViewConversations-BCdolW0R.js.map} +1 -1
  29. package/dist-vue/_chunks/{PkChatbotViewFiles-DLkQ7ClA.js → PkChatbotViewFiles-Cudao8ew.js} +3 -3
  30. package/dist-vue/_chunks/{PkChatbotViewFiles-DLkQ7ClA.js.map → PkChatbotViewFiles-Cudao8ew.js.map} +1 -1
  31. package/dist-vue/_chunks/{PkChatbotViewProfile-DZ-Jim4x.js → PkChatbotViewProfile-DDsKOkcC.js} +2 -2
  32. package/dist-vue/_chunks/{PkChatbotViewProfile-DZ-Jim4x.js.map → PkChatbotViewProfile-DDsKOkcC.js.map} +1 -1
  33. package/dist-vue/_chunks/{PkToolShowDiagram-BXdA_2Na.js → PkToolShowDiagram-RtkI_sKL.js} +2 -2
  34. package/dist-vue/_chunks/{PkToolShowDiagram-BXdA_2Na.js.map → PkToolShowDiagram-RtkI_sKL.js.map} +1 -1
  35. package/dist-vue/_chunks/{PkToolShowSources-B3tBNres.js → PkToolShowSources-gI947JOm.js} +2 -2
  36. package/dist-vue/_chunks/{PkToolShowSources-B3tBNres.js.map → PkToolShowSources-gI947JOm.js.map} +1 -1
  37. package/dist-vue/_chunks/{PkToolShowVideo-Bv9kMd88.js → PkToolShowVideo-BZOTu2Qe.js} +3 -3
  38. package/dist-vue/_chunks/PkToolShowVideo-BZOTu2Qe.js.map +1 -0
  39. package/dist-vue/_chunks/{useChatbotStore-Bc6V5Rv0.js → useChatbotStore-BwrBZJCq.js} +1157 -1500
  40. package/dist-vue/_chunks/useChatbotStore-BwrBZJCq.js.map +1 -0
  41. package/dist-vue/_chunks/{web-Dzr6HJ14.js → web-CEmtEYdH.js} +89 -65
  42. package/dist-vue/_chunks/web-CEmtEYdH.js.map +1 -0
  43. package/dist-vue/apps/web-component/src/composables/useChatbotAuthForm.d.ts +0 -1
  44. package/dist-vue/composables.js +2809 -80
  45. package/dist-vue/composables.js.map +1 -1
  46. package/dist-vue/index.js +250 -195
  47. package/dist-vue/index.js.map +1 -1
  48. package/dist-vue/locales.js +16 -20
  49. package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +2 -2
  50. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +12 -0
  51. package/dist-vue/packages/models/src/schema/ModelProvider.d.ts +11 -2
  52. package/dist-vue/packages/models/src/schema/Organization.d.ts +3 -3
  53. package/dist-vue/packages/models/src/schema/User.d.ts +10 -0
  54. package/dist-vue/packages/models/src/schema/constants.d.ts +1 -1
  55. package/dist-vue/style.css +1 -1
  56. package/package.json +3 -3
  57. package/dist/_chunks/PkToolShowVideo-Djr8Ofsz.js.map +0 -1
  58. package/dist/_chunks/web-Dzr6HJ14.js.map +0 -1
  59. package/dist-vue/_chunks/Document-Bjz-CSLq.js.map +0 -1
  60. package/dist-vue/_chunks/PkChatbotAuth-AxAOI9t2.js.map +0 -1
  61. package/dist-vue/_chunks/PkToolShowVideo-Bv9kMd88.js.map +0 -1
  62. package/dist-vue/_chunks/useChatbotStore-Bc6V5Rv0.js.map +0 -1
  63. package/dist-vue/_chunks/web-Dzr6HJ14.js.map +0 -1
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/BaseConnection.js
1
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/BaseConnection.js
2
2
  var e = class {
3
3
  queue = [];
4
4
  outgoingQueue = [];
@@ -62,7 +62,7 @@ function t(e) {
62
62
  };
63
63
  }
64
64
  //#endregion
65
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/assert.js
65
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/assert.js
66
66
  function n(e) {
67
67
  return typeof e == "object" && !!e && !Array.isArray(e);
68
68
  }
@@ -70,7 +70,7 @@ function r(e, t = "Expected a JSON object") {
70
70
  if (!n(e)) throw Error(t);
71
71
  }
72
72
  //#endregion
73
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/errors.js
73
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/errors.js
74
74
  async function i(e) {
75
75
  try {
76
76
  let t = await e.json();
@@ -90,10 +90,10 @@ var a = class extends Error {
90
90
  }
91
91
  }, o = Object.freeze({
92
92
  name: "js_sdk",
93
- version: "1.25.0"
93
+ version: "1.26.0"
94
94
  });
95
95
  //#endregion
96
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/events.js
96
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/events.js
97
97
  function s(e) {
98
98
  return !!e.type;
99
99
  }
@@ -18412,7 +18412,7 @@ g(Q, "code", "ERR_JOSE_GENERIC"), g(class extends Q {
18412
18412
  }
18413
18413
  }, "code", "ERR_JWS_SIGNATURE_VERIFICATION_FAILED");
18414
18414
  //#endregion
18415
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/overrides.js
18415
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/overrides.js
18416
18416
  var bp = "conversation_initiation_client_data";
18417
18417
  function xp(e) {
18418
18418
  let t = { type: bp };
@@ -18440,7 +18440,7 @@ function xp(e) {
18440
18440
  }), t;
18441
18441
  }
18442
18442
  //#endregion
18443
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/audio.js
18443
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/audio.js
18444
18444
  function Sp(e) {
18445
18445
  let t = new Uint8Array(e);
18446
18446
  return btoa(String.fromCharCode(...t));
@@ -18451,7 +18451,7 @@ function Cp(e) {
18451
18451
  return r.buffer;
18452
18452
  }
18453
18453
  //#endregion
18454
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/volumeProvider.js
18454
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/volumeProvider.js
18455
18455
  var wp = {
18456
18456
  getVolume: () => 0,
18457
18457
  getByteFrequencyData: () => {}
@@ -18464,7 +18464,7 @@ function Ep(e, t, n) {
18464
18464
  }
18465
18465
  }
18466
18466
  //#endregion
18467
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/WebRTCAudioAdapter.js
18467
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/WebRTCAudioAdapter.js
18468
18468
  var Dp;
18469
18469
  function Op(e) {
18470
18470
  Dp = e;
@@ -18473,7 +18473,7 @@ function kp() {
18473
18473
  return Dp?.() ?? null;
18474
18474
  }
18475
18475
  //#endregion
18476
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/WebRTCConnection.js
18476
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/WebRTCConnection.js
18477
18477
  var Ap = "wss://livekit.rtc.elevenlabs.io", jp = "https://api.elevenlabs.io", Mp = .01;
18478
18478
  function Np(e) {
18479
18479
  return e.replace(/^wss:\/\//, "https://");
@@ -18782,7 +18782,7 @@ function Ip(e) {
18782
18782
  return /* @__PURE__ */ Error(`No ${e} registered. ${Fp}`);
18783
18783
  }
18784
18784
  //#endregion
18785
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/VoiceSessionSetup.js
18785
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/VoiceSessionSetup.js
18786
18786
  var Lp;
18787
18787
  function Rp(e) {
18788
18788
  Lp = e;
@@ -18802,7 +18802,7 @@ function Bp(e) {
18802
18802
  };
18803
18803
  }
18804
18804
  //#endregion
18805
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/createWorkletModuleLoader.js
18805
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/createWorkletModuleLoader.js
18806
18806
  var Vp = /* @__PURE__ */ new Map();
18807
18807
  function Hp(e, t) {
18808
18808
  return t ? `${e} ${t}` : e;
@@ -18833,14 +18833,14 @@ function Up(e, t) {
18833
18833
  };
18834
18834
  }
18835
18835
  //#endregion
18836
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/audioConcatProcessor.generated.js
18836
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/audioConcatProcessor.generated.js
18837
18837
  var Wp = Up("audioConcatProcessor", "/*\n * ulaw decoding logic taken from the wavefile library\n * https://github.com/rochars/wavefile/blob/master/lib/codecs/mulaw.js\n * USED BY @elevenlabs/client\n */\n\nconst decodeTable = [0, 132, 396, 924, 1980, 4092, 8316, 16764];\n\nfunction decodeSample(muLawSample) {\n let sign;\n let exponent;\n let mantissa;\n let sample;\n muLawSample = ~muLawSample;\n sign = muLawSample & 0x80;\n exponent = (muLawSample >> 4) & 0x07;\n mantissa = muLawSample & 0x0f;\n sample = decodeTable[exponent] + (mantissa << (exponent + 3));\n if (sign !== 0) sample = -sample;\n\n return sample;\n}\n\nclass AudioConcatProcessor extends AudioWorkletProcessor {\n constructor() {\n super();\n this.buffers = []; // Initialize an empty buffer\n this.cursor = 0;\n this.currentBuffer = null;\n this.wasInterrupted = false;\n this.finished = false;\n\n this.port.onmessage = ({ data }) => {\n switch (data.type) {\n case \"setFormat\":\n this.format = data.format;\n if (globalThis.LibSampleRate && sampleRate !== data.sampleRate) {\n globalThis.LibSampleRate.create(\n 1,\n data.sampleRate,\n sampleRate\n ).then(resampler => {\n this.resampler = resampler;\n });\n }\n break;\n case \"buffer\":\n this.wasInterrupted = false;\n this.buffers.push(\n this.format === \"ulaw\"\n ? new Uint8Array(data.buffer)\n : new Int16Array(data.buffer)\n );\n break;\n case \"interrupt\":\n this.wasInterrupted = true;\n break;\n case \"clearInterrupted\":\n if (this.wasInterrupted) {\n this.wasInterrupted = false;\n this.buffers = [];\n this.currentBuffer = null;\n }\n }\n };\n }\n process(_, outputs) {\n let finished = false;\n const output = outputs[0][0];\n for (let i = 0; i < output.length; i++) {\n if (!this.currentBuffer) {\n if (this.buffers.length === 0) {\n finished = true;\n break;\n }\n this.currentBuffer = this.buffers.shift();\n if (this.resampler) {\n this.currentBuffer = this.resampler.full(this.currentBuffer);\n }\n this.cursor = 0;\n }\n\n let value = this.currentBuffer[this.cursor];\n if (this.format === \"ulaw\") {\n value = decodeSample(value);\n }\n output[i] = value / 32768;\n this.cursor++;\n\n if (this.cursor >= this.currentBuffer.length) {\n this.currentBuffer = null;\n }\n }\n\n if (this.finished !== finished) {\n this.finished = finished;\n this.port.postMessage({ type: \"process\", finished });\n }\n\n return true; // Continue processing\n }\n}\n\nregisterProcessor(\"audioConcatProcessor\", AudioConcatProcessor);\n"), Gp = "https://cdn.jsdelivr.net/npm/@alexanderolsen/libsamplerate-js@2.1.2/dist/libsamplerate.worklet.js";
18838
18838
  async function Kp(e, t) {
18839
18839
  let n = t || Gp;
18840
18840
  await e.audioWorklet.addModule(n);
18841
18841
  }
18842
18842
  //#endregion
18843
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/calculateVolume.js
18843
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/calculateVolume.js
18844
18844
  function qp(e) {
18845
18845
  if (e.length === 0) return 0;
18846
18846
  let t = 0;
@@ -18848,7 +18848,7 @@ function qp(e) {
18848
18848
  return t /= e.length, t < 0 ? 0 : t > 1 ? 1 : t;
18849
18849
  }
18850
18850
  //#endregion
18851
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/volumeProvider.js
18851
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/volumeProvider.js
18852
18852
  function Jp(e, t) {
18853
18853
  let n = e.frequencyBinCount, r, i;
18854
18854
  return {
@@ -18861,7 +18861,7 @@ function Jp(e, t) {
18861
18861
  };
18862
18862
  }
18863
18863
  //#endregion
18864
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/compatibility.js
18864
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/compatibility.js
18865
18865
  function Yp() {
18866
18866
  return [
18867
18867
  "iPad Simulator",
@@ -18876,7 +18876,7 @@ function Xp() {
18876
18876
  return /android/i.test(navigator.userAgent);
18877
18877
  }
18878
18878
  //#endregion
18879
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/output.js
18879
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/output.js
18880
18880
  function Zp({ sampleRate: e, format: t, worklet: n, audioElement: r }) {
18881
18881
  if (!Yp()) return;
18882
18882
  let i = Math.floor(e * 100 / 1e3), a = t === "ulaw" ? new Uint8Array(i).fill(255) : new Int16Array(i);
@@ -19100,7 +19100,7 @@ function am(e) {
19100
19100
  return e.bedrockInferenceProfile !== void 0 && (t.bedrock_inference_profile = e.bedrockInferenceProfile), e.postCallTranscriptionWebhook && (t.post_call_transcription_webhook = im(e.postCallTranscriptionWebhook)), e.postCallAudioWebhook && (t.post_call_audio_webhook = im(e.postCallAudioWebhook)), t;
19101
19101
  }
19102
19102
  //#endregion
19103
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/WebSocketConnection.js
19103
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/WebSocketConnection.js
19104
19104
  var om = "convai", sm = "wss://api.elevenlabs.io", cm = "/v1/convai/conversation?agent_id=", lm = class n extends e {
19105
19105
  socket;
19106
19106
  conversationId;
@@ -19219,7 +19219,7 @@ var om = "convai", sm = "wss://api.elevenlabs.io", cm = "/v1/convai/conversation
19219
19219
  }
19220
19220
  };
19221
19221
  //#endregion
19222
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/attachInputToConnection.js
19222
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/attachInputToConnection.js
19223
19223
  function um(e, t) {
19224
19224
  let n = (e) => {
19225
19225
  let n = e.data[0];
@@ -19230,7 +19230,7 @@ function um(e, t) {
19230
19230
  };
19231
19231
  }
19232
19232
  //#endregion
19233
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/attachConnectionToOutput.js
19233
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/attachConnectionToOutput.js
19234
19234
  function dm(e, t) {
19235
19235
  let n = (e) => {
19236
19236
  t.playAudio(Cp(e.audio_base_64));
@@ -19240,7 +19240,7 @@ function dm(e, t) {
19240
19240
  };
19241
19241
  }
19242
19242
  //#endregion
19243
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/ConnectionFactory.js
19243
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/ConnectionFactory.js
19244
19244
  function fm(e) {
19245
19245
  let t = "signedUrl" in e && e.signedUrl, n = "orchestrator" in e && e.orchestrator;
19246
19246
  if (t && e.connectionType === "webrtc") throw Error("signedUrl only supports websocket connections. Remove connectionType or set it to 'websocket'.");
@@ -19257,7 +19257,7 @@ async function pm(e) {
19257
19257
  }
19258
19258
  }
19259
19259
  //#endregion
19260
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/applyDelay.js
19260
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/applyDelay.js
19261
19261
  var mm = {
19262
19262
  default: 0,
19263
19263
  android: 3e3
@@ -19270,7 +19270,7 @@ async function gm(e) {
19270
19270
  e > 0 && await new Promise((t) => setTimeout(t, e));
19271
19271
  }
19272
19272
  //#endregion
19273
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/audioUnlock.js
19273
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/audioUnlock.js
19274
19274
  var _m = 3e4, vm = [
19275
19275
  "touchstart",
19276
19276
  "touchend",
@@ -19309,7 +19309,7 @@ function Om() {
19309
19309
  ym && (ym.close().catch(() => {}), ym = null, wm());
19310
19310
  }
19311
19311
  //#endregion
19312
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/VoiceSessionSetup.js
19312
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/VoiceSessionSetup.js
19313
19313
  function km() {
19314
19314
  return Xp() ? "android" : Yp() ? "ios" : "default";
19315
19315
  }
@@ -19387,7 +19387,7 @@ async function Mm(e) {
19387
19387
  }
19388
19388
  Rp(Mm);
19389
19389
  //#endregion
19390
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/webAudioAdapter.js
19390
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/webAudioAdapter.js
19391
19391
  var Nm = class {
19392
19392
  audioElements = [];
19393
19393
  inputAudioContext = null;
@@ -19461,7 +19461,7 @@ function Im() {
19461
19461
  return Pm;
19462
19462
  }
19463
19463
  //#endregion
19464
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/scribeAudioProcessor.generated.js
19464
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/platform/web/scribeAudioProcessor.generated.js
19465
19465
  var Lm = Up("scribeAudioProcessor", "/*\n * Scribe Audio Processor for converting microphone audio to PCM16 format\n * Supports resampling for browsers like Firefox that don't support\n * AudioContext sample rate constraints.\n * USED BY @elevenlabs/client\n */\n\nclass ScribeAudioProcessor extends AudioWorkletProcessor {\n constructor() {\n super();\n this.buffer = [];\n this.bufferSize = 4096; // Buffer size for optimal chunk transmission\n\n // Resampling state\n this.inputSampleRate = null;\n this.outputSampleRate = null;\n this.resampleRatio = 1;\n this.lastSample = 0;\n this.resampleAccumulator = 0;\n\n this.port.onmessage = ({ data }) => {\n if (data.type === \"configure\") {\n this.inputSampleRate = data.inputSampleRate;\n this.outputSampleRate = data.outputSampleRate;\n if (this.inputSampleRate && this.outputSampleRate) {\n this.resampleRatio = this.inputSampleRate / this.outputSampleRate;\n }\n }\n };\n }\n\n // Linear interpolation resampling\n resample(inputData) {\n if (this.resampleRatio === 1 || !this.inputSampleRate) {\n return inputData;\n }\n\n const outputSamples = [];\n\n for (let i = 0; i < inputData.length; i++) {\n const currentSample = inputData[i];\n\n // Generate output samples using linear interpolation\n while (this.resampleAccumulator < 1) {\n const interpolated =\n this.lastSample +\n (currentSample - this.lastSample) * this.resampleAccumulator;\n outputSamples.push(interpolated);\n this.resampleAccumulator += this.resampleRatio;\n }\n\n this.resampleAccumulator -= 1;\n this.lastSample = currentSample;\n }\n\n return new Float32Array(outputSamples);\n }\n\n process(inputs) {\n const input = inputs[0];\n if (input.length > 0) {\n let channelData = input[0]; // Get first channel (mono)\n\n // Resample if needed (for Firefox and other browsers that don't\n // support AudioContext sample rate constraints)\n if (this.resampleRatio !== 1) {\n channelData = this.resample(channelData);\n }\n\n // Add incoming audio to buffer\n for (let i = 0; i < channelData.length; i++) {\n this.buffer.push(channelData[i]);\n }\n\n // When buffer reaches threshold, convert and send\n if (this.buffer.length >= this.bufferSize) {\n const float32Array = new Float32Array(this.buffer);\n const int16Array = new Int16Array(float32Array.length);\n\n // Convert Float32 [-1, 1] to Int16 [-32768, 32767]\n for (let i = 0; i < float32Array.length; i++) {\n // Clamp the value to prevent overflow\n const sample = Math.max(-1, Math.min(1, float32Array[i]));\n // Scale to PCM16 range\n int16Array[i] = sample < 0 ? sample * 32768 : sample * 32767;\n }\n\n // Send to main thread as transferable ArrayBuffer\n this.port.postMessage(\n {\n audioData: int16Array.buffer\n },\n [int16Array.buffer]\n );\n\n // Clear buffer\n this.buffer = [];\n }\n }\n\n return true; // Continue processing\n }\n}\n\nregisterProcessor(\"scribeAudioProcessor\", ScribeAudioProcessor);\n\n"), Rm = 16e3, zm = async (e, t) => {
19466
19466
  let n, r, i, a, o = () => {
19467
19467
  for (let e of n?.getTracks() ?? []) e.stop();
@@ -19509,20 +19509,37 @@ async function Vm({ conversationId: e, origin: t, file: n, filename: a }) {
19509
19509
  return { fileId: d };
19510
19510
  }
19511
19511
  //#endregion
19512
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/BaseConversation.js
19513
- var Hm = {
19512
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/utils/throttle.js
19513
+ function Hm(e, t, n = {}) {
19514
+ let r = n.leading ?? !0, i = n.trailing ?? !1, a, o, s = () => {
19515
+ a !== void 0 && (clearTimeout(a), a = void 0);
19516
+ }, c = (...n) => {
19517
+ a === void 0 && r ? e(...n) : i && (o = n), s(), a = setTimeout(() => {
19518
+ if (a = void 0, i && o !== void 0) {
19519
+ let t = o;
19520
+ o = void 0, e(...t);
19521
+ }
19522
+ }, t);
19523
+ };
19524
+ return c.cancel = () => {
19525
+ s(), o = void 0;
19526
+ }, c;
19527
+ }
19528
+ //#endregion
19529
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/BaseConversation.js
19530
+ var Um = {
19514
19531
  reason: "agent",
19515
19532
  context: {
19516
19533
  type: "end_call",
19517
19534
  reason: "Agent ended the call"
19518
19535
  }
19519
- };
19520
- function Um(e) {
19536
+ }, Wm = 1e3;
19537
+ function Gm(e) {
19521
19538
  let { textOnly: t } = e.overrides?.conversation ?? {}, { textOnly: n } = e;
19522
19539
  if (typeof n == "boolean") return typeof t == "boolean" && n !== t && console.warn(`Conflicting textOnly options provided: ${n} via options.textOnly (will be used) and ${t} via options.overrides.conversation.textOnly (will be ignored)`), n;
19523
19540
  if (typeof t == "boolean") return t;
19524
19541
  }
19525
- var Wm = class {
19542
+ var Km = class {
19526
19543
  options;
19527
19544
  connection;
19528
19545
  lastInterruptTimestamp = 0;
@@ -19532,8 +19549,11 @@ var Wm = class {
19532
19549
  currentEventId = 1;
19533
19550
  canSendFeedback = !1;
19534
19551
  mcpApprovals = /* @__PURE__ */ new Map();
19552
+ throttledUserActivity = Hm(() => {
19553
+ this.connection.sendMessage({ type: "user_activity" });
19554
+ }, Wm);
19535
19555
  static getFullOptions(e) {
19536
- let t = Um(e);
19556
+ let t = Gm(e);
19537
19557
  return {
19538
19558
  clientTools: {},
19539
19559
  onConnect: () => {},
@@ -19583,7 +19603,7 @@ var Wm = class {
19583
19603
  }
19584
19604
  };
19585
19605
  async handleEndSession() {
19586
- this.connection.close();
19606
+ this.throttledUserActivity.cancel(), this.connection.close();
19587
19607
  }
19588
19608
  updateMode(e) {
19589
19609
  e !== this.mode && (this.mode = e, this.options.onModeChange && this.options.onModeChange({ mode: e }));
@@ -19604,6 +19624,7 @@ var Wm = class {
19604
19624
  role: "agent",
19605
19625
  message: e.agent_response_event.agent_response,
19606
19626
  event_id: e.agent_response_event.event_id,
19627
+ ...e.agent_response_event.response_id ? { response_id: e.agent_response_event.response_id } : {},
19607
19628
  attachments: e.agent_response_event.attachments
19608
19629
  });
19609
19630
  }
@@ -19724,12 +19745,12 @@ var Wm = class {
19724
19745
  this.options.onAgentToolRequest && this.options.onAgentToolRequest(e.agent_tool_request);
19725
19746
  }
19726
19747
  handleAgentToolResponse(e) {
19727
- e.agent_tool_response.tool_name === "end_call" && this.endSessionWithDetails(Hm).catch((e) => {
19748
+ e.agent_tool_response.tool_name === "end_call" && this.endSessionWithDetails(Um).catch((e) => {
19728
19749
  this.onError("Failed to end session after agent end_call", e);
19729
19750
  }), this.options.onAgentToolResponse?.(e.agent_tool_response);
19730
19751
  }
19731
19752
  handleAgentToolResponseFullPayload(e) {
19732
- e.agent_tool_response_full_payload.tool_name === "end_call" && this.endSessionWithDetails(Hm).catch((e) => {
19753
+ e.agent_tool_response_full_payload.tool_name === "end_call" && this.endSessionWithDetails(Um).catch((e) => {
19733
19754
  this.onError("Failed to end session after agent end_call", e);
19734
19755
  }), this.options.onAgentToolResponse?.(e.agent_tool_response_full_payload);
19735
19756
  }
@@ -19916,7 +19937,7 @@ var Wm = class {
19916
19937
  });
19917
19938
  }
19918
19939
  sendUserActivity() {
19919
- this.connection.sendMessage({ type: "user_activity" });
19940
+ this.throttledUserActivity();
19920
19941
  }
19921
19942
  sendMCPToolApprovalResult(e, t) {
19922
19943
  this.connection.sendMessage({
@@ -19950,8 +19971,8 @@ var Wm = class {
19950
19971
  }
19951
19972
  };
19952
19973
  //#endregion
19953
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/runtime.js
19954
- function Gm() {
19974
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/runtime.js
19975
+ function qm() {
19955
19976
  for (let e of [
19956
19977
  "fetch",
19957
19978
  "WebSocket",
@@ -19963,8 +19984,8 @@ function Gm() {
19963
19984
  ]) if (globalThis[e] === void 0) throw Error(`${e} is not available in this environment.`);
19964
19985
  }
19965
19986
  //#endregion
19966
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/TextConversation.js
19967
- var Km = /* @__PURE__ */ new Uint8Array(), qm = class e extends Wm {
19987
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/TextConversation.js
19988
+ var Jm = /* @__PURE__ */ new Uint8Array(), Ym = class e extends Km {
19968
19989
  type = "text";
19969
19990
  setVolume() {
19970
19991
  throw Error("setVolume is not supported in text conversations");
@@ -19973,10 +19994,10 @@ var Km = /* @__PURE__ */ new Uint8Array(), qm = class e extends Wm {
19973
19994
  throw Error("setMicMuted is not supported in text conversations");
19974
19995
  }
19975
19996
  getInputByteFrequencyData() {
19976
- return Km;
19997
+ return Jm;
19977
19998
  }
19978
19999
  getOutputByteFrequencyData() {
19979
- return Km;
20000
+ return Jm;
19980
20001
  }
19981
20002
  getInputVolume() {
19982
20003
  return 0;
@@ -19985,7 +20006,7 @@ var Km = /* @__PURE__ */ new Uint8Array(), qm = class e extends Wm {
19985
20006
  return 0;
19986
20007
  }
19987
20008
  static async startSession(t) {
19988
- let n = Wm.getFullOptions(t);
20009
+ let n = Km.getFullOptions(t);
19989
20010
  n.onStatusChange && n.onStatusChange({ status: "connecting" }), n.onCanSendFeedbackChange && n.onCanSendFeedbackChange({ canSendFeedback: !1 }), n.onModeChange && n.onModeChange({ mode: "listening" }), n.onCanSendFeedbackChange && n.onCanSendFeedbackChange({ canSendFeedback: !1 });
19990
20011
  let r = null, i = null;
19991
20012
  try {
@@ -19994,14 +20015,14 @@ var Km = /* @__PURE__ */ new Uint8Array(), qm = class e extends Wm {
19994
20015
  throw i ? await i.endSession().catch(() => {}) : (n.onStatusChange?.({ status: "disconnected" }), r?.close()), e;
19995
20016
  }
19996
20017
  }
19997
- }, Jm = class e extends Wm {
20018
+ }, Xm = class e extends Km {
19998
20019
  input;
19999
20020
  output;
20000
20021
  playbackEventTarget;
20001
20022
  cleanUp;
20002
20023
  type = "voice";
20003
20024
  static async startSession(t) {
20004
- let n = Wm.getFullOptions(t);
20025
+ let n = Km.getFullOptions(t);
20005
20026
  n.onStatusChange && n.onStatusChange({ status: "connecting" }), n.onCanSendFeedbackChange && n.onCanSendFeedbackChange({ canSendFeedback: !1 });
20006
20027
  let r = null, i = null;
20007
20028
  try {
@@ -20072,8 +20093,8 @@ var Km = /* @__PURE__ */ new Uint8Array(), qm = class e extends Wm {
20072
20093
  let t = Number.isFinite(e) ? Math.min(1, Math.max(0, e)) : 1;
20073
20094
  this.volume = t, this.output.setVolume(t);
20074
20095
  };
20075
- }, Ym = "https://api.elevenlabs.io";
20076
- function Xm(e, t, n = Ym) {
20096
+ }, Zm = "https://api.elevenlabs.io";
20097
+ function Qm(e, t, n = Zm) {
20077
20098
  let r = {};
20078
20099
  return typeof t == "boolean" ? r.feedback = t ? "like" : "dislike" : (r.rating = t.rating, r.comment = t.comment), fetch(`${n}/v1/convai/conversations/${e}/feedback`, {
20079
20100
  method: "POST",
@@ -20082,8 +20103,8 @@ function Xm(e, t, n = Ym) {
20082
20103
  });
20083
20104
  }
20084
20105
  //#endregion
20085
- //#region ../../node_modules/.pnpm/@elevenlabs+client@1.25.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/scribe/connection.js
20086
- var Zm = class {
20106
+ //#region ../../node_modules/.pnpm/@elevenlabs+client@1.26.0_@types+dom-mediacapture-record@1.0.22/node_modules/@elevenlabs/client/dist/scribe/connection.js
20107
+ var $m = class {
20087
20108
  listeners = /* @__PURE__ */ new Map();
20088
20109
  on(e, t) {
20089
20110
  this.listeners.has(e) || this.listeners.set(e, /* @__PURE__ */ new Set());
@@ -20101,7 +20122,7 @@ var Zm = class {
20101
20122
  });
20102
20123
  }
20103
20124
  };
20104
- function Qm(e) {
20125
+ function eh(e) {
20105
20126
  return typeof e == "object" && e && "message_type" in e && "error" in e && typeof e.message_type == "string" && typeof e.error == "string" ? e : {
20106
20127
  message_type: "error",
20107
20128
  error: e instanceof Error ? e.message : String(e)
@@ -20109,11 +20130,11 @@ function Qm(e) {
20109
20130
  }
20110
20131
  var $;
20111
20132
  (function(e) {
20112
- e.SESSION_STARTED = "session_started", e.PARTIAL_TRANSCRIPT = "partial_transcript", e.FINAL_TRANSCRIPT = "final_transcript", e.FINAL_TRANSCRIPT_WITH_TIMESTAMPS = "final_transcript_with_timestamps", e.COMMITTED_TRANSCRIPT = "committed_transcript", e.COMMITTED_TRANSCRIPT_WITH_TIMESTAMPS = "committed_transcript_with_timestamps", e.COMMITTED_TRANSCRIPT_ENTITIES = "committed_transcript_entities", e.AUTH_ERROR = "auth_error", e.ERROR = "error", e.OPEN = "open", e.CLOSE = "close", e.QUOTA_EXCEEDED = "quota_exceeded", e.COMMIT_THROTTLED = "commit_throttled", e.TRANSCRIBER_ERROR = "transcriber_error", e.UNACCEPTED_TERMS = "unaccepted_terms", e.RATE_LIMITED = "rate_limited", e.INPUT_ERROR = "input_error", e.INVALID_REQUEST = "invalid_request", e.QUEUE_OVERFLOW = "queue_overflow", e.RESOURCE_EXHAUSTED = "resource_exhausted", e.SESSION_TIME_LIMIT_EXCEEDED = "session_time_limit_exceeded", e.CHUNK_SIZE_EXCEEDED = "chunk_size_exceeded", e.INSUFFICIENT_AUDIO_ACTIVITY = "insufficient_audio_activity";
20133
+ e.SESSION_STARTED = "session_started", e.PARTIAL_TRANSCRIPT = "partial_transcript", e.FINAL_TRANSCRIPT = "final_transcript", e.FINAL_TRANSCRIPT_WITH_TIMESTAMPS = "final_transcript_with_timestamps", e.COMMITTED_TRANSCRIPT = "committed_transcript", e.COMMITTED_TRANSCRIPT_WITH_TIMESTAMPS = "committed_transcript_with_timestamps", e.COMMITTED_TRANSCRIPT_ENTITIES = "committed_transcript_entities", e.EDITED_TRANSCRIPT = "edited_transcript", e.AUTH_ERROR = "auth_error", e.ERROR = "error", e.OPEN = "open", e.CLOSE = "close", e.QUOTA_EXCEEDED = "quota_exceeded", e.COMMIT_THROTTLED = "commit_throttled", e.TRANSCRIBER_ERROR = "transcriber_error", e.UNACCEPTED_TERMS = "unaccepted_terms", e.RATE_LIMITED = "rate_limited", e.INPUT_ERROR = "input_error", e.INVALID_REQUEST = "invalid_request", e.QUEUE_OVERFLOW = "queue_overflow", e.RESOURCE_EXHAUSTED = "resource_exhausted", e.SESSION_TIME_LIMIT_EXCEEDED = "session_time_limit_exceeded", e.CHUNK_SIZE_EXCEEDED = "chunk_size_exceeded", e.INSUFFICIENT_AUDIO_ACTIVITY = "insufficient_audio_activity";
20113
20134
  })($ ||= {});
20114
- var $m = class {
20135
+ var th = class {
20115
20136
  websocket = null;
20116
- eventEmitter = new Zm();
20137
+ eventEmitter = new $m();
20117
20138
  currentSampleRate = 16e3;
20118
20139
  _muted = !1;
20119
20140
  _closed = !1;
@@ -20165,6 +20186,9 @@ var $m = class {
20165
20186
  case "committed_transcript_entities":
20166
20187
  this.eventEmitter.emit($.COMMITTED_TRANSCRIPT_ENTITIES, t);
20167
20188
  break;
20189
+ case "edited_transcript":
20190
+ this.eventEmitter.emit($.EDITED_TRANSCRIPT, t);
20191
+ break;
20168
20192
  case "auth_error":
20169
20193
  this.eventEmitter.emit($.AUTH_ERROR, t), this.eventEmitter.emit($.ERROR, t);
20170
20194
  break;
@@ -20230,7 +20254,7 @@ var $m = class {
20230
20254
  this.eventEmitter.off(e, t);
20231
20255
  }
20232
20256
  _emitError(e) {
20233
- this.eventEmitter.emit($.ERROR, Qm(e));
20257
+ this.eventEmitter.emit($.ERROR, eh(e));
20234
20258
  }
20235
20259
  send(e) {
20236
20260
  if (!this.websocket || this.websocket.readyState !== WebSocket.OPEN) throw Error("WebSocket is not connected");
@@ -20256,15 +20280,15 @@ var $m = class {
20256
20280
  close() {
20257
20281
  this._closed = !0, this._audioCleanup &&= (this._audioCleanup(), void 0), this.websocket && this.websocket.close(1e3, "User ended session");
20258
20282
  }
20259
- }, eh;
20283
+ }, nh;
20260
20284
  (function(e) {
20261
20285
  e.PCM_8000 = "pcm_8000", e.PCM_16000 = "pcm_16000", e.PCM_22050 = "pcm_22050", e.PCM_24000 = "pcm_24000", e.PCM_44100 = "pcm_44100", e.PCM_48000 = "pcm_48000", e.ULAW_8000 = "ulaw_8000";
20262
- })(eh ||= {});
20263
- var th;
20286
+ })(nh ||= {});
20287
+ var rh;
20264
20288
  (function(e) {
20265
20289
  e.MANUAL = "manual", e.VAD = "vad";
20266
- })(th ||= {});
20267
- var nh = class e {
20290
+ })(rh ||= {});
20291
+ var ih = class e {
20268
20292
  static DEFAULT_BASE_URI = "wss://api.elevenlabs.io";
20269
20293
  static getWebSocketUri(t = e.DEFAULT_BASE_URI) {
20270
20294
  return `${t}/v1/speech-to-text/realtime`;
@@ -20293,13 +20317,13 @@ var nh = class e {
20293
20317
  let e = Array.isArray(t.entityDetection) ? t.entityDetection : [t.entityDetection];
20294
20318
  for (let t of e) r.append("entity_detection", t);
20295
20319
  }
20296
- t.filterBackgroundAudio !== void 0 && r.append("filter_background_audio", t.filterBackgroundAudio ? "true" : "false"), t.enableLogging !== void 0 && r.append("enable_logging", t.enableLogging ? "true" : "false");
20320
+ t.transcriptEdit !== void 0 && r.append("transcript_edit", t.transcriptEdit), t.filterBackgroundAudio !== void 0 && r.append("filter_background_audio", t.filterBackgroundAudio ? "true" : "false"), t.enableLogging !== void 0 && r.append("enable_logging", t.enableLogging ? "true" : "false");
20297
20321
  let i = r.toString();
20298
20322
  return i ? `${n}?${i}` : n;
20299
20323
  }
20300
20324
  static connect(t) {
20301
20325
  if (!t.modelId) throw Error("modelId is required");
20302
- let n = new $m("microphone" in t && t.microphone ? 16e3 : t.sampleRate), r = e.buildWebSocketUri(t), i = new WebSocket(r);
20326
+ let n = new th("microphone" in t && t.microphone ? 16e3 : t.sampleRate), r = e.buildWebSocketUri(t), i = new WebSocket(r);
20303
20327
  return "microphone" in t && t.microphone && i.addEventListener("open", () => {
20304
20328
  e.streamFromMicrophone(t, n);
20305
20329
  }), n.setWebSocket(i), n;
@@ -20314,11 +20338,11 @@ var nh = class e {
20314
20338
  console.error("Failed to start microphone streaming:", e), t._emitError(e), t.close();
20315
20339
  }
20316
20340
  }
20317
- }, rh = { async startSession(e) {
20318
- return Gm(), Um(e) ? qm.startSession(e) : Jm.startSession(e);
20341
+ }, ah = { async startSession(e) {
20342
+ return qm(), Gm(e) ? Ym.startSession(e) : Xm.startSession(e);
20319
20343
  } };
20320
20344
  Em(), Op(() => new Nm()), Fm(zm);
20321
20345
  //#endregion
20322
- export { eh as AudioFormat, th as CommitStrategy, rh as Conversation, em as DEFAULT_INPUT_CHUNK_DURATION_MS, $m as RealtimeConnection, $ as RealtimeEvents, nh as Scribe, a as SessionConnectionError, qm as TextConversation, Jm as VoiceConversation, Pp as WebRTCConnection, lm as WebSocketConnection, pm as createConnection, Xm as postOverallFeedback };
20346
+ export { nh as AudioFormat, rh as CommitStrategy, ah as Conversation, em as DEFAULT_INPUT_CHUNK_DURATION_MS, th as RealtimeConnection, $ as RealtimeEvents, ih as Scribe, a as SessionConnectionError, Ym as TextConversation, Xm as VoiceConversation, Pp as WebRTCConnection, lm as WebSocketConnection, pm as createConnection, Qm as postOverallFeedback };
20323
20347
 
20324
- //# sourceMappingURL=web-Dzr6HJ14.js.map
20348
+ //# sourceMappingURL=web-CEmtEYdH.js.map