@floe-ai/sdk 0.1.0-dev.28 → 0.1.0-dev.29

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.
@@ -3412,7 +3412,7 @@ class Qe extends qc {
3412
3412
  this._sendMessage(new we(Y.DISCONNECT_BOT, {}));
3413
3413
  }
3414
3414
  handleMessage(e) {
3415
- var t, n, i, o, s, a, c, u, d, h, g, y, b, m, v, w, x, C, D, P, R, B, re, se, me, $, j, H, X, N, U, Q, le, Z, Te, ve, $e, l, f, p, S, k, E, M, L, I, K, te, Me, tt, nt, be;
3415
+ var t, n, i, o, s, a, c, u, d, h, g, v, b, m, y, w, x, C, D, P, R, B, re, se, me, $, j, H, X, N, U, Q, le, Z, Te, ve, $e, l, f, p, S, k, E, M, L, I, K, te, Me, tt, nt, be;
3416
3416
  switch (ne.debug("[RTVI Message]", e), e.type) {
3417
3417
  case Y.BOT_READY: {
3418
3418
  const ee = e.data, Ve = ee.version ? ee.version.split(".").map(Number) : [
@@ -3441,10 +3441,10 @@ class Qe extends qc {
3441
3441
  (g = (h = this._options.callbacks) == null ? void 0 : h.onUserStoppedSpeaking) == null || g.call(h);
3442
3442
  break;
3443
3443
  case Y.BOT_STARTED_SPEAKING:
3444
- (b = (y = this._options.callbacks) == null ? void 0 : y.onBotStartedSpeaking) == null || b.call(y);
3444
+ (b = (v = this._options.callbacks) == null ? void 0 : v.onBotStartedSpeaking) == null || b.call(v);
3445
3445
  break;
3446
3446
  case Y.BOT_STOPPED_SPEAKING:
3447
- (v = (m = this._options.callbacks) == null ? void 0 : m.onBotStoppedSpeaking) == null || v.call(m);
3447
+ (y = (m = this._options.callbacks) == null ? void 0 : m.onBotStoppedSpeaking) == null || y.call(m);
3448
3448
  break;
3449
3449
  case Y.USER_MUTE_STARTED:
3450
3450
  (x = (w = this._options.callbacks) == null ? void 0 : w.onUserMuteStarted) == null || x.call(w);
@@ -3714,8 +3714,8 @@ function Vc(r) {
3714
3714
  var zi, On = { exports: {} }, jr = function() {
3715
3715
  if (zi) return On.exports;
3716
3716
  zi = 1;
3717
- var r, e = typeof Reflect == "object" ? Reflect : null, t = e && typeof e.apply == "function" ? e.apply : function(m, v, w) {
3718
- return Function.prototype.apply.call(m, v, w);
3717
+ var r, e = typeof Reflect == "object" ? Reflect : null, t = e && typeof e.apply == "function" ? e.apply : function(m, y, w) {
3718
+ return Function.prototype.apply.call(m, y, w);
3719
3719
  };
3720
3720
  r = e && typeof e.ownKeys == "function" ? e.ownKeys : Object.getOwnPropertySymbols ? function(m) {
3721
3721
  return Object.getOwnPropertyNames(m).concat(Object.getOwnPropertySymbols(m));
@@ -3728,15 +3728,15 @@ var zi, On = { exports: {} }, jr = function() {
3728
3728
  function i() {
3729
3729
  i.init.call(this);
3730
3730
  }
3731
- On.exports = i, On.exports.once = function(m, v) {
3731
+ On.exports = i, On.exports.once = function(m, y) {
3732
3732
  return new Promise(function(w, x) {
3733
3733
  function C(P) {
3734
- m.removeListener(v, D), x(P);
3734
+ m.removeListener(y, D), x(P);
3735
3735
  }
3736
3736
  function D() {
3737
3737
  typeof m.removeListener == "function" && m.removeListener("error", C), w([].slice.call(arguments));
3738
3738
  }
3739
- b(m, v, D, { once: !0 }), v !== "error" && function(P, R, B) {
3739
+ b(m, y, D, { once: !0 }), y !== "error" && function(P, R, B) {
3740
3740
  typeof P.on == "function" && b(P, "error", R, B);
3741
3741
  }(m, C, { once: !0 });
3742
3742
  });
@@ -3748,51 +3748,51 @@ var zi, On = { exports: {} }, jr = function() {
3748
3748
  function a(m) {
3749
3749
  return m._maxListeners === void 0 ? i.defaultMaxListeners : m._maxListeners;
3750
3750
  }
3751
- function c(m, v, w, x) {
3751
+ function c(m, y, w, x) {
3752
3752
  var C, D, P, R;
3753
- if (s(w), (D = m._events) === void 0 ? (D = m._events = /* @__PURE__ */ Object.create(null), m._eventsCount = 0) : (D.newListener !== void 0 && (m.emit("newListener", v, w.listener ? w.listener : w), D = m._events), P = D[v]), P === void 0) P = D[v] = w, ++m._eventsCount;
3754
- else if (typeof P == "function" ? P = D[v] = x ? [w, P] : [P, w] : x ? P.unshift(w) : P.push(w), (C = a(m)) > 0 && P.length > C && !P.warned) {
3753
+ if (s(w), (D = m._events) === void 0 ? (D = m._events = /* @__PURE__ */ Object.create(null), m._eventsCount = 0) : (D.newListener !== void 0 && (m.emit("newListener", y, w.listener ? w.listener : w), D = m._events), P = D[y]), P === void 0) P = D[y] = w, ++m._eventsCount;
3754
+ else if (typeof P == "function" ? P = D[y] = x ? [w, P] : [P, w] : x ? P.unshift(w) : P.push(w), (C = a(m)) > 0 && P.length > C && !P.warned) {
3755
3755
  P.warned = !0;
3756
- var B = new Error("Possible EventEmitter memory leak detected. " + P.length + " " + String(v) + " listeners added. Use emitter.setMaxListeners() to increase limit");
3757
- B.name = "MaxListenersExceededWarning", B.emitter = m, B.type = v, B.count = P.length, R = B, console && console.warn && console.warn(R);
3756
+ var B = new Error("Possible EventEmitter memory leak detected. " + P.length + " " + String(y) + " listeners added. Use emitter.setMaxListeners() to increase limit");
3757
+ B.name = "MaxListenersExceededWarning", B.emitter = m, B.type = y, B.count = P.length, R = B, console && console.warn && console.warn(R);
3758
3758
  }
3759
3759
  return m;
3760
3760
  }
3761
3761
  function u() {
3762
3762
  if (!this.fired) return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
3763
3763
  }
3764
- function d(m, v, w) {
3765
- var x = { fired: !1, wrapFn: void 0, target: m, type: v, listener: w }, C = u.bind(x);
3764
+ function d(m, y, w) {
3765
+ var x = { fired: !1, wrapFn: void 0, target: m, type: y, listener: w }, C = u.bind(x);
3766
3766
  return C.listener = w, x.wrapFn = C, C;
3767
3767
  }
3768
- function h(m, v, w) {
3768
+ function h(m, y, w) {
3769
3769
  var x = m._events;
3770
3770
  if (x === void 0) return [];
3771
- var C = x[v];
3771
+ var C = x[y];
3772
3772
  return C === void 0 ? [] : typeof C == "function" ? w ? [C.listener || C] : [C] : w ? function(D) {
3773
3773
  for (var P = new Array(D.length), R = 0; R < P.length; ++R) P[R] = D[R].listener || D[R];
3774
3774
  return P;
3775
- }(C) : y(C, C.length);
3775
+ }(C) : v(C, C.length);
3776
3776
  }
3777
3777
  function g(m) {
3778
- var v = this._events;
3779
- if (v !== void 0) {
3780
- var w = v[m];
3778
+ var y = this._events;
3779
+ if (y !== void 0) {
3780
+ var w = y[m];
3781
3781
  if (typeof w == "function") return 1;
3782
3782
  if (w !== void 0) return w.length;
3783
3783
  }
3784
3784
  return 0;
3785
3785
  }
3786
- function y(m, v) {
3787
- for (var w = new Array(v), x = 0; x < v; ++x) w[x] = m[x];
3786
+ function v(m, y) {
3787
+ for (var w = new Array(y), x = 0; x < y; ++x) w[x] = m[x];
3788
3788
  return w;
3789
3789
  }
3790
- function b(m, v, w, x) {
3791
- if (typeof m.on == "function") x.once ? m.once(v, w) : m.on(v, w);
3790
+ function b(m, y, w, x) {
3791
+ if (typeof m.on == "function") x.once ? m.once(y, w) : m.on(y, w);
3792
3792
  else {
3793
3793
  if (typeof m.addEventListener != "function") throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof m);
3794
- m.addEventListener(v, function C(D) {
3795
- x.once && m.removeEventListener(v, C), w(D);
3794
+ m.addEventListener(y, function C(D) {
3795
+ x.once && m.removeEventListener(y, C), w(D);
3796
3796
  });
3797
3797
  }
3798
3798
  }
@@ -3809,39 +3809,39 @@ var zi, On = { exports: {} }, jr = function() {
3809
3809
  }, i.prototype.getMaxListeners = function() {
3810
3810
  return a(this);
3811
3811
  }, i.prototype.emit = function(m) {
3812
- for (var v = [], w = 1; w < arguments.length; w++) v.push(arguments[w]);
3812
+ for (var y = [], w = 1; w < arguments.length; w++) y.push(arguments[w]);
3813
3813
  var x = m === "error", C = this._events;
3814
3814
  if (C !== void 0) x = x && C.error === void 0;
3815
3815
  else if (!x) return !1;
3816
3816
  if (x) {
3817
3817
  var D;
3818
- if (v.length > 0 && (D = v[0]), D instanceof Error) throw D;
3818
+ if (y.length > 0 && (D = y[0]), D instanceof Error) throw D;
3819
3819
  var P = new Error("Unhandled error." + (D ? " (" + D.message + ")" : ""));
3820
3820
  throw P.context = D, P;
3821
3821
  }
3822
3822
  var R = C[m];
3823
3823
  if (R === void 0) return !1;
3824
- if (typeof R == "function") t(R, this, v);
3824
+ if (typeof R == "function") t(R, this, y);
3825
3825
  else {
3826
- var B = R.length, re = y(R, B);
3827
- for (w = 0; w < B; ++w) t(re[w], this, v);
3826
+ var B = R.length, re = v(R, B);
3827
+ for (w = 0; w < B; ++w) t(re[w], this, y);
3828
3828
  }
3829
3829
  return !0;
3830
- }, i.prototype.addListener = function(m, v) {
3831
- return c(this, m, v, !1);
3832
- }, i.prototype.on = i.prototype.addListener, i.prototype.prependListener = function(m, v) {
3833
- return c(this, m, v, !0);
3834
- }, i.prototype.once = function(m, v) {
3835
- return s(v), this.on(m, d(this, m, v)), this;
3836
- }, i.prototype.prependOnceListener = function(m, v) {
3837
- return s(v), this.prependListener(m, d(this, m, v)), this;
3838
- }, i.prototype.removeListener = function(m, v) {
3830
+ }, i.prototype.addListener = function(m, y) {
3831
+ return c(this, m, y, !1);
3832
+ }, i.prototype.on = i.prototype.addListener, i.prototype.prependListener = function(m, y) {
3833
+ return c(this, m, y, !0);
3834
+ }, i.prototype.once = function(m, y) {
3835
+ return s(y), this.on(m, d(this, m, y)), this;
3836
+ }, i.prototype.prependOnceListener = function(m, y) {
3837
+ return s(y), this.prependListener(m, d(this, m, y)), this;
3838
+ }, i.prototype.removeListener = function(m, y) {
3839
3839
  var w, x, C, D, P;
3840
- if (s(v), (x = this._events) === void 0) return this;
3840
+ if (s(y), (x = this._events) === void 0) return this;
3841
3841
  if ((w = x[m]) === void 0) return this;
3842
- if (w === v || w.listener === v) --this._eventsCount == 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete x[m], x.removeListener && this.emit("removeListener", m, w.listener || v));
3842
+ if (w === y || w.listener === y) --this._eventsCount == 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete x[m], x.removeListener && this.emit("removeListener", m, w.listener || y));
3843
3843
  else if (typeof w != "function") {
3844
- for (C = -1, D = w.length - 1; D >= 0; D--) if (w[D] === v || w[D].listener === v) {
3844
+ for (C = -1, D = w.length - 1; D >= 0; D--) if (w[D] === y || w[D].listener === y) {
3845
3845
  P = w[D].listener, C = D;
3846
3846
  break;
3847
3847
  }
@@ -3849,11 +3849,11 @@ var zi, On = { exports: {} }, jr = function() {
3849
3849
  C === 0 ? w.shift() : function(R, B) {
3850
3850
  for (; B + 1 < R.length; B++) R[B] = R[B + 1];
3851
3851
  R.pop();
3852
- }(w, C), w.length === 1 && (x[m] = w[0]), x.removeListener !== void 0 && this.emit("removeListener", m, P || v);
3852
+ }(w, C), w.length === 1 && (x[m] = w[0]), x.removeListener !== void 0 && this.emit("removeListener", m, P || y);
3853
3853
  }
3854
3854
  return this;
3855
3855
  }, i.prototype.off = i.prototype.removeListener, i.prototype.removeAllListeners = function(m) {
3856
- var v, w, x;
3856
+ var y, w, x;
3857
3857
  if ((w = this._events) === void 0) return this;
3858
3858
  if (w.removeListener === void 0) return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : w[m] !== void 0 && (--this._eventsCount == 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete w[m]), this;
3859
3859
  if (arguments.length === 0) {
@@ -3861,15 +3861,15 @@ var zi, On = { exports: {} }, jr = function() {
3861
3861
  for (x = 0; x < D.length; ++x) (C = D[x]) !== "removeListener" && this.removeAllListeners(C);
3862
3862
  return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
3863
3863
  }
3864
- if (typeof (v = w[m]) == "function") this.removeListener(m, v);
3865
- else if (v !== void 0) for (x = v.length - 1; x >= 0; x--) this.removeListener(m, v[x]);
3864
+ if (typeof (y = w[m]) == "function") this.removeListener(m, y);
3865
+ else if (y !== void 0) for (x = y.length - 1; x >= 0; x--) this.removeListener(m, y[x]);
3866
3866
  return this;
3867
3867
  }, i.prototype.listeners = function(m) {
3868
3868
  return h(this, m, !0);
3869
3869
  }, i.prototype.rawListeners = function(m) {
3870
3870
  return h(this, m, !1);
3871
- }, i.listenerCount = function(m, v) {
3872
- return typeof m.listenerCount == "function" ? m.listenerCount(v) : g.call(m, v);
3871
+ }, i.listenerCount = function(m, y) {
3872
+ return typeof m.listenerCount == "function" ? m.listenerCount(y) : g.call(m, y);
3873
3873
  }, i.prototype.listenerCount = g, i.prototype.eventNames = function() {
3874
3874
  return this._eventsCount > 0 ? r(this._events) : [];
3875
3875
  }, On.exports;
@@ -5184,12 +5184,12 @@ function pl(r) {
5184
5184
  const a = Ta(r.spanContext().traceId, e), c = Ci(t), u = c.data || {}, d = u["sentry.sample_rate"];
5185
5185
  d != null && (a.sample_rate = `${d}`);
5186
5186
  const h = u["sentry.source"], g = c.description;
5187
- return h !== "url" && g && (a.transaction = g), function(y) {
5187
+ return h !== "url" && g && (a.transaction = g), function(v) {
5188
5188
  if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__) return !1;
5189
5189
  const b = Ce(), m = b && b.getOptions();
5190
5190
  return !!m && (m.enableTracing || "tracesSampleRate" in m || "tracesSampler" in m);
5191
- }() && (a.sampled = String(function(y) {
5192
- const { traceFlags: b } = y.spanContext();
5191
+ }() && (a.sampled = String(function(v) {
5192
+ const { traceFlags: b } = v.spanContext();
5193
5193
  return b === 1;
5194
5194
  }(t))), e.emit("createDsc", a, t), a;
5195
5195
  }
@@ -5211,8 +5211,8 @@ function gl(r) {
5211
5211
  let d = "", h = u;
5212
5212
  const g = h.split("/");
5213
5213
  if (g.length > 1 && (d = g.slice(0, -1).join("/"), h = g.pop()), h) {
5214
- const y = h.match(/^\d+/);
5215
- y && (h = y[0]);
5214
+ const v = h.match(/^\d+/);
5215
+ v && (h = v[0]);
5216
5216
  }
5217
5217
  return ho({ host: a, pass: s, path: d, projectId: h, port: c, protocol: i, publicKey: o });
5218
5218
  }(r) : ho(r);
@@ -5254,10 +5254,10 @@ function Wr(r, e, t = 1 / 0, n = 1 / 0, i = /* @__PURE__ */ function() {
5254
5254
  }()) {
5255
5255
  const [o, s] = i;
5256
5256
  if (e == null || ["boolean", "string"].includes(typeof e) || typeof e == "number" && Number.isFinite(e)) return e;
5257
- const a = function(y, b) {
5257
+ const a = function(v, b) {
5258
5258
  try {
5259
- if (y === "domain" && b && typeof b == "object" && b._events) return "[Domain]";
5260
- if (y === "domainEmitter") return "[DomainEmitter]";
5259
+ if (v === "domain" && b && typeof b == "object" && b._events) return "[Domain]";
5260
+ if (v === "domainEmitter") return "[DomainEmitter]";
5261
5261
  if (typeof global < "u" && b === global) return "[Global]";
5262
5262
  if (typeof window < "u" && b === window) return "[Window]";
5263
5263
  if (typeof document < "u" && b === document) return "[Document]";
@@ -5267,13 +5267,13 @@ function Wr(r, e, t = 1 / 0, n = 1 / 0, i = /* @__PURE__ */ function() {
5267
5267
  if (typeof b == "function") return `[Function: ${_t(b)}]`;
5268
5268
  if (typeof b == "symbol") return `[${String(b)}]`;
5269
5269
  if (typeof b == "bigint") return `[BigInt: ${String(b)}]`;
5270
- const v = function(w) {
5270
+ const y = function(w) {
5271
5271
  const x = Object.getPrototypeOf(w);
5272
5272
  return x ? x.constructor.name : "null prototype";
5273
5273
  }(b);
5274
- return /^HTML(\w*)Element$/.test(v) ? `[HTMLElement: ${v}]` : `[object ${v}]`;
5275
- } catch (v) {
5276
- return `**non-serializable** (${v})`;
5274
+ return /^HTML(\w*)Element$/.test(y) ? `[HTMLElement: ${y}]` : `[object ${y}]`;
5275
+ } catch (y) {
5276
+ return `**non-serializable** (${y})`;
5277
5277
  }
5278
5278
  var m;
5279
5279
  }(r, e);
@@ -5290,14 +5290,14 @@ function Wr(r, e, t = 1 / 0, n = 1 / 0, i = /* @__PURE__ */ function() {
5290
5290
  const d = Array.isArray(e) ? [] : {};
5291
5291
  let h = 0;
5292
5292
  const g = _a(e);
5293
- for (const y in g) {
5294
- if (!Object.prototype.hasOwnProperty.call(g, y)) continue;
5293
+ for (const v in g) {
5294
+ if (!Object.prototype.hasOwnProperty.call(g, v)) continue;
5295
5295
  if (h >= n) {
5296
- d[y] = "[MaxProperties ~]";
5296
+ d[v] = "[MaxProperties ~]";
5297
5297
  break;
5298
5298
  }
5299
- const b = g[y];
5300
- d[y] = Wr(y, b, c - 1, n, i), h++;
5299
+ const b = g[v];
5300
+ d[v] = Wr(v, b, c - 1, n, i), h++;
5301
5301
  }
5302
5302
  return s(e), d;
5303
5303
  }
@@ -5383,14 +5383,14 @@ let In, go, wr;
5383
5383
  function Sl(r, e) {
5384
5384
  const { fingerprint: t, span: n, breadcrumbs: i, sdkProcessingMetadata: o } = e;
5385
5385
  (function(s, a) {
5386
- const { extra: c, tags: u, user: d, contexts: h, level: g, transactionName: y } = a, b = He(c);
5386
+ const { extra: c, tags: u, user: d, contexts: h, level: g, transactionName: v } = a, b = He(c);
5387
5387
  b && Object.keys(b).length && (s.extra = { ...b, ...s.extra });
5388
5388
  const m = He(u);
5389
5389
  m && Object.keys(m).length && (s.tags = { ...m, ...s.tags });
5390
- const v = He(d);
5391
- v && Object.keys(v).length && (s.user = { ...v, ...s.user });
5390
+ const y = He(d);
5391
+ y && Object.keys(y).length && (s.user = { ...y, ...s.user });
5392
5392
  const w = He(h);
5393
- w && Object.keys(w).length && (s.contexts = { ...w, ...s.contexts }), g && (s.level = g), y && s.type !== "transaction" && (s.transaction = y);
5393
+ w && Object.keys(w).length && (s.contexts = { ...w, ...s.contexts }), g && (s.level = g), v && s.type !== "transaction" && (s.transaction = v);
5394
5394
  })(r, e), n && function(s, a) {
5395
5395
  s.contexts = { trace: ul(a), ...s.contexts }, s.sdkProcessingMetadata = { dynamicSamplingContext: pl(a), ...s.sdkProcessingMetadata };
5396
5396
  const c = Ea(a), u = Ci(c).description;
@@ -5405,8 +5405,8 @@ function Sl(r, e) {
5405
5405
  }(r, o);
5406
5406
  }
5407
5407
  function mo(r, e) {
5408
- const { extra: t, tags: n, user: i, contexts: o, level: s, sdkProcessingMetadata: a, breadcrumbs: c, fingerprint: u, eventProcessors: d, attachments: h, propagationContext: g, transactionName: y, span: b } = e;
5409
- Rn(r, "extra", t), Rn(r, "tags", n), Rn(r, "user", i), Rn(r, "contexts", o), r.sdkProcessingMetadata = gr(r.sdkProcessingMetadata, a, 2), s && (r.level = s), y && (r.transactionName = y), b && (r.span = b), c.length && (r.breadcrumbs = [...r.breadcrumbs, ...c]), u.length && (r.fingerprint = [...r.fingerprint, ...u]), d.length && (r.eventProcessors = [...r.eventProcessors, ...d]), h.length && (r.attachments = [...r.attachments, ...h]), r.propagationContext = { ...r.propagationContext, ...g };
5408
+ const { extra: t, tags: n, user: i, contexts: o, level: s, sdkProcessingMetadata: a, breadcrumbs: c, fingerprint: u, eventProcessors: d, attachments: h, propagationContext: g, transactionName: v, span: b } = e;
5409
+ Rn(r, "extra", t), Rn(r, "tags", n), Rn(r, "user", i), Rn(r, "contexts", o), r.sdkProcessingMetadata = gr(r.sdkProcessingMetadata, a, 2), s && (r.level = s), v && (r.transactionName = v), b && (r.span = b), c.length && (r.breadcrumbs = [...r.breadcrumbs, ...c]), u.length && (r.fingerprint = [...r.fingerprint, ...u]), d.length && (r.eventProcessors = [...r.eventProcessors, ...d]), h.length && (r.attachments = [...r.attachments, ...h]), r.propagationContext = { ...r.propagationContext, ...g };
5410
5410
  }
5411
5411
  function Rn(r, e, t) {
5412
5412
  r[e] = gr(r[e], t, 1);
@@ -5414,8 +5414,8 @@ function Rn(r, e, t) {
5414
5414
  function kl(r, e, t, n, i, o) {
5415
5415
  const { normalizeDepth: s = 3, normalizeMaxBreadth: a = 1e3 } = r, c = { ...e, event_id: e.event_id || t.event_id || ze(), timestamp: e.timestamp || En() }, u = t.integrations || r.integrations.map((b) => b.name);
5416
5416
  (function(b, m) {
5417
- const { environment: v, release: w, dist: x, maxValueLength: C = 250 } = m;
5418
- b.environment = b.environment || v || Ei, !b.release && w && (b.release = w), !b.dist && x && (b.dist = x), b.message && (b.message = Gt(b.message, C));
5417
+ const { environment: y, release: w, dist: x, maxValueLength: C = 250 } = m;
5418
+ b.environment = b.environment || y || Ei, !b.release && w && (b.release = w), !b.dist && x && (b.dist = x), b.message && (b.message = Gt(b.message, C));
5419
5419
  const D = b.exception && b.exception.values && b.exception.values[0];
5420
5420
  D && D.value && (D.value = Gt(D.value, C));
5421
5421
  const P = b.request;
@@ -5423,7 +5423,7 @@ function kl(r, e, t, n, i, o) {
5423
5423
  })(c, r), function(b, m) {
5424
5424
  m.length > 0 && (b.sdk = b.sdk || {}, b.sdk.integrations = [...b.sdk.integrations || [], ...m]);
5425
5425
  }(c, u), i && i.emit("applyFrameMetadata", e), e.type === void 0 && function(b, m) {
5426
- const v = function(w) {
5426
+ const y = function(w) {
5427
5427
  const x = ce._sentryDebugIds;
5428
5428
  if (!x) return {};
5429
5429
  const C = Object.keys(x);
@@ -5447,7 +5447,7 @@ function kl(r, e, t, n, i, o) {
5447
5447
  try {
5448
5448
  b.exception.values.forEach((w) => {
5449
5449
  w.stacktrace.frames.forEach((x) => {
5450
- v && x.filename && (x.debug_id = v[x.filename]);
5450
+ y && x.filename && (x.debug_id = y[x.filename]);
5451
5451
  });
5452
5452
  });
5453
5453
  } catch {
@@ -5455,33 +5455,33 @@ function kl(r, e, t, n, i, o) {
5455
5455
  }(c, r.stackParser);
5456
5456
  const d = function(b, m) {
5457
5457
  if (!m) return b;
5458
- const v = b ? b.clone() : new Ct();
5459
- return v.update(m), v;
5458
+ const y = b ? b.clone() : new Ct();
5459
+ return y.update(m), y;
5460
5460
  }(n, t.captureContext);
5461
5461
  t.mechanism && Zt(c, t.mechanism);
5462
5462
  const h = i ? i.getEventProcessors() : [], g = Zn("globalScope", () => new Ct()).getScopeData();
5463
5463
  o && mo(g, o.getScopeData()), d && mo(g, d.getScopeData());
5464
- const y = [...t.attachments || [], ...g.attachments];
5465
- return y.length && (t.attachments = y), Sl(c, g), Gr([...h, ...g.eventProcessors], c, t).then((b) => (b && function(m) {
5466
- const v = {};
5464
+ const v = [...t.attachments || [], ...g.attachments];
5465
+ return v.length && (t.attachments = v), Sl(c, g), Gr([...h, ...g.eventProcessors], c, t).then((b) => (b && function(m) {
5466
+ const y = {};
5467
5467
  try {
5468
5468
  m.exception.values.forEach((x) => {
5469
5469
  x.stacktrace.frames.forEach((C) => {
5470
- C.debug_id && (C.abs_path ? v[C.abs_path] = C.debug_id : C.filename && (v[C.filename] = C.debug_id), delete C.debug_id);
5470
+ C.debug_id && (C.abs_path ? y[C.abs_path] = C.debug_id : C.filename && (y[C.filename] = C.debug_id), delete C.debug_id);
5471
5471
  });
5472
5472
  });
5473
5473
  } catch {
5474
5474
  }
5475
- if (Object.keys(v).length === 0) return;
5475
+ if (Object.keys(y).length === 0) return;
5476
5476
  m.debug_meta = m.debug_meta || {}, m.debug_meta.images = m.debug_meta.images || [];
5477
5477
  const w = m.debug_meta.images;
5478
- Object.entries(v).forEach(([x, C]) => {
5478
+ Object.entries(y).forEach(([x, C]) => {
5479
5479
  w.push({ type: "sourcemap", code_file: x, debug_id: C });
5480
5480
  });
5481
- }(b), typeof s == "number" && s > 0 ? function(m, v, w) {
5481
+ }(b), typeof s == "number" && s > 0 ? function(m, y, w) {
5482
5482
  if (!m) return null;
5483
- const x = { ...m, ...m.breadcrumbs && { breadcrumbs: m.breadcrumbs.map((C) => ({ ...C, ...C.data && { data: lt(C.data, v, w) } })) }, ...m.user && { user: lt(m.user, v, w) }, ...m.contexts && { contexts: lt(m.contexts, v, w) }, ...m.extra && { extra: lt(m.extra, v, w) } };
5484
- return m.contexts && m.contexts.trace && x.contexts && (x.contexts.trace = m.contexts.trace, m.contexts.trace.data && (x.contexts.trace.data = lt(m.contexts.trace.data, v, w))), m.spans && (x.spans = m.spans.map((C) => ({ ...C, ...C.data && { data: lt(C.data, v, w) } }))), m.contexts && m.contexts.flags && x.contexts && (x.contexts.flags = lt(m.contexts.flags, 3, w)), x;
5483
+ const x = { ...m, ...m.breadcrumbs && { breadcrumbs: m.breadcrumbs.map((C) => ({ ...C, ...C.data && { data: lt(C.data, y, w) } })) }, ...m.user && { user: lt(m.user, y, w) }, ...m.contexts && { contexts: lt(m.contexts, y, w) }, ...m.extra && { extra: lt(m.extra, y, w) } };
5484
+ return m.contexts && m.contexts.trace && x.contexts && (x.contexts.trace = m.contexts.trace, m.contexts.trace.data && (x.contexts.trace.data = lt(m.contexts.trace.data, y, w))), m.spans && (x.spans = m.spans.map((C) => ({ ...C, ...C.data && { data: lt(C.data, y, w) } }))), m.contexts && m.contexts.flags && x.contexts && (x.contexts.flags = lt(m.contexts.flags, 3, w)), x;
5485
5485
  }(b, s, a) : b));
5486
5486
  }
5487
5487
  function bo(r, e) {
@@ -5693,19 +5693,19 @@ class _l {
5693
5693
  });
5694
5694
  }
5695
5695
  _processEvent(e, t, n) {
5696
- const i = this.getOptions(), { sampleRate: o } = i, s = Co(e), a = _o(e), c = e.type || "error", u = `before send for type \`${c}\``, d = o === void 0 ? void 0 : function(y) {
5697
- if (typeof y == "boolean") return Number(y);
5698
- const b = typeof y == "string" ? parseFloat(y) : y;
5696
+ const i = this.getOptions(), { sampleRate: o } = i, s = Co(e), a = _o(e), c = e.type || "error", u = `before send for type \`${c}\``, d = o === void 0 ? void 0 : function(v) {
5697
+ if (typeof v == "boolean") return Number(v);
5698
+ const b = typeof v == "string" ? parseFloat(v) : v;
5699
5699
  if (!(typeof b != "number" || isNaN(b) || b < 0 || b > 1)) return b;
5700
- ge && J.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(y)} of type ${JSON.stringify(typeof y)}.`);
5700
+ ge && J.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(v)} of type ${JSON.stringify(typeof v)}.`);
5701
5701
  }(o);
5702
5702
  if (a && typeof d == "number" && Math.random() > d) return this.recordDroppedEvent("sample_rate", "error", e), tr(new Je(`Discarding event because it's not included in the random sample (sampling rate = ${o})`, "log"));
5703
5703
  const h = c === "replay_event" ? "replay" : c, g = (e.sdkProcessingMetadata || {}).capturedSpanIsolationScope;
5704
- return this._prepareEvent(e, t, n, g).then((y) => {
5705
- if (y === null) throw this.recordDroppedEvent("event_processor", h, e), new Je("An event processor returned `null`, will not send event.", "log");
5706
- if (t.data && t.data.__sentry__ === !0) return y;
5707
- const b = function(m, v, w, x) {
5708
- const { beforeSend: C, beforeSendTransaction: D, beforeSendSpan: P } = v;
5704
+ return this._prepareEvent(e, t, n, g).then((v) => {
5705
+ if (v === null) throw this.recordDroppedEvent("event_processor", h, e), new Je("An event processor returned `null`, will not send event.", "log");
5706
+ if (t.data && t.data.__sentry__ === !0) return v;
5707
+ const b = function(m, y, w, x) {
5708
+ const { beforeSend: C, beforeSendTransaction: D, beforeSendSpan: P } = y;
5709
5709
  if (_o(w) && C) return C(w, x);
5710
5710
  if (Co(w)) {
5711
5711
  if (w.spans && P) {
@@ -5725,40 +5725,40 @@ class _l {
5725
5725
  }
5726
5726
  }
5727
5727
  return w;
5728
- }(this, i, y, t);
5729
- return function(m, v) {
5730
- const w = `${v} must return \`null\` or a valid event.`;
5728
+ }(this, i, v, t);
5729
+ return function(m, y) {
5730
+ const w = `${y} must return \`null\` or a valid event.`;
5731
5731
  if (fr(m)) return m.then((x) => {
5732
5732
  if (!Qt(x) && x !== null) throw new Je(w);
5733
5733
  return x;
5734
5734
  }, (x) => {
5735
- throw new Je(`${v} rejected with ${x}`);
5735
+ throw new Je(`${y} rejected with ${x}`);
5736
5736
  });
5737
5737
  if (!Qt(m) && m !== null) throw new Je(w);
5738
5738
  return m;
5739
5739
  }(b, u);
5740
- }).then((y) => {
5741
- if (y === null) {
5740
+ }).then((v) => {
5741
+ if (v === null) {
5742
5742
  if (this.recordDroppedEvent("before_send", h, e), s) {
5743
- const v = 1 + (e.spans || []).length;
5744
- this.recordDroppedEvent("before_send", "span", v);
5743
+ const y = 1 + (e.spans || []).length;
5744
+ this.recordDroppedEvent("before_send", "span", y);
5745
5745
  }
5746
5746
  throw new Je(`${u} returned \`null\`, will not send event.`, "log");
5747
5747
  }
5748
5748
  const b = n && n.getSession();
5749
- if (!s && b && this._updateSessionFromEvent(b, y), s) {
5750
- const v = (y.sdkProcessingMetadata && y.sdkProcessingMetadata.spanCountBeforeProcessing || 0) - (y.spans ? y.spans.length : 0);
5751
- v > 0 && this.recordDroppedEvent("before_send", "span", v);
5749
+ if (!s && b && this._updateSessionFromEvent(b, v), s) {
5750
+ const y = (v.sdkProcessingMetadata && v.sdkProcessingMetadata.spanCountBeforeProcessing || 0) - (v.spans ? v.spans.length : 0);
5751
+ y > 0 && this.recordDroppedEvent("before_send", "span", y);
5752
5752
  }
5753
- const m = y.transaction_info;
5754
- if (s && m && y.transaction !== e.transaction) {
5755
- const v = "custom";
5756
- y.transaction_info = { ...m, source: v };
5753
+ const m = v.transaction_info;
5754
+ if (s && m && v.transaction !== e.transaction) {
5755
+ const y = "custom";
5756
+ v.transaction_info = { ...m, source: y };
5757
5757
  }
5758
- return this.sendEvent(y, t), y;
5759
- }).then(null, (y) => {
5760
- throw y instanceof Je ? y : (this.captureException(y, { data: { __sentry__: !0 }, originalException: y }), new Je(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
5761
- Reason: ${y}`));
5758
+ return this.sendEvent(v, t), v;
5759
+ }).then(null, (v) => {
5760
+ throw v instanceof Je ? v : (this.captureException(v, { data: { __sentry__: !0 }, originalException: v }), new Je(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
5761
+ Reason: ${v}`));
5762
5762
  });
5763
5763
  }
5764
5764
  _process(e) {
@@ -5817,7 +5817,7 @@ function El(r, { statusCode: e, headers: t }, n = Date.now()) {
5817
5817
  const i = { ...r }, o = t && t["x-sentry-rate-limits"], s = t && t["retry-after"];
5818
5818
  if (o) for (const a of o.trim().split(",")) {
5819
5819
  const [c, u, , , d] = a.split(":", 5), h = parseInt(c, 10), g = 1e3 * (isNaN(h) ? 60 : h);
5820
- if (u) for (const y of u.split(";")) y === "metric_bucket" && d && !d.split(";").includes("custom") || (i[y] = n + g);
5820
+ if (u) for (const v of u.split(";")) v === "metric_bucket" && d && !d.split(";").includes("custom") || (i[v] = n + g);
5821
5821
  else i.all = n + g;
5822
5822
  }
5823
5823
  else s ? i.all = n + function(a, c = Date.now()) {
@@ -5834,10 +5834,10 @@ function Tl(r, e, t = Cl(r.bufferSize || 64)) {
5834
5834
  const o = [];
5835
5835
  if (po(i, (c, u) => {
5836
5836
  const d = fo(u);
5837
- if (function(h, g, y = Date.now()) {
5837
+ if (function(h, g, v = Date.now()) {
5838
5838
  return function(b, m) {
5839
5839
  return b[m] || b.all || 0;
5840
- }(h, g) > y;
5840
+ }(h, g) > v;
5841
5841
  }(n, d)) {
5842
5842
  const h = Eo(c, u);
5843
5843
  r.recordDroppedEvent("ratelimit_backoff", d, h);
@@ -6073,8 +6073,8 @@ function Bl(r, e) {
6073
6073
  const a = new Error(), { method: c, url: u } = function(h) {
6074
6074
  if (h.length === 0) return { method: "GET", url: "" };
6075
6075
  if (h.length === 2) {
6076
- const [y, b] = h;
6077
- return { url: Ro(y), method: Qr(b, "method") ? String(b.method).toUpperCase() : "GET" };
6076
+ const [v, b] = h;
6077
+ return { url: Ro(v), method: Qr(b, "method") ? String(b.method).toUpperCase() : "GET" };
6078
6078
  }
6079
6079
  const g = h[0];
6080
6080
  return { url: Ro(g), method: Qr(g, "method") ? String(g.method).toUpperCase() : "GET" };
@@ -6386,8 +6386,8 @@ function Wl() {
6386
6386
  }
6387
6387
  };
6388
6388
  return "onreadystatechange" in t && typeof t.onreadystatechange == "function" ? t.onreadystatechange = new Proxy(t.onreadystatechange, { apply: (u, d, h) => (c(), u.apply(d, h)) }) : t.addEventListener("readystatechange", c), t.setRequestHeader = new Proxy(t.setRequestHeader, { apply(u, d, h) {
6389
- const [g, y] = h, b = d[mn];
6390
- return b && dt(g) && dt(y) && (b.request_headers[g.toLowerCase()] = y), u.apply(d, h);
6389
+ const [g, v] = h, b = d[mn];
6390
+ return b && dt(g) && dt(v) && (b.request_headers[g.toLowerCase()] = v), u.apply(d, h);
6391
6391
  } }), e.apply(t, n);
6392
6392
  } }), r.send = new Proxy(r.send, { apply(e, t, n) {
6393
6393
  const i = t[mn];
@@ -6504,13 +6504,13 @@ const Gl = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, Yl = /^\s*at (?:(.+?\)(?: \
6504
6504
  let a, c, u = typeof o == "object" ? o.serializeAttribute : void 0, d = typeof o == "object" && typeof o.maxStringLength == "number" ? o.maxStringLength : void 0;
6505
6505
  d && d > Uo && (mr && J.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${d} was configured. Sentry will use 1024 instead.`), d = Uo), typeof u == "string" && (u = [u]);
6506
6506
  try {
6507
- const g = s.event, y = function(b) {
6507
+ const g = s.event, v = function(b) {
6508
6508
  return !!b && !!b.target;
6509
6509
  }(g) ? g.target : g;
6510
- a = ka(y, { keyAttrs: u, maxStringLength: d }), c = function(b) {
6510
+ a = ka(v, { keyAttrs: u, maxStringLength: d }), c = function(b) {
6511
6511
  if (!Si.HTMLElement) return null;
6512
6512
  let m = b;
6513
- for (let v = 0; v < 5; v++) {
6513
+ for (let y = 0; y < 5; y++) {
6514
6514
  if (!m) return null;
6515
6515
  if (m instanceof HTMLElement) {
6516
6516
  if (m.dataset.sentryComponent) return m.dataset.sentryComponent;
@@ -6519,7 +6519,7 @@ const Gl = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, Yl = /^\s*at (?:(.+?\)(?: \
6519
6519
  m = m.parentNode;
6520
6520
  }
6521
6521
  return null;
6522
- }(y);
6522
+ }(v);
6523
6523
  } catch {
6524
6524
  a = "<unknown>";
6525
6525
  }
@@ -6534,8 +6534,8 @@ const Gl = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, Yl = /^\s*at (?:(.+?\)(?: \
6534
6534
  if (Ce() !== i) return;
6535
6535
  const { startTimestamp: s, endTimestamp: a } = o, c = o.xhr[mn];
6536
6536
  if (!s || !a || !c) return;
6537
- const { method: u, url: d, status_code: h, body: g } = c, y = { method: u, url: d, status_code: h }, b = { xhr: o.xhr, input: g, startTimestamp: s, endTimestamp: a };
6538
- Tt({ category: "xhr", data: y, type: "http", level: Io(h) }, b);
6537
+ const { method: u, url: d, status_code: h, body: g } = c, v = { method: u, url: d, status_code: h }, b = { xhr: o.xhr, input: g, startTimestamp: s, endTimestamp: a };
6538
+ Tt({ category: "xhr", data: v, type: "http", level: Io(h) }, b);
6539
6539
  };
6540
6540
  }(t)), e.fetch && Bl(/* @__PURE__ */ function(i) {
6541
6541
  return function(o) {
@@ -6630,15 +6630,15 @@ const au = () => ({ name: "BrowserSession", setupOnce() {
6630
6630
  })((i) => {
6631
6631
  const { stackParser: o, attachStacktrace: s } = qo();
6632
6632
  if (Ce() !== n || No()) return;
6633
- const { msg: a, url: c, line: u, column: d, error: h } = i, g = function(y, b, m, v) {
6634
- const w = y.exception = y.exception || {}, x = w.values = w.values || [], C = x[0] = x[0] || {}, D = C.stacktrace = C.stacktrace || {}, P = D.frames = D.frames || [], R = v, B = m, re = dt(b) && b.length > 0 ? b : function() {
6633
+ const { msg: a, url: c, line: u, column: d, error: h } = i, g = function(v, b, m, y) {
6634
+ const w = v.exception = v.exception || {}, x = w.values = w.values || [], C = x[0] = x[0] || {}, D = C.stacktrace = C.stacktrace || {}, P = D.frames = D.frames || [], R = y, B = m, re = dt(b) && b.length > 0 ? b : function() {
6635
6635
  try {
6636
6636
  return Si.document.location.href;
6637
6637
  } catch {
6638
6638
  return "";
6639
6639
  }
6640
6640
  }();
6641
- return P.length === 0 && P.push({ colno: R, filename: re, function: Pt, in_app: !0, lineno: B }), y;
6641
+ return P.length === 0 && P.push({ colno: R, filename: re, function: Pt, in_app: !0, lineno: B }), v;
6642
6642
  }(ei(o, h || a, void 0, s, !1), c, u, d);
6643
6643
  g.level = "error", bo(g, { originalException: h, mechanism: { handled: !1, type: "onerror" } });
6644
6644
  });
@@ -7593,8 +7593,8 @@ var Wa = function() {
7593
7593
  } else {
7594
7594
  if (ae(e[o]) !== "object") return [!1, "invalid (non-object) value for field '".concat(o, "' in canReceive")];
7595
7595
  for (var u = 0, d = Object.values(e[o]); u < d.length; u++) {
7596
- var h = d[u], g = Ee(ke.validateJSONObject(h), 2), y = g[0], b = g[1];
7597
- if (!y) return [!1, b];
7596
+ var h = d[u], g = Ee(ke.validateJSONObject(h), 2), v = g[0], b = g[1];
7597
+ if (!v) return [!1, b];
7598
7598
  }
7599
7599
  }
7600
7600
  }
@@ -7854,11 +7854,11 @@ var Mt = {}, _s = "video", $d = "voice", Cs = oe() ? { data: {} } : { data: {},
7854
7854
  break;
7855
7855
  case "canAdmin":
7856
7856
  if (o instanceof Set || o instanceof Array || Array.isArray(o)) {
7857
- var y, b = ["participants", "streaming", "transcription"], m = ks(o);
7857
+ var v, b = ["participants", "streaming", "transcription"], m = ks(o);
7858
7858
  try {
7859
- for (m.s(); !(y = m.n()).done; ) {
7860
- var v = y.value;
7861
- if (!b.includes(v)) return !1;
7859
+ for (m.s(); !(v = m.n()).done; ) {
7860
+ var y = v.value;
7861
+ if (!b.includes(y)) return !1;
7862
7862
  }
7863
7863
  } catch (w) {
7864
7864
  m.e(w);
@@ -8520,7 +8520,7 @@ var jd = function() {
8520
8520
  if (fe(this._callState, "stopTranscription()"), l && ae(l) !== "object") throw new Error("stopTranscription Error: options must be object type");
8521
8521
  if (l && !l.instanceId) throw new Error('"instanceId" not provided');
8522
8522
  this.sendMessageToCallMachine(F({ action: "daily-method-stop-transcription" }, l));
8523
- } }, { key: "startDialOut", value: (v = W(function* (l) {
8523
+ } }, { key: "startDialOut", value: (y = W(function* (l) {
8524
8524
  var f = this;
8525
8525
  fe(this._callState, "startDialOut()");
8526
8526
  var p = function(M) {
@@ -8582,7 +8582,7 @@ var jd = function() {
8582
8582
  });
8583
8583
  });
8584
8584
  }), function(l) {
8585
- return v.apply(this, arguments);
8585
+ return y.apply(this, arguments);
8586
8586
  }) }, { key: "stopDialOut", value: function(l) {
8587
8587
  var f = this;
8588
8588
  return fe(this._callState, "stopDialOut()"), new Promise(function(p, S) {
@@ -8610,7 +8610,7 @@ var jd = function() {
8610
8610
  });
8611
8611
  }), function(l) {
8612
8612
  return b.apply(this, arguments);
8613
- }) }, { key: "sendDTMF", value: (y = W(function* (l) {
8613
+ }) }, { key: "sendDTMF", value: (v = W(function* (l) {
8614
8614
  var f = this;
8615
8615
  return fe(this._callState, "sendDTMF()"), function(p) {
8616
8616
  var S = p.sessionId, k = p.tones;
@@ -8625,7 +8625,7 @@ var jd = function() {
8625
8625
  });
8626
8626
  });
8627
8627
  }), function(l) {
8628
- return y.apply(this, arguments);
8628
+ return v.apply(this, arguments);
8629
8629
  }) }, { key: "getNetworkStats", value: function() {
8630
8630
  var l = this;
8631
8631
  return this._callState !== Lt ? Promise.resolve(F({ stats: { latest: {} } }, this._network)) : new Promise(function(f) {
@@ -9335,7 +9335,7 @@ var jd = function() {
9335
9335
  var l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : void 0;
9336
9336
  return l ? Mt[l] : Object.values(Mt)[0];
9337
9337
  } }]);
9338
- var e, t, n, i, o, s, a, c, u, d, h, g, y, b, m, v, w, x, C, D, P, R, B, re, se, me, $, j, H, X, N, U, Q, le, Z, Te, ve, $e;
9338
+ var e, t, n, i, o, s, a, c, u, d, h, g, v, b, m, y, w, x, C, D, P, R, B, re, se, me, $, j, H, X, N, U, Q, le, Z, Te, ve, $e;
9339
9339
  }();
9340
9340
  function As(r) {
9341
9341
  if (r.extension) {
@@ -9462,7 +9462,7 @@ function Qa(r) {
9462
9462
  case "audio":
9463
9463
  if (ae(o) !== "object") return !1;
9464
9464
  for (var h = 0, g = Object.entries(o); h < g.length; h++) {
9465
- var y = Ee(g[h], 2), b = y[0], m = y[1];
9465
+ var v = Ee(g[h], 2), b = v[0], m = v[1];
9466
9466
  switch (b) {
9467
9467
  case "processor":
9468
9468
  if (!Ud(m)) return !1;
@@ -9520,8 +9520,8 @@ function Hd(r) {
9520
9520
  } catch (b) {
9521
9521
  return console.error("failed to deduce blob content type", b), !1;
9522
9522
  }
9523
- var y = h.split(".").at(-1).toLowerCase().trim();
9524
- return Or.includes(y);
9523
+ var v = h.split(".").at(-1).toLowerCase().trim();
9524
+ return Or.includes(v);
9525
9525
  }(s.source) || (console.error("invalid image type; supported types: [".concat(Or.join(", "), "]")), !1);
9526
9526
  return a = s.source, c = Number(a), isNaN(c) || !Number.isInteger(c) || c <= 0 || c > 10 ? (console.error("invalid image selection; must be an int, > 0, <= ".concat(10)), !1) : (s.type = "daily-preselect", !0);
9527
9527
  var a, c;
@@ -9806,8 +9806,8 @@ class sn {
9806
9806
  let u, d, h;
9807
9807
  if (i === "music" || i === "voice") {
9808
9808
  const b = i === "voice" ? Rs : xt, m = Array(b.length).fill(o);
9809
- for (let v = 0; v < n.length; v++) {
9810
- const w = v * c, x = n[v];
9809
+ for (let y = 0; y < n.length; y++) {
9810
+ const w = y * c, x = n[y];
9811
9811
  for (let C = b.length - 1; C >= 0; C--) if (w > b[C]) {
9812
9812
  m[C] = Math.max(m[C], x);
9813
9813
  break;
@@ -9841,8 +9841,8 @@ class sn {
9841
9841
  const c = 1 / 60, u = n / i, d = (h) => {
9842
9842
  const g = c * h;
9843
9843
  g < u && o.suspend(g).then(() => {
9844
- const y = new Float32Array(a.frequencyBinCount);
9845
- a.getFloatFrequencyData(y), this.fftResults.push(y), d(h + 1);
9844
+ const v = new Float32Array(a.frequencyBinCount);
9845
+ a.getFloatFrequencyData(v), this.fftResults.push(v), d(h + 1);
9846
9846
  }), h === 1 ? o.startRendering() : o.resume();
9847
9847
  };
9848
9848
  s.start(0), d(1), this.audio = e, this.context = o, this.analyser = a, this.sampleRate = i, this.audioBuffer = t;
@@ -10726,20 +10726,20 @@ class th {
10726
10726
  const { event: d, id: h, data: g } = u.data;
10727
10727
  if (d === "receipt") this.eventReceipts[h] = g;
10728
10728
  else if (d === "chunk") {
10729
- const y = {
10729
+ const v = {
10730
10730
  raw: Ns(g.raw, i, this.sampleRate),
10731
10731
  mono: Ns(g.mono, i, this.sampleRate)
10732
10732
  };
10733
10733
  if (this._chunkProcessorSize) {
10734
10734
  const b = this._chunkProcessorBuffer;
10735
10735
  this._chunkProcessorBuffer = {
10736
- raw: Ge.mergeBuffers(b.raw, y.raw),
10737
- mono: Ge.mergeBuffers(b.mono, y.mono)
10736
+ raw: Ge.mergeBuffers(b.raw, v.raw),
10737
+ mono: Ge.mergeBuffers(b.mono, v.mono)
10738
10738
  }, this._chunkProcessorBuffer.mono.byteLength >= this._chunkProcessorSize && (this._chunkProcessor(this._chunkProcessorBuffer), this._chunkProcessorBuffer = {
10739
10739
  raw: new ArrayBuffer(0),
10740
10740
  mono: new ArrayBuffer(0)
10741
10741
  });
10742
- } else this._chunkProcessor(y);
10742
+ } else this._chunkProcessor(v);
10743
10743
  }
10744
10744
  };
10745
10745
  const a = o.connect(s), c = n.createAnalyser();
@@ -11003,17 +11003,17 @@ class ft extends ha {
11003
11003
  return this._daily.localScreenAudio() || this._daily.localScreenVideo();
11004
11004
  }
11005
11005
  tracks() {
11006
- var i, o, s, a, c, u, d, h, g, y, b, m, v, w, x, C;
11006
+ var i, o, s, a, c, u, d, h, g, v, b, m, y, w, x, C;
11007
11007
  const e = this._daily.participants() ?? {}, t = e == null ? void 0 : e[this._botId], n = {
11008
11008
  local: {
11009
11009
  audio: (s = (o = (i = e == null ? void 0 : e.local) == null ? void 0 : i.tracks) == null ? void 0 : o.audio) == null ? void 0 : s.persistentTrack,
11010
11010
  screenAudio: (u = (c = (a = e == null ? void 0 : e.local) == null ? void 0 : a.tracks) == null ? void 0 : c.screenAudio) == null ? void 0 : u.persistentTrack,
11011
11011
  screenVideo: (g = (h = (d = e == null ? void 0 : e.local) == null ? void 0 : d.tracks) == null ? void 0 : h.screenVideo) == null ? void 0 : g.persistentTrack,
11012
- video: (m = (b = (y = e == null ? void 0 : e.local) == null ? void 0 : y.tracks) == null ? void 0 : b.video) == null ? void 0 : m.persistentTrack
11012
+ video: (m = (b = (v = e == null ? void 0 : e.local) == null ? void 0 : v.tracks) == null ? void 0 : b.video) == null ? void 0 : m.persistentTrack
11013
11013
  }
11014
11014
  };
11015
11015
  return t && (n.bot = {
11016
- audio: (w = (v = t == null ? void 0 : t.tracks) == null ? void 0 : v.audio) == null ? void 0 : w.persistentTrack,
11016
+ audio: (w = (y = t == null ? void 0 : t.tracks) == null ? void 0 : y.audio) == null ? void 0 : w.persistentTrack,
11017
11017
  video: (C = (x = t == null ? void 0 : t.tracks) == null ? void 0 : x.video) == null ? void 0 : C.persistentTrack
11018
11018
  }), n;
11019
11019
  }
@@ -11031,11 +11031,11 @@ class ft extends ha {
11031
11031
  this._dailyFactoryOptions = e, await this._daily.preAuth(e);
11032
11032
  }
11033
11033
  async initDevices() {
11034
- var s, a, c, u, d, h, g, y, b, m, v, w;
11034
+ var s, a, c, u, d, h, g, v, b, m, y, w;
11035
11035
  if (!this._daily) throw new Le("Transport instance not initialized");
11036
11036
  this.state = "initializing";
11037
11037
  const e = await this._daily.startCamera(this._dailyFactoryOptions), { devices: t } = await this._daily.enumerateDevices(), n = t.filter((x) => x.kind === "videoinput"), i = t.filter((x) => x.kind === "audioinput"), o = t.filter((x) => x.kind === "audiooutput");
11038
- this._selectedCam = e.camera, this._selectedMic = e.mic, this._selectedSpeaker = e.speaker, (a = (s = this._callbacks).onAvailableCamsUpdated) == null || a.call(s, n), (u = (c = this._callbacks).onAvailableMicsUpdated) == null || u.call(c, i), (h = (d = this._callbacks).onAvailableSpeakersUpdated) == null || h.call(d, o), (y = (g = this._callbacks).onCamUpdated) == null || y.call(g, e.camera), (m = (b = this._callbacks).onMicUpdated) == null || m.call(b, e.mic), (w = (v = this._callbacks).onSpeakerUpdated) == null || w.call(v, e.speaker), this._daily.isLocalAudioLevelObserverRunning() || await this._daily.startLocalAudioLevelObserver(100), this._daily.isRemoteParticipantsAudioLevelObserverRunning() || await this._daily.startRemoteParticipantsAudioLevelObserver(100), this.state = "initialized";
11038
+ this._selectedCam = e.camera, this._selectedMic = e.mic, this._selectedSpeaker = e.speaker, (a = (s = this._callbacks).onAvailableCamsUpdated) == null || a.call(s, n), (u = (c = this._callbacks).onAvailableMicsUpdated) == null || u.call(c, i), (h = (d = this._callbacks).onAvailableSpeakersUpdated) == null || h.call(d, o), (v = (g = this._callbacks).onCamUpdated) == null || v.call(g, e.camera), (m = (b = this._callbacks).onMicUpdated) == null || m.call(b, e.mic), (w = (y = this._callbacks).onSpeakerUpdated) == null || w.call(y, e.speaker), this._daily.isLocalAudioLevelObserverRunning() || await this._daily.startLocalAudioLevelObserver(100), this._daily.isRemoteParticipantsAudioLevelObserverRunning() || await this._daily.startRemoteParticipantsAudioLevelObserver(100), this.state = "initialized";
11039
11039
  }
11040
11040
  _validateConnectionParams(e) {
11041
11041
  if (e == null) return;
@@ -11320,7 +11320,7 @@ const Ot = (r) => ({
11320
11320
  nudgeAutoHideDelay: u,
11321
11321
  nudgeAutoShow: d = !0
11322
11322
  }) => {
11323
- const h = i || o, [g, y] = Ue(!1), [b, m] = Ue(!1), [v, w] = Ue(!1), x = wn(null), C = We(() => {
11323
+ const h = i || o, [g, v] = Ue(!1), [b, m] = Ue(!1), [y, w] = Ue(!1), x = wn(null), C = We(() => {
11324
11324
  try {
11325
11325
  const N = localStorage.getItem(Dt);
11326
11326
  if (!N) return !0;
@@ -11364,9 +11364,9 @@ const Ot = (r) => ({
11364
11364
  }, console.log("[Floe] Nudge sound played"), sessionStorage.setItem(Bs, "true");
11365
11365
  } catch {
11366
11366
  }
11367
- }, []), re = a !== void 0 ? a : b && !v && !r;
11367
+ }, []), re = a !== void 0 ? a : b && !y && !r;
11368
11368
  Ye(() => {
11369
- if (a === void 0 && d && h && !r && !v) {
11369
+ if (a === void 0 && d && h && !r && !y) {
11370
11370
  if (!C()) return;
11371
11371
  const N = setTimeout(() => {
11372
11372
  m(!0), D(), B();
@@ -11378,7 +11378,7 @@ const Ot = (r) => ({
11378
11378
  clearTimeout(N), Q && clearTimeout(Q);
11379
11379
  };
11380
11380
  }
11381
- }, [h, r, v, C, D, P, B, a, d, u]);
11381
+ }, [h, r, y, C, D, P, B, a, d, u]);
11382
11382
  const se = We(() => {
11383
11383
  m(!1), w(!0), P(), c == null || c();
11384
11384
  }, [P, c]), me = We(() => {
@@ -11440,8 +11440,8 @@ const Ot = (r) => ({
11440
11440
  "aria-label": h ? i ? "Welcome back - Start Floe" : "Start Floe" : "Expand Floe",
11441
11441
  onClick: $,
11442
11442
  onKeyDown: j,
11443
- onMouseEnter: () => y(!0),
11444
- onMouseLeave: () => y(!1),
11443
+ onMouseEnter: () => v(!0),
11444
+ onMouseLeave: () => v(!1),
11445
11445
  style: {
11446
11446
  position: "relative",
11447
11447
  width: `${X}px`,
@@ -11509,16 +11509,16 @@ const Ot = (r) => ({
11509
11509
  const a = Math.ceil(n / 2), [c, u] = Ue(Array(a).fill(0.15)), d = wn(), h = wn(Array(a).fill(0.15));
11510
11510
  Ye(() => {
11511
11511
  if (s && s.length > 0 && r) {
11512
- const b = Array(a).fill(0).map((m, v) => {
11512
+ const b = Array(a).fill(0).map((m, y) => {
11513
11513
  let w = 0;
11514
- if (v === 0)
11514
+ if (y === 0)
11515
11515
  w = s.reduce((C, D) => C + D, 0) / s.length, w = Math.pow(w, 0.7) * 1.3;
11516
11516
  else {
11517
- const x = Math.floor(s.length / (a - 1)), C = (v - 1) * x, D = Math.min(C + x, s.length);
11517
+ const x = Math.floor(s.length / (a - 1)), C = (y - 1) * x, D = Math.min(C + x, s.length);
11518
11518
  let P = 0, R = 0;
11519
11519
  for (let B = C; B < D; B++)
11520
11520
  P += s[B], R++;
11521
- w = R > 0 ? P / R : 0, w = w * (1 - v * 0.08);
11521
+ w = R > 0 ? P / R : 0, w = w * (1 - y * 0.08);
11522
11522
  }
11523
11523
  return Math.max(0.15, Math.min(1, 0.15 + w * 0.85));
11524
11524
  });
@@ -11526,9 +11526,9 @@ const Ot = (r) => ({
11526
11526
  } else r || (h.current = Array(a).fill(0.15));
11527
11527
  }, [s, r, a]), Ye(() => {
11528
11528
  const b = () => {
11529
- u((m) => m.map((v, w) => {
11529
+ u((m) => m.map((y, w) => {
11530
11530
  const x = h.current[w] || 0.15, C = r ? 0.35 : 0.15;
11531
- return v + (x - v) * C;
11531
+ return y + (x - y) * C;
11532
11532
  })), d.current = requestAnimationFrame(b);
11533
11533
  };
11534
11534
  return d.current = requestAnimationFrame(b), () => {
@@ -11543,7 +11543,7 @@ const Ot = (r) => ({
11543
11543
  for (let m = 1; m < a; m++)
11544
11544
  b.push(c[m]);
11545
11545
  return b;
11546
- }, [c, a]), y = g.length * i + (g.length - 1) * o;
11546
+ }, [c, a]), v = g.length * i + (g.length - 1) * o;
11547
11547
  return /* @__PURE__ */ T(
11548
11548
  "div",
11549
11549
  {
@@ -11552,11 +11552,11 @@ const Ot = (r) => ({
11552
11552
  alignItems: "center",
11553
11553
  justifyContent: "center",
11554
11554
  height: `${t}px`,
11555
- width: `${y}px`,
11555
+ width: `${v}px`,
11556
11556
  gap: `${o}px`
11557
11557
  },
11558
11558
  children: g.map((b, m) => {
11559
- const v = m === Math.floor(g.length / 2), w = Math.max(4, t * b * (v ? 1.1 : 1));
11559
+ const y = m === Math.floor(g.length / 2), w = Math.max(4, t * b * (y ? 1.1 : 1));
11560
11560
  return /* @__PURE__ */ T(
11561
11561
  "div",
11562
11562
  {
@@ -11590,10 +11590,10 @@ const Ot = (r) => ({
11590
11590
  onToggleConnection: d,
11591
11591
  onToggleMute: h,
11592
11592
  onToggleScreenShare: g,
11593
- onMinimize: y,
11593
+ onMinimize: v,
11594
11594
  onResume: b,
11595
11595
  onStop: m,
11596
- connectionProgress: v,
11596
+ connectionProgress: y,
11597
11597
  textModeEnabled: w = !1,
11598
11598
  onToggleTextMode: x,
11599
11599
  onSendText: C,
@@ -11615,7 +11615,7 @@ const Ot = (r) => ({
11615
11615
  N || !se.trim() || !C || (C(se.trim()), me(""), (Z = R.current) == null || Z.focus());
11616
11616
  }, Q = () => {
11617
11617
  if (e === "connecting")
11618
- return (v == null ? void 0 : v.message) || "Connecting...";
11618
+ return (y == null ? void 0 : y.message) || "Connecting...";
11619
11619
  if (w && t)
11620
11620
  switch (e) {
11621
11621
  case "listening":
@@ -11881,7 +11881,7 @@ const Ot = (r) => ({
11881
11881
  /* @__PURE__ */ T(
11882
11882
  pn,
11883
11883
  {
11884
- onClick: y,
11884
+ onClick: v,
11885
11885
  tooltip: "Minimize",
11886
11886
  ariaLabel: "Minimize panel",
11887
11887
  children: /* @__PURE__ */ T("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ T("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) })
@@ -11965,7 +11965,7 @@ const Ot = (r) => ({
11965
11965
  }
11966
11966
  );
11967
11967
  })(),
11968
- e === "connecting" && v && /* @__PURE__ */ G(
11968
+ e === "connecting" && y && /* @__PURE__ */ G(
11969
11969
  "div",
11970
11970
  {
11971
11971
  style: {
@@ -11991,12 +11991,12 @@ const Ot = (r) => ({
11991
11991
  }
11992
11992
  ),
11993
11993
  /* @__PURE__ */ G("div", { style: { display: "flex", flexDirection: "column", gap: "3px", flex: 1 }, children: [
11994
- /* @__PURE__ */ T("span", { style: { fontSize: "12px", fontWeight: "600", color: "rgba(255, 255, 255, 0.9)" }, children: v.message }),
11994
+ /* @__PURE__ */ T("span", { style: { fontSize: "12px", fontWeight: "600", color: "rgba(255, 255, 255, 0.9)" }, children: y.message }),
11995
11995
  /* @__PURE__ */ T("div", { style: { width: "100%", height: "2px", background: "rgba(255, 255, 255, 0.1)", borderRadius: "2px", overflow: "hidden" }, children: /* @__PURE__ */ T(
11996
11996
  "div",
11997
11997
  {
11998
11998
  style: {
11999
- width: `${v.progress}%`,
11999
+ width: `${y.progress}%`,
12000
12000
  height: "100%",
12001
12001
  background: "linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%)",
12002
12002
  borderRadius: "2px",
@@ -12234,7 +12234,7 @@ const Ot = (r) => ({
12234
12234
  barCount: 7,
12235
12235
  audioLevels: u
12236
12236
  }
12237
- ) : e === "connecting" && v ? /* @__PURE__ */ G("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
12237
+ ) : e === "connecting" && y ? /* @__PURE__ */ G("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
12238
12238
  /* @__PURE__ */ T(
12239
12239
  "div",
12240
12240
  {
@@ -12249,7 +12249,7 @@ const Ot = (r) => ({
12249
12249
  }
12250
12250
  }
12251
12251
  ),
12252
- /* @__PURE__ */ T("span", { style: { fontSize: "12px", color: "#fbbf24", fontWeight: "500" }, children: v.message })
12252
+ /* @__PURE__ */ T("span", { style: { fontSize: "12px", color: "#fbbf24", fontWeight: "500" }, children: y.message })
12253
12253
  ] }) : /* @__PURE__ */ G("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
12254
12254
  !n && t && e !== "speaking" && /* @__PURE__ */ G(
12255
12255
  "svg",
@@ -12573,10 +12573,10 @@ const Ot = (r) => ({
12573
12573
  onToggleMute: d,
12574
12574
  onToggleScreenShare: h,
12575
12575
  transcriptHistory: g = [],
12576
- onResume: y,
12576
+ onResume: v,
12577
12577
  pausedSessionId: b,
12578
12578
  onStop: m,
12579
- connectionProgress: v,
12579
+ connectionProgress: y,
12580
12580
  isReturningUser: w = !1,
12581
12581
  hasSkippedOnboarding: x = !1,
12582
12582
  onMinimize: C,
@@ -12650,9 +12650,9 @@ const Ot = (r) => ({
12650
12650
  onToggleMute: d,
12651
12651
  onToggleScreenShare: h,
12652
12652
  onMinimize: Z,
12653
- onResume: y,
12653
+ onResume: v,
12654
12654
  onStop: m,
12655
- connectionProgress: v,
12655
+ connectionProgress: y,
12656
12656
  textModeEnabled: P,
12657
12657
  onToggleTextMode: R,
12658
12658
  onSendText: B,
@@ -12830,9 +12830,9 @@ const Ot = (r) => ({
12830
12830
  for (const h of d) {
12831
12831
  if (t.has(h)) continue;
12832
12832
  let g = !1;
12833
- for (const y of n)
12834
- if (h.contains(y) && h !== y) {
12835
- const b = c(h), m = c(y);
12833
+ for (const v of n)
12834
+ if (h.contains(v) && h !== v) {
12835
+ const b = c(h), m = c(v);
12836
12836
  if (b === "card" || b === "listitem" || b === "option") {
12837
12837
  if (!u(h)) {
12838
12838
  g = !0;
@@ -12844,9 +12844,9 @@ const Ot = (r) => ({
12844
12844
  }
12845
12845
  }
12846
12846
  if (!g) {
12847
- for (const y of n)
12848
- if (y.contains(h) && y !== h) {
12849
- const b = u(h), m = u(y);
12847
+ for (const v of n)
12848
+ if (v.contains(h) && v !== h) {
12849
+ const b = u(h), m = u(v);
12850
12850
  if (!b || b === m) {
12851
12851
  g = !0;
12852
12852
  break;
@@ -12903,7 +12903,7 @@ const Ot = (r) => ({
12903
12903
  // Accessible Name Computation (W3C accname algorithm - simplified)
12904
12904
  // -------------------------------------------------------------------------
12905
12905
  computeAccessibleName(e) {
12906
- var h, g, y, b, m, v;
12906
+ var h, g, v, b, m, y;
12907
12907
  const t = e.getAttribute("aria-labelledby");
12908
12908
  if (t) {
12909
12909
  const w = t.split(/\s+/).map((x) => {
@@ -12930,9 +12930,9 @@ const Ot = (r) => ({
12930
12930
  if (s) return s;
12931
12931
  const a = e.querySelector("svg");
12932
12932
  if (a) {
12933
- const w = (b = (y = a.querySelector("title")) == null ? void 0 : y.textContent) == null ? void 0 : b.trim();
12933
+ const w = (b = (v = a.querySelector("title")) == null ? void 0 : v.textContent) == null ? void 0 : b.trim();
12934
12934
  if (w) return w.slice(0, 100);
12935
- const x = (v = (m = a.querySelector("desc")) == null ? void 0 : m.textContent) == null ? void 0 : v.trim();
12935
+ const x = (y = (m = a.querySelector("desc")) == null ? void 0 : m.textContent) == null ? void 0 : y.trim();
12936
12936
  if (x) return x.slice(0, 100);
12937
12937
  }
12938
12938
  const c = e.getAttribute("data-tooltip") || e.getAttribute("data-tip") || e.getAttribute("data-original-title");
@@ -13151,39 +13151,39 @@ const Ot = (r) => ({
13151
13151
  // Context Detection
13152
13152
  // -------------------------------------------------------------------------
13153
13153
  findContext(e) {
13154
- var c, u, d, h, g, y, b, m;
13154
+ var c, u, d, h, g, v, b, m;
13155
13155
  const t = e.getAttribute("aria-describedby");
13156
13156
  if (t) {
13157
- const v = document.getElementById(t);
13158
- if (v) return ((c = v.textContent) == null ? void 0 : c.trim().slice(0, 50)) || null;
13157
+ const y = document.getElementById(t);
13158
+ if (y) return ((c = y.textContent) == null ? void 0 : c.trim().slice(0, 50)) || null;
13159
13159
  }
13160
13160
  const n = e.closest("fieldset");
13161
13161
  if (n) {
13162
- const v = n.querySelector("legend");
13163
- if (v) return ((u = v.textContent) == null ? void 0 : u.trim().slice(0, 50)) || null;
13162
+ const y = n.querySelector("legend");
13163
+ if (y) return ((u = y.textContent) == null ? void 0 : u.trim().slice(0, 50)) || null;
13164
13164
  }
13165
13165
  const i = e.closest('[class*="form-group"], [class*="FormGroup"], [class*="field"]');
13166
13166
  if (i) {
13167
- const v = i.querySelector(":scope > label, :scope > .label");
13168
- if (v && !v.contains(e))
13169
- return ((d = v.textContent) == null ? void 0 : d.trim().slice(0, 50)) || null;
13167
+ const y = i.querySelector(":scope > label, :scope > .label");
13168
+ if (y && !y.contains(e))
13169
+ return ((d = y.textContent) == null ? void 0 : d.trim().slice(0, 50)) || null;
13170
13170
  }
13171
13171
  const o = e.closest('section, [role="region"], form, [class*="section"], [class*="Section"]');
13172
13172
  if (o) {
13173
- const v = o.querySelector(':scope > h1, :scope > h2, :scope > h3, :scope > h4, :scope > h5, :scope > h6, :scope > [role="heading"]');
13174
- if (v) return ((h = v.textContent) == null ? void 0 : h.trim().slice(0, 50)) || null;
13173
+ const y = o.querySelector(':scope > h1, :scope > h2, :scope > h3, :scope > h4, :scope > h5, :scope > h6, :scope > [role="heading"]');
13174
+ if (y) return ((h = y.textContent) == null ? void 0 : h.trim().slice(0, 50)) || null;
13175
13175
  const w = o.querySelector(':scope > [class*="title"], :scope > [class*="Title"], :scope > [class*="header"] > *');
13176
13176
  if (w) return ((g = w.textContent) == null ? void 0 : g.trim().slice(0, 50)) || null;
13177
13177
  }
13178
13178
  const s = e.previousElementSibling;
13179
13179
  if (s && s.matches('p, label, h1, h2, h3, h4, h5, h6, [class*="label"], [class*="Label"]')) {
13180
- const v = (y = s.textContent) == null ? void 0 : y.trim();
13181
- if (v && v.length < 50) return v;
13180
+ const y = (v = s.textContent) == null ? void 0 : v.trim();
13181
+ if (y && y.length < 50) return y;
13182
13182
  }
13183
13183
  const a = (b = e.parentElement) == null ? void 0 : b.previousElementSibling;
13184
13184
  if (a && a.matches('p, label, [class*="label"], [class*="Label"]')) {
13185
- const v = (m = a.textContent) == null ? void 0 : m.trim();
13186
- if (v && v.length < 50) return v;
13185
+ const y = (m = a.textContent) == null ? void 0 : m.trim();
13186
+ if (y && y.length < 50) return y;
13187
13187
  }
13188
13188
  return null;
13189
13189
  }
@@ -13509,7 +13509,7 @@ function uh(r) {
13509
13509
  return !1;
13510
13510
  }
13511
13511
  function dc(r, e = {}) {
13512
- var g, y, b, m, v;
13512
+ var g, v, b, m, y;
13513
13513
  const {
13514
13514
  focus: t = !0,
13515
13515
  includePointerEvents: n = !0,
@@ -13532,7 +13532,7 @@ function dc(r, e = {}) {
13532
13532
  ), console.warn(
13533
13533
  "[humanLikeClick] Expected target:",
13534
13534
  r.tagName,
13535
- (y = r.className) == null ? void 0 : y.toString().slice(0, 50)
13535
+ (v = r.className) == null ? void 0 : v.toString().slice(0, 50)
13536
13536
  ), uh(u)) {
13537
13537
  const w = `${u.tagName} (${(b = u.className) == null ? void 0 : b.toString().slice(0, 80)})`;
13538
13538
  throw console.error(
@@ -13540,7 +13540,7 @@ function dc(r, e = {}) {
13540
13540
  `Overlay: ${w}`,
13541
13541
  `Target: ${r.tagName} "${(m = r.textContent) == null ? void 0 : m.trim().slice(0, 50)}"`
13542
13542
  ), new Error(
13543
- `Click blocked by modal overlay: ${w}. Target "${(v = r.textContent) == null ? void 0 : v.trim().slice(0, 50)}" is behind the modal. Interact with the modal instead.`
13543
+ `Click blocked by modal overlay: ${w}. Target "${(y = r.textContent) == null ? void 0 : y.trim().slice(0, 50)}" is behind the modal. Interact with the modal instead.`
13544
13544
  );
13545
13545
  }
13546
13546
  d = r;
@@ -13749,8 +13749,8 @@ class hh {
13749
13749
  */
13750
13750
  computeSnapshotHash(e) {
13751
13751
  const t = e.elements.length, n = e.interactiveCount || 0, i = 30, o = e.elements.slice(0, i), s = Math.max(0, Math.floor(t / 2) - Math.floor(i / 2)), a = e.elements.slice(s, s + i), c = e.elements.slice(-i), u = (h) => h.map((g) => {
13752
- var y;
13753
- return `${g.tag}:${(y = g.text) == null ? void 0 : y.slice(0, 20)}:${Math.round(g.rect.x)}:${Math.round(g.rect.y)}`;
13752
+ var v;
13753
+ return `${g.tag}:${(v = g.text) == null ? void 0 : v.slice(0, 20)}:${Math.round(g.rect.x)}:${Math.round(g.rect.y)}`;
13754
13754
  }).join("|");
13755
13755
  return `count:${t}:${n}|` + u(o) + "||" + u(a) + "||" + u(c);
13756
13756
  }
@@ -13872,15 +13872,15 @@ class hh {
13872
13872
  var m;
13873
13873
  const u = c;
13874
13874
  if (this.shouldSkipElement(u)) return;
13875
- const d = u.getBoundingClientRect(), h = Math.abs(d.x - e.x) <= 10, g = Math.abs(d.y - e.y) <= 10, y = Math.abs(d.width - e.width) <= 10 * 2, b = Math.abs(d.height - e.height) <= 10 * 2;
13876
- if (h && g && y && b) {
13877
- let v = 100, w = !1;
13878
- if (t && u.tagName.toLowerCase() === t.toLowerCase() && (v += 30), n) {
13875
+ const d = u.getBoundingClientRect(), h = Math.abs(d.x - e.x) <= 10, g = Math.abs(d.y - e.y) <= 10, v = Math.abs(d.width - e.width) <= 10 * 2, b = Math.abs(d.height - e.height) <= 10 * 2;
13876
+ if (h && g && v && b) {
13877
+ let y = 100, w = !1;
13878
+ if (t && u.tagName.toLowerCase() === t.toLowerCase() && (y += 30), n) {
13879
13879
  const x = ((m = u.innerText) == null ? void 0 : m.trim().toLowerCase()) || "", C = n.toLowerCase();
13880
- x.length === 0 ? w = !1 : x === C ? (v += 50, w = !0) : (x.includes(C) || C.includes(x)) && (v += 25, w = !0);
13880
+ x.length === 0 ? w = !1 : x === C ? (y += 50, w = !0) : (x.includes(C) || C.includes(x)) && (y += 25, w = !0);
13881
13881
  } else
13882
13882
  w = !0;
13883
- o.push({ element: u, score: v, textMatch: w });
13883
+ o.push({ element: u, score: y, textMatch: w });
13884
13884
  }
13885
13885
  }), o.sort((c, u) => u.score - c.score), o.length > 0) {
13886
13886
  const c = o[0], u = ((a = c.element.innerText) == null ? void 0 : a.trim().slice(0, 50)) || "";
@@ -13992,21 +13992,21 @@ function xn(r, e) {
13992
13992
  if (!e(u) || u.getBoundingClientRect().height < 20) continue;
13993
13993
  const h = c.querySelectorAll(gh);
13994
13994
  for (const g of h) {
13995
- const y = g, b = y.className || "";
13995
+ const v = g, b = v.className || "";
13996
13996
  if (b.toLowerCase().includes("singlevalue") || b.toLowerCase().includes("placeholder"))
13997
13997
  continue;
13998
- const m = y.getBoundingClientRect();
13998
+ const m = v.getBoundingClientRect();
13999
13999
  if (m.height === 0 || m.width === 0) continue;
14000
- const v = ((o = y.textContent) == null ? void 0 : o.trim().toLowerCase()) || "";
14001
- if (v === t) {
14002
- console.log(`[DropdownHelpers] Found EXACT match for option: "${r}"`), n = y;
14000
+ const y = ((o = v.textContent) == null ? void 0 : o.trim().toLowerCase()) || "";
14001
+ if (y === t) {
14002
+ console.log(`[DropdownHelpers] Found EXACT match for option: "${r}"`), n = v;
14003
14003
  break;
14004
14004
  }
14005
- if (!i && v.includes(t)) {
14006
- const w = t.length / v.length;
14005
+ if (!i && y.includes(t)) {
14006
+ const w = t.length / y.length;
14007
14007
  w > 0.7 && (console.log(
14008
- `[DropdownHelpers] Found partial match (${(w * 100).toFixed(0)}%): "${v.slice(0, 50)}"`
14009
- ), i = y);
14008
+ `[DropdownHelpers] Found partial match (${(w * 100).toFixed(0)}%): "${y.slice(0, 50)}"`
14009
+ ), i = v);
14010
14010
  }
14011
14011
  }
14012
14012
  if (n) break;
@@ -14135,8 +14135,8 @@ const St = class St {
14135
14135
  console.log(`[HybridTargetResolver] 🔄 Running ${n.length} strategies in parallel...`);
14136
14136
  const i = /* @__PURE__ */ new Map();
14137
14137
  for (const g of n) {
14138
- const y = this.executeStrategyMulti(g, e);
14139
- for (const b of y)
14138
+ const v = this.executeStrategyMulti(g, e);
14139
+ for (const b of v)
14140
14140
  Re(b) || b.isConnected && (i.has(b) ? i.get(b).strategies.push(g) : i.set(b, {
14141
14141
  element: b,
14142
14142
  strategies: [g],
@@ -14155,12 +14155,12 @@ const St = class St {
14155
14155
  duration: performance.now() - t
14156
14156
  };
14157
14157
  const o = [];
14158
- for (const [g, y] of i) {
14158
+ for (const [g, v] of i) {
14159
14159
  if (!g.isConnected) {
14160
14160
  console.warn("[HybridTargetResolver] ⚠️ Candidate element was removed from DOM, skipping");
14161
14161
  continue;
14162
14162
  }
14163
- y.validationScore = this.computeValidationScore(g, e), y.interactable = this.checkInteractability(g).ok, y.confidence = this.computeConfidence(y, n.length, e), o.push(y), console.log(`[HybridTargetResolver] <${g.tagName.toLowerCase()}> "${(h = g.textContent) == null ? void 0 : h.slice(0, 25)}..."`), console.log(`[HybridTargetResolver] Strategies: ${y.strategies.join(", ")} (${y.strategies.length}/${n.length})`), console.log(`[HybridTargetResolver] Confidence: ${y.confidence.toFixed(1)}%`);
14163
+ v.validationScore = this.computeValidationScore(g, e), v.interactable = this.checkInteractability(g).ok, v.confidence = this.computeConfidence(v, n.length, e), o.push(v), console.log(`[HybridTargetResolver] <${g.tagName.toLowerCase()}> "${(h = g.textContent) == null ? void 0 : h.slice(0, 25)}..."`), console.log(`[HybridTargetResolver] Strategies: ${v.strategies.join(", ")} (${v.strategies.length}/${n.length})`), console.log(`[HybridTargetResolver] Confidence: ${v.confidence.toFixed(1)}%`);
14164
14164
  }
14165
14165
  if (o.length === 0)
14166
14166
  return {
@@ -14171,7 +14171,7 @@ const St = class St {
14171
14171
  ambiguous: !1,
14172
14172
  duration: performance.now() - t
14173
14173
  };
14174
- o.sort((g, y) => y.confidence - g.confidence);
14174
+ o.sort((g, v) => v.confidence - g.confidence);
14175
14175
  const s = o[0], a = o.length > 1 ? o[1] : void 0, c = performance.now() - t, u = a !== void 0 && s.confidence - a.confidence < 10;
14176
14176
  if (u && console.warn("[HybridTargetResolver] ⚠️ AMBIGUOUS: Top candidates have similar confidence"), s.confidence < 30)
14177
14177
  return console.warn(`[HybridTargetResolver] ❌ Best candidate confidence too low: ${s.confidence.toFixed(1)}%`), {
@@ -14183,7 +14183,7 @@ const St = class St {
14183
14183
  duration: c
14184
14184
  };
14185
14185
  if (!s.interactable) {
14186
- const g = o.find((y) => y.interactable);
14186
+ const g = o.find((v) => v.interactable);
14187
14187
  if (g && g.confidence > 30)
14188
14188
  return console.log(`[HybridTargetResolver] ✅ Using interactable candidate (${g.confidence.toFixed(1)}%)`), {
14189
14189
  element: this.getClickableContainer(g.element),
@@ -14310,7 +14310,7 @@ const St = class St {
14310
14310
  * Find all elements matching text (not just first)
14311
14311
  */
14312
14312
  static findAllByText(e, t) {
14313
- var y, b;
14313
+ var v, b;
14314
14314
  const n = [], i = /* @__PURE__ */ new Set();
14315
14315
  if (!e) return n;
14316
14316
  const o = e.trim();
@@ -14324,8 +14324,8 @@ const St = class St {
14324
14324
  XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
14325
14325
  null
14326
14326
  );
14327
- for (let v = 0; v < m.snapshotLength; v++) {
14328
- const w = m.snapshotItem(v);
14327
+ for (let y = 0; y < m.snapshotLength; y++) {
14328
+ const w = m.snapshotItem(y);
14329
14329
  w && !this.isDropdownDisplayValue(w) && !i.has(w) && (n.push(w), i.add(w));
14330
14330
  }
14331
14331
  } catch {
@@ -14339,8 +14339,8 @@ const St = class St {
14339
14339
  XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
14340
14340
  null
14341
14341
  );
14342
- for (let v = 0; v < m.snapshotLength; v++) {
14343
- const w = m.snapshotItem(v);
14342
+ for (let y = 0; y < m.snapshotLength; y++) {
14343
+ const w = m.snapshotItem(y);
14344
14344
  w && !this.isDropdownDisplayValue(w) && !i.has(w) && (n.push(w), i.add(w));
14345
14345
  }
14346
14346
  } catch {
@@ -14348,18 +14348,18 @@ const St = class St {
14348
14348
  const d = [];
14349
14349
  for (const m of n)
14350
14350
  if (!this.isInteractiveElement(m)) {
14351
- const v = this.findNearbyInput(m);
14352
- v && !i.has(v) && (console.log(`[HybridTargetResolver] → Found nearby input for label "${(y = m.textContent) == null ? void 0 : y.trim().substring(0, 30)}": <${v.tagName.toLowerCase()}>`), d.push(v), i.add(v));
14351
+ const y = this.findNearbyInput(m);
14352
+ y && !i.has(y) && (console.log(`[HybridTargetResolver] → Found nearby input for label "${(v = m.textContent) == null ? void 0 : v.trim().substring(0, 30)}": <${y.tagName.toLowerCase()}>`), d.push(y), i.add(y));
14353
14353
  }
14354
14354
  n.push(...d);
14355
14355
  const h = o.toLowerCase(), g = document.querySelectorAll("input, textarea");
14356
14356
  for (const m of g) {
14357
- const v = m;
14358
- if (Re(v) || i.has(v)) continue;
14359
- const w = ((b = v.getAttribute("placeholder")) == null ? void 0 : b.trim().toLowerCase()) || "";
14357
+ const y = m;
14358
+ if (Re(y) || i.has(y)) continue;
14359
+ const w = ((b = y.getAttribute("placeholder")) == null ? void 0 : b.trim().toLowerCase()) || "";
14360
14360
  if (w === h || w && w.includes(h) && h.length / w.length > 0.6) {
14361
- const x = v.getBoundingClientRect();
14362
- x.width > 0 && x.height > 0 && (n.push(v), i.add(v));
14361
+ const x = y.getBoundingClientRect();
14362
+ x.width > 0 && x.height > 0 && (n.push(y), i.add(y));
14363
14363
  }
14364
14364
  }
14365
14365
  return n;
@@ -14443,28 +14443,28 @@ const St = class St {
14443
14443
  else if (g)
14444
14444
  o = !0;
14445
14445
  else {
14446
- const y = e.tagName.toLowerCase(), b = typeof e.className == "string" ? e.className : "";
14447
- y === "div" || y === "span" || e.classList.contains("container") || b.includes("control") || b.includes("wrapper") ? n += 10 : s = !0;
14446
+ const v = e.tagName.toLowerCase(), b = typeof e.className == "string" ? e.className : "";
14447
+ v === "div" || v === "span" || e.classList.contains("container") || b.includes("control") || b.includes("wrapper") ? n += 10 : s = !0;
14448
14448
  }
14449
14449
  }
14450
14450
  if (t.role === "combobox" && e.querySelector('[role="combobox"]') && (n += 10, i += 10), t.tag) {
14451
14451
  i += 15;
14452
- const g = e.tagName.toLowerCase(), y = t.tag.toLowerCase();
14453
- g === y ? n += 15 : t.role === "combobox" && (g === "input" || g === "div") && (n += 10);
14452
+ const g = e.tagName.toLowerCase(), v = t.tag.toLowerCase();
14453
+ g === v ? n += 15 : t.role === "combobox" && (g === "input" || g === "div") && (n += 10);
14454
14454
  }
14455
14455
  if (t.text && !t.optionText) {
14456
14456
  i += 20;
14457
- const g = (e.textContent || "").toLowerCase().trim(), y = t.text.toLowerCase().trim();
14457
+ const g = (e.textContent || "").toLowerCase().trim(), v = t.text.toLowerCase().trim();
14458
14458
  if (t.role === "combobox" && e.tagName.toLowerCase() === "input") {
14459
- const b = (u = e.closest('.css-6lmz24, [class*="value-container"], [class*="placeholder"]')) == null ? void 0 : u.parentElement, m = b == null ? void 0 : b.querySelector('[class*="placeholder"], [id*="placeholder"]'), v = ((d = m == null ? void 0 : m.textContent) == null ? void 0 : d.toLowerCase().trim()) || "";
14460
- (v === y || v.includes(y)) && (n += 20);
14461
- } else if (g === y)
14459
+ const b = (u = e.closest('.css-6lmz24, [class*="value-container"], [class*="placeholder"]')) == null ? void 0 : u.parentElement, m = b == null ? void 0 : b.querySelector('[class*="placeholder"], [id*="placeholder"]'), y = ((d = m == null ? void 0 : m.textContent) == null ? void 0 : d.toLowerCase().trim()) || "";
14460
+ (y === v || y.includes(v)) && (n += 20);
14461
+ } else if (g === v)
14462
14462
  n += 20;
14463
- else if (g.includes(y)) {
14464
- const b = y.length / g.length;
14465
- b > 0.8 ? n += 15 : b > 0.5 ? n += 8 : (new RegExp(`\\b${St.escapeRegex(y)}\\b`, "i").test(g) ? n += 2 : n += 0, console.log(`[HybridTargetResolver] Text length mismatch: "${y}" (${y.length}) in "${g.slice(0, 30)}..." (${g.length}), ratio=${b.toFixed(2)}, points=${n}`));
14466
- } else if (y.includes(g)) {
14467
- const b = g.length / y.length;
14463
+ else if (g.includes(v)) {
14464
+ const b = v.length / g.length;
14465
+ b > 0.8 ? n += 15 : b > 0.5 ? n += 8 : (new RegExp(`\\b${St.escapeRegex(v)}\\b`, "i").test(g) ? n += 2 : n += 0, console.log(`[HybridTargetResolver] Text length mismatch: "${v}" (${v.length}) in "${g.slice(0, 30)}..." (${g.length}), ratio=${b.toFixed(2)}, points=${n}`));
14466
+ } else if (v.includes(g)) {
14467
+ const b = g.length / v.length;
14468
14468
  n += Math.round(15 * b);
14469
14469
  }
14470
14470
  }
@@ -14475,39 +14475,39 @@ const St = class St {
14475
14475
  }
14476
14476
  if (t.placeholder) {
14477
14477
  i += 15;
14478
- const g = e.placeholder || "", y = t.placeholder.toLowerCase();
14479
- if (g.toLowerCase().includes(y))
14478
+ const g = e.placeholder || "", v = t.placeholder.toLowerCase();
14479
+ if (g.toLowerCase().includes(v))
14480
14480
  n += 15;
14481
14481
  else if (t.role === "combobox") {
14482
14482
  const b = e.closest('[class*="container"]') || e.parentElement, m = b == null ? void 0 : b.querySelector('[class*="placeholder"], [id*="placeholder"]');
14483
- (((h = m == null ? void 0 : m.textContent) == null ? void 0 : h.toLowerCase().trim()) || "").includes(y) && (n += 15);
14483
+ (((h = m == null ? void 0 : m.textContent) == null ? void 0 : h.toLowerCase().trim()) || "").includes(v) && (n += 15);
14484
14484
  }
14485
14485
  }
14486
14486
  if (t.labelText) {
14487
14487
  i += 20;
14488
14488
  const g = this.getAssociatedLabelText(e);
14489
14489
  if (g) {
14490
- const y = g.toLowerCase().trim().replace(/\*$/, "").trim(), b = t.labelText.toLowerCase().trim().replace(/\*$/, "").trim();
14491
- y === b ? n += 20 : (y.includes(b) || b.includes(y)) && (n += 15);
14490
+ const v = g.toLowerCase().trim().replace(/\*$/, "").trim(), b = t.labelText.toLowerCase().trim().replace(/\*$/, "").trim();
14491
+ v === b ? n += 20 : (v.includes(b) || b.includes(v)) && (n += 15);
14492
14492
  }
14493
14493
  }
14494
14494
  if (t.optionText) {
14495
14495
  i += 15;
14496
- const y = (e.textContent || "").trim().toLowerCase(), b = t.optionText.toLowerCase().trim();
14497
- y === b ? n += 15 : y.includes(b) && (n += 10);
14496
+ const v = (e.textContent || "").trim().toLowerCase(), b = t.optionText.toLowerCase().trim();
14497
+ v === b ? n += 15 : v.includes(b) && (n += 10);
14498
14498
  }
14499
14499
  if (i === 0) return 100;
14500
14500
  let a = Math.round(n / i * 100);
14501
14501
  if (o ? (a = Math.round(a * 0.3), console.log(`[HybridTargetResolver] Role mismatch penalty (30%): ${e.tagName}[role="${e.getAttribute("role")}"] vs target role="${t.role}"`)) : s && (e.closest('[role="listbox"], [role="menu"], [role="tree"]') || (a = Math.round(a * 0.7), console.log(`[HybridTargetResolver] No role penalty (70%): ${e.tagName} expected role="${t.role}"`))), e.getAttribute("tabindex") === "-1" && (e.closest('[role="listbox"], [role="menu"], [role="combobox"], .select, [class*="dropdown"]') || e.tagName.toLowerCase() === "input" && (a = Math.round(a * 0.85), console.log("[HybridTargetResolver] tabindex=-1 input penalty (85%): likely hidden placeholder"))), t.selector) {
14502
14502
  const g = this.extractSelectorContext(t.selector);
14503
14503
  if (g.parentTag || g.parentSelector) {
14504
- const y = this.matchesSelectorContext(e, g);
14505
- y > 0.5 ? a = Math.min(100, Math.round(a * 1.15)) : y < 0.5 && t.text && (a = Math.round(a * 0.7));
14504
+ const v = this.matchesSelectorContext(e, g);
14505
+ v > 0.5 ? a = Math.min(100, Math.round(a * 1.15)) : v < 0.5 && t.text && (a = Math.round(a * 0.7));
14506
14506
  }
14507
14507
  }
14508
14508
  if (t.text) {
14509
- const g = e.tagName.toLowerCase(), y = e.getAttribute("role"), b = ["button", "a", "input", "select", "textarea"].includes(g), m = ["button", "link", "menuitem", "option", "tab", "checkbox", "radio"].includes(y || ""), v = e.onclick !== null || e.hasAttribute("onclick"), w = e.closest('button, a, [role="button"], [role="link"]');
14510
- b || m ? (a = Math.min(100, Math.round(a * 1.25)), console.log(`[HybridTargetResolver] Interactive element bonus (25%): <${g}> is natively interactive`)) : w ? a = Math.min(100, Math.round(a * 1.15)) : v && (a = Math.min(100, Math.round(a * 1.1)));
14509
+ const g = e.tagName.toLowerCase(), v = e.getAttribute("role"), b = ["button", "a", "input", "select", "textarea"].includes(g), m = ["button", "link", "menuitem", "option", "tab", "checkbox", "radio"].includes(v || ""), y = e.onclick !== null || e.hasAttribute("onclick"), w = e.closest('button, a, [role="button"], [role="link"]');
14510
+ b || m ? (a = Math.min(100, Math.round(a * 1.25)), console.log(`[HybridTargetResolver] Interactive element bonus (25%): <${g}> is natively interactive`)) : w ? a = Math.min(100, Math.round(a * 1.15)) : y && (a = Math.min(100, Math.round(a * 1.1)));
14511
14511
  }
14512
14512
  return a;
14513
14513
  }
@@ -14624,10 +14624,10 @@ const St = class St {
14624
14624
  var m;
14625
14625
  const u = c;
14626
14626
  if (Re(u)) return;
14627
- const d = u.getBoundingClientRect(), h = Math.abs(d.x - e.x), g = Math.abs(d.y - e.y), y = Math.abs(d.width - e.width), b = Math.abs(d.height - e.height);
14628
- if (h <= i && g <= i && y <= i * 2 && b <= i * 2) {
14629
- let v = 100 - h - g;
14630
- t && u.tagName.toLowerCase() === t.toLowerCase() && (v += 30), n && (((m = u.innerText) == null ? void 0 : m.trim().toLowerCase()) || "").includes(n.toLowerCase()) && (v += 25), v > a && (a = v, s = u);
14627
+ const d = u.getBoundingClientRect(), h = Math.abs(d.x - e.x), g = Math.abs(d.y - e.y), v = Math.abs(d.width - e.width), b = Math.abs(d.height - e.height);
14628
+ if (h <= i && g <= i && v <= i * 2 && b <= i * 2) {
14629
+ let y = 100 - h - g;
14630
+ t && u.tagName.toLowerCase() === t.toLowerCase() && (y += 30), n && (((m = u.innerText) == null ? void 0 : m.trim().toLowerCase()) || "").includes(n.toLowerCase()) && (y += 25), y > a && (a = y, s = u);
14631
14631
  }
14632
14632
  }), s;
14633
14633
  }
@@ -14736,13 +14736,13 @@ const St = class St {
14736
14736
  for (const h of d) {
14737
14737
  if (e.contains(h) || h.contains(e) || h.querySelector('input, select, textarea, [role="combobox"]')) continue;
14738
14738
  if (i.querySelectorAll('input, select, textarea, [role="combobox"]').length === 1) {
14739
- const y = (c = h.textContent) == null ? void 0 : c.trim().replace(/\*$/, "").trim();
14740
- if (y && y.length > 0 && y.length < 50)
14741
- return y;
14739
+ const v = (c = h.textContent) == null ? void 0 : c.trim().replace(/\*$/, "").trim();
14740
+ if (v && v.length > 0 && v.length < 50)
14741
+ return v;
14742
14742
  } else if (this.isLabelForElement(h, e, i)) {
14743
- const y = (u = h.textContent) == null ? void 0 : u.trim().replace(/\*$/, "").trim();
14744
- if (y && y.length > 0 && y.length < 50)
14745
- return y;
14743
+ const v = (u = h.textContent) == null ? void 0 : u.trim().replace(/\*$/, "").trim();
14744
+ if (v && v.length > 0 && v.length < 50)
14745
+ return v;
14746
14746
  }
14747
14747
  }
14748
14748
  i = i.parentElement, o++;
@@ -14915,8 +14915,8 @@ const St = class St {
14915
14915
  if (o === 'input[role="combobox"]' || o === '[role="combobox"]') {
14916
14916
  const c = document.querySelectorAll(o);
14917
14917
  c.length > 1 && (console.warn(`[HybridTargetResolver] ⚠️ AMBIGUOUS SELECTOR: "${o}" matches ${c.length} elements!`), console.warn("[HybridTargetResolver] ⚠️ Bot should send more specific targeting (text, label, boundingBox, domIndex)"), c.forEach((u, d) => {
14918
- const h = u, g = h.getAttribute("placeholder") || "", y = h.getAttribute("aria-label") || "", b = h.id || "";
14919
- console.log(`[HybridTargetResolver] ${d}: id="${b}" placeholder="${g}" aria-label="${y}"`);
14918
+ const h = u, g = h.getAttribute("placeholder") || "", v = h.getAttribute("aria-label") || "", b = h.id || "";
14919
+ console.log(`[HybridTargetResolver] ${d}: id="${b}" placeholder="${g}" aria-label="${v}"`);
14920
14920
  }));
14921
14921
  }
14922
14922
  const a = document.querySelector(o);
@@ -15030,9 +15030,9 @@ const St = class St {
15030
15030
  // Just the icon (if no wrapper)
15031
15031
  ];
15032
15032
  for (const g of h) {
15033
- const y = c.querySelector(g);
15034
- if (y && this.isVisible(y))
15035
- return console.log(`[HybridTargetResolver] → Found remove button: <${y.tagName.toLowerCase()}> with selector "${g}"`), y;
15033
+ const v = c.querySelector(g);
15034
+ if (v && this.isVisible(v))
15035
+ return console.log(`[HybridTargetResolver] → Found remove button: <${v.tagName.toLowerCase()}> with selector "${g}"`), v;
15036
15036
  }
15037
15037
  return console.log("[HybridTargetResolver] → No specific remove button found, returning chip container"), c;
15038
15038
  }
@@ -15096,7 +15096,7 @@ const St = class St {
15096
15096
  * We want to find the combobox that has "Label" as its label, not some other element with "Label" text
15097
15097
  */
15098
15098
  static findElementByLabelText(e, t) {
15099
- var y, b, m;
15099
+ var v, b, m;
15100
15100
  const i = t.replace(/\\"/g, '"').replace(/\\ /g, " ").replace(/\\\\/g, "\\").replace(/\[data-label="[^"]*"\]/g, "").replace(/\[data-option-text="[^"]*"\]/g, "").replace(/\[data-index="[^"]*"\]/g, "").trim(), o = i.toLowerCase().trim(), s = ["*", "div", "span", "p", "a", "li", "ul", "section", "article"], a = /\[role=/.test(i);
15101
15101
  if (s.includes(o) && !a)
15102
15102
  return null;
@@ -15110,14 +15110,14 @@ const St = class St {
15110
15110
  return null;
15111
15111
  console.log(`[HybridTargetResolver] → Looking for "${i}" associated with label "${e}"`), console.log(`[HybridTargetResolver] → Found ${c.length} elements matching selector`);
15112
15112
  const u = e.toLowerCase().trim();
15113
- function d(v) {
15114
- return v.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
15113
+ function d(y) {
15114
+ return y.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
15115
15115
  }
15116
- const h = (v) => v.toLowerCase().trim().replace(/\*$/, "").trim() === u ? !0 : new RegExp(
15116
+ const h = (y) => y.toLowerCase().trim().replace(/\*$/, "").trim() === u ? !0 : new RegExp(
15117
15117
  `(^|\\s)${d(u)}($|\\s|[:\\*\\?\\.\\,\\)\\]\\}\\-])`,
15118
15118
  "i"
15119
- ).test(v), g = (v) => {
15120
- const w = v, x = w.getBoundingClientRect();
15119
+ ).test(y), g = (y) => {
15120
+ const w = y, x = w.getBoundingClientRect();
15121
15121
  if (x.width === 0 || x.height === 0) return !1;
15122
15122
  if (!w.offsetParent)
15123
15123
  try {
@@ -15129,45 +15129,45 @@ const St = class St {
15129
15129
  }
15130
15130
  return !0;
15131
15131
  };
15132
- for (const v of c) {
15133
- if (!g(v)) continue;
15134
- const w = v.getAttribute("id");
15132
+ for (const y of c) {
15133
+ if (!g(y)) continue;
15134
+ const w = y.getAttribute("id");
15135
15135
  if (w)
15136
15136
  try {
15137
15137
  const B = document.querySelector(`label[for="${CSS.escape(w)}"]`);
15138
15138
  if (B && h(B.textContent || ""))
15139
- return console.log("[HybridTargetResolver] → Found via label[for] attribute"), v;
15139
+ return console.log("[HybridTargetResolver] → Found via label[for] attribute"), y;
15140
15140
  } catch {
15141
15141
  }
15142
- const x = v.getAttribute("aria-labelledby");
15142
+ const x = y.getAttribute("aria-labelledby");
15143
15143
  if (x) {
15144
15144
  const B = x.split(/\s+/).filter((re) => re.length > 0);
15145
15145
  for (const re of B) {
15146
15146
  const se = document.getElementById(re);
15147
15147
  if (se && h(se.textContent || ""))
15148
- return console.log("[HybridTargetResolver] → Found via aria-labelledby"), v;
15148
+ return console.log("[HybridTargetResolver] → Found via aria-labelledby"), y;
15149
15149
  }
15150
15150
  }
15151
- const C = v.getAttribute("aria-label") || "";
15151
+ const C = y.getAttribute("aria-label") || "";
15152
15152
  if (C && h(C))
15153
- return console.log("[HybridTargetResolver] → Found via aria-label"), v;
15154
- const D = v.getAttribute("placeholder") || "";
15153
+ return console.log("[HybridTargetResolver] → Found via aria-label"), y;
15154
+ const D = y.getAttribute("placeholder") || "";
15155
15155
  if (D && h(D))
15156
- return console.log("[HybridTargetResolver] → Found via placeholder"), v;
15157
- let P = v.parentElement, R = 0;
15156
+ return console.log("[HybridTargetResolver] → Found via placeholder"), y;
15157
+ let P = y.parentElement, R = 0;
15158
15158
  for (; P && R < 6; ) {
15159
- const B = P.querySelectorAll('input, select, textarea, [role="combobox"], [role="listbox"]'), re = Array.from(B), se = re.includes(v), me = P.classList.contains("MuiFormControl-root") || P.tagName === "FIELDSET" || /form(-|_)?(field|group|control|item|row)/i.test(P.className) || // React pattern: div containing both a label-like child and an input wrapper
15159
+ const B = P.querySelectorAll('input, select, textarea, [role="combobox"], [role="listbox"]'), re = Array.from(B), se = re.includes(y), me = P.classList.contains("MuiFormControl-root") || P.tagName === "FIELDSET" || /form(-|_)?(field|group|control|item|row)/i.test(P.className) || // React pattern: div containing both a label-like child and an input wrapper
15160
15160
  P.childElementCount >= 2 && P.childElementCount <= 5, $ = P.querySelectorAll(
15161
15161
  'label, [class*="label"]:not(input):not(select):not(textarea):not([role="combobox"]), .MuiFormLabel-root, [class*="FormLabel"], [class*="form-label"], [class*="field-label"]'
15162
15162
  );
15163
15163
  for (const j of $) {
15164
- if (v.contains(j) || j.contains(v) || j.querySelector('input, select, textarea, [role="combobox"]')) continue;
15165
- const H = ((y = j.textContent) == null ? void 0 : y.trim()) || "";
15164
+ if (y.contains(j) || j.contains(y) || j.querySelector('input, select, textarea, [role="combobox"]')) continue;
15165
+ const H = ((v = j.textContent) == null ? void 0 : v.trim()) || "";
15166
15166
  if (!(H.length > 50) && h(H)) {
15167
15167
  if (B.length === 1 && se)
15168
- return console.log(`[HybridTargetResolver] → Found via label in container: "${H}"`), v;
15169
- if (se && this.isTextNearElement(j, v, re))
15170
- return console.log(`[HybridTargetResolver] → Found via label position: "${H}"`), v;
15168
+ return console.log(`[HybridTargetResolver] → Found via label in container: "${H}"`), y;
15169
+ if (se && this.isTextNearElement(j, y, re))
15170
+ return console.log(`[HybridTargetResolver] → Found via label position: "${H}"`), y;
15171
15171
  }
15172
15172
  }
15173
15173
  if (me || R >= 3) {
@@ -15175,15 +15175,15 @@ const St = class St {
15175
15175
  ":scope > div, :scope > span, :scope > p, :scope > div > div, :scope > div > span, :scope > div > p"
15176
15176
  );
15177
15177
  for (const H of j) {
15178
- if (H.querySelector('input, select, textarea, [role="combobox"]') || H.contains(v) || v.contains(H)) continue;
15179
- const X = v.value || "";
15178
+ if (H.querySelector('input, select, textarea, [role="combobox"]') || H.contains(y) || y.contains(H)) continue;
15179
+ const X = y.value || "";
15180
15180
  if (X && ((b = H.textContent) == null ? void 0 : b.trim()) === X) continue;
15181
15181
  const N = ((m = H.textContent) == null ? void 0 : m.trim()) || "";
15182
15182
  if (N.length > 0 && N.length <= 30 && h(N)) {
15183
15183
  if (B.length === 1 && se)
15184
- return console.log(`[HybridTargetResolver] → Found via nearby text: "${N}"`), v;
15185
- if (se && this.isTextNearElement(H, v, re))
15186
- return console.log(`[HybridTargetResolver] → Found via nearby text (position): "${N}"`), v;
15184
+ return console.log(`[HybridTargetResolver] → Found via nearby text: "${N}"`), y;
15185
+ if (se && this.isTextNearElement(H, y, re))
15186
+ return console.log(`[HybridTargetResolver] → Found via nearby text (position): "${N}"`), y;
15187
15187
  }
15188
15188
  }
15189
15189
  }
@@ -15314,19 +15314,19 @@ const St = class St {
15314
15314
  console.log("[HybridTargetResolver] → XPath found nothing, trying fallback...");
15315
15315
  const g = document.querySelectorAll(t || "*");
15316
15316
  console.log(`[HybridTargetResolver] → Fallback: checking ${g.length} <${t || "*"}> elements for text "${i}"`);
15317
- const y = ($) => {
15317
+ const v = ($) => {
15318
15318
  const j = $;
15319
15319
  return Re(j) ? !0 : j.id === "root" || j.id === "app" || j.id === "__next" || j.tagName === "BODY" || j.tagName === "HTML";
15320
15320
  };
15321
15321
  for (const $ of g) {
15322
- if (y($) || (((R = $.textContent) == null ? void 0 : R.trim().toLowerCase()) || "") !== o) continue;
15322
+ if (v($) || (((R = $.textContent) == null ? void 0 : R.trim().toLowerCase()) || "") !== o) continue;
15323
15323
  const H = $.getBoundingClientRect();
15324
15324
  if (H.width > 0 && H.height > 0 && (((B = $.innerText) == null ? void 0 : B.trim().toLowerCase()) || "") === o)
15325
15325
  return console.log("[HybridTargetResolver] → Found via exact text match"), $;
15326
15326
  }
15327
15327
  let b = null, m = -1 / 0;
15328
15328
  for (const $ of g) {
15329
- if (y($)) continue;
15329
+ if (v($)) continue;
15330
15330
  const j = ((re = $.textContent) == null ? void 0 : re.trim().toLowerCase()) || "";
15331
15331
  if (j.length !== 0 && j.includes(o)) {
15332
15332
  const H = o.length / j.length, X = $.getBoundingClientRect(), N = X.width * X.height;
@@ -15340,7 +15340,7 @@ const St = class St {
15340
15340
  const $ = b.getBoundingClientRect();
15341
15341
  return console.log(`[HybridTargetResolver] → Found via textContent (${$.width.toFixed(0)}x${$.height.toFixed(0)}px, score=${m.toFixed(0)})`), b;
15342
15342
  }
15343
- const v = t && ["input", "textarea"].includes(t.toLowerCase()) ? t.toLowerCase() : "input, textarea", w = document.querySelectorAll(v);
15343
+ const y = t && ["input", "textarea"].includes(t.toLowerCase()) ? t.toLowerCase() : "input, textarea", w = document.querySelectorAll(y);
15344
15344
  console.log(`[HybridTargetResolver] → Checking ${w.length} input/textarea elements for placeholder "${i}"`);
15345
15345
  for (const $ of w) {
15346
15346
  const j = $;
@@ -15435,8 +15435,8 @@ const St = class St {
15435
15435
  break;
15436
15436
  }
15437
15437
  if (m.includes(a)) {
15438
- const v = a.length / m.length;
15439
- v > 0.7 && v > d && (u = g, d = v);
15438
+ const y = a.length / m.length;
15439
+ y > 0.7 && y > d && (u = g, d = y);
15440
15440
  }
15441
15441
  }
15442
15442
  if (c)
@@ -15590,11 +15590,19 @@ class wh {
15590
15590
  const c = new URL(s, window.location.origin);
15591
15591
  if (c.protocol !== "http:" && c.protocol !== "https:")
15592
15592
  return console.warn("[ActionExecutor] Navigate blocked — disallowed scheme:", c.protocol), this.lastError = `Navigate blocked: disallowed URL scheme "${c.protocol}"`, !1;
15593
+ if (c.origin !== window.location.origin)
15594
+ return console.warn("[ActionExecutor] Navigate blocked — cross-origin URL:", c.origin), this.lastError = "Navigate blocked: cross-origin URL not allowed", !1;
15593
15595
  a = c.href;
15594
15596
  } catch {
15595
15597
  return console.warn("[ActionExecutor] Navigate blocked — invalid URL:", s), this.lastError = `Navigate blocked: invalid URL "${s}"`, !1;
15596
15598
  }
15597
- return console.log("[ActionExecutor] 🧭 Navigating to URL:", a), window.location.href = a, !0;
15599
+ console.log("[ActionExecutor] 🧭 Navigating to URL:", a);
15600
+ try {
15601
+ const c = new URL(a), u = window.location.href, d = c.hash !== window.location.hash, h = c.pathname + c.search + c.hash;
15602
+ return history.pushState(null, "", h), window.dispatchEvent(new PopStateEvent("popstate", { state: null })), d && window.dispatchEvent(new HashChangeEvent("hashchange", { oldURL: u, newURL: c.href })), !0;
15603
+ } catch {
15604
+ }
15605
+ return window.location.href = a, !0;
15598
15606
  }
15599
15607
  if (e.target.optionText && e.action === "click") {
15600
15608
  console.log("[ActionExecutor] 🔽 Dropdown option click detected:", e.target.optionText);
@@ -15810,9 +15818,9 @@ class wh {
15810
15818
  const g = t.querySelector('input[role="combobox"]');
15811
15819
  if (g)
15812
15820
  return console.log("[ActionExecutor] Found combobox input via control element"), g;
15813
- const y = t.parentElement;
15814
- if (y) {
15815
- const m = y.querySelector('input[role="combobox"]');
15821
+ const v = t.parentElement;
15822
+ if (v) {
15823
+ const m = v.querySelector('input[role="combobox"]');
15816
15824
  if (m)
15817
15825
  return console.log("[ActionExecutor] Found combobox input in parent container"), m;
15818
15826
  }
@@ -15994,7 +16002,7 @@ class wh {
15994
16002
  let i = e.parentElement, o = e, s = 0;
15995
16003
  for (; i && i !== document.body && s < 10; ) {
15996
16004
  s++;
15997
- const c = window.getComputedStyle(i), u = c.cursor === "pointer", d = n(i), h = d.includes("cursor-pointer"), g = (a = i.classList) == null ? void 0 : a.contains("cursor-pointer"), y = i.hasAttribute("onclick") || i.hasAttribute("data-onclick") || i.getAttribute("role") === "button" || i.getAttribute("role") === "menuitem", b = i.tagName === "BUTTON" || i.tagName === "A";
16005
+ const c = window.getComputedStyle(i), u = c.cursor === "pointer", d = n(i), h = d.includes("cursor-pointer"), g = (a = i.classList) == null ? void 0 : a.contains("cursor-pointer"), v = i.hasAttribute("onclick") || i.hasAttribute("data-onclick") || i.getAttribute("role") === "button" || i.getAttribute("role") === "menuitem", b = i.tagName === "BUTTON" || i.tagName === "A";
15998
16006
  if (console.log(
15999
16007
  `[ActionExecutor] Checking parent #${s}:`,
16000
16008
  i.tagName,
@@ -16004,7 +16012,7 @@ class wh {
16004
16012
  h || g,
16005
16013
  "classes:",
16006
16014
  d.substring(0, 60)
16007
- ), (u || h || g || y || b) && (o = i, console.log(
16015
+ ), (u || h || g || v || b) && (o = i, console.log(
16008
16016
  "[ActionExecutor] ✅ Found clickable parent:",
16009
16017
  i.tagName,
16010
16018
  d.substring(0, 80)
@@ -16120,9 +16128,9 @@ class wh {
16120
16128
  i.unshift(d), o = o.parentElement;
16121
16129
  }
16122
16130
  const s = (d) => {
16123
- var y;
16131
+ var v;
16124
16132
  const h = d.querySelector("span, label, p");
16125
- if ((y = h == null ? void 0 : h.textContent) != null && y.trim())
16133
+ if ((v = h == null ? void 0 : h.textContent) != null && v.trim())
16126
16134
  return h.textContent.trim().substring(0, 50);
16127
16135
  let g = "";
16128
16136
  for (const b of Array.from(d.childNodes))
@@ -16355,8 +16363,8 @@ class Sh {
16355
16363
  }
16356
16364
  this.showFloeCursor();
16357
16365
  const o = parseFloat(this.floeCursor.style.top) || 0, s = parseFloat(this.floeCursor.style.left) || 0, a = performance.now(), c = s, u = o, d = (h) => {
16358
- const g = h - a, y = Math.min(g / n, 1), b = 1 - Math.pow(1 - y, 3), m = c + (e - c) * b, v = u + (t - u) * b;
16359
- this.floeCursor && (this.floeCursor.style.left = `${m}px`, this.floeCursor.style.top = `${v}px`), y < 1 ? requestAnimationFrame(d) : i();
16366
+ const g = h - a, v = Math.min(g / n, 1), b = 1 - Math.pow(1 - v, 3), m = c + (e - c) * b, y = u + (t - u) * b;
16367
+ this.floeCursor && (this.floeCursor.style.left = `${m}px`, this.floeCursor.style.top = `${y}px`), v < 1 ? requestAnimationFrame(d) : i();
16360
16368
  };
16361
16369
  requestAnimationFrame(d);
16362
16370
  });
@@ -16908,14 +16916,14 @@ class Pi {
16908
16916
  let c = 0, u = 0, d = 0, h = 0, g = 0;
16909
16917
  for (let b = -o; b <= o; b++)
16910
16918
  for (let m = -o; m <= o; m++) {
16911
- const v = a + m, w = s + b;
16912
- if (v >= 0 && v < t.width && w >= 0 && w < t.height) {
16913
- const x = (w * t.width + v) * 4;
16919
+ const y = a + m, w = s + b;
16920
+ if (y >= 0 && y < t.width && w >= 0 && w < t.height) {
16921
+ const x = (w * t.width + y) * 4;
16914
16922
  c += i[x], u += i[x + 1], d += i[x + 2], h += i[x + 3], g++;
16915
16923
  }
16916
16924
  }
16917
- const y = (s * t.width + a) * 4;
16918
- i[y] = c / g, i[y + 1] = u / g, i[y + 2] = d / g, i[y + 3] = h / g;
16925
+ const v = (s * t.width + a) * 4;
16926
+ i[v] = c / g, i[v + 1] = u / g, i[v + 2] = d / g, i[v + 3] = h / g;
16919
16927
  }
16920
16928
  e.putImageData(n, t.x, t.y);
16921
16929
  }
@@ -16934,13 +16942,13 @@ class Pi {
16934
16942
  const s = [];
16935
16943
  if (t) {
16936
16944
  const h = this.getAllTextNodes();
16937
- for (const { node: g, rect: y } of h) {
16945
+ for (const { node: g, rect: v } of h) {
16938
16946
  const b = this.containsPII(g.textContent || "");
16939
16947
  b.contains && s.push({
16940
- x: y.left,
16941
- y: y.top,
16942
- width: y.width,
16943
- height: y.height,
16948
+ x: v.left,
16949
+ y: v.top,
16950
+ width: v.width,
16951
+ height: v.height,
16944
16952
  type: b.type || "unknown"
16945
16953
  });
16946
16954
  }
@@ -16950,19 +16958,19 @@ class Pi {
16950
16958
  return console.error("[ScreenCapture] Failed to get 2D canvas context"), Promise.reject(new Error("[ScreenCapture] Canvas 2D context unavailable"));
16951
16959
  const u = window.innerWidth * n, d = window.innerHeight * n;
16952
16960
  return a.width = u, a.height = d, new Promise((h, g) => {
16953
- const y = document.createElement("iframe");
16954
- y.style.position = "fixed", y.style.top = "0", y.style.left = "0", y.style.width = "100%", y.style.height = "100%", y.style.border = "none", y.style.zIndex = "-999999", document.body.appendChild(y);
16955
- const b = y.contentDocument;
16961
+ const v = document.createElement("iframe");
16962
+ v.style.position = "fixed", v.style.top = "0", v.style.left = "0", v.style.width = "100%", v.style.height = "100%", v.style.border = "none", v.style.zIndex = "-999999", document.body.appendChild(v);
16963
+ const b = v.contentDocument;
16956
16964
  if (b.open(), b.write(document.documentElement.outerHTML), b.close(), Pi.sanitizeClonedDocument(b), t && s.length > 0) {
16957
- const v = b.createElement("style");
16958
- if (v.textContent = `
16965
+ const y = b.createElement("style");
16966
+ if (y.textContent = `
16959
16967
  .pii-redacted {
16960
16968
  filter: blur(5px);
16961
16969
  background: #000;
16962
16970
  color: transparent !important;
16963
16971
  }
16964
- `, b.head.appendChild(v), !b.body) {
16965
- console.warn("[ScreenCapture] Cloned document has no body"), document.body.removeChild(y), this.safeCanvasToDataURL(a, o, i).then(h, g);
16972
+ `, b.head.appendChild(y), !b.body) {
16973
+ console.warn("[ScreenCapture] Cloned document has no body"), document.body.removeChild(v), this.safeCanvasToDataURL(a, o, i).then(h, g);
16966
16974
  return;
16967
16975
  }
16968
16976
  const w = b.createTreeWalker(
@@ -16975,13 +16983,13 @@ class Pi {
16975
16983
  }
16976
16984
  const m = () => {
16977
16985
  try {
16978
- document.body.removeChild(y);
16986
+ document.body.removeChild(v);
16979
16987
  } catch {
16980
16988
  }
16981
16989
  };
16982
16990
  setTimeout(() => {
16983
16991
  try {
16984
- if (!y.contentWindow) {
16992
+ if (!v.contentWindow) {
16985
16993
  console.warn("[ScreenCapture] iframe contentWindow not available"), m(), this.safeCanvasToDataURL(a, o, i).then(h, g);
16986
16994
  return;
16987
16995
  }
@@ -16999,8 +17007,8 @@ class Pi {
16999
17007
  }, R.onerror = () => {
17000
17008
  URL.revokeObjectURL(P), console.warn("[ScreenCapture] SVG image render failed, returning blank canvas"), m(), this.safeCanvasToDataURL(a, o, i).then(h, g);
17001
17009
  }, R.src = P;
17002
- } catch (v) {
17003
- console.error("[ScreenCapture] Failed to render iframe content:", v), m(), this.safeCanvasToDataURL(a, o, i).then(h, g);
17010
+ } catch (y) {
17011
+ console.error("[ScreenCapture] Failed to render iframe content:", y), m(), this.safeCanvasToDataURL(a, o, i).then(h, g);
17004
17012
  }
17005
17013
  }, 100);
17006
17014
  });
@@ -17223,21 +17231,21 @@ class kh {
17223
17231
  let d = e, h = 0;
17224
17232
  for (; d && d !== document.body && h < 5; ) {
17225
17233
  let g = d.tagName.toLowerCase();
17226
- const y = d.getAttribute("role"), b = d.getAttribute("data-testid");
17234
+ const v = d.getAttribute("role"), b = d.getAttribute("data-testid");
17227
17235
  if (b) {
17228
17236
  u.unshift(`[data-testid="${b}"]`);
17229
17237
  break;
17230
17238
  }
17231
- if (y)
17232
- g += `[role="${y}"]`;
17239
+ if (v)
17240
+ g += `[role="${v}"]`;
17233
17241
  else if (d.className && typeof d.className == "string") {
17234
17242
  const m = d.className.split(" ").filter(
17235
- (v) => v && !v.startsWith("css-") && // Emotion/styled-components
17236
- !v.startsWith("sc-") && // styled-components
17237
- !v.startsWith("ng-") && // Angular
17238
- !v.startsWith("_") && // Private
17239
- !v.match(/^[a-z]{6,}$/) && // Random hashes
17240
- !v.match(/^\d/)
17243
+ (y) => y && !y.startsWith("css-") && // Emotion/styled-components
17244
+ !y.startsWith("sc-") && // styled-components
17245
+ !y.startsWith("ng-") && // Angular
17246
+ !y.startsWith("_") && // Private
17247
+ !y.match(/^[a-z]{6,}$/) && // Random hashes
17248
+ !y.match(/^\d/)
17241
17249
  // Starts with number
17242
17250
  ).slice(0, 2);
17243
17251
  m.length > 0 && (g += `.${m.join(".")}`);
@@ -17251,27 +17259,27 @@ class kh {
17251
17259
  * This provides all the information needed for multi-strategy element finding
17252
17260
  */
17253
17261
  getElementMetadata(e) {
17254
- var g, y, b, m;
17262
+ var g, v, b, m;
17255
17263
  const t = e, n = this.getSelector(e), i = ((g = t.innerText) == null ? void 0 : g.trim().substring(0, 100)) || "", o = e.tagName.toLowerCase(), s = e.getAttribute("role") || void 0, a = e.getAttribute("aria-label") || void 0, c = e.placeholder || void 0;
17256
17264
  let u;
17257
17265
  const d = e.getAttribute("aria-labelledby");
17258
17266
  if (d) {
17259
- const v = document.getElementById(d.split(/\s+/)[0]);
17260
- v && (u = (y = v.textContent) == null ? void 0 : y.trim());
17267
+ const y = document.getElementById(d.split(/\s+/)[0]);
17268
+ y && (u = (v = y.textContent) == null ? void 0 : v.trim());
17261
17269
  }
17262
17270
  const h = e.getAttribute("id");
17263
17271
  if (!u && h)
17264
17272
  try {
17265
- const v = document.querySelector(`label[for="${CSS.escape(h)}"]`);
17266
- v && (u = (b = v.textContent) == null ? void 0 : b.trim().replace(/\*$/, "").trim());
17273
+ const y = document.querySelector(`label[for="${CSS.escape(h)}"]`);
17274
+ y && (u = (b = y.textContent) == null ? void 0 : b.trim().replace(/\*$/, "").trim());
17267
17275
  } catch {
17268
17276
  }
17269
17277
  if (!u) {
17270
- const v = e.closest('.MuiFormControl-root, fieldset, [class*="form-group"], [class*="form-field"], [class*="field-wrapper"]');
17271
- if (v) {
17272
- const w = v.querySelector(":scope > label, :scope > .MuiFormLabel-root, :scope > div > label");
17278
+ const y = e.closest('.MuiFormControl-root, fieldset, [class*="form-group"], [class*="form-field"], [class*="field-wrapper"]');
17279
+ if (y) {
17280
+ const w = y.querySelector(":scope > label, :scope > .MuiFormLabel-root, :scope > div > label");
17273
17281
  if (w) {
17274
- const x = v.querySelectorAll('input, select, textarea, [role="combobox"]'), C = Array.from(x).some((D) => e.contains(D) || e === D);
17282
+ const x = y.querySelectorAll('input, select, textarea, [role="combobox"]'), C = Array.from(x).some((D) => e.contains(D) || e === D);
17275
17283
  (x.length === 1 || C) && (u = (m = w.textContent) == null ? void 0 : m.trim().replace(/\*$/, "").trim());
17276
17284
  }
17277
17285
  }
@@ -17505,10 +17513,10 @@ class Ch {
17505
17513
  let i = null;
17506
17514
  const o = 3, s = [300, 500, 800];
17507
17515
  for (let g = 0; g <= o; g++)
17508
- if (g > 0 && (console.log(`[BatchedActionExecutor] Retry ${g}/${o} in ${s[g - 1]}ms...`), await new Promise((y) => setTimeout(y, s[g - 1]))), i = ue.resolveTarget(e.target), i) {
17509
- const y = ((d = i.textContent) == null ? void 0 : d.trim().toLowerCase()) || "", b = i.tagName.toLowerCase();
17510
- if (t && !y.includes(t)) {
17511
- console.warn(`[BatchedActionExecutor] ⚠️ Found element text "${y.slice(0, 50)}" doesn't match expected "${t}"`), i = null;
17516
+ if (g > 0 && (console.log(`[BatchedActionExecutor] Retry ${g}/${o} in ${s[g - 1]}ms...`), await new Promise((v) => setTimeout(v, s[g - 1]))), i = ue.resolveTarget(e.target), i) {
17517
+ const v = ((d = i.textContent) == null ? void 0 : d.trim().toLowerCase()) || "", b = i.tagName.toLowerCase();
17518
+ if (t && !v.includes(t)) {
17519
+ console.warn(`[BatchedActionExecutor] ⚠️ Found element text "${v.slice(0, 50)}" doesn't match expected "${t}"`), i = null;
17512
17520
  continue;
17513
17521
  }
17514
17522
  n && b !== n && console.log(`[BatchedActionExecutor] Note: Found ${b} instead of expected ${n} (acceptable if it contains the text)`);
@@ -17516,12 +17524,12 @@ class Ch {
17516
17524
  }
17517
17525
  if (!i) {
17518
17526
  if (console.error("[BatchedActionExecutor] ❌ Could not find matching element after retries:", e.target), t) {
17519
- const g = Array.from(document.querySelectorAll("*")).filter((y) => {
17527
+ const g = Array.from(document.querySelectorAll("*")).filter((v) => {
17520
17528
  var b;
17521
- return (b = y.textContent) == null ? void 0 : b.toLowerCase().includes(t);
17522
- }).slice(0, 5).map((y) => {
17529
+ return (b = v.textContent) == null ? void 0 : b.toLowerCase().includes(t);
17530
+ }).slice(0, 5).map((v) => {
17523
17531
  var b;
17524
- return `${y.tagName.toLowerCase()}: "${(b = y.textContent) == null ? void 0 : b.trim().slice(0, 50)}"`;
17532
+ return `${v.tagName.toLowerCase()}: "${(b = v.textContent) == null ? void 0 : b.trim().slice(0, 50)}"`;
17525
17533
  });
17526
17534
  g.length > 0 && console.log("[BatchedActionExecutor] Similar elements found:", g);
17527
17535
  }
@@ -18259,7 +18267,7 @@ class pc extends dh {
18259
18267
  break;
18260
18268
  }
18261
18269
  ue.scrollIntoView(o), setTimeout(async () => {
18262
- var g, y;
18270
+ var g, v;
18263
18271
  const a = this.findCollapsedSidebar(o);
18264
18272
  if (a) {
18265
18273
  console.log("[OnboardingSDK] 🔍 Element is in collapsed sidebar, expanding first...");
@@ -18308,7 +18316,7 @@ class pc extends dh {
18308
18316
  }
18309
18317
  if (h) {
18310
18318
  console.log("[OnboardingSDK] ✅ Click executed successfully");
18311
- const b = (t.target.text || "").toLowerCase().trim(), m = ((y = o == null ? void 0 : o.textContent) == null ? void 0 : y.toLowerCase().trim()) || "", v = (o == null ? void 0 : o.tagName.toLowerCase()) || "unknown";
18319
+ const b = (t.target.text || "").toLowerCase().trim(), m = ((v = o == null ? void 0 : o.textContent) == null ? void 0 : v.toLowerCase().trim()) || "", y = (o == null ? void 0 : o.tagName.toLowerCase()) || "unknown";
18312
18320
  let w = !1, x = "";
18313
18321
  b && m && !m.includes(b) && !b.includes(m) && (w = !0, x = `Expected "${t.target.text}", but clicked "${m.slice(0, 50)}"`, console.error(`[OnboardingSDK] ❌ CLICK MISMATCH: ${x}`)), this.domIntrospector && (await new Promise((C) => setTimeout(C, 150)), this.domIntrospector.captureAndSendImmediate("post-bot-click"), console.log("[OnboardingSDK] 📸 DOM snapshot sent after bot click")), this.sendMetadata({
18314
18322
  type: "bot_action_complete",
@@ -18317,7 +18325,7 @@ class pc extends dh {
18317
18325
  // Mark as failure if mismatch detected
18318
18326
  target: t.target.text || t.target.selector || "unknown",
18319
18327
  actualClicked: w ? m.slice(0, 100) : void 0,
18320
- clickedTag: v,
18328
+ clickedTag: y,
18321
18329
  mismatch: w,
18322
18330
  mismatchDetails: x || void 0,
18323
18331
  previousUrl: i,
@@ -18381,19 +18389,29 @@ class pc extends dh {
18381
18389
  }
18382
18390
  let c;
18383
18391
  try {
18384
- const b = new URL(a, window.location.href);
18385
- if (b.protocol !== "http:" && b.protocol !== "https:") {
18386
- console.warn("[OnboardingSDK] ⚠️ Navigate blocked — disallowed scheme:", b.protocol), this.sendMetadata({
18392
+ const m = new URL(a, window.location.href);
18393
+ if (m.protocol !== "http:" && m.protocol !== "https:") {
18394
+ console.warn("[OnboardingSDK] ⚠️ Navigate blocked — disallowed scheme:", m.protocol), this.sendMetadata({
18387
18395
  type: "bot_action_complete",
18388
18396
  action: "navigate",
18389
18397
  success: !1,
18390
18398
  // Only include the scheme — never echo back the full raw URL
18391
- error: `Blocked: disallowed URL scheme "${b.protocol}"`,
18399
+ error: `Blocked: disallowed URL scheme "${m.protocol}"`,
18392
18400
  timestamp: Date.now()
18393
18401
  });
18394
18402
  break;
18395
18403
  }
18396
- c = b.href;
18404
+ if (m.origin !== window.location.origin) {
18405
+ console.warn("[OnboardingSDK] ⚠️ Navigate blocked — cross-origin URL:", m.origin), this.sendMetadata({
18406
+ type: "bot_action_complete",
18407
+ action: "navigate",
18408
+ success: !1,
18409
+ error: `Blocked: cross-origin navigation not allowed (${m.origin})`,
18410
+ timestamp: Date.now()
18411
+ });
18412
+ break;
18413
+ }
18414
+ c = m.href;
18397
18415
  } catch {
18398
18416
  console.warn("[OnboardingSDK] ⚠️ Navigate blocked — invalid URL"), this.sendMetadata({
18399
18417
  type: "bot_action_complete",
@@ -18418,7 +18436,7 @@ class pc extends dh {
18418
18436
  } catch {
18419
18437
  }
18420
18438
  const g = () => {
18421
- const b = {
18439
+ const m = {
18422
18440
  type: "bot_action_complete",
18423
18441
  action: "navigate",
18424
18442
  target: h.resolvedUrl,
@@ -18431,16 +18449,23 @@ class pc extends dh {
18431
18449
  beacon: !0
18432
18450
  };
18433
18451
  try {
18434
- const m = this.config.apiUrl || "";
18435
- m && navigator.sendBeacon && navigator.sendBeacon(
18436
- `${m}/api/v1/events/beacon`,
18437
- new Blob([JSON.stringify(b)], { type: "application/json" })
18452
+ const y = this.config.apiUrl || "";
18453
+ y && navigator.sendBeacon && navigator.sendBeacon(
18454
+ `${y}/api/v1/events/beacon`,
18455
+ new Blob([JSON.stringify(m)], { type: "application/json" })
18438
18456
  );
18439
18457
  } catch {
18440
18458
  }
18441
18459
  };
18442
- window.addEventListener("pagehide", g, { once: !0 }), window.location.href = c;
18443
- const y = await this.waitForNavigation(c, 1e4);
18460
+ window.addEventListener("pagehide", g, { once: !0 });
18461
+ let v = !1;
18462
+ try {
18463
+ const m = new URL(c).pathname + new URL(c).search + new URL(c).hash;
18464
+ history.pushState(null, "", m), window.dispatchEvent(new PopStateEvent("popstate", { state: null })), v = !0;
18465
+ } catch {
18466
+ }
18467
+ v || (window.location.href = c);
18468
+ const b = await this.waitForNavigation(c, 1e4);
18444
18469
  window.removeEventListener("pagehide", g);
18445
18470
  try {
18446
18471
  sessionStorage.removeItem("floe_pending_navigation");
@@ -18450,10 +18475,10 @@ class pc extends dh {
18450
18475
  type: "bot_action_complete",
18451
18476
  action: "navigate",
18452
18477
  target: Vn(c),
18453
- success: y,
18478
+ success: b,
18454
18479
  previousUrl: Vn(u),
18455
18480
  currentUrl: ut(),
18456
- ...y ? {} : { error: "Navigation timed out waiting for URL change" },
18481
+ ...b ? {} : { error: "Navigation timed out waiting for URL change" },
18457
18482
  timestamp: d
18458
18483
  });
18459
18484
  }
@@ -18481,7 +18506,7 @@ class pc extends dh {
18481
18506
  a = new URL(t);
18482
18507
  } catch {
18483
18508
  return console.warn("[OnboardingSDK] ⚠️ waitForNavigation: could not parse expectedUrl, using exact match"), new Promise((g) => {
18484
- const y = () => {
18509
+ const v = () => {
18485
18510
  if (window.location.href === t) {
18486
18511
  g(!0);
18487
18512
  return;
@@ -18490,14 +18515,14 @@ class pc extends dh {
18490
18515
  g(!1);
18491
18516
  return;
18492
18517
  }
18493
- setTimeout(y, o);
18518
+ setTimeout(v, o);
18494
18519
  };
18495
- y();
18520
+ v();
18496
18521
  });
18497
18522
  }
18498
18523
  const c = a.origin, u = s(a.pathname), d = a.search, h = a.hash;
18499
18524
  return new Promise((g) => {
18500
- const y = () => {
18525
+ const v = () => {
18501
18526
  const b = Date.now() - i;
18502
18527
  try {
18503
18528
  const m = new URL(window.location.href);
@@ -18511,9 +18536,9 @@ class pc extends dh {
18511
18536
  console.warn(`[OnboardingSDK] ⏱️ Navigation timeout after ${n}ms. Current: ${window.location.href}, Expected: ${t}`), g(!1);
18512
18537
  return;
18513
18538
  }
18514
- setTimeout(y, o);
18539
+ setTimeout(v, o);
18515
18540
  };
18516
- y();
18541
+ v();
18517
18542
  });
18518
18543
  }
18519
18544
  /**
@@ -18733,14 +18758,14 @@ class pc extends dh {
18733
18758
  else {
18734
18759
  this._botActionDepth++;
18735
18760
  try {
18736
- const g = d.getBoundingClientRect(), y = g.left + g.width / 2, b = g.top + g.height / 2, m = {
18761
+ const g = d.getBoundingClientRect(), v = g.left + g.width / 2, b = g.top + g.height / 2, m = {
18737
18762
  bubbles: !0,
18738
18763
  cancelable: !0,
18739
18764
  view: window,
18740
- clientX: y,
18765
+ clientX: v,
18741
18766
  clientY: b
18742
18767
  };
18743
- d.dispatchEvent(new MouseEvent("mousedown", m)), d.dispatchEvent(new MouseEvent("mouseup", m)), d.dispatchEvent(new MouseEvent("click", m)), await new Promise((v) => setTimeout(v, 200)), o.push(u), console.log(`[OnboardingSDK] ✅ Selected: "${u}"`);
18768
+ d.dispatchEvent(new MouseEvent("mousedown", m)), d.dispatchEvent(new MouseEvent("mouseup", m)), d.dispatchEvent(new MouseEvent("click", m)), await new Promise((y) => setTimeout(y, 200)), o.push(u), console.log(`[OnboardingSDK] ✅ Selected: "${u}"`);
18744
18769
  } finally {
18745
18770
  this._botActionDepth--;
18746
18771
  }
@@ -18817,13 +18842,13 @@ class pc extends dh {
18817
18842
  console.log("[OnboardingSDK] ⚠️ Typing to filter did not reveal the option");
18818
18843
  }
18819
18844
  if (!o) {
18820
- ue.scrollIntoView(s), await new Promise((y) => setTimeout(y, 200)), await this.overlay.moveToElementAndClick(s), console.log("[OnboardingSDK] 📂 Opening dropdown..."), this._botActionDepth++;
18845
+ ue.scrollIntoView(s), await new Promise((v) => setTimeout(v, 200)), await this.overlay.moveToElementAndClick(s), console.log("[OnboardingSDK] 📂 Opening dropdown..."), this._botActionDepth++;
18821
18846
  try {
18822
18847
  this.actionExecutor.openDropdown(s);
18823
18848
  } finally {
18824
18849
  this._botActionDepth--;
18825
18850
  }
18826
- if (await new Promise((y) => setTimeout(y, 300)), i = this.findVisibleDropdownOption(n), i) {
18851
+ if (await new Promise((v) => setTimeout(v, 300)), i = this.findVisibleDropdownOption(n), i) {
18827
18852
  console.log("[OnboardingSDK] ✅ Option visible after opening dropdown"), await this.clickDropdownOption(i, t);
18828
18853
  return;
18829
18854
  }
@@ -18849,9 +18874,9 @@ class pc extends dh {
18849
18874
  }
18850
18875
  if (!i) {
18851
18876
  console.error("[OnboardingSDK] ❌ All strategies failed for option:", n);
18852
- const h = document.querySelectorAll('[role="option"], [class*="option"], nz-option-item, .ant-select-item-option'), g = Array.from(h).slice(0, 10).map((y) => {
18877
+ const h = document.querySelectorAll('[role="option"], [class*="option"], nz-option-item, .ant-select-item-option'), g = Array.from(h).slice(0, 10).map((v) => {
18853
18878
  var b;
18854
- return (b = y.textContent) == null ? void 0 : b.trim().slice(0, 50);
18879
+ return (b = v.textContent) == null ? void 0 : b.trim().slice(0, 50);
18855
18880
  }).filter(Boolean);
18856
18881
  g.length > 0 ? console.log("[OnboardingSDK] Available options:", g) : console.log("[OnboardingSDK] No options visible - dropdown may not have opened"), this.sendMetadata({
18857
18882
  type: "bot_action_complete",
@@ -18931,11 +18956,11 @@ class pc extends dh {
18931
18956
  continue;
18932
18957
  }
18933
18958
  console.log(`[OnboardingSDK] Found scrollable container (${s}), scrollHeight: ${u.scrollHeight}, clientHeight: ${u.clientHeight}, overflow-y: ${d}`);
18934
- const h = 150, g = Math.ceil(u.scrollHeight / h) + 2, y = u.scrollTop;
18959
+ const h = 150, g = Math.ceil(u.scrollHeight / h) + 2, v = u.scrollTop;
18935
18960
  for (let b = 0; b < g; b++) {
18936
18961
  u.scrollTop = b * h, await new Promise((w) => setTimeout(w, 120));
18937
- const v = u.querySelectorAll('[role="option"], [class*="option"]:not([class*="singleValue"]), nz-option-item, .ant-select-item-option, .ant-select-item');
18938
- for (const w of v) {
18962
+ const y = u.querySelectorAll('[role="option"], [class*="option"]:not([class*="singleValue"]), nz-option-item, .ant-select-item-option, .ant-select-item');
18963
+ for (const w of y) {
18939
18964
  const x = w, C = x.getBoundingClientRect();
18940
18965
  if (C.height === 0 || C.width === 0) continue;
18941
18966
  const D = ((o = x.textContent) == null ? void 0 : o.trim().toLowerCase()) || "";
@@ -18943,7 +18968,7 @@ class pc extends dh {
18943
18968
  return console.log(`[OnboardingSDK] ✅ Found option after scrolling to position ${u.scrollTop}: "${t}"`), x.scrollIntoView({ block: "center" }), await new Promise((P) => setTimeout(P, 100)), x;
18944
18969
  }
18945
18970
  }
18946
- u.scrollTop = y;
18971
+ u.scrollTop = v;
18947
18972
  }
18948
18973
  }
18949
18974
  return console.log(`[OnboardingSDK] Option not found after scrolling: "${t}"`), null;
@@ -19127,23 +19152,23 @@ class pc extends dh {
19127
19152
  if (u === n || u.includes(n)) {
19128
19153
  const d = c;
19129
19154
  if (d.tagName === "LABEL" && d.htmlFor) {
19130
- const y = document.getElementById(d.htmlFor);
19131
- if (y)
19132
- return this.getClickableDropdownContainer(y);
19155
+ const v = document.getElementById(d.htmlFor);
19156
+ if (v)
19157
+ return this.getClickableDropdownContainer(v);
19133
19158
  }
19134
19159
  const h = d.id;
19135
19160
  if (h) {
19136
- const y = document.querySelector(`[aria-labelledby="${h}"]`);
19137
- if (y)
19138
- return this.getClickableDropdownContainer(y);
19161
+ const v = document.querySelector(`[aria-labelledby="${h}"]`);
19162
+ if (v)
19163
+ return this.getClickableDropdownContainer(v);
19139
19164
  }
19140
19165
  const g = d.closest('[class*="field"], [class*="form-group"], [class*="FormControl"]') || d.parentElement;
19141
19166
  if (g) {
19142
- const y = g.querySelector(
19167
+ const v = g.querySelector(
19143
19168
  'input[role="combobox"], select, [aria-haspopup="listbox"], [class*="control"]'
19144
19169
  );
19145
- if (y)
19146
- return this.getClickableDropdownContainer(y);
19170
+ if (v)
19171
+ return this.getClickableDropdownContainer(v);
19147
19172
  }
19148
19173
  }
19149
19174
  }
@@ -19246,7 +19271,7 @@ class pc extends dh {
19246
19271
  * then reports the result back to the bot.
19247
19272
  */
19248
19273
  async handleExecuteApi(t) {
19249
- var y;
19274
+ var v;
19250
19275
  console.log("[OnboardingSDK] 🔌 Executing API call:", t.method, t.url);
19251
19276
  const {
19252
19277
  method: n = "GET",
@@ -19310,21 +19335,21 @@ class pc extends dh {
19310
19335
  };
19311
19336
  s && n !== "GET" && (b.body = JSON.stringify(s)), console.log("[OnboardingSDK] 📤 Making API request:", h);
19312
19337
  const m = await fetch(h, b);
19313
- let v;
19338
+ let y;
19314
19339
  const w = await m.text();
19315
19340
  try {
19316
- v = JSON.parse(w);
19341
+ y = JSON.parse(w);
19317
19342
  } catch {
19318
- v = { raw: w };
19343
+ y = { raw: w };
19319
19344
  }
19320
- console.log("[OnboardingSDK] 📥 API response:", m.status, v);
19321
- const x = m.ok && this.evaluateJsonPathCondition(v, c), C = this.extractJsonPath(v, u);
19345
+ console.log("[OnboardingSDK] 📥 API response:", m.status, y);
19346
+ const x = m.ok && this.evaluateJsonPathCondition(y, c), C = this.extractJsonPath(y, u);
19322
19347
  let D;
19323
- x || (D = this.extractJsonPath(v, d) || ((y = v.error) == null ? void 0 : y.message) || v.message || `Request failed with status ${m.status}`), this.sendMetadata({
19348
+ x || (D = this.extractJsonPath(y, d) || ((v = y.error) == null ? void 0 : v.message) || y.message || `Request failed with status ${m.status}`), this.sendMetadata({
19324
19349
  type: "api_execution_result",
19325
19350
  success: x,
19326
19351
  status_code: m.status,
19327
- data: v,
19352
+ data: y,
19328
19353
  result_text: C,
19329
19354
  error: D,
19330
19355
  url: h,