@rpascene/web 0.30.8
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/README.md +9 -0
- package/bin/midscene-playground +3 -0
- package/dist/es/bin.mjs +26 -0
- package/dist/es/bin.mjs.map +1 -0
- package/dist/es/bridge-mode/agent-cli-side.mjs +117 -0
- package/dist/es/bridge-mode/agent-cli-side.mjs.map +1 -0
- package/dist/es/bridge-mode/browser.mjs +2 -0
- package/dist/es/bridge-mode/common.mjs +37 -0
- package/dist/es/bridge-mode/common.mjs.map +1 -0
- package/dist/es/bridge-mode/index.mjs +4 -0
- package/dist/es/bridge-mode/io-client.mjs +101 -0
- package/dist/es/bridge-mode/io-client.mjs.map +1 -0
- package/dist/es/bridge-mode/io-server.mjs +208 -0
- package/dist/es/bridge-mode/io-server.mjs.map +1 -0
- package/dist/es/bridge-mode/page-browser-side.mjs +103 -0
- package/dist/es/bridge-mode/page-browser-side.mjs.map +1 -0
- package/dist/es/chrome-extension/agent.mjs +9 -0
- package/dist/es/chrome-extension/agent.mjs.map +1 -0
- package/dist/es/chrome-extension/cdpInput.mjs +174 -0
- package/dist/es/chrome-extension/cdpInput.mjs.LICENSE.txt +5 -0
- package/dist/es/chrome-extension/cdpInput.mjs.map +1 -0
- package/dist/es/chrome-extension/dynamic-scripts.mjs +37 -0
- package/dist/es/chrome-extension/dynamic-scripts.mjs.map +1 -0
- package/dist/es/chrome-extension/index.mjs +5 -0
- package/dist/es/chrome-extension/page.mjs +633 -0
- package/dist/es/chrome-extension/page.mjs.map +1 -0
- package/dist/es/index.mjs +6 -0
- package/dist/es/playwright/ai-fixture.mjs +325 -0
- package/dist/es/playwright/ai-fixture.mjs.map +1 -0
- package/dist/es/playwright/index.mjs +23 -0
- package/dist/es/playwright/index.mjs.map +1 -0
- package/dist/es/playwright/page.mjs +9 -0
- package/dist/es/playwright/page.mjs.map +1 -0
- package/dist/es/playwright/reporter/index.mjs +90 -0
- package/dist/es/playwright/reporter/index.mjs.map +1 -0
- package/dist/es/puppeteer/agent-launcher.mjs +132 -0
- package/dist/es/puppeteer/agent-launcher.mjs.map +1 -0
- package/dist/es/puppeteer/base-page.mjs +491 -0
- package/dist/es/puppeteer/base-page.mjs.map +1 -0
- package/dist/es/puppeteer/index.mjs +17 -0
- package/dist/es/puppeteer/index.mjs.map +1 -0
- package/dist/es/puppeteer/page.mjs +9 -0
- package/dist/es/puppeteer/page.mjs.map +1 -0
- package/dist/es/static/index.mjs +3 -0
- package/dist/es/static/static-agent.mjs +10 -0
- package/dist/es/static/static-agent.mjs.map +1 -0
- package/dist/es/static/static-page.mjs +132 -0
- package/dist/es/static/static-page.mjs.map +1 -0
- package/dist/es/web-element.mjs +96 -0
- package/dist/es/web-element.mjs.map +1 -0
- package/dist/es/web-page.mjs +206 -0
- package/dist/es/web-page.mjs.map +1 -0
- package/dist/lib/bin.js +54 -0
- package/dist/lib/bin.js.map +1 -0
- package/dist/lib/bridge-mode/agent-cli-side.js +154 -0
- package/dist/lib/bridge-mode/agent-cli-side.js.map +1 -0
- package/dist/lib/bridge-mode/browser.js +38 -0
- package/dist/lib/bridge-mode/browser.js.map +1 -0
- package/dist/lib/bridge-mode/common.js +95 -0
- package/dist/lib/bridge-mode/common.js.map +1 -0
- package/dist/lib/bridge-mode/index.js +46 -0
- package/dist/lib/bridge-mode/index.js.map +1 -0
- package/dist/lib/bridge-mode/io-client.js +135 -0
- package/dist/lib/bridge-mode/io-client.js.map +1 -0
- package/dist/lib/bridge-mode/io-server.js +245 -0
- package/dist/lib/bridge-mode/io-server.js.map +1 -0
- package/dist/lib/bridge-mode/page-browser-side.js +147 -0
- package/dist/lib/bridge-mode/page-browser-side.js.map +1 -0
- package/dist/lib/chrome-extension/agent.js +43 -0
- package/dist/lib/chrome-extension/agent.js.map +1 -0
- package/dist/lib/chrome-extension/cdpInput.js +208 -0
- package/dist/lib/chrome-extension/cdpInput.js.LICENSE.txt +5 -0
- package/dist/lib/chrome-extension/cdpInput.js.map +1 -0
- package/dist/lib/chrome-extension/dynamic-scripts.js +77 -0
- package/dist/lib/chrome-extension/dynamic-scripts.js.map +1 -0
- package/dist/lib/chrome-extension/index.js +60 -0
- package/dist/lib/chrome-extension/index.js.map +1 -0
- package/dist/lib/chrome-extension/page.js +667 -0
- package/dist/lib/chrome-extension/page.js.map +1 -0
- package/dist/lib/index.js +60 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/playwright/ai-fixture.js +362 -0
- package/dist/lib/playwright/ai-fixture.js.map +1 -0
- package/dist/lib/playwright/index.js +66 -0
- package/dist/lib/playwright/index.js.map +1 -0
- package/dist/lib/playwright/page.js +43 -0
- package/dist/lib/playwright/page.js.map +1 -0
- package/dist/lib/playwright/reporter/index.js +124 -0
- package/dist/lib/playwright/reporter/index.js.map +1 -0
- package/dist/lib/puppeteer/agent-launcher.js +194 -0
- package/dist/lib/puppeteer/agent-launcher.js.map +1 -0
- package/dist/lib/puppeteer/base-page.js +531 -0
- package/dist/lib/puppeteer/base-page.js.map +1 -0
- package/dist/lib/puppeteer/index.js +57 -0
- package/dist/lib/puppeteer/index.js.map +1 -0
- package/dist/lib/puppeteer/page.js +43 -0
- package/dist/lib/puppeteer/page.js.map +1 -0
- package/dist/lib/static/index.js +52 -0
- package/dist/lib/static/index.js.map +1 -0
- package/dist/lib/static/static-agent.js +44 -0
- package/dist/lib/static/static-agent.js.map +1 -0
- package/dist/lib/static/static-page.js +166 -0
- package/dist/lib/static/static-page.js.map +1 -0
- package/dist/lib/web-element.js +136 -0
- package/dist/lib/web-element.js.map +1 -0
- package/dist/lib/web-page.js +256 -0
- package/dist/lib/web-page.js.map +1 -0
- package/dist/types/bin.d.ts +1 -0
- package/dist/types/bridge-mode/agent-cli-side.d.ts +32 -0
- package/dist/types/bridge-mode/browser.d.ts +2 -0
- package/dist/types/bridge-mode/common.d.ts +60 -0
- package/dist/types/bridge-mode/index.d.ts +4 -0
- package/dist/types/bridge-mode/io-client.d.ts +10 -0
- package/dist/types/bridge-mode/io-server.d.ts +26 -0
- package/dist/types/bridge-mode/page-browser-side.d.ts +18 -0
- package/dist/types/chrome-extension/agent.d.ts +5 -0
- package/dist/types/chrome-extension/cdpInput.d.ts +52 -0
- package/dist/types/chrome-extension/dynamic-scripts.d.ts +3 -0
- package/dist/types/chrome-extension/index.d.ts +5 -0
- package/dist/types/chrome-extension/page.d.ts +95 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/playwright/ai-fixture.d.ts +117 -0
- package/dist/types/playwright/index.d.ts +12 -0
- package/dist/types/playwright/page.d.ts +6 -0
- package/dist/types/playwright/reporter/index.d.ts +18 -0
- package/dist/types/puppeteer/agent-launcher.d.ts +29 -0
- package/dist/types/puppeteer/base-page.d.ts +90 -0
- package/dist/types/puppeteer/index.d.ts +9 -0
- package/dist/types/puppeteer/page.d.ts +6 -0
- package/dist/types/static/index.d.ts +2 -0
- package/dist/types/static/static-agent.d.ts +5 -0
- package/dist/types/static/static-page.d.ts +52 -0
- package/dist/types/web-element.d.ts +51 -0
- package/dist/types/web-page.d.ts +59 -0
- package/package.json +164 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
/*! For license information please see cdpInput.js.LICENSE.txt */
|
|
2
|
+
"use strict";
|
|
3
|
+
var __webpack_require__ = {};
|
|
4
|
+
(()=>{
|
|
5
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: definition[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.r = (exports1)=>{
|
|
17
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
+
value: 'Module'
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
+
value: true
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
})();
|
|
25
|
+
var __webpack_exports__ = {};
|
|
26
|
+
__webpack_require__.r(__webpack_exports__);
|
|
27
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
+
CdpKeyboard: ()=>CdpKeyboard
|
|
29
|
+
});
|
|
30
|
+
const us_keyboard_layout_namespaceObject = require("@rpascene/shared/us-keyboard-layout");
|
|
31
|
+
const utils_namespaceObject = require("@rpascene/shared/utils");
|
|
32
|
+
/**
|
|
33
|
+
* @license
|
|
34
|
+
* Copyright 2017 Google Inc.
|
|
35
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
36
|
+
*/ function _check_private_redeclaration(obj, privateCollection) {
|
|
37
|
+
if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
38
|
+
}
|
|
39
|
+
function _class_apply_descriptor_get(receiver, descriptor) {
|
|
40
|
+
if (descriptor.get) return descriptor.get.call(receiver);
|
|
41
|
+
return descriptor.value;
|
|
42
|
+
}
|
|
43
|
+
function _class_apply_descriptor_set(receiver, descriptor, value) {
|
|
44
|
+
if (descriptor.set) descriptor.set.call(receiver, value);
|
|
45
|
+
else {
|
|
46
|
+
if (!descriptor.writable) throw new TypeError("attempted to set read only private field");
|
|
47
|
+
descriptor.value = value;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function _class_extract_field_descriptor(receiver, privateMap, action) {
|
|
51
|
+
if (!privateMap.has(receiver)) throw new TypeError("attempted to " + action + " private field on non-instance");
|
|
52
|
+
return privateMap.get(receiver);
|
|
53
|
+
}
|
|
54
|
+
function _class_private_field_get(receiver, privateMap) {
|
|
55
|
+
var descriptor = _class_extract_field_descriptor(receiver, privateMap, "get");
|
|
56
|
+
return _class_apply_descriptor_get(receiver, descriptor);
|
|
57
|
+
}
|
|
58
|
+
function _class_private_field_init(obj, privateMap, value) {
|
|
59
|
+
_check_private_redeclaration(obj, privateMap);
|
|
60
|
+
privateMap.set(obj, value);
|
|
61
|
+
}
|
|
62
|
+
function _class_private_field_set(receiver, privateMap, value) {
|
|
63
|
+
var descriptor = _class_extract_field_descriptor(receiver, privateMap, "set");
|
|
64
|
+
_class_apply_descriptor_set(receiver, descriptor, value);
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
function _class_private_method_get(receiver, privateSet, fn) {
|
|
68
|
+
if (!privateSet.has(receiver)) throw new TypeError("attempted to get private field on non-instance");
|
|
69
|
+
return fn;
|
|
70
|
+
}
|
|
71
|
+
function _class_private_method_init(obj, privateSet) {
|
|
72
|
+
_check_private_redeclaration(obj, privateSet);
|
|
73
|
+
privateSet.add(obj);
|
|
74
|
+
}
|
|
75
|
+
function _define_property(obj, key, value) {
|
|
76
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
77
|
+
value: value,
|
|
78
|
+
enumerable: true,
|
|
79
|
+
configurable: true,
|
|
80
|
+
writable: true
|
|
81
|
+
});
|
|
82
|
+
else obj[key] = value;
|
|
83
|
+
return obj;
|
|
84
|
+
}
|
|
85
|
+
var _pressedKeys = /*#__PURE__*/ new WeakMap(), _client = /*#__PURE__*/ new WeakMap(), _modifierBit = /*#__PURE__*/ new WeakSet(), _keyDescriptionForString = /*#__PURE__*/ new WeakSet();
|
|
86
|
+
class CdpKeyboard {
|
|
87
|
+
updateClient(client) {
|
|
88
|
+
_class_private_field_set(this, _client, client);
|
|
89
|
+
}
|
|
90
|
+
async down(key, options = {
|
|
91
|
+
text: void 0,
|
|
92
|
+
commands: []
|
|
93
|
+
}) {
|
|
94
|
+
const description = _class_private_method_get(this, _keyDescriptionForString, keyDescriptionForString).call(this, key);
|
|
95
|
+
const autoRepeat = _class_private_field_get(this, _pressedKeys).has(description.code);
|
|
96
|
+
_class_private_field_get(this, _pressedKeys).add(description.code);
|
|
97
|
+
this._modifiers |= _class_private_method_get(this, _modifierBit, modifierBit).call(this, description.key);
|
|
98
|
+
const text = void 0 === options.text ? description.text : options.text;
|
|
99
|
+
await _class_private_field_get(this, _client).send('Input.dispatchKeyEvent', {
|
|
100
|
+
type: text ? 'keyDown' : 'rawKeyDown',
|
|
101
|
+
modifiers: this._modifiers,
|
|
102
|
+
windowsVirtualKeyCode: description.keyCode,
|
|
103
|
+
code: description.code,
|
|
104
|
+
key: description.key,
|
|
105
|
+
text: text,
|
|
106
|
+
unmodifiedText: text,
|
|
107
|
+
autoRepeat,
|
|
108
|
+
location: description.location,
|
|
109
|
+
isKeypad: 3 === description.location,
|
|
110
|
+
commands: options.commands
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
async up(key) {
|
|
114
|
+
const description = _class_private_method_get(this, _keyDescriptionForString, keyDescriptionForString).call(this, key);
|
|
115
|
+
this._modifiers &= ~_class_private_method_get(this, _modifierBit, modifierBit).call(this, description.key);
|
|
116
|
+
_class_private_field_get(this, _pressedKeys).delete(description.code);
|
|
117
|
+
await _class_private_field_get(this, _client).send('Input.dispatchKeyEvent', {
|
|
118
|
+
type: 'keyUp',
|
|
119
|
+
modifiers: this._modifiers,
|
|
120
|
+
key: description.key,
|
|
121
|
+
windowsVirtualKeyCode: description.keyCode,
|
|
122
|
+
code: description.code,
|
|
123
|
+
location: description.location
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
async sendCharacter(char) {
|
|
127
|
+
await _class_private_field_get(this, _client).send('Input.insertText', {
|
|
128
|
+
text: char
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
charIsKey(char) {
|
|
132
|
+
return !!us_keyboard_layout_namespaceObject._keyDefinitions[char];
|
|
133
|
+
}
|
|
134
|
+
async type(text, options = {}) {
|
|
135
|
+
const delay = options.delay || void 0;
|
|
136
|
+
for (const char of text)if (this.charIsKey(char)) await this.press(char, {
|
|
137
|
+
delay
|
|
138
|
+
});
|
|
139
|
+
else {
|
|
140
|
+
if (delay) await new Promise((f)=>setTimeout(f, delay));
|
|
141
|
+
await this.sendCharacter(char);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
async press(key, options = {}) {
|
|
145
|
+
const { delay = null } = options;
|
|
146
|
+
const keys = Array.isArray(key) ? key : [
|
|
147
|
+
key
|
|
148
|
+
];
|
|
149
|
+
for (const k of keys)await this.down(k, options);
|
|
150
|
+
if (delay) await new Promise((f)=>setTimeout(f, options.delay));
|
|
151
|
+
for (const k of [
|
|
152
|
+
...keys
|
|
153
|
+
].reverse())await this.up(k);
|
|
154
|
+
}
|
|
155
|
+
constructor(client){
|
|
156
|
+
_class_private_method_init(this, _modifierBit);
|
|
157
|
+
_class_private_method_init(this, _keyDescriptionForString);
|
|
158
|
+
_class_private_field_init(this, _pressedKeys, {
|
|
159
|
+
writable: true,
|
|
160
|
+
value: new Set()
|
|
161
|
+
});
|
|
162
|
+
_class_private_field_init(this, _client, {
|
|
163
|
+
writable: true,
|
|
164
|
+
value: void 0
|
|
165
|
+
});
|
|
166
|
+
_define_property(this, "_modifiers", 0);
|
|
167
|
+
_class_private_field_set(this, _client, client);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
function modifierBit(key) {
|
|
171
|
+
if ('Alt' === key) return 1;
|
|
172
|
+
if ('Control' === key) return 2;
|
|
173
|
+
if ('Meta' === key) return 4;
|
|
174
|
+
if ('Shift' === key) return 8;
|
|
175
|
+
return 0;
|
|
176
|
+
}
|
|
177
|
+
function keyDescriptionForString(keyString) {
|
|
178
|
+
const shift = 8 & this._modifiers;
|
|
179
|
+
const description = {
|
|
180
|
+
key: '',
|
|
181
|
+
keyCode: 0,
|
|
182
|
+
code: '',
|
|
183
|
+
text: '',
|
|
184
|
+
location: 0
|
|
185
|
+
};
|
|
186
|
+
const definition = us_keyboard_layout_namespaceObject._keyDefinitions[keyString];
|
|
187
|
+
(0, utils_namespaceObject.assert)(definition, `Unknown key: "${keyString}"`);
|
|
188
|
+
if (definition.key) description.key = definition.key;
|
|
189
|
+
if (shift && definition.shiftKey) description.key = definition.shiftKey;
|
|
190
|
+
if (definition.keyCode) description.keyCode = definition.keyCode;
|
|
191
|
+
if (shift && definition.shiftKeyCode) description.keyCode = definition.shiftKeyCode;
|
|
192
|
+
if (definition.code) description.code = definition.code;
|
|
193
|
+
if (definition.location) description.location = definition.location;
|
|
194
|
+
if (1 === description.key.length) description.text = description.key;
|
|
195
|
+
if (definition.text) description.text = definition.text;
|
|
196
|
+
if (shift && definition.shiftText) description.text = definition.shiftText;
|
|
197
|
+
if (-9 & this._modifiers) description.text = '';
|
|
198
|
+
return description;
|
|
199
|
+
}
|
|
200
|
+
exports.CdpKeyboard = __webpack_exports__.CdpKeyboard;
|
|
201
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
202
|
+
"CdpKeyboard"
|
|
203
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
204
|
+
Object.defineProperty(exports, '__esModule', {
|
|
205
|
+
value: true
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
//# sourceMappingURL=cdpInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chrome-extension\\cdpInput.js","sources":["webpack://@rpascene/web/webpack/runtime/define_property_getters","webpack://@rpascene/web/webpack/runtime/has_own_property","webpack://@rpascene/web/webpack/runtime/make_namespace_object","webpack://@rpascene/web/./src/chrome-extension/cdpInput.ts"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// From https://github.com/puppeteer/puppeteer/blob/15abcc390862fd08cc3475532f2d9a11284aee6b/packages/puppeteer-core/src/cdp/Input.ts#L55\n// with some modifications to fit the session type\n/**\n * @license\n * Copyright 2017 Google Inc.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n type KeyDefinition,\n type KeyInput,\n _keyDefinitions,\n} from '@rpascene/shared/us-keyboard-layout';\nimport { assert } from '@rpascene/shared/utils';\n\ntype KeyDescription = Required<\n Pick<KeyDefinition, 'keyCode' | 'key' | 'text' | 'code' | 'location'>\n>;\n\n/**\n * @public\n */\nexport interface KeyDownOptions {\n /**\n * @deprecated Do not use. This is automatically handled.\n */\n text?: string;\n /**\n * @deprecated Do not use. This is automatically handled.\n */\n commands?: string[];\n}\n\n/**\n * @public\n */\nexport interface KeyboardTypeOptions {\n /**\n * Time to wait between key presses in milliseconds\n * @default undefined\n */\n delay?: number;\n}\n\n/**\n * @public\n */\nexport type KeyPressOptions = KeyDownOptions & KeyboardTypeOptions;\n\ntype InternalCDPSession = {\n send: (command: string, params: any) => Promise<void>;\n};\n\n/**\n * @internal\n */\nexport class CdpKeyboard {\n #pressedKeys = new Set<string>();\n\n #client: InternalCDPSession;\n\n _modifiers = 0;\n\n constructor(client: InternalCDPSession) {\n this.#client = client;\n }\n\n updateClient(client: InternalCDPSession): void {\n this.#client = client;\n }\n\n async down(\n key: KeyInput,\n options: Readonly<KeyDownOptions> = {\n text: undefined,\n commands: [],\n },\n ): Promise<void> {\n const description = this.#keyDescriptionForString(key);\n\n const autoRepeat = this.#pressedKeys.has(description.code);\n this.#pressedKeys.add(description.code);\n this._modifiers |= this.#modifierBit(description.key);\n\n const text = options.text === undefined ? description.text : options.text;\n await this.#client.send('Input.dispatchKeyEvent', {\n type: text ? 'keyDown' : 'rawKeyDown',\n modifiers: this._modifiers,\n windowsVirtualKeyCode: description.keyCode,\n code: description.code,\n key: description.key,\n text: text,\n unmodifiedText: text,\n autoRepeat,\n location: description.location,\n isKeypad: description.location === 3,\n commands: options.commands,\n });\n }\n\n #modifierBit(key: string): number {\n if (key === 'Alt') {\n return 1;\n }\n if (key === 'Control') {\n return 2;\n }\n if (key === 'Meta') {\n return 4;\n }\n if (key === 'Shift') {\n return 8;\n }\n return 0;\n }\n\n #keyDescriptionForString(keyString: KeyInput): KeyDescription {\n const shift = this._modifiers & 8;\n const description = {\n key: '',\n keyCode: 0,\n code: '',\n text: '',\n location: 0,\n };\n\n const definition = _keyDefinitions[keyString];\n\n assert(definition, `Unknown key: \"${keyString}\"`);\n\n if (definition.key) {\n description.key = definition.key;\n }\n if (shift && definition.shiftKey) {\n description.key = definition.shiftKey;\n }\n\n if (definition.keyCode) {\n description.keyCode = definition.keyCode;\n }\n if (shift && definition.shiftKeyCode) {\n description.keyCode = definition.shiftKeyCode;\n }\n\n if (definition.code) {\n description.code = definition.code;\n }\n\n if (definition.location) {\n description.location = definition.location;\n }\n\n if (description.key.length === 1) {\n description.text = description.key;\n }\n\n if (definition.text) {\n description.text = definition.text;\n }\n if (shift && definition.shiftText) {\n description.text = definition.shiftText;\n }\n\n // if any modifiers besides shift are pressed, no text should be sent\n if (this._modifiers & ~8) {\n description.text = '';\n }\n\n return description;\n }\n\n async up(key: KeyInput): Promise<void> {\n const description = this.#keyDescriptionForString(key);\n\n this._modifiers &= ~this.#modifierBit(description.key);\n this.#pressedKeys.delete(description.code);\n await this.#client.send('Input.dispatchKeyEvent', {\n type: 'keyUp',\n modifiers: this._modifiers,\n key: description.key,\n windowsVirtualKeyCode: description.keyCode,\n code: description.code,\n location: description.location,\n });\n }\n\n async sendCharacter(char: string): Promise<void> {\n await this.#client.send('Input.insertText', { text: char });\n }\n\n private charIsKey(char: string): char is KeyInput {\n return !!_keyDefinitions[char as KeyInput];\n }\n\n async type(\n text: string,\n options: Readonly<KeyboardTypeOptions> = {},\n ): Promise<void> {\n const delay = options.delay || undefined;\n for (const char of text) {\n if (this.charIsKey(char)) {\n await this.press(char, { delay });\n } else {\n if (delay) {\n await new Promise((f) => {\n return setTimeout(f, delay);\n });\n }\n await this.sendCharacter(char);\n }\n }\n }\n\n async press(\n key: KeyInput | KeyInput[],\n options: Readonly<KeyPressOptions> = {},\n ): Promise<void> {\n const { delay = null } = options;\n const keys = Array.isArray(key) ? key : [key];\n\n for (const k of keys) {\n await this.down(k, options);\n }\n\n if (delay) {\n await new Promise((f) => {\n return setTimeout(f, options.delay);\n });\n }\n\n for (const k of [...keys].reverse()) {\n await this.up(k);\n }\n }\n}\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","_pressedKeys","_client","modifierBit","keyDescriptionForString","CdpKeyboard","client","options","undefined","description","autoRepeat","text","char","_keyDefinitions","delay","Promise","f","setTimeout","keys","Array","k","Set","keyString","shift","assert"],"mappings":";;;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAF,oBAAoB,CAAC,GAAG,CAACI,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFL,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,eAAlB,OAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;;ACJA;;;;CAIC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAmDCI,eAAAA,WAAAA,GAAAA,IAAAA,WAEAC,UAAAA,WAA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AAI;IAEpC,IAAI4B,SAAS5B,WAAW,SAAS,EAC/Bc,YAAY,IAAI,GAAGd,WAAW,SAAS;IAIzC,IAAI,AAAkB,KAAlB,IAAI,CAAC,UAAU,EACjBc,YAAY,IAAI,GAAG;IAGrB,OAAOA;AACT"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
injectWaterFlowAnimation: ()=>injectWaterFlowAnimation,
|
|
28
|
+
getHtmlElementScript: ()=>getHtmlElementScript,
|
|
29
|
+
injectStopWaterFlowAnimation: ()=>injectStopWaterFlowAnimation
|
|
30
|
+
});
|
|
31
|
+
const utils_namespaceObject = require("@rpascene/shared/utils");
|
|
32
|
+
let scriptFileContentCache = null;
|
|
33
|
+
const getHtmlElementScript = async ()=>{
|
|
34
|
+
const scriptFileToRetrieve = chrome.runtime.getURL("scripts/htmlElement.js");
|
|
35
|
+
if (scriptFileContentCache) return scriptFileContentCache;
|
|
36
|
+
if (utils_namespaceObject.ifInBrowser || utils_namespaceObject.ifInWorker) {
|
|
37
|
+
const script = await fetch(scriptFileToRetrieve);
|
|
38
|
+
scriptFileContentCache = await script.text();
|
|
39
|
+
return scriptFileContentCache;
|
|
40
|
+
}
|
|
41
|
+
return '';
|
|
42
|
+
};
|
|
43
|
+
let waterFlowScriptFileContentCache = null;
|
|
44
|
+
const injectWaterFlowAnimation = async ()=>{
|
|
45
|
+
const waterFlowScriptFileToRetrieve = chrome.runtime.getURL("scripts/water-flow.js");
|
|
46
|
+
if (waterFlowScriptFileContentCache) return waterFlowScriptFileContentCache;
|
|
47
|
+
if (utils_namespaceObject.ifInBrowser || utils_namespaceObject.ifInWorker) {
|
|
48
|
+
const script = await fetch(waterFlowScriptFileToRetrieve);
|
|
49
|
+
waterFlowScriptFileContentCache = await script.text();
|
|
50
|
+
return waterFlowScriptFileContentCache;
|
|
51
|
+
}
|
|
52
|
+
return '';
|
|
53
|
+
};
|
|
54
|
+
let stopWaterFlowScriptFileContentCache = null;
|
|
55
|
+
const injectStopWaterFlowAnimation = async ()=>{
|
|
56
|
+
const stopWaterFlowScriptFileToRetrieve = chrome.runtime.getURL("scripts/stop-water-flow.js");
|
|
57
|
+
if (stopWaterFlowScriptFileContentCache) return stopWaterFlowScriptFileContentCache;
|
|
58
|
+
if (utils_namespaceObject.ifInBrowser || utils_namespaceObject.ifInWorker) {
|
|
59
|
+
const script = await fetch(stopWaterFlowScriptFileToRetrieve);
|
|
60
|
+
stopWaterFlowScriptFileContentCache = await script.text();
|
|
61
|
+
return stopWaterFlowScriptFileContentCache;
|
|
62
|
+
}
|
|
63
|
+
return '';
|
|
64
|
+
};
|
|
65
|
+
exports.getHtmlElementScript = __webpack_exports__.getHtmlElementScript;
|
|
66
|
+
exports.injectStopWaterFlowAnimation = __webpack_exports__.injectStopWaterFlowAnimation;
|
|
67
|
+
exports.injectWaterFlowAnimation = __webpack_exports__.injectWaterFlowAnimation;
|
|
68
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
69
|
+
"getHtmlElementScript",
|
|
70
|
+
"injectStopWaterFlowAnimation",
|
|
71
|
+
"injectWaterFlowAnimation"
|
|
72
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
73
|
+
Object.defineProperty(exports, '__esModule', {
|
|
74
|
+
value: true
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
//# sourceMappingURL=dynamic-scripts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chrome-extension\\dynamic-scripts.js","sources":["webpack://@rpascene/web/webpack/runtime/define_property_getters","webpack://@rpascene/web/webpack/runtime/has_own_property","webpack://@rpascene/web/webpack/runtime/make_namespace_object","webpack://@rpascene/web/./src/chrome-extension/dynamic-scripts.ts"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// import fs from 'node:fs';\nimport { ifInBrowser, ifInWorker } from '@rpascene/shared/utils';\n\n// remember to include this file into extension's package\n// extract html element from page\nlet scriptFileContentCache: string | null = null;\nexport const getHtmlElementScript = async () => {\n const scriptFileToRetrieve = chrome.runtime.getURL('scripts/htmlElement.js');\n if (scriptFileContentCache) return scriptFileContentCache;\n if (ifInBrowser || ifInWorker) {\n const script = await fetch(scriptFileToRetrieve);\n scriptFileContentCache = await script.text();\n return scriptFileContentCache;\n }\n return ''\n // return fs.readFileSync(scriptFileToRetrieve, 'utf8');\n};\n\n// inject water flow animation\nlet waterFlowScriptFileContentCache: string | null = null;\nexport const injectWaterFlowAnimation = async () => {\n const waterFlowScriptFileToRetrieve = chrome.runtime.getURL(\n 'scripts/water-flow.js',\n );\n if (waterFlowScriptFileContentCache) return waterFlowScriptFileContentCache;\n if (ifInBrowser || ifInWorker) {\n const script = await fetch(waterFlowScriptFileToRetrieve);\n waterFlowScriptFileContentCache = await script.text();\n return waterFlowScriptFileContentCache;\n }\n return ''\n // return fs.readFileSync(waterFlowScriptFileToRetrieve, 'utf8');\n};\n\n// inject stop water flow animation\nlet stopWaterFlowScriptFileContentCache: string | null = null;\nexport const injectStopWaterFlowAnimation = async () => {\n const stopWaterFlowScriptFileToRetrieve = chrome.runtime.getURL(\n 'scripts/stop-water-flow.js',\n );\n if (stopWaterFlowScriptFileContentCache)\n return stopWaterFlowScriptFileContentCache;\n if (ifInBrowser || ifInWorker) {\n const script = await fetch(stopWaterFlowScriptFileToRetrieve);\n stopWaterFlowScriptFileContentCache = await script.text();\n return stopWaterFlowScriptFileContentCache;\n }\n return ''\n // return fs.readFileSync(stopWaterFlowScriptFileToRetrieve, 'utf8');\n};\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","scriptFileContentCache","getHtmlElementScript","scriptFileToRetrieve","chrome","ifInBrowser","ifInWorker","script","fetch","waterFlowScriptFileContentCache","injectWaterFlowAnimation","waterFlowScriptFileToRetrieve","stopWaterFlowScriptFileContentCache","injectStopWaterFlowAnimation","stopWaterFlowScriptFileToRetrieve"],"mappings":";;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,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
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
+
__webpack_require__.d(getter, {
|
|
7
|
+
a: getter
|
|
8
|
+
});
|
|
9
|
+
return getter;
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
14
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: definition[key]
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
(()=>{
|
|
21
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
22
|
+
})();
|
|
23
|
+
(()=>{
|
|
24
|
+
__webpack_require__.r = (exports1)=>{
|
|
25
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
|
+
value: 'Module'
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
29
|
+
value: true
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
var __webpack_exports__ = {};
|
|
34
|
+
__webpack_require__.r(__webpack_exports__);
|
|
35
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
ChromeExtensionProxyPage: ()=>external_page_js_default(),
|
|
37
|
+
ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED: ()=>common_namespaceObject.ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED,
|
|
38
|
+
overrideAIConfig: ()=>env_namespaceObject.overrideAIConfig,
|
|
39
|
+
ChromeExtensionProxyPageAgent: ()=>external_agent_js_namespaceObject.ChromeExtensionProxyPageAgent
|
|
40
|
+
});
|
|
41
|
+
const common_namespaceObject = require("@rpascene/shared/common");
|
|
42
|
+
const external_agent_js_namespaceObject = require("./agent.js");
|
|
43
|
+
const external_page_js_namespaceObject = require("./page.js");
|
|
44
|
+
var external_page_js_default = /*#__PURE__*/ __webpack_require__.n(external_page_js_namespaceObject);
|
|
45
|
+
const env_namespaceObject = require("@rpascene/shared/env");
|
|
46
|
+
exports.ChromeExtensionProxyPage = __webpack_exports__.ChromeExtensionProxyPage;
|
|
47
|
+
exports.ChromeExtensionProxyPageAgent = __webpack_exports__.ChromeExtensionProxyPageAgent;
|
|
48
|
+
exports.ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED = __webpack_exports__.ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED;
|
|
49
|
+
exports.overrideAIConfig = __webpack_exports__.overrideAIConfig;
|
|
50
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
51
|
+
"ChromeExtensionProxyPage",
|
|
52
|
+
"ChromeExtensionProxyPageAgent",
|
|
53
|
+
"ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED",
|
|
54
|
+
"overrideAIConfig"
|
|
55
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
56
|
+
Object.defineProperty(exports, '__esModule', {
|
|
57
|
+
value: true
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chrome-extension\\index.js","sources":["webpack://@rpascene/web/webpack/runtime/compat_get_default_export","webpack://@rpascene/web/webpack/runtime/define_property_getters","webpack://@rpascene/web/webpack/runtime/has_own_property","webpack://@rpascene/web/webpack/runtime/make_namespace_object"],"sourcesContent":["// getDefaultExport function for compatibility with non-ESM modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["__webpack_require__","module","getter","definition","key","Object","obj","prop","Symbol"],"mappings":";;;IACAA,oBAAoB,CAAC,GAAG,CAACC;QACxB,IAAIC,SAASD,UAAUA,OAAO,UAAU,GACvC,IAAOA,MAAM,CAAC,UAAU,GACxB,IAAOA;QACRD,oBAAoB,CAAC,CAACE,QAAQ;YAAE,GAAGA;QAAO;QAC1C,OAAOA;IACR;;;ICPAF,oBAAoB,CAAC,GAAG,CAAC,UAASG;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGH,oBAAoB,CAAC,CAACG,YAAYC,QAAQ,CAACJ,oBAAoB,CAAC,CAAC,UAASI,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAJ,oBAAoB,CAAC,GAAG,CAACM,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFP,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,eAAlB,OAAOQ,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D"}
|