@fkn/lib 0.3.10 → 0.3.11
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/{background-DCdL9DVK.js → background-BLtG2SKm.js} +1 -1
- package/{background-D-gZyvaP.cjs → background-DsN_xRAy.cjs} +1 -1
- package/index.cjs +5 -5
- package/index.d.ts +1 -0
- package/index.js +151 -149
- package/{locator-Bz_60Zup.cjs → locator-B2frkQPZ.cjs} +4 -4
- package/{locator-fXEVniGP.js → locator-DhCNXAk2.js} +143 -143
- package/package.json +1 -1
|
@@ -281,9 +281,9 @@ var r = Object.defineProperty, i = (e, t) => () => (t || e((t = { exports: {} })
|
|
|
281
281
|
}), ce = "locator", le = (e, t) => e.elements.flatMap((e) => [...e.querySelectorAll(t)]), ue = (e) => ({
|
|
282
282
|
fragment: typeof e == "string" ? e : "?",
|
|
283
283
|
separator: "descend"
|
|
284
|
-
}), de = (e) => k(e) && e.FKN_WEB_EXTENSION_FRAME_ANNOUNCE_KEY === !0 && typeof e.frameId == "string", j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new Set(),
|
|
285
|
-
typeof window < "u" && window.addEventListener("message", (e) => {
|
|
286
|
-
if (!
|
|
284
|
+
}), de = "FKN_WEB_EXTENSION_FRAME_ANNOUNCE_REQUEST_KEY", fe = typeof chrome < "u" && !!chrome.runtime?.id, pe = (e) => k(e) && e.FKN_WEB_EXTENSION_FRAME_ANNOUNCE_KEY === !0 && typeof e.frameId == "string", j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new Set(), me = (e) => (N.add(e), () => N.delete(e));
|
|
285
|
+
typeof window < "u" && fe && window.addEventListener("message", (e) => {
|
|
286
|
+
if (!pe(e.data)) return;
|
|
287
287
|
e.stopImmediatePropagation();
|
|
288
288
|
let t = e.source;
|
|
289
289
|
if (!t || typeof t != "object") return;
|
|
@@ -295,42 +295,42 @@ typeof window < "u" && window.addEventListener("message", (e) => {
|
|
|
295
295
|
for (let e of a) e(i);
|
|
296
296
|
}
|
|
297
297
|
}, { capture: !0 });
|
|
298
|
-
var
|
|
298
|
+
var he = (e) => {
|
|
299
299
|
let t = e.contentWindow;
|
|
300
300
|
if (!t) return Promise.reject(/* @__PURE__ */ Error("frameLocator: <iframe> has no contentWindow"));
|
|
301
301
|
let n = j.get(t);
|
|
302
302
|
return n ? Promise.resolve(n) : new Promise((e) => {
|
|
303
303
|
let n = M.get(t) ?? [];
|
|
304
|
-
n.push(e), M.set(t, n);
|
|
304
|
+
n.push(e), M.set(t, n), t.postMessage({ [de]: !0 }, "*");
|
|
305
305
|
});
|
|
306
306
|
}, P = /* @__PURE__ */ a({
|
|
307
|
-
render: () =>
|
|
308
|
-
resolve: () =>
|
|
309
|
-
resolvePeer: () =>
|
|
310
|
-
type: () =>
|
|
311
|
-
}),
|
|
307
|
+
render: () => ye,
|
|
308
|
+
resolve: () => _e,
|
|
309
|
+
resolvePeer: () => ve,
|
|
310
|
+
type: () => ge
|
|
311
|
+
}), ge = "frameLocator", _e = (e, t) => e.elements.flatMap((e) => [...e.querySelectorAll(t)]).filter((e) => e instanceof HTMLIFrameElement), ve = async ({ parts: e, selfIndex: t, resolveLocal: n }) => {
|
|
312
312
|
let r = n(e.slice(0, t + 1))[0];
|
|
313
313
|
if (!r) throw Error("frameLocator: no <iframe> matched");
|
|
314
314
|
if (!(r instanceof HTMLIFrameElement)) throw Error(`frameLocator: expected <iframe>, got <${r.tagName.toLowerCase()}>`);
|
|
315
|
-
return
|
|
316
|
-
},
|
|
315
|
+
return he(r);
|
|
316
|
+
}, ye = (e) => ({
|
|
317
317
|
fragment: typeof e == "string" ? e : "?",
|
|
318
318
|
separator: "frame-down"
|
|
319
|
-
}),
|
|
320
|
-
render: () =>
|
|
321
|
-
resolve: () =>
|
|
322
|
-
resolvePeer: () =>
|
|
323
|
-
type: () =>
|
|
324
|
-
}),
|
|
319
|
+
}), be = /* @__PURE__ */ a({
|
|
320
|
+
render: () => we,
|
|
321
|
+
resolve: () => Se,
|
|
322
|
+
resolvePeer: () => Ce,
|
|
323
|
+
type: () => xe
|
|
324
|
+
}), xe = "owner", Se = (e) => {
|
|
325
325
|
throw Error("owner: must be processed by the executor as an upward pivot");
|
|
326
|
-
},
|
|
327
|
-
let { backgroundResolvers: e } = await import("./background-
|
|
326
|
+
}, Ce = async () => {
|
|
327
|
+
let { backgroundResolvers: e } = await import("./background-BLtG2SKm.js"), t = await (await e).getParentFrameId();
|
|
328
328
|
if (!t) throw Error("owner: already at top frame");
|
|
329
329
|
return t;
|
|
330
|
-
},
|
|
330
|
+
}, we = () => ({
|
|
331
331
|
fragment: "",
|
|
332
332
|
separator: "frame-up"
|
|
333
|
-
}),
|
|
333
|
+
}), Te = class extends Error {
|
|
334
334
|
reason;
|
|
335
335
|
filename;
|
|
336
336
|
line;
|
|
@@ -339,7 +339,7 @@ var pe = (e) => {
|
|
|
339
339
|
constructor(e, t, n, r, i) {
|
|
340
340
|
super(`${e}:${n}:${r}: ${t}`), this.reason = t, this.filename = e, this.line = n, this.column = r, this.source = i;
|
|
341
341
|
}
|
|
342
|
-
},
|
|
342
|
+
}, Ee = class {
|
|
343
343
|
start;
|
|
344
344
|
end;
|
|
345
345
|
source;
|
|
@@ -419,7 +419,7 @@ function B(e, t) {
|
|
|
419
419
|
value: t || null
|
|
420
420
|
}), e;
|
|
421
421
|
}
|
|
422
|
-
var
|
|
422
|
+
var De = class {
|
|
423
423
|
level = 0;
|
|
424
424
|
indentation = " ";
|
|
425
425
|
compress = !1;
|
|
@@ -569,7 +569,7 @@ var Te = class {
|
|
|
569
569
|
declaration(e) {
|
|
570
570
|
return this.compress ? this.emit(`${e.property}:${e.value}`, e.position) + this.emit(";") : e.property === "grid-template-areas" ? this.emit(this.indent()) + this.emit(e.property + ": " + e.value.split("\n").join("\n".padEnd(22) + this.indent()), e.position) + this.emit(";") : this.emit(this.indent()) + this.emit(`${e.property}: ${e.value}`, e.position) + this.emit(";");
|
|
571
571
|
}
|
|
572
|
-
},
|
|
572
|
+
}, Oe = (e, t) => {
|
|
573
573
|
t ||= {};
|
|
574
574
|
let n = 1, r = 1;
|
|
575
575
|
function i() {
|
|
@@ -577,14 +577,14 @@ var Te = class {
|
|
|
577
577
|
line: n,
|
|
578
578
|
column: r
|
|
579
579
|
};
|
|
580
|
-
return (i) => (i.position = new
|
|
580
|
+
return (i) => (i.position = new Ee(e, {
|
|
581
581
|
line: n,
|
|
582
582
|
column: r
|
|
583
583
|
}, t?.source || ""), u(), i);
|
|
584
584
|
}
|
|
585
585
|
let a = [];
|
|
586
586
|
function o(i) {
|
|
587
|
-
let o = new
|
|
587
|
+
let o = new Te(t?.source || "", i, n, r, e);
|
|
588
588
|
if (!t?.silent) throw o;
|
|
589
589
|
a.push(o);
|
|
590
590
|
}
|
|
@@ -1058,14 +1058,14 @@ var Te = class {
|
|
|
1058
1058
|
}
|
|
1059
1059
|
};
|
|
1060
1060
|
}());
|
|
1061
|
-
},
|
|
1061
|
+
}, ke = (e, t) => new De(t || {}).compile(e), Ae = /* @__PURE__ */ a({
|
|
1062
1062
|
appearPermission: () => V,
|
|
1063
1063
|
appearUnsafePermission: () => H,
|
|
1064
|
-
permission: () =>
|
|
1065
|
-
resolve: () =>
|
|
1064
|
+
permission: () => Me,
|
|
1065
|
+
resolve: () => Le,
|
|
1066
1066
|
setInjectedStylesDisabled: () => q,
|
|
1067
|
-
type: () =>
|
|
1068
|
-
}),
|
|
1067
|
+
type: () => je
|
|
1068
|
+
}), je = "addStyleTag", V = {
|
|
1069
1069
|
scope: "media.appear",
|
|
1070
1070
|
category: "media",
|
|
1071
1071
|
severity: 0,
|
|
@@ -1078,7 +1078,7 @@ var Te = class {
|
|
|
1078
1078
|
unsafe: !0,
|
|
1079
1079
|
title: "Change page appearance (unsafe)",
|
|
1080
1080
|
description: "Lets the app restyle the page WITHOUT safety filtering — could be used to leak data over the network."
|
|
1081
|
-
},
|
|
1081
|
+
}, Me = (e) => e?.noSanitize ? H : V, Ne = /(?:^|[^\w-])(?:url|image|image-set|cross-fade|paint|element|expression)\s*\(/i, Pe = (e) => e.replace(/\\([0-9a-fA-F]{1,6})\s?/g, (e, t) => String.fromCodePoint(Number.parseInt(t, 16))).replace(/\\(.)/g, "$1"), U = (e) => !Ne.test(Pe(e.value)), W = (e) => {
|
|
1082
1082
|
let t = [];
|
|
1083
1083
|
for (let n of e) switch (n.type) {
|
|
1084
1084
|
case F.import:
|
|
@@ -1122,15 +1122,15 @@ var Te = class {
|
|
|
1122
1122
|
default: continue;
|
|
1123
1123
|
}
|
|
1124
1124
|
return t;
|
|
1125
|
-
},
|
|
1125
|
+
}, Fe = (e) => {
|
|
1126
1126
|
let t;
|
|
1127
1127
|
try {
|
|
1128
|
-
t =
|
|
1128
|
+
t = Oe(e, { silent: !0 });
|
|
1129
1129
|
} catch {
|
|
1130
1130
|
return "";
|
|
1131
1131
|
}
|
|
1132
|
-
return t.stylesheet.rules = W(t.stylesheet.rules),
|
|
1133
|
-
},
|
|
1132
|
+
return t.stylesheet.rules = W(t.stylesheet.rules), ke(t);
|
|
1133
|
+
}, Ie = (e) => {
|
|
1134
1134
|
let t = () => {
|
|
1135
1135
|
e.parentNode || (document.head ?? document.documentElement).appendChild(e);
|
|
1136
1136
|
};
|
|
@@ -1148,11 +1148,11 @@ var Te = class {
|
|
|
1148
1148
|
}, G = /* @__PURE__ */ new Set(), K = !1, q = (e) => {
|
|
1149
1149
|
K = e;
|
|
1150
1150
|
for (let t of G) t.disabled = e;
|
|
1151
|
-
},
|
|
1151
|
+
}, Le = async (e, t) => {
|
|
1152
1152
|
let n = document.createElement("style");
|
|
1153
|
-
n.textContent = t.noSanitize ? t.content :
|
|
1153
|
+
n.textContent = t.noSanitize ? t.content : Fe(t.content);
|
|
1154
1154
|
try {
|
|
1155
|
-
|
|
1155
|
+
Ie(n);
|
|
1156
1156
|
} catch (e) {
|
|
1157
1157
|
console.error(e);
|
|
1158
1158
|
}
|
|
@@ -1163,19 +1163,19 @@ var Te = class {
|
|
|
1163
1163
|
nextLocatorType: "locator"
|
|
1164
1164
|
},
|
|
1165
1165
|
P,
|
|
1166
|
-
|
|
1167
|
-
], X = [
|
|
1166
|
+
be
|
|
1167
|
+
], X = [Ae], Re = {
|
|
1168
1168
|
type: J,
|
|
1169
1169
|
selectorModules: Y,
|
|
1170
1170
|
operationModules: X
|
|
1171
|
-
},
|
|
1171
|
+
}, ze = Be({
|
|
1172
1172
|
ownType: J,
|
|
1173
1173
|
selectorModules: Y,
|
|
1174
1174
|
operationModules: X
|
|
1175
1175
|
});
|
|
1176
1176
|
//#endregion
|
|
1177
1177
|
//#region node_modules/@mfkn/web-extension/lib/content-script/resolvers/locators/factory.js
|
|
1178
|
-
function
|
|
1178
|
+
function Be(e) {
|
|
1179
1179
|
return (t, n, r = []) => ({
|
|
1180
1180
|
...Object.fromEntries(e.selectorModules.map((i) => [i.type, (...a) => {
|
|
1181
1181
|
let o = [...r, {
|
|
@@ -1183,7 +1183,7 @@ function Re(e) {
|
|
|
1183
1183
|
type: i.type,
|
|
1184
1184
|
args: a
|
|
1185
1185
|
}];
|
|
1186
|
-
return (i.nextLocatorType ?? e.ownType) === "locator" ?
|
|
1186
|
+
return (i.nextLocatorType ?? e.ownType) === "locator" ? qt(t, n, o) : ze(t, n, o);
|
|
1187
1187
|
}])),
|
|
1188
1188
|
...Object.fromEntries(e.operationModules.map(({ type: e }) => [e, (...i) => se(t, r, e, i, n)])),
|
|
1189
1189
|
ensure: (e, t = {}) => n ? n(r, e, [t]) : Promise.resolve()
|
|
@@ -1191,47 +1191,47 @@ function Re(e) {
|
|
|
1191
1191
|
}
|
|
1192
1192
|
//#endregion
|
|
1193
1193
|
//#region node_modules/@mfkn/web-extension/lib/content-script/resolvers/locators/selectors/get-by-role.js
|
|
1194
|
-
var
|
|
1195
|
-
render: () =>
|
|
1196
|
-
resolve: () =>
|
|
1197
|
-
type: () =>
|
|
1198
|
-
}),
|
|
1199
|
-
render: () =>
|
|
1200
|
-
resolve: () =>
|
|
1201
|
-
type: () =>
|
|
1202
|
-
}),
|
|
1203
|
-
render: () =>
|
|
1204
|
-
resolve: () =>
|
|
1205
|
-
type: () =>
|
|
1206
|
-
}),
|
|
1207
|
-
render: () =>
|
|
1208
|
-
resolve: () =>
|
|
1209
|
-
type: () =>
|
|
1210
|
-
}),
|
|
1211
|
-
render: () =>
|
|
1212
|
-
resolve: () =>
|
|
1194
|
+
var Ve = /* @__PURE__ */ a({
|
|
1195
|
+
render: () => We,
|
|
1196
|
+
resolve: () => Ue,
|
|
1197
|
+
type: () => He
|
|
1198
|
+
}), He = "getByRole", Ue = (e, t) => e.elements.flatMap((e) => [...e.querySelectorAll(`[role="${CSS.escape(t)}"]`)]), We = (e) => ({ fragment: typeof e == "string" ? `[role="${e.replaceAll("\"", "\\\"")}"]` : "[role]" }), Ge = /* @__PURE__ */ a({
|
|
1199
|
+
render: () => Je,
|
|
1200
|
+
resolve: () => qe,
|
|
1201
|
+
type: () => Ke
|
|
1202
|
+
}), Ke = "getByText", qe = (e, t) => e.elements.flatMap((e) => [e, ...e.querySelectorAll("*")]).filter((e) => e.textContent?.includes(t)), Je = (e) => ({ fragment: typeof e == "string" ? `:has-text("${e.replaceAll("\"", "\\\"")}")` : ":has-text(...)" }), Ye = /* @__PURE__ */ a({
|
|
1203
|
+
render: () => Qe,
|
|
1204
|
+
resolve: () => Ze,
|
|
1205
|
+
type: () => Xe
|
|
1206
|
+
}), Xe = "getByTestId", Ze = (e, t) => e.elements.flatMap((e) => [...e.querySelectorAll(`[data-testid="${CSS.escape(t)}"]`)]), Qe = (e) => ({ fragment: typeof e == "string" ? `[data-testid="${e.replaceAll("\"", "\\\"")}"]` : "[data-testid]" }), $e = /* @__PURE__ */ a({
|
|
1207
|
+
render: () => nt,
|
|
1208
|
+
resolve: () => tt,
|
|
1209
|
+
type: () => et
|
|
1210
|
+
}), et = "first", tt = (e) => e.elements.slice(0, 1), nt = () => ({ fragment: ":first" }), rt = /* @__PURE__ */ a({
|
|
1211
|
+
render: () => at,
|
|
1212
|
+
resolve: () => it,
|
|
1213
1213
|
type: () => "nth"
|
|
1214
|
-
}),
|
|
1214
|
+
}), it = (e, t) => {
|
|
1215
1215
|
let n = e.elements.at(t);
|
|
1216
1216
|
return n ? [n] : [];
|
|
1217
|
-
},
|
|
1217
|
+
}, at = (e) => ({ fragment: typeof e == "number" ? `:nth(${e})` : ":nth(?)" }), ot = (e) => {
|
|
1218
1218
|
let t = Error(e);
|
|
1219
1219
|
return t.name = "LocatorError", t;
|
|
1220
1220
|
}, Z = (e) => {
|
|
1221
|
-
if (e.length === 0) throw
|
|
1222
|
-
if (e.length > 1) throw
|
|
1221
|
+
if (e.length === 0) throw ot("No elements found");
|
|
1222
|
+
if (e.length > 1) throw ot(`Strict mode violation: locator resolved to ${e.length} elements`);
|
|
1223
1223
|
return e[0];
|
|
1224
|
-
},
|
|
1225
|
-
permission: () =>
|
|
1226
|
-
resolve: () =>
|
|
1227
|
-
type: () =>
|
|
1228
|
-
}),
|
|
1224
|
+
}, st = /* @__PURE__ */ a({
|
|
1225
|
+
permission: () => lt,
|
|
1226
|
+
resolve: () => ut,
|
|
1227
|
+
type: () => ct
|
|
1228
|
+
}), ct = "click", lt = {
|
|
1229
1229
|
scope: "act.click",
|
|
1230
1230
|
category: "act",
|
|
1231
1231
|
severity: 3,
|
|
1232
1232
|
title: "Click on the page",
|
|
1233
1233
|
description: "Lets the app press buttons or links for you."
|
|
1234
|
-
},
|
|
1234
|
+
}, ut = (e, t = {}) => {
|
|
1235
1235
|
let n = Z(e.elements), r = n.getBoundingClientRect(), i = t.position?.x ?? .5, a = t.position?.y ?? .5, o = {
|
|
1236
1236
|
bubbles: !0,
|
|
1237
1237
|
cancelable: !0,
|
|
@@ -1256,21 +1256,21 @@ var ze = /* @__PURE__ */ a({
|
|
|
1256
1256
|
...s,
|
|
1257
1257
|
buttons: 0
|
|
1258
1258
|
})), n.dispatchEvent(new MouseEvent("mouseup", l)), n.dispatchEvent(new MouseEvent("click", l));
|
|
1259
|
-
},
|
|
1260
|
-
permission: () =>
|
|
1261
|
-
resolve: () =>
|
|
1262
|
-
type: () =>
|
|
1263
|
-
}),
|
|
1259
|
+
}, dt = /* @__PURE__ */ a({
|
|
1260
|
+
permission: () => pt,
|
|
1261
|
+
resolve: () => gt,
|
|
1262
|
+
type: () => ft
|
|
1263
|
+
}), ft = "fill", pt = {
|
|
1264
1264
|
scope: "act.type",
|
|
1265
1265
|
category: "act",
|
|
1266
1266
|
severity: 1,
|
|
1267
1267
|
title: "Type into a text field",
|
|
1268
1268
|
description: "Lets the app fill in form fields on your behalf."
|
|
1269
|
-
},
|
|
1269
|
+
}, mt = (e, t) => {
|
|
1270
1270
|
e._valueTracker?.setValue("");
|
|
1271
1271
|
let n = e instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLInputElement.prototype, r = Object.getOwnPropertyDescriptor(n, "value")?.set;
|
|
1272
1272
|
r ? r.call(e, t) : e.value = t;
|
|
1273
|
-
},
|
|
1273
|
+
}, ht = (e, t) => {
|
|
1274
1274
|
if (e.type !== "range") return null;
|
|
1275
1275
|
let n = Number(e.min || 0), r = Number(e.max || 100);
|
|
1276
1276
|
if (!Number.isFinite(n) || !Number.isFinite(r) || r <= n) return null;
|
|
@@ -1308,15 +1308,15 @@ var ze = /* @__PURE__ */ a({
|
|
|
1308
1308
|
buttons: 0
|
|
1309
1309
|
}
|
|
1310
1310
|
};
|
|
1311
|
-
},
|
|
1311
|
+
}, gt = (e, t, n = {}) => {
|
|
1312
1312
|
let r = Z(e.elements);
|
|
1313
1313
|
if (r instanceof HTMLInputElement || r instanceof HTMLTextAreaElement) {
|
|
1314
|
-
let e = r instanceof HTMLInputElement ?
|
|
1314
|
+
let e = r instanceof HTMLInputElement ? ht(r, t) : null;
|
|
1315
1315
|
if (e) {
|
|
1316
|
-
r.dispatchEvent(new PointerEvent("pointerdown", e.pointerDown)), r.dispatchEvent(new MouseEvent("mousedown", e.mouseDown)),
|
|
1316
|
+
r.dispatchEvent(new PointerEvent("pointerdown", e.pointerDown)), r.dispatchEvent(new MouseEvent("mousedown", e.mouseDown)), mt(r, t), r.dispatchEvent(new Event("input", { bubbles: !0 })), r.dispatchEvent(new PointerEvent("pointerup", e.pointerUp)), r.dispatchEvent(new MouseEvent("mouseup", e.mouseUp)), r.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
1317
1317
|
return;
|
|
1318
1318
|
}
|
|
1319
|
-
|
|
1319
|
+
mt(r, t), r.dispatchEvent(new Event("input", { bubbles: !0 })), r.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
1320
1320
|
return;
|
|
1321
1321
|
}
|
|
1322
1322
|
if (r instanceof HTMLElement && r.isContentEditable) {
|
|
@@ -1324,17 +1324,17 @@ var ze = /* @__PURE__ */ a({
|
|
|
1324
1324
|
return;
|
|
1325
1325
|
}
|
|
1326
1326
|
throw Error(`fill: element <${r.tagName.toLowerCase()}> is not fillable`);
|
|
1327
|
-
},
|
|
1328
|
-
permission: () =>
|
|
1329
|
-
resolve: () =>
|
|
1330
|
-
type: () =>
|
|
1331
|
-
}),
|
|
1327
|
+
}, _t = /* @__PURE__ */ a({
|
|
1328
|
+
permission: () => yt,
|
|
1329
|
+
resolve: () => bt,
|
|
1330
|
+
type: () => vt
|
|
1331
|
+
}), vt = "hover", yt = {
|
|
1332
1332
|
scope: "act.hover",
|
|
1333
1333
|
category: "act",
|
|
1334
1334
|
severity: 1,
|
|
1335
1335
|
title: "Hover over the page",
|
|
1336
1336
|
description: "Lets the app point at things to reveal menus or tooltips."
|
|
1337
|
-
},
|
|
1337
|
+
}, bt = (e, t = {}) => {
|
|
1338
1338
|
let n = Z(e.elements), r = n.getBoundingClientRect(), i = {
|
|
1339
1339
|
bubbles: !0,
|
|
1340
1340
|
cancelable: !0,
|
|
@@ -1354,106 +1354,106 @@ var ze = /* @__PURE__ */ a({
|
|
|
1354
1354
|
...i,
|
|
1355
1355
|
bubbles: !1
|
|
1356
1356
|
})), n.dispatchEvent(new MouseEvent("mouseover", i)), n.dispatchEvent(new PointerEvent("pointermove", a)), n.dispatchEvent(new MouseEvent("mousemove", i));
|
|
1357
|
-
},
|
|
1358
|
-
permission: () =>
|
|
1359
|
-
resolve: () =>
|
|
1360
|
-
type: () =>
|
|
1361
|
-
}),
|
|
1357
|
+
}, xt = /* @__PURE__ */ a({
|
|
1358
|
+
permission: () => Ct,
|
|
1359
|
+
resolve: () => wt,
|
|
1360
|
+
type: () => St
|
|
1361
|
+
}), St = "textContent", Ct = {
|
|
1362
1362
|
scope: "read.text",
|
|
1363
1363
|
category: "read",
|
|
1364
1364
|
severity: 1,
|
|
1365
1365
|
title: "Read text from the page",
|
|
1366
1366
|
description: "Lets the app see the text shown on this page."
|
|
1367
|
-
},
|
|
1368
|
-
permission: () =>
|
|
1369
|
-
resolve: () =>
|
|
1370
|
-
type: () =>
|
|
1371
|
-
}),
|
|
1367
|
+
}, wt = (e, t = {}) => Z(e.elements).textContent, Tt = /* @__PURE__ */ a({
|
|
1368
|
+
permission: () => Dt,
|
|
1369
|
+
resolve: () => Ot,
|
|
1370
|
+
type: () => Et
|
|
1371
|
+
}), Et = "isVisible", Dt = {
|
|
1372
1372
|
scope: "read.visible",
|
|
1373
1373
|
category: "read",
|
|
1374
1374
|
severity: 0,
|
|
1375
1375
|
title: "See what’s visible on the page",
|
|
1376
1376
|
description: "Lets the app check which elements are currently on screen."
|
|
1377
|
-
},
|
|
1377
|
+
}, Ot = (e, t = {}) => {
|
|
1378
1378
|
let n = Z(e.elements);
|
|
1379
1379
|
if (!(n instanceof HTMLElement)) return !0;
|
|
1380
1380
|
let r = n.ownerDocument.defaultView?.getComputedStyle(n);
|
|
1381
1381
|
if (r?.display === "none" || r?.visibility === "hidden") return !1;
|
|
1382
1382
|
let i = n.getBoundingClientRect();
|
|
1383
1383
|
return i.width > 0 && i.height > 0;
|
|
1384
|
-
},
|
|
1385
|
-
permission: () =>
|
|
1386
|
-
resolve: () =>
|
|
1387
|
-
type: () =>
|
|
1388
|
-
}),
|
|
1384
|
+
}, kt = /* @__PURE__ */ a({
|
|
1385
|
+
permission: () => jt,
|
|
1386
|
+
resolve: () => Mt,
|
|
1387
|
+
type: () => At
|
|
1388
|
+
}), At = "count", jt = {
|
|
1389
1389
|
scope: "read.count",
|
|
1390
1390
|
category: "read",
|
|
1391
1391
|
severity: 0,
|
|
1392
1392
|
title: "Count items on the page",
|
|
1393
1393
|
description: "Lets the app count how many matching elements are present."
|
|
1394
|
-
},
|
|
1395
|
-
permission: () =>
|
|
1396
|
-
resolve: () =>
|
|
1397
|
-
type: () =>
|
|
1398
|
-
}),
|
|
1394
|
+
}, Mt = (e, t = {}) => e.elements.length, Nt = /* @__PURE__ */ a({
|
|
1395
|
+
permission: () => Ft,
|
|
1396
|
+
resolve: () => It,
|
|
1397
|
+
type: () => Pt
|
|
1398
|
+
}), Pt = "exists", Ft = {
|
|
1399
1399
|
scope: "read.check",
|
|
1400
1400
|
category: "read",
|
|
1401
1401
|
severity: 0,
|
|
1402
1402
|
title: "Check if something is on the page",
|
|
1403
1403
|
description: "Lets the app test whether a specific element exists."
|
|
1404
|
-
},
|
|
1405
|
-
permission: () =>
|
|
1406
|
-
resolve: () =>
|
|
1407
|
-
type: () =>
|
|
1408
|
-
}),
|
|
1404
|
+
}, It = (e, t = {}) => e.elements.length > 0, Lt = /* @__PURE__ */ a({
|
|
1405
|
+
permission: () => zt,
|
|
1406
|
+
resolve: () => Bt,
|
|
1407
|
+
type: () => Rt
|
|
1408
|
+
}), Rt = "getAttribute", zt = {
|
|
1409
1409
|
scope: "read.info",
|
|
1410
1410
|
category: "read",
|
|
1411
1411
|
severity: 1,
|
|
1412
1412
|
title: "Read info from the page",
|
|
1413
1413
|
description: "Lets the app read the href value from a part of the page."
|
|
1414
|
-
},
|
|
1415
|
-
permission: () =>
|
|
1416
|
-
resolve: () =>
|
|
1417
|
-
type: () =>
|
|
1418
|
-
}),
|
|
1414
|
+
}, Bt = (e, t, n = {}) => Z(e.elements).getAttribute(t), Vt = /* @__PURE__ */ a({
|
|
1415
|
+
permission: () => Ut,
|
|
1416
|
+
resolve: () => Wt,
|
|
1417
|
+
type: () => Ht
|
|
1418
|
+
}), Ht = "videoElement", Ut = {
|
|
1419
1419
|
scope: "media.video",
|
|
1420
1420
|
category: "media",
|
|
1421
1421
|
severity: 0,
|
|
1422
1422
|
title: "Control video playback",
|
|
1423
1423
|
description: "Lets the app play, pause, seek, and read the video on the page."
|
|
1424
|
-
},
|
|
1424
|
+
}, Wt = (e, t = {}) => {
|
|
1425
1425
|
let n = Z(e.elements);
|
|
1426
1426
|
if (!(n instanceof HTMLVideoElement)) throw Error(`videoElement: expected <video>, got <${n.tagName.toLowerCase()}>`);
|
|
1427
1427
|
return T(n);
|
|
1428
|
-
}, Q = "locator",
|
|
1428
|
+
}, Q = "locator", Gt = [
|
|
1429
1429
|
A,
|
|
1430
1430
|
{
|
|
1431
1431
|
...P,
|
|
1432
1432
|
nextLocatorType: "frameLocator"
|
|
1433
1433
|
},
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1434
|
+
Ve,
|
|
1435
|
+
Ge,
|
|
1436
|
+
Ye,
|
|
1437
|
+
$e,
|
|
1438
|
+
rt
|
|
1439
1439
|
], $ = [
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
],
|
|
1440
|
+
st,
|
|
1441
|
+
dt,
|
|
1442
|
+
_t,
|
|
1443
|
+
xt,
|
|
1444
|
+
Tt,
|
|
1445
|
+
kt,
|
|
1446
|
+
Nt,
|
|
1447
|
+
Lt,
|
|
1448
|
+
Vt
|
|
1449
|
+
], Kt = {
|
|
1450
1450
|
type: Q,
|
|
1451
|
-
selectorModules:
|
|
1451
|
+
selectorModules: Gt,
|
|
1452
1452
|
operationModules: $
|
|
1453
|
-
},
|
|
1453
|
+
}, qt = Be({
|
|
1454
1454
|
ownType: Q,
|
|
1455
|
-
selectorModules:
|
|
1455
|
+
selectorModules: Gt,
|
|
1456
1456
|
operationModules: $
|
|
1457
1457
|
});
|
|
1458
1458
|
//#endregion
|
|
1459
|
-
export { J as a, k as c, T as d, E as f, a as g, i as h,
|
|
1459
|
+
export { J as a, k as c, T as d, E as f, a as g, i as h, Re as i, ee as l, u as m, Q as n, q as o, O as p, ze as r, me as s, Kt as t, D as u };
|