@floe-ai/sdk 0.1.0-dev.30 → 0.1.0-dev.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-sdk/floe-sdk.es.js +580 -550
- package/dist-sdk/floe-sdk.es.js.map +1 -1
- package/dist-sdk/floe-sdk.iife.js +29 -29
- package/dist-sdk/floe-sdk.iife.js.map +1 -1
- package/dist-sdk/floe-sdk.umd.js +29 -29
- package/dist-sdk/floe-sdk.umd.js.map +1 -1
- package/package.json +1 -1
package/dist-sdk/floe-sdk.es.js
CHANGED
|
@@ -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,
|
|
3415
|
+
var t, n, i, o, s, a, c, u, d, h, g, b, y, 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;
|
|
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
|
-
(
|
|
3444
|
+
(y = (b = this._options.callbacks) == null ? void 0 : b.onBotStartedSpeaking) == null || y.call(b);
|
|
3445
3445
|
break;
|
|
3446
3446
|
case Y.BOT_STOPPED_SPEAKING:
|
|
3447
|
-
(
|
|
3447
|
+
(v = (m = this._options.callbacks) == null ? void 0 : m.onBotStoppedSpeaking) == null || v.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,
|
|
3718
|
-
return Function.prototype.apply.call(m,
|
|
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);
|
|
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,16 +3728,16 @@ 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,
|
|
3731
|
+
On.exports = i, On.exports.once = function(m, v) {
|
|
3732
3732
|
return new Promise(function(w, x) {
|
|
3733
3733
|
function C(P) {
|
|
3734
|
-
m.removeListener(
|
|
3734
|
+
m.removeListener(v, 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
|
-
|
|
3740
|
-
typeof P.on == "function" &&
|
|
3739
|
+
y(m, v, D, { once: !0 }), v !== "error" && function(P, R, B) {
|
|
3740
|
+
typeof P.on == "function" && y(P, "error", R, B);
|
|
3741
3741
|
}(m, C, { once: !0 });
|
|
3742
3742
|
});
|
|
3743
3743
|
}, i.EventEmitter = i, i.prototype._events = void 0, i.prototype._eventsCount = 0, i.prototype._maxListeners = void 0;
|
|
@@ -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,
|
|
3751
|
+
function c(m, v, 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",
|
|
3754
|
-
else if (typeof P == "function" ? P = D[
|
|
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) {
|
|
3755
3755
|
P.warned = !0;
|
|
3756
|
-
var B = new Error("Possible EventEmitter memory leak detected. " + P.length + " " + String(
|
|
3757
|
-
B.name = "MaxListenersExceededWarning", B.emitter = m, B.type =
|
|
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);
|
|
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,
|
|
3765
|
-
var x = { fired: !1, wrapFn: void 0, target: m, type:
|
|
3764
|
+
function d(m, v, w) {
|
|
3765
|
+
var x = { fired: !1, wrapFn: void 0, target: m, type: v, listener: w }, C = u.bind(x);
|
|
3766
3766
|
return C.listener = w, x.wrapFn = C, C;
|
|
3767
3767
|
}
|
|
3768
|
-
function h(m,
|
|
3768
|
+
function h(m, v, w) {
|
|
3769
3769
|
var x = m._events;
|
|
3770
3770
|
if (x === void 0) return [];
|
|
3771
|
-
var C = x[
|
|
3771
|
+
var C = x[v];
|
|
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) :
|
|
3775
|
+
}(C) : b(C, C.length);
|
|
3776
3776
|
}
|
|
3777
3777
|
function g(m) {
|
|
3778
|
-
var
|
|
3779
|
-
if (
|
|
3780
|
-
var w =
|
|
3778
|
+
var v = this._events;
|
|
3779
|
+
if (v !== void 0) {
|
|
3780
|
+
var w = v[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
|
|
3787
|
-
for (var w = new Array(
|
|
3786
|
+
function b(m, v) {
|
|
3787
|
+
for (var w = new Array(v), x = 0; x < v; ++x) w[x] = m[x];
|
|
3788
3788
|
return w;
|
|
3789
3789
|
}
|
|
3790
|
-
function
|
|
3791
|
-
if (typeof m.on == "function") x.once ? m.once(
|
|
3790
|
+
function y(m, v, w, x) {
|
|
3791
|
+
if (typeof m.on == "function") x.once ? m.once(v, w) : m.on(v, 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(
|
|
3795
|
-
x.once && m.removeEventListener(
|
|
3794
|
+
m.addEventListener(v, function C(D) {
|
|
3795
|
+
x.once && m.removeEventListener(v, 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
|
|
3812
|
+
for (var v = [], w = 1; w < arguments.length; w++) v.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 (
|
|
3818
|
+
if (v.length > 0 && (D = v[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,
|
|
3824
|
+
if (typeof R == "function") t(R, this, v);
|
|
3825
3825
|
else {
|
|
3826
|
-
var B = R.length, re =
|
|
3827
|
-
for (w = 0; w < B; ++w) t(re[w], this,
|
|
3826
|
+
var B = R.length, re = b(R, B);
|
|
3827
|
+
for (w = 0; w < B; ++w) t(re[w], this, v);
|
|
3828
3828
|
}
|
|
3829
3829
|
return !0;
|
|
3830
|
-
}, i.prototype.addListener = function(m,
|
|
3831
|
-
return c(this, m,
|
|
3832
|
-
}, i.prototype.on = i.prototype.addListener, i.prototype.prependListener = function(m,
|
|
3833
|
-
return c(this, m,
|
|
3834
|
-
}, i.prototype.once = function(m,
|
|
3835
|
-
return s(
|
|
3836
|
-
}, i.prototype.prependOnceListener = function(m,
|
|
3837
|
-
return s(
|
|
3838
|
-
}, i.prototype.removeListener = function(m,
|
|
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) {
|
|
3839
3839
|
var w, x, C, D, P;
|
|
3840
|
-
if (s(
|
|
3840
|
+
if (s(v), (x = this._events) === void 0) return this;
|
|
3841
3841
|
if ((w = x[m]) === void 0) return this;
|
|
3842
|
-
if (w ===
|
|
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));
|
|
3843
3843
|
else if (typeof w != "function") {
|
|
3844
|
-
for (C = -1, D = w.length - 1; D >= 0; D--) if (w[D] ===
|
|
3844
|
+
for (C = -1, D = w.length - 1; D >= 0; D--) if (w[D] === v || w[D].listener === v) {
|
|
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 ||
|
|
3852
|
+
}(w, C), w.length === 1 && (x[m] = w[0]), x.removeListener !== void 0 && this.emit("removeListener", m, P || v);
|
|
3853
3853
|
}
|
|
3854
3854
|
return this;
|
|
3855
3855
|
}, i.prototype.off = i.prototype.removeListener, i.prototype.removeAllListeners = function(m) {
|
|
3856
|
-
var
|
|
3856
|
+
var v, 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 (
|
|
3865
|
-
else if (
|
|
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]);
|
|
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,
|
|
3872
|
-
return typeof m.listenerCount == "function" ? m.listenerCount(
|
|
3871
|
+
}, i.listenerCount = function(m, v) {
|
|
3872
|
+
return typeof m.listenerCount == "function" ? m.listenerCount(v) : g.call(m, v);
|
|
3873
3873
|
}, i.prototype.listenerCount = g, i.prototype.eventNames = function() {
|
|
3874
3874
|
return this._eventsCount > 0 ? r(this._events) : [];
|
|
3875
3875
|
}, On.exports;
|
|
@@ -5184,13 +5184,13 @@ 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(
|
|
5187
|
+
return h !== "url" && g && (a.transaction = g), function(b) {
|
|
5188
5188
|
if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__) return !1;
|
|
5189
|
-
const
|
|
5189
|
+
const y = Ce(), m = y && y.getOptions();
|
|
5190
5190
|
return !!m && (m.enableTracing || "tracesSampleRate" in m || "tracesSampler" in m);
|
|
5191
|
-
}() && (a.sampled = String(function(
|
|
5192
|
-
const { traceFlags:
|
|
5193
|
-
return
|
|
5191
|
+
}() && (a.sampled = String(function(b) {
|
|
5192
|
+
const { traceFlags: y } = b.spanContext();
|
|
5193
|
+
return y === 1;
|
|
5194
5194
|
}(t))), e.emit("createDsc", a, t), a;
|
|
5195
5195
|
}
|
|
5196
5196
|
const fl = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;
|
|
@@ -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
|
|
5215
|
-
|
|
5214
|
+
const b = h.match(/^\d+/);
|
|
5215
|
+
b && (h = b[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,26 +5254,26 @@ 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(
|
|
5257
|
+
const a = function(b, y) {
|
|
5258
5258
|
try {
|
|
5259
|
-
if (
|
|
5260
|
-
if (
|
|
5261
|
-
if (typeof global < "u" &&
|
|
5262
|
-
if (typeof window < "u" &&
|
|
5263
|
-
if (typeof document < "u" &&
|
|
5264
|
-
if (Sa(
|
|
5265
|
-
if (Qt(m =
|
|
5266
|
-
if (typeof
|
|
5267
|
-
if (typeof
|
|
5268
|
-
if (typeof
|
|
5269
|
-
if (typeof
|
|
5270
|
-
const
|
|
5259
|
+
if (b === "domain" && y && typeof y == "object" && y._events) return "[Domain]";
|
|
5260
|
+
if (b === "domainEmitter") return "[DomainEmitter]";
|
|
5261
|
+
if (typeof global < "u" && y === global) return "[Global]";
|
|
5262
|
+
if (typeof window < "u" && y === window) return "[Window]";
|
|
5263
|
+
if (typeof document < "u" && y === document) return "[Document]";
|
|
5264
|
+
if (Sa(y)) return "[VueViewModel]";
|
|
5265
|
+
if (Qt(m = y) && "nativeEvent" in m && "preventDefault" in m && "stopPropagation" in m) return "[SyntheticEvent]";
|
|
5266
|
+
if (typeof y == "number" && !Number.isFinite(y)) return `[${y}]`;
|
|
5267
|
+
if (typeof y == "function") return `[Function: ${_t(y)}]`;
|
|
5268
|
+
if (typeof y == "symbol") return `[${String(y)}]`;
|
|
5269
|
+
if (typeof y == "bigint") return `[BigInt: ${String(y)}]`;
|
|
5270
|
+
const v = function(w) {
|
|
5271
5271
|
const x = Object.getPrototypeOf(w);
|
|
5272
5272
|
return x ? x.constructor.name : "null prototype";
|
|
5273
|
-
}(
|
|
5274
|
-
return /^HTML(\w*)Element$/.test(
|
|
5275
|
-
} catch (
|
|
5276
|
-
return `**non-serializable** (${
|
|
5273
|
+
}(y);
|
|
5274
|
+
return /^HTML(\w*)Element$/.test(v) ? `[HTMLElement: ${v}]` : `[object ${v}]`;
|
|
5275
|
+
} catch (v) {
|
|
5276
|
+
return `**non-serializable** (${v})`;
|
|
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
|
|
5294
|
-
if (!Object.prototype.hasOwnProperty.call(g,
|
|
5293
|
+
for (const b in g) {
|
|
5294
|
+
if (!Object.prototype.hasOwnProperty.call(g, b)) continue;
|
|
5295
5295
|
if (h >= n) {
|
|
5296
|
-
d[
|
|
5296
|
+
d[b] = "[MaxProperties ~]";
|
|
5297
5297
|
break;
|
|
5298
5298
|
}
|
|
5299
|
-
const
|
|
5300
|
-
d[
|
|
5299
|
+
const y = g[b];
|
|
5300
|
+
d[b] = Wr(b, y, 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:
|
|
5387
|
-
|
|
5386
|
+
const { extra: c, tags: u, user: d, contexts: h, level: g, transactionName: b } = a, y = He(c);
|
|
5387
|
+
y && Object.keys(y).length && (s.extra = { ...y, ...s.extra });
|
|
5388
5388
|
const m = He(u);
|
|
5389
5389
|
m && Object.keys(m).length && (s.tags = { ...m, ...s.tags });
|
|
5390
|
-
const
|
|
5391
|
-
|
|
5390
|
+
const v = He(d);
|
|
5391
|
+
v && Object.keys(v).length && (s.user = { ...v, ...s.user });
|
|
5392
5392
|
const w = He(h);
|
|
5393
|
-
w && Object.keys(w).length && (s.contexts = { ...w, ...s.contexts }), g && (s.level = g),
|
|
5393
|
+
w && Object.keys(w).length && (s.contexts = { ...w, ...s.contexts }), g && (s.level = g), b && s.type !== "transaction" && (s.transaction = b);
|
|
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,25 +5405,25 @@ 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:
|
|
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),
|
|
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: b, span: y } = 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), b && (r.transactionName = b), y && (r.span = y), 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);
|
|
5413
5413
|
}
|
|
5414
5414
|
function kl(r, e, t, n, i, o) {
|
|
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((
|
|
5416
|
-
(function(
|
|
5417
|
-
const { environment:
|
|
5418
|
-
|
|
5419
|
-
const D =
|
|
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((y) => y.name);
|
|
5416
|
+
(function(y, m) {
|
|
5417
|
+
const { environment: v, release: w, dist: x, maxValueLength: C = 250 } = m;
|
|
5418
|
+
y.environment = y.environment || v || Ei, !y.release && w && (y.release = w), !y.dist && x && (y.dist = x), y.message && (y.message = Gt(y.message, C));
|
|
5419
|
+
const D = y.exception && y.exception.values && y.exception.values[0];
|
|
5420
5420
|
D && D.value && (D.value = Gt(D.value, C));
|
|
5421
|
-
const P =
|
|
5421
|
+
const P = y.request;
|
|
5422
5422
|
P && P.url && (P.url = Gt(P.url, C));
|
|
5423
|
-
})(c, r), function(
|
|
5424
|
-
m.length > 0 && (
|
|
5425
|
-
}(c, u), i && i.emit("applyFrameMetadata", e), e.type === void 0 && function(
|
|
5426
|
-
const
|
|
5423
|
+
})(c, r), function(y, m) {
|
|
5424
|
+
m.length > 0 && (y.sdk = y.sdk || {}, y.sdk.integrations = [...y.sdk.integrations || [], ...m]);
|
|
5425
|
+
}(c, u), i && i.emit("applyFrameMetadata", e), e.type === void 0 && function(y, m) {
|
|
5426
|
+
const v = function(w) {
|
|
5427
5427
|
const x = ce._sentryDebugIds;
|
|
5428
5428
|
if (!x) return {};
|
|
5429
5429
|
const C = Object.keys(x);
|
|
@@ -5445,44 +5445,44 @@ function kl(r, e, t, n, i, o) {
|
|
|
5445
5445
|
}, {})), wr;
|
|
5446
5446
|
}(m);
|
|
5447
5447
|
try {
|
|
5448
|
-
|
|
5448
|
+
y.exception.values.forEach((w) => {
|
|
5449
5449
|
w.stacktrace.frames.forEach((x) => {
|
|
5450
|
-
|
|
5450
|
+
v && x.filename && (x.debug_id = v[x.filename]);
|
|
5451
5451
|
});
|
|
5452
5452
|
});
|
|
5453
5453
|
} catch {
|
|
5454
5454
|
}
|
|
5455
5455
|
}(c, r.stackParser);
|
|
5456
|
-
const d = function(
|
|
5457
|
-
if (!m) return
|
|
5458
|
-
const
|
|
5459
|
-
return
|
|
5456
|
+
const d = function(y, m) {
|
|
5457
|
+
if (!m) return y;
|
|
5458
|
+
const v = y ? y.clone() : new Ct();
|
|
5459
|
+
return v.update(m), v;
|
|
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
|
|
5465
|
-
return
|
|
5466
|
-
const
|
|
5464
|
+
const b = [...t.attachments || [], ...g.attachments];
|
|
5465
|
+
return b.length && (t.attachments = b), Sl(c, g), Gr([...h, ...g.eventProcessors], c, t).then((y) => (y && function(m) {
|
|
5466
|
+
const v = {};
|
|
5467
5467
|
try {
|
|
5468
5468
|
m.exception.values.forEach((x) => {
|
|
5469
5469
|
x.stacktrace.frames.forEach((C) => {
|
|
5470
|
-
C.debug_id && (C.abs_path ?
|
|
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);
|
|
5471
5471
|
});
|
|
5472
5472
|
});
|
|
5473
5473
|
} catch {
|
|
5474
5474
|
}
|
|
5475
|
-
if (Object.keys(
|
|
5475
|
+
if (Object.keys(v).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(
|
|
5478
|
+
Object.entries(v).forEach(([x, C]) => {
|
|
5479
5479
|
w.push({ type: "sourcemap", code_file: x, debug_id: C });
|
|
5480
5480
|
});
|
|
5481
|
-
}(
|
|
5481
|
+
}(y), typeof s == "number" && s > 0 ? function(m, v, 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,
|
|
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,
|
|
5485
|
-
}(
|
|
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;
|
|
5485
|
+
}(y, s, a) : y));
|
|
5486
5486
|
}
|
|
5487
5487
|
function bo(r, e) {
|
|
5488
5488
|
return zt().captureEvent(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(
|
|
5697
|
-
if (typeof
|
|
5698
|
-
const
|
|
5699
|
-
if (!(typeof
|
|
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(
|
|
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(b) {
|
|
5697
|
+
if (typeof b == "boolean") return Number(b);
|
|
5698
|
+
const y = typeof b == "string" ? parseFloat(b) : b;
|
|
5699
|
+
if (!(typeof y != "number" || isNaN(y) || y < 0 || y > 1)) return 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(b)} of type ${JSON.stringify(typeof b)}.`);
|
|
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((
|
|
5705
|
-
if (
|
|
5706
|
-
if (t.data && t.data.__sentry__ === !0) return
|
|
5707
|
-
const
|
|
5708
|
-
const { beforeSend: C, beforeSendTransaction: D, beforeSendSpan: P } =
|
|
5704
|
+
return this._prepareEvent(e, t, n, g).then((b) => {
|
|
5705
|
+
if (b === 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 b;
|
|
5707
|
+
const y = function(m, v, w, x) {
|
|
5708
|
+
const { beforeSend: C, beforeSendTransaction: D, beforeSendSpan: P } = v;
|
|
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,
|
|
5729
|
-
return function(m,
|
|
5730
|
-
const w = `${
|
|
5728
|
+
}(this, i, b, t);
|
|
5729
|
+
return function(m, v) {
|
|
5730
|
+
const w = `${v} 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(`${
|
|
5735
|
+
throw new Je(`${v} rejected with ${x}`);
|
|
5736
5736
|
});
|
|
5737
5737
|
if (!Qt(m) && m !== null) throw new Je(w);
|
|
5738
5738
|
return m;
|
|
5739
|
-
}(
|
|
5740
|
-
}).then((
|
|
5741
|
-
if (
|
|
5739
|
+
}(y, u);
|
|
5740
|
+
}).then((b) => {
|
|
5741
|
+
if (b === null) {
|
|
5742
5742
|
if (this.recordDroppedEvent("before_send", h, e), s) {
|
|
5743
|
-
const
|
|
5744
|
-
this.recordDroppedEvent("before_send", "span",
|
|
5743
|
+
const v = 1 + (e.spans || []).length;
|
|
5744
|
+
this.recordDroppedEvent("before_send", "span", v);
|
|
5745
5745
|
}
|
|
5746
5746
|
throw new Je(`${u} returned \`null\`, will not send event.`, "log");
|
|
5747
5747
|
}
|
|
5748
|
-
const
|
|
5749
|
-
if (!s &&
|
|
5750
|
-
const
|
|
5751
|
-
|
|
5748
|
+
const y = n && n.getSession();
|
|
5749
|
+
if (!s && y && this._updateSessionFromEvent(y, b), s) {
|
|
5750
|
+
const v = (b.sdkProcessingMetadata && b.sdkProcessingMetadata.spanCountBeforeProcessing || 0) - (b.spans ? b.spans.length : 0);
|
|
5751
|
+
v > 0 && this.recordDroppedEvent("before_send", "span", v);
|
|
5752
5752
|
}
|
|
5753
|
-
const m =
|
|
5754
|
-
if (s && m &&
|
|
5755
|
-
const
|
|
5756
|
-
|
|
5753
|
+
const m = b.transaction_info;
|
|
5754
|
+
if (s && m && b.transaction !== e.transaction) {
|
|
5755
|
+
const v = "custom";
|
|
5756
|
+
b.transaction_info = { ...m, source: v };
|
|
5757
5757
|
}
|
|
5758
|
-
return this.sendEvent(
|
|
5759
|
-
}).then(null, (
|
|
5760
|
-
throw
|
|
5761
|
-
Reason: ${
|
|
5758
|
+
return this.sendEvent(b, t), b;
|
|
5759
|
+
}).then(null, (b) => {
|
|
5760
|
+
throw b instanceof Je ? b : (this.captureException(b, { data: { __sentry__: !0 }, originalException: b }), new Je(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
5761
|
+
Reason: ${b}`));
|
|
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
|
|
5820
|
+
if (u) for (const b of u.split(";")) b === "metric_bucket" && d && !d.split(";").includes("custom") || (i[b] = 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,
|
|
5838
|
-
return function(
|
|
5839
|
-
return
|
|
5840
|
-
}(h, g) >
|
|
5837
|
+
if (function(h, g, b = Date.now()) {
|
|
5838
|
+
return function(y, m) {
|
|
5839
|
+
return y[m] || y.all || 0;
|
|
5840
|
+
}(h, g) > b;
|
|
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 [
|
|
6077
|
-
return { url: Ro(
|
|
6076
|
+
const [b, y] = h;
|
|
6077
|
+
return { url: Ro(b), method: Qr(y, "method") ? String(y.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,
|
|
6390
|
-
return
|
|
6389
|
+
const [g, b] = h, y = d[mn];
|
|
6390
|
+
return y && dt(g) && dt(b) && (y.request_headers[g.toLowerCase()] = b), 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,
|
|
6508
|
-
return !!
|
|
6507
|
+
const g = s.event, b = function(y) {
|
|
6508
|
+
return !!y && !!y.target;
|
|
6509
6509
|
}(g) ? g.target : g;
|
|
6510
|
-
a = ka(
|
|
6510
|
+
a = ka(b, { keyAttrs: u, maxStringLength: d }), c = function(y) {
|
|
6511
6511
|
if (!Si.HTMLElement) return null;
|
|
6512
|
-
let m =
|
|
6513
|
-
for (let
|
|
6512
|
+
let m = y;
|
|
6513
|
+
for (let v = 0; v < 5; v++) {
|
|
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
|
-
}(
|
|
6522
|
+
}(b);
|
|
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,
|
|
6538
|
-
Tt({ category: "xhr", data:
|
|
6537
|
+
const { method: u, url: d, status_code: h, body: g } = c, b = { method: u, url: d, status_code: h }, y = { xhr: o.xhr, input: g, startTimestamp: s, endTimestamp: a };
|
|
6538
|
+
Tt({ category: "xhr", data: b, type: "http", level: Io(h) }, y);
|
|
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(
|
|
6634
|
-
const w =
|
|
6633
|
+
const { msg: a, url: c, line: u, column: d, error: h } = i, g = function(b, y, m, v) {
|
|
6634
|
+
const w = b.exception = b.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(y) && y.length > 0 ? y : 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 }),
|
|
6641
|
+
return P.length === 0 && P.push({ colno: R, filename: re, function: Pt, in_app: !0, lineno: B }), b;
|
|
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),
|
|
7597
|
-
if (!
|
|
7596
|
+
var h = d[u], g = Ee(ke.validateJSONObject(h), 2), b = g[0], y = g[1];
|
|
7597
|
+
if (!b) return [!1, y];
|
|
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
|
|
7857
|
+
var b, y = ["participants", "streaming", "transcription"], m = ks(o);
|
|
7858
7858
|
try {
|
|
7859
|
-
for (m.s(); !(
|
|
7860
|
-
var
|
|
7861
|
-
if (!
|
|
7859
|
+
for (m.s(); !(b = m.n()).done; ) {
|
|
7860
|
+
var v = b.value;
|
|
7861
|
+
if (!y.includes(v)) 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: (
|
|
8523
|
+
} }, { key: "startDialOut", value: (v = 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
|
|
8585
|
+
return v.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) {
|
|
@@ -8600,7 +8600,7 @@ var jd = function() {
|
|
|
8600
8600
|
});
|
|
8601
8601
|
}), function(l) {
|
|
8602
8602
|
return m.apply(this, arguments);
|
|
8603
|
-
}) }, { key: "sipRefer", value: (
|
|
8603
|
+
}) }, { key: "sipRefer", value: (y = W(function* (l) {
|
|
8604
8604
|
var f = this;
|
|
8605
8605
|
if (fe(this._callState, "sipRefer()"), !l) throw new Error("sessionId and toEndPoint are mandatory parameter");
|
|
8606
8606
|
return l.useSipRefer = !0, Ds(l, "sipRefer"), new Promise(function(p, S) {
|
|
@@ -8609,8 +8609,8 @@ var jd = function() {
|
|
|
8609
8609
|
});
|
|
8610
8610
|
});
|
|
8611
8611
|
}), function(l) {
|
|
8612
|
-
return
|
|
8613
|
-
}) }, { key: "sendDTMF", value: (
|
|
8612
|
+
return y.apply(this, arguments);
|
|
8613
|
+
}) }, { key: "sendDTMF", value: (b = 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
|
|
8628
|
+
return b.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,
|
|
9338
|
+
var e, t, n, i, o, s, a, c, u, d, h, g, b, y, m, v, 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,8 +9462,8 @@ 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
|
|
9466
|
-
switch (
|
|
9465
|
+
var b = Ee(g[h], 2), y = b[0], m = b[1];
|
|
9466
|
+
switch (y) {
|
|
9467
9467
|
case "processor":
|
|
9468
9468
|
if (!Ud(m)) return !1;
|
|
9469
9469
|
break;
|
|
@@ -9517,11 +9517,11 @@ function Hd(r) {
|
|
|
9517
9517
|
if (d.protocol === "data:") try {
|
|
9518
9518
|
var g = h.substring(h.indexOf(":") + 1, h.indexOf(";")).split("/")[1];
|
|
9519
9519
|
return Or.includes(g);
|
|
9520
|
-
} catch (
|
|
9521
|
-
return console.error("failed to deduce blob content type",
|
|
9520
|
+
} catch (y) {
|
|
9521
|
+
return console.error("failed to deduce blob content type", y), !1;
|
|
9522
9522
|
}
|
|
9523
|
-
var
|
|
9524
|
-
return Or.includes(
|
|
9523
|
+
var b = h.split(".").at(-1).toLowerCase().trim();
|
|
9524
|
+
return Or.includes(b);
|
|
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;
|
|
@@ -9805,18 +9805,18 @@ class sn {
|
|
|
9805
9805
|
const a = t / 2, c = 1 / n.length * a;
|
|
9806
9806
|
let u, d, h;
|
|
9807
9807
|
if (i === "music" || i === "voice") {
|
|
9808
|
-
const
|
|
9809
|
-
for (let
|
|
9810
|
-
const w =
|
|
9811
|
-
for (let C =
|
|
9808
|
+
const y = i === "voice" ? Rs : xt, m = Array(y.length).fill(o);
|
|
9809
|
+
for (let v = 0; v < n.length; v++) {
|
|
9810
|
+
const w = v * c, x = n[v];
|
|
9811
|
+
for (let C = y.length - 1; C >= 0; C--) if (w > y[C]) {
|
|
9812
9812
|
m[C] = Math.max(m[C], x);
|
|
9813
9813
|
break;
|
|
9814
9814
|
}
|
|
9815
9815
|
}
|
|
9816
9816
|
u = m, d = i === "voice" ? Rs : xt, h = i === "voice" ? Vd : Li;
|
|
9817
9817
|
} else
|
|
9818
|
-
u = Array.from(n), d = u.map((
|
|
9819
|
-
const g = u.map((
|
|
9818
|
+
u = Array.from(n), d = u.map((y, m) => c * m), h = d.map((y) => `${y.toFixed(2)} Hz`);
|
|
9819
|
+
const g = u.map((y) => Math.max(0, Math.min((y - o) / (s - o), 1)));
|
|
9820
9820
|
return {
|
|
9821
9821
|
values: new Float32Array(g),
|
|
9822
9822
|
frequencies: d,
|
|
@@ -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
|
|
9845
|
-
a.getFloatFrequencyData(
|
|
9844
|
+
const b = new Float32Array(a.frequencyBinCount);
|
|
9845
|
+
a.getFloatFrequencyData(b), this.fftResults.push(b), 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
|
|
10729
|
+
const b = {
|
|
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
|
-
const
|
|
10734
|
+
const y = this._chunkProcessorBuffer;
|
|
10735
10735
|
this._chunkProcessorBuffer = {
|
|
10736
|
-
raw: Ge.mergeBuffers(
|
|
10737
|
-
mono: Ge.mergeBuffers(
|
|
10736
|
+
raw: Ge.mergeBuffers(y.raw, b.raw),
|
|
10737
|
+
mono: Ge.mergeBuffers(y.mono, b.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(
|
|
10742
|
+
} else this._chunkProcessor(b);
|
|
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,
|
|
11006
|
+
var i, o, s, a, c, u, d, h, g, b, y, m, v, 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 = (
|
|
11012
|
+
video: (m = (y = (b = e == null ? void 0 : e.local) == null ? void 0 : b.tracks) == null ? void 0 : y.video) == null ? void 0 : m.persistentTrack
|
|
11013
11013
|
}
|
|
11014
11014
|
};
|
|
11015
11015
|
return t && (n.bot = {
|
|
11016
|
-
audio: (w = (
|
|
11016
|
+
audio: (w = (v = t == null ? void 0 : t.tracks) == null ? void 0 : v.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,
|
|
11034
|
+
var s, a, c, u, d, h, g, b, y, m, v, 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), (
|
|
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), (b = (g = this._callbacks).onCamUpdated) == null || b.call(g, e.camera), (m = (y = this._callbacks).onMicUpdated) == null || m.call(y, 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";
|
|
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,
|
|
11323
|
+
const h = i || o, [g, b] = Ue(!1), [y, m] = Ue(!1), [v, 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 :
|
|
11367
|
+
}, []), re = a !== void 0 ? a : y && !v && !r;
|
|
11368
11368
|
Ye(() => {
|
|
11369
|
-
if (a === void 0 && d && h && !r && !
|
|
11369
|
+
if (a === void 0 && d && h && !r && !v) {
|
|
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,
|
|
11381
|
+
}, [h, r, v, 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: () =>
|
|
11444
|
-
onMouseLeave: () =>
|
|
11443
|
+
onMouseEnter: () => b(!0),
|
|
11444
|
+
onMouseLeave: () => b(!1),
|
|
11445
11445
|
style: {
|
|
11446
11446
|
position: "relative",
|
|
11447
11447
|
width: `${X}px`,
|
|
@@ -11509,41 +11509,41 @@ 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
|
|
11512
|
+
const y = Array(a).fill(0).map((m, v) => {
|
|
11513
11513
|
let w = 0;
|
|
11514
|
-
if (
|
|
11514
|
+
if (v === 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 = (
|
|
11517
|
+
const x = Math.floor(s.length / (a - 1)), C = (v - 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 -
|
|
11521
|
+
w = R > 0 ? P / R : 0, w = w * (1 - v * 0.08);
|
|
11522
11522
|
}
|
|
11523
11523
|
return Math.max(0.15, Math.min(1, 0.15 + w * 0.85));
|
|
11524
11524
|
});
|
|
11525
|
-
h.current =
|
|
11525
|
+
h.current = y;
|
|
11526
11526
|
} else r || (h.current = Array(a).fill(0.15));
|
|
11527
11527
|
}, [s, r, a]), Ye(() => {
|
|
11528
|
-
const
|
|
11529
|
-
u((m) => m.map((
|
|
11528
|
+
const y = () => {
|
|
11529
|
+
u((m) => m.map((v, w) => {
|
|
11530
11530
|
const x = h.current[w] || 0.15, C = r ? 0.35 : 0.15;
|
|
11531
|
-
return
|
|
11532
|
-
})), d.current = requestAnimationFrame(
|
|
11531
|
+
return v + (x - v) * C;
|
|
11532
|
+
})), d.current = requestAnimationFrame(y);
|
|
11533
11533
|
};
|
|
11534
|
-
return d.current = requestAnimationFrame(
|
|
11534
|
+
return d.current = requestAnimationFrame(y), () => {
|
|
11535
11535
|
d.current && cancelAnimationFrame(d.current);
|
|
11536
11536
|
};
|
|
11537
11537
|
}, [r, a]);
|
|
11538
11538
|
const g = Us.useMemo(() => {
|
|
11539
|
-
const
|
|
11539
|
+
const y = [];
|
|
11540
11540
|
for (let m = a - 1; m > 0; m--)
|
|
11541
|
-
|
|
11542
|
-
|
|
11541
|
+
y.push(c[m]);
|
|
11542
|
+
y.push(c[0]);
|
|
11543
11543
|
for (let m = 1; m < a; m++)
|
|
11544
|
-
|
|
11545
|
-
return
|
|
11546
|
-
}, [c, a]),
|
|
11544
|
+
y.push(c[m]);
|
|
11545
|
+
return y;
|
|
11546
|
+
}, [c, a]), b = 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: `${
|
|
11555
|
+
width: `${b}px`,
|
|
11556
11556
|
gap: `${o}px`
|
|
11557
11557
|
},
|
|
11558
|
-
children: g.map((
|
|
11559
|
-
const
|
|
11558
|
+
children: g.map((y, m) => {
|
|
11559
|
+
const v = m === Math.floor(g.length / 2), w = Math.max(4, t * y * (v ? 1.1 : 1));
|
|
11560
11560
|
return /* @__PURE__ */ T(
|
|
11561
11561
|
"div",
|
|
11562
11562
|
{
|
|
@@ -11568,7 +11568,7 @@ const Ot = (r) => ({
|
|
|
11568
11568
|
transition: "none",
|
|
11569
11569
|
// Using requestAnimationFrame for smoother animation
|
|
11570
11570
|
opacity: r ? 1 : 0.4,
|
|
11571
|
-
boxShadow: r &&
|
|
11571
|
+
boxShadow: r && y > 0.3 ? `0 0 ${6 * y}px ${e}50` : "none"
|
|
11572
11572
|
}
|
|
11573
11573
|
},
|
|
11574
11574
|
m
|
|
@@ -11590,10 +11590,10 @@ const Ot = (r) => ({
|
|
|
11590
11590
|
onToggleConnection: d,
|
|
11591
11591
|
onToggleMute: h,
|
|
11592
11592
|
onToggleScreenShare: g,
|
|
11593
|
-
onMinimize:
|
|
11594
|
-
onResume:
|
|
11593
|
+
onMinimize: b,
|
|
11594
|
+
onResume: y,
|
|
11595
11595
|
onStop: m,
|
|
11596
|
-
connectionProgress:
|
|
11596
|
+
connectionProgress: v,
|
|
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 (
|
|
11618
|
+
return (v == null ? void 0 : v.message) || "Connecting...";
|
|
11619
11619
|
if (w && t)
|
|
11620
11620
|
switch (e) {
|
|
11621
11621
|
case "listening":
|
|
@@ -11825,10 +11825,10 @@ const Ot = (r) => ({
|
|
|
11825
11825
|
] })
|
|
11826
11826
|
}
|
|
11827
11827
|
),
|
|
11828
|
-
e === "paused" &&
|
|
11828
|
+
e === "paused" && y && /* @__PURE__ */ T(
|
|
11829
11829
|
pn,
|
|
11830
11830
|
{
|
|
11831
|
-
onClick:
|
|
11831
|
+
onClick: y,
|
|
11832
11832
|
tooltip: "Resume",
|
|
11833
11833
|
ariaLabel: "Resume session",
|
|
11834
11834
|
active: !0,
|
|
@@ -11881,7 +11881,7 @@ const Ot = (r) => ({
|
|
|
11881
11881
|
/* @__PURE__ */ T(
|
|
11882
11882
|
pn,
|
|
11883
11883
|
{
|
|
11884
|
-
onClick:
|
|
11884
|
+
onClick: b,
|
|
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" &&
|
|
11968
|
+
e === "connecting" && v && /* @__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:
|
|
11994
|
+
/* @__PURE__ */ T("span", { style: { fontSize: "12px", fontWeight: "600", color: "rgba(255, 255, 255, 0.9)" }, children: v.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: `${
|
|
11999
|
+
width: `${v.progress}%`,
|
|
12000
12000
|
height: "100%",
|
|
12001
12001
|
background: "linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%)",
|
|
12002
12002
|
borderRadius: "2px",
|
|
@@ -12030,10 +12030,10 @@ const Ot = (r) => ({
|
|
|
12030
12030
|
/* @__PURE__ */ T("span", { style: { color: "#f59e0b", fontSize: "13px", fontWeight: "600" }, children: "Session Paused" })
|
|
12031
12031
|
] }),
|
|
12032
12032
|
/* @__PURE__ */ T("div", { style: { color: "rgba(255, 255, 255, 0.5)", fontSize: "12px", textAlign: "center", lineHeight: "1.4" }, children: "You were inactive. Click Resume to continue." }),
|
|
12033
|
-
|
|
12033
|
+
y && /* @__PURE__ */ G(
|
|
12034
12034
|
"button",
|
|
12035
12035
|
{
|
|
12036
|
-
onClick:
|
|
12036
|
+
onClick: y,
|
|
12037
12037
|
style: {
|
|
12038
12038
|
padding: "8px 20px",
|
|
12039
12039
|
background: "linear-gradient(135deg, #f59e0b 0%, #d97706 100%)",
|
|
@@ -12234,7 +12234,7 @@ const Ot = (r) => ({
|
|
|
12234
12234
|
barCount: 7,
|
|
12235
12235
|
audioLevels: u
|
|
12236
12236
|
}
|
|
12237
|
-
) : e === "connecting" &&
|
|
12237
|
+
) : e === "connecting" && v ? /* @__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:
|
|
12252
|
+
/* @__PURE__ */ T("span", { style: { fontSize: "12px", color: "#fbbf24", fontWeight: "500" }, children: v.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:
|
|
12577
|
-
pausedSessionId:
|
|
12576
|
+
onResume: b,
|
|
12577
|
+
pausedSessionId: y,
|
|
12578
12578
|
onStop: m,
|
|
12579
|
-
connectionProgress:
|
|
12579
|
+
connectionProgress: v,
|
|
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:
|
|
12653
|
+
onResume: b,
|
|
12654
12654
|
onStop: m,
|
|
12655
|
-
connectionProgress:
|
|
12655
|
+
connectionProgress: v,
|
|
12656
12656
|
textModeEnabled: P,
|
|
12657
12657
|
onToggleTextMode: R,
|
|
12658
12658
|
onSendText: B,
|
|
@@ -12830,24 +12830,24 @@ 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
|
|
12834
|
-
if (h.contains(
|
|
12835
|
-
const
|
|
12836
|
-
if (
|
|
12833
|
+
for (const b of n)
|
|
12834
|
+
if (h.contains(b) && h !== b) {
|
|
12835
|
+
const y = c(h), m = c(b);
|
|
12836
|
+
if (y === "card" || y === "listitem" || y === "option") {
|
|
12837
12837
|
if (!u(h)) {
|
|
12838
12838
|
g = !0;
|
|
12839
12839
|
break;
|
|
12840
12840
|
}
|
|
12841
|
-
} else if (
|
|
12841
|
+
} else if (y === m) {
|
|
12842
12842
|
g = !0;
|
|
12843
12843
|
break;
|
|
12844
12844
|
}
|
|
12845
12845
|
}
|
|
12846
12846
|
if (!g) {
|
|
12847
|
-
for (const
|
|
12848
|
-
if (
|
|
12849
|
-
const
|
|
12850
|
-
if (!
|
|
12847
|
+
for (const b of n)
|
|
12848
|
+
if (b.contains(h) && b !== h) {
|
|
12849
|
+
const y = u(h), m = u(b);
|
|
12850
|
+
if (!y || y === m) {
|
|
12851
12851
|
g = !0;
|
|
12852
12852
|
break;
|
|
12853
12853
|
}
|
|
@@ -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,
|
|
12906
|
+
var h, g, b, y, m, v;
|
|
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 = (
|
|
12933
|
+
const w = (y = (b = a.querySelector("title")) == null ? void 0 : b.textContent) == null ? void 0 : y.trim();
|
|
12934
12934
|
if (w) return w.slice(0, 100);
|
|
12935
|
-
const x = (
|
|
12935
|
+
const x = (v = (m = a.querySelector("desc")) == null ? void 0 : m.textContent) == null ? void 0 : v.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,
|
|
13154
|
+
var c, u, d, h, g, b, y, m;
|
|
13155
13155
|
const t = e.getAttribute("aria-describedby");
|
|
13156
13156
|
if (t) {
|
|
13157
|
-
const
|
|
13158
|
-
if (
|
|
13157
|
+
const v = document.getElementById(t);
|
|
13158
|
+
if (v) return ((c = v.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
|
|
13163
|
-
if (
|
|
13162
|
+
const v = n.querySelector("legend");
|
|
13163
|
+
if (v) return ((u = v.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
|
|
13168
|
-
if (
|
|
13169
|
-
return ((d =
|
|
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;
|
|
13170
13170
|
}
|
|
13171
13171
|
const o = e.closest('section, [role="region"], form, [class*="section"], [class*="Section"]');
|
|
13172
13172
|
if (o) {
|
|
13173
|
-
const
|
|
13174
|
-
if (
|
|
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;
|
|
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
|
|
13181
|
-
if (
|
|
13180
|
+
const v = (b = s.textContent) == null ? void 0 : b.trim();
|
|
13181
|
+
if (v && v.length < 50) return v;
|
|
13182
13182
|
}
|
|
13183
|
-
const a = (
|
|
13183
|
+
const a = (y = e.parentElement) == null ? void 0 : y.previousElementSibling;
|
|
13184
13184
|
if (a && a.matches('p, label, [class*="label"], [class*="Label"]')) {
|
|
13185
|
-
const
|
|
13186
|
-
if (
|
|
13185
|
+
const v = (m = a.textContent) == null ? void 0 : m.trim();
|
|
13186
|
+
if (v && v.length < 50) return v;
|
|
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,
|
|
13512
|
+
var g, b, y, m, v;
|
|
13513
13513
|
const {
|
|
13514
13514
|
focus: t = !0,
|
|
13515
13515
|
includePointerEvents: n = !0,
|
|
@@ -13532,15 +13532,15 @@ function dc(r, e = {}) {
|
|
|
13532
13532
|
), console.warn(
|
|
13533
13533
|
"[humanLikeClick] Expected target:",
|
|
13534
13534
|
r.tagName,
|
|
13535
|
-
(
|
|
13535
|
+
(b = r.className) == null ? void 0 : b.toString().slice(0, 50)
|
|
13536
13536
|
), uh(u)) {
|
|
13537
|
-
const w = `${u.tagName} (${(
|
|
13537
|
+
const w = `${u.tagName} (${(y = u.className) == null ? void 0 : y.toString().slice(0, 80)})`;
|
|
13538
13538
|
throw console.error(
|
|
13539
13539
|
"[humanLikeClick] ❌ BLOCKED: Modal/dialog overlay is covering the target element.",
|
|
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 "${(
|
|
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.`
|
|
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
|
|
13753
|
-
return `${g.tag}:${(
|
|
13752
|
+
var b;
|
|
13753
|
+
return `${g.tag}:${(b = g.text) == null ? void 0 : b.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,
|
|
13876
|
-
if (h && g &&
|
|
13877
|
-
let
|
|
13878
|
-
if (t && u.tagName.toLowerCase() === t.toLowerCase() && (
|
|
13875
|
+
const d = u.getBoundingClientRect(), h = Math.abs(d.x - e.x) <= 10, g = Math.abs(d.y - e.y) <= 10, b = Math.abs(d.width - e.width) <= 10 * 2, y = Math.abs(d.height - e.height) <= 10 * 2;
|
|
13876
|
+
if (h && g && b && y) {
|
|
13877
|
+
let v = 100, w = !1;
|
|
13878
|
+
if (t && u.tagName.toLowerCase() === t.toLowerCase() && (v += 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 ? (
|
|
13880
|
+
x.length === 0 ? w = !1 : x === C ? (v += 50, w = !0) : (x.includes(C) || C.includes(x)) && (v += 25, w = !0);
|
|
13881
13881
|
} else
|
|
13882
13882
|
w = !0;
|
|
13883
|
-
o.push({ element: u, score:
|
|
13883
|
+
o.push({ element: u, score: v, 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
|
|
13996
|
-
if (
|
|
13995
|
+
const b = g, y = b.className || "";
|
|
13996
|
+
if (y.toLowerCase().includes("singlevalue") || y.toLowerCase().includes("placeholder"))
|
|
13997
13997
|
continue;
|
|
13998
|
-
const m =
|
|
13998
|
+
const m = b.getBoundingClientRect();
|
|
13999
13999
|
if (m.height === 0 || m.width === 0) continue;
|
|
14000
|
-
const
|
|
14001
|
-
if (
|
|
14002
|
-
console.log(`[DropdownHelpers] Found EXACT match for option: "${r}"`), n =
|
|
14000
|
+
const v = ((o = b.textContent) == null ? void 0 : o.trim().toLowerCase()) || "";
|
|
14001
|
+
if (v === t) {
|
|
14002
|
+
console.log(`[DropdownHelpers] Found EXACT match for option: "${r}"`), n = b;
|
|
14003
14003
|
break;
|
|
14004
14004
|
}
|
|
14005
|
-
if (!i &&
|
|
14006
|
-
const w = t.length /
|
|
14005
|
+
if (!i && v.includes(t)) {
|
|
14006
|
+
const w = t.length / v.length;
|
|
14007
14007
|
w > 0.7 && (console.log(
|
|
14008
|
-
`[DropdownHelpers] Found partial match (${(w * 100).toFixed(0)}%): "${
|
|
14009
|
-
), i =
|
|
14008
|
+
`[DropdownHelpers] Found partial match (${(w * 100).toFixed(0)}%): "${v.slice(0, 50)}"`
|
|
14009
|
+
), i = b);
|
|
14010
14010
|
}
|
|
14011
14011
|
}
|
|
14012
14012
|
if (n) break;
|
|
@@ -14135,10 +14135,10 @@ 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
|
|
14139
|
-
for (const
|
|
14140
|
-
Re(
|
|
14141
|
-
element:
|
|
14138
|
+
const b = this.executeStrategyMulti(g, e);
|
|
14139
|
+
for (const y of b)
|
|
14140
|
+
Re(y) || y.isConnected && (i.has(y) ? i.get(y).strategies.push(g) : i.set(y, {
|
|
14141
|
+
element: y,
|
|
14142
14142
|
strategies: [g],
|
|
14143
14143
|
validationScore: 0,
|
|
14144
14144
|
interactable: !1,
|
|
@@ -14155,12 +14155,12 @@ const St = class St {
|
|
|
14155
14155
|
duration: performance.now() - t
|
|
14156
14156
|
};
|
|
14157
14157
|
const o = [];
|
|
14158
|
-
for (const [g,
|
|
14158
|
+
for (const [g, b] 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
|
-
|
|
14163
|
+
b.validationScore = this.computeValidationScore(g, e), b.interactable = this.checkInteractability(g).ok, b.confidence = this.computeConfidence(b, n.length, e), o.push(b), console.log(`[HybridTargetResolver] <${g.tagName.toLowerCase()}> "${(h = g.textContent) == null ? void 0 : h.slice(0, 25)}..."`), console.log(`[HybridTargetResolver] Strategies: ${b.strategies.join(", ")} (${b.strategies.length}/${n.length})`), console.log(`[HybridTargetResolver] Confidence: ${b.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,
|
|
14174
|
+
o.sort((g, b) => b.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((
|
|
14186
|
+
const g = o.find((b) => b.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
|
|
14313
|
+
var b, y;
|
|
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
|
|
14328
|
-
const w = m.snapshotItem(
|
|
14327
|
+
for (let v = 0; v < m.snapshotLength; v++) {
|
|
14328
|
+
const w = m.snapshotItem(v);
|
|
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
|
|
14343
|
-
const w = m.snapshotItem(
|
|
14342
|
+
for (let v = 0; v < m.snapshotLength; v++) {
|
|
14343
|
+
const w = m.snapshotItem(v);
|
|
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
|
|
14352
|
-
|
|
14351
|
+
const v = this.findNearbyInput(m);
|
|
14352
|
+
v && !i.has(v) && (console.log(`[HybridTargetResolver] → Found nearby input for label "${(b = m.textContent) == null ? void 0 : b.trim().substring(0, 30)}": <${v.tagName.toLowerCase()}>`), d.push(v), i.add(v));
|
|
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
|
|
14358
|
-
if (Re(
|
|
14359
|
-
const w = ((
|
|
14357
|
+
const v = m;
|
|
14358
|
+
if (Re(v) || i.has(v)) continue;
|
|
14359
|
+
const w = ((y = v.getAttribute("placeholder")) == null ? void 0 : y.trim().toLowerCase()) || "";
|
|
14360
14360
|
if (w === h || w && w.includes(h) && h.length / w.length > 0.6) {
|
|
14361
|
-
const x =
|
|
14362
|
-
x.width > 0 && x.height > 0 && (n.push(
|
|
14361
|
+
const x = v.getBoundingClientRect();
|
|
14362
|
+
x.width > 0 && x.height > 0 && (n.push(v), i.add(v));
|
|
14363
14363
|
}
|
|
14364
14364
|
}
|
|
14365
14365
|
return n;
|
|
@@ -14443,29 +14443,29 @@ const St = class St {
|
|
|
14443
14443
|
else if (g)
|
|
14444
14444
|
o = !0;
|
|
14445
14445
|
else {
|
|
14446
|
-
const
|
|
14447
|
-
|
|
14446
|
+
const b = e.tagName.toLowerCase(), y = typeof e.className == "string" ? e.className : "";
|
|
14447
|
+
b === "div" || b === "span" || e.classList.contains("container") || y.includes("control") || y.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(),
|
|
14453
|
-
g ===
|
|
14452
|
+
const g = e.tagName.toLowerCase(), b = t.tag.toLowerCase();
|
|
14453
|
+
g === b ? 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(),
|
|
14457
|
+
const g = (e.textContent || "").toLowerCase().trim(), b = t.text.toLowerCase().trim();
|
|
14458
14458
|
if (t.role === "combobox" && e.tagName.toLowerCase() === "input") {
|
|
14459
|
-
const
|
|
14460
|
-
(
|
|
14461
|
-
} else if (g ===
|
|
14459
|
+
const y = (u = e.closest('.css-6lmz24, [class*="value-container"], [class*="placeholder"]')) == null ? void 0 : u.parentElement, m = y == null ? void 0 : y.querySelector('[class*="placeholder"], [id*="placeholder"]'), v = ((d = m == null ? void 0 : m.textContent) == null ? void 0 : d.toLowerCase().trim()) || "";
|
|
14460
|
+
(v === b || v.includes(b)) && (n += 20);
|
|
14461
|
+
} else if (g === b)
|
|
14462
14462
|
n += 20;
|
|
14463
|
-
else if (g.includes(
|
|
14464
|
-
const
|
|
14465
|
-
|
|
14466
|
-
} else if (
|
|
14467
|
-
const
|
|
14468
|
-
n += Math.round(
|
|
14463
|
+
else if (g.includes(b)) {
|
|
14464
|
+
const y = b.length / g.length;
|
|
14465
|
+
y > 0.8 ? n += 15 : y > 0.5 ? n += 8 : (new RegExp(`\\b${St.escapeRegex(b)}\\b`, "i").test(g) ? n += 2 : n += 0, console.log(`[HybridTargetResolver] Text length mismatch: "${b}" (${b.length}) in "${g.slice(0, 30)}..." (${g.length}), ratio=${y.toFixed(2)}, points=${n}`));
|
|
14466
|
+
} else if (b.includes(g)) {
|
|
14467
|
+
const y = g.length / b.length;
|
|
14468
|
+
b.startsWith(g) && g.length >= 15 ? n += Math.round(18 * y) : n += Math.round(10 * y);
|
|
14469
14469
|
}
|
|
14470
14470
|
}
|
|
14471
14471
|
if (t.ariaLabel) {
|
|
@@ -14475,39 +14475,39 @@ const St = class St {
|
|
|
14475
14475
|
}
|
|
14476
14476
|
if (t.placeholder) {
|
|
14477
14477
|
i += 15;
|
|
14478
|
-
const g = e.placeholder || "",
|
|
14479
|
-
if (g.toLowerCase().includes(
|
|
14478
|
+
const g = e.placeholder || "", b = t.placeholder.toLowerCase();
|
|
14479
|
+
if (g.toLowerCase().includes(b))
|
|
14480
14480
|
n += 15;
|
|
14481
14481
|
else if (t.role === "combobox") {
|
|
14482
|
-
const
|
|
14483
|
-
(((h = m == null ? void 0 : m.textContent) == null ? void 0 : h.toLowerCase().trim()) || "").includes(
|
|
14482
|
+
const y = e.closest('[class*="container"]') || e.parentElement, m = y == null ? void 0 : y.querySelector('[class*="placeholder"], [id*="placeholder"]');
|
|
14483
|
+
(((h = m == null ? void 0 : m.textContent) == null ? void 0 : h.toLowerCase().trim()) || "").includes(b) && (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
|
|
14491
|
-
|
|
14490
|
+
const b = g.toLowerCase().trim().replace(/\*$/, "").trim(), y = t.labelText.toLowerCase().trim().replace(/\*$/, "").trim();
|
|
14491
|
+
b === y ? n += 20 : (b.includes(y) || y.includes(b)) && (n += 15);
|
|
14492
14492
|
}
|
|
14493
14493
|
}
|
|
14494
14494
|
if (t.optionText) {
|
|
14495
14495
|
i += 15;
|
|
14496
|
-
const
|
|
14497
|
-
|
|
14496
|
+
const b = (e.textContent || "").trim().toLowerCase(), y = t.optionText.toLowerCase().trim();
|
|
14497
|
+
b === y ? n += 15 : b.includes(y) && (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
|
|
14505
|
-
|
|
14504
|
+
const b = this.matchesSelectorContext(e, g);
|
|
14505
|
+
b > 0.5 ? a = Math.min(100, Math.round(a * 1.15)) : b < 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(),
|
|
14510
|
-
|
|
14509
|
+
const g = e.tagName.toLowerCase(), b = e.getAttribute("role"), y = ["button", "a", "input", "select", "textarea"].includes(g), m = ["button", "link", "menuitem", "option", "tab", "checkbox", "radio"].includes(b || ""), v = e.onclick !== null || e.hasAttribute("onclick"), w = e.closest('button, a, [role="button"], [role="link"]');
|
|
14510
|
+
y || 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)));
|
|
14511
14511
|
}
|
|
14512
14512
|
return a;
|
|
14513
14513
|
}
|
|
@@ -14535,7 +14535,15 @@ const St = class St {
|
|
|
14535
14535
|
if (e.strategies.includes("selector"))
|
|
14536
14536
|
if (n.text) {
|
|
14537
14537
|
const u = (e.element.textContent || "").toLowerCase().trim(), d = n.text.toLowerCase().trim();
|
|
14538
|
-
u === d
|
|
14538
|
+
if (u === d)
|
|
14539
|
+
a = 100, console.log("[HybridTargetResolver] Selector + exact text match bonus applied");
|
|
14540
|
+
else if (u.includes(d))
|
|
14541
|
+
a = 70, console.log("[HybridTargetResolver] Selector + partial text match bonus applied");
|
|
14542
|
+
else if (d.startsWith(u) && u.length >= 15 && u.length / d.length >= 0.3) {
|
|
14543
|
+
const h = u.length / d.length;
|
|
14544
|
+
a = Math.round(70 * h), console.log(`[HybridTargetResolver] Selector + truncated text match bonus: ${a} (${Math.round(h * 100)}% overlap)`);
|
|
14545
|
+
} else
|
|
14546
|
+
a = 20, console.log("[HybridTargetResolver] Selector match but NO text match - reduced bonus");
|
|
14539
14547
|
} else
|
|
14540
14548
|
a = 100, console.log("[HybridTargetResolver] Selector match bonus applied (no text to validate)");
|
|
14541
14549
|
return i * 0.3 + // Reduced from 40% to make room for selector bonus
|
|
@@ -14624,10 +14632,10 @@ const St = class St {
|
|
|
14624
14632
|
var m;
|
|
14625
14633
|
const u = c;
|
|
14626
14634
|
if (Re(u)) return;
|
|
14627
|
-
const d = u.getBoundingClientRect(), h = Math.abs(d.x - e.x), g = Math.abs(d.y - e.y),
|
|
14628
|
-
if (h <= i && g <= i &&
|
|
14629
|
-
let
|
|
14630
|
-
t && u.tagName.toLowerCase() === t.toLowerCase() && (
|
|
14635
|
+
const d = u.getBoundingClientRect(), h = Math.abs(d.x - e.x), g = Math.abs(d.y - e.y), b = Math.abs(d.width - e.width), y = Math.abs(d.height - e.height);
|
|
14636
|
+
if (h <= i && g <= i && b <= i * 2 && y <= i * 2) {
|
|
14637
|
+
let v = 100 - h - g;
|
|
14638
|
+
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);
|
|
14631
14639
|
}
|
|
14632
14640
|
}), s;
|
|
14633
14641
|
}
|
|
@@ -14736,13 +14744,13 @@ const St = class St {
|
|
|
14736
14744
|
for (const h of d) {
|
|
14737
14745
|
if (e.contains(h) || h.contains(e) || h.querySelector('input, select, textarea, [role="combobox"]')) continue;
|
|
14738
14746
|
if (i.querySelectorAll('input, select, textarea, [role="combobox"]').length === 1) {
|
|
14739
|
-
const
|
|
14740
|
-
if (
|
|
14741
|
-
return
|
|
14747
|
+
const b = (c = h.textContent) == null ? void 0 : c.trim().replace(/\*$/, "").trim();
|
|
14748
|
+
if (b && b.length > 0 && b.length < 50)
|
|
14749
|
+
return b;
|
|
14742
14750
|
} else if (this.isLabelForElement(h, e, i)) {
|
|
14743
|
-
const
|
|
14744
|
-
if (
|
|
14745
|
-
return
|
|
14751
|
+
const b = (u = h.textContent) == null ? void 0 : u.trim().replace(/\*$/, "").trim();
|
|
14752
|
+
if (b && b.length > 0 && b.length < 50)
|
|
14753
|
+
return b;
|
|
14746
14754
|
}
|
|
14747
14755
|
}
|
|
14748
14756
|
i = i.parentElement, o++;
|
|
@@ -14915,8 +14923,8 @@ const St = class St {
|
|
|
14915
14923
|
if (o === 'input[role="combobox"]' || o === '[role="combobox"]') {
|
|
14916
14924
|
const c = document.querySelectorAll(o);
|
|
14917
14925
|
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") || "",
|
|
14919
|
-
console.log(`[HybridTargetResolver] ${d}: id="${
|
|
14926
|
+
const h = u, g = h.getAttribute("placeholder") || "", b = h.getAttribute("aria-label") || "", y = h.id || "";
|
|
14927
|
+
console.log(`[HybridTargetResolver] ${d}: id="${y}" placeholder="${g}" aria-label="${b}"`);
|
|
14920
14928
|
}));
|
|
14921
14929
|
}
|
|
14922
14930
|
const a = document.querySelector(o);
|
|
@@ -15030,9 +15038,9 @@ const St = class St {
|
|
|
15030
15038
|
// Just the icon (if no wrapper)
|
|
15031
15039
|
];
|
|
15032
15040
|
for (const g of h) {
|
|
15033
|
-
const
|
|
15034
|
-
if (
|
|
15035
|
-
return console.log(`[HybridTargetResolver] → Found remove button: <${
|
|
15041
|
+
const b = c.querySelector(g);
|
|
15042
|
+
if (b && this.isVisible(b))
|
|
15043
|
+
return console.log(`[HybridTargetResolver] → Found remove button: <${b.tagName.toLowerCase()}> with selector "${g}"`), b;
|
|
15036
15044
|
}
|
|
15037
15045
|
return console.log("[HybridTargetResolver] → No specific remove button found, returning chip container"), c;
|
|
15038
15046
|
}
|
|
@@ -15096,7 +15104,7 @@ const St = class St {
|
|
|
15096
15104
|
* We want to find the combobox that has "Label" as its label, not some other element with "Label" text
|
|
15097
15105
|
*/
|
|
15098
15106
|
static findElementByLabelText(e, t) {
|
|
15099
|
-
var
|
|
15107
|
+
var b, y, m;
|
|
15100
15108
|
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
15109
|
if (s.includes(o) && !a)
|
|
15102
15110
|
return null;
|
|
@@ -15110,14 +15118,14 @@ const St = class St {
|
|
|
15110
15118
|
return null;
|
|
15111
15119
|
console.log(`[HybridTargetResolver] → Looking for "${i}" associated with label "${e}"`), console.log(`[HybridTargetResolver] → Found ${c.length} elements matching selector`);
|
|
15112
15120
|
const u = e.toLowerCase().trim();
|
|
15113
|
-
function d(
|
|
15114
|
-
return
|
|
15121
|
+
function d(v) {
|
|
15122
|
+
return v.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
15115
15123
|
}
|
|
15116
|
-
const h = (
|
|
15124
|
+
const h = (v) => v.toLowerCase().trim().replace(/\*$/, "").trim() === u ? !0 : new RegExp(
|
|
15117
15125
|
`(^|\\s)${d(u)}($|\\s|[:\\*\\?\\.\\,\\)\\]\\}\\-])`,
|
|
15118
15126
|
"i"
|
|
15119
|
-
).test(
|
|
15120
|
-
const w =
|
|
15127
|
+
).test(v), g = (v) => {
|
|
15128
|
+
const w = v, x = w.getBoundingClientRect();
|
|
15121
15129
|
if (x.width === 0 || x.height === 0) return !1;
|
|
15122
15130
|
if (!w.offsetParent)
|
|
15123
15131
|
try {
|
|
@@ -15129,45 +15137,45 @@ const St = class St {
|
|
|
15129
15137
|
}
|
|
15130
15138
|
return !0;
|
|
15131
15139
|
};
|
|
15132
|
-
for (const
|
|
15133
|
-
if (!g(
|
|
15134
|
-
const w =
|
|
15140
|
+
for (const v of c) {
|
|
15141
|
+
if (!g(v)) continue;
|
|
15142
|
+
const w = v.getAttribute("id");
|
|
15135
15143
|
if (w)
|
|
15136
15144
|
try {
|
|
15137
15145
|
const B = document.querySelector(`label[for="${CSS.escape(w)}"]`);
|
|
15138
15146
|
if (B && h(B.textContent || ""))
|
|
15139
|
-
return console.log("[HybridTargetResolver] → Found via label[for] attribute"),
|
|
15147
|
+
return console.log("[HybridTargetResolver] → Found via label[for] attribute"), v;
|
|
15140
15148
|
} catch {
|
|
15141
15149
|
}
|
|
15142
|
-
const x =
|
|
15150
|
+
const x = v.getAttribute("aria-labelledby");
|
|
15143
15151
|
if (x) {
|
|
15144
15152
|
const B = x.split(/\s+/).filter((re) => re.length > 0);
|
|
15145
15153
|
for (const re of B) {
|
|
15146
15154
|
const se = document.getElementById(re);
|
|
15147
15155
|
if (se && h(se.textContent || ""))
|
|
15148
|
-
return console.log("[HybridTargetResolver] → Found via aria-labelledby"),
|
|
15156
|
+
return console.log("[HybridTargetResolver] → Found via aria-labelledby"), v;
|
|
15149
15157
|
}
|
|
15150
15158
|
}
|
|
15151
|
-
const C =
|
|
15159
|
+
const C = v.getAttribute("aria-label") || "";
|
|
15152
15160
|
if (C && h(C))
|
|
15153
|
-
return console.log("[HybridTargetResolver] → Found via aria-label"),
|
|
15154
|
-
const D =
|
|
15161
|
+
return console.log("[HybridTargetResolver] → Found via aria-label"), v;
|
|
15162
|
+
const D = v.getAttribute("placeholder") || "";
|
|
15155
15163
|
if (D && h(D))
|
|
15156
|
-
return console.log("[HybridTargetResolver] → Found via placeholder"),
|
|
15157
|
-
let P =
|
|
15164
|
+
return console.log("[HybridTargetResolver] → Found via placeholder"), v;
|
|
15165
|
+
let P = v.parentElement, R = 0;
|
|
15158
15166
|
for (; P && R < 6; ) {
|
|
15159
|
-
const B = P.querySelectorAll('input, select, textarea, [role="combobox"], [role="listbox"]'), re = Array.from(B), se = re.includes(
|
|
15167
|
+
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
|
|
15160
15168
|
P.childElementCount >= 2 && P.childElementCount <= 5, $ = P.querySelectorAll(
|
|
15161
15169
|
'label, [class*="label"]:not(input):not(select):not(textarea):not([role="combobox"]), .MuiFormLabel-root, [class*="FormLabel"], [class*="form-label"], [class*="field-label"]'
|
|
15162
15170
|
);
|
|
15163
15171
|
for (const j of $) {
|
|
15164
|
-
if (
|
|
15165
|
-
const H = ((
|
|
15172
|
+
if (v.contains(j) || j.contains(v) || j.querySelector('input, select, textarea, [role="combobox"]')) continue;
|
|
15173
|
+
const H = ((b = j.textContent) == null ? void 0 : b.trim()) || "";
|
|
15166
15174
|
if (!(H.length > 50) && h(H)) {
|
|
15167
15175
|
if (B.length === 1 && se)
|
|
15168
|
-
return console.log(`[HybridTargetResolver] → Found via label in container: "${H}"`),
|
|
15169
|
-
if (se && this.isTextNearElement(j,
|
|
15170
|
-
return console.log(`[HybridTargetResolver] → Found via label position: "${H}"`),
|
|
15176
|
+
return console.log(`[HybridTargetResolver] → Found via label in container: "${H}"`), v;
|
|
15177
|
+
if (se && this.isTextNearElement(j, v, re))
|
|
15178
|
+
return console.log(`[HybridTargetResolver] → Found via label position: "${H}"`), v;
|
|
15171
15179
|
}
|
|
15172
15180
|
}
|
|
15173
15181
|
if (me || R >= 3) {
|
|
@@ -15175,15 +15183,15 @@ const St = class St {
|
|
|
15175
15183
|
":scope > div, :scope > span, :scope > p, :scope > div > div, :scope > div > span, :scope > div > p"
|
|
15176
15184
|
);
|
|
15177
15185
|
for (const H of j) {
|
|
15178
|
-
if (H.querySelector('input, select, textarea, [role="combobox"]') || H.contains(
|
|
15179
|
-
const X =
|
|
15180
|
-
if (X && ((
|
|
15186
|
+
if (H.querySelector('input, select, textarea, [role="combobox"]') || H.contains(v) || v.contains(H)) continue;
|
|
15187
|
+
const X = v.value || "";
|
|
15188
|
+
if (X && ((y = H.textContent) == null ? void 0 : y.trim()) === X) continue;
|
|
15181
15189
|
const N = ((m = H.textContent) == null ? void 0 : m.trim()) || "";
|
|
15182
15190
|
if (N.length > 0 && N.length <= 30 && h(N)) {
|
|
15183
15191
|
if (B.length === 1 && se)
|
|
15184
|
-
return console.log(`[HybridTargetResolver] → Found via nearby text: "${N}"`),
|
|
15185
|
-
if (se && this.isTextNearElement(H,
|
|
15186
|
-
return console.log(`[HybridTargetResolver] → Found via nearby text (position): "${N}"`),
|
|
15192
|
+
return console.log(`[HybridTargetResolver] → Found via nearby text: "${N}"`), v;
|
|
15193
|
+
if (se && this.isTextNearElement(H, v, re))
|
|
15194
|
+
return console.log(`[HybridTargetResolver] → Found via nearby text (position): "${N}"`), v;
|
|
15187
15195
|
}
|
|
15188
15196
|
}
|
|
15189
15197
|
}
|
|
@@ -15314,33 +15322,33 @@ const St = class St {
|
|
|
15314
15322
|
console.log("[HybridTargetResolver] → XPath found nothing, trying fallback...");
|
|
15315
15323
|
const g = document.querySelectorAll(t || "*");
|
|
15316
15324
|
console.log(`[HybridTargetResolver] → Fallback: checking ${g.length} <${t || "*"}> elements for text "${i}"`);
|
|
15317
|
-
const
|
|
15325
|
+
const b = ($) => {
|
|
15318
15326
|
const j = $;
|
|
15319
15327
|
return Re(j) ? !0 : j.id === "root" || j.id === "app" || j.id === "__next" || j.tagName === "BODY" || j.tagName === "HTML";
|
|
15320
15328
|
};
|
|
15321
15329
|
for (const $ of g) {
|
|
15322
|
-
if (
|
|
15330
|
+
if (b($) || (((R = $.textContent) == null ? void 0 : R.trim().toLowerCase()) || "") !== o) continue;
|
|
15323
15331
|
const H = $.getBoundingClientRect();
|
|
15324
15332
|
if (H.width > 0 && H.height > 0 && (((B = $.innerText) == null ? void 0 : B.trim().toLowerCase()) || "") === o)
|
|
15325
15333
|
return console.log("[HybridTargetResolver] → Found via exact text match"), $;
|
|
15326
15334
|
}
|
|
15327
|
-
let
|
|
15335
|
+
let y = null, m = -1 / 0;
|
|
15328
15336
|
for (const $ of g) {
|
|
15329
|
-
if (
|
|
15337
|
+
if (b($)) continue;
|
|
15330
15338
|
const j = ((re = $.textContent) == null ? void 0 : re.trim().toLowerCase()) || "";
|
|
15331
15339
|
if (j.length !== 0 && j.includes(o)) {
|
|
15332
15340
|
const H = o.length / j.length, X = $.getBoundingClientRect(), N = X.width * X.height;
|
|
15333
15341
|
if (N > 0 && N < 5e5) {
|
|
15334
15342
|
const U = Math.max(0, 50 - N / 1e4), Q = H * 50, le = U + Q;
|
|
15335
|
-
le > m && (m = le,
|
|
15343
|
+
le > m && (m = le, y = $);
|
|
15336
15344
|
}
|
|
15337
15345
|
}
|
|
15338
15346
|
}
|
|
15339
|
-
if (
|
|
15340
|
-
const $ =
|
|
15341
|
-
return console.log(`[HybridTargetResolver] → Found via textContent (${$.width.toFixed(0)}x${$.height.toFixed(0)}px, score=${m.toFixed(0)})`),
|
|
15347
|
+
if (y) {
|
|
15348
|
+
const $ = y.getBoundingClientRect();
|
|
15349
|
+
return console.log(`[HybridTargetResolver] → Found via textContent (${$.width.toFixed(0)}x${$.height.toFixed(0)}px, score=${m.toFixed(0)})`), y;
|
|
15342
15350
|
}
|
|
15343
|
-
const
|
|
15351
|
+
const v = t && ["input", "textarea"].includes(t.toLowerCase()) ? t.toLowerCase() : "input, textarea", w = document.querySelectorAll(v);
|
|
15344
15352
|
console.log(`[HybridTargetResolver] → Checking ${w.length} input/textarea elements for placeholder "${i}"`);
|
|
15345
15353
|
for (const $ of w) {
|
|
15346
15354
|
const j = $;
|
|
@@ -15429,14 +15437,14 @@ const St = class St {
|
|
|
15429
15437
|
const g = h;
|
|
15430
15438
|
if (g.id === "root" || g.id === "app" || g.tagName === "BODY" || g.tagName === "HTML" || !St.isVisible(g) || (((i = g.innerText) == null ? void 0 : i.length) || 0) > 200)
|
|
15431
15439
|
continue;
|
|
15432
|
-
const
|
|
15440
|
+
const y = ((o = g.innerText) == null ? void 0 : o.trim()) || "", m = y.toLowerCase();
|
|
15433
15441
|
if (m === a) {
|
|
15434
|
-
console.log(`[HybridTargetResolver] → Found exact match: "${
|
|
15442
|
+
console.log(`[HybridTargetResolver] → Found exact match: "${y.substring(0, 50)}..."`), c = g;
|
|
15435
15443
|
break;
|
|
15436
15444
|
}
|
|
15437
15445
|
if (m.includes(a)) {
|
|
15438
|
-
const
|
|
15439
|
-
|
|
15446
|
+
const v = a.length / m.length;
|
|
15447
|
+
v > 0.7 && v > d && (u = g, d = v);
|
|
15440
15448
|
}
|
|
15441
15449
|
}
|
|
15442
15450
|
if (c)
|
|
@@ -15818,15 +15826,15 @@ class wh {
|
|
|
15818
15826
|
const g = t.querySelector('input[role="combobox"]');
|
|
15819
15827
|
if (g)
|
|
15820
15828
|
return console.log("[ActionExecutor] Found combobox input via control element"), g;
|
|
15821
|
-
const
|
|
15822
|
-
if (
|
|
15823
|
-
const m =
|
|
15829
|
+
const b = t.parentElement;
|
|
15830
|
+
if (b) {
|
|
15831
|
+
const m = b.querySelector('input[role="combobox"]');
|
|
15824
15832
|
if (m)
|
|
15825
15833
|
return console.log("[ActionExecutor] Found combobox input in parent container"), m;
|
|
15826
15834
|
}
|
|
15827
|
-
const
|
|
15828
|
-
if (
|
|
15829
|
-
return console.log("[ActionExecutor] Found listbox trigger button"),
|
|
15835
|
+
const y = t.querySelector('button[aria-haspopup="listbox"]');
|
|
15836
|
+
if (y)
|
|
15837
|
+
return console.log("[ActionExecutor] Found listbox trigger button"), y;
|
|
15830
15838
|
}
|
|
15831
15839
|
t = t.parentElement, n++;
|
|
15832
15840
|
}
|
|
@@ -16002,7 +16010,7 @@ class wh {
|
|
|
16002
16010
|
let i = e.parentElement, o = e, s = 0;
|
|
16003
16011
|
for (; i && i !== document.body && s < 10; ) {
|
|
16004
16012
|
s++;
|
|
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"),
|
|
16013
|
+
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"), b = i.hasAttribute("onclick") || i.hasAttribute("data-onclick") || i.getAttribute("role") === "button" || i.getAttribute("role") === "menuitem", y = i.tagName === "BUTTON" || i.tagName === "A";
|
|
16006
16014
|
if (console.log(
|
|
16007
16015
|
`[ActionExecutor] Checking parent #${s}:`,
|
|
16008
16016
|
i.tagName,
|
|
@@ -16012,11 +16020,11 @@ class wh {
|
|
|
16012
16020
|
h || g,
|
|
16013
16021
|
"classes:",
|
|
16014
16022
|
d.substring(0, 60)
|
|
16015
|
-
), (u || h || g ||
|
|
16023
|
+
), (u || h || g || b || y) && (o = i, console.log(
|
|
16016
16024
|
"[ActionExecutor] ✅ Found clickable parent:",
|
|
16017
16025
|
i.tagName,
|
|
16018
16026
|
d.substring(0, 80)
|
|
16019
|
-
),
|
|
16027
|
+
), y || i.getAttribute("role") === "button"))
|
|
16020
16028
|
break;
|
|
16021
16029
|
i = i.parentElement;
|
|
16022
16030
|
}
|
|
@@ -16128,13 +16136,13 @@ class wh {
|
|
|
16128
16136
|
i.unshift(d), o = o.parentElement;
|
|
16129
16137
|
}
|
|
16130
16138
|
const s = (d) => {
|
|
16131
|
-
var
|
|
16139
|
+
var b;
|
|
16132
16140
|
const h = d.querySelector("span, label, p");
|
|
16133
|
-
if ((
|
|
16141
|
+
if ((b = h == null ? void 0 : h.textContent) != null && b.trim())
|
|
16134
16142
|
return h.textContent.trim().substring(0, 50);
|
|
16135
16143
|
let g = "";
|
|
16136
|
-
for (const
|
|
16137
|
-
|
|
16144
|
+
for (const y of Array.from(d.childNodes))
|
|
16145
|
+
y.nodeType === Node.TEXT_NODE && (g += (y.textContent || "").trim() + " ");
|
|
16138
16146
|
return g = g.trim(), !g && d.textContent && (g = d.textContent.trim().substring(0, 50)), g;
|
|
16139
16147
|
}, a = window.__onboardingSDK, c = (a == null ? void 0 : a._botActionDepth) > 0, u = {
|
|
16140
16148
|
type: "click",
|
|
@@ -16363,8 +16371,8 @@ class Sh {
|
|
|
16363
16371
|
}
|
|
16364
16372
|
this.showFloeCursor();
|
|
16365
16373
|
const o = parseFloat(this.floeCursor.style.top) || 0, s = parseFloat(this.floeCursor.style.left) || 0, a = performance.now(), c = s, u = o, d = (h) => {
|
|
16366
|
-
const g = h - a,
|
|
16367
|
-
this.floeCursor && (this.floeCursor.style.left = `${m}px`, this.floeCursor.style.top = `${
|
|
16374
|
+
const g = h - a, b = Math.min(g / n, 1), y = 1 - Math.pow(1 - b, 3), m = c + (e - c) * y, v = u + (t - u) * y;
|
|
16375
|
+
this.floeCursor && (this.floeCursor.style.left = `${m}px`, this.floeCursor.style.top = `${v}px`), b < 1 ? requestAnimationFrame(d) : i();
|
|
16368
16376
|
};
|
|
16369
16377
|
requestAnimationFrame(d);
|
|
16370
16378
|
});
|
|
@@ -16914,16 +16922,16 @@ class Pi {
|
|
|
16914
16922
|
for (let s = 0; s < t.height; s++)
|
|
16915
16923
|
for (let a = 0; a < t.width; a++) {
|
|
16916
16924
|
let c = 0, u = 0, d = 0, h = 0, g = 0;
|
|
16917
|
-
for (let
|
|
16925
|
+
for (let y = -o; y <= o; y++)
|
|
16918
16926
|
for (let m = -o; m <= o; m++) {
|
|
16919
|
-
const
|
|
16920
|
-
if (
|
|
16921
|
-
const x = (w * t.width +
|
|
16927
|
+
const v = a + m, w = s + y;
|
|
16928
|
+
if (v >= 0 && v < t.width && w >= 0 && w < t.height) {
|
|
16929
|
+
const x = (w * t.width + v) * 4;
|
|
16922
16930
|
c += i[x], u += i[x + 1], d += i[x + 2], h += i[x + 3], g++;
|
|
16923
16931
|
}
|
|
16924
16932
|
}
|
|
16925
|
-
const
|
|
16926
|
-
i[
|
|
16933
|
+
const b = (s * t.width + a) * 4;
|
|
16934
|
+
i[b] = c / g, i[b + 1] = u / g, i[b + 2] = d / g, i[b + 3] = h / g;
|
|
16927
16935
|
}
|
|
16928
16936
|
e.putImageData(n, t.x, t.y);
|
|
16929
16937
|
}
|
|
@@ -16942,14 +16950,14 @@ class Pi {
|
|
|
16942
16950
|
const s = [];
|
|
16943
16951
|
if (t) {
|
|
16944
16952
|
const h = this.getAllTextNodes();
|
|
16945
|
-
for (const { node: g, rect:
|
|
16946
|
-
const
|
|
16947
|
-
|
|
16948
|
-
x:
|
|
16949
|
-
y:
|
|
16950
|
-
width:
|
|
16951
|
-
height:
|
|
16952
|
-
type:
|
|
16953
|
+
for (const { node: g, rect: b } of h) {
|
|
16954
|
+
const y = this.containsPII(g.textContent || "");
|
|
16955
|
+
y.contains && s.push({
|
|
16956
|
+
x: b.left,
|
|
16957
|
+
y: b.top,
|
|
16958
|
+
width: b.width,
|
|
16959
|
+
height: b.height,
|
|
16960
|
+
type: y.type || "unknown"
|
|
16953
16961
|
});
|
|
16954
16962
|
}
|
|
16955
16963
|
}
|
|
@@ -16958,23 +16966,23 @@ class Pi {
|
|
|
16958
16966
|
return console.error("[ScreenCapture] Failed to get 2D canvas context"), Promise.reject(new Error("[ScreenCapture] Canvas 2D context unavailable"));
|
|
16959
16967
|
const u = window.innerWidth * n, d = window.innerHeight * n;
|
|
16960
16968
|
return a.width = u, a.height = d, new Promise((h, g) => {
|
|
16961
|
-
const
|
|
16962
|
-
|
|
16963
|
-
const
|
|
16964
|
-
if (
|
|
16965
|
-
const
|
|
16966
|
-
if (
|
|
16969
|
+
const b = document.createElement("iframe");
|
|
16970
|
+
b.style.position = "fixed", b.style.top = "0", b.style.left = "0", b.style.width = "100%", b.style.height = "100%", b.style.border = "none", b.style.zIndex = "-999999", document.body.appendChild(b);
|
|
16971
|
+
const y = b.contentDocument;
|
|
16972
|
+
if (y.open(), y.write(document.documentElement.outerHTML), y.close(), Pi.sanitizeClonedDocument(y), t && s.length > 0) {
|
|
16973
|
+
const v = y.createElement("style");
|
|
16974
|
+
if (v.textContent = `
|
|
16967
16975
|
.pii-redacted {
|
|
16968
16976
|
filter: blur(5px);
|
|
16969
16977
|
background: #000;
|
|
16970
16978
|
color: transparent !important;
|
|
16971
16979
|
}
|
|
16972
|
-
`,
|
|
16973
|
-
console.warn("[ScreenCapture] Cloned document has no body"), document.body.removeChild(
|
|
16980
|
+
`, y.head.appendChild(v), !y.body) {
|
|
16981
|
+
console.warn("[ScreenCapture] Cloned document has no body"), document.body.removeChild(b), this.safeCanvasToDataURL(a, o, i).then(h, g);
|
|
16974
16982
|
return;
|
|
16975
16983
|
}
|
|
16976
|
-
const w =
|
|
16977
|
-
|
|
16984
|
+
const w = y.createTreeWalker(
|
|
16985
|
+
y.body,
|
|
16978
16986
|
NodeFilter.SHOW_TEXT
|
|
16979
16987
|
);
|
|
16980
16988
|
let x;
|
|
@@ -16983,17 +16991,17 @@ class Pi {
|
|
|
16983
16991
|
}
|
|
16984
16992
|
const m = () => {
|
|
16985
16993
|
try {
|
|
16986
|
-
document.body.removeChild(
|
|
16994
|
+
document.body.removeChild(b);
|
|
16987
16995
|
} catch {
|
|
16988
16996
|
}
|
|
16989
16997
|
};
|
|
16990
16998
|
setTimeout(() => {
|
|
16991
16999
|
try {
|
|
16992
|
-
if (!
|
|
17000
|
+
if (!b.contentWindow) {
|
|
16993
17001
|
console.warn("[ScreenCapture] iframe contentWindow not available"), m(), this.safeCanvasToDataURL(a, o, i).then(h, g);
|
|
16994
17002
|
return;
|
|
16995
17003
|
}
|
|
16996
|
-
const x = new XMLSerializer().serializeToString(
|
|
17004
|
+
const x = new XMLSerializer().serializeToString(y.documentElement), C = `<svg xmlns="http://www.w3.org/2000/svg" width="${window.innerWidth}" height="${window.innerHeight}"><foreignObject width="100%" height="100%">` + x + "</foreignObject></svg>", D = new Blob([C], { type: "image/svg+xml;charset=utf-8" }), P = URL.createObjectURL(D), R = new Image();
|
|
16997
17005
|
R.onload = () => {
|
|
16998
17006
|
if (c.save(), c.scale(n, n), c.drawImage(R, 0, 0), c.restore(), URL.revokeObjectURL(P), t && s.length > 0)
|
|
16999
17007
|
for (const B of s)
|
|
@@ -17007,8 +17015,8 @@ class Pi {
|
|
|
17007
17015
|
}, R.onerror = () => {
|
|
17008
17016
|
URL.revokeObjectURL(P), console.warn("[ScreenCapture] SVG image render failed, returning blank canvas"), m(), this.safeCanvasToDataURL(a, o, i).then(h, g);
|
|
17009
17017
|
}, R.src = P;
|
|
17010
|
-
} catch (
|
|
17011
|
-
console.error("[ScreenCapture] Failed to render iframe content:",
|
|
17018
|
+
} catch (v) {
|
|
17019
|
+
console.error("[ScreenCapture] Failed to render iframe content:", v), m(), this.safeCanvasToDataURL(a, o, i).then(h, g);
|
|
17012
17020
|
}
|
|
17013
17021
|
}, 100);
|
|
17014
17022
|
});
|
|
@@ -17231,21 +17239,21 @@ class kh {
|
|
|
17231
17239
|
let d = e, h = 0;
|
|
17232
17240
|
for (; d && d !== document.body && h < 5; ) {
|
|
17233
17241
|
let g = d.tagName.toLowerCase();
|
|
17234
|
-
const
|
|
17235
|
-
if (
|
|
17236
|
-
u.unshift(`[data-testid="${
|
|
17242
|
+
const b = d.getAttribute("role"), y = d.getAttribute("data-testid");
|
|
17243
|
+
if (y) {
|
|
17244
|
+
u.unshift(`[data-testid="${y}"]`);
|
|
17237
17245
|
break;
|
|
17238
17246
|
}
|
|
17239
|
-
if (
|
|
17240
|
-
g += `[role="${
|
|
17247
|
+
if (b)
|
|
17248
|
+
g += `[role="${b}"]`;
|
|
17241
17249
|
else if (d.className && typeof d.className == "string") {
|
|
17242
17250
|
const m = d.className.split(" ").filter(
|
|
17243
|
-
(
|
|
17244
|
-
!
|
|
17245
|
-
!
|
|
17246
|
-
!
|
|
17247
|
-
!
|
|
17248
|
-
!
|
|
17251
|
+
(v) => v && !v.startsWith("css-") && // Emotion/styled-components
|
|
17252
|
+
!v.startsWith("sc-") && // styled-components
|
|
17253
|
+
!v.startsWith("ng-") && // Angular
|
|
17254
|
+
!v.startsWith("_") && // Private
|
|
17255
|
+
!v.match(/^[a-z]{6,}$/) && // Random hashes
|
|
17256
|
+
!v.match(/^\d/)
|
|
17249
17257
|
// Starts with number
|
|
17250
17258
|
).slice(0, 2);
|
|
17251
17259
|
m.length > 0 && (g += `.${m.join(".")}`);
|
|
@@ -17259,27 +17267,27 @@ class kh {
|
|
|
17259
17267
|
* This provides all the information needed for multi-strategy element finding
|
|
17260
17268
|
*/
|
|
17261
17269
|
getElementMetadata(e) {
|
|
17262
|
-
var g,
|
|
17270
|
+
var g, b, y, m;
|
|
17263
17271
|
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;
|
|
17264
17272
|
let u;
|
|
17265
17273
|
const d = e.getAttribute("aria-labelledby");
|
|
17266
17274
|
if (d) {
|
|
17267
|
-
const
|
|
17268
|
-
|
|
17275
|
+
const v = document.getElementById(d.split(/\s+/)[0]);
|
|
17276
|
+
v && (u = (b = v.textContent) == null ? void 0 : b.trim());
|
|
17269
17277
|
}
|
|
17270
17278
|
const h = e.getAttribute("id");
|
|
17271
17279
|
if (!u && h)
|
|
17272
17280
|
try {
|
|
17273
|
-
const
|
|
17274
|
-
|
|
17281
|
+
const v = document.querySelector(`label[for="${CSS.escape(h)}"]`);
|
|
17282
|
+
v && (u = (y = v.textContent) == null ? void 0 : y.trim().replace(/\*$/, "").trim());
|
|
17275
17283
|
} catch {
|
|
17276
17284
|
}
|
|
17277
17285
|
if (!u) {
|
|
17278
|
-
const
|
|
17279
|
-
if (
|
|
17280
|
-
const w =
|
|
17286
|
+
const v = e.closest('.MuiFormControl-root, fieldset, [class*="form-group"], [class*="form-field"], [class*="field-wrapper"]');
|
|
17287
|
+
if (v) {
|
|
17288
|
+
const w = v.querySelector(":scope > label, :scope > .MuiFormLabel-root, :scope > div > label");
|
|
17281
17289
|
if (w) {
|
|
17282
|
-
const x =
|
|
17290
|
+
const x = v.querySelectorAll('input, select, textarea, [role="combobox"]'), C = Array.from(x).some((D) => e.contains(D) || e === D);
|
|
17283
17291
|
(x.length === 1 || C) && (u = (m = w.textContent) == null ? void 0 : m.trim().replace(/\*$/, "").trim());
|
|
17284
17292
|
}
|
|
17285
17293
|
}
|
|
@@ -17513,23 +17521,45 @@ class Ch {
|
|
|
17513
17521
|
let i = null;
|
|
17514
17522
|
const o = 3, s = [300, 500, 800];
|
|
17515
17523
|
for (let g = 0; g <= o; g++)
|
|
17516
|
-
if (g > 0 && (console.log(`[BatchedActionExecutor] Retry ${g}/${o} in ${s[g - 1]}ms...`), await new Promise((
|
|
17517
|
-
const
|
|
17518
|
-
if (t && !
|
|
17519
|
-
|
|
17520
|
-
|
|
17521
|
-
|
|
17522
|
-
|
|
17524
|
+
if (g > 0 && (console.log(`[BatchedActionExecutor] Retry ${g}/${o} in ${s[g - 1]}ms...`), await new Promise((b) => setTimeout(b, s[g - 1]))), i = ue.resolveTarget(e.target), i) {
|
|
17525
|
+
const b = ((d = i.textContent) == null ? void 0 : d.trim().toLowerCase()) || "", y = i.tagName.toLowerCase();
|
|
17526
|
+
if (t && !b.includes(t))
|
|
17527
|
+
if (b.length >= 15 && // Must have enough chars to be meaningful
|
|
17528
|
+
t.startsWith(b) && b.length / t.length >= 0.3) {
|
|
17529
|
+
const v = Array.from(document.querySelectorAll(n || "*")).filter((w) => {
|
|
17530
|
+
var C;
|
|
17531
|
+
if (w === i) return !1;
|
|
17532
|
+
const x = ((C = w.textContent) == null ? void 0 : C.trim().toLowerCase()) || "";
|
|
17533
|
+
return x.length >= b.length && x.startsWith(b) && x !== b;
|
|
17534
|
+
});
|
|
17535
|
+
if (v.length > 0) {
|
|
17536
|
+
console.warn(
|
|
17537
|
+
`[BatchedActionExecutor] ⚠️ Truncated text match is ambiguous - ${v.length} other element(s) share the same prefix "${b.slice(0, 40)}..."`,
|
|
17538
|
+
v.map((w) => {
|
|
17539
|
+
var x;
|
|
17540
|
+
return `${w.tagName}: "${(x = w.textContent) == null ? void 0 : x.trim().slice(0, 60)}"`;
|
|
17541
|
+
})
|
|
17542
|
+
), i = null;
|
|
17543
|
+
continue;
|
|
17544
|
+
}
|
|
17545
|
+
console.log(
|
|
17546
|
+
`[BatchedActionExecutor] ✓ Accepting truncated text match (${b.length}/${t.length} chars, ${Math.round(b.length / t.length * 100)}% overlap)`
|
|
17547
|
+
);
|
|
17548
|
+
} else {
|
|
17549
|
+
console.warn(`[BatchedActionExecutor] ⚠️ Found element text "${b.slice(0, 50)}" doesn't match expected "${t}"`), i = null;
|
|
17550
|
+
continue;
|
|
17551
|
+
}
|
|
17552
|
+
n && y !== n && console.log(`[BatchedActionExecutor] Note: Found ${y} instead of expected ${n} (acceptable if it contains the text)`);
|
|
17523
17553
|
break;
|
|
17524
17554
|
}
|
|
17525
17555
|
if (!i) {
|
|
17526
17556
|
if (console.error("[BatchedActionExecutor] ❌ Could not find matching element after retries:", e.target), t) {
|
|
17527
|
-
const g = Array.from(document.querySelectorAll("*")).filter((
|
|
17528
|
-
var
|
|
17529
|
-
return (
|
|
17530
|
-
}).slice(0, 5).map((
|
|
17531
|
-
var
|
|
17532
|
-
return `${
|
|
17557
|
+
const g = Array.from(document.querySelectorAll("*")).filter((b) => {
|
|
17558
|
+
var y;
|
|
17559
|
+
return (y = b.textContent) == null ? void 0 : y.toLowerCase().includes(t);
|
|
17560
|
+
}).slice(0, 5).map((b) => {
|
|
17561
|
+
var y;
|
|
17562
|
+
return `${b.tagName.toLowerCase()}: "${(y = b.textContent) == null ? void 0 : y.trim().slice(0, 50)}"`;
|
|
17533
17563
|
});
|
|
17534
17564
|
g.length > 0 && console.log("[BatchedActionExecutor] Similar elements found:", g);
|
|
17535
17565
|
}
|
|
@@ -18267,14 +18297,14 @@ class pc extends dh {
|
|
|
18267
18297
|
break;
|
|
18268
18298
|
}
|
|
18269
18299
|
ue.scrollIntoView(o), setTimeout(async () => {
|
|
18270
|
-
var g,
|
|
18300
|
+
var g, b;
|
|
18271
18301
|
const a = this.findCollapsedSidebar(o);
|
|
18272
18302
|
if (a) {
|
|
18273
18303
|
console.log("[OnboardingSDK] 🔍 Element is in collapsed sidebar, expanding first...");
|
|
18274
|
-
const
|
|
18304
|
+
const y = a.getBoundingClientRect();
|
|
18275
18305
|
await this.overlay.animateFloeCursorTo(
|
|
18276
|
-
|
|
18277
|
-
|
|
18306
|
+
y.left + y.width / 2,
|
|
18307
|
+
y.top + y.height / 3,
|
|
18278
18308
|
400
|
|
18279
18309
|
), a.dispatchEvent(new MouseEvent("mouseenter", { bubbles: !0 })), a.dispatchEvent(new MouseEvent("mouseover", { bubbles: !0 })), await new Promise((m) => setTimeout(m, 450)), console.log("[OnboardingSDK] 📂 Sidebar expanded");
|
|
18280
18310
|
}
|
|
@@ -18290,7 +18320,7 @@ class pc extends dh {
|
|
|
18290
18320
|
return;
|
|
18291
18321
|
}
|
|
18292
18322
|
const u = ue.reResolveAndVerify(t.target, o);
|
|
18293
|
-
u ? (o = u, console.log("[OnboardingSDK] 🔄 Re-resolved element after stability wait")) : console.warn("[OnboardingSDK] ⚠️ Could not re-resolve element, using original"), await this.overlay.moveToElementAndClick(o), await new Promise((
|
|
18323
|
+
u ? (o = u, console.log("[OnboardingSDK] 🔄 Re-resolved element after stability wait")) : console.warn("[OnboardingSDK] ⚠️ Could not re-resolve element, using original"), await this.overlay.moveToElementAndClick(o), await new Promise((y) => setTimeout(y, 150)), this._botActionDepth++;
|
|
18294
18324
|
const d = {
|
|
18295
18325
|
...t,
|
|
18296
18326
|
target: {
|
|
@@ -18304,7 +18334,7 @@ class pc extends dh {
|
|
|
18304
18334
|
// EXCLUDE: domIndex, boundingBox, confidence - stale after page changes
|
|
18305
18335
|
// Cast to handle server-sent strategy values that may include position-dependent types
|
|
18306
18336
|
strategy: (g = t.target.strategy) == null ? void 0 : g.filter(
|
|
18307
|
-
(
|
|
18337
|
+
(y) => y !== "boundingBox" && y !== "domIndex"
|
|
18308
18338
|
)
|
|
18309
18339
|
}
|
|
18310
18340
|
};
|
|
@@ -18316,16 +18346,16 @@ class pc extends dh {
|
|
|
18316
18346
|
}
|
|
18317
18347
|
if (h) {
|
|
18318
18348
|
console.log("[OnboardingSDK] ✅ Click executed successfully");
|
|
18319
|
-
const
|
|
18349
|
+
const y = (t.target.text || "").toLowerCase().trim(), m = ((b = o == null ? void 0 : o.textContent) == null ? void 0 : b.toLowerCase().trim()) || "", v = (o == null ? void 0 : o.tagName.toLowerCase()) || "unknown";
|
|
18320
18350
|
let w = !1, x = "";
|
|
18321
|
-
|
|
18351
|
+
y && m && !m.includes(y) && !y.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({
|
|
18322
18352
|
type: "bot_action_complete",
|
|
18323
18353
|
action: "click",
|
|
18324
18354
|
success: !w,
|
|
18325
18355
|
// Mark as failure if mismatch detected
|
|
18326
18356
|
target: t.target.text || t.target.selector || "unknown",
|
|
18327
18357
|
actualClicked: w ? m.slice(0, 100) : void 0,
|
|
18328
|
-
clickedTag:
|
|
18358
|
+
clickedTag: v,
|
|
18329
18359
|
mismatch: w,
|
|
18330
18360
|
mismatchDetails: x || void 0,
|
|
18331
18361
|
previousUrl: i,
|
|
@@ -18335,17 +18365,17 @@ class pc extends dh {
|
|
|
18335
18365
|
timestamp: Date.now()
|
|
18336
18366
|
}), w ? console.warn("[OnboardingSDK] ⚠️ Click mismatch reported to server") : console.log("[OnboardingSDK] 📤 Sent bot_action_complete for auto-advance");
|
|
18337
18367
|
} else {
|
|
18338
|
-
const
|
|
18339
|
-
console.warn("[OnboardingSDK] ⚠️ Click action failed:",
|
|
18368
|
+
const y = this.actionExecutor.lastError || "unknown";
|
|
18369
|
+
console.warn("[OnboardingSDK] ⚠️ Click action failed:", y), this.sendMetadata({
|
|
18340
18370
|
type: "bot_action_complete",
|
|
18341
18371
|
action: "click",
|
|
18342
18372
|
success: !1,
|
|
18343
18373
|
target: t.target.text || t.target.selector || "unknown",
|
|
18344
|
-
error:
|
|
18374
|
+
error: y,
|
|
18345
18375
|
timestamp: Date.now()
|
|
18346
18376
|
});
|
|
18347
18377
|
}
|
|
18348
|
-
await new Promise((
|
|
18378
|
+
await new Promise((y) => setTimeout(y, 100)), setTimeout(() => {
|
|
18349
18379
|
this.overlay.cleanup();
|
|
18350
18380
|
}, 800);
|
|
18351
18381
|
}, 350);
|
|
@@ -18449,23 +18479,23 @@ class pc extends dh {
|
|
|
18449
18479
|
beacon: !0
|
|
18450
18480
|
};
|
|
18451
18481
|
try {
|
|
18452
|
-
const
|
|
18453
|
-
|
|
18454
|
-
`${
|
|
18482
|
+
const v = this.config.apiUrl || "";
|
|
18483
|
+
v && navigator.sendBeacon && navigator.sendBeacon(
|
|
18484
|
+
`${v}/api/v1/events/beacon`,
|
|
18455
18485
|
new Blob([JSON.stringify(m)], { type: "application/json" })
|
|
18456
18486
|
);
|
|
18457
18487
|
} catch {
|
|
18458
18488
|
}
|
|
18459
18489
|
};
|
|
18460
18490
|
window.addEventListener("pagehide", g, { once: !0 });
|
|
18461
|
-
let
|
|
18491
|
+
let b = !1;
|
|
18462
18492
|
try {
|
|
18463
18493
|
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 })),
|
|
18494
|
+
history.pushState(null, "", m), window.dispatchEvent(new PopStateEvent("popstate", { state: null })), b = !0;
|
|
18465
18495
|
} catch {
|
|
18466
18496
|
}
|
|
18467
|
-
|
|
18468
|
-
const
|
|
18497
|
+
b || (window.location.href = c);
|
|
18498
|
+
const y = await this.waitForNavigation(c, 1e4);
|
|
18469
18499
|
window.removeEventListener("pagehide", g);
|
|
18470
18500
|
try {
|
|
18471
18501
|
sessionStorage.removeItem("floe_pending_navigation");
|
|
@@ -18475,10 +18505,10 @@ class pc extends dh {
|
|
|
18475
18505
|
type: "bot_action_complete",
|
|
18476
18506
|
action: "navigate",
|
|
18477
18507
|
target: Vn(c),
|
|
18478
|
-
success:
|
|
18508
|
+
success: y,
|
|
18479
18509
|
previousUrl: Vn(u),
|
|
18480
18510
|
currentUrl: ut(),
|
|
18481
|
-
...
|
|
18511
|
+
...y ? {} : { error: "Navigation timed out waiting for URL change" },
|
|
18482
18512
|
timestamp: d
|
|
18483
18513
|
});
|
|
18484
18514
|
}
|
|
@@ -18506,7 +18536,7 @@ class pc extends dh {
|
|
|
18506
18536
|
a = new URL(t);
|
|
18507
18537
|
} catch {
|
|
18508
18538
|
return console.warn("[OnboardingSDK] ⚠️ waitForNavigation: could not parse expectedUrl, using exact match"), new Promise((g) => {
|
|
18509
|
-
const
|
|
18539
|
+
const b = () => {
|
|
18510
18540
|
if (window.location.href === t) {
|
|
18511
18541
|
g(!0);
|
|
18512
18542
|
return;
|
|
@@ -18515,15 +18545,15 @@ class pc extends dh {
|
|
|
18515
18545
|
g(!1);
|
|
18516
18546
|
return;
|
|
18517
18547
|
}
|
|
18518
|
-
setTimeout(
|
|
18548
|
+
setTimeout(b, o);
|
|
18519
18549
|
};
|
|
18520
|
-
|
|
18550
|
+
b();
|
|
18521
18551
|
});
|
|
18522
18552
|
}
|
|
18523
18553
|
const c = a.origin, u = s(a.pathname), d = a.search, h = a.hash;
|
|
18524
18554
|
return new Promise((g) => {
|
|
18525
|
-
const
|
|
18526
|
-
const
|
|
18555
|
+
const b = () => {
|
|
18556
|
+
const y = Date.now() - i;
|
|
18527
18557
|
try {
|
|
18528
18558
|
const m = new URL(window.location.href);
|
|
18529
18559
|
if (m.origin === c && s(m.pathname) === u && (!d || m.search === d) && (!h || m.hash === h)) {
|
|
@@ -18532,13 +18562,13 @@ class pc extends dh {
|
|
|
18532
18562
|
}
|
|
18533
18563
|
} catch {
|
|
18534
18564
|
}
|
|
18535
|
-
if (
|
|
18565
|
+
if (y >= n) {
|
|
18536
18566
|
console.warn(`[OnboardingSDK] ⏱️ Navigation timeout after ${n}ms. Current: ${window.location.href}, Expected: ${t}`), g(!1);
|
|
18537
18567
|
return;
|
|
18538
18568
|
}
|
|
18539
|
-
setTimeout(
|
|
18569
|
+
setTimeout(b, o);
|
|
18540
18570
|
};
|
|
18541
|
-
|
|
18571
|
+
b();
|
|
18542
18572
|
});
|
|
18543
18573
|
}
|
|
18544
18574
|
/**
|
|
@@ -18758,14 +18788,14 @@ class pc extends dh {
|
|
|
18758
18788
|
else {
|
|
18759
18789
|
this._botActionDepth++;
|
|
18760
18790
|
try {
|
|
18761
|
-
const g = d.getBoundingClientRect(),
|
|
18791
|
+
const g = d.getBoundingClientRect(), b = g.left + g.width / 2, y = g.top + g.height / 2, m = {
|
|
18762
18792
|
bubbles: !0,
|
|
18763
18793
|
cancelable: !0,
|
|
18764
18794
|
view: window,
|
|
18765
|
-
clientX:
|
|
18766
|
-
clientY:
|
|
18795
|
+
clientX: b,
|
|
18796
|
+
clientY: y
|
|
18767
18797
|
};
|
|
18768
|
-
d.dispatchEvent(new MouseEvent("mousedown", m)), d.dispatchEvent(new MouseEvent("mouseup", m)), d.dispatchEvent(new MouseEvent("click", m)), await new Promise((
|
|
18798
|
+
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}"`);
|
|
18769
18799
|
} finally {
|
|
18770
18800
|
this._botActionDepth--;
|
|
18771
18801
|
}
|
|
@@ -18842,13 +18872,13 @@ class pc extends dh {
|
|
|
18842
18872
|
console.log("[OnboardingSDK] ⚠️ Typing to filter did not reveal the option");
|
|
18843
18873
|
}
|
|
18844
18874
|
if (!o) {
|
|
18845
|
-
ue.scrollIntoView(s), await new Promise((
|
|
18875
|
+
ue.scrollIntoView(s), await new Promise((b) => setTimeout(b, 200)), await this.overlay.moveToElementAndClick(s), console.log("[OnboardingSDK] 📂 Opening dropdown..."), this._botActionDepth++;
|
|
18846
18876
|
try {
|
|
18847
18877
|
this.actionExecutor.openDropdown(s);
|
|
18848
18878
|
} finally {
|
|
18849
18879
|
this._botActionDepth--;
|
|
18850
18880
|
}
|
|
18851
|
-
if (await new Promise((
|
|
18881
|
+
if (await new Promise((b) => setTimeout(b, 300)), i = this.findVisibleDropdownOption(n), i) {
|
|
18852
18882
|
console.log("[OnboardingSDK] ✅ Option visible after opening dropdown"), await this.clickDropdownOption(i, t);
|
|
18853
18883
|
return;
|
|
18854
18884
|
}
|
|
@@ -18874,9 +18904,9 @@ class pc extends dh {
|
|
|
18874
18904
|
}
|
|
18875
18905
|
if (!i) {
|
|
18876
18906
|
console.error("[OnboardingSDK] ❌ All strategies failed for option:", n);
|
|
18877
|
-
const h = document.querySelectorAll('[role="option"], [class*="option"], nz-option-item, .ant-select-item-option'), g = Array.from(h).slice(0, 10).map((
|
|
18878
|
-
var
|
|
18879
|
-
return (
|
|
18907
|
+
const h = document.querySelectorAll('[role="option"], [class*="option"], nz-option-item, .ant-select-item-option'), g = Array.from(h).slice(0, 10).map((b) => {
|
|
18908
|
+
var y;
|
|
18909
|
+
return (y = b.textContent) == null ? void 0 : y.trim().slice(0, 50);
|
|
18880
18910
|
}).filter(Boolean);
|
|
18881
18911
|
g.length > 0 ? console.log("[OnboardingSDK] Available options:", g) : console.log("[OnboardingSDK] No options visible - dropdown may not have opened"), this.sendMetadata({
|
|
18882
18912
|
type: "bot_action_complete",
|
|
@@ -18956,11 +18986,11 @@ class pc extends dh {
|
|
|
18956
18986
|
continue;
|
|
18957
18987
|
}
|
|
18958
18988
|
console.log(`[OnboardingSDK] Found scrollable container (${s}), scrollHeight: ${u.scrollHeight}, clientHeight: ${u.clientHeight}, overflow-y: ${d}`);
|
|
18959
|
-
const h = 150, g = Math.ceil(u.scrollHeight / h) + 2,
|
|
18960
|
-
for (let
|
|
18961
|
-
u.scrollTop =
|
|
18962
|
-
const
|
|
18963
|
-
for (const w of
|
|
18989
|
+
const h = 150, g = Math.ceil(u.scrollHeight / h) + 2, b = u.scrollTop;
|
|
18990
|
+
for (let y = 0; y < g; y++) {
|
|
18991
|
+
u.scrollTop = y * h, await new Promise((w) => setTimeout(w, 120));
|
|
18992
|
+
const v = u.querySelectorAll('[role="option"], [class*="option"]:not([class*="singleValue"]), nz-option-item, .ant-select-item-option, .ant-select-item');
|
|
18993
|
+
for (const w of v) {
|
|
18964
18994
|
const x = w, C = x.getBoundingClientRect();
|
|
18965
18995
|
if (C.height === 0 || C.width === 0) continue;
|
|
18966
18996
|
const D = ((o = x.textContent) == null ? void 0 : o.trim().toLowerCase()) || "";
|
|
@@ -18968,7 +18998,7 @@ class pc extends dh {
|
|
|
18968
18998
|
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;
|
|
18969
18999
|
}
|
|
18970
19000
|
}
|
|
18971
|
-
u.scrollTop =
|
|
19001
|
+
u.scrollTop = b;
|
|
18972
19002
|
}
|
|
18973
19003
|
}
|
|
18974
19004
|
return console.log(`[OnboardingSDK] Option not found after scrolling: "${t}"`), null;
|
|
@@ -19152,23 +19182,23 @@ class pc extends dh {
|
|
|
19152
19182
|
if (u === n || u.includes(n)) {
|
|
19153
19183
|
const d = c;
|
|
19154
19184
|
if (d.tagName === "LABEL" && d.htmlFor) {
|
|
19155
|
-
const
|
|
19156
|
-
if (
|
|
19157
|
-
return this.getClickableDropdownContainer(
|
|
19185
|
+
const b = document.getElementById(d.htmlFor);
|
|
19186
|
+
if (b)
|
|
19187
|
+
return this.getClickableDropdownContainer(b);
|
|
19158
19188
|
}
|
|
19159
19189
|
const h = d.id;
|
|
19160
19190
|
if (h) {
|
|
19161
|
-
const
|
|
19162
|
-
if (
|
|
19163
|
-
return this.getClickableDropdownContainer(
|
|
19191
|
+
const b = document.querySelector(`[aria-labelledby="${h}"]`);
|
|
19192
|
+
if (b)
|
|
19193
|
+
return this.getClickableDropdownContainer(b);
|
|
19164
19194
|
}
|
|
19165
19195
|
const g = d.closest('[class*="field"], [class*="form-group"], [class*="FormControl"]') || d.parentElement;
|
|
19166
19196
|
if (g) {
|
|
19167
|
-
const
|
|
19197
|
+
const b = g.querySelector(
|
|
19168
19198
|
'input[role="combobox"], select, [aria-haspopup="listbox"], [class*="control"]'
|
|
19169
19199
|
);
|
|
19170
|
-
if (
|
|
19171
|
-
return this.getClickableDropdownContainer(
|
|
19200
|
+
if (b)
|
|
19201
|
+
return this.getClickableDropdownContainer(b);
|
|
19172
19202
|
}
|
|
19173
19203
|
}
|
|
19174
19204
|
}
|
|
@@ -19271,7 +19301,7 @@ class pc extends dh {
|
|
|
19271
19301
|
* then reports the result back to the bot.
|
|
19272
19302
|
*/
|
|
19273
19303
|
async handleExecuteApi(t) {
|
|
19274
|
-
var
|
|
19304
|
+
var b;
|
|
19275
19305
|
console.log("[OnboardingSDK] 🔌 Executing API call:", t.method, t.url);
|
|
19276
19306
|
const {
|
|
19277
19307
|
method: n = "GET",
|
|
@@ -19285,16 +19315,16 @@ class pc extends dh {
|
|
|
19285
19315
|
} = t;
|
|
19286
19316
|
let h = i;
|
|
19287
19317
|
if (o && (h = `${o.replace(/\/$/, "")}/${i.replace(/^\//, "")}`), a && n === "GET") {
|
|
19288
|
-
const
|
|
19289
|
-
h = `${h}?${
|
|
19318
|
+
const y = new URLSearchParams(a);
|
|
19319
|
+
h = `${h}?${y.toString()}`;
|
|
19290
19320
|
}
|
|
19291
19321
|
try {
|
|
19292
|
-
const
|
|
19293
|
-
if (
|
|
19294
|
-
console.error("[OnboardingSDK] ❌ Cross-origin API request blocked:",
|
|
19322
|
+
const y = new URL(h, window.location.href);
|
|
19323
|
+
if (y.origin !== window.location.origin) {
|
|
19324
|
+
console.error("[OnboardingSDK] ❌ Cross-origin API request blocked:", y.origin), this.sendMetadata({
|
|
19295
19325
|
type: "api_execution_result",
|
|
19296
19326
|
success: !1,
|
|
19297
|
-
error: `Cross-origin request blocked: ${
|
|
19327
|
+
error: `Cross-origin request blocked: ${y.origin} does not match ${window.location.origin}`,
|
|
19298
19328
|
url: h,
|
|
19299
19329
|
method: n,
|
|
19300
19330
|
timestamp: Date.now()
|
|
@@ -19324,7 +19354,7 @@ class pc extends dh {
|
|
|
19324
19354
|
return;
|
|
19325
19355
|
}
|
|
19326
19356
|
try {
|
|
19327
|
-
const
|
|
19357
|
+
const y = {
|
|
19328
19358
|
method: n.toUpperCase(),
|
|
19329
19359
|
headers: {
|
|
19330
19360
|
"Content-Type": "application/json",
|
|
@@ -19333,34 +19363,34 @@ class pc extends dh {
|
|
|
19333
19363
|
credentials: "include"
|
|
19334
19364
|
// Safe — same-origin validated above
|
|
19335
19365
|
};
|
|
19336
|
-
s && n !== "GET" && (
|
|
19337
|
-
const m = await fetch(h,
|
|
19338
|
-
let
|
|
19366
|
+
s && n !== "GET" && (y.body = JSON.stringify(s)), console.log("[OnboardingSDK] 📤 Making API request:", h);
|
|
19367
|
+
const m = await fetch(h, y);
|
|
19368
|
+
let v;
|
|
19339
19369
|
const w = await m.text();
|
|
19340
19370
|
try {
|
|
19341
|
-
|
|
19371
|
+
v = JSON.parse(w);
|
|
19342
19372
|
} catch {
|
|
19343
|
-
|
|
19373
|
+
v = { raw: w };
|
|
19344
19374
|
}
|
|
19345
|
-
console.log("[OnboardingSDK] 📥 API response:", m.status,
|
|
19346
|
-
const x = m.ok && this.evaluateJsonPathCondition(
|
|
19375
|
+
console.log("[OnboardingSDK] 📥 API response:", m.status, v);
|
|
19376
|
+
const x = m.ok && this.evaluateJsonPathCondition(v, c), C = this.extractJsonPath(v, u);
|
|
19347
19377
|
let D;
|
|
19348
|
-
x || (D = this.extractJsonPath(
|
|
19378
|
+
x || (D = this.extractJsonPath(v, d) || ((b = v.error) == null ? void 0 : b.message) || v.message || `Request failed with status ${m.status}`), this.sendMetadata({
|
|
19349
19379
|
type: "api_execution_result",
|
|
19350
19380
|
success: x,
|
|
19351
19381
|
status_code: m.status,
|
|
19352
|
-
data:
|
|
19382
|
+
data: v,
|
|
19353
19383
|
result_text: C,
|
|
19354
19384
|
error: D,
|
|
19355
19385
|
url: h,
|
|
19356
19386
|
method: n,
|
|
19357
19387
|
timestamp: Date.now()
|
|
19358
19388
|
}), console.log(`[OnboardingSDK] ${x ? "✅" : "❌"} API execution ${x ? "succeeded" : "failed"}:`, C || D);
|
|
19359
|
-
} catch (
|
|
19360
|
-
console.error("[OnboardingSDK] ❌ API execution error:",
|
|
19389
|
+
} catch (y) {
|
|
19390
|
+
console.error("[OnboardingSDK] ❌ API execution error:", y), this.sendMetadata({
|
|
19361
19391
|
type: "api_execution_result",
|
|
19362
19392
|
success: !1,
|
|
19363
|
-
error:
|
|
19393
|
+
error: y instanceof Error ? y.message : "Unknown error",
|
|
19364
19394
|
url: h,
|
|
19365
19395
|
method: n,
|
|
19366
19396
|
timestamp: Date.now()
|